diff --git a/code-generation/language-c/pom.xml b/code-generation/language-c/pom.xml index 090efd95915..0a95df389bb 100644 --- a/code-generation/language-c/pom.xml +++ b/code-generation/language-c/pom.xml @@ -62,7 +62,6 @@ org.apache.plc4x.plugins:plc4x-maven-plugin:${plc4x-code-generation.version} org.apache.plc4x.plugins:plc4x-code-generation-protocol-base:${plc4x-code-generation.version} org.apache.plc4x.plugins:plc4x-code-generation-types-base:${plc4x-code-generation.version} - org.apache.plc4x.plugins:plc4x-code-generation-types-base:${plc4x-code-generation.version} */pom.xml diff --git a/code-generation/language-c/src/main/resources/templates/c/data-io-template.c.ftlh b/code-generation/language-c/src/main/resources/templates/c/data-io-template.c.ftlh index f3235a1ea73..294ade301d2 100644 --- a/code-generation/language-c/src/main/resources/templates/c/data-io-template.c.ftlh +++ b/code-generation/language-c/src/main/resources/templates/c/data-io-template.c.ftlh @@ -179,7 +179,11 @@ plc4c_return_code ${helper.getCTypeName(type.name)}_parse(plc4x_spi_context ctx, return new PlcStruct(${field.name}); <#break--> <#case "STRING"> - *data_item = plc4c_data_create_string_data(stringLength, ${manualField.name}); + <#if (parserArguments?filter(parserArgument->parserArgument.name=="stringLength"))?has_content> + *data_item = plc4c_data_create_string_data(stringLength, ${manualField.name}); + <#else> + *data_item = plc4c_data_create_string_data(strlen(value), ${manualField.name}); + <#break> <#default> *data_item = plc4c_data_create_${case.name?lower_case}_data(${manualField.name}); diff --git a/code-generation/language-go/pom.xml b/code-generation/language-go/pom.xml index d2bb8a337ab..cdfc3363aed 100644 --- a/code-generation/language-go/pom.xml +++ b/code-generation/language-go/pom.xml @@ -62,7 +62,6 @@ org.apache.plc4x.plugins:plc4x-maven-plugin:${plc4x-code-generation.version} org.apache.plc4x.plugins:plc4x-code-generation-protocol-base:${plc4x-code-generation.version} org.apache.plc4x.plugins:plc4x-code-generation-types-base:${plc4x-code-generation.version} - org.apache.plc4x.plugins:plc4x-code-generation-types-base:${plc4x-code-generation.version} */pom.xml diff --git a/plc4c/drivers/plc4x/include/plc4c/driver_plc4x_static.h b/plc4c/drivers/plc4x/include/plc4c/driver_plc4x_static.h index 4a6d28aadae..fad5aec109f 100644 --- a/plc4c/drivers/plc4x/include/plc4c/driver_plc4x_static.h +++ b/plc4c/drivers/plc4x/include/plc4c/driver_plc4x_static.h @@ -33,8 +33,8 @@ extern "C" { * Static functions * */ - uint8_t plc4c_spi_evaluation_helper_str_len(char* str); +char* plc4c_plc4x_read_write_parse_string(plc4c_spi_read_buffer* io, char* encoding); #ifdef __cplusplus } diff --git a/plc4c/drivers/plc4x/src/driver_plc4x_static.c b/plc4c/drivers/plc4x/src/driver_plc4x_static.c index 9eff0971454..22cebf7fafc 100644 --- a/plc4c/drivers/plc4x/src/driver_plc4x_static.c +++ b/plc4c/drivers/plc4x/src/driver_plc4x_static.c @@ -29,4 +29,31 @@ uint8_t plc4c_spi_evaluation_helper_str_len(char* str) { return strlen(str); } - +char* plc4c_plc4x_read_write_parse_string(plc4c_spi_read_buffer* io, char* encoding) { + if (strcmp(encoding, "UTF-8") == 0) { + // Read the max length (which is not interesting for us. + uint8_t length; + plc4c_return_code res = plc4c_spi_read_unsigned_byte(io, 8, &length); + if (res != OK) { + return NULL; + } + char* result = malloc(sizeof(char) * (length + 1)); + if (result == NULL) { + return NULL; + } + char* curPos = result; + for(int i = 0; i < length; i++) { + uint8_t val; + plc4c_return_code res = plc4c_spi_read_unsigned_byte(io, 8, &val); + if (res != OK) { + return NULL; + } + *curPos = (char) val; + curPos++; + } + *curPos = '\0'; + return result; + } else if (strcmp(encoding, "UTF-16") == 0) { + } + return ""; +} diff --git a/plc4c/drivers/s7/include/plc4c/driver_s7_encode_decode.h b/plc4c/drivers/s7/include/plc4c/driver_s7_encode_decode.h index 28da28458b2..65f578c705c 100644 --- a/plc4c/drivers/s7/include/plc4c/driver_s7_encode_decode.h +++ b/plc4c/drivers/s7/include/plc4c/driver_s7_encode_decode.h @@ -26,7 +26,11 @@ extern "C" { #include "plc4c/driver_s7.h" #include "s7_var_request_parameter_item.h" - +struct plc4c_s7_read_write_s7_var_request_parameter_item_field { + plc4c_s7_read_write_s7_var_request_parameter_item* parameter_item; + char* s7_address_any_encoding_of_string; +}; +typedef struct plc4c_s7_read_write_s7_var_request_parameter_item_field plc4c_s7_read_write_s7_var_request_parameter_item_field; uint16_t plc4c_driver_s7_encode_tsap_id( plc4c_driver_s7_device_group device_group, uint8_t rack, uint8_t slot); diff --git a/plc4c/drivers/s7/include/plc4c/driver_s7_static.h b/plc4c/drivers/s7/include/plc4c/driver_s7_static.h index 2b52cec337e..05ba1d9cc88 100644 --- a/plc4c/drivers/s7/include/plc4c/driver_s7_static.h +++ b/plc4c/drivers/s7/include/plc4c/driver_s7_static.h @@ -48,9 +48,9 @@ uint16_t plc4c_s7_read_write_s7msec_to_int(plc4c_spi_read_buffer* io); plc4c_return_code plc4c_s7_read_write_int_to_s7msec(plc4c_spi_write_buffer* writeBuffer, uint16_t value); -char* plc4c_s7_read_write_parse_s7_string(plc4c_spi_read_buffer* io, int32_t stringLength, char* encoding); +char* plc4c_s7_read_write_parse_s7_string(plc4c_spi_read_buffer* io, int32_t stringLength, char* encoding, char* stringEncoding); -char* plc4c_s7_read_write_parse_s7_char(plc4c_spi_read_buffer* io, char* encoding); +char* plc4c_s7_read_write_parse_s7_char(plc4c_spi_read_buffer* io, char* encoding, char* stringEncoding); time_t plc4c_s7_read_write_parse_tia_time(plc4c_spi_read_buffer* io); diff --git a/plc4c/drivers/s7/src/driver_s7_encode_decode.c b/plc4c/drivers/s7/src/driver_s7_encode_decode.c index af2bf2765eb..9fbdbfc0bce 100644 --- a/plc4c/drivers/s7/src/driver_s7_encode_decode.c +++ b/plc4c/drivers/s7/src/driver_s7_encode_decode.c @@ -23,6 +23,7 @@ #include #include #include +#include "plc4c/driver_s7_encode_decode.h" uint16_t plc4c_driver_s7_encode_tsap_id( plc4c_driver_s7_device_group device_group, uint8_t rack, uint8_t slot) { @@ -92,7 +93,7 @@ plc4c_return_code decode_byte(const char* from_ptr, const char* to_ptr, uint8_t* plc4c_return_code plc4c_driver_s7_encode_address(char* address, void** item) { plc4c_s7_read_write_s7_var_request_parameter_item* s7_item; - + s7_item = malloc(sizeof(plc4c_s7_read_write_s7_var_request_parameter_item)); s7_item->_type = plc4c_s7_read_write_s7_var_request_parameter_item_type_plc4c_s7_read_write_s7_var_request_parameter_item_address; @@ -114,6 +115,7 @@ plc4c_return_code plc4c_driver_s7_encode_address(char* address, void** item) { // Parser logic char* cur_pos = address; char* last_pos = address; + char* string_encoding = NULL; // - Does it start with "%"? if (*cur_pos == '%') { cur_pos++; @@ -247,6 +249,19 @@ plc4c_return_code plc4c_driver_s7_encode_address(char* address, void** item) { *(num_elements + len) = '\0'; } + if (*cur_pos == '|') { + // Next comes the num_elements + cur_pos++; + last_pos = cur_pos; + while (*cur_pos != '\0') { + cur_pos++; + } + len = cur_pos - last_pos; + string_encoding = malloc(sizeof(char) * (len + 1)); + strncpy(string_encoding, last_pos, len); + *(string_encoding + len) = '\0'; + } + //////////////////////////////////////////////////////////////////////////// // Now parse the contents. //////////////////////////////////////////////////////////////////////////// @@ -261,6 +276,7 @@ plc4c_return_code plc4c_driver_s7_encode_address(char* address, void** item) { free(data_type); free(string_length); free(num_elements); + free(string_encoding); free(s7_item); return NO_MEMORY; } @@ -283,6 +299,7 @@ plc4c_return_code plc4c_driver_s7_encode_address(char* address, void** item) { free(data_type); free(string_length); free(num_elements); + free(string_encoding); free(any_address); free(s7_item); return INVALID_ADDRESS; @@ -320,15 +337,50 @@ plc4c_return_code plc4c_driver_s7_encode_address(char* address, void** item) { // TODO: THis should be moved to "driver_s7_packets.c->plc4c_return_code plc4c_driver_s7_create_s7_read_request" if (any_address->s7_address_any_transport_size == + plc4c_s7_read_write_transport_size_TIME || + any_address->s7_address_any_transport_size == + plc4c_s7_read_write_transport_size_LINT || + any_address->s7_address_any_transport_size == + plc4c_s7_read_write_transport_size_ULINT || + any_address->s7_address_any_transport_size == + plc4c_s7_read_write_transport_size_LWORD || + any_address->s7_address_any_transport_size == + plc4c_s7_read_write_transport_size_LREAL || + any_address->s7_address_any_transport_size == + plc4c_s7_read_write_transport_size_REAL || + any_address->s7_address_any_transport_size == + plc4c_s7_read_write_transport_size_LTIME || + any_address->s7_address_any_transport_size == + plc4c_s7_read_write_transport_size_DATE || + any_address->s7_address_any_transport_size == + plc4c_s7_read_write_transport_size_TIME_OF_DAY || + any_address->s7_address_any_transport_size == + plc4c_s7_read_write_transport_size_DATE_AND_TIME) { + any_address->s7_address_any_transport_size = plc4c_s7_read_write_transport_size_BYTE; + any_address->s7_address_any_number_of_elements = + plc4c_s7_read_write_transport_size_length_in_bytes(plc4x_spi_context_background(),&(any_address->s7_address_any_transport_size)) * + any_address->s7_address_any_number_of_elements; + } else if (any_address->s7_address_any_transport_size == plc4c_s7_read_write_transport_size_STRING) { + any_address->s7_address_any_transport_size = plc4c_s7_read_write_transport_size_BYTE; if (string_length != NULL) { any_address->s7_address_any_number_of_elements = - strtol(string_length, 0, 10) * + (strtol(string_length, 0, 10) +2) * any_address->s7_address_any_number_of_elements; - } else if (any_address->s7_address_any_transport_size == - plc4c_s7_read_write_transport_size_STRING) { + } else { + any_address->s7_address_any_number_of_elements = + 256 * any_address->s7_address_any_number_of_elements; + } + } else if (any_address->s7_address_any_transport_size == + plc4c_s7_read_write_transport_size_WSTRING) { + any_address->s7_address_any_transport_size = plc4c_s7_read_write_transport_size_BYTE; + if (string_length != NULL) { + any_address->s7_address_any_number_of_elements = + (strtol(string_length, 0, 10) +2) * 2 * + any_address->s7_address_any_number_of_elements; + } else { any_address->s7_address_any_number_of_elements = - 254 * any_address->s7_address_any_number_of_elements; + 512 * any_address->s7_address_any_number_of_elements; } } else if (any_address->s7_address_any_transport_size == plc4c_s7_read_write_transport_size_TOD) { @@ -396,8 +448,12 @@ plc4c_return_code plc4c_driver_s7_encode_address(char* address, void** item) { free(read_buffer); free(raw_data); } + plc4c_s7_read_write_s7_var_request_parameter_item_field* s7_item_field; - *item = s7_item; + s7_item_field = malloc(sizeof(plc4c_s7_read_write_s7_var_request_parameter_item_field)); + s7_item_field->parameter_item = s7_item; + s7_item_field->s7_address_any_encoding_of_string = string_encoding; + *item = s7_item_field; return OK; } diff --git a/plc4c/drivers/s7/src/driver_s7_packets.c b/plc4c/drivers/s7/src/driver_s7_packets.c index 31a72434e1c..553a987d3e3 100644 --- a/plc4c/drivers/s7/src/driver_s7_packets.c +++ b/plc4c/drivers/s7/src/driver_s7_packets.c @@ -713,9 +713,9 @@ plc4c_return_code plc4c_driver_s7_create_s7_read_request( plc4c_s7_read_write_s7_var_request_parameter_item* updated_item_address; item = cur_item->value; - + plc4c_s7_read_write_s7_var_request_parameter_item_field* field = item->address; // Get the item address from the API request. - parsed_item_address = item->address; + parsed_item_address = field->parameter_item; // Create a copy of the request item... updated_item_address = malloc(sizeof(plc4c_s7_read_write_s7_var_request_parameter_item)); @@ -723,14 +723,14 @@ plc4c_return_code plc4c_driver_s7_create_s7_read_request( return NO_MEMORY; } updated_item_address->_type = parsed_item_address->_type; - updated_item_address->s7_var_request_parameter_item_address_address = + updated_item_address->s7_var_request_parameter_item_address_address = malloc(sizeof(plc4c_s7_read_write_s7_address)); if (updated_item_address->s7_var_request_parameter_item_address_address == NULL) { return NO_MEMORY; } // Memcpy inplace of fields assignment, as all fields where assigned memcpy(updated_item_address->s7_var_request_parameter_item_address_address, - parsed_item_address->s7_var_request_parameter_item_address_address, + parsed_item_address->s7_var_request_parameter_item_address_address, sizeof(plc4c_s7_read_write_s7_address)); // In case of TIME values, we read 4 bytes for each value instead. @@ -855,7 +855,10 @@ plc4c_return_code plc4c_driver_s7_create_s7_write_request( // Get the item address from the API request. item = list_item->value; parsed_item = item->item; - parsed_param = parsed_item->address; + + plc4c_s7_read_write_s7_var_request_parameter_item_field* field = parsed_item->address; + + parsed_param = field->parameter_item; parsed_value = item->value; // Make a copy of the param diff --git a/plc4c/drivers/s7/src/driver_s7_sm_read.c b/plc4c/drivers/s7/src/driver_s7_sm_read.c index abc8d59f648..daf25127862 100644 --- a/plc4c/drivers/s7/src/driver_s7_sm_read.c +++ b/plc4c/drivers/s7/src/driver_s7_sm_read.c @@ -203,6 +203,7 @@ plc4c_return_code plc4c_driver_s7_parse_read_response( plc4c_data* data_item; plc4c_response_value_item* response_value_item; char* data_protocol_id; + char* string_encoding; uint16_t num_elements; int32_t string_length; uint8_t* byte_array; @@ -225,11 +226,13 @@ plc4c_return_code plc4c_driver_s7_parse_read_response( // Get the protocol id for the current item from the corresponding // request item. Also get the number of elements, if it's an array. - request_address = request_item->address; + plc4c_s7_read_write_s7_var_request_parameter_item_field* field = request_item->address; + request_address = field->parameter_item; transport_size = request_address->s7_var_request_parameter_item_address_address->s7_address_any_transport_size; num_elements = request_address->s7_var_request_parameter_item_address_address->s7_address_any_number_of_elements; data_protocol_id = plc4c_s7_read_write_transport_size_get_data_protocol_id(transport_size); - + string_encoding = field->s7_address_any_encoding_of_string; + if (transport_size == plc4c_s7_read_write_transport_size_STRING) { // TODO: This needs to be changed to read arrays of strings. string_length = num_elements; @@ -257,12 +260,12 @@ plc4c_return_code plc4c_driver_s7_parse_read_response( all_data_item = plc4c_data_create_list_data(all_list); free(all_list); for (idx = 0; idx < num_elements ; idx++) { - plc4c_s7_read_write_data_item_parse(plc4x_spi_context_background(), read_buffer, data_protocol_id, string_length, &data_item); + plc4c_s7_read_write_data_item_parse(plc4x_spi_context_background(), read_buffer, data_protocol_id, string_length,string_encoding, &data_item); plc4c_utils_list_insert_head_value(all_data_item->data.list_value, (void*)data_item); } data_item = all_data_item; } else { - plc4c_s7_read_write_data_item_parse(plc4x_spi_context_background(), read_buffer, data_protocol_id, string_length, &data_item); + plc4c_s7_read_write_data_item_parse(plc4x_spi_context_background(), read_buffer, data_protocol_id, string_length,string_encoding, &data_item); } // Create a new response value-item diff --git a/plc4c/drivers/s7/src/driver_s7_static.c b/plc4c/drivers/s7/src/driver_s7_static.c index 42dc91f2edf..dff33e5bb6b 100644 --- a/plc4c/drivers/s7/src/driver_s7_static.c +++ b/plc4c/drivers/s7/src/driver_s7_static.c @@ -53,7 +53,7 @@ uint16_t plc4c_s7_read_write_s7msec_to_int(plc4c_spi_read_buffer* io) { char* plc4c_s7_read_write_parse_s7_string(plc4c_spi_read_buffer* io, int32_t stringLength, - char* encoding) { + char* encoding, char* stringEncoding) { if (strcmp(encoding, "UTF-8") == 0) { // Read the max length (which is not interesting for us. uint8_t maxLen; @@ -89,7 +89,7 @@ char* plc4c_s7_read_write_parse_s7_string(plc4c_spi_read_buffer* io, } char* plc4c_s7_read_write_parse_s7_char(plc4c_spi_read_buffer* io, - char* encoding) { + char* encoding, char* stringEncoding) { if (strcmp(encoding, "UTF-8") == 0) { char* result = malloc(sizeof(char) * 2); if (result == NULL) { diff --git a/plc4c/generated-sources/s7/include/data_item.h b/plc4c/generated-sources/s7/include/data_item.h index 32893bb96b7..26527f78bf9 100644 --- a/plc4c/generated-sources/s7/include/data_item.h +++ b/plc4c/generated-sources/s7/include/data_item.h @@ -28,12 +28,12 @@ // Code generated by code-generation. DO NOT EDIT. -plc4c_return_code plc4c_s7_read_write_data_item_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, char* dataProtocolId, int32_t stringLength, plc4c_data** data_item); +plc4c_return_code plc4c_s7_read_write_data_item_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, char* dataProtocolId, int32_t stringLength, char* stringEncoding, plc4c_data** data_item); -plc4c_return_code plc4c_s7_read_write_data_item_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, char* dataProtocolId, int32_t stringLength, plc4c_data** data_item); +plc4c_return_code plc4c_s7_read_write_data_item_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, char* dataProtocolId, int32_t stringLength, char* stringEncoding, plc4c_data** data_item); -uint16_t plc4c_s7_read_write_data_item_length_in_bytes(plc4x_spi_context ctx, plc4c_data* data_item, char* dataProtocolId, int32_t stringLength); +uint16_t plc4c_s7_read_write_data_item_length_in_bytes(plc4x_spi_context ctx, plc4c_data* data_item, char* dataProtocolId, int32_t stringLength, char* stringEncoding); -uint16_t plc4c_s7_read_write_data_item_length_in_bits(plc4x_spi_context ctx, plc4c_data* data_item, char* dataProtocolId, int32_t stringLength); +uint16_t plc4c_s7_read_write_data_item_length_in_bits(plc4x_spi_context ctx, plc4c_data* data_item, char* dataProtocolId, int32_t stringLength, char* stringEncoding); #endif // PLC4C_S7_READ_WRITE_DATA_ITEM_H_ diff --git a/plc4c/generated-sources/s7/src/data_item.c b/plc4c/generated-sources/s7/src/data_item.c index c0e09c4108a..fd94f5a49ed 100644 --- a/plc4c/generated-sources/s7/src/data_item.c +++ b/plc4c/generated-sources/s7/src/data_item.c @@ -31,7 +31,7 @@ // Code generated by code-generation. DO NOT EDIT. // Parse function. -plc4c_return_code plc4c_s7_read_write_data_item_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, char* dataProtocolId, int32_t stringLength, plc4c_data** data_item) { +plc4c_return_code plc4c_s7_read_write_data_item_parse(plc4x_spi_context ctx, plc4c_spi_read_buffer* readBuffer, char* dataProtocolId, int32_t stringLength, char* stringEncoding, plc4c_data** data_item) { uint16_t startPos = plc4c_spi_read_get_pos(readBuffer); uint16_t curPos; plc4c_return_code _res = OK; @@ -215,39 +215,31 @@ plc4c_return_code plc4c_s7_read_write_data_item_parse(plc4x_spi_context ctx, plc } else if(strcmp(dataProtocolId, "IEC61131_CHAR") == 0) { /* CHAR */ - // Simple Field (value) - char* value = ""; - _res = plc4c_spi_read_string(readBuffer, 8, "UTF-8", (char**) &value); - if(_res != OK) { - return _res; - } + // Manual Field (value) + char* value = (char*) (plc4c_s7_read_write_parse_s7_char(readBuffer, "UTF-8", stringEncoding)); *data_item = plc4c_data_create_char_data(value); } else if(strcmp(dataProtocolId, "IEC61131_WCHAR") == 0) { /* CHAR */ - // Simple Field (value) - char* value = ""; - _res = plc4c_spi_read_string(readBuffer, 16, "UTF-16", (char**) &value); - if(_res != OK) { - return _res; - } + // Manual Field (value) + char* value = (char*) (plc4c_s7_read_write_parse_s7_char(readBuffer, "UTF-16", stringEncoding)); *data_item = plc4c_data_create_char_data(value); } else if(strcmp(dataProtocolId, "IEC61131_STRING") == 0) { /* STRING */ // Manual Field (value) - char* value = (char*) (plc4c_s7_read_write_parse_s7_string(readBuffer, stringLength, "UTF-8")); + char* value = (char*) (plc4c_s7_read_write_parse_s7_string(readBuffer, stringLength, "UTF-8", stringEncoding)); - *data_item = plc4c_data_create_string_data(stringLength, value); + *data_item = plc4c_data_create_string_data(stringLength, value); } else if(strcmp(dataProtocolId, "IEC61131_WSTRING") == 0) { /* STRING */ // Manual Field (value) - char* value = (char*) (plc4c_s7_read_write_parse_s7_string(readBuffer, stringLength, "UTF-16")); + char* value = (char*) (plc4c_s7_read_write_parse_s7_string(readBuffer, stringLength, "UTF-16", stringEncoding)); - *data_item = plc4c_data_create_string_data(stringLength, value); + *data_item = plc4c_data_create_string_data(stringLength, value); } else if(strcmp(dataProtocolId, "IEC61131_TIME") == 0) { /* TIME */ @@ -390,7 +382,7 @@ plc4c_return_code plc4c_s7_read_write_data_item_parse(plc4x_spi_context ctx, plc return OK; } -plc4c_return_code plc4c_s7_read_write_data_item_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, char* dataProtocolId, int32_t stringLength, plc4c_data** data_item) { +plc4c_return_code plc4c_s7_read_write_data_item_serialize(plc4x_spi_context ctx, plc4c_spi_write_buffer* writeBuffer, char* dataProtocolId, int32_t stringLength, char* stringEncoding, plc4c_data** data_item) { plc4c_return_code _res = OK; if(strcmp(dataProtocolId, "IEC61131_BOOL") == 0) { /* BOOL */ @@ -501,18 +493,10 @@ plc4c_return_code plc4c_s7_read_write_data_item_serialize(plc4x_spi_context ctx, } } else if(strcmp(dataProtocolId, "IEC61131_CHAR") == 0) { /* CHAR */ - // Simple field (value) - _res = plc4c_spi_write_string(writeBuffer, 8, "UTF-8", (*data_item)->data.char_value); - if(_res != OK) { - return _res; - } + // Manual Field (value) } else if(strcmp(dataProtocolId, "IEC61131_WCHAR") == 0) { /* CHAR */ - // Simple field (value) - _res = plc4c_spi_write_string(writeBuffer, 16, "UTF-16", (*data_item)->data.char_value); - if(_res != OK) { - return _res; - } + // Manual Field (value) } else if(strcmp(dataProtocolId, "IEC61131_STRING") == 0) { /* STRING */ // Manual Field (value) @@ -607,11 +591,11 @@ plc4c_return_code plc4c_s7_read_write_data_item_serialize(plc4x_spi_context ctx, return OK; } -uint16_t plc4c_s7_read_write_data_item_length_in_bytes(plc4x_spi_context ctx, plc4c_data* data_item, char* data_protocol_id, int32_t string_length) { - return plc4c_s7_read_write_data_item_length_in_bits(ctx, data_item, data_protocol_id, string_length) / 8; +uint16_t plc4c_s7_read_write_data_item_length_in_bytes(plc4x_spi_context ctx, plc4c_data* data_item, char* data_protocol_id, int32_t string_length, char* string_encoding) { + return plc4c_s7_read_write_data_item_length_in_bits(ctx, data_item, data_protocol_id, string_length, string_encoding) / 8; } -uint16_t plc4c_s7_read_write_data_item_length_in_bits(plc4x_spi_context ctx, plc4c_data* data_item, char* dataProtocolId, int32_t stringLength) { +uint16_t plc4c_s7_read_write_data_item_length_in_bits(plc4x_spi_context ctx, plc4c_data* data_item, char* dataProtocolId, int32_t stringLength, char* stringEncoding) { uint16_t lengthInBits = 0; if(strcmp(dataProtocolId, "IEC61131_BOOL") == 0) { /* BOOL */ @@ -678,26 +662,20 @@ uint16_t plc4c_s7_read_write_data_item_length_in_bits(plc4x_spi_context ctx, plc lengthInBits += 64; } else if(strcmp(dataProtocolId, "IEC61131_CHAR") == 0) { /* CHAR */ - // Simple field (value) + // Manual Field (value) lengthInBits += 8; } else if(strcmp(dataProtocolId, "IEC61131_WCHAR") == 0) { /* CHAR */ - // Simple field (value) + // Manual Field (value) lengthInBits += 16; } else if(strcmp(dataProtocolId, "IEC61131_STRING") == 0) { /* STRING */ // Manual Field (value) - { - char* _value = data_item->data.string_value; - lengthInBits += (plc4c_spi_evaluation_helper_str_len(_value)) + (2); - } + lengthInBits += (((stringLength) + (2))) * (8); } else if(strcmp(dataProtocolId, "IEC61131_WSTRING") == 0) { /* STRING */ // Manual Field (value) - { - char* _value = data_item->data.string_value; - lengthInBits += (((plc4c_spi_evaluation_helper_str_len(_value)) * (2))) + (2); - } + lengthInBits += (((stringLength) + (2))) * (16); } else if(strcmp(dataProtocolId, "IEC61131_TIME") == 0) { /* TIME */ // Simple field (milliseconds) diff --git a/plc4c/generated-sources/s7/src/transport_size.c b/plc4c/generated-sources/s7/src/transport_size.c index b681e48047f..50978d3c977 100644 --- a/plc4c/generated-sources/s7/src/transport_size.c +++ b/plc4c/generated-sources/s7/src/transport_size.c @@ -1093,28 +1093,28 @@ plc4c_s7_read_write_data_transport_size plc4c_s7_read_write_transport_size_get_d return plc4c_s7_read_write_data_transport_size_INTEGER; } case plc4c_s7_read_write_transport_size_LINT: { /* '0x0C' */ - return -1; + return plc4c_s7_read_write_data_transport_size_BYTE_WORD_DWORD; } case plc4c_s7_read_write_transport_size_ULINT: { /* '0x0D' */ - return -1; + return plc4c_s7_read_write_data_transport_size_BYTE_WORD_DWORD; } case plc4c_s7_read_write_transport_size_REAL: { /* '0x0E' */ - return plc4c_s7_read_write_data_transport_size_REAL; + return plc4c_s7_read_write_data_transport_size_BYTE_WORD_DWORD; } case plc4c_s7_read_write_transport_size_LREAL: { /* '0x0F' */ - return -1; + return plc4c_s7_read_write_data_transport_size_BYTE_WORD_DWORD; } case plc4c_s7_read_write_transport_size_CHAR: { /* '0x10' */ return plc4c_s7_read_write_data_transport_size_BYTE_WORD_DWORD; } case plc4c_s7_read_write_transport_size_WCHAR: { /* '0x11' */ - return -1; + return plc4c_s7_read_write_data_transport_size_BYTE_WORD_DWORD; } case plc4c_s7_read_write_transport_size_STRING: { /* '0x12' */ return plc4c_s7_read_write_data_transport_size_BYTE_WORD_DWORD; } case plc4c_s7_read_write_transport_size_WSTRING: { /* '0x13' */ - return -1; + return plc4c_s7_read_write_data_transport_size_BYTE_WORD_DWORD; } case plc4c_s7_read_write_transport_size_TIME: { /* '0x14' */ return -1; @@ -1154,9 +1154,6 @@ plc4c_s7_read_write_transport_size plc4c_s7_read_write_transport_size_get_first_ case plc4c_s7_read_write_transport_size_INT: /* '0x06' */{ return plc4c_s7_read_write_transport_size_INT; } - case plc4c_s7_read_write_transport_size_REAL: /* '0x0E' */{ - return plc4c_s7_read_write_transport_size_REAL; - } case plc4c_s7_read_write_transport_size_LWORD: /* '0x05' */{ return plc4c_s7_read_write_transport_size_LWORD; } @@ -1363,10 +1360,10 @@ plc4c_s7_read_write_transport_size plc4c_s7_read_write_transport_size_get_base_t return plc4c_s7_read_write_transport_size_INT; } case plc4c_s7_read_write_transport_size_LINT: { /* '0x0C' */ - return plc4c_s7_read_write_transport_size_INT; + return -1; } case plc4c_s7_read_write_transport_size_ULINT: { /* '0x0D' */ - return plc4c_s7_read_write_transport_size_INT; + return -1; } case plc4c_s7_read_write_transport_size_REAL: { /* '0x0E' */ return -1; diff --git a/plc4go/assets/testing/protocols/s7/DriverTestsuite.xml b/plc4go/assets/testing/protocols/s7/DriverTestsuite.xml index 8d76a5ce141..af0ebaee55f 100644 --- a/plc4go/assets/testing/protocols/s7/DriverTestsuite.xml +++ b/plc4go/assets/testing/protocols/s7/DriverTestsuite.xml @@ -441,7 +441,7 @@ 240 true - 10 + 1 @@ -450,7 +450,7 @@ 50 1 0 - 10 + 1 14 0 @@ -517,7 +517,7 @@ 50 3 0 - 10 + 1 2 6 @@ -613,7 +613,7 @@ 240 true - 10 + 1 @@ -622,7 +622,7 @@ 50 1 0 - 10 + 1 14 0 @@ -689,7 +689,7 @@ 50 2 0 - 10 + 1 0 0 diff --git a/plc4go/internal/cbus/tagtype_string.go b/plc4go/internal/cbus/tagtype_string.go index 8fc2d7b40b7..d1711b81d4b 100644 --- a/plc4go/internal/cbus/tagtype_string.go +++ b/plc4go/internal/cbus/tagtype_string.go @@ -1,20 +1,3 @@ -// Licensed to Apache Software Foundation (ASF) under one or more contributor -// license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright -// ownership. Apache Software Foundation (ASF) licenses this file to you under -// the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - // Code generated by "stringer -type TagType"; DO NOT EDIT. package cbus diff --git a/plc4go/internal/modbus/tagtype_string.go b/plc4go/internal/modbus/tagtype_string.go index 15f4f32f3e6..9bacd75b6a2 100644 --- a/plc4go/internal/modbus/tagtype_string.go +++ b/plc4go/internal/modbus/tagtype_string.go @@ -1,20 +1,3 @@ -// Licensed to Apache Software Foundation (ASF) under one or more contributor -// license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright -// ownership. Apache Software Foundation (ASF) licenses this file to you under -// the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - // Code generated by "stringer -type TagType"; DO NOT EDIT. package modbus diff --git a/plc4go/internal/s7/Reader.go b/plc4go/internal/s7/Reader.go index a0c3aca9455..15b5fd76fd1 100644 --- a/plc4go/internal/s7/Reader.go +++ b/plc4go/internal/s7/Reader.go @@ -210,13 +210,16 @@ func (m *Reader) ToPlc4xReadResponse(response readWriteModel.S7Message, readRequ for i, tagName := range readRequest.GetTagNames() { tag := readRequest.GetTag(tagName).(PlcTag) payloadItem := payloadItems[i] - + stringLength := uint16(254) + if s7StringTag, ok := tag.(PlcStringTag); ok { + stringLength = s7StringTag.stringLength + } responseCode := decodeResponseCode(payloadItem.GetReturnCode()) // Decode the data according to the information from the request log.Trace().Msg("decode data") responseCodes[tagName] = responseCode if responseCode == model.PlcResponseCode_OK { - plcValue, err := readWriteModel.DataItemParse(context.Background(), payloadItem.GetData(), tag.GetDataType().DataProtocolId(), int32(tag.GetNumElements())) + plcValue, err := readWriteModel.DataItemParse(context.Background(), payloadItem.GetData(), tag.GetDataType().DataProtocolId(), int32(stringLength), tag.GetStringEncoding()) if err != nil { return nil, errors.Wrap(err, "Error parsing data item") } diff --git a/plc4go/internal/s7/Tag.go b/plc4go/internal/s7/Tag.go index 9dac0237543..bb0edd83838 100644 --- a/plc4go/internal/s7/Tag.go +++ b/plc4go/internal/s7/Tag.go @@ -39,27 +39,30 @@ type PlcTag interface { GetMemoryArea() readWriteModel.MemoryArea GetByteOffset() uint16 GetBitOffset() uint8 + GetStringEncoding() string } type plcTag struct { - TagType TagType - MemoryArea readWriteModel.MemoryArea - BlockNumber uint16 - ByteOffset uint16 - BitOffset uint8 - NumElements uint16 - Datatype readWriteModel.TransportSize + TagType TagType + MemoryArea readWriteModel.MemoryArea + BlockNumber uint16 + ByteOffset uint16 + BitOffset uint8 + NumElements uint16 + Datatype readWriteModel.TransportSize + StringEncoding string } -func NewTag(memoryArea readWriteModel.MemoryArea, blockNumber uint16, byteOffset uint16, bitOffset uint8, numElements uint16, datatype readWriteModel.TransportSize) PlcTag { +func NewTag(memoryArea readWriteModel.MemoryArea, blockNumber uint16, byteOffset uint16, bitOffset uint8, numElements uint16, datatype readWriteModel.TransportSize, stringEncoding string) PlcTag { return plcTag{ - TagType: S7Tag, - MemoryArea: memoryArea, - BlockNumber: blockNumber, - ByteOffset: byteOffset, - BitOffset: bitOffset, - NumElements: numElements, - Datatype: datatype, + TagType: S7Tag, + MemoryArea: memoryArea, + BlockNumber: blockNumber, + ByteOffset: byteOffset, + BitOffset: bitOffset, + NumElements: numElements, + Datatype: datatype, + StringEncoding: stringEncoding, } } @@ -68,16 +71,17 @@ type PlcStringTag struct { stringLength uint16 } -func NewStringTag(memoryArea readWriteModel.MemoryArea, blockNumber uint16, byteOffset uint16, bitOffset uint8, numElements uint16, stringLength uint16, datatype readWriteModel.TransportSize) PlcStringTag { +func NewStringTag(memoryArea readWriteModel.MemoryArea, blockNumber uint16, byteOffset uint16, bitOffset uint8, numElements uint16, stringLength uint16, datatype readWriteModel.TransportSize, stringEncoding string) PlcStringTag { return PlcStringTag{ plcTag: plcTag{ - TagType: S7StringTag, - MemoryArea: memoryArea, - BlockNumber: blockNumber, - ByteOffset: byteOffset, - BitOffset: bitOffset, - NumElements: numElements, - Datatype: datatype, + TagType: S7StringTag, + MemoryArea: memoryArea, + BlockNumber: blockNumber, + ByteOffset: byteOffset, + BitOffset: bitOffset, + NumElements: numElements, + Datatype: datatype, + StringEncoding: stringEncoding, }, stringLength: stringLength, } @@ -142,6 +146,10 @@ func (m plcTag) Serialize() ([]byte, error) { return wb.GetBytes(), nil } +func (m plcTag) GetStringEncoding() string { + return m.StringEncoding +} + func (m plcTag) SerializeWithWriteBuffer(writeBuffer utils.WriteBuffer) error { if err := writeBuffer.PushContext(m.TagType.GetName()); err != nil { return err diff --git a/plc4go/internal/s7/TagHandler.go b/plc4go/internal/s7/TagHandler.go index 6c2bc99cb06..d7f21cce66b 100644 --- a/plc4go/internal/s7/TagHandler.go +++ b/plc4go/internal/s7/TagHandler.go @@ -57,11 +57,11 @@ func NewTagHandler() TagHandler { return TagHandler{ addressPattern: regexp.MustCompile(`^%(?P.)(?P[XBWD]?)(?P\d{1,7})(.(?P[0-7]))?:(?P[a-zA-Z_]+)(\[(?P\d+)])?`), //blockNumber usually has its max hat around 64000 --> 5digits - dataBlockAddressPattern: regexp.MustCompile(`^%DB(?P\d{1,5}).DB(?P[XBWD]?)(?P\d{1,7})(.(?P[0-7]))?:(?P[a-zA-Z_]+)(\[(?P\d+)])?`), - dataBlockShortPattern: regexp.MustCompile(`^%DB(?P\d{1,5}):(?P\d{1,7})(.(?P[0-7]))?:(?P[a-zA-Z_]+)(\[(?P\d+)])?`), - dataBlockStringAddressPattern: regexp.MustCompile(`^%DB(?P\d{1,5}).DB(?P[XBWD]?)(?P\d{1,7})(.(?P[0-7]))?:(?PSTRING|WSTRING)\((?P\d{1,3})\)(\[(?P\d+)])?`), - dataBlockStringShortPattern: regexp.MustCompile(`^%DB(?P\d{1,5}):(?P\d{1,7})(.(?P[0-7]))?:(?PSTRING|WSTRING)\((?P\d{1,3})\)(\[(?P\d+)])?`), - plcProxyAddressPattern: regexp.MustCompile(`[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}`), + dataBlockAddressPattern: regexp.MustCompile(`^%DB(?P\d{1,5}).DB(?P[XBWD]?)(?P\d{1,7})(.(?P[0-7]))?:(?P[a-zA-Z_]+)(\[(?P\d+)])?(\|(?P[a-z0-9A-Z_-]+))?`), + dataBlockShortPattern: regexp.MustCompile(`^%DB(?P\d{1,5}):(?P\d{1,7})(.(?P[0-7]))?:(?P[a-zA-Z_]+)(\[(?P\d+)])?(\|(?P[a-z0-9A-Z_-]+))?`), + dataBlockStringAddressPattern: regexp.MustCompile(`^%DB(?P\d{1,5}).DB(?P[XBWD]?)(?P\d{1,7})(.(?P[0-7]))?:(?PSTRING|WSTRING)\((?P\d{1,3})\)(\[(?P\d+)])?(\|(?P[a-z0-9A-Z_-]+))?`), + dataBlockStringShortPattern: regexp.MustCompile(`^%DB(?P\d{1,5}):(?P\d{1,7})(.(?P[0-7]))?:(?PSTRING|WSTRING)\((?P\d{1,3})\)(\[(?P\d+)])?(\|(?P[a-z0-9A-Z_-]+))?`), + plcProxyAddressPattern: regexp.MustCompile(`[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}(\|(?P[a-z0-9A-Z_-]+))?`), } } @@ -119,8 +119,15 @@ func (m TagHandler) ParseTag(tagAddress string) (model.PlcTag, error) { if (transferSizeCode != 0) && (dataType.ShortName() != transferSizeCode) { return nil, errors.Errorf("Transfer size code '%d' doesn't match specified data type '%s'", transferSizeCode, dataType) } + stringEncoding := match["stringEncoding"] + if stringEncoding == "" { + stringEncoding = "UTF-8" + if dataType == readWriteModel.TransportSize_WSTRING || dataType == readWriteModel.TransportSize_WCHAR { + stringEncoding = "UTF-16" + } + } - return NewStringTag(memoryArea, 0, byteOffset, bitOffset, numElements, stringLength, dataType), nil + return NewStringTag(memoryArea, 0, byteOffset, bitOffset, numElements, stringLength, dataType, stringEncoding), nil } else if match := utils.GetSubgroupMatches(m.dataBlockStringShortPattern, tagAddress); match != nil { dataType, ok := readWriteModel.TransportSizeByName(match[DATA_TYPE]) if !ok { @@ -157,8 +164,14 @@ func (m TagHandler) ParseTag(tagAddress string) (model.PlcTag, error) { } numElements = uint16(parsedNumElements) } - - return NewStringTag(memoryArea, blockNumber, byteOffset, bitOffset, numElements, stringLength, dataType), nil + stringEncoding := match["stringEncoding"] + if stringEncoding == "" { + stringEncoding = "UTF-8" + if dataType == readWriteModel.TransportSize_WSTRING || dataType == readWriteModel.TransportSize_WCHAR { + stringEncoding = "UTF-16" + } + } + return NewStringTag(memoryArea, blockNumber, byteOffset, bitOffset, numElements, stringLength, dataType, stringEncoding), nil } else if match := utils.GetSubgroupMatches(m.dataBlockAddressPattern, tagAddress); match != nil { dataType, ok := readWriteModel.TransportSizeByName(match[DATA_TYPE]) if !ok { @@ -204,8 +217,14 @@ func (m TagHandler) ParseTag(tagAddress string) (model.PlcTag, error) { if (transferSizeCode != 0) && (dataType.ShortName() != transferSizeCode) { return nil, errors.Errorf("Transfer size code '%d' doesn't match specified data type '%s'", transferSizeCode, dataType) } - - return NewTag(memoryArea, blockNumber, byteOffset, bitOffset, numElements, dataType), nil + stringEncoding := match["stringEncoding"] + if stringEncoding == "" { + stringEncoding = "UTF-8" + if dataType == readWriteModel.TransportSize_WSTRING || dataType == readWriteModel.TransportSize_WCHAR { + stringEncoding = "UTF-16" + } + } + return NewTag(memoryArea, blockNumber, byteOffset, bitOffset, numElements, dataType, stringEncoding), nil } else if match := utils.GetSubgroupMatches(m.dataBlockShortPattern, tagAddress); match != nil { dataType, ok := readWriteModel.TransportSizeByName(match[DATA_TYPE]) if !ok { @@ -246,8 +265,14 @@ func (m TagHandler) ParseTag(tagAddress string) (model.PlcTag, error) { } numElements = uint16(parsedNumElements) } - - return NewTag(memoryArea, blockNumber, byteOffset, bitOffset, numElements, dataType), nil + stringEncoding := match["stringEncoding"] + if stringEncoding == "" { + stringEncoding = "UTF-8" + if dataType == readWriteModel.TransportSize_WSTRING || dataType == readWriteModel.TransportSize_WCHAR { + stringEncoding = "UTF-16" + } + } + return NewTag(memoryArea, blockNumber, byteOffset, bitOffset, numElements, dataType, stringEncoding), nil } else if match := utils.GetSubgroupMatches(m.plcProxyAddressPattern, tagAddress); match != nil { addressData, err := hex.DecodeString(strings.ReplaceAll(tagAddress, "[-]", "")) if err != nil { @@ -261,7 +286,13 @@ func (m TagHandler) ParseTag(tagAddress string) (model.PlcTag, error) { if (s7AddressAny.GetTransportSize() != readWriteModel.TransportSize_BOOL) && s7AddressAny.GetBitAddress() != 0 { return nil, errors.New("A bit offset other than 0 is only supported for type BOOL") } - + stringEncoding := match["stringEncoding"] + if stringEncoding == "" { + stringEncoding = "UTF-8" + if s7AddressAny.GetTransportSize() == readWriteModel.TransportSize_WSTRING || s7AddressAny.GetTransportSize() == readWriteModel.TransportSize_WCHAR { + stringEncoding = "UTF-16" + } + } return NewTag( s7AddressAny.GetArea(), s7AddressAny.GetDbNumber(), @@ -269,6 +300,7 @@ func (m TagHandler) ParseTag(tagAddress string) (model.PlcTag, error) { s7AddressAny.GetBitAddress(), s7AddressAny.GetNumberOfElements(), s7AddressAny.GetTransportSize(), + stringEncoding, ), nil } else if match := utils.GetSubgroupMatches(m.addressPattern, tagAddress); match != nil { dataType, ok := readWriteModel.TransportSizeByName(match[DATA_TYPE]) @@ -313,8 +345,14 @@ func (m TagHandler) ParseTag(tagAddress string) (model.PlcTag, error) { if (dataType != readWriteModel.TransportSize_BOOL) && bitOffset != 0 { return nil, errors.New("A bit offset other than 0 is only supported for type BOOL") } - - return NewTag(memoryArea, 0, byteOffset, bitOffset, numElements, dataType), nil + stringEncoding := match["stringEncoding"] + if stringEncoding == "" { + stringEncoding = "UTF-8" + if dataType == readWriteModel.TransportSize_WSTRING || dataType == readWriteModel.TransportSize_WCHAR { + stringEncoding = "UTF-16" + } + } + return NewTag(memoryArea, 0, byteOffset, bitOffset, numElements, dataType, stringEncoding), nil } return nil, errors.Errorf("Unable to parse %s", tagAddress) } diff --git a/plc4go/internal/s7/Writer.go b/plc4go/internal/s7/Writer.go index cd33c379e7e..85bef3fa253 100644 --- a/plc4go/internal/s7/Writer.go +++ b/plc4go/internal/s7/Writer.go @@ -231,7 +231,7 @@ func serializePlcValue(tag model.PlcTag, plcValue values.PlcValue) (readWriteMod if s7StringTag, ok := tag.(*PlcStringTag); ok { stringLength = s7StringTag.stringLength } - data, err := readWriteModel.DataItemSerialize(plcValue, s7Tag.GetDataType().DataProtocolId(), int32(stringLength)) + data, err := readWriteModel.DataItemSerialize(plcValue, s7Tag.GetDataType().DataProtocolId(), int32(stringLength), s7Tag.GetStringEncoding()) if err != nil { return nil, errors.Wrapf(err, "Error serializing tag item of type: '%v'", s7Tag.GetDataType()) } diff --git a/plc4go/internal/s7/tagtype_string.go b/plc4go/internal/s7/tagtype_string.go index 3910a9fa2d6..dfca7a69420 100644 --- a/plc4go/internal/s7/tagtype_string.go +++ b/plc4go/internal/s7/tagtype_string.go @@ -1,20 +1,3 @@ -// Licensed to Apache Software Foundation (ASF) under one or more contributor -// license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright -// ownership. Apache Software Foundation (ASF) licenses this file to you under -// the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - // Code generated by "stringer -type TagType"; DO NOT EDIT. package s7 diff --git a/plc4go/internal/simulated/Reader_test.go b/plc4go/internal/simulated/Reader_test.go index 41e9bace88b..59007c53891 100644 --- a/plc4go/internal/simulated/Reader_test.go +++ b/plc4go/internal/simulated/Reader_test.go @@ -145,7 +145,7 @@ func TestReader_Read(t *testing.T) { }, args: args{ fields: map[string]model.PlcTag{ - "test": s7.NewTag(model4.MemoryArea_DATA_BLOCKS, 1, 1, 0, 1, model4.TransportSize_BOOL), + "test": s7.NewTag(model4.MemoryArea_DATA_BLOCKS, 1, 1, 0, 1, model4.TransportSize_BOOL, "UTF-8"), }, fieldNames: []string{"test"}, }, diff --git a/plc4go/internal/simulated/Writer_test.go b/plc4go/internal/simulated/Writer_test.go index 9f0b10e97bf..64af673d4f5 100644 --- a/plc4go/internal/simulated/Writer_test.go +++ b/plc4go/internal/simulated/Writer_test.go @@ -154,7 +154,7 @@ func TestWriter_Write(t *testing.T) { }, args: args{ fields: map[string]model.PlcTag{ - "test": s7.NewTag(model4.MemoryArea_DATA_BLOCKS, 1, 1, 0, 1, model4.TransportSize_BOOL), + "test": s7.NewTag(model4.MemoryArea_DATA_BLOCKS, 1, 1, 0, 1, model4.TransportSize_BOOL, "UTF-8"), }, values: map[string]values.PlcValue{ "test": values2.NewPlcBOOL(false), diff --git a/plc4go/protocols/abeth/readwrite/XmlParserHelper.go b/plc4go/protocols/abeth/readwrite/XmlParserHelper.go index 1d32498b055..89c39c5cc38 100644 --- a/plc4go/protocols/abeth/readwrite/XmlParserHelper.go +++ b/plc4go/protocols/abeth/readwrite/XmlParserHelper.go @@ -21,8 +21,8 @@ package readwrite import ( "context" - "strconv" "strings" + "strconv" "github.com/apache/plc4x/plc4go/protocols/abeth/readwrite/model" "github.com/apache/plc4x/plc4go/spi/utils" @@ -43,20 +43,20 @@ func init() { } func (m AbethXmlParserHelper) Parse(typeName string, xmlString string, parserArguments ...string) (interface{}, error) { - switch typeName { - case "DF1RequestCommand": - return model.DF1RequestCommandParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "DF1RequestMessage": - return model.DF1RequestMessageParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "DF1ResponseMessage": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 16) - if err != nil { - return nil, err - } - payloadLength := uint16(parsedUint0) - return model.DF1ResponseMessageParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), payloadLength) - case "CIPEncapsulationPacket": - return model.CIPEncapsulationPacketParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - } - return nil, errors.Errorf("Unsupported type %s", typeName) + switch typeName { + case "DF1RequestCommand": + return model.DF1RequestCommandParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "DF1RequestMessage": + return model.DF1RequestMessageParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "DF1ResponseMessage": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 16) + if err!=nil { + return nil, err + } + payloadLength := uint16(parsedUint0) + return model.DF1ResponseMessageParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), payloadLength ) + case "CIPEncapsulationPacket": + return model.CIPEncapsulationPacketParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + } + return nil, errors.Errorf("Unsupported type %s", typeName) } diff --git a/plc4go/protocols/abeth/readwrite/model/CIPEncapsulationConnectionRequest.go b/plc4go/protocols/abeth/readwrite/model/CIPEncapsulationConnectionRequest.go index 2e61b2bc661..89f09bc5aae 100644 --- a/plc4go/protocols/abeth/readwrite/model/CIPEncapsulationConnectionRequest.go +++ b/plc4go/protocols/abeth/readwrite/model/CIPEncapsulationConnectionRequest.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CIPEncapsulationConnectionRequest is the corresponding interface of CIPEncapsulationConnectionRequest type CIPEncapsulationConnectionRequest interface { @@ -47,35 +49,36 @@ type _CIPEncapsulationConnectionRequest struct { *_CIPEncapsulationPacket } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_CIPEncapsulationConnectionRequest) GetCommandType() uint16 { - return 0x0101 -} +func (m *_CIPEncapsulationConnectionRequest) GetCommandType() uint16 { +return 0x0101} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_CIPEncapsulationConnectionRequest) InitializeParent(parent CIPEncapsulationPacket, sessionHandle uint32, status uint32, senderContext []uint8, options uint32) { - m.SessionHandle = sessionHandle +func (m *_CIPEncapsulationConnectionRequest) InitializeParent(parent CIPEncapsulationPacket , sessionHandle uint32 , status uint32 , senderContext []uint8 , options uint32 ) { m.SessionHandle = sessionHandle m.Status = status m.SenderContext = senderContext m.Options = options } -func (m *_CIPEncapsulationConnectionRequest) GetParent() CIPEncapsulationPacket { +func (m *_CIPEncapsulationConnectionRequest) GetParent() CIPEncapsulationPacket { return m._CIPEncapsulationPacket } + // NewCIPEncapsulationConnectionRequest factory function for _CIPEncapsulationConnectionRequest -func NewCIPEncapsulationConnectionRequest(sessionHandle uint32, status uint32, senderContext []uint8, options uint32) *_CIPEncapsulationConnectionRequest { +func NewCIPEncapsulationConnectionRequest( sessionHandle uint32 , status uint32 , senderContext []uint8 , options uint32 ) *_CIPEncapsulationConnectionRequest { _result := &_CIPEncapsulationConnectionRequest{ - _CIPEncapsulationPacket: NewCIPEncapsulationPacket(sessionHandle, status, senderContext, options), + _CIPEncapsulationPacket: NewCIPEncapsulationPacket(sessionHandle, status, senderContext, options), } _result._CIPEncapsulationPacket._CIPEncapsulationPacketChildRequirements = _result return _result @@ -83,7 +86,7 @@ func NewCIPEncapsulationConnectionRequest(sessionHandle uint32, status uint32, s // Deprecated: use the interface for direct cast func CastCIPEncapsulationConnectionRequest(structType interface{}) CIPEncapsulationConnectionRequest { - if casted, ok := structType.(CIPEncapsulationConnectionRequest); ok { + if casted, ok := structType.(CIPEncapsulationConnectionRequest); ok { return casted } if casted, ok := structType.(*CIPEncapsulationConnectionRequest); ok { @@ -102,6 +105,7 @@ func (m *_CIPEncapsulationConnectionRequest) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_CIPEncapsulationConnectionRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +129,8 @@ func CIPEncapsulationConnectionRequestParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_CIPEncapsulationConnectionRequest{ - _CIPEncapsulationPacket: &_CIPEncapsulationPacket{}, + _CIPEncapsulationPacket: &_CIPEncapsulationPacket{ + }, } _child._CIPEncapsulationPacket._CIPEncapsulationPacketChildRequirements = _child return _child, nil @@ -155,6 +160,7 @@ func (m *_CIPEncapsulationConnectionRequest) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_CIPEncapsulationConnectionRequest) isCIPEncapsulationConnectionRequest() bool { return true } @@ -169,3 +175,6 @@ func (m *_CIPEncapsulationConnectionRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/abeth/readwrite/model/CIPEncapsulationConnectionResponse.go b/plc4go/protocols/abeth/readwrite/model/CIPEncapsulationConnectionResponse.go index 05c73aa9e57..1fac3ab28b7 100644 --- a/plc4go/protocols/abeth/readwrite/model/CIPEncapsulationConnectionResponse.go +++ b/plc4go/protocols/abeth/readwrite/model/CIPEncapsulationConnectionResponse.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CIPEncapsulationConnectionResponse is the corresponding interface of CIPEncapsulationConnectionResponse type CIPEncapsulationConnectionResponse interface { @@ -47,35 +49,36 @@ type _CIPEncapsulationConnectionResponse struct { *_CIPEncapsulationPacket } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_CIPEncapsulationConnectionResponse) GetCommandType() uint16 { - return 0x0201 -} +func (m *_CIPEncapsulationConnectionResponse) GetCommandType() uint16 { +return 0x0201} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_CIPEncapsulationConnectionResponse) InitializeParent(parent CIPEncapsulationPacket, sessionHandle uint32, status uint32, senderContext []uint8, options uint32) { - m.SessionHandle = sessionHandle +func (m *_CIPEncapsulationConnectionResponse) InitializeParent(parent CIPEncapsulationPacket , sessionHandle uint32 , status uint32 , senderContext []uint8 , options uint32 ) { m.SessionHandle = sessionHandle m.Status = status m.SenderContext = senderContext m.Options = options } -func (m *_CIPEncapsulationConnectionResponse) GetParent() CIPEncapsulationPacket { +func (m *_CIPEncapsulationConnectionResponse) GetParent() CIPEncapsulationPacket { return m._CIPEncapsulationPacket } + // NewCIPEncapsulationConnectionResponse factory function for _CIPEncapsulationConnectionResponse -func NewCIPEncapsulationConnectionResponse(sessionHandle uint32, status uint32, senderContext []uint8, options uint32) *_CIPEncapsulationConnectionResponse { +func NewCIPEncapsulationConnectionResponse( sessionHandle uint32 , status uint32 , senderContext []uint8 , options uint32 ) *_CIPEncapsulationConnectionResponse { _result := &_CIPEncapsulationConnectionResponse{ - _CIPEncapsulationPacket: NewCIPEncapsulationPacket(sessionHandle, status, senderContext, options), + _CIPEncapsulationPacket: NewCIPEncapsulationPacket(sessionHandle, status, senderContext, options), } _result._CIPEncapsulationPacket._CIPEncapsulationPacketChildRequirements = _result return _result @@ -83,7 +86,7 @@ func NewCIPEncapsulationConnectionResponse(sessionHandle uint32, status uint32, // Deprecated: use the interface for direct cast func CastCIPEncapsulationConnectionResponse(structType interface{}) CIPEncapsulationConnectionResponse { - if casted, ok := structType.(CIPEncapsulationConnectionResponse); ok { + if casted, ok := structType.(CIPEncapsulationConnectionResponse); ok { return casted } if casted, ok := structType.(*CIPEncapsulationConnectionResponse); ok { @@ -102,6 +105,7 @@ func (m *_CIPEncapsulationConnectionResponse) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_CIPEncapsulationConnectionResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +129,8 @@ func CIPEncapsulationConnectionResponseParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_CIPEncapsulationConnectionResponse{ - _CIPEncapsulationPacket: &_CIPEncapsulationPacket{}, + _CIPEncapsulationPacket: &_CIPEncapsulationPacket{ + }, } _child._CIPEncapsulationPacket._CIPEncapsulationPacketChildRequirements = _child return _child, nil @@ -155,6 +160,7 @@ func (m *_CIPEncapsulationConnectionResponse) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_CIPEncapsulationConnectionResponse) isCIPEncapsulationConnectionResponse() bool { return true } @@ -169,3 +175,6 @@ func (m *_CIPEncapsulationConnectionResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/abeth/readwrite/model/CIPEncapsulationPacket.go b/plc4go/protocols/abeth/readwrite/model/CIPEncapsulationPacket.go index fae21298c76..cd18838abad 100644 --- a/plc4go/protocols/abeth/readwrite/model/CIPEncapsulationPacket.go +++ b/plc4go/protocols/abeth/readwrite/model/CIPEncapsulationPacket.go @@ -19,15 +19,17 @@ package model + import ( "context" "encoding/binary" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CIPEncapsulationPacket is the corresponding interface of CIPEncapsulationPacket type CIPEncapsulationPacket interface { @@ -55,10 +57,10 @@ type CIPEncapsulationPacketExactly interface { // _CIPEncapsulationPacket is the data-structure of this message type _CIPEncapsulationPacket struct { _CIPEncapsulationPacketChildRequirements - SessionHandle uint32 - Status uint32 - SenderContext []uint8 - Options uint32 + SessionHandle uint32 + Status uint32 + SenderContext []uint8 + Options uint32 // Reserved Fields reservedField0 *uint32 } @@ -69,6 +71,7 @@ type _CIPEncapsulationPacketChildRequirements interface { GetCommandType() uint16 } + type CIPEncapsulationPacketParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child CIPEncapsulationPacket, serializeChildFunction func() error) error GetTypeName() string @@ -76,13 +79,12 @@ type CIPEncapsulationPacketParent interface { type CIPEncapsulationPacketChild interface { utils.Serializable - InitializeParent(parent CIPEncapsulationPacket, sessionHandle uint32, status uint32, senderContext []uint8, options uint32) +InitializeParent(parent CIPEncapsulationPacket , sessionHandle uint32 , status uint32 , senderContext []uint8 , options uint32 ) GetParent() *CIPEncapsulationPacket GetTypeName() string CIPEncapsulationPacket } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -109,14 +111,15 @@ func (m *_CIPEncapsulationPacket) GetOptions() uint32 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCIPEncapsulationPacket factory function for _CIPEncapsulationPacket -func NewCIPEncapsulationPacket(sessionHandle uint32, status uint32, senderContext []uint8, options uint32) *_CIPEncapsulationPacket { - return &_CIPEncapsulationPacket{SessionHandle: sessionHandle, Status: status, SenderContext: senderContext, Options: options} +func NewCIPEncapsulationPacket( sessionHandle uint32 , status uint32 , senderContext []uint8 , options uint32 ) *_CIPEncapsulationPacket { +return &_CIPEncapsulationPacket{ SessionHandle: sessionHandle , Status: status , SenderContext: senderContext , Options: options } } // Deprecated: use the interface for direct cast func CastCIPEncapsulationPacket(structType interface{}) CIPEncapsulationPacket { - if casted, ok := structType.(CIPEncapsulationPacket); ok { + if casted, ok := structType.(CIPEncapsulationPacket); ok { return casted } if casted, ok := structType.(*CIPEncapsulationPacket); ok { @@ -129,27 +132,28 @@ func (m *_CIPEncapsulationPacket) GetTypeName() string { return "CIPEncapsulationPacket" } + func (m *_CIPEncapsulationPacket) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Discriminator Field (commandType) - lengthInBits += 16 + lengthInBits += 16; // Implicit Field (packetLen) lengthInBits += 16 // Simple field (sessionHandle) - lengthInBits += 32 + lengthInBits += 32; // Simple field (status) - lengthInBits += 32 + lengthInBits += 32; // Array field if len(m.SenderContext) > 0 { lengthInBits += 8 * uint16(len(m.SenderContext)) - } + } // Simple field (options) - lengthInBits += 32 + lengthInBits += 32; // Reserved Field (reserved) lengthInBits += 32 @@ -188,14 +192,14 @@ func CIPEncapsulationPacketParseWithBuffer(ctx context.Context, readBuffer utils } // Simple Field (sessionHandle) - _sessionHandle, _sessionHandleErr := readBuffer.ReadUint32("sessionHandle", 32) +_sessionHandle, _sessionHandleErr := readBuffer.ReadUint32("sessionHandle", 32) if _sessionHandleErr != nil { return nil, errors.Wrap(_sessionHandleErr, "Error parsing 'sessionHandle' field of CIPEncapsulationPacket") } sessionHandle := _sessionHandle // Simple Field (status) - _status, _statusErr := readBuffer.ReadUint32("status", 32) +_status, _statusErr := readBuffer.ReadUint32("status", 32) if _statusErr != nil { return nil, errors.Wrap(_statusErr, "Error parsing 'status' field of CIPEncapsulationPacket") } @@ -217,7 +221,7 @@ func CIPEncapsulationPacketParseWithBuffer(ctx context.Context, readBuffer utils arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := readBuffer.ReadUint8("", 8) +_item, _err := readBuffer.ReadUint8("", 8) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'senderContext' field of CIPEncapsulationPacket") } @@ -229,7 +233,7 @@ func CIPEncapsulationPacketParseWithBuffer(ctx context.Context, readBuffer utils } // Simple Field (options) - _options, _optionsErr := readBuffer.ReadUint32("options", 32) +_options, _optionsErr := readBuffer.ReadUint32("options", 32) if _optionsErr != nil { return nil, errors.Wrap(_optionsErr, "Error parsing 'options' field of CIPEncapsulationPacket") } @@ -245,7 +249,7 @@ func CIPEncapsulationPacketParseWithBuffer(ctx context.Context, readBuffer utils if reserved != uint32(0x00000000) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint32(0x00000000), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -255,20 +259,20 @@ func CIPEncapsulationPacketParseWithBuffer(ctx context.Context, readBuffer utils // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type CIPEncapsulationPacketChildSerializeRequirement interface { CIPEncapsulationPacket - InitializeParent(CIPEncapsulationPacket, uint32, uint32, []uint8, uint32) + InitializeParent(CIPEncapsulationPacket, uint32, uint32, []uint8, uint32) GetParent() CIPEncapsulationPacket } var _childTemp interface{} var _child CIPEncapsulationPacketChildSerializeRequirement var typeSwitchError error switch { - case commandType == 0x0101: // CIPEncapsulationConnectionRequest - _childTemp, typeSwitchError = CIPEncapsulationConnectionRequestParseWithBuffer(ctx, readBuffer) - case commandType == 0x0201: // CIPEncapsulationConnectionResponse - _childTemp, typeSwitchError = CIPEncapsulationConnectionResponseParseWithBuffer(ctx, readBuffer) - case commandType == 0x0107: // CIPEncapsulationReadRequest - _childTemp, typeSwitchError = CIPEncapsulationReadRequestParseWithBuffer(ctx, readBuffer) - case commandType == 0x0207: // CIPEncapsulationReadResponse +case commandType == 0x0101 : // CIPEncapsulationConnectionRequest + _childTemp, typeSwitchError = CIPEncapsulationConnectionRequestParseWithBuffer(ctx, readBuffer, ) +case commandType == 0x0201 : // CIPEncapsulationConnectionResponse + _childTemp, typeSwitchError = CIPEncapsulationConnectionResponseParseWithBuffer(ctx, readBuffer, ) +case commandType == 0x0107 : // CIPEncapsulationReadRequest + _childTemp, typeSwitchError = CIPEncapsulationReadRequestParseWithBuffer(ctx, readBuffer, ) +case commandType == 0x0207 : // CIPEncapsulationReadResponse _childTemp, typeSwitchError = CIPEncapsulationReadResponseParseWithBuffer(ctx, readBuffer, packetLen) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [commandType=%v]", commandType) @@ -283,7 +287,7 @@ func CIPEncapsulationPacketParseWithBuffer(ctx context.Context, readBuffer utils } // Finish initializing - _child.InitializeParent(_child, sessionHandle, status, senderContext, options) +_child.InitializeParent(_child , sessionHandle , status , senderContext , options ) _child.GetParent().(*_CIPEncapsulationPacket).reservedField0 = reservedField0 return _child, nil } @@ -294,7 +298,7 @@ func (pm *_CIPEncapsulationPacket) SerializeParent(ctx context.Context, writeBuf _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("CIPEncapsulationPacket"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("CIPEncapsulationPacket"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for CIPEncapsulationPacket") } @@ -355,7 +359,7 @@ func (pm *_CIPEncapsulationPacket) SerializeParent(ctx context.Context, writeBuf if pm.reservedField0 != nil { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint32(0x00000000), - "got value": reserved, + "got value": reserved, }).Msg("Overriding reserved field with unexpected value.") reserved = *pm.reservedField0 } @@ -376,6 +380,7 @@ func (pm *_CIPEncapsulationPacket) SerializeParent(ctx context.Context, writeBuf return nil } + func (m *_CIPEncapsulationPacket) isCIPEncapsulationPacket() bool { return true } @@ -390,3 +395,6 @@ func (m *_CIPEncapsulationPacket) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/abeth/readwrite/model/CIPEncapsulationReadRequest.go b/plc4go/protocols/abeth/readwrite/model/CIPEncapsulationReadRequest.go index 78f7c7dd6ee..a37eb844ff3 100644 --- a/plc4go/protocols/abeth/readwrite/model/CIPEncapsulationReadRequest.go +++ b/plc4go/protocols/abeth/readwrite/model/CIPEncapsulationReadRequest.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CIPEncapsulationReadRequest is the corresponding interface of CIPEncapsulationReadRequest type CIPEncapsulationReadRequest interface { @@ -47,34 +49,33 @@ type CIPEncapsulationReadRequestExactly interface { // _CIPEncapsulationReadRequest is the data-structure of this message type _CIPEncapsulationReadRequest struct { *_CIPEncapsulationPacket - Request DF1RequestMessage + Request DF1RequestMessage } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_CIPEncapsulationReadRequest) GetCommandType() uint16 { - return 0x0107 -} +func (m *_CIPEncapsulationReadRequest) GetCommandType() uint16 { +return 0x0107} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_CIPEncapsulationReadRequest) InitializeParent(parent CIPEncapsulationPacket, sessionHandle uint32, status uint32, senderContext []uint8, options uint32) { - m.SessionHandle = sessionHandle +func (m *_CIPEncapsulationReadRequest) InitializeParent(parent CIPEncapsulationPacket , sessionHandle uint32 , status uint32 , senderContext []uint8 , options uint32 ) { m.SessionHandle = sessionHandle m.Status = status m.SenderContext = senderContext m.Options = options } -func (m *_CIPEncapsulationReadRequest) GetParent() CIPEncapsulationPacket { +func (m *_CIPEncapsulationReadRequest) GetParent() CIPEncapsulationPacket { return m._CIPEncapsulationPacket } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -89,11 +90,12 @@ func (m *_CIPEncapsulationReadRequest) GetRequest() DF1RequestMessage { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCIPEncapsulationReadRequest factory function for _CIPEncapsulationReadRequest -func NewCIPEncapsulationReadRequest(request DF1RequestMessage, sessionHandle uint32, status uint32, senderContext []uint8, options uint32) *_CIPEncapsulationReadRequest { +func NewCIPEncapsulationReadRequest( request DF1RequestMessage , sessionHandle uint32 , status uint32 , senderContext []uint8 , options uint32 ) *_CIPEncapsulationReadRequest { _result := &_CIPEncapsulationReadRequest{ - Request: request, - _CIPEncapsulationPacket: NewCIPEncapsulationPacket(sessionHandle, status, senderContext, options), + Request: request, + _CIPEncapsulationPacket: NewCIPEncapsulationPacket(sessionHandle, status, senderContext, options), } _result._CIPEncapsulationPacket._CIPEncapsulationPacketChildRequirements = _result return _result @@ -101,7 +103,7 @@ func NewCIPEncapsulationReadRequest(request DF1RequestMessage, sessionHandle uin // Deprecated: use the interface for direct cast func CastCIPEncapsulationReadRequest(structType interface{}) CIPEncapsulationReadRequest { - if casted, ok := structType.(CIPEncapsulationReadRequest); ok { + if casted, ok := structType.(CIPEncapsulationReadRequest); ok { return casted } if casted, ok := structType.(*CIPEncapsulationReadRequest); ok { @@ -123,6 +125,7 @@ func (m *_CIPEncapsulationReadRequest) GetLengthInBits(ctx context.Context) uint return lengthInBits } + func (m *_CIPEncapsulationReadRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -144,7 +147,7 @@ func CIPEncapsulationReadRequestParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("request"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for request") } - _request, _requestErr := DF1RequestMessageParseWithBuffer(ctx, readBuffer) +_request, _requestErr := DF1RequestMessageParseWithBuffer(ctx, readBuffer) if _requestErr != nil { return nil, errors.Wrap(_requestErr, "Error parsing 'request' field of CIPEncapsulationReadRequest") } @@ -159,8 +162,9 @@ func CIPEncapsulationReadRequestParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_CIPEncapsulationReadRequest{ - _CIPEncapsulationPacket: &_CIPEncapsulationPacket{}, - Request: request, + _CIPEncapsulationPacket: &_CIPEncapsulationPacket{ + }, + Request: request, } _child._CIPEncapsulationPacket._CIPEncapsulationPacketChildRequirements = _child return _child, nil @@ -182,17 +186,17 @@ func (m *_CIPEncapsulationReadRequest) SerializeWithWriteBuffer(ctx context.Cont return errors.Wrap(pushErr, "Error pushing for CIPEncapsulationReadRequest") } - // Simple Field (request) - if pushErr := writeBuffer.PushContext("request"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for request") - } - _requestErr := writeBuffer.WriteSerializable(ctx, m.GetRequest()) - if popErr := writeBuffer.PopContext("request"); popErr != nil { - return errors.Wrap(popErr, "Error popping for request") - } - if _requestErr != nil { - return errors.Wrap(_requestErr, "Error serializing 'request' field") - } + // Simple Field (request) + if pushErr := writeBuffer.PushContext("request"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for request") + } + _requestErr := writeBuffer.WriteSerializable(ctx, m.GetRequest()) + if popErr := writeBuffer.PopContext("request"); popErr != nil { + return errors.Wrap(popErr, "Error popping for request") + } + if _requestErr != nil { + return errors.Wrap(_requestErr, "Error serializing 'request' field") + } if popErr := writeBuffer.PopContext("CIPEncapsulationReadRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for CIPEncapsulationReadRequest") @@ -202,6 +206,7 @@ func (m *_CIPEncapsulationReadRequest) SerializeWithWriteBuffer(ctx context.Cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_CIPEncapsulationReadRequest) isCIPEncapsulationReadRequest() bool { return true } @@ -216,3 +221,6 @@ func (m *_CIPEncapsulationReadRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/abeth/readwrite/model/CIPEncapsulationReadResponse.go b/plc4go/protocols/abeth/readwrite/model/CIPEncapsulationReadResponse.go index 6a5a2169645..049df0473c5 100644 --- a/plc4go/protocols/abeth/readwrite/model/CIPEncapsulationReadResponse.go +++ b/plc4go/protocols/abeth/readwrite/model/CIPEncapsulationReadResponse.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CIPEncapsulationReadResponse is the corresponding interface of CIPEncapsulationReadResponse type CIPEncapsulationReadResponse interface { @@ -47,37 +49,36 @@ type CIPEncapsulationReadResponseExactly interface { // _CIPEncapsulationReadResponse is the data-structure of this message type _CIPEncapsulationReadResponse struct { *_CIPEncapsulationPacket - Response DF1ResponseMessage + Response DF1ResponseMessage // Arguments. PacketLen uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_CIPEncapsulationReadResponse) GetCommandType() uint16 { - return 0x0207 -} +func (m *_CIPEncapsulationReadResponse) GetCommandType() uint16 { +return 0x0207} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_CIPEncapsulationReadResponse) InitializeParent(parent CIPEncapsulationPacket, sessionHandle uint32, status uint32, senderContext []uint8, options uint32) { - m.SessionHandle = sessionHandle +func (m *_CIPEncapsulationReadResponse) InitializeParent(parent CIPEncapsulationPacket , sessionHandle uint32 , status uint32 , senderContext []uint8 , options uint32 ) { m.SessionHandle = sessionHandle m.Status = status m.SenderContext = senderContext m.Options = options } -func (m *_CIPEncapsulationReadResponse) GetParent() CIPEncapsulationPacket { +func (m *_CIPEncapsulationReadResponse) GetParent() CIPEncapsulationPacket { return m._CIPEncapsulationPacket } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +93,12 @@ func (m *_CIPEncapsulationReadResponse) GetResponse() DF1ResponseMessage { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCIPEncapsulationReadResponse factory function for _CIPEncapsulationReadResponse -func NewCIPEncapsulationReadResponse(response DF1ResponseMessage, sessionHandle uint32, status uint32, senderContext []uint8, options uint32, packetLen uint16) *_CIPEncapsulationReadResponse { +func NewCIPEncapsulationReadResponse( response DF1ResponseMessage , sessionHandle uint32 , status uint32 , senderContext []uint8 , options uint32 , packetLen uint16 ) *_CIPEncapsulationReadResponse { _result := &_CIPEncapsulationReadResponse{ - Response: response, - _CIPEncapsulationPacket: NewCIPEncapsulationPacket(sessionHandle, status, senderContext, options), + Response: response, + _CIPEncapsulationPacket: NewCIPEncapsulationPacket(sessionHandle, status, senderContext, options), } _result._CIPEncapsulationPacket._CIPEncapsulationPacketChildRequirements = _result return _result @@ -104,7 +106,7 @@ func NewCIPEncapsulationReadResponse(response DF1ResponseMessage, sessionHandle // Deprecated: use the interface for direct cast func CastCIPEncapsulationReadResponse(structType interface{}) CIPEncapsulationReadResponse { - if casted, ok := structType.(CIPEncapsulationReadResponse); ok { + if casted, ok := structType.(CIPEncapsulationReadResponse); ok { return casted } if casted, ok := structType.(*CIPEncapsulationReadResponse); ok { @@ -126,6 +128,7 @@ func (m *_CIPEncapsulationReadResponse) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_CIPEncapsulationReadResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -147,7 +150,7 @@ func CIPEncapsulationReadResponseParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("response"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for response") } - _response, _responseErr := DF1ResponseMessageParseWithBuffer(ctx, readBuffer, uint16(packetLen)) +_response, _responseErr := DF1ResponseMessageParseWithBuffer(ctx, readBuffer , uint16( packetLen ) ) if _responseErr != nil { return nil, errors.Wrap(_responseErr, "Error parsing 'response' field of CIPEncapsulationReadResponse") } @@ -162,8 +165,9 @@ func CIPEncapsulationReadResponseParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_CIPEncapsulationReadResponse{ - _CIPEncapsulationPacket: &_CIPEncapsulationPacket{}, - Response: response, + _CIPEncapsulationPacket: &_CIPEncapsulationPacket{ + }, + Response: response, } _child._CIPEncapsulationPacket._CIPEncapsulationPacketChildRequirements = _child return _child, nil @@ -185,17 +189,17 @@ func (m *_CIPEncapsulationReadResponse) SerializeWithWriteBuffer(ctx context.Con return errors.Wrap(pushErr, "Error pushing for CIPEncapsulationReadResponse") } - // Simple Field (response) - if pushErr := writeBuffer.PushContext("response"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for response") - } - _responseErr := writeBuffer.WriteSerializable(ctx, m.GetResponse()) - if popErr := writeBuffer.PopContext("response"); popErr != nil { - return errors.Wrap(popErr, "Error popping for response") - } - if _responseErr != nil { - return errors.Wrap(_responseErr, "Error serializing 'response' field") - } + // Simple Field (response) + if pushErr := writeBuffer.PushContext("response"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for response") + } + _responseErr := writeBuffer.WriteSerializable(ctx, m.GetResponse()) + if popErr := writeBuffer.PopContext("response"); popErr != nil { + return errors.Wrap(popErr, "Error popping for response") + } + if _responseErr != nil { + return errors.Wrap(_responseErr, "Error serializing 'response' field") + } if popErr := writeBuffer.PopContext("CIPEncapsulationReadResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for CIPEncapsulationReadResponse") @@ -205,13 +209,13 @@ func (m *_CIPEncapsulationReadResponse) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + //// // Arguments Getter func (m *_CIPEncapsulationReadResponse) GetPacketLen() uint16 { return m.PacketLen } - // //// @@ -229,3 +233,6 @@ func (m *_CIPEncapsulationReadResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/abeth/readwrite/model/DF1CommandRequestMessage.go b/plc4go/protocols/abeth/readwrite/model/DF1CommandRequestMessage.go index f64b6c42d86..6373e4440ef 100644 --- a/plc4go/protocols/abeth/readwrite/model/DF1CommandRequestMessage.go +++ b/plc4go/protocols/abeth/readwrite/model/DF1CommandRequestMessage.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // DF1CommandRequestMessage is the corresponding interface of DF1CommandRequestMessage type DF1CommandRequestMessage interface { @@ -46,34 +48,33 @@ type DF1CommandRequestMessageExactly interface { // _DF1CommandRequestMessage is the data-structure of this message type _DF1CommandRequestMessage struct { *_DF1RequestMessage - Command DF1RequestCommand + Command DF1RequestCommand } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_DF1CommandRequestMessage) GetCommandCode() uint8 { - return 0x0F -} +func (m *_DF1CommandRequestMessage) GetCommandCode() uint8 { +return 0x0F} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_DF1CommandRequestMessage) InitializeParent(parent DF1RequestMessage, destinationAddress uint8, sourceAddress uint8, status uint8, transactionCounter uint16) { - m.DestinationAddress = destinationAddress +func (m *_DF1CommandRequestMessage) InitializeParent(parent DF1RequestMessage , destinationAddress uint8 , sourceAddress uint8 , status uint8 , transactionCounter uint16 ) { m.DestinationAddress = destinationAddress m.SourceAddress = sourceAddress m.Status = status m.TransactionCounter = transactionCounter } -func (m *_DF1CommandRequestMessage) GetParent() DF1RequestMessage { +func (m *_DF1CommandRequestMessage) GetParent() DF1RequestMessage { return m._DF1RequestMessage } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -88,11 +89,12 @@ func (m *_DF1CommandRequestMessage) GetCommand() DF1RequestCommand { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewDF1CommandRequestMessage factory function for _DF1CommandRequestMessage -func NewDF1CommandRequestMessage(command DF1RequestCommand, destinationAddress uint8, sourceAddress uint8, status uint8, transactionCounter uint16) *_DF1CommandRequestMessage { +func NewDF1CommandRequestMessage( command DF1RequestCommand , destinationAddress uint8 , sourceAddress uint8 , status uint8 , transactionCounter uint16 ) *_DF1CommandRequestMessage { _result := &_DF1CommandRequestMessage{ - Command: command, - _DF1RequestMessage: NewDF1RequestMessage(destinationAddress, sourceAddress, status, transactionCounter), + Command: command, + _DF1RequestMessage: NewDF1RequestMessage(destinationAddress, sourceAddress, status, transactionCounter), } _result._DF1RequestMessage._DF1RequestMessageChildRequirements = _result return _result @@ -100,7 +102,7 @@ func NewDF1CommandRequestMessage(command DF1RequestCommand, destinationAddress u // Deprecated: use the interface for direct cast func CastDF1CommandRequestMessage(structType interface{}) DF1CommandRequestMessage { - if casted, ok := structType.(DF1CommandRequestMessage); ok { + if casted, ok := structType.(DF1CommandRequestMessage); ok { return casted } if casted, ok := structType.(*DF1CommandRequestMessage); ok { @@ -122,6 +124,7 @@ func (m *_DF1CommandRequestMessage) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_DF1CommandRequestMessage) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -143,7 +146,7 @@ func DF1CommandRequestMessageParseWithBuffer(ctx context.Context, readBuffer uti if pullErr := readBuffer.PullContext("command"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for command") } - _command, _commandErr := DF1RequestCommandParseWithBuffer(ctx, readBuffer) +_command, _commandErr := DF1RequestCommandParseWithBuffer(ctx, readBuffer) if _commandErr != nil { return nil, errors.Wrap(_commandErr, "Error parsing 'command' field of DF1CommandRequestMessage") } @@ -158,8 +161,9 @@ func DF1CommandRequestMessageParseWithBuffer(ctx context.Context, readBuffer uti // Create a partially initialized instance _child := &_DF1CommandRequestMessage{ - _DF1RequestMessage: &_DF1RequestMessage{}, - Command: command, + _DF1RequestMessage: &_DF1RequestMessage{ + }, + Command: command, } _child._DF1RequestMessage._DF1RequestMessageChildRequirements = _child return _child, nil @@ -181,17 +185,17 @@ func (m *_DF1CommandRequestMessage) SerializeWithWriteBuffer(ctx context.Context return errors.Wrap(pushErr, "Error pushing for DF1CommandRequestMessage") } - // Simple Field (command) - if pushErr := writeBuffer.PushContext("command"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for command") - } - _commandErr := writeBuffer.WriteSerializable(ctx, m.GetCommand()) - if popErr := writeBuffer.PopContext("command"); popErr != nil { - return errors.Wrap(popErr, "Error popping for command") - } - if _commandErr != nil { - return errors.Wrap(_commandErr, "Error serializing 'command' field") - } + // Simple Field (command) + if pushErr := writeBuffer.PushContext("command"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for command") + } + _commandErr := writeBuffer.WriteSerializable(ctx, m.GetCommand()) + if popErr := writeBuffer.PopContext("command"); popErr != nil { + return errors.Wrap(popErr, "Error popping for command") + } + if _commandErr != nil { + return errors.Wrap(_commandErr, "Error serializing 'command' field") + } if popErr := writeBuffer.PopContext("DF1CommandRequestMessage"); popErr != nil { return errors.Wrap(popErr, "Error popping for DF1CommandRequestMessage") @@ -201,6 +205,7 @@ func (m *_DF1CommandRequestMessage) SerializeWithWriteBuffer(ctx context.Context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_DF1CommandRequestMessage) isDF1CommandRequestMessage() bool { return true } @@ -215,3 +220,6 @@ func (m *_DF1CommandRequestMessage) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/abeth/readwrite/model/DF1CommandResponseMessageProtectedTypedLogicalRead.go b/plc4go/protocols/abeth/readwrite/model/DF1CommandResponseMessageProtectedTypedLogicalRead.go index ddac0320f37..1dce30b0347 100644 --- a/plc4go/protocols/abeth/readwrite/model/DF1CommandResponseMessageProtectedTypedLogicalRead.go +++ b/plc4go/protocols/abeth/readwrite/model/DF1CommandResponseMessageProtectedTypedLogicalRead.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // DF1CommandResponseMessageProtectedTypedLogicalRead is the corresponding interface of DF1CommandResponseMessageProtectedTypedLogicalRead type DF1CommandResponseMessageProtectedTypedLogicalRead interface { @@ -46,34 +48,33 @@ type DF1CommandResponseMessageProtectedTypedLogicalReadExactly interface { // _DF1CommandResponseMessageProtectedTypedLogicalRead is the data-structure of this message type _DF1CommandResponseMessageProtectedTypedLogicalRead struct { *_DF1ResponseMessage - Data []uint8 + Data []uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_DF1CommandResponseMessageProtectedTypedLogicalRead) GetCommandCode() uint8 { - return 0x4F -} +func (m *_DF1CommandResponseMessageProtectedTypedLogicalRead) GetCommandCode() uint8 { +return 0x4F} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_DF1CommandResponseMessageProtectedTypedLogicalRead) InitializeParent(parent DF1ResponseMessage, destinationAddress uint8, sourceAddress uint8, status uint8, transactionCounter uint16) { - m.DestinationAddress = destinationAddress +func (m *_DF1CommandResponseMessageProtectedTypedLogicalRead) InitializeParent(parent DF1ResponseMessage , destinationAddress uint8 , sourceAddress uint8 , status uint8 , transactionCounter uint16 ) { m.DestinationAddress = destinationAddress m.SourceAddress = sourceAddress m.Status = status m.TransactionCounter = transactionCounter } -func (m *_DF1CommandResponseMessageProtectedTypedLogicalRead) GetParent() DF1ResponseMessage { +func (m *_DF1CommandResponseMessageProtectedTypedLogicalRead) GetParent() DF1ResponseMessage { return m._DF1ResponseMessage } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -88,11 +89,12 @@ func (m *_DF1CommandResponseMessageProtectedTypedLogicalRead) GetData() []uint8 /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewDF1CommandResponseMessageProtectedTypedLogicalRead factory function for _DF1CommandResponseMessageProtectedTypedLogicalRead -func NewDF1CommandResponseMessageProtectedTypedLogicalRead(data []uint8, destinationAddress uint8, sourceAddress uint8, status uint8, transactionCounter uint16, payloadLength uint16) *_DF1CommandResponseMessageProtectedTypedLogicalRead { +func NewDF1CommandResponseMessageProtectedTypedLogicalRead( data []uint8 , destinationAddress uint8 , sourceAddress uint8 , status uint8 , transactionCounter uint16 , payloadLength uint16 ) *_DF1CommandResponseMessageProtectedTypedLogicalRead { _result := &_DF1CommandResponseMessageProtectedTypedLogicalRead{ - Data: data, - _DF1ResponseMessage: NewDF1ResponseMessage(destinationAddress, sourceAddress, status, transactionCounter, payloadLength), + Data: data, + _DF1ResponseMessage: NewDF1ResponseMessage(destinationAddress, sourceAddress, status, transactionCounter, payloadLength), } _result._DF1ResponseMessage._DF1ResponseMessageChildRequirements = _result return _result @@ -100,7 +102,7 @@ func NewDF1CommandResponseMessageProtectedTypedLogicalRead(data []uint8, destina // Deprecated: use the interface for direct cast func CastDF1CommandResponseMessageProtectedTypedLogicalRead(structType interface{}) DF1CommandResponseMessageProtectedTypedLogicalRead { - if casted, ok := structType.(DF1CommandResponseMessageProtectedTypedLogicalRead); ok { + if casted, ok := structType.(DF1CommandResponseMessageProtectedTypedLogicalRead); ok { return casted } if casted, ok := structType.(*DF1CommandResponseMessageProtectedTypedLogicalRead); ok { @@ -124,6 +126,7 @@ func (m *_DF1CommandResponseMessageProtectedTypedLogicalRead) GetLengthInBits(ct return lengthInBits } + func (m *_DF1CommandResponseMessageProtectedTypedLogicalRead) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -150,8 +153,8 @@ func DF1CommandResponseMessageProtectedTypedLogicalReadParseWithBuffer(ctx conte { _dataLength := uint16(payloadLength) - uint16(uint16(8)) _dataEndPos := positionAware.GetPos() + uint16(_dataLength) - for positionAware.GetPos() < _dataEndPos { - _item, _err := readBuffer.ReadUint8("", 8) + for ;positionAware.GetPos() < _dataEndPos; { +_item, _err := readBuffer.ReadUint8("", 8) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'data' field of DF1CommandResponseMessageProtectedTypedLogicalRead") } @@ -193,20 +196,20 @@ func (m *_DF1CommandResponseMessageProtectedTypedLogicalRead) SerializeWithWrite return errors.Wrap(pushErr, "Error pushing for DF1CommandResponseMessageProtectedTypedLogicalRead") } - // Array Field (data) - if pushErr := writeBuffer.PushContext("data", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for data") - } - for _curItem, _element := range m.GetData() { - _ = _curItem - _elementErr := writeBuffer.WriteUint8("", 8, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'data' field") - } - } - if popErr := writeBuffer.PopContext("data", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for data") + // Array Field (data) + if pushErr := writeBuffer.PushContext("data", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for data") + } + for _curItem, _element := range m.GetData() { + _ = _curItem + _elementErr := writeBuffer.WriteUint8("", 8, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'data' field") } + } + if popErr := writeBuffer.PopContext("data", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for data") + } if popErr := writeBuffer.PopContext("DF1CommandResponseMessageProtectedTypedLogicalRead"); popErr != nil { return errors.Wrap(popErr, "Error popping for DF1CommandResponseMessageProtectedTypedLogicalRead") @@ -216,6 +219,7 @@ func (m *_DF1CommandResponseMessageProtectedTypedLogicalRead) SerializeWithWrite return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_DF1CommandResponseMessageProtectedTypedLogicalRead) isDF1CommandResponseMessageProtectedTypedLogicalRead() bool { return true } @@ -230,3 +234,6 @@ func (m *_DF1CommandResponseMessageProtectedTypedLogicalRead) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/abeth/readwrite/model/DF1RequestCommand.go b/plc4go/protocols/abeth/readwrite/model/DF1RequestCommand.go index 68254bddd77..b67528fa227 100644 --- a/plc4go/protocols/abeth/readwrite/model/DF1RequestCommand.go +++ b/plc4go/protocols/abeth/readwrite/model/DF1RequestCommand.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // DF1RequestCommand is the corresponding interface of DF1RequestCommand type DF1RequestCommand interface { @@ -53,6 +55,7 @@ type _DF1RequestCommandChildRequirements interface { GetFunctionCode() uint8 } + type DF1RequestCommandParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child DF1RequestCommand, serializeChildFunction func() error) error GetTypeName() string @@ -60,21 +63,22 @@ type DF1RequestCommandParent interface { type DF1RequestCommandChild interface { utils.Serializable - InitializeParent(parent DF1RequestCommand) +InitializeParent(parent DF1RequestCommand ) GetParent() *DF1RequestCommand GetTypeName() string DF1RequestCommand } + // NewDF1RequestCommand factory function for _DF1RequestCommand -func NewDF1RequestCommand() *_DF1RequestCommand { - return &_DF1RequestCommand{} +func NewDF1RequestCommand( ) *_DF1RequestCommand { +return &_DF1RequestCommand{ } } // Deprecated: use the interface for direct cast func CastDF1RequestCommand(structType interface{}) DF1RequestCommand { - if casted, ok := structType.(DF1RequestCommand); ok { + if casted, ok := structType.(DF1RequestCommand); ok { return casted } if casted, ok := structType.(*DF1RequestCommand); ok { @@ -87,10 +91,11 @@ func (m *_DF1RequestCommand) GetTypeName() string { return "DF1RequestCommand" } + func (m *_DF1RequestCommand) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Discriminator Field (functionCode) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } @@ -121,15 +126,15 @@ func DF1RequestCommandParseWithBuffer(ctx context.Context, readBuffer utils.Read // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type DF1RequestCommandChildSerializeRequirement interface { DF1RequestCommand - InitializeParent(DF1RequestCommand) + InitializeParent(DF1RequestCommand ) GetParent() DF1RequestCommand } var _childTemp interface{} var _child DF1RequestCommandChildSerializeRequirement var typeSwitchError error switch { - case functionCode == 0xA2: // DF1RequestProtectedTypedLogicalRead - _childTemp, typeSwitchError = DF1RequestProtectedTypedLogicalReadParseWithBuffer(ctx, readBuffer) +case functionCode == 0xA2 : // DF1RequestProtectedTypedLogicalRead + _childTemp, typeSwitchError = DF1RequestProtectedTypedLogicalReadParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [functionCode=%v]", functionCode) } @@ -143,7 +148,7 @@ func DF1RequestCommandParseWithBuffer(ctx context.Context, readBuffer utils.Read } // Finish initializing - _child.InitializeParent(_child) +_child.InitializeParent(_child ) return _child, nil } @@ -153,7 +158,7 @@ func (pm *_DF1RequestCommand) SerializeParent(ctx context.Context, writeBuffer u _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("DF1RequestCommand"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("DF1RequestCommand"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for DF1RequestCommand") } @@ -176,6 +181,7 @@ func (pm *_DF1RequestCommand) SerializeParent(ctx context.Context, writeBuffer u return nil } + func (m *_DF1RequestCommand) isDF1RequestCommand() bool { return true } @@ -190,3 +196,6 @@ func (m *_DF1RequestCommand) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/abeth/readwrite/model/DF1RequestMessage.go b/plc4go/protocols/abeth/readwrite/model/DF1RequestMessage.go index c80ad2bf47b..879f4e217f0 100644 --- a/plc4go/protocols/abeth/readwrite/model/DF1RequestMessage.go +++ b/plc4go/protocols/abeth/readwrite/model/DF1RequestMessage.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // DF1RequestMessage is the corresponding interface of DF1RequestMessage type DF1RequestMessage interface { @@ -53,10 +55,10 @@ type DF1RequestMessageExactly interface { // _DF1RequestMessage is the data-structure of this message type _DF1RequestMessage struct { _DF1RequestMessageChildRequirements - DestinationAddress uint8 - SourceAddress uint8 - Status uint8 - TransactionCounter uint16 + DestinationAddress uint8 + SourceAddress uint8 + Status uint8 + TransactionCounter uint16 // Reserved Fields reservedField0 *uint16 } @@ -67,6 +69,7 @@ type _DF1RequestMessageChildRequirements interface { GetCommandCode() uint8 } + type DF1RequestMessageParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child DF1RequestMessage, serializeChildFunction func() error) error GetTypeName() string @@ -74,13 +77,12 @@ type DF1RequestMessageParent interface { type DF1RequestMessageChild interface { utils.Serializable - InitializeParent(parent DF1RequestMessage, destinationAddress uint8, sourceAddress uint8, status uint8, transactionCounter uint16) +InitializeParent(parent DF1RequestMessage , destinationAddress uint8 , sourceAddress uint8 , status uint8 , transactionCounter uint16 ) GetParent() *DF1RequestMessage GetTypeName() string DF1RequestMessage } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -107,14 +109,15 @@ func (m *_DF1RequestMessage) GetTransactionCounter() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewDF1RequestMessage factory function for _DF1RequestMessage -func NewDF1RequestMessage(destinationAddress uint8, sourceAddress uint8, status uint8, transactionCounter uint16) *_DF1RequestMessage { - return &_DF1RequestMessage{DestinationAddress: destinationAddress, SourceAddress: sourceAddress, Status: status, TransactionCounter: transactionCounter} +func NewDF1RequestMessage( destinationAddress uint8 , sourceAddress uint8 , status uint8 , transactionCounter uint16 ) *_DF1RequestMessage { +return &_DF1RequestMessage{ DestinationAddress: destinationAddress , SourceAddress: sourceAddress , Status: status , TransactionCounter: transactionCounter } } // Deprecated: use the interface for direct cast func CastDF1RequestMessage(structType interface{}) DF1RequestMessage { - if casted, ok := structType.(DF1RequestMessage); ok { + if casted, ok := structType.(DF1RequestMessage); ok { return casted } if casted, ok := structType.(*DF1RequestMessage); ok { @@ -127,25 +130,26 @@ func (m *_DF1RequestMessage) GetTypeName() string { return "DF1RequestMessage" } + func (m *_DF1RequestMessage) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (destinationAddress) - lengthInBits += 8 + lengthInBits += 8; // Simple field (sourceAddress) - lengthInBits += 8 + lengthInBits += 8; // Reserved Field (reserved) lengthInBits += 16 // Discriminator Field (commandCode) - lengthInBits += 8 + lengthInBits += 8; // Simple field (status) - lengthInBits += 8 + lengthInBits += 8; // Simple field (transactionCounter) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } @@ -168,14 +172,14 @@ func DF1RequestMessageParseWithBuffer(ctx context.Context, readBuffer utils.Read _ = currentPos // Simple Field (destinationAddress) - _destinationAddress, _destinationAddressErr := readBuffer.ReadUint8("destinationAddress", 8) +_destinationAddress, _destinationAddressErr := readBuffer.ReadUint8("destinationAddress", 8) if _destinationAddressErr != nil { return nil, errors.Wrap(_destinationAddressErr, "Error parsing 'destinationAddress' field of DF1RequestMessage") } destinationAddress := _destinationAddress // Simple Field (sourceAddress) - _sourceAddress, _sourceAddressErr := readBuffer.ReadUint8("sourceAddress", 8) +_sourceAddress, _sourceAddressErr := readBuffer.ReadUint8("sourceAddress", 8) if _sourceAddressErr != nil { return nil, errors.Wrap(_sourceAddressErr, "Error parsing 'sourceAddress' field of DF1RequestMessage") } @@ -191,7 +195,7 @@ func DF1RequestMessageParseWithBuffer(ctx context.Context, readBuffer utils.Read if reserved != uint16(0x0000) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint16(0x0000), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -205,14 +209,14 @@ func DF1RequestMessageParseWithBuffer(ctx context.Context, readBuffer utils.Read } // Simple Field (status) - _status, _statusErr := readBuffer.ReadUint8("status", 8) +_status, _statusErr := readBuffer.ReadUint8("status", 8) if _statusErr != nil { return nil, errors.Wrap(_statusErr, "Error parsing 'status' field of DF1RequestMessage") } status := _status // Simple Field (transactionCounter) - _transactionCounter, _transactionCounterErr := readBuffer.ReadUint16("transactionCounter", 16) +_transactionCounter, _transactionCounterErr := readBuffer.ReadUint16("transactionCounter", 16) if _transactionCounterErr != nil { return nil, errors.Wrap(_transactionCounterErr, "Error parsing 'transactionCounter' field of DF1RequestMessage") } @@ -221,15 +225,15 @@ func DF1RequestMessageParseWithBuffer(ctx context.Context, readBuffer utils.Read // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type DF1RequestMessageChildSerializeRequirement interface { DF1RequestMessage - InitializeParent(DF1RequestMessage, uint8, uint8, uint8, uint16) + InitializeParent(DF1RequestMessage, uint8, uint8, uint8, uint16) GetParent() DF1RequestMessage } var _childTemp interface{} var _child DF1RequestMessageChildSerializeRequirement var typeSwitchError error switch { - case commandCode == 0x0F: // DF1CommandRequestMessage - _childTemp, typeSwitchError = DF1CommandRequestMessageParseWithBuffer(ctx, readBuffer) +case commandCode == 0x0F : // DF1CommandRequestMessage + _childTemp, typeSwitchError = DF1CommandRequestMessageParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [commandCode=%v]", commandCode) } @@ -243,7 +247,7 @@ func DF1RequestMessageParseWithBuffer(ctx context.Context, readBuffer utils.Read } // Finish initializing - _child.InitializeParent(_child, destinationAddress, sourceAddress, status, transactionCounter) +_child.InitializeParent(_child , destinationAddress , sourceAddress , status , transactionCounter ) _child.GetParent().(*_DF1RequestMessage).reservedField0 = reservedField0 return _child, nil } @@ -254,7 +258,7 @@ func (pm *_DF1RequestMessage) SerializeParent(ctx context.Context, writeBuffer u _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("DF1RequestMessage"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("DF1RequestMessage"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for DF1RequestMessage") } @@ -278,7 +282,7 @@ func (pm *_DF1RequestMessage) SerializeParent(ctx context.Context, writeBuffer u if pm.reservedField0 != nil { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint16(0x0000), - "got value": reserved, + "got value": reserved, }).Msg("Overriding reserved field with unexpected value.") reserved = *pm.reservedField0 } @@ -321,6 +325,7 @@ func (pm *_DF1RequestMessage) SerializeParent(ctx context.Context, writeBuffer u return nil } + func (m *_DF1RequestMessage) isDF1RequestMessage() bool { return true } @@ -335,3 +340,6 @@ func (m *_DF1RequestMessage) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/abeth/readwrite/model/DF1RequestProtectedTypedLogicalRead.go b/plc4go/protocols/abeth/readwrite/model/DF1RequestProtectedTypedLogicalRead.go index b2a2c7ba8cc..8157e53bbb0 100644 --- a/plc4go/protocols/abeth/readwrite/model/DF1RequestProtectedTypedLogicalRead.go +++ b/plc4go/protocols/abeth/readwrite/model/DF1RequestProtectedTypedLogicalRead.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // DF1RequestProtectedTypedLogicalRead is the corresponding interface of DF1RequestProtectedTypedLogicalRead type DF1RequestProtectedTypedLogicalRead interface { @@ -54,33 +56,33 @@ type DF1RequestProtectedTypedLogicalReadExactly interface { // _DF1RequestProtectedTypedLogicalRead is the data-structure of this message type _DF1RequestProtectedTypedLogicalRead struct { *_DF1RequestCommand - ByteSize uint8 - FileNumber uint8 - FileType uint8 - ElementNumber uint8 - SubElementNumber uint8 + ByteSize uint8 + FileNumber uint8 + FileType uint8 + ElementNumber uint8 + SubElementNumber uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_DF1RequestProtectedTypedLogicalRead) GetFunctionCode() uint8 { - return 0xA2 -} +func (m *_DF1RequestProtectedTypedLogicalRead) GetFunctionCode() uint8 { +return 0xA2} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_DF1RequestProtectedTypedLogicalRead) InitializeParent(parent DF1RequestCommand) {} +func (m *_DF1RequestProtectedTypedLogicalRead) InitializeParent(parent DF1RequestCommand ) {} -func (m *_DF1RequestProtectedTypedLogicalRead) GetParent() DF1RequestCommand { +func (m *_DF1RequestProtectedTypedLogicalRead) GetParent() DF1RequestCommand { return m._DF1RequestCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -111,15 +113,16 @@ func (m *_DF1RequestProtectedTypedLogicalRead) GetSubElementNumber() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewDF1RequestProtectedTypedLogicalRead factory function for _DF1RequestProtectedTypedLogicalRead -func NewDF1RequestProtectedTypedLogicalRead(byteSize uint8, fileNumber uint8, fileType uint8, elementNumber uint8, subElementNumber uint8) *_DF1RequestProtectedTypedLogicalRead { +func NewDF1RequestProtectedTypedLogicalRead( byteSize uint8 , fileNumber uint8 , fileType uint8 , elementNumber uint8 , subElementNumber uint8 ) *_DF1RequestProtectedTypedLogicalRead { _result := &_DF1RequestProtectedTypedLogicalRead{ - ByteSize: byteSize, - FileNumber: fileNumber, - FileType: fileType, - ElementNumber: elementNumber, - SubElementNumber: subElementNumber, - _DF1RequestCommand: NewDF1RequestCommand(), + ByteSize: byteSize, + FileNumber: fileNumber, + FileType: fileType, + ElementNumber: elementNumber, + SubElementNumber: subElementNumber, + _DF1RequestCommand: NewDF1RequestCommand(), } _result._DF1RequestCommand._DF1RequestCommandChildRequirements = _result return _result @@ -127,7 +130,7 @@ func NewDF1RequestProtectedTypedLogicalRead(byteSize uint8, fileNumber uint8, fi // Deprecated: use the interface for direct cast func CastDF1RequestProtectedTypedLogicalRead(structType interface{}) DF1RequestProtectedTypedLogicalRead { - if casted, ok := structType.(DF1RequestProtectedTypedLogicalRead); ok { + if casted, ok := structType.(DF1RequestProtectedTypedLogicalRead); ok { return casted } if casted, ok := structType.(*DF1RequestProtectedTypedLogicalRead); ok { @@ -144,23 +147,24 @@ func (m *_DF1RequestProtectedTypedLogicalRead) GetLengthInBits(ctx context.Conte lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (byteSize) - lengthInBits += 8 + lengthInBits += 8; // Simple field (fileNumber) - lengthInBits += 8 + lengthInBits += 8; // Simple field (fileType) - lengthInBits += 8 + lengthInBits += 8; // Simple field (elementNumber) - lengthInBits += 8 + lengthInBits += 8; // Simple field (subElementNumber) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_DF1RequestProtectedTypedLogicalRead) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -179,35 +183,35 @@ func DF1RequestProtectedTypedLogicalReadParseWithBuffer(ctx context.Context, rea _ = currentPos // Simple Field (byteSize) - _byteSize, _byteSizeErr := readBuffer.ReadUint8("byteSize", 8) +_byteSize, _byteSizeErr := readBuffer.ReadUint8("byteSize", 8) if _byteSizeErr != nil { return nil, errors.Wrap(_byteSizeErr, "Error parsing 'byteSize' field of DF1RequestProtectedTypedLogicalRead") } byteSize := _byteSize // Simple Field (fileNumber) - _fileNumber, _fileNumberErr := readBuffer.ReadUint8("fileNumber", 8) +_fileNumber, _fileNumberErr := readBuffer.ReadUint8("fileNumber", 8) if _fileNumberErr != nil { return nil, errors.Wrap(_fileNumberErr, "Error parsing 'fileNumber' field of DF1RequestProtectedTypedLogicalRead") } fileNumber := _fileNumber // Simple Field (fileType) - _fileType, _fileTypeErr := readBuffer.ReadUint8("fileType", 8) +_fileType, _fileTypeErr := readBuffer.ReadUint8("fileType", 8) if _fileTypeErr != nil { return nil, errors.Wrap(_fileTypeErr, "Error parsing 'fileType' field of DF1RequestProtectedTypedLogicalRead") } fileType := _fileType // Simple Field (elementNumber) - _elementNumber, _elementNumberErr := readBuffer.ReadUint8("elementNumber", 8) +_elementNumber, _elementNumberErr := readBuffer.ReadUint8("elementNumber", 8) if _elementNumberErr != nil { return nil, errors.Wrap(_elementNumberErr, "Error parsing 'elementNumber' field of DF1RequestProtectedTypedLogicalRead") } elementNumber := _elementNumber // Simple Field (subElementNumber) - _subElementNumber, _subElementNumberErr := readBuffer.ReadUint8("subElementNumber", 8) +_subElementNumber, _subElementNumberErr := readBuffer.ReadUint8("subElementNumber", 8) if _subElementNumberErr != nil { return nil, errors.Wrap(_subElementNumberErr, "Error parsing 'subElementNumber' field of DF1RequestProtectedTypedLogicalRead") } @@ -219,12 +223,13 @@ func DF1RequestProtectedTypedLogicalReadParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_DF1RequestProtectedTypedLogicalRead{ - _DF1RequestCommand: &_DF1RequestCommand{}, - ByteSize: byteSize, - FileNumber: fileNumber, - FileType: fileType, - ElementNumber: elementNumber, - SubElementNumber: subElementNumber, + _DF1RequestCommand: &_DF1RequestCommand{ + }, + ByteSize: byteSize, + FileNumber: fileNumber, + FileType: fileType, + ElementNumber: elementNumber, + SubElementNumber: subElementNumber, } _child._DF1RequestCommand._DF1RequestCommandChildRequirements = _child return _child, nil @@ -246,40 +251,40 @@ func (m *_DF1RequestProtectedTypedLogicalRead) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for DF1RequestProtectedTypedLogicalRead") } - // Simple Field (byteSize) - byteSize := uint8(m.GetByteSize()) - _byteSizeErr := writeBuffer.WriteUint8("byteSize", 8, (byteSize)) - if _byteSizeErr != nil { - return errors.Wrap(_byteSizeErr, "Error serializing 'byteSize' field") - } + // Simple Field (byteSize) + byteSize := uint8(m.GetByteSize()) + _byteSizeErr := writeBuffer.WriteUint8("byteSize", 8, (byteSize)) + if _byteSizeErr != nil { + return errors.Wrap(_byteSizeErr, "Error serializing 'byteSize' field") + } - // Simple Field (fileNumber) - fileNumber := uint8(m.GetFileNumber()) - _fileNumberErr := writeBuffer.WriteUint8("fileNumber", 8, (fileNumber)) - if _fileNumberErr != nil { - return errors.Wrap(_fileNumberErr, "Error serializing 'fileNumber' field") - } + // Simple Field (fileNumber) + fileNumber := uint8(m.GetFileNumber()) + _fileNumberErr := writeBuffer.WriteUint8("fileNumber", 8, (fileNumber)) + if _fileNumberErr != nil { + return errors.Wrap(_fileNumberErr, "Error serializing 'fileNumber' field") + } - // Simple Field (fileType) - fileType := uint8(m.GetFileType()) - _fileTypeErr := writeBuffer.WriteUint8("fileType", 8, (fileType)) - if _fileTypeErr != nil { - return errors.Wrap(_fileTypeErr, "Error serializing 'fileType' field") - } + // Simple Field (fileType) + fileType := uint8(m.GetFileType()) + _fileTypeErr := writeBuffer.WriteUint8("fileType", 8, (fileType)) + if _fileTypeErr != nil { + return errors.Wrap(_fileTypeErr, "Error serializing 'fileType' field") + } - // Simple Field (elementNumber) - elementNumber := uint8(m.GetElementNumber()) - _elementNumberErr := writeBuffer.WriteUint8("elementNumber", 8, (elementNumber)) - if _elementNumberErr != nil { - return errors.Wrap(_elementNumberErr, "Error serializing 'elementNumber' field") - } + // Simple Field (elementNumber) + elementNumber := uint8(m.GetElementNumber()) + _elementNumberErr := writeBuffer.WriteUint8("elementNumber", 8, (elementNumber)) + if _elementNumberErr != nil { + return errors.Wrap(_elementNumberErr, "Error serializing 'elementNumber' field") + } - // Simple Field (subElementNumber) - subElementNumber := uint8(m.GetSubElementNumber()) - _subElementNumberErr := writeBuffer.WriteUint8("subElementNumber", 8, (subElementNumber)) - if _subElementNumberErr != nil { - return errors.Wrap(_subElementNumberErr, "Error serializing 'subElementNumber' field") - } + // Simple Field (subElementNumber) + subElementNumber := uint8(m.GetSubElementNumber()) + _subElementNumberErr := writeBuffer.WriteUint8("subElementNumber", 8, (subElementNumber)) + if _subElementNumberErr != nil { + return errors.Wrap(_subElementNumberErr, "Error serializing 'subElementNumber' field") + } if popErr := writeBuffer.PopContext("DF1RequestProtectedTypedLogicalRead"); popErr != nil { return errors.Wrap(popErr, "Error popping for DF1RequestProtectedTypedLogicalRead") @@ -289,6 +294,7 @@ func (m *_DF1RequestProtectedTypedLogicalRead) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_DF1RequestProtectedTypedLogicalRead) isDF1RequestProtectedTypedLogicalRead() bool { return true } @@ -303,3 +309,6 @@ func (m *_DF1RequestProtectedTypedLogicalRead) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/abeth/readwrite/model/DF1ResponseMessage.go b/plc4go/protocols/abeth/readwrite/model/DF1ResponseMessage.go index c87ac8ceab3..c496f58b1aa 100644 --- a/plc4go/protocols/abeth/readwrite/model/DF1ResponseMessage.go +++ b/plc4go/protocols/abeth/readwrite/model/DF1ResponseMessage.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // DF1ResponseMessage is the corresponding interface of DF1ResponseMessage type DF1ResponseMessage interface { @@ -53,10 +55,10 @@ type DF1ResponseMessageExactly interface { // _DF1ResponseMessage is the data-structure of this message type _DF1ResponseMessage struct { _DF1ResponseMessageChildRequirements - DestinationAddress uint8 - SourceAddress uint8 - Status uint8 - TransactionCounter uint16 + DestinationAddress uint8 + SourceAddress uint8 + Status uint8 + TransactionCounter uint16 // Arguments. PayloadLength uint16 @@ -71,6 +73,7 @@ type _DF1ResponseMessageChildRequirements interface { GetCommandCode() uint8 } + type DF1ResponseMessageParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child DF1ResponseMessage, serializeChildFunction func() error) error GetTypeName() string @@ -78,13 +81,12 @@ type DF1ResponseMessageParent interface { type DF1ResponseMessageChild interface { utils.Serializable - InitializeParent(parent DF1ResponseMessage, destinationAddress uint8, sourceAddress uint8, status uint8, transactionCounter uint16) +InitializeParent(parent DF1ResponseMessage , destinationAddress uint8 , sourceAddress uint8 , status uint8 , transactionCounter uint16 ) GetParent() *DF1ResponseMessage GetTypeName() string DF1ResponseMessage } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -111,14 +113,15 @@ func (m *_DF1ResponseMessage) GetTransactionCounter() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewDF1ResponseMessage factory function for _DF1ResponseMessage -func NewDF1ResponseMessage(destinationAddress uint8, sourceAddress uint8, status uint8, transactionCounter uint16, payloadLength uint16) *_DF1ResponseMessage { - return &_DF1ResponseMessage{DestinationAddress: destinationAddress, SourceAddress: sourceAddress, Status: status, TransactionCounter: transactionCounter, PayloadLength: payloadLength} +func NewDF1ResponseMessage( destinationAddress uint8 , sourceAddress uint8 , status uint8 , transactionCounter uint16 , payloadLength uint16 ) *_DF1ResponseMessage { +return &_DF1ResponseMessage{ DestinationAddress: destinationAddress , SourceAddress: sourceAddress , Status: status , TransactionCounter: transactionCounter , PayloadLength: payloadLength } } // Deprecated: use the interface for direct cast func CastDF1ResponseMessage(structType interface{}) DF1ResponseMessage { - if casted, ok := structType.(DF1ResponseMessage); ok { + if casted, ok := structType.(DF1ResponseMessage); ok { return casted } if casted, ok := structType.(*DF1ResponseMessage); ok { @@ -131,6 +134,7 @@ func (m *_DF1ResponseMessage) GetTypeName() string { return "DF1ResponseMessage" } + func (m *_DF1ResponseMessage) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -138,21 +142,21 @@ func (m *_DF1ResponseMessage) GetParentLengthInBits(ctx context.Context) uint16 lengthInBits += 8 // Simple field (destinationAddress) - lengthInBits += 8 + lengthInBits += 8; // Simple field (sourceAddress) - lengthInBits += 8 + lengthInBits += 8; // Reserved Field (reserved) lengthInBits += 8 // Discriminator Field (commandCode) - lengthInBits += 8 + lengthInBits += 8; // Simple field (status) - lengthInBits += 8 + lengthInBits += 8; // Simple field (transactionCounter) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } @@ -184,7 +188,7 @@ func DF1ResponseMessageParseWithBuffer(ctx context.Context, readBuffer utils.Rea if reserved != uint8(0x00) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -192,14 +196,14 @@ func DF1ResponseMessageParseWithBuffer(ctx context.Context, readBuffer utils.Rea } // Simple Field (destinationAddress) - _destinationAddress, _destinationAddressErr := readBuffer.ReadUint8("destinationAddress", 8) +_destinationAddress, _destinationAddressErr := readBuffer.ReadUint8("destinationAddress", 8) if _destinationAddressErr != nil { return nil, errors.Wrap(_destinationAddressErr, "Error parsing 'destinationAddress' field of DF1ResponseMessage") } destinationAddress := _destinationAddress // Simple Field (sourceAddress) - _sourceAddress, _sourceAddressErr := readBuffer.ReadUint8("sourceAddress", 8) +_sourceAddress, _sourceAddressErr := readBuffer.ReadUint8("sourceAddress", 8) if _sourceAddressErr != nil { return nil, errors.Wrap(_sourceAddressErr, "Error parsing 'sourceAddress' field of DF1ResponseMessage") } @@ -215,7 +219,7 @@ func DF1ResponseMessageParseWithBuffer(ctx context.Context, readBuffer utils.Rea if reserved != uint8(0x00) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField1 = &reserved @@ -229,14 +233,14 @@ func DF1ResponseMessageParseWithBuffer(ctx context.Context, readBuffer utils.Rea } // Simple Field (status) - _status, _statusErr := readBuffer.ReadUint8("status", 8) +_status, _statusErr := readBuffer.ReadUint8("status", 8) if _statusErr != nil { return nil, errors.Wrap(_statusErr, "Error parsing 'status' field of DF1ResponseMessage") } status := _status // Simple Field (transactionCounter) - _transactionCounter, _transactionCounterErr := readBuffer.ReadUint16("transactionCounter", 16) +_transactionCounter, _transactionCounterErr := readBuffer.ReadUint16("transactionCounter", 16) if _transactionCounterErr != nil { return nil, errors.Wrap(_transactionCounterErr, "Error parsing 'transactionCounter' field of DF1ResponseMessage") } @@ -245,14 +249,14 @@ func DF1ResponseMessageParseWithBuffer(ctx context.Context, readBuffer utils.Rea // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type DF1ResponseMessageChildSerializeRequirement interface { DF1ResponseMessage - InitializeParent(DF1ResponseMessage, uint8, uint8, uint8, uint16) + InitializeParent(DF1ResponseMessage, uint8, uint8, uint8, uint16) GetParent() DF1ResponseMessage } var _childTemp interface{} var _child DF1ResponseMessageChildSerializeRequirement var typeSwitchError error switch { - case commandCode == 0x4F: // DF1CommandResponseMessageProtectedTypedLogicalRead +case commandCode == 0x4F : // DF1CommandResponseMessageProtectedTypedLogicalRead _childTemp, typeSwitchError = DF1CommandResponseMessageProtectedTypedLogicalReadParseWithBuffer(ctx, readBuffer, payloadLength) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [commandCode=%v]", commandCode) @@ -267,7 +271,7 @@ func DF1ResponseMessageParseWithBuffer(ctx context.Context, readBuffer utils.Rea } // Finish initializing - _child.InitializeParent(_child, destinationAddress, sourceAddress, status, transactionCounter) +_child.InitializeParent(_child , destinationAddress , sourceAddress , status , transactionCounter ) _child.GetParent().(*_DF1ResponseMessage).reservedField0 = reservedField0 _child.GetParent().(*_DF1ResponseMessage).reservedField1 = reservedField1 return _child, nil @@ -279,7 +283,7 @@ func (pm *_DF1ResponseMessage) SerializeParent(ctx context.Context, writeBuffer _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("DF1ResponseMessage"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("DF1ResponseMessage"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for DF1ResponseMessage") } @@ -289,7 +293,7 @@ func (pm *_DF1ResponseMessage) SerializeParent(ctx context.Context, writeBuffer if pm.reservedField0 != nil { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Overriding reserved field with unexpected value.") reserved = *pm.reservedField0 } @@ -319,7 +323,7 @@ func (pm *_DF1ResponseMessage) SerializeParent(ctx context.Context, writeBuffer if pm.reservedField1 != nil { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Overriding reserved field with unexpected value.") reserved = *pm.reservedField1 } @@ -362,13 +366,13 @@ func (pm *_DF1ResponseMessage) SerializeParent(ctx context.Context, writeBuffer return nil } + //// // Arguments Getter func (m *_DF1ResponseMessage) GetPayloadLength() uint16 { return m.PayloadLength } - // //// @@ -386,3 +390,6 @@ func (m *_DF1ResponseMessage) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/abeth/readwrite/model/plc4x_common.go b/plc4go/protocols/abeth/readwrite/model/plc4x_common.go index d2d66e8bdd3..42166d94e68 100644 --- a/plc4go/protocols/abeth/readwrite/model/plc4x_common.go +++ b/plc4go/protocols/abeth/readwrite/model/plc4x_common.go @@ -15,7 +15,7 @@ * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - */ +*/ package model @@ -25,3 +25,4 @@ import "github.com/rs/zerolog/log" // Plc4xModelLog is the Logger used by the Parse/Serialize methods var Plc4xModelLog = &log.Logger + diff --git a/plc4go/protocols/ads/discovery/readwrite/XmlParserHelper.go b/plc4go/protocols/ads/discovery/readwrite/XmlParserHelper.go index dbc2cbb1c15..b1a30bcbe94 100644 --- a/plc4go/protocols/ads/discovery/readwrite/XmlParserHelper.go +++ b/plc4go/protocols/ads/discovery/readwrite/XmlParserHelper.go @@ -21,8 +21,8 @@ package readwrite import ( "context" - "strconv" "strings" + "strconv" "github.com/apache/plc4x/plc4go/protocols/ads/discovery/readwrite/model" "github.com/apache/plc4x/plc4go/spi/utils" @@ -43,17 +43,17 @@ func init() { } func (m AdsDiscoveryXmlParserHelper) Parse(typeName string, xmlString string, parserArguments ...string) (interface{}, error) { - switch typeName { - case "AdsDiscovery": - return model.AdsDiscoveryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "AdsDiscoveryBlock": - return model.AdsDiscoveryBlockParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "AdsDiscoveryConstants": - return model.AdsDiscoveryConstantsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "AmsNetId": - return model.AmsNetIdParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "AmsString": - return model.AmsStringParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - } - return nil, errors.Errorf("Unsupported type %s", typeName) + switch typeName { + case "AdsDiscovery": + return model.AdsDiscoveryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "AdsDiscoveryBlock": + return model.AdsDiscoveryBlockParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "AdsDiscoveryConstants": + return model.AdsDiscoveryConstantsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "AmsNetId": + return model.AmsNetIdParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "AmsString": + return model.AmsStringParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + } + return nil, errors.Errorf("Unsupported type %s", typeName) } diff --git a/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscovery.go b/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscovery.go index 51acc0c4dfd..0cade7a3257 100644 --- a/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscovery.go +++ b/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscovery.go @@ -19,16 +19,18 @@ package model + import ( "context" "encoding/binary" "fmt" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const AdsDiscovery_HEADER uint32 = 0x71146603 @@ -58,13 +60,14 @@ type AdsDiscoveryExactly interface { // _AdsDiscovery is the data-structure of this message type _AdsDiscovery struct { - RequestId uint32 - Operation Operation - AmsNetId AmsNetId - PortNumber AdsPortNumbers - Blocks []AdsDiscoveryBlock + RequestId uint32 + Operation Operation + AmsNetId AmsNetId + PortNumber AdsPortNumbers + Blocks []AdsDiscoveryBlock } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,14 +111,15 @@ func (m *_AdsDiscovery) GetHeader() uint32 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAdsDiscovery factory function for _AdsDiscovery -func NewAdsDiscovery(requestId uint32, operation Operation, amsNetId AmsNetId, portNumber AdsPortNumbers, blocks []AdsDiscoveryBlock) *_AdsDiscovery { - return &_AdsDiscovery{RequestId: requestId, Operation: operation, AmsNetId: amsNetId, PortNumber: portNumber, Blocks: blocks} +func NewAdsDiscovery( requestId uint32 , operation Operation , amsNetId AmsNetId , portNumber AdsPortNumbers , blocks []AdsDiscoveryBlock ) *_AdsDiscovery { +return &_AdsDiscovery{ RequestId: requestId , Operation: operation , AmsNetId: amsNetId , PortNumber: portNumber , Blocks: blocks } } // Deprecated: use the interface for direct cast func CastAdsDiscovery(structType interface{}) AdsDiscovery { - if casted, ok := structType.(AdsDiscovery); ok { + if casted, ok := structType.(AdsDiscovery); ok { return casted } if casted, ok := structType.(*AdsDiscovery); ok { @@ -135,7 +139,7 @@ func (m *_AdsDiscovery) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += 32 // Simple field (requestId) - lengthInBits += 32 + lengthInBits += 32; // Simple field (operation) lengthInBits += 32 @@ -155,13 +159,14 @@ func (m *_AdsDiscovery) GetLengthInBits(ctx context.Context) uint16 { arrayCtx := spiContext.CreateArrayContext(ctx, len(m.Blocks), _curItem) _ = arrayCtx _ = _curItem - lengthInBits += element.(interface{ GetLengthInBits(context.Context) uint16 }).GetLengthInBits(arrayCtx) + lengthInBits += element.(interface{GetLengthInBits(context.Context) uint16}).GetLengthInBits(arrayCtx) } } return lengthInBits } + func (m *_AdsDiscovery) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -189,7 +194,7 @@ func AdsDiscoveryParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe } // Simple Field (requestId) - _requestId, _requestIdErr := readBuffer.ReadUint32("requestId", 32) +_requestId, _requestIdErr := readBuffer.ReadUint32("requestId", 32) if _requestIdErr != nil { return nil, errors.Wrap(_requestIdErr, "Error parsing 'requestId' field of AdsDiscovery") } @@ -199,7 +204,7 @@ func AdsDiscoveryParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe if pullErr := readBuffer.PullContext("operation"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for operation") } - _operation, _operationErr := OperationParseWithBuffer(ctx, readBuffer) +_operation, _operationErr := OperationParseWithBuffer(ctx, readBuffer) if _operationErr != nil { return nil, errors.Wrap(_operationErr, "Error parsing 'operation' field of AdsDiscovery") } @@ -212,7 +217,7 @@ func AdsDiscoveryParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe if pullErr := readBuffer.PullContext("amsNetId"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for amsNetId") } - _amsNetId, _amsNetIdErr := AmsNetIdParseWithBuffer(ctx, readBuffer) +_amsNetId, _amsNetIdErr := AmsNetIdParseWithBuffer(ctx, readBuffer) if _amsNetIdErr != nil { return nil, errors.Wrap(_amsNetIdErr, "Error parsing 'amsNetId' field of AdsDiscovery") } @@ -225,7 +230,7 @@ func AdsDiscoveryParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe if pullErr := readBuffer.PullContext("portNumber"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for portNumber") } - _portNumber, _portNumberErr := AdsPortNumbersParseWithBuffer(ctx, readBuffer) +_portNumber, _portNumberErr := AdsPortNumbersParseWithBuffer(ctx, readBuffer) if _portNumberErr != nil { return nil, errors.Wrap(_portNumberErr, "Error parsing 'portNumber' field of AdsDiscovery") } @@ -257,7 +262,7 @@ func AdsDiscoveryParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := AdsDiscoveryBlockParseWithBuffer(arrayCtx, readBuffer) +_item, _err := AdsDiscoveryBlockParseWithBuffer(arrayCtx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'blocks' field of AdsDiscovery") } @@ -274,12 +279,12 @@ func AdsDiscoveryParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe // Create the instance return &_AdsDiscovery{ - RequestId: requestId, - Operation: operation, - AmsNetId: amsNetId, - PortNumber: portNumber, - Blocks: blocks, - }, nil + RequestId: requestId, + Operation: operation, + AmsNetId: amsNetId, + PortNumber: portNumber, + Blocks: blocks, + }, nil } func (m *_AdsDiscovery) Serialize() ([]byte, error) { @@ -293,7 +298,7 @@ func (m *_AdsDiscovery) Serialize() ([]byte, error) { func (m *_AdsDiscovery) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("AdsDiscovery"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("AdsDiscovery"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for AdsDiscovery") } @@ -376,6 +381,7 @@ func (m *_AdsDiscovery) SerializeWithWriteBuffer(ctx context.Context, writeBuffe return nil } + func (m *_AdsDiscovery) isAdsDiscovery() bool { return true } @@ -390,3 +396,6 @@ func (m *_AdsDiscovery) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlock.go b/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlock.go index 887d8997a15..d40305bfd12 100644 --- a/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlock.go +++ b/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlock.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AdsDiscoveryBlock is the corresponding interface of AdsDiscoveryBlock type AdsDiscoveryBlock interface { @@ -53,6 +55,7 @@ type _AdsDiscoveryBlockChildRequirements interface { GetBlockType() AdsDiscoveryBlockType } + type AdsDiscoveryBlockParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child AdsDiscoveryBlock, serializeChildFunction func() error) error GetTypeName() string @@ -60,21 +63,22 @@ type AdsDiscoveryBlockParent interface { type AdsDiscoveryBlockChild interface { utils.Serializable - InitializeParent(parent AdsDiscoveryBlock) +InitializeParent(parent AdsDiscoveryBlock ) GetParent() *AdsDiscoveryBlock GetTypeName() string AdsDiscoveryBlock } + // NewAdsDiscoveryBlock factory function for _AdsDiscoveryBlock -func NewAdsDiscoveryBlock() *_AdsDiscoveryBlock { - return &_AdsDiscoveryBlock{} +func NewAdsDiscoveryBlock( ) *_AdsDiscoveryBlock { +return &_AdsDiscoveryBlock{ } } // Deprecated: use the interface for direct cast func CastAdsDiscoveryBlock(structType interface{}) AdsDiscoveryBlock { - if casted, ok := structType.(AdsDiscoveryBlock); ok { + if casted, ok := structType.(AdsDiscoveryBlock); ok { return casted } if casted, ok := structType.(*AdsDiscoveryBlock); ok { @@ -87,10 +91,11 @@ func (m *_AdsDiscoveryBlock) GetTypeName() string { return "AdsDiscoveryBlock" } + func (m *_AdsDiscoveryBlock) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Discriminator Field (blockType) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } @@ -128,31 +133,31 @@ func AdsDiscoveryBlockParseWithBuffer(ctx context.Context, readBuffer utils.Read // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type AdsDiscoveryBlockChildSerializeRequirement interface { AdsDiscoveryBlock - InitializeParent(AdsDiscoveryBlock) + InitializeParent(AdsDiscoveryBlock ) GetParent() AdsDiscoveryBlock } var _childTemp interface{} var _child AdsDiscoveryBlockChildSerializeRequirement var typeSwitchError error switch { - case blockType == AdsDiscoveryBlockType_STATUS: // AdsDiscoveryBlockStatus - _childTemp, typeSwitchError = AdsDiscoveryBlockStatusParseWithBuffer(ctx, readBuffer) - case blockType == AdsDiscoveryBlockType_PASSWORD: // AdsDiscoveryBlockPassword - _childTemp, typeSwitchError = AdsDiscoveryBlockPasswordParseWithBuffer(ctx, readBuffer) - case blockType == AdsDiscoveryBlockType_VERSION: // AdsDiscoveryBlockVersion - _childTemp, typeSwitchError = AdsDiscoveryBlockVersionParseWithBuffer(ctx, readBuffer) - case blockType == AdsDiscoveryBlockType_OS_DATA: // AdsDiscoveryBlockOsData - _childTemp, typeSwitchError = AdsDiscoveryBlockOsDataParseWithBuffer(ctx, readBuffer) - case blockType == AdsDiscoveryBlockType_HOST_NAME: // AdsDiscoveryBlockHostName - _childTemp, typeSwitchError = AdsDiscoveryBlockHostNameParseWithBuffer(ctx, readBuffer) - case blockType == AdsDiscoveryBlockType_AMS_NET_ID: // AdsDiscoveryBlockAmsNetId - _childTemp, typeSwitchError = AdsDiscoveryBlockAmsNetIdParseWithBuffer(ctx, readBuffer) - case blockType == AdsDiscoveryBlockType_ROUTE_NAME: // AdsDiscoveryBlockRouteName - _childTemp, typeSwitchError = AdsDiscoveryBlockRouteNameParseWithBuffer(ctx, readBuffer) - case blockType == AdsDiscoveryBlockType_USER_NAME: // AdsDiscoveryBlockUserName - _childTemp, typeSwitchError = AdsDiscoveryBlockUserNameParseWithBuffer(ctx, readBuffer) - case blockType == AdsDiscoveryBlockType_FINGERPRINT: // AdsDiscoveryBlockFingerprint - _childTemp, typeSwitchError = AdsDiscoveryBlockFingerprintParseWithBuffer(ctx, readBuffer) +case blockType == AdsDiscoveryBlockType_STATUS : // AdsDiscoveryBlockStatus + _childTemp, typeSwitchError = AdsDiscoveryBlockStatusParseWithBuffer(ctx, readBuffer, ) +case blockType == AdsDiscoveryBlockType_PASSWORD : // AdsDiscoveryBlockPassword + _childTemp, typeSwitchError = AdsDiscoveryBlockPasswordParseWithBuffer(ctx, readBuffer, ) +case blockType == AdsDiscoveryBlockType_VERSION : // AdsDiscoveryBlockVersion + _childTemp, typeSwitchError = AdsDiscoveryBlockVersionParseWithBuffer(ctx, readBuffer, ) +case blockType == AdsDiscoveryBlockType_OS_DATA : // AdsDiscoveryBlockOsData + _childTemp, typeSwitchError = AdsDiscoveryBlockOsDataParseWithBuffer(ctx, readBuffer, ) +case blockType == AdsDiscoveryBlockType_HOST_NAME : // AdsDiscoveryBlockHostName + _childTemp, typeSwitchError = AdsDiscoveryBlockHostNameParseWithBuffer(ctx, readBuffer, ) +case blockType == AdsDiscoveryBlockType_AMS_NET_ID : // AdsDiscoveryBlockAmsNetId + _childTemp, typeSwitchError = AdsDiscoveryBlockAmsNetIdParseWithBuffer(ctx, readBuffer, ) +case blockType == AdsDiscoveryBlockType_ROUTE_NAME : // AdsDiscoveryBlockRouteName + _childTemp, typeSwitchError = AdsDiscoveryBlockRouteNameParseWithBuffer(ctx, readBuffer, ) +case blockType == AdsDiscoveryBlockType_USER_NAME : // AdsDiscoveryBlockUserName + _childTemp, typeSwitchError = AdsDiscoveryBlockUserNameParseWithBuffer(ctx, readBuffer, ) +case blockType == AdsDiscoveryBlockType_FINGERPRINT : // AdsDiscoveryBlockFingerprint + _childTemp, typeSwitchError = AdsDiscoveryBlockFingerprintParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [blockType=%v]", blockType) } @@ -166,7 +171,7 @@ func AdsDiscoveryBlockParseWithBuffer(ctx context.Context, readBuffer utils.Read } // Finish initializing - _child.InitializeParent(_child) +_child.InitializeParent(_child ) return _child, nil } @@ -176,7 +181,7 @@ func (pm *_AdsDiscoveryBlock) SerializeParent(ctx context.Context, writeBuffer u _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("AdsDiscoveryBlock"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("AdsDiscoveryBlock"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for AdsDiscoveryBlock") } @@ -205,6 +210,7 @@ func (pm *_AdsDiscoveryBlock) SerializeParent(ctx context.Context, writeBuffer u return nil } + func (m *_AdsDiscoveryBlock) isAdsDiscoveryBlock() bool { return true } @@ -219,3 +225,6 @@ func (m *_AdsDiscoveryBlock) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlockAmsNetId.go b/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlockAmsNetId.go index 8b24abaaf77..c7a05b761ed 100644 --- a/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlockAmsNetId.go +++ b/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlockAmsNetId.go @@ -19,6 +19,7 @@ package model + import ( "context" "fmt" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const AdsDiscoveryBlockAmsNetId_AMSNETIDLENGTH uint16 = 0x0006 @@ -50,29 +52,29 @@ type AdsDiscoveryBlockAmsNetIdExactly interface { // _AdsDiscoveryBlockAmsNetId is the data-structure of this message type _AdsDiscoveryBlockAmsNetId struct { *_AdsDiscoveryBlock - AmsNetId AmsNetId + AmsNetId AmsNetId } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_AdsDiscoveryBlockAmsNetId) GetBlockType() AdsDiscoveryBlockType { - return AdsDiscoveryBlockType_AMS_NET_ID -} +func (m *_AdsDiscoveryBlockAmsNetId) GetBlockType() AdsDiscoveryBlockType { +return AdsDiscoveryBlockType_AMS_NET_ID} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AdsDiscoveryBlockAmsNetId) InitializeParent(parent AdsDiscoveryBlock) {} +func (m *_AdsDiscoveryBlockAmsNetId) InitializeParent(parent AdsDiscoveryBlock ) {} -func (m *_AdsDiscoveryBlockAmsNetId) GetParent() AdsDiscoveryBlock { +func (m *_AdsDiscoveryBlockAmsNetId) GetParent() AdsDiscoveryBlock { return m._AdsDiscoveryBlock } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -100,11 +102,12 @@ func (m *_AdsDiscoveryBlockAmsNetId) GetAmsNetIdLength() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAdsDiscoveryBlockAmsNetId factory function for _AdsDiscoveryBlockAmsNetId -func NewAdsDiscoveryBlockAmsNetId(amsNetId AmsNetId) *_AdsDiscoveryBlockAmsNetId { +func NewAdsDiscoveryBlockAmsNetId( amsNetId AmsNetId ) *_AdsDiscoveryBlockAmsNetId { _result := &_AdsDiscoveryBlockAmsNetId{ - AmsNetId: amsNetId, - _AdsDiscoveryBlock: NewAdsDiscoveryBlock(), + AmsNetId: amsNetId, + _AdsDiscoveryBlock: NewAdsDiscoveryBlock(), } _result._AdsDiscoveryBlock._AdsDiscoveryBlockChildRequirements = _result return _result @@ -112,7 +115,7 @@ func NewAdsDiscoveryBlockAmsNetId(amsNetId AmsNetId) *_AdsDiscoveryBlockAmsNetId // Deprecated: use the interface for direct cast func CastAdsDiscoveryBlockAmsNetId(structType interface{}) AdsDiscoveryBlockAmsNetId { - if casted, ok := structType.(AdsDiscoveryBlockAmsNetId); ok { + if casted, ok := structType.(AdsDiscoveryBlockAmsNetId); ok { return casted } if casted, ok := structType.(*AdsDiscoveryBlockAmsNetId); ok { @@ -137,6 +140,7 @@ func (m *_AdsDiscoveryBlockAmsNetId) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_AdsDiscoveryBlockAmsNetId) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -167,7 +171,7 @@ func AdsDiscoveryBlockAmsNetIdParseWithBuffer(ctx context.Context, readBuffer ut if pullErr := readBuffer.PullContext("amsNetId"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for amsNetId") } - _amsNetId, _amsNetIdErr := AmsNetIdParseWithBuffer(ctx, readBuffer) +_amsNetId, _amsNetIdErr := AmsNetIdParseWithBuffer(ctx, readBuffer) if _amsNetIdErr != nil { return nil, errors.Wrap(_amsNetIdErr, "Error parsing 'amsNetId' field of AdsDiscoveryBlockAmsNetId") } @@ -182,8 +186,9 @@ func AdsDiscoveryBlockAmsNetIdParseWithBuffer(ctx context.Context, readBuffer ut // Create a partially initialized instance _child := &_AdsDiscoveryBlockAmsNetId{ - _AdsDiscoveryBlock: &_AdsDiscoveryBlock{}, - AmsNetId: amsNetId, + _AdsDiscoveryBlock: &_AdsDiscoveryBlock{ + }, + AmsNetId: amsNetId, } _child._AdsDiscoveryBlock._AdsDiscoveryBlockChildRequirements = _child return _child, nil @@ -205,23 +210,23 @@ func (m *_AdsDiscoveryBlockAmsNetId) SerializeWithWriteBuffer(ctx context.Contex return errors.Wrap(pushErr, "Error pushing for AdsDiscoveryBlockAmsNetId") } - // Const Field (amsNetIdLength) - _amsNetIdLengthErr := writeBuffer.WriteUint16("amsNetIdLength", 16, 0x0006) - if _amsNetIdLengthErr != nil { - return errors.Wrap(_amsNetIdLengthErr, "Error serializing 'amsNetIdLength' field") - } + // Const Field (amsNetIdLength) + _amsNetIdLengthErr := writeBuffer.WriteUint16("amsNetIdLength", 16, 0x0006) + if _amsNetIdLengthErr != nil { + return errors.Wrap(_amsNetIdLengthErr, "Error serializing 'amsNetIdLength' field") + } - // Simple Field (amsNetId) - if pushErr := writeBuffer.PushContext("amsNetId"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for amsNetId") - } - _amsNetIdErr := writeBuffer.WriteSerializable(ctx, m.GetAmsNetId()) - if popErr := writeBuffer.PopContext("amsNetId"); popErr != nil { - return errors.Wrap(popErr, "Error popping for amsNetId") - } - if _amsNetIdErr != nil { - return errors.Wrap(_amsNetIdErr, "Error serializing 'amsNetId' field") - } + // Simple Field (amsNetId) + if pushErr := writeBuffer.PushContext("amsNetId"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for amsNetId") + } + _amsNetIdErr := writeBuffer.WriteSerializable(ctx, m.GetAmsNetId()) + if popErr := writeBuffer.PopContext("amsNetId"); popErr != nil { + return errors.Wrap(popErr, "Error popping for amsNetId") + } + if _amsNetIdErr != nil { + return errors.Wrap(_amsNetIdErr, "Error serializing 'amsNetId' field") + } if popErr := writeBuffer.PopContext("AdsDiscoveryBlockAmsNetId"); popErr != nil { return errors.Wrap(popErr, "Error popping for AdsDiscoveryBlockAmsNetId") @@ -231,6 +236,7 @@ func (m *_AdsDiscoveryBlockAmsNetId) SerializeWithWriteBuffer(ctx context.Contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AdsDiscoveryBlockAmsNetId) isAdsDiscoveryBlockAmsNetId() bool { return true } @@ -245,3 +251,6 @@ func (m *_AdsDiscoveryBlockAmsNetId) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlockFingerprint.go b/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlockFingerprint.go index 59c2e2bf092..19d2350fd6a 100644 --- a/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlockFingerprint.go +++ b/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlockFingerprint.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AdsDiscoveryBlockFingerprint is the corresponding interface of AdsDiscoveryBlockFingerprint type AdsDiscoveryBlockFingerprint interface { @@ -46,29 +48,29 @@ type AdsDiscoveryBlockFingerprintExactly interface { // _AdsDiscoveryBlockFingerprint is the data-structure of this message type _AdsDiscoveryBlockFingerprint struct { *_AdsDiscoveryBlock - Data []byte + Data []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_AdsDiscoveryBlockFingerprint) GetBlockType() AdsDiscoveryBlockType { - return AdsDiscoveryBlockType_FINGERPRINT -} +func (m *_AdsDiscoveryBlockFingerprint) GetBlockType() AdsDiscoveryBlockType { +return AdsDiscoveryBlockType_FINGERPRINT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AdsDiscoveryBlockFingerprint) InitializeParent(parent AdsDiscoveryBlock) {} +func (m *_AdsDiscoveryBlockFingerprint) InitializeParent(parent AdsDiscoveryBlock ) {} -func (m *_AdsDiscoveryBlockFingerprint) GetParent() AdsDiscoveryBlock { +func (m *_AdsDiscoveryBlockFingerprint) GetParent() AdsDiscoveryBlock { return m._AdsDiscoveryBlock } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_AdsDiscoveryBlockFingerprint) GetData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAdsDiscoveryBlockFingerprint factory function for _AdsDiscoveryBlockFingerprint -func NewAdsDiscoveryBlockFingerprint(data []byte) *_AdsDiscoveryBlockFingerprint { +func NewAdsDiscoveryBlockFingerprint( data []byte ) *_AdsDiscoveryBlockFingerprint { _result := &_AdsDiscoveryBlockFingerprint{ - Data: data, - _AdsDiscoveryBlock: NewAdsDiscoveryBlock(), + Data: data, + _AdsDiscoveryBlock: NewAdsDiscoveryBlock(), } _result._AdsDiscoveryBlock._AdsDiscoveryBlockChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewAdsDiscoveryBlockFingerprint(data []byte) *_AdsDiscoveryBlockFingerprint // Deprecated: use the interface for direct cast func CastAdsDiscoveryBlockFingerprint(structType interface{}) AdsDiscoveryBlockFingerprint { - if casted, ok := structType.(AdsDiscoveryBlockFingerprint); ok { + if casted, ok := structType.(AdsDiscoveryBlockFingerprint); ok { return casted } if casted, ok := structType.(*AdsDiscoveryBlockFingerprint); ok { @@ -122,6 +125,7 @@ func (m *_AdsDiscoveryBlockFingerprint) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_AdsDiscoveryBlockFingerprint) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -158,8 +162,9 @@ func AdsDiscoveryBlockFingerprintParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_AdsDiscoveryBlockFingerprint{ - _AdsDiscoveryBlock: &_AdsDiscoveryBlock{}, - Data: data, + _AdsDiscoveryBlock: &_AdsDiscoveryBlock{ + }, + Data: data, } _child._AdsDiscoveryBlock._AdsDiscoveryBlockChildRequirements = _child return _child, nil @@ -181,18 +186,18 @@ func (m *_AdsDiscoveryBlockFingerprint) SerializeWithWriteBuffer(ctx context.Con return errors.Wrap(pushErr, "Error pushing for AdsDiscoveryBlockFingerprint") } - // Implicit Field (dataLen) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - dataLen := uint16(uint16(len(m.GetData()))) - _dataLenErr := writeBuffer.WriteUint16("dataLen", 16, (dataLen)) - if _dataLenErr != nil { - return errors.Wrap(_dataLenErr, "Error serializing 'dataLen' field") - } + // Implicit Field (dataLen) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) + dataLen := uint16(uint16(len(m.GetData()))) + _dataLenErr := writeBuffer.WriteUint16("dataLen", 16, (dataLen)) + if _dataLenErr != nil { + return errors.Wrap(_dataLenErr, "Error serializing 'dataLen' field") + } - // Array Field (data) - // Byte Array field (data) - if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { - return errors.Wrap(err, "Error serializing 'data' field") - } + // Array Field (data) + // Byte Array field (data) + if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { + return errors.Wrap(err, "Error serializing 'data' field") + } if popErr := writeBuffer.PopContext("AdsDiscoveryBlockFingerprint"); popErr != nil { return errors.Wrap(popErr, "Error popping for AdsDiscoveryBlockFingerprint") @@ -202,6 +207,7 @@ func (m *_AdsDiscoveryBlockFingerprint) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AdsDiscoveryBlockFingerprint) isAdsDiscoveryBlockFingerprint() bool { return true } @@ -216,3 +222,6 @@ func (m *_AdsDiscoveryBlockFingerprint) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlockHostName.go b/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlockHostName.go index 087da8eb529..f77a5e0a1bd 100644 --- a/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlockHostName.go +++ b/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlockHostName.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AdsDiscoveryBlockHostName is the corresponding interface of AdsDiscoveryBlockHostName type AdsDiscoveryBlockHostName interface { @@ -46,29 +48,29 @@ type AdsDiscoveryBlockHostNameExactly interface { // _AdsDiscoveryBlockHostName is the data-structure of this message type _AdsDiscoveryBlockHostName struct { *_AdsDiscoveryBlock - HostName AmsString + HostName AmsString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_AdsDiscoveryBlockHostName) GetBlockType() AdsDiscoveryBlockType { - return AdsDiscoveryBlockType_HOST_NAME -} +func (m *_AdsDiscoveryBlockHostName) GetBlockType() AdsDiscoveryBlockType { +return AdsDiscoveryBlockType_HOST_NAME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AdsDiscoveryBlockHostName) InitializeParent(parent AdsDiscoveryBlock) {} +func (m *_AdsDiscoveryBlockHostName) InitializeParent(parent AdsDiscoveryBlock ) {} -func (m *_AdsDiscoveryBlockHostName) GetParent() AdsDiscoveryBlock { +func (m *_AdsDiscoveryBlockHostName) GetParent() AdsDiscoveryBlock { return m._AdsDiscoveryBlock } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_AdsDiscoveryBlockHostName) GetHostName() AmsString { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAdsDiscoveryBlockHostName factory function for _AdsDiscoveryBlockHostName -func NewAdsDiscoveryBlockHostName(hostName AmsString) *_AdsDiscoveryBlockHostName { +func NewAdsDiscoveryBlockHostName( hostName AmsString ) *_AdsDiscoveryBlockHostName { _result := &_AdsDiscoveryBlockHostName{ - HostName: hostName, - _AdsDiscoveryBlock: NewAdsDiscoveryBlock(), + HostName: hostName, + _AdsDiscoveryBlock: NewAdsDiscoveryBlock(), } _result._AdsDiscoveryBlock._AdsDiscoveryBlockChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewAdsDiscoveryBlockHostName(hostName AmsString) *_AdsDiscoveryBlockHostNam // Deprecated: use the interface for direct cast func CastAdsDiscoveryBlockHostName(structType interface{}) AdsDiscoveryBlockHostName { - if casted, ok := structType.(AdsDiscoveryBlockHostName); ok { + if casted, ok := structType.(AdsDiscoveryBlockHostName); ok { return casted } if casted, ok := structType.(*AdsDiscoveryBlockHostName); ok { @@ -117,6 +120,7 @@ func (m *_AdsDiscoveryBlockHostName) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_AdsDiscoveryBlockHostName) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func AdsDiscoveryBlockHostNameParseWithBuffer(ctx context.Context, readBuffer ut if pullErr := readBuffer.PullContext("hostName"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for hostName") } - _hostName, _hostNameErr := AmsStringParseWithBuffer(ctx, readBuffer) +_hostName, _hostNameErr := AmsStringParseWithBuffer(ctx, readBuffer) if _hostNameErr != nil { return nil, errors.Wrap(_hostNameErr, "Error parsing 'hostName' field of AdsDiscoveryBlockHostName") } @@ -153,8 +157,9 @@ func AdsDiscoveryBlockHostNameParseWithBuffer(ctx context.Context, readBuffer ut // Create a partially initialized instance _child := &_AdsDiscoveryBlockHostName{ - _AdsDiscoveryBlock: &_AdsDiscoveryBlock{}, - HostName: hostName, + _AdsDiscoveryBlock: &_AdsDiscoveryBlock{ + }, + HostName: hostName, } _child._AdsDiscoveryBlock._AdsDiscoveryBlockChildRequirements = _child return _child, nil @@ -176,17 +181,17 @@ func (m *_AdsDiscoveryBlockHostName) SerializeWithWriteBuffer(ctx context.Contex return errors.Wrap(pushErr, "Error pushing for AdsDiscoveryBlockHostName") } - // Simple Field (hostName) - if pushErr := writeBuffer.PushContext("hostName"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for hostName") - } - _hostNameErr := writeBuffer.WriteSerializable(ctx, m.GetHostName()) - if popErr := writeBuffer.PopContext("hostName"); popErr != nil { - return errors.Wrap(popErr, "Error popping for hostName") - } - if _hostNameErr != nil { - return errors.Wrap(_hostNameErr, "Error serializing 'hostName' field") - } + // Simple Field (hostName) + if pushErr := writeBuffer.PushContext("hostName"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for hostName") + } + _hostNameErr := writeBuffer.WriteSerializable(ctx, m.GetHostName()) + if popErr := writeBuffer.PopContext("hostName"); popErr != nil { + return errors.Wrap(popErr, "Error popping for hostName") + } + if _hostNameErr != nil { + return errors.Wrap(_hostNameErr, "Error serializing 'hostName' field") + } if popErr := writeBuffer.PopContext("AdsDiscoveryBlockHostName"); popErr != nil { return errors.Wrap(popErr, "Error popping for AdsDiscoveryBlockHostName") @@ -196,6 +201,7 @@ func (m *_AdsDiscoveryBlockHostName) SerializeWithWriteBuffer(ctx context.Contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AdsDiscoveryBlockHostName) isAdsDiscoveryBlockHostName() bool { return true } @@ -210,3 +216,6 @@ func (m *_AdsDiscoveryBlockHostName) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlockOsData.go b/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlockOsData.go index 727ac65855b..c7cb80a1d6c 100644 --- a/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlockOsData.go +++ b/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlockOsData.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AdsDiscoveryBlockOsData is the corresponding interface of AdsDiscoveryBlockOsData type AdsDiscoveryBlockOsData interface { @@ -46,29 +48,29 @@ type AdsDiscoveryBlockOsDataExactly interface { // _AdsDiscoveryBlockOsData is the data-structure of this message type _AdsDiscoveryBlockOsData struct { *_AdsDiscoveryBlock - OsData []byte + OsData []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_AdsDiscoveryBlockOsData) GetBlockType() AdsDiscoveryBlockType { - return AdsDiscoveryBlockType_OS_DATA -} +func (m *_AdsDiscoveryBlockOsData) GetBlockType() AdsDiscoveryBlockType { +return AdsDiscoveryBlockType_OS_DATA} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AdsDiscoveryBlockOsData) InitializeParent(parent AdsDiscoveryBlock) {} +func (m *_AdsDiscoveryBlockOsData) InitializeParent(parent AdsDiscoveryBlock ) {} -func (m *_AdsDiscoveryBlockOsData) GetParent() AdsDiscoveryBlock { +func (m *_AdsDiscoveryBlockOsData) GetParent() AdsDiscoveryBlock { return m._AdsDiscoveryBlock } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_AdsDiscoveryBlockOsData) GetOsData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAdsDiscoveryBlockOsData factory function for _AdsDiscoveryBlockOsData -func NewAdsDiscoveryBlockOsData(osData []byte) *_AdsDiscoveryBlockOsData { +func NewAdsDiscoveryBlockOsData( osData []byte ) *_AdsDiscoveryBlockOsData { _result := &_AdsDiscoveryBlockOsData{ - OsData: osData, - _AdsDiscoveryBlock: NewAdsDiscoveryBlock(), + OsData: osData, + _AdsDiscoveryBlock: NewAdsDiscoveryBlock(), } _result._AdsDiscoveryBlock._AdsDiscoveryBlockChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewAdsDiscoveryBlockOsData(osData []byte) *_AdsDiscoveryBlockOsData { // Deprecated: use the interface for direct cast func CastAdsDiscoveryBlockOsData(structType interface{}) AdsDiscoveryBlockOsData { - if casted, ok := structType.(AdsDiscoveryBlockOsData); ok { + if casted, ok := structType.(AdsDiscoveryBlockOsData); ok { return casted } if casted, ok := structType.(*AdsDiscoveryBlockOsData); ok { @@ -122,6 +125,7 @@ func (m *_AdsDiscoveryBlockOsData) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_AdsDiscoveryBlockOsData) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -158,8 +162,9 @@ func AdsDiscoveryBlockOsDataParseWithBuffer(ctx context.Context, readBuffer util // Create a partially initialized instance _child := &_AdsDiscoveryBlockOsData{ - _AdsDiscoveryBlock: &_AdsDiscoveryBlock{}, - OsData: osData, + _AdsDiscoveryBlock: &_AdsDiscoveryBlock{ + }, + OsData: osData, } _child._AdsDiscoveryBlock._AdsDiscoveryBlockChildRequirements = _child return _child, nil @@ -181,18 +186,18 @@ func (m *_AdsDiscoveryBlockOsData) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for AdsDiscoveryBlockOsData") } - // Implicit Field (osDataLen) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - osDataLen := uint16(uint16(len(m.GetOsData()))) - _osDataLenErr := writeBuffer.WriteUint16("osDataLen", 16, (osDataLen)) - if _osDataLenErr != nil { - return errors.Wrap(_osDataLenErr, "Error serializing 'osDataLen' field") - } + // Implicit Field (osDataLen) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) + osDataLen := uint16(uint16(len(m.GetOsData()))) + _osDataLenErr := writeBuffer.WriteUint16("osDataLen", 16, (osDataLen)) + if _osDataLenErr != nil { + return errors.Wrap(_osDataLenErr, "Error serializing 'osDataLen' field") + } - // Array Field (osData) - // Byte Array field (osData) - if err := writeBuffer.WriteByteArray("osData", m.GetOsData()); err != nil { - return errors.Wrap(err, "Error serializing 'osData' field") - } + // Array Field (osData) + // Byte Array field (osData) + if err := writeBuffer.WriteByteArray("osData", m.GetOsData()); err != nil { + return errors.Wrap(err, "Error serializing 'osData' field") + } if popErr := writeBuffer.PopContext("AdsDiscoveryBlockOsData"); popErr != nil { return errors.Wrap(popErr, "Error popping for AdsDiscoveryBlockOsData") @@ -202,6 +207,7 @@ func (m *_AdsDiscoveryBlockOsData) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AdsDiscoveryBlockOsData) isAdsDiscoveryBlockOsData() bool { return true } @@ -216,3 +222,6 @@ func (m *_AdsDiscoveryBlockOsData) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlockPassword.go b/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlockPassword.go index 889ef637121..d62d5a1dfe1 100644 --- a/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlockPassword.go +++ b/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlockPassword.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AdsDiscoveryBlockPassword is the corresponding interface of AdsDiscoveryBlockPassword type AdsDiscoveryBlockPassword interface { @@ -46,29 +48,29 @@ type AdsDiscoveryBlockPasswordExactly interface { // _AdsDiscoveryBlockPassword is the data-structure of this message type _AdsDiscoveryBlockPassword struct { *_AdsDiscoveryBlock - Password AmsString + Password AmsString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_AdsDiscoveryBlockPassword) GetBlockType() AdsDiscoveryBlockType { - return AdsDiscoveryBlockType_PASSWORD -} +func (m *_AdsDiscoveryBlockPassword) GetBlockType() AdsDiscoveryBlockType { +return AdsDiscoveryBlockType_PASSWORD} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AdsDiscoveryBlockPassword) InitializeParent(parent AdsDiscoveryBlock) {} +func (m *_AdsDiscoveryBlockPassword) InitializeParent(parent AdsDiscoveryBlock ) {} -func (m *_AdsDiscoveryBlockPassword) GetParent() AdsDiscoveryBlock { +func (m *_AdsDiscoveryBlockPassword) GetParent() AdsDiscoveryBlock { return m._AdsDiscoveryBlock } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_AdsDiscoveryBlockPassword) GetPassword() AmsString { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAdsDiscoveryBlockPassword factory function for _AdsDiscoveryBlockPassword -func NewAdsDiscoveryBlockPassword(password AmsString) *_AdsDiscoveryBlockPassword { +func NewAdsDiscoveryBlockPassword( password AmsString ) *_AdsDiscoveryBlockPassword { _result := &_AdsDiscoveryBlockPassword{ - Password: password, - _AdsDiscoveryBlock: NewAdsDiscoveryBlock(), + Password: password, + _AdsDiscoveryBlock: NewAdsDiscoveryBlock(), } _result._AdsDiscoveryBlock._AdsDiscoveryBlockChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewAdsDiscoveryBlockPassword(password AmsString) *_AdsDiscoveryBlockPasswor // Deprecated: use the interface for direct cast func CastAdsDiscoveryBlockPassword(structType interface{}) AdsDiscoveryBlockPassword { - if casted, ok := structType.(AdsDiscoveryBlockPassword); ok { + if casted, ok := structType.(AdsDiscoveryBlockPassword); ok { return casted } if casted, ok := structType.(*AdsDiscoveryBlockPassword); ok { @@ -117,6 +120,7 @@ func (m *_AdsDiscoveryBlockPassword) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_AdsDiscoveryBlockPassword) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func AdsDiscoveryBlockPasswordParseWithBuffer(ctx context.Context, readBuffer ut if pullErr := readBuffer.PullContext("password"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for password") } - _password, _passwordErr := AmsStringParseWithBuffer(ctx, readBuffer) +_password, _passwordErr := AmsStringParseWithBuffer(ctx, readBuffer) if _passwordErr != nil { return nil, errors.Wrap(_passwordErr, "Error parsing 'password' field of AdsDiscoveryBlockPassword") } @@ -153,8 +157,9 @@ func AdsDiscoveryBlockPasswordParseWithBuffer(ctx context.Context, readBuffer ut // Create a partially initialized instance _child := &_AdsDiscoveryBlockPassword{ - _AdsDiscoveryBlock: &_AdsDiscoveryBlock{}, - Password: password, + _AdsDiscoveryBlock: &_AdsDiscoveryBlock{ + }, + Password: password, } _child._AdsDiscoveryBlock._AdsDiscoveryBlockChildRequirements = _child return _child, nil @@ -176,17 +181,17 @@ func (m *_AdsDiscoveryBlockPassword) SerializeWithWriteBuffer(ctx context.Contex return errors.Wrap(pushErr, "Error pushing for AdsDiscoveryBlockPassword") } - // Simple Field (password) - if pushErr := writeBuffer.PushContext("password"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for password") - } - _passwordErr := writeBuffer.WriteSerializable(ctx, m.GetPassword()) - if popErr := writeBuffer.PopContext("password"); popErr != nil { - return errors.Wrap(popErr, "Error popping for password") - } - if _passwordErr != nil { - return errors.Wrap(_passwordErr, "Error serializing 'password' field") - } + // Simple Field (password) + if pushErr := writeBuffer.PushContext("password"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for password") + } + _passwordErr := writeBuffer.WriteSerializable(ctx, m.GetPassword()) + if popErr := writeBuffer.PopContext("password"); popErr != nil { + return errors.Wrap(popErr, "Error popping for password") + } + if _passwordErr != nil { + return errors.Wrap(_passwordErr, "Error serializing 'password' field") + } if popErr := writeBuffer.PopContext("AdsDiscoveryBlockPassword"); popErr != nil { return errors.Wrap(popErr, "Error popping for AdsDiscoveryBlockPassword") @@ -196,6 +201,7 @@ func (m *_AdsDiscoveryBlockPassword) SerializeWithWriteBuffer(ctx context.Contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AdsDiscoveryBlockPassword) isAdsDiscoveryBlockPassword() bool { return true } @@ -210,3 +216,6 @@ func (m *_AdsDiscoveryBlockPassword) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlockRouteName.go b/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlockRouteName.go index 8825252657b..253b231f1eb 100644 --- a/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlockRouteName.go +++ b/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlockRouteName.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AdsDiscoveryBlockRouteName is the corresponding interface of AdsDiscoveryBlockRouteName type AdsDiscoveryBlockRouteName interface { @@ -46,29 +48,29 @@ type AdsDiscoveryBlockRouteNameExactly interface { // _AdsDiscoveryBlockRouteName is the data-structure of this message type _AdsDiscoveryBlockRouteName struct { *_AdsDiscoveryBlock - RouteName AmsString + RouteName AmsString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_AdsDiscoveryBlockRouteName) GetBlockType() AdsDiscoveryBlockType { - return AdsDiscoveryBlockType_ROUTE_NAME -} +func (m *_AdsDiscoveryBlockRouteName) GetBlockType() AdsDiscoveryBlockType { +return AdsDiscoveryBlockType_ROUTE_NAME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AdsDiscoveryBlockRouteName) InitializeParent(parent AdsDiscoveryBlock) {} +func (m *_AdsDiscoveryBlockRouteName) InitializeParent(parent AdsDiscoveryBlock ) {} -func (m *_AdsDiscoveryBlockRouteName) GetParent() AdsDiscoveryBlock { +func (m *_AdsDiscoveryBlockRouteName) GetParent() AdsDiscoveryBlock { return m._AdsDiscoveryBlock } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_AdsDiscoveryBlockRouteName) GetRouteName() AmsString { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAdsDiscoveryBlockRouteName factory function for _AdsDiscoveryBlockRouteName -func NewAdsDiscoveryBlockRouteName(routeName AmsString) *_AdsDiscoveryBlockRouteName { +func NewAdsDiscoveryBlockRouteName( routeName AmsString ) *_AdsDiscoveryBlockRouteName { _result := &_AdsDiscoveryBlockRouteName{ - RouteName: routeName, - _AdsDiscoveryBlock: NewAdsDiscoveryBlock(), + RouteName: routeName, + _AdsDiscoveryBlock: NewAdsDiscoveryBlock(), } _result._AdsDiscoveryBlock._AdsDiscoveryBlockChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewAdsDiscoveryBlockRouteName(routeName AmsString) *_AdsDiscoveryBlockRoute // Deprecated: use the interface for direct cast func CastAdsDiscoveryBlockRouteName(structType interface{}) AdsDiscoveryBlockRouteName { - if casted, ok := structType.(AdsDiscoveryBlockRouteName); ok { + if casted, ok := structType.(AdsDiscoveryBlockRouteName); ok { return casted } if casted, ok := structType.(*AdsDiscoveryBlockRouteName); ok { @@ -117,6 +120,7 @@ func (m *_AdsDiscoveryBlockRouteName) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_AdsDiscoveryBlockRouteName) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func AdsDiscoveryBlockRouteNameParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("routeName"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for routeName") } - _routeName, _routeNameErr := AmsStringParseWithBuffer(ctx, readBuffer) +_routeName, _routeNameErr := AmsStringParseWithBuffer(ctx, readBuffer) if _routeNameErr != nil { return nil, errors.Wrap(_routeNameErr, "Error parsing 'routeName' field of AdsDiscoveryBlockRouteName") } @@ -153,8 +157,9 @@ func AdsDiscoveryBlockRouteNameParseWithBuffer(ctx context.Context, readBuffer u // Create a partially initialized instance _child := &_AdsDiscoveryBlockRouteName{ - _AdsDiscoveryBlock: &_AdsDiscoveryBlock{}, - RouteName: routeName, + _AdsDiscoveryBlock: &_AdsDiscoveryBlock{ + }, + RouteName: routeName, } _child._AdsDiscoveryBlock._AdsDiscoveryBlockChildRequirements = _child return _child, nil @@ -176,17 +181,17 @@ func (m *_AdsDiscoveryBlockRouteName) SerializeWithWriteBuffer(ctx context.Conte return errors.Wrap(pushErr, "Error pushing for AdsDiscoveryBlockRouteName") } - // Simple Field (routeName) - if pushErr := writeBuffer.PushContext("routeName"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for routeName") - } - _routeNameErr := writeBuffer.WriteSerializable(ctx, m.GetRouteName()) - if popErr := writeBuffer.PopContext("routeName"); popErr != nil { - return errors.Wrap(popErr, "Error popping for routeName") - } - if _routeNameErr != nil { - return errors.Wrap(_routeNameErr, "Error serializing 'routeName' field") - } + // Simple Field (routeName) + if pushErr := writeBuffer.PushContext("routeName"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for routeName") + } + _routeNameErr := writeBuffer.WriteSerializable(ctx, m.GetRouteName()) + if popErr := writeBuffer.PopContext("routeName"); popErr != nil { + return errors.Wrap(popErr, "Error popping for routeName") + } + if _routeNameErr != nil { + return errors.Wrap(_routeNameErr, "Error serializing 'routeName' field") + } if popErr := writeBuffer.PopContext("AdsDiscoveryBlockRouteName"); popErr != nil { return errors.Wrap(popErr, "Error popping for AdsDiscoveryBlockRouteName") @@ -196,6 +201,7 @@ func (m *_AdsDiscoveryBlockRouteName) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AdsDiscoveryBlockRouteName) isAdsDiscoveryBlockRouteName() bool { return true } @@ -210,3 +216,6 @@ func (m *_AdsDiscoveryBlockRouteName) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlockStatus.go b/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlockStatus.go index 88e986de02f..f9f093134a5 100644 --- a/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlockStatus.go +++ b/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlockStatus.go @@ -19,6 +19,7 @@ package model + import ( "context" "fmt" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const AdsDiscoveryBlockStatus_STATUSLENGTH uint16 = 0x0004 @@ -50,29 +52,29 @@ type AdsDiscoveryBlockStatusExactly interface { // _AdsDiscoveryBlockStatus is the data-structure of this message type _AdsDiscoveryBlockStatus struct { *_AdsDiscoveryBlock - Status Status + Status Status } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_AdsDiscoveryBlockStatus) GetBlockType() AdsDiscoveryBlockType { - return AdsDiscoveryBlockType_STATUS -} +func (m *_AdsDiscoveryBlockStatus) GetBlockType() AdsDiscoveryBlockType { +return AdsDiscoveryBlockType_STATUS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AdsDiscoveryBlockStatus) InitializeParent(parent AdsDiscoveryBlock) {} +func (m *_AdsDiscoveryBlockStatus) InitializeParent(parent AdsDiscoveryBlock ) {} -func (m *_AdsDiscoveryBlockStatus) GetParent() AdsDiscoveryBlock { +func (m *_AdsDiscoveryBlockStatus) GetParent() AdsDiscoveryBlock { return m._AdsDiscoveryBlock } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -100,11 +102,12 @@ func (m *_AdsDiscoveryBlockStatus) GetStatusLength() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAdsDiscoveryBlockStatus factory function for _AdsDiscoveryBlockStatus -func NewAdsDiscoveryBlockStatus(status Status) *_AdsDiscoveryBlockStatus { +func NewAdsDiscoveryBlockStatus( status Status ) *_AdsDiscoveryBlockStatus { _result := &_AdsDiscoveryBlockStatus{ - Status: status, - _AdsDiscoveryBlock: NewAdsDiscoveryBlock(), + Status: status, + _AdsDiscoveryBlock: NewAdsDiscoveryBlock(), } _result._AdsDiscoveryBlock._AdsDiscoveryBlockChildRequirements = _result return _result @@ -112,7 +115,7 @@ func NewAdsDiscoveryBlockStatus(status Status) *_AdsDiscoveryBlockStatus { // Deprecated: use the interface for direct cast func CastAdsDiscoveryBlockStatus(structType interface{}) AdsDiscoveryBlockStatus { - if casted, ok := structType.(AdsDiscoveryBlockStatus); ok { + if casted, ok := structType.(AdsDiscoveryBlockStatus); ok { return casted } if casted, ok := structType.(*AdsDiscoveryBlockStatus); ok { @@ -137,6 +140,7 @@ func (m *_AdsDiscoveryBlockStatus) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_AdsDiscoveryBlockStatus) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -167,7 +171,7 @@ func AdsDiscoveryBlockStatusParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("status"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for status") } - _status, _statusErr := StatusParseWithBuffer(ctx, readBuffer) +_status, _statusErr := StatusParseWithBuffer(ctx, readBuffer) if _statusErr != nil { return nil, errors.Wrap(_statusErr, "Error parsing 'status' field of AdsDiscoveryBlockStatus") } @@ -182,8 +186,9 @@ func AdsDiscoveryBlockStatusParseWithBuffer(ctx context.Context, readBuffer util // Create a partially initialized instance _child := &_AdsDiscoveryBlockStatus{ - _AdsDiscoveryBlock: &_AdsDiscoveryBlock{}, - Status: status, + _AdsDiscoveryBlock: &_AdsDiscoveryBlock{ + }, + Status: status, } _child._AdsDiscoveryBlock._AdsDiscoveryBlockChildRequirements = _child return _child, nil @@ -205,23 +210,23 @@ func (m *_AdsDiscoveryBlockStatus) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for AdsDiscoveryBlockStatus") } - // Const Field (statusLength) - _statusLengthErr := writeBuffer.WriteUint16("statusLength", 16, 0x0004) - if _statusLengthErr != nil { - return errors.Wrap(_statusLengthErr, "Error serializing 'statusLength' field") - } + // Const Field (statusLength) + _statusLengthErr := writeBuffer.WriteUint16("statusLength", 16, 0x0004) + if _statusLengthErr != nil { + return errors.Wrap(_statusLengthErr, "Error serializing 'statusLength' field") + } - // Simple Field (status) - if pushErr := writeBuffer.PushContext("status"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for status") - } - _statusErr := writeBuffer.WriteSerializable(ctx, m.GetStatus()) - if popErr := writeBuffer.PopContext("status"); popErr != nil { - return errors.Wrap(popErr, "Error popping for status") - } - if _statusErr != nil { - return errors.Wrap(_statusErr, "Error serializing 'status' field") - } + // Simple Field (status) + if pushErr := writeBuffer.PushContext("status"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for status") + } + _statusErr := writeBuffer.WriteSerializable(ctx, m.GetStatus()) + if popErr := writeBuffer.PopContext("status"); popErr != nil { + return errors.Wrap(popErr, "Error popping for status") + } + if _statusErr != nil { + return errors.Wrap(_statusErr, "Error serializing 'status' field") + } if popErr := writeBuffer.PopContext("AdsDiscoveryBlockStatus"); popErr != nil { return errors.Wrap(popErr, "Error popping for AdsDiscoveryBlockStatus") @@ -231,6 +236,7 @@ func (m *_AdsDiscoveryBlockStatus) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AdsDiscoveryBlockStatus) isAdsDiscoveryBlockStatus() bool { return true } @@ -245,3 +251,6 @@ func (m *_AdsDiscoveryBlockStatus) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlockType.go b/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlockType.go index 9e2dedc8639..ab4c7f9638f 100644 --- a/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlockType.go +++ b/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlockType.go @@ -34,15 +34,15 @@ type IAdsDiscoveryBlockType interface { utils.Serializable } -const ( - AdsDiscoveryBlockType_STATUS AdsDiscoveryBlockType = 0x0001 - AdsDiscoveryBlockType_PASSWORD AdsDiscoveryBlockType = 0x0002 - AdsDiscoveryBlockType_VERSION AdsDiscoveryBlockType = 0x0003 - AdsDiscoveryBlockType_OS_DATA AdsDiscoveryBlockType = 0x0004 - AdsDiscoveryBlockType_HOST_NAME AdsDiscoveryBlockType = 0x0005 - AdsDiscoveryBlockType_AMS_NET_ID AdsDiscoveryBlockType = 0x0007 - AdsDiscoveryBlockType_ROUTE_NAME AdsDiscoveryBlockType = 0x000C - AdsDiscoveryBlockType_USER_NAME AdsDiscoveryBlockType = 0x000D +const( + AdsDiscoveryBlockType_STATUS AdsDiscoveryBlockType = 0x0001 + AdsDiscoveryBlockType_PASSWORD AdsDiscoveryBlockType = 0x0002 + AdsDiscoveryBlockType_VERSION AdsDiscoveryBlockType = 0x0003 + AdsDiscoveryBlockType_OS_DATA AdsDiscoveryBlockType = 0x0004 + AdsDiscoveryBlockType_HOST_NAME AdsDiscoveryBlockType = 0x0005 + AdsDiscoveryBlockType_AMS_NET_ID AdsDiscoveryBlockType = 0x0007 + AdsDiscoveryBlockType_ROUTE_NAME AdsDiscoveryBlockType = 0x000C + AdsDiscoveryBlockType_USER_NAME AdsDiscoveryBlockType = 0x000D AdsDiscoveryBlockType_FINGERPRINT AdsDiscoveryBlockType = 0x0012 ) @@ -50,7 +50,7 @@ var AdsDiscoveryBlockTypeValues []AdsDiscoveryBlockType func init() { _ = errors.New - AdsDiscoveryBlockTypeValues = []AdsDiscoveryBlockType{ + AdsDiscoveryBlockTypeValues = []AdsDiscoveryBlockType { AdsDiscoveryBlockType_STATUS, AdsDiscoveryBlockType_PASSWORD, AdsDiscoveryBlockType_VERSION, @@ -65,24 +65,24 @@ func init() { func AdsDiscoveryBlockTypeByValue(value uint16) (enum AdsDiscoveryBlockType, ok bool) { switch value { - case 0x0001: - return AdsDiscoveryBlockType_STATUS, true - case 0x0002: - return AdsDiscoveryBlockType_PASSWORD, true - case 0x0003: - return AdsDiscoveryBlockType_VERSION, true - case 0x0004: - return AdsDiscoveryBlockType_OS_DATA, true - case 0x0005: - return AdsDiscoveryBlockType_HOST_NAME, true - case 0x0007: - return AdsDiscoveryBlockType_AMS_NET_ID, true - case 0x000C: - return AdsDiscoveryBlockType_ROUTE_NAME, true - case 0x000D: - return AdsDiscoveryBlockType_USER_NAME, true - case 0x0012: - return AdsDiscoveryBlockType_FINGERPRINT, true + case 0x0001: + return AdsDiscoveryBlockType_STATUS, true + case 0x0002: + return AdsDiscoveryBlockType_PASSWORD, true + case 0x0003: + return AdsDiscoveryBlockType_VERSION, true + case 0x0004: + return AdsDiscoveryBlockType_OS_DATA, true + case 0x0005: + return AdsDiscoveryBlockType_HOST_NAME, true + case 0x0007: + return AdsDiscoveryBlockType_AMS_NET_ID, true + case 0x000C: + return AdsDiscoveryBlockType_ROUTE_NAME, true + case 0x000D: + return AdsDiscoveryBlockType_USER_NAME, true + case 0x0012: + return AdsDiscoveryBlockType_FINGERPRINT, true } return 0, false } @@ -111,13 +111,13 @@ func AdsDiscoveryBlockTypeByName(value string) (enum AdsDiscoveryBlockType, ok b return 0, false } -func AdsDiscoveryBlockTypeKnows(value uint16) bool { +func AdsDiscoveryBlockTypeKnows(value uint16) bool { for _, typeValue := range AdsDiscoveryBlockTypeValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastAdsDiscoveryBlockType(structType interface{}) AdsDiscoveryBlockType { @@ -195,3 +195,4 @@ func (e AdsDiscoveryBlockType) PLC4XEnumName() string { func (e AdsDiscoveryBlockType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlockUserName.go b/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlockUserName.go index 7f6f953fe41..8c9c1b8ebc4 100644 --- a/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlockUserName.go +++ b/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlockUserName.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AdsDiscoveryBlockUserName is the corresponding interface of AdsDiscoveryBlockUserName type AdsDiscoveryBlockUserName interface { @@ -46,29 +48,29 @@ type AdsDiscoveryBlockUserNameExactly interface { // _AdsDiscoveryBlockUserName is the data-structure of this message type _AdsDiscoveryBlockUserName struct { *_AdsDiscoveryBlock - UserName AmsString + UserName AmsString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_AdsDiscoveryBlockUserName) GetBlockType() AdsDiscoveryBlockType { - return AdsDiscoveryBlockType_USER_NAME -} +func (m *_AdsDiscoveryBlockUserName) GetBlockType() AdsDiscoveryBlockType { +return AdsDiscoveryBlockType_USER_NAME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AdsDiscoveryBlockUserName) InitializeParent(parent AdsDiscoveryBlock) {} +func (m *_AdsDiscoveryBlockUserName) InitializeParent(parent AdsDiscoveryBlock ) {} -func (m *_AdsDiscoveryBlockUserName) GetParent() AdsDiscoveryBlock { +func (m *_AdsDiscoveryBlockUserName) GetParent() AdsDiscoveryBlock { return m._AdsDiscoveryBlock } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_AdsDiscoveryBlockUserName) GetUserName() AmsString { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAdsDiscoveryBlockUserName factory function for _AdsDiscoveryBlockUserName -func NewAdsDiscoveryBlockUserName(userName AmsString) *_AdsDiscoveryBlockUserName { +func NewAdsDiscoveryBlockUserName( userName AmsString ) *_AdsDiscoveryBlockUserName { _result := &_AdsDiscoveryBlockUserName{ - UserName: userName, - _AdsDiscoveryBlock: NewAdsDiscoveryBlock(), + UserName: userName, + _AdsDiscoveryBlock: NewAdsDiscoveryBlock(), } _result._AdsDiscoveryBlock._AdsDiscoveryBlockChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewAdsDiscoveryBlockUserName(userName AmsString) *_AdsDiscoveryBlockUserNam // Deprecated: use the interface for direct cast func CastAdsDiscoveryBlockUserName(structType interface{}) AdsDiscoveryBlockUserName { - if casted, ok := structType.(AdsDiscoveryBlockUserName); ok { + if casted, ok := structType.(AdsDiscoveryBlockUserName); ok { return casted } if casted, ok := structType.(*AdsDiscoveryBlockUserName); ok { @@ -117,6 +120,7 @@ func (m *_AdsDiscoveryBlockUserName) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_AdsDiscoveryBlockUserName) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func AdsDiscoveryBlockUserNameParseWithBuffer(ctx context.Context, readBuffer ut if pullErr := readBuffer.PullContext("userName"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for userName") } - _userName, _userNameErr := AmsStringParseWithBuffer(ctx, readBuffer) +_userName, _userNameErr := AmsStringParseWithBuffer(ctx, readBuffer) if _userNameErr != nil { return nil, errors.Wrap(_userNameErr, "Error parsing 'userName' field of AdsDiscoveryBlockUserName") } @@ -153,8 +157,9 @@ func AdsDiscoveryBlockUserNameParseWithBuffer(ctx context.Context, readBuffer ut // Create a partially initialized instance _child := &_AdsDiscoveryBlockUserName{ - _AdsDiscoveryBlock: &_AdsDiscoveryBlock{}, - UserName: userName, + _AdsDiscoveryBlock: &_AdsDiscoveryBlock{ + }, + UserName: userName, } _child._AdsDiscoveryBlock._AdsDiscoveryBlockChildRequirements = _child return _child, nil @@ -176,17 +181,17 @@ func (m *_AdsDiscoveryBlockUserName) SerializeWithWriteBuffer(ctx context.Contex return errors.Wrap(pushErr, "Error pushing for AdsDiscoveryBlockUserName") } - // Simple Field (userName) - if pushErr := writeBuffer.PushContext("userName"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for userName") - } - _userNameErr := writeBuffer.WriteSerializable(ctx, m.GetUserName()) - if popErr := writeBuffer.PopContext("userName"); popErr != nil { - return errors.Wrap(popErr, "Error popping for userName") - } - if _userNameErr != nil { - return errors.Wrap(_userNameErr, "Error serializing 'userName' field") - } + // Simple Field (userName) + if pushErr := writeBuffer.PushContext("userName"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for userName") + } + _userNameErr := writeBuffer.WriteSerializable(ctx, m.GetUserName()) + if popErr := writeBuffer.PopContext("userName"); popErr != nil { + return errors.Wrap(popErr, "Error popping for userName") + } + if _userNameErr != nil { + return errors.Wrap(_userNameErr, "Error serializing 'userName' field") + } if popErr := writeBuffer.PopContext("AdsDiscoveryBlockUserName"); popErr != nil { return errors.Wrap(popErr, "Error popping for AdsDiscoveryBlockUserName") @@ -196,6 +201,7 @@ func (m *_AdsDiscoveryBlockUserName) SerializeWithWriteBuffer(ctx context.Contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AdsDiscoveryBlockUserName) isAdsDiscoveryBlockUserName() bool { return true } @@ -210,3 +216,6 @@ func (m *_AdsDiscoveryBlockUserName) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlockVersion.go b/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlockVersion.go index 6da172be9b1..aa85e8dd498 100644 --- a/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlockVersion.go +++ b/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryBlockVersion.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AdsDiscoveryBlockVersion is the corresponding interface of AdsDiscoveryBlockVersion type AdsDiscoveryBlockVersion interface { @@ -46,29 +48,29 @@ type AdsDiscoveryBlockVersionExactly interface { // _AdsDiscoveryBlockVersion is the data-structure of this message type _AdsDiscoveryBlockVersion struct { *_AdsDiscoveryBlock - VersionData []byte + VersionData []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_AdsDiscoveryBlockVersion) GetBlockType() AdsDiscoveryBlockType { - return AdsDiscoveryBlockType_VERSION -} +func (m *_AdsDiscoveryBlockVersion) GetBlockType() AdsDiscoveryBlockType { +return AdsDiscoveryBlockType_VERSION} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AdsDiscoveryBlockVersion) InitializeParent(parent AdsDiscoveryBlock) {} +func (m *_AdsDiscoveryBlockVersion) InitializeParent(parent AdsDiscoveryBlock ) {} -func (m *_AdsDiscoveryBlockVersion) GetParent() AdsDiscoveryBlock { +func (m *_AdsDiscoveryBlockVersion) GetParent() AdsDiscoveryBlock { return m._AdsDiscoveryBlock } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_AdsDiscoveryBlockVersion) GetVersionData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAdsDiscoveryBlockVersion factory function for _AdsDiscoveryBlockVersion -func NewAdsDiscoveryBlockVersion(versionData []byte) *_AdsDiscoveryBlockVersion { +func NewAdsDiscoveryBlockVersion( versionData []byte ) *_AdsDiscoveryBlockVersion { _result := &_AdsDiscoveryBlockVersion{ - VersionData: versionData, - _AdsDiscoveryBlock: NewAdsDiscoveryBlock(), + VersionData: versionData, + _AdsDiscoveryBlock: NewAdsDiscoveryBlock(), } _result._AdsDiscoveryBlock._AdsDiscoveryBlockChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewAdsDiscoveryBlockVersion(versionData []byte) *_AdsDiscoveryBlockVersion // Deprecated: use the interface for direct cast func CastAdsDiscoveryBlockVersion(structType interface{}) AdsDiscoveryBlockVersion { - if casted, ok := structType.(AdsDiscoveryBlockVersion); ok { + if casted, ok := structType.(AdsDiscoveryBlockVersion); ok { return casted } if casted, ok := structType.(*AdsDiscoveryBlockVersion); ok { @@ -122,6 +125,7 @@ func (m *_AdsDiscoveryBlockVersion) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_AdsDiscoveryBlockVersion) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -158,8 +162,9 @@ func AdsDiscoveryBlockVersionParseWithBuffer(ctx context.Context, readBuffer uti // Create a partially initialized instance _child := &_AdsDiscoveryBlockVersion{ - _AdsDiscoveryBlock: &_AdsDiscoveryBlock{}, - VersionData: versionData, + _AdsDiscoveryBlock: &_AdsDiscoveryBlock{ + }, + VersionData: versionData, } _child._AdsDiscoveryBlock._AdsDiscoveryBlockChildRequirements = _child return _child, nil @@ -181,18 +186,18 @@ func (m *_AdsDiscoveryBlockVersion) SerializeWithWriteBuffer(ctx context.Context return errors.Wrap(pushErr, "Error pushing for AdsDiscoveryBlockVersion") } - // Implicit Field (versionDataLen) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - versionDataLen := uint16(uint16(len(m.GetVersionData()))) - _versionDataLenErr := writeBuffer.WriteUint16("versionDataLen", 16, (versionDataLen)) - if _versionDataLenErr != nil { - return errors.Wrap(_versionDataLenErr, "Error serializing 'versionDataLen' field") - } + // Implicit Field (versionDataLen) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) + versionDataLen := uint16(uint16(len(m.GetVersionData()))) + _versionDataLenErr := writeBuffer.WriteUint16("versionDataLen", 16, (versionDataLen)) + if _versionDataLenErr != nil { + return errors.Wrap(_versionDataLenErr, "Error serializing 'versionDataLen' field") + } - // Array Field (versionData) - // Byte Array field (versionData) - if err := writeBuffer.WriteByteArray("versionData", m.GetVersionData()); err != nil { - return errors.Wrap(err, "Error serializing 'versionData' field") - } + // Array Field (versionData) + // Byte Array field (versionData) + if err := writeBuffer.WriteByteArray("versionData", m.GetVersionData()); err != nil { + return errors.Wrap(err, "Error serializing 'versionData' field") + } if popErr := writeBuffer.PopContext("AdsDiscoveryBlockVersion"); popErr != nil { return errors.Wrap(popErr, "Error popping for AdsDiscoveryBlockVersion") @@ -202,6 +207,7 @@ func (m *_AdsDiscoveryBlockVersion) SerializeWithWriteBuffer(ctx context.Context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AdsDiscoveryBlockVersion) isAdsDiscoveryBlockVersion() bool { return true } @@ -216,3 +222,6 @@ func (m *_AdsDiscoveryBlockVersion) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryConstants.go b/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryConstants.go index 129ad043029..2eff0a5bbfe 100644 --- a/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryConstants.go +++ b/plc4go/protocols/ads/discovery/readwrite/model/AdsDiscoveryConstants.go @@ -19,6 +19,7 @@ package model + import ( "context" "fmt" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const AdsDiscoveryConstants_ADSDISCOVERYUDPDEFAULTPORT uint16 = uint16(48899) @@ -48,6 +50,7 @@ type AdsDiscoveryConstantsExactly interface { type _AdsDiscoveryConstants struct { } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for const fields. @@ -62,14 +65,15 @@ func (m *_AdsDiscoveryConstants) GetAdsDiscoveryUdpDefaultPort() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAdsDiscoveryConstants factory function for _AdsDiscoveryConstants -func NewAdsDiscoveryConstants() *_AdsDiscoveryConstants { - return &_AdsDiscoveryConstants{} +func NewAdsDiscoveryConstants( ) *_AdsDiscoveryConstants { +return &_AdsDiscoveryConstants{ } } // Deprecated: use the interface for direct cast func CastAdsDiscoveryConstants(structType interface{}) AdsDiscoveryConstants { - if casted, ok := structType.(AdsDiscoveryConstants); ok { + if casted, ok := structType.(AdsDiscoveryConstants); ok { return casted } if casted, ok := structType.(*AdsDiscoveryConstants); ok { @@ -91,6 +95,7 @@ func (m *_AdsDiscoveryConstants) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_AdsDiscoveryConstants) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +127,8 @@ func AdsDiscoveryConstantsParseWithBuffer(ctx context.Context, readBuffer utils. } // Create the instance - return &_AdsDiscoveryConstants{}, nil + return &_AdsDiscoveryConstants{ + }, nil } func (m *_AdsDiscoveryConstants) Serialize() ([]byte, error) { @@ -136,7 +142,7 @@ func (m *_AdsDiscoveryConstants) Serialize() ([]byte, error) { func (m *_AdsDiscoveryConstants) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("AdsDiscoveryConstants"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("AdsDiscoveryConstants"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for AdsDiscoveryConstants") } @@ -152,6 +158,7 @@ func (m *_AdsDiscoveryConstants) SerializeWithWriteBuffer(ctx context.Context, w return nil } + func (m *_AdsDiscoveryConstants) isAdsDiscoveryConstants() bool { return true } @@ -166,3 +173,6 @@ func (m *_AdsDiscoveryConstants) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/discovery/readwrite/model/AdsPortNumbers.go b/plc4go/protocols/ads/discovery/readwrite/model/AdsPortNumbers.go index 1014429e9f6..743d3c59233 100644 --- a/plc4go/protocols/ads/discovery/readwrite/model/AdsPortNumbers.go +++ b/plc4go/protocols/ads/discovery/readwrite/model/AdsPortNumbers.go @@ -34,27 +34,27 @@ type IAdsPortNumbers interface { utils.Serializable } -const ( - AdsPortNumbers_LOGGER AdsPortNumbers = 100 - AdsPortNumbers_EVENT_LOGGER AdsPortNumbers = 110 - AdsPortNumbers_IO AdsPortNumbers = 300 - AdsPortNumbers_ADDITIONAL_TASK_1 AdsPortNumbers = 301 - AdsPortNumbers_ADDITIONAL_TASK_2 AdsPortNumbers = 302 - AdsPortNumbers_NC AdsPortNumbers = 500 +const( + AdsPortNumbers_LOGGER AdsPortNumbers = 100 + AdsPortNumbers_EVENT_LOGGER AdsPortNumbers = 110 + AdsPortNumbers_IO AdsPortNumbers = 300 + AdsPortNumbers_ADDITIONAL_TASK_1 AdsPortNumbers = 301 + AdsPortNumbers_ADDITIONAL_TASK_2 AdsPortNumbers = 302 + AdsPortNumbers_NC AdsPortNumbers = 500 AdsPortNumbers_PLC_RUNTIME_SYSTEM_1 AdsPortNumbers = 801 AdsPortNumbers_PLC_RUNTIME_SYSTEM_2 AdsPortNumbers = 811 AdsPortNumbers_PLC_RUNTIME_SYSTEM_3 AdsPortNumbers = 821 AdsPortNumbers_PLC_RUNTIME_SYSTEM_4 AdsPortNumbers = 831 - AdsPortNumbers_CAM_SWITCH AdsPortNumbers = 900 - AdsPortNumbers_SYSTEM_SERVICE AdsPortNumbers = 10000 - AdsPortNumbers_SCOPE AdsPortNumbers = 14000 + AdsPortNumbers_CAM_SWITCH AdsPortNumbers = 900 + AdsPortNumbers_SYSTEM_SERVICE AdsPortNumbers = 10000 + AdsPortNumbers_SCOPE AdsPortNumbers = 14000 ) var AdsPortNumbersValues []AdsPortNumbers func init() { _ = errors.New - AdsPortNumbersValues = []AdsPortNumbers{ + AdsPortNumbersValues = []AdsPortNumbers { AdsPortNumbers_LOGGER, AdsPortNumbers_EVENT_LOGGER, AdsPortNumbers_IO, @@ -73,32 +73,32 @@ func init() { func AdsPortNumbersByValue(value uint16) (enum AdsPortNumbers, ok bool) { switch value { - case 100: - return AdsPortNumbers_LOGGER, true - case 10000: - return AdsPortNumbers_SYSTEM_SERVICE, true - case 110: - return AdsPortNumbers_EVENT_LOGGER, true - case 14000: - return AdsPortNumbers_SCOPE, true - case 300: - return AdsPortNumbers_IO, true - case 301: - return AdsPortNumbers_ADDITIONAL_TASK_1, true - case 302: - return AdsPortNumbers_ADDITIONAL_TASK_2, true - case 500: - return AdsPortNumbers_NC, true - case 801: - return AdsPortNumbers_PLC_RUNTIME_SYSTEM_1, true - case 811: - return AdsPortNumbers_PLC_RUNTIME_SYSTEM_2, true - case 821: - return AdsPortNumbers_PLC_RUNTIME_SYSTEM_3, true - case 831: - return AdsPortNumbers_PLC_RUNTIME_SYSTEM_4, true - case 900: - return AdsPortNumbers_CAM_SWITCH, true + case 100: + return AdsPortNumbers_LOGGER, true + case 10000: + return AdsPortNumbers_SYSTEM_SERVICE, true + case 110: + return AdsPortNumbers_EVENT_LOGGER, true + case 14000: + return AdsPortNumbers_SCOPE, true + case 300: + return AdsPortNumbers_IO, true + case 301: + return AdsPortNumbers_ADDITIONAL_TASK_1, true + case 302: + return AdsPortNumbers_ADDITIONAL_TASK_2, true + case 500: + return AdsPortNumbers_NC, true + case 801: + return AdsPortNumbers_PLC_RUNTIME_SYSTEM_1, true + case 811: + return AdsPortNumbers_PLC_RUNTIME_SYSTEM_2, true + case 821: + return AdsPortNumbers_PLC_RUNTIME_SYSTEM_3, true + case 831: + return AdsPortNumbers_PLC_RUNTIME_SYSTEM_4, true + case 900: + return AdsPortNumbers_CAM_SWITCH, true } return 0, false } @@ -135,13 +135,13 @@ func AdsPortNumbersByName(value string) (enum AdsPortNumbers, ok bool) { return 0, false } -func AdsPortNumbersKnows(value uint16) bool { +func AdsPortNumbersKnows(value uint16) bool { for _, typeValue := range AdsPortNumbersValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastAdsPortNumbers(structType interface{}) AdsPortNumbers { @@ -227,3 +227,4 @@ func (e AdsPortNumbers) PLC4XEnumName() string { func (e AdsPortNumbers) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/ads/discovery/readwrite/model/AmsNetId.go b/plc4go/protocols/ads/discovery/readwrite/model/AmsNetId.go index 0a02614385d..3a729269374 100644 --- a/plc4go/protocols/ads/discovery/readwrite/model/AmsNetId.go +++ b/plc4go/protocols/ads/discovery/readwrite/model/AmsNetId.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AmsNetId is the corresponding interface of AmsNetId type AmsNetId interface { @@ -54,14 +56,15 @@ type AmsNetIdExactly interface { // _AmsNetId is the data-structure of this message type _AmsNetId struct { - Octet1 uint8 - Octet2 uint8 - Octet3 uint8 - Octet4 uint8 - Octet5 uint8 - Octet6 uint8 + Octet1 uint8 + Octet2 uint8 + Octet3 uint8 + Octet4 uint8 + Octet5 uint8 + Octet6 uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_AmsNetId) GetOctet6() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAmsNetId factory function for _AmsNetId -func NewAmsNetId(octet1 uint8, octet2 uint8, octet3 uint8, octet4 uint8, octet5 uint8, octet6 uint8) *_AmsNetId { - return &_AmsNetId{Octet1: octet1, Octet2: octet2, Octet3: octet3, Octet4: octet4, Octet5: octet5, Octet6: octet6} +func NewAmsNetId( octet1 uint8 , octet2 uint8 , octet3 uint8 , octet4 uint8 , octet5 uint8 , octet6 uint8 ) *_AmsNetId { +return &_AmsNetId{ Octet1: octet1 , Octet2: octet2 , Octet3: octet3 , Octet4: octet4 , Octet5: octet5 , Octet6: octet6 } } // Deprecated: use the interface for direct cast func CastAmsNetId(structType interface{}) AmsNetId { - if casted, ok := structType.(AmsNetId); ok { + if casted, ok := structType.(AmsNetId); ok { return casted } if casted, ok := structType.(*AmsNetId); ok { @@ -120,26 +124,27 @@ func (m *_AmsNetId) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (octet1) - lengthInBits += 8 + lengthInBits += 8; // Simple field (octet2) - lengthInBits += 8 + lengthInBits += 8; // Simple field (octet3) - lengthInBits += 8 + lengthInBits += 8; // Simple field (octet4) - lengthInBits += 8 + lengthInBits += 8; // Simple field (octet5) - lengthInBits += 8 + lengthInBits += 8; // Simple field (octet6) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_AmsNetId) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -158,42 +163,42 @@ func AmsNetIdParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) ( _ = currentPos // Simple Field (octet1) - _octet1, _octet1Err := readBuffer.ReadUint8("octet1", 8) +_octet1, _octet1Err := readBuffer.ReadUint8("octet1", 8) if _octet1Err != nil { return nil, errors.Wrap(_octet1Err, "Error parsing 'octet1' field of AmsNetId") } octet1 := _octet1 // Simple Field (octet2) - _octet2, _octet2Err := readBuffer.ReadUint8("octet2", 8) +_octet2, _octet2Err := readBuffer.ReadUint8("octet2", 8) if _octet2Err != nil { return nil, errors.Wrap(_octet2Err, "Error parsing 'octet2' field of AmsNetId") } octet2 := _octet2 // Simple Field (octet3) - _octet3, _octet3Err := readBuffer.ReadUint8("octet3", 8) +_octet3, _octet3Err := readBuffer.ReadUint8("octet3", 8) if _octet3Err != nil { return nil, errors.Wrap(_octet3Err, "Error parsing 'octet3' field of AmsNetId") } octet3 := _octet3 // Simple Field (octet4) - _octet4, _octet4Err := readBuffer.ReadUint8("octet4", 8) +_octet4, _octet4Err := readBuffer.ReadUint8("octet4", 8) if _octet4Err != nil { return nil, errors.Wrap(_octet4Err, "Error parsing 'octet4' field of AmsNetId") } octet4 := _octet4 // Simple Field (octet5) - _octet5, _octet5Err := readBuffer.ReadUint8("octet5", 8) +_octet5, _octet5Err := readBuffer.ReadUint8("octet5", 8) if _octet5Err != nil { return nil, errors.Wrap(_octet5Err, "Error parsing 'octet5' field of AmsNetId") } octet5 := _octet5 // Simple Field (octet6) - _octet6, _octet6Err := readBuffer.ReadUint8("octet6", 8) +_octet6, _octet6Err := readBuffer.ReadUint8("octet6", 8) if _octet6Err != nil { return nil, errors.Wrap(_octet6Err, "Error parsing 'octet6' field of AmsNetId") } @@ -205,13 +210,13 @@ func AmsNetIdParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) ( // Create the instance return &_AmsNetId{ - Octet1: octet1, - Octet2: octet2, - Octet3: octet3, - Octet4: octet4, - Octet5: octet5, - Octet6: octet6, - }, nil + Octet1: octet1, + Octet2: octet2, + Octet3: octet3, + Octet4: octet4, + Octet5: octet5, + Octet6: octet6, + }, nil } func (m *_AmsNetId) Serialize() ([]byte, error) { @@ -225,7 +230,7 @@ func (m *_AmsNetId) Serialize() ([]byte, error) { func (m *_AmsNetId) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("AmsNetId"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("AmsNetId"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for AmsNetId") } @@ -277,6 +282,7 @@ func (m *_AmsNetId) SerializeWithWriteBuffer(ctx context.Context, writeBuffer ut return nil } + func (m *_AmsNetId) isAmsNetId() bool { return true } @@ -291,3 +297,6 @@ func (m *_AmsNetId) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/discovery/readwrite/model/AmsString.go b/plc4go/protocols/ads/discovery/readwrite/model/AmsString.go index 3c8114194d6..4cbb5c9b51e 100644 --- a/plc4go/protocols/ads/discovery/readwrite/model/AmsString.go +++ b/plc4go/protocols/ads/discovery/readwrite/model/AmsString.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AmsString is the corresponding interface of AmsString type AmsString interface { @@ -44,11 +46,12 @@ type AmsStringExactly interface { // _AmsString is the data-structure of this message type _AmsString struct { - Text string + Text string // Reserved Fields reservedField0 *uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -63,14 +66,15 @@ func (m *_AmsString) GetText() string { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAmsString factory function for _AmsString -func NewAmsString(text string) *_AmsString { - return &_AmsString{Text: text} +func NewAmsString( text string ) *_AmsString { +return &_AmsString{ Text: text } } // Deprecated: use the interface for direct cast func CastAmsString(structType interface{}) AmsString { - if casted, ok := structType.(AmsString); ok { + if casted, ok := structType.(AmsString); ok { return casted } if casted, ok := structType.(*AmsString); ok { @@ -90,7 +94,7 @@ func (m *_AmsString) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += 16 // Simple field (text) - lengthInBits += uint16(int32(int32(8)) * int32((int32(uint16(uint16(len(m.GetText())))+uint16(uint16(1))) - int32(int32(1))))) + lengthInBits += uint16(int32(int32(8)) * int32((int32(uint16(uint16(len(m.GetText()))) + uint16(uint16(1))) - int32(int32(1))))) // Reserved Field (reserved) lengthInBits += 8 @@ -98,6 +102,7 @@ func (m *_AmsString) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_AmsString) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -123,7 +128,7 @@ func AmsStringParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) } // Simple Field (text) - _text, _textErr := readBuffer.ReadString("text", uint32((8)*((strLen)-(1))), "UTF-8") +_text, _textErr := readBuffer.ReadString("text", uint32(((8)) * (((strLen) - ((1))))), "UTF-8") if _textErr != nil { return nil, errors.Wrap(_textErr, "Error parsing 'text' field of AmsString") } @@ -139,7 +144,7 @@ func AmsStringParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) if reserved != uint8(0x00) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -152,9 +157,9 @@ func AmsStringParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) // Create the instance return &_AmsString{ - Text: text, - reservedField0: reservedField0, - }, nil + Text: text, + reservedField0: reservedField0, + }, nil } func (m *_AmsString) Serialize() ([]byte, error) { @@ -168,7 +173,7 @@ func (m *_AmsString) Serialize() ([]byte, error) { func (m *_AmsString) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("AmsString"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("AmsString"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for AmsString") } @@ -181,7 +186,7 @@ func (m *_AmsString) SerializeWithWriteBuffer(ctx context.Context, writeBuffer u // Simple Field (text) text := string(m.GetText()) - _textErr := writeBuffer.WriteString("text", uint32((8)*((uint16(uint16(len(m.GetText())))+uint16(uint16(1)))-(1))), "UTF-8", (text)) + _textErr := writeBuffer.WriteString("text", uint32(((8)) * (((uint16(uint16(len(m.GetText()))) + uint16(uint16(1))) - ((1))))), "UTF-8", (text)) if _textErr != nil { return errors.Wrap(_textErr, "Error serializing 'text' field") } @@ -192,7 +197,7 @@ func (m *_AmsString) SerializeWithWriteBuffer(ctx context.Context, writeBuffer u if m.reservedField0 != nil { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Overriding reserved field with unexpected value.") reserved = *m.reservedField0 } @@ -208,6 +213,7 @@ func (m *_AmsString) SerializeWithWriteBuffer(ctx context.Context, writeBuffer u return nil } + func (m *_AmsString) isAmsString() bool { return true } @@ -222,3 +228,6 @@ func (m *_AmsString) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/discovery/readwrite/model/Operation.go b/plc4go/protocols/ads/discovery/readwrite/model/Operation.go index 1fdfe30bbf7..c411675acb3 100644 --- a/plc4go/protocols/ads/discovery/readwrite/model/Operation.go +++ b/plc4go/protocols/ads/discovery/readwrite/model/Operation.go @@ -34,22 +34,22 @@ type IOperation interface { utils.Serializable } -const ( - Operation_DISCOVERY_REQUEST Operation = 0x00000001 - Operation_DISCOVERY_RESPONSE Operation = 0x80000001 - Operation_ADD_OR_UPDATE_ROUTE_REQUEST Operation = 0x00000006 +const( + Operation_DISCOVERY_REQUEST Operation = 0x00000001 + Operation_DISCOVERY_RESPONSE Operation = 0x80000001 + Operation_ADD_OR_UPDATE_ROUTE_REQUEST Operation = 0x00000006 Operation_ADD_OR_UPDATE_ROUTE_RESPONSE Operation = 0x80000006 - Operation_DEL_ROUTE_REQUEST Operation = 0x00000007 - Operation_DEL_ROUTE_RESPONSE Operation = 0x80000007 - Operation_UNKNOWN_REQUEST Operation = 0x00000008 - Operation_UNKNOWN_RESPONSE Operation = 0x80000008 + Operation_DEL_ROUTE_REQUEST Operation = 0x00000007 + Operation_DEL_ROUTE_RESPONSE Operation = 0x80000007 + Operation_UNKNOWN_REQUEST Operation = 0x00000008 + Operation_UNKNOWN_RESPONSE Operation = 0x80000008 ) var OperationValues []Operation func init() { _ = errors.New - OperationValues = []Operation{ + OperationValues = []Operation { Operation_DISCOVERY_REQUEST, Operation_DISCOVERY_RESPONSE, Operation_ADD_OR_UPDATE_ROUTE_REQUEST, @@ -63,22 +63,22 @@ func init() { func OperationByValue(value uint32) (enum Operation, ok bool) { switch value { - case 0x00000001: - return Operation_DISCOVERY_REQUEST, true - case 0x00000006: - return Operation_ADD_OR_UPDATE_ROUTE_REQUEST, true - case 0x00000007: - return Operation_DEL_ROUTE_REQUEST, true - case 0x00000008: - return Operation_UNKNOWN_REQUEST, true - case 0x80000001: - return Operation_DISCOVERY_RESPONSE, true - case 0x80000006: - return Operation_ADD_OR_UPDATE_ROUTE_RESPONSE, true - case 0x80000007: - return Operation_DEL_ROUTE_RESPONSE, true - case 0x80000008: - return Operation_UNKNOWN_RESPONSE, true + case 0x00000001: + return Operation_DISCOVERY_REQUEST, true + case 0x00000006: + return Operation_ADD_OR_UPDATE_ROUTE_REQUEST, true + case 0x00000007: + return Operation_DEL_ROUTE_REQUEST, true + case 0x00000008: + return Operation_UNKNOWN_REQUEST, true + case 0x80000001: + return Operation_DISCOVERY_RESPONSE, true + case 0x80000006: + return Operation_ADD_OR_UPDATE_ROUTE_RESPONSE, true + case 0x80000007: + return Operation_DEL_ROUTE_RESPONSE, true + case 0x80000008: + return Operation_UNKNOWN_RESPONSE, true } return 0, false } @@ -105,13 +105,13 @@ func OperationByName(value string) (enum Operation, ok bool) { return 0, false } -func OperationKnows(value uint32) bool { +func OperationKnows(value uint32) bool { for _, typeValue := range OperationValues { if uint32(typeValue) == value { return true } } - return false + return false; } func CastOperation(structType interface{}) Operation { @@ -187,3 +187,4 @@ func (e Operation) PLC4XEnumName() string { func (e Operation) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/ads/discovery/readwrite/model/Status.go b/plc4go/protocols/ads/discovery/readwrite/model/Status.go index 8094ed3bb8b..a620545b2f5 100644 --- a/plc4go/protocols/ads/discovery/readwrite/model/Status.go +++ b/plc4go/protocols/ads/discovery/readwrite/model/Status.go @@ -34,8 +34,8 @@ type IStatus interface { utils.Serializable } -const ( - Status_SUCCESS Status = 0x00000000 +const( + Status_SUCCESS Status = 0x00000000 Status_FAILURE_INVALID_DATA Status = 0x00000704 Status_FAILURE_MISSING_DATA Status = 0x00000706 ) @@ -44,7 +44,7 @@ var StatusValues []Status func init() { _ = errors.New - StatusValues = []Status{ + StatusValues = []Status { Status_SUCCESS, Status_FAILURE_INVALID_DATA, Status_FAILURE_MISSING_DATA, @@ -53,12 +53,12 @@ func init() { func StatusByValue(value uint32) (enum Status, ok bool) { switch value { - case 0x00000000: - return Status_SUCCESS, true - case 0x00000704: - return Status_FAILURE_INVALID_DATA, true - case 0x00000706: - return Status_FAILURE_MISSING_DATA, true + case 0x00000000: + return Status_SUCCESS, true + case 0x00000704: + return Status_FAILURE_INVALID_DATA, true + case 0x00000706: + return Status_FAILURE_MISSING_DATA, true } return 0, false } @@ -75,13 +75,13 @@ func StatusByName(value string) (enum Status, ok bool) { return 0, false } -func StatusKnows(value uint32) bool { +func StatusKnows(value uint32) bool { for _, typeValue := range StatusValues { if uint32(typeValue) == value { return true } } - return false + return false; } func CastStatus(structType interface{}) Status { @@ -147,3 +147,4 @@ func (e Status) PLC4XEnumName() string { func (e Status) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/ads/discovery/readwrite/model/plc4x_common.go b/plc4go/protocols/ads/discovery/readwrite/model/plc4x_common.go index d2d66e8bdd3..42166d94e68 100644 --- a/plc4go/protocols/ads/discovery/readwrite/model/plc4x_common.go +++ b/plc4go/protocols/ads/discovery/readwrite/model/plc4x_common.go @@ -15,7 +15,7 @@ * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - */ +*/ package model @@ -25,3 +25,4 @@ import "github.com/rs/zerolog/log" // Plc4xModelLog is the Logger used by the Parse/Serialize methods var Plc4xModelLog = &log.Logger + diff --git a/plc4go/protocols/ads/readwrite/ParserHelper.go b/plc4go/protocols/ads/readwrite/ParserHelper.go index cec94298e36..9cb42b4bb53 100644 --- a/plc4go/protocols/ads/readwrite/ParserHelper.go +++ b/plc4go/protocols/ads/readwrite/ParserHelper.go @@ -37,7 +37,7 @@ func (m AdsParserHelper) Parse(typeName string, arguments []string, io utils.Rea case "AmsSerialFrame": return model.AmsSerialFrameParseWithBuffer(context.Background(), io) case "DataItem": - plcValueType, _ := model.PlcValueTypeByName(arguments[0]) + plcValueType, _ := model.PlcValueTypeByName(arguments[0]) stringLength, err := utils.StrToInt32(arguments[1]) if err != nil { return nil, errors.Wrap(err, "Error parsing") diff --git a/plc4go/protocols/ads/readwrite/XmlParserHelper.go b/plc4go/protocols/ads/readwrite/XmlParserHelper.go index 286ba1c17ea..46a7cd0dddb 100644 --- a/plc4go/protocols/ads/readwrite/XmlParserHelper.go +++ b/plc4go/protocols/ads/readwrite/XmlParserHelper.go @@ -21,8 +21,8 @@ package readwrite import ( "context" - "strconv" "strings" + "strconv" "github.com/apache/plc4x/plc4go/protocols/ads/readwrite/model" "github.com/apache/plc4x/plc4go/spi/utils" @@ -43,50 +43,50 @@ func init() { } func (m AdsXmlParserHelper) Parse(typeName string, xmlString string, parserArguments ...string) (interface{}, error) { - switch typeName { - case "AmsSerialFrame": - return model.AmsSerialFrameParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "DataItem": - plcValueType, _ := model.PlcValueTypeByName(parserArguments[0]) - parsedInt1, err := strconv.ParseInt(parserArguments[1], 10, 32) - if err != nil { - return nil, err - } - stringLength := int32(parsedInt1) - return model.DataItemParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), plcValueType, stringLength) - case "AdsTableSizes": - return model.AdsTableSizesParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "AdsMultiRequestItem": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 32) - if err != nil { - return nil, err - } - indexGroup := uint32(parsedUint0) - return model.AdsMultiRequestItemParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), indexGroup) - case "AmsSerialAcknowledgeFrame": - return model.AmsSerialAcknowledgeFrameParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "AdsDataTypeArrayInfo": - return model.AdsDataTypeArrayInfoParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "AdsDataTypeTableEntry": - return model.AdsDataTypeTableEntryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "AmsNetId": - return model.AmsNetIdParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "AdsStampHeader": - return model.AdsStampHeaderParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "AmsSerialResetFrame": - return model.AmsSerialResetFrameParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "AdsDataTypeTableChildEntry": - return model.AdsDataTypeTableChildEntryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "AdsConstants": - return model.AdsConstantsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "AdsNotificationSample": - return model.AdsNotificationSampleParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "AdsSymbolTableEntry": - return model.AdsSymbolTableEntryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "AmsTCPPacket": - return model.AmsTCPPacketParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "AmsPacket": - return model.AmsPacketParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - } - return nil, errors.Errorf("Unsupported type %s", typeName) + switch typeName { + case "AmsSerialFrame": + return model.AmsSerialFrameParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "DataItem": + plcValueType, _ := model.PlcValueTypeByName(parserArguments[0]) + parsedInt1, err := strconv.ParseInt(parserArguments[1], 10, 32) + if err!=nil { + return nil, err + } + stringLength := int32(parsedInt1) + return model.DataItemParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), plcValueType, stringLength ) + case "AdsTableSizes": + return model.AdsTableSizesParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "AdsMultiRequestItem": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 32) + if err!=nil { + return nil, err + } + indexGroup := uint32(parsedUint0) + return model.AdsMultiRequestItemParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), indexGroup ) + case "AmsSerialAcknowledgeFrame": + return model.AmsSerialAcknowledgeFrameParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "AdsDataTypeArrayInfo": + return model.AdsDataTypeArrayInfoParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "AdsDataTypeTableEntry": + return model.AdsDataTypeTableEntryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "AmsNetId": + return model.AmsNetIdParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "AdsStampHeader": + return model.AdsStampHeaderParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "AmsSerialResetFrame": + return model.AmsSerialResetFrameParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "AdsDataTypeTableChildEntry": + return model.AdsDataTypeTableChildEntryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "AdsConstants": + return model.AdsConstantsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "AdsNotificationSample": + return model.AdsNotificationSampleParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "AdsSymbolTableEntry": + return model.AdsSymbolTableEntryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "AmsTCPPacket": + return model.AmsTCPPacketParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "AmsPacket": + return model.AmsPacketParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + } + return nil, errors.Errorf("Unsupported type %s", typeName) } diff --git a/plc4go/protocols/ads/readwrite/model/AdsAddDeviceNotificationRequest.go b/plc4go/protocols/ads/readwrite/model/AdsAddDeviceNotificationRequest.go index 87afa57e068..14aeab237d4 100644 --- a/plc4go/protocols/ads/readwrite/model/AdsAddDeviceNotificationRequest.go +++ b/plc4go/protocols/ads/readwrite/model/AdsAddDeviceNotificationRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AdsAddDeviceNotificationRequest is the corresponding interface of AdsAddDeviceNotificationRequest type AdsAddDeviceNotificationRequest interface { @@ -56,37 +58,36 @@ type AdsAddDeviceNotificationRequestExactly interface { // _AdsAddDeviceNotificationRequest is the data-structure of this message type _AdsAddDeviceNotificationRequest struct { *_AmsPacket - IndexGroup uint32 - IndexOffset uint32 - Length uint32 - TransmissionMode AdsTransMode - MaxDelayInMs uint32 - CycleTimeInMs uint32 + IndexGroup uint32 + IndexOffset uint32 + Length uint32 + TransmissionMode AdsTransMode + MaxDelayInMs uint32 + CycleTimeInMs uint32 // Reserved Fields reservedField0 *uint64 reservedField1 *uint64 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_AdsAddDeviceNotificationRequest) GetCommandId() CommandId { - return CommandId_ADS_ADD_DEVICE_NOTIFICATION -} +func (m *_AdsAddDeviceNotificationRequest) GetCommandId() CommandId { +return CommandId_ADS_ADD_DEVICE_NOTIFICATION} -func (m *_AdsAddDeviceNotificationRequest) GetResponse() bool { - return bool(false) -} +func (m *_AdsAddDeviceNotificationRequest) GetResponse() bool { +return bool(false)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AdsAddDeviceNotificationRequest) InitializeParent(parent AmsPacket, targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) { - m.TargetAmsNetId = targetAmsNetId +func (m *_AdsAddDeviceNotificationRequest) InitializeParent(parent AmsPacket , targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) { m.TargetAmsNetId = targetAmsNetId m.TargetAmsPort = targetAmsPort m.SourceAmsNetId = sourceAmsNetId m.SourceAmsPort = sourceAmsPort @@ -94,10 +95,9 @@ func (m *_AdsAddDeviceNotificationRequest) InitializeParent(parent AmsPacket, ta m.InvokeId = invokeId } -func (m *_AdsAddDeviceNotificationRequest) GetParent() AmsPacket { +func (m *_AdsAddDeviceNotificationRequest) GetParent() AmsPacket { return m._AmsPacket } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -132,16 +132,17 @@ func (m *_AdsAddDeviceNotificationRequest) GetCycleTimeInMs() uint32 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAdsAddDeviceNotificationRequest factory function for _AdsAddDeviceNotificationRequest -func NewAdsAddDeviceNotificationRequest(indexGroup uint32, indexOffset uint32, length uint32, transmissionMode AdsTransMode, maxDelayInMs uint32, cycleTimeInMs uint32, targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) *_AdsAddDeviceNotificationRequest { +func NewAdsAddDeviceNotificationRequest( indexGroup uint32 , indexOffset uint32 , length uint32 , transmissionMode AdsTransMode , maxDelayInMs uint32 , cycleTimeInMs uint32 , targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) *_AdsAddDeviceNotificationRequest { _result := &_AdsAddDeviceNotificationRequest{ - IndexGroup: indexGroup, - IndexOffset: indexOffset, - Length: length, + IndexGroup: indexGroup, + IndexOffset: indexOffset, + Length: length, TransmissionMode: transmissionMode, - MaxDelayInMs: maxDelayInMs, - CycleTimeInMs: cycleTimeInMs, - _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), + MaxDelayInMs: maxDelayInMs, + CycleTimeInMs: cycleTimeInMs, + _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), } _result._AmsPacket._AmsPacketChildRequirements = _result return _result @@ -149,7 +150,7 @@ func NewAdsAddDeviceNotificationRequest(indexGroup uint32, indexOffset uint32, l // Deprecated: use the interface for direct cast func CastAdsAddDeviceNotificationRequest(structType interface{}) AdsAddDeviceNotificationRequest { - if casted, ok := structType.(AdsAddDeviceNotificationRequest); ok { + if casted, ok := structType.(AdsAddDeviceNotificationRequest); ok { return casted } if casted, ok := structType.(*AdsAddDeviceNotificationRequest); ok { @@ -166,22 +167,22 @@ func (m *_AdsAddDeviceNotificationRequest) GetLengthInBits(ctx context.Context) lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (indexGroup) - lengthInBits += 32 + lengthInBits += 32; // Simple field (indexOffset) - lengthInBits += 32 + lengthInBits += 32; // Simple field (length) - lengthInBits += 32 + lengthInBits += 32; // Simple field (transmissionMode) lengthInBits += 32 // Simple field (maxDelayInMs) - lengthInBits += 32 + lengthInBits += 32; // Simple field (cycleTimeInMs) - lengthInBits += 32 + lengthInBits += 32; // Reserved Field (reserved) lengthInBits += 64 @@ -192,6 +193,7 @@ func (m *_AdsAddDeviceNotificationRequest) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_AdsAddDeviceNotificationRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -210,21 +212,21 @@ func AdsAddDeviceNotificationRequestParseWithBuffer(ctx context.Context, readBuf _ = currentPos // Simple Field (indexGroup) - _indexGroup, _indexGroupErr := readBuffer.ReadUint32("indexGroup", 32) +_indexGroup, _indexGroupErr := readBuffer.ReadUint32("indexGroup", 32) if _indexGroupErr != nil { return nil, errors.Wrap(_indexGroupErr, "Error parsing 'indexGroup' field of AdsAddDeviceNotificationRequest") } indexGroup := _indexGroup // Simple Field (indexOffset) - _indexOffset, _indexOffsetErr := readBuffer.ReadUint32("indexOffset", 32) +_indexOffset, _indexOffsetErr := readBuffer.ReadUint32("indexOffset", 32) if _indexOffsetErr != nil { return nil, errors.Wrap(_indexOffsetErr, "Error parsing 'indexOffset' field of AdsAddDeviceNotificationRequest") } indexOffset := _indexOffset // Simple Field (length) - _length, _lengthErr := readBuffer.ReadUint32("length", 32) +_length, _lengthErr := readBuffer.ReadUint32("length", 32) if _lengthErr != nil { return nil, errors.Wrap(_lengthErr, "Error parsing 'length' field of AdsAddDeviceNotificationRequest") } @@ -234,7 +236,7 @@ func AdsAddDeviceNotificationRequestParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("transmissionMode"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for transmissionMode") } - _transmissionMode, _transmissionModeErr := AdsTransModeParseWithBuffer(ctx, readBuffer) +_transmissionMode, _transmissionModeErr := AdsTransModeParseWithBuffer(ctx, readBuffer) if _transmissionModeErr != nil { return nil, errors.Wrap(_transmissionModeErr, "Error parsing 'transmissionMode' field of AdsAddDeviceNotificationRequest") } @@ -244,14 +246,14 @@ func AdsAddDeviceNotificationRequestParseWithBuffer(ctx context.Context, readBuf } // Simple Field (maxDelayInMs) - _maxDelayInMs, _maxDelayInMsErr := readBuffer.ReadUint32("maxDelayInMs", 32) +_maxDelayInMs, _maxDelayInMsErr := readBuffer.ReadUint32("maxDelayInMs", 32) if _maxDelayInMsErr != nil { return nil, errors.Wrap(_maxDelayInMsErr, "Error parsing 'maxDelayInMs' field of AdsAddDeviceNotificationRequest") } maxDelayInMs := _maxDelayInMs // Simple Field (cycleTimeInMs) - _cycleTimeInMs, _cycleTimeInMsErr := readBuffer.ReadUint32("cycleTimeInMs", 32) +_cycleTimeInMs, _cycleTimeInMsErr := readBuffer.ReadUint32("cycleTimeInMs", 32) if _cycleTimeInMsErr != nil { return nil, errors.Wrap(_cycleTimeInMsErr, "Error parsing 'cycleTimeInMs' field of AdsAddDeviceNotificationRequest") } @@ -267,7 +269,7 @@ func AdsAddDeviceNotificationRequestParseWithBuffer(ctx context.Context, readBuf if reserved != uint64(0x0000) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint64(0x0000), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -284,7 +286,7 @@ func AdsAddDeviceNotificationRequestParseWithBuffer(ctx context.Context, readBuf if reserved != uint64(0x0000) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint64(0x0000), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField1 = &reserved @@ -297,15 +299,16 @@ func AdsAddDeviceNotificationRequestParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_AdsAddDeviceNotificationRequest{ - _AmsPacket: &_AmsPacket{}, - IndexGroup: indexGroup, - IndexOffset: indexOffset, - Length: length, + _AmsPacket: &_AmsPacket{ + }, + IndexGroup: indexGroup, + IndexOffset: indexOffset, + Length: length, TransmissionMode: transmissionMode, - MaxDelayInMs: maxDelayInMs, - CycleTimeInMs: cycleTimeInMs, - reservedField0: reservedField0, - reservedField1: reservedField1, + MaxDelayInMs: maxDelayInMs, + CycleTimeInMs: cycleTimeInMs, + reservedField0: reservedField0, + reservedField1: reservedField1, } _child._AmsPacket._AmsPacketChildRequirements = _child return _child, nil @@ -327,84 +330,84 @@ func (m *_AdsAddDeviceNotificationRequest) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for AdsAddDeviceNotificationRequest") } - // Simple Field (indexGroup) - indexGroup := uint32(m.GetIndexGroup()) - _indexGroupErr := writeBuffer.WriteUint32("indexGroup", 32, (indexGroup)) - if _indexGroupErr != nil { - return errors.Wrap(_indexGroupErr, "Error serializing 'indexGroup' field") - } + // Simple Field (indexGroup) + indexGroup := uint32(m.GetIndexGroup()) + _indexGroupErr := writeBuffer.WriteUint32("indexGroup", 32, (indexGroup)) + if _indexGroupErr != nil { + return errors.Wrap(_indexGroupErr, "Error serializing 'indexGroup' field") + } - // Simple Field (indexOffset) - indexOffset := uint32(m.GetIndexOffset()) - _indexOffsetErr := writeBuffer.WriteUint32("indexOffset", 32, (indexOffset)) - if _indexOffsetErr != nil { - return errors.Wrap(_indexOffsetErr, "Error serializing 'indexOffset' field") - } + // Simple Field (indexOffset) + indexOffset := uint32(m.GetIndexOffset()) + _indexOffsetErr := writeBuffer.WriteUint32("indexOffset", 32, (indexOffset)) + if _indexOffsetErr != nil { + return errors.Wrap(_indexOffsetErr, "Error serializing 'indexOffset' field") + } - // Simple Field (length) - length := uint32(m.GetLength()) - _lengthErr := writeBuffer.WriteUint32("length", 32, (length)) - if _lengthErr != nil { - return errors.Wrap(_lengthErr, "Error serializing 'length' field") - } + // Simple Field (length) + length := uint32(m.GetLength()) + _lengthErr := writeBuffer.WriteUint32("length", 32, (length)) + if _lengthErr != nil { + return errors.Wrap(_lengthErr, "Error serializing 'length' field") + } - // Simple Field (transmissionMode) - if pushErr := writeBuffer.PushContext("transmissionMode"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for transmissionMode") - } - _transmissionModeErr := writeBuffer.WriteSerializable(ctx, m.GetTransmissionMode()) - if popErr := writeBuffer.PopContext("transmissionMode"); popErr != nil { - return errors.Wrap(popErr, "Error popping for transmissionMode") - } - if _transmissionModeErr != nil { - return errors.Wrap(_transmissionModeErr, "Error serializing 'transmissionMode' field") - } + // Simple Field (transmissionMode) + if pushErr := writeBuffer.PushContext("transmissionMode"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for transmissionMode") + } + _transmissionModeErr := writeBuffer.WriteSerializable(ctx, m.GetTransmissionMode()) + if popErr := writeBuffer.PopContext("transmissionMode"); popErr != nil { + return errors.Wrap(popErr, "Error popping for transmissionMode") + } + if _transmissionModeErr != nil { + return errors.Wrap(_transmissionModeErr, "Error serializing 'transmissionMode' field") + } - // Simple Field (maxDelayInMs) - maxDelayInMs := uint32(m.GetMaxDelayInMs()) - _maxDelayInMsErr := writeBuffer.WriteUint32("maxDelayInMs", 32, (maxDelayInMs)) - if _maxDelayInMsErr != nil { - return errors.Wrap(_maxDelayInMsErr, "Error serializing 'maxDelayInMs' field") - } + // Simple Field (maxDelayInMs) + maxDelayInMs := uint32(m.GetMaxDelayInMs()) + _maxDelayInMsErr := writeBuffer.WriteUint32("maxDelayInMs", 32, (maxDelayInMs)) + if _maxDelayInMsErr != nil { + return errors.Wrap(_maxDelayInMsErr, "Error serializing 'maxDelayInMs' field") + } - // Simple Field (cycleTimeInMs) - cycleTimeInMs := uint32(m.GetCycleTimeInMs()) - _cycleTimeInMsErr := writeBuffer.WriteUint32("cycleTimeInMs", 32, (cycleTimeInMs)) - if _cycleTimeInMsErr != nil { - return errors.Wrap(_cycleTimeInMsErr, "Error serializing 'cycleTimeInMs' field") - } + // Simple Field (cycleTimeInMs) + cycleTimeInMs := uint32(m.GetCycleTimeInMs()) + _cycleTimeInMsErr := writeBuffer.WriteUint32("cycleTimeInMs", 32, (cycleTimeInMs)) + if _cycleTimeInMsErr != nil { + return errors.Wrap(_cycleTimeInMsErr, "Error serializing 'cycleTimeInMs' field") + } - // Reserved Field (reserved) - { - var reserved uint64 = uint64(0x0000) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint64(0x0000), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteUint64("reserved", 64, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + // Reserved Field (reserved) + { + var reserved uint64 = uint64(0x0000) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint64(0x0000), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 + } + _err := writeBuffer.WriteUint64("reserved", 64, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } - // Reserved Field (reserved) - { - var reserved uint64 = uint64(0x0000) - if m.reservedField1 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint64(0x0000), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField1 - } - _err := writeBuffer.WriteUint64("reserved", 64, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + // Reserved Field (reserved) + { + var reserved uint64 = uint64(0x0000) + if m.reservedField1 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint64(0x0000), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField1 } + _err := writeBuffer.WriteUint64("reserved", 64, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") + } + } if popErr := writeBuffer.PopContext("AdsAddDeviceNotificationRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for AdsAddDeviceNotificationRequest") @@ -414,6 +417,7 @@ func (m *_AdsAddDeviceNotificationRequest) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AdsAddDeviceNotificationRequest) isAdsAddDeviceNotificationRequest() bool { return true } @@ -428,3 +432,6 @@ func (m *_AdsAddDeviceNotificationRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/readwrite/model/AdsAddDeviceNotificationResponse.go b/plc4go/protocols/ads/readwrite/model/AdsAddDeviceNotificationResponse.go index 34bdf7c7210..d92a01cb3d3 100644 --- a/plc4go/protocols/ads/readwrite/model/AdsAddDeviceNotificationResponse.go +++ b/plc4go/protocols/ads/readwrite/model/AdsAddDeviceNotificationResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AdsAddDeviceNotificationResponse is the corresponding interface of AdsAddDeviceNotificationResponse type AdsAddDeviceNotificationResponse interface { @@ -48,30 +50,29 @@ type AdsAddDeviceNotificationResponseExactly interface { // _AdsAddDeviceNotificationResponse is the data-structure of this message type _AdsAddDeviceNotificationResponse struct { *_AmsPacket - Result ReturnCode - NotificationHandle uint32 + Result ReturnCode + NotificationHandle uint32 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_AdsAddDeviceNotificationResponse) GetCommandId() CommandId { - return CommandId_ADS_ADD_DEVICE_NOTIFICATION -} +func (m *_AdsAddDeviceNotificationResponse) GetCommandId() CommandId { +return CommandId_ADS_ADD_DEVICE_NOTIFICATION} -func (m *_AdsAddDeviceNotificationResponse) GetResponse() bool { - return bool(true) -} +func (m *_AdsAddDeviceNotificationResponse) GetResponse() bool { +return bool(true)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AdsAddDeviceNotificationResponse) InitializeParent(parent AmsPacket, targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) { - m.TargetAmsNetId = targetAmsNetId +func (m *_AdsAddDeviceNotificationResponse) InitializeParent(parent AmsPacket , targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) { m.TargetAmsNetId = targetAmsNetId m.TargetAmsPort = targetAmsPort m.SourceAmsNetId = sourceAmsNetId m.SourceAmsPort = sourceAmsPort @@ -79,10 +80,9 @@ func (m *_AdsAddDeviceNotificationResponse) InitializeParent(parent AmsPacket, t m.InvokeId = invokeId } -func (m *_AdsAddDeviceNotificationResponse) GetParent() AmsPacket { +func (m *_AdsAddDeviceNotificationResponse) GetParent() AmsPacket { return m._AmsPacket } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -101,12 +101,13 @@ func (m *_AdsAddDeviceNotificationResponse) GetNotificationHandle() uint32 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAdsAddDeviceNotificationResponse factory function for _AdsAddDeviceNotificationResponse -func NewAdsAddDeviceNotificationResponse(result ReturnCode, notificationHandle uint32, targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) *_AdsAddDeviceNotificationResponse { +func NewAdsAddDeviceNotificationResponse( result ReturnCode , notificationHandle uint32 , targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) *_AdsAddDeviceNotificationResponse { _result := &_AdsAddDeviceNotificationResponse{ - Result: result, + Result: result, NotificationHandle: notificationHandle, - _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), + _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), } _result._AmsPacket._AmsPacketChildRequirements = _result return _result @@ -114,7 +115,7 @@ func NewAdsAddDeviceNotificationResponse(result ReturnCode, notificationHandle u // Deprecated: use the interface for direct cast func CastAdsAddDeviceNotificationResponse(structType interface{}) AdsAddDeviceNotificationResponse { - if casted, ok := structType.(AdsAddDeviceNotificationResponse); ok { + if casted, ok := structType.(AdsAddDeviceNotificationResponse); ok { return casted } if casted, ok := structType.(*AdsAddDeviceNotificationResponse); ok { @@ -134,11 +135,12 @@ func (m *_AdsAddDeviceNotificationResponse) GetLengthInBits(ctx context.Context) lengthInBits += 32 // Simple field (notificationHandle) - lengthInBits += 32 + lengthInBits += 32; return lengthInBits } + func (m *_AdsAddDeviceNotificationResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -160,7 +162,7 @@ func AdsAddDeviceNotificationResponseParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("result"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for result") } - _result, _resultErr := ReturnCodeParseWithBuffer(ctx, readBuffer) +_result, _resultErr := ReturnCodeParseWithBuffer(ctx, readBuffer) if _resultErr != nil { return nil, errors.Wrap(_resultErr, "Error parsing 'result' field of AdsAddDeviceNotificationResponse") } @@ -170,7 +172,7 @@ func AdsAddDeviceNotificationResponseParseWithBuffer(ctx context.Context, readBu } // Simple Field (notificationHandle) - _notificationHandle, _notificationHandleErr := readBuffer.ReadUint32("notificationHandle", 32) +_notificationHandle, _notificationHandleErr := readBuffer.ReadUint32("notificationHandle", 32) if _notificationHandleErr != nil { return nil, errors.Wrap(_notificationHandleErr, "Error parsing 'notificationHandle' field of AdsAddDeviceNotificationResponse") } @@ -182,8 +184,9 @@ func AdsAddDeviceNotificationResponseParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_AdsAddDeviceNotificationResponse{ - _AmsPacket: &_AmsPacket{}, - Result: result, + _AmsPacket: &_AmsPacket{ + }, + Result: result, NotificationHandle: notificationHandle, } _child._AmsPacket._AmsPacketChildRequirements = _child @@ -206,24 +209,24 @@ func (m *_AdsAddDeviceNotificationResponse) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for AdsAddDeviceNotificationResponse") } - // Simple Field (result) - if pushErr := writeBuffer.PushContext("result"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for result") - } - _resultErr := writeBuffer.WriteSerializable(ctx, m.GetResult()) - if popErr := writeBuffer.PopContext("result"); popErr != nil { - return errors.Wrap(popErr, "Error popping for result") - } - if _resultErr != nil { - return errors.Wrap(_resultErr, "Error serializing 'result' field") - } + // Simple Field (result) + if pushErr := writeBuffer.PushContext("result"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for result") + } + _resultErr := writeBuffer.WriteSerializable(ctx, m.GetResult()) + if popErr := writeBuffer.PopContext("result"); popErr != nil { + return errors.Wrap(popErr, "Error popping for result") + } + if _resultErr != nil { + return errors.Wrap(_resultErr, "Error serializing 'result' field") + } - // Simple Field (notificationHandle) - notificationHandle := uint32(m.GetNotificationHandle()) - _notificationHandleErr := writeBuffer.WriteUint32("notificationHandle", 32, (notificationHandle)) - if _notificationHandleErr != nil { - return errors.Wrap(_notificationHandleErr, "Error serializing 'notificationHandle' field") - } + // Simple Field (notificationHandle) + notificationHandle := uint32(m.GetNotificationHandle()) + _notificationHandleErr := writeBuffer.WriteUint32("notificationHandle", 32, (notificationHandle)) + if _notificationHandleErr != nil { + return errors.Wrap(_notificationHandleErr, "Error serializing 'notificationHandle' field") + } if popErr := writeBuffer.PopContext("AdsAddDeviceNotificationResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for AdsAddDeviceNotificationResponse") @@ -233,6 +236,7 @@ func (m *_AdsAddDeviceNotificationResponse) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AdsAddDeviceNotificationResponse) isAdsAddDeviceNotificationResponse() bool { return true } @@ -247,3 +251,6 @@ func (m *_AdsAddDeviceNotificationResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/readwrite/model/AdsConstants.go b/plc4go/protocols/ads/readwrite/model/AdsConstants.go index 8cc77a6369b..e7095dfeb0f 100644 --- a/plc4go/protocols/ads/readwrite/model/AdsConstants.go +++ b/plc4go/protocols/ads/readwrite/model/AdsConstants.go @@ -19,6 +19,7 @@ package model + import ( "context" "fmt" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const AdsConstants_ADSTCPDEFAULTPORT uint16 = uint16(48898) @@ -48,6 +50,7 @@ type AdsConstantsExactly interface { type _AdsConstants struct { } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for const fields. @@ -62,14 +65,15 @@ func (m *_AdsConstants) GetAdsTcpDefaultPort() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAdsConstants factory function for _AdsConstants -func NewAdsConstants() *_AdsConstants { - return &_AdsConstants{} +func NewAdsConstants( ) *_AdsConstants { +return &_AdsConstants{ } } // Deprecated: use the interface for direct cast func CastAdsConstants(structType interface{}) AdsConstants { - if casted, ok := structType.(AdsConstants); ok { + if casted, ok := structType.(AdsConstants); ok { return casted } if casted, ok := structType.(*AdsConstants); ok { @@ -91,6 +95,7 @@ func (m *_AdsConstants) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_AdsConstants) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +127,8 @@ func AdsConstantsParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe } // Create the instance - return &_AdsConstants{}, nil + return &_AdsConstants{ + }, nil } func (m *_AdsConstants) Serialize() ([]byte, error) { @@ -136,7 +142,7 @@ func (m *_AdsConstants) Serialize() ([]byte, error) { func (m *_AdsConstants) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("AdsConstants"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("AdsConstants"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for AdsConstants") } @@ -152,6 +158,7 @@ func (m *_AdsConstants) SerializeWithWriteBuffer(ctx context.Context, writeBuffe return nil } + func (m *_AdsConstants) isAdsConstants() bool { return true } @@ -166,3 +173,6 @@ func (m *_AdsConstants) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/readwrite/model/AdsDataType.go b/plc4go/protocols/ads/readwrite/model/AdsDataType.go index ff367111e80..c9d38f3e6cf 100644 --- a/plc4go/protocols/ads/readwrite/model/AdsDataType.go +++ b/plc4go/protocols/ads/readwrite/model/AdsDataType.go @@ -36,54 +36,54 @@ type IAdsDataType interface { PlcValueType() PlcValueType } -const ( - AdsDataType_BOOL AdsDataType = 0x01 - AdsDataType_BIT AdsDataType = 0x02 - AdsDataType_BIT8 AdsDataType = 0x03 - AdsDataType_BYTE AdsDataType = 0x04 - AdsDataType_BITARR8 AdsDataType = 0x05 - AdsDataType_WORD AdsDataType = 0x06 - AdsDataType_BITARR16 AdsDataType = 0x07 - AdsDataType_DWORD AdsDataType = 0x08 - AdsDataType_BITARR32 AdsDataType = 0x09 - AdsDataType_SINT AdsDataType = 0x0A - AdsDataType_INT8 AdsDataType = 0x0B - AdsDataType_USINT AdsDataType = 0x0C - AdsDataType_UINT8 AdsDataType = 0x0D - AdsDataType_INT AdsDataType = 0x0E - AdsDataType_INT16 AdsDataType = 0x0F - AdsDataType_UINT AdsDataType = 0x10 - AdsDataType_UINT16 AdsDataType = 0x11 - AdsDataType_DINT AdsDataType = 0x12 - AdsDataType_INT32 AdsDataType = 0x13 - AdsDataType_UDINT AdsDataType = 0x14 - AdsDataType_UINT32 AdsDataType = 0x15 - AdsDataType_LINT AdsDataType = 0x16 - AdsDataType_INT64 AdsDataType = 0x17 - AdsDataType_ULINT AdsDataType = 0x18 - AdsDataType_UINT64 AdsDataType = 0x19 - AdsDataType_REAL AdsDataType = 0x1A - AdsDataType_FLOAT AdsDataType = 0x1B - AdsDataType_LREAL AdsDataType = 0x1C - AdsDataType_DOUBLE AdsDataType = 0x1D - AdsDataType_CHAR AdsDataType = 0x1E - AdsDataType_WCHAR AdsDataType = 0x1F - AdsDataType_STRING AdsDataType = 0x20 - AdsDataType_WSTRING AdsDataType = 0x21 - AdsDataType_TIME AdsDataType = 0x22 - AdsDataType_LTIME AdsDataType = 0x23 - AdsDataType_DATE AdsDataType = 0x24 - AdsDataType_TIME_OF_DAY AdsDataType = 0x25 - AdsDataType_TOD AdsDataType = 0x26 +const( + AdsDataType_BOOL AdsDataType = 0x01 + AdsDataType_BIT AdsDataType = 0x02 + AdsDataType_BIT8 AdsDataType = 0x03 + AdsDataType_BYTE AdsDataType = 0x04 + AdsDataType_BITARR8 AdsDataType = 0x05 + AdsDataType_WORD AdsDataType = 0x06 + AdsDataType_BITARR16 AdsDataType = 0x07 + AdsDataType_DWORD AdsDataType = 0x08 + AdsDataType_BITARR32 AdsDataType = 0x09 + AdsDataType_SINT AdsDataType = 0x0A + AdsDataType_INT8 AdsDataType = 0x0B + AdsDataType_USINT AdsDataType = 0x0C + AdsDataType_UINT8 AdsDataType = 0x0D + AdsDataType_INT AdsDataType = 0x0E + AdsDataType_INT16 AdsDataType = 0x0F + AdsDataType_UINT AdsDataType = 0x10 + AdsDataType_UINT16 AdsDataType = 0x11 + AdsDataType_DINT AdsDataType = 0x12 + AdsDataType_INT32 AdsDataType = 0x13 + AdsDataType_UDINT AdsDataType = 0x14 + AdsDataType_UINT32 AdsDataType = 0x15 + AdsDataType_LINT AdsDataType = 0x16 + AdsDataType_INT64 AdsDataType = 0x17 + AdsDataType_ULINT AdsDataType = 0x18 + AdsDataType_UINT64 AdsDataType = 0x19 + AdsDataType_REAL AdsDataType = 0x1A + AdsDataType_FLOAT AdsDataType = 0x1B + AdsDataType_LREAL AdsDataType = 0x1C + AdsDataType_DOUBLE AdsDataType = 0x1D + AdsDataType_CHAR AdsDataType = 0x1E + AdsDataType_WCHAR AdsDataType = 0x1F + AdsDataType_STRING AdsDataType = 0x20 + AdsDataType_WSTRING AdsDataType = 0x21 + AdsDataType_TIME AdsDataType = 0x22 + AdsDataType_LTIME AdsDataType = 0x23 + AdsDataType_DATE AdsDataType = 0x24 + AdsDataType_TIME_OF_DAY AdsDataType = 0x25 + AdsDataType_TOD AdsDataType = 0x26 AdsDataType_DATE_AND_TIME AdsDataType = 0x27 - AdsDataType_DT AdsDataType = 0x28 + AdsDataType_DT AdsDataType = 0x28 ) var AdsDataTypeValues []AdsDataType func init() { _ = errors.New - AdsDataTypeValues = []AdsDataType{ + AdsDataTypeValues = []AdsDataType { AdsDataType_BOOL, AdsDataType_BIT, AdsDataType_BIT8, @@ -127,170 +127,130 @@ func init() { } } + func (e AdsDataType) NumBytes() uint16 { - switch e { - case 0x01: - { /* '0x01' */ - return 1 + switch e { + case 0x01: { /* '0x01' */ + return 1 } - case 0x02: - { /* '0x02' */ - return 1 + case 0x02: { /* '0x02' */ + return 1 } - case 0x03: - { /* '0x03' */ - return 1 + case 0x03: { /* '0x03' */ + return 1 } - case 0x04: - { /* '0x04' */ - return 1 + case 0x04: { /* '0x04' */ + return 1 } - case 0x05: - { /* '0x05' */ - return 1 + case 0x05: { /* '0x05' */ + return 1 } - case 0x06: - { /* '0x06' */ - return 2 + case 0x06: { /* '0x06' */ + return 2 } - case 0x07: - { /* '0x07' */ - return 2 + case 0x07: { /* '0x07' */ + return 2 } - case 0x08: - { /* '0x08' */ - return 4 + case 0x08: { /* '0x08' */ + return 4 } - case 0x09: - { /* '0x09' */ - return 4 + case 0x09: { /* '0x09' */ + return 4 } - case 0x0A: - { /* '0x0A' */ - return 1 + case 0x0A: { /* '0x0A' */ + return 1 } - case 0x0B: - { /* '0x0B' */ - return 1 + case 0x0B: { /* '0x0B' */ + return 1 } - case 0x0C: - { /* '0x0C' */ - return 1 + case 0x0C: { /* '0x0C' */ + return 1 } - case 0x0D: - { /* '0x0D' */ - return 1 + case 0x0D: { /* '0x0D' */ + return 1 } - case 0x0E: - { /* '0x0E' */ - return 2 + case 0x0E: { /* '0x0E' */ + return 2 } - case 0x0F: - { /* '0x0F' */ - return 2 + case 0x0F: { /* '0x0F' */ + return 2 } - case 0x10: - { /* '0x10' */ - return 2 + case 0x10: { /* '0x10' */ + return 2 } - case 0x11: - { /* '0x11' */ - return 2 + case 0x11: { /* '0x11' */ + return 2 } - case 0x12: - { /* '0x12' */ - return 4 + case 0x12: { /* '0x12' */ + return 4 } - case 0x13: - { /* '0x13' */ - return 4 + case 0x13: { /* '0x13' */ + return 4 } - case 0x14: - { /* '0x14' */ - return 4 + case 0x14: { /* '0x14' */ + return 4 } - case 0x15: - { /* '0x15' */ - return 4 + case 0x15: { /* '0x15' */ + return 4 } - case 0x16: - { /* '0x16' */ - return 8 + case 0x16: { /* '0x16' */ + return 8 } - case 0x17: - { /* '0x17' */ - return 8 + case 0x17: { /* '0x17' */ + return 8 } - case 0x18: - { /* '0x18' */ - return 8 + case 0x18: { /* '0x18' */ + return 8 } - case 0x19: - { /* '0x19' */ - return 8 + case 0x19: { /* '0x19' */ + return 8 } - case 0x1A: - { /* '0x1A' */ - return 4 + case 0x1A: { /* '0x1A' */ + return 4 } - case 0x1B: - { /* '0x1B' */ - return 4 + case 0x1B: { /* '0x1B' */ + return 4 } - case 0x1C: - { /* '0x1C' */ - return 8 + case 0x1C: { /* '0x1C' */ + return 8 } - case 0x1D: - { /* '0x1D' */ - return 8 + case 0x1D: { /* '0x1D' */ + return 8 } - case 0x1E: - { /* '0x1E' */ - return 1 + case 0x1E: { /* '0x1E' */ + return 1 } - case 0x1F: - { /* '0x1F' */ - return 2 + case 0x1F: { /* '0x1F' */ + return 2 } - case 0x20: - { /* '0x20' */ - return 256 + case 0x20: { /* '0x20' */ + return 256 } - case 0x21: - { /* '0x21' */ - return 512 + case 0x21: { /* '0x21' */ + return 512 } - case 0x22: - { /* '0x22' */ - return 4 + case 0x22: { /* '0x22' */ + return 4 } - case 0x23: - { /* '0x23' */ - return 8 + case 0x23: { /* '0x23' */ + return 8 } - case 0x24: - { /* '0x24' */ - return 4 + case 0x24: { /* '0x24' */ + return 4 } - case 0x25: - { /* '0x25' */ - return 4 + case 0x25: { /* '0x25' */ + return 4 } - case 0x26: - { /* '0x26' */ - return 4 + case 0x26: { /* '0x26' */ + return 4 } - case 0x27: - { /* '0x27' */ - return 4 + case 0x27: { /* '0x27' */ + return 4 } - case 0x28: - { /* '0x28' */ - return 4 + case 0x28: { /* '0x28' */ + return 4 } - default: - { + default: { return 0 } } @@ -306,169 +266,128 @@ func AdsDataTypeFirstEnumForFieldNumBytes(value uint16) (AdsDataType, error) { } func (e AdsDataType) PlcValueType() PlcValueType { - switch e { - case 0x01: - { /* '0x01' */ + switch e { + case 0x01: { /* '0x01' */ return PlcValueType_BOOL } - case 0x02: - { /* '0x02' */ + case 0x02: { /* '0x02' */ return PlcValueType_BOOL } - case 0x03: - { /* '0x03' */ + case 0x03: { /* '0x03' */ return PlcValueType_BYTE } - case 0x04: - { /* '0x04' */ + case 0x04: { /* '0x04' */ return PlcValueType_BYTE } - case 0x05: - { /* '0x05' */ + case 0x05: { /* '0x05' */ return PlcValueType_BYTE } - case 0x06: - { /* '0x06' */ + case 0x06: { /* '0x06' */ return PlcValueType_WORD } - case 0x07: - { /* '0x07' */ + case 0x07: { /* '0x07' */ return PlcValueType_WORD } - case 0x08: - { /* '0x08' */ + case 0x08: { /* '0x08' */ return PlcValueType_DWORD } - case 0x09: - { /* '0x09' */ + case 0x09: { /* '0x09' */ return PlcValueType_DWORD } - case 0x0A: - { /* '0x0A' */ + case 0x0A: { /* '0x0A' */ return PlcValueType_SINT } - case 0x0B: - { /* '0x0B' */ + case 0x0B: { /* '0x0B' */ return PlcValueType_SINT } - case 0x0C: - { /* '0x0C' */ + case 0x0C: { /* '0x0C' */ return PlcValueType_USINT } - case 0x0D: - { /* '0x0D' */ + case 0x0D: { /* '0x0D' */ return PlcValueType_USINT } - case 0x0E: - { /* '0x0E' */ + case 0x0E: { /* '0x0E' */ return PlcValueType_INT } - case 0x0F: - { /* '0x0F' */ + case 0x0F: { /* '0x0F' */ return PlcValueType_INT } - case 0x10: - { /* '0x10' */ + case 0x10: { /* '0x10' */ return PlcValueType_UINT } - case 0x11: - { /* '0x11' */ + case 0x11: { /* '0x11' */ return PlcValueType_UINT } - case 0x12: - { /* '0x12' */ + case 0x12: { /* '0x12' */ return PlcValueType_DINT } - case 0x13: - { /* '0x13' */ + case 0x13: { /* '0x13' */ return PlcValueType_DINT } - case 0x14: - { /* '0x14' */ + case 0x14: { /* '0x14' */ return PlcValueType_UDINT } - case 0x15: - { /* '0x15' */ + case 0x15: { /* '0x15' */ return PlcValueType_UDINT } - case 0x16: - { /* '0x16' */ + case 0x16: { /* '0x16' */ return PlcValueType_LINT } - case 0x17: - { /* '0x17' */ + case 0x17: { /* '0x17' */ return PlcValueType_LINT } - case 0x18: - { /* '0x18' */ + case 0x18: { /* '0x18' */ return PlcValueType_ULINT } - case 0x19: - { /* '0x19' */ + case 0x19: { /* '0x19' */ return PlcValueType_ULINT } - case 0x1A: - { /* '0x1A' */ + case 0x1A: { /* '0x1A' */ return PlcValueType_REAL } - case 0x1B: - { /* '0x1B' */ + case 0x1B: { /* '0x1B' */ return PlcValueType_REAL } - case 0x1C: - { /* '0x1C' */ + case 0x1C: { /* '0x1C' */ return PlcValueType_LREAL } - case 0x1D: - { /* '0x1D' */ + case 0x1D: { /* '0x1D' */ return PlcValueType_LREAL } - case 0x1E: - { /* '0x1E' */ + case 0x1E: { /* '0x1E' */ return PlcValueType_CHAR } - case 0x1F: - { /* '0x1F' */ + case 0x1F: { /* '0x1F' */ return PlcValueType_WCHAR } - case 0x20: - { /* '0x20' */ + case 0x20: { /* '0x20' */ return PlcValueType_STRING } - case 0x21: - { /* '0x21' */ + case 0x21: { /* '0x21' */ return PlcValueType_WSTRING } - case 0x22: - { /* '0x22' */ + case 0x22: { /* '0x22' */ return PlcValueType_TIME } - case 0x23: - { /* '0x23' */ + case 0x23: { /* '0x23' */ return PlcValueType_LTIME } - case 0x24: - { /* '0x24' */ + case 0x24: { /* '0x24' */ return PlcValueType_DATE } - case 0x25: - { /* '0x25' */ + case 0x25: { /* '0x25' */ return PlcValueType_TIME_OF_DAY } - case 0x26: - { /* '0x26' */ + case 0x26: { /* '0x26' */ return PlcValueType_TIME_OF_DAY } - case 0x27: - { /* '0x27' */ + case 0x27: { /* '0x27' */ return PlcValueType_DATE_AND_TIME } - case 0x28: - { /* '0x28' */ + case 0x28: { /* '0x28' */ return PlcValueType_DATE_AND_TIME } - default: - { + default: { return 0 } } @@ -484,86 +403,86 @@ func AdsDataTypeFirstEnumForFieldPlcValueType(value PlcValueType) (AdsDataType, } func AdsDataTypeByValue(value int8) (enum AdsDataType, ok bool) { switch value { - case 0x01: - return AdsDataType_BOOL, true - case 0x02: - return AdsDataType_BIT, true - case 0x03: - return AdsDataType_BIT8, true - case 0x04: - return AdsDataType_BYTE, true - case 0x05: - return AdsDataType_BITARR8, true - case 0x06: - return AdsDataType_WORD, true - case 0x07: - return AdsDataType_BITARR16, true - case 0x08: - return AdsDataType_DWORD, true - case 0x09: - return AdsDataType_BITARR32, true - case 0x0A: - return AdsDataType_SINT, true - case 0x0B: - return AdsDataType_INT8, true - case 0x0C: - return AdsDataType_USINT, true - case 0x0D: - return AdsDataType_UINT8, true - case 0x0E: - return AdsDataType_INT, true - case 0x0F: - return AdsDataType_INT16, true - case 0x10: - return AdsDataType_UINT, true - case 0x11: - return AdsDataType_UINT16, true - case 0x12: - return AdsDataType_DINT, true - case 0x13: - return AdsDataType_INT32, true - case 0x14: - return AdsDataType_UDINT, true - case 0x15: - return AdsDataType_UINT32, true - case 0x16: - return AdsDataType_LINT, true - case 0x17: - return AdsDataType_INT64, true - case 0x18: - return AdsDataType_ULINT, true - case 0x19: - return AdsDataType_UINT64, true - case 0x1A: - return AdsDataType_REAL, true - case 0x1B: - return AdsDataType_FLOAT, true - case 0x1C: - return AdsDataType_LREAL, true - case 0x1D: - return AdsDataType_DOUBLE, true - case 0x1E: - return AdsDataType_CHAR, true - case 0x1F: - return AdsDataType_WCHAR, true - case 0x20: - return AdsDataType_STRING, true - case 0x21: - return AdsDataType_WSTRING, true - case 0x22: - return AdsDataType_TIME, true - case 0x23: - return AdsDataType_LTIME, true - case 0x24: - return AdsDataType_DATE, true - case 0x25: - return AdsDataType_TIME_OF_DAY, true - case 0x26: - return AdsDataType_TOD, true - case 0x27: - return AdsDataType_DATE_AND_TIME, true - case 0x28: - return AdsDataType_DT, true + case 0x01: + return AdsDataType_BOOL, true + case 0x02: + return AdsDataType_BIT, true + case 0x03: + return AdsDataType_BIT8, true + case 0x04: + return AdsDataType_BYTE, true + case 0x05: + return AdsDataType_BITARR8, true + case 0x06: + return AdsDataType_WORD, true + case 0x07: + return AdsDataType_BITARR16, true + case 0x08: + return AdsDataType_DWORD, true + case 0x09: + return AdsDataType_BITARR32, true + case 0x0A: + return AdsDataType_SINT, true + case 0x0B: + return AdsDataType_INT8, true + case 0x0C: + return AdsDataType_USINT, true + case 0x0D: + return AdsDataType_UINT8, true + case 0x0E: + return AdsDataType_INT, true + case 0x0F: + return AdsDataType_INT16, true + case 0x10: + return AdsDataType_UINT, true + case 0x11: + return AdsDataType_UINT16, true + case 0x12: + return AdsDataType_DINT, true + case 0x13: + return AdsDataType_INT32, true + case 0x14: + return AdsDataType_UDINT, true + case 0x15: + return AdsDataType_UINT32, true + case 0x16: + return AdsDataType_LINT, true + case 0x17: + return AdsDataType_INT64, true + case 0x18: + return AdsDataType_ULINT, true + case 0x19: + return AdsDataType_UINT64, true + case 0x1A: + return AdsDataType_REAL, true + case 0x1B: + return AdsDataType_FLOAT, true + case 0x1C: + return AdsDataType_LREAL, true + case 0x1D: + return AdsDataType_DOUBLE, true + case 0x1E: + return AdsDataType_CHAR, true + case 0x1F: + return AdsDataType_WCHAR, true + case 0x20: + return AdsDataType_STRING, true + case 0x21: + return AdsDataType_WSTRING, true + case 0x22: + return AdsDataType_TIME, true + case 0x23: + return AdsDataType_LTIME, true + case 0x24: + return AdsDataType_DATE, true + case 0x25: + return AdsDataType_TIME_OF_DAY, true + case 0x26: + return AdsDataType_TOD, true + case 0x27: + return AdsDataType_DATE_AND_TIME, true + case 0x28: + return AdsDataType_DT, true } return 0, false } @@ -654,13 +573,13 @@ func AdsDataTypeByName(value string) (enum AdsDataType, ok bool) { return 0, false } -func AdsDataTypeKnows(value int8) bool { +func AdsDataTypeKnows(value int8) bool { for _, typeValue := range AdsDataTypeValues { if int8(typeValue) == value { return true } } - return false + return false; } func CastAdsDataType(structType interface{}) AdsDataType { @@ -800,3 +719,4 @@ func (e AdsDataType) PLC4XEnumName() string { func (e AdsDataType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/ads/readwrite/model/AdsDataTypeArrayInfo.go b/plc4go/protocols/ads/readwrite/model/AdsDataTypeArrayInfo.go index 1ba22b55637..cb4195c5239 100644 --- a/plc4go/protocols/ads/readwrite/model/AdsDataTypeArrayInfo.go +++ b/plc4go/protocols/ads/readwrite/model/AdsDataTypeArrayInfo.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AdsDataTypeArrayInfo is the corresponding interface of AdsDataTypeArrayInfo type AdsDataTypeArrayInfo interface { @@ -49,10 +51,11 @@ type AdsDataTypeArrayInfoExactly interface { // _AdsDataTypeArrayInfo is the data-structure of this message type _AdsDataTypeArrayInfo struct { - LowerBound uint32 - NumElements uint32 + LowerBound uint32 + NumElements uint32 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -86,14 +89,15 @@ func (m *_AdsDataTypeArrayInfo) GetUpperBound() uint32 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAdsDataTypeArrayInfo factory function for _AdsDataTypeArrayInfo -func NewAdsDataTypeArrayInfo(lowerBound uint32, numElements uint32) *_AdsDataTypeArrayInfo { - return &_AdsDataTypeArrayInfo{LowerBound: lowerBound, NumElements: numElements} +func NewAdsDataTypeArrayInfo( lowerBound uint32 , numElements uint32 ) *_AdsDataTypeArrayInfo { +return &_AdsDataTypeArrayInfo{ LowerBound: lowerBound , NumElements: numElements } } // Deprecated: use the interface for direct cast func CastAdsDataTypeArrayInfo(structType interface{}) AdsDataTypeArrayInfo { - if casted, ok := structType.(AdsDataTypeArrayInfo); ok { + if casted, ok := structType.(AdsDataTypeArrayInfo); ok { return casted } if casted, ok := structType.(*AdsDataTypeArrayInfo); ok { @@ -110,16 +114,17 @@ func (m *_AdsDataTypeArrayInfo) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (lowerBound) - lengthInBits += 32 + lengthInBits += 32; // Simple field (numElements) - lengthInBits += 32 + lengthInBits += 32; // A virtual field doesn't have any in- or output. return lengthInBits } + func (m *_AdsDataTypeArrayInfo) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,14 +143,14 @@ func AdsDataTypeArrayInfoParseWithBuffer(ctx context.Context, readBuffer utils.R _ = currentPos // Simple Field (lowerBound) - _lowerBound, _lowerBoundErr := readBuffer.ReadUint32("lowerBound", 32) +_lowerBound, _lowerBoundErr := readBuffer.ReadUint32("lowerBound", 32) if _lowerBoundErr != nil { return nil, errors.Wrap(_lowerBoundErr, "Error parsing 'lowerBound' field of AdsDataTypeArrayInfo") } lowerBound := _lowerBound // Simple Field (numElements) - _numElements, _numElementsErr := readBuffer.ReadUint32("numElements", 32) +_numElements, _numElementsErr := readBuffer.ReadUint32("numElements", 32) if _numElementsErr != nil { return nil, errors.Wrap(_numElementsErr, "Error parsing 'numElements' field of AdsDataTypeArrayInfo") } @@ -162,9 +167,9 @@ func AdsDataTypeArrayInfoParseWithBuffer(ctx context.Context, readBuffer utils.R // Create the instance return &_AdsDataTypeArrayInfo{ - LowerBound: lowerBound, - NumElements: numElements, - }, nil + LowerBound: lowerBound, + NumElements: numElements, + }, nil } func (m *_AdsDataTypeArrayInfo) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_AdsDataTypeArrayInfo) Serialize() ([]byte, error) { func (m *_AdsDataTypeArrayInfo) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("AdsDataTypeArrayInfo"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("AdsDataTypeArrayInfo"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for AdsDataTypeArrayInfo") } @@ -206,6 +211,7 @@ func (m *_AdsDataTypeArrayInfo) SerializeWithWriteBuffer(ctx context.Context, wr return nil } + func (m *_AdsDataTypeArrayInfo) isAdsDataTypeArrayInfo() bool { return true } @@ -220,3 +226,6 @@ func (m *_AdsDataTypeArrayInfo) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/readwrite/model/AdsDataTypeTableChildEntry.go b/plc4go/protocols/ads/readwrite/model/AdsDataTypeTableChildEntry.go index 3ef35697366..9ac5dc864b9 100644 --- a/plc4go/protocols/ads/readwrite/model/AdsDataTypeTableChildEntry.go +++ b/plc4go/protocols/ads/readwrite/model/AdsDataTypeTableChildEntry.go @@ -19,16 +19,18 @@ package model + import ( "context" "encoding/binary" "fmt" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const AdsDataTypeTableChildEntry_PROPERTYNAMETERMINATOR uint8 = 0x00 @@ -82,24 +84,25 @@ type AdsDataTypeTableChildEntryExactly interface { // _AdsDataTypeTableChildEntry is the data-structure of this message type _AdsDataTypeTableChildEntry struct { - EntryLength uint32 - Version uint32 - HashValue uint32 - TypeHashValue uint32 - Size uint32 - Offset uint32 - DataType uint32 - Flags uint32 - ArrayDimensions uint16 - NumChildren uint16 - PropertyName string - DataTypeName string - Comment string - ArrayInfo []AdsDataTypeArrayInfo - Children []AdsDataTypeTableEntry - Rest []byte + EntryLength uint32 + Version uint32 + HashValue uint32 + TypeHashValue uint32 + Size uint32 + Offset uint32 + DataType uint32 + Flags uint32 + ArrayDimensions uint16 + NumChildren uint16 + PropertyName string + DataTypeName string + Comment string + ArrayInfo []AdsDataTypeArrayInfo + Children []AdsDataTypeTableEntry + Rest []byte } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -195,14 +198,15 @@ func (m *_AdsDataTypeTableChildEntry) GetCommentTerminator() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAdsDataTypeTableChildEntry factory function for _AdsDataTypeTableChildEntry -func NewAdsDataTypeTableChildEntry(entryLength uint32, version uint32, hashValue uint32, typeHashValue uint32, size uint32, offset uint32, dataType uint32, flags uint32, arrayDimensions uint16, numChildren uint16, propertyName string, dataTypeName string, comment string, arrayInfo []AdsDataTypeArrayInfo, children []AdsDataTypeTableEntry, rest []byte) *_AdsDataTypeTableChildEntry { - return &_AdsDataTypeTableChildEntry{EntryLength: entryLength, Version: version, HashValue: hashValue, TypeHashValue: typeHashValue, Size: size, Offset: offset, DataType: dataType, Flags: flags, ArrayDimensions: arrayDimensions, NumChildren: numChildren, PropertyName: propertyName, DataTypeName: dataTypeName, Comment: comment, ArrayInfo: arrayInfo, Children: children, Rest: rest} +func NewAdsDataTypeTableChildEntry( entryLength uint32 , version uint32 , hashValue uint32 , typeHashValue uint32 , size uint32 , offset uint32 , dataType uint32 , flags uint32 , arrayDimensions uint16 , numChildren uint16 , propertyName string , dataTypeName string , comment string , arrayInfo []AdsDataTypeArrayInfo , children []AdsDataTypeTableEntry , rest []byte ) *_AdsDataTypeTableChildEntry { +return &_AdsDataTypeTableChildEntry{ EntryLength: entryLength , Version: version , HashValue: hashValue , TypeHashValue: typeHashValue , Size: size , Offset: offset , DataType: dataType , Flags: flags , ArrayDimensions: arrayDimensions , NumChildren: numChildren , PropertyName: propertyName , DataTypeName: dataTypeName , Comment: comment , ArrayInfo: arrayInfo , Children: children , Rest: rest } } // Deprecated: use the interface for direct cast func CastAdsDataTypeTableChildEntry(structType interface{}) AdsDataTypeTableChildEntry { - if casted, ok := structType.(AdsDataTypeTableChildEntry); ok { + if casted, ok := structType.(AdsDataTypeTableChildEntry); ok { return casted } if casted, ok := structType.(*AdsDataTypeTableChildEntry); ok { @@ -219,28 +223,28 @@ func (m *_AdsDataTypeTableChildEntry) GetLengthInBits(ctx context.Context) uint1 lengthInBits := uint16(0) // Simple field (entryLength) - lengthInBits += 32 + lengthInBits += 32; // Simple field (version) - lengthInBits += 32 + lengthInBits += 32; // Simple field (hashValue) - lengthInBits += 32 + lengthInBits += 32; // Simple field (typeHashValue) - lengthInBits += 32 + lengthInBits += 32; // Simple field (size) - lengthInBits += 32 + lengthInBits += 32; // Simple field (offset) - lengthInBits += 32 + lengthInBits += 32; // Simple field (dataType) - lengthInBits += 32 + lengthInBits += 32; // Simple field (flags) - lengthInBits += 32 + lengthInBits += 32; // Implicit Field (propertyNameLength) lengthInBits += 16 @@ -252,10 +256,10 @@ func (m *_AdsDataTypeTableChildEntry) GetLengthInBits(ctx context.Context) uint1 lengthInBits += 16 // Simple field (arrayDimensions) - lengthInBits += 16 + lengthInBits += 16; // Simple field (numChildren) - lengthInBits += 16 + lengthInBits += 16; // Simple field (propertyName) lengthInBits += uint16(int32(uint16(len(m.GetPropertyName()))) * int32(int32(8))) @@ -281,7 +285,7 @@ func (m *_AdsDataTypeTableChildEntry) GetLengthInBits(ctx context.Context) uint1 arrayCtx := spiContext.CreateArrayContext(ctx, len(m.ArrayInfo), _curItem) _ = arrayCtx _ = _curItem - lengthInBits += element.(interface{ GetLengthInBits(context.Context) uint16 }).GetLengthInBits(arrayCtx) + lengthInBits += element.(interface{GetLengthInBits(context.Context) uint16}).GetLengthInBits(arrayCtx) } } @@ -291,7 +295,7 @@ func (m *_AdsDataTypeTableChildEntry) GetLengthInBits(ctx context.Context) uint1 arrayCtx := spiContext.CreateArrayContext(ctx, len(m.Children), _curItem) _ = arrayCtx _ = _curItem - lengthInBits += element.(interface{ GetLengthInBits(context.Context) uint16 }).GetLengthInBits(arrayCtx) + lengthInBits += element.(interface{GetLengthInBits(context.Context) uint16}).GetLengthInBits(arrayCtx) } } @@ -303,6 +307,7 @@ func (m *_AdsDataTypeTableChildEntry) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_AdsDataTypeTableChildEntry) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -323,56 +328,56 @@ func AdsDataTypeTableChildEntryParseWithBuffer(ctx context.Context, readBuffer u _ = startPos // Simple Field (entryLength) - _entryLength, _entryLengthErr := readBuffer.ReadUint32("entryLength", 32) +_entryLength, _entryLengthErr := readBuffer.ReadUint32("entryLength", 32) if _entryLengthErr != nil { return nil, errors.Wrap(_entryLengthErr, "Error parsing 'entryLength' field of AdsDataTypeTableChildEntry") } entryLength := _entryLength // Simple Field (version) - _version, _versionErr := readBuffer.ReadUint32("version", 32) +_version, _versionErr := readBuffer.ReadUint32("version", 32) if _versionErr != nil { return nil, errors.Wrap(_versionErr, "Error parsing 'version' field of AdsDataTypeTableChildEntry") } version := _version // Simple Field (hashValue) - _hashValue, _hashValueErr := readBuffer.ReadUint32("hashValue", 32) +_hashValue, _hashValueErr := readBuffer.ReadUint32("hashValue", 32) if _hashValueErr != nil { return nil, errors.Wrap(_hashValueErr, "Error parsing 'hashValue' field of AdsDataTypeTableChildEntry") } hashValue := _hashValue // Simple Field (typeHashValue) - _typeHashValue, _typeHashValueErr := readBuffer.ReadUint32("typeHashValue", 32) +_typeHashValue, _typeHashValueErr := readBuffer.ReadUint32("typeHashValue", 32) if _typeHashValueErr != nil { return nil, errors.Wrap(_typeHashValueErr, "Error parsing 'typeHashValue' field of AdsDataTypeTableChildEntry") } typeHashValue := _typeHashValue // Simple Field (size) - _size, _sizeErr := readBuffer.ReadUint32("size", 32) +_size, _sizeErr := readBuffer.ReadUint32("size", 32) if _sizeErr != nil { return nil, errors.Wrap(_sizeErr, "Error parsing 'size' field of AdsDataTypeTableChildEntry") } size := _size // Simple Field (offset) - _offset, _offsetErr := readBuffer.ReadUint32("offset", 32) +_offset, _offsetErr := readBuffer.ReadUint32("offset", 32) if _offsetErr != nil { return nil, errors.Wrap(_offsetErr, "Error parsing 'offset' field of AdsDataTypeTableChildEntry") } offset := _offset // Simple Field (dataType) - _dataType, _dataTypeErr := readBuffer.ReadUint32("dataType", 32) +_dataType, _dataTypeErr := readBuffer.ReadUint32("dataType", 32) if _dataTypeErr != nil { return nil, errors.Wrap(_dataTypeErr, "Error parsing 'dataType' field of AdsDataTypeTableChildEntry") } dataType := _dataType // Simple Field (flags) - _flags, _flagsErr := readBuffer.ReadUint32("flags", 32) +_flags, _flagsErr := readBuffer.ReadUint32("flags", 32) if _flagsErr != nil { return nil, errors.Wrap(_flagsErr, "Error parsing 'flags' field of AdsDataTypeTableChildEntry") } @@ -400,21 +405,21 @@ func AdsDataTypeTableChildEntryParseWithBuffer(ctx context.Context, readBuffer u } // Simple Field (arrayDimensions) - _arrayDimensions, _arrayDimensionsErr := readBuffer.ReadUint16("arrayDimensions", 16) +_arrayDimensions, _arrayDimensionsErr := readBuffer.ReadUint16("arrayDimensions", 16) if _arrayDimensionsErr != nil { return nil, errors.Wrap(_arrayDimensionsErr, "Error parsing 'arrayDimensions' field of AdsDataTypeTableChildEntry") } arrayDimensions := _arrayDimensions // Simple Field (numChildren) - _numChildren, _numChildrenErr := readBuffer.ReadUint16("numChildren", 16) +_numChildren, _numChildrenErr := readBuffer.ReadUint16("numChildren", 16) if _numChildrenErr != nil { return nil, errors.Wrap(_numChildrenErr, "Error parsing 'numChildren' field of AdsDataTypeTableChildEntry") } numChildren := _numChildren // Simple Field (propertyName) - _propertyName, _propertyNameErr := readBuffer.ReadString("propertyName", uint32((propertyNameLength)*(8)), "UTF-8") +_propertyName, _propertyNameErr := readBuffer.ReadString("propertyName", uint32((propertyNameLength) * ((8))), "UTF-8") if _propertyNameErr != nil { return nil, errors.Wrap(_propertyNameErr, "Error parsing 'propertyName' field of AdsDataTypeTableChildEntry") } @@ -430,7 +435,7 @@ func AdsDataTypeTableChildEntryParseWithBuffer(ctx context.Context, readBuffer u } // Simple Field (dataTypeName) - _dataTypeName, _dataTypeNameErr := readBuffer.ReadString("dataTypeName", uint32((dataTypeNameLength)*(8)), "UTF-8") +_dataTypeName, _dataTypeNameErr := readBuffer.ReadString("dataTypeName", uint32((dataTypeNameLength) * ((8))), "UTF-8") if _dataTypeNameErr != nil { return nil, errors.Wrap(_dataTypeNameErr, "Error parsing 'dataTypeName' field of AdsDataTypeTableChildEntry") } @@ -446,7 +451,7 @@ func AdsDataTypeTableChildEntryParseWithBuffer(ctx context.Context, readBuffer u } // Simple Field (comment) - _comment, _commentErr := readBuffer.ReadString("comment", uint32((commentLength)*(8)), "UTF-8") +_comment, _commentErr := readBuffer.ReadString("comment", uint32((commentLength) * ((8))), "UTF-8") if _commentErr != nil { return nil, errors.Wrap(_commentErr, "Error parsing 'comment' field of AdsDataTypeTableChildEntry") } @@ -477,7 +482,7 @@ func AdsDataTypeTableChildEntryParseWithBuffer(ctx context.Context, readBuffer u arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := AdsDataTypeArrayInfoParseWithBuffer(arrayCtx, readBuffer) +_item, _err := AdsDataTypeArrayInfoParseWithBuffer(arrayCtx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'arrayInfo' field of AdsDataTypeTableChildEntry") } @@ -504,7 +509,7 @@ func AdsDataTypeTableChildEntryParseWithBuffer(ctx context.Context, readBuffer u arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := AdsDataTypeTableEntryParseWithBuffer(arrayCtx, readBuffer) +_item, _err := AdsDataTypeTableEntryParseWithBuffer(arrayCtx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'children' field of AdsDataTypeTableChildEntry") } @@ -527,23 +532,23 @@ func AdsDataTypeTableChildEntryParseWithBuffer(ctx context.Context, readBuffer u // Create the instance return &_AdsDataTypeTableChildEntry{ - EntryLength: entryLength, - Version: version, - HashValue: hashValue, - TypeHashValue: typeHashValue, - Size: size, - Offset: offset, - DataType: dataType, - Flags: flags, - ArrayDimensions: arrayDimensions, - NumChildren: numChildren, - PropertyName: propertyName, - DataTypeName: dataTypeName, - Comment: comment, - ArrayInfo: arrayInfo, - Children: children, - Rest: rest, - }, nil + EntryLength: entryLength, + Version: version, + HashValue: hashValue, + TypeHashValue: typeHashValue, + Size: size, + Offset: offset, + DataType: dataType, + Flags: flags, + ArrayDimensions: arrayDimensions, + NumChildren: numChildren, + PropertyName: propertyName, + DataTypeName: dataTypeName, + Comment: comment, + ArrayInfo: arrayInfo, + Children: children, + Rest: rest, + }, nil } func (m *_AdsDataTypeTableChildEntry) Serialize() ([]byte, error) { @@ -557,7 +562,7 @@ func (m *_AdsDataTypeTableChildEntry) Serialize() ([]byte, error) { func (m *_AdsDataTypeTableChildEntry) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("AdsDataTypeTableChildEntry"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("AdsDataTypeTableChildEntry"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for AdsDataTypeTableChildEntry") } @@ -654,7 +659,7 @@ func (m *_AdsDataTypeTableChildEntry) SerializeWithWriteBuffer(ctx context.Conte // Simple Field (propertyName) propertyName := string(m.GetPropertyName()) - _propertyNameErr := writeBuffer.WriteString("propertyName", uint32((uint16(len(m.GetPropertyName())))*(8)), "UTF-8", (propertyName)) + _propertyNameErr := writeBuffer.WriteString("propertyName", uint32((uint16(len(m.GetPropertyName()))) * ((8))), "UTF-8", (propertyName)) if _propertyNameErr != nil { return errors.Wrap(_propertyNameErr, "Error serializing 'propertyName' field") } @@ -667,7 +672,7 @@ func (m *_AdsDataTypeTableChildEntry) SerializeWithWriteBuffer(ctx context.Conte // Simple Field (dataTypeName) dataTypeName := string(m.GetDataTypeName()) - _dataTypeNameErr := writeBuffer.WriteString("dataTypeName", uint32((uint16(len(m.GetDataTypeName())))*(8)), "UTF-8", (dataTypeName)) + _dataTypeNameErr := writeBuffer.WriteString("dataTypeName", uint32((uint16(len(m.GetDataTypeName()))) * ((8))), "UTF-8", (dataTypeName)) if _dataTypeNameErr != nil { return errors.Wrap(_dataTypeNameErr, "Error serializing 'dataTypeName' field") } @@ -680,7 +685,7 @@ func (m *_AdsDataTypeTableChildEntry) SerializeWithWriteBuffer(ctx context.Conte // Simple Field (comment) comment := string(m.GetComment()) - _commentErr := writeBuffer.WriteString("comment", uint32((uint16(len(m.GetComment())))*(8)), "UTF-8", (comment)) + _commentErr := writeBuffer.WriteString("comment", uint32((uint16(len(m.GetComment()))) * ((8))), "UTF-8", (comment)) if _commentErr != nil { return errors.Wrap(_commentErr, "Error serializing 'comment' field") } @@ -737,6 +742,7 @@ func (m *_AdsDataTypeTableChildEntry) SerializeWithWriteBuffer(ctx context.Conte return nil } + func (m *_AdsDataTypeTableChildEntry) isAdsDataTypeTableChildEntry() bool { return true } @@ -751,3 +757,6 @@ func (m *_AdsDataTypeTableChildEntry) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/readwrite/model/AdsDataTypeTableEntry.go b/plc4go/protocols/ads/readwrite/model/AdsDataTypeTableEntry.go index 8fe01dc3eee..f216d77c0b2 100644 --- a/plc4go/protocols/ads/readwrite/model/AdsDataTypeTableEntry.go +++ b/plc4go/protocols/ads/readwrite/model/AdsDataTypeTableEntry.go @@ -19,16 +19,18 @@ package model + import ( "context" "encoding/binary" "fmt" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const AdsDataTypeTableEntry_DATATYPENAMETERMINATOR uint8 = 0x00 @@ -82,24 +84,25 @@ type AdsDataTypeTableEntryExactly interface { // _AdsDataTypeTableEntry is the data-structure of this message type _AdsDataTypeTableEntry struct { - EntryLength uint32 - Version uint32 - HashValue uint32 - TypeHashValue uint32 - Size uint32 - Offset uint32 - DataType uint32 - Flags uint32 - ArrayDimensions uint16 - NumChildren uint16 - DataTypeName string - SimpleTypeName string - Comment string - ArrayInfo []AdsDataTypeArrayInfo - Children []AdsDataTypeTableChildEntry - Rest []byte + EntryLength uint32 + Version uint32 + HashValue uint32 + TypeHashValue uint32 + Size uint32 + Offset uint32 + DataType uint32 + Flags uint32 + ArrayDimensions uint16 + NumChildren uint16 + DataTypeName string + SimpleTypeName string + Comment string + ArrayInfo []AdsDataTypeArrayInfo + Children []AdsDataTypeTableChildEntry + Rest []byte } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -195,14 +198,15 @@ func (m *_AdsDataTypeTableEntry) GetCommentTerminator() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAdsDataTypeTableEntry factory function for _AdsDataTypeTableEntry -func NewAdsDataTypeTableEntry(entryLength uint32, version uint32, hashValue uint32, typeHashValue uint32, size uint32, offset uint32, dataType uint32, flags uint32, arrayDimensions uint16, numChildren uint16, dataTypeName string, simpleTypeName string, comment string, arrayInfo []AdsDataTypeArrayInfo, children []AdsDataTypeTableChildEntry, rest []byte) *_AdsDataTypeTableEntry { - return &_AdsDataTypeTableEntry{EntryLength: entryLength, Version: version, HashValue: hashValue, TypeHashValue: typeHashValue, Size: size, Offset: offset, DataType: dataType, Flags: flags, ArrayDimensions: arrayDimensions, NumChildren: numChildren, DataTypeName: dataTypeName, SimpleTypeName: simpleTypeName, Comment: comment, ArrayInfo: arrayInfo, Children: children, Rest: rest} +func NewAdsDataTypeTableEntry( entryLength uint32 , version uint32 , hashValue uint32 , typeHashValue uint32 , size uint32 , offset uint32 , dataType uint32 , flags uint32 , arrayDimensions uint16 , numChildren uint16 , dataTypeName string , simpleTypeName string , comment string , arrayInfo []AdsDataTypeArrayInfo , children []AdsDataTypeTableChildEntry , rest []byte ) *_AdsDataTypeTableEntry { +return &_AdsDataTypeTableEntry{ EntryLength: entryLength , Version: version , HashValue: hashValue , TypeHashValue: typeHashValue , Size: size , Offset: offset , DataType: dataType , Flags: flags , ArrayDimensions: arrayDimensions , NumChildren: numChildren , DataTypeName: dataTypeName , SimpleTypeName: simpleTypeName , Comment: comment , ArrayInfo: arrayInfo , Children: children , Rest: rest } } // Deprecated: use the interface for direct cast func CastAdsDataTypeTableEntry(structType interface{}) AdsDataTypeTableEntry { - if casted, ok := structType.(AdsDataTypeTableEntry); ok { + if casted, ok := structType.(AdsDataTypeTableEntry); ok { return casted } if casted, ok := structType.(*AdsDataTypeTableEntry); ok { @@ -219,28 +223,28 @@ func (m *_AdsDataTypeTableEntry) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (entryLength) - lengthInBits += 32 + lengthInBits += 32; // Simple field (version) - lengthInBits += 32 + lengthInBits += 32; // Simple field (hashValue) - lengthInBits += 32 + lengthInBits += 32; // Simple field (typeHashValue) - lengthInBits += 32 + lengthInBits += 32; // Simple field (size) - lengthInBits += 32 + lengthInBits += 32; // Simple field (offset) - lengthInBits += 32 + lengthInBits += 32; // Simple field (dataType) - lengthInBits += 32 + lengthInBits += 32; // Simple field (flags) - lengthInBits += 32 + lengthInBits += 32; // Implicit Field (dataTypeNameLength) lengthInBits += 16 @@ -252,10 +256,10 @@ func (m *_AdsDataTypeTableEntry) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += 16 // Simple field (arrayDimensions) - lengthInBits += 16 + lengthInBits += 16; // Simple field (numChildren) - lengthInBits += 16 + lengthInBits += 16; // Simple field (dataTypeName) lengthInBits += uint16(int32(uint16(len(m.GetDataTypeName()))) * int32(int32(8))) @@ -281,7 +285,7 @@ func (m *_AdsDataTypeTableEntry) GetLengthInBits(ctx context.Context) uint16 { arrayCtx := spiContext.CreateArrayContext(ctx, len(m.ArrayInfo), _curItem) _ = arrayCtx _ = _curItem - lengthInBits += element.(interface{ GetLengthInBits(context.Context) uint16 }).GetLengthInBits(arrayCtx) + lengthInBits += element.(interface{GetLengthInBits(context.Context) uint16}).GetLengthInBits(arrayCtx) } } @@ -291,7 +295,7 @@ func (m *_AdsDataTypeTableEntry) GetLengthInBits(ctx context.Context) uint16 { arrayCtx := spiContext.CreateArrayContext(ctx, len(m.Children), _curItem) _ = arrayCtx _ = _curItem - lengthInBits += element.(interface{ GetLengthInBits(context.Context) uint16 }).GetLengthInBits(arrayCtx) + lengthInBits += element.(interface{GetLengthInBits(context.Context) uint16}).GetLengthInBits(arrayCtx) } } @@ -303,6 +307,7 @@ func (m *_AdsDataTypeTableEntry) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_AdsDataTypeTableEntry) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -323,56 +328,56 @@ func AdsDataTypeTableEntryParseWithBuffer(ctx context.Context, readBuffer utils. _ = startPos // Simple Field (entryLength) - _entryLength, _entryLengthErr := readBuffer.ReadUint32("entryLength", 32) +_entryLength, _entryLengthErr := readBuffer.ReadUint32("entryLength", 32) if _entryLengthErr != nil { return nil, errors.Wrap(_entryLengthErr, "Error parsing 'entryLength' field of AdsDataTypeTableEntry") } entryLength := _entryLength // Simple Field (version) - _version, _versionErr := readBuffer.ReadUint32("version", 32) +_version, _versionErr := readBuffer.ReadUint32("version", 32) if _versionErr != nil { return nil, errors.Wrap(_versionErr, "Error parsing 'version' field of AdsDataTypeTableEntry") } version := _version // Simple Field (hashValue) - _hashValue, _hashValueErr := readBuffer.ReadUint32("hashValue", 32) +_hashValue, _hashValueErr := readBuffer.ReadUint32("hashValue", 32) if _hashValueErr != nil { return nil, errors.Wrap(_hashValueErr, "Error parsing 'hashValue' field of AdsDataTypeTableEntry") } hashValue := _hashValue // Simple Field (typeHashValue) - _typeHashValue, _typeHashValueErr := readBuffer.ReadUint32("typeHashValue", 32) +_typeHashValue, _typeHashValueErr := readBuffer.ReadUint32("typeHashValue", 32) if _typeHashValueErr != nil { return nil, errors.Wrap(_typeHashValueErr, "Error parsing 'typeHashValue' field of AdsDataTypeTableEntry") } typeHashValue := _typeHashValue // Simple Field (size) - _size, _sizeErr := readBuffer.ReadUint32("size", 32) +_size, _sizeErr := readBuffer.ReadUint32("size", 32) if _sizeErr != nil { return nil, errors.Wrap(_sizeErr, "Error parsing 'size' field of AdsDataTypeTableEntry") } size := _size // Simple Field (offset) - _offset, _offsetErr := readBuffer.ReadUint32("offset", 32) +_offset, _offsetErr := readBuffer.ReadUint32("offset", 32) if _offsetErr != nil { return nil, errors.Wrap(_offsetErr, "Error parsing 'offset' field of AdsDataTypeTableEntry") } offset := _offset // Simple Field (dataType) - _dataType, _dataTypeErr := readBuffer.ReadUint32("dataType", 32) +_dataType, _dataTypeErr := readBuffer.ReadUint32("dataType", 32) if _dataTypeErr != nil { return nil, errors.Wrap(_dataTypeErr, "Error parsing 'dataType' field of AdsDataTypeTableEntry") } dataType := _dataType // Simple Field (flags) - _flags, _flagsErr := readBuffer.ReadUint32("flags", 32) +_flags, _flagsErr := readBuffer.ReadUint32("flags", 32) if _flagsErr != nil { return nil, errors.Wrap(_flagsErr, "Error parsing 'flags' field of AdsDataTypeTableEntry") } @@ -400,21 +405,21 @@ func AdsDataTypeTableEntryParseWithBuffer(ctx context.Context, readBuffer utils. } // Simple Field (arrayDimensions) - _arrayDimensions, _arrayDimensionsErr := readBuffer.ReadUint16("arrayDimensions", 16) +_arrayDimensions, _arrayDimensionsErr := readBuffer.ReadUint16("arrayDimensions", 16) if _arrayDimensionsErr != nil { return nil, errors.Wrap(_arrayDimensionsErr, "Error parsing 'arrayDimensions' field of AdsDataTypeTableEntry") } arrayDimensions := _arrayDimensions // Simple Field (numChildren) - _numChildren, _numChildrenErr := readBuffer.ReadUint16("numChildren", 16) +_numChildren, _numChildrenErr := readBuffer.ReadUint16("numChildren", 16) if _numChildrenErr != nil { return nil, errors.Wrap(_numChildrenErr, "Error parsing 'numChildren' field of AdsDataTypeTableEntry") } numChildren := _numChildren // Simple Field (dataTypeName) - _dataTypeName, _dataTypeNameErr := readBuffer.ReadString("dataTypeName", uint32((dataTypeNameLength)*(8)), "UTF-8") +_dataTypeName, _dataTypeNameErr := readBuffer.ReadString("dataTypeName", uint32((dataTypeNameLength) * ((8))), "UTF-8") if _dataTypeNameErr != nil { return nil, errors.Wrap(_dataTypeNameErr, "Error parsing 'dataTypeName' field of AdsDataTypeTableEntry") } @@ -430,7 +435,7 @@ func AdsDataTypeTableEntryParseWithBuffer(ctx context.Context, readBuffer utils. } // Simple Field (simpleTypeName) - _simpleTypeName, _simpleTypeNameErr := readBuffer.ReadString("simpleTypeName", uint32((simpleTypeNameLength)*(8)), "UTF-8") +_simpleTypeName, _simpleTypeNameErr := readBuffer.ReadString("simpleTypeName", uint32((simpleTypeNameLength) * ((8))), "UTF-8") if _simpleTypeNameErr != nil { return nil, errors.Wrap(_simpleTypeNameErr, "Error parsing 'simpleTypeName' field of AdsDataTypeTableEntry") } @@ -446,7 +451,7 @@ func AdsDataTypeTableEntryParseWithBuffer(ctx context.Context, readBuffer utils. } // Simple Field (comment) - _comment, _commentErr := readBuffer.ReadString("comment", uint32((commentLength)*(8)), "UTF-8") +_comment, _commentErr := readBuffer.ReadString("comment", uint32((commentLength) * ((8))), "UTF-8") if _commentErr != nil { return nil, errors.Wrap(_commentErr, "Error parsing 'comment' field of AdsDataTypeTableEntry") } @@ -477,7 +482,7 @@ func AdsDataTypeTableEntryParseWithBuffer(ctx context.Context, readBuffer utils. arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := AdsDataTypeArrayInfoParseWithBuffer(arrayCtx, readBuffer) +_item, _err := AdsDataTypeArrayInfoParseWithBuffer(arrayCtx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'arrayInfo' field of AdsDataTypeTableEntry") } @@ -504,7 +509,7 @@ func AdsDataTypeTableEntryParseWithBuffer(ctx context.Context, readBuffer utils. arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := AdsDataTypeTableChildEntryParseWithBuffer(arrayCtx, readBuffer) +_item, _err := AdsDataTypeTableChildEntryParseWithBuffer(arrayCtx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'children' field of AdsDataTypeTableEntry") } @@ -527,23 +532,23 @@ func AdsDataTypeTableEntryParseWithBuffer(ctx context.Context, readBuffer utils. // Create the instance return &_AdsDataTypeTableEntry{ - EntryLength: entryLength, - Version: version, - HashValue: hashValue, - TypeHashValue: typeHashValue, - Size: size, - Offset: offset, - DataType: dataType, - Flags: flags, - ArrayDimensions: arrayDimensions, - NumChildren: numChildren, - DataTypeName: dataTypeName, - SimpleTypeName: simpleTypeName, - Comment: comment, - ArrayInfo: arrayInfo, - Children: children, - Rest: rest, - }, nil + EntryLength: entryLength, + Version: version, + HashValue: hashValue, + TypeHashValue: typeHashValue, + Size: size, + Offset: offset, + DataType: dataType, + Flags: flags, + ArrayDimensions: arrayDimensions, + NumChildren: numChildren, + DataTypeName: dataTypeName, + SimpleTypeName: simpleTypeName, + Comment: comment, + ArrayInfo: arrayInfo, + Children: children, + Rest: rest, + }, nil } func (m *_AdsDataTypeTableEntry) Serialize() ([]byte, error) { @@ -557,7 +562,7 @@ func (m *_AdsDataTypeTableEntry) Serialize() ([]byte, error) { func (m *_AdsDataTypeTableEntry) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("AdsDataTypeTableEntry"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("AdsDataTypeTableEntry"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for AdsDataTypeTableEntry") } @@ -654,7 +659,7 @@ func (m *_AdsDataTypeTableEntry) SerializeWithWriteBuffer(ctx context.Context, w // Simple Field (dataTypeName) dataTypeName := string(m.GetDataTypeName()) - _dataTypeNameErr := writeBuffer.WriteString("dataTypeName", uint32((uint16(len(m.GetDataTypeName())))*(8)), "UTF-8", (dataTypeName)) + _dataTypeNameErr := writeBuffer.WriteString("dataTypeName", uint32((uint16(len(m.GetDataTypeName()))) * ((8))), "UTF-8", (dataTypeName)) if _dataTypeNameErr != nil { return errors.Wrap(_dataTypeNameErr, "Error serializing 'dataTypeName' field") } @@ -667,7 +672,7 @@ func (m *_AdsDataTypeTableEntry) SerializeWithWriteBuffer(ctx context.Context, w // Simple Field (simpleTypeName) simpleTypeName := string(m.GetSimpleTypeName()) - _simpleTypeNameErr := writeBuffer.WriteString("simpleTypeName", uint32((uint16(len(m.GetSimpleTypeName())))*(8)), "UTF-8", (simpleTypeName)) + _simpleTypeNameErr := writeBuffer.WriteString("simpleTypeName", uint32((uint16(len(m.GetSimpleTypeName()))) * ((8))), "UTF-8", (simpleTypeName)) if _simpleTypeNameErr != nil { return errors.Wrap(_simpleTypeNameErr, "Error serializing 'simpleTypeName' field") } @@ -680,7 +685,7 @@ func (m *_AdsDataTypeTableEntry) SerializeWithWriteBuffer(ctx context.Context, w // Simple Field (comment) comment := string(m.GetComment()) - _commentErr := writeBuffer.WriteString("comment", uint32((uint16(len(m.GetComment())))*(8)), "UTF-8", (comment)) + _commentErr := writeBuffer.WriteString("comment", uint32((uint16(len(m.GetComment()))) * ((8))), "UTF-8", (comment)) if _commentErr != nil { return errors.Wrap(_commentErr, "Error serializing 'comment' field") } @@ -737,6 +742,7 @@ func (m *_AdsDataTypeTableEntry) SerializeWithWriteBuffer(ctx context.Context, w return nil } + func (m *_AdsDataTypeTableEntry) isAdsDataTypeTableEntry() bool { return true } @@ -751,3 +757,6 @@ func (m *_AdsDataTypeTableEntry) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/readwrite/model/AdsDeleteDeviceNotificationRequest.go b/plc4go/protocols/ads/readwrite/model/AdsDeleteDeviceNotificationRequest.go index a3d9588a4a7..1d9fe0af32e 100644 --- a/plc4go/protocols/ads/readwrite/model/AdsDeleteDeviceNotificationRequest.go +++ b/plc4go/protocols/ads/readwrite/model/AdsDeleteDeviceNotificationRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AdsDeleteDeviceNotificationRequest is the corresponding interface of AdsDeleteDeviceNotificationRequest type AdsDeleteDeviceNotificationRequest interface { @@ -46,29 +48,28 @@ type AdsDeleteDeviceNotificationRequestExactly interface { // _AdsDeleteDeviceNotificationRequest is the data-structure of this message type _AdsDeleteDeviceNotificationRequest struct { *_AmsPacket - NotificationHandle uint32 + NotificationHandle uint32 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_AdsDeleteDeviceNotificationRequest) GetCommandId() CommandId { - return CommandId_ADS_DELETE_DEVICE_NOTIFICATION -} +func (m *_AdsDeleteDeviceNotificationRequest) GetCommandId() CommandId { +return CommandId_ADS_DELETE_DEVICE_NOTIFICATION} -func (m *_AdsDeleteDeviceNotificationRequest) GetResponse() bool { - return bool(false) -} +func (m *_AdsDeleteDeviceNotificationRequest) GetResponse() bool { +return bool(false)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AdsDeleteDeviceNotificationRequest) InitializeParent(parent AmsPacket, targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) { - m.TargetAmsNetId = targetAmsNetId +func (m *_AdsDeleteDeviceNotificationRequest) InitializeParent(parent AmsPacket , targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) { m.TargetAmsNetId = targetAmsNetId m.TargetAmsPort = targetAmsPort m.SourceAmsNetId = sourceAmsNetId m.SourceAmsPort = sourceAmsPort @@ -76,10 +77,9 @@ func (m *_AdsDeleteDeviceNotificationRequest) InitializeParent(parent AmsPacket, m.InvokeId = invokeId } -func (m *_AdsDeleteDeviceNotificationRequest) GetParent() AmsPacket { +func (m *_AdsDeleteDeviceNotificationRequest) GetParent() AmsPacket { return m._AmsPacket } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -94,11 +94,12 @@ func (m *_AdsDeleteDeviceNotificationRequest) GetNotificationHandle() uint32 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAdsDeleteDeviceNotificationRequest factory function for _AdsDeleteDeviceNotificationRequest -func NewAdsDeleteDeviceNotificationRequest(notificationHandle uint32, targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) *_AdsDeleteDeviceNotificationRequest { +func NewAdsDeleteDeviceNotificationRequest( notificationHandle uint32 , targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) *_AdsDeleteDeviceNotificationRequest { _result := &_AdsDeleteDeviceNotificationRequest{ NotificationHandle: notificationHandle, - _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), + _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), } _result._AmsPacket._AmsPacketChildRequirements = _result return _result @@ -106,7 +107,7 @@ func NewAdsDeleteDeviceNotificationRequest(notificationHandle uint32, targetAmsN // Deprecated: use the interface for direct cast func CastAdsDeleteDeviceNotificationRequest(structType interface{}) AdsDeleteDeviceNotificationRequest { - if casted, ok := structType.(AdsDeleteDeviceNotificationRequest); ok { + if casted, ok := structType.(AdsDeleteDeviceNotificationRequest); ok { return casted } if casted, ok := structType.(*AdsDeleteDeviceNotificationRequest); ok { @@ -123,11 +124,12 @@ func (m *_AdsDeleteDeviceNotificationRequest) GetLengthInBits(ctx context.Contex lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (notificationHandle) - lengthInBits += 32 + lengthInBits += 32; return lengthInBits } + func (m *_AdsDeleteDeviceNotificationRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -146,7 +148,7 @@ func AdsDeleteDeviceNotificationRequestParseWithBuffer(ctx context.Context, read _ = currentPos // Simple Field (notificationHandle) - _notificationHandle, _notificationHandleErr := readBuffer.ReadUint32("notificationHandle", 32) +_notificationHandle, _notificationHandleErr := readBuffer.ReadUint32("notificationHandle", 32) if _notificationHandleErr != nil { return nil, errors.Wrap(_notificationHandleErr, "Error parsing 'notificationHandle' field of AdsDeleteDeviceNotificationRequest") } @@ -158,7 +160,8 @@ func AdsDeleteDeviceNotificationRequestParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_AdsDeleteDeviceNotificationRequest{ - _AmsPacket: &_AmsPacket{}, + _AmsPacket: &_AmsPacket{ + }, NotificationHandle: notificationHandle, } _child._AmsPacket._AmsPacketChildRequirements = _child @@ -181,12 +184,12 @@ func (m *_AdsDeleteDeviceNotificationRequest) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for AdsDeleteDeviceNotificationRequest") } - // Simple Field (notificationHandle) - notificationHandle := uint32(m.GetNotificationHandle()) - _notificationHandleErr := writeBuffer.WriteUint32("notificationHandle", 32, (notificationHandle)) - if _notificationHandleErr != nil { - return errors.Wrap(_notificationHandleErr, "Error serializing 'notificationHandle' field") - } + // Simple Field (notificationHandle) + notificationHandle := uint32(m.GetNotificationHandle()) + _notificationHandleErr := writeBuffer.WriteUint32("notificationHandle", 32, (notificationHandle)) + if _notificationHandleErr != nil { + return errors.Wrap(_notificationHandleErr, "Error serializing 'notificationHandle' field") + } if popErr := writeBuffer.PopContext("AdsDeleteDeviceNotificationRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for AdsDeleteDeviceNotificationRequest") @@ -196,6 +199,7 @@ func (m *_AdsDeleteDeviceNotificationRequest) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AdsDeleteDeviceNotificationRequest) isAdsDeleteDeviceNotificationRequest() bool { return true } @@ -210,3 +214,6 @@ func (m *_AdsDeleteDeviceNotificationRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/readwrite/model/AdsDeleteDeviceNotificationResponse.go b/plc4go/protocols/ads/readwrite/model/AdsDeleteDeviceNotificationResponse.go index bec09b916c8..a4ac6b8aceb 100644 --- a/plc4go/protocols/ads/readwrite/model/AdsDeleteDeviceNotificationResponse.go +++ b/plc4go/protocols/ads/readwrite/model/AdsDeleteDeviceNotificationResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AdsDeleteDeviceNotificationResponse is the corresponding interface of AdsDeleteDeviceNotificationResponse type AdsDeleteDeviceNotificationResponse interface { @@ -46,29 +48,28 @@ type AdsDeleteDeviceNotificationResponseExactly interface { // _AdsDeleteDeviceNotificationResponse is the data-structure of this message type _AdsDeleteDeviceNotificationResponse struct { *_AmsPacket - Result ReturnCode + Result ReturnCode } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_AdsDeleteDeviceNotificationResponse) GetCommandId() CommandId { - return CommandId_ADS_DELETE_DEVICE_NOTIFICATION -} +func (m *_AdsDeleteDeviceNotificationResponse) GetCommandId() CommandId { +return CommandId_ADS_DELETE_DEVICE_NOTIFICATION} -func (m *_AdsDeleteDeviceNotificationResponse) GetResponse() bool { - return bool(true) -} +func (m *_AdsDeleteDeviceNotificationResponse) GetResponse() bool { +return bool(true)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AdsDeleteDeviceNotificationResponse) InitializeParent(parent AmsPacket, targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) { - m.TargetAmsNetId = targetAmsNetId +func (m *_AdsDeleteDeviceNotificationResponse) InitializeParent(parent AmsPacket , targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) { m.TargetAmsNetId = targetAmsNetId m.TargetAmsPort = targetAmsPort m.SourceAmsNetId = sourceAmsNetId m.SourceAmsPort = sourceAmsPort @@ -76,10 +77,9 @@ func (m *_AdsDeleteDeviceNotificationResponse) InitializeParent(parent AmsPacket m.InvokeId = invokeId } -func (m *_AdsDeleteDeviceNotificationResponse) GetParent() AmsPacket { +func (m *_AdsDeleteDeviceNotificationResponse) GetParent() AmsPacket { return m._AmsPacket } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -94,11 +94,12 @@ func (m *_AdsDeleteDeviceNotificationResponse) GetResult() ReturnCode { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAdsDeleteDeviceNotificationResponse factory function for _AdsDeleteDeviceNotificationResponse -func NewAdsDeleteDeviceNotificationResponse(result ReturnCode, targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) *_AdsDeleteDeviceNotificationResponse { +func NewAdsDeleteDeviceNotificationResponse( result ReturnCode , targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) *_AdsDeleteDeviceNotificationResponse { _result := &_AdsDeleteDeviceNotificationResponse{ - Result: result, - _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), + Result: result, + _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), } _result._AmsPacket._AmsPacketChildRequirements = _result return _result @@ -106,7 +107,7 @@ func NewAdsDeleteDeviceNotificationResponse(result ReturnCode, targetAmsNetId Am // Deprecated: use the interface for direct cast func CastAdsDeleteDeviceNotificationResponse(structType interface{}) AdsDeleteDeviceNotificationResponse { - if casted, ok := structType.(AdsDeleteDeviceNotificationResponse); ok { + if casted, ok := structType.(AdsDeleteDeviceNotificationResponse); ok { return casted } if casted, ok := structType.(*AdsDeleteDeviceNotificationResponse); ok { @@ -128,6 +129,7 @@ func (m *_AdsDeleteDeviceNotificationResponse) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_AdsDeleteDeviceNotificationResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -149,7 +151,7 @@ func AdsDeleteDeviceNotificationResponseParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("result"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for result") } - _result, _resultErr := ReturnCodeParseWithBuffer(ctx, readBuffer) +_result, _resultErr := ReturnCodeParseWithBuffer(ctx, readBuffer) if _resultErr != nil { return nil, errors.Wrap(_resultErr, "Error parsing 'result' field of AdsDeleteDeviceNotificationResponse") } @@ -164,8 +166,9 @@ func AdsDeleteDeviceNotificationResponseParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_AdsDeleteDeviceNotificationResponse{ - _AmsPacket: &_AmsPacket{}, - Result: result, + _AmsPacket: &_AmsPacket{ + }, + Result: result, } _child._AmsPacket._AmsPacketChildRequirements = _child return _child, nil @@ -187,17 +190,17 @@ func (m *_AdsDeleteDeviceNotificationResponse) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for AdsDeleteDeviceNotificationResponse") } - // Simple Field (result) - if pushErr := writeBuffer.PushContext("result"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for result") - } - _resultErr := writeBuffer.WriteSerializable(ctx, m.GetResult()) - if popErr := writeBuffer.PopContext("result"); popErr != nil { - return errors.Wrap(popErr, "Error popping for result") - } - if _resultErr != nil { - return errors.Wrap(_resultErr, "Error serializing 'result' field") - } + // Simple Field (result) + if pushErr := writeBuffer.PushContext("result"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for result") + } + _resultErr := writeBuffer.WriteSerializable(ctx, m.GetResult()) + if popErr := writeBuffer.PopContext("result"); popErr != nil { + return errors.Wrap(popErr, "Error popping for result") + } + if _resultErr != nil { + return errors.Wrap(_resultErr, "Error serializing 'result' field") + } if popErr := writeBuffer.PopContext("AdsDeleteDeviceNotificationResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for AdsDeleteDeviceNotificationResponse") @@ -207,6 +210,7 @@ func (m *_AdsDeleteDeviceNotificationResponse) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AdsDeleteDeviceNotificationResponse) isAdsDeleteDeviceNotificationResponse() bool { return true } @@ -221,3 +225,6 @@ func (m *_AdsDeleteDeviceNotificationResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/readwrite/model/AdsDeviceNotificationRequest.go b/plc4go/protocols/ads/readwrite/model/AdsDeviceNotificationRequest.go index 188a09d0ec4..6df7b2d924f 100644 --- a/plc4go/protocols/ads/readwrite/model/AdsDeviceNotificationRequest.go +++ b/plc4go/protocols/ads/readwrite/model/AdsDeviceNotificationRequest.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AdsDeviceNotificationRequest is the corresponding interface of AdsDeviceNotificationRequest type AdsDeviceNotificationRequest interface { @@ -51,31 +53,30 @@ type AdsDeviceNotificationRequestExactly interface { // _AdsDeviceNotificationRequest is the data-structure of this message type _AdsDeviceNotificationRequest struct { *_AmsPacket - Length uint32 - Stamps uint32 - AdsStampHeaders []AdsStampHeader + Length uint32 + Stamps uint32 + AdsStampHeaders []AdsStampHeader } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_AdsDeviceNotificationRequest) GetCommandId() CommandId { - return CommandId_ADS_DEVICE_NOTIFICATION -} +func (m *_AdsDeviceNotificationRequest) GetCommandId() CommandId { +return CommandId_ADS_DEVICE_NOTIFICATION} -func (m *_AdsDeviceNotificationRequest) GetResponse() bool { - return bool(false) -} +func (m *_AdsDeviceNotificationRequest) GetResponse() bool { +return bool(false)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AdsDeviceNotificationRequest) InitializeParent(parent AmsPacket, targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) { - m.TargetAmsNetId = targetAmsNetId +func (m *_AdsDeviceNotificationRequest) InitializeParent(parent AmsPacket , targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) { m.TargetAmsNetId = targetAmsNetId m.TargetAmsPort = targetAmsPort m.SourceAmsNetId = sourceAmsNetId m.SourceAmsPort = sourceAmsPort @@ -83,10 +84,9 @@ func (m *_AdsDeviceNotificationRequest) InitializeParent(parent AmsPacket, targe m.InvokeId = invokeId } -func (m *_AdsDeviceNotificationRequest) GetParent() AmsPacket { +func (m *_AdsDeviceNotificationRequest) GetParent() AmsPacket { return m._AmsPacket } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -109,13 +109,14 @@ func (m *_AdsDeviceNotificationRequest) GetAdsStampHeaders() []AdsStampHeader { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAdsDeviceNotificationRequest factory function for _AdsDeviceNotificationRequest -func NewAdsDeviceNotificationRequest(length uint32, stamps uint32, adsStampHeaders []AdsStampHeader, targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) *_AdsDeviceNotificationRequest { +func NewAdsDeviceNotificationRequest( length uint32 , stamps uint32 , adsStampHeaders []AdsStampHeader , targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) *_AdsDeviceNotificationRequest { _result := &_AdsDeviceNotificationRequest{ - Length: length, - Stamps: stamps, + Length: length, + Stamps: stamps, AdsStampHeaders: adsStampHeaders, - _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), + _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), } _result._AmsPacket._AmsPacketChildRequirements = _result return _result @@ -123,7 +124,7 @@ func NewAdsDeviceNotificationRequest(length uint32, stamps uint32, adsStampHeade // Deprecated: use the interface for direct cast func CastAdsDeviceNotificationRequest(structType interface{}) AdsDeviceNotificationRequest { - if casted, ok := structType.(AdsDeviceNotificationRequest); ok { + if casted, ok := structType.(AdsDeviceNotificationRequest); ok { return casted } if casted, ok := structType.(*AdsDeviceNotificationRequest); ok { @@ -140,10 +141,10 @@ func (m *_AdsDeviceNotificationRequest) GetLengthInBits(ctx context.Context) uin lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (length) - lengthInBits += 32 + lengthInBits += 32; // Simple field (stamps) - lengthInBits += 32 + lengthInBits += 32; // Array field if len(m.AdsStampHeaders) > 0 { @@ -151,13 +152,14 @@ func (m *_AdsDeviceNotificationRequest) GetLengthInBits(ctx context.Context) uin arrayCtx := spiContext.CreateArrayContext(ctx, len(m.AdsStampHeaders), _curItem) _ = arrayCtx _ = _curItem - lengthInBits += element.(interface{ GetLengthInBits(context.Context) uint16 }).GetLengthInBits(arrayCtx) + lengthInBits += element.(interface{GetLengthInBits(context.Context) uint16}).GetLengthInBits(arrayCtx) } } return lengthInBits } + func (m *_AdsDeviceNotificationRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -176,14 +178,14 @@ func AdsDeviceNotificationRequestParseWithBuffer(ctx context.Context, readBuffer _ = currentPos // Simple Field (length) - _length, _lengthErr := readBuffer.ReadUint32("length", 32) +_length, _lengthErr := readBuffer.ReadUint32("length", 32) if _lengthErr != nil { return nil, errors.Wrap(_lengthErr, "Error parsing 'length' field of AdsDeviceNotificationRequest") } length := _length // Simple Field (stamps) - _stamps, _stampsErr := readBuffer.ReadUint32("stamps", 32) +_stamps, _stampsErr := readBuffer.ReadUint32("stamps", 32) if _stampsErr != nil { return nil, errors.Wrap(_stampsErr, "Error parsing 'stamps' field of AdsDeviceNotificationRequest") } @@ -205,7 +207,7 @@ func AdsDeviceNotificationRequestParseWithBuffer(ctx context.Context, readBuffer arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := AdsStampHeaderParseWithBuffer(arrayCtx, readBuffer) +_item, _err := AdsStampHeaderParseWithBuffer(arrayCtx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'adsStampHeaders' field of AdsDeviceNotificationRequest") } @@ -222,9 +224,10 @@ func AdsDeviceNotificationRequestParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_AdsDeviceNotificationRequest{ - _AmsPacket: &_AmsPacket{}, - Length: length, - Stamps: stamps, + _AmsPacket: &_AmsPacket{ + }, + Length: length, + Stamps: stamps, AdsStampHeaders: adsStampHeaders, } _child._AmsPacket._AmsPacketChildRequirements = _child @@ -247,36 +250,36 @@ func (m *_AdsDeviceNotificationRequest) SerializeWithWriteBuffer(ctx context.Con return errors.Wrap(pushErr, "Error pushing for AdsDeviceNotificationRequest") } - // Simple Field (length) - length := uint32(m.GetLength()) - _lengthErr := writeBuffer.WriteUint32("length", 32, (length)) - if _lengthErr != nil { - return errors.Wrap(_lengthErr, "Error serializing 'length' field") - } + // Simple Field (length) + length := uint32(m.GetLength()) + _lengthErr := writeBuffer.WriteUint32("length", 32, (length)) + if _lengthErr != nil { + return errors.Wrap(_lengthErr, "Error serializing 'length' field") + } - // Simple Field (stamps) - stamps := uint32(m.GetStamps()) - _stampsErr := writeBuffer.WriteUint32("stamps", 32, (stamps)) - if _stampsErr != nil { - return errors.Wrap(_stampsErr, "Error serializing 'stamps' field") - } + // Simple Field (stamps) + stamps := uint32(m.GetStamps()) + _stampsErr := writeBuffer.WriteUint32("stamps", 32, (stamps)) + if _stampsErr != nil { + return errors.Wrap(_stampsErr, "Error serializing 'stamps' field") + } - // Array Field (adsStampHeaders) - if pushErr := writeBuffer.PushContext("adsStampHeaders", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for adsStampHeaders") - } - for _curItem, _element := range m.GetAdsStampHeaders() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAdsStampHeaders()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'adsStampHeaders' field") - } - } - if popErr := writeBuffer.PopContext("adsStampHeaders", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for adsStampHeaders") + // Array Field (adsStampHeaders) + if pushErr := writeBuffer.PushContext("adsStampHeaders", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for adsStampHeaders") + } + for _curItem, _element := range m.GetAdsStampHeaders() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAdsStampHeaders()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'adsStampHeaders' field") } + } + if popErr := writeBuffer.PopContext("adsStampHeaders", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for adsStampHeaders") + } if popErr := writeBuffer.PopContext("AdsDeviceNotificationRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for AdsDeviceNotificationRequest") @@ -286,6 +289,7 @@ func (m *_AdsDeviceNotificationRequest) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AdsDeviceNotificationRequest) isAdsDeviceNotificationRequest() bool { return true } @@ -300,3 +304,6 @@ func (m *_AdsDeviceNotificationRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/readwrite/model/AdsDeviceNotificationResponse.go b/plc4go/protocols/ads/readwrite/model/AdsDeviceNotificationResponse.go index 54f8c681043..3dca28282b3 100644 --- a/plc4go/protocols/ads/readwrite/model/AdsDeviceNotificationResponse.go +++ b/plc4go/protocols/ads/readwrite/model/AdsDeviceNotificationResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AdsDeviceNotificationResponse is the corresponding interface of AdsDeviceNotificationResponse type AdsDeviceNotificationResponse interface { @@ -46,26 +48,25 @@ type _AdsDeviceNotificationResponse struct { *_AmsPacket } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_AdsDeviceNotificationResponse) GetCommandId() CommandId { - return CommandId_ADS_DEVICE_NOTIFICATION -} +func (m *_AdsDeviceNotificationResponse) GetCommandId() CommandId { +return CommandId_ADS_DEVICE_NOTIFICATION} -func (m *_AdsDeviceNotificationResponse) GetResponse() bool { - return bool(true) -} +func (m *_AdsDeviceNotificationResponse) GetResponse() bool { +return bool(true)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AdsDeviceNotificationResponse) InitializeParent(parent AmsPacket, targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) { - m.TargetAmsNetId = targetAmsNetId +func (m *_AdsDeviceNotificationResponse) InitializeParent(parent AmsPacket , targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) { m.TargetAmsNetId = targetAmsNetId m.TargetAmsPort = targetAmsPort m.SourceAmsNetId = sourceAmsNetId m.SourceAmsPort = sourceAmsPort @@ -73,14 +74,15 @@ func (m *_AdsDeviceNotificationResponse) InitializeParent(parent AmsPacket, targ m.InvokeId = invokeId } -func (m *_AdsDeviceNotificationResponse) GetParent() AmsPacket { +func (m *_AdsDeviceNotificationResponse) GetParent() AmsPacket { return m._AmsPacket } + // NewAdsDeviceNotificationResponse factory function for _AdsDeviceNotificationResponse -func NewAdsDeviceNotificationResponse(targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) *_AdsDeviceNotificationResponse { +func NewAdsDeviceNotificationResponse( targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) *_AdsDeviceNotificationResponse { _result := &_AdsDeviceNotificationResponse{ - _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), + _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), } _result._AmsPacket._AmsPacketChildRequirements = _result return _result @@ -88,7 +90,7 @@ func NewAdsDeviceNotificationResponse(targetAmsNetId AmsNetId, targetAmsPort uin // Deprecated: use the interface for direct cast func CastAdsDeviceNotificationResponse(structType interface{}) AdsDeviceNotificationResponse { - if casted, ok := structType.(AdsDeviceNotificationResponse); ok { + if casted, ok := structType.(AdsDeviceNotificationResponse); ok { return casted } if casted, ok := structType.(*AdsDeviceNotificationResponse); ok { @@ -107,6 +109,7 @@ func (m *_AdsDeviceNotificationResponse) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_AdsDeviceNotificationResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -130,7 +133,8 @@ func AdsDeviceNotificationResponseParseWithBuffer(ctx context.Context, readBuffe // Create a partially initialized instance _child := &_AdsDeviceNotificationResponse{ - _AmsPacket: &_AmsPacket{}, + _AmsPacket: &_AmsPacket{ + }, } _child._AmsPacket._AmsPacketChildRequirements = _child return _child, nil @@ -160,6 +164,7 @@ func (m *_AdsDeviceNotificationResponse) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AdsDeviceNotificationResponse) isAdsDeviceNotificationResponse() bool { return true } @@ -174,3 +179,6 @@ func (m *_AdsDeviceNotificationResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/readwrite/model/AdsInvalidRequest.go b/plc4go/protocols/ads/readwrite/model/AdsInvalidRequest.go index 187fa74c85c..9d395590577 100644 --- a/plc4go/protocols/ads/readwrite/model/AdsInvalidRequest.go +++ b/plc4go/protocols/ads/readwrite/model/AdsInvalidRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AdsInvalidRequest is the corresponding interface of AdsInvalidRequest type AdsInvalidRequest interface { @@ -46,26 +48,25 @@ type _AdsInvalidRequest struct { *_AmsPacket } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_AdsInvalidRequest) GetCommandId() CommandId { - return CommandId_INVALID -} +func (m *_AdsInvalidRequest) GetCommandId() CommandId { +return CommandId_INVALID} -func (m *_AdsInvalidRequest) GetResponse() bool { - return bool(false) -} +func (m *_AdsInvalidRequest) GetResponse() bool { +return bool(false)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AdsInvalidRequest) InitializeParent(parent AmsPacket, targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) { - m.TargetAmsNetId = targetAmsNetId +func (m *_AdsInvalidRequest) InitializeParent(parent AmsPacket , targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) { m.TargetAmsNetId = targetAmsNetId m.TargetAmsPort = targetAmsPort m.SourceAmsNetId = sourceAmsNetId m.SourceAmsPort = sourceAmsPort @@ -73,14 +74,15 @@ func (m *_AdsInvalidRequest) InitializeParent(parent AmsPacket, targetAmsNetId A m.InvokeId = invokeId } -func (m *_AdsInvalidRequest) GetParent() AmsPacket { +func (m *_AdsInvalidRequest) GetParent() AmsPacket { return m._AmsPacket } + // NewAdsInvalidRequest factory function for _AdsInvalidRequest -func NewAdsInvalidRequest(targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) *_AdsInvalidRequest { +func NewAdsInvalidRequest( targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) *_AdsInvalidRequest { _result := &_AdsInvalidRequest{ - _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), + _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), } _result._AmsPacket._AmsPacketChildRequirements = _result return _result @@ -88,7 +90,7 @@ func NewAdsInvalidRequest(targetAmsNetId AmsNetId, targetAmsPort uint16, sourceA // Deprecated: use the interface for direct cast func CastAdsInvalidRequest(structType interface{}) AdsInvalidRequest { - if casted, ok := structType.(AdsInvalidRequest); ok { + if casted, ok := structType.(AdsInvalidRequest); ok { return casted } if casted, ok := structType.(*AdsInvalidRequest); ok { @@ -107,6 +109,7 @@ func (m *_AdsInvalidRequest) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_AdsInvalidRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -130,7 +133,8 @@ func AdsInvalidRequestParseWithBuffer(ctx context.Context, readBuffer utils.Read // Create a partially initialized instance _child := &_AdsInvalidRequest{ - _AmsPacket: &_AmsPacket{}, + _AmsPacket: &_AmsPacket{ + }, } _child._AmsPacket._AmsPacketChildRequirements = _child return _child, nil @@ -160,6 +164,7 @@ func (m *_AdsInvalidRequest) SerializeWithWriteBuffer(ctx context.Context, write return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AdsInvalidRequest) isAdsInvalidRequest() bool { return true } @@ -174,3 +179,6 @@ func (m *_AdsInvalidRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/readwrite/model/AdsInvalidResponse.go b/plc4go/protocols/ads/readwrite/model/AdsInvalidResponse.go index 7ce244bf07a..59a5a2df002 100644 --- a/plc4go/protocols/ads/readwrite/model/AdsInvalidResponse.go +++ b/plc4go/protocols/ads/readwrite/model/AdsInvalidResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AdsInvalidResponse is the corresponding interface of AdsInvalidResponse type AdsInvalidResponse interface { @@ -46,26 +48,25 @@ type _AdsInvalidResponse struct { *_AmsPacket } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_AdsInvalidResponse) GetCommandId() CommandId { - return CommandId_INVALID -} +func (m *_AdsInvalidResponse) GetCommandId() CommandId { +return CommandId_INVALID} -func (m *_AdsInvalidResponse) GetResponse() bool { - return bool(true) -} +func (m *_AdsInvalidResponse) GetResponse() bool { +return bool(true)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AdsInvalidResponse) InitializeParent(parent AmsPacket, targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) { - m.TargetAmsNetId = targetAmsNetId +func (m *_AdsInvalidResponse) InitializeParent(parent AmsPacket , targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) { m.TargetAmsNetId = targetAmsNetId m.TargetAmsPort = targetAmsPort m.SourceAmsNetId = sourceAmsNetId m.SourceAmsPort = sourceAmsPort @@ -73,14 +74,15 @@ func (m *_AdsInvalidResponse) InitializeParent(parent AmsPacket, targetAmsNetId m.InvokeId = invokeId } -func (m *_AdsInvalidResponse) GetParent() AmsPacket { +func (m *_AdsInvalidResponse) GetParent() AmsPacket { return m._AmsPacket } + // NewAdsInvalidResponse factory function for _AdsInvalidResponse -func NewAdsInvalidResponse(targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) *_AdsInvalidResponse { +func NewAdsInvalidResponse( targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) *_AdsInvalidResponse { _result := &_AdsInvalidResponse{ - _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), + _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), } _result._AmsPacket._AmsPacketChildRequirements = _result return _result @@ -88,7 +90,7 @@ func NewAdsInvalidResponse(targetAmsNetId AmsNetId, targetAmsPort uint16, source // Deprecated: use the interface for direct cast func CastAdsInvalidResponse(structType interface{}) AdsInvalidResponse { - if casted, ok := structType.(AdsInvalidResponse); ok { + if casted, ok := structType.(AdsInvalidResponse); ok { return casted } if casted, ok := structType.(*AdsInvalidResponse); ok { @@ -107,6 +109,7 @@ func (m *_AdsInvalidResponse) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_AdsInvalidResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -130,7 +133,8 @@ func AdsInvalidResponseParseWithBuffer(ctx context.Context, readBuffer utils.Rea // Create a partially initialized instance _child := &_AdsInvalidResponse{ - _AmsPacket: &_AmsPacket{}, + _AmsPacket: &_AmsPacket{ + }, } _child._AmsPacket._AmsPacketChildRequirements = _child return _child, nil @@ -160,6 +164,7 @@ func (m *_AdsInvalidResponse) SerializeWithWriteBuffer(ctx context.Context, writ return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AdsInvalidResponse) isAdsInvalidResponse() bool { return true } @@ -174,3 +179,6 @@ func (m *_AdsInvalidResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/readwrite/model/AdsMultiRequestItem.go b/plc4go/protocols/ads/readwrite/model/AdsMultiRequestItem.go index 5a518f810d1..a85a1b7c46f 100644 --- a/plc4go/protocols/ads/readwrite/model/AdsMultiRequestItem.go +++ b/plc4go/protocols/ads/readwrite/model/AdsMultiRequestItem.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AdsMultiRequestItem is the corresponding interface of AdsMultiRequestItem type AdsMultiRequestItem interface { @@ -53,6 +55,7 @@ type _AdsMultiRequestItemChildRequirements interface { GetIndexGroup() uint32 } + type AdsMultiRequestItemParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child AdsMultiRequestItem, serializeChildFunction func() error) error GetTypeName() string @@ -60,21 +63,22 @@ type AdsMultiRequestItemParent interface { type AdsMultiRequestItemChild interface { utils.Serializable - InitializeParent(parent AdsMultiRequestItem) +InitializeParent(parent AdsMultiRequestItem ) GetParent() *AdsMultiRequestItem GetTypeName() string AdsMultiRequestItem } + // NewAdsMultiRequestItem factory function for _AdsMultiRequestItem -func NewAdsMultiRequestItem() *_AdsMultiRequestItem { - return &_AdsMultiRequestItem{} +func NewAdsMultiRequestItem( ) *_AdsMultiRequestItem { +return &_AdsMultiRequestItem{ } } // Deprecated: use the interface for direct cast func CastAdsMultiRequestItem(structType interface{}) AdsMultiRequestItem { - if casted, ok := structType.(AdsMultiRequestItem); ok { + if casted, ok := structType.(AdsMultiRequestItem); ok { return casted } if casted, ok := structType.(*AdsMultiRequestItem); ok { @@ -87,6 +91,7 @@ func (m *_AdsMultiRequestItem) GetTypeName() string { return "AdsMultiRequestItem" } + func (m *_AdsMultiRequestItem) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -113,18 +118,18 @@ func AdsMultiRequestItemParseWithBuffer(ctx context.Context, readBuffer utils.Re // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type AdsMultiRequestItemChildSerializeRequirement interface { AdsMultiRequestItem - InitializeParent(AdsMultiRequestItem) + InitializeParent(AdsMultiRequestItem ) GetParent() AdsMultiRequestItem } var _childTemp interface{} var _child AdsMultiRequestItemChildSerializeRequirement var typeSwitchError error switch { - case indexGroup == uint32(61568): // AdsMultiRequestItemRead +case indexGroup == uint32(61568) : // AdsMultiRequestItemRead _childTemp, typeSwitchError = AdsMultiRequestItemReadParseWithBuffer(ctx, readBuffer, indexGroup) - case indexGroup == uint32(61569): // AdsMultiRequestItemWrite +case indexGroup == uint32(61569) : // AdsMultiRequestItemWrite _childTemp, typeSwitchError = AdsMultiRequestItemWriteParseWithBuffer(ctx, readBuffer, indexGroup) - case indexGroup == uint32(61570): // AdsMultiRequestItemReadWrite +case indexGroup == uint32(61570) : // AdsMultiRequestItemReadWrite _childTemp, typeSwitchError = AdsMultiRequestItemReadWriteParseWithBuffer(ctx, readBuffer, indexGroup) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [indexGroup=%v]", indexGroup) @@ -139,7 +144,7 @@ func AdsMultiRequestItemParseWithBuffer(ctx context.Context, readBuffer utils.Re } // Finish initializing - _child.InitializeParent(_child) +_child.InitializeParent(_child ) return _child, nil } @@ -149,7 +154,7 @@ func (pm *_AdsMultiRequestItem) SerializeParent(ctx context.Context, writeBuffer _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("AdsMultiRequestItem"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("AdsMultiRequestItem"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for AdsMultiRequestItem") } @@ -164,6 +169,7 @@ func (pm *_AdsMultiRequestItem) SerializeParent(ctx context.Context, writeBuffer return nil } + func (m *_AdsMultiRequestItem) isAdsMultiRequestItem() bool { return true } @@ -178,3 +184,6 @@ func (m *_AdsMultiRequestItem) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/readwrite/model/AdsMultiRequestItemRead.go b/plc4go/protocols/ads/readwrite/model/AdsMultiRequestItemRead.go index bc5d9eafc4f..8d52171e5cd 100644 --- a/plc4go/protocols/ads/readwrite/model/AdsMultiRequestItemRead.go +++ b/plc4go/protocols/ads/readwrite/model/AdsMultiRequestItemRead.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AdsMultiRequestItemRead is the corresponding interface of AdsMultiRequestItemRead type AdsMultiRequestItemRead interface { @@ -50,31 +52,31 @@ type AdsMultiRequestItemReadExactly interface { // _AdsMultiRequestItemRead is the data-structure of this message type _AdsMultiRequestItemRead struct { *_AdsMultiRequestItem - ItemIndexGroup uint32 - ItemIndexOffset uint32 - ItemReadLength uint32 + ItemIndexGroup uint32 + ItemIndexOffset uint32 + ItemReadLength uint32 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_AdsMultiRequestItemRead) GetIndexGroup() uint32 { - return uint32(61568) -} +func (m *_AdsMultiRequestItemRead) GetIndexGroup() uint32 { +return uint32(61568)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AdsMultiRequestItemRead) InitializeParent(parent AdsMultiRequestItem) {} +func (m *_AdsMultiRequestItemRead) InitializeParent(parent AdsMultiRequestItem ) {} -func (m *_AdsMultiRequestItemRead) GetParent() AdsMultiRequestItem { +func (m *_AdsMultiRequestItemRead) GetParent() AdsMultiRequestItem { return m._AdsMultiRequestItem } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -97,13 +99,14 @@ func (m *_AdsMultiRequestItemRead) GetItemReadLength() uint32 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAdsMultiRequestItemRead factory function for _AdsMultiRequestItemRead -func NewAdsMultiRequestItemRead(itemIndexGroup uint32, itemIndexOffset uint32, itemReadLength uint32) *_AdsMultiRequestItemRead { +func NewAdsMultiRequestItemRead( itemIndexGroup uint32 , itemIndexOffset uint32 , itemReadLength uint32 ) *_AdsMultiRequestItemRead { _result := &_AdsMultiRequestItemRead{ - ItemIndexGroup: itemIndexGroup, - ItemIndexOffset: itemIndexOffset, - ItemReadLength: itemReadLength, - _AdsMultiRequestItem: NewAdsMultiRequestItem(), + ItemIndexGroup: itemIndexGroup, + ItemIndexOffset: itemIndexOffset, + ItemReadLength: itemReadLength, + _AdsMultiRequestItem: NewAdsMultiRequestItem(), } _result._AdsMultiRequestItem._AdsMultiRequestItemChildRequirements = _result return _result @@ -111,7 +114,7 @@ func NewAdsMultiRequestItemRead(itemIndexGroup uint32, itemIndexOffset uint32, i // Deprecated: use the interface for direct cast func CastAdsMultiRequestItemRead(structType interface{}) AdsMultiRequestItemRead { - if casted, ok := structType.(AdsMultiRequestItemRead); ok { + if casted, ok := structType.(AdsMultiRequestItemRead); ok { return casted } if casted, ok := structType.(*AdsMultiRequestItemRead); ok { @@ -128,17 +131,18 @@ func (m *_AdsMultiRequestItemRead) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (itemIndexGroup) - lengthInBits += 32 + lengthInBits += 32; // Simple field (itemIndexOffset) - lengthInBits += 32 + lengthInBits += 32; // Simple field (itemReadLength) - lengthInBits += 32 + lengthInBits += 32; return lengthInBits } + func (m *_AdsMultiRequestItemRead) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -157,21 +161,21 @@ func AdsMultiRequestItemReadParseWithBuffer(ctx context.Context, readBuffer util _ = currentPos // Simple Field (itemIndexGroup) - _itemIndexGroup, _itemIndexGroupErr := readBuffer.ReadUint32("itemIndexGroup", 32) +_itemIndexGroup, _itemIndexGroupErr := readBuffer.ReadUint32("itemIndexGroup", 32) if _itemIndexGroupErr != nil { return nil, errors.Wrap(_itemIndexGroupErr, "Error parsing 'itemIndexGroup' field of AdsMultiRequestItemRead") } itemIndexGroup := _itemIndexGroup // Simple Field (itemIndexOffset) - _itemIndexOffset, _itemIndexOffsetErr := readBuffer.ReadUint32("itemIndexOffset", 32) +_itemIndexOffset, _itemIndexOffsetErr := readBuffer.ReadUint32("itemIndexOffset", 32) if _itemIndexOffsetErr != nil { return nil, errors.Wrap(_itemIndexOffsetErr, "Error parsing 'itemIndexOffset' field of AdsMultiRequestItemRead") } itemIndexOffset := _itemIndexOffset // Simple Field (itemReadLength) - _itemReadLength, _itemReadLengthErr := readBuffer.ReadUint32("itemReadLength", 32) +_itemReadLength, _itemReadLengthErr := readBuffer.ReadUint32("itemReadLength", 32) if _itemReadLengthErr != nil { return nil, errors.Wrap(_itemReadLengthErr, "Error parsing 'itemReadLength' field of AdsMultiRequestItemRead") } @@ -183,10 +187,11 @@ func AdsMultiRequestItemReadParseWithBuffer(ctx context.Context, readBuffer util // Create a partially initialized instance _child := &_AdsMultiRequestItemRead{ - _AdsMultiRequestItem: &_AdsMultiRequestItem{}, - ItemIndexGroup: itemIndexGroup, - ItemIndexOffset: itemIndexOffset, - ItemReadLength: itemReadLength, + _AdsMultiRequestItem: &_AdsMultiRequestItem{ + }, + ItemIndexGroup: itemIndexGroup, + ItemIndexOffset: itemIndexOffset, + ItemReadLength: itemReadLength, } _child._AdsMultiRequestItem._AdsMultiRequestItemChildRequirements = _child return _child, nil @@ -208,26 +213,26 @@ func (m *_AdsMultiRequestItemRead) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for AdsMultiRequestItemRead") } - // Simple Field (itemIndexGroup) - itemIndexGroup := uint32(m.GetItemIndexGroup()) - _itemIndexGroupErr := writeBuffer.WriteUint32("itemIndexGroup", 32, (itemIndexGroup)) - if _itemIndexGroupErr != nil { - return errors.Wrap(_itemIndexGroupErr, "Error serializing 'itemIndexGroup' field") - } + // Simple Field (itemIndexGroup) + itemIndexGroup := uint32(m.GetItemIndexGroup()) + _itemIndexGroupErr := writeBuffer.WriteUint32("itemIndexGroup", 32, (itemIndexGroup)) + if _itemIndexGroupErr != nil { + return errors.Wrap(_itemIndexGroupErr, "Error serializing 'itemIndexGroup' field") + } - // Simple Field (itemIndexOffset) - itemIndexOffset := uint32(m.GetItemIndexOffset()) - _itemIndexOffsetErr := writeBuffer.WriteUint32("itemIndexOffset", 32, (itemIndexOffset)) - if _itemIndexOffsetErr != nil { - return errors.Wrap(_itemIndexOffsetErr, "Error serializing 'itemIndexOffset' field") - } + // Simple Field (itemIndexOffset) + itemIndexOffset := uint32(m.GetItemIndexOffset()) + _itemIndexOffsetErr := writeBuffer.WriteUint32("itemIndexOffset", 32, (itemIndexOffset)) + if _itemIndexOffsetErr != nil { + return errors.Wrap(_itemIndexOffsetErr, "Error serializing 'itemIndexOffset' field") + } - // Simple Field (itemReadLength) - itemReadLength := uint32(m.GetItemReadLength()) - _itemReadLengthErr := writeBuffer.WriteUint32("itemReadLength", 32, (itemReadLength)) - if _itemReadLengthErr != nil { - return errors.Wrap(_itemReadLengthErr, "Error serializing 'itemReadLength' field") - } + // Simple Field (itemReadLength) + itemReadLength := uint32(m.GetItemReadLength()) + _itemReadLengthErr := writeBuffer.WriteUint32("itemReadLength", 32, (itemReadLength)) + if _itemReadLengthErr != nil { + return errors.Wrap(_itemReadLengthErr, "Error serializing 'itemReadLength' field") + } if popErr := writeBuffer.PopContext("AdsMultiRequestItemRead"); popErr != nil { return errors.Wrap(popErr, "Error popping for AdsMultiRequestItemRead") @@ -237,6 +242,7 @@ func (m *_AdsMultiRequestItemRead) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AdsMultiRequestItemRead) isAdsMultiRequestItemRead() bool { return true } @@ -251,3 +257,6 @@ func (m *_AdsMultiRequestItemRead) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/readwrite/model/AdsMultiRequestItemReadWrite.go b/plc4go/protocols/ads/readwrite/model/AdsMultiRequestItemReadWrite.go index 46a6c2dbc44..ce98a12af3c 100644 --- a/plc4go/protocols/ads/readwrite/model/AdsMultiRequestItemReadWrite.go +++ b/plc4go/protocols/ads/readwrite/model/AdsMultiRequestItemReadWrite.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AdsMultiRequestItemReadWrite is the corresponding interface of AdsMultiRequestItemReadWrite type AdsMultiRequestItemReadWrite interface { @@ -52,32 +54,32 @@ type AdsMultiRequestItemReadWriteExactly interface { // _AdsMultiRequestItemReadWrite is the data-structure of this message type _AdsMultiRequestItemReadWrite struct { *_AdsMultiRequestItem - ItemIndexGroup uint32 - ItemIndexOffset uint32 - ItemReadLength uint32 - ItemWriteLength uint32 + ItemIndexGroup uint32 + ItemIndexOffset uint32 + ItemReadLength uint32 + ItemWriteLength uint32 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_AdsMultiRequestItemReadWrite) GetIndexGroup() uint32 { - return uint32(61570) -} +func (m *_AdsMultiRequestItemReadWrite) GetIndexGroup() uint32 { +return uint32(61570)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AdsMultiRequestItemReadWrite) InitializeParent(parent AdsMultiRequestItem) {} +func (m *_AdsMultiRequestItemReadWrite) InitializeParent(parent AdsMultiRequestItem ) {} -func (m *_AdsMultiRequestItemReadWrite) GetParent() AdsMultiRequestItem { +func (m *_AdsMultiRequestItemReadWrite) GetParent() AdsMultiRequestItem { return m._AdsMultiRequestItem } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -104,14 +106,15 @@ func (m *_AdsMultiRequestItemReadWrite) GetItemWriteLength() uint32 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAdsMultiRequestItemReadWrite factory function for _AdsMultiRequestItemReadWrite -func NewAdsMultiRequestItemReadWrite(itemIndexGroup uint32, itemIndexOffset uint32, itemReadLength uint32, itemWriteLength uint32) *_AdsMultiRequestItemReadWrite { +func NewAdsMultiRequestItemReadWrite( itemIndexGroup uint32 , itemIndexOffset uint32 , itemReadLength uint32 , itemWriteLength uint32 ) *_AdsMultiRequestItemReadWrite { _result := &_AdsMultiRequestItemReadWrite{ - ItemIndexGroup: itemIndexGroup, - ItemIndexOffset: itemIndexOffset, - ItemReadLength: itemReadLength, - ItemWriteLength: itemWriteLength, - _AdsMultiRequestItem: NewAdsMultiRequestItem(), + ItemIndexGroup: itemIndexGroup, + ItemIndexOffset: itemIndexOffset, + ItemReadLength: itemReadLength, + ItemWriteLength: itemWriteLength, + _AdsMultiRequestItem: NewAdsMultiRequestItem(), } _result._AdsMultiRequestItem._AdsMultiRequestItemChildRequirements = _result return _result @@ -119,7 +122,7 @@ func NewAdsMultiRequestItemReadWrite(itemIndexGroup uint32, itemIndexOffset uint // Deprecated: use the interface for direct cast func CastAdsMultiRequestItemReadWrite(structType interface{}) AdsMultiRequestItemReadWrite { - if casted, ok := structType.(AdsMultiRequestItemReadWrite); ok { + if casted, ok := structType.(AdsMultiRequestItemReadWrite); ok { return casted } if casted, ok := structType.(*AdsMultiRequestItemReadWrite); ok { @@ -136,20 +139,21 @@ func (m *_AdsMultiRequestItemReadWrite) GetLengthInBits(ctx context.Context) uin lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (itemIndexGroup) - lengthInBits += 32 + lengthInBits += 32; // Simple field (itemIndexOffset) - lengthInBits += 32 + lengthInBits += 32; // Simple field (itemReadLength) - lengthInBits += 32 + lengthInBits += 32; // Simple field (itemWriteLength) - lengthInBits += 32 + lengthInBits += 32; return lengthInBits } + func (m *_AdsMultiRequestItemReadWrite) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -168,28 +172,28 @@ func AdsMultiRequestItemReadWriteParseWithBuffer(ctx context.Context, readBuffer _ = currentPos // Simple Field (itemIndexGroup) - _itemIndexGroup, _itemIndexGroupErr := readBuffer.ReadUint32("itemIndexGroup", 32) +_itemIndexGroup, _itemIndexGroupErr := readBuffer.ReadUint32("itemIndexGroup", 32) if _itemIndexGroupErr != nil { return nil, errors.Wrap(_itemIndexGroupErr, "Error parsing 'itemIndexGroup' field of AdsMultiRequestItemReadWrite") } itemIndexGroup := _itemIndexGroup // Simple Field (itemIndexOffset) - _itemIndexOffset, _itemIndexOffsetErr := readBuffer.ReadUint32("itemIndexOffset", 32) +_itemIndexOffset, _itemIndexOffsetErr := readBuffer.ReadUint32("itemIndexOffset", 32) if _itemIndexOffsetErr != nil { return nil, errors.Wrap(_itemIndexOffsetErr, "Error parsing 'itemIndexOffset' field of AdsMultiRequestItemReadWrite") } itemIndexOffset := _itemIndexOffset // Simple Field (itemReadLength) - _itemReadLength, _itemReadLengthErr := readBuffer.ReadUint32("itemReadLength", 32) +_itemReadLength, _itemReadLengthErr := readBuffer.ReadUint32("itemReadLength", 32) if _itemReadLengthErr != nil { return nil, errors.Wrap(_itemReadLengthErr, "Error parsing 'itemReadLength' field of AdsMultiRequestItemReadWrite") } itemReadLength := _itemReadLength // Simple Field (itemWriteLength) - _itemWriteLength, _itemWriteLengthErr := readBuffer.ReadUint32("itemWriteLength", 32) +_itemWriteLength, _itemWriteLengthErr := readBuffer.ReadUint32("itemWriteLength", 32) if _itemWriteLengthErr != nil { return nil, errors.Wrap(_itemWriteLengthErr, "Error parsing 'itemWriteLength' field of AdsMultiRequestItemReadWrite") } @@ -201,11 +205,12 @@ func AdsMultiRequestItemReadWriteParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_AdsMultiRequestItemReadWrite{ - _AdsMultiRequestItem: &_AdsMultiRequestItem{}, - ItemIndexGroup: itemIndexGroup, - ItemIndexOffset: itemIndexOffset, - ItemReadLength: itemReadLength, - ItemWriteLength: itemWriteLength, + _AdsMultiRequestItem: &_AdsMultiRequestItem{ + }, + ItemIndexGroup: itemIndexGroup, + ItemIndexOffset: itemIndexOffset, + ItemReadLength: itemReadLength, + ItemWriteLength: itemWriteLength, } _child._AdsMultiRequestItem._AdsMultiRequestItemChildRequirements = _child return _child, nil @@ -227,33 +232,33 @@ func (m *_AdsMultiRequestItemReadWrite) SerializeWithWriteBuffer(ctx context.Con return errors.Wrap(pushErr, "Error pushing for AdsMultiRequestItemReadWrite") } - // Simple Field (itemIndexGroup) - itemIndexGroup := uint32(m.GetItemIndexGroup()) - _itemIndexGroupErr := writeBuffer.WriteUint32("itemIndexGroup", 32, (itemIndexGroup)) - if _itemIndexGroupErr != nil { - return errors.Wrap(_itemIndexGroupErr, "Error serializing 'itemIndexGroup' field") - } + // Simple Field (itemIndexGroup) + itemIndexGroup := uint32(m.GetItemIndexGroup()) + _itemIndexGroupErr := writeBuffer.WriteUint32("itemIndexGroup", 32, (itemIndexGroup)) + if _itemIndexGroupErr != nil { + return errors.Wrap(_itemIndexGroupErr, "Error serializing 'itemIndexGroup' field") + } - // Simple Field (itemIndexOffset) - itemIndexOffset := uint32(m.GetItemIndexOffset()) - _itemIndexOffsetErr := writeBuffer.WriteUint32("itemIndexOffset", 32, (itemIndexOffset)) - if _itemIndexOffsetErr != nil { - return errors.Wrap(_itemIndexOffsetErr, "Error serializing 'itemIndexOffset' field") - } + // Simple Field (itemIndexOffset) + itemIndexOffset := uint32(m.GetItemIndexOffset()) + _itemIndexOffsetErr := writeBuffer.WriteUint32("itemIndexOffset", 32, (itemIndexOffset)) + if _itemIndexOffsetErr != nil { + return errors.Wrap(_itemIndexOffsetErr, "Error serializing 'itemIndexOffset' field") + } - // Simple Field (itemReadLength) - itemReadLength := uint32(m.GetItemReadLength()) - _itemReadLengthErr := writeBuffer.WriteUint32("itemReadLength", 32, (itemReadLength)) - if _itemReadLengthErr != nil { - return errors.Wrap(_itemReadLengthErr, "Error serializing 'itemReadLength' field") - } + // Simple Field (itemReadLength) + itemReadLength := uint32(m.GetItemReadLength()) + _itemReadLengthErr := writeBuffer.WriteUint32("itemReadLength", 32, (itemReadLength)) + if _itemReadLengthErr != nil { + return errors.Wrap(_itemReadLengthErr, "Error serializing 'itemReadLength' field") + } - // Simple Field (itemWriteLength) - itemWriteLength := uint32(m.GetItemWriteLength()) - _itemWriteLengthErr := writeBuffer.WriteUint32("itemWriteLength", 32, (itemWriteLength)) - if _itemWriteLengthErr != nil { - return errors.Wrap(_itemWriteLengthErr, "Error serializing 'itemWriteLength' field") - } + // Simple Field (itemWriteLength) + itemWriteLength := uint32(m.GetItemWriteLength()) + _itemWriteLengthErr := writeBuffer.WriteUint32("itemWriteLength", 32, (itemWriteLength)) + if _itemWriteLengthErr != nil { + return errors.Wrap(_itemWriteLengthErr, "Error serializing 'itemWriteLength' field") + } if popErr := writeBuffer.PopContext("AdsMultiRequestItemReadWrite"); popErr != nil { return errors.Wrap(popErr, "Error popping for AdsMultiRequestItemReadWrite") @@ -263,6 +268,7 @@ func (m *_AdsMultiRequestItemReadWrite) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AdsMultiRequestItemReadWrite) isAdsMultiRequestItemReadWrite() bool { return true } @@ -277,3 +283,6 @@ func (m *_AdsMultiRequestItemReadWrite) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/readwrite/model/AdsMultiRequestItemWrite.go b/plc4go/protocols/ads/readwrite/model/AdsMultiRequestItemWrite.go index c67cb37ec39..bd1222729b7 100644 --- a/plc4go/protocols/ads/readwrite/model/AdsMultiRequestItemWrite.go +++ b/plc4go/protocols/ads/readwrite/model/AdsMultiRequestItemWrite.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AdsMultiRequestItemWrite is the corresponding interface of AdsMultiRequestItemWrite type AdsMultiRequestItemWrite interface { @@ -50,31 +52,31 @@ type AdsMultiRequestItemWriteExactly interface { // _AdsMultiRequestItemWrite is the data-structure of this message type _AdsMultiRequestItemWrite struct { *_AdsMultiRequestItem - ItemIndexGroup uint32 - ItemIndexOffset uint32 - ItemWriteLength uint32 + ItemIndexGroup uint32 + ItemIndexOffset uint32 + ItemWriteLength uint32 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_AdsMultiRequestItemWrite) GetIndexGroup() uint32 { - return uint32(61569) -} +func (m *_AdsMultiRequestItemWrite) GetIndexGroup() uint32 { +return uint32(61569)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AdsMultiRequestItemWrite) InitializeParent(parent AdsMultiRequestItem) {} +func (m *_AdsMultiRequestItemWrite) InitializeParent(parent AdsMultiRequestItem ) {} -func (m *_AdsMultiRequestItemWrite) GetParent() AdsMultiRequestItem { +func (m *_AdsMultiRequestItemWrite) GetParent() AdsMultiRequestItem { return m._AdsMultiRequestItem } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -97,13 +99,14 @@ func (m *_AdsMultiRequestItemWrite) GetItemWriteLength() uint32 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAdsMultiRequestItemWrite factory function for _AdsMultiRequestItemWrite -func NewAdsMultiRequestItemWrite(itemIndexGroup uint32, itemIndexOffset uint32, itemWriteLength uint32) *_AdsMultiRequestItemWrite { +func NewAdsMultiRequestItemWrite( itemIndexGroup uint32 , itemIndexOffset uint32 , itemWriteLength uint32 ) *_AdsMultiRequestItemWrite { _result := &_AdsMultiRequestItemWrite{ - ItemIndexGroup: itemIndexGroup, - ItemIndexOffset: itemIndexOffset, - ItemWriteLength: itemWriteLength, - _AdsMultiRequestItem: NewAdsMultiRequestItem(), + ItemIndexGroup: itemIndexGroup, + ItemIndexOffset: itemIndexOffset, + ItemWriteLength: itemWriteLength, + _AdsMultiRequestItem: NewAdsMultiRequestItem(), } _result._AdsMultiRequestItem._AdsMultiRequestItemChildRequirements = _result return _result @@ -111,7 +114,7 @@ func NewAdsMultiRequestItemWrite(itemIndexGroup uint32, itemIndexOffset uint32, // Deprecated: use the interface for direct cast func CastAdsMultiRequestItemWrite(structType interface{}) AdsMultiRequestItemWrite { - if casted, ok := structType.(AdsMultiRequestItemWrite); ok { + if casted, ok := structType.(AdsMultiRequestItemWrite); ok { return casted } if casted, ok := structType.(*AdsMultiRequestItemWrite); ok { @@ -128,17 +131,18 @@ func (m *_AdsMultiRequestItemWrite) GetLengthInBits(ctx context.Context) uint16 lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (itemIndexGroup) - lengthInBits += 32 + lengthInBits += 32; // Simple field (itemIndexOffset) - lengthInBits += 32 + lengthInBits += 32; // Simple field (itemWriteLength) - lengthInBits += 32 + lengthInBits += 32; return lengthInBits } + func (m *_AdsMultiRequestItemWrite) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -157,21 +161,21 @@ func AdsMultiRequestItemWriteParseWithBuffer(ctx context.Context, readBuffer uti _ = currentPos // Simple Field (itemIndexGroup) - _itemIndexGroup, _itemIndexGroupErr := readBuffer.ReadUint32("itemIndexGroup", 32) +_itemIndexGroup, _itemIndexGroupErr := readBuffer.ReadUint32("itemIndexGroup", 32) if _itemIndexGroupErr != nil { return nil, errors.Wrap(_itemIndexGroupErr, "Error parsing 'itemIndexGroup' field of AdsMultiRequestItemWrite") } itemIndexGroup := _itemIndexGroup // Simple Field (itemIndexOffset) - _itemIndexOffset, _itemIndexOffsetErr := readBuffer.ReadUint32("itemIndexOffset", 32) +_itemIndexOffset, _itemIndexOffsetErr := readBuffer.ReadUint32("itemIndexOffset", 32) if _itemIndexOffsetErr != nil { return nil, errors.Wrap(_itemIndexOffsetErr, "Error parsing 'itemIndexOffset' field of AdsMultiRequestItemWrite") } itemIndexOffset := _itemIndexOffset // Simple Field (itemWriteLength) - _itemWriteLength, _itemWriteLengthErr := readBuffer.ReadUint32("itemWriteLength", 32) +_itemWriteLength, _itemWriteLengthErr := readBuffer.ReadUint32("itemWriteLength", 32) if _itemWriteLengthErr != nil { return nil, errors.Wrap(_itemWriteLengthErr, "Error parsing 'itemWriteLength' field of AdsMultiRequestItemWrite") } @@ -183,10 +187,11 @@ func AdsMultiRequestItemWriteParseWithBuffer(ctx context.Context, readBuffer uti // Create a partially initialized instance _child := &_AdsMultiRequestItemWrite{ - _AdsMultiRequestItem: &_AdsMultiRequestItem{}, - ItemIndexGroup: itemIndexGroup, - ItemIndexOffset: itemIndexOffset, - ItemWriteLength: itemWriteLength, + _AdsMultiRequestItem: &_AdsMultiRequestItem{ + }, + ItemIndexGroup: itemIndexGroup, + ItemIndexOffset: itemIndexOffset, + ItemWriteLength: itemWriteLength, } _child._AdsMultiRequestItem._AdsMultiRequestItemChildRequirements = _child return _child, nil @@ -208,26 +213,26 @@ func (m *_AdsMultiRequestItemWrite) SerializeWithWriteBuffer(ctx context.Context return errors.Wrap(pushErr, "Error pushing for AdsMultiRequestItemWrite") } - // Simple Field (itemIndexGroup) - itemIndexGroup := uint32(m.GetItemIndexGroup()) - _itemIndexGroupErr := writeBuffer.WriteUint32("itemIndexGroup", 32, (itemIndexGroup)) - if _itemIndexGroupErr != nil { - return errors.Wrap(_itemIndexGroupErr, "Error serializing 'itemIndexGroup' field") - } + // Simple Field (itemIndexGroup) + itemIndexGroup := uint32(m.GetItemIndexGroup()) + _itemIndexGroupErr := writeBuffer.WriteUint32("itemIndexGroup", 32, (itemIndexGroup)) + if _itemIndexGroupErr != nil { + return errors.Wrap(_itemIndexGroupErr, "Error serializing 'itemIndexGroup' field") + } - // Simple Field (itemIndexOffset) - itemIndexOffset := uint32(m.GetItemIndexOffset()) - _itemIndexOffsetErr := writeBuffer.WriteUint32("itemIndexOffset", 32, (itemIndexOffset)) - if _itemIndexOffsetErr != nil { - return errors.Wrap(_itemIndexOffsetErr, "Error serializing 'itemIndexOffset' field") - } + // Simple Field (itemIndexOffset) + itemIndexOffset := uint32(m.GetItemIndexOffset()) + _itemIndexOffsetErr := writeBuffer.WriteUint32("itemIndexOffset", 32, (itemIndexOffset)) + if _itemIndexOffsetErr != nil { + return errors.Wrap(_itemIndexOffsetErr, "Error serializing 'itemIndexOffset' field") + } - // Simple Field (itemWriteLength) - itemWriteLength := uint32(m.GetItemWriteLength()) - _itemWriteLengthErr := writeBuffer.WriteUint32("itemWriteLength", 32, (itemWriteLength)) - if _itemWriteLengthErr != nil { - return errors.Wrap(_itemWriteLengthErr, "Error serializing 'itemWriteLength' field") - } + // Simple Field (itemWriteLength) + itemWriteLength := uint32(m.GetItemWriteLength()) + _itemWriteLengthErr := writeBuffer.WriteUint32("itemWriteLength", 32, (itemWriteLength)) + if _itemWriteLengthErr != nil { + return errors.Wrap(_itemWriteLengthErr, "Error serializing 'itemWriteLength' field") + } if popErr := writeBuffer.PopContext("AdsMultiRequestItemWrite"); popErr != nil { return errors.Wrap(popErr, "Error popping for AdsMultiRequestItemWrite") @@ -237,6 +242,7 @@ func (m *_AdsMultiRequestItemWrite) SerializeWithWriteBuffer(ctx context.Context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AdsMultiRequestItemWrite) isAdsMultiRequestItemWrite() bool { return true } @@ -251,3 +257,6 @@ func (m *_AdsMultiRequestItemWrite) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/readwrite/model/AdsNotificationSample.go b/plc4go/protocols/ads/readwrite/model/AdsNotificationSample.go index 899ea92372d..3edcc75b626 100644 --- a/plc4go/protocols/ads/readwrite/model/AdsNotificationSample.go +++ b/plc4go/protocols/ads/readwrite/model/AdsNotificationSample.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AdsNotificationSample is the corresponding interface of AdsNotificationSample type AdsNotificationSample interface { @@ -48,11 +50,12 @@ type AdsNotificationSampleExactly interface { // _AdsNotificationSample is the data-structure of this message type _AdsNotificationSample struct { - NotificationHandle uint32 - SampleSize uint32 - Data []byte + NotificationHandle uint32 + SampleSize uint32 + Data []byte } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -75,14 +78,15 @@ func (m *_AdsNotificationSample) GetData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAdsNotificationSample factory function for _AdsNotificationSample -func NewAdsNotificationSample(notificationHandle uint32, sampleSize uint32, data []byte) *_AdsNotificationSample { - return &_AdsNotificationSample{NotificationHandle: notificationHandle, SampleSize: sampleSize, Data: data} +func NewAdsNotificationSample( notificationHandle uint32 , sampleSize uint32 , data []byte ) *_AdsNotificationSample { +return &_AdsNotificationSample{ NotificationHandle: notificationHandle , SampleSize: sampleSize , Data: data } } // Deprecated: use the interface for direct cast func CastAdsNotificationSample(structType interface{}) AdsNotificationSample { - if casted, ok := structType.(AdsNotificationSample); ok { + if casted, ok := structType.(AdsNotificationSample); ok { return casted } if casted, ok := structType.(*AdsNotificationSample); ok { @@ -99,10 +103,10 @@ func (m *_AdsNotificationSample) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (notificationHandle) - lengthInBits += 32 + lengthInBits += 32; // Simple field (sampleSize) - lengthInBits += 32 + lengthInBits += 32; // Array field if len(m.Data) > 0 { @@ -112,6 +116,7 @@ func (m *_AdsNotificationSample) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_AdsNotificationSample) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -130,14 +135,14 @@ func AdsNotificationSampleParseWithBuffer(ctx context.Context, readBuffer utils. _ = currentPos // Simple Field (notificationHandle) - _notificationHandle, _notificationHandleErr := readBuffer.ReadUint32("notificationHandle", 32) +_notificationHandle, _notificationHandleErr := readBuffer.ReadUint32("notificationHandle", 32) if _notificationHandleErr != nil { return nil, errors.Wrap(_notificationHandleErr, "Error parsing 'notificationHandle' field of AdsNotificationSample") } notificationHandle := _notificationHandle // Simple Field (sampleSize) - _sampleSize, _sampleSizeErr := readBuffer.ReadUint32("sampleSize", 32) +_sampleSize, _sampleSizeErr := readBuffer.ReadUint32("sampleSize", 32) if _sampleSizeErr != nil { return nil, errors.Wrap(_sampleSizeErr, "Error parsing 'sampleSize' field of AdsNotificationSample") } @@ -155,10 +160,10 @@ func AdsNotificationSampleParseWithBuffer(ctx context.Context, readBuffer utils. // Create the instance return &_AdsNotificationSample{ - NotificationHandle: notificationHandle, - SampleSize: sampleSize, - Data: data, - }, nil + NotificationHandle: notificationHandle, + SampleSize: sampleSize, + Data: data, + }, nil } func (m *_AdsNotificationSample) Serialize() ([]byte, error) { @@ -172,7 +177,7 @@ func (m *_AdsNotificationSample) Serialize() ([]byte, error) { func (m *_AdsNotificationSample) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("AdsNotificationSample"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("AdsNotificationSample"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for AdsNotificationSample") } @@ -202,6 +207,7 @@ func (m *_AdsNotificationSample) SerializeWithWriteBuffer(ctx context.Context, w return nil } + func (m *_AdsNotificationSample) isAdsNotificationSample() bool { return true } @@ -216,3 +222,6 @@ func (m *_AdsNotificationSample) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/readwrite/model/AdsReadDeviceInfoRequest.go b/plc4go/protocols/ads/readwrite/model/AdsReadDeviceInfoRequest.go index fd933dedc9f..094bd86775f 100644 --- a/plc4go/protocols/ads/readwrite/model/AdsReadDeviceInfoRequest.go +++ b/plc4go/protocols/ads/readwrite/model/AdsReadDeviceInfoRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AdsReadDeviceInfoRequest is the corresponding interface of AdsReadDeviceInfoRequest type AdsReadDeviceInfoRequest interface { @@ -46,26 +48,25 @@ type _AdsReadDeviceInfoRequest struct { *_AmsPacket } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_AdsReadDeviceInfoRequest) GetCommandId() CommandId { - return CommandId_ADS_READ_DEVICE_INFO -} +func (m *_AdsReadDeviceInfoRequest) GetCommandId() CommandId { +return CommandId_ADS_READ_DEVICE_INFO} -func (m *_AdsReadDeviceInfoRequest) GetResponse() bool { - return bool(false) -} +func (m *_AdsReadDeviceInfoRequest) GetResponse() bool { +return bool(false)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AdsReadDeviceInfoRequest) InitializeParent(parent AmsPacket, targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) { - m.TargetAmsNetId = targetAmsNetId +func (m *_AdsReadDeviceInfoRequest) InitializeParent(parent AmsPacket , targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) { m.TargetAmsNetId = targetAmsNetId m.TargetAmsPort = targetAmsPort m.SourceAmsNetId = sourceAmsNetId m.SourceAmsPort = sourceAmsPort @@ -73,14 +74,15 @@ func (m *_AdsReadDeviceInfoRequest) InitializeParent(parent AmsPacket, targetAms m.InvokeId = invokeId } -func (m *_AdsReadDeviceInfoRequest) GetParent() AmsPacket { +func (m *_AdsReadDeviceInfoRequest) GetParent() AmsPacket { return m._AmsPacket } + // NewAdsReadDeviceInfoRequest factory function for _AdsReadDeviceInfoRequest -func NewAdsReadDeviceInfoRequest(targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) *_AdsReadDeviceInfoRequest { +func NewAdsReadDeviceInfoRequest( targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) *_AdsReadDeviceInfoRequest { _result := &_AdsReadDeviceInfoRequest{ - _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), + _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), } _result._AmsPacket._AmsPacketChildRequirements = _result return _result @@ -88,7 +90,7 @@ func NewAdsReadDeviceInfoRequest(targetAmsNetId AmsNetId, targetAmsPort uint16, // Deprecated: use the interface for direct cast func CastAdsReadDeviceInfoRequest(structType interface{}) AdsReadDeviceInfoRequest { - if casted, ok := structType.(AdsReadDeviceInfoRequest); ok { + if casted, ok := structType.(AdsReadDeviceInfoRequest); ok { return casted } if casted, ok := structType.(*AdsReadDeviceInfoRequest); ok { @@ -107,6 +109,7 @@ func (m *_AdsReadDeviceInfoRequest) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_AdsReadDeviceInfoRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -130,7 +133,8 @@ func AdsReadDeviceInfoRequestParseWithBuffer(ctx context.Context, readBuffer uti // Create a partially initialized instance _child := &_AdsReadDeviceInfoRequest{ - _AmsPacket: &_AmsPacket{}, + _AmsPacket: &_AmsPacket{ + }, } _child._AmsPacket._AmsPacketChildRequirements = _child return _child, nil @@ -160,6 +164,7 @@ func (m *_AdsReadDeviceInfoRequest) SerializeWithWriteBuffer(ctx context.Context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AdsReadDeviceInfoRequest) isAdsReadDeviceInfoRequest() bool { return true } @@ -174,3 +179,6 @@ func (m *_AdsReadDeviceInfoRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/readwrite/model/AdsReadDeviceInfoResponse.go b/plc4go/protocols/ads/readwrite/model/AdsReadDeviceInfoResponse.go index 462196685c3..facd265c3ea 100644 --- a/plc4go/protocols/ads/readwrite/model/AdsReadDeviceInfoResponse.go +++ b/plc4go/protocols/ads/readwrite/model/AdsReadDeviceInfoResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AdsReadDeviceInfoResponse is the corresponding interface of AdsReadDeviceInfoResponse type AdsReadDeviceInfoResponse interface { @@ -54,33 +56,32 @@ type AdsReadDeviceInfoResponseExactly interface { // _AdsReadDeviceInfoResponse is the data-structure of this message type _AdsReadDeviceInfoResponse struct { *_AmsPacket - Result ReturnCode - MajorVersion uint8 - MinorVersion uint8 - Version uint16 - Device []byte + Result ReturnCode + MajorVersion uint8 + MinorVersion uint8 + Version uint16 + Device []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_AdsReadDeviceInfoResponse) GetCommandId() CommandId { - return CommandId_ADS_READ_DEVICE_INFO -} +func (m *_AdsReadDeviceInfoResponse) GetCommandId() CommandId { +return CommandId_ADS_READ_DEVICE_INFO} -func (m *_AdsReadDeviceInfoResponse) GetResponse() bool { - return bool(true) -} +func (m *_AdsReadDeviceInfoResponse) GetResponse() bool { +return bool(true)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AdsReadDeviceInfoResponse) InitializeParent(parent AmsPacket, targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) { - m.TargetAmsNetId = targetAmsNetId +func (m *_AdsReadDeviceInfoResponse) InitializeParent(parent AmsPacket , targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) { m.TargetAmsNetId = targetAmsNetId m.TargetAmsPort = targetAmsPort m.SourceAmsNetId = sourceAmsNetId m.SourceAmsPort = sourceAmsPort @@ -88,10 +89,9 @@ func (m *_AdsReadDeviceInfoResponse) InitializeParent(parent AmsPacket, targetAm m.InvokeId = invokeId } -func (m *_AdsReadDeviceInfoResponse) GetParent() AmsPacket { +func (m *_AdsReadDeviceInfoResponse) GetParent() AmsPacket { return m._AmsPacket } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -122,15 +122,16 @@ func (m *_AdsReadDeviceInfoResponse) GetDevice() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAdsReadDeviceInfoResponse factory function for _AdsReadDeviceInfoResponse -func NewAdsReadDeviceInfoResponse(result ReturnCode, majorVersion uint8, minorVersion uint8, version uint16, device []byte, targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) *_AdsReadDeviceInfoResponse { +func NewAdsReadDeviceInfoResponse( result ReturnCode , majorVersion uint8 , minorVersion uint8 , version uint16 , device []byte , targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) *_AdsReadDeviceInfoResponse { _result := &_AdsReadDeviceInfoResponse{ - Result: result, + Result: result, MajorVersion: majorVersion, MinorVersion: minorVersion, - Version: version, - Device: device, - _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), + Version: version, + Device: device, + _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), } _result._AmsPacket._AmsPacketChildRequirements = _result return _result @@ -138,7 +139,7 @@ func NewAdsReadDeviceInfoResponse(result ReturnCode, majorVersion uint8, minorVe // Deprecated: use the interface for direct cast func CastAdsReadDeviceInfoResponse(structType interface{}) AdsReadDeviceInfoResponse { - if casted, ok := structType.(AdsReadDeviceInfoResponse); ok { + if casted, ok := structType.(AdsReadDeviceInfoResponse); ok { return casted } if casted, ok := structType.(*AdsReadDeviceInfoResponse); ok { @@ -158,13 +159,13 @@ func (m *_AdsReadDeviceInfoResponse) GetLengthInBits(ctx context.Context) uint16 lengthInBits += 32 // Simple field (majorVersion) - lengthInBits += 8 + lengthInBits += 8; // Simple field (minorVersion) - lengthInBits += 8 + lengthInBits += 8; // Simple field (version) - lengthInBits += 16 + lengthInBits += 16; // Array field if len(m.Device) > 0 { @@ -174,6 +175,7 @@ func (m *_AdsReadDeviceInfoResponse) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_AdsReadDeviceInfoResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -195,7 +197,7 @@ func AdsReadDeviceInfoResponseParseWithBuffer(ctx context.Context, readBuffer ut if pullErr := readBuffer.PullContext("result"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for result") } - _result, _resultErr := ReturnCodeParseWithBuffer(ctx, readBuffer) +_result, _resultErr := ReturnCodeParseWithBuffer(ctx, readBuffer) if _resultErr != nil { return nil, errors.Wrap(_resultErr, "Error parsing 'result' field of AdsReadDeviceInfoResponse") } @@ -205,21 +207,21 @@ func AdsReadDeviceInfoResponseParseWithBuffer(ctx context.Context, readBuffer ut } // Simple Field (majorVersion) - _majorVersion, _majorVersionErr := readBuffer.ReadUint8("majorVersion", 8) +_majorVersion, _majorVersionErr := readBuffer.ReadUint8("majorVersion", 8) if _majorVersionErr != nil { return nil, errors.Wrap(_majorVersionErr, "Error parsing 'majorVersion' field of AdsReadDeviceInfoResponse") } majorVersion := _majorVersion // Simple Field (minorVersion) - _minorVersion, _minorVersionErr := readBuffer.ReadUint8("minorVersion", 8) +_minorVersion, _minorVersionErr := readBuffer.ReadUint8("minorVersion", 8) if _minorVersionErr != nil { return nil, errors.Wrap(_minorVersionErr, "Error parsing 'minorVersion' field of AdsReadDeviceInfoResponse") } minorVersion := _minorVersion // Simple Field (version) - _version, _versionErr := readBuffer.ReadUint16("version", 16) +_version, _versionErr := readBuffer.ReadUint16("version", 16) if _versionErr != nil { return nil, errors.Wrap(_versionErr, "Error parsing 'version' field of AdsReadDeviceInfoResponse") } @@ -237,12 +239,13 @@ func AdsReadDeviceInfoResponseParseWithBuffer(ctx context.Context, readBuffer ut // Create a partially initialized instance _child := &_AdsReadDeviceInfoResponse{ - _AmsPacket: &_AmsPacket{}, - Result: result, + _AmsPacket: &_AmsPacket{ + }, + Result: result, MajorVersion: majorVersion, MinorVersion: minorVersion, - Version: version, - Device: device, + Version: version, + Device: device, } _child._AmsPacket._AmsPacketChildRequirements = _child return _child, nil @@ -264,44 +267,44 @@ func (m *_AdsReadDeviceInfoResponse) SerializeWithWriteBuffer(ctx context.Contex return errors.Wrap(pushErr, "Error pushing for AdsReadDeviceInfoResponse") } - // Simple Field (result) - if pushErr := writeBuffer.PushContext("result"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for result") - } - _resultErr := writeBuffer.WriteSerializable(ctx, m.GetResult()) - if popErr := writeBuffer.PopContext("result"); popErr != nil { - return errors.Wrap(popErr, "Error popping for result") - } - if _resultErr != nil { - return errors.Wrap(_resultErr, "Error serializing 'result' field") - } + // Simple Field (result) + if pushErr := writeBuffer.PushContext("result"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for result") + } + _resultErr := writeBuffer.WriteSerializable(ctx, m.GetResult()) + if popErr := writeBuffer.PopContext("result"); popErr != nil { + return errors.Wrap(popErr, "Error popping for result") + } + if _resultErr != nil { + return errors.Wrap(_resultErr, "Error serializing 'result' field") + } - // Simple Field (majorVersion) - majorVersion := uint8(m.GetMajorVersion()) - _majorVersionErr := writeBuffer.WriteUint8("majorVersion", 8, (majorVersion)) - if _majorVersionErr != nil { - return errors.Wrap(_majorVersionErr, "Error serializing 'majorVersion' field") - } + // Simple Field (majorVersion) + majorVersion := uint8(m.GetMajorVersion()) + _majorVersionErr := writeBuffer.WriteUint8("majorVersion", 8, (majorVersion)) + if _majorVersionErr != nil { + return errors.Wrap(_majorVersionErr, "Error serializing 'majorVersion' field") + } - // Simple Field (minorVersion) - minorVersion := uint8(m.GetMinorVersion()) - _minorVersionErr := writeBuffer.WriteUint8("minorVersion", 8, (minorVersion)) - if _minorVersionErr != nil { - return errors.Wrap(_minorVersionErr, "Error serializing 'minorVersion' field") - } + // Simple Field (minorVersion) + minorVersion := uint8(m.GetMinorVersion()) + _minorVersionErr := writeBuffer.WriteUint8("minorVersion", 8, (minorVersion)) + if _minorVersionErr != nil { + return errors.Wrap(_minorVersionErr, "Error serializing 'minorVersion' field") + } - // Simple Field (version) - version := uint16(m.GetVersion()) - _versionErr := writeBuffer.WriteUint16("version", 16, (version)) - if _versionErr != nil { - return errors.Wrap(_versionErr, "Error serializing 'version' field") - } + // Simple Field (version) + version := uint16(m.GetVersion()) + _versionErr := writeBuffer.WriteUint16("version", 16, (version)) + if _versionErr != nil { + return errors.Wrap(_versionErr, "Error serializing 'version' field") + } - // Array Field (device) - // Byte Array field (device) - if err := writeBuffer.WriteByteArray("device", m.GetDevice()); err != nil { - return errors.Wrap(err, "Error serializing 'device' field") - } + // Array Field (device) + // Byte Array field (device) + if err := writeBuffer.WriteByteArray("device", m.GetDevice()); err != nil { + return errors.Wrap(err, "Error serializing 'device' field") + } if popErr := writeBuffer.PopContext("AdsReadDeviceInfoResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for AdsReadDeviceInfoResponse") @@ -311,6 +314,7 @@ func (m *_AdsReadDeviceInfoResponse) SerializeWithWriteBuffer(ctx context.Contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AdsReadDeviceInfoResponse) isAdsReadDeviceInfoResponse() bool { return true } @@ -325,3 +329,6 @@ func (m *_AdsReadDeviceInfoResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/readwrite/model/AdsReadRequest.go b/plc4go/protocols/ads/readwrite/model/AdsReadRequest.go index 6100d7fa1a7..6f972fa1c45 100644 --- a/plc4go/protocols/ads/readwrite/model/AdsReadRequest.go +++ b/plc4go/protocols/ads/readwrite/model/AdsReadRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AdsReadRequest is the corresponding interface of AdsReadRequest type AdsReadRequest interface { @@ -50,31 +52,30 @@ type AdsReadRequestExactly interface { // _AdsReadRequest is the data-structure of this message type _AdsReadRequest struct { *_AmsPacket - IndexGroup uint32 - IndexOffset uint32 - Length uint32 + IndexGroup uint32 + IndexOffset uint32 + Length uint32 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_AdsReadRequest) GetCommandId() CommandId { - return CommandId_ADS_READ -} +func (m *_AdsReadRequest) GetCommandId() CommandId { +return CommandId_ADS_READ} -func (m *_AdsReadRequest) GetResponse() bool { - return bool(false) -} +func (m *_AdsReadRequest) GetResponse() bool { +return bool(false)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AdsReadRequest) InitializeParent(parent AmsPacket, targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) { - m.TargetAmsNetId = targetAmsNetId +func (m *_AdsReadRequest) InitializeParent(parent AmsPacket , targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) { m.TargetAmsNetId = targetAmsNetId m.TargetAmsPort = targetAmsPort m.SourceAmsNetId = sourceAmsNetId m.SourceAmsPort = sourceAmsPort @@ -82,10 +83,9 @@ func (m *_AdsReadRequest) InitializeParent(parent AmsPacket, targetAmsNetId AmsN m.InvokeId = invokeId } -func (m *_AdsReadRequest) GetParent() AmsPacket { +func (m *_AdsReadRequest) GetParent() AmsPacket { return m._AmsPacket } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,13 +108,14 @@ func (m *_AdsReadRequest) GetLength() uint32 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAdsReadRequest factory function for _AdsReadRequest -func NewAdsReadRequest(indexGroup uint32, indexOffset uint32, length uint32, targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) *_AdsReadRequest { +func NewAdsReadRequest( indexGroup uint32 , indexOffset uint32 , length uint32 , targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) *_AdsReadRequest { _result := &_AdsReadRequest{ - IndexGroup: indexGroup, + IndexGroup: indexGroup, IndexOffset: indexOffset, - Length: length, - _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), + Length: length, + _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), } _result._AmsPacket._AmsPacketChildRequirements = _result return _result @@ -122,7 +123,7 @@ func NewAdsReadRequest(indexGroup uint32, indexOffset uint32, length uint32, tar // Deprecated: use the interface for direct cast func CastAdsReadRequest(structType interface{}) AdsReadRequest { - if casted, ok := structType.(AdsReadRequest); ok { + if casted, ok := structType.(AdsReadRequest); ok { return casted } if casted, ok := structType.(*AdsReadRequest); ok { @@ -139,17 +140,18 @@ func (m *_AdsReadRequest) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (indexGroup) - lengthInBits += 32 + lengthInBits += 32; // Simple field (indexOffset) - lengthInBits += 32 + lengthInBits += 32; // Simple field (length) - lengthInBits += 32 + lengthInBits += 32; return lengthInBits } + func (m *_AdsReadRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -168,21 +170,21 @@ func AdsReadRequestParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf _ = currentPos // Simple Field (indexGroup) - _indexGroup, _indexGroupErr := readBuffer.ReadUint32("indexGroup", 32) +_indexGroup, _indexGroupErr := readBuffer.ReadUint32("indexGroup", 32) if _indexGroupErr != nil { return nil, errors.Wrap(_indexGroupErr, "Error parsing 'indexGroup' field of AdsReadRequest") } indexGroup := _indexGroup // Simple Field (indexOffset) - _indexOffset, _indexOffsetErr := readBuffer.ReadUint32("indexOffset", 32) +_indexOffset, _indexOffsetErr := readBuffer.ReadUint32("indexOffset", 32) if _indexOffsetErr != nil { return nil, errors.Wrap(_indexOffsetErr, "Error parsing 'indexOffset' field of AdsReadRequest") } indexOffset := _indexOffset // Simple Field (length) - _length, _lengthErr := readBuffer.ReadUint32("length", 32) +_length, _lengthErr := readBuffer.ReadUint32("length", 32) if _lengthErr != nil { return nil, errors.Wrap(_lengthErr, "Error parsing 'length' field of AdsReadRequest") } @@ -194,10 +196,11 @@ func AdsReadRequestParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf // Create a partially initialized instance _child := &_AdsReadRequest{ - _AmsPacket: &_AmsPacket{}, - IndexGroup: indexGroup, + _AmsPacket: &_AmsPacket{ + }, + IndexGroup: indexGroup, IndexOffset: indexOffset, - Length: length, + Length: length, } _child._AmsPacket._AmsPacketChildRequirements = _child return _child, nil @@ -219,26 +222,26 @@ func (m *_AdsReadRequest) SerializeWithWriteBuffer(ctx context.Context, writeBuf return errors.Wrap(pushErr, "Error pushing for AdsReadRequest") } - // Simple Field (indexGroup) - indexGroup := uint32(m.GetIndexGroup()) - _indexGroupErr := writeBuffer.WriteUint32("indexGroup", 32, (indexGroup)) - if _indexGroupErr != nil { - return errors.Wrap(_indexGroupErr, "Error serializing 'indexGroup' field") - } + // Simple Field (indexGroup) + indexGroup := uint32(m.GetIndexGroup()) + _indexGroupErr := writeBuffer.WriteUint32("indexGroup", 32, (indexGroup)) + if _indexGroupErr != nil { + return errors.Wrap(_indexGroupErr, "Error serializing 'indexGroup' field") + } - // Simple Field (indexOffset) - indexOffset := uint32(m.GetIndexOffset()) - _indexOffsetErr := writeBuffer.WriteUint32("indexOffset", 32, (indexOffset)) - if _indexOffsetErr != nil { - return errors.Wrap(_indexOffsetErr, "Error serializing 'indexOffset' field") - } + // Simple Field (indexOffset) + indexOffset := uint32(m.GetIndexOffset()) + _indexOffsetErr := writeBuffer.WriteUint32("indexOffset", 32, (indexOffset)) + if _indexOffsetErr != nil { + return errors.Wrap(_indexOffsetErr, "Error serializing 'indexOffset' field") + } - // Simple Field (length) - length := uint32(m.GetLength()) - _lengthErr := writeBuffer.WriteUint32("length", 32, (length)) - if _lengthErr != nil { - return errors.Wrap(_lengthErr, "Error serializing 'length' field") - } + // Simple Field (length) + length := uint32(m.GetLength()) + _lengthErr := writeBuffer.WriteUint32("length", 32, (length)) + if _lengthErr != nil { + return errors.Wrap(_lengthErr, "Error serializing 'length' field") + } if popErr := writeBuffer.PopContext("AdsReadRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for AdsReadRequest") @@ -248,6 +251,7 @@ func (m *_AdsReadRequest) SerializeWithWriteBuffer(ctx context.Context, writeBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AdsReadRequest) isAdsReadRequest() bool { return true } @@ -262,3 +266,6 @@ func (m *_AdsReadRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/readwrite/model/AdsReadResponse.go b/plc4go/protocols/ads/readwrite/model/AdsReadResponse.go index fb32075e1e2..e3f074544b7 100644 --- a/plc4go/protocols/ads/readwrite/model/AdsReadResponse.go +++ b/plc4go/protocols/ads/readwrite/model/AdsReadResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AdsReadResponse is the corresponding interface of AdsReadResponse type AdsReadResponse interface { @@ -48,30 +50,29 @@ type AdsReadResponseExactly interface { // _AdsReadResponse is the data-structure of this message type _AdsReadResponse struct { *_AmsPacket - Result ReturnCode - Data []byte + Result ReturnCode + Data []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_AdsReadResponse) GetCommandId() CommandId { - return CommandId_ADS_READ -} +func (m *_AdsReadResponse) GetCommandId() CommandId { +return CommandId_ADS_READ} -func (m *_AdsReadResponse) GetResponse() bool { - return bool(true) -} +func (m *_AdsReadResponse) GetResponse() bool { +return bool(true)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AdsReadResponse) InitializeParent(parent AmsPacket, targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) { - m.TargetAmsNetId = targetAmsNetId +func (m *_AdsReadResponse) InitializeParent(parent AmsPacket , targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) { m.TargetAmsNetId = targetAmsNetId m.TargetAmsPort = targetAmsPort m.SourceAmsNetId = sourceAmsNetId m.SourceAmsPort = sourceAmsPort @@ -79,10 +80,9 @@ func (m *_AdsReadResponse) InitializeParent(parent AmsPacket, targetAmsNetId Ams m.InvokeId = invokeId } -func (m *_AdsReadResponse) GetParent() AmsPacket { +func (m *_AdsReadResponse) GetParent() AmsPacket { return m._AmsPacket } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -101,12 +101,13 @@ func (m *_AdsReadResponse) GetData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAdsReadResponse factory function for _AdsReadResponse -func NewAdsReadResponse(result ReturnCode, data []byte, targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) *_AdsReadResponse { +func NewAdsReadResponse( result ReturnCode , data []byte , targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) *_AdsReadResponse { _result := &_AdsReadResponse{ - Result: result, - Data: data, - _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), + Result: result, + Data: data, + _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), } _result._AmsPacket._AmsPacketChildRequirements = _result return _result @@ -114,7 +115,7 @@ func NewAdsReadResponse(result ReturnCode, data []byte, targetAmsNetId AmsNetId, // Deprecated: use the interface for direct cast func CastAdsReadResponse(structType interface{}) AdsReadResponse { - if casted, ok := structType.(AdsReadResponse); ok { + if casted, ok := structType.(AdsReadResponse); ok { return casted } if casted, ok := structType.(*AdsReadResponse); ok { @@ -144,6 +145,7 @@ func (m *_AdsReadResponse) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_AdsReadResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func AdsReadResponseParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu if pullErr := readBuffer.PullContext("result"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for result") } - _result, _resultErr := ReturnCodeParseWithBuffer(ctx, readBuffer) +_result, _resultErr := ReturnCodeParseWithBuffer(ctx, readBuffer) if _resultErr != nil { return nil, errors.Wrap(_resultErr, "Error parsing 'result' field of AdsReadResponse") } @@ -193,9 +195,10 @@ func AdsReadResponseParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu // Create a partially initialized instance _child := &_AdsReadResponse{ - _AmsPacket: &_AmsPacket{}, - Result: result, - Data: data, + _AmsPacket: &_AmsPacket{ + }, + Result: result, + Data: data, } _child._AmsPacket._AmsPacketChildRequirements = _child return _child, nil @@ -217,30 +220,30 @@ func (m *_AdsReadResponse) SerializeWithWriteBuffer(ctx context.Context, writeBu return errors.Wrap(pushErr, "Error pushing for AdsReadResponse") } - // Simple Field (result) - if pushErr := writeBuffer.PushContext("result"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for result") - } - _resultErr := writeBuffer.WriteSerializable(ctx, m.GetResult()) - if popErr := writeBuffer.PopContext("result"); popErr != nil { - return errors.Wrap(popErr, "Error popping for result") - } - if _resultErr != nil { - return errors.Wrap(_resultErr, "Error serializing 'result' field") - } + // Simple Field (result) + if pushErr := writeBuffer.PushContext("result"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for result") + } + _resultErr := writeBuffer.WriteSerializable(ctx, m.GetResult()) + if popErr := writeBuffer.PopContext("result"); popErr != nil { + return errors.Wrap(popErr, "Error popping for result") + } + if _resultErr != nil { + return errors.Wrap(_resultErr, "Error serializing 'result' field") + } - // Implicit Field (length) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - length := uint32(uint32(len(m.GetData()))) - _lengthErr := writeBuffer.WriteUint32("length", 32, (length)) - if _lengthErr != nil { - return errors.Wrap(_lengthErr, "Error serializing 'length' field") - } + // Implicit Field (length) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) + length := uint32(uint32(len(m.GetData()))) + _lengthErr := writeBuffer.WriteUint32("length", 32, (length)) + if _lengthErr != nil { + return errors.Wrap(_lengthErr, "Error serializing 'length' field") + } - // Array Field (data) - // Byte Array field (data) - if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { - return errors.Wrap(err, "Error serializing 'data' field") - } + // Array Field (data) + // Byte Array field (data) + if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { + return errors.Wrap(err, "Error serializing 'data' field") + } if popErr := writeBuffer.PopContext("AdsReadResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for AdsReadResponse") @@ -250,6 +253,7 @@ func (m *_AdsReadResponse) SerializeWithWriteBuffer(ctx context.Context, writeBu return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AdsReadResponse) isAdsReadResponse() bool { return true } @@ -264,3 +268,6 @@ func (m *_AdsReadResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/readwrite/model/AdsReadStateRequest.go b/plc4go/protocols/ads/readwrite/model/AdsReadStateRequest.go index cc79a4e2f32..7e9d269c03c 100644 --- a/plc4go/protocols/ads/readwrite/model/AdsReadStateRequest.go +++ b/plc4go/protocols/ads/readwrite/model/AdsReadStateRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AdsReadStateRequest is the corresponding interface of AdsReadStateRequest type AdsReadStateRequest interface { @@ -46,26 +48,25 @@ type _AdsReadStateRequest struct { *_AmsPacket } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_AdsReadStateRequest) GetCommandId() CommandId { - return CommandId_ADS_READ_STATE -} +func (m *_AdsReadStateRequest) GetCommandId() CommandId { +return CommandId_ADS_READ_STATE} -func (m *_AdsReadStateRequest) GetResponse() bool { - return bool(false) -} +func (m *_AdsReadStateRequest) GetResponse() bool { +return bool(false)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AdsReadStateRequest) InitializeParent(parent AmsPacket, targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) { - m.TargetAmsNetId = targetAmsNetId +func (m *_AdsReadStateRequest) InitializeParent(parent AmsPacket , targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) { m.TargetAmsNetId = targetAmsNetId m.TargetAmsPort = targetAmsPort m.SourceAmsNetId = sourceAmsNetId m.SourceAmsPort = sourceAmsPort @@ -73,14 +74,15 @@ func (m *_AdsReadStateRequest) InitializeParent(parent AmsPacket, targetAmsNetId m.InvokeId = invokeId } -func (m *_AdsReadStateRequest) GetParent() AmsPacket { +func (m *_AdsReadStateRequest) GetParent() AmsPacket { return m._AmsPacket } + // NewAdsReadStateRequest factory function for _AdsReadStateRequest -func NewAdsReadStateRequest(targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) *_AdsReadStateRequest { +func NewAdsReadStateRequest( targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) *_AdsReadStateRequest { _result := &_AdsReadStateRequest{ - _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), + _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), } _result._AmsPacket._AmsPacketChildRequirements = _result return _result @@ -88,7 +90,7 @@ func NewAdsReadStateRequest(targetAmsNetId AmsNetId, targetAmsPort uint16, sourc // Deprecated: use the interface for direct cast func CastAdsReadStateRequest(structType interface{}) AdsReadStateRequest { - if casted, ok := structType.(AdsReadStateRequest); ok { + if casted, ok := structType.(AdsReadStateRequest); ok { return casted } if casted, ok := structType.(*AdsReadStateRequest); ok { @@ -107,6 +109,7 @@ func (m *_AdsReadStateRequest) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_AdsReadStateRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -130,7 +133,8 @@ func AdsReadStateRequestParseWithBuffer(ctx context.Context, readBuffer utils.Re // Create a partially initialized instance _child := &_AdsReadStateRequest{ - _AmsPacket: &_AmsPacket{}, + _AmsPacket: &_AmsPacket{ + }, } _child._AmsPacket._AmsPacketChildRequirements = _child return _child, nil @@ -160,6 +164,7 @@ func (m *_AdsReadStateRequest) SerializeWithWriteBuffer(ctx context.Context, wri return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AdsReadStateRequest) isAdsReadStateRequest() bool { return true } @@ -174,3 +179,6 @@ func (m *_AdsReadStateRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/readwrite/model/AdsReadStateResponse.go b/plc4go/protocols/ads/readwrite/model/AdsReadStateResponse.go index 0945fd764b3..ae114283e7e 100644 --- a/plc4go/protocols/ads/readwrite/model/AdsReadStateResponse.go +++ b/plc4go/protocols/ads/readwrite/model/AdsReadStateResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AdsReadStateResponse is the corresponding interface of AdsReadStateResponse type AdsReadStateResponse interface { @@ -50,31 +52,30 @@ type AdsReadStateResponseExactly interface { // _AdsReadStateResponse is the data-structure of this message type _AdsReadStateResponse struct { *_AmsPacket - Result ReturnCode - AdsState uint16 - DeviceState uint16 + Result ReturnCode + AdsState uint16 + DeviceState uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_AdsReadStateResponse) GetCommandId() CommandId { - return CommandId_ADS_READ_STATE -} +func (m *_AdsReadStateResponse) GetCommandId() CommandId { +return CommandId_ADS_READ_STATE} -func (m *_AdsReadStateResponse) GetResponse() bool { - return bool(true) -} +func (m *_AdsReadStateResponse) GetResponse() bool { +return bool(true)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AdsReadStateResponse) InitializeParent(parent AmsPacket, targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) { - m.TargetAmsNetId = targetAmsNetId +func (m *_AdsReadStateResponse) InitializeParent(parent AmsPacket , targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) { m.TargetAmsNetId = targetAmsNetId m.TargetAmsPort = targetAmsPort m.SourceAmsNetId = sourceAmsNetId m.SourceAmsPort = sourceAmsPort @@ -82,10 +83,9 @@ func (m *_AdsReadStateResponse) InitializeParent(parent AmsPacket, targetAmsNetI m.InvokeId = invokeId } -func (m *_AdsReadStateResponse) GetParent() AmsPacket { +func (m *_AdsReadStateResponse) GetParent() AmsPacket { return m._AmsPacket } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,13 +108,14 @@ func (m *_AdsReadStateResponse) GetDeviceState() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAdsReadStateResponse factory function for _AdsReadStateResponse -func NewAdsReadStateResponse(result ReturnCode, adsState uint16, deviceState uint16, targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) *_AdsReadStateResponse { +func NewAdsReadStateResponse( result ReturnCode , adsState uint16 , deviceState uint16 , targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) *_AdsReadStateResponse { _result := &_AdsReadStateResponse{ - Result: result, - AdsState: adsState, + Result: result, + AdsState: adsState, DeviceState: deviceState, - _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), + _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), } _result._AmsPacket._AmsPacketChildRequirements = _result return _result @@ -122,7 +123,7 @@ func NewAdsReadStateResponse(result ReturnCode, adsState uint16, deviceState uin // Deprecated: use the interface for direct cast func CastAdsReadStateResponse(structType interface{}) AdsReadStateResponse { - if casted, ok := structType.(AdsReadStateResponse); ok { + if casted, ok := structType.(AdsReadStateResponse); ok { return casted } if casted, ok := structType.(*AdsReadStateResponse); ok { @@ -142,14 +143,15 @@ func (m *_AdsReadStateResponse) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += 32 // Simple field (adsState) - lengthInBits += 16 + lengthInBits += 16; // Simple field (deviceState) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_AdsReadStateResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -171,7 +173,7 @@ func AdsReadStateResponseParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("result"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for result") } - _result, _resultErr := ReturnCodeParseWithBuffer(ctx, readBuffer) +_result, _resultErr := ReturnCodeParseWithBuffer(ctx, readBuffer) if _resultErr != nil { return nil, errors.Wrap(_resultErr, "Error parsing 'result' field of AdsReadStateResponse") } @@ -181,14 +183,14 @@ func AdsReadStateResponseParseWithBuffer(ctx context.Context, readBuffer utils.R } // Simple Field (adsState) - _adsState, _adsStateErr := readBuffer.ReadUint16("adsState", 16) +_adsState, _adsStateErr := readBuffer.ReadUint16("adsState", 16) if _adsStateErr != nil { return nil, errors.Wrap(_adsStateErr, "Error parsing 'adsState' field of AdsReadStateResponse") } adsState := _adsState // Simple Field (deviceState) - _deviceState, _deviceStateErr := readBuffer.ReadUint16("deviceState", 16) +_deviceState, _deviceStateErr := readBuffer.ReadUint16("deviceState", 16) if _deviceStateErr != nil { return nil, errors.Wrap(_deviceStateErr, "Error parsing 'deviceState' field of AdsReadStateResponse") } @@ -200,9 +202,10 @@ func AdsReadStateResponseParseWithBuffer(ctx context.Context, readBuffer utils.R // Create a partially initialized instance _child := &_AdsReadStateResponse{ - _AmsPacket: &_AmsPacket{}, - Result: result, - AdsState: adsState, + _AmsPacket: &_AmsPacket{ + }, + Result: result, + AdsState: adsState, DeviceState: deviceState, } _child._AmsPacket._AmsPacketChildRequirements = _child @@ -225,31 +228,31 @@ func (m *_AdsReadStateResponse) SerializeWithWriteBuffer(ctx context.Context, wr return errors.Wrap(pushErr, "Error pushing for AdsReadStateResponse") } - // Simple Field (result) - if pushErr := writeBuffer.PushContext("result"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for result") - } - _resultErr := writeBuffer.WriteSerializable(ctx, m.GetResult()) - if popErr := writeBuffer.PopContext("result"); popErr != nil { - return errors.Wrap(popErr, "Error popping for result") - } - if _resultErr != nil { - return errors.Wrap(_resultErr, "Error serializing 'result' field") - } + // Simple Field (result) + if pushErr := writeBuffer.PushContext("result"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for result") + } + _resultErr := writeBuffer.WriteSerializable(ctx, m.GetResult()) + if popErr := writeBuffer.PopContext("result"); popErr != nil { + return errors.Wrap(popErr, "Error popping for result") + } + if _resultErr != nil { + return errors.Wrap(_resultErr, "Error serializing 'result' field") + } - // Simple Field (adsState) - adsState := uint16(m.GetAdsState()) - _adsStateErr := writeBuffer.WriteUint16("adsState", 16, (adsState)) - if _adsStateErr != nil { - return errors.Wrap(_adsStateErr, "Error serializing 'adsState' field") - } + // Simple Field (adsState) + adsState := uint16(m.GetAdsState()) + _adsStateErr := writeBuffer.WriteUint16("adsState", 16, (adsState)) + if _adsStateErr != nil { + return errors.Wrap(_adsStateErr, "Error serializing 'adsState' field") + } - // Simple Field (deviceState) - deviceState := uint16(m.GetDeviceState()) - _deviceStateErr := writeBuffer.WriteUint16("deviceState", 16, (deviceState)) - if _deviceStateErr != nil { - return errors.Wrap(_deviceStateErr, "Error serializing 'deviceState' field") - } + // Simple Field (deviceState) + deviceState := uint16(m.GetDeviceState()) + _deviceStateErr := writeBuffer.WriteUint16("deviceState", 16, (deviceState)) + if _deviceStateErr != nil { + return errors.Wrap(_deviceStateErr, "Error serializing 'deviceState' field") + } if popErr := writeBuffer.PopContext("AdsReadStateResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for AdsReadStateResponse") @@ -259,6 +262,7 @@ func (m *_AdsReadStateResponse) SerializeWithWriteBuffer(ctx context.Context, wr return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AdsReadStateResponse) isAdsReadStateResponse() bool { return true } @@ -273,3 +277,6 @@ func (m *_AdsReadStateResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/readwrite/model/AdsReadWriteRequest.go b/plc4go/protocols/ads/readwrite/model/AdsReadWriteRequest.go index 74ce3a94b77..16976e2b73e 100644 --- a/plc4go/protocols/ads/readwrite/model/AdsReadWriteRequest.go +++ b/plc4go/protocols/ads/readwrite/model/AdsReadWriteRequest.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AdsReadWriteRequest is the corresponding interface of AdsReadWriteRequest type AdsReadWriteRequest interface { @@ -55,33 +57,32 @@ type AdsReadWriteRequestExactly interface { // _AdsReadWriteRequest is the data-structure of this message type _AdsReadWriteRequest struct { *_AmsPacket - IndexGroup uint32 - IndexOffset uint32 - ReadLength uint32 - Items []AdsMultiRequestItem - Data []byte + IndexGroup uint32 + IndexOffset uint32 + ReadLength uint32 + Items []AdsMultiRequestItem + Data []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_AdsReadWriteRequest) GetCommandId() CommandId { - return CommandId_ADS_READ_WRITE -} +func (m *_AdsReadWriteRequest) GetCommandId() CommandId { +return CommandId_ADS_READ_WRITE} -func (m *_AdsReadWriteRequest) GetResponse() bool { - return bool(false) -} +func (m *_AdsReadWriteRequest) GetResponse() bool { +return bool(false)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AdsReadWriteRequest) InitializeParent(parent AmsPacket, targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) { - m.TargetAmsNetId = targetAmsNetId +func (m *_AdsReadWriteRequest) InitializeParent(parent AmsPacket , targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) { m.TargetAmsNetId = targetAmsNetId m.TargetAmsPort = targetAmsPort m.SourceAmsNetId = sourceAmsNetId m.SourceAmsPort = sourceAmsPort @@ -89,10 +90,9 @@ func (m *_AdsReadWriteRequest) InitializeParent(parent AmsPacket, targetAmsNetId m.InvokeId = invokeId } -func (m *_AdsReadWriteRequest) GetParent() AmsPacket { +func (m *_AdsReadWriteRequest) GetParent() AmsPacket { return m._AmsPacket } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -123,15 +123,16 @@ func (m *_AdsReadWriteRequest) GetData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAdsReadWriteRequest factory function for _AdsReadWriteRequest -func NewAdsReadWriteRequest(indexGroup uint32, indexOffset uint32, readLength uint32, items []AdsMultiRequestItem, data []byte, targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) *_AdsReadWriteRequest { +func NewAdsReadWriteRequest( indexGroup uint32 , indexOffset uint32 , readLength uint32 , items []AdsMultiRequestItem , data []byte , targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) *_AdsReadWriteRequest { _result := &_AdsReadWriteRequest{ - IndexGroup: indexGroup, + IndexGroup: indexGroup, IndexOffset: indexOffset, - ReadLength: readLength, - Items: items, - Data: data, - _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), + ReadLength: readLength, + Items: items, + Data: data, + _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), } _result._AmsPacket._AmsPacketChildRequirements = _result return _result @@ -139,7 +140,7 @@ func NewAdsReadWriteRequest(indexGroup uint32, indexOffset uint32, readLength ui // Deprecated: use the interface for direct cast func CastAdsReadWriteRequest(structType interface{}) AdsReadWriteRequest { - if casted, ok := structType.(AdsReadWriteRequest); ok { + if casted, ok := structType.(AdsReadWriteRequest); ok { return casted } if casted, ok := structType.(*AdsReadWriteRequest); ok { @@ -156,13 +157,13 @@ func (m *_AdsReadWriteRequest) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (indexGroup) - lengthInBits += 32 + lengthInBits += 32; // Simple field (indexOffset) - lengthInBits += 32 + lengthInBits += 32; // Simple field (readLength) - lengthInBits += 32 + lengthInBits += 32; // Implicit Field (writeLength) lengthInBits += 32 @@ -173,7 +174,7 @@ func (m *_AdsReadWriteRequest) GetLengthInBits(ctx context.Context) uint16 { arrayCtx := spiContext.CreateArrayContext(ctx, len(m.Items), _curItem) _ = arrayCtx _ = _curItem - lengthInBits += element.(interface{ GetLengthInBits(context.Context) uint16 }).GetLengthInBits(arrayCtx) + lengthInBits += element.(interface{GetLengthInBits(context.Context) uint16}).GetLengthInBits(arrayCtx) } } @@ -185,6 +186,7 @@ func (m *_AdsReadWriteRequest) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_AdsReadWriteRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -203,21 +205,21 @@ func AdsReadWriteRequestParseWithBuffer(ctx context.Context, readBuffer utils.Re _ = currentPos // Simple Field (indexGroup) - _indexGroup, _indexGroupErr := readBuffer.ReadUint32("indexGroup", 32) +_indexGroup, _indexGroupErr := readBuffer.ReadUint32("indexGroup", 32) if _indexGroupErr != nil { return nil, errors.Wrap(_indexGroupErr, "Error parsing 'indexGroup' field of AdsReadWriteRequest") } indexGroup := _indexGroup // Simple Field (indexOffset) - _indexOffset, _indexOffsetErr := readBuffer.ReadUint32("indexOffset", 32) +_indexOffset, _indexOffsetErr := readBuffer.ReadUint32("indexOffset", 32) if _indexOffsetErr != nil { return nil, errors.Wrap(_indexOffsetErr, "Error parsing 'indexOffset' field of AdsReadWriteRequest") } indexOffset := _indexOffset // Simple Field (readLength) - _readLength, _readLengthErr := readBuffer.ReadUint32("readLength", 32) +_readLength, _readLengthErr := readBuffer.ReadUint32("readLength", 32) if _readLengthErr != nil { return nil, errors.Wrap(_readLengthErr, "Error parsing 'readLength' field of AdsReadWriteRequest") } @@ -235,18 +237,18 @@ func AdsReadWriteRequestParseWithBuffer(ctx context.Context, readBuffer utils.Re return nil, errors.Wrap(pullErr, "Error pulling for items") } // Count array - items := make([]AdsMultiRequestItem, utils.InlineIf((bool(bool((bool((indexGroup) == (61568)))) || bool((bool((indexGroup) == (61569))))) || bool((bool((indexGroup) == (61570))))), func() interface{} { return uint16(indexOffset) }, func() interface{} { return uint16(uint16(0)) }).(uint16)) + items := make([]AdsMultiRequestItem, utils.InlineIf((bool(bool((bool((indexGroup) == ((61568))))) || bool((bool((indexGroup) == ((61569)))))) || bool((bool((indexGroup) == ((61570)))))), func() interface{} {return uint16(indexOffset)}, func() interface{} {return uint16(uint16(0))}).(uint16)) // This happens when the size is set conditional to 0 if len(items) == 0 { items = nil } { - _numItems := uint16(utils.InlineIf((bool(bool((bool((indexGroup) == (61568)))) || bool((bool((indexGroup) == (61569))))) || bool((bool((indexGroup) == (61570))))), func() interface{} { return uint16(indexOffset) }, func() interface{} { return uint16(uint16(0)) }).(uint16)) + _numItems := uint16(utils.InlineIf((bool(bool((bool((indexGroup) == ((61568))))) || bool((bool((indexGroup) == ((61569)))))) || bool((bool((indexGroup) == ((61570)))))), func() interface{} {return uint16(indexOffset)}, func() interface{} {return uint16(uint16(0))}).(uint16)) for _curItem := uint16(0); _curItem < _numItems; _curItem++ { arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := AdsMultiRequestItemParseWithBuffer(arrayCtx, readBuffer, indexGroup) +_item, _err := AdsMultiRequestItemParseWithBuffer(arrayCtx, readBuffer , indexGroup ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'items' field of AdsReadWriteRequest") } @@ -269,12 +271,13 @@ func AdsReadWriteRequestParseWithBuffer(ctx context.Context, readBuffer utils.Re // Create a partially initialized instance _child := &_AdsReadWriteRequest{ - _AmsPacket: &_AmsPacket{}, - IndexGroup: indexGroup, + _AmsPacket: &_AmsPacket{ + }, + IndexGroup: indexGroup, IndexOffset: indexOffset, - ReadLength: readLength, - Items: items, - Data: data, + ReadLength: readLength, + Items: items, + Data: data, } _child._AmsPacket._AmsPacketChildRequirements = _child return _child, nil @@ -296,56 +299,56 @@ func (m *_AdsReadWriteRequest) SerializeWithWriteBuffer(ctx context.Context, wri return errors.Wrap(pushErr, "Error pushing for AdsReadWriteRequest") } - // Simple Field (indexGroup) - indexGroup := uint32(m.GetIndexGroup()) - _indexGroupErr := writeBuffer.WriteUint32("indexGroup", 32, (indexGroup)) - if _indexGroupErr != nil { - return errors.Wrap(_indexGroupErr, "Error serializing 'indexGroup' field") - } + // Simple Field (indexGroup) + indexGroup := uint32(m.GetIndexGroup()) + _indexGroupErr := writeBuffer.WriteUint32("indexGroup", 32, (indexGroup)) + if _indexGroupErr != nil { + return errors.Wrap(_indexGroupErr, "Error serializing 'indexGroup' field") + } - // Simple Field (indexOffset) - indexOffset := uint32(m.GetIndexOffset()) - _indexOffsetErr := writeBuffer.WriteUint32("indexOffset", 32, (indexOffset)) - if _indexOffsetErr != nil { - return errors.Wrap(_indexOffsetErr, "Error serializing 'indexOffset' field") - } + // Simple Field (indexOffset) + indexOffset := uint32(m.GetIndexOffset()) + _indexOffsetErr := writeBuffer.WriteUint32("indexOffset", 32, (indexOffset)) + if _indexOffsetErr != nil { + return errors.Wrap(_indexOffsetErr, "Error serializing 'indexOffset' field") + } - // Simple Field (readLength) - readLength := uint32(m.GetReadLength()) - _readLengthErr := writeBuffer.WriteUint32("readLength", 32, (readLength)) - if _readLengthErr != nil { - return errors.Wrap(_readLengthErr, "Error serializing 'readLength' field") - } + // Simple Field (readLength) + readLength := uint32(m.GetReadLength()) + _readLengthErr := writeBuffer.WriteUint32("readLength", 32, (readLength)) + if _readLengthErr != nil { + return errors.Wrap(_readLengthErr, "Error serializing 'readLength' field") + } - // Implicit Field (writeLength) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - writeLength := uint32(uint32((uint32(uint32(len(m.GetItems()))) * uint32((utils.InlineIf((bool((m.GetIndexGroup()) == (61570))), func() interface{} { return uint32(uint32(16)) }, func() interface{} { return uint32(uint32(12)) }).(uint32))))) + uint32(uint32(len(m.GetData())))) - _writeLengthErr := writeBuffer.WriteUint32("writeLength", 32, (writeLength)) - if _writeLengthErr != nil { - return errors.Wrap(_writeLengthErr, "Error serializing 'writeLength' field") - } + // Implicit Field (writeLength) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) + writeLength := uint32(uint32((uint32(uint32(len(m.GetItems()))) * uint32((utils.InlineIf((bool((m.GetIndexGroup()) == ((61570)))), func() interface{} {return uint32(uint32(16))}, func() interface{} {return uint32(uint32(12))}).(uint32))))) + uint32(uint32(len(m.GetData())))) + _writeLengthErr := writeBuffer.WriteUint32("writeLength", 32, (writeLength)) + if _writeLengthErr != nil { + return errors.Wrap(_writeLengthErr, "Error serializing 'writeLength' field") + } - // Array Field (items) - if pushErr := writeBuffer.PushContext("items", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for items") - } - for _curItem, _element := range m.GetItems() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetItems()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'items' field") - } - } - if popErr := writeBuffer.PopContext("items", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for items") + // Array Field (items) + if pushErr := writeBuffer.PushContext("items", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for items") + } + for _curItem, _element := range m.GetItems() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetItems()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'items' field") } + } + if popErr := writeBuffer.PopContext("items", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for items") + } - // Array Field (data) - // Byte Array field (data) - if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { - return errors.Wrap(err, "Error serializing 'data' field") - } + // Array Field (data) + // Byte Array field (data) + if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { + return errors.Wrap(err, "Error serializing 'data' field") + } if popErr := writeBuffer.PopContext("AdsReadWriteRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for AdsReadWriteRequest") @@ -355,6 +358,7 @@ func (m *_AdsReadWriteRequest) SerializeWithWriteBuffer(ctx context.Context, wri return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AdsReadWriteRequest) isAdsReadWriteRequest() bool { return true } @@ -369,3 +373,6 @@ func (m *_AdsReadWriteRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/readwrite/model/AdsReadWriteResponse.go b/plc4go/protocols/ads/readwrite/model/AdsReadWriteResponse.go index 2aac379d190..2e3665dd296 100644 --- a/plc4go/protocols/ads/readwrite/model/AdsReadWriteResponse.go +++ b/plc4go/protocols/ads/readwrite/model/AdsReadWriteResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AdsReadWriteResponse is the corresponding interface of AdsReadWriteResponse type AdsReadWriteResponse interface { @@ -48,30 +50,29 @@ type AdsReadWriteResponseExactly interface { // _AdsReadWriteResponse is the data-structure of this message type _AdsReadWriteResponse struct { *_AmsPacket - Result ReturnCode - Data []byte + Result ReturnCode + Data []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_AdsReadWriteResponse) GetCommandId() CommandId { - return CommandId_ADS_READ_WRITE -} +func (m *_AdsReadWriteResponse) GetCommandId() CommandId { +return CommandId_ADS_READ_WRITE} -func (m *_AdsReadWriteResponse) GetResponse() bool { - return bool(true) -} +func (m *_AdsReadWriteResponse) GetResponse() bool { +return bool(true)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AdsReadWriteResponse) InitializeParent(parent AmsPacket, targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) { - m.TargetAmsNetId = targetAmsNetId +func (m *_AdsReadWriteResponse) InitializeParent(parent AmsPacket , targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) { m.TargetAmsNetId = targetAmsNetId m.TargetAmsPort = targetAmsPort m.SourceAmsNetId = sourceAmsNetId m.SourceAmsPort = sourceAmsPort @@ -79,10 +80,9 @@ func (m *_AdsReadWriteResponse) InitializeParent(parent AmsPacket, targetAmsNetI m.InvokeId = invokeId } -func (m *_AdsReadWriteResponse) GetParent() AmsPacket { +func (m *_AdsReadWriteResponse) GetParent() AmsPacket { return m._AmsPacket } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -101,12 +101,13 @@ func (m *_AdsReadWriteResponse) GetData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAdsReadWriteResponse factory function for _AdsReadWriteResponse -func NewAdsReadWriteResponse(result ReturnCode, data []byte, targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) *_AdsReadWriteResponse { +func NewAdsReadWriteResponse( result ReturnCode , data []byte , targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) *_AdsReadWriteResponse { _result := &_AdsReadWriteResponse{ - Result: result, - Data: data, - _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), + Result: result, + Data: data, + _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), } _result._AmsPacket._AmsPacketChildRequirements = _result return _result @@ -114,7 +115,7 @@ func NewAdsReadWriteResponse(result ReturnCode, data []byte, targetAmsNetId AmsN // Deprecated: use the interface for direct cast func CastAdsReadWriteResponse(structType interface{}) AdsReadWriteResponse { - if casted, ok := structType.(AdsReadWriteResponse); ok { + if casted, ok := structType.(AdsReadWriteResponse); ok { return casted } if casted, ok := structType.(*AdsReadWriteResponse); ok { @@ -144,6 +145,7 @@ func (m *_AdsReadWriteResponse) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_AdsReadWriteResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func AdsReadWriteResponseParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("result"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for result") } - _result, _resultErr := ReturnCodeParseWithBuffer(ctx, readBuffer) +_result, _resultErr := ReturnCodeParseWithBuffer(ctx, readBuffer) if _resultErr != nil { return nil, errors.Wrap(_resultErr, "Error parsing 'result' field of AdsReadWriteResponse") } @@ -193,9 +195,10 @@ func AdsReadWriteResponseParseWithBuffer(ctx context.Context, readBuffer utils.R // Create a partially initialized instance _child := &_AdsReadWriteResponse{ - _AmsPacket: &_AmsPacket{}, - Result: result, - Data: data, + _AmsPacket: &_AmsPacket{ + }, + Result: result, + Data: data, } _child._AmsPacket._AmsPacketChildRequirements = _child return _child, nil @@ -217,30 +220,30 @@ func (m *_AdsReadWriteResponse) SerializeWithWriteBuffer(ctx context.Context, wr return errors.Wrap(pushErr, "Error pushing for AdsReadWriteResponse") } - // Simple Field (result) - if pushErr := writeBuffer.PushContext("result"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for result") - } - _resultErr := writeBuffer.WriteSerializable(ctx, m.GetResult()) - if popErr := writeBuffer.PopContext("result"); popErr != nil { - return errors.Wrap(popErr, "Error popping for result") - } - if _resultErr != nil { - return errors.Wrap(_resultErr, "Error serializing 'result' field") - } + // Simple Field (result) + if pushErr := writeBuffer.PushContext("result"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for result") + } + _resultErr := writeBuffer.WriteSerializable(ctx, m.GetResult()) + if popErr := writeBuffer.PopContext("result"); popErr != nil { + return errors.Wrap(popErr, "Error popping for result") + } + if _resultErr != nil { + return errors.Wrap(_resultErr, "Error serializing 'result' field") + } - // Implicit Field (length) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - length := uint32(uint32(len(m.GetData()))) - _lengthErr := writeBuffer.WriteUint32("length", 32, (length)) - if _lengthErr != nil { - return errors.Wrap(_lengthErr, "Error serializing 'length' field") - } + // Implicit Field (length) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) + length := uint32(uint32(len(m.GetData()))) + _lengthErr := writeBuffer.WriteUint32("length", 32, (length)) + if _lengthErr != nil { + return errors.Wrap(_lengthErr, "Error serializing 'length' field") + } - // Array Field (data) - // Byte Array field (data) - if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { - return errors.Wrap(err, "Error serializing 'data' field") - } + // Array Field (data) + // Byte Array field (data) + if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { + return errors.Wrap(err, "Error serializing 'data' field") + } if popErr := writeBuffer.PopContext("AdsReadWriteResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for AdsReadWriteResponse") @@ -250,6 +253,7 @@ func (m *_AdsReadWriteResponse) SerializeWithWriteBuffer(ctx context.Context, wr return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AdsReadWriteResponse) isAdsReadWriteResponse() bool { return true } @@ -264,3 +268,6 @@ func (m *_AdsReadWriteResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/readwrite/model/AdsStampHeader.go b/plc4go/protocols/ads/readwrite/model/AdsStampHeader.go index 377f7360e21..d5c2807943a 100644 --- a/plc4go/protocols/ads/readwrite/model/AdsStampHeader.go +++ b/plc4go/protocols/ads/readwrite/model/AdsStampHeader.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AdsStampHeader is the corresponding interface of AdsStampHeader type AdsStampHeader interface { @@ -49,11 +51,12 @@ type AdsStampHeaderExactly interface { // _AdsStampHeader is the data-structure of this message type _AdsStampHeader struct { - Timestamp uint64 - Samples uint32 - AdsNotificationSamples []AdsNotificationSample + Timestamp uint64 + Samples uint32 + AdsNotificationSamples []AdsNotificationSample } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -76,14 +79,15 @@ func (m *_AdsStampHeader) GetAdsNotificationSamples() []AdsNotificationSample { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAdsStampHeader factory function for _AdsStampHeader -func NewAdsStampHeader(timestamp uint64, samples uint32, adsNotificationSamples []AdsNotificationSample) *_AdsStampHeader { - return &_AdsStampHeader{Timestamp: timestamp, Samples: samples, AdsNotificationSamples: adsNotificationSamples} +func NewAdsStampHeader( timestamp uint64 , samples uint32 , adsNotificationSamples []AdsNotificationSample ) *_AdsStampHeader { +return &_AdsStampHeader{ Timestamp: timestamp , Samples: samples , AdsNotificationSamples: adsNotificationSamples } } // Deprecated: use the interface for direct cast func CastAdsStampHeader(structType interface{}) AdsStampHeader { - if casted, ok := structType.(AdsStampHeader); ok { + if casted, ok := structType.(AdsStampHeader); ok { return casted } if casted, ok := structType.(*AdsStampHeader); ok { @@ -100,10 +104,10 @@ func (m *_AdsStampHeader) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (timestamp) - lengthInBits += 64 + lengthInBits += 64; // Simple field (samples) - lengthInBits += 32 + lengthInBits += 32; // Array field if len(m.AdsNotificationSamples) > 0 { @@ -111,13 +115,14 @@ func (m *_AdsStampHeader) GetLengthInBits(ctx context.Context) uint16 { arrayCtx := spiContext.CreateArrayContext(ctx, len(m.AdsNotificationSamples), _curItem) _ = arrayCtx _ = _curItem - lengthInBits += element.(interface{ GetLengthInBits(context.Context) uint16 }).GetLengthInBits(arrayCtx) + lengthInBits += element.(interface{GetLengthInBits(context.Context) uint16}).GetLengthInBits(arrayCtx) } } return lengthInBits } + func (m *_AdsStampHeader) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,14 +141,14 @@ func AdsStampHeaderParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf _ = currentPos // Simple Field (timestamp) - _timestamp, _timestampErr := readBuffer.ReadUint64("timestamp", 64) +_timestamp, _timestampErr := readBuffer.ReadUint64("timestamp", 64) if _timestampErr != nil { return nil, errors.Wrap(_timestampErr, "Error parsing 'timestamp' field of AdsStampHeader") } timestamp := _timestamp // Simple Field (samples) - _samples, _samplesErr := readBuffer.ReadUint32("samples", 32) +_samples, _samplesErr := readBuffer.ReadUint32("samples", 32) if _samplesErr != nil { return nil, errors.Wrap(_samplesErr, "Error parsing 'samples' field of AdsStampHeader") } @@ -165,7 +170,7 @@ func AdsStampHeaderParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := AdsNotificationSampleParseWithBuffer(arrayCtx, readBuffer) +_item, _err := AdsNotificationSampleParseWithBuffer(arrayCtx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'adsNotificationSamples' field of AdsStampHeader") } @@ -182,10 +187,10 @@ func AdsStampHeaderParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf // Create the instance return &_AdsStampHeader{ - Timestamp: timestamp, - Samples: samples, - AdsNotificationSamples: adsNotificationSamples, - }, nil + Timestamp: timestamp, + Samples: samples, + AdsNotificationSamples: adsNotificationSamples, + }, nil } func (m *_AdsStampHeader) Serialize() ([]byte, error) { @@ -199,7 +204,7 @@ func (m *_AdsStampHeader) Serialize() ([]byte, error) { func (m *_AdsStampHeader) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("AdsStampHeader"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("AdsStampHeader"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for AdsStampHeader") } @@ -240,6 +245,7 @@ func (m *_AdsStampHeader) SerializeWithWriteBuffer(ctx context.Context, writeBuf return nil } + func (m *_AdsStampHeader) isAdsStampHeader() bool { return true } @@ -254,3 +260,6 @@ func (m *_AdsStampHeader) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/readwrite/model/AdsSymbolTableEntry.go b/plc4go/protocols/ads/readwrite/model/AdsSymbolTableEntry.go index 0906e3452b5..dd09640b931 100644 --- a/plc4go/protocols/ads/readwrite/model/AdsSymbolTableEntry.go +++ b/plc4go/protocols/ads/readwrite/model/AdsSymbolTableEntry.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -27,7 +28,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const AdsSymbolTableEntry_NAMETERMINATOR uint8 = 0x00 @@ -93,33 +95,34 @@ type AdsSymbolTableEntryExactly interface { // _AdsSymbolTableEntry is the data-structure of this message type _AdsSymbolTableEntry struct { - EntryLength uint32 - Group uint32 - Offset uint32 - Size uint32 - DataType uint32 - FlagMethodDeref bool - FlagItfMethodAccess bool - FlagReadOnly bool - FlagTComInterfacePointer bool - FlagTypeGuid bool - FlagReferenceTo bool - FlagBitValue bool - FlagPersistent bool - FlagExtendedFlags bool - FlagInitOnReset bool - FlagStatic bool - FlagAttributes bool - FlagContextMask bool - Name string - DataTypeName string - Comment string - Rest []byte + EntryLength uint32 + Group uint32 + Offset uint32 + Size uint32 + DataType uint32 + FlagMethodDeref bool + FlagItfMethodAccess bool + FlagReadOnly bool + FlagTComInterfacePointer bool + FlagTypeGuid bool + FlagReferenceTo bool + FlagBitValue bool + FlagPersistent bool + FlagExtendedFlags bool + FlagInitOnReset bool + FlagStatic bool + FlagAttributes bool + FlagContextMask bool + Name string + DataTypeName string + Comment string + Rest []byte // Reserved Fields reservedField0 *uint8 reservedField1 *uint16 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -239,14 +242,15 @@ func (m *_AdsSymbolTableEntry) GetCommentTerminator() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAdsSymbolTableEntry factory function for _AdsSymbolTableEntry -func NewAdsSymbolTableEntry(entryLength uint32, group uint32, offset uint32, size uint32, dataType uint32, flagMethodDeref bool, flagItfMethodAccess bool, flagReadOnly bool, flagTComInterfacePointer bool, flagTypeGuid bool, flagReferenceTo bool, flagBitValue bool, flagPersistent bool, flagExtendedFlags bool, flagInitOnReset bool, flagStatic bool, flagAttributes bool, flagContextMask bool, name string, dataTypeName string, comment string, rest []byte) *_AdsSymbolTableEntry { - return &_AdsSymbolTableEntry{EntryLength: entryLength, Group: group, Offset: offset, Size: size, DataType: dataType, FlagMethodDeref: flagMethodDeref, FlagItfMethodAccess: flagItfMethodAccess, FlagReadOnly: flagReadOnly, FlagTComInterfacePointer: flagTComInterfacePointer, FlagTypeGuid: flagTypeGuid, FlagReferenceTo: flagReferenceTo, FlagBitValue: flagBitValue, FlagPersistent: flagPersistent, FlagExtendedFlags: flagExtendedFlags, FlagInitOnReset: flagInitOnReset, FlagStatic: flagStatic, FlagAttributes: flagAttributes, FlagContextMask: flagContextMask, Name: name, DataTypeName: dataTypeName, Comment: comment, Rest: rest} +func NewAdsSymbolTableEntry( entryLength uint32 , group uint32 , offset uint32 , size uint32 , dataType uint32 , flagMethodDeref bool , flagItfMethodAccess bool , flagReadOnly bool , flagTComInterfacePointer bool , flagTypeGuid bool , flagReferenceTo bool , flagBitValue bool , flagPersistent bool , flagExtendedFlags bool , flagInitOnReset bool , flagStatic bool , flagAttributes bool , flagContextMask bool , name string , dataTypeName string , comment string , rest []byte ) *_AdsSymbolTableEntry { +return &_AdsSymbolTableEntry{ EntryLength: entryLength , Group: group , Offset: offset , Size: size , DataType: dataType , FlagMethodDeref: flagMethodDeref , FlagItfMethodAccess: flagItfMethodAccess , FlagReadOnly: flagReadOnly , FlagTComInterfacePointer: flagTComInterfacePointer , FlagTypeGuid: flagTypeGuid , FlagReferenceTo: flagReferenceTo , FlagBitValue: flagBitValue , FlagPersistent: flagPersistent , FlagExtendedFlags: flagExtendedFlags , FlagInitOnReset: flagInitOnReset , FlagStatic: flagStatic , FlagAttributes: flagAttributes , FlagContextMask: flagContextMask , Name: name , DataTypeName: dataTypeName , Comment: comment , Rest: rest } } // Deprecated: use the interface for direct cast func CastAdsSymbolTableEntry(structType interface{}) AdsSymbolTableEntry { - if casted, ok := structType.(AdsSymbolTableEntry); ok { + if casted, ok := structType.(AdsSymbolTableEntry); ok { return casted } if casted, ok := structType.(*AdsSymbolTableEntry); ok { @@ -263,61 +267,61 @@ func (m *_AdsSymbolTableEntry) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (entryLength) - lengthInBits += 32 + lengthInBits += 32; // Simple field (group) - lengthInBits += 32 + lengthInBits += 32; // Simple field (offset) - lengthInBits += 32 + lengthInBits += 32; // Simple field (size) - lengthInBits += 32 + lengthInBits += 32; // Simple field (dataType) - lengthInBits += 32 + lengthInBits += 32; // Simple field (flagMethodDeref) - lengthInBits += 1 + lengthInBits += 1; // Simple field (flagItfMethodAccess) - lengthInBits += 1 + lengthInBits += 1; // Simple field (flagReadOnly) - lengthInBits += 1 + lengthInBits += 1; // Simple field (flagTComInterfacePointer) - lengthInBits += 1 + lengthInBits += 1; // Simple field (flagTypeGuid) - lengthInBits += 1 + lengthInBits += 1; // Simple field (flagReferenceTo) - lengthInBits += 1 + lengthInBits += 1; // Simple field (flagBitValue) - lengthInBits += 1 + lengthInBits += 1; // Simple field (flagPersistent) - lengthInBits += 1 + lengthInBits += 1; // Reserved Field (reserved) lengthInBits += 3 // Simple field (flagExtendedFlags) - lengthInBits += 1 + lengthInBits += 1; // Simple field (flagInitOnReset) - lengthInBits += 1 + lengthInBits += 1; // Simple field (flagStatic) - lengthInBits += 1 + lengthInBits += 1; // Simple field (flagAttributes) - lengthInBits += 1 + lengthInBits += 1; // Simple field (flagContextMask) - lengthInBits += 1 + lengthInBits += 1; // Reserved Field (reserved) lengthInBits += 16 @@ -357,6 +361,7 @@ func (m *_AdsSymbolTableEntry) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_AdsSymbolTableEntry) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -377,91 +382,91 @@ func AdsSymbolTableEntryParseWithBuffer(ctx context.Context, readBuffer utils.Re _ = startPos // Simple Field (entryLength) - _entryLength, _entryLengthErr := readBuffer.ReadUint32("entryLength", 32) +_entryLength, _entryLengthErr := readBuffer.ReadUint32("entryLength", 32) if _entryLengthErr != nil { return nil, errors.Wrap(_entryLengthErr, "Error parsing 'entryLength' field of AdsSymbolTableEntry") } entryLength := _entryLength // Simple Field (group) - _group, _groupErr := readBuffer.ReadUint32("group", 32) +_group, _groupErr := readBuffer.ReadUint32("group", 32) if _groupErr != nil { return nil, errors.Wrap(_groupErr, "Error parsing 'group' field of AdsSymbolTableEntry") } group := _group // Simple Field (offset) - _offset, _offsetErr := readBuffer.ReadUint32("offset", 32) +_offset, _offsetErr := readBuffer.ReadUint32("offset", 32) if _offsetErr != nil { return nil, errors.Wrap(_offsetErr, "Error parsing 'offset' field of AdsSymbolTableEntry") } offset := _offset // Simple Field (size) - _size, _sizeErr := readBuffer.ReadUint32("size", 32) +_size, _sizeErr := readBuffer.ReadUint32("size", 32) if _sizeErr != nil { return nil, errors.Wrap(_sizeErr, "Error parsing 'size' field of AdsSymbolTableEntry") } size := _size // Simple Field (dataType) - _dataType, _dataTypeErr := readBuffer.ReadUint32("dataType", 32) +_dataType, _dataTypeErr := readBuffer.ReadUint32("dataType", 32) if _dataTypeErr != nil { return nil, errors.Wrap(_dataTypeErr, "Error parsing 'dataType' field of AdsSymbolTableEntry") } dataType := _dataType // Simple Field (flagMethodDeref) - _flagMethodDeref, _flagMethodDerefErr := readBuffer.ReadBit("flagMethodDeref") +_flagMethodDeref, _flagMethodDerefErr := readBuffer.ReadBit("flagMethodDeref") if _flagMethodDerefErr != nil { return nil, errors.Wrap(_flagMethodDerefErr, "Error parsing 'flagMethodDeref' field of AdsSymbolTableEntry") } flagMethodDeref := _flagMethodDeref // Simple Field (flagItfMethodAccess) - _flagItfMethodAccess, _flagItfMethodAccessErr := readBuffer.ReadBit("flagItfMethodAccess") +_flagItfMethodAccess, _flagItfMethodAccessErr := readBuffer.ReadBit("flagItfMethodAccess") if _flagItfMethodAccessErr != nil { return nil, errors.Wrap(_flagItfMethodAccessErr, "Error parsing 'flagItfMethodAccess' field of AdsSymbolTableEntry") } flagItfMethodAccess := _flagItfMethodAccess // Simple Field (flagReadOnly) - _flagReadOnly, _flagReadOnlyErr := readBuffer.ReadBit("flagReadOnly") +_flagReadOnly, _flagReadOnlyErr := readBuffer.ReadBit("flagReadOnly") if _flagReadOnlyErr != nil { return nil, errors.Wrap(_flagReadOnlyErr, "Error parsing 'flagReadOnly' field of AdsSymbolTableEntry") } flagReadOnly := _flagReadOnly // Simple Field (flagTComInterfacePointer) - _flagTComInterfacePointer, _flagTComInterfacePointerErr := readBuffer.ReadBit("flagTComInterfacePointer") +_flagTComInterfacePointer, _flagTComInterfacePointerErr := readBuffer.ReadBit("flagTComInterfacePointer") if _flagTComInterfacePointerErr != nil { return nil, errors.Wrap(_flagTComInterfacePointerErr, "Error parsing 'flagTComInterfacePointer' field of AdsSymbolTableEntry") } flagTComInterfacePointer := _flagTComInterfacePointer // Simple Field (flagTypeGuid) - _flagTypeGuid, _flagTypeGuidErr := readBuffer.ReadBit("flagTypeGuid") +_flagTypeGuid, _flagTypeGuidErr := readBuffer.ReadBit("flagTypeGuid") if _flagTypeGuidErr != nil { return nil, errors.Wrap(_flagTypeGuidErr, "Error parsing 'flagTypeGuid' field of AdsSymbolTableEntry") } flagTypeGuid := _flagTypeGuid // Simple Field (flagReferenceTo) - _flagReferenceTo, _flagReferenceToErr := readBuffer.ReadBit("flagReferenceTo") +_flagReferenceTo, _flagReferenceToErr := readBuffer.ReadBit("flagReferenceTo") if _flagReferenceToErr != nil { return nil, errors.Wrap(_flagReferenceToErr, "Error parsing 'flagReferenceTo' field of AdsSymbolTableEntry") } flagReferenceTo := _flagReferenceTo // Simple Field (flagBitValue) - _flagBitValue, _flagBitValueErr := readBuffer.ReadBit("flagBitValue") +_flagBitValue, _flagBitValueErr := readBuffer.ReadBit("flagBitValue") if _flagBitValueErr != nil { return nil, errors.Wrap(_flagBitValueErr, "Error parsing 'flagBitValue' field of AdsSymbolTableEntry") } flagBitValue := _flagBitValue // Simple Field (flagPersistent) - _flagPersistent, _flagPersistentErr := readBuffer.ReadBit("flagPersistent") +_flagPersistent, _flagPersistentErr := readBuffer.ReadBit("flagPersistent") if _flagPersistentErr != nil { return nil, errors.Wrap(_flagPersistentErr, "Error parsing 'flagPersistent' field of AdsSymbolTableEntry") } @@ -477,7 +482,7 @@ func AdsSymbolTableEntryParseWithBuffer(ctx context.Context, readBuffer utils.Re if reserved != uint8(0x00) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -485,35 +490,35 @@ func AdsSymbolTableEntryParseWithBuffer(ctx context.Context, readBuffer utils.Re } // Simple Field (flagExtendedFlags) - _flagExtendedFlags, _flagExtendedFlagsErr := readBuffer.ReadBit("flagExtendedFlags") +_flagExtendedFlags, _flagExtendedFlagsErr := readBuffer.ReadBit("flagExtendedFlags") if _flagExtendedFlagsErr != nil { return nil, errors.Wrap(_flagExtendedFlagsErr, "Error parsing 'flagExtendedFlags' field of AdsSymbolTableEntry") } flagExtendedFlags := _flagExtendedFlags // Simple Field (flagInitOnReset) - _flagInitOnReset, _flagInitOnResetErr := readBuffer.ReadBit("flagInitOnReset") +_flagInitOnReset, _flagInitOnResetErr := readBuffer.ReadBit("flagInitOnReset") if _flagInitOnResetErr != nil { return nil, errors.Wrap(_flagInitOnResetErr, "Error parsing 'flagInitOnReset' field of AdsSymbolTableEntry") } flagInitOnReset := _flagInitOnReset // Simple Field (flagStatic) - _flagStatic, _flagStaticErr := readBuffer.ReadBit("flagStatic") +_flagStatic, _flagStaticErr := readBuffer.ReadBit("flagStatic") if _flagStaticErr != nil { return nil, errors.Wrap(_flagStaticErr, "Error parsing 'flagStatic' field of AdsSymbolTableEntry") } flagStatic := _flagStatic // Simple Field (flagAttributes) - _flagAttributes, _flagAttributesErr := readBuffer.ReadBit("flagAttributes") +_flagAttributes, _flagAttributesErr := readBuffer.ReadBit("flagAttributes") if _flagAttributesErr != nil { return nil, errors.Wrap(_flagAttributesErr, "Error parsing 'flagAttributes' field of AdsSymbolTableEntry") } flagAttributes := _flagAttributes // Simple Field (flagContextMask) - _flagContextMask, _flagContextMaskErr := readBuffer.ReadBit("flagContextMask") +_flagContextMask, _flagContextMaskErr := readBuffer.ReadBit("flagContextMask") if _flagContextMaskErr != nil { return nil, errors.Wrap(_flagContextMaskErr, "Error parsing 'flagContextMask' field of AdsSymbolTableEntry") } @@ -529,7 +534,7 @@ func AdsSymbolTableEntryParseWithBuffer(ctx context.Context, readBuffer utils.Re if reserved != uint16(0x0000) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint16(0x0000), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField1 = &reserved @@ -558,7 +563,7 @@ func AdsSymbolTableEntryParseWithBuffer(ctx context.Context, readBuffer utils.Re } // Simple Field (name) - _name, _nameErr := readBuffer.ReadString("name", uint32((nameLength)*(8)), "UTF-8") +_name, _nameErr := readBuffer.ReadString("name", uint32((nameLength) * ((8))), "UTF-8") if _nameErr != nil { return nil, errors.Wrap(_nameErr, "Error parsing 'name' field of AdsSymbolTableEntry") } @@ -574,7 +579,7 @@ func AdsSymbolTableEntryParseWithBuffer(ctx context.Context, readBuffer utils.Re } // Simple Field (dataTypeName) - _dataTypeName, _dataTypeNameErr := readBuffer.ReadString("dataTypeName", uint32((dataTypeNameLength)*(8)), "UTF-8") +_dataTypeName, _dataTypeNameErr := readBuffer.ReadString("dataTypeName", uint32((dataTypeNameLength) * ((8))), "UTF-8") if _dataTypeNameErr != nil { return nil, errors.Wrap(_dataTypeNameErr, "Error parsing 'dataTypeName' field of AdsSymbolTableEntry") } @@ -590,7 +595,7 @@ func AdsSymbolTableEntryParseWithBuffer(ctx context.Context, readBuffer utils.Re } // Simple Field (comment) - _comment, _commentErr := readBuffer.ReadString("comment", uint32((commentLength)*(8)), "UTF-8") +_comment, _commentErr := readBuffer.ReadString("comment", uint32((commentLength) * ((8))), "UTF-8") if _commentErr != nil { return nil, errors.Wrap(_commentErr, "Error parsing 'comment' field of AdsSymbolTableEntry") } @@ -617,31 +622,31 @@ func AdsSymbolTableEntryParseWithBuffer(ctx context.Context, readBuffer utils.Re // Create the instance return &_AdsSymbolTableEntry{ - EntryLength: entryLength, - Group: group, - Offset: offset, - Size: size, - DataType: dataType, - FlagMethodDeref: flagMethodDeref, - FlagItfMethodAccess: flagItfMethodAccess, - FlagReadOnly: flagReadOnly, - FlagTComInterfacePointer: flagTComInterfacePointer, - FlagTypeGuid: flagTypeGuid, - FlagReferenceTo: flagReferenceTo, - FlagBitValue: flagBitValue, - FlagPersistent: flagPersistent, - FlagExtendedFlags: flagExtendedFlags, - FlagInitOnReset: flagInitOnReset, - FlagStatic: flagStatic, - FlagAttributes: flagAttributes, - FlagContextMask: flagContextMask, - Name: name, - DataTypeName: dataTypeName, - Comment: comment, - Rest: rest, - reservedField0: reservedField0, - reservedField1: reservedField1, - }, nil + EntryLength: entryLength, + Group: group, + Offset: offset, + Size: size, + DataType: dataType, + FlagMethodDeref: flagMethodDeref, + FlagItfMethodAccess: flagItfMethodAccess, + FlagReadOnly: flagReadOnly, + FlagTComInterfacePointer: flagTComInterfacePointer, + FlagTypeGuid: flagTypeGuid, + FlagReferenceTo: flagReferenceTo, + FlagBitValue: flagBitValue, + FlagPersistent: flagPersistent, + FlagExtendedFlags: flagExtendedFlags, + FlagInitOnReset: flagInitOnReset, + FlagStatic: flagStatic, + FlagAttributes: flagAttributes, + FlagContextMask: flagContextMask, + Name: name, + DataTypeName: dataTypeName, + Comment: comment, + Rest: rest, + reservedField0: reservedField0, + reservedField1: reservedField1, + }, nil } func (m *_AdsSymbolTableEntry) Serialize() ([]byte, error) { @@ -655,7 +660,7 @@ func (m *_AdsSymbolTableEntry) Serialize() ([]byte, error) { func (m *_AdsSymbolTableEntry) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("AdsSymbolTableEntry"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("AdsSymbolTableEntry"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for AdsSymbolTableEntry") } @@ -756,7 +761,7 @@ func (m *_AdsSymbolTableEntry) SerializeWithWriteBuffer(ctx context.Context, wri if m.reservedField0 != nil { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Overriding reserved field with unexpected value.") reserved = *m.reservedField0 } @@ -807,7 +812,7 @@ func (m *_AdsSymbolTableEntry) SerializeWithWriteBuffer(ctx context.Context, wri if m.reservedField1 != nil { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint16(0x0000), - "got value": reserved, + "got value": reserved, }).Msg("Overriding reserved field with unexpected value.") reserved = *m.reservedField1 } @@ -840,7 +845,7 @@ func (m *_AdsSymbolTableEntry) SerializeWithWriteBuffer(ctx context.Context, wri // Simple Field (name) name := string(m.GetName()) - _nameErr := writeBuffer.WriteString("name", uint32((uint16(len(m.GetName())))*(8)), "UTF-8", (name)) + _nameErr := writeBuffer.WriteString("name", uint32((uint16(len(m.GetName()))) * ((8))), "UTF-8", (name)) if _nameErr != nil { return errors.Wrap(_nameErr, "Error serializing 'name' field") } @@ -853,7 +858,7 @@ func (m *_AdsSymbolTableEntry) SerializeWithWriteBuffer(ctx context.Context, wri // Simple Field (dataTypeName) dataTypeName := string(m.GetDataTypeName()) - _dataTypeNameErr := writeBuffer.WriteString("dataTypeName", uint32((uint16(len(m.GetDataTypeName())))*(8)), "UTF-8", (dataTypeName)) + _dataTypeNameErr := writeBuffer.WriteString("dataTypeName", uint32((uint16(len(m.GetDataTypeName()))) * ((8))), "UTF-8", (dataTypeName)) if _dataTypeNameErr != nil { return errors.Wrap(_dataTypeNameErr, "Error serializing 'dataTypeName' field") } @@ -866,7 +871,7 @@ func (m *_AdsSymbolTableEntry) SerializeWithWriteBuffer(ctx context.Context, wri // Simple Field (comment) comment := string(m.GetComment()) - _commentErr := writeBuffer.WriteString("comment", uint32((uint16(len(m.GetComment())))*(8)), "UTF-8", (comment)) + _commentErr := writeBuffer.WriteString("comment", uint32((uint16(len(m.GetComment()))) * ((8))), "UTF-8", (comment)) if _commentErr != nil { return errors.Wrap(_commentErr, "Error serializing 'comment' field") } @@ -889,6 +894,7 @@ func (m *_AdsSymbolTableEntry) SerializeWithWriteBuffer(ctx context.Context, wri return nil } + func (m *_AdsSymbolTableEntry) isAdsSymbolTableEntry() bool { return true } @@ -903,3 +909,6 @@ func (m *_AdsSymbolTableEntry) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/readwrite/model/AdsTableSizes.go b/plc4go/protocols/ads/readwrite/model/AdsTableSizes.go index 2e6ee66d422..071853572a3 100644 --- a/plc4go/protocols/ads/readwrite/model/AdsTableSizes.go +++ b/plc4go/protocols/ads/readwrite/model/AdsTableSizes.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AdsTableSizes is the corresponding interface of AdsTableSizes type AdsTableSizes interface { @@ -55,14 +57,15 @@ type AdsTableSizesExactly interface { // _AdsTableSizes is the data-structure of this message type _AdsTableSizes struct { - SymbolCount uint32 - SymbolLength uint32 - DataTypeCount uint32 - DataTypeLength uint32 - ExtraCount uint32 - ExtraLength uint32 + SymbolCount uint32 + SymbolLength uint32 + DataTypeCount uint32 + DataTypeLength uint32 + ExtraCount uint32 + ExtraLength uint32 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -97,14 +100,15 @@ func (m *_AdsTableSizes) GetExtraLength() uint32 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAdsTableSizes factory function for _AdsTableSizes -func NewAdsTableSizes(symbolCount uint32, symbolLength uint32, dataTypeCount uint32, dataTypeLength uint32, extraCount uint32, extraLength uint32) *_AdsTableSizes { - return &_AdsTableSizes{SymbolCount: symbolCount, SymbolLength: symbolLength, DataTypeCount: dataTypeCount, DataTypeLength: dataTypeLength, ExtraCount: extraCount, ExtraLength: extraLength} +func NewAdsTableSizes( symbolCount uint32 , symbolLength uint32 , dataTypeCount uint32 , dataTypeLength uint32 , extraCount uint32 , extraLength uint32 ) *_AdsTableSizes { +return &_AdsTableSizes{ SymbolCount: symbolCount , SymbolLength: symbolLength , DataTypeCount: dataTypeCount , DataTypeLength: dataTypeLength , ExtraCount: extraCount , ExtraLength: extraLength } } // Deprecated: use the interface for direct cast func CastAdsTableSizes(structType interface{}) AdsTableSizes { - if casted, ok := structType.(AdsTableSizes); ok { + if casted, ok := structType.(AdsTableSizes); ok { return casted } if casted, ok := structType.(*AdsTableSizes); ok { @@ -121,26 +125,27 @@ func (m *_AdsTableSizes) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (symbolCount) - lengthInBits += 32 + lengthInBits += 32; // Simple field (symbolLength) - lengthInBits += 32 + lengthInBits += 32; // Simple field (dataTypeCount) - lengthInBits += 32 + lengthInBits += 32; // Simple field (dataTypeLength) - lengthInBits += 32 + lengthInBits += 32; // Simple field (extraCount) - lengthInBits += 32 + lengthInBits += 32; // Simple field (extraLength) - lengthInBits += 32 + lengthInBits += 32; return lengthInBits } + func (m *_AdsTableSizes) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -159,42 +164,42 @@ func AdsTableSizesParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff _ = currentPos // Simple Field (symbolCount) - _symbolCount, _symbolCountErr := readBuffer.ReadUint32("symbolCount", 32) +_symbolCount, _symbolCountErr := readBuffer.ReadUint32("symbolCount", 32) if _symbolCountErr != nil { return nil, errors.Wrap(_symbolCountErr, "Error parsing 'symbolCount' field of AdsTableSizes") } symbolCount := _symbolCount // Simple Field (symbolLength) - _symbolLength, _symbolLengthErr := readBuffer.ReadUint32("symbolLength", 32) +_symbolLength, _symbolLengthErr := readBuffer.ReadUint32("symbolLength", 32) if _symbolLengthErr != nil { return nil, errors.Wrap(_symbolLengthErr, "Error parsing 'symbolLength' field of AdsTableSizes") } symbolLength := _symbolLength // Simple Field (dataTypeCount) - _dataTypeCount, _dataTypeCountErr := readBuffer.ReadUint32("dataTypeCount", 32) +_dataTypeCount, _dataTypeCountErr := readBuffer.ReadUint32("dataTypeCount", 32) if _dataTypeCountErr != nil { return nil, errors.Wrap(_dataTypeCountErr, "Error parsing 'dataTypeCount' field of AdsTableSizes") } dataTypeCount := _dataTypeCount // Simple Field (dataTypeLength) - _dataTypeLength, _dataTypeLengthErr := readBuffer.ReadUint32("dataTypeLength", 32) +_dataTypeLength, _dataTypeLengthErr := readBuffer.ReadUint32("dataTypeLength", 32) if _dataTypeLengthErr != nil { return nil, errors.Wrap(_dataTypeLengthErr, "Error parsing 'dataTypeLength' field of AdsTableSizes") } dataTypeLength := _dataTypeLength // Simple Field (extraCount) - _extraCount, _extraCountErr := readBuffer.ReadUint32("extraCount", 32) +_extraCount, _extraCountErr := readBuffer.ReadUint32("extraCount", 32) if _extraCountErr != nil { return nil, errors.Wrap(_extraCountErr, "Error parsing 'extraCount' field of AdsTableSizes") } extraCount := _extraCount // Simple Field (extraLength) - _extraLength, _extraLengthErr := readBuffer.ReadUint32("extraLength", 32) +_extraLength, _extraLengthErr := readBuffer.ReadUint32("extraLength", 32) if _extraLengthErr != nil { return nil, errors.Wrap(_extraLengthErr, "Error parsing 'extraLength' field of AdsTableSizes") } @@ -206,13 +211,13 @@ func AdsTableSizesParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff // Create the instance return &_AdsTableSizes{ - SymbolCount: symbolCount, - SymbolLength: symbolLength, - DataTypeCount: dataTypeCount, - DataTypeLength: dataTypeLength, - ExtraCount: extraCount, - ExtraLength: extraLength, - }, nil + SymbolCount: symbolCount, + SymbolLength: symbolLength, + DataTypeCount: dataTypeCount, + DataTypeLength: dataTypeLength, + ExtraCount: extraCount, + ExtraLength: extraLength, + }, nil } func (m *_AdsTableSizes) Serialize() ([]byte, error) { @@ -226,7 +231,7 @@ func (m *_AdsTableSizes) Serialize() ([]byte, error) { func (m *_AdsTableSizes) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("AdsTableSizes"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("AdsTableSizes"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for AdsTableSizes") } @@ -278,6 +283,7 @@ func (m *_AdsTableSizes) SerializeWithWriteBuffer(ctx context.Context, writeBuff return nil } + func (m *_AdsTableSizes) isAdsTableSizes() bool { return true } @@ -292,3 +298,6 @@ func (m *_AdsTableSizes) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/readwrite/model/AdsTransMode.go b/plc4go/protocols/ads/readwrite/model/AdsTransMode.go index cbdbe9e0cee..eb25c1ab31e 100644 --- a/plc4go/protocols/ads/readwrite/model/AdsTransMode.go +++ b/plc4go/protocols/ads/readwrite/model/AdsTransMode.go @@ -34,13 +34,13 @@ type IAdsTransMode interface { utils.Serializable } -const ( - AdsTransMode_NONE AdsTransMode = 0 - AdsTransMode_CLIENT_CYCLE AdsTransMode = 1 - AdsTransMode_CLIENT_ON_CHANGE AdsTransMode = 2 - AdsTransMode_CYCLIC AdsTransMode = 3 - AdsTransMode_ON_CHANGE AdsTransMode = 4 - AdsTransMode_CYCLIC_IN_CONTEXT AdsTransMode = 5 +const( + AdsTransMode_NONE AdsTransMode = 0 + AdsTransMode_CLIENT_CYCLE AdsTransMode = 1 + AdsTransMode_CLIENT_ON_CHANGE AdsTransMode = 2 + AdsTransMode_CYCLIC AdsTransMode = 3 + AdsTransMode_ON_CHANGE AdsTransMode = 4 + AdsTransMode_CYCLIC_IN_CONTEXT AdsTransMode = 5 AdsTransMode_ON_CHANGE_IN_CONTEXT AdsTransMode = 6 ) @@ -48,7 +48,7 @@ var AdsTransModeValues []AdsTransMode func init() { _ = errors.New - AdsTransModeValues = []AdsTransMode{ + AdsTransModeValues = []AdsTransMode { AdsTransMode_NONE, AdsTransMode_CLIENT_CYCLE, AdsTransMode_CLIENT_ON_CHANGE, @@ -61,20 +61,20 @@ func init() { func AdsTransModeByValue(value uint32) (enum AdsTransMode, ok bool) { switch value { - case 0: - return AdsTransMode_NONE, true - case 1: - return AdsTransMode_CLIENT_CYCLE, true - case 2: - return AdsTransMode_CLIENT_ON_CHANGE, true - case 3: - return AdsTransMode_CYCLIC, true - case 4: - return AdsTransMode_ON_CHANGE, true - case 5: - return AdsTransMode_CYCLIC_IN_CONTEXT, true - case 6: - return AdsTransMode_ON_CHANGE_IN_CONTEXT, true + case 0: + return AdsTransMode_NONE, true + case 1: + return AdsTransMode_CLIENT_CYCLE, true + case 2: + return AdsTransMode_CLIENT_ON_CHANGE, true + case 3: + return AdsTransMode_CYCLIC, true + case 4: + return AdsTransMode_ON_CHANGE, true + case 5: + return AdsTransMode_CYCLIC_IN_CONTEXT, true + case 6: + return AdsTransMode_ON_CHANGE_IN_CONTEXT, true } return 0, false } @@ -99,13 +99,13 @@ func AdsTransModeByName(value string) (enum AdsTransMode, ok bool) { return 0, false } -func AdsTransModeKnows(value uint32) bool { +func AdsTransModeKnows(value uint32) bool { for _, typeValue := range AdsTransModeValues { if uint32(typeValue) == value { return true } } - return false + return false; } func CastAdsTransMode(structType interface{}) AdsTransMode { @@ -179,3 +179,4 @@ func (e AdsTransMode) PLC4XEnumName() string { func (e AdsTransMode) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/ads/readwrite/model/AdsWriteControlRequest.go b/plc4go/protocols/ads/readwrite/model/AdsWriteControlRequest.go index a4a5ecdd3f4..b63eeab6c54 100644 --- a/plc4go/protocols/ads/readwrite/model/AdsWriteControlRequest.go +++ b/plc4go/protocols/ads/readwrite/model/AdsWriteControlRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AdsWriteControlRequest is the corresponding interface of AdsWriteControlRequest type AdsWriteControlRequest interface { @@ -50,31 +52,30 @@ type AdsWriteControlRequestExactly interface { // _AdsWriteControlRequest is the data-structure of this message type _AdsWriteControlRequest struct { *_AmsPacket - AdsState uint16 - DeviceState uint16 - Data []byte + AdsState uint16 + DeviceState uint16 + Data []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_AdsWriteControlRequest) GetCommandId() CommandId { - return CommandId_ADS_WRITE_CONTROL -} +func (m *_AdsWriteControlRequest) GetCommandId() CommandId { +return CommandId_ADS_WRITE_CONTROL} -func (m *_AdsWriteControlRequest) GetResponse() bool { - return bool(false) -} +func (m *_AdsWriteControlRequest) GetResponse() bool { +return bool(false)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AdsWriteControlRequest) InitializeParent(parent AmsPacket, targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) { - m.TargetAmsNetId = targetAmsNetId +func (m *_AdsWriteControlRequest) InitializeParent(parent AmsPacket , targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) { m.TargetAmsNetId = targetAmsNetId m.TargetAmsPort = targetAmsPort m.SourceAmsNetId = sourceAmsNetId m.SourceAmsPort = sourceAmsPort @@ -82,10 +83,9 @@ func (m *_AdsWriteControlRequest) InitializeParent(parent AmsPacket, targetAmsNe m.InvokeId = invokeId } -func (m *_AdsWriteControlRequest) GetParent() AmsPacket { +func (m *_AdsWriteControlRequest) GetParent() AmsPacket { return m._AmsPacket } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,13 +108,14 @@ func (m *_AdsWriteControlRequest) GetData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAdsWriteControlRequest factory function for _AdsWriteControlRequest -func NewAdsWriteControlRequest(adsState uint16, deviceState uint16, data []byte, targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) *_AdsWriteControlRequest { +func NewAdsWriteControlRequest( adsState uint16 , deviceState uint16 , data []byte , targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) *_AdsWriteControlRequest { _result := &_AdsWriteControlRequest{ - AdsState: adsState, + AdsState: adsState, DeviceState: deviceState, - Data: data, - _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), + Data: data, + _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), } _result._AmsPacket._AmsPacketChildRequirements = _result return _result @@ -122,7 +123,7 @@ func NewAdsWriteControlRequest(adsState uint16, deviceState uint16, data []byte, // Deprecated: use the interface for direct cast func CastAdsWriteControlRequest(structType interface{}) AdsWriteControlRequest { - if casted, ok := structType.(AdsWriteControlRequest); ok { + if casted, ok := structType.(AdsWriteControlRequest); ok { return casted } if casted, ok := structType.(*AdsWriteControlRequest); ok { @@ -139,10 +140,10 @@ func (m *_AdsWriteControlRequest) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (adsState) - lengthInBits += 16 + lengthInBits += 16; // Simple field (deviceState) - lengthInBits += 16 + lengthInBits += 16; // Implicit Field (length) lengthInBits += 32 @@ -155,6 +156,7 @@ func (m *_AdsWriteControlRequest) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_AdsWriteControlRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -173,14 +175,14 @@ func AdsWriteControlRequestParseWithBuffer(ctx context.Context, readBuffer utils _ = currentPos // Simple Field (adsState) - _adsState, _adsStateErr := readBuffer.ReadUint16("adsState", 16) +_adsState, _adsStateErr := readBuffer.ReadUint16("adsState", 16) if _adsStateErr != nil { return nil, errors.Wrap(_adsStateErr, "Error parsing 'adsState' field of AdsWriteControlRequest") } adsState := _adsState // Simple Field (deviceState) - _deviceState, _deviceStateErr := readBuffer.ReadUint16("deviceState", 16) +_deviceState, _deviceStateErr := readBuffer.ReadUint16("deviceState", 16) if _deviceStateErr != nil { return nil, errors.Wrap(_deviceStateErr, "Error parsing 'deviceState' field of AdsWriteControlRequest") } @@ -205,10 +207,11 @@ func AdsWriteControlRequestParseWithBuffer(ctx context.Context, readBuffer utils // Create a partially initialized instance _child := &_AdsWriteControlRequest{ - _AmsPacket: &_AmsPacket{}, - AdsState: adsState, + _AmsPacket: &_AmsPacket{ + }, + AdsState: adsState, DeviceState: deviceState, - Data: data, + Data: data, } _child._AmsPacket._AmsPacketChildRequirements = _child return _child, nil @@ -230,32 +233,32 @@ func (m *_AdsWriteControlRequest) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for AdsWriteControlRequest") } - // Simple Field (adsState) - adsState := uint16(m.GetAdsState()) - _adsStateErr := writeBuffer.WriteUint16("adsState", 16, (adsState)) - if _adsStateErr != nil { - return errors.Wrap(_adsStateErr, "Error serializing 'adsState' field") - } + // Simple Field (adsState) + adsState := uint16(m.GetAdsState()) + _adsStateErr := writeBuffer.WriteUint16("adsState", 16, (adsState)) + if _adsStateErr != nil { + return errors.Wrap(_adsStateErr, "Error serializing 'adsState' field") + } - // Simple Field (deviceState) - deviceState := uint16(m.GetDeviceState()) - _deviceStateErr := writeBuffer.WriteUint16("deviceState", 16, (deviceState)) - if _deviceStateErr != nil { - return errors.Wrap(_deviceStateErr, "Error serializing 'deviceState' field") - } + // Simple Field (deviceState) + deviceState := uint16(m.GetDeviceState()) + _deviceStateErr := writeBuffer.WriteUint16("deviceState", 16, (deviceState)) + if _deviceStateErr != nil { + return errors.Wrap(_deviceStateErr, "Error serializing 'deviceState' field") + } - // Implicit Field (length) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - length := uint32(uint32(len(m.GetData()))) - _lengthErr := writeBuffer.WriteUint32("length", 32, (length)) - if _lengthErr != nil { - return errors.Wrap(_lengthErr, "Error serializing 'length' field") - } + // Implicit Field (length) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) + length := uint32(uint32(len(m.GetData()))) + _lengthErr := writeBuffer.WriteUint32("length", 32, (length)) + if _lengthErr != nil { + return errors.Wrap(_lengthErr, "Error serializing 'length' field") + } - // Array Field (data) - // Byte Array field (data) - if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { - return errors.Wrap(err, "Error serializing 'data' field") - } + // Array Field (data) + // Byte Array field (data) + if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { + return errors.Wrap(err, "Error serializing 'data' field") + } if popErr := writeBuffer.PopContext("AdsWriteControlRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for AdsWriteControlRequest") @@ -265,6 +268,7 @@ func (m *_AdsWriteControlRequest) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AdsWriteControlRequest) isAdsWriteControlRequest() bool { return true } @@ -279,3 +283,6 @@ func (m *_AdsWriteControlRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/readwrite/model/AdsWriteControlResponse.go b/plc4go/protocols/ads/readwrite/model/AdsWriteControlResponse.go index 91cf33d29e7..c4f91242313 100644 --- a/plc4go/protocols/ads/readwrite/model/AdsWriteControlResponse.go +++ b/plc4go/protocols/ads/readwrite/model/AdsWriteControlResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AdsWriteControlResponse is the corresponding interface of AdsWriteControlResponse type AdsWriteControlResponse interface { @@ -46,29 +48,28 @@ type AdsWriteControlResponseExactly interface { // _AdsWriteControlResponse is the data-structure of this message type _AdsWriteControlResponse struct { *_AmsPacket - Result ReturnCode + Result ReturnCode } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_AdsWriteControlResponse) GetCommandId() CommandId { - return CommandId_ADS_WRITE_CONTROL -} +func (m *_AdsWriteControlResponse) GetCommandId() CommandId { +return CommandId_ADS_WRITE_CONTROL} -func (m *_AdsWriteControlResponse) GetResponse() bool { - return bool(true) -} +func (m *_AdsWriteControlResponse) GetResponse() bool { +return bool(true)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AdsWriteControlResponse) InitializeParent(parent AmsPacket, targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) { - m.TargetAmsNetId = targetAmsNetId +func (m *_AdsWriteControlResponse) InitializeParent(parent AmsPacket , targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) { m.TargetAmsNetId = targetAmsNetId m.TargetAmsPort = targetAmsPort m.SourceAmsNetId = sourceAmsNetId m.SourceAmsPort = sourceAmsPort @@ -76,10 +77,9 @@ func (m *_AdsWriteControlResponse) InitializeParent(parent AmsPacket, targetAmsN m.InvokeId = invokeId } -func (m *_AdsWriteControlResponse) GetParent() AmsPacket { +func (m *_AdsWriteControlResponse) GetParent() AmsPacket { return m._AmsPacket } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -94,11 +94,12 @@ func (m *_AdsWriteControlResponse) GetResult() ReturnCode { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAdsWriteControlResponse factory function for _AdsWriteControlResponse -func NewAdsWriteControlResponse(result ReturnCode, targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) *_AdsWriteControlResponse { +func NewAdsWriteControlResponse( result ReturnCode , targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) *_AdsWriteControlResponse { _result := &_AdsWriteControlResponse{ - Result: result, - _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), + Result: result, + _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), } _result._AmsPacket._AmsPacketChildRequirements = _result return _result @@ -106,7 +107,7 @@ func NewAdsWriteControlResponse(result ReturnCode, targetAmsNetId AmsNetId, targ // Deprecated: use the interface for direct cast func CastAdsWriteControlResponse(structType interface{}) AdsWriteControlResponse { - if casted, ok := structType.(AdsWriteControlResponse); ok { + if casted, ok := structType.(AdsWriteControlResponse); ok { return casted } if casted, ok := structType.(*AdsWriteControlResponse); ok { @@ -128,6 +129,7 @@ func (m *_AdsWriteControlResponse) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_AdsWriteControlResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -149,7 +151,7 @@ func AdsWriteControlResponseParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("result"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for result") } - _result, _resultErr := ReturnCodeParseWithBuffer(ctx, readBuffer) +_result, _resultErr := ReturnCodeParseWithBuffer(ctx, readBuffer) if _resultErr != nil { return nil, errors.Wrap(_resultErr, "Error parsing 'result' field of AdsWriteControlResponse") } @@ -164,8 +166,9 @@ func AdsWriteControlResponseParseWithBuffer(ctx context.Context, readBuffer util // Create a partially initialized instance _child := &_AdsWriteControlResponse{ - _AmsPacket: &_AmsPacket{}, - Result: result, + _AmsPacket: &_AmsPacket{ + }, + Result: result, } _child._AmsPacket._AmsPacketChildRequirements = _child return _child, nil @@ -187,17 +190,17 @@ func (m *_AdsWriteControlResponse) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for AdsWriteControlResponse") } - // Simple Field (result) - if pushErr := writeBuffer.PushContext("result"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for result") - } - _resultErr := writeBuffer.WriteSerializable(ctx, m.GetResult()) - if popErr := writeBuffer.PopContext("result"); popErr != nil { - return errors.Wrap(popErr, "Error popping for result") - } - if _resultErr != nil { - return errors.Wrap(_resultErr, "Error serializing 'result' field") - } + // Simple Field (result) + if pushErr := writeBuffer.PushContext("result"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for result") + } + _resultErr := writeBuffer.WriteSerializable(ctx, m.GetResult()) + if popErr := writeBuffer.PopContext("result"); popErr != nil { + return errors.Wrap(popErr, "Error popping for result") + } + if _resultErr != nil { + return errors.Wrap(_resultErr, "Error serializing 'result' field") + } if popErr := writeBuffer.PopContext("AdsWriteControlResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for AdsWriteControlResponse") @@ -207,6 +210,7 @@ func (m *_AdsWriteControlResponse) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AdsWriteControlResponse) isAdsWriteControlResponse() bool { return true } @@ -221,3 +225,6 @@ func (m *_AdsWriteControlResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/readwrite/model/AdsWriteRequest.go b/plc4go/protocols/ads/readwrite/model/AdsWriteRequest.go index b34312827a1..1086115c2f7 100644 --- a/plc4go/protocols/ads/readwrite/model/AdsWriteRequest.go +++ b/plc4go/protocols/ads/readwrite/model/AdsWriteRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AdsWriteRequest is the corresponding interface of AdsWriteRequest type AdsWriteRequest interface { @@ -50,31 +52,30 @@ type AdsWriteRequestExactly interface { // _AdsWriteRequest is the data-structure of this message type _AdsWriteRequest struct { *_AmsPacket - IndexGroup uint32 - IndexOffset uint32 - Data []byte + IndexGroup uint32 + IndexOffset uint32 + Data []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_AdsWriteRequest) GetCommandId() CommandId { - return CommandId_ADS_WRITE -} +func (m *_AdsWriteRequest) GetCommandId() CommandId { +return CommandId_ADS_WRITE} -func (m *_AdsWriteRequest) GetResponse() bool { - return bool(false) -} +func (m *_AdsWriteRequest) GetResponse() bool { +return bool(false)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AdsWriteRequest) InitializeParent(parent AmsPacket, targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) { - m.TargetAmsNetId = targetAmsNetId +func (m *_AdsWriteRequest) InitializeParent(parent AmsPacket , targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) { m.TargetAmsNetId = targetAmsNetId m.TargetAmsPort = targetAmsPort m.SourceAmsNetId = sourceAmsNetId m.SourceAmsPort = sourceAmsPort @@ -82,10 +83,9 @@ func (m *_AdsWriteRequest) InitializeParent(parent AmsPacket, targetAmsNetId Ams m.InvokeId = invokeId } -func (m *_AdsWriteRequest) GetParent() AmsPacket { +func (m *_AdsWriteRequest) GetParent() AmsPacket { return m._AmsPacket } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,13 +108,14 @@ func (m *_AdsWriteRequest) GetData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAdsWriteRequest factory function for _AdsWriteRequest -func NewAdsWriteRequest(indexGroup uint32, indexOffset uint32, data []byte, targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) *_AdsWriteRequest { +func NewAdsWriteRequest( indexGroup uint32 , indexOffset uint32 , data []byte , targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) *_AdsWriteRequest { _result := &_AdsWriteRequest{ - IndexGroup: indexGroup, + IndexGroup: indexGroup, IndexOffset: indexOffset, - Data: data, - _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), + Data: data, + _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), } _result._AmsPacket._AmsPacketChildRequirements = _result return _result @@ -122,7 +123,7 @@ func NewAdsWriteRequest(indexGroup uint32, indexOffset uint32, data []byte, targ // Deprecated: use the interface for direct cast func CastAdsWriteRequest(structType interface{}) AdsWriteRequest { - if casted, ok := structType.(AdsWriteRequest); ok { + if casted, ok := structType.(AdsWriteRequest); ok { return casted } if casted, ok := structType.(*AdsWriteRequest); ok { @@ -139,10 +140,10 @@ func (m *_AdsWriteRequest) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (indexGroup) - lengthInBits += 32 + lengthInBits += 32; // Simple field (indexOffset) - lengthInBits += 32 + lengthInBits += 32; // Implicit Field (length) lengthInBits += 32 @@ -155,6 +156,7 @@ func (m *_AdsWriteRequest) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_AdsWriteRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -173,14 +175,14 @@ func AdsWriteRequestParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu _ = currentPos // Simple Field (indexGroup) - _indexGroup, _indexGroupErr := readBuffer.ReadUint32("indexGroup", 32) +_indexGroup, _indexGroupErr := readBuffer.ReadUint32("indexGroup", 32) if _indexGroupErr != nil { return nil, errors.Wrap(_indexGroupErr, "Error parsing 'indexGroup' field of AdsWriteRequest") } indexGroup := _indexGroup // Simple Field (indexOffset) - _indexOffset, _indexOffsetErr := readBuffer.ReadUint32("indexOffset", 32) +_indexOffset, _indexOffsetErr := readBuffer.ReadUint32("indexOffset", 32) if _indexOffsetErr != nil { return nil, errors.Wrap(_indexOffsetErr, "Error parsing 'indexOffset' field of AdsWriteRequest") } @@ -205,10 +207,11 @@ func AdsWriteRequestParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu // Create a partially initialized instance _child := &_AdsWriteRequest{ - _AmsPacket: &_AmsPacket{}, - IndexGroup: indexGroup, + _AmsPacket: &_AmsPacket{ + }, + IndexGroup: indexGroup, IndexOffset: indexOffset, - Data: data, + Data: data, } _child._AmsPacket._AmsPacketChildRequirements = _child return _child, nil @@ -230,32 +233,32 @@ func (m *_AdsWriteRequest) SerializeWithWriteBuffer(ctx context.Context, writeBu return errors.Wrap(pushErr, "Error pushing for AdsWriteRequest") } - // Simple Field (indexGroup) - indexGroup := uint32(m.GetIndexGroup()) - _indexGroupErr := writeBuffer.WriteUint32("indexGroup", 32, (indexGroup)) - if _indexGroupErr != nil { - return errors.Wrap(_indexGroupErr, "Error serializing 'indexGroup' field") - } + // Simple Field (indexGroup) + indexGroup := uint32(m.GetIndexGroup()) + _indexGroupErr := writeBuffer.WriteUint32("indexGroup", 32, (indexGroup)) + if _indexGroupErr != nil { + return errors.Wrap(_indexGroupErr, "Error serializing 'indexGroup' field") + } - // Simple Field (indexOffset) - indexOffset := uint32(m.GetIndexOffset()) - _indexOffsetErr := writeBuffer.WriteUint32("indexOffset", 32, (indexOffset)) - if _indexOffsetErr != nil { - return errors.Wrap(_indexOffsetErr, "Error serializing 'indexOffset' field") - } + // Simple Field (indexOffset) + indexOffset := uint32(m.GetIndexOffset()) + _indexOffsetErr := writeBuffer.WriteUint32("indexOffset", 32, (indexOffset)) + if _indexOffsetErr != nil { + return errors.Wrap(_indexOffsetErr, "Error serializing 'indexOffset' field") + } - // Implicit Field (length) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - length := uint32(uint32(len(m.GetData()))) - _lengthErr := writeBuffer.WriteUint32("length", 32, (length)) - if _lengthErr != nil { - return errors.Wrap(_lengthErr, "Error serializing 'length' field") - } + // Implicit Field (length) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) + length := uint32(uint32(len(m.GetData()))) + _lengthErr := writeBuffer.WriteUint32("length", 32, (length)) + if _lengthErr != nil { + return errors.Wrap(_lengthErr, "Error serializing 'length' field") + } - // Array Field (data) - // Byte Array field (data) - if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { - return errors.Wrap(err, "Error serializing 'data' field") - } + // Array Field (data) + // Byte Array field (data) + if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { + return errors.Wrap(err, "Error serializing 'data' field") + } if popErr := writeBuffer.PopContext("AdsWriteRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for AdsWriteRequest") @@ -265,6 +268,7 @@ func (m *_AdsWriteRequest) SerializeWithWriteBuffer(ctx context.Context, writeBu return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AdsWriteRequest) isAdsWriteRequest() bool { return true } @@ -279,3 +283,6 @@ func (m *_AdsWriteRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/readwrite/model/AdsWriteResponse.go b/plc4go/protocols/ads/readwrite/model/AdsWriteResponse.go index 299f384f810..7a2ad99d940 100644 --- a/plc4go/protocols/ads/readwrite/model/AdsWriteResponse.go +++ b/plc4go/protocols/ads/readwrite/model/AdsWriteResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AdsWriteResponse is the corresponding interface of AdsWriteResponse type AdsWriteResponse interface { @@ -46,29 +48,28 @@ type AdsWriteResponseExactly interface { // _AdsWriteResponse is the data-structure of this message type _AdsWriteResponse struct { *_AmsPacket - Result ReturnCode + Result ReturnCode } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_AdsWriteResponse) GetCommandId() CommandId { - return CommandId_ADS_WRITE -} +func (m *_AdsWriteResponse) GetCommandId() CommandId { +return CommandId_ADS_WRITE} -func (m *_AdsWriteResponse) GetResponse() bool { - return bool(true) -} +func (m *_AdsWriteResponse) GetResponse() bool { +return bool(true)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AdsWriteResponse) InitializeParent(parent AmsPacket, targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) { - m.TargetAmsNetId = targetAmsNetId +func (m *_AdsWriteResponse) InitializeParent(parent AmsPacket , targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) { m.TargetAmsNetId = targetAmsNetId m.TargetAmsPort = targetAmsPort m.SourceAmsNetId = sourceAmsNetId m.SourceAmsPort = sourceAmsPort @@ -76,10 +77,9 @@ func (m *_AdsWriteResponse) InitializeParent(parent AmsPacket, targetAmsNetId Am m.InvokeId = invokeId } -func (m *_AdsWriteResponse) GetParent() AmsPacket { +func (m *_AdsWriteResponse) GetParent() AmsPacket { return m._AmsPacket } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -94,11 +94,12 @@ func (m *_AdsWriteResponse) GetResult() ReturnCode { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAdsWriteResponse factory function for _AdsWriteResponse -func NewAdsWriteResponse(result ReturnCode, targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) *_AdsWriteResponse { +func NewAdsWriteResponse( result ReturnCode , targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) *_AdsWriteResponse { _result := &_AdsWriteResponse{ - Result: result, - _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), + Result: result, + _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), } _result._AmsPacket._AmsPacketChildRequirements = _result return _result @@ -106,7 +107,7 @@ func NewAdsWriteResponse(result ReturnCode, targetAmsNetId AmsNetId, targetAmsPo // Deprecated: use the interface for direct cast func CastAdsWriteResponse(structType interface{}) AdsWriteResponse { - if casted, ok := structType.(AdsWriteResponse); ok { + if casted, ok := structType.(AdsWriteResponse); ok { return casted } if casted, ok := structType.(*AdsWriteResponse); ok { @@ -128,6 +129,7 @@ func (m *_AdsWriteResponse) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_AdsWriteResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -149,7 +151,7 @@ func AdsWriteResponseParseWithBuffer(ctx context.Context, readBuffer utils.ReadB if pullErr := readBuffer.PullContext("result"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for result") } - _result, _resultErr := ReturnCodeParseWithBuffer(ctx, readBuffer) +_result, _resultErr := ReturnCodeParseWithBuffer(ctx, readBuffer) if _resultErr != nil { return nil, errors.Wrap(_resultErr, "Error parsing 'result' field of AdsWriteResponse") } @@ -164,8 +166,9 @@ func AdsWriteResponseParseWithBuffer(ctx context.Context, readBuffer utils.ReadB // Create a partially initialized instance _child := &_AdsWriteResponse{ - _AmsPacket: &_AmsPacket{}, - Result: result, + _AmsPacket: &_AmsPacket{ + }, + Result: result, } _child._AmsPacket._AmsPacketChildRequirements = _child return _child, nil @@ -187,17 +190,17 @@ func (m *_AdsWriteResponse) SerializeWithWriteBuffer(ctx context.Context, writeB return errors.Wrap(pushErr, "Error pushing for AdsWriteResponse") } - // Simple Field (result) - if pushErr := writeBuffer.PushContext("result"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for result") - } - _resultErr := writeBuffer.WriteSerializable(ctx, m.GetResult()) - if popErr := writeBuffer.PopContext("result"); popErr != nil { - return errors.Wrap(popErr, "Error popping for result") - } - if _resultErr != nil { - return errors.Wrap(_resultErr, "Error serializing 'result' field") - } + // Simple Field (result) + if pushErr := writeBuffer.PushContext("result"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for result") + } + _resultErr := writeBuffer.WriteSerializable(ctx, m.GetResult()) + if popErr := writeBuffer.PopContext("result"); popErr != nil { + return errors.Wrap(popErr, "Error popping for result") + } + if _resultErr != nil { + return errors.Wrap(_resultErr, "Error serializing 'result' field") + } if popErr := writeBuffer.PopContext("AdsWriteResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for AdsWriteResponse") @@ -207,6 +210,7 @@ func (m *_AdsWriteResponse) SerializeWithWriteBuffer(ctx context.Context, writeB return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AdsWriteResponse) isAdsWriteResponse() bool { return true } @@ -221,3 +225,6 @@ func (m *_AdsWriteResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/readwrite/model/AmsNetId.go b/plc4go/protocols/ads/readwrite/model/AmsNetId.go index 0a02614385d..3a729269374 100644 --- a/plc4go/protocols/ads/readwrite/model/AmsNetId.go +++ b/plc4go/protocols/ads/readwrite/model/AmsNetId.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AmsNetId is the corresponding interface of AmsNetId type AmsNetId interface { @@ -54,14 +56,15 @@ type AmsNetIdExactly interface { // _AmsNetId is the data-structure of this message type _AmsNetId struct { - Octet1 uint8 - Octet2 uint8 - Octet3 uint8 - Octet4 uint8 - Octet5 uint8 - Octet6 uint8 + Octet1 uint8 + Octet2 uint8 + Octet3 uint8 + Octet4 uint8 + Octet5 uint8 + Octet6 uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_AmsNetId) GetOctet6() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAmsNetId factory function for _AmsNetId -func NewAmsNetId(octet1 uint8, octet2 uint8, octet3 uint8, octet4 uint8, octet5 uint8, octet6 uint8) *_AmsNetId { - return &_AmsNetId{Octet1: octet1, Octet2: octet2, Octet3: octet3, Octet4: octet4, Octet5: octet5, Octet6: octet6} +func NewAmsNetId( octet1 uint8 , octet2 uint8 , octet3 uint8 , octet4 uint8 , octet5 uint8 , octet6 uint8 ) *_AmsNetId { +return &_AmsNetId{ Octet1: octet1 , Octet2: octet2 , Octet3: octet3 , Octet4: octet4 , Octet5: octet5 , Octet6: octet6 } } // Deprecated: use the interface for direct cast func CastAmsNetId(structType interface{}) AmsNetId { - if casted, ok := structType.(AmsNetId); ok { + if casted, ok := structType.(AmsNetId); ok { return casted } if casted, ok := structType.(*AmsNetId); ok { @@ -120,26 +124,27 @@ func (m *_AmsNetId) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (octet1) - lengthInBits += 8 + lengthInBits += 8; // Simple field (octet2) - lengthInBits += 8 + lengthInBits += 8; // Simple field (octet3) - lengthInBits += 8 + lengthInBits += 8; // Simple field (octet4) - lengthInBits += 8 + lengthInBits += 8; // Simple field (octet5) - lengthInBits += 8 + lengthInBits += 8; // Simple field (octet6) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_AmsNetId) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -158,42 +163,42 @@ func AmsNetIdParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) ( _ = currentPos // Simple Field (octet1) - _octet1, _octet1Err := readBuffer.ReadUint8("octet1", 8) +_octet1, _octet1Err := readBuffer.ReadUint8("octet1", 8) if _octet1Err != nil { return nil, errors.Wrap(_octet1Err, "Error parsing 'octet1' field of AmsNetId") } octet1 := _octet1 // Simple Field (octet2) - _octet2, _octet2Err := readBuffer.ReadUint8("octet2", 8) +_octet2, _octet2Err := readBuffer.ReadUint8("octet2", 8) if _octet2Err != nil { return nil, errors.Wrap(_octet2Err, "Error parsing 'octet2' field of AmsNetId") } octet2 := _octet2 // Simple Field (octet3) - _octet3, _octet3Err := readBuffer.ReadUint8("octet3", 8) +_octet3, _octet3Err := readBuffer.ReadUint8("octet3", 8) if _octet3Err != nil { return nil, errors.Wrap(_octet3Err, "Error parsing 'octet3' field of AmsNetId") } octet3 := _octet3 // Simple Field (octet4) - _octet4, _octet4Err := readBuffer.ReadUint8("octet4", 8) +_octet4, _octet4Err := readBuffer.ReadUint8("octet4", 8) if _octet4Err != nil { return nil, errors.Wrap(_octet4Err, "Error parsing 'octet4' field of AmsNetId") } octet4 := _octet4 // Simple Field (octet5) - _octet5, _octet5Err := readBuffer.ReadUint8("octet5", 8) +_octet5, _octet5Err := readBuffer.ReadUint8("octet5", 8) if _octet5Err != nil { return nil, errors.Wrap(_octet5Err, "Error parsing 'octet5' field of AmsNetId") } octet5 := _octet5 // Simple Field (octet6) - _octet6, _octet6Err := readBuffer.ReadUint8("octet6", 8) +_octet6, _octet6Err := readBuffer.ReadUint8("octet6", 8) if _octet6Err != nil { return nil, errors.Wrap(_octet6Err, "Error parsing 'octet6' field of AmsNetId") } @@ -205,13 +210,13 @@ func AmsNetIdParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) ( // Create the instance return &_AmsNetId{ - Octet1: octet1, - Octet2: octet2, - Octet3: octet3, - Octet4: octet4, - Octet5: octet5, - Octet6: octet6, - }, nil + Octet1: octet1, + Octet2: octet2, + Octet3: octet3, + Octet4: octet4, + Octet5: octet5, + Octet6: octet6, + }, nil } func (m *_AmsNetId) Serialize() ([]byte, error) { @@ -225,7 +230,7 @@ func (m *_AmsNetId) Serialize() ([]byte, error) { func (m *_AmsNetId) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("AmsNetId"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("AmsNetId"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for AmsNetId") } @@ -277,6 +282,7 @@ func (m *_AmsNetId) SerializeWithWriteBuffer(ctx context.Context, writeBuffer ut return nil } + func (m *_AmsNetId) isAmsNetId() bool { return true } @@ -291,3 +297,6 @@ func (m *_AmsNetId) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/readwrite/model/AmsPacket.go b/plc4go/protocols/ads/readwrite/model/AmsPacket.go index d237c1bc2b6..13ea75eea0f 100644 --- a/plc4go/protocols/ads/readwrite/model/AmsPacket.go +++ b/plc4go/protocols/ads/readwrite/model/AmsPacket.go @@ -19,6 +19,7 @@ package model + import ( "context" "fmt" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const AmsPacket_INITCOMMAND bool = bool(false) @@ -70,12 +72,12 @@ type AmsPacketExactly interface { // _AmsPacket is the data-structure of this message type _AmsPacket struct { _AmsPacketChildRequirements - TargetAmsNetId AmsNetId - TargetAmsPort uint16 - SourceAmsNetId AmsNetId - SourceAmsPort uint16 - ErrorCode uint32 - InvokeId uint32 + TargetAmsNetId AmsNetId + TargetAmsPort uint16 + SourceAmsNetId AmsNetId + SourceAmsPort uint16 + ErrorCode uint32 + InvokeId uint32 // Reserved Fields reservedField0 *int8 } @@ -87,6 +89,7 @@ type _AmsPacketChildRequirements interface { GetResponse() bool } + type AmsPacketParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child AmsPacket, serializeChildFunction func() error) error GetTypeName() string @@ -94,13 +97,12 @@ type AmsPacketParent interface { type AmsPacketChild interface { utils.Serializable - InitializeParent(parent AmsPacket, targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) +InitializeParent(parent AmsPacket , targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) GetParent() *AmsPacket GetTypeName() string AmsPacket } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -176,14 +178,15 @@ func (m *_AmsPacket) GetBroadcast() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAmsPacket factory function for _AmsPacket -func NewAmsPacket(targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) *_AmsPacket { - return &_AmsPacket{TargetAmsNetId: targetAmsNetId, TargetAmsPort: targetAmsPort, SourceAmsNetId: sourceAmsNetId, SourceAmsPort: sourceAmsPort, ErrorCode: errorCode, InvokeId: invokeId} +func NewAmsPacket( targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) *_AmsPacket { +return &_AmsPacket{ TargetAmsNetId: targetAmsNetId , TargetAmsPort: targetAmsPort , SourceAmsNetId: sourceAmsNetId , SourceAmsPort: sourceAmsPort , ErrorCode: errorCode , InvokeId: invokeId } } // Deprecated: use the interface for direct cast func CastAmsPacket(structType interface{}) AmsPacket { - if casted, ok := structType.(AmsPacket); ok { + if casted, ok := structType.(AmsPacket); ok { return casted } if casted, ok := structType.(*AmsPacket); ok { @@ -196,6 +199,7 @@ func (m *_AmsPacket) GetTypeName() string { return "AmsPacket" } + func (m *_AmsPacket) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -203,15 +207,15 @@ func (m *_AmsPacket) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits += m.TargetAmsNetId.GetLengthInBits(ctx) // Simple field (targetAmsPort) - lengthInBits += 16 + lengthInBits += 16; // Simple field (sourceAmsNetId) lengthInBits += m.SourceAmsNetId.GetLengthInBits(ctx) // Simple field (sourceAmsPort) - lengthInBits += 16 + lengthInBits += 16; // Discriminator Field (commandId) - lengthInBits += 16 + lengthInBits += 16; // Const Field (initCommand) lengthInBits += 1 @@ -234,7 +238,7 @@ func (m *_AmsPacket) GetParentLengthInBits(ctx context.Context) uint16 { // Const Field (noReturn) lengthInBits += 1 // Discriminator Field (response) - lengthInBits += 1 + lengthInBits += 1; // Const Field (broadcast) lengthInBits += 1 @@ -246,10 +250,10 @@ func (m *_AmsPacket) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits += 32 // Simple field (errorCode) - lengthInBits += 32 + lengthInBits += 32; // Simple field (invokeId) - lengthInBits += 32 + lengthInBits += 32; return lengthInBits } @@ -275,7 +279,7 @@ func AmsPacketParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) if pullErr := readBuffer.PullContext("targetAmsNetId"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for targetAmsNetId") } - _targetAmsNetId, _targetAmsNetIdErr := AmsNetIdParseWithBuffer(ctx, readBuffer) +_targetAmsNetId, _targetAmsNetIdErr := AmsNetIdParseWithBuffer(ctx, readBuffer) if _targetAmsNetIdErr != nil { return nil, errors.Wrap(_targetAmsNetIdErr, "Error parsing 'targetAmsNetId' field of AmsPacket") } @@ -285,7 +289,7 @@ func AmsPacketParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) } // Simple Field (targetAmsPort) - _targetAmsPort, _targetAmsPortErr := readBuffer.ReadUint16("targetAmsPort", 16) +_targetAmsPort, _targetAmsPortErr := readBuffer.ReadUint16("targetAmsPort", 16) if _targetAmsPortErr != nil { return nil, errors.Wrap(_targetAmsPortErr, "Error parsing 'targetAmsPort' field of AmsPacket") } @@ -295,7 +299,7 @@ func AmsPacketParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) if pullErr := readBuffer.PullContext("sourceAmsNetId"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for sourceAmsNetId") } - _sourceAmsNetId, _sourceAmsNetIdErr := AmsNetIdParseWithBuffer(ctx, readBuffer) +_sourceAmsNetId, _sourceAmsNetIdErr := AmsNetIdParseWithBuffer(ctx, readBuffer) if _sourceAmsNetIdErr != nil { return nil, errors.Wrap(_sourceAmsNetIdErr, "Error parsing 'sourceAmsNetId' field of AmsPacket") } @@ -305,7 +309,7 @@ func AmsPacketParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) } // Simple Field (sourceAmsPort) - _sourceAmsPort, _sourceAmsPortErr := readBuffer.ReadUint16("sourceAmsPort", 16) +_sourceAmsPort, _sourceAmsPortErr := readBuffer.ReadUint16("sourceAmsPort", 16) if _sourceAmsPortErr != nil { return nil, errors.Wrap(_sourceAmsPortErr, "Error parsing 'sourceAmsPort' field of AmsPacket") } @@ -412,7 +416,7 @@ func AmsPacketParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) if reserved != int8(0x0) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": int8(0x0), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -427,14 +431,14 @@ func AmsPacketParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) } // Simple Field (errorCode) - _errorCode, _errorCodeErr := readBuffer.ReadUint32("errorCode", 32) +_errorCode, _errorCodeErr := readBuffer.ReadUint32("errorCode", 32) if _errorCodeErr != nil { return nil, errors.Wrap(_errorCodeErr, "Error parsing 'errorCode' field of AmsPacket") } errorCode := _errorCode // Simple Field (invokeId) - _invokeId, _invokeIdErr := readBuffer.ReadUint32("invokeId", 32) +_invokeId, _invokeIdErr := readBuffer.ReadUint32("invokeId", 32) if _invokeIdErr != nil { return nil, errors.Wrap(_invokeIdErr, "Error parsing 'invokeId' field of AmsPacket") } @@ -443,55 +447,55 @@ func AmsPacketParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type AmsPacketChildSerializeRequirement interface { AmsPacket - InitializeParent(AmsPacket, AmsNetId, uint16, AmsNetId, uint16, uint32, uint32) + InitializeParent(AmsPacket, AmsNetId, uint16, AmsNetId, uint16, uint32, uint32) GetParent() AmsPacket } var _childTemp interface{} var _child AmsPacketChildSerializeRequirement var typeSwitchError error switch { - case errorCode == 0x00000000 && commandId == CommandId_INVALID && response == bool(false): // AdsInvalidRequest - _childTemp, typeSwitchError = AdsInvalidRequestParseWithBuffer(ctx, readBuffer) - case errorCode == 0x00000000 && commandId == CommandId_INVALID && response == bool(true): // AdsInvalidResponse - _childTemp, typeSwitchError = AdsInvalidResponseParseWithBuffer(ctx, readBuffer) - case errorCode == 0x00000000 && commandId == CommandId_ADS_READ_DEVICE_INFO && response == bool(false): // AdsReadDeviceInfoRequest - _childTemp, typeSwitchError = AdsReadDeviceInfoRequestParseWithBuffer(ctx, readBuffer) - case errorCode == 0x00000000 && commandId == CommandId_ADS_READ_DEVICE_INFO && response == bool(true): // AdsReadDeviceInfoResponse - _childTemp, typeSwitchError = AdsReadDeviceInfoResponseParseWithBuffer(ctx, readBuffer) - case errorCode == 0x00000000 && commandId == CommandId_ADS_READ && response == bool(false): // AdsReadRequest - _childTemp, typeSwitchError = AdsReadRequestParseWithBuffer(ctx, readBuffer) - case errorCode == 0x00000000 && commandId == CommandId_ADS_READ && response == bool(true): // AdsReadResponse - _childTemp, typeSwitchError = AdsReadResponseParseWithBuffer(ctx, readBuffer) - case errorCode == 0x00000000 && commandId == CommandId_ADS_WRITE && response == bool(false): // AdsWriteRequest - _childTemp, typeSwitchError = AdsWriteRequestParseWithBuffer(ctx, readBuffer) - case errorCode == 0x00000000 && commandId == CommandId_ADS_WRITE && response == bool(true): // AdsWriteResponse - _childTemp, typeSwitchError = AdsWriteResponseParseWithBuffer(ctx, readBuffer) - case errorCode == 0x00000000 && commandId == CommandId_ADS_READ_STATE && response == bool(false): // AdsReadStateRequest - _childTemp, typeSwitchError = AdsReadStateRequestParseWithBuffer(ctx, readBuffer) - case errorCode == 0x00000000 && commandId == CommandId_ADS_READ_STATE && response == bool(true): // AdsReadStateResponse - _childTemp, typeSwitchError = AdsReadStateResponseParseWithBuffer(ctx, readBuffer) - case errorCode == 0x00000000 && commandId == CommandId_ADS_WRITE_CONTROL && response == bool(false): // AdsWriteControlRequest - _childTemp, typeSwitchError = AdsWriteControlRequestParseWithBuffer(ctx, readBuffer) - case errorCode == 0x00000000 && commandId == CommandId_ADS_WRITE_CONTROL && response == bool(true): // AdsWriteControlResponse - _childTemp, typeSwitchError = AdsWriteControlResponseParseWithBuffer(ctx, readBuffer) - case errorCode == 0x00000000 && commandId == CommandId_ADS_ADD_DEVICE_NOTIFICATION && response == bool(false): // AdsAddDeviceNotificationRequest - _childTemp, typeSwitchError = AdsAddDeviceNotificationRequestParseWithBuffer(ctx, readBuffer) - case errorCode == 0x00000000 && commandId == CommandId_ADS_ADD_DEVICE_NOTIFICATION && response == bool(true): // AdsAddDeviceNotificationResponse - _childTemp, typeSwitchError = AdsAddDeviceNotificationResponseParseWithBuffer(ctx, readBuffer) - case errorCode == 0x00000000 && commandId == CommandId_ADS_DELETE_DEVICE_NOTIFICATION && response == bool(false): // AdsDeleteDeviceNotificationRequest - _childTemp, typeSwitchError = AdsDeleteDeviceNotificationRequestParseWithBuffer(ctx, readBuffer) - case errorCode == 0x00000000 && commandId == CommandId_ADS_DELETE_DEVICE_NOTIFICATION && response == bool(true): // AdsDeleteDeviceNotificationResponse - _childTemp, typeSwitchError = AdsDeleteDeviceNotificationResponseParseWithBuffer(ctx, readBuffer) - case errorCode == 0x00000000 && commandId == CommandId_ADS_DEVICE_NOTIFICATION && response == bool(false): // AdsDeviceNotificationRequest - _childTemp, typeSwitchError = AdsDeviceNotificationRequestParseWithBuffer(ctx, readBuffer) - case errorCode == 0x00000000 && commandId == CommandId_ADS_DEVICE_NOTIFICATION && response == bool(true): // AdsDeviceNotificationResponse - _childTemp, typeSwitchError = AdsDeviceNotificationResponseParseWithBuffer(ctx, readBuffer) - case errorCode == 0x00000000 && commandId == CommandId_ADS_READ_WRITE && response == bool(false): // AdsReadWriteRequest - _childTemp, typeSwitchError = AdsReadWriteRequestParseWithBuffer(ctx, readBuffer) - case errorCode == 0x00000000 && commandId == CommandId_ADS_READ_WRITE && response == bool(true): // AdsReadWriteResponse - _childTemp, typeSwitchError = AdsReadWriteResponseParseWithBuffer(ctx, readBuffer) - case true: // ErrorResponse - _childTemp, typeSwitchError = ErrorResponseParseWithBuffer(ctx, readBuffer) +case errorCode == 0x00000000 && commandId == CommandId_INVALID && response == bool(false) : // AdsInvalidRequest + _childTemp, typeSwitchError = AdsInvalidRequestParseWithBuffer(ctx, readBuffer, ) +case errorCode == 0x00000000 && commandId == CommandId_INVALID && response == bool(true) : // AdsInvalidResponse + _childTemp, typeSwitchError = AdsInvalidResponseParseWithBuffer(ctx, readBuffer, ) +case errorCode == 0x00000000 && commandId == CommandId_ADS_READ_DEVICE_INFO && response == bool(false) : // AdsReadDeviceInfoRequest + _childTemp, typeSwitchError = AdsReadDeviceInfoRequestParseWithBuffer(ctx, readBuffer, ) +case errorCode == 0x00000000 && commandId == CommandId_ADS_READ_DEVICE_INFO && response == bool(true) : // AdsReadDeviceInfoResponse + _childTemp, typeSwitchError = AdsReadDeviceInfoResponseParseWithBuffer(ctx, readBuffer, ) +case errorCode == 0x00000000 && commandId == CommandId_ADS_READ && response == bool(false) : // AdsReadRequest + _childTemp, typeSwitchError = AdsReadRequestParseWithBuffer(ctx, readBuffer, ) +case errorCode == 0x00000000 && commandId == CommandId_ADS_READ && response == bool(true) : // AdsReadResponse + _childTemp, typeSwitchError = AdsReadResponseParseWithBuffer(ctx, readBuffer, ) +case errorCode == 0x00000000 && commandId == CommandId_ADS_WRITE && response == bool(false) : // AdsWriteRequest + _childTemp, typeSwitchError = AdsWriteRequestParseWithBuffer(ctx, readBuffer, ) +case errorCode == 0x00000000 && commandId == CommandId_ADS_WRITE && response == bool(true) : // AdsWriteResponse + _childTemp, typeSwitchError = AdsWriteResponseParseWithBuffer(ctx, readBuffer, ) +case errorCode == 0x00000000 && commandId == CommandId_ADS_READ_STATE && response == bool(false) : // AdsReadStateRequest + _childTemp, typeSwitchError = AdsReadStateRequestParseWithBuffer(ctx, readBuffer, ) +case errorCode == 0x00000000 && commandId == CommandId_ADS_READ_STATE && response == bool(true) : // AdsReadStateResponse + _childTemp, typeSwitchError = AdsReadStateResponseParseWithBuffer(ctx, readBuffer, ) +case errorCode == 0x00000000 && commandId == CommandId_ADS_WRITE_CONTROL && response == bool(false) : // AdsWriteControlRequest + _childTemp, typeSwitchError = AdsWriteControlRequestParseWithBuffer(ctx, readBuffer, ) +case errorCode == 0x00000000 && commandId == CommandId_ADS_WRITE_CONTROL && response == bool(true) : // AdsWriteControlResponse + _childTemp, typeSwitchError = AdsWriteControlResponseParseWithBuffer(ctx, readBuffer, ) +case errorCode == 0x00000000 && commandId == CommandId_ADS_ADD_DEVICE_NOTIFICATION && response == bool(false) : // AdsAddDeviceNotificationRequest + _childTemp, typeSwitchError = AdsAddDeviceNotificationRequestParseWithBuffer(ctx, readBuffer, ) +case errorCode == 0x00000000 && commandId == CommandId_ADS_ADD_DEVICE_NOTIFICATION && response == bool(true) : // AdsAddDeviceNotificationResponse + _childTemp, typeSwitchError = AdsAddDeviceNotificationResponseParseWithBuffer(ctx, readBuffer, ) +case errorCode == 0x00000000 && commandId == CommandId_ADS_DELETE_DEVICE_NOTIFICATION && response == bool(false) : // AdsDeleteDeviceNotificationRequest + _childTemp, typeSwitchError = AdsDeleteDeviceNotificationRequestParseWithBuffer(ctx, readBuffer, ) +case errorCode == 0x00000000 && commandId == CommandId_ADS_DELETE_DEVICE_NOTIFICATION && response == bool(true) : // AdsDeleteDeviceNotificationResponse + _childTemp, typeSwitchError = AdsDeleteDeviceNotificationResponseParseWithBuffer(ctx, readBuffer, ) +case errorCode == 0x00000000 && commandId == CommandId_ADS_DEVICE_NOTIFICATION && response == bool(false) : // AdsDeviceNotificationRequest + _childTemp, typeSwitchError = AdsDeviceNotificationRequestParseWithBuffer(ctx, readBuffer, ) +case errorCode == 0x00000000 && commandId == CommandId_ADS_DEVICE_NOTIFICATION && response == bool(true) : // AdsDeviceNotificationResponse + _childTemp, typeSwitchError = AdsDeviceNotificationResponseParseWithBuffer(ctx, readBuffer, ) +case errorCode == 0x00000000 && commandId == CommandId_ADS_READ_WRITE && response == bool(false) : // AdsReadWriteRequest + _childTemp, typeSwitchError = AdsReadWriteRequestParseWithBuffer(ctx, readBuffer, ) +case errorCode == 0x00000000 && commandId == CommandId_ADS_READ_WRITE && response == bool(true) : // AdsReadWriteResponse + _childTemp, typeSwitchError = AdsReadWriteResponseParseWithBuffer(ctx, readBuffer, ) +case true : // ErrorResponse + _childTemp, typeSwitchError = ErrorResponseParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [errorCode=%v, commandId=%v, response=%v]", errorCode, commandId, response) } @@ -505,7 +509,7 @@ func AmsPacketParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) } // Finish initializing - _child.InitializeParent(_child, targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId) +_child.InitializeParent(_child , targetAmsNetId , targetAmsPort , sourceAmsNetId , sourceAmsPort , errorCode , invokeId ) _child.GetParent().(*_AmsPacket).reservedField0 = reservedField0 return _child, nil } @@ -516,7 +520,7 @@ func (pm *_AmsPacket) SerializeParent(ctx context.Context, writeBuffer utils.Wri _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("AmsPacket"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("AmsPacket"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for AmsPacket") } @@ -634,7 +638,7 @@ func (pm *_AmsPacket) SerializeParent(ctx context.Context, writeBuffer utils.Wri if pm.reservedField0 != nil { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": int8(0x0), - "got value": reserved, + "got value": reserved, }).Msg("Overriding reserved field with unexpected value.") reserved = *pm.reservedField0 } @@ -676,6 +680,7 @@ func (pm *_AmsPacket) SerializeParent(ctx context.Context, writeBuffer utils.Wri return nil } + func (m *_AmsPacket) isAmsPacket() bool { return true } @@ -690,3 +695,6 @@ func (m *_AmsPacket) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/readwrite/model/AmsSerialAcknowledgeFrame.go b/plc4go/protocols/ads/readwrite/model/AmsSerialAcknowledgeFrame.go index 8f407cc01c6..47793ad8364 100644 --- a/plc4go/protocols/ads/readwrite/model/AmsSerialAcknowledgeFrame.go +++ b/plc4go/protocols/ads/readwrite/model/AmsSerialAcknowledgeFrame.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AmsSerialAcknowledgeFrame is the corresponding interface of AmsSerialAcknowledgeFrame type AmsSerialAcknowledgeFrame interface { @@ -54,14 +56,15 @@ type AmsSerialAcknowledgeFrameExactly interface { // _AmsSerialAcknowledgeFrame is the data-structure of this message type _AmsSerialAcknowledgeFrame struct { - MagicCookie uint16 - TransmitterAddress int8 - ReceiverAddress int8 - FragmentNumber int8 - Length int8 - Crc uint16 + MagicCookie uint16 + TransmitterAddress int8 + ReceiverAddress int8 + FragmentNumber int8 + Length int8 + Crc uint16 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_AmsSerialAcknowledgeFrame) GetCrc() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAmsSerialAcknowledgeFrame factory function for _AmsSerialAcknowledgeFrame -func NewAmsSerialAcknowledgeFrame(magicCookie uint16, transmitterAddress int8, receiverAddress int8, fragmentNumber int8, length int8, crc uint16) *_AmsSerialAcknowledgeFrame { - return &_AmsSerialAcknowledgeFrame{MagicCookie: magicCookie, TransmitterAddress: transmitterAddress, ReceiverAddress: receiverAddress, FragmentNumber: fragmentNumber, Length: length, Crc: crc} +func NewAmsSerialAcknowledgeFrame( magicCookie uint16 , transmitterAddress int8 , receiverAddress int8 , fragmentNumber int8 , length int8 , crc uint16 ) *_AmsSerialAcknowledgeFrame { +return &_AmsSerialAcknowledgeFrame{ MagicCookie: magicCookie , TransmitterAddress: transmitterAddress , ReceiverAddress: receiverAddress , FragmentNumber: fragmentNumber , Length: length , Crc: crc } } // Deprecated: use the interface for direct cast func CastAmsSerialAcknowledgeFrame(structType interface{}) AmsSerialAcknowledgeFrame { - if casted, ok := structType.(AmsSerialAcknowledgeFrame); ok { + if casted, ok := structType.(AmsSerialAcknowledgeFrame); ok { return casted } if casted, ok := structType.(*AmsSerialAcknowledgeFrame); ok { @@ -120,26 +124,27 @@ func (m *_AmsSerialAcknowledgeFrame) GetLengthInBits(ctx context.Context) uint16 lengthInBits := uint16(0) // Simple field (magicCookie) - lengthInBits += 16 + lengthInBits += 16; // Simple field (transmitterAddress) - lengthInBits += 8 + lengthInBits += 8; // Simple field (receiverAddress) - lengthInBits += 8 + lengthInBits += 8; // Simple field (fragmentNumber) - lengthInBits += 8 + lengthInBits += 8; // Simple field (length) - lengthInBits += 8 + lengthInBits += 8; // Simple field (crc) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_AmsSerialAcknowledgeFrame) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -158,42 +163,42 @@ func AmsSerialAcknowledgeFrameParseWithBuffer(ctx context.Context, readBuffer ut _ = currentPos // Simple Field (magicCookie) - _magicCookie, _magicCookieErr := readBuffer.ReadUint16("magicCookie", 16) +_magicCookie, _magicCookieErr := readBuffer.ReadUint16("magicCookie", 16) if _magicCookieErr != nil { return nil, errors.Wrap(_magicCookieErr, "Error parsing 'magicCookie' field of AmsSerialAcknowledgeFrame") } magicCookie := _magicCookie // Simple Field (transmitterAddress) - _transmitterAddress, _transmitterAddressErr := readBuffer.ReadInt8("transmitterAddress", 8) +_transmitterAddress, _transmitterAddressErr := readBuffer.ReadInt8("transmitterAddress", 8) if _transmitterAddressErr != nil { return nil, errors.Wrap(_transmitterAddressErr, "Error parsing 'transmitterAddress' field of AmsSerialAcknowledgeFrame") } transmitterAddress := _transmitterAddress // Simple Field (receiverAddress) - _receiverAddress, _receiverAddressErr := readBuffer.ReadInt8("receiverAddress", 8) +_receiverAddress, _receiverAddressErr := readBuffer.ReadInt8("receiverAddress", 8) if _receiverAddressErr != nil { return nil, errors.Wrap(_receiverAddressErr, "Error parsing 'receiverAddress' field of AmsSerialAcknowledgeFrame") } receiverAddress := _receiverAddress // Simple Field (fragmentNumber) - _fragmentNumber, _fragmentNumberErr := readBuffer.ReadInt8("fragmentNumber", 8) +_fragmentNumber, _fragmentNumberErr := readBuffer.ReadInt8("fragmentNumber", 8) if _fragmentNumberErr != nil { return nil, errors.Wrap(_fragmentNumberErr, "Error parsing 'fragmentNumber' field of AmsSerialAcknowledgeFrame") } fragmentNumber := _fragmentNumber // Simple Field (length) - _length, _lengthErr := readBuffer.ReadInt8("length", 8) +_length, _lengthErr := readBuffer.ReadInt8("length", 8) if _lengthErr != nil { return nil, errors.Wrap(_lengthErr, "Error parsing 'length' field of AmsSerialAcknowledgeFrame") } length := _length // Simple Field (crc) - _crc, _crcErr := readBuffer.ReadUint16("crc", 16) +_crc, _crcErr := readBuffer.ReadUint16("crc", 16) if _crcErr != nil { return nil, errors.Wrap(_crcErr, "Error parsing 'crc' field of AmsSerialAcknowledgeFrame") } @@ -205,13 +210,13 @@ func AmsSerialAcknowledgeFrameParseWithBuffer(ctx context.Context, readBuffer ut // Create the instance return &_AmsSerialAcknowledgeFrame{ - MagicCookie: magicCookie, - TransmitterAddress: transmitterAddress, - ReceiverAddress: receiverAddress, - FragmentNumber: fragmentNumber, - Length: length, - Crc: crc, - }, nil + MagicCookie: magicCookie, + TransmitterAddress: transmitterAddress, + ReceiverAddress: receiverAddress, + FragmentNumber: fragmentNumber, + Length: length, + Crc: crc, + }, nil } func (m *_AmsSerialAcknowledgeFrame) Serialize() ([]byte, error) { @@ -225,7 +230,7 @@ func (m *_AmsSerialAcknowledgeFrame) Serialize() ([]byte, error) { func (m *_AmsSerialAcknowledgeFrame) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("AmsSerialAcknowledgeFrame"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("AmsSerialAcknowledgeFrame"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for AmsSerialAcknowledgeFrame") } @@ -277,6 +282,7 @@ func (m *_AmsSerialAcknowledgeFrame) SerializeWithWriteBuffer(ctx context.Contex return nil } + func (m *_AmsSerialAcknowledgeFrame) isAmsSerialAcknowledgeFrame() bool { return true } @@ -291,3 +297,6 @@ func (m *_AmsSerialAcknowledgeFrame) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/readwrite/model/AmsSerialFrame.go b/plc4go/protocols/ads/readwrite/model/AmsSerialFrame.go index 8bd8f767f72..28d574c049e 100644 --- a/plc4go/protocols/ads/readwrite/model/AmsSerialFrame.go +++ b/plc4go/protocols/ads/readwrite/model/AmsSerialFrame.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AmsSerialFrame is the corresponding interface of AmsSerialFrame type AmsSerialFrame interface { @@ -56,15 +58,16 @@ type AmsSerialFrameExactly interface { // _AmsSerialFrame is the data-structure of this message type _AmsSerialFrame struct { - MagicCookie uint16 - TransmitterAddress int8 - ReceiverAddress int8 - FragmentNumber int8 - Length int8 - Userdata AmsPacket - Crc uint16 + MagicCookie uint16 + TransmitterAddress int8 + ReceiverAddress int8 + FragmentNumber int8 + Length int8 + Userdata AmsPacket + Crc uint16 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -103,14 +106,15 @@ func (m *_AmsSerialFrame) GetCrc() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAmsSerialFrame factory function for _AmsSerialFrame -func NewAmsSerialFrame(magicCookie uint16, transmitterAddress int8, receiverAddress int8, fragmentNumber int8, length int8, userdata AmsPacket, crc uint16) *_AmsSerialFrame { - return &_AmsSerialFrame{MagicCookie: magicCookie, TransmitterAddress: transmitterAddress, ReceiverAddress: receiverAddress, FragmentNumber: fragmentNumber, Length: length, Userdata: userdata, Crc: crc} +func NewAmsSerialFrame( magicCookie uint16 , transmitterAddress int8 , receiverAddress int8 , fragmentNumber int8 , length int8 , userdata AmsPacket , crc uint16 ) *_AmsSerialFrame { +return &_AmsSerialFrame{ MagicCookie: magicCookie , TransmitterAddress: transmitterAddress , ReceiverAddress: receiverAddress , FragmentNumber: fragmentNumber , Length: length , Userdata: userdata , Crc: crc } } // Deprecated: use the interface for direct cast func CastAmsSerialFrame(structType interface{}) AmsSerialFrame { - if casted, ok := structType.(AmsSerialFrame); ok { + if casted, ok := structType.(AmsSerialFrame); ok { return casted } if casted, ok := structType.(*AmsSerialFrame); ok { @@ -127,29 +131,30 @@ func (m *_AmsSerialFrame) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (magicCookie) - lengthInBits += 16 + lengthInBits += 16; // Simple field (transmitterAddress) - lengthInBits += 8 + lengthInBits += 8; // Simple field (receiverAddress) - lengthInBits += 8 + lengthInBits += 8; // Simple field (fragmentNumber) - lengthInBits += 8 + lengthInBits += 8; // Simple field (length) - lengthInBits += 8 + lengthInBits += 8; // Simple field (userdata) lengthInBits += m.Userdata.GetLengthInBits(ctx) // Simple field (crc) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_AmsSerialFrame) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -168,35 +173,35 @@ func AmsSerialFrameParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf _ = currentPos // Simple Field (magicCookie) - _magicCookie, _magicCookieErr := readBuffer.ReadUint16("magicCookie", 16) +_magicCookie, _magicCookieErr := readBuffer.ReadUint16("magicCookie", 16) if _magicCookieErr != nil { return nil, errors.Wrap(_magicCookieErr, "Error parsing 'magicCookie' field of AmsSerialFrame") } magicCookie := _magicCookie // Simple Field (transmitterAddress) - _transmitterAddress, _transmitterAddressErr := readBuffer.ReadInt8("transmitterAddress", 8) +_transmitterAddress, _transmitterAddressErr := readBuffer.ReadInt8("transmitterAddress", 8) if _transmitterAddressErr != nil { return nil, errors.Wrap(_transmitterAddressErr, "Error parsing 'transmitterAddress' field of AmsSerialFrame") } transmitterAddress := _transmitterAddress // Simple Field (receiverAddress) - _receiverAddress, _receiverAddressErr := readBuffer.ReadInt8("receiverAddress", 8) +_receiverAddress, _receiverAddressErr := readBuffer.ReadInt8("receiverAddress", 8) if _receiverAddressErr != nil { return nil, errors.Wrap(_receiverAddressErr, "Error parsing 'receiverAddress' field of AmsSerialFrame") } receiverAddress := _receiverAddress // Simple Field (fragmentNumber) - _fragmentNumber, _fragmentNumberErr := readBuffer.ReadInt8("fragmentNumber", 8) +_fragmentNumber, _fragmentNumberErr := readBuffer.ReadInt8("fragmentNumber", 8) if _fragmentNumberErr != nil { return nil, errors.Wrap(_fragmentNumberErr, "Error parsing 'fragmentNumber' field of AmsSerialFrame") } fragmentNumber := _fragmentNumber // Simple Field (length) - _length, _lengthErr := readBuffer.ReadInt8("length", 8) +_length, _lengthErr := readBuffer.ReadInt8("length", 8) if _lengthErr != nil { return nil, errors.Wrap(_lengthErr, "Error parsing 'length' field of AmsSerialFrame") } @@ -206,7 +211,7 @@ func AmsSerialFrameParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf if pullErr := readBuffer.PullContext("userdata"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for userdata") } - _userdata, _userdataErr := AmsPacketParseWithBuffer(ctx, readBuffer) +_userdata, _userdataErr := AmsPacketParseWithBuffer(ctx, readBuffer) if _userdataErr != nil { return nil, errors.Wrap(_userdataErr, "Error parsing 'userdata' field of AmsSerialFrame") } @@ -216,7 +221,7 @@ func AmsSerialFrameParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf } // Simple Field (crc) - _crc, _crcErr := readBuffer.ReadUint16("crc", 16) +_crc, _crcErr := readBuffer.ReadUint16("crc", 16) if _crcErr != nil { return nil, errors.Wrap(_crcErr, "Error parsing 'crc' field of AmsSerialFrame") } @@ -228,14 +233,14 @@ func AmsSerialFrameParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf // Create the instance return &_AmsSerialFrame{ - MagicCookie: magicCookie, - TransmitterAddress: transmitterAddress, - ReceiverAddress: receiverAddress, - FragmentNumber: fragmentNumber, - Length: length, - Userdata: userdata, - Crc: crc, - }, nil + MagicCookie: magicCookie, + TransmitterAddress: transmitterAddress, + ReceiverAddress: receiverAddress, + FragmentNumber: fragmentNumber, + Length: length, + Userdata: userdata, + Crc: crc, + }, nil } func (m *_AmsSerialFrame) Serialize() ([]byte, error) { @@ -249,7 +254,7 @@ func (m *_AmsSerialFrame) Serialize() ([]byte, error) { func (m *_AmsSerialFrame) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("AmsSerialFrame"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("AmsSerialFrame"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for AmsSerialFrame") } @@ -313,6 +318,7 @@ func (m *_AmsSerialFrame) SerializeWithWriteBuffer(ctx context.Context, writeBuf return nil } + func (m *_AmsSerialFrame) isAmsSerialFrame() bool { return true } @@ -327,3 +333,6 @@ func (m *_AmsSerialFrame) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/readwrite/model/AmsSerialResetFrame.go b/plc4go/protocols/ads/readwrite/model/AmsSerialResetFrame.go index ceeb48550b9..9e2d74a25bb 100644 --- a/plc4go/protocols/ads/readwrite/model/AmsSerialResetFrame.go +++ b/plc4go/protocols/ads/readwrite/model/AmsSerialResetFrame.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AmsSerialResetFrame is the corresponding interface of AmsSerialResetFrame type AmsSerialResetFrame interface { @@ -54,14 +56,15 @@ type AmsSerialResetFrameExactly interface { // _AmsSerialResetFrame is the data-structure of this message type _AmsSerialResetFrame struct { - MagicCookie uint16 - TransmitterAddress int8 - ReceiverAddress int8 - FragmentNumber int8 - Length int8 - Crc uint16 + MagicCookie uint16 + TransmitterAddress int8 + ReceiverAddress int8 + FragmentNumber int8 + Length int8 + Crc uint16 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_AmsSerialResetFrame) GetCrc() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAmsSerialResetFrame factory function for _AmsSerialResetFrame -func NewAmsSerialResetFrame(magicCookie uint16, transmitterAddress int8, receiverAddress int8, fragmentNumber int8, length int8, crc uint16) *_AmsSerialResetFrame { - return &_AmsSerialResetFrame{MagicCookie: magicCookie, TransmitterAddress: transmitterAddress, ReceiverAddress: receiverAddress, FragmentNumber: fragmentNumber, Length: length, Crc: crc} +func NewAmsSerialResetFrame( magicCookie uint16 , transmitterAddress int8 , receiverAddress int8 , fragmentNumber int8 , length int8 , crc uint16 ) *_AmsSerialResetFrame { +return &_AmsSerialResetFrame{ MagicCookie: magicCookie , TransmitterAddress: transmitterAddress , ReceiverAddress: receiverAddress , FragmentNumber: fragmentNumber , Length: length , Crc: crc } } // Deprecated: use the interface for direct cast func CastAmsSerialResetFrame(structType interface{}) AmsSerialResetFrame { - if casted, ok := structType.(AmsSerialResetFrame); ok { + if casted, ok := structType.(AmsSerialResetFrame); ok { return casted } if casted, ok := structType.(*AmsSerialResetFrame); ok { @@ -120,26 +124,27 @@ func (m *_AmsSerialResetFrame) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (magicCookie) - lengthInBits += 16 + lengthInBits += 16; // Simple field (transmitterAddress) - lengthInBits += 8 + lengthInBits += 8; // Simple field (receiverAddress) - lengthInBits += 8 + lengthInBits += 8; // Simple field (fragmentNumber) - lengthInBits += 8 + lengthInBits += 8; // Simple field (length) - lengthInBits += 8 + lengthInBits += 8; // Simple field (crc) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_AmsSerialResetFrame) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -158,42 +163,42 @@ func AmsSerialResetFrameParseWithBuffer(ctx context.Context, readBuffer utils.Re _ = currentPos // Simple Field (magicCookie) - _magicCookie, _magicCookieErr := readBuffer.ReadUint16("magicCookie", 16) +_magicCookie, _magicCookieErr := readBuffer.ReadUint16("magicCookie", 16) if _magicCookieErr != nil { return nil, errors.Wrap(_magicCookieErr, "Error parsing 'magicCookie' field of AmsSerialResetFrame") } magicCookie := _magicCookie // Simple Field (transmitterAddress) - _transmitterAddress, _transmitterAddressErr := readBuffer.ReadInt8("transmitterAddress", 8) +_transmitterAddress, _transmitterAddressErr := readBuffer.ReadInt8("transmitterAddress", 8) if _transmitterAddressErr != nil { return nil, errors.Wrap(_transmitterAddressErr, "Error parsing 'transmitterAddress' field of AmsSerialResetFrame") } transmitterAddress := _transmitterAddress // Simple Field (receiverAddress) - _receiverAddress, _receiverAddressErr := readBuffer.ReadInt8("receiverAddress", 8) +_receiverAddress, _receiverAddressErr := readBuffer.ReadInt8("receiverAddress", 8) if _receiverAddressErr != nil { return nil, errors.Wrap(_receiverAddressErr, "Error parsing 'receiverAddress' field of AmsSerialResetFrame") } receiverAddress := _receiverAddress // Simple Field (fragmentNumber) - _fragmentNumber, _fragmentNumberErr := readBuffer.ReadInt8("fragmentNumber", 8) +_fragmentNumber, _fragmentNumberErr := readBuffer.ReadInt8("fragmentNumber", 8) if _fragmentNumberErr != nil { return nil, errors.Wrap(_fragmentNumberErr, "Error parsing 'fragmentNumber' field of AmsSerialResetFrame") } fragmentNumber := _fragmentNumber // Simple Field (length) - _length, _lengthErr := readBuffer.ReadInt8("length", 8) +_length, _lengthErr := readBuffer.ReadInt8("length", 8) if _lengthErr != nil { return nil, errors.Wrap(_lengthErr, "Error parsing 'length' field of AmsSerialResetFrame") } length := _length // Simple Field (crc) - _crc, _crcErr := readBuffer.ReadUint16("crc", 16) +_crc, _crcErr := readBuffer.ReadUint16("crc", 16) if _crcErr != nil { return nil, errors.Wrap(_crcErr, "Error parsing 'crc' field of AmsSerialResetFrame") } @@ -205,13 +210,13 @@ func AmsSerialResetFrameParseWithBuffer(ctx context.Context, readBuffer utils.Re // Create the instance return &_AmsSerialResetFrame{ - MagicCookie: magicCookie, - TransmitterAddress: transmitterAddress, - ReceiverAddress: receiverAddress, - FragmentNumber: fragmentNumber, - Length: length, - Crc: crc, - }, nil + MagicCookie: magicCookie, + TransmitterAddress: transmitterAddress, + ReceiverAddress: receiverAddress, + FragmentNumber: fragmentNumber, + Length: length, + Crc: crc, + }, nil } func (m *_AmsSerialResetFrame) Serialize() ([]byte, error) { @@ -225,7 +230,7 @@ func (m *_AmsSerialResetFrame) Serialize() ([]byte, error) { func (m *_AmsSerialResetFrame) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("AmsSerialResetFrame"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("AmsSerialResetFrame"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for AmsSerialResetFrame") } @@ -277,6 +282,7 @@ func (m *_AmsSerialResetFrame) SerializeWithWriteBuffer(ctx context.Context, wri return nil } + func (m *_AmsSerialResetFrame) isAmsSerialResetFrame() bool { return true } @@ -291,3 +297,6 @@ func (m *_AmsSerialResetFrame) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/readwrite/model/AmsTCPPacket.go b/plc4go/protocols/ads/readwrite/model/AmsTCPPacket.go index 04d886e2b93..284369de670 100644 --- a/plc4go/protocols/ads/readwrite/model/AmsTCPPacket.go +++ b/plc4go/protocols/ads/readwrite/model/AmsTCPPacket.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AmsTCPPacket is the corresponding interface of AmsTCPPacket type AmsTCPPacket interface { @@ -45,11 +47,12 @@ type AmsTCPPacketExactly interface { // _AmsTCPPacket is the data-structure of this message type _AmsTCPPacket struct { - Userdata AmsPacket + Userdata AmsPacket // Reserved Fields reservedField0 *uint16 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -64,14 +67,15 @@ func (m *_AmsTCPPacket) GetUserdata() AmsPacket { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAmsTCPPacket factory function for _AmsTCPPacket -func NewAmsTCPPacket(userdata AmsPacket) *_AmsTCPPacket { - return &_AmsTCPPacket{Userdata: userdata} +func NewAmsTCPPacket( userdata AmsPacket ) *_AmsTCPPacket { +return &_AmsTCPPacket{ Userdata: userdata } } // Deprecated: use the interface for direct cast func CastAmsTCPPacket(structType interface{}) AmsTCPPacket { - if casted, ok := structType.(AmsTCPPacket); ok { + if casted, ok := structType.(AmsTCPPacket); ok { return casted } if casted, ok := structType.(*AmsTCPPacket); ok { @@ -99,6 +103,7 @@ func (m *_AmsTCPPacket) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_AmsTCPPacket) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -126,7 +131,7 @@ func AmsTCPPacketParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe if reserved != uint16(0x0000) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint16(0x0000), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -144,7 +149,7 @@ func AmsTCPPacketParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe if pullErr := readBuffer.PullContext("userdata"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for userdata") } - _userdata, _userdataErr := AmsPacketParseWithBuffer(ctx, readBuffer) +_userdata, _userdataErr := AmsPacketParseWithBuffer(ctx, readBuffer) if _userdataErr != nil { return nil, errors.Wrap(_userdataErr, "Error parsing 'userdata' field of AmsTCPPacket") } @@ -159,9 +164,9 @@ func AmsTCPPacketParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe // Create the instance return &_AmsTCPPacket{ - Userdata: userdata, - reservedField0: reservedField0, - }, nil + Userdata: userdata, + reservedField0: reservedField0, + }, nil } func (m *_AmsTCPPacket) Serialize() ([]byte, error) { @@ -175,7 +180,7 @@ func (m *_AmsTCPPacket) Serialize() ([]byte, error) { func (m *_AmsTCPPacket) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("AmsTCPPacket"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("AmsTCPPacket"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for AmsTCPPacket") } @@ -185,7 +190,7 @@ func (m *_AmsTCPPacket) SerializeWithWriteBuffer(ctx context.Context, writeBuffe if m.reservedField0 != nil { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint16(0x0000), - "got value": reserved, + "got value": reserved, }).Msg("Overriding reserved field with unexpected value.") reserved = *m.reservedField0 } @@ -220,6 +225,7 @@ func (m *_AmsTCPPacket) SerializeWithWriteBuffer(ctx context.Context, writeBuffe return nil } + func (m *_AmsTCPPacket) isAmsTCPPacket() bool { return true } @@ -234,3 +240,6 @@ func (m *_AmsTCPPacket) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/readwrite/model/CommandId.go b/plc4go/protocols/ads/readwrite/model/CommandId.go index 626f4931e38..b7275e063ef 100644 --- a/plc4go/protocols/ads/readwrite/model/CommandId.go +++ b/plc4go/protocols/ads/readwrite/model/CommandId.go @@ -34,24 +34,24 @@ type ICommandId interface { utils.Serializable } -const ( - CommandId_INVALID CommandId = 0x0000 - CommandId_ADS_READ_DEVICE_INFO CommandId = 0x0001 - CommandId_ADS_READ CommandId = 0x0002 - CommandId_ADS_WRITE CommandId = 0x0003 - CommandId_ADS_READ_STATE CommandId = 0x0004 - CommandId_ADS_WRITE_CONTROL CommandId = 0x0005 - CommandId_ADS_ADD_DEVICE_NOTIFICATION CommandId = 0x0006 +const( + CommandId_INVALID CommandId = 0x0000 + CommandId_ADS_READ_DEVICE_INFO CommandId = 0x0001 + CommandId_ADS_READ CommandId = 0x0002 + CommandId_ADS_WRITE CommandId = 0x0003 + CommandId_ADS_READ_STATE CommandId = 0x0004 + CommandId_ADS_WRITE_CONTROL CommandId = 0x0005 + CommandId_ADS_ADD_DEVICE_NOTIFICATION CommandId = 0x0006 CommandId_ADS_DELETE_DEVICE_NOTIFICATION CommandId = 0x0007 - CommandId_ADS_DEVICE_NOTIFICATION CommandId = 0x0008 - CommandId_ADS_READ_WRITE CommandId = 0x0009 + CommandId_ADS_DEVICE_NOTIFICATION CommandId = 0x0008 + CommandId_ADS_READ_WRITE CommandId = 0x0009 ) var CommandIdValues []CommandId func init() { _ = errors.New - CommandIdValues = []CommandId{ + CommandIdValues = []CommandId { CommandId_INVALID, CommandId_ADS_READ_DEVICE_INFO, CommandId_ADS_READ, @@ -67,26 +67,26 @@ func init() { func CommandIdByValue(value uint16) (enum CommandId, ok bool) { switch value { - case 0x0000: - return CommandId_INVALID, true - case 0x0001: - return CommandId_ADS_READ_DEVICE_INFO, true - case 0x0002: - return CommandId_ADS_READ, true - case 0x0003: - return CommandId_ADS_WRITE, true - case 0x0004: - return CommandId_ADS_READ_STATE, true - case 0x0005: - return CommandId_ADS_WRITE_CONTROL, true - case 0x0006: - return CommandId_ADS_ADD_DEVICE_NOTIFICATION, true - case 0x0007: - return CommandId_ADS_DELETE_DEVICE_NOTIFICATION, true - case 0x0008: - return CommandId_ADS_DEVICE_NOTIFICATION, true - case 0x0009: - return CommandId_ADS_READ_WRITE, true + case 0x0000: + return CommandId_INVALID, true + case 0x0001: + return CommandId_ADS_READ_DEVICE_INFO, true + case 0x0002: + return CommandId_ADS_READ, true + case 0x0003: + return CommandId_ADS_WRITE, true + case 0x0004: + return CommandId_ADS_READ_STATE, true + case 0x0005: + return CommandId_ADS_WRITE_CONTROL, true + case 0x0006: + return CommandId_ADS_ADD_DEVICE_NOTIFICATION, true + case 0x0007: + return CommandId_ADS_DELETE_DEVICE_NOTIFICATION, true + case 0x0008: + return CommandId_ADS_DEVICE_NOTIFICATION, true + case 0x0009: + return CommandId_ADS_READ_WRITE, true } return 0, false } @@ -117,13 +117,13 @@ func CommandIdByName(value string) (enum CommandId, ok bool) { return 0, false } -func CommandIdKnows(value uint16) bool { +func CommandIdKnows(value uint16) bool { for _, typeValue := range CommandIdValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastCommandId(structType interface{}) CommandId { @@ -203,3 +203,4 @@ func (e CommandId) PLC4XEnumName() string { func (e CommandId) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/ads/readwrite/model/DataItem.go b/plc4go/protocols/ads/readwrite/model/DataItem.go index baccf06f256..dfa64c8ad34 100644 --- a/plc4go/protocols/ads/readwrite/model/DataItem.go +++ b/plc4go/protocols/ads/readwrite/model/DataItem.go @@ -19,16 +19,17 @@ package model + import ( "context" - api "github.com/apache/plc4x/plc4go/pkg/api/values" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/apache/plc4x/plc4go/spi/values" "github.com/pkg/errors" + api "github.com/apache/plc4x/plc4go/pkg/api/values" ) -// Code generated by code-generation. DO NOT EDIT. - + // Code generated by code-generation. DO NOT EDIT. + func DataItemParse(ctx context.Context, theBytes []byte, plcValueType PlcValueType, stringLength int32) (api.PlcValue, error) { return DataItemParseWithBuffer(ctx, utils.NewReadBufferByteBased(theBytes), plcValueType, stringLength) } @@ -36,239 +37,239 @@ func DataItemParse(ctx context.Context, theBytes []byte, plcValueType PlcValueTy func DataItemParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, plcValueType PlcValueType, stringLength int32) (api.PlcValue, error) { readBuffer.PullContext("DataItem") switch { - case plcValueType == PlcValueType_BOOL: // BOOL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } +case plcValueType == PlcValueType_BOOL : // BOOL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } - // Simple Field (value) - value, _valueErr := readBuffer.ReadBit("value") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcBOOL(value), nil - case plcValueType == PlcValueType_BYTE: // BYTE - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcBYTE(value), nil - case plcValueType == PlcValueType_WORD: // WORD - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint16("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcWORD(value), nil - case plcValueType == PlcValueType_DWORD: // DWORD - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcDWORD(value), nil - case plcValueType == PlcValueType_LWORD: // LWORD - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint64("value", 64) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcLWORD(value), nil - case plcValueType == PlcValueType_SINT: // SINT - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcSINT(value), nil - case plcValueType == PlcValueType_USINT: // USINT - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcUSINT(value), nil - case plcValueType == PlcValueType_INT: // INT - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt16("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcINT(value), nil - case plcValueType == PlcValueType_UINT: // UINT - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint16("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcUINT(value), nil - case plcValueType == PlcValueType_DINT: // DINT - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcDINT(value), nil - case plcValueType == PlcValueType_UDINT: // UDINT - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcUDINT(value), nil - case plcValueType == PlcValueType_LINT: // LINT - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt64("value", 64) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcLINT(value), nil - case plcValueType == PlcValueType_ULINT: // ULINT - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint64("value", 64) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcULINT(value), nil - case plcValueType == PlcValueType_REAL: // REAL - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcREAL(value), nil - case plcValueType == PlcValueType_LREAL: // LREAL - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat64("value", 64) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcLREAL(value), nil - case plcValueType == PlcValueType_CHAR: // CHAR - // Simple Field (value) - value, _valueErr := readBuffer.ReadString("value", uint32(8), "UTF-8") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcCHAR(value), nil - case plcValueType == PlcValueType_WCHAR: // WCHAR - // Simple Field (value) - value, _valueErr := readBuffer.ReadString("value", uint32(16), "UTF-16LE") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcWCHAR(value), nil - case plcValueType == PlcValueType_STRING: // STRING - // Simple Field (value) - value, _valueErr := readBuffer.ReadString("value", uint32((stringLength)*(8)), "UTF-8") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } + // Simple Field (value) + value, _valueErr := readBuffer.ReadBit("value") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcBOOL(value), nil +case plcValueType == PlcValueType_BYTE : // BYTE + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcBYTE(value), nil +case plcValueType == PlcValueType_WORD : // WORD + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint16("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcWORD(value), nil +case plcValueType == PlcValueType_DWORD : // DWORD + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcDWORD(value), nil +case plcValueType == PlcValueType_LWORD : // LWORD + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint64("value", 64) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcLWORD(value), nil +case plcValueType == PlcValueType_SINT : // SINT + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcSINT(value), nil +case plcValueType == PlcValueType_USINT : // USINT + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcUSINT(value), nil +case plcValueType == PlcValueType_INT : // INT + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt16("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcINT(value), nil +case plcValueType == PlcValueType_UINT : // UINT + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint16("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcUINT(value), nil +case plcValueType == PlcValueType_DINT : // DINT + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcDINT(value), nil +case plcValueType == PlcValueType_UDINT : // UDINT + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcUDINT(value), nil +case plcValueType == PlcValueType_LINT : // LINT + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt64("value", 64) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcLINT(value), nil +case plcValueType == PlcValueType_ULINT : // ULINT + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint64("value", 64) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcULINT(value), nil +case plcValueType == PlcValueType_REAL : // REAL + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcREAL(value), nil +case plcValueType == PlcValueType_LREAL : // LREAL + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat64("value", 64) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcLREAL(value), nil +case plcValueType == PlcValueType_CHAR : // CHAR + // Simple Field (value) + value, _valueErr := readBuffer.ReadString("value", uint32(8), "UTF-8") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcCHAR(value), nil +case plcValueType == PlcValueType_WCHAR : // WCHAR + // Simple Field (value) + value, _valueErr := readBuffer.ReadString("value", uint32(16), "UTF-16LE") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcWCHAR(value), nil +case plcValueType == PlcValueType_STRING : // STRING + // Simple Field (value) + value, _valueErr := readBuffer.ReadString("value", uint32((stringLength) * ((8))), "UTF-8") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcSTRING(value), nil - case plcValueType == PlcValueType_WSTRING: // WSTRING - // Simple Field (value) - value, _valueErr := readBuffer.ReadString("value", uint32(((stringLength)*(8))*(2)), "UTF-16LE") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcSTRING(value), nil +case plcValueType == PlcValueType_WSTRING : // WSTRING + // Simple Field (value) + value, _valueErr := readBuffer.ReadString("value", uint32(((stringLength) * ((8))) * ((2))), "UTF-16LE") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint16("reserved", 16); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcWSTRING(value), nil - case plcValueType == PlcValueType_TIME: // TIME - // Simple Field (milliseconds) - milliseconds, _millisecondsErr := readBuffer.ReadUint32("milliseconds", 32) - if _millisecondsErr != nil { - return nil, errors.Wrap(_millisecondsErr, "Error parsing 'milliseconds' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcTIMEFromMilliseconds(milliseconds), nil - case plcValueType == PlcValueType_LTIME: // LTIME - // Simple Field (nanoseconds) - nanoseconds, _nanosecondsErr := readBuffer.ReadUint64("nanoseconds", 64) - if _nanosecondsErr != nil { - return nil, errors.Wrap(_nanosecondsErr, "Error parsing 'nanoseconds' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcLTIMEFromNanoseconds(nanoseconds), nil - case plcValueType == PlcValueType_DATE: // DATE - // Simple Field (secondsSinceEpoch) - secondsSinceEpoch, _secondsSinceEpochErr := readBuffer.ReadUint32("secondsSinceEpoch", 32) - if _secondsSinceEpochErr != nil { - return nil, errors.Wrap(_secondsSinceEpochErr, "Error parsing 'secondsSinceEpoch' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcDATEFromSecondsSinceEpoch(uint32(secondsSinceEpoch)), nil - case plcValueType == PlcValueType_LDATE: // LDATE - // Simple Field (nanosecondsSinceEpoch) - nanosecondsSinceEpoch, _nanosecondsSinceEpochErr := readBuffer.ReadUint64("nanosecondsSinceEpoch", 64) - if _nanosecondsSinceEpochErr != nil { - return nil, errors.Wrap(_nanosecondsSinceEpochErr, "Error parsing 'nanosecondsSinceEpoch' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcLDATEFromNanosecondsSinceEpoch(uint64(nanosecondsSinceEpoch)), nil - case plcValueType == PlcValueType_TIME_OF_DAY: // TIME_OF_DAY - // Simple Field (millisecondsSinceMidnight) - millisecondsSinceMidnight, _millisecondsSinceMidnightErr := readBuffer.ReadUint32("millisecondsSinceMidnight", 32) - if _millisecondsSinceMidnightErr != nil { - return nil, errors.Wrap(_millisecondsSinceMidnightErr, "Error parsing 'millisecondsSinceMidnight' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcTIME_OF_DAYFromMillisecondsSinceMidnight(millisecondsSinceMidnight), nil - case plcValueType == PlcValueType_LTIME_OF_DAY: // LTIME_OF_DAY - // Simple Field (nanosecondsSinceMidnight) - nanosecondsSinceMidnight, _nanosecondsSinceMidnightErr := readBuffer.ReadUint64("nanosecondsSinceMidnight", 64) - if _nanosecondsSinceMidnightErr != nil { - return nil, errors.Wrap(_nanosecondsSinceMidnightErr, "Error parsing 'nanosecondsSinceMidnight' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcLTIME_OF_DAYFromNanosecondsSinceMidnight(nanosecondsSinceMidnight), nil - case plcValueType == PlcValueType_DATE_AND_TIME: // DATE_AND_TIME - // Simple Field (secondsSinceEpoch) - secondsSinceEpoch, _secondsSinceEpochErr := readBuffer.ReadUint32("secondsSinceEpoch", 32) - if _secondsSinceEpochErr != nil { - return nil, errors.Wrap(_secondsSinceEpochErr, "Error parsing 'secondsSinceEpoch' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcDATA_AND_TIMEFromSecondsSinceEpoch(secondsSinceEpoch), nil - case plcValueType == PlcValueType_LDATE_AND_TIME: // LDATE_AND_TIME - // Simple Field (nanosecondsSinceEpoch) - nanosecondsSinceEpoch, _nanosecondsSinceEpochErr := readBuffer.ReadUint64("nanosecondsSinceEpoch", 64) - if _nanosecondsSinceEpochErr != nil { - return nil, errors.Wrap(_nanosecondsSinceEpochErr, "Error parsing 'nanosecondsSinceEpoch' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcLDATE_AND_TIMEFromNanosecondsSinceEpoch(uint64(nanosecondsSinceEpoch)), nil + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint16("reserved", 16); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcWSTRING(value), nil +case plcValueType == PlcValueType_TIME : // TIME + // Simple Field (milliseconds) + milliseconds, _millisecondsErr := readBuffer.ReadUint32("milliseconds", 32) + if _millisecondsErr != nil { + return nil, errors.Wrap(_millisecondsErr, "Error parsing 'milliseconds' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcTIMEFromMilliseconds(milliseconds), nil +case plcValueType == PlcValueType_LTIME : // LTIME + // Simple Field (nanoseconds) + nanoseconds, _nanosecondsErr := readBuffer.ReadUint64("nanoseconds", 64) + if _nanosecondsErr != nil { + return nil, errors.Wrap(_nanosecondsErr, "Error parsing 'nanoseconds' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcLTIMEFromNanoseconds(nanoseconds), nil +case plcValueType == PlcValueType_DATE : // DATE + // Simple Field (secondsSinceEpoch) + secondsSinceEpoch, _secondsSinceEpochErr := readBuffer.ReadUint32("secondsSinceEpoch", 32) + if _secondsSinceEpochErr != nil { + return nil, errors.Wrap(_secondsSinceEpochErr, "Error parsing 'secondsSinceEpoch' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcDATEFromSecondsSinceEpoch(uint32(secondsSinceEpoch)), nil +case plcValueType == PlcValueType_LDATE : // LDATE + // Simple Field (nanosecondsSinceEpoch) + nanosecondsSinceEpoch, _nanosecondsSinceEpochErr := readBuffer.ReadUint64("nanosecondsSinceEpoch", 64) + if _nanosecondsSinceEpochErr != nil { + return nil, errors.Wrap(_nanosecondsSinceEpochErr, "Error parsing 'nanosecondsSinceEpoch' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcLDATEFromNanosecondsSinceEpoch(uint64(nanosecondsSinceEpoch)), nil +case plcValueType == PlcValueType_TIME_OF_DAY : // TIME_OF_DAY + // Simple Field (millisecondsSinceMidnight) + millisecondsSinceMidnight, _millisecondsSinceMidnightErr := readBuffer.ReadUint32("millisecondsSinceMidnight", 32) + if _millisecondsSinceMidnightErr != nil { + return nil, errors.Wrap(_millisecondsSinceMidnightErr, "Error parsing 'millisecondsSinceMidnight' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcTIME_OF_DAYFromMillisecondsSinceMidnight(millisecondsSinceMidnight), nil +case plcValueType == PlcValueType_LTIME_OF_DAY : // LTIME_OF_DAY + // Simple Field (nanosecondsSinceMidnight) + nanosecondsSinceMidnight, _nanosecondsSinceMidnightErr := readBuffer.ReadUint64("nanosecondsSinceMidnight", 64) + if _nanosecondsSinceMidnightErr != nil { + return nil, errors.Wrap(_nanosecondsSinceMidnightErr, "Error parsing 'nanosecondsSinceMidnight' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcLTIME_OF_DAYFromNanosecondsSinceMidnight(nanosecondsSinceMidnight), nil +case plcValueType == PlcValueType_DATE_AND_TIME : // DATE_AND_TIME + // Simple Field (secondsSinceEpoch) + secondsSinceEpoch, _secondsSinceEpochErr := readBuffer.ReadUint32("secondsSinceEpoch", 32) + if _secondsSinceEpochErr != nil { + return nil, errors.Wrap(_secondsSinceEpochErr, "Error parsing 'secondsSinceEpoch' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcDATA_AND_TIMEFromSecondsSinceEpoch(secondsSinceEpoch), nil +case plcValueType == PlcValueType_LDATE_AND_TIME : // LDATE_AND_TIME + // Simple Field (nanosecondsSinceEpoch) + nanosecondsSinceEpoch, _nanosecondsSinceEpochErr := readBuffer.ReadUint64("nanosecondsSinceEpoch", 64) + if _nanosecondsSinceEpochErr != nil { + return nil, errors.Wrap(_nanosecondsSinceEpochErr, "Error parsing 'nanosecondsSinceEpoch' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcLDATE_AND_TIMEFromNanosecondsSinceEpoch(uint64(nanosecondsSinceEpoch)), nil } - // TODO: add more info which type it is actually + // TODO: add more info which type it is actually return nil, errors.New("unsupported type") } @@ -282,169 +283,171 @@ func DataItemSerialize(value api.PlcValue, plcValueType PlcValueType, stringLeng func DataItemSerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer, value api.PlcValue, plcValueType PlcValueType, stringLength int32) error { m := struct { - PlcValueType PlcValueType - StringLength int32 + PlcValueType PlcValueType + StringLength int32 }{ - PlcValueType: plcValueType, - StringLength: stringLength, + PlcValueType: plcValueType, + StringLength: stringLength, } _ = m writeBuffer.PushContext("DataItem") switch { - case plcValueType == PlcValueType_BOOL: // BOOL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } +case plcValueType == PlcValueType_BOOL : // BOOL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } - // Simple Field (value) - if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case plcValueType == PlcValueType_BYTE: // BYTE - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case plcValueType == PlcValueType_WORD: // WORD - // Simple Field (value) - if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case plcValueType == PlcValueType_DWORD: // DWORD - // Simple Field (value) - if _err := writeBuffer.WriteUint32("value", 32, value.GetUint32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case plcValueType == PlcValueType_LWORD: // LWORD - // Simple Field (value) - if _err := writeBuffer.WriteUint64("value", 64, value.GetUint64()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case plcValueType == PlcValueType_SINT: // SINT - // Simple Field (value) - if _err := writeBuffer.WriteInt8("value", 8, value.GetInt8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case plcValueType == PlcValueType_USINT: // USINT - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case plcValueType == PlcValueType_INT: // INT - // Simple Field (value) - if _err := writeBuffer.WriteInt16("value", 16, value.GetInt16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case plcValueType == PlcValueType_UINT: // UINT - // Simple Field (value) - if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case plcValueType == PlcValueType_DINT: // DINT - // Simple Field (value) - if _err := writeBuffer.WriteInt32("value", 32, value.GetInt32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case plcValueType == PlcValueType_UDINT: // UDINT - // Simple Field (value) - if _err := writeBuffer.WriteUint32("value", 32, value.GetUint32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case plcValueType == PlcValueType_LINT: // LINT - // Simple Field (value) - if _err := writeBuffer.WriteInt64("value", 64, value.GetInt64()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case plcValueType == PlcValueType_ULINT: // ULINT - // Simple Field (value) - if _err := writeBuffer.WriteUint64("value", 64, value.GetUint64()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case plcValueType == PlcValueType_REAL: // REAL - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case plcValueType == PlcValueType_LREAL: // LREAL - // Simple Field (value) - if _err := writeBuffer.WriteFloat64("value", 64, value.GetFloat64()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case plcValueType == PlcValueType_CHAR: // CHAR - // Simple Field (value) - if _err := writeBuffer.WriteString("value", uint32(8), "UTF-8", value.GetString()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case plcValueType == PlcValueType_WCHAR: // WCHAR - // Simple Field (value) - if _err := writeBuffer.WriteString("value", uint32(16), "UTF-16LE", value.GetString()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case plcValueType == PlcValueType_STRING: // STRING - // Simple Field (value) - if _err := writeBuffer.WriteString("value", uint32((stringLength)*(8)), "UTF-8", value.GetString()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } + // Simple Field (value) + if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case plcValueType == PlcValueType_BYTE : // BYTE + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case plcValueType == PlcValueType_WORD : // WORD + // Simple Field (value) + if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case plcValueType == PlcValueType_DWORD : // DWORD + // Simple Field (value) + if _err := writeBuffer.WriteUint32("value", 32, value.GetUint32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case plcValueType == PlcValueType_LWORD : // LWORD + // Simple Field (value) + if _err := writeBuffer.WriteUint64("value", 64, value.GetUint64()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case plcValueType == PlcValueType_SINT : // SINT + // Simple Field (value) + if _err := writeBuffer.WriteInt8("value", 8, value.GetInt8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case plcValueType == PlcValueType_USINT : // USINT + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case plcValueType == PlcValueType_INT : // INT + // Simple Field (value) + if _err := writeBuffer.WriteInt16("value", 16, value.GetInt16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case plcValueType == PlcValueType_UINT : // UINT + // Simple Field (value) + if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case plcValueType == PlcValueType_DINT : // DINT + // Simple Field (value) + if _err := writeBuffer.WriteInt32("value", 32, value.GetInt32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case plcValueType == PlcValueType_UDINT : // UDINT + // Simple Field (value) + if _err := writeBuffer.WriteUint32("value", 32, value.GetUint32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case plcValueType == PlcValueType_LINT : // LINT + // Simple Field (value) + if _err := writeBuffer.WriteInt64("value", 64, value.GetInt64()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case plcValueType == PlcValueType_ULINT : // ULINT + // Simple Field (value) + if _err := writeBuffer.WriteUint64("value", 64, value.GetUint64()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case plcValueType == PlcValueType_REAL : // REAL + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case plcValueType == PlcValueType_LREAL : // LREAL + // Simple Field (value) + if _err := writeBuffer.WriteFloat64("value", 64, value.GetFloat64()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case plcValueType == PlcValueType_CHAR : // CHAR + // Simple Field (value) + if _err := writeBuffer.WriteString("value", uint32(8), "UTF-8", value.GetString()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case plcValueType == PlcValueType_WCHAR : // WCHAR + // Simple Field (value) + if _err := writeBuffer.WriteString("value", uint32(16), "UTF-16LE", value.GetString()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case plcValueType == PlcValueType_STRING : // STRING + // Simple Field (value) + if _err := writeBuffer.WriteString("value", uint32((stringLength) * ((8))), "UTF-8", value.GetString()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - case plcValueType == PlcValueType_WSTRING: // WSTRING - // Simple Field (value) - if _err := writeBuffer.WriteString("value", uint32(((stringLength)*(8))*(2)), "UTF-16LE", value.GetString()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } +case plcValueType == PlcValueType_WSTRING : // WSTRING + // Simple Field (value) + if _err := writeBuffer.WriteString("value", uint32(((stringLength) * ((8))) * ((2))), "UTF-16LE", value.GetString()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint16("reserved", 16, uint16(0x0000)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - case plcValueType == PlcValueType_TIME: // TIME - // Simple Field (milliseconds) - if _err := writeBuffer.WriteUint32("milliseconds", 32, value.(values.PlcTIME).GetMilliseconds()); _err != nil { - return errors.Wrap(_err, "Error serializing 'milliseconds' field") - } - case plcValueType == PlcValueType_LTIME: // LTIME - // Simple Field (nanoseconds) - if _err := writeBuffer.WriteUint64("nanoseconds", 64, value.(values.PlcLTIME).GetNanoseconds()); _err != nil { - return errors.Wrap(_err, "Error serializing 'nanoseconds' field") - } - case plcValueType == PlcValueType_DATE: // DATE - // Simple Field (secondsSinceEpoch) - if _err := writeBuffer.WriteUint32("secondsSinceEpoch", 32, value.(values.PlcDATE).GetSecondsSinceEpoch()); _err != nil { - return errors.Wrap(_err, "Error serializing 'secondsSinceEpoch' field") - } - case plcValueType == PlcValueType_LDATE: // LDATE - // Simple Field (nanosecondsSinceEpoch) - if _err := writeBuffer.WriteUint64("nanosecondsSinceEpoch", 64, value.(values.PlcLDATE).GetNanosecondsSinceEpoch()); _err != nil { - return errors.Wrap(_err, "Error serializing 'nanosecondsSinceEpoch' field") - } - case plcValueType == PlcValueType_TIME_OF_DAY: // TIME_OF_DAY - // Simple Field (millisecondsSinceMidnight) - if _err := writeBuffer.WriteUint32("millisecondsSinceMidnight", 32, value.(values.PlcTIME_OF_DAY).GetMillisecondsSinceMidnight()); _err != nil { - return errors.Wrap(_err, "Error serializing 'millisecondsSinceMidnight' field") - } - case plcValueType == PlcValueType_LTIME_OF_DAY: // LTIME_OF_DAY - // Simple Field (nanosecondsSinceMidnight) - if _err := writeBuffer.WriteUint64("nanosecondsSinceMidnight", 64, value.(values.PlcLTIME_OF_DAY).GetNanosecondsSinceMidnight()); _err != nil { - return errors.Wrap(_err, "Error serializing 'nanosecondsSinceMidnight' field") - } - case plcValueType == PlcValueType_DATE_AND_TIME: // DATE_AND_TIME - // Simple Field (secondsSinceEpoch) - if _err := writeBuffer.WriteUint32("secondsSinceEpoch", 32, value.(values.PlcDATE_AND_TIME).GetSecondsSinceEpoch()); _err != nil { - return errors.Wrap(_err, "Error serializing 'secondsSinceEpoch' field") - } - case plcValueType == PlcValueType_LDATE_AND_TIME: // LDATE_AND_TIME - // Simple Field (nanosecondsSinceEpoch) - if _err := writeBuffer.WriteUint64("nanosecondsSinceEpoch", 64, value.(values.PlcLDATE_AND_TIME).GetNanosecondsSinceEpoch()); _err != nil { - return errors.Wrap(_err, "Error serializing 'nanosecondsSinceEpoch' field") - } - default: - // TODO: add more info which type it is actually - return errors.New("unsupported type") + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint16("reserved", 16, uint16(0x0000)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } +case plcValueType == PlcValueType_TIME : // TIME + // Simple Field (milliseconds) + if _err := writeBuffer.WriteUint32("milliseconds", 32, value.(values.PlcTIME).GetMilliseconds()); _err != nil { + return errors.Wrap(_err, "Error serializing 'milliseconds' field") + } +case plcValueType == PlcValueType_LTIME : // LTIME + // Simple Field (nanoseconds) + if _err := writeBuffer.WriteUint64("nanoseconds", 64, value.(values.PlcLTIME).GetNanoseconds()); _err != nil { + return errors.Wrap(_err, "Error serializing 'nanoseconds' field") + } +case plcValueType == PlcValueType_DATE : // DATE + // Simple Field (secondsSinceEpoch) + if _err := writeBuffer.WriteUint32("secondsSinceEpoch", 32, value.(values.PlcDATE).GetSecondsSinceEpoch()); _err != nil { + return errors.Wrap(_err, "Error serializing 'secondsSinceEpoch' field") + } +case plcValueType == PlcValueType_LDATE : // LDATE + // Simple Field (nanosecondsSinceEpoch) + if _err := writeBuffer.WriteUint64("nanosecondsSinceEpoch", 64, value.(values.PlcLDATE).GetNanosecondsSinceEpoch()); _err != nil { + return errors.Wrap(_err, "Error serializing 'nanosecondsSinceEpoch' field") + } +case plcValueType == PlcValueType_TIME_OF_DAY : // TIME_OF_DAY + // Simple Field (millisecondsSinceMidnight) + if _err := writeBuffer.WriteUint32("millisecondsSinceMidnight", 32, value.(values.PlcTIME_OF_DAY).GetMillisecondsSinceMidnight()); _err != nil { + return errors.Wrap(_err, "Error serializing 'millisecondsSinceMidnight' field") + } +case plcValueType == PlcValueType_LTIME_OF_DAY : // LTIME_OF_DAY + // Simple Field (nanosecondsSinceMidnight) + if _err := writeBuffer.WriteUint64("nanosecondsSinceMidnight", 64, value.(values.PlcLTIME_OF_DAY).GetNanosecondsSinceMidnight()); _err != nil { + return errors.Wrap(_err, "Error serializing 'nanosecondsSinceMidnight' field") + } +case plcValueType == PlcValueType_DATE_AND_TIME : // DATE_AND_TIME + // Simple Field (secondsSinceEpoch) + if _err := writeBuffer.WriteUint32("secondsSinceEpoch", 32, value.(values.PlcDATE_AND_TIME).GetSecondsSinceEpoch()); _err != nil { + return errors.Wrap(_err, "Error serializing 'secondsSinceEpoch' field") + } +case plcValueType == PlcValueType_LDATE_AND_TIME : // LDATE_AND_TIME + // Simple Field (nanosecondsSinceEpoch) + if _err := writeBuffer.WriteUint64("nanosecondsSinceEpoch", 64, value.(values.PlcLDATE_AND_TIME).GetNanosecondsSinceEpoch()); _err != nil { + return errors.Wrap(_err, "Error serializing 'nanosecondsSinceEpoch' field") + } + default: + // TODO: add more info which type it is actually + return errors.New("unsupported type") } writeBuffer.PopContext("DataItem") return nil } + + diff --git a/plc4go/protocols/ads/readwrite/model/DefaultAmsPorts.go b/plc4go/protocols/ads/readwrite/model/DefaultAmsPorts.go index efd87f522f1..4072ae456f5 100644 --- a/plc4go/protocols/ads/readwrite/model/DefaultAmsPorts.go +++ b/plc4go/protocols/ads/readwrite/model/DefaultAmsPorts.go @@ -34,61 +34,61 @@ type IDefaultAmsPorts interface { utils.Serializable } -const ( - DefaultAmsPorts_CAM_CONTROLLER DefaultAmsPorts = 900 - DefaultAmsPorts_RUNTIME_SYSTEM_01 DefaultAmsPorts = 851 - DefaultAmsPorts_RUNTIME_SYSTEM_02 DefaultAmsPorts = 852 - DefaultAmsPorts_RUNTIME_SYSTEM_03 DefaultAmsPorts = 853 - DefaultAmsPorts_RUNTIME_SYSTEM_04 DefaultAmsPorts = 854 - DefaultAmsPorts_RUNTIME_SYSTEM_05 DefaultAmsPorts = 855 - DefaultAmsPorts_RUNTIME_SYSTEM_06 DefaultAmsPorts = 856 - DefaultAmsPorts_RUNTIME_SYSTEM_07 DefaultAmsPorts = 857 - DefaultAmsPorts_RUNTIME_SYSTEM_08 DefaultAmsPorts = 858 - DefaultAmsPorts_RUNTIME_SYSTEM_09 DefaultAmsPorts = 859 - DefaultAmsPorts_RUNTIME_SYSTEM_10 DefaultAmsPorts = 860 - DefaultAmsPorts_RUNTIME_SYSTEM_11 DefaultAmsPorts = 861 - DefaultAmsPorts_RUNTIME_SYSTEM_12 DefaultAmsPorts = 862 - DefaultAmsPorts_RUNTIME_SYSTEM_13 DefaultAmsPorts = 863 - DefaultAmsPorts_RUNTIME_SYSTEM_14 DefaultAmsPorts = 864 - DefaultAmsPorts_RUNTIME_SYSTEM_15 DefaultAmsPorts = 865 - DefaultAmsPorts_RUNTIME_SYSTEM_16 DefaultAmsPorts = 866 - DefaultAmsPorts_RUNTIME_SYSTEM_17 DefaultAmsPorts = 867 - DefaultAmsPorts_RUNTIME_SYSTEM_18 DefaultAmsPorts = 868 - DefaultAmsPorts_RUNTIME_SYSTEM_19 DefaultAmsPorts = 869 - DefaultAmsPorts_RUNTIME_SYSTEM_20 DefaultAmsPorts = 870 - DefaultAmsPorts_RUNTIME_SYSTEM_21 DefaultAmsPorts = 871 - DefaultAmsPorts_RUNTIME_SYSTEM_22 DefaultAmsPorts = 872 - DefaultAmsPorts_RUNTIME_SYSTEM_23 DefaultAmsPorts = 873 - DefaultAmsPorts_RUNTIME_SYSTEM_24 DefaultAmsPorts = 874 - DefaultAmsPorts_RUNTIME_SYSTEM_25 DefaultAmsPorts = 875 - DefaultAmsPorts_RUNTIME_SYSTEM_26 DefaultAmsPorts = 876 - DefaultAmsPorts_RUNTIME_SYSTEM_27 DefaultAmsPorts = 877 - DefaultAmsPorts_RUNTIME_SYSTEM_28 DefaultAmsPorts = 878 - DefaultAmsPorts_RUNTIME_SYSTEM_29 DefaultAmsPorts = 879 - DefaultAmsPorts_RUNTIME_SYSTEM_30 DefaultAmsPorts = 880 - DefaultAmsPorts_RUNTIME_SYSTEM_31 DefaultAmsPorts = 881 - DefaultAmsPorts_RUNTIME_SYSTEM_32 DefaultAmsPorts = 882 - DefaultAmsPorts_RUNTIME_SYSTEM_33 DefaultAmsPorts = 883 - DefaultAmsPorts_RUNTIME_SYSTEM_34 DefaultAmsPorts = 884 - DefaultAmsPorts_RUNTIME_SYSTEM_35 DefaultAmsPorts = 885 - DefaultAmsPorts_RUNTIME_SYSTEM_36 DefaultAmsPorts = 886 - DefaultAmsPorts_RUNTIME_SYSTEM_37 DefaultAmsPorts = 887 - DefaultAmsPorts_RUNTIME_SYSTEM_38 DefaultAmsPorts = 888 - DefaultAmsPorts_RUNTIME_SYSTEM_39 DefaultAmsPorts = 889 - DefaultAmsPorts_RUNTIME_SYSTEM_40 DefaultAmsPorts = 890 - DefaultAmsPorts_RUNTIME_SYSTEM_41 DefaultAmsPorts = 891 - DefaultAmsPorts_RUNTIME_SYSTEM_42 DefaultAmsPorts = 892 - DefaultAmsPorts_RUNTIME_SYSTEM_43 DefaultAmsPorts = 893 - DefaultAmsPorts_RUNTIME_SYSTEM_44 DefaultAmsPorts = 894 - DefaultAmsPorts_RUNTIME_SYSTEM_45 DefaultAmsPorts = 895 - DefaultAmsPorts_RUNTIME_SYSTEM_46 DefaultAmsPorts = 896 - DefaultAmsPorts_RUNTIME_SYSTEM_47 DefaultAmsPorts = 897 - DefaultAmsPorts_RUNTIME_SYSTEM_48 DefaultAmsPorts = 898 - DefaultAmsPorts_RUNTIME_SYSTEM_49 DefaultAmsPorts = 899 - DefaultAmsPorts_NC DefaultAmsPorts = 500 - DefaultAmsPorts_RESERVED DefaultAmsPorts = 400 - DefaultAmsPorts_IO DefaultAmsPorts = 300 - DefaultAmsPorts_REAL_TIME_CORE DefaultAmsPorts = 200 +const( + DefaultAmsPorts_CAM_CONTROLLER DefaultAmsPorts = 900 + DefaultAmsPorts_RUNTIME_SYSTEM_01 DefaultAmsPorts = 851 + DefaultAmsPorts_RUNTIME_SYSTEM_02 DefaultAmsPorts = 852 + DefaultAmsPorts_RUNTIME_SYSTEM_03 DefaultAmsPorts = 853 + DefaultAmsPorts_RUNTIME_SYSTEM_04 DefaultAmsPorts = 854 + DefaultAmsPorts_RUNTIME_SYSTEM_05 DefaultAmsPorts = 855 + DefaultAmsPorts_RUNTIME_SYSTEM_06 DefaultAmsPorts = 856 + DefaultAmsPorts_RUNTIME_SYSTEM_07 DefaultAmsPorts = 857 + DefaultAmsPorts_RUNTIME_SYSTEM_08 DefaultAmsPorts = 858 + DefaultAmsPorts_RUNTIME_SYSTEM_09 DefaultAmsPorts = 859 + DefaultAmsPorts_RUNTIME_SYSTEM_10 DefaultAmsPorts = 860 + DefaultAmsPorts_RUNTIME_SYSTEM_11 DefaultAmsPorts = 861 + DefaultAmsPorts_RUNTIME_SYSTEM_12 DefaultAmsPorts = 862 + DefaultAmsPorts_RUNTIME_SYSTEM_13 DefaultAmsPorts = 863 + DefaultAmsPorts_RUNTIME_SYSTEM_14 DefaultAmsPorts = 864 + DefaultAmsPorts_RUNTIME_SYSTEM_15 DefaultAmsPorts = 865 + DefaultAmsPorts_RUNTIME_SYSTEM_16 DefaultAmsPorts = 866 + DefaultAmsPorts_RUNTIME_SYSTEM_17 DefaultAmsPorts = 867 + DefaultAmsPorts_RUNTIME_SYSTEM_18 DefaultAmsPorts = 868 + DefaultAmsPorts_RUNTIME_SYSTEM_19 DefaultAmsPorts = 869 + DefaultAmsPorts_RUNTIME_SYSTEM_20 DefaultAmsPorts = 870 + DefaultAmsPorts_RUNTIME_SYSTEM_21 DefaultAmsPorts = 871 + DefaultAmsPorts_RUNTIME_SYSTEM_22 DefaultAmsPorts = 872 + DefaultAmsPorts_RUNTIME_SYSTEM_23 DefaultAmsPorts = 873 + DefaultAmsPorts_RUNTIME_SYSTEM_24 DefaultAmsPorts = 874 + DefaultAmsPorts_RUNTIME_SYSTEM_25 DefaultAmsPorts = 875 + DefaultAmsPorts_RUNTIME_SYSTEM_26 DefaultAmsPorts = 876 + DefaultAmsPorts_RUNTIME_SYSTEM_27 DefaultAmsPorts = 877 + DefaultAmsPorts_RUNTIME_SYSTEM_28 DefaultAmsPorts = 878 + DefaultAmsPorts_RUNTIME_SYSTEM_29 DefaultAmsPorts = 879 + DefaultAmsPorts_RUNTIME_SYSTEM_30 DefaultAmsPorts = 880 + DefaultAmsPorts_RUNTIME_SYSTEM_31 DefaultAmsPorts = 881 + DefaultAmsPorts_RUNTIME_SYSTEM_32 DefaultAmsPorts = 882 + DefaultAmsPorts_RUNTIME_SYSTEM_33 DefaultAmsPorts = 883 + DefaultAmsPorts_RUNTIME_SYSTEM_34 DefaultAmsPorts = 884 + DefaultAmsPorts_RUNTIME_SYSTEM_35 DefaultAmsPorts = 885 + DefaultAmsPorts_RUNTIME_SYSTEM_36 DefaultAmsPorts = 886 + DefaultAmsPorts_RUNTIME_SYSTEM_37 DefaultAmsPorts = 887 + DefaultAmsPorts_RUNTIME_SYSTEM_38 DefaultAmsPorts = 888 + DefaultAmsPorts_RUNTIME_SYSTEM_39 DefaultAmsPorts = 889 + DefaultAmsPorts_RUNTIME_SYSTEM_40 DefaultAmsPorts = 890 + DefaultAmsPorts_RUNTIME_SYSTEM_41 DefaultAmsPorts = 891 + DefaultAmsPorts_RUNTIME_SYSTEM_42 DefaultAmsPorts = 892 + DefaultAmsPorts_RUNTIME_SYSTEM_43 DefaultAmsPorts = 893 + DefaultAmsPorts_RUNTIME_SYSTEM_44 DefaultAmsPorts = 894 + DefaultAmsPorts_RUNTIME_SYSTEM_45 DefaultAmsPorts = 895 + DefaultAmsPorts_RUNTIME_SYSTEM_46 DefaultAmsPorts = 896 + DefaultAmsPorts_RUNTIME_SYSTEM_47 DefaultAmsPorts = 897 + DefaultAmsPorts_RUNTIME_SYSTEM_48 DefaultAmsPorts = 898 + DefaultAmsPorts_RUNTIME_SYSTEM_49 DefaultAmsPorts = 899 + DefaultAmsPorts_NC DefaultAmsPorts = 500 + DefaultAmsPorts_RESERVED DefaultAmsPorts = 400 + DefaultAmsPorts_IO DefaultAmsPorts = 300 + DefaultAmsPorts_REAL_TIME_CORE DefaultAmsPorts = 200 DefaultAmsPorts_EVENT_SYSTEM_LOGGER DefaultAmsPorts = 100 ) @@ -96,7 +96,7 @@ var DefaultAmsPortsValues []DefaultAmsPorts func init() { _ = errors.New - DefaultAmsPortsValues = []DefaultAmsPorts{ + DefaultAmsPortsValues = []DefaultAmsPorts { DefaultAmsPorts_CAM_CONTROLLER, DefaultAmsPorts_RUNTIME_SYSTEM_01, DefaultAmsPorts_RUNTIME_SYSTEM_02, @@ -157,116 +157,116 @@ func init() { func DefaultAmsPortsByValue(value uint16) (enum DefaultAmsPorts, ok bool) { switch value { - case 100: - return DefaultAmsPorts_EVENT_SYSTEM_LOGGER, true - case 200: - return DefaultAmsPorts_REAL_TIME_CORE, true - case 300: - return DefaultAmsPorts_IO, true - case 400: - return DefaultAmsPorts_RESERVED, true - case 500: - return DefaultAmsPorts_NC, true - case 851: - return DefaultAmsPorts_RUNTIME_SYSTEM_01, true - case 852: - return DefaultAmsPorts_RUNTIME_SYSTEM_02, true - case 853: - return DefaultAmsPorts_RUNTIME_SYSTEM_03, true - case 854: - return DefaultAmsPorts_RUNTIME_SYSTEM_04, true - case 855: - return DefaultAmsPorts_RUNTIME_SYSTEM_05, true - case 856: - return DefaultAmsPorts_RUNTIME_SYSTEM_06, true - case 857: - return DefaultAmsPorts_RUNTIME_SYSTEM_07, true - case 858: - return DefaultAmsPorts_RUNTIME_SYSTEM_08, true - case 859: - return DefaultAmsPorts_RUNTIME_SYSTEM_09, true - case 860: - return DefaultAmsPorts_RUNTIME_SYSTEM_10, true - case 861: - return DefaultAmsPorts_RUNTIME_SYSTEM_11, true - case 862: - return DefaultAmsPorts_RUNTIME_SYSTEM_12, true - case 863: - return DefaultAmsPorts_RUNTIME_SYSTEM_13, true - case 864: - return DefaultAmsPorts_RUNTIME_SYSTEM_14, true - case 865: - return DefaultAmsPorts_RUNTIME_SYSTEM_15, true - case 866: - return DefaultAmsPorts_RUNTIME_SYSTEM_16, true - case 867: - return DefaultAmsPorts_RUNTIME_SYSTEM_17, true - case 868: - return DefaultAmsPorts_RUNTIME_SYSTEM_18, true - case 869: - return DefaultAmsPorts_RUNTIME_SYSTEM_19, true - case 870: - return DefaultAmsPorts_RUNTIME_SYSTEM_20, true - case 871: - return DefaultAmsPorts_RUNTIME_SYSTEM_21, true - case 872: - return DefaultAmsPorts_RUNTIME_SYSTEM_22, true - case 873: - return DefaultAmsPorts_RUNTIME_SYSTEM_23, true - case 874: - return DefaultAmsPorts_RUNTIME_SYSTEM_24, true - case 875: - return DefaultAmsPorts_RUNTIME_SYSTEM_25, true - case 876: - return DefaultAmsPorts_RUNTIME_SYSTEM_26, true - case 877: - return DefaultAmsPorts_RUNTIME_SYSTEM_27, true - case 878: - return DefaultAmsPorts_RUNTIME_SYSTEM_28, true - case 879: - return DefaultAmsPorts_RUNTIME_SYSTEM_29, true - case 880: - return DefaultAmsPorts_RUNTIME_SYSTEM_30, true - case 881: - return DefaultAmsPorts_RUNTIME_SYSTEM_31, true - case 882: - return DefaultAmsPorts_RUNTIME_SYSTEM_32, true - case 883: - return DefaultAmsPorts_RUNTIME_SYSTEM_33, true - case 884: - return DefaultAmsPorts_RUNTIME_SYSTEM_34, true - case 885: - return DefaultAmsPorts_RUNTIME_SYSTEM_35, true - case 886: - return DefaultAmsPorts_RUNTIME_SYSTEM_36, true - case 887: - return DefaultAmsPorts_RUNTIME_SYSTEM_37, true - case 888: - return DefaultAmsPorts_RUNTIME_SYSTEM_38, true - case 889: - return DefaultAmsPorts_RUNTIME_SYSTEM_39, true - case 890: - return DefaultAmsPorts_RUNTIME_SYSTEM_40, true - case 891: - return DefaultAmsPorts_RUNTIME_SYSTEM_41, true - case 892: - return DefaultAmsPorts_RUNTIME_SYSTEM_42, true - case 893: - return DefaultAmsPorts_RUNTIME_SYSTEM_43, true - case 894: - return DefaultAmsPorts_RUNTIME_SYSTEM_44, true - case 895: - return DefaultAmsPorts_RUNTIME_SYSTEM_45, true - case 896: - return DefaultAmsPorts_RUNTIME_SYSTEM_46, true - case 897: - return DefaultAmsPorts_RUNTIME_SYSTEM_47, true - case 898: - return DefaultAmsPorts_RUNTIME_SYSTEM_48, true - case 899: - return DefaultAmsPorts_RUNTIME_SYSTEM_49, true - case 900: - return DefaultAmsPorts_CAM_CONTROLLER, true + case 100: + return DefaultAmsPorts_EVENT_SYSTEM_LOGGER, true + case 200: + return DefaultAmsPorts_REAL_TIME_CORE, true + case 300: + return DefaultAmsPorts_IO, true + case 400: + return DefaultAmsPorts_RESERVED, true + case 500: + return DefaultAmsPorts_NC, true + case 851: + return DefaultAmsPorts_RUNTIME_SYSTEM_01, true + case 852: + return DefaultAmsPorts_RUNTIME_SYSTEM_02, true + case 853: + return DefaultAmsPorts_RUNTIME_SYSTEM_03, true + case 854: + return DefaultAmsPorts_RUNTIME_SYSTEM_04, true + case 855: + return DefaultAmsPorts_RUNTIME_SYSTEM_05, true + case 856: + return DefaultAmsPorts_RUNTIME_SYSTEM_06, true + case 857: + return DefaultAmsPorts_RUNTIME_SYSTEM_07, true + case 858: + return DefaultAmsPorts_RUNTIME_SYSTEM_08, true + case 859: + return DefaultAmsPorts_RUNTIME_SYSTEM_09, true + case 860: + return DefaultAmsPorts_RUNTIME_SYSTEM_10, true + case 861: + return DefaultAmsPorts_RUNTIME_SYSTEM_11, true + case 862: + return DefaultAmsPorts_RUNTIME_SYSTEM_12, true + case 863: + return DefaultAmsPorts_RUNTIME_SYSTEM_13, true + case 864: + return DefaultAmsPorts_RUNTIME_SYSTEM_14, true + case 865: + return DefaultAmsPorts_RUNTIME_SYSTEM_15, true + case 866: + return DefaultAmsPorts_RUNTIME_SYSTEM_16, true + case 867: + return DefaultAmsPorts_RUNTIME_SYSTEM_17, true + case 868: + return DefaultAmsPorts_RUNTIME_SYSTEM_18, true + case 869: + return DefaultAmsPorts_RUNTIME_SYSTEM_19, true + case 870: + return DefaultAmsPorts_RUNTIME_SYSTEM_20, true + case 871: + return DefaultAmsPorts_RUNTIME_SYSTEM_21, true + case 872: + return DefaultAmsPorts_RUNTIME_SYSTEM_22, true + case 873: + return DefaultAmsPorts_RUNTIME_SYSTEM_23, true + case 874: + return DefaultAmsPorts_RUNTIME_SYSTEM_24, true + case 875: + return DefaultAmsPorts_RUNTIME_SYSTEM_25, true + case 876: + return DefaultAmsPorts_RUNTIME_SYSTEM_26, true + case 877: + return DefaultAmsPorts_RUNTIME_SYSTEM_27, true + case 878: + return DefaultAmsPorts_RUNTIME_SYSTEM_28, true + case 879: + return DefaultAmsPorts_RUNTIME_SYSTEM_29, true + case 880: + return DefaultAmsPorts_RUNTIME_SYSTEM_30, true + case 881: + return DefaultAmsPorts_RUNTIME_SYSTEM_31, true + case 882: + return DefaultAmsPorts_RUNTIME_SYSTEM_32, true + case 883: + return DefaultAmsPorts_RUNTIME_SYSTEM_33, true + case 884: + return DefaultAmsPorts_RUNTIME_SYSTEM_34, true + case 885: + return DefaultAmsPorts_RUNTIME_SYSTEM_35, true + case 886: + return DefaultAmsPorts_RUNTIME_SYSTEM_36, true + case 887: + return DefaultAmsPorts_RUNTIME_SYSTEM_37, true + case 888: + return DefaultAmsPorts_RUNTIME_SYSTEM_38, true + case 889: + return DefaultAmsPorts_RUNTIME_SYSTEM_39, true + case 890: + return DefaultAmsPorts_RUNTIME_SYSTEM_40, true + case 891: + return DefaultAmsPorts_RUNTIME_SYSTEM_41, true + case 892: + return DefaultAmsPorts_RUNTIME_SYSTEM_42, true + case 893: + return DefaultAmsPorts_RUNTIME_SYSTEM_43, true + case 894: + return DefaultAmsPorts_RUNTIME_SYSTEM_44, true + case 895: + return DefaultAmsPorts_RUNTIME_SYSTEM_45, true + case 896: + return DefaultAmsPorts_RUNTIME_SYSTEM_46, true + case 897: + return DefaultAmsPorts_RUNTIME_SYSTEM_47, true + case 898: + return DefaultAmsPorts_RUNTIME_SYSTEM_48, true + case 899: + return DefaultAmsPorts_RUNTIME_SYSTEM_49, true + case 900: + return DefaultAmsPorts_CAM_CONTROLLER, true } return 0, false } @@ -387,13 +387,13 @@ func DefaultAmsPortsByName(value string) (enum DefaultAmsPorts, ok bool) { return 0, false } -func DefaultAmsPortsKnows(value uint16) bool { +func DefaultAmsPortsKnows(value uint16) bool { for _, typeValue := range DefaultAmsPortsValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastDefaultAmsPorts(structType interface{}) DefaultAmsPorts { @@ -563,3 +563,4 @@ func (e DefaultAmsPorts) PLC4XEnumName() string { func (e DefaultAmsPorts) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/ads/readwrite/model/ErrorResponse.go b/plc4go/protocols/ads/readwrite/model/ErrorResponse.go index 10cfe8d8419..46697d6fa25 100644 --- a/plc4go/protocols/ads/readwrite/model/ErrorResponse.go +++ b/plc4go/protocols/ads/readwrite/model/ErrorResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ErrorResponse is the corresponding interface of ErrorResponse type ErrorResponse interface { @@ -46,26 +48,25 @@ type _ErrorResponse struct { *_AmsPacket } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ErrorResponse) GetCommandId() CommandId { - return 0 -} +func (m *_ErrorResponse) GetCommandId() CommandId { +return 0} -func (m *_ErrorResponse) GetResponse() bool { - return false -} +func (m *_ErrorResponse) GetResponse() bool { +return false} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ErrorResponse) InitializeParent(parent AmsPacket, targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) { - m.TargetAmsNetId = targetAmsNetId +func (m *_ErrorResponse) InitializeParent(parent AmsPacket , targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) { m.TargetAmsNetId = targetAmsNetId m.TargetAmsPort = targetAmsPort m.SourceAmsNetId = sourceAmsNetId m.SourceAmsPort = sourceAmsPort @@ -73,14 +74,15 @@ func (m *_ErrorResponse) InitializeParent(parent AmsPacket, targetAmsNetId AmsNe m.InvokeId = invokeId } -func (m *_ErrorResponse) GetParent() AmsPacket { +func (m *_ErrorResponse) GetParent() AmsPacket { return m._AmsPacket } + // NewErrorResponse factory function for _ErrorResponse -func NewErrorResponse(targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNetId AmsNetId, sourceAmsPort uint16, errorCode uint32, invokeId uint32) *_ErrorResponse { +func NewErrorResponse( targetAmsNetId AmsNetId , targetAmsPort uint16 , sourceAmsNetId AmsNetId , sourceAmsPort uint16 , errorCode uint32 , invokeId uint32 ) *_ErrorResponse { _result := &_ErrorResponse{ - _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), + _AmsPacket: NewAmsPacket(targetAmsNetId, targetAmsPort, sourceAmsNetId, sourceAmsPort, errorCode, invokeId), } _result._AmsPacket._AmsPacketChildRequirements = _result return _result @@ -88,7 +90,7 @@ func NewErrorResponse(targetAmsNetId AmsNetId, targetAmsPort uint16, sourceAmsNe // Deprecated: use the interface for direct cast func CastErrorResponse(structType interface{}) ErrorResponse { - if casted, ok := structType.(ErrorResponse); ok { + if casted, ok := structType.(ErrorResponse); ok { return casted } if casted, ok := structType.(*ErrorResponse); ok { @@ -107,6 +109,7 @@ func (m *_ErrorResponse) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_ErrorResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -130,7 +133,8 @@ func ErrorResponseParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff // Create a partially initialized instance _child := &_ErrorResponse{ - _AmsPacket: &_AmsPacket{}, + _AmsPacket: &_AmsPacket{ + }, } _child._AmsPacket._AmsPacketChildRequirements = _child return _child, nil @@ -160,6 +164,7 @@ func (m *_ErrorResponse) SerializeWithWriteBuffer(ctx context.Context, writeBuff return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ErrorResponse) isErrorResponse() bool { return true } @@ -174,3 +179,6 @@ func (m *_ErrorResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/ads/readwrite/model/PlcValueType.go b/plc4go/protocols/ads/readwrite/model/PlcValueType.go index 0ef5a6ff627..01bbff00473 100644 --- a/plc4go/protocols/ads/readwrite/model/PlcValueType.go +++ b/plc4go/protocols/ads/readwrite/model/PlcValueType.go @@ -34,37 +34,37 @@ type IPlcValueType interface { utils.Serializable } -const ( - PlcValueType_NULL PlcValueType = 0x00 - PlcValueType_BOOL PlcValueType = 0x01 - PlcValueType_BYTE PlcValueType = 0x02 - PlcValueType_WORD PlcValueType = 0x03 - PlcValueType_DWORD PlcValueType = 0x04 - PlcValueType_LWORD PlcValueType = 0x05 - PlcValueType_USINT PlcValueType = 0x11 - PlcValueType_UINT PlcValueType = 0x12 - PlcValueType_UDINT PlcValueType = 0x13 - PlcValueType_ULINT PlcValueType = 0x14 - PlcValueType_SINT PlcValueType = 0x21 - PlcValueType_INT PlcValueType = 0x22 - PlcValueType_DINT PlcValueType = 0x23 - PlcValueType_LINT PlcValueType = 0x24 - PlcValueType_REAL PlcValueType = 0x31 - PlcValueType_LREAL PlcValueType = 0x32 - PlcValueType_CHAR PlcValueType = 0x41 - PlcValueType_WCHAR PlcValueType = 0x42 - PlcValueType_STRING PlcValueType = 0x43 - PlcValueType_WSTRING PlcValueType = 0x44 - PlcValueType_TIME PlcValueType = 0x51 - PlcValueType_LTIME PlcValueType = 0x52 - PlcValueType_DATE PlcValueType = 0x53 - PlcValueType_LDATE PlcValueType = 0x54 - PlcValueType_TIME_OF_DAY PlcValueType = 0x55 - PlcValueType_LTIME_OF_DAY PlcValueType = 0x56 - PlcValueType_DATE_AND_TIME PlcValueType = 0x57 +const( + PlcValueType_NULL PlcValueType = 0x00 + PlcValueType_BOOL PlcValueType = 0x01 + PlcValueType_BYTE PlcValueType = 0x02 + PlcValueType_WORD PlcValueType = 0x03 + PlcValueType_DWORD PlcValueType = 0x04 + PlcValueType_LWORD PlcValueType = 0x05 + PlcValueType_USINT PlcValueType = 0x11 + PlcValueType_UINT PlcValueType = 0x12 + PlcValueType_UDINT PlcValueType = 0x13 + PlcValueType_ULINT PlcValueType = 0x14 + PlcValueType_SINT PlcValueType = 0x21 + PlcValueType_INT PlcValueType = 0x22 + PlcValueType_DINT PlcValueType = 0x23 + PlcValueType_LINT PlcValueType = 0x24 + PlcValueType_REAL PlcValueType = 0x31 + PlcValueType_LREAL PlcValueType = 0x32 + PlcValueType_CHAR PlcValueType = 0x41 + PlcValueType_WCHAR PlcValueType = 0x42 + PlcValueType_STRING PlcValueType = 0x43 + PlcValueType_WSTRING PlcValueType = 0x44 + PlcValueType_TIME PlcValueType = 0x51 + PlcValueType_LTIME PlcValueType = 0x52 + PlcValueType_DATE PlcValueType = 0x53 + PlcValueType_LDATE PlcValueType = 0x54 + PlcValueType_TIME_OF_DAY PlcValueType = 0x55 + PlcValueType_LTIME_OF_DAY PlcValueType = 0x56 + PlcValueType_DATE_AND_TIME PlcValueType = 0x57 PlcValueType_LDATE_AND_TIME PlcValueType = 0x58 - PlcValueType_Struct PlcValueType = 0x61 - PlcValueType_List PlcValueType = 0x62 + PlcValueType_Struct PlcValueType = 0x61 + PlcValueType_List PlcValueType = 0x62 PlcValueType_RAW_BYTE_ARRAY PlcValueType = 0x71 ) @@ -72,7 +72,7 @@ var PlcValueTypeValues []PlcValueType func init() { _ = errors.New - PlcValueTypeValues = []PlcValueType{ + PlcValueTypeValues = []PlcValueType { PlcValueType_NULL, PlcValueType_BOOL, PlcValueType_BYTE, @@ -109,68 +109,68 @@ func init() { func PlcValueTypeByValue(value uint8) (enum PlcValueType, ok bool) { switch value { - case 0x00: - return PlcValueType_NULL, true - case 0x01: - return PlcValueType_BOOL, true - case 0x02: - return PlcValueType_BYTE, true - case 0x03: - return PlcValueType_WORD, true - case 0x04: - return PlcValueType_DWORD, true - case 0x05: - return PlcValueType_LWORD, true - case 0x11: - return PlcValueType_USINT, true - case 0x12: - return PlcValueType_UINT, true - case 0x13: - return PlcValueType_UDINT, true - case 0x14: - return PlcValueType_ULINT, true - case 0x21: - return PlcValueType_SINT, true - case 0x22: - return PlcValueType_INT, true - case 0x23: - return PlcValueType_DINT, true - case 0x24: - return PlcValueType_LINT, true - case 0x31: - return PlcValueType_REAL, true - case 0x32: - return PlcValueType_LREAL, true - case 0x41: - return PlcValueType_CHAR, true - case 0x42: - return PlcValueType_WCHAR, true - case 0x43: - return PlcValueType_STRING, true - case 0x44: - return PlcValueType_WSTRING, true - case 0x51: - return PlcValueType_TIME, true - case 0x52: - return PlcValueType_LTIME, true - case 0x53: - return PlcValueType_DATE, true - case 0x54: - return PlcValueType_LDATE, true - case 0x55: - return PlcValueType_TIME_OF_DAY, true - case 0x56: - return PlcValueType_LTIME_OF_DAY, true - case 0x57: - return PlcValueType_DATE_AND_TIME, true - case 0x58: - return PlcValueType_LDATE_AND_TIME, true - case 0x61: - return PlcValueType_Struct, true - case 0x62: - return PlcValueType_List, true - case 0x71: - return PlcValueType_RAW_BYTE_ARRAY, true + case 0x00: + return PlcValueType_NULL, true + case 0x01: + return PlcValueType_BOOL, true + case 0x02: + return PlcValueType_BYTE, true + case 0x03: + return PlcValueType_WORD, true + case 0x04: + return PlcValueType_DWORD, true + case 0x05: + return PlcValueType_LWORD, true + case 0x11: + return PlcValueType_USINT, true + case 0x12: + return PlcValueType_UINT, true + case 0x13: + return PlcValueType_UDINT, true + case 0x14: + return PlcValueType_ULINT, true + case 0x21: + return PlcValueType_SINT, true + case 0x22: + return PlcValueType_INT, true + case 0x23: + return PlcValueType_DINT, true + case 0x24: + return PlcValueType_LINT, true + case 0x31: + return PlcValueType_REAL, true + case 0x32: + return PlcValueType_LREAL, true + case 0x41: + return PlcValueType_CHAR, true + case 0x42: + return PlcValueType_WCHAR, true + case 0x43: + return PlcValueType_STRING, true + case 0x44: + return PlcValueType_WSTRING, true + case 0x51: + return PlcValueType_TIME, true + case 0x52: + return PlcValueType_LTIME, true + case 0x53: + return PlcValueType_DATE, true + case 0x54: + return PlcValueType_LDATE, true + case 0x55: + return PlcValueType_TIME_OF_DAY, true + case 0x56: + return PlcValueType_LTIME_OF_DAY, true + case 0x57: + return PlcValueType_DATE_AND_TIME, true + case 0x58: + return PlcValueType_LDATE_AND_TIME, true + case 0x61: + return PlcValueType_Struct, true + case 0x62: + return PlcValueType_List, true + case 0x71: + return PlcValueType_RAW_BYTE_ARRAY, true } return 0, false } @@ -243,13 +243,13 @@ func PlcValueTypeByName(value string) (enum PlcValueType, ok bool) { return 0, false } -func PlcValueTypeKnows(value uint8) bool { +func PlcValueTypeKnows(value uint8) bool { for _, typeValue := range PlcValueTypeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastPlcValueType(structType interface{}) PlcValueType { @@ -371,3 +371,4 @@ func (e PlcValueType) PLC4XEnumName() string { func (e PlcValueType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/ads/readwrite/model/ReservedIndexGroups.go b/plc4go/protocols/ads/readwrite/model/ReservedIndexGroups.go index c3e040b24fa..b2e41f07dc5 100644 --- a/plc4go/protocols/ads/readwrite/model/ReservedIndexGroups.go +++ b/plc4go/protocols/ads/readwrite/model/ReservedIndexGroups.go @@ -34,51 +34,51 @@ type IReservedIndexGroups interface { utils.Serializable } -const ( - ReservedIndexGroups_ADSIGRP_SYMTAB ReservedIndexGroups = 0x0000F000 - ReservedIndexGroups_ADSIGRP_SYMNAME ReservedIndexGroups = 0x0000F001 - ReservedIndexGroups_ADSIGRP_SYMVAL ReservedIndexGroups = 0x0000F002 - ReservedIndexGroups_ADSIGRP_SYM_HNDBYNAME ReservedIndexGroups = 0x0000F003 - ReservedIndexGroups_ADSIGRP_SYM_VALBYNAME ReservedIndexGroups = 0x0000F004 - ReservedIndexGroups_ADSIGRP_SYM_VALBYHND ReservedIndexGroups = 0x0000F005 - ReservedIndexGroups_ADSIGRP_SYM_RELEASEHND ReservedIndexGroups = 0x0000F006 - ReservedIndexGroups_ADSIGRP_SYM_INFOBYNAME ReservedIndexGroups = 0x0000F007 - ReservedIndexGroups_ADSIGRP_SYM_VERSION ReservedIndexGroups = 0x0000F008 - ReservedIndexGroups_ADSIGRP_SYM_INFOBYNAMEEX ReservedIndexGroups = 0x0000F009 - ReservedIndexGroups_ADSIGRP_SYM_DOWNLOAD ReservedIndexGroups = 0x0000F00A - ReservedIndexGroups_ADSIGRP_SYM_UPLOAD ReservedIndexGroups = 0x0000F00B - ReservedIndexGroups_ADSIGRP_SYM_UPLOADINFO ReservedIndexGroups = 0x0000F00C - ReservedIndexGroups_ADSIGRP_DATA_TYPE_TABLE_UPLOAD ReservedIndexGroups = 0x0000F00E - ReservedIndexGroups_ADSIGRP_SYMBOL_AND_DATA_TYPE_SIZES ReservedIndexGroups = 0x0000F00F - ReservedIndexGroups_ADSIGRP_SYMNOTE ReservedIndexGroups = 0x0000F010 - ReservedIndexGroups_ADSIGRP_DT_INFOBYNAMEEX ReservedIndexGroups = 0x0000F011 - ReservedIndexGroups_ADSIGRP_IOIMAGE_RWIB ReservedIndexGroups = 0x0000F020 - ReservedIndexGroups_ADSIGRP_IOIMAGE_RWIX ReservedIndexGroups = 0x0000F021 - ReservedIndexGroups_ADSIGRP_IOIMAGE_RISIZE ReservedIndexGroups = 0x0000F025 - ReservedIndexGroups_ADSIGRP_IOIMAGE_RWOB ReservedIndexGroups = 0x0000F030 - ReservedIndexGroups_ADSIGRP_IOIMAGE_RWOX ReservedIndexGroups = 0x0000F031 - ReservedIndexGroups_ADSIGRP_IOIMAGE_RWOSIZE ReservedIndexGroups = 0x0000F035 - ReservedIndexGroups_ADSIGRP_IOIMAGE_CLEARI ReservedIndexGroups = 0x0000F040 - ReservedIndexGroups_ADSIGRP_IOIMAGE_CLEARO ReservedIndexGroups = 0x0000F050 - ReservedIndexGroups_ADSIGRP_IOIMAGE_RWIOB ReservedIndexGroups = 0x0000F060 - ReservedIndexGroups_ADSIGRP_MULTIPLE_READ ReservedIndexGroups = 0x0000F080 - ReservedIndexGroups_ADSIGRP_MULTIPLE_WRITE ReservedIndexGroups = 0x0000F081 - ReservedIndexGroups_ADSIGRP_MULTIPLE_READ_WRITE ReservedIndexGroups = 0x0000F082 - ReservedIndexGroups_ADSIGRP_MULTIPLE_RELEASE_HANDLE ReservedIndexGroups = 0x0000F083 - ReservedIndexGroups_ADSIGRP_SUMUP_READEX2 ReservedIndexGroups = 0x0000F084 - ReservedIndexGroups_ADSIGRP_MULTIPLE_ADD_DEVICE_NOTIFICATIONS ReservedIndexGroups = 0x0000F085 +const( + ReservedIndexGroups_ADSIGRP_SYMTAB ReservedIndexGroups = 0x0000F000 + ReservedIndexGroups_ADSIGRP_SYMNAME ReservedIndexGroups = 0x0000F001 + ReservedIndexGroups_ADSIGRP_SYMVAL ReservedIndexGroups = 0x0000F002 + ReservedIndexGroups_ADSIGRP_SYM_HNDBYNAME ReservedIndexGroups = 0x0000F003 + ReservedIndexGroups_ADSIGRP_SYM_VALBYNAME ReservedIndexGroups = 0x0000F004 + ReservedIndexGroups_ADSIGRP_SYM_VALBYHND ReservedIndexGroups = 0x0000F005 + ReservedIndexGroups_ADSIGRP_SYM_RELEASEHND ReservedIndexGroups = 0x0000F006 + ReservedIndexGroups_ADSIGRP_SYM_INFOBYNAME ReservedIndexGroups = 0x0000F007 + ReservedIndexGroups_ADSIGRP_SYM_VERSION ReservedIndexGroups = 0x0000F008 + ReservedIndexGroups_ADSIGRP_SYM_INFOBYNAMEEX ReservedIndexGroups = 0x0000F009 + ReservedIndexGroups_ADSIGRP_SYM_DOWNLOAD ReservedIndexGroups = 0x0000F00A + ReservedIndexGroups_ADSIGRP_SYM_UPLOAD ReservedIndexGroups = 0x0000F00B + ReservedIndexGroups_ADSIGRP_SYM_UPLOADINFO ReservedIndexGroups = 0x0000F00C + ReservedIndexGroups_ADSIGRP_DATA_TYPE_TABLE_UPLOAD ReservedIndexGroups = 0x0000F00E + ReservedIndexGroups_ADSIGRP_SYMBOL_AND_DATA_TYPE_SIZES ReservedIndexGroups = 0x0000F00F + ReservedIndexGroups_ADSIGRP_SYMNOTE ReservedIndexGroups = 0x0000F010 + ReservedIndexGroups_ADSIGRP_DT_INFOBYNAMEEX ReservedIndexGroups = 0x0000F011 + ReservedIndexGroups_ADSIGRP_IOIMAGE_RWIB ReservedIndexGroups = 0x0000F020 + ReservedIndexGroups_ADSIGRP_IOIMAGE_RWIX ReservedIndexGroups = 0x0000F021 + ReservedIndexGroups_ADSIGRP_IOIMAGE_RISIZE ReservedIndexGroups = 0x0000F025 + ReservedIndexGroups_ADSIGRP_IOIMAGE_RWOB ReservedIndexGroups = 0x0000F030 + ReservedIndexGroups_ADSIGRP_IOIMAGE_RWOX ReservedIndexGroups = 0x0000F031 + ReservedIndexGroups_ADSIGRP_IOIMAGE_RWOSIZE ReservedIndexGroups = 0x0000F035 + ReservedIndexGroups_ADSIGRP_IOIMAGE_CLEARI ReservedIndexGroups = 0x0000F040 + ReservedIndexGroups_ADSIGRP_IOIMAGE_CLEARO ReservedIndexGroups = 0x0000F050 + ReservedIndexGroups_ADSIGRP_IOIMAGE_RWIOB ReservedIndexGroups = 0x0000F060 + ReservedIndexGroups_ADSIGRP_MULTIPLE_READ ReservedIndexGroups = 0x0000F080 + ReservedIndexGroups_ADSIGRP_MULTIPLE_WRITE ReservedIndexGroups = 0x0000F081 + ReservedIndexGroups_ADSIGRP_MULTIPLE_READ_WRITE ReservedIndexGroups = 0x0000F082 + ReservedIndexGroups_ADSIGRP_MULTIPLE_RELEASE_HANDLE ReservedIndexGroups = 0x0000F083 + ReservedIndexGroups_ADSIGRP_SUMUP_READEX2 ReservedIndexGroups = 0x0000F084 + ReservedIndexGroups_ADSIGRP_MULTIPLE_ADD_DEVICE_NOTIFICATIONS ReservedIndexGroups = 0x0000F085 ReservedIndexGroups_ADSIGRP_MULTIPLE_DELETE_DEVICE_NOTIFICATIONS ReservedIndexGroups = 0x0000F086 - ReservedIndexGroups_ADSIGRP_DEVICE_DATA ReservedIndexGroups = 0x0000F100 - ReservedIndexGroups_ADS_OVER_ETHERCAT ReservedIndexGroups = 0x0000F302 - ReservedIndexGroups_ADSIOFFS_DEVDATA_ADSSTATE ReservedIndexGroups = 0x00000000 - ReservedIndexGroups_ADSIOFFS_DEVDATA_DEVSTATE ReservedIndexGroups = 0x00000002 + ReservedIndexGroups_ADSIGRP_DEVICE_DATA ReservedIndexGroups = 0x0000F100 + ReservedIndexGroups_ADS_OVER_ETHERCAT ReservedIndexGroups = 0x0000F302 + ReservedIndexGroups_ADSIOFFS_DEVDATA_ADSSTATE ReservedIndexGroups = 0x00000000 + ReservedIndexGroups_ADSIOFFS_DEVDATA_DEVSTATE ReservedIndexGroups = 0x00000002 ) var ReservedIndexGroupsValues []ReservedIndexGroups func init() { _ = errors.New - ReservedIndexGroupsValues = []ReservedIndexGroups{ + ReservedIndexGroupsValues = []ReservedIndexGroups { ReservedIndexGroups_ADSIGRP_SYMTAB, ReservedIndexGroups_ADSIGRP_SYMNAME, ReservedIndexGroups_ADSIGRP_SYMVAL, @@ -121,80 +121,80 @@ func init() { func ReservedIndexGroupsByValue(value uint32) (enum ReservedIndexGroups, ok bool) { switch value { - case 0x00000000: - return ReservedIndexGroups_ADSIOFFS_DEVDATA_ADSSTATE, true - case 0x00000002: - return ReservedIndexGroups_ADSIOFFS_DEVDATA_DEVSTATE, true - case 0x0000F000: - return ReservedIndexGroups_ADSIGRP_SYMTAB, true - case 0x0000F001: - return ReservedIndexGroups_ADSIGRP_SYMNAME, true - case 0x0000F002: - return ReservedIndexGroups_ADSIGRP_SYMVAL, true - case 0x0000F003: - return ReservedIndexGroups_ADSIGRP_SYM_HNDBYNAME, true - case 0x0000F004: - return ReservedIndexGroups_ADSIGRP_SYM_VALBYNAME, true - case 0x0000F005: - return ReservedIndexGroups_ADSIGRP_SYM_VALBYHND, true - case 0x0000F006: - return ReservedIndexGroups_ADSIGRP_SYM_RELEASEHND, true - case 0x0000F007: - return ReservedIndexGroups_ADSIGRP_SYM_INFOBYNAME, true - case 0x0000F008: - return ReservedIndexGroups_ADSIGRP_SYM_VERSION, true - case 0x0000F009: - return ReservedIndexGroups_ADSIGRP_SYM_INFOBYNAMEEX, true - case 0x0000F00A: - return ReservedIndexGroups_ADSIGRP_SYM_DOWNLOAD, true - case 0x0000F00B: - return ReservedIndexGroups_ADSIGRP_SYM_UPLOAD, true - case 0x0000F00C: - return ReservedIndexGroups_ADSIGRP_SYM_UPLOADINFO, true - case 0x0000F00E: - return ReservedIndexGroups_ADSIGRP_DATA_TYPE_TABLE_UPLOAD, true - case 0x0000F00F: - return ReservedIndexGroups_ADSIGRP_SYMBOL_AND_DATA_TYPE_SIZES, true - case 0x0000F010: - return ReservedIndexGroups_ADSIGRP_SYMNOTE, true - case 0x0000F011: - return ReservedIndexGroups_ADSIGRP_DT_INFOBYNAMEEX, true - case 0x0000F020: - return ReservedIndexGroups_ADSIGRP_IOIMAGE_RWIB, true - case 0x0000F021: - return ReservedIndexGroups_ADSIGRP_IOIMAGE_RWIX, true - case 0x0000F025: - return ReservedIndexGroups_ADSIGRP_IOIMAGE_RISIZE, true - case 0x0000F030: - return ReservedIndexGroups_ADSIGRP_IOIMAGE_RWOB, true - case 0x0000F031: - return ReservedIndexGroups_ADSIGRP_IOIMAGE_RWOX, true - case 0x0000F035: - return ReservedIndexGroups_ADSIGRP_IOIMAGE_RWOSIZE, true - case 0x0000F040: - return ReservedIndexGroups_ADSIGRP_IOIMAGE_CLEARI, true - case 0x0000F050: - return ReservedIndexGroups_ADSIGRP_IOIMAGE_CLEARO, true - case 0x0000F060: - return ReservedIndexGroups_ADSIGRP_IOIMAGE_RWIOB, true - case 0x0000F080: - return ReservedIndexGroups_ADSIGRP_MULTIPLE_READ, true - case 0x0000F081: - return ReservedIndexGroups_ADSIGRP_MULTIPLE_WRITE, true - case 0x0000F082: - return ReservedIndexGroups_ADSIGRP_MULTIPLE_READ_WRITE, true - case 0x0000F083: - return ReservedIndexGroups_ADSIGRP_MULTIPLE_RELEASE_HANDLE, true - case 0x0000F084: - return ReservedIndexGroups_ADSIGRP_SUMUP_READEX2, true - case 0x0000F085: - return ReservedIndexGroups_ADSIGRP_MULTIPLE_ADD_DEVICE_NOTIFICATIONS, true - case 0x0000F086: - return ReservedIndexGroups_ADSIGRP_MULTIPLE_DELETE_DEVICE_NOTIFICATIONS, true - case 0x0000F100: - return ReservedIndexGroups_ADSIGRP_DEVICE_DATA, true - case 0x0000F302: - return ReservedIndexGroups_ADS_OVER_ETHERCAT, true + case 0x00000000: + return ReservedIndexGroups_ADSIOFFS_DEVDATA_ADSSTATE, true + case 0x00000002: + return ReservedIndexGroups_ADSIOFFS_DEVDATA_DEVSTATE, true + case 0x0000F000: + return ReservedIndexGroups_ADSIGRP_SYMTAB, true + case 0x0000F001: + return ReservedIndexGroups_ADSIGRP_SYMNAME, true + case 0x0000F002: + return ReservedIndexGroups_ADSIGRP_SYMVAL, true + case 0x0000F003: + return ReservedIndexGroups_ADSIGRP_SYM_HNDBYNAME, true + case 0x0000F004: + return ReservedIndexGroups_ADSIGRP_SYM_VALBYNAME, true + case 0x0000F005: + return ReservedIndexGroups_ADSIGRP_SYM_VALBYHND, true + case 0x0000F006: + return ReservedIndexGroups_ADSIGRP_SYM_RELEASEHND, true + case 0x0000F007: + return ReservedIndexGroups_ADSIGRP_SYM_INFOBYNAME, true + case 0x0000F008: + return ReservedIndexGroups_ADSIGRP_SYM_VERSION, true + case 0x0000F009: + return ReservedIndexGroups_ADSIGRP_SYM_INFOBYNAMEEX, true + case 0x0000F00A: + return ReservedIndexGroups_ADSIGRP_SYM_DOWNLOAD, true + case 0x0000F00B: + return ReservedIndexGroups_ADSIGRP_SYM_UPLOAD, true + case 0x0000F00C: + return ReservedIndexGroups_ADSIGRP_SYM_UPLOADINFO, true + case 0x0000F00E: + return ReservedIndexGroups_ADSIGRP_DATA_TYPE_TABLE_UPLOAD, true + case 0x0000F00F: + return ReservedIndexGroups_ADSIGRP_SYMBOL_AND_DATA_TYPE_SIZES, true + case 0x0000F010: + return ReservedIndexGroups_ADSIGRP_SYMNOTE, true + case 0x0000F011: + return ReservedIndexGroups_ADSIGRP_DT_INFOBYNAMEEX, true + case 0x0000F020: + return ReservedIndexGroups_ADSIGRP_IOIMAGE_RWIB, true + case 0x0000F021: + return ReservedIndexGroups_ADSIGRP_IOIMAGE_RWIX, true + case 0x0000F025: + return ReservedIndexGroups_ADSIGRP_IOIMAGE_RISIZE, true + case 0x0000F030: + return ReservedIndexGroups_ADSIGRP_IOIMAGE_RWOB, true + case 0x0000F031: + return ReservedIndexGroups_ADSIGRP_IOIMAGE_RWOX, true + case 0x0000F035: + return ReservedIndexGroups_ADSIGRP_IOIMAGE_RWOSIZE, true + case 0x0000F040: + return ReservedIndexGroups_ADSIGRP_IOIMAGE_CLEARI, true + case 0x0000F050: + return ReservedIndexGroups_ADSIGRP_IOIMAGE_CLEARO, true + case 0x0000F060: + return ReservedIndexGroups_ADSIGRP_IOIMAGE_RWIOB, true + case 0x0000F080: + return ReservedIndexGroups_ADSIGRP_MULTIPLE_READ, true + case 0x0000F081: + return ReservedIndexGroups_ADSIGRP_MULTIPLE_WRITE, true + case 0x0000F082: + return ReservedIndexGroups_ADSIGRP_MULTIPLE_READ_WRITE, true + case 0x0000F083: + return ReservedIndexGroups_ADSIGRP_MULTIPLE_RELEASE_HANDLE, true + case 0x0000F084: + return ReservedIndexGroups_ADSIGRP_SUMUP_READEX2, true + case 0x0000F085: + return ReservedIndexGroups_ADSIGRP_MULTIPLE_ADD_DEVICE_NOTIFICATIONS, true + case 0x0000F086: + return ReservedIndexGroups_ADSIGRP_MULTIPLE_DELETE_DEVICE_NOTIFICATIONS, true + case 0x0000F100: + return ReservedIndexGroups_ADSIGRP_DEVICE_DATA, true + case 0x0000F302: + return ReservedIndexGroups_ADS_OVER_ETHERCAT, true } return 0, false } @@ -279,13 +279,13 @@ func ReservedIndexGroupsByName(value string) (enum ReservedIndexGroups, ok bool) return 0, false } -func ReservedIndexGroupsKnows(value uint32) bool { +func ReservedIndexGroupsKnows(value uint32) bool { for _, typeValue := range ReservedIndexGroupsValues { if uint32(typeValue) == value { return true } } - return false + return false; } func CastReservedIndexGroups(structType interface{}) ReservedIndexGroups { @@ -419,3 +419,4 @@ func (e ReservedIndexGroups) PLC4XEnumName() string { func (e ReservedIndexGroups) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/ads/readwrite/model/ReturnCode.go b/plc4go/protocols/ads/readwrite/model/ReturnCode.go index 3d287b6191f..1ff7b547558 100644 --- a/plc4go/protocols/ads/readwrite/model/ReturnCode.go +++ b/plc4go/protocols/ads/readwrite/model/ReturnCode.go @@ -34,136 +34,136 @@ type IReturnCode interface { utils.Serializable } -const ( - ReturnCode_OK ReturnCode = 0x00 - ReturnCode_INTERNAL_ERROR ReturnCode = 0x01 - ReturnCode_NO_REALTIME ReturnCode = 0x02 - ReturnCode_SAVE_ERROR ReturnCode = 0x03 - ReturnCode_MAILBOX_FULL ReturnCode = 0x04 - ReturnCode_WRONG_HMSG ReturnCode = 0x05 - ReturnCode_TARGET_PORT_NOT_FOUND ReturnCode = 0x06 - ReturnCode_TARGET_HOST_NOT_FOUND ReturnCode = 0x07 - ReturnCode_UNKNOWN_COMMAND_ID ReturnCode = 0x08 - ReturnCode_UNKNOWN_TASK_ID ReturnCode = 0x09 - ReturnCode_NO_IO ReturnCode = 0x0A - ReturnCode_UNKNOWN_ADS_COMMAND ReturnCode = 0x0B - ReturnCode_WIN32_ERROR ReturnCode = 0x0C - ReturnCode_PORT_NOT_CONNECTED ReturnCode = 0x0D - ReturnCode_INVALID_ADS_LENGTH ReturnCode = 0x0E - ReturnCode_INVALID_AMS_NET_ID ReturnCode = 0x0F - ReturnCode_LOW_INSTALLATION_LEVEL ReturnCode = 0x10 - ReturnCode_NO_DEBUGGING_AVAILABLE ReturnCode = 0x11 - ReturnCode_PORT_DEACTIVATED ReturnCode = 0x12 - ReturnCode_PORT_ALREADY_CONNECTED ReturnCode = 0x13 - ReturnCode_ADS_SYNC_WIN32_ERROR ReturnCode = 0x14 - ReturnCode_ADS_SYNC_TIMEOUT ReturnCode = 0x15 - ReturnCode_ADS_SYNC_AMS_ERROR ReturnCode = 0x16 - ReturnCode_NO_INDEX_MAP_FOR_ADS_AVAILABLE ReturnCode = 0x17 - ReturnCode_INVALID_ADS_PORT ReturnCode = 0x18 - ReturnCode_NO_MEMORY ReturnCode = 0x19 - ReturnCode_TCP_SENDING_ERROR ReturnCode = 0x1A - ReturnCode_HOST_NOT_REACHABLE ReturnCode = 0x1B - ReturnCode_INVALID_AMS_FRAGMENT ReturnCode = 0x1C - ReturnCode_ROUTERERR_NOLOCKEDMEMORY ReturnCode = 0x500 - ReturnCode_ROUTERERR_RESIZEMEMORY ReturnCode = 0x501 - ReturnCode_ROUTERERR_MAILBOXFULL ReturnCode = 0x502 - ReturnCode_ROUTERERR_DEBUGBOXFULL ReturnCode = 0x503 - ReturnCode_ROUTERERR_UNKNOWNPORTTYPE ReturnCode = 0x504 - ReturnCode_ROUTERERR_NOTINITIALIZED ReturnCode = 0x505 - ReturnCode_ROUTERERR_PORTALREADYINUSE ReturnCode = 0x506 - ReturnCode_ROUTERERR_NOTREGISTERED ReturnCode = 0x507 - ReturnCode_ROUTERERR_NOMOREQUEUES ReturnCode = 0x508 - ReturnCode_ROUTERERR_INVALIDPORT ReturnCode = 0x509 - ReturnCode_ROUTERERR_NOTACTIVATED ReturnCode = 0x50A - ReturnCode_ADSERR_DEVICE_ERROR ReturnCode = 0x700 - ReturnCode_ADSERR_DEVICE_SRVNOTSUPP ReturnCode = 0x701 - ReturnCode_ADSERR_DEVICE_INVALIDGRP ReturnCode = 0x702 - ReturnCode_ADSERR_DEVICE_INVALIDOFFSET ReturnCode = 0x703 - ReturnCode_ADSERR_DEVICE_INVALIDACCESS ReturnCode = 0x704 - ReturnCode_ADSERR_DEVICE_INVALIDSIZE ReturnCode = 0x705 - ReturnCode_ADSERR_DEVICE_INVALIDDATA ReturnCode = 0x706 - ReturnCode_ADSERR_DEVICE_NOTREADY ReturnCode = 0x707 - ReturnCode_ADSERR_DEVICE_BUSY ReturnCode = 0x708 - ReturnCode_ADSERR_DEVICE_INVALIDCONTEXT ReturnCode = 0x709 - ReturnCode_ADSERR_DEVICE_NOMEMORY ReturnCode = 0x70A - ReturnCode_ADSERR_DEVICE_INVALIDPARM ReturnCode = 0x70B - ReturnCode_ADSERR_DEVICE_NOTFOUND ReturnCode = 0x70C - ReturnCode_ADSERR_DEVICE_SYNTAX ReturnCode = 0x70D - ReturnCode_ADSERR_DEVICE_INCOMPATIBLE ReturnCode = 0x70E - ReturnCode_ADSERR_DEVICE_EXISTS ReturnCode = 0x70F - ReturnCode_ADSERR_DEVICE_SYMBOLNOTFOUND ReturnCode = 0x710 +const( + ReturnCode_OK ReturnCode = 0x00 + ReturnCode_INTERNAL_ERROR ReturnCode = 0x01 + ReturnCode_NO_REALTIME ReturnCode = 0x02 + ReturnCode_SAVE_ERROR ReturnCode = 0x03 + ReturnCode_MAILBOX_FULL ReturnCode = 0x04 + ReturnCode_WRONG_HMSG ReturnCode = 0x05 + ReturnCode_TARGET_PORT_NOT_FOUND ReturnCode = 0x06 + ReturnCode_TARGET_HOST_NOT_FOUND ReturnCode = 0x07 + ReturnCode_UNKNOWN_COMMAND_ID ReturnCode = 0x08 + ReturnCode_UNKNOWN_TASK_ID ReturnCode = 0x09 + ReturnCode_NO_IO ReturnCode = 0x0A + ReturnCode_UNKNOWN_ADS_COMMAND ReturnCode = 0x0B + ReturnCode_WIN32_ERROR ReturnCode = 0x0C + ReturnCode_PORT_NOT_CONNECTED ReturnCode = 0x0D + ReturnCode_INVALID_ADS_LENGTH ReturnCode = 0x0E + ReturnCode_INVALID_AMS_NET_ID ReturnCode = 0x0F + ReturnCode_LOW_INSTALLATION_LEVEL ReturnCode = 0x10 + ReturnCode_NO_DEBUGGING_AVAILABLE ReturnCode = 0x11 + ReturnCode_PORT_DEACTIVATED ReturnCode = 0x12 + ReturnCode_PORT_ALREADY_CONNECTED ReturnCode = 0x13 + ReturnCode_ADS_SYNC_WIN32_ERROR ReturnCode = 0x14 + ReturnCode_ADS_SYNC_TIMEOUT ReturnCode = 0x15 + ReturnCode_ADS_SYNC_AMS_ERROR ReturnCode = 0x16 + ReturnCode_NO_INDEX_MAP_FOR_ADS_AVAILABLE ReturnCode = 0x17 + ReturnCode_INVALID_ADS_PORT ReturnCode = 0x18 + ReturnCode_NO_MEMORY ReturnCode = 0x19 + ReturnCode_TCP_SENDING_ERROR ReturnCode = 0x1A + ReturnCode_HOST_NOT_REACHABLE ReturnCode = 0x1B + ReturnCode_INVALID_AMS_FRAGMENT ReturnCode = 0x1C + ReturnCode_ROUTERERR_NOLOCKEDMEMORY ReturnCode = 0x500 + ReturnCode_ROUTERERR_RESIZEMEMORY ReturnCode = 0x501 + ReturnCode_ROUTERERR_MAILBOXFULL ReturnCode = 0x502 + ReturnCode_ROUTERERR_DEBUGBOXFULL ReturnCode = 0x503 + ReturnCode_ROUTERERR_UNKNOWNPORTTYPE ReturnCode = 0x504 + ReturnCode_ROUTERERR_NOTINITIALIZED ReturnCode = 0x505 + ReturnCode_ROUTERERR_PORTALREADYINUSE ReturnCode = 0x506 + ReturnCode_ROUTERERR_NOTREGISTERED ReturnCode = 0x507 + ReturnCode_ROUTERERR_NOMOREQUEUES ReturnCode = 0x508 + ReturnCode_ROUTERERR_INVALIDPORT ReturnCode = 0x509 + ReturnCode_ROUTERERR_NOTACTIVATED ReturnCode = 0x50A + ReturnCode_ADSERR_DEVICE_ERROR ReturnCode = 0x700 + ReturnCode_ADSERR_DEVICE_SRVNOTSUPP ReturnCode = 0x701 + ReturnCode_ADSERR_DEVICE_INVALIDGRP ReturnCode = 0x702 + ReturnCode_ADSERR_DEVICE_INVALIDOFFSET ReturnCode = 0x703 + ReturnCode_ADSERR_DEVICE_INVALIDACCESS ReturnCode = 0x704 + ReturnCode_ADSERR_DEVICE_INVALIDSIZE ReturnCode = 0x705 + ReturnCode_ADSERR_DEVICE_INVALIDDATA ReturnCode = 0x706 + ReturnCode_ADSERR_DEVICE_NOTREADY ReturnCode = 0x707 + ReturnCode_ADSERR_DEVICE_BUSY ReturnCode = 0x708 + ReturnCode_ADSERR_DEVICE_INVALIDCONTEXT ReturnCode = 0x709 + ReturnCode_ADSERR_DEVICE_NOMEMORY ReturnCode = 0x70A + ReturnCode_ADSERR_DEVICE_INVALIDPARM ReturnCode = 0x70B + ReturnCode_ADSERR_DEVICE_NOTFOUND ReturnCode = 0x70C + ReturnCode_ADSERR_DEVICE_SYNTAX ReturnCode = 0x70D + ReturnCode_ADSERR_DEVICE_INCOMPATIBLE ReturnCode = 0x70E + ReturnCode_ADSERR_DEVICE_EXISTS ReturnCode = 0x70F + ReturnCode_ADSERR_DEVICE_SYMBOLNOTFOUND ReturnCode = 0x710 ReturnCode_ADSERR_DEVICE_SYMBOLVERSIONINVALID ReturnCode = 0x711 - ReturnCode_ADSERR_DEVICE_INVALIDSTATE ReturnCode = 0x712 - ReturnCode_ADSERR_DEVICE_TRANSMODENOTSUPP ReturnCode = 0x713 - ReturnCode_ADSERR_DEVICE_NOTIFYHNDINVALID ReturnCode = 0x714 - ReturnCode_ADSERR_DEVICE_CLIENTUNKNOWN ReturnCode = 0x715 - ReturnCode_ADSERR_DEVICE_NOMOREHDLS ReturnCode = 0x716 - ReturnCode_ADSERR_DEVICE_INVALIDWATCHSIZE ReturnCode = 0x717 - ReturnCode_ADSERR_DEVICE_NOTINIT ReturnCode = 0x718 - ReturnCode_ADSERR_DEVICE_TIMEOUT ReturnCode = 0x719 - ReturnCode_ADSERR_DEVICE_NOINTERFACE ReturnCode = 0x71A - ReturnCode_ADSERR_DEVICE_INVALIDINTERFACE ReturnCode = 0x71B - ReturnCode_ADSERR_DEVICE_INVALIDCLSID ReturnCode = 0x71C - ReturnCode_ADSERR_DEVICE_INVALIDOBJID ReturnCode = 0x71D - ReturnCode_ADSERR_DEVICE_PENDING ReturnCode = 0x71E - ReturnCode_ADSERR_DEVICE_ABORTED ReturnCode = 0x71F - ReturnCode_ADSERR_DEVICE_WARNING ReturnCode = 0x720 - ReturnCode_ADSERR_DEVICE_INVALIDARRAYIDX ReturnCode = 0x721 - ReturnCode_ADSERR_DEVICE_SYMBOLNOTACTIVE ReturnCode = 0x722 - ReturnCode_ADSERR_DEVICE_ACCESSDENIED ReturnCode = 0x723 - ReturnCode_ADSERR_DEVICE_LICENSENOTFOUND ReturnCode = 0x724 - ReturnCode_ADSERR_DEVICE_LICENSEEXPIRED ReturnCode = 0x725 - ReturnCode_ADSERR_DEVICE_LICENSEEXCEEDED ReturnCode = 0x726 - ReturnCode_ADSERR_DEVICE_LICENSEINVALID ReturnCode = 0x727 - ReturnCode_ADSERR_DEVICE_LICENSESYSTEMID ReturnCode = 0x728 - ReturnCode_ADSERR_DEVICE_LICENSENOTIMELIMIT ReturnCode = 0x729 - ReturnCode_ADSERR_DEVICE_LICENSEFUTUREISSUE ReturnCode = 0x72A - ReturnCode_ADSERR_DEVICE_LICENSETIMETOLONG ReturnCode = 0x72B - ReturnCode_ADSERR_DEVICE_EXCEPTION ReturnCode = 0x72c - ReturnCode_ADSERR_DEVICE_LICENSEDUPLICATED ReturnCode = 0x72D - ReturnCode_ADSERR_DEVICE_SIGNATUREINVALID ReturnCode = 0x72E - ReturnCode_ADSERR_DEVICE_CERTIFICATEINVALID ReturnCode = 0x72F - ReturnCode_ADSERR_CLIENT_ERROR ReturnCode = 0x740 - ReturnCode_ADSERR_CLIENT_INVALIDPARM ReturnCode = 0x741 - ReturnCode_ADSERR_CLIENT_LISTEMPTY ReturnCode = 0x742 - ReturnCode_ADSERR_CLIENT_VARUSED ReturnCode = 0x743 - ReturnCode_ADSERR_CLIENT_DUPLINVOKEID ReturnCode = 0x744 - ReturnCode_ADSERR_CLIENT_SYNCTIMEOUT ReturnCode = 0x745 - ReturnCode_ADSERR_CLIENT_W32ERROR ReturnCode = 0x746 - ReturnCode_ADSERR_CLIENT_TIMEOUTINVALID ReturnCode = 0x747 - ReturnCode_ADSERR_CLIENT_PORTNOTOPEN ReturnCode = 0x748 - ReturnCode_ADSERR_CLIENT_NOAMSADDR ReturnCode = 0x750 - ReturnCode_ADSERR_CLIENT_SYNCINTERNAL ReturnCode = 0x751 - ReturnCode_ADSERR_CLIENT_ADDHASH ReturnCode = 0x752 - ReturnCode_ADSERR_CLIENT_REMOVEHASH ReturnCode = 0x753 - ReturnCode_ADSERR_CLIENT_NOMORESYM ReturnCode = 0x754 - ReturnCode_ADSERR_CLIENT_SYNCRESINVALID ReturnCode = 0x755 - ReturnCode_RTERR_INTERNAL ReturnCode = 0x1000 - ReturnCode_RTERR_BADTIMERPERIODS ReturnCode = 0x1001 - ReturnCode_RTERR_INVALIDTASKPTR ReturnCode = 0x1002 - ReturnCode_RTERR_INVALIDSTACKPTR ReturnCode = 0x1003 - ReturnCode_RTERR_PRIOEXISTS ReturnCode = 0x1004 - ReturnCode_RTERR_NOMORETCB ReturnCode = 0x1005 - ReturnCode_RTERR_NOMORESEMAS ReturnCode = 0x1006 - ReturnCode_RTERR_NOMOREQUEUES ReturnCode = 0x1007 - ReturnCode_RTERR_EXTIRQALREADYDEF ReturnCode = 0x100D - ReturnCode_RTERR_EXTIRQNOTDEF ReturnCode = 0x100E - ReturnCode_RTERR_EXTIRQINSTALLFAILED ReturnCode = 0x100F - ReturnCode_RTERR_IRQLNOTLESSOREQUAL ReturnCode = 0x1010 - ReturnCode_RTERR_VMXNOTSUPPORTED ReturnCode = 0x1017 - ReturnCode_RTERR_VMXDISABLED ReturnCode = 0x1018 - ReturnCode_RTERR_VMXCONTROLSMISSING ReturnCode = 0x1019 - ReturnCode_RTERR_VMXENABLEFAILS ReturnCode = 0x101A - ReturnCode_WSAETIMEDOUT ReturnCode = 0x274C - ReturnCode_WSAECONNREFUSED ReturnCode = 0x274D - ReturnCode_WSAEHOSTUNREACH ReturnCode = 0x2751 + ReturnCode_ADSERR_DEVICE_INVALIDSTATE ReturnCode = 0x712 + ReturnCode_ADSERR_DEVICE_TRANSMODENOTSUPP ReturnCode = 0x713 + ReturnCode_ADSERR_DEVICE_NOTIFYHNDINVALID ReturnCode = 0x714 + ReturnCode_ADSERR_DEVICE_CLIENTUNKNOWN ReturnCode = 0x715 + ReturnCode_ADSERR_DEVICE_NOMOREHDLS ReturnCode = 0x716 + ReturnCode_ADSERR_DEVICE_INVALIDWATCHSIZE ReturnCode = 0x717 + ReturnCode_ADSERR_DEVICE_NOTINIT ReturnCode = 0x718 + ReturnCode_ADSERR_DEVICE_TIMEOUT ReturnCode = 0x719 + ReturnCode_ADSERR_DEVICE_NOINTERFACE ReturnCode = 0x71A + ReturnCode_ADSERR_DEVICE_INVALIDINTERFACE ReturnCode = 0x71B + ReturnCode_ADSERR_DEVICE_INVALIDCLSID ReturnCode = 0x71C + ReturnCode_ADSERR_DEVICE_INVALIDOBJID ReturnCode = 0x71D + ReturnCode_ADSERR_DEVICE_PENDING ReturnCode = 0x71E + ReturnCode_ADSERR_DEVICE_ABORTED ReturnCode = 0x71F + ReturnCode_ADSERR_DEVICE_WARNING ReturnCode = 0x720 + ReturnCode_ADSERR_DEVICE_INVALIDARRAYIDX ReturnCode = 0x721 + ReturnCode_ADSERR_DEVICE_SYMBOLNOTACTIVE ReturnCode = 0x722 + ReturnCode_ADSERR_DEVICE_ACCESSDENIED ReturnCode = 0x723 + ReturnCode_ADSERR_DEVICE_LICENSENOTFOUND ReturnCode = 0x724 + ReturnCode_ADSERR_DEVICE_LICENSEEXPIRED ReturnCode = 0x725 + ReturnCode_ADSERR_DEVICE_LICENSEEXCEEDED ReturnCode = 0x726 + ReturnCode_ADSERR_DEVICE_LICENSEINVALID ReturnCode = 0x727 + ReturnCode_ADSERR_DEVICE_LICENSESYSTEMID ReturnCode = 0x728 + ReturnCode_ADSERR_DEVICE_LICENSENOTIMELIMIT ReturnCode = 0x729 + ReturnCode_ADSERR_DEVICE_LICENSEFUTUREISSUE ReturnCode = 0x72A + ReturnCode_ADSERR_DEVICE_LICENSETIMETOLONG ReturnCode = 0x72B + ReturnCode_ADSERR_DEVICE_EXCEPTION ReturnCode = 0x72c + ReturnCode_ADSERR_DEVICE_LICENSEDUPLICATED ReturnCode = 0x72D + ReturnCode_ADSERR_DEVICE_SIGNATUREINVALID ReturnCode = 0x72E + ReturnCode_ADSERR_DEVICE_CERTIFICATEINVALID ReturnCode = 0x72F + ReturnCode_ADSERR_CLIENT_ERROR ReturnCode = 0x740 + ReturnCode_ADSERR_CLIENT_INVALIDPARM ReturnCode = 0x741 + ReturnCode_ADSERR_CLIENT_LISTEMPTY ReturnCode = 0x742 + ReturnCode_ADSERR_CLIENT_VARUSED ReturnCode = 0x743 + ReturnCode_ADSERR_CLIENT_DUPLINVOKEID ReturnCode = 0x744 + ReturnCode_ADSERR_CLIENT_SYNCTIMEOUT ReturnCode = 0x745 + ReturnCode_ADSERR_CLIENT_W32ERROR ReturnCode = 0x746 + ReturnCode_ADSERR_CLIENT_TIMEOUTINVALID ReturnCode = 0x747 + ReturnCode_ADSERR_CLIENT_PORTNOTOPEN ReturnCode = 0x748 + ReturnCode_ADSERR_CLIENT_NOAMSADDR ReturnCode = 0x750 + ReturnCode_ADSERR_CLIENT_SYNCINTERNAL ReturnCode = 0x751 + ReturnCode_ADSERR_CLIENT_ADDHASH ReturnCode = 0x752 + ReturnCode_ADSERR_CLIENT_REMOVEHASH ReturnCode = 0x753 + ReturnCode_ADSERR_CLIENT_NOMORESYM ReturnCode = 0x754 + ReturnCode_ADSERR_CLIENT_SYNCRESINVALID ReturnCode = 0x755 + ReturnCode_RTERR_INTERNAL ReturnCode = 0x1000 + ReturnCode_RTERR_BADTIMERPERIODS ReturnCode = 0x1001 + ReturnCode_RTERR_INVALIDTASKPTR ReturnCode = 0x1002 + ReturnCode_RTERR_INVALIDSTACKPTR ReturnCode = 0x1003 + ReturnCode_RTERR_PRIOEXISTS ReturnCode = 0x1004 + ReturnCode_RTERR_NOMORETCB ReturnCode = 0x1005 + ReturnCode_RTERR_NOMORESEMAS ReturnCode = 0x1006 + ReturnCode_RTERR_NOMOREQUEUES ReturnCode = 0x1007 + ReturnCode_RTERR_EXTIRQALREADYDEF ReturnCode = 0x100D + ReturnCode_RTERR_EXTIRQNOTDEF ReturnCode = 0x100E + ReturnCode_RTERR_EXTIRQINSTALLFAILED ReturnCode = 0x100F + ReturnCode_RTERR_IRQLNOTLESSOREQUAL ReturnCode = 0x1010 + ReturnCode_RTERR_VMXNOTSUPPORTED ReturnCode = 0x1017 + ReturnCode_RTERR_VMXDISABLED ReturnCode = 0x1018 + ReturnCode_RTERR_VMXCONTROLSMISSING ReturnCode = 0x1019 + ReturnCode_RTERR_VMXENABLEFAILS ReturnCode = 0x101A + ReturnCode_WSAETIMEDOUT ReturnCode = 0x274C + ReturnCode_WSAECONNREFUSED ReturnCode = 0x274D + ReturnCode_WSAEHOSTUNREACH ReturnCode = 0x2751 ) var ReturnCodeValues []ReturnCode func init() { _ = errors.New - ReturnCodeValues = []ReturnCode{ + ReturnCodeValues = []ReturnCode { ReturnCode_OK, ReturnCode_INTERNAL_ERROR, ReturnCode_NO_REALTIME, @@ -291,250 +291,250 @@ func init() { func ReturnCodeByValue(value uint32) (enum ReturnCode, ok bool) { switch value { - case 0x00: - return ReturnCode_OK, true - case 0x01: - return ReturnCode_INTERNAL_ERROR, true - case 0x02: - return ReturnCode_NO_REALTIME, true - case 0x03: - return ReturnCode_SAVE_ERROR, true - case 0x04: - return ReturnCode_MAILBOX_FULL, true - case 0x05: - return ReturnCode_WRONG_HMSG, true - case 0x06: - return ReturnCode_TARGET_PORT_NOT_FOUND, true - case 0x07: - return ReturnCode_TARGET_HOST_NOT_FOUND, true - case 0x08: - return ReturnCode_UNKNOWN_COMMAND_ID, true - case 0x09: - return ReturnCode_UNKNOWN_TASK_ID, true - case 0x0A: - return ReturnCode_NO_IO, true - case 0x0B: - return ReturnCode_UNKNOWN_ADS_COMMAND, true - case 0x0C: - return ReturnCode_WIN32_ERROR, true - case 0x0D: - return ReturnCode_PORT_NOT_CONNECTED, true - case 0x0E: - return ReturnCode_INVALID_ADS_LENGTH, true - case 0x0F: - return ReturnCode_INVALID_AMS_NET_ID, true - case 0x10: - return ReturnCode_LOW_INSTALLATION_LEVEL, true - case 0x1000: - return ReturnCode_RTERR_INTERNAL, true - case 0x1001: - return ReturnCode_RTERR_BADTIMERPERIODS, true - case 0x1002: - return ReturnCode_RTERR_INVALIDTASKPTR, true - case 0x1003: - return ReturnCode_RTERR_INVALIDSTACKPTR, true - case 0x1004: - return ReturnCode_RTERR_PRIOEXISTS, true - case 0x1005: - return ReturnCode_RTERR_NOMORETCB, true - case 0x1006: - return ReturnCode_RTERR_NOMORESEMAS, true - case 0x1007: - return ReturnCode_RTERR_NOMOREQUEUES, true - case 0x100D: - return ReturnCode_RTERR_EXTIRQALREADYDEF, true - case 0x100E: - return ReturnCode_RTERR_EXTIRQNOTDEF, true - case 0x100F: - return ReturnCode_RTERR_EXTIRQINSTALLFAILED, true - case 0x1010: - return ReturnCode_RTERR_IRQLNOTLESSOREQUAL, true - case 0x1017: - return ReturnCode_RTERR_VMXNOTSUPPORTED, true - case 0x1018: - return ReturnCode_RTERR_VMXDISABLED, true - case 0x1019: - return ReturnCode_RTERR_VMXCONTROLSMISSING, true - case 0x101A: - return ReturnCode_RTERR_VMXENABLEFAILS, true - case 0x11: - return ReturnCode_NO_DEBUGGING_AVAILABLE, true - case 0x12: - return ReturnCode_PORT_DEACTIVATED, true - case 0x13: - return ReturnCode_PORT_ALREADY_CONNECTED, true - case 0x14: - return ReturnCode_ADS_SYNC_WIN32_ERROR, true - case 0x15: - return ReturnCode_ADS_SYNC_TIMEOUT, true - case 0x16: - return ReturnCode_ADS_SYNC_AMS_ERROR, true - case 0x17: - return ReturnCode_NO_INDEX_MAP_FOR_ADS_AVAILABLE, true - case 0x18: - return ReturnCode_INVALID_ADS_PORT, true - case 0x19: - return ReturnCode_NO_MEMORY, true - case 0x1A: - return ReturnCode_TCP_SENDING_ERROR, true - case 0x1B: - return ReturnCode_HOST_NOT_REACHABLE, true - case 0x1C: - return ReturnCode_INVALID_AMS_FRAGMENT, true - case 0x274C: - return ReturnCode_WSAETIMEDOUT, true - case 0x274D: - return ReturnCode_WSAECONNREFUSED, true - case 0x2751: - return ReturnCode_WSAEHOSTUNREACH, true - case 0x500: - return ReturnCode_ROUTERERR_NOLOCKEDMEMORY, true - case 0x501: - return ReturnCode_ROUTERERR_RESIZEMEMORY, true - case 0x502: - return ReturnCode_ROUTERERR_MAILBOXFULL, true - case 0x503: - return ReturnCode_ROUTERERR_DEBUGBOXFULL, true - case 0x504: - return ReturnCode_ROUTERERR_UNKNOWNPORTTYPE, true - case 0x505: - return ReturnCode_ROUTERERR_NOTINITIALIZED, true - case 0x506: - return ReturnCode_ROUTERERR_PORTALREADYINUSE, true - case 0x507: - return ReturnCode_ROUTERERR_NOTREGISTERED, true - case 0x508: - return ReturnCode_ROUTERERR_NOMOREQUEUES, true - case 0x509: - return ReturnCode_ROUTERERR_INVALIDPORT, true - case 0x50A: - return ReturnCode_ROUTERERR_NOTACTIVATED, true - case 0x700: - return ReturnCode_ADSERR_DEVICE_ERROR, true - case 0x701: - return ReturnCode_ADSERR_DEVICE_SRVNOTSUPP, true - case 0x702: - return ReturnCode_ADSERR_DEVICE_INVALIDGRP, true - case 0x703: - return ReturnCode_ADSERR_DEVICE_INVALIDOFFSET, true - case 0x704: - return ReturnCode_ADSERR_DEVICE_INVALIDACCESS, true - case 0x705: - return ReturnCode_ADSERR_DEVICE_INVALIDSIZE, true - case 0x706: - return ReturnCode_ADSERR_DEVICE_INVALIDDATA, true - case 0x707: - return ReturnCode_ADSERR_DEVICE_NOTREADY, true - case 0x708: - return ReturnCode_ADSERR_DEVICE_BUSY, true - case 0x709: - return ReturnCode_ADSERR_DEVICE_INVALIDCONTEXT, true - case 0x70A: - return ReturnCode_ADSERR_DEVICE_NOMEMORY, true - case 0x70B: - return ReturnCode_ADSERR_DEVICE_INVALIDPARM, true - case 0x70C: - return ReturnCode_ADSERR_DEVICE_NOTFOUND, true - case 0x70D: - return ReturnCode_ADSERR_DEVICE_SYNTAX, true - case 0x70E: - return ReturnCode_ADSERR_DEVICE_INCOMPATIBLE, true - case 0x70F: - return ReturnCode_ADSERR_DEVICE_EXISTS, true - case 0x710: - return ReturnCode_ADSERR_DEVICE_SYMBOLNOTFOUND, true - case 0x711: - return ReturnCode_ADSERR_DEVICE_SYMBOLVERSIONINVALID, true - case 0x712: - return ReturnCode_ADSERR_DEVICE_INVALIDSTATE, true - case 0x713: - return ReturnCode_ADSERR_DEVICE_TRANSMODENOTSUPP, true - case 0x714: - return ReturnCode_ADSERR_DEVICE_NOTIFYHNDINVALID, true - case 0x715: - return ReturnCode_ADSERR_DEVICE_CLIENTUNKNOWN, true - case 0x716: - return ReturnCode_ADSERR_DEVICE_NOMOREHDLS, true - case 0x717: - return ReturnCode_ADSERR_DEVICE_INVALIDWATCHSIZE, true - case 0x718: - return ReturnCode_ADSERR_DEVICE_NOTINIT, true - case 0x719: - return ReturnCode_ADSERR_DEVICE_TIMEOUT, true - case 0x71A: - return ReturnCode_ADSERR_DEVICE_NOINTERFACE, true - case 0x71B: - return ReturnCode_ADSERR_DEVICE_INVALIDINTERFACE, true - case 0x71C: - return ReturnCode_ADSERR_DEVICE_INVALIDCLSID, true - case 0x71D: - return ReturnCode_ADSERR_DEVICE_INVALIDOBJID, true - case 0x71E: - return ReturnCode_ADSERR_DEVICE_PENDING, true - case 0x71F: - return ReturnCode_ADSERR_DEVICE_ABORTED, true - case 0x720: - return ReturnCode_ADSERR_DEVICE_WARNING, true - case 0x721: - return ReturnCode_ADSERR_DEVICE_INVALIDARRAYIDX, true - case 0x722: - return ReturnCode_ADSERR_DEVICE_SYMBOLNOTACTIVE, true - case 0x723: - return ReturnCode_ADSERR_DEVICE_ACCESSDENIED, true - case 0x724: - return ReturnCode_ADSERR_DEVICE_LICENSENOTFOUND, true - case 0x725: - return ReturnCode_ADSERR_DEVICE_LICENSEEXPIRED, true - case 0x726: - return ReturnCode_ADSERR_DEVICE_LICENSEEXCEEDED, true - case 0x727: - return ReturnCode_ADSERR_DEVICE_LICENSEINVALID, true - case 0x728: - return ReturnCode_ADSERR_DEVICE_LICENSESYSTEMID, true - case 0x729: - return ReturnCode_ADSERR_DEVICE_LICENSENOTIMELIMIT, true - case 0x72A: - return ReturnCode_ADSERR_DEVICE_LICENSEFUTUREISSUE, true - case 0x72B: - return ReturnCode_ADSERR_DEVICE_LICENSETIMETOLONG, true - case 0x72D: - return ReturnCode_ADSERR_DEVICE_LICENSEDUPLICATED, true - case 0x72E: - return ReturnCode_ADSERR_DEVICE_SIGNATUREINVALID, true - case 0x72F: - return ReturnCode_ADSERR_DEVICE_CERTIFICATEINVALID, true - case 0x72c: - return ReturnCode_ADSERR_DEVICE_EXCEPTION, true - case 0x740: - return ReturnCode_ADSERR_CLIENT_ERROR, true - case 0x741: - return ReturnCode_ADSERR_CLIENT_INVALIDPARM, true - case 0x742: - return ReturnCode_ADSERR_CLIENT_LISTEMPTY, true - case 0x743: - return ReturnCode_ADSERR_CLIENT_VARUSED, true - case 0x744: - return ReturnCode_ADSERR_CLIENT_DUPLINVOKEID, true - case 0x745: - return ReturnCode_ADSERR_CLIENT_SYNCTIMEOUT, true - case 0x746: - return ReturnCode_ADSERR_CLIENT_W32ERROR, true - case 0x747: - return ReturnCode_ADSERR_CLIENT_TIMEOUTINVALID, true - case 0x748: - return ReturnCode_ADSERR_CLIENT_PORTNOTOPEN, true - case 0x750: - return ReturnCode_ADSERR_CLIENT_NOAMSADDR, true - case 0x751: - return ReturnCode_ADSERR_CLIENT_SYNCINTERNAL, true - case 0x752: - return ReturnCode_ADSERR_CLIENT_ADDHASH, true - case 0x753: - return ReturnCode_ADSERR_CLIENT_REMOVEHASH, true - case 0x754: - return ReturnCode_ADSERR_CLIENT_NOMORESYM, true - case 0x755: - return ReturnCode_ADSERR_CLIENT_SYNCRESINVALID, true + case 0x00: + return ReturnCode_OK, true + case 0x01: + return ReturnCode_INTERNAL_ERROR, true + case 0x02: + return ReturnCode_NO_REALTIME, true + case 0x03: + return ReturnCode_SAVE_ERROR, true + case 0x04: + return ReturnCode_MAILBOX_FULL, true + case 0x05: + return ReturnCode_WRONG_HMSG, true + case 0x06: + return ReturnCode_TARGET_PORT_NOT_FOUND, true + case 0x07: + return ReturnCode_TARGET_HOST_NOT_FOUND, true + case 0x08: + return ReturnCode_UNKNOWN_COMMAND_ID, true + case 0x09: + return ReturnCode_UNKNOWN_TASK_ID, true + case 0x0A: + return ReturnCode_NO_IO, true + case 0x0B: + return ReturnCode_UNKNOWN_ADS_COMMAND, true + case 0x0C: + return ReturnCode_WIN32_ERROR, true + case 0x0D: + return ReturnCode_PORT_NOT_CONNECTED, true + case 0x0E: + return ReturnCode_INVALID_ADS_LENGTH, true + case 0x0F: + return ReturnCode_INVALID_AMS_NET_ID, true + case 0x10: + return ReturnCode_LOW_INSTALLATION_LEVEL, true + case 0x1000: + return ReturnCode_RTERR_INTERNAL, true + case 0x1001: + return ReturnCode_RTERR_BADTIMERPERIODS, true + case 0x1002: + return ReturnCode_RTERR_INVALIDTASKPTR, true + case 0x1003: + return ReturnCode_RTERR_INVALIDSTACKPTR, true + case 0x1004: + return ReturnCode_RTERR_PRIOEXISTS, true + case 0x1005: + return ReturnCode_RTERR_NOMORETCB, true + case 0x1006: + return ReturnCode_RTERR_NOMORESEMAS, true + case 0x1007: + return ReturnCode_RTERR_NOMOREQUEUES, true + case 0x100D: + return ReturnCode_RTERR_EXTIRQALREADYDEF, true + case 0x100E: + return ReturnCode_RTERR_EXTIRQNOTDEF, true + case 0x100F: + return ReturnCode_RTERR_EXTIRQINSTALLFAILED, true + case 0x1010: + return ReturnCode_RTERR_IRQLNOTLESSOREQUAL, true + case 0x1017: + return ReturnCode_RTERR_VMXNOTSUPPORTED, true + case 0x1018: + return ReturnCode_RTERR_VMXDISABLED, true + case 0x1019: + return ReturnCode_RTERR_VMXCONTROLSMISSING, true + case 0x101A: + return ReturnCode_RTERR_VMXENABLEFAILS, true + case 0x11: + return ReturnCode_NO_DEBUGGING_AVAILABLE, true + case 0x12: + return ReturnCode_PORT_DEACTIVATED, true + case 0x13: + return ReturnCode_PORT_ALREADY_CONNECTED, true + case 0x14: + return ReturnCode_ADS_SYNC_WIN32_ERROR, true + case 0x15: + return ReturnCode_ADS_SYNC_TIMEOUT, true + case 0x16: + return ReturnCode_ADS_SYNC_AMS_ERROR, true + case 0x17: + return ReturnCode_NO_INDEX_MAP_FOR_ADS_AVAILABLE, true + case 0x18: + return ReturnCode_INVALID_ADS_PORT, true + case 0x19: + return ReturnCode_NO_MEMORY, true + case 0x1A: + return ReturnCode_TCP_SENDING_ERROR, true + case 0x1B: + return ReturnCode_HOST_NOT_REACHABLE, true + case 0x1C: + return ReturnCode_INVALID_AMS_FRAGMENT, true + case 0x274C: + return ReturnCode_WSAETIMEDOUT, true + case 0x274D: + return ReturnCode_WSAECONNREFUSED, true + case 0x2751: + return ReturnCode_WSAEHOSTUNREACH, true + case 0x500: + return ReturnCode_ROUTERERR_NOLOCKEDMEMORY, true + case 0x501: + return ReturnCode_ROUTERERR_RESIZEMEMORY, true + case 0x502: + return ReturnCode_ROUTERERR_MAILBOXFULL, true + case 0x503: + return ReturnCode_ROUTERERR_DEBUGBOXFULL, true + case 0x504: + return ReturnCode_ROUTERERR_UNKNOWNPORTTYPE, true + case 0x505: + return ReturnCode_ROUTERERR_NOTINITIALIZED, true + case 0x506: + return ReturnCode_ROUTERERR_PORTALREADYINUSE, true + case 0x507: + return ReturnCode_ROUTERERR_NOTREGISTERED, true + case 0x508: + return ReturnCode_ROUTERERR_NOMOREQUEUES, true + case 0x509: + return ReturnCode_ROUTERERR_INVALIDPORT, true + case 0x50A: + return ReturnCode_ROUTERERR_NOTACTIVATED, true + case 0x700: + return ReturnCode_ADSERR_DEVICE_ERROR, true + case 0x701: + return ReturnCode_ADSERR_DEVICE_SRVNOTSUPP, true + case 0x702: + return ReturnCode_ADSERR_DEVICE_INVALIDGRP, true + case 0x703: + return ReturnCode_ADSERR_DEVICE_INVALIDOFFSET, true + case 0x704: + return ReturnCode_ADSERR_DEVICE_INVALIDACCESS, true + case 0x705: + return ReturnCode_ADSERR_DEVICE_INVALIDSIZE, true + case 0x706: + return ReturnCode_ADSERR_DEVICE_INVALIDDATA, true + case 0x707: + return ReturnCode_ADSERR_DEVICE_NOTREADY, true + case 0x708: + return ReturnCode_ADSERR_DEVICE_BUSY, true + case 0x709: + return ReturnCode_ADSERR_DEVICE_INVALIDCONTEXT, true + case 0x70A: + return ReturnCode_ADSERR_DEVICE_NOMEMORY, true + case 0x70B: + return ReturnCode_ADSERR_DEVICE_INVALIDPARM, true + case 0x70C: + return ReturnCode_ADSERR_DEVICE_NOTFOUND, true + case 0x70D: + return ReturnCode_ADSERR_DEVICE_SYNTAX, true + case 0x70E: + return ReturnCode_ADSERR_DEVICE_INCOMPATIBLE, true + case 0x70F: + return ReturnCode_ADSERR_DEVICE_EXISTS, true + case 0x710: + return ReturnCode_ADSERR_DEVICE_SYMBOLNOTFOUND, true + case 0x711: + return ReturnCode_ADSERR_DEVICE_SYMBOLVERSIONINVALID, true + case 0x712: + return ReturnCode_ADSERR_DEVICE_INVALIDSTATE, true + case 0x713: + return ReturnCode_ADSERR_DEVICE_TRANSMODENOTSUPP, true + case 0x714: + return ReturnCode_ADSERR_DEVICE_NOTIFYHNDINVALID, true + case 0x715: + return ReturnCode_ADSERR_DEVICE_CLIENTUNKNOWN, true + case 0x716: + return ReturnCode_ADSERR_DEVICE_NOMOREHDLS, true + case 0x717: + return ReturnCode_ADSERR_DEVICE_INVALIDWATCHSIZE, true + case 0x718: + return ReturnCode_ADSERR_DEVICE_NOTINIT, true + case 0x719: + return ReturnCode_ADSERR_DEVICE_TIMEOUT, true + case 0x71A: + return ReturnCode_ADSERR_DEVICE_NOINTERFACE, true + case 0x71B: + return ReturnCode_ADSERR_DEVICE_INVALIDINTERFACE, true + case 0x71C: + return ReturnCode_ADSERR_DEVICE_INVALIDCLSID, true + case 0x71D: + return ReturnCode_ADSERR_DEVICE_INVALIDOBJID, true + case 0x71E: + return ReturnCode_ADSERR_DEVICE_PENDING, true + case 0x71F: + return ReturnCode_ADSERR_DEVICE_ABORTED, true + case 0x720: + return ReturnCode_ADSERR_DEVICE_WARNING, true + case 0x721: + return ReturnCode_ADSERR_DEVICE_INVALIDARRAYIDX, true + case 0x722: + return ReturnCode_ADSERR_DEVICE_SYMBOLNOTACTIVE, true + case 0x723: + return ReturnCode_ADSERR_DEVICE_ACCESSDENIED, true + case 0x724: + return ReturnCode_ADSERR_DEVICE_LICENSENOTFOUND, true + case 0x725: + return ReturnCode_ADSERR_DEVICE_LICENSEEXPIRED, true + case 0x726: + return ReturnCode_ADSERR_DEVICE_LICENSEEXCEEDED, true + case 0x727: + return ReturnCode_ADSERR_DEVICE_LICENSEINVALID, true + case 0x728: + return ReturnCode_ADSERR_DEVICE_LICENSESYSTEMID, true + case 0x729: + return ReturnCode_ADSERR_DEVICE_LICENSENOTIMELIMIT, true + case 0x72A: + return ReturnCode_ADSERR_DEVICE_LICENSEFUTUREISSUE, true + case 0x72B: + return ReturnCode_ADSERR_DEVICE_LICENSETIMETOLONG, true + case 0x72D: + return ReturnCode_ADSERR_DEVICE_LICENSEDUPLICATED, true + case 0x72E: + return ReturnCode_ADSERR_DEVICE_SIGNATUREINVALID, true + case 0x72F: + return ReturnCode_ADSERR_DEVICE_CERTIFICATEINVALID, true + case 0x72c: + return ReturnCode_ADSERR_DEVICE_EXCEPTION, true + case 0x740: + return ReturnCode_ADSERR_CLIENT_ERROR, true + case 0x741: + return ReturnCode_ADSERR_CLIENT_INVALIDPARM, true + case 0x742: + return ReturnCode_ADSERR_CLIENT_LISTEMPTY, true + case 0x743: + return ReturnCode_ADSERR_CLIENT_VARUSED, true + case 0x744: + return ReturnCode_ADSERR_CLIENT_DUPLINVOKEID, true + case 0x745: + return ReturnCode_ADSERR_CLIENT_SYNCTIMEOUT, true + case 0x746: + return ReturnCode_ADSERR_CLIENT_W32ERROR, true + case 0x747: + return ReturnCode_ADSERR_CLIENT_TIMEOUTINVALID, true + case 0x748: + return ReturnCode_ADSERR_CLIENT_PORTNOTOPEN, true + case 0x750: + return ReturnCode_ADSERR_CLIENT_NOAMSADDR, true + case 0x751: + return ReturnCode_ADSERR_CLIENT_SYNCINTERNAL, true + case 0x752: + return ReturnCode_ADSERR_CLIENT_ADDHASH, true + case 0x753: + return ReturnCode_ADSERR_CLIENT_REMOVEHASH, true + case 0x754: + return ReturnCode_ADSERR_CLIENT_NOMORESYM, true + case 0x755: + return ReturnCode_ADSERR_CLIENT_SYNCRESINVALID, true } return 0, false } @@ -789,13 +789,13 @@ func ReturnCodeByName(value string) (enum ReturnCode, ok bool) { return 0, false } -func ReturnCodeKnows(value uint32) bool { +func ReturnCodeKnows(value uint32) bool { for _, typeValue := range ReturnCodeValues { if uint32(typeValue) == value { return true } } - return false + return false; } func CastReturnCode(structType interface{}) ReturnCode { @@ -1099,3 +1099,4 @@ func (e ReturnCode) PLC4XEnumName() string { func (e ReturnCode) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/ads/readwrite/model/plc4x_common.go b/plc4go/protocols/ads/readwrite/model/plc4x_common.go index d2d66e8bdd3..42166d94e68 100644 --- a/plc4go/protocols/ads/readwrite/model/plc4x_common.go +++ b/plc4go/protocols/ads/readwrite/model/plc4x_common.go @@ -15,7 +15,7 @@ * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - */ +*/ package model @@ -25,3 +25,4 @@ import "github.com/rs/zerolog/log" // Plc4xModelLog is the Logger used by the Parse/Serialize methods var Plc4xModelLog = &log.Logger + diff --git a/plc4go/protocols/bacnetip/readwrite/ParserHelper.go b/plc4go/protocols/bacnetip/readwrite/ParserHelper.go index 7cca3ef91b2..be7f6d4588d 100644 --- a/plc4go/protocols/bacnetip/readwrite/ParserHelper.go +++ b/plc4go/protocols/bacnetip/readwrite/ParserHelper.go @@ -39,14 +39,14 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetAuthenticationStatusTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetLiftGroupModeTagged": tagNumber, err := utils.StrToUint8(arguments[0]) if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetLiftGroupModeTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetValueSource": return model.BACnetValueSourceParseWithBuffer(context.Background(), io) @@ -59,7 +59,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util } return model.BACnetOpeningTagParseWithBuffer(context.Background(), io, tagNumberArgument) case "BACnetPriorityArray": - objectTypeArgument, _ := model.BACnetObjectTypeByName(arguments[0]) + objectTypeArgument, _ := model.BACnetObjectTypeByName(arguments[0]) tagNumber, err := utils.StrToUint8(arguments[1]) if err != nil { return nil, errors.Wrap(err, "Error parsing") @@ -73,7 +73,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.SecurityResponseCodeTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetPropertyReferenceEnclosed": tagNumber, err := utils.StrToUint8(arguments[0]) @@ -104,7 +104,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetLoggingTypeTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter": tagNumber, err := utils.StrToUint8(arguments[0]) @@ -125,7 +125,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetEscalatorOperationDirectionTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "NPDUControl": return model.NPDUControlParseWithBuffer(context.Background(), io) @@ -146,7 +146,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetTimerStateTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetDateRangeEnclosed": tagNumber, err := utils.StrToUint8(arguments[0]) @@ -177,42 +177,42 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetObjectTypeTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetDaysOfWeekTagged": tagNumber, err := utils.StrToUint8(arguments[0]) if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetDaysOfWeekTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetReadAccessResultListOfResults": tagNumber, err := utils.StrToUint8(arguments[0]) if err != nil { return nil, errors.Wrap(err, "Error parsing") } - objectTypeArgument, _ := model.BACnetObjectTypeByName(arguments[1]) + objectTypeArgument, _ := model.BACnetObjectTypeByName(arguments[1]) return model.BACnetReadAccessResultListOfResultsParseWithBuffer(context.Background(), io, tagNumber, objectTypeArgument) case "BACnetRouterEntryStatusTagged": tagNumber, err := utils.StrToUint8(arguments[0]) if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetRouterEntryStatusTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetAccessRuleTimeRangeSpecifierTagged": tagNumber, err := utils.StrToUint8(arguments[0]) if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetAccessRuleTimeRangeSpecifierTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetObjectTypesSupportedTagged": tagNumber, err := utils.StrToUint8(arguments[0]) if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetObjectTypesSupportedTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BVLCBroadcastDistributionTableEntry": return model.BVLCBroadcastDistributionTableEntryParseWithBuffer(context.Background(), io) @@ -221,7 +221,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetBackupStateTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues": tagNumber, err := utils.StrToUint8(arguments[0]) @@ -242,7 +242,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetDeviceStatusTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetPrescale": return model.BACnetPrescaleParseWithBuffer(context.Background(), io) @@ -267,7 +267,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetSegmentationTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetSecurityKeySet": return model.BACnetSecurityKeySetParseWithBuffer(context.Background(), io) @@ -284,7 +284,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetPropertyIdentifierTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetRecipientEnclosed": tagNumber, err := utils.StrToUint8(arguments[0]) @@ -315,14 +315,14 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetAccessUserTypeTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetRestartReasonTagged": tagNumber, err := utils.StrToUint8(arguments[0]) if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetRestartReasonTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetTagPayloadBitString": actualLength, err := utils.StrToUint32(arguments[0]) @@ -345,14 +345,14 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetEscalatorFaultTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetEventStateTagged": tagNumber, err := utils.StrToUint8(arguments[0]) if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetEventStateTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetTagHeader": return model.BACnetTagHeaderParseWithBuffer(context.Background(), io) @@ -367,7 +367,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetFaultTypeTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "VTCloseErrorListOfVTSessionIdentifiers": tagNumber, err := utils.StrToUint8(arguments[0]) @@ -382,7 +382,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetIPModeTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetAccumulatorRecord": return model.BACnetAccumulatorRecordParseWithBuffer(context.Background(), io) @@ -399,7 +399,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetEngineeringUnitsTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "ListOfCovNotifications": return model.ListOfCovNotificationsParseWithBuffer(context.Background(), io) @@ -432,21 +432,21 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetProgramStateTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetDoorSecuredStatusTagged": tagNumber, err := utils.StrToUint8(arguments[0]) if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetDoorSecuredStatusTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "ErrorClassTagged": tagNumber, err := utils.StrToUint8(arguments[0]) if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.ErrorClassTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetSpecialEventListOfTimeValues": tagNumber, err := utils.StrToUint8(arguments[0]) @@ -465,7 +465,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetAccessRuleLocationSpecifierTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry": return model.BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntryParseWithBuffer(context.Background(), io) @@ -476,7 +476,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetMaintenanceTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetNotificationParametersChangeOfDiscreteValueNewValue": tagNumber, err := utils.StrToUint8(arguments[0]) @@ -485,8 +485,8 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util } return model.BACnetNotificationParametersChangeOfDiscreteValueNewValueParseWithBuffer(context.Background(), io, tagNumber) case "BACnetReadAccessPropertyReadResult": - objectTypeArgument, _ := model.BACnetObjectTypeByName(arguments[0]) - propertyIdentifierArgument, _ := model.BACnetPropertyIdentifierByName(arguments[1]) + objectTypeArgument, _ := model.BACnetObjectTypeByName(arguments[0]) + propertyIdentifierArgument, _ := model.BACnetPropertyIdentifierByName(arguments[1]) var arrayIndexArgument model.BACnetTagPayloadUnsignedInteger return model.BACnetReadAccessPropertyReadResultParseWithBuffer(context.Background(), io, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) case "BACnetActionCommand": @@ -500,7 +500,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetEventParameterExtendedParameters": tagNumber, err := utils.StrToUint8(arguments[0]) @@ -515,28 +515,28 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util } return model.BACnetEventParameterAccessEventListOfAccessEventsParseWithBuffer(context.Background(), io, tagNumber) case "BACnetReadAccessProperty": - objectTypeArgument, _ := model.BACnetObjectTypeByName(arguments[0]) + objectTypeArgument, _ := model.BACnetObjectTypeByName(arguments[0]) return model.BACnetReadAccessPropertyParseWithBuffer(context.Background(), io, objectTypeArgument) case "BACnetLifeSafetyOperationTagged": tagNumber, err := utils.StrToUint8(arguments[0]) if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetLifeSafetyOperationTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetWeekNDayTagged": tagNumber, err := utils.StrToUint8(arguments[0]) if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetWeekNDayTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetEventTransitionBitsTagged": tagNumber, err := utils.StrToUint8(arguments[0]) if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetEventTransitionBitsTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetLogData": tagNumber, err := utils.StrToUint8(arguments[0]) @@ -555,7 +555,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetLockStatusTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetDeviceObjectPropertyReferenceEnclosed": tagNumber, err := utils.StrToUint8(arguments[0]) @@ -572,28 +572,28 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetResultFlagsTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetAccessCredentialDisableReasonTagged": tagNumber, err := utils.StrToUint8(arguments[0]) if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetAccessCredentialDisableReasonTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetLightingInProgressTagged": tagNumber, err := utils.StrToUint8(arguments[0]) if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetLightingInProgressTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetLifeSafetyStateTagged": tagNumber, err := utils.StrToUint8(arguments[0]) if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetLifeSafetyStateTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetVTSession": return model.BACnetVTSessionParseWithBuffer(context.Background(), io) @@ -608,7 +608,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetSecurityLevelTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetLogRecordLogDatum": tagNumber, err := utils.StrToUint8(arguments[0]) @@ -627,7 +627,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetTimerTransitionTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetLogMultipleRecord": return model.BACnetLogMultipleRecordParseWithBuffer(context.Background(), io) @@ -636,14 +636,14 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetProgramRequestTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged": tagNumber, err := utils.StrToUint8(arguments[0]) if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetDateRange": return model.BACnetDateRangeParseWithBuffer(context.Background(), io) @@ -654,7 +654,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetLiftFaultTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetPropertyStatesEnclosed": tagNumber, err := utils.StrToUint8(arguments[0]) @@ -673,7 +673,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetFileAccessMethodTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetTagPayloadCharacterString": actualLength, err := utils.StrToUint32(arguments[0]) @@ -692,14 +692,14 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetStatusFlagsTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetNodeTypeTagged": tagNumber, err := utils.StrToUint8(arguments[0]) if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetNodeTypeTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetOptionalCharacterString": return model.BACnetOptionalCharacterStringParseWithBuffer(context.Background(), io) @@ -728,14 +728,14 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetActionTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetCredentialAuthenticationFactor": return model.BACnetCredentialAuthenticationFactorParseWithBuffer(context.Background(), io) case "BACnetAssignedLandingCallsLandingCallsListEntry": return model.BACnetAssignedLandingCallsLandingCallsListEntryParseWithBuffer(context.Background(), io) case "BACnetPropertyValue": - objectTypeArgument, _ := model.BACnetObjectTypeByName(arguments[0]) + objectTypeArgument, _ := model.BACnetObjectTypeByName(arguments[0]) return model.BACnetPropertyValueParseWithBuffer(context.Background(), io, objectTypeArgument) case "BACnetCOVSubscription": return model.BACnetCOVSubscriptionParseWithBuffer(context.Background(), io) @@ -750,7 +750,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetRelationshipTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "NLMInitalizeRoutingTablePortMapping": return model.NLMInitalizeRoutingTablePortMappingParseWithBuffer(context.Background(), io) @@ -769,14 +769,14 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetShedStateTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetAccessEventTagged": tagNumber, err := utils.StrToUint8(arguments[0]) if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetAccessEventTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetServiceAck": serviceAckLength, err := utils.StrToUint32(arguments[0]) @@ -789,7 +789,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetAccessCredentialDisableTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetLiftCarCallList": return model.BACnetLiftCarCallListParseWithBuffer(context.Background(), io) @@ -798,7 +798,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetLightingTransitionTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "NLMUpdateKeyUpdateControlFlags": return model.NLMUpdateKeyUpdateControlFlagsParseWithBuffer(context.Background(), io) @@ -809,14 +809,14 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetNotifyTypeTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetAuthorizationExemptionTagged": tagNumber, err := utils.StrToUint8(arguments[0]) if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetAuthorizationExemptionTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetLandingDoorStatusLandingDoorsList": tagNumber, err := utils.StrToUint8(arguments[0]) @@ -829,49 +829,49 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetAuthenticationFactorTypeTagged": tagNumber, err := utils.StrToUint8(arguments[0]) if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetAuthenticationFactorTypeTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetAccessAuthenticationFactorDisableTagged": tagNumber, err := utils.StrToUint8(arguments[0]) if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetAccessAuthenticationFactorDisableTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetAuthorizationModeTagged": tagNumber, err := utils.StrToUint8(arguments[0]) if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetAuthorizationModeTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged": tagNumber, err := utils.StrToUint8(arguments[0]) if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetDoorStatusTagged": tagNumber, err := utils.StrToUint8(arguments[0]) if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetDoorStatusTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetVendorIdTagged": tagNumber, err := utils.StrToUint8(arguments[0]) if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetVendorIdTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetEventTimestamps": return model.BACnetEventTimestampsParseWithBuffer(context.Background(), io) @@ -892,28 +892,28 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetLimitEnableTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetDoorAlarmStateTagged": tagNumber, err := utils.StrToUint8(arguments[0]) if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetDoorAlarmStateTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetServicesSupportedTagged": tagNumber, err := utils.StrToUint8(arguments[0]) if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetServicesSupportedTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetWriteStatusTagged": tagNumber, err := utils.StrToUint8(arguments[0]) if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetWriteStatusTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetRecipientProcess": return model.BACnetRecipientProcessParseWithBuffer(context.Background(), io) @@ -948,7 +948,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetLiftCarDriveStatusTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetUnconfirmedServiceRequestWhoHasObject": return model.BACnetUnconfirmedServiceRequestWhoHasObjectParseWithBuffer(context.Background(), io) @@ -963,7 +963,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetSecurityPolicyTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord": return model.BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecordParseWithBuffer(context.Background(), io) @@ -978,7 +978,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetLiftCarDirectionTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass": tagNumber, err := utils.StrToUint8(arguments[0]) @@ -991,7 +991,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util case "BACnetLandingCallStatusCommand": return model.BACnetLandingCallStatusCommandParseWithBuffer(context.Background(), io) case "ListOfCovNotificationsValue": - objectTypeArgument, _ := model.BACnetObjectTypeByName(arguments[0]) + objectTypeArgument, _ := model.BACnetObjectTypeByName(arguments[0]) return model.ListOfCovNotificationsValueParseWithBuffer(context.Background(), io, objectTypeArgument) case "BACnetLandingCallStatus": return model.BACnetLandingCallStatusParseWithBuffer(context.Background(), io) @@ -1006,7 +1006,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util case "BACnetConfirmedServiceRequestReadRangeRange": return model.BACnetConfirmedServiceRequestReadRangeRangeParseWithBuffer(context.Background(), io) case "BACnetError": - errorChoice, _ := model.BACnetConfirmedServiceChoiceByName(arguments[0]) + errorChoice, _ := model.BACnetConfirmedServiceChoiceByName(arguments[0]) return model.BACnetErrorParseWithBuffer(context.Background(), io, errorChoice) case "BACnetDeviceObjectReferenceEnclosed": tagNumber, err := utils.StrToUint8(arguments[0]) @@ -1035,7 +1035,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetVTClassTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetDeviceObjectPropertyReference": return model.BACnetDeviceObjectPropertyReferenceParseWithBuffer(context.Background(), io) @@ -1044,7 +1044,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetProcessIdSelection": return model.BACnetProcessIdSelectionParseWithBuffer(context.Background(), io) @@ -1061,10 +1061,10 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetAccumulatorRecordAccumulatorStatusTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetTimerStateChangeValue": - objectTypeArgument, _ := model.BACnetObjectTypeByName(arguments[0]) + objectTypeArgument, _ := model.BACnetObjectTypeByName(arguments[0]) return model.BACnetTimerStateChangeValueParseWithBuffer(context.Background(), io, objectTypeArgument) case "BACnetSpecialEventPeriod": return model.BACnetSpecialEventPeriodParseWithBuffer(context.Background(), io) @@ -1075,14 +1075,14 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetNetworkNumberQualityTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetLogStatusTagged": tagNumber, err := utils.StrToUint8(arguments[0]) if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetLogStatusTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetAbortReasonTagged": actualLength, err := utils.StrToUint32(arguments[0]) @@ -1095,7 +1095,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetProgramErrorTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "Error": return model.ErrorParseWithBuffer(context.Background(), io) @@ -1106,21 +1106,21 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - dataType, _ := model.BACnetDataTypeByName(arguments[1]) + dataType, _ := model.BACnetDataTypeByName(arguments[1]) return model.BACnetContextTagParseWithBuffer(context.Background(), io, tagNumberArgument, dataType) case "BACnetUnconfirmedServiceChoiceTagged": tagNumber, err := utils.StrToUint8(arguments[0]) if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetUnconfirmedServiceChoiceTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BVLCResultCodeTagged": tagNumber, err := utils.StrToUint8(arguments[0]) if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BVLCResultCodeTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetFaultParameter": return model.BACnetFaultParameterParseWithBuffer(context.Background(), io) @@ -1131,7 +1131,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util } return model.BACnetEventParameterChangeOfValueCivCriteriaParseWithBuffer(context.Background(), io, tagNumber) case "BACnetPriorityValue": - objectTypeArgument, _ := model.BACnetObjectTypeByName(arguments[0]) + objectTypeArgument, _ := model.BACnetObjectTypeByName(arguments[0]) return model.BACnetPriorityValueParseWithBuffer(context.Background(), io, objectTypeArgument) case "BACnetLogRecord": return model.BACnetLogRecordParseWithBuffer(context.Background(), io) @@ -1142,7 +1142,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetAccessPassbackModeTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetDeviceObjectReference": return model.BACnetDeviceObjectReferenceParseWithBuffer(context.Background(), io) @@ -1161,21 +1161,21 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.NPDUNetworkPriorityTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetReliabilityTagged": tagNumber, err := utils.StrToUint8(arguments[0]) if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetReliabilityTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetDoorValueTagged": tagNumber, err := utils.StrToUint8(arguments[0]) if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetDoorValueTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetScale": return model.BACnetScaleParseWithBuffer(context.Background(), io) @@ -1190,7 +1190,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.ErrorCodeTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BacnetConstants": return model.BacnetConstantsParseWithBuffer(context.Background(), io) @@ -1199,7 +1199,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetPolarityTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetServiceAckAtomicReadFileStreamOrRecord": return model.BACnetServiceAckAtomicReadFileStreamOrRecordParseWithBuffer(context.Background(), io) @@ -1210,8 +1210,8 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - objectTypeArgument, _ := model.BACnetObjectTypeByName(arguments[1]) - propertyIdentifierArgument, _ := model.BACnetPropertyIdentifierByName(arguments[2]) + objectTypeArgument, _ := model.BACnetObjectTypeByName(arguments[1]) + propertyIdentifierArgument, _ := model.BACnetPropertyIdentifierByName(arguments[2]) var arrayIndexArgument model.BACnetTagPayloadUnsignedInteger return model.BACnetConstructedDataParseWithBuffer(context.Background(), io, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) case "BACnetEventTypeTagged": @@ -1219,7 +1219,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetEventTypeTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetObjectPropertyReference": return model.BACnetObjectPropertyReferenceParseWithBuffer(context.Background(), io) @@ -1228,7 +1228,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetBinaryLightingPVTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetOptionalREAL": return model.BACnetOptionalREALParseWithBuffer(context.Background(), io) @@ -1247,11 +1247,11 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetAccessZoneOccupancyStateTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetPropertyAccessResultAccessResult": - objectTypeArgument, _ := model.BACnetObjectTypeByName(arguments[0]) - propertyIdentifierArgument, _ := model.BACnetPropertyIdentifierByName(arguments[1]) + objectTypeArgument, _ := model.BACnetObjectTypeByName(arguments[0]) + propertyIdentifierArgument, _ := model.BACnetPropertyIdentifierByName(arguments[1]) var propertyArrayIndexArgument model.BACnetTagPayloadUnsignedInteger return model.BACnetPropertyAccessResultAccessResultParseWithBuffer(context.Background(), io, objectTypeArgument, propertyIdentifierArgument, propertyArrayIndexArgument) case "BACnetNetworkPortCommandTagged": @@ -1259,7 +1259,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetNetworkPortCommandTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetGroupChannelValue": return model.BACnetGroupChannelValueParseWithBuffer(context.Background(), io) @@ -1274,12 +1274,12 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetEscalatorModeTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetTagPayloadObjectIdentifier": return model.BACnetTagPayloadObjectIdentifierParseWithBuffer(context.Background(), io) case "BACnetPropertyWriteDefinition": - objectTypeArgument, _ := model.BACnetObjectTypeByName(arguments[0]) + objectTypeArgument, _ := model.BACnetObjectTypeByName(arguments[0]) return model.BACnetPropertyWriteDefinitionParseWithBuffer(context.Background(), io, objectTypeArgument) case "BACnetEventLogRecord": return model.BACnetEventLogRecordParseWithBuffer(context.Background(), io) @@ -1288,7 +1288,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetBinaryPVTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetEventPriorities": tagNumber, err := utils.StrToUint8(arguments[0]) @@ -1303,7 +1303,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetLightingOperationTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetFaultParameterFaultOutOfRangeMinNormalValue": tagNumber, err := utils.StrToUint8(arguments[0]) @@ -1332,7 +1332,7 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - objectTypeArgument, _ := model.BACnetObjectTypeByName(arguments[1]) + objectTypeArgument, _ := model.BACnetObjectTypeByName(arguments[1]) return model.BACnetNotificationParametersParseWithBuffer(context.Background(), io, tagNumber, objectTypeArgument) case "BACnetClosingTag": tagNumberArgument, err := utils.StrToUint8(arguments[0]) @@ -1359,11 +1359,11 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetNetworkTypeTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetConstructedDataElement": - objectTypeArgument, _ := model.BACnetObjectTypeByName(arguments[0]) - propertyIdentifierArgument, _ := model.BACnetPropertyIdentifierByName(arguments[1]) + objectTypeArgument, _ := model.BACnetObjectTypeByName(arguments[0]) + propertyIdentifierArgument, _ := model.BACnetPropertyIdentifierByName(arguments[1]) var arrayIndexArgument model.BACnetTagPayloadUnsignedInteger return model.BACnetConstructedDataElementParseWithBuffer(context.Background(), io, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) case "BACnetPropertyValues": @@ -1371,14 +1371,14 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - objectTypeArgument, _ := model.BACnetObjectTypeByName(arguments[1]) + objectTypeArgument, _ := model.BACnetObjectTypeByName(arguments[1]) return model.BACnetPropertyValuesParseWithBuffer(context.Background(), io, tagNumber, objectTypeArgument) case "BACnetProtocolLevelTagged": tagNumber, err := utils.StrToUint8(arguments[0]) if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetProtocolLevelTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetCOVMultipleSubscription": return model.BACnetCOVMultipleSubscriptionParseWithBuffer(context.Background(), io) @@ -1407,28 +1407,28 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetLiftCarDoorCommandTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetLiftCarModeTagged": tagNumber, err := utils.StrToUint8(arguments[0]) if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetLiftCarModeTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetSilencedStateTagged": tagNumber, err := utils.StrToUint8(arguments[0]) if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetSilencedStateTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) case "BACnetLifeSafetyModeTagged": tagNumber, err := utils.StrToUint8(arguments[0]) if err != nil { return nil, errors.Wrap(err, "Error parsing") } - tagClass, _ := model.TagClassByName(arguments[1]) + tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetLifeSafetyModeTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) } return nil, errors.Errorf("Unsupported type %s", typeName) diff --git a/plc4go/protocols/bacnetip/readwrite/XmlParserHelper.go b/plc4go/protocols/bacnetip/readwrite/XmlParserHelper.go index 074930b5ff3..6bdc2dd022c 100644 --- a/plc4go/protocols/bacnetip/readwrite/XmlParserHelper.go +++ b/plc4go/protocols/bacnetip/readwrite/XmlParserHelper.go @@ -21,8 +21,8 @@ package readwrite import ( "context" - "strconv" "strings" + "strconv" "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" "github.com/apache/plc4x/plc4go/spi/utils" @@ -43,1583 +43,1583 @@ func init() { } func (m BacnetipXmlParserHelper) Parse(typeName string, xmlString string, parserArguments ...string) (interface{}, error) { - switch typeName { - case "BACnetAuthenticationStatusTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetAuthenticationStatusTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetLiftGroupModeTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetLiftGroupModeTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetValueSource": - return model.BACnetValueSourceParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "NLMUpdateKeyUpdateKeyEntry": - return model.NLMUpdateKeyUpdateKeyEntryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetOpeningTag": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumberArgument := uint8(parsedUint0) - return model.BACnetOpeningTagParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumberArgument) - case "BACnetPriorityArray": - objectTypeArgument, _ := model.BACnetObjectTypeByName(parserArguments[0]) - parsedUint1, err := strconv.ParseUint(parserArguments[1], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint1) - // TODO: find a way to parse the sub types - var arrayIndexArgument model.BACnetTagPayloadUnsignedInteger - return model.BACnetPriorityArrayParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), objectTypeArgument, tagNumber, arrayIndexArgument) - case "BACnetNameValue": - return model.BACnetNameValueParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "SecurityResponseCodeTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.SecurityResponseCodeTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetPropertyReferenceEnclosed": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetPropertyReferenceEnclosedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetSpecialEvent": - return model.BACnetSpecialEventParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetRouterEntry": - return model.BACnetRouterEntryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetTagPayloadReal": - return model.BACnetTagPayloadRealParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetFaultParameterFaultExtendedParameters": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetFaultParameterFaultExtendedParametersParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetNotificationParametersExtendedParameters": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetNotificationParametersExtendedParametersParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetLoggingTypeTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetLoggingTypeTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilterParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetTimeValue": - return model.BACnetTimeValueParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetTagPayloadOctetString": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 32) - if err != nil { - return nil, err - } - actualLength := uint32(parsedUint0) - return model.BACnetTagPayloadOctetStringParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), actualLength) - case "BACnetEscalatorOperationDirectionTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetEscalatorOperationDirectionTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "NPDUControl": - return model.NPDUControlParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetFaultParameterFaultStateListOfFaultValues": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetFaultParameterFaultStateListOfFaultValuesParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetTimeStampEnclosed": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetTimeStampEnclosedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetTimerStateTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetTimerStateTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetDateRangeEnclosed": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetDateRangeEnclosedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetEventParameterChangeOfTimerAlarmValue": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetEventParameterChangeOfTimerAlarmValueParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetUnconfirmedServiceRequest": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 16) - if err != nil { - return nil, err - } - serviceRequestLength := uint16(parsedUint0) - return model.BACnetUnconfirmedServiceRequestParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), serviceRequestLength) - case "BACnetAddressEnclosed": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetAddressEnclosedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetObjectTypeTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetObjectTypeTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetDaysOfWeekTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetDaysOfWeekTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetReadAccessResultListOfResults": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - objectTypeArgument, _ := model.BACnetObjectTypeByName(parserArguments[1]) - return model.BACnetReadAccessResultListOfResultsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, objectTypeArgument) - case "BACnetRouterEntryStatusTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetRouterEntryStatusTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetAccessRuleTimeRangeSpecifierTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetAccessRuleTimeRangeSpecifierTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetObjectTypesSupportedTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetObjectTypesSupportedTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BVLCBroadcastDistributionTableEntry": - return model.BVLCBroadcastDistributionTableEntryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetBackupStateTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetBackupStateTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValuesParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetDestination": - return model.BACnetDestinationParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetDeviceStatusTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetDeviceStatusTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetPrescale": - return model.BACnetPrescaleParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "ErrorEnclosed": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.ErrorEnclosedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetAuthenticationPolicyListEntry": - return model.BACnetAuthenticationPolicyListEntryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "APDU": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 16) - if err != nil { - return nil, err - } - apduLength := uint16(parsedUint0) - return model.APDUParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), apduLength) - case "BACnetEventNotificationSubscription": - return model.BACnetEventNotificationSubscriptionParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetSegmentationTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetSegmentationTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetSecurityKeySet": - return model.BACnetSecurityKeySetParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetNetworkSecurityPolicy": - return model.BACnetNetworkSecurityPolicyParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetHostNPortEnclosed": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetHostNPortEnclosedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetPropertyIdentifierTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetPropertyIdentifierTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetRecipientEnclosed": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetRecipientEnclosedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetConfirmedServiceRequest": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 32) - if err != nil { - return nil, err - } - serviceRequestLength := uint32(parsedUint0) - return model.BACnetConfirmedServiceRequestParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), serviceRequestLength) - case "BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetTagPayloadUnsignedInteger": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 32) - if err != nil { - return nil, err - } - actualLength := uint32(parsedUint0) - return model.BACnetTagPayloadUnsignedIntegerParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), actualLength) - case "BACnetAccessUserTypeTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetAccessUserTypeTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetRestartReasonTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetRestartReasonTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetTagPayloadBitString": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 32) - if err != nil { - return nil, err - } - actualLength := uint32(parsedUint0) - return model.BACnetTagPayloadBitStringParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), actualLength) - case "BACnetClientCOV": - return model.BACnetClientCOVParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetSetpointReference": - return model.BACnetSetpointReferenceParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetObjectPropertyReferenceEnclosed": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetObjectPropertyReferenceEnclosedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetEscalatorFaultTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetEscalatorFaultTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetEventStateTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetEventStateTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetTagHeader": - return model.BACnetTagHeaderParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetTagPayloadBoolean": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 32) - if err != nil { - return nil, err - } - actualLength := uint32(parsedUint0) - return model.BACnetTagPayloadBooleanParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), actualLength) - case "BACnetFaultTypeTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetFaultTypeTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "VTCloseErrorListOfVTSessionIdentifiers": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.VTCloseErrorListOfVTSessionIdentifiersParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications": - return model.BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetIPModeTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetIPModeTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetAccumulatorRecord": - return model.BACnetAccumulatorRecordParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetDailySchedule": - return model.BACnetDailyScheduleParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetLogDataLogDataEntry": - return model.BACnetLogDataLogDataEntryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetOptionalBinaryPV": - return model.BACnetOptionalBinaryPVParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetBDTEntry": - return model.BACnetBDTEntryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetEngineeringUnitsTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetEngineeringUnitsTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "ListOfCovNotifications": - return model.ListOfCovNotificationsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetAssignedAccessRights": - return model.BACnetAssignedAccessRightsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetConfirmedServiceRequestCreateObjectObjectSpecifier": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetConfirmedServiceRequestCreateObjectObjectSpecifierParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetAuthenticationPolicy": - return model.BACnetAuthenticationPolicyParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetPropertyAccessResult": - return model.BACnetPropertyAccessResultParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsList": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsListParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "NPDU": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 16) - if err != nil { - return nil, err - } - npduLength := uint16(parsedUint0) - return model.NPDUParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), npduLength) - case "BACnetProgramStateTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetProgramStateTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetDoorSecuredStatusTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetDoorSecuredStatusTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "ErrorClassTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.ErrorClassTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetSpecialEventListOfTimeValues": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetSpecialEventListOfTimeValuesParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetFaultParameterFaultOutOfRangeMaxNormalValue": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetFaultParameterFaultOutOfRangeMaxNormalValueParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetAccessRuleLocationSpecifierTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetAccessRuleLocationSpecifierTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry": - return model.BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetAuthenticationFactorFormat": - return model.BACnetAuthenticationFactorFormatParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetMaintenanceTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetMaintenanceTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetNotificationParametersChangeOfDiscreteValueNewValue": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetNotificationParametersChangeOfDiscreteValueNewValueParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetReadAccessPropertyReadResult": - objectTypeArgument, _ := model.BACnetObjectTypeByName(parserArguments[0]) - propertyIdentifierArgument, _ := model.BACnetPropertyIdentifierByName(parserArguments[1]) - // TODO: find a way to parse the sub types - var arrayIndexArgument model.BACnetTagPayloadUnsignedInteger - return model.BACnetReadAccessPropertyReadResultParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case "BACnetActionCommand": - return model.BACnetActionCommandParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetFaultParameterFaultExtendedParametersEntry": - return model.BACnetFaultParameterFaultExtendedParametersEntryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetTagPayloadDate": - return model.BACnetTagPayloadDateParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetEventParameterExtendedParameters": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetEventParameterExtendedParametersParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetEventParameterAccessEventListOfAccessEvents": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetEventParameterAccessEventListOfAccessEventsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetReadAccessProperty": - objectTypeArgument, _ := model.BACnetObjectTypeByName(parserArguments[0]) - return model.BACnetReadAccessPropertyParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), objectTypeArgument) - case "BACnetLifeSafetyOperationTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetLifeSafetyOperationTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetWeekNDayTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetWeekNDayTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetEventTransitionBitsTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetEventTransitionBitsTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetLogData": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetLogDataParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetFaultParameterFaultCharacterStringListOfFaultValues": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetFaultParameterFaultCharacterStringListOfFaultValuesParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetLockStatusTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetLockStatusTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetDeviceObjectPropertyReferenceEnclosed": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetDeviceObjectPropertyReferenceEnclosedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetPropertyStates": - return model.BACnetPropertyStatesParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetReadAccessResult": - return model.BACnetReadAccessResultParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetResultFlagsTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetResultFlagsTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetAccessCredentialDisableReasonTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetAccessCredentialDisableReasonTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetLightingInProgressTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetLightingInProgressTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetLifeSafetyStateTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetLifeSafetyStateTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetVTSession": - return model.BACnetVTSessionParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetEventTimestampsEnclosed": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetEventTimestampsEnclosedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetSecurityLevelTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetSecurityLevelTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetLogRecordLogDatum": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetLogRecordLogDatumParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetDateTimeEnclosed": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetDateTimeEnclosedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetTimerTransitionTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetTimerTransitionTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetLogMultipleRecord": - return model.BACnetLogMultipleRecordParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetProgramRequestTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetProgramRequestTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetDateRange": - return model.BACnetDateRangeParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetEventParameter": - return model.BACnetEventParameterParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetLiftFaultTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetLiftFaultTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetPropertyStatesEnclosed": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetPropertyStatesEnclosedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetGroupChannelValueList": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetGroupChannelValueListParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetFileAccessMethodTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetFileAccessMethodTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetTagPayloadCharacterString": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 32) - if err != nil { - return nil, err - } - actualLength := uint32(parsedUint0) - return model.BACnetTagPayloadCharacterStringParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), actualLength) - case "BACnetEventLogRecordLogDatum": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetEventLogRecordLogDatumParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetStatusFlagsTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetStatusFlagsTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetNodeTypeTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetNodeTypeTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetOptionalCharacterString": - return model.BACnetOptionalCharacterStringParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetAddress": - return model.BACnetAddressParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetEventParameterChangeOfLifeSavetyListOfAlarmValues": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetEventParameterChangeOfLifeSavetyListOfAlarmValuesParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReference": - return model.BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReferenceParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetApplicationTag": - return model.BACnetApplicationTagParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetEventParameterChangeOfBitstringListOfBitstringValues": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetEventParameterChangeOfBitstringListOfBitstringValuesParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetShedLevel": - return model.BACnetShedLevelParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetActionTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetActionTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetCredentialAuthenticationFactor": - return model.BACnetCredentialAuthenticationFactorParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetAssignedLandingCallsLandingCallsListEntry": - return model.BACnetAssignedLandingCallsLandingCallsListEntryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetPropertyValue": - objectTypeArgument, _ := model.BACnetObjectTypeByName(parserArguments[0]) - return model.BACnetPropertyValueParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), objectTypeArgument) - case "BACnetCOVSubscription": - return model.BACnetCOVSubscriptionParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetFaultParameterFaultLifeSafetyListOfFaultValues": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetFaultParameterFaultLifeSafetyListOfFaultValuesParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetRelationshipTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetRelationshipTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "NLMInitalizeRoutingTablePortMapping": - return model.NLMInitalizeRoutingTablePortMappingParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetRecipientProcessEnclosed": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetRecipientProcessEnclosedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetAccessRule": - return model.BACnetAccessRuleParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetHostNPort": - return model.BACnetHostNPortParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetShedStateTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetShedStateTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetAccessEventTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetAccessEventTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetServiceAck": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 32) - if err != nil { - return nil, err - } - serviceAckLength := uint32(parsedUint0) - return model.BACnetServiceAckParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), serviceAckLength) - case "BACnetAccessCredentialDisableTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetAccessCredentialDisableTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetLiftCarCallList": - return model.BACnetLiftCarCallListParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetLightingTransitionTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetLightingTransitionTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "NLMUpdateKeyUpdateControlFlags": - return model.NLMUpdateKeyUpdateControlFlagsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetAssignedLandingCalls": - return model.BACnetAssignedLandingCallsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetNotifyTypeTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetNotifyTypeTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetAuthorizationExemptionTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetAuthorizationExemptionTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetLandingDoorStatusLandingDoorsList": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetLandingDoorStatusLandingDoorsListParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetAuthenticationFactorTypeTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetAuthenticationFactorTypeTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetAccessAuthenticationFactorDisableTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetAccessAuthenticationFactorDisableTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetAuthorizationModeTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetAuthorizationModeTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetDoorStatusTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetDoorStatusTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetVendorIdTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetVendorIdTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetEventTimestamps": - return model.BACnetEventTimestampsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetNameValueCollection": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetNameValueCollectionParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetTagPayloadEnumerated": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 32) - if err != nil { - return nil, err - } - actualLength := uint32(parsedUint0) - return model.BACnetTagPayloadEnumeratedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), actualLength) - case "BACnetLimitEnableTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetLimitEnableTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetDoorAlarmStateTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetDoorAlarmStateTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetServicesSupportedTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetServicesSupportedTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetWriteStatusTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetWriteStatusTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetRecipientProcess": - return model.BACnetRecipientProcessParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetReadAccessSpecification": - return model.BACnetReadAccessSpecificationParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetAuthenticationPolicyList": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetAuthenticationPolicyListParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetLandingDoorStatus": - return model.BACnetLandingDoorStatusParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetLiftCarCallListFloorList": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetLiftCarCallListFloorListParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetAccessThreatLevel": - return model.BACnetAccessThreatLevelParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetCalendarEntryEnclosed": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetCalendarEntryEnclosedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetRecipient": - return model.BACnetRecipientParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetLiftCarDriveStatusTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetLiftCarDriveStatusTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetUnconfirmedServiceRequestWhoHasObject": - return model.BACnetUnconfirmedServiceRequestWhoHasObjectParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetTagPayloadSignedInteger": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 32) - if err != nil { - return nil, err - } - actualLength := uint32(parsedUint0) - return model.BACnetTagPayloadSignedIntegerParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), actualLength) - case "BACnetSecurityPolicyTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetSecurityPolicyTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord": - return model.BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecordParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BVLC": - return model.BVLCParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "ConfirmedEventNotificationRequest": - return model.ConfirmedEventNotificationRequestParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetLandingDoorStatusLandingDoorsListEntry": - return model.BACnetLandingDoorStatusLandingDoorsListEntryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetLiftCarDirectionTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetLiftCarDirectionTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetAddressBinding": - return model.BACnetAddressBindingParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetLandingCallStatusCommand": - return model.BACnetLandingCallStatusCommandParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "ListOfCovNotificationsValue": - objectTypeArgument, _ := model.BACnetObjectTypeByName(parserArguments[0]) - return model.ListOfCovNotificationsValueParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), objectTypeArgument) - case "BACnetLandingCallStatus": - return model.BACnetLandingCallStatusParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetEventParameterChangeOfStateListOfValues": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetEventParameterChangeOfStateListOfValuesParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetPortPermission": - return model.BACnetPortPermissionParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetConfirmedServiceRequestReadRangeRange": - return model.BACnetConfirmedServiceRequestReadRangeRangeParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetError": - errorChoice, _ := model.BACnetConfirmedServiceChoiceByName(parserArguments[0]) - return model.BACnetErrorParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), errorChoice) - case "BACnetDeviceObjectReferenceEnclosed": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetDeviceObjectReferenceEnclosedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetOptionalUnsigned": - return model.BACnetOptionalUnsignedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetHostAddress": - return model.BACnetHostAddressParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "ListOfCovNotificationsList": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.ListOfCovNotificationsListParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetEventSummariesList": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetEventSummariesListParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetVTClassTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetVTClassTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetDeviceObjectPropertyReference": - return model.BACnetDeviceObjectPropertyReferenceParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetProcessIdSelection": - return model.BACnetProcessIdSelectionParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetAssignedLandingCallsLandingCallsList": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetAssignedLandingCallsLandingCallsListParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetTagPayloadDouble": - return model.BACnetTagPayloadDoubleParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetAccumulatorRecordAccumulatorStatusTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetAccumulatorRecordAccumulatorStatusTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetTimerStateChangeValue": - objectTypeArgument, _ := model.BACnetObjectTypeByName(parserArguments[0]) - return model.BACnetTimerStateChangeValueParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), objectTypeArgument) - case "BACnetSpecialEventPeriod": - return model.BACnetSpecialEventPeriodParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetKeyIdentifier": - return model.BACnetKeyIdentifierParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetNetworkNumberQualityTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetNetworkNumberQualityTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetLogStatusTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetLogStatusTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetAbortReasonTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 32) - if err != nil { - return nil, err - } - actualLength := uint32(parsedUint0) - return model.BACnetAbortReasonTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), actualLength) - case "BACnetProgramErrorTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetProgramErrorTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "Error": - return model.ErrorParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetPropertyReference": - return model.BACnetPropertyReferenceParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetContextTag": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumberArgument := uint8(parsedUint0) - dataType, _ := model.BACnetDataTypeByName(parserArguments[1]) - return model.BACnetContextTagParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumberArgument, dataType) - case "BACnetUnconfirmedServiceChoiceTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetUnconfirmedServiceChoiceTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BVLCResultCodeTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BVLCResultCodeTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetFaultParameter": - return model.BACnetFaultParameterParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetEventParameterChangeOfValueCivCriteria": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetEventParameterChangeOfValueCivCriteriaParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetPriorityValue": - objectTypeArgument, _ := model.BACnetObjectTypeByName(parserArguments[0]) - return model.BACnetPriorityValueParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), objectTypeArgument) - case "BACnetLogRecord": - return model.BACnetLogRecordParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetCalendarEntry": - return model.BACnetCalendarEntryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetAccessPassbackModeTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetAccessPassbackModeTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetDeviceObjectReference": - return model.BACnetDeviceObjectReferenceParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BVLCForeignDeviceTableEntry": - return model.BVLCForeignDeviceTableEntryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "NLM": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 16) - if err != nil { - return nil, err - } - apduLength := uint16(parsedUint0) - return model.NLMParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), apduLength) - case "BACnetWeekNDay": - return model.BACnetWeekNDayParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "NPDUNetworkPriorityTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.NPDUNetworkPriorityTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetReliabilityTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetReliabilityTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetDoorValueTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetDoorValueTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetScale": - return model.BACnetScaleParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetNotificationParametersChangeOfValueNewValue": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetNotificationParametersChangeOfValueNewValueParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "ErrorCodeTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.ErrorCodeTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BacnetConstants": - return model.BacnetConstantsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetPolarityTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetPolarityTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetServiceAckAtomicReadFileStreamOrRecord": - return model.BACnetServiceAckAtomicReadFileStreamOrRecordParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetChannelValue": - return model.BACnetChannelValueParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetConstructedData": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - objectTypeArgument, _ := model.BACnetObjectTypeByName(parserArguments[1]) - propertyIdentifierArgument, _ := model.BACnetPropertyIdentifierByName(parserArguments[2]) - // TODO: find a way to parse the sub types - var arrayIndexArgument model.BACnetTagPayloadUnsignedInteger - return model.BACnetConstructedDataParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case "BACnetEventTypeTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetEventTypeTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetObjectPropertyReference": - return model.BACnetObjectPropertyReferenceParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetBinaryLightingPVTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetBinaryLightingPVTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetOptionalREAL": - return model.BACnetOptionalREALParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetTagPayloadTime": - return model.BACnetTagPayloadTimeParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetAuthenticationFactorEnclosed": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetAuthenticationFactorEnclosedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetEventSummary": - return model.BACnetEventSummaryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetAccessZoneOccupancyStateTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetAccessZoneOccupancyStateTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetPropertyAccessResultAccessResult": - objectTypeArgument, _ := model.BACnetObjectTypeByName(parserArguments[0]) - propertyIdentifierArgument, _ := model.BACnetPropertyIdentifierByName(parserArguments[1]) - // TODO: find a way to parse the sub types - var propertyArrayIndexArgument model.BACnetTagPayloadUnsignedInteger - return model.BACnetPropertyAccessResultAccessResultParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), objectTypeArgument, propertyIdentifierArgument, propertyArrayIndexArgument) - case "BACnetNetworkPortCommandTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetNetworkPortCommandTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetGroupChannelValue": - return model.BACnetGroupChannelValueParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetRejectReasonTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 32) - if err != nil { - return nil, err - } - actualLength := uint32(parsedUint0) - return model.BACnetRejectReasonTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), actualLength) - case "BACnetEscalatorModeTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetEscalatorModeTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetTagPayloadObjectIdentifier": - return model.BACnetTagPayloadObjectIdentifierParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetPropertyWriteDefinition": - objectTypeArgument, _ := model.BACnetObjectTypeByName(parserArguments[0]) - return model.BACnetPropertyWriteDefinitionParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), objectTypeArgument) - case "BACnetEventLogRecord": - return model.BACnetEventLogRecordParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetBinaryPVTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetBinaryPVTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetEventPriorities": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetEventPrioritiesParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetDateTime": - return model.BACnetDateTimeParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetLightingOperationTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetLightingOperationTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetFaultParameterFaultOutOfRangeMinNormalValue": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetFaultParameterFaultOutOfRangeMinNormalValueParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetEventParameterChangeOfCharacterStringListOfAlarmValues": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetEventParameterChangeOfCharacterStringListOfAlarmValuesParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetSecurityKeySetKeyIds": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetSecurityKeySetKeyIdsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetVMACEntry": - return model.BACnetVMACEntryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetTimeStamp": - return model.BACnetTimeStampParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetNotificationParameters": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - objectTypeArgument, _ := model.BACnetObjectTypeByName(parserArguments[1]) - return model.BACnetNotificationParametersParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, objectTypeArgument) - case "BACnetClosingTag": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumberArgument := uint8(parsedUint0) - return model.BACnetClosingTagParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumberArgument) - case "BACnetTimeStampsEnclosed": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetTimeStampsEnclosedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry": - return model.BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetHostAddressEnclosed": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetHostAddressEnclosedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetNetworkTypeTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetNetworkTypeTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetConstructedDataElement": - objectTypeArgument, _ := model.BACnetObjectTypeByName(parserArguments[0]) - propertyIdentifierArgument, _ := model.BACnetPropertyIdentifierByName(parserArguments[1]) - // TODO: find a way to parse the sub types - var arrayIndexArgument model.BACnetTagPayloadUnsignedInteger - return model.BACnetConstructedDataElementParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case "BACnetPropertyValues": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - objectTypeArgument, _ := model.BACnetObjectTypeByName(parserArguments[1]) - return model.BACnetPropertyValuesParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, objectTypeArgument) - case "BACnetProtocolLevelTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetProtocolLevelTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetCOVMultipleSubscription": - return model.BACnetCOVMultipleSubscriptionParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetActionList": - return model.BACnetActionListParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetLightingCommand": - return model.BACnetLightingCommandParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "SubscribeCOVPropertyMultipleErrorFirstFailedSubscription": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.SubscribeCOVPropertyMultipleErrorFirstFailedSubscriptionParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetAuthenticationFactor": - return model.BACnetAuthenticationFactorParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetWriteAccessSpecification": - return model.BACnetWriteAccessSpecificationParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BACnetLightingCommandEnclosed": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - return model.BACnetLightingCommandEnclosedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber) - case "BACnetLiftCarDoorCommandTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetLiftCarDoorCommandTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetLiftCarModeTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetLiftCarModeTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetSilencedStateTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetSilencedStateTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "BACnetLifeSafetyModeTagged": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - tagNumber := uint8(parsedUint0) - tagClass, _ := model.TagClassByName(parserArguments[1]) - return model.BACnetLifeSafetyModeTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - } - return nil, errors.Errorf("Unsupported type %s", typeName) + switch typeName { + case "BACnetAuthenticationStatusTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetAuthenticationStatusTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetLiftGroupModeTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetLiftGroupModeTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetValueSource": + return model.BACnetValueSourceParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "NLMUpdateKeyUpdateKeyEntry": + return model.NLMUpdateKeyUpdateKeyEntryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetOpeningTag": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumberArgument := uint8(parsedUint0) + return model.BACnetOpeningTagParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumberArgument ) + case "BACnetPriorityArray": + objectTypeArgument, _ := model.BACnetObjectTypeByName(parserArguments[0]) + parsedUint1, err := strconv.ParseUint(parserArguments[1], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint1) + // TODO: find a way to parse the sub types + var arrayIndexArgument model.BACnetTagPayloadUnsignedInteger + return model.BACnetPriorityArrayParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), objectTypeArgument, tagNumber, arrayIndexArgument ) + case "BACnetNameValue": + return model.BACnetNameValueParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "SecurityResponseCodeTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.SecurityResponseCodeTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetPropertyReferenceEnclosed": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetPropertyReferenceEnclosedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetSpecialEvent": + return model.BACnetSpecialEventParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetRouterEntry": + return model.BACnetRouterEntryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetTagPayloadReal": + return model.BACnetTagPayloadRealParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetFaultParameterFaultExtendedParameters": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetFaultParameterFaultExtendedParametersParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetNotificationParametersExtendedParameters": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetNotificationParametersExtendedParametersParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetLoggingTypeTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetLoggingTypeTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilterParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetTimeValue": + return model.BACnetTimeValueParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetTagPayloadOctetString": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 32) + if err!=nil { + return nil, err + } + actualLength := uint32(parsedUint0) + return model.BACnetTagPayloadOctetStringParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), actualLength ) + case "BACnetEscalatorOperationDirectionTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetEscalatorOperationDirectionTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "NPDUControl": + return model.NPDUControlParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetFaultParameterFaultStateListOfFaultValues": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetFaultParameterFaultStateListOfFaultValuesParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetTimeStampEnclosed": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetTimeStampEnclosedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetTimerStateTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetTimerStateTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetDateRangeEnclosed": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetDateRangeEnclosedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetEventParameterChangeOfTimerAlarmValue": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetEventParameterChangeOfTimerAlarmValueParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetUnconfirmedServiceRequest": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 16) + if err!=nil { + return nil, err + } + serviceRequestLength := uint16(parsedUint0) + return model.BACnetUnconfirmedServiceRequestParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), serviceRequestLength ) + case "BACnetAddressEnclosed": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetAddressEnclosedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetObjectTypeTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetObjectTypeTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetDaysOfWeekTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetDaysOfWeekTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetReadAccessResultListOfResults": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + objectTypeArgument, _ := model.BACnetObjectTypeByName(parserArguments[1]) + return model.BACnetReadAccessResultListOfResultsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, objectTypeArgument ) + case "BACnetRouterEntryStatusTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetRouterEntryStatusTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetAccessRuleTimeRangeSpecifierTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetAccessRuleTimeRangeSpecifierTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetObjectTypesSupportedTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetObjectTypesSupportedTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BVLCBroadcastDistributionTableEntry": + return model.BVLCBroadcastDistributionTableEntryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetBackupStateTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetBackupStateTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValuesParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetDestination": + return model.BACnetDestinationParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetDeviceStatusTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetDeviceStatusTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetPrescale": + return model.BACnetPrescaleParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "ErrorEnclosed": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.ErrorEnclosedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetAuthenticationPolicyListEntry": + return model.BACnetAuthenticationPolicyListEntryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "APDU": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 16) + if err!=nil { + return nil, err + } + apduLength := uint16(parsedUint0) + return model.APDUParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), apduLength ) + case "BACnetEventNotificationSubscription": + return model.BACnetEventNotificationSubscriptionParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetSegmentationTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetSegmentationTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetSecurityKeySet": + return model.BACnetSecurityKeySetParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetNetworkSecurityPolicy": + return model.BACnetNetworkSecurityPolicyParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetHostNPortEnclosed": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetHostNPortEnclosedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetPropertyIdentifierTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetPropertyIdentifierTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetRecipientEnclosed": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetRecipientEnclosedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetConfirmedServiceRequest": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 32) + if err!=nil { + return nil, err + } + serviceRequestLength := uint32(parsedUint0) + return model.BACnetConfirmedServiceRequestParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), serviceRequestLength ) + case "BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetTagPayloadUnsignedInteger": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 32) + if err!=nil { + return nil, err + } + actualLength := uint32(parsedUint0) + return model.BACnetTagPayloadUnsignedIntegerParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), actualLength ) + case "BACnetAccessUserTypeTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetAccessUserTypeTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetRestartReasonTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetRestartReasonTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetTagPayloadBitString": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 32) + if err!=nil { + return nil, err + } + actualLength := uint32(parsedUint0) + return model.BACnetTagPayloadBitStringParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), actualLength ) + case "BACnetClientCOV": + return model.BACnetClientCOVParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetSetpointReference": + return model.BACnetSetpointReferenceParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetObjectPropertyReferenceEnclosed": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetObjectPropertyReferenceEnclosedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetEscalatorFaultTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetEscalatorFaultTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetEventStateTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetEventStateTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetTagHeader": + return model.BACnetTagHeaderParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetTagPayloadBoolean": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 32) + if err!=nil { + return nil, err + } + actualLength := uint32(parsedUint0) + return model.BACnetTagPayloadBooleanParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), actualLength ) + case "BACnetFaultTypeTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetFaultTypeTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "VTCloseErrorListOfVTSessionIdentifiers": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.VTCloseErrorListOfVTSessionIdentifiersParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications": + return model.BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetIPModeTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetIPModeTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetAccumulatorRecord": + return model.BACnetAccumulatorRecordParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetDailySchedule": + return model.BACnetDailyScheduleParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetLogDataLogDataEntry": + return model.BACnetLogDataLogDataEntryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetOptionalBinaryPV": + return model.BACnetOptionalBinaryPVParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetBDTEntry": + return model.BACnetBDTEntryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetEngineeringUnitsTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetEngineeringUnitsTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "ListOfCovNotifications": + return model.ListOfCovNotificationsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetAssignedAccessRights": + return model.BACnetAssignedAccessRightsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetConfirmedServiceRequestCreateObjectObjectSpecifier": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetConfirmedServiceRequestCreateObjectObjectSpecifierParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetAuthenticationPolicy": + return model.BACnetAuthenticationPolicyParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetPropertyAccessResult": + return model.BACnetPropertyAccessResultParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsList": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsListParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "NPDU": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 16) + if err!=nil { + return nil, err + } + npduLength := uint16(parsedUint0) + return model.NPDUParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), npduLength ) + case "BACnetProgramStateTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetProgramStateTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetDoorSecuredStatusTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetDoorSecuredStatusTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "ErrorClassTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.ErrorClassTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetSpecialEventListOfTimeValues": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetSpecialEventListOfTimeValuesParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetFaultParameterFaultOutOfRangeMaxNormalValue": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetFaultParameterFaultOutOfRangeMaxNormalValueParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetAccessRuleLocationSpecifierTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetAccessRuleLocationSpecifierTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry": + return model.BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetAuthenticationFactorFormat": + return model.BACnetAuthenticationFactorFormatParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetMaintenanceTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetMaintenanceTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetNotificationParametersChangeOfDiscreteValueNewValue": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetNotificationParametersChangeOfDiscreteValueNewValueParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetReadAccessPropertyReadResult": + objectTypeArgument, _ := model.BACnetObjectTypeByName(parserArguments[0]) + propertyIdentifierArgument, _ := model.BACnetPropertyIdentifierByName(parserArguments[1]) + // TODO: find a way to parse the sub types + var arrayIndexArgument model.BACnetTagPayloadUnsignedInteger + return model.BACnetReadAccessPropertyReadResultParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument ) + case "BACnetActionCommand": + return model.BACnetActionCommandParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetFaultParameterFaultExtendedParametersEntry": + return model.BACnetFaultParameterFaultExtendedParametersEntryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetTagPayloadDate": + return model.BACnetTagPayloadDateParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetEventParameterExtendedParameters": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetEventParameterExtendedParametersParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetEventParameterAccessEventListOfAccessEvents": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetEventParameterAccessEventListOfAccessEventsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetReadAccessProperty": + objectTypeArgument, _ := model.BACnetObjectTypeByName(parserArguments[0]) + return model.BACnetReadAccessPropertyParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), objectTypeArgument ) + case "BACnetLifeSafetyOperationTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetLifeSafetyOperationTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetWeekNDayTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetWeekNDayTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetEventTransitionBitsTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetEventTransitionBitsTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetLogData": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetLogDataParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetFaultParameterFaultCharacterStringListOfFaultValues": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetFaultParameterFaultCharacterStringListOfFaultValuesParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetLockStatusTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetLockStatusTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetDeviceObjectPropertyReferenceEnclosed": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetDeviceObjectPropertyReferenceEnclosedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetPropertyStates": + return model.BACnetPropertyStatesParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetReadAccessResult": + return model.BACnetReadAccessResultParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetResultFlagsTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetResultFlagsTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetAccessCredentialDisableReasonTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetAccessCredentialDisableReasonTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetLightingInProgressTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetLightingInProgressTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetLifeSafetyStateTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetLifeSafetyStateTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetVTSession": + return model.BACnetVTSessionParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetEventTimestampsEnclosed": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetEventTimestampsEnclosedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetSecurityLevelTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetSecurityLevelTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetLogRecordLogDatum": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetLogRecordLogDatumParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetDateTimeEnclosed": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetDateTimeEnclosedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetTimerTransitionTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetTimerTransitionTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetLogMultipleRecord": + return model.BACnetLogMultipleRecordParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetProgramRequestTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetProgramRequestTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetDateRange": + return model.BACnetDateRangeParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetEventParameter": + return model.BACnetEventParameterParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetLiftFaultTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetLiftFaultTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetPropertyStatesEnclosed": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetPropertyStatesEnclosedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetGroupChannelValueList": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetGroupChannelValueListParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetFileAccessMethodTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetFileAccessMethodTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetTagPayloadCharacterString": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 32) + if err!=nil { + return nil, err + } + actualLength := uint32(parsedUint0) + return model.BACnetTagPayloadCharacterStringParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), actualLength ) + case "BACnetEventLogRecordLogDatum": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetEventLogRecordLogDatumParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetStatusFlagsTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetStatusFlagsTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetNodeTypeTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetNodeTypeTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetOptionalCharacterString": + return model.BACnetOptionalCharacterStringParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetAddress": + return model.BACnetAddressParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetEventParameterChangeOfLifeSavetyListOfAlarmValues": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetEventParameterChangeOfLifeSavetyListOfAlarmValuesParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReference": + return model.BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReferenceParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetApplicationTag": + return model.BACnetApplicationTagParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetEventParameterChangeOfBitstringListOfBitstringValues": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetEventParameterChangeOfBitstringListOfBitstringValuesParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetShedLevel": + return model.BACnetShedLevelParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetActionTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetActionTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetCredentialAuthenticationFactor": + return model.BACnetCredentialAuthenticationFactorParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetAssignedLandingCallsLandingCallsListEntry": + return model.BACnetAssignedLandingCallsLandingCallsListEntryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetPropertyValue": + objectTypeArgument, _ := model.BACnetObjectTypeByName(parserArguments[0]) + return model.BACnetPropertyValueParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), objectTypeArgument ) + case "BACnetCOVSubscription": + return model.BACnetCOVSubscriptionParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetFaultParameterFaultLifeSafetyListOfFaultValues": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetFaultParameterFaultLifeSafetyListOfFaultValuesParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetRelationshipTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetRelationshipTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "NLMInitalizeRoutingTablePortMapping": + return model.NLMInitalizeRoutingTablePortMappingParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetRecipientProcessEnclosed": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetRecipientProcessEnclosedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetAccessRule": + return model.BACnetAccessRuleParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetHostNPort": + return model.BACnetHostNPortParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetShedStateTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetShedStateTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetAccessEventTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetAccessEventTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetServiceAck": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 32) + if err!=nil { + return nil, err + } + serviceAckLength := uint32(parsedUint0) + return model.BACnetServiceAckParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), serviceAckLength ) + case "BACnetAccessCredentialDisableTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetAccessCredentialDisableTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetLiftCarCallList": + return model.BACnetLiftCarCallListParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetLightingTransitionTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetLightingTransitionTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "NLMUpdateKeyUpdateControlFlags": + return model.NLMUpdateKeyUpdateControlFlagsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetAssignedLandingCalls": + return model.BACnetAssignedLandingCallsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetNotifyTypeTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetNotifyTypeTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetAuthorizationExemptionTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetAuthorizationExemptionTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetLandingDoorStatusLandingDoorsList": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetLandingDoorStatusLandingDoorsListParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetAuthenticationFactorTypeTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetAuthenticationFactorTypeTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetAccessAuthenticationFactorDisableTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetAccessAuthenticationFactorDisableTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetAuthorizationModeTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetAuthorizationModeTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetDoorStatusTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetDoorStatusTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetVendorIdTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetVendorIdTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetEventTimestamps": + return model.BACnetEventTimestampsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetNameValueCollection": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetNameValueCollectionParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetTagPayloadEnumerated": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 32) + if err!=nil { + return nil, err + } + actualLength := uint32(parsedUint0) + return model.BACnetTagPayloadEnumeratedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), actualLength ) + case "BACnetLimitEnableTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetLimitEnableTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetDoorAlarmStateTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetDoorAlarmStateTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetServicesSupportedTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetServicesSupportedTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetWriteStatusTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetWriteStatusTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetRecipientProcess": + return model.BACnetRecipientProcessParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetReadAccessSpecification": + return model.BACnetReadAccessSpecificationParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetAuthenticationPolicyList": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetAuthenticationPolicyListParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetLandingDoorStatus": + return model.BACnetLandingDoorStatusParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetLiftCarCallListFloorList": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetLiftCarCallListFloorListParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetAccessThreatLevel": + return model.BACnetAccessThreatLevelParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetCalendarEntryEnclosed": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetCalendarEntryEnclosedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetRecipient": + return model.BACnetRecipientParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetLiftCarDriveStatusTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetLiftCarDriveStatusTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetUnconfirmedServiceRequestWhoHasObject": + return model.BACnetUnconfirmedServiceRequestWhoHasObjectParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetTagPayloadSignedInteger": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 32) + if err!=nil { + return nil, err + } + actualLength := uint32(parsedUint0) + return model.BACnetTagPayloadSignedIntegerParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), actualLength ) + case "BACnetSecurityPolicyTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetSecurityPolicyTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord": + return model.BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecordParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BVLC": + return model.BVLCParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "ConfirmedEventNotificationRequest": + return model.ConfirmedEventNotificationRequestParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetLandingDoorStatusLandingDoorsListEntry": + return model.BACnetLandingDoorStatusLandingDoorsListEntryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetLiftCarDirectionTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetLiftCarDirectionTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetAddressBinding": + return model.BACnetAddressBindingParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetLandingCallStatusCommand": + return model.BACnetLandingCallStatusCommandParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "ListOfCovNotificationsValue": + objectTypeArgument, _ := model.BACnetObjectTypeByName(parserArguments[0]) + return model.ListOfCovNotificationsValueParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), objectTypeArgument ) + case "BACnetLandingCallStatus": + return model.BACnetLandingCallStatusParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetEventParameterChangeOfStateListOfValues": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetEventParameterChangeOfStateListOfValuesParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetPortPermission": + return model.BACnetPortPermissionParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetConfirmedServiceRequestReadRangeRange": + return model.BACnetConfirmedServiceRequestReadRangeRangeParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetError": + errorChoice, _ := model.BACnetConfirmedServiceChoiceByName(parserArguments[0]) + return model.BACnetErrorParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), errorChoice ) + case "BACnetDeviceObjectReferenceEnclosed": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetDeviceObjectReferenceEnclosedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetOptionalUnsigned": + return model.BACnetOptionalUnsignedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetHostAddress": + return model.BACnetHostAddressParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "ListOfCovNotificationsList": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.ListOfCovNotificationsListParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetEventSummariesList": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetEventSummariesListParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetVTClassTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetVTClassTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetDeviceObjectPropertyReference": + return model.BACnetDeviceObjectPropertyReferenceParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetProcessIdSelection": + return model.BACnetProcessIdSelectionParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetAssignedLandingCallsLandingCallsList": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetAssignedLandingCallsLandingCallsListParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetTagPayloadDouble": + return model.BACnetTagPayloadDoubleParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetAccumulatorRecordAccumulatorStatusTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetAccumulatorRecordAccumulatorStatusTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetTimerStateChangeValue": + objectTypeArgument, _ := model.BACnetObjectTypeByName(parserArguments[0]) + return model.BACnetTimerStateChangeValueParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), objectTypeArgument ) + case "BACnetSpecialEventPeriod": + return model.BACnetSpecialEventPeriodParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetKeyIdentifier": + return model.BACnetKeyIdentifierParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetNetworkNumberQualityTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetNetworkNumberQualityTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetLogStatusTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetLogStatusTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetAbortReasonTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 32) + if err!=nil { + return nil, err + } + actualLength := uint32(parsedUint0) + return model.BACnetAbortReasonTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), actualLength ) + case "BACnetProgramErrorTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetProgramErrorTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "Error": + return model.ErrorParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetPropertyReference": + return model.BACnetPropertyReferenceParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetContextTag": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumberArgument := uint8(parsedUint0) + dataType, _ := model.BACnetDataTypeByName(parserArguments[1]) + return model.BACnetContextTagParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumberArgument, dataType ) + case "BACnetUnconfirmedServiceChoiceTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetUnconfirmedServiceChoiceTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BVLCResultCodeTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BVLCResultCodeTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetFaultParameter": + return model.BACnetFaultParameterParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetEventParameterChangeOfValueCivCriteria": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetEventParameterChangeOfValueCivCriteriaParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetPriorityValue": + objectTypeArgument, _ := model.BACnetObjectTypeByName(parserArguments[0]) + return model.BACnetPriorityValueParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), objectTypeArgument ) + case "BACnetLogRecord": + return model.BACnetLogRecordParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetCalendarEntry": + return model.BACnetCalendarEntryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetAccessPassbackModeTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetAccessPassbackModeTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetDeviceObjectReference": + return model.BACnetDeviceObjectReferenceParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BVLCForeignDeviceTableEntry": + return model.BVLCForeignDeviceTableEntryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "NLM": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 16) + if err!=nil { + return nil, err + } + apduLength := uint16(parsedUint0) + return model.NLMParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), apduLength ) + case "BACnetWeekNDay": + return model.BACnetWeekNDayParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "NPDUNetworkPriorityTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.NPDUNetworkPriorityTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetReliabilityTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetReliabilityTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetDoorValueTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetDoorValueTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetScale": + return model.BACnetScaleParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetNotificationParametersChangeOfValueNewValue": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetNotificationParametersChangeOfValueNewValueParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "ErrorCodeTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.ErrorCodeTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BacnetConstants": + return model.BacnetConstantsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetPolarityTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetPolarityTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetServiceAckAtomicReadFileStreamOrRecord": + return model.BACnetServiceAckAtomicReadFileStreamOrRecordParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetChannelValue": + return model.BACnetChannelValueParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetConstructedData": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + objectTypeArgument, _ := model.BACnetObjectTypeByName(parserArguments[1]) + propertyIdentifierArgument, _ := model.BACnetPropertyIdentifierByName(parserArguments[2]) + // TODO: find a way to parse the sub types + var arrayIndexArgument model.BACnetTagPayloadUnsignedInteger + return model.BACnetConstructedDataParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument ) + case "BACnetEventTypeTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetEventTypeTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetObjectPropertyReference": + return model.BACnetObjectPropertyReferenceParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetBinaryLightingPVTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetBinaryLightingPVTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetOptionalREAL": + return model.BACnetOptionalREALParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetTagPayloadTime": + return model.BACnetTagPayloadTimeParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetAuthenticationFactorEnclosed": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetAuthenticationFactorEnclosedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetEventSummary": + return model.BACnetEventSummaryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetAccessZoneOccupancyStateTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetAccessZoneOccupancyStateTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetPropertyAccessResultAccessResult": + objectTypeArgument, _ := model.BACnetObjectTypeByName(parserArguments[0]) + propertyIdentifierArgument, _ := model.BACnetPropertyIdentifierByName(parserArguments[1]) + // TODO: find a way to parse the sub types + var propertyArrayIndexArgument model.BACnetTagPayloadUnsignedInteger + return model.BACnetPropertyAccessResultAccessResultParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), objectTypeArgument, propertyIdentifierArgument, propertyArrayIndexArgument ) + case "BACnetNetworkPortCommandTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetNetworkPortCommandTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetGroupChannelValue": + return model.BACnetGroupChannelValueParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetRejectReasonTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 32) + if err!=nil { + return nil, err + } + actualLength := uint32(parsedUint0) + return model.BACnetRejectReasonTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), actualLength ) + case "BACnetEscalatorModeTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetEscalatorModeTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetTagPayloadObjectIdentifier": + return model.BACnetTagPayloadObjectIdentifierParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetPropertyWriteDefinition": + objectTypeArgument, _ := model.BACnetObjectTypeByName(parserArguments[0]) + return model.BACnetPropertyWriteDefinitionParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), objectTypeArgument ) + case "BACnetEventLogRecord": + return model.BACnetEventLogRecordParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetBinaryPVTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetBinaryPVTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetEventPriorities": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetEventPrioritiesParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetDateTime": + return model.BACnetDateTimeParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetLightingOperationTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetLightingOperationTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetFaultParameterFaultOutOfRangeMinNormalValue": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetFaultParameterFaultOutOfRangeMinNormalValueParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetEventParameterChangeOfCharacterStringListOfAlarmValues": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetEventParameterChangeOfCharacterStringListOfAlarmValuesParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetSecurityKeySetKeyIds": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetSecurityKeySetKeyIdsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetVMACEntry": + return model.BACnetVMACEntryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetTimeStamp": + return model.BACnetTimeStampParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetNotificationParameters": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + objectTypeArgument, _ := model.BACnetObjectTypeByName(parserArguments[1]) + return model.BACnetNotificationParametersParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, objectTypeArgument ) + case "BACnetClosingTag": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumberArgument := uint8(parsedUint0) + return model.BACnetClosingTagParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumberArgument ) + case "BACnetTimeStampsEnclosed": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetTimeStampsEnclosedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry": + return model.BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetHostAddressEnclosed": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetHostAddressEnclosedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetNetworkTypeTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetNetworkTypeTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetConstructedDataElement": + objectTypeArgument, _ := model.BACnetObjectTypeByName(parserArguments[0]) + propertyIdentifierArgument, _ := model.BACnetPropertyIdentifierByName(parserArguments[1]) + // TODO: find a way to parse the sub types + var arrayIndexArgument model.BACnetTagPayloadUnsignedInteger + return model.BACnetConstructedDataElementParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument ) + case "BACnetPropertyValues": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + objectTypeArgument, _ := model.BACnetObjectTypeByName(parserArguments[1]) + return model.BACnetPropertyValuesParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, objectTypeArgument ) + case "BACnetProtocolLevelTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetProtocolLevelTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetCOVMultipleSubscription": + return model.BACnetCOVMultipleSubscriptionParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetActionList": + return model.BACnetActionListParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetLightingCommand": + return model.BACnetLightingCommandParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "SubscribeCOVPropertyMultipleErrorFirstFailedSubscription": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.SubscribeCOVPropertyMultipleErrorFirstFailedSubscriptionParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetAuthenticationFactor": + return model.BACnetAuthenticationFactorParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetWriteAccessSpecification": + return model.BACnetWriteAccessSpecificationParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BACnetLightingCommandEnclosed": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + return model.BACnetLightingCommandEnclosedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber ) + case "BACnetLiftCarDoorCommandTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetLiftCarDoorCommandTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetLiftCarModeTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetLiftCarModeTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetSilencedStateTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetSilencedStateTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + case "BACnetLifeSafetyModeTagged": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + tagNumber := uint8(parsedUint0) + tagClass, _ := model.TagClassByName(parserArguments[1]) + return model.BACnetLifeSafetyModeTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass ) + } + return nil, errors.Errorf("Unsupported type %s", typeName) } diff --git a/plc4go/protocols/bacnetip/readwrite/model/APDU.go b/plc4go/protocols/bacnetip/readwrite/model/APDU.go index e018ee8c01d..e93277a871b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/APDU.go +++ b/plc4go/protocols/bacnetip/readwrite/model/APDU.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // APDU is the corresponding interface of APDU type APDU interface { @@ -56,6 +58,7 @@ type _APDUChildRequirements interface { GetApduType() ApduType } + type APDUParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child APDU, serializeChildFunction func() error) error GetTypeName() string @@ -63,21 +66,22 @@ type APDUParent interface { type APDUChild interface { utils.Serializable - InitializeParent(parent APDU) +InitializeParent(parent APDU ) GetParent() *APDU GetTypeName() string APDU } + // NewAPDU factory function for _APDU -func NewAPDU(apduLength uint16) *_APDU { - return &_APDU{ApduLength: apduLength} +func NewAPDU( apduLength uint16 ) *_APDU { +return &_APDU{ ApduLength: apduLength } } // Deprecated: use the interface for direct cast func CastAPDU(structType interface{}) APDU { - if casted, ok := structType.(APDU); ok { + if casted, ok := structType.(APDU); ok { return casted } if casted, ok := structType.(*APDU); ok { @@ -90,10 +94,11 @@ func (m *_APDU) GetTypeName() string { return "APDU" } + func (m *_APDU) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Discriminator Field (apduType) - lengthInBits += 4 + lengthInBits += 4; return lengthInBits } @@ -131,30 +136,30 @@ func APDUParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, apduL // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type APDUChildSerializeRequirement interface { APDU - InitializeParent(APDU) + InitializeParent(APDU ) GetParent() APDU } var _childTemp interface{} var _child APDUChildSerializeRequirement var typeSwitchError error switch { - case apduType == ApduType_CONFIRMED_REQUEST_PDU: // APDUConfirmedRequest +case apduType == ApduType_CONFIRMED_REQUEST_PDU : // APDUConfirmedRequest _childTemp, typeSwitchError = APDUConfirmedRequestParseWithBuffer(ctx, readBuffer, apduLength) - case apduType == ApduType_UNCONFIRMED_REQUEST_PDU: // APDUUnconfirmedRequest +case apduType == ApduType_UNCONFIRMED_REQUEST_PDU : // APDUUnconfirmedRequest _childTemp, typeSwitchError = APDUUnconfirmedRequestParseWithBuffer(ctx, readBuffer, apduLength) - case apduType == ApduType_SIMPLE_ACK_PDU: // APDUSimpleAck +case apduType == ApduType_SIMPLE_ACK_PDU : // APDUSimpleAck _childTemp, typeSwitchError = APDUSimpleAckParseWithBuffer(ctx, readBuffer, apduLength) - case apduType == ApduType_COMPLEX_ACK_PDU: // APDUComplexAck +case apduType == ApduType_COMPLEX_ACK_PDU : // APDUComplexAck _childTemp, typeSwitchError = APDUComplexAckParseWithBuffer(ctx, readBuffer, apduLength) - case apduType == ApduType_SEGMENT_ACK_PDU: // APDUSegmentAck +case apduType == ApduType_SEGMENT_ACK_PDU : // APDUSegmentAck _childTemp, typeSwitchError = APDUSegmentAckParseWithBuffer(ctx, readBuffer, apduLength) - case apduType == ApduType_ERROR_PDU: // APDUError +case apduType == ApduType_ERROR_PDU : // APDUError _childTemp, typeSwitchError = APDUErrorParseWithBuffer(ctx, readBuffer, apduLength) - case apduType == ApduType_REJECT_PDU: // APDUReject +case apduType == ApduType_REJECT_PDU : // APDUReject _childTemp, typeSwitchError = APDURejectParseWithBuffer(ctx, readBuffer, apduLength) - case apduType == ApduType_ABORT_PDU: // APDUAbort +case apduType == ApduType_ABORT_PDU : // APDUAbort _childTemp, typeSwitchError = APDUAbortParseWithBuffer(ctx, readBuffer, apduLength) - case 0 == 0: // APDUUnknown +case 0==0 : // APDUUnknown _childTemp, typeSwitchError = APDUUnknownParseWithBuffer(ctx, readBuffer, apduLength) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [apduType=%v]", apduType) @@ -169,7 +174,7 @@ func APDUParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, apduL } // Finish initializing - _child.InitializeParent(_child) +_child.InitializeParent(_child ) return _child, nil } @@ -179,7 +184,7 @@ func (pm *_APDU) SerializeParent(ctx context.Context, writeBuffer utils.WriteBuf _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("APDU"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("APDU"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for APDU") } @@ -208,13 +213,13 @@ func (pm *_APDU) SerializeParent(ctx context.Context, writeBuffer utils.WriteBuf return nil } + //// // Arguments Getter func (m *_APDU) GetApduLength() uint16 { return m.ApduLength } - // //// @@ -232,3 +237,6 @@ func (m *_APDU) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/APDUAbort.go b/plc4go/protocols/bacnetip/readwrite/model/APDUAbort.go index a18a80bca81..684f73084a4 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/APDUAbort.go +++ b/plc4go/protocols/bacnetip/readwrite/model/APDUAbort.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // APDUAbort is the corresponding interface of APDUAbort type APDUAbort interface { @@ -50,33 +52,33 @@ type APDUAbortExactly interface { // _APDUAbort is the data-structure of this message type _APDUAbort struct { *_APDU - Server bool - OriginalInvokeId uint8 - AbortReason BACnetAbortReasonTagged + Server bool + OriginalInvokeId uint8 + AbortReason BACnetAbortReasonTagged // Reserved Fields reservedField0 *uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_APDUAbort) GetApduType() ApduType { - return ApduType_ABORT_PDU -} +func (m *_APDUAbort) GetApduType() ApduType { +return ApduType_ABORT_PDU} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_APDUAbort) InitializeParent(parent APDU) {} +func (m *_APDUAbort) InitializeParent(parent APDU ) {} -func (m *_APDUAbort) GetParent() APDU { +func (m *_APDUAbort) GetParent() APDU { return m._APDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -99,13 +101,14 @@ func (m *_APDUAbort) GetAbortReason() BACnetAbortReasonTagged { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAPDUAbort factory function for _APDUAbort -func NewAPDUAbort(server bool, originalInvokeId uint8, abortReason BACnetAbortReasonTagged, apduLength uint16) *_APDUAbort { +func NewAPDUAbort( server bool , originalInvokeId uint8 , abortReason BACnetAbortReasonTagged , apduLength uint16 ) *_APDUAbort { _result := &_APDUAbort{ - Server: server, + Server: server, OriginalInvokeId: originalInvokeId, - AbortReason: abortReason, - _APDU: NewAPDU(apduLength), + AbortReason: abortReason, + _APDU: NewAPDU(apduLength), } _result._APDU._APDUChildRequirements = _result return _result @@ -113,7 +116,7 @@ func NewAPDUAbort(server bool, originalInvokeId uint8, abortReason BACnetAbortRe // Deprecated: use the interface for direct cast func CastAPDUAbort(structType interface{}) APDUAbort { - if casted, ok := structType.(APDUAbort); ok { + if casted, ok := structType.(APDUAbort); ok { return casted } if casted, ok := structType.(*APDUAbort); ok { @@ -133,10 +136,10 @@ func (m *_APDUAbort) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += 3 // Simple field (server) - lengthInBits += 1 + lengthInBits += 1; // Simple field (originalInvokeId) - lengthInBits += 8 + lengthInBits += 8; // Simple field (abortReason) lengthInBits += m.AbortReason.GetLengthInBits(ctx) @@ -144,6 +147,7 @@ func (m *_APDUAbort) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_APDUAbort) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -171,7 +175,7 @@ func APDUAbortParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, if reserved != uint8(0x00) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -179,14 +183,14 @@ func APDUAbortParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, } // Simple Field (server) - _server, _serverErr := readBuffer.ReadBit("server") +_server, _serverErr := readBuffer.ReadBit("server") if _serverErr != nil { return nil, errors.Wrap(_serverErr, "Error parsing 'server' field of APDUAbort") } server := _server // Simple Field (originalInvokeId) - _originalInvokeId, _originalInvokeIdErr := readBuffer.ReadUint8("originalInvokeId", 8) +_originalInvokeId, _originalInvokeIdErr := readBuffer.ReadUint8("originalInvokeId", 8) if _originalInvokeIdErr != nil { return nil, errors.Wrap(_originalInvokeIdErr, "Error parsing 'originalInvokeId' field of APDUAbort") } @@ -196,7 +200,7 @@ func APDUAbortParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, if pullErr := readBuffer.PullContext("abortReason"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for abortReason") } - _abortReason, _abortReasonErr := BACnetAbortReasonTaggedParseWithBuffer(ctx, readBuffer, uint32(uint32(1))) +_abortReason, _abortReasonErr := BACnetAbortReasonTaggedParseWithBuffer(ctx, readBuffer , uint32( uint32(1) ) ) if _abortReasonErr != nil { return nil, errors.Wrap(_abortReasonErr, "Error parsing 'abortReason' field of APDUAbort") } @@ -214,10 +218,10 @@ func APDUAbortParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, _APDU: &_APDU{ ApduLength: apduLength, }, - Server: server, + Server: server, OriginalInvokeId: originalInvokeId, - AbortReason: abortReason, - reservedField0: reservedField0, + AbortReason: abortReason, + reservedField0: reservedField0, } _child._APDU._APDUChildRequirements = _child return _child, nil @@ -239,47 +243,47 @@ func (m *_APDUAbort) SerializeWithWriteBuffer(ctx context.Context, writeBuffer u return errors.Wrap(pushErr, "Error pushing for APDUAbort") } - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0x00) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0x00), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteUint8("reserved", 3, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0x00) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0x00), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 } - - // Simple Field (server) - server := bool(m.GetServer()) - _serverErr := writeBuffer.WriteBit("server", (server)) - if _serverErr != nil { - return errors.Wrap(_serverErr, "Error serializing 'server' field") + _err := writeBuffer.WriteUint8("reserved", 3, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } - // Simple Field (originalInvokeId) - originalInvokeId := uint8(m.GetOriginalInvokeId()) - _originalInvokeIdErr := writeBuffer.WriteUint8("originalInvokeId", 8, (originalInvokeId)) - if _originalInvokeIdErr != nil { - return errors.Wrap(_originalInvokeIdErr, "Error serializing 'originalInvokeId' field") - } + // Simple Field (server) + server := bool(m.GetServer()) + _serverErr := writeBuffer.WriteBit("server", (server)) + if _serverErr != nil { + return errors.Wrap(_serverErr, "Error serializing 'server' field") + } - // Simple Field (abortReason) - if pushErr := writeBuffer.PushContext("abortReason"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for abortReason") - } - _abortReasonErr := writeBuffer.WriteSerializable(ctx, m.GetAbortReason()) - if popErr := writeBuffer.PopContext("abortReason"); popErr != nil { - return errors.Wrap(popErr, "Error popping for abortReason") - } - if _abortReasonErr != nil { - return errors.Wrap(_abortReasonErr, "Error serializing 'abortReason' field") - } + // Simple Field (originalInvokeId) + originalInvokeId := uint8(m.GetOriginalInvokeId()) + _originalInvokeIdErr := writeBuffer.WriteUint8("originalInvokeId", 8, (originalInvokeId)) + if _originalInvokeIdErr != nil { + return errors.Wrap(_originalInvokeIdErr, "Error serializing 'originalInvokeId' field") + } + + // Simple Field (abortReason) + if pushErr := writeBuffer.PushContext("abortReason"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for abortReason") + } + _abortReasonErr := writeBuffer.WriteSerializable(ctx, m.GetAbortReason()) + if popErr := writeBuffer.PopContext("abortReason"); popErr != nil { + return errors.Wrap(popErr, "Error popping for abortReason") + } + if _abortReasonErr != nil { + return errors.Wrap(_abortReasonErr, "Error serializing 'abortReason' field") + } if popErr := writeBuffer.PopContext("APDUAbort"); popErr != nil { return errors.Wrap(popErr, "Error popping for APDUAbort") @@ -289,6 +293,7 @@ func (m *_APDUAbort) SerializeWithWriteBuffer(ctx context.Context, writeBuffer u return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_APDUAbort) isAPDUAbort() bool { return true } @@ -303,3 +308,6 @@ func (m *_APDUAbort) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/APDUComplexAck.go b/plc4go/protocols/bacnetip/readwrite/model/APDUComplexAck.go index a9f40411bd4..df08449a5c8 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/APDUComplexAck.go +++ b/plc4go/protocols/bacnetip/readwrite/model/APDUComplexAck.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // APDUComplexAck is the corresponding interface of APDUComplexAck type APDUComplexAck interface { @@ -65,38 +67,38 @@ type APDUComplexAckExactly interface { // _APDUComplexAck is the data-structure of this message type _APDUComplexAck struct { *_APDU - SegmentedMessage bool - MoreFollows bool - OriginalInvokeId uint8 - SequenceNumber *uint8 - ProposedWindowSize *uint8 - ServiceAck BACnetServiceAck - SegmentServiceChoice *BACnetConfirmedServiceChoice - Segment []byte + SegmentedMessage bool + MoreFollows bool + OriginalInvokeId uint8 + SequenceNumber *uint8 + ProposedWindowSize *uint8 + ServiceAck BACnetServiceAck + SegmentServiceChoice *BACnetConfirmedServiceChoice + Segment []byte // Reserved Fields reservedField0 *uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_APDUComplexAck) GetApduType() ApduType { - return ApduType_COMPLEX_ACK_PDU -} +func (m *_APDUComplexAck) GetApduType() ApduType { +return ApduType_COMPLEX_ACK_PDU} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_APDUComplexAck) InitializeParent(parent APDU) {} +func (m *_APDUComplexAck) InitializeParent(parent APDU ) {} -func (m *_APDUComplexAck) GetParent() APDU { +func (m *_APDUComplexAck) GetParent() APDU { return m._APDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -154,7 +156,7 @@ func (m *_APDUComplexAck) GetApduHeaderReduction() uint16 { _ = serviceAck segmentServiceChoice := m.SegmentServiceChoice _ = segmentServiceChoice - return uint16(uint16(uint16(2)) + uint16((utils.InlineIf(m.GetSegmentedMessage(), func() interface{} { return uint16(uint16(2)) }, func() interface{} { return uint16(uint16(0)) }).(uint16)))) + return uint16(uint16(uint16(2)) + uint16((utils.InlineIf(m.GetSegmentedMessage(), func() interface{} {return uint16(uint16(2))}, func() interface{} {return uint16(uint16(0))}).(uint16)))) } func (m *_APDUComplexAck) GetSegmentReduction() uint16 { @@ -168,7 +170,7 @@ func (m *_APDUComplexAck) GetSegmentReduction() uint16 { _ = serviceAck segmentServiceChoice := m.SegmentServiceChoice _ = segmentServiceChoice - return uint16(utils.InlineIf((bool((m.GetSegmentServiceChoice()) != (nil))), func() interface{} { return uint16((uint16(m.GetApduHeaderReduction()) + uint16(uint16(1)))) }, func() interface{} { return uint16(m.GetApduHeaderReduction()) }).(uint16)) + return uint16(utils.InlineIf((bool(((m.GetSegmentServiceChoice())) != (nil))), func() interface{} {return uint16((uint16(m.GetApduHeaderReduction()) + uint16(uint16(1))))}, func() interface{} {return uint16(m.GetApduHeaderReduction())}).(uint16)) } /////////////////////// @@ -176,18 +178,19 @@ func (m *_APDUComplexAck) GetSegmentReduction() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAPDUComplexAck factory function for _APDUComplexAck -func NewAPDUComplexAck(segmentedMessage bool, moreFollows bool, originalInvokeId uint8, sequenceNumber *uint8, proposedWindowSize *uint8, serviceAck BACnetServiceAck, segmentServiceChoice *BACnetConfirmedServiceChoice, segment []byte, apduLength uint16) *_APDUComplexAck { +func NewAPDUComplexAck( segmentedMessage bool , moreFollows bool , originalInvokeId uint8 , sequenceNumber *uint8 , proposedWindowSize *uint8 , serviceAck BACnetServiceAck , segmentServiceChoice *BACnetConfirmedServiceChoice , segment []byte , apduLength uint16 ) *_APDUComplexAck { _result := &_APDUComplexAck{ - SegmentedMessage: segmentedMessage, - MoreFollows: moreFollows, - OriginalInvokeId: originalInvokeId, - SequenceNumber: sequenceNumber, - ProposedWindowSize: proposedWindowSize, - ServiceAck: serviceAck, + SegmentedMessage: segmentedMessage, + MoreFollows: moreFollows, + OriginalInvokeId: originalInvokeId, + SequenceNumber: sequenceNumber, + ProposedWindowSize: proposedWindowSize, + ServiceAck: serviceAck, SegmentServiceChoice: segmentServiceChoice, - Segment: segment, - _APDU: NewAPDU(apduLength), + Segment: segment, + _APDU: NewAPDU(apduLength), } _result._APDU._APDUChildRequirements = _result return _result @@ -195,7 +198,7 @@ func NewAPDUComplexAck(segmentedMessage bool, moreFollows bool, originalInvokeId // Deprecated: use the interface for direct cast func CastAPDUComplexAck(structType interface{}) APDUComplexAck { - if casted, ok := structType.(APDUComplexAck); ok { + if casted, ok := structType.(APDUComplexAck); ok { return casted } if casted, ok := structType.(*APDUComplexAck); ok { @@ -212,16 +215,16 @@ func (m *_APDUComplexAck) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (segmentedMessage) - lengthInBits += 1 + lengthInBits += 1; // Simple field (moreFollows) - lengthInBits += 1 + lengthInBits += 1; // Reserved Field (reserved) lengthInBits += 2 // Simple field (originalInvokeId) - lengthInBits += 8 + lengthInBits += 8; // Optional Field (sequenceNumber) if m.SequenceNumber != nil { @@ -255,6 +258,7 @@ func (m *_APDUComplexAck) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_APDUComplexAck) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -273,14 +277,14 @@ func APDUComplexAckParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf _ = currentPos // Simple Field (segmentedMessage) - _segmentedMessage, _segmentedMessageErr := readBuffer.ReadBit("segmentedMessage") +_segmentedMessage, _segmentedMessageErr := readBuffer.ReadBit("segmentedMessage") if _segmentedMessageErr != nil { return nil, errors.Wrap(_segmentedMessageErr, "Error parsing 'segmentedMessage' field of APDUComplexAck") } segmentedMessage := _segmentedMessage // Simple Field (moreFollows) - _moreFollows, _moreFollowsErr := readBuffer.ReadBit("moreFollows") +_moreFollows, _moreFollowsErr := readBuffer.ReadBit("moreFollows") if _moreFollowsErr != nil { return nil, errors.Wrap(_moreFollowsErr, "Error parsing 'moreFollows' field of APDUComplexAck") } @@ -296,7 +300,7 @@ func APDUComplexAckParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf if reserved != uint8(0) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -304,7 +308,7 @@ func APDUComplexAckParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf } // Simple Field (originalInvokeId) - _originalInvokeId, _originalInvokeIdErr := readBuffer.ReadUint8("originalInvokeId", 8) +_originalInvokeId, _originalInvokeIdErr := readBuffer.ReadUint8("originalInvokeId", 8) if _originalInvokeIdErr != nil { return nil, errors.Wrap(_originalInvokeIdErr, "Error parsing 'originalInvokeId' field of APDUComplexAck") } @@ -331,7 +335,7 @@ func APDUComplexAckParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf } // Virtual field - _apduHeaderReduction := uint16(uint16(2)) + uint16((utils.InlineIf(segmentedMessage, func() interface{} { return uint16(uint16(2)) }, func() interface{} { return uint16(uint16(0)) }).(uint16))) + _apduHeaderReduction := uint16(uint16(2)) + uint16((utils.InlineIf(segmentedMessage, func() interface{} {return uint16(uint16(2))}, func() interface{} {return uint16(uint16(0))}).(uint16))) apduHeaderReduction := uint16(_apduHeaderReduction) _ = apduHeaderReduction @@ -342,7 +346,7 @@ func APDUComplexAckParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf if pullErr := readBuffer.PullContext("serviceAck"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for serviceAck") } - _val, _err := BACnetServiceAckParseWithBuffer(ctx, readBuffer, uint32(apduLength)-uint32(apduHeaderReduction)) +_val, _err := BACnetServiceAckParseWithBuffer(ctx, readBuffer , uint32(apduLength) - uint32(apduHeaderReduction) ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -358,13 +362,13 @@ func APDUComplexAckParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf } // Validation - if !(bool((bool(!(segmentedMessage)) && bool(bool((serviceAck) != (nil))))) || bool(segmentedMessage)) { + if (!(bool((bool(!(segmentedMessage)) && bool(bool(((serviceAck)) != (nil))))) || bool(segmentedMessage))) { return nil, errors.WithStack(utils.ParseValidationError{"service ack should be set"}) } // Optional Field (segmentServiceChoice) (Can be skipped, if a given expression evaluates to false) var segmentServiceChoice *BACnetConfirmedServiceChoice = nil - if bool(segmentedMessage) && bool(bool((*sequenceNumber) != (0))) { + if bool(segmentedMessage) && bool(bool(((*sequenceNumber)) != ((0)))) { if pullErr := readBuffer.PullContext("segmentServiceChoice"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for segmentServiceChoice") } @@ -379,13 +383,11 @@ func APDUComplexAckParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf } // Virtual field - _segmentReduction := utils.InlineIf((bool((segmentServiceChoice) != (nil))), func() interface{} { return uint16((uint16(apduHeaderReduction) + uint16(uint16(1)))) }, func() interface{} { return uint16(apduHeaderReduction) }).(uint16) + _segmentReduction := utils.InlineIf((bool(((segmentServiceChoice)) != (nil))), func() interface{} {return uint16((uint16(apduHeaderReduction) + uint16(uint16(1))))}, func() interface{} {return uint16(apduHeaderReduction)}).(uint16) segmentReduction := uint16(_segmentReduction) _ = segmentReduction // Byte Array field (segment) - numberOfBytessegment := int(utils.InlineIf(segmentedMessage, func() interface{} { - return uint16((utils.InlineIf((bool((apduLength) > (0))), func() interface{} { return uint16((uint16(apduLength) - uint16(segmentReduction))) }, func() interface{} { return uint16(uint16(0)) }).(uint16))) - }, func() interface{} { return uint16(uint16(0)) }).(uint16)) + numberOfBytessegment := int(utils.InlineIf(segmentedMessage, func() interface{} {return uint16((utils.InlineIf((bool((apduLength) > ((0)))), func() interface{} {return uint16((uint16(apduLength) - uint16(segmentReduction)))}, func() interface{} {return uint16(uint16(0))}).(uint16)))}, func() interface{} {return uint16(uint16(0))}).(uint16)) segment, _readArrayErr := readBuffer.ReadByteArray("segment", numberOfBytessegment) if _readArrayErr != nil { return nil, errors.Wrap(_readArrayErr, "Error parsing 'segment' field of APDUComplexAck") @@ -400,15 +402,15 @@ func APDUComplexAckParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf _APDU: &_APDU{ ApduLength: apduLength, }, - SegmentedMessage: segmentedMessage, - MoreFollows: moreFollows, - OriginalInvokeId: originalInvokeId, - SequenceNumber: sequenceNumber, - ProposedWindowSize: proposedWindowSize, - ServiceAck: serviceAck, + SegmentedMessage: segmentedMessage, + MoreFollows: moreFollows, + OriginalInvokeId: originalInvokeId, + SequenceNumber: sequenceNumber, + ProposedWindowSize: proposedWindowSize, + ServiceAck: serviceAck, SegmentServiceChoice: segmentServiceChoice, - Segment: segment, - reservedField0: reservedField0, + Segment: segment, + reservedField0: reservedField0, } _child._APDU._APDUChildRequirements = _child return _child, nil @@ -430,108 +432,108 @@ func (m *_APDUComplexAck) SerializeWithWriteBuffer(ctx context.Context, writeBuf return errors.Wrap(pushErr, "Error pushing for APDUComplexAck") } - // Simple Field (segmentedMessage) - segmentedMessage := bool(m.GetSegmentedMessage()) - _segmentedMessageErr := writeBuffer.WriteBit("segmentedMessage", (segmentedMessage)) - if _segmentedMessageErr != nil { - return errors.Wrap(_segmentedMessageErr, "Error serializing 'segmentedMessage' field") - } + // Simple Field (segmentedMessage) + segmentedMessage := bool(m.GetSegmentedMessage()) + _segmentedMessageErr := writeBuffer.WriteBit("segmentedMessage", (segmentedMessage)) + if _segmentedMessageErr != nil { + return errors.Wrap(_segmentedMessageErr, "Error serializing 'segmentedMessage' field") + } - // Simple Field (moreFollows) - moreFollows := bool(m.GetMoreFollows()) - _moreFollowsErr := writeBuffer.WriteBit("moreFollows", (moreFollows)) - if _moreFollowsErr != nil { - return errors.Wrap(_moreFollowsErr, "Error serializing 'moreFollows' field") - } + // Simple Field (moreFollows) + moreFollows := bool(m.GetMoreFollows()) + _moreFollowsErr := writeBuffer.WriteBit("moreFollows", (moreFollows)) + if _moreFollowsErr != nil { + return errors.Wrap(_moreFollowsErr, "Error serializing 'moreFollows' field") + } - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteUint8("reserved", 2, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 } + _err := writeBuffer.WriteUint8("reserved", 2, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") + } + } + + // Simple Field (originalInvokeId) + originalInvokeId := uint8(m.GetOriginalInvokeId()) + _originalInvokeIdErr := writeBuffer.WriteUint8("originalInvokeId", 8, (originalInvokeId)) + if _originalInvokeIdErr != nil { + return errors.Wrap(_originalInvokeIdErr, "Error serializing 'originalInvokeId' field") + } - // Simple Field (originalInvokeId) - originalInvokeId := uint8(m.GetOriginalInvokeId()) - _originalInvokeIdErr := writeBuffer.WriteUint8("originalInvokeId", 8, (originalInvokeId)) - if _originalInvokeIdErr != nil { - return errors.Wrap(_originalInvokeIdErr, "Error serializing 'originalInvokeId' field") + // Optional Field (sequenceNumber) (Can be skipped, if the value is null) + var sequenceNumber *uint8 = nil + if m.GetSequenceNumber() != nil { + sequenceNumber = m.GetSequenceNumber() + _sequenceNumberErr := writeBuffer.WriteUint8("sequenceNumber", 8, *(sequenceNumber)) + if _sequenceNumberErr != nil { + return errors.Wrap(_sequenceNumberErr, "Error serializing 'sequenceNumber' field") } + } - // Optional Field (sequenceNumber) (Can be skipped, if the value is null) - var sequenceNumber *uint8 = nil - if m.GetSequenceNumber() != nil { - sequenceNumber = m.GetSequenceNumber() - _sequenceNumberErr := writeBuffer.WriteUint8("sequenceNumber", 8, *(sequenceNumber)) - if _sequenceNumberErr != nil { - return errors.Wrap(_sequenceNumberErr, "Error serializing 'sequenceNumber' field") - } + // Optional Field (proposedWindowSize) (Can be skipped, if the value is null) + var proposedWindowSize *uint8 = nil + if m.GetProposedWindowSize() != nil { + proposedWindowSize = m.GetProposedWindowSize() + _proposedWindowSizeErr := writeBuffer.WriteUint8("proposedWindowSize", 8, *(proposedWindowSize)) + if _proposedWindowSizeErr != nil { + return errors.Wrap(_proposedWindowSizeErr, "Error serializing 'proposedWindowSize' field") } + } + // Virtual field + if _apduHeaderReductionErr := writeBuffer.WriteVirtual(ctx, "apduHeaderReduction", m.GetApduHeaderReduction()); _apduHeaderReductionErr != nil { + return errors.Wrap(_apduHeaderReductionErr, "Error serializing 'apduHeaderReduction' field") + } - // Optional Field (proposedWindowSize) (Can be skipped, if the value is null) - var proposedWindowSize *uint8 = nil - if m.GetProposedWindowSize() != nil { - proposedWindowSize = m.GetProposedWindowSize() - _proposedWindowSizeErr := writeBuffer.WriteUint8("proposedWindowSize", 8, *(proposedWindowSize)) - if _proposedWindowSizeErr != nil { - return errors.Wrap(_proposedWindowSizeErr, "Error serializing 'proposedWindowSize' field") - } + // Optional Field (serviceAck) (Can be skipped, if the value is null) + var serviceAck BACnetServiceAck = nil + if m.GetServiceAck() != nil { + if pushErr := writeBuffer.PushContext("serviceAck"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for serviceAck") } - // Virtual field - if _apduHeaderReductionErr := writeBuffer.WriteVirtual(ctx, "apduHeaderReduction", m.GetApduHeaderReduction()); _apduHeaderReductionErr != nil { - return errors.Wrap(_apduHeaderReductionErr, "Error serializing 'apduHeaderReduction' field") + serviceAck = m.GetServiceAck() + _serviceAckErr := writeBuffer.WriteSerializable(ctx, serviceAck) + if popErr := writeBuffer.PopContext("serviceAck"); popErr != nil { + return errors.Wrap(popErr, "Error popping for serviceAck") } - - // Optional Field (serviceAck) (Can be skipped, if the value is null) - var serviceAck BACnetServiceAck = nil - if m.GetServiceAck() != nil { - if pushErr := writeBuffer.PushContext("serviceAck"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for serviceAck") - } - serviceAck = m.GetServiceAck() - _serviceAckErr := writeBuffer.WriteSerializable(ctx, serviceAck) - if popErr := writeBuffer.PopContext("serviceAck"); popErr != nil { - return errors.Wrap(popErr, "Error popping for serviceAck") - } - if _serviceAckErr != nil { - return errors.Wrap(_serviceAckErr, "Error serializing 'serviceAck' field") - } + if _serviceAckErr != nil { + return errors.Wrap(_serviceAckErr, "Error serializing 'serviceAck' field") } + } - // Optional Field (segmentServiceChoice) (Can be skipped, if the value is null) - var segmentServiceChoice *BACnetConfirmedServiceChoice = nil - if m.GetSegmentServiceChoice() != nil { - if pushErr := writeBuffer.PushContext("segmentServiceChoice"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for segmentServiceChoice") - } - segmentServiceChoice = m.GetSegmentServiceChoice() - _segmentServiceChoiceErr := writeBuffer.WriteSerializable(ctx, segmentServiceChoice) - if popErr := writeBuffer.PopContext("segmentServiceChoice"); popErr != nil { - return errors.Wrap(popErr, "Error popping for segmentServiceChoice") - } - if _segmentServiceChoiceErr != nil { - return errors.Wrap(_segmentServiceChoiceErr, "Error serializing 'segmentServiceChoice' field") - } + // Optional Field (segmentServiceChoice) (Can be skipped, if the value is null) + var segmentServiceChoice *BACnetConfirmedServiceChoice = nil + if m.GetSegmentServiceChoice() != nil { + if pushErr := writeBuffer.PushContext("segmentServiceChoice"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for segmentServiceChoice") } - // Virtual field - if _segmentReductionErr := writeBuffer.WriteVirtual(ctx, "segmentReduction", m.GetSegmentReduction()); _segmentReductionErr != nil { - return errors.Wrap(_segmentReductionErr, "Error serializing 'segmentReduction' field") + segmentServiceChoice = m.GetSegmentServiceChoice() + _segmentServiceChoiceErr := writeBuffer.WriteSerializable(ctx, segmentServiceChoice) + if popErr := writeBuffer.PopContext("segmentServiceChoice"); popErr != nil { + return errors.Wrap(popErr, "Error popping for segmentServiceChoice") } - - // Array Field (segment) - // Byte Array field (segment) - if err := writeBuffer.WriteByteArray("segment", m.GetSegment()); err != nil { - return errors.Wrap(err, "Error serializing 'segment' field") + if _segmentServiceChoiceErr != nil { + return errors.Wrap(_segmentServiceChoiceErr, "Error serializing 'segmentServiceChoice' field") } + } + // Virtual field + if _segmentReductionErr := writeBuffer.WriteVirtual(ctx, "segmentReduction", m.GetSegmentReduction()); _segmentReductionErr != nil { + return errors.Wrap(_segmentReductionErr, "Error serializing 'segmentReduction' field") + } + + // Array Field (segment) + // Byte Array field (segment) + if err := writeBuffer.WriteByteArray("segment", m.GetSegment()); err != nil { + return errors.Wrap(err, "Error serializing 'segment' field") + } if popErr := writeBuffer.PopContext("APDUComplexAck"); popErr != nil { return errors.Wrap(popErr, "Error popping for APDUComplexAck") @@ -541,6 +543,7 @@ func (m *_APDUComplexAck) SerializeWithWriteBuffer(ctx context.Context, writeBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_APDUComplexAck) isAPDUComplexAck() bool { return true } @@ -555,3 +558,6 @@ func (m *_APDUComplexAck) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/APDUConfirmedRequest.go b/plc4go/protocols/bacnetip/readwrite/model/APDUConfirmedRequest.go index d6fd8ff9ea6..78cfea53ba2 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/APDUConfirmedRequest.go +++ b/plc4go/protocols/bacnetip/readwrite/model/APDUConfirmedRequest.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // APDUConfirmedRequest is the corresponding interface of APDUConfirmedRequest type APDUConfirmedRequest interface { @@ -71,41 +73,41 @@ type APDUConfirmedRequestExactly interface { // _APDUConfirmedRequest is the data-structure of this message type _APDUConfirmedRequest struct { *_APDU - SegmentedMessage bool - MoreFollows bool - SegmentedResponseAccepted bool - MaxSegmentsAccepted MaxSegmentsAccepted - MaxApduLengthAccepted MaxApduLengthAccepted - InvokeId uint8 - SequenceNumber *uint8 - ProposedWindowSize *uint8 - ServiceRequest BACnetConfirmedServiceRequest - SegmentServiceChoice *BACnetConfirmedServiceChoice - Segment []byte + SegmentedMessage bool + MoreFollows bool + SegmentedResponseAccepted bool + MaxSegmentsAccepted MaxSegmentsAccepted + MaxApduLengthAccepted MaxApduLengthAccepted + InvokeId uint8 + SequenceNumber *uint8 + ProposedWindowSize *uint8 + ServiceRequest BACnetConfirmedServiceRequest + SegmentServiceChoice *BACnetConfirmedServiceChoice + Segment []byte // Reserved Fields reservedField0 *uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_APDUConfirmedRequest) GetApduType() ApduType { - return ApduType_CONFIRMED_REQUEST_PDU -} +func (m *_APDUConfirmedRequest) GetApduType() ApduType { +return ApduType_CONFIRMED_REQUEST_PDU} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_APDUConfirmedRequest) InitializeParent(parent APDU) {} +func (m *_APDUConfirmedRequest) InitializeParent(parent APDU ) {} -func (m *_APDUConfirmedRequest) GetParent() APDU { +func (m *_APDUConfirmedRequest) GetParent() APDU { return m._APDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -175,7 +177,7 @@ func (m *_APDUConfirmedRequest) GetApduHeaderReduction() uint16 { _ = serviceRequest segmentServiceChoice := m.SegmentServiceChoice _ = segmentServiceChoice - return uint16(uint16(uint16(3)) + uint16((utils.InlineIf(m.GetSegmentedMessage(), func() interface{} { return uint16(uint16(2)) }, func() interface{} { return uint16(uint16(0)) }).(uint16)))) + return uint16(uint16(uint16(3)) + uint16((utils.InlineIf(m.GetSegmentedMessage(), func() interface{} {return uint16(uint16(2))}, func() interface{} {return uint16(uint16(0))}).(uint16)))) } func (m *_APDUConfirmedRequest) GetSegmentReduction() uint16 { @@ -189,7 +191,7 @@ func (m *_APDUConfirmedRequest) GetSegmentReduction() uint16 { _ = serviceRequest segmentServiceChoice := m.SegmentServiceChoice _ = segmentServiceChoice - return uint16(utils.InlineIf((bool((m.GetSegmentServiceChoice()) != (nil))), func() interface{} { return uint16((uint16(m.GetApduHeaderReduction()) + uint16(uint16(1)))) }, func() interface{} { return uint16(m.GetApduHeaderReduction()) }).(uint16)) + return uint16(utils.InlineIf((bool(((m.GetSegmentServiceChoice())) != (nil))), func() interface{} {return uint16((uint16(m.GetApduHeaderReduction()) + uint16(uint16(1))))}, func() interface{} {return uint16(m.GetApduHeaderReduction())}).(uint16)) } /////////////////////// @@ -197,21 +199,22 @@ func (m *_APDUConfirmedRequest) GetSegmentReduction() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAPDUConfirmedRequest factory function for _APDUConfirmedRequest -func NewAPDUConfirmedRequest(segmentedMessage bool, moreFollows bool, segmentedResponseAccepted bool, maxSegmentsAccepted MaxSegmentsAccepted, maxApduLengthAccepted MaxApduLengthAccepted, invokeId uint8, sequenceNumber *uint8, proposedWindowSize *uint8, serviceRequest BACnetConfirmedServiceRequest, segmentServiceChoice *BACnetConfirmedServiceChoice, segment []byte, apduLength uint16) *_APDUConfirmedRequest { +func NewAPDUConfirmedRequest( segmentedMessage bool , moreFollows bool , segmentedResponseAccepted bool , maxSegmentsAccepted MaxSegmentsAccepted , maxApduLengthAccepted MaxApduLengthAccepted , invokeId uint8 , sequenceNumber *uint8 , proposedWindowSize *uint8 , serviceRequest BACnetConfirmedServiceRequest , segmentServiceChoice *BACnetConfirmedServiceChoice , segment []byte , apduLength uint16 ) *_APDUConfirmedRequest { _result := &_APDUConfirmedRequest{ - SegmentedMessage: segmentedMessage, - MoreFollows: moreFollows, + SegmentedMessage: segmentedMessage, + MoreFollows: moreFollows, SegmentedResponseAccepted: segmentedResponseAccepted, - MaxSegmentsAccepted: maxSegmentsAccepted, - MaxApduLengthAccepted: maxApduLengthAccepted, - InvokeId: invokeId, - SequenceNumber: sequenceNumber, - ProposedWindowSize: proposedWindowSize, - ServiceRequest: serviceRequest, - SegmentServiceChoice: segmentServiceChoice, - Segment: segment, - _APDU: NewAPDU(apduLength), + MaxSegmentsAccepted: maxSegmentsAccepted, + MaxApduLengthAccepted: maxApduLengthAccepted, + InvokeId: invokeId, + SequenceNumber: sequenceNumber, + ProposedWindowSize: proposedWindowSize, + ServiceRequest: serviceRequest, + SegmentServiceChoice: segmentServiceChoice, + Segment: segment, + _APDU: NewAPDU(apduLength), } _result._APDU._APDUChildRequirements = _result return _result @@ -219,7 +222,7 @@ func NewAPDUConfirmedRequest(segmentedMessage bool, moreFollows bool, segmentedR // Deprecated: use the interface for direct cast func CastAPDUConfirmedRequest(structType interface{}) APDUConfirmedRequest { - if casted, ok := structType.(APDUConfirmedRequest); ok { + if casted, ok := structType.(APDUConfirmedRequest); ok { return casted } if casted, ok := structType.(*APDUConfirmedRequest); ok { @@ -236,13 +239,13 @@ func (m *_APDUConfirmedRequest) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (segmentedMessage) - lengthInBits += 1 + lengthInBits += 1; // Simple field (moreFollows) - lengthInBits += 1 + lengthInBits += 1; // Simple field (segmentedResponseAccepted) - lengthInBits += 1 + lengthInBits += 1; // Reserved Field (reserved) lengthInBits += 2 @@ -254,7 +257,7 @@ func (m *_APDUConfirmedRequest) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += 4 // Simple field (invokeId) - lengthInBits += 8 + lengthInBits += 8; // Optional Field (sequenceNumber) if m.SequenceNumber != nil { @@ -288,6 +291,7 @@ func (m *_APDUConfirmedRequest) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_APDUConfirmedRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -306,21 +310,21 @@ func APDUConfirmedRequestParseWithBuffer(ctx context.Context, readBuffer utils.R _ = currentPos // Simple Field (segmentedMessage) - _segmentedMessage, _segmentedMessageErr := readBuffer.ReadBit("segmentedMessage") +_segmentedMessage, _segmentedMessageErr := readBuffer.ReadBit("segmentedMessage") if _segmentedMessageErr != nil { return nil, errors.Wrap(_segmentedMessageErr, "Error parsing 'segmentedMessage' field of APDUConfirmedRequest") } segmentedMessage := _segmentedMessage // Simple Field (moreFollows) - _moreFollows, _moreFollowsErr := readBuffer.ReadBit("moreFollows") +_moreFollows, _moreFollowsErr := readBuffer.ReadBit("moreFollows") if _moreFollowsErr != nil { return nil, errors.Wrap(_moreFollowsErr, "Error parsing 'moreFollows' field of APDUConfirmedRequest") } moreFollows := _moreFollows // Simple Field (segmentedResponseAccepted) - _segmentedResponseAccepted, _segmentedResponseAcceptedErr := readBuffer.ReadBit("segmentedResponseAccepted") +_segmentedResponseAccepted, _segmentedResponseAcceptedErr := readBuffer.ReadBit("segmentedResponseAccepted") if _segmentedResponseAcceptedErr != nil { return nil, errors.Wrap(_segmentedResponseAcceptedErr, "Error parsing 'segmentedResponseAccepted' field of APDUConfirmedRequest") } @@ -336,7 +340,7 @@ func APDUConfirmedRequestParseWithBuffer(ctx context.Context, readBuffer utils.R if reserved != uint8(0) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -347,7 +351,7 @@ func APDUConfirmedRequestParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("maxSegmentsAccepted"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for maxSegmentsAccepted") } - _maxSegmentsAccepted, _maxSegmentsAcceptedErr := MaxSegmentsAcceptedParseWithBuffer(ctx, readBuffer) +_maxSegmentsAccepted, _maxSegmentsAcceptedErr := MaxSegmentsAcceptedParseWithBuffer(ctx, readBuffer) if _maxSegmentsAcceptedErr != nil { return nil, errors.Wrap(_maxSegmentsAcceptedErr, "Error parsing 'maxSegmentsAccepted' field of APDUConfirmedRequest") } @@ -360,7 +364,7 @@ func APDUConfirmedRequestParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("maxApduLengthAccepted"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for maxApduLengthAccepted") } - _maxApduLengthAccepted, _maxApduLengthAcceptedErr := MaxApduLengthAcceptedParseWithBuffer(ctx, readBuffer) +_maxApduLengthAccepted, _maxApduLengthAcceptedErr := MaxApduLengthAcceptedParseWithBuffer(ctx, readBuffer) if _maxApduLengthAcceptedErr != nil { return nil, errors.Wrap(_maxApduLengthAcceptedErr, "Error parsing 'maxApduLengthAccepted' field of APDUConfirmedRequest") } @@ -370,7 +374,7 @@ func APDUConfirmedRequestParseWithBuffer(ctx context.Context, readBuffer utils.R } // Simple Field (invokeId) - _invokeId, _invokeIdErr := readBuffer.ReadUint8("invokeId", 8) +_invokeId, _invokeIdErr := readBuffer.ReadUint8("invokeId", 8) if _invokeIdErr != nil { return nil, errors.Wrap(_invokeIdErr, "Error parsing 'invokeId' field of APDUConfirmedRequest") } @@ -397,7 +401,7 @@ func APDUConfirmedRequestParseWithBuffer(ctx context.Context, readBuffer utils.R } // Virtual field - _apduHeaderReduction := uint16(uint16(3)) + uint16((utils.InlineIf(segmentedMessage, func() interface{} { return uint16(uint16(2)) }, func() interface{} { return uint16(uint16(0)) }).(uint16))) + _apduHeaderReduction := uint16(uint16(3)) + uint16((utils.InlineIf(segmentedMessage, func() interface{} {return uint16(uint16(2))}, func() interface{} {return uint16(uint16(0))}).(uint16))) apduHeaderReduction := uint16(_apduHeaderReduction) _ = apduHeaderReduction @@ -408,7 +412,7 @@ func APDUConfirmedRequestParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("serviceRequest"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for serviceRequest") } - _val, _err := BACnetConfirmedServiceRequestParseWithBuffer(ctx, readBuffer, uint32(apduLength)-uint32(apduHeaderReduction)) +_val, _err := BACnetConfirmedServiceRequestParseWithBuffer(ctx, readBuffer , uint32(apduLength) - uint32(apduHeaderReduction) ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -424,13 +428,13 @@ func APDUConfirmedRequestParseWithBuffer(ctx context.Context, readBuffer utils.R } // Validation - if !(bool((bool(!(segmentedMessage)) && bool(bool((serviceRequest) != (nil))))) || bool(segmentedMessage)) { + if (!(bool((bool(!(segmentedMessage)) && bool(bool(((serviceRequest)) != (nil))))) || bool(segmentedMessage))) { return nil, errors.WithStack(utils.ParseValidationError{"service request should be set"}) } // Optional Field (segmentServiceChoice) (Can be skipped, if a given expression evaluates to false) var segmentServiceChoice *BACnetConfirmedServiceChoice = nil - if bool(segmentedMessage) && bool(bool((*sequenceNumber) != (0))) { + if bool(segmentedMessage) && bool(bool(((*sequenceNumber)) != ((0)))) { if pullErr := readBuffer.PullContext("segmentServiceChoice"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for segmentServiceChoice") } @@ -445,13 +449,11 @@ func APDUConfirmedRequestParseWithBuffer(ctx context.Context, readBuffer utils.R } // Virtual field - _segmentReduction := utils.InlineIf((bool((segmentServiceChoice) != (nil))), func() interface{} { return uint16((uint16(apduHeaderReduction) + uint16(uint16(1)))) }, func() interface{} { return uint16(apduHeaderReduction) }).(uint16) + _segmentReduction := utils.InlineIf((bool(((segmentServiceChoice)) != (nil))), func() interface{} {return uint16((uint16(apduHeaderReduction) + uint16(uint16(1))))}, func() interface{} {return uint16(apduHeaderReduction)}).(uint16) segmentReduction := uint16(_segmentReduction) _ = segmentReduction // Byte Array field (segment) - numberOfBytessegment := int(utils.InlineIf(segmentedMessage, func() interface{} { - return uint16((utils.InlineIf((bool((apduLength) > (0))), func() interface{} { return uint16((uint16(apduLength) - uint16(segmentReduction))) }, func() interface{} { return uint16(uint16(0)) }).(uint16))) - }, func() interface{} { return uint16(uint16(0)) }).(uint16)) + numberOfBytessegment := int(utils.InlineIf(segmentedMessage, func() interface{} {return uint16((utils.InlineIf((bool((apduLength) > ((0)))), func() interface{} {return uint16((uint16(apduLength) - uint16(segmentReduction)))}, func() interface{} {return uint16(uint16(0))}).(uint16)))}, func() interface{} {return uint16(uint16(0))}).(uint16)) segment, _readArrayErr := readBuffer.ReadByteArray("segment", numberOfBytessegment) if _readArrayErr != nil { return nil, errors.Wrap(_readArrayErr, "Error parsing 'segment' field of APDUConfirmedRequest") @@ -466,18 +468,18 @@ func APDUConfirmedRequestParseWithBuffer(ctx context.Context, readBuffer utils.R _APDU: &_APDU{ ApduLength: apduLength, }, - SegmentedMessage: segmentedMessage, - MoreFollows: moreFollows, + SegmentedMessage: segmentedMessage, + MoreFollows: moreFollows, SegmentedResponseAccepted: segmentedResponseAccepted, - MaxSegmentsAccepted: maxSegmentsAccepted, - MaxApduLengthAccepted: maxApduLengthAccepted, - InvokeId: invokeId, - SequenceNumber: sequenceNumber, - ProposedWindowSize: proposedWindowSize, - ServiceRequest: serviceRequest, - SegmentServiceChoice: segmentServiceChoice, - Segment: segment, - reservedField0: reservedField0, + MaxSegmentsAccepted: maxSegmentsAccepted, + MaxApduLengthAccepted: maxApduLengthAccepted, + InvokeId: invokeId, + SequenceNumber: sequenceNumber, + ProposedWindowSize: proposedWindowSize, + ServiceRequest: serviceRequest, + SegmentServiceChoice: segmentServiceChoice, + Segment: segment, + reservedField0: reservedField0, } _child._APDU._APDUChildRequirements = _child return _child, nil @@ -499,139 +501,139 @@ func (m *_APDUConfirmedRequest) SerializeWithWriteBuffer(ctx context.Context, wr return errors.Wrap(pushErr, "Error pushing for APDUConfirmedRequest") } - // Simple Field (segmentedMessage) - segmentedMessage := bool(m.GetSegmentedMessage()) - _segmentedMessageErr := writeBuffer.WriteBit("segmentedMessage", (segmentedMessage)) - if _segmentedMessageErr != nil { - return errors.Wrap(_segmentedMessageErr, "Error serializing 'segmentedMessage' field") - } - - // Simple Field (moreFollows) - moreFollows := bool(m.GetMoreFollows()) - _moreFollowsErr := writeBuffer.WriteBit("moreFollows", (moreFollows)) - if _moreFollowsErr != nil { - return errors.Wrap(_moreFollowsErr, "Error serializing 'moreFollows' field") - } + // Simple Field (segmentedMessage) + segmentedMessage := bool(m.GetSegmentedMessage()) + _segmentedMessageErr := writeBuffer.WriteBit("segmentedMessage", (segmentedMessage)) + if _segmentedMessageErr != nil { + return errors.Wrap(_segmentedMessageErr, "Error serializing 'segmentedMessage' field") + } - // Simple Field (segmentedResponseAccepted) - segmentedResponseAccepted := bool(m.GetSegmentedResponseAccepted()) - _segmentedResponseAcceptedErr := writeBuffer.WriteBit("segmentedResponseAccepted", (segmentedResponseAccepted)) - if _segmentedResponseAcceptedErr != nil { - return errors.Wrap(_segmentedResponseAcceptedErr, "Error serializing 'segmentedResponseAccepted' field") - } + // Simple Field (moreFollows) + moreFollows := bool(m.GetMoreFollows()) + _moreFollowsErr := writeBuffer.WriteBit("moreFollows", (moreFollows)) + if _moreFollowsErr != nil { + return errors.Wrap(_moreFollowsErr, "Error serializing 'moreFollows' field") + } - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteUint8("reserved", 2, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } - } + // Simple Field (segmentedResponseAccepted) + segmentedResponseAccepted := bool(m.GetSegmentedResponseAccepted()) + _segmentedResponseAcceptedErr := writeBuffer.WriteBit("segmentedResponseAccepted", (segmentedResponseAccepted)) + if _segmentedResponseAcceptedErr != nil { + return errors.Wrap(_segmentedResponseAcceptedErr, "Error serializing 'segmentedResponseAccepted' field") + } - // Simple Field (maxSegmentsAccepted) - if pushErr := writeBuffer.PushContext("maxSegmentsAccepted"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for maxSegmentsAccepted") - } - _maxSegmentsAcceptedErr := writeBuffer.WriteSerializable(ctx, m.GetMaxSegmentsAccepted()) - if popErr := writeBuffer.PopContext("maxSegmentsAccepted"); popErr != nil { - return errors.Wrap(popErr, "Error popping for maxSegmentsAccepted") + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 } - if _maxSegmentsAcceptedErr != nil { - return errors.Wrap(_maxSegmentsAcceptedErr, "Error serializing 'maxSegmentsAccepted' field") + _err := writeBuffer.WriteUint8("reserved", 2, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } - // Simple Field (maxApduLengthAccepted) - if pushErr := writeBuffer.PushContext("maxApduLengthAccepted"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for maxApduLengthAccepted") - } - _maxApduLengthAcceptedErr := writeBuffer.WriteSerializable(ctx, m.GetMaxApduLengthAccepted()) - if popErr := writeBuffer.PopContext("maxApduLengthAccepted"); popErr != nil { - return errors.Wrap(popErr, "Error popping for maxApduLengthAccepted") - } - if _maxApduLengthAcceptedErr != nil { - return errors.Wrap(_maxApduLengthAcceptedErr, "Error serializing 'maxApduLengthAccepted' field") - } + // Simple Field (maxSegmentsAccepted) + if pushErr := writeBuffer.PushContext("maxSegmentsAccepted"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for maxSegmentsAccepted") + } + _maxSegmentsAcceptedErr := writeBuffer.WriteSerializable(ctx, m.GetMaxSegmentsAccepted()) + if popErr := writeBuffer.PopContext("maxSegmentsAccepted"); popErr != nil { + return errors.Wrap(popErr, "Error popping for maxSegmentsAccepted") + } + if _maxSegmentsAcceptedErr != nil { + return errors.Wrap(_maxSegmentsAcceptedErr, "Error serializing 'maxSegmentsAccepted' field") + } - // Simple Field (invokeId) - invokeId := uint8(m.GetInvokeId()) - _invokeIdErr := writeBuffer.WriteUint8("invokeId", 8, (invokeId)) - if _invokeIdErr != nil { - return errors.Wrap(_invokeIdErr, "Error serializing 'invokeId' field") + // Simple Field (maxApduLengthAccepted) + if pushErr := writeBuffer.PushContext("maxApduLengthAccepted"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for maxApduLengthAccepted") + } + _maxApduLengthAcceptedErr := writeBuffer.WriteSerializable(ctx, m.GetMaxApduLengthAccepted()) + if popErr := writeBuffer.PopContext("maxApduLengthAccepted"); popErr != nil { + return errors.Wrap(popErr, "Error popping for maxApduLengthAccepted") + } + if _maxApduLengthAcceptedErr != nil { + return errors.Wrap(_maxApduLengthAcceptedErr, "Error serializing 'maxApduLengthAccepted' field") + } + + // Simple Field (invokeId) + invokeId := uint8(m.GetInvokeId()) + _invokeIdErr := writeBuffer.WriteUint8("invokeId", 8, (invokeId)) + if _invokeIdErr != nil { + return errors.Wrap(_invokeIdErr, "Error serializing 'invokeId' field") + } + + // Optional Field (sequenceNumber) (Can be skipped, if the value is null) + var sequenceNumber *uint8 = nil + if m.GetSequenceNumber() != nil { + sequenceNumber = m.GetSequenceNumber() + _sequenceNumberErr := writeBuffer.WriteUint8("sequenceNumber", 8, *(sequenceNumber)) + if _sequenceNumberErr != nil { + return errors.Wrap(_sequenceNumberErr, "Error serializing 'sequenceNumber' field") } + } - // Optional Field (sequenceNumber) (Can be skipped, if the value is null) - var sequenceNumber *uint8 = nil - if m.GetSequenceNumber() != nil { - sequenceNumber = m.GetSequenceNumber() - _sequenceNumberErr := writeBuffer.WriteUint8("sequenceNumber", 8, *(sequenceNumber)) - if _sequenceNumberErr != nil { - return errors.Wrap(_sequenceNumberErr, "Error serializing 'sequenceNumber' field") - } + // Optional Field (proposedWindowSize) (Can be skipped, if the value is null) + var proposedWindowSize *uint8 = nil + if m.GetProposedWindowSize() != nil { + proposedWindowSize = m.GetProposedWindowSize() + _proposedWindowSizeErr := writeBuffer.WriteUint8("proposedWindowSize", 8, *(proposedWindowSize)) + if _proposedWindowSizeErr != nil { + return errors.Wrap(_proposedWindowSizeErr, "Error serializing 'proposedWindowSize' field") } + } + // Virtual field + if _apduHeaderReductionErr := writeBuffer.WriteVirtual(ctx, "apduHeaderReduction", m.GetApduHeaderReduction()); _apduHeaderReductionErr != nil { + return errors.Wrap(_apduHeaderReductionErr, "Error serializing 'apduHeaderReduction' field") + } - // Optional Field (proposedWindowSize) (Can be skipped, if the value is null) - var proposedWindowSize *uint8 = nil - if m.GetProposedWindowSize() != nil { - proposedWindowSize = m.GetProposedWindowSize() - _proposedWindowSizeErr := writeBuffer.WriteUint8("proposedWindowSize", 8, *(proposedWindowSize)) - if _proposedWindowSizeErr != nil { - return errors.Wrap(_proposedWindowSizeErr, "Error serializing 'proposedWindowSize' field") - } + // Optional Field (serviceRequest) (Can be skipped, if the value is null) + var serviceRequest BACnetConfirmedServiceRequest = nil + if m.GetServiceRequest() != nil { + if pushErr := writeBuffer.PushContext("serviceRequest"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for serviceRequest") } - // Virtual field - if _apduHeaderReductionErr := writeBuffer.WriteVirtual(ctx, "apduHeaderReduction", m.GetApduHeaderReduction()); _apduHeaderReductionErr != nil { - return errors.Wrap(_apduHeaderReductionErr, "Error serializing 'apduHeaderReduction' field") + serviceRequest = m.GetServiceRequest() + _serviceRequestErr := writeBuffer.WriteSerializable(ctx, serviceRequest) + if popErr := writeBuffer.PopContext("serviceRequest"); popErr != nil { + return errors.Wrap(popErr, "Error popping for serviceRequest") } - - // Optional Field (serviceRequest) (Can be skipped, if the value is null) - var serviceRequest BACnetConfirmedServiceRequest = nil - if m.GetServiceRequest() != nil { - if pushErr := writeBuffer.PushContext("serviceRequest"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for serviceRequest") - } - serviceRequest = m.GetServiceRequest() - _serviceRequestErr := writeBuffer.WriteSerializable(ctx, serviceRequest) - if popErr := writeBuffer.PopContext("serviceRequest"); popErr != nil { - return errors.Wrap(popErr, "Error popping for serviceRequest") - } - if _serviceRequestErr != nil { - return errors.Wrap(_serviceRequestErr, "Error serializing 'serviceRequest' field") - } + if _serviceRequestErr != nil { + return errors.Wrap(_serviceRequestErr, "Error serializing 'serviceRequest' field") } + } - // Optional Field (segmentServiceChoice) (Can be skipped, if the value is null) - var segmentServiceChoice *BACnetConfirmedServiceChoice = nil - if m.GetSegmentServiceChoice() != nil { - if pushErr := writeBuffer.PushContext("segmentServiceChoice"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for segmentServiceChoice") - } - segmentServiceChoice = m.GetSegmentServiceChoice() - _segmentServiceChoiceErr := writeBuffer.WriteSerializable(ctx, segmentServiceChoice) - if popErr := writeBuffer.PopContext("segmentServiceChoice"); popErr != nil { - return errors.Wrap(popErr, "Error popping for segmentServiceChoice") - } - if _segmentServiceChoiceErr != nil { - return errors.Wrap(_segmentServiceChoiceErr, "Error serializing 'segmentServiceChoice' field") - } + // Optional Field (segmentServiceChoice) (Can be skipped, if the value is null) + var segmentServiceChoice *BACnetConfirmedServiceChoice = nil + if m.GetSegmentServiceChoice() != nil { + if pushErr := writeBuffer.PushContext("segmentServiceChoice"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for segmentServiceChoice") } - // Virtual field - if _segmentReductionErr := writeBuffer.WriteVirtual(ctx, "segmentReduction", m.GetSegmentReduction()); _segmentReductionErr != nil { - return errors.Wrap(_segmentReductionErr, "Error serializing 'segmentReduction' field") + segmentServiceChoice = m.GetSegmentServiceChoice() + _segmentServiceChoiceErr := writeBuffer.WriteSerializable(ctx, segmentServiceChoice) + if popErr := writeBuffer.PopContext("segmentServiceChoice"); popErr != nil { + return errors.Wrap(popErr, "Error popping for segmentServiceChoice") } - - // Array Field (segment) - // Byte Array field (segment) - if err := writeBuffer.WriteByteArray("segment", m.GetSegment()); err != nil { - return errors.Wrap(err, "Error serializing 'segment' field") + if _segmentServiceChoiceErr != nil { + return errors.Wrap(_segmentServiceChoiceErr, "Error serializing 'segmentServiceChoice' field") } + } + // Virtual field + if _segmentReductionErr := writeBuffer.WriteVirtual(ctx, "segmentReduction", m.GetSegmentReduction()); _segmentReductionErr != nil { + return errors.Wrap(_segmentReductionErr, "Error serializing 'segmentReduction' field") + } + + // Array Field (segment) + // Byte Array field (segment) + if err := writeBuffer.WriteByteArray("segment", m.GetSegment()); err != nil { + return errors.Wrap(err, "Error serializing 'segment' field") + } if popErr := writeBuffer.PopContext("APDUConfirmedRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for APDUConfirmedRequest") @@ -641,6 +643,7 @@ func (m *_APDUConfirmedRequest) SerializeWithWriteBuffer(ctx context.Context, wr return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_APDUConfirmedRequest) isAPDUConfirmedRequest() bool { return true } @@ -655,3 +658,6 @@ func (m *_APDUConfirmedRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/APDUError.go b/plc4go/protocols/bacnetip/readwrite/model/APDUError.go index 6916fe5d5a5..847d69147f5 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/APDUError.go +++ b/plc4go/protocols/bacnetip/readwrite/model/APDUError.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // APDUError is the corresponding interface of APDUError type APDUError interface { @@ -50,33 +52,33 @@ type APDUErrorExactly interface { // _APDUError is the data-structure of this message type _APDUError struct { *_APDU - OriginalInvokeId uint8 - ErrorChoice BACnetConfirmedServiceChoice - Error BACnetError + OriginalInvokeId uint8 + ErrorChoice BACnetConfirmedServiceChoice + Error BACnetError // Reserved Fields reservedField0 *uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_APDUError) GetApduType() ApduType { - return ApduType_ERROR_PDU -} +func (m *_APDUError) GetApduType() ApduType { +return ApduType_ERROR_PDU} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_APDUError) InitializeParent(parent APDU) {} +func (m *_APDUError) InitializeParent(parent APDU ) {} -func (m *_APDUError) GetParent() APDU { +func (m *_APDUError) GetParent() APDU { return m._APDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -99,13 +101,14 @@ func (m *_APDUError) GetError() BACnetError { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAPDUError factory function for _APDUError -func NewAPDUError(originalInvokeId uint8, errorChoice BACnetConfirmedServiceChoice, error BACnetError, apduLength uint16) *_APDUError { +func NewAPDUError( originalInvokeId uint8 , errorChoice BACnetConfirmedServiceChoice , error BACnetError , apduLength uint16 ) *_APDUError { _result := &_APDUError{ OriginalInvokeId: originalInvokeId, - ErrorChoice: errorChoice, - Error: error, - _APDU: NewAPDU(apduLength), + ErrorChoice: errorChoice, + Error: error, + _APDU: NewAPDU(apduLength), } _result._APDU._APDUChildRequirements = _result return _result @@ -113,7 +116,7 @@ func NewAPDUError(originalInvokeId uint8, errorChoice BACnetConfirmedServiceChoi // Deprecated: use the interface for direct cast func CastAPDUError(structType interface{}) APDUError { - if casted, ok := structType.(APDUError); ok { + if casted, ok := structType.(APDUError); ok { return casted } if casted, ok := structType.(*APDUError); ok { @@ -133,7 +136,7 @@ func (m *_APDUError) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += 4 // Simple field (originalInvokeId) - lengthInBits += 8 + lengthInBits += 8; // Simple field (errorChoice) lengthInBits += 8 @@ -144,6 +147,7 @@ func (m *_APDUError) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_APDUError) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -171,7 +175,7 @@ func APDUErrorParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, if reserved != uint8(0x00) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -179,7 +183,7 @@ func APDUErrorParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, } // Simple Field (originalInvokeId) - _originalInvokeId, _originalInvokeIdErr := readBuffer.ReadUint8("originalInvokeId", 8) +_originalInvokeId, _originalInvokeIdErr := readBuffer.ReadUint8("originalInvokeId", 8) if _originalInvokeIdErr != nil { return nil, errors.Wrap(_originalInvokeIdErr, "Error parsing 'originalInvokeId' field of APDUError") } @@ -189,7 +193,7 @@ func APDUErrorParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, if pullErr := readBuffer.PullContext("errorChoice"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for errorChoice") } - _errorChoice, _errorChoiceErr := BACnetConfirmedServiceChoiceParseWithBuffer(ctx, readBuffer) +_errorChoice, _errorChoiceErr := BACnetConfirmedServiceChoiceParseWithBuffer(ctx, readBuffer) if _errorChoiceErr != nil { return nil, errors.Wrap(_errorChoiceErr, "Error parsing 'errorChoice' field of APDUError") } @@ -202,7 +206,7 @@ func APDUErrorParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, if pullErr := readBuffer.PullContext("error"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for error") } - _error, _errorErr := BACnetErrorParseWithBuffer(ctx, readBuffer, BACnetConfirmedServiceChoice(errorChoice)) +_error, _errorErr := BACnetErrorParseWithBuffer(ctx, readBuffer , BACnetConfirmedServiceChoice( errorChoice ) ) if _errorErr != nil { return nil, errors.Wrap(_errorErr, "Error parsing 'error' field of APDUError") } @@ -221,9 +225,9 @@ func APDUErrorParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, ApduLength: apduLength, }, OriginalInvokeId: originalInvokeId, - ErrorChoice: errorChoice, - Error: error, - reservedField0: reservedField0, + ErrorChoice: errorChoice, + Error: error, + reservedField0: reservedField0, } _child._APDU._APDUChildRequirements = _child return _child, nil @@ -245,52 +249,52 @@ func (m *_APDUError) SerializeWithWriteBuffer(ctx context.Context, writeBuffer u return errors.Wrap(pushErr, "Error pushing for APDUError") } - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0x00) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0x00), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteUint8("reserved", 4, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0x00) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0x00), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 } - - // Simple Field (originalInvokeId) - originalInvokeId := uint8(m.GetOriginalInvokeId()) - _originalInvokeIdErr := writeBuffer.WriteUint8("originalInvokeId", 8, (originalInvokeId)) - if _originalInvokeIdErr != nil { - return errors.Wrap(_originalInvokeIdErr, "Error serializing 'originalInvokeId' field") + _err := writeBuffer.WriteUint8("reserved", 4, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } - // Simple Field (errorChoice) - if pushErr := writeBuffer.PushContext("errorChoice"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for errorChoice") - } - _errorChoiceErr := writeBuffer.WriteSerializable(ctx, m.GetErrorChoice()) - if popErr := writeBuffer.PopContext("errorChoice"); popErr != nil { - return errors.Wrap(popErr, "Error popping for errorChoice") - } - if _errorChoiceErr != nil { - return errors.Wrap(_errorChoiceErr, "Error serializing 'errorChoice' field") - } + // Simple Field (originalInvokeId) + originalInvokeId := uint8(m.GetOriginalInvokeId()) + _originalInvokeIdErr := writeBuffer.WriteUint8("originalInvokeId", 8, (originalInvokeId)) + if _originalInvokeIdErr != nil { + return errors.Wrap(_originalInvokeIdErr, "Error serializing 'originalInvokeId' field") + } - // Simple Field (error) - if pushErr := writeBuffer.PushContext("error"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for error") - } - _errorErr := writeBuffer.WriteSerializable(ctx, m.GetError()) - if popErr := writeBuffer.PopContext("error"); popErr != nil { - return errors.Wrap(popErr, "Error popping for error") - } - if _errorErr != nil { - return errors.Wrap(_errorErr, "Error serializing 'error' field") - } + // Simple Field (errorChoice) + if pushErr := writeBuffer.PushContext("errorChoice"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for errorChoice") + } + _errorChoiceErr := writeBuffer.WriteSerializable(ctx, m.GetErrorChoice()) + if popErr := writeBuffer.PopContext("errorChoice"); popErr != nil { + return errors.Wrap(popErr, "Error popping for errorChoice") + } + if _errorChoiceErr != nil { + return errors.Wrap(_errorChoiceErr, "Error serializing 'errorChoice' field") + } + + // Simple Field (error) + if pushErr := writeBuffer.PushContext("error"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for error") + } + _errorErr := writeBuffer.WriteSerializable(ctx, m.GetError()) + if popErr := writeBuffer.PopContext("error"); popErr != nil { + return errors.Wrap(popErr, "Error popping for error") + } + if _errorErr != nil { + return errors.Wrap(_errorErr, "Error serializing 'error' field") + } if popErr := writeBuffer.PopContext("APDUError"); popErr != nil { return errors.Wrap(popErr, "Error popping for APDUError") @@ -300,6 +304,7 @@ func (m *_APDUError) SerializeWithWriteBuffer(ctx context.Context, writeBuffer u return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_APDUError) isAPDUError() bool { return true } @@ -314,3 +319,6 @@ func (m *_APDUError) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/APDUReject.go b/plc4go/protocols/bacnetip/readwrite/model/APDUReject.go index c49bb7cd5d3..e49ed376647 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/APDUReject.go +++ b/plc4go/protocols/bacnetip/readwrite/model/APDUReject.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // APDUReject is the corresponding interface of APDUReject type APDUReject interface { @@ -48,32 +50,32 @@ type APDURejectExactly interface { // _APDUReject is the data-structure of this message type _APDUReject struct { *_APDU - OriginalInvokeId uint8 - RejectReason BACnetRejectReasonTagged + OriginalInvokeId uint8 + RejectReason BACnetRejectReasonTagged // Reserved Fields reservedField0 *uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_APDUReject) GetApduType() ApduType { - return ApduType_REJECT_PDU -} +func (m *_APDUReject) GetApduType() ApduType { +return ApduType_REJECT_PDU} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_APDUReject) InitializeParent(parent APDU) {} +func (m *_APDUReject) InitializeParent(parent APDU ) {} -func (m *_APDUReject) GetParent() APDU { +func (m *_APDUReject) GetParent() APDU { return m._APDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,12 +94,13 @@ func (m *_APDUReject) GetRejectReason() BACnetRejectReasonTagged { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAPDUReject factory function for _APDUReject -func NewAPDUReject(originalInvokeId uint8, rejectReason BACnetRejectReasonTagged, apduLength uint16) *_APDUReject { +func NewAPDUReject( originalInvokeId uint8 , rejectReason BACnetRejectReasonTagged , apduLength uint16 ) *_APDUReject { _result := &_APDUReject{ OriginalInvokeId: originalInvokeId, - RejectReason: rejectReason, - _APDU: NewAPDU(apduLength), + RejectReason: rejectReason, + _APDU: NewAPDU(apduLength), } _result._APDU._APDUChildRequirements = _result return _result @@ -105,7 +108,7 @@ func NewAPDUReject(originalInvokeId uint8, rejectReason BACnetRejectReasonTagged // Deprecated: use the interface for direct cast func CastAPDUReject(structType interface{}) APDUReject { - if casted, ok := structType.(APDUReject); ok { + if casted, ok := structType.(APDUReject); ok { return casted } if casted, ok := structType.(*APDUReject); ok { @@ -125,7 +128,7 @@ func (m *_APDUReject) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += 4 // Simple field (originalInvokeId) - lengthInBits += 8 + lengthInBits += 8; // Simple field (rejectReason) lengthInBits += m.RejectReason.GetLengthInBits(ctx) @@ -133,6 +136,7 @@ func (m *_APDUReject) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_APDUReject) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -160,7 +164,7 @@ func APDURejectParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, if reserved != uint8(0x00) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -168,7 +172,7 @@ func APDURejectParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, } // Simple Field (originalInvokeId) - _originalInvokeId, _originalInvokeIdErr := readBuffer.ReadUint8("originalInvokeId", 8) +_originalInvokeId, _originalInvokeIdErr := readBuffer.ReadUint8("originalInvokeId", 8) if _originalInvokeIdErr != nil { return nil, errors.Wrap(_originalInvokeIdErr, "Error parsing 'originalInvokeId' field of APDUReject") } @@ -178,7 +182,7 @@ func APDURejectParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, if pullErr := readBuffer.PullContext("rejectReason"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for rejectReason") } - _rejectReason, _rejectReasonErr := BACnetRejectReasonTaggedParseWithBuffer(ctx, readBuffer, uint32(uint32(1))) +_rejectReason, _rejectReasonErr := BACnetRejectReasonTaggedParseWithBuffer(ctx, readBuffer , uint32( uint32(1) ) ) if _rejectReasonErr != nil { return nil, errors.Wrap(_rejectReasonErr, "Error parsing 'rejectReason' field of APDUReject") } @@ -197,8 +201,8 @@ func APDURejectParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, ApduLength: apduLength, }, OriginalInvokeId: originalInvokeId, - RejectReason: rejectReason, - reservedField0: reservedField0, + RejectReason: rejectReason, + reservedField0: reservedField0, } _child._APDU._APDUChildRequirements = _child return _child, nil @@ -220,40 +224,40 @@ func (m *_APDUReject) SerializeWithWriteBuffer(ctx context.Context, writeBuffer return errors.Wrap(pushErr, "Error pushing for APDUReject") } - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0x00) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0x00), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteUint8("reserved", 4, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0x00) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0x00), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 } - - // Simple Field (originalInvokeId) - originalInvokeId := uint8(m.GetOriginalInvokeId()) - _originalInvokeIdErr := writeBuffer.WriteUint8("originalInvokeId", 8, (originalInvokeId)) - if _originalInvokeIdErr != nil { - return errors.Wrap(_originalInvokeIdErr, "Error serializing 'originalInvokeId' field") + _err := writeBuffer.WriteUint8("reserved", 4, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } - // Simple Field (rejectReason) - if pushErr := writeBuffer.PushContext("rejectReason"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for rejectReason") - } - _rejectReasonErr := writeBuffer.WriteSerializable(ctx, m.GetRejectReason()) - if popErr := writeBuffer.PopContext("rejectReason"); popErr != nil { - return errors.Wrap(popErr, "Error popping for rejectReason") - } - if _rejectReasonErr != nil { - return errors.Wrap(_rejectReasonErr, "Error serializing 'rejectReason' field") - } + // Simple Field (originalInvokeId) + originalInvokeId := uint8(m.GetOriginalInvokeId()) + _originalInvokeIdErr := writeBuffer.WriteUint8("originalInvokeId", 8, (originalInvokeId)) + if _originalInvokeIdErr != nil { + return errors.Wrap(_originalInvokeIdErr, "Error serializing 'originalInvokeId' field") + } + + // Simple Field (rejectReason) + if pushErr := writeBuffer.PushContext("rejectReason"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for rejectReason") + } + _rejectReasonErr := writeBuffer.WriteSerializable(ctx, m.GetRejectReason()) + if popErr := writeBuffer.PopContext("rejectReason"); popErr != nil { + return errors.Wrap(popErr, "Error popping for rejectReason") + } + if _rejectReasonErr != nil { + return errors.Wrap(_rejectReasonErr, "Error serializing 'rejectReason' field") + } if popErr := writeBuffer.PopContext("APDUReject"); popErr != nil { return errors.Wrap(popErr, "Error popping for APDUReject") @@ -263,6 +267,7 @@ func (m *_APDUReject) SerializeWithWriteBuffer(ctx context.Context, writeBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_APDUReject) isAPDUReject() bool { return true } @@ -277,3 +282,6 @@ func (m *_APDUReject) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/APDUSegmentAck.go b/plc4go/protocols/bacnetip/readwrite/model/APDUSegmentAck.go index 20665fbc7e1..3d6efbc2c03 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/APDUSegmentAck.go +++ b/plc4go/protocols/bacnetip/readwrite/model/APDUSegmentAck.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // APDUSegmentAck is the corresponding interface of APDUSegmentAck type APDUSegmentAck interface { @@ -54,35 +56,35 @@ type APDUSegmentAckExactly interface { // _APDUSegmentAck is the data-structure of this message type _APDUSegmentAck struct { *_APDU - NegativeAck bool - Server bool - OriginalInvokeId uint8 - SequenceNumber uint8 - ActualWindowSize uint8 + NegativeAck bool + Server bool + OriginalInvokeId uint8 + SequenceNumber uint8 + ActualWindowSize uint8 // Reserved Fields reservedField0 *uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_APDUSegmentAck) GetApduType() ApduType { - return ApduType_SEGMENT_ACK_PDU -} +func (m *_APDUSegmentAck) GetApduType() ApduType { +return ApduType_SEGMENT_ACK_PDU} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_APDUSegmentAck) InitializeParent(parent APDU) {} +func (m *_APDUSegmentAck) InitializeParent(parent APDU ) {} -func (m *_APDUSegmentAck) GetParent() APDU { +func (m *_APDUSegmentAck) GetParent() APDU { return m._APDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -113,15 +115,16 @@ func (m *_APDUSegmentAck) GetActualWindowSize() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAPDUSegmentAck factory function for _APDUSegmentAck -func NewAPDUSegmentAck(negativeAck bool, server bool, originalInvokeId uint8, sequenceNumber uint8, actualWindowSize uint8, apduLength uint16) *_APDUSegmentAck { +func NewAPDUSegmentAck( negativeAck bool , server bool , originalInvokeId uint8 , sequenceNumber uint8 , actualWindowSize uint8 , apduLength uint16 ) *_APDUSegmentAck { _result := &_APDUSegmentAck{ - NegativeAck: negativeAck, - Server: server, + NegativeAck: negativeAck, + Server: server, OriginalInvokeId: originalInvokeId, - SequenceNumber: sequenceNumber, + SequenceNumber: sequenceNumber, ActualWindowSize: actualWindowSize, - _APDU: NewAPDU(apduLength), + _APDU: NewAPDU(apduLength), } _result._APDU._APDUChildRequirements = _result return _result @@ -129,7 +132,7 @@ func NewAPDUSegmentAck(negativeAck bool, server bool, originalInvokeId uint8, se // Deprecated: use the interface for direct cast func CastAPDUSegmentAck(structType interface{}) APDUSegmentAck { - if casted, ok := structType.(APDUSegmentAck); ok { + if casted, ok := structType.(APDUSegmentAck); ok { return casted } if casted, ok := structType.(*APDUSegmentAck); ok { @@ -149,23 +152,24 @@ func (m *_APDUSegmentAck) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += 2 // Simple field (negativeAck) - lengthInBits += 1 + lengthInBits += 1; // Simple field (server) - lengthInBits += 1 + lengthInBits += 1; // Simple field (originalInvokeId) - lengthInBits += 8 + lengthInBits += 8; // Simple field (sequenceNumber) - lengthInBits += 8 + lengthInBits += 8; // Simple field (actualWindowSize) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_APDUSegmentAck) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -193,7 +197,7 @@ func APDUSegmentAckParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf if reserved != uint8(0x00) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -201,35 +205,35 @@ func APDUSegmentAckParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf } // Simple Field (negativeAck) - _negativeAck, _negativeAckErr := readBuffer.ReadBit("negativeAck") +_negativeAck, _negativeAckErr := readBuffer.ReadBit("negativeAck") if _negativeAckErr != nil { return nil, errors.Wrap(_negativeAckErr, "Error parsing 'negativeAck' field of APDUSegmentAck") } negativeAck := _negativeAck // Simple Field (server) - _server, _serverErr := readBuffer.ReadBit("server") +_server, _serverErr := readBuffer.ReadBit("server") if _serverErr != nil { return nil, errors.Wrap(_serverErr, "Error parsing 'server' field of APDUSegmentAck") } server := _server // Simple Field (originalInvokeId) - _originalInvokeId, _originalInvokeIdErr := readBuffer.ReadUint8("originalInvokeId", 8) +_originalInvokeId, _originalInvokeIdErr := readBuffer.ReadUint8("originalInvokeId", 8) if _originalInvokeIdErr != nil { return nil, errors.Wrap(_originalInvokeIdErr, "Error parsing 'originalInvokeId' field of APDUSegmentAck") } originalInvokeId := _originalInvokeId // Simple Field (sequenceNumber) - _sequenceNumber, _sequenceNumberErr := readBuffer.ReadUint8("sequenceNumber", 8) +_sequenceNumber, _sequenceNumberErr := readBuffer.ReadUint8("sequenceNumber", 8) if _sequenceNumberErr != nil { return nil, errors.Wrap(_sequenceNumberErr, "Error parsing 'sequenceNumber' field of APDUSegmentAck") } sequenceNumber := _sequenceNumber // Simple Field (actualWindowSize) - _actualWindowSize, _actualWindowSizeErr := readBuffer.ReadUint8("actualWindowSize", 8) +_actualWindowSize, _actualWindowSizeErr := readBuffer.ReadUint8("actualWindowSize", 8) if _actualWindowSizeErr != nil { return nil, errors.Wrap(_actualWindowSizeErr, "Error parsing 'actualWindowSize' field of APDUSegmentAck") } @@ -244,12 +248,12 @@ func APDUSegmentAckParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf _APDU: &_APDU{ ApduLength: apduLength, }, - NegativeAck: negativeAck, - Server: server, + NegativeAck: negativeAck, + Server: server, OriginalInvokeId: originalInvokeId, - SequenceNumber: sequenceNumber, + SequenceNumber: sequenceNumber, ActualWindowSize: actualWindowSize, - reservedField0: reservedField0, + reservedField0: reservedField0, } _child._APDU._APDUChildRequirements = _child return _child, nil @@ -271,56 +275,56 @@ func (m *_APDUSegmentAck) SerializeWithWriteBuffer(ctx context.Context, writeBuf return errors.Wrap(pushErr, "Error pushing for APDUSegmentAck") } - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0x00) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0x00), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteUint8("reserved", 2, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0x00) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0x00), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 } - - // Simple Field (negativeAck) - negativeAck := bool(m.GetNegativeAck()) - _negativeAckErr := writeBuffer.WriteBit("negativeAck", (negativeAck)) - if _negativeAckErr != nil { - return errors.Wrap(_negativeAckErr, "Error serializing 'negativeAck' field") + _err := writeBuffer.WriteUint8("reserved", 2, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } - // Simple Field (server) - server := bool(m.GetServer()) - _serverErr := writeBuffer.WriteBit("server", (server)) - if _serverErr != nil { - return errors.Wrap(_serverErr, "Error serializing 'server' field") - } + // Simple Field (negativeAck) + negativeAck := bool(m.GetNegativeAck()) + _negativeAckErr := writeBuffer.WriteBit("negativeAck", (negativeAck)) + if _negativeAckErr != nil { + return errors.Wrap(_negativeAckErr, "Error serializing 'negativeAck' field") + } - // Simple Field (originalInvokeId) - originalInvokeId := uint8(m.GetOriginalInvokeId()) - _originalInvokeIdErr := writeBuffer.WriteUint8("originalInvokeId", 8, (originalInvokeId)) - if _originalInvokeIdErr != nil { - return errors.Wrap(_originalInvokeIdErr, "Error serializing 'originalInvokeId' field") - } + // Simple Field (server) + server := bool(m.GetServer()) + _serverErr := writeBuffer.WriteBit("server", (server)) + if _serverErr != nil { + return errors.Wrap(_serverErr, "Error serializing 'server' field") + } - // Simple Field (sequenceNumber) - sequenceNumber := uint8(m.GetSequenceNumber()) - _sequenceNumberErr := writeBuffer.WriteUint8("sequenceNumber", 8, (sequenceNumber)) - if _sequenceNumberErr != nil { - return errors.Wrap(_sequenceNumberErr, "Error serializing 'sequenceNumber' field") - } + // Simple Field (originalInvokeId) + originalInvokeId := uint8(m.GetOriginalInvokeId()) + _originalInvokeIdErr := writeBuffer.WriteUint8("originalInvokeId", 8, (originalInvokeId)) + if _originalInvokeIdErr != nil { + return errors.Wrap(_originalInvokeIdErr, "Error serializing 'originalInvokeId' field") + } - // Simple Field (actualWindowSize) - actualWindowSize := uint8(m.GetActualWindowSize()) - _actualWindowSizeErr := writeBuffer.WriteUint8("actualWindowSize", 8, (actualWindowSize)) - if _actualWindowSizeErr != nil { - return errors.Wrap(_actualWindowSizeErr, "Error serializing 'actualWindowSize' field") - } + // Simple Field (sequenceNumber) + sequenceNumber := uint8(m.GetSequenceNumber()) + _sequenceNumberErr := writeBuffer.WriteUint8("sequenceNumber", 8, (sequenceNumber)) + if _sequenceNumberErr != nil { + return errors.Wrap(_sequenceNumberErr, "Error serializing 'sequenceNumber' field") + } + + // Simple Field (actualWindowSize) + actualWindowSize := uint8(m.GetActualWindowSize()) + _actualWindowSizeErr := writeBuffer.WriteUint8("actualWindowSize", 8, (actualWindowSize)) + if _actualWindowSizeErr != nil { + return errors.Wrap(_actualWindowSizeErr, "Error serializing 'actualWindowSize' field") + } if popErr := writeBuffer.PopContext("APDUSegmentAck"); popErr != nil { return errors.Wrap(popErr, "Error popping for APDUSegmentAck") @@ -330,6 +334,7 @@ func (m *_APDUSegmentAck) SerializeWithWriteBuffer(ctx context.Context, writeBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_APDUSegmentAck) isAPDUSegmentAck() bool { return true } @@ -344,3 +349,6 @@ func (m *_APDUSegmentAck) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/APDUSimpleAck.go b/plc4go/protocols/bacnetip/readwrite/model/APDUSimpleAck.go index 25ddc0f56d2..536b99553a5 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/APDUSimpleAck.go +++ b/plc4go/protocols/bacnetip/readwrite/model/APDUSimpleAck.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // APDUSimpleAck is the corresponding interface of APDUSimpleAck type APDUSimpleAck interface { @@ -48,32 +50,32 @@ type APDUSimpleAckExactly interface { // _APDUSimpleAck is the data-structure of this message type _APDUSimpleAck struct { *_APDU - OriginalInvokeId uint8 - ServiceChoice BACnetConfirmedServiceChoice + OriginalInvokeId uint8 + ServiceChoice BACnetConfirmedServiceChoice // Reserved Fields reservedField0 *uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_APDUSimpleAck) GetApduType() ApduType { - return ApduType_SIMPLE_ACK_PDU -} +func (m *_APDUSimpleAck) GetApduType() ApduType { +return ApduType_SIMPLE_ACK_PDU} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_APDUSimpleAck) InitializeParent(parent APDU) {} +func (m *_APDUSimpleAck) InitializeParent(parent APDU ) {} -func (m *_APDUSimpleAck) GetParent() APDU { +func (m *_APDUSimpleAck) GetParent() APDU { return m._APDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,12 +94,13 @@ func (m *_APDUSimpleAck) GetServiceChoice() BACnetConfirmedServiceChoice { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAPDUSimpleAck factory function for _APDUSimpleAck -func NewAPDUSimpleAck(originalInvokeId uint8, serviceChoice BACnetConfirmedServiceChoice, apduLength uint16) *_APDUSimpleAck { +func NewAPDUSimpleAck( originalInvokeId uint8 , serviceChoice BACnetConfirmedServiceChoice , apduLength uint16 ) *_APDUSimpleAck { _result := &_APDUSimpleAck{ OriginalInvokeId: originalInvokeId, - ServiceChoice: serviceChoice, - _APDU: NewAPDU(apduLength), + ServiceChoice: serviceChoice, + _APDU: NewAPDU(apduLength), } _result._APDU._APDUChildRequirements = _result return _result @@ -105,7 +108,7 @@ func NewAPDUSimpleAck(originalInvokeId uint8, serviceChoice BACnetConfirmedServi // Deprecated: use the interface for direct cast func CastAPDUSimpleAck(structType interface{}) APDUSimpleAck { - if casted, ok := structType.(APDUSimpleAck); ok { + if casted, ok := structType.(APDUSimpleAck); ok { return casted } if casted, ok := structType.(*APDUSimpleAck); ok { @@ -125,7 +128,7 @@ func (m *_APDUSimpleAck) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += 4 // Simple field (originalInvokeId) - lengthInBits += 8 + lengthInBits += 8; // Simple field (serviceChoice) lengthInBits += 8 @@ -133,6 +136,7 @@ func (m *_APDUSimpleAck) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_APDUSimpleAck) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -160,7 +164,7 @@ func APDUSimpleAckParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff if reserved != uint8(0) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -168,7 +172,7 @@ func APDUSimpleAckParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff } // Simple Field (originalInvokeId) - _originalInvokeId, _originalInvokeIdErr := readBuffer.ReadUint8("originalInvokeId", 8) +_originalInvokeId, _originalInvokeIdErr := readBuffer.ReadUint8("originalInvokeId", 8) if _originalInvokeIdErr != nil { return nil, errors.Wrap(_originalInvokeIdErr, "Error parsing 'originalInvokeId' field of APDUSimpleAck") } @@ -178,7 +182,7 @@ func APDUSimpleAckParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff if pullErr := readBuffer.PullContext("serviceChoice"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for serviceChoice") } - _serviceChoice, _serviceChoiceErr := BACnetConfirmedServiceChoiceParseWithBuffer(ctx, readBuffer) +_serviceChoice, _serviceChoiceErr := BACnetConfirmedServiceChoiceParseWithBuffer(ctx, readBuffer) if _serviceChoiceErr != nil { return nil, errors.Wrap(_serviceChoiceErr, "Error parsing 'serviceChoice' field of APDUSimpleAck") } @@ -197,8 +201,8 @@ func APDUSimpleAckParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff ApduLength: apduLength, }, OriginalInvokeId: originalInvokeId, - ServiceChoice: serviceChoice, - reservedField0: reservedField0, + ServiceChoice: serviceChoice, + reservedField0: reservedField0, } _child._APDU._APDUChildRequirements = _child return _child, nil @@ -220,40 +224,40 @@ func (m *_APDUSimpleAck) SerializeWithWriteBuffer(ctx context.Context, writeBuff return errors.Wrap(pushErr, "Error pushing for APDUSimpleAck") } - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteUint8("reserved", 4, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 } - - // Simple Field (originalInvokeId) - originalInvokeId := uint8(m.GetOriginalInvokeId()) - _originalInvokeIdErr := writeBuffer.WriteUint8("originalInvokeId", 8, (originalInvokeId)) - if _originalInvokeIdErr != nil { - return errors.Wrap(_originalInvokeIdErr, "Error serializing 'originalInvokeId' field") + _err := writeBuffer.WriteUint8("reserved", 4, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } - // Simple Field (serviceChoice) - if pushErr := writeBuffer.PushContext("serviceChoice"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for serviceChoice") - } - _serviceChoiceErr := writeBuffer.WriteSerializable(ctx, m.GetServiceChoice()) - if popErr := writeBuffer.PopContext("serviceChoice"); popErr != nil { - return errors.Wrap(popErr, "Error popping for serviceChoice") - } - if _serviceChoiceErr != nil { - return errors.Wrap(_serviceChoiceErr, "Error serializing 'serviceChoice' field") - } + // Simple Field (originalInvokeId) + originalInvokeId := uint8(m.GetOriginalInvokeId()) + _originalInvokeIdErr := writeBuffer.WriteUint8("originalInvokeId", 8, (originalInvokeId)) + if _originalInvokeIdErr != nil { + return errors.Wrap(_originalInvokeIdErr, "Error serializing 'originalInvokeId' field") + } + + // Simple Field (serviceChoice) + if pushErr := writeBuffer.PushContext("serviceChoice"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for serviceChoice") + } + _serviceChoiceErr := writeBuffer.WriteSerializable(ctx, m.GetServiceChoice()) + if popErr := writeBuffer.PopContext("serviceChoice"); popErr != nil { + return errors.Wrap(popErr, "Error popping for serviceChoice") + } + if _serviceChoiceErr != nil { + return errors.Wrap(_serviceChoiceErr, "Error serializing 'serviceChoice' field") + } if popErr := writeBuffer.PopContext("APDUSimpleAck"); popErr != nil { return errors.Wrap(popErr, "Error popping for APDUSimpleAck") @@ -263,6 +267,7 @@ func (m *_APDUSimpleAck) SerializeWithWriteBuffer(ctx context.Context, writeBuff return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_APDUSimpleAck) isAPDUSimpleAck() bool { return true } @@ -277,3 +282,6 @@ func (m *_APDUSimpleAck) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/APDUUnconfirmedRequest.go b/plc4go/protocols/bacnetip/readwrite/model/APDUUnconfirmedRequest.go index 31e8e0f25ed..341a57b99f4 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/APDUUnconfirmedRequest.go +++ b/plc4go/protocols/bacnetip/readwrite/model/APDUUnconfirmedRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // APDUUnconfirmedRequest is the corresponding interface of APDUUnconfirmedRequest type APDUUnconfirmedRequest interface { @@ -46,31 +48,31 @@ type APDUUnconfirmedRequestExactly interface { // _APDUUnconfirmedRequest is the data-structure of this message type _APDUUnconfirmedRequest struct { *_APDU - ServiceRequest BACnetUnconfirmedServiceRequest + ServiceRequest BACnetUnconfirmedServiceRequest // Reserved Fields reservedField0 *uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_APDUUnconfirmedRequest) GetApduType() ApduType { - return ApduType_UNCONFIRMED_REQUEST_PDU -} +func (m *_APDUUnconfirmedRequest) GetApduType() ApduType { +return ApduType_UNCONFIRMED_REQUEST_PDU} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_APDUUnconfirmedRequest) InitializeParent(parent APDU) {} +func (m *_APDUUnconfirmedRequest) InitializeParent(parent APDU ) {} -func (m *_APDUUnconfirmedRequest) GetParent() APDU { +func (m *_APDUUnconfirmedRequest) GetParent() APDU { return m._APDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -85,11 +87,12 @@ func (m *_APDUUnconfirmedRequest) GetServiceRequest() BACnetUnconfirmedServiceRe /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAPDUUnconfirmedRequest factory function for _APDUUnconfirmedRequest -func NewAPDUUnconfirmedRequest(serviceRequest BACnetUnconfirmedServiceRequest, apduLength uint16) *_APDUUnconfirmedRequest { +func NewAPDUUnconfirmedRequest( serviceRequest BACnetUnconfirmedServiceRequest , apduLength uint16 ) *_APDUUnconfirmedRequest { _result := &_APDUUnconfirmedRequest{ ServiceRequest: serviceRequest, - _APDU: NewAPDU(apduLength), + _APDU: NewAPDU(apduLength), } _result._APDU._APDUChildRequirements = _result return _result @@ -97,7 +100,7 @@ func NewAPDUUnconfirmedRequest(serviceRequest BACnetUnconfirmedServiceRequest, a // Deprecated: use the interface for direct cast func CastAPDUUnconfirmedRequest(structType interface{}) APDUUnconfirmedRequest { - if casted, ok := structType.(APDUUnconfirmedRequest); ok { + if casted, ok := structType.(APDUUnconfirmedRequest); ok { return casted } if casted, ok := structType.(*APDUUnconfirmedRequest); ok { @@ -122,6 +125,7 @@ func (m *_APDUUnconfirmedRequest) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_APDUUnconfirmedRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -149,7 +153,7 @@ func APDUUnconfirmedRequestParseWithBuffer(ctx context.Context, readBuffer utils if reserved != uint8(0) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -160,7 +164,7 @@ func APDUUnconfirmedRequestParseWithBuffer(ctx context.Context, readBuffer utils if pullErr := readBuffer.PullContext("serviceRequest"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for serviceRequest") } - _serviceRequest, _serviceRequestErr := BACnetUnconfirmedServiceRequestParseWithBuffer(ctx, readBuffer, uint16(uint16(apduLength)-uint16(uint16(1)))) +_serviceRequest, _serviceRequestErr := BACnetUnconfirmedServiceRequestParseWithBuffer(ctx, readBuffer , uint16( uint16(apduLength) - uint16(uint16(1)) ) ) if _serviceRequestErr != nil { return nil, errors.Wrap(_serviceRequestErr, "Error parsing 'serviceRequest' field of APDUUnconfirmedRequest") } @@ -201,33 +205,33 @@ func (m *_APDUUnconfirmedRequest) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for APDUUnconfirmedRequest") } - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteUint8("reserved", 4, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } - } - - // Simple Field (serviceRequest) - if pushErr := writeBuffer.PushContext("serviceRequest"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for serviceRequest") - } - _serviceRequestErr := writeBuffer.WriteSerializable(ctx, m.GetServiceRequest()) - if popErr := writeBuffer.PopContext("serviceRequest"); popErr != nil { - return errors.Wrap(popErr, "Error popping for serviceRequest") + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 } - if _serviceRequestErr != nil { - return errors.Wrap(_serviceRequestErr, "Error serializing 'serviceRequest' field") + _err := writeBuffer.WriteUint8("reserved", 4, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } + + // Simple Field (serviceRequest) + if pushErr := writeBuffer.PushContext("serviceRequest"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for serviceRequest") + } + _serviceRequestErr := writeBuffer.WriteSerializable(ctx, m.GetServiceRequest()) + if popErr := writeBuffer.PopContext("serviceRequest"); popErr != nil { + return errors.Wrap(popErr, "Error popping for serviceRequest") + } + if _serviceRequestErr != nil { + return errors.Wrap(_serviceRequestErr, "Error serializing 'serviceRequest' field") + } if popErr := writeBuffer.PopContext("APDUUnconfirmedRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for APDUUnconfirmedRequest") @@ -237,6 +241,7 @@ func (m *_APDUUnconfirmedRequest) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_APDUUnconfirmedRequest) isAPDUUnconfirmedRequest() bool { return true } @@ -251,3 +256,6 @@ func (m *_APDUUnconfirmedRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/APDUUnknown.go b/plc4go/protocols/bacnetip/readwrite/model/APDUUnknown.go index 1ef97a6cfd2..c02943b5074 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/APDUUnknown.go +++ b/plc4go/protocols/bacnetip/readwrite/model/APDUUnknown.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // APDUUnknown is the corresponding interface of APDUUnknown type APDUUnknown interface { @@ -48,30 +50,30 @@ type APDUUnknownExactly interface { // _APDUUnknown is the data-structure of this message type _APDUUnknown struct { *_APDU - UnknownTypeRest uint8 - UnknownBytes []byte + UnknownTypeRest uint8 + UnknownBytes []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_APDUUnknown) GetApduType() ApduType { - return 0 -} +func (m *_APDUUnknown) GetApduType() ApduType { +return 0} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_APDUUnknown) InitializeParent(parent APDU) {} +func (m *_APDUUnknown) InitializeParent(parent APDU ) {} -func (m *_APDUUnknown) GetParent() APDU { +func (m *_APDUUnknown) GetParent() APDU { return m._APDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_APDUUnknown) GetUnknownBytes() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAPDUUnknown factory function for _APDUUnknown -func NewAPDUUnknown(unknownTypeRest uint8, unknownBytes []byte, apduLength uint16) *_APDUUnknown { +func NewAPDUUnknown( unknownTypeRest uint8 , unknownBytes []byte , apduLength uint16 ) *_APDUUnknown { _result := &_APDUUnknown{ UnknownTypeRest: unknownTypeRest, - UnknownBytes: unknownBytes, - _APDU: NewAPDU(apduLength), + UnknownBytes: unknownBytes, + _APDU: NewAPDU(apduLength), } _result._APDU._APDUChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewAPDUUnknown(unknownTypeRest uint8, unknownBytes []byte, apduLength uint1 // Deprecated: use the interface for direct cast func CastAPDUUnknown(structType interface{}) APDUUnknown { - if casted, ok := structType.(APDUUnknown); ok { + if casted, ok := structType.(APDUUnknown); ok { return casted } if casted, ok := structType.(*APDUUnknown); ok { @@ -120,7 +123,7 @@ func (m *_APDUUnknown) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (unknownTypeRest) - lengthInBits += 4 + lengthInBits += 4; // Array field if len(m.UnknownBytes) > 0 { @@ -130,6 +133,7 @@ func (m *_APDUUnknown) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_APDUUnknown) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -148,13 +152,13 @@ func APDUUnknownParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer _ = currentPos // Simple Field (unknownTypeRest) - _unknownTypeRest, _unknownTypeRestErr := readBuffer.ReadUint8("unknownTypeRest", 4) +_unknownTypeRest, _unknownTypeRestErr := readBuffer.ReadUint8("unknownTypeRest", 4) if _unknownTypeRestErr != nil { return nil, errors.Wrap(_unknownTypeRestErr, "Error parsing 'unknownTypeRest' field of APDUUnknown") } unknownTypeRest := _unknownTypeRest // Byte Array field (unknownBytes) - numberOfBytesunknownBytes := int(utils.InlineIf((bool((apduLength) > (0))), func() interface{} { return uint16(apduLength) }, func() interface{} { return uint16(uint16(0)) }).(uint16)) + numberOfBytesunknownBytes := int(utils.InlineIf((bool((apduLength) > ((0)))), func() interface{} {return uint16(apduLength)}, func() interface{} {return uint16(uint16(0))}).(uint16)) unknownBytes, _readArrayErr := readBuffer.ReadByteArray("unknownBytes", numberOfBytesunknownBytes) if _readArrayErr != nil { return nil, errors.Wrap(_readArrayErr, "Error parsing 'unknownBytes' field of APDUUnknown") @@ -170,7 +174,7 @@ func APDUUnknownParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer ApduLength: apduLength, }, UnknownTypeRest: unknownTypeRest, - UnknownBytes: unknownBytes, + UnknownBytes: unknownBytes, } _child._APDU._APDUChildRequirements = _child return _child, nil @@ -192,18 +196,18 @@ func (m *_APDUUnknown) SerializeWithWriteBuffer(ctx context.Context, writeBuffer return errors.Wrap(pushErr, "Error pushing for APDUUnknown") } - // Simple Field (unknownTypeRest) - unknownTypeRest := uint8(m.GetUnknownTypeRest()) - _unknownTypeRestErr := writeBuffer.WriteUint8("unknownTypeRest", 4, (unknownTypeRest)) - if _unknownTypeRestErr != nil { - return errors.Wrap(_unknownTypeRestErr, "Error serializing 'unknownTypeRest' field") - } + // Simple Field (unknownTypeRest) + unknownTypeRest := uint8(m.GetUnknownTypeRest()) + _unknownTypeRestErr := writeBuffer.WriteUint8("unknownTypeRest", 4, (unknownTypeRest)) + if _unknownTypeRestErr != nil { + return errors.Wrap(_unknownTypeRestErr, "Error serializing 'unknownTypeRest' field") + } - // Array Field (unknownBytes) - // Byte Array field (unknownBytes) - if err := writeBuffer.WriteByteArray("unknownBytes", m.GetUnknownBytes()); err != nil { - return errors.Wrap(err, "Error serializing 'unknownBytes' field") - } + // Array Field (unknownBytes) + // Byte Array field (unknownBytes) + if err := writeBuffer.WriteByteArray("unknownBytes", m.GetUnknownBytes()); err != nil { + return errors.Wrap(err, "Error serializing 'unknownBytes' field") + } if popErr := writeBuffer.PopContext("APDUUnknown"); popErr != nil { return errors.Wrap(popErr, "Error popping for APDUUnknown") @@ -213,6 +217,7 @@ func (m *_APDUUnknown) SerializeWithWriteBuffer(ctx context.Context, writeBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_APDUUnknown) isAPDUUnknown() bool { return true } @@ -227,3 +232,6 @@ func (m *_APDUUnknown) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/ApduType.go b/plc4go/protocols/bacnetip/readwrite/model/ApduType.go index ed7b2bda760..14e304e57c2 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/ApduType.go +++ b/plc4go/protocols/bacnetip/readwrite/model/ApduType.go @@ -34,30 +34,30 @@ type IApduType interface { utils.Serializable } -const ( - ApduType_CONFIRMED_REQUEST_PDU ApduType = 0x0 +const( + ApduType_CONFIRMED_REQUEST_PDU ApduType = 0x0 ApduType_UNCONFIRMED_REQUEST_PDU ApduType = 0x1 - ApduType_SIMPLE_ACK_PDU ApduType = 0x2 - ApduType_COMPLEX_ACK_PDU ApduType = 0x3 - ApduType_SEGMENT_ACK_PDU ApduType = 0x4 - ApduType_ERROR_PDU ApduType = 0x5 - ApduType_REJECT_PDU ApduType = 0x6 - ApduType_ABORT_PDU ApduType = 0x7 - ApduType_APDU_UNKNOWN_8 ApduType = 0x8 - ApduType_APDU_UNKNOWN_9 ApduType = 0x9 - ApduType_APDU_UNKNOWN_A ApduType = 0xA - ApduType_APDU_UNKNOWN_B ApduType = 0xB - ApduType_APDU_UNKNOWN_C ApduType = 0xC - ApduType_APDU_UNKNOWN_D ApduType = 0xD - ApduType_APDU_UNKNOWN_E ApduType = 0xE - ApduType_APDU_UNKNOWN_F ApduType = 0xF + ApduType_SIMPLE_ACK_PDU ApduType = 0x2 + ApduType_COMPLEX_ACK_PDU ApduType = 0x3 + ApduType_SEGMENT_ACK_PDU ApduType = 0x4 + ApduType_ERROR_PDU ApduType = 0x5 + ApduType_REJECT_PDU ApduType = 0x6 + ApduType_ABORT_PDU ApduType = 0x7 + ApduType_APDU_UNKNOWN_8 ApduType = 0x8 + ApduType_APDU_UNKNOWN_9 ApduType = 0x9 + ApduType_APDU_UNKNOWN_A ApduType = 0xA + ApduType_APDU_UNKNOWN_B ApduType = 0xB + ApduType_APDU_UNKNOWN_C ApduType = 0xC + ApduType_APDU_UNKNOWN_D ApduType = 0xD + ApduType_APDU_UNKNOWN_E ApduType = 0xE + ApduType_APDU_UNKNOWN_F ApduType = 0xF ) var ApduTypeValues []ApduType func init() { _ = errors.New - ApduTypeValues = []ApduType{ + ApduTypeValues = []ApduType { ApduType_CONFIRMED_REQUEST_PDU, ApduType_UNCONFIRMED_REQUEST_PDU, ApduType_SIMPLE_ACK_PDU, @@ -79,38 +79,38 @@ func init() { func ApduTypeByValue(value uint8) (enum ApduType, ok bool) { switch value { - case 0x0: - return ApduType_CONFIRMED_REQUEST_PDU, true - case 0x1: - return ApduType_UNCONFIRMED_REQUEST_PDU, true - case 0x2: - return ApduType_SIMPLE_ACK_PDU, true - case 0x3: - return ApduType_COMPLEX_ACK_PDU, true - case 0x4: - return ApduType_SEGMENT_ACK_PDU, true - case 0x5: - return ApduType_ERROR_PDU, true - case 0x6: - return ApduType_REJECT_PDU, true - case 0x7: - return ApduType_ABORT_PDU, true - case 0x8: - return ApduType_APDU_UNKNOWN_8, true - case 0x9: - return ApduType_APDU_UNKNOWN_9, true - case 0xA: - return ApduType_APDU_UNKNOWN_A, true - case 0xB: - return ApduType_APDU_UNKNOWN_B, true - case 0xC: - return ApduType_APDU_UNKNOWN_C, true - case 0xD: - return ApduType_APDU_UNKNOWN_D, true - case 0xE: - return ApduType_APDU_UNKNOWN_E, true - case 0xF: - return ApduType_APDU_UNKNOWN_F, true + case 0x0: + return ApduType_CONFIRMED_REQUEST_PDU, true + case 0x1: + return ApduType_UNCONFIRMED_REQUEST_PDU, true + case 0x2: + return ApduType_SIMPLE_ACK_PDU, true + case 0x3: + return ApduType_COMPLEX_ACK_PDU, true + case 0x4: + return ApduType_SEGMENT_ACK_PDU, true + case 0x5: + return ApduType_ERROR_PDU, true + case 0x6: + return ApduType_REJECT_PDU, true + case 0x7: + return ApduType_ABORT_PDU, true + case 0x8: + return ApduType_APDU_UNKNOWN_8, true + case 0x9: + return ApduType_APDU_UNKNOWN_9, true + case 0xA: + return ApduType_APDU_UNKNOWN_A, true + case 0xB: + return ApduType_APDU_UNKNOWN_B, true + case 0xC: + return ApduType_APDU_UNKNOWN_C, true + case 0xD: + return ApduType_APDU_UNKNOWN_D, true + case 0xE: + return ApduType_APDU_UNKNOWN_E, true + case 0xF: + return ApduType_APDU_UNKNOWN_F, true } return 0, false } @@ -153,13 +153,13 @@ func ApduTypeByName(value string) (enum ApduType, ok bool) { return 0, false } -func ApduTypeKnows(value uint8) bool { +func ApduTypeKnows(value uint8) bool { for _, typeValue := range ApduTypeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastApduType(structType interface{}) ApduType { @@ -251,3 +251,4 @@ func (e ApduType) PLC4XEnumName() string { func (e ApduType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAbortReason.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAbortReason.go index 4eb1db6d941..7a205d29660 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAbortReason.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAbortReason.go @@ -34,27 +34,27 @@ type IBACnetAbortReason interface { utils.Serializable } -const ( - BACnetAbortReason_OTHER BACnetAbortReason = 0 - BACnetAbortReason_BUFFER_OVERFLOW BACnetAbortReason = 1 - BACnetAbortReason_INVALID_APDU_IN_THIS_STATE BACnetAbortReason = 2 +const( + BACnetAbortReason_OTHER BACnetAbortReason = 0 + BACnetAbortReason_BUFFER_OVERFLOW BACnetAbortReason = 1 + BACnetAbortReason_INVALID_APDU_IN_THIS_STATE BACnetAbortReason = 2 BACnetAbortReason_PREEMPTED_BY_HIGHER_PRIORITY_TASK BACnetAbortReason = 3 - BACnetAbortReason_SEGMENTATION_NOT_SUPPORTED BACnetAbortReason = 4 - BACnetAbortReason_SECURITY_ERROR BACnetAbortReason = 5 - BACnetAbortReason_INSUFFICIENT_SECURITY BACnetAbortReason = 6 - BACnetAbortReason_WINDOW_SIZE_OUT_OF_RANGE BACnetAbortReason = 7 - BACnetAbortReason_APPLICATION_EXCEEDED_REPLY_TIME BACnetAbortReason = 8 - BACnetAbortReason_OUT_OF_RESOURCES BACnetAbortReason = 9 - BACnetAbortReason_TSM_TIMEOUT BACnetAbortReason = 10 - BACnetAbortReason_APDU_TOO_LONG BACnetAbortReason = 11 - BACnetAbortReason_VENDOR_PROPRIETARY_VALUE BACnetAbortReason = 0xFF + BACnetAbortReason_SEGMENTATION_NOT_SUPPORTED BACnetAbortReason = 4 + BACnetAbortReason_SECURITY_ERROR BACnetAbortReason = 5 + BACnetAbortReason_INSUFFICIENT_SECURITY BACnetAbortReason = 6 + BACnetAbortReason_WINDOW_SIZE_OUT_OF_RANGE BACnetAbortReason = 7 + BACnetAbortReason_APPLICATION_EXCEEDED_REPLY_TIME BACnetAbortReason = 8 + BACnetAbortReason_OUT_OF_RESOURCES BACnetAbortReason = 9 + BACnetAbortReason_TSM_TIMEOUT BACnetAbortReason = 10 + BACnetAbortReason_APDU_TOO_LONG BACnetAbortReason = 11 + BACnetAbortReason_VENDOR_PROPRIETARY_VALUE BACnetAbortReason = 0xFF ) var BACnetAbortReasonValues []BACnetAbortReason func init() { _ = errors.New - BACnetAbortReasonValues = []BACnetAbortReason{ + BACnetAbortReasonValues = []BACnetAbortReason { BACnetAbortReason_OTHER, BACnetAbortReason_BUFFER_OVERFLOW, BACnetAbortReason_INVALID_APDU_IN_THIS_STATE, @@ -73,32 +73,32 @@ func init() { func BACnetAbortReasonByValue(value uint8) (enum BACnetAbortReason, ok bool) { switch value { - case 0: - return BACnetAbortReason_OTHER, true - case 0xFF: - return BACnetAbortReason_VENDOR_PROPRIETARY_VALUE, true - case 1: - return BACnetAbortReason_BUFFER_OVERFLOW, true - case 10: - return BACnetAbortReason_TSM_TIMEOUT, true - case 11: - return BACnetAbortReason_APDU_TOO_LONG, true - case 2: - return BACnetAbortReason_INVALID_APDU_IN_THIS_STATE, true - case 3: - return BACnetAbortReason_PREEMPTED_BY_HIGHER_PRIORITY_TASK, true - case 4: - return BACnetAbortReason_SEGMENTATION_NOT_SUPPORTED, true - case 5: - return BACnetAbortReason_SECURITY_ERROR, true - case 6: - return BACnetAbortReason_INSUFFICIENT_SECURITY, true - case 7: - return BACnetAbortReason_WINDOW_SIZE_OUT_OF_RANGE, true - case 8: - return BACnetAbortReason_APPLICATION_EXCEEDED_REPLY_TIME, true - case 9: - return BACnetAbortReason_OUT_OF_RESOURCES, true + case 0: + return BACnetAbortReason_OTHER, true + case 0xFF: + return BACnetAbortReason_VENDOR_PROPRIETARY_VALUE, true + case 1: + return BACnetAbortReason_BUFFER_OVERFLOW, true + case 10: + return BACnetAbortReason_TSM_TIMEOUT, true + case 11: + return BACnetAbortReason_APDU_TOO_LONG, true + case 2: + return BACnetAbortReason_INVALID_APDU_IN_THIS_STATE, true + case 3: + return BACnetAbortReason_PREEMPTED_BY_HIGHER_PRIORITY_TASK, true + case 4: + return BACnetAbortReason_SEGMENTATION_NOT_SUPPORTED, true + case 5: + return BACnetAbortReason_SECURITY_ERROR, true + case 6: + return BACnetAbortReason_INSUFFICIENT_SECURITY, true + case 7: + return BACnetAbortReason_WINDOW_SIZE_OUT_OF_RANGE, true + case 8: + return BACnetAbortReason_APPLICATION_EXCEEDED_REPLY_TIME, true + case 9: + return BACnetAbortReason_OUT_OF_RESOURCES, true } return 0, false } @@ -135,13 +135,13 @@ func BACnetAbortReasonByName(value string) (enum BACnetAbortReason, ok bool) { return 0, false } -func BACnetAbortReasonKnows(value uint8) bool { +func BACnetAbortReasonKnows(value uint8) bool { for _, typeValue := range BACnetAbortReasonValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetAbortReason(structType interface{}) BACnetAbortReason { @@ -227,3 +227,4 @@ func (e BACnetAbortReason) PLC4XEnumName() string { func (e BACnetAbortReason) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAbortReasonTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAbortReasonTagged.go index cf40ad70c84..b724f844000 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAbortReasonTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAbortReasonTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetAbortReasonTagged is the corresponding interface of BACnetAbortReasonTagged type BACnetAbortReasonTagged interface { @@ -48,13 +50,14 @@ type BACnetAbortReasonTaggedExactly interface { // _BACnetAbortReasonTagged is the data-structure of this message type _BACnetAbortReasonTagged struct { - Value BACnetAbortReason - ProprietaryValue uint32 + Value BACnetAbortReason + ProprietaryValue uint32 // Arguments. ActualLength uint32 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -88,14 +91,15 @@ func (m *_BACnetAbortReasonTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetAbortReasonTagged factory function for _BACnetAbortReasonTagged -func NewBACnetAbortReasonTagged(value BACnetAbortReason, proprietaryValue uint32, actualLength uint32) *_BACnetAbortReasonTagged { - return &_BACnetAbortReasonTagged{Value: value, ProprietaryValue: proprietaryValue, ActualLength: actualLength} +func NewBACnetAbortReasonTagged( value BACnetAbortReason , proprietaryValue uint32 , actualLength uint32 ) *_BACnetAbortReasonTagged { +return &_BACnetAbortReasonTagged{ Value: value , ProprietaryValue: proprietaryValue , ActualLength: actualLength } } // Deprecated: use the interface for direct cast func CastBACnetAbortReasonTagged(structType interface{}) BACnetAbortReasonTagged { - if casted, ok := structType.(BACnetAbortReasonTagged); ok { + if casted, ok := structType.(BACnetAbortReasonTagged); ok { return casted } if casted, ok := structType.(*BACnetAbortReasonTagged); ok { @@ -112,16 +116,17 @@ func (m *_BACnetAbortReasonTagged) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.ActualLength) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.ActualLength) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.ActualLength) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.ActualLength) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetAbortReasonTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -146,7 +151,7 @@ func BACnetAbortReasonTaggedParseWithBuffer(ctx context.Context, readBuffer util } var value BACnetAbortReason if _value != nil { - value = _value.(BACnetAbortReason) + value = _value.(BACnetAbortReason) } // Virtual field @@ -161,7 +166,7 @@ func BACnetAbortReasonTaggedParseWithBuffer(ctx context.Context, readBuffer util } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetAbortReasonTagged"); closeErr != nil { @@ -170,10 +175,10 @@ func BACnetAbortReasonTaggedParseWithBuffer(ctx context.Context, readBuffer util // Create the instance return &_BACnetAbortReasonTagged{ - ActualLength: actualLength, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + ActualLength: actualLength, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetAbortReasonTagged) Serialize() ([]byte, error) { @@ -187,7 +192,7 @@ func (m *_BACnetAbortReasonTagged) Serialize() ([]byte, error) { func (m *_BACnetAbortReasonTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetAbortReasonTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetAbortReasonTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetAbortReasonTagged") } @@ -213,13 +218,13 @@ func (m *_BACnetAbortReasonTagged) SerializeWithWriteBuffer(ctx context.Context, return nil } + //// // Arguments Getter func (m *_BACnetAbortReasonTagged) GetActualLength() uint32 { return m.ActualLength } - // //// @@ -237,3 +242,6 @@ func (m *_BACnetAbortReasonTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessAuthenticationFactorDisable.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessAuthenticationFactorDisable.go index 43abfba9316..4e913d757cd 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessAuthenticationFactorDisable.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessAuthenticationFactorDisable.go @@ -34,21 +34,21 @@ type IBACnetAccessAuthenticationFactorDisable interface { utils.Serializable } -const ( - BACnetAccessAuthenticationFactorDisable_NONE BACnetAccessAuthenticationFactorDisable = 0 - BACnetAccessAuthenticationFactorDisable_DISABLED BACnetAccessAuthenticationFactorDisable = 1 - BACnetAccessAuthenticationFactorDisable_DISABLED_LOST BACnetAccessAuthenticationFactorDisable = 2 - BACnetAccessAuthenticationFactorDisable_DISABLED_STOLEN BACnetAccessAuthenticationFactorDisable = 3 - BACnetAccessAuthenticationFactorDisable_DISABLED_DAMAGED BACnetAccessAuthenticationFactorDisable = 4 - BACnetAccessAuthenticationFactorDisable_DISABLED_DESTROYED BACnetAccessAuthenticationFactorDisable = 5 - BACnetAccessAuthenticationFactorDisable_VENDOR_PROPRIETARY_VALUE BACnetAccessAuthenticationFactorDisable = 0xFFFF +const( + BACnetAccessAuthenticationFactorDisable_NONE BACnetAccessAuthenticationFactorDisable = 0 + BACnetAccessAuthenticationFactorDisable_DISABLED BACnetAccessAuthenticationFactorDisable = 1 + BACnetAccessAuthenticationFactorDisable_DISABLED_LOST BACnetAccessAuthenticationFactorDisable = 2 + BACnetAccessAuthenticationFactorDisable_DISABLED_STOLEN BACnetAccessAuthenticationFactorDisable = 3 + BACnetAccessAuthenticationFactorDisable_DISABLED_DAMAGED BACnetAccessAuthenticationFactorDisable = 4 + BACnetAccessAuthenticationFactorDisable_DISABLED_DESTROYED BACnetAccessAuthenticationFactorDisable = 5 + BACnetAccessAuthenticationFactorDisable_VENDOR_PROPRIETARY_VALUE BACnetAccessAuthenticationFactorDisable = 0XFFFF ) var BACnetAccessAuthenticationFactorDisableValues []BACnetAccessAuthenticationFactorDisable func init() { _ = errors.New - BACnetAccessAuthenticationFactorDisableValues = []BACnetAccessAuthenticationFactorDisable{ + BACnetAccessAuthenticationFactorDisableValues = []BACnetAccessAuthenticationFactorDisable { BACnetAccessAuthenticationFactorDisable_NONE, BACnetAccessAuthenticationFactorDisable_DISABLED, BACnetAccessAuthenticationFactorDisable_DISABLED_LOST, @@ -61,20 +61,20 @@ func init() { func BACnetAccessAuthenticationFactorDisableByValue(value uint16) (enum BACnetAccessAuthenticationFactorDisable, ok bool) { switch value { - case 0: - return BACnetAccessAuthenticationFactorDisable_NONE, true - case 0xFFFF: - return BACnetAccessAuthenticationFactorDisable_VENDOR_PROPRIETARY_VALUE, true - case 1: - return BACnetAccessAuthenticationFactorDisable_DISABLED, true - case 2: - return BACnetAccessAuthenticationFactorDisable_DISABLED_LOST, true - case 3: - return BACnetAccessAuthenticationFactorDisable_DISABLED_STOLEN, true - case 4: - return BACnetAccessAuthenticationFactorDisable_DISABLED_DAMAGED, true - case 5: - return BACnetAccessAuthenticationFactorDisable_DISABLED_DESTROYED, true + case 0: + return BACnetAccessAuthenticationFactorDisable_NONE, true + case 0XFFFF: + return BACnetAccessAuthenticationFactorDisable_VENDOR_PROPRIETARY_VALUE, true + case 1: + return BACnetAccessAuthenticationFactorDisable_DISABLED, true + case 2: + return BACnetAccessAuthenticationFactorDisable_DISABLED_LOST, true + case 3: + return BACnetAccessAuthenticationFactorDisable_DISABLED_STOLEN, true + case 4: + return BACnetAccessAuthenticationFactorDisable_DISABLED_DAMAGED, true + case 5: + return BACnetAccessAuthenticationFactorDisable_DISABLED_DESTROYED, true } return 0, false } @@ -99,13 +99,13 @@ func BACnetAccessAuthenticationFactorDisableByName(value string) (enum BACnetAcc return 0, false } -func BACnetAccessAuthenticationFactorDisableKnows(value uint16) bool { +func BACnetAccessAuthenticationFactorDisableKnows(value uint16) bool { for _, typeValue := range BACnetAccessAuthenticationFactorDisableValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastBACnetAccessAuthenticationFactorDisable(structType interface{}) BACnetAccessAuthenticationFactorDisable { @@ -179,3 +179,4 @@ func (e BACnetAccessAuthenticationFactorDisable) PLC4XEnumName() string { func (e BACnetAccessAuthenticationFactorDisable) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessAuthenticationFactorDisableTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessAuthenticationFactorDisableTagged.go index 0c657e08175..718357ab8f0 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessAuthenticationFactorDisableTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessAuthenticationFactorDisableTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetAccessAuthenticationFactorDisableTagged is the corresponding interface of BACnetAccessAuthenticationFactorDisableTagged type BACnetAccessAuthenticationFactorDisableTagged interface { @@ -50,15 +52,16 @@ type BACnetAccessAuthenticationFactorDisableTaggedExactly interface { // _BACnetAccessAuthenticationFactorDisableTagged is the data-structure of this message type _BACnetAccessAuthenticationFactorDisableTagged struct { - Header BACnetTagHeader - Value BACnetAccessAuthenticationFactorDisable - ProprietaryValue uint32 + Header BACnetTagHeader + Value BACnetAccessAuthenticationFactorDisable + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_BACnetAccessAuthenticationFactorDisableTagged) GetIsProprietary() bool /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetAccessAuthenticationFactorDisableTagged factory function for _BACnetAccessAuthenticationFactorDisableTagged -func NewBACnetAccessAuthenticationFactorDisableTagged(header BACnetTagHeader, value BACnetAccessAuthenticationFactorDisable, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_BACnetAccessAuthenticationFactorDisableTagged { - return &_BACnetAccessAuthenticationFactorDisableTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetAccessAuthenticationFactorDisableTagged( header BACnetTagHeader , value BACnetAccessAuthenticationFactorDisable , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_BACnetAccessAuthenticationFactorDisableTagged { +return &_BACnetAccessAuthenticationFactorDisableTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetAccessAuthenticationFactorDisableTagged(structType interface{}) BACnetAccessAuthenticationFactorDisableTagged { - if casted, ok := structType.(BACnetAccessAuthenticationFactorDisableTagged); ok { + if casted, ok := structType.(BACnetAccessAuthenticationFactorDisableTagged); ok { return casted } if casted, ok := structType.(*BACnetAccessAuthenticationFactorDisableTagged); ok { @@ -123,16 +127,17 @@ func (m *_BACnetAccessAuthenticationFactorDisableTagged) GetLengthInBits(ctx con lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetAccessAuthenticationFactorDisableTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetAccessAuthenticationFactorDisableTaggedParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetAccessAuthenticationFactorDisableTagged") } @@ -164,12 +169,12 @@ func BACnetAccessAuthenticationFactorDisableTaggedParseWithBuffer(ctx context.Co } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func BACnetAccessAuthenticationFactorDisableTaggedParseWithBuffer(ctx context.Co } var value BACnetAccessAuthenticationFactorDisable if _value != nil { - value = _value.(BACnetAccessAuthenticationFactorDisable) + value = _value.(BACnetAccessAuthenticationFactorDisable) } // Virtual field @@ -195,7 +200,7 @@ func BACnetAccessAuthenticationFactorDisableTaggedParseWithBuffer(ctx context.Co } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetAccessAuthenticationFactorDisableTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func BACnetAccessAuthenticationFactorDisableTaggedParseWithBuffer(ctx context.Co // Create the instance return &_BACnetAccessAuthenticationFactorDisableTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetAccessAuthenticationFactorDisableTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_BACnetAccessAuthenticationFactorDisableTagged) Serialize() ([]byte, er func (m *_BACnetAccessAuthenticationFactorDisableTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetAccessAuthenticationFactorDisableTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetAccessAuthenticationFactorDisableTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetAccessAuthenticationFactorDisableTagged") } @@ -261,6 +266,7 @@ func (m *_BACnetAccessAuthenticationFactorDisableTagged) SerializeWithWriteBuffe return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_BACnetAccessAuthenticationFactorDisableTagged) GetTagNumber() uint8 { func (m *_BACnetAccessAuthenticationFactorDisableTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_BACnetAccessAuthenticationFactorDisableTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessCredentialDisable.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessCredentialDisable.go index aece6a4ac74..2401b148a79 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessCredentialDisable.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessCredentialDisable.go @@ -34,19 +34,19 @@ type IBACnetAccessCredentialDisable interface { utils.Serializable } -const ( - BACnetAccessCredentialDisable_NONE BACnetAccessCredentialDisable = 0 - BACnetAccessCredentialDisable_DISABLE BACnetAccessCredentialDisable = 1 - BACnetAccessCredentialDisable_DISABLE_MANUAL BACnetAccessCredentialDisable = 2 - BACnetAccessCredentialDisable_DISABLE_LOCKOUT BACnetAccessCredentialDisable = 3 - BACnetAccessCredentialDisable_VENDOR_PROPRIETARY_VALUE BACnetAccessCredentialDisable = 0xFFFF +const( + BACnetAccessCredentialDisable_NONE BACnetAccessCredentialDisable = 0 + BACnetAccessCredentialDisable_DISABLE BACnetAccessCredentialDisable = 1 + BACnetAccessCredentialDisable_DISABLE_MANUAL BACnetAccessCredentialDisable = 2 + BACnetAccessCredentialDisable_DISABLE_LOCKOUT BACnetAccessCredentialDisable = 3 + BACnetAccessCredentialDisable_VENDOR_PROPRIETARY_VALUE BACnetAccessCredentialDisable = 0XFFFF ) var BACnetAccessCredentialDisableValues []BACnetAccessCredentialDisable func init() { _ = errors.New - BACnetAccessCredentialDisableValues = []BACnetAccessCredentialDisable{ + BACnetAccessCredentialDisableValues = []BACnetAccessCredentialDisable { BACnetAccessCredentialDisable_NONE, BACnetAccessCredentialDisable_DISABLE, BACnetAccessCredentialDisable_DISABLE_MANUAL, @@ -57,16 +57,16 @@ func init() { func BACnetAccessCredentialDisableByValue(value uint16) (enum BACnetAccessCredentialDisable, ok bool) { switch value { - case 0: - return BACnetAccessCredentialDisable_NONE, true - case 0xFFFF: - return BACnetAccessCredentialDisable_VENDOR_PROPRIETARY_VALUE, true - case 1: - return BACnetAccessCredentialDisable_DISABLE, true - case 2: - return BACnetAccessCredentialDisable_DISABLE_MANUAL, true - case 3: - return BACnetAccessCredentialDisable_DISABLE_LOCKOUT, true + case 0: + return BACnetAccessCredentialDisable_NONE, true + case 0XFFFF: + return BACnetAccessCredentialDisable_VENDOR_PROPRIETARY_VALUE, true + case 1: + return BACnetAccessCredentialDisable_DISABLE, true + case 2: + return BACnetAccessCredentialDisable_DISABLE_MANUAL, true + case 3: + return BACnetAccessCredentialDisable_DISABLE_LOCKOUT, true } return 0, false } @@ -87,13 +87,13 @@ func BACnetAccessCredentialDisableByName(value string) (enum BACnetAccessCredent return 0, false } -func BACnetAccessCredentialDisableKnows(value uint16) bool { +func BACnetAccessCredentialDisableKnows(value uint16) bool { for _, typeValue := range BACnetAccessCredentialDisableValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastBACnetAccessCredentialDisable(structType interface{}) BACnetAccessCredentialDisable { @@ -163,3 +163,4 @@ func (e BACnetAccessCredentialDisable) PLC4XEnumName() string { func (e BACnetAccessCredentialDisable) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessCredentialDisableReason.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessCredentialDisableReason.go index 1d6c6af2f9a..1e06855d173 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessCredentialDisableReason.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessCredentialDisableReason.go @@ -34,25 +34,25 @@ type IBACnetAccessCredentialDisableReason interface { utils.Serializable } -const ( - BACnetAccessCredentialDisableReason_DISABLED BACnetAccessCredentialDisableReason = 0 +const( + BACnetAccessCredentialDisableReason_DISABLED BACnetAccessCredentialDisableReason = 0 BACnetAccessCredentialDisableReason_DISABLED_NEEDS_PROVISIONING BACnetAccessCredentialDisableReason = 1 - BACnetAccessCredentialDisableReason_DISABLED_UNASSIGNED BACnetAccessCredentialDisableReason = 2 - BACnetAccessCredentialDisableReason_DISABLED_NOT_YET_ACTIVE BACnetAccessCredentialDisableReason = 3 - BACnetAccessCredentialDisableReason_DISABLED_EXPIRED BACnetAccessCredentialDisableReason = 4 - BACnetAccessCredentialDisableReason_DISABLED_LOCKOUT BACnetAccessCredentialDisableReason = 5 - BACnetAccessCredentialDisableReason_DISABLED_MAX_DAYS BACnetAccessCredentialDisableReason = 6 - BACnetAccessCredentialDisableReason_DISABLED_MAX_USES BACnetAccessCredentialDisableReason = 7 - BACnetAccessCredentialDisableReason_DISABLED_INACTIVITY BACnetAccessCredentialDisableReason = 8 - BACnetAccessCredentialDisableReason_DISABLED_MANUAL BACnetAccessCredentialDisableReason = 9 - BACnetAccessCredentialDisableReason_VENDOR_PROPRIETARY_VALUE BACnetAccessCredentialDisableReason = 0xFFFF + BACnetAccessCredentialDisableReason_DISABLED_UNASSIGNED BACnetAccessCredentialDisableReason = 2 + BACnetAccessCredentialDisableReason_DISABLED_NOT_YET_ACTIVE BACnetAccessCredentialDisableReason = 3 + BACnetAccessCredentialDisableReason_DISABLED_EXPIRED BACnetAccessCredentialDisableReason = 4 + BACnetAccessCredentialDisableReason_DISABLED_LOCKOUT BACnetAccessCredentialDisableReason = 5 + BACnetAccessCredentialDisableReason_DISABLED_MAX_DAYS BACnetAccessCredentialDisableReason = 6 + BACnetAccessCredentialDisableReason_DISABLED_MAX_USES BACnetAccessCredentialDisableReason = 7 + BACnetAccessCredentialDisableReason_DISABLED_INACTIVITY BACnetAccessCredentialDisableReason = 8 + BACnetAccessCredentialDisableReason_DISABLED_MANUAL BACnetAccessCredentialDisableReason = 9 + BACnetAccessCredentialDisableReason_VENDOR_PROPRIETARY_VALUE BACnetAccessCredentialDisableReason = 0XFFFF ) var BACnetAccessCredentialDisableReasonValues []BACnetAccessCredentialDisableReason func init() { _ = errors.New - BACnetAccessCredentialDisableReasonValues = []BACnetAccessCredentialDisableReason{ + BACnetAccessCredentialDisableReasonValues = []BACnetAccessCredentialDisableReason { BACnetAccessCredentialDisableReason_DISABLED, BACnetAccessCredentialDisableReason_DISABLED_NEEDS_PROVISIONING, BACnetAccessCredentialDisableReason_DISABLED_UNASSIGNED, @@ -69,28 +69,28 @@ func init() { func BACnetAccessCredentialDisableReasonByValue(value uint16) (enum BACnetAccessCredentialDisableReason, ok bool) { switch value { - case 0: - return BACnetAccessCredentialDisableReason_DISABLED, true - case 0xFFFF: - return BACnetAccessCredentialDisableReason_VENDOR_PROPRIETARY_VALUE, true - case 1: - return BACnetAccessCredentialDisableReason_DISABLED_NEEDS_PROVISIONING, true - case 2: - return BACnetAccessCredentialDisableReason_DISABLED_UNASSIGNED, true - case 3: - return BACnetAccessCredentialDisableReason_DISABLED_NOT_YET_ACTIVE, true - case 4: - return BACnetAccessCredentialDisableReason_DISABLED_EXPIRED, true - case 5: - return BACnetAccessCredentialDisableReason_DISABLED_LOCKOUT, true - case 6: - return BACnetAccessCredentialDisableReason_DISABLED_MAX_DAYS, true - case 7: - return BACnetAccessCredentialDisableReason_DISABLED_MAX_USES, true - case 8: - return BACnetAccessCredentialDisableReason_DISABLED_INACTIVITY, true - case 9: - return BACnetAccessCredentialDisableReason_DISABLED_MANUAL, true + case 0: + return BACnetAccessCredentialDisableReason_DISABLED, true + case 0XFFFF: + return BACnetAccessCredentialDisableReason_VENDOR_PROPRIETARY_VALUE, true + case 1: + return BACnetAccessCredentialDisableReason_DISABLED_NEEDS_PROVISIONING, true + case 2: + return BACnetAccessCredentialDisableReason_DISABLED_UNASSIGNED, true + case 3: + return BACnetAccessCredentialDisableReason_DISABLED_NOT_YET_ACTIVE, true + case 4: + return BACnetAccessCredentialDisableReason_DISABLED_EXPIRED, true + case 5: + return BACnetAccessCredentialDisableReason_DISABLED_LOCKOUT, true + case 6: + return BACnetAccessCredentialDisableReason_DISABLED_MAX_DAYS, true + case 7: + return BACnetAccessCredentialDisableReason_DISABLED_MAX_USES, true + case 8: + return BACnetAccessCredentialDisableReason_DISABLED_INACTIVITY, true + case 9: + return BACnetAccessCredentialDisableReason_DISABLED_MANUAL, true } return 0, false } @@ -123,13 +123,13 @@ func BACnetAccessCredentialDisableReasonByName(value string) (enum BACnetAccessC return 0, false } -func BACnetAccessCredentialDisableReasonKnows(value uint16) bool { +func BACnetAccessCredentialDisableReasonKnows(value uint16) bool { for _, typeValue := range BACnetAccessCredentialDisableReasonValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastBACnetAccessCredentialDisableReason(structType interface{}) BACnetAccessCredentialDisableReason { @@ -211,3 +211,4 @@ func (e BACnetAccessCredentialDisableReason) PLC4XEnumName() string { func (e BACnetAccessCredentialDisableReason) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessCredentialDisableReasonTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessCredentialDisableReasonTagged.go index 518fb528556..02b71d8b347 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessCredentialDisableReasonTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessCredentialDisableReasonTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetAccessCredentialDisableReasonTagged is the corresponding interface of BACnetAccessCredentialDisableReasonTagged type BACnetAccessCredentialDisableReasonTagged interface { @@ -50,15 +52,16 @@ type BACnetAccessCredentialDisableReasonTaggedExactly interface { // _BACnetAccessCredentialDisableReasonTagged is the data-structure of this message type _BACnetAccessCredentialDisableReasonTagged struct { - Header BACnetTagHeader - Value BACnetAccessCredentialDisableReason - ProprietaryValue uint32 + Header BACnetTagHeader + Value BACnetAccessCredentialDisableReason + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_BACnetAccessCredentialDisableReasonTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetAccessCredentialDisableReasonTagged factory function for _BACnetAccessCredentialDisableReasonTagged -func NewBACnetAccessCredentialDisableReasonTagged(header BACnetTagHeader, value BACnetAccessCredentialDisableReason, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_BACnetAccessCredentialDisableReasonTagged { - return &_BACnetAccessCredentialDisableReasonTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetAccessCredentialDisableReasonTagged( header BACnetTagHeader , value BACnetAccessCredentialDisableReason , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_BACnetAccessCredentialDisableReasonTagged { +return &_BACnetAccessCredentialDisableReasonTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetAccessCredentialDisableReasonTagged(structType interface{}) BACnetAccessCredentialDisableReasonTagged { - if casted, ok := structType.(BACnetAccessCredentialDisableReasonTagged); ok { + if casted, ok := structType.(BACnetAccessCredentialDisableReasonTagged); ok { return casted } if casted, ok := structType.(*BACnetAccessCredentialDisableReasonTagged); ok { @@ -123,16 +127,17 @@ func (m *_BACnetAccessCredentialDisableReasonTagged) GetLengthInBits(ctx context lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetAccessCredentialDisableReasonTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetAccessCredentialDisableReasonTaggedParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetAccessCredentialDisableReasonTagged") } @@ -164,12 +169,12 @@ func BACnetAccessCredentialDisableReasonTaggedParseWithBuffer(ctx context.Contex } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func BACnetAccessCredentialDisableReasonTaggedParseWithBuffer(ctx context.Contex } var value BACnetAccessCredentialDisableReason if _value != nil { - value = _value.(BACnetAccessCredentialDisableReason) + value = _value.(BACnetAccessCredentialDisableReason) } // Virtual field @@ -195,7 +200,7 @@ func BACnetAccessCredentialDisableReasonTaggedParseWithBuffer(ctx context.Contex } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetAccessCredentialDisableReasonTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func BACnetAccessCredentialDisableReasonTaggedParseWithBuffer(ctx context.Contex // Create the instance return &_BACnetAccessCredentialDisableReasonTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetAccessCredentialDisableReasonTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_BACnetAccessCredentialDisableReasonTagged) Serialize() ([]byte, error) func (m *_BACnetAccessCredentialDisableReasonTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetAccessCredentialDisableReasonTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetAccessCredentialDisableReasonTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetAccessCredentialDisableReasonTagged") } @@ -261,6 +266,7 @@ func (m *_BACnetAccessCredentialDisableReasonTagged) SerializeWithWriteBuffer(ct return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_BACnetAccessCredentialDisableReasonTagged) GetTagNumber() uint8 { func (m *_BACnetAccessCredentialDisableReasonTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_BACnetAccessCredentialDisableReasonTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessCredentialDisableTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessCredentialDisableTagged.go index d72d505e72c..ee86045e5e4 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessCredentialDisableTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessCredentialDisableTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetAccessCredentialDisableTagged is the corresponding interface of BACnetAccessCredentialDisableTagged type BACnetAccessCredentialDisableTagged interface { @@ -50,15 +52,16 @@ type BACnetAccessCredentialDisableTaggedExactly interface { // _BACnetAccessCredentialDisableTagged is the data-structure of this message type _BACnetAccessCredentialDisableTagged struct { - Header BACnetTagHeader - Value BACnetAccessCredentialDisable - ProprietaryValue uint32 + Header BACnetTagHeader + Value BACnetAccessCredentialDisable + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_BACnetAccessCredentialDisableTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetAccessCredentialDisableTagged factory function for _BACnetAccessCredentialDisableTagged -func NewBACnetAccessCredentialDisableTagged(header BACnetTagHeader, value BACnetAccessCredentialDisable, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_BACnetAccessCredentialDisableTagged { - return &_BACnetAccessCredentialDisableTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetAccessCredentialDisableTagged( header BACnetTagHeader , value BACnetAccessCredentialDisable , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_BACnetAccessCredentialDisableTagged { +return &_BACnetAccessCredentialDisableTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetAccessCredentialDisableTagged(structType interface{}) BACnetAccessCredentialDisableTagged { - if casted, ok := structType.(BACnetAccessCredentialDisableTagged); ok { + if casted, ok := structType.(BACnetAccessCredentialDisableTagged); ok { return casted } if casted, ok := structType.(*BACnetAccessCredentialDisableTagged); ok { @@ -123,16 +127,17 @@ func (m *_BACnetAccessCredentialDisableTagged) GetLengthInBits(ctx context.Conte lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetAccessCredentialDisableTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetAccessCredentialDisableTaggedParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetAccessCredentialDisableTagged") } @@ -164,12 +169,12 @@ func BACnetAccessCredentialDisableTaggedParseWithBuffer(ctx context.Context, rea } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func BACnetAccessCredentialDisableTaggedParseWithBuffer(ctx context.Context, rea } var value BACnetAccessCredentialDisable if _value != nil { - value = _value.(BACnetAccessCredentialDisable) + value = _value.(BACnetAccessCredentialDisable) } // Virtual field @@ -195,7 +200,7 @@ func BACnetAccessCredentialDisableTaggedParseWithBuffer(ctx context.Context, rea } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetAccessCredentialDisableTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func BACnetAccessCredentialDisableTaggedParseWithBuffer(ctx context.Context, rea // Create the instance return &_BACnetAccessCredentialDisableTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetAccessCredentialDisableTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_BACnetAccessCredentialDisableTagged) Serialize() ([]byte, error) { func (m *_BACnetAccessCredentialDisableTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetAccessCredentialDisableTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetAccessCredentialDisableTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetAccessCredentialDisableTagged") } @@ -261,6 +266,7 @@ func (m *_BACnetAccessCredentialDisableTagged) SerializeWithWriteBuffer(ctx cont return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_BACnetAccessCredentialDisableTagged) GetTagNumber() uint8 { func (m *_BACnetAccessCredentialDisableTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_BACnetAccessCredentialDisableTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessEvent.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessEvent.go index ade51806d91..95cd405a53c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessEvent.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessEvent.go @@ -34,69 +34,69 @@ type IBACnetAccessEvent interface { utils.Serializable } -const ( - BACnetAccessEvent_NONE BACnetAccessEvent = 0 - BACnetAccessEvent_GRANTED BACnetAccessEvent = 1 - BACnetAccessEvent_MUSTER BACnetAccessEvent = 2 - BACnetAccessEvent_PASSBACK_DETECTED BACnetAccessEvent = 3 - BACnetAccessEvent_DURESS BACnetAccessEvent = 4 - BACnetAccessEvent_TRACE BACnetAccessEvent = 5 - BACnetAccessEvent_LOCKOUT_MAX_ATTEMPTS BACnetAccessEvent = 6 - BACnetAccessEvent_LOCKOUT_OTHER BACnetAccessEvent = 7 - BACnetAccessEvent_LOCKOUT_RELINQUISHED BACnetAccessEvent = 8 - BACnetAccessEvent_LOCKED_BY_HIGHER_PRIORITY BACnetAccessEvent = 9 - BACnetAccessEvent_OUT_OF_SERVICE BACnetAccessEvent = 10 - BACnetAccessEvent_OUT_OF_SERVICE_RELINQUISHED BACnetAccessEvent = 11 - BACnetAccessEvent_ACCOMPANIMENT_BY BACnetAccessEvent = 12 - BACnetAccessEvent_AUTHENTICATION_FACTOR_READ BACnetAccessEvent = 13 - BACnetAccessEvent_AUTHORIZATION_DELAYED BACnetAccessEvent = 14 - BACnetAccessEvent_VERIFICATION_REQUIRED BACnetAccessEvent = 15 - BACnetAccessEvent_NO_ENTRY_AFTER_GRANTED BACnetAccessEvent = 16 - BACnetAccessEvent_DENIED_DENY_ALL BACnetAccessEvent = 128 - BACnetAccessEvent_DENIED_UNKNOWN_CREDENTIAL BACnetAccessEvent = 129 - BACnetAccessEvent_DENIED_AUTHENTICATION_UNAVAILABLE BACnetAccessEvent = 130 - BACnetAccessEvent_DENIED_AUTHENTICATION_FACTOR_TIMEOUT BACnetAccessEvent = 131 +const( + BACnetAccessEvent_NONE BACnetAccessEvent = 0 + BACnetAccessEvent_GRANTED BACnetAccessEvent = 1 + BACnetAccessEvent_MUSTER BACnetAccessEvent = 2 + BACnetAccessEvent_PASSBACK_DETECTED BACnetAccessEvent = 3 + BACnetAccessEvent_DURESS BACnetAccessEvent = 4 + BACnetAccessEvent_TRACE BACnetAccessEvent = 5 + BACnetAccessEvent_LOCKOUT_MAX_ATTEMPTS BACnetAccessEvent = 6 + BACnetAccessEvent_LOCKOUT_OTHER BACnetAccessEvent = 7 + BACnetAccessEvent_LOCKOUT_RELINQUISHED BACnetAccessEvent = 8 + BACnetAccessEvent_LOCKED_BY_HIGHER_PRIORITY BACnetAccessEvent = 9 + BACnetAccessEvent_OUT_OF_SERVICE BACnetAccessEvent = 10 + BACnetAccessEvent_OUT_OF_SERVICE_RELINQUISHED BACnetAccessEvent = 11 + BACnetAccessEvent_ACCOMPANIMENT_BY BACnetAccessEvent = 12 + BACnetAccessEvent_AUTHENTICATION_FACTOR_READ BACnetAccessEvent = 13 + BACnetAccessEvent_AUTHORIZATION_DELAYED BACnetAccessEvent = 14 + BACnetAccessEvent_VERIFICATION_REQUIRED BACnetAccessEvent = 15 + BACnetAccessEvent_NO_ENTRY_AFTER_GRANTED BACnetAccessEvent = 16 + BACnetAccessEvent_DENIED_DENY_ALL BACnetAccessEvent = 128 + BACnetAccessEvent_DENIED_UNKNOWN_CREDENTIAL BACnetAccessEvent = 129 + BACnetAccessEvent_DENIED_AUTHENTICATION_UNAVAILABLE BACnetAccessEvent = 130 + BACnetAccessEvent_DENIED_AUTHENTICATION_FACTOR_TIMEOUT BACnetAccessEvent = 131 BACnetAccessEvent_DENIED_INCORRECT_AUTHENTICATION_FACTOR BACnetAccessEvent = 132 - BACnetAccessEvent_DENIED_ZONE_NO_ACCESS_RIGHTS BACnetAccessEvent = 133 - BACnetAccessEvent_DENIED_POINT_NO_ACCESS_RIGHTS BACnetAccessEvent = 134 - BACnetAccessEvent_DENIED_NO_ACCESS_RIGHTS BACnetAccessEvent = 135 - BACnetAccessEvent_DENIED_OUT_OF_TIME_RANGE BACnetAccessEvent = 136 - BACnetAccessEvent_DENIED_THREAT_LEVEL BACnetAccessEvent = 137 - BACnetAccessEvent_DENIED_PASSBACK BACnetAccessEvent = 138 - BACnetAccessEvent_DENIED_UNEXPECTED_LOCATION_USAGE BACnetAccessEvent = 139 - BACnetAccessEvent_DENIED_MAX_ATTEMPTS BACnetAccessEvent = 140 - BACnetAccessEvent_DENIED_LOWER_OCCUPANCY_LIMIT BACnetAccessEvent = 141 - BACnetAccessEvent_DENIED_UPPER_OCCUPANCY_LIMIT BACnetAccessEvent = 142 - BACnetAccessEvent_DENIED_AUTHENTICATION_FACTOR_LOST BACnetAccessEvent = 143 - BACnetAccessEvent_DENIED_AUTHENTICATION_FACTOR_STOLEN BACnetAccessEvent = 144 - BACnetAccessEvent_DENIED_AUTHENTICATION_FACTOR_DAMAGED BACnetAccessEvent = 145 + BACnetAccessEvent_DENIED_ZONE_NO_ACCESS_RIGHTS BACnetAccessEvent = 133 + BACnetAccessEvent_DENIED_POINT_NO_ACCESS_RIGHTS BACnetAccessEvent = 134 + BACnetAccessEvent_DENIED_NO_ACCESS_RIGHTS BACnetAccessEvent = 135 + BACnetAccessEvent_DENIED_OUT_OF_TIME_RANGE BACnetAccessEvent = 136 + BACnetAccessEvent_DENIED_THREAT_LEVEL BACnetAccessEvent = 137 + BACnetAccessEvent_DENIED_PASSBACK BACnetAccessEvent = 138 + BACnetAccessEvent_DENIED_UNEXPECTED_LOCATION_USAGE BACnetAccessEvent = 139 + BACnetAccessEvent_DENIED_MAX_ATTEMPTS BACnetAccessEvent = 140 + BACnetAccessEvent_DENIED_LOWER_OCCUPANCY_LIMIT BACnetAccessEvent = 141 + BACnetAccessEvent_DENIED_UPPER_OCCUPANCY_LIMIT BACnetAccessEvent = 142 + BACnetAccessEvent_DENIED_AUTHENTICATION_FACTOR_LOST BACnetAccessEvent = 143 + BACnetAccessEvent_DENIED_AUTHENTICATION_FACTOR_STOLEN BACnetAccessEvent = 144 + BACnetAccessEvent_DENIED_AUTHENTICATION_FACTOR_DAMAGED BACnetAccessEvent = 145 BACnetAccessEvent_DENIED_AUTHENTICATION_FACTOR_DESTROYED BACnetAccessEvent = 146 - BACnetAccessEvent_DENIED_AUTHENTICATION_FACTOR_DISABLED BACnetAccessEvent = 147 - BACnetAccessEvent_DENIED_AUTHENTICATION_FACTOR_ERROR BACnetAccessEvent = 148 - BACnetAccessEvent_DENIED_CREDENTIAL_UNASSIGNED BACnetAccessEvent = 149 - BACnetAccessEvent_DENIED_CREDENTIAL_NOT_PROVISIONED BACnetAccessEvent = 150 - BACnetAccessEvent_DENIED_CREDENTIAL_NOT_YET_ACTIVE BACnetAccessEvent = 151 - BACnetAccessEvent_DENIED_CREDENTIAL_EXPIRED BACnetAccessEvent = 152 - BACnetAccessEvent_DENIED_CREDENTIAL_MANUAL_DISABLE BACnetAccessEvent = 153 - BACnetAccessEvent_DENIED_CREDENTIAL_LOCKOUT BACnetAccessEvent = 154 - BACnetAccessEvent_DENIED_CREDENTIAL_MAX_DAYS BACnetAccessEvent = 155 - BACnetAccessEvent_DENIED_CREDENTIAL_MAX_USES BACnetAccessEvent = 156 - BACnetAccessEvent_DENIED_CREDENTIAL_INACTIVITY BACnetAccessEvent = 157 - BACnetAccessEvent_DENIED_CREDENTIAL_DISABLED BACnetAccessEvent = 158 - BACnetAccessEvent_DENIED_NO_ACCOMPANIMENT BACnetAccessEvent = 159 - BACnetAccessEvent_DENIED_INCORRECT_ACCOMPANIMENT BACnetAccessEvent = 160 - BACnetAccessEvent_DENIED_LOCKOUT BACnetAccessEvent = 161 - BACnetAccessEvent_DENIED_VERIFICATION_FAILED BACnetAccessEvent = 162 - BACnetAccessEvent_DENIED_VERIFICATION_TIMEOUT BACnetAccessEvent = 163 - BACnetAccessEvent_DENIED_OTHER BACnetAccessEvent = 164 - BACnetAccessEvent_VENDOR_PROPRIETARY_VALUE BACnetAccessEvent = 0xFFFF + BACnetAccessEvent_DENIED_AUTHENTICATION_FACTOR_DISABLED BACnetAccessEvent = 147 + BACnetAccessEvent_DENIED_AUTHENTICATION_FACTOR_ERROR BACnetAccessEvent = 148 + BACnetAccessEvent_DENIED_CREDENTIAL_UNASSIGNED BACnetAccessEvent = 149 + BACnetAccessEvent_DENIED_CREDENTIAL_NOT_PROVISIONED BACnetAccessEvent = 150 + BACnetAccessEvent_DENIED_CREDENTIAL_NOT_YET_ACTIVE BACnetAccessEvent = 151 + BACnetAccessEvent_DENIED_CREDENTIAL_EXPIRED BACnetAccessEvent = 152 + BACnetAccessEvent_DENIED_CREDENTIAL_MANUAL_DISABLE BACnetAccessEvent = 153 + BACnetAccessEvent_DENIED_CREDENTIAL_LOCKOUT BACnetAccessEvent = 154 + BACnetAccessEvent_DENIED_CREDENTIAL_MAX_DAYS BACnetAccessEvent = 155 + BACnetAccessEvent_DENIED_CREDENTIAL_MAX_USES BACnetAccessEvent = 156 + BACnetAccessEvent_DENIED_CREDENTIAL_INACTIVITY BACnetAccessEvent = 157 + BACnetAccessEvent_DENIED_CREDENTIAL_DISABLED BACnetAccessEvent = 158 + BACnetAccessEvent_DENIED_NO_ACCOMPANIMENT BACnetAccessEvent = 159 + BACnetAccessEvent_DENIED_INCORRECT_ACCOMPANIMENT BACnetAccessEvent = 160 + BACnetAccessEvent_DENIED_LOCKOUT BACnetAccessEvent = 161 + BACnetAccessEvent_DENIED_VERIFICATION_FAILED BACnetAccessEvent = 162 + BACnetAccessEvent_DENIED_VERIFICATION_TIMEOUT BACnetAccessEvent = 163 + BACnetAccessEvent_DENIED_OTHER BACnetAccessEvent = 164 + BACnetAccessEvent_VENDOR_PROPRIETARY_VALUE BACnetAccessEvent = 0XFFFF ) var BACnetAccessEventValues []BACnetAccessEvent func init() { _ = errors.New - BACnetAccessEventValues = []BACnetAccessEvent{ + BACnetAccessEventValues = []BACnetAccessEvent { BACnetAccessEvent_NONE, BACnetAccessEvent_GRANTED, BACnetAccessEvent_MUSTER, @@ -157,116 +157,116 @@ func init() { func BACnetAccessEventByValue(value uint16) (enum BACnetAccessEvent, ok bool) { switch value { - case 0: - return BACnetAccessEvent_NONE, true - case 0xFFFF: - return BACnetAccessEvent_VENDOR_PROPRIETARY_VALUE, true - case 1: - return BACnetAccessEvent_GRANTED, true - case 10: - return BACnetAccessEvent_OUT_OF_SERVICE, true - case 11: - return BACnetAccessEvent_OUT_OF_SERVICE_RELINQUISHED, true - case 12: - return BACnetAccessEvent_ACCOMPANIMENT_BY, true - case 128: - return BACnetAccessEvent_DENIED_DENY_ALL, true - case 129: - return BACnetAccessEvent_DENIED_UNKNOWN_CREDENTIAL, true - case 13: - return BACnetAccessEvent_AUTHENTICATION_FACTOR_READ, true - case 130: - return BACnetAccessEvent_DENIED_AUTHENTICATION_UNAVAILABLE, true - case 131: - return BACnetAccessEvent_DENIED_AUTHENTICATION_FACTOR_TIMEOUT, true - case 132: - return BACnetAccessEvent_DENIED_INCORRECT_AUTHENTICATION_FACTOR, true - case 133: - return BACnetAccessEvent_DENIED_ZONE_NO_ACCESS_RIGHTS, true - case 134: - return BACnetAccessEvent_DENIED_POINT_NO_ACCESS_RIGHTS, true - case 135: - return BACnetAccessEvent_DENIED_NO_ACCESS_RIGHTS, true - case 136: - return BACnetAccessEvent_DENIED_OUT_OF_TIME_RANGE, true - case 137: - return BACnetAccessEvent_DENIED_THREAT_LEVEL, true - case 138: - return BACnetAccessEvent_DENIED_PASSBACK, true - case 139: - return BACnetAccessEvent_DENIED_UNEXPECTED_LOCATION_USAGE, true - case 14: - return BACnetAccessEvent_AUTHORIZATION_DELAYED, true - case 140: - return BACnetAccessEvent_DENIED_MAX_ATTEMPTS, true - case 141: - return BACnetAccessEvent_DENIED_LOWER_OCCUPANCY_LIMIT, true - case 142: - return BACnetAccessEvent_DENIED_UPPER_OCCUPANCY_LIMIT, true - case 143: - return BACnetAccessEvent_DENIED_AUTHENTICATION_FACTOR_LOST, true - case 144: - return BACnetAccessEvent_DENIED_AUTHENTICATION_FACTOR_STOLEN, true - case 145: - return BACnetAccessEvent_DENIED_AUTHENTICATION_FACTOR_DAMAGED, true - case 146: - return BACnetAccessEvent_DENIED_AUTHENTICATION_FACTOR_DESTROYED, true - case 147: - return BACnetAccessEvent_DENIED_AUTHENTICATION_FACTOR_DISABLED, true - case 148: - return BACnetAccessEvent_DENIED_AUTHENTICATION_FACTOR_ERROR, true - case 149: - return BACnetAccessEvent_DENIED_CREDENTIAL_UNASSIGNED, true - case 15: - return BACnetAccessEvent_VERIFICATION_REQUIRED, true - case 150: - return BACnetAccessEvent_DENIED_CREDENTIAL_NOT_PROVISIONED, true - case 151: - return BACnetAccessEvent_DENIED_CREDENTIAL_NOT_YET_ACTIVE, true - case 152: - return BACnetAccessEvent_DENIED_CREDENTIAL_EXPIRED, true - case 153: - return BACnetAccessEvent_DENIED_CREDENTIAL_MANUAL_DISABLE, true - case 154: - return BACnetAccessEvent_DENIED_CREDENTIAL_LOCKOUT, true - case 155: - return BACnetAccessEvent_DENIED_CREDENTIAL_MAX_DAYS, true - case 156: - return BACnetAccessEvent_DENIED_CREDENTIAL_MAX_USES, true - case 157: - return BACnetAccessEvent_DENIED_CREDENTIAL_INACTIVITY, true - case 158: - return BACnetAccessEvent_DENIED_CREDENTIAL_DISABLED, true - case 159: - return BACnetAccessEvent_DENIED_NO_ACCOMPANIMENT, true - case 16: - return BACnetAccessEvent_NO_ENTRY_AFTER_GRANTED, true - case 160: - return BACnetAccessEvent_DENIED_INCORRECT_ACCOMPANIMENT, true - case 161: - return BACnetAccessEvent_DENIED_LOCKOUT, true - case 162: - return BACnetAccessEvent_DENIED_VERIFICATION_FAILED, true - case 163: - return BACnetAccessEvent_DENIED_VERIFICATION_TIMEOUT, true - case 164: - return BACnetAccessEvent_DENIED_OTHER, true - case 2: - return BACnetAccessEvent_MUSTER, true - case 3: - return BACnetAccessEvent_PASSBACK_DETECTED, true - case 4: - return BACnetAccessEvent_DURESS, true - case 5: - return BACnetAccessEvent_TRACE, true - case 6: - return BACnetAccessEvent_LOCKOUT_MAX_ATTEMPTS, true - case 7: - return BACnetAccessEvent_LOCKOUT_OTHER, true - case 8: - return BACnetAccessEvent_LOCKOUT_RELINQUISHED, true - case 9: - return BACnetAccessEvent_LOCKED_BY_HIGHER_PRIORITY, true + case 0: + return BACnetAccessEvent_NONE, true + case 0XFFFF: + return BACnetAccessEvent_VENDOR_PROPRIETARY_VALUE, true + case 1: + return BACnetAccessEvent_GRANTED, true + case 10: + return BACnetAccessEvent_OUT_OF_SERVICE, true + case 11: + return BACnetAccessEvent_OUT_OF_SERVICE_RELINQUISHED, true + case 12: + return BACnetAccessEvent_ACCOMPANIMENT_BY, true + case 128: + return BACnetAccessEvent_DENIED_DENY_ALL, true + case 129: + return BACnetAccessEvent_DENIED_UNKNOWN_CREDENTIAL, true + case 13: + return BACnetAccessEvent_AUTHENTICATION_FACTOR_READ, true + case 130: + return BACnetAccessEvent_DENIED_AUTHENTICATION_UNAVAILABLE, true + case 131: + return BACnetAccessEvent_DENIED_AUTHENTICATION_FACTOR_TIMEOUT, true + case 132: + return BACnetAccessEvent_DENIED_INCORRECT_AUTHENTICATION_FACTOR, true + case 133: + return BACnetAccessEvent_DENIED_ZONE_NO_ACCESS_RIGHTS, true + case 134: + return BACnetAccessEvent_DENIED_POINT_NO_ACCESS_RIGHTS, true + case 135: + return BACnetAccessEvent_DENIED_NO_ACCESS_RIGHTS, true + case 136: + return BACnetAccessEvent_DENIED_OUT_OF_TIME_RANGE, true + case 137: + return BACnetAccessEvent_DENIED_THREAT_LEVEL, true + case 138: + return BACnetAccessEvent_DENIED_PASSBACK, true + case 139: + return BACnetAccessEvent_DENIED_UNEXPECTED_LOCATION_USAGE, true + case 14: + return BACnetAccessEvent_AUTHORIZATION_DELAYED, true + case 140: + return BACnetAccessEvent_DENIED_MAX_ATTEMPTS, true + case 141: + return BACnetAccessEvent_DENIED_LOWER_OCCUPANCY_LIMIT, true + case 142: + return BACnetAccessEvent_DENIED_UPPER_OCCUPANCY_LIMIT, true + case 143: + return BACnetAccessEvent_DENIED_AUTHENTICATION_FACTOR_LOST, true + case 144: + return BACnetAccessEvent_DENIED_AUTHENTICATION_FACTOR_STOLEN, true + case 145: + return BACnetAccessEvent_DENIED_AUTHENTICATION_FACTOR_DAMAGED, true + case 146: + return BACnetAccessEvent_DENIED_AUTHENTICATION_FACTOR_DESTROYED, true + case 147: + return BACnetAccessEvent_DENIED_AUTHENTICATION_FACTOR_DISABLED, true + case 148: + return BACnetAccessEvent_DENIED_AUTHENTICATION_FACTOR_ERROR, true + case 149: + return BACnetAccessEvent_DENIED_CREDENTIAL_UNASSIGNED, true + case 15: + return BACnetAccessEvent_VERIFICATION_REQUIRED, true + case 150: + return BACnetAccessEvent_DENIED_CREDENTIAL_NOT_PROVISIONED, true + case 151: + return BACnetAccessEvent_DENIED_CREDENTIAL_NOT_YET_ACTIVE, true + case 152: + return BACnetAccessEvent_DENIED_CREDENTIAL_EXPIRED, true + case 153: + return BACnetAccessEvent_DENIED_CREDENTIAL_MANUAL_DISABLE, true + case 154: + return BACnetAccessEvent_DENIED_CREDENTIAL_LOCKOUT, true + case 155: + return BACnetAccessEvent_DENIED_CREDENTIAL_MAX_DAYS, true + case 156: + return BACnetAccessEvent_DENIED_CREDENTIAL_MAX_USES, true + case 157: + return BACnetAccessEvent_DENIED_CREDENTIAL_INACTIVITY, true + case 158: + return BACnetAccessEvent_DENIED_CREDENTIAL_DISABLED, true + case 159: + return BACnetAccessEvent_DENIED_NO_ACCOMPANIMENT, true + case 16: + return BACnetAccessEvent_NO_ENTRY_AFTER_GRANTED, true + case 160: + return BACnetAccessEvent_DENIED_INCORRECT_ACCOMPANIMENT, true + case 161: + return BACnetAccessEvent_DENIED_LOCKOUT, true + case 162: + return BACnetAccessEvent_DENIED_VERIFICATION_FAILED, true + case 163: + return BACnetAccessEvent_DENIED_VERIFICATION_TIMEOUT, true + case 164: + return BACnetAccessEvent_DENIED_OTHER, true + case 2: + return BACnetAccessEvent_MUSTER, true + case 3: + return BACnetAccessEvent_PASSBACK_DETECTED, true + case 4: + return BACnetAccessEvent_DURESS, true + case 5: + return BACnetAccessEvent_TRACE, true + case 6: + return BACnetAccessEvent_LOCKOUT_MAX_ATTEMPTS, true + case 7: + return BACnetAccessEvent_LOCKOUT_OTHER, true + case 8: + return BACnetAccessEvent_LOCKOUT_RELINQUISHED, true + case 9: + return BACnetAccessEvent_LOCKED_BY_HIGHER_PRIORITY, true } return 0, false } @@ -387,13 +387,13 @@ func BACnetAccessEventByName(value string) (enum BACnetAccessEvent, ok bool) { return 0, false } -func BACnetAccessEventKnows(value uint16) bool { +func BACnetAccessEventKnows(value uint16) bool { for _, typeValue := range BACnetAccessEventValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastBACnetAccessEvent(structType interface{}) BACnetAccessEvent { @@ -563,3 +563,4 @@ func (e BACnetAccessEvent) PLC4XEnumName() string { func (e BACnetAccessEvent) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessEventTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessEventTagged.go index 6a726b1206e..6e2e877619a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessEventTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessEventTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetAccessEventTagged is the corresponding interface of BACnetAccessEventTagged type BACnetAccessEventTagged interface { @@ -50,15 +52,16 @@ type BACnetAccessEventTaggedExactly interface { // _BACnetAccessEventTagged is the data-structure of this message type _BACnetAccessEventTagged struct { - Header BACnetTagHeader - Value BACnetAccessEvent - ProprietaryValue uint32 + Header BACnetTagHeader + Value BACnetAccessEvent + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_BACnetAccessEventTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetAccessEventTagged factory function for _BACnetAccessEventTagged -func NewBACnetAccessEventTagged(header BACnetTagHeader, value BACnetAccessEvent, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_BACnetAccessEventTagged { - return &_BACnetAccessEventTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetAccessEventTagged( header BACnetTagHeader , value BACnetAccessEvent , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_BACnetAccessEventTagged { +return &_BACnetAccessEventTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetAccessEventTagged(structType interface{}) BACnetAccessEventTagged { - if casted, ok := structType.(BACnetAccessEventTagged); ok { + if casted, ok := structType.(BACnetAccessEventTagged); ok { return casted } if casted, ok := structType.(*BACnetAccessEventTagged); ok { @@ -123,16 +127,17 @@ func (m *_BACnetAccessEventTagged) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetAccessEventTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetAccessEventTaggedParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetAccessEventTagged") } @@ -164,12 +169,12 @@ func BACnetAccessEventTaggedParseWithBuffer(ctx context.Context, readBuffer util } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func BACnetAccessEventTaggedParseWithBuffer(ctx context.Context, readBuffer util } var value BACnetAccessEvent if _value != nil { - value = _value.(BACnetAccessEvent) + value = _value.(BACnetAccessEvent) } // Virtual field @@ -195,7 +200,7 @@ func BACnetAccessEventTaggedParseWithBuffer(ctx context.Context, readBuffer util } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetAccessEventTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func BACnetAccessEventTaggedParseWithBuffer(ctx context.Context, readBuffer util // Create the instance return &_BACnetAccessEventTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetAccessEventTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_BACnetAccessEventTagged) Serialize() ([]byte, error) { func (m *_BACnetAccessEventTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetAccessEventTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetAccessEventTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetAccessEventTagged") } @@ -261,6 +266,7 @@ func (m *_BACnetAccessEventTagged) SerializeWithWriteBuffer(ctx context.Context, return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_BACnetAccessEventTagged) GetTagNumber() uint8 { func (m *_BACnetAccessEventTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_BACnetAccessEventTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessPassbackMode.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessPassbackMode.go index 8f2c1b1fcac..f6c38e65802 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessPassbackMode.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessPassbackMode.go @@ -34,8 +34,8 @@ type IBACnetAccessPassbackMode interface { utils.Serializable } -const ( - BACnetAccessPassbackMode_PASSBACK_OFF BACnetAccessPassbackMode = 0 +const( + BACnetAccessPassbackMode_PASSBACK_OFF BACnetAccessPassbackMode = 0 BACnetAccessPassbackMode_HARD_PASSBACK BACnetAccessPassbackMode = 1 BACnetAccessPassbackMode_SOFT_PASSBACK BACnetAccessPassbackMode = 2 ) @@ -44,7 +44,7 @@ var BACnetAccessPassbackModeValues []BACnetAccessPassbackMode func init() { _ = errors.New - BACnetAccessPassbackModeValues = []BACnetAccessPassbackMode{ + BACnetAccessPassbackModeValues = []BACnetAccessPassbackMode { BACnetAccessPassbackMode_PASSBACK_OFF, BACnetAccessPassbackMode_HARD_PASSBACK, BACnetAccessPassbackMode_SOFT_PASSBACK, @@ -53,12 +53,12 @@ func init() { func BACnetAccessPassbackModeByValue(value uint8) (enum BACnetAccessPassbackMode, ok bool) { switch value { - case 0: - return BACnetAccessPassbackMode_PASSBACK_OFF, true - case 1: - return BACnetAccessPassbackMode_HARD_PASSBACK, true - case 2: - return BACnetAccessPassbackMode_SOFT_PASSBACK, true + case 0: + return BACnetAccessPassbackMode_PASSBACK_OFF, true + case 1: + return BACnetAccessPassbackMode_HARD_PASSBACK, true + case 2: + return BACnetAccessPassbackMode_SOFT_PASSBACK, true } return 0, false } @@ -75,13 +75,13 @@ func BACnetAccessPassbackModeByName(value string) (enum BACnetAccessPassbackMode return 0, false } -func BACnetAccessPassbackModeKnows(value uint8) bool { +func BACnetAccessPassbackModeKnows(value uint8) bool { for _, typeValue := range BACnetAccessPassbackModeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetAccessPassbackMode(structType interface{}) BACnetAccessPassbackMode { @@ -147,3 +147,4 @@ func (e BACnetAccessPassbackMode) PLC4XEnumName() string { func (e BACnetAccessPassbackMode) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessPassbackModeTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessPassbackModeTagged.go index 8f546ee67a7..0119a666477 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessPassbackModeTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessPassbackModeTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetAccessPassbackModeTagged is the corresponding interface of BACnetAccessPassbackModeTagged type BACnetAccessPassbackModeTagged interface { @@ -46,14 +48,15 @@ type BACnetAccessPassbackModeTaggedExactly interface { // _BACnetAccessPassbackModeTagged is the data-structure of this message type _BACnetAccessPassbackModeTagged struct { - Header BACnetTagHeader - Value BACnetAccessPassbackMode + Header BACnetTagHeader + Value BACnetAccessPassbackMode // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_BACnetAccessPassbackModeTagged) GetValue() BACnetAccessPassbackMode { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetAccessPassbackModeTagged factory function for _BACnetAccessPassbackModeTagged -func NewBACnetAccessPassbackModeTagged(header BACnetTagHeader, value BACnetAccessPassbackMode, tagNumber uint8, tagClass TagClass) *_BACnetAccessPassbackModeTagged { - return &_BACnetAccessPassbackModeTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetAccessPassbackModeTagged( header BACnetTagHeader , value BACnetAccessPassbackMode , tagNumber uint8 , tagClass TagClass ) *_BACnetAccessPassbackModeTagged { +return &_BACnetAccessPassbackModeTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetAccessPassbackModeTagged(structType interface{}) BACnetAccessPassbackModeTagged { - if casted, ok := structType.(BACnetAccessPassbackModeTagged); ok { + if casted, ok := structType.(BACnetAccessPassbackModeTagged); ok { return casted } if casted, ok := structType.(*BACnetAccessPassbackModeTagged); ok { @@ -104,6 +108,7 @@ func (m *_BACnetAccessPassbackModeTagged) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetAccessPassbackModeTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func BACnetAccessPassbackModeTaggedParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetAccessPassbackModeTagged") } @@ -135,12 +140,12 @@ func BACnetAccessPassbackModeTaggedParseWithBuffer(ctx context.Context, readBuff } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func BACnetAccessPassbackModeTaggedParseWithBuffer(ctx context.Context, readBuff } var value BACnetAccessPassbackMode if _value != nil { - value = _value.(BACnetAccessPassbackMode) + value = _value.(BACnetAccessPassbackMode) } if closeErr := readBuffer.CloseContext("BACnetAccessPassbackModeTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func BACnetAccessPassbackModeTaggedParseWithBuffer(ctx context.Context, readBuff // Create the instance return &_BACnetAccessPassbackModeTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_BACnetAccessPassbackModeTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_BACnetAccessPassbackModeTagged) Serialize() ([]byte, error) { func (m *_BACnetAccessPassbackModeTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetAccessPassbackModeTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetAccessPassbackModeTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetAccessPassbackModeTagged") } @@ -206,6 +211,7 @@ func (m *_BACnetAccessPassbackModeTagged) SerializeWithWriteBuffer(ctx context.C return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_BACnetAccessPassbackModeTagged) GetTagNumber() uint8 { func (m *_BACnetAccessPassbackModeTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_BACnetAccessPassbackModeTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessRule.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessRule.go index f04a1d38dc2..86e9b701872 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessRule.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessRule.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetAccessRule is the corresponding interface of BACnetAccessRule type BACnetAccessRule interface { @@ -53,13 +55,14 @@ type BACnetAccessRuleExactly interface { // _BACnetAccessRule is the data-structure of this message type _BACnetAccessRule struct { - TimeRangeSpecifier BACnetAccessRuleTimeRangeSpecifierTagged - TimeRange BACnetDeviceObjectPropertyReferenceEnclosed - LocationSpecifier BACnetAccessRuleLocationSpecifierTagged - Location BACnetDeviceObjectReferenceEnclosed - Enable BACnetContextTagBoolean + TimeRangeSpecifier BACnetAccessRuleTimeRangeSpecifierTagged + TimeRange BACnetDeviceObjectPropertyReferenceEnclosed + LocationSpecifier BACnetAccessRuleLocationSpecifierTagged + Location BACnetDeviceObjectReferenceEnclosed + Enable BACnetContextTagBoolean } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,14 +93,15 @@ func (m *_BACnetAccessRule) GetEnable() BACnetContextTagBoolean { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetAccessRule factory function for _BACnetAccessRule -func NewBACnetAccessRule(timeRangeSpecifier BACnetAccessRuleTimeRangeSpecifierTagged, timeRange BACnetDeviceObjectPropertyReferenceEnclosed, locationSpecifier BACnetAccessRuleLocationSpecifierTagged, location BACnetDeviceObjectReferenceEnclosed, enable BACnetContextTagBoolean) *_BACnetAccessRule { - return &_BACnetAccessRule{TimeRangeSpecifier: timeRangeSpecifier, TimeRange: timeRange, LocationSpecifier: locationSpecifier, Location: location, Enable: enable} +func NewBACnetAccessRule( timeRangeSpecifier BACnetAccessRuleTimeRangeSpecifierTagged , timeRange BACnetDeviceObjectPropertyReferenceEnclosed , locationSpecifier BACnetAccessRuleLocationSpecifierTagged , location BACnetDeviceObjectReferenceEnclosed , enable BACnetContextTagBoolean ) *_BACnetAccessRule { +return &_BACnetAccessRule{ TimeRangeSpecifier: timeRangeSpecifier , TimeRange: timeRange , LocationSpecifier: locationSpecifier , Location: location , Enable: enable } } // Deprecated: use the interface for direct cast func CastBACnetAccessRule(structType interface{}) BACnetAccessRule { - if casted, ok := structType.(BACnetAccessRule); ok { + if casted, ok := structType.(BACnetAccessRule); ok { return casted } if casted, ok := structType.(*BACnetAccessRule); ok { @@ -135,6 +139,7 @@ func (m *_BACnetAccessRule) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetAccessRule) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -156,7 +161,7 @@ func BACnetAccessRuleParseWithBuffer(ctx context.Context, readBuffer utils.ReadB if pullErr := readBuffer.PullContext("timeRangeSpecifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeRangeSpecifier") } - _timeRangeSpecifier, _timeRangeSpecifierErr := BACnetAccessRuleTimeRangeSpecifierTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_timeRangeSpecifier, _timeRangeSpecifierErr := BACnetAccessRuleTimeRangeSpecifierTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _timeRangeSpecifierErr != nil { return nil, errors.Wrap(_timeRangeSpecifierErr, "Error parsing 'timeRangeSpecifier' field of BACnetAccessRule") } @@ -172,7 +177,7 @@ func BACnetAccessRuleParseWithBuffer(ctx context.Context, readBuffer utils.ReadB if pullErr := readBuffer.PullContext("timeRange"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeRange") } - _val, _err := BACnetDeviceObjectPropertyReferenceEnclosedParseWithBuffer(ctx, readBuffer, uint8(1)) +_val, _err := BACnetDeviceObjectPropertyReferenceEnclosedParseWithBuffer(ctx, readBuffer , uint8(1) ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -191,7 +196,7 @@ func BACnetAccessRuleParseWithBuffer(ctx context.Context, readBuffer utils.ReadB if pullErr := readBuffer.PullContext("locationSpecifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for locationSpecifier") } - _locationSpecifier, _locationSpecifierErr := BACnetAccessRuleLocationSpecifierTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_locationSpecifier, _locationSpecifierErr := BACnetAccessRuleLocationSpecifierTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _locationSpecifierErr != nil { return nil, errors.Wrap(_locationSpecifierErr, "Error parsing 'locationSpecifier' field of BACnetAccessRule") } @@ -207,7 +212,7 @@ func BACnetAccessRuleParseWithBuffer(ctx context.Context, readBuffer utils.ReadB if pullErr := readBuffer.PullContext("location"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for location") } - _val, _err := BACnetDeviceObjectReferenceEnclosedParseWithBuffer(ctx, readBuffer, uint8(3)) +_val, _err := BACnetDeviceObjectReferenceEnclosedParseWithBuffer(ctx, readBuffer , uint8(3) ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -226,7 +231,7 @@ func BACnetAccessRuleParseWithBuffer(ctx context.Context, readBuffer utils.ReadB if pullErr := readBuffer.PullContext("enable"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for enable") } - _enable, _enableErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(4)), BACnetDataType(BACnetDataType_BOOLEAN)) +_enable, _enableErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(4) ) , BACnetDataType( BACnetDataType_BOOLEAN ) ) if _enableErr != nil { return nil, errors.Wrap(_enableErr, "Error parsing 'enable' field of BACnetAccessRule") } @@ -241,12 +246,12 @@ func BACnetAccessRuleParseWithBuffer(ctx context.Context, readBuffer utils.ReadB // Create the instance return &_BACnetAccessRule{ - TimeRangeSpecifier: timeRangeSpecifier, - TimeRange: timeRange, - LocationSpecifier: locationSpecifier, - Location: location, - Enable: enable, - }, nil + TimeRangeSpecifier: timeRangeSpecifier, + TimeRange: timeRange, + LocationSpecifier: locationSpecifier, + Location: location, + Enable: enable, + }, nil } func (m *_BACnetAccessRule) Serialize() ([]byte, error) { @@ -260,7 +265,7 @@ func (m *_BACnetAccessRule) Serialize() ([]byte, error) { func (m *_BACnetAccessRule) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetAccessRule"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetAccessRule"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetAccessRule") } @@ -338,6 +343,7 @@ func (m *_BACnetAccessRule) SerializeWithWriteBuffer(ctx context.Context, writeB return nil } + func (m *_BACnetAccessRule) isBACnetAccessRule() bool { return true } @@ -352,3 +358,6 @@ func (m *_BACnetAccessRule) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessRuleLocationSpecifier.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessRuleLocationSpecifier.go index d279fd07740..8462bf14fce 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessRuleLocationSpecifier.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessRuleLocationSpecifier.go @@ -34,16 +34,16 @@ type IBACnetAccessRuleLocationSpecifier interface { utils.Serializable } -const ( +const( BACnetAccessRuleLocationSpecifier_SPECIFIED BACnetAccessRuleLocationSpecifier = 0 - BACnetAccessRuleLocationSpecifier_ALL BACnetAccessRuleLocationSpecifier = 1 + BACnetAccessRuleLocationSpecifier_ALL BACnetAccessRuleLocationSpecifier = 1 ) var BACnetAccessRuleLocationSpecifierValues []BACnetAccessRuleLocationSpecifier func init() { _ = errors.New - BACnetAccessRuleLocationSpecifierValues = []BACnetAccessRuleLocationSpecifier{ + BACnetAccessRuleLocationSpecifierValues = []BACnetAccessRuleLocationSpecifier { BACnetAccessRuleLocationSpecifier_SPECIFIED, BACnetAccessRuleLocationSpecifier_ALL, } @@ -51,10 +51,10 @@ func init() { func BACnetAccessRuleLocationSpecifierByValue(value uint8) (enum BACnetAccessRuleLocationSpecifier, ok bool) { switch value { - case 0: - return BACnetAccessRuleLocationSpecifier_SPECIFIED, true - case 1: - return BACnetAccessRuleLocationSpecifier_ALL, true + case 0: + return BACnetAccessRuleLocationSpecifier_SPECIFIED, true + case 1: + return BACnetAccessRuleLocationSpecifier_ALL, true } return 0, false } @@ -69,13 +69,13 @@ func BACnetAccessRuleLocationSpecifierByName(value string) (enum BACnetAccessRul return 0, false } -func BACnetAccessRuleLocationSpecifierKnows(value uint8) bool { +func BACnetAccessRuleLocationSpecifierKnows(value uint8) bool { for _, typeValue := range BACnetAccessRuleLocationSpecifierValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetAccessRuleLocationSpecifier(structType interface{}) BACnetAccessRuleLocationSpecifier { @@ -139,3 +139,4 @@ func (e BACnetAccessRuleLocationSpecifier) PLC4XEnumName() string { func (e BACnetAccessRuleLocationSpecifier) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessRuleLocationSpecifierTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessRuleLocationSpecifierTagged.go index 1fc1853c6dc..3e1a31b6ad6 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessRuleLocationSpecifierTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessRuleLocationSpecifierTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetAccessRuleLocationSpecifierTagged is the corresponding interface of BACnetAccessRuleLocationSpecifierTagged type BACnetAccessRuleLocationSpecifierTagged interface { @@ -46,14 +48,15 @@ type BACnetAccessRuleLocationSpecifierTaggedExactly interface { // _BACnetAccessRuleLocationSpecifierTagged is the data-structure of this message type _BACnetAccessRuleLocationSpecifierTagged struct { - Header BACnetTagHeader - Value BACnetAccessRuleLocationSpecifier + Header BACnetTagHeader + Value BACnetAccessRuleLocationSpecifier // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_BACnetAccessRuleLocationSpecifierTagged) GetValue() BACnetAccessRuleLo /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetAccessRuleLocationSpecifierTagged factory function for _BACnetAccessRuleLocationSpecifierTagged -func NewBACnetAccessRuleLocationSpecifierTagged(header BACnetTagHeader, value BACnetAccessRuleLocationSpecifier, tagNumber uint8, tagClass TagClass) *_BACnetAccessRuleLocationSpecifierTagged { - return &_BACnetAccessRuleLocationSpecifierTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetAccessRuleLocationSpecifierTagged( header BACnetTagHeader , value BACnetAccessRuleLocationSpecifier , tagNumber uint8 , tagClass TagClass ) *_BACnetAccessRuleLocationSpecifierTagged { +return &_BACnetAccessRuleLocationSpecifierTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetAccessRuleLocationSpecifierTagged(structType interface{}) BACnetAccessRuleLocationSpecifierTagged { - if casted, ok := structType.(BACnetAccessRuleLocationSpecifierTagged); ok { + if casted, ok := structType.(BACnetAccessRuleLocationSpecifierTagged); ok { return casted } if casted, ok := structType.(*BACnetAccessRuleLocationSpecifierTagged); ok { @@ -104,6 +108,7 @@ func (m *_BACnetAccessRuleLocationSpecifierTagged) GetLengthInBits(ctx context.C return lengthInBits } + func (m *_BACnetAccessRuleLocationSpecifierTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func BACnetAccessRuleLocationSpecifierTaggedParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetAccessRuleLocationSpecifierTagged") } @@ -135,12 +140,12 @@ func BACnetAccessRuleLocationSpecifierTaggedParseWithBuffer(ctx context.Context, } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func BACnetAccessRuleLocationSpecifierTaggedParseWithBuffer(ctx context.Context, } var value BACnetAccessRuleLocationSpecifier if _value != nil { - value = _value.(BACnetAccessRuleLocationSpecifier) + value = _value.(BACnetAccessRuleLocationSpecifier) } if closeErr := readBuffer.CloseContext("BACnetAccessRuleLocationSpecifierTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func BACnetAccessRuleLocationSpecifierTaggedParseWithBuffer(ctx context.Context, // Create the instance return &_BACnetAccessRuleLocationSpecifierTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_BACnetAccessRuleLocationSpecifierTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_BACnetAccessRuleLocationSpecifierTagged) Serialize() ([]byte, error) { func (m *_BACnetAccessRuleLocationSpecifierTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetAccessRuleLocationSpecifierTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetAccessRuleLocationSpecifierTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetAccessRuleLocationSpecifierTagged") } @@ -206,6 +211,7 @@ func (m *_BACnetAccessRuleLocationSpecifierTagged) SerializeWithWriteBuffer(ctx return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_BACnetAccessRuleLocationSpecifierTagged) GetTagNumber() uint8 { func (m *_BACnetAccessRuleLocationSpecifierTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_BACnetAccessRuleLocationSpecifierTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessRuleTimeRangeSpecifier.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessRuleTimeRangeSpecifier.go index 66d1834f3f9..1b2291119d0 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessRuleTimeRangeSpecifier.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessRuleTimeRangeSpecifier.go @@ -34,16 +34,16 @@ type IBACnetAccessRuleTimeRangeSpecifier interface { utils.Serializable } -const ( +const( BACnetAccessRuleTimeRangeSpecifier_SPECIFIED BACnetAccessRuleTimeRangeSpecifier = 0 - BACnetAccessRuleTimeRangeSpecifier_ALWAYS BACnetAccessRuleTimeRangeSpecifier = 1 + BACnetAccessRuleTimeRangeSpecifier_ALWAYS BACnetAccessRuleTimeRangeSpecifier = 1 ) var BACnetAccessRuleTimeRangeSpecifierValues []BACnetAccessRuleTimeRangeSpecifier func init() { _ = errors.New - BACnetAccessRuleTimeRangeSpecifierValues = []BACnetAccessRuleTimeRangeSpecifier{ + BACnetAccessRuleTimeRangeSpecifierValues = []BACnetAccessRuleTimeRangeSpecifier { BACnetAccessRuleTimeRangeSpecifier_SPECIFIED, BACnetAccessRuleTimeRangeSpecifier_ALWAYS, } @@ -51,10 +51,10 @@ func init() { func BACnetAccessRuleTimeRangeSpecifierByValue(value uint8) (enum BACnetAccessRuleTimeRangeSpecifier, ok bool) { switch value { - case 0: - return BACnetAccessRuleTimeRangeSpecifier_SPECIFIED, true - case 1: - return BACnetAccessRuleTimeRangeSpecifier_ALWAYS, true + case 0: + return BACnetAccessRuleTimeRangeSpecifier_SPECIFIED, true + case 1: + return BACnetAccessRuleTimeRangeSpecifier_ALWAYS, true } return 0, false } @@ -69,13 +69,13 @@ func BACnetAccessRuleTimeRangeSpecifierByName(value string) (enum BACnetAccessRu return 0, false } -func BACnetAccessRuleTimeRangeSpecifierKnows(value uint8) bool { +func BACnetAccessRuleTimeRangeSpecifierKnows(value uint8) bool { for _, typeValue := range BACnetAccessRuleTimeRangeSpecifierValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetAccessRuleTimeRangeSpecifier(structType interface{}) BACnetAccessRuleTimeRangeSpecifier { @@ -139,3 +139,4 @@ func (e BACnetAccessRuleTimeRangeSpecifier) PLC4XEnumName() string { func (e BACnetAccessRuleTimeRangeSpecifier) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessRuleTimeRangeSpecifierTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessRuleTimeRangeSpecifierTagged.go index 83f7dc25cb5..c33316b154d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessRuleTimeRangeSpecifierTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessRuleTimeRangeSpecifierTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetAccessRuleTimeRangeSpecifierTagged is the corresponding interface of BACnetAccessRuleTimeRangeSpecifierTagged type BACnetAccessRuleTimeRangeSpecifierTagged interface { @@ -46,14 +48,15 @@ type BACnetAccessRuleTimeRangeSpecifierTaggedExactly interface { // _BACnetAccessRuleTimeRangeSpecifierTagged is the data-structure of this message type _BACnetAccessRuleTimeRangeSpecifierTagged struct { - Header BACnetTagHeader - Value BACnetAccessRuleTimeRangeSpecifier + Header BACnetTagHeader + Value BACnetAccessRuleTimeRangeSpecifier // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_BACnetAccessRuleTimeRangeSpecifierTagged) GetValue() BACnetAccessRuleT /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetAccessRuleTimeRangeSpecifierTagged factory function for _BACnetAccessRuleTimeRangeSpecifierTagged -func NewBACnetAccessRuleTimeRangeSpecifierTagged(header BACnetTagHeader, value BACnetAccessRuleTimeRangeSpecifier, tagNumber uint8, tagClass TagClass) *_BACnetAccessRuleTimeRangeSpecifierTagged { - return &_BACnetAccessRuleTimeRangeSpecifierTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetAccessRuleTimeRangeSpecifierTagged( header BACnetTagHeader , value BACnetAccessRuleTimeRangeSpecifier , tagNumber uint8 , tagClass TagClass ) *_BACnetAccessRuleTimeRangeSpecifierTagged { +return &_BACnetAccessRuleTimeRangeSpecifierTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetAccessRuleTimeRangeSpecifierTagged(structType interface{}) BACnetAccessRuleTimeRangeSpecifierTagged { - if casted, ok := structType.(BACnetAccessRuleTimeRangeSpecifierTagged); ok { + if casted, ok := structType.(BACnetAccessRuleTimeRangeSpecifierTagged); ok { return casted } if casted, ok := structType.(*BACnetAccessRuleTimeRangeSpecifierTagged); ok { @@ -104,6 +108,7 @@ func (m *_BACnetAccessRuleTimeRangeSpecifierTagged) GetLengthInBits(ctx context. return lengthInBits } + func (m *_BACnetAccessRuleTimeRangeSpecifierTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func BACnetAccessRuleTimeRangeSpecifierTaggedParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetAccessRuleTimeRangeSpecifierTagged") } @@ -135,12 +140,12 @@ func BACnetAccessRuleTimeRangeSpecifierTaggedParseWithBuffer(ctx context.Context } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func BACnetAccessRuleTimeRangeSpecifierTaggedParseWithBuffer(ctx context.Context } var value BACnetAccessRuleTimeRangeSpecifier if _value != nil { - value = _value.(BACnetAccessRuleTimeRangeSpecifier) + value = _value.(BACnetAccessRuleTimeRangeSpecifier) } if closeErr := readBuffer.CloseContext("BACnetAccessRuleTimeRangeSpecifierTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func BACnetAccessRuleTimeRangeSpecifierTaggedParseWithBuffer(ctx context.Context // Create the instance return &_BACnetAccessRuleTimeRangeSpecifierTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_BACnetAccessRuleTimeRangeSpecifierTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_BACnetAccessRuleTimeRangeSpecifierTagged) Serialize() ([]byte, error) func (m *_BACnetAccessRuleTimeRangeSpecifierTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetAccessRuleTimeRangeSpecifierTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetAccessRuleTimeRangeSpecifierTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetAccessRuleTimeRangeSpecifierTagged") } @@ -206,6 +211,7 @@ func (m *_BACnetAccessRuleTimeRangeSpecifierTagged) SerializeWithWriteBuffer(ctx return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_BACnetAccessRuleTimeRangeSpecifierTagged) GetTagNumber() uint8 { func (m *_BACnetAccessRuleTimeRangeSpecifierTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_BACnetAccessRuleTimeRangeSpecifierTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessThreatLevel.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessThreatLevel.go index c88a909e55a..03ec1b1c230 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessThreatLevel.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessThreatLevel.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetAccessThreatLevel is the corresponding interface of BACnetAccessThreatLevel type BACnetAccessThreatLevel interface { @@ -44,9 +46,10 @@ type BACnetAccessThreatLevelExactly interface { // _BACnetAccessThreatLevel is the data-structure of this message type _BACnetAccessThreatLevel struct { - ThreatLevel BACnetApplicationTagUnsignedInteger + ThreatLevel BACnetApplicationTagUnsignedInteger } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -61,14 +64,15 @@ func (m *_BACnetAccessThreatLevel) GetThreatLevel() BACnetApplicationTagUnsigned /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetAccessThreatLevel factory function for _BACnetAccessThreatLevel -func NewBACnetAccessThreatLevel(threatLevel BACnetApplicationTagUnsignedInteger) *_BACnetAccessThreatLevel { - return &_BACnetAccessThreatLevel{ThreatLevel: threatLevel} +func NewBACnetAccessThreatLevel( threatLevel BACnetApplicationTagUnsignedInteger ) *_BACnetAccessThreatLevel { +return &_BACnetAccessThreatLevel{ ThreatLevel: threatLevel } } // Deprecated: use the interface for direct cast func CastBACnetAccessThreatLevel(structType interface{}) BACnetAccessThreatLevel { - if casted, ok := structType.(BACnetAccessThreatLevel); ok { + if casted, ok := structType.(BACnetAccessThreatLevel); ok { return casted } if casted, ok := structType.(*BACnetAccessThreatLevel); ok { @@ -90,6 +94,7 @@ func (m *_BACnetAccessThreatLevel) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetAccessThreatLevel) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -111,7 +116,7 @@ func BACnetAccessThreatLevelParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("threatLevel"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for threatLevel") } - _threatLevel, _threatLevelErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_threatLevel, _threatLevelErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _threatLevelErr != nil { return nil, errors.Wrap(_threatLevelErr, "Error parsing 'threatLevel' field of BACnetAccessThreatLevel") } @@ -126,8 +131,8 @@ func BACnetAccessThreatLevelParseWithBuffer(ctx context.Context, readBuffer util // Create the instance return &_BACnetAccessThreatLevel{ - ThreatLevel: threatLevel, - }, nil + ThreatLevel: threatLevel, + }, nil } func (m *_BACnetAccessThreatLevel) Serialize() ([]byte, error) { @@ -141,7 +146,7 @@ func (m *_BACnetAccessThreatLevel) Serialize() ([]byte, error) { func (m *_BACnetAccessThreatLevel) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetAccessThreatLevel"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetAccessThreatLevel"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetAccessThreatLevel") } @@ -163,6 +168,7 @@ func (m *_BACnetAccessThreatLevel) SerializeWithWriteBuffer(ctx context.Context, return nil } + func (m *_BACnetAccessThreatLevel) isBACnetAccessThreatLevel() bool { return true } @@ -177,3 +183,6 @@ func (m *_BACnetAccessThreatLevel) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessUserType.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessUserType.go index 9ff304bc10c..9ed66563811 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessUserType.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessUserType.go @@ -34,18 +34,18 @@ type IBACnetAccessUserType interface { utils.Serializable } -const ( - BACnetAccessUserType_ASSET BACnetAccessUserType = 0 - BACnetAccessUserType_GROUP BACnetAccessUserType = 1 - BACnetAccessUserType_PERSON BACnetAccessUserType = 2 - BACnetAccessUserType_VENDOR_PROPRIETARY_VALUE BACnetAccessUserType = 0xFFFF +const( + BACnetAccessUserType_ASSET BACnetAccessUserType = 0 + BACnetAccessUserType_GROUP BACnetAccessUserType = 1 + BACnetAccessUserType_PERSON BACnetAccessUserType = 2 + BACnetAccessUserType_VENDOR_PROPRIETARY_VALUE BACnetAccessUserType = 0XFFFF ) var BACnetAccessUserTypeValues []BACnetAccessUserType func init() { _ = errors.New - BACnetAccessUserTypeValues = []BACnetAccessUserType{ + BACnetAccessUserTypeValues = []BACnetAccessUserType { BACnetAccessUserType_ASSET, BACnetAccessUserType_GROUP, BACnetAccessUserType_PERSON, @@ -55,14 +55,14 @@ func init() { func BACnetAccessUserTypeByValue(value uint16) (enum BACnetAccessUserType, ok bool) { switch value { - case 0: - return BACnetAccessUserType_ASSET, true - case 0xFFFF: - return BACnetAccessUserType_VENDOR_PROPRIETARY_VALUE, true - case 1: - return BACnetAccessUserType_GROUP, true - case 2: - return BACnetAccessUserType_PERSON, true + case 0: + return BACnetAccessUserType_ASSET, true + case 0XFFFF: + return BACnetAccessUserType_VENDOR_PROPRIETARY_VALUE, true + case 1: + return BACnetAccessUserType_GROUP, true + case 2: + return BACnetAccessUserType_PERSON, true } return 0, false } @@ -81,13 +81,13 @@ func BACnetAccessUserTypeByName(value string) (enum BACnetAccessUserType, ok boo return 0, false } -func BACnetAccessUserTypeKnows(value uint16) bool { +func BACnetAccessUserTypeKnows(value uint16) bool { for _, typeValue := range BACnetAccessUserTypeValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastBACnetAccessUserType(structType interface{}) BACnetAccessUserType { @@ -155,3 +155,4 @@ func (e BACnetAccessUserType) PLC4XEnumName() string { func (e BACnetAccessUserType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessUserTypeTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessUserTypeTagged.go index 544e8b22003..404debd9661 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessUserTypeTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessUserTypeTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetAccessUserTypeTagged is the corresponding interface of BACnetAccessUserTypeTagged type BACnetAccessUserTypeTagged interface { @@ -50,15 +52,16 @@ type BACnetAccessUserTypeTaggedExactly interface { // _BACnetAccessUserTypeTagged is the data-structure of this message type _BACnetAccessUserTypeTagged struct { - Header BACnetTagHeader - Value BACnetAccessUserType - ProprietaryValue uint32 + Header BACnetTagHeader + Value BACnetAccessUserType + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_BACnetAccessUserTypeTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetAccessUserTypeTagged factory function for _BACnetAccessUserTypeTagged -func NewBACnetAccessUserTypeTagged(header BACnetTagHeader, value BACnetAccessUserType, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_BACnetAccessUserTypeTagged { - return &_BACnetAccessUserTypeTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetAccessUserTypeTagged( header BACnetTagHeader , value BACnetAccessUserType , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_BACnetAccessUserTypeTagged { +return &_BACnetAccessUserTypeTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetAccessUserTypeTagged(structType interface{}) BACnetAccessUserTypeTagged { - if casted, ok := structType.(BACnetAccessUserTypeTagged); ok { + if casted, ok := structType.(BACnetAccessUserTypeTagged); ok { return casted } if casted, ok := structType.(*BACnetAccessUserTypeTagged); ok { @@ -123,16 +127,17 @@ func (m *_BACnetAccessUserTypeTagged) GetLengthInBits(ctx context.Context) uint1 lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetAccessUserTypeTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetAccessUserTypeTaggedParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetAccessUserTypeTagged") } @@ -164,12 +169,12 @@ func BACnetAccessUserTypeTaggedParseWithBuffer(ctx context.Context, readBuffer u } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func BACnetAccessUserTypeTaggedParseWithBuffer(ctx context.Context, readBuffer u } var value BACnetAccessUserType if _value != nil { - value = _value.(BACnetAccessUserType) + value = _value.(BACnetAccessUserType) } // Virtual field @@ -195,7 +200,7 @@ func BACnetAccessUserTypeTaggedParseWithBuffer(ctx context.Context, readBuffer u } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetAccessUserTypeTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func BACnetAccessUserTypeTaggedParseWithBuffer(ctx context.Context, readBuffer u // Create the instance return &_BACnetAccessUserTypeTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetAccessUserTypeTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_BACnetAccessUserTypeTagged) Serialize() ([]byte, error) { func (m *_BACnetAccessUserTypeTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetAccessUserTypeTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetAccessUserTypeTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetAccessUserTypeTagged") } @@ -261,6 +266,7 @@ func (m *_BACnetAccessUserTypeTagged) SerializeWithWriteBuffer(ctx context.Conte return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_BACnetAccessUserTypeTagged) GetTagNumber() uint8 { func (m *_BACnetAccessUserTypeTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_BACnetAccessUserTypeTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessZoneOccupancyState.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessZoneOccupancyState.go index ce99030fcb6..82dfed3c602 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessZoneOccupancyState.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessZoneOccupancyState.go @@ -34,22 +34,22 @@ type IBACnetAccessZoneOccupancyState interface { utils.Serializable } -const ( - BACnetAccessZoneOccupancyState_NORMAL BACnetAccessZoneOccupancyState = 0 - BACnetAccessZoneOccupancyState_BELOW_LOWER_LIMIT BACnetAccessZoneOccupancyState = 1 - BACnetAccessZoneOccupancyState_AT_LOWER_LIMIT BACnetAccessZoneOccupancyState = 2 - BACnetAccessZoneOccupancyState_AT_UPPER_LIMIT BACnetAccessZoneOccupancyState = 3 - BACnetAccessZoneOccupancyState_ABOVE_UPPER_LIMIT BACnetAccessZoneOccupancyState = 4 - BACnetAccessZoneOccupancyState_DISABLED BACnetAccessZoneOccupancyState = 5 - BACnetAccessZoneOccupancyState_NOT_SUPPORTED BACnetAccessZoneOccupancyState = 6 - BACnetAccessZoneOccupancyState_VENDOR_PROPRIETARY_VALUE BACnetAccessZoneOccupancyState = 0xFFFF +const( + BACnetAccessZoneOccupancyState_NORMAL BACnetAccessZoneOccupancyState = 0 + BACnetAccessZoneOccupancyState_BELOW_LOWER_LIMIT BACnetAccessZoneOccupancyState = 1 + BACnetAccessZoneOccupancyState_AT_LOWER_LIMIT BACnetAccessZoneOccupancyState = 2 + BACnetAccessZoneOccupancyState_AT_UPPER_LIMIT BACnetAccessZoneOccupancyState = 3 + BACnetAccessZoneOccupancyState_ABOVE_UPPER_LIMIT BACnetAccessZoneOccupancyState = 4 + BACnetAccessZoneOccupancyState_DISABLED BACnetAccessZoneOccupancyState = 5 + BACnetAccessZoneOccupancyState_NOT_SUPPORTED BACnetAccessZoneOccupancyState = 6 + BACnetAccessZoneOccupancyState_VENDOR_PROPRIETARY_VALUE BACnetAccessZoneOccupancyState = 0XFFFF ) var BACnetAccessZoneOccupancyStateValues []BACnetAccessZoneOccupancyState func init() { _ = errors.New - BACnetAccessZoneOccupancyStateValues = []BACnetAccessZoneOccupancyState{ + BACnetAccessZoneOccupancyStateValues = []BACnetAccessZoneOccupancyState { BACnetAccessZoneOccupancyState_NORMAL, BACnetAccessZoneOccupancyState_BELOW_LOWER_LIMIT, BACnetAccessZoneOccupancyState_AT_LOWER_LIMIT, @@ -63,22 +63,22 @@ func init() { func BACnetAccessZoneOccupancyStateByValue(value uint16) (enum BACnetAccessZoneOccupancyState, ok bool) { switch value { - case 0: - return BACnetAccessZoneOccupancyState_NORMAL, true - case 0xFFFF: - return BACnetAccessZoneOccupancyState_VENDOR_PROPRIETARY_VALUE, true - case 1: - return BACnetAccessZoneOccupancyState_BELOW_LOWER_LIMIT, true - case 2: - return BACnetAccessZoneOccupancyState_AT_LOWER_LIMIT, true - case 3: - return BACnetAccessZoneOccupancyState_AT_UPPER_LIMIT, true - case 4: - return BACnetAccessZoneOccupancyState_ABOVE_UPPER_LIMIT, true - case 5: - return BACnetAccessZoneOccupancyState_DISABLED, true - case 6: - return BACnetAccessZoneOccupancyState_NOT_SUPPORTED, true + case 0: + return BACnetAccessZoneOccupancyState_NORMAL, true + case 0XFFFF: + return BACnetAccessZoneOccupancyState_VENDOR_PROPRIETARY_VALUE, true + case 1: + return BACnetAccessZoneOccupancyState_BELOW_LOWER_LIMIT, true + case 2: + return BACnetAccessZoneOccupancyState_AT_LOWER_LIMIT, true + case 3: + return BACnetAccessZoneOccupancyState_AT_UPPER_LIMIT, true + case 4: + return BACnetAccessZoneOccupancyState_ABOVE_UPPER_LIMIT, true + case 5: + return BACnetAccessZoneOccupancyState_DISABLED, true + case 6: + return BACnetAccessZoneOccupancyState_NOT_SUPPORTED, true } return 0, false } @@ -105,13 +105,13 @@ func BACnetAccessZoneOccupancyStateByName(value string) (enum BACnetAccessZoneOc return 0, false } -func BACnetAccessZoneOccupancyStateKnows(value uint16) bool { +func BACnetAccessZoneOccupancyStateKnows(value uint16) bool { for _, typeValue := range BACnetAccessZoneOccupancyStateValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastBACnetAccessZoneOccupancyState(structType interface{}) BACnetAccessZoneOccupancyState { @@ -187,3 +187,4 @@ func (e BACnetAccessZoneOccupancyState) PLC4XEnumName() string { func (e BACnetAccessZoneOccupancyState) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessZoneOccupancyStateTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessZoneOccupancyStateTagged.go index 5b1ba44a4df..c907098565c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessZoneOccupancyStateTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccessZoneOccupancyStateTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetAccessZoneOccupancyStateTagged is the corresponding interface of BACnetAccessZoneOccupancyStateTagged type BACnetAccessZoneOccupancyStateTagged interface { @@ -50,15 +52,16 @@ type BACnetAccessZoneOccupancyStateTaggedExactly interface { // _BACnetAccessZoneOccupancyStateTagged is the data-structure of this message type _BACnetAccessZoneOccupancyStateTagged struct { - Header BACnetTagHeader - Value BACnetAccessZoneOccupancyState - ProprietaryValue uint32 + Header BACnetTagHeader + Value BACnetAccessZoneOccupancyState + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_BACnetAccessZoneOccupancyStateTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetAccessZoneOccupancyStateTagged factory function for _BACnetAccessZoneOccupancyStateTagged -func NewBACnetAccessZoneOccupancyStateTagged(header BACnetTagHeader, value BACnetAccessZoneOccupancyState, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_BACnetAccessZoneOccupancyStateTagged { - return &_BACnetAccessZoneOccupancyStateTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetAccessZoneOccupancyStateTagged( header BACnetTagHeader , value BACnetAccessZoneOccupancyState , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_BACnetAccessZoneOccupancyStateTagged { +return &_BACnetAccessZoneOccupancyStateTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetAccessZoneOccupancyStateTagged(structType interface{}) BACnetAccessZoneOccupancyStateTagged { - if casted, ok := structType.(BACnetAccessZoneOccupancyStateTagged); ok { + if casted, ok := structType.(BACnetAccessZoneOccupancyStateTagged); ok { return casted } if casted, ok := structType.(*BACnetAccessZoneOccupancyStateTagged); ok { @@ -123,16 +127,17 @@ func (m *_BACnetAccessZoneOccupancyStateTagged) GetLengthInBits(ctx context.Cont lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetAccessZoneOccupancyStateTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetAccessZoneOccupancyStateTaggedParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetAccessZoneOccupancyStateTagged") } @@ -164,12 +169,12 @@ func BACnetAccessZoneOccupancyStateTaggedParseWithBuffer(ctx context.Context, re } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func BACnetAccessZoneOccupancyStateTaggedParseWithBuffer(ctx context.Context, re } var value BACnetAccessZoneOccupancyState if _value != nil { - value = _value.(BACnetAccessZoneOccupancyState) + value = _value.(BACnetAccessZoneOccupancyState) } // Virtual field @@ -195,7 +200,7 @@ func BACnetAccessZoneOccupancyStateTaggedParseWithBuffer(ctx context.Context, re } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetAccessZoneOccupancyStateTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func BACnetAccessZoneOccupancyStateTaggedParseWithBuffer(ctx context.Context, re // Create the instance return &_BACnetAccessZoneOccupancyStateTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetAccessZoneOccupancyStateTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_BACnetAccessZoneOccupancyStateTagged) Serialize() ([]byte, error) { func (m *_BACnetAccessZoneOccupancyStateTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetAccessZoneOccupancyStateTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetAccessZoneOccupancyStateTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetAccessZoneOccupancyStateTagged") } @@ -261,6 +266,7 @@ func (m *_BACnetAccessZoneOccupancyStateTagged) SerializeWithWriteBuffer(ctx con return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_BACnetAccessZoneOccupancyStateTagged) GetTagNumber() uint8 { func (m *_BACnetAccessZoneOccupancyStateTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_BACnetAccessZoneOccupancyStateTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccumulatorRecord.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccumulatorRecord.go index 4f4f065596b..6220d3e8831 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccumulatorRecord.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccumulatorRecord.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetAccumulatorRecord is the corresponding interface of BACnetAccumulatorRecord type BACnetAccumulatorRecord interface { @@ -50,12 +52,13 @@ type BACnetAccumulatorRecordExactly interface { // _BACnetAccumulatorRecord is the data-structure of this message type _BACnetAccumulatorRecord struct { - Timestamp BACnetDateTimeEnclosed - PresentValue BACnetContextTagSignedInteger - AccumulatedValue BACnetContextTagSignedInteger - AccumulatorStatus BACnetAccumulatorRecordAccumulatorStatusTagged + Timestamp BACnetDateTimeEnclosed + PresentValue BACnetContextTagSignedInteger + AccumulatedValue BACnetContextTagSignedInteger + AccumulatorStatus BACnetAccumulatorRecordAccumulatorStatusTagged } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -82,14 +85,15 @@ func (m *_BACnetAccumulatorRecord) GetAccumulatorStatus() BACnetAccumulatorRecor /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetAccumulatorRecord factory function for _BACnetAccumulatorRecord -func NewBACnetAccumulatorRecord(timestamp BACnetDateTimeEnclosed, presentValue BACnetContextTagSignedInteger, accumulatedValue BACnetContextTagSignedInteger, accumulatorStatus BACnetAccumulatorRecordAccumulatorStatusTagged) *_BACnetAccumulatorRecord { - return &_BACnetAccumulatorRecord{Timestamp: timestamp, PresentValue: presentValue, AccumulatedValue: accumulatedValue, AccumulatorStatus: accumulatorStatus} +func NewBACnetAccumulatorRecord( timestamp BACnetDateTimeEnclosed , presentValue BACnetContextTagSignedInteger , accumulatedValue BACnetContextTagSignedInteger , accumulatorStatus BACnetAccumulatorRecordAccumulatorStatusTagged ) *_BACnetAccumulatorRecord { +return &_BACnetAccumulatorRecord{ Timestamp: timestamp , PresentValue: presentValue , AccumulatedValue: accumulatedValue , AccumulatorStatus: accumulatorStatus } } // Deprecated: use the interface for direct cast func CastBACnetAccumulatorRecord(structType interface{}) BACnetAccumulatorRecord { - if casted, ok := structType.(BACnetAccumulatorRecord); ok { + if casted, ok := structType.(BACnetAccumulatorRecord); ok { return casted } if casted, ok := structType.(*BACnetAccumulatorRecord); ok { @@ -120,6 +124,7 @@ func (m *_BACnetAccumulatorRecord) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetAccumulatorRecord) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -141,7 +146,7 @@ func BACnetAccumulatorRecordParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("timestamp"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timestamp") } - _timestamp, _timestampErr := BACnetDateTimeEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_timestamp, _timestampErr := BACnetDateTimeEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _timestampErr != nil { return nil, errors.Wrap(_timestampErr, "Error parsing 'timestamp' field of BACnetAccumulatorRecord") } @@ -154,7 +159,7 @@ func BACnetAccumulatorRecordParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("presentValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for presentValue") } - _presentValue, _presentValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_SIGNED_INTEGER)) +_presentValue, _presentValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_SIGNED_INTEGER ) ) if _presentValueErr != nil { return nil, errors.Wrap(_presentValueErr, "Error parsing 'presentValue' field of BACnetAccumulatorRecord") } @@ -167,7 +172,7 @@ func BACnetAccumulatorRecordParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("accumulatedValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for accumulatedValue") } - _accumulatedValue, _accumulatedValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), BACnetDataType(BACnetDataType_SIGNED_INTEGER)) +_accumulatedValue, _accumulatedValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , BACnetDataType( BACnetDataType_SIGNED_INTEGER ) ) if _accumulatedValueErr != nil { return nil, errors.Wrap(_accumulatedValueErr, "Error parsing 'accumulatedValue' field of BACnetAccumulatorRecord") } @@ -180,7 +185,7 @@ func BACnetAccumulatorRecordParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("accumulatorStatus"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for accumulatorStatus") } - _accumulatorStatus, _accumulatorStatusErr := BACnetAccumulatorRecordAccumulatorStatusTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(3)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_accumulatorStatus, _accumulatorStatusErr := BACnetAccumulatorRecordAccumulatorStatusTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(3) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _accumulatorStatusErr != nil { return nil, errors.Wrap(_accumulatorStatusErr, "Error parsing 'accumulatorStatus' field of BACnetAccumulatorRecord") } @@ -195,11 +200,11 @@ func BACnetAccumulatorRecordParseWithBuffer(ctx context.Context, readBuffer util // Create the instance return &_BACnetAccumulatorRecord{ - Timestamp: timestamp, - PresentValue: presentValue, - AccumulatedValue: accumulatedValue, - AccumulatorStatus: accumulatorStatus, - }, nil + Timestamp: timestamp, + PresentValue: presentValue, + AccumulatedValue: accumulatedValue, + AccumulatorStatus: accumulatorStatus, + }, nil } func (m *_BACnetAccumulatorRecord) Serialize() ([]byte, error) { @@ -213,7 +218,7 @@ func (m *_BACnetAccumulatorRecord) Serialize() ([]byte, error) { func (m *_BACnetAccumulatorRecord) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetAccumulatorRecord"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetAccumulatorRecord"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetAccumulatorRecord") } @@ -271,6 +276,7 @@ func (m *_BACnetAccumulatorRecord) SerializeWithWriteBuffer(ctx context.Context, return nil } + func (m *_BACnetAccumulatorRecord) isBACnetAccumulatorRecord() bool { return true } @@ -285,3 +291,6 @@ func (m *_BACnetAccumulatorRecord) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccumulatorRecordAccumulatorStatus.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccumulatorRecordAccumulatorStatus.go index 1ca352c5b36..17a4ef9a616 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccumulatorRecordAccumulatorStatus.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccumulatorRecordAccumulatorStatus.go @@ -34,19 +34,19 @@ type IBACnetAccumulatorRecordAccumulatorStatus interface { utils.Serializable } -const ( - BACnetAccumulatorRecordAccumulatorStatus_NORMAL BACnetAccumulatorRecordAccumulatorStatus = 0 - BACnetAccumulatorRecordAccumulatorStatus_STARTING BACnetAccumulatorRecordAccumulatorStatus = 1 +const( + BACnetAccumulatorRecordAccumulatorStatus_NORMAL BACnetAccumulatorRecordAccumulatorStatus = 0 + BACnetAccumulatorRecordAccumulatorStatus_STARTING BACnetAccumulatorRecordAccumulatorStatus = 1 BACnetAccumulatorRecordAccumulatorStatus_RECOVERED BACnetAccumulatorRecordAccumulatorStatus = 2 - BACnetAccumulatorRecordAccumulatorStatus_ABNORMAL BACnetAccumulatorRecordAccumulatorStatus = 3 - BACnetAccumulatorRecordAccumulatorStatus_FAILED BACnetAccumulatorRecordAccumulatorStatus = 4 + BACnetAccumulatorRecordAccumulatorStatus_ABNORMAL BACnetAccumulatorRecordAccumulatorStatus = 3 + BACnetAccumulatorRecordAccumulatorStatus_FAILED BACnetAccumulatorRecordAccumulatorStatus = 4 ) var BACnetAccumulatorRecordAccumulatorStatusValues []BACnetAccumulatorRecordAccumulatorStatus func init() { _ = errors.New - BACnetAccumulatorRecordAccumulatorStatusValues = []BACnetAccumulatorRecordAccumulatorStatus{ + BACnetAccumulatorRecordAccumulatorStatusValues = []BACnetAccumulatorRecordAccumulatorStatus { BACnetAccumulatorRecordAccumulatorStatus_NORMAL, BACnetAccumulatorRecordAccumulatorStatus_STARTING, BACnetAccumulatorRecordAccumulatorStatus_RECOVERED, @@ -57,16 +57,16 @@ func init() { func BACnetAccumulatorRecordAccumulatorStatusByValue(value uint8) (enum BACnetAccumulatorRecordAccumulatorStatus, ok bool) { switch value { - case 0: - return BACnetAccumulatorRecordAccumulatorStatus_NORMAL, true - case 1: - return BACnetAccumulatorRecordAccumulatorStatus_STARTING, true - case 2: - return BACnetAccumulatorRecordAccumulatorStatus_RECOVERED, true - case 3: - return BACnetAccumulatorRecordAccumulatorStatus_ABNORMAL, true - case 4: - return BACnetAccumulatorRecordAccumulatorStatus_FAILED, true + case 0: + return BACnetAccumulatorRecordAccumulatorStatus_NORMAL, true + case 1: + return BACnetAccumulatorRecordAccumulatorStatus_STARTING, true + case 2: + return BACnetAccumulatorRecordAccumulatorStatus_RECOVERED, true + case 3: + return BACnetAccumulatorRecordAccumulatorStatus_ABNORMAL, true + case 4: + return BACnetAccumulatorRecordAccumulatorStatus_FAILED, true } return 0, false } @@ -87,13 +87,13 @@ func BACnetAccumulatorRecordAccumulatorStatusByName(value string) (enum BACnetAc return 0, false } -func BACnetAccumulatorRecordAccumulatorStatusKnows(value uint8) bool { +func BACnetAccumulatorRecordAccumulatorStatusKnows(value uint8) bool { for _, typeValue := range BACnetAccumulatorRecordAccumulatorStatusValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetAccumulatorRecordAccumulatorStatus(structType interface{}) BACnetAccumulatorRecordAccumulatorStatus { @@ -163,3 +163,4 @@ func (e BACnetAccumulatorRecordAccumulatorStatus) PLC4XEnumName() string { func (e BACnetAccumulatorRecordAccumulatorStatus) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccumulatorRecordAccumulatorStatusTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccumulatorRecordAccumulatorStatusTagged.go index 5f6c82cbc44..5342f123e11 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAccumulatorRecordAccumulatorStatusTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAccumulatorRecordAccumulatorStatusTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetAccumulatorRecordAccumulatorStatusTagged is the corresponding interface of BACnetAccumulatorRecordAccumulatorStatusTagged type BACnetAccumulatorRecordAccumulatorStatusTagged interface { @@ -46,14 +48,15 @@ type BACnetAccumulatorRecordAccumulatorStatusTaggedExactly interface { // _BACnetAccumulatorRecordAccumulatorStatusTagged is the data-structure of this message type _BACnetAccumulatorRecordAccumulatorStatusTagged struct { - Header BACnetTagHeader - Value BACnetAccumulatorRecordAccumulatorStatus + Header BACnetTagHeader + Value BACnetAccumulatorRecordAccumulatorStatus // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_BACnetAccumulatorRecordAccumulatorStatusTagged) GetValue() BACnetAccum /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetAccumulatorRecordAccumulatorStatusTagged factory function for _BACnetAccumulatorRecordAccumulatorStatusTagged -func NewBACnetAccumulatorRecordAccumulatorStatusTagged(header BACnetTagHeader, value BACnetAccumulatorRecordAccumulatorStatus, tagNumber uint8, tagClass TagClass) *_BACnetAccumulatorRecordAccumulatorStatusTagged { - return &_BACnetAccumulatorRecordAccumulatorStatusTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetAccumulatorRecordAccumulatorStatusTagged( header BACnetTagHeader , value BACnetAccumulatorRecordAccumulatorStatus , tagNumber uint8 , tagClass TagClass ) *_BACnetAccumulatorRecordAccumulatorStatusTagged { +return &_BACnetAccumulatorRecordAccumulatorStatusTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetAccumulatorRecordAccumulatorStatusTagged(structType interface{}) BACnetAccumulatorRecordAccumulatorStatusTagged { - if casted, ok := structType.(BACnetAccumulatorRecordAccumulatorStatusTagged); ok { + if casted, ok := structType.(BACnetAccumulatorRecordAccumulatorStatusTagged); ok { return casted } if casted, ok := structType.(*BACnetAccumulatorRecordAccumulatorStatusTagged); ok { @@ -104,6 +108,7 @@ func (m *_BACnetAccumulatorRecordAccumulatorStatusTagged) GetLengthInBits(ctx co return lengthInBits } + func (m *_BACnetAccumulatorRecordAccumulatorStatusTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func BACnetAccumulatorRecordAccumulatorStatusTaggedParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetAccumulatorRecordAccumulatorStatusTagged") } @@ -135,12 +140,12 @@ func BACnetAccumulatorRecordAccumulatorStatusTaggedParseWithBuffer(ctx context.C } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func BACnetAccumulatorRecordAccumulatorStatusTaggedParseWithBuffer(ctx context.C } var value BACnetAccumulatorRecordAccumulatorStatus if _value != nil { - value = _value.(BACnetAccumulatorRecordAccumulatorStatus) + value = _value.(BACnetAccumulatorRecordAccumulatorStatus) } if closeErr := readBuffer.CloseContext("BACnetAccumulatorRecordAccumulatorStatusTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func BACnetAccumulatorRecordAccumulatorStatusTaggedParseWithBuffer(ctx context.C // Create the instance return &_BACnetAccumulatorRecordAccumulatorStatusTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_BACnetAccumulatorRecordAccumulatorStatusTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_BACnetAccumulatorRecordAccumulatorStatusTagged) Serialize() ([]byte, e func (m *_BACnetAccumulatorRecordAccumulatorStatusTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetAccumulatorRecordAccumulatorStatusTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetAccumulatorRecordAccumulatorStatusTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetAccumulatorRecordAccumulatorStatusTagged") } @@ -206,6 +211,7 @@ func (m *_BACnetAccumulatorRecordAccumulatorStatusTagged) SerializeWithWriteBuff return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_BACnetAccumulatorRecordAccumulatorStatusTagged) GetTagNumber() uint8 { func (m *_BACnetAccumulatorRecordAccumulatorStatusTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_BACnetAccumulatorRecordAccumulatorStatusTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAction.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAction.go index c6b6f90539c..4333e254dcf 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAction.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAction.go @@ -34,8 +34,8 @@ type IBACnetAction interface { utils.Serializable } -const ( - BACnetAction_DIRECT BACnetAction = 0 +const( + BACnetAction_DIRECT BACnetAction = 0 BACnetAction_REVERSE BACnetAction = 1 ) @@ -43,7 +43,7 @@ var BACnetActionValues []BACnetAction func init() { _ = errors.New - BACnetActionValues = []BACnetAction{ + BACnetActionValues = []BACnetAction { BACnetAction_DIRECT, BACnetAction_REVERSE, } @@ -51,10 +51,10 @@ func init() { func BACnetActionByValue(value uint8) (enum BACnetAction, ok bool) { switch value { - case 0: - return BACnetAction_DIRECT, true - case 1: - return BACnetAction_REVERSE, true + case 0: + return BACnetAction_DIRECT, true + case 1: + return BACnetAction_REVERSE, true } return 0, false } @@ -69,13 +69,13 @@ func BACnetActionByName(value string) (enum BACnetAction, ok bool) { return 0, false } -func BACnetActionKnows(value uint8) bool { +func BACnetActionKnows(value uint8) bool { for _, typeValue := range BACnetActionValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetAction(structType interface{}) BACnetAction { @@ -139,3 +139,4 @@ func (e BACnetAction) PLC4XEnumName() string { func (e BACnetAction) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetActionCommand.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetActionCommand.go index 2af507c877d..2f6d0958c2d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetActionCommand.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetActionCommand.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetActionCommand is the corresponding interface of BACnetActionCommand type BACnetActionCommand interface { @@ -61,17 +63,18 @@ type BACnetActionCommandExactly interface { // _BACnetActionCommand is the data-structure of this message type _BACnetActionCommand struct { - DeviceIdentifier BACnetContextTagObjectIdentifier - ObjectIdentifier BACnetContextTagObjectIdentifier - PropertyIdentifier BACnetPropertyIdentifierTagged - ArrayIndex BACnetContextTagUnsignedInteger - PropertyValue BACnetConstructedData - Priority BACnetContextTagUnsignedInteger - PostDelay BACnetContextTagBoolean - QuitOnFailure BACnetContextTagBoolean - WriteSuccessful BACnetContextTagBoolean + DeviceIdentifier BACnetContextTagObjectIdentifier + ObjectIdentifier BACnetContextTagObjectIdentifier + PropertyIdentifier BACnetPropertyIdentifierTagged + ArrayIndex BACnetContextTagUnsignedInteger + PropertyValue BACnetConstructedData + Priority BACnetContextTagUnsignedInteger + PostDelay BACnetContextTagBoolean + QuitOnFailure BACnetContextTagBoolean + WriteSuccessful BACnetContextTagBoolean } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -118,14 +121,15 @@ func (m *_BACnetActionCommand) GetWriteSuccessful() BACnetContextTagBoolean { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetActionCommand factory function for _BACnetActionCommand -func NewBACnetActionCommand(deviceIdentifier BACnetContextTagObjectIdentifier, objectIdentifier BACnetContextTagObjectIdentifier, propertyIdentifier BACnetPropertyIdentifierTagged, arrayIndex BACnetContextTagUnsignedInteger, propertyValue BACnetConstructedData, priority BACnetContextTagUnsignedInteger, postDelay BACnetContextTagBoolean, quitOnFailure BACnetContextTagBoolean, writeSuccessful BACnetContextTagBoolean) *_BACnetActionCommand { - return &_BACnetActionCommand{DeviceIdentifier: deviceIdentifier, ObjectIdentifier: objectIdentifier, PropertyIdentifier: propertyIdentifier, ArrayIndex: arrayIndex, PropertyValue: propertyValue, Priority: priority, PostDelay: postDelay, QuitOnFailure: quitOnFailure, WriteSuccessful: writeSuccessful} +func NewBACnetActionCommand( deviceIdentifier BACnetContextTagObjectIdentifier , objectIdentifier BACnetContextTagObjectIdentifier , propertyIdentifier BACnetPropertyIdentifierTagged , arrayIndex BACnetContextTagUnsignedInteger , propertyValue BACnetConstructedData , priority BACnetContextTagUnsignedInteger , postDelay BACnetContextTagBoolean , quitOnFailure BACnetContextTagBoolean , writeSuccessful BACnetContextTagBoolean ) *_BACnetActionCommand { +return &_BACnetActionCommand{ DeviceIdentifier: deviceIdentifier , ObjectIdentifier: objectIdentifier , PropertyIdentifier: propertyIdentifier , ArrayIndex: arrayIndex , PropertyValue: propertyValue , Priority: priority , PostDelay: postDelay , QuitOnFailure: quitOnFailure , WriteSuccessful: writeSuccessful } } // Deprecated: use the interface for direct cast func CastBACnetActionCommand(structType interface{}) BACnetActionCommand { - if casted, ok := structType.(BACnetActionCommand); ok { + if casted, ok := structType.(BACnetActionCommand); ok { return casted } if casted, ok := structType.(*BACnetActionCommand); ok { @@ -181,6 +185,7 @@ func (m *_BACnetActionCommand) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetActionCommand) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -200,12 +205,12 @@ func BACnetActionCommandParseWithBuffer(ctx context.Context, readBuffer utils.Re // Optional Field (deviceIdentifier) (Can be skipped, if a given expression evaluates to false) var deviceIdentifier BACnetContextTagObjectIdentifier = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("deviceIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for deviceIdentifier") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(0), BACnetDataType_BACNET_OBJECT_IDENTIFIER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(0) , BACnetDataType_BACNET_OBJECT_IDENTIFIER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -224,7 +229,7 @@ func BACnetActionCommandParseWithBuffer(ctx context.Context, readBuffer utils.Re if pullErr := readBuffer.PullContext("objectIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for objectIdentifier") } - _objectIdentifier, _objectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER)) +_objectIdentifier, _objectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_BACNET_OBJECT_IDENTIFIER ) ) if _objectIdentifierErr != nil { return nil, errors.Wrap(_objectIdentifierErr, "Error parsing 'objectIdentifier' field of BACnetActionCommand") } @@ -237,7 +242,7 @@ func BACnetActionCommandParseWithBuffer(ctx context.Context, readBuffer utils.Re if pullErr := readBuffer.PullContext("propertyIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for propertyIdentifier") } - _propertyIdentifier, _propertyIdentifierErr := BACnetPropertyIdentifierTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_propertyIdentifier, _propertyIdentifierErr := BACnetPropertyIdentifierTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _propertyIdentifierErr != nil { return nil, errors.Wrap(_propertyIdentifierErr, "Error parsing 'propertyIdentifier' field of BACnetActionCommand") } @@ -248,12 +253,12 @@ func BACnetActionCommandParseWithBuffer(ctx context.Context, readBuffer utils.Re // Optional Field (arrayIndex) (Can be skipped, if a given expression evaluates to false) var arrayIndex BACnetContextTagUnsignedInteger = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("arrayIndex"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for arrayIndex") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(3), BACnetDataType_UNSIGNED_INTEGER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(3) , BACnetDataType_UNSIGNED_INTEGER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -270,12 +275,12 @@ func BACnetActionCommandParseWithBuffer(ctx context.Context, readBuffer utils.Re // Optional Field (propertyValue) (Can be skipped, if a given expression evaluates to false) var propertyValue BACnetConstructedData = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("propertyValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for propertyValue") } - _val, _err := BACnetConstructedDataParseWithBuffer(ctx, readBuffer, uint8(4), objectIdentifier.GetObjectType(), propertyIdentifier.GetValue(), (CastBACnetTagPayloadUnsignedInteger(utils.InlineIf(bool((arrayIndex) != (nil)), func() interface{} { return CastBACnetTagPayloadUnsignedInteger((arrayIndex).GetPayload()) }, func() interface{} { return CastBACnetTagPayloadUnsignedInteger(nil) })))) +_val, _err := BACnetConstructedDataParseWithBuffer(ctx, readBuffer , uint8(4) , objectIdentifier.GetObjectType() , propertyIdentifier.GetValue() , (CastBACnetTagPayloadUnsignedInteger(utils.InlineIf(bool(((arrayIndex)) != (nil)), func() interface{} {return CastBACnetTagPayloadUnsignedInteger((arrayIndex).GetPayload())}, func() interface{} {return CastBACnetTagPayloadUnsignedInteger(nil)}))) ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -292,12 +297,12 @@ func BACnetActionCommandParseWithBuffer(ctx context.Context, readBuffer utils.Re // Optional Field (priority) (Can be skipped, if a given expression evaluates to false) var priority BACnetContextTagUnsignedInteger = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("priority"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for priority") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(5), BACnetDataType_UNSIGNED_INTEGER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(5) , BACnetDataType_UNSIGNED_INTEGER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -314,12 +319,12 @@ func BACnetActionCommandParseWithBuffer(ctx context.Context, readBuffer utils.Re // Optional Field (postDelay) (Can be skipped, if a given expression evaluates to false) var postDelay BACnetContextTagBoolean = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("postDelay"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for postDelay") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(6), BACnetDataType_BOOLEAN) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(6) , BACnetDataType_BOOLEAN ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -338,7 +343,7 @@ func BACnetActionCommandParseWithBuffer(ctx context.Context, readBuffer utils.Re if pullErr := readBuffer.PullContext("quitOnFailure"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for quitOnFailure") } - _quitOnFailure, _quitOnFailureErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(7)), BACnetDataType(BACnetDataType_BOOLEAN)) +_quitOnFailure, _quitOnFailureErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(7) ) , BACnetDataType( BACnetDataType_BOOLEAN ) ) if _quitOnFailureErr != nil { return nil, errors.Wrap(_quitOnFailureErr, "Error parsing 'quitOnFailure' field of BACnetActionCommand") } @@ -351,7 +356,7 @@ func BACnetActionCommandParseWithBuffer(ctx context.Context, readBuffer utils.Re if pullErr := readBuffer.PullContext("writeSuccessful"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for writeSuccessful") } - _writeSuccessful, _writeSuccessfulErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(8)), BACnetDataType(BACnetDataType_BOOLEAN)) +_writeSuccessful, _writeSuccessfulErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(8) ) , BACnetDataType( BACnetDataType_BOOLEAN ) ) if _writeSuccessfulErr != nil { return nil, errors.Wrap(_writeSuccessfulErr, "Error parsing 'writeSuccessful' field of BACnetActionCommand") } @@ -366,16 +371,16 @@ func BACnetActionCommandParseWithBuffer(ctx context.Context, readBuffer utils.Re // Create the instance return &_BACnetActionCommand{ - DeviceIdentifier: deviceIdentifier, - ObjectIdentifier: objectIdentifier, - PropertyIdentifier: propertyIdentifier, - ArrayIndex: arrayIndex, - PropertyValue: propertyValue, - Priority: priority, - PostDelay: postDelay, - QuitOnFailure: quitOnFailure, - WriteSuccessful: writeSuccessful, - }, nil + DeviceIdentifier: deviceIdentifier, + ObjectIdentifier: objectIdentifier, + PropertyIdentifier: propertyIdentifier, + ArrayIndex: arrayIndex, + PropertyValue: propertyValue, + Priority: priority, + PostDelay: postDelay, + QuitOnFailure: quitOnFailure, + WriteSuccessful: writeSuccessful, + }, nil } func (m *_BACnetActionCommand) Serialize() ([]byte, error) { @@ -389,7 +394,7 @@ func (m *_BACnetActionCommand) Serialize() ([]byte, error) { func (m *_BACnetActionCommand) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetActionCommand"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetActionCommand"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetActionCommand") } @@ -527,6 +532,7 @@ func (m *_BACnetActionCommand) SerializeWithWriteBuffer(ctx context.Context, wri return nil } + func (m *_BACnetActionCommand) isBACnetActionCommand() bool { return true } @@ -541,3 +547,6 @@ func (m *_BACnetActionCommand) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetActionList.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetActionList.go index d342d182bd4..c0cc2f33b55 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetActionList.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetActionList.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetActionList is the corresponding interface of BACnetActionList type BACnetActionList interface { @@ -49,11 +51,12 @@ type BACnetActionListExactly interface { // _BACnetActionList is the data-structure of this message type _BACnetActionList struct { - InnerOpeningTag BACnetOpeningTag - Action []BACnetActionCommand - InnerClosingTag BACnetClosingTag + InnerOpeningTag BACnetOpeningTag + Action []BACnetActionCommand + InnerClosingTag BACnetClosingTag } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -76,14 +79,15 @@ func (m *_BACnetActionList) GetInnerClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetActionList factory function for _BACnetActionList -func NewBACnetActionList(innerOpeningTag BACnetOpeningTag, action []BACnetActionCommand, innerClosingTag BACnetClosingTag) *_BACnetActionList { - return &_BACnetActionList{InnerOpeningTag: innerOpeningTag, Action: action, InnerClosingTag: innerClosingTag} +func NewBACnetActionList( innerOpeningTag BACnetOpeningTag , action []BACnetActionCommand , innerClosingTag BACnetClosingTag ) *_BACnetActionList { +return &_BACnetActionList{ InnerOpeningTag: innerOpeningTag , Action: action , InnerClosingTag: innerClosingTag } } // Deprecated: use the interface for direct cast func CastBACnetActionList(structType interface{}) BACnetActionList { - if casted, ok := structType.(BACnetActionList); ok { + if casted, ok := structType.(BACnetActionList); ok { return casted } if casted, ok := structType.(*BACnetActionList); ok { @@ -115,6 +119,7 @@ func (m *_BACnetActionList) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetActionList) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +141,7 @@ func BACnetActionListParseWithBuffer(ctx context.Context, readBuffer utils.ReadB if pullErr := readBuffer.PullContext("innerOpeningTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerOpeningTag") } - _innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _innerOpeningTagErr != nil { return nil, errors.Wrap(_innerOpeningTagErr, "Error parsing 'innerOpeningTag' field of BACnetActionList") } @@ -152,8 +157,8 @@ func BACnetActionListParseWithBuffer(ctx context.Context, readBuffer utils.ReadB // Terminated array var action []BACnetActionCommand { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, 0)) { - _item, _err := BACnetActionCommandParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, 0)); { +_item, _err := BACnetActionCommandParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'action' field of BACnetActionList") } @@ -168,7 +173,7 @@ func BACnetActionListParseWithBuffer(ctx context.Context, readBuffer utils.ReadB if pullErr := readBuffer.PullContext("innerClosingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerClosingTag") } - _innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _innerClosingTagErr != nil { return nil, errors.Wrap(_innerClosingTagErr, "Error parsing 'innerClosingTag' field of BACnetActionList") } @@ -183,10 +188,10 @@ func BACnetActionListParseWithBuffer(ctx context.Context, readBuffer utils.ReadB // Create the instance return &_BACnetActionList{ - InnerOpeningTag: innerOpeningTag, - Action: action, - InnerClosingTag: innerClosingTag, - }, nil + InnerOpeningTag: innerOpeningTag, + Action: action, + InnerClosingTag: innerClosingTag, + }, nil } func (m *_BACnetActionList) Serialize() ([]byte, error) { @@ -200,7 +205,7 @@ func (m *_BACnetActionList) Serialize() ([]byte, error) { func (m *_BACnetActionList) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetActionList"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetActionList"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetActionList") } @@ -251,6 +256,7 @@ func (m *_BACnetActionList) SerializeWithWriteBuffer(ctx context.Context, writeB return nil } + func (m *_BACnetActionList) isBACnetActionList() bool { return true } @@ -265,3 +271,6 @@ func (m *_BACnetActionList) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetActionTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetActionTagged.go index 474abfda9cb..bb09bf28efe 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetActionTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetActionTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetActionTagged is the corresponding interface of BACnetActionTagged type BACnetActionTagged interface { @@ -46,14 +48,15 @@ type BACnetActionTaggedExactly interface { // _BACnetActionTagged is the data-structure of this message type _BACnetActionTagged struct { - Header BACnetTagHeader - Value BACnetAction + Header BACnetTagHeader + Value BACnetAction // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_BACnetActionTagged) GetValue() BACnetAction { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetActionTagged factory function for _BACnetActionTagged -func NewBACnetActionTagged(header BACnetTagHeader, value BACnetAction, tagNumber uint8, tagClass TagClass) *_BACnetActionTagged { - return &_BACnetActionTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetActionTagged( header BACnetTagHeader , value BACnetAction , tagNumber uint8 , tagClass TagClass ) *_BACnetActionTagged { +return &_BACnetActionTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetActionTagged(structType interface{}) BACnetActionTagged { - if casted, ok := structType.(BACnetActionTagged); ok { + if casted, ok := structType.(BACnetActionTagged); ok { return casted } if casted, ok := structType.(*BACnetActionTagged); ok { @@ -104,6 +108,7 @@ func (m *_BACnetActionTagged) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetActionTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func BACnetActionTaggedParseWithBuffer(ctx context.Context, readBuffer utils.Rea if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetActionTagged") } @@ -135,12 +140,12 @@ func BACnetActionTaggedParseWithBuffer(ctx context.Context, readBuffer utils.Rea } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func BACnetActionTaggedParseWithBuffer(ctx context.Context, readBuffer utils.Rea } var value BACnetAction if _value != nil { - value = _value.(BACnetAction) + value = _value.(BACnetAction) } if closeErr := readBuffer.CloseContext("BACnetActionTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func BACnetActionTaggedParseWithBuffer(ctx context.Context, readBuffer utils.Rea // Create the instance return &_BACnetActionTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_BACnetActionTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_BACnetActionTagged) Serialize() ([]byte, error) { func (m *_BACnetActionTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetActionTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetActionTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetActionTagged") } @@ -206,6 +211,7 @@ func (m *_BACnetActionTagged) SerializeWithWriteBuffer(ctx context.Context, writ return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_BACnetActionTagged) GetTagNumber() uint8 { func (m *_BACnetActionTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_BACnetActionTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAddress.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAddress.go index cddd90b7a13..fdf372ef143 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAddress.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAddress.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetAddress is the corresponding interface of BACnetAddress type BACnetAddress interface { @@ -52,10 +54,11 @@ type BACnetAddressExactly interface { // _BACnetAddress is the data-structure of this message type _BACnetAddress struct { - NetworkNumber BACnetApplicationTagUnsignedInteger - MacAddress BACnetApplicationTagOctetString + NetworkNumber BACnetApplicationTagUnsignedInteger + MacAddress BACnetApplicationTagOctetString } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -93,7 +96,7 @@ func (m *_BACnetAddress) GetIsLocalNetwork() bool { func (m *_BACnetAddress) GetIsBroadcast() bool { ctx := context.Background() _ = ctx - return bool(bool((m.GetMacAddress().GetActualLength()) == (0))) + return bool(bool((m.GetMacAddress().GetActualLength()) == ((0)))) } /////////////////////// @@ -101,14 +104,15 @@ func (m *_BACnetAddress) GetIsBroadcast() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetAddress factory function for _BACnetAddress -func NewBACnetAddress(networkNumber BACnetApplicationTagUnsignedInteger, macAddress BACnetApplicationTagOctetString) *_BACnetAddress { - return &_BACnetAddress{NetworkNumber: networkNumber, MacAddress: macAddress} +func NewBACnetAddress( networkNumber BACnetApplicationTagUnsignedInteger , macAddress BACnetApplicationTagOctetString ) *_BACnetAddress { +return &_BACnetAddress{ NetworkNumber: networkNumber , MacAddress: macAddress } } // Deprecated: use the interface for direct cast func CastBACnetAddress(structType interface{}) BACnetAddress { - if casted, ok := structType.(BACnetAddress); ok { + if casted, ok := structType.(BACnetAddress); ok { return casted } if casted, ok := structType.(*BACnetAddress); ok { @@ -139,6 +143,7 @@ func (m *_BACnetAddress) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetAddress) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -160,7 +165,7 @@ func BACnetAddressParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff if pullErr := readBuffer.PullContext("networkNumber"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for networkNumber") } - _networkNumber, _networkNumberErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_networkNumber, _networkNumberErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _networkNumberErr != nil { return nil, errors.Wrap(_networkNumberErr, "Error parsing 'networkNumber' field of BACnetAddress") } @@ -183,7 +188,7 @@ func BACnetAddressParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff if pullErr := readBuffer.PullContext("macAddress"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for macAddress") } - _macAddress, _macAddressErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_macAddress, _macAddressErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _macAddressErr != nil { return nil, errors.Wrap(_macAddressErr, "Error parsing 'macAddress' field of BACnetAddress") } @@ -193,7 +198,7 @@ func BACnetAddressParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff } // Virtual field - _isBroadcast := bool((macAddress.GetActualLength()) == (0)) + _isBroadcast := bool((macAddress.GetActualLength()) == ((0))) isBroadcast := bool(_isBroadcast) _ = isBroadcast @@ -203,9 +208,9 @@ func BACnetAddressParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff // Create the instance return &_BACnetAddress{ - NetworkNumber: networkNumber, - MacAddress: macAddress, - }, nil + NetworkNumber: networkNumber, + MacAddress: macAddress, + }, nil } func (m *_BACnetAddress) Serialize() ([]byte, error) { @@ -219,7 +224,7 @@ func (m *_BACnetAddress) Serialize() ([]byte, error) { func (m *_BACnetAddress) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetAddress"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetAddress"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetAddress") } @@ -265,6 +270,7 @@ func (m *_BACnetAddress) SerializeWithWriteBuffer(ctx context.Context, writeBuff return nil } + func (m *_BACnetAddress) isBACnetAddress() bool { return true } @@ -279,3 +285,6 @@ func (m *_BACnetAddress) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAddressBinding.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAddressBinding.go index 3d4b77b3d7f..c1f9ed148a8 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAddressBinding.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAddressBinding.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetAddressBinding is the corresponding interface of BACnetAddressBinding type BACnetAddressBinding interface { @@ -46,10 +48,11 @@ type BACnetAddressBindingExactly interface { // _BACnetAddressBinding is the data-structure of this message type _BACnetAddressBinding struct { - DeviceIdentifier BACnetApplicationTagObjectIdentifier - DeviceAddress BACnetAddress + DeviceIdentifier BACnetApplicationTagObjectIdentifier + DeviceAddress BACnetAddress } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -68,14 +71,15 @@ func (m *_BACnetAddressBinding) GetDeviceAddress() BACnetAddress { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetAddressBinding factory function for _BACnetAddressBinding -func NewBACnetAddressBinding(deviceIdentifier BACnetApplicationTagObjectIdentifier, deviceAddress BACnetAddress) *_BACnetAddressBinding { - return &_BACnetAddressBinding{DeviceIdentifier: deviceIdentifier, DeviceAddress: deviceAddress} +func NewBACnetAddressBinding( deviceIdentifier BACnetApplicationTagObjectIdentifier , deviceAddress BACnetAddress ) *_BACnetAddressBinding { +return &_BACnetAddressBinding{ DeviceIdentifier: deviceIdentifier , DeviceAddress: deviceAddress } } // Deprecated: use the interface for direct cast func CastBACnetAddressBinding(structType interface{}) BACnetAddressBinding { - if casted, ok := structType.(BACnetAddressBinding); ok { + if casted, ok := structType.(BACnetAddressBinding); ok { return casted } if casted, ok := structType.(*BACnetAddressBinding); ok { @@ -100,6 +104,7 @@ func (m *_BACnetAddressBinding) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetAddressBinding) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -121,7 +126,7 @@ func BACnetAddressBindingParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("deviceIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for deviceIdentifier") } - _deviceIdentifier, _deviceIdentifierErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_deviceIdentifier, _deviceIdentifierErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _deviceIdentifierErr != nil { return nil, errors.Wrap(_deviceIdentifierErr, "Error parsing 'deviceIdentifier' field of BACnetAddressBinding") } @@ -134,7 +139,7 @@ func BACnetAddressBindingParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("deviceAddress"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for deviceAddress") } - _deviceAddress, _deviceAddressErr := BACnetAddressParseWithBuffer(ctx, readBuffer) +_deviceAddress, _deviceAddressErr := BACnetAddressParseWithBuffer(ctx, readBuffer) if _deviceAddressErr != nil { return nil, errors.Wrap(_deviceAddressErr, "Error parsing 'deviceAddress' field of BACnetAddressBinding") } @@ -149,9 +154,9 @@ func BACnetAddressBindingParseWithBuffer(ctx context.Context, readBuffer utils.R // Create the instance return &_BACnetAddressBinding{ - DeviceIdentifier: deviceIdentifier, - DeviceAddress: deviceAddress, - }, nil + DeviceIdentifier: deviceIdentifier, + DeviceAddress: deviceAddress, + }, nil } func (m *_BACnetAddressBinding) Serialize() ([]byte, error) { @@ -165,7 +170,7 @@ func (m *_BACnetAddressBinding) Serialize() ([]byte, error) { func (m *_BACnetAddressBinding) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetAddressBinding"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetAddressBinding"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetAddressBinding") } @@ -199,6 +204,7 @@ func (m *_BACnetAddressBinding) SerializeWithWriteBuffer(ctx context.Context, wr return nil } + func (m *_BACnetAddressBinding) isBACnetAddressBinding() bool { return true } @@ -213,3 +219,6 @@ func (m *_BACnetAddressBinding) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAddressEnclosed.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAddressEnclosed.go index eb5c9220c0e..39e2a30edd2 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAddressEnclosed.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAddressEnclosed.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetAddressEnclosed is the corresponding interface of BACnetAddressEnclosed type BACnetAddressEnclosed interface { @@ -48,14 +50,15 @@ type BACnetAddressEnclosedExactly interface { // _BACnetAddressEnclosed is the data-structure of this message type _BACnetAddressEnclosed struct { - OpeningTag BACnetOpeningTag - Address BACnetAddress - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + Address BACnetAddress + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -78,14 +81,15 @@ func (m *_BACnetAddressEnclosed) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetAddressEnclosed factory function for _BACnetAddressEnclosed -func NewBACnetAddressEnclosed(openingTag BACnetOpeningTag, address BACnetAddress, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetAddressEnclosed { - return &_BACnetAddressEnclosed{OpeningTag: openingTag, Address: address, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetAddressEnclosed( openingTag BACnetOpeningTag , address BACnetAddress , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetAddressEnclosed { +return &_BACnetAddressEnclosed{ OpeningTag: openingTag , Address: address , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetAddressEnclosed(structType interface{}) BACnetAddressEnclosed { - if casted, ok := structType.(BACnetAddressEnclosed); ok { + if casted, ok := structType.(BACnetAddressEnclosed); ok { return casted } if casted, ok := structType.(*BACnetAddressEnclosed); ok { @@ -113,6 +117,7 @@ func (m *_BACnetAddressEnclosed) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetAddressEnclosed) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -134,7 +139,7 @@ func BACnetAddressEnclosedParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetAddressEnclosed") } @@ -147,7 +152,7 @@ func BACnetAddressEnclosedParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("address"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for address") } - _address, _addressErr := BACnetAddressParseWithBuffer(ctx, readBuffer) +_address, _addressErr := BACnetAddressParseWithBuffer(ctx, readBuffer) if _addressErr != nil { return nil, errors.Wrap(_addressErr, "Error parsing 'address' field of BACnetAddressEnclosed") } @@ -160,7 +165,7 @@ func BACnetAddressEnclosedParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetAddressEnclosed") } @@ -175,11 +180,11 @@ func BACnetAddressEnclosedParseWithBuffer(ctx context.Context, readBuffer utils. // Create the instance return &_BACnetAddressEnclosed{ - TagNumber: tagNumber, - OpeningTag: openingTag, - Address: address, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + Address: address, + ClosingTag: closingTag, + }, nil } func (m *_BACnetAddressEnclosed) Serialize() ([]byte, error) { @@ -193,7 +198,7 @@ func (m *_BACnetAddressEnclosed) Serialize() ([]byte, error) { func (m *_BACnetAddressEnclosed) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetAddressEnclosed"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetAddressEnclosed"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetAddressEnclosed") } @@ -239,13 +244,13 @@ func (m *_BACnetAddressEnclosed) SerializeWithWriteBuffer(ctx context.Context, w return nil } + //// // Arguments Getter func (m *_BACnetAddressEnclosed) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -263,3 +268,6 @@ func (m *_BACnetAddressEnclosed) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTag.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTag.go index 5e103b492c3..90b31b29bc6 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTag.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTag.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetApplicationTag is the corresponding interface of BACnetApplicationTag type BACnetApplicationTag interface { @@ -49,7 +51,7 @@ type BACnetApplicationTagExactly interface { // _BACnetApplicationTag is the data-structure of this message type _BACnetApplicationTag struct { _BACnetApplicationTagChildRequirements - Header BACnetTagHeader + Header BACnetTagHeader } type _BACnetApplicationTagChildRequirements interface { @@ -57,6 +59,7 @@ type _BACnetApplicationTagChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type BACnetApplicationTagParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetApplicationTag, serializeChildFunction func() error) error GetTypeName() string @@ -64,13 +67,12 @@ type BACnetApplicationTagParent interface { type BACnetApplicationTagChild interface { utils.Serializable - InitializeParent(parent BACnetApplicationTag, header BACnetTagHeader) +InitializeParent(parent BACnetApplicationTag , header BACnetTagHeader ) GetParent() *BACnetApplicationTag GetTypeName() string BACnetApplicationTag } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -106,14 +108,15 @@ func (m *_BACnetApplicationTag) GetActualLength() uint32 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetApplicationTag factory function for _BACnetApplicationTag -func NewBACnetApplicationTag(header BACnetTagHeader) *_BACnetApplicationTag { - return &_BACnetApplicationTag{Header: header} +func NewBACnetApplicationTag( header BACnetTagHeader ) *_BACnetApplicationTag { +return &_BACnetApplicationTag{ Header: header } } // Deprecated: use the interface for direct cast func CastBACnetApplicationTag(structType interface{}) BACnetApplicationTag { - if casted, ok := structType.(BACnetApplicationTag); ok { + if casted, ok := structType.(BACnetApplicationTag); ok { return casted } if casted, ok := structType.(*BACnetApplicationTag); ok { @@ -126,6 +129,7 @@ func (m *_BACnetApplicationTag) GetTypeName() string { return "BACnetApplicationTag" } + func (m *_BACnetApplicationTag) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -160,7 +164,7 @@ func BACnetApplicationTagParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetApplicationTag") } @@ -170,7 +174,7 @@ func BACnetApplicationTagParseWithBuffer(ctx context.Context, readBuffer utils.R } // Validation - if !(bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS))) { + if (!(bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) { return nil, errors.WithStack(utils.ParseValidationError{"should be a application tag"}) } @@ -187,39 +191,39 @@ func BACnetApplicationTagParseWithBuffer(ctx context.Context, readBuffer utils.R // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetApplicationTagChildSerializeRequirement interface { BACnetApplicationTag - InitializeParent(BACnetApplicationTag, BACnetTagHeader) + InitializeParent(BACnetApplicationTag, BACnetTagHeader) GetParent() BACnetApplicationTag } var _childTemp interface{} var _child BACnetApplicationTagChildSerializeRequirement var typeSwitchError error switch { - case actualTagNumber == 0x0: // BACnetApplicationTagNull - _childTemp, typeSwitchError = BACnetApplicationTagNullParseWithBuffer(ctx, readBuffer) - case actualTagNumber == 0x1: // BACnetApplicationTagBoolean +case actualTagNumber == 0x0 : // BACnetApplicationTagNull + _childTemp, typeSwitchError = BACnetApplicationTagNullParseWithBuffer(ctx, readBuffer, ) +case actualTagNumber == 0x1 : // BACnetApplicationTagBoolean _childTemp, typeSwitchError = BACnetApplicationTagBooleanParseWithBuffer(ctx, readBuffer, header) - case actualTagNumber == 0x2: // BACnetApplicationTagUnsignedInteger +case actualTagNumber == 0x2 : // BACnetApplicationTagUnsignedInteger _childTemp, typeSwitchError = BACnetApplicationTagUnsignedIntegerParseWithBuffer(ctx, readBuffer, header) - case actualTagNumber == 0x3: // BACnetApplicationTagSignedInteger +case actualTagNumber == 0x3 : // BACnetApplicationTagSignedInteger _childTemp, typeSwitchError = BACnetApplicationTagSignedIntegerParseWithBuffer(ctx, readBuffer, header) - case actualTagNumber == 0x4: // BACnetApplicationTagReal - _childTemp, typeSwitchError = BACnetApplicationTagRealParseWithBuffer(ctx, readBuffer) - case actualTagNumber == 0x5: // BACnetApplicationTagDouble - _childTemp, typeSwitchError = BACnetApplicationTagDoubleParseWithBuffer(ctx, readBuffer) - case actualTagNumber == 0x6: // BACnetApplicationTagOctetString +case actualTagNumber == 0x4 : // BACnetApplicationTagReal + _childTemp, typeSwitchError = BACnetApplicationTagRealParseWithBuffer(ctx, readBuffer, ) +case actualTagNumber == 0x5 : // BACnetApplicationTagDouble + _childTemp, typeSwitchError = BACnetApplicationTagDoubleParseWithBuffer(ctx, readBuffer, ) +case actualTagNumber == 0x6 : // BACnetApplicationTagOctetString _childTemp, typeSwitchError = BACnetApplicationTagOctetStringParseWithBuffer(ctx, readBuffer, header) - case actualTagNumber == 0x7: // BACnetApplicationTagCharacterString +case actualTagNumber == 0x7 : // BACnetApplicationTagCharacterString _childTemp, typeSwitchError = BACnetApplicationTagCharacterStringParseWithBuffer(ctx, readBuffer, header) - case actualTagNumber == 0x8: // BACnetApplicationTagBitString +case actualTagNumber == 0x8 : // BACnetApplicationTagBitString _childTemp, typeSwitchError = BACnetApplicationTagBitStringParseWithBuffer(ctx, readBuffer, header) - case actualTagNumber == 0x9: // BACnetApplicationTagEnumerated +case actualTagNumber == 0x9 : // BACnetApplicationTagEnumerated _childTemp, typeSwitchError = BACnetApplicationTagEnumeratedParseWithBuffer(ctx, readBuffer, header) - case actualTagNumber == 0xA: // BACnetApplicationTagDate - _childTemp, typeSwitchError = BACnetApplicationTagDateParseWithBuffer(ctx, readBuffer) - case actualTagNumber == 0xB: // BACnetApplicationTagTime - _childTemp, typeSwitchError = BACnetApplicationTagTimeParseWithBuffer(ctx, readBuffer) - case actualTagNumber == 0xC: // BACnetApplicationTagObjectIdentifier - _childTemp, typeSwitchError = BACnetApplicationTagObjectIdentifierParseWithBuffer(ctx, readBuffer) +case actualTagNumber == 0xA : // BACnetApplicationTagDate + _childTemp, typeSwitchError = BACnetApplicationTagDateParseWithBuffer(ctx, readBuffer, ) +case actualTagNumber == 0xB : // BACnetApplicationTagTime + _childTemp, typeSwitchError = BACnetApplicationTagTimeParseWithBuffer(ctx, readBuffer, ) +case actualTagNumber == 0xC : // BACnetApplicationTagObjectIdentifier + _childTemp, typeSwitchError = BACnetApplicationTagObjectIdentifierParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [actualTagNumber=%v]", actualTagNumber) } @@ -233,7 +237,7 @@ func BACnetApplicationTagParseWithBuffer(ctx context.Context, readBuffer utils.R } // Finish initializing - _child.InitializeParent(_child, header) +_child.InitializeParent(_child , header ) return _child, nil } @@ -243,7 +247,7 @@ func (pm *_BACnetApplicationTag) SerializeParent(ctx context.Context, writeBuffe _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetApplicationTag"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetApplicationTag"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetApplicationTag") } @@ -278,6 +282,7 @@ func (pm *_BACnetApplicationTag) SerializeParent(ctx context.Context, writeBuffe return nil } + func (m *_BACnetApplicationTag) isBACnetApplicationTag() bool { return true } @@ -292,3 +297,6 @@ func (m *_BACnetApplicationTag) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagBitString.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagBitString.go index 46e4e9c921e..9621ccbddd9 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagBitString.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagBitString.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetApplicationTagBitString is the corresponding interface of BACnetApplicationTagBitString type BACnetApplicationTagBitString interface { @@ -46,9 +48,11 @@ type BACnetApplicationTagBitStringExactly interface { // _BACnetApplicationTagBitString is the data-structure of this message type _BACnetApplicationTagBitString struct { *_BACnetApplicationTag - Payload BACnetTagPayloadBitString + Payload BACnetTagPayloadBitString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetApplicationTagBitString struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetApplicationTagBitString) InitializeParent(parent BACnetApplicationTag, header BACnetTagHeader) { - m.Header = header +func (m *_BACnetApplicationTagBitString) InitializeParent(parent BACnetApplicationTag , header BACnetTagHeader ) { m.Header = header } -func (m *_BACnetApplicationTagBitString) GetParent() BACnetApplicationTag { +func (m *_BACnetApplicationTagBitString) GetParent() BACnetApplicationTag { return m._BACnetApplicationTag } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetApplicationTagBitString) GetPayload() BACnetTagPayloadBitString /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetApplicationTagBitString factory function for _BACnetApplicationTagBitString -func NewBACnetApplicationTagBitString(payload BACnetTagPayloadBitString, header BACnetTagHeader) *_BACnetApplicationTagBitString { +func NewBACnetApplicationTagBitString( payload BACnetTagPayloadBitString , header BACnetTagHeader ) *_BACnetApplicationTagBitString { _result := &_BACnetApplicationTagBitString{ - Payload: payload, - _BACnetApplicationTag: NewBACnetApplicationTag(header), + Payload: payload, + _BACnetApplicationTag: NewBACnetApplicationTag(header), } _result._BACnetApplicationTag._BACnetApplicationTagChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetApplicationTagBitString(payload BACnetTagPayloadBitString, header // Deprecated: use the interface for direct cast func CastBACnetApplicationTagBitString(structType interface{}) BACnetApplicationTagBitString { - if casted, ok := structType.(BACnetApplicationTagBitString); ok { + if casted, ok := structType.(BACnetApplicationTagBitString); ok { return casted } if casted, ok := structType.(*BACnetApplicationTagBitString); ok { @@ -115,6 +118,7 @@ func (m *_BACnetApplicationTagBitString) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetApplicationTagBitString) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetApplicationTagBitStringParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("payload"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for payload") } - _payload, _payloadErr := BACnetTagPayloadBitStringParseWithBuffer(ctx, readBuffer, uint32(header.GetActualLength())) +_payload, _payloadErr := BACnetTagPayloadBitStringParseWithBuffer(ctx, readBuffer , uint32( header.GetActualLength() ) ) if _payloadErr != nil { return nil, errors.Wrap(_payloadErr, "Error parsing 'payload' field of BACnetApplicationTagBitString") } @@ -151,8 +155,9 @@ func BACnetApplicationTagBitStringParseWithBuffer(ctx context.Context, readBuffe // Create a partially initialized instance _child := &_BACnetApplicationTagBitString{ - _BACnetApplicationTag: &_BACnetApplicationTag{}, - Payload: payload, + _BACnetApplicationTag: &_BACnetApplicationTag{ + }, + Payload: payload, } _child._BACnetApplicationTag._BACnetApplicationTagChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetApplicationTagBitString) SerializeWithWriteBuffer(ctx context.Co return errors.Wrap(pushErr, "Error pushing for BACnetApplicationTagBitString") } - // Simple Field (payload) - if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for payload") - } - _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) - if popErr := writeBuffer.PopContext("payload"); popErr != nil { - return errors.Wrap(popErr, "Error popping for payload") - } - if _payloadErr != nil { - return errors.Wrap(_payloadErr, "Error serializing 'payload' field") - } + // Simple Field (payload) + if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for payload") + } + _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) + if popErr := writeBuffer.PopContext("payload"); popErr != nil { + return errors.Wrap(popErr, "Error popping for payload") + } + if _payloadErr != nil { + return errors.Wrap(_payloadErr, "Error serializing 'payload' field") + } if popErr := writeBuffer.PopContext("BACnetApplicationTagBitString"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetApplicationTagBitString") @@ -194,6 +199,7 @@ func (m *_BACnetApplicationTagBitString) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetApplicationTagBitString) isBACnetApplicationTagBitString() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetApplicationTagBitString) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagBoolean.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagBoolean.go index 0ced6375461..abcdc48aa2f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagBoolean.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagBoolean.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetApplicationTagBoolean is the corresponding interface of BACnetApplicationTagBoolean type BACnetApplicationTagBoolean interface { @@ -48,9 +50,11 @@ type BACnetApplicationTagBooleanExactly interface { // _BACnetApplicationTagBoolean is the data-structure of this message type _BACnetApplicationTagBoolean struct { *_BACnetApplicationTag - Payload BACnetTagPayloadBoolean + Payload BACnetTagPayloadBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -61,14 +65,12 @@ type _BACnetApplicationTagBoolean struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetApplicationTagBoolean) InitializeParent(parent BACnetApplicationTag, header BACnetTagHeader) { - m.Header = header +func (m *_BACnetApplicationTagBoolean) InitializeParent(parent BACnetApplicationTag , header BACnetTagHeader ) { m.Header = header } -func (m *_BACnetApplicationTagBoolean) GetParent() BACnetApplicationTag { +func (m *_BACnetApplicationTagBoolean) GetParent() BACnetApplicationTag { return m._BACnetApplicationTag } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,11 +100,12 @@ func (m *_BACnetApplicationTagBoolean) GetActualValue() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetApplicationTagBoolean factory function for _BACnetApplicationTagBoolean -func NewBACnetApplicationTagBoolean(payload BACnetTagPayloadBoolean, header BACnetTagHeader) *_BACnetApplicationTagBoolean { +func NewBACnetApplicationTagBoolean( payload BACnetTagPayloadBoolean , header BACnetTagHeader ) *_BACnetApplicationTagBoolean { _result := &_BACnetApplicationTagBoolean{ - Payload: payload, - _BACnetApplicationTag: NewBACnetApplicationTag(header), + Payload: payload, + _BACnetApplicationTag: NewBACnetApplicationTag(header), } _result._BACnetApplicationTag._BACnetApplicationTagChildRequirements = _result return _result @@ -110,7 +113,7 @@ func NewBACnetApplicationTagBoolean(payload BACnetTagPayloadBoolean, header BACn // Deprecated: use the interface for direct cast func CastBACnetApplicationTagBoolean(structType interface{}) BACnetApplicationTagBoolean { - if casted, ok := structType.(BACnetApplicationTagBoolean); ok { + if casted, ok := structType.(BACnetApplicationTagBoolean); ok { return casted } if casted, ok := structType.(*BACnetApplicationTagBoolean); ok { @@ -134,6 +137,7 @@ func (m *_BACnetApplicationTagBoolean) GetLengthInBits(ctx context.Context) uint return lengthInBits } + func (m *_BACnetApplicationTagBoolean) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -155,7 +159,7 @@ func BACnetApplicationTagBooleanParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("payload"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for payload") } - _payload, _payloadErr := BACnetTagPayloadBooleanParseWithBuffer(ctx, readBuffer, uint32(header.GetActualLength())) +_payload, _payloadErr := BACnetTagPayloadBooleanParseWithBuffer(ctx, readBuffer , uint32( header.GetActualLength() ) ) if _payloadErr != nil { return nil, errors.Wrap(_payloadErr, "Error parsing 'payload' field of BACnetApplicationTagBoolean") } @@ -175,8 +179,9 @@ func BACnetApplicationTagBooleanParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_BACnetApplicationTagBoolean{ - _BACnetApplicationTag: &_BACnetApplicationTag{}, - Payload: payload, + _BACnetApplicationTag: &_BACnetApplicationTag{ + }, + Payload: payload, } _child._BACnetApplicationTag._BACnetApplicationTagChildRequirements = _child return _child, nil @@ -198,21 +203,21 @@ func (m *_BACnetApplicationTagBoolean) SerializeWithWriteBuffer(ctx context.Cont return errors.Wrap(pushErr, "Error pushing for BACnetApplicationTagBoolean") } - // Simple Field (payload) - if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for payload") - } - _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) - if popErr := writeBuffer.PopContext("payload"); popErr != nil { - return errors.Wrap(popErr, "Error popping for payload") - } - if _payloadErr != nil { - return errors.Wrap(_payloadErr, "Error serializing 'payload' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (payload) + if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for payload") + } + _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) + if popErr := writeBuffer.PopContext("payload"); popErr != nil { + return errors.Wrap(popErr, "Error popping for payload") + } + if _payloadErr != nil { + return errors.Wrap(_payloadErr, "Error serializing 'payload' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetApplicationTagBoolean"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetApplicationTagBoolean") @@ -222,6 +227,7 @@ func (m *_BACnetApplicationTagBoolean) SerializeWithWriteBuffer(ctx context.Cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetApplicationTagBoolean) isBACnetApplicationTagBoolean() bool { return true } @@ -236,3 +242,6 @@ func (m *_BACnetApplicationTagBoolean) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagCharacterString.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagCharacterString.go index e0950841ede..c099df9ebe5 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagCharacterString.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagCharacterString.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetApplicationTagCharacterString is the corresponding interface of BACnetApplicationTagCharacterString type BACnetApplicationTagCharacterString interface { @@ -48,9 +50,11 @@ type BACnetApplicationTagCharacterStringExactly interface { // _BACnetApplicationTagCharacterString is the data-structure of this message type _BACnetApplicationTagCharacterString struct { *_BACnetApplicationTag - Payload BACnetTagPayloadCharacterString + Payload BACnetTagPayloadCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -61,14 +65,12 @@ type _BACnetApplicationTagCharacterString struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetApplicationTagCharacterString) InitializeParent(parent BACnetApplicationTag, header BACnetTagHeader) { - m.Header = header +func (m *_BACnetApplicationTagCharacterString) InitializeParent(parent BACnetApplicationTag , header BACnetTagHeader ) { m.Header = header } -func (m *_BACnetApplicationTagCharacterString) GetParent() BACnetApplicationTag { +func (m *_BACnetApplicationTagCharacterString) GetParent() BACnetApplicationTag { return m._BACnetApplicationTag } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,11 +100,12 @@ func (m *_BACnetApplicationTagCharacterString) GetValue() string { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetApplicationTagCharacterString factory function for _BACnetApplicationTagCharacterString -func NewBACnetApplicationTagCharacterString(payload BACnetTagPayloadCharacterString, header BACnetTagHeader) *_BACnetApplicationTagCharacterString { +func NewBACnetApplicationTagCharacterString( payload BACnetTagPayloadCharacterString , header BACnetTagHeader ) *_BACnetApplicationTagCharacterString { _result := &_BACnetApplicationTagCharacterString{ - Payload: payload, - _BACnetApplicationTag: NewBACnetApplicationTag(header), + Payload: payload, + _BACnetApplicationTag: NewBACnetApplicationTag(header), } _result._BACnetApplicationTag._BACnetApplicationTagChildRequirements = _result return _result @@ -110,7 +113,7 @@ func NewBACnetApplicationTagCharacterString(payload BACnetTagPayloadCharacterStr // Deprecated: use the interface for direct cast func CastBACnetApplicationTagCharacterString(structType interface{}) BACnetApplicationTagCharacterString { - if casted, ok := structType.(BACnetApplicationTagCharacterString); ok { + if casted, ok := structType.(BACnetApplicationTagCharacterString); ok { return casted } if casted, ok := structType.(*BACnetApplicationTagCharacterString); ok { @@ -134,6 +137,7 @@ func (m *_BACnetApplicationTagCharacterString) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetApplicationTagCharacterString) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -155,7 +159,7 @@ func BACnetApplicationTagCharacterStringParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("payload"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for payload") } - _payload, _payloadErr := BACnetTagPayloadCharacterStringParseWithBuffer(ctx, readBuffer, uint32(header.GetActualLength())) +_payload, _payloadErr := BACnetTagPayloadCharacterStringParseWithBuffer(ctx, readBuffer , uint32( header.GetActualLength() ) ) if _payloadErr != nil { return nil, errors.Wrap(_payloadErr, "Error parsing 'payload' field of BACnetApplicationTagCharacterString") } @@ -175,8 +179,9 @@ func BACnetApplicationTagCharacterStringParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetApplicationTagCharacterString{ - _BACnetApplicationTag: &_BACnetApplicationTag{}, - Payload: payload, + _BACnetApplicationTag: &_BACnetApplicationTag{ + }, + Payload: payload, } _child._BACnetApplicationTag._BACnetApplicationTagChildRequirements = _child return _child, nil @@ -198,21 +203,21 @@ func (m *_BACnetApplicationTagCharacterString) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetApplicationTagCharacterString") } - // Simple Field (payload) - if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for payload") - } - _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) - if popErr := writeBuffer.PopContext("payload"); popErr != nil { - return errors.Wrap(popErr, "Error popping for payload") - } - if _payloadErr != nil { - return errors.Wrap(_payloadErr, "Error serializing 'payload' field") - } - // Virtual field - if _valueErr := writeBuffer.WriteVirtual(ctx, "value", m.GetValue()); _valueErr != nil { - return errors.Wrap(_valueErr, "Error serializing 'value' field") - } + // Simple Field (payload) + if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for payload") + } + _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) + if popErr := writeBuffer.PopContext("payload"); popErr != nil { + return errors.Wrap(popErr, "Error popping for payload") + } + if _payloadErr != nil { + return errors.Wrap(_payloadErr, "Error serializing 'payload' field") + } + // Virtual field + if _valueErr := writeBuffer.WriteVirtual(ctx, "value", m.GetValue()); _valueErr != nil { + return errors.Wrap(_valueErr, "Error serializing 'value' field") + } if popErr := writeBuffer.PopContext("BACnetApplicationTagCharacterString"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetApplicationTagCharacterString") @@ -222,6 +227,7 @@ func (m *_BACnetApplicationTagCharacterString) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetApplicationTagCharacterString) isBACnetApplicationTagCharacterString() bool { return true } @@ -236,3 +242,6 @@ func (m *_BACnetApplicationTagCharacterString) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagDate.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagDate.go index fe7e8b4b750..0fd540c34b7 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagDate.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagDate.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetApplicationTagDate is the corresponding interface of BACnetApplicationTagDate type BACnetApplicationTagDate interface { @@ -46,9 +48,11 @@ type BACnetApplicationTagDateExactly interface { // _BACnetApplicationTagDate is the data-structure of this message type _BACnetApplicationTagDate struct { *_BACnetApplicationTag - Payload BACnetTagPayloadDate + Payload BACnetTagPayloadDate } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetApplicationTagDate struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetApplicationTagDate) InitializeParent(parent BACnetApplicationTag, header BACnetTagHeader) { - m.Header = header +func (m *_BACnetApplicationTagDate) InitializeParent(parent BACnetApplicationTag , header BACnetTagHeader ) { m.Header = header } -func (m *_BACnetApplicationTagDate) GetParent() BACnetApplicationTag { +func (m *_BACnetApplicationTagDate) GetParent() BACnetApplicationTag { return m._BACnetApplicationTag } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetApplicationTagDate) GetPayload() BACnetTagPayloadDate { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetApplicationTagDate factory function for _BACnetApplicationTagDate -func NewBACnetApplicationTagDate(payload BACnetTagPayloadDate, header BACnetTagHeader) *_BACnetApplicationTagDate { +func NewBACnetApplicationTagDate( payload BACnetTagPayloadDate , header BACnetTagHeader ) *_BACnetApplicationTagDate { _result := &_BACnetApplicationTagDate{ - Payload: payload, - _BACnetApplicationTag: NewBACnetApplicationTag(header), + Payload: payload, + _BACnetApplicationTag: NewBACnetApplicationTag(header), } _result._BACnetApplicationTag._BACnetApplicationTagChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetApplicationTagDate(payload BACnetTagPayloadDate, header BACnetTagH // Deprecated: use the interface for direct cast func CastBACnetApplicationTagDate(structType interface{}) BACnetApplicationTagDate { - if casted, ok := structType.(BACnetApplicationTagDate); ok { + if casted, ok := structType.(BACnetApplicationTagDate); ok { return casted } if casted, ok := structType.(*BACnetApplicationTagDate); ok { @@ -115,6 +118,7 @@ func (m *_BACnetApplicationTagDate) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_BACnetApplicationTagDate) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetApplicationTagDateParseWithBuffer(ctx context.Context, readBuffer uti if pullErr := readBuffer.PullContext("payload"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for payload") } - _payload, _payloadErr := BACnetTagPayloadDateParseWithBuffer(ctx, readBuffer) +_payload, _payloadErr := BACnetTagPayloadDateParseWithBuffer(ctx, readBuffer) if _payloadErr != nil { return nil, errors.Wrap(_payloadErr, "Error parsing 'payload' field of BACnetApplicationTagDate") } @@ -151,8 +155,9 @@ func BACnetApplicationTagDateParseWithBuffer(ctx context.Context, readBuffer uti // Create a partially initialized instance _child := &_BACnetApplicationTagDate{ - _BACnetApplicationTag: &_BACnetApplicationTag{}, - Payload: payload, + _BACnetApplicationTag: &_BACnetApplicationTag{ + }, + Payload: payload, } _child._BACnetApplicationTag._BACnetApplicationTagChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetApplicationTagDate) SerializeWithWriteBuffer(ctx context.Context return errors.Wrap(pushErr, "Error pushing for BACnetApplicationTagDate") } - // Simple Field (payload) - if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for payload") - } - _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) - if popErr := writeBuffer.PopContext("payload"); popErr != nil { - return errors.Wrap(popErr, "Error popping for payload") - } - if _payloadErr != nil { - return errors.Wrap(_payloadErr, "Error serializing 'payload' field") - } + // Simple Field (payload) + if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for payload") + } + _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) + if popErr := writeBuffer.PopContext("payload"); popErr != nil { + return errors.Wrap(popErr, "Error popping for payload") + } + if _payloadErr != nil { + return errors.Wrap(_payloadErr, "Error serializing 'payload' field") + } if popErr := writeBuffer.PopContext("BACnetApplicationTagDate"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetApplicationTagDate") @@ -194,6 +199,7 @@ func (m *_BACnetApplicationTagDate) SerializeWithWriteBuffer(ctx context.Context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetApplicationTagDate) isBACnetApplicationTagDate() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetApplicationTagDate) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagDouble.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagDouble.go index 9f272af366f..939cea4a74f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagDouble.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagDouble.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetApplicationTagDouble is the corresponding interface of BACnetApplicationTagDouble type BACnetApplicationTagDouble interface { @@ -48,9 +50,11 @@ type BACnetApplicationTagDoubleExactly interface { // _BACnetApplicationTagDouble is the data-structure of this message type _BACnetApplicationTagDouble struct { *_BACnetApplicationTag - Payload BACnetTagPayloadDouble + Payload BACnetTagPayloadDouble } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -61,14 +65,12 @@ type _BACnetApplicationTagDouble struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetApplicationTagDouble) InitializeParent(parent BACnetApplicationTag, header BACnetTagHeader) { - m.Header = header +func (m *_BACnetApplicationTagDouble) InitializeParent(parent BACnetApplicationTag , header BACnetTagHeader ) { m.Header = header } -func (m *_BACnetApplicationTagDouble) GetParent() BACnetApplicationTag { +func (m *_BACnetApplicationTagDouble) GetParent() BACnetApplicationTag { return m._BACnetApplicationTag } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,11 +100,12 @@ func (m *_BACnetApplicationTagDouble) GetActualValue() float64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetApplicationTagDouble factory function for _BACnetApplicationTagDouble -func NewBACnetApplicationTagDouble(payload BACnetTagPayloadDouble, header BACnetTagHeader) *_BACnetApplicationTagDouble { +func NewBACnetApplicationTagDouble( payload BACnetTagPayloadDouble , header BACnetTagHeader ) *_BACnetApplicationTagDouble { _result := &_BACnetApplicationTagDouble{ - Payload: payload, - _BACnetApplicationTag: NewBACnetApplicationTag(header), + Payload: payload, + _BACnetApplicationTag: NewBACnetApplicationTag(header), } _result._BACnetApplicationTag._BACnetApplicationTagChildRequirements = _result return _result @@ -110,7 +113,7 @@ func NewBACnetApplicationTagDouble(payload BACnetTagPayloadDouble, header BACnet // Deprecated: use the interface for direct cast func CastBACnetApplicationTagDouble(structType interface{}) BACnetApplicationTagDouble { - if casted, ok := structType.(BACnetApplicationTagDouble); ok { + if casted, ok := structType.(BACnetApplicationTagDouble); ok { return casted } if casted, ok := structType.(*BACnetApplicationTagDouble); ok { @@ -134,6 +137,7 @@ func (m *_BACnetApplicationTagDouble) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_BACnetApplicationTagDouble) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -155,7 +159,7 @@ func BACnetApplicationTagDoubleParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("payload"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for payload") } - _payload, _payloadErr := BACnetTagPayloadDoubleParseWithBuffer(ctx, readBuffer) +_payload, _payloadErr := BACnetTagPayloadDoubleParseWithBuffer(ctx, readBuffer) if _payloadErr != nil { return nil, errors.Wrap(_payloadErr, "Error parsing 'payload' field of BACnetApplicationTagDouble") } @@ -175,8 +179,9 @@ func BACnetApplicationTagDoubleParseWithBuffer(ctx context.Context, readBuffer u // Create a partially initialized instance _child := &_BACnetApplicationTagDouble{ - _BACnetApplicationTag: &_BACnetApplicationTag{}, - Payload: payload, + _BACnetApplicationTag: &_BACnetApplicationTag{ + }, + Payload: payload, } _child._BACnetApplicationTag._BACnetApplicationTagChildRequirements = _child return _child, nil @@ -198,21 +203,21 @@ func (m *_BACnetApplicationTagDouble) SerializeWithWriteBuffer(ctx context.Conte return errors.Wrap(pushErr, "Error pushing for BACnetApplicationTagDouble") } - // Simple Field (payload) - if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for payload") - } - _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) - if popErr := writeBuffer.PopContext("payload"); popErr != nil { - return errors.Wrap(popErr, "Error popping for payload") - } - if _payloadErr != nil { - return errors.Wrap(_payloadErr, "Error serializing 'payload' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (payload) + if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for payload") + } + _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) + if popErr := writeBuffer.PopContext("payload"); popErr != nil { + return errors.Wrap(popErr, "Error popping for payload") + } + if _payloadErr != nil { + return errors.Wrap(_payloadErr, "Error serializing 'payload' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetApplicationTagDouble"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetApplicationTagDouble") @@ -222,6 +227,7 @@ func (m *_BACnetApplicationTagDouble) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetApplicationTagDouble) isBACnetApplicationTagDouble() bool { return true } @@ -236,3 +242,6 @@ func (m *_BACnetApplicationTagDouble) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagEnumerated.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagEnumerated.go index f865d6837d7..7e3867f2fb6 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagEnumerated.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagEnumerated.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetApplicationTagEnumerated is the corresponding interface of BACnetApplicationTagEnumerated type BACnetApplicationTagEnumerated interface { @@ -48,9 +50,11 @@ type BACnetApplicationTagEnumeratedExactly interface { // _BACnetApplicationTagEnumerated is the data-structure of this message type _BACnetApplicationTagEnumerated struct { *_BACnetApplicationTag - Payload BACnetTagPayloadEnumerated + Payload BACnetTagPayloadEnumerated } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -61,14 +65,12 @@ type _BACnetApplicationTagEnumerated struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetApplicationTagEnumerated) InitializeParent(parent BACnetApplicationTag, header BACnetTagHeader) { - m.Header = header +func (m *_BACnetApplicationTagEnumerated) InitializeParent(parent BACnetApplicationTag , header BACnetTagHeader ) { m.Header = header } -func (m *_BACnetApplicationTagEnumerated) GetParent() BACnetApplicationTag { +func (m *_BACnetApplicationTagEnumerated) GetParent() BACnetApplicationTag { return m._BACnetApplicationTag } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,11 +100,12 @@ func (m *_BACnetApplicationTagEnumerated) GetActualValue() uint32 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetApplicationTagEnumerated factory function for _BACnetApplicationTagEnumerated -func NewBACnetApplicationTagEnumerated(payload BACnetTagPayloadEnumerated, header BACnetTagHeader) *_BACnetApplicationTagEnumerated { +func NewBACnetApplicationTagEnumerated( payload BACnetTagPayloadEnumerated , header BACnetTagHeader ) *_BACnetApplicationTagEnumerated { _result := &_BACnetApplicationTagEnumerated{ - Payload: payload, - _BACnetApplicationTag: NewBACnetApplicationTag(header), + Payload: payload, + _BACnetApplicationTag: NewBACnetApplicationTag(header), } _result._BACnetApplicationTag._BACnetApplicationTagChildRequirements = _result return _result @@ -110,7 +113,7 @@ func NewBACnetApplicationTagEnumerated(payload BACnetTagPayloadEnumerated, heade // Deprecated: use the interface for direct cast func CastBACnetApplicationTagEnumerated(structType interface{}) BACnetApplicationTagEnumerated { - if casted, ok := structType.(BACnetApplicationTagEnumerated); ok { + if casted, ok := structType.(BACnetApplicationTagEnumerated); ok { return casted } if casted, ok := structType.(*BACnetApplicationTagEnumerated); ok { @@ -134,6 +137,7 @@ func (m *_BACnetApplicationTagEnumerated) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetApplicationTagEnumerated) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -155,7 +159,7 @@ func BACnetApplicationTagEnumeratedParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("payload"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for payload") } - _payload, _payloadErr := BACnetTagPayloadEnumeratedParseWithBuffer(ctx, readBuffer, uint32(header.GetActualLength())) +_payload, _payloadErr := BACnetTagPayloadEnumeratedParseWithBuffer(ctx, readBuffer , uint32( header.GetActualLength() ) ) if _payloadErr != nil { return nil, errors.Wrap(_payloadErr, "Error parsing 'payload' field of BACnetApplicationTagEnumerated") } @@ -175,8 +179,9 @@ func BACnetApplicationTagEnumeratedParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_BACnetApplicationTagEnumerated{ - _BACnetApplicationTag: &_BACnetApplicationTag{}, - Payload: payload, + _BACnetApplicationTag: &_BACnetApplicationTag{ + }, + Payload: payload, } _child._BACnetApplicationTag._BACnetApplicationTagChildRequirements = _child return _child, nil @@ -198,21 +203,21 @@ func (m *_BACnetApplicationTagEnumerated) SerializeWithWriteBuffer(ctx context.C return errors.Wrap(pushErr, "Error pushing for BACnetApplicationTagEnumerated") } - // Simple Field (payload) - if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for payload") - } - _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) - if popErr := writeBuffer.PopContext("payload"); popErr != nil { - return errors.Wrap(popErr, "Error popping for payload") - } - if _payloadErr != nil { - return errors.Wrap(_payloadErr, "Error serializing 'payload' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (payload) + if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for payload") + } + _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) + if popErr := writeBuffer.PopContext("payload"); popErr != nil { + return errors.Wrap(popErr, "Error popping for payload") + } + if _payloadErr != nil { + return errors.Wrap(_payloadErr, "Error serializing 'payload' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetApplicationTagEnumerated"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetApplicationTagEnumerated") @@ -222,6 +227,7 @@ func (m *_BACnetApplicationTagEnumerated) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetApplicationTagEnumerated) isBACnetApplicationTagEnumerated() bool { return true } @@ -236,3 +242,6 @@ func (m *_BACnetApplicationTagEnumerated) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagNull.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagNull.go index d586d7c3c04..1e69e890092 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagNull.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagNull.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetApplicationTagNull is the corresponding interface of BACnetApplicationTagNull type BACnetApplicationTagNull interface { @@ -46,6 +48,8 @@ type _BACnetApplicationTagNull struct { *_BACnetApplicationTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,18 +60,18 @@ type _BACnetApplicationTagNull struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetApplicationTagNull) InitializeParent(parent BACnetApplicationTag, header BACnetTagHeader) { - m.Header = header +func (m *_BACnetApplicationTagNull) InitializeParent(parent BACnetApplicationTag , header BACnetTagHeader ) { m.Header = header } -func (m *_BACnetApplicationTagNull) GetParent() BACnetApplicationTag { +func (m *_BACnetApplicationTagNull) GetParent() BACnetApplicationTag { return m._BACnetApplicationTag } + // NewBACnetApplicationTagNull factory function for _BACnetApplicationTagNull -func NewBACnetApplicationTagNull(header BACnetTagHeader) *_BACnetApplicationTagNull { +func NewBACnetApplicationTagNull( header BACnetTagHeader ) *_BACnetApplicationTagNull { _result := &_BACnetApplicationTagNull{ - _BACnetApplicationTag: NewBACnetApplicationTag(header), + _BACnetApplicationTag: NewBACnetApplicationTag(header), } _result._BACnetApplicationTag._BACnetApplicationTagChildRequirements = _result return _result @@ -75,7 +79,7 @@ func NewBACnetApplicationTagNull(header BACnetTagHeader) *_BACnetApplicationTagN // Deprecated: use the interface for direct cast func CastBACnetApplicationTagNull(structType interface{}) BACnetApplicationTagNull { - if casted, ok := structType.(BACnetApplicationTagNull); ok { + if casted, ok := structType.(BACnetApplicationTagNull); ok { return casted } if casted, ok := structType.(*BACnetApplicationTagNull); ok { @@ -94,6 +98,7 @@ func (m *_BACnetApplicationTagNull) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_BACnetApplicationTagNull) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -117,7 +122,8 @@ func BACnetApplicationTagNullParseWithBuffer(ctx context.Context, readBuffer uti // Create a partially initialized instance _child := &_BACnetApplicationTagNull{ - _BACnetApplicationTag: &_BACnetApplicationTag{}, + _BACnetApplicationTag: &_BACnetApplicationTag{ + }, } _child._BACnetApplicationTag._BACnetApplicationTagChildRequirements = _child return _child, nil @@ -147,6 +153,7 @@ func (m *_BACnetApplicationTagNull) SerializeWithWriteBuffer(ctx context.Context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetApplicationTagNull) isBACnetApplicationTagNull() bool { return true } @@ -161,3 +168,6 @@ func (m *_BACnetApplicationTagNull) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagObjectIdentifier.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagObjectIdentifier.go index 1a14ca4b025..957004418ba 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagObjectIdentifier.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagObjectIdentifier.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetApplicationTagObjectIdentifier is the corresponding interface of BACnetApplicationTagObjectIdentifier type BACnetApplicationTagObjectIdentifier interface { @@ -50,9 +52,11 @@ type BACnetApplicationTagObjectIdentifierExactly interface { // _BACnetApplicationTagObjectIdentifier is the data-structure of this message type _BACnetApplicationTagObjectIdentifier struct { *_BACnetApplicationTag - Payload BACnetTagPayloadObjectIdentifier + Payload BACnetTagPayloadObjectIdentifier } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -63,14 +67,12 @@ type _BACnetApplicationTagObjectIdentifier struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetApplicationTagObjectIdentifier) InitializeParent(parent BACnetApplicationTag, header BACnetTagHeader) { - m.Header = header +func (m *_BACnetApplicationTagObjectIdentifier) InitializeParent(parent BACnetApplicationTag , header BACnetTagHeader ) { m.Header = header } -func (m *_BACnetApplicationTagObjectIdentifier) GetParent() BACnetApplicationTag { +func (m *_BACnetApplicationTagObjectIdentifier) GetParent() BACnetApplicationTag { return m._BACnetApplicationTag } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -106,11 +108,12 @@ func (m *_BACnetApplicationTagObjectIdentifier) GetInstanceNumber() uint32 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetApplicationTagObjectIdentifier factory function for _BACnetApplicationTagObjectIdentifier -func NewBACnetApplicationTagObjectIdentifier(payload BACnetTagPayloadObjectIdentifier, header BACnetTagHeader) *_BACnetApplicationTagObjectIdentifier { +func NewBACnetApplicationTagObjectIdentifier( payload BACnetTagPayloadObjectIdentifier , header BACnetTagHeader ) *_BACnetApplicationTagObjectIdentifier { _result := &_BACnetApplicationTagObjectIdentifier{ - Payload: payload, - _BACnetApplicationTag: NewBACnetApplicationTag(header), + Payload: payload, + _BACnetApplicationTag: NewBACnetApplicationTag(header), } _result._BACnetApplicationTag._BACnetApplicationTagChildRequirements = _result return _result @@ -118,7 +121,7 @@ func NewBACnetApplicationTagObjectIdentifier(payload BACnetTagPayloadObjectIdent // Deprecated: use the interface for direct cast func CastBACnetApplicationTagObjectIdentifier(structType interface{}) BACnetApplicationTagObjectIdentifier { - if casted, ok := structType.(BACnetApplicationTagObjectIdentifier); ok { + if casted, ok := structType.(BACnetApplicationTagObjectIdentifier); ok { return casted } if casted, ok := structType.(*BACnetApplicationTagObjectIdentifier); ok { @@ -144,6 +147,7 @@ func (m *_BACnetApplicationTagObjectIdentifier) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetApplicationTagObjectIdentifier) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +169,7 @@ func BACnetApplicationTagObjectIdentifierParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("payload"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for payload") } - _payload, _payloadErr := BACnetTagPayloadObjectIdentifierParseWithBuffer(ctx, readBuffer) +_payload, _payloadErr := BACnetTagPayloadObjectIdentifierParseWithBuffer(ctx, readBuffer) if _payloadErr != nil { return nil, errors.Wrap(_payloadErr, "Error parsing 'payload' field of BACnetApplicationTagObjectIdentifier") } @@ -190,8 +194,9 @@ func BACnetApplicationTagObjectIdentifierParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetApplicationTagObjectIdentifier{ - _BACnetApplicationTag: &_BACnetApplicationTag{}, - Payload: payload, + _BACnetApplicationTag: &_BACnetApplicationTag{ + }, + Payload: payload, } _child._BACnetApplicationTag._BACnetApplicationTagChildRequirements = _child return _child, nil @@ -213,25 +218,25 @@ func (m *_BACnetApplicationTagObjectIdentifier) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetApplicationTagObjectIdentifier") } - // Simple Field (payload) - if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for payload") - } - _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) - if popErr := writeBuffer.PopContext("payload"); popErr != nil { - return errors.Wrap(popErr, "Error popping for payload") - } - if _payloadErr != nil { - return errors.Wrap(_payloadErr, "Error serializing 'payload' field") - } - // Virtual field - if _objectTypeErr := writeBuffer.WriteVirtual(ctx, "objectType", m.GetObjectType()); _objectTypeErr != nil { - return errors.Wrap(_objectTypeErr, "Error serializing 'objectType' field") - } - // Virtual field - if _instanceNumberErr := writeBuffer.WriteVirtual(ctx, "instanceNumber", m.GetInstanceNumber()); _instanceNumberErr != nil { - return errors.Wrap(_instanceNumberErr, "Error serializing 'instanceNumber' field") - } + // Simple Field (payload) + if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for payload") + } + _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) + if popErr := writeBuffer.PopContext("payload"); popErr != nil { + return errors.Wrap(popErr, "Error popping for payload") + } + if _payloadErr != nil { + return errors.Wrap(_payloadErr, "Error serializing 'payload' field") + } + // Virtual field + if _objectTypeErr := writeBuffer.WriteVirtual(ctx, "objectType", m.GetObjectType()); _objectTypeErr != nil { + return errors.Wrap(_objectTypeErr, "Error serializing 'objectType' field") + } + // Virtual field + if _instanceNumberErr := writeBuffer.WriteVirtual(ctx, "instanceNumber", m.GetInstanceNumber()); _instanceNumberErr != nil { + return errors.Wrap(_instanceNumberErr, "Error serializing 'instanceNumber' field") + } if popErr := writeBuffer.PopContext("BACnetApplicationTagObjectIdentifier"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetApplicationTagObjectIdentifier") @@ -241,6 +246,7 @@ func (m *_BACnetApplicationTagObjectIdentifier) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetApplicationTagObjectIdentifier) isBACnetApplicationTagObjectIdentifier() bool { return true } @@ -255,3 +261,6 @@ func (m *_BACnetApplicationTagObjectIdentifier) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagOctetString.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagOctetString.go index 7e0a984d924..2ee6df8d278 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagOctetString.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagOctetString.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetApplicationTagOctetString is the corresponding interface of BACnetApplicationTagOctetString type BACnetApplicationTagOctetString interface { @@ -46,9 +48,11 @@ type BACnetApplicationTagOctetStringExactly interface { // _BACnetApplicationTagOctetString is the data-structure of this message type _BACnetApplicationTagOctetString struct { *_BACnetApplicationTag - Payload BACnetTagPayloadOctetString + Payload BACnetTagPayloadOctetString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetApplicationTagOctetString struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetApplicationTagOctetString) InitializeParent(parent BACnetApplicationTag, header BACnetTagHeader) { - m.Header = header +func (m *_BACnetApplicationTagOctetString) InitializeParent(parent BACnetApplicationTag , header BACnetTagHeader ) { m.Header = header } -func (m *_BACnetApplicationTagOctetString) GetParent() BACnetApplicationTag { +func (m *_BACnetApplicationTagOctetString) GetParent() BACnetApplicationTag { return m._BACnetApplicationTag } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetApplicationTagOctetString) GetPayload() BACnetTagPayloadOctetStr /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetApplicationTagOctetString factory function for _BACnetApplicationTagOctetString -func NewBACnetApplicationTagOctetString(payload BACnetTagPayloadOctetString, header BACnetTagHeader) *_BACnetApplicationTagOctetString { +func NewBACnetApplicationTagOctetString( payload BACnetTagPayloadOctetString , header BACnetTagHeader ) *_BACnetApplicationTagOctetString { _result := &_BACnetApplicationTagOctetString{ - Payload: payload, - _BACnetApplicationTag: NewBACnetApplicationTag(header), + Payload: payload, + _BACnetApplicationTag: NewBACnetApplicationTag(header), } _result._BACnetApplicationTag._BACnetApplicationTagChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetApplicationTagOctetString(payload BACnetTagPayloadOctetString, hea // Deprecated: use the interface for direct cast func CastBACnetApplicationTagOctetString(structType interface{}) BACnetApplicationTagOctetString { - if casted, ok := structType.(BACnetApplicationTagOctetString); ok { + if casted, ok := structType.(BACnetApplicationTagOctetString); ok { return casted } if casted, ok := structType.(*BACnetApplicationTagOctetString); ok { @@ -115,6 +118,7 @@ func (m *_BACnetApplicationTagOctetString) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetApplicationTagOctetString) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetApplicationTagOctetStringParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("payload"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for payload") } - _payload, _payloadErr := BACnetTagPayloadOctetStringParseWithBuffer(ctx, readBuffer, uint32(header.GetActualLength())) +_payload, _payloadErr := BACnetTagPayloadOctetStringParseWithBuffer(ctx, readBuffer , uint32( header.GetActualLength() ) ) if _payloadErr != nil { return nil, errors.Wrap(_payloadErr, "Error parsing 'payload' field of BACnetApplicationTagOctetString") } @@ -151,8 +155,9 @@ func BACnetApplicationTagOctetStringParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetApplicationTagOctetString{ - _BACnetApplicationTag: &_BACnetApplicationTag{}, - Payload: payload, + _BACnetApplicationTag: &_BACnetApplicationTag{ + }, + Payload: payload, } _child._BACnetApplicationTag._BACnetApplicationTagChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetApplicationTagOctetString) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetApplicationTagOctetString") } - // Simple Field (payload) - if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for payload") - } - _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) - if popErr := writeBuffer.PopContext("payload"); popErr != nil { - return errors.Wrap(popErr, "Error popping for payload") - } - if _payloadErr != nil { - return errors.Wrap(_payloadErr, "Error serializing 'payload' field") - } + // Simple Field (payload) + if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for payload") + } + _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) + if popErr := writeBuffer.PopContext("payload"); popErr != nil { + return errors.Wrap(popErr, "Error popping for payload") + } + if _payloadErr != nil { + return errors.Wrap(_payloadErr, "Error serializing 'payload' field") + } if popErr := writeBuffer.PopContext("BACnetApplicationTagOctetString"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetApplicationTagOctetString") @@ -194,6 +199,7 @@ func (m *_BACnetApplicationTagOctetString) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetApplicationTagOctetString) isBACnetApplicationTagOctetString() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetApplicationTagOctetString) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagReal.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagReal.go index a610fdbcb14..b1fdcf895bc 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagReal.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagReal.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetApplicationTagReal is the corresponding interface of BACnetApplicationTagReal type BACnetApplicationTagReal interface { @@ -48,9 +50,11 @@ type BACnetApplicationTagRealExactly interface { // _BACnetApplicationTagReal is the data-structure of this message type _BACnetApplicationTagReal struct { *_BACnetApplicationTag - Payload BACnetTagPayloadReal + Payload BACnetTagPayloadReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -61,14 +65,12 @@ type _BACnetApplicationTagReal struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetApplicationTagReal) InitializeParent(parent BACnetApplicationTag, header BACnetTagHeader) { - m.Header = header +func (m *_BACnetApplicationTagReal) InitializeParent(parent BACnetApplicationTag , header BACnetTagHeader ) { m.Header = header } -func (m *_BACnetApplicationTagReal) GetParent() BACnetApplicationTag { +func (m *_BACnetApplicationTagReal) GetParent() BACnetApplicationTag { return m._BACnetApplicationTag } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,11 +100,12 @@ func (m *_BACnetApplicationTagReal) GetActualValue() float32 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetApplicationTagReal factory function for _BACnetApplicationTagReal -func NewBACnetApplicationTagReal(payload BACnetTagPayloadReal, header BACnetTagHeader) *_BACnetApplicationTagReal { +func NewBACnetApplicationTagReal( payload BACnetTagPayloadReal , header BACnetTagHeader ) *_BACnetApplicationTagReal { _result := &_BACnetApplicationTagReal{ - Payload: payload, - _BACnetApplicationTag: NewBACnetApplicationTag(header), + Payload: payload, + _BACnetApplicationTag: NewBACnetApplicationTag(header), } _result._BACnetApplicationTag._BACnetApplicationTagChildRequirements = _result return _result @@ -110,7 +113,7 @@ func NewBACnetApplicationTagReal(payload BACnetTagPayloadReal, header BACnetTagH // Deprecated: use the interface for direct cast func CastBACnetApplicationTagReal(structType interface{}) BACnetApplicationTagReal { - if casted, ok := structType.(BACnetApplicationTagReal); ok { + if casted, ok := structType.(BACnetApplicationTagReal); ok { return casted } if casted, ok := structType.(*BACnetApplicationTagReal); ok { @@ -134,6 +137,7 @@ func (m *_BACnetApplicationTagReal) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_BACnetApplicationTagReal) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -155,7 +159,7 @@ func BACnetApplicationTagRealParseWithBuffer(ctx context.Context, readBuffer uti if pullErr := readBuffer.PullContext("payload"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for payload") } - _payload, _payloadErr := BACnetTagPayloadRealParseWithBuffer(ctx, readBuffer) +_payload, _payloadErr := BACnetTagPayloadRealParseWithBuffer(ctx, readBuffer) if _payloadErr != nil { return nil, errors.Wrap(_payloadErr, "Error parsing 'payload' field of BACnetApplicationTagReal") } @@ -175,8 +179,9 @@ func BACnetApplicationTagRealParseWithBuffer(ctx context.Context, readBuffer uti // Create a partially initialized instance _child := &_BACnetApplicationTagReal{ - _BACnetApplicationTag: &_BACnetApplicationTag{}, - Payload: payload, + _BACnetApplicationTag: &_BACnetApplicationTag{ + }, + Payload: payload, } _child._BACnetApplicationTag._BACnetApplicationTagChildRequirements = _child return _child, nil @@ -198,21 +203,21 @@ func (m *_BACnetApplicationTagReal) SerializeWithWriteBuffer(ctx context.Context return errors.Wrap(pushErr, "Error pushing for BACnetApplicationTagReal") } - // Simple Field (payload) - if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for payload") - } - _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) - if popErr := writeBuffer.PopContext("payload"); popErr != nil { - return errors.Wrap(popErr, "Error popping for payload") - } - if _payloadErr != nil { - return errors.Wrap(_payloadErr, "Error serializing 'payload' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (payload) + if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for payload") + } + _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) + if popErr := writeBuffer.PopContext("payload"); popErr != nil { + return errors.Wrap(popErr, "Error popping for payload") + } + if _payloadErr != nil { + return errors.Wrap(_payloadErr, "Error serializing 'payload' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetApplicationTagReal"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetApplicationTagReal") @@ -222,6 +227,7 @@ func (m *_BACnetApplicationTagReal) SerializeWithWriteBuffer(ctx context.Context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetApplicationTagReal) isBACnetApplicationTagReal() bool { return true } @@ -236,3 +242,6 @@ func (m *_BACnetApplicationTagReal) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagSignedInteger.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagSignedInteger.go index c504f3670f0..5d3eb04ab3a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagSignedInteger.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagSignedInteger.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetApplicationTagSignedInteger is the corresponding interface of BACnetApplicationTagSignedInteger type BACnetApplicationTagSignedInteger interface { @@ -48,9 +50,11 @@ type BACnetApplicationTagSignedIntegerExactly interface { // _BACnetApplicationTagSignedInteger is the data-structure of this message type _BACnetApplicationTagSignedInteger struct { *_BACnetApplicationTag - Payload BACnetTagPayloadSignedInteger + Payload BACnetTagPayloadSignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -61,14 +65,12 @@ type _BACnetApplicationTagSignedInteger struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetApplicationTagSignedInteger) InitializeParent(parent BACnetApplicationTag, header BACnetTagHeader) { - m.Header = header +func (m *_BACnetApplicationTagSignedInteger) InitializeParent(parent BACnetApplicationTag , header BACnetTagHeader ) { m.Header = header } -func (m *_BACnetApplicationTagSignedInteger) GetParent() BACnetApplicationTag { +func (m *_BACnetApplicationTagSignedInteger) GetParent() BACnetApplicationTag { return m._BACnetApplicationTag } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,11 +100,12 @@ func (m *_BACnetApplicationTagSignedInteger) GetActualValue() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetApplicationTagSignedInteger factory function for _BACnetApplicationTagSignedInteger -func NewBACnetApplicationTagSignedInteger(payload BACnetTagPayloadSignedInteger, header BACnetTagHeader) *_BACnetApplicationTagSignedInteger { +func NewBACnetApplicationTagSignedInteger( payload BACnetTagPayloadSignedInteger , header BACnetTagHeader ) *_BACnetApplicationTagSignedInteger { _result := &_BACnetApplicationTagSignedInteger{ - Payload: payload, - _BACnetApplicationTag: NewBACnetApplicationTag(header), + Payload: payload, + _BACnetApplicationTag: NewBACnetApplicationTag(header), } _result._BACnetApplicationTag._BACnetApplicationTagChildRequirements = _result return _result @@ -110,7 +113,7 @@ func NewBACnetApplicationTagSignedInteger(payload BACnetTagPayloadSignedInteger, // Deprecated: use the interface for direct cast func CastBACnetApplicationTagSignedInteger(structType interface{}) BACnetApplicationTagSignedInteger { - if casted, ok := structType.(BACnetApplicationTagSignedInteger); ok { + if casted, ok := structType.(BACnetApplicationTagSignedInteger); ok { return casted } if casted, ok := structType.(*BACnetApplicationTagSignedInteger); ok { @@ -134,6 +137,7 @@ func (m *_BACnetApplicationTagSignedInteger) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetApplicationTagSignedInteger) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -155,7 +159,7 @@ func BACnetApplicationTagSignedIntegerParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("payload"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for payload") } - _payload, _payloadErr := BACnetTagPayloadSignedIntegerParseWithBuffer(ctx, readBuffer, uint32(header.GetActualLength())) +_payload, _payloadErr := BACnetTagPayloadSignedIntegerParseWithBuffer(ctx, readBuffer , uint32( header.GetActualLength() ) ) if _payloadErr != nil { return nil, errors.Wrap(_payloadErr, "Error parsing 'payload' field of BACnetApplicationTagSignedInteger") } @@ -175,8 +179,9 @@ func BACnetApplicationTagSignedIntegerParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetApplicationTagSignedInteger{ - _BACnetApplicationTag: &_BACnetApplicationTag{}, - Payload: payload, + _BACnetApplicationTag: &_BACnetApplicationTag{ + }, + Payload: payload, } _child._BACnetApplicationTag._BACnetApplicationTagChildRequirements = _child return _child, nil @@ -198,21 +203,21 @@ func (m *_BACnetApplicationTagSignedInteger) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetApplicationTagSignedInteger") } - // Simple Field (payload) - if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for payload") - } - _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) - if popErr := writeBuffer.PopContext("payload"); popErr != nil { - return errors.Wrap(popErr, "Error popping for payload") - } - if _payloadErr != nil { - return errors.Wrap(_payloadErr, "Error serializing 'payload' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (payload) + if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for payload") + } + _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) + if popErr := writeBuffer.PopContext("payload"); popErr != nil { + return errors.Wrap(popErr, "Error popping for payload") + } + if _payloadErr != nil { + return errors.Wrap(_payloadErr, "Error serializing 'payload' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetApplicationTagSignedInteger"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetApplicationTagSignedInteger") @@ -222,6 +227,7 @@ func (m *_BACnetApplicationTagSignedInteger) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetApplicationTagSignedInteger) isBACnetApplicationTagSignedInteger() bool { return true } @@ -236,3 +242,6 @@ func (m *_BACnetApplicationTagSignedInteger) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagTime.go index 81700bf4e6b..b56c983627d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetApplicationTagTime is the corresponding interface of BACnetApplicationTagTime type BACnetApplicationTagTime interface { @@ -46,9 +48,11 @@ type BACnetApplicationTagTimeExactly interface { // _BACnetApplicationTagTime is the data-structure of this message type _BACnetApplicationTagTime struct { *_BACnetApplicationTag - Payload BACnetTagPayloadTime + Payload BACnetTagPayloadTime } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetApplicationTagTime struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetApplicationTagTime) InitializeParent(parent BACnetApplicationTag, header BACnetTagHeader) { - m.Header = header +func (m *_BACnetApplicationTagTime) InitializeParent(parent BACnetApplicationTag , header BACnetTagHeader ) { m.Header = header } -func (m *_BACnetApplicationTagTime) GetParent() BACnetApplicationTag { +func (m *_BACnetApplicationTagTime) GetParent() BACnetApplicationTag { return m._BACnetApplicationTag } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetApplicationTagTime) GetPayload() BACnetTagPayloadTime { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetApplicationTagTime factory function for _BACnetApplicationTagTime -func NewBACnetApplicationTagTime(payload BACnetTagPayloadTime, header BACnetTagHeader) *_BACnetApplicationTagTime { +func NewBACnetApplicationTagTime( payload BACnetTagPayloadTime , header BACnetTagHeader ) *_BACnetApplicationTagTime { _result := &_BACnetApplicationTagTime{ - Payload: payload, - _BACnetApplicationTag: NewBACnetApplicationTag(header), + Payload: payload, + _BACnetApplicationTag: NewBACnetApplicationTag(header), } _result._BACnetApplicationTag._BACnetApplicationTagChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetApplicationTagTime(payload BACnetTagPayloadTime, header BACnetTagH // Deprecated: use the interface for direct cast func CastBACnetApplicationTagTime(structType interface{}) BACnetApplicationTagTime { - if casted, ok := structType.(BACnetApplicationTagTime); ok { + if casted, ok := structType.(BACnetApplicationTagTime); ok { return casted } if casted, ok := structType.(*BACnetApplicationTagTime); ok { @@ -115,6 +118,7 @@ func (m *_BACnetApplicationTagTime) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_BACnetApplicationTagTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetApplicationTagTimeParseWithBuffer(ctx context.Context, readBuffer uti if pullErr := readBuffer.PullContext("payload"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for payload") } - _payload, _payloadErr := BACnetTagPayloadTimeParseWithBuffer(ctx, readBuffer) +_payload, _payloadErr := BACnetTagPayloadTimeParseWithBuffer(ctx, readBuffer) if _payloadErr != nil { return nil, errors.Wrap(_payloadErr, "Error parsing 'payload' field of BACnetApplicationTagTime") } @@ -151,8 +155,9 @@ func BACnetApplicationTagTimeParseWithBuffer(ctx context.Context, readBuffer uti // Create a partially initialized instance _child := &_BACnetApplicationTagTime{ - _BACnetApplicationTag: &_BACnetApplicationTag{}, - Payload: payload, + _BACnetApplicationTag: &_BACnetApplicationTag{ + }, + Payload: payload, } _child._BACnetApplicationTag._BACnetApplicationTagChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetApplicationTagTime) SerializeWithWriteBuffer(ctx context.Context return errors.Wrap(pushErr, "Error pushing for BACnetApplicationTagTime") } - // Simple Field (payload) - if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for payload") - } - _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) - if popErr := writeBuffer.PopContext("payload"); popErr != nil { - return errors.Wrap(popErr, "Error popping for payload") - } - if _payloadErr != nil { - return errors.Wrap(_payloadErr, "Error serializing 'payload' field") - } + // Simple Field (payload) + if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for payload") + } + _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) + if popErr := writeBuffer.PopContext("payload"); popErr != nil { + return errors.Wrap(popErr, "Error popping for payload") + } + if _payloadErr != nil { + return errors.Wrap(_payloadErr, "Error serializing 'payload' field") + } if popErr := writeBuffer.PopContext("BACnetApplicationTagTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetApplicationTagTime") @@ -194,6 +199,7 @@ func (m *_BACnetApplicationTagTime) SerializeWithWriteBuffer(ctx context.Context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetApplicationTagTime) isBACnetApplicationTagTime() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetApplicationTagTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagUnsignedInteger.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagUnsignedInteger.go index e0ad15139ef..00952efde3d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagUnsignedInteger.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagUnsignedInteger.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetApplicationTagUnsignedInteger is the corresponding interface of BACnetApplicationTagUnsignedInteger type BACnetApplicationTagUnsignedInteger interface { @@ -48,9 +50,11 @@ type BACnetApplicationTagUnsignedIntegerExactly interface { // _BACnetApplicationTagUnsignedInteger is the data-structure of this message type _BACnetApplicationTagUnsignedInteger struct { *_BACnetApplicationTag - Payload BACnetTagPayloadUnsignedInteger + Payload BACnetTagPayloadUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -61,14 +65,12 @@ type _BACnetApplicationTagUnsignedInteger struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetApplicationTagUnsignedInteger) InitializeParent(parent BACnetApplicationTag, header BACnetTagHeader) { - m.Header = header +func (m *_BACnetApplicationTagUnsignedInteger) InitializeParent(parent BACnetApplicationTag , header BACnetTagHeader ) { m.Header = header } -func (m *_BACnetApplicationTagUnsignedInteger) GetParent() BACnetApplicationTag { +func (m *_BACnetApplicationTagUnsignedInteger) GetParent() BACnetApplicationTag { return m._BACnetApplicationTag } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,11 +100,12 @@ func (m *_BACnetApplicationTagUnsignedInteger) GetActualValue() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetApplicationTagUnsignedInteger factory function for _BACnetApplicationTagUnsignedInteger -func NewBACnetApplicationTagUnsignedInteger(payload BACnetTagPayloadUnsignedInteger, header BACnetTagHeader) *_BACnetApplicationTagUnsignedInteger { +func NewBACnetApplicationTagUnsignedInteger( payload BACnetTagPayloadUnsignedInteger , header BACnetTagHeader ) *_BACnetApplicationTagUnsignedInteger { _result := &_BACnetApplicationTagUnsignedInteger{ - Payload: payload, - _BACnetApplicationTag: NewBACnetApplicationTag(header), + Payload: payload, + _BACnetApplicationTag: NewBACnetApplicationTag(header), } _result._BACnetApplicationTag._BACnetApplicationTagChildRequirements = _result return _result @@ -110,7 +113,7 @@ func NewBACnetApplicationTagUnsignedInteger(payload BACnetTagPayloadUnsignedInte // Deprecated: use the interface for direct cast func CastBACnetApplicationTagUnsignedInteger(structType interface{}) BACnetApplicationTagUnsignedInteger { - if casted, ok := structType.(BACnetApplicationTagUnsignedInteger); ok { + if casted, ok := structType.(BACnetApplicationTagUnsignedInteger); ok { return casted } if casted, ok := structType.(*BACnetApplicationTagUnsignedInteger); ok { @@ -134,6 +137,7 @@ func (m *_BACnetApplicationTagUnsignedInteger) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetApplicationTagUnsignedInteger) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -155,7 +159,7 @@ func BACnetApplicationTagUnsignedIntegerParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("payload"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for payload") } - _payload, _payloadErr := BACnetTagPayloadUnsignedIntegerParseWithBuffer(ctx, readBuffer, uint32(header.GetActualLength())) +_payload, _payloadErr := BACnetTagPayloadUnsignedIntegerParseWithBuffer(ctx, readBuffer , uint32( header.GetActualLength() ) ) if _payloadErr != nil { return nil, errors.Wrap(_payloadErr, "Error parsing 'payload' field of BACnetApplicationTagUnsignedInteger") } @@ -175,8 +179,9 @@ func BACnetApplicationTagUnsignedIntegerParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetApplicationTagUnsignedInteger{ - _BACnetApplicationTag: &_BACnetApplicationTag{}, - Payload: payload, + _BACnetApplicationTag: &_BACnetApplicationTag{ + }, + Payload: payload, } _child._BACnetApplicationTag._BACnetApplicationTagChildRequirements = _child return _child, nil @@ -198,21 +203,21 @@ func (m *_BACnetApplicationTagUnsignedInteger) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetApplicationTagUnsignedInteger") } - // Simple Field (payload) - if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for payload") - } - _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) - if popErr := writeBuffer.PopContext("payload"); popErr != nil { - return errors.Wrap(popErr, "Error popping for payload") - } - if _payloadErr != nil { - return errors.Wrap(_payloadErr, "Error serializing 'payload' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (payload) + if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for payload") + } + _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) + if popErr := writeBuffer.PopContext("payload"); popErr != nil { + return errors.Wrap(popErr, "Error popping for payload") + } + if _payloadErr != nil { + return errors.Wrap(_payloadErr, "Error serializing 'payload' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetApplicationTagUnsignedInteger"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetApplicationTagUnsignedInteger") @@ -222,6 +227,7 @@ func (m *_BACnetApplicationTagUnsignedInteger) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetApplicationTagUnsignedInteger) isBACnetApplicationTagUnsignedInteger() bool { return true } @@ -236,3 +242,6 @@ func (m *_BACnetApplicationTagUnsignedInteger) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAssignedAccessRights.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAssignedAccessRights.go index a6190c77e98..998f0a995ea 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAssignedAccessRights.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAssignedAccessRights.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetAssignedAccessRights is the corresponding interface of BACnetAssignedAccessRights type BACnetAssignedAccessRights interface { @@ -46,10 +48,11 @@ type BACnetAssignedAccessRightsExactly interface { // _BACnetAssignedAccessRights is the data-structure of this message type _BACnetAssignedAccessRights struct { - AssignedAccessRights BACnetDeviceObjectReferenceEnclosed - Enable BACnetContextTagBoolean + AssignedAccessRights BACnetDeviceObjectReferenceEnclosed + Enable BACnetContextTagBoolean } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -68,14 +71,15 @@ func (m *_BACnetAssignedAccessRights) GetEnable() BACnetContextTagBoolean { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetAssignedAccessRights factory function for _BACnetAssignedAccessRights -func NewBACnetAssignedAccessRights(assignedAccessRights BACnetDeviceObjectReferenceEnclosed, enable BACnetContextTagBoolean) *_BACnetAssignedAccessRights { - return &_BACnetAssignedAccessRights{AssignedAccessRights: assignedAccessRights, Enable: enable} +func NewBACnetAssignedAccessRights( assignedAccessRights BACnetDeviceObjectReferenceEnclosed , enable BACnetContextTagBoolean ) *_BACnetAssignedAccessRights { +return &_BACnetAssignedAccessRights{ AssignedAccessRights: assignedAccessRights , Enable: enable } } // Deprecated: use the interface for direct cast func CastBACnetAssignedAccessRights(structType interface{}) BACnetAssignedAccessRights { - if casted, ok := structType.(BACnetAssignedAccessRights); ok { + if casted, ok := structType.(BACnetAssignedAccessRights); ok { return casted } if casted, ok := structType.(*BACnetAssignedAccessRights); ok { @@ -100,6 +104,7 @@ func (m *_BACnetAssignedAccessRights) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_BACnetAssignedAccessRights) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -121,7 +126,7 @@ func BACnetAssignedAccessRightsParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("assignedAccessRights"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for assignedAccessRights") } - _assignedAccessRights, _assignedAccessRightsErr := BACnetDeviceObjectReferenceEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_assignedAccessRights, _assignedAccessRightsErr := BACnetDeviceObjectReferenceEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _assignedAccessRightsErr != nil { return nil, errors.Wrap(_assignedAccessRightsErr, "Error parsing 'assignedAccessRights' field of BACnetAssignedAccessRights") } @@ -134,7 +139,7 @@ func BACnetAssignedAccessRightsParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("enable"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for enable") } - _enable, _enableErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_BOOLEAN)) +_enable, _enableErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_BOOLEAN ) ) if _enableErr != nil { return nil, errors.Wrap(_enableErr, "Error parsing 'enable' field of BACnetAssignedAccessRights") } @@ -149,9 +154,9 @@ func BACnetAssignedAccessRightsParseWithBuffer(ctx context.Context, readBuffer u // Create the instance return &_BACnetAssignedAccessRights{ - AssignedAccessRights: assignedAccessRights, - Enable: enable, - }, nil + AssignedAccessRights: assignedAccessRights, + Enable: enable, + }, nil } func (m *_BACnetAssignedAccessRights) Serialize() ([]byte, error) { @@ -165,7 +170,7 @@ func (m *_BACnetAssignedAccessRights) Serialize() ([]byte, error) { func (m *_BACnetAssignedAccessRights) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetAssignedAccessRights"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetAssignedAccessRights"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetAssignedAccessRights") } @@ -199,6 +204,7 @@ func (m *_BACnetAssignedAccessRights) SerializeWithWriteBuffer(ctx context.Conte return nil } + func (m *_BACnetAssignedAccessRights) isBACnetAssignedAccessRights() bool { return true } @@ -213,3 +219,6 @@ func (m *_BACnetAssignedAccessRights) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAssignedLandingCalls.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAssignedLandingCalls.go index ac3ade2a0a8..8a74527c131 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAssignedLandingCalls.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAssignedLandingCalls.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetAssignedLandingCalls is the corresponding interface of BACnetAssignedLandingCalls type BACnetAssignedLandingCalls interface { @@ -44,9 +46,10 @@ type BACnetAssignedLandingCallsExactly interface { // _BACnetAssignedLandingCalls is the data-structure of this message type _BACnetAssignedLandingCalls struct { - LandingCalls BACnetAssignedLandingCallsLandingCallsList + LandingCalls BACnetAssignedLandingCallsLandingCallsList } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -61,14 +64,15 @@ func (m *_BACnetAssignedLandingCalls) GetLandingCalls() BACnetAssignedLandingCal /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetAssignedLandingCalls factory function for _BACnetAssignedLandingCalls -func NewBACnetAssignedLandingCalls(landingCalls BACnetAssignedLandingCallsLandingCallsList) *_BACnetAssignedLandingCalls { - return &_BACnetAssignedLandingCalls{LandingCalls: landingCalls} +func NewBACnetAssignedLandingCalls( landingCalls BACnetAssignedLandingCallsLandingCallsList ) *_BACnetAssignedLandingCalls { +return &_BACnetAssignedLandingCalls{ LandingCalls: landingCalls } } // Deprecated: use the interface for direct cast func CastBACnetAssignedLandingCalls(structType interface{}) BACnetAssignedLandingCalls { - if casted, ok := structType.(BACnetAssignedLandingCalls); ok { + if casted, ok := structType.(BACnetAssignedLandingCalls); ok { return casted } if casted, ok := structType.(*BACnetAssignedLandingCalls); ok { @@ -90,6 +94,7 @@ func (m *_BACnetAssignedLandingCalls) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_BACnetAssignedLandingCalls) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -111,7 +116,7 @@ func BACnetAssignedLandingCallsParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("landingCalls"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for landingCalls") } - _landingCalls, _landingCallsErr := BACnetAssignedLandingCallsLandingCallsListParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_landingCalls, _landingCallsErr := BACnetAssignedLandingCallsLandingCallsListParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _landingCallsErr != nil { return nil, errors.Wrap(_landingCallsErr, "Error parsing 'landingCalls' field of BACnetAssignedLandingCalls") } @@ -126,8 +131,8 @@ func BACnetAssignedLandingCallsParseWithBuffer(ctx context.Context, readBuffer u // Create the instance return &_BACnetAssignedLandingCalls{ - LandingCalls: landingCalls, - }, nil + LandingCalls: landingCalls, + }, nil } func (m *_BACnetAssignedLandingCalls) Serialize() ([]byte, error) { @@ -141,7 +146,7 @@ func (m *_BACnetAssignedLandingCalls) Serialize() ([]byte, error) { func (m *_BACnetAssignedLandingCalls) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetAssignedLandingCalls"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetAssignedLandingCalls"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetAssignedLandingCalls") } @@ -163,6 +168,7 @@ func (m *_BACnetAssignedLandingCalls) SerializeWithWriteBuffer(ctx context.Conte return nil } + func (m *_BACnetAssignedLandingCalls) isBACnetAssignedLandingCalls() bool { return true } @@ -177,3 +183,6 @@ func (m *_BACnetAssignedLandingCalls) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAssignedLandingCallsLandingCallsList.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAssignedLandingCallsLandingCallsList.go index 097ead92e58..5164ba0cae1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAssignedLandingCallsLandingCallsList.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAssignedLandingCallsLandingCallsList.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetAssignedLandingCallsLandingCallsList is the corresponding interface of BACnetAssignedLandingCallsLandingCallsList type BACnetAssignedLandingCallsLandingCallsList interface { @@ -49,14 +51,15 @@ type BACnetAssignedLandingCallsLandingCallsListExactly interface { // _BACnetAssignedLandingCallsLandingCallsList is the data-structure of this message type _BACnetAssignedLandingCallsLandingCallsList struct { - OpeningTag BACnetOpeningTag - LandingCalls []BACnetAssignedLandingCallsLandingCallsListEntry - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + LandingCalls []BACnetAssignedLandingCallsLandingCallsListEntry + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -79,14 +82,15 @@ func (m *_BACnetAssignedLandingCallsLandingCallsList) GetClosingTag() BACnetClos /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetAssignedLandingCallsLandingCallsList factory function for _BACnetAssignedLandingCallsLandingCallsList -func NewBACnetAssignedLandingCallsLandingCallsList(openingTag BACnetOpeningTag, landingCalls []BACnetAssignedLandingCallsLandingCallsListEntry, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetAssignedLandingCallsLandingCallsList { - return &_BACnetAssignedLandingCallsLandingCallsList{OpeningTag: openingTag, LandingCalls: landingCalls, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetAssignedLandingCallsLandingCallsList( openingTag BACnetOpeningTag , landingCalls []BACnetAssignedLandingCallsLandingCallsListEntry , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetAssignedLandingCallsLandingCallsList { +return &_BACnetAssignedLandingCallsLandingCallsList{ OpeningTag: openingTag , LandingCalls: landingCalls , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetAssignedLandingCallsLandingCallsList(structType interface{}) BACnetAssignedLandingCallsLandingCallsList { - if casted, ok := structType.(BACnetAssignedLandingCallsLandingCallsList); ok { + if casted, ok := structType.(BACnetAssignedLandingCallsLandingCallsList); ok { return casted } if casted, ok := structType.(*BACnetAssignedLandingCallsLandingCallsList); ok { @@ -118,6 +122,7 @@ func (m *_BACnetAssignedLandingCallsLandingCallsList) GetLengthInBits(ctx contex return lengthInBits } + func (m *_BACnetAssignedLandingCallsLandingCallsList) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +144,7 @@ func BACnetAssignedLandingCallsLandingCallsListParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetAssignedLandingCallsLandingCallsList") } @@ -155,8 +160,8 @@ func BACnetAssignedLandingCallsLandingCallsListParseWithBuffer(ctx context.Conte // Terminated array var landingCalls []BACnetAssignedLandingCallsLandingCallsListEntry { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetAssignedLandingCallsLandingCallsListEntryParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetAssignedLandingCallsLandingCallsListEntryParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'landingCalls' field of BACnetAssignedLandingCallsLandingCallsList") } @@ -171,7 +176,7 @@ func BACnetAssignedLandingCallsLandingCallsListParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetAssignedLandingCallsLandingCallsList") } @@ -186,11 +191,11 @@ func BACnetAssignedLandingCallsLandingCallsListParseWithBuffer(ctx context.Conte // Create the instance return &_BACnetAssignedLandingCallsLandingCallsList{ - TagNumber: tagNumber, - OpeningTag: openingTag, - LandingCalls: landingCalls, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + LandingCalls: landingCalls, + ClosingTag: closingTag, + }, nil } func (m *_BACnetAssignedLandingCallsLandingCallsList) Serialize() ([]byte, error) { @@ -204,7 +209,7 @@ func (m *_BACnetAssignedLandingCallsLandingCallsList) Serialize() ([]byte, error func (m *_BACnetAssignedLandingCallsLandingCallsList) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetAssignedLandingCallsLandingCallsList"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetAssignedLandingCallsLandingCallsList"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetAssignedLandingCallsLandingCallsList") } @@ -255,13 +260,13 @@ func (m *_BACnetAssignedLandingCallsLandingCallsList) SerializeWithWriteBuffer(c return nil } + //// // Arguments Getter func (m *_BACnetAssignedLandingCallsLandingCallsList) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -279,3 +284,6 @@ func (m *_BACnetAssignedLandingCallsLandingCallsList) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAssignedLandingCallsLandingCallsListEntry.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAssignedLandingCallsLandingCallsListEntry.go index aaaff47326a..be9d0fd2529 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAssignedLandingCallsLandingCallsListEntry.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAssignedLandingCallsLandingCallsListEntry.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetAssignedLandingCallsLandingCallsListEntry is the corresponding interface of BACnetAssignedLandingCallsLandingCallsListEntry type BACnetAssignedLandingCallsLandingCallsListEntry interface { @@ -46,10 +48,11 @@ type BACnetAssignedLandingCallsLandingCallsListEntryExactly interface { // _BACnetAssignedLandingCallsLandingCallsListEntry is the data-structure of this message type _BACnetAssignedLandingCallsLandingCallsListEntry struct { - FloorNumber BACnetContextTagUnsignedInteger - Direction BACnetLiftCarDirectionTagged + FloorNumber BACnetContextTagUnsignedInteger + Direction BACnetLiftCarDirectionTagged } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -68,14 +71,15 @@ func (m *_BACnetAssignedLandingCallsLandingCallsListEntry) GetDirection() BACnet /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetAssignedLandingCallsLandingCallsListEntry factory function for _BACnetAssignedLandingCallsLandingCallsListEntry -func NewBACnetAssignedLandingCallsLandingCallsListEntry(floorNumber BACnetContextTagUnsignedInteger, direction BACnetLiftCarDirectionTagged) *_BACnetAssignedLandingCallsLandingCallsListEntry { - return &_BACnetAssignedLandingCallsLandingCallsListEntry{FloorNumber: floorNumber, Direction: direction} +func NewBACnetAssignedLandingCallsLandingCallsListEntry( floorNumber BACnetContextTagUnsignedInteger , direction BACnetLiftCarDirectionTagged ) *_BACnetAssignedLandingCallsLandingCallsListEntry { +return &_BACnetAssignedLandingCallsLandingCallsListEntry{ FloorNumber: floorNumber , Direction: direction } } // Deprecated: use the interface for direct cast func CastBACnetAssignedLandingCallsLandingCallsListEntry(structType interface{}) BACnetAssignedLandingCallsLandingCallsListEntry { - if casted, ok := structType.(BACnetAssignedLandingCallsLandingCallsListEntry); ok { + if casted, ok := structType.(BACnetAssignedLandingCallsLandingCallsListEntry); ok { return casted } if casted, ok := structType.(*BACnetAssignedLandingCallsLandingCallsListEntry); ok { @@ -100,6 +104,7 @@ func (m *_BACnetAssignedLandingCallsLandingCallsListEntry) GetLengthInBits(ctx c return lengthInBits } + func (m *_BACnetAssignedLandingCallsLandingCallsListEntry) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -121,7 +126,7 @@ func BACnetAssignedLandingCallsLandingCallsListEntryParseWithBuffer(ctx context. if pullErr := readBuffer.PullContext("floorNumber"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for floorNumber") } - _floorNumber, _floorNumberErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_floorNumber, _floorNumberErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _floorNumberErr != nil { return nil, errors.Wrap(_floorNumberErr, "Error parsing 'floorNumber' field of BACnetAssignedLandingCallsLandingCallsListEntry") } @@ -134,7 +139,7 @@ func BACnetAssignedLandingCallsLandingCallsListEntryParseWithBuffer(ctx context. if pullErr := readBuffer.PullContext("direction"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for direction") } - _direction, _directionErr := BACnetLiftCarDirectionTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_direction, _directionErr := BACnetLiftCarDirectionTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _directionErr != nil { return nil, errors.Wrap(_directionErr, "Error parsing 'direction' field of BACnetAssignedLandingCallsLandingCallsListEntry") } @@ -149,9 +154,9 @@ func BACnetAssignedLandingCallsLandingCallsListEntryParseWithBuffer(ctx context. // Create the instance return &_BACnetAssignedLandingCallsLandingCallsListEntry{ - FloorNumber: floorNumber, - Direction: direction, - }, nil + FloorNumber: floorNumber, + Direction: direction, + }, nil } func (m *_BACnetAssignedLandingCallsLandingCallsListEntry) Serialize() ([]byte, error) { @@ -165,7 +170,7 @@ func (m *_BACnetAssignedLandingCallsLandingCallsListEntry) Serialize() ([]byte, func (m *_BACnetAssignedLandingCallsLandingCallsListEntry) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetAssignedLandingCallsLandingCallsListEntry"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetAssignedLandingCallsLandingCallsListEntry"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetAssignedLandingCallsLandingCallsListEntry") } @@ -199,6 +204,7 @@ func (m *_BACnetAssignedLandingCallsLandingCallsListEntry) SerializeWithWriteBuf return nil } + func (m *_BACnetAssignedLandingCallsLandingCallsListEntry) isBACnetAssignedLandingCallsLandingCallsListEntry() bool { return true } @@ -213,3 +219,6 @@ func (m *_BACnetAssignedLandingCallsLandingCallsListEntry) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthenticationFactor.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthenticationFactor.go index ca6da9bd689..9330fd5434a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthenticationFactor.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthenticationFactor.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetAuthenticationFactor is the corresponding interface of BACnetAuthenticationFactor type BACnetAuthenticationFactor interface { @@ -48,11 +50,12 @@ type BACnetAuthenticationFactorExactly interface { // _BACnetAuthenticationFactor is the data-structure of this message type _BACnetAuthenticationFactor struct { - FormatType BACnetAuthenticationFactorTypeTagged - FormatClass BACnetContextTagUnsignedInteger - Value BACnetContextTagOctetString + FormatType BACnetAuthenticationFactorTypeTagged + FormatClass BACnetContextTagUnsignedInteger + Value BACnetContextTagOctetString } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -75,14 +78,15 @@ func (m *_BACnetAuthenticationFactor) GetValue() BACnetContextTagOctetString { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetAuthenticationFactor factory function for _BACnetAuthenticationFactor -func NewBACnetAuthenticationFactor(formatType BACnetAuthenticationFactorTypeTagged, formatClass BACnetContextTagUnsignedInteger, value BACnetContextTagOctetString) *_BACnetAuthenticationFactor { - return &_BACnetAuthenticationFactor{FormatType: formatType, FormatClass: formatClass, Value: value} +func NewBACnetAuthenticationFactor( formatType BACnetAuthenticationFactorTypeTagged , formatClass BACnetContextTagUnsignedInteger , value BACnetContextTagOctetString ) *_BACnetAuthenticationFactor { +return &_BACnetAuthenticationFactor{ FormatType: formatType , FormatClass: formatClass , Value: value } } // Deprecated: use the interface for direct cast func CastBACnetAuthenticationFactor(structType interface{}) BACnetAuthenticationFactor { - if casted, ok := structType.(BACnetAuthenticationFactor); ok { + if casted, ok := structType.(BACnetAuthenticationFactor); ok { return casted } if casted, ok := structType.(*BACnetAuthenticationFactor); ok { @@ -110,6 +114,7 @@ func (m *_BACnetAuthenticationFactor) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_BACnetAuthenticationFactor) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -131,7 +136,7 @@ func BACnetAuthenticationFactorParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("formatType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for formatType") } - _formatType, _formatTypeErr := BACnetAuthenticationFactorTypeTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_formatType, _formatTypeErr := BACnetAuthenticationFactorTypeTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _formatTypeErr != nil { return nil, errors.Wrap(_formatTypeErr, "Error parsing 'formatType' field of BACnetAuthenticationFactor") } @@ -144,7 +149,7 @@ func BACnetAuthenticationFactorParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("formatClass"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for formatClass") } - _formatClass, _formatClassErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_formatClass, _formatClassErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _formatClassErr != nil { return nil, errors.Wrap(_formatClassErr, "Error parsing 'formatClass' field of BACnetAuthenticationFactor") } @@ -157,7 +162,7 @@ func BACnetAuthenticationFactorParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("value"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for value") } - _value, _valueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), BACnetDataType(BACnetDataType_OCTET_STRING)) +_value, _valueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , BACnetDataType( BACnetDataType_OCTET_STRING ) ) if _valueErr != nil { return nil, errors.Wrap(_valueErr, "Error parsing 'value' field of BACnetAuthenticationFactor") } @@ -172,10 +177,10 @@ func BACnetAuthenticationFactorParseWithBuffer(ctx context.Context, readBuffer u // Create the instance return &_BACnetAuthenticationFactor{ - FormatType: formatType, - FormatClass: formatClass, - Value: value, - }, nil + FormatType: formatType, + FormatClass: formatClass, + Value: value, + }, nil } func (m *_BACnetAuthenticationFactor) Serialize() ([]byte, error) { @@ -189,7 +194,7 @@ func (m *_BACnetAuthenticationFactor) Serialize() ([]byte, error) { func (m *_BACnetAuthenticationFactor) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetAuthenticationFactor"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetAuthenticationFactor"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetAuthenticationFactor") } @@ -235,6 +240,7 @@ func (m *_BACnetAuthenticationFactor) SerializeWithWriteBuffer(ctx context.Conte return nil } + func (m *_BACnetAuthenticationFactor) isBACnetAuthenticationFactor() bool { return true } @@ -249,3 +255,6 @@ func (m *_BACnetAuthenticationFactor) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthenticationFactorEnclosed.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthenticationFactorEnclosed.go index 4f37330a48a..a705f6f25bb 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthenticationFactorEnclosed.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthenticationFactorEnclosed.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetAuthenticationFactorEnclosed is the corresponding interface of BACnetAuthenticationFactorEnclosed type BACnetAuthenticationFactorEnclosed interface { @@ -48,14 +50,15 @@ type BACnetAuthenticationFactorEnclosedExactly interface { // _BACnetAuthenticationFactorEnclosed is the data-structure of this message type _BACnetAuthenticationFactorEnclosed struct { - OpeningTag BACnetOpeningTag - AuthenticationFactor BACnetAuthenticationFactor - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + AuthenticationFactor BACnetAuthenticationFactor + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -78,14 +81,15 @@ func (m *_BACnetAuthenticationFactorEnclosed) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetAuthenticationFactorEnclosed factory function for _BACnetAuthenticationFactorEnclosed -func NewBACnetAuthenticationFactorEnclosed(openingTag BACnetOpeningTag, authenticationFactor BACnetAuthenticationFactor, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetAuthenticationFactorEnclosed { - return &_BACnetAuthenticationFactorEnclosed{OpeningTag: openingTag, AuthenticationFactor: authenticationFactor, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetAuthenticationFactorEnclosed( openingTag BACnetOpeningTag , authenticationFactor BACnetAuthenticationFactor , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetAuthenticationFactorEnclosed { +return &_BACnetAuthenticationFactorEnclosed{ OpeningTag: openingTag , AuthenticationFactor: authenticationFactor , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetAuthenticationFactorEnclosed(structType interface{}) BACnetAuthenticationFactorEnclosed { - if casted, ok := structType.(BACnetAuthenticationFactorEnclosed); ok { + if casted, ok := structType.(BACnetAuthenticationFactorEnclosed); ok { return casted } if casted, ok := structType.(*BACnetAuthenticationFactorEnclosed); ok { @@ -113,6 +117,7 @@ func (m *_BACnetAuthenticationFactorEnclosed) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetAuthenticationFactorEnclosed) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -134,7 +139,7 @@ func BACnetAuthenticationFactorEnclosedParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetAuthenticationFactorEnclosed") } @@ -147,7 +152,7 @@ func BACnetAuthenticationFactorEnclosedParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("authenticationFactor"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for authenticationFactor") } - _authenticationFactor, _authenticationFactorErr := BACnetAuthenticationFactorParseWithBuffer(ctx, readBuffer) +_authenticationFactor, _authenticationFactorErr := BACnetAuthenticationFactorParseWithBuffer(ctx, readBuffer) if _authenticationFactorErr != nil { return nil, errors.Wrap(_authenticationFactorErr, "Error parsing 'authenticationFactor' field of BACnetAuthenticationFactorEnclosed") } @@ -160,7 +165,7 @@ func BACnetAuthenticationFactorEnclosedParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetAuthenticationFactorEnclosed") } @@ -175,11 +180,11 @@ func BACnetAuthenticationFactorEnclosedParseWithBuffer(ctx context.Context, read // Create the instance return &_BACnetAuthenticationFactorEnclosed{ - TagNumber: tagNumber, - OpeningTag: openingTag, - AuthenticationFactor: authenticationFactor, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + AuthenticationFactor: authenticationFactor, + ClosingTag: closingTag, + }, nil } func (m *_BACnetAuthenticationFactorEnclosed) Serialize() ([]byte, error) { @@ -193,7 +198,7 @@ func (m *_BACnetAuthenticationFactorEnclosed) Serialize() ([]byte, error) { func (m *_BACnetAuthenticationFactorEnclosed) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetAuthenticationFactorEnclosed"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetAuthenticationFactorEnclosed"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetAuthenticationFactorEnclosed") } @@ -239,13 +244,13 @@ func (m *_BACnetAuthenticationFactorEnclosed) SerializeWithWriteBuffer(ctx conte return nil } + //// // Arguments Getter func (m *_BACnetAuthenticationFactorEnclosed) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -263,3 +268,6 @@ func (m *_BACnetAuthenticationFactorEnclosed) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthenticationFactorFormat.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthenticationFactorFormat.go index 5664c4d2d5c..4e58fc5dc3a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthenticationFactorFormat.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthenticationFactorFormat.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetAuthenticationFactorFormat is the corresponding interface of BACnetAuthenticationFactorFormat type BACnetAuthenticationFactorFormat interface { @@ -49,11 +51,12 @@ type BACnetAuthenticationFactorFormatExactly interface { // _BACnetAuthenticationFactorFormat is the data-structure of this message type _BACnetAuthenticationFactorFormat struct { - FormatType BACnetAuthenticationFactorTypeTagged - VendorId BACnetVendorIdTagged - VendorFormat BACnetContextTagUnsignedInteger + FormatType BACnetAuthenticationFactorTypeTagged + VendorId BACnetVendorIdTagged + VendorFormat BACnetContextTagUnsignedInteger } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -76,14 +79,15 @@ func (m *_BACnetAuthenticationFactorFormat) GetVendorFormat() BACnetContextTagUn /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetAuthenticationFactorFormat factory function for _BACnetAuthenticationFactorFormat -func NewBACnetAuthenticationFactorFormat(formatType BACnetAuthenticationFactorTypeTagged, vendorId BACnetVendorIdTagged, vendorFormat BACnetContextTagUnsignedInteger) *_BACnetAuthenticationFactorFormat { - return &_BACnetAuthenticationFactorFormat{FormatType: formatType, VendorId: vendorId, VendorFormat: vendorFormat} +func NewBACnetAuthenticationFactorFormat( formatType BACnetAuthenticationFactorTypeTagged , vendorId BACnetVendorIdTagged , vendorFormat BACnetContextTagUnsignedInteger ) *_BACnetAuthenticationFactorFormat { +return &_BACnetAuthenticationFactorFormat{ FormatType: formatType , VendorId: vendorId , VendorFormat: vendorFormat } } // Deprecated: use the interface for direct cast func CastBACnetAuthenticationFactorFormat(structType interface{}) BACnetAuthenticationFactorFormat { - if casted, ok := structType.(BACnetAuthenticationFactorFormat); ok { + if casted, ok := structType.(BACnetAuthenticationFactorFormat); ok { return casted } if casted, ok := structType.(*BACnetAuthenticationFactorFormat); ok { @@ -115,6 +119,7 @@ func (m *_BACnetAuthenticationFactorFormat) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetAuthenticationFactorFormat) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +141,7 @@ func BACnetAuthenticationFactorFormatParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("formatType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for formatType") } - _formatType, _formatTypeErr := BACnetAuthenticationFactorTypeTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_formatType, _formatTypeErr := BACnetAuthenticationFactorTypeTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _formatTypeErr != nil { return nil, errors.Wrap(_formatTypeErr, "Error parsing 'formatType' field of BACnetAuthenticationFactorFormat") } @@ -147,12 +152,12 @@ func BACnetAuthenticationFactorFormatParseWithBuffer(ctx context.Context, readBu // Optional Field (vendorId) (Can be skipped, if a given expression evaluates to false) var vendorId BACnetVendorIdTagged = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("vendorId"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for vendorId") } - _val, _err := BACnetVendorIdTaggedParseWithBuffer(ctx, readBuffer, uint8(1), TagClass_CONTEXT_SPECIFIC_TAGS) +_val, _err := BACnetVendorIdTaggedParseWithBuffer(ctx, readBuffer , uint8(1) , TagClass_CONTEXT_SPECIFIC_TAGS ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -169,12 +174,12 @@ func BACnetAuthenticationFactorFormatParseWithBuffer(ctx context.Context, readBu // Optional Field (vendorFormat) (Can be skipped, if a given expression evaluates to false) var vendorFormat BACnetContextTagUnsignedInteger = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("vendorFormat"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for vendorFormat") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(2), BACnetDataType_UNSIGNED_INTEGER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(2) , BACnetDataType_UNSIGNED_INTEGER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -195,10 +200,10 @@ func BACnetAuthenticationFactorFormatParseWithBuffer(ctx context.Context, readBu // Create the instance return &_BACnetAuthenticationFactorFormat{ - FormatType: formatType, - VendorId: vendorId, - VendorFormat: vendorFormat, - }, nil + FormatType: formatType, + VendorId: vendorId, + VendorFormat: vendorFormat, + }, nil } func (m *_BACnetAuthenticationFactorFormat) Serialize() ([]byte, error) { @@ -212,7 +217,7 @@ func (m *_BACnetAuthenticationFactorFormat) Serialize() ([]byte, error) { func (m *_BACnetAuthenticationFactorFormat) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetAuthenticationFactorFormat"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetAuthenticationFactorFormat"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetAuthenticationFactorFormat") } @@ -266,6 +271,7 @@ func (m *_BACnetAuthenticationFactorFormat) SerializeWithWriteBuffer(ctx context return nil } + func (m *_BACnetAuthenticationFactorFormat) isBACnetAuthenticationFactorFormat() bool { return true } @@ -280,3 +286,6 @@ func (m *_BACnetAuthenticationFactorFormat) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthenticationFactorType.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthenticationFactorType.go index 5a738f46900..bd06f937ce1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthenticationFactorType.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthenticationFactorType.go @@ -34,39 +34,39 @@ type IBACnetAuthenticationFactorType interface { utils.Serializable } -const ( - BACnetAuthenticationFactorType_UNDEFINED BACnetAuthenticationFactorType = 0 - BACnetAuthenticationFactorType_ERROR BACnetAuthenticationFactorType = 1 - BACnetAuthenticationFactorType_CUSTOM BACnetAuthenticationFactorType = 2 - BACnetAuthenticationFactorType_SIMPLE_NUMBER16 BACnetAuthenticationFactorType = 3 - BACnetAuthenticationFactorType_SIMPLE_NUMBER32 BACnetAuthenticationFactorType = 4 - BACnetAuthenticationFactorType_SIMPLE_NUMBER56 BACnetAuthenticationFactorType = 5 +const( + BACnetAuthenticationFactorType_UNDEFINED BACnetAuthenticationFactorType = 0 + BACnetAuthenticationFactorType_ERROR BACnetAuthenticationFactorType = 1 + BACnetAuthenticationFactorType_CUSTOM BACnetAuthenticationFactorType = 2 + BACnetAuthenticationFactorType_SIMPLE_NUMBER16 BACnetAuthenticationFactorType = 3 + BACnetAuthenticationFactorType_SIMPLE_NUMBER32 BACnetAuthenticationFactorType = 4 + BACnetAuthenticationFactorType_SIMPLE_NUMBER56 BACnetAuthenticationFactorType = 5 BACnetAuthenticationFactorType_SIMPLE_ALPHA_NUMERIC BACnetAuthenticationFactorType = 6 - BACnetAuthenticationFactorType_ABA_TRACK2 BACnetAuthenticationFactorType = 7 - BACnetAuthenticationFactorType_WIEGAND26 BACnetAuthenticationFactorType = 8 - BACnetAuthenticationFactorType_WIEGAND37 BACnetAuthenticationFactorType = 9 - BACnetAuthenticationFactorType_WIEGAND37_FACILITY BACnetAuthenticationFactorType = 10 - BACnetAuthenticationFactorType_FACILITY16_CARD32 BACnetAuthenticationFactorType = 11 - BACnetAuthenticationFactorType_FACILITY32_CARD32 BACnetAuthenticationFactorType = 12 - BACnetAuthenticationFactorType_FASC_N BACnetAuthenticationFactorType = 13 - BACnetAuthenticationFactorType_FASC_N_BCD BACnetAuthenticationFactorType = 14 - BACnetAuthenticationFactorType_FASC_N_LARGE BACnetAuthenticationFactorType = 15 - BACnetAuthenticationFactorType_FASC_N_LARGE_BCD BACnetAuthenticationFactorType = 16 - BACnetAuthenticationFactorType_GSA75 BACnetAuthenticationFactorType = 17 - BACnetAuthenticationFactorType_CHUID BACnetAuthenticationFactorType = 18 - BACnetAuthenticationFactorType_CHUID_FULL BACnetAuthenticationFactorType = 19 - BACnetAuthenticationFactorType_GUID BACnetAuthenticationFactorType = 20 - BACnetAuthenticationFactorType_CBEFF_A BACnetAuthenticationFactorType = 21 - BACnetAuthenticationFactorType_CBEFF_B BACnetAuthenticationFactorType = 22 - BACnetAuthenticationFactorType_CBEFF_C BACnetAuthenticationFactorType = 23 - BACnetAuthenticationFactorType_USER_PASSWORD BACnetAuthenticationFactorType = 24 + BACnetAuthenticationFactorType_ABA_TRACK2 BACnetAuthenticationFactorType = 7 + BACnetAuthenticationFactorType_WIEGAND26 BACnetAuthenticationFactorType = 8 + BACnetAuthenticationFactorType_WIEGAND37 BACnetAuthenticationFactorType = 9 + BACnetAuthenticationFactorType_WIEGAND37_FACILITY BACnetAuthenticationFactorType = 10 + BACnetAuthenticationFactorType_FACILITY16_CARD32 BACnetAuthenticationFactorType = 11 + BACnetAuthenticationFactorType_FACILITY32_CARD32 BACnetAuthenticationFactorType = 12 + BACnetAuthenticationFactorType_FASC_N BACnetAuthenticationFactorType = 13 + BACnetAuthenticationFactorType_FASC_N_BCD BACnetAuthenticationFactorType = 14 + BACnetAuthenticationFactorType_FASC_N_LARGE BACnetAuthenticationFactorType = 15 + BACnetAuthenticationFactorType_FASC_N_LARGE_BCD BACnetAuthenticationFactorType = 16 + BACnetAuthenticationFactorType_GSA75 BACnetAuthenticationFactorType = 17 + BACnetAuthenticationFactorType_CHUID BACnetAuthenticationFactorType = 18 + BACnetAuthenticationFactorType_CHUID_FULL BACnetAuthenticationFactorType = 19 + BACnetAuthenticationFactorType_GUID BACnetAuthenticationFactorType = 20 + BACnetAuthenticationFactorType_CBEFF_A BACnetAuthenticationFactorType = 21 + BACnetAuthenticationFactorType_CBEFF_B BACnetAuthenticationFactorType = 22 + BACnetAuthenticationFactorType_CBEFF_C BACnetAuthenticationFactorType = 23 + BACnetAuthenticationFactorType_USER_PASSWORD BACnetAuthenticationFactorType = 24 ) var BACnetAuthenticationFactorTypeValues []BACnetAuthenticationFactorType func init() { _ = errors.New - BACnetAuthenticationFactorTypeValues = []BACnetAuthenticationFactorType{ + BACnetAuthenticationFactorTypeValues = []BACnetAuthenticationFactorType { BACnetAuthenticationFactorType_UNDEFINED, BACnetAuthenticationFactorType_ERROR, BACnetAuthenticationFactorType_CUSTOM, @@ -97,56 +97,56 @@ func init() { func BACnetAuthenticationFactorTypeByValue(value uint8) (enum BACnetAuthenticationFactorType, ok bool) { switch value { - case 0: - return BACnetAuthenticationFactorType_UNDEFINED, true - case 1: - return BACnetAuthenticationFactorType_ERROR, true - case 10: - return BACnetAuthenticationFactorType_WIEGAND37_FACILITY, true - case 11: - return BACnetAuthenticationFactorType_FACILITY16_CARD32, true - case 12: - return BACnetAuthenticationFactorType_FACILITY32_CARD32, true - case 13: - return BACnetAuthenticationFactorType_FASC_N, true - case 14: - return BACnetAuthenticationFactorType_FASC_N_BCD, true - case 15: - return BACnetAuthenticationFactorType_FASC_N_LARGE, true - case 16: - return BACnetAuthenticationFactorType_FASC_N_LARGE_BCD, true - case 17: - return BACnetAuthenticationFactorType_GSA75, true - case 18: - return BACnetAuthenticationFactorType_CHUID, true - case 19: - return BACnetAuthenticationFactorType_CHUID_FULL, true - case 2: - return BACnetAuthenticationFactorType_CUSTOM, true - case 20: - return BACnetAuthenticationFactorType_GUID, true - case 21: - return BACnetAuthenticationFactorType_CBEFF_A, true - case 22: - return BACnetAuthenticationFactorType_CBEFF_B, true - case 23: - return BACnetAuthenticationFactorType_CBEFF_C, true - case 24: - return BACnetAuthenticationFactorType_USER_PASSWORD, true - case 3: - return BACnetAuthenticationFactorType_SIMPLE_NUMBER16, true - case 4: - return BACnetAuthenticationFactorType_SIMPLE_NUMBER32, true - case 5: - return BACnetAuthenticationFactorType_SIMPLE_NUMBER56, true - case 6: - return BACnetAuthenticationFactorType_SIMPLE_ALPHA_NUMERIC, true - case 7: - return BACnetAuthenticationFactorType_ABA_TRACK2, true - case 8: - return BACnetAuthenticationFactorType_WIEGAND26, true - case 9: - return BACnetAuthenticationFactorType_WIEGAND37, true + case 0: + return BACnetAuthenticationFactorType_UNDEFINED, true + case 1: + return BACnetAuthenticationFactorType_ERROR, true + case 10: + return BACnetAuthenticationFactorType_WIEGAND37_FACILITY, true + case 11: + return BACnetAuthenticationFactorType_FACILITY16_CARD32, true + case 12: + return BACnetAuthenticationFactorType_FACILITY32_CARD32, true + case 13: + return BACnetAuthenticationFactorType_FASC_N, true + case 14: + return BACnetAuthenticationFactorType_FASC_N_BCD, true + case 15: + return BACnetAuthenticationFactorType_FASC_N_LARGE, true + case 16: + return BACnetAuthenticationFactorType_FASC_N_LARGE_BCD, true + case 17: + return BACnetAuthenticationFactorType_GSA75, true + case 18: + return BACnetAuthenticationFactorType_CHUID, true + case 19: + return BACnetAuthenticationFactorType_CHUID_FULL, true + case 2: + return BACnetAuthenticationFactorType_CUSTOM, true + case 20: + return BACnetAuthenticationFactorType_GUID, true + case 21: + return BACnetAuthenticationFactorType_CBEFF_A, true + case 22: + return BACnetAuthenticationFactorType_CBEFF_B, true + case 23: + return BACnetAuthenticationFactorType_CBEFF_C, true + case 24: + return BACnetAuthenticationFactorType_USER_PASSWORD, true + case 3: + return BACnetAuthenticationFactorType_SIMPLE_NUMBER16, true + case 4: + return BACnetAuthenticationFactorType_SIMPLE_NUMBER32, true + case 5: + return BACnetAuthenticationFactorType_SIMPLE_NUMBER56, true + case 6: + return BACnetAuthenticationFactorType_SIMPLE_ALPHA_NUMERIC, true + case 7: + return BACnetAuthenticationFactorType_ABA_TRACK2, true + case 8: + return BACnetAuthenticationFactorType_WIEGAND26, true + case 9: + return BACnetAuthenticationFactorType_WIEGAND37, true } return 0, false } @@ -207,13 +207,13 @@ func BACnetAuthenticationFactorTypeByName(value string) (enum BACnetAuthenticati return 0, false } -func BACnetAuthenticationFactorTypeKnows(value uint8) bool { +func BACnetAuthenticationFactorTypeKnows(value uint8) bool { for _, typeValue := range BACnetAuthenticationFactorTypeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetAuthenticationFactorType(structType interface{}) BACnetAuthenticationFactorType { @@ -323,3 +323,4 @@ func (e BACnetAuthenticationFactorType) PLC4XEnumName() string { func (e BACnetAuthenticationFactorType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthenticationFactorTypeTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthenticationFactorTypeTagged.go index 13264daa5f7..0e60d171624 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthenticationFactorTypeTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthenticationFactorTypeTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetAuthenticationFactorTypeTagged is the corresponding interface of BACnetAuthenticationFactorTypeTagged type BACnetAuthenticationFactorTypeTagged interface { @@ -46,14 +48,15 @@ type BACnetAuthenticationFactorTypeTaggedExactly interface { // _BACnetAuthenticationFactorTypeTagged is the data-structure of this message type _BACnetAuthenticationFactorTypeTagged struct { - Header BACnetTagHeader - Value BACnetAuthenticationFactorType + Header BACnetTagHeader + Value BACnetAuthenticationFactorType // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_BACnetAuthenticationFactorTypeTagged) GetValue() BACnetAuthenticationF /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetAuthenticationFactorTypeTagged factory function for _BACnetAuthenticationFactorTypeTagged -func NewBACnetAuthenticationFactorTypeTagged(header BACnetTagHeader, value BACnetAuthenticationFactorType, tagNumber uint8, tagClass TagClass) *_BACnetAuthenticationFactorTypeTagged { - return &_BACnetAuthenticationFactorTypeTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetAuthenticationFactorTypeTagged( header BACnetTagHeader , value BACnetAuthenticationFactorType , tagNumber uint8 , tagClass TagClass ) *_BACnetAuthenticationFactorTypeTagged { +return &_BACnetAuthenticationFactorTypeTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetAuthenticationFactorTypeTagged(structType interface{}) BACnetAuthenticationFactorTypeTagged { - if casted, ok := structType.(BACnetAuthenticationFactorTypeTagged); ok { + if casted, ok := structType.(BACnetAuthenticationFactorTypeTagged); ok { return casted } if casted, ok := structType.(*BACnetAuthenticationFactorTypeTagged); ok { @@ -104,6 +108,7 @@ func (m *_BACnetAuthenticationFactorTypeTagged) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetAuthenticationFactorTypeTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func BACnetAuthenticationFactorTypeTaggedParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetAuthenticationFactorTypeTagged") } @@ -135,12 +140,12 @@ func BACnetAuthenticationFactorTypeTaggedParseWithBuffer(ctx context.Context, re } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func BACnetAuthenticationFactorTypeTaggedParseWithBuffer(ctx context.Context, re } var value BACnetAuthenticationFactorType if _value != nil { - value = _value.(BACnetAuthenticationFactorType) + value = _value.(BACnetAuthenticationFactorType) } if closeErr := readBuffer.CloseContext("BACnetAuthenticationFactorTypeTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func BACnetAuthenticationFactorTypeTaggedParseWithBuffer(ctx context.Context, re // Create the instance return &_BACnetAuthenticationFactorTypeTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_BACnetAuthenticationFactorTypeTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_BACnetAuthenticationFactorTypeTagged) Serialize() ([]byte, error) { func (m *_BACnetAuthenticationFactorTypeTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetAuthenticationFactorTypeTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetAuthenticationFactorTypeTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetAuthenticationFactorTypeTagged") } @@ -206,6 +211,7 @@ func (m *_BACnetAuthenticationFactorTypeTagged) SerializeWithWriteBuffer(ctx con return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_BACnetAuthenticationFactorTypeTagged) GetTagNumber() uint8 { func (m *_BACnetAuthenticationFactorTypeTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_BACnetAuthenticationFactorTypeTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthenticationPolicy.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthenticationPolicy.go index ee40c225871..bbc741b9a81 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthenticationPolicy.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthenticationPolicy.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetAuthenticationPolicy is the corresponding interface of BACnetAuthenticationPolicy type BACnetAuthenticationPolicy interface { @@ -48,11 +50,12 @@ type BACnetAuthenticationPolicyExactly interface { // _BACnetAuthenticationPolicy is the data-structure of this message type _BACnetAuthenticationPolicy struct { - Policy BACnetAuthenticationPolicyList - OrderEnforced BACnetContextTagBoolean - Timeout BACnetContextTagUnsignedInteger + Policy BACnetAuthenticationPolicyList + OrderEnforced BACnetContextTagBoolean + Timeout BACnetContextTagUnsignedInteger } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -75,14 +78,15 @@ func (m *_BACnetAuthenticationPolicy) GetTimeout() BACnetContextTagUnsignedInteg /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetAuthenticationPolicy factory function for _BACnetAuthenticationPolicy -func NewBACnetAuthenticationPolicy(policy BACnetAuthenticationPolicyList, orderEnforced BACnetContextTagBoolean, timeout BACnetContextTagUnsignedInteger) *_BACnetAuthenticationPolicy { - return &_BACnetAuthenticationPolicy{Policy: policy, OrderEnforced: orderEnforced, Timeout: timeout} +func NewBACnetAuthenticationPolicy( policy BACnetAuthenticationPolicyList , orderEnforced BACnetContextTagBoolean , timeout BACnetContextTagUnsignedInteger ) *_BACnetAuthenticationPolicy { +return &_BACnetAuthenticationPolicy{ Policy: policy , OrderEnforced: orderEnforced , Timeout: timeout } } // Deprecated: use the interface for direct cast func CastBACnetAuthenticationPolicy(structType interface{}) BACnetAuthenticationPolicy { - if casted, ok := structType.(BACnetAuthenticationPolicy); ok { + if casted, ok := structType.(BACnetAuthenticationPolicy); ok { return casted } if casted, ok := structType.(*BACnetAuthenticationPolicy); ok { @@ -110,6 +114,7 @@ func (m *_BACnetAuthenticationPolicy) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_BACnetAuthenticationPolicy) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -131,7 +136,7 @@ func BACnetAuthenticationPolicyParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("policy"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for policy") } - _policy, _policyErr := BACnetAuthenticationPolicyListParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_policy, _policyErr := BACnetAuthenticationPolicyListParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _policyErr != nil { return nil, errors.Wrap(_policyErr, "Error parsing 'policy' field of BACnetAuthenticationPolicy") } @@ -144,7 +149,7 @@ func BACnetAuthenticationPolicyParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("orderEnforced"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for orderEnforced") } - _orderEnforced, _orderEnforcedErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_BOOLEAN)) +_orderEnforced, _orderEnforcedErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_BOOLEAN ) ) if _orderEnforcedErr != nil { return nil, errors.Wrap(_orderEnforcedErr, "Error parsing 'orderEnforced' field of BACnetAuthenticationPolicy") } @@ -157,7 +162,7 @@ func BACnetAuthenticationPolicyParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("timeout"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeout") } - _timeout, _timeoutErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_timeout, _timeoutErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _timeoutErr != nil { return nil, errors.Wrap(_timeoutErr, "Error parsing 'timeout' field of BACnetAuthenticationPolicy") } @@ -172,10 +177,10 @@ func BACnetAuthenticationPolicyParseWithBuffer(ctx context.Context, readBuffer u // Create the instance return &_BACnetAuthenticationPolicy{ - Policy: policy, - OrderEnforced: orderEnforced, - Timeout: timeout, - }, nil + Policy: policy, + OrderEnforced: orderEnforced, + Timeout: timeout, + }, nil } func (m *_BACnetAuthenticationPolicy) Serialize() ([]byte, error) { @@ -189,7 +194,7 @@ func (m *_BACnetAuthenticationPolicy) Serialize() ([]byte, error) { func (m *_BACnetAuthenticationPolicy) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetAuthenticationPolicy"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetAuthenticationPolicy"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetAuthenticationPolicy") } @@ -235,6 +240,7 @@ func (m *_BACnetAuthenticationPolicy) SerializeWithWriteBuffer(ctx context.Conte return nil } + func (m *_BACnetAuthenticationPolicy) isBACnetAuthenticationPolicy() bool { return true } @@ -249,3 +255,6 @@ func (m *_BACnetAuthenticationPolicy) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthenticationPolicyList.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthenticationPolicyList.go index 90314b6175f..494bee11c41 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthenticationPolicyList.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthenticationPolicyList.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetAuthenticationPolicyList is the corresponding interface of BACnetAuthenticationPolicyList type BACnetAuthenticationPolicyList interface { @@ -49,14 +51,15 @@ type BACnetAuthenticationPolicyListExactly interface { // _BACnetAuthenticationPolicyList is the data-structure of this message type _BACnetAuthenticationPolicyList struct { - OpeningTag BACnetOpeningTag - Entries []BACnetAuthenticationPolicyListEntry - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + Entries []BACnetAuthenticationPolicyListEntry + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -79,14 +82,15 @@ func (m *_BACnetAuthenticationPolicyList) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetAuthenticationPolicyList factory function for _BACnetAuthenticationPolicyList -func NewBACnetAuthenticationPolicyList(openingTag BACnetOpeningTag, entries []BACnetAuthenticationPolicyListEntry, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetAuthenticationPolicyList { - return &_BACnetAuthenticationPolicyList{OpeningTag: openingTag, Entries: entries, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetAuthenticationPolicyList( openingTag BACnetOpeningTag , entries []BACnetAuthenticationPolicyListEntry , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetAuthenticationPolicyList { +return &_BACnetAuthenticationPolicyList{ OpeningTag: openingTag , Entries: entries , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetAuthenticationPolicyList(structType interface{}) BACnetAuthenticationPolicyList { - if casted, ok := structType.(BACnetAuthenticationPolicyList); ok { + if casted, ok := structType.(BACnetAuthenticationPolicyList); ok { return casted } if casted, ok := structType.(*BACnetAuthenticationPolicyList); ok { @@ -118,6 +122,7 @@ func (m *_BACnetAuthenticationPolicyList) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetAuthenticationPolicyList) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +144,7 @@ func BACnetAuthenticationPolicyListParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetAuthenticationPolicyList") } @@ -155,8 +160,8 @@ func BACnetAuthenticationPolicyListParseWithBuffer(ctx context.Context, readBuff // Terminated array var entries []BACnetAuthenticationPolicyListEntry { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetAuthenticationPolicyListEntryParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetAuthenticationPolicyListEntryParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'entries' field of BACnetAuthenticationPolicyList") } @@ -171,7 +176,7 @@ func BACnetAuthenticationPolicyListParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetAuthenticationPolicyList") } @@ -186,11 +191,11 @@ func BACnetAuthenticationPolicyListParseWithBuffer(ctx context.Context, readBuff // Create the instance return &_BACnetAuthenticationPolicyList{ - TagNumber: tagNumber, - OpeningTag: openingTag, - Entries: entries, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + Entries: entries, + ClosingTag: closingTag, + }, nil } func (m *_BACnetAuthenticationPolicyList) Serialize() ([]byte, error) { @@ -204,7 +209,7 @@ func (m *_BACnetAuthenticationPolicyList) Serialize() ([]byte, error) { func (m *_BACnetAuthenticationPolicyList) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetAuthenticationPolicyList"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetAuthenticationPolicyList"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetAuthenticationPolicyList") } @@ -255,13 +260,13 @@ func (m *_BACnetAuthenticationPolicyList) SerializeWithWriteBuffer(ctx context.C return nil } + //// // Arguments Getter func (m *_BACnetAuthenticationPolicyList) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -279,3 +284,6 @@ func (m *_BACnetAuthenticationPolicyList) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthenticationPolicyListEntry.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthenticationPolicyListEntry.go index 81a0a4e93cf..2861ca862bd 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthenticationPolicyListEntry.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthenticationPolicyListEntry.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetAuthenticationPolicyListEntry is the corresponding interface of BACnetAuthenticationPolicyListEntry type BACnetAuthenticationPolicyListEntry interface { @@ -46,10 +48,11 @@ type BACnetAuthenticationPolicyListEntryExactly interface { // _BACnetAuthenticationPolicyListEntry is the data-structure of this message type _BACnetAuthenticationPolicyListEntry struct { - CredentialDataInput BACnetDeviceObjectReferenceEnclosed - Index BACnetContextTagUnsignedInteger + CredentialDataInput BACnetDeviceObjectReferenceEnclosed + Index BACnetContextTagUnsignedInteger } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -68,14 +71,15 @@ func (m *_BACnetAuthenticationPolicyListEntry) GetIndex() BACnetContextTagUnsign /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetAuthenticationPolicyListEntry factory function for _BACnetAuthenticationPolicyListEntry -func NewBACnetAuthenticationPolicyListEntry(credentialDataInput BACnetDeviceObjectReferenceEnclosed, index BACnetContextTagUnsignedInteger) *_BACnetAuthenticationPolicyListEntry { - return &_BACnetAuthenticationPolicyListEntry{CredentialDataInput: credentialDataInput, Index: index} +func NewBACnetAuthenticationPolicyListEntry( credentialDataInput BACnetDeviceObjectReferenceEnclosed , index BACnetContextTagUnsignedInteger ) *_BACnetAuthenticationPolicyListEntry { +return &_BACnetAuthenticationPolicyListEntry{ CredentialDataInput: credentialDataInput , Index: index } } // Deprecated: use the interface for direct cast func CastBACnetAuthenticationPolicyListEntry(structType interface{}) BACnetAuthenticationPolicyListEntry { - if casted, ok := structType.(BACnetAuthenticationPolicyListEntry); ok { + if casted, ok := structType.(BACnetAuthenticationPolicyListEntry); ok { return casted } if casted, ok := structType.(*BACnetAuthenticationPolicyListEntry); ok { @@ -100,6 +104,7 @@ func (m *_BACnetAuthenticationPolicyListEntry) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetAuthenticationPolicyListEntry) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -121,7 +126,7 @@ func BACnetAuthenticationPolicyListEntryParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("credentialDataInput"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for credentialDataInput") } - _credentialDataInput, _credentialDataInputErr := BACnetDeviceObjectReferenceEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_credentialDataInput, _credentialDataInputErr := BACnetDeviceObjectReferenceEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _credentialDataInputErr != nil { return nil, errors.Wrap(_credentialDataInputErr, "Error parsing 'credentialDataInput' field of BACnetAuthenticationPolicyListEntry") } @@ -134,7 +139,7 @@ func BACnetAuthenticationPolicyListEntryParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("index"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for index") } - _index, _indexErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_index, _indexErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _indexErr != nil { return nil, errors.Wrap(_indexErr, "Error parsing 'index' field of BACnetAuthenticationPolicyListEntry") } @@ -149,9 +154,9 @@ func BACnetAuthenticationPolicyListEntryParseWithBuffer(ctx context.Context, rea // Create the instance return &_BACnetAuthenticationPolicyListEntry{ - CredentialDataInput: credentialDataInput, - Index: index, - }, nil + CredentialDataInput: credentialDataInput, + Index: index, + }, nil } func (m *_BACnetAuthenticationPolicyListEntry) Serialize() ([]byte, error) { @@ -165,7 +170,7 @@ func (m *_BACnetAuthenticationPolicyListEntry) Serialize() ([]byte, error) { func (m *_BACnetAuthenticationPolicyListEntry) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetAuthenticationPolicyListEntry"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetAuthenticationPolicyListEntry"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetAuthenticationPolicyListEntry") } @@ -199,6 +204,7 @@ func (m *_BACnetAuthenticationPolicyListEntry) SerializeWithWriteBuffer(ctx cont return nil } + func (m *_BACnetAuthenticationPolicyListEntry) isBACnetAuthenticationPolicyListEntry() bool { return true } @@ -213,3 +219,6 @@ func (m *_BACnetAuthenticationPolicyListEntry) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthenticationStatus.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthenticationStatus.go index 4b04ebb616a..395782c155a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthenticationStatus.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthenticationStatus.go @@ -34,21 +34,21 @@ type IBACnetAuthenticationStatus interface { utils.Serializable } -const ( - BACnetAuthenticationStatus_NOT_READY BACnetAuthenticationStatus = 0 - BACnetAuthenticationStatus_READY BACnetAuthenticationStatus = 1 - BACnetAuthenticationStatus_DISABLED BACnetAuthenticationStatus = 2 +const( + BACnetAuthenticationStatus_NOT_READY BACnetAuthenticationStatus = 0 + BACnetAuthenticationStatus_READY BACnetAuthenticationStatus = 1 + BACnetAuthenticationStatus_DISABLED BACnetAuthenticationStatus = 2 BACnetAuthenticationStatus_WAITING_FOR_AUTHENTICATION_FACTOR BACnetAuthenticationStatus = 3 - BACnetAuthenticationStatus_WAITING_FOR_ACCOMPANIMENT BACnetAuthenticationStatus = 4 - BACnetAuthenticationStatus_WAITING_FOR_VERIFICATION BACnetAuthenticationStatus = 5 - BACnetAuthenticationStatus_IN_PROGRESS BACnetAuthenticationStatus = 6 + BACnetAuthenticationStatus_WAITING_FOR_ACCOMPANIMENT BACnetAuthenticationStatus = 4 + BACnetAuthenticationStatus_WAITING_FOR_VERIFICATION BACnetAuthenticationStatus = 5 + BACnetAuthenticationStatus_IN_PROGRESS BACnetAuthenticationStatus = 6 ) var BACnetAuthenticationStatusValues []BACnetAuthenticationStatus func init() { _ = errors.New - BACnetAuthenticationStatusValues = []BACnetAuthenticationStatus{ + BACnetAuthenticationStatusValues = []BACnetAuthenticationStatus { BACnetAuthenticationStatus_NOT_READY, BACnetAuthenticationStatus_READY, BACnetAuthenticationStatus_DISABLED, @@ -61,20 +61,20 @@ func init() { func BACnetAuthenticationStatusByValue(value uint8) (enum BACnetAuthenticationStatus, ok bool) { switch value { - case 0: - return BACnetAuthenticationStatus_NOT_READY, true - case 1: - return BACnetAuthenticationStatus_READY, true - case 2: - return BACnetAuthenticationStatus_DISABLED, true - case 3: - return BACnetAuthenticationStatus_WAITING_FOR_AUTHENTICATION_FACTOR, true - case 4: - return BACnetAuthenticationStatus_WAITING_FOR_ACCOMPANIMENT, true - case 5: - return BACnetAuthenticationStatus_WAITING_FOR_VERIFICATION, true - case 6: - return BACnetAuthenticationStatus_IN_PROGRESS, true + case 0: + return BACnetAuthenticationStatus_NOT_READY, true + case 1: + return BACnetAuthenticationStatus_READY, true + case 2: + return BACnetAuthenticationStatus_DISABLED, true + case 3: + return BACnetAuthenticationStatus_WAITING_FOR_AUTHENTICATION_FACTOR, true + case 4: + return BACnetAuthenticationStatus_WAITING_FOR_ACCOMPANIMENT, true + case 5: + return BACnetAuthenticationStatus_WAITING_FOR_VERIFICATION, true + case 6: + return BACnetAuthenticationStatus_IN_PROGRESS, true } return 0, false } @@ -99,13 +99,13 @@ func BACnetAuthenticationStatusByName(value string) (enum BACnetAuthenticationSt return 0, false } -func BACnetAuthenticationStatusKnows(value uint8) bool { +func BACnetAuthenticationStatusKnows(value uint8) bool { for _, typeValue := range BACnetAuthenticationStatusValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetAuthenticationStatus(structType interface{}) BACnetAuthenticationStatus { @@ -179,3 +179,4 @@ func (e BACnetAuthenticationStatus) PLC4XEnumName() string { func (e BACnetAuthenticationStatus) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthenticationStatusTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthenticationStatusTagged.go index 71ffa7a2493..b7b7f372b5e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthenticationStatusTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthenticationStatusTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetAuthenticationStatusTagged is the corresponding interface of BACnetAuthenticationStatusTagged type BACnetAuthenticationStatusTagged interface { @@ -46,14 +48,15 @@ type BACnetAuthenticationStatusTaggedExactly interface { // _BACnetAuthenticationStatusTagged is the data-structure of this message type _BACnetAuthenticationStatusTagged struct { - Header BACnetTagHeader - Value BACnetAuthenticationStatus + Header BACnetTagHeader + Value BACnetAuthenticationStatus // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_BACnetAuthenticationStatusTagged) GetValue() BACnetAuthenticationStatu /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetAuthenticationStatusTagged factory function for _BACnetAuthenticationStatusTagged -func NewBACnetAuthenticationStatusTagged(header BACnetTagHeader, value BACnetAuthenticationStatus, tagNumber uint8, tagClass TagClass) *_BACnetAuthenticationStatusTagged { - return &_BACnetAuthenticationStatusTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetAuthenticationStatusTagged( header BACnetTagHeader , value BACnetAuthenticationStatus , tagNumber uint8 , tagClass TagClass ) *_BACnetAuthenticationStatusTagged { +return &_BACnetAuthenticationStatusTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetAuthenticationStatusTagged(structType interface{}) BACnetAuthenticationStatusTagged { - if casted, ok := structType.(BACnetAuthenticationStatusTagged); ok { + if casted, ok := structType.(BACnetAuthenticationStatusTagged); ok { return casted } if casted, ok := structType.(*BACnetAuthenticationStatusTagged); ok { @@ -104,6 +108,7 @@ func (m *_BACnetAuthenticationStatusTagged) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetAuthenticationStatusTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func BACnetAuthenticationStatusTaggedParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetAuthenticationStatusTagged") } @@ -135,12 +140,12 @@ func BACnetAuthenticationStatusTaggedParseWithBuffer(ctx context.Context, readBu } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func BACnetAuthenticationStatusTaggedParseWithBuffer(ctx context.Context, readBu } var value BACnetAuthenticationStatus if _value != nil { - value = _value.(BACnetAuthenticationStatus) + value = _value.(BACnetAuthenticationStatus) } if closeErr := readBuffer.CloseContext("BACnetAuthenticationStatusTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func BACnetAuthenticationStatusTaggedParseWithBuffer(ctx context.Context, readBu // Create the instance return &_BACnetAuthenticationStatusTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_BACnetAuthenticationStatusTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_BACnetAuthenticationStatusTagged) Serialize() ([]byte, error) { func (m *_BACnetAuthenticationStatusTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetAuthenticationStatusTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetAuthenticationStatusTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetAuthenticationStatusTagged") } @@ -206,6 +211,7 @@ func (m *_BACnetAuthenticationStatusTagged) SerializeWithWriteBuffer(ctx context return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_BACnetAuthenticationStatusTagged) GetTagNumber() uint8 { func (m *_BACnetAuthenticationStatusTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_BACnetAuthenticationStatusTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthorizationExemption.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthorizationExemption.go index da8f979b8b4..b66120ebf56 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthorizationExemption.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthorizationExemption.go @@ -34,22 +34,22 @@ type IBACnetAuthorizationExemption interface { utils.Serializable } -const ( - BACnetAuthorizationExemption_PASSBACK BACnetAuthorizationExemption = 0 - BACnetAuthorizationExemption_OCCUPANCY_CHECK BACnetAuthorizationExemption = 1 - BACnetAuthorizationExemption_ACCESS_RIGHTS BACnetAuthorizationExemption = 2 - BACnetAuthorizationExemption_LOCKOUT BACnetAuthorizationExemption = 3 - BACnetAuthorizationExemption_DENY BACnetAuthorizationExemption = 4 - BACnetAuthorizationExemption_VERIFICATION BACnetAuthorizationExemption = 5 - BACnetAuthorizationExemption_AUTHORIZATION_DELAY BACnetAuthorizationExemption = 6 - BACnetAuthorizationExemption_VENDOR_PROPRIETARY_VALUE BACnetAuthorizationExemption = 0xFF +const( + BACnetAuthorizationExemption_PASSBACK BACnetAuthorizationExemption = 0 + BACnetAuthorizationExemption_OCCUPANCY_CHECK BACnetAuthorizationExemption = 1 + BACnetAuthorizationExemption_ACCESS_RIGHTS BACnetAuthorizationExemption = 2 + BACnetAuthorizationExemption_LOCKOUT BACnetAuthorizationExemption = 3 + BACnetAuthorizationExemption_DENY BACnetAuthorizationExemption = 4 + BACnetAuthorizationExemption_VERIFICATION BACnetAuthorizationExemption = 5 + BACnetAuthorizationExemption_AUTHORIZATION_DELAY BACnetAuthorizationExemption = 6 + BACnetAuthorizationExemption_VENDOR_PROPRIETARY_VALUE BACnetAuthorizationExemption = 0XFF ) var BACnetAuthorizationExemptionValues []BACnetAuthorizationExemption func init() { _ = errors.New - BACnetAuthorizationExemptionValues = []BACnetAuthorizationExemption{ + BACnetAuthorizationExemptionValues = []BACnetAuthorizationExemption { BACnetAuthorizationExemption_PASSBACK, BACnetAuthorizationExemption_OCCUPANCY_CHECK, BACnetAuthorizationExemption_ACCESS_RIGHTS, @@ -63,22 +63,22 @@ func init() { func BACnetAuthorizationExemptionByValue(value uint8) (enum BACnetAuthorizationExemption, ok bool) { switch value { - case 0: - return BACnetAuthorizationExemption_PASSBACK, true - case 0xFF: - return BACnetAuthorizationExemption_VENDOR_PROPRIETARY_VALUE, true - case 1: - return BACnetAuthorizationExemption_OCCUPANCY_CHECK, true - case 2: - return BACnetAuthorizationExemption_ACCESS_RIGHTS, true - case 3: - return BACnetAuthorizationExemption_LOCKOUT, true - case 4: - return BACnetAuthorizationExemption_DENY, true - case 5: - return BACnetAuthorizationExemption_VERIFICATION, true - case 6: - return BACnetAuthorizationExemption_AUTHORIZATION_DELAY, true + case 0: + return BACnetAuthorizationExemption_PASSBACK, true + case 0XFF: + return BACnetAuthorizationExemption_VENDOR_PROPRIETARY_VALUE, true + case 1: + return BACnetAuthorizationExemption_OCCUPANCY_CHECK, true + case 2: + return BACnetAuthorizationExemption_ACCESS_RIGHTS, true + case 3: + return BACnetAuthorizationExemption_LOCKOUT, true + case 4: + return BACnetAuthorizationExemption_DENY, true + case 5: + return BACnetAuthorizationExemption_VERIFICATION, true + case 6: + return BACnetAuthorizationExemption_AUTHORIZATION_DELAY, true } return 0, false } @@ -105,13 +105,13 @@ func BACnetAuthorizationExemptionByName(value string) (enum BACnetAuthorizationE return 0, false } -func BACnetAuthorizationExemptionKnows(value uint8) bool { +func BACnetAuthorizationExemptionKnows(value uint8) bool { for _, typeValue := range BACnetAuthorizationExemptionValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetAuthorizationExemption(structType interface{}) BACnetAuthorizationExemption { @@ -187,3 +187,4 @@ func (e BACnetAuthorizationExemption) PLC4XEnumName() string { func (e BACnetAuthorizationExemption) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthorizationExemptionTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthorizationExemptionTagged.go index 73873a8265f..a306f7ed92a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthorizationExemptionTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthorizationExemptionTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetAuthorizationExemptionTagged is the corresponding interface of BACnetAuthorizationExemptionTagged type BACnetAuthorizationExemptionTagged interface { @@ -50,15 +52,16 @@ type BACnetAuthorizationExemptionTaggedExactly interface { // _BACnetAuthorizationExemptionTagged is the data-structure of this message type _BACnetAuthorizationExemptionTagged struct { - Header BACnetTagHeader - Value BACnetAuthorizationExemption - ProprietaryValue uint32 + Header BACnetTagHeader + Value BACnetAuthorizationExemption + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_BACnetAuthorizationExemptionTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetAuthorizationExemptionTagged factory function for _BACnetAuthorizationExemptionTagged -func NewBACnetAuthorizationExemptionTagged(header BACnetTagHeader, value BACnetAuthorizationExemption, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_BACnetAuthorizationExemptionTagged { - return &_BACnetAuthorizationExemptionTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetAuthorizationExemptionTagged( header BACnetTagHeader , value BACnetAuthorizationExemption , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_BACnetAuthorizationExemptionTagged { +return &_BACnetAuthorizationExemptionTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetAuthorizationExemptionTagged(structType interface{}) BACnetAuthorizationExemptionTagged { - if casted, ok := structType.(BACnetAuthorizationExemptionTagged); ok { + if casted, ok := structType.(BACnetAuthorizationExemptionTagged); ok { return casted } if casted, ok := structType.(*BACnetAuthorizationExemptionTagged); ok { @@ -123,16 +127,17 @@ func (m *_BACnetAuthorizationExemptionTagged) GetLengthInBits(ctx context.Contex lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetAuthorizationExemptionTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetAuthorizationExemptionTaggedParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetAuthorizationExemptionTagged") } @@ -164,12 +169,12 @@ func BACnetAuthorizationExemptionTaggedParseWithBuffer(ctx context.Context, read } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func BACnetAuthorizationExemptionTaggedParseWithBuffer(ctx context.Context, read } var value BACnetAuthorizationExemption if _value != nil { - value = _value.(BACnetAuthorizationExemption) + value = _value.(BACnetAuthorizationExemption) } // Virtual field @@ -195,7 +200,7 @@ func BACnetAuthorizationExemptionTaggedParseWithBuffer(ctx context.Context, read } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetAuthorizationExemptionTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func BACnetAuthorizationExemptionTaggedParseWithBuffer(ctx context.Context, read // Create the instance return &_BACnetAuthorizationExemptionTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetAuthorizationExemptionTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_BACnetAuthorizationExemptionTagged) Serialize() ([]byte, error) { func (m *_BACnetAuthorizationExemptionTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetAuthorizationExemptionTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetAuthorizationExemptionTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetAuthorizationExemptionTagged") } @@ -261,6 +266,7 @@ func (m *_BACnetAuthorizationExemptionTagged) SerializeWithWriteBuffer(ctx conte return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_BACnetAuthorizationExemptionTagged) GetTagNumber() uint8 { func (m *_BACnetAuthorizationExemptionTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_BACnetAuthorizationExemptionTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthorizationMode.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthorizationMode.go index 43e0146799b..229359c20d3 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthorizationMode.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthorizationMode.go @@ -34,21 +34,21 @@ type IBACnetAuthorizationMode interface { utils.Serializable } -const ( - BACnetAuthorizationMode_AUTHORIZE BACnetAuthorizationMode = 0 - BACnetAuthorizationMode_GRANT_ACTIVE BACnetAuthorizationMode = 1 - BACnetAuthorizationMode_DENY_ALL BACnetAuthorizationMode = 2 - BACnetAuthorizationMode_VERIFICATION_REQUIRED BACnetAuthorizationMode = 3 - BACnetAuthorizationMode_AUTHORIZATION_DELAYED BACnetAuthorizationMode = 4 - BACnetAuthorizationMode_NONE BACnetAuthorizationMode = 5 - BACnetAuthorizationMode_VENDOR_PROPRIETARY_VALUE BACnetAuthorizationMode = 0xFFFF +const( + BACnetAuthorizationMode_AUTHORIZE BACnetAuthorizationMode = 0 + BACnetAuthorizationMode_GRANT_ACTIVE BACnetAuthorizationMode = 1 + BACnetAuthorizationMode_DENY_ALL BACnetAuthorizationMode = 2 + BACnetAuthorizationMode_VERIFICATION_REQUIRED BACnetAuthorizationMode = 3 + BACnetAuthorizationMode_AUTHORIZATION_DELAYED BACnetAuthorizationMode = 4 + BACnetAuthorizationMode_NONE BACnetAuthorizationMode = 5 + BACnetAuthorizationMode_VENDOR_PROPRIETARY_VALUE BACnetAuthorizationMode = 0XFFFF ) var BACnetAuthorizationModeValues []BACnetAuthorizationMode func init() { _ = errors.New - BACnetAuthorizationModeValues = []BACnetAuthorizationMode{ + BACnetAuthorizationModeValues = []BACnetAuthorizationMode { BACnetAuthorizationMode_AUTHORIZE, BACnetAuthorizationMode_GRANT_ACTIVE, BACnetAuthorizationMode_DENY_ALL, @@ -61,20 +61,20 @@ func init() { func BACnetAuthorizationModeByValue(value uint16) (enum BACnetAuthorizationMode, ok bool) { switch value { - case 0: - return BACnetAuthorizationMode_AUTHORIZE, true - case 0xFFFF: - return BACnetAuthorizationMode_VENDOR_PROPRIETARY_VALUE, true - case 1: - return BACnetAuthorizationMode_GRANT_ACTIVE, true - case 2: - return BACnetAuthorizationMode_DENY_ALL, true - case 3: - return BACnetAuthorizationMode_VERIFICATION_REQUIRED, true - case 4: - return BACnetAuthorizationMode_AUTHORIZATION_DELAYED, true - case 5: - return BACnetAuthorizationMode_NONE, true + case 0: + return BACnetAuthorizationMode_AUTHORIZE, true + case 0XFFFF: + return BACnetAuthorizationMode_VENDOR_PROPRIETARY_VALUE, true + case 1: + return BACnetAuthorizationMode_GRANT_ACTIVE, true + case 2: + return BACnetAuthorizationMode_DENY_ALL, true + case 3: + return BACnetAuthorizationMode_VERIFICATION_REQUIRED, true + case 4: + return BACnetAuthorizationMode_AUTHORIZATION_DELAYED, true + case 5: + return BACnetAuthorizationMode_NONE, true } return 0, false } @@ -99,13 +99,13 @@ func BACnetAuthorizationModeByName(value string) (enum BACnetAuthorizationMode, return 0, false } -func BACnetAuthorizationModeKnows(value uint16) bool { +func BACnetAuthorizationModeKnows(value uint16) bool { for _, typeValue := range BACnetAuthorizationModeValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastBACnetAuthorizationMode(structType interface{}) BACnetAuthorizationMode { @@ -179,3 +179,4 @@ func (e BACnetAuthorizationMode) PLC4XEnumName() string { func (e BACnetAuthorizationMode) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthorizationModeTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthorizationModeTagged.go index d4c1ae18490..1f0119decca 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthorizationModeTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetAuthorizationModeTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetAuthorizationModeTagged is the corresponding interface of BACnetAuthorizationModeTagged type BACnetAuthorizationModeTagged interface { @@ -50,15 +52,16 @@ type BACnetAuthorizationModeTaggedExactly interface { // _BACnetAuthorizationModeTagged is the data-structure of this message type _BACnetAuthorizationModeTagged struct { - Header BACnetTagHeader - Value BACnetAuthorizationMode - ProprietaryValue uint32 + Header BACnetTagHeader + Value BACnetAuthorizationMode + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_BACnetAuthorizationModeTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetAuthorizationModeTagged factory function for _BACnetAuthorizationModeTagged -func NewBACnetAuthorizationModeTagged(header BACnetTagHeader, value BACnetAuthorizationMode, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_BACnetAuthorizationModeTagged { - return &_BACnetAuthorizationModeTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetAuthorizationModeTagged( header BACnetTagHeader , value BACnetAuthorizationMode , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_BACnetAuthorizationModeTagged { +return &_BACnetAuthorizationModeTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetAuthorizationModeTagged(structType interface{}) BACnetAuthorizationModeTagged { - if casted, ok := structType.(BACnetAuthorizationModeTagged); ok { + if casted, ok := structType.(BACnetAuthorizationModeTagged); ok { return casted } if casted, ok := structType.(*BACnetAuthorizationModeTagged); ok { @@ -123,16 +127,17 @@ func (m *_BACnetAuthorizationModeTagged) GetLengthInBits(ctx context.Context) ui lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetAuthorizationModeTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetAuthorizationModeTaggedParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetAuthorizationModeTagged") } @@ -164,12 +169,12 @@ func BACnetAuthorizationModeTaggedParseWithBuffer(ctx context.Context, readBuffe } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func BACnetAuthorizationModeTaggedParseWithBuffer(ctx context.Context, readBuffe } var value BACnetAuthorizationMode if _value != nil { - value = _value.(BACnetAuthorizationMode) + value = _value.(BACnetAuthorizationMode) } // Virtual field @@ -195,7 +200,7 @@ func BACnetAuthorizationModeTaggedParseWithBuffer(ctx context.Context, readBuffe } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetAuthorizationModeTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func BACnetAuthorizationModeTaggedParseWithBuffer(ctx context.Context, readBuffe // Create the instance return &_BACnetAuthorizationModeTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetAuthorizationModeTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_BACnetAuthorizationModeTagged) Serialize() ([]byte, error) { func (m *_BACnetAuthorizationModeTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetAuthorizationModeTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetAuthorizationModeTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetAuthorizationModeTagged") } @@ -261,6 +266,7 @@ func (m *_BACnetAuthorizationModeTagged) SerializeWithWriteBuffer(ctx context.Co return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_BACnetAuthorizationModeTagged) GetTagNumber() uint8 { func (m *_BACnetAuthorizationModeTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_BACnetAuthorizationModeTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetBDTEntry.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetBDTEntry.go index de2ca0850f4..9c04d0e7217 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetBDTEntry.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetBDTEntry.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetBDTEntry is the corresponding interface of BACnetBDTEntry type BACnetBDTEntry interface { @@ -47,10 +49,11 @@ type BACnetBDTEntryExactly interface { // _BACnetBDTEntry is the data-structure of this message type _BACnetBDTEntry struct { - BbmdAddress BACnetHostNPortEnclosed - BroadcastMask BACnetContextTagOctetString + BbmdAddress BACnetHostNPortEnclosed + BroadcastMask BACnetContextTagOctetString } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -69,14 +72,15 @@ func (m *_BACnetBDTEntry) GetBroadcastMask() BACnetContextTagOctetString { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetBDTEntry factory function for _BACnetBDTEntry -func NewBACnetBDTEntry(bbmdAddress BACnetHostNPortEnclosed, broadcastMask BACnetContextTagOctetString) *_BACnetBDTEntry { - return &_BACnetBDTEntry{BbmdAddress: bbmdAddress, BroadcastMask: broadcastMask} +func NewBACnetBDTEntry( bbmdAddress BACnetHostNPortEnclosed , broadcastMask BACnetContextTagOctetString ) *_BACnetBDTEntry { +return &_BACnetBDTEntry{ BbmdAddress: bbmdAddress , BroadcastMask: broadcastMask } } // Deprecated: use the interface for direct cast func CastBACnetBDTEntry(structType interface{}) BACnetBDTEntry { - if casted, ok := structType.(BACnetBDTEntry); ok { + if casted, ok := structType.(BACnetBDTEntry); ok { return casted } if casted, ok := structType.(*BACnetBDTEntry); ok { @@ -103,6 +107,7 @@ func (m *_BACnetBDTEntry) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetBDTEntry) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -124,7 +129,7 @@ func BACnetBDTEntryParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf if pullErr := readBuffer.PullContext("bbmdAddress"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for bbmdAddress") } - _bbmdAddress, _bbmdAddressErr := BACnetHostNPortEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_bbmdAddress, _bbmdAddressErr := BACnetHostNPortEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _bbmdAddressErr != nil { return nil, errors.Wrap(_bbmdAddressErr, "Error parsing 'bbmdAddress' field of BACnetBDTEntry") } @@ -135,12 +140,12 @@ func BACnetBDTEntryParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf // Optional Field (broadcastMask) (Can be skipped, if a given expression evaluates to false) var broadcastMask BACnetContextTagOctetString = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("broadcastMask"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for broadcastMask") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(1), BACnetDataType_OCTET_STRING) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(1) , BACnetDataType_OCTET_STRING ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -161,9 +166,9 @@ func BACnetBDTEntryParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf // Create the instance return &_BACnetBDTEntry{ - BbmdAddress: bbmdAddress, - BroadcastMask: broadcastMask, - }, nil + BbmdAddress: bbmdAddress, + BroadcastMask: broadcastMask, + }, nil } func (m *_BACnetBDTEntry) Serialize() ([]byte, error) { @@ -177,7 +182,7 @@ func (m *_BACnetBDTEntry) Serialize() ([]byte, error) { func (m *_BACnetBDTEntry) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetBDTEntry"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetBDTEntry"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetBDTEntry") } @@ -215,6 +220,7 @@ func (m *_BACnetBDTEntry) SerializeWithWriteBuffer(ctx context.Context, writeBuf return nil } + func (m *_BACnetBDTEntry) isBACnetBDTEntry() bool { return true } @@ -229,3 +235,6 @@ func (m *_BACnetBDTEntry) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetBackupState.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetBackupState.go index 67cb4e02696..bf0981bf82c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetBackupState.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetBackupState.go @@ -34,21 +34,21 @@ type IBACnetBackupState interface { utils.Serializable } -const ( - BACnetBackupState_IDLE BACnetBackupState = 0 - BACnetBackupState_PREPARING_FOR_BACKUP BACnetBackupState = 1 +const( + BACnetBackupState_IDLE BACnetBackupState = 0 + BACnetBackupState_PREPARING_FOR_BACKUP BACnetBackupState = 1 BACnetBackupState_PREPARING_FOR_RESTORE BACnetBackupState = 2 - BACnetBackupState_PERFORMING_A_BACKUP BACnetBackupState = 3 - BACnetBackupState_PERFORMING_A_RESTORE BACnetBackupState = 4 - BACnetBackupState_BACKUP_FAILURE BACnetBackupState = 5 - BACnetBackupState_RESTORE_FAILURE BACnetBackupState = 6 + BACnetBackupState_PERFORMING_A_BACKUP BACnetBackupState = 3 + BACnetBackupState_PERFORMING_A_RESTORE BACnetBackupState = 4 + BACnetBackupState_BACKUP_FAILURE BACnetBackupState = 5 + BACnetBackupState_RESTORE_FAILURE BACnetBackupState = 6 ) var BACnetBackupStateValues []BACnetBackupState func init() { _ = errors.New - BACnetBackupStateValues = []BACnetBackupState{ + BACnetBackupStateValues = []BACnetBackupState { BACnetBackupState_IDLE, BACnetBackupState_PREPARING_FOR_BACKUP, BACnetBackupState_PREPARING_FOR_RESTORE, @@ -61,20 +61,20 @@ func init() { func BACnetBackupStateByValue(value uint8) (enum BACnetBackupState, ok bool) { switch value { - case 0: - return BACnetBackupState_IDLE, true - case 1: - return BACnetBackupState_PREPARING_FOR_BACKUP, true - case 2: - return BACnetBackupState_PREPARING_FOR_RESTORE, true - case 3: - return BACnetBackupState_PERFORMING_A_BACKUP, true - case 4: - return BACnetBackupState_PERFORMING_A_RESTORE, true - case 5: - return BACnetBackupState_BACKUP_FAILURE, true - case 6: - return BACnetBackupState_RESTORE_FAILURE, true + case 0: + return BACnetBackupState_IDLE, true + case 1: + return BACnetBackupState_PREPARING_FOR_BACKUP, true + case 2: + return BACnetBackupState_PREPARING_FOR_RESTORE, true + case 3: + return BACnetBackupState_PERFORMING_A_BACKUP, true + case 4: + return BACnetBackupState_PERFORMING_A_RESTORE, true + case 5: + return BACnetBackupState_BACKUP_FAILURE, true + case 6: + return BACnetBackupState_RESTORE_FAILURE, true } return 0, false } @@ -99,13 +99,13 @@ func BACnetBackupStateByName(value string) (enum BACnetBackupState, ok bool) { return 0, false } -func BACnetBackupStateKnows(value uint8) bool { +func BACnetBackupStateKnows(value uint8) bool { for _, typeValue := range BACnetBackupStateValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetBackupState(structType interface{}) BACnetBackupState { @@ -179,3 +179,4 @@ func (e BACnetBackupState) PLC4XEnumName() string { func (e BACnetBackupState) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetBackupStateTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetBackupStateTagged.go index c7b41c7104a..33703636fc0 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetBackupStateTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetBackupStateTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetBackupStateTagged is the corresponding interface of BACnetBackupStateTagged type BACnetBackupStateTagged interface { @@ -46,14 +48,15 @@ type BACnetBackupStateTaggedExactly interface { // _BACnetBackupStateTagged is the data-structure of this message type _BACnetBackupStateTagged struct { - Header BACnetTagHeader - Value BACnetBackupState + Header BACnetTagHeader + Value BACnetBackupState // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_BACnetBackupStateTagged) GetValue() BACnetBackupState { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetBackupStateTagged factory function for _BACnetBackupStateTagged -func NewBACnetBackupStateTagged(header BACnetTagHeader, value BACnetBackupState, tagNumber uint8, tagClass TagClass) *_BACnetBackupStateTagged { - return &_BACnetBackupStateTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetBackupStateTagged( header BACnetTagHeader , value BACnetBackupState , tagNumber uint8 , tagClass TagClass ) *_BACnetBackupStateTagged { +return &_BACnetBackupStateTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetBackupStateTagged(structType interface{}) BACnetBackupStateTagged { - if casted, ok := structType.(BACnetBackupStateTagged); ok { + if casted, ok := structType.(BACnetBackupStateTagged); ok { return casted } if casted, ok := structType.(*BACnetBackupStateTagged); ok { @@ -104,6 +108,7 @@ func (m *_BACnetBackupStateTagged) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetBackupStateTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func BACnetBackupStateTaggedParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetBackupStateTagged") } @@ -135,12 +140,12 @@ func BACnetBackupStateTaggedParseWithBuffer(ctx context.Context, readBuffer util } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func BACnetBackupStateTaggedParseWithBuffer(ctx context.Context, readBuffer util } var value BACnetBackupState if _value != nil { - value = _value.(BACnetBackupState) + value = _value.(BACnetBackupState) } if closeErr := readBuffer.CloseContext("BACnetBackupStateTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func BACnetBackupStateTaggedParseWithBuffer(ctx context.Context, readBuffer util // Create the instance return &_BACnetBackupStateTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_BACnetBackupStateTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_BACnetBackupStateTagged) Serialize() ([]byte, error) { func (m *_BACnetBackupStateTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetBackupStateTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetBackupStateTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetBackupStateTagged") } @@ -206,6 +211,7 @@ func (m *_BACnetBackupStateTagged) SerializeWithWriteBuffer(ctx context.Context, return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_BACnetBackupStateTagged) GetTagNumber() uint8 { func (m *_BACnetBackupStateTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_BACnetBackupStateTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetBinaryLightingPV.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetBinaryLightingPV.go index 2a15a7ca0cd..85b38f2b887 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetBinaryLightingPV.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetBinaryLightingPV.go @@ -34,21 +34,21 @@ type IBACnetBinaryLightingPV interface { utils.Serializable } -const ( - BACnetBinaryLightingPV_OFF BACnetBinaryLightingPV = 0 - BACnetBinaryLightingPV_ON BACnetBinaryLightingPV = 1 - BACnetBinaryLightingPV_WARN BACnetBinaryLightingPV = 2 - BACnetBinaryLightingPV_WARN_OFF BACnetBinaryLightingPV = 3 - BACnetBinaryLightingPV_WARN_RELINQUISH BACnetBinaryLightingPV = 4 - BACnetBinaryLightingPV_STOP BACnetBinaryLightingPV = 5 - BACnetBinaryLightingPV_VENDOR_PROPRIETARY_VALUE BACnetBinaryLightingPV = 0xFF +const( + BACnetBinaryLightingPV_OFF BACnetBinaryLightingPV = 0 + BACnetBinaryLightingPV_ON BACnetBinaryLightingPV = 1 + BACnetBinaryLightingPV_WARN BACnetBinaryLightingPV = 2 + BACnetBinaryLightingPV_WARN_OFF BACnetBinaryLightingPV = 3 + BACnetBinaryLightingPV_WARN_RELINQUISH BACnetBinaryLightingPV = 4 + BACnetBinaryLightingPV_STOP BACnetBinaryLightingPV = 5 + BACnetBinaryLightingPV_VENDOR_PROPRIETARY_VALUE BACnetBinaryLightingPV = 0XFF ) var BACnetBinaryLightingPVValues []BACnetBinaryLightingPV func init() { _ = errors.New - BACnetBinaryLightingPVValues = []BACnetBinaryLightingPV{ + BACnetBinaryLightingPVValues = []BACnetBinaryLightingPV { BACnetBinaryLightingPV_OFF, BACnetBinaryLightingPV_ON, BACnetBinaryLightingPV_WARN, @@ -61,20 +61,20 @@ func init() { func BACnetBinaryLightingPVByValue(value uint8) (enum BACnetBinaryLightingPV, ok bool) { switch value { - case 0: - return BACnetBinaryLightingPV_OFF, true - case 0xFF: - return BACnetBinaryLightingPV_VENDOR_PROPRIETARY_VALUE, true - case 1: - return BACnetBinaryLightingPV_ON, true - case 2: - return BACnetBinaryLightingPV_WARN, true - case 3: - return BACnetBinaryLightingPV_WARN_OFF, true - case 4: - return BACnetBinaryLightingPV_WARN_RELINQUISH, true - case 5: - return BACnetBinaryLightingPV_STOP, true + case 0: + return BACnetBinaryLightingPV_OFF, true + case 0XFF: + return BACnetBinaryLightingPV_VENDOR_PROPRIETARY_VALUE, true + case 1: + return BACnetBinaryLightingPV_ON, true + case 2: + return BACnetBinaryLightingPV_WARN, true + case 3: + return BACnetBinaryLightingPV_WARN_OFF, true + case 4: + return BACnetBinaryLightingPV_WARN_RELINQUISH, true + case 5: + return BACnetBinaryLightingPV_STOP, true } return 0, false } @@ -99,13 +99,13 @@ func BACnetBinaryLightingPVByName(value string) (enum BACnetBinaryLightingPV, ok return 0, false } -func BACnetBinaryLightingPVKnows(value uint8) bool { +func BACnetBinaryLightingPVKnows(value uint8) bool { for _, typeValue := range BACnetBinaryLightingPVValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetBinaryLightingPV(structType interface{}) BACnetBinaryLightingPV { @@ -179,3 +179,4 @@ func (e BACnetBinaryLightingPV) PLC4XEnumName() string { func (e BACnetBinaryLightingPV) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetBinaryLightingPVTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetBinaryLightingPVTagged.go index 3e6bd060f3e..5b82cf982b9 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetBinaryLightingPVTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetBinaryLightingPVTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetBinaryLightingPVTagged is the corresponding interface of BACnetBinaryLightingPVTagged type BACnetBinaryLightingPVTagged interface { @@ -50,15 +52,16 @@ type BACnetBinaryLightingPVTaggedExactly interface { // _BACnetBinaryLightingPVTagged is the data-structure of this message type _BACnetBinaryLightingPVTagged struct { - Header BACnetTagHeader - Value BACnetBinaryLightingPV - ProprietaryValue uint32 + Header BACnetTagHeader + Value BACnetBinaryLightingPV + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_BACnetBinaryLightingPVTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetBinaryLightingPVTagged factory function for _BACnetBinaryLightingPVTagged -func NewBACnetBinaryLightingPVTagged(header BACnetTagHeader, value BACnetBinaryLightingPV, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_BACnetBinaryLightingPVTagged { - return &_BACnetBinaryLightingPVTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetBinaryLightingPVTagged( header BACnetTagHeader , value BACnetBinaryLightingPV , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_BACnetBinaryLightingPVTagged { +return &_BACnetBinaryLightingPVTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetBinaryLightingPVTagged(structType interface{}) BACnetBinaryLightingPVTagged { - if casted, ok := structType.(BACnetBinaryLightingPVTagged); ok { + if casted, ok := structType.(BACnetBinaryLightingPVTagged); ok { return casted } if casted, ok := structType.(*BACnetBinaryLightingPVTagged); ok { @@ -123,16 +127,17 @@ func (m *_BACnetBinaryLightingPVTagged) GetLengthInBits(ctx context.Context) uin lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetBinaryLightingPVTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetBinaryLightingPVTaggedParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetBinaryLightingPVTagged") } @@ -164,12 +169,12 @@ func BACnetBinaryLightingPVTaggedParseWithBuffer(ctx context.Context, readBuffer } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func BACnetBinaryLightingPVTaggedParseWithBuffer(ctx context.Context, readBuffer } var value BACnetBinaryLightingPV if _value != nil { - value = _value.(BACnetBinaryLightingPV) + value = _value.(BACnetBinaryLightingPV) } // Virtual field @@ -195,7 +200,7 @@ func BACnetBinaryLightingPVTaggedParseWithBuffer(ctx context.Context, readBuffer } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetBinaryLightingPVTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func BACnetBinaryLightingPVTaggedParseWithBuffer(ctx context.Context, readBuffer // Create the instance return &_BACnetBinaryLightingPVTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetBinaryLightingPVTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_BACnetBinaryLightingPVTagged) Serialize() ([]byte, error) { func (m *_BACnetBinaryLightingPVTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetBinaryLightingPVTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetBinaryLightingPVTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetBinaryLightingPVTagged") } @@ -261,6 +266,7 @@ func (m *_BACnetBinaryLightingPVTagged) SerializeWithWriteBuffer(ctx context.Con return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_BACnetBinaryLightingPVTagged) GetTagNumber() uint8 { func (m *_BACnetBinaryLightingPVTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_BACnetBinaryLightingPVTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetBinaryPV.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetBinaryPV.go index 3e1afed66d9..4f1289a65e7 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetBinaryPV.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetBinaryPV.go @@ -34,16 +34,16 @@ type IBACnetBinaryPV interface { utils.Serializable } -const ( +const( BACnetBinaryPV_INACTIVE BACnetBinaryPV = 0 - BACnetBinaryPV_ACTIVE BACnetBinaryPV = 1 + BACnetBinaryPV_ACTIVE BACnetBinaryPV = 1 ) var BACnetBinaryPVValues []BACnetBinaryPV func init() { _ = errors.New - BACnetBinaryPVValues = []BACnetBinaryPV{ + BACnetBinaryPVValues = []BACnetBinaryPV { BACnetBinaryPV_INACTIVE, BACnetBinaryPV_ACTIVE, } @@ -51,10 +51,10 @@ func init() { func BACnetBinaryPVByValue(value uint8) (enum BACnetBinaryPV, ok bool) { switch value { - case 0: - return BACnetBinaryPV_INACTIVE, true - case 1: - return BACnetBinaryPV_ACTIVE, true + case 0: + return BACnetBinaryPV_INACTIVE, true + case 1: + return BACnetBinaryPV_ACTIVE, true } return 0, false } @@ -69,13 +69,13 @@ func BACnetBinaryPVByName(value string) (enum BACnetBinaryPV, ok bool) { return 0, false } -func BACnetBinaryPVKnows(value uint8) bool { +func BACnetBinaryPVKnows(value uint8) bool { for _, typeValue := range BACnetBinaryPVValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetBinaryPV(structType interface{}) BACnetBinaryPV { @@ -139,3 +139,4 @@ func (e BACnetBinaryPV) PLC4XEnumName() string { func (e BACnetBinaryPV) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetBinaryPVTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetBinaryPVTagged.go index 6cf85141bb4..6b2435e7e1f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetBinaryPVTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetBinaryPVTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetBinaryPVTagged is the corresponding interface of BACnetBinaryPVTagged type BACnetBinaryPVTagged interface { @@ -46,14 +48,15 @@ type BACnetBinaryPVTaggedExactly interface { // _BACnetBinaryPVTagged is the data-structure of this message type _BACnetBinaryPVTagged struct { - Header BACnetTagHeader - Value BACnetBinaryPV + Header BACnetTagHeader + Value BACnetBinaryPV // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_BACnetBinaryPVTagged) GetValue() BACnetBinaryPV { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetBinaryPVTagged factory function for _BACnetBinaryPVTagged -func NewBACnetBinaryPVTagged(header BACnetTagHeader, value BACnetBinaryPV, tagNumber uint8, tagClass TagClass) *_BACnetBinaryPVTagged { - return &_BACnetBinaryPVTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetBinaryPVTagged( header BACnetTagHeader , value BACnetBinaryPV , tagNumber uint8 , tagClass TagClass ) *_BACnetBinaryPVTagged { +return &_BACnetBinaryPVTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetBinaryPVTagged(structType interface{}) BACnetBinaryPVTagged { - if casted, ok := structType.(BACnetBinaryPVTagged); ok { + if casted, ok := structType.(BACnetBinaryPVTagged); ok { return casted } if casted, ok := structType.(*BACnetBinaryPVTagged); ok { @@ -104,6 +108,7 @@ func (m *_BACnetBinaryPVTagged) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetBinaryPVTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func BACnetBinaryPVTaggedParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetBinaryPVTagged") } @@ -135,12 +140,12 @@ func BACnetBinaryPVTaggedParseWithBuffer(ctx context.Context, readBuffer utils.R } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func BACnetBinaryPVTaggedParseWithBuffer(ctx context.Context, readBuffer utils.R } var value BACnetBinaryPV if _value != nil { - value = _value.(BACnetBinaryPV) + value = _value.(BACnetBinaryPV) } if closeErr := readBuffer.CloseContext("BACnetBinaryPVTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func BACnetBinaryPVTaggedParseWithBuffer(ctx context.Context, readBuffer utils.R // Create the instance return &_BACnetBinaryPVTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_BACnetBinaryPVTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_BACnetBinaryPVTagged) Serialize() ([]byte, error) { func (m *_BACnetBinaryPVTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetBinaryPVTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetBinaryPVTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetBinaryPVTagged") } @@ -206,6 +211,7 @@ func (m *_BACnetBinaryPVTagged) SerializeWithWriteBuffer(ctx context.Context, wr return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_BACnetBinaryPVTagged) GetTagNumber() uint8 { func (m *_BACnetBinaryPVTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_BACnetBinaryPVTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVMultipleSubscription.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVMultipleSubscription.go index 0e455067a71..b46f060d389 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVMultipleSubscription.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVMultipleSubscription.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetCOVMultipleSubscription is the corresponding interface of BACnetCOVMultipleSubscription type BACnetCOVMultipleSubscription interface { @@ -52,13 +54,14 @@ type BACnetCOVMultipleSubscriptionExactly interface { // _BACnetCOVMultipleSubscription is the data-structure of this message type _BACnetCOVMultipleSubscription struct { - Recipient BACnetRecipientProcessEnclosed - IssueConfirmedNotifications BACnetContextTagBoolean - TimeRemaining BACnetContextTagUnsignedInteger - MaxNotificationDelay BACnetContextTagUnsignedInteger - ListOfCovSubscriptionSpecification BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification + Recipient BACnetRecipientProcessEnclosed + IssueConfirmedNotifications BACnetContextTagBoolean + TimeRemaining BACnetContextTagUnsignedInteger + MaxNotificationDelay BACnetContextTagUnsignedInteger + ListOfCovSubscriptionSpecification BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -89,14 +92,15 @@ func (m *_BACnetCOVMultipleSubscription) GetListOfCovSubscriptionSpecification() /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetCOVMultipleSubscription factory function for _BACnetCOVMultipleSubscription -func NewBACnetCOVMultipleSubscription(recipient BACnetRecipientProcessEnclosed, issueConfirmedNotifications BACnetContextTagBoolean, timeRemaining BACnetContextTagUnsignedInteger, maxNotificationDelay BACnetContextTagUnsignedInteger, listOfCovSubscriptionSpecification BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification) *_BACnetCOVMultipleSubscription { - return &_BACnetCOVMultipleSubscription{Recipient: recipient, IssueConfirmedNotifications: issueConfirmedNotifications, TimeRemaining: timeRemaining, MaxNotificationDelay: maxNotificationDelay, ListOfCovSubscriptionSpecification: listOfCovSubscriptionSpecification} +func NewBACnetCOVMultipleSubscription( recipient BACnetRecipientProcessEnclosed , issueConfirmedNotifications BACnetContextTagBoolean , timeRemaining BACnetContextTagUnsignedInteger , maxNotificationDelay BACnetContextTagUnsignedInteger , listOfCovSubscriptionSpecification BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification ) *_BACnetCOVMultipleSubscription { +return &_BACnetCOVMultipleSubscription{ Recipient: recipient , IssueConfirmedNotifications: issueConfirmedNotifications , TimeRemaining: timeRemaining , MaxNotificationDelay: maxNotificationDelay , ListOfCovSubscriptionSpecification: listOfCovSubscriptionSpecification } } // Deprecated: use the interface for direct cast func CastBACnetCOVMultipleSubscription(structType interface{}) BACnetCOVMultipleSubscription { - if casted, ok := structType.(BACnetCOVMultipleSubscription); ok { + if casted, ok := structType.(BACnetCOVMultipleSubscription); ok { return casted } if casted, ok := structType.(*BACnetCOVMultipleSubscription); ok { @@ -130,6 +134,7 @@ func (m *_BACnetCOVMultipleSubscription) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetCOVMultipleSubscription) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,7 +156,7 @@ func BACnetCOVMultipleSubscriptionParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("recipient"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for recipient") } - _recipient, _recipientErr := BACnetRecipientProcessEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_recipient, _recipientErr := BACnetRecipientProcessEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _recipientErr != nil { return nil, errors.Wrap(_recipientErr, "Error parsing 'recipient' field of BACnetCOVMultipleSubscription") } @@ -164,7 +169,7 @@ func BACnetCOVMultipleSubscriptionParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("issueConfirmedNotifications"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for issueConfirmedNotifications") } - _issueConfirmedNotifications, _issueConfirmedNotificationsErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_BOOLEAN)) +_issueConfirmedNotifications, _issueConfirmedNotificationsErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_BOOLEAN ) ) if _issueConfirmedNotificationsErr != nil { return nil, errors.Wrap(_issueConfirmedNotificationsErr, "Error parsing 'issueConfirmedNotifications' field of BACnetCOVMultipleSubscription") } @@ -177,7 +182,7 @@ func BACnetCOVMultipleSubscriptionParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("timeRemaining"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeRemaining") } - _timeRemaining, _timeRemainingErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_timeRemaining, _timeRemainingErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _timeRemainingErr != nil { return nil, errors.Wrap(_timeRemainingErr, "Error parsing 'timeRemaining' field of BACnetCOVMultipleSubscription") } @@ -190,7 +195,7 @@ func BACnetCOVMultipleSubscriptionParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("maxNotificationDelay"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for maxNotificationDelay") } - _maxNotificationDelay, _maxNotificationDelayErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(3)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_maxNotificationDelay, _maxNotificationDelayErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(3) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _maxNotificationDelayErr != nil { return nil, errors.Wrap(_maxNotificationDelayErr, "Error parsing 'maxNotificationDelay' field of BACnetCOVMultipleSubscription") } @@ -203,7 +208,7 @@ func BACnetCOVMultipleSubscriptionParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("listOfCovSubscriptionSpecification"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for listOfCovSubscriptionSpecification") } - _listOfCovSubscriptionSpecification, _listOfCovSubscriptionSpecificationErr := BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationParseWithBuffer(ctx, readBuffer, uint8(uint8(4))) +_listOfCovSubscriptionSpecification, _listOfCovSubscriptionSpecificationErr := BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationParseWithBuffer(ctx, readBuffer , uint8( uint8(4) ) ) if _listOfCovSubscriptionSpecificationErr != nil { return nil, errors.Wrap(_listOfCovSubscriptionSpecificationErr, "Error parsing 'listOfCovSubscriptionSpecification' field of BACnetCOVMultipleSubscription") } @@ -218,12 +223,12 @@ func BACnetCOVMultipleSubscriptionParseWithBuffer(ctx context.Context, readBuffe // Create the instance return &_BACnetCOVMultipleSubscription{ - Recipient: recipient, - IssueConfirmedNotifications: issueConfirmedNotifications, - TimeRemaining: timeRemaining, - MaxNotificationDelay: maxNotificationDelay, - ListOfCovSubscriptionSpecification: listOfCovSubscriptionSpecification, - }, nil + Recipient: recipient, + IssueConfirmedNotifications: issueConfirmedNotifications, + TimeRemaining: timeRemaining, + MaxNotificationDelay: maxNotificationDelay, + ListOfCovSubscriptionSpecification: listOfCovSubscriptionSpecification, + }, nil } func (m *_BACnetCOVMultipleSubscription) Serialize() ([]byte, error) { @@ -237,7 +242,7 @@ func (m *_BACnetCOVMultipleSubscription) Serialize() ([]byte, error) { func (m *_BACnetCOVMultipleSubscription) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetCOVMultipleSubscription"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetCOVMultipleSubscription"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetCOVMultipleSubscription") } @@ -307,6 +312,7 @@ func (m *_BACnetCOVMultipleSubscription) SerializeWithWriteBuffer(ctx context.Co return nil } + func (m *_BACnetCOVMultipleSubscription) isBACnetCOVMultipleSubscription() bool { return true } @@ -321,3 +327,6 @@ func (m *_BACnetCOVMultipleSubscription) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification.go index 72262e6af41..1a35e9e1de2 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification is the corresponding interface of BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification type BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification interface { @@ -49,14 +51,15 @@ type BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationExactly inte // _BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification is the data-structure of this message type _BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification struct { - OpeningTag BACnetOpeningTag - ListOfCovSubscriptionSpecificationEntry []BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + ListOfCovSubscriptionSpecificationEntry []BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -79,14 +82,15 @@ func (m *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification) GetCl /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification factory function for _BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification -func NewBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification(openingTag BACnetOpeningTag, listOfCovSubscriptionSpecificationEntry []BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification { - return &_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification{OpeningTag: openingTag, ListOfCovSubscriptionSpecificationEntry: listOfCovSubscriptionSpecificationEntry, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification( openingTag BACnetOpeningTag , listOfCovSubscriptionSpecificationEntry []BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification { +return &_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification{ OpeningTag: openingTag , ListOfCovSubscriptionSpecificationEntry: listOfCovSubscriptionSpecificationEntry , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification(structType interface{}) BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification { - if casted, ok := structType.(BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification); ok { + if casted, ok := structType.(BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification); ok { return casted } if casted, ok := structType.(*BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification); ok { @@ -118,6 +122,7 @@ func (m *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification) GetLe return lengthInBits } + func (m *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +144,7 @@ func BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationParseWithBuf if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification") } @@ -155,8 +160,8 @@ func BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationParseWithBuf // Terminated array var listOfCovSubscriptionSpecificationEntry []BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'listOfCovSubscriptionSpecificationEntry' field of BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification") } @@ -171,7 +176,7 @@ func BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationParseWithBuf if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification") } @@ -186,11 +191,11 @@ func BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationParseWithBuf // Create the instance return &_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification{ - TagNumber: tagNumber, - OpeningTag: openingTag, - ListOfCovSubscriptionSpecificationEntry: listOfCovSubscriptionSpecificationEntry, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + ListOfCovSubscriptionSpecificationEntry: listOfCovSubscriptionSpecificationEntry, + ClosingTag: closingTag, + }, nil } func (m *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification) Serialize() ([]byte, error) { @@ -204,7 +209,7 @@ func (m *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification) Seria func (m *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification") } @@ -255,13 +260,13 @@ func (m *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification) Seria return nil } + //// // Arguments Getter func (m *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -279,3 +284,6 @@ func (m *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecification) Strin } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry.go index 4fee414c4e1..6b10301546f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry is the corresponding interface of BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry type BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry interface { @@ -46,10 +48,11 @@ type BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryExactly // _BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry is the data-structure of this message type _BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry struct { - MonitoredObjectIdentifier BACnetContextTagObjectIdentifier - ListOfCovReferences BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences + MonitoredObjectIdentifier BACnetContextTagObjectIdentifier + ListOfCovReferences BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -68,14 +71,15 @@ func (m *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry) /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry factory function for _BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry -func NewBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry(monitoredObjectIdentifier BACnetContextTagObjectIdentifier, listOfCovReferences BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences) *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry { - return &_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry{MonitoredObjectIdentifier: monitoredObjectIdentifier, ListOfCovReferences: listOfCovReferences} +func NewBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry( monitoredObjectIdentifier BACnetContextTagObjectIdentifier , listOfCovReferences BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences ) *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry { +return &_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry{ MonitoredObjectIdentifier: monitoredObjectIdentifier , ListOfCovReferences: listOfCovReferences } } // Deprecated: use the interface for direct cast func CastBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry(structType interface{}) BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry { - if casted, ok := structType.(BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry); ok { + if casted, ok := structType.(BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry); ok { return casted } if casted, ok := structType.(*BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry); ok { @@ -100,6 +104,7 @@ func (m *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry) return lengthInBits } + func (m *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -121,7 +126,7 @@ func BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryParseWi if pullErr := readBuffer.PullContext("monitoredObjectIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for monitoredObjectIdentifier") } - _monitoredObjectIdentifier, _monitoredObjectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER)) +_monitoredObjectIdentifier, _monitoredObjectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_BACNET_OBJECT_IDENTIFIER ) ) if _monitoredObjectIdentifierErr != nil { return nil, errors.Wrap(_monitoredObjectIdentifierErr, "Error parsing 'monitoredObjectIdentifier' field of BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry") } @@ -134,7 +139,7 @@ func BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryParseWi if pullErr := readBuffer.PullContext("listOfCovReferences"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for listOfCovReferences") } - _listOfCovReferences, _listOfCovReferencesErr := BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesParseWithBuffer(ctx, readBuffer, uint8(uint8(1))) +_listOfCovReferences, _listOfCovReferencesErr := BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) ) if _listOfCovReferencesErr != nil { return nil, errors.Wrap(_listOfCovReferencesErr, "Error parsing 'listOfCovReferences' field of BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry") } @@ -149,9 +154,9 @@ func BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryParseWi // Create the instance return &_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry{ - MonitoredObjectIdentifier: monitoredObjectIdentifier, - ListOfCovReferences: listOfCovReferences, - }, nil + MonitoredObjectIdentifier: monitoredObjectIdentifier, + ListOfCovReferences: listOfCovReferences, + }, nil } func (m *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry) Serialize() ([]byte, error) { @@ -165,7 +170,7 @@ func (m *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry) func (m *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry") } @@ -199,6 +204,7 @@ func (m *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry) return nil } + func (m *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry) isBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry() bool { return true } @@ -213,3 +219,6 @@ func (m *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntry) } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences.go index 313c0d9df9a..0c1ed83fedc 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences is the corresponding interface of BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences type BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences interface { @@ -49,14 +51,15 @@ type BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfC // _BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences is the data-structure of this message type _BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences struct { - OpeningTag BACnetOpeningTag - ListOfCovReferences []BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + ListOfCovReferences []BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -79,14 +82,15 @@ func (m *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryLi /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences factory function for _BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences -func NewBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences(openingTag BACnetOpeningTag, listOfCovReferences []BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences { - return &_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences{OpeningTag: openingTag, ListOfCovReferences: listOfCovReferences, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences( openingTag BACnetOpeningTag , listOfCovReferences []BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences { +return &_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences{ OpeningTag: openingTag , ListOfCovReferences: listOfCovReferences , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences(structType interface{}) BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences { - if casted, ok := structType.(BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences); ok { + if casted, ok := structType.(BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences); ok { return casted } if casted, ok := structType.(*BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences); ok { @@ -118,6 +122,7 @@ func (m *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryLi return lengthInBits } + func (m *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +144,7 @@ func BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfC if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences") } @@ -155,8 +160,8 @@ func BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfC // Terminated array var listOfCovReferences []BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntryParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntryParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'listOfCovReferences' field of BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences") } @@ -171,7 +176,7 @@ func BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfC if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences") } @@ -186,11 +191,11 @@ func BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfC // Create the instance return &_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences{ - TagNumber: tagNumber, - OpeningTag: openingTag, - ListOfCovReferences: listOfCovReferences, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + ListOfCovReferences: listOfCovReferences, + ClosingTag: closingTag, + }, nil } func (m *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences) Serialize() ([]byte, error) { @@ -204,7 +209,7 @@ func (m *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryLi func (m *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences") } @@ -255,13 +260,13 @@ func (m *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryLi return nil } + //// // Arguments Getter func (m *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferences) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -279,3 +284,6 @@ func (m *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryLi } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry.go index c33aed2b767..8e490158d53 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry is the corresponding interface of BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry type BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry interface { @@ -49,11 +51,12 @@ type BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfC // _BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry is the data-structure of this message type _BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry struct { - MonitoredProperty BACnetPropertyReferenceEnclosed - CovIncrement BACnetContextTagReal - Timestamped BACnetContextTagBoolean + MonitoredProperty BACnetPropertyReferenceEnclosed + CovIncrement BACnetContextTagReal + Timestamped BACnetContextTagBoolean } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -76,14 +79,15 @@ func (m *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryLi /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry factory function for _BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry -func NewBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry(monitoredProperty BACnetPropertyReferenceEnclosed, covIncrement BACnetContextTagReal, timestamped BACnetContextTagBoolean) *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry { - return &_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry{MonitoredProperty: monitoredProperty, CovIncrement: covIncrement, Timestamped: timestamped} +func NewBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry( monitoredProperty BACnetPropertyReferenceEnclosed , covIncrement BACnetContextTagReal , timestamped BACnetContextTagBoolean ) *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry { +return &_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry{ MonitoredProperty: monitoredProperty , CovIncrement: covIncrement , Timestamped: timestamped } } // Deprecated: use the interface for direct cast func CastBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry(structType interface{}) BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry { - if casted, ok := structType.(BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry); ok { + if casted, ok := structType.(BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry); ok { return casted } if casted, ok := structType.(*BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry); ok { @@ -113,6 +117,7 @@ func (m *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryLi return lengthInBits } + func (m *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -134,7 +139,7 @@ func BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfC if pullErr := readBuffer.PullContext("monitoredProperty"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for monitoredProperty") } - _monitoredProperty, _monitoredPropertyErr := BACnetPropertyReferenceEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_monitoredProperty, _monitoredPropertyErr := BACnetPropertyReferenceEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _monitoredPropertyErr != nil { return nil, errors.Wrap(_monitoredPropertyErr, "Error parsing 'monitoredProperty' field of BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry") } @@ -145,12 +150,12 @@ func BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfC // Optional Field (covIncrement) (Can be skipped, if a given expression evaluates to false) var covIncrement BACnetContextTagReal = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("covIncrement"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for covIncrement") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(1), BACnetDataType_REAL) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(1) , BACnetDataType_REAL ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -169,7 +174,7 @@ func BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfC if pullErr := readBuffer.PullContext("timestamped"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timestamped") } - _timestamped, _timestampedErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_BOOLEAN)) +_timestamped, _timestampedErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_BOOLEAN ) ) if _timestampedErr != nil { return nil, errors.Wrap(_timestampedErr, "Error parsing 'timestamped' field of BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry") } @@ -184,10 +189,10 @@ func BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfC // Create the instance return &_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry{ - MonitoredProperty: monitoredProperty, - CovIncrement: covIncrement, - Timestamped: timestamped, - }, nil + MonitoredProperty: monitoredProperty, + CovIncrement: covIncrement, + Timestamped: timestamped, + }, nil } func (m *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry) Serialize() ([]byte, error) { @@ -201,7 +206,7 @@ func (m *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryLi func (m *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry") } @@ -251,6 +256,7 @@ func (m *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryLi return nil } + func (m *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry) isBACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryListOfCovReferencesEntry() bool { return true } @@ -265,3 +271,6 @@ func (m *_BACnetCOVMultipleSubscriptionListOfCovSubscriptionSpecificationEntryLi } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVSubscription.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVSubscription.go index b441e8873d0..84fc4259521 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVSubscription.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetCOVSubscription.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetCOVSubscription is the corresponding interface of BACnetCOVSubscription type BACnetCOVSubscription interface { @@ -53,13 +55,14 @@ type BACnetCOVSubscriptionExactly interface { // _BACnetCOVSubscription is the data-structure of this message type _BACnetCOVSubscription struct { - Recipient BACnetRecipientProcessEnclosed - MonitoredPropertyReference BACnetObjectPropertyReferenceEnclosed - IssueConfirmedNotifications BACnetContextTagBoolean - TimeRemaining BACnetContextTagUnsignedInteger - CovIncrement BACnetContextTagReal + Recipient BACnetRecipientProcessEnclosed + MonitoredPropertyReference BACnetObjectPropertyReferenceEnclosed + IssueConfirmedNotifications BACnetContextTagBoolean + TimeRemaining BACnetContextTagUnsignedInteger + CovIncrement BACnetContextTagReal } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,14 +93,15 @@ func (m *_BACnetCOVSubscription) GetCovIncrement() BACnetContextTagReal { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetCOVSubscription factory function for _BACnetCOVSubscription -func NewBACnetCOVSubscription(recipient BACnetRecipientProcessEnclosed, monitoredPropertyReference BACnetObjectPropertyReferenceEnclosed, issueConfirmedNotifications BACnetContextTagBoolean, timeRemaining BACnetContextTagUnsignedInteger, covIncrement BACnetContextTagReal) *_BACnetCOVSubscription { - return &_BACnetCOVSubscription{Recipient: recipient, MonitoredPropertyReference: monitoredPropertyReference, IssueConfirmedNotifications: issueConfirmedNotifications, TimeRemaining: timeRemaining, CovIncrement: covIncrement} +func NewBACnetCOVSubscription( recipient BACnetRecipientProcessEnclosed , monitoredPropertyReference BACnetObjectPropertyReferenceEnclosed , issueConfirmedNotifications BACnetContextTagBoolean , timeRemaining BACnetContextTagUnsignedInteger , covIncrement BACnetContextTagReal ) *_BACnetCOVSubscription { +return &_BACnetCOVSubscription{ Recipient: recipient , MonitoredPropertyReference: monitoredPropertyReference , IssueConfirmedNotifications: issueConfirmedNotifications , TimeRemaining: timeRemaining , CovIncrement: covIncrement } } // Deprecated: use the interface for direct cast func CastBACnetCOVSubscription(structType interface{}) BACnetCOVSubscription { - if casted, ok := structType.(BACnetCOVSubscription); ok { + if casted, ok := structType.(BACnetCOVSubscription); ok { return casted } if casted, ok := structType.(*BACnetCOVSubscription); ok { @@ -133,6 +137,7 @@ func (m *_BACnetCOVSubscription) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetCOVSubscription) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetCOVSubscriptionParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("recipient"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for recipient") } - _recipient, _recipientErr := BACnetRecipientProcessEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_recipient, _recipientErr := BACnetRecipientProcessEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _recipientErr != nil { return nil, errors.Wrap(_recipientErr, "Error parsing 'recipient' field of BACnetCOVSubscription") } @@ -167,7 +172,7 @@ func BACnetCOVSubscriptionParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("monitoredPropertyReference"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for monitoredPropertyReference") } - _monitoredPropertyReference, _monitoredPropertyReferenceErr := BACnetObjectPropertyReferenceEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(1))) +_monitoredPropertyReference, _monitoredPropertyReferenceErr := BACnetObjectPropertyReferenceEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) ) if _monitoredPropertyReferenceErr != nil { return nil, errors.Wrap(_monitoredPropertyReferenceErr, "Error parsing 'monitoredPropertyReference' field of BACnetCOVSubscription") } @@ -180,7 +185,7 @@ func BACnetCOVSubscriptionParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("issueConfirmedNotifications"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for issueConfirmedNotifications") } - _issueConfirmedNotifications, _issueConfirmedNotificationsErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), BACnetDataType(BACnetDataType_BOOLEAN)) +_issueConfirmedNotifications, _issueConfirmedNotificationsErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , BACnetDataType( BACnetDataType_BOOLEAN ) ) if _issueConfirmedNotificationsErr != nil { return nil, errors.Wrap(_issueConfirmedNotificationsErr, "Error parsing 'issueConfirmedNotifications' field of BACnetCOVSubscription") } @@ -193,7 +198,7 @@ func BACnetCOVSubscriptionParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("timeRemaining"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeRemaining") } - _timeRemaining, _timeRemainingErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(3)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_timeRemaining, _timeRemainingErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(3) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _timeRemainingErr != nil { return nil, errors.Wrap(_timeRemainingErr, "Error parsing 'timeRemaining' field of BACnetCOVSubscription") } @@ -204,12 +209,12 @@ func BACnetCOVSubscriptionParseWithBuffer(ctx context.Context, readBuffer utils. // Optional Field (covIncrement) (Can be skipped, if a given expression evaluates to false) var covIncrement BACnetContextTagReal = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("covIncrement"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for covIncrement") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(4), BACnetDataType_REAL) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(4) , BACnetDataType_REAL ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -230,12 +235,12 @@ func BACnetCOVSubscriptionParseWithBuffer(ctx context.Context, readBuffer utils. // Create the instance return &_BACnetCOVSubscription{ - Recipient: recipient, - MonitoredPropertyReference: monitoredPropertyReference, - IssueConfirmedNotifications: issueConfirmedNotifications, - TimeRemaining: timeRemaining, - CovIncrement: covIncrement, - }, nil + Recipient: recipient, + MonitoredPropertyReference: monitoredPropertyReference, + IssueConfirmedNotifications: issueConfirmedNotifications, + TimeRemaining: timeRemaining, + CovIncrement: covIncrement, + }, nil } func (m *_BACnetCOVSubscription) Serialize() ([]byte, error) { @@ -249,7 +254,7 @@ func (m *_BACnetCOVSubscription) Serialize() ([]byte, error) { func (m *_BACnetCOVSubscription) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetCOVSubscription"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetCOVSubscription"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetCOVSubscription") } @@ -323,6 +328,7 @@ func (m *_BACnetCOVSubscription) SerializeWithWriteBuffer(ctx context.Context, w return nil } + func (m *_BACnetCOVSubscription) isBACnetCOVSubscription() bool { return true } @@ -337,3 +343,6 @@ func (m *_BACnetCOVSubscription) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetCalendarEntry.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetCalendarEntry.go index cea64a454eb..7b179406f3d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetCalendarEntry.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetCalendarEntry.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetCalendarEntry is the corresponding interface of BACnetCalendarEntry type BACnetCalendarEntry interface { @@ -47,7 +49,7 @@ type BACnetCalendarEntryExactly interface { // _BACnetCalendarEntry is the data-structure of this message type _BACnetCalendarEntry struct { _BACnetCalendarEntryChildRequirements - PeekedTagHeader BACnetTagHeader + PeekedTagHeader BACnetTagHeader } type _BACnetCalendarEntryChildRequirements interface { @@ -55,6 +57,7 @@ type _BACnetCalendarEntryChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type BACnetCalendarEntryParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetCalendarEntry, serializeChildFunction func() error) error GetTypeName() string @@ -62,13 +65,12 @@ type BACnetCalendarEntryParent interface { type BACnetCalendarEntryChild interface { utils.Serializable - InitializeParent(parent BACnetCalendarEntry, peekedTagHeader BACnetTagHeader) +InitializeParent(parent BACnetCalendarEntry , peekedTagHeader BACnetTagHeader ) GetParent() *BACnetCalendarEntry GetTypeName() string BACnetCalendarEntry } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,14 +100,15 @@ func (m *_BACnetCalendarEntry) GetPeekedTagNumber() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetCalendarEntry factory function for _BACnetCalendarEntry -func NewBACnetCalendarEntry(peekedTagHeader BACnetTagHeader) *_BACnetCalendarEntry { - return &_BACnetCalendarEntry{PeekedTagHeader: peekedTagHeader} +func NewBACnetCalendarEntry( peekedTagHeader BACnetTagHeader ) *_BACnetCalendarEntry { +return &_BACnetCalendarEntry{ PeekedTagHeader: peekedTagHeader } } // Deprecated: use the interface for direct cast func CastBACnetCalendarEntry(structType interface{}) BACnetCalendarEntry { - if casted, ok := structType.(BACnetCalendarEntry); ok { + if casted, ok := structType.(BACnetCalendarEntry); ok { return casted } if casted, ok := structType.(*BACnetCalendarEntry); ok { @@ -118,6 +121,7 @@ func (m *_BACnetCalendarEntry) GetTypeName() string { return "BACnetCalendarEntry" } + func (m *_BACnetCalendarEntry) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -143,13 +147,13 @@ func BACnetCalendarEntryParseWithBuffer(ctx context.Context, readBuffer utils.Re currentPos := positionAware.GetPos() _ = currentPos - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Virtual field _peekedTagNumber := peekedTagHeader.GetActualTagNumber() @@ -157,26 +161,26 @@ func BACnetCalendarEntryParseWithBuffer(ctx context.Context, readBuffer utils.Re _ = peekedTagNumber // Validation - if !(bool((peekedTagHeader.GetTagClass()) == (TagClass_CONTEXT_SPECIFIC_TAGS))) { + if (!(bool((peekedTagHeader.GetTagClass()) == (TagClass_CONTEXT_SPECIFIC_TAGS)))) { return nil, errors.WithStack(utils.ParseValidationError{"Validation failed"}) } // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetCalendarEntryChildSerializeRequirement interface { BACnetCalendarEntry - InitializeParent(BACnetCalendarEntry, BACnetTagHeader) + InitializeParent(BACnetCalendarEntry, BACnetTagHeader) GetParent() BACnetCalendarEntry } var _childTemp interface{} var _child BACnetCalendarEntryChildSerializeRequirement var typeSwitchError error switch { - case peekedTagNumber == uint8(0): // BACnetCalendarEntryDate - _childTemp, typeSwitchError = BACnetCalendarEntryDateParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(1): // BACnetCalendarEntryDateRange - _childTemp, typeSwitchError = BACnetCalendarEntryDateRangeParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(2): // BACnetCalendarEntryWeekNDay - _childTemp, typeSwitchError = BACnetCalendarEntryWeekNDayParseWithBuffer(ctx, readBuffer) +case peekedTagNumber == uint8(0) : // BACnetCalendarEntryDate + _childTemp, typeSwitchError = BACnetCalendarEntryDateParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(1) : // BACnetCalendarEntryDateRange + _childTemp, typeSwitchError = BACnetCalendarEntryDateRangeParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(2) : // BACnetCalendarEntryWeekNDay + _childTemp, typeSwitchError = BACnetCalendarEntryWeekNDayParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedTagNumber=%v]", peekedTagNumber) } @@ -190,7 +194,7 @@ func BACnetCalendarEntryParseWithBuffer(ctx context.Context, readBuffer utils.Re } // Finish initializing - _child.InitializeParent(_child, peekedTagHeader) +_child.InitializeParent(_child , peekedTagHeader ) return _child, nil } @@ -200,7 +204,7 @@ func (pm *_BACnetCalendarEntry) SerializeParent(ctx context.Context, writeBuffer _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetCalendarEntry"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetCalendarEntry"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetCalendarEntry") } // Virtual field @@ -219,6 +223,7 @@ func (pm *_BACnetCalendarEntry) SerializeParent(ctx context.Context, writeBuffer return nil } + func (m *_BACnetCalendarEntry) isBACnetCalendarEntry() bool { return true } @@ -233,3 +238,6 @@ func (m *_BACnetCalendarEntry) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetCalendarEntryDate.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetCalendarEntryDate.go index eff1cb82333..fefbb870976 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetCalendarEntryDate.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetCalendarEntryDate.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetCalendarEntryDate is the corresponding interface of BACnetCalendarEntryDate type BACnetCalendarEntryDate interface { @@ -46,9 +48,11 @@ type BACnetCalendarEntryDateExactly interface { // _BACnetCalendarEntryDate is the data-structure of this message type _BACnetCalendarEntryDate struct { *_BACnetCalendarEntry - DateValue BACnetContextTagDate + DateValue BACnetContextTagDate } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetCalendarEntryDate struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetCalendarEntryDate) InitializeParent(parent BACnetCalendarEntry, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetCalendarEntryDate) InitializeParent(parent BACnetCalendarEntry , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetCalendarEntryDate) GetParent() BACnetCalendarEntry { +func (m *_BACnetCalendarEntryDate) GetParent() BACnetCalendarEntry { return m._BACnetCalendarEntry } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetCalendarEntryDate) GetDateValue() BACnetContextTagDate { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetCalendarEntryDate factory function for _BACnetCalendarEntryDate -func NewBACnetCalendarEntryDate(dateValue BACnetContextTagDate, peekedTagHeader BACnetTagHeader) *_BACnetCalendarEntryDate { +func NewBACnetCalendarEntryDate( dateValue BACnetContextTagDate , peekedTagHeader BACnetTagHeader ) *_BACnetCalendarEntryDate { _result := &_BACnetCalendarEntryDate{ - DateValue: dateValue, - _BACnetCalendarEntry: NewBACnetCalendarEntry(peekedTagHeader), + DateValue: dateValue, + _BACnetCalendarEntry: NewBACnetCalendarEntry(peekedTagHeader), } _result._BACnetCalendarEntry._BACnetCalendarEntryChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetCalendarEntryDate(dateValue BACnetContextTagDate, peekedTagHeader // Deprecated: use the interface for direct cast func CastBACnetCalendarEntryDate(structType interface{}) BACnetCalendarEntryDate { - if casted, ok := structType.(BACnetCalendarEntryDate); ok { + if casted, ok := structType.(BACnetCalendarEntryDate); ok { return casted } if casted, ok := structType.(*BACnetCalendarEntryDate); ok { @@ -115,6 +118,7 @@ func (m *_BACnetCalendarEntryDate) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetCalendarEntryDate) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetCalendarEntryDateParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("dateValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for dateValue") } - _dateValue, _dateValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_DATE)) +_dateValue, _dateValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_DATE ) ) if _dateValueErr != nil { return nil, errors.Wrap(_dateValueErr, "Error parsing 'dateValue' field of BACnetCalendarEntryDate") } @@ -151,8 +155,9 @@ func BACnetCalendarEntryDateParseWithBuffer(ctx context.Context, readBuffer util // Create a partially initialized instance _child := &_BACnetCalendarEntryDate{ - _BACnetCalendarEntry: &_BACnetCalendarEntry{}, - DateValue: dateValue, + _BACnetCalendarEntry: &_BACnetCalendarEntry{ + }, + DateValue: dateValue, } _child._BACnetCalendarEntry._BACnetCalendarEntryChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetCalendarEntryDate) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for BACnetCalendarEntryDate") } - // Simple Field (dateValue) - if pushErr := writeBuffer.PushContext("dateValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for dateValue") - } - _dateValueErr := writeBuffer.WriteSerializable(ctx, m.GetDateValue()) - if popErr := writeBuffer.PopContext("dateValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for dateValue") - } - if _dateValueErr != nil { - return errors.Wrap(_dateValueErr, "Error serializing 'dateValue' field") - } + // Simple Field (dateValue) + if pushErr := writeBuffer.PushContext("dateValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for dateValue") + } + _dateValueErr := writeBuffer.WriteSerializable(ctx, m.GetDateValue()) + if popErr := writeBuffer.PopContext("dateValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for dateValue") + } + if _dateValueErr != nil { + return errors.Wrap(_dateValueErr, "Error serializing 'dateValue' field") + } if popErr := writeBuffer.PopContext("BACnetCalendarEntryDate"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetCalendarEntryDate") @@ -194,6 +199,7 @@ func (m *_BACnetCalendarEntryDate) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetCalendarEntryDate) isBACnetCalendarEntryDate() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetCalendarEntryDate) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetCalendarEntryDateRange.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetCalendarEntryDateRange.go index ee58b31307e..d77476780e7 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetCalendarEntryDateRange.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetCalendarEntryDateRange.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetCalendarEntryDateRange is the corresponding interface of BACnetCalendarEntryDateRange type BACnetCalendarEntryDateRange interface { @@ -46,9 +48,11 @@ type BACnetCalendarEntryDateRangeExactly interface { // _BACnetCalendarEntryDateRange is the data-structure of this message type _BACnetCalendarEntryDateRange struct { *_BACnetCalendarEntry - DateRange BACnetDateRangeEnclosed + DateRange BACnetDateRangeEnclosed } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetCalendarEntryDateRange struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetCalendarEntryDateRange) InitializeParent(parent BACnetCalendarEntry, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetCalendarEntryDateRange) InitializeParent(parent BACnetCalendarEntry , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetCalendarEntryDateRange) GetParent() BACnetCalendarEntry { +func (m *_BACnetCalendarEntryDateRange) GetParent() BACnetCalendarEntry { return m._BACnetCalendarEntry } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetCalendarEntryDateRange) GetDateRange() BACnetDateRangeEnclosed { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetCalendarEntryDateRange factory function for _BACnetCalendarEntryDateRange -func NewBACnetCalendarEntryDateRange(dateRange BACnetDateRangeEnclosed, peekedTagHeader BACnetTagHeader) *_BACnetCalendarEntryDateRange { +func NewBACnetCalendarEntryDateRange( dateRange BACnetDateRangeEnclosed , peekedTagHeader BACnetTagHeader ) *_BACnetCalendarEntryDateRange { _result := &_BACnetCalendarEntryDateRange{ - DateRange: dateRange, - _BACnetCalendarEntry: NewBACnetCalendarEntry(peekedTagHeader), + DateRange: dateRange, + _BACnetCalendarEntry: NewBACnetCalendarEntry(peekedTagHeader), } _result._BACnetCalendarEntry._BACnetCalendarEntryChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetCalendarEntryDateRange(dateRange BACnetDateRangeEnclosed, peekedTa // Deprecated: use the interface for direct cast func CastBACnetCalendarEntryDateRange(structType interface{}) BACnetCalendarEntryDateRange { - if casted, ok := structType.(BACnetCalendarEntryDateRange); ok { + if casted, ok := structType.(BACnetCalendarEntryDateRange); ok { return casted } if casted, ok := structType.(*BACnetCalendarEntryDateRange); ok { @@ -115,6 +118,7 @@ func (m *_BACnetCalendarEntryDateRange) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_BACnetCalendarEntryDateRange) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetCalendarEntryDateRangeParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("dateRange"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for dateRange") } - _dateRange, _dateRangeErr := BACnetDateRangeEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(1))) +_dateRange, _dateRangeErr := BACnetDateRangeEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) ) if _dateRangeErr != nil { return nil, errors.Wrap(_dateRangeErr, "Error parsing 'dateRange' field of BACnetCalendarEntryDateRange") } @@ -151,8 +155,9 @@ func BACnetCalendarEntryDateRangeParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_BACnetCalendarEntryDateRange{ - _BACnetCalendarEntry: &_BACnetCalendarEntry{}, - DateRange: dateRange, + _BACnetCalendarEntry: &_BACnetCalendarEntry{ + }, + DateRange: dateRange, } _child._BACnetCalendarEntry._BACnetCalendarEntryChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetCalendarEntryDateRange) SerializeWithWriteBuffer(ctx context.Con return errors.Wrap(pushErr, "Error pushing for BACnetCalendarEntryDateRange") } - // Simple Field (dateRange) - if pushErr := writeBuffer.PushContext("dateRange"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for dateRange") - } - _dateRangeErr := writeBuffer.WriteSerializable(ctx, m.GetDateRange()) - if popErr := writeBuffer.PopContext("dateRange"); popErr != nil { - return errors.Wrap(popErr, "Error popping for dateRange") - } - if _dateRangeErr != nil { - return errors.Wrap(_dateRangeErr, "Error serializing 'dateRange' field") - } + // Simple Field (dateRange) + if pushErr := writeBuffer.PushContext("dateRange"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for dateRange") + } + _dateRangeErr := writeBuffer.WriteSerializable(ctx, m.GetDateRange()) + if popErr := writeBuffer.PopContext("dateRange"); popErr != nil { + return errors.Wrap(popErr, "Error popping for dateRange") + } + if _dateRangeErr != nil { + return errors.Wrap(_dateRangeErr, "Error serializing 'dateRange' field") + } if popErr := writeBuffer.PopContext("BACnetCalendarEntryDateRange"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetCalendarEntryDateRange") @@ -194,6 +199,7 @@ func (m *_BACnetCalendarEntryDateRange) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetCalendarEntryDateRange) isBACnetCalendarEntryDateRange() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetCalendarEntryDateRange) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetCalendarEntryEnclosed.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetCalendarEntryEnclosed.go index 32bc5328044..4bfa963e8f0 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetCalendarEntryEnclosed.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetCalendarEntryEnclosed.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetCalendarEntryEnclosed is the corresponding interface of BACnetCalendarEntryEnclosed type BACnetCalendarEntryEnclosed interface { @@ -48,14 +50,15 @@ type BACnetCalendarEntryEnclosedExactly interface { // _BACnetCalendarEntryEnclosed is the data-structure of this message type _BACnetCalendarEntryEnclosed struct { - OpeningTag BACnetOpeningTag - CalendarEntry BACnetCalendarEntry - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + CalendarEntry BACnetCalendarEntry + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -78,14 +81,15 @@ func (m *_BACnetCalendarEntryEnclosed) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetCalendarEntryEnclosed factory function for _BACnetCalendarEntryEnclosed -func NewBACnetCalendarEntryEnclosed(openingTag BACnetOpeningTag, calendarEntry BACnetCalendarEntry, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetCalendarEntryEnclosed { - return &_BACnetCalendarEntryEnclosed{OpeningTag: openingTag, CalendarEntry: calendarEntry, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetCalendarEntryEnclosed( openingTag BACnetOpeningTag , calendarEntry BACnetCalendarEntry , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetCalendarEntryEnclosed { +return &_BACnetCalendarEntryEnclosed{ OpeningTag: openingTag , CalendarEntry: calendarEntry , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetCalendarEntryEnclosed(structType interface{}) BACnetCalendarEntryEnclosed { - if casted, ok := structType.(BACnetCalendarEntryEnclosed); ok { + if casted, ok := structType.(BACnetCalendarEntryEnclosed); ok { return casted } if casted, ok := structType.(*BACnetCalendarEntryEnclosed); ok { @@ -113,6 +117,7 @@ func (m *_BACnetCalendarEntryEnclosed) GetLengthInBits(ctx context.Context) uint return lengthInBits } + func (m *_BACnetCalendarEntryEnclosed) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -134,7 +139,7 @@ func BACnetCalendarEntryEnclosedParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetCalendarEntryEnclosed") } @@ -147,7 +152,7 @@ func BACnetCalendarEntryEnclosedParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("calendarEntry"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for calendarEntry") } - _calendarEntry, _calendarEntryErr := BACnetCalendarEntryParseWithBuffer(ctx, readBuffer) +_calendarEntry, _calendarEntryErr := BACnetCalendarEntryParseWithBuffer(ctx, readBuffer) if _calendarEntryErr != nil { return nil, errors.Wrap(_calendarEntryErr, "Error parsing 'calendarEntry' field of BACnetCalendarEntryEnclosed") } @@ -160,7 +165,7 @@ func BACnetCalendarEntryEnclosedParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetCalendarEntryEnclosed") } @@ -175,11 +180,11 @@ func BACnetCalendarEntryEnclosedParseWithBuffer(ctx context.Context, readBuffer // Create the instance return &_BACnetCalendarEntryEnclosed{ - TagNumber: tagNumber, - OpeningTag: openingTag, - CalendarEntry: calendarEntry, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + CalendarEntry: calendarEntry, + ClosingTag: closingTag, + }, nil } func (m *_BACnetCalendarEntryEnclosed) Serialize() ([]byte, error) { @@ -193,7 +198,7 @@ func (m *_BACnetCalendarEntryEnclosed) Serialize() ([]byte, error) { func (m *_BACnetCalendarEntryEnclosed) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetCalendarEntryEnclosed"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetCalendarEntryEnclosed"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetCalendarEntryEnclosed") } @@ -239,13 +244,13 @@ func (m *_BACnetCalendarEntryEnclosed) SerializeWithWriteBuffer(ctx context.Cont return nil } + //// // Arguments Getter func (m *_BACnetCalendarEntryEnclosed) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -263,3 +268,6 @@ func (m *_BACnetCalendarEntryEnclosed) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetCalendarEntryWeekNDay.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetCalendarEntryWeekNDay.go index a0e4d59bd3d..459fd41ff9e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetCalendarEntryWeekNDay.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetCalendarEntryWeekNDay.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetCalendarEntryWeekNDay is the corresponding interface of BACnetCalendarEntryWeekNDay type BACnetCalendarEntryWeekNDay interface { @@ -46,9 +48,11 @@ type BACnetCalendarEntryWeekNDayExactly interface { // _BACnetCalendarEntryWeekNDay is the data-structure of this message type _BACnetCalendarEntryWeekNDay struct { *_BACnetCalendarEntry - WeekNDay BACnetWeekNDayTagged + WeekNDay BACnetWeekNDayTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetCalendarEntryWeekNDay struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetCalendarEntryWeekNDay) InitializeParent(parent BACnetCalendarEntry, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetCalendarEntryWeekNDay) InitializeParent(parent BACnetCalendarEntry , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetCalendarEntryWeekNDay) GetParent() BACnetCalendarEntry { +func (m *_BACnetCalendarEntryWeekNDay) GetParent() BACnetCalendarEntry { return m._BACnetCalendarEntry } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetCalendarEntryWeekNDay) GetWeekNDay() BACnetWeekNDayTagged { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetCalendarEntryWeekNDay factory function for _BACnetCalendarEntryWeekNDay -func NewBACnetCalendarEntryWeekNDay(weekNDay BACnetWeekNDayTagged, peekedTagHeader BACnetTagHeader) *_BACnetCalendarEntryWeekNDay { +func NewBACnetCalendarEntryWeekNDay( weekNDay BACnetWeekNDayTagged , peekedTagHeader BACnetTagHeader ) *_BACnetCalendarEntryWeekNDay { _result := &_BACnetCalendarEntryWeekNDay{ - WeekNDay: weekNDay, - _BACnetCalendarEntry: NewBACnetCalendarEntry(peekedTagHeader), + WeekNDay: weekNDay, + _BACnetCalendarEntry: NewBACnetCalendarEntry(peekedTagHeader), } _result._BACnetCalendarEntry._BACnetCalendarEntryChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetCalendarEntryWeekNDay(weekNDay BACnetWeekNDayTagged, peekedTagHead // Deprecated: use the interface for direct cast func CastBACnetCalendarEntryWeekNDay(structType interface{}) BACnetCalendarEntryWeekNDay { - if casted, ok := structType.(BACnetCalendarEntryWeekNDay); ok { + if casted, ok := structType.(BACnetCalendarEntryWeekNDay); ok { return casted } if casted, ok := structType.(*BACnetCalendarEntryWeekNDay); ok { @@ -115,6 +118,7 @@ func (m *_BACnetCalendarEntryWeekNDay) GetLengthInBits(ctx context.Context) uint return lengthInBits } + func (m *_BACnetCalendarEntryWeekNDay) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetCalendarEntryWeekNDayParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("weekNDay"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for weekNDay") } - _weekNDay, _weekNDayErr := BACnetWeekNDayTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_weekNDay, _weekNDayErr := BACnetWeekNDayTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _weekNDayErr != nil { return nil, errors.Wrap(_weekNDayErr, "Error parsing 'weekNDay' field of BACnetCalendarEntryWeekNDay") } @@ -151,8 +155,9 @@ func BACnetCalendarEntryWeekNDayParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_BACnetCalendarEntryWeekNDay{ - _BACnetCalendarEntry: &_BACnetCalendarEntry{}, - WeekNDay: weekNDay, + _BACnetCalendarEntry: &_BACnetCalendarEntry{ + }, + WeekNDay: weekNDay, } _child._BACnetCalendarEntry._BACnetCalendarEntryChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetCalendarEntryWeekNDay) SerializeWithWriteBuffer(ctx context.Cont return errors.Wrap(pushErr, "Error pushing for BACnetCalendarEntryWeekNDay") } - // Simple Field (weekNDay) - if pushErr := writeBuffer.PushContext("weekNDay"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for weekNDay") - } - _weekNDayErr := writeBuffer.WriteSerializable(ctx, m.GetWeekNDay()) - if popErr := writeBuffer.PopContext("weekNDay"); popErr != nil { - return errors.Wrap(popErr, "Error popping for weekNDay") - } - if _weekNDayErr != nil { - return errors.Wrap(_weekNDayErr, "Error serializing 'weekNDay' field") - } + // Simple Field (weekNDay) + if pushErr := writeBuffer.PushContext("weekNDay"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for weekNDay") + } + _weekNDayErr := writeBuffer.WriteSerializable(ctx, m.GetWeekNDay()) + if popErr := writeBuffer.PopContext("weekNDay"); popErr != nil { + return errors.Wrap(popErr, "Error popping for weekNDay") + } + if _weekNDayErr != nil { + return errors.Wrap(_weekNDayErr, "Error serializing 'weekNDay' field") + } if popErr := writeBuffer.PopContext("BACnetCalendarEntryWeekNDay"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetCalendarEntryWeekNDay") @@ -194,6 +199,7 @@ func (m *_BACnetCalendarEntryWeekNDay) SerializeWithWriteBuffer(ctx context.Cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetCalendarEntryWeekNDay) isBACnetCalendarEntryWeekNDay() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetCalendarEntryWeekNDay) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValue.go index e100ff3b86c..3eba4017b4d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetChannelValue is the corresponding interface of BACnetChannelValue type BACnetChannelValue interface { @@ -49,7 +51,7 @@ type BACnetChannelValueExactly interface { // _BACnetChannelValue is the data-structure of this message type _BACnetChannelValue struct { _BACnetChannelValueChildRequirements - PeekedTagHeader BACnetTagHeader + PeekedTagHeader BACnetTagHeader } type _BACnetChannelValueChildRequirements interface { @@ -57,6 +59,7 @@ type _BACnetChannelValueChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type BACnetChannelValueParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetChannelValue, serializeChildFunction func() error) error GetTypeName() string @@ -64,13 +67,12 @@ type BACnetChannelValueParent interface { type BACnetChannelValueChild interface { utils.Serializable - InitializeParent(parent BACnetChannelValue, peekedTagHeader BACnetTagHeader) +InitializeParent(parent BACnetChannelValue , peekedTagHeader BACnetTagHeader ) GetParent() *BACnetChannelValue GetTypeName() string BACnetChannelValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -106,14 +108,15 @@ func (m *_BACnetChannelValue) GetPeekedIsContextTag() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetChannelValue factory function for _BACnetChannelValue -func NewBACnetChannelValue(peekedTagHeader BACnetTagHeader) *_BACnetChannelValue { - return &_BACnetChannelValue{PeekedTagHeader: peekedTagHeader} +func NewBACnetChannelValue( peekedTagHeader BACnetTagHeader ) *_BACnetChannelValue { +return &_BACnetChannelValue{ PeekedTagHeader: peekedTagHeader } } // Deprecated: use the interface for direct cast func CastBACnetChannelValue(structType interface{}) BACnetChannelValue { - if casted, ok := structType.(BACnetChannelValue); ok { + if casted, ok := structType.(BACnetChannelValue); ok { return casted } if casted, ok := structType.(*BACnetChannelValue); ok { @@ -126,6 +129,7 @@ func (m *_BACnetChannelValue) GetTypeName() string { return "BACnetChannelValue" } + func (m *_BACnetChannelValue) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -153,13 +157,13 @@ func BACnetChannelValueParseWithBuffer(ctx context.Context, readBuffer utils.Rea currentPos := positionAware.GetPos() _ = currentPos - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Virtual field _peekedTagNumber := peekedTagHeader.GetActualTagNumber() @@ -172,48 +176,48 @@ func BACnetChannelValueParseWithBuffer(ctx context.Context, readBuffer utils.Rea _ = peekedIsContextTag // Validation - if !(bool((!(peekedIsContextTag))) || bool((bool(bool(peekedIsContextTag) && bool(bool((peekedTagHeader.GetLengthValueType()) != (0x6)))) && bool(bool((peekedTagHeader.GetLengthValueType()) != (0x7)))))) { + if (!(bool((!(peekedIsContextTag))) || bool((bool(bool(peekedIsContextTag) && bool(bool((peekedTagHeader.GetLengthValueType()) != (0x6)))) && bool(bool((peekedTagHeader.GetLengthValueType()) != (0x7))))))) { return nil, errors.WithStack(utils.ParseValidationError{"unexpected opening or closing tag"}) } // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetChannelValueChildSerializeRequirement interface { BACnetChannelValue - InitializeParent(BACnetChannelValue, BACnetTagHeader) + InitializeParent(BACnetChannelValue, BACnetTagHeader) GetParent() BACnetChannelValue } var _childTemp interface{} var _child BACnetChannelValueChildSerializeRequirement var typeSwitchError error switch { - case peekedTagNumber == 0x0 && peekedIsContextTag == bool(false): // BACnetChannelValueNull - _childTemp, typeSwitchError = BACnetChannelValueNullParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == 0x4 && peekedIsContextTag == bool(false): // BACnetChannelValueReal - _childTemp, typeSwitchError = BACnetChannelValueRealParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == 0x9 && peekedIsContextTag == bool(false): // BACnetChannelValueEnumerated - _childTemp, typeSwitchError = BACnetChannelValueEnumeratedParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == 0x2 && peekedIsContextTag == bool(false): // BACnetChannelValueUnsigned - _childTemp, typeSwitchError = BACnetChannelValueUnsignedParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == 0x1 && peekedIsContextTag == bool(false): // BACnetChannelValueBoolean - _childTemp, typeSwitchError = BACnetChannelValueBooleanParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == 0x3 && peekedIsContextTag == bool(false): // BACnetChannelValueInteger - _childTemp, typeSwitchError = BACnetChannelValueIntegerParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == 0x5 && peekedIsContextTag == bool(false): // BACnetChannelValueDouble - _childTemp, typeSwitchError = BACnetChannelValueDoubleParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == 0xB && peekedIsContextTag == bool(false): // BACnetChannelValueTime - _childTemp, typeSwitchError = BACnetChannelValueTimeParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == 0x7 && peekedIsContextTag == bool(false): // BACnetChannelValueCharacterString - _childTemp, typeSwitchError = BACnetChannelValueCharacterStringParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == 0x6 && peekedIsContextTag == bool(false): // BACnetChannelValueOctetString - _childTemp, typeSwitchError = BACnetChannelValueOctetStringParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == 0x8 && peekedIsContextTag == bool(false): // BACnetChannelValueBitString - _childTemp, typeSwitchError = BACnetChannelValueBitStringParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == 0xA && peekedIsContextTag == bool(false): // BACnetChannelValueDate - _childTemp, typeSwitchError = BACnetChannelValueDateParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == 0xC && peekedIsContextTag == bool(false): // BACnetChannelValueObjectidentifier - _childTemp, typeSwitchError = BACnetChannelValueObjectidentifierParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(0) && peekedIsContextTag == bool(true): // BACnetChannelValueLightingCommand - _childTemp, typeSwitchError = BACnetChannelValueLightingCommandParseWithBuffer(ctx, readBuffer) +case peekedTagNumber == 0x0 && peekedIsContextTag == bool(false) : // BACnetChannelValueNull + _childTemp, typeSwitchError = BACnetChannelValueNullParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == 0x4 && peekedIsContextTag == bool(false) : // BACnetChannelValueReal + _childTemp, typeSwitchError = BACnetChannelValueRealParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == 0x9 && peekedIsContextTag == bool(false) : // BACnetChannelValueEnumerated + _childTemp, typeSwitchError = BACnetChannelValueEnumeratedParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == 0x2 && peekedIsContextTag == bool(false) : // BACnetChannelValueUnsigned + _childTemp, typeSwitchError = BACnetChannelValueUnsignedParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == 0x1 && peekedIsContextTag == bool(false) : // BACnetChannelValueBoolean + _childTemp, typeSwitchError = BACnetChannelValueBooleanParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == 0x3 && peekedIsContextTag == bool(false) : // BACnetChannelValueInteger + _childTemp, typeSwitchError = BACnetChannelValueIntegerParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == 0x5 && peekedIsContextTag == bool(false) : // BACnetChannelValueDouble + _childTemp, typeSwitchError = BACnetChannelValueDoubleParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == 0xB && peekedIsContextTag == bool(false) : // BACnetChannelValueTime + _childTemp, typeSwitchError = BACnetChannelValueTimeParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == 0x7 && peekedIsContextTag == bool(false) : // BACnetChannelValueCharacterString + _childTemp, typeSwitchError = BACnetChannelValueCharacterStringParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == 0x6 && peekedIsContextTag == bool(false) : // BACnetChannelValueOctetString + _childTemp, typeSwitchError = BACnetChannelValueOctetStringParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == 0x8 && peekedIsContextTag == bool(false) : // BACnetChannelValueBitString + _childTemp, typeSwitchError = BACnetChannelValueBitStringParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == 0xA && peekedIsContextTag == bool(false) : // BACnetChannelValueDate + _childTemp, typeSwitchError = BACnetChannelValueDateParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == 0xC && peekedIsContextTag == bool(false) : // BACnetChannelValueObjectidentifier + _childTemp, typeSwitchError = BACnetChannelValueObjectidentifierParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(0) && peekedIsContextTag == bool(true) : // BACnetChannelValueLightingCommand + _childTemp, typeSwitchError = BACnetChannelValueLightingCommandParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedTagNumber=%v, peekedIsContextTag=%v]", peekedTagNumber, peekedIsContextTag) } @@ -227,7 +231,7 @@ func BACnetChannelValueParseWithBuffer(ctx context.Context, readBuffer utils.Rea } // Finish initializing - _child.InitializeParent(_child, peekedTagHeader) +_child.InitializeParent(_child , peekedTagHeader ) return _child, nil } @@ -237,7 +241,7 @@ func (pm *_BACnetChannelValue) SerializeParent(ctx context.Context, writeBuffer _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetChannelValue"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetChannelValue"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetChannelValue") } // Virtual field @@ -260,6 +264,7 @@ func (pm *_BACnetChannelValue) SerializeParent(ctx context.Context, writeBuffer return nil } + func (m *_BACnetChannelValue) isBACnetChannelValue() bool { return true } @@ -274,3 +279,6 @@ func (m *_BACnetChannelValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueBitString.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueBitString.go index 1b01a67a77e..1f5c6d2cfbc 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueBitString.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueBitString.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetChannelValueBitString is the corresponding interface of BACnetChannelValueBitString type BACnetChannelValueBitString interface { @@ -46,9 +48,11 @@ type BACnetChannelValueBitStringExactly interface { // _BACnetChannelValueBitString is the data-structure of this message type _BACnetChannelValueBitString struct { *_BACnetChannelValue - BitStringValue BACnetApplicationTagBitString + BitStringValue BACnetApplicationTagBitString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetChannelValueBitString struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetChannelValueBitString) InitializeParent(parent BACnetChannelValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetChannelValueBitString) InitializeParent(parent BACnetChannelValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetChannelValueBitString) GetParent() BACnetChannelValue { +func (m *_BACnetChannelValueBitString) GetParent() BACnetChannelValue { return m._BACnetChannelValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetChannelValueBitString) GetBitStringValue() BACnetApplicationTagB /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetChannelValueBitString factory function for _BACnetChannelValueBitString -func NewBACnetChannelValueBitString(bitStringValue BACnetApplicationTagBitString, peekedTagHeader BACnetTagHeader) *_BACnetChannelValueBitString { +func NewBACnetChannelValueBitString( bitStringValue BACnetApplicationTagBitString , peekedTagHeader BACnetTagHeader ) *_BACnetChannelValueBitString { _result := &_BACnetChannelValueBitString{ - BitStringValue: bitStringValue, - _BACnetChannelValue: NewBACnetChannelValue(peekedTagHeader), + BitStringValue: bitStringValue, + _BACnetChannelValue: NewBACnetChannelValue(peekedTagHeader), } _result._BACnetChannelValue._BACnetChannelValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetChannelValueBitString(bitStringValue BACnetApplicationTagBitString // Deprecated: use the interface for direct cast func CastBACnetChannelValueBitString(structType interface{}) BACnetChannelValueBitString { - if casted, ok := structType.(BACnetChannelValueBitString); ok { + if casted, ok := structType.(BACnetChannelValueBitString); ok { return casted } if casted, ok := structType.(*BACnetChannelValueBitString); ok { @@ -115,6 +118,7 @@ func (m *_BACnetChannelValueBitString) GetLengthInBits(ctx context.Context) uint return lengthInBits } + func (m *_BACnetChannelValueBitString) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetChannelValueBitStringParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("bitStringValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for bitStringValue") } - _bitStringValue, _bitStringValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_bitStringValue, _bitStringValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _bitStringValueErr != nil { return nil, errors.Wrap(_bitStringValueErr, "Error parsing 'bitStringValue' field of BACnetChannelValueBitString") } @@ -151,8 +155,9 @@ func BACnetChannelValueBitStringParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_BACnetChannelValueBitString{ - _BACnetChannelValue: &_BACnetChannelValue{}, - BitStringValue: bitStringValue, + _BACnetChannelValue: &_BACnetChannelValue{ + }, + BitStringValue: bitStringValue, } _child._BACnetChannelValue._BACnetChannelValueChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetChannelValueBitString) SerializeWithWriteBuffer(ctx context.Cont return errors.Wrap(pushErr, "Error pushing for BACnetChannelValueBitString") } - // Simple Field (bitStringValue) - if pushErr := writeBuffer.PushContext("bitStringValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for bitStringValue") - } - _bitStringValueErr := writeBuffer.WriteSerializable(ctx, m.GetBitStringValue()) - if popErr := writeBuffer.PopContext("bitStringValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for bitStringValue") - } - if _bitStringValueErr != nil { - return errors.Wrap(_bitStringValueErr, "Error serializing 'bitStringValue' field") - } + // Simple Field (bitStringValue) + if pushErr := writeBuffer.PushContext("bitStringValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for bitStringValue") + } + _bitStringValueErr := writeBuffer.WriteSerializable(ctx, m.GetBitStringValue()) + if popErr := writeBuffer.PopContext("bitStringValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for bitStringValue") + } + if _bitStringValueErr != nil { + return errors.Wrap(_bitStringValueErr, "Error serializing 'bitStringValue' field") + } if popErr := writeBuffer.PopContext("BACnetChannelValueBitString"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetChannelValueBitString") @@ -194,6 +199,7 @@ func (m *_BACnetChannelValueBitString) SerializeWithWriteBuffer(ctx context.Cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetChannelValueBitString) isBACnetChannelValueBitString() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetChannelValueBitString) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueBoolean.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueBoolean.go index ebfd379ccf5..9f700770e6b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueBoolean.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueBoolean.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetChannelValueBoolean is the corresponding interface of BACnetChannelValueBoolean type BACnetChannelValueBoolean interface { @@ -46,9 +48,11 @@ type BACnetChannelValueBooleanExactly interface { // _BACnetChannelValueBoolean is the data-structure of this message type _BACnetChannelValueBoolean struct { *_BACnetChannelValue - BooleanValue BACnetApplicationTagBoolean + BooleanValue BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetChannelValueBoolean struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetChannelValueBoolean) InitializeParent(parent BACnetChannelValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetChannelValueBoolean) InitializeParent(parent BACnetChannelValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetChannelValueBoolean) GetParent() BACnetChannelValue { +func (m *_BACnetChannelValueBoolean) GetParent() BACnetChannelValue { return m._BACnetChannelValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetChannelValueBoolean) GetBooleanValue() BACnetApplicationTagBoole /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetChannelValueBoolean factory function for _BACnetChannelValueBoolean -func NewBACnetChannelValueBoolean(booleanValue BACnetApplicationTagBoolean, peekedTagHeader BACnetTagHeader) *_BACnetChannelValueBoolean { +func NewBACnetChannelValueBoolean( booleanValue BACnetApplicationTagBoolean , peekedTagHeader BACnetTagHeader ) *_BACnetChannelValueBoolean { _result := &_BACnetChannelValueBoolean{ - BooleanValue: booleanValue, - _BACnetChannelValue: NewBACnetChannelValue(peekedTagHeader), + BooleanValue: booleanValue, + _BACnetChannelValue: NewBACnetChannelValue(peekedTagHeader), } _result._BACnetChannelValue._BACnetChannelValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetChannelValueBoolean(booleanValue BACnetApplicationTagBoolean, peek // Deprecated: use the interface for direct cast func CastBACnetChannelValueBoolean(structType interface{}) BACnetChannelValueBoolean { - if casted, ok := structType.(BACnetChannelValueBoolean); ok { + if casted, ok := structType.(BACnetChannelValueBoolean); ok { return casted } if casted, ok := structType.(*BACnetChannelValueBoolean); ok { @@ -115,6 +118,7 @@ func (m *_BACnetChannelValueBoolean) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_BACnetChannelValueBoolean) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetChannelValueBooleanParseWithBuffer(ctx context.Context, readBuffer ut if pullErr := readBuffer.PullContext("booleanValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for booleanValue") } - _booleanValue, _booleanValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_booleanValue, _booleanValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _booleanValueErr != nil { return nil, errors.Wrap(_booleanValueErr, "Error parsing 'booleanValue' field of BACnetChannelValueBoolean") } @@ -151,8 +155,9 @@ func BACnetChannelValueBooleanParseWithBuffer(ctx context.Context, readBuffer ut // Create a partially initialized instance _child := &_BACnetChannelValueBoolean{ - _BACnetChannelValue: &_BACnetChannelValue{}, - BooleanValue: booleanValue, + _BACnetChannelValue: &_BACnetChannelValue{ + }, + BooleanValue: booleanValue, } _child._BACnetChannelValue._BACnetChannelValueChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetChannelValueBoolean) SerializeWithWriteBuffer(ctx context.Contex return errors.Wrap(pushErr, "Error pushing for BACnetChannelValueBoolean") } - // Simple Field (booleanValue) - if pushErr := writeBuffer.PushContext("booleanValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for booleanValue") - } - _booleanValueErr := writeBuffer.WriteSerializable(ctx, m.GetBooleanValue()) - if popErr := writeBuffer.PopContext("booleanValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for booleanValue") - } - if _booleanValueErr != nil { - return errors.Wrap(_booleanValueErr, "Error serializing 'booleanValue' field") - } + // Simple Field (booleanValue) + if pushErr := writeBuffer.PushContext("booleanValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for booleanValue") + } + _booleanValueErr := writeBuffer.WriteSerializable(ctx, m.GetBooleanValue()) + if popErr := writeBuffer.PopContext("booleanValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for booleanValue") + } + if _booleanValueErr != nil { + return errors.Wrap(_booleanValueErr, "Error serializing 'booleanValue' field") + } if popErr := writeBuffer.PopContext("BACnetChannelValueBoolean"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetChannelValueBoolean") @@ -194,6 +199,7 @@ func (m *_BACnetChannelValueBoolean) SerializeWithWriteBuffer(ctx context.Contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetChannelValueBoolean) isBACnetChannelValueBoolean() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetChannelValueBoolean) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueCharacterString.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueCharacterString.go index c6c0f4969be..8b9299599ea 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueCharacterString.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueCharacterString.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetChannelValueCharacterString is the corresponding interface of BACnetChannelValueCharacterString type BACnetChannelValueCharacterString interface { @@ -46,9 +48,11 @@ type BACnetChannelValueCharacterStringExactly interface { // _BACnetChannelValueCharacterString is the data-structure of this message type _BACnetChannelValueCharacterString struct { *_BACnetChannelValue - CharacterStringValue BACnetApplicationTagCharacterString + CharacterStringValue BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetChannelValueCharacterString struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetChannelValueCharacterString) InitializeParent(parent BACnetChannelValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetChannelValueCharacterString) InitializeParent(parent BACnetChannelValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetChannelValueCharacterString) GetParent() BACnetChannelValue { +func (m *_BACnetChannelValueCharacterString) GetParent() BACnetChannelValue { return m._BACnetChannelValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetChannelValueCharacterString) GetCharacterStringValue() BACnetApp /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetChannelValueCharacterString factory function for _BACnetChannelValueCharacterString -func NewBACnetChannelValueCharacterString(characterStringValue BACnetApplicationTagCharacterString, peekedTagHeader BACnetTagHeader) *_BACnetChannelValueCharacterString { +func NewBACnetChannelValueCharacterString( characterStringValue BACnetApplicationTagCharacterString , peekedTagHeader BACnetTagHeader ) *_BACnetChannelValueCharacterString { _result := &_BACnetChannelValueCharacterString{ CharacterStringValue: characterStringValue, - _BACnetChannelValue: NewBACnetChannelValue(peekedTagHeader), + _BACnetChannelValue: NewBACnetChannelValue(peekedTagHeader), } _result._BACnetChannelValue._BACnetChannelValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetChannelValueCharacterString(characterStringValue BACnetApplication // Deprecated: use the interface for direct cast func CastBACnetChannelValueCharacterString(structType interface{}) BACnetChannelValueCharacterString { - if casted, ok := structType.(BACnetChannelValueCharacterString); ok { + if casted, ok := structType.(BACnetChannelValueCharacterString); ok { return casted } if casted, ok := structType.(*BACnetChannelValueCharacterString); ok { @@ -115,6 +118,7 @@ func (m *_BACnetChannelValueCharacterString) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetChannelValueCharacterString) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetChannelValueCharacterStringParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("characterStringValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for characterStringValue") } - _characterStringValue, _characterStringValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_characterStringValue, _characterStringValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _characterStringValueErr != nil { return nil, errors.Wrap(_characterStringValueErr, "Error parsing 'characterStringValue' field of BACnetChannelValueCharacterString") } @@ -151,7 +155,8 @@ func BACnetChannelValueCharacterStringParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetChannelValueCharacterString{ - _BACnetChannelValue: &_BACnetChannelValue{}, + _BACnetChannelValue: &_BACnetChannelValue{ + }, CharacterStringValue: characterStringValue, } _child._BACnetChannelValue._BACnetChannelValueChildRequirements = _child @@ -174,17 +179,17 @@ func (m *_BACnetChannelValueCharacterString) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetChannelValueCharacterString") } - // Simple Field (characterStringValue) - if pushErr := writeBuffer.PushContext("characterStringValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for characterStringValue") - } - _characterStringValueErr := writeBuffer.WriteSerializable(ctx, m.GetCharacterStringValue()) - if popErr := writeBuffer.PopContext("characterStringValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for characterStringValue") - } - if _characterStringValueErr != nil { - return errors.Wrap(_characterStringValueErr, "Error serializing 'characterStringValue' field") - } + // Simple Field (characterStringValue) + if pushErr := writeBuffer.PushContext("characterStringValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for characterStringValue") + } + _characterStringValueErr := writeBuffer.WriteSerializable(ctx, m.GetCharacterStringValue()) + if popErr := writeBuffer.PopContext("characterStringValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for characterStringValue") + } + if _characterStringValueErr != nil { + return errors.Wrap(_characterStringValueErr, "Error serializing 'characterStringValue' field") + } if popErr := writeBuffer.PopContext("BACnetChannelValueCharacterString"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetChannelValueCharacterString") @@ -194,6 +199,7 @@ func (m *_BACnetChannelValueCharacterString) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetChannelValueCharacterString) isBACnetChannelValueCharacterString() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetChannelValueCharacterString) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueDate.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueDate.go index 49693ebef6d..bc51201ad8f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueDate.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueDate.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetChannelValueDate is the corresponding interface of BACnetChannelValueDate type BACnetChannelValueDate interface { @@ -46,9 +48,11 @@ type BACnetChannelValueDateExactly interface { // _BACnetChannelValueDate is the data-structure of this message type _BACnetChannelValueDate struct { *_BACnetChannelValue - DateValue BACnetApplicationTagDate + DateValue BACnetApplicationTagDate } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetChannelValueDate struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetChannelValueDate) InitializeParent(parent BACnetChannelValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetChannelValueDate) InitializeParent(parent BACnetChannelValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetChannelValueDate) GetParent() BACnetChannelValue { +func (m *_BACnetChannelValueDate) GetParent() BACnetChannelValue { return m._BACnetChannelValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetChannelValueDate) GetDateValue() BACnetApplicationTagDate { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetChannelValueDate factory function for _BACnetChannelValueDate -func NewBACnetChannelValueDate(dateValue BACnetApplicationTagDate, peekedTagHeader BACnetTagHeader) *_BACnetChannelValueDate { +func NewBACnetChannelValueDate( dateValue BACnetApplicationTagDate , peekedTagHeader BACnetTagHeader ) *_BACnetChannelValueDate { _result := &_BACnetChannelValueDate{ - DateValue: dateValue, - _BACnetChannelValue: NewBACnetChannelValue(peekedTagHeader), + DateValue: dateValue, + _BACnetChannelValue: NewBACnetChannelValue(peekedTagHeader), } _result._BACnetChannelValue._BACnetChannelValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetChannelValueDate(dateValue BACnetApplicationTagDate, peekedTagHead // Deprecated: use the interface for direct cast func CastBACnetChannelValueDate(structType interface{}) BACnetChannelValueDate { - if casted, ok := structType.(BACnetChannelValueDate); ok { + if casted, ok := structType.(BACnetChannelValueDate); ok { return casted } if casted, ok := structType.(*BACnetChannelValueDate); ok { @@ -115,6 +118,7 @@ func (m *_BACnetChannelValueDate) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetChannelValueDate) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetChannelValueDateParseWithBuffer(ctx context.Context, readBuffer utils if pullErr := readBuffer.PullContext("dateValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for dateValue") } - _dateValue, _dateValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_dateValue, _dateValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _dateValueErr != nil { return nil, errors.Wrap(_dateValueErr, "Error parsing 'dateValue' field of BACnetChannelValueDate") } @@ -151,8 +155,9 @@ func BACnetChannelValueDateParseWithBuffer(ctx context.Context, readBuffer utils // Create a partially initialized instance _child := &_BACnetChannelValueDate{ - _BACnetChannelValue: &_BACnetChannelValue{}, - DateValue: dateValue, + _BACnetChannelValue: &_BACnetChannelValue{ + }, + DateValue: dateValue, } _child._BACnetChannelValue._BACnetChannelValueChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetChannelValueDate) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for BACnetChannelValueDate") } - // Simple Field (dateValue) - if pushErr := writeBuffer.PushContext("dateValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for dateValue") - } - _dateValueErr := writeBuffer.WriteSerializable(ctx, m.GetDateValue()) - if popErr := writeBuffer.PopContext("dateValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for dateValue") - } - if _dateValueErr != nil { - return errors.Wrap(_dateValueErr, "Error serializing 'dateValue' field") - } + // Simple Field (dateValue) + if pushErr := writeBuffer.PushContext("dateValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for dateValue") + } + _dateValueErr := writeBuffer.WriteSerializable(ctx, m.GetDateValue()) + if popErr := writeBuffer.PopContext("dateValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for dateValue") + } + if _dateValueErr != nil { + return errors.Wrap(_dateValueErr, "Error serializing 'dateValue' field") + } if popErr := writeBuffer.PopContext("BACnetChannelValueDate"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetChannelValueDate") @@ -194,6 +199,7 @@ func (m *_BACnetChannelValueDate) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetChannelValueDate) isBACnetChannelValueDate() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetChannelValueDate) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueDouble.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueDouble.go index 8fae58e8211..ee59d96e8ba 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueDouble.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueDouble.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetChannelValueDouble is the corresponding interface of BACnetChannelValueDouble type BACnetChannelValueDouble interface { @@ -46,9 +48,11 @@ type BACnetChannelValueDoubleExactly interface { // _BACnetChannelValueDouble is the data-structure of this message type _BACnetChannelValueDouble struct { *_BACnetChannelValue - DoubleValue BACnetApplicationTagDouble + DoubleValue BACnetApplicationTagDouble } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetChannelValueDouble struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetChannelValueDouble) InitializeParent(parent BACnetChannelValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetChannelValueDouble) InitializeParent(parent BACnetChannelValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetChannelValueDouble) GetParent() BACnetChannelValue { +func (m *_BACnetChannelValueDouble) GetParent() BACnetChannelValue { return m._BACnetChannelValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetChannelValueDouble) GetDoubleValue() BACnetApplicationTagDouble /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetChannelValueDouble factory function for _BACnetChannelValueDouble -func NewBACnetChannelValueDouble(doubleValue BACnetApplicationTagDouble, peekedTagHeader BACnetTagHeader) *_BACnetChannelValueDouble { +func NewBACnetChannelValueDouble( doubleValue BACnetApplicationTagDouble , peekedTagHeader BACnetTagHeader ) *_BACnetChannelValueDouble { _result := &_BACnetChannelValueDouble{ - DoubleValue: doubleValue, - _BACnetChannelValue: NewBACnetChannelValue(peekedTagHeader), + DoubleValue: doubleValue, + _BACnetChannelValue: NewBACnetChannelValue(peekedTagHeader), } _result._BACnetChannelValue._BACnetChannelValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetChannelValueDouble(doubleValue BACnetApplicationTagDouble, peekedT // Deprecated: use the interface for direct cast func CastBACnetChannelValueDouble(structType interface{}) BACnetChannelValueDouble { - if casted, ok := structType.(BACnetChannelValueDouble); ok { + if casted, ok := structType.(BACnetChannelValueDouble); ok { return casted } if casted, ok := structType.(*BACnetChannelValueDouble); ok { @@ -115,6 +118,7 @@ func (m *_BACnetChannelValueDouble) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_BACnetChannelValueDouble) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetChannelValueDoubleParseWithBuffer(ctx context.Context, readBuffer uti if pullErr := readBuffer.PullContext("doubleValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for doubleValue") } - _doubleValue, _doubleValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_doubleValue, _doubleValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _doubleValueErr != nil { return nil, errors.Wrap(_doubleValueErr, "Error parsing 'doubleValue' field of BACnetChannelValueDouble") } @@ -151,8 +155,9 @@ func BACnetChannelValueDoubleParseWithBuffer(ctx context.Context, readBuffer uti // Create a partially initialized instance _child := &_BACnetChannelValueDouble{ - _BACnetChannelValue: &_BACnetChannelValue{}, - DoubleValue: doubleValue, + _BACnetChannelValue: &_BACnetChannelValue{ + }, + DoubleValue: doubleValue, } _child._BACnetChannelValue._BACnetChannelValueChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetChannelValueDouble) SerializeWithWriteBuffer(ctx context.Context return errors.Wrap(pushErr, "Error pushing for BACnetChannelValueDouble") } - // Simple Field (doubleValue) - if pushErr := writeBuffer.PushContext("doubleValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for doubleValue") - } - _doubleValueErr := writeBuffer.WriteSerializable(ctx, m.GetDoubleValue()) - if popErr := writeBuffer.PopContext("doubleValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for doubleValue") - } - if _doubleValueErr != nil { - return errors.Wrap(_doubleValueErr, "Error serializing 'doubleValue' field") - } + // Simple Field (doubleValue) + if pushErr := writeBuffer.PushContext("doubleValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for doubleValue") + } + _doubleValueErr := writeBuffer.WriteSerializable(ctx, m.GetDoubleValue()) + if popErr := writeBuffer.PopContext("doubleValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for doubleValue") + } + if _doubleValueErr != nil { + return errors.Wrap(_doubleValueErr, "Error serializing 'doubleValue' field") + } if popErr := writeBuffer.PopContext("BACnetChannelValueDouble"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetChannelValueDouble") @@ -194,6 +199,7 @@ func (m *_BACnetChannelValueDouble) SerializeWithWriteBuffer(ctx context.Context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetChannelValueDouble) isBACnetChannelValueDouble() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetChannelValueDouble) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueEnumerated.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueEnumerated.go index 964ad9b50b9..b1b5368cc09 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueEnumerated.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueEnumerated.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetChannelValueEnumerated is the corresponding interface of BACnetChannelValueEnumerated type BACnetChannelValueEnumerated interface { @@ -46,9 +48,11 @@ type BACnetChannelValueEnumeratedExactly interface { // _BACnetChannelValueEnumerated is the data-structure of this message type _BACnetChannelValueEnumerated struct { *_BACnetChannelValue - EnumeratedValue BACnetApplicationTagEnumerated + EnumeratedValue BACnetApplicationTagEnumerated } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetChannelValueEnumerated struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetChannelValueEnumerated) InitializeParent(parent BACnetChannelValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetChannelValueEnumerated) InitializeParent(parent BACnetChannelValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetChannelValueEnumerated) GetParent() BACnetChannelValue { +func (m *_BACnetChannelValueEnumerated) GetParent() BACnetChannelValue { return m._BACnetChannelValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetChannelValueEnumerated) GetEnumeratedValue() BACnetApplicationTa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetChannelValueEnumerated factory function for _BACnetChannelValueEnumerated -func NewBACnetChannelValueEnumerated(enumeratedValue BACnetApplicationTagEnumerated, peekedTagHeader BACnetTagHeader) *_BACnetChannelValueEnumerated { +func NewBACnetChannelValueEnumerated( enumeratedValue BACnetApplicationTagEnumerated , peekedTagHeader BACnetTagHeader ) *_BACnetChannelValueEnumerated { _result := &_BACnetChannelValueEnumerated{ - EnumeratedValue: enumeratedValue, - _BACnetChannelValue: NewBACnetChannelValue(peekedTagHeader), + EnumeratedValue: enumeratedValue, + _BACnetChannelValue: NewBACnetChannelValue(peekedTagHeader), } _result._BACnetChannelValue._BACnetChannelValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetChannelValueEnumerated(enumeratedValue BACnetApplicationTagEnumera // Deprecated: use the interface for direct cast func CastBACnetChannelValueEnumerated(structType interface{}) BACnetChannelValueEnumerated { - if casted, ok := structType.(BACnetChannelValueEnumerated); ok { + if casted, ok := structType.(BACnetChannelValueEnumerated); ok { return casted } if casted, ok := structType.(*BACnetChannelValueEnumerated); ok { @@ -115,6 +118,7 @@ func (m *_BACnetChannelValueEnumerated) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_BACnetChannelValueEnumerated) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetChannelValueEnumeratedParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("enumeratedValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for enumeratedValue") } - _enumeratedValue, _enumeratedValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_enumeratedValue, _enumeratedValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _enumeratedValueErr != nil { return nil, errors.Wrap(_enumeratedValueErr, "Error parsing 'enumeratedValue' field of BACnetChannelValueEnumerated") } @@ -151,8 +155,9 @@ func BACnetChannelValueEnumeratedParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_BACnetChannelValueEnumerated{ - _BACnetChannelValue: &_BACnetChannelValue{}, - EnumeratedValue: enumeratedValue, + _BACnetChannelValue: &_BACnetChannelValue{ + }, + EnumeratedValue: enumeratedValue, } _child._BACnetChannelValue._BACnetChannelValueChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetChannelValueEnumerated) SerializeWithWriteBuffer(ctx context.Con return errors.Wrap(pushErr, "Error pushing for BACnetChannelValueEnumerated") } - // Simple Field (enumeratedValue) - if pushErr := writeBuffer.PushContext("enumeratedValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for enumeratedValue") - } - _enumeratedValueErr := writeBuffer.WriteSerializable(ctx, m.GetEnumeratedValue()) - if popErr := writeBuffer.PopContext("enumeratedValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for enumeratedValue") - } - if _enumeratedValueErr != nil { - return errors.Wrap(_enumeratedValueErr, "Error serializing 'enumeratedValue' field") - } + // Simple Field (enumeratedValue) + if pushErr := writeBuffer.PushContext("enumeratedValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for enumeratedValue") + } + _enumeratedValueErr := writeBuffer.WriteSerializable(ctx, m.GetEnumeratedValue()) + if popErr := writeBuffer.PopContext("enumeratedValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for enumeratedValue") + } + if _enumeratedValueErr != nil { + return errors.Wrap(_enumeratedValueErr, "Error serializing 'enumeratedValue' field") + } if popErr := writeBuffer.PopContext("BACnetChannelValueEnumerated"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetChannelValueEnumerated") @@ -194,6 +199,7 @@ func (m *_BACnetChannelValueEnumerated) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetChannelValueEnumerated) isBACnetChannelValueEnumerated() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetChannelValueEnumerated) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueInteger.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueInteger.go index 10d5415b012..a1c0a90fd79 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueInteger.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueInteger.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetChannelValueInteger is the corresponding interface of BACnetChannelValueInteger type BACnetChannelValueInteger interface { @@ -46,9 +48,11 @@ type BACnetChannelValueIntegerExactly interface { // _BACnetChannelValueInteger is the data-structure of this message type _BACnetChannelValueInteger struct { *_BACnetChannelValue - IntegerValue BACnetApplicationTagSignedInteger + IntegerValue BACnetApplicationTagSignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetChannelValueInteger struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetChannelValueInteger) InitializeParent(parent BACnetChannelValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetChannelValueInteger) InitializeParent(parent BACnetChannelValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetChannelValueInteger) GetParent() BACnetChannelValue { +func (m *_BACnetChannelValueInteger) GetParent() BACnetChannelValue { return m._BACnetChannelValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetChannelValueInteger) GetIntegerValue() BACnetApplicationTagSigne /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetChannelValueInteger factory function for _BACnetChannelValueInteger -func NewBACnetChannelValueInteger(integerValue BACnetApplicationTagSignedInteger, peekedTagHeader BACnetTagHeader) *_BACnetChannelValueInteger { +func NewBACnetChannelValueInteger( integerValue BACnetApplicationTagSignedInteger , peekedTagHeader BACnetTagHeader ) *_BACnetChannelValueInteger { _result := &_BACnetChannelValueInteger{ - IntegerValue: integerValue, - _BACnetChannelValue: NewBACnetChannelValue(peekedTagHeader), + IntegerValue: integerValue, + _BACnetChannelValue: NewBACnetChannelValue(peekedTagHeader), } _result._BACnetChannelValue._BACnetChannelValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetChannelValueInteger(integerValue BACnetApplicationTagSignedInteger // Deprecated: use the interface for direct cast func CastBACnetChannelValueInteger(structType interface{}) BACnetChannelValueInteger { - if casted, ok := structType.(BACnetChannelValueInteger); ok { + if casted, ok := structType.(BACnetChannelValueInteger); ok { return casted } if casted, ok := structType.(*BACnetChannelValueInteger); ok { @@ -115,6 +118,7 @@ func (m *_BACnetChannelValueInteger) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_BACnetChannelValueInteger) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetChannelValueIntegerParseWithBuffer(ctx context.Context, readBuffer ut if pullErr := readBuffer.PullContext("integerValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for integerValue") } - _integerValue, _integerValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_integerValue, _integerValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _integerValueErr != nil { return nil, errors.Wrap(_integerValueErr, "Error parsing 'integerValue' field of BACnetChannelValueInteger") } @@ -151,8 +155,9 @@ func BACnetChannelValueIntegerParseWithBuffer(ctx context.Context, readBuffer ut // Create a partially initialized instance _child := &_BACnetChannelValueInteger{ - _BACnetChannelValue: &_BACnetChannelValue{}, - IntegerValue: integerValue, + _BACnetChannelValue: &_BACnetChannelValue{ + }, + IntegerValue: integerValue, } _child._BACnetChannelValue._BACnetChannelValueChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetChannelValueInteger) SerializeWithWriteBuffer(ctx context.Contex return errors.Wrap(pushErr, "Error pushing for BACnetChannelValueInteger") } - // Simple Field (integerValue) - if pushErr := writeBuffer.PushContext("integerValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for integerValue") - } - _integerValueErr := writeBuffer.WriteSerializable(ctx, m.GetIntegerValue()) - if popErr := writeBuffer.PopContext("integerValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for integerValue") - } - if _integerValueErr != nil { - return errors.Wrap(_integerValueErr, "Error serializing 'integerValue' field") - } + // Simple Field (integerValue) + if pushErr := writeBuffer.PushContext("integerValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for integerValue") + } + _integerValueErr := writeBuffer.WriteSerializable(ctx, m.GetIntegerValue()) + if popErr := writeBuffer.PopContext("integerValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for integerValue") + } + if _integerValueErr != nil { + return errors.Wrap(_integerValueErr, "Error serializing 'integerValue' field") + } if popErr := writeBuffer.PopContext("BACnetChannelValueInteger"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetChannelValueInteger") @@ -194,6 +199,7 @@ func (m *_BACnetChannelValueInteger) SerializeWithWriteBuffer(ctx context.Contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetChannelValueInteger) isBACnetChannelValueInteger() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetChannelValueInteger) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueLightingCommand.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueLightingCommand.go index 05d9ed9bada..836777acd57 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueLightingCommand.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueLightingCommand.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetChannelValueLightingCommand is the corresponding interface of BACnetChannelValueLightingCommand type BACnetChannelValueLightingCommand interface { @@ -46,9 +48,11 @@ type BACnetChannelValueLightingCommandExactly interface { // _BACnetChannelValueLightingCommand is the data-structure of this message type _BACnetChannelValueLightingCommand struct { *_BACnetChannelValue - LigthingCommandValue BACnetLightingCommandEnclosed + LigthingCommandValue BACnetLightingCommandEnclosed } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetChannelValueLightingCommand struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetChannelValueLightingCommand) InitializeParent(parent BACnetChannelValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetChannelValueLightingCommand) InitializeParent(parent BACnetChannelValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetChannelValueLightingCommand) GetParent() BACnetChannelValue { +func (m *_BACnetChannelValueLightingCommand) GetParent() BACnetChannelValue { return m._BACnetChannelValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetChannelValueLightingCommand) GetLigthingCommandValue() BACnetLig /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetChannelValueLightingCommand factory function for _BACnetChannelValueLightingCommand -func NewBACnetChannelValueLightingCommand(ligthingCommandValue BACnetLightingCommandEnclosed, peekedTagHeader BACnetTagHeader) *_BACnetChannelValueLightingCommand { +func NewBACnetChannelValueLightingCommand( ligthingCommandValue BACnetLightingCommandEnclosed , peekedTagHeader BACnetTagHeader ) *_BACnetChannelValueLightingCommand { _result := &_BACnetChannelValueLightingCommand{ LigthingCommandValue: ligthingCommandValue, - _BACnetChannelValue: NewBACnetChannelValue(peekedTagHeader), + _BACnetChannelValue: NewBACnetChannelValue(peekedTagHeader), } _result._BACnetChannelValue._BACnetChannelValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetChannelValueLightingCommand(ligthingCommandValue BACnetLightingCom // Deprecated: use the interface for direct cast func CastBACnetChannelValueLightingCommand(structType interface{}) BACnetChannelValueLightingCommand { - if casted, ok := structType.(BACnetChannelValueLightingCommand); ok { + if casted, ok := structType.(BACnetChannelValueLightingCommand); ok { return casted } if casted, ok := structType.(*BACnetChannelValueLightingCommand); ok { @@ -115,6 +118,7 @@ func (m *_BACnetChannelValueLightingCommand) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetChannelValueLightingCommand) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetChannelValueLightingCommandParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("ligthingCommandValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for ligthingCommandValue") } - _ligthingCommandValue, _ligthingCommandValueErr := BACnetLightingCommandEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_ligthingCommandValue, _ligthingCommandValueErr := BACnetLightingCommandEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _ligthingCommandValueErr != nil { return nil, errors.Wrap(_ligthingCommandValueErr, "Error parsing 'ligthingCommandValue' field of BACnetChannelValueLightingCommand") } @@ -151,7 +155,8 @@ func BACnetChannelValueLightingCommandParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetChannelValueLightingCommand{ - _BACnetChannelValue: &_BACnetChannelValue{}, + _BACnetChannelValue: &_BACnetChannelValue{ + }, LigthingCommandValue: ligthingCommandValue, } _child._BACnetChannelValue._BACnetChannelValueChildRequirements = _child @@ -174,17 +179,17 @@ func (m *_BACnetChannelValueLightingCommand) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetChannelValueLightingCommand") } - // Simple Field (ligthingCommandValue) - if pushErr := writeBuffer.PushContext("ligthingCommandValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for ligthingCommandValue") - } - _ligthingCommandValueErr := writeBuffer.WriteSerializable(ctx, m.GetLigthingCommandValue()) - if popErr := writeBuffer.PopContext("ligthingCommandValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for ligthingCommandValue") - } - if _ligthingCommandValueErr != nil { - return errors.Wrap(_ligthingCommandValueErr, "Error serializing 'ligthingCommandValue' field") - } + // Simple Field (ligthingCommandValue) + if pushErr := writeBuffer.PushContext("ligthingCommandValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for ligthingCommandValue") + } + _ligthingCommandValueErr := writeBuffer.WriteSerializable(ctx, m.GetLigthingCommandValue()) + if popErr := writeBuffer.PopContext("ligthingCommandValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for ligthingCommandValue") + } + if _ligthingCommandValueErr != nil { + return errors.Wrap(_ligthingCommandValueErr, "Error serializing 'ligthingCommandValue' field") + } if popErr := writeBuffer.PopContext("BACnetChannelValueLightingCommand"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetChannelValueLightingCommand") @@ -194,6 +199,7 @@ func (m *_BACnetChannelValueLightingCommand) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetChannelValueLightingCommand) isBACnetChannelValueLightingCommand() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetChannelValueLightingCommand) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueNull.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueNull.go index 1ba007af32c..c02403dba87 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueNull.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueNull.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetChannelValueNull is the corresponding interface of BACnetChannelValueNull type BACnetChannelValueNull interface { @@ -46,9 +48,11 @@ type BACnetChannelValueNullExactly interface { // _BACnetChannelValueNull is the data-structure of this message type _BACnetChannelValueNull struct { *_BACnetChannelValue - NullValue BACnetApplicationTagNull + NullValue BACnetApplicationTagNull } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetChannelValueNull struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetChannelValueNull) InitializeParent(parent BACnetChannelValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetChannelValueNull) InitializeParent(parent BACnetChannelValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetChannelValueNull) GetParent() BACnetChannelValue { +func (m *_BACnetChannelValueNull) GetParent() BACnetChannelValue { return m._BACnetChannelValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetChannelValueNull) GetNullValue() BACnetApplicationTagNull { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetChannelValueNull factory function for _BACnetChannelValueNull -func NewBACnetChannelValueNull(nullValue BACnetApplicationTagNull, peekedTagHeader BACnetTagHeader) *_BACnetChannelValueNull { +func NewBACnetChannelValueNull( nullValue BACnetApplicationTagNull , peekedTagHeader BACnetTagHeader ) *_BACnetChannelValueNull { _result := &_BACnetChannelValueNull{ - NullValue: nullValue, - _BACnetChannelValue: NewBACnetChannelValue(peekedTagHeader), + NullValue: nullValue, + _BACnetChannelValue: NewBACnetChannelValue(peekedTagHeader), } _result._BACnetChannelValue._BACnetChannelValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetChannelValueNull(nullValue BACnetApplicationTagNull, peekedTagHead // Deprecated: use the interface for direct cast func CastBACnetChannelValueNull(structType interface{}) BACnetChannelValueNull { - if casted, ok := structType.(BACnetChannelValueNull); ok { + if casted, ok := structType.(BACnetChannelValueNull); ok { return casted } if casted, ok := structType.(*BACnetChannelValueNull); ok { @@ -115,6 +118,7 @@ func (m *_BACnetChannelValueNull) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetChannelValueNull) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetChannelValueNullParseWithBuffer(ctx context.Context, readBuffer utils if pullErr := readBuffer.PullContext("nullValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for nullValue") } - _nullValue, _nullValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_nullValue, _nullValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _nullValueErr != nil { return nil, errors.Wrap(_nullValueErr, "Error parsing 'nullValue' field of BACnetChannelValueNull") } @@ -151,8 +155,9 @@ func BACnetChannelValueNullParseWithBuffer(ctx context.Context, readBuffer utils // Create a partially initialized instance _child := &_BACnetChannelValueNull{ - _BACnetChannelValue: &_BACnetChannelValue{}, - NullValue: nullValue, + _BACnetChannelValue: &_BACnetChannelValue{ + }, + NullValue: nullValue, } _child._BACnetChannelValue._BACnetChannelValueChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetChannelValueNull) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for BACnetChannelValueNull") } - // Simple Field (nullValue) - if pushErr := writeBuffer.PushContext("nullValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for nullValue") - } - _nullValueErr := writeBuffer.WriteSerializable(ctx, m.GetNullValue()) - if popErr := writeBuffer.PopContext("nullValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for nullValue") - } - if _nullValueErr != nil { - return errors.Wrap(_nullValueErr, "Error serializing 'nullValue' field") - } + // Simple Field (nullValue) + if pushErr := writeBuffer.PushContext("nullValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for nullValue") + } + _nullValueErr := writeBuffer.WriteSerializable(ctx, m.GetNullValue()) + if popErr := writeBuffer.PopContext("nullValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for nullValue") + } + if _nullValueErr != nil { + return errors.Wrap(_nullValueErr, "Error serializing 'nullValue' field") + } if popErr := writeBuffer.PopContext("BACnetChannelValueNull"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetChannelValueNull") @@ -194,6 +199,7 @@ func (m *_BACnetChannelValueNull) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetChannelValueNull) isBACnetChannelValueNull() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetChannelValueNull) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueObjectidentifier.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueObjectidentifier.go index 612acd77f2f..a820da5568c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueObjectidentifier.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueObjectidentifier.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetChannelValueObjectidentifier is the corresponding interface of BACnetChannelValueObjectidentifier type BACnetChannelValueObjectidentifier interface { @@ -46,9 +48,11 @@ type BACnetChannelValueObjectidentifierExactly interface { // _BACnetChannelValueObjectidentifier is the data-structure of this message type _BACnetChannelValueObjectidentifier struct { *_BACnetChannelValue - ObjectidentifierValue BACnetApplicationTagObjectIdentifier + ObjectidentifierValue BACnetApplicationTagObjectIdentifier } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetChannelValueObjectidentifier struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetChannelValueObjectidentifier) InitializeParent(parent BACnetChannelValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetChannelValueObjectidentifier) InitializeParent(parent BACnetChannelValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetChannelValueObjectidentifier) GetParent() BACnetChannelValue { +func (m *_BACnetChannelValueObjectidentifier) GetParent() BACnetChannelValue { return m._BACnetChannelValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetChannelValueObjectidentifier) GetObjectidentifierValue() BACnetA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetChannelValueObjectidentifier factory function for _BACnetChannelValueObjectidentifier -func NewBACnetChannelValueObjectidentifier(objectidentifierValue BACnetApplicationTagObjectIdentifier, peekedTagHeader BACnetTagHeader) *_BACnetChannelValueObjectidentifier { +func NewBACnetChannelValueObjectidentifier( objectidentifierValue BACnetApplicationTagObjectIdentifier , peekedTagHeader BACnetTagHeader ) *_BACnetChannelValueObjectidentifier { _result := &_BACnetChannelValueObjectidentifier{ ObjectidentifierValue: objectidentifierValue, - _BACnetChannelValue: NewBACnetChannelValue(peekedTagHeader), + _BACnetChannelValue: NewBACnetChannelValue(peekedTagHeader), } _result._BACnetChannelValue._BACnetChannelValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetChannelValueObjectidentifier(objectidentifierValue BACnetApplicati // Deprecated: use the interface for direct cast func CastBACnetChannelValueObjectidentifier(structType interface{}) BACnetChannelValueObjectidentifier { - if casted, ok := structType.(BACnetChannelValueObjectidentifier); ok { + if casted, ok := structType.(BACnetChannelValueObjectidentifier); ok { return casted } if casted, ok := structType.(*BACnetChannelValueObjectidentifier); ok { @@ -115,6 +118,7 @@ func (m *_BACnetChannelValueObjectidentifier) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetChannelValueObjectidentifier) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetChannelValueObjectidentifierParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("objectidentifierValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for objectidentifierValue") } - _objectidentifierValue, _objectidentifierValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_objectidentifierValue, _objectidentifierValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _objectidentifierValueErr != nil { return nil, errors.Wrap(_objectidentifierValueErr, "Error parsing 'objectidentifierValue' field of BACnetChannelValueObjectidentifier") } @@ -151,7 +155,8 @@ func BACnetChannelValueObjectidentifierParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetChannelValueObjectidentifier{ - _BACnetChannelValue: &_BACnetChannelValue{}, + _BACnetChannelValue: &_BACnetChannelValue{ + }, ObjectidentifierValue: objectidentifierValue, } _child._BACnetChannelValue._BACnetChannelValueChildRequirements = _child @@ -174,17 +179,17 @@ func (m *_BACnetChannelValueObjectidentifier) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetChannelValueObjectidentifier") } - // Simple Field (objectidentifierValue) - if pushErr := writeBuffer.PushContext("objectidentifierValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for objectidentifierValue") - } - _objectidentifierValueErr := writeBuffer.WriteSerializable(ctx, m.GetObjectidentifierValue()) - if popErr := writeBuffer.PopContext("objectidentifierValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for objectidentifierValue") - } - if _objectidentifierValueErr != nil { - return errors.Wrap(_objectidentifierValueErr, "Error serializing 'objectidentifierValue' field") - } + // Simple Field (objectidentifierValue) + if pushErr := writeBuffer.PushContext("objectidentifierValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for objectidentifierValue") + } + _objectidentifierValueErr := writeBuffer.WriteSerializable(ctx, m.GetObjectidentifierValue()) + if popErr := writeBuffer.PopContext("objectidentifierValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for objectidentifierValue") + } + if _objectidentifierValueErr != nil { + return errors.Wrap(_objectidentifierValueErr, "Error serializing 'objectidentifierValue' field") + } if popErr := writeBuffer.PopContext("BACnetChannelValueObjectidentifier"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetChannelValueObjectidentifier") @@ -194,6 +199,7 @@ func (m *_BACnetChannelValueObjectidentifier) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetChannelValueObjectidentifier) isBACnetChannelValueObjectidentifier() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetChannelValueObjectidentifier) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueOctetString.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueOctetString.go index 73debd42e41..201b2932f0f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueOctetString.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueOctetString.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetChannelValueOctetString is the corresponding interface of BACnetChannelValueOctetString type BACnetChannelValueOctetString interface { @@ -46,9 +48,11 @@ type BACnetChannelValueOctetStringExactly interface { // _BACnetChannelValueOctetString is the data-structure of this message type _BACnetChannelValueOctetString struct { *_BACnetChannelValue - OctetStringValue BACnetApplicationTagOctetString + OctetStringValue BACnetApplicationTagOctetString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetChannelValueOctetString struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetChannelValueOctetString) InitializeParent(parent BACnetChannelValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetChannelValueOctetString) InitializeParent(parent BACnetChannelValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetChannelValueOctetString) GetParent() BACnetChannelValue { +func (m *_BACnetChannelValueOctetString) GetParent() BACnetChannelValue { return m._BACnetChannelValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetChannelValueOctetString) GetOctetStringValue() BACnetApplication /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetChannelValueOctetString factory function for _BACnetChannelValueOctetString -func NewBACnetChannelValueOctetString(octetStringValue BACnetApplicationTagOctetString, peekedTagHeader BACnetTagHeader) *_BACnetChannelValueOctetString { +func NewBACnetChannelValueOctetString( octetStringValue BACnetApplicationTagOctetString , peekedTagHeader BACnetTagHeader ) *_BACnetChannelValueOctetString { _result := &_BACnetChannelValueOctetString{ - OctetStringValue: octetStringValue, - _BACnetChannelValue: NewBACnetChannelValue(peekedTagHeader), + OctetStringValue: octetStringValue, + _BACnetChannelValue: NewBACnetChannelValue(peekedTagHeader), } _result._BACnetChannelValue._BACnetChannelValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetChannelValueOctetString(octetStringValue BACnetApplicationTagOctet // Deprecated: use the interface for direct cast func CastBACnetChannelValueOctetString(structType interface{}) BACnetChannelValueOctetString { - if casted, ok := structType.(BACnetChannelValueOctetString); ok { + if casted, ok := structType.(BACnetChannelValueOctetString); ok { return casted } if casted, ok := structType.(*BACnetChannelValueOctetString); ok { @@ -115,6 +118,7 @@ func (m *_BACnetChannelValueOctetString) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetChannelValueOctetString) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetChannelValueOctetStringParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("octetStringValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for octetStringValue") } - _octetStringValue, _octetStringValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_octetStringValue, _octetStringValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _octetStringValueErr != nil { return nil, errors.Wrap(_octetStringValueErr, "Error parsing 'octetStringValue' field of BACnetChannelValueOctetString") } @@ -151,8 +155,9 @@ func BACnetChannelValueOctetStringParseWithBuffer(ctx context.Context, readBuffe // Create a partially initialized instance _child := &_BACnetChannelValueOctetString{ - _BACnetChannelValue: &_BACnetChannelValue{}, - OctetStringValue: octetStringValue, + _BACnetChannelValue: &_BACnetChannelValue{ + }, + OctetStringValue: octetStringValue, } _child._BACnetChannelValue._BACnetChannelValueChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetChannelValueOctetString) SerializeWithWriteBuffer(ctx context.Co return errors.Wrap(pushErr, "Error pushing for BACnetChannelValueOctetString") } - // Simple Field (octetStringValue) - if pushErr := writeBuffer.PushContext("octetStringValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for octetStringValue") - } - _octetStringValueErr := writeBuffer.WriteSerializable(ctx, m.GetOctetStringValue()) - if popErr := writeBuffer.PopContext("octetStringValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for octetStringValue") - } - if _octetStringValueErr != nil { - return errors.Wrap(_octetStringValueErr, "Error serializing 'octetStringValue' field") - } + // Simple Field (octetStringValue) + if pushErr := writeBuffer.PushContext("octetStringValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for octetStringValue") + } + _octetStringValueErr := writeBuffer.WriteSerializable(ctx, m.GetOctetStringValue()) + if popErr := writeBuffer.PopContext("octetStringValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for octetStringValue") + } + if _octetStringValueErr != nil { + return errors.Wrap(_octetStringValueErr, "Error serializing 'octetStringValue' field") + } if popErr := writeBuffer.PopContext("BACnetChannelValueOctetString"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetChannelValueOctetString") @@ -194,6 +199,7 @@ func (m *_BACnetChannelValueOctetString) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetChannelValueOctetString) isBACnetChannelValueOctetString() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetChannelValueOctetString) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueReal.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueReal.go index 3e386fd560b..4faf35db72b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueReal.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueReal.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetChannelValueReal is the corresponding interface of BACnetChannelValueReal type BACnetChannelValueReal interface { @@ -46,9 +48,11 @@ type BACnetChannelValueRealExactly interface { // _BACnetChannelValueReal is the data-structure of this message type _BACnetChannelValueReal struct { *_BACnetChannelValue - RealValue BACnetApplicationTagReal + RealValue BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetChannelValueReal struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetChannelValueReal) InitializeParent(parent BACnetChannelValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetChannelValueReal) InitializeParent(parent BACnetChannelValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetChannelValueReal) GetParent() BACnetChannelValue { +func (m *_BACnetChannelValueReal) GetParent() BACnetChannelValue { return m._BACnetChannelValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetChannelValueReal) GetRealValue() BACnetApplicationTagReal { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetChannelValueReal factory function for _BACnetChannelValueReal -func NewBACnetChannelValueReal(realValue BACnetApplicationTagReal, peekedTagHeader BACnetTagHeader) *_BACnetChannelValueReal { +func NewBACnetChannelValueReal( realValue BACnetApplicationTagReal , peekedTagHeader BACnetTagHeader ) *_BACnetChannelValueReal { _result := &_BACnetChannelValueReal{ - RealValue: realValue, - _BACnetChannelValue: NewBACnetChannelValue(peekedTagHeader), + RealValue: realValue, + _BACnetChannelValue: NewBACnetChannelValue(peekedTagHeader), } _result._BACnetChannelValue._BACnetChannelValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetChannelValueReal(realValue BACnetApplicationTagReal, peekedTagHead // Deprecated: use the interface for direct cast func CastBACnetChannelValueReal(structType interface{}) BACnetChannelValueReal { - if casted, ok := structType.(BACnetChannelValueReal); ok { + if casted, ok := structType.(BACnetChannelValueReal); ok { return casted } if casted, ok := structType.(*BACnetChannelValueReal); ok { @@ -115,6 +118,7 @@ func (m *_BACnetChannelValueReal) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetChannelValueReal) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetChannelValueRealParseWithBuffer(ctx context.Context, readBuffer utils if pullErr := readBuffer.PullContext("realValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for realValue") } - _realValue, _realValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_realValue, _realValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _realValueErr != nil { return nil, errors.Wrap(_realValueErr, "Error parsing 'realValue' field of BACnetChannelValueReal") } @@ -151,8 +155,9 @@ func BACnetChannelValueRealParseWithBuffer(ctx context.Context, readBuffer utils // Create a partially initialized instance _child := &_BACnetChannelValueReal{ - _BACnetChannelValue: &_BACnetChannelValue{}, - RealValue: realValue, + _BACnetChannelValue: &_BACnetChannelValue{ + }, + RealValue: realValue, } _child._BACnetChannelValue._BACnetChannelValueChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetChannelValueReal) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for BACnetChannelValueReal") } - // Simple Field (realValue) - if pushErr := writeBuffer.PushContext("realValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for realValue") - } - _realValueErr := writeBuffer.WriteSerializable(ctx, m.GetRealValue()) - if popErr := writeBuffer.PopContext("realValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for realValue") - } - if _realValueErr != nil { - return errors.Wrap(_realValueErr, "Error serializing 'realValue' field") - } + // Simple Field (realValue) + if pushErr := writeBuffer.PushContext("realValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for realValue") + } + _realValueErr := writeBuffer.WriteSerializable(ctx, m.GetRealValue()) + if popErr := writeBuffer.PopContext("realValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for realValue") + } + if _realValueErr != nil { + return errors.Wrap(_realValueErr, "Error serializing 'realValue' field") + } if popErr := writeBuffer.PopContext("BACnetChannelValueReal"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetChannelValueReal") @@ -194,6 +199,7 @@ func (m *_BACnetChannelValueReal) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetChannelValueReal) isBACnetChannelValueReal() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetChannelValueReal) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueTime.go index f1fbc9ac8d7..aa9c3ed3ef2 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetChannelValueTime is the corresponding interface of BACnetChannelValueTime type BACnetChannelValueTime interface { @@ -46,9 +48,11 @@ type BACnetChannelValueTimeExactly interface { // _BACnetChannelValueTime is the data-structure of this message type _BACnetChannelValueTime struct { *_BACnetChannelValue - TimeValue BACnetApplicationTagTime + TimeValue BACnetApplicationTagTime } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetChannelValueTime struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetChannelValueTime) InitializeParent(parent BACnetChannelValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetChannelValueTime) InitializeParent(parent BACnetChannelValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetChannelValueTime) GetParent() BACnetChannelValue { +func (m *_BACnetChannelValueTime) GetParent() BACnetChannelValue { return m._BACnetChannelValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetChannelValueTime) GetTimeValue() BACnetApplicationTagTime { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetChannelValueTime factory function for _BACnetChannelValueTime -func NewBACnetChannelValueTime(timeValue BACnetApplicationTagTime, peekedTagHeader BACnetTagHeader) *_BACnetChannelValueTime { +func NewBACnetChannelValueTime( timeValue BACnetApplicationTagTime , peekedTagHeader BACnetTagHeader ) *_BACnetChannelValueTime { _result := &_BACnetChannelValueTime{ - TimeValue: timeValue, - _BACnetChannelValue: NewBACnetChannelValue(peekedTagHeader), + TimeValue: timeValue, + _BACnetChannelValue: NewBACnetChannelValue(peekedTagHeader), } _result._BACnetChannelValue._BACnetChannelValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetChannelValueTime(timeValue BACnetApplicationTagTime, peekedTagHead // Deprecated: use the interface for direct cast func CastBACnetChannelValueTime(structType interface{}) BACnetChannelValueTime { - if casted, ok := structType.(BACnetChannelValueTime); ok { + if casted, ok := structType.(BACnetChannelValueTime); ok { return casted } if casted, ok := structType.(*BACnetChannelValueTime); ok { @@ -115,6 +118,7 @@ func (m *_BACnetChannelValueTime) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetChannelValueTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetChannelValueTimeParseWithBuffer(ctx context.Context, readBuffer utils if pullErr := readBuffer.PullContext("timeValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeValue") } - _timeValue, _timeValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_timeValue, _timeValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _timeValueErr != nil { return nil, errors.Wrap(_timeValueErr, "Error parsing 'timeValue' field of BACnetChannelValueTime") } @@ -151,8 +155,9 @@ func BACnetChannelValueTimeParseWithBuffer(ctx context.Context, readBuffer utils // Create a partially initialized instance _child := &_BACnetChannelValueTime{ - _BACnetChannelValue: &_BACnetChannelValue{}, - TimeValue: timeValue, + _BACnetChannelValue: &_BACnetChannelValue{ + }, + TimeValue: timeValue, } _child._BACnetChannelValue._BACnetChannelValueChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetChannelValueTime) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for BACnetChannelValueTime") } - // Simple Field (timeValue) - if pushErr := writeBuffer.PushContext("timeValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timeValue") - } - _timeValueErr := writeBuffer.WriteSerializable(ctx, m.GetTimeValue()) - if popErr := writeBuffer.PopContext("timeValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timeValue") - } - if _timeValueErr != nil { - return errors.Wrap(_timeValueErr, "Error serializing 'timeValue' field") - } + // Simple Field (timeValue) + if pushErr := writeBuffer.PushContext("timeValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timeValue") + } + _timeValueErr := writeBuffer.WriteSerializable(ctx, m.GetTimeValue()) + if popErr := writeBuffer.PopContext("timeValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timeValue") + } + if _timeValueErr != nil { + return errors.Wrap(_timeValueErr, "Error serializing 'timeValue' field") + } if popErr := writeBuffer.PopContext("BACnetChannelValueTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetChannelValueTime") @@ -194,6 +199,7 @@ func (m *_BACnetChannelValueTime) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetChannelValueTime) isBACnetChannelValueTime() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetChannelValueTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueUnsigned.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueUnsigned.go index 7f6abde5f77..6e20b0c8ce4 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueUnsigned.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetChannelValueUnsigned.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetChannelValueUnsigned is the corresponding interface of BACnetChannelValueUnsigned type BACnetChannelValueUnsigned interface { @@ -46,9 +48,11 @@ type BACnetChannelValueUnsignedExactly interface { // _BACnetChannelValueUnsigned is the data-structure of this message type _BACnetChannelValueUnsigned struct { *_BACnetChannelValue - UnsignedValue BACnetApplicationTagUnsignedInteger + UnsignedValue BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetChannelValueUnsigned struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetChannelValueUnsigned) InitializeParent(parent BACnetChannelValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetChannelValueUnsigned) InitializeParent(parent BACnetChannelValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetChannelValueUnsigned) GetParent() BACnetChannelValue { +func (m *_BACnetChannelValueUnsigned) GetParent() BACnetChannelValue { return m._BACnetChannelValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetChannelValueUnsigned) GetUnsignedValue() BACnetApplicationTagUns /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetChannelValueUnsigned factory function for _BACnetChannelValueUnsigned -func NewBACnetChannelValueUnsigned(unsignedValue BACnetApplicationTagUnsignedInteger, peekedTagHeader BACnetTagHeader) *_BACnetChannelValueUnsigned { +func NewBACnetChannelValueUnsigned( unsignedValue BACnetApplicationTagUnsignedInteger , peekedTagHeader BACnetTagHeader ) *_BACnetChannelValueUnsigned { _result := &_BACnetChannelValueUnsigned{ - UnsignedValue: unsignedValue, - _BACnetChannelValue: NewBACnetChannelValue(peekedTagHeader), + UnsignedValue: unsignedValue, + _BACnetChannelValue: NewBACnetChannelValue(peekedTagHeader), } _result._BACnetChannelValue._BACnetChannelValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetChannelValueUnsigned(unsignedValue BACnetApplicationTagUnsignedInt // Deprecated: use the interface for direct cast func CastBACnetChannelValueUnsigned(structType interface{}) BACnetChannelValueUnsigned { - if casted, ok := structType.(BACnetChannelValueUnsigned); ok { + if casted, ok := structType.(BACnetChannelValueUnsigned); ok { return casted } if casted, ok := structType.(*BACnetChannelValueUnsigned); ok { @@ -115,6 +118,7 @@ func (m *_BACnetChannelValueUnsigned) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_BACnetChannelValueUnsigned) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetChannelValueUnsignedParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("unsignedValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for unsignedValue") } - _unsignedValue, _unsignedValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_unsignedValue, _unsignedValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _unsignedValueErr != nil { return nil, errors.Wrap(_unsignedValueErr, "Error parsing 'unsignedValue' field of BACnetChannelValueUnsigned") } @@ -151,8 +155,9 @@ func BACnetChannelValueUnsignedParseWithBuffer(ctx context.Context, readBuffer u // Create a partially initialized instance _child := &_BACnetChannelValueUnsigned{ - _BACnetChannelValue: &_BACnetChannelValue{}, - UnsignedValue: unsignedValue, + _BACnetChannelValue: &_BACnetChannelValue{ + }, + UnsignedValue: unsignedValue, } _child._BACnetChannelValue._BACnetChannelValueChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetChannelValueUnsigned) SerializeWithWriteBuffer(ctx context.Conte return errors.Wrap(pushErr, "Error pushing for BACnetChannelValueUnsigned") } - // Simple Field (unsignedValue) - if pushErr := writeBuffer.PushContext("unsignedValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for unsignedValue") - } - _unsignedValueErr := writeBuffer.WriteSerializable(ctx, m.GetUnsignedValue()) - if popErr := writeBuffer.PopContext("unsignedValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for unsignedValue") - } - if _unsignedValueErr != nil { - return errors.Wrap(_unsignedValueErr, "Error serializing 'unsignedValue' field") - } + // Simple Field (unsignedValue) + if pushErr := writeBuffer.PushContext("unsignedValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for unsignedValue") + } + _unsignedValueErr := writeBuffer.WriteSerializable(ctx, m.GetUnsignedValue()) + if popErr := writeBuffer.PopContext("unsignedValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for unsignedValue") + } + if _unsignedValueErr != nil { + return errors.Wrap(_unsignedValueErr, "Error serializing 'unsignedValue' field") + } if popErr := writeBuffer.PopContext("BACnetChannelValueUnsigned"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetChannelValueUnsigned") @@ -194,6 +199,7 @@ func (m *_BACnetChannelValueUnsigned) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetChannelValueUnsigned) isBACnetChannelValueUnsigned() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetChannelValueUnsigned) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetCharacterEncoding.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetCharacterEncoding.go index f68fd65b7e3..85a5b8cdf75 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetCharacterEncoding.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetCharacterEncoding.go @@ -34,20 +34,20 @@ type IBACnetCharacterEncoding interface { utils.Serializable } -const ( - BACnetCharacterEncoding_ISO_10646 BACnetCharacterEncoding = 0x0 +const( + BACnetCharacterEncoding_ISO_10646 BACnetCharacterEncoding = 0x0 BACnetCharacterEncoding_IBM_Microsoft_DBCS BACnetCharacterEncoding = 0x1 - BACnetCharacterEncoding_JIS_X_0208 BACnetCharacterEncoding = 0x2 - BACnetCharacterEncoding_ISO_10646_4 BACnetCharacterEncoding = 0x3 - BACnetCharacterEncoding_ISO_10646_2 BACnetCharacterEncoding = 0x4 - BACnetCharacterEncoding_ISO_8859_1 BACnetCharacterEncoding = 0x5 + BACnetCharacterEncoding_JIS_X_0208 BACnetCharacterEncoding = 0x2 + BACnetCharacterEncoding_ISO_10646_4 BACnetCharacterEncoding = 0x3 + BACnetCharacterEncoding_ISO_10646_2 BACnetCharacterEncoding = 0x4 + BACnetCharacterEncoding_ISO_8859_1 BACnetCharacterEncoding = 0x5 ) var BACnetCharacterEncodingValues []BACnetCharacterEncoding func init() { _ = errors.New - BACnetCharacterEncodingValues = []BACnetCharacterEncoding{ + BACnetCharacterEncodingValues = []BACnetCharacterEncoding { BACnetCharacterEncoding_ISO_10646, BACnetCharacterEncoding_IBM_Microsoft_DBCS, BACnetCharacterEncoding_JIS_X_0208, @@ -59,18 +59,18 @@ func init() { func BACnetCharacterEncodingByValue(value byte) (enum BACnetCharacterEncoding, ok bool) { switch value { - case 0x0: - return BACnetCharacterEncoding_ISO_10646, true - case 0x1: - return BACnetCharacterEncoding_IBM_Microsoft_DBCS, true - case 0x2: - return BACnetCharacterEncoding_JIS_X_0208, true - case 0x3: - return BACnetCharacterEncoding_ISO_10646_4, true - case 0x4: - return BACnetCharacterEncoding_ISO_10646_2, true - case 0x5: - return BACnetCharacterEncoding_ISO_8859_1, true + case 0x0: + return BACnetCharacterEncoding_ISO_10646, true + case 0x1: + return BACnetCharacterEncoding_IBM_Microsoft_DBCS, true + case 0x2: + return BACnetCharacterEncoding_JIS_X_0208, true + case 0x3: + return BACnetCharacterEncoding_ISO_10646_4, true + case 0x4: + return BACnetCharacterEncoding_ISO_10646_2, true + case 0x5: + return BACnetCharacterEncoding_ISO_8859_1, true } return 0, false } @@ -93,13 +93,13 @@ func BACnetCharacterEncodingByName(value string) (enum BACnetCharacterEncoding, return 0, false } -func BACnetCharacterEncodingKnows(value byte) bool { +func BACnetCharacterEncodingKnows(value byte) bool { for _, typeValue := range BACnetCharacterEncodingValues { if byte(typeValue) == value { return true } } - return false + return false; } func CastBACnetCharacterEncoding(structType interface{}) BACnetCharacterEncoding { @@ -171,3 +171,4 @@ func (e BACnetCharacterEncoding) PLC4XEnumName() string { func (e BACnetCharacterEncoding) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetClientCOV.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetClientCOV.go index 2cf6f454f04..d1015179bfb 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetClientCOV.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetClientCOV.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetClientCOV is the corresponding interface of BACnetClientCOV type BACnetClientCOV interface { @@ -47,7 +49,7 @@ type BACnetClientCOVExactly interface { // _BACnetClientCOV is the data-structure of this message type _BACnetClientCOV struct { _BACnetClientCOVChildRequirements - PeekedTagHeader BACnetTagHeader + PeekedTagHeader BACnetTagHeader } type _BACnetClientCOVChildRequirements interface { @@ -55,6 +57,7 @@ type _BACnetClientCOVChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type BACnetClientCOVParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetClientCOV, serializeChildFunction func() error) error GetTypeName() string @@ -62,13 +65,12 @@ type BACnetClientCOVParent interface { type BACnetClientCOVChild interface { utils.Serializable - InitializeParent(parent BACnetClientCOV, peekedTagHeader BACnetTagHeader) +InitializeParent(parent BACnetClientCOV , peekedTagHeader BACnetTagHeader ) GetParent() *BACnetClientCOV GetTypeName() string BACnetClientCOV } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,14 +100,15 @@ func (m *_BACnetClientCOV) GetPeekedTagNumber() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetClientCOV factory function for _BACnetClientCOV -func NewBACnetClientCOV(peekedTagHeader BACnetTagHeader) *_BACnetClientCOV { - return &_BACnetClientCOV{PeekedTagHeader: peekedTagHeader} +func NewBACnetClientCOV( peekedTagHeader BACnetTagHeader ) *_BACnetClientCOV { +return &_BACnetClientCOV{ PeekedTagHeader: peekedTagHeader } } // Deprecated: use the interface for direct cast func CastBACnetClientCOV(structType interface{}) BACnetClientCOV { - if casted, ok := structType.(BACnetClientCOV); ok { + if casted, ok := structType.(BACnetClientCOV); ok { return casted } if casted, ok := structType.(*BACnetClientCOV); ok { @@ -118,6 +121,7 @@ func (m *_BACnetClientCOV) GetTypeName() string { return "BACnetClientCOV" } + func (m *_BACnetClientCOV) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -143,13 +147,13 @@ func BACnetClientCOVParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu currentPos := positionAware.GetPos() _ = currentPos - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Virtual field _peekedTagNumber := peekedTagHeader.GetActualTagNumber() @@ -159,17 +163,17 @@ func BACnetClientCOVParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetClientCOVChildSerializeRequirement interface { BACnetClientCOV - InitializeParent(BACnetClientCOV, BACnetTagHeader) + InitializeParent(BACnetClientCOV, BACnetTagHeader) GetParent() BACnetClientCOV } var _childTemp interface{} var _child BACnetClientCOVChildSerializeRequirement var typeSwitchError error switch { - case peekedTagNumber == 0x4: // BACnetClientCOVObject - _childTemp, typeSwitchError = BACnetClientCOVObjectParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == 0x0: // BACnetClientCOVNone - _childTemp, typeSwitchError = BACnetClientCOVNoneParseWithBuffer(ctx, readBuffer) +case peekedTagNumber == 0x4 : // BACnetClientCOVObject + _childTemp, typeSwitchError = BACnetClientCOVObjectParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == 0x0 : // BACnetClientCOVNone + _childTemp, typeSwitchError = BACnetClientCOVNoneParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedTagNumber=%v]", peekedTagNumber) } @@ -183,7 +187,7 @@ func BACnetClientCOVParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu } // Finish initializing - _child.InitializeParent(_child, peekedTagHeader) +_child.InitializeParent(_child , peekedTagHeader ) return _child, nil } @@ -193,7 +197,7 @@ func (pm *_BACnetClientCOV) SerializeParent(ctx context.Context, writeBuffer uti _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetClientCOV"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetClientCOV"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetClientCOV") } // Virtual field @@ -212,6 +216,7 @@ func (pm *_BACnetClientCOV) SerializeParent(ctx context.Context, writeBuffer uti return nil } + func (m *_BACnetClientCOV) isBACnetClientCOV() bool { return true } @@ -226,3 +231,6 @@ func (m *_BACnetClientCOV) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetClientCOVNone.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetClientCOVNone.go index 7a279a2662d..9cb1e0357c0 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetClientCOVNone.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetClientCOVNone.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetClientCOVNone is the corresponding interface of BACnetClientCOVNone type BACnetClientCOVNone interface { @@ -46,9 +48,11 @@ type BACnetClientCOVNoneExactly interface { // _BACnetClientCOVNone is the data-structure of this message type _BACnetClientCOVNone struct { *_BACnetClientCOV - DefaultIncrement BACnetApplicationTagNull + DefaultIncrement BACnetApplicationTagNull } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetClientCOVNone struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetClientCOVNone) InitializeParent(parent BACnetClientCOV, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetClientCOVNone) InitializeParent(parent BACnetClientCOV , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetClientCOVNone) GetParent() BACnetClientCOV { +func (m *_BACnetClientCOVNone) GetParent() BACnetClientCOV { return m._BACnetClientCOV } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetClientCOVNone) GetDefaultIncrement() BACnetApplicationTagNull { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetClientCOVNone factory function for _BACnetClientCOVNone -func NewBACnetClientCOVNone(defaultIncrement BACnetApplicationTagNull, peekedTagHeader BACnetTagHeader) *_BACnetClientCOVNone { +func NewBACnetClientCOVNone( defaultIncrement BACnetApplicationTagNull , peekedTagHeader BACnetTagHeader ) *_BACnetClientCOVNone { _result := &_BACnetClientCOVNone{ DefaultIncrement: defaultIncrement, - _BACnetClientCOV: NewBACnetClientCOV(peekedTagHeader), + _BACnetClientCOV: NewBACnetClientCOV(peekedTagHeader), } _result._BACnetClientCOV._BACnetClientCOVChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetClientCOVNone(defaultIncrement BACnetApplicationTagNull, peekedTag // Deprecated: use the interface for direct cast func CastBACnetClientCOVNone(structType interface{}) BACnetClientCOVNone { - if casted, ok := structType.(BACnetClientCOVNone); ok { + if casted, ok := structType.(BACnetClientCOVNone); ok { return casted } if casted, ok := structType.(*BACnetClientCOVNone); ok { @@ -115,6 +118,7 @@ func (m *_BACnetClientCOVNone) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetClientCOVNone) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetClientCOVNoneParseWithBuffer(ctx context.Context, readBuffer utils.Re if pullErr := readBuffer.PullContext("defaultIncrement"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for defaultIncrement") } - _defaultIncrement, _defaultIncrementErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_defaultIncrement, _defaultIncrementErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _defaultIncrementErr != nil { return nil, errors.Wrap(_defaultIncrementErr, "Error parsing 'defaultIncrement' field of BACnetClientCOVNone") } @@ -151,7 +155,8 @@ func BACnetClientCOVNoneParseWithBuffer(ctx context.Context, readBuffer utils.Re // Create a partially initialized instance _child := &_BACnetClientCOVNone{ - _BACnetClientCOV: &_BACnetClientCOV{}, + _BACnetClientCOV: &_BACnetClientCOV{ + }, DefaultIncrement: defaultIncrement, } _child._BACnetClientCOV._BACnetClientCOVChildRequirements = _child @@ -174,17 +179,17 @@ func (m *_BACnetClientCOVNone) SerializeWithWriteBuffer(ctx context.Context, wri return errors.Wrap(pushErr, "Error pushing for BACnetClientCOVNone") } - // Simple Field (defaultIncrement) - if pushErr := writeBuffer.PushContext("defaultIncrement"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for defaultIncrement") - } - _defaultIncrementErr := writeBuffer.WriteSerializable(ctx, m.GetDefaultIncrement()) - if popErr := writeBuffer.PopContext("defaultIncrement"); popErr != nil { - return errors.Wrap(popErr, "Error popping for defaultIncrement") - } - if _defaultIncrementErr != nil { - return errors.Wrap(_defaultIncrementErr, "Error serializing 'defaultIncrement' field") - } + // Simple Field (defaultIncrement) + if pushErr := writeBuffer.PushContext("defaultIncrement"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for defaultIncrement") + } + _defaultIncrementErr := writeBuffer.WriteSerializable(ctx, m.GetDefaultIncrement()) + if popErr := writeBuffer.PopContext("defaultIncrement"); popErr != nil { + return errors.Wrap(popErr, "Error popping for defaultIncrement") + } + if _defaultIncrementErr != nil { + return errors.Wrap(_defaultIncrementErr, "Error serializing 'defaultIncrement' field") + } if popErr := writeBuffer.PopContext("BACnetClientCOVNone"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetClientCOVNone") @@ -194,6 +199,7 @@ func (m *_BACnetClientCOVNone) SerializeWithWriteBuffer(ctx context.Context, wri return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetClientCOVNone) isBACnetClientCOVNone() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetClientCOVNone) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetClientCOVObject.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetClientCOVObject.go index 2b526af5562..a5ab2b309a5 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetClientCOVObject.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetClientCOVObject.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetClientCOVObject is the corresponding interface of BACnetClientCOVObject type BACnetClientCOVObject interface { @@ -46,9 +48,11 @@ type BACnetClientCOVObjectExactly interface { // _BACnetClientCOVObject is the data-structure of this message type _BACnetClientCOVObject struct { *_BACnetClientCOV - RealIncrement BACnetApplicationTagReal + RealIncrement BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetClientCOVObject struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetClientCOVObject) InitializeParent(parent BACnetClientCOV, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetClientCOVObject) InitializeParent(parent BACnetClientCOV , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetClientCOVObject) GetParent() BACnetClientCOV { +func (m *_BACnetClientCOVObject) GetParent() BACnetClientCOV { return m._BACnetClientCOV } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetClientCOVObject) GetRealIncrement() BACnetApplicationTagReal { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetClientCOVObject factory function for _BACnetClientCOVObject -func NewBACnetClientCOVObject(realIncrement BACnetApplicationTagReal, peekedTagHeader BACnetTagHeader) *_BACnetClientCOVObject { +func NewBACnetClientCOVObject( realIncrement BACnetApplicationTagReal , peekedTagHeader BACnetTagHeader ) *_BACnetClientCOVObject { _result := &_BACnetClientCOVObject{ - RealIncrement: realIncrement, - _BACnetClientCOV: NewBACnetClientCOV(peekedTagHeader), + RealIncrement: realIncrement, + _BACnetClientCOV: NewBACnetClientCOV(peekedTagHeader), } _result._BACnetClientCOV._BACnetClientCOVChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetClientCOVObject(realIncrement BACnetApplicationTagReal, peekedTagH // Deprecated: use the interface for direct cast func CastBACnetClientCOVObject(structType interface{}) BACnetClientCOVObject { - if casted, ok := structType.(BACnetClientCOVObject); ok { + if casted, ok := structType.(BACnetClientCOVObject); ok { return casted } if casted, ok := structType.(*BACnetClientCOVObject); ok { @@ -115,6 +118,7 @@ func (m *_BACnetClientCOVObject) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetClientCOVObject) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetClientCOVObjectParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("realIncrement"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for realIncrement") } - _realIncrement, _realIncrementErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_realIncrement, _realIncrementErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _realIncrementErr != nil { return nil, errors.Wrap(_realIncrementErr, "Error parsing 'realIncrement' field of BACnetClientCOVObject") } @@ -151,8 +155,9 @@ func BACnetClientCOVObjectParseWithBuffer(ctx context.Context, readBuffer utils. // Create a partially initialized instance _child := &_BACnetClientCOVObject{ - _BACnetClientCOV: &_BACnetClientCOV{}, - RealIncrement: realIncrement, + _BACnetClientCOV: &_BACnetClientCOV{ + }, + RealIncrement: realIncrement, } _child._BACnetClientCOV._BACnetClientCOVChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetClientCOVObject) SerializeWithWriteBuffer(ctx context.Context, w return errors.Wrap(pushErr, "Error pushing for BACnetClientCOVObject") } - // Simple Field (realIncrement) - if pushErr := writeBuffer.PushContext("realIncrement"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for realIncrement") - } - _realIncrementErr := writeBuffer.WriteSerializable(ctx, m.GetRealIncrement()) - if popErr := writeBuffer.PopContext("realIncrement"); popErr != nil { - return errors.Wrap(popErr, "Error popping for realIncrement") - } - if _realIncrementErr != nil { - return errors.Wrap(_realIncrementErr, "Error serializing 'realIncrement' field") - } + // Simple Field (realIncrement) + if pushErr := writeBuffer.PushContext("realIncrement"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for realIncrement") + } + _realIncrementErr := writeBuffer.WriteSerializable(ctx, m.GetRealIncrement()) + if popErr := writeBuffer.PopContext("realIncrement"); popErr != nil { + return errors.Wrap(popErr, "Error popping for realIncrement") + } + if _realIncrementErr != nil { + return errors.Wrap(_realIncrementErr, "Error serializing 'realIncrement' field") + } if popErr := writeBuffer.PopContext("BACnetClientCOVObject"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetClientCOVObject") @@ -194,6 +199,7 @@ func (m *_BACnetClientCOVObject) SerializeWithWriteBuffer(ctx context.Context, w return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetClientCOVObject) isBACnetClientCOVObject() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetClientCOVObject) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetClosingTag.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetClosingTag.go index 2f634893855..6717ea13f13 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetClosingTag.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetClosingTag.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetClosingTag is the corresponding interface of BACnetClosingTag type BACnetClosingTag interface { @@ -44,12 +46,13 @@ type BACnetClosingTagExactly interface { // _BACnetClosingTag is the data-structure of this message type _BACnetClosingTag struct { - Header BACnetTagHeader + Header BACnetTagHeader // Arguments. TagNumberArgument uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -64,14 +67,15 @@ func (m *_BACnetClosingTag) GetHeader() BACnetTagHeader { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetClosingTag factory function for _BACnetClosingTag -func NewBACnetClosingTag(header BACnetTagHeader, tagNumberArgument uint8) *_BACnetClosingTag { - return &_BACnetClosingTag{Header: header, TagNumberArgument: tagNumberArgument} +func NewBACnetClosingTag( header BACnetTagHeader , tagNumberArgument uint8 ) *_BACnetClosingTag { +return &_BACnetClosingTag{ Header: header , TagNumberArgument: tagNumberArgument } } // Deprecated: use the interface for direct cast func CastBACnetClosingTag(structType interface{}) BACnetClosingTag { - if casted, ok := structType.(BACnetClosingTag); ok { + if casted, ok := structType.(BACnetClosingTag); ok { return casted } if casted, ok := structType.(*BACnetClosingTag); ok { @@ -93,6 +97,7 @@ func (m *_BACnetClosingTag) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetClosingTag) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -114,7 +119,7 @@ func BACnetClosingTagParseWithBuffer(ctx context.Context, readBuffer utils.ReadB if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetClosingTag") } @@ -124,17 +129,17 @@ func BACnetClosingTagParseWithBuffer(ctx context.Context, readBuffer utils.ReadB } // Validation - if !(bool((header.GetActualTagNumber()) == (tagNumberArgument))) { + if (!(bool((header.GetActualTagNumber()) == (tagNumberArgument)))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } // Validation - if !(bool((header.GetTagClass()) == (TagClass_CONTEXT_SPECIFIC_TAGS))) { + if (!(bool((header.GetTagClass()) == (TagClass_CONTEXT_SPECIFIC_TAGS)))) { return nil, errors.WithStack(utils.ParseValidationError{"should be a context tag"}) } // Validation - if !(bool((header.GetLengthValueType()) == (7))) { + if (!(bool((header.GetLengthValueType()) == ((7))))) { return nil, errors.WithStack(utils.ParseValidationError{"closing tag should have a value of 7"}) } @@ -144,9 +149,9 @@ func BACnetClosingTagParseWithBuffer(ctx context.Context, readBuffer utils.ReadB // Create the instance return &_BACnetClosingTag{ - TagNumberArgument: tagNumberArgument, - Header: header, - }, nil + TagNumberArgument: tagNumberArgument, + Header: header, + }, nil } func (m *_BACnetClosingTag) Serialize() ([]byte, error) { @@ -160,7 +165,7 @@ func (m *_BACnetClosingTag) Serialize() ([]byte, error) { func (m *_BACnetClosingTag) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetClosingTag"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetClosingTag"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetClosingTag") } @@ -182,13 +187,13 @@ func (m *_BACnetClosingTag) SerializeWithWriteBuffer(ctx context.Context, writeB return nil } + //// // Arguments Getter func (m *_BACnetClosingTag) GetTagNumberArgument() uint8 { return m.TagNumberArgument } - // //// @@ -206,3 +211,6 @@ func (m *_BACnetClosingTag) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceChoice.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceChoice.go index 823cf4bc41c..8e137a2231b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceChoice.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceChoice.go @@ -34,46 +34,46 @@ type IBACnetConfirmedServiceChoice interface { utils.Serializable } -const ( - BACnetConfirmedServiceChoice_ACKNOWLEDGE_ALARM BACnetConfirmedServiceChoice = 0x00 - BACnetConfirmedServiceChoice_CONFIRMED_COV_NOTIFICATION BACnetConfirmedServiceChoice = 0x01 +const( + BACnetConfirmedServiceChoice_ACKNOWLEDGE_ALARM BACnetConfirmedServiceChoice = 0x00 + BACnetConfirmedServiceChoice_CONFIRMED_COV_NOTIFICATION BACnetConfirmedServiceChoice = 0x01 BACnetConfirmedServiceChoice_CONFIRMED_COV_NOTIFICATION_MULTIPLE BACnetConfirmedServiceChoice = 0x1F - BACnetConfirmedServiceChoice_CONFIRMED_EVENT_NOTIFICATION BACnetConfirmedServiceChoice = 0x02 - BACnetConfirmedServiceChoice_GET_ALARM_SUMMARY BACnetConfirmedServiceChoice = 0x03 - BACnetConfirmedServiceChoice_GET_ENROLLMENT_SUMMARY BACnetConfirmedServiceChoice = 0x04 - BACnetConfirmedServiceChoice_GET_EVENT_INFORMATION BACnetConfirmedServiceChoice = 0x1D - BACnetConfirmedServiceChoice_LIFE_SAFETY_OPERATION BACnetConfirmedServiceChoice = 0x1B - BACnetConfirmedServiceChoice_SUBSCRIBE_COV BACnetConfirmedServiceChoice = 0x05 - BACnetConfirmedServiceChoice_SUBSCRIBE_COV_PROPERTY BACnetConfirmedServiceChoice = 0x1C - BACnetConfirmedServiceChoice_SUBSCRIBE_COV_PROPERTY_MULTIPLE BACnetConfirmedServiceChoice = 0x1E - BACnetConfirmedServiceChoice_ATOMIC_READ_FILE BACnetConfirmedServiceChoice = 0x06 - BACnetConfirmedServiceChoice_ATOMIC_WRITE_FILE BACnetConfirmedServiceChoice = 0x07 - BACnetConfirmedServiceChoice_ADD_LIST_ELEMENT BACnetConfirmedServiceChoice = 0x08 - BACnetConfirmedServiceChoice_REMOVE_LIST_ELEMENT BACnetConfirmedServiceChoice = 0x09 - BACnetConfirmedServiceChoice_CREATE_OBJECT BACnetConfirmedServiceChoice = 0x0A - BACnetConfirmedServiceChoice_DELETE_OBJECT BACnetConfirmedServiceChoice = 0x0B - BACnetConfirmedServiceChoice_READ_PROPERTY BACnetConfirmedServiceChoice = 0x0C - BACnetConfirmedServiceChoice_READ_PROPERTY_MULTIPLE BACnetConfirmedServiceChoice = 0x0E - BACnetConfirmedServiceChoice_READ_RANGE BACnetConfirmedServiceChoice = 0x1A - BACnetConfirmedServiceChoice_WRITE_PROPERTY BACnetConfirmedServiceChoice = 0x0F - BACnetConfirmedServiceChoice_WRITE_PROPERTY_MULTIPLE BACnetConfirmedServiceChoice = 0x10 - BACnetConfirmedServiceChoice_DEVICE_COMMUNICATION_CONTROL BACnetConfirmedServiceChoice = 0x11 - BACnetConfirmedServiceChoice_CONFIRMED_PRIVATE_TRANSFER BACnetConfirmedServiceChoice = 0x12 - BACnetConfirmedServiceChoice_CONFIRMED_TEXT_MESSAGE BACnetConfirmedServiceChoice = 0x13 - BACnetConfirmedServiceChoice_REINITIALIZE_DEVICE BACnetConfirmedServiceChoice = 0x14 - BACnetConfirmedServiceChoice_VT_OPEN BACnetConfirmedServiceChoice = 0x15 - BACnetConfirmedServiceChoice_VT_CLOSE BACnetConfirmedServiceChoice = 0x16 - BACnetConfirmedServiceChoice_VT_DATA BACnetConfirmedServiceChoice = 0x17 - BACnetConfirmedServiceChoice_AUTHENTICATE BACnetConfirmedServiceChoice = 0x18 - BACnetConfirmedServiceChoice_REQUEST_KEY BACnetConfirmedServiceChoice = 0x19 - BACnetConfirmedServiceChoice_READ_PROPERTY_CONDITIONAL BACnetConfirmedServiceChoice = 0x0D + BACnetConfirmedServiceChoice_CONFIRMED_EVENT_NOTIFICATION BACnetConfirmedServiceChoice = 0x02 + BACnetConfirmedServiceChoice_GET_ALARM_SUMMARY BACnetConfirmedServiceChoice = 0x03 + BACnetConfirmedServiceChoice_GET_ENROLLMENT_SUMMARY BACnetConfirmedServiceChoice = 0x04 + BACnetConfirmedServiceChoice_GET_EVENT_INFORMATION BACnetConfirmedServiceChoice = 0x1D + BACnetConfirmedServiceChoice_LIFE_SAFETY_OPERATION BACnetConfirmedServiceChoice = 0x1B + BACnetConfirmedServiceChoice_SUBSCRIBE_COV BACnetConfirmedServiceChoice = 0x05 + BACnetConfirmedServiceChoice_SUBSCRIBE_COV_PROPERTY BACnetConfirmedServiceChoice = 0x1C + BACnetConfirmedServiceChoice_SUBSCRIBE_COV_PROPERTY_MULTIPLE BACnetConfirmedServiceChoice = 0x1E + BACnetConfirmedServiceChoice_ATOMIC_READ_FILE BACnetConfirmedServiceChoice = 0x06 + BACnetConfirmedServiceChoice_ATOMIC_WRITE_FILE BACnetConfirmedServiceChoice = 0x07 + BACnetConfirmedServiceChoice_ADD_LIST_ELEMENT BACnetConfirmedServiceChoice = 0x08 + BACnetConfirmedServiceChoice_REMOVE_LIST_ELEMENT BACnetConfirmedServiceChoice = 0x09 + BACnetConfirmedServiceChoice_CREATE_OBJECT BACnetConfirmedServiceChoice = 0x0A + BACnetConfirmedServiceChoice_DELETE_OBJECT BACnetConfirmedServiceChoice = 0x0B + BACnetConfirmedServiceChoice_READ_PROPERTY BACnetConfirmedServiceChoice = 0x0C + BACnetConfirmedServiceChoice_READ_PROPERTY_MULTIPLE BACnetConfirmedServiceChoice = 0x0E + BACnetConfirmedServiceChoice_READ_RANGE BACnetConfirmedServiceChoice = 0x1A + BACnetConfirmedServiceChoice_WRITE_PROPERTY BACnetConfirmedServiceChoice = 0x0F + BACnetConfirmedServiceChoice_WRITE_PROPERTY_MULTIPLE BACnetConfirmedServiceChoice = 0x10 + BACnetConfirmedServiceChoice_DEVICE_COMMUNICATION_CONTROL BACnetConfirmedServiceChoice = 0x11 + BACnetConfirmedServiceChoice_CONFIRMED_PRIVATE_TRANSFER BACnetConfirmedServiceChoice = 0x12 + BACnetConfirmedServiceChoice_CONFIRMED_TEXT_MESSAGE BACnetConfirmedServiceChoice = 0x13 + BACnetConfirmedServiceChoice_REINITIALIZE_DEVICE BACnetConfirmedServiceChoice = 0x14 + BACnetConfirmedServiceChoice_VT_OPEN BACnetConfirmedServiceChoice = 0x15 + BACnetConfirmedServiceChoice_VT_CLOSE BACnetConfirmedServiceChoice = 0x16 + BACnetConfirmedServiceChoice_VT_DATA BACnetConfirmedServiceChoice = 0x17 + BACnetConfirmedServiceChoice_AUTHENTICATE BACnetConfirmedServiceChoice = 0x18 + BACnetConfirmedServiceChoice_REQUEST_KEY BACnetConfirmedServiceChoice = 0x19 + BACnetConfirmedServiceChoice_READ_PROPERTY_CONDITIONAL BACnetConfirmedServiceChoice = 0x0D ) var BACnetConfirmedServiceChoiceValues []BACnetConfirmedServiceChoice func init() { _ = errors.New - BACnetConfirmedServiceChoiceValues = []BACnetConfirmedServiceChoice{ + BACnetConfirmedServiceChoiceValues = []BACnetConfirmedServiceChoice { BACnetConfirmedServiceChoice_ACKNOWLEDGE_ALARM, BACnetConfirmedServiceChoice_CONFIRMED_COV_NOTIFICATION, BACnetConfirmedServiceChoice_CONFIRMED_COV_NOTIFICATION_MULTIPLE, @@ -111,70 +111,70 @@ func init() { func BACnetConfirmedServiceChoiceByValue(value uint8) (enum BACnetConfirmedServiceChoice, ok bool) { switch value { - case 0x00: - return BACnetConfirmedServiceChoice_ACKNOWLEDGE_ALARM, true - case 0x01: - return BACnetConfirmedServiceChoice_CONFIRMED_COV_NOTIFICATION, true - case 0x02: - return BACnetConfirmedServiceChoice_CONFIRMED_EVENT_NOTIFICATION, true - case 0x03: - return BACnetConfirmedServiceChoice_GET_ALARM_SUMMARY, true - case 0x04: - return BACnetConfirmedServiceChoice_GET_ENROLLMENT_SUMMARY, true - case 0x05: - return BACnetConfirmedServiceChoice_SUBSCRIBE_COV, true - case 0x06: - return BACnetConfirmedServiceChoice_ATOMIC_READ_FILE, true - case 0x07: - return BACnetConfirmedServiceChoice_ATOMIC_WRITE_FILE, true - case 0x08: - return BACnetConfirmedServiceChoice_ADD_LIST_ELEMENT, true - case 0x09: - return BACnetConfirmedServiceChoice_REMOVE_LIST_ELEMENT, true - case 0x0A: - return BACnetConfirmedServiceChoice_CREATE_OBJECT, true - case 0x0B: - return BACnetConfirmedServiceChoice_DELETE_OBJECT, true - case 0x0C: - return BACnetConfirmedServiceChoice_READ_PROPERTY, true - case 0x0D: - return BACnetConfirmedServiceChoice_READ_PROPERTY_CONDITIONAL, true - case 0x0E: - return BACnetConfirmedServiceChoice_READ_PROPERTY_MULTIPLE, true - case 0x0F: - return BACnetConfirmedServiceChoice_WRITE_PROPERTY, true - case 0x10: - return BACnetConfirmedServiceChoice_WRITE_PROPERTY_MULTIPLE, true - case 0x11: - return BACnetConfirmedServiceChoice_DEVICE_COMMUNICATION_CONTROL, true - case 0x12: - return BACnetConfirmedServiceChoice_CONFIRMED_PRIVATE_TRANSFER, true - case 0x13: - return BACnetConfirmedServiceChoice_CONFIRMED_TEXT_MESSAGE, true - case 0x14: - return BACnetConfirmedServiceChoice_REINITIALIZE_DEVICE, true - case 0x15: - return BACnetConfirmedServiceChoice_VT_OPEN, true - case 0x16: - return BACnetConfirmedServiceChoice_VT_CLOSE, true - case 0x17: - return BACnetConfirmedServiceChoice_VT_DATA, true - case 0x18: - return BACnetConfirmedServiceChoice_AUTHENTICATE, true - case 0x19: - return BACnetConfirmedServiceChoice_REQUEST_KEY, true - case 0x1A: - return BACnetConfirmedServiceChoice_READ_RANGE, true - case 0x1B: - return BACnetConfirmedServiceChoice_LIFE_SAFETY_OPERATION, true - case 0x1C: - return BACnetConfirmedServiceChoice_SUBSCRIBE_COV_PROPERTY, true - case 0x1D: - return BACnetConfirmedServiceChoice_GET_EVENT_INFORMATION, true - case 0x1E: - return BACnetConfirmedServiceChoice_SUBSCRIBE_COV_PROPERTY_MULTIPLE, true - case 0x1F: - return BACnetConfirmedServiceChoice_CONFIRMED_COV_NOTIFICATION_MULTIPLE, true + case 0x00: + return BACnetConfirmedServiceChoice_ACKNOWLEDGE_ALARM, true + case 0x01: + return BACnetConfirmedServiceChoice_CONFIRMED_COV_NOTIFICATION, true + case 0x02: + return BACnetConfirmedServiceChoice_CONFIRMED_EVENT_NOTIFICATION, true + case 0x03: + return BACnetConfirmedServiceChoice_GET_ALARM_SUMMARY, true + case 0x04: + return BACnetConfirmedServiceChoice_GET_ENROLLMENT_SUMMARY, true + case 0x05: + return BACnetConfirmedServiceChoice_SUBSCRIBE_COV, true + case 0x06: + return BACnetConfirmedServiceChoice_ATOMIC_READ_FILE, true + case 0x07: + return BACnetConfirmedServiceChoice_ATOMIC_WRITE_FILE, true + case 0x08: + return BACnetConfirmedServiceChoice_ADD_LIST_ELEMENT, true + case 0x09: + return BACnetConfirmedServiceChoice_REMOVE_LIST_ELEMENT, true + case 0x0A: + return BACnetConfirmedServiceChoice_CREATE_OBJECT, true + case 0x0B: + return BACnetConfirmedServiceChoice_DELETE_OBJECT, true + case 0x0C: + return BACnetConfirmedServiceChoice_READ_PROPERTY, true + case 0x0D: + return BACnetConfirmedServiceChoice_READ_PROPERTY_CONDITIONAL, true + case 0x0E: + return BACnetConfirmedServiceChoice_READ_PROPERTY_MULTIPLE, true + case 0x0F: + return BACnetConfirmedServiceChoice_WRITE_PROPERTY, true + case 0x10: + return BACnetConfirmedServiceChoice_WRITE_PROPERTY_MULTIPLE, true + case 0x11: + return BACnetConfirmedServiceChoice_DEVICE_COMMUNICATION_CONTROL, true + case 0x12: + return BACnetConfirmedServiceChoice_CONFIRMED_PRIVATE_TRANSFER, true + case 0x13: + return BACnetConfirmedServiceChoice_CONFIRMED_TEXT_MESSAGE, true + case 0x14: + return BACnetConfirmedServiceChoice_REINITIALIZE_DEVICE, true + case 0x15: + return BACnetConfirmedServiceChoice_VT_OPEN, true + case 0x16: + return BACnetConfirmedServiceChoice_VT_CLOSE, true + case 0x17: + return BACnetConfirmedServiceChoice_VT_DATA, true + case 0x18: + return BACnetConfirmedServiceChoice_AUTHENTICATE, true + case 0x19: + return BACnetConfirmedServiceChoice_REQUEST_KEY, true + case 0x1A: + return BACnetConfirmedServiceChoice_READ_RANGE, true + case 0x1B: + return BACnetConfirmedServiceChoice_LIFE_SAFETY_OPERATION, true + case 0x1C: + return BACnetConfirmedServiceChoice_SUBSCRIBE_COV_PROPERTY, true + case 0x1D: + return BACnetConfirmedServiceChoice_GET_EVENT_INFORMATION, true + case 0x1E: + return BACnetConfirmedServiceChoice_SUBSCRIBE_COV_PROPERTY_MULTIPLE, true + case 0x1F: + return BACnetConfirmedServiceChoice_CONFIRMED_COV_NOTIFICATION_MULTIPLE, true } return 0, false } @@ -249,13 +249,13 @@ func BACnetConfirmedServiceChoiceByName(value string) (enum BACnetConfirmedServi return 0, false } -func BACnetConfirmedServiceChoiceKnows(value uint8) bool { +func BACnetConfirmedServiceChoiceKnows(value uint8) bool { for _, typeValue := range BACnetConfirmedServiceChoiceValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetConfirmedServiceChoice(structType interface{}) BACnetConfirmedServiceChoice { @@ -379,3 +379,4 @@ func (e BACnetConfirmedServiceChoice) PLC4XEnumName() string { func (e BACnetConfirmedServiceChoice) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequest.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequest.go index acb899c4748..518eea1a6fe 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequest.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequest is the corresponding interface of BACnetConfirmedServiceRequest type BACnetConfirmedServiceRequest interface { @@ -58,6 +60,7 @@ type _BACnetConfirmedServiceRequestChildRequirements interface { GetServiceChoice() BACnetConfirmedServiceChoice } + type BACnetConfirmedServiceRequestParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetConfirmedServiceRequest, serializeChildFunction func() error) error GetTypeName() string @@ -65,13 +68,12 @@ type BACnetConfirmedServiceRequestParent interface { type BACnetConfirmedServiceRequestChild interface { utils.Serializable - InitializeParent(parent BACnetConfirmedServiceRequest) +InitializeParent(parent BACnetConfirmedServiceRequest ) GetParent() *BACnetConfirmedServiceRequest GetTypeName() string BACnetConfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for virtual fields. @@ -80,7 +82,7 @@ type BACnetConfirmedServiceRequestChild interface { func (m *_BACnetConfirmedServiceRequest) GetServiceRequestPayloadLength() uint32 { ctx := context.Background() _ = ctx - return uint32(utils.InlineIf((bool((m.ServiceRequestLength) > (0))), func() interface{} { return uint32((uint32(m.ServiceRequestLength) - uint32(uint32(1)))) }, func() interface{} { return uint32(uint32(0)) }).(uint32)) + return uint32(utils.InlineIf((bool((m.ServiceRequestLength) > ((0)))), func() interface{} {return uint32((uint32(m.ServiceRequestLength) - uint32(uint32(1))))}, func() interface{} {return uint32(uint32(0))}).(uint32)) } /////////////////////// @@ -88,14 +90,15 @@ func (m *_BACnetConfirmedServiceRequest) GetServiceRequestPayloadLength() uint32 /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequest factory function for _BACnetConfirmedServiceRequest -func NewBACnetConfirmedServiceRequest(serviceRequestLength uint32) *_BACnetConfirmedServiceRequest { - return &_BACnetConfirmedServiceRequest{ServiceRequestLength: serviceRequestLength} +func NewBACnetConfirmedServiceRequest( serviceRequestLength uint32 ) *_BACnetConfirmedServiceRequest { +return &_BACnetConfirmedServiceRequest{ ServiceRequestLength: serviceRequestLength } } // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequest(structType interface{}) BACnetConfirmedServiceRequest { - if casted, ok := structType.(BACnetConfirmedServiceRequest); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequest); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequest); ok { @@ -108,10 +111,11 @@ func (m *_BACnetConfirmedServiceRequest) GetTypeName() string { return "BACnetConfirmedServiceRequest" } + func (m *_BACnetConfirmedServiceRequest) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Discriminator Field (serviceChoice) - lengthInBits += 8 + lengthInBits += 8; // A virtual field doesn't have any in- or output. @@ -149,83 +153,83 @@ func BACnetConfirmedServiceRequestParseWithBuffer(ctx context.Context, readBuffe } // Virtual field - _serviceRequestPayloadLength := utils.InlineIf((bool((serviceRequestLength) > (0))), func() interface{} { return uint32((uint32(serviceRequestLength) - uint32(uint32(1)))) }, func() interface{} { return uint32(uint32(0)) }).(uint32) + _serviceRequestPayloadLength := utils.InlineIf((bool((serviceRequestLength) > ((0)))), func() interface{} {return uint32((uint32(serviceRequestLength) - uint32(uint32(1))))}, func() interface{} {return uint32(uint32(0))}).(uint32) serviceRequestPayloadLength := uint32(_serviceRequestPayloadLength) _ = serviceRequestPayloadLength // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetConfirmedServiceRequestChildSerializeRequirement interface { BACnetConfirmedServiceRequest - InitializeParent(BACnetConfirmedServiceRequest) + InitializeParent(BACnetConfirmedServiceRequest ) GetParent() BACnetConfirmedServiceRequest } var _childTemp interface{} var _child BACnetConfirmedServiceRequestChildSerializeRequirement var typeSwitchError error switch { - case serviceChoice == BACnetConfirmedServiceChoice_ACKNOWLEDGE_ALARM: // BACnetConfirmedServiceRequestAcknowledgeAlarm +case serviceChoice == BACnetConfirmedServiceChoice_ACKNOWLEDGE_ALARM : // BACnetConfirmedServiceRequestAcknowledgeAlarm _childTemp, typeSwitchError = BACnetConfirmedServiceRequestAcknowledgeAlarmParseWithBuffer(ctx, readBuffer, serviceRequestLength) - case serviceChoice == BACnetConfirmedServiceChoice_CONFIRMED_COV_NOTIFICATION: // BACnetConfirmedServiceRequestConfirmedCOVNotification +case serviceChoice == BACnetConfirmedServiceChoice_CONFIRMED_COV_NOTIFICATION : // BACnetConfirmedServiceRequestConfirmedCOVNotification _childTemp, typeSwitchError = BACnetConfirmedServiceRequestConfirmedCOVNotificationParseWithBuffer(ctx, readBuffer, serviceRequestLength) - case serviceChoice == BACnetConfirmedServiceChoice_CONFIRMED_COV_NOTIFICATION_MULTIPLE: // BACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple +case serviceChoice == BACnetConfirmedServiceChoice_CONFIRMED_COV_NOTIFICATION_MULTIPLE : // BACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple _childTemp, typeSwitchError = BACnetConfirmedServiceRequestConfirmedCOVNotificationMultipleParseWithBuffer(ctx, readBuffer, serviceRequestLength) - case serviceChoice == BACnetConfirmedServiceChoice_CONFIRMED_EVENT_NOTIFICATION: // BACnetConfirmedServiceRequestConfirmedEventNotification +case serviceChoice == BACnetConfirmedServiceChoice_CONFIRMED_EVENT_NOTIFICATION : // BACnetConfirmedServiceRequestConfirmedEventNotification _childTemp, typeSwitchError = BACnetConfirmedServiceRequestConfirmedEventNotificationParseWithBuffer(ctx, readBuffer, serviceRequestLength) - case serviceChoice == BACnetConfirmedServiceChoice_GET_ENROLLMENT_SUMMARY: // BACnetConfirmedServiceRequestGetEnrollmentSummary +case serviceChoice == BACnetConfirmedServiceChoice_GET_ENROLLMENT_SUMMARY : // BACnetConfirmedServiceRequestGetEnrollmentSummary _childTemp, typeSwitchError = BACnetConfirmedServiceRequestGetEnrollmentSummaryParseWithBuffer(ctx, readBuffer, serviceRequestLength) - case serviceChoice == BACnetConfirmedServiceChoice_GET_EVENT_INFORMATION: // BACnetConfirmedServiceRequestGetEventInformation +case serviceChoice == BACnetConfirmedServiceChoice_GET_EVENT_INFORMATION : // BACnetConfirmedServiceRequestGetEventInformation _childTemp, typeSwitchError = BACnetConfirmedServiceRequestGetEventInformationParseWithBuffer(ctx, readBuffer, serviceRequestLength) - case serviceChoice == BACnetConfirmedServiceChoice_LIFE_SAFETY_OPERATION: // BACnetConfirmedServiceRequestLifeSafetyOperation +case serviceChoice == BACnetConfirmedServiceChoice_LIFE_SAFETY_OPERATION : // BACnetConfirmedServiceRequestLifeSafetyOperation _childTemp, typeSwitchError = BACnetConfirmedServiceRequestLifeSafetyOperationParseWithBuffer(ctx, readBuffer, serviceRequestLength) - case serviceChoice == BACnetConfirmedServiceChoice_SUBSCRIBE_COV: // BACnetConfirmedServiceRequestSubscribeCOV +case serviceChoice == BACnetConfirmedServiceChoice_SUBSCRIBE_COV : // BACnetConfirmedServiceRequestSubscribeCOV _childTemp, typeSwitchError = BACnetConfirmedServiceRequestSubscribeCOVParseWithBuffer(ctx, readBuffer, serviceRequestLength) - case serviceChoice == BACnetConfirmedServiceChoice_SUBSCRIBE_COV_PROPERTY: // BACnetConfirmedServiceRequestSubscribeCOVProperty +case serviceChoice == BACnetConfirmedServiceChoice_SUBSCRIBE_COV_PROPERTY : // BACnetConfirmedServiceRequestSubscribeCOVProperty _childTemp, typeSwitchError = BACnetConfirmedServiceRequestSubscribeCOVPropertyParseWithBuffer(ctx, readBuffer, serviceRequestLength) - case serviceChoice == BACnetConfirmedServiceChoice_SUBSCRIBE_COV_PROPERTY_MULTIPLE: // BACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple +case serviceChoice == BACnetConfirmedServiceChoice_SUBSCRIBE_COV_PROPERTY_MULTIPLE : // BACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple _childTemp, typeSwitchError = BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleParseWithBuffer(ctx, readBuffer, serviceRequestLength) - case serviceChoice == BACnetConfirmedServiceChoice_ATOMIC_READ_FILE: // BACnetConfirmedServiceRequestAtomicReadFile +case serviceChoice == BACnetConfirmedServiceChoice_ATOMIC_READ_FILE : // BACnetConfirmedServiceRequestAtomicReadFile _childTemp, typeSwitchError = BACnetConfirmedServiceRequestAtomicReadFileParseWithBuffer(ctx, readBuffer, serviceRequestLength) - case serviceChoice == BACnetConfirmedServiceChoice_ATOMIC_WRITE_FILE: // BACnetConfirmedServiceRequestAtomicWriteFile +case serviceChoice == BACnetConfirmedServiceChoice_ATOMIC_WRITE_FILE : // BACnetConfirmedServiceRequestAtomicWriteFile _childTemp, typeSwitchError = BACnetConfirmedServiceRequestAtomicWriteFileParseWithBuffer(ctx, readBuffer, serviceRequestLength) - case serviceChoice == BACnetConfirmedServiceChoice_ADD_LIST_ELEMENT: // BACnetConfirmedServiceRequestAddListElement +case serviceChoice == BACnetConfirmedServiceChoice_ADD_LIST_ELEMENT : // BACnetConfirmedServiceRequestAddListElement _childTemp, typeSwitchError = BACnetConfirmedServiceRequestAddListElementParseWithBuffer(ctx, readBuffer, serviceRequestLength) - case serviceChoice == BACnetConfirmedServiceChoice_REMOVE_LIST_ELEMENT: // BACnetConfirmedServiceRequestRemoveListElement +case serviceChoice == BACnetConfirmedServiceChoice_REMOVE_LIST_ELEMENT : // BACnetConfirmedServiceRequestRemoveListElement _childTemp, typeSwitchError = BACnetConfirmedServiceRequestRemoveListElementParseWithBuffer(ctx, readBuffer, serviceRequestLength) - case serviceChoice == BACnetConfirmedServiceChoice_CREATE_OBJECT: // BACnetConfirmedServiceRequestCreateObject +case serviceChoice == BACnetConfirmedServiceChoice_CREATE_OBJECT : // BACnetConfirmedServiceRequestCreateObject _childTemp, typeSwitchError = BACnetConfirmedServiceRequestCreateObjectParseWithBuffer(ctx, readBuffer, serviceRequestLength) - case serviceChoice == BACnetConfirmedServiceChoice_DELETE_OBJECT: // BACnetConfirmedServiceRequestDeleteObject +case serviceChoice == BACnetConfirmedServiceChoice_DELETE_OBJECT : // BACnetConfirmedServiceRequestDeleteObject _childTemp, typeSwitchError = BACnetConfirmedServiceRequestDeleteObjectParseWithBuffer(ctx, readBuffer, serviceRequestLength) - case serviceChoice == BACnetConfirmedServiceChoice_READ_PROPERTY: // BACnetConfirmedServiceRequestReadProperty +case serviceChoice == BACnetConfirmedServiceChoice_READ_PROPERTY : // BACnetConfirmedServiceRequestReadProperty _childTemp, typeSwitchError = BACnetConfirmedServiceRequestReadPropertyParseWithBuffer(ctx, readBuffer, serviceRequestLength) - case serviceChoice == BACnetConfirmedServiceChoice_READ_PROPERTY_MULTIPLE: // BACnetConfirmedServiceRequestReadPropertyMultiple +case serviceChoice == BACnetConfirmedServiceChoice_READ_PROPERTY_MULTIPLE : // BACnetConfirmedServiceRequestReadPropertyMultiple _childTemp, typeSwitchError = BACnetConfirmedServiceRequestReadPropertyMultipleParseWithBuffer(ctx, readBuffer, serviceRequestPayloadLength, serviceRequestLength) - case serviceChoice == BACnetConfirmedServiceChoice_READ_RANGE: // BACnetConfirmedServiceRequestReadRange +case serviceChoice == BACnetConfirmedServiceChoice_READ_RANGE : // BACnetConfirmedServiceRequestReadRange _childTemp, typeSwitchError = BACnetConfirmedServiceRequestReadRangeParseWithBuffer(ctx, readBuffer, serviceRequestLength) - case serviceChoice == BACnetConfirmedServiceChoice_WRITE_PROPERTY: // BACnetConfirmedServiceRequestWriteProperty +case serviceChoice == BACnetConfirmedServiceChoice_WRITE_PROPERTY : // BACnetConfirmedServiceRequestWriteProperty _childTemp, typeSwitchError = BACnetConfirmedServiceRequestWritePropertyParseWithBuffer(ctx, readBuffer, serviceRequestLength) - case serviceChoice == BACnetConfirmedServiceChoice_WRITE_PROPERTY_MULTIPLE: // BACnetConfirmedServiceRequestWritePropertyMultiple +case serviceChoice == BACnetConfirmedServiceChoice_WRITE_PROPERTY_MULTIPLE : // BACnetConfirmedServiceRequestWritePropertyMultiple _childTemp, typeSwitchError = BACnetConfirmedServiceRequestWritePropertyMultipleParseWithBuffer(ctx, readBuffer, serviceRequestPayloadLength, serviceRequestLength) - case serviceChoice == BACnetConfirmedServiceChoice_DEVICE_COMMUNICATION_CONTROL: // BACnetConfirmedServiceRequestDeviceCommunicationControl +case serviceChoice == BACnetConfirmedServiceChoice_DEVICE_COMMUNICATION_CONTROL : // BACnetConfirmedServiceRequestDeviceCommunicationControl _childTemp, typeSwitchError = BACnetConfirmedServiceRequestDeviceCommunicationControlParseWithBuffer(ctx, readBuffer, serviceRequestLength) - case serviceChoice == BACnetConfirmedServiceChoice_CONFIRMED_PRIVATE_TRANSFER: // BACnetConfirmedServiceRequestConfirmedPrivateTransfer +case serviceChoice == BACnetConfirmedServiceChoice_CONFIRMED_PRIVATE_TRANSFER : // BACnetConfirmedServiceRequestConfirmedPrivateTransfer _childTemp, typeSwitchError = BACnetConfirmedServiceRequestConfirmedPrivateTransferParseWithBuffer(ctx, readBuffer, serviceRequestLength) - case serviceChoice == BACnetConfirmedServiceChoice_CONFIRMED_TEXT_MESSAGE: // BACnetConfirmedServiceRequestConfirmedTextMessage +case serviceChoice == BACnetConfirmedServiceChoice_CONFIRMED_TEXT_MESSAGE : // BACnetConfirmedServiceRequestConfirmedTextMessage _childTemp, typeSwitchError = BACnetConfirmedServiceRequestConfirmedTextMessageParseWithBuffer(ctx, readBuffer, serviceRequestLength) - case serviceChoice == BACnetConfirmedServiceChoice_REINITIALIZE_DEVICE: // BACnetConfirmedServiceRequestReinitializeDevice +case serviceChoice == BACnetConfirmedServiceChoice_REINITIALIZE_DEVICE : // BACnetConfirmedServiceRequestReinitializeDevice _childTemp, typeSwitchError = BACnetConfirmedServiceRequestReinitializeDeviceParseWithBuffer(ctx, readBuffer, serviceRequestLength) - case serviceChoice == BACnetConfirmedServiceChoice_VT_OPEN: // BACnetConfirmedServiceRequestVTOpen +case serviceChoice == BACnetConfirmedServiceChoice_VT_OPEN : // BACnetConfirmedServiceRequestVTOpen _childTemp, typeSwitchError = BACnetConfirmedServiceRequestVTOpenParseWithBuffer(ctx, readBuffer, serviceRequestLength) - case serviceChoice == BACnetConfirmedServiceChoice_VT_CLOSE: // BACnetConfirmedServiceRequestVTClose +case serviceChoice == BACnetConfirmedServiceChoice_VT_CLOSE : // BACnetConfirmedServiceRequestVTClose _childTemp, typeSwitchError = BACnetConfirmedServiceRequestVTCloseParseWithBuffer(ctx, readBuffer, serviceRequestPayloadLength, serviceRequestLength) - case serviceChoice == BACnetConfirmedServiceChoice_VT_DATA: // BACnetConfirmedServiceRequestVTData +case serviceChoice == BACnetConfirmedServiceChoice_VT_DATA : // BACnetConfirmedServiceRequestVTData _childTemp, typeSwitchError = BACnetConfirmedServiceRequestVTDataParseWithBuffer(ctx, readBuffer, serviceRequestLength) - case serviceChoice == BACnetConfirmedServiceChoice_AUTHENTICATE: // BACnetConfirmedServiceRequestAuthenticate +case serviceChoice == BACnetConfirmedServiceChoice_AUTHENTICATE : // BACnetConfirmedServiceRequestAuthenticate _childTemp, typeSwitchError = BACnetConfirmedServiceRequestAuthenticateParseWithBuffer(ctx, readBuffer, serviceRequestPayloadLength, serviceRequestLength) - case serviceChoice == BACnetConfirmedServiceChoice_REQUEST_KEY: // BACnetConfirmedServiceRequestRequestKey +case serviceChoice == BACnetConfirmedServiceChoice_REQUEST_KEY : // BACnetConfirmedServiceRequestRequestKey _childTemp, typeSwitchError = BACnetConfirmedServiceRequestRequestKeyParseWithBuffer(ctx, readBuffer, serviceRequestPayloadLength, serviceRequestLength) - case serviceChoice == BACnetConfirmedServiceChoice_READ_PROPERTY_CONDITIONAL: // BACnetConfirmedServiceRequestReadPropertyConditional +case serviceChoice == BACnetConfirmedServiceChoice_READ_PROPERTY_CONDITIONAL : // BACnetConfirmedServiceRequestReadPropertyConditional _childTemp, typeSwitchError = BACnetConfirmedServiceRequestReadPropertyConditionalParseWithBuffer(ctx, readBuffer, serviceRequestPayloadLength, serviceRequestLength) - case 0 == 0: // BACnetConfirmedServiceRequestUnknown +case 0==0 : // BACnetConfirmedServiceRequestUnknown _childTemp, typeSwitchError = BACnetConfirmedServiceRequestUnknownParseWithBuffer(ctx, readBuffer, serviceRequestPayloadLength, serviceRequestLength) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [serviceChoice=%v]", serviceChoice) @@ -240,7 +244,7 @@ func BACnetConfirmedServiceRequestParseWithBuffer(ctx context.Context, readBuffe } // Finish initializing - _child.InitializeParent(_child) +_child.InitializeParent(_child ) return _child, nil } @@ -250,7 +254,7 @@ func (pm *_BACnetConfirmedServiceRequest) SerializeParent(ctx context.Context, w _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetConfirmedServiceRequest"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetConfirmedServiceRequest"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequest") } @@ -283,13 +287,13 @@ func (pm *_BACnetConfirmedServiceRequest) SerializeParent(ctx context.Context, w return nil } + //// // Arguments Getter func (m *_BACnetConfirmedServiceRequest) GetServiceRequestLength() uint32 { return m.ServiceRequestLength } - // //// @@ -307,3 +311,6 @@ func (m *_BACnetConfirmedServiceRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestAcknowledgeAlarm.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestAcknowledgeAlarm.go index f8aae772669..d8b823b8156 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestAcknowledgeAlarm.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestAcknowledgeAlarm.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestAcknowledgeAlarm is the corresponding interface of BACnetConfirmedServiceRequestAcknowledgeAlarm type BACnetConfirmedServiceRequestAcknowledgeAlarm interface { @@ -56,35 +58,34 @@ type BACnetConfirmedServiceRequestAcknowledgeAlarmExactly interface { // _BACnetConfirmedServiceRequestAcknowledgeAlarm is the data-structure of this message type _BACnetConfirmedServiceRequestAcknowledgeAlarm struct { *_BACnetConfirmedServiceRequest - AcknowledgingProcessIdentifier BACnetContextTagUnsignedInteger - EventObjectIdentifier BACnetContextTagObjectIdentifier - EventStateAcknowledged BACnetEventStateTagged - Timestamp BACnetTimeStampEnclosed - AcknowledgmentSource BACnetContextTagCharacterString - TimeOfAcknowledgment BACnetTimeStampEnclosed + AcknowledgingProcessIdentifier BACnetContextTagUnsignedInteger + EventObjectIdentifier BACnetContextTagObjectIdentifier + EventStateAcknowledged BACnetEventStateTagged + Timestamp BACnetTimeStampEnclosed + AcknowledgmentSource BACnetContextTagCharacterString + TimeOfAcknowledgment BACnetTimeStampEnclosed } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConfirmedServiceRequestAcknowledgeAlarm) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_ACKNOWLEDGE_ALARM -} +func (m *_BACnetConfirmedServiceRequestAcknowledgeAlarm) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_ACKNOWLEDGE_ALARM} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConfirmedServiceRequestAcknowledgeAlarm) InitializeParent(parent BACnetConfirmedServiceRequest) { -} +func (m *_BACnetConfirmedServiceRequestAcknowledgeAlarm) InitializeParent(parent BACnetConfirmedServiceRequest ) {} -func (m *_BACnetConfirmedServiceRequestAcknowledgeAlarm) GetParent() BACnetConfirmedServiceRequest { +func (m *_BACnetConfirmedServiceRequestAcknowledgeAlarm) GetParent() BACnetConfirmedServiceRequest { return m._BACnetConfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,16 +120,17 @@ func (m *_BACnetConfirmedServiceRequestAcknowledgeAlarm) GetTimeOfAcknowledgment /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestAcknowledgeAlarm factory function for _BACnetConfirmedServiceRequestAcknowledgeAlarm -func NewBACnetConfirmedServiceRequestAcknowledgeAlarm(acknowledgingProcessIdentifier BACnetContextTagUnsignedInteger, eventObjectIdentifier BACnetContextTagObjectIdentifier, eventStateAcknowledged BACnetEventStateTagged, timestamp BACnetTimeStampEnclosed, acknowledgmentSource BACnetContextTagCharacterString, timeOfAcknowledgment BACnetTimeStampEnclosed, serviceRequestLength uint32) *_BACnetConfirmedServiceRequestAcknowledgeAlarm { +func NewBACnetConfirmedServiceRequestAcknowledgeAlarm( acknowledgingProcessIdentifier BACnetContextTagUnsignedInteger , eventObjectIdentifier BACnetContextTagObjectIdentifier , eventStateAcknowledged BACnetEventStateTagged , timestamp BACnetTimeStampEnclosed , acknowledgmentSource BACnetContextTagCharacterString , timeOfAcknowledgment BACnetTimeStampEnclosed , serviceRequestLength uint32 ) *_BACnetConfirmedServiceRequestAcknowledgeAlarm { _result := &_BACnetConfirmedServiceRequestAcknowledgeAlarm{ AcknowledgingProcessIdentifier: acknowledgingProcessIdentifier, - EventObjectIdentifier: eventObjectIdentifier, - EventStateAcknowledged: eventStateAcknowledged, - Timestamp: timestamp, - AcknowledgmentSource: acknowledgmentSource, - TimeOfAcknowledgment: timeOfAcknowledgment, - _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), + EventObjectIdentifier: eventObjectIdentifier, + EventStateAcknowledged: eventStateAcknowledged, + Timestamp: timestamp, + AcknowledgmentSource: acknowledgmentSource, + TimeOfAcknowledgment: timeOfAcknowledgment, + _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), } _result._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _result return _result @@ -136,7 +138,7 @@ func NewBACnetConfirmedServiceRequestAcknowledgeAlarm(acknowledgingProcessIdenti // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestAcknowledgeAlarm(structType interface{}) BACnetConfirmedServiceRequestAcknowledgeAlarm { - if casted, ok := structType.(BACnetConfirmedServiceRequestAcknowledgeAlarm); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestAcknowledgeAlarm); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestAcknowledgeAlarm); ok { @@ -173,6 +175,7 @@ func (m *_BACnetConfirmedServiceRequestAcknowledgeAlarm) GetLengthInBits(ctx con return lengthInBits } + func (m *_BACnetConfirmedServiceRequestAcknowledgeAlarm) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +197,7 @@ func BACnetConfirmedServiceRequestAcknowledgeAlarmParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("acknowledgingProcessIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for acknowledgingProcessIdentifier") } - _acknowledgingProcessIdentifier, _acknowledgingProcessIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_acknowledgingProcessIdentifier, _acknowledgingProcessIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _acknowledgingProcessIdentifierErr != nil { return nil, errors.Wrap(_acknowledgingProcessIdentifierErr, "Error parsing 'acknowledgingProcessIdentifier' field of BACnetConfirmedServiceRequestAcknowledgeAlarm") } @@ -207,7 +210,7 @@ func BACnetConfirmedServiceRequestAcknowledgeAlarmParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("eventObjectIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for eventObjectIdentifier") } - _eventObjectIdentifier, _eventObjectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER)) +_eventObjectIdentifier, _eventObjectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_BACNET_OBJECT_IDENTIFIER ) ) if _eventObjectIdentifierErr != nil { return nil, errors.Wrap(_eventObjectIdentifierErr, "Error parsing 'eventObjectIdentifier' field of BACnetConfirmedServiceRequestAcknowledgeAlarm") } @@ -220,7 +223,7 @@ func BACnetConfirmedServiceRequestAcknowledgeAlarmParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("eventStateAcknowledged"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for eventStateAcknowledged") } - _eventStateAcknowledged, _eventStateAcknowledgedErr := BACnetEventStateTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_eventStateAcknowledged, _eventStateAcknowledgedErr := BACnetEventStateTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _eventStateAcknowledgedErr != nil { return nil, errors.Wrap(_eventStateAcknowledgedErr, "Error parsing 'eventStateAcknowledged' field of BACnetConfirmedServiceRequestAcknowledgeAlarm") } @@ -233,7 +236,7 @@ func BACnetConfirmedServiceRequestAcknowledgeAlarmParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("timestamp"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timestamp") } - _timestamp, _timestampErr := BACnetTimeStampEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(3))) +_timestamp, _timestampErr := BACnetTimeStampEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(3) ) ) if _timestampErr != nil { return nil, errors.Wrap(_timestampErr, "Error parsing 'timestamp' field of BACnetConfirmedServiceRequestAcknowledgeAlarm") } @@ -246,7 +249,7 @@ func BACnetConfirmedServiceRequestAcknowledgeAlarmParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("acknowledgmentSource"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for acknowledgmentSource") } - _acknowledgmentSource, _acknowledgmentSourceErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(4)), BACnetDataType(BACnetDataType_CHARACTER_STRING)) +_acknowledgmentSource, _acknowledgmentSourceErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(4) ) , BACnetDataType( BACnetDataType_CHARACTER_STRING ) ) if _acknowledgmentSourceErr != nil { return nil, errors.Wrap(_acknowledgmentSourceErr, "Error parsing 'acknowledgmentSource' field of BACnetConfirmedServiceRequestAcknowledgeAlarm") } @@ -259,7 +262,7 @@ func BACnetConfirmedServiceRequestAcknowledgeAlarmParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("timeOfAcknowledgment"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeOfAcknowledgment") } - _timeOfAcknowledgment, _timeOfAcknowledgmentErr := BACnetTimeStampEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(5))) +_timeOfAcknowledgment, _timeOfAcknowledgmentErr := BACnetTimeStampEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(5) ) ) if _timeOfAcknowledgmentErr != nil { return nil, errors.Wrap(_timeOfAcknowledgmentErr, "Error parsing 'timeOfAcknowledgment' field of BACnetConfirmedServiceRequestAcknowledgeAlarm") } @@ -278,11 +281,11 @@ func BACnetConfirmedServiceRequestAcknowledgeAlarmParseWithBuffer(ctx context.Co ServiceRequestLength: serviceRequestLength, }, AcknowledgingProcessIdentifier: acknowledgingProcessIdentifier, - EventObjectIdentifier: eventObjectIdentifier, - EventStateAcknowledged: eventStateAcknowledged, - Timestamp: timestamp, - AcknowledgmentSource: acknowledgmentSource, - TimeOfAcknowledgment: timeOfAcknowledgment, + EventObjectIdentifier: eventObjectIdentifier, + EventStateAcknowledged: eventStateAcknowledged, + Timestamp: timestamp, + AcknowledgmentSource: acknowledgmentSource, + TimeOfAcknowledgment: timeOfAcknowledgment, } _child._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _child return _child, nil @@ -304,77 +307,77 @@ func (m *_BACnetConfirmedServiceRequestAcknowledgeAlarm) SerializeWithWriteBuffe return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestAcknowledgeAlarm") } - // Simple Field (acknowledgingProcessIdentifier) - if pushErr := writeBuffer.PushContext("acknowledgingProcessIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for acknowledgingProcessIdentifier") - } - _acknowledgingProcessIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetAcknowledgingProcessIdentifier()) - if popErr := writeBuffer.PopContext("acknowledgingProcessIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for acknowledgingProcessIdentifier") - } - if _acknowledgingProcessIdentifierErr != nil { - return errors.Wrap(_acknowledgingProcessIdentifierErr, "Error serializing 'acknowledgingProcessIdentifier' field") - } + // Simple Field (acknowledgingProcessIdentifier) + if pushErr := writeBuffer.PushContext("acknowledgingProcessIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for acknowledgingProcessIdentifier") + } + _acknowledgingProcessIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetAcknowledgingProcessIdentifier()) + if popErr := writeBuffer.PopContext("acknowledgingProcessIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for acknowledgingProcessIdentifier") + } + if _acknowledgingProcessIdentifierErr != nil { + return errors.Wrap(_acknowledgingProcessIdentifierErr, "Error serializing 'acknowledgingProcessIdentifier' field") + } - // Simple Field (eventObjectIdentifier) - if pushErr := writeBuffer.PushContext("eventObjectIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for eventObjectIdentifier") - } - _eventObjectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetEventObjectIdentifier()) - if popErr := writeBuffer.PopContext("eventObjectIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for eventObjectIdentifier") - } - if _eventObjectIdentifierErr != nil { - return errors.Wrap(_eventObjectIdentifierErr, "Error serializing 'eventObjectIdentifier' field") - } + // Simple Field (eventObjectIdentifier) + if pushErr := writeBuffer.PushContext("eventObjectIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for eventObjectIdentifier") + } + _eventObjectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetEventObjectIdentifier()) + if popErr := writeBuffer.PopContext("eventObjectIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for eventObjectIdentifier") + } + if _eventObjectIdentifierErr != nil { + return errors.Wrap(_eventObjectIdentifierErr, "Error serializing 'eventObjectIdentifier' field") + } - // Simple Field (eventStateAcknowledged) - if pushErr := writeBuffer.PushContext("eventStateAcknowledged"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for eventStateAcknowledged") - } - _eventStateAcknowledgedErr := writeBuffer.WriteSerializable(ctx, m.GetEventStateAcknowledged()) - if popErr := writeBuffer.PopContext("eventStateAcknowledged"); popErr != nil { - return errors.Wrap(popErr, "Error popping for eventStateAcknowledged") - } - if _eventStateAcknowledgedErr != nil { - return errors.Wrap(_eventStateAcknowledgedErr, "Error serializing 'eventStateAcknowledged' field") - } + // Simple Field (eventStateAcknowledged) + if pushErr := writeBuffer.PushContext("eventStateAcknowledged"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for eventStateAcknowledged") + } + _eventStateAcknowledgedErr := writeBuffer.WriteSerializable(ctx, m.GetEventStateAcknowledged()) + if popErr := writeBuffer.PopContext("eventStateAcknowledged"); popErr != nil { + return errors.Wrap(popErr, "Error popping for eventStateAcknowledged") + } + if _eventStateAcknowledgedErr != nil { + return errors.Wrap(_eventStateAcknowledgedErr, "Error serializing 'eventStateAcknowledged' field") + } - // Simple Field (timestamp) - if pushErr := writeBuffer.PushContext("timestamp"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timestamp") - } - _timestampErr := writeBuffer.WriteSerializable(ctx, m.GetTimestamp()) - if popErr := writeBuffer.PopContext("timestamp"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timestamp") - } - if _timestampErr != nil { - return errors.Wrap(_timestampErr, "Error serializing 'timestamp' field") - } + // Simple Field (timestamp) + if pushErr := writeBuffer.PushContext("timestamp"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timestamp") + } + _timestampErr := writeBuffer.WriteSerializable(ctx, m.GetTimestamp()) + if popErr := writeBuffer.PopContext("timestamp"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timestamp") + } + if _timestampErr != nil { + return errors.Wrap(_timestampErr, "Error serializing 'timestamp' field") + } - // Simple Field (acknowledgmentSource) - if pushErr := writeBuffer.PushContext("acknowledgmentSource"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for acknowledgmentSource") - } - _acknowledgmentSourceErr := writeBuffer.WriteSerializable(ctx, m.GetAcknowledgmentSource()) - if popErr := writeBuffer.PopContext("acknowledgmentSource"); popErr != nil { - return errors.Wrap(popErr, "Error popping for acknowledgmentSource") - } - if _acknowledgmentSourceErr != nil { - return errors.Wrap(_acknowledgmentSourceErr, "Error serializing 'acknowledgmentSource' field") - } + // Simple Field (acknowledgmentSource) + if pushErr := writeBuffer.PushContext("acknowledgmentSource"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for acknowledgmentSource") + } + _acknowledgmentSourceErr := writeBuffer.WriteSerializable(ctx, m.GetAcknowledgmentSource()) + if popErr := writeBuffer.PopContext("acknowledgmentSource"); popErr != nil { + return errors.Wrap(popErr, "Error popping for acknowledgmentSource") + } + if _acknowledgmentSourceErr != nil { + return errors.Wrap(_acknowledgmentSourceErr, "Error serializing 'acknowledgmentSource' field") + } - // Simple Field (timeOfAcknowledgment) - if pushErr := writeBuffer.PushContext("timeOfAcknowledgment"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timeOfAcknowledgment") - } - _timeOfAcknowledgmentErr := writeBuffer.WriteSerializable(ctx, m.GetTimeOfAcknowledgment()) - if popErr := writeBuffer.PopContext("timeOfAcknowledgment"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timeOfAcknowledgment") - } - if _timeOfAcknowledgmentErr != nil { - return errors.Wrap(_timeOfAcknowledgmentErr, "Error serializing 'timeOfAcknowledgment' field") - } + // Simple Field (timeOfAcknowledgment) + if pushErr := writeBuffer.PushContext("timeOfAcknowledgment"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timeOfAcknowledgment") + } + _timeOfAcknowledgmentErr := writeBuffer.WriteSerializable(ctx, m.GetTimeOfAcknowledgment()) + if popErr := writeBuffer.PopContext("timeOfAcknowledgment"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timeOfAcknowledgment") + } + if _timeOfAcknowledgmentErr != nil { + return errors.Wrap(_timeOfAcknowledgmentErr, "Error serializing 'timeOfAcknowledgment' field") + } if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestAcknowledgeAlarm"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConfirmedServiceRequestAcknowledgeAlarm") @@ -384,6 +387,7 @@ func (m *_BACnetConfirmedServiceRequestAcknowledgeAlarm) SerializeWithWriteBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConfirmedServiceRequestAcknowledgeAlarm) isBACnetConfirmedServiceRequestAcknowledgeAlarm() bool { return true } @@ -398,3 +402,6 @@ func (m *_BACnetConfirmedServiceRequestAcknowledgeAlarm) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestAddListElement.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestAddListElement.go index 34db5fd409f..e56022ebed2 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestAddListElement.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestAddListElement.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestAddListElement is the corresponding interface of BACnetConfirmedServiceRequestAddListElement type BACnetConfirmedServiceRequestAddListElement interface { @@ -53,33 +55,32 @@ type BACnetConfirmedServiceRequestAddListElementExactly interface { // _BACnetConfirmedServiceRequestAddListElement is the data-structure of this message type _BACnetConfirmedServiceRequestAddListElement struct { *_BACnetConfirmedServiceRequest - ObjectIdentifier BACnetContextTagObjectIdentifier - PropertyIdentifier BACnetPropertyIdentifierTagged - ArrayIndex BACnetContextTagUnsignedInteger - ListOfElements BACnetConstructedData + ObjectIdentifier BACnetContextTagObjectIdentifier + PropertyIdentifier BACnetPropertyIdentifierTagged + ArrayIndex BACnetContextTagUnsignedInteger + ListOfElements BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConfirmedServiceRequestAddListElement) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_ADD_LIST_ELEMENT -} +func (m *_BACnetConfirmedServiceRequestAddListElement) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_ADD_LIST_ELEMENT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConfirmedServiceRequestAddListElement) InitializeParent(parent BACnetConfirmedServiceRequest) { -} +func (m *_BACnetConfirmedServiceRequestAddListElement) InitializeParent(parent BACnetConfirmedServiceRequest ) {} -func (m *_BACnetConfirmedServiceRequestAddListElement) GetParent() BACnetConfirmedServiceRequest { +func (m *_BACnetConfirmedServiceRequestAddListElement) GetParent() BACnetConfirmedServiceRequest { return m._BACnetConfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -106,14 +107,15 @@ func (m *_BACnetConfirmedServiceRequestAddListElement) GetListOfElements() BACne /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestAddListElement factory function for _BACnetConfirmedServiceRequestAddListElement -func NewBACnetConfirmedServiceRequestAddListElement(objectIdentifier BACnetContextTagObjectIdentifier, propertyIdentifier BACnetPropertyIdentifierTagged, arrayIndex BACnetContextTagUnsignedInteger, listOfElements BACnetConstructedData, serviceRequestLength uint32) *_BACnetConfirmedServiceRequestAddListElement { +func NewBACnetConfirmedServiceRequestAddListElement( objectIdentifier BACnetContextTagObjectIdentifier , propertyIdentifier BACnetPropertyIdentifierTagged , arrayIndex BACnetContextTagUnsignedInteger , listOfElements BACnetConstructedData , serviceRequestLength uint32 ) *_BACnetConfirmedServiceRequestAddListElement { _result := &_BACnetConfirmedServiceRequestAddListElement{ - ObjectIdentifier: objectIdentifier, - PropertyIdentifier: propertyIdentifier, - ArrayIndex: arrayIndex, - ListOfElements: listOfElements, - _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), + ObjectIdentifier: objectIdentifier, + PropertyIdentifier: propertyIdentifier, + ArrayIndex: arrayIndex, + ListOfElements: listOfElements, + _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), } _result._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _result return _result @@ -121,7 +123,7 @@ func NewBACnetConfirmedServiceRequestAddListElement(objectIdentifier BACnetConte // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestAddListElement(structType interface{}) BACnetConfirmedServiceRequestAddListElement { - if casted, ok := structType.(BACnetConfirmedServiceRequestAddListElement); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestAddListElement); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestAddListElement); ok { @@ -156,6 +158,7 @@ func (m *_BACnetConfirmedServiceRequestAddListElement) GetLengthInBits(ctx conte return lengthInBits } + func (m *_BACnetConfirmedServiceRequestAddListElement) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -177,7 +180,7 @@ func BACnetConfirmedServiceRequestAddListElementParseWithBuffer(ctx context.Cont if pullErr := readBuffer.PullContext("objectIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for objectIdentifier") } - _objectIdentifier, _objectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER)) +_objectIdentifier, _objectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_BACNET_OBJECT_IDENTIFIER ) ) if _objectIdentifierErr != nil { return nil, errors.Wrap(_objectIdentifierErr, "Error parsing 'objectIdentifier' field of BACnetConfirmedServiceRequestAddListElement") } @@ -190,7 +193,7 @@ func BACnetConfirmedServiceRequestAddListElementParseWithBuffer(ctx context.Cont if pullErr := readBuffer.PullContext("propertyIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for propertyIdentifier") } - _propertyIdentifier, _propertyIdentifierErr := BACnetPropertyIdentifierTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_propertyIdentifier, _propertyIdentifierErr := BACnetPropertyIdentifierTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _propertyIdentifierErr != nil { return nil, errors.Wrap(_propertyIdentifierErr, "Error parsing 'propertyIdentifier' field of BACnetConfirmedServiceRequestAddListElement") } @@ -201,12 +204,12 @@ func BACnetConfirmedServiceRequestAddListElementParseWithBuffer(ctx context.Cont // Optional Field (arrayIndex) (Can be skipped, if a given expression evaluates to false) var arrayIndex BACnetContextTagUnsignedInteger = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("arrayIndex"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for arrayIndex") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(2), BACnetDataType_UNSIGNED_INTEGER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(2) , BACnetDataType_UNSIGNED_INTEGER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -223,12 +226,12 @@ func BACnetConfirmedServiceRequestAddListElementParseWithBuffer(ctx context.Cont // Optional Field (listOfElements) (Can be skipped, if a given expression evaluates to false) var listOfElements BACnetConstructedData = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("listOfElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for listOfElements") } - _val, _err := BACnetConstructedDataParseWithBuffer(ctx, readBuffer, uint8(3), objectIdentifier.GetObjectType(), propertyIdentifier.GetValue(), (CastBACnetTagPayloadUnsignedInteger(utils.InlineIf(bool((arrayIndex) != (nil)), func() interface{} { return CastBACnetTagPayloadUnsignedInteger((arrayIndex).GetPayload()) }, func() interface{} { return CastBACnetTagPayloadUnsignedInteger(nil) })))) +_val, _err := BACnetConstructedDataParseWithBuffer(ctx, readBuffer , uint8(3) , objectIdentifier.GetObjectType() , propertyIdentifier.GetValue() , (CastBACnetTagPayloadUnsignedInteger(utils.InlineIf(bool(((arrayIndex)) != (nil)), func() interface{} {return CastBACnetTagPayloadUnsignedInteger((arrayIndex).GetPayload())}, func() interface{} {return CastBACnetTagPayloadUnsignedInteger(nil)}))) ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -252,10 +255,10 @@ func BACnetConfirmedServiceRequestAddListElementParseWithBuffer(ctx context.Cont _BACnetConfirmedServiceRequest: &_BACnetConfirmedServiceRequest{ ServiceRequestLength: serviceRequestLength, }, - ObjectIdentifier: objectIdentifier, + ObjectIdentifier: objectIdentifier, PropertyIdentifier: propertyIdentifier, - ArrayIndex: arrayIndex, - ListOfElements: listOfElements, + ArrayIndex: arrayIndex, + ListOfElements: listOfElements, } _child._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _child return _child, nil @@ -277,61 +280,61 @@ func (m *_BACnetConfirmedServiceRequestAddListElement) SerializeWithWriteBuffer( return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestAddListElement") } - // Simple Field (objectIdentifier) - if pushErr := writeBuffer.PushContext("objectIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for objectIdentifier") - } - _objectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetObjectIdentifier()) - if popErr := writeBuffer.PopContext("objectIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for objectIdentifier") - } - if _objectIdentifierErr != nil { - return errors.Wrap(_objectIdentifierErr, "Error serializing 'objectIdentifier' field") - } + // Simple Field (objectIdentifier) + if pushErr := writeBuffer.PushContext("objectIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for objectIdentifier") + } + _objectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetObjectIdentifier()) + if popErr := writeBuffer.PopContext("objectIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for objectIdentifier") + } + if _objectIdentifierErr != nil { + return errors.Wrap(_objectIdentifierErr, "Error serializing 'objectIdentifier' field") + } + + // Simple Field (propertyIdentifier) + if pushErr := writeBuffer.PushContext("propertyIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for propertyIdentifier") + } + _propertyIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetPropertyIdentifier()) + if popErr := writeBuffer.PopContext("propertyIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for propertyIdentifier") + } + if _propertyIdentifierErr != nil { + return errors.Wrap(_propertyIdentifierErr, "Error serializing 'propertyIdentifier' field") + } - // Simple Field (propertyIdentifier) - if pushErr := writeBuffer.PushContext("propertyIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for propertyIdentifier") + // Optional Field (arrayIndex) (Can be skipped, if the value is null) + var arrayIndex BACnetContextTagUnsignedInteger = nil + if m.GetArrayIndex() != nil { + if pushErr := writeBuffer.PushContext("arrayIndex"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for arrayIndex") } - _propertyIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetPropertyIdentifier()) - if popErr := writeBuffer.PopContext("propertyIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for propertyIdentifier") + arrayIndex = m.GetArrayIndex() + _arrayIndexErr := writeBuffer.WriteSerializable(ctx, arrayIndex) + if popErr := writeBuffer.PopContext("arrayIndex"); popErr != nil { + return errors.Wrap(popErr, "Error popping for arrayIndex") } - if _propertyIdentifierErr != nil { - return errors.Wrap(_propertyIdentifierErr, "Error serializing 'propertyIdentifier' field") + if _arrayIndexErr != nil { + return errors.Wrap(_arrayIndexErr, "Error serializing 'arrayIndex' field") } + } - // Optional Field (arrayIndex) (Can be skipped, if the value is null) - var arrayIndex BACnetContextTagUnsignedInteger = nil - if m.GetArrayIndex() != nil { - if pushErr := writeBuffer.PushContext("arrayIndex"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for arrayIndex") - } - arrayIndex = m.GetArrayIndex() - _arrayIndexErr := writeBuffer.WriteSerializable(ctx, arrayIndex) - if popErr := writeBuffer.PopContext("arrayIndex"); popErr != nil { - return errors.Wrap(popErr, "Error popping for arrayIndex") - } - if _arrayIndexErr != nil { - return errors.Wrap(_arrayIndexErr, "Error serializing 'arrayIndex' field") - } + // Optional Field (listOfElements) (Can be skipped, if the value is null) + var listOfElements BACnetConstructedData = nil + if m.GetListOfElements() != nil { + if pushErr := writeBuffer.PushContext("listOfElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for listOfElements") } - - // Optional Field (listOfElements) (Can be skipped, if the value is null) - var listOfElements BACnetConstructedData = nil - if m.GetListOfElements() != nil { - if pushErr := writeBuffer.PushContext("listOfElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for listOfElements") - } - listOfElements = m.GetListOfElements() - _listOfElementsErr := writeBuffer.WriteSerializable(ctx, listOfElements) - if popErr := writeBuffer.PopContext("listOfElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for listOfElements") - } - if _listOfElementsErr != nil { - return errors.Wrap(_listOfElementsErr, "Error serializing 'listOfElements' field") - } + listOfElements = m.GetListOfElements() + _listOfElementsErr := writeBuffer.WriteSerializable(ctx, listOfElements) + if popErr := writeBuffer.PopContext("listOfElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for listOfElements") + } + if _listOfElementsErr != nil { + return errors.Wrap(_listOfElementsErr, "Error serializing 'listOfElements' field") } + } if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestAddListElement"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConfirmedServiceRequestAddListElement") @@ -341,6 +344,7 @@ func (m *_BACnetConfirmedServiceRequestAddListElement) SerializeWithWriteBuffer( return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConfirmedServiceRequestAddListElement) isBACnetConfirmedServiceRequestAddListElement() bool { return true } @@ -355,3 +359,6 @@ func (m *_BACnetConfirmedServiceRequestAddListElement) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestAtomicReadFile.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestAtomicReadFile.go index db608f1a3d0..b6402a317e6 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestAtomicReadFile.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestAtomicReadFile.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestAtomicReadFile is the corresponding interface of BACnetConfirmedServiceRequestAtomicReadFile type BACnetConfirmedServiceRequestAtomicReadFile interface { @@ -48,31 +50,30 @@ type BACnetConfirmedServiceRequestAtomicReadFileExactly interface { // _BACnetConfirmedServiceRequestAtomicReadFile is the data-structure of this message type _BACnetConfirmedServiceRequestAtomicReadFile struct { *_BACnetConfirmedServiceRequest - FileIdentifier BACnetApplicationTagObjectIdentifier - AccessMethod BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord + FileIdentifier BACnetApplicationTagObjectIdentifier + AccessMethod BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConfirmedServiceRequestAtomicReadFile) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_ATOMIC_READ_FILE -} +func (m *_BACnetConfirmedServiceRequestAtomicReadFile) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_ATOMIC_READ_FILE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConfirmedServiceRequestAtomicReadFile) InitializeParent(parent BACnetConfirmedServiceRequest) { -} +func (m *_BACnetConfirmedServiceRequestAtomicReadFile) InitializeParent(parent BACnetConfirmedServiceRequest ) {} -func (m *_BACnetConfirmedServiceRequestAtomicReadFile) GetParent() BACnetConfirmedServiceRequest { +func (m *_BACnetConfirmedServiceRequestAtomicReadFile) GetParent() BACnetConfirmedServiceRequest { return m._BACnetConfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -91,12 +92,13 @@ func (m *_BACnetConfirmedServiceRequestAtomicReadFile) GetAccessMethod() BACnetC /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestAtomicReadFile factory function for _BACnetConfirmedServiceRequestAtomicReadFile -func NewBACnetConfirmedServiceRequestAtomicReadFile(fileIdentifier BACnetApplicationTagObjectIdentifier, accessMethod BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord, serviceRequestLength uint32) *_BACnetConfirmedServiceRequestAtomicReadFile { +func NewBACnetConfirmedServiceRequestAtomicReadFile( fileIdentifier BACnetApplicationTagObjectIdentifier , accessMethod BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord , serviceRequestLength uint32 ) *_BACnetConfirmedServiceRequestAtomicReadFile { _result := &_BACnetConfirmedServiceRequestAtomicReadFile{ - FileIdentifier: fileIdentifier, - AccessMethod: accessMethod, - _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), + FileIdentifier: fileIdentifier, + AccessMethod: accessMethod, + _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), } _result._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _result return _result @@ -104,7 +106,7 @@ func NewBACnetConfirmedServiceRequestAtomicReadFile(fileIdentifier BACnetApplica // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestAtomicReadFile(structType interface{}) BACnetConfirmedServiceRequestAtomicReadFile { - if casted, ok := structType.(BACnetConfirmedServiceRequestAtomicReadFile); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestAtomicReadFile); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestAtomicReadFile); ok { @@ -129,6 +131,7 @@ func (m *_BACnetConfirmedServiceRequestAtomicReadFile) GetLengthInBits(ctx conte return lengthInBits } + func (m *_BACnetConfirmedServiceRequestAtomicReadFile) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -150,7 +153,7 @@ func BACnetConfirmedServiceRequestAtomicReadFileParseWithBuffer(ctx context.Cont if pullErr := readBuffer.PullContext("fileIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for fileIdentifier") } - _fileIdentifier, _fileIdentifierErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_fileIdentifier, _fileIdentifierErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _fileIdentifierErr != nil { return nil, errors.Wrap(_fileIdentifierErr, "Error parsing 'fileIdentifier' field of BACnetConfirmedServiceRequestAtomicReadFile") } @@ -163,7 +166,7 @@ func BACnetConfirmedServiceRequestAtomicReadFileParseWithBuffer(ctx context.Cont if pullErr := readBuffer.PullContext("accessMethod"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for accessMethod") } - _accessMethod, _accessMethodErr := BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecordParseWithBuffer(ctx, readBuffer) +_accessMethod, _accessMethodErr := BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecordParseWithBuffer(ctx, readBuffer) if _accessMethodErr != nil { return nil, errors.Wrap(_accessMethodErr, "Error parsing 'accessMethod' field of BACnetConfirmedServiceRequestAtomicReadFile") } @@ -182,7 +185,7 @@ func BACnetConfirmedServiceRequestAtomicReadFileParseWithBuffer(ctx context.Cont ServiceRequestLength: serviceRequestLength, }, FileIdentifier: fileIdentifier, - AccessMethod: accessMethod, + AccessMethod: accessMethod, } _child._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _child return _child, nil @@ -204,29 +207,29 @@ func (m *_BACnetConfirmedServiceRequestAtomicReadFile) SerializeWithWriteBuffer( return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestAtomicReadFile") } - // Simple Field (fileIdentifier) - if pushErr := writeBuffer.PushContext("fileIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for fileIdentifier") - } - _fileIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetFileIdentifier()) - if popErr := writeBuffer.PopContext("fileIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for fileIdentifier") - } - if _fileIdentifierErr != nil { - return errors.Wrap(_fileIdentifierErr, "Error serializing 'fileIdentifier' field") - } + // Simple Field (fileIdentifier) + if pushErr := writeBuffer.PushContext("fileIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for fileIdentifier") + } + _fileIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetFileIdentifier()) + if popErr := writeBuffer.PopContext("fileIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for fileIdentifier") + } + if _fileIdentifierErr != nil { + return errors.Wrap(_fileIdentifierErr, "Error serializing 'fileIdentifier' field") + } - // Simple Field (accessMethod) - if pushErr := writeBuffer.PushContext("accessMethod"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for accessMethod") - } - _accessMethodErr := writeBuffer.WriteSerializable(ctx, m.GetAccessMethod()) - if popErr := writeBuffer.PopContext("accessMethod"); popErr != nil { - return errors.Wrap(popErr, "Error popping for accessMethod") - } - if _accessMethodErr != nil { - return errors.Wrap(_accessMethodErr, "Error serializing 'accessMethod' field") - } + // Simple Field (accessMethod) + if pushErr := writeBuffer.PushContext("accessMethod"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for accessMethod") + } + _accessMethodErr := writeBuffer.WriteSerializable(ctx, m.GetAccessMethod()) + if popErr := writeBuffer.PopContext("accessMethod"); popErr != nil { + return errors.Wrap(popErr, "Error popping for accessMethod") + } + if _accessMethodErr != nil { + return errors.Wrap(_accessMethodErr, "Error serializing 'accessMethod' field") + } if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestAtomicReadFile"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConfirmedServiceRequestAtomicReadFile") @@ -236,6 +239,7 @@ func (m *_BACnetConfirmedServiceRequestAtomicReadFile) SerializeWithWriteBuffer( return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConfirmedServiceRequestAtomicReadFile) isBACnetConfirmedServiceRequestAtomicReadFile() bool { return true } @@ -250,3 +254,6 @@ func (m *_BACnetConfirmedServiceRequestAtomicReadFile) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestAtomicReadFileRecord.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestAtomicReadFileRecord.go index fb10a5627d0..c3e275712ee 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestAtomicReadFileRecord.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestAtomicReadFileRecord.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestAtomicReadFileRecord is the corresponding interface of BACnetConfirmedServiceRequestAtomicReadFileRecord type BACnetConfirmedServiceRequestAtomicReadFileRecord interface { @@ -48,10 +50,12 @@ type BACnetConfirmedServiceRequestAtomicReadFileRecordExactly interface { // _BACnetConfirmedServiceRequestAtomicReadFileRecord is the data-structure of this message type _BACnetConfirmedServiceRequestAtomicReadFileRecord struct { *_BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord - FileStartRecord BACnetApplicationTagSignedInteger - RequestRecordCount BACnetApplicationTagUnsignedInteger + FileStartRecord BACnetApplicationTagSignedInteger + RequestRecordCount BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -62,16 +66,14 @@ type _BACnetConfirmedServiceRequestAtomicReadFileRecord struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConfirmedServiceRequestAtomicReadFileRecord) InitializeParent(parent BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord, peekedTagHeader BACnetTagHeader, openingTag BACnetOpeningTag, closingTag BACnetClosingTag) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetConfirmedServiceRequestAtomicReadFileRecord) InitializeParent(parent BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord , peekedTagHeader BACnetTagHeader , openingTag BACnetOpeningTag , closingTag BACnetClosingTag ) { m.PeekedTagHeader = peekedTagHeader m.OpeningTag = openingTag m.ClosingTag = closingTag } -func (m *_BACnetConfirmedServiceRequestAtomicReadFileRecord) GetParent() BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord { +func (m *_BACnetConfirmedServiceRequestAtomicReadFileRecord) GetParent() BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord { return m._BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_BACnetConfirmedServiceRequestAtomicReadFileRecord) GetRequestRecordCou /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestAtomicReadFileRecord factory function for _BACnetConfirmedServiceRequestAtomicReadFileRecord -func NewBACnetConfirmedServiceRequestAtomicReadFileRecord(fileStartRecord BACnetApplicationTagSignedInteger, requestRecordCount BACnetApplicationTagUnsignedInteger, peekedTagHeader BACnetTagHeader, openingTag BACnetOpeningTag, closingTag BACnetClosingTag) *_BACnetConfirmedServiceRequestAtomicReadFileRecord { +func NewBACnetConfirmedServiceRequestAtomicReadFileRecord( fileStartRecord BACnetApplicationTagSignedInteger , requestRecordCount BACnetApplicationTagUnsignedInteger , peekedTagHeader BACnetTagHeader , openingTag BACnetOpeningTag , closingTag BACnetClosingTag ) *_BACnetConfirmedServiceRequestAtomicReadFileRecord { _result := &_BACnetConfirmedServiceRequestAtomicReadFileRecord{ - FileStartRecord: fileStartRecord, + FileStartRecord: fileStartRecord, RequestRecordCount: requestRecordCount, - _BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord: NewBACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord(peekedTagHeader, openingTag, closingTag), + _BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord: NewBACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord(peekedTagHeader, openingTag, closingTag), } _result._BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord._BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecordChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewBACnetConfirmedServiceRequestAtomicReadFileRecord(fileStartRecord BACnet // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestAtomicReadFileRecord(structType interface{}) BACnetConfirmedServiceRequestAtomicReadFileRecord { - if casted, ok := structType.(BACnetConfirmedServiceRequestAtomicReadFileRecord); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestAtomicReadFileRecord); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestAtomicReadFileRecord); ok { @@ -128,6 +131,7 @@ func (m *_BACnetConfirmedServiceRequestAtomicReadFileRecord) GetLengthInBits(ctx return lengthInBits } + func (m *_BACnetConfirmedServiceRequestAtomicReadFileRecord) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -149,7 +153,7 @@ func BACnetConfirmedServiceRequestAtomicReadFileRecordParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("fileStartRecord"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for fileStartRecord") } - _fileStartRecord, _fileStartRecordErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_fileStartRecord, _fileStartRecordErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _fileStartRecordErr != nil { return nil, errors.Wrap(_fileStartRecordErr, "Error parsing 'fileStartRecord' field of BACnetConfirmedServiceRequestAtomicReadFileRecord") } @@ -162,7 +166,7 @@ func BACnetConfirmedServiceRequestAtomicReadFileRecordParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("requestRecordCount"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for requestRecordCount") } - _requestRecordCount, _requestRecordCountErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_requestRecordCount, _requestRecordCountErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _requestRecordCountErr != nil { return nil, errors.Wrap(_requestRecordCountErr, "Error parsing 'requestRecordCount' field of BACnetConfirmedServiceRequestAtomicReadFileRecord") } @@ -177,8 +181,9 @@ func BACnetConfirmedServiceRequestAtomicReadFileRecordParseWithBuffer(ctx contex // Create a partially initialized instance _child := &_BACnetConfirmedServiceRequestAtomicReadFileRecord{ - _BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord: &_BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord{}, - FileStartRecord: fileStartRecord, + _BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord: &_BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord{ + }, + FileStartRecord: fileStartRecord, RequestRecordCount: requestRecordCount, } _child._BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord._BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecordChildRequirements = _child @@ -201,29 +206,29 @@ func (m *_BACnetConfirmedServiceRequestAtomicReadFileRecord) SerializeWithWriteB return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestAtomicReadFileRecord") } - // Simple Field (fileStartRecord) - if pushErr := writeBuffer.PushContext("fileStartRecord"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for fileStartRecord") - } - _fileStartRecordErr := writeBuffer.WriteSerializable(ctx, m.GetFileStartRecord()) - if popErr := writeBuffer.PopContext("fileStartRecord"); popErr != nil { - return errors.Wrap(popErr, "Error popping for fileStartRecord") - } - if _fileStartRecordErr != nil { - return errors.Wrap(_fileStartRecordErr, "Error serializing 'fileStartRecord' field") - } + // Simple Field (fileStartRecord) + if pushErr := writeBuffer.PushContext("fileStartRecord"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for fileStartRecord") + } + _fileStartRecordErr := writeBuffer.WriteSerializable(ctx, m.GetFileStartRecord()) + if popErr := writeBuffer.PopContext("fileStartRecord"); popErr != nil { + return errors.Wrap(popErr, "Error popping for fileStartRecord") + } + if _fileStartRecordErr != nil { + return errors.Wrap(_fileStartRecordErr, "Error serializing 'fileStartRecord' field") + } - // Simple Field (requestRecordCount) - if pushErr := writeBuffer.PushContext("requestRecordCount"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for requestRecordCount") - } - _requestRecordCountErr := writeBuffer.WriteSerializable(ctx, m.GetRequestRecordCount()) - if popErr := writeBuffer.PopContext("requestRecordCount"); popErr != nil { - return errors.Wrap(popErr, "Error popping for requestRecordCount") - } - if _requestRecordCountErr != nil { - return errors.Wrap(_requestRecordCountErr, "Error serializing 'requestRecordCount' field") - } + // Simple Field (requestRecordCount) + if pushErr := writeBuffer.PushContext("requestRecordCount"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for requestRecordCount") + } + _requestRecordCountErr := writeBuffer.WriteSerializable(ctx, m.GetRequestRecordCount()) + if popErr := writeBuffer.PopContext("requestRecordCount"); popErr != nil { + return errors.Wrap(popErr, "Error popping for requestRecordCount") + } + if _requestRecordCountErr != nil { + return errors.Wrap(_requestRecordCountErr, "Error serializing 'requestRecordCount' field") + } if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestAtomicReadFileRecord"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConfirmedServiceRequestAtomicReadFileRecord") @@ -233,6 +238,7 @@ func (m *_BACnetConfirmedServiceRequestAtomicReadFileRecord) SerializeWithWriteB return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConfirmedServiceRequestAtomicReadFileRecord) isBACnetConfirmedServiceRequestAtomicReadFileRecord() bool { return true } @@ -247,3 +253,6 @@ func (m *_BACnetConfirmedServiceRequestAtomicReadFileRecord) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestAtomicReadFileStream.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestAtomicReadFileStream.go index 46dbaee7799..92a6aaaa0f3 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestAtomicReadFileStream.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestAtomicReadFileStream.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestAtomicReadFileStream is the corresponding interface of BACnetConfirmedServiceRequestAtomicReadFileStream type BACnetConfirmedServiceRequestAtomicReadFileStream interface { @@ -48,10 +50,12 @@ type BACnetConfirmedServiceRequestAtomicReadFileStreamExactly interface { // _BACnetConfirmedServiceRequestAtomicReadFileStream is the data-structure of this message type _BACnetConfirmedServiceRequestAtomicReadFileStream struct { *_BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord - FileStartPosition BACnetApplicationTagSignedInteger - RequestOctetCount BACnetApplicationTagUnsignedInteger + FileStartPosition BACnetApplicationTagSignedInteger + RequestOctetCount BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -62,16 +66,14 @@ type _BACnetConfirmedServiceRequestAtomicReadFileStream struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConfirmedServiceRequestAtomicReadFileStream) InitializeParent(parent BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord, peekedTagHeader BACnetTagHeader, openingTag BACnetOpeningTag, closingTag BACnetClosingTag) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetConfirmedServiceRequestAtomicReadFileStream) InitializeParent(parent BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord , peekedTagHeader BACnetTagHeader , openingTag BACnetOpeningTag , closingTag BACnetClosingTag ) { m.PeekedTagHeader = peekedTagHeader m.OpeningTag = openingTag m.ClosingTag = closingTag } -func (m *_BACnetConfirmedServiceRequestAtomicReadFileStream) GetParent() BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord { +func (m *_BACnetConfirmedServiceRequestAtomicReadFileStream) GetParent() BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord { return m._BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_BACnetConfirmedServiceRequestAtomicReadFileStream) GetRequestOctetCoun /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestAtomicReadFileStream factory function for _BACnetConfirmedServiceRequestAtomicReadFileStream -func NewBACnetConfirmedServiceRequestAtomicReadFileStream(fileStartPosition BACnetApplicationTagSignedInteger, requestOctetCount BACnetApplicationTagUnsignedInteger, peekedTagHeader BACnetTagHeader, openingTag BACnetOpeningTag, closingTag BACnetClosingTag) *_BACnetConfirmedServiceRequestAtomicReadFileStream { +func NewBACnetConfirmedServiceRequestAtomicReadFileStream( fileStartPosition BACnetApplicationTagSignedInteger , requestOctetCount BACnetApplicationTagUnsignedInteger , peekedTagHeader BACnetTagHeader , openingTag BACnetOpeningTag , closingTag BACnetClosingTag ) *_BACnetConfirmedServiceRequestAtomicReadFileStream { _result := &_BACnetConfirmedServiceRequestAtomicReadFileStream{ FileStartPosition: fileStartPosition, RequestOctetCount: requestOctetCount, - _BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord: NewBACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord(peekedTagHeader, openingTag, closingTag), + _BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord: NewBACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord(peekedTagHeader, openingTag, closingTag), } _result._BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord._BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecordChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewBACnetConfirmedServiceRequestAtomicReadFileStream(fileStartPosition BACn // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestAtomicReadFileStream(structType interface{}) BACnetConfirmedServiceRequestAtomicReadFileStream { - if casted, ok := structType.(BACnetConfirmedServiceRequestAtomicReadFileStream); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestAtomicReadFileStream); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestAtomicReadFileStream); ok { @@ -128,6 +131,7 @@ func (m *_BACnetConfirmedServiceRequestAtomicReadFileStream) GetLengthInBits(ctx return lengthInBits } + func (m *_BACnetConfirmedServiceRequestAtomicReadFileStream) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -149,7 +153,7 @@ func BACnetConfirmedServiceRequestAtomicReadFileStreamParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("fileStartPosition"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for fileStartPosition") } - _fileStartPosition, _fileStartPositionErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_fileStartPosition, _fileStartPositionErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _fileStartPositionErr != nil { return nil, errors.Wrap(_fileStartPositionErr, "Error parsing 'fileStartPosition' field of BACnetConfirmedServiceRequestAtomicReadFileStream") } @@ -162,7 +166,7 @@ func BACnetConfirmedServiceRequestAtomicReadFileStreamParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("requestOctetCount"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for requestOctetCount") } - _requestOctetCount, _requestOctetCountErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_requestOctetCount, _requestOctetCountErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _requestOctetCountErr != nil { return nil, errors.Wrap(_requestOctetCountErr, "Error parsing 'requestOctetCount' field of BACnetConfirmedServiceRequestAtomicReadFileStream") } @@ -177,7 +181,8 @@ func BACnetConfirmedServiceRequestAtomicReadFileStreamParseWithBuffer(ctx contex // Create a partially initialized instance _child := &_BACnetConfirmedServiceRequestAtomicReadFileStream{ - _BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord: &_BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord{}, + _BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord: &_BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord{ + }, FileStartPosition: fileStartPosition, RequestOctetCount: requestOctetCount, } @@ -201,29 +206,29 @@ func (m *_BACnetConfirmedServiceRequestAtomicReadFileStream) SerializeWithWriteB return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestAtomicReadFileStream") } - // Simple Field (fileStartPosition) - if pushErr := writeBuffer.PushContext("fileStartPosition"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for fileStartPosition") - } - _fileStartPositionErr := writeBuffer.WriteSerializable(ctx, m.GetFileStartPosition()) - if popErr := writeBuffer.PopContext("fileStartPosition"); popErr != nil { - return errors.Wrap(popErr, "Error popping for fileStartPosition") - } - if _fileStartPositionErr != nil { - return errors.Wrap(_fileStartPositionErr, "Error serializing 'fileStartPosition' field") - } + // Simple Field (fileStartPosition) + if pushErr := writeBuffer.PushContext("fileStartPosition"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for fileStartPosition") + } + _fileStartPositionErr := writeBuffer.WriteSerializable(ctx, m.GetFileStartPosition()) + if popErr := writeBuffer.PopContext("fileStartPosition"); popErr != nil { + return errors.Wrap(popErr, "Error popping for fileStartPosition") + } + if _fileStartPositionErr != nil { + return errors.Wrap(_fileStartPositionErr, "Error serializing 'fileStartPosition' field") + } - // Simple Field (requestOctetCount) - if pushErr := writeBuffer.PushContext("requestOctetCount"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for requestOctetCount") - } - _requestOctetCountErr := writeBuffer.WriteSerializable(ctx, m.GetRequestOctetCount()) - if popErr := writeBuffer.PopContext("requestOctetCount"); popErr != nil { - return errors.Wrap(popErr, "Error popping for requestOctetCount") - } - if _requestOctetCountErr != nil { - return errors.Wrap(_requestOctetCountErr, "Error serializing 'requestOctetCount' field") - } + // Simple Field (requestOctetCount) + if pushErr := writeBuffer.PushContext("requestOctetCount"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for requestOctetCount") + } + _requestOctetCountErr := writeBuffer.WriteSerializable(ctx, m.GetRequestOctetCount()) + if popErr := writeBuffer.PopContext("requestOctetCount"); popErr != nil { + return errors.Wrap(popErr, "Error popping for requestOctetCount") + } + if _requestOctetCountErr != nil { + return errors.Wrap(_requestOctetCountErr, "Error serializing 'requestOctetCount' field") + } if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestAtomicReadFileStream"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConfirmedServiceRequestAtomicReadFileStream") @@ -233,6 +238,7 @@ func (m *_BACnetConfirmedServiceRequestAtomicReadFileStream) SerializeWithWriteB return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConfirmedServiceRequestAtomicReadFileStream) isBACnetConfirmedServiceRequestAtomicReadFileStream() bool { return true } @@ -247,3 +253,6 @@ func (m *_BACnetConfirmedServiceRequestAtomicReadFileStream) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord.go index b163098e908..55f1d0897fb 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord is the corresponding interface of BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord type BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord interface { @@ -51,9 +53,9 @@ type BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecordExactly interface // _BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord is the data-structure of this message type _BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord struct { _BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecordChildRequirements - PeekedTagHeader BACnetTagHeader - OpeningTag BACnetOpeningTag - ClosingTag BACnetClosingTag + PeekedTagHeader BACnetTagHeader + OpeningTag BACnetOpeningTag + ClosingTag BACnetClosingTag } type _BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecordChildRequirements interface { @@ -61,6 +63,7 @@ type _BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecordChildRequirements GetLengthInBits(ctx context.Context) uint16 } + type BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecordParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord, serializeChildFunction func() error) error GetTypeName() string @@ -68,13 +71,12 @@ type BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecordParent interface { type BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecordChild interface { utils.Serializable - InitializeParent(parent BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord, peekedTagHeader BACnetTagHeader, openingTag BACnetOpeningTag, closingTag BACnetClosingTag) +InitializeParent(parent BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord , peekedTagHeader BACnetTagHeader , openingTag BACnetOpeningTag , closingTag BACnetClosingTag ) GetParent() *BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord GetTypeName() string BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -112,14 +114,15 @@ func (m *_BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord) GetPeekedTa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord factory function for _BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord -func NewBACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord(peekedTagHeader BACnetTagHeader, openingTag BACnetOpeningTag, closingTag BACnetClosingTag) *_BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord { - return &_BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord{PeekedTagHeader: peekedTagHeader, OpeningTag: openingTag, ClosingTag: closingTag} +func NewBACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord( peekedTagHeader BACnetTagHeader , openingTag BACnetOpeningTag , closingTag BACnetClosingTag ) *_BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord { +return &_BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord{ PeekedTagHeader: peekedTagHeader , OpeningTag: openingTag , ClosingTag: closingTag } } // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord(structType interface{}) BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord { - if casted, ok := structType.(BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord); ok { @@ -132,6 +135,7 @@ func (m *_BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord) GetTypeName return "BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord" } + func (m *_BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -163,19 +167,19 @@ func BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecordParseWithBuffer(ct currentPos := positionAware.GetPos() _ = currentPos - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Simple Field (openingTag) if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagHeader.GetActualTagNumber())) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagHeader.GetActualTagNumber() ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord") } @@ -192,17 +196,17 @@ func BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecordParseWithBuffer(ct // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecordChildSerializeRequirement interface { BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord - InitializeParent(BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord, BACnetTagHeader, BACnetOpeningTag, BACnetClosingTag) + InitializeParent(BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord, BACnetTagHeader, BACnetOpeningTag, BACnetClosingTag) GetParent() BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord } var _childTemp interface{} var _child BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecordChildSerializeRequirement var typeSwitchError error switch { - case peekedTagNumber == 0x0: // BACnetConfirmedServiceRequestAtomicReadFileStream - _childTemp, typeSwitchError = BACnetConfirmedServiceRequestAtomicReadFileStreamParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == 0x1: // BACnetConfirmedServiceRequestAtomicReadFileRecord - _childTemp, typeSwitchError = BACnetConfirmedServiceRequestAtomicReadFileRecordParseWithBuffer(ctx, readBuffer) +case peekedTagNumber == 0x0 : // BACnetConfirmedServiceRequestAtomicReadFileStream + _childTemp, typeSwitchError = BACnetConfirmedServiceRequestAtomicReadFileStreamParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == 0x1 : // BACnetConfirmedServiceRequestAtomicReadFileRecord + _childTemp, typeSwitchError = BACnetConfirmedServiceRequestAtomicReadFileRecordParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedTagNumber=%v]", peekedTagNumber) } @@ -215,7 +219,7 @@ func BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecordParseWithBuffer(ct if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagHeader.GetActualTagNumber())) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagHeader.GetActualTagNumber() ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord") } @@ -229,7 +233,7 @@ func BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecordParseWithBuffer(ct } // Finish initializing - _child.InitializeParent(_child, peekedTagHeader, openingTag, closingTag) +_child.InitializeParent(_child , peekedTagHeader , openingTag , closingTag ) return _child, nil } @@ -239,7 +243,7 @@ func (pm *_BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord) SerializeP _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord") } @@ -282,6 +286,7 @@ func (pm *_BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord) SerializeP return nil } + func (m *_BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord) isBACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord() bool { return true } @@ -296,3 +301,6 @@ func (m *_BACnetConfirmedServiceRequestAtomicReadFileStreamOrRecord) String() st } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestAtomicWriteFile.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestAtomicWriteFile.go index 516585d049b..6c947cf359c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestAtomicWriteFile.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestAtomicWriteFile.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestAtomicWriteFile is the corresponding interface of BACnetConfirmedServiceRequestAtomicWriteFile type BACnetConfirmedServiceRequestAtomicWriteFile interface { @@ -55,34 +57,33 @@ type BACnetConfirmedServiceRequestAtomicWriteFileExactly interface { // _BACnetConfirmedServiceRequestAtomicWriteFile is the data-structure of this message type _BACnetConfirmedServiceRequestAtomicWriteFile struct { *_BACnetConfirmedServiceRequest - DeviceIdentifier BACnetApplicationTagObjectIdentifier - OpeningTag BACnetOpeningTag - FileStartPosition BACnetApplicationTagSignedInteger - FileData BACnetApplicationTagOctetString - ClosingTag BACnetClosingTag + DeviceIdentifier BACnetApplicationTagObjectIdentifier + OpeningTag BACnetOpeningTag + FileStartPosition BACnetApplicationTagSignedInteger + FileData BACnetApplicationTagOctetString + ClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConfirmedServiceRequestAtomicWriteFile) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_ATOMIC_WRITE_FILE -} +func (m *_BACnetConfirmedServiceRequestAtomicWriteFile) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_ATOMIC_WRITE_FILE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConfirmedServiceRequestAtomicWriteFile) InitializeParent(parent BACnetConfirmedServiceRequest) { -} +func (m *_BACnetConfirmedServiceRequestAtomicWriteFile) InitializeParent(parent BACnetConfirmedServiceRequest ) {} -func (m *_BACnetConfirmedServiceRequestAtomicWriteFile) GetParent() BACnetConfirmedServiceRequest { +func (m *_BACnetConfirmedServiceRequestAtomicWriteFile) GetParent() BACnetConfirmedServiceRequest { return m._BACnetConfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -113,15 +114,16 @@ func (m *_BACnetConfirmedServiceRequestAtomicWriteFile) GetClosingTag() BACnetCl /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestAtomicWriteFile factory function for _BACnetConfirmedServiceRequestAtomicWriteFile -func NewBACnetConfirmedServiceRequestAtomicWriteFile(deviceIdentifier BACnetApplicationTagObjectIdentifier, openingTag BACnetOpeningTag, fileStartPosition BACnetApplicationTagSignedInteger, fileData BACnetApplicationTagOctetString, closingTag BACnetClosingTag, serviceRequestLength uint32) *_BACnetConfirmedServiceRequestAtomicWriteFile { +func NewBACnetConfirmedServiceRequestAtomicWriteFile( deviceIdentifier BACnetApplicationTagObjectIdentifier , openingTag BACnetOpeningTag , fileStartPosition BACnetApplicationTagSignedInteger , fileData BACnetApplicationTagOctetString , closingTag BACnetClosingTag , serviceRequestLength uint32 ) *_BACnetConfirmedServiceRequestAtomicWriteFile { _result := &_BACnetConfirmedServiceRequestAtomicWriteFile{ - DeviceIdentifier: deviceIdentifier, - OpeningTag: openingTag, - FileStartPosition: fileStartPosition, - FileData: fileData, - ClosingTag: closingTag, - _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), + DeviceIdentifier: deviceIdentifier, + OpeningTag: openingTag, + FileStartPosition: fileStartPosition, + FileData: fileData, + ClosingTag: closingTag, + _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), } _result._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _result return _result @@ -129,7 +131,7 @@ func NewBACnetConfirmedServiceRequestAtomicWriteFile(deviceIdentifier BACnetAppl // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestAtomicWriteFile(structType interface{}) BACnetConfirmedServiceRequestAtomicWriteFile { - if casted, ok := structType.(BACnetConfirmedServiceRequestAtomicWriteFile); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestAtomicWriteFile); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestAtomicWriteFile); ok { @@ -167,6 +169,7 @@ func (m *_BACnetConfirmedServiceRequestAtomicWriteFile) GetLengthInBits(ctx cont return lengthInBits } + func (m *_BACnetConfirmedServiceRequestAtomicWriteFile) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -188,7 +191,7 @@ func BACnetConfirmedServiceRequestAtomicWriteFileParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("deviceIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for deviceIdentifier") } - _deviceIdentifier, _deviceIdentifierErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_deviceIdentifier, _deviceIdentifierErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _deviceIdentifierErr != nil { return nil, errors.Wrap(_deviceIdentifierErr, "Error parsing 'deviceIdentifier' field of BACnetConfirmedServiceRequestAtomicWriteFile") } @@ -199,12 +202,12 @@ func BACnetConfirmedServiceRequestAtomicWriteFileParseWithBuffer(ctx context.Con // Optional Field (openingTag) (Can be skipped, if a given expression evaluates to false) var openingTag BACnetOpeningTag = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _val, _err := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(0)) +_val, _err := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8(0) ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -223,7 +226,7 @@ func BACnetConfirmedServiceRequestAtomicWriteFileParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("fileStartPosition"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for fileStartPosition") } - _fileStartPosition, _fileStartPositionErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_fileStartPosition, _fileStartPositionErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _fileStartPositionErr != nil { return nil, errors.Wrap(_fileStartPositionErr, "Error parsing 'fileStartPosition' field of BACnetConfirmedServiceRequestAtomicWriteFile") } @@ -236,7 +239,7 @@ func BACnetConfirmedServiceRequestAtomicWriteFileParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("fileData"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for fileData") } - _fileData, _fileDataErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_fileData, _fileDataErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _fileDataErr != nil { return nil, errors.Wrap(_fileDataErr, "Error parsing 'fileData' field of BACnetConfirmedServiceRequestAtomicWriteFile") } @@ -247,12 +250,12 @@ func BACnetConfirmedServiceRequestAtomicWriteFileParseWithBuffer(ctx context.Con // Optional Field (closingTag) (Can be skipped, if a given expression evaluates to false) var closingTag BACnetClosingTag = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _val, _err := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(0)) +_val, _err := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8(0) ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -276,11 +279,11 @@ func BACnetConfirmedServiceRequestAtomicWriteFileParseWithBuffer(ctx context.Con _BACnetConfirmedServiceRequest: &_BACnetConfirmedServiceRequest{ ServiceRequestLength: serviceRequestLength, }, - DeviceIdentifier: deviceIdentifier, - OpeningTag: openingTag, + DeviceIdentifier: deviceIdentifier, + OpeningTag: openingTag, FileStartPosition: fileStartPosition, - FileData: fileData, - ClosingTag: closingTag, + FileData: fileData, + ClosingTag: closingTag, } _child._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _child return _child, nil @@ -302,73 +305,73 @@ func (m *_BACnetConfirmedServiceRequestAtomicWriteFile) SerializeWithWriteBuffer return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestAtomicWriteFile") } - // Simple Field (deviceIdentifier) - if pushErr := writeBuffer.PushContext("deviceIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for deviceIdentifier") + // Simple Field (deviceIdentifier) + if pushErr := writeBuffer.PushContext("deviceIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for deviceIdentifier") + } + _deviceIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetDeviceIdentifier()) + if popErr := writeBuffer.PopContext("deviceIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for deviceIdentifier") + } + if _deviceIdentifierErr != nil { + return errors.Wrap(_deviceIdentifierErr, "Error serializing 'deviceIdentifier' field") + } + + // Optional Field (openingTag) (Can be skipped, if the value is null) + var openingTag BACnetOpeningTag = nil + if m.GetOpeningTag() != nil { + if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for openingTag") } - _deviceIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetDeviceIdentifier()) - if popErr := writeBuffer.PopContext("deviceIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for deviceIdentifier") + openingTag = m.GetOpeningTag() + _openingTagErr := writeBuffer.WriteSerializable(ctx, openingTag) + if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for openingTag") } - if _deviceIdentifierErr != nil { - return errors.Wrap(_deviceIdentifierErr, "Error serializing 'deviceIdentifier' field") + if _openingTagErr != nil { + return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") } + } - // Optional Field (openingTag) (Can be skipped, if the value is null) - var openingTag BACnetOpeningTag = nil - if m.GetOpeningTag() != nil { - if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for openingTag") - } - openingTag = m.GetOpeningTag() - _openingTagErr := writeBuffer.WriteSerializable(ctx, openingTag) - if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for openingTag") - } - if _openingTagErr != nil { - return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") - } - } + // Simple Field (fileStartPosition) + if pushErr := writeBuffer.PushContext("fileStartPosition"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for fileStartPosition") + } + _fileStartPositionErr := writeBuffer.WriteSerializable(ctx, m.GetFileStartPosition()) + if popErr := writeBuffer.PopContext("fileStartPosition"); popErr != nil { + return errors.Wrap(popErr, "Error popping for fileStartPosition") + } + if _fileStartPositionErr != nil { + return errors.Wrap(_fileStartPositionErr, "Error serializing 'fileStartPosition' field") + } - // Simple Field (fileStartPosition) - if pushErr := writeBuffer.PushContext("fileStartPosition"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for fileStartPosition") - } - _fileStartPositionErr := writeBuffer.WriteSerializable(ctx, m.GetFileStartPosition()) - if popErr := writeBuffer.PopContext("fileStartPosition"); popErr != nil { - return errors.Wrap(popErr, "Error popping for fileStartPosition") - } - if _fileStartPositionErr != nil { - return errors.Wrap(_fileStartPositionErr, "Error serializing 'fileStartPosition' field") - } + // Simple Field (fileData) + if pushErr := writeBuffer.PushContext("fileData"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for fileData") + } + _fileDataErr := writeBuffer.WriteSerializable(ctx, m.GetFileData()) + if popErr := writeBuffer.PopContext("fileData"); popErr != nil { + return errors.Wrap(popErr, "Error popping for fileData") + } + if _fileDataErr != nil { + return errors.Wrap(_fileDataErr, "Error serializing 'fileData' field") + } - // Simple Field (fileData) - if pushErr := writeBuffer.PushContext("fileData"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for fileData") - } - _fileDataErr := writeBuffer.WriteSerializable(ctx, m.GetFileData()) - if popErr := writeBuffer.PopContext("fileData"); popErr != nil { - return errors.Wrap(popErr, "Error popping for fileData") + // Optional Field (closingTag) (Can be skipped, if the value is null) + var closingTag BACnetClosingTag = nil + if m.GetClosingTag() != nil { + if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for closingTag") } - if _fileDataErr != nil { - return errors.Wrap(_fileDataErr, "Error serializing 'fileData' field") + closingTag = m.GetClosingTag() + _closingTagErr := writeBuffer.WriteSerializable(ctx, closingTag) + if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for closingTag") } - - // Optional Field (closingTag) (Can be skipped, if the value is null) - var closingTag BACnetClosingTag = nil - if m.GetClosingTag() != nil { - if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for closingTag") - } - closingTag = m.GetClosingTag() - _closingTagErr := writeBuffer.WriteSerializable(ctx, closingTag) - if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for closingTag") - } - if _closingTagErr != nil { - return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") - } + if _closingTagErr != nil { + return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") } + } if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestAtomicWriteFile"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConfirmedServiceRequestAtomicWriteFile") @@ -378,6 +381,7 @@ func (m *_BACnetConfirmedServiceRequestAtomicWriteFile) SerializeWithWriteBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConfirmedServiceRequestAtomicWriteFile) isBACnetConfirmedServiceRequestAtomicWriteFile() bool { return true } @@ -392,3 +396,6 @@ func (m *_BACnetConfirmedServiceRequestAtomicWriteFile) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestAuthenticate.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestAuthenticate.go index 613ab0fffbb..682d8d9f892 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestAuthenticate.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestAuthenticate.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestAuthenticate is the corresponding interface of BACnetConfirmedServiceRequestAuthenticate type BACnetConfirmedServiceRequestAuthenticate interface { @@ -46,33 +48,32 @@ type BACnetConfirmedServiceRequestAuthenticateExactly interface { // _BACnetConfirmedServiceRequestAuthenticate is the data-structure of this message type _BACnetConfirmedServiceRequestAuthenticate struct { *_BACnetConfirmedServiceRequest - BytesOfRemovedService []byte + BytesOfRemovedService []byte // Arguments. ServiceRequestPayloadLength uint32 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConfirmedServiceRequestAuthenticate) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_AUTHENTICATE -} +func (m *_BACnetConfirmedServiceRequestAuthenticate) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_AUTHENTICATE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConfirmedServiceRequestAuthenticate) InitializeParent(parent BACnetConfirmedServiceRequest) { -} +func (m *_BACnetConfirmedServiceRequestAuthenticate) InitializeParent(parent BACnetConfirmedServiceRequest ) {} -func (m *_BACnetConfirmedServiceRequestAuthenticate) GetParent() BACnetConfirmedServiceRequest { +func (m *_BACnetConfirmedServiceRequestAuthenticate) GetParent() BACnetConfirmedServiceRequest { return m._BACnetConfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -87,11 +88,12 @@ func (m *_BACnetConfirmedServiceRequestAuthenticate) GetBytesOfRemovedService() /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestAuthenticate factory function for _BACnetConfirmedServiceRequestAuthenticate -func NewBACnetConfirmedServiceRequestAuthenticate(bytesOfRemovedService []byte, serviceRequestPayloadLength uint32, serviceRequestLength uint32) *_BACnetConfirmedServiceRequestAuthenticate { +func NewBACnetConfirmedServiceRequestAuthenticate( bytesOfRemovedService []byte , serviceRequestPayloadLength uint32 , serviceRequestLength uint32 ) *_BACnetConfirmedServiceRequestAuthenticate { _result := &_BACnetConfirmedServiceRequestAuthenticate{ - BytesOfRemovedService: bytesOfRemovedService, - _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), + BytesOfRemovedService: bytesOfRemovedService, + _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), } _result._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _result return _result @@ -99,7 +101,7 @@ func NewBACnetConfirmedServiceRequestAuthenticate(bytesOfRemovedService []byte, // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestAuthenticate(structType interface{}) BACnetConfirmedServiceRequestAuthenticate { - if casted, ok := structType.(BACnetConfirmedServiceRequestAuthenticate); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestAuthenticate); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestAuthenticate); ok { @@ -123,6 +125,7 @@ func (m *_BACnetConfirmedServiceRequestAuthenticate) GetLengthInBits(ctx context return lengthInBits } + func (m *_BACnetConfirmedServiceRequestAuthenticate) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -177,11 +180,11 @@ func (m *_BACnetConfirmedServiceRequestAuthenticate) SerializeWithWriteBuffer(ct return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestAuthenticate") } - // Array Field (bytesOfRemovedService) - // Byte Array field (bytesOfRemovedService) - if err := writeBuffer.WriteByteArray("bytesOfRemovedService", m.GetBytesOfRemovedService()); err != nil { - return errors.Wrap(err, "Error serializing 'bytesOfRemovedService' field") - } + // Array Field (bytesOfRemovedService) + // Byte Array field (bytesOfRemovedService) + if err := writeBuffer.WriteByteArray("bytesOfRemovedService", m.GetBytesOfRemovedService()); err != nil { + return errors.Wrap(err, "Error serializing 'bytesOfRemovedService' field") + } if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestAuthenticate"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConfirmedServiceRequestAuthenticate") @@ -191,13 +194,13 @@ func (m *_BACnetConfirmedServiceRequestAuthenticate) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + //// // Arguments Getter func (m *_BACnetConfirmedServiceRequestAuthenticate) GetServiceRequestPayloadLength() uint32 { return m.ServiceRequestPayloadLength } - // //// @@ -215,3 +218,6 @@ func (m *_BACnetConfirmedServiceRequestAuthenticate) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestConfirmedCOVNotification.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestConfirmedCOVNotification.go index 740fad66a9e..838599518e4 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestConfirmedCOVNotification.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestConfirmedCOVNotification.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestConfirmedCOVNotification is the corresponding interface of BACnetConfirmedServiceRequestConfirmedCOVNotification type BACnetConfirmedServiceRequestConfirmedCOVNotification interface { @@ -54,34 +56,33 @@ type BACnetConfirmedServiceRequestConfirmedCOVNotificationExactly interface { // _BACnetConfirmedServiceRequestConfirmedCOVNotification is the data-structure of this message type _BACnetConfirmedServiceRequestConfirmedCOVNotification struct { *_BACnetConfirmedServiceRequest - SubscriberProcessIdentifier BACnetContextTagUnsignedInteger - InitiatingDeviceIdentifier BACnetContextTagObjectIdentifier - MonitoredObjectIdentifier BACnetContextTagObjectIdentifier - LifetimeInSeconds BACnetContextTagUnsignedInteger - ListOfValues BACnetPropertyValues + SubscriberProcessIdentifier BACnetContextTagUnsignedInteger + InitiatingDeviceIdentifier BACnetContextTagObjectIdentifier + MonitoredObjectIdentifier BACnetContextTagObjectIdentifier + LifetimeInSeconds BACnetContextTagUnsignedInteger + ListOfValues BACnetPropertyValues } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConfirmedServiceRequestConfirmedCOVNotification) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_CONFIRMED_COV_NOTIFICATION -} +func (m *_BACnetConfirmedServiceRequestConfirmedCOVNotification) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_CONFIRMED_COV_NOTIFICATION} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConfirmedServiceRequestConfirmedCOVNotification) InitializeParent(parent BACnetConfirmedServiceRequest) { -} +func (m *_BACnetConfirmedServiceRequestConfirmedCOVNotification) InitializeParent(parent BACnetConfirmedServiceRequest ) {} -func (m *_BACnetConfirmedServiceRequestConfirmedCOVNotification) GetParent() BACnetConfirmedServiceRequest { +func (m *_BACnetConfirmedServiceRequestConfirmedCOVNotification) GetParent() BACnetConfirmedServiceRequest { return m._BACnetConfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -112,15 +113,16 @@ func (m *_BACnetConfirmedServiceRequestConfirmedCOVNotification) GetListOfValues /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestConfirmedCOVNotification factory function for _BACnetConfirmedServiceRequestConfirmedCOVNotification -func NewBACnetConfirmedServiceRequestConfirmedCOVNotification(subscriberProcessIdentifier BACnetContextTagUnsignedInteger, initiatingDeviceIdentifier BACnetContextTagObjectIdentifier, monitoredObjectIdentifier BACnetContextTagObjectIdentifier, lifetimeInSeconds BACnetContextTagUnsignedInteger, listOfValues BACnetPropertyValues, serviceRequestLength uint32) *_BACnetConfirmedServiceRequestConfirmedCOVNotification { +func NewBACnetConfirmedServiceRequestConfirmedCOVNotification( subscriberProcessIdentifier BACnetContextTagUnsignedInteger , initiatingDeviceIdentifier BACnetContextTagObjectIdentifier , monitoredObjectIdentifier BACnetContextTagObjectIdentifier , lifetimeInSeconds BACnetContextTagUnsignedInteger , listOfValues BACnetPropertyValues , serviceRequestLength uint32 ) *_BACnetConfirmedServiceRequestConfirmedCOVNotification { _result := &_BACnetConfirmedServiceRequestConfirmedCOVNotification{ - SubscriberProcessIdentifier: subscriberProcessIdentifier, - InitiatingDeviceIdentifier: initiatingDeviceIdentifier, - MonitoredObjectIdentifier: monitoredObjectIdentifier, - LifetimeInSeconds: lifetimeInSeconds, - ListOfValues: listOfValues, - _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), + SubscriberProcessIdentifier: subscriberProcessIdentifier, + InitiatingDeviceIdentifier: initiatingDeviceIdentifier, + MonitoredObjectIdentifier: monitoredObjectIdentifier, + LifetimeInSeconds: lifetimeInSeconds, + ListOfValues: listOfValues, + _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), } _result._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _result return _result @@ -128,7 +130,7 @@ func NewBACnetConfirmedServiceRequestConfirmedCOVNotification(subscriberProcessI // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestConfirmedCOVNotification(structType interface{}) BACnetConfirmedServiceRequestConfirmedCOVNotification { - if casted, ok := structType.(BACnetConfirmedServiceRequestConfirmedCOVNotification); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestConfirmedCOVNotification); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestConfirmedCOVNotification); ok { @@ -162,6 +164,7 @@ func (m *_BACnetConfirmedServiceRequestConfirmedCOVNotification) GetLengthInBits return lengthInBits } + func (m *_BACnetConfirmedServiceRequestConfirmedCOVNotification) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -183,7 +186,7 @@ func BACnetConfirmedServiceRequestConfirmedCOVNotificationParseWithBuffer(ctx co if pullErr := readBuffer.PullContext("subscriberProcessIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for subscriberProcessIdentifier") } - _subscriberProcessIdentifier, _subscriberProcessIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_subscriberProcessIdentifier, _subscriberProcessIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _subscriberProcessIdentifierErr != nil { return nil, errors.Wrap(_subscriberProcessIdentifierErr, "Error parsing 'subscriberProcessIdentifier' field of BACnetConfirmedServiceRequestConfirmedCOVNotification") } @@ -196,7 +199,7 @@ func BACnetConfirmedServiceRequestConfirmedCOVNotificationParseWithBuffer(ctx co if pullErr := readBuffer.PullContext("initiatingDeviceIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for initiatingDeviceIdentifier") } - _initiatingDeviceIdentifier, _initiatingDeviceIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER)) +_initiatingDeviceIdentifier, _initiatingDeviceIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_BACNET_OBJECT_IDENTIFIER ) ) if _initiatingDeviceIdentifierErr != nil { return nil, errors.Wrap(_initiatingDeviceIdentifierErr, "Error parsing 'initiatingDeviceIdentifier' field of BACnetConfirmedServiceRequestConfirmedCOVNotification") } @@ -209,7 +212,7 @@ func BACnetConfirmedServiceRequestConfirmedCOVNotificationParseWithBuffer(ctx co if pullErr := readBuffer.PullContext("monitoredObjectIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for monitoredObjectIdentifier") } - _monitoredObjectIdentifier, _monitoredObjectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER)) +_monitoredObjectIdentifier, _monitoredObjectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , BACnetDataType( BACnetDataType_BACNET_OBJECT_IDENTIFIER ) ) if _monitoredObjectIdentifierErr != nil { return nil, errors.Wrap(_monitoredObjectIdentifierErr, "Error parsing 'monitoredObjectIdentifier' field of BACnetConfirmedServiceRequestConfirmedCOVNotification") } @@ -222,7 +225,7 @@ func BACnetConfirmedServiceRequestConfirmedCOVNotificationParseWithBuffer(ctx co if pullErr := readBuffer.PullContext("lifetimeInSeconds"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lifetimeInSeconds") } - _lifetimeInSeconds, _lifetimeInSecondsErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(3)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_lifetimeInSeconds, _lifetimeInSecondsErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(3) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _lifetimeInSecondsErr != nil { return nil, errors.Wrap(_lifetimeInSecondsErr, "Error parsing 'lifetimeInSeconds' field of BACnetConfirmedServiceRequestConfirmedCOVNotification") } @@ -235,7 +238,7 @@ func BACnetConfirmedServiceRequestConfirmedCOVNotificationParseWithBuffer(ctx co if pullErr := readBuffer.PullContext("listOfValues"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for listOfValues") } - _listOfValues, _listOfValuesErr := BACnetPropertyValuesParseWithBuffer(ctx, readBuffer, uint8(uint8(4)), BACnetObjectType(monitoredObjectIdentifier.GetObjectType())) +_listOfValues, _listOfValuesErr := BACnetPropertyValuesParseWithBuffer(ctx, readBuffer , uint8( uint8(4) ) , BACnetObjectType( monitoredObjectIdentifier.GetObjectType() ) ) if _listOfValuesErr != nil { return nil, errors.Wrap(_listOfValuesErr, "Error parsing 'listOfValues' field of BACnetConfirmedServiceRequestConfirmedCOVNotification") } @@ -254,10 +257,10 @@ func BACnetConfirmedServiceRequestConfirmedCOVNotificationParseWithBuffer(ctx co ServiceRequestLength: serviceRequestLength, }, SubscriberProcessIdentifier: subscriberProcessIdentifier, - InitiatingDeviceIdentifier: initiatingDeviceIdentifier, - MonitoredObjectIdentifier: monitoredObjectIdentifier, - LifetimeInSeconds: lifetimeInSeconds, - ListOfValues: listOfValues, + InitiatingDeviceIdentifier: initiatingDeviceIdentifier, + MonitoredObjectIdentifier: monitoredObjectIdentifier, + LifetimeInSeconds: lifetimeInSeconds, + ListOfValues: listOfValues, } _child._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _child return _child, nil @@ -279,65 +282,65 @@ func (m *_BACnetConfirmedServiceRequestConfirmedCOVNotification) SerializeWithWr return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestConfirmedCOVNotification") } - // Simple Field (subscriberProcessIdentifier) - if pushErr := writeBuffer.PushContext("subscriberProcessIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for subscriberProcessIdentifier") - } - _subscriberProcessIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetSubscriberProcessIdentifier()) - if popErr := writeBuffer.PopContext("subscriberProcessIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for subscriberProcessIdentifier") - } - if _subscriberProcessIdentifierErr != nil { - return errors.Wrap(_subscriberProcessIdentifierErr, "Error serializing 'subscriberProcessIdentifier' field") - } + // Simple Field (subscriberProcessIdentifier) + if pushErr := writeBuffer.PushContext("subscriberProcessIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for subscriberProcessIdentifier") + } + _subscriberProcessIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetSubscriberProcessIdentifier()) + if popErr := writeBuffer.PopContext("subscriberProcessIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for subscriberProcessIdentifier") + } + if _subscriberProcessIdentifierErr != nil { + return errors.Wrap(_subscriberProcessIdentifierErr, "Error serializing 'subscriberProcessIdentifier' field") + } - // Simple Field (initiatingDeviceIdentifier) - if pushErr := writeBuffer.PushContext("initiatingDeviceIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for initiatingDeviceIdentifier") - } - _initiatingDeviceIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetInitiatingDeviceIdentifier()) - if popErr := writeBuffer.PopContext("initiatingDeviceIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for initiatingDeviceIdentifier") - } - if _initiatingDeviceIdentifierErr != nil { - return errors.Wrap(_initiatingDeviceIdentifierErr, "Error serializing 'initiatingDeviceIdentifier' field") - } + // Simple Field (initiatingDeviceIdentifier) + if pushErr := writeBuffer.PushContext("initiatingDeviceIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for initiatingDeviceIdentifier") + } + _initiatingDeviceIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetInitiatingDeviceIdentifier()) + if popErr := writeBuffer.PopContext("initiatingDeviceIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for initiatingDeviceIdentifier") + } + if _initiatingDeviceIdentifierErr != nil { + return errors.Wrap(_initiatingDeviceIdentifierErr, "Error serializing 'initiatingDeviceIdentifier' field") + } - // Simple Field (monitoredObjectIdentifier) - if pushErr := writeBuffer.PushContext("monitoredObjectIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for monitoredObjectIdentifier") - } - _monitoredObjectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetMonitoredObjectIdentifier()) - if popErr := writeBuffer.PopContext("monitoredObjectIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for monitoredObjectIdentifier") - } - if _monitoredObjectIdentifierErr != nil { - return errors.Wrap(_monitoredObjectIdentifierErr, "Error serializing 'monitoredObjectIdentifier' field") - } + // Simple Field (monitoredObjectIdentifier) + if pushErr := writeBuffer.PushContext("monitoredObjectIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for monitoredObjectIdentifier") + } + _monitoredObjectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetMonitoredObjectIdentifier()) + if popErr := writeBuffer.PopContext("monitoredObjectIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for monitoredObjectIdentifier") + } + if _monitoredObjectIdentifierErr != nil { + return errors.Wrap(_monitoredObjectIdentifierErr, "Error serializing 'monitoredObjectIdentifier' field") + } - // Simple Field (lifetimeInSeconds) - if pushErr := writeBuffer.PushContext("lifetimeInSeconds"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lifetimeInSeconds") - } - _lifetimeInSecondsErr := writeBuffer.WriteSerializable(ctx, m.GetLifetimeInSeconds()) - if popErr := writeBuffer.PopContext("lifetimeInSeconds"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lifetimeInSeconds") - } - if _lifetimeInSecondsErr != nil { - return errors.Wrap(_lifetimeInSecondsErr, "Error serializing 'lifetimeInSeconds' field") - } + // Simple Field (lifetimeInSeconds) + if pushErr := writeBuffer.PushContext("lifetimeInSeconds"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lifetimeInSeconds") + } + _lifetimeInSecondsErr := writeBuffer.WriteSerializable(ctx, m.GetLifetimeInSeconds()) + if popErr := writeBuffer.PopContext("lifetimeInSeconds"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lifetimeInSeconds") + } + if _lifetimeInSecondsErr != nil { + return errors.Wrap(_lifetimeInSecondsErr, "Error serializing 'lifetimeInSeconds' field") + } - // Simple Field (listOfValues) - if pushErr := writeBuffer.PushContext("listOfValues"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for listOfValues") - } - _listOfValuesErr := writeBuffer.WriteSerializable(ctx, m.GetListOfValues()) - if popErr := writeBuffer.PopContext("listOfValues"); popErr != nil { - return errors.Wrap(popErr, "Error popping for listOfValues") - } - if _listOfValuesErr != nil { - return errors.Wrap(_listOfValuesErr, "Error serializing 'listOfValues' field") - } + // Simple Field (listOfValues) + if pushErr := writeBuffer.PushContext("listOfValues"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for listOfValues") + } + _listOfValuesErr := writeBuffer.WriteSerializable(ctx, m.GetListOfValues()) + if popErr := writeBuffer.PopContext("listOfValues"); popErr != nil { + return errors.Wrap(popErr, "Error popping for listOfValues") + } + if _listOfValuesErr != nil { + return errors.Wrap(_listOfValuesErr, "Error serializing 'listOfValues' field") + } if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestConfirmedCOVNotification"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConfirmedServiceRequestConfirmedCOVNotification") @@ -347,6 +350,7 @@ func (m *_BACnetConfirmedServiceRequestConfirmedCOVNotification) SerializeWithWr return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConfirmedServiceRequestConfirmedCOVNotification) isBACnetConfirmedServiceRequestConfirmedCOVNotification() bool { return true } @@ -361,3 +365,6 @@ func (m *_BACnetConfirmedServiceRequestConfirmedCOVNotification) String() string } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple.go index 494e576a5af..dd1e72f795c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple is the corresponding interface of BACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple type BACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple interface { @@ -55,34 +57,33 @@ type BACnetConfirmedServiceRequestConfirmedCOVNotificationMultipleExactly interf // _BACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple is the data-structure of this message type _BACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple struct { *_BACnetConfirmedServiceRequest - SubscriberProcessIdentifier BACnetContextTagUnsignedInteger - InitiatingDeviceIdentifier BACnetContextTagObjectIdentifier - TimeRemaining BACnetContextTagUnsignedInteger - Timestamp BACnetTimeStampEnclosed - ListOfCovNotifications ListOfCovNotificationsList + SubscriberProcessIdentifier BACnetContextTagUnsignedInteger + InitiatingDeviceIdentifier BACnetContextTagObjectIdentifier + TimeRemaining BACnetContextTagUnsignedInteger + Timestamp BACnetTimeStampEnclosed + ListOfCovNotifications ListOfCovNotificationsList } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_CONFIRMED_COV_NOTIFICATION_MULTIPLE -} +func (m *_BACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_CONFIRMED_COV_NOTIFICATION_MULTIPLE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple) InitializeParent(parent BACnetConfirmedServiceRequest) { -} +func (m *_BACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple) InitializeParent(parent BACnetConfirmedServiceRequest ) {} -func (m *_BACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple) GetParent() BACnetConfirmedServiceRequest { +func (m *_BACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple) GetParent() BACnetConfirmedServiceRequest { return m._BACnetConfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -113,15 +114,16 @@ func (m *_BACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple) GetList /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple factory function for _BACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple -func NewBACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple(subscriberProcessIdentifier BACnetContextTagUnsignedInteger, initiatingDeviceIdentifier BACnetContextTagObjectIdentifier, timeRemaining BACnetContextTagUnsignedInteger, timestamp BACnetTimeStampEnclosed, listOfCovNotifications ListOfCovNotificationsList, serviceRequestLength uint32) *_BACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple { +func NewBACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple( subscriberProcessIdentifier BACnetContextTagUnsignedInteger , initiatingDeviceIdentifier BACnetContextTagObjectIdentifier , timeRemaining BACnetContextTagUnsignedInteger , timestamp BACnetTimeStampEnclosed , listOfCovNotifications ListOfCovNotificationsList , serviceRequestLength uint32 ) *_BACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple { _result := &_BACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple{ - SubscriberProcessIdentifier: subscriberProcessIdentifier, - InitiatingDeviceIdentifier: initiatingDeviceIdentifier, - TimeRemaining: timeRemaining, - Timestamp: timestamp, - ListOfCovNotifications: listOfCovNotifications, - _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), + SubscriberProcessIdentifier: subscriberProcessIdentifier, + InitiatingDeviceIdentifier: initiatingDeviceIdentifier, + TimeRemaining: timeRemaining, + Timestamp: timestamp, + ListOfCovNotifications: listOfCovNotifications, + _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), } _result._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _result return _result @@ -129,7 +131,7 @@ func NewBACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple(subscriber // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple(structType interface{}) BACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple { - if casted, ok := structType.(BACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple); ok { @@ -165,6 +167,7 @@ func (m *_BACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple) GetLeng return lengthInBits } + func (m *_BACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -186,7 +189,7 @@ func BACnetConfirmedServiceRequestConfirmedCOVNotificationMultipleParseWithBuffe if pullErr := readBuffer.PullContext("subscriberProcessIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for subscriberProcessIdentifier") } - _subscriberProcessIdentifier, _subscriberProcessIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_subscriberProcessIdentifier, _subscriberProcessIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _subscriberProcessIdentifierErr != nil { return nil, errors.Wrap(_subscriberProcessIdentifierErr, "Error parsing 'subscriberProcessIdentifier' field of BACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple") } @@ -199,7 +202,7 @@ func BACnetConfirmedServiceRequestConfirmedCOVNotificationMultipleParseWithBuffe if pullErr := readBuffer.PullContext("initiatingDeviceIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for initiatingDeviceIdentifier") } - _initiatingDeviceIdentifier, _initiatingDeviceIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER)) +_initiatingDeviceIdentifier, _initiatingDeviceIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_BACNET_OBJECT_IDENTIFIER ) ) if _initiatingDeviceIdentifierErr != nil { return nil, errors.Wrap(_initiatingDeviceIdentifierErr, "Error parsing 'initiatingDeviceIdentifier' field of BACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple") } @@ -212,7 +215,7 @@ func BACnetConfirmedServiceRequestConfirmedCOVNotificationMultipleParseWithBuffe if pullErr := readBuffer.PullContext("timeRemaining"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeRemaining") } - _timeRemaining, _timeRemainingErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_timeRemaining, _timeRemainingErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _timeRemainingErr != nil { return nil, errors.Wrap(_timeRemainingErr, "Error parsing 'timeRemaining' field of BACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple") } @@ -223,12 +226,12 @@ func BACnetConfirmedServiceRequestConfirmedCOVNotificationMultipleParseWithBuffe // Optional Field (timestamp) (Can be skipped, if a given expression evaluates to false) var timestamp BACnetTimeStampEnclosed = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("timestamp"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timestamp") } - _val, _err := BACnetTimeStampEnclosedParseWithBuffer(ctx, readBuffer, uint8(3)) +_val, _err := BACnetTimeStampEnclosedParseWithBuffer(ctx, readBuffer , uint8(3) ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -247,7 +250,7 @@ func BACnetConfirmedServiceRequestConfirmedCOVNotificationMultipleParseWithBuffe if pullErr := readBuffer.PullContext("listOfCovNotifications"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for listOfCovNotifications") } - _listOfCovNotifications, _listOfCovNotificationsErr := ListOfCovNotificationsListParseWithBuffer(ctx, readBuffer, uint8(uint8(4))) +_listOfCovNotifications, _listOfCovNotificationsErr := ListOfCovNotificationsListParseWithBuffer(ctx, readBuffer , uint8( uint8(4) ) ) if _listOfCovNotificationsErr != nil { return nil, errors.Wrap(_listOfCovNotificationsErr, "Error parsing 'listOfCovNotifications' field of BACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple") } @@ -266,10 +269,10 @@ func BACnetConfirmedServiceRequestConfirmedCOVNotificationMultipleParseWithBuffe ServiceRequestLength: serviceRequestLength, }, SubscriberProcessIdentifier: subscriberProcessIdentifier, - InitiatingDeviceIdentifier: initiatingDeviceIdentifier, - TimeRemaining: timeRemaining, - Timestamp: timestamp, - ListOfCovNotifications: listOfCovNotifications, + InitiatingDeviceIdentifier: initiatingDeviceIdentifier, + TimeRemaining: timeRemaining, + Timestamp: timestamp, + ListOfCovNotifications: listOfCovNotifications, } _child._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _child return _child, nil @@ -291,69 +294,69 @@ func (m *_BACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple) Seriali return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple") } - // Simple Field (subscriberProcessIdentifier) - if pushErr := writeBuffer.PushContext("subscriberProcessIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for subscriberProcessIdentifier") - } - _subscriberProcessIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetSubscriberProcessIdentifier()) - if popErr := writeBuffer.PopContext("subscriberProcessIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for subscriberProcessIdentifier") - } - if _subscriberProcessIdentifierErr != nil { - return errors.Wrap(_subscriberProcessIdentifierErr, "Error serializing 'subscriberProcessIdentifier' field") - } - - // Simple Field (initiatingDeviceIdentifier) - if pushErr := writeBuffer.PushContext("initiatingDeviceIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for initiatingDeviceIdentifier") - } - _initiatingDeviceIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetInitiatingDeviceIdentifier()) - if popErr := writeBuffer.PopContext("initiatingDeviceIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for initiatingDeviceIdentifier") - } - if _initiatingDeviceIdentifierErr != nil { - return errors.Wrap(_initiatingDeviceIdentifierErr, "Error serializing 'initiatingDeviceIdentifier' field") - } + // Simple Field (subscriberProcessIdentifier) + if pushErr := writeBuffer.PushContext("subscriberProcessIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for subscriberProcessIdentifier") + } + _subscriberProcessIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetSubscriberProcessIdentifier()) + if popErr := writeBuffer.PopContext("subscriberProcessIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for subscriberProcessIdentifier") + } + if _subscriberProcessIdentifierErr != nil { + return errors.Wrap(_subscriberProcessIdentifierErr, "Error serializing 'subscriberProcessIdentifier' field") + } - // Simple Field (timeRemaining) - if pushErr := writeBuffer.PushContext("timeRemaining"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timeRemaining") - } - _timeRemainingErr := writeBuffer.WriteSerializable(ctx, m.GetTimeRemaining()) - if popErr := writeBuffer.PopContext("timeRemaining"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timeRemaining") - } - if _timeRemainingErr != nil { - return errors.Wrap(_timeRemainingErr, "Error serializing 'timeRemaining' field") - } + // Simple Field (initiatingDeviceIdentifier) + if pushErr := writeBuffer.PushContext("initiatingDeviceIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for initiatingDeviceIdentifier") + } + _initiatingDeviceIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetInitiatingDeviceIdentifier()) + if popErr := writeBuffer.PopContext("initiatingDeviceIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for initiatingDeviceIdentifier") + } + if _initiatingDeviceIdentifierErr != nil { + return errors.Wrap(_initiatingDeviceIdentifierErr, "Error serializing 'initiatingDeviceIdentifier' field") + } - // Optional Field (timestamp) (Can be skipped, if the value is null) - var timestamp BACnetTimeStampEnclosed = nil - if m.GetTimestamp() != nil { - if pushErr := writeBuffer.PushContext("timestamp"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timestamp") - } - timestamp = m.GetTimestamp() - _timestampErr := writeBuffer.WriteSerializable(ctx, timestamp) - if popErr := writeBuffer.PopContext("timestamp"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timestamp") - } - if _timestampErr != nil { - return errors.Wrap(_timestampErr, "Error serializing 'timestamp' field") - } - } + // Simple Field (timeRemaining) + if pushErr := writeBuffer.PushContext("timeRemaining"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timeRemaining") + } + _timeRemainingErr := writeBuffer.WriteSerializable(ctx, m.GetTimeRemaining()) + if popErr := writeBuffer.PopContext("timeRemaining"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timeRemaining") + } + if _timeRemainingErr != nil { + return errors.Wrap(_timeRemainingErr, "Error serializing 'timeRemaining' field") + } - // Simple Field (listOfCovNotifications) - if pushErr := writeBuffer.PushContext("listOfCovNotifications"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for listOfCovNotifications") + // Optional Field (timestamp) (Can be skipped, if the value is null) + var timestamp BACnetTimeStampEnclosed = nil + if m.GetTimestamp() != nil { + if pushErr := writeBuffer.PushContext("timestamp"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timestamp") } - _listOfCovNotificationsErr := writeBuffer.WriteSerializable(ctx, m.GetListOfCovNotifications()) - if popErr := writeBuffer.PopContext("listOfCovNotifications"); popErr != nil { - return errors.Wrap(popErr, "Error popping for listOfCovNotifications") + timestamp = m.GetTimestamp() + _timestampErr := writeBuffer.WriteSerializable(ctx, timestamp) + if popErr := writeBuffer.PopContext("timestamp"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timestamp") } - if _listOfCovNotificationsErr != nil { - return errors.Wrap(_listOfCovNotificationsErr, "Error serializing 'listOfCovNotifications' field") + if _timestampErr != nil { + return errors.Wrap(_timestampErr, "Error serializing 'timestamp' field") } + } + + // Simple Field (listOfCovNotifications) + if pushErr := writeBuffer.PushContext("listOfCovNotifications"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for listOfCovNotifications") + } + _listOfCovNotificationsErr := writeBuffer.WriteSerializable(ctx, m.GetListOfCovNotifications()) + if popErr := writeBuffer.PopContext("listOfCovNotifications"); popErr != nil { + return errors.Wrap(popErr, "Error popping for listOfCovNotifications") + } + if _listOfCovNotificationsErr != nil { + return errors.Wrap(_listOfCovNotificationsErr, "Error serializing 'listOfCovNotifications' field") + } if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple") @@ -363,6 +366,7 @@ func (m *_BACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple) Seriali return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple) isBACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple() bool { return true } @@ -377,3 +381,6 @@ func (m *_BACnetConfirmedServiceRequestConfirmedCOVNotificationMultiple) String( } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestConfirmedEventNotification.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestConfirmedEventNotification.go index 7068a6d4860..67a10baf542 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestConfirmedEventNotification.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestConfirmedEventNotification.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestConfirmedEventNotification is the corresponding interface of BACnetConfirmedServiceRequestConfirmedEventNotification type BACnetConfirmedServiceRequestConfirmedEventNotification interface { @@ -71,42 +73,41 @@ type BACnetConfirmedServiceRequestConfirmedEventNotificationExactly interface { // _BACnetConfirmedServiceRequestConfirmedEventNotification is the data-structure of this message type _BACnetConfirmedServiceRequestConfirmedEventNotification struct { *_BACnetConfirmedServiceRequest - ProcessIdentifier BACnetContextTagUnsignedInteger - InitiatingDeviceIdentifier BACnetContextTagObjectIdentifier - EventObjectIdentifier BACnetContextTagObjectIdentifier - Timestamp BACnetTimeStampEnclosed - NotificationClass BACnetContextTagUnsignedInteger - Priority BACnetContextTagUnsignedInteger - EventType BACnetEventTypeTagged - MessageText BACnetContextTagCharacterString - NotifyType BACnetNotifyTypeTagged - AckRequired BACnetContextTagBoolean - FromState BACnetEventStateTagged - ToState BACnetEventStateTagged - EventValues BACnetNotificationParameters + ProcessIdentifier BACnetContextTagUnsignedInteger + InitiatingDeviceIdentifier BACnetContextTagObjectIdentifier + EventObjectIdentifier BACnetContextTagObjectIdentifier + Timestamp BACnetTimeStampEnclosed + NotificationClass BACnetContextTagUnsignedInteger + Priority BACnetContextTagUnsignedInteger + EventType BACnetEventTypeTagged + MessageText BACnetContextTagCharacterString + NotifyType BACnetNotifyTypeTagged + AckRequired BACnetContextTagBoolean + FromState BACnetEventStateTagged + ToState BACnetEventStateTagged + EventValues BACnetNotificationParameters } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConfirmedServiceRequestConfirmedEventNotification) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_CONFIRMED_EVENT_NOTIFICATION -} +func (m *_BACnetConfirmedServiceRequestConfirmedEventNotification) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_CONFIRMED_EVENT_NOTIFICATION} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConfirmedServiceRequestConfirmedEventNotification) InitializeParent(parent BACnetConfirmedServiceRequest) { -} +func (m *_BACnetConfirmedServiceRequestConfirmedEventNotification) InitializeParent(parent BACnetConfirmedServiceRequest ) {} -func (m *_BACnetConfirmedServiceRequestConfirmedEventNotification) GetParent() BACnetConfirmedServiceRequest { +func (m *_BACnetConfirmedServiceRequestConfirmedEventNotification) GetParent() BACnetConfirmedServiceRequest { return m._BACnetConfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -169,23 +170,24 @@ func (m *_BACnetConfirmedServiceRequestConfirmedEventNotification) GetEventValue /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestConfirmedEventNotification factory function for _BACnetConfirmedServiceRequestConfirmedEventNotification -func NewBACnetConfirmedServiceRequestConfirmedEventNotification(processIdentifier BACnetContextTagUnsignedInteger, initiatingDeviceIdentifier BACnetContextTagObjectIdentifier, eventObjectIdentifier BACnetContextTagObjectIdentifier, timestamp BACnetTimeStampEnclosed, notificationClass BACnetContextTagUnsignedInteger, priority BACnetContextTagUnsignedInteger, eventType BACnetEventTypeTagged, messageText BACnetContextTagCharacterString, notifyType BACnetNotifyTypeTagged, ackRequired BACnetContextTagBoolean, fromState BACnetEventStateTagged, toState BACnetEventStateTagged, eventValues BACnetNotificationParameters, serviceRequestLength uint32) *_BACnetConfirmedServiceRequestConfirmedEventNotification { +func NewBACnetConfirmedServiceRequestConfirmedEventNotification( processIdentifier BACnetContextTagUnsignedInteger , initiatingDeviceIdentifier BACnetContextTagObjectIdentifier , eventObjectIdentifier BACnetContextTagObjectIdentifier , timestamp BACnetTimeStampEnclosed , notificationClass BACnetContextTagUnsignedInteger , priority BACnetContextTagUnsignedInteger , eventType BACnetEventTypeTagged , messageText BACnetContextTagCharacterString , notifyType BACnetNotifyTypeTagged , ackRequired BACnetContextTagBoolean , fromState BACnetEventStateTagged , toState BACnetEventStateTagged , eventValues BACnetNotificationParameters , serviceRequestLength uint32 ) *_BACnetConfirmedServiceRequestConfirmedEventNotification { _result := &_BACnetConfirmedServiceRequestConfirmedEventNotification{ - ProcessIdentifier: processIdentifier, - InitiatingDeviceIdentifier: initiatingDeviceIdentifier, - EventObjectIdentifier: eventObjectIdentifier, - Timestamp: timestamp, - NotificationClass: notificationClass, - Priority: priority, - EventType: eventType, - MessageText: messageText, - NotifyType: notifyType, - AckRequired: ackRequired, - FromState: fromState, - ToState: toState, - EventValues: eventValues, - _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), + ProcessIdentifier: processIdentifier, + InitiatingDeviceIdentifier: initiatingDeviceIdentifier, + EventObjectIdentifier: eventObjectIdentifier, + Timestamp: timestamp, + NotificationClass: notificationClass, + Priority: priority, + EventType: eventType, + MessageText: messageText, + NotifyType: notifyType, + AckRequired: ackRequired, + FromState: fromState, + ToState: toState, + EventValues: eventValues, + _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), } _result._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _result return _result @@ -193,7 +195,7 @@ func NewBACnetConfirmedServiceRequestConfirmedEventNotification(processIdentifie // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestConfirmedEventNotification(structType interface{}) BACnetConfirmedServiceRequestConfirmedEventNotification { - if casted, ok := structType.(BACnetConfirmedServiceRequestConfirmedEventNotification); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestConfirmedEventNotification); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestConfirmedEventNotification); ok { @@ -259,6 +261,7 @@ func (m *_BACnetConfirmedServiceRequestConfirmedEventNotification) GetLengthInBi return lengthInBits } + func (m *_BACnetConfirmedServiceRequestConfirmedEventNotification) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -280,7 +283,7 @@ func BACnetConfirmedServiceRequestConfirmedEventNotificationParseWithBuffer(ctx if pullErr := readBuffer.PullContext("processIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for processIdentifier") } - _processIdentifier, _processIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_processIdentifier, _processIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _processIdentifierErr != nil { return nil, errors.Wrap(_processIdentifierErr, "Error parsing 'processIdentifier' field of BACnetConfirmedServiceRequestConfirmedEventNotification") } @@ -293,7 +296,7 @@ func BACnetConfirmedServiceRequestConfirmedEventNotificationParseWithBuffer(ctx if pullErr := readBuffer.PullContext("initiatingDeviceIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for initiatingDeviceIdentifier") } - _initiatingDeviceIdentifier, _initiatingDeviceIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER)) +_initiatingDeviceIdentifier, _initiatingDeviceIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_BACNET_OBJECT_IDENTIFIER ) ) if _initiatingDeviceIdentifierErr != nil { return nil, errors.Wrap(_initiatingDeviceIdentifierErr, "Error parsing 'initiatingDeviceIdentifier' field of BACnetConfirmedServiceRequestConfirmedEventNotification") } @@ -306,7 +309,7 @@ func BACnetConfirmedServiceRequestConfirmedEventNotificationParseWithBuffer(ctx if pullErr := readBuffer.PullContext("eventObjectIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for eventObjectIdentifier") } - _eventObjectIdentifier, _eventObjectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER)) +_eventObjectIdentifier, _eventObjectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , BACnetDataType( BACnetDataType_BACNET_OBJECT_IDENTIFIER ) ) if _eventObjectIdentifierErr != nil { return nil, errors.Wrap(_eventObjectIdentifierErr, "Error parsing 'eventObjectIdentifier' field of BACnetConfirmedServiceRequestConfirmedEventNotification") } @@ -319,7 +322,7 @@ func BACnetConfirmedServiceRequestConfirmedEventNotificationParseWithBuffer(ctx if pullErr := readBuffer.PullContext("timestamp"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timestamp") } - _timestamp, _timestampErr := BACnetTimeStampEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(3))) +_timestamp, _timestampErr := BACnetTimeStampEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(3) ) ) if _timestampErr != nil { return nil, errors.Wrap(_timestampErr, "Error parsing 'timestamp' field of BACnetConfirmedServiceRequestConfirmedEventNotification") } @@ -332,7 +335,7 @@ func BACnetConfirmedServiceRequestConfirmedEventNotificationParseWithBuffer(ctx if pullErr := readBuffer.PullContext("notificationClass"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for notificationClass") } - _notificationClass, _notificationClassErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(4)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_notificationClass, _notificationClassErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(4) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _notificationClassErr != nil { return nil, errors.Wrap(_notificationClassErr, "Error parsing 'notificationClass' field of BACnetConfirmedServiceRequestConfirmedEventNotification") } @@ -345,7 +348,7 @@ func BACnetConfirmedServiceRequestConfirmedEventNotificationParseWithBuffer(ctx if pullErr := readBuffer.PullContext("priority"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for priority") } - _priority, _priorityErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(5)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_priority, _priorityErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(5) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _priorityErr != nil { return nil, errors.Wrap(_priorityErr, "Error parsing 'priority' field of BACnetConfirmedServiceRequestConfirmedEventNotification") } @@ -358,7 +361,7 @@ func BACnetConfirmedServiceRequestConfirmedEventNotificationParseWithBuffer(ctx if pullErr := readBuffer.PullContext("eventType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for eventType") } - _eventType, _eventTypeErr := BACnetEventTypeTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(6)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_eventType, _eventTypeErr := BACnetEventTypeTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(6) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _eventTypeErr != nil { return nil, errors.Wrap(_eventTypeErr, "Error parsing 'eventType' field of BACnetConfirmedServiceRequestConfirmedEventNotification") } @@ -369,12 +372,12 @@ func BACnetConfirmedServiceRequestConfirmedEventNotificationParseWithBuffer(ctx // Optional Field (messageText) (Can be skipped, if a given expression evaluates to false) var messageText BACnetContextTagCharacterString = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("messageText"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for messageText") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(7), BACnetDataType_CHARACTER_STRING) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(7) , BACnetDataType_CHARACTER_STRING ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -393,7 +396,7 @@ func BACnetConfirmedServiceRequestConfirmedEventNotificationParseWithBuffer(ctx if pullErr := readBuffer.PullContext("notifyType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for notifyType") } - _notifyType, _notifyTypeErr := BACnetNotifyTypeTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(8)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_notifyType, _notifyTypeErr := BACnetNotifyTypeTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(8) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _notifyTypeErr != nil { return nil, errors.Wrap(_notifyTypeErr, "Error parsing 'notifyType' field of BACnetConfirmedServiceRequestConfirmedEventNotification") } @@ -404,12 +407,12 @@ func BACnetConfirmedServiceRequestConfirmedEventNotificationParseWithBuffer(ctx // Optional Field (ackRequired) (Can be skipped, if a given expression evaluates to false) var ackRequired BACnetContextTagBoolean = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("ackRequired"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for ackRequired") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(9), BACnetDataType_BOOLEAN) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(9) , BACnetDataType_BOOLEAN ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -426,12 +429,12 @@ func BACnetConfirmedServiceRequestConfirmedEventNotificationParseWithBuffer(ctx // Optional Field (fromState) (Can be skipped, if a given expression evaluates to false) var fromState BACnetEventStateTagged = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("fromState"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for fromState") } - _val, _err := BACnetEventStateTaggedParseWithBuffer(ctx, readBuffer, uint8(10), TagClass_CONTEXT_SPECIFIC_TAGS) +_val, _err := BACnetEventStateTaggedParseWithBuffer(ctx, readBuffer , uint8(10) , TagClass_CONTEXT_SPECIFIC_TAGS ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -450,7 +453,7 @@ func BACnetConfirmedServiceRequestConfirmedEventNotificationParseWithBuffer(ctx if pullErr := readBuffer.PullContext("toState"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for toState") } - _toState, _toStateErr := BACnetEventStateTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(11)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_toState, _toStateErr := BACnetEventStateTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(11) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _toStateErr != nil { return nil, errors.Wrap(_toStateErr, "Error parsing 'toState' field of BACnetConfirmedServiceRequestConfirmedEventNotification") } @@ -461,12 +464,12 @@ func BACnetConfirmedServiceRequestConfirmedEventNotificationParseWithBuffer(ctx // Optional Field (eventValues) (Can be skipped, if a given expression evaluates to false) var eventValues BACnetNotificationParameters = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("eventValues"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for eventValues") } - _val, _err := BACnetNotificationParametersParseWithBuffer(ctx, readBuffer, uint8(12), eventObjectIdentifier.GetObjectType()) +_val, _err := BACnetNotificationParametersParseWithBuffer(ctx, readBuffer , uint8(12) , eventObjectIdentifier.GetObjectType() ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -490,19 +493,19 @@ func BACnetConfirmedServiceRequestConfirmedEventNotificationParseWithBuffer(ctx _BACnetConfirmedServiceRequest: &_BACnetConfirmedServiceRequest{ ServiceRequestLength: serviceRequestLength, }, - ProcessIdentifier: processIdentifier, + ProcessIdentifier: processIdentifier, InitiatingDeviceIdentifier: initiatingDeviceIdentifier, - EventObjectIdentifier: eventObjectIdentifier, - Timestamp: timestamp, - NotificationClass: notificationClass, - Priority: priority, - EventType: eventType, - MessageText: messageText, - NotifyType: notifyType, - AckRequired: ackRequired, - FromState: fromState, - ToState: toState, - EventValues: eventValues, + EventObjectIdentifier: eventObjectIdentifier, + Timestamp: timestamp, + NotificationClass: notificationClass, + Priority: priority, + EventType: eventType, + MessageText: messageText, + NotifyType: notifyType, + AckRequired: ackRequired, + FromState: fromState, + ToState: toState, + EventValues: eventValues, } _child._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _child return _child, nil @@ -524,177 +527,177 @@ func (m *_BACnetConfirmedServiceRequestConfirmedEventNotification) SerializeWith return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestConfirmedEventNotification") } - // Simple Field (processIdentifier) - if pushErr := writeBuffer.PushContext("processIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for processIdentifier") - } - _processIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetProcessIdentifier()) - if popErr := writeBuffer.PopContext("processIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for processIdentifier") - } - if _processIdentifierErr != nil { - return errors.Wrap(_processIdentifierErr, "Error serializing 'processIdentifier' field") - } + // Simple Field (processIdentifier) + if pushErr := writeBuffer.PushContext("processIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for processIdentifier") + } + _processIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetProcessIdentifier()) + if popErr := writeBuffer.PopContext("processIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for processIdentifier") + } + if _processIdentifierErr != nil { + return errors.Wrap(_processIdentifierErr, "Error serializing 'processIdentifier' field") + } - // Simple Field (initiatingDeviceIdentifier) - if pushErr := writeBuffer.PushContext("initiatingDeviceIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for initiatingDeviceIdentifier") - } - _initiatingDeviceIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetInitiatingDeviceIdentifier()) - if popErr := writeBuffer.PopContext("initiatingDeviceIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for initiatingDeviceIdentifier") - } - if _initiatingDeviceIdentifierErr != nil { - return errors.Wrap(_initiatingDeviceIdentifierErr, "Error serializing 'initiatingDeviceIdentifier' field") - } + // Simple Field (initiatingDeviceIdentifier) + if pushErr := writeBuffer.PushContext("initiatingDeviceIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for initiatingDeviceIdentifier") + } + _initiatingDeviceIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetInitiatingDeviceIdentifier()) + if popErr := writeBuffer.PopContext("initiatingDeviceIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for initiatingDeviceIdentifier") + } + if _initiatingDeviceIdentifierErr != nil { + return errors.Wrap(_initiatingDeviceIdentifierErr, "Error serializing 'initiatingDeviceIdentifier' field") + } - // Simple Field (eventObjectIdentifier) - if pushErr := writeBuffer.PushContext("eventObjectIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for eventObjectIdentifier") - } - _eventObjectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetEventObjectIdentifier()) - if popErr := writeBuffer.PopContext("eventObjectIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for eventObjectIdentifier") - } - if _eventObjectIdentifierErr != nil { - return errors.Wrap(_eventObjectIdentifierErr, "Error serializing 'eventObjectIdentifier' field") - } + // Simple Field (eventObjectIdentifier) + if pushErr := writeBuffer.PushContext("eventObjectIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for eventObjectIdentifier") + } + _eventObjectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetEventObjectIdentifier()) + if popErr := writeBuffer.PopContext("eventObjectIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for eventObjectIdentifier") + } + if _eventObjectIdentifierErr != nil { + return errors.Wrap(_eventObjectIdentifierErr, "Error serializing 'eventObjectIdentifier' field") + } - // Simple Field (timestamp) - if pushErr := writeBuffer.PushContext("timestamp"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timestamp") - } - _timestampErr := writeBuffer.WriteSerializable(ctx, m.GetTimestamp()) - if popErr := writeBuffer.PopContext("timestamp"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timestamp") - } - if _timestampErr != nil { - return errors.Wrap(_timestampErr, "Error serializing 'timestamp' field") - } + // Simple Field (timestamp) + if pushErr := writeBuffer.PushContext("timestamp"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timestamp") + } + _timestampErr := writeBuffer.WriteSerializable(ctx, m.GetTimestamp()) + if popErr := writeBuffer.PopContext("timestamp"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timestamp") + } + if _timestampErr != nil { + return errors.Wrap(_timestampErr, "Error serializing 'timestamp' field") + } - // Simple Field (notificationClass) - if pushErr := writeBuffer.PushContext("notificationClass"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for notificationClass") - } - _notificationClassErr := writeBuffer.WriteSerializable(ctx, m.GetNotificationClass()) - if popErr := writeBuffer.PopContext("notificationClass"); popErr != nil { - return errors.Wrap(popErr, "Error popping for notificationClass") - } - if _notificationClassErr != nil { - return errors.Wrap(_notificationClassErr, "Error serializing 'notificationClass' field") - } + // Simple Field (notificationClass) + if pushErr := writeBuffer.PushContext("notificationClass"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for notificationClass") + } + _notificationClassErr := writeBuffer.WriteSerializable(ctx, m.GetNotificationClass()) + if popErr := writeBuffer.PopContext("notificationClass"); popErr != nil { + return errors.Wrap(popErr, "Error popping for notificationClass") + } + if _notificationClassErr != nil { + return errors.Wrap(_notificationClassErr, "Error serializing 'notificationClass' field") + } - // Simple Field (priority) - if pushErr := writeBuffer.PushContext("priority"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for priority") - } - _priorityErr := writeBuffer.WriteSerializable(ctx, m.GetPriority()) - if popErr := writeBuffer.PopContext("priority"); popErr != nil { - return errors.Wrap(popErr, "Error popping for priority") - } - if _priorityErr != nil { - return errors.Wrap(_priorityErr, "Error serializing 'priority' field") - } + // Simple Field (priority) + if pushErr := writeBuffer.PushContext("priority"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for priority") + } + _priorityErr := writeBuffer.WriteSerializable(ctx, m.GetPriority()) + if popErr := writeBuffer.PopContext("priority"); popErr != nil { + return errors.Wrap(popErr, "Error popping for priority") + } + if _priorityErr != nil { + return errors.Wrap(_priorityErr, "Error serializing 'priority' field") + } - // Simple Field (eventType) - if pushErr := writeBuffer.PushContext("eventType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for eventType") + // Simple Field (eventType) + if pushErr := writeBuffer.PushContext("eventType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for eventType") + } + _eventTypeErr := writeBuffer.WriteSerializable(ctx, m.GetEventType()) + if popErr := writeBuffer.PopContext("eventType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for eventType") + } + if _eventTypeErr != nil { + return errors.Wrap(_eventTypeErr, "Error serializing 'eventType' field") + } + + // Optional Field (messageText) (Can be skipped, if the value is null) + var messageText BACnetContextTagCharacterString = nil + if m.GetMessageText() != nil { + if pushErr := writeBuffer.PushContext("messageText"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for messageText") } - _eventTypeErr := writeBuffer.WriteSerializable(ctx, m.GetEventType()) - if popErr := writeBuffer.PopContext("eventType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for eventType") + messageText = m.GetMessageText() + _messageTextErr := writeBuffer.WriteSerializable(ctx, messageText) + if popErr := writeBuffer.PopContext("messageText"); popErr != nil { + return errors.Wrap(popErr, "Error popping for messageText") } - if _eventTypeErr != nil { - return errors.Wrap(_eventTypeErr, "Error serializing 'eventType' field") + if _messageTextErr != nil { + return errors.Wrap(_messageTextErr, "Error serializing 'messageText' field") } + } - // Optional Field (messageText) (Can be skipped, if the value is null) - var messageText BACnetContextTagCharacterString = nil - if m.GetMessageText() != nil { - if pushErr := writeBuffer.PushContext("messageText"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for messageText") - } - messageText = m.GetMessageText() - _messageTextErr := writeBuffer.WriteSerializable(ctx, messageText) - if popErr := writeBuffer.PopContext("messageText"); popErr != nil { - return errors.Wrap(popErr, "Error popping for messageText") - } - if _messageTextErr != nil { - return errors.Wrap(_messageTextErr, "Error serializing 'messageText' field") - } - } + // Simple Field (notifyType) + if pushErr := writeBuffer.PushContext("notifyType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for notifyType") + } + _notifyTypeErr := writeBuffer.WriteSerializable(ctx, m.GetNotifyType()) + if popErr := writeBuffer.PopContext("notifyType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for notifyType") + } + if _notifyTypeErr != nil { + return errors.Wrap(_notifyTypeErr, "Error serializing 'notifyType' field") + } - // Simple Field (notifyType) - if pushErr := writeBuffer.PushContext("notifyType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for notifyType") + // Optional Field (ackRequired) (Can be skipped, if the value is null) + var ackRequired BACnetContextTagBoolean = nil + if m.GetAckRequired() != nil { + if pushErr := writeBuffer.PushContext("ackRequired"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for ackRequired") } - _notifyTypeErr := writeBuffer.WriteSerializable(ctx, m.GetNotifyType()) - if popErr := writeBuffer.PopContext("notifyType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for notifyType") + ackRequired = m.GetAckRequired() + _ackRequiredErr := writeBuffer.WriteSerializable(ctx, ackRequired) + if popErr := writeBuffer.PopContext("ackRequired"); popErr != nil { + return errors.Wrap(popErr, "Error popping for ackRequired") } - if _notifyTypeErr != nil { - return errors.Wrap(_notifyTypeErr, "Error serializing 'notifyType' field") + if _ackRequiredErr != nil { + return errors.Wrap(_ackRequiredErr, "Error serializing 'ackRequired' field") } + } - // Optional Field (ackRequired) (Can be skipped, if the value is null) - var ackRequired BACnetContextTagBoolean = nil - if m.GetAckRequired() != nil { - if pushErr := writeBuffer.PushContext("ackRequired"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for ackRequired") - } - ackRequired = m.GetAckRequired() - _ackRequiredErr := writeBuffer.WriteSerializable(ctx, ackRequired) - if popErr := writeBuffer.PopContext("ackRequired"); popErr != nil { - return errors.Wrap(popErr, "Error popping for ackRequired") - } - if _ackRequiredErr != nil { - return errors.Wrap(_ackRequiredErr, "Error serializing 'ackRequired' field") - } + // Optional Field (fromState) (Can be skipped, if the value is null) + var fromState BACnetEventStateTagged = nil + if m.GetFromState() != nil { + if pushErr := writeBuffer.PushContext("fromState"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for fromState") } - - // Optional Field (fromState) (Can be skipped, if the value is null) - var fromState BACnetEventStateTagged = nil - if m.GetFromState() != nil { - if pushErr := writeBuffer.PushContext("fromState"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for fromState") - } - fromState = m.GetFromState() - _fromStateErr := writeBuffer.WriteSerializable(ctx, fromState) - if popErr := writeBuffer.PopContext("fromState"); popErr != nil { - return errors.Wrap(popErr, "Error popping for fromState") - } - if _fromStateErr != nil { - return errors.Wrap(_fromStateErr, "Error serializing 'fromState' field") - } + fromState = m.GetFromState() + _fromStateErr := writeBuffer.WriteSerializable(ctx, fromState) + if popErr := writeBuffer.PopContext("fromState"); popErr != nil { + return errors.Wrap(popErr, "Error popping for fromState") } - - // Simple Field (toState) - if pushErr := writeBuffer.PushContext("toState"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for toState") + if _fromStateErr != nil { + return errors.Wrap(_fromStateErr, "Error serializing 'fromState' field") } - _toStateErr := writeBuffer.WriteSerializable(ctx, m.GetToState()) - if popErr := writeBuffer.PopContext("toState"); popErr != nil { - return errors.Wrap(popErr, "Error popping for toState") + } + + // Simple Field (toState) + if pushErr := writeBuffer.PushContext("toState"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for toState") + } + _toStateErr := writeBuffer.WriteSerializable(ctx, m.GetToState()) + if popErr := writeBuffer.PopContext("toState"); popErr != nil { + return errors.Wrap(popErr, "Error popping for toState") + } + if _toStateErr != nil { + return errors.Wrap(_toStateErr, "Error serializing 'toState' field") + } + + // Optional Field (eventValues) (Can be skipped, if the value is null) + var eventValues BACnetNotificationParameters = nil + if m.GetEventValues() != nil { + if pushErr := writeBuffer.PushContext("eventValues"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for eventValues") } - if _toStateErr != nil { - return errors.Wrap(_toStateErr, "Error serializing 'toState' field") + eventValues = m.GetEventValues() + _eventValuesErr := writeBuffer.WriteSerializable(ctx, eventValues) + if popErr := writeBuffer.PopContext("eventValues"); popErr != nil { + return errors.Wrap(popErr, "Error popping for eventValues") } - - // Optional Field (eventValues) (Can be skipped, if the value is null) - var eventValues BACnetNotificationParameters = nil - if m.GetEventValues() != nil { - if pushErr := writeBuffer.PushContext("eventValues"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for eventValues") - } - eventValues = m.GetEventValues() - _eventValuesErr := writeBuffer.WriteSerializable(ctx, eventValues) - if popErr := writeBuffer.PopContext("eventValues"); popErr != nil { - return errors.Wrap(popErr, "Error popping for eventValues") - } - if _eventValuesErr != nil { - return errors.Wrap(_eventValuesErr, "Error serializing 'eventValues' field") - } + if _eventValuesErr != nil { + return errors.Wrap(_eventValuesErr, "Error serializing 'eventValues' field") } + } if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestConfirmedEventNotification"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConfirmedServiceRequestConfirmedEventNotification") @@ -704,6 +707,7 @@ func (m *_BACnetConfirmedServiceRequestConfirmedEventNotification) SerializeWith return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConfirmedServiceRequestConfirmedEventNotification) isBACnetConfirmedServiceRequestConfirmedEventNotification() bool { return true } @@ -718,3 +722,6 @@ func (m *_BACnetConfirmedServiceRequestConfirmedEventNotification) String() stri } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestConfirmedPrivateTransfer.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestConfirmedPrivateTransfer.go index ef39107a9b8..5f1373c5a80 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestConfirmedPrivateTransfer.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestConfirmedPrivateTransfer.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestConfirmedPrivateTransfer is the corresponding interface of BACnetConfirmedServiceRequestConfirmedPrivateTransfer type BACnetConfirmedServiceRequestConfirmedPrivateTransfer interface { @@ -51,32 +53,31 @@ type BACnetConfirmedServiceRequestConfirmedPrivateTransferExactly interface { // _BACnetConfirmedServiceRequestConfirmedPrivateTransfer is the data-structure of this message type _BACnetConfirmedServiceRequestConfirmedPrivateTransfer struct { *_BACnetConfirmedServiceRequest - VendorId BACnetVendorIdTagged - ServiceNumber BACnetContextTagUnsignedInteger - ServiceParameters BACnetConstructedData + VendorId BACnetVendorIdTagged + ServiceNumber BACnetContextTagUnsignedInteger + ServiceParameters BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConfirmedServiceRequestConfirmedPrivateTransfer) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_CONFIRMED_PRIVATE_TRANSFER -} +func (m *_BACnetConfirmedServiceRequestConfirmedPrivateTransfer) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_CONFIRMED_PRIVATE_TRANSFER} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConfirmedServiceRequestConfirmedPrivateTransfer) InitializeParent(parent BACnetConfirmedServiceRequest) { -} +func (m *_BACnetConfirmedServiceRequestConfirmedPrivateTransfer) InitializeParent(parent BACnetConfirmedServiceRequest ) {} -func (m *_BACnetConfirmedServiceRequestConfirmedPrivateTransfer) GetParent() BACnetConfirmedServiceRequest { +func (m *_BACnetConfirmedServiceRequestConfirmedPrivateTransfer) GetParent() BACnetConfirmedServiceRequest { return m._BACnetConfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -99,13 +100,14 @@ func (m *_BACnetConfirmedServiceRequestConfirmedPrivateTransfer) GetServiceParam /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestConfirmedPrivateTransfer factory function for _BACnetConfirmedServiceRequestConfirmedPrivateTransfer -func NewBACnetConfirmedServiceRequestConfirmedPrivateTransfer(vendorId BACnetVendorIdTagged, serviceNumber BACnetContextTagUnsignedInteger, serviceParameters BACnetConstructedData, serviceRequestLength uint32) *_BACnetConfirmedServiceRequestConfirmedPrivateTransfer { +func NewBACnetConfirmedServiceRequestConfirmedPrivateTransfer( vendorId BACnetVendorIdTagged , serviceNumber BACnetContextTagUnsignedInteger , serviceParameters BACnetConstructedData , serviceRequestLength uint32 ) *_BACnetConfirmedServiceRequestConfirmedPrivateTransfer { _result := &_BACnetConfirmedServiceRequestConfirmedPrivateTransfer{ - VendorId: vendorId, - ServiceNumber: serviceNumber, - ServiceParameters: serviceParameters, - _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), + VendorId: vendorId, + ServiceNumber: serviceNumber, + ServiceParameters: serviceParameters, + _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), } _result._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _result return _result @@ -113,7 +115,7 @@ func NewBACnetConfirmedServiceRequestConfirmedPrivateTransfer(vendorId BACnetVen // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestConfirmedPrivateTransfer(structType interface{}) BACnetConfirmedServiceRequestConfirmedPrivateTransfer { - if casted, ok := structType.(BACnetConfirmedServiceRequestConfirmedPrivateTransfer); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestConfirmedPrivateTransfer); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestConfirmedPrivateTransfer); ok { @@ -143,6 +145,7 @@ func (m *_BACnetConfirmedServiceRequestConfirmedPrivateTransfer) GetLengthInBits return lengthInBits } + func (m *_BACnetConfirmedServiceRequestConfirmedPrivateTransfer) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -164,7 +167,7 @@ func BACnetConfirmedServiceRequestConfirmedPrivateTransferParseWithBuffer(ctx co if pullErr := readBuffer.PullContext("vendorId"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for vendorId") } - _vendorId, _vendorIdErr := BACnetVendorIdTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_vendorId, _vendorIdErr := BACnetVendorIdTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _vendorIdErr != nil { return nil, errors.Wrap(_vendorIdErr, "Error parsing 'vendorId' field of BACnetConfirmedServiceRequestConfirmedPrivateTransfer") } @@ -177,7 +180,7 @@ func BACnetConfirmedServiceRequestConfirmedPrivateTransferParseWithBuffer(ctx co if pullErr := readBuffer.PullContext("serviceNumber"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for serviceNumber") } - _serviceNumber, _serviceNumberErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_serviceNumber, _serviceNumberErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _serviceNumberErr != nil { return nil, errors.Wrap(_serviceNumberErr, "Error parsing 'serviceNumber' field of BACnetConfirmedServiceRequestConfirmedPrivateTransfer") } @@ -188,12 +191,12 @@ func BACnetConfirmedServiceRequestConfirmedPrivateTransferParseWithBuffer(ctx co // Optional Field (serviceParameters) (Can be skipped, if a given expression evaluates to false) var serviceParameters BACnetConstructedData = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("serviceParameters"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for serviceParameters") } - _val, _err := BACnetConstructedDataParseWithBuffer(ctx, readBuffer, uint8(2), BACnetObjectType_VENDOR_PROPRIETARY_VALUE, BACnetPropertyIdentifier_VENDOR_PROPRIETARY_VALUE, nil) +_val, _err := BACnetConstructedDataParseWithBuffer(ctx, readBuffer , uint8(2) , BACnetObjectType_VENDOR_PROPRIETARY_VALUE , BACnetPropertyIdentifier_VENDOR_PROPRIETARY_VALUE , nil ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -217,8 +220,8 @@ func BACnetConfirmedServiceRequestConfirmedPrivateTransferParseWithBuffer(ctx co _BACnetConfirmedServiceRequest: &_BACnetConfirmedServiceRequest{ ServiceRequestLength: serviceRequestLength, }, - VendorId: vendorId, - ServiceNumber: serviceNumber, + VendorId: vendorId, + ServiceNumber: serviceNumber, ServiceParameters: serviceParameters, } _child._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _child @@ -241,45 +244,45 @@ func (m *_BACnetConfirmedServiceRequestConfirmedPrivateTransfer) SerializeWithWr return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestConfirmedPrivateTransfer") } - // Simple Field (vendorId) - if pushErr := writeBuffer.PushContext("vendorId"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for vendorId") - } - _vendorIdErr := writeBuffer.WriteSerializable(ctx, m.GetVendorId()) - if popErr := writeBuffer.PopContext("vendorId"); popErr != nil { - return errors.Wrap(popErr, "Error popping for vendorId") - } - if _vendorIdErr != nil { - return errors.Wrap(_vendorIdErr, "Error serializing 'vendorId' field") - } + // Simple Field (vendorId) + if pushErr := writeBuffer.PushContext("vendorId"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for vendorId") + } + _vendorIdErr := writeBuffer.WriteSerializable(ctx, m.GetVendorId()) + if popErr := writeBuffer.PopContext("vendorId"); popErr != nil { + return errors.Wrap(popErr, "Error popping for vendorId") + } + if _vendorIdErr != nil { + return errors.Wrap(_vendorIdErr, "Error serializing 'vendorId' field") + } - // Simple Field (serviceNumber) - if pushErr := writeBuffer.PushContext("serviceNumber"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for serviceNumber") + // Simple Field (serviceNumber) + if pushErr := writeBuffer.PushContext("serviceNumber"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for serviceNumber") + } + _serviceNumberErr := writeBuffer.WriteSerializable(ctx, m.GetServiceNumber()) + if popErr := writeBuffer.PopContext("serviceNumber"); popErr != nil { + return errors.Wrap(popErr, "Error popping for serviceNumber") + } + if _serviceNumberErr != nil { + return errors.Wrap(_serviceNumberErr, "Error serializing 'serviceNumber' field") + } + + // Optional Field (serviceParameters) (Can be skipped, if the value is null) + var serviceParameters BACnetConstructedData = nil + if m.GetServiceParameters() != nil { + if pushErr := writeBuffer.PushContext("serviceParameters"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for serviceParameters") } - _serviceNumberErr := writeBuffer.WriteSerializable(ctx, m.GetServiceNumber()) - if popErr := writeBuffer.PopContext("serviceNumber"); popErr != nil { - return errors.Wrap(popErr, "Error popping for serviceNumber") + serviceParameters = m.GetServiceParameters() + _serviceParametersErr := writeBuffer.WriteSerializable(ctx, serviceParameters) + if popErr := writeBuffer.PopContext("serviceParameters"); popErr != nil { + return errors.Wrap(popErr, "Error popping for serviceParameters") } - if _serviceNumberErr != nil { - return errors.Wrap(_serviceNumberErr, "Error serializing 'serviceNumber' field") - } - - // Optional Field (serviceParameters) (Can be skipped, if the value is null) - var serviceParameters BACnetConstructedData = nil - if m.GetServiceParameters() != nil { - if pushErr := writeBuffer.PushContext("serviceParameters"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for serviceParameters") - } - serviceParameters = m.GetServiceParameters() - _serviceParametersErr := writeBuffer.WriteSerializable(ctx, serviceParameters) - if popErr := writeBuffer.PopContext("serviceParameters"); popErr != nil { - return errors.Wrap(popErr, "Error popping for serviceParameters") - } - if _serviceParametersErr != nil { - return errors.Wrap(_serviceParametersErr, "Error serializing 'serviceParameters' field") - } + if _serviceParametersErr != nil { + return errors.Wrap(_serviceParametersErr, "Error serializing 'serviceParameters' field") } + } if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestConfirmedPrivateTransfer"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConfirmedServiceRequestConfirmedPrivateTransfer") @@ -289,6 +292,7 @@ func (m *_BACnetConfirmedServiceRequestConfirmedPrivateTransfer) SerializeWithWr return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConfirmedServiceRequestConfirmedPrivateTransfer) isBACnetConfirmedServiceRequestConfirmedPrivateTransfer() bool { return true } @@ -303,3 +307,6 @@ func (m *_BACnetConfirmedServiceRequestConfirmedPrivateTransfer) String() string } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestConfirmedTextMessage.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestConfirmedTextMessage.go index 0cc87ad3043..d1fd9464c47 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestConfirmedTextMessage.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestConfirmedTextMessage.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestConfirmedTextMessage is the corresponding interface of BACnetConfirmedServiceRequestConfirmedTextMessage type BACnetConfirmedServiceRequestConfirmedTextMessage interface { @@ -53,33 +55,32 @@ type BACnetConfirmedServiceRequestConfirmedTextMessageExactly interface { // _BACnetConfirmedServiceRequestConfirmedTextMessage is the data-structure of this message type _BACnetConfirmedServiceRequestConfirmedTextMessage struct { *_BACnetConfirmedServiceRequest - TextMessageSourceDevice BACnetContextTagObjectIdentifier - MessageClass BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass - MessagePriority BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged - Message BACnetContextTagCharacterString + TextMessageSourceDevice BACnetContextTagObjectIdentifier + MessageClass BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass + MessagePriority BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged + Message BACnetContextTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConfirmedServiceRequestConfirmedTextMessage) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_CONFIRMED_TEXT_MESSAGE -} +func (m *_BACnetConfirmedServiceRequestConfirmedTextMessage) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_CONFIRMED_TEXT_MESSAGE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConfirmedServiceRequestConfirmedTextMessage) InitializeParent(parent BACnetConfirmedServiceRequest) { -} +func (m *_BACnetConfirmedServiceRequestConfirmedTextMessage) InitializeParent(parent BACnetConfirmedServiceRequest ) {} -func (m *_BACnetConfirmedServiceRequestConfirmedTextMessage) GetParent() BACnetConfirmedServiceRequest { +func (m *_BACnetConfirmedServiceRequestConfirmedTextMessage) GetParent() BACnetConfirmedServiceRequest { return m._BACnetConfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -106,14 +107,15 @@ func (m *_BACnetConfirmedServiceRequestConfirmedTextMessage) GetMessage() BACnet /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestConfirmedTextMessage factory function for _BACnetConfirmedServiceRequestConfirmedTextMessage -func NewBACnetConfirmedServiceRequestConfirmedTextMessage(textMessageSourceDevice BACnetContextTagObjectIdentifier, messageClass BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass, messagePriority BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged, message BACnetContextTagCharacterString, serviceRequestLength uint32) *_BACnetConfirmedServiceRequestConfirmedTextMessage { +func NewBACnetConfirmedServiceRequestConfirmedTextMessage( textMessageSourceDevice BACnetContextTagObjectIdentifier , messageClass BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass , messagePriority BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged , message BACnetContextTagCharacterString , serviceRequestLength uint32 ) *_BACnetConfirmedServiceRequestConfirmedTextMessage { _result := &_BACnetConfirmedServiceRequestConfirmedTextMessage{ - TextMessageSourceDevice: textMessageSourceDevice, - MessageClass: messageClass, - MessagePriority: messagePriority, - Message: message, - _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), + TextMessageSourceDevice: textMessageSourceDevice, + MessageClass: messageClass, + MessagePriority: messagePriority, + Message: message, + _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), } _result._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _result return _result @@ -121,7 +123,7 @@ func NewBACnetConfirmedServiceRequestConfirmedTextMessage(textMessageSourceDevic // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestConfirmedTextMessage(structType interface{}) BACnetConfirmedServiceRequestConfirmedTextMessage { - if casted, ok := structType.(BACnetConfirmedServiceRequestConfirmedTextMessage); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestConfirmedTextMessage); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestConfirmedTextMessage); ok { @@ -154,6 +156,7 @@ func (m *_BACnetConfirmedServiceRequestConfirmedTextMessage) GetLengthInBits(ctx return lengthInBits } + func (m *_BACnetConfirmedServiceRequestConfirmedTextMessage) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -175,7 +178,7 @@ func BACnetConfirmedServiceRequestConfirmedTextMessageParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("textMessageSourceDevice"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for textMessageSourceDevice") } - _textMessageSourceDevice, _textMessageSourceDeviceErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER)) +_textMessageSourceDevice, _textMessageSourceDeviceErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_BACNET_OBJECT_IDENTIFIER ) ) if _textMessageSourceDeviceErr != nil { return nil, errors.Wrap(_textMessageSourceDeviceErr, "Error parsing 'textMessageSourceDevice' field of BACnetConfirmedServiceRequestConfirmedTextMessage") } @@ -186,12 +189,12 @@ func BACnetConfirmedServiceRequestConfirmedTextMessageParseWithBuffer(ctx contex // Optional Field (messageClass) (Can be skipped, if a given expression evaluates to false) var messageClass BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("messageClass"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for messageClass") } - _val, _err := BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassParseWithBuffer(ctx, readBuffer, uint8(1)) +_val, _err := BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassParseWithBuffer(ctx, readBuffer , uint8(1) ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -210,7 +213,7 @@ func BACnetConfirmedServiceRequestConfirmedTextMessageParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("messagePriority"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for messagePriority") } - _messagePriority, _messagePriorityErr := BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_messagePriority, _messagePriorityErr := BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _messagePriorityErr != nil { return nil, errors.Wrap(_messagePriorityErr, "Error parsing 'messagePriority' field of BACnetConfirmedServiceRequestConfirmedTextMessage") } @@ -223,7 +226,7 @@ func BACnetConfirmedServiceRequestConfirmedTextMessageParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("message"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for message") } - _message, _messageErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(3)), BACnetDataType(BACnetDataType_CHARACTER_STRING)) +_message, _messageErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(3) ) , BACnetDataType( BACnetDataType_CHARACTER_STRING ) ) if _messageErr != nil { return nil, errors.Wrap(_messageErr, "Error parsing 'message' field of BACnetConfirmedServiceRequestConfirmedTextMessage") } @@ -242,9 +245,9 @@ func BACnetConfirmedServiceRequestConfirmedTextMessageParseWithBuffer(ctx contex ServiceRequestLength: serviceRequestLength, }, TextMessageSourceDevice: textMessageSourceDevice, - MessageClass: messageClass, - MessagePriority: messagePriority, - Message: message, + MessageClass: messageClass, + MessagePriority: messagePriority, + Message: message, } _child._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _child return _child, nil @@ -266,57 +269,57 @@ func (m *_BACnetConfirmedServiceRequestConfirmedTextMessage) SerializeWithWriteB return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestConfirmedTextMessage") } - // Simple Field (textMessageSourceDevice) - if pushErr := writeBuffer.PushContext("textMessageSourceDevice"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for textMessageSourceDevice") - } - _textMessageSourceDeviceErr := writeBuffer.WriteSerializable(ctx, m.GetTextMessageSourceDevice()) - if popErr := writeBuffer.PopContext("textMessageSourceDevice"); popErr != nil { - return errors.Wrap(popErr, "Error popping for textMessageSourceDevice") - } - if _textMessageSourceDeviceErr != nil { - return errors.Wrap(_textMessageSourceDeviceErr, "Error serializing 'textMessageSourceDevice' field") - } - - // Optional Field (messageClass) (Can be skipped, if the value is null) - var messageClass BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass = nil - if m.GetMessageClass() != nil { - if pushErr := writeBuffer.PushContext("messageClass"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for messageClass") - } - messageClass = m.GetMessageClass() - _messageClassErr := writeBuffer.WriteSerializable(ctx, messageClass) - if popErr := writeBuffer.PopContext("messageClass"); popErr != nil { - return errors.Wrap(popErr, "Error popping for messageClass") - } - if _messageClassErr != nil { - return errors.Wrap(_messageClassErr, "Error serializing 'messageClass' field") - } - } + // Simple Field (textMessageSourceDevice) + if pushErr := writeBuffer.PushContext("textMessageSourceDevice"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for textMessageSourceDevice") + } + _textMessageSourceDeviceErr := writeBuffer.WriteSerializable(ctx, m.GetTextMessageSourceDevice()) + if popErr := writeBuffer.PopContext("textMessageSourceDevice"); popErr != nil { + return errors.Wrap(popErr, "Error popping for textMessageSourceDevice") + } + if _textMessageSourceDeviceErr != nil { + return errors.Wrap(_textMessageSourceDeviceErr, "Error serializing 'textMessageSourceDevice' field") + } - // Simple Field (messagePriority) - if pushErr := writeBuffer.PushContext("messagePriority"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for messagePriority") + // Optional Field (messageClass) (Can be skipped, if the value is null) + var messageClass BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass = nil + if m.GetMessageClass() != nil { + if pushErr := writeBuffer.PushContext("messageClass"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for messageClass") } - _messagePriorityErr := writeBuffer.WriteSerializable(ctx, m.GetMessagePriority()) - if popErr := writeBuffer.PopContext("messagePriority"); popErr != nil { - return errors.Wrap(popErr, "Error popping for messagePriority") + messageClass = m.GetMessageClass() + _messageClassErr := writeBuffer.WriteSerializable(ctx, messageClass) + if popErr := writeBuffer.PopContext("messageClass"); popErr != nil { + return errors.Wrap(popErr, "Error popping for messageClass") } - if _messagePriorityErr != nil { - return errors.Wrap(_messagePriorityErr, "Error serializing 'messagePriority' field") + if _messageClassErr != nil { + return errors.Wrap(_messageClassErr, "Error serializing 'messageClass' field") } + } - // Simple Field (message) - if pushErr := writeBuffer.PushContext("message"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for message") - } - _messageErr := writeBuffer.WriteSerializable(ctx, m.GetMessage()) - if popErr := writeBuffer.PopContext("message"); popErr != nil { - return errors.Wrap(popErr, "Error popping for message") - } - if _messageErr != nil { - return errors.Wrap(_messageErr, "Error serializing 'message' field") - } + // Simple Field (messagePriority) + if pushErr := writeBuffer.PushContext("messagePriority"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for messagePriority") + } + _messagePriorityErr := writeBuffer.WriteSerializable(ctx, m.GetMessagePriority()) + if popErr := writeBuffer.PopContext("messagePriority"); popErr != nil { + return errors.Wrap(popErr, "Error popping for messagePriority") + } + if _messagePriorityErr != nil { + return errors.Wrap(_messagePriorityErr, "Error serializing 'messagePriority' field") + } + + // Simple Field (message) + if pushErr := writeBuffer.PushContext("message"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for message") + } + _messageErr := writeBuffer.WriteSerializable(ctx, m.GetMessage()) + if popErr := writeBuffer.PopContext("message"); popErr != nil { + return errors.Wrap(popErr, "Error popping for message") + } + if _messageErr != nil { + return errors.Wrap(_messageErr, "Error serializing 'message' field") + } if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestConfirmedTextMessage"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConfirmedServiceRequestConfirmedTextMessage") @@ -326,6 +329,7 @@ func (m *_BACnetConfirmedServiceRequestConfirmedTextMessage) SerializeWithWriteB return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConfirmedServiceRequestConfirmedTextMessage) isBACnetConfirmedServiceRequestConfirmedTextMessage() bool { return true } @@ -340,3 +344,6 @@ func (m *_BACnetConfirmedServiceRequestConfirmedTextMessage) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass.go index e37d3036414..592c2aefad8 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass is the corresponding interface of BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass type BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass interface { @@ -51,9 +53,9 @@ type BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassExactly interf // _BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass is the data-structure of this message type _BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass struct { _BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassChildRequirements - OpeningTag BACnetOpeningTag - PeekedTagHeader BACnetTagHeader - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + PeekedTagHeader BACnetTagHeader + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 @@ -64,6 +66,7 @@ type _BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassChildRequirem GetLengthInBits(ctx context.Context) uint16 } + type BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass, serializeChildFunction func() error) error GetTypeName() string @@ -71,13 +74,12 @@ type BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassParent interfa type BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassChild interface { utils.Serializable - InitializeParent(parent BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) +InitializeParent(parent BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) GetParent() *BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass GetTypeName() string BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -115,14 +117,15 @@ func (m *_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass) GetPeek /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestConfirmedTextMessageMessageClass factory function for _BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass -func NewBACnetConfirmedServiceRequestConfirmedTextMessageMessageClass(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass { - return &_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass{OpeningTag: openingTag, PeekedTagHeader: peekedTagHeader, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetConfirmedServiceRequestConfirmedTextMessageMessageClass( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass { +return &_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass{ OpeningTag: openingTag , PeekedTagHeader: peekedTagHeader , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestConfirmedTextMessageMessageClass(structType interface{}) BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass { - if casted, ok := structType.(BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass); ok { @@ -135,6 +138,7 @@ func (m *_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass) GetType return "BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass" } + func (m *_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -170,7 +174,7 @@ func BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassParseWithBuffe if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass") } @@ -179,13 +183,13 @@ func BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassParseWithBuffe return nil, errors.Wrap(closeErr, "Error closing for openingTag") } - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Virtual field _peekedTagNumber := peekedTagHeader.GetActualTagNumber() @@ -195,16 +199,16 @@ func BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassParseWithBuffe // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassChildSerializeRequirement interface { BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass - InitializeParent(BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass, BACnetOpeningTag, BACnetTagHeader, BACnetClosingTag) + InitializeParent(BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass, BACnetOpeningTag, BACnetTagHeader, BACnetClosingTag) GetParent() BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass } var _childTemp interface{} var _child BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassChildSerializeRequirement var typeSwitchError error switch { - case peekedTagNumber == uint8(0): // BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric +case peekedTagNumber == uint8(0) : // BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric _childTemp, typeSwitchError = BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumericParseWithBuffer(ctx, readBuffer, tagNumber) - case peekedTagNumber == uint8(1): // BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter +case peekedTagNumber == uint8(1) : // BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter _childTemp, typeSwitchError = BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacterParseWithBuffer(ctx, readBuffer, tagNumber) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedTagNumber=%v]", peekedTagNumber) @@ -218,7 +222,7 @@ func BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassParseWithBuffe if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass") } @@ -232,7 +236,7 @@ func BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassParseWithBuffe } // Finish initializing - _child.InitializeParent(_child, openingTag, peekedTagHeader, closingTag) +_child.InitializeParent(_child , openingTag , peekedTagHeader , closingTag ) return _child, nil } @@ -242,7 +246,7 @@ func (pm *_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass) Serial _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass") } @@ -285,13 +289,13 @@ func (pm *_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass) Serial return nil } + //// // Arguments Getter func (m *_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -309,3 +313,6 @@ func (m *_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass) String( } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter.go index a844e4916fd..a1d566e29e6 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter is the corresponding interface of BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter type BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter interface { @@ -46,9 +48,11 @@ type BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacterExact // _BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter is the data-structure of this message type _BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter struct { *_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass - CharacterValue BACnetContextTagCharacterString + CharacterValue BACnetContextTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,16 +63,14 @@ type _BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter str /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter) InitializeParent(parent BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter) InitializeParent(parent BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter) GetParent() BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass { +func (m *_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter) GetParent() BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass { return m._BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter factory function for _BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter -func NewBACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter(characterValue BACnetContextTagCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter { +func NewBACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter( characterValue BACnetContextTagCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter { _result := &_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter{ CharacterValue: characterValue, - _BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass: NewBACnetConfirmedServiceRequestConfirmedTextMessageMessageClass(openingTag, peekedTagHeader, closingTag, tagNumber), + _BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass: NewBACnetConfirmedServiceRequestConfirmedTextMessageMessageClass(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass._BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter(c // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter(structType interface{}) BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter { - if casted, ok := structType.(BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter); ok { @@ -117,6 +120,7 @@ func (m *_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter return lengthInBits } + func (m *_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacterParse if pullErr := readBuffer.PullContext("characterValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for characterValue") } - _characterValue, _characterValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_CHARACTER_STRING)) +_characterValue, _characterValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_CHARACTER_STRING ) ) if _characterValueErr != nil { return nil, errors.Wrap(_characterValueErr, "Error parsing 'characterValue' field of BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter") } @@ -178,17 +182,17 @@ func (m *_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter") } - // Simple Field (characterValue) - if pushErr := writeBuffer.PushContext("characterValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for characterValue") - } - _characterValueErr := writeBuffer.WriteSerializable(ctx, m.GetCharacterValue()) - if popErr := writeBuffer.PopContext("characterValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for characterValue") - } - if _characterValueErr != nil { - return errors.Wrap(_characterValueErr, "Error serializing 'characterValue' field") - } + // Simple Field (characterValue) + if pushErr := writeBuffer.PushContext("characterValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for characterValue") + } + _characterValueErr := writeBuffer.WriteSerializable(ctx, m.GetCharacterValue()) + if popErr := writeBuffer.PopContext("characterValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for characterValue") + } + if _characterValueErr != nil { + return errors.Wrap(_characterValueErr, "Error serializing 'characterValue' field") + } if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter") @@ -198,6 +202,7 @@ func (m *_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter) isBACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassCharacter } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric.go index 56cf7dc3b17..29b8963f408 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric is the corresponding interface of BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric type BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric interface { @@ -46,9 +48,11 @@ type BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumericExactly // _BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric is the data-structure of this message type _BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric struct { *_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass - NumericValue BACnetContextTagUnsignedInteger + NumericValue BACnetContextTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,16 +63,14 @@ type _BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric struc /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric) InitializeParent(parent BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric) InitializeParent(parent BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric) GetParent() BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass { +func (m *_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric) GetParent() BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass { return m._BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric) /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric factory function for _BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric -func NewBACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric(numericValue BACnetContextTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric { +func NewBACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric( numericValue BACnetContextTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric { _result := &_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric{ NumericValue: numericValue, - _BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass: NewBACnetConfirmedServiceRequestConfirmedTextMessageMessageClass(openingTag, peekedTagHeader, closingTag, tagNumber), + _BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass: NewBACnetConfirmedServiceRequestConfirmedTextMessageMessageClass(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass._BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric(num // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric(structType interface{}) BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric { - if casted, ok := structType.(BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric); ok { @@ -117,6 +120,7 @@ func (m *_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric) return lengthInBits } + func (m *_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumericParseWi if pullErr := readBuffer.PullContext("numericValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numericValue") } - _numericValue, _numericValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_numericValue, _numericValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _numericValueErr != nil { return nil, errors.Wrap(_numericValueErr, "Error parsing 'numericValue' field of BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric") } @@ -178,17 +182,17 @@ func (m *_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric) return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric") } - // Simple Field (numericValue) - if pushErr := writeBuffer.PushContext("numericValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numericValue") - } - _numericValueErr := writeBuffer.WriteSerializable(ctx, m.GetNumericValue()) - if popErr := writeBuffer.PopContext("numericValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numericValue") - } - if _numericValueErr != nil { - return errors.Wrap(_numericValueErr, "Error serializing 'numericValue' field") - } + // Simple Field (numericValue) + if pushErr := writeBuffer.PushContext("numericValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numericValue") + } + _numericValueErr := writeBuffer.WriteSerializable(ctx, m.GetNumericValue()) + if popErr := writeBuffer.PopContext("numericValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numericValue") + } + if _numericValueErr != nil { + return errors.Wrap(_numericValueErr, "Error serializing 'numericValue' field") + } if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric") @@ -198,6 +202,7 @@ func (m *_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric) return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric) isBACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassNumeric) } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriority.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriority.go index ee227bad614..81c8d979949 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriority.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriority.go @@ -34,7 +34,7 @@ type IBACnetConfirmedServiceRequestConfirmedTextMessageMessagePriority interface utils.Serializable } -const ( +const( BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriority_NORMAL BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriority = 0 BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriority_URGENT BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriority = 1 ) @@ -43,7 +43,7 @@ var BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityValues []BAC func init() { _ = errors.New - BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityValues = []BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriority{ + BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityValues = []BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriority { BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriority_NORMAL, BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriority_URGENT, } @@ -51,10 +51,10 @@ func init() { func BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityByValue(value uint8) (enum BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriority, ok bool) { switch value { - case 0: - return BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriority_NORMAL, true - case 1: - return BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriority_URGENT, true + case 0: + return BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriority_NORMAL, true + case 1: + return BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriority_URGENT, true } return 0, false } @@ -69,13 +69,13 @@ func BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityByName(valu return 0, false } -func BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityKnows(value uint8) bool { +func BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityKnows(value uint8) bool { for _, typeValue := range BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetConfirmedServiceRequestConfirmedTextMessageMessagePriority(structType interface{}) BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriority { @@ -139,3 +139,4 @@ func (e BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriority) PLC4XE func (e BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriority) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged.go index 115e1305299..608f0336604 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged is the corresponding interface of BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged type BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged interface { @@ -46,14 +48,15 @@ type BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTaggedExact // _BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged is the data-structure of this message type _BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged struct { - Header BACnetTagHeader - Value BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriority + Header BACnetTagHeader + Value BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriority // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged factory function for _BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged -func NewBACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged(header BACnetTagHeader, value BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriority, tagNumber uint8, tagClass TagClass) *_BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged { - return &_BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged( header BACnetTagHeader , value BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriority , tagNumber uint8 , tagClass TagClass ) *_BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged { +return &_BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged(structType interface{}) BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged { - if casted, ok := structType.(BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged); ok { @@ -104,6 +108,7 @@ func (m *_BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged return lengthInBits } + func (m *_BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTaggedParse if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged") } @@ -135,12 +140,12 @@ func BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTaggedParse } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTaggedParse } var value BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriority if _value != nil { - value = _value.(BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriority) + value = _value.(BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriority) } if closeErr := readBuffer.CloseContext("BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTaggedParse // Create the instance return &_BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged func (m *_BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged") } @@ -206,6 +211,7 @@ func (m *_BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged func (m *_BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestCreateObject.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestCreateObject.go index 065dbc5a402..fc7aea88de8 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestCreateObject.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestCreateObject.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestCreateObject is the corresponding interface of BACnetConfirmedServiceRequestCreateObject type BACnetConfirmedServiceRequestCreateObject interface { @@ -49,31 +51,30 @@ type BACnetConfirmedServiceRequestCreateObjectExactly interface { // _BACnetConfirmedServiceRequestCreateObject is the data-structure of this message type _BACnetConfirmedServiceRequestCreateObject struct { *_BACnetConfirmedServiceRequest - ObjectSpecifier BACnetConfirmedServiceRequestCreateObjectObjectSpecifier - ListOfValues BACnetPropertyValues + ObjectSpecifier BACnetConfirmedServiceRequestCreateObjectObjectSpecifier + ListOfValues BACnetPropertyValues } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConfirmedServiceRequestCreateObject) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_CREATE_OBJECT -} +func (m *_BACnetConfirmedServiceRequestCreateObject) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_CREATE_OBJECT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConfirmedServiceRequestCreateObject) InitializeParent(parent BACnetConfirmedServiceRequest) { -} +func (m *_BACnetConfirmedServiceRequestCreateObject) InitializeParent(parent BACnetConfirmedServiceRequest ) {} -func (m *_BACnetConfirmedServiceRequestCreateObject) GetParent() BACnetConfirmedServiceRequest { +func (m *_BACnetConfirmedServiceRequestCreateObject) GetParent() BACnetConfirmedServiceRequest { return m._BACnetConfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,12 +93,13 @@ func (m *_BACnetConfirmedServiceRequestCreateObject) GetListOfValues() BACnetPro /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestCreateObject factory function for _BACnetConfirmedServiceRequestCreateObject -func NewBACnetConfirmedServiceRequestCreateObject(objectSpecifier BACnetConfirmedServiceRequestCreateObjectObjectSpecifier, listOfValues BACnetPropertyValues, serviceRequestLength uint32) *_BACnetConfirmedServiceRequestCreateObject { +func NewBACnetConfirmedServiceRequestCreateObject( objectSpecifier BACnetConfirmedServiceRequestCreateObjectObjectSpecifier , listOfValues BACnetPropertyValues , serviceRequestLength uint32 ) *_BACnetConfirmedServiceRequestCreateObject { _result := &_BACnetConfirmedServiceRequestCreateObject{ - ObjectSpecifier: objectSpecifier, - ListOfValues: listOfValues, - _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), + ObjectSpecifier: objectSpecifier, + ListOfValues: listOfValues, + _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), } _result._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _result return _result @@ -105,7 +107,7 @@ func NewBACnetConfirmedServiceRequestCreateObject(objectSpecifier BACnetConfirme // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestCreateObject(structType interface{}) BACnetConfirmedServiceRequestCreateObject { - if casted, ok := structType.(BACnetConfirmedServiceRequestCreateObject); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestCreateObject); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestCreateObject); ok { @@ -132,6 +134,7 @@ func (m *_BACnetConfirmedServiceRequestCreateObject) GetLengthInBits(ctx context return lengthInBits } + func (m *_BACnetConfirmedServiceRequestCreateObject) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -153,7 +156,7 @@ func BACnetConfirmedServiceRequestCreateObjectParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("objectSpecifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for objectSpecifier") } - _objectSpecifier, _objectSpecifierErr := BACnetConfirmedServiceRequestCreateObjectObjectSpecifierParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_objectSpecifier, _objectSpecifierErr := BACnetConfirmedServiceRequestCreateObjectObjectSpecifierParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _objectSpecifierErr != nil { return nil, errors.Wrap(_objectSpecifierErr, "Error parsing 'objectSpecifier' field of BACnetConfirmedServiceRequestCreateObject") } @@ -164,12 +167,12 @@ func BACnetConfirmedServiceRequestCreateObjectParseWithBuffer(ctx context.Contex // Optional Field (listOfValues) (Can be skipped, if a given expression evaluates to false) var listOfValues BACnetPropertyValues = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("listOfValues"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for listOfValues") } - _val, _err := BACnetPropertyValuesParseWithBuffer(ctx, readBuffer, uint8(1), CastBACnetObjectType(utils.InlineIf(objectSpecifier.GetIsObjectType(), func() interface{} { return CastBACnetObjectType(objectSpecifier.GetObjectType()) }, func() interface{} { return CastBACnetObjectType(objectSpecifier.GetObjectIdentifier().GetObjectType()) }))) +_val, _err := BACnetPropertyValuesParseWithBuffer(ctx, readBuffer , uint8(1) , CastBACnetObjectType(utils.InlineIf(objectSpecifier.GetIsObjectType(), func() interface{} {return CastBACnetObjectType(objectSpecifier.GetObjectType())}, func() interface{} {return CastBACnetObjectType(objectSpecifier.GetObjectIdentifier().GetObjectType())})) ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -194,7 +197,7 @@ func BACnetConfirmedServiceRequestCreateObjectParseWithBuffer(ctx context.Contex ServiceRequestLength: serviceRequestLength, }, ObjectSpecifier: objectSpecifier, - ListOfValues: listOfValues, + ListOfValues: listOfValues, } _child._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _child return _child, nil @@ -216,33 +219,33 @@ func (m *_BACnetConfirmedServiceRequestCreateObject) SerializeWithWriteBuffer(ct return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestCreateObject") } - // Simple Field (objectSpecifier) - if pushErr := writeBuffer.PushContext("objectSpecifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for objectSpecifier") - } - _objectSpecifierErr := writeBuffer.WriteSerializable(ctx, m.GetObjectSpecifier()) - if popErr := writeBuffer.PopContext("objectSpecifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for objectSpecifier") + // Simple Field (objectSpecifier) + if pushErr := writeBuffer.PushContext("objectSpecifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for objectSpecifier") + } + _objectSpecifierErr := writeBuffer.WriteSerializable(ctx, m.GetObjectSpecifier()) + if popErr := writeBuffer.PopContext("objectSpecifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for objectSpecifier") + } + if _objectSpecifierErr != nil { + return errors.Wrap(_objectSpecifierErr, "Error serializing 'objectSpecifier' field") + } + + // Optional Field (listOfValues) (Can be skipped, if the value is null) + var listOfValues BACnetPropertyValues = nil + if m.GetListOfValues() != nil { + if pushErr := writeBuffer.PushContext("listOfValues"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for listOfValues") } - if _objectSpecifierErr != nil { - return errors.Wrap(_objectSpecifierErr, "Error serializing 'objectSpecifier' field") + listOfValues = m.GetListOfValues() + _listOfValuesErr := writeBuffer.WriteSerializable(ctx, listOfValues) + if popErr := writeBuffer.PopContext("listOfValues"); popErr != nil { + return errors.Wrap(popErr, "Error popping for listOfValues") } - - // Optional Field (listOfValues) (Can be skipped, if the value is null) - var listOfValues BACnetPropertyValues = nil - if m.GetListOfValues() != nil { - if pushErr := writeBuffer.PushContext("listOfValues"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for listOfValues") - } - listOfValues = m.GetListOfValues() - _listOfValuesErr := writeBuffer.WriteSerializable(ctx, listOfValues) - if popErr := writeBuffer.PopContext("listOfValues"); popErr != nil { - return errors.Wrap(popErr, "Error popping for listOfValues") - } - if _listOfValuesErr != nil { - return errors.Wrap(_listOfValuesErr, "Error serializing 'listOfValues' field") - } + if _listOfValuesErr != nil { + return errors.Wrap(_listOfValuesErr, "Error serializing 'listOfValues' field") } + } if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestCreateObject"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConfirmedServiceRequestCreateObject") @@ -252,6 +255,7 @@ func (m *_BACnetConfirmedServiceRequestCreateObject) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConfirmedServiceRequestCreateObject) isBACnetConfirmedServiceRequestCreateObject() bool { return true } @@ -266,3 +270,6 @@ func (m *_BACnetConfirmedServiceRequestCreateObject) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestCreateObjectObjectSpecifier.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestCreateObjectObjectSpecifier.go index b918ae0ef29..3d1b3f1e20e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestCreateObjectObjectSpecifier.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestCreateObjectObjectSpecifier.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestCreateObjectObjectSpecifier is the corresponding interface of BACnetConfirmedServiceRequestCreateObjectObjectSpecifier type BACnetConfirmedServiceRequestCreateObjectObjectSpecifier interface { @@ -57,15 +59,16 @@ type BACnetConfirmedServiceRequestCreateObjectObjectSpecifierExactly interface { // _BACnetConfirmedServiceRequestCreateObjectObjectSpecifier is the data-structure of this message type _BACnetConfirmedServiceRequestCreateObjectObjectSpecifier struct { - OpeningTag BACnetOpeningTag - RawObjectType BACnetContextTagEnumerated - ObjectIdentifier BACnetContextTagObjectIdentifier - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + RawObjectType BACnetContextTagEnumerated + ObjectIdentifier BACnetContextTagObjectIdentifier + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -103,7 +106,7 @@ func (m *_BACnetConfirmedServiceRequestCreateObjectObjectSpecifier) GetIsObjectT _ = rawObjectType objectIdentifier := m.ObjectIdentifier _ = objectIdentifier - return bool(bool((m.GetRawObjectType()) != (nil))) + return bool(bool(((m.GetRawObjectType())) != (nil))) } func (m *_BACnetConfirmedServiceRequestCreateObjectObjectSpecifier) GetObjectType() BACnetObjectType { @@ -123,7 +126,7 @@ func (m *_BACnetConfirmedServiceRequestCreateObjectObjectSpecifier) GetIsObjectI _ = rawObjectType objectIdentifier := m.ObjectIdentifier _ = objectIdentifier - return bool(bool((m.GetObjectIdentifier()) != (nil))) + return bool(bool(((m.GetObjectIdentifier())) != (nil))) } /////////////////////// @@ -131,14 +134,15 @@ func (m *_BACnetConfirmedServiceRequestCreateObjectObjectSpecifier) GetIsObjectI /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestCreateObjectObjectSpecifier factory function for _BACnetConfirmedServiceRequestCreateObjectObjectSpecifier -func NewBACnetConfirmedServiceRequestCreateObjectObjectSpecifier(openingTag BACnetOpeningTag, rawObjectType BACnetContextTagEnumerated, objectIdentifier BACnetContextTagObjectIdentifier, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetConfirmedServiceRequestCreateObjectObjectSpecifier { - return &_BACnetConfirmedServiceRequestCreateObjectObjectSpecifier{OpeningTag: openingTag, RawObjectType: rawObjectType, ObjectIdentifier: objectIdentifier, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetConfirmedServiceRequestCreateObjectObjectSpecifier( openingTag BACnetOpeningTag , rawObjectType BACnetContextTagEnumerated , objectIdentifier BACnetContextTagObjectIdentifier , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetConfirmedServiceRequestCreateObjectObjectSpecifier { +return &_BACnetConfirmedServiceRequestCreateObjectObjectSpecifier{ OpeningTag: openingTag , RawObjectType: rawObjectType , ObjectIdentifier: objectIdentifier , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestCreateObjectObjectSpecifier(structType interface{}) BACnetConfirmedServiceRequestCreateObjectObjectSpecifier { - if casted, ok := structType.(BACnetConfirmedServiceRequestCreateObjectObjectSpecifier); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestCreateObjectObjectSpecifier); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestCreateObjectObjectSpecifier); ok { @@ -179,6 +183,7 @@ func (m *_BACnetConfirmedServiceRequestCreateObjectObjectSpecifier) GetLengthInB return lengthInBits } + func (m *_BACnetConfirmedServiceRequestCreateObjectObjectSpecifier) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -200,7 +205,7 @@ func BACnetConfirmedServiceRequestCreateObjectObjectSpecifierParseWithBuffer(ctx if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetConfirmedServiceRequestCreateObjectObjectSpecifier") } @@ -211,12 +216,12 @@ func BACnetConfirmedServiceRequestCreateObjectObjectSpecifierParseWithBuffer(ctx // Optional Field (rawObjectType) (Can be skipped, if a given expression evaluates to false) var rawObjectType BACnetContextTagEnumerated = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("rawObjectType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for rawObjectType") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(0), BACnetDataType_ENUMERATED) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(0) , BACnetDataType_ENUMERATED ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -232,7 +237,7 @@ func BACnetConfirmedServiceRequestCreateObjectObjectSpecifierParseWithBuffer(ctx } // Virtual field - _isObjectType := bool((rawObjectType) != (nil)) + _isObjectType := bool(((rawObjectType)) != (nil)) isObjectType := bool(_isObjectType) _ = isObjectType @@ -243,12 +248,12 @@ func BACnetConfirmedServiceRequestCreateObjectObjectSpecifierParseWithBuffer(ctx // Optional Field (objectIdentifier) (Can be skipped, if a given expression evaluates to false) var objectIdentifier BACnetContextTagObjectIdentifier = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("objectIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for objectIdentifier") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(1), BACnetDataType_BACNET_OBJECT_IDENTIFIER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(1) , BACnetDataType_BACNET_OBJECT_IDENTIFIER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -264,12 +269,12 @@ func BACnetConfirmedServiceRequestCreateObjectObjectSpecifierParseWithBuffer(ctx } // Virtual field - _isObjectIdentifier := bool((objectIdentifier) != (nil)) + _isObjectIdentifier := bool(((objectIdentifier)) != (nil)) isObjectIdentifier := bool(_isObjectIdentifier) _ = isObjectIdentifier // Validation - if !(bool(isObjectType) || bool(isObjectIdentifier)) { + if (!(bool(isObjectType) || bool(isObjectIdentifier))) { return nil, errors.WithStack(utils.ParseValidationError{"either we need a objectType or a objectIdentifier"}) } @@ -277,7 +282,7 @@ func BACnetConfirmedServiceRequestCreateObjectObjectSpecifierParseWithBuffer(ctx if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetConfirmedServiceRequestCreateObjectObjectSpecifier") } @@ -292,12 +297,12 @@ func BACnetConfirmedServiceRequestCreateObjectObjectSpecifierParseWithBuffer(ctx // Create the instance return &_BACnetConfirmedServiceRequestCreateObjectObjectSpecifier{ - TagNumber: tagNumber, - OpeningTag: openingTag, - RawObjectType: rawObjectType, - ObjectIdentifier: objectIdentifier, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + RawObjectType: rawObjectType, + ObjectIdentifier: objectIdentifier, + ClosingTag: closingTag, + }, nil } func (m *_BACnetConfirmedServiceRequestCreateObjectObjectSpecifier) Serialize() ([]byte, error) { @@ -311,7 +316,7 @@ func (m *_BACnetConfirmedServiceRequestCreateObjectObjectSpecifier) Serialize() func (m *_BACnetConfirmedServiceRequestCreateObjectObjectSpecifier) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetConfirmedServiceRequestCreateObjectObjectSpecifier"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetConfirmedServiceRequestCreateObjectObjectSpecifier"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestCreateObjectObjectSpecifier") } @@ -389,13 +394,13 @@ func (m *_BACnetConfirmedServiceRequestCreateObjectObjectSpecifier) SerializeWit return nil } + //// // Arguments Getter func (m *_BACnetConfirmedServiceRequestCreateObjectObjectSpecifier) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -413,3 +418,6 @@ func (m *_BACnetConfirmedServiceRequestCreateObjectObjectSpecifier) String() str } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestDeleteObject.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestDeleteObject.go index 50f23b57c7e..5606f24f197 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestDeleteObject.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestDeleteObject.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestDeleteObject is the corresponding interface of BACnetConfirmedServiceRequestDeleteObject type BACnetConfirmedServiceRequestDeleteObject interface { @@ -46,30 +48,29 @@ type BACnetConfirmedServiceRequestDeleteObjectExactly interface { // _BACnetConfirmedServiceRequestDeleteObject is the data-structure of this message type _BACnetConfirmedServiceRequestDeleteObject struct { *_BACnetConfirmedServiceRequest - ObjectIdentifier BACnetApplicationTagObjectIdentifier + ObjectIdentifier BACnetApplicationTagObjectIdentifier } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConfirmedServiceRequestDeleteObject) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_DELETE_OBJECT -} +func (m *_BACnetConfirmedServiceRequestDeleteObject) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_DELETE_OBJECT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConfirmedServiceRequestDeleteObject) InitializeParent(parent BACnetConfirmedServiceRequest) { -} +func (m *_BACnetConfirmedServiceRequestDeleteObject) InitializeParent(parent BACnetConfirmedServiceRequest ) {} -func (m *_BACnetConfirmedServiceRequestDeleteObject) GetParent() BACnetConfirmedServiceRequest { +func (m *_BACnetConfirmedServiceRequestDeleteObject) GetParent() BACnetConfirmedServiceRequest { return m._BACnetConfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -84,11 +85,12 @@ func (m *_BACnetConfirmedServiceRequestDeleteObject) GetObjectIdentifier() BACne /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestDeleteObject factory function for _BACnetConfirmedServiceRequestDeleteObject -func NewBACnetConfirmedServiceRequestDeleteObject(objectIdentifier BACnetApplicationTagObjectIdentifier, serviceRequestLength uint32) *_BACnetConfirmedServiceRequestDeleteObject { +func NewBACnetConfirmedServiceRequestDeleteObject( objectIdentifier BACnetApplicationTagObjectIdentifier , serviceRequestLength uint32 ) *_BACnetConfirmedServiceRequestDeleteObject { _result := &_BACnetConfirmedServiceRequestDeleteObject{ - ObjectIdentifier: objectIdentifier, - _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), + ObjectIdentifier: objectIdentifier, + _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), } _result._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _result return _result @@ -96,7 +98,7 @@ func NewBACnetConfirmedServiceRequestDeleteObject(objectIdentifier BACnetApplica // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestDeleteObject(structType interface{}) BACnetConfirmedServiceRequestDeleteObject { - if casted, ok := structType.(BACnetConfirmedServiceRequestDeleteObject); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestDeleteObject); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestDeleteObject); ok { @@ -118,6 +120,7 @@ func (m *_BACnetConfirmedServiceRequestDeleteObject) GetLengthInBits(ctx context return lengthInBits } + func (m *_BACnetConfirmedServiceRequestDeleteObject) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +142,7 @@ func BACnetConfirmedServiceRequestDeleteObjectParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("objectIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for objectIdentifier") } - _objectIdentifier, _objectIdentifierErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_objectIdentifier, _objectIdentifierErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _objectIdentifierErr != nil { return nil, errors.Wrap(_objectIdentifierErr, "Error parsing 'objectIdentifier' field of BACnetConfirmedServiceRequestDeleteObject") } @@ -179,17 +182,17 @@ func (m *_BACnetConfirmedServiceRequestDeleteObject) SerializeWithWriteBuffer(ct return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestDeleteObject") } - // Simple Field (objectIdentifier) - if pushErr := writeBuffer.PushContext("objectIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for objectIdentifier") - } - _objectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetObjectIdentifier()) - if popErr := writeBuffer.PopContext("objectIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for objectIdentifier") - } - if _objectIdentifierErr != nil { - return errors.Wrap(_objectIdentifierErr, "Error serializing 'objectIdentifier' field") - } + // Simple Field (objectIdentifier) + if pushErr := writeBuffer.PushContext("objectIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for objectIdentifier") + } + _objectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetObjectIdentifier()) + if popErr := writeBuffer.PopContext("objectIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for objectIdentifier") + } + if _objectIdentifierErr != nil { + return errors.Wrap(_objectIdentifierErr, "Error serializing 'objectIdentifier' field") + } if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestDeleteObject"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConfirmedServiceRequestDeleteObject") @@ -199,6 +202,7 @@ func (m *_BACnetConfirmedServiceRequestDeleteObject) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConfirmedServiceRequestDeleteObject) isBACnetConfirmedServiceRequestDeleteObject() bool { return true } @@ -213,3 +217,6 @@ func (m *_BACnetConfirmedServiceRequestDeleteObject) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestDeviceCommunicationControl.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestDeviceCommunicationControl.go index 279563a6ee0..edeb60bed5a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestDeviceCommunicationControl.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestDeviceCommunicationControl.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestDeviceCommunicationControl is the corresponding interface of BACnetConfirmedServiceRequestDeviceCommunicationControl type BACnetConfirmedServiceRequestDeviceCommunicationControl interface { @@ -51,32 +53,31 @@ type BACnetConfirmedServiceRequestDeviceCommunicationControlExactly interface { // _BACnetConfirmedServiceRequestDeviceCommunicationControl is the data-structure of this message type _BACnetConfirmedServiceRequestDeviceCommunicationControl struct { *_BACnetConfirmedServiceRequest - TimeDuration BACnetContextTagUnsignedInteger - EnableDisable BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTagged - Password BACnetContextTagCharacterString + TimeDuration BACnetContextTagUnsignedInteger + EnableDisable BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTagged + Password BACnetContextTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConfirmedServiceRequestDeviceCommunicationControl) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_DEVICE_COMMUNICATION_CONTROL -} +func (m *_BACnetConfirmedServiceRequestDeviceCommunicationControl) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_DEVICE_COMMUNICATION_CONTROL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConfirmedServiceRequestDeviceCommunicationControl) InitializeParent(parent BACnetConfirmedServiceRequest) { -} +func (m *_BACnetConfirmedServiceRequestDeviceCommunicationControl) InitializeParent(parent BACnetConfirmedServiceRequest ) {} -func (m *_BACnetConfirmedServiceRequestDeviceCommunicationControl) GetParent() BACnetConfirmedServiceRequest { +func (m *_BACnetConfirmedServiceRequestDeviceCommunicationControl) GetParent() BACnetConfirmedServiceRequest { return m._BACnetConfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -99,13 +100,14 @@ func (m *_BACnetConfirmedServiceRequestDeviceCommunicationControl) GetPassword() /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestDeviceCommunicationControl factory function for _BACnetConfirmedServiceRequestDeviceCommunicationControl -func NewBACnetConfirmedServiceRequestDeviceCommunicationControl(timeDuration BACnetContextTagUnsignedInteger, enableDisable BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTagged, password BACnetContextTagCharacterString, serviceRequestLength uint32) *_BACnetConfirmedServiceRequestDeviceCommunicationControl { +func NewBACnetConfirmedServiceRequestDeviceCommunicationControl( timeDuration BACnetContextTagUnsignedInteger , enableDisable BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTagged , password BACnetContextTagCharacterString , serviceRequestLength uint32 ) *_BACnetConfirmedServiceRequestDeviceCommunicationControl { _result := &_BACnetConfirmedServiceRequestDeviceCommunicationControl{ - TimeDuration: timeDuration, - EnableDisable: enableDisable, - Password: password, - _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), + TimeDuration: timeDuration, + EnableDisable: enableDisable, + Password: password, + _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), } _result._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _result return _result @@ -113,7 +115,7 @@ func NewBACnetConfirmedServiceRequestDeviceCommunicationControl(timeDuration BAC // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestDeviceCommunicationControl(structType interface{}) BACnetConfirmedServiceRequestDeviceCommunicationControl { - if casted, ok := structType.(BACnetConfirmedServiceRequestDeviceCommunicationControl); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestDeviceCommunicationControl); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestDeviceCommunicationControl); ok { @@ -145,6 +147,7 @@ func (m *_BACnetConfirmedServiceRequestDeviceCommunicationControl) GetLengthInBi return lengthInBits } + func (m *_BACnetConfirmedServiceRequestDeviceCommunicationControl) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -164,12 +167,12 @@ func BACnetConfirmedServiceRequestDeviceCommunicationControlParseWithBuffer(ctx // Optional Field (timeDuration) (Can be skipped, if a given expression evaluates to false) var timeDuration BACnetContextTagUnsignedInteger = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("timeDuration"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeDuration") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(0), BACnetDataType_UNSIGNED_INTEGER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(0) , BACnetDataType_UNSIGNED_INTEGER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -188,7 +191,7 @@ func BACnetConfirmedServiceRequestDeviceCommunicationControlParseWithBuffer(ctx if pullErr := readBuffer.PullContext("enableDisable"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for enableDisable") } - _enableDisable, _enableDisableErr := BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_enableDisable, _enableDisableErr := BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _enableDisableErr != nil { return nil, errors.Wrap(_enableDisableErr, "Error parsing 'enableDisable' field of BACnetConfirmedServiceRequestDeviceCommunicationControl") } @@ -199,12 +202,12 @@ func BACnetConfirmedServiceRequestDeviceCommunicationControlParseWithBuffer(ctx // Optional Field (password) (Can be skipped, if a given expression evaluates to false) var password BACnetContextTagCharacterString = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("password"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for password") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(2), BACnetDataType_CHARACTER_STRING) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(2) , BACnetDataType_CHARACTER_STRING ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -228,9 +231,9 @@ func BACnetConfirmedServiceRequestDeviceCommunicationControlParseWithBuffer(ctx _BACnetConfirmedServiceRequest: &_BACnetConfirmedServiceRequest{ ServiceRequestLength: serviceRequestLength, }, - TimeDuration: timeDuration, + TimeDuration: timeDuration, EnableDisable: enableDisable, - Password: password, + Password: password, } _child._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _child return _child, nil @@ -252,49 +255,49 @@ func (m *_BACnetConfirmedServiceRequestDeviceCommunicationControl) SerializeWith return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestDeviceCommunicationControl") } - // Optional Field (timeDuration) (Can be skipped, if the value is null) - var timeDuration BACnetContextTagUnsignedInteger = nil - if m.GetTimeDuration() != nil { - if pushErr := writeBuffer.PushContext("timeDuration"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timeDuration") - } - timeDuration = m.GetTimeDuration() - _timeDurationErr := writeBuffer.WriteSerializable(ctx, timeDuration) - if popErr := writeBuffer.PopContext("timeDuration"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timeDuration") - } - if _timeDurationErr != nil { - return errors.Wrap(_timeDurationErr, "Error serializing 'timeDuration' field") - } - } - - // Simple Field (enableDisable) - if pushErr := writeBuffer.PushContext("enableDisable"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for enableDisable") + // Optional Field (timeDuration) (Can be skipped, if the value is null) + var timeDuration BACnetContextTagUnsignedInteger = nil + if m.GetTimeDuration() != nil { + if pushErr := writeBuffer.PushContext("timeDuration"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timeDuration") } - _enableDisableErr := writeBuffer.WriteSerializable(ctx, m.GetEnableDisable()) - if popErr := writeBuffer.PopContext("enableDisable"); popErr != nil { - return errors.Wrap(popErr, "Error popping for enableDisable") + timeDuration = m.GetTimeDuration() + _timeDurationErr := writeBuffer.WriteSerializable(ctx, timeDuration) + if popErr := writeBuffer.PopContext("timeDuration"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timeDuration") } - if _enableDisableErr != nil { - return errors.Wrap(_enableDisableErr, "Error serializing 'enableDisable' field") + if _timeDurationErr != nil { + return errors.Wrap(_timeDurationErr, "Error serializing 'timeDuration' field") } + } - // Optional Field (password) (Can be skipped, if the value is null) - var password BACnetContextTagCharacterString = nil - if m.GetPassword() != nil { - if pushErr := writeBuffer.PushContext("password"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for password") - } - password = m.GetPassword() - _passwordErr := writeBuffer.WriteSerializable(ctx, password) - if popErr := writeBuffer.PopContext("password"); popErr != nil { - return errors.Wrap(popErr, "Error popping for password") - } - if _passwordErr != nil { - return errors.Wrap(_passwordErr, "Error serializing 'password' field") - } + // Simple Field (enableDisable) + if pushErr := writeBuffer.PushContext("enableDisable"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for enableDisable") + } + _enableDisableErr := writeBuffer.WriteSerializable(ctx, m.GetEnableDisable()) + if popErr := writeBuffer.PopContext("enableDisable"); popErr != nil { + return errors.Wrap(popErr, "Error popping for enableDisable") + } + if _enableDisableErr != nil { + return errors.Wrap(_enableDisableErr, "Error serializing 'enableDisable' field") + } + + // Optional Field (password) (Can be skipped, if the value is null) + var password BACnetContextTagCharacterString = nil + if m.GetPassword() != nil { + if pushErr := writeBuffer.PushContext("password"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for password") + } + password = m.GetPassword() + _passwordErr := writeBuffer.WriteSerializable(ctx, password) + if popErr := writeBuffer.PopContext("password"); popErr != nil { + return errors.Wrap(popErr, "Error popping for password") } + if _passwordErr != nil { + return errors.Wrap(_passwordErr, "Error serializing 'password' field") + } + } if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestDeviceCommunicationControl"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConfirmedServiceRequestDeviceCommunicationControl") @@ -304,6 +307,7 @@ func (m *_BACnetConfirmedServiceRequestDeviceCommunicationControl) SerializeWith return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConfirmedServiceRequestDeviceCommunicationControl) isBACnetConfirmedServiceRequestDeviceCommunicationControl() bool { return true } @@ -318,3 +322,6 @@ func (m *_BACnetConfirmedServiceRequestDeviceCommunicationControl) String() stri } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisable.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisable.go index fbf73c5fa12..c85db92f8fa 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisable.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisable.go @@ -34,9 +34,9 @@ type IBACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisable inter utils.Serializable } -const ( - BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisable_ENABLE BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisable = 0 - BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisable_DISABLE BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisable = 1 +const( + BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisable_ENABLE BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisable = 0 + BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisable_DISABLE BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisable = 1 BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisable_DISABLE_INITIATION BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisable = 2 ) @@ -44,7 +44,7 @@ var BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableValues [ func init() { _ = errors.New - BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableValues = []BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisable{ + BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableValues = []BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisable { BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisable_ENABLE, BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisable_DISABLE, BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisable_DISABLE_INITIATION, @@ -53,12 +53,12 @@ func init() { func BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableByValue(value uint8) (enum BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisable, ok bool) { switch value { - case 0: - return BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisable_ENABLE, true - case 1: - return BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisable_DISABLE, true - case 2: - return BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisable_DISABLE_INITIATION, true + case 0: + return BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisable_ENABLE, true + case 1: + return BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisable_DISABLE, true + case 2: + return BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisable_DISABLE_INITIATION, true } return 0, false } @@ -75,13 +75,13 @@ func BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableByName( return 0, false } -func BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableKnows(value uint8) bool { +func BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableKnows(value uint8) bool { for _, typeValue := range BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisable(structType interface{}) BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisable { @@ -147,3 +147,4 @@ func (e BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisable) PL func (e BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisable) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTagged.go index af4c8d9172f..b9737fa81ad 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTagged is the corresponding interface of BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTagged type BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTagged interface { @@ -46,14 +48,15 @@ type BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTaggedE // _BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTagged is the data-structure of this message type _BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTagged struct { - Header BACnetTagHeader - Value BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisable + Header BACnetTagHeader + Value BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisable // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTagged factory function for _BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTagged -func NewBACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTagged(header BACnetTagHeader, value BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisable, tagNumber uint8, tagClass TagClass) *_BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTagged { - return &_BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTagged( header BACnetTagHeader , value BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisable , tagNumber uint8 , tagClass TagClass ) *_BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTagged { +return &_BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTagged(structType interface{}) BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTagged { - if casted, ok := structType.(BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTagged); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTagged); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTagged); ok { @@ -104,6 +108,7 @@ func (m *_BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTa return lengthInBits } + func (m *_BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTaggedP if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTagged") } @@ -135,12 +140,12 @@ func BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTaggedP } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTaggedP } var value BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisable if _value != nil { - value = _value.(BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisable) + value = _value.(BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisable) } if closeErr := readBuffer.CloseContext("BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTaggedP // Create the instance return &_BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTa func (m *_BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTagged") } @@ -206,6 +211,7 @@ func (m *_BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTa return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTa func (m *_BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_BACnetConfirmedServiceRequestDeviceCommunicationControlEnableDisableTa } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestGetEnrollmentSummary.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestGetEnrollmentSummary.go index 143d85e15d6..e5369f2a750 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestGetEnrollmentSummary.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestGetEnrollmentSummary.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestGetEnrollmentSummary is the corresponding interface of BACnetConfirmedServiceRequestGetEnrollmentSummary type BACnetConfirmedServiceRequestGetEnrollmentSummary interface { @@ -57,35 +59,34 @@ type BACnetConfirmedServiceRequestGetEnrollmentSummaryExactly interface { // _BACnetConfirmedServiceRequestGetEnrollmentSummary is the data-structure of this message type _BACnetConfirmedServiceRequestGetEnrollmentSummary struct { *_BACnetConfirmedServiceRequest - AcknowledgmentFilter BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagged - EnrollmentFilter BACnetRecipientProcessEnclosed - EventStateFilter BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged - EventTypeFilter BACnetEventTypeTagged - PriorityFilter BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter - NotificationClassFilter BACnetContextTagUnsignedInteger + AcknowledgmentFilter BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagged + EnrollmentFilter BACnetRecipientProcessEnclosed + EventStateFilter BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged + EventTypeFilter BACnetEventTypeTagged + PriorityFilter BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter + NotificationClassFilter BACnetContextTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummary) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_GET_ENROLLMENT_SUMMARY -} +func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummary) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_GET_ENROLLMENT_SUMMARY} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummary) InitializeParent(parent BACnetConfirmedServiceRequest) { -} +func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummary) InitializeParent(parent BACnetConfirmedServiceRequest ) {} -func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummary) GetParent() BACnetConfirmedServiceRequest { +func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummary) GetParent() BACnetConfirmedServiceRequest { return m._BACnetConfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -120,16 +121,17 @@ func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummary) GetNotificationClas /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestGetEnrollmentSummary factory function for _BACnetConfirmedServiceRequestGetEnrollmentSummary -func NewBACnetConfirmedServiceRequestGetEnrollmentSummary(acknowledgmentFilter BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagged, enrollmentFilter BACnetRecipientProcessEnclosed, eventStateFilter BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged, eventTypeFilter BACnetEventTypeTagged, priorityFilter BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter, notificationClassFilter BACnetContextTagUnsignedInteger, serviceRequestLength uint32) *_BACnetConfirmedServiceRequestGetEnrollmentSummary { +func NewBACnetConfirmedServiceRequestGetEnrollmentSummary( acknowledgmentFilter BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagged , enrollmentFilter BACnetRecipientProcessEnclosed , eventStateFilter BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged , eventTypeFilter BACnetEventTypeTagged , priorityFilter BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter , notificationClassFilter BACnetContextTagUnsignedInteger , serviceRequestLength uint32 ) *_BACnetConfirmedServiceRequestGetEnrollmentSummary { _result := &_BACnetConfirmedServiceRequestGetEnrollmentSummary{ - AcknowledgmentFilter: acknowledgmentFilter, - EnrollmentFilter: enrollmentFilter, - EventStateFilter: eventStateFilter, - EventTypeFilter: eventTypeFilter, - PriorityFilter: priorityFilter, - NotificationClassFilter: notificationClassFilter, - _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), + AcknowledgmentFilter: acknowledgmentFilter, + EnrollmentFilter: enrollmentFilter, + EventStateFilter: eventStateFilter, + EventTypeFilter: eventTypeFilter, + PriorityFilter: priorityFilter, + NotificationClassFilter: notificationClassFilter, + _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), } _result._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _result return _result @@ -137,7 +139,7 @@ func NewBACnetConfirmedServiceRequestGetEnrollmentSummary(acknowledgmentFilter B // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestGetEnrollmentSummary(structType interface{}) BACnetConfirmedServiceRequestGetEnrollmentSummary { - if casted, ok := structType.(BACnetConfirmedServiceRequestGetEnrollmentSummary); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestGetEnrollmentSummary); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestGetEnrollmentSummary); ok { @@ -184,6 +186,7 @@ func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummary) GetLengthInBits(ctx return lengthInBits } + func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummary) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -205,7 +208,7 @@ func BACnetConfirmedServiceRequestGetEnrollmentSummaryParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("acknowledgmentFilter"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for acknowledgmentFilter") } - _acknowledgmentFilter, _acknowledgmentFilterErr := BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_acknowledgmentFilter, _acknowledgmentFilterErr := BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _acknowledgmentFilterErr != nil { return nil, errors.Wrap(_acknowledgmentFilterErr, "Error parsing 'acknowledgmentFilter' field of BACnetConfirmedServiceRequestGetEnrollmentSummary") } @@ -216,12 +219,12 @@ func BACnetConfirmedServiceRequestGetEnrollmentSummaryParseWithBuffer(ctx contex // Optional Field (enrollmentFilter) (Can be skipped, if a given expression evaluates to false) var enrollmentFilter BACnetRecipientProcessEnclosed = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("enrollmentFilter"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for enrollmentFilter") } - _val, _err := BACnetRecipientProcessEnclosedParseWithBuffer(ctx, readBuffer, uint8(1)) +_val, _err := BACnetRecipientProcessEnclosedParseWithBuffer(ctx, readBuffer , uint8(1) ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -238,12 +241,12 @@ func BACnetConfirmedServiceRequestGetEnrollmentSummaryParseWithBuffer(ctx contex // Optional Field (eventStateFilter) (Can be skipped, if a given expression evaluates to false) var eventStateFilter BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("eventStateFilter"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for eventStateFilter") } - _val, _err := BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTaggedParseWithBuffer(ctx, readBuffer, uint8(2), TagClass_CONTEXT_SPECIFIC_TAGS) +_val, _err := BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTaggedParseWithBuffer(ctx, readBuffer , uint8(2) , TagClass_CONTEXT_SPECIFIC_TAGS ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -260,12 +263,12 @@ func BACnetConfirmedServiceRequestGetEnrollmentSummaryParseWithBuffer(ctx contex // Optional Field (eventTypeFilter) (Can be skipped, if a given expression evaluates to false) var eventTypeFilter BACnetEventTypeTagged = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("eventTypeFilter"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for eventTypeFilter") } - _val, _err := BACnetEventTypeTaggedParseWithBuffer(ctx, readBuffer, uint8(3), TagClass_CONTEXT_SPECIFIC_TAGS) +_val, _err := BACnetEventTypeTaggedParseWithBuffer(ctx, readBuffer , uint8(3) , TagClass_CONTEXT_SPECIFIC_TAGS ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -282,12 +285,12 @@ func BACnetConfirmedServiceRequestGetEnrollmentSummaryParseWithBuffer(ctx contex // Optional Field (priorityFilter) (Can be skipped, if a given expression evaluates to false) var priorityFilter BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("priorityFilter"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for priorityFilter") } - _val, _err := BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilterParseWithBuffer(ctx, readBuffer, uint8(4)) +_val, _err := BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilterParseWithBuffer(ctx, readBuffer , uint8(4) ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -304,12 +307,12 @@ func BACnetConfirmedServiceRequestGetEnrollmentSummaryParseWithBuffer(ctx contex // Optional Field (notificationClassFilter) (Can be skipped, if a given expression evaluates to false) var notificationClassFilter BACnetContextTagUnsignedInteger = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("notificationClassFilter"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for notificationClassFilter") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(5), BACnetDataType_UNSIGNED_INTEGER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(5) , BACnetDataType_UNSIGNED_INTEGER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -333,11 +336,11 @@ func BACnetConfirmedServiceRequestGetEnrollmentSummaryParseWithBuffer(ctx contex _BACnetConfirmedServiceRequest: &_BACnetConfirmedServiceRequest{ ServiceRequestLength: serviceRequestLength, }, - AcknowledgmentFilter: acknowledgmentFilter, - EnrollmentFilter: enrollmentFilter, - EventStateFilter: eventStateFilter, - EventTypeFilter: eventTypeFilter, - PriorityFilter: priorityFilter, + AcknowledgmentFilter: acknowledgmentFilter, + EnrollmentFilter: enrollmentFilter, + EventStateFilter: eventStateFilter, + EventTypeFilter: eventTypeFilter, + PriorityFilter: priorityFilter, NotificationClassFilter: notificationClassFilter, } _child._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _child @@ -360,97 +363,97 @@ func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummary) SerializeWithWriteB return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestGetEnrollmentSummary") } - // Simple Field (acknowledgmentFilter) - if pushErr := writeBuffer.PushContext("acknowledgmentFilter"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for acknowledgmentFilter") + // Simple Field (acknowledgmentFilter) + if pushErr := writeBuffer.PushContext("acknowledgmentFilter"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for acknowledgmentFilter") + } + _acknowledgmentFilterErr := writeBuffer.WriteSerializable(ctx, m.GetAcknowledgmentFilter()) + if popErr := writeBuffer.PopContext("acknowledgmentFilter"); popErr != nil { + return errors.Wrap(popErr, "Error popping for acknowledgmentFilter") + } + if _acknowledgmentFilterErr != nil { + return errors.Wrap(_acknowledgmentFilterErr, "Error serializing 'acknowledgmentFilter' field") + } + + // Optional Field (enrollmentFilter) (Can be skipped, if the value is null) + var enrollmentFilter BACnetRecipientProcessEnclosed = nil + if m.GetEnrollmentFilter() != nil { + if pushErr := writeBuffer.PushContext("enrollmentFilter"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for enrollmentFilter") } - _acknowledgmentFilterErr := writeBuffer.WriteSerializable(ctx, m.GetAcknowledgmentFilter()) - if popErr := writeBuffer.PopContext("acknowledgmentFilter"); popErr != nil { - return errors.Wrap(popErr, "Error popping for acknowledgmentFilter") + enrollmentFilter = m.GetEnrollmentFilter() + _enrollmentFilterErr := writeBuffer.WriteSerializable(ctx, enrollmentFilter) + if popErr := writeBuffer.PopContext("enrollmentFilter"); popErr != nil { + return errors.Wrap(popErr, "Error popping for enrollmentFilter") } - if _acknowledgmentFilterErr != nil { - return errors.Wrap(_acknowledgmentFilterErr, "Error serializing 'acknowledgmentFilter' field") + if _enrollmentFilterErr != nil { + return errors.Wrap(_enrollmentFilterErr, "Error serializing 'enrollmentFilter' field") } + } - // Optional Field (enrollmentFilter) (Can be skipped, if the value is null) - var enrollmentFilter BACnetRecipientProcessEnclosed = nil - if m.GetEnrollmentFilter() != nil { - if pushErr := writeBuffer.PushContext("enrollmentFilter"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for enrollmentFilter") - } - enrollmentFilter = m.GetEnrollmentFilter() - _enrollmentFilterErr := writeBuffer.WriteSerializable(ctx, enrollmentFilter) - if popErr := writeBuffer.PopContext("enrollmentFilter"); popErr != nil { - return errors.Wrap(popErr, "Error popping for enrollmentFilter") - } - if _enrollmentFilterErr != nil { - return errors.Wrap(_enrollmentFilterErr, "Error serializing 'enrollmentFilter' field") - } + // Optional Field (eventStateFilter) (Can be skipped, if the value is null) + var eventStateFilter BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged = nil + if m.GetEventStateFilter() != nil { + if pushErr := writeBuffer.PushContext("eventStateFilter"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for eventStateFilter") } - - // Optional Field (eventStateFilter) (Can be skipped, if the value is null) - var eventStateFilter BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged = nil - if m.GetEventStateFilter() != nil { - if pushErr := writeBuffer.PushContext("eventStateFilter"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for eventStateFilter") - } - eventStateFilter = m.GetEventStateFilter() - _eventStateFilterErr := writeBuffer.WriteSerializable(ctx, eventStateFilter) - if popErr := writeBuffer.PopContext("eventStateFilter"); popErr != nil { - return errors.Wrap(popErr, "Error popping for eventStateFilter") - } - if _eventStateFilterErr != nil { - return errors.Wrap(_eventStateFilterErr, "Error serializing 'eventStateFilter' field") - } + eventStateFilter = m.GetEventStateFilter() + _eventStateFilterErr := writeBuffer.WriteSerializable(ctx, eventStateFilter) + if popErr := writeBuffer.PopContext("eventStateFilter"); popErr != nil { + return errors.Wrap(popErr, "Error popping for eventStateFilter") + } + if _eventStateFilterErr != nil { + return errors.Wrap(_eventStateFilterErr, "Error serializing 'eventStateFilter' field") } + } - // Optional Field (eventTypeFilter) (Can be skipped, if the value is null) - var eventTypeFilter BACnetEventTypeTagged = nil - if m.GetEventTypeFilter() != nil { - if pushErr := writeBuffer.PushContext("eventTypeFilter"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for eventTypeFilter") - } - eventTypeFilter = m.GetEventTypeFilter() - _eventTypeFilterErr := writeBuffer.WriteSerializable(ctx, eventTypeFilter) - if popErr := writeBuffer.PopContext("eventTypeFilter"); popErr != nil { - return errors.Wrap(popErr, "Error popping for eventTypeFilter") - } - if _eventTypeFilterErr != nil { - return errors.Wrap(_eventTypeFilterErr, "Error serializing 'eventTypeFilter' field") - } + // Optional Field (eventTypeFilter) (Can be skipped, if the value is null) + var eventTypeFilter BACnetEventTypeTagged = nil + if m.GetEventTypeFilter() != nil { + if pushErr := writeBuffer.PushContext("eventTypeFilter"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for eventTypeFilter") + } + eventTypeFilter = m.GetEventTypeFilter() + _eventTypeFilterErr := writeBuffer.WriteSerializable(ctx, eventTypeFilter) + if popErr := writeBuffer.PopContext("eventTypeFilter"); popErr != nil { + return errors.Wrap(popErr, "Error popping for eventTypeFilter") + } + if _eventTypeFilterErr != nil { + return errors.Wrap(_eventTypeFilterErr, "Error serializing 'eventTypeFilter' field") } + } - // Optional Field (priorityFilter) (Can be skipped, if the value is null) - var priorityFilter BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter = nil - if m.GetPriorityFilter() != nil { - if pushErr := writeBuffer.PushContext("priorityFilter"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for priorityFilter") - } - priorityFilter = m.GetPriorityFilter() - _priorityFilterErr := writeBuffer.WriteSerializable(ctx, priorityFilter) - if popErr := writeBuffer.PopContext("priorityFilter"); popErr != nil { - return errors.Wrap(popErr, "Error popping for priorityFilter") - } - if _priorityFilterErr != nil { - return errors.Wrap(_priorityFilterErr, "Error serializing 'priorityFilter' field") - } + // Optional Field (priorityFilter) (Can be skipped, if the value is null) + var priorityFilter BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter = nil + if m.GetPriorityFilter() != nil { + if pushErr := writeBuffer.PushContext("priorityFilter"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for priorityFilter") + } + priorityFilter = m.GetPriorityFilter() + _priorityFilterErr := writeBuffer.WriteSerializable(ctx, priorityFilter) + if popErr := writeBuffer.PopContext("priorityFilter"); popErr != nil { + return errors.Wrap(popErr, "Error popping for priorityFilter") } + if _priorityFilterErr != nil { + return errors.Wrap(_priorityFilterErr, "Error serializing 'priorityFilter' field") + } + } - // Optional Field (notificationClassFilter) (Can be skipped, if the value is null) - var notificationClassFilter BACnetContextTagUnsignedInteger = nil - if m.GetNotificationClassFilter() != nil { - if pushErr := writeBuffer.PushContext("notificationClassFilter"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for notificationClassFilter") - } - notificationClassFilter = m.GetNotificationClassFilter() - _notificationClassFilterErr := writeBuffer.WriteSerializable(ctx, notificationClassFilter) - if popErr := writeBuffer.PopContext("notificationClassFilter"); popErr != nil { - return errors.Wrap(popErr, "Error popping for notificationClassFilter") - } - if _notificationClassFilterErr != nil { - return errors.Wrap(_notificationClassFilterErr, "Error serializing 'notificationClassFilter' field") - } + // Optional Field (notificationClassFilter) (Can be skipped, if the value is null) + var notificationClassFilter BACnetContextTagUnsignedInteger = nil + if m.GetNotificationClassFilter() != nil { + if pushErr := writeBuffer.PushContext("notificationClassFilter"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for notificationClassFilter") + } + notificationClassFilter = m.GetNotificationClassFilter() + _notificationClassFilterErr := writeBuffer.WriteSerializable(ctx, notificationClassFilter) + if popErr := writeBuffer.PopContext("notificationClassFilter"); popErr != nil { + return errors.Wrap(popErr, "Error popping for notificationClassFilter") } + if _notificationClassFilterErr != nil { + return errors.Wrap(_notificationClassFilterErr, "Error serializing 'notificationClassFilter' field") + } + } if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestGetEnrollmentSummary"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConfirmedServiceRequestGetEnrollmentSummary") @@ -460,6 +463,7 @@ func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummary) SerializeWithWriteB return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummary) isBACnetConfirmedServiceRequestGetEnrollmentSummary() bool { return true } @@ -474,3 +478,6 @@ func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummary) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter.go index a8462d9d7a0..b77363413e6 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter.go @@ -34,9 +34,9 @@ type IBACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter int utils.Serializable } -const ( - BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter_ALL BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter = 0 - BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter_ACKED BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter = 1 +const( + BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter_ALL BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter = 0 + BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter_ACKED BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter = 1 BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter_NOT_ACKED BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter = 2 ) @@ -44,7 +44,7 @@ var BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterValues func init() { _ = errors.New - BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterValues = []BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter{ + BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterValues = []BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter { BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter_ALL, BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter_ACKED, BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter_NOT_ACKED, @@ -53,12 +53,12 @@ func init() { func BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterByValue(value uint8) (enum BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter, ok bool) { switch value { - case 0: - return BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter_ALL, true - case 1: - return BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter_ACKED, true - case 2: - return BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter_NOT_ACKED, true + case 0: + return BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter_ALL, true + case 1: + return BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter_ACKED, true + case 2: + return BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter_NOT_ACKED, true } return 0, false } @@ -75,13 +75,13 @@ func BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterByNam return 0, false } -func BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterKnows(value uint8) bool { +func BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterKnows(value uint8) bool { for _, typeValue := range BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter(structType interface{}) BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter { @@ -147,3 +147,4 @@ func (e BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter) func (e BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagged.go index d1cafa6761a..dec994fa2fd 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagged is the corresponding interface of BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagged type BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagged interface { @@ -46,14 +48,15 @@ type BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagge // _BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagged is the data-structure of this message type _BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagged struct { - Header BACnetTagHeader - Value BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter + Header BACnetTagHeader + Value BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagged factory function for _BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagged -func NewBACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagged(header BACnetTagHeader, value BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter, tagNumber uint8, tagClass TagClass) *_BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagged { - return &_BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagged( header BACnetTagHeader , value BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter , tagNumber uint8 , tagClass TagClass ) *_BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagged { +return &_BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagged(structType interface{}) BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagged { - if casted, ok := structType.(BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagged); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagged); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagged); ok { @@ -104,6 +108,7 @@ func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter return lengthInBits } + func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagge if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagged") } @@ -135,12 +140,12 @@ func BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagge } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagge } var value BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter if _value != nil { - value = _value.(BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter) + value = _value.(BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter) } if closeErr := readBuffer.CloseContext("BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagge // Create the instance return &_BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagged") } @@ -206,6 +211,7 @@ func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilterTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummaryAcknowledgementFilter } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter.go index a25a6a9da38..1c3ed626ebe 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter.go @@ -34,19 +34,19 @@ type IBACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter interfac utils.Serializable } -const ( +const( BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter_OFFNORMAL BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter = 0 - BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter_FAULT BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter = 1 - BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter_NORMAL BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter = 2 - BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter_ALL BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter = 3 - BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter_ACTIVE BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter = 4 + BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter_FAULT BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter = 1 + BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter_NORMAL BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter = 2 + BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter_ALL BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter = 3 + BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter_ACTIVE BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter = 4 ) var BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterValues []BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter func init() { _ = errors.New - BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterValues = []BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter{ + BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterValues = []BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter { BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter_OFFNORMAL, BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter_FAULT, BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter_NORMAL, @@ -57,16 +57,16 @@ func init() { func BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterByValue(value uint8) (enum BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter, ok bool) { switch value { - case 0: - return BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter_OFFNORMAL, true - case 1: - return BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter_FAULT, true - case 2: - return BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter_NORMAL, true - case 3: - return BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter_ALL, true - case 4: - return BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter_ACTIVE, true + case 0: + return BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter_OFFNORMAL, true + case 1: + return BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter_FAULT, true + case 2: + return BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter_NORMAL, true + case 3: + return BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter_ALL, true + case 4: + return BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter_ACTIVE, true } return 0, false } @@ -87,13 +87,13 @@ func BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterByName(val return 0, false } -func BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterKnows(value uint8) bool { +func BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterKnows(value uint8) bool { for _, typeValue := range BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter(structType interface{}) BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter { @@ -163,3 +163,4 @@ func (e BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter) PLC4X func (e BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged.go index 58942785b1a..c6aff05498d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged is the corresponding interface of BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged type BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged interface { @@ -46,14 +48,15 @@ type BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTaggedExac // _BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged is the data-structure of this message type _BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged struct { - Header BACnetTagHeader - Value BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter + Header BACnetTagHeader + Value BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagge /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged factory function for _BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged -func NewBACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged(header BACnetTagHeader, value BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter, tagNumber uint8, tagClass TagClass) *_BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged { - return &_BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged( header BACnetTagHeader , value BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter , tagNumber uint8 , tagClass TagClass ) *_BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged { +return &_BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged(structType interface{}) BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged { - if casted, ok := structType.(BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged); ok { @@ -104,6 +108,7 @@ func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagge return lengthInBits } + func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTaggedPars if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged") } @@ -135,12 +140,12 @@ func BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTaggedPars } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTaggedPars } var value BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter if _value != nil { - value = _value.(BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter) + value = _value.(BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilter) } if closeErr := readBuffer.CloseContext("BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTaggedPars // Create the instance return &_BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagge func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged") } @@ -206,6 +211,7 @@ func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagge return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagge func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummaryEventStateFilterTagge } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter.go index e0e1ad1a974..240f6c721fc 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter is the corresponding interface of BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter type BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter interface { @@ -50,15 +52,16 @@ type BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilterExactly inte // _BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter is the data-structure of this message type _BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter struct { - OpeningTag BACnetOpeningTag - MinPriority BACnetContextTagUnsignedInteger - MaxPriority BACnetContextTagUnsignedInteger - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + MinPriority BACnetContextTagUnsignedInteger + MaxPriority BACnetContextTagUnsignedInteger + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -85,14 +88,15 @@ func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter) GetCl /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter factory function for _BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter -func NewBACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter(openingTag BACnetOpeningTag, minPriority BACnetContextTagUnsignedInteger, maxPriority BACnetContextTagUnsignedInteger, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter { - return &_BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter{OpeningTag: openingTag, MinPriority: minPriority, MaxPriority: maxPriority, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter( openingTag BACnetOpeningTag , minPriority BACnetContextTagUnsignedInteger , maxPriority BACnetContextTagUnsignedInteger , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter { +return &_BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter{ OpeningTag: openingTag , MinPriority: minPriority , MaxPriority: maxPriority , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter(structType interface{}) BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter { - if casted, ok := structType.(BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter); ok { @@ -123,6 +127,7 @@ func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter) GetLe return lengthInBits } + func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -144,7 +149,7 @@ func BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilterParseWithBuf if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter") } @@ -157,7 +162,7 @@ func BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilterParseWithBuf if pullErr := readBuffer.PullContext("minPriority"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for minPriority") } - _minPriority, _minPriorityErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_minPriority, _minPriorityErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _minPriorityErr != nil { return nil, errors.Wrap(_minPriorityErr, "Error parsing 'minPriority' field of BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter") } @@ -170,7 +175,7 @@ func BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilterParseWithBuf if pullErr := readBuffer.PullContext("maxPriority"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for maxPriority") } - _maxPriority, _maxPriorityErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_maxPriority, _maxPriorityErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _maxPriorityErr != nil { return nil, errors.Wrap(_maxPriorityErr, "Error parsing 'maxPriority' field of BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter") } @@ -183,7 +188,7 @@ func BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilterParseWithBuf if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter") } @@ -198,12 +203,12 @@ func BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilterParseWithBuf // Create the instance return &_BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter{ - TagNumber: tagNumber, - OpeningTag: openingTag, - MinPriority: minPriority, - MaxPriority: maxPriority, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + MinPriority: minPriority, + MaxPriority: maxPriority, + ClosingTag: closingTag, + }, nil } func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter) Serialize() ([]byte, error) { @@ -217,7 +222,7 @@ func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter) Seria func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter") } @@ -275,13 +280,13 @@ func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter) Seria return nil } + //// // Arguments Getter func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -299,3 +304,6 @@ func (m *_BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilter) Strin } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestGetEventInformation.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestGetEventInformation.go index 5ca64cc7b90..2208db8b928 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestGetEventInformation.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestGetEventInformation.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestGetEventInformation is the corresponding interface of BACnetConfirmedServiceRequestGetEventInformation type BACnetConfirmedServiceRequestGetEventInformation interface { @@ -47,30 +49,29 @@ type BACnetConfirmedServiceRequestGetEventInformationExactly interface { // _BACnetConfirmedServiceRequestGetEventInformation is the data-structure of this message type _BACnetConfirmedServiceRequestGetEventInformation struct { *_BACnetConfirmedServiceRequest - LastReceivedObjectIdentifier BACnetContextTagObjectIdentifier + LastReceivedObjectIdentifier BACnetContextTagObjectIdentifier } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConfirmedServiceRequestGetEventInformation) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_GET_EVENT_INFORMATION -} +func (m *_BACnetConfirmedServiceRequestGetEventInformation) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_GET_EVENT_INFORMATION} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConfirmedServiceRequestGetEventInformation) InitializeParent(parent BACnetConfirmedServiceRequest) { -} +func (m *_BACnetConfirmedServiceRequestGetEventInformation) InitializeParent(parent BACnetConfirmedServiceRequest ) {} -func (m *_BACnetConfirmedServiceRequestGetEventInformation) GetParent() BACnetConfirmedServiceRequest { +func (m *_BACnetConfirmedServiceRequestGetEventInformation) GetParent() BACnetConfirmedServiceRequest { return m._BACnetConfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -85,11 +86,12 @@ func (m *_BACnetConfirmedServiceRequestGetEventInformation) GetLastReceivedObjec /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestGetEventInformation factory function for _BACnetConfirmedServiceRequestGetEventInformation -func NewBACnetConfirmedServiceRequestGetEventInformation(lastReceivedObjectIdentifier BACnetContextTagObjectIdentifier, serviceRequestLength uint32) *_BACnetConfirmedServiceRequestGetEventInformation { +func NewBACnetConfirmedServiceRequestGetEventInformation( lastReceivedObjectIdentifier BACnetContextTagObjectIdentifier , serviceRequestLength uint32 ) *_BACnetConfirmedServiceRequestGetEventInformation { _result := &_BACnetConfirmedServiceRequestGetEventInformation{ - LastReceivedObjectIdentifier: lastReceivedObjectIdentifier, - _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), + LastReceivedObjectIdentifier: lastReceivedObjectIdentifier, + _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), } _result._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _result return _result @@ -97,7 +99,7 @@ func NewBACnetConfirmedServiceRequestGetEventInformation(lastReceivedObjectIdent // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestGetEventInformation(structType interface{}) BACnetConfirmedServiceRequestGetEventInformation { - if casted, ok := structType.(BACnetConfirmedServiceRequestGetEventInformation); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestGetEventInformation); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestGetEventInformation); ok { @@ -121,6 +123,7 @@ func (m *_BACnetConfirmedServiceRequestGetEventInformation) GetLengthInBits(ctx return lengthInBits } + func (m *_BACnetConfirmedServiceRequestGetEventInformation) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -140,12 +143,12 @@ func BACnetConfirmedServiceRequestGetEventInformationParseWithBuffer(ctx context // Optional Field (lastReceivedObjectIdentifier) (Can be skipped, if a given expression evaluates to false) var lastReceivedObjectIdentifier BACnetContextTagObjectIdentifier = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("lastReceivedObjectIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lastReceivedObjectIdentifier") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(0), BACnetDataType_BACNET_OBJECT_IDENTIFIER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(0) , BACnetDataType_BACNET_OBJECT_IDENTIFIER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -191,21 +194,21 @@ func (m *_BACnetConfirmedServiceRequestGetEventInformation) SerializeWithWriteBu return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestGetEventInformation") } - // Optional Field (lastReceivedObjectIdentifier) (Can be skipped, if the value is null) - var lastReceivedObjectIdentifier BACnetContextTagObjectIdentifier = nil - if m.GetLastReceivedObjectIdentifier() != nil { - if pushErr := writeBuffer.PushContext("lastReceivedObjectIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lastReceivedObjectIdentifier") - } - lastReceivedObjectIdentifier = m.GetLastReceivedObjectIdentifier() - _lastReceivedObjectIdentifierErr := writeBuffer.WriteSerializable(ctx, lastReceivedObjectIdentifier) - if popErr := writeBuffer.PopContext("lastReceivedObjectIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lastReceivedObjectIdentifier") - } - if _lastReceivedObjectIdentifierErr != nil { - return errors.Wrap(_lastReceivedObjectIdentifierErr, "Error serializing 'lastReceivedObjectIdentifier' field") - } + // Optional Field (lastReceivedObjectIdentifier) (Can be skipped, if the value is null) + var lastReceivedObjectIdentifier BACnetContextTagObjectIdentifier = nil + if m.GetLastReceivedObjectIdentifier() != nil { + if pushErr := writeBuffer.PushContext("lastReceivedObjectIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lastReceivedObjectIdentifier") + } + lastReceivedObjectIdentifier = m.GetLastReceivedObjectIdentifier() + _lastReceivedObjectIdentifierErr := writeBuffer.WriteSerializable(ctx, lastReceivedObjectIdentifier) + if popErr := writeBuffer.PopContext("lastReceivedObjectIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lastReceivedObjectIdentifier") + } + if _lastReceivedObjectIdentifierErr != nil { + return errors.Wrap(_lastReceivedObjectIdentifierErr, "Error serializing 'lastReceivedObjectIdentifier' field") } + } if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestGetEventInformation"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConfirmedServiceRequestGetEventInformation") @@ -215,6 +218,7 @@ func (m *_BACnetConfirmedServiceRequestGetEventInformation) SerializeWithWriteBu return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConfirmedServiceRequestGetEventInformation) isBACnetConfirmedServiceRequestGetEventInformation() bool { return true } @@ -229,3 +233,6 @@ func (m *_BACnetConfirmedServiceRequestGetEventInformation) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestLifeSafetyOperation.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestLifeSafetyOperation.go index f48fb39404c..8e8b9630e5b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestLifeSafetyOperation.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestLifeSafetyOperation.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestLifeSafetyOperation is the corresponding interface of BACnetConfirmedServiceRequestLifeSafetyOperation type BACnetConfirmedServiceRequestLifeSafetyOperation interface { @@ -53,33 +55,32 @@ type BACnetConfirmedServiceRequestLifeSafetyOperationExactly interface { // _BACnetConfirmedServiceRequestLifeSafetyOperation is the data-structure of this message type _BACnetConfirmedServiceRequestLifeSafetyOperation struct { *_BACnetConfirmedServiceRequest - RequestingProcessIdentifier BACnetContextTagUnsignedInteger - RequestingSource BACnetContextTagCharacterString - Request BACnetLifeSafetyOperationTagged - ObjectIdentifier BACnetContextTagObjectIdentifier + RequestingProcessIdentifier BACnetContextTagUnsignedInteger + RequestingSource BACnetContextTagCharacterString + Request BACnetLifeSafetyOperationTagged + ObjectIdentifier BACnetContextTagObjectIdentifier } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConfirmedServiceRequestLifeSafetyOperation) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_LIFE_SAFETY_OPERATION -} +func (m *_BACnetConfirmedServiceRequestLifeSafetyOperation) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_LIFE_SAFETY_OPERATION} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConfirmedServiceRequestLifeSafetyOperation) InitializeParent(parent BACnetConfirmedServiceRequest) { -} +func (m *_BACnetConfirmedServiceRequestLifeSafetyOperation) InitializeParent(parent BACnetConfirmedServiceRequest ) {} -func (m *_BACnetConfirmedServiceRequestLifeSafetyOperation) GetParent() BACnetConfirmedServiceRequest { +func (m *_BACnetConfirmedServiceRequestLifeSafetyOperation) GetParent() BACnetConfirmedServiceRequest { return m._BACnetConfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -106,14 +107,15 @@ func (m *_BACnetConfirmedServiceRequestLifeSafetyOperation) GetObjectIdentifier( /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestLifeSafetyOperation factory function for _BACnetConfirmedServiceRequestLifeSafetyOperation -func NewBACnetConfirmedServiceRequestLifeSafetyOperation(requestingProcessIdentifier BACnetContextTagUnsignedInteger, requestingSource BACnetContextTagCharacterString, request BACnetLifeSafetyOperationTagged, objectIdentifier BACnetContextTagObjectIdentifier, serviceRequestLength uint32) *_BACnetConfirmedServiceRequestLifeSafetyOperation { +func NewBACnetConfirmedServiceRequestLifeSafetyOperation( requestingProcessIdentifier BACnetContextTagUnsignedInteger , requestingSource BACnetContextTagCharacterString , request BACnetLifeSafetyOperationTagged , objectIdentifier BACnetContextTagObjectIdentifier , serviceRequestLength uint32 ) *_BACnetConfirmedServiceRequestLifeSafetyOperation { _result := &_BACnetConfirmedServiceRequestLifeSafetyOperation{ - RequestingProcessIdentifier: requestingProcessIdentifier, - RequestingSource: requestingSource, - Request: request, - ObjectIdentifier: objectIdentifier, - _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), + RequestingProcessIdentifier: requestingProcessIdentifier, + RequestingSource: requestingSource, + Request: request, + ObjectIdentifier: objectIdentifier, + _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), } _result._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _result return _result @@ -121,7 +123,7 @@ func NewBACnetConfirmedServiceRequestLifeSafetyOperation(requestingProcessIdenti // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestLifeSafetyOperation(structType interface{}) BACnetConfirmedServiceRequestLifeSafetyOperation { - if casted, ok := structType.(BACnetConfirmedServiceRequestLifeSafetyOperation); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestLifeSafetyOperation); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestLifeSafetyOperation); ok { @@ -154,6 +156,7 @@ func (m *_BACnetConfirmedServiceRequestLifeSafetyOperation) GetLengthInBits(ctx return lengthInBits } + func (m *_BACnetConfirmedServiceRequestLifeSafetyOperation) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -175,7 +178,7 @@ func BACnetConfirmedServiceRequestLifeSafetyOperationParseWithBuffer(ctx context if pullErr := readBuffer.PullContext("requestingProcessIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for requestingProcessIdentifier") } - _requestingProcessIdentifier, _requestingProcessIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_requestingProcessIdentifier, _requestingProcessIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _requestingProcessIdentifierErr != nil { return nil, errors.Wrap(_requestingProcessIdentifierErr, "Error parsing 'requestingProcessIdentifier' field of BACnetConfirmedServiceRequestLifeSafetyOperation") } @@ -188,7 +191,7 @@ func BACnetConfirmedServiceRequestLifeSafetyOperationParseWithBuffer(ctx context if pullErr := readBuffer.PullContext("requestingSource"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for requestingSource") } - _requestingSource, _requestingSourceErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_CHARACTER_STRING)) +_requestingSource, _requestingSourceErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_CHARACTER_STRING ) ) if _requestingSourceErr != nil { return nil, errors.Wrap(_requestingSourceErr, "Error parsing 'requestingSource' field of BACnetConfirmedServiceRequestLifeSafetyOperation") } @@ -201,7 +204,7 @@ func BACnetConfirmedServiceRequestLifeSafetyOperationParseWithBuffer(ctx context if pullErr := readBuffer.PullContext("request"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for request") } - _request, _requestErr := BACnetLifeSafetyOperationTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_request, _requestErr := BACnetLifeSafetyOperationTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _requestErr != nil { return nil, errors.Wrap(_requestErr, "Error parsing 'request' field of BACnetConfirmedServiceRequestLifeSafetyOperation") } @@ -212,12 +215,12 @@ func BACnetConfirmedServiceRequestLifeSafetyOperationParseWithBuffer(ctx context // Optional Field (objectIdentifier) (Can be skipped, if a given expression evaluates to false) var objectIdentifier BACnetContextTagObjectIdentifier = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("objectIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for objectIdentifier") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(3), BACnetDataType_BACNET_OBJECT_IDENTIFIER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(3) , BACnetDataType_BACNET_OBJECT_IDENTIFIER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -242,9 +245,9 @@ func BACnetConfirmedServiceRequestLifeSafetyOperationParseWithBuffer(ctx context ServiceRequestLength: serviceRequestLength, }, RequestingProcessIdentifier: requestingProcessIdentifier, - RequestingSource: requestingSource, - Request: request, - ObjectIdentifier: objectIdentifier, + RequestingSource: requestingSource, + Request: request, + ObjectIdentifier: objectIdentifier, } _child._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _child return _child, nil @@ -266,57 +269,57 @@ func (m *_BACnetConfirmedServiceRequestLifeSafetyOperation) SerializeWithWriteBu return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestLifeSafetyOperation") } - // Simple Field (requestingProcessIdentifier) - if pushErr := writeBuffer.PushContext("requestingProcessIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for requestingProcessIdentifier") - } - _requestingProcessIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetRequestingProcessIdentifier()) - if popErr := writeBuffer.PopContext("requestingProcessIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for requestingProcessIdentifier") - } - if _requestingProcessIdentifierErr != nil { - return errors.Wrap(_requestingProcessIdentifierErr, "Error serializing 'requestingProcessIdentifier' field") - } + // Simple Field (requestingProcessIdentifier) + if pushErr := writeBuffer.PushContext("requestingProcessIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for requestingProcessIdentifier") + } + _requestingProcessIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetRequestingProcessIdentifier()) + if popErr := writeBuffer.PopContext("requestingProcessIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for requestingProcessIdentifier") + } + if _requestingProcessIdentifierErr != nil { + return errors.Wrap(_requestingProcessIdentifierErr, "Error serializing 'requestingProcessIdentifier' field") + } - // Simple Field (requestingSource) - if pushErr := writeBuffer.PushContext("requestingSource"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for requestingSource") - } - _requestingSourceErr := writeBuffer.WriteSerializable(ctx, m.GetRequestingSource()) - if popErr := writeBuffer.PopContext("requestingSource"); popErr != nil { - return errors.Wrap(popErr, "Error popping for requestingSource") - } - if _requestingSourceErr != nil { - return errors.Wrap(_requestingSourceErr, "Error serializing 'requestingSource' field") - } + // Simple Field (requestingSource) + if pushErr := writeBuffer.PushContext("requestingSource"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for requestingSource") + } + _requestingSourceErr := writeBuffer.WriteSerializable(ctx, m.GetRequestingSource()) + if popErr := writeBuffer.PopContext("requestingSource"); popErr != nil { + return errors.Wrap(popErr, "Error popping for requestingSource") + } + if _requestingSourceErr != nil { + return errors.Wrap(_requestingSourceErr, "Error serializing 'requestingSource' field") + } - // Simple Field (request) - if pushErr := writeBuffer.PushContext("request"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for request") - } - _requestErr := writeBuffer.WriteSerializable(ctx, m.GetRequest()) - if popErr := writeBuffer.PopContext("request"); popErr != nil { - return errors.Wrap(popErr, "Error popping for request") + // Simple Field (request) + if pushErr := writeBuffer.PushContext("request"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for request") + } + _requestErr := writeBuffer.WriteSerializable(ctx, m.GetRequest()) + if popErr := writeBuffer.PopContext("request"); popErr != nil { + return errors.Wrap(popErr, "Error popping for request") + } + if _requestErr != nil { + return errors.Wrap(_requestErr, "Error serializing 'request' field") + } + + // Optional Field (objectIdentifier) (Can be skipped, if the value is null) + var objectIdentifier BACnetContextTagObjectIdentifier = nil + if m.GetObjectIdentifier() != nil { + if pushErr := writeBuffer.PushContext("objectIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for objectIdentifier") } - if _requestErr != nil { - return errors.Wrap(_requestErr, "Error serializing 'request' field") + objectIdentifier = m.GetObjectIdentifier() + _objectIdentifierErr := writeBuffer.WriteSerializable(ctx, objectIdentifier) + if popErr := writeBuffer.PopContext("objectIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for objectIdentifier") } - - // Optional Field (objectIdentifier) (Can be skipped, if the value is null) - var objectIdentifier BACnetContextTagObjectIdentifier = nil - if m.GetObjectIdentifier() != nil { - if pushErr := writeBuffer.PushContext("objectIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for objectIdentifier") - } - objectIdentifier = m.GetObjectIdentifier() - _objectIdentifierErr := writeBuffer.WriteSerializable(ctx, objectIdentifier) - if popErr := writeBuffer.PopContext("objectIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for objectIdentifier") - } - if _objectIdentifierErr != nil { - return errors.Wrap(_objectIdentifierErr, "Error serializing 'objectIdentifier' field") - } + if _objectIdentifierErr != nil { + return errors.Wrap(_objectIdentifierErr, "Error serializing 'objectIdentifier' field") } + } if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestLifeSafetyOperation"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConfirmedServiceRequestLifeSafetyOperation") @@ -326,6 +329,7 @@ func (m *_BACnetConfirmedServiceRequestLifeSafetyOperation) SerializeWithWriteBu return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConfirmedServiceRequestLifeSafetyOperation) isBACnetConfirmedServiceRequestLifeSafetyOperation() bool { return true } @@ -340,3 +344,6 @@ func (m *_BACnetConfirmedServiceRequestLifeSafetyOperation) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReadProperty.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReadProperty.go index f8fab70bbcc..719f86cf85e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReadProperty.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReadProperty.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestReadProperty is the corresponding interface of BACnetConfirmedServiceRequestReadProperty type BACnetConfirmedServiceRequestReadProperty interface { @@ -51,32 +53,31 @@ type BACnetConfirmedServiceRequestReadPropertyExactly interface { // _BACnetConfirmedServiceRequestReadProperty is the data-structure of this message type _BACnetConfirmedServiceRequestReadProperty struct { *_BACnetConfirmedServiceRequest - ObjectIdentifier BACnetContextTagObjectIdentifier - PropertyIdentifier BACnetPropertyIdentifierTagged - ArrayIndex BACnetContextTagUnsignedInteger + ObjectIdentifier BACnetContextTagObjectIdentifier + PropertyIdentifier BACnetPropertyIdentifierTagged + ArrayIndex BACnetContextTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConfirmedServiceRequestReadProperty) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_READ_PROPERTY -} +func (m *_BACnetConfirmedServiceRequestReadProperty) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_READ_PROPERTY} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConfirmedServiceRequestReadProperty) InitializeParent(parent BACnetConfirmedServiceRequest) { -} +func (m *_BACnetConfirmedServiceRequestReadProperty) InitializeParent(parent BACnetConfirmedServiceRequest ) {} -func (m *_BACnetConfirmedServiceRequestReadProperty) GetParent() BACnetConfirmedServiceRequest { +func (m *_BACnetConfirmedServiceRequestReadProperty) GetParent() BACnetConfirmedServiceRequest { return m._BACnetConfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -99,13 +100,14 @@ func (m *_BACnetConfirmedServiceRequestReadProperty) GetArrayIndex() BACnetConte /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestReadProperty factory function for _BACnetConfirmedServiceRequestReadProperty -func NewBACnetConfirmedServiceRequestReadProperty(objectIdentifier BACnetContextTagObjectIdentifier, propertyIdentifier BACnetPropertyIdentifierTagged, arrayIndex BACnetContextTagUnsignedInteger, serviceRequestLength uint32) *_BACnetConfirmedServiceRequestReadProperty { +func NewBACnetConfirmedServiceRequestReadProperty( objectIdentifier BACnetContextTagObjectIdentifier , propertyIdentifier BACnetPropertyIdentifierTagged , arrayIndex BACnetContextTagUnsignedInteger , serviceRequestLength uint32 ) *_BACnetConfirmedServiceRequestReadProperty { _result := &_BACnetConfirmedServiceRequestReadProperty{ - ObjectIdentifier: objectIdentifier, - PropertyIdentifier: propertyIdentifier, - ArrayIndex: arrayIndex, - _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), + ObjectIdentifier: objectIdentifier, + PropertyIdentifier: propertyIdentifier, + ArrayIndex: arrayIndex, + _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), } _result._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _result return _result @@ -113,7 +115,7 @@ func NewBACnetConfirmedServiceRequestReadProperty(objectIdentifier BACnetContext // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestReadProperty(structType interface{}) BACnetConfirmedServiceRequestReadProperty { - if casted, ok := structType.(BACnetConfirmedServiceRequestReadProperty); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestReadProperty); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestReadProperty); ok { @@ -143,6 +145,7 @@ func (m *_BACnetConfirmedServiceRequestReadProperty) GetLengthInBits(ctx context return lengthInBits } + func (m *_BACnetConfirmedServiceRequestReadProperty) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -164,7 +167,7 @@ func BACnetConfirmedServiceRequestReadPropertyParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("objectIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for objectIdentifier") } - _objectIdentifier, _objectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER)) +_objectIdentifier, _objectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_BACNET_OBJECT_IDENTIFIER ) ) if _objectIdentifierErr != nil { return nil, errors.Wrap(_objectIdentifierErr, "Error parsing 'objectIdentifier' field of BACnetConfirmedServiceRequestReadProperty") } @@ -177,7 +180,7 @@ func BACnetConfirmedServiceRequestReadPropertyParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("propertyIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for propertyIdentifier") } - _propertyIdentifier, _propertyIdentifierErr := BACnetPropertyIdentifierTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_propertyIdentifier, _propertyIdentifierErr := BACnetPropertyIdentifierTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _propertyIdentifierErr != nil { return nil, errors.Wrap(_propertyIdentifierErr, "Error parsing 'propertyIdentifier' field of BACnetConfirmedServiceRequestReadProperty") } @@ -188,12 +191,12 @@ func BACnetConfirmedServiceRequestReadPropertyParseWithBuffer(ctx context.Contex // Optional Field (arrayIndex) (Can be skipped, if a given expression evaluates to false) var arrayIndex BACnetContextTagUnsignedInteger = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("arrayIndex"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for arrayIndex") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(2), BACnetDataType_UNSIGNED_INTEGER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(2) , BACnetDataType_UNSIGNED_INTEGER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -217,9 +220,9 @@ func BACnetConfirmedServiceRequestReadPropertyParseWithBuffer(ctx context.Contex _BACnetConfirmedServiceRequest: &_BACnetConfirmedServiceRequest{ ServiceRequestLength: serviceRequestLength, }, - ObjectIdentifier: objectIdentifier, + ObjectIdentifier: objectIdentifier, PropertyIdentifier: propertyIdentifier, - ArrayIndex: arrayIndex, + ArrayIndex: arrayIndex, } _child._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _child return _child, nil @@ -241,45 +244,45 @@ func (m *_BACnetConfirmedServiceRequestReadProperty) SerializeWithWriteBuffer(ct return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestReadProperty") } - // Simple Field (objectIdentifier) - if pushErr := writeBuffer.PushContext("objectIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for objectIdentifier") - } - _objectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetObjectIdentifier()) - if popErr := writeBuffer.PopContext("objectIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for objectIdentifier") - } - if _objectIdentifierErr != nil { - return errors.Wrap(_objectIdentifierErr, "Error serializing 'objectIdentifier' field") - } + // Simple Field (objectIdentifier) + if pushErr := writeBuffer.PushContext("objectIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for objectIdentifier") + } + _objectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetObjectIdentifier()) + if popErr := writeBuffer.PopContext("objectIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for objectIdentifier") + } + if _objectIdentifierErr != nil { + return errors.Wrap(_objectIdentifierErr, "Error serializing 'objectIdentifier' field") + } - // Simple Field (propertyIdentifier) - if pushErr := writeBuffer.PushContext("propertyIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for propertyIdentifier") + // Simple Field (propertyIdentifier) + if pushErr := writeBuffer.PushContext("propertyIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for propertyIdentifier") + } + _propertyIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetPropertyIdentifier()) + if popErr := writeBuffer.PopContext("propertyIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for propertyIdentifier") + } + if _propertyIdentifierErr != nil { + return errors.Wrap(_propertyIdentifierErr, "Error serializing 'propertyIdentifier' field") + } + + // Optional Field (arrayIndex) (Can be skipped, if the value is null) + var arrayIndex BACnetContextTagUnsignedInteger = nil + if m.GetArrayIndex() != nil { + if pushErr := writeBuffer.PushContext("arrayIndex"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for arrayIndex") } - _propertyIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetPropertyIdentifier()) - if popErr := writeBuffer.PopContext("propertyIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for propertyIdentifier") + arrayIndex = m.GetArrayIndex() + _arrayIndexErr := writeBuffer.WriteSerializable(ctx, arrayIndex) + if popErr := writeBuffer.PopContext("arrayIndex"); popErr != nil { + return errors.Wrap(popErr, "Error popping for arrayIndex") } - if _propertyIdentifierErr != nil { - return errors.Wrap(_propertyIdentifierErr, "Error serializing 'propertyIdentifier' field") - } - - // Optional Field (arrayIndex) (Can be skipped, if the value is null) - var arrayIndex BACnetContextTagUnsignedInteger = nil - if m.GetArrayIndex() != nil { - if pushErr := writeBuffer.PushContext("arrayIndex"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for arrayIndex") - } - arrayIndex = m.GetArrayIndex() - _arrayIndexErr := writeBuffer.WriteSerializable(ctx, arrayIndex) - if popErr := writeBuffer.PopContext("arrayIndex"); popErr != nil { - return errors.Wrap(popErr, "Error popping for arrayIndex") - } - if _arrayIndexErr != nil { - return errors.Wrap(_arrayIndexErr, "Error serializing 'arrayIndex' field") - } + if _arrayIndexErr != nil { + return errors.Wrap(_arrayIndexErr, "Error serializing 'arrayIndex' field") } + } if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestReadProperty"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConfirmedServiceRequestReadProperty") @@ -289,6 +292,7 @@ func (m *_BACnetConfirmedServiceRequestReadProperty) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConfirmedServiceRequestReadProperty) isBACnetConfirmedServiceRequestReadProperty() bool { return true } @@ -303,3 +307,6 @@ func (m *_BACnetConfirmedServiceRequestReadProperty) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReadPropertyConditional.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReadPropertyConditional.go index 8ce61fa00b1..ae47d4f5981 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReadPropertyConditional.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReadPropertyConditional.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestReadPropertyConditional is the corresponding interface of BACnetConfirmedServiceRequestReadPropertyConditional type BACnetConfirmedServiceRequestReadPropertyConditional interface { @@ -46,33 +48,32 @@ type BACnetConfirmedServiceRequestReadPropertyConditionalExactly interface { // _BACnetConfirmedServiceRequestReadPropertyConditional is the data-structure of this message type _BACnetConfirmedServiceRequestReadPropertyConditional struct { *_BACnetConfirmedServiceRequest - BytesOfRemovedService []byte + BytesOfRemovedService []byte // Arguments. ServiceRequestPayloadLength uint32 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConfirmedServiceRequestReadPropertyConditional) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_READ_PROPERTY_CONDITIONAL -} +func (m *_BACnetConfirmedServiceRequestReadPropertyConditional) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_READ_PROPERTY_CONDITIONAL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConfirmedServiceRequestReadPropertyConditional) InitializeParent(parent BACnetConfirmedServiceRequest) { -} +func (m *_BACnetConfirmedServiceRequestReadPropertyConditional) InitializeParent(parent BACnetConfirmedServiceRequest ) {} -func (m *_BACnetConfirmedServiceRequestReadPropertyConditional) GetParent() BACnetConfirmedServiceRequest { +func (m *_BACnetConfirmedServiceRequestReadPropertyConditional) GetParent() BACnetConfirmedServiceRequest { return m._BACnetConfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -87,11 +88,12 @@ func (m *_BACnetConfirmedServiceRequestReadPropertyConditional) GetBytesOfRemove /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestReadPropertyConditional factory function for _BACnetConfirmedServiceRequestReadPropertyConditional -func NewBACnetConfirmedServiceRequestReadPropertyConditional(bytesOfRemovedService []byte, serviceRequestPayloadLength uint32, serviceRequestLength uint32) *_BACnetConfirmedServiceRequestReadPropertyConditional { +func NewBACnetConfirmedServiceRequestReadPropertyConditional( bytesOfRemovedService []byte , serviceRequestPayloadLength uint32 , serviceRequestLength uint32 ) *_BACnetConfirmedServiceRequestReadPropertyConditional { _result := &_BACnetConfirmedServiceRequestReadPropertyConditional{ - BytesOfRemovedService: bytesOfRemovedService, - _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), + BytesOfRemovedService: bytesOfRemovedService, + _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), } _result._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _result return _result @@ -99,7 +101,7 @@ func NewBACnetConfirmedServiceRequestReadPropertyConditional(bytesOfRemovedServi // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestReadPropertyConditional(structType interface{}) BACnetConfirmedServiceRequestReadPropertyConditional { - if casted, ok := structType.(BACnetConfirmedServiceRequestReadPropertyConditional); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestReadPropertyConditional); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestReadPropertyConditional); ok { @@ -123,6 +125,7 @@ func (m *_BACnetConfirmedServiceRequestReadPropertyConditional) GetLengthInBits( return lengthInBits } + func (m *_BACnetConfirmedServiceRequestReadPropertyConditional) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -177,11 +180,11 @@ func (m *_BACnetConfirmedServiceRequestReadPropertyConditional) SerializeWithWri return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestReadPropertyConditional") } - // Array Field (bytesOfRemovedService) - // Byte Array field (bytesOfRemovedService) - if err := writeBuffer.WriteByteArray("bytesOfRemovedService", m.GetBytesOfRemovedService()); err != nil { - return errors.Wrap(err, "Error serializing 'bytesOfRemovedService' field") - } + // Array Field (bytesOfRemovedService) + // Byte Array field (bytesOfRemovedService) + if err := writeBuffer.WriteByteArray("bytesOfRemovedService", m.GetBytesOfRemovedService()); err != nil { + return errors.Wrap(err, "Error serializing 'bytesOfRemovedService' field") + } if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestReadPropertyConditional"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConfirmedServiceRequestReadPropertyConditional") @@ -191,13 +194,13 @@ func (m *_BACnetConfirmedServiceRequestReadPropertyConditional) SerializeWithWri return m.SerializeParent(ctx, writeBuffer, m, ser) } + //// // Arguments Getter func (m *_BACnetConfirmedServiceRequestReadPropertyConditional) GetServiceRequestPayloadLength() uint32 { return m.ServiceRequestPayloadLength } - // //// @@ -215,3 +218,6 @@ func (m *_BACnetConfirmedServiceRequestReadPropertyConditional) String() string } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReadPropertyMultiple.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReadPropertyMultiple.go index a7f88d96740..e5133edfb16 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReadPropertyMultiple.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReadPropertyMultiple.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestReadPropertyMultiple is the corresponding interface of BACnetConfirmedServiceRequestReadPropertyMultiple type BACnetConfirmedServiceRequestReadPropertyMultiple interface { @@ -47,33 +49,32 @@ type BACnetConfirmedServiceRequestReadPropertyMultipleExactly interface { // _BACnetConfirmedServiceRequestReadPropertyMultiple is the data-structure of this message type _BACnetConfirmedServiceRequestReadPropertyMultiple struct { *_BACnetConfirmedServiceRequest - Data []BACnetReadAccessSpecification + Data []BACnetReadAccessSpecification // Arguments. ServiceRequestPayloadLength uint32 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConfirmedServiceRequestReadPropertyMultiple) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_READ_PROPERTY_MULTIPLE -} +func (m *_BACnetConfirmedServiceRequestReadPropertyMultiple) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_READ_PROPERTY_MULTIPLE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConfirmedServiceRequestReadPropertyMultiple) InitializeParent(parent BACnetConfirmedServiceRequest) { -} +func (m *_BACnetConfirmedServiceRequestReadPropertyMultiple) InitializeParent(parent BACnetConfirmedServiceRequest ) {} -func (m *_BACnetConfirmedServiceRequestReadPropertyMultiple) GetParent() BACnetConfirmedServiceRequest { +func (m *_BACnetConfirmedServiceRequestReadPropertyMultiple) GetParent() BACnetConfirmedServiceRequest { return m._BACnetConfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -88,11 +89,12 @@ func (m *_BACnetConfirmedServiceRequestReadPropertyMultiple) GetData() []BACnetR /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestReadPropertyMultiple factory function for _BACnetConfirmedServiceRequestReadPropertyMultiple -func NewBACnetConfirmedServiceRequestReadPropertyMultiple(data []BACnetReadAccessSpecification, serviceRequestPayloadLength uint32, serviceRequestLength uint32) *_BACnetConfirmedServiceRequestReadPropertyMultiple { +func NewBACnetConfirmedServiceRequestReadPropertyMultiple( data []BACnetReadAccessSpecification , serviceRequestPayloadLength uint32 , serviceRequestLength uint32 ) *_BACnetConfirmedServiceRequestReadPropertyMultiple { _result := &_BACnetConfirmedServiceRequestReadPropertyMultiple{ - Data: data, - _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), + Data: data, + _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), } _result._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _result return _result @@ -100,7 +102,7 @@ func NewBACnetConfirmedServiceRequestReadPropertyMultiple(data []BACnetReadAcces // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestReadPropertyMultiple(structType interface{}) BACnetConfirmedServiceRequestReadPropertyMultiple { - if casted, ok := structType.(BACnetConfirmedServiceRequestReadPropertyMultiple); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestReadPropertyMultiple); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestReadPropertyMultiple); ok { @@ -126,6 +128,7 @@ func (m *_BACnetConfirmedServiceRequestReadPropertyMultiple) GetLengthInBits(ctx return lengthInBits } + func (m *_BACnetConfirmedServiceRequestReadPropertyMultiple) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -152,8 +155,8 @@ func BACnetConfirmedServiceRequestReadPropertyMultipleParseWithBuffer(ctx contex { _dataLength := serviceRequestPayloadLength _dataEndPos := positionAware.GetPos() + uint16(_dataLength) - for positionAware.GetPos() < _dataEndPos { - _item, _err := BACnetReadAccessSpecificationParseWithBuffer(ctx, readBuffer) + for ;positionAware.GetPos() < _dataEndPos; { +_item, _err := BACnetReadAccessSpecificationParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'data' field of BACnetConfirmedServiceRequestReadPropertyMultiple") } @@ -195,22 +198,22 @@ func (m *_BACnetConfirmedServiceRequestReadPropertyMultiple) SerializeWithWriteB return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestReadPropertyMultiple") } - // Array Field (data) - if pushErr := writeBuffer.PushContext("data", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for data") - } - for _curItem, _element := range m.GetData() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetData()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'data' field") - } - } - if popErr := writeBuffer.PopContext("data", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for data") + // Array Field (data) + if pushErr := writeBuffer.PushContext("data", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for data") + } + for _curItem, _element := range m.GetData() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetData()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'data' field") } + } + if popErr := writeBuffer.PopContext("data", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for data") + } if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestReadPropertyMultiple"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConfirmedServiceRequestReadPropertyMultiple") @@ -220,13 +223,13 @@ func (m *_BACnetConfirmedServiceRequestReadPropertyMultiple) SerializeWithWriteB return m.SerializeParent(ctx, writeBuffer, m, ser) } + //// // Arguments Getter func (m *_BACnetConfirmedServiceRequestReadPropertyMultiple) GetServiceRequestPayloadLength() uint32 { return m.ServiceRequestPayloadLength } - // //// @@ -244,3 +247,6 @@ func (m *_BACnetConfirmedServiceRequestReadPropertyMultiple) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReadRange.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReadRange.go index deed12f9108..d4fb1eeb071 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReadRange.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReadRange.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestReadRange is the corresponding interface of BACnetConfirmedServiceRequestReadRange type BACnetConfirmedServiceRequestReadRange interface { @@ -53,33 +55,32 @@ type BACnetConfirmedServiceRequestReadRangeExactly interface { // _BACnetConfirmedServiceRequestReadRange is the data-structure of this message type _BACnetConfirmedServiceRequestReadRange struct { *_BACnetConfirmedServiceRequest - ObjectIdentifier BACnetContextTagObjectIdentifier - PropertyIdentifier BACnetPropertyIdentifierTagged - PropertyArrayIndex BACnetContextTagUnsignedInteger - ReadRange BACnetConfirmedServiceRequestReadRangeRange + ObjectIdentifier BACnetContextTagObjectIdentifier + PropertyIdentifier BACnetPropertyIdentifierTagged + PropertyArrayIndex BACnetContextTagUnsignedInteger + ReadRange BACnetConfirmedServiceRequestReadRangeRange } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConfirmedServiceRequestReadRange) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_READ_RANGE -} +func (m *_BACnetConfirmedServiceRequestReadRange) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_READ_RANGE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConfirmedServiceRequestReadRange) InitializeParent(parent BACnetConfirmedServiceRequest) { -} +func (m *_BACnetConfirmedServiceRequestReadRange) InitializeParent(parent BACnetConfirmedServiceRequest ) {} -func (m *_BACnetConfirmedServiceRequestReadRange) GetParent() BACnetConfirmedServiceRequest { +func (m *_BACnetConfirmedServiceRequestReadRange) GetParent() BACnetConfirmedServiceRequest { return m._BACnetConfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -106,14 +107,15 @@ func (m *_BACnetConfirmedServiceRequestReadRange) GetReadRange() BACnetConfirmed /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestReadRange factory function for _BACnetConfirmedServiceRequestReadRange -func NewBACnetConfirmedServiceRequestReadRange(objectIdentifier BACnetContextTagObjectIdentifier, propertyIdentifier BACnetPropertyIdentifierTagged, propertyArrayIndex BACnetContextTagUnsignedInteger, readRange BACnetConfirmedServiceRequestReadRangeRange, serviceRequestLength uint32) *_BACnetConfirmedServiceRequestReadRange { +func NewBACnetConfirmedServiceRequestReadRange( objectIdentifier BACnetContextTagObjectIdentifier , propertyIdentifier BACnetPropertyIdentifierTagged , propertyArrayIndex BACnetContextTagUnsignedInteger , readRange BACnetConfirmedServiceRequestReadRangeRange , serviceRequestLength uint32 ) *_BACnetConfirmedServiceRequestReadRange { _result := &_BACnetConfirmedServiceRequestReadRange{ - ObjectIdentifier: objectIdentifier, - PropertyIdentifier: propertyIdentifier, - PropertyArrayIndex: propertyArrayIndex, - ReadRange: readRange, - _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), + ObjectIdentifier: objectIdentifier, + PropertyIdentifier: propertyIdentifier, + PropertyArrayIndex: propertyArrayIndex, + ReadRange: readRange, + _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), } _result._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _result return _result @@ -121,7 +123,7 @@ func NewBACnetConfirmedServiceRequestReadRange(objectIdentifier BACnetContextTag // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestReadRange(structType interface{}) BACnetConfirmedServiceRequestReadRange { - if casted, ok := structType.(BACnetConfirmedServiceRequestReadRange); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestReadRange); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestReadRange); ok { @@ -156,6 +158,7 @@ func (m *_BACnetConfirmedServiceRequestReadRange) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetConfirmedServiceRequestReadRange) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -177,7 +180,7 @@ func BACnetConfirmedServiceRequestReadRangeParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("objectIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for objectIdentifier") } - _objectIdentifier, _objectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER)) +_objectIdentifier, _objectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_BACNET_OBJECT_IDENTIFIER ) ) if _objectIdentifierErr != nil { return nil, errors.Wrap(_objectIdentifierErr, "Error parsing 'objectIdentifier' field of BACnetConfirmedServiceRequestReadRange") } @@ -190,7 +193,7 @@ func BACnetConfirmedServiceRequestReadRangeParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("propertyIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for propertyIdentifier") } - _propertyIdentifier, _propertyIdentifierErr := BACnetPropertyIdentifierTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_propertyIdentifier, _propertyIdentifierErr := BACnetPropertyIdentifierTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _propertyIdentifierErr != nil { return nil, errors.Wrap(_propertyIdentifierErr, "Error parsing 'propertyIdentifier' field of BACnetConfirmedServiceRequestReadRange") } @@ -201,12 +204,12 @@ func BACnetConfirmedServiceRequestReadRangeParseWithBuffer(ctx context.Context, // Optional Field (propertyArrayIndex) (Can be skipped, if a given expression evaluates to false) var propertyArrayIndex BACnetContextTagUnsignedInteger = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("propertyArrayIndex"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for propertyArrayIndex") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(2), BACnetDataType_UNSIGNED_INTEGER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(2) , BACnetDataType_UNSIGNED_INTEGER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -223,12 +226,12 @@ func BACnetConfirmedServiceRequestReadRangeParseWithBuffer(ctx context.Context, // Optional Field (readRange) (Can be skipped, if a given expression evaluates to false) var readRange BACnetConfirmedServiceRequestReadRangeRange = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("readRange"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for readRange") } - _val, _err := BACnetConfirmedServiceRequestReadRangeRangeParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetConfirmedServiceRequestReadRangeRangeParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -252,10 +255,10 @@ func BACnetConfirmedServiceRequestReadRangeParseWithBuffer(ctx context.Context, _BACnetConfirmedServiceRequest: &_BACnetConfirmedServiceRequest{ ServiceRequestLength: serviceRequestLength, }, - ObjectIdentifier: objectIdentifier, + ObjectIdentifier: objectIdentifier, PropertyIdentifier: propertyIdentifier, PropertyArrayIndex: propertyArrayIndex, - ReadRange: readRange, + ReadRange: readRange, } _child._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _child return _child, nil @@ -277,61 +280,61 @@ func (m *_BACnetConfirmedServiceRequestReadRange) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestReadRange") } - // Simple Field (objectIdentifier) - if pushErr := writeBuffer.PushContext("objectIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for objectIdentifier") - } - _objectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetObjectIdentifier()) - if popErr := writeBuffer.PopContext("objectIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for objectIdentifier") - } - if _objectIdentifierErr != nil { - return errors.Wrap(_objectIdentifierErr, "Error serializing 'objectIdentifier' field") - } + // Simple Field (objectIdentifier) + if pushErr := writeBuffer.PushContext("objectIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for objectIdentifier") + } + _objectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetObjectIdentifier()) + if popErr := writeBuffer.PopContext("objectIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for objectIdentifier") + } + if _objectIdentifierErr != nil { + return errors.Wrap(_objectIdentifierErr, "Error serializing 'objectIdentifier' field") + } - // Simple Field (propertyIdentifier) - if pushErr := writeBuffer.PushContext("propertyIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for propertyIdentifier") + // Simple Field (propertyIdentifier) + if pushErr := writeBuffer.PushContext("propertyIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for propertyIdentifier") + } + _propertyIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetPropertyIdentifier()) + if popErr := writeBuffer.PopContext("propertyIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for propertyIdentifier") + } + if _propertyIdentifierErr != nil { + return errors.Wrap(_propertyIdentifierErr, "Error serializing 'propertyIdentifier' field") + } + + // Optional Field (propertyArrayIndex) (Can be skipped, if the value is null) + var propertyArrayIndex BACnetContextTagUnsignedInteger = nil + if m.GetPropertyArrayIndex() != nil { + if pushErr := writeBuffer.PushContext("propertyArrayIndex"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for propertyArrayIndex") } - _propertyIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetPropertyIdentifier()) - if popErr := writeBuffer.PopContext("propertyIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for propertyIdentifier") + propertyArrayIndex = m.GetPropertyArrayIndex() + _propertyArrayIndexErr := writeBuffer.WriteSerializable(ctx, propertyArrayIndex) + if popErr := writeBuffer.PopContext("propertyArrayIndex"); popErr != nil { + return errors.Wrap(popErr, "Error popping for propertyArrayIndex") } - if _propertyIdentifierErr != nil { - return errors.Wrap(_propertyIdentifierErr, "Error serializing 'propertyIdentifier' field") + if _propertyArrayIndexErr != nil { + return errors.Wrap(_propertyArrayIndexErr, "Error serializing 'propertyArrayIndex' field") } + } - // Optional Field (propertyArrayIndex) (Can be skipped, if the value is null) - var propertyArrayIndex BACnetContextTagUnsignedInteger = nil - if m.GetPropertyArrayIndex() != nil { - if pushErr := writeBuffer.PushContext("propertyArrayIndex"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for propertyArrayIndex") - } - propertyArrayIndex = m.GetPropertyArrayIndex() - _propertyArrayIndexErr := writeBuffer.WriteSerializable(ctx, propertyArrayIndex) - if popErr := writeBuffer.PopContext("propertyArrayIndex"); popErr != nil { - return errors.Wrap(popErr, "Error popping for propertyArrayIndex") - } - if _propertyArrayIndexErr != nil { - return errors.Wrap(_propertyArrayIndexErr, "Error serializing 'propertyArrayIndex' field") - } + // Optional Field (readRange) (Can be skipped, if the value is null) + var readRange BACnetConfirmedServiceRequestReadRangeRange = nil + if m.GetReadRange() != nil { + if pushErr := writeBuffer.PushContext("readRange"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for readRange") } - - // Optional Field (readRange) (Can be skipped, if the value is null) - var readRange BACnetConfirmedServiceRequestReadRangeRange = nil - if m.GetReadRange() != nil { - if pushErr := writeBuffer.PushContext("readRange"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for readRange") - } - readRange = m.GetReadRange() - _readRangeErr := writeBuffer.WriteSerializable(ctx, readRange) - if popErr := writeBuffer.PopContext("readRange"); popErr != nil { - return errors.Wrap(popErr, "Error popping for readRange") - } - if _readRangeErr != nil { - return errors.Wrap(_readRangeErr, "Error serializing 'readRange' field") - } + readRange = m.GetReadRange() + _readRangeErr := writeBuffer.WriteSerializable(ctx, readRange) + if popErr := writeBuffer.PopContext("readRange"); popErr != nil { + return errors.Wrap(popErr, "Error popping for readRange") + } + if _readRangeErr != nil { + return errors.Wrap(_readRangeErr, "Error serializing 'readRange' field") } + } if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestReadRange"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConfirmedServiceRequestReadRange") @@ -341,6 +344,7 @@ func (m *_BACnetConfirmedServiceRequestReadRange) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConfirmedServiceRequestReadRange) isBACnetConfirmedServiceRequestReadRange() bool { return true } @@ -355,3 +359,6 @@ func (m *_BACnetConfirmedServiceRequestReadRange) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReadRangeRange.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReadRangeRange.go index 49a64309324..1c6528afde5 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReadRangeRange.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReadRangeRange.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestReadRangeRange is the corresponding interface of BACnetConfirmedServiceRequestReadRangeRange type BACnetConfirmedServiceRequestReadRangeRange interface { @@ -51,9 +53,9 @@ type BACnetConfirmedServiceRequestReadRangeRangeExactly interface { // _BACnetConfirmedServiceRequestReadRangeRange is the data-structure of this message type _BACnetConfirmedServiceRequestReadRangeRange struct { _BACnetConfirmedServiceRequestReadRangeRangeChildRequirements - PeekedTagHeader BACnetTagHeader - OpeningTag BACnetOpeningTag - ClosingTag BACnetClosingTag + PeekedTagHeader BACnetTagHeader + OpeningTag BACnetOpeningTag + ClosingTag BACnetClosingTag } type _BACnetConfirmedServiceRequestReadRangeRangeChildRequirements interface { @@ -61,6 +63,7 @@ type _BACnetConfirmedServiceRequestReadRangeRangeChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type BACnetConfirmedServiceRequestReadRangeRangeParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetConfirmedServiceRequestReadRangeRange, serializeChildFunction func() error) error GetTypeName() string @@ -68,13 +71,12 @@ type BACnetConfirmedServiceRequestReadRangeRangeParent interface { type BACnetConfirmedServiceRequestReadRangeRangeChild interface { utils.Serializable - InitializeParent(parent BACnetConfirmedServiceRequestReadRangeRange, peekedTagHeader BACnetTagHeader, openingTag BACnetOpeningTag, closingTag BACnetClosingTag) +InitializeParent(parent BACnetConfirmedServiceRequestReadRangeRange , peekedTagHeader BACnetTagHeader , openingTag BACnetOpeningTag , closingTag BACnetClosingTag ) GetParent() *BACnetConfirmedServiceRequestReadRangeRange GetTypeName() string BACnetConfirmedServiceRequestReadRangeRange } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -112,14 +114,15 @@ func (m *_BACnetConfirmedServiceRequestReadRangeRange) GetPeekedTagNumber() uint /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestReadRangeRange factory function for _BACnetConfirmedServiceRequestReadRangeRange -func NewBACnetConfirmedServiceRequestReadRangeRange(peekedTagHeader BACnetTagHeader, openingTag BACnetOpeningTag, closingTag BACnetClosingTag) *_BACnetConfirmedServiceRequestReadRangeRange { - return &_BACnetConfirmedServiceRequestReadRangeRange{PeekedTagHeader: peekedTagHeader, OpeningTag: openingTag, ClosingTag: closingTag} +func NewBACnetConfirmedServiceRequestReadRangeRange( peekedTagHeader BACnetTagHeader , openingTag BACnetOpeningTag , closingTag BACnetClosingTag ) *_BACnetConfirmedServiceRequestReadRangeRange { +return &_BACnetConfirmedServiceRequestReadRangeRange{ PeekedTagHeader: peekedTagHeader , OpeningTag: openingTag , ClosingTag: closingTag } } // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestReadRangeRange(structType interface{}) BACnetConfirmedServiceRequestReadRangeRange { - if casted, ok := structType.(BACnetConfirmedServiceRequestReadRangeRange); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestReadRangeRange); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestReadRangeRange); ok { @@ -132,6 +135,7 @@ func (m *_BACnetConfirmedServiceRequestReadRangeRange) GetTypeName() string { return "BACnetConfirmedServiceRequestReadRangeRange" } + func (m *_BACnetConfirmedServiceRequestReadRangeRange) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -163,19 +167,19 @@ func BACnetConfirmedServiceRequestReadRangeRangeParseWithBuffer(ctx context.Cont currentPos := positionAware.GetPos() _ = currentPos - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Simple Field (openingTag) if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagHeader.GetActualTagNumber())) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagHeader.GetActualTagNumber() ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetConfirmedServiceRequestReadRangeRange") } @@ -192,19 +196,19 @@ func BACnetConfirmedServiceRequestReadRangeRangeParseWithBuffer(ctx context.Cont // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetConfirmedServiceRequestReadRangeRangeChildSerializeRequirement interface { BACnetConfirmedServiceRequestReadRangeRange - InitializeParent(BACnetConfirmedServiceRequestReadRangeRange, BACnetTagHeader, BACnetOpeningTag, BACnetClosingTag) + InitializeParent(BACnetConfirmedServiceRequestReadRangeRange, BACnetTagHeader, BACnetOpeningTag, BACnetClosingTag) GetParent() BACnetConfirmedServiceRequestReadRangeRange } var _childTemp interface{} var _child BACnetConfirmedServiceRequestReadRangeRangeChildSerializeRequirement var typeSwitchError error switch { - case peekedTagNumber == 0x3: // BACnetConfirmedServiceRequestReadRangeRangeByPosition - _childTemp, typeSwitchError = BACnetConfirmedServiceRequestReadRangeRangeByPositionParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == 0x6: // BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber - _childTemp, typeSwitchError = BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumberParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == 0x7: // BACnetConfirmedServiceRequestReadRangeRangeByTime - _childTemp, typeSwitchError = BACnetConfirmedServiceRequestReadRangeRangeByTimeParseWithBuffer(ctx, readBuffer) +case peekedTagNumber == 0x3 : // BACnetConfirmedServiceRequestReadRangeRangeByPosition + _childTemp, typeSwitchError = BACnetConfirmedServiceRequestReadRangeRangeByPositionParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == 0x6 : // BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber + _childTemp, typeSwitchError = BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumberParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == 0x7 : // BACnetConfirmedServiceRequestReadRangeRangeByTime + _childTemp, typeSwitchError = BACnetConfirmedServiceRequestReadRangeRangeByTimeParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedTagNumber=%v]", peekedTagNumber) } @@ -217,7 +221,7 @@ func BACnetConfirmedServiceRequestReadRangeRangeParseWithBuffer(ctx context.Cont if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagHeader.GetActualTagNumber())) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagHeader.GetActualTagNumber() ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetConfirmedServiceRequestReadRangeRange") } @@ -231,7 +235,7 @@ func BACnetConfirmedServiceRequestReadRangeRangeParseWithBuffer(ctx context.Cont } // Finish initializing - _child.InitializeParent(_child, peekedTagHeader, openingTag, closingTag) +_child.InitializeParent(_child , peekedTagHeader , openingTag , closingTag ) return _child, nil } @@ -241,7 +245,7 @@ func (pm *_BACnetConfirmedServiceRequestReadRangeRange) SerializeParent(ctx cont _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetConfirmedServiceRequestReadRangeRange"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetConfirmedServiceRequestReadRangeRange"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestReadRangeRange") } @@ -284,6 +288,7 @@ func (pm *_BACnetConfirmedServiceRequestReadRangeRange) SerializeParent(ctx cont return nil } + func (m *_BACnetConfirmedServiceRequestReadRangeRange) isBACnetConfirmedServiceRequestReadRangeRange() bool { return true } @@ -298,3 +303,6 @@ func (m *_BACnetConfirmedServiceRequestReadRangeRange) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReadRangeRangeByPosition.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReadRangeRangeByPosition.go index 687a607408e..1b17a46c02f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReadRangeRangeByPosition.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReadRangeRangeByPosition.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestReadRangeRangeByPosition is the corresponding interface of BACnetConfirmedServiceRequestReadRangeRangeByPosition type BACnetConfirmedServiceRequestReadRangeRangeByPosition interface { @@ -48,10 +50,12 @@ type BACnetConfirmedServiceRequestReadRangeRangeByPositionExactly interface { // _BACnetConfirmedServiceRequestReadRangeRangeByPosition is the data-structure of this message type _BACnetConfirmedServiceRequestReadRangeRangeByPosition struct { *_BACnetConfirmedServiceRequestReadRangeRange - ReferenceIndex BACnetApplicationTagUnsignedInteger - Count BACnetApplicationTagSignedInteger + ReferenceIndex BACnetApplicationTagUnsignedInteger + Count BACnetApplicationTagSignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -62,16 +66,14 @@ type _BACnetConfirmedServiceRequestReadRangeRangeByPosition struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConfirmedServiceRequestReadRangeRangeByPosition) InitializeParent(parent BACnetConfirmedServiceRequestReadRangeRange, peekedTagHeader BACnetTagHeader, openingTag BACnetOpeningTag, closingTag BACnetClosingTag) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetConfirmedServiceRequestReadRangeRangeByPosition) InitializeParent(parent BACnetConfirmedServiceRequestReadRangeRange , peekedTagHeader BACnetTagHeader , openingTag BACnetOpeningTag , closingTag BACnetClosingTag ) { m.PeekedTagHeader = peekedTagHeader m.OpeningTag = openingTag m.ClosingTag = closingTag } -func (m *_BACnetConfirmedServiceRequestReadRangeRangeByPosition) GetParent() BACnetConfirmedServiceRequestReadRangeRange { +func (m *_BACnetConfirmedServiceRequestReadRangeRangeByPosition) GetParent() BACnetConfirmedServiceRequestReadRangeRange { return m._BACnetConfirmedServiceRequestReadRangeRange } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_BACnetConfirmedServiceRequestReadRangeRangeByPosition) GetCount() BACn /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestReadRangeRangeByPosition factory function for _BACnetConfirmedServiceRequestReadRangeRangeByPosition -func NewBACnetConfirmedServiceRequestReadRangeRangeByPosition(referenceIndex BACnetApplicationTagUnsignedInteger, count BACnetApplicationTagSignedInteger, peekedTagHeader BACnetTagHeader, openingTag BACnetOpeningTag, closingTag BACnetClosingTag) *_BACnetConfirmedServiceRequestReadRangeRangeByPosition { +func NewBACnetConfirmedServiceRequestReadRangeRangeByPosition( referenceIndex BACnetApplicationTagUnsignedInteger , count BACnetApplicationTagSignedInteger , peekedTagHeader BACnetTagHeader , openingTag BACnetOpeningTag , closingTag BACnetClosingTag ) *_BACnetConfirmedServiceRequestReadRangeRangeByPosition { _result := &_BACnetConfirmedServiceRequestReadRangeRangeByPosition{ ReferenceIndex: referenceIndex, - Count: count, - _BACnetConfirmedServiceRequestReadRangeRange: NewBACnetConfirmedServiceRequestReadRangeRange(peekedTagHeader, openingTag, closingTag), + Count: count, + _BACnetConfirmedServiceRequestReadRangeRange: NewBACnetConfirmedServiceRequestReadRangeRange(peekedTagHeader, openingTag, closingTag), } _result._BACnetConfirmedServiceRequestReadRangeRange._BACnetConfirmedServiceRequestReadRangeRangeChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewBACnetConfirmedServiceRequestReadRangeRangeByPosition(referenceIndex BAC // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestReadRangeRangeByPosition(structType interface{}) BACnetConfirmedServiceRequestReadRangeRangeByPosition { - if casted, ok := structType.(BACnetConfirmedServiceRequestReadRangeRangeByPosition); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestReadRangeRangeByPosition); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestReadRangeRangeByPosition); ok { @@ -128,6 +131,7 @@ func (m *_BACnetConfirmedServiceRequestReadRangeRangeByPosition) GetLengthInBits return lengthInBits } + func (m *_BACnetConfirmedServiceRequestReadRangeRangeByPosition) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -149,7 +153,7 @@ func BACnetConfirmedServiceRequestReadRangeRangeByPositionParseWithBuffer(ctx co if pullErr := readBuffer.PullContext("referenceIndex"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for referenceIndex") } - _referenceIndex, _referenceIndexErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_referenceIndex, _referenceIndexErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _referenceIndexErr != nil { return nil, errors.Wrap(_referenceIndexErr, "Error parsing 'referenceIndex' field of BACnetConfirmedServiceRequestReadRangeRangeByPosition") } @@ -162,7 +166,7 @@ func BACnetConfirmedServiceRequestReadRangeRangeByPositionParseWithBuffer(ctx co if pullErr := readBuffer.PullContext("count"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for count") } - _count, _countErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_count, _countErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _countErr != nil { return nil, errors.Wrap(_countErr, "Error parsing 'count' field of BACnetConfirmedServiceRequestReadRangeRangeByPosition") } @@ -177,9 +181,10 @@ func BACnetConfirmedServiceRequestReadRangeRangeByPositionParseWithBuffer(ctx co // Create a partially initialized instance _child := &_BACnetConfirmedServiceRequestReadRangeRangeByPosition{ - _BACnetConfirmedServiceRequestReadRangeRange: &_BACnetConfirmedServiceRequestReadRangeRange{}, + _BACnetConfirmedServiceRequestReadRangeRange: &_BACnetConfirmedServiceRequestReadRangeRange{ + }, ReferenceIndex: referenceIndex, - Count: count, + Count: count, } _child._BACnetConfirmedServiceRequestReadRangeRange._BACnetConfirmedServiceRequestReadRangeRangeChildRequirements = _child return _child, nil @@ -201,29 +206,29 @@ func (m *_BACnetConfirmedServiceRequestReadRangeRangeByPosition) SerializeWithWr return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestReadRangeRangeByPosition") } - // Simple Field (referenceIndex) - if pushErr := writeBuffer.PushContext("referenceIndex"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for referenceIndex") - } - _referenceIndexErr := writeBuffer.WriteSerializable(ctx, m.GetReferenceIndex()) - if popErr := writeBuffer.PopContext("referenceIndex"); popErr != nil { - return errors.Wrap(popErr, "Error popping for referenceIndex") - } - if _referenceIndexErr != nil { - return errors.Wrap(_referenceIndexErr, "Error serializing 'referenceIndex' field") - } + // Simple Field (referenceIndex) + if pushErr := writeBuffer.PushContext("referenceIndex"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for referenceIndex") + } + _referenceIndexErr := writeBuffer.WriteSerializable(ctx, m.GetReferenceIndex()) + if popErr := writeBuffer.PopContext("referenceIndex"); popErr != nil { + return errors.Wrap(popErr, "Error popping for referenceIndex") + } + if _referenceIndexErr != nil { + return errors.Wrap(_referenceIndexErr, "Error serializing 'referenceIndex' field") + } - // Simple Field (count) - if pushErr := writeBuffer.PushContext("count"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for count") - } - _countErr := writeBuffer.WriteSerializable(ctx, m.GetCount()) - if popErr := writeBuffer.PopContext("count"); popErr != nil { - return errors.Wrap(popErr, "Error popping for count") - } - if _countErr != nil { - return errors.Wrap(_countErr, "Error serializing 'count' field") - } + // Simple Field (count) + if pushErr := writeBuffer.PushContext("count"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for count") + } + _countErr := writeBuffer.WriteSerializable(ctx, m.GetCount()) + if popErr := writeBuffer.PopContext("count"); popErr != nil { + return errors.Wrap(popErr, "Error popping for count") + } + if _countErr != nil { + return errors.Wrap(_countErr, "Error serializing 'count' field") + } if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestReadRangeRangeByPosition"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConfirmedServiceRequestReadRangeRangeByPosition") @@ -233,6 +238,7 @@ func (m *_BACnetConfirmedServiceRequestReadRangeRangeByPosition) SerializeWithWr return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConfirmedServiceRequestReadRangeRangeByPosition) isBACnetConfirmedServiceRequestReadRangeRangeByPosition() bool { return true } @@ -247,3 +253,6 @@ func (m *_BACnetConfirmedServiceRequestReadRangeRangeByPosition) String() string } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber.go index 60b0b10d9cc..201e07ab032 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber is the corresponding interface of BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber type BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber interface { @@ -48,10 +50,12 @@ type BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumberExactly interfac // _BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber is the data-structure of this message type _BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber struct { *_BACnetConfirmedServiceRequestReadRangeRange - ReferenceSequenceNumber BACnetApplicationTagUnsignedInteger - Count BACnetApplicationTagSignedInteger + ReferenceSequenceNumber BACnetApplicationTagUnsignedInteger + Count BACnetApplicationTagSignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -62,16 +66,14 @@ type _BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber) InitializeParent(parent BACnetConfirmedServiceRequestReadRangeRange, peekedTagHeader BACnetTagHeader, openingTag BACnetOpeningTag, closingTag BACnetClosingTag) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber) InitializeParent(parent BACnetConfirmedServiceRequestReadRangeRange , peekedTagHeader BACnetTagHeader , openingTag BACnetOpeningTag , closingTag BACnetClosingTag ) { m.PeekedTagHeader = peekedTagHeader m.OpeningTag = openingTag m.ClosingTag = closingTag } -func (m *_BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber) GetParent() BACnetConfirmedServiceRequestReadRangeRange { +func (m *_BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber) GetParent() BACnetConfirmedServiceRequestReadRangeRange { return m._BACnetConfirmedServiceRequestReadRangeRange } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber) GetCount( /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber factory function for _BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber -func NewBACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber(referenceSequenceNumber BACnetApplicationTagUnsignedInteger, count BACnetApplicationTagSignedInteger, peekedTagHeader BACnetTagHeader, openingTag BACnetOpeningTag, closingTag BACnetClosingTag) *_BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber { +func NewBACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber( referenceSequenceNumber BACnetApplicationTagUnsignedInteger , count BACnetApplicationTagSignedInteger , peekedTagHeader BACnetTagHeader , openingTag BACnetOpeningTag , closingTag BACnetClosingTag ) *_BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber { _result := &_BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber{ ReferenceSequenceNumber: referenceSequenceNumber, - Count: count, - _BACnetConfirmedServiceRequestReadRangeRange: NewBACnetConfirmedServiceRequestReadRangeRange(peekedTagHeader, openingTag, closingTag), + Count: count, + _BACnetConfirmedServiceRequestReadRangeRange: NewBACnetConfirmedServiceRequestReadRangeRange(peekedTagHeader, openingTag, closingTag), } _result._BACnetConfirmedServiceRequestReadRangeRange._BACnetConfirmedServiceRequestReadRangeRangeChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewBACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber(referenceSeq // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber(structType interface{}) BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber { - if casted, ok := structType.(BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber); ok { @@ -128,6 +131,7 @@ func (m *_BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber) GetLength return lengthInBits } + func (m *_BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -149,7 +153,7 @@ func BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumberParseWithBuffer( if pullErr := readBuffer.PullContext("referenceSequenceNumber"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for referenceSequenceNumber") } - _referenceSequenceNumber, _referenceSequenceNumberErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_referenceSequenceNumber, _referenceSequenceNumberErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _referenceSequenceNumberErr != nil { return nil, errors.Wrap(_referenceSequenceNumberErr, "Error parsing 'referenceSequenceNumber' field of BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber") } @@ -162,7 +166,7 @@ func BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumberParseWithBuffer( if pullErr := readBuffer.PullContext("count"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for count") } - _count, _countErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_count, _countErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _countErr != nil { return nil, errors.Wrap(_countErr, "Error parsing 'count' field of BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber") } @@ -177,9 +181,10 @@ func BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumberParseWithBuffer( // Create a partially initialized instance _child := &_BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber{ - _BACnetConfirmedServiceRequestReadRangeRange: &_BACnetConfirmedServiceRequestReadRangeRange{}, - ReferenceSequenceNumber: referenceSequenceNumber, - Count: count, + _BACnetConfirmedServiceRequestReadRangeRange: &_BACnetConfirmedServiceRequestReadRangeRange{ + }, + ReferenceSequenceNumber: referenceSequenceNumber, + Count: count, } _child._BACnetConfirmedServiceRequestReadRangeRange._BACnetConfirmedServiceRequestReadRangeRangeChildRequirements = _child return _child, nil @@ -201,29 +206,29 @@ func (m *_BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber) Serialize return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber") } - // Simple Field (referenceSequenceNumber) - if pushErr := writeBuffer.PushContext("referenceSequenceNumber"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for referenceSequenceNumber") - } - _referenceSequenceNumberErr := writeBuffer.WriteSerializable(ctx, m.GetReferenceSequenceNumber()) - if popErr := writeBuffer.PopContext("referenceSequenceNumber"); popErr != nil { - return errors.Wrap(popErr, "Error popping for referenceSequenceNumber") - } - if _referenceSequenceNumberErr != nil { - return errors.Wrap(_referenceSequenceNumberErr, "Error serializing 'referenceSequenceNumber' field") - } + // Simple Field (referenceSequenceNumber) + if pushErr := writeBuffer.PushContext("referenceSequenceNumber"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for referenceSequenceNumber") + } + _referenceSequenceNumberErr := writeBuffer.WriteSerializable(ctx, m.GetReferenceSequenceNumber()) + if popErr := writeBuffer.PopContext("referenceSequenceNumber"); popErr != nil { + return errors.Wrap(popErr, "Error popping for referenceSequenceNumber") + } + if _referenceSequenceNumberErr != nil { + return errors.Wrap(_referenceSequenceNumberErr, "Error serializing 'referenceSequenceNumber' field") + } - // Simple Field (count) - if pushErr := writeBuffer.PushContext("count"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for count") - } - _countErr := writeBuffer.WriteSerializable(ctx, m.GetCount()) - if popErr := writeBuffer.PopContext("count"); popErr != nil { - return errors.Wrap(popErr, "Error popping for count") - } - if _countErr != nil { - return errors.Wrap(_countErr, "Error serializing 'count' field") - } + // Simple Field (count) + if pushErr := writeBuffer.PushContext("count"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for count") + } + _countErr := writeBuffer.WriteSerializable(ctx, m.GetCount()) + if popErr := writeBuffer.PopContext("count"); popErr != nil { + return errors.Wrap(popErr, "Error popping for count") + } + if _countErr != nil { + return errors.Wrap(_countErr, "Error serializing 'count' field") + } if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber") @@ -233,6 +238,7 @@ func (m *_BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber) Serialize return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber) isBACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber() bool { return true } @@ -247,3 +253,6 @@ func (m *_BACnetConfirmedServiceRequestReadRangeRangeBySequenceNumber) String() } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReadRangeRangeByTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReadRangeRangeByTime.go index e519be603d3..8e0c33bd8e1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReadRangeRangeByTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReadRangeRangeByTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestReadRangeRangeByTime is the corresponding interface of BACnetConfirmedServiceRequestReadRangeRangeByTime type BACnetConfirmedServiceRequestReadRangeRangeByTime interface { @@ -48,10 +50,12 @@ type BACnetConfirmedServiceRequestReadRangeRangeByTimeExactly interface { // _BACnetConfirmedServiceRequestReadRangeRangeByTime is the data-structure of this message type _BACnetConfirmedServiceRequestReadRangeRangeByTime struct { *_BACnetConfirmedServiceRequestReadRangeRange - ReferenceTime BACnetDateTime - Count BACnetApplicationTagSignedInteger + ReferenceTime BACnetDateTime + Count BACnetApplicationTagSignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -62,16 +66,14 @@ type _BACnetConfirmedServiceRequestReadRangeRangeByTime struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConfirmedServiceRequestReadRangeRangeByTime) InitializeParent(parent BACnetConfirmedServiceRequestReadRangeRange, peekedTagHeader BACnetTagHeader, openingTag BACnetOpeningTag, closingTag BACnetClosingTag) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetConfirmedServiceRequestReadRangeRangeByTime) InitializeParent(parent BACnetConfirmedServiceRequestReadRangeRange , peekedTagHeader BACnetTagHeader , openingTag BACnetOpeningTag , closingTag BACnetClosingTag ) { m.PeekedTagHeader = peekedTagHeader m.OpeningTag = openingTag m.ClosingTag = closingTag } -func (m *_BACnetConfirmedServiceRequestReadRangeRangeByTime) GetParent() BACnetConfirmedServiceRequestReadRangeRange { +func (m *_BACnetConfirmedServiceRequestReadRangeRangeByTime) GetParent() BACnetConfirmedServiceRequestReadRangeRange { return m._BACnetConfirmedServiceRequestReadRangeRange } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_BACnetConfirmedServiceRequestReadRangeRangeByTime) GetCount() BACnetAp /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestReadRangeRangeByTime factory function for _BACnetConfirmedServiceRequestReadRangeRangeByTime -func NewBACnetConfirmedServiceRequestReadRangeRangeByTime(referenceTime BACnetDateTime, count BACnetApplicationTagSignedInteger, peekedTagHeader BACnetTagHeader, openingTag BACnetOpeningTag, closingTag BACnetClosingTag) *_BACnetConfirmedServiceRequestReadRangeRangeByTime { +func NewBACnetConfirmedServiceRequestReadRangeRangeByTime( referenceTime BACnetDateTime , count BACnetApplicationTagSignedInteger , peekedTagHeader BACnetTagHeader , openingTag BACnetOpeningTag , closingTag BACnetClosingTag ) *_BACnetConfirmedServiceRequestReadRangeRangeByTime { _result := &_BACnetConfirmedServiceRequestReadRangeRangeByTime{ ReferenceTime: referenceTime, - Count: count, - _BACnetConfirmedServiceRequestReadRangeRange: NewBACnetConfirmedServiceRequestReadRangeRange(peekedTagHeader, openingTag, closingTag), + Count: count, + _BACnetConfirmedServiceRequestReadRangeRange: NewBACnetConfirmedServiceRequestReadRangeRange(peekedTagHeader, openingTag, closingTag), } _result._BACnetConfirmedServiceRequestReadRangeRange._BACnetConfirmedServiceRequestReadRangeRangeChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewBACnetConfirmedServiceRequestReadRangeRangeByTime(referenceTime BACnetDa // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestReadRangeRangeByTime(structType interface{}) BACnetConfirmedServiceRequestReadRangeRangeByTime { - if casted, ok := structType.(BACnetConfirmedServiceRequestReadRangeRangeByTime); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestReadRangeRangeByTime); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestReadRangeRangeByTime); ok { @@ -128,6 +131,7 @@ func (m *_BACnetConfirmedServiceRequestReadRangeRangeByTime) GetLengthInBits(ctx return lengthInBits } + func (m *_BACnetConfirmedServiceRequestReadRangeRangeByTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -149,7 +153,7 @@ func BACnetConfirmedServiceRequestReadRangeRangeByTimeParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("referenceTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for referenceTime") } - _referenceTime, _referenceTimeErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) +_referenceTime, _referenceTimeErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) if _referenceTimeErr != nil { return nil, errors.Wrap(_referenceTimeErr, "Error parsing 'referenceTime' field of BACnetConfirmedServiceRequestReadRangeRangeByTime") } @@ -162,7 +166,7 @@ func BACnetConfirmedServiceRequestReadRangeRangeByTimeParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("count"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for count") } - _count, _countErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_count, _countErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _countErr != nil { return nil, errors.Wrap(_countErr, "Error parsing 'count' field of BACnetConfirmedServiceRequestReadRangeRangeByTime") } @@ -177,9 +181,10 @@ func BACnetConfirmedServiceRequestReadRangeRangeByTimeParseWithBuffer(ctx contex // Create a partially initialized instance _child := &_BACnetConfirmedServiceRequestReadRangeRangeByTime{ - _BACnetConfirmedServiceRequestReadRangeRange: &_BACnetConfirmedServiceRequestReadRangeRange{}, + _BACnetConfirmedServiceRequestReadRangeRange: &_BACnetConfirmedServiceRequestReadRangeRange{ + }, ReferenceTime: referenceTime, - Count: count, + Count: count, } _child._BACnetConfirmedServiceRequestReadRangeRange._BACnetConfirmedServiceRequestReadRangeRangeChildRequirements = _child return _child, nil @@ -201,29 +206,29 @@ func (m *_BACnetConfirmedServiceRequestReadRangeRangeByTime) SerializeWithWriteB return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestReadRangeRangeByTime") } - // Simple Field (referenceTime) - if pushErr := writeBuffer.PushContext("referenceTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for referenceTime") - } - _referenceTimeErr := writeBuffer.WriteSerializable(ctx, m.GetReferenceTime()) - if popErr := writeBuffer.PopContext("referenceTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for referenceTime") - } - if _referenceTimeErr != nil { - return errors.Wrap(_referenceTimeErr, "Error serializing 'referenceTime' field") - } + // Simple Field (referenceTime) + if pushErr := writeBuffer.PushContext("referenceTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for referenceTime") + } + _referenceTimeErr := writeBuffer.WriteSerializable(ctx, m.GetReferenceTime()) + if popErr := writeBuffer.PopContext("referenceTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for referenceTime") + } + if _referenceTimeErr != nil { + return errors.Wrap(_referenceTimeErr, "Error serializing 'referenceTime' field") + } - // Simple Field (count) - if pushErr := writeBuffer.PushContext("count"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for count") - } - _countErr := writeBuffer.WriteSerializable(ctx, m.GetCount()) - if popErr := writeBuffer.PopContext("count"); popErr != nil { - return errors.Wrap(popErr, "Error popping for count") - } - if _countErr != nil { - return errors.Wrap(_countErr, "Error serializing 'count' field") - } + // Simple Field (count) + if pushErr := writeBuffer.PushContext("count"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for count") + } + _countErr := writeBuffer.WriteSerializable(ctx, m.GetCount()) + if popErr := writeBuffer.PopContext("count"); popErr != nil { + return errors.Wrap(popErr, "Error popping for count") + } + if _countErr != nil { + return errors.Wrap(_countErr, "Error serializing 'count' field") + } if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestReadRangeRangeByTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConfirmedServiceRequestReadRangeRangeByTime") @@ -233,6 +238,7 @@ func (m *_BACnetConfirmedServiceRequestReadRangeRangeByTime) SerializeWithWriteB return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConfirmedServiceRequestReadRangeRangeByTime) isBACnetConfirmedServiceRequestReadRangeRangeByTime() bool { return true } @@ -247,3 +253,6 @@ func (m *_BACnetConfirmedServiceRequestReadRangeRangeByTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReinitializeDevice.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReinitializeDevice.go index 5866884eddb..ccc3f12c627 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReinitializeDevice.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReinitializeDevice.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestReinitializeDevice is the corresponding interface of BACnetConfirmedServiceRequestReinitializeDevice type BACnetConfirmedServiceRequestReinitializeDevice interface { @@ -49,31 +51,30 @@ type BACnetConfirmedServiceRequestReinitializeDeviceExactly interface { // _BACnetConfirmedServiceRequestReinitializeDevice is the data-structure of this message type _BACnetConfirmedServiceRequestReinitializeDevice struct { *_BACnetConfirmedServiceRequest - ReinitializedStateOfDevice BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTagged - Password BACnetContextTagCharacterString + ReinitializedStateOfDevice BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTagged + Password BACnetContextTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConfirmedServiceRequestReinitializeDevice) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_REINITIALIZE_DEVICE -} +func (m *_BACnetConfirmedServiceRequestReinitializeDevice) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_REINITIALIZE_DEVICE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConfirmedServiceRequestReinitializeDevice) InitializeParent(parent BACnetConfirmedServiceRequest) { -} +func (m *_BACnetConfirmedServiceRequestReinitializeDevice) InitializeParent(parent BACnetConfirmedServiceRequest ) {} -func (m *_BACnetConfirmedServiceRequestReinitializeDevice) GetParent() BACnetConfirmedServiceRequest { +func (m *_BACnetConfirmedServiceRequestReinitializeDevice) GetParent() BACnetConfirmedServiceRequest { return m._BACnetConfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,12 +93,13 @@ func (m *_BACnetConfirmedServiceRequestReinitializeDevice) GetPassword() BACnetC /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestReinitializeDevice factory function for _BACnetConfirmedServiceRequestReinitializeDevice -func NewBACnetConfirmedServiceRequestReinitializeDevice(reinitializedStateOfDevice BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTagged, password BACnetContextTagCharacterString, serviceRequestLength uint32) *_BACnetConfirmedServiceRequestReinitializeDevice { +func NewBACnetConfirmedServiceRequestReinitializeDevice( reinitializedStateOfDevice BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTagged , password BACnetContextTagCharacterString , serviceRequestLength uint32 ) *_BACnetConfirmedServiceRequestReinitializeDevice { _result := &_BACnetConfirmedServiceRequestReinitializeDevice{ - ReinitializedStateOfDevice: reinitializedStateOfDevice, - Password: password, - _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), + ReinitializedStateOfDevice: reinitializedStateOfDevice, + Password: password, + _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), } _result._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _result return _result @@ -105,7 +107,7 @@ func NewBACnetConfirmedServiceRequestReinitializeDevice(reinitializedStateOfDevi // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestReinitializeDevice(structType interface{}) BACnetConfirmedServiceRequestReinitializeDevice { - if casted, ok := structType.(BACnetConfirmedServiceRequestReinitializeDevice); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestReinitializeDevice); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestReinitializeDevice); ok { @@ -132,6 +134,7 @@ func (m *_BACnetConfirmedServiceRequestReinitializeDevice) GetLengthInBits(ctx c return lengthInBits } + func (m *_BACnetConfirmedServiceRequestReinitializeDevice) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -153,7 +156,7 @@ func BACnetConfirmedServiceRequestReinitializeDeviceParseWithBuffer(ctx context. if pullErr := readBuffer.PullContext("reinitializedStateOfDevice"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for reinitializedStateOfDevice") } - _reinitializedStateOfDevice, _reinitializedStateOfDeviceErr := BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_reinitializedStateOfDevice, _reinitializedStateOfDeviceErr := BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _reinitializedStateOfDeviceErr != nil { return nil, errors.Wrap(_reinitializedStateOfDeviceErr, "Error parsing 'reinitializedStateOfDevice' field of BACnetConfirmedServiceRequestReinitializeDevice") } @@ -164,12 +167,12 @@ func BACnetConfirmedServiceRequestReinitializeDeviceParseWithBuffer(ctx context. // Optional Field (password) (Can be skipped, if a given expression evaluates to false) var password BACnetContextTagCharacterString = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("password"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for password") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(1), BACnetDataType_CHARACTER_STRING) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(1) , BACnetDataType_CHARACTER_STRING ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -194,7 +197,7 @@ func BACnetConfirmedServiceRequestReinitializeDeviceParseWithBuffer(ctx context. ServiceRequestLength: serviceRequestLength, }, ReinitializedStateOfDevice: reinitializedStateOfDevice, - Password: password, + Password: password, } _child._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _child return _child, nil @@ -216,33 +219,33 @@ func (m *_BACnetConfirmedServiceRequestReinitializeDevice) SerializeWithWriteBuf return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestReinitializeDevice") } - // Simple Field (reinitializedStateOfDevice) - if pushErr := writeBuffer.PushContext("reinitializedStateOfDevice"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for reinitializedStateOfDevice") - } - _reinitializedStateOfDeviceErr := writeBuffer.WriteSerializable(ctx, m.GetReinitializedStateOfDevice()) - if popErr := writeBuffer.PopContext("reinitializedStateOfDevice"); popErr != nil { - return errors.Wrap(popErr, "Error popping for reinitializedStateOfDevice") + // Simple Field (reinitializedStateOfDevice) + if pushErr := writeBuffer.PushContext("reinitializedStateOfDevice"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for reinitializedStateOfDevice") + } + _reinitializedStateOfDeviceErr := writeBuffer.WriteSerializable(ctx, m.GetReinitializedStateOfDevice()) + if popErr := writeBuffer.PopContext("reinitializedStateOfDevice"); popErr != nil { + return errors.Wrap(popErr, "Error popping for reinitializedStateOfDevice") + } + if _reinitializedStateOfDeviceErr != nil { + return errors.Wrap(_reinitializedStateOfDeviceErr, "Error serializing 'reinitializedStateOfDevice' field") + } + + // Optional Field (password) (Can be skipped, if the value is null) + var password BACnetContextTagCharacterString = nil + if m.GetPassword() != nil { + if pushErr := writeBuffer.PushContext("password"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for password") } - if _reinitializedStateOfDeviceErr != nil { - return errors.Wrap(_reinitializedStateOfDeviceErr, "Error serializing 'reinitializedStateOfDevice' field") + password = m.GetPassword() + _passwordErr := writeBuffer.WriteSerializable(ctx, password) + if popErr := writeBuffer.PopContext("password"); popErr != nil { + return errors.Wrap(popErr, "Error popping for password") } - - // Optional Field (password) (Can be skipped, if the value is null) - var password BACnetContextTagCharacterString = nil - if m.GetPassword() != nil { - if pushErr := writeBuffer.PushContext("password"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for password") - } - password = m.GetPassword() - _passwordErr := writeBuffer.WriteSerializable(ctx, password) - if popErr := writeBuffer.PopContext("password"); popErr != nil { - return errors.Wrap(popErr, "Error popping for password") - } - if _passwordErr != nil { - return errors.Wrap(_passwordErr, "Error serializing 'password' field") - } + if _passwordErr != nil { + return errors.Wrap(_passwordErr, "Error serializing 'password' field") } + } if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestReinitializeDevice"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConfirmedServiceRequestReinitializeDevice") @@ -252,6 +255,7 @@ func (m *_BACnetConfirmedServiceRequestReinitializeDevice) SerializeWithWriteBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConfirmedServiceRequestReinitializeDevice) isBACnetConfirmedServiceRequestReinitializeDevice() bool { return true } @@ -266,3 +270,6 @@ func (m *_BACnetConfirmedServiceRequestReinitializeDevice) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice.go index d223cf151d8..a00081ce793 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice.go @@ -34,15 +34,15 @@ type IBACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice utils.Serializable } -const ( - BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice_COLDSTART BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice = 0x0 - BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice_WARMSTART BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice = 0x1 - BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice_ACTIVATE_CHANGES BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice = 0x2 - BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice_STARTBACKUP BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice = 0x3 - BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice_ENDBACKUP BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice = 0x4 - BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice_STARTRESTORE BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice = 0x5 - BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice_ENDRESTORE BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice = 0x6 - BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice_ABORTRESTORE BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice = 0x7 +const( + BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice_COLDSTART BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice = 0x0 + BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice_WARMSTART BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice = 0x1 + BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice_ACTIVATE_CHANGES BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice = 0x2 + BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice_STARTBACKUP BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice = 0x3 + BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice_ENDBACKUP BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice = 0x4 + BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice_STARTRESTORE BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice = 0x5 + BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice_ENDRESTORE BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice = 0x6 + BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice_ABORTRESTORE BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice = 0x7 BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice_VENDOR_PROPRIETARY_VALUE BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice = 0xFF ) @@ -50,7 +50,7 @@ var BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceVal func init() { _ = errors.New - BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceValues = []BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice{ + BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceValues = []BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice { BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice_COLDSTART, BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice_WARMSTART, BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice_ACTIVATE_CHANGES, @@ -65,24 +65,24 @@ func init() { func BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceByValue(value uint8) (enum BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice, ok bool) { switch value { - case 0x0: - return BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice_COLDSTART, true - case 0x1: - return BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice_WARMSTART, true - case 0x2: - return BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice_ACTIVATE_CHANGES, true - case 0x3: - return BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice_STARTBACKUP, true - case 0x4: - return BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice_ENDBACKUP, true - case 0x5: - return BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice_STARTRESTORE, true - case 0x6: - return BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice_ENDRESTORE, true - case 0x7: - return BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice_ABORTRESTORE, true - case 0xFF: - return BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice_VENDOR_PROPRIETARY_VALUE, true + case 0x0: + return BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice_COLDSTART, true + case 0x1: + return BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice_WARMSTART, true + case 0x2: + return BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice_ACTIVATE_CHANGES, true + case 0x3: + return BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice_STARTBACKUP, true + case 0x4: + return BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice_ENDBACKUP, true + case 0x5: + return BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice_STARTRESTORE, true + case 0x6: + return BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice_ENDRESTORE, true + case 0x7: + return BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice_ABORTRESTORE, true + case 0xFF: + return BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice_VENDOR_PROPRIETARY_VALUE, true } return 0, false } @@ -111,13 +111,13 @@ func BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceBy return 0, false } -func BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceKnows(value uint8) bool { +func BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceKnows(value uint8) bool { for _, typeValue := range BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice(structType interface{}) BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice { @@ -195,3 +195,4 @@ func (e BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevic func (e BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTagged.go index dcbb478df11..848e1ef03e8 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTagged is the corresponding interface of BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTagged type BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTagged interface { @@ -46,14 +48,15 @@ type BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTa // _BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTagged is the data-structure of this message type _BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTagged struct { - Header BACnetTagHeader - Value BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice + Header BACnetTagHeader + Value BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDev /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTagged factory function for _BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTagged -func NewBACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTagged(header BACnetTagHeader, value BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice, tagNumber uint8, tagClass TagClass) *_BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTagged { - return &_BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTagged( header BACnetTagHeader , value BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice , tagNumber uint8 , tagClass TagClass ) *_BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTagged { +return &_BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTagged(structType interface{}) BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTagged { - if casted, ok := structType.(BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTagged); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTagged); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTagged); ok { @@ -104,6 +108,7 @@ func (m *_BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDev return lengthInBits } + func (m *_BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTa if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTagged") } @@ -135,12 +140,12 @@ func BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTa } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTa } var value BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice if _value != nil { - value = _value.(BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice) + value = _value.(BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDevice) } if closeErr := readBuffer.CloseContext("BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTa // Create the instance return &_BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDev func (m *_BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTagged") } @@ -206,6 +211,7 @@ func (m *_BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDev return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDev func (m *_BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDeviceTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_BACnetConfirmedServiceRequestReinitializeDeviceReinitializedStateOfDev } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestRemoveListElement.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestRemoveListElement.go index 9dcaf143730..114d548ca2b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestRemoveListElement.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestRemoveListElement.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestRemoveListElement is the corresponding interface of BACnetConfirmedServiceRequestRemoveListElement type BACnetConfirmedServiceRequestRemoveListElement interface { @@ -53,33 +55,32 @@ type BACnetConfirmedServiceRequestRemoveListElementExactly interface { // _BACnetConfirmedServiceRequestRemoveListElement is the data-structure of this message type _BACnetConfirmedServiceRequestRemoveListElement struct { *_BACnetConfirmedServiceRequest - ObjectIdentifier BACnetContextTagObjectIdentifier - PropertyIdentifier BACnetPropertyIdentifierTagged - ArrayIndex BACnetContextTagUnsignedInteger - ListOfElements BACnetConstructedData + ObjectIdentifier BACnetContextTagObjectIdentifier + PropertyIdentifier BACnetPropertyIdentifierTagged + ArrayIndex BACnetContextTagUnsignedInteger + ListOfElements BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConfirmedServiceRequestRemoveListElement) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_REMOVE_LIST_ELEMENT -} +func (m *_BACnetConfirmedServiceRequestRemoveListElement) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_REMOVE_LIST_ELEMENT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConfirmedServiceRequestRemoveListElement) InitializeParent(parent BACnetConfirmedServiceRequest) { -} +func (m *_BACnetConfirmedServiceRequestRemoveListElement) InitializeParent(parent BACnetConfirmedServiceRequest ) {} -func (m *_BACnetConfirmedServiceRequestRemoveListElement) GetParent() BACnetConfirmedServiceRequest { +func (m *_BACnetConfirmedServiceRequestRemoveListElement) GetParent() BACnetConfirmedServiceRequest { return m._BACnetConfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -106,14 +107,15 @@ func (m *_BACnetConfirmedServiceRequestRemoveListElement) GetListOfElements() BA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestRemoveListElement factory function for _BACnetConfirmedServiceRequestRemoveListElement -func NewBACnetConfirmedServiceRequestRemoveListElement(objectIdentifier BACnetContextTagObjectIdentifier, propertyIdentifier BACnetPropertyIdentifierTagged, arrayIndex BACnetContextTagUnsignedInteger, listOfElements BACnetConstructedData, serviceRequestLength uint32) *_BACnetConfirmedServiceRequestRemoveListElement { +func NewBACnetConfirmedServiceRequestRemoveListElement( objectIdentifier BACnetContextTagObjectIdentifier , propertyIdentifier BACnetPropertyIdentifierTagged , arrayIndex BACnetContextTagUnsignedInteger , listOfElements BACnetConstructedData , serviceRequestLength uint32 ) *_BACnetConfirmedServiceRequestRemoveListElement { _result := &_BACnetConfirmedServiceRequestRemoveListElement{ - ObjectIdentifier: objectIdentifier, - PropertyIdentifier: propertyIdentifier, - ArrayIndex: arrayIndex, - ListOfElements: listOfElements, - _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), + ObjectIdentifier: objectIdentifier, + PropertyIdentifier: propertyIdentifier, + ArrayIndex: arrayIndex, + ListOfElements: listOfElements, + _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), } _result._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _result return _result @@ -121,7 +123,7 @@ func NewBACnetConfirmedServiceRequestRemoveListElement(objectIdentifier BACnetCo // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestRemoveListElement(structType interface{}) BACnetConfirmedServiceRequestRemoveListElement { - if casted, ok := structType.(BACnetConfirmedServiceRequestRemoveListElement); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestRemoveListElement); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestRemoveListElement); ok { @@ -156,6 +158,7 @@ func (m *_BACnetConfirmedServiceRequestRemoveListElement) GetLengthInBits(ctx co return lengthInBits } + func (m *_BACnetConfirmedServiceRequestRemoveListElement) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -177,7 +180,7 @@ func BACnetConfirmedServiceRequestRemoveListElementParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("objectIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for objectIdentifier") } - _objectIdentifier, _objectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER)) +_objectIdentifier, _objectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_BACNET_OBJECT_IDENTIFIER ) ) if _objectIdentifierErr != nil { return nil, errors.Wrap(_objectIdentifierErr, "Error parsing 'objectIdentifier' field of BACnetConfirmedServiceRequestRemoveListElement") } @@ -190,7 +193,7 @@ func BACnetConfirmedServiceRequestRemoveListElementParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("propertyIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for propertyIdentifier") } - _propertyIdentifier, _propertyIdentifierErr := BACnetPropertyIdentifierTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_propertyIdentifier, _propertyIdentifierErr := BACnetPropertyIdentifierTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _propertyIdentifierErr != nil { return nil, errors.Wrap(_propertyIdentifierErr, "Error parsing 'propertyIdentifier' field of BACnetConfirmedServiceRequestRemoveListElement") } @@ -201,12 +204,12 @@ func BACnetConfirmedServiceRequestRemoveListElementParseWithBuffer(ctx context.C // Optional Field (arrayIndex) (Can be skipped, if a given expression evaluates to false) var arrayIndex BACnetContextTagUnsignedInteger = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("arrayIndex"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for arrayIndex") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(2), BACnetDataType_UNSIGNED_INTEGER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(2) , BACnetDataType_UNSIGNED_INTEGER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -223,12 +226,12 @@ func BACnetConfirmedServiceRequestRemoveListElementParseWithBuffer(ctx context.C // Optional Field (listOfElements) (Can be skipped, if a given expression evaluates to false) var listOfElements BACnetConstructedData = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("listOfElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for listOfElements") } - _val, _err := BACnetConstructedDataParseWithBuffer(ctx, readBuffer, uint8(3), objectIdentifier.GetObjectType(), propertyIdentifier.GetValue(), (CastBACnetTagPayloadUnsignedInteger(utils.InlineIf(bool((arrayIndex) != (nil)), func() interface{} { return CastBACnetTagPayloadUnsignedInteger((arrayIndex).GetPayload()) }, func() interface{} { return CastBACnetTagPayloadUnsignedInteger(nil) })))) +_val, _err := BACnetConstructedDataParseWithBuffer(ctx, readBuffer , uint8(3) , objectIdentifier.GetObjectType() , propertyIdentifier.GetValue() , (CastBACnetTagPayloadUnsignedInteger(utils.InlineIf(bool(((arrayIndex)) != (nil)), func() interface{} {return CastBACnetTagPayloadUnsignedInteger((arrayIndex).GetPayload())}, func() interface{} {return CastBACnetTagPayloadUnsignedInteger(nil)}))) ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -252,10 +255,10 @@ func BACnetConfirmedServiceRequestRemoveListElementParseWithBuffer(ctx context.C _BACnetConfirmedServiceRequest: &_BACnetConfirmedServiceRequest{ ServiceRequestLength: serviceRequestLength, }, - ObjectIdentifier: objectIdentifier, + ObjectIdentifier: objectIdentifier, PropertyIdentifier: propertyIdentifier, - ArrayIndex: arrayIndex, - ListOfElements: listOfElements, + ArrayIndex: arrayIndex, + ListOfElements: listOfElements, } _child._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _child return _child, nil @@ -277,61 +280,61 @@ func (m *_BACnetConfirmedServiceRequestRemoveListElement) SerializeWithWriteBuff return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestRemoveListElement") } - // Simple Field (objectIdentifier) - if pushErr := writeBuffer.PushContext("objectIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for objectIdentifier") - } - _objectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetObjectIdentifier()) - if popErr := writeBuffer.PopContext("objectIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for objectIdentifier") - } - if _objectIdentifierErr != nil { - return errors.Wrap(_objectIdentifierErr, "Error serializing 'objectIdentifier' field") - } + // Simple Field (objectIdentifier) + if pushErr := writeBuffer.PushContext("objectIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for objectIdentifier") + } + _objectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetObjectIdentifier()) + if popErr := writeBuffer.PopContext("objectIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for objectIdentifier") + } + if _objectIdentifierErr != nil { + return errors.Wrap(_objectIdentifierErr, "Error serializing 'objectIdentifier' field") + } + + // Simple Field (propertyIdentifier) + if pushErr := writeBuffer.PushContext("propertyIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for propertyIdentifier") + } + _propertyIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetPropertyIdentifier()) + if popErr := writeBuffer.PopContext("propertyIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for propertyIdentifier") + } + if _propertyIdentifierErr != nil { + return errors.Wrap(_propertyIdentifierErr, "Error serializing 'propertyIdentifier' field") + } - // Simple Field (propertyIdentifier) - if pushErr := writeBuffer.PushContext("propertyIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for propertyIdentifier") + // Optional Field (arrayIndex) (Can be skipped, if the value is null) + var arrayIndex BACnetContextTagUnsignedInteger = nil + if m.GetArrayIndex() != nil { + if pushErr := writeBuffer.PushContext("arrayIndex"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for arrayIndex") } - _propertyIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetPropertyIdentifier()) - if popErr := writeBuffer.PopContext("propertyIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for propertyIdentifier") + arrayIndex = m.GetArrayIndex() + _arrayIndexErr := writeBuffer.WriteSerializable(ctx, arrayIndex) + if popErr := writeBuffer.PopContext("arrayIndex"); popErr != nil { + return errors.Wrap(popErr, "Error popping for arrayIndex") } - if _propertyIdentifierErr != nil { - return errors.Wrap(_propertyIdentifierErr, "Error serializing 'propertyIdentifier' field") + if _arrayIndexErr != nil { + return errors.Wrap(_arrayIndexErr, "Error serializing 'arrayIndex' field") } + } - // Optional Field (arrayIndex) (Can be skipped, if the value is null) - var arrayIndex BACnetContextTagUnsignedInteger = nil - if m.GetArrayIndex() != nil { - if pushErr := writeBuffer.PushContext("arrayIndex"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for arrayIndex") - } - arrayIndex = m.GetArrayIndex() - _arrayIndexErr := writeBuffer.WriteSerializable(ctx, arrayIndex) - if popErr := writeBuffer.PopContext("arrayIndex"); popErr != nil { - return errors.Wrap(popErr, "Error popping for arrayIndex") - } - if _arrayIndexErr != nil { - return errors.Wrap(_arrayIndexErr, "Error serializing 'arrayIndex' field") - } + // Optional Field (listOfElements) (Can be skipped, if the value is null) + var listOfElements BACnetConstructedData = nil + if m.GetListOfElements() != nil { + if pushErr := writeBuffer.PushContext("listOfElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for listOfElements") } - - // Optional Field (listOfElements) (Can be skipped, if the value is null) - var listOfElements BACnetConstructedData = nil - if m.GetListOfElements() != nil { - if pushErr := writeBuffer.PushContext("listOfElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for listOfElements") - } - listOfElements = m.GetListOfElements() - _listOfElementsErr := writeBuffer.WriteSerializable(ctx, listOfElements) - if popErr := writeBuffer.PopContext("listOfElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for listOfElements") - } - if _listOfElementsErr != nil { - return errors.Wrap(_listOfElementsErr, "Error serializing 'listOfElements' field") - } + listOfElements = m.GetListOfElements() + _listOfElementsErr := writeBuffer.WriteSerializable(ctx, listOfElements) + if popErr := writeBuffer.PopContext("listOfElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for listOfElements") + } + if _listOfElementsErr != nil { + return errors.Wrap(_listOfElementsErr, "Error serializing 'listOfElements' field") } + } if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestRemoveListElement"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConfirmedServiceRequestRemoveListElement") @@ -341,6 +344,7 @@ func (m *_BACnetConfirmedServiceRequestRemoveListElement) SerializeWithWriteBuff return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConfirmedServiceRequestRemoveListElement) isBACnetConfirmedServiceRequestRemoveListElement() bool { return true } @@ -355,3 +359,6 @@ func (m *_BACnetConfirmedServiceRequestRemoveListElement) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestRequestKey.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestRequestKey.go index c8f0da2e6a4..9633d90dc2a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestRequestKey.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestRequestKey.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestRequestKey is the corresponding interface of BACnetConfirmedServiceRequestRequestKey type BACnetConfirmedServiceRequestRequestKey interface { @@ -46,33 +48,32 @@ type BACnetConfirmedServiceRequestRequestKeyExactly interface { // _BACnetConfirmedServiceRequestRequestKey is the data-structure of this message type _BACnetConfirmedServiceRequestRequestKey struct { *_BACnetConfirmedServiceRequest - BytesOfRemovedService []byte + BytesOfRemovedService []byte // Arguments. ServiceRequestPayloadLength uint32 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConfirmedServiceRequestRequestKey) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_REQUEST_KEY -} +func (m *_BACnetConfirmedServiceRequestRequestKey) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_REQUEST_KEY} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConfirmedServiceRequestRequestKey) InitializeParent(parent BACnetConfirmedServiceRequest) { -} +func (m *_BACnetConfirmedServiceRequestRequestKey) InitializeParent(parent BACnetConfirmedServiceRequest ) {} -func (m *_BACnetConfirmedServiceRequestRequestKey) GetParent() BACnetConfirmedServiceRequest { +func (m *_BACnetConfirmedServiceRequestRequestKey) GetParent() BACnetConfirmedServiceRequest { return m._BACnetConfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -87,11 +88,12 @@ func (m *_BACnetConfirmedServiceRequestRequestKey) GetBytesOfRemovedService() [] /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestRequestKey factory function for _BACnetConfirmedServiceRequestRequestKey -func NewBACnetConfirmedServiceRequestRequestKey(bytesOfRemovedService []byte, serviceRequestPayloadLength uint32, serviceRequestLength uint32) *_BACnetConfirmedServiceRequestRequestKey { +func NewBACnetConfirmedServiceRequestRequestKey( bytesOfRemovedService []byte , serviceRequestPayloadLength uint32 , serviceRequestLength uint32 ) *_BACnetConfirmedServiceRequestRequestKey { _result := &_BACnetConfirmedServiceRequestRequestKey{ - BytesOfRemovedService: bytesOfRemovedService, - _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), + BytesOfRemovedService: bytesOfRemovedService, + _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), } _result._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _result return _result @@ -99,7 +101,7 @@ func NewBACnetConfirmedServiceRequestRequestKey(bytesOfRemovedService []byte, se // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestRequestKey(structType interface{}) BACnetConfirmedServiceRequestRequestKey { - if casted, ok := structType.(BACnetConfirmedServiceRequestRequestKey); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestRequestKey); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestRequestKey); ok { @@ -123,6 +125,7 @@ func (m *_BACnetConfirmedServiceRequestRequestKey) GetLengthInBits(ctx context.C return lengthInBits } + func (m *_BACnetConfirmedServiceRequestRequestKey) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -177,11 +180,11 @@ func (m *_BACnetConfirmedServiceRequestRequestKey) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestRequestKey") } - // Array Field (bytesOfRemovedService) - // Byte Array field (bytesOfRemovedService) - if err := writeBuffer.WriteByteArray("bytesOfRemovedService", m.GetBytesOfRemovedService()); err != nil { - return errors.Wrap(err, "Error serializing 'bytesOfRemovedService' field") - } + // Array Field (bytesOfRemovedService) + // Byte Array field (bytesOfRemovedService) + if err := writeBuffer.WriteByteArray("bytesOfRemovedService", m.GetBytesOfRemovedService()); err != nil { + return errors.Wrap(err, "Error serializing 'bytesOfRemovedService' field") + } if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestRequestKey"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConfirmedServiceRequestRequestKey") @@ -191,13 +194,13 @@ func (m *_BACnetConfirmedServiceRequestRequestKey) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + //// // Arguments Getter func (m *_BACnetConfirmedServiceRequestRequestKey) GetServiceRequestPayloadLength() uint32 { return m.ServiceRequestPayloadLength } - // //// @@ -215,3 +218,6 @@ func (m *_BACnetConfirmedServiceRequestRequestKey) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestSubscribeCOV.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestSubscribeCOV.go index 342ede166d5..533cb82c185 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestSubscribeCOV.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestSubscribeCOV.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestSubscribeCOV is the corresponding interface of BACnetConfirmedServiceRequestSubscribeCOV type BACnetConfirmedServiceRequestSubscribeCOV interface { @@ -53,33 +55,32 @@ type BACnetConfirmedServiceRequestSubscribeCOVExactly interface { // _BACnetConfirmedServiceRequestSubscribeCOV is the data-structure of this message type _BACnetConfirmedServiceRequestSubscribeCOV struct { *_BACnetConfirmedServiceRequest - SubscriberProcessIdentifier BACnetContextTagUnsignedInteger - MonitoredObjectIdentifier BACnetContextTagObjectIdentifier - IssueConfirmed BACnetContextTagBoolean - LifetimeInSeconds BACnetContextTagUnsignedInteger + SubscriberProcessIdentifier BACnetContextTagUnsignedInteger + MonitoredObjectIdentifier BACnetContextTagObjectIdentifier + IssueConfirmed BACnetContextTagBoolean + LifetimeInSeconds BACnetContextTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConfirmedServiceRequestSubscribeCOV) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_SUBSCRIBE_COV -} +func (m *_BACnetConfirmedServiceRequestSubscribeCOV) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_SUBSCRIBE_COV} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConfirmedServiceRequestSubscribeCOV) InitializeParent(parent BACnetConfirmedServiceRequest) { -} +func (m *_BACnetConfirmedServiceRequestSubscribeCOV) InitializeParent(parent BACnetConfirmedServiceRequest ) {} -func (m *_BACnetConfirmedServiceRequestSubscribeCOV) GetParent() BACnetConfirmedServiceRequest { +func (m *_BACnetConfirmedServiceRequestSubscribeCOV) GetParent() BACnetConfirmedServiceRequest { return m._BACnetConfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -106,14 +107,15 @@ func (m *_BACnetConfirmedServiceRequestSubscribeCOV) GetLifetimeInSeconds() BACn /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestSubscribeCOV factory function for _BACnetConfirmedServiceRequestSubscribeCOV -func NewBACnetConfirmedServiceRequestSubscribeCOV(subscriberProcessIdentifier BACnetContextTagUnsignedInteger, monitoredObjectIdentifier BACnetContextTagObjectIdentifier, issueConfirmed BACnetContextTagBoolean, lifetimeInSeconds BACnetContextTagUnsignedInteger, serviceRequestLength uint32) *_BACnetConfirmedServiceRequestSubscribeCOV { +func NewBACnetConfirmedServiceRequestSubscribeCOV( subscriberProcessIdentifier BACnetContextTagUnsignedInteger , monitoredObjectIdentifier BACnetContextTagObjectIdentifier , issueConfirmed BACnetContextTagBoolean , lifetimeInSeconds BACnetContextTagUnsignedInteger , serviceRequestLength uint32 ) *_BACnetConfirmedServiceRequestSubscribeCOV { _result := &_BACnetConfirmedServiceRequestSubscribeCOV{ - SubscriberProcessIdentifier: subscriberProcessIdentifier, - MonitoredObjectIdentifier: monitoredObjectIdentifier, - IssueConfirmed: issueConfirmed, - LifetimeInSeconds: lifetimeInSeconds, - _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), + SubscriberProcessIdentifier: subscriberProcessIdentifier, + MonitoredObjectIdentifier: monitoredObjectIdentifier, + IssueConfirmed: issueConfirmed, + LifetimeInSeconds: lifetimeInSeconds, + _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), } _result._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _result return _result @@ -121,7 +123,7 @@ func NewBACnetConfirmedServiceRequestSubscribeCOV(subscriberProcessIdentifier BA // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestSubscribeCOV(structType interface{}) BACnetConfirmedServiceRequestSubscribeCOV { - if casted, ok := structType.(BACnetConfirmedServiceRequestSubscribeCOV); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestSubscribeCOV); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestSubscribeCOV); ok { @@ -156,6 +158,7 @@ func (m *_BACnetConfirmedServiceRequestSubscribeCOV) GetLengthInBits(ctx context return lengthInBits } + func (m *_BACnetConfirmedServiceRequestSubscribeCOV) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -177,7 +180,7 @@ func BACnetConfirmedServiceRequestSubscribeCOVParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("subscriberProcessIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for subscriberProcessIdentifier") } - _subscriberProcessIdentifier, _subscriberProcessIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_subscriberProcessIdentifier, _subscriberProcessIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _subscriberProcessIdentifierErr != nil { return nil, errors.Wrap(_subscriberProcessIdentifierErr, "Error parsing 'subscriberProcessIdentifier' field of BACnetConfirmedServiceRequestSubscribeCOV") } @@ -190,7 +193,7 @@ func BACnetConfirmedServiceRequestSubscribeCOVParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("monitoredObjectIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for monitoredObjectIdentifier") } - _monitoredObjectIdentifier, _monitoredObjectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER)) +_monitoredObjectIdentifier, _monitoredObjectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_BACNET_OBJECT_IDENTIFIER ) ) if _monitoredObjectIdentifierErr != nil { return nil, errors.Wrap(_monitoredObjectIdentifierErr, "Error parsing 'monitoredObjectIdentifier' field of BACnetConfirmedServiceRequestSubscribeCOV") } @@ -201,12 +204,12 @@ func BACnetConfirmedServiceRequestSubscribeCOVParseWithBuffer(ctx context.Contex // Optional Field (issueConfirmed) (Can be skipped, if a given expression evaluates to false) var issueConfirmed BACnetContextTagBoolean = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("issueConfirmed"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for issueConfirmed") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(2), BACnetDataType_BOOLEAN) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(2) , BACnetDataType_BOOLEAN ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -223,12 +226,12 @@ func BACnetConfirmedServiceRequestSubscribeCOVParseWithBuffer(ctx context.Contex // Optional Field (lifetimeInSeconds) (Can be skipped, if a given expression evaluates to false) var lifetimeInSeconds BACnetContextTagUnsignedInteger = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("lifetimeInSeconds"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lifetimeInSeconds") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(3), BACnetDataType_UNSIGNED_INTEGER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(3) , BACnetDataType_UNSIGNED_INTEGER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -253,9 +256,9 @@ func BACnetConfirmedServiceRequestSubscribeCOVParseWithBuffer(ctx context.Contex ServiceRequestLength: serviceRequestLength, }, SubscriberProcessIdentifier: subscriberProcessIdentifier, - MonitoredObjectIdentifier: monitoredObjectIdentifier, - IssueConfirmed: issueConfirmed, - LifetimeInSeconds: lifetimeInSeconds, + MonitoredObjectIdentifier: monitoredObjectIdentifier, + IssueConfirmed: issueConfirmed, + LifetimeInSeconds: lifetimeInSeconds, } _child._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _child return _child, nil @@ -277,61 +280,61 @@ func (m *_BACnetConfirmedServiceRequestSubscribeCOV) SerializeWithWriteBuffer(ct return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestSubscribeCOV") } - // Simple Field (subscriberProcessIdentifier) - if pushErr := writeBuffer.PushContext("subscriberProcessIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for subscriberProcessIdentifier") - } - _subscriberProcessIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetSubscriberProcessIdentifier()) - if popErr := writeBuffer.PopContext("subscriberProcessIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for subscriberProcessIdentifier") - } - if _subscriberProcessIdentifierErr != nil { - return errors.Wrap(_subscriberProcessIdentifierErr, "Error serializing 'subscriberProcessIdentifier' field") - } + // Simple Field (subscriberProcessIdentifier) + if pushErr := writeBuffer.PushContext("subscriberProcessIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for subscriberProcessIdentifier") + } + _subscriberProcessIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetSubscriberProcessIdentifier()) + if popErr := writeBuffer.PopContext("subscriberProcessIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for subscriberProcessIdentifier") + } + if _subscriberProcessIdentifierErr != nil { + return errors.Wrap(_subscriberProcessIdentifierErr, "Error serializing 'subscriberProcessIdentifier' field") + } + + // Simple Field (monitoredObjectIdentifier) + if pushErr := writeBuffer.PushContext("monitoredObjectIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for monitoredObjectIdentifier") + } + _monitoredObjectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetMonitoredObjectIdentifier()) + if popErr := writeBuffer.PopContext("monitoredObjectIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for monitoredObjectIdentifier") + } + if _monitoredObjectIdentifierErr != nil { + return errors.Wrap(_monitoredObjectIdentifierErr, "Error serializing 'monitoredObjectIdentifier' field") + } - // Simple Field (monitoredObjectIdentifier) - if pushErr := writeBuffer.PushContext("monitoredObjectIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for monitoredObjectIdentifier") + // Optional Field (issueConfirmed) (Can be skipped, if the value is null) + var issueConfirmed BACnetContextTagBoolean = nil + if m.GetIssueConfirmed() != nil { + if pushErr := writeBuffer.PushContext("issueConfirmed"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for issueConfirmed") } - _monitoredObjectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetMonitoredObjectIdentifier()) - if popErr := writeBuffer.PopContext("monitoredObjectIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for monitoredObjectIdentifier") + issueConfirmed = m.GetIssueConfirmed() + _issueConfirmedErr := writeBuffer.WriteSerializable(ctx, issueConfirmed) + if popErr := writeBuffer.PopContext("issueConfirmed"); popErr != nil { + return errors.Wrap(popErr, "Error popping for issueConfirmed") } - if _monitoredObjectIdentifierErr != nil { - return errors.Wrap(_monitoredObjectIdentifierErr, "Error serializing 'monitoredObjectIdentifier' field") + if _issueConfirmedErr != nil { + return errors.Wrap(_issueConfirmedErr, "Error serializing 'issueConfirmed' field") } + } - // Optional Field (issueConfirmed) (Can be skipped, if the value is null) - var issueConfirmed BACnetContextTagBoolean = nil - if m.GetIssueConfirmed() != nil { - if pushErr := writeBuffer.PushContext("issueConfirmed"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for issueConfirmed") - } - issueConfirmed = m.GetIssueConfirmed() - _issueConfirmedErr := writeBuffer.WriteSerializable(ctx, issueConfirmed) - if popErr := writeBuffer.PopContext("issueConfirmed"); popErr != nil { - return errors.Wrap(popErr, "Error popping for issueConfirmed") - } - if _issueConfirmedErr != nil { - return errors.Wrap(_issueConfirmedErr, "Error serializing 'issueConfirmed' field") - } + // Optional Field (lifetimeInSeconds) (Can be skipped, if the value is null) + var lifetimeInSeconds BACnetContextTagUnsignedInteger = nil + if m.GetLifetimeInSeconds() != nil { + if pushErr := writeBuffer.PushContext("lifetimeInSeconds"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lifetimeInSeconds") } - - // Optional Field (lifetimeInSeconds) (Can be skipped, if the value is null) - var lifetimeInSeconds BACnetContextTagUnsignedInteger = nil - if m.GetLifetimeInSeconds() != nil { - if pushErr := writeBuffer.PushContext("lifetimeInSeconds"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lifetimeInSeconds") - } - lifetimeInSeconds = m.GetLifetimeInSeconds() - _lifetimeInSecondsErr := writeBuffer.WriteSerializable(ctx, lifetimeInSeconds) - if popErr := writeBuffer.PopContext("lifetimeInSeconds"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lifetimeInSeconds") - } - if _lifetimeInSecondsErr != nil { - return errors.Wrap(_lifetimeInSecondsErr, "Error serializing 'lifetimeInSeconds' field") - } + lifetimeInSeconds = m.GetLifetimeInSeconds() + _lifetimeInSecondsErr := writeBuffer.WriteSerializable(ctx, lifetimeInSeconds) + if popErr := writeBuffer.PopContext("lifetimeInSeconds"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lifetimeInSeconds") + } + if _lifetimeInSecondsErr != nil { + return errors.Wrap(_lifetimeInSecondsErr, "Error serializing 'lifetimeInSeconds' field") } + } if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestSubscribeCOV"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConfirmedServiceRequestSubscribeCOV") @@ -341,6 +344,7 @@ func (m *_BACnetConfirmedServiceRequestSubscribeCOV) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConfirmedServiceRequestSubscribeCOV) isBACnetConfirmedServiceRequestSubscribeCOV() bool { return true } @@ -355,3 +359,6 @@ func (m *_BACnetConfirmedServiceRequestSubscribeCOV) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestSubscribeCOVProperty.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestSubscribeCOVProperty.go index 5667ad8ccca..0b16d91168d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestSubscribeCOVProperty.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestSubscribeCOVProperty.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestSubscribeCOVProperty is the corresponding interface of BACnetConfirmedServiceRequestSubscribeCOVProperty type BACnetConfirmedServiceRequestSubscribeCOVProperty interface { @@ -57,35 +59,34 @@ type BACnetConfirmedServiceRequestSubscribeCOVPropertyExactly interface { // _BACnetConfirmedServiceRequestSubscribeCOVProperty is the data-structure of this message type _BACnetConfirmedServiceRequestSubscribeCOVProperty struct { *_BACnetConfirmedServiceRequest - SubscriberProcessIdentifier BACnetContextTagUnsignedInteger - MonitoredObjectIdentifier BACnetContextTagObjectIdentifier - IssueConfirmedNotifications BACnetContextTagBoolean - Lifetime BACnetContextTagUnsignedInteger - MonitoredPropertyIdentifier BACnetPropertyReferenceEnclosed - CovIncrement BACnetContextTagReal + SubscriberProcessIdentifier BACnetContextTagUnsignedInteger + MonitoredObjectIdentifier BACnetContextTagObjectIdentifier + IssueConfirmedNotifications BACnetContextTagBoolean + Lifetime BACnetContextTagUnsignedInteger + MonitoredPropertyIdentifier BACnetPropertyReferenceEnclosed + CovIncrement BACnetContextTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConfirmedServiceRequestSubscribeCOVProperty) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_SUBSCRIBE_COV_PROPERTY -} +func (m *_BACnetConfirmedServiceRequestSubscribeCOVProperty) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_SUBSCRIBE_COV_PROPERTY} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConfirmedServiceRequestSubscribeCOVProperty) InitializeParent(parent BACnetConfirmedServiceRequest) { -} +func (m *_BACnetConfirmedServiceRequestSubscribeCOVProperty) InitializeParent(parent BACnetConfirmedServiceRequest ) {} -func (m *_BACnetConfirmedServiceRequestSubscribeCOVProperty) GetParent() BACnetConfirmedServiceRequest { +func (m *_BACnetConfirmedServiceRequestSubscribeCOVProperty) GetParent() BACnetConfirmedServiceRequest { return m._BACnetConfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -120,16 +121,17 @@ func (m *_BACnetConfirmedServiceRequestSubscribeCOVProperty) GetCovIncrement() B /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestSubscribeCOVProperty factory function for _BACnetConfirmedServiceRequestSubscribeCOVProperty -func NewBACnetConfirmedServiceRequestSubscribeCOVProperty(subscriberProcessIdentifier BACnetContextTagUnsignedInteger, monitoredObjectIdentifier BACnetContextTagObjectIdentifier, issueConfirmedNotifications BACnetContextTagBoolean, lifetime BACnetContextTagUnsignedInteger, monitoredPropertyIdentifier BACnetPropertyReferenceEnclosed, covIncrement BACnetContextTagReal, serviceRequestLength uint32) *_BACnetConfirmedServiceRequestSubscribeCOVProperty { +func NewBACnetConfirmedServiceRequestSubscribeCOVProperty( subscriberProcessIdentifier BACnetContextTagUnsignedInteger , monitoredObjectIdentifier BACnetContextTagObjectIdentifier , issueConfirmedNotifications BACnetContextTagBoolean , lifetime BACnetContextTagUnsignedInteger , monitoredPropertyIdentifier BACnetPropertyReferenceEnclosed , covIncrement BACnetContextTagReal , serviceRequestLength uint32 ) *_BACnetConfirmedServiceRequestSubscribeCOVProperty { _result := &_BACnetConfirmedServiceRequestSubscribeCOVProperty{ - SubscriberProcessIdentifier: subscriberProcessIdentifier, - MonitoredObjectIdentifier: monitoredObjectIdentifier, - IssueConfirmedNotifications: issueConfirmedNotifications, - Lifetime: lifetime, - MonitoredPropertyIdentifier: monitoredPropertyIdentifier, - CovIncrement: covIncrement, - _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), + SubscriberProcessIdentifier: subscriberProcessIdentifier, + MonitoredObjectIdentifier: monitoredObjectIdentifier, + IssueConfirmedNotifications: issueConfirmedNotifications, + Lifetime: lifetime, + MonitoredPropertyIdentifier: monitoredPropertyIdentifier, + CovIncrement: covIncrement, + _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), } _result._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _result return _result @@ -137,7 +139,7 @@ func NewBACnetConfirmedServiceRequestSubscribeCOVProperty(subscriberProcessIdent // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestSubscribeCOVProperty(structType interface{}) BACnetConfirmedServiceRequestSubscribeCOVProperty { - if casted, ok := structType.(BACnetConfirmedServiceRequestSubscribeCOVProperty); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestSubscribeCOVProperty); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestSubscribeCOVProperty); ok { @@ -180,6 +182,7 @@ func (m *_BACnetConfirmedServiceRequestSubscribeCOVProperty) GetLengthInBits(ctx return lengthInBits } + func (m *_BACnetConfirmedServiceRequestSubscribeCOVProperty) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -201,7 +204,7 @@ func BACnetConfirmedServiceRequestSubscribeCOVPropertyParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("subscriberProcessIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for subscriberProcessIdentifier") } - _subscriberProcessIdentifier, _subscriberProcessIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_subscriberProcessIdentifier, _subscriberProcessIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _subscriberProcessIdentifierErr != nil { return nil, errors.Wrap(_subscriberProcessIdentifierErr, "Error parsing 'subscriberProcessIdentifier' field of BACnetConfirmedServiceRequestSubscribeCOVProperty") } @@ -214,7 +217,7 @@ func BACnetConfirmedServiceRequestSubscribeCOVPropertyParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("monitoredObjectIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for monitoredObjectIdentifier") } - _monitoredObjectIdentifier, _monitoredObjectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER)) +_monitoredObjectIdentifier, _monitoredObjectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_BACNET_OBJECT_IDENTIFIER ) ) if _monitoredObjectIdentifierErr != nil { return nil, errors.Wrap(_monitoredObjectIdentifierErr, "Error parsing 'monitoredObjectIdentifier' field of BACnetConfirmedServiceRequestSubscribeCOVProperty") } @@ -225,12 +228,12 @@ func BACnetConfirmedServiceRequestSubscribeCOVPropertyParseWithBuffer(ctx contex // Optional Field (issueConfirmedNotifications) (Can be skipped, if a given expression evaluates to false) var issueConfirmedNotifications BACnetContextTagBoolean = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("issueConfirmedNotifications"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for issueConfirmedNotifications") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(2), BACnetDataType_BOOLEAN) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(2) , BACnetDataType_BOOLEAN ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -247,12 +250,12 @@ func BACnetConfirmedServiceRequestSubscribeCOVPropertyParseWithBuffer(ctx contex // Optional Field (lifetime) (Can be skipped, if a given expression evaluates to false) var lifetime BACnetContextTagUnsignedInteger = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("lifetime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lifetime") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(3), BACnetDataType_UNSIGNED_INTEGER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(3) , BACnetDataType_UNSIGNED_INTEGER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -271,7 +274,7 @@ func BACnetConfirmedServiceRequestSubscribeCOVPropertyParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("monitoredPropertyIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for monitoredPropertyIdentifier") } - _monitoredPropertyIdentifier, _monitoredPropertyIdentifierErr := BACnetPropertyReferenceEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(4))) +_monitoredPropertyIdentifier, _monitoredPropertyIdentifierErr := BACnetPropertyReferenceEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(4) ) ) if _monitoredPropertyIdentifierErr != nil { return nil, errors.Wrap(_monitoredPropertyIdentifierErr, "Error parsing 'monitoredPropertyIdentifier' field of BACnetConfirmedServiceRequestSubscribeCOVProperty") } @@ -282,12 +285,12 @@ func BACnetConfirmedServiceRequestSubscribeCOVPropertyParseWithBuffer(ctx contex // Optional Field (covIncrement) (Can be skipped, if a given expression evaluates to false) var covIncrement BACnetContextTagReal = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("covIncrement"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for covIncrement") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(5), BACnetDataType_REAL) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(5) , BACnetDataType_REAL ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -312,11 +315,11 @@ func BACnetConfirmedServiceRequestSubscribeCOVPropertyParseWithBuffer(ctx contex ServiceRequestLength: serviceRequestLength, }, SubscriberProcessIdentifier: subscriberProcessIdentifier, - MonitoredObjectIdentifier: monitoredObjectIdentifier, + MonitoredObjectIdentifier: monitoredObjectIdentifier, IssueConfirmedNotifications: issueConfirmedNotifications, - Lifetime: lifetime, + Lifetime: lifetime, MonitoredPropertyIdentifier: monitoredPropertyIdentifier, - CovIncrement: covIncrement, + CovIncrement: covIncrement, } _child._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _child return _child, nil @@ -338,89 +341,89 @@ func (m *_BACnetConfirmedServiceRequestSubscribeCOVProperty) SerializeWithWriteB return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestSubscribeCOVProperty") } - // Simple Field (subscriberProcessIdentifier) - if pushErr := writeBuffer.PushContext("subscriberProcessIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for subscriberProcessIdentifier") + // Simple Field (subscriberProcessIdentifier) + if pushErr := writeBuffer.PushContext("subscriberProcessIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for subscriberProcessIdentifier") + } + _subscriberProcessIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetSubscriberProcessIdentifier()) + if popErr := writeBuffer.PopContext("subscriberProcessIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for subscriberProcessIdentifier") + } + if _subscriberProcessIdentifierErr != nil { + return errors.Wrap(_subscriberProcessIdentifierErr, "Error serializing 'subscriberProcessIdentifier' field") + } + + // Simple Field (monitoredObjectIdentifier) + if pushErr := writeBuffer.PushContext("monitoredObjectIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for monitoredObjectIdentifier") + } + _monitoredObjectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetMonitoredObjectIdentifier()) + if popErr := writeBuffer.PopContext("monitoredObjectIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for monitoredObjectIdentifier") + } + if _monitoredObjectIdentifierErr != nil { + return errors.Wrap(_monitoredObjectIdentifierErr, "Error serializing 'monitoredObjectIdentifier' field") + } + + // Optional Field (issueConfirmedNotifications) (Can be skipped, if the value is null) + var issueConfirmedNotifications BACnetContextTagBoolean = nil + if m.GetIssueConfirmedNotifications() != nil { + if pushErr := writeBuffer.PushContext("issueConfirmedNotifications"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for issueConfirmedNotifications") } - _subscriberProcessIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetSubscriberProcessIdentifier()) - if popErr := writeBuffer.PopContext("subscriberProcessIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for subscriberProcessIdentifier") + issueConfirmedNotifications = m.GetIssueConfirmedNotifications() + _issueConfirmedNotificationsErr := writeBuffer.WriteSerializable(ctx, issueConfirmedNotifications) + if popErr := writeBuffer.PopContext("issueConfirmedNotifications"); popErr != nil { + return errors.Wrap(popErr, "Error popping for issueConfirmedNotifications") } - if _subscriberProcessIdentifierErr != nil { - return errors.Wrap(_subscriberProcessIdentifierErr, "Error serializing 'subscriberProcessIdentifier' field") + if _issueConfirmedNotificationsErr != nil { + return errors.Wrap(_issueConfirmedNotificationsErr, "Error serializing 'issueConfirmedNotifications' field") } + } - // Simple Field (monitoredObjectIdentifier) - if pushErr := writeBuffer.PushContext("monitoredObjectIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for monitoredObjectIdentifier") - } - _monitoredObjectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetMonitoredObjectIdentifier()) - if popErr := writeBuffer.PopContext("monitoredObjectIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for monitoredObjectIdentifier") + // Optional Field (lifetime) (Can be skipped, if the value is null) + var lifetime BACnetContextTagUnsignedInteger = nil + if m.GetLifetime() != nil { + if pushErr := writeBuffer.PushContext("lifetime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lifetime") } - if _monitoredObjectIdentifierErr != nil { - return errors.Wrap(_monitoredObjectIdentifierErr, "Error serializing 'monitoredObjectIdentifier' field") + lifetime = m.GetLifetime() + _lifetimeErr := writeBuffer.WriteSerializable(ctx, lifetime) + if popErr := writeBuffer.PopContext("lifetime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lifetime") } - - // Optional Field (issueConfirmedNotifications) (Can be skipped, if the value is null) - var issueConfirmedNotifications BACnetContextTagBoolean = nil - if m.GetIssueConfirmedNotifications() != nil { - if pushErr := writeBuffer.PushContext("issueConfirmedNotifications"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for issueConfirmedNotifications") - } - issueConfirmedNotifications = m.GetIssueConfirmedNotifications() - _issueConfirmedNotificationsErr := writeBuffer.WriteSerializable(ctx, issueConfirmedNotifications) - if popErr := writeBuffer.PopContext("issueConfirmedNotifications"); popErr != nil { - return errors.Wrap(popErr, "Error popping for issueConfirmedNotifications") - } - if _issueConfirmedNotificationsErr != nil { - return errors.Wrap(_issueConfirmedNotificationsErr, "Error serializing 'issueConfirmedNotifications' field") - } + if _lifetimeErr != nil { + return errors.Wrap(_lifetimeErr, "Error serializing 'lifetime' field") } + } - // Optional Field (lifetime) (Can be skipped, if the value is null) - var lifetime BACnetContextTagUnsignedInteger = nil - if m.GetLifetime() != nil { - if pushErr := writeBuffer.PushContext("lifetime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lifetime") - } - lifetime = m.GetLifetime() - _lifetimeErr := writeBuffer.WriteSerializable(ctx, lifetime) - if popErr := writeBuffer.PopContext("lifetime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lifetime") - } - if _lifetimeErr != nil { - return errors.Wrap(_lifetimeErr, "Error serializing 'lifetime' field") - } - } + // Simple Field (monitoredPropertyIdentifier) + if pushErr := writeBuffer.PushContext("monitoredPropertyIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for monitoredPropertyIdentifier") + } + _monitoredPropertyIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetMonitoredPropertyIdentifier()) + if popErr := writeBuffer.PopContext("monitoredPropertyIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for monitoredPropertyIdentifier") + } + if _monitoredPropertyIdentifierErr != nil { + return errors.Wrap(_monitoredPropertyIdentifierErr, "Error serializing 'monitoredPropertyIdentifier' field") + } - // Simple Field (monitoredPropertyIdentifier) - if pushErr := writeBuffer.PushContext("monitoredPropertyIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for monitoredPropertyIdentifier") + // Optional Field (covIncrement) (Can be skipped, if the value is null) + var covIncrement BACnetContextTagReal = nil + if m.GetCovIncrement() != nil { + if pushErr := writeBuffer.PushContext("covIncrement"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for covIncrement") } - _monitoredPropertyIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetMonitoredPropertyIdentifier()) - if popErr := writeBuffer.PopContext("monitoredPropertyIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for monitoredPropertyIdentifier") + covIncrement = m.GetCovIncrement() + _covIncrementErr := writeBuffer.WriteSerializable(ctx, covIncrement) + if popErr := writeBuffer.PopContext("covIncrement"); popErr != nil { + return errors.Wrap(popErr, "Error popping for covIncrement") } - if _monitoredPropertyIdentifierErr != nil { - return errors.Wrap(_monitoredPropertyIdentifierErr, "Error serializing 'monitoredPropertyIdentifier' field") - } - - // Optional Field (covIncrement) (Can be skipped, if the value is null) - var covIncrement BACnetContextTagReal = nil - if m.GetCovIncrement() != nil { - if pushErr := writeBuffer.PushContext("covIncrement"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for covIncrement") - } - covIncrement = m.GetCovIncrement() - _covIncrementErr := writeBuffer.WriteSerializable(ctx, covIncrement) - if popErr := writeBuffer.PopContext("covIncrement"); popErr != nil { - return errors.Wrap(popErr, "Error popping for covIncrement") - } - if _covIncrementErr != nil { - return errors.Wrap(_covIncrementErr, "Error serializing 'covIncrement' field") - } + if _covIncrementErr != nil { + return errors.Wrap(_covIncrementErr, "Error serializing 'covIncrement' field") } + } if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestSubscribeCOVProperty"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConfirmedServiceRequestSubscribeCOVProperty") @@ -430,6 +433,7 @@ func (m *_BACnetConfirmedServiceRequestSubscribeCOVProperty) SerializeWithWriteB return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConfirmedServiceRequestSubscribeCOVProperty) isBACnetConfirmedServiceRequestSubscribeCOVProperty() bool { return true } @@ -444,3 +448,6 @@ func (m *_BACnetConfirmedServiceRequestSubscribeCOVProperty) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple.go index e9d562409fe..50364809b2c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple is the corresponding interface of BACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple type BACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple interface { @@ -55,34 +57,33 @@ type BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleExactly interface // _BACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple is the data-structure of this message type _BACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple struct { *_BACnetConfirmedServiceRequest - SubscriberProcessIdentifier BACnetContextTagUnsignedInteger - IssueConfirmedNotifications BACnetContextTagBoolean - Lifetime BACnetContextTagUnsignedInteger - MaxNotificationDelay BACnetContextTagUnsignedInteger - ListOfCovSubscriptionSpecifications BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsList + SubscriberProcessIdentifier BACnetContextTagUnsignedInteger + IssueConfirmedNotifications BACnetContextTagBoolean + Lifetime BACnetContextTagUnsignedInteger + MaxNotificationDelay BACnetContextTagUnsignedInteger + ListOfCovSubscriptionSpecifications BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsList } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_SUBSCRIBE_COV_PROPERTY_MULTIPLE -} +func (m *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_SUBSCRIBE_COV_PROPERTY_MULTIPLE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple) InitializeParent(parent BACnetConfirmedServiceRequest) { -} +func (m *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple) InitializeParent(parent BACnetConfirmedServiceRequest ) {} -func (m *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple) GetParent() BACnetConfirmedServiceRequest { +func (m *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple) GetParent() BACnetConfirmedServiceRequest { return m._BACnetConfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -113,15 +114,16 @@ func (m *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple) GetListOfCo /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple factory function for _BACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple -func NewBACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple(subscriberProcessIdentifier BACnetContextTagUnsignedInteger, issueConfirmedNotifications BACnetContextTagBoolean, lifetime BACnetContextTagUnsignedInteger, maxNotificationDelay BACnetContextTagUnsignedInteger, listOfCovSubscriptionSpecifications BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsList, serviceRequestLength uint32) *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple { +func NewBACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple( subscriberProcessIdentifier BACnetContextTagUnsignedInteger , issueConfirmedNotifications BACnetContextTagBoolean , lifetime BACnetContextTagUnsignedInteger , maxNotificationDelay BACnetContextTagUnsignedInteger , listOfCovSubscriptionSpecifications BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsList , serviceRequestLength uint32 ) *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple { _result := &_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple{ - SubscriberProcessIdentifier: subscriberProcessIdentifier, - IssueConfirmedNotifications: issueConfirmedNotifications, - Lifetime: lifetime, - MaxNotificationDelay: maxNotificationDelay, + SubscriberProcessIdentifier: subscriberProcessIdentifier, + IssueConfirmedNotifications: issueConfirmedNotifications, + Lifetime: lifetime, + MaxNotificationDelay: maxNotificationDelay, ListOfCovSubscriptionSpecifications: listOfCovSubscriptionSpecifications, - _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), + _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), } _result._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _result return _result @@ -129,7 +131,7 @@ func NewBACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple(subscriberProc // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple(structType interface{}) BACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple { - if casted, ok := structType.(BACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple); ok { @@ -169,6 +171,7 @@ func (m *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple) GetLengthIn return lengthInBits } + func (m *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -190,7 +193,7 @@ func BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleParseWithBuffer(ct if pullErr := readBuffer.PullContext("subscriberProcessIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for subscriberProcessIdentifier") } - _subscriberProcessIdentifier, _subscriberProcessIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_subscriberProcessIdentifier, _subscriberProcessIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _subscriberProcessIdentifierErr != nil { return nil, errors.Wrap(_subscriberProcessIdentifierErr, "Error parsing 'subscriberProcessIdentifier' field of BACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple") } @@ -201,12 +204,12 @@ func BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleParseWithBuffer(ct // Optional Field (issueConfirmedNotifications) (Can be skipped, if a given expression evaluates to false) var issueConfirmedNotifications BACnetContextTagBoolean = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("issueConfirmedNotifications"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for issueConfirmedNotifications") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(1), BACnetDataType_BOOLEAN) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(1) , BACnetDataType_BOOLEAN ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -223,12 +226,12 @@ func BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleParseWithBuffer(ct // Optional Field (lifetime) (Can be skipped, if a given expression evaluates to false) var lifetime BACnetContextTagUnsignedInteger = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("lifetime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lifetime") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(2), BACnetDataType_UNSIGNED_INTEGER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(2) , BACnetDataType_UNSIGNED_INTEGER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -245,12 +248,12 @@ func BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleParseWithBuffer(ct // Optional Field (maxNotificationDelay) (Can be skipped, if a given expression evaluates to false) var maxNotificationDelay BACnetContextTagUnsignedInteger = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("maxNotificationDelay"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for maxNotificationDelay") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(3), BACnetDataType_UNSIGNED_INTEGER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(3) , BACnetDataType_UNSIGNED_INTEGER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -269,7 +272,7 @@ func BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleParseWithBuffer(ct if pullErr := readBuffer.PullContext("listOfCovSubscriptionSpecifications"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for listOfCovSubscriptionSpecifications") } - _listOfCovSubscriptionSpecifications, _listOfCovSubscriptionSpecificationsErr := BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsListParseWithBuffer(ctx, readBuffer, uint8(uint8(4))) +_listOfCovSubscriptionSpecifications, _listOfCovSubscriptionSpecificationsErr := BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsListParseWithBuffer(ctx, readBuffer , uint8( uint8(4) ) ) if _listOfCovSubscriptionSpecificationsErr != nil { return nil, errors.Wrap(_listOfCovSubscriptionSpecificationsErr, "Error parsing 'listOfCovSubscriptionSpecifications' field of BACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple") } @@ -287,10 +290,10 @@ func BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleParseWithBuffer(ct _BACnetConfirmedServiceRequest: &_BACnetConfirmedServiceRequest{ ServiceRequestLength: serviceRequestLength, }, - SubscriberProcessIdentifier: subscriberProcessIdentifier, - IssueConfirmedNotifications: issueConfirmedNotifications, - Lifetime: lifetime, - MaxNotificationDelay: maxNotificationDelay, + SubscriberProcessIdentifier: subscriberProcessIdentifier, + IssueConfirmedNotifications: issueConfirmedNotifications, + Lifetime: lifetime, + MaxNotificationDelay: maxNotificationDelay, ListOfCovSubscriptionSpecifications: listOfCovSubscriptionSpecifications, } _child._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _child @@ -313,77 +316,77 @@ func (m *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple) SerializeWi return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple") } - // Simple Field (subscriberProcessIdentifier) - if pushErr := writeBuffer.PushContext("subscriberProcessIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for subscriberProcessIdentifier") + // Simple Field (subscriberProcessIdentifier) + if pushErr := writeBuffer.PushContext("subscriberProcessIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for subscriberProcessIdentifier") + } + _subscriberProcessIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetSubscriberProcessIdentifier()) + if popErr := writeBuffer.PopContext("subscriberProcessIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for subscriberProcessIdentifier") + } + if _subscriberProcessIdentifierErr != nil { + return errors.Wrap(_subscriberProcessIdentifierErr, "Error serializing 'subscriberProcessIdentifier' field") + } + + // Optional Field (issueConfirmedNotifications) (Can be skipped, if the value is null) + var issueConfirmedNotifications BACnetContextTagBoolean = nil + if m.GetIssueConfirmedNotifications() != nil { + if pushErr := writeBuffer.PushContext("issueConfirmedNotifications"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for issueConfirmedNotifications") } - _subscriberProcessIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetSubscriberProcessIdentifier()) - if popErr := writeBuffer.PopContext("subscriberProcessIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for subscriberProcessIdentifier") + issueConfirmedNotifications = m.GetIssueConfirmedNotifications() + _issueConfirmedNotificationsErr := writeBuffer.WriteSerializable(ctx, issueConfirmedNotifications) + if popErr := writeBuffer.PopContext("issueConfirmedNotifications"); popErr != nil { + return errors.Wrap(popErr, "Error popping for issueConfirmedNotifications") } - if _subscriberProcessIdentifierErr != nil { - return errors.Wrap(_subscriberProcessIdentifierErr, "Error serializing 'subscriberProcessIdentifier' field") + if _issueConfirmedNotificationsErr != nil { + return errors.Wrap(_issueConfirmedNotificationsErr, "Error serializing 'issueConfirmedNotifications' field") } + } - // Optional Field (issueConfirmedNotifications) (Can be skipped, if the value is null) - var issueConfirmedNotifications BACnetContextTagBoolean = nil - if m.GetIssueConfirmedNotifications() != nil { - if pushErr := writeBuffer.PushContext("issueConfirmedNotifications"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for issueConfirmedNotifications") - } - issueConfirmedNotifications = m.GetIssueConfirmedNotifications() - _issueConfirmedNotificationsErr := writeBuffer.WriteSerializable(ctx, issueConfirmedNotifications) - if popErr := writeBuffer.PopContext("issueConfirmedNotifications"); popErr != nil { - return errors.Wrap(popErr, "Error popping for issueConfirmedNotifications") - } - if _issueConfirmedNotificationsErr != nil { - return errors.Wrap(_issueConfirmedNotificationsErr, "Error serializing 'issueConfirmedNotifications' field") - } + // Optional Field (lifetime) (Can be skipped, if the value is null) + var lifetime BACnetContextTagUnsignedInteger = nil + if m.GetLifetime() != nil { + if pushErr := writeBuffer.PushContext("lifetime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lifetime") } - - // Optional Field (lifetime) (Can be skipped, if the value is null) - var lifetime BACnetContextTagUnsignedInteger = nil - if m.GetLifetime() != nil { - if pushErr := writeBuffer.PushContext("lifetime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lifetime") - } - lifetime = m.GetLifetime() - _lifetimeErr := writeBuffer.WriteSerializable(ctx, lifetime) - if popErr := writeBuffer.PopContext("lifetime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lifetime") - } - if _lifetimeErr != nil { - return errors.Wrap(_lifetimeErr, "Error serializing 'lifetime' field") - } + lifetime = m.GetLifetime() + _lifetimeErr := writeBuffer.WriteSerializable(ctx, lifetime) + if popErr := writeBuffer.PopContext("lifetime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lifetime") } - - // Optional Field (maxNotificationDelay) (Can be skipped, if the value is null) - var maxNotificationDelay BACnetContextTagUnsignedInteger = nil - if m.GetMaxNotificationDelay() != nil { - if pushErr := writeBuffer.PushContext("maxNotificationDelay"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for maxNotificationDelay") - } - maxNotificationDelay = m.GetMaxNotificationDelay() - _maxNotificationDelayErr := writeBuffer.WriteSerializable(ctx, maxNotificationDelay) - if popErr := writeBuffer.PopContext("maxNotificationDelay"); popErr != nil { - return errors.Wrap(popErr, "Error popping for maxNotificationDelay") - } - if _maxNotificationDelayErr != nil { - return errors.Wrap(_maxNotificationDelayErr, "Error serializing 'maxNotificationDelay' field") - } + if _lifetimeErr != nil { + return errors.Wrap(_lifetimeErr, "Error serializing 'lifetime' field") } + } - // Simple Field (listOfCovSubscriptionSpecifications) - if pushErr := writeBuffer.PushContext("listOfCovSubscriptionSpecifications"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for listOfCovSubscriptionSpecifications") + // Optional Field (maxNotificationDelay) (Can be skipped, if the value is null) + var maxNotificationDelay BACnetContextTagUnsignedInteger = nil + if m.GetMaxNotificationDelay() != nil { + if pushErr := writeBuffer.PushContext("maxNotificationDelay"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for maxNotificationDelay") } - _listOfCovSubscriptionSpecificationsErr := writeBuffer.WriteSerializable(ctx, m.GetListOfCovSubscriptionSpecifications()) - if popErr := writeBuffer.PopContext("listOfCovSubscriptionSpecifications"); popErr != nil { - return errors.Wrap(popErr, "Error popping for listOfCovSubscriptionSpecifications") + maxNotificationDelay = m.GetMaxNotificationDelay() + _maxNotificationDelayErr := writeBuffer.WriteSerializable(ctx, maxNotificationDelay) + if popErr := writeBuffer.PopContext("maxNotificationDelay"); popErr != nil { + return errors.Wrap(popErr, "Error popping for maxNotificationDelay") } - if _listOfCovSubscriptionSpecificationsErr != nil { - return errors.Wrap(_listOfCovSubscriptionSpecificationsErr, "Error serializing 'listOfCovSubscriptionSpecifications' field") + if _maxNotificationDelayErr != nil { + return errors.Wrap(_maxNotificationDelayErr, "Error serializing 'maxNotificationDelay' field") } + } + + // Simple Field (listOfCovSubscriptionSpecifications) + if pushErr := writeBuffer.PushContext("listOfCovSubscriptionSpecifications"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for listOfCovSubscriptionSpecifications") + } + _listOfCovSubscriptionSpecificationsErr := writeBuffer.WriteSerializable(ctx, m.GetListOfCovSubscriptionSpecifications()) + if popErr := writeBuffer.PopContext("listOfCovSubscriptionSpecifications"); popErr != nil { + return errors.Wrap(popErr, "Error popping for listOfCovSubscriptionSpecifications") + } + if _listOfCovSubscriptionSpecificationsErr != nil { + return errors.Wrap(_listOfCovSubscriptionSpecificationsErr, "Error serializing 'listOfCovSubscriptionSpecifications' field") + } if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple") @@ -393,6 +396,7 @@ func (m *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple) SerializeWi return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple) isBACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple() bool { return true } @@ -407,3 +411,6 @@ func (m *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultiple) String() st } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications.go index daa3721a068..bc7562f5d92 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications is the corresponding interface of BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications type BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications interface { @@ -51,12 +53,13 @@ type BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscript // _BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications is the data-structure of this message type _BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications struct { - MonitoredObjectIdentifier BACnetContextTagObjectIdentifier - OpeningTag BACnetOpeningTag - ListOfCovReferences []BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReference - ClosingTag BACnetClosingTag + MonitoredObjectIdentifier BACnetContextTagObjectIdentifier + OpeningTag BACnetOpeningTag + ListOfCovReferences []BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReference + ClosingTag BACnetClosingTag } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,14 +86,15 @@ func (m *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubs /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications factory function for _BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications -func NewBACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications(monitoredObjectIdentifier BACnetContextTagObjectIdentifier, openingTag BACnetOpeningTag, listOfCovReferences []BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReference, closingTag BACnetClosingTag) *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications { - return &_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications{MonitoredObjectIdentifier: monitoredObjectIdentifier, OpeningTag: openingTag, ListOfCovReferences: listOfCovReferences, ClosingTag: closingTag} +func NewBACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications( monitoredObjectIdentifier BACnetContextTagObjectIdentifier , openingTag BACnetOpeningTag , listOfCovReferences []BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReference , closingTag BACnetClosingTag ) *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications { +return &_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications{ MonitoredObjectIdentifier: monitoredObjectIdentifier , OpeningTag: openingTag , ListOfCovReferences: listOfCovReferences , ClosingTag: closingTag } } // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications(structType interface{}) BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications { - if casted, ok := structType.(BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications); ok { @@ -125,6 +129,7 @@ func (m *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubs return lengthInBits } + func (m *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -146,7 +151,7 @@ func BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscript if pullErr := readBuffer.PullContext("monitoredObjectIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for monitoredObjectIdentifier") } - _monitoredObjectIdentifier, _monitoredObjectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER)) +_monitoredObjectIdentifier, _monitoredObjectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_BACNET_OBJECT_IDENTIFIER ) ) if _monitoredObjectIdentifierErr != nil { return nil, errors.Wrap(_monitoredObjectIdentifierErr, "Error parsing 'monitoredObjectIdentifier' field of BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications") } @@ -159,7 +164,7 @@ func BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscript if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1))) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications") } @@ -175,8 +180,8 @@ func BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscript // Terminated array var listOfCovReferences []BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReference { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, 1)) { - _item, _err := BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReferenceParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, 1)); { +_item, _err := BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReferenceParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'listOfCovReferences' field of BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications") } @@ -191,7 +196,7 @@ func BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscript if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1))) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications") } @@ -206,11 +211,11 @@ func BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscript // Create the instance return &_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications{ - MonitoredObjectIdentifier: monitoredObjectIdentifier, - OpeningTag: openingTag, - ListOfCovReferences: listOfCovReferences, - ClosingTag: closingTag, - }, nil + MonitoredObjectIdentifier: monitoredObjectIdentifier, + OpeningTag: openingTag, + ListOfCovReferences: listOfCovReferences, + ClosingTag: closingTag, + }, nil } func (m *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications) Serialize() ([]byte, error) { @@ -224,7 +229,7 @@ func (m *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubs func (m *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications") } @@ -287,6 +292,7 @@ func (m *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubs return nil } + func (m *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications) isBACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications() bool { return true } @@ -301,3 +307,6 @@ func (m *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubs } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsList.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsList.go index 6b7e1559364..1e7741a9628 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsList.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsList.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsList is the corresponding interface of BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsList type BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsList interface { @@ -49,14 +51,15 @@ type BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscript // _BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsList is the data-structure of this message type _BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsList struct { - OpeningTag BACnetOpeningTag - Specifications []BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + Specifications []BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -79,14 +82,15 @@ func (m *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubs /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsList factory function for _BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsList -func NewBACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsList(openingTag BACnetOpeningTag, specifications []BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsList { - return &_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsList{OpeningTag: openingTag, Specifications: specifications, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsList( openingTag BACnetOpeningTag , specifications []BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsList { +return &_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsList{ OpeningTag: openingTag , Specifications: specifications , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsList(structType interface{}) BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsList { - if casted, ok := structType.(BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsList); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsList); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsList); ok { @@ -118,6 +122,7 @@ func (m *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubs return lengthInBits } + func (m *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsList) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +144,7 @@ func BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscript if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsList") } @@ -155,8 +160,8 @@ func BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscript // Terminated array var specifications []BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecifications { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'specifications' field of BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsList") } @@ -171,7 +176,7 @@ func BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscript if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsList") } @@ -186,11 +191,11 @@ func BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscript // Create the instance return &_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsList{ - TagNumber: tagNumber, - OpeningTag: openingTag, - Specifications: specifications, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + Specifications: specifications, + ClosingTag: closingTag, + }, nil } func (m *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsList) Serialize() ([]byte, error) { @@ -204,7 +209,7 @@ func (m *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubs func (m *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsList) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsList"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsList"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsList") } @@ -255,13 +260,13 @@ func (m *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubs return nil } + //// // Arguments Getter func (m *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsList) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -279,3 +284,6 @@ func (m *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubs } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReference.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReference.go index 4ce9d134f32..02888bcfb41 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReference.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReference.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReference is the corresponding interface of BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReference type BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReference interface { @@ -49,11 +51,12 @@ type BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscript // _BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReference is the data-structure of this message type _BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReference struct { - MonitoredProperty BACnetPropertyReferenceEnclosed - CovIncrement BACnetContextTagReal - Timestamped BACnetContextTagBoolean + MonitoredProperty BACnetPropertyReferenceEnclosed + CovIncrement BACnetContextTagReal + Timestamped BACnetContextTagBoolean } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -76,14 +79,15 @@ func (m *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubs /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReference factory function for _BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReference -func NewBACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReference(monitoredProperty BACnetPropertyReferenceEnclosed, covIncrement BACnetContextTagReal, timestamped BACnetContextTagBoolean) *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReference { - return &_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReference{MonitoredProperty: monitoredProperty, CovIncrement: covIncrement, Timestamped: timestamped} +func NewBACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReference( monitoredProperty BACnetPropertyReferenceEnclosed , covIncrement BACnetContextTagReal , timestamped BACnetContextTagBoolean ) *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReference { +return &_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReference{ MonitoredProperty: monitoredProperty , CovIncrement: covIncrement , Timestamped: timestamped } } // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReference(structType interface{}) BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReference { - if casted, ok := structType.(BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReference); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReference); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReference); ok { @@ -113,6 +117,7 @@ func (m *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubs return lengthInBits } + func (m *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReference) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -134,7 +139,7 @@ func BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscript if pullErr := readBuffer.PullContext("monitoredProperty"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for monitoredProperty") } - _monitoredProperty, _monitoredPropertyErr := BACnetPropertyReferenceEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(1))) +_monitoredProperty, _monitoredPropertyErr := BACnetPropertyReferenceEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) ) if _monitoredPropertyErr != nil { return nil, errors.Wrap(_monitoredPropertyErr, "Error parsing 'monitoredProperty' field of BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReference") } @@ -145,12 +150,12 @@ func BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscript // Optional Field (covIncrement) (Can be skipped, if a given expression evaluates to false) var covIncrement BACnetContextTagReal = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("covIncrement"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for covIncrement") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(1), BACnetDataType_REAL) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(1) , BACnetDataType_REAL ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -169,7 +174,7 @@ func BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscript if pullErr := readBuffer.PullContext("timestamped"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timestamped") } - _timestamped, _timestampedErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), BACnetDataType(BACnetDataType_BOOLEAN)) +_timestamped, _timestampedErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , BACnetDataType( BACnetDataType_BOOLEAN ) ) if _timestampedErr != nil { return nil, errors.Wrap(_timestampedErr, "Error parsing 'timestamped' field of BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReference") } @@ -184,10 +189,10 @@ func BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscript // Create the instance return &_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReference{ - MonitoredProperty: monitoredProperty, - CovIncrement: covIncrement, - Timestamped: timestamped, - }, nil + MonitoredProperty: monitoredProperty, + CovIncrement: covIncrement, + Timestamped: timestamped, + }, nil } func (m *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReference) Serialize() ([]byte, error) { @@ -201,7 +206,7 @@ func (m *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubs func (m *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReference) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReference"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReference"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReference") } @@ -251,6 +256,7 @@ func (m *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubs return nil } + func (m *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReference) isBACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubscriptionSpecificationsReference() bool { return true } @@ -265,3 +271,6 @@ func (m *_BACnetConfirmedServiceRequestSubscribeCOVPropertyMultipleListOfCovSubs } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestUnknown.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestUnknown.go index 70c5fa12d30..e89c3af739e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestUnknown.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestUnknown.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestUnknown is the corresponding interface of BACnetConfirmedServiceRequestUnknown type BACnetConfirmedServiceRequestUnknown interface { @@ -46,33 +48,32 @@ type BACnetConfirmedServiceRequestUnknownExactly interface { // _BACnetConfirmedServiceRequestUnknown is the data-structure of this message type _BACnetConfirmedServiceRequestUnknown struct { *_BACnetConfirmedServiceRequest - UnknownBytes []byte + UnknownBytes []byte // Arguments. ServiceRequestPayloadLength uint32 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConfirmedServiceRequestUnknown) GetServiceChoice() BACnetConfirmedServiceChoice { - return 0 -} +func (m *_BACnetConfirmedServiceRequestUnknown) GetServiceChoice() BACnetConfirmedServiceChoice { +return 0} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConfirmedServiceRequestUnknown) InitializeParent(parent BACnetConfirmedServiceRequest) { -} +func (m *_BACnetConfirmedServiceRequestUnknown) InitializeParent(parent BACnetConfirmedServiceRequest ) {} -func (m *_BACnetConfirmedServiceRequestUnknown) GetParent() BACnetConfirmedServiceRequest { +func (m *_BACnetConfirmedServiceRequestUnknown) GetParent() BACnetConfirmedServiceRequest { return m._BACnetConfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -87,11 +88,12 @@ func (m *_BACnetConfirmedServiceRequestUnknown) GetUnknownBytes() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestUnknown factory function for _BACnetConfirmedServiceRequestUnknown -func NewBACnetConfirmedServiceRequestUnknown(unknownBytes []byte, serviceRequestPayloadLength uint32, serviceRequestLength uint32) *_BACnetConfirmedServiceRequestUnknown { +func NewBACnetConfirmedServiceRequestUnknown( unknownBytes []byte , serviceRequestPayloadLength uint32 , serviceRequestLength uint32 ) *_BACnetConfirmedServiceRequestUnknown { _result := &_BACnetConfirmedServiceRequestUnknown{ - UnknownBytes: unknownBytes, - _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), + UnknownBytes: unknownBytes, + _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), } _result._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _result return _result @@ -99,7 +101,7 @@ func NewBACnetConfirmedServiceRequestUnknown(unknownBytes []byte, serviceRequest // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestUnknown(structType interface{}) BACnetConfirmedServiceRequestUnknown { - if casted, ok := structType.(BACnetConfirmedServiceRequestUnknown); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestUnknown); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestUnknown); ok { @@ -123,6 +125,7 @@ func (m *_BACnetConfirmedServiceRequestUnknown) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetConfirmedServiceRequestUnknown) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -177,11 +180,11 @@ func (m *_BACnetConfirmedServiceRequestUnknown) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestUnknown") } - // Array Field (unknownBytes) - // Byte Array field (unknownBytes) - if err := writeBuffer.WriteByteArray("unknownBytes", m.GetUnknownBytes()); err != nil { - return errors.Wrap(err, "Error serializing 'unknownBytes' field") - } + // Array Field (unknownBytes) + // Byte Array field (unknownBytes) + if err := writeBuffer.WriteByteArray("unknownBytes", m.GetUnknownBytes()); err != nil { + return errors.Wrap(err, "Error serializing 'unknownBytes' field") + } if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestUnknown"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConfirmedServiceRequestUnknown") @@ -191,13 +194,13 @@ func (m *_BACnetConfirmedServiceRequestUnknown) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + //// // Arguments Getter func (m *_BACnetConfirmedServiceRequestUnknown) GetServiceRequestPayloadLength() uint32 { return m.ServiceRequestPayloadLength } - // //// @@ -215,3 +218,6 @@ func (m *_BACnetConfirmedServiceRequestUnknown) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestVTClose.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestVTClose.go index d021aad55d0..3b47e1e21fc 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestVTClose.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestVTClose.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestVTClose is the corresponding interface of BACnetConfirmedServiceRequestVTClose type BACnetConfirmedServiceRequestVTClose interface { @@ -47,33 +49,32 @@ type BACnetConfirmedServiceRequestVTCloseExactly interface { // _BACnetConfirmedServiceRequestVTClose is the data-structure of this message type _BACnetConfirmedServiceRequestVTClose struct { *_BACnetConfirmedServiceRequest - ListOfRemoteVtSessionIdentifiers []BACnetApplicationTagUnsignedInteger + ListOfRemoteVtSessionIdentifiers []BACnetApplicationTagUnsignedInteger // Arguments. ServiceRequestPayloadLength uint32 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConfirmedServiceRequestVTClose) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_VT_CLOSE -} +func (m *_BACnetConfirmedServiceRequestVTClose) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_VT_CLOSE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConfirmedServiceRequestVTClose) InitializeParent(parent BACnetConfirmedServiceRequest) { -} +func (m *_BACnetConfirmedServiceRequestVTClose) InitializeParent(parent BACnetConfirmedServiceRequest ) {} -func (m *_BACnetConfirmedServiceRequestVTClose) GetParent() BACnetConfirmedServiceRequest { +func (m *_BACnetConfirmedServiceRequestVTClose) GetParent() BACnetConfirmedServiceRequest { return m._BACnetConfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -88,11 +89,12 @@ func (m *_BACnetConfirmedServiceRequestVTClose) GetListOfRemoteVtSessionIdentifi /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestVTClose factory function for _BACnetConfirmedServiceRequestVTClose -func NewBACnetConfirmedServiceRequestVTClose(listOfRemoteVtSessionIdentifiers []BACnetApplicationTagUnsignedInteger, serviceRequestPayloadLength uint32, serviceRequestLength uint32) *_BACnetConfirmedServiceRequestVTClose { +func NewBACnetConfirmedServiceRequestVTClose( listOfRemoteVtSessionIdentifiers []BACnetApplicationTagUnsignedInteger , serviceRequestPayloadLength uint32 , serviceRequestLength uint32 ) *_BACnetConfirmedServiceRequestVTClose { _result := &_BACnetConfirmedServiceRequestVTClose{ ListOfRemoteVtSessionIdentifiers: listOfRemoteVtSessionIdentifiers, - _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), + _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), } _result._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _result return _result @@ -100,7 +102,7 @@ func NewBACnetConfirmedServiceRequestVTClose(listOfRemoteVtSessionIdentifiers [] // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestVTClose(structType interface{}) BACnetConfirmedServiceRequestVTClose { - if casted, ok := structType.(BACnetConfirmedServiceRequestVTClose); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestVTClose); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestVTClose); ok { @@ -126,6 +128,7 @@ func (m *_BACnetConfirmedServiceRequestVTClose) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetConfirmedServiceRequestVTClose) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -152,8 +155,8 @@ func BACnetConfirmedServiceRequestVTCloseParseWithBuffer(ctx context.Context, re { _listOfRemoteVtSessionIdentifiersLength := serviceRequestPayloadLength _listOfRemoteVtSessionIdentifiersEndPos := positionAware.GetPos() + uint16(_listOfRemoteVtSessionIdentifiersLength) - for positionAware.GetPos() < _listOfRemoteVtSessionIdentifiersEndPos { - _item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) + for ;positionAware.GetPos() < _listOfRemoteVtSessionIdentifiersEndPos; { +_item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'listOfRemoteVtSessionIdentifiers' field of BACnetConfirmedServiceRequestVTClose") } @@ -195,22 +198,22 @@ func (m *_BACnetConfirmedServiceRequestVTClose) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestVTClose") } - // Array Field (listOfRemoteVtSessionIdentifiers) - if pushErr := writeBuffer.PushContext("listOfRemoteVtSessionIdentifiers", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for listOfRemoteVtSessionIdentifiers") - } - for _curItem, _element := range m.GetListOfRemoteVtSessionIdentifiers() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetListOfRemoteVtSessionIdentifiers()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'listOfRemoteVtSessionIdentifiers' field") - } - } - if popErr := writeBuffer.PopContext("listOfRemoteVtSessionIdentifiers", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for listOfRemoteVtSessionIdentifiers") + // Array Field (listOfRemoteVtSessionIdentifiers) + if pushErr := writeBuffer.PushContext("listOfRemoteVtSessionIdentifiers", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for listOfRemoteVtSessionIdentifiers") + } + for _curItem, _element := range m.GetListOfRemoteVtSessionIdentifiers() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetListOfRemoteVtSessionIdentifiers()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'listOfRemoteVtSessionIdentifiers' field") } + } + if popErr := writeBuffer.PopContext("listOfRemoteVtSessionIdentifiers", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for listOfRemoteVtSessionIdentifiers") + } if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestVTClose"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConfirmedServiceRequestVTClose") @@ -220,13 +223,13 @@ func (m *_BACnetConfirmedServiceRequestVTClose) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + //// // Arguments Getter func (m *_BACnetConfirmedServiceRequestVTClose) GetServiceRequestPayloadLength() uint32 { return m.ServiceRequestPayloadLength } - // //// @@ -244,3 +247,6 @@ func (m *_BACnetConfirmedServiceRequestVTClose) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestVTData.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestVTData.go index 11f1637150f..af5bf908658 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestVTData.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestVTData.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestVTData is the corresponding interface of BACnetConfirmedServiceRequestVTData type BACnetConfirmedServiceRequestVTData interface { @@ -50,32 +52,31 @@ type BACnetConfirmedServiceRequestVTDataExactly interface { // _BACnetConfirmedServiceRequestVTData is the data-structure of this message type _BACnetConfirmedServiceRequestVTData struct { *_BACnetConfirmedServiceRequest - VtSessionIdentifier BACnetApplicationTagUnsignedInteger - VtNewData BACnetApplicationTagOctetString - VtDataFlag BACnetApplicationTagUnsignedInteger + VtSessionIdentifier BACnetApplicationTagUnsignedInteger + VtNewData BACnetApplicationTagOctetString + VtDataFlag BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConfirmedServiceRequestVTData) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_VT_DATA -} +func (m *_BACnetConfirmedServiceRequestVTData) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_VT_DATA} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConfirmedServiceRequestVTData) InitializeParent(parent BACnetConfirmedServiceRequest) { -} +func (m *_BACnetConfirmedServiceRequestVTData) InitializeParent(parent BACnetConfirmedServiceRequest ) {} -func (m *_BACnetConfirmedServiceRequestVTData) GetParent() BACnetConfirmedServiceRequest { +func (m *_BACnetConfirmedServiceRequestVTData) GetParent() BACnetConfirmedServiceRequest { return m._BACnetConfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,13 +99,14 @@ func (m *_BACnetConfirmedServiceRequestVTData) GetVtDataFlag() BACnetApplication /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestVTData factory function for _BACnetConfirmedServiceRequestVTData -func NewBACnetConfirmedServiceRequestVTData(vtSessionIdentifier BACnetApplicationTagUnsignedInteger, vtNewData BACnetApplicationTagOctetString, vtDataFlag BACnetApplicationTagUnsignedInteger, serviceRequestLength uint32) *_BACnetConfirmedServiceRequestVTData { +func NewBACnetConfirmedServiceRequestVTData( vtSessionIdentifier BACnetApplicationTagUnsignedInteger , vtNewData BACnetApplicationTagOctetString , vtDataFlag BACnetApplicationTagUnsignedInteger , serviceRequestLength uint32 ) *_BACnetConfirmedServiceRequestVTData { _result := &_BACnetConfirmedServiceRequestVTData{ - VtSessionIdentifier: vtSessionIdentifier, - VtNewData: vtNewData, - VtDataFlag: vtDataFlag, - _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), + VtSessionIdentifier: vtSessionIdentifier, + VtNewData: vtNewData, + VtDataFlag: vtDataFlag, + _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), } _result._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _result return _result @@ -112,7 +114,7 @@ func NewBACnetConfirmedServiceRequestVTData(vtSessionIdentifier BACnetApplicatio // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestVTData(structType interface{}) BACnetConfirmedServiceRequestVTData { - if casted, ok := structType.(BACnetConfirmedServiceRequestVTData); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestVTData); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestVTData); ok { @@ -140,6 +142,7 @@ func (m *_BACnetConfirmedServiceRequestVTData) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConfirmedServiceRequestVTData) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -161,7 +164,7 @@ func BACnetConfirmedServiceRequestVTDataParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("vtSessionIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for vtSessionIdentifier") } - _vtSessionIdentifier, _vtSessionIdentifierErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_vtSessionIdentifier, _vtSessionIdentifierErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _vtSessionIdentifierErr != nil { return nil, errors.Wrap(_vtSessionIdentifierErr, "Error parsing 'vtSessionIdentifier' field of BACnetConfirmedServiceRequestVTData") } @@ -174,7 +177,7 @@ func BACnetConfirmedServiceRequestVTDataParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("vtNewData"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for vtNewData") } - _vtNewData, _vtNewDataErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_vtNewData, _vtNewDataErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _vtNewDataErr != nil { return nil, errors.Wrap(_vtNewDataErr, "Error parsing 'vtNewData' field of BACnetConfirmedServiceRequestVTData") } @@ -187,7 +190,7 @@ func BACnetConfirmedServiceRequestVTDataParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("vtDataFlag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for vtDataFlag") } - _vtDataFlag, _vtDataFlagErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_vtDataFlag, _vtDataFlagErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _vtDataFlagErr != nil { return nil, errors.Wrap(_vtDataFlagErr, "Error parsing 'vtDataFlag' field of BACnetConfirmedServiceRequestVTData") } @@ -206,8 +209,8 @@ func BACnetConfirmedServiceRequestVTDataParseWithBuffer(ctx context.Context, rea ServiceRequestLength: serviceRequestLength, }, VtSessionIdentifier: vtSessionIdentifier, - VtNewData: vtNewData, - VtDataFlag: vtDataFlag, + VtNewData: vtNewData, + VtDataFlag: vtDataFlag, } _child._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _child return _child, nil @@ -229,41 +232,41 @@ func (m *_BACnetConfirmedServiceRequestVTData) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestVTData") } - // Simple Field (vtSessionIdentifier) - if pushErr := writeBuffer.PushContext("vtSessionIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for vtSessionIdentifier") - } - _vtSessionIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetVtSessionIdentifier()) - if popErr := writeBuffer.PopContext("vtSessionIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for vtSessionIdentifier") - } - if _vtSessionIdentifierErr != nil { - return errors.Wrap(_vtSessionIdentifierErr, "Error serializing 'vtSessionIdentifier' field") - } + // Simple Field (vtSessionIdentifier) + if pushErr := writeBuffer.PushContext("vtSessionIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for vtSessionIdentifier") + } + _vtSessionIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetVtSessionIdentifier()) + if popErr := writeBuffer.PopContext("vtSessionIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for vtSessionIdentifier") + } + if _vtSessionIdentifierErr != nil { + return errors.Wrap(_vtSessionIdentifierErr, "Error serializing 'vtSessionIdentifier' field") + } - // Simple Field (vtNewData) - if pushErr := writeBuffer.PushContext("vtNewData"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for vtNewData") - } - _vtNewDataErr := writeBuffer.WriteSerializable(ctx, m.GetVtNewData()) - if popErr := writeBuffer.PopContext("vtNewData"); popErr != nil { - return errors.Wrap(popErr, "Error popping for vtNewData") - } - if _vtNewDataErr != nil { - return errors.Wrap(_vtNewDataErr, "Error serializing 'vtNewData' field") - } + // Simple Field (vtNewData) + if pushErr := writeBuffer.PushContext("vtNewData"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for vtNewData") + } + _vtNewDataErr := writeBuffer.WriteSerializable(ctx, m.GetVtNewData()) + if popErr := writeBuffer.PopContext("vtNewData"); popErr != nil { + return errors.Wrap(popErr, "Error popping for vtNewData") + } + if _vtNewDataErr != nil { + return errors.Wrap(_vtNewDataErr, "Error serializing 'vtNewData' field") + } - // Simple Field (vtDataFlag) - if pushErr := writeBuffer.PushContext("vtDataFlag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for vtDataFlag") - } - _vtDataFlagErr := writeBuffer.WriteSerializable(ctx, m.GetVtDataFlag()) - if popErr := writeBuffer.PopContext("vtDataFlag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for vtDataFlag") - } - if _vtDataFlagErr != nil { - return errors.Wrap(_vtDataFlagErr, "Error serializing 'vtDataFlag' field") - } + // Simple Field (vtDataFlag) + if pushErr := writeBuffer.PushContext("vtDataFlag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for vtDataFlag") + } + _vtDataFlagErr := writeBuffer.WriteSerializable(ctx, m.GetVtDataFlag()) + if popErr := writeBuffer.PopContext("vtDataFlag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for vtDataFlag") + } + if _vtDataFlagErr != nil { + return errors.Wrap(_vtDataFlagErr, "Error serializing 'vtDataFlag' field") + } if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestVTData"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConfirmedServiceRequestVTData") @@ -273,6 +276,7 @@ func (m *_BACnetConfirmedServiceRequestVTData) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConfirmedServiceRequestVTData) isBACnetConfirmedServiceRequestVTData() bool { return true } @@ -287,3 +291,6 @@ func (m *_BACnetConfirmedServiceRequestVTData) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestVTOpen.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestVTOpen.go index 22bf9303fef..a09c9d3285a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestVTOpen.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestVTOpen.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestVTOpen is the corresponding interface of BACnetConfirmedServiceRequestVTOpen type BACnetConfirmedServiceRequestVTOpen interface { @@ -48,31 +50,30 @@ type BACnetConfirmedServiceRequestVTOpenExactly interface { // _BACnetConfirmedServiceRequestVTOpen is the data-structure of this message type _BACnetConfirmedServiceRequestVTOpen struct { *_BACnetConfirmedServiceRequest - VtClass BACnetVTClassTagged - LocalVtSessionIdentifier BACnetApplicationTagUnsignedInteger + VtClass BACnetVTClassTagged + LocalVtSessionIdentifier BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConfirmedServiceRequestVTOpen) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_VT_OPEN -} +func (m *_BACnetConfirmedServiceRequestVTOpen) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_VT_OPEN} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConfirmedServiceRequestVTOpen) InitializeParent(parent BACnetConfirmedServiceRequest) { -} +func (m *_BACnetConfirmedServiceRequestVTOpen) InitializeParent(parent BACnetConfirmedServiceRequest ) {} -func (m *_BACnetConfirmedServiceRequestVTOpen) GetParent() BACnetConfirmedServiceRequest { +func (m *_BACnetConfirmedServiceRequestVTOpen) GetParent() BACnetConfirmedServiceRequest { return m._BACnetConfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -91,12 +92,13 @@ func (m *_BACnetConfirmedServiceRequestVTOpen) GetLocalVtSessionIdentifier() BAC /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestVTOpen factory function for _BACnetConfirmedServiceRequestVTOpen -func NewBACnetConfirmedServiceRequestVTOpen(vtClass BACnetVTClassTagged, localVtSessionIdentifier BACnetApplicationTagUnsignedInteger, serviceRequestLength uint32) *_BACnetConfirmedServiceRequestVTOpen { +func NewBACnetConfirmedServiceRequestVTOpen( vtClass BACnetVTClassTagged , localVtSessionIdentifier BACnetApplicationTagUnsignedInteger , serviceRequestLength uint32 ) *_BACnetConfirmedServiceRequestVTOpen { _result := &_BACnetConfirmedServiceRequestVTOpen{ - VtClass: vtClass, - LocalVtSessionIdentifier: localVtSessionIdentifier, - _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), + VtClass: vtClass, + LocalVtSessionIdentifier: localVtSessionIdentifier, + _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), } _result._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _result return _result @@ -104,7 +106,7 @@ func NewBACnetConfirmedServiceRequestVTOpen(vtClass BACnetVTClassTagged, localVt // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestVTOpen(structType interface{}) BACnetConfirmedServiceRequestVTOpen { - if casted, ok := structType.(BACnetConfirmedServiceRequestVTOpen); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestVTOpen); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestVTOpen); ok { @@ -129,6 +131,7 @@ func (m *_BACnetConfirmedServiceRequestVTOpen) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConfirmedServiceRequestVTOpen) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -150,7 +153,7 @@ func BACnetConfirmedServiceRequestVTOpenParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("vtClass"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for vtClass") } - _vtClass, _vtClassErr := BACnetVTClassTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_vtClass, _vtClassErr := BACnetVTClassTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _vtClassErr != nil { return nil, errors.Wrap(_vtClassErr, "Error parsing 'vtClass' field of BACnetConfirmedServiceRequestVTOpen") } @@ -163,7 +166,7 @@ func BACnetConfirmedServiceRequestVTOpenParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("localVtSessionIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for localVtSessionIdentifier") } - _localVtSessionIdentifier, _localVtSessionIdentifierErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_localVtSessionIdentifier, _localVtSessionIdentifierErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _localVtSessionIdentifierErr != nil { return nil, errors.Wrap(_localVtSessionIdentifierErr, "Error parsing 'localVtSessionIdentifier' field of BACnetConfirmedServiceRequestVTOpen") } @@ -181,7 +184,7 @@ func BACnetConfirmedServiceRequestVTOpenParseWithBuffer(ctx context.Context, rea _BACnetConfirmedServiceRequest: &_BACnetConfirmedServiceRequest{ ServiceRequestLength: serviceRequestLength, }, - VtClass: vtClass, + VtClass: vtClass, LocalVtSessionIdentifier: localVtSessionIdentifier, } _child._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _child @@ -204,29 +207,29 @@ func (m *_BACnetConfirmedServiceRequestVTOpen) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestVTOpen") } - // Simple Field (vtClass) - if pushErr := writeBuffer.PushContext("vtClass"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for vtClass") - } - _vtClassErr := writeBuffer.WriteSerializable(ctx, m.GetVtClass()) - if popErr := writeBuffer.PopContext("vtClass"); popErr != nil { - return errors.Wrap(popErr, "Error popping for vtClass") - } - if _vtClassErr != nil { - return errors.Wrap(_vtClassErr, "Error serializing 'vtClass' field") - } + // Simple Field (vtClass) + if pushErr := writeBuffer.PushContext("vtClass"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for vtClass") + } + _vtClassErr := writeBuffer.WriteSerializable(ctx, m.GetVtClass()) + if popErr := writeBuffer.PopContext("vtClass"); popErr != nil { + return errors.Wrap(popErr, "Error popping for vtClass") + } + if _vtClassErr != nil { + return errors.Wrap(_vtClassErr, "Error serializing 'vtClass' field") + } - // Simple Field (localVtSessionIdentifier) - if pushErr := writeBuffer.PushContext("localVtSessionIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for localVtSessionIdentifier") - } - _localVtSessionIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetLocalVtSessionIdentifier()) - if popErr := writeBuffer.PopContext("localVtSessionIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for localVtSessionIdentifier") - } - if _localVtSessionIdentifierErr != nil { - return errors.Wrap(_localVtSessionIdentifierErr, "Error serializing 'localVtSessionIdentifier' field") - } + // Simple Field (localVtSessionIdentifier) + if pushErr := writeBuffer.PushContext("localVtSessionIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for localVtSessionIdentifier") + } + _localVtSessionIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetLocalVtSessionIdentifier()) + if popErr := writeBuffer.PopContext("localVtSessionIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for localVtSessionIdentifier") + } + if _localVtSessionIdentifierErr != nil { + return errors.Wrap(_localVtSessionIdentifierErr, "Error serializing 'localVtSessionIdentifier' field") + } if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestVTOpen"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConfirmedServiceRequestVTOpen") @@ -236,6 +239,7 @@ func (m *_BACnetConfirmedServiceRequestVTOpen) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConfirmedServiceRequestVTOpen) isBACnetConfirmedServiceRequestVTOpen() bool { return true } @@ -250,3 +254,6 @@ func (m *_BACnetConfirmedServiceRequestVTOpen) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestWriteProperty.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestWriteProperty.go index d5c1680efda..714f4e73fed 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestWriteProperty.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestWriteProperty.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestWriteProperty is the corresponding interface of BACnetConfirmedServiceRequestWriteProperty type BACnetConfirmedServiceRequestWriteProperty interface { @@ -55,34 +57,33 @@ type BACnetConfirmedServiceRequestWritePropertyExactly interface { // _BACnetConfirmedServiceRequestWriteProperty is the data-structure of this message type _BACnetConfirmedServiceRequestWriteProperty struct { *_BACnetConfirmedServiceRequest - ObjectIdentifier BACnetContextTagObjectIdentifier - PropertyIdentifier BACnetPropertyIdentifierTagged - ArrayIndex BACnetContextTagUnsignedInteger - PropertyValue BACnetConstructedData - Priority BACnetContextTagUnsignedInteger + ObjectIdentifier BACnetContextTagObjectIdentifier + PropertyIdentifier BACnetPropertyIdentifierTagged + ArrayIndex BACnetContextTagUnsignedInteger + PropertyValue BACnetConstructedData + Priority BACnetContextTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConfirmedServiceRequestWriteProperty) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_WRITE_PROPERTY -} +func (m *_BACnetConfirmedServiceRequestWriteProperty) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_WRITE_PROPERTY} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConfirmedServiceRequestWriteProperty) InitializeParent(parent BACnetConfirmedServiceRequest) { -} +func (m *_BACnetConfirmedServiceRequestWriteProperty) InitializeParent(parent BACnetConfirmedServiceRequest ) {} -func (m *_BACnetConfirmedServiceRequestWriteProperty) GetParent() BACnetConfirmedServiceRequest { +func (m *_BACnetConfirmedServiceRequestWriteProperty) GetParent() BACnetConfirmedServiceRequest { return m._BACnetConfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -113,15 +114,16 @@ func (m *_BACnetConfirmedServiceRequestWriteProperty) GetPriority() BACnetContex /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestWriteProperty factory function for _BACnetConfirmedServiceRequestWriteProperty -func NewBACnetConfirmedServiceRequestWriteProperty(objectIdentifier BACnetContextTagObjectIdentifier, propertyIdentifier BACnetPropertyIdentifierTagged, arrayIndex BACnetContextTagUnsignedInteger, propertyValue BACnetConstructedData, priority BACnetContextTagUnsignedInteger, serviceRequestLength uint32) *_BACnetConfirmedServiceRequestWriteProperty { +func NewBACnetConfirmedServiceRequestWriteProperty( objectIdentifier BACnetContextTagObjectIdentifier , propertyIdentifier BACnetPropertyIdentifierTagged , arrayIndex BACnetContextTagUnsignedInteger , propertyValue BACnetConstructedData , priority BACnetContextTagUnsignedInteger , serviceRequestLength uint32 ) *_BACnetConfirmedServiceRequestWriteProperty { _result := &_BACnetConfirmedServiceRequestWriteProperty{ - ObjectIdentifier: objectIdentifier, - PropertyIdentifier: propertyIdentifier, - ArrayIndex: arrayIndex, - PropertyValue: propertyValue, - Priority: priority, - _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), + ObjectIdentifier: objectIdentifier, + PropertyIdentifier: propertyIdentifier, + ArrayIndex: arrayIndex, + PropertyValue: propertyValue, + Priority: priority, + _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), } _result._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _result return _result @@ -129,7 +131,7 @@ func NewBACnetConfirmedServiceRequestWriteProperty(objectIdentifier BACnetContex // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestWriteProperty(structType interface{}) BACnetConfirmedServiceRequestWriteProperty { - if casted, ok := structType.(BACnetConfirmedServiceRequestWriteProperty); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestWriteProperty); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestWriteProperty); ok { @@ -167,6 +169,7 @@ func (m *_BACnetConfirmedServiceRequestWriteProperty) GetLengthInBits(ctx contex return lengthInBits } + func (m *_BACnetConfirmedServiceRequestWriteProperty) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -188,7 +191,7 @@ func BACnetConfirmedServiceRequestWritePropertyParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("objectIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for objectIdentifier") } - _objectIdentifier, _objectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER)) +_objectIdentifier, _objectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_BACNET_OBJECT_IDENTIFIER ) ) if _objectIdentifierErr != nil { return nil, errors.Wrap(_objectIdentifierErr, "Error parsing 'objectIdentifier' field of BACnetConfirmedServiceRequestWriteProperty") } @@ -201,7 +204,7 @@ func BACnetConfirmedServiceRequestWritePropertyParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("propertyIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for propertyIdentifier") } - _propertyIdentifier, _propertyIdentifierErr := BACnetPropertyIdentifierTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_propertyIdentifier, _propertyIdentifierErr := BACnetPropertyIdentifierTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _propertyIdentifierErr != nil { return nil, errors.Wrap(_propertyIdentifierErr, "Error parsing 'propertyIdentifier' field of BACnetConfirmedServiceRequestWriteProperty") } @@ -212,12 +215,12 @@ func BACnetConfirmedServiceRequestWritePropertyParseWithBuffer(ctx context.Conte // Optional Field (arrayIndex) (Can be skipped, if a given expression evaluates to false) var arrayIndex BACnetContextTagUnsignedInteger = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("arrayIndex"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for arrayIndex") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(2), BACnetDataType_UNSIGNED_INTEGER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(2) , BACnetDataType_UNSIGNED_INTEGER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -236,7 +239,7 @@ func BACnetConfirmedServiceRequestWritePropertyParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("propertyValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for propertyValue") } - _propertyValue, _propertyValueErr := BACnetConstructedDataParseWithBuffer(ctx, readBuffer, uint8(uint8(3)), BACnetObjectType(objectIdentifier.GetObjectType()), BACnetPropertyIdentifier(propertyIdentifier.GetValue()), (CastBACnetTagPayloadUnsignedInteger(utils.InlineIf(bool((arrayIndex) != (nil)), func() interface{} { return CastBACnetTagPayloadUnsignedInteger((arrayIndex).GetPayload()) }, func() interface{} { return CastBACnetTagPayloadUnsignedInteger(nil) })))) +_propertyValue, _propertyValueErr := BACnetConstructedDataParseWithBuffer(ctx, readBuffer , uint8( uint8(3) ) , BACnetObjectType( objectIdentifier.GetObjectType() ) , BACnetPropertyIdentifier( propertyIdentifier.GetValue() ) , (CastBACnetTagPayloadUnsignedInteger(utils.InlineIf(bool(((arrayIndex)) != (nil)), func() interface{} {return CastBACnetTagPayloadUnsignedInteger((arrayIndex).GetPayload())}, func() interface{} {return CastBACnetTagPayloadUnsignedInteger(nil)}))) ) if _propertyValueErr != nil { return nil, errors.Wrap(_propertyValueErr, "Error parsing 'propertyValue' field of BACnetConfirmedServiceRequestWriteProperty") } @@ -247,12 +250,12 @@ func BACnetConfirmedServiceRequestWritePropertyParseWithBuffer(ctx context.Conte // Optional Field (priority) (Can be skipped, if a given expression evaluates to false) var priority BACnetContextTagUnsignedInteger = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("priority"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for priority") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(4), BACnetDataType_UNSIGNED_INTEGER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(4) , BACnetDataType_UNSIGNED_INTEGER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -276,11 +279,11 @@ func BACnetConfirmedServiceRequestWritePropertyParseWithBuffer(ctx context.Conte _BACnetConfirmedServiceRequest: &_BACnetConfirmedServiceRequest{ ServiceRequestLength: serviceRequestLength, }, - ObjectIdentifier: objectIdentifier, + ObjectIdentifier: objectIdentifier, PropertyIdentifier: propertyIdentifier, - ArrayIndex: arrayIndex, - PropertyValue: propertyValue, - Priority: priority, + ArrayIndex: arrayIndex, + PropertyValue: propertyValue, + Priority: priority, } _child._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _child return _child, nil @@ -302,73 +305,73 @@ func (m *_BACnetConfirmedServiceRequestWriteProperty) SerializeWithWriteBuffer(c return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestWriteProperty") } - // Simple Field (objectIdentifier) - if pushErr := writeBuffer.PushContext("objectIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for objectIdentifier") - } - _objectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetObjectIdentifier()) - if popErr := writeBuffer.PopContext("objectIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for objectIdentifier") - } - if _objectIdentifierErr != nil { - return errors.Wrap(_objectIdentifierErr, "Error serializing 'objectIdentifier' field") - } + // Simple Field (objectIdentifier) + if pushErr := writeBuffer.PushContext("objectIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for objectIdentifier") + } + _objectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetObjectIdentifier()) + if popErr := writeBuffer.PopContext("objectIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for objectIdentifier") + } + if _objectIdentifierErr != nil { + return errors.Wrap(_objectIdentifierErr, "Error serializing 'objectIdentifier' field") + } + + // Simple Field (propertyIdentifier) + if pushErr := writeBuffer.PushContext("propertyIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for propertyIdentifier") + } + _propertyIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetPropertyIdentifier()) + if popErr := writeBuffer.PopContext("propertyIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for propertyIdentifier") + } + if _propertyIdentifierErr != nil { + return errors.Wrap(_propertyIdentifierErr, "Error serializing 'propertyIdentifier' field") + } - // Simple Field (propertyIdentifier) - if pushErr := writeBuffer.PushContext("propertyIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for propertyIdentifier") + // Optional Field (arrayIndex) (Can be skipped, if the value is null) + var arrayIndex BACnetContextTagUnsignedInteger = nil + if m.GetArrayIndex() != nil { + if pushErr := writeBuffer.PushContext("arrayIndex"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for arrayIndex") } - _propertyIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetPropertyIdentifier()) - if popErr := writeBuffer.PopContext("propertyIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for propertyIdentifier") + arrayIndex = m.GetArrayIndex() + _arrayIndexErr := writeBuffer.WriteSerializable(ctx, arrayIndex) + if popErr := writeBuffer.PopContext("arrayIndex"); popErr != nil { + return errors.Wrap(popErr, "Error popping for arrayIndex") } - if _propertyIdentifierErr != nil { - return errors.Wrap(_propertyIdentifierErr, "Error serializing 'propertyIdentifier' field") + if _arrayIndexErr != nil { + return errors.Wrap(_arrayIndexErr, "Error serializing 'arrayIndex' field") } + } - // Optional Field (arrayIndex) (Can be skipped, if the value is null) - var arrayIndex BACnetContextTagUnsignedInteger = nil - if m.GetArrayIndex() != nil { - if pushErr := writeBuffer.PushContext("arrayIndex"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for arrayIndex") - } - arrayIndex = m.GetArrayIndex() - _arrayIndexErr := writeBuffer.WriteSerializable(ctx, arrayIndex) - if popErr := writeBuffer.PopContext("arrayIndex"); popErr != nil { - return errors.Wrap(popErr, "Error popping for arrayIndex") - } - if _arrayIndexErr != nil { - return errors.Wrap(_arrayIndexErr, "Error serializing 'arrayIndex' field") - } - } + // Simple Field (propertyValue) + if pushErr := writeBuffer.PushContext("propertyValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for propertyValue") + } + _propertyValueErr := writeBuffer.WriteSerializable(ctx, m.GetPropertyValue()) + if popErr := writeBuffer.PopContext("propertyValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for propertyValue") + } + if _propertyValueErr != nil { + return errors.Wrap(_propertyValueErr, "Error serializing 'propertyValue' field") + } - // Simple Field (propertyValue) - if pushErr := writeBuffer.PushContext("propertyValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for propertyValue") - } - _propertyValueErr := writeBuffer.WriteSerializable(ctx, m.GetPropertyValue()) - if popErr := writeBuffer.PopContext("propertyValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for propertyValue") + // Optional Field (priority) (Can be skipped, if the value is null) + var priority BACnetContextTagUnsignedInteger = nil + if m.GetPriority() != nil { + if pushErr := writeBuffer.PushContext("priority"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for priority") } - if _propertyValueErr != nil { - return errors.Wrap(_propertyValueErr, "Error serializing 'propertyValue' field") + priority = m.GetPriority() + _priorityErr := writeBuffer.WriteSerializable(ctx, priority) + if popErr := writeBuffer.PopContext("priority"); popErr != nil { + return errors.Wrap(popErr, "Error popping for priority") } - - // Optional Field (priority) (Can be skipped, if the value is null) - var priority BACnetContextTagUnsignedInteger = nil - if m.GetPriority() != nil { - if pushErr := writeBuffer.PushContext("priority"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for priority") - } - priority = m.GetPriority() - _priorityErr := writeBuffer.WriteSerializable(ctx, priority) - if popErr := writeBuffer.PopContext("priority"); popErr != nil { - return errors.Wrap(popErr, "Error popping for priority") - } - if _priorityErr != nil { - return errors.Wrap(_priorityErr, "Error serializing 'priority' field") - } + if _priorityErr != nil { + return errors.Wrap(_priorityErr, "Error serializing 'priority' field") } + } if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestWriteProperty"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConfirmedServiceRequestWriteProperty") @@ -378,6 +381,7 @@ func (m *_BACnetConfirmedServiceRequestWriteProperty) SerializeWithWriteBuffer(c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConfirmedServiceRequestWriteProperty) isBACnetConfirmedServiceRequestWriteProperty() bool { return true } @@ -392,3 +396,6 @@ func (m *_BACnetConfirmedServiceRequestWriteProperty) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestWritePropertyMultiple.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestWritePropertyMultiple.go index 1fea347321a..f33bd6124bc 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestWritePropertyMultiple.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestWritePropertyMultiple.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConfirmedServiceRequestWritePropertyMultiple is the corresponding interface of BACnetConfirmedServiceRequestWritePropertyMultiple type BACnetConfirmedServiceRequestWritePropertyMultiple interface { @@ -47,33 +49,32 @@ type BACnetConfirmedServiceRequestWritePropertyMultipleExactly interface { // _BACnetConfirmedServiceRequestWritePropertyMultiple is the data-structure of this message type _BACnetConfirmedServiceRequestWritePropertyMultiple struct { *_BACnetConfirmedServiceRequest - Data []BACnetWriteAccessSpecification + Data []BACnetWriteAccessSpecification // Arguments. ServiceRequestPayloadLength uint32 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConfirmedServiceRequestWritePropertyMultiple) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_WRITE_PROPERTY_MULTIPLE -} +func (m *_BACnetConfirmedServiceRequestWritePropertyMultiple) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_WRITE_PROPERTY_MULTIPLE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConfirmedServiceRequestWritePropertyMultiple) InitializeParent(parent BACnetConfirmedServiceRequest) { -} +func (m *_BACnetConfirmedServiceRequestWritePropertyMultiple) InitializeParent(parent BACnetConfirmedServiceRequest ) {} -func (m *_BACnetConfirmedServiceRequestWritePropertyMultiple) GetParent() BACnetConfirmedServiceRequest { +func (m *_BACnetConfirmedServiceRequestWritePropertyMultiple) GetParent() BACnetConfirmedServiceRequest { return m._BACnetConfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -88,11 +89,12 @@ func (m *_BACnetConfirmedServiceRequestWritePropertyMultiple) GetData() []BACnet /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConfirmedServiceRequestWritePropertyMultiple factory function for _BACnetConfirmedServiceRequestWritePropertyMultiple -func NewBACnetConfirmedServiceRequestWritePropertyMultiple(data []BACnetWriteAccessSpecification, serviceRequestPayloadLength uint32, serviceRequestLength uint32) *_BACnetConfirmedServiceRequestWritePropertyMultiple { +func NewBACnetConfirmedServiceRequestWritePropertyMultiple( data []BACnetWriteAccessSpecification , serviceRequestPayloadLength uint32 , serviceRequestLength uint32 ) *_BACnetConfirmedServiceRequestWritePropertyMultiple { _result := &_BACnetConfirmedServiceRequestWritePropertyMultiple{ - Data: data, - _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), + Data: data, + _BACnetConfirmedServiceRequest: NewBACnetConfirmedServiceRequest(serviceRequestLength), } _result._BACnetConfirmedServiceRequest._BACnetConfirmedServiceRequestChildRequirements = _result return _result @@ -100,7 +102,7 @@ func NewBACnetConfirmedServiceRequestWritePropertyMultiple(data []BACnetWriteAcc // Deprecated: use the interface for direct cast func CastBACnetConfirmedServiceRequestWritePropertyMultiple(structType interface{}) BACnetConfirmedServiceRequestWritePropertyMultiple { - if casted, ok := structType.(BACnetConfirmedServiceRequestWritePropertyMultiple); ok { + if casted, ok := structType.(BACnetConfirmedServiceRequestWritePropertyMultiple); ok { return casted } if casted, ok := structType.(*BACnetConfirmedServiceRequestWritePropertyMultiple); ok { @@ -126,6 +128,7 @@ func (m *_BACnetConfirmedServiceRequestWritePropertyMultiple) GetLengthInBits(ct return lengthInBits } + func (m *_BACnetConfirmedServiceRequestWritePropertyMultiple) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -152,8 +155,8 @@ func BACnetConfirmedServiceRequestWritePropertyMultipleParseWithBuffer(ctx conte { _dataLength := serviceRequestPayloadLength _dataEndPos := positionAware.GetPos() + uint16(_dataLength) - for positionAware.GetPos() < _dataEndPos { - _item, _err := BACnetWriteAccessSpecificationParseWithBuffer(ctx, readBuffer) + for ;positionAware.GetPos() < _dataEndPos; { +_item, _err := BACnetWriteAccessSpecificationParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'data' field of BACnetConfirmedServiceRequestWritePropertyMultiple") } @@ -195,22 +198,22 @@ func (m *_BACnetConfirmedServiceRequestWritePropertyMultiple) SerializeWithWrite return errors.Wrap(pushErr, "Error pushing for BACnetConfirmedServiceRequestWritePropertyMultiple") } - // Array Field (data) - if pushErr := writeBuffer.PushContext("data", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for data") - } - for _curItem, _element := range m.GetData() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetData()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'data' field") - } - } - if popErr := writeBuffer.PopContext("data", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for data") + // Array Field (data) + if pushErr := writeBuffer.PushContext("data", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for data") + } + for _curItem, _element := range m.GetData() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetData()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'data' field") } + } + if popErr := writeBuffer.PopContext("data", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for data") + } if popErr := writeBuffer.PopContext("BACnetConfirmedServiceRequestWritePropertyMultiple"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConfirmedServiceRequestWritePropertyMultiple") @@ -220,13 +223,13 @@ func (m *_BACnetConfirmedServiceRequestWritePropertyMultiple) SerializeWithWrite return m.SerializeParent(ctx, writeBuffer, m, ser) } + //// // Arguments Getter func (m *_BACnetConfirmedServiceRequestWritePropertyMultiple) GetServiceRequestPayloadLength() uint32 { return m.ServiceRequestPayloadLength } - // //// @@ -244,3 +247,6 @@ func (m *_BACnetConfirmedServiceRequestWritePropertyMultiple) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedData.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedData.go index b08c5897cad..fb630587d36 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedData.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedData.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedData is the corresponding interface of BACnetConstructedData type BACnetConstructedData interface { @@ -55,12 +57,12 @@ type BACnetConstructedDataExactly interface { // _BACnetConstructedData is the data-structure of this message type _BACnetConstructedData struct { _BACnetConstructedDataChildRequirements - OpeningTag BACnetOpeningTag - PeekedTagHeader BACnetTagHeader - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + PeekedTagHeader BACnetTagHeader + ClosingTag BACnetClosingTag // Arguments. - TagNumber uint8 + TagNumber uint8 ArrayIndexArgument BACnetTagPayloadUnsignedInteger } @@ -71,6 +73,7 @@ type _BACnetConstructedDataChildRequirements interface { GetPropertyIdentifierArgument() BACnetPropertyIdentifier } + type BACnetConstructedDataParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetConstructedData, serializeChildFunction func() error) error GetTypeName() string @@ -78,13 +81,12 @@ type BACnetConstructedDataParent interface { type BACnetConstructedDataChild interface { utils.Serializable - InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) +InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) GetParent() *BACnetConstructedData GetTypeName() string BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -122,14 +124,15 @@ func (m *_BACnetConstructedData) GetPeekedTagNumber() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedData factory function for _BACnetConstructedData -func NewBACnetConstructedData(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedData { - return &_BACnetConstructedData{OpeningTag: openingTag, PeekedTagHeader: peekedTagHeader, ClosingTag: closingTag, TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument} +func NewBACnetConstructedData( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedData { +return &_BACnetConstructedData{ OpeningTag: openingTag , PeekedTagHeader: peekedTagHeader , ClosingTag: closingTag , TagNumber: tagNumber , ArrayIndexArgument: arrayIndexArgument } } // Deprecated: use the interface for direct cast func CastBACnetConstructedData(structType interface{}) BACnetConstructedData { - if casted, ok := structType.(BACnetConstructedData); ok { + if casted, ok := structType.(BACnetConstructedData); ok { return casted } if casted, ok := structType.(*BACnetConstructedData); ok { @@ -142,6 +145,7 @@ func (m *_BACnetConstructedData) GetTypeName() string { return "BACnetConstructedData" } + func (m *_BACnetConstructedData) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -177,7 +181,7 @@ func BACnetConstructedDataParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetConstructedData") } @@ -186,13 +190,13 @@ func BACnetConstructedDataParseWithBuffer(ctx context.Context, readBuffer utils. return nil, errors.Wrap(closeErr, "Error closing for openingTag") } - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Virtual field _peekedTagNumber := peekedTagHeader.GetActualTagNumber() @@ -202,1328 +206,1328 @@ func BACnetConstructedDataParseWithBuffer(ctx context.Context, readBuffer utils. // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetConstructedDataChildSerializeRequirement interface { BACnetConstructedData - InitializeParent(BACnetConstructedData, BACnetOpeningTag, BACnetTagHeader, BACnetClosingTag) + InitializeParent(BACnetConstructedData, BACnetOpeningTag, BACnetTagHeader, BACnetClosingTag) GetParent() BACnetConstructedData } var _childTemp interface{} var _child BACnetConstructedDataChildSerializeRequirement var typeSwitchError error switch { - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ABSENTEE_LIMIT && peekedTagNumber == uint8(2): // BACnetConstructedDataAbsenteeLimit +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ABSENTEE_LIMIT && peekedTagNumber == uint8(2) : // BACnetConstructedDataAbsenteeLimit _childTemp, typeSwitchError = BACnetConstructedDataAbsenteeLimitParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACCEPTED_MODES: // BACnetConstructedDataAcceptedModes +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACCEPTED_MODES : // BACnetConstructedDataAcceptedModes _childTemp, typeSwitchError = BACnetConstructedDataAcceptedModesParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACCESS_ALARM_EVENTS && peekedTagNumber == uint8(9): // BACnetConstructedDataAccessAlarmEvents +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACCESS_ALARM_EVENTS && peekedTagNumber == uint8(9) : // BACnetConstructedDataAccessAlarmEvents _childTemp, typeSwitchError = BACnetConstructedDataAccessAlarmEventsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACCESS_DOORS: // BACnetConstructedDataAccessDoors +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACCESS_DOORS : // BACnetConstructedDataAccessDoors _childTemp, typeSwitchError = BACnetConstructedDataAccessDoorsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACCESS_EVENT && peekedTagNumber == uint8(9): // BACnetConstructedDataAccessEvent +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACCESS_EVENT && peekedTagNumber == uint8(9) : // BACnetConstructedDataAccessEvent _childTemp, typeSwitchError = BACnetConstructedDataAccessEventParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACCESS_EVENT_AUTHENTICATION_FACTOR: // BACnetConstructedDataAccessEventAuthenticationFactor +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACCESS_EVENT_AUTHENTICATION_FACTOR : // BACnetConstructedDataAccessEventAuthenticationFactor _childTemp, typeSwitchError = BACnetConstructedDataAccessEventAuthenticationFactorParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACCESS_EVENT_CREDENTIAL: // BACnetConstructedDataAccessEventCredential +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACCESS_EVENT_CREDENTIAL : // BACnetConstructedDataAccessEventCredential _childTemp, typeSwitchError = BACnetConstructedDataAccessEventCredentialParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACCESS_EVENT_TAG && peekedTagNumber == uint8(2): // BACnetConstructedDataAccessEventTag +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACCESS_EVENT_TAG && peekedTagNumber == uint8(2) : // BACnetConstructedDataAccessEventTag _childTemp, typeSwitchError = BACnetConstructedDataAccessEventTagParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACCESS_EVENT_TIME: // BACnetConstructedDataAccessEventTime +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACCESS_EVENT_TIME : // BACnetConstructedDataAccessEventTime _childTemp, typeSwitchError = BACnetConstructedDataAccessEventTimeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACCESS_TRANSACTION_EVENTS && peekedTagNumber == uint8(9): // BACnetConstructedDataAccessTransactionEvents +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACCESS_TRANSACTION_EVENTS && peekedTagNumber == uint8(9) : // BACnetConstructedDataAccessTransactionEvents _childTemp, typeSwitchError = BACnetConstructedDataAccessTransactionEventsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACCOMPANIMENT: // BACnetConstructedDataAccompaniment +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACCOMPANIMENT : // BACnetConstructedDataAccompaniment _childTemp, typeSwitchError = BACnetConstructedDataAccompanimentParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACCOMPANIMENT_TIME && peekedTagNumber == uint8(2): // BACnetConstructedDataAccompanimentTime +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACCOMPANIMENT_TIME && peekedTagNumber == uint8(2) : // BACnetConstructedDataAccompanimentTime _childTemp, typeSwitchError = BACnetConstructedDataAccompanimentTimeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACK_REQUIRED && peekedTagNumber == uint8(9): // BACnetConstructedDataAckRequired +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACK_REQUIRED && peekedTagNumber == uint8(9) : // BACnetConstructedDataAckRequired _childTemp, typeSwitchError = BACnetConstructedDataAckRequiredParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACKED_TRANSITIONS && peekedTagNumber == uint8(9): // BACnetConstructedDataAckedTransitions +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACKED_TRANSITIONS && peekedTagNumber == uint8(9) : // BACnetConstructedDataAckedTransitions _childTemp, typeSwitchError = BACnetConstructedDataAckedTransitionsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_LOOP && propertyIdentifierArgument == BACnetPropertyIdentifier_ACTION && peekedTagNumber == uint8(9): // BACnetConstructedDataLoopAction +case objectTypeArgument == BACnetObjectType_LOOP && propertyIdentifierArgument == BACnetPropertyIdentifier_ACTION && peekedTagNumber == uint8(9) : // BACnetConstructedDataLoopAction _childTemp, typeSwitchError = BACnetConstructedDataLoopActionParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_COMMAND && propertyIdentifierArgument == BACnetPropertyIdentifier_ACTION: // BACnetConstructedDataCommandAction +case objectTypeArgument == BACnetObjectType_COMMAND && propertyIdentifierArgument == BACnetPropertyIdentifier_ACTION : // BACnetConstructedDataCommandAction _childTemp, typeSwitchError = BACnetConstructedDataCommandActionParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACTION: // BACnetConstructedDataAction +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACTION : // BACnetConstructedDataAction _childTemp, typeSwitchError = BACnetConstructedDataActionParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACTION_TEXT && peekedTagNumber == uint8(7): // BACnetConstructedDataActionText +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACTION_TEXT && peekedTagNumber == uint8(7) : // BACnetConstructedDataActionText _childTemp, typeSwitchError = BACnetConstructedDataActionTextParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACTIVATION_TIME: // BACnetConstructedDataActivationTime +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACTIVATION_TIME : // BACnetConstructedDataActivationTime _childTemp, typeSwitchError = BACnetConstructedDataActivationTimeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACTIVE_AUTHENTICATION_POLICY && peekedTagNumber == uint8(2): // BACnetConstructedDataActiveAuthenticationPolicy +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACTIVE_AUTHENTICATION_POLICY && peekedTagNumber == uint8(2) : // BACnetConstructedDataActiveAuthenticationPolicy _childTemp, typeSwitchError = BACnetConstructedDataActiveAuthenticationPolicyParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACTIVE_COV_MULTIPLE_SUBSCRIPTIONS: // BACnetConstructedDataActiveCOVMultipleSubscriptions +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACTIVE_COV_MULTIPLE_SUBSCRIPTIONS : // BACnetConstructedDataActiveCOVMultipleSubscriptions _childTemp, typeSwitchError = BACnetConstructedDataActiveCOVMultipleSubscriptionsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACTIVE_COV_SUBSCRIPTIONS: // BACnetConstructedDataActiveCOVSubscriptions +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACTIVE_COV_SUBSCRIPTIONS : // BACnetConstructedDataActiveCOVSubscriptions _childTemp, typeSwitchError = BACnetConstructedDataActiveCOVSubscriptionsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACTIVE_TEXT && peekedTagNumber == uint8(7): // BACnetConstructedDataActiveText +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACTIVE_TEXT && peekedTagNumber == uint8(7) : // BACnetConstructedDataActiveText _childTemp, typeSwitchError = BACnetConstructedDataActiveTextParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACTIVE_VT_SESSIONS: // BACnetConstructedDataActiveVTSessions +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACTIVE_VT_SESSIONS : // BACnetConstructedDataActiveVTSessions _childTemp, typeSwitchError = BACnetConstructedDataActiveVTSessionsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACTUAL_SHED_LEVEL: // BACnetConstructedDataActualShedLevel +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ACTUAL_SHED_LEVEL : // BACnetConstructedDataActualShedLevel _childTemp, typeSwitchError = BACnetConstructedDataActualShedLevelParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ACCESS_ZONE && propertyIdentifierArgument == BACnetPropertyIdentifier_ADJUST_VALUE && peekedTagNumber == uint8(3): // BACnetConstructedDataAccessZoneAdjustValue +case objectTypeArgument == BACnetObjectType_ACCESS_ZONE && propertyIdentifierArgument == BACnetPropertyIdentifier_ADJUST_VALUE && peekedTagNumber == uint8(3) : // BACnetConstructedDataAccessZoneAdjustValue _childTemp, typeSwitchError = BACnetConstructedDataAccessZoneAdjustValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_PULSE_CONVERTER && propertyIdentifierArgument == BACnetPropertyIdentifier_ADJUST_VALUE && peekedTagNumber == uint8(4): // BACnetConstructedDataPulseConverterAdjustValue +case objectTypeArgument == BACnetObjectType_PULSE_CONVERTER && propertyIdentifierArgument == BACnetPropertyIdentifier_ADJUST_VALUE && peekedTagNumber == uint8(4) : // BACnetConstructedDataPulseConverterAdjustValue _childTemp, typeSwitchError = BACnetConstructedDataPulseConverterAdjustValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ADJUST_VALUE && peekedTagNumber == uint8(3): // BACnetConstructedDataAdjustValue +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ADJUST_VALUE && peekedTagNumber == uint8(3) : // BACnetConstructedDataAdjustValue _childTemp, typeSwitchError = BACnetConstructedDataAdjustValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ALARM_VALUE && peekedTagNumber == uint8(9): // BACnetConstructedDataAlarmValue +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ALARM_VALUE && peekedTagNumber == uint8(9) : // BACnetConstructedDataAlarmValue _childTemp, typeSwitchError = BACnetConstructedDataAlarmValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ACCESS_DOOR && propertyIdentifierArgument == BACnetPropertyIdentifier_ALARM_VALUES: // BACnetConstructedDataAccessDoorAlarmValues +case objectTypeArgument == BACnetObjectType_ACCESS_DOOR && propertyIdentifierArgument == BACnetPropertyIdentifier_ALARM_VALUES : // BACnetConstructedDataAccessDoorAlarmValues _childTemp, typeSwitchError = BACnetConstructedDataAccessDoorAlarmValuesParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ACCESS_ZONE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALARM_VALUES: // BACnetConstructedDataAccessZoneAlarmValues +case objectTypeArgument == BACnetObjectType_ACCESS_ZONE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALARM_VALUES : // BACnetConstructedDataAccessZoneAlarmValues _childTemp, typeSwitchError = BACnetConstructedDataAccessZoneAlarmValuesParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_BITSTRING_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALARM_VALUES && peekedTagNumber == uint8(8): // BACnetConstructedDataBitStringValueAlarmValues +case objectTypeArgument == BACnetObjectType_BITSTRING_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALARM_VALUES && peekedTagNumber == uint8(8) : // BACnetConstructedDataBitStringValueAlarmValues _childTemp, typeSwitchError = BACnetConstructedDataBitStringValueAlarmValuesParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_CHARACTERSTRING_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALARM_VALUES: // BACnetConstructedDataCharacterStringValueAlarmValues +case objectTypeArgument == BACnetObjectType_CHARACTERSTRING_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALARM_VALUES : // BACnetConstructedDataCharacterStringValueAlarmValues _childTemp, typeSwitchError = BACnetConstructedDataCharacterStringValueAlarmValuesParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_LIFE_SAFETY_POINT && propertyIdentifierArgument == BACnetPropertyIdentifier_ALARM_VALUES: // BACnetConstructedDataLifeSafetyPointAlarmValues +case objectTypeArgument == BACnetObjectType_LIFE_SAFETY_POINT && propertyIdentifierArgument == BACnetPropertyIdentifier_ALARM_VALUES : // BACnetConstructedDataLifeSafetyPointAlarmValues _childTemp, typeSwitchError = BACnetConstructedDataLifeSafetyPointAlarmValuesParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_LIFE_SAFETY_ZONE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALARM_VALUES: // BACnetConstructedDataLifeSafetyZoneAlarmValues +case objectTypeArgument == BACnetObjectType_LIFE_SAFETY_ZONE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALARM_VALUES : // BACnetConstructedDataLifeSafetyZoneAlarmValues _childTemp, typeSwitchError = BACnetConstructedDataLifeSafetyZoneAlarmValuesParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_MULTI_STATE_INPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_ALARM_VALUES && peekedTagNumber == uint8(2): // BACnetConstructedDataMultiStateInputAlarmValues +case objectTypeArgument == BACnetObjectType_MULTI_STATE_INPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_ALARM_VALUES && peekedTagNumber == uint8(2) : // BACnetConstructedDataMultiStateInputAlarmValues _childTemp, typeSwitchError = BACnetConstructedDataMultiStateInputAlarmValuesParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_MULTI_STATE_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALARM_VALUES && peekedTagNumber == uint8(2): // BACnetConstructedDataMultiStateValueAlarmValues +case objectTypeArgument == BACnetObjectType_MULTI_STATE_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALARM_VALUES && peekedTagNumber == uint8(2) : // BACnetConstructedDataMultiStateValueAlarmValues _childTemp, typeSwitchError = BACnetConstructedDataMultiStateValueAlarmValuesParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_TIMER && propertyIdentifierArgument == BACnetPropertyIdentifier_ALARM_VALUES: // BACnetConstructedDataTimerAlarmValues +case objectTypeArgument == BACnetObjectType_TIMER && propertyIdentifierArgument == BACnetPropertyIdentifier_ALARM_VALUES : // BACnetConstructedDataTimerAlarmValues _childTemp, typeSwitchError = BACnetConstructedDataTimerAlarmValuesParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ALARM_VALUES: // BACnetConstructedDataAlarmValues +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ALARM_VALUES : // BACnetConstructedDataAlarmValues _childTemp, typeSwitchError = BACnetConstructedDataAlarmValuesParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ALIGN_INTERVALS && peekedTagNumber == uint8(1): // BACnetConstructedDataAlignIntervals +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ALIGN_INTERVALS && peekedTagNumber == uint8(1) : // BACnetConstructedDataAlignIntervals _childTemp, typeSwitchError = BACnetConstructedDataAlignIntervalsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ACCESS_CREDENTIAL && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataAccessCredentialAll +case objectTypeArgument == BACnetObjectType_ACCESS_CREDENTIAL && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataAccessCredentialAll _childTemp, typeSwitchError = BACnetConstructedDataAccessCredentialAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ACCESS_DOOR && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataAccessDoorAll +case objectTypeArgument == BACnetObjectType_ACCESS_DOOR && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataAccessDoorAll _childTemp, typeSwitchError = BACnetConstructedDataAccessDoorAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ACCESS_POINT && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataAccessPointAll +case objectTypeArgument == BACnetObjectType_ACCESS_POINT && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataAccessPointAll _childTemp, typeSwitchError = BACnetConstructedDataAccessPointAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ACCESS_RIGHTS && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataAccessRightsAll +case objectTypeArgument == BACnetObjectType_ACCESS_RIGHTS && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataAccessRightsAll _childTemp, typeSwitchError = BACnetConstructedDataAccessRightsAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ACCESS_USER && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataAccessUserAll +case objectTypeArgument == BACnetObjectType_ACCESS_USER && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataAccessUserAll _childTemp, typeSwitchError = BACnetConstructedDataAccessUserAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ACCESS_ZONE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataAccessZoneAll +case objectTypeArgument == BACnetObjectType_ACCESS_ZONE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataAccessZoneAll _childTemp, typeSwitchError = BACnetConstructedDataAccessZoneAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ACCUMULATOR && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataAccumulatorAll +case objectTypeArgument == BACnetObjectType_ACCUMULATOR && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataAccumulatorAll _childTemp, typeSwitchError = BACnetConstructedDataAccumulatorAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ALERT_ENROLLMENT && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataAlertEnrollmentAll +case objectTypeArgument == BACnetObjectType_ALERT_ENROLLMENT && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataAlertEnrollmentAll _childTemp, typeSwitchError = BACnetConstructedDataAlertEnrollmentAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ANALOG_INPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataAnalogInputAll +case objectTypeArgument == BACnetObjectType_ANALOG_INPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataAnalogInputAll _childTemp, typeSwitchError = BACnetConstructedDataAnalogInputAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ANALOG_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataAnalogOutputAll +case objectTypeArgument == BACnetObjectType_ANALOG_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataAnalogOutputAll _childTemp, typeSwitchError = BACnetConstructedDataAnalogOutputAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ANALOG_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataAnalogValueAll +case objectTypeArgument == BACnetObjectType_ANALOG_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataAnalogValueAll _childTemp, typeSwitchError = BACnetConstructedDataAnalogValueAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_AVERAGING && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataAveragingAll +case objectTypeArgument == BACnetObjectType_AVERAGING && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataAveragingAll _childTemp, typeSwitchError = BACnetConstructedDataAveragingAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_BINARY_INPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataBinaryInputAll +case objectTypeArgument == BACnetObjectType_BINARY_INPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataBinaryInputAll _childTemp, typeSwitchError = BACnetConstructedDataBinaryInputAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_BINARY_LIGHTING_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataBinaryLightingOutputAll +case objectTypeArgument == BACnetObjectType_BINARY_LIGHTING_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataBinaryLightingOutputAll _childTemp, typeSwitchError = BACnetConstructedDataBinaryLightingOutputAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_BINARY_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataBinaryOutputAll +case objectTypeArgument == BACnetObjectType_BINARY_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataBinaryOutputAll _childTemp, typeSwitchError = BACnetConstructedDataBinaryOutputAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_BINARY_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataBinaryValueAll +case objectTypeArgument == BACnetObjectType_BINARY_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataBinaryValueAll _childTemp, typeSwitchError = BACnetConstructedDataBinaryValueAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_BITSTRING_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataBitstringValueAll +case objectTypeArgument == BACnetObjectType_BITSTRING_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataBitstringValueAll _childTemp, typeSwitchError = BACnetConstructedDataBitstringValueAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_CALENDAR && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataCalendarAll +case objectTypeArgument == BACnetObjectType_CALENDAR && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataCalendarAll _childTemp, typeSwitchError = BACnetConstructedDataCalendarAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_CHANNEL && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataChannelAll +case objectTypeArgument == BACnetObjectType_CHANNEL && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataChannelAll _childTemp, typeSwitchError = BACnetConstructedDataChannelAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_CHARACTERSTRING_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataCharacterstringValueAll +case objectTypeArgument == BACnetObjectType_CHARACTERSTRING_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataCharacterstringValueAll _childTemp, typeSwitchError = BACnetConstructedDataCharacterstringValueAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_COMMAND && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataCommandAll +case objectTypeArgument == BACnetObjectType_COMMAND && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataCommandAll _childTemp, typeSwitchError = BACnetConstructedDataCommandAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_CREDENTIAL_DATA_INPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataCredentialDataInputAll +case objectTypeArgument == BACnetObjectType_CREDENTIAL_DATA_INPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataCredentialDataInputAll _childTemp, typeSwitchError = BACnetConstructedDataCredentialDataInputAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_DATEPATTERN_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataDatepatternValueAll +case objectTypeArgument == BACnetObjectType_DATEPATTERN_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataDatepatternValueAll _childTemp, typeSwitchError = BACnetConstructedDataDatepatternValueAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_DATE_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataDateValueAll +case objectTypeArgument == BACnetObjectType_DATE_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataDateValueAll _childTemp, typeSwitchError = BACnetConstructedDataDateValueAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_DATETIMEPATTERN_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataDatetimepatternValueAll +case objectTypeArgument == BACnetObjectType_DATETIMEPATTERN_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataDatetimepatternValueAll _childTemp, typeSwitchError = BACnetConstructedDataDatetimepatternValueAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_DATETIME_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataDatetimeValueAll +case objectTypeArgument == BACnetObjectType_DATETIME_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataDatetimeValueAll _childTemp, typeSwitchError = BACnetConstructedDataDatetimeValueAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_DEVICE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataDeviceAll +case objectTypeArgument == BACnetObjectType_DEVICE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataDeviceAll _childTemp, typeSwitchError = BACnetConstructedDataDeviceAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ELEVATOR_GROUP && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataElevatorGroupAll +case objectTypeArgument == BACnetObjectType_ELEVATOR_GROUP && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataElevatorGroupAll _childTemp, typeSwitchError = BACnetConstructedDataElevatorGroupAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ESCALATOR && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataEscalatorAll +case objectTypeArgument == BACnetObjectType_ESCALATOR && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataEscalatorAll _childTemp, typeSwitchError = BACnetConstructedDataEscalatorAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_EVENT_ENROLLMENT && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataEventEnrollmentAll +case objectTypeArgument == BACnetObjectType_EVENT_ENROLLMENT && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataEventEnrollmentAll _childTemp, typeSwitchError = BACnetConstructedDataEventEnrollmentAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_EVENT_LOG && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataEventLogAll +case objectTypeArgument == BACnetObjectType_EVENT_LOG && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataEventLogAll _childTemp, typeSwitchError = BACnetConstructedDataEventLogAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_FILE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataFileAll +case objectTypeArgument == BACnetObjectType_FILE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataFileAll _childTemp, typeSwitchError = BACnetConstructedDataFileAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_GLOBAL_GROUP && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataGlobalGroupAll +case objectTypeArgument == BACnetObjectType_GLOBAL_GROUP && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataGlobalGroupAll _childTemp, typeSwitchError = BACnetConstructedDataGlobalGroupAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_GROUP && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataGroupAll +case objectTypeArgument == BACnetObjectType_GROUP && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataGroupAll _childTemp, typeSwitchError = BACnetConstructedDataGroupAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataIntegerValueAll +case objectTypeArgument == BACnetObjectType_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataIntegerValueAll _childTemp, typeSwitchError = BACnetConstructedDataIntegerValueAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_LARGE_ANALOG_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataLargeAnalogValueAll +case objectTypeArgument == BACnetObjectType_LARGE_ANALOG_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataLargeAnalogValueAll _childTemp, typeSwitchError = BACnetConstructedDataLargeAnalogValueAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_LIFE_SAFETY_POINT && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataLifeSafetyPointAll +case objectTypeArgument == BACnetObjectType_LIFE_SAFETY_POINT && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataLifeSafetyPointAll _childTemp, typeSwitchError = BACnetConstructedDataLifeSafetyPointAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_LIFE_SAFETY_ZONE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataLifeSafetyZoneAll +case objectTypeArgument == BACnetObjectType_LIFE_SAFETY_ZONE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataLifeSafetyZoneAll _childTemp, typeSwitchError = BACnetConstructedDataLifeSafetyZoneAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_LIFT && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataLiftAll +case objectTypeArgument == BACnetObjectType_LIFT && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataLiftAll _childTemp, typeSwitchError = BACnetConstructedDataLiftAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_LIGHTING_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataLightingOutputAll +case objectTypeArgument == BACnetObjectType_LIGHTING_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataLightingOutputAll _childTemp, typeSwitchError = BACnetConstructedDataLightingOutputAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_LOAD_CONTROL && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataLoadControlAll +case objectTypeArgument == BACnetObjectType_LOAD_CONTROL && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataLoadControlAll _childTemp, typeSwitchError = BACnetConstructedDataLoadControlAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_LOOP && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataLoopAll +case objectTypeArgument == BACnetObjectType_LOOP && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataLoopAll _childTemp, typeSwitchError = BACnetConstructedDataLoopAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_MULTI_STATE_INPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataMultiStateInputAll +case objectTypeArgument == BACnetObjectType_MULTI_STATE_INPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataMultiStateInputAll _childTemp, typeSwitchError = BACnetConstructedDataMultiStateInputAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_MULTI_STATE_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataMultiStateOutputAll +case objectTypeArgument == BACnetObjectType_MULTI_STATE_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataMultiStateOutputAll _childTemp, typeSwitchError = BACnetConstructedDataMultiStateOutputAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_MULTI_STATE_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataMultiStateValueAll +case objectTypeArgument == BACnetObjectType_MULTI_STATE_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataMultiStateValueAll _childTemp, typeSwitchError = BACnetConstructedDataMultiStateValueAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_NETWORK_PORT && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataNetworkPortAll +case objectTypeArgument == BACnetObjectType_NETWORK_PORT && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataNetworkPortAll _childTemp, typeSwitchError = BACnetConstructedDataNetworkPortAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_NETWORK_SECURITY && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataNetworkSecurityAll +case objectTypeArgument == BACnetObjectType_NETWORK_SECURITY && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataNetworkSecurityAll _childTemp, typeSwitchError = BACnetConstructedDataNetworkSecurityAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_NOTIFICATION_CLASS && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataNotificationClassAll +case objectTypeArgument == BACnetObjectType_NOTIFICATION_CLASS && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataNotificationClassAll _childTemp, typeSwitchError = BACnetConstructedDataNotificationClassAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_NOTIFICATION_FORWARDER && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataNotificationForwarderAll +case objectTypeArgument == BACnetObjectType_NOTIFICATION_FORWARDER && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataNotificationForwarderAll _childTemp, typeSwitchError = BACnetConstructedDataNotificationForwarderAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_OCTETSTRING_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataOctetstringValueAll +case objectTypeArgument == BACnetObjectType_OCTETSTRING_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataOctetstringValueAll _childTemp, typeSwitchError = BACnetConstructedDataOctetstringValueAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_POSITIVE_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataPositiveIntegerValueAll +case objectTypeArgument == BACnetObjectType_POSITIVE_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataPositiveIntegerValueAll _childTemp, typeSwitchError = BACnetConstructedDataPositiveIntegerValueAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_PROGRAM && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataProgramAll +case objectTypeArgument == BACnetObjectType_PROGRAM && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataProgramAll _childTemp, typeSwitchError = BACnetConstructedDataProgramAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_PULSE_CONVERTER && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataPulseConverterAll +case objectTypeArgument == BACnetObjectType_PULSE_CONVERTER && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataPulseConverterAll _childTemp, typeSwitchError = BACnetConstructedDataPulseConverterAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_SCHEDULE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataScheduleAll +case objectTypeArgument == BACnetObjectType_SCHEDULE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataScheduleAll _childTemp, typeSwitchError = BACnetConstructedDataScheduleAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_STRUCTURED_VIEW && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataStructuredViewAll +case objectTypeArgument == BACnetObjectType_STRUCTURED_VIEW && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataStructuredViewAll _childTemp, typeSwitchError = BACnetConstructedDataStructuredViewAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_TIMEPATTERN_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataTimepatternValueAll +case objectTypeArgument == BACnetObjectType_TIMEPATTERN_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataTimepatternValueAll _childTemp, typeSwitchError = BACnetConstructedDataTimepatternValueAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_TIME_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataTimeValueAll +case objectTypeArgument == BACnetObjectType_TIME_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataTimeValueAll _childTemp, typeSwitchError = BACnetConstructedDataTimeValueAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_TIMER && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataTimerAll +case objectTypeArgument == BACnetObjectType_TIMER && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataTimerAll _childTemp, typeSwitchError = BACnetConstructedDataTimerAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_TREND_LOG && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataTrendLogAll +case objectTypeArgument == BACnetObjectType_TREND_LOG && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataTrendLogAll _childTemp, typeSwitchError = BACnetConstructedDataTrendLogAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_TREND_LOG_MULTIPLE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL: // BACnetConstructedDataTrendLogMultipleAll +case objectTypeArgument == BACnetObjectType_TREND_LOG_MULTIPLE && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL : // BACnetConstructedDataTrendLogMultipleAll _childTemp, typeSwitchError = BACnetConstructedDataTrendLogMultipleAllParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL_WRITES_SUCCESSFUL && peekedTagNumber == uint8(1): // BACnetConstructedDataAllWritesSuccessful +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ALL_WRITES_SUCCESSFUL && peekedTagNumber == uint8(1) : // BACnetConstructedDataAllWritesSuccessful _childTemp, typeSwitchError = BACnetConstructedDataAllWritesSuccessfulParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ALLOW_GROUP_DELAY_INHIBIT && peekedTagNumber == uint8(1): // BACnetConstructedDataAllowGroupDelayInhibit +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ALLOW_GROUP_DELAY_INHIBIT && peekedTagNumber == uint8(1) : // BACnetConstructedDataAllowGroupDelayInhibit _childTemp, typeSwitchError = BACnetConstructedDataAllowGroupDelayInhibitParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_APDU_LENGTH && peekedTagNumber == uint8(2): // BACnetConstructedDataAPDULength +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_APDU_LENGTH && peekedTagNumber == uint8(2) : // BACnetConstructedDataAPDULength _childTemp, typeSwitchError = BACnetConstructedDataAPDULengthParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_APDU_SEGMENT_TIMEOUT && peekedTagNumber == uint8(2): // BACnetConstructedDataAPDUSegmentTimeout +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_APDU_SEGMENT_TIMEOUT && peekedTagNumber == uint8(2) : // BACnetConstructedDataAPDUSegmentTimeout _childTemp, typeSwitchError = BACnetConstructedDataAPDUSegmentTimeoutParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_APDU_TIMEOUT && peekedTagNumber == uint8(2): // BACnetConstructedDataAPDUTimeout +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_APDU_TIMEOUT && peekedTagNumber == uint8(2) : // BACnetConstructedDataAPDUTimeout _childTemp, typeSwitchError = BACnetConstructedDataAPDUTimeoutParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_APPLICATION_SOFTWARE_VERSION && peekedTagNumber == uint8(7): // BACnetConstructedDataApplicationSoftwareVersion +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_APPLICATION_SOFTWARE_VERSION && peekedTagNumber == uint8(7) : // BACnetConstructedDataApplicationSoftwareVersion _childTemp, typeSwitchError = BACnetConstructedDataApplicationSoftwareVersionParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ARCHIVE && peekedTagNumber == uint8(1): // BACnetConstructedDataArchive +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ARCHIVE && peekedTagNumber == uint8(1) : // BACnetConstructedDataArchive _childTemp, typeSwitchError = BACnetConstructedDataArchiveParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ASSIGNED_ACCESS_RIGHTS: // BACnetConstructedDataAssignedAccessRights +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ASSIGNED_ACCESS_RIGHTS : // BACnetConstructedDataAssignedAccessRights _childTemp, typeSwitchError = BACnetConstructedDataAssignedAccessRightsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ASSIGNED_LANDING_CALLS: // BACnetConstructedDataAssignedLandingCalls +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ASSIGNED_LANDING_CALLS : // BACnetConstructedDataAssignedLandingCalls _childTemp, typeSwitchError = BACnetConstructedDataAssignedLandingCallsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ATTEMPTED_SAMPLES && peekedTagNumber == uint8(2): // BACnetConstructedDataAttemptedSamples +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ATTEMPTED_SAMPLES && peekedTagNumber == uint8(2) : // BACnetConstructedDataAttemptedSamples _childTemp, typeSwitchError = BACnetConstructedDataAttemptedSamplesParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_AUTHENTICATION_FACTORS: // BACnetConstructedDataAuthenticationFactors +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_AUTHENTICATION_FACTORS : // BACnetConstructedDataAuthenticationFactors _childTemp, typeSwitchError = BACnetConstructedDataAuthenticationFactorsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_AUTHENTICATION_POLICY_LIST: // BACnetConstructedDataAuthenticationPolicyList +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_AUTHENTICATION_POLICY_LIST : // BACnetConstructedDataAuthenticationPolicyList _childTemp, typeSwitchError = BACnetConstructedDataAuthenticationPolicyListParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_AUTHENTICATION_POLICY_NAMES && peekedTagNumber == uint8(7): // BACnetConstructedDataAuthenticationPolicyNames +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_AUTHENTICATION_POLICY_NAMES && peekedTagNumber == uint8(7) : // BACnetConstructedDataAuthenticationPolicyNames _childTemp, typeSwitchError = BACnetConstructedDataAuthenticationPolicyNamesParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_AUTHENTICATION_STATUS && peekedTagNumber == uint8(9): // BACnetConstructedDataAuthenticationStatus +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_AUTHENTICATION_STATUS && peekedTagNumber == uint8(9) : // BACnetConstructedDataAuthenticationStatus _childTemp, typeSwitchError = BACnetConstructedDataAuthenticationStatusParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_AUTHORIZATION_EXEMPTIONS && peekedTagNumber == uint8(9): // BACnetConstructedDataAuthorizationExemptions +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_AUTHORIZATION_EXEMPTIONS && peekedTagNumber == uint8(9) : // BACnetConstructedDataAuthorizationExemptions _childTemp, typeSwitchError = BACnetConstructedDataAuthorizationExemptionsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_AUTHORIZATION_MODE && peekedTagNumber == uint8(9): // BACnetConstructedDataAuthorizationMode +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_AUTHORIZATION_MODE && peekedTagNumber == uint8(9) : // BACnetConstructedDataAuthorizationMode _childTemp, typeSwitchError = BACnetConstructedDataAuthorizationModeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_AUTO_SLAVE_DISCOVERY && peekedTagNumber == uint8(1): // BACnetConstructedDataAutoSlaveDiscovery +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_AUTO_SLAVE_DISCOVERY && peekedTagNumber == uint8(1) : // BACnetConstructedDataAutoSlaveDiscovery _childTemp, typeSwitchError = BACnetConstructedDataAutoSlaveDiscoveryParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_AVERAGE_VALUE && peekedTagNumber == uint8(4): // BACnetConstructedDataAverageValue +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_AVERAGE_VALUE && peekedTagNumber == uint8(4) : // BACnetConstructedDataAverageValue _childTemp, typeSwitchError = BACnetConstructedDataAverageValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BACKUP_AND_RESTORE_STATE && peekedTagNumber == uint8(9): // BACnetConstructedDataBackupAndRestoreState +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BACKUP_AND_RESTORE_STATE && peekedTagNumber == uint8(9) : // BACnetConstructedDataBackupAndRestoreState _childTemp, typeSwitchError = BACnetConstructedDataBackupAndRestoreStateParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BACKUP_FAILURE_TIMEOUT && peekedTagNumber == uint8(2): // BACnetConstructedDataBackupFailureTimeout +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BACKUP_FAILURE_TIMEOUT && peekedTagNumber == uint8(2) : // BACnetConstructedDataBackupFailureTimeout _childTemp, typeSwitchError = BACnetConstructedDataBackupFailureTimeoutParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BACKUP_PREPARATION_TIME && peekedTagNumber == uint8(2): // BACnetConstructedDataBackupPreparationTime +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BACKUP_PREPARATION_TIME && peekedTagNumber == uint8(2) : // BACnetConstructedDataBackupPreparationTime _childTemp, typeSwitchError = BACnetConstructedDataBackupPreparationTimeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BACNET_IP_GLOBAL_ADDRESS: // BACnetConstructedDataBACnetIPGlobalAddress +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BACNET_IP_GLOBAL_ADDRESS : // BACnetConstructedDataBACnetIPGlobalAddress _childTemp, typeSwitchError = BACnetConstructedDataBACnetIPGlobalAddressParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BACNET_IP_MODE && peekedTagNumber == uint8(9): // BACnetConstructedDataBACnetIPMode +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BACNET_IP_MODE && peekedTagNumber == uint8(9) : // BACnetConstructedDataBACnetIPMode _childTemp, typeSwitchError = BACnetConstructedDataBACnetIPModeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BACNET_IP_MULTICAST_ADDRESS && peekedTagNumber == uint8(6): // BACnetConstructedDataBACnetIPMulticastAddress +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BACNET_IP_MULTICAST_ADDRESS && peekedTagNumber == uint8(6) : // BACnetConstructedDataBACnetIPMulticastAddress _childTemp, typeSwitchError = BACnetConstructedDataBACnetIPMulticastAddressParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BACNET_IP_NAT_TRAVERSAL && peekedTagNumber == uint8(1): // BACnetConstructedDataBACnetIPNATTraversal +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BACNET_IP_NAT_TRAVERSAL && peekedTagNumber == uint8(1) : // BACnetConstructedDataBACnetIPNATTraversal _childTemp, typeSwitchError = BACnetConstructedDataBACnetIPNATTraversalParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BACNET_IP_UDP_PORT && peekedTagNumber == uint8(2): // BACnetConstructedDataBACnetIPUDPPort +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BACNET_IP_UDP_PORT && peekedTagNumber == uint8(2) : // BACnetConstructedDataBACnetIPUDPPort _childTemp, typeSwitchError = BACnetConstructedDataBACnetIPUDPPortParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BACNET_IPV6_MODE && peekedTagNumber == uint8(9): // BACnetConstructedDataBACnetIPv6Mode +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BACNET_IPV6_MODE && peekedTagNumber == uint8(9) : // BACnetConstructedDataBACnetIPv6Mode _childTemp, typeSwitchError = BACnetConstructedDataBACnetIPv6ModeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BACNET_IPV6_UDP_PORT && peekedTagNumber == uint8(2): // BACnetConstructedDataBACnetIPv6UDPPort +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BACNET_IPV6_UDP_PORT && peekedTagNumber == uint8(2) : // BACnetConstructedDataBACnetIPv6UDPPort _childTemp, typeSwitchError = BACnetConstructedDataBACnetIPv6UDPPortParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BACNET_IPV6_MULTICAST_ADDRESS && peekedTagNumber == uint8(6): // BACnetConstructedDataBACnetIPv6MulticastAddress +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BACNET_IPV6_MULTICAST_ADDRESS && peekedTagNumber == uint8(6) : // BACnetConstructedDataBACnetIPv6MulticastAddress _childTemp, typeSwitchError = BACnetConstructedDataBACnetIPv6MulticastAddressParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BASE_DEVICE_SECURITY_POLICY && peekedTagNumber == uint8(9): // BACnetConstructedDataBaseDeviceSecurityPolicy +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BASE_DEVICE_SECURITY_POLICY && peekedTagNumber == uint8(9) : // BACnetConstructedDataBaseDeviceSecurityPolicy _childTemp, typeSwitchError = BACnetConstructedDataBaseDeviceSecurityPolicyParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BBMD_ACCEPT_FD_REGISTRATIONS && peekedTagNumber == uint8(1): // BACnetConstructedDataBBMDAcceptFDRegistrations +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BBMD_ACCEPT_FD_REGISTRATIONS && peekedTagNumber == uint8(1) : // BACnetConstructedDataBBMDAcceptFDRegistrations _childTemp, typeSwitchError = BACnetConstructedDataBBMDAcceptFDRegistrationsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BBMD_BROADCAST_DISTRIBUTION_TABLE: // BACnetConstructedDataBBMDBroadcastDistributionTable +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BBMD_BROADCAST_DISTRIBUTION_TABLE : // BACnetConstructedDataBBMDBroadcastDistributionTable _childTemp, typeSwitchError = BACnetConstructedDataBBMDBroadcastDistributionTableParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BBMD_FOREIGN_DEVICE_TABLE: // BACnetConstructedDataBBMDForeignDeviceTable +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BBMD_FOREIGN_DEVICE_TABLE : // BACnetConstructedDataBBMDForeignDeviceTable _childTemp, typeSwitchError = BACnetConstructedDataBBMDForeignDeviceTableParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BELONGS_TO: // BACnetConstructedDataBelongsTo +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BELONGS_TO : // BACnetConstructedDataBelongsTo _childTemp, typeSwitchError = BACnetConstructedDataBelongsToParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BIAS && peekedTagNumber == uint8(4): // BACnetConstructedDataBias +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BIAS && peekedTagNumber == uint8(4) : // BACnetConstructedDataBias _childTemp, typeSwitchError = BACnetConstructedDataBiasParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BIT_MASK && peekedTagNumber == uint8(8): // BACnetConstructedDataBitMask +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BIT_MASK && peekedTagNumber == uint8(8) : // BACnetConstructedDataBitMask _childTemp, typeSwitchError = BACnetConstructedDataBitMaskParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BIT_TEXT && peekedTagNumber == uint8(7): // BACnetConstructedDataBitText +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BIT_TEXT && peekedTagNumber == uint8(7) : // BACnetConstructedDataBitText _childTemp, typeSwitchError = BACnetConstructedDataBitTextParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BLINK_WARN_ENABLE && peekedTagNumber == uint8(1): // BACnetConstructedDataBlinkWarnEnable +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BLINK_WARN_ENABLE && peekedTagNumber == uint8(1) : // BACnetConstructedDataBlinkWarnEnable _childTemp, typeSwitchError = BACnetConstructedDataBlinkWarnEnableParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BUFFER_SIZE && peekedTagNumber == uint8(2): // BACnetConstructedDataBufferSize +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_BUFFER_SIZE && peekedTagNumber == uint8(2) : // BACnetConstructedDataBufferSize _childTemp, typeSwitchError = BACnetConstructedDataBufferSizeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CAR_ASSIGNED_DIRECTION && peekedTagNumber == uint8(9): // BACnetConstructedDataCarAssignedDirection +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CAR_ASSIGNED_DIRECTION && peekedTagNumber == uint8(9) : // BACnetConstructedDataCarAssignedDirection _childTemp, typeSwitchError = BACnetConstructedDataCarAssignedDirectionParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CAR_DOOR_COMMAND && peekedTagNumber == uint8(9): // BACnetConstructedDataCarDoorCommand +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CAR_DOOR_COMMAND && peekedTagNumber == uint8(9) : // BACnetConstructedDataCarDoorCommand _childTemp, typeSwitchError = BACnetConstructedDataCarDoorCommandParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CAR_DOOR_STATUS && peekedTagNumber == uint8(9): // BACnetConstructedDataCarDoorStatus +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CAR_DOOR_STATUS && peekedTagNumber == uint8(9) : // BACnetConstructedDataCarDoorStatus _childTemp, typeSwitchError = BACnetConstructedDataCarDoorStatusParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CAR_DOOR_TEXT && peekedTagNumber == uint8(7): // BACnetConstructedDataCarDoorText +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CAR_DOOR_TEXT && peekedTagNumber == uint8(7) : // BACnetConstructedDataCarDoorText _childTemp, typeSwitchError = BACnetConstructedDataCarDoorTextParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CAR_DOOR_ZONE && peekedTagNumber == uint8(1): // BACnetConstructedDataCarDoorZone +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CAR_DOOR_ZONE && peekedTagNumber == uint8(1) : // BACnetConstructedDataCarDoorZone _childTemp, typeSwitchError = BACnetConstructedDataCarDoorZoneParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CAR_DRIVE_STATUS && peekedTagNumber == uint8(9): // BACnetConstructedDataCarDriveStatus +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CAR_DRIVE_STATUS && peekedTagNumber == uint8(9) : // BACnetConstructedDataCarDriveStatus _childTemp, typeSwitchError = BACnetConstructedDataCarDriveStatusParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CAR_LOAD && peekedTagNumber == uint8(4): // BACnetConstructedDataCarLoad +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CAR_LOAD && peekedTagNumber == uint8(4) : // BACnetConstructedDataCarLoad _childTemp, typeSwitchError = BACnetConstructedDataCarLoadParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CAR_LOAD_UNITS && peekedTagNumber == uint8(9): // BACnetConstructedDataCarLoadUnits +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CAR_LOAD_UNITS && peekedTagNumber == uint8(9) : // BACnetConstructedDataCarLoadUnits _childTemp, typeSwitchError = BACnetConstructedDataCarLoadUnitsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CAR_MODE && peekedTagNumber == uint8(9): // BACnetConstructedDataCarMode +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CAR_MODE && peekedTagNumber == uint8(9) : // BACnetConstructedDataCarMode _childTemp, typeSwitchError = BACnetConstructedDataCarModeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CAR_MOVING_DIRECTION && peekedTagNumber == uint8(9): // BACnetConstructedDataCarMovingDirection +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CAR_MOVING_DIRECTION && peekedTagNumber == uint8(9) : // BACnetConstructedDataCarMovingDirection _childTemp, typeSwitchError = BACnetConstructedDataCarMovingDirectionParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CAR_POSITION && peekedTagNumber == uint8(2): // BACnetConstructedDataCarPosition +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CAR_POSITION && peekedTagNumber == uint8(2) : // BACnetConstructedDataCarPosition _childTemp, typeSwitchError = BACnetConstructedDataCarPositionParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CHANGE_OF_STATE_COUNT && peekedTagNumber == uint8(2): // BACnetConstructedDataChangeOfStateCount +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CHANGE_OF_STATE_COUNT && peekedTagNumber == uint8(2) : // BACnetConstructedDataChangeOfStateCount _childTemp, typeSwitchError = BACnetConstructedDataChangeOfStateCountParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CHANGE_OF_STATE_TIME: // BACnetConstructedDataChangeOfStateTime +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CHANGE_OF_STATE_TIME : // BACnetConstructedDataChangeOfStateTime _childTemp, typeSwitchError = BACnetConstructedDataChangeOfStateTimeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CHANGES_PENDING && peekedTagNumber == uint8(1): // BACnetConstructedDataChangesPending +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CHANGES_PENDING && peekedTagNumber == uint8(1) : // BACnetConstructedDataChangesPending _childTemp, typeSwitchError = BACnetConstructedDataChangesPendingParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CHANNEL_NUMBER && peekedTagNumber == uint8(2): // BACnetConstructedDataChannelNumber +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CHANNEL_NUMBER && peekedTagNumber == uint8(2) : // BACnetConstructedDataChannelNumber _childTemp, typeSwitchError = BACnetConstructedDataChannelNumberParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CLIENT_COV_INCREMENT: // BACnetConstructedDataClientCOVIncrement +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CLIENT_COV_INCREMENT : // BACnetConstructedDataClientCOVIncrement _childTemp, typeSwitchError = BACnetConstructedDataClientCOVIncrementParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_COMMAND && peekedTagNumber == uint8(9): // BACnetConstructedDataCommand +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_COMMAND && peekedTagNumber == uint8(9) : // BACnetConstructedDataCommand _childTemp, typeSwitchError = BACnetConstructedDataCommandParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_COMMAND_TIME_ARRAY: // BACnetConstructedDataCommandTimeArray +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_COMMAND_TIME_ARRAY : // BACnetConstructedDataCommandTimeArray _childTemp, typeSwitchError = BACnetConstructedDataCommandTimeArrayParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CONFIGURATION_FILES && peekedTagNumber == uint8(12): // BACnetConstructedDataConfigurationFiles +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CONFIGURATION_FILES && peekedTagNumber == uint8(12) : // BACnetConstructedDataConfigurationFiles _childTemp, typeSwitchError = BACnetConstructedDataConfigurationFilesParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CONTROL_GROUPS && peekedTagNumber == uint8(2): // BACnetConstructedDataControlGroups +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CONTROL_GROUPS && peekedTagNumber == uint8(2) : // BACnetConstructedDataControlGroups _childTemp, typeSwitchError = BACnetConstructedDataControlGroupsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CONTROLLED_VARIABLE_REFERENCE: // BACnetConstructedDataControlledVariableReference +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CONTROLLED_VARIABLE_REFERENCE : // BACnetConstructedDataControlledVariableReference _childTemp, typeSwitchError = BACnetConstructedDataControlledVariableReferenceParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CONTROLLED_VARIABLE_UNITS && peekedTagNumber == uint8(9): // BACnetConstructedDataControlledVariableUnits +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CONTROLLED_VARIABLE_UNITS && peekedTagNumber == uint8(9) : // BACnetConstructedDataControlledVariableUnits _childTemp, typeSwitchError = BACnetConstructedDataControlledVariableUnitsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CONTROLLED_VARIABLE_VALUE && peekedTagNumber == uint8(4): // BACnetConstructedDataControlledVariableValue +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CONTROLLED_VARIABLE_VALUE && peekedTagNumber == uint8(4) : // BACnetConstructedDataControlledVariableValue _childTemp, typeSwitchError = BACnetConstructedDataControlledVariableValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_COUNT && peekedTagNumber == uint8(2): // BACnetConstructedDataCount +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_COUNT && peekedTagNumber == uint8(2) : // BACnetConstructedDataCount _childTemp, typeSwitchError = BACnetConstructedDataCountParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_COUNT_BEFORE_CHANGE && peekedTagNumber == uint8(2): // BACnetConstructedDataCountBeforeChange +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_COUNT_BEFORE_CHANGE && peekedTagNumber == uint8(2) : // BACnetConstructedDataCountBeforeChange _childTemp, typeSwitchError = BACnetConstructedDataCountBeforeChangeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_COUNT_CHANGE_TIME: // BACnetConstructedDataCountChangeTime +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_COUNT_CHANGE_TIME : // BACnetConstructedDataCountChangeTime _childTemp, typeSwitchError = BACnetConstructedDataCountChangeTimeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_COV_INCREMENT && peekedTagNumber == uint8(2): // BACnetConstructedDataIntegerValueCOVIncrement +case objectTypeArgument == BACnetObjectType_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_COV_INCREMENT && peekedTagNumber == uint8(2) : // BACnetConstructedDataIntegerValueCOVIncrement _childTemp, typeSwitchError = BACnetConstructedDataIntegerValueCOVIncrementParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_LARGE_ANALOG_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_COV_INCREMENT && peekedTagNumber == uint8(5): // BACnetConstructedDataLargeAnalogValueCOVIncrement +case objectTypeArgument == BACnetObjectType_LARGE_ANALOG_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_COV_INCREMENT && peekedTagNumber == uint8(5) : // BACnetConstructedDataLargeAnalogValueCOVIncrement _childTemp, typeSwitchError = BACnetConstructedDataLargeAnalogValueCOVIncrementParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_POSITIVE_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_COV_INCREMENT && peekedTagNumber == uint8(2): // BACnetConstructedDataPositiveIntegerValueCOVIncrement +case objectTypeArgument == BACnetObjectType_POSITIVE_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_COV_INCREMENT && peekedTagNumber == uint8(2) : // BACnetConstructedDataPositiveIntegerValueCOVIncrement _childTemp, typeSwitchError = BACnetConstructedDataPositiveIntegerValueCOVIncrementParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_COV_INCREMENT && peekedTagNumber == uint8(4): // BACnetConstructedDataCOVIncrement +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_COV_INCREMENT && peekedTagNumber == uint8(4) : // BACnetConstructedDataCOVIncrement _childTemp, typeSwitchError = BACnetConstructedDataCOVIncrementParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_COV_PERIOD && peekedTagNumber == uint8(2): // BACnetConstructedDataCOVPeriod +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_COV_PERIOD && peekedTagNumber == uint8(2) : // BACnetConstructedDataCOVPeriod _childTemp, typeSwitchError = BACnetConstructedDataCOVPeriodParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_COV_RESUBSCRIPTION_INTERVAL && peekedTagNumber == uint8(2): // BACnetConstructedDataCOVResubscriptionInterval +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_COV_RESUBSCRIPTION_INTERVAL && peekedTagNumber == uint8(2) : // BACnetConstructedDataCOVResubscriptionInterval _childTemp, typeSwitchError = BACnetConstructedDataCOVResubscriptionIntervalParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_COVU_PERIOD && peekedTagNumber == uint8(2): // BACnetConstructedDataCOVUPeriod +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_COVU_PERIOD && peekedTagNumber == uint8(2) : // BACnetConstructedDataCOVUPeriod _childTemp, typeSwitchError = BACnetConstructedDataCOVUPeriodParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_COVU_RECIPIENTS: // BACnetConstructedDataCOVURecipients +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_COVU_RECIPIENTS : // BACnetConstructedDataCOVURecipients _childTemp, typeSwitchError = BACnetConstructedDataCOVURecipientsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CREDENTIAL_DISABLE && peekedTagNumber == uint8(9): // BACnetConstructedDataCredentialDisable +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CREDENTIAL_DISABLE && peekedTagNumber == uint8(9) : // BACnetConstructedDataCredentialDisable _childTemp, typeSwitchError = BACnetConstructedDataCredentialDisableParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CREDENTIAL_STATUS && peekedTagNumber == uint8(9): // BACnetConstructedDataCredentialStatus +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CREDENTIAL_STATUS && peekedTagNumber == uint8(9) : // BACnetConstructedDataCredentialStatus _childTemp, typeSwitchError = BACnetConstructedDataCredentialStatusParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CREDENTIALS: // BACnetConstructedDataCredentials +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CREDENTIALS : // BACnetConstructedDataCredentials _childTemp, typeSwitchError = BACnetConstructedDataCredentialsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CREDENTIALS_IN_ZONE: // BACnetConstructedDataCredentialsInZone +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CREDENTIALS_IN_ZONE : // BACnetConstructedDataCredentialsInZone _childTemp, typeSwitchError = BACnetConstructedDataCredentialsInZoneParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CURRENT_COMMAND_PRIORITY: // BACnetConstructedDataCurrentCommandPriority +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_CURRENT_COMMAND_PRIORITY : // BACnetConstructedDataCurrentCommandPriority _childTemp, typeSwitchError = BACnetConstructedDataCurrentCommandPriorityParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DATABASE_REVISION && peekedTagNumber == uint8(2): // BACnetConstructedDataDatabaseRevision +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DATABASE_REVISION && peekedTagNumber == uint8(2) : // BACnetConstructedDataDatabaseRevision _childTemp, typeSwitchError = BACnetConstructedDataDatabaseRevisionParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DATE_LIST: // BACnetConstructedDataDateList +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DATE_LIST : // BACnetConstructedDataDateList _childTemp, typeSwitchError = BACnetConstructedDataDateListParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DAYLIGHT_SAVINGS_STATUS && peekedTagNumber == uint8(1): // BACnetConstructedDataDaylightSavingsStatus +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DAYLIGHT_SAVINGS_STATUS && peekedTagNumber == uint8(1) : // BACnetConstructedDataDaylightSavingsStatus _childTemp, typeSwitchError = BACnetConstructedDataDaylightSavingsStatusParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DAYS_REMAINING && peekedTagNumber == uint8(3): // BACnetConstructedDataDaysRemaining +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DAYS_REMAINING && peekedTagNumber == uint8(3) : // BACnetConstructedDataDaysRemaining _childTemp, typeSwitchError = BACnetConstructedDataDaysRemainingParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_DEADBAND && peekedTagNumber == uint8(2): // BACnetConstructedDataIntegerValueDeadband +case objectTypeArgument == BACnetObjectType_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_DEADBAND && peekedTagNumber == uint8(2) : // BACnetConstructedDataIntegerValueDeadband _childTemp, typeSwitchError = BACnetConstructedDataIntegerValueDeadbandParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_LARGE_ANALOG_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_DEADBAND && peekedTagNumber == uint8(5): // BACnetConstructedDataLargeAnalogValueDeadband +case objectTypeArgument == BACnetObjectType_LARGE_ANALOG_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_DEADBAND && peekedTagNumber == uint8(5) : // BACnetConstructedDataLargeAnalogValueDeadband _childTemp, typeSwitchError = BACnetConstructedDataLargeAnalogValueDeadbandParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_POSITIVE_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_DEADBAND && peekedTagNumber == uint8(2): // BACnetConstructedDataPositiveIntegerValueDeadband +case objectTypeArgument == BACnetObjectType_POSITIVE_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_DEADBAND && peekedTagNumber == uint8(2) : // BACnetConstructedDataPositiveIntegerValueDeadband _childTemp, typeSwitchError = BACnetConstructedDataPositiveIntegerValueDeadbandParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DEADBAND && peekedTagNumber == uint8(4): // BACnetConstructedDataDeadband +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DEADBAND && peekedTagNumber == uint8(4) : // BACnetConstructedDataDeadband _childTemp, typeSwitchError = BACnetConstructedDataDeadbandParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DEFAULT_FADE_TIME && peekedTagNumber == uint8(2): // BACnetConstructedDataDefaultFadeTime +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DEFAULT_FADE_TIME && peekedTagNumber == uint8(2) : // BACnetConstructedDataDefaultFadeTime _childTemp, typeSwitchError = BACnetConstructedDataDefaultFadeTimeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DEFAULT_RAMP_RATE && peekedTagNumber == uint8(4): // BACnetConstructedDataDefaultRampRate +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DEFAULT_RAMP_RATE && peekedTagNumber == uint8(4) : // BACnetConstructedDataDefaultRampRate _childTemp, typeSwitchError = BACnetConstructedDataDefaultRampRateParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DEFAULT_STEP_INCREMENT && peekedTagNumber == uint8(4): // BACnetConstructedDataDefaultStepIncrement +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DEFAULT_STEP_INCREMENT && peekedTagNumber == uint8(4) : // BACnetConstructedDataDefaultStepIncrement _childTemp, typeSwitchError = BACnetConstructedDataDefaultStepIncrementParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DEFAULT_SUBORDINATE_RELATIONSHIP && peekedTagNumber == uint8(9): // BACnetConstructedDataDefaultSubordinateRelationship +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DEFAULT_SUBORDINATE_RELATIONSHIP && peekedTagNumber == uint8(9) : // BACnetConstructedDataDefaultSubordinateRelationship _childTemp, typeSwitchError = BACnetConstructedDataDefaultSubordinateRelationshipParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DEFAULT_TIMEOUT && peekedTagNumber == uint8(2): // BACnetConstructedDataDefaultTimeout +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DEFAULT_TIMEOUT && peekedTagNumber == uint8(2) : // BACnetConstructedDataDefaultTimeout _childTemp, typeSwitchError = BACnetConstructedDataDefaultTimeoutParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DEPLOYED_PROFILE_LOCATION && peekedTagNumber == uint8(7): // BACnetConstructedDataDeployedProfileLocation +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DEPLOYED_PROFILE_LOCATION && peekedTagNumber == uint8(7) : // BACnetConstructedDataDeployedProfileLocation _childTemp, typeSwitchError = BACnetConstructedDataDeployedProfileLocationParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DERIVATIVE_CONSTANT && peekedTagNumber == uint8(4): // BACnetConstructedDataDerivativeConstant +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DERIVATIVE_CONSTANT && peekedTagNumber == uint8(4) : // BACnetConstructedDataDerivativeConstant _childTemp, typeSwitchError = BACnetConstructedDataDerivativeConstantParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DERIVATIVE_CONSTANT_UNITS && peekedTagNumber == uint8(9): // BACnetConstructedDataDerivativeConstantUnits +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DERIVATIVE_CONSTANT_UNITS && peekedTagNumber == uint8(9) : // BACnetConstructedDataDerivativeConstantUnits _childTemp, typeSwitchError = BACnetConstructedDataDerivativeConstantUnitsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DESCRIPTION && peekedTagNumber == uint8(7): // BACnetConstructedDataDescription +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DESCRIPTION && peekedTagNumber == uint8(7) : // BACnetConstructedDataDescription _childTemp, typeSwitchError = BACnetConstructedDataDescriptionParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DESCRIPTION_OF_HALT && peekedTagNumber == uint8(7): // BACnetConstructedDataDescriptionOfHalt +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DESCRIPTION_OF_HALT && peekedTagNumber == uint8(7) : // BACnetConstructedDataDescriptionOfHalt _childTemp, typeSwitchError = BACnetConstructedDataDescriptionOfHaltParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DEVICE_ADDRESS_BINDING: // BACnetConstructedDataDeviceAddressBinding +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DEVICE_ADDRESS_BINDING : // BACnetConstructedDataDeviceAddressBinding _childTemp, typeSwitchError = BACnetConstructedDataDeviceAddressBindingParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DEVICE_TYPE && peekedTagNumber == uint8(7): // BACnetConstructedDataDeviceType +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DEVICE_TYPE && peekedTagNumber == uint8(7) : // BACnetConstructedDataDeviceType _childTemp, typeSwitchError = BACnetConstructedDataDeviceTypeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DIRECT_READING && peekedTagNumber == uint8(4): // BACnetConstructedDataDirectReading +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DIRECT_READING && peekedTagNumber == uint8(4) : // BACnetConstructedDataDirectReading _childTemp, typeSwitchError = BACnetConstructedDataDirectReadingParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DISTRIBUTION_KEY_REVISION && peekedTagNumber == uint8(2): // BACnetConstructedDataDistributionKeyRevision +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DISTRIBUTION_KEY_REVISION && peekedTagNumber == uint8(2) : // BACnetConstructedDataDistributionKeyRevision _childTemp, typeSwitchError = BACnetConstructedDataDistributionKeyRevisionParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DO_NOT_HIDE && peekedTagNumber == uint8(1): // BACnetConstructedDataDoNotHide +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DO_NOT_HIDE && peekedTagNumber == uint8(1) : // BACnetConstructedDataDoNotHide _childTemp, typeSwitchError = BACnetConstructedDataDoNotHideParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DOOR_ALARM_STATE && peekedTagNumber == uint8(9): // BACnetConstructedDataDoorAlarmState +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DOOR_ALARM_STATE && peekedTagNumber == uint8(9) : // BACnetConstructedDataDoorAlarmState _childTemp, typeSwitchError = BACnetConstructedDataDoorAlarmStateParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DOOR_EXTENDED_PULSE_TIME && peekedTagNumber == uint8(2): // BACnetConstructedDataDoorExtendedPulseTime +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DOOR_EXTENDED_PULSE_TIME && peekedTagNumber == uint8(2) : // BACnetConstructedDataDoorExtendedPulseTime _childTemp, typeSwitchError = BACnetConstructedDataDoorExtendedPulseTimeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DOOR_MEMBERS: // BACnetConstructedDataDoorMembers +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DOOR_MEMBERS : // BACnetConstructedDataDoorMembers _childTemp, typeSwitchError = BACnetConstructedDataDoorMembersParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DOOR_OPEN_TOO_LONG_TIME && peekedTagNumber == uint8(2): // BACnetConstructedDataDoorOpenTooLongTime +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DOOR_OPEN_TOO_LONG_TIME && peekedTagNumber == uint8(2) : // BACnetConstructedDataDoorOpenTooLongTime _childTemp, typeSwitchError = BACnetConstructedDataDoorOpenTooLongTimeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DOOR_PULSE_TIME && peekedTagNumber == uint8(2): // BACnetConstructedDataDoorPulseTime +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DOOR_PULSE_TIME && peekedTagNumber == uint8(2) : // BACnetConstructedDataDoorPulseTime _childTemp, typeSwitchError = BACnetConstructedDataDoorPulseTimeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DOOR_STATUS && peekedTagNumber == uint8(9): // BACnetConstructedDataDoorStatus +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DOOR_STATUS && peekedTagNumber == uint8(9) : // BACnetConstructedDataDoorStatus _childTemp, typeSwitchError = BACnetConstructedDataDoorStatusParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DOOR_UNLOCK_DELAY_TIME && peekedTagNumber == uint8(2): // BACnetConstructedDataDoorUnlockDelayTime +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DOOR_UNLOCK_DELAY_TIME && peekedTagNumber == uint8(2) : // BACnetConstructedDataDoorUnlockDelayTime _childTemp, typeSwitchError = BACnetConstructedDataDoorUnlockDelayTimeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DUTY_WINDOW && peekedTagNumber == uint8(2): // BACnetConstructedDataDutyWindow +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_DUTY_WINDOW && peekedTagNumber == uint8(2) : // BACnetConstructedDataDutyWindow _childTemp, typeSwitchError = BACnetConstructedDataDutyWindowParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_EFFECTIVE_PERIOD: // BACnetConstructedDataEffectivePeriod +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_EFFECTIVE_PERIOD : // BACnetConstructedDataEffectivePeriod _childTemp, typeSwitchError = BACnetConstructedDataEffectivePeriodParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_EGRESS_ACTIVE && peekedTagNumber == uint8(1): // BACnetConstructedDataEgressActive +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_EGRESS_ACTIVE && peekedTagNumber == uint8(1) : // BACnetConstructedDataEgressActive _childTemp, typeSwitchError = BACnetConstructedDataEgressActiveParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_EGRESS_TIME && peekedTagNumber == uint8(2): // BACnetConstructedDataEgressTime +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_EGRESS_TIME && peekedTagNumber == uint8(2) : // BACnetConstructedDataEgressTime _childTemp, typeSwitchError = BACnetConstructedDataEgressTimeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ELAPSED_ACTIVE_TIME && peekedTagNumber == uint8(2): // BACnetConstructedDataElapsedActiveTime +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ELAPSED_ACTIVE_TIME && peekedTagNumber == uint8(2) : // BACnetConstructedDataElapsedActiveTime _childTemp, typeSwitchError = BACnetConstructedDataElapsedActiveTimeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ELEVATOR_GROUP && peekedTagNumber == uint8(12): // BACnetConstructedDataElevatorGroup +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ELEVATOR_GROUP && peekedTagNumber == uint8(12) : // BACnetConstructedDataElevatorGroup _childTemp, typeSwitchError = BACnetConstructedDataElevatorGroupParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ENABLE && peekedTagNumber == uint8(1): // BACnetConstructedDataEnable +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ENABLE && peekedTagNumber == uint8(1) : // BACnetConstructedDataEnable _childTemp, typeSwitchError = BACnetConstructedDataEnableParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ENERGY_METER && peekedTagNumber == uint8(4): // BACnetConstructedDataEnergyMeter +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ENERGY_METER && peekedTagNumber == uint8(4) : // BACnetConstructedDataEnergyMeter _childTemp, typeSwitchError = BACnetConstructedDataEnergyMeterParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ENERGY_METER_REF: // BACnetConstructedDataEnergyMeterRef +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ENERGY_METER_REF : // BACnetConstructedDataEnergyMeterRef _childTemp, typeSwitchError = BACnetConstructedDataEnergyMeterRefParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ENTRY_POINTS: // BACnetConstructedDataEntryPoints +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ENTRY_POINTS : // BACnetConstructedDataEntryPoints _childTemp, typeSwitchError = BACnetConstructedDataEntryPointsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ERROR_LIMIT && peekedTagNumber == uint8(4): // BACnetConstructedDataErrorLimit +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ERROR_LIMIT && peekedTagNumber == uint8(4) : // BACnetConstructedDataErrorLimit _childTemp, typeSwitchError = BACnetConstructedDataErrorLimitParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ESCALATOR_MODE && peekedTagNumber == uint8(9): // BACnetConstructedDataEscalatorMode +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ESCALATOR_MODE && peekedTagNumber == uint8(9) : // BACnetConstructedDataEscalatorMode _childTemp, typeSwitchError = BACnetConstructedDataEscalatorModeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_EVENT_ALGORITHM_INHIBIT && peekedTagNumber == uint8(1): // BACnetConstructedDataEventAlgorithmInhibit +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_EVENT_ALGORITHM_INHIBIT && peekedTagNumber == uint8(1) : // BACnetConstructedDataEventAlgorithmInhibit _childTemp, typeSwitchError = BACnetConstructedDataEventAlgorithmInhibitParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_EVENT_ALGORITHM_INHIBIT_REF: // BACnetConstructedDataEventAlgorithmInhibitRef +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_EVENT_ALGORITHM_INHIBIT_REF : // BACnetConstructedDataEventAlgorithmInhibitRef _childTemp, typeSwitchError = BACnetConstructedDataEventAlgorithmInhibitRefParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_EVENT_DETECTION_ENABLE && peekedTagNumber == uint8(1): // BACnetConstructedDataEventDetectionEnable +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_EVENT_DETECTION_ENABLE && peekedTagNumber == uint8(1) : // BACnetConstructedDataEventDetectionEnable _childTemp, typeSwitchError = BACnetConstructedDataEventDetectionEnableParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_EVENT_ENABLE && peekedTagNumber == uint8(8): // BACnetConstructedDataEventEnable +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_EVENT_ENABLE && peekedTagNumber == uint8(8) : // BACnetConstructedDataEventEnable _childTemp, typeSwitchError = BACnetConstructedDataEventEnableParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_EVENT_MESSAGE_TEXTS: // BACnetConstructedDataEventMessageTexts +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_EVENT_MESSAGE_TEXTS : // BACnetConstructedDataEventMessageTexts _childTemp, typeSwitchError = BACnetConstructedDataEventMessageTextsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_EVENT_MESSAGE_TEXTS_CONFIG: // BACnetConstructedDataEventMessageTextsConfig +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_EVENT_MESSAGE_TEXTS_CONFIG : // BACnetConstructedDataEventMessageTextsConfig _childTemp, typeSwitchError = BACnetConstructedDataEventMessageTextsConfigParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_EVENT_PARAMETERS: // BACnetConstructedDataEventParameters +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_EVENT_PARAMETERS : // BACnetConstructedDataEventParameters _childTemp, typeSwitchError = BACnetConstructedDataEventParametersParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_EVENT_STATE && peekedTagNumber == uint8(9): // BACnetConstructedDataEventState +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_EVENT_STATE && peekedTagNumber == uint8(9) : // BACnetConstructedDataEventState _childTemp, typeSwitchError = BACnetConstructedDataEventStateParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_EVENT_TIME_STAMPS: // BACnetConstructedDataEventTimeStamps +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_EVENT_TIME_STAMPS : // BACnetConstructedDataEventTimeStamps _childTemp, typeSwitchError = BACnetConstructedDataEventTimeStampsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_EVENT_TYPE && peekedTagNumber == uint8(9): // BACnetConstructedDataEventType +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_EVENT_TYPE && peekedTagNumber == uint8(9) : // BACnetConstructedDataEventType _childTemp, typeSwitchError = BACnetConstructedDataEventTypeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_EXCEPTION_SCHEDULE: // BACnetConstructedDataExceptionSchedule +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_EXCEPTION_SCHEDULE : // BACnetConstructedDataExceptionSchedule _childTemp, typeSwitchError = BACnetConstructedDataExceptionScheduleParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_EXECUTION_DELAY && peekedTagNumber == uint8(2): // BACnetConstructedDataExecutionDelay +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_EXECUTION_DELAY && peekedTagNumber == uint8(2) : // BACnetConstructedDataExecutionDelay _childTemp, typeSwitchError = BACnetConstructedDataExecutionDelayParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_EXIT_POINTS: // BACnetConstructedDataExitPoints +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_EXIT_POINTS : // BACnetConstructedDataExitPoints _childTemp, typeSwitchError = BACnetConstructedDataExitPointsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_EXPECTED_SHED_LEVEL: // BACnetConstructedDataExpectedShedLevel +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_EXPECTED_SHED_LEVEL : // BACnetConstructedDataExpectedShedLevel _childTemp, typeSwitchError = BACnetConstructedDataExpectedShedLevelParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_EXPIRATION_TIME: // BACnetConstructedDataExpirationTime +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_EXPIRATION_TIME : // BACnetConstructedDataExpirationTime _childTemp, typeSwitchError = BACnetConstructedDataExpirationTimeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_EXTENDED_TIME_ENABLE && peekedTagNumber == uint8(1): // BACnetConstructedDataExtendedTimeEnable +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_EXTENDED_TIME_ENABLE && peekedTagNumber == uint8(1) : // BACnetConstructedDataExtendedTimeEnable _childTemp, typeSwitchError = BACnetConstructedDataExtendedTimeEnableParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_FAILED_ATTEMPT_EVENTS: // BACnetConstructedDataFailedAttemptEvents +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_FAILED_ATTEMPT_EVENTS : // BACnetConstructedDataFailedAttemptEvents _childTemp, typeSwitchError = BACnetConstructedDataFailedAttemptEventsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_FAILED_ATTEMPTS && peekedTagNumber == uint8(2): // BACnetConstructedDataFailedAttempts +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_FAILED_ATTEMPTS && peekedTagNumber == uint8(2) : // BACnetConstructedDataFailedAttempts _childTemp, typeSwitchError = BACnetConstructedDataFailedAttemptsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_FAILED_ATTEMPTS_TIME && peekedTagNumber == uint8(2): // BACnetConstructedDataFailedAttemptsTime +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_FAILED_ATTEMPTS_TIME && peekedTagNumber == uint8(2) : // BACnetConstructedDataFailedAttemptsTime _childTemp, typeSwitchError = BACnetConstructedDataFailedAttemptsTimeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ACCUMULATOR && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_HIGH_LIMIT && peekedTagNumber == uint8(2): // BACnetConstructedDataAccumulatorFaultHighLimit +case objectTypeArgument == BACnetObjectType_ACCUMULATOR && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_HIGH_LIMIT && peekedTagNumber == uint8(2) : // BACnetConstructedDataAccumulatorFaultHighLimit _childTemp, typeSwitchError = BACnetConstructedDataAccumulatorFaultHighLimitParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ANALOG_INPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_HIGH_LIMIT && peekedTagNumber == uint8(4): // BACnetConstructedDataAnalogInputFaultHighLimit +case objectTypeArgument == BACnetObjectType_ANALOG_INPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_HIGH_LIMIT && peekedTagNumber == uint8(4) : // BACnetConstructedDataAnalogInputFaultHighLimit _childTemp, typeSwitchError = BACnetConstructedDataAnalogInputFaultHighLimitParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ANALOG_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_HIGH_LIMIT && peekedTagNumber == uint8(4): // BACnetConstructedDataAnalogValueFaultHighLimit +case objectTypeArgument == BACnetObjectType_ANALOG_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_HIGH_LIMIT && peekedTagNumber == uint8(4) : // BACnetConstructedDataAnalogValueFaultHighLimit _childTemp, typeSwitchError = BACnetConstructedDataAnalogValueFaultHighLimitParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_HIGH_LIMIT && peekedTagNumber == uint8(3): // BACnetConstructedDataIntegerValueFaultHighLimit +case objectTypeArgument == BACnetObjectType_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_HIGH_LIMIT && peekedTagNumber == uint8(3) : // BACnetConstructedDataIntegerValueFaultHighLimit _childTemp, typeSwitchError = BACnetConstructedDataIntegerValueFaultHighLimitParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_LARGE_ANALOG_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_HIGH_LIMIT && peekedTagNumber == uint8(5): // BACnetConstructedDataLargeAnalogValueFaultHighLimit +case objectTypeArgument == BACnetObjectType_LARGE_ANALOG_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_HIGH_LIMIT && peekedTagNumber == uint8(5) : // BACnetConstructedDataLargeAnalogValueFaultHighLimit _childTemp, typeSwitchError = BACnetConstructedDataLargeAnalogValueFaultHighLimitParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_POSITIVE_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_HIGH_LIMIT && peekedTagNumber == uint8(2): // BACnetConstructedDataPositiveIntegerValueFaultHighLimit +case objectTypeArgument == BACnetObjectType_POSITIVE_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_HIGH_LIMIT && peekedTagNumber == uint8(2) : // BACnetConstructedDataPositiveIntegerValueFaultHighLimit _childTemp, typeSwitchError = BACnetConstructedDataPositiveIntegerValueFaultHighLimitParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_HIGH_LIMIT && peekedTagNumber == uint8(2): // BACnetConstructedDataFaultHighLimit +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_HIGH_LIMIT && peekedTagNumber == uint8(2) : // BACnetConstructedDataFaultHighLimit _childTemp, typeSwitchError = BACnetConstructedDataFaultHighLimitParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ACCUMULATOR && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_LOW_LIMIT && peekedTagNumber == uint8(2): // BACnetConstructedDataAccumulatorFaultLowLimit +case objectTypeArgument == BACnetObjectType_ACCUMULATOR && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_LOW_LIMIT && peekedTagNumber == uint8(2) : // BACnetConstructedDataAccumulatorFaultLowLimit _childTemp, typeSwitchError = BACnetConstructedDataAccumulatorFaultLowLimitParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ANALOG_INPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_LOW_LIMIT && peekedTagNumber == uint8(4): // BACnetConstructedDataAnalogInputFaultLowLimit +case objectTypeArgument == BACnetObjectType_ANALOG_INPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_LOW_LIMIT && peekedTagNumber == uint8(4) : // BACnetConstructedDataAnalogInputFaultLowLimit _childTemp, typeSwitchError = BACnetConstructedDataAnalogInputFaultLowLimitParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ANALOG_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_LOW_LIMIT && peekedTagNumber == uint8(4): // BACnetConstructedDataAnalogValueFaultLowLimit +case objectTypeArgument == BACnetObjectType_ANALOG_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_LOW_LIMIT && peekedTagNumber == uint8(4) : // BACnetConstructedDataAnalogValueFaultLowLimit _childTemp, typeSwitchError = BACnetConstructedDataAnalogValueFaultLowLimitParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_LARGE_ANALOG_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_LOW_LIMIT && peekedTagNumber == uint8(5): // BACnetConstructedDataLargeAnalogValueFaultLowLimit +case objectTypeArgument == BACnetObjectType_LARGE_ANALOG_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_LOW_LIMIT && peekedTagNumber == uint8(5) : // BACnetConstructedDataLargeAnalogValueFaultLowLimit _childTemp, typeSwitchError = BACnetConstructedDataLargeAnalogValueFaultLowLimitParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_LOW_LIMIT && peekedTagNumber == uint8(3): // BACnetConstructedDataIntegerValueFaultLowLimit +case objectTypeArgument == BACnetObjectType_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_LOW_LIMIT && peekedTagNumber == uint8(3) : // BACnetConstructedDataIntegerValueFaultLowLimit _childTemp, typeSwitchError = BACnetConstructedDataIntegerValueFaultLowLimitParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_POSITIVE_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_LOW_LIMIT && peekedTagNumber == uint8(2): // BACnetConstructedDataPositiveIntegerValueFaultLowLimit +case objectTypeArgument == BACnetObjectType_POSITIVE_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_LOW_LIMIT && peekedTagNumber == uint8(2) : // BACnetConstructedDataPositiveIntegerValueFaultLowLimit _childTemp, typeSwitchError = BACnetConstructedDataPositiveIntegerValueFaultLowLimitParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_LOW_LIMIT && peekedTagNumber == uint8(4): // BACnetConstructedDataFaultLowLimit +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_LOW_LIMIT && peekedTagNumber == uint8(4) : // BACnetConstructedDataFaultLowLimit _childTemp, typeSwitchError = BACnetConstructedDataFaultLowLimitParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_PARAMETERS: // BACnetConstructedDataFaultParameters +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_PARAMETERS : // BACnetConstructedDataFaultParameters _childTemp, typeSwitchError = BACnetConstructedDataFaultParametersParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ESCALATOR && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_SIGNALS: // BACnetConstructedDataEscalatorFaultSignals +case objectTypeArgument == BACnetObjectType_ESCALATOR && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_SIGNALS : // BACnetConstructedDataEscalatorFaultSignals _childTemp, typeSwitchError = BACnetConstructedDataEscalatorFaultSignalsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_LIFT && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_SIGNALS: // BACnetConstructedDataLiftFaultSignals +case objectTypeArgument == BACnetObjectType_LIFT && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_SIGNALS : // BACnetConstructedDataLiftFaultSignals _childTemp, typeSwitchError = BACnetConstructedDataLiftFaultSignalsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_SIGNALS: // BACnetConstructedDataFaultSignals +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_SIGNALS : // BACnetConstructedDataFaultSignals _childTemp, typeSwitchError = BACnetConstructedDataFaultSignalsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_TYPE && peekedTagNumber == uint8(9): // BACnetConstructedDataFaultType +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_TYPE && peekedTagNumber == uint8(9) : // BACnetConstructedDataFaultType _childTemp, typeSwitchError = BACnetConstructedDataFaultTypeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ACCESS_DOOR && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_VALUES: // BACnetConstructedDataAccessDoorFaultValues +case objectTypeArgument == BACnetObjectType_ACCESS_DOOR && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_VALUES : // BACnetConstructedDataAccessDoorFaultValues _childTemp, typeSwitchError = BACnetConstructedDataAccessDoorFaultValuesParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_CHARACTERSTRING_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_VALUES: // BACnetConstructedDataCharacterStringValueFaultValues +case objectTypeArgument == BACnetObjectType_CHARACTERSTRING_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_VALUES : // BACnetConstructedDataCharacterStringValueFaultValues _childTemp, typeSwitchError = BACnetConstructedDataCharacterStringValueFaultValuesParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_LIFE_SAFETY_POINT && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_VALUES: // BACnetConstructedDataLifeSafetyPointFaultValues +case objectTypeArgument == BACnetObjectType_LIFE_SAFETY_POINT && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_VALUES : // BACnetConstructedDataLifeSafetyPointFaultValues _childTemp, typeSwitchError = BACnetConstructedDataLifeSafetyPointFaultValuesParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_LIFE_SAFETY_ZONE && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_VALUES: // BACnetConstructedDataLifeSafetyZoneFaultValues +case objectTypeArgument == BACnetObjectType_LIFE_SAFETY_ZONE && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_VALUES : // BACnetConstructedDataLifeSafetyZoneFaultValues _childTemp, typeSwitchError = BACnetConstructedDataLifeSafetyZoneFaultValuesParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_MULTI_STATE_INPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_VALUES && peekedTagNumber == uint8(2): // BACnetConstructedDataMultiStateInputFaultValues +case objectTypeArgument == BACnetObjectType_MULTI_STATE_INPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_VALUES && peekedTagNumber == uint8(2) : // BACnetConstructedDataMultiStateInputFaultValues _childTemp, typeSwitchError = BACnetConstructedDataMultiStateInputFaultValuesParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_MULTI_STATE_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_VALUES && peekedTagNumber == uint8(2): // BACnetConstructedDataMultiStateValueFaultValues +case objectTypeArgument == BACnetObjectType_MULTI_STATE_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_VALUES && peekedTagNumber == uint8(2) : // BACnetConstructedDataMultiStateValueFaultValues _childTemp, typeSwitchError = BACnetConstructedDataMultiStateValueFaultValuesParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_VALUES: // BACnetConstructedDataFaultValues +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_FAULT_VALUES : // BACnetConstructedDataFaultValues _childTemp, typeSwitchError = BACnetConstructedDataFaultValuesParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_FD_BBMD_ADDRESS: // BACnetConstructedDataFDBBMDAddress +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_FD_BBMD_ADDRESS : // BACnetConstructedDataFDBBMDAddress _childTemp, typeSwitchError = BACnetConstructedDataFDBBMDAddressParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_FD_SUBSCRIPTION_LIFETIME && peekedTagNumber == uint8(2): // BACnetConstructedDataFDSubscriptionLifetime +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_FD_SUBSCRIPTION_LIFETIME && peekedTagNumber == uint8(2) : // BACnetConstructedDataFDSubscriptionLifetime _childTemp, typeSwitchError = BACnetConstructedDataFDSubscriptionLifetimeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_BINARY_LIGHTING_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_FEEDBACK_VALUE && peekedTagNumber == uint8(9): // BACnetConstructedDataBinaryLightingOutputFeedbackValue +case objectTypeArgument == BACnetObjectType_BINARY_LIGHTING_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_FEEDBACK_VALUE && peekedTagNumber == uint8(9) : // BACnetConstructedDataBinaryLightingOutputFeedbackValue _childTemp, typeSwitchError = BACnetConstructedDataBinaryLightingOutputFeedbackValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_BINARY_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_FEEDBACK_VALUE && peekedTagNumber == uint8(9): // BACnetConstructedDataBinaryOutputFeedbackValue +case objectTypeArgument == BACnetObjectType_BINARY_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_FEEDBACK_VALUE && peekedTagNumber == uint8(9) : // BACnetConstructedDataBinaryOutputFeedbackValue _childTemp, typeSwitchError = BACnetConstructedDataBinaryOutputFeedbackValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_LIGHTING_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_FEEDBACK_VALUE && peekedTagNumber == uint8(4): // BACnetConstructedDataLightingOutputFeedbackValue +case objectTypeArgument == BACnetObjectType_LIGHTING_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_FEEDBACK_VALUE && peekedTagNumber == uint8(4) : // BACnetConstructedDataLightingOutputFeedbackValue _childTemp, typeSwitchError = BACnetConstructedDataLightingOutputFeedbackValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_MULTI_STATE_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_FEEDBACK_VALUE && peekedTagNumber == uint8(2): // BACnetConstructedDataMultiStateOutputFeedbackValue +case objectTypeArgument == BACnetObjectType_MULTI_STATE_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_FEEDBACK_VALUE && peekedTagNumber == uint8(2) : // BACnetConstructedDataMultiStateOutputFeedbackValue _childTemp, typeSwitchError = BACnetConstructedDataMultiStateOutputFeedbackValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_FILE_ACCESS_METHOD && peekedTagNumber == uint8(9): // BACnetConstructedDataFileAccessMethod +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_FILE_ACCESS_METHOD && peekedTagNumber == uint8(9) : // BACnetConstructedDataFileAccessMethod _childTemp, typeSwitchError = BACnetConstructedDataFileAccessMethodParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_FILE_SIZE && peekedTagNumber == uint8(2): // BACnetConstructedDataFileSize +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_FILE_SIZE && peekedTagNumber == uint8(2) : // BACnetConstructedDataFileSize _childTemp, typeSwitchError = BACnetConstructedDataFileSizeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_FILE_TYPE && peekedTagNumber == uint8(7): // BACnetConstructedDataFileType +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_FILE_TYPE && peekedTagNumber == uint8(7) : // BACnetConstructedDataFileType _childTemp, typeSwitchError = BACnetConstructedDataFileTypeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_FIRMWARE_REVISION && peekedTagNumber == uint8(7): // BACnetConstructedDataFirmwareRevision +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_FIRMWARE_REVISION && peekedTagNumber == uint8(7) : // BACnetConstructedDataFirmwareRevision _childTemp, typeSwitchError = BACnetConstructedDataFirmwareRevisionParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_FLOOR_TEXT && peekedTagNumber == uint8(7): // BACnetConstructedDataFloorText +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_FLOOR_TEXT && peekedTagNumber == uint8(7) : // BACnetConstructedDataFloorText _childTemp, typeSwitchError = BACnetConstructedDataFloorTextParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_FULL_DUTY_BASELINE && peekedTagNumber == uint8(4): // BACnetConstructedDataFullDutyBaseline +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_FULL_DUTY_BASELINE && peekedTagNumber == uint8(4) : // BACnetConstructedDataFullDutyBaseline _childTemp, typeSwitchError = BACnetConstructedDataFullDutyBaselineParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_GLOBAL_IDENTIFIER && peekedTagNumber == uint8(2): // BACnetConstructedDataGlobalIdentifier +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_GLOBAL_IDENTIFIER && peekedTagNumber == uint8(2) : // BACnetConstructedDataGlobalIdentifier _childTemp, typeSwitchError = BACnetConstructedDataGlobalIdentifierParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_GROUP_ID && peekedTagNumber == uint8(2): // BACnetConstructedDataGroupID +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_GROUP_ID && peekedTagNumber == uint8(2) : // BACnetConstructedDataGroupID _childTemp, typeSwitchError = BACnetConstructedDataGroupIDParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_GROUP_MEMBER_NAMES && peekedTagNumber == uint8(7): // BACnetConstructedDataGroupMemberNames +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_GROUP_MEMBER_NAMES && peekedTagNumber == uint8(7) : // BACnetConstructedDataGroupMemberNames _childTemp, typeSwitchError = BACnetConstructedDataGroupMemberNamesParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_GLOBAL_GROUP && propertyIdentifierArgument == BACnetPropertyIdentifier_GROUP_MEMBERS: // BACnetConstructedDataGlobalGroupGroupMembers +case objectTypeArgument == BACnetObjectType_GLOBAL_GROUP && propertyIdentifierArgument == BACnetPropertyIdentifier_GROUP_MEMBERS : // BACnetConstructedDataGlobalGroupGroupMembers _childTemp, typeSwitchError = BACnetConstructedDataGlobalGroupGroupMembersParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ELEVATOR_GROUP && propertyIdentifierArgument == BACnetPropertyIdentifier_GROUP_MEMBERS && peekedTagNumber == uint8(12): // BACnetConstructedDataElevatorGroupGroupMembers +case objectTypeArgument == BACnetObjectType_ELEVATOR_GROUP && propertyIdentifierArgument == BACnetPropertyIdentifier_GROUP_MEMBERS && peekedTagNumber == uint8(12) : // BACnetConstructedDataElevatorGroupGroupMembers _childTemp, typeSwitchError = BACnetConstructedDataElevatorGroupGroupMembersParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_GROUP_MEMBERS && peekedTagNumber == uint8(12): // BACnetConstructedDataGroupMembers +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_GROUP_MEMBERS && peekedTagNumber == uint8(12) : // BACnetConstructedDataGroupMembers _childTemp, typeSwitchError = BACnetConstructedDataGroupMembersParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_GROUP_MODE && peekedTagNumber == uint8(9): // BACnetConstructedDataGroupMode +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_GROUP_MODE && peekedTagNumber == uint8(9) : // BACnetConstructedDataGroupMode _childTemp, typeSwitchError = BACnetConstructedDataGroupModeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ACCUMULATOR && propertyIdentifierArgument == BACnetPropertyIdentifier_HIGH_LIMIT && peekedTagNumber == uint8(2): // BACnetConstructedDataAccumulatorHighLimit +case objectTypeArgument == BACnetObjectType_ACCUMULATOR && propertyIdentifierArgument == BACnetPropertyIdentifier_HIGH_LIMIT && peekedTagNumber == uint8(2) : // BACnetConstructedDataAccumulatorHighLimit _childTemp, typeSwitchError = BACnetConstructedDataAccumulatorHighLimitParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_LARGE_ANALOG_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_HIGH_LIMIT && peekedTagNumber == uint8(5): // BACnetConstructedDataLargeAnalogValueHighLimit +case objectTypeArgument == BACnetObjectType_LARGE_ANALOG_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_HIGH_LIMIT && peekedTagNumber == uint8(5) : // BACnetConstructedDataLargeAnalogValueHighLimit _childTemp, typeSwitchError = BACnetConstructedDataLargeAnalogValueHighLimitParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_HIGH_LIMIT && peekedTagNumber == uint8(3): // BACnetConstructedDataIntegerValueHighLimit +case objectTypeArgument == BACnetObjectType_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_HIGH_LIMIT && peekedTagNumber == uint8(3) : // BACnetConstructedDataIntegerValueHighLimit _childTemp, typeSwitchError = BACnetConstructedDataIntegerValueHighLimitParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_POSITIVE_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_HIGH_LIMIT && peekedTagNumber == uint8(2): // BACnetConstructedDataPositiveIntegerValueHighLimit +case objectTypeArgument == BACnetObjectType_POSITIVE_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_HIGH_LIMIT && peekedTagNumber == uint8(2) : // BACnetConstructedDataPositiveIntegerValueHighLimit _childTemp, typeSwitchError = BACnetConstructedDataPositiveIntegerValueHighLimitParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_HIGH_LIMIT && peekedTagNumber == uint8(4): // BACnetConstructedDataHighLimit +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_HIGH_LIMIT && peekedTagNumber == uint8(4) : // BACnetConstructedDataHighLimit _childTemp, typeSwitchError = BACnetConstructedDataHighLimitParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_HIGHER_DECK && peekedTagNumber == uint8(12): // BACnetConstructedDataHigherDeck +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_HIGHER_DECK && peekedTagNumber == uint8(12) : // BACnetConstructedDataHigherDeck _childTemp, typeSwitchError = BACnetConstructedDataHigherDeckParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_IN_PROCESS && peekedTagNumber == uint8(1): // BACnetConstructedDataInProcess +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_IN_PROCESS && peekedTagNumber == uint8(1) : // BACnetConstructedDataInProcess _childTemp, typeSwitchError = BACnetConstructedDataInProcessParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_IN_PROGRESS && peekedTagNumber == uint8(9): // BACnetConstructedDataInProgress +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_IN_PROGRESS && peekedTagNumber == uint8(9) : // BACnetConstructedDataInProgress _childTemp, typeSwitchError = BACnetConstructedDataInProgressParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_INACTIVE_TEXT && peekedTagNumber == uint8(7): // BACnetConstructedDataInactiveText +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_INACTIVE_TEXT && peekedTagNumber == uint8(7) : // BACnetConstructedDataInactiveText _childTemp, typeSwitchError = BACnetConstructedDataInactiveTextParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_INITIAL_TIMEOUT && peekedTagNumber == uint8(2): // BACnetConstructedDataInitialTimeout +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_INITIAL_TIMEOUT && peekedTagNumber == uint8(2) : // BACnetConstructedDataInitialTimeout _childTemp, typeSwitchError = BACnetConstructedDataInitialTimeoutParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_INPUT_REFERENCE: // BACnetConstructedDataInputReference +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_INPUT_REFERENCE : // BACnetConstructedDataInputReference _childTemp, typeSwitchError = BACnetConstructedDataInputReferenceParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_INSTALLATION_ID && peekedTagNumber == uint8(2): // BACnetConstructedDataInstallationID +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_INSTALLATION_ID && peekedTagNumber == uint8(2) : // BACnetConstructedDataInstallationID _childTemp, typeSwitchError = BACnetConstructedDataInstallationIDParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_INSTANCE_OF && peekedTagNumber == uint8(7): // BACnetConstructedDataInstanceOf +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_INSTANCE_OF && peekedTagNumber == uint8(7) : // BACnetConstructedDataInstanceOf _childTemp, typeSwitchError = BACnetConstructedDataInstanceOfParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_INSTANTANEOUS_POWER && peekedTagNumber == uint8(4): // BACnetConstructedDataInstantaneousPower +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_INSTANTANEOUS_POWER && peekedTagNumber == uint8(4) : // BACnetConstructedDataInstantaneousPower _childTemp, typeSwitchError = BACnetConstructedDataInstantaneousPowerParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_INTEGRAL_CONSTANT && peekedTagNumber == uint8(4): // BACnetConstructedDataIntegralConstant +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_INTEGRAL_CONSTANT && peekedTagNumber == uint8(4) : // BACnetConstructedDataIntegralConstant _childTemp, typeSwitchError = BACnetConstructedDataIntegralConstantParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_INTEGRAL_CONSTANT_UNITS && peekedTagNumber == uint8(9): // BACnetConstructedDataIntegralConstantUnits +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_INTEGRAL_CONSTANT_UNITS && peekedTagNumber == uint8(9) : // BACnetConstructedDataIntegralConstantUnits _childTemp, typeSwitchError = BACnetConstructedDataIntegralConstantUnitsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ANALOG_INPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_INTERFACE_VALUE: // BACnetConstructedDataAnalogInputInterfaceValue +case objectTypeArgument == BACnetObjectType_ANALOG_INPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_INTERFACE_VALUE : // BACnetConstructedDataAnalogInputInterfaceValue _childTemp, typeSwitchError = BACnetConstructedDataAnalogInputInterfaceValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ANALOG_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_INTERFACE_VALUE: // BACnetConstructedDataAnalogOutputInterfaceValue +case objectTypeArgument == BACnetObjectType_ANALOG_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_INTERFACE_VALUE : // BACnetConstructedDataAnalogOutputInterfaceValue _childTemp, typeSwitchError = BACnetConstructedDataAnalogOutputInterfaceValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_BINARY_INPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_INTERFACE_VALUE: // BACnetConstructedDataBinaryInputInterfaceValue +case objectTypeArgument == BACnetObjectType_BINARY_INPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_INTERFACE_VALUE : // BACnetConstructedDataBinaryInputInterfaceValue _childTemp, typeSwitchError = BACnetConstructedDataBinaryInputInterfaceValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_BINARY_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_INTERFACE_VALUE: // BACnetConstructedDataBinaryOutputInterfaceValue +case objectTypeArgument == BACnetObjectType_BINARY_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_INTERFACE_VALUE : // BACnetConstructedDataBinaryOutputInterfaceValue _childTemp, typeSwitchError = BACnetConstructedDataBinaryOutputInterfaceValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_MULTI_STATE_INPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_INTERFACE_VALUE: // BACnetConstructedDataMultiStateInputInterfaceValue +case objectTypeArgument == BACnetObjectType_MULTI_STATE_INPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_INTERFACE_VALUE : // BACnetConstructedDataMultiStateInputInterfaceValue _childTemp, typeSwitchError = BACnetConstructedDataMultiStateInputInterfaceValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_MULTI_STATE_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_INTERFACE_VALUE: // BACnetConstructedDataMultiStateOutputInterfaceValue +case objectTypeArgument == BACnetObjectType_MULTI_STATE_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_INTERFACE_VALUE : // BACnetConstructedDataMultiStateOutputInterfaceValue _childTemp, typeSwitchError = BACnetConstructedDataMultiStateOutputInterfaceValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_INTERVAL_OFFSET && peekedTagNumber == uint8(2): // BACnetConstructedDataIntervalOffset +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_INTERVAL_OFFSET && peekedTagNumber == uint8(2) : // BACnetConstructedDataIntervalOffset _childTemp, typeSwitchError = BACnetConstructedDataIntervalOffsetParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_IP_ADDRESS && peekedTagNumber == uint8(6): // BACnetConstructedDataIPAddress +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_IP_ADDRESS && peekedTagNumber == uint8(6) : // BACnetConstructedDataIPAddress _childTemp, typeSwitchError = BACnetConstructedDataIPAddressParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_IP_DEFAULT_GATEWAY && peekedTagNumber == uint8(6): // BACnetConstructedDataIPDefaultGateway +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_IP_DEFAULT_GATEWAY && peekedTagNumber == uint8(6) : // BACnetConstructedDataIPDefaultGateway _childTemp, typeSwitchError = BACnetConstructedDataIPDefaultGatewayParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_IP_DHCP_ENABLE && peekedTagNumber == uint8(1): // BACnetConstructedDataIPDHCPEnable +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_IP_DHCP_ENABLE && peekedTagNumber == uint8(1) : // BACnetConstructedDataIPDHCPEnable _childTemp, typeSwitchError = BACnetConstructedDataIPDHCPEnableParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_IP_DHCP_LEASE_TIME && peekedTagNumber == uint8(2): // BACnetConstructedDataIPDHCPLeaseTime +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_IP_DHCP_LEASE_TIME && peekedTagNumber == uint8(2) : // BACnetConstructedDataIPDHCPLeaseTime _childTemp, typeSwitchError = BACnetConstructedDataIPDHCPLeaseTimeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_IP_DHCP_LEASE_TIME_REMAINING && peekedTagNumber == uint8(2): // BACnetConstructedDataIPDHCPLeaseTimeRemaining +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_IP_DHCP_LEASE_TIME_REMAINING && peekedTagNumber == uint8(2) : // BACnetConstructedDataIPDHCPLeaseTimeRemaining _childTemp, typeSwitchError = BACnetConstructedDataIPDHCPLeaseTimeRemainingParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_IP_DHCP_SERVER && peekedTagNumber == uint8(6): // BACnetConstructedDataIPDHCPServer +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_IP_DHCP_SERVER && peekedTagNumber == uint8(6) : // BACnetConstructedDataIPDHCPServer _childTemp, typeSwitchError = BACnetConstructedDataIPDHCPServerParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_IP_DNS_SERVER && peekedTagNumber == uint8(6): // BACnetConstructedDataIPDNSServer +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_IP_DNS_SERVER && peekedTagNumber == uint8(6) : // BACnetConstructedDataIPDNSServer _childTemp, typeSwitchError = BACnetConstructedDataIPDNSServerParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_IP_SUBNET_MASK && peekedTagNumber == uint8(6): // BACnetConstructedDataIPSubnetMask +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_IP_SUBNET_MASK && peekedTagNumber == uint8(6) : // BACnetConstructedDataIPSubnetMask _childTemp, typeSwitchError = BACnetConstructedDataIPSubnetMaskParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_IPV6_ADDRESS && peekedTagNumber == uint8(6): // BACnetConstructedDataIPv6Address +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_IPV6_ADDRESS && peekedTagNumber == uint8(6) : // BACnetConstructedDataIPv6Address _childTemp, typeSwitchError = BACnetConstructedDataIPv6AddressParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_IPV6_AUTO_ADDRESSING_ENABLE && peekedTagNumber == uint8(1): // BACnetConstructedDataIPv6AutoAddressingEnable +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_IPV6_AUTO_ADDRESSING_ENABLE && peekedTagNumber == uint8(1) : // BACnetConstructedDataIPv6AutoAddressingEnable _childTemp, typeSwitchError = BACnetConstructedDataIPv6AutoAddressingEnableParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_IPV6_DEFAULT_GATEWAY && peekedTagNumber == uint8(6): // BACnetConstructedDataIPv6DefaultGateway +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_IPV6_DEFAULT_GATEWAY && peekedTagNumber == uint8(6) : // BACnetConstructedDataIPv6DefaultGateway _childTemp, typeSwitchError = BACnetConstructedDataIPv6DefaultGatewayParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_IPV6_DHCP_LEASE_TIME && peekedTagNumber == uint8(2): // BACnetConstructedDataIPv6DHCPLeaseTime +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_IPV6_DHCP_LEASE_TIME && peekedTagNumber == uint8(2) : // BACnetConstructedDataIPv6DHCPLeaseTime _childTemp, typeSwitchError = BACnetConstructedDataIPv6DHCPLeaseTimeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_IPV6_DHCP_LEASE_TIME_REMAINING && peekedTagNumber == uint8(2): // BACnetConstructedDataIPv6DHCPLeaseTimeRemaining +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_IPV6_DHCP_LEASE_TIME_REMAINING && peekedTagNumber == uint8(2) : // BACnetConstructedDataIPv6DHCPLeaseTimeRemaining _childTemp, typeSwitchError = BACnetConstructedDataIPv6DHCPLeaseTimeRemainingParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_IPV6_DHCP_SERVER && peekedTagNumber == uint8(6): // BACnetConstructedDataIPv6DHCPServer +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_IPV6_DHCP_SERVER && peekedTagNumber == uint8(6) : // BACnetConstructedDataIPv6DHCPServer _childTemp, typeSwitchError = BACnetConstructedDataIPv6DHCPServerParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_IPV6_DNS_SERVER && peekedTagNumber == uint8(6): // BACnetConstructedDataIPv6DNSServer +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_IPV6_DNS_SERVER && peekedTagNumber == uint8(6) : // BACnetConstructedDataIPv6DNSServer _childTemp, typeSwitchError = BACnetConstructedDataIPv6DNSServerParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_IPV6_PREFIX_LENGTH && peekedTagNumber == uint8(2): // BACnetConstructedDataIPv6PrefixLength +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_IPV6_PREFIX_LENGTH && peekedTagNumber == uint8(2) : // BACnetConstructedDataIPv6PrefixLength _childTemp, typeSwitchError = BACnetConstructedDataIPv6PrefixLengthParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_IPV6_ZONE_INDEX && peekedTagNumber == uint8(7): // BACnetConstructedDataIPv6ZoneIndex +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_IPV6_ZONE_INDEX && peekedTagNumber == uint8(7) : // BACnetConstructedDataIPv6ZoneIndex _childTemp, typeSwitchError = BACnetConstructedDataIPv6ZoneIndexParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_IS_UTC && peekedTagNumber == uint8(1): // BACnetConstructedDataIsUTC +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_IS_UTC && peekedTagNumber == uint8(1) : // BACnetConstructedDataIsUTC _childTemp, typeSwitchError = BACnetConstructedDataIsUTCParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_KEY_SETS: // BACnetConstructedDataKeySets +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_KEY_SETS : // BACnetConstructedDataKeySets _childTemp, typeSwitchError = BACnetConstructedDataKeySetsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LANDING_CALL_CONTROL: // BACnetConstructedDataLandingCallControl +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LANDING_CALL_CONTROL : // BACnetConstructedDataLandingCallControl _childTemp, typeSwitchError = BACnetConstructedDataLandingCallControlParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LANDING_CALLS: // BACnetConstructedDataLandingCalls +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LANDING_CALLS : // BACnetConstructedDataLandingCalls _childTemp, typeSwitchError = BACnetConstructedDataLandingCallsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LANDING_DOOR_STATUS: // BACnetConstructedDataLandingDoorStatus +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LANDING_DOOR_STATUS : // BACnetConstructedDataLandingDoorStatus _childTemp, typeSwitchError = BACnetConstructedDataLandingDoorStatusParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LAST_ACCESS_EVENT && peekedTagNumber == uint8(9): // BACnetConstructedDataLastAccessEvent +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LAST_ACCESS_EVENT && peekedTagNumber == uint8(9) : // BACnetConstructedDataLastAccessEvent _childTemp, typeSwitchError = BACnetConstructedDataLastAccessEventParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LAST_ACCESS_POINT: // BACnetConstructedDataLastAccessPoint +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LAST_ACCESS_POINT : // BACnetConstructedDataLastAccessPoint _childTemp, typeSwitchError = BACnetConstructedDataLastAccessPointParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LAST_COMMAND_TIME: // BACnetConstructedDataLastCommandTime +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LAST_COMMAND_TIME : // BACnetConstructedDataLastCommandTime _childTemp, typeSwitchError = BACnetConstructedDataLastCommandTimeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LAST_CREDENTIAL_ADDED: // BACnetConstructedDataLastCredentialAdded +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LAST_CREDENTIAL_ADDED : // BACnetConstructedDataLastCredentialAdded _childTemp, typeSwitchError = BACnetConstructedDataLastCredentialAddedParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LAST_CREDENTIAL_ADDED_TIME: // BACnetConstructedDataLastCredentialAddedTime +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LAST_CREDENTIAL_ADDED_TIME : // BACnetConstructedDataLastCredentialAddedTime _childTemp, typeSwitchError = BACnetConstructedDataLastCredentialAddedTimeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LAST_CREDENTIAL_REMOVED: // BACnetConstructedDataLastCredentialRemoved +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LAST_CREDENTIAL_REMOVED : // BACnetConstructedDataLastCredentialRemoved _childTemp, typeSwitchError = BACnetConstructedDataLastCredentialRemovedParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LAST_CREDENTIAL_REMOVED_TIME: // BACnetConstructedDataLastCredentialRemovedTime +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LAST_CREDENTIAL_REMOVED_TIME : // BACnetConstructedDataLastCredentialRemovedTime _childTemp, typeSwitchError = BACnetConstructedDataLastCredentialRemovedTimeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LAST_KEY_SERVER: // BACnetConstructedDataLastKeyServer +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LAST_KEY_SERVER : // BACnetConstructedDataLastKeyServer _childTemp, typeSwitchError = BACnetConstructedDataLastKeyServerParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LAST_NOTIFY_RECORD && peekedTagNumber == uint8(2): // BACnetConstructedDataLastNotifyRecord +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LAST_NOTIFY_RECORD && peekedTagNumber == uint8(2) : // BACnetConstructedDataLastNotifyRecord _childTemp, typeSwitchError = BACnetConstructedDataLastNotifyRecordParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LAST_PRIORITY && peekedTagNumber == uint8(2): // BACnetConstructedDataLastPriority +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LAST_PRIORITY && peekedTagNumber == uint8(2) : // BACnetConstructedDataLastPriority _childTemp, typeSwitchError = BACnetConstructedDataLastPriorityParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LAST_RESTART_REASON && peekedTagNumber == uint8(9): // BACnetConstructedDataLastRestartReason +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LAST_RESTART_REASON && peekedTagNumber == uint8(9) : // BACnetConstructedDataLastRestartReason _childTemp, typeSwitchError = BACnetConstructedDataLastRestartReasonParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LAST_RESTORE_TIME: // BACnetConstructedDataLastRestoreTime +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LAST_RESTORE_TIME : // BACnetConstructedDataLastRestoreTime _childTemp, typeSwitchError = BACnetConstructedDataLastRestoreTimeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LAST_STATE_CHANGE && peekedTagNumber == uint8(9): // BACnetConstructedDataLastStateChange +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LAST_STATE_CHANGE && peekedTagNumber == uint8(9) : // BACnetConstructedDataLastStateChange _childTemp, typeSwitchError = BACnetConstructedDataLastStateChangeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LAST_USE_TIME: // BACnetConstructedDataLastUseTime +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LAST_USE_TIME : // BACnetConstructedDataLastUseTime _childTemp, typeSwitchError = BACnetConstructedDataLastUseTimeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LIFE_SAFETY_ALARM_VALUES && peekedTagNumber == uint8(9): // BACnetConstructedDataLifeSafetyAlarmValues +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LIFE_SAFETY_ALARM_VALUES && peekedTagNumber == uint8(9) : // BACnetConstructedDataLifeSafetyAlarmValues _childTemp, typeSwitchError = BACnetConstructedDataLifeSafetyAlarmValuesParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LIGHTING_COMMAND: // BACnetConstructedDataLightingCommand +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LIGHTING_COMMAND : // BACnetConstructedDataLightingCommand _childTemp, typeSwitchError = BACnetConstructedDataLightingCommandParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LIGHTING_COMMAND_DEFAULT_PRIORITY && peekedTagNumber == uint8(2): // BACnetConstructedDataLightingCommandDefaultPriority +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LIGHTING_COMMAND_DEFAULT_PRIORITY && peekedTagNumber == uint8(2) : // BACnetConstructedDataLightingCommandDefaultPriority _childTemp, typeSwitchError = BACnetConstructedDataLightingCommandDefaultPriorityParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LIMIT_ENABLE && peekedTagNumber == uint8(8): // BACnetConstructedDataLimitEnable +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LIMIT_ENABLE && peekedTagNumber == uint8(8) : // BACnetConstructedDataLimitEnable _childTemp, typeSwitchError = BACnetConstructedDataLimitEnableParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LIMIT_MONITORING_INTERVAL && peekedTagNumber == uint8(2): // BACnetConstructedDataLimitMonitoringInterval +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LIMIT_MONITORING_INTERVAL && peekedTagNumber == uint8(2) : // BACnetConstructedDataLimitMonitoringInterval _childTemp, typeSwitchError = BACnetConstructedDataLimitMonitoringIntervalParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LINK_SPEED && peekedTagNumber == uint8(4): // BACnetConstructedDataLinkSpeed +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LINK_SPEED && peekedTagNumber == uint8(4) : // BACnetConstructedDataLinkSpeed _childTemp, typeSwitchError = BACnetConstructedDataLinkSpeedParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LINK_SPEED_AUTONEGOTIATE && peekedTagNumber == uint8(1): // BACnetConstructedDataLinkSpeedAutonegotiate +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LINK_SPEED_AUTONEGOTIATE && peekedTagNumber == uint8(1) : // BACnetConstructedDataLinkSpeedAutonegotiate _childTemp, typeSwitchError = BACnetConstructedDataLinkSpeedAutonegotiateParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LINK_SPEEDS && peekedTagNumber == uint8(4): // BACnetConstructedDataLinkSpeeds +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LINK_SPEEDS && peekedTagNumber == uint8(4) : // BACnetConstructedDataLinkSpeeds _childTemp, typeSwitchError = BACnetConstructedDataLinkSpeedsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LIST_OF_GROUP_MEMBERS: // BACnetConstructedDataListOfGroupMembers +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LIST_OF_GROUP_MEMBERS : // BACnetConstructedDataListOfGroupMembers _childTemp, typeSwitchError = BACnetConstructedDataListOfGroupMembersParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_CHANNEL && propertyIdentifierArgument == BACnetPropertyIdentifier_LIST_OF_OBJECT_PROPERTY_REFERENCES: // BACnetConstructedDataChannelListOfObjectPropertyReferences +case objectTypeArgument == BACnetObjectType_CHANNEL && propertyIdentifierArgument == BACnetPropertyIdentifier_LIST_OF_OBJECT_PROPERTY_REFERENCES : // BACnetConstructedDataChannelListOfObjectPropertyReferences _childTemp, typeSwitchError = BACnetConstructedDataChannelListOfObjectPropertyReferencesParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LIST_OF_OBJECT_PROPERTY_REFERENCES: // BACnetConstructedDataListOfObjectPropertyReferences +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LIST_OF_OBJECT_PROPERTY_REFERENCES : // BACnetConstructedDataListOfObjectPropertyReferences _childTemp, typeSwitchError = BACnetConstructedDataListOfObjectPropertyReferencesParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LOCAL_DATE && peekedTagNumber == uint8(10): // BACnetConstructedDataLocalDate +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LOCAL_DATE && peekedTagNumber == uint8(10) : // BACnetConstructedDataLocalDate _childTemp, typeSwitchError = BACnetConstructedDataLocalDateParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LOCAL_FORWARDING_ONLY && peekedTagNumber == uint8(1): // BACnetConstructedDataLocalForwardingOnly +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LOCAL_FORWARDING_ONLY && peekedTagNumber == uint8(1) : // BACnetConstructedDataLocalForwardingOnly _childTemp, typeSwitchError = BACnetConstructedDataLocalForwardingOnlyParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LOCAL_TIME && peekedTagNumber == uint8(11): // BACnetConstructedDataLocalTime +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LOCAL_TIME && peekedTagNumber == uint8(11) : // BACnetConstructedDataLocalTime _childTemp, typeSwitchError = BACnetConstructedDataLocalTimeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LOCATION && peekedTagNumber == uint8(7): // BACnetConstructedDataLocation +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LOCATION && peekedTagNumber == uint8(7) : // BACnetConstructedDataLocation _childTemp, typeSwitchError = BACnetConstructedDataLocationParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LOCK_STATUS && peekedTagNumber == uint8(9): // BACnetConstructedDataLockStatus +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LOCK_STATUS && peekedTagNumber == uint8(9) : // BACnetConstructedDataLockStatus _childTemp, typeSwitchError = BACnetConstructedDataLockStatusParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LOCKOUT && peekedTagNumber == uint8(1): // BACnetConstructedDataLockout +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LOCKOUT && peekedTagNumber == uint8(1) : // BACnetConstructedDataLockout _childTemp, typeSwitchError = BACnetConstructedDataLockoutParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LOCKOUT_RELINQUISH_TIME && peekedTagNumber == uint8(2): // BACnetConstructedDataLockoutRelinquishTime +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LOCKOUT_RELINQUISH_TIME && peekedTagNumber == uint8(2) : // BACnetConstructedDataLockoutRelinquishTime _childTemp, typeSwitchError = BACnetConstructedDataLockoutRelinquishTimeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_EVENT_LOG && propertyIdentifierArgument == BACnetPropertyIdentifier_LOG_BUFFER: // BACnetConstructedDataEventLogLogBuffer +case objectTypeArgument == BACnetObjectType_EVENT_LOG && propertyIdentifierArgument == BACnetPropertyIdentifier_LOG_BUFFER : // BACnetConstructedDataEventLogLogBuffer _childTemp, typeSwitchError = BACnetConstructedDataEventLogLogBufferParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_TREND_LOG && propertyIdentifierArgument == BACnetPropertyIdentifier_LOG_BUFFER: // BACnetConstructedDataTrendLogLogBuffer +case objectTypeArgument == BACnetObjectType_TREND_LOG && propertyIdentifierArgument == BACnetPropertyIdentifier_LOG_BUFFER : // BACnetConstructedDataTrendLogLogBuffer _childTemp, typeSwitchError = BACnetConstructedDataTrendLogLogBufferParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_TREND_LOG_MULTIPLE && propertyIdentifierArgument == BACnetPropertyIdentifier_LOG_BUFFER: // BACnetConstructedDataTrendLogMultipleLogBuffer +case objectTypeArgument == BACnetObjectType_TREND_LOG_MULTIPLE && propertyIdentifierArgument == BACnetPropertyIdentifier_LOG_BUFFER : // BACnetConstructedDataTrendLogMultipleLogBuffer _childTemp, typeSwitchError = BACnetConstructedDataTrendLogMultipleLogBufferParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LOG_BUFFER: // BACnetConstructedDataLogBuffer +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LOG_BUFFER : // BACnetConstructedDataLogBuffer _childTemp, typeSwitchError = BACnetConstructedDataLogBufferParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_TREND_LOG && propertyIdentifierArgument == BACnetPropertyIdentifier_LOG_DEVICE_OBJECT_PROPERTY: // BACnetConstructedDataTrendLogLogDeviceObjectProperty +case objectTypeArgument == BACnetObjectType_TREND_LOG && propertyIdentifierArgument == BACnetPropertyIdentifier_LOG_DEVICE_OBJECT_PROPERTY : // BACnetConstructedDataTrendLogLogDeviceObjectProperty _childTemp, typeSwitchError = BACnetConstructedDataTrendLogLogDeviceObjectPropertyParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_TREND_LOG_MULTIPLE && propertyIdentifierArgument == BACnetPropertyIdentifier_LOG_DEVICE_OBJECT_PROPERTY: // BACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty +case objectTypeArgument == BACnetObjectType_TREND_LOG_MULTIPLE && propertyIdentifierArgument == BACnetPropertyIdentifier_LOG_DEVICE_OBJECT_PROPERTY : // BACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty _childTemp, typeSwitchError = BACnetConstructedDataTrendLogMultipleLogDeviceObjectPropertyParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LOG_DEVICE_OBJECT_PROPERTY: // BACnetConstructedDataLogDeviceObjectProperty +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LOG_DEVICE_OBJECT_PROPERTY : // BACnetConstructedDataLogDeviceObjectProperty _childTemp, typeSwitchError = BACnetConstructedDataLogDeviceObjectPropertyParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LOG_INTERVAL && peekedTagNumber == uint8(2): // BACnetConstructedDataLogInterval +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LOG_INTERVAL && peekedTagNumber == uint8(2) : // BACnetConstructedDataLogInterval _childTemp, typeSwitchError = BACnetConstructedDataLogIntervalParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LOGGING_OBJECT && peekedTagNumber == uint8(12): // BACnetConstructedDataLoggingObject +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LOGGING_OBJECT && peekedTagNumber == uint8(12) : // BACnetConstructedDataLoggingObject _childTemp, typeSwitchError = BACnetConstructedDataLoggingObjectParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LOGGING_RECORD: // BACnetConstructedDataLoggingRecord +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LOGGING_RECORD : // BACnetConstructedDataLoggingRecord _childTemp, typeSwitchError = BACnetConstructedDataLoggingRecordParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LOGGING_TYPE && peekedTagNumber == uint8(9): // BACnetConstructedDataLoggingType +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LOGGING_TYPE && peekedTagNumber == uint8(9) : // BACnetConstructedDataLoggingType _childTemp, typeSwitchError = BACnetConstructedDataLoggingTypeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LOW_DIFF_LIMIT: // BACnetConstructedDataLowDiffLimit +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LOW_DIFF_LIMIT : // BACnetConstructedDataLowDiffLimit _childTemp, typeSwitchError = BACnetConstructedDataLowDiffLimitParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ACCUMULATOR && propertyIdentifierArgument == BACnetPropertyIdentifier_LOW_LIMIT && peekedTagNumber == uint8(2): // BACnetConstructedDataAccumulatorLowLimit +case objectTypeArgument == BACnetObjectType_ACCUMULATOR && propertyIdentifierArgument == BACnetPropertyIdentifier_LOW_LIMIT && peekedTagNumber == uint8(2) : // BACnetConstructedDataAccumulatorLowLimit _childTemp, typeSwitchError = BACnetConstructedDataAccumulatorLowLimitParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_LARGE_ANALOG_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_LOW_LIMIT && peekedTagNumber == uint8(5): // BACnetConstructedDataLargeAnalogValueLowLimit +case objectTypeArgument == BACnetObjectType_LARGE_ANALOG_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_LOW_LIMIT && peekedTagNumber == uint8(5) : // BACnetConstructedDataLargeAnalogValueLowLimit _childTemp, typeSwitchError = BACnetConstructedDataLargeAnalogValueLowLimitParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_LOW_LIMIT && peekedTagNumber == uint8(3): // BACnetConstructedDataIntegerValueLowLimit +case objectTypeArgument == BACnetObjectType_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_LOW_LIMIT && peekedTagNumber == uint8(3) : // BACnetConstructedDataIntegerValueLowLimit _childTemp, typeSwitchError = BACnetConstructedDataIntegerValueLowLimitParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_POSITIVE_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_LOW_LIMIT && peekedTagNumber == uint8(2): // BACnetConstructedDataPositiveIntegerValueLowLimit +case objectTypeArgument == BACnetObjectType_POSITIVE_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_LOW_LIMIT && peekedTagNumber == uint8(2) : // BACnetConstructedDataPositiveIntegerValueLowLimit _childTemp, typeSwitchError = BACnetConstructedDataPositiveIntegerValueLowLimitParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LOW_LIMIT && peekedTagNumber == uint8(4): // BACnetConstructedDataLowLimit +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LOW_LIMIT && peekedTagNumber == uint8(4) : // BACnetConstructedDataLowLimit _childTemp, typeSwitchError = BACnetConstructedDataLowLimitParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LOWER_DECK && peekedTagNumber == uint8(12): // BACnetConstructedDataLowerDeck +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_LOWER_DECK && peekedTagNumber == uint8(12) : // BACnetConstructedDataLowerDeck _childTemp, typeSwitchError = BACnetConstructedDataLowerDeckParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MAC_ADDRESS && peekedTagNumber == uint8(6): // BACnetConstructedDataMACAddress +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MAC_ADDRESS && peekedTagNumber == uint8(6) : // BACnetConstructedDataMACAddress _childTemp, typeSwitchError = BACnetConstructedDataMACAddressParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MACHINE_ROOM_ID && peekedTagNumber == uint8(12): // BACnetConstructedDataMachineRoomID +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MACHINE_ROOM_ID && peekedTagNumber == uint8(12) : // BACnetConstructedDataMachineRoomID _childTemp, typeSwitchError = BACnetConstructedDataMachineRoomIDParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_LIFE_SAFETY_ZONE && propertyIdentifierArgument == BACnetPropertyIdentifier_MAINTENANCE_REQUIRED && peekedTagNumber == uint8(1): // BACnetConstructedDataLifeSafetyZoneMaintenanceRequired +case objectTypeArgument == BACnetObjectType_LIFE_SAFETY_ZONE && propertyIdentifierArgument == BACnetPropertyIdentifier_MAINTENANCE_REQUIRED && peekedTagNumber == uint8(1) : // BACnetConstructedDataLifeSafetyZoneMaintenanceRequired _childTemp, typeSwitchError = BACnetConstructedDataLifeSafetyZoneMaintenanceRequiredParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MAINTENANCE_REQUIRED && peekedTagNumber == uint8(9): // BACnetConstructedDataMaintenanceRequired +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MAINTENANCE_REQUIRED && peekedTagNumber == uint8(9) : // BACnetConstructedDataMaintenanceRequired _childTemp, typeSwitchError = BACnetConstructedDataMaintenanceRequiredParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MAKING_CAR_CALL: // BACnetConstructedDataMakingCarCall +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MAKING_CAR_CALL : // BACnetConstructedDataMakingCarCall _childTemp, typeSwitchError = BACnetConstructedDataMakingCarCallParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MANIPULATED_VARIABLE_REFERENCE: // BACnetConstructedDataManipulatedVariableReference +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MANIPULATED_VARIABLE_REFERENCE : // BACnetConstructedDataManipulatedVariableReference _childTemp, typeSwitchError = BACnetConstructedDataManipulatedVariableReferenceParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MANUAL_SLAVE_ADDRESS_BINDING: // BACnetConstructedDataManualSlaveAddressBinding +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MANUAL_SLAVE_ADDRESS_BINDING : // BACnetConstructedDataManualSlaveAddressBinding _childTemp, typeSwitchError = BACnetConstructedDataManualSlaveAddressBindingParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MASKED_ALARM_VALUES && peekedTagNumber == uint8(9): // BACnetConstructedDataMaskedAlarmValues +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MASKED_ALARM_VALUES && peekedTagNumber == uint8(9) : // BACnetConstructedDataMaskedAlarmValues _childTemp, typeSwitchError = BACnetConstructedDataMaskedAlarmValuesParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_ACTUAL_VALUE && peekedTagNumber == uint8(4): // BACnetConstructedDataMaxActualValue +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_ACTUAL_VALUE && peekedTagNumber == uint8(4) : // BACnetConstructedDataMaxActualValue _childTemp, typeSwitchError = BACnetConstructedDataMaxActualValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_APDU_LENGTH_ACCEPTED && peekedTagNumber == uint8(2): // BACnetConstructedDataMaxAPDULengthAccepted +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_APDU_LENGTH_ACCEPTED && peekedTagNumber == uint8(2) : // BACnetConstructedDataMaxAPDULengthAccepted _childTemp, typeSwitchError = BACnetConstructedDataMaxAPDULengthAcceptedParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_FAILED_ATTEMPTS && peekedTagNumber == uint8(2): // BACnetConstructedDataMaxFailedAttempts +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_FAILED_ATTEMPTS && peekedTagNumber == uint8(2) : // BACnetConstructedDataMaxFailedAttempts _childTemp, typeSwitchError = BACnetConstructedDataMaxFailedAttemptsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_DEVICE && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_INFO_FRAMES && peekedTagNumber == uint8(2): // BACnetConstructedDataDeviceMaxInfoFrames +case objectTypeArgument == BACnetObjectType_DEVICE && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_INFO_FRAMES && peekedTagNumber == uint8(2) : // BACnetConstructedDataDeviceMaxInfoFrames _childTemp, typeSwitchError = BACnetConstructedDataDeviceMaxInfoFramesParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_NETWORK_PORT && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_INFO_FRAMES && peekedTagNumber == uint8(2): // BACnetConstructedDataNetworkPortMaxInfoFrames +case objectTypeArgument == BACnetObjectType_NETWORK_PORT && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_INFO_FRAMES && peekedTagNumber == uint8(2) : // BACnetConstructedDataNetworkPortMaxInfoFrames _childTemp, typeSwitchError = BACnetConstructedDataNetworkPortMaxInfoFramesParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_INFO_FRAMES && peekedTagNumber == uint8(2): // BACnetConstructedDataMaxInfoFrames +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_INFO_FRAMES && peekedTagNumber == uint8(2) : // BACnetConstructedDataMaxInfoFrames _childTemp, typeSwitchError = BACnetConstructedDataMaxInfoFramesParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_DEVICE && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_MASTER && peekedTagNumber == uint8(2): // BACnetConstructedDataDeviceMaxMaster +case objectTypeArgument == BACnetObjectType_DEVICE && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_MASTER && peekedTagNumber == uint8(2) : // BACnetConstructedDataDeviceMaxMaster _childTemp, typeSwitchError = BACnetConstructedDataDeviceMaxMasterParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_NETWORK_PORT && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_MASTER && peekedTagNumber == uint8(2): // BACnetConstructedDataNetworkPortMaxMaster +case objectTypeArgument == BACnetObjectType_NETWORK_PORT && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_MASTER && peekedTagNumber == uint8(2) : // BACnetConstructedDataNetworkPortMaxMaster _childTemp, typeSwitchError = BACnetConstructedDataNetworkPortMaxMasterParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_MASTER && peekedTagNumber == uint8(2): // BACnetConstructedDataMaxMaster +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_MASTER && peekedTagNumber == uint8(2) : // BACnetConstructedDataMaxMaster _childTemp, typeSwitchError = BACnetConstructedDataMaxMasterParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ACCUMULATOR && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_PRES_VALUE && peekedTagNumber == uint8(2): // BACnetConstructedDataAccumulatorMaxPresValue +case objectTypeArgument == BACnetObjectType_ACCUMULATOR && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_PRES_VALUE && peekedTagNumber == uint8(2) : // BACnetConstructedDataAccumulatorMaxPresValue _childTemp, typeSwitchError = BACnetConstructedDataAccumulatorMaxPresValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ANALOG_INPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_PRES_VALUE && peekedTagNumber == uint8(4): // BACnetConstructedDataAnalogInputMaxPresValue +case objectTypeArgument == BACnetObjectType_ANALOG_INPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_PRES_VALUE && peekedTagNumber == uint8(4) : // BACnetConstructedDataAnalogInputMaxPresValue _childTemp, typeSwitchError = BACnetConstructedDataAnalogInputMaxPresValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ANALOG_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_PRES_VALUE && peekedTagNumber == uint8(4): // BACnetConstructedDataAnalogOutputMaxPresValue +case objectTypeArgument == BACnetObjectType_ANALOG_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_PRES_VALUE && peekedTagNumber == uint8(4) : // BACnetConstructedDataAnalogOutputMaxPresValue _childTemp, typeSwitchError = BACnetConstructedDataAnalogOutputMaxPresValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ANALOG_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_PRES_VALUE && peekedTagNumber == uint8(4): // BACnetConstructedDataAnalogValueMaxPresValue +case objectTypeArgument == BACnetObjectType_ANALOG_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_PRES_VALUE && peekedTagNumber == uint8(4) : // BACnetConstructedDataAnalogValueMaxPresValue _childTemp, typeSwitchError = BACnetConstructedDataAnalogValueMaxPresValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_LARGE_ANALOG_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_PRES_VALUE && peekedTagNumber == uint8(5): // BACnetConstructedDataLargeAnalogValueMaxPresValue +case objectTypeArgument == BACnetObjectType_LARGE_ANALOG_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_PRES_VALUE && peekedTagNumber == uint8(5) : // BACnetConstructedDataLargeAnalogValueMaxPresValue _childTemp, typeSwitchError = BACnetConstructedDataLargeAnalogValueMaxPresValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_PRES_VALUE && peekedTagNumber == uint8(3): // BACnetConstructedDataIntegerValueMaxPresValue +case objectTypeArgument == BACnetObjectType_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_PRES_VALUE && peekedTagNumber == uint8(3) : // BACnetConstructedDataIntegerValueMaxPresValue _childTemp, typeSwitchError = BACnetConstructedDataIntegerValueMaxPresValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_POSITIVE_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_PRES_VALUE && peekedTagNumber == uint8(2): // BACnetConstructedDataPositiveIntegerValueMaxPresValue +case objectTypeArgument == BACnetObjectType_POSITIVE_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_PRES_VALUE && peekedTagNumber == uint8(2) : // BACnetConstructedDataPositiveIntegerValueMaxPresValue _childTemp, typeSwitchError = BACnetConstructedDataPositiveIntegerValueMaxPresValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_TIMER && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_PRES_VALUE && peekedTagNumber == uint8(2): // BACnetConstructedDataTimerMaxPresValue +case objectTypeArgument == BACnetObjectType_TIMER && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_PRES_VALUE && peekedTagNumber == uint8(2) : // BACnetConstructedDataTimerMaxPresValue _childTemp, typeSwitchError = BACnetConstructedDataTimerMaxPresValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_PRES_VALUE && peekedTagNumber == uint8(4): // BACnetConstructedDataMaxPresValue +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_PRES_VALUE && peekedTagNumber == uint8(4) : // BACnetConstructedDataMaxPresValue _childTemp, typeSwitchError = BACnetConstructedDataMaxPresValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_SEGMENTS_ACCEPTED && peekedTagNumber == uint8(2): // BACnetConstructedDataMaxSegmentsAccepted +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MAX_SEGMENTS_ACCEPTED && peekedTagNumber == uint8(2) : // BACnetConstructedDataMaxSegmentsAccepted _childTemp, typeSwitchError = BACnetConstructedDataMaxSegmentsAcceptedParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MAXIMUM_OUTPUT && peekedTagNumber == uint8(4): // BACnetConstructedDataMaximumOutput +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MAXIMUM_OUTPUT && peekedTagNumber == uint8(4) : // BACnetConstructedDataMaximumOutput _childTemp, typeSwitchError = BACnetConstructedDataMaximumOutputParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MAXIMUM_VALUE && peekedTagNumber == uint8(4): // BACnetConstructedDataMaximumValue +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MAXIMUM_VALUE && peekedTagNumber == uint8(4) : // BACnetConstructedDataMaximumValue _childTemp, typeSwitchError = BACnetConstructedDataMaximumValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MAXIMUM_VALUE_TIMESTAMP: // BACnetConstructedDataMaximumValueTimestamp +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MAXIMUM_VALUE_TIMESTAMP : // BACnetConstructedDataMaximumValueTimestamp _childTemp, typeSwitchError = BACnetConstructedDataMaximumValueTimestampParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MEMBER_OF: // BACnetConstructedDataMemberOf +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MEMBER_OF : // BACnetConstructedDataMemberOf _childTemp, typeSwitchError = BACnetConstructedDataMemberOfParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MEMBER_STATUS_FLAGS && peekedTagNumber == uint8(8): // BACnetConstructedDataMemberStatusFlags +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MEMBER_STATUS_FLAGS && peekedTagNumber == uint8(8) : // BACnetConstructedDataMemberStatusFlags _childTemp, typeSwitchError = BACnetConstructedDataMemberStatusFlagsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MEMBERS: // BACnetConstructedDataMembers +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MEMBERS : // BACnetConstructedDataMembers _childTemp, typeSwitchError = BACnetConstructedDataMembersParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MIN_ACTUAL_VALUE && peekedTagNumber == uint8(4): // BACnetConstructedDataMinActualValue +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MIN_ACTUAL_VALUE && peekedTagNumber == uint8(4) : // BACnetConstructedDataMinActualValue _childTemp, typeSwitchError = BACnetConstructedDataMinActualValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ACCUMULATOR && propertyIdentifierArgument == BACnetPropertyIdentifier_MIN_PRES_VALUE && peekedTagNumber == uint8(2): // BACnetConstructedDataAccumulatorMinPresValue +case objectTypeArgument == BACnetObjectType_ACCUMULATOR && propertyIdentifierArgument == BACnetPropertyIdentifier_MIN_PRES_VALUE && peekedTagNumber == uint8(2) : // BACnetConstructedDataAccumulatorMinPresValue _childTemp, typeSwitchError = BACnetConstructedDataAccumulatorMinPresValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_MIN_PRES_VALUE && peekedTagNumber == uint8(3): // BACnetConstructedDataIntegerValueMinPresValue +case objectTypeArgument == BACnetObjectType_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_MIN_PRES_VALUE && peekedTagNumber == uint8(3) : // BACnetConstructedDataIntegerValueMinPresValue _childTemp, typeSwitchError = BACnetConstructedDataIntegerValueMinPresValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_POSITIVE_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_MIN_PRES_VALUE && peekedTagNumber == uint8(2): // BACnetConstructedDataPositiveIntegerValueMinPresValue +case objectTypeArgument == BACnetObjectType_POSITIVE_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_MIN_PRES_VALUE && peekedTagNumber == uint8(2) : // BACnetConstructedDataPositiveIntegerValueMinPresValue _childTemp, typeSwitchError = BACnetConstructedDataPositiveIntegerValueMinPresValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_LARGE_ANALOG_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_MIN_PRES_VALUE && peekedTagNumber == uint8(5): // BACnetConstructedDataLargeAnalogValueMinPresValue +case objectTypeArgument == BACnetObjectType_LARGE_ANALOG_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_MIN_PRES_VALUE && peekedTagNumber == uint8(5) : // BACnetConstructedDataLargeAnalogValueMinPresValue _childTemp, typeSwitchError = BACnetConstructedDataLargeAnalogValueMinPresValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_TIMER && propertyIdentifierArgument == BACnetPropertyIdentifier_MIN_PRES_VALUE && peekedTagNumber == uint8(2): // BACnetConstructedDataTimerMinPresValue +case objectTypeArgument == BACnetObjectType_TIMER && propertyIdentifierArgument == BACnetPropertyIdentifier_MIN_PRES_VALUE && peekedTagNumber == uint8(2) : // BACnetConstructedDataTimerMinPresValue _childTemp, typeSwitchError = BACnetConstructedDataTimerMinPresValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MIN_PRES_VALUE && peekedTagNumber == uint8(4): // BACnetConstructedDataMinPresValue +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MIN_PRES_VALUE && peekedTagNumber == uint8(4) : // BACnetConstructedDataMinPresValue _childTemp, typeSwitchError = BACnetConstructedDataMinPresValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MINIMUM_OFF_TIME && peekedTagNumber == uint8(2): // BACnetConstructedDataMinimumOffTime +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MINIMUM_OFF_TIME && peekedTagNumber == uint8(2) : // BACnetConstructedDataMinimumOffTime _childTemp, typeSwitchError = BACnetConstructedDataMinimumOffTimeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MINIMUM_ON_TIME && peekedTagNumber == uint8(2): // BACnetConstructedDataMinimumOnTime +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MINIMUM_ON_TIME && peekedTagNumber == uint8(2) : // BACnetConstructedDataMinimumOnTime _childTemp, typeSwitchError = BACnetConstructedDataMinimumOnTimeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MINIMUM_OUTPUT && peekedTagNumber == uint8(4): // BACnetConstructedDataMinimumOutput +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MINIMUM_OUTPUT && peekedTagNumber == uint8(4) : // BACnetConstructedDataMinimumOutput _childTemp, typeSwitchError = BACnetConstructedDataMinimumOutputParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MINIMUM_VALUE && peekedTagNumber == uint8(4): // BACnetConstructedDataMinimumValue +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MINIMUM_VALUE && peekedTagNumber == uint8(4) : // BACnetConstructedDataMinimumValue _childTemp, typeSwitchError = BACnetConstructedDataMinimumValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MINIMUM_VALUE_TIMESTAMP: // BACnetConstructedDataMinimumValueTimestamp +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MINIMUM_VALUE_TIMESTAMP : // BACnetConstructedDataMinimumValueTimestamp _childTemp, typeSwitchError = BACnetConstructedDataMinimumValueTimestampParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MODE && peekedTagNumber == uint8(9): // BACnetConstructedDataMode +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MODE && peekedTagNumber == uint8(9) : // BACnetConstructedDataMode _childTemp, typeSwitchError = BACnetConstructedDataModeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MODEL_NAME && peekedTagNumber == uint8(7): // BACnetConstructedDataModelName +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MODEL_NAME && peekedTagNumber == uint8(7) : // BACnetConstructedDataModelName _childTemp, typeSwitchError = BACnetConstructedDataModelNameParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MODIFICATION_DATE: // BACnetConstructedDataModificationDate +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MODIFICATION_DATE : // BACnetConstructedDataModificationDate _childTemp, typeSwitchError = BACnetConstructedDataModificationDateParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MUSTER_POINT && peekedTagNumber == uint8(1): // BACnetConstructedDataMusterPoint +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_MUSTER_POINT && peekedTagNumber == uint8(1) : // BACnetConstructedDataMusterPoint _childTemp, typeSwitchError = BACnetConstructedDataMusterPointParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_NEGATIVE_ACCESS_RULES: // BACnetConstructedDataNegativeAccessRules +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_NEGATIVE_ACCESS_RULES : // BACnetConstructedDataNegativeAccessRules _childTemp, typeSwitchError = BACnetConstructedDataNegativeAccessRulesParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_NETWORK_ACCESS_SECURITY_POLICIES: // BACnetConstructedDataNetworkAccessSecurityPolicies +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_NETWORK_ACCESS_SECURITY_POLICIES : // BACnetConstructedDataNetworkAccessSecurityPolicies _childTemp, typeSwitchError = BACnetConstructedDataNetworkAccessSecurityPoliciesParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_NETWORK_INTERFACE_NAME && peekedTagNumber == uint8(7): // BACnetConstructedDataNetworkInterfaceName +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_NETWORK_INTERFACE_NAME && peekedTagNumber == uint8(7) : // BACnetConstructedDataNetworkInterfaceName _childTemp, typeSwitchError = BACnetConstructedDataNetworkInterfaceNameParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_NETWORK_NUMBER && peekedTagNumber == uint8(2): // BACnetConstructedDataNetworkNumber +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_NETWORK_NUMBER && peekedTagNumber == uint8(2) : // BACnetConstructedDataNetworkNumber _childTemp, typeSwitchError = BACnetConstructedDataNetworkNumberParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_NETWORK_NUMBER_QUALITY && peekedTagNumber == uint8(9): // BACnetConstructedDataNetworkNumberQuality +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_NETWORK_NUMBER_QUALITY && peekedTagNumber == uint8(9) : // BACnetConstructedDataNetworkNumberQuality _childTemp, typeSwitchError = BACnetConstructedDataNetworkNumberQualityParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_NETWORK_TYPE && peekedTagNumber == uint8(9): // BACnetConstructedDataNetworkType +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_NETWORK_TYPE && peekedTagNumber == uint8(9) : // BACnetConstructedDataNetworkType _childTemp, typeSwitchError = BACnetConstructedDataNetworkTypeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_NEXT_STOPPING_FLOOR && peekedTagNumber == uint8(2): // BACnetConstructedDataNextStoppingFloor +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_NEXT_STOPPING_FLOOR && peekedTagNumber == uint8(2) : // BACnetConstructedDataNextStoppingFloor _childTemp, typeSwitchError = BACnetConstructedDataNextStoppingFloorParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_NODE_SUBTYPE && peekedTagNumber == uint8(7): // BACnetConstructedDataNodeSubtype +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_NODE_SUBTYPE && peekedTagNumber == uint8(7) : // BACnetConstructedDataNodeSubtype _childTemp, typeSwitchError = BACnetConstructedDataNodeSubtypeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_NODE_TYPE && peekedTagNumber == uint8(9): // BACnetConstructedDataNodeType +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_NODE_TYPE && peekedTagNumber == uint8(9) : // BACnetConstructedDataNodeType _childTemp, typeSwitchError = BACnetConstructedDataNodeTypeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_NOTIFICATION_CLASS && peekedTagNumber == uint8(2): // BACnetConstructedDataNotificationClass +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_NOTIFICATION_CLASS && peekedTagNumber == uint8(2) : // BACnetConstructedDataNotificationClass _childTemp, typeSwitchError = BACnetConstructedDataNotificationClassParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_NOTIFICATION_THRESHOLD && peekedTagNumber == uint8(2): // BACnetConstructedDataNotificationThreshold +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_NOTIFICATION_THRESHOLD && peekedTagNumber == uint8(2) : // BACnetConstructedDataNotificationThreshold _childTemp, typeSwitchError = BACnetConstructedDataNotificationThresholdParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_NOTIFY_TYPE && peekedTagNumber == uint8(9): // BACnetConstructedDataNotifyType +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_NOTIFY_TYPE && peekedTagNumber == uint8(9) : // BACnetConstructedDataNotifyType _childTemp, typeSwitchError = BACnetConstructedDataNotifyTypeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_NUMBER_OF_APDU_RETRIES && peekedTagNumber == uint8(2): // BACnetConstructedDataNumberOfAPDURetries +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_NUMBER_OF_APDU_RETRIES && peekedTagNumber == uint8(2) : // BACnetConstructedDataNumberOfAPDURetries _childTemp, typeSwitchError = BACnetConstructedDataNumberOfAPDURetriesParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_NUMBER_OF_AUTHENTICATION_POLICIES && peekedTagNumber == uint8(2): // BACnetConstructedDataNumberOfAuthenticationPolicies +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_NUMBER_OF_AUTHENTICATION_POLICIES && peekedTagNumber == uint8(2) : // BACnetConstructedDataNumberOfAuthenticationPolicies _childTemp, typeSwitchError = BACnetConstructedDataNumberOfAuthenticationPoliciesParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_NUMBER_OF_STATES && peekedTagNumber == uint8(2): // BACnetConstructedDataNumberOfStates +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_NUMBER_OF_STATES && peekedTagNumber == uint8(2) : // BACnetConstructedDataNumberOfStates _childTemp, typeSwitchError = BACnetConstructedDataNumberOfStatesParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_OBJECT_IDENTIFIER && peekedTagNumber == uint8(12): // BACnetConstructedDataObjectIdentifier +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_OBJECT_IDENTIFIER && peekedTagNumber == uint8(12) : // BACnetConstructedDataObjectIdentifier _childTemp, typeSwitchError = BACnetConstructedDataObjectIdentifierParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_OBJECT_LIST: // BACnetConstructedDataObjectList +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_OBJECT_LIST : // BACnetConstructedDataObjectList _childTemp, typeSwitchError = BACnetConstructedDataObjectListParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_OBJECT_NAME && peekedTagNumber == uint8(7): // BACnetConstructedDataObjectName +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_OBJECT_NAME && peekedTagNumber == uint8(7) : // BACnetConstructedDataObjectName _childTemp, typeSwitchError = BACnetConstructedDataObjectNameParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_OBJECT_PROPERTY_REFERENCE: // BACnetConstructedDataObjectPropertyReference +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_OBJECT_PROPERTY_REFERENCE : // BACnetConstructedDataObjectPropertyReference _childTemp, typeSwitchError = BACnetConstructedDataObjectPropertyReferenceParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_OBJECT_TYPE && peekedTagNumber == uint8(9): // BACnetConstructedDataObjectType +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_OBJECT_TYPE && peekedTagNumber == uint8(9) : // BACnetConstructedDataObjectType _childTemp, typeSwitchError = BACnetConstructedDataObjectTypeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_OCCUPANCY_COUNT && peekedTagNumber == uint8(2): // BACnetConstructedDataOccupancyCount +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_OCCUPANCY_COUNT && peekedTagNumber == uint8(2) : // BACnetConstructedDataOccupancyCount _childTemp, typeSwitchError = BACnetConstructedDataOccupancyCountParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_OCCUPANCY_COUNT_ADJUST && peekedTagNumber == uint8(1): // BACnetConstructedDataOccupancyCountAdjust +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_OCCUPANCY_COUNT_ADJUST && peekedTagNumber == uint8(1) : // BACnetConstructedDataOccupancyCountAdjust _childTemp, typeSwitchError = BACnetConstructedDataOccupancyCountAdjustParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_OCCUPANCY_COUNT_ENABLE && peekedTagNumber == uint8(1): // BACnetConstructedDataOccupancyCountEnable +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_OCCUPANCY_COUNT_ENABLE && peekedTagNumber == uint8(1) : // BACnetConstructedDataOccupancyCountEnable _childTemp, typeSwitchError = BACnetConstructedDataOccupancyCountEnableParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_OCCUPANCY_LOWER_LIMIT && peekedTagNumber == uint8(2): // BACnetConstructedDataOccupancyLowerLimit +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_OCCUPANCY_LOWER_LIMIT && peekedTagNumber == uint8(2) : // BACnetConstructedDataOccupancyLowerLimit _childTemp, typeSwitchError = BACnetConstructedDataOccupancyLowerLimitParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_OCCUPANCY_LOWER_LIMIT_ENFORCED && peekedTagNumber == uint8(1): // BACnetConstructedDataOccupancyLowerLimitEnforced +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_OCCUPANCY_LOWER_LIMIT_ENFORCED && peekedTagNumber == uint8(1) : // BACnetConstructedDataOccupancyLowerLimitEnforced _childTemp, typeSwitchError = BACnetConstructedDataOccupancyLowerLimitEnforcedParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_OCCUPANCY_STATE && peekedTagNumber == uint8(9): // BACnetConstructedDataOccupancyState +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_OCCUPANCY_STATE && peekedTagNumber == uint8(9) : // BACnetConstructedDataOccupancyState _childTemp, typeSwitchError = BACnetConstructedDataOccupancyStateParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_OCCUPANCY_UPPER_LIMIT && peekedTagNumber == uint8(2): // BACnetConstructedDataOccupancyUpperLimit +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_OCCUPANCY_UPPER_LIMIT && peekedTagNumber == uint8(2) : // BACnetConstructedDataOccupancyUpperLimit _childTemp, typeSwitchError = BACnetConstructedDataOccupancyUpperLimitParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_OCCUPANCY_UPPER_LIMIT_ENFORCED && peekedTagNumber == uint8(1): // BACnetConstructedDataOccupancyUpperLimitEnforced +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_OCCUPANCY_UPPER_LIMIT_ENFORCED && peekedTagNumber == uint8(1) : // BACnetConstructedDataOccupancyUpperLimitEnforced _childTemp, typeSwitchError = BACnetConstructedDataOccupancyUpperLimitEnforcedParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_OPERATION_DIRECTION && peekedTagNumber == uint8(9): // BACnetConstructedDataOperationDirection +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_OPERATION_DIRECTION && peekedTagNumber == uint8(9) : // BACnetConstructedDataOperationDirection _childTemp, typeSwitchError = BACnetConstructedDataOperationDirectionParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_OPERATION_EXPECTED && peekedTagNumber == uint8(9): // BACnetConstructedDataOperationExpected +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_OPERATION_EXPECTED && peekedTagNumber == uint8(9) : // BACnetConstructedDataOperationExpected _childTemp, typeSwitchError = BACnetConstructedDataOperationExpectedParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_OPTIONAL: // BACnetConstructedDataOptional +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_OPTIONAL : // BACnetConstructedDataOptional _childTemp, typeSwitchError = BACnetConstructedDataOptionalParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_OUT_OF_SERVICE && peekedTagNumber == uint8(1): // BACnetConstructedDataOutOfService +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_OUT_OF_SERVICE && peekedTagNumber == uint8(1) : // BACnetConstructedDataOutOfService _childTemp, typeSwitchError = BACnetConstructedDataOutOfServiceParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_OUTPUT_UNITS && peekedTagNumber == uint8(9): // BACnetConstructedDataOutputUnits +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_OUTPUT_UNITS && peekedTagNumber == uint8(9) : // BACnetConstructedDataOutputUnits _childTemp, typeSwitchError = BACnetConstructedDataOutputUnitsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PACKET_REORDER_TIME && peekedTagNumber == uint8(2): // BACnetConstructedDataPacketReorderTime +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PACKET_REORDER_TIME && peekedTagNumber == uint8(2) : // BACnetConstructedDataPacketReorderTime _childTemp, typeSwitchError = BACnetConstructedDataPacketReorderTimeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PASSBACK_MODE: // BACnetConstructedDataPassbackMode +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PASSBACK_MODE : // BACnetConstructedDataPassbackMode _childTemp, typeSwitchError = BACnetConstructedDataPassbackModeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PASSBACK_TIMEOUT && peekedTagNumber == uint8(2): // BACnetConstructedDataPassbackTimeout +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PASSBACK_TIMEOUT && peekedTagNumber == uint8(2) : // BACnetConstructedDataPassbackTimeout _childTemp, typeSwitchError = BACnetConstructedDataPassbackTimeoutParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PASSENGER_ALARM && peekedTagNumber == uint8(1): // BACnetConstructedDataPassengerAlarm +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PASSENGER_ALARM && peekedTagNumber == uint8(1) : // BACnetConstructedDataPassengerAlarm _childTemp, typeSwitchError = BACnetConstructedDataPassengerAlarmParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_POLARITY && peekedTagNumber == uint8(9): // BACnetConstructedDataPolarity +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_POLARITY && peekedTagNumber == uint8(9) : // BACnetConstructedDataPolarity _childTemp, typeSwitchError = BACnetConstructedDataPolarityParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PORT_FILTER: // BACnetConstructedDataPortFilter +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PORT_FILTER : // BACnetConstructedDataPortFilter _childTemp, typeSwitchError = BACnetConstructedDataPortFilterParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_POSITIVE_ACCESS_RULES: // BACnetConstructedDataPositiveAccessRules +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_POSITIVE_ACCESS_RULES : // BACnetConstructedDataPositiveAccessRules _childTemp, typeSwitchError = BACnetConstructedDataPositiveAccessRulesParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_POWER && peekedTagNumber == uint8(4): // BACnetConstructedDataPower +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_POWER && peekedTagNumber == uint8(4) : // BACnetConstructedDataPower _childTemp, typeSwitchError = BACnetConstructedDataPowerParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_POWER_MODE && peekedTagNumber == uint8(1): // BACnetConstructedDataPowerMode +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_POWER_MODE && peekedTagNumber == uint8(1) : // BACnetConstructedDataPowerMode _childTemp, typeSwitchError = BACnetConstructedDataPowerModeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESCALE: // BACnetConstructedDataPrescale +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESCALE : // BACnetConstructedDataPrescale _childTemp, typeSwitchError = BACnetConstructedDataPrescaleParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ACCESS_DOOR && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(9): // BACnetConstructedDataAccessDoorPresentValue +case objectTypeArgument == BACnetObjectType_ACCESS_DOOR && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(9) : // BACnetConstructedDataAccessDoorPresentValue _childTemp, typeSwitchError = BACnetConstructedDataAccessDoorPresentValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ALERT_ENROLLMENT && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(12): // BACnetConstructedDataAlertEnrollmentPresentValue +case objectTypeArgument == BACnetObjectType_ALERT_ENROLLMENT && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(12) : // BACnetConstructedDataAlertEnrollmentPresentValue _childTemp, typeSwitchError = BACnetConstructedDataAlertEnrollmentPresentValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ANALOG_INPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(4): // BACnetConstructedDataAnalogInputPresentValue +case objectTypeArgument == BACnetObjectType_ANALOG_INPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(4) : // BACnetConstructedDataAnalogInputPresentValue _childTemp, typeSwitchError = BACnetConstructedDataAnalogInputPresentValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ANALOG_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(4): // BACnetConstructedDataAnalogOutputPresentValue +case objectTypeArgument == BACnetObjectType_ANALOG_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(4) : // BACnetConstructedDataAnalogOutputPresentValue _childTemp, typeSwitchError = BACnetConstructedDataAnalogOutputPresentValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ANALOG_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(4): // BACnetConstructedDataAnalogValuePresentValue +case objectTypeArgument == BACnetObjectType_ANALOG_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(4) : // BACnetConstructedDataAnalogValuePresentValue _childTemp, typeSwitchError = BACnetConstructedDataAnalogValuePresentValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_BINARY_INPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(9): // BACnetConstructedDataBinaryInputPresentValue +case objectTypeArgument == BACnetObjectType_BINARY_INPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(9) : // BACnetConstructedDataBinaryInputPresentValue _childTemp, typeSwitchError = BACnetConstructedDataBinaryInputPresentValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_BINARY_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(9): // BACnetConstructedDataBinaryOutputPresentValue +case objectTypeArgument == BACnetObjectType_BINARY_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(9) : // BACnetConstructedDataBinaryOutputPresentValue _childTemp, typeSwitchError = BACnetConstructedDataBinaryOutputPresentValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_BINARY_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(9): // BACnetConstructedDataBinaryValuePresentValue +case objectTypeArgument == BACnetObjectType_BINARY_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(9) : // BACnetConstructedDataBinaryValuePresentValue _childTemp, typeSwitchError = BACnetConstructedDataBinaryValuePresentValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_BINARY_LIGHTING_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(9): // BACnetConstructedDataBinaryLightingOutputPresentValue +case objectTypeArgument == BACnetObjectType_BINARY_LIGHTING_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(9) : // BACnetConstructedDataBinaryLightingOutputPresentValue _childTemp, typeSwitchError = BACnetConstructedDataBinaryLightingOutputPresentValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_BITSTRING_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(8): // BACnetConstructedDataBitStringValuePresentValue +case objectTypeArgument == BACnetObjectType_BITSTRING_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(8) : // BACnetConstructedDataBitStringValuePresentValue _childTemp, typeSwitchError = BACnetConstructedDataBitStringValuePresentValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_CALENDAR && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(1): // BACnetConstructedDataCalendarPresentValue +case objectTypeArgument == BACnetObjectType_CALENDAR && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(1) : // BACnetConstructedDataCalendarPresentValue _childTemp, typeSwitchError = BACnetConstructedDataCalendarPresentValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_CHANNEL && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE: // BACnetConstructedDataChannelPresentValue +case objectTypeArgument == BACnetObjectType_CHANNEL && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE : // BACnetConstructedDataChannelPresentValue _childTemp, typeSwitchError = BACnetConstructedDataChannelPresentValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_CHARACTERSTRING_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(7): // BACnetConstructedDataCharacterStringValuePresentValue +case objectTypeArgument == BACnetObjectType_CHARACTERSTRING_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(7) : // BACnetConstructedDataCharacterStringValuePresentValue _childTemp, typeSwitchError = BACnetConstructedDataCharacterStringValuePresentValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_CREDENTIAL_DATA_INPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE: // BACnetConstructedDataCredentialDataInputPresentValue +case objectTypeArgument == BACnetObjectType_CREDENTIAL_DATA_INPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE : // BACnetConstructedDataCredentialDataInputPresentValue _childTemp, typeSwitchError = BACnetConstructedDataCredentialDataInputPresentValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_DATE_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(10): // BACnetConstructedDataDateValuePresentValue +case objectTypeArgument == BACnetObjectType_DATE_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(10) : // BACnetConstructedDataDateValuePresentValue _childTemp, typeSwitchError = BACnetConstructedDataDateValuePresentValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_DATEPATTERN_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(10): // BACnetConstructedDataDatePatternValuePresentValue +case objectTypeArgument == BACnetObjectType_DATEPATTERN_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(10) : // BACnetConstructedDataDatePatternValuePresentValue _childTemp, typeSwitchError = BACnetConstructedDataDatePatternValuePresentValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_DATETIME_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(11): // BACnetConstructedDataDateTimeValuePresentValue +case objectTypeArgument == BACnetObjectType_DATETIME_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(11) : // BACnetConstructedDataDateTimeValuePresentValue _childTemp, typeSwitchError = BACnetConstructedDataDateTimeValuePresentValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_DATETIMEPATTERN_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(11): // BACnetConstructedDataDateTimePatternValuePresentValue +case objectTypeArgument == BACnetObjectType_DATETIMEPATTERN_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(11) : // BACnetConstructedDataDateTimePatternValuePresentValue _childTemp, typeSwitchError = BACnetConstructedDataDateTimePatternValuePresentValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(3): // BACnetConstructedDataIntegerValuePresentValue +case objectTypeArgument == BACnetObjectType_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(3) : // BACnetConstructedDataIntegerValuePresentValue _childTemp, typeSwitchError = BACnetConstructedDataIntegerValuePresentValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_LARGE_ANALOG_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(5): // BACnetConstructedDataLargeAnalogValuePresentValue +case objectTypeArgument == BACnetObjectType_LARGE_ANALOG_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(5) : // BACnetConstructedDataLargeAnalogValuePresentValue _childTemp, typeSwitchError = BACnetConstructedDataLargeAnalogValuePresentValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_LIGHTING_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(4): // BACnetConstructedDataLightingOutputPresentValue +case objectTypeArgument == BACnetObjectType_LIGHTING_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(4) : // BACnetConstructedDataLightingOutputPresentValue _childTemp, typeSwitchError = BACnetConstructedDataLightingOutputPresentValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_LIFE_SAFETY_POINT && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(9): // BACnetConstructedDataLifeSafetyPointPresentValue +case objectTypeArgument == BACnetObjectType_LIFE_SAFETY_POINT && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(9) : // BACnetConstructedDataLifeSafetyPointPresentValue _childTemp, typeSwitchError = BACnetConstructedDataLifeSafetyPointPresentValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_LIFE_SAFETY_ZONE && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(9): // BACnetConstructedDataLifeSafetyZonePresentValue +case objectTypeArgument == BACnetObjectType_LIFE_SAFETY_ZONE && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(9) : // BACnetConstructedDataLifeSafetyZonePresentValue _childTemp, typeSwitchError = BACnetConstructedDataLifeSafetyZonePresentValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_LOAD_CONTROL && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(9): // BACnetConstructedDataLoadControlPresentValue +case objectTypeArgument == BACnetObjectType_LOAD_CONTROL && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(9) : // BACnetConstructedDataLoadControlPresentValue _childTemp, typeSwitchError = BACnetConstructedDataLoadControlPresentValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_LOOP && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(4): // BACnetConstructedDataLoopPresentValue +case objectTypeArgument == BACnetObjectType_LOOP && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(4) : // BACnetConstructedDataLoopPresentValue _childTemp, typeSwitchError = BACnetConstructedDataLoopPresentValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_PULSE_CONVERTER && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(4): // BACnetConstructedDataPulseConverterPresentValue +case objectTypeArgument == BACnetObjectType_PULSE_CONVERTER && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(4) : // BACnetConstructedDataPulseConverterPresentValue _childTemp, typeSwitchError = BACnetConstructedDataPulseConverterPresentValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_GROUP && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE: // BACnetConstructedDataGroupPresentValue +case objectTypeArgument == BACnetObjectType_GROUP && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE : // BACnetConstructedDataGroupPresentValue _childTemp, typeSwitchError = BACnetConstructedDataGroupPresentValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_GLOBAL_GROUP && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE: // BACnetConstructedDataGlobalGroupPresentValue +case objectTypeArgument == BACnetObjectType_GLOBAL_GROUP && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE : // BACnetConstructedDataGlobalGroupPresentValue _childTemp, typeSwitchError = BACnetConstructedDataGlobalGroupPresentValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_OCTETSTRING_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(6): // BACnetConstructedDataOctetStringValuePresentValue +case objectTypeArgument == BACnetObjectType_OCTETSTRING_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(6) : // BACnetConstructedDataOctetStringValuePresentValue _childTemp, typeSwitchError = BACnetConstructedDataOctetStringValuePresentValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_SCHEDULE && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE: // BACnetConstructedDataSchedulePresentValue +case objectTypeArgument == BACnetObjectType_SCHEDULE && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE : // BACnetConstructedDataSchedulePresentValue _childTemp, typeSwitchError = BACnetConstructedDataSchedulePresentValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_TIME_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(11): // BACnetConstructedDataTimeValuePresentValue +case objectTypeArgument == BACnetObjectType_TIME_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(11) : // BACnetConstructedDataTimeValuePresentValue _childTemp, typeSwitchError = BACnetConstructedDataTimeValuePresentValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_TIMEPATTERN_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(11): // BACnetConstructedDataTimePatternValuePresentValue +case objectTypeArgument == BACnetObjectType_TIMEPATTERN_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(11) : // BACnetConstructedDataTimePatternValuePresentValue _childTemp, typeSwitchError = BACnetConstructedDataTimePatternValuePresentValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(2): // BACnetConstructedDataPresentValue +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PRESENT_VALUE && peekedTagNumber == uint8(2) : // BACnetConstructedDataPresentValue _childTemp, typeSwitchError = BACnetConstructedDataPresentValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PRIORITY: // BACnetConstructedDataPriority +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PRIORITY : // BACnetConstructedDataPriority _childTemp, typeSwitchError = BACnetConstructedDataPriorityParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PRIORITY_ARRAY: // BACnetConstructedDataPriorityArray +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PRIORITY_ARRAY : // BACnetConstructedDataPriorityArray _childTemp, typeSwitchError = BACnetConstructedDataPriorityArrayParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PRIORITY_FOR_WRITING && peekedTagNumber == uint8(2): // BACnetConstructedDataPriorityForWriting +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PRIORITY_FOR_WRITING && peekedTagNumber == uint8(2) : // BACnetConstructedDataPriorityForWriting _childTemp, typeSwitchError = BACnetConstructedDataPriorityForWritingParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PROCESS_IDENTIFIER && peekedTagNumber == uint8(2): // BACnetConstructedDataProcessIdentifier +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PROCESS_IDENTIFIER && peekedTagNumber == uint8(2) : // BACnetConstructedDataProcessIdentifier _childTemp, typeSwitchError = BACnetConstructedDataProcessIdentifierParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PROCESS_IDENTIFIER_FILTER: // BACnetConstructedDataProcessIdentifierFilter +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PROCESS_IDENTIFIER_FILTER : // BACnetConstructedDataProcessIdentifierFilter _childTemp, typeSwitchError = BACnetConstructedDataProcessIdentifierFilterParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PROFILE_LOCATION && peekedTagNumber == uint8(7): // BACnetConstructedDataProfileLocation +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PROFILE_LOCATION && peekedTagNumber == uint8(7) : // BACnetConstructedDataProfileLocation _childTemp, typeSwitchError = BACnetConstructedDataProfileLocationParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PROFILE_NAME && peekedTagNumber == uint8(7): // BACnetConstructedDataProfileName +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PROFILE_NAME && peekedTagNumber == uint8(7) : // BACnetConstructedDataProfileName _childTemp, typeSwitchError = BACnetConstructedDataProfileNameParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PROGRAM_CHANGE && peekedTagNumber == uint8(9): // BACnetConstructedDataProgramChange +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PROGRAM_CHANGE && peekedTagNumber == uint8(9) : // BACnetConstructedDataProgramChange _childTemp, typeSwitchError = BACnetConstructedDataProgramChangeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PROGRAM_LOCATION && peekedTagNumber == uint8(7): // BACnetConstructedDataProgramLocation +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PROGRAM_LOCATION && peekedTagNumber == uint8(7) : // BACnetConstructedDataProgramLocation _childTemp, typeSwitchError = BACnetConstructedDataProgramLocationParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PROGRAM_STATE && peekedTagNumber == uint8(9): // BACnetConstructedDataProgramState +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PROGRAM_STATE && peekedTagNumber == uint8(9) : // BACnetConstructedDataProgramState _childTemp, typeSwitchError = BACnetConstructedDataProgramStateParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PROPERTY_LIST && peekedTagNumber == uint8(9): // BACnetConstructedDataPropertyList +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PROPERTY_LIST && peekedTagNumber == uint8(9) : // BACnetConstructedDataPropertyList _childTemp, typeSwitchError = BACnetConstructedDataPropertyListParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PROPORTIONAL_CONSTANT && peekedTagNumber == uint8(4): // BACnetConstructedDataProportionalConstant +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PROPORTIONAL_CONSTANT && peekedTagNumber == uint8(4) : // BACnetConstructedDataProportionalConstant _childTemp, typeSwitchError = BACnetConstructedDataProportionalConstantParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PROPORTIONAL_CONSTANT_UNITS && peekedTagNumber == uint8(9): // BACnetConstructedDataProportionalConstantUnits +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PROPORTIONAL_CONSTANT_UNITS && peekedTagNumber == uint8(9) : // BACnetConstructedDataProportionalConstantUnits _childTemp, typeSwitchError = BACnetConstructedDataProportionalConstantUnitsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PROTOCOL_LEVEL && peekedTagNumber == uint8(9): // BACnetConstructedDataProtocolLevel +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PROTOCOL_LEVEL && peekedTagNumber == uint8(9) : // BACnetConstructedDataProtocolLevel _childTemp, typeSwitchError = BACnetConstructedDataProtocolLevelParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PROTOCOL_OBJECT_TYPES_SUPPORTED && peekedTagNumber == uint8(8): // BACnetConstructedDataProtocolObjectTypesSupported +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PROTOCOL_OBJECT_TYPES_SUPPORTED && peekedTagNumber == uint8(8) : // BACnetConstructedDataProtocolObjectTypesSupported _childTemp, typeSwitchError = BACnetConstructedDataProtocolObjectTypesSupportedParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PROTOCOL_REVISION && peekedTagNumber == uint8(2): // BACnetConstructedDataProtocolRevision +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PROTOCOL_REVISION && peekedTagNumber == uint8(2) : // BACnetConstructedDataProtocolRevision _childTemp, typeSwitchError = BACnetConstructedDataProtocolRevisionParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PROTOCOL_SERVICES_SUPPORTED && peekedTagNumber == uint8(8): // BACnetConstructedDataProtocolServicesSupported +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PROTOCOL_SERVICES_SUPPORTED && peekedTagNumber == uint8(8) : // BACnetConstructedDataProtocolServicesSupported _childTemp, typeSwitchError = BACnetConstructedDataProtocolServicesSupportedParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PROTOCOL_VERSION && peekedTagNumber == uint8(2): // BACnetConstructedDataProtocolVersion +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PROTOCOL_VERSION && peekedTagNumber == uint8(2) : // BACnetConstructedDataProtocolVersion _childTemp, typeSwitchError = BACnetConstructedDataProtocolVersionParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PULSE_RATE && peekedTagNumber == uint8(2): // BACnetConstructedDataPulseRate +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_PULSE_RATE && peekedTagNumber == uint8(2) : // BACnetConstructedDataPulseRate _childTemp, typeSwitchError = BACnetConstructedDataPulseRateParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_READ_ONLY && peekedTagNumber == uint8(1): // BACnetConstructedDataReadOnly +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_READ_ONLY && peekedTagNumber == uint8(1) : // BACnetConstructedDataReadOnly _childTemp, typeSwitchError = BACnetConstructedDataReadOnlyParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_REASON_FOR_DISABLE && peekedTagNumber == uint8(9): // BACnetConstructedDataReasonForDisable +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_REASON_FOR_DISABLE && peekedTagNumber == uint8(9) : // BACnetConstructedDataReasonForDisable _childTemp, typeSwitchError = BACnetConstructedDataReasonForDisableParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_REASON_FOR_HALT && peekedTagNumber == uint8(9): // BACnetConstructedDataReasonForHalt +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_REASON_FOR_HALT && peekedTagNumber == uint8(9) : // BACnetConstructedDataReasonForHalt _childTemp, typeSwitchError = BACnetConstructedDataReasonForHaltParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_RECIPIENT_LIST: // BACnetConstructedDataRecipientList +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_RECIPIENT_LIST : // BACnetConstructedDataRecipientList _childTemp, typeSwitchError = BACnetConstructedDataRecipientListParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_FILE && propertyIdentifierArgument == BACnetPropertyIdentifier_RECORD_COUNT && peekedTagNumber == uint8(2): // BACnetConstructedDataFileRecordCount +case objectTypeArgument == BACnetObjectType_FILE && propertyIdentifierArgument == BACnetPropertyIdentifier_RECORD_COUNT && peekedTagNumber == uint8(2) : // BACnetConstructedDataFileRecordCount _childTemp, typeSwitchError = BACnetConstructedDataFileRecordCountParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_RECORD_COUNT && peekedTagNumber == uint8(2): // BACnetConstructedDataRecordCount +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_RECORD_COUNT && peekedTagNumber == uint8(2) : // BACnetConstructedDataRecordCount _childTemp, typeSwitchError = BACnetConstructedDataRecordCountParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_RECORDS_SINCE_NOTIFICATION && peekedTagNumber == uint8(2): // BACnetConstructedDataRecordsSinceNotification +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_RECORDS_SINCE_NOTIFICATION && peekedTagNumber == uint8(2) : // BACnetConstructedDataRecordsSinceNotification _childTemp, typeSwitchError = BACnetConstructedDataRecordsSinceNotificationParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_REFERENCE_PORT && peekedTagNumber == uint8(2): // BACnetConstructedDataReferencePort +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_REFERENCE_PORT && peekedTagNumber == uint8(2) : // BACnetConstructedDataReferencePort _childTemp, typeSwitchError = BACnetConstructedDataReferencePortParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_REGISTERED_CAR_CALL: // BACnetConstructedDataRegisteredCarCall +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_REGISTERED_CAR_CALL : // BACnetConstructedDataRegisteredCarCall _childTemp, typeSwitchError = BACnetConstructedDataRegisteredCarCallParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_RELIABILITY && peekedTagNumber == uint8(9): // BACnetConstructedDataReliability +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_RELIABILITY && peekedTagNumber == uint8(9) : // BACnetConstructedDataReliability _childTemp, typeSwitchError = BACnetConstructedDataReliabilityParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_RELIABILITY_EVALUATION_INHIBIT && peekedTagNumber == uint8(1): // BACnetConstructedDataReliabilityEvaluationInhibit +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_RELIABILITY_EVALUATION_INHIBIT && peekedTagNumber == uint8(1) : // BACnetConstructedDataReliabilityEvaluationInhibit _childTemp, typeSwitchError = BACnetConstructedDataReliabilityEvaluationInhibitParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ACCESS_DOOR && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT && peekedTagNumber == uint8(9): // BACnetConstructedDataAccessDoorRelinquishDefault +case objectTypeArgument == BACnetObjectType_ACCESS_DOOR && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT && peekedTagNumber == uint8(9) : // BACnetConstructedDataAccessDoorRelinquishDefault _childTemp, typeSwitchError = BACnetConstructedDataAccessDoorRelinquishDefaultParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ANALOG_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT && peekedTagNumber == uint8(4): // BACnetConstructedDataAnalogOutputRelinquishDefault +case objectTypeArgument == BACnetObjectType_ANALOG_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT && peekedTagNumber == uint8(4) : // BACnetConstructedDataAnalogOutputRelinquishDefault _childTemp, typeSwitchError = BACnetConstructedDataAnalogOutputRelinquishDefaultParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_ANALOG_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT && peekedTagNumber == uint8(4): // BACnetConstructedDataAnalogValueRelinquishDefault +case objectTypeArgument == BACnetObjectType_ANALOG_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT && peekedTagNumber == uint8(4) : // BACnetConstructedDataAnalogValueRelinquishDefault _childTemp, typeSwitchError = BACnetConstructedDataAnalogValueRelinquishDefaultParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_BINARY_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT && peekedTagNumber == uint8(9): // BACnetConstructedDataBinaryOutputRelinquishDefault +case objectTypeArgument == BACnetObjectType_BINARY_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT && peekedTagNumber == uint8(9) : // BACnetConstructedDataBinaryOutputRelinquishDefault _childTemp, typeSwitchError = BACnetConstructedDataBinaryOutputRelinquishDefaultParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_BINARY_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT && peekedTagNumber == uint8(9): // BACnetConstructedDataBinaryValueRelinquishDefault +case objectTypeArgument == BACnetObjectType_BINARY_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT && peekedTagNumber == uint8(9) : // BACnetConstructedDataBinaryValueRelinquishDefault _childTemp, typeSwitchError = BACnetConstructedDataBinaryValueRelinquishDefaultParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_BINARY_LIGHTING_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT && peekedTagNumber == uint8(9): // BACnetConstructedDataBinaryLightingOutputRelinquishDefault +case objectTypeArgument == BACnetObjectType_BINARY_LIGHTING_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT && peekedTagNumber == uint8(9) : // BACnetConstructedDataBinaryLightingOutputRelinquishDefault _childTemp, typeSwitchError = BACnetConstructedDataBinaryLightingOutputRelinquishDefaultParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_BITSTRING_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT && peekedTagNumber == uint8(8): // BACnetConstructedDataBitStringValueRelinquishDefault +case objectTypeArgument == BACnetObjectType_BITSTRING_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT && peekedTagNumber == uint8(8) : // BACnetConstructedDataBitStringValueRelinquishDefault _childTemp, typeSwitchError = BACnetConstructedDataBitStringValueRelinquishDefaultParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_CHARACTERSTRING_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT && peekedTagNumber == uint8(7): // BACnetConstructedDataCharacterStringValueRelinquishDefault +case objectTypeArgument == BACnetObjectType_CHARACTERSTRING_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT && peekedTagNumber == uint8(7) : // BACnetConstructedDataCharacterStringValueRelinquishDefault _childTemp, typeSwitchError = BACnetConstructedDataCharacterStringValueRelinquishDefaultParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_DATE_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT && peekedTagNumber == uint8(10): // BACnetConstructedDataDateValueRelinquishDefault +case objectTypeArgument == BACnetObjectType_DATE_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT && peekedTagNumber == uint8(10) : // BACnetConstructedDataDateValueRelinquishDefault _childTemp, typeSwitchError = BACnetConstructedDataDateValueRelinquishDefaultParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_DATEPATTERN_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT && peekedTagNumber == uint8(10): // BACnetConstructedDataDatePatternValueRelinquishDefault +case objectTypeArgument == BACnetObjectType_DATEPATTERN_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT && peekedTagNumber == uint8(10) : // BACnetConstructedDataDatePatternValueRelinquishDefault _childTemp, typeSwitchError = BACnetConstructedDataDatePatternValueRelinquishDefaultParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_DATETIME_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT: // BACnetConstructedDataDateTimeValueRelinquishDefault +case objectTypeArgument == BACnetObjectType_DATETIME_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT : // BACnetConstructedDataDateTimeValueRelinquishDefault _childTemp, typeSwitchError = BACnetConstructedDataDateTimeValueRelinquishDefaultParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_DATETIMEPATTERN_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT: // BACnetConstructedDataDateTimePatternValueRelinquishDefault +case objectTypeArgument == BACnetObjectType_DATETIMEPATTERN_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT : // BACnetConstructedDataDateTimePatternValueRelinquishDefault _childTemp, typeSwitchError = BACnetConstructedDataDateTimePatternValueRelinquishDefaultParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_LARGE_ANALOG_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT && peekedTagNumber == uint8(5): // BACnetConstructedDataLargeAnalogValueRelinquishDefault +case objectTypeArgument == BACnetObjectType_LARGE_ANALOG_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT && peekedTagNumber == uint8(5) : // BACnetConstructedDataLargeAnalogValueRelinquishDefault _childTemp, typeSwitchError = BACnetConstructedDataLargeAnalogValueRelinquishDefaultParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_LIGHTING_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT && peekedTagNumber == uint8(4): // BACnetConstructedDataLightingOutputRelinquishDefault +case objectTypeArgument == BACnetObjectType_LIGHTING_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT && peekedTagNumber == uint8(4) : // BACnetConstructedDataLightingOutputRelinquishDefault _childTemp, typeSwitchError = BACnetConstructedDataLightingOutputRelinquishDefaultParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_TIMEPATTERN_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT && peekedTagNumber == uint8(11): // BACnetConstructedDataTimePatternValueRelinquishDefault +case objectTypeArgument == BACnetObjectType_TIMEPATTERN_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT && peekedTagNumber == uint8(11) : // BACnetConstructedDataTimePatternValueRelinquishDefault _childTemp, typeSwitchError = BACnetConstructedDataTimePatternValueRelinquishDefaultParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_TIME_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT && peekedTagNumber == uint8(11): // BACnetConstructedDataTimeValueRelinquishDefault +case objectTypeArgument == BACnetObjectType_TIME_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT && peekedTagNumber == uint8(11) : // BACnetConstructedDataTimeValueRelinquishDefault _childTemp, typeSwitchError = BACnetConstructedDataTimeValueRelinquishDefaultParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT && peekedTagNumber == uint8(3): // BACnetConstructedDataIntegerValueRelinquishDefault +case objectTypeArgument == BACnetObjectType_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT && peekedTagNumber == uint8(3) : // BACnetConstructedDataIntegerValueRelinquishDefault _childTemp, typeSwitchError = BACnetConstructedDataIntegerValueRelinquishDefaultParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_OCTETSTRING_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT && peekedTagNumber == uint8(6): // BACnetConstructedDataOctetStringValueRelinquishDefault +case objectTypeArgument == BACnetObjectType_OCTETSTRING_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT && peekedTagNumber == uint8(6) : // BACnetConstructedDataOctetStringValueRelinquishDefault _childTemp, typeSwitchError = BACnetConstructedDataOctetStringValueRelinquishDefaultParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_POSITIVE_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT && peekedTagNumber == uint8(2): // BACnetConstructedDataPositiveIntegerValueRelinquishDefault +case objectTypeArgument == BACnetObjectType_POSITIVE_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT && peekedTagNumber == uint8(2) : // BACnetConstructedDataPositiveIntegerValueRelinquishDefault _childTemp, typeSwitchError = BACnetConstructedDataPositiveIntegerValueRelinquishDefaultParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_MULTI_STATE_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT && peekedTagNumber == uint8(2): // BACnetConstructedDataMultiStateOutputRelinquishDefault +case objectTypeArgument == BACnetObjectType_MULTI_STATE_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT && peekedTagNumber == uint8(2) : // BACnetConstructedDataMultiStateOutputRelinquishDefault _childTemp, typeSwitchError = BACnetConstructedDataMultiStateOutputRelinquishDefaultParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_MULTI_STATE_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT && peekedTagNumber == uint8(2): // BACnetConstructedDataMultiStateValueRelinquishDefault +case objectTypeArgument == BACnetObjectType_MULTI_STATE_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT && peekedTagNumber == uint8(2) : // BACnetConstructedDataMultiStateValueRelinquishDefault _childTemp, typeSwitchError = BACnetConstructedDataMultiStateValueRelinquishDefaultParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT && peekedTagNumber == uint8(2): // BACnetConstructedDataRelinquishDefault +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_RELINQUISH_DEFAULT && peekedTagNumber == uint8(2) : // BACnetConstructedDataRelinquishDefault _childTemp, typeSwitchError = BACnetConstructedDataRelinquishDefaultParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_REPRESENTS: // BACnetConstructedDataRepresents +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_REPRESENTS : // BACnetConstructedDataRepresents _childTemp, typeSwitchError = BACnetConstructedDataRepresentsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_REQUESTED_SHED_LEVEL: // BACnetConstructedDataRequestedShedLevel +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_REQUESTED_SHED_LEVEL : // BACnetConstructedDataRequestedShedLevel _childTemp, typeSwitchError = BACnetConstructedDataRequestedShedLevelParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_REQUESTED_UPDATE_INTERVAL && peekedTagNumber == uint8(2): // BACnetConstructedDataRequestedUpdateInterval +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_REQUESTED_UPDATE_INTERVAL && peekedTagNumber == uint8(2) : // BACnetConstructedDataRequestedUpdateInterval _childTemp, typeSwitchError = BACnetConstructedDataRequestedUpdateIntervalParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_REQUIRED: // BACnetConstructedDataRequired +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_REQUIRED : // BACnetConstructedDataRequired _childTemp, typeSwitchError = BACnetConstructedDataRequiredParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_LARGE_ANALOG_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_RESOLUTION && peekedTagNumber == uint8(5): // BACnetConstructedDataLargeAnalogValueResolution +case objectTypeArgument == BACnetObjectType_LARGE_ANALOG_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_RESOLUTION && peekedTagNumber == uint8(5) : // BACnetConstructedDataLargeAnalogValueResolution _childTemp, typeSwitchError = BACnetConstructedDataLargeAnalogValueResolutionParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_RESOLUTION && peekedTagNumber == uint8(3): // BACnetConstructedDataIntegerValueResolution +case objectTypeArgument == BACnetObjectType_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_RESOLUTION && peekedTagNumber == uint8(3) : // BACnetConstructedDataIntegerValueResolution _childTemp, typeSwitchError = BACnetConstructedDataIntegerValueResolutionParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_POSITIVE_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_RESOLUTION && peekedTagNumber == uint8(2): // BACnetConstructedDataPositiveIntegerValueResolution +case objectTypeArgument == BACnetObjectType_POSITIVE_INTEGER_VALUE && propertyIdentifierArgument == BACnetPropertyIdentifier_RESOLUTION && peekedTagNumber == uint8(2) : // BACnetConstructedDataPositiveIntegerValueResolution _childTemp, typeSwitchError = BACnetConstructedDataPositiveIntegerValueResolutionParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_TIMER && propertyIdentifierArgument == BACnetPropertyIdentifier_RESOLUTION && peekedTagNumber == uint8(2): // BACnetConstructedDataTimerResolution +case objectTypeArgument == BACnetObjectType_TIMER && propertyIdentifierArgument == BACnetPropertyIdentifier_RESOLUTION && peekedTagNumber == uint8(2) : // BACnetConstructedDataTimerResolution _childTemp, typeSwitchError = BACnetConstructedDataTimerResolutionParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_RESOLUTION && peekedTagNumber == uint8(4): // BACnetConstructedDataResolution +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_RESOLUTION && peekedTagNumber == uint8(4) : // BACnetConstructedDataResolution _childTemp, typeSwitchError = BACnetConstructedDataResolutionParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_RESTART_NOTIFICATION_RECIPIENTS: // BACnetConstructedDataRestartNotificationRecipients +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_RESTART_NOTIFICATION_RECIPIENTS : // BACnetConstructedDataRestartNotificationRecipients _childTemp, typeSwitchError = BACnetConstructedDataRestartNotificationRecipientsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_RESTORE_COMPLETION_TIME && peekedTagNumber == uint8(2): // BACnetConstructedDataRestoreCompletionTime +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_RESTORE_COMPLETION_TIME && peekedTagNumber == uint8(2) : // BACnetConstructedDataRestoreCompletionTime _childTemp, typeSwitchError = BACnetConstructedDataRestoreCompletionTimeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_RESTORE_PREPARATION_TIME && peekedTagNumber == uint8(2): // BACnetConstructedDataRestorePreparationTime +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_RESTORE_PREPARATION_TIME && peekedTagNumber == uint8(2) : // BACnetConstructedDataRestorePreparationTime _childTemp, typeSwitchError = BACnetConstructedDataRestorePreparationTimeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ROUTING_TABLE: // BACnetConstructedDataRoutingTable +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ROUTING_TABLE : // BACnetConstructedDataRoutingTable _childTemp, typeSwitchError = BACnetConstructedDataRoutingTableParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SCALE: // BACnetConstructedDataScale +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SCALE : // BACnetConstructedDataScale _childTemp, typeSwitchError = BACnetConstructedDataScaleParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SCALE_FACTOR && peekedTagNumber == uint8(4): // BACnetConstructedDataScaleFactor +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SCALE_FACTOR && peekedTagNumber == uint8(4) : // BACnetConstructedDataScaleFactor _childTemp, typeSwitchError = BACnetConstructedDataScaleFactorParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SCHEDULE_DEFAULT: // BACnetConstructedDataScheduleDefault +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SCHEDULE_DEFAULT : // BACnetConstructedDataScheduleDefault _childTemp, typeSwitchError = BACnetConstructedDataScheduleDefaultParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SECURED_STATUS && peekedTagNumber == uint8(9): // BACnetConstructedDataSecuredStatus +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SECURED_STATUS && peekedTagNumber == uint8(9) : // BACnetConstructedDataSecuredStatus _childTemp, typeSwitchError = BACnetConstructedDataSecuredStatusParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SECURITY_PDU_TIMEOUT && peekedTagNumber == uint8(2): // BACnetConstructedDataSecurityPDUTimeout +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SECURITY_PDU_TIMEOUT && peekedTagNumber == uint8(2) : // BACnetConstructedDataSecurityPDUTimeout _childTemp, typeSwitchError = BACnetConstructedDataSecurityPDUTimeoutParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SECURITY_TIME_WINDOW && peekedTagNumber == uint8(2): // BACnetConstructedDataSecurityTimeWindow +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SECURITY_TIME_WINDOW && peekedTagNumber == uint8(2) : // BACnetConstructedDataSecurityTimeWindow _childTemp, typeSwitchError = BACnetConstructedDataSecurityTimeWindowParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SEGMENTATION_SUPPORTED && peekedTagNumber == uint8(9): // BACnetConstructedDataSegmentationSupported +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SEGMENTATION_SUPPORTED && peekedTagNumber == uint8(9) : // BACnetConstructedDataSegmentationSupported _childTemp, typeSwitchError = BACnetConstructedDataSegmentationSupportedParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SERIAL_NUMBER && peekedTagNumber == uint8(7): // BACnetConstructedDataSerialNumber +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SERIAL_NUMBER && peekedTagNumber == uint8(7) : // BACnetConstructedDataSerialNumber _childTemp, typeSwitchError = BACnetConstructedDataSerialNumberParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SETPOINT && peekedTagNumber == uint8(4): // BACnetConstructedDataSetpoint +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SETPOINT && peekedTagNumber == uint8(4) : // BACnetConstructedDataSetpoint _childTemp, typeSwitchError = BACnetConstructedDataSetpointParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SETPOINT_REFERENCE: // BACnetConstructedDataSetpointReference +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SETPOINT_REFERENCE : // BACnetConstructedDataSetpointReference _childTemp, typeSwitchError = BACnetConstructedDataSetpointReferenceParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SETTING && peekedTagNumber == uint8(2): // BACnetConstructedDataSetting +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SETTING && peekedTagNumber == uint8(2) : // BACnetConstructedDataSetting _childTemp, typeSwitchError = BACnetConstructedDataSettingParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SHED_DURATION && peekedTagNumber == uint8(2): // BACnetConstructedDataShedDuration +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SHED_DURATION && peekedTagNumber == uint8(2) : // BACnetConstructedDataShedDuration _childTemp, typeSwitchError = BACnetConstructedDataShedDurationParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SHED_LEVEL_DESCRIPTIONS && peekedTagNumber == uint8(7): // BACnetConstructedDataShedLevelDescriptions +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SHED_LEVEL_DESCRIPTIONS && peekedTagNumber == uint8(7) : // BACnetConstructedDataShedLevelDescriptions _childTemp, typeSwitchError = BACnetConstructedDataShedLevelDescriptionsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SHED_LEVELS && peekedTagNumber == uint8(2): // BACnetConstructedDataShedLevels +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SHED_LEVELS && peekedTagNumber == uint8(2) : // BACnetConstructedDataShedLevels _childTemp, typeSwitchError = BACnetConstructedDataShedLevelsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SILENCED && peekedTagNumber == uint8(9): // BACnetConstructedDataSilenced +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SILENCED && peekedTagNumber == uint8(9) : // BACnetConstructedDataSilenced _childTemp, typeSwitchError = BACnetConstructedDataSilencedParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SLAVE_ADDRESS_BINDING: // BACnetConstructedDataSlaveAddressBinding +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SLAVE_ADDRESS_BINDING : // BACnetConstructedDataSlaveAddressBinding _childTemp, typeSwitchError = BACnetConstructedDataSlaveAddressBindingParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SLAVE_PROXY_ENABLE && peekedTagNumber == uint8(1): // BACnetConstructedDataSlaveProxyEnable +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SLAVE_PROXY_ENABLE && peekedTagNumber == uint8(1) : // BACnetConstructedDataSlaveProxyEnable _childTemp, typeSwitchError = BACnetConstructedDataSlaveProxyEnableParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_START_TIME: // BACnetConstructedDataStartTime +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_START_TIME : // BACnetConstructedDataStartTime _childTemp, typeSwitchError = BACnetConstructedDataStartTimeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_STATE_CHANGE_VALUES: // BACnetConstructedDataStateChangeValues +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_STATE_CHANGE_VALUES : // BACnetConstructedDataStateChangeValues _childTemp, typeSwitchError = BACnetConstructedDataStateChangeValuesParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_STATE_DESCRIPTION && peekedTagNumber == uint8(7): // BACnetConstructedDataStateDescription +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_STATE_DESCRIPTION && peekedTagNumber == uint8(7) : // BACnetConstructedDataStateDescription _childTemp, typeSwitchError = BACnetConstructedDataStateDescriptionParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_STATE_TEXT && peekedTagNumber == uint8(7): // BACnetConstructedDataStateText +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_STATE_TEXT && peekedTagNumber == uint8(7) : // BACnetConstructedDataStateText _childTemp, typeSwitchError = BACnetConstructedDataStateTextParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_STATUS_FLAGS && peekedTagNumber == uint8(8): // BACnetConstructedDataStatusFlags +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_STATUS_FLAGS && peekedTagNumber == uint8(8) : // BACnetConstructedDataStatusFlags _childTemp, typeSwitchError = BACnetConstructedDataStatusFlagsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_STOP_TIME: // BACnetConstructedDataStopTime +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_STOP_TIME : // BACnetConstructedDataStopTime _childTemp, typeSwitchError = BACnetConstructedDataStopTimeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_STOP_WHEN_FULL && peekedTagNumber == uint8(1): // BACnetConstructedDataStopWhenFull +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_STOP_WHEN_FULL && peekedTagNumber == uint8(1) : // BACnetConstructedDataStopWhenFull _childTemp, typeSwitchError = BACnetConstructedDataStopWhenFullParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_STRIKE_COUNT && peekedTagNumber == uint8(2): // BACnetConstructedDataStrikeCount +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_STRIKE_COUNT && peekedTagNumber == uint8(2) : // BACnetConstructedDataStrikeCount _childTemp, typeSwitchError = BACnetConstructedDataStrikeCountParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_STRUCTURED_OBJECT_LIST: // BACnetConstructedDataStructuredObjectList +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_STRUCTURED_OBJECT_LIST : // BACnetConstructedDataStructuredObjectList _childTemp, typeSwitchError = BACnetConstructedDataStructuredObjectListParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SUBORDINATE_ANNOTATIONS: // BACnetConstructedDataSubordinateAnnotations +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SUBORDINATE_ANNOTATIONS : // BACnetConstructedDataSubordinateAnnotations _childTemp, typeSwitchError = BACnetConstructedDataSubordinateAnnotationsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SUBORDINATE_LIST: // BACnetConstructedDataSubordinateList +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SUBORDINATE_LIST : // BACnetConstructedDataSubordinateList _childTemp, typeSwitchError = BACnetConstructedDataSubordinateListParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SUBORDINATE_NODE_TYPES && peekedTagNumber == uint8(9): // BACnetConstructedDataSubordinateNodeTypes +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SUBORDINATE_NODE_TYPES && peekedTagNumber == uint8(9) : // BACnetConstructedDataSubordinateNodeTypes _childTemp, typeSwitchError = BACnetConstructedDataSubordinateNodeTypesParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SUBORDINATE_RELATIONSHIPS && peekedTagNumber == uint8(9): // BACnetConstructedDataSubordinateRelationships +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SUBORDINATE_RELATIONSHIPS && peekedTagNumber == uint8(9) : // BACnetConstructedDataSubordinateRelationships _childTemp, typeSwitchError = BACnetConstructedDataSubordinateRelationshipsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SUBORDINATE_TAGS: // BACnetConstructedDataSubordinateTags +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SUBORDINATE_TAGS : // BACnetConstructedDataSubordinateTags _childTemp, typeSwitchError = BACnetConstructedDataSubordinateTagsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SUBSCRIBED_RECIPIENTS: // BACnetConstructedDataSubscribedRecipients +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SUBSCRIBED_RECIPIENTS : // BACnetConstructedDataSubscribedRecipients _childTemp, typeSwitchError = BACnetConstructedDataSubscribedRecipientsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SUPPORTED_FORMAT_CLASSES: // BACnetConstructedDataSupportedFormatClasses +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SUPPORTED_FORMAT_CLASSES : // BACnetConstructedDataSupportedFormatClasses _childTemp, typeSwitchError = BACnetConstructedDataSupportedFormatClassesParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SUPPORTED_FORMATS: // BACnetConstructedDataSupportedFormats +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SUPPORTED_FORMATS : // BACnetConstructedDataSupportedFormats _childTemp, typeSwitchError = BACnetConstructedDataSupportedFormatsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SUPPORTED_SECURITY_ALGORITHMS: // BACnetConstructedDataSupportedSecurityAlgorithms +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SUPPORTED_SECURITY_ALGORITHMS : // BACnetConstructedDataSupportedSecurityAlgorithms _childTemp, typeSwitchError = BACnetConstructedDataSupportedSecurityAlgorithmsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SYSTEM_STATUS && peekedTagNumber == uint8(9): // BACnetConstructedDataSystemStatus +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_SYSTEM_STATUS && peekedTagNumber == uint8(9) : // BACnetConstructedDataSystemStatus _childTemp, typeSwitchError = BACnetConstructedDataSystemStatusParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_TAGS: // BACnetConstructedDataTags +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_TAGS : // BACnetConstructedDataTags _childTemp, typeSwitchError = BACnetConstructedDataTagsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_THREAT_AUTHORITY: // BACnetConstructedDataThreatAuthority +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_THREAT_AUTHORITY : // BACnetConstructedDataThreatAuthority _childTemp, typeSwitchError = BACnetConstructedDataThreatAuthorityParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_THREAT_LEVEL: // BACnetConstructedDataThreatLevel +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_THREAT_LEVEL : // BACnetConstructedDataThreatLevel _childTemp, typeSwitchError = BACnetConstructedDataThreatLevelParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_TIME_DELAY && peekedTagNumber == uint8(2): // BACnetConstructedDataTimeDelay +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_TIME_DELAY && peekedTagNumber == uint8(2) : // BACnetConstructedDataTimeDelay _childTemp, typeSwitchError = BACnetConstructedDataTimeDelayParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_TIME_DELAY_NORMAL && peekedTagNumber == uint8(2): // BACnetConstructedDataTimeDelayNormal +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_TIME_DELAY_NORMAL && peekedTagNumber == uint8(2) : // BACnetConstructedDataTimeDelayNormal _childTemp, typeSwitchError = BACnetConstructedDataTimeDelayNormalParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_TIME_OF_ACTIVE_TIME_RESET: // BACnetConstructedDataTimeOfActiveTimeReset +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_TIME_OF_ACTIVE_TIME_RESET : // BACnetConstructedDataTimeOfActiveTimeReset _childTemp, typeSwitchError = BACnetConstructedDataTimeOfActiveTimeResetParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_TIME_OF_DEVICE_RESTART: // BACnetConstructedDataTimeOfDeviceRestart +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_TIME_OF_DEVICE_RESTART : // BACnetConstructedDataTimeOfDeviceRestart _childTemp, typeSwitchError = BACnetConstructedDataTimeOfDeviceRestartParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_TIME_OF_STATE_COUNT_RESET: // BACnetConstructedDataTimeOfStateCountReset +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_TIME_OF_STATE_COUNT_RESET : // BACnetConstructedDataTimeOfStateCountReset _childTemp, typeSwitchError = BACnetConstructedDataTimeOfStateCountResetParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_TIME_OF_STRIKE_COUNT_RESET: // BACnetConstructedDataTimeOfStrikeCountReset +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_TIME_OF_STRIKE_COUNT_RESET : // BACnetConstructedDataTimeOfStrikeCountReset _childTemp, typeSwitchError = BACnetConstructedDataTimeOfStrikeCountResetParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_TIME_SYNCHRONIZATION_INTERVAL && peekedTagNumber == uint8(2): // BACnetConstructedDataTimeSynchronizationInterval +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_TIME_SYNCHRONIZATION_INTERVAL && peekedTagNumber == uint8(2) : // BACnetConstructedDataTimeSynchronizationInterval _childTemp, typeSwitchError = BACnetConstructedDataTimeSynchronizationIntervalParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_TIME_SYNCHRONIZATION_RECIPIENTS: // BACnetConstructedDataTimeSynchronizationRecipients +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_TIME_SYNCHRONIZATION_RECIPIENTS : // BACnetConstructedDataTimeSynchronizationRecipients _childTemp, typeSwitchError = BACnetConstructedDataTimeSynchronizationRecipientsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_TIMER_RUNNING && peekedTagNumber == uint8(1): // BACnetConstructedDataTimerRunning +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_TIMER_RUNNING && peekedTagNumber == uint8(1) : // BACnetConstructedDataTimerRunning _childTemp, typeSwitchError = BACnetConstructedDataTimerRunningParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_TIMER_STATE && peekedTagNumber == uint8(9): // BACnetConstructedDataTimerState +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_TIMER_STATE && peekedTagNumber == uint8(9) : // BACnetConstructedDataTimerState _childTemp, typeSwitchError = BACnetConstructedDataTimerStateParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_TOTAL_RECORD_COUNT && peekedTagNumber == uint8(2): // BACnetConstructedDataTotalRecordCount +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_TOTAL_RECORD_COUNT && peekedTagNumber == uint8(2) : // BACnetConstructedDataTotalRecordCount _childTemp, typeSwitchError = BACnetConstructedDataTotalRecordCountParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_TRACE_FLAG && peekedTagNumber == uint8(1): // BACnetConstructedDataTraceFlag +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_TRACE_FLAG && peekedTagNumber == uint8(1) : // BACnetConstructedDataTraceFlag _childTemp, typeSwitchError = BACnetConstructedDataTraceFlagParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_LIGHTING_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_TRACKING_VALUE && peekedTagNumber == uint8(4): // BACnetConstructedDataLightingOutputTrackingValue +case objectTypeArgument == BACnetObjectType_LIGHTING_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_TRACKING_VALUE && peekedTagNumber == uint8(4) : // BACnetConstructedDataLightingOutputTrackingValue _childTemp, typeSwitchError = BACnetConstructedDataLightingOutputTrackingValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_LIGHTING_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_TRACKING_VALUE && peekedTagNumber == uint8(4): // BACnetConstructedDataLightingOutputTrackingValue +case objectTypeArgument == BACnetObjectType_LIGHTING_OUTPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_TRACKING_VALUE && peekedTagNumber == uint8(4) : // BACnetConstructedDataLightingOutputTrackingValue _childTemp, typeSwitchError = BACnetConstructedDataLightingOutputTrackingValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_TRACKING_VALUE && peekedTagNumber == uint8(9): // BACnetConstructedDataTrackingValue +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_TRACKING_VALUE && peekedTagNumber == uint8(9) : // BACnetConstructedDataTrackingValue _childTemp, typeSwitchError = BACnetConstructedDataTrackingValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_TRANSACTION_NOTIFICATION_CLASS && peekedTagNumber == uint8(2): // BACnetConstructedDataTransactionNotificationClass +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_TRANSACTION_NOTIFICATION_CLASS && peekedTagNumber == uint8(2) : // BACnetConstructedDataTransactionNotificationClass _childTemp, typeSwitchError = BACnetConstructedDataTransactionNotificationClassParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_TRANSITION && peekedTagNumber == uint8(9): // BACnetConstructedDataTransition +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_TRANSITION && peekedTagNumber == uint8(9) : // BACnetConstructedDataTransition _childTemp, typeSwitchError = BACnetConstructedDataTransitionParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_TRIGGER && peekedTagNumber == uint8(1): // BACnetConstructedDataTrigger +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_TRIGGER && peekedTagNumber == uint8(1) : // BACnetConstructedDataTrigger _childTemp, typeSwitchError = BACnetConstructedDataTriggerParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_UNITS && peekedTagNumber == uint8(9): // BACnetConstructedDataUnits +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_UNITS && peekedTagNumber == uint8(9) : // BACnetConstructedDataUnits _childTemp, typeSwitchError = BACnetConstructedDataUnitsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_UPDATE_INTERVAL && peekedTagNumber == uint8(2): // BACnetConstructedDataUpdateInterval +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_UPDATE_INTERVAL && peekedTagNumber == uint8(2) : // BACnetConstructedDataUpdateInterval _childTemp, typeSwitchError = BACnetConstructedDataUpdateIntervalParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_UPDATE_KEY_SET_TIMEOUT && peekedTagNumber == uint8(2): // BACnetConstructedDataUpdateKeySetTimeout +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_UPDATE_KEY_SET_TIMEOUT && peekedTagNumber == uint8(2) : // BACnetConstructedDataUpdateKeySetTimeout _childTemp, typeSwitchError = BACnetConstructedDataUpdateKeySetTimeoutParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case objectTypeArgument == BACnetObjectType_CREDENTIAL_DATA_INPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_UPDATE_TIME: // BACnetConstructedDataCredentialDataInputUpdateTime +case objectTypeArgument == BACnetObjectType_CREDENTIAL_DATA_INPUT && propertyIdentifierArgument == BACnetPropertyIdentifier_UPDATE_TIME : // BACnetConstructedDataCredentialDataInputUpdateTime _childTemp, typeSwitchError = BACnetConstructedDataCredentialDataInputUpdateTimeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_UPDATE_TIME: // BACnetConstructedDataUpdateTime +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_UPDATE_TIME : // BACnetConstructedDataUpdateTime _childTemp, typeSwitchError = BACnetConstructedDataUpdateTimeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_USER_EXTERNAL_IDENTIFIER && peekedTagNumber == uint8(7): // BACnetConstructedDataUserExternalIdentifier +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_USER_EXTERNAL_IDENTIFIER && peekedTagNumber == uint8(7) : // BACnetConstructedDataUserExternalIdentifier _childTemp, typeSwitchError = BACnetConstructedDataUserExternalIdentifierParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_USER_INFORMATION_REFERENCE && peekedTagNumber == uint8(7): // BACnetConstructedDataUserInformationReference +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_USER_INFORMATION_REFERENCE && peekedTagNumber == uint8(7) : // BACnetConstructedDataUserInformationReference _childTemp, typeSwitchError = BACnetConstructedDataUserInformationReferenceParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_USER_NAME && peekedTagNumber == uint8(7): // BACnetConstructedDataUserName +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_USER_NAME && peekedTagNumber == uint8(7) : // BACnetConstructedDataUserName _childTemp, typeSwitchError = BACnetConstructedDataUserNameParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_USER_TYPE && peekedTagNumber == uint8(9): // BACnetConstructedDataUserType +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_USER_TYPE && peekedTagNumber == uint8(9) : // BACnetConstructedDataUserType _childTemp, typeSwitchError = BACnetConstructedDataUserTypeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_USES_REMAINING && peekedTagNumber == uint8(3): // BACnetConstructedDataUsesRemaining +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_USES_REMAINING && peekedTagNumber == uint8(3) : // BACnetConstructedDataUsesRemaining _childTemp, typeSwitchError = BACnetConstructedDataUsesRemainingParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_UTC_OFFSET && peekedTagNumber == uint8(3): // BACnetConstructedDataUTCOffset +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_UTC_OFFSET && peekedTagNumber == uint8(3) : // BACnetConstructedDataUTCOffset _childTemp, typeSwitchError = BACnetConstructedDataUTCOffsetParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_UTC_TIME_SYNCHRONIZATION_RECIPIENTS: // BACnetConstructedDataUTCTimeSynchronizationRecipients +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_UTC_TIME_SYNCHRONIZATION_RECIPIENTS : // BACnetConstructedDataUTCTimeSynchronizationRecipients _childTemp, typeSwitchError = BACnetConstructedDataUTCTimeSynchronizationRecipientsParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_VALID_SAMPLES && peekedTagNumber == uint8(2): // BACnetConstructedDataValidSamples +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_VALID_SAMPLES && peekedTagNumber == uint8(2) : // BACnetConstructedDataValidSamples _childTemp, typeSwitchError = BACnetConstructedDataValidSamplesParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_VALUE_BEFORE_CHANGE && peekedTagNumber == uint8(2): // BACnetConstructedDataValueBeforeChange +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_VALUE_BEFORE_CHANGE && peekedTagNumber == uint8(2) : // BACnetConstructedDataValueBeforeChange _childTemp, typeSwitchError = BACnetConstructedDataValueBeforeChangeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_VALUE_CHANGE_TIME: // BACnetConstructedDataValueChangeTime +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_VALUE_CHANGE_TIME : // BACnetConstructedDataValueChangeTime _childTemp, typeSwitchError = BACnetConstructedDataValueChangeTimeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_VALUE_SET && peekedTagNumber == uint8(2): // BACnetConstructedDataValueSet +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_VALUE_SET && peekedTagNumber == uint8(2) : // BACnetConstructedDataValueSet _childTemp, typeSwitchError = BACnetConstructedDataValueSetParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_VALUE_SOURCE: // BACnetConstructedDataValueSource +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_VALUE_SOURCE : // BACnetConstructedDataValueSource _childTemp, typeSwitchError = BACnetConstructedDataValueSourceParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_VALUE_SOURCE_ARRAY: // BACnetConstructedDataValueSourceArray +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_VALUE_SOURCE_ARRAY : // BACnetConstructedDataValueSourceArray _childTemp, typeSwitchError = BACnetConstructedDataValueSourceArrayParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_VARIANCE_VALUE && peekedTagNumber == uint8(4): // BACnetConstructedDataVarianceValue +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_VARIANCE_VALUE && peekedTagNumber == uint8(4) : // BACnetConstructedDataVarianceValue _childTemp, typeSwitchError = BACnetConstructedDataVarianceValueParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_VENDOR_IDENTIFIER && peekedTagNumber == uint8(2): // BACnetConstructedDataVendorIdentifier +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_VENDOR_IDENTIFIER && peekedTagNumber == uint8(2) : // BACnetConstructedDataVendorIdentifier _childTemp, typeSwitchError = BACnetConstructedDataVendorIdentifierParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_VENDOR_NAME && peekedTagNumber == uint8(7): // BACnetConstructedDataVendorName +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_VENDOR_NAME && peekedTagNumber == uint8(7) : // BACnetConstructedDataVendorName _childTemp, typeSwitchError = BACnetConstructedDataVendorNameParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_VERIFICATION_TIME && peekedTagNumber == uint8(3): // BACnetConstructedDataVerificationTime +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_VERIFICATION_TIME && peekedTagNumber == uint8(3) : // BACnetConstructedDataVerificationTime _childTemp, typeSwitchError = BACnetConstructedDataVerificationTimeParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_VIRTUAL_MAC_ADDRESS_TABLE: // BACnetConstructedDataVirtualMACAddressTable +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_VIRTUAL_MAC_ADDRESS_TABLE : // BACnetConstructedDataVirtualMACAddressTable _childTemp, typeSwitchError = BACnetConstructedDataVirtualMACAddressTableParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_VT_CLASSES_SUPPORTED && peekedTagNumber == uint8(9): // BACnetConstructedDataVTClassesSupported +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_VT_CLASSES_SUPPORTED && peekedTagNumber == uint8(9) : // BACnetConstructedDataVTClassesSupported _childTemp, typeSwitchError = BACnetConstructedDataVTClassesSupportedParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_WEEKLY_SCHEDULE: // BACnetConstructedDataWeeklySchedule +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_WEEKLY_SCHEDULE : // BACnetConstructedDataWeeklySchedule _childTemp, typeSwitchError = BACnetConstructedDataWeeklyScheduleParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_WINDOW_INTERVAL && peekedTagNumber == uint8(2): // BACnetConstructedDataWindowInterval +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_WINDOW_INTERVAL && peekedTagNumber == uint8(2) : // BACnetConstructedDataWindowInterval _childTemp, typeSwitchError = BACnetConstructedDataWindowIntervalParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_WINDOW_SAMPLES && peekedTagNumber == uint8(2): // BACnetConstructedDataWindowSamples +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_WINDOW_SAMPLES && peekedTagNumber == uint8(2) : // BACnetConstructedDataWindowSamples _childTemp, typeSwitchError = BACnetConstructedDataWindowSamplesParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_WRITE_STATUS && peekedTagNumber == uint8(9): // BACnetConstructedDataWriteStatus +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_WRITE_STATUS && peekedTagNumber == uint8(9) : // BACnetConstructedDataWriteStatus _childTemp, typeSwitchError = BACnetConstructedDataWriteStatusParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ZONE_FROM: // BACnetConstructedDataZoneFrom +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ZONE_FROM : // BACnetConstructedDataZoneFrom _childTemp, typeSwitchError = BACnetConstructedDataZoneFromParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ZONE_MEMBERS: // BACnetConstructedDataZoneMembers +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ZONE_MEMBERS : // BACnetConstructedDataZoneMembers _childTemp, typeSwitchError = BACnetConstructedDataZoneMembersParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ZONE_TO: // BACnetConstructedDataZoneTo +case 0==0 && propertyIdentifierArgument == BACnetPropertyIdentifier_ZONE_TO : // BACnetConstructedDataZoneTo _childTemp, typeSwitchError = BACnetConstructedDataZoneToParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) - case 0 == 0: // BACnetConstructedDataUnspecified +case 0==0 : // BACnetConstructedDataUnspecified _childTemp, typeSwitchError = BACnetConstructedDataUnspecifiedParseWithBuffer(ctx, readBuffer, tagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [objectTypeArgument=%v, propertyIdentifierArgument=%v, peekedTagNumber=%v]", objectTypeArgument, propertyIdentifierArgument, peekedTagNumber) @@ -1537,7 +1541,7 @@ func BACnetConstructedDataParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetConstructedData") } @@ -1551,7 +1555,7 @@ func BACnetConstructedDataParseWithBuffer(ctx context.Context, readBuffer utils. } // Finish initializing - _child.InitializeParent(_child, openingTag, peekedTagHeader, closingTag) +_child.InitializeParent(_child , openingTag , peekedTagHeader , closingTag ) return _child, nil } @@ -1561,7 +1565,7 @@ func (pm *_BACnetConstructedData) SerializeParent(ctx context.Context, writeBuff _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetConstructedData"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetConstructedData"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedData") } @@ -1604,6 +1608,7 @@ func (pm *_BACnetConstructedData) SerializeParent(ctx context.Context, writeBuff return nil } + //// // Arguments Getter @@ -1613,7 +1618,6 @@ func (m *_BACnetConstructedData) GetTagNumber() uint8 { func (m *_BACnetConstructedData) GetArrayIndexArgument() BACnetTagPayloadUnsignedInteger { return m.ArrayIndexArgument } - // //// @@ -1631,3 +1635,6 @@ func (m *_BACnetConstructedData) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAPDULength.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAPDULength.go index bd68b994b5a..b80e06da539 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAPDULength.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAPDULength.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAPDULength is the corresponding interface of BACnetConstructedDataAPDULength type BACnetConstructedDataAPDULength interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAPDULengthExactly interface { // _BACnetConstructedDataAPDULength is the data-structure of this message type _BACnetConstructedDataAPDULength struct { *_BACnetConstructedData - ApduLength BACnetApplicationTagUnsignedInteger + ApduLength BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAPDULength) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataAPDULength) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataAPDULength) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_APDU_LENGTH -} +func (m *_BACnetConstructedDataAPDULength) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_APDU_LENGTH} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAPDULength) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAPDULength) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAPDULength) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAPDULength) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAPDULength) GetActualValue() BACnetApplicationTag /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAPDULength factory function for _BACnetConstructedDataAPDULength -func NewBACnetConstructedDataAPDULength(apduLength BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAPDULength { +func NewBACnetConstructedDataAPDULength( apduLength BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAPDULength { _result := &_BACnetConstructedDataAPDULength{ - ApduLength: apduLength, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ApduLength: apduLength, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAPDULength(apduLength BACnetApplicationTagUnsignedI // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAPDULength(structType interface{}) BACnetConstructedDataAPDULength { - if casted, ok := structType.(BACnetConstructedDataAPDULength); ok { + if casted, ok := structType.(BACnetConstructedDataAPDULength); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAPDULength); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAPDULength) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataAPDULength) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAPDULengthParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("apduLength"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for apduLength") } - _apduLength, _apduLengthErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_apduLength, _apduLengthErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _apduLengthErr != nil { return nil, errors.Wrap(_apduLengthErr, "Error parsing 'apduLength' field of BACnetConstructedDataAPDULength") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAPDULengthParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetConstructedDataAPDULength{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ApduLength: apduLength, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAPDULength) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAPDULength") } - // Simple Field (apduLength) - if pushErr := writeBuffer.PushContext("apduLength"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for apduLength") - } - _apduLengthErr := writeBuffer.WriteSerializable(ctx, m.GetApduLength()) - if popErr := writeBuffer.PopContext("apduLength"); popErr != nil { - return errors.Wrap(popErr, "Error popping for apduLength") - } - if _apduLengthErr != nil { - return errors.Wrap(_apduLengthErr, "Error serializing 'apduLength' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (apduLength) + if pushErr := writeBuffer.PushContext("apduLength"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for apduLength") + } + _apduLengthErr := writeBuffer.WriteSerializable(ctx, m.GetApduLength()) + if popErr := writeBuffer.PopContext("apduLength"); popErr != nil { + return errors.Wrap(popErr, "Error popping for apduLength") + } + if _apduLengthErr != nil { + return errors.Wrap(_apduLengthErr, "Error serializing 'apduLength' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAPDULength"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAPDULength") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAPDULength) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAPDULength) isBACnetConstructedDataAPDULength() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAPDULength) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAPDUSegmentTimeout.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAPDUSegmentTimeout.go index 2a1df3326ad..c7475dd045f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAPDUSegmentTimeout.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAPDUSegmentTimeout.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAPDUSegmentTimeout is the corresponding interface of BACnetConstructedDataAPDUSegmentTimeout type BACnetConstructedDataAPDUSegmentTimeout interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAPDUSegmentTimeoutExactly interface { // _BACnetConstructedDataAPDUSegmentTimeout is the data-structure of this message type _BACnetConstructedDataAPDUSegmentTimeout struct { *_BACnetConstructedData - ApduSegmentTimeout BACnetApplicationTagUnsignedInteger + ApduSegmentTimeout BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAPDUSegmentTimeout) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataAPDUSegmentTimeout) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataAPDUSegmentTimeout) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_APDU_SEGMENT_TIMEOUT -} +func (m *_BACnetConstructedDataAPDUSegmentTimeout) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_APDU_SEGMENT_TIMEOUT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAPDUSegmentTimeout) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAPDUSegmentTimeout) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAPDUSegmentTimeout) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAPDUSegmentTimeout) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAPDUSegmentTimeout) GetActualValue() BACnetApplic /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAPDUSegmentTimeout factory function for _BACnetConstructedDataAPDUSegmentTimeout -func NewBACnetConstructedDataAPDUSegmentTimeout(apduSegmentTimeout BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAPDUSegmentTimeout { +func NewBACnetConstructedDataAPDUSegmentTimeout( apduSegmentTimeout BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAPDUSegmentTimeout { _result := &_BACnetConstructedDataAPDUSegmentTimeout{ - ApduSegmentTimeout: apduSegmentTimeout, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ApduSegmentTimeout: apduSegmentTimeout, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAPDUSegmentTimeout(apduSegmentTimeout BACnetApplica // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAPDUSegmentTimeout(structType interface{}) BACnetConstructedDataAPDUSegmentTimeout { - if casted, ok := structType.(BACnetConstructedDataAPDUSegmentTimeout); ok { + if casted, ok := structType.(BACnetConstructedDataAPDUSegmentTimeout); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAPDUSegmentTimeout); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAPDUSegmentTimeout) GetLengthInBits(ctx context.C return lengthInBits } + func (m *_BACnetConstructedDataAPDUSegmentTimeout) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAPDUSegmentTimeoutParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("apduSegmentTimeout"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for apduSegmentTimeout") } - _apduSegmentTimeout, _apduSegmentTimeoutErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_apduSegmentTimeout, _apduSegmentTimeoutErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _apduSegmentTimeoutErr != nil { return nil, errors.Wrap(_apduSegmentTimeoutErr, "Error parsing 'apduSegmentTimeout' field of BACnetConstructedDataAPDUSegmentTimeout") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAPDUSegmentTimeoutParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataAPDUSegmentTimeout{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ApduSegmentTimeout: apduSegmentTimeout, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAPDUSegmentTimeout) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAPDUSegmentTimeout") } - // Simple Field (apduSegmentTimeout) - if pushErr := writeBuffer.PushContext("apduSegmentTimeout"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for apduSegmentTimeout") - } - _apduSegmentTimeoutErr := writeBuffer.WriteSerializable(ctx, m.GetApduSegmentTimeout()) - if popErr := writeBuffer.PopContext("apduSegmentTimeout"); popErr != nil { - return errors.Wrap(popErr, "Error popping for apduSegmentTimeout") - } - if _apduSegmentTimeoutErr != nil { - return errors.Wrap(_apduSegmentTimeoutErr, "Error serializing 'apduSegmentTimeout' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (apduSegmentTimeout) + if pushErr := writeBuffer.PushContext("apduSegmentTimeout"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for apduSegmentTimeout") + } + _apduSegmentTimeoutErr := writeBuffer.WriteSerializable(ctx, m.GetApduSegmentTimeout()) + if popErr := writeBuffer.PopContext("apduSegmentTimeout"); popErr != nil { + return errors.Wrap(popErr, "Error popping for apduSegmentTimeout") + } + if _apduSegmentTimeoutErr != nil { + return errors.Wrap(_apduSegmentTimeoutErr, "Error serializing 'apduSegmentTimeout' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAPDUSegmentTimeout"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAPDUSegmentTimeout") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAPDUSegmentTimeout) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAPDUSegmentTimeout) isBACnetConstructedDataAPDUSegmentTimeout() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAPDUSegmentTimeout) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAPDUTimeout.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAPDUTimeout.go index 3a2e248a8dd..0cb1a8e0d86 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAPDUTimeout.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAPDUTimeout.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAPDUTimeout is the corresponding interface of BACnetConstructedDataAPDUTimeout type BACnetConstructedDataAPDUTimeout interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAPDUTimeoutExactly interface { // _BACnetConstructedDataAPDUTimeout is the data-structure of this message type _BACnetConstructedDataAPDUTimeout struct { *_BACnetConstructedData - ApduTimeout BACnetApplicationTagUnsignedInteger + ApduTimeout BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAPDUTimeout) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataAPDUTimeout) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataAPDUTimeout) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_APDU_TIMEOUT -} +func (m *_BACnetConstructedDataAPDUTimeout) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_APDU_TIMEOUT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAPDUTimeout) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAPDUTimeout) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAPDUTimeout) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAPDUTimeout) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAPDUTimeout) GetActualValue() BACnetApplicationTa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAPDUTimeout factory function for _BACnetConstructedDataAPDUTimeout -func NewBACnetConstructedDataAPDUTimeout(apduTimeout BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAPDUTimeout { +func NewBACnetConstructedDataAPDUTimeout( apduTimeout BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAPDUTimeout { _result := &_BACnetConstructedDataAPDUTimeout{ - ApduTimeout: apduTimeout, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ApduTimeout: apduTimeout, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAPDUTimeout(apduTimeout BACnetApplicationTagUnsigne // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAPDUTimeout(structType interface{}) BACnetConstructedDataAPDUTimeout { - if casted, ok := structType.(BACnetConstructedDataAPDUTimeout); ok { + if casted, ok := structType.(BACnetConstructedDataAPDUTimeout); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAPDUTimeout); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAPDUTimeout) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataAPDUTimeout) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAPDUTimeoutParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("apduTimeout"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for apduTimeout") } - _apduTimeout, _apduTimeoutErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_apduTimeout, _apduTimeoutErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _apduTimeoutErr != nil { return nil, errors.Wrap(_apduTimeoutErr, "Error parsing 'apduTimeout' field of BACnetConstructedDataAPDUTimeout") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAPDUTimeoutParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataAPDUTimeout{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ApduTimeout: apduTimeout, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAPDUTimeout) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAPDUTimeout") } - // Simple Field (apduTimeout) - if pushErr := writeBuffer.PushContext("apduTimeout"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for apduTimeout") - } - _apduTimeoutErr := writeBuffer.WriteSerializable(ctx, m.GetApduTimeout()) - if popErr := writeBuffer.PopContext("apduTimeout"); popErr != nil { - return errors.Wrap(popErr, "Error popping for apduTimeout") - } - if _apduTimeoutErr != nil { - return errors.Wrap(_apduTimeoutErr, "Error serializing 'apduTimeout' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (apduTimeout) + if pushErr := writeBuffer.PushContext("apduTimeout"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for apduTimeout") + } + _apduTimeoutErr := writeBuffer.WriteSerializable(ctx, m.GetApduTimeout()) + if popErr := writeBuffer.PopContext("apduTimeout"); popErr != nil { + return errors.Wrap(popErr, "Error popping for apduTimeout") + } + if _apduTimeoutErr != nil { + return errors.Wrap(_apduTimeoutErr, "Error serializing 'apduTimeout' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAPDUTimeout"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAPDUTimeout") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAPDUTimeout) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAPDUTimeout) isBACnetConstructedDataAPDUTimeout() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAPDUTimeout) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAbsenteeLimit.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAbsenteeLimit.go index 0743e13db22..630f8eab761 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAbsenteeLimit.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAbsenteeLimit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAbsenteeLimit is the corresponding interface of BACnetConstructedDataAbsenteeLimit type BACnetConstructedDataAbsenteeLimit interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAbsenteeLimitExactly interface { // _BACnetConstructedDataAbsenteeLimit is the data-structure of this message type _BACnetConstructedDataAbsenteeLimit struct { *_BACnetConstructedData - AbsenteeLimit BACnetApplicationTagUnsignedInteger + AbsenteeLimit BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAbsenteeLimit) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataAbsenteeLimit) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataAbsenteeLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ABSENTEE_LIMIT -} +func (m *_BACnetConstructedDataAbsenteeLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ABSENTEE_LIMIT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAbsenteeLimit) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAbsenteeLimit) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAbsenteeLimit) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAbsenteeLimit) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAbsenteeLimit) GetActualValue() BACnetApplication /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAbsenteeLimit factory function for _BACnetConstructedDataAbsenteeLimit -func NewBACnetConstructedDataAbsenteeLimit(absenteeLimit BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAbsenteeLimit { +func NewBACnetConstructedDataAbsenteeLimit( absenteeLimit BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAbsenteeLimit { _result := &_BACnetConstructedDataAbsenteeLimit{ - AbsenteeLimit: absenteeLimit, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + AbsenteeLimit: absenteeLimit, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAbsenteeLimit(absenteeLimit BACnetApplicationTagUns // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAbsenteeLimit(structType interface{}) BACnetConstructedDataAbsenteeLimit { - if casted, ok := structType.(BACnetConstructedDataAbsenteeLimit); ok { + if casted, ok := structType.(BACnetConstructedDataAbsenteeLimit); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAbsenteeLimit); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAbsenteeLimit) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetConstructedDataAbsenteeLimit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAbsenteeLimitParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("absenteeLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for absenteeLimit") } - _absenteeLimit, _absenteeLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_absenteeLimit, _absenteeLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _absenteeLimitErr != nil { return nil, errors.Wrap(_absenteeLimitErr, "Error parsing 'absenteeLimit' field of BACnetConstructedDataAbsenteeLimit") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAbsenteeLimitParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetConstructedDataAbsenteeLimit{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, AbsenteeLimit: absenteeLimit, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAbsenteeLimit) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAbsenteeLimit") } - // Simple Field (absenteeLimit) - if pushErr := writeBuffer.PushContext("absenteeLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for absenteeLimit") - } - _absenteeLimitErr := writeBuffer.WriteSerializable(ctx, m.GetAbsenteeLimit()) - if popErr := writeBuffer.PopContext("absenteeLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for absenteeLimit") - } - if _absenteeLimitErr != nil { - return errors.Wrap(_absenteeLimitErr, "Error serializing 'absenteeLimit' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (absenteeLimit) + if pushErr := writeBuffer.PushContext("absenteeLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for absenteeLimit") + } + _absenteeLimitErr := writeBuffer.WriteSerializable(ctx, m.GetAbsenteeLimit()) + if popErr := writeBuffer.PopContext("absenteeLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for absenteeLimit") + } + if _absenteeLimitErr != nil { + return errors.Wrap(_absenteeLimitErr, "Error serializing 'absenteeLimit' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAbsenteeLimit"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAbsenteeLimit") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAbsenteeLimit) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAbsenteeLimit) isBACnetConstructedDataAbsenteeLimit() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAbsenteeLimit) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAcceptedModes.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAcceptedModes.go index 6c56d6bddb3..808069d1e89 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAcceptedModes.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAcceptedModes.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAcceptedModes is the corresponding interface of BACnetConstructedDataAcceptedModes type BACnetConstructedDataAcceptedModes interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataAcceptedModesExactly interface { // _BACnetConstructedDataAcceptedModes is the data-structure of this message type _BACnetConstructedDataAcceptedModes struct { *_BACnetConstructedData - AcceptedModes []BACnetLifeSafetyModeTagged + AcceptedModes []BACnetLifeSafetyModeTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAcceptedModes) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataAcceptedModes) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataAcceptedModes) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ACCEPTED_MODES -} +func (m *_BACnetConstructedDataAcceptedModes) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ACCEPTED_MODES} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAcceptedModes) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAcceptedModes) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAcceptedModes) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAcceptedModes) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataAcceptedModes) GetAcceptedModes() []BACnetLifeSaf /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAcceptedModes factory function for _BACnetConstructedDataAcceptedModes -func NewBACnetConstructedDataAcceptedModes(acceptedModes []BACnetLifeSafetyModeTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAcceptedModes { +func NewBACnetConstructedDataAcceptedModes( acceptedModes []BACnetLifeSafetyModeTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAcceptedModes { _result := &_BACnetConstructedDataAcceptedModes{ - AcceptedModes: acceptedModes, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + AcceptedModes: acceptedModes, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataAcceptedModes(acceptedModes []BACnetLifeSafetyModeT // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAcceptedModes(structType interface{}) BACnetConstructedDataAcceptedModes { - if casted, ok := structType.(BACnetConstructedDataAcceptedModes); ok { + if casted, ok := structType.(BACnetConstructedDataAcceptedModes); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAcceptedModes); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataAcceptedModes) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetConstructedDataAcceptedModes) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataAcceptedModesParseWithBuffer(ctx context.Context, read // Terminated array var acceptedModes []BACnetLifeSafetyModeTagged { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetLifeSafetyModeTaggedParseWithBuffer(ctx, readBuffer, uint8(0), TagClass_APPLICATION_TAGS) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetLifeSafetyModeTaggedParseWithBuffer(ctx, readBuffer , uint8(0) , TagClass_APPLICATION_TAGS ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'acceptedModes' field of BACnetConstructedDataAcceptedModes") } @@ -173,7 +175,7 @@ func BACnetConstructedDataAcceptedModesParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetConstructedDataAcceptedModes{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, AcceptedModes: acceptedModes, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataAcceptedModes) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAcceptedModes") } - // Array Field (acceptedModes) - if pushErr := writeBuffer.PushContext("acceptedModes", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for acceptedModes") - } - for _curItem, _element := range m.GetAcceptedModes() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAcceptedModes()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'acceptedModes' field") - } - } - if popErr := writeBuffer.PopContext("acceptedModes", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for acceptedModes") + // Array Field (acceptedModes) + if pushErr := writeBuffer.PushContext("acceptedModes", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for acceptedModes") + } + for _curItem, _element := range m.GetAcceptedModes() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAcceptedModes()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'acceptedModes' field") } + } + if popErr := writeBuffer.PopContext("acceptedModes", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for acceptedModes") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAcceptedModes"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAcceptedModes") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataAcceptedModes) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAcceptedModes) isBACnetConstructedDataAcceptedModes() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataAcceptedModes) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessAlarmEvents.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessAlarmEvents.go index 55b5c84738d..86df64a43f2 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessAlarmEvents.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessAlarmEvents.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAccessAlarmEvents is the corresponding interface of BACnetConstructedDataAccessAlarmEvents type BACnetConstructedDataAccessAlarmEvents interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataAccessAlarmEventsExactly interface { // _BACnetConstructedDataAccessAlarmEvents is the data-structure of this message type _BACnetConstructedDataAccessAlarmEvents struct { *_BACnetConstructedData - AccessAlarmEvents []BACnetAccessEventTagged + AccessAlarmEvents []BACnetAccessEventTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAccessAlarmEvents) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataAccessAlarmEvents) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataAccessAlarmEvents) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ACCESS_ALARM_EVENTS -} +func (m *_BACnetConstructedDataAccessAlarmEvents) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ACCESS_ALARM_EVENTS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAccessAlarmEvents) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAccessAlarmEvents) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAccessAlarmEvents) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAccessAlarmEvents) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataAccessAlarmEvents) GetAccessAlarmEvents() []BACne /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAccessAlarmEvents factory function for _BACnetConstructedDataAccessAlarmEvents -func NewBACnetConstructedDataAccessAlarmEvents(accessAlarmEvents []BACnetAccessEventTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAccessAlarmEvents { +func NewBACnetConstructedDataAccessAlarmEvents( accessAlarmEvents []BACnetAccessEventTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAccessAlarmEvents { _result := &_BACnetConstructedDataAccessAlarmEvents{ - AccessAlarmEvents: accessAlarmEvents, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + AccessAlarmEvents: accessAlarmEvents, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataAccessAlarmEvents(accessAlarmEvents []BACnetAccessE // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAccessAlarmEvents(structType interface{}) BACnetConstructedDataAccessAlarmEvents { - if casted, ok := structType.(BACnetConstructedDataAccessAlarmEvents); ok { + if casted, ok := structType.(BACnetConstructedDataAccessAlarmEvents); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAccessAlarmEvents); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataAccessAlarmEvents) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetConstructedDataAccessAlarmEvents) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataAccessAlarmEventsParseWithBuffer(ctx context.Context, // Terminated array var accessAlarmEvents []BACnetAccessEventTagged { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetAccessEventTaggedParseWithBuffer(ctx, readBuffer, uint8(0), TagClass_APPLICATION_TAGS) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetAccessEventTaggedParseWithBuffer(ctx, readBuffer , uint8(0) , TagClass_APPLICATION_TAGS ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'accessAlarmEvents' field of BACnetConstructedDataAccessAlarmEvents") } @@ -173,7 +175,7 @@ func BACnetConstructedDataAccessAlarmEventsParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataAccessAlarmEvents{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, AccessAlarmEvents: accessAlarmEvents, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataAccessAlarmEvents) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAccessAlarmEvents") } - // Array Field (accessAlarmEvents) - if pushErr := writeBuffer.PushContext("accessAlarmEvents", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for accessAlarmEvents") - } - for _curItem, _element := range m.GetAccessAlarmEvents() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAccessAlarmEvents()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'accessAlarmEvents' field") - } - } - if popErr := writeBuffer.PopContext("accessAlarmEvents", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for accessAlarmEvents") + // Array Field (accessAlarmEvents) + if pushErr := writeBuffer.PushContext("accessAlarmEvents", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for accessAlarmEvents") + } + for _curItem, _element := range m.GetAccessAlarmEvents() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAccessAlarmEvents()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'accessAlarmEvents' field") } + } + if popErr := writeBuffer.PopContext("accessAlarmEvents", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for accessAlarmEvents") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAccessAlarmEvents"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAccessAlarmEvents") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataAccessAlarmEvents) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAccessAlarmEvents) isBACnetConstructedDataAccessAlarmEvents() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataAccessAlarmEvents) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessCredentialAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessCredentialAll.go index 4278605cef3..5b4c576fd2f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessCredentialAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessCredentialAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAccessCredentialAll is the corresponding interface of BACnetConstructedDataAccessCredentialAll type BACnetConstructedDataAccessCredentialAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataAccessCredentialAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAccessCredentialAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ACCESS_CREDENTIAL -} +func (m *_BACnetConstructedDataAccessCredentialAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ACCESS_CREDENTIAL} -func (m *_BACnetConstructedDataAccessCredentialAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataAccessCredentialAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAccessCredentialAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAccessCredentialAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAccessCredentialAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAccessCredentialAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataAccessCredentialAll factory function for _BACnetConstructedDataAccessCredentialAll -func NewBACnetConstructedDataAccessCredentialAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAccessCredentialAll { +func NewBACnetConstructedDataAccessCredentialAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAccessCredentialAll { _result := &_BACnetConstructedDataAccessCredentialAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataAccessCredentialAll(openingTag BACnetOpeningTag, pe // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAccessCredentialAll(structType interface{}) BACnetConstructedDataAccessCredentialAll { - if casted, ok := structType.(BACnetConstructedDataAccessCredentialAll); ok { + if casted, ok := structType.(BACnetConstructedDataAccessCredentialAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAccessCredentialAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataAccessCredentialAll) GetLengthInBits(ctx context. return lengthInBits } + func (m *_BACnetConstructedDataAccessCredentialAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataAccessCredentialAllParseWithBuffer(ctx context.Context _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataAccessCredentialAllParseWithBuffer(ctx context.Context // Create a partially initialized instance _child := &_BACnetConstructedDataAccessCredentialAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataAccessCredentialAll) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAccessCredentialAll) isBACnetConstructedDataAccessCredentialAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataAccessCredentialAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessDoorAlarmValues.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessDoorAlarmValues.go index cd1c93dc9b3..122a8dcdad1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessDoorAlarmValues.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessDoorAlarmValues.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAccessDoorAlarmValues is the corresponding interface of BACnetConstructedDataAccessDoorAlarmValues type BACnetConstructedDataAccessDoorAlarmValues interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataAccessDoorAlarmValuesExactly interface { // _BACnetConstructedDataAccessDoorAlarmValues is the data-structure of this message type _BACnetConstructedDataAccessDoorAlarmValues struct { *_BACnetConstructedData - AlarmValues []BACnetDoorAlarmStateTagged + AlarmValues []BACnetDoorAlarmStateTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAccessDoorAlarmValues) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ACCESS_DOOR -} +func (m *_BACnetConstructedDataAccessDoorAlarmValues) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ACCESS_DOOR} -func (m *_BACnetConstructedDataAccessDoorAlarmValues) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALARM_VALUES -} +func (m *_BACnetConstructedDataAccessDoorAlarmValues) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALARM_VALUES} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAccessDoorAlarmValues) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAccessDoorAlarmValues) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAccessDoorAlarmValues) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAccessDoorAlarmValues) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataAccessDoorAlarmValues) GetAlarmValues() []BACnetD /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAccessDoorAlarmValues factory function for _BACnetConstructedDataAccessDoorAlarmValues -func NewBACnetConstructedDataAccessDoorAlarmValues(alarmValues []BACnetDoorAlarmStateTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAccessDoorAlarmValues { +func NewBACnetConstructedDataAccessDoorAlarmValues( alarmValues []BACnetDoorAlarmStateTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAccessDoorAlarmValues { _result := &_BACnetConstructedDataAccessDoorAlarmValues{ - AlarmValues: alarmValues, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + AlarmValues: alarmValues, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataAccessDoorAlarmValues(alarmValues []BACnetDoorAlarm // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAccessDoorAlarmValues(structType interface{}) BACnetConstructedDataAccessDoorAlarmValues { - if casted, ok := structType.(BACnetConstructedDataAccessDoorAlarmValues); ok { + if casted, ok := structType.(BACnetConstructedDataAccessDoorAlarmValues); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAccessDoorAlarmValues); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataAccessDoorAlarmValues) GetLengthInBits(ctx contex return lengthInBits } + func (m *_BACnetConstructedDataAccessDoorAlarmValues) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataAccessDoorAlarmValuesParseWithBuffer(ctx context.Conte // Terminated array var alarmValues []BACnetDoorAlarmStateTagged { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetDoorAlarmStateTaggedParseWithBuffer(ctx, readBuffer, uint8(0), TagClass_APPLICATION_TAGS) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetDoorAlarmStateTaggedParseWithBuffer(ctx, readBuffer , uint8(0) , TagClass_APPLICATION_TAGS ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'alarmValues' field of BACnetConstructedDataAccessDoorAlarmValues") } @@ -173,7 +175,7 @@ func BACnetConstructedDataAccessDoorAlarmValuesParseWithBuffer(ctx context.Conte // Create a partially initialized instance _child := &_BACnetConstructedDataAccessDoorAlarmValues{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, AlarmValues: alarmValues, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataAccessDoorAlarmValues) SerializeWithWriteBuffer(c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAccessDoorAlarmValues") } - // Array Field (alarmValues) - if pushErr := writeBuffer.PushContext("alarmValues", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for alarmValues") - } - for _curItem, _element := range m.GetAlarmValues() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAlarmValues()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'alarmValues' field") - } - } - if popErr := writeBuffer.PopContext("alarmValues", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for alarmValues") + // Array Field (alarmValues) + if pushErr := writeBuffer.PushContext("alarmValues", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for alarmValues") + } + for _curItem, _element := range m.GetAlarmValues() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAlarmValues()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'alarmValues' field") } + } + if popErr := writeBuffer.PopContext("alarmValues", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for alarmValues") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAccessDoorAlarmValues"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAccessDoorAlarmValues") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataAccessDoorAlarmValues) SerializeWithWriteBuffer(c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAccessDoorAlarmValues) isBACnetConstructedDataAccessDoorAlarmValues() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataAccessDoorAlarmValues) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessDoorAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessDoorAll.go index 8e7e798a4e9..6c023e7c5b3 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessDoorAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessDoorAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAccessDoorAll is the corresponding interface of BACnetConstructedDataAccessDoorAll type BACnetConstructedDataAccessDoorAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataAccessDoorAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAccessDoorAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ACCESS_DOOR -} +func (m *_BACnetConstructedDataAccessDoorAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ACCESS_DOOR} -func (m *_BACnetConstructedDataAccessDoorAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataAccessDoorAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAccessDoorAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAccessDoorAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAccessDoorAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAccessDoorAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataAccessDoorAll factory function for _BACnetConstructedDataAccessDoorAll -func NewBACnetConstructedDataAccessDoorAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAccessDoorAll { +func NewBACnetConstructedDataAccessDoorAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAccessDoorAll { _result := &_BACnetConstructedDataAccessDoorAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataAccessDoorAll(openingTag BACnetOpeningTag, peekedTa // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAccessDoorAll(structType interface{}) BACnetConstructedDataAccessDoorAll { - if casted, ok := structType.(BACnetConstructedDataAccessDoorAll); ok { + if casted, ok := structType.(BACnetConstructedDataAccessDoorAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAccessDoorAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataAccessDoorAll) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetConstructedDataAccessDoorAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataAccessDoorAllParseWithBuffer(ctx context.Context, read _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataAccessDoorAllParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetConstructedDataAccessDoorAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataAccessDoorAll) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAccessDoorAll) isBACnetConstructedDataAccessDoorAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataAccessDoorAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessDoorFaultValues.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessDoorFaultValues.go index bd2f2567040..d21fc0addb9 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessDoorFaultValues.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessDoorFaultValues.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAccessDoorFaultValues is the corresponding interface of BACnetConstructedDataAccessDoorFaultValues type BACnetConstructedDataAccessDoorFaultValues interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataAccessDoorFaultValuesExactly interface { // _BACnetConstructedDataAccessDoorFaultValues is the data-structure of this message type _BACnetConstructedDataAccessDoorFaultValues struct { *_BACnetConstructedData - FaultValues []BACnetDoorAlarmStateTagged + FaultValues []BACnetDoorAlarmStateTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAccessDoorFaultValues) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ACCESS_DOOR -} +func (m *_BACnetConstructedDataAccessDoorFaultValues) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ACCESS_DOOR} -func (m *_BACnetConstructedDataAccessDoorFaultValues) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FAULT_VALUES -} +func (m *_BACnetConstructedDataAccessDoorFaultValues) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FAULT_VALUES} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAccessDoorFaultValues) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAccessDoorFaultValues) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAccessDoorFaultValues) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAccessDoorFaultValues) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataAccessDoorFaultValues) GetFaultValues() []BACnetD /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAccessDoorFaultValues factory function for _BACnetConstructedDataAccessDoorFaultValues -func NewBACnetConstructedDataAccessDoorFaultValues(faultValues []BACnetDoorAlarmStateTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAccessDoorFaultValues { +func NewBACnetConstructedDataAccessDoorFaultValues( faultValues []BACnetDoorAlarmStateTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAccessDoorFaultValues { _result := &_BACnetConstructedDataAccessDoorFaultValues{ - FaultValues: faultValues, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + FaultValues: faultValues, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataAccessDoorFaultValues(faultValues []BACnetDoorAlarm // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAccessDoorFaultValues(structType interface{}) BACnetConstructedDataAccessDoorFaultValues { - if casted, ok := structType.(BACnetConstructedDataAccessDoorFaultValues); ok { + if casted, ok := structType.(BACnetConstructedDataAccessDoorFaultValues); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAccessDoorFaultValues); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataAccessDoorFaultValues) GetLengthInBits(ctx contex return lengthInBits } + func (m *_BACnetConstructedDataAccessDoorFaultValues) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataAccessDoorFaultValuesParseWithBuffer(ctx context.Conte // Terminated array var faultValues []BACnetDoorAlarmStateTagged { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetDoorAlarmStateTaggedParseWithBuffer(ctx, readBuffer, uint8(0), TagClass_APPLICATION_TAGS) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetDoorAlarmStateTaggedParseWithBuffer(ctx, readBuffer , uint8(0) , TagClass_APPLICATION_TAGS ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'faultValues' field of BACnetConstructedDataAccessDoorFaultValues") } @@ -173,7 +175,7 @@ func BACnetConstructedDataAccessDoorFaultValuesParseWithBuffer(ctx context.Conte // Create a partially initialized instance _child := &_BACnetConstructedDataAccessDoorFaultValues{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FaultValues: faultValues, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataAccessDoorFaultValues) SerializeWithWriteBuffer(c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAccessDoorFaultValues") } - // Array Field (faultValues) - if pushErr := writeBuffer.PushContext("faultValues", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for faultValues") - } - for _curItem, _element := range m.GetFaultValues() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetFaultValues()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'faultValues' field") - } - } - if popErr := writeBuffer.PopContext("faultValues", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for faultValues") + // Array Field (faultValues) + if pushErr := writeBuffer.PushContext("faultValues", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for faultValues") + } + for _curItem, _element := range m.GetFaultValues() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetFaultValues()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'faultValues' field") } + } + if popErr := writeBuffer.PopContext("faultValues", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for faultValues") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAccessDoorFaultValues"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAccessDoorFaultValues") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataAccessDoorFaultValues) SerializeWithWriteBuffer(c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAccessDoorFaultValues) isBACnetConstructedDataAccessDoorFaultValues() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataAccessDoorFaultValues) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessDoorPresentValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessDoorPresentValue.go index ec250a7d738..d83f5871546 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessDoorPresentValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessDoorPresentValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAccessDoorPresentValue is the corresponding interface of BACnetConstructedDataAccessDoorPresentValue type BACnetConstructedDataAccessDoorPresentValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAccessDoorPresentValueExactly interface { // _BACnetConstructedDataAccessDoorPresentValue is the data-structure of this message type _BACnetConstructedDataAccessDoorPresentValue struct { *_BACnetConstructedData - PresentValue BACnetDoorValueTagged + PresentValue BACnetDoorValueTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAccessDoorPresentValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ACCESS_DOOR -} +func (m *_BACnetConstructedDataAccessDoorPresentValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ACCESS_DOOR} -func (m *_BACnetConstructedDataAccessDoorPresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PRESENT_VALUE -} +func (m *_BACnetConstructedDataAccessDoorPresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PRESENT_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAccessDoorPresentValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAccessDoorPresentValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAccessDoorPresentValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAccessDoorPresentValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAccessDoorPresentValue) GetActualValue() BACnetDo /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAccessDoorPresentValue factory function for _BACnetConstructedDataAccessDoorPresentValue -func NewBACnetConstructedDataAccessDoorPresentValue(presentValue BACnetDoorValueTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAccessDoorPresentValue { +func NewBACnetConstructedDataAccessDoorPresentValue( presentValue BACnetDoorValueTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAccessDoorPresentValue { _result := &_BACnetConstructedDataAccessDoorPresentValue{ - PresentValue: presentValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PresentValue: presentValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAccessDoorPresentValue(presentValue BACnetDoorValue // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAccessDoorPresentValue(structType interface{}) BACnetConstructedDataAccessDoorPresentValue { - if casted, ok := structType.(BACnetConstructedDataAccessDoorPresentValue); ok { + if casted, ok := structType.(BACnetConstructedDataAccessDoorPresentValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAccessDoorPresentValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAccessDoorPresentValue) GetLengthInBits(ctx conte return lengthInBits } + func (m *_BACnetConstructedDataAccessDoorPresentValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAccessDoorPresentValueParseWithBuffer(ctx context.Cont if pullErr := readBuffer.PullContext("presentValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for presentValue") } - _presentValue, _presentValueErr := BACnetDoorValueTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_presentValue, _presentValueErr := BACnetDoorValueTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _presentValueErr != nil { return nil, errors.Wrap(_presentValueErr, "Error parsing 'presentValue' field of BACnetConstructedDataAccessDoorPresentValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAccessDoorPresentValueParseWithBuffer(ctx context.Cont // Create a partially initialized instance _child := &_BACnetConstructedDataAccessDoorPresentValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PresentValue: presentValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAccessDoorPresentValue) SerializeWithWriteBuffer( return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAccessDoorPresentValue") } - // Simple Field (presentValue) - if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for presentValue") - } - _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) - if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for presentValue") - } - if _presentValueErr != nil { - return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (presentValue) + if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for presentValue") + } + _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) + if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for presentValue") + } + if _presentValueErr != nil { + return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAccessDoorPresentValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAccessDoorPresentValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAccessDoorPresentValue) SerializeWithWriteBuffer( return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAccessDoorPresentValue) isBACnetConstructedDataAccessDoorPresentValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAccessDoorPresentValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessDoorRelinquishDefault.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessDoorRelinquishDefault.go index 3107ff0a5ed..842ab8aee77 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessDoorRelinquishDefault.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessDoorRelinquishDefault.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAccessDoorRelinquishDefault is the corresponding interface of BACnetConstructedDataAccessDoorRelinquishDefault type BACnetConstructedDataAccessDoorRelinquishDefault interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAccessDoorRelinquishDefaultExactly interface { // _BACnetConstructedDataAccessDoorRelinquishDefault is the data-structure of this message type _BACnetConstructedDataAccessDoorRelinquishDefault struct { *_BACnetConstructedData - RelinquishDefault BACnetDoorValueTagged + RelinquishDefault BACnetDoorValueTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAccessDoorRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ACCESS_DOOR -} +func (m *_BACnetConstructedDataAccessDoorRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ACCESS_DOOR} -func (m *_BACnetConstructedDataAccessDoorRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_RELINQUISH_DEFAULT -} +func (m *_BACnetConstructedDataAccessDoorRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_RELINQUISH_DEFAULT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAccessDoorRelinquishDefault) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAccessDoorRelinquishDefault) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAccessDoorRelinquishDefault) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAccessDoorRelinquishDefault) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAccessDoorRelinquishDefault) GetActualValue() BAC /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAccessDoorRelinquishDefault factory function for _BACnetConstructedDataAccessDoorRelinquishDefault -func NewBACnetConstructedDataAccessDoorRelinquishDefault(relinquishDefault BACnetDoorValueTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAccessDoorRelinquishDefault { +func NewBACnetConstructedDataAccessDoorRelinquishDefault( relinquishDefault BACnetDoorValueTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAccessDoorRelinquishDefault { _result := &_BACnetConstructedDataAccessDoorRelinquishDefault{ - RelinquishDefault: relinquishDefault, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + RelinquishDefault: relinquishDefault, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAccessDoorRelinquishDefault(relinquishDefault BACne // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAccessDoorRelinquishDefault(structType interface{}) BACnetConstructedDataAccessDoorRelinquishDefault { - if casted, ok := structType.(BACnetConstructedDataAccessDoorRelinquishDefault); ok { + if casted, ok := structType.(BACnetConstructedDataAccessDoorRelinquishDefault); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAccessDoorRelinquishDefault); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAccessDoorRelinquishDefault) GetLengthInBits(ctx return lengthInBits } + func (m *_BACnetConstructedDataAccessDoorRelinquishDefault) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAccessDoorRelinquishDefaultParseWithBuffer(ctx context if pullErr := readBuffer.PullContext("relinquishDefault"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for relinquishDefault") } - _relinquishDefault, _relinquishDefaultErr := BACnetDoorValueTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_relinquishDefault, _relinquishDefaultErr := BACnetDoorValueTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _relinquishDefaultErr != nil { return nil, errors.Wrap(_relinquishDefaultErr, "Error parsing 'relinquishDefault' field of BACnetConstructedDataAccessDoorRelinquishDefault") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAccessDoorRelinquishDefaultParseWithBuffer(ctx context // Create a partially initialized instance _child := &_BACnetConstructedDataAccessDoorRelinquishDefault{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, RelinquishDefault: relinquishDefault, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAccessDoorRelinquishDefault) SerializeWithWriteBu return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAccessDoorRelinquishDefault") } - // Simple Field (relinquishDefault) - if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for relinquishDefault") - } - _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) - if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { - return errors.Wrap(popErr, "Error popping for relinquishDefault") - } - if _relinquishDefaultErr != nil { - return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (relinquishDefault) + if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for relinquishDefault") + } + _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) + if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { + return errors.Wrap(popErr, "Error popping for relinquishDefault") + } + if _relinquishDefaultErr != nil { + return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAccessDoorRelinquishDefault"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAccessDoorRelinquishDefault") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAccessDoorRelinquishDefault) SerializeWithWriteBu return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAccessDoorRelinquishDefault) isBACnetConstructedDataAccessDoorRelinquishDefault() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAccessDoorRelinquishDefault) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessDoors.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessDoors.go index 61e8c5f5b71..a492000497f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessDoors.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessDoors.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAccessDoors is the corresponding interface of BACnetConstructedDataAccessDoors type BACnetConstructedDataAccessDoors interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataAccessDoorsExactly interface { // _BACnetConstructedDataAccessDoors is the data-structure of this message type _BACnetConstructedDataAccessDoors struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - AccessDoors []BACnetDeviceObjectReference + NumberOfDataElements BACnetApplicationTagUnsignedInteger + AccessDoors []BACnetDeviceObjectReference } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAccessDoors) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataAccessDoors) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataAccessDoors) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ACCESS_DOORS -} +func (m *_BACnetConstructedDataAccessDoors) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ACCESS_DOORS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAccessDoors) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAccessDoors) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAccessDoors) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAccessDoors) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataAccessDoors) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAccessDoors factory function for _BACnetConstructedDataAccessDoors -func NewBACnetConstructedDataAccessDoors(numberOfDataElements BACnetApplicationTagUnsignedInteger, accessDoors []BACnetDeviceObjectReference, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAccessDoors { +func NewBACnetConstructedDataAccessDoors( numberOfDataElements BACnetApplicationTagUnsignedInteger , accessDoors []BACnetDeviceObjectReference , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAccessDoors { _result := &_BACnetConstructedDataAccessDoors{ - NumberOfDataElements: numberOfDataElements, - AccessDoors: accessDoors, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + AccessDoors: accessDoors, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataAccessDoors(numberOfDataElements BACnetApplicationT // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAccessDoors(structType interface{}) BACnetConstructedDataAccessDoors { - if casted, ok := structType.(BACnetConstructedDataAccessDoors); ok { + if casted, ok := structType.(BACnetConstructedDataAccessDoors); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAccessDoors); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataAccessDoors) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataAccessDoors) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataAccessDoorsParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataAccessDoorsParseWithBuffer(ctx context.Context, readBu // Terminated array var accessDoors []BACnetDeviceObjectReference { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'accessDoors' field of BACnetConstructedDataAccessDoors") } @@ -235,11 +237,11 @@ func BACnetConstructedDataAccessDoorsParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataAccessDoors{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - AccessDoors: accessDoors, + AccessDoors: accessDoors, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataAccessDoors) SerializeWithWriteBuffer(ctx context if pushErr := writeBuffer.PushContext("BACnetConstructedDataAccessDoors"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAccessDoors") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (accessDoors) - if pushErr := writeBuffer.PushContext("accessDoors", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for accessDoors") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetAccessDoors() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAccessDoors()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'accessDoors' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("accessDoors", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for accessDoors") + } + + // Array Field (accessDoors) + if pushErr := writeBuffer.PushContext("accessDoors", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for accessDoors") + } + for _curItem, _element := range m.GetAccessDoors() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAccessDoors()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'accessDoors' field") } + } + if popErr := writeBuffer.PopContext("accessDoors", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for accessDoors") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAccessDoors"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAccessDoors") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataAccessDoors) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAccessDoors) isBACnetConstructedDataAccessDoors() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataAccessDoors) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessEvent.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessEvent.go index fc64541ec22..81aaa1c5746 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessEvent.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessEvent.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAccessEvent is the corresponding interface of BACnetConstructedDataAccessEvent type BACnetConstructedDataAccessEvent interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAccessEventExactly interface { // _BACnetConstructedDataAccessEvent is the data-structure of this message type _BACnetConstructedDataAccessEvent struct { *_BACnetConstructedData - AccessEvent BACnetAccessEventTagged + AccessEvent BACnetAccessEventTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAccessEvent) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataAccessEvent) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataAccessEvent) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ACCESS_EVENT -} +func (m *_BACnetConstructedDataAccessEvent) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ACCESS_EVENT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAccessEvent) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAccessEvent) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAccessEvent) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAccessEvent) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAccessEvent) GetActualValue() BACnetAccessEventTa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAccessEvent factory function for _BACnetConstructedDataAccessEvent -func NewBACnetConstructedDataAccessEvent(accessEvent BACnetAccessEventTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAccessEvent { +func NewBACnetConstructedDataAccessEvent( accessEvent BACnetAccessEventTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAccessEvent { _result := &_BACnetConstructedDataAccessEvent{ - AccessEvent: accessEvent, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + AccessEvent: accessEvent, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAccessEvent(accessEvent BACnetAccessEventTagged, op // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAccessEvent(structType interface{}) BACnetConstructedDataAccessEvent { - if casted, ok := structType.(BACnetConstructedDataAccessEvent); ok { + if casted, ok := structType.(BACnetConstructedDataAccessEvent); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAccessEvent); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAccessEvent) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataAccessEvent) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAccessEventParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("accessEvent"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for accessEvent") } - _accessEvent, _accessEventErr := BACnetAccessEventTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_accessEvent, _accessEventErr := BACnetAccessEventTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _accessEventErr != nil { return nil, errors.Wrap(_accessEventErr, "Error parsing 'accessEvent' field of BACnetConstructedDataAccessEvent") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAccessEventParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataAccessEvent{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, AccessEvent: accessEvent, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAccessEvent) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAccessEvent") } - // Simple Field (accessEvent) - if pushErr := writeBuffer.PushContext("accessEvent"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for accessEvent") - } - _accessEventErr := writeBuffer.WriteSerializable(ctx, m.GetAccessEvent()) - if popErr := writeBuffer.PopContext("accessEvent"); popErr != nil { - return errors.Wrap(popErr, "Error popping for accessEvent") - } - if _accessEventErr != nil { - return errors.Wrap(_accessEventErr, "Error serializing 'accessEvent' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (accessEvent) + if pushErr := writeBuffer.PushContext("accessEvent"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for accessEvent") + } + _accessEventErr := writeBuffer.WriteSerializable(ctx, m.GetAccessEvent()) + if popErr := writeBuffer.PopContext("accessEvent"); popErr != nil { + return errors.Wrap(popErr, "Error popping for accessEvent") + } + if _accessEventErr != nil { + return errors.Wrap(_accessEventErr, "Error serializing 'accessEvent' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAccessEvent"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAccessEvent") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAccessEvent) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAccessEvent) isBACnetConstructedDataAccessEvent() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAccessEvent) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessEventAuthenticationFactor.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessEventAuthenticationFactor.go index 1ea44fa2313..b2fec68c94f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessEventAuthenticationFactor.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessEventAuthenticationFactor.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAccessEventAuthenticationFactor is the corresponding interface of BACnetConstructedDataAccessEventAuthenticationFactor type BACnetConstructedDataAccessEventAuthenticationFactor interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAccessEventAuthenticationFactorExactly interface { // _BACnetConstructedDataAccessEventAuthenticationFactor is the data-structure of this message type _BACnetConstructedDataAccessEventAuthenticationFactor struct { *_BACnetConstructedData - AccessEventAuthenticationFactor BACnetAuthenticationFactor + AccessEventAuthenticationFactor BACnetAuthenticationFactor } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAccessEventAuthenticationFactor) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataAccessEventAuthenticationFactor) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataAccessEventAuthenticationFactor) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ACCESS_EVENT_AUTHENTICATION_FACTOR -} +func (m *_BACnetConstructedDataAccessEventAuthenticationFactor) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ACCESS_EVENT_AUTHENTICATION_FACTOR} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAccessEventAuthenticationFactor) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAccessEventAuthenticationFactor) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAccessEventAuthenticationFactor) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAccessEventAuthenticationFactor) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAccessEventAuthenticationFactor) GetActualValue() /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAccessEventAuthenticationFactor factory function for _BACnetConstructedDataAccessEventAuthenticationFactor -func NewBACnetConstructedDataAccessEventAuthenticationFactor(accessEventAuthenticationFactor BACnetAuthenticationFactor, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAccessEventAuthenticationFactor { +func NewBACnetConstructedDataAccessEventAuthenticationFactor( accessEventAuthenticationFactor BACnetAuthenticationFactor , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAccessEventAuthenticationFactor { _result := &_BACnetConstructedDataAccessEventAuthenticationFactor{ AccessEventAuthenticationFactor: accessEventAuthenticationFactor, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAccessEventAuthenticationFactor(accessEventAuthenti // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAccessEventAuthenticationFactor(structType interface{}) BACnetConstructedDataAccessEventAuthenticationFactor { - if casted, ok := structType.(BACnetConstructedDataAccessEventAuthenticationFactor); ok { + if casted, ok := structType.(BACnetConstructedDataAccessEventAuthenticationFactor); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAccessEventAuthenticationFactor); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAccessEventAuthenticationFactor) GetLengthInBits( return lengthInBits } + func (m *_BACnetConstructedDataAccessEventAuthenticationFactor) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAccessEventAuthenticationFactorParseWithBuffer(ctx con if pullErr := readBuffer.PullContext("accessEventAuthenticationFactor"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for accessEventAuthenticationFactor") } - _accessEventAuthenticationFactor, _accessEventAuthenticationFactorErr := BACnetAuthenticationFactorParseWithBuffer(ctx, readBuffer) +_accessEventAuthenticationFactor, _accessEventAuthenticationFactorErr := BACnetAuthenticationFactorParseWithBuffer(ctx, readBuffer) if _accessEventAuthenticationFactorErr != nil { return nil, errors.Wrap(_accessEventAuthenticationFactorErr, "Error parsing 'accessEventAuthenticationFactor' field of BACnetConstructedDataAccessEventAuthenticationFactor") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAccessEventAuthenticationFactorParseWithBuffer(ctx con // Create a partially initialized instance _child := &_BACnetConstructedDataAccessEventAuthenticationFactor{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, AccessEventAuthenticationFactor: accessEventAuthenticationFactor, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAccessEventAuthenticationFactor) SerializeWithWri return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAccessEventAuthenticationFactor") } - // Simple Field (accessEventAuthenticationFactor) - if pushErr := writeBuffer.PushContext("accessEventAuthenticationFactor"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for accessEventAuthenticationFactor") - } - _accessEventAuthenticationFactorErr := writeBuffer.WriteSerializable(ctx, m.GetAccessEventAuthenticationFactor()) - if popErr := writeBuffer.PopContext("accessEventAuthenticationFactor"); popErr != nil { - return errors.Wrap(popErr, "Error popping for accessEventAuthenticationFactor") - } - if _accessEventAuthenticationFactorErr != nil { - return errors.Wrap(_accessEventAuthenticationFactorErr, "Error serializing 'accessEventAuthenticationFactor' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (accessEventAuthenticationFactor) + if pushErr := writeBuffer.PushContext("accessEventAuthenticationFactor"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for accessEventAuthenticationFactor") + } + _accessEventAuthenticationFactorErr := writeBuffer.WriteSerializable(ctx, m.GetAccessEventAuthenticationFactor()) + if popErr := writeBuffer.PopContext("accessEventAuthenticationFactor"); popErr != nil { + return errors.Wrap(popErr, "Error popping for accessEventAuthenticationFactor") + } + if _accessEventAuthenticationFactorErr != nil { + return errors.Wrap(_accessEventAuthenticationFactorErr, "Error serializing 'accessEventAuthenticationFactor' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAccessEventAuthenticationFactor"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAccessEventAuthenticationFactor") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAccessEventAuthenticationFactor) SerializeWithWri return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAccessEventAuthenticationFactor) isBACnetConstructedDataAccessEventAuthenticationFactor() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAccessEventAuthenticationFactor) String() string } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessEventCredential.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessEventCredential.go index 7eeba8dfe9b..f8421fc14c1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessEventCredential.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessEventCredential.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAccessEventCredential is the corresponding interface of BACnetConstructedDataAccessEventCredential type BACnetConstructedDataAccessEventCredential interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAccessEventCredentialExactly interface { // _BACnetConstructedDataAccessEventCredential is the data-structure of this message type _BACnetConstructedDataAccessEventCredential struct { *_BACnetConstructedData - AccessEventCredential BACnetDeviceObjectReference + AccessEventCredential BACnetDeviceObjectReference } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAccessEventCredential) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataAccessEventCredential) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataAccessEventCredential) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ACCESS_EVENT_CREDENTIAL -} +func (m *_BACnetConstructedDataAccessEventCredential) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ACCESS_EVENT_CREDENTIAL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAccessEventCredential) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAccessEventCredential) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAccessEventCredential) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAccessEventCredential) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAccessEventCredential) GetActualValue() BACnetDev /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAccessEventCredential factory function for _BACnetConstructedDataAccessEventCredential -func NewBACnetConstructedDataAccessEventCredential(accessEventCredential BACnetDeviceObjectReference, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAccessEventCredential { +func NewBACnetConstructedDataAccessEventCredential( accessEventCredential BACnetDeviceObjectReference , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAccessEventCredential { _result := &_BACnetConstructedDataAccessEventCredential{ - AccessEventCredential: accessEventCredential, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + AccessEventCredential: accessEventCredential, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAccessEventCredential(accessEventCredential BACnetD // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAccessEventCredential(structType interface{}) BACnetConstructedDataAccessEventCredential { - if casted, ok := structType.(BACnetConstructedDataAccessEventCredential); ok { + if casted, ok := structType.(BACnetConstructedDataAccessEventCredential); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAccessEventCredential); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAccessEventCredential) GetLengthInBits(ctx contex return lengthInBits } + func (m *_BACnetConstructedDataAccessEventCredential) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAccessEventCredentialParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("accessEventCredential"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for accessEventCredential") } - _accessEventCredential, _accessEventCredentialErr := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) +_accessEventCredential, _accessEventCredentialErr := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) if _accessEventCredentialErr != nil { return nil, errors.Wrap(_accessEventCredentialErr, "Error parsing 'accessEventCredential' field of BACnetConstructedDataAccessEventCredential") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAccessEventCredentialParseWithBuffer(ctx context.Conte // Create a partially initialized instance _child := &_BACnetConstructedDataAccessEventCredential{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, AccessEventCredential: accessEventCredential, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAccessEventCredential) SerializeWithWriteBuffer(c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAccessEventCredential") } - // Simple Field (accessEventCredential) - if pushErr := writeBuffer.PushContext("accessEventCredential"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for accessEventCredential") - } - _accessEventCredentialErr := writeBuffer.WriteSerializable(ctx, m.GetAccessEventCredential()) - if popErr := writeBuffer.PopContext("accessEventCredential"); popErr != nil { - return errors.Wrap(popErr, "Error popping for accessEventCredential") - } - if _accessEventCredentialErr != nil { - return errors.Wrap(_accessEventCredentialErr, "Error serializing 'accessEventCredential' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (accessEventCredential) + if pushErr := writeBuffer.PushContext("accessEventCredential"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for accessEventCredential") + } + _accessEventCredentialErr := writeBuffer.WriteSerializable(ctx, m.GetAccessEventCredential()) + if popErr := writeBuffer.PopContext("accessEventCredential"); popErr != nil { + return errors.Wrap(popErr, "Error popping for accessEventCredential") + } + if _accessEventCredentialErr != nil { + return errors.Wrap(_accessEventCredentialErr, "Error serializing 'accessEventCredential' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAccessEventCredential"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAccessEventCredential") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAccessEventCredential) SerializeWithWriteBuffer(c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAccessEventCredential) isBACnetConstructedDataAccessEventCredential() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAccessEventCredential) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessEventTag.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessEventTag.go index 3534d3a9d21..5d8c40dc76e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessEventTag.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessEventTag.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAccessEventTag is the corresponding interface of BACnetConstructedDataAccessEventTag type BACnetConstructedDataAccessEventTag interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAccessEventTagExactly interface { // _BACnetConstructedDataAccessEventTag is the data-structure of this message type _BACnetConstructedDataAccessEventTag struct { *_BACnetConstructedData - AccessEventTag BACnetApplicationTagUnsignedInteger + AccessEventTag BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAccessEventTag) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataAccessEventTag) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataAccessEventTag) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ACCESS_EVENT_TAG -} +func (m *_BACnetConstructedDataAccessEventTag) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ACCESS_EVENT_TAG} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAccessEventTag) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAccessEventTag) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAccessEventTag) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAccessEventTag) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAccessEventTag) GetActualValue() BACnetApplicatio /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAccessEventTag factory function for _BACnetConstructedDataAccessEventTag -func NewBACnetConstructedDataAccessEventTag(accessEventTag BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAccessEventTag { +func NewBACnetConstructedDataAccessEventTag( accessEventTag BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAccessEventTag { _result := &_BACnetConstructedDataAccessEventTag{ - AccessEventTag: accessEventTag, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + AccessEventTag: accessEventTag, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAccessEventTag(accessEventTag BACnetApplicationTagU // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAccessEventTag(structType interface{}) BACnetConstructedDataAccessEventTag { - if casted, ok := structType.(BACnetConstructedDataAccessEventTag); ok { + if casted, ok := structType.(BACnetConstructedDataAccessEventTag); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAccessEventTag); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAccessEventTag) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConstructedDataAccessEventTag) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAccessEventTagParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("accessEventTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for accessEventTag") } - _accessEventTag, _accessEventTagErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_accessEventTag, _accessEventTagErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _accessEventTagErr != nil { return nil, errors.Wrap(_accessEventTagErr, "Error parsing 'accessEventTag' field of BACnetConstructedDataAccessEventTag") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAccessEventTagParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetConstructedDataAccessEventTag{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, AccessEventTag: accessEventTag, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAccessEventTag) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAccessEventTag") } - // Simple Field (accessEventTag) - if pushErr := writeBuffer.PushContext("accessEventTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for accessEventTag") - } - _accessEventTagErr := writeBuffer.WriteSerializable(ctx, m.GetAccessEventTag()) - if popErr := writeBuffer.PopContext("accessEventTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for accessEventTag") - } - if _accessEventTagErr != nil { - return errors.Wrap(_accessEventTagErr, "Error serializing 'accessEventTag' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (accessEventTag) + if pushErr := writeBuffer.PushContext("accessEventTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for accessEventTag") + } + _accessEventTagErr := writeBuffer.WriteSerializable(ctx, m.GetAccessEventTag()) + if popErr := writeBuffer.PopContext("accessEventTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for accessEventTag") + } + if _accessEventTagErr != nil { + return errors.Wrap(_accessEventTagErr, "Error serializing 'accessEventTag' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAccessEventTag"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAccessEventTag") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAccessEventTag) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAccessEventTag) isBACnetConstructedDataAccessEventTag() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAccessEventTag) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessEventTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessEventTime.go index 9f422565037..4945765a3e5 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessEventTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessEventTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAccessEventTime is the corresponding interface of BACnetConstructedDataAccessEventTime type BACnetConstructedDataAccessEventTime interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAccessEventTimeExactly interface { // _BACnetConstructedDataAccessEventTime is the data-structure of this message type _BACnetConstructedDataAccessEventTime struct { *_BACnetConstructedData - AccessEventTime BACnetTimeStamp + AccessEventTime BACnetTimeStamp } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAccessEventTime) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataAccessEventTime) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataAccessEventTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ACCESS_EVENT_TIME -} +func (m *_BACnetConstructedDataAccessEventTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ACCESS_EVENT_TIME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAccessEventTime) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAccessEventTime) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAccessEventTime) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAccessEventTime) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAccessEventTime) GetActualValue() BACnetTimeStamp /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAccessEventTime factory function for _BACnetConstructedDataAccessEventTime -func NewBACnetConstructedDataAccessEventTime(accessEventTime BACnetTimeStamp, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAccessEventTime { +func NewBACnetConstructedDataAccessEventTime( accessEventTime BACnetTimeStamp , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAccessEventTime { _result := &_BACnetConstructedDataAccessEventTime{ - AccessEventTime: accessEventTime, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + AccessEventTime: accessEventTime, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAccessEventTime(accessEventTime BACnetTimeStamp, op // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAccessEventTime(structType interface{}) BACnetConstructedDataAccessEventTime { - if casted, ok := structType.(BACnetConstructedDataAccessEventTime); ok { + if casted, ok := structType.(BACnetConstructedDataAccessEventTime); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAccessEventTime); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAccessEventTime) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetConstructedDataAccessEventTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAccessEventTimeParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("accessEventTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for accessEventTime") } - _accessEventTime, _accessEventTimeErr := BACnetTimeStampParseWithBuffer(ctx, readBuffer) +_accessEventTime, _accessEventTimeErr := BACnetTimeStampParseWithBuffer(ctx, readBuffer) if _accessEventTimeErr != nil { return nil, errors.Wrap(_accessEventTimeErr, "Error parsing 'accessEventTime' field of BACnetConstructedDataAccessEventTime") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAccessEventTimeParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetConstructedDataAccessEventTime{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, AccessEventTime: accessEventTime, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAccessEventTime) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAccessEventTime") } - // Simple Field (accessEventTime) - if pushErr := writeBuffer.PushContext("accessEventTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for accessEventTime") - } - _accessEventTimeErr := writeBuffer.WriteSerializable(ctx, m.GetAccessEventTime()) - if popErr := writeBuffer.PopContext("accessEventTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for accessEventTime") - } - if _accessEventTimeErr != nil { - return errors.Wrap(_accessEventTimeErr, "Error serializing 'accessEventTime' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (accessEventTime) + if pushErr := writeBuffer.PushContext("accessEventTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for accessEventTime") + } + _accessEventTimeErr := writeBuffer.WriteSerializable(ctx, m.GetAccessEventTime()) + if popErr := writeBuffer.PopContext("accessEventTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for accessEventTime") + } + if _accessEventTimeErr != nil { + return errors.Wrap(_accessEventTimeErr, "Error serializing 'accessEventTime' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAccessEventTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAccessEventTime") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAccessEventTime) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAccessEventTime) isBACnetConstructedDataAccessEventTime() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAccessEventTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessPointAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessPointAll.go index dabb6e430fd..73af631b144 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessPointAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessPointAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAccessPointAll is the corresponding interface of BACnetConstructedDataAccessPointAll type BACnetConstructedDataAccessPointAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataAccessPointAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAccessPointAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ACCESS_POINT -} +func (m *_BACnetConstructedDataAccessPointAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ACCESS_POINT} -func (m *_BACnetConstructedDataAccessPointAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataAccessPointAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAccessPointAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAccessPointAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAccessPointAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAccessPointAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataAccessPointAll factory function for _BACnetConstructedDataAccessPointAll -func NewBACnetConstructedDataAccessPointAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAccessPointAll { +func NewBACnetConstructedDataAccessPointAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAccessPointAll { _result := &_BACnetConstructedDataAccessPointAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataAccessPointAll(openingTag BACnetOpeningTag, peekedT // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAccessPointAll(structType interface{}) BACnetConstructedDataAccessPointAll { - if casted, ok := structType.(BACnetConstructedDataAccessPointAll); ok { + if casted, ok := structType.(BACnetConstructedDataAccessPointAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAccessPointAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataAccessPointAll) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConstructedDataAccessPointAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataAccessPointAllParseWithBuffer(ctx context.Context, rea _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataAccessPointAllParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetConstructedDataAccessPointAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataAccessPointAll) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAccessPointAll) isBACnetConstructedDataAccessPointAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataAccessPointAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessRightsAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessRightsAll.go index e39315ff07d..bc158929c1f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessRightsAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessRightsAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAccessRightsAll is the corresponding interface of BACnetConstructedDataAccessRightsAll type BACnetConstructedDataAccessRightsAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataAccessRightsAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAccessRightsAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ACCESS_RIGHTS -} +func (m *_BACnetConstructedDataAccessRightsAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ACCESS_RIGHTS} -func (m *_BACnetConstructedDataAccessRightsAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataAccessRightsAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAccessRightsAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAccessRightsAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAccessRightsAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAccessRightsAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataAccessRightsAll factory function for _BACnetConstructedDataAccessRightsAll -func NewBACnetConstructedDataAccessRightsAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAccessRightsAll { +func NewBACnetConstructedDataAccessRightsAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAccessRightsAll { _result := &_BACnetConstructedDataAccessRightsAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataAccessRightsAll(openingTag BACnetOpeningTag, peeked // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAccessRightsAll(structType interface{}) BACnetConstructedDataAccessRightsAll { - if casted, ok := structType.(BACnetConstructedDataAccessRightsAll); ok { + if casted, ok := structType.(BACnetConstructedDataAccessRightsAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAccessRightsAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataAccessRightsAll) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetConstructedDataAccessRightsAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataAccessRightsAllParseWithBuffer(ctx context.Context, re _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataAccessRightsAllParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetConstructedDataAccessRightsAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataAccessRightsAll) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAccessRightsAll) isBACnetConstructedDataAccessRightsAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataAccessRightsAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessTransactionEvents.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessTransactionEvents.go index 7c733d224c1..2c57c714c85 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessTransactionEvents.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessTransactionEvents.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAccessTransactionEvents is the corresponding interface of BACnetConstructedDataAccessTransactionEvents type BACnetConstructedDataAccessTransactionEvents interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataAccessTransactionEventsExactly interface { // _BACnetConstructedDataAccessTransactionEvents is the data-structure of this message type _BACnetConstructedDataAccessTransactionEvents struct { *_BACnetConstructedData - AccessTransactionEvents []BACnetAccessEventTagged + AccessTransactionEvents []BACnetAccessEventTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAccessTransactionEvents) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataAccessTransactionEvents) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataAccessTransactionEvents) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ACCESS_TRANSACTION_EVENTS -} +func (m *_BACnetConstructedDataAccessTransactionEvents) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ACCESS_TRANSACTION_EVENTS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAccessTransactionEvents) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAccessTransactionEvents) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAccessTransactionEvents) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAccessTransactionEvents) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataAccessTransactionEvents) GetAccessTransactionEven /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAccessTransactionEvents factory function for _BACnetConstructedDataAccessTransactionEvents -func NewBACnetConstructedDataAccessTransactionEvents(accessTransactionEvents []BACnetAccessEventTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAccessTransactionEvents { +func NewBACnetConstructedDataAccessTransactionEvents( accessTransactionEvents []BACnetAccessEventTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAccessTransactionEvents { _result := &_BACnetConstructedDataAccessTransactionEvents{ AccessTransactionEvents: accessTransactionEvents, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataAccessTransactionEvents(accessTransactionEvents []B // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAccessTransactionEvents(structType interface{}) BACnetConstructedDataAccessTransactionEvents { - if casted, ok := structType.(BACnetConstructedDataAccessTransactionEvents); ok { + if casted, ok := structType.(BACnetConstructedDataAccessTransactionEvents); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAccessTransactionEvents); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataAccessTransactionEvents) GetLengthInBits(ctx cont return lengthInBits } + func (m *_BACnetConstructedDataAccessTransactionEvents) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataAccessTransactionEventsParseWithBuffer(ctx context.Con // Terminated array var accessTransactionEvents []BACnetAccessEventTagged { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetAccessEventTaggedParseWithBuffer(ctx, readBuffer, uint8(0), TagClass_APPLICATION_TAGS) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetAccessEventTaggedParseWithBuffer(ctx, readBuffer , uint8(0) , TagClass_APPLICATION_TAGS ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'accessTransactionEvents' field of BACnetConstructedDataAccessTransactionEvents") } @@ -173,7 +175,7 @@ func BACnetConstructedDataAccessTransactionEventsParseWithBuffer(ctx context.Con // Create a partially initialized instance _child := &_BACnetConstructedDataAccessTransactionEvents{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, AccessTransactionEvents: accessTransactionEvents, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataAccessTransactionEvents) SerializeWithWriteBuffer return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAccessTransactionEvents") } - // Array Field (accessTransactionEvents) - if pushErr := writeBuffer.PushContext("accessTransactionEvents", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for accessTransactionEvents") - } - for _curItem, _element := range m.GetAccessTransactionEvents() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAccessTransactionEvents()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'accessTransactionEvents' field") - } - } - if popErr := writeBuffer.PopContext("accessTransactionEvents", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for accessTransactionEvents") + // Array Field (accessTransactionEvents) + if pushErr := writeBuffer.PushContext("accessTransactionEvents", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for accessTransactionEvents") + } + for _curItem, _element := range m.GetAccessTransactionEvents() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAccessTransactionEvents()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'accessTransactionEvents' field") } + } + if popErr := writeBuffer.PopContext("accessTransactionEvents", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for accessTransactionEvents") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAccessTransactionEvents"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAccessTransactionEvents") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataAccessTransactionEvents) SerializeWithWriteBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAccessTransactionEvents) isBACnetConstructedDataAccessTransactionEvents() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataAccessTransactionEvents) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessUserAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessUserAll.go index cfae0ac9e13..803b3a92b4f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessUserAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessUserAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAccessUserAll is the corresponding interface of BACnetConstructedDataAccessUserAll type BACnetConstructedDataAccessUserAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataAccessUserAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAccessUserAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ACCESS_USER -} +func (m *_BACnetConstructedDataAccessUserAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ACCESS_USER} -func (m *_BACnetConstructedDataAccessUserAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataAccessUserAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAccessUserAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAccessUserAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAccessUserAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAccessUserAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataAccessUserAll factory function for _BACnetConstructedDataAccessUserAll -func NewBACnetConstructedDataAccessUserAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAccessUserAll { +func NewBACnetConstructedDataAccessUserAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAccessUserAll { _result := &_BACnetConstructedDataAccessUserAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataAccessUserAll(openingTag BACnetOpeningTag, peekedTa // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAccessUserAll(structType interface{}) BACnetConstructedDataAccessUserAll { - if casted, ok := structType.(BACnetConstructedDataAccessUserAll); ok { + if casted, ok := structType.(BACnetConstructedDataAccessUserAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAccessUserAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataAccessUserAll) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetConstructedDataAccessUserAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataAccessUserAllParseWithBuffer(ctx context.Context, read _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataAccessUserAllParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetConstructedDataAccessUserAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataAccessUserAll) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAccessUserAll) isBACnetConstructedDataAccessUserAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataAccessUserAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessZoneAdjustValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessZoneAdjustValue.go index 4b91b2f497b..4fc8dcd6f81 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessZoneAdjustValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessZoneAdjustValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAccessZoneAdjustValue is the corresponding interface of BACnetConstructedDataAccessZoneAdjustValue type BACnetConstructedDataAccessZoneAdjustValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAccessZoneAdjustValueExactly interface { // _BACnetConstructedDataAccessZoneAdjustValue is the data-structure of this message type _BACnetConstructedDataAccessZoneAdjustValue struct { *_BACnetConstructedData - AdjustValue BACnetApplicationTagSignedInteger + AdjustValue BACnetApplicationTagSignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAccessZoneAdjustValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ACCESS_ZONE -} +func (m *_BACnetConstructedDataAccessZoneAdjustValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ACCESS_ZONE} -func (m *_BACnetConstructedDataAccessZoneAdjustValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ADJUST_VALUE -} +func (m *_BACnetConstructedDataAccessZoneAdjustValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ADJUST_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAccessZoneAdjustValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAccessZoneAdjustValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAccessZoneAdjustValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAccessZoneAdjustValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAccessZoneAdjustValue) GetActualValue() BACnetApp /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAccessZoneAdjustValue factory function for _BACnetConstructedDataAccessZoneAdjustValue -func NewBACnetConstructedDataAccessZoneAdjustValue(adjustValue BACnetApplicationTagSignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAccessZoneAdjustValue { +func NewBACnetConstructedDataAccessZoneAdjustValue( adjustValue BACnetApplicationTagSignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAccessZoneAdjustValue { _result := &_BACnetConstructedDataAccessZoneAdjustValue{ - AdjustValue: adjustValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + AdjustValue: adjustValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAccessZoneAdjustValue(adjustValue BACnetApplication // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAccessZoneAdjustValue(structType interface{}) BACnetConstructedDataAccessZoneAdjustValue { - if casted, ok := structType.(BACnetConstructedDataAccessZoneAdjustValue); ok { + if casted, ok := structType.(BACnetConstructedDataAccessZoneAdjustValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAccessZoneAdjustValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAccessZoneAdjustValue) GetLengthInBits(ctx contex return lengthInBits } + func (m *_BACnetConstructedDataAccessZoneAdjustValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAccessZoneAdjustValueParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("adjustValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for adjustValue") } - _adjustValue, _adjustValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_adjustValue, _adjustValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _adjustValueErr != nil { return nil, errors.Wrap(_adjustValueErr, "Error parsing 'adjustValue' field of BACnetConstructedDataAccessZoneAdjustValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAccessZoneAdjustValueParseWithBuffer(ctx context.Conte // Create a partially initialized instance _child := &_BACnetConstructedDataAccessZoneAdjustValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, AdjustValue: adjustValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAccessZoneAdjustValue) SerializeWithWriteBuffer(c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAccessZoneAdjustValue") } - // Simple Field (adjustValue) - if pushErr := writeBuffer.PushContext("adjustValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for adjustValue") - } - _adjustValueErr := writeBuffer.WriteSerializable(ctx, m.GetAdjustValue()) - if popErr := writeBuffer.PopContext("adjustValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for adjustValue") - } - if _adjustValueErr != nil { - return errors.Wrap(_adjustValueErr, "Error serializing 'adjustValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (adjustValue) + if pushErr := writeBuffer.PushContext("adjustValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for adjustValue") + } + _adjustValueErr := writeBuffer.WriteSerializable(ctx, m.GetAdjustValue()) + if popErr := writeBuffer.PopContext("adjustValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for adjustValue") + } + if _adjustValueErr != nil { + return errors.Wrap(_adjustValueErr, "Error serializing 'adjustValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAccessZoneAdjustValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAccessZoneAdjustValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAccessZoneAdjustValue) SerializeWithWriteBuffer(c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAccessZoneAdjustValue) isBACnetConstructedDataAccessZoneAdjustValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAccessZoneAdjustValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessZoneAlarmValues.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessZoneAlarmValues.go index bd9711e3e02..1370cbe707e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessZoneAlarmValues.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessZoneAlarmValues.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAccessZoneAlarmValues is the corresponding interface of BACnetConstructedDataAccessZoneAlarmValues type BACnetConstructedDataAccessZoneAlarmValues interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataAccessZoneAlarmValuesExactly interface { // _BACnetConstructedDataAccessZoneAlarmValues is the data-structure of this message type _BACnetConstructedDataAccessZoneAlarmValues struct { *_BACnetConstructedData - AlarmValues []BACnetAccessZoneOccupancyStateTagged + AlarmValues []BACnetAccessZoneOccupancyStateTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAccessZoneAlarmValues) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ACCESS_ZONE -} +func (m *_BACnetConstructedDataAccessZoneAlarmValues) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ACCESS_ZONE} -func (m *_BACnetConstructedDataAccessZoneAlarmValues) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALARM_VALUES -} +func (m *_BACnetConstructedDataAccessZoneAlarmValues) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALARM_VALUES} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAccessZoneAlarmValues) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAccessZoneAlarmValues) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAccessZoneAlarmValues) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAccessZoneAlarmValues) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataAccessZoneAlarmValues) GetAlarmValues() []BACnetA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAccessZoneAlarmValues factory function for _BACnetConstructedDataAccessZoneAlarmValues -func NewBACnetConstructedDataAccessZoneAlarmValues(alarmValues []BACnetAccessZoneOccupancyStateTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAccessZoneAlarmValues { +func NewBACnetConstructedDataAccessZoneAlarmValues( alarmValues []BACnetAccessZoneOccupancyStateTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAccessZoneAlarmValues { _result := &_BACnetConstructedDataAccessZoneAlarmValues{ - AlarmValues: alarmValues, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + AlarmValues: alarmValues, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataAccessZoneAlarmValues(alarmValues []BACnetAccessZon // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAccessZoneAlarmValues(structType interface{}) BACnetConstructedDataAccessZoneAlarmValues { - if casted, ok := structType.(BACnetConstructedDataAccessZoneAlarmValues); ok { + if casted, ok := structType.(BACnetConstructedDataAccessZoneAlarmValues); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAccessZoneAlarmValues); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataAccessZoneAlarmValues) GetLengthInBits(ctx contex return lengthInBits } + func (m *_BACnetConstructedDataAccessZoneAlarmValues) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataAccessZoneAlarmValuesParseWithBuffer(ctx context.Conte // Terminated array var alarmValues []BACnetAccessZoneOccupancyStateTagged { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetAccessZoneOccupancyStateTaggedParseWithBuffer(ctx, readBuffer, uint8(0), TagClass_APPLICATION_TAGS) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetAccessZoneOccupancyStateTaggedParseWithBuffer(ctx, readBuffer , uint8(0) , TagClass_APPLICATION_TAGS ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'alarmValues' field of BACnetConstructedDataAccessZoneAlarmValues") } @@ -173,7 +175,7 @@ func BACnetConstructedDataAccessZoneAlarmValuesParseWithBuffer(ctx context.Conte // Create a partially initialized instance _child := &_BACnetConstructedDataAccessZoneAlarmValues{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, AlarmValues: alarmValues, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataAccessZoneAlarmValues) SerializeWithWriteBuffer(c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAccessZoneAlarmValues") } - // Array Field (alarmValues) - if pushErr := writeBuffer.PushContext("alarmValues", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for alarmValues") - } - for _curItem, _element := range m.GetAlarmValues() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAlarmValues()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'alarmValues' field") - } - } - if popErr := writeBuffer.PopContext("alarmValues", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for alarmValues") + // Array Field (alarmValues) + if pushErr := writeBuffer.PushContext("alarmValues", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for alarmValues") + } + for _curItem, _element := range m.GetAlarmValues() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAlarmValues()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'alarmValues' field") } + } + if popErr := writeBuffer.PopContext("alarmValues", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for alarmValues") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAccessZoneAlarmValues"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAccessZoneAlarmValues") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataAccessZoneAlarmValues) SerializeWithWriteBuffer(c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAccessZoneAlarmValues) isBACnetConstructedDataAccessZoneAlarmValues() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataAccessZoneAlarmValues) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessZoneAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessZoneAll.go index 5b5bb04dcae..d20eab4bd6c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessZoneAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccessZoneAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAccessZoneAll is the corresponding interface of BACnetConstructedDataAccessZoneAll type BACnetConstructedDataAccessZoneAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataAccessZoneAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAccessZoneAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ACCESS_ZONE -} +func (m *_BACnetConstructedDataAccessZoneAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ACCESS_ZONE} -func (m *_BACnetConstructedDataAccessZoneAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataAccessZoneAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAccessZoneAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAccessZoneAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAccessZoneAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAccessZoneAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataAccessZoneAll factory function for _BACnetConstructedDataAccessZoneAll -func NewBACnetConstructedDataAccessZoneAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAccessZoneAll { +func NewBACnetConstructedDataAccessZoneAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAccessZoneAll { _result := &_BACnetConstructedDataAccessZoneAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataAccessZoneAll(openingTag BACnetOpeningTag, peekedTa // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAccessZoneAll(structType interface{}) BACnetConstructedDataAccessZoneAll { - if casted, ok := structType.(BACnetConstructedDataAccessZoneAll); ok { + if casted, ok := structType.(BACnetConstructedDataAccessZoneAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAccessZoneAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataAccessZoneAll) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetConstructedDataAccessZoneAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataAccessZoneAllParseWithBuffer(ctx context.Context, read _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataAccessZoneAllParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetConstructedDataAccessZoneAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataAccessZoneAll) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAccessZoneAll) isBACnetConstructedDataAccessZoneAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataAccessZoneAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccompaniment.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccompaniment.go index 12ef0275856..9af10a92f09 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccompaniment.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccompaniment.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAccompaniment is the corresponding interface of BACnetConstructedDataAccompaniment type BACnetConstructedDataAccompaniment interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAccompanimentExactly interface { // _BACnetConstructedDataAccompaniment is the data-structure of this message type _BACnetConstructedDataAccompaniment struct { *_BACnetConstructedData - Accompaniment BACnetDeviceObjectReference + Accompaniment BACnetDeviceObjectReference } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAccompaniment) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataAccompaniment) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataAccompaniment) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ACCOMPANIMENT -} +func (m *_BACnetConstructedDataAccompaniment) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ACCOMPANIMENT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAccompaniment) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAccompaniment) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAccompaniment) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAccompaniment) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAccompaniment) GetActualValue() BACnetDeviceObjec /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAccompaniment factory function for _BACnetConstructedDataAccompaniment -func NewBACnetConstructedDataAccompaniment(accompaniment BACnetDeviceObjectReference, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAccompaniment { +func NewBACnetConstructedDataAccompaniment( accompaniment BACnetDeviceObjectReference , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAccompaniment { _result := &_BACnetConstructedDataAccompaniment{ - Accompaniment: accompaniment, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Accompaniment: accompaniment, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAccompaniment(accompaniment BACnetDeviceObjectRefer // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAccompaniment(structType interface{}) BACnetConstructedDataAccompaniment { - if casted, ok := structType.(BACnetConstructedDataAccompaniment); ok { + if casted, ok := structType.(BACnetConstructedDataAccompaniment); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAccompaniment); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAccompaniment) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetConstructedDataAccompaniment) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAccompanimentParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("accompaniment"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for accompaniment") } - _accompaniment, _accompanimentErr := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) +_accompaniment, _accompanimentErr := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) if _accompanimentErr != nil { return nil, errors.Wrap(_accompanimentErr, "Error parsing 'accompaniment' field of BACnetConstructedDataAccompaniment") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAccompanimentParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetConstructedDataAccompaniment{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Accompaniment: accompaniment, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAccompaniment) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAccompaniment") } - // Simple Field (accompaniment) - if pushErr := writeBuffer.PushContext("accompaniment"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for accompaniment") - } - _accompanimentErr := writeBuffer.WriteSerializable(ctx, m.GetAccompaniment()) - if popErr := writeBuffer.PopContext("accompaniment"); popErr != nil { - return errors.Wrap(popErr, "Error popping for accompaniment") - } - if _accompanimentErr != nil { - return errors.Wrap(_accompanimentErr, "Error serializing 'accompaniment' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (accompaniment) + if pushErr := writeBuffer.PushContext("accompaniment"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for accompaniment") + } + _accompanimentErr := writeBuffer.WriteSerializable(ctx, m.GetAccompaniment()) + if popErr := writeBuffer.PopContext("accompaniment"); popErr != nil { + return errors.Wrap(popErr, "Error popping for accompaniment") + } + if _accompanimentErr != nil { + return errors.Wrap(_accompanimentErr, "Error serializing 'accompaniment' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAccompaniment"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAccompaniment") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAccompaniment) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAccompaniment) isBACnetConstructedDataAccompaniment() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAccompaniment) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccompanimentTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccompanimentTime.go index 2101e32278c..3cb56e0e280 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccompanimentTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccompanimentTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAccompanimentTime is the corresponding interface of BACnetConstructedDataAccompanimentTime type BACnetConstructedDataAccompanimentTime interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAccompanimentTimeExactly interface { // _BACnetConstructedDataAccompanimentTime is the data-structure of this message type _BACnetConstructedDataAccompanimentTime struct { *_BACnetConstructedData - AccompanimentTime BACnetApplicationTagUnsignedInteger + AccompanimentTime BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAccompanimentTime) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataAccompanimentTime) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataAccompanimentTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ACCOMPANIMENT_TIME -} +func (m *_BACnetConstructedDataAccompanimentTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ACCOMPANIMENT_TIME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAccompanimentTime) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAccompanimentTime) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAccompanimentTime) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAccompanimentTime) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAccompanimentTime) GetActualValue() BACnetApplica /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAccompanimentTime factory function for _BACnetConstructedDataAccompanimentTime -func NewBACnetConstructedDataAccompanimentTime(accompanimentTime BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAccompanimentTime { +func NewBACnetConstructedDataAccompanimentTime( accompanimentTime BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAccompanimentTime { _result := &_BACnetConstructedDataAccompanimentTime{ - AccompanimentTime: accompanimentTime, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + AccompanimentTime: accompanimentTime, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAccompanimentTime(accompanimentTime BACnetApplicati // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAccompanimentTime(structType interface{}) BACnetConstructedDataAccompanimentTime { - if casted, ok := structType.(BACnetConstructedDataAccompanimentTime); ok { + if casted, ok := structType.(BACnetConstructedDataAccompanimentTime); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAccompanimentTime); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAccompanimentTime) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetConstructedDataAccompanimentTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAccompanimentTimeParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("accompanimentTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for accompanimentTime") } - _accompanimentTime, _accompanimentTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_accompanimentTime, _accompanimentTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _accompanimentTimeErr != nil { return nil, errors.Wrap(_accompanimentTimeErr, "Error parsing 'accompanimentTime' field of BACnetConstructedDataAccompanimentTime") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAccompanimentTimeParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataAccompanimentTime{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, AccompanimentTime: accompanimentTime, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAccompanimentTime) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAccompanimentTime") } - // Simple Field (accompanimentTime) - if pushErr := writeBuffer.PushContext("accompanimentTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for accompanimentTime") - } - _accompanimentTimeErr := writeBuffer.WriteSerializable(ctx, m.GetAccompanimentTime()) - if popErr := writeBuffer.PopContext("accompanimentTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for accompanimentTime") - } - if _accompanimentTimeErr != nil { - return errors.Wrap(_accompanimentTimeErr, "Error serializing 'accompanimentTime' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (accompanimentTime) + if pushErr := writeBuffer.PushContext("accompanimentTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for accompanimentTime") + } + _accompanimentTimeErr := writeBuffer.WriteSerializable(ctx, m.GetAccompanimentTime()) + if popErr := writeBuffer.PopContext("accompanimentTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for accompanimentTime") + } + if _accompanimentTimeErr != nil { + return errors.Wrap(_accompanimentTimeErr, "Error serializing 'accompanimentTime' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAccompanimentTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAccompanimentTime") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAccompanimentTime) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAccompanimentTime) isBACnetConstructedDataAccompanimentTime() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAccompanimentTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccumulatorAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccumulatorAll.go index 1dc971f4775..29b48d35f3e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccumulatorAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccumulatorAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAccumulatorAll is the corresponding interface of BACnetConstructedDataAccumulatorAll type BACnetConstructedDataAccumulatorAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataAccumulatorAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAccumulatorAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ACCUMULATOR -} +func (m *_BACnetConstructedDataAccumulatorAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ACCUMULATOR} -func (m *_BACnetConstructedDataAccumulatorAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataAccumulatorAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAccumulatorAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAccumulatorAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAccumulatorAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAccumulatorAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataAccumulatorAll factory function for _BACnetConstructedDataAccumulatorAll -func NewBACnetConstructedDataAccumulatorAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAccumulatorAll { +func NewBACnetConstructedDataAccumulatorAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAccumulatorAll { _result := &_BACnetConstructedDataAccumulatorAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataAccumulatorAll(openingTag BACnetOpeningTag, peekedT // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAccumulatorAll(structType interface{}) BACnetConstructedDataAccumulatorAll { - if casted, ok := structType.(BACnetConstructedDataAccumulatorAll); ok { + if casted, ok := structType.(BACnetConstructedDataAccumulatorAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAccumulatorAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataAccumulatorAll) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConstructedDataAccumulatorAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataAccumulatorAllParseWithBuffer(ctx context.Context, rea _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataAccumulatorAllParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetConstructedDataAccumulatorAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataAccumulatorAll) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAccumulatorAll) isBACnetConstructedDataAccumulatorAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataAccumulatorAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccumulatorFaultHighLimit.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccumulatorFaultHighLimit.go index f7d14d480fb..bf92cc30d62 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccumulatorFaultHighLimit.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccumulatorFaultHighLimit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAccumulatorFaultHighLimit is the corresponding interface of BACnetConstructedDataAccumulatorFaultHighLimit type BACnetConstructedDataAccumulatorFaultHighLimit interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAccumulatorFaultHighLimitExactly interface { // _BACnetConstructedDataAccumulatorFaultHighLimit is the data-structure of this message type _BACnetConstructedDataAccumulatorFaultHighLimit struct { *_BACnetConstructedData - FaultHighLimit BACnetApplicationTagUnsignedInteger + FaultHighLimit BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAccumulatorFaultHighLimit) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ACCUMULATOR -} +func (m *_BACnetConstructedDataAccumulatorFaultHighLimit) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ACCUMULATOR} -func (m *_BACnetConstructedDataAccumulatorFaultHighLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FAULT_HIGH_LIMIT -} +func (m *_BACnetConstructedDataAccumulatorFaultHighLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FAULT_HIGH_LIMIT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAccumulatorFaultHighLimit) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAccumulatorFaultHighLimit) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAccumulatorFaultHighLimit) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAccumulatorFaultHighLimit) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAccumulatorFaultHighLimit) GetActualValue() BACne /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAccumulatorFaultHighLimit factory function for _BACnetConstructedDataAccumulatorFaultHighLimit -func NewBACnetConstructedDataAccumulatorFaultHighLimit(faultHighLimit BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAccumulatorFaultHighLimit { +func NewBACnetConstructedDataAccumulatorFaultHighLimit( faultHighLimit BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAccumulatorFaultHighLimit { _result := &_BACnetConstructedDataAccumulatorFaultHighLimit{ - FaultHighLimit: faultHighLimit, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + FaultHighLimit: faultHighLimit, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAccumulatorFaultHighLimit(faultHighLimit BACnetAppl // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAccumulatorFaultHighLimit(structType interface{}) BACnetConstructedDataAccumulatorFaultHighLimit { - if casted, ok := structType.(BACnetConstructedDataAccumulatorFaultHighLimit); ok { + if casted, ok := structType.(BACnetConstructedDataAccumulatorFaultHighLimit); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAccumulatorFaultHighLimit); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAccumulatorFaultHighLimit) GetLengthInBits(ctx co return lengthInBits } + func (m *_BACnetConstructedDataAccumulatorFaultHighLimit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAccumulatorFaultHighLimitParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("faultHighLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for faultHighLimit") } - _faultHighLimit, _faultHighLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_faultHighLimit, _faultHighLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _faultHighLimitErr != nil { return nil, errors.Wrap(_faultHighLimitErr, "Error parsing 'faultHighLimit' field of BACnetConstructedDataAccumulatorFaultHighLimit") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAccumulatorFaultHighLimitParseWithBuffer(ctx context.C // Create a partially initialized instance _child := &_BACnetConstructedDataAccumulatorFaultHighLimit{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FaultHighLimit: faultHighLimit, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAccumulatorFaultHighLimit) SerializeWithWriteBuff return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAccumulatorFaultHighLimit") } - // Simple Field (faultHighLimit) - if pushErr := writeBuffer.PushContext("faultHighLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for faultHighLimit") - } - _faultHighLimitErr := writeBuffer.WriteSerializable(ctx, m.GetFaultHighLimit()) - if popErr := writeBuffer.PopContext("faultHighLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for faultHighLimit") - } - if _faultHighLimitErr != nil { - return errors.Wrap(_faultHighLimitErr, "Error serializing 'faultHighLimit' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (faultHighLimit) + if pushErr := writeBuffer.PushContext("faultHighLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for faultHighLimit") + } + _faultHighLimitErr := writeBuffer.WriteSerializable(ctx, m.GetFaultHighLimit()) + if popErr := writeBuffer.PopContext("faultHighLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for faultHighLimit") + } + if _faultHighLimitErr != nil { + return errors.Wrap(_faultHighLimitErr, "Error serializing 'faultHighLimit' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAccumulatorFaultHighLimit"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAccumulatorFaultHighLimit") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAccumulatorFaultHighLimit) SerializeWithWriteBuff return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAccumulatorFaultHighLimit) isBACnetConstructedDataAccumulatorFaultHighLimit() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAccumulatorFaultHighLimit) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccumulatorFaultLowLimit.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccumulatorFaultLowLimit.go index 12e0378b442..41b4aa486b1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccumulatorFaultLowLimit.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccumulatorFaultLowLimit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAccumulatorFaultLowLimit is the corresponding interface of BACnetConstructedDataAccumulatorFaultLowLimit type BACnetConstructedDataAccumulatorFaultLowLimit interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAccumulatorFaultLowLimitExactly interface { // _BACnetConstructedDataAccumulatorFaultLowLimit is the data-structure of this message type _BACnetConstructedDataAccumulatorFaultLowLimit struct { *_BACnetConstructedData - FaultLowLimit BACnetApplicationTagUnsignedInteger + FaultLowLimit BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAccumulatorFaultLowLimit) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ACCUMULATOR -} +func (m *_BACnetConstructedDataAccumulatorFaultLowLimit) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ACCUMULATOR} -func (m *_BACnetConstructedDataAccumulatorFaultLowLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FAULT_LOW_LIMIT -} +func (m *_BACnetConstructedDataAccumulatorFaultLowLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FAULT_LOW_LIMIT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAccumulatorFaultLowLimit) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAccumulatorFaultLowLimit) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAccumulatorFaultLowLimit) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAccumulatorFaultLowLimit) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAccumulatorFaultLowLimit) GetActualValue() BACnet /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAccumulatorFaultLowLimit factory function for _BACnetConstructedDataAccumulatorFaultLowLimit -func NewBACnetConstructedDataAccumulatorFaultLowLimit(faultLowLimit BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAccumulatorFaultLowLimit { +func NewBACnetConstructedDataAccumulatorFaultLowLimit( faultLowLimit BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAccumulatorFaultLowLimit { _result := &_BACnetConstructedDataAccumulatorFaultLowLimit{ - FaultLowLimit: faultLowLimit, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + FaultLowLimit: faultLowLimit, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAccumulatorFaultLowLimit(faultLowLimit BACnetApplic // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAccumulatorFaultLowLimit(structType interface{}) BACnetConstructedDataAccumulatorFaultLowLimit { - if casted, ok := structType.(BACnetConstructedDataAccumulatorFaultLowLimit); ok { + if casted, ok := structType.(BACnetConstructedDataAccumulatorFaultLowLimit); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAccumulatorFaultLowLimit); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAccumulatorFaultLowLimit) GetLengthInBits(ctx con return lengthInBits } + func (m *_BACnetConstructedDataAccumulatorFaultLowLimit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAccumulatorFaultLowLimitParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("faultLowLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for faultLowLimit") } - _faultLowLimit, _faultLowLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_faultLowLimit, _faultLowLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _faultLowLimitErr != nil { return nil, errors.Wrap(_faultLowLimitErr, "Error parsing 'faultLowLimit' field of BACnetConstructedDataAccumulatorFaultLowLimit") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAccumulatorFaultLowLimitParseWithBuffer(ctx context.Co // Create a partially initialized instance _child := &_BACnetConstructedDataAccumulatorFaultLowLimit{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FaultLowLimit: faultLowLimit, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAccumulatorFaultLowLimit) SerializeWithWriteBuffe return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAccumulatorFaultLowLimit") } - // Simple Field (faultLowLimit) - if pushErr := writeBuffer.PushContext("faultLowLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for faultLowLimit") - } - _faultLowLimitErr := writeBuffer.WriteSerializable(ctx, m.GetFaultLowLimit()) - if popErr := writeBuffer.PopContext("faultLowLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for faultLowLimit") - } - if _faultLowLimitErr != nil { - return errors.Wrap(_faultLowLimitErr, "Error serializing 'faultLowLimit' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (faultLowLimit) + if pushErr := writeBuffer.PushContext("faultLowLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for faultLowLimit") + } + _faultLowLimitErr := writeBuffer.WriteSerializable(ctx, m.GetFaultLowLimit()) + if popErr := writeBuffer.PopContext("faultLowLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for faultLowLimit") + } + if _faultLowLimitErr != nil { + return errors.Wrap(_faultLowLimitErr, "Error serializing 'faultLowLimit' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAccumulatorFaultLowLimit"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAccumulatorFaultLowLimit") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAccumulatorFaultLowLimit) SerializeWithWriteBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAccumulatorFaultLowLimit) isBACnetConstructedDataAccumulatorFaultLowLimit() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAccumulatorFaultLowLimit) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccumulatorHighLimit.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccumulatorHighLimit.go index e4fbc05c8a4..8446d40dc1f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccumulatorHighLimit.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccumulatorHighLimit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAccumulatorHighLimit is the corresponding interface of BACnetConstructedDataAccumulatorHighLimit type BACnetConstructedDataAccumulatorHighLimit interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAccumulatorHighLimitExactly interface { // _BACnetConstructedDataAccumulatorHighLimit is the data-structure of this message type _BACnetConstructedDataAccumulatorHighLimit struct { *_BACnetConstructedData - HighLimit BACnetApplicationTagUnsignedInteger + HighLimit BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAccumulatorHighLimit) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ACCUMULATOR -} +func (m *_BACnetConstructedDataAccumulatorHighLimit) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ACCUMULATOR} -func (m *_BACnetConstructedDataAccumulatorHighLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_HIGH_LIMIT -} +func (m *_BACnetConstructedDataAccumulatorHighLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_HIGH_LIMIT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAccumulatorHighLimit) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAccumulatorHighLimit) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAccumulatorHighLimit) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAccumulatorHighLimit) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAccumulatorHighLimit) GetActualValue() BACnetAppl /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAccumulatorHighLimit factory function for _BACnetConstructedDataAccumulatorHighLimit -func NewBACnetConstructedDataAccumulatorHighLimit(highLimit BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAccumulatorHighLimit { +func NewBACnetConstructedDataAccumulatorHighLimit( highLimit BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAccumulatorHighLimit { _result := &_BACnetConstructedDataAccumulatorHighLimit{ - HighLimit: highLimit, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + HighLimit: highLimit, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAccumulatorHighLimit(highLimit BACnetApplicationTag // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAccumulatorHighLimit(structType interface{}) BACnetConstructedDataAccumulatorHighLimit { - if casted, ok := structType.(BACnetConstructedDataAccumulatorHighLimit); ok { + if casted, ok := structType.(BACnetConstructedDataAccumulatorHighLimit); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAccumulatorHighLimit); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAccumulatorHighLimit) GetLengthInBits(ctx context return lengthInBits } + func (m *_BACnetConstructedDataAccumulatorHighLimit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAccumulatorHighLimitParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("highLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for highLimit") } - _highLimit, _highLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_highLimit, _highLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _highLimitErr != nil { return nil, errors.Wrap(_highLimitErr, "Error parsing 'highLimit' field of BACnetConstructedDataAccumulatorHighLimit") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAccumulatorHighLimitParseWithBuffer(ctx context.Contex // Create a partially initialized instance _child := &_BACnetConstructedDataAccumulatorHighLimit{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, HighLimit: highLimit, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAccumulatorHighLimit) SerializeWithWriteBuffer(ct return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAccumulatorHighLimit") } - // Simple Field (highLimit) - if pushErr := writeBuffer.PushContext("highLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for highLimit") - } - _highLimitErr := writeBuffer.WriteSerializable(ctx, m.GetHighLimit()) - if popErr := writeBuffer.PopContext("highLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for highLimit") - } - if _highLimitErr != nil { - return errors.Wrap(_highLimitErr, "Error serializing 'highLimit' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (highLimit) + if pushErr := writeBuffer.PushContext("highLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for highLimit") + } + _highLimitErr := writeBuffer.WriteSerializable(ctx, m.GetHighLimit()) + if popErr := writeBuffer.PopContext("highLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for highLimit") + } + if _highLimitErr != nil { + return errors.Wrap(_highLimitErr, "Error serializing 'highLimit' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAccumulatorHighLimit"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAccumulatorHighLimit") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAccumulatorHighLimit) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAccumulatorHighLimit) isBACnetConstructedDataAccumulatorHighLimit() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAccumulatorHighLimit) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccumulatorLowLimit.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccumulatorLowLimit.go index bb010188503..ccc54df2e8a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccumulatorLowLimit.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccumulatorLowLimit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAccumulatorLowLimit is the corresponding interface of BACnetConstructedDataAccumulatorLowLimit type BACnetConstructedDataAccumulatorLowLimit interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAccumulatorLowLimitExactly interface { // _BACnetConstructedDataAccumulatorLowLimit is the data-structure of this message type _BACnetConstructedDataAccumulatorLowLimit struct { *_BACnetConstructedData - LowLimit BACnetApplicationTagUnsignedInteger + LowLimit BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAccumulatorLowLimit) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ACCUMULATOR -} +func (m *_BACnetConstructedDataAccumulatorLowLimit) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ACCUMULATOR} -func (m *_BACnetConstructedDataAccumulatorLowLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LOW_LIMIT -} +func (m *_BACnetConstructedDataAccumulatorLowLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LOW_LIMIT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAccumulatorLowLimit) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAccumulatorLowLimit) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAccumulatorLowLimit) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAccumulatorLowLimit) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAccumulatorLowLimit) GetActualValue() BACnetAppli /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAccumulatorLowLimit factory function for _BACnetConstructedDataAccumulatorLowLimit -func NewBACnetConstructedDataAccumulatorLowLimit(lowLimit BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAccumulatorLowLimit { +func NewBACnetConstructedDataAccumulatorLowLimit( lowLimit BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAccumulatorLowLimit { _result := &_BACnetConstructedDataAccumulatorLowLimit{ - LowLimit: lowLimit, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + LowLimit: lowLimit, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAccumulatorLowLimit(lowLimit BACnetApplicationTagUn // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAccumulatorLowLimit(structType interface{}) BACnetConstructedDataAccumulatorLowLimit { - if casted, ok := structType.(BACnetConstructedDataAccumulatorLowLimit); ok { + if casted, ok := structType.(BACnetConstructedDataAccumulatorLowLimit); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAccumulatorLowLimit); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAccumulatorLowLimit) GetLengthInBits(ctx context. return lengthInBits } + func (m *_BACnetConstructedDataAccumulatorLowLimit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAccumulatorLowLimitParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("lowLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lowLimit") } - _lowLimit, _lowLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_lowLimit, _lowLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _lowLimitErr != nil { return nil, errors.Wrap(_lowLimitErr, "Error parsing 'lowLimit' field of BACnetConstructedDataAccumulatorLowLimit") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAccumulatorLowLimitParseWithBuffer(ctx context.Context // Create a partially initialized instance _child := &_BACnetConstructedDataAccumulatorLowLimit{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LowLimit: lowLimit, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAccumulatorLowLimit) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAccumulatorLowLimit") } - // Simple Field (lowLimit) - if pushErr := writeBuffer.PushContext("lowLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lowLimit") - } - _lowLimitErr := writeBuffer.WriteSerializable(ctx, m.GetLowLimit()) - if popErr := writeBuffer.PopContext("lowLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lowLimit") - } - if _lowLimitErr != nil { - return errors.Wrap(_lowLimitErr, "Error serializing 'lowLimit' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (lowLimit) + if pushErr := writeBuffer.PushContext("lowLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lowLimit") + } + _lowLimitErr := writeBuffer.WriteSerializable(ctx, m.GetLowLimit()) + if popErr := writeBuffer.PopContext("lowLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lowLimit") + } + if _lowLimitErr != nil { + return errors.Wrap(_lowLimitErr, "Error serializing 'lowLimit' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAccumulatorLowLimit"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAccumulatorLowLimit") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAccumulatorLowLimit) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAccumulatorLowLimit) isBACnetConstructedDataAccumulatorLowLimit() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAccumulatorLowLimit) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccumulatorMaxPresValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccumulatorMaxPresValue.go index 12e27bda240..329dfb6436b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccumulatorMaxPresValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccumulatorMaxPresValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAccumulatorMaxPresValue is the corresponding interface of BACnetConstructedDataAccumulatorMaxPresValue type BACnetConstructedDataAccumulatorMaxPresValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAccumulatorMaxPresValueExactly interface { // _BACnetConstructedDataAccumulatorMaxPresValue is the data-structure of this message type _BACnetConstructedDataAccumulatorMaxPresValue struct { *_BACnetConstructedData - MaxPresValue BACnetApplicationTagUnsignedInteger + MaxPresValue BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAccumulatorMaxPresValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ACCUMULATOR -} +func (m *_BACnetConstructedDataAccumulatorMaxPresValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ACCUMULATOR} -func (m *_BACnetConstructedDataAccumulatorMaxPresValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MAX_PRES_VALUE -} +func (m *_BACnetConstructedDataAccumulatorMaxPresValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MAX_PRES_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAccumulatorMaxPresValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAccumulatorMaxPresValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAccumulatorMaxPresValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAccumulatorMaxPresValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAccumulatorMaxPresValue) GetActualValue() BACnetA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAccumulatorMaxPresValue factory function for _BACnetConstructedDataAccumulatorMaxPresValue -func NewBACnetConstructedDataAccumulatorMaxPresValue(maxPresValue BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAccumulatorMaxPresValue { +func NewBACnetConstructedDataAccumulatorMaxPresValue( maxPresValue BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAccumulatorMaxPresValue { _result := &_BACnetConstructedDataAccumulatorMaxPresValue{ - MaxPresValue: maxPresValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + MaxPresValue: maxPresValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAccumulatorMaxPresValue(maxPresValue BACnetApplicat // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAccumulatorMaxPresValue(structType interface{}) BACnetConstructedDataAccumulatorMaxPresValue { - if casted, ok := structType.(BACnetConstructedDataAccumulatorMaxPresValue); ok { + if casted, ok := structType.(BACnetConstructedDataAccumulatorMaxPresValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAccumulatorMaxPresValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAccumulatorMaxPresValue) GetLengthInBits(ctx cont return lengthInBits } + func (m *_BACnetConstructedDataAccumulatorMaxPresValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAccumulatorMaxPresValueParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("maxPresValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for maxPresValue") } - _maxPresValue, _maxPresValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_maxPresValue, _maxPresValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _maxPresValueErr != nil { return nil, errors.Wrap(_maxPresValueErr, "Error parsing 'maxPresValue' field of BACnetConstructedDataAccumulatorMaxPresValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAccumulatorMaxPresValueParseWithBuffer(ctx context.Con // Create a partially initialized instance _child := &_BACnetConstructedDataAccumulatorMaxPresValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, MaxPresValue: maxPresValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAccumulatorMaxPresValue) SerializeWithWriteBuffer return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAccumulatorMaxPresValue") } - // Simple Field (maxPresValue) - if pushErr := writeBuffer.PushContext("maxPresValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for maxPresValue") - } - _maxPresValueErr := writeBuffer.WriteSerializable(ctx, m.GetMaxPresValue()) - if popErr := writeBuffer.PopContext("maxPresValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for maxPresValue") - } - if _maxPresValueErr != nil { - return errors.Wrap(_maxPresValueErr, "Error serializing 'maxPresValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (maxPresValue) + if pushErr := writeBuffer.PushContext("maxPresValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for maxPresValue") + } + _maxPresValueErr := writeBuffer.WriteSerializable(ctx, m.GetMaxPresValue()) + if popErr := writeBuffer.PopContext("maxPresValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for maxPresValue") + } + if _maxPresValueErr != nil { + return errors.Wrap(_maxPresValueErr, "Error serializing 'maxPresValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAccumulatorMaxPresValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAccumulatorMaxPresValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAccumulatorMaxPresValue) SerializeWithWriteBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAccumulatorMaxPresValue) isBACnetConstructedDataAccumulatorMaxPresValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAccumulatorMaxPresValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccumulatorMinPresValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccumulatorMinPresValue.go index bbc3745cc8e..2f0e79fd7be 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccumulatorMinPresValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAccumulatorMinPresValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAccumulatorMinPresValue is the corresponding interface of BACnetConstructedDataAccumulatorMinPresValue type BACnetConstructedDataAccumulatorMinPresValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAccumulatorMinPresValueExactly interface { // _BACnetConstructedDataAccumulatorMinPresValue is the data-structure of this message type _BACnetConstructedDataAccumulatorMinPresValue struct { *_BACnetConstructedData - MinPresValue BACnetApplicationTagUnsignedInteger + MinPresValue BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAccumulatorMinPresValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ACCUMULATOR -} +func (m *_BACnetConstructedDataAccumulatorMinPresValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ACCUMULATOR} -func (m *_BACnetConstructedDataAccumulatorMinPresValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MIN_PRES_VALUE -} +func (m *_BACnetConstructedDataAccumulatorMinPresValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MIN_PRES_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAccumulatorMinPresValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAccumulatorMinPresValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAccumulatorMinPresValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAccumulatorMinPresValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAccumulatorMinPresValue) GetActualValue() BACnetA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAccumulatorMinPresValue factory function for _BACnetConstructedDataAccumulatorMinPresValue -func NewBACnetConstructedDataAccumulatorMinPresValue(minPresValue BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAccumulatorMinPresValue { +func NewBACnetConstructedDataAccumulatorMinPresValue( minPresValue BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAccumulatorMinPresValue { _result := &_BACnetConstructedDataAccumulatorMinPresValue{ - MinPresValue: minPresValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + MinPresValue: minPresValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAccumulatorMinPresValue(minPresValue BACnetApplicat // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAccumulatorMinPresValue(structType interface{}) BACnetConstructedDataAccumulatorMinPresValue { - if casted, ok := structType.(BACnetConstructedDataAccumulatorMinPresValue); ok { + if casted, ok := structType.(BACnetConstructedDataAccumulatorMinPresValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAccumulatorMinPresValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAccumulatorMinPresValue) GetLengthInBits(ctx cont return lengthInBits } + func (m *_BACnetConstructedDataAccumulatorMinPresValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAccumulatorMinPresValueParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("minPresValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for minPresValue") } - _minPresValue, _minPresValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_minPresValue, _minPresValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _minPresValueErr != nil { return nil, errors.Wrap(_minPresValueErr, "Error parsing 'minPresValue' field of BACnetConstructedDataAccumulatorMinPresValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAccumulatorMinPresValueParseWithBuffer(ctx context.Con // Create a partially initialized instance _child := &_BACnetConstructedDataAccumulatorMinPresValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, MinPresValue: minPresValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAccumulatorMinPresValue) SerializeWithWriteBuffer return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAccumulatorMinPresValue") } - // Simple Field (minPresValue) - if pushErr := writeBuffer.PushContext("minPresValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for minPresValue") - } - _minPresValueErr := writeBuffer.WriteSerializable(ctx, m.GetMinPresValue()) - if popErr := writeBuffer.PopContext("minPresValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for minPresValue") - } - if _minPresValueErr != nil { - return errors.Wrap(_minPresValueErr, "Error serializing 'minPresValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (minPresValue) + if pushErr := writeBuffer.PushContext("minPresValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for minPresValue") + } + _minPresValueErr := writeBuffer.WriteSerializable(ctx, m.GetMinPresValue()) + if popErr := writeBuffer.PopContext("minPresValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for minPresValue") + } + if _minPresValueErr != nil { + return errors.Wrap(_minPresValueErr, "Error serializing 'minPresValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAccumulatorMinPresValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAccumulatorMinPresValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAccumulatorMinPresValue) SerializeWithWriteBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAccumulatorMinPresValue) isBACnetConstructedDataAccumulatorMinPresValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAccumulatorMinPresValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAckRequired.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAckRequired.go index b964caf71d7..1b29b4a2e80 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAckRequired.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAckRequired.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAckRequired is the corresponding interface of BACnetConstructedDataAckRequired type BACnetConstructedDataAckRequired interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAckRequiredExactly interface { // _BACnetConstructedDataAckRequired is the data-structure of this message type _BACnetConstructedDataAckRequired struct { *_BACnetConstructedData - AckRequired BACnetEventTransitionBitsTagged + AckRequired BACnetEventTransitionBitsTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAckRequired) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataAckRequired) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataAckRequired) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ACK_REQUIRED -} +func (m *_BACnetConstructedDataAckRequired) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ACK_REQUIRED} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAckRequired) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAckRequired) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAckRequired) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAckRequired) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAckRequired) GetActualValue() BACnetEventTransiti /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAckRequired factory function for _BACnetConstructedDataAckRequired -func NewBACnetConstructedDataAckRequired(ackRequired BACnetEventTransitionBitsTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAckRequired { +func NewBACnetConstructedDataAckRequired( ackRequired BACnetEventTransitionBitsTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAckRequired { _result := &_BACnetConstructedDataAckRequired{ - AckRequired: ackRequired, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + AckRequired: ackRequired, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAckRequired(ackRequired BACnetEventTransitionBitsTa // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAckRequired(structType interface{}) BACnetConstructedDataAckRequired { - if casted, ok := structType.(BACnetConstructedDataAckRequired); ok { + if casted, ok := structType.(BACnetConstructedDataAckRequired); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAckRequired); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAckRequired) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataAckRequired) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAckRequiredParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("ackRequired"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for ackRequired") } - _ackRequired, _ackRequiredErr := BACnetEventTransitionBitsTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_ackRequired, _ackRequiredErr := BACnetEventTransitionBitsTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _ackRequiredErr != nil { return nil, errors.Wrap(_ackRequiredErr, "Error parsing 'ackRequired' field of BACnetConstructedDataAckRequired") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAckRequiredParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataAckRequired{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, AckRequired: ackRequired, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAckRequired) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAckRequired") } - // Simple Field (ackRequired) - if pushErr := writeBuffer.PushContext("ackRequired"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for ackRequired") - } - _ackRequiredErr := writeBuffer.WriteSerializable(ctx, m.GetAckRequired()) - if popErr := writeBuffer.PopContext("ackRequired"); popErr != nil { - return errors.Wrap(popErr, "Error popping for ackRequired") - } - if _ackRequiredErr != nil { - return errors.Wrap(_ackRequiredErr, "Error serializing 'ackRequired' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (ackRequired) + if pushErr := writeBuffer.PushContext("ackRequired"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for ackRequired") + } + _ackRequiredErr := writeBuffer.WriteSerializable(ctx, m.GetAckRequired()) + if popErr := writeBuffer.PopContext("ackRequired"); popErr != nil { + return errors.Wrap(popErr, "Error popping for ackRequired") + } + if _ackRequiredErr != nil { + return errors.Wrap(_ackRequiredErr, "Error serializing 'ackRequired' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAckRequired"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAckRequired") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAckRequired) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAckRequired) isBACnetConstructedDataAckRequired() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAckRequired) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAckedTransitions.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAckedTransitions.go index ed562d449ee..180aa7432d2 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAckedTransitions.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAckedTransitions.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAckedTransitions is the corresponding interface of BACnetConstructedDataAckedTransitions type BACnetConstructedDataAckedTransitions interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAckedTransitionsExactly interface { // _BACnetConstructedDataAckedTransitions is the data-structure of this message type _BACnetConstructedDataAckedTransitions struct { *_BACnetConstructedData - AckedTransitions BACnetEventTransitionBitsTagged + AckedTransitions BACnetEventTransitionBitsTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAckedTransitions) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataAckedTransitions) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataAckedTransitions) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ACKED_TRANSITIONS -} +func (m *_BACnetConstructedDataAckedTransitions) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ACKED_TRANSITIONS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAckedTransitions) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAckedTransitions) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAckedTransitions) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAckedTransitions) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAckedTransitions) GetActualValue() BACnetEventTra /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAckedTransitions factory function for _BACnetConstructedDataAckedTransitions -func NewBACnetConstructedDataAckedTransitions(ackedTransitions BACnetEventTransitionBitsTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAckedTransitions { +func NewBACnetConstructedDataAckedTransitions( ackedTransitions BACnetEventTransitionBitsTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAckedTransitions { _result := &_BACnetConstructedDataAckedTransitions{ - AckedTransitions: ackedTransitions, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + AckedTransitions: ackedTransitions, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAckedTransitions(ackedTransitions BACnetEventTransi // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAckedTransitions(structType interface{}) BACnetConstructedDataAckedTransitions { - if casted, ok := structType.(BACnetConstructedDataAckedTransitions); ok { + if casted, ok := structType.(BACnetConstructedDataAckedTransitions); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAckedTransitions); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAckedTransitions) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetConstructedDataAckedTransitions) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAckedTransitionsParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("ackedTransitions"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for ackedTransitions") } - _ackedTransitions, _ackedTransitionsErr := BACnetEventTransitionBitsTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_ackedTransitions, _ackedTransitionsErr := BACnetEventTransitionBitsTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _ackedTransitionsErr != nil { return nil, errors.Wrap(_ackedTransitionsErr, "Error parsing 'ackedTransitions' field of BACnetConstructedDataAckedTransitions") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAckedTransitionsParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_BACnetConstructedDataAckedTransitions{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, AckedTransitions: ackedTransitions, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAckedTransitions) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAckedTransitions") } - // Simple Field (ackedTransitions) - if pushErr := writeBuffer.PushContext("ackedTransitions"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for ackedTransitions") - } - _ackedTransitionsErr := writeBuffer.WriteSerializable(ctx, m.GetAckedTransitions()) - if popErr := writeBuffer.PopContext("ackedTransitions"); popErr != nil { - return errors.Wrap(popErr, "Error popping for ackedTransitions") - } - if _ackedTransitionsErr != nil { - return errors.Wrap(_ackedTransitionsErr, "Error serializing 'ackedTransitions' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (ackedTransitions) + if pushErr := writeBuffer.PushContext("ackedTransitions"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for ackedTransitions") + } + _ackedTransitionsErr := writeBuffer.WriteSerializable(ctx, m.GetAckedTransitions()) + if popErr := writeBuffer.PopContext("ackedTransitions"); popErr != nil { + return errors.Wrap(popErr, "Error popping for ackedTransitions") + } + if _ackedTransitionsErr != nil { + return errors.Wrap(_ackedTransitionsErr, "Error serializing 'ackedTransitions' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAckedTransitions"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAckedTransitions") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAckedTransitions) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAckedTransitions) isBACnetConstructedDataAckedTransitions() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAckedTransitions) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAction.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAction.go index 163a87b2747..4d3b97de353 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAction.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAction.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAction is the corresponding interface of BACnetConstructedDataAction type BACnetConstructedDataAction interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataActionExactly interface { // _BACnetConstructedDataAction is the data-structure of this message type _BACnetConstructedDataAction struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - ActionLists []BACnetActionList + NumberOfDataElements BACnetApplicationTagUnsignedInteger + ActionLists []BACnetActionList } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAction) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataAction) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataAction) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ACTION -} +func (m *_BACnetConstructedDataAction) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ACTION} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAction) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAction) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAction) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAction) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataAction) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAction factory function for _BACnetConstructedDataAction -func NewBACnetConstructedDataAction(numberOfDataElements BACnetApplicationTagUnsignedInteger, actionLists []BACnetActionList, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAction { +func NewBACnetConstructedDataAction( numberOfDataElements BACnetApplicationTagUnsignedInteger , actionLists []BACnetActionList , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAction { _result := &_BACnetConstructedDataAction{ - NumberOfDataElements: numberOfDataElements, - ActionLists: actionLists, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + ActionLists: actionLists, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataAction(numberOfDataElements BACnetApplicationTagUns // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAction(structType interface{}) BACnetConstructedDataAction { - if casted, ok := structType.(BACnetConstructedDataAction); ok { + if casted, ok := structType.(BACnetConstructedDataAction); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAction); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataAction) GetLengthInBits(ctx context.Context) uint return lengthInBits } + func (m *_BACnetConstructedDataAction) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataActionParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataActionParseWithBuffer(ctx context.Context, readBuffer // Terminated array var actionLists []BACnetActionList { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetActionListParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetActionListParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'actionLists' field of BACnetConstructedDataAction") } @@ -235,11 +237,11 @@ func BACnetConstructedDataActionParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_BACnetConstructedDataAction{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - ActionLists: actionLists, + ActionLists: actionLists, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataAction) SerializeWithWriteBuffer(ctx context.Cont if pushErr := writeBuffer.PushContext("BACnetConstructedDataAction"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAction") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (actionLists) - if pushErr := writeBuffer.PushContext("actionLists", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for actionLists") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetActionLists() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetActionLists()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'actionLists' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("actionLists", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for actionLists") + } + + // Array Field (actionLists) + if pushErr := writeBuffer.PushContext("actionLists", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for actionLists") + } + for _curItem, _element := range m.GetActionLists() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetActionLists()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'actionLists' field") } + } + if popErr := writeBuffer.PopContext("actionLists", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for actionLists") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAction"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAction") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataAction) SerializeWithWriteBuffer(ctx context.Cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAction) isBACnetConstructedDataAction() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataAction) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActionText.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActionText.go index fa1d8442d0b..dbf24f6d32f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActionText.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActionText.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataActionText is the corresponding interface of BACnetConstructedDataActionText type BACnetConstructedDataActionText interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataActionTextExactly interface { // _BACnetConstructedDataActionText is the data-structure of this message type _BACnetConstructedDataActionText struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - ActionText []BACnetApplicationTagCharacterString + NumberOfDataElements BACnetApplicationTagUnsignedInteger + ActionText []BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataActionText) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataActionText) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataActionText) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ACTION_TEXT -} +func (m *_BACnetConstructedDataActionText) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ACTION_TEXT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataActionText) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataActionText) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataActionText) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataActionText) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataActionText) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataActionText factory function for _BACnetConstructedDataActionText -func NewBACnetConstructedDataActionText(numberOfDataElements BACnetApplicationTagUnsignedInteger, actionText []BACnetApplicationTagCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataActionText { +func NewBACnetConstructedDataActionText( numberOfDataElements BACnetApplicationTagUnsignedInteger , actionText []BACnetApplicationTagCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataActionText { _result := &_BACnetConstructedDataActionText{ - NumberOfDataElements: numberOfDataElements, - ActionText: actionText, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + ActionText: actionText, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataActionText(numberOfDataElements BACnetApplicationTa // Deprecated: use the interface for direct cast func CastBACnetConstructedDataActionText(structType interface{}) BACnetConstructedDataActionText { - if casted, ok := structType.(BACnetConstructedDataActionText); ok { + if casted, ok := structType.(BACnetConstructedDataActionText); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataActionText); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataActionText) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataActionText) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataActionTextParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataActionTextParseWithBuffer(ctx context.Context, readBuf // Terminated array var actionText []BACnetApplicationTagCharacterString { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'actionText' field of BACnetConstructedDataActionText") } @@ -235,11 +237,11 @@ func BACnetConstructedDataActionTextParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetConstructedDataActionText{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - ActionText: actionText, + ActionText: actionText, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataActionText) SerializeWithWriteBuffer(ctx context. if pushErr := writeBuffer.PushContext("BACnetConstructedDataActionText"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataActionText") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (actionText) - if pushErr := writeBuffer.PushContext("actionText", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for actionText") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetActionText() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetActionText()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'actionText' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("actionText", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for actionText") + } + + // Array Field (actionText) + if pushErr := writeBuffer.PushContext("actionText", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for actionText") + } + for _curItem, _element := range m.GetActionText() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetActionText()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'actionText' field") } + } + if popErr := writeBuffer.PopContext("actionText", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for actionText") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataActionText"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataActionText") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataActionText) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataActionText) isBACnetConstructedDataActionText() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataActionText) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActivationTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActivationTime.go index 2f2f325af2b..e45d36da50f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActivationTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActivationTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataActivationTime is the corresponding interface of BACnetConstructedDataActivationTime type BACnetConstructedDataActivationTime interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataActivationTimeExactly interface { // _BACnetConstructedDataActivationTime is the data-structure of this message type _BACnetConstructedDataActivationTime struct { *_BACnetConstructedData - ActivationTime BACnetDateTime + ActivationTime BACnetDateTime } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataActivationTime) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataActivationTime) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataActivationTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ACTIVATION_TIME -} +func (m *_BACnetConstructedDataActivationTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ACTIVATION_TIME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataActivationTime) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataActivationTime) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataActivationTime) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataActivationTime) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataActivationTime) GetActualValue() BACnetDateTime { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataActivationTime factory function for _BACnetConstructedDataActivationTime -func NewBACnetConstructedDataActivationTime(activationTime BACnetDateTime, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataActivationTime { +func NewBACnetConstructedDataActivationTime( activationTime BACnetDateTime , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataActivationTime { _result := &_BACnetConstructedDataActivationTime{ - ActivationTime: activationTime, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ActivationTime: activationTime, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataActivationTime(activationTime BACnetDateTime, openi // Deprecated: use the interface for direct cast func CastBACnetConstructedDataActivationTime(structType interface{}) BACnetConstructedDataActivationTime { - if casted, ok := structType.(BACnetConstructedDataActivationTime); ok { + if casted, ok := structType.(BACnetConstructedDataActivationTime); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataActivationTime); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataActivationTime) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConstructedDataActivationTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataActivationTimeParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("activationTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for activationTime") } - _activationTime, _activationTimeErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) +_activationTime, _activationTimeErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) if _activationTimeErr != nil { return nil, errors.Wrap(_activationTimeErr, "Error parsing 'activationTime' field of BACnetConstructedDataActivationTime") } @@ -186,7 +188,7 @@ func BACnetConstructedDataActivationTimeParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetConstructedDataActivationTime{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ActivationTime: activationTime, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataActivationTime) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataActivationTime") } - // Simple Field (activationTime) - if pushErr := writeBuffer.PushContext("activationTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for activationTime") - } - _activationTimeErr := writeBuffer.WriteSerializable(ctx, m.GetActivationTime()) - if popErr := writeBuffer.PopContext("activationTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for activationTime") - } - if _activationTimeErr != nil { - return errors.Wrap(_activationTimeErr, "Error serializing 'activationTime' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (activationTime) + if pushErr := writeBuffer.PushContext("activationTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for activationTime") + } + _activationTimeErr := writeBuffer.WriteSerializable(ctx, m.GetActivationTime()) + if popErr := writeBuffer.PopContext("activationTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for activationTime") + } + if _activationTimeErr != nil { + return errors.Wrap(_activationTimeErr, "Error serializing 'activationTime' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataActivationTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataActivationTime") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataActivationTime) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataActivationTime) isBACnetConstructedDataActivationTime() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataActivationTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActiveAuthenticationPolicy.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActiveAuthenticationPolicy.go index 13b6f19ddbe..fed76f0407c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActiveAuthenticationPolicy.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActiveAuthenticationPolicy.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataActiveAuthenticationPolicy is the corresponding interface of BACnetConstructedDataActiveAuthenticationPolicy type BACnetConstructedDataActiveAuthenticationPolicy interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataActiveAuthenticationPolicyExactly interface { // _BACnetConstructedDataActiveAuthenticationPolicy is the data-structure of this message type _BACnetConstructedDataActiveAuthenticationPolicy struct { *_BACnetConstructedData - ActiveAuthenticationPolicy BACnetApplicationTagUnsignedInteger + ActiveAuthenticationPolicy BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataActiveAuthenticationPolicy) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataActiveAuthenticationPolicy) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataActiveAuthenticationPolicy) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ACTIVE_AUTHENTICATION_POLICY -} +func (m *_BACnetConstructedDataActiveAuthenticationPolicy) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ACTIVE_AUTHENTICATION_POLICY} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataActiveAuthenticationPolicy) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataActiveAuthenticationPolicy) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataActiveAuthenticationPolicy) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataActiveAuthenticationPolicy) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataActiveAuthenticationPolicy) GetActualValue() BACn /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataActiveAuthenticationPolicy factory function for _BACnetConstructedDataActiveAuthenticationPolicy -func NewBACnetConstructedDataActiveAuthenticationPolicy(activeAuthenticationPolicy BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataActiveAuthenticationPolicy { +func NewBACnetConstructedDataActiveAuthenticationPolicy( activeAuthenticationPolicy BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataActiveAuthenticationPolicy { _result := &_BACnetConstructedDataActiveAuthenticationPolicy{ ActiveAuthenticationPolicy: activeAuthenticationPolicy, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataActiveAuthenticationPolicy(activeAuthenticationPoli // Deprecated: use the interface for direct cast func CastBACnetConstructedDataActiveAuthenticationPolicy(structType interface{}) BACnetConstructedDataActiveAuthenticationPolicy { - if casted, ok := structType.(BACnetConstructedDataActiveAuthenticationPolicy); ok { + if casted, ok := structType.(BACnetConstructedDataActiveAuthenticationPolicy); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataActiveAuthenticationPolicy); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataActiveAuthenticationPolicy) GetLengthInBits(ctx c return lengthInBits } + func (m *_BACnetConstructedDataActiveAuthenticationPolicy) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataActiveAuthenticationPolicyParseWithBuffer(ctx context. if pullErr := readBuffer.PullContext("activeAuthenticationPolicy"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for activeAuthenticationPolicy") } - _activeAuthenticationPolicy, _activeAuthenticationPolicyErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_activeAuthenticationPolicy, _activeAuthenticationPolicyErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _activeAuthenticationPolicyErr != nil { return nil, errors.Wrap(_activeAuthenticationPolicyErr, "Error parsing 'activeAuthenticationPolicy' field of BACnetConstructedDataActiveAuthenticationPolicy") } @@ -186,7 +188,7 @@ func BACnetConstructedDataActiveAuthenticationPolicyParseWithBuffer(ctx context. // Create a partially initialized instance _child := &_BACnetConstructedDataActiveAuthenticationPolicy{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ActiveAuthenticationPolicy: activeAuthenticationPolicy, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataActiveAuthenticationPolicy) SerializeWithWriteBuf return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataActiveAuthenticationPolicy") } - // Simple Field (activeAuthenticationPolicy) - if pushErr := writeBuffer.PushContext("activeAuthenticationPolicy"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for activeAuthenticationPolicy") - } - _activeAuthenticationPolicyErr := writeBuffer.WriteSerializable(ctx, m.GetActiveAuthenticationPolicy()) - if popErr := writeBuffer.PopContext("activeAuthenticationPolicy"); popErr != nil { - return errors.Wrap(popErr, "Error popping for activeAuthenticationPolicy") - } - if _activeAuthenticationPolicyErr != nil { - return errors.Wrap(_activeAuthenticationPolicyErr, "Error serializing 'activeAuthenticationPolicy' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (activeAuthenticationPolicy) + if pushErr := writeBuffer.PushContext("activeAuthenticationPolicy"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for activeAuthenticationPolicy") + } + _activeAuthenticationPolicyErr := writeBuffer.WriteSerializable(ctx, m.GetActiveAuthenticationPolicy()) + if popErr := writeBuffer.PopContext("activeAuthenticationPolicy"); popErr != nil { + return errors.Wrap(popErr, "Error popping for activeAuthenticationPolicy") + } + if _activeAuthenticationPolicyErr != nil { + return errors.Wrap(_activeAuthenticationPolicyErr, "Error serializing 'activeAuthenticationPolicy' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataActiveAuthenticationPolicy"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataActiveAuthenticationPolicy") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataActiveAuthenticationPolicy) SerializeWithWriteBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataActiveAuthenticationPolicy) isBACnetConstructedDataActiveAuthenticationPolicy() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataActiveAuthenticationPolicy) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActiveCOVMultipleSubscriptions.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActiveCOVMultipleSubscriptions.go index 118a815d768..766eb49dc05 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActiveCOVMultipleSubscriptions.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActiveCOVMultipleSubscriptions.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataActiveCOVMultipleSubscriptions is the corresponding interface of BACnetConstructedDataActiveCOVMultipleSubscriptions type BACnetConstructedDataActiveCOVMultipleSubscriptions interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataActiveCOVMultipleSubscriptionsExactly interface { // _BACnetConstructedDataActiveCOVMultipleSubscriptions is the data-structure of this message type _BACnetConstructedDataActiveCOVMultipleSubscriptions struct { *_BACnetConstructedData - ActiveCOVMultipleSubscriptions []BACnetCOVMultipleSubscription + ActiveCOVMultipleSubscriptions []BACnetCOVMultipleSubscription } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataActiveCOVMultipleSubscriptions) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataActiveCOVMultipleSubscriptions) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataActiveCOVMultipleSubscriptions) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ACTIVE_COV_MULTIPLE_SUBSCRIPTIONS -} +func (m *_BACnetConstructedDataActiveCOVMultipleSubscriptions) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ACTIVE_COV_MULTIPLE_SUBSCRIPTIONS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataActiveCOVMultipleSubscriptions) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataActiveCOVMultipleSubscriptions) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataActiveCOVMultipleSubscriptions) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataActiveCOVMultipleSubscriptions) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataActiveCOVMultipleSubscriptions) GetActiveCOVMulti /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataActiveCOVMultipleSubscriptions factory function for _BACnetConstructedDataActiveCOVMultipleSubscriptions -func NewBACnetConstructedDataActiveCOVMultipleSubscriptions(activeCOVMultipleSubscriptions []BACnetCOVMultipleSubscription, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataActiveCOVMultipleSubscriptions { +func NewBACnetConstructedDataActiveCOVMultipleSubscriptions( activeCOVMultipleSubscriptions []BACnetCOVMultipleSubscription , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataActiveCOVMultipleSubscriptions { _result := &_BACnetConstructedDataActiveCOVMultipleSubscriptions{ ActiveCOVMultipleSubscriptions: activeCOVMultipleSubscriptions, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataActiveCOVMultipleSubscriptions(activeCOVMultipleSub // Deprecated: use the interface for direct cast func CastBACnetConstructedDataActiveCOVMultipleSubscriptions(structType interface{}) BACnetConstructedDataActiveCOVMultipleSubscriptions { - if casted, ok := structType.(BACnetConstructedDataActiveCOVMultipleSubscriptions); ok { + if casted, ok := structType.(BACnetConstructedDataActiveCOVMultipleSubscriptions); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataActiveCOVMultipleSubscriptions); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataActiveCOVMultipleSubscriptions) GetLengthInBits(c return lengthInBits } + func (m *_BACnetConstructedDataActiveCOVMultipleSubscriptions) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataActiveCOVMultipleSubscriptionsParseWithBuffer(ctx cont // Terminated array var activeCOVMultipleSubscriptions []BACnetCOVMultipleSubscription { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetCOVMultipleSubscriptionParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetCOVMultipleSubscriptionParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'activeCOVMultipleSubscriptions' field of BACnetConstructedDataActiveCOVMultipleSubscriptions") } @@ -173,7 +175,7 @@ func BACnetConstructedDataActiveCOVMultipleSubscriptionsParseWithBuffer(ctx cont // Create a partially initialized instance _child := &_BACnetConstructedDataActiveCOVMultipleSubscriptions{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ActiveCOVMultipleSubscriptions: activeCOVMultipleSubscriptions, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataActiveCOVMultipleSubscriptions) SerializeWithWrit return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataActiveCOVMultipleSubscriptions") } - // Array Field (activeCOVMultipleSubscriptions) - if pushErr := writeBuffer.PushContext("activeCOVMultipleSubscriptions", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for activeCOVMultipleSubscriptions") - } - for _curItem, _element := range m.GetActiveCOVMultipleSubscriptions() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetActiveCOVMultipleSubscriptions()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'activeCOVMultipleSubscriptions' field") - } - } - if popErr := writeBuffer.PopContext("activeCOVMultipleSubscriptions", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for activeCOVMultipleSubscriptions") + // Array Field (activeCOVMultipleSubscriptions) + if pushErr := writeBuffer.PushContext("activeCOVMultipleSubscriptions", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for activeCOVMultipleSubscriptions") + } + for _curItem, _element := range m.GetActiveCOVMultipleSubscriptions() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetActiveCOVMultipleSubscriptions()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'activeCOVMultipleSubscriptions' field") } + } + if popErr := writeBuffer.PopContext("activeCOVMultipleSubscriptions", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for activeCOVMultipleSubscriptions") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataActiveCOVMultipleSubscriptions"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataActiveCOVMultipleSubscriptions") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataActiveCOVMultipleSubscriptions) SerializeWithWrit return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataActiveCOVMultipleSubscriptions) isBACnetConstructedDataActiveCOVMultipleSubscriptions() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataActiveCOVMultipleSubscriptions) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActiveCOVSubscriptions.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActiveCOVSubscriptions.go index 6d9b4909792..8e9a2954fbf 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActiveCOVSubscriptions.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActiveCOVSubscriptions.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataActiveCOVSubscriptions is the corresponding interface of BACnetConstructedDataActiveCOVSubscriptions type BACnetConstructedDataActiveCOVSubscriptions interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataActiveCOVSubscriptionsExactly interface { // _BACnetConstructedDataActiveCOVSubscriptions is the data-structure of this message type _BACnetConstructedDataActiveCOVSubscriptions struct { *_BACnetConstructedData - ActiveCOVSubscriptions []BACnetCOVSubscription + ActiveCOVSubscriptions []BACnetCOVSubscription } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataActiveCOVSubscriptions) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataActiveCOVSubscriptions) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataActiveCOVSubscriptions) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ACTIVE_COV_SUBSCRIPTIONS -} +func (m *_BACnetConstructedDataActiveCOVSubscriptions) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ACTIVE_COV_SUBSCRIPTIONS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataActiveCOVSubscriptions) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataActiveCOVSubscriptions) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataActiveCOVSubscriptions) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataActiveCOVSubscriptions) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataActiveCOVSubscriptions) GetActiveCOVSubscriptions /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataActiveCOVSubscriptions factory function for _BACnetConstructedDataActiveCOVSubscriptions -func NewBACnetConstructedDataActiveCOVSubscriptions(activeCOVSubscriptions []BACnetCOVSubscription, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataActiveCOVSubscriptions { +func NewBACnetConstructedDataActiveCOVSubscriptions( activeCOVSubscriptions []BACnetCOVSubscription , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataActiveCOVSubscriptions { _result := &_BACnetConstructedDataActiveCOVSubscriptions{ ActiveCOVSubscriptions: activeCOVSubscriptions, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataActiveCOVSubscriptions(activeCOVSubscriptions []BAC // Deprecated: use the interface for direct cast func CastBACnetConstructedDataActiveCOVSubscriptions(structType interface{}) BACnetConstructedDataActiveCOVSubscriptions { - if casted, ok := structType.(BACnetConstructedDataActiveCOVSubscriptions); ok { + if casted, ok := structType.(BACnetConstructedDataActiveCOVSubscriptions); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataActiveCOVSubscriptions); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataActiveCOVSubscriptions) GetLengthInBits(ctx conte return lengthInBits } + func (m *_BACnetConstructedDataActiveCOVSubscriptions) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataActiveCOVSubscriptionsParseWithBuffer(ctx context.Cont // Terminated array var activeCOVSubscriptions []BACnetCOVSubscription { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetCOVSubscriptionParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetCOVSubscriptionParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'activeCOVSubscriptions' field of BACnetConstructedDataActiveCOVSubscriptions") } @@ -173,7 +175,7 @@ func BACnetConstructedDataActiveCOVSubscriptionsParseWithBuffer(ctx context.Cont // Create a partially initialized instance _child := &_BACnetConstructedDataActiveCOVSubscriptions{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ActiveCOVSubscriptions: activeCOVSubscriptions, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataActiveCOVSubscriptions) SerializeWithWriteBuffer( return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataActiveCOVSubscriptions") } - // Array Field (activeCOVSubscriptions) - if pushErr := writeBuffer.PushContext("activeCOVSubscriptions", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for activeCOVSubscriptions") - } - for _curItem, _element := range m.GetActiveCOVSubscriptions() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetActiveCOVSubscriptions()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'activeCOVSubscriptions' field") - } - } - if popErr := writeBuffer.PopContext("activeCOVSubscriptions", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for activeCOVSubscriptions") + // Array Field (activeCOVSubscriptions) + if pushErr := writeBuffer.PushContext("activeCOVSubscriptions", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for activeCOVSubscriptions") + } + for _curItem, _element := range m.GetActiveCOVSubscriptions() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetActiveCOVSubscriptions()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'activeCOVSubscriptions' field") } + } + if popErr := writeBuffer.PopContext("activeCOVSubscriptions", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for activeCOVSubscriptions") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataActiveCOVSubscriptions"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataActiveCOVSubscriptions") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataActiveCOVSubscriptions) SerializeWithWriteBuffer( return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataActiveCOVSubscriptions) isBACnetConstructedDataActiveCOVSubscriptions() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataActiveCOVSubscriptions) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActiveText.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActiveText.go index f7f57cfeb5b..88fa28d4bdb 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActiveText.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActiveText.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataActiveText is the corresponding interface of BACnetConstructedDataActiveText type BACnetConstructedDataActiveText interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataActiveTextExactly interface { // _BACnetConstructedDataActiveText is the data-structure of this message type _BACnetConstructedDataActiveText struct { *_BACnetConstructedData - ActiveText BACnetApplicationTagCharacterString + ActiveText BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataActiveText) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataActiveText) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataActiveText) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ACTIVE_TEXT -} +func (m *_BACnetConstructedDataActiveText) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ACTIVE_TEXT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataActiveText) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataActiveText) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataActiveText) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataActiveText) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataActiveText) GetActualValue() BACnetApplicationTag /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataActiveText factory function for _BACnetConstructedDataActiveText -func NewBACnetConstructedDataActiveText(activeText BACnetApplicationTagCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataActiveText { +func NewBACnetConstructedDataActiveText( activeText BACnetApplicationTagCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataActiveText { _result := &_BACnetConstructedDataActiveText{ - ActiveText: activeText, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ActiveText: activeText, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataActiveText(activeText BACnetApplicationTagCharacter // Deprecated: use the interface for direct cast func CastBACnetConstructedDataActiveText(structType interface{}) BACnetConstructedDataActiveText { - if casted, ok := structType.(BACnetConstructedDataActiveText); ok { + if casted, ok := structType.(BACnetConstructedDataActiveText); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataActiveText); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataActiveText) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataActiveText) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataActiveTextParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("activeText"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for activeText") } - _activeText, _activeTextErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_activeText, _activeTextErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _activeTextErr != nil { return nil, errors.Wrap(_activeTextErr, "Error parsing 'activeText' field of BACnetConstructedDataActiveText") } @@ -186,7 +188,7 @@ func BACnetConstructedDataActiveTextParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetConstructedDataActiveText{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ActiveText: activeText, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataActiveText) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataActiveText") } - // Simple Field (activeText) - if pushErr := writeBuffer.PushContext("activeText"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for activeText") - } - _activeTextErr := writeBuffer.WriteSerializable(ctx, m.GetActiveText()) - if popErr := writeBuffer.PopContext("activeText"); popErr != nil { - return errors.Wrap(popErr, "Error popping for activeText") - } - if _activeTextErr != nil { - return errors.Wrap(_activeTextErr, "Error serializing 'activeText' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (activeText) + if pushErr := writeBuffer.PushContext("activeText"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for activeText") + } + _activeTextErr := writeBuffer.WriteSerializable(ctx, m.GetActiveText()) + if popErr := writeBuffer.PopContext("activeText"); popErr != nil { + return errors.Wrap(popErr, "Error popping for activeText") + } + if _activeTextErr != nil { + return errors.Wrap(_activeTextErr, "Error serializing 'activeText' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataActiveText"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataActiveText") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataActiveText) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataActiveText) isBACnetConstructedDataActiveText() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataActiveText) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActiveVTSessions.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActiveVTSessions.go index a89180bcf33..185989965a9 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActiveVTSessions.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActiveVTSessions.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataActiveVTSessions is the corresponding interface of BACnetConstructedDataActiveVTSessions type BACnetConstructedDataActiveVTSessions interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataActiveVTSessionsExactly interface { // _BACnetConstructedDataActiveVTSessions is the data-structure of this message type _BACnetConstructedDataActiveVTSessions struct { *_BACnetConstructedData - ActiveVTSession []BACnetVTSession + ActiveVTSession []BACnetVTSession } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataActiveVTSessions) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataActiveVTSessions) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataActiveVTSessions) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ACTIVE_VT_SESSIONS -} +func (m *_BACnetConstructedDataActiveVTSessions) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ACTIVE_VT_SESSIONS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataActiveVTSessions) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataActiveVTSessions) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataActiveVTSessions) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataActiveVTSessions) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataActiveVTSessions) GetActiveVTSession() []BACnetVT /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataActiveVTSessions factory function for _BACnetConstructedDataActiveVTSessions -func NewBACnetConstructedDataActiveVTSessions(activeVTSession []BACnetVTSession, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataActiveVTSessions { +func NewBACnetConstructedDataActiveVTSessions( activeVTSession []BACnetVTSession , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataActiveVTSessions { _result := &_BACnetConstructedDataActiveVTSessions{ - ActiveVTSession: activeVTSession, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ActiveVTSession: activeVTSession, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataActiveVTSessions(activeVTSession []BACnetVTSession, // Deprecated: use the interface for direct cast func CastBACnetConstructedDataActiveVTSessions(structType interface{}) BACnetConstructedDataActiveVTSessions { - if casted, ok := structType.(BACnetConstructedDataActiveVTSessions); ok { + if casted, ok := structType.(BACnetConstructedDataActiveVTSessions); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataActiveVTSessions); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataActiveVTSessions) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetConstructedDataActiveVTSessions) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataActiveVTSessionsParseWithBuffer(ctx context.Context, r // Terminated array var activeVTSession []BACnetVTSession { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetVTSessionParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetVTSessionParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'activeVTSession' field of BACnetConstructedDataActiveVTSessions") } @@ -173,7 +175,7 @@ func BACnetConstructedDataActiveVTSessionsParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_BACnetConstructedDataActiveVTSessions{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ActiveVTSession: activeVTSession, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataActiveVTSessions) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataActiveVTSessions") } - // Array Field (activeVTSession) - if pushErr := writeBuffer.PushContext("activeVTSession", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for activeVTSession") - } - for _curItem, _element := range m.GetActiveVTSession() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetActiveVTSession()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'activeVTSession' field") - } - } - if popErr := writeBuffer.PopContext("activeVTSession", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for activeVTSession") + // Array Field (activeVTSession) + if pushErr := writeBuffer.PushContext("activeVTSession", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for activeVTSession") + } + for _curItem, _element := range m.GetActiveVTSession() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetActiveVTSession()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'activeVTSession' field") } + } + if popErr := writeBuffer.PopContext("activeVTSession", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for activeVTSession") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataActiveVTSessions"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataActiveVTSessions") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataActiveVTSessions) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataActiveVTSessions) isBACnetConstructedDataActiveVTSessions() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataActiveVTSessions) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActualShedLevel.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActualShedLevel.go index 28ef15b5830..7d46f2ee171 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActualShedLevel.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataActualShedLevel.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataActualShedLevel is the corresponding interface of BACnetConstructedDataActualShedLevel type BACnetConstructedDataActualShedLevel interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataActualShedLevelExactly interface { // _BACnetConstructedDataActualShedLevel is the data-structure of this message type _BACnetConstructedDataActualShedLevel struct { *_BACnetConstructedData - ActualShedLevel BACnetShedLevel + ActualShedLevel BACnetShedLevel } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataActualShedLevel) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataActualShedLevel) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataActualShedLevel) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ACTUAL_SHED_LEVEL -} +func (m *_BACnetConstructedDataActualShedLevel) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ACTUAL_SHED_LEVEL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataActualShedLevel) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataActualShedLevel) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataActualShedLevel) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataActualShedLevel) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataActualShedLevel) GetActualValue() BACnetShedLevel /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataActualShedLevel factory function for _BACnetConstructedDataActualShedLevel -func NewBACnetConstructedDataActualShedLevel(actualShedLevel BACnetShedLevel, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataActualShedLevel { +func NewBACnetConstructedDataActualShedLevel( actualShedLevel BACnetShedLevel , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataActualShedLevel { _result := &_BACnetConstructedDataActualShedLevel{ - ActualShedLevel: actualShedLevel, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ActualShedLevel: actualShedLevel, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataActualShedLevel(actualShedLevel BACnetShedLevel, op // Deprecated: use the interface for direct cast func CastBACnetConstructedDataActualShedLevel(structType interface{}) BACnetConstructedDataActualShedLevel { - if casted, ok := structType.(BACnetConstructedDataActualShedLevel); ok { + if casted, ok := structType.(BACnetConstructedDataActualShedLevel); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataActualShedLevel); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataActualShedLevel) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetConstructedDataActualShedLevel) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataActualShedLevelParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("actualShedLevel"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for actualShedLevel") } - _actualShedLevel, _actualShedLevelErr := BACnetShedLevelParseWithBuffer(ctx, readBuffer) +_actualShedLevel, _actualShedLevelErr := BACnetShedLevelParseWithBuffer(ctx, readBuffer) if _actualShedLevelErr != nil { return nil, errors.Wrap(_actualShedLevelErr, "Error parsing 'actualShedLevel' field of BACnetConstructedDataActualShedLevel") } @@ -186,7 +188,7 @@ func BACnetConstructedDataActualShedLevelParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetConstructedDataActualShedLevel{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ActualShedLevel: actualShedLevel, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataActualShedLevel) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataActualShedLevel") } - // Simple Field (actualShedLevel) - if pushErr := writeBuffer.PushContext("actualShedLevel"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for actualShedLevel") - } - _actualShedLevelErr := writeBuffer.WriteSerializable(ctx, m.GetActualShedLevel()) - if popErr := writeBuffer.PopContext("actualShedLevel"); popErr != nil { - return errors.Wrap(popErr, "Error popping for actualShedLevel") - } - if _actualShedLevelErr != nil { - return errors.Wrap(_actualShedLevelErr, "Error serializing 'actualShedLevel' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (actualShedLevel) + if pushErr := writeBuffer.PushContext("actualShedLevel"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for actualShedLevel") + } + _actualShedLevelErr := writeBuffer.WriteSerializable(ctx, m.GetActualShedLevel()) + if popErr := writeBuffer.PopContext("actualShedLevel"); popErr != nil { + return errors.Wrap(popErr, "Error popping for actualShedLevel") + } + if _actualShedLevelErr != nil { + return errors.Wrap(_actualShedLevelErr, "Error serializing 'actualShedLevel' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataActualShedLevel"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataActualShedLevel") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataActualShedLevel) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataActualShedLevel) isBACnetConstructedDataActualShedLevel() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataActualShedLevel) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAdjustValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAdjustValue.go index 672c4317eab..210327b8939 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAdjustValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAdjustValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAdjustValue is the corresponding interface of BACnetConstructedDataAdjustValue type BACnetConstructedDataAdjustValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAdjustValueExactly interface { // _BACnetConstructedDataAdjustValue is the data-structure of this message type _BACnetConstructedDataAdjustValue struct { *_BACnetConstructedData - AdjustValue BACnetApplicationTagSignedInteger + AdjustValue BACnetApplicationTagSignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAdjustValue) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataAdjustValue) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataAdjustValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ADJUST_VALUE -} +func (m *_BACnetConstructedDataAdjustValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ADJUST_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAdjustValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAdjustValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAdjustValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAdjustValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAdjustValue) GetActualValue() BACnetApplicationTa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAdjustValue factory function for _BACnetConstructedDataAdjustValue -func NewBACnetConstructedDataAdjustValue(adjustValue BACnetApplicationTagSignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAdjustValue { +func NewBACnetConstructedDataAdjustValue( adjustValue BACnetApplicationTagSignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAdjustValue { _result := &_BACnetConstructedDataAdjustValue{ - AdjustValue: adjustValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + AdjustValue: adjustValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAdjustValue(adjustValue BACnetApplicationTagSignedI // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAdjustValue(structType interface{}) BACnetConstructedDataAdjustValue { - if casted, ok := structType.(BACnetConstructedDataAdjustValue); ok { + if casted, ok := structType.(BACnetConstructedDataAdjustValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAdjustValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAdjustValue) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataAdjustValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAdjustValueParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("adjustValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for adjustValue") } - _adjustValue, _adjustValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_adjustValue, _adjustValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _adjustValueErr != nil { return nil, errors.Wrap(_adjustValueErr, "Error parsing 'adjustValue' field of BACnetConstructedDataAdjustValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAdjustValueParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataAdjustValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, AdjustValue: adjustValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAdjustValue) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAdjustValue") } - // Simple Field (adjustValue) - if pushErr := writeBuffer.PushContext("adjustValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for adjustValue") - } - _adjustValueErr := writeBuffer.WriteSerializable(ctx, m.GetAdjustValue()) - if popErr := writeBuffer.PopContext("adjustValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for adjustValue") - } - if _adjustValueErr != nil { - return errors.Wrap(_adjustValueErr, "Error serializing 'adjustValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (adjustValue) + if pushErr := writeBuffer.PushContext("adjustValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for adjustValue") + } + _adjustValueErr := writeBuffer.WriteSerializable(ctx, m.GetAdjustValue()) + if popErr := writeBuffer.PopContext("adjustValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for adjustValue") + } + if _adjustValueErr != nil { + return errors.Wrap(_adjustValueErr, "Error serializing 'adjustValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAdjustValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAdjustValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAdjustValue) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAdjustValue) isBACnetConstructedDataAdjustValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAdjustValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAlarmValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAlarmValue.go index 8d4eae28515..ffe5e37a28e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAlarmValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAlarmValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAlarmValue is the corresponding interface of BACnetConstructedDataAlarmValue type BACnetConstructedDataAlarmValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAlarmValueExactly interface { // _BACnetConstructedDataAlarmValue is the data-structure of this message type _BACnetConstructedDataAlarmValue struct { *_BACnetConstructedData - BinaryPv BACnetBinaryPVTagged + BinaryPv BACnetBinaryPVTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAlarmValue) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataAlarmValue) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataAlarmValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALARM_VALUE -} +func (m *_BACnetConstructedDataAlarmValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALARM_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAlarmValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAlarmValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAlarmValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAlarmValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAlarmValue) GetActualValue() BACnetBinaryPVTagged /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAlarmValue factory function for _BACnetConstructedDataAlarmValue -func NewBACnetConstructedDataAlarmValue(binaryPv BACnetBinaryPVTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAlarmValue { +func NewBACnetConstructedDataAlarmValue( binaryPv BACnetBinaryPVTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAlarmValue { _result := &_BACnetConstructedDataAlarmValue{ - BinaryPv: binaryPv, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + BinaryPv: binaryPv, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAlarmValue(binaryPv BACnetBinaryPVTagged, openingTa // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAlarmValue(structType interface{}) BACnetConstructedDataAlarmValue { - if casted, ok := structType.(BACnetConstructedDataAlarmValue); ok { + if casted, ok := structType.(BACnetConstructedDataAlarmValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAlarmValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAlarmValue) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataAlarmValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAlarmValueParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("binaryPv"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for binaryPv") } - _binaryPv, _binaryPvErr := BACnetBinaryPVTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_binaryPv, _binaryPvErr := BACnetBinaryPVTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _binaryPvErr != nil { return nil, errors.Wrap(_binaryPvErr, "Error parsing 'binaryPv' field of BACnetConstructedDataAlarmValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAlarmValueParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetConstructedDataAlarmValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, BinaryPv: binaryPv, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAlarmValue) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAlarmValue") } - // Simple Field (binaryPv) - if pushErr := writeBuffer.PushContext("binaryPv"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for binaryPv") - } - _binaryPvErr := writeBuffer.WriteSerializable(ctx, m.GetBinaryPv()) - if popErr := writeBuffer.PopContext("binaryPv"); popErr != nil { - return errors.Wrap(popErr, "Error popping for binaryPv") - } - if _binaryPvErr != nil { - return errors.Wrap(_binaryPvErr, "Error serializing 'binaryPv' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (binaryPv) + if pushErr := writeBuffer.PushContext("binaryPv"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for binaryPv") + } + _binaryPvErr := writeBuffer.WriteSerializable(ctx, m.GetBinaryPv()) + if popErr := writeBuffer.PopContext("binaryPv"); popErr != nil { + return errors.Wrap(popErr, "Error popping for binaryPv") + } + if _binaryPvErr != nil { + return errors.Wrap(_binaryPvErr, "Error serializing 'binaryPv' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAlarmValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAlarmValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAlarmValue) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAlarmValue) isBACnetConstructedDataAlarmValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAlarmValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAlarmValues.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAlarmValues.go index 7a20d22621f..8fbbea1fa93 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAlarmValues.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAlarmValues.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAlarmValues is the corresponding interface of BACnetConstructedDataAlarmValues type BACnetConstructedDataAlarmValues interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataAlarmValuesExactly interface { // _BACnetConstructedDataAlarmValues is the data-structure of this message type _BACnetConstructedDataAlarmValues struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - AlarmValues []BACnetLifeSafetyStateTagged + NumberOfDataElements BACnetApplicationTagUnsignedInteger + AlarmValues []BACnetLifeSafetyStateTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAlarmValues) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataAlarmValues) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataAlarmValues) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALARM_VALUES -} +func (m *_BACnetConstructedDataAlarmValues) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALARM_VALUES} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAlarmValues) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAlarmValues) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAlarmValues) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAlarmValues) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataAlarmValues) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAlarmValues factory function for _BACnetConstructedDataAlarmValues -func NewBACnetConstructedDataAlarmValues(numberOfDataElements BACnetApplicationTagUnsignedInteger, alarmValues []BACnetLifeSafetyStateTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAlarmValues { +func NewBACnetConstructedDataAlarmValues( numberOfDataElements BACnetApplicationTagUnsignedInteger , alarmValues []BACnetLifeSafetyStateTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAlarmValues { _result := &_BACnetConstructedDataAlarmValues{ - NumberOfDataElements: numberOfDataElements, - AlarmValues: alarmValues, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + AlarmValues: alarmValues, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataAlarmValues(numberOfDataElements BACnetApplicationT // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAlarmValues(structType interface{}) BACnetConstructedDataAlarmValues { - if casted, ok := structType.(BACnetConstructedDataAlarmValues); ok { + if casted, ok := structType.(BACnetConstructedDataAlarmValues); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAlarmValues); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataAlarmValues) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataAlarmValues) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataAlarmValuesParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataAlarmValuesParseWithBuffer(ctx context.Context, readBu // Terminated array var alarmValues []BACnetLifeSafetyStateTagged { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetLifeSafetyStateTaggedParseWithBuffer(ctx, readBuffer, uint8(0), TagClass_APPLICATION_TAGS) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetLifeSafetyStateTaggedParseWithBuffer(ctx, readBuffer , uint8(0) , TagClass_APPLICATION_TAGS ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'alarmValues' field of BACnetConstructedDataAlarmValues") } @@ -235,11 +237,11 @@ func BACnetConstructedDataAlarmValuesParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataAlarmValues{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - AlarmValues: alarmValues, + AlarmValues: alarmValues, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataAlarmValues) SerializeWithWriteBuffer(ctx context if pushErr := writeBuffer.PushContext("BACnetConstructedDataAlarmValues"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAlarmValues") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (alarmValues) - if pushErr := writeBuffer.PushContext("alarmValues", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for alarmValues") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetAlarmValues() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAlarmValues()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'alarmValues' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("alarmValues", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for alarmValues") + } + + // Array Field (alarmValues) + if pushErr := writeBuffer.PushContext("alarmValues", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for alarmValues") + } + for _curItem, _element := range m.GetAlarmValues() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAlarmValues()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'alarmValues' field") } + } + if popErr := writeBuffer.PopContext("alarmValues", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for alarmValues") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAlarmValues"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAlarmValues") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataAlarmValues) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAlarmValues) isBACnetConstructedDataAlarmValues() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataAlarmValues) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAlertEnrollmentAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAlertEnrollmentAll.go index fbf2eb568b4..17402671080 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAlertEnrollmentAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAlertEnrollmentAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAlertEnrollmentAll is the corresponding interface of BACnetConstructedDataAlertEnrollmentAll type BACnetConstructedDataAlertEnrollmentAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataAlertEnrollmentAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAlertEnrollmentAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ALERT_ENROLLMENT -} +func (m *_BACnetConstructedDataAlertEnrollmentAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ALERT_ENROLLMENT} -func (m *_BACnetConstructedDataAlertEnrollmentAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataAlertEnrollmentAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAlertEnrollmentAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAlertEnrollmentAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAlertEnrollmentAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAlertEnrollmentAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataAlertEnrollmentAll factory function for _BACnetConstructedDataAlertEnrollmentAll -func NewBACnetConstructedDataAlertEnrollmentAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAlertEnrollmentAll { +func NewBACnetConstructedDataAlertEnrollmentAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAlertEnrollmentAll { _result := &_BACnetConstructedDataAlertEnrollmentAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataAlertEnrollmentAll(openingTag BACnetOpeningTag, pee // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAlertEnrollmentAll(structType interface{}) BACnetConstructedDataAlertEnrollmentAll { - if casted, ok := structType.(BACnetConstructedDataAlertEnrollmentAll); ok { + if casted, ok := structType.(BACnetConstructedDataAlertEnrollmentAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAlertEnrollmentAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataAlertEnrollmentAll) GetLengthInBits(ctx context.C return lengthInBits } + func (m *_BACnetConstructedDataAlertEnrollmentAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataAlertEnrollmentAllParseWithBuffer(ctx context.Context, _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataAlertEnrollmentAllParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataAlertEnrollmentAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataAlertEnrollmentAll) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAlertEnrollmentAll) isBACnetConstructedDataAlertEnrollmentAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataAlertEnrollmentAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAlertEnrollmentPresentValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAlertEnrollmentPresentValue.go index bbd5421eb73..f29c47c44b5 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAlertEnrollmentPresentValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAlertEnrollmentPresentValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAlertEnrollmentPresentValue is the corresponding interface of BACnetConstructedDataAlertEnrollmentPresentValue type BACnetConstructedDataAlertEnrollmentPresentValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAlertEnrollmentPresentValueExactly interface { // _BACnetConstructedDataAlertEnrollmentPresentValue is the data-structure of this message type _BACnetConstructedDataAlertEnrollmentPresentValue struct { *_BACnetConstructedData - PresentValue BACnetApplicationTagObjectIdentifier + PresentValue BACnetApplicationTagObjectIdentifier } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAlertEnrollmentPresentValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ALERT_ENROLLMENT -} +func (m *_BACnetConstructedDataAlertEnrollmentPresentValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ALERT_ENROLLMENT} -func (m *_BACnetConstructedDataAlertEnrollmentPresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PRESENT_VALUE -} +func (m *_BACnetConstructedDataAlertEnrollmentPresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PRESENT_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAlertEnrollmentPresentValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAlertEnrollmentPresentValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAlertEnrollmentPresentValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAlertEnrollmentPresentValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAlertEnrollmentPresentValue) GetActualValue() BAC /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAlertEnrollmentPresentValue factory function for _BACnetConstructedDataAlertEnrollmentPresentValue -func NewBACnetConstructedDataAlertEnrollmentPresentValue(presentValue BACnetApplicationTagObjectIdentifier, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAlertEnrollmentPresentValue { +func NewBACnetConstructedDataAlertEnrollmentPresentValue( presentValue BACnetApplicationTagObjectIdentifier , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAlertEnrollmentPresentValue { _result := &_BACnetConstructedDataAlertEnrollmentPresentValue{ - PresentValue: presentValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PresentValue: presentValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAlertEnrollmentPresentValue(presentValue BACnetAppl // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAlertEnrollmentPresentValue(structType interface{}) BACnetConstructedDataAlertEnrollmentPresentValue { - if casted, ok := structType.(BACnetConstructedDataAlertEnrollmentPresentValue); ok { + if casted, ok := structType.(BACnetConstructedDataAlertEnrollmentPresentValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAlertEnrollmentPresentValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAlertEnrollmentPresentValue) GetLengthInBits(ctx return lengthInBits } + func (m *_BACnetConstructedDataAlertEnrollmentPresentValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAlertEnrollmentPresentValueParseWithBuffer(ctx context if pullErr := readBuffer.PullContext("presentValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for presentValue") } - _presentValue, _presentValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_presentValue, _presentValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _presentValueErr != nil { return nil, errors.Wrap(_presentValueErr, "Error parsing 'presentValue' field of BACnetConstructedDataAlertEnrollmentPresentValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAlertEnrollmentPresentValueParseWithBuffer(ctx context // Create a partially initialized instance _child := &_BACnetConstructedDataAlertEnrollmentPresentValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PresentValue: presentValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAlertEnrollmentPresentValue) SerializeWithWriteBu return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAlertEnrollmentPresentValue") } - // Simple Field (presentValue) - if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for presentValue") - } - _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) - if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for presentValue") - } - if _presentValueErr != nil { - return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (presentValue) + if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for presentValue") + } + _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) + if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for presentValue") + } + if _presentValueErr != nil { + return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAlertEnrollmentPresentValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAlertEnrollmentPresentValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAlertEnrollmentPresentValue) SerializeWithWriteBu return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAlertEnrollmentPresentValue) isBACnetConstructedDataAlertEnrollmentPresentValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAlertEnrollmentPresentValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAlignIntervals.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAlignIntervals.go index 780d4053ef0..3c59f960e37 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAlignIntervals.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAlignIntervals.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAlignIntervals is the corresponding interface of BACnetConstructedDataAlignIntervals type BACnetConstructedDataAlignIntervals interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAlignIntervalsExactly interface { // _BACnetConstructedDataAlignIntervals is the data-structure of this message type _BACnetConstructedDataAlignIntervals struct { *_BACnetConstructedData - AlignIntervals BACnetApplicationTagBoolean + AlignIntervals BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAlignIntervals) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataAlignIntervals) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataAlignIntervals) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALIGN_INTERVALS -} +func (m *_BACnetConstructedDataAlignIntervals) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALIGN_INTERVALS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAlignIntervals) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAlignIntervals) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAlignIntervals) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAlignIntervals) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAlignIntervals) GetActualValue() BACnetApplicatio /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAlignIntervals factory function for _BACnetConstructedDataAlignIntervals -func NewBACnetConstructedDataAlignIntervals(alignIntervals BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAlignIntervals { +func NewBACnetConstructedDataAlignIntervals( alignIntervals BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAlignIntervals { _result := &_BACnetConstructedDataAlignIntervals{ - AlignIntervals: alignIntervals, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + AlignIntervals: alignIntervals, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAlignIntervals(alignIntervals BACnetApplicationTagB // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAlignIntervals(structType interface{}) BACnetConstructedDataAlignIntervals { - if casted, ok := structType.(BACnetConstructedDataAlignIntervals); ok { + if casted, ok := structType.(BACnetConstructedDataAlignIntervals); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAlignIntervals); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAlignIntervals) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConstructedDataAlignIntervals) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAlignIntervalsParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("alignIntervals"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for alignIntervals") } - _alignIntervals, _alignIntervalsErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_alignIntervals, _alignIntervalsErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _alignIntervalsErr != nil { return nil, errors.Wrap(_alignIntervalsErr, "Error parsing 'alignIntervals' field of BACnetConstructedDataAlignIntervals") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAlignIntervalsParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetConstructedDataAlignIntervals{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, AlignIntervals: alignIntervals, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAlignIntervals) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAlignIntervals") } - // Simple Field (alignIntervals) - if pushErr := writeBuffer.PushContext("alignIntervals"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for alignIntervals") - } - _alignIntervalsErr := writeBuffer.WriteSerializable(ctx, m.GetAlignIntervals()) - if popErr := writeBuffer.PopContext("alignIntervals"); popErr != nil { - return errors.Wrap(popErr, "Error popping for alignIntervals") - } - if _alignIntervalsErr != nil { - return errors.Wrap(_alignIntervalsErr, "Error serializing 'alignIntervals' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (alignIntervals) + if pushErr := writeBuffer.PushContext("alignIntervals"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for alignIntervals") + } + _alignIntervalsErr := writeBuffer.WriteSerializable(ctx, m.GetAlignIntervals()) + if popErr := writeBuffer.PopContext("alignIntervals"); popErr != nil { + return errors.Wrap(popErr, "Error popping for alignIntervals") + } + if _alignIntervalsErr != nil { + return errors.Wrap(_alignIntervalsErr, "Error serializing 'alignIntervals' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAlignIntervals"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAlignIntervals") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAlignIntervals) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAlignIntervals) isBACnetConstructedDataAlignIntervals() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAlignIntervals) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAllWritesSuccessful.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAllWritesSuccessful.go index f78e99c41d3..00bda1a79d4 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAllWritesSuccessful.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAllWritesSuccessful.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAllWritesSuccessful is the corresponding interface of BACnetConstructedDataAllWritesSuccessful type BACnetConstructedDataAllWritesSuccessful interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAllWritesSuccessfulExactly interface { // _BACnetConstructedDataAllWritesSuccessful is the data-structure of this message type _BACnetConstructedDataAllWritesSuccessful struct { *_BACnetConstructedData - AllWritesSuccessful BACnetApplicationTagBoolean + AllWritesSuccessful BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAllWritesSuccessful) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataAllWritesSuccessful) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataAllWritesSuccessful) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL_WRITES_SUCCESSFUL -} +func (m *_BACnetConstructedDataAllWritesSuccessful) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL_WRITES_SUCCESSFUL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAllWritesSuccessful) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAllWritesSuccessful) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAllWritesSuccessful) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAllWritesSuccessful) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAllWritesSuccessful) GetActualValue() BACnetAppli /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAllWritesSuccessful factory function for _BACnetConstructedDataAllWritesSuccessful -func NewBACnetConstructedDataAllWritesSuccessful(allWritesSuccessful BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAllWritesSuccessful { +func NewBACnetConstructedDataAllWritesSuccessful( allWritesSuccessful BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAllWritesSuccessful { _result := &_BACnetConstructedDataAllWritesSuccessful{ - AllWritesSuccessful: allWritesSuccessful, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + AllWritesSuccessful: allWritesSuccessful, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAllWritesSuccessful(allWritesSuccessful BACnetAppli // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAllWritesSuccessful(structType interface{}) BACnetConstructedDataAllWritesSuccessful { - if casted, ok := structType.(BACnetConstructedDataAllWritesSuccessful); ok { + if casted, ok := structType.(BACnetConstructedDataAllWritesSuccessful); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAllWritesSuccessful); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAllWritesSuccessful) GetLengthInBits(ctx context. return lengthInBits } + func (m *_BACnetConstructedDataAllWritesSuccessful) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAllWritesSuccessfulParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("allWritesSuccessful"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for allWritesSuccessful") } - _allWritesSuccessful, _allWritesSuccessfulErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_allWritesSuccessful, _allWritesSuccessfulErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _allWritesSuccessfulErr != nil { return nil, errors.Wrap(_allWritesSuccessfulErr, "Error parsing 'allWritesSuccessful' field of BACnetConstructedDataAllWritesSuccessful") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAllWritesSuccessfulParseWithBuffer(ctx context.Context // Create a partially initialized instance _child := &_BACnetConstructedDataAllWritesSuccessful{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, AllWritesSuccessful: allWritesSuccessful, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAllWritesSuccessful) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAllWritesSuccessful") } - // Simple Field (allWritesSuccessful) - if pushErr := writeBuffer.PushContext("allWritesSuccessful"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for allWritesSuccessful") - } - _allWritesSuccessfulErr := writeBuffer.WriteSerializable(ctx, m.GetAllWritesSuccessful()) - if popErr := writeBuffer.PopContext("allWritesSuccessful"); popErr != nil { - return errors.Wrap(popErr, "Error popping for allWritesSuccessful") - } - if _allWritesSuccessfulErr != nil { - return errors.Wrap(_allWritesSuccessfulErr, "Error serializing 'allWritesSuccessful' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (allWritesSuccessful) + if pushErr := writeBuffer.PushContext("allWritesSuccessful"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for allWritesSuccessful") + } + _allWritesSuccessfulErr := writeBuffer.WriteSerializable(ctx, m.GetAllWritesSuccessful()) + if popErr := writeBuffer.PopContext("allWritesSuccessful"); popErr != nil { + return errors.Wrap(popErr, "Error popping for allWritesSuccessful") + } + if _allWritesSuccessfulErr != nil { + return errors.Wrap(_allWritesSuccessfulErr, "Error serializing 'allWritesSuccessful' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAllWritesSuccessful"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAllWritesSuccessful") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAllWritesSuccessful) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAllWritesSuccessful) isBACnetConstructedDataAllWritesSuccessful() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAllWritesSuccessful) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAllowGroupDelayInhibit.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAllowGroupDelayInhibit.go index 917c1f89e00..8efd24dd7fe 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAllowGroupDelayInhibit.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAllowGroupDelayInhibit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAllowGroupDelayInhibit is the corresponding interface of BACnetConstructedDataAllowGroupDelayInhibit type BACnetConstructedDataAllowGroupDelayInhibit interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAllowGroupDelayInhibitExactly interface { // _BACnetConstructedDataAllowGroupDelayInhibit is the data-structure of this message type _BACnetConstructedDataAllowGroupDelayInhibit struct { *_BACnetConstructedData - AllowGroupDelayInhibit BACnetApplicationTagBoolean + AllowGroupDelayInhibit BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAllowGroupDelayInhibit) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataAllowGroupDelayInhibit) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataAllowGroupDelayInhibit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALLOW_GROUP_DELAY_INHIBIT -} +func (m *_BACnetConstructedDataAllowGroupDelayInhibit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALLOW_GROUP_DELAY_INHIBIT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAllowGroupDelayInhibit) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAllowGroupDelayInhibit) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAllowGroupDelayInhibit) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAllowGroupDelayInhibit) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAllowGroupDelayInhibit) GetActualValue() BACnetAp /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAllowGroupDelayInhibit factory function for _BACnetConstructedDataAllowGroupDelayInhibit -func NewBACnetConstructedDataAllowGroupDelayInhibit(allowGroupDelayInhibit BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAllowGroupDelayInhibit { +func NewBACnetConstructedDataAllowGroupDelayInhibit( allowGroupDelayInhibit BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAllowGroupDelayInhibit { _result := &_BACnetConstructedDataAllowGroupDelayInhibit{ AllowGroupDelayInhibit: allowGroupDelayInhibit, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAllowGroupDelayInhibit(allowGroupDelayInhibit BACne // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAllowGroupDelayInhibit(structType interface{}) BACnetConstructedDataAllowGroupDelayInhibit { - if casted, ok := structType.(BACnetConstructedDataAllowGroupDelayInhibit); ok { + if casted, ok := structType.(BACnetConstructedDataAllowGroupDelayInhibit); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAllowGroupDelayInhibit); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAllowGroupDelayInhibit) GetLengthInBits(ctx conte return lengthInBits } + func (m *_BACnetConstructedDataAllowGroupDelayInhibit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAllowGroupDelayInhibitParseWithBuffer(ctx context.Cont if pullErr := readBuffer.PullContext("allowGroupDelayInhibit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for allowGroupDelayInhibit") } - _allowGroupDelayInhibit, _allowGroupDelayInhibitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_allowGroupDelayInhibit, _allowGroupDelayInhibitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _allowGroupDelayInhibitErr != nil { return nil, errors.Wrap(_allowGroupDelayInhibitErr, "Error parsing 'allowGroupDelayInhibit' field of BACnetConstructedDataAllowGroupDelayInhibit") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAllowGroupDelayInhibitParseWithBuffer(ctx context.Cont // Create a partially initialized instance _child := &_BACnetConstructedDataAllowGroupDelayInhibit{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, AllowGroupDelayInhibit: allowGroupDelayInhibit, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAllowGroupDelayInhibit) SerializeWithWriteBuffer( return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAllowGroupDelayInhibit") } - // Simple Field (allowGroupDelayInhibit) - if pushErr := writeBuffer.PushContext("allowGroupDelayInhibit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for allowGroupDelayInhibit") - } - _allowGroupDelayInhibitErr := writeBuffer.WriteSerializable(ctx, m.GetAllowGroupDelayInhibit()) - if popErr := writeBuffer.PopContext("allowGroupDelayInhibit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for allowGroupDelayInhibit") - } - if _allowGroupDelayInhibitErr != nil { - return errors.Wrap(_allowGroupDelayInhibitErr, "Error serializing 'allowGroupDelayInhibit' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (allowGroupDelayInhibit) + if pushErr := writeBuffer.PushContext("allowGroupDelayInhibit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for allowGroupDelayInhibit") + } + _allowGroupDelayInhibitErr := writeBuffer.WriteSerializable(ctx, m.GetAllowGroupDelayInhibit()) + if popErr := writeBuffer.PopContext("allowGroupDelayInhibit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for allowGroupDelayInhibit") + } + if _allowGroupDelayInhibitErr != nil { + return errors.Wrap(_allowGroupDelayInhibitErr, "Error serializing 'allowGroupDelayInhibit' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAllowGroupDelayInhibit"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAllowGroupDelayInhibit") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAllowGroupDelayInhibit) SerializeWithWriteBuffer( return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAllowGroupDelayInhibit) isBACnetConstructedDataAllowGroupDelayInhibit() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAllowGroupDelayInhibit) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogInputAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogInputAll.go index 1d3b1e51bd2..ab8c9a3320d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogInputAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogInputAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAnalogInputAll is the corresponding interface of BACnetConstructedDataAnalogInputAll type BACnetConstructedDataAnalogInputAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataAnalogInputAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAnalogInputAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ANALOG_INPUT -} +func (m *_BACnetConstructedDataAnalogInputAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ANALOG_INPUT} -func (m *_BACnetConstructedDataAnalogInputAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataAnalogInputAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAnalogInputAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAnalogInputAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAnalogInputAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAnalogInputAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataAnalogInputAll factory function for _BACnetConstructedDataAnalogInputAll -func NewBACnetConstructedDataAnalogInputAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAnalogInputAll { +func NewBACnetConstructedDataAnalogInputAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAnalogInputAll { _result := &_BACnetConstructedDataAnalogInputAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataAnalogInputAll(openingTag BACnetOpeningTag, peekedT // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAnalogInputAll(structType interface{}) BACnetConstructedDataAnalogInputAll { - if casted, ok := structType.(BACnetConstructedDataAnalogInputAll); ok { + if casted, ok := structType.(BACnetConstructedDataAnalogInputAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAnalogInputAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataAnalogInputAll) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConstructedDataAnalogInputAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataAnalogInputAllParseWithBuffer(ctx context.Context, rea _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataAnalogInputAllParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetConstructedDataAnalogInputAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataAnalogInputAll) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAnalogInputAll) isBACnetConstructedDataAnalogInputAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataAnalogInputAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogInputFaultHighLimit.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogInputFaultHighLimit.go index 9df86e051fd..440824f77c0 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogInputFaultHighLimit.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogInputFaultHighLimit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAnalogInputFaultHighLimit is the corresponding interface of BACnetConstructedDataAnalogInputFaultHighLimit type BACnetConstructedDataAnalogInputFaultHighLimit interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAnalogInputFaultHighLimitExactly interface { // _BACnetConstructedDataAnalogInputFaultHighLimit is the data-structure of this message type _BACnetConstructedDataAnalogInputFaultHighLimit struct { *_BACnetConstructedData - FaultHighLimit BACnetApplicationTagReal + FaultHighLimit BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAnalogInputFaultHighLimit) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ANALOG_INPUT -} +func (m *_BACnetConstructedDataAnalogInputFaultHighLimit) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ANALOG_INPUT} -func (m *_BACnetConstructedDataAnalogInputFaultHighLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FAULT_HIGH_LIMIT -} +func (m *_BACnetConstructedDataAnalogInputFaultHighLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FAULT_HIGH_LIMIT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAnalogInputFaultHighLimit) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAnalogInputFaultHighLimit) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAnalogInputFaultHighLimit) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAnalogInputFaultHighLimit) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAnalogInputFaultHighLimit) GetActualValue() BACne /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAnalogInputFaultHighLimit factory function for _BACnetConstructedDataAnalogInputFaultHighLimit -func NewBACnetConstructedDataAnalogInputFaultHighLimit(faultHighLimit BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAnalogInputFaultHighLimit { +func NewBACnetConstructedDataAnalogInputFaultHighLimit( faultHighLimit BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAnalogInputFaultHighLimit { _result := &_BACnetConstructedDataAnalogInputFaultHighLimit{ - FaultHighLimit: faultHighLimit, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + FaultHighLimit: faultHighLimit, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAnalogInputFaultHighLimit(faultHighLimit BACnetAppl // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAnalogInputFaultHighLimit(structType interface{}) BACnetConstructedDataAnalogInputFaultHighLimit { - if casted, ok := structType.(BACnetConstructedDataAnalogInputFaultHighLimit); ok { + if casted, ok := structType.(BACnetConstructedDataAnalogInputFaultHighLimit); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAnalogInputFaultHighLimit); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAnalogInputFaultHighLimit) GetLengthInBits(ctx co return lengthInBits } + func (m *_BACnetConstructedDataAnalogInputFaultHighLimit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAnalogInputFaultHighLimitParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("faultHighLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for faultHighLimit") } - _faultHighLimit, _faultHighLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_faultHighLimit, _faultHighLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _faultHighLimitErr != nil { return nil, errors.Wrap(_faultHighLimitErr, "Error parsing 'faultHighLimit' field of BACnetConstructedDataAnalogInputFaultHighLimit") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAnalogInputFaultHighLimitParseWithBuffer(ctx context.C // Create a partially initialized instance _child := &_BACnetConstructedDataAnalogInputFaultHighLimit{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FaultHighLimit: faultHighLimit, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAnalogInputFaultHighLimit) SerializeWithWriteBuff return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAnalogInputFaultHighLimit") } - // Simple Field (faultHighLimit) - if pushErr := writeBuffer.PushContext("faultHighLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for faultHighLimit") - } - _faultHighLimitErr := writeBuffer.WriteSerializable(ctx, m.GetFaultHighLimit()) - if popErr := writeBuffer.PopContext("faultHighLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for faultHighLimit") - } - if _faultHighLimitErr != nil { - return errors.Wrap(_faultHighLimitErr, "Error serializing 'faultHighLimit' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (faultHighLimit) + if pushErr := writeBuffer.PushContext("faultHighLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for faultHighLimit") + } + _faultHighLimitErr := writeBuffer.WriteSerializable(ctx, m.GetFaultHighLimit()) + if popErr := writeBuffer.PopContext("faultHighLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for faultHighLimit") + } + if _faultHighLimitErr != nil { + return errors.Wrap(_faultHighLimitErr, "Error serializing 'faultHighLimit' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAnalogInputFaultHighLimit"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAnalogInputFaultHighLimit") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAnalogInputFaultHighLimit) SerializeWithWriteBuff return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAnalogInputFaultHighLimit) isBACnetConstructedDataAnalogInputFaultHighLimit() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAnalogInputFaultHighLimit) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogInputFaultLowLimit.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogInputFaultLowLimit.go index fa4b544122c..71c4a948a90 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogInputFaultLowLimit.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogInputFaultLowLimit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAnalogInputFaultLowLimit is the corresponding interface of BACnetConstructedDataAnalogInputFaultLowLimit type BACnetConstructedDataAnalogInputFaultLowLimit interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAnalogInputFaultLowLimitExactly interface { // _BACnetConstructedDataAnalogInputFaultLowLimit is the data-structure of this message type _BACnetConstructedDataAnalogInputFaultLowLimit struct { *_BACnetConstructedData - FaultLowLimit BACnetApplicationTagReal + FaultLowLimit BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAnalogInputFaultLowLimit) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ANALOG_INPUT -} +func (m *_BACnetConstructedDataAnalogInputFaultLowLimit) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ANALOG_INPUT} -func (m *_BACnetConstructedDataAnalogInputFaultLowLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FAULT_LOW_LIMIT -} +func (m *_BACnetConstructedDataAnalogInputFaultLowLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FAULT_LOW_LIMIT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAnalogInputFaultLowLimit) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAnalogInputFaultLowLimit) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAnalogInputFaultLowLimit) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAnalogInputFaultLowLimit) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAnalogInputFaultLowLimit) GetActualValue() BACnet /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAnalogInputFaultLowLimit factory function for _BACnetConstructedDataAnalogInputFaultLowLimit -func NewBACnetConstructedDataAnalogInputFaultLowLimit(faultLowLimit BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAnalogInputFaultLowLimit { +func NewBACnetConstructedDataAnalogInputFaultLowLimit( faultLowLimit BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAnalogInputFaultLowLimit { _result := &_BACnetConstructedDataAnalogInputFaultLowLimit{ - FaultLowLimit: faultLowLimit, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + FaultLowLimit: faultLowLimit, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAnalogInputFaultLowLimit(faultLowLimit BACnetApplic // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAnalogInputFaultLowLimit(structType interface{}) BACnetConstructedDataAnalogInputFaultLowLimit { - if casted, ok := structType.(BACnetConstructedDataAnalogInputFaultLowLimit); ok { + if casted, ok := structType.(BACnetConstructedDataAnalogInputFaultLowLimit); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAnalogInputFaultLowLimit); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAnalogInputFaultLowLimit) GetLengthInBits(ctx con return lengthInBits } + func (m *_BACnetConstructedDataAnalogInputFaultLowLimit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAnalogInputFaultLowLimitParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("faultLowLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for faultLowLimit") } - _faultLowLimit, _faultLowLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_faultLowLimit, _faultLowLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _faultLowLimitErr != nil { return nil, errors.Wrap(_faultLowLimitErr, "Error parsing 'faultLowLimit' field of BACnetConstructedDataAnalogInputFaultLowLimit") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAnalogInputFaultLowLimitParseWithBuffer(ctx context.Co // Create a partially initialized instance _child := &_BACnetConstructedDataAnalogInputFaultLowLimit{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FaultLowLimit: faultLowLimit, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAnalogInputFaultLowLimit) SerializeWithWriteBuffe return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAnalogInputFaultLowLimit") } - // Simple Field (faultLowLimit) - if pushErr := writeBuffer.PushContext("faultLowLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for faultLowLimit") - } - _faultLowLimitErr := writeBuffer.WriteSerializable(ctx, m.GetFaultLowLimit()) - if popErr := writeBuffer.PopContext("faultLowLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for faultLowLimit") - } - if _faultLowLimitErr != nil { - return errors.Wrap(_faultLowLimitErr, "Error serializing 'faultLowLimit' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (faultLowLimit) + if pushErr := writeBuffer.PushContext("faultLowLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for faultLowLimit") + } + _faultLowLimitErr := writeBuffer.WriteSerializable(ctx, m.GetFaultLowLimit()) + if popErr := writeBuffer.PopContext("faultLowLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for faultLowLimit") + } + if _faultLowLimitErr != nil { + return errors.Wrap(_faultLowLimitErr, "Error serializing 'faultLowLimit' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAnalogInputFaultLowLimit"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAnalogInputFaultLowLimit") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAnalogInputFaultLowLimit) SerializeWithWriteBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAnalogInputFaultLowLimit) isBACnetConstructedDataAnalogInputFaultLowLimit() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAnalogInputFaultLowLimit) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogInputInterfaceValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogInputInterfaceValue.go index 6d6ca5a9ced..c17981a3ae1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogInputInterfaceValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogInputInterfaceValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAnalogInputInterfaceValue is the corresponding interface of BACnetConstructedDataAnalogInputInterfaceValue type BACnetConstructedDataAnalogInputInterfaceValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAnalogInputInterfaceValueExactly interface { // _BACnetConstructedDataAnalogInputInterfaceValue is the data-structure of this message type _BACnetConstructedDataAnalogInputInterfaceValue struct { *_BACnetConstructedData - InterfaceValue BACnetOptionalREAL + InterfaceValue BACnetOptionalREAL } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAnalogInputInterfaceValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ANALOG_INPUT -} +func (m *_BACnetConstructedDataAnalogInputInterfaceValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ANALOG_INPUT} -func (m *_BACnetConstructedDataAnalogInputInterfaceValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_INTERFACE_VALUE -} +func (m *_BACnetConstructedDataAnalogInputInterfaceValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_INTERFACE_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAnalogInputInterfaceValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAnalogInputInterfaceValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAnalogInputInterfaceValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAnalogInputInterfaceValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAnalogInputInterfaceValue) GetActualValue() BACne /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAnalogInputInterfaceValue factory function for _BACnetConstructedDataAnalogInputInterfaceValue -func NewBACnetConstructedDataAnalogInputInterfaceValue(interfaceValue BACnetOptionalREAL, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAnalogInputInterfaceValue { +func NewBACnetConstructedDataAnalogInputInterfaceValue( interfaceValue BACnetOptionalREAL , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAnalogInputInterfaceValue { _result := &_BACnetConstructedDataAnalogInputInterfaceValue{ - InterfaceValue: interfaceValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + InterfaceValue: interfaceValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAnalogInputInterfaceValue(interfaceValue BACnetOpti // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAnalogInputInterfaceValue(structType interface{}) BACnetConstructedDataAnalogInputInterfaceValue { - if casted, ok := structType.(BACnetConstructedDataAnalogInputInterfaceValue); ok { + if casted, ok := structType.(BACnetConstructedDataAnalogInputInterfaceValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAnalogInputInterfaceValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAnalogInputInterfaceValue) GetLengthInBits(ctx co return lengthInBits } + func (m *_BACnetConstructedDataAnalogInputInterfaceValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAnalogInputInterfaceValueParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("interfaceValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for interfaceValue") } - _interfaceValue, _interfaceValueErr := BACnetOptionalREALParseWithBuffer(ctx, readBuffer) +_interfaceValue, _interfaceValueErr := BACnetOptionalREALParseWithBuffer(ctx, readBuffer) if _interfaceValueErr != nil { return nil, errors.Wrap(_interfaceValueErr, "Error parsing 'interfaceValue' field of BACnetConstructedDataAnalogInputInterfaceValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAnalogInputInterfaceValueParseWithBuffer(ctx context.C // Create a partially initialized instance _child := &_BACnetConstructedDataAnalogInputInterfaceValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, InterfaceValue: interfaceValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAnalogInputInterfaceValue) SerializeWithWriteBuff return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAnalogInputInterfaceValue") } - // Simple Field (interfaceValue) - if pushErr := writeBuffer.PushContext("interfaceValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for interfaceValue") - } - _interfaceValueErr := writeBuffer.WriteSerializable(ctx, m.GetInterfaceValue()) - if popErr := writeBuffer.PopContext("interfaceValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for interfaceValue") - } - if _interfaceValueErr != nil { - return errors.Wrap(_interfaceValueErr, "Error serializing 'interfaceValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (interfaceValue) + if pushErr := writeBuffer.PushContext("interfaceValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for interfaceValue") + } + _interfaceValueErr := writeBuffer.WriteSerializable(ctx, m.GetInterfaceValue()) + if popErr := writeBuffer.PopContext("interfaceValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for interfaceValue") + } + if _interfaceValueErr != nil { + return errors.Wrap(_interfaceValueErr, "Error serializing 'interfaceValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAnalogInputInterfaceValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAnalogInputInterfaceValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAnalogInputInterfaceValue) SerializeWithWriteBuff return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAnalogInputInterfaceValue) isBACnetConstructedDataAnalogInputInterfaceValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAnalogInputInterfaceValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogInputMaxPresValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogInputMaxPresValue.go index 442afe4364a..a7c33f87804 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogInputMaxPresValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogInputMaxPresValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAnalogInputMaxPresValue is the corresponding interface of BACnetConstructedDataAnalogInputMaxPresValue type BACnetConstructedDataAnalogInputMaxPresValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAnalogInputMaxPresValueExactly interface { // _BACnetConstructedDataAnalogInputMaxPresValue is the data-structure of this message type _BACnetConstructedDataAnalogInputMaxPresValue struct { *_BACnetConstructedData - MaxPresValue BACnetApplicationTagReal + MaxPresValue BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAnalogInputMaxPresValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ANALOG_INPUT -} +func (m *_BACnetConstructedDataAnalogInputMaxPresValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ANALOG_INPUT} -func (m *_BACnetConstructedDataAnalogInputMaxPresValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MAX_PRES_VALUE -} +func (m *_BACnetConstructedDataAnalogInputMaxPresValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MAX_PRES_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAnalogInputMaxPresValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAnalogInputMaxPresValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAnalogInputMaxPresValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAnalogInputMaxPresValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAnalogInputMaxPresValue) GetActualValue() BACnetA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAnalogInputMaxPresValue factory function for _BACnetConstructedDataAnalogInputMaxPresValue -func NewBACnetConstructedDataAnalogInputMaxPresValue(maxPresValue BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAnalogInputMaxPresValue { +func NewBACnetConstructedDataAnalogInputMaxPresValue( maxPresValue BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAnalogInputMaxPresValue { _result := &_BACnetConstructedDataAnalogInputMaxPresValue{ - MaxPresValue: maxPresValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + MaxPresValue: maxPresValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAnalogInputMaxPresValue(maxPresValue BACnetApplicat // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAnalogInputMaxPresValue(structType interface{}) BACnetConstructedDataAnalogInputMaxPresValue { - if casted, ok := structType.(BACnetConstructedDataAnalogInputMaxPresValue); ok { + if casted, ok := structType.(BACnetConstructedDataAnalogInputMaxPresValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAnalogInputMaxPresValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAnalogInputMaxPresValue) GetLengthInBits(ctx cont return lengthInBits } + func (m *_BACnetConstructedDataAnalogInputMaxPresValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAnalogInputMaxPresValueParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("maxPresValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for maxPresValue") } - _maxPresValue, _maxPresValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_maxPresValue, _maxPresValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _maxPresValueErr != nil { return nil, errors.Wrap(_maxPresValueErr, "Error parsing 'maxPresValue' field of BACnetConstructedDataAnalogInputMaxPresValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAnalogInputMaxPresValueParseWithBuffer(ctx context.Con // Create a partially initialized instance _child := &_BACnetConstructedDataAnalogInputMaxPresValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, MaxPresValue: maxPresValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAnalogInputMaxPresValue) SerializeWithWriteBuffer return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAnalogInputMaxPresValue") } - // Simple Field (maxPresValue) - if pushErr := writeBuffer.PushContext("maxPresValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for maxPresValue") - } - _maxPresValueErr := writeBuffer.WriteSerializable(ctx, m.GetMaxPresValue()) - if popErr := writeBuffer.PopContext("maxPresValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for maxPresValue") - } - if _maxPresValueErr != nil { - return errors.Wrap(_maxPresValueErr, "Error serializing 'maxPresValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (maxPresValue) + if pushErr := writeBuffer.PushContext("maxPresValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for maxPresValue") + } + _maxPresValueErr := writeBuffer.WriteSerializable(ctx, m.GetMaxPresValue()) + if popErr := writeBuffer.PopContext("maxPresValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for maxPresValue") + } + if _maxPresValueErr != nil { + return errors.Wrap(_maxPresValueErr, "Error serializing 'maxPresValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAnalogInputMaxPresValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAnalogInputMaxPresValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAnalogInputMaxPresValue) SerializeWithWriteBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAnalogInputMaxPresValue) isBACnetConstructedDataAnalogInputMaxPresValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAnalogInputMaxPresValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogInputPresentValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogInputPresentValue.go index f1e2a908c45..e6aeef4f05f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogInputPresentValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogInputPresentValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAnalogInputPresentValue is the corresponding interface of BACnetConstructedDataAnalogInputPresentValue type BACnetConstructedDataAnalogInputPresentValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAnalogInputPresentValueExactly interface { // _BACnetConstructedDataAnalogInputPresentValue is the data-structure of this message type _BACnetConstructedDataAnalogInputPresentValue struct { *_BACnetConstructedData - PresentValue BACnetApplicationTagReal + PresentValue BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAnalogInputPresentValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ANALOG_INPUT -} +func (m *_BACnetConstructedDataAnalogInputPresentValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ANALOG_INPUT} -func (m *_BACnetConstructedDataAnalogInputPresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PRESENT_VALUE -} +func (m *_BACnetConstructedDataAnalogInputPresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PRESENT_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAnalogInputPresentValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAnalogInputPresentValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAnalogInputPresentValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAnalogInputPresentValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAnalogInputPresentValue) GetActualValue() BACnetA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAnalogInputPresentValue factory function for _BACnetConstructedDataAnalogInputPresentValue -func NewBACnetConstructedDataAnalogInputPresentValue(presentValue BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAnalogInputPresentValue { +func NewBACnetConstructedDataAnalogInputPresentValue( presentValue BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAnalogInputPresentValue { _result := &_BACnetConstructedDataAnalogInputPresentValue{ - PresentValue: presentValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PresentValue: presentValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAnalogInputPresentValue(presentValue BACnetApplicat // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAnalogInputPresentValue(structType interface{}) BACnetConstructedDataAnalogInputPresentValue { - if casted, ok := structType.(BACnetConstructedDataAnalogInputPresentValue); ok { + if casted, ok := structType.(BACnetConstructedDataAnalogInputPresentValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAnalogInputPresentValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAnalogInputPresentValue) GetLengthInBits(ctx cont return lengthInBits } + func (m *_BACnetConstructedDataAnalogInputPresentValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAnalogInputPresentValueParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("presentValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for presentValue") } - _presentValue, _presentValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_presentValue, _presentValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _presentValueErr != nil { return nil, errors.Wrap(_presentValueErr, "Error parsing 'presentValue' field of BACnetConstructedDataAnalogInputPresentValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAnalogInputPresentValueParseWithBuffer(ctx context.Con // Create a partially initialized instance _child := &_BACnetConstructedDataAnalogInputPresentValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PresentValue: presentValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAnalogInputPresentValue) SerializeWithWriteBuffer return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAnalogInputPresentValue") } - // Simple Field (presentValue) - if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for presentValue") - } - _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) - if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for presentValue") - } - if _presentValueErr != nil { - return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (presentValue) + if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for presentValue") + } + _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) + if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for presentValue") + } + if _presentValueErr != nil { + return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAnalogInputPresentValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAnalogInputPresentValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAnalogInputPresentValue) SerializeWithWriteBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAnalogInputPresentValue) isBACnetConstructedDataAnalogInputPresentValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAnalogInputPresentValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogOutputAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogOutputAll.go index d637fc12c5a..c8718d84312 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogOutputAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogOutputAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAnalogOutputAll is the corresponding interface of BACnetConstructedDataAnalogOutputAll type BACnetConstructedDataAnalogOutputAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataAnalogOutputAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAnalogOutputAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ANALOG_OUTPUT -} +func (m *_BACnetConstructedDataAnalogOutputAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ANALOG_OUTPUT} -func (m *_BACnetConstructedDataAnalogOutputAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataAnalogOutputAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAnalogOutputAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAnalogOutputAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAnalogOutputAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAnalogOutputAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataAnalogOutputAll factory function for _BACnetConstructedDataAnalogOutputAll -func NewBACnetConstructedDataAnalogOutputAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAnalogOutputAll { +func NewBACnetConstructedDataAnalogOutputAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAnalogOutputAll { _result := &_BACnetConstructedDataAnalogOutputAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataAnalogOutputAll(openingTag BACnetOpeningTag, peeked // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAnalogOutputAll(structType interface{}) BACnetConstructedDataAnalogOutputAll { - if casted, ok := structType.(BACnetConstructedDataAnalogOutputAll); ok { + if casted, ok := structType.(BACnetConstructedDataAnalogOutputAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAnalogOutputAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataAnalogOutputAll) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetConstructedDataAnalogOutputAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataAnalogOutputAllParseWithBuffer(ctx context.Context, re _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataAnalogOutputAllParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetConstructedDataAnalogOutputAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataAnalogOutputAll) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAnalogOutputAll) isBACnetConstructedDataAnalogOutputAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataAnalogOutputAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogOutputInterfaceValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogOutputInterfaceValue.go index 2355071df9a..0ba959695eb 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogOutputInterfaceValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogOutputInterfaceValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAnalogOutputInterfaceValue is the corresponding interface of BACnetConstructedDataAnalogOutputInterfaceValue type BACnetConstructedDataAnalogOutputInterfaceValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAnalogOutputInterfaceValueExactly interface { // _BACnetConstructedDataAnalogOutputInterfaceValue is the data-structure of this message type _BACnetConstructedDataAnalogOutputInterfaceValue struct { *_BACnetConstructedData - InterfaceValue BACnetOptionalREAL + InterfaceValue BACnetOptionalREAL } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAnalogOutputInterfaceValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ANALOG_OUTPUT -} +func (m *_BACnetConstructedDataAnalogOutputInterfaceValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ANALOG_OUTPUT} -func (m *_BACnetConstructedDataAnalogOutputInterfaceValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_INTERFACE_VALUE -} +func (m *_BACnetConstructedDataAnalogOutputInterfaceValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_INTERFACE_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAnalogOutputInterfaceValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAnalogOutputInterfaceValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAnalogOutputInterfaceValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAnalogOutputInterfaceValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAnalogOutputInterfaceValue) GetActualValue() BACn /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAnalogOutputInterfaceValue factory function for _BACnetConstructedDataAnalogOutputInterfaceValue -func NewBACnetConstructedDataAnalogOutputInterfaceValue(interfaceValue BACnetOptionalREAL, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAnalogOutputInterfaceValue { +func NewBACnetConstructedDataAnalogOutputInterfaceValue( interfaceValue BACnetOptionalREAL , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAnalogOutputInterfaceValue { _result := &_BACnetConstructedDataAnalogOutputInterfaceValue{ - InterfaceValue: interfaceValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + InterfaceValue: interfaceValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAnalogOutputInterfaceValue(interfaceValue BACnetOpt // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAnalogOutputInterfaceValue(structType interface{}) BACnetConstructedDataAnalogOutputInterfaceValue { - if casted, ok := structType.(BACnetConstructedDataAnalogOutputInterfaceValue); ok { + if casted, ok := structType.(BACnetConstructedDataAnalogOutputInterfaceValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAnalogOutputInterfaceValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAnalogOutputInterfaceValue) GetLengthInBits(ctx c return lengthInBits } + func (m *_BACnetConstructedDataAnalogOutputInterfaceValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAnalogOutputInterfaceValueParseWithBuffer(ctx context. if pullErr := readBuffer.PullContext("interfaceValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for interfaceValue") } - _interfaceValue, _interfaceValueErr := BACnetOptionalREALParseWithBuffer(ctx, readBuffer) +_interfaceValue, _interfaceValueErr := BACnetOptionalREALParseWithBuffer(ctx, readBuffer) if _interfaceValueErr != nil { return nil, errors.Wrap(_interfaceValueErr, "Error parsing 'interfaceValue' field of BACnetConstructedDataAnalogOutputInterfaceValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAnalogOutputInterfaceValueParseWithBuffer(ctx context. // Create a partially initialized instance _child := &_BACnetConstructedDataAnalogOutputInterfaceValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, InterfaceValue: interfaceValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAnalogOutputInterfaceValue) SerializeWithWriteBuf return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAnalogOutputInterfaceValue") } - // Simple Field (interfaceValue) - if pushErr := writeBuffer.PushContext("interfaceValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for interfaceValue") - } - _interfaceValueErr := writeBuffer.WriteSerializable(ctx, m.GetInterfaceValue()) - if popErr := writeBuffer.PopContext("interfaceValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for interfaceValue") - } - if _interfaceValueErr != nil { - return errors.Wrap(_interfaceValueErr, "Error serializing 'interfaceValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (interfaceValue) + if pushErr := writeBuffer.PushContext("interfaceValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for interfaceValue") + } + _interfaceValueErr := writeBuffer.WriteSerializable(ctx, m.GetInterfaceValue()) + if popErr := writeBuffer.PopContext("interfaceValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for interfaceValue") + } + if _interfaceValueErr != nil { + return errors.Wrap(_interfaceValueErr, "Error serializing 'interfaceValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAnalogOutputInterfaceValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAnalogOutputInterfaceValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAnalogOutputInterfaceValue) SerializeWithWriteBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAnalogOutputInterfaceValue) isBACnetConstructedDataAnalogOutputInterfaceValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAnalogOutputInterfaceValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogOutputMaxPresValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogOutputMaxPresValue.go index d2ad3523651..7509210bee6 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogOutputMaxPresValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogOutputMaxPresValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAnalogOutputMaxPresValue is the corresponding interface of BACnetConstructedDataAnalogOutputMaxPresValue type BACnetConstructedDataAnalogOutputMaxPresValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAnalogOutputMaxPresValueExactly interface { // _BACnetConstructedDataAnalogOutputMaxPresValue is the data-structure of this message type _BACnetConstructedDataAnalogOutputMaxPresValue struct { *_BACnetConstructedData - MaxPresValue BACnetApplicationTagReal + MaxPresValue BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAnalogOutputMaxPresValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ANALOG_OUTPUT -} +func (m *_BACnetConstructedDataAnalogOutputMaxPresValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ANALOG_OUTPUT} -func (m *_BACnetConstructedDataAnalogOutputMaxPresValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MAX_PRES_VALUE -} +func (m *_BACnetConstructedDataAnalogOutputMaxPresValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MAX_PRES_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAnalogOutputMaxPresValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAnalogOutputMaxPresValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAnalogOutputMaxPresValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAnalogOutputMaxPresValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAnalogOutputMaxPresValue) GetActualValue() BACnet /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAnalogOutputMaxPresValue factory function for _BACnetConstructedDataAnalogOutputMaxPresValue -func NewBACnetConstructedDataAnalogOutputMaxPresValue(maxPresValue BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAnalogOutputMaxPresValue { +func NewBACnetConstructedDataAnalogOutputMaxPresValue( maxPresValue BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAnalogOutputMaxPresValue { _result := &_BACnetConstructedDataAnalogOutputMaxPresValue{ - MaxPresValue: maxPresValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + MaxPresValue: maxPresValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAnalogOutputMaxPresValue(maxPresValue BACnetApplica // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAnalogOutputMaxPresValue(structType interface{}) BACnetConstructedDataAnalogOutputMaxPresValue { - if casted, ok := structType.(BACnetConstructedDataAnalogOutputMaxPresValue); ok { + if casted, ok := structType.(BACnetConstructedDataAnalogOutputMaxPresValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAnalogOutputMaxPresValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAnalogOutputMaxPresValue) GetLengthInBits(ctx con return lengthInBits } + func (m *_BACnetConstructedDataAnalogOutputMaxPresValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAnalogOutputMaxPresValueParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("maxPresValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for maxPresValue") } - _maxPresValue, _maxPresValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_maxPresValue, _maxPresValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _maxPresValueErr != nil { return nil, errors.Wrap(_maxPresValueErr, "Error parsing 'maxPresValue' field of BACnetConstructedDataAnalogOutputMaxPresValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAnalogOutputMaxPresValueParseWithBuffer(ctx context.Co // Create a partially initialized instance _child := &_BACnetConstructedDataAnalogOutputMaxPresValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, MaxPresValue: maxPresValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAnalogOutputMaxPresValue) SerializeWithWriteBuffe return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAnalogOutputMaxPresValue") } - // Simple Field (maxPresValue) - if pushErr := writeBuffer.PushContext("maxPresValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for maxPresValue") - } - _maxPresValueErr := writeBuffer.WriteSerializable(ctx, m.GetMaxPresValue()) - if popErr := writeBuffer.PopContext("maxPresValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for maxPresValue") - } - if _maxPresValueErr != nil { - return errors.Wrap(_maxPresValueErr, "Error serializing 'maxPresValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (maxPresValue) + if pushErr := writeBuffer.PushContext("maxPresValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for maxPresValue") + } + _maxPresValueErr := writeBuffer.WriteSerializable(ctx, m.GetMaxPresValue()) + if popErr := writeBuffer.PopContext("maxPresValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for maxPresValue") + } + if _maxPresValueErr != nil { + return errors.Wrap(_maxPresValueErr, "Error serializing 'maxPresValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAnalogOutputMaxPresValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAnalogOutputMaxPresValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAnalogOutputMaxPresValue) SerializeWithWriteBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAnalogOutputMaxPresValue) isBACnetConstructedDataAnalogOutputMaxPresValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAnalogOutputMaxPresValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogOutputPresentValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogOutputPresentValue.go index 61bfdb5cda1..b0c11baf482 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogOutputPresentValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogOutputPresentValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAnalogOutputPresentValue is the corresponding interface of BACnetConstructedDataAnalogOutputPresentValue type BACnetConstructedDataAnalogOutputPresentValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAnalogOutputPresentValueExactly interface { // _BACnetConstructedDataAnalogOutputPresentValue is the data-structure of this message type _BACnetConstructedDataAnalogOutputPresentValue struct { *_BACnetConstructedData - PresentValue BACnetApplicationTagReal + PresentValue BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAnalogOutputPresentValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ANALOG_OUTPUT -} +func (m *_BACnetConstructedDataAnalogOutputPresentValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ANALOG_OUTPUT} -func (m *_BACnetConstructedDataAnalogOutputPresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PRESENT_VALUE -} +func (m *_BACnetConstructedDataAnalogOutputPresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PRESENT_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAnalogOutputPresentValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAnalogOutputPresentValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAnalogOutputPresentValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAnalogOutputPresentValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAnalogOutputPresentValue) GetActualValue() BACnet /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAnalogOutputPresentValue factory function for _BACnetConstructedDataAnalogOutputPresentValue -func NewBACnetConstructedDataAnalogOutputPresentValue(presentValue BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAnalogOutputPresentValue { +func NewBACnetConstructedDataAnalogOutputPresentValue( presentValue BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAnalogOutputPresentValue { _result := &_BACnetConstructedDataAnalogOutputPresentValue{ - PresentValue: presentValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PresentValue: presentValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAnalogOutputPresentValue(presentValue BACnetApplica // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAnalogOutputPresentValue(structType interface{}) BACnetConstructedDataAnalogOutputPresentValue { - if casted, ok := structType.(BACnetConstructedDataAnalogOutputPresentValue); ok { + if casted, ok := structType.(BACnetConstructedDataAnalogOutputPresentValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAnalogOutputPresentValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAnalogOutputPresentValue) GetLengthInBits(ctx con return lengthInBits } + func (m *_BACnetConstructedDataAnalogOutputPresentValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAnalogOutputPresentValueParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("presentValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for presentValue") } - _presentValue, _presentValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_presentValue, _presentValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _presentValueErr != nil { return nil, errors.Wrap(_presentValueErr, "Error parsing 'presentValue' field of BACnetConstructedDataAnalogOutputPresentValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAnalogOutputPresentValueParseWithBuffer(ctx context.Co // Create a partially initialized instance _child := &_BACnetConstructedDataAnalogOutputPresentValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PresentValue: presentValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAnalogOutputPresentValue) SerializeWithWriteBuffe return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAnalogOutputPresentValue") } - // Simple Field (presentValue) - if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for presentValue") - } - _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) - if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for presentValue") - } - if _presentValueErr != nil { - return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (presentValue) + if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for presentValue") + } + _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) + if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for presentValue") + } + if _presentValueErr != nil { + return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAnalogOutputPresentValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAnalogOutputPresentValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAnalogOutputPresentValue) SerializeWithWriteBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAnalogOutputPresentValue) isBACnetConstructedDataAnalogOutputPresentValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAnalogOutputPresentValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogOutputRelinquishDefault.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogOutputRelinquishDefault.go index aab601fc2b0..6b2b20d9e82 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogOutputRelinquishDefault.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogOutputRelinquishDefault.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAnalogOutputRelinquishDefault is the corresponding interface of BACnetConstructedDataAnalogOutputRelinquishDefault type BACnetConstructedDataAnalogOutputRelinquishDefault interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAnalogOutputRelinquishDefaultExactly interface { // _BACnetConstructedDataAnalogOutputRelinquishDefault is the data-structure of this message type _BACnetConstructedDataAnalogOutputRelinquishDefault struct { *_BACnetConstructedData - RelinquishDefault BACnetApplicationTagReal + RelinquishDefault BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAnalogOutputRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ANALOG_OUTPUT -} +func (m *_BACnetConstructedDataAnalogOutputRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ANALOG_OUTPUT} -func (m *_BACnetConstructedDataAnalogOutputRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_RELINQUISH_DEFAULT -} +func (m *_BACnetConstructedDataAnalogOutputRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_RELINQUISH_DEFAULT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAnalogOutputRelinquishDefault) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAnalogOutputRelinquishDefault) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAnalogOutputRelinquishDefault) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAnalogOutputRelinquishDefault) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAnalogOutputRelinquishDefault) GetActualValue() B /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAnalogOutputRelinquishDefault factory function for _BACnetConstructedDataAnalogOutputRelinquishDefault -func NewBACnetConstructedDataAnalogOutputRelinquishDefault(relinquishDefault BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAnalogOutputRelinquishDefault { +func NewBACnetConstructedDataAnalogOutputRelinquishDefault( relinquishDefault BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAnalogOutputRelinquishDefault { _result := &_BACnetConstructedDataAnalogOutputRelinquishDefault{ - RelinquishDefault: relinquishDefault, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + RelinquishDefault: relinquishDefault, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAnalogOutputRelinquishDefault(relinquishDefault BAC // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAnalogOutputRelinquishDefault(structType interface{}) BACnetConstructedDataAnalogOutputRelinquishDefault { - if casted, ok := structType.(BACnetConstructedDataAnalogOutputRelinquishDefault); ok { + if casted, ok := structType.(BACnetConstructedDataAnalogOutputRelinquishDefault); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAnalogOutputRelinquishDefault); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAnalogOutputRelinquishDefault) GetLengthInBits(ct return lengthInBits } + func (m *_BACnetConstructedDataAnalogOutputRelinquishDefault) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAnalogOutputRelinquishDefaultParseWithBuffer(ctx conte if pullErr := readBuffer.PullContext("relinquishDefault"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for relinquishDefault") } - _relinquishDefault, _relinquishDefaultErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_relinquishDefault, _relinquishDefaultErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _relinquishDefaultErr != nil { return nil, errors.Wrap(_relinquishDefaultErr, "Error parsing 'relinquishDefault' field of BACnetConstructedDataAnalogOutputRelinquishDefault") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAnalogOutputRelinquishDefaultParseWithBuffer(ctx conte // Create a partially initialized instance _child := &_BACnetConstructedDataAnalogOutputRelinquishDefault{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, RelinquishDefault: relinquishDefault, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAnalogOutputRelinquishDefault) SerializeWithWrite return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAnalogOutputRelinquishDefault") } - // Simple Field (relinquishDefault) - if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for relinquishDefault") - } - _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) - if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { - return errors.Wrap(popErr, "Error popping for relinquishDefault") - } - if _relinquishDefaultErr != nil { - return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (relinquishDefault) + if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for relinquishDefault") + } + _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) + if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { + return errors.Wrap(popErr, "Error popping for relinquishDefault") + } + if _relinquishDefaultErr != nil { + return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAnalogOutputRelinquishDefault"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAnalogOutputRelinquishDefault") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAnalogOutputRelinquishDefault) SerializeWithWrite return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAnalogOutputRelinquishDefault) isBACnetConstructedDataAnalogOutputRelinquishDefault() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAnalogOutputRelinquishDefault) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogValueAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogValueAll.go index a31482b1ff4..e0ea3fe6591 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogValueAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogValueAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAnalogValueAll is the corresponding interface of BACnetConstructedDataAnalogValueAll type BACnetConstructedDataAnalogValueAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataAnalogValueAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAnalogValueAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ANALOG_VALUE -} +func (m *_BACnetConstructedDataAnalogValueAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ANALOG_VALUE} -func (m *_BACnetConstructedDataAnalogValueAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataAnalogValueAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAnalogValueAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAnalogValueAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAnalogValueAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAnalogValueAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataAnalogValueAll factory function for _BACnetConstructedDataAnalogValueAll -func NewBACnetConstructedDataAnalogValueAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAnalogValueAll { +func NewBACnetConstructedDataAnalogValueAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAnalogValueAll { _result := &_BACnetConstructedDataAnalogValueAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataAnalogValueAll(openingTag BACnetOpeningTag, peekedT // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAnalogValueAll(structType interface{}) BACnetConstructedDataAnalogValueAll { - if casted, ok := structType.(BACnetConstructedDataAnalogValueAll); ok { + if casted, ok := structType.(BACnetConstructedDataAnalogValueAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAnalogValueAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataAnalogValueAll) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConstructedDataAnalogValueAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataAnalogValueAllParseWithBuffer(ctx context.Context, rea _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataAnalogValueAllParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetConstructedDataAnalogValueAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataAnalogValueAll) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAnalogValueAll) isBACnetConstructedDataAnalogValueAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataAnalogValueAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogValueFaultHighLimit.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogValueFaultHighLimit.go index 400a115359c..d96e3cd45e9 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogValueFaultHighLimit.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogValueFaultHighLimit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAnalogValueFaultHighLimit is the corresponding interface of BACnetConstructedDataAnalogValueFaultHighLimit type BACnetConstructedDataAnalogValueFaultHighLimit interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAnalogValueFaultHighLimitExactly interface { // _BACnetConstructedDataAnalogValueFaultHighLimit is the data-structure of this message type _BACnetConstructedDataAnalogValueFaultHighLimit struct { *_BACnetConstructedData - FaultHighLimit BACnetApplicationTagReal + FaultHighLimit BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAnalogValueFaultHighLimit) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ANALOG_VALUE -} +func (m *_BACnetConstructedDataAnalogValueFaultHighLimit) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ANALOG_VALUE} -func (m *_BACnetConstructedDataAnalogValueFaultHighLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FAULT_HIGH_LIMIT -} +func (m *_BACnetConstructedDataAnalogValueFaultHighLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FAULT_HIGH_LIMIT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAnalogValueFaultHighLimit) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAnalogValueFaultHighLimit) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAnalogValueFaultHighLimit) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAnalogValueFaultHighLimit) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAnalogValueFaultHighLimit) GetActualValue() BACne /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAnalogValueFaultHighLimit factory function for _BACnetConstructedDataAnalogValueFaultHighLimit -func NewBACnetConstructedDataAnalogValueFaultHighLimit(faultHighLimit BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAnalogValueFaultHighLimit { +func NewBACnetConstructedDataAnalogValueFaultHighLimit( faultHighLimit BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAnalogValueFaultHighLimit { _result := &_BACnetConstructedDataAnalogValueFaultHighLimit{ - FaultHighLimit: faultHighLimit, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + FaultHighLimit: faultHighLimit, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAnalogValueFaultHighLimit(faultHighLimit BACnetAppl // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAnalogValueFaultHighLimit(structType interface{}) BACnetConstructedDataAnalogValueFaultHighLimit { - if casted, ok := structType.(BACnetConstructedDataAnalogValueFaultHighLimit); ok { + if casted, ok := structType.(BACnetConstructedDataAnalogValueFaultHighLimit); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAnalogValueFaultHighLimit); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAnalogValueFaultHighLimit) GetLengthInBits(ctx co return lengthInBits } + func (m *_BACnetConstructedDataAnalogValueFaultHighLimit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAnalogValueFaultHighLimitParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("faultHighLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for faultHighLimit") } - _faultHighLimit, _faultHighLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_faultHighLimit, _faultHighLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _faultHighLimitErr != nil { return nil, errors.Wrap(_faultHighLimitErr, "Error parsing 'faultHighLimit' field of BACnetConstructedDataAnalogValueFaultHighLimit") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAnalogValueFaultHighLimitParseWithBuffer(ctx context.C // Create a partially initialized instance _child := &_BACnetConstructedDataAnalogValueFaultHighLimit{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FaultHighLimit: faultHighLimit, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAnalogValueFaultHighLimit) SerializeWithWriteBuff return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAnalogValueFaultHighLimit") } - // Simple Field (faultHighLimit) - if pushErr := writeBuffer.PushContext("faultHighLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for faultHighLimit") - } - _faultHighLimitErr := writeBuffer.WriteSerializable(ctx, m.GetFaultHighLimit()) - if popErr := writeBuffer.PopContext("faultHighLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for faultHighLimit") - } - if _faultHighLimitErr != nil { - return errors.Wrap(_faultHighLimitErr, "Error serializing 'faultHighLimit' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (faultHighLimit) + if pushErr := writeBuffer.PushContext("faultHighLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for faultHighLimit") + } + _faultHighLimitErr := writeBuffer.WriteSerializable(ctx, m.GetFaultHighLimit()) + if popErr := writeBuffer.PopContext("faultHighLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for faultHighLimit") + } + if _faultHighLimitErr != nil { + return errors.Wrap(_faultHighLimitErr, "Error serializing 'faultHighLimit' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAnalogValueFaultHighLimit"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAnalogValueFaultHighLimit") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAnalogValueFaultHighLimit) SerializeWithWriteBuff return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAnalogValueFaultHighLimit) isBACnetConstructedDataAnalogValueFaultHighLimit() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAnalogValueFaultHighLimit) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogValueFaultLowLimit.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogValueFaultLowLimit.go index cae5e624de0..693ec9ea11e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogValueFaultLowLimit.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogValueFaultLowLimit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAnalogValueFaultLowLimit is the corresponding interface of BACnetConstructedDataAnalogValueFaultLowLimit type BACnetConstructedDataAnalogValueFaultLowLimit interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAnalogValueFaultLowLimitExactly interface { // _BACnetConstructedDataAnalogValueFaultLowLimit is the data-structure of this message type _BACnetConstructedDataAnalogValueFaultLowLimit struct { *_BACnetConstructedData - FaultLowLimit BACnetApplicationTagReal + FaultLowLimit BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAnalogValueFaultLowLimit) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ANALOG_VALUE -} +func (m *_BACnetConstructedDataAnalogValueFaultLowLimit) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ANALOG_VALUE} -func (m *_BACnetConstructedDataAnalogValueFaultLowLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FAULT_LOW_LIMIT -} +func (m *_BACnetConstructedDataAnalogValueFaultLowLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FAULT_LOW_LIMIT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAnalogValueFaultLowLimit) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAnalogValueFaultLowLimit) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAnalogValueFaultLowLimit) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAnalogValueFaultLowLimit) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAnalogValueFaultLowLimit) GetActualValue() BACnet /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAnalogValueFaultLowLimit factory function for _BACnetConstructedDataAnalogValueFaultLowLimit -func NewBACnetConstructedDataAnalogValueFaultLowLimit(faultLowLimit BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAnalogValueFaultLowLimit { +func NewBACnetConstructedDataAnalogValueFaultLowLimit( faultLowLimit BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAnalogValueFaultLowLimit { _result := &_BACnetConstructedDataAnalogValueFaultLowLimit{ - FaultLowLimit: faultLowLimit, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + FaultLowLimit: faultLowLimit, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAnalogValueFaultLowLimit(faultLowLimit BACnetApplic // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAnalogValueFaultLowLimit(structType interface{}) BACnetConstructedDataAnalogValueFaultLowLimit { - if casted, ok := structType.(BACnetConstructedDataAnalogValueFaultLowLimit); ok { + if casted, ok := structType.(BACnetConstructedDataAnalogValueFaultLowLimit); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAnalogValueFaultLowLimit); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAnalogValueFaultLowLimit) GetLengthInBits(ctx con return lengthInBits } + func (m *_BACnetConstructedDataAnalogValueFaultLowLimit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAnalogValueFaultLowLimitParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("faultLowLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for faultLowLimit") } - _faultLowLimit, _faultLowLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_faultLowLimit, _faultLowLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _faultLowLimitErr != nil { return nil, errors.Wrap(_faultLowLimitErr, "Error parsing 'faultLowLimit' field of BACnetConstructedDataAnalogValueFaultLowLimit") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAnalogValueFaultLowLimitParseWithBuffer(ctx context.Co // Create a partially initialized instance _child := &_BACnetConstructedDataAnalogValueFaultLowLimit{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FaultLowLimit: faultLowLimit, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAnalogValueFaultLowLimit) SerializeWithWriteBuffe return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAnalogValueFaultLowLimit") } - // Simple Field (faultLowLimit) - if pushErr := writeBuffer.PushContext("faultLowLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for faultLowLimit") - } - _faultLowLimitErr := writeBuffer.WriteSerializable(ctx, m.GetFaultLowLimit()) - if popErr := writeBuffer.PopContext("faultLowLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for faultLowLimit") - } - if _faultLowLimitErr != nil { - return errors.Wrap(_faultLowLimitErr, "Error serializing 'faultLowLimit' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (faultLowLimit) + if pushErr := writeBuffer.PushContext("faultLowLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for faultLowLimit") + } + _faultLowLimitErr := writeBuffer.WriteSerializable(ctx, m.GetFaultLowLimit()) + if popErr := writeBuffer.PopContext("faultLowLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for faultLowLimit") + } + if _faultLowLimitErr != nil { + return errors.Wrap(_faultLowLimitErr, "Error serializing 'faultLowLimit' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAnalogValueFaultLowLimit"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAnalogValueFaultLowLimit") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAnalogValueFaultLowLimit) SerializeWithWriteBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAnalogValueFaultLowLimit) isBACnetConstructedDataAnalogValueFaultLowLimit() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAnalogValueFaultLowLimit) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogValueMaxPresValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogValueMaxPresValue.go index f60c7693f9b..0e99bf8e723 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogValueMaxPresValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogValueMaxPresValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAnalogValueMaxPresValue is the corresponding interface of BACnetConstructedDataAnalogValueMaxPresValue type BACnetConstructedDataAnalogValueMaxPresValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAnalogValueMaxPresValueExactly interface { // _BACnetConstructedDataAnalogValueMaxPresValue is the data-structure of this message type _BACnetConstructedDataAnalogValueMaxPresValue struct { *_BACnetConstructedData - MaxPresValue BACnetApplicationTagReal + MaxPresValue BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAnalogValueMaxPresValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ANALOG_VALUE -} +func (m *_BACnetConstructedDataAnalogValueMaxPresValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ANALOG_VALUE} -func (m *_BACnetConstructedDataAnalogValueMaxPresValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MAX_PRES_VALUE -} +func (m *_BACnetConstructedDataAnalogValueMaxPresValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MAX_PRES_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAnalogValueMaxPresValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAnalogValueMaxPresValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAnalogValueMaxPresValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAnalogValueMaxPresValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAnalogValueMaxPresValue) GetActualValue() BACnetA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAnalogValueMaxPresValue factory function for _BACnetConstructedDataAnalogValueMaxPresValue -func NewBACnetConstructedDataAnalogValueMaxPresValue(maxPresValue BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAnalogValueMaxPresValue { +func NewBACnetConstructedDataAnalogValueMaxPresValue( maxPresValue BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAnalogValueMaxPresValue { _result := &_BACnetConstructedDataAnalogValueMaxPresValue{ - MaxPresValue: maxPresValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + MaxPresValue: maxPresValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAnalogValueMaxPresValue(maxPresValue BACnetApplicat // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAnalogValueMaxPresValue(structType interface{}) BACnetConstructedDataAnalogValueMaxPresValue { - if casted, ok := structType.(BACnetConstructedDataAnalogValueMaxPresValue); ok { + if casted, ok := structType.(BACnetConstructedDataAnalogValueMaxPresValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAnalogValueMaxPresValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAnalogValueMaxPresValue) GetLengthInBits(ctx cont return lengthInBits } + func (m *_BACnetConstructedDataAnalogValueMaxPresValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAnalogValueMaxPresValueParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("maxPresValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for maxPresValue") } - _maxPresValue, _maxPresValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_maxPresValue, _maxPresValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _maxPresValueErr != nil { return nil, errors.Wrap(_maxPresValueErr, "Error parsing 'maxPresValue' field of BACnetConstructedDataAnalogValueMaxPresValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAnalogValueMaxPresValueParseWithBuffer(ctx context.Con // Create a partially initialized instance _child := &_BACnetConstructedDataAnalogValueMaxPresValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, MaxPresValue: maxPresValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAnalogValueMaxPresValue) SerializeWithWriteBuffer return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAnalogValueMaxPresValue") } - // Simple Field (maxPresValue) - if pushErr := writeBuffer.PushContext("maxPresValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for maxPresValue") - } - _maxPresValueErr := writeBuffer.WriteSerializable(ctx, m.GetMaxPresValue()) - if popErr := writeBuffer.PopContext("maxPresValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for maxPresValue") - } - if _maxPresValueErr != nil { - return errors.Wrap(_maxPresValueErr, "Error serializing 'maxPresValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (maxPresValue) + if pushErr := writeBuffer.PushContext("maxPresValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for maxPresValue") + } + _maxPresValueErr := writeBuffer.WriteSerializable(ctx, m.GetMaxPresValue()) + if popErr := writeBuffer.PopContext("maxPresValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for maxPresValue") + } + if _maxPresValueErr != nil { + return errors.Wrap(_maxPresValueErr, "Error serializing 'maxPresValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAnalogValueMaxPresValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAnalogValueMaxPresValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAnalogValueMaxPresValue) SerializeWithWriteBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAnalogValueMaxPresValue) isBACnetConstructedDataAnalogValueMaxPresValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAnalogValueMaxPresValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogValuePresentValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogValuePresentValue.go index a39993831fe..f6da7a79417 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogValuePresentValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogValuePresentValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAnalogValuePresentValue is the corresponding interface of BACnetConstructedDataAnalogValuePresentValue type BACnetConstructedDataAnalogValuePresentValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAnalogValuePresentValueExactly interface { // _BACnetConstructedDataAnalogValuePresentValue is the data-structure of this message type _BACnetConstructedDataAnalogValuePresentValue struct { *_BACnetConstructedData - PresentValue BACnetApplicationTagReal + PresentValue BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAnalogValuePresentValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ANALOG_VALUE -} +func (m *_BACnetConstructedDataAnalogValuePresentValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ANALOG_VALUE} -func (m *_BACnetConstructedDataAnalogValuePresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PRESENT_VALUE -} +func (m *_BACnetConstructedDataAnalogValuePresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PRESENT_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAnalogValuePresentValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAnalogValuePresentValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAnalogValuePresentValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAnalogValuePresentValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAnalogValuePresentValue) GetActualValue() BACnetA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAnalogValuePresentValue factory function for _BACnetConstructedDataAnalogValuePresentValue -func NewBACnetConstructedDataAnalogValuePresentValue(presentValue BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAnalogValuePresentValue { +func NewBACnetConstructedDataAnalogValuePresentValue( presentValue BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAnalogValuePresentValue { _result := &_BACnetConstructedDataAnalogValuePresentValue{ - PresentValue: presentValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PresentValue: presentValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAnalogValuePresentValue(presentValue BACnetApplicat // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAnalogValuePresentValue(structType interface{}) BACnetConstructedDataAnalogValuePresentValue { - if casted, ok := structType.(BACnetConstructedDataAnalogValuePresentValue); ok { + if casted, ok := structType.(BACnetConstructedDataAnalogValuePresentValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAnalogValuePresentValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAnalogValuePresentValue) GetLengthInBits(ctx cont return lengthInBits } + func (m *_BACnetConstructedDataAnalogValuePresentValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAnalogValuePresentValueParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("presentValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for presentValue") } - _presentValue, _presentValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_presentValue, _presentValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _presentValueErr != nil { return nil, errors.Wrap(_presentValueErr, "Error parsing 'presentValue' field of BACnetConstructedDataAnalogValuePresentValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAnalogValuePresentValueParseWithBuffer(ctx context.Con // Create a partially initialized instance _child := &_BACnetConstructedDataAnalogValuePresentValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PresentValue: presentValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAnalogValuePresentValue) SerializeWithWriteBuffer return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAnalogValuePresentValue") } - // Simple Field (presentValue) - if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for presentValue") - } - _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) - if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for presentValue") - } - if _presentValueErr != nil { - return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (presentValue) + if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for presentValue") + } + _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) + if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for presentValue") + } + if _presentValueErr != nil { + return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAnalogValuePresentValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAnalogValuePresentValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAnalogValuePresentValue) SerializeWithWriteBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAnalogValuePresentValue) isBACnetConstructedDataAnalogValuePresentValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAnalogValuePresentValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogValueRelinquishDefault.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogValueRelinquishDefault.go index 4cea243ab97..835050988c8 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogValueRelinquishDefault.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAnalogValueRelinquishDefault.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAnalogValueRelinquishDefault is the corresponding interface of BACnetConstructedDataAnalogValueRelinquishDefault type BACnetConstructedDataAnalogValueRelinquishDefault interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAnalogValueRelinquishDefaultExactly interface { // _BACnetConstructedDataAnalogValueRelinquishDefault is the data-structure of this message type _BACnetConstructedDataAnalogValueRelinquishDefault struct { *_BACnetConstructedData - RelinquishDefault BACnetApplicationTagReal + RelinquishDefault BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAnalogValueRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ANALOG_VALUE -} +func (m *_BACnetConstructedDataAnalogValueRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ANALOG_VALUE} -func (m *_BACnetConstructedDataAnalogValueRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_RELINQUISH_DEFAULT -} +func (m *_BACnetConstructedDataAnalogValueRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_RELINQUISH_DEFAULT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAnalogValueRelinquishDefault) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAnalogValueRelinquishDefault) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAnalogValueRelinquishDefault) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAnalogValueRelinquishDefault) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAnalogValueRelinquishDefault) GetActualValue() BA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAnalogValueRelinquishDefault factory function for _BACnetConstructedDataAnalogValueRelinquishDefault -func NewBACnetConstructedDataAnalogValueRelinquishDefault(relinquishDefault BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAnalogValueRelinquishDefault { +func NewBACnetConstructedDataAnalogValueRelinquishDefault( relinquishDefault BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAnalogValueRelinquishDefault { _result := &_BACnetConstructedDataAnalogValueRelinquishDefault{ - RelinquishDefault: relinquishDefault, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + RelinquishDefault: relinquishDefault, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAnalogValueRelinquishDefault(relinquishDefault BACn // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAnalogValueRelinquishDefault(structType interface{}) BACnetConstructedDataAnalogValueRelinquishDefault { - if casted, ok := structType.(BACnetConstructedDataAnalogValueRelinquishDefault); ok { + if casted, ok := structType.(BACnetConstructedDataAnalogValueRelinquishDefault); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAnalogValueRelinquishDefault); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAnalogValueRelinquishDefault) GetLengthInBits(ctx return lengthInBits } + func (m *_BACnetConstructedDataAnalogValueRelinquishDefault) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAnalogValueRelinquishDefaultParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("relinquishDefault"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for relinquishDefault") } - _relinquishDefault, _relinquishDefaultErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_relinquishDefault, _relinquishDefaultErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _relinquishDefaultErr != nil { return nil, errors.Wrap(_relinquishDefaultErr, "Error parsing 'relinquishDefault' field of BACnetConstructedDataAnalogValueRelinquishDefault") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAnalogValueRelinquishDefaultParseWithBuffer(ctx contex // Create a partially initialized instance _child := &_BACnetConstructedDataAnalogValueRelinquishDefault{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, RelinquishDefault: relinquishDefault, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAnalogValueRelinquishDefault) SerializeWithWriteB return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAnalogValueRelinquishDefault") } - // Simple Field (relinquishDefault) - if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for relinquishDefault") - } - _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) - if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { - return errors.Wrap(popErr, "Error popping for relinquishDefault") - } - if _relinquishDefaultErr != nil { - return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (relinquishDefault) + if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for relinquishDefault") + } + _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) + if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { + return errors.Wrap(popErr, "Error popping for relinquishDefault") + } + if _relinquishDefaultErr != nil { + return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAnalogValueRelinquishDefault"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAnalogValueRelinquishDefault") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAnalogValueRelinquishDefault) SerializeWithWriteB return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAnalogValueRelinquishDefault) isBACnetConstructedDataAnalogValueRelinquishDefault() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAnalogValueRelinquishDefault) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataApplicationSoftwareVersion.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataApplicationSoftwareVersion.go index 2959d03c2a5..7c1a1623837 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataApplicationSoftwareVersion.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataApplicationSoftwareVersion.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataApplicationSoftwareVersion is the corresponding interface of BACnetConstructedDataApplicationSoftwareVersion type BACnetConstructedDataApplicationSoftwareVersion interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataApplicationSoftwareVersionExactly interface { // _BACnetConstructedDataApplicationSoftwareVersion is the data-structure of this message type _BACnetConstructedDataApplicationSoftwareVersion struct { *_BACnetConstructedData - ApplicationSoftwareVersion BACnetApplicationTagCharacterString + ApplicationSoftwareVersion BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataApplicationSoftwareVersion) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataApplicationSoftwareVersion) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataApplicationSoftwareVersion) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_APPLICATION_SOFTWARE_VERSION -} +func (m *_BACnetConstructedDataApplicationSoftwareVersion) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_APPLICATION_SOFTWARE_VERSION} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataApplicationSoftwareVersion) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataApplicationSoftwareVersion) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataApplicationSoftwareVersion) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataApplicationSoftwareVersion) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataApplicationSoftwareVersion) GetActualValue() BACn /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataApplicationSoftwareVersion factory function for _BACnetConstructedDataApplicationSoftwareVersion -func NewBACnetConstructedDataApplicationSoftwareVersion(applicationSoftwareVersion BACnetApplicationTagCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataApplicationSoftwareVersion { +func NewBACnetConstructedDataApplicationSoftwareVersion( applicationSoftwareVersion BACnetApplicationTagCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataApplicationSoftwareVersion { _result := &_BACnetConstructedDataApplicationSoftwareVersion{ ApplicationSoftwareVersion: applicationSoftwareVersion, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataApplicationSoftwareVersion(applicationSoftwareVersi // Deprecated: use the interface for direct cast func CastBACnetConstructedDataApplicationSoftwareVersion(structType interface{}) BACnetConstructedDataApplicationSoftwareVersion { - if casted, ok := structType.(BACnetConstructedDataApplicationSoftwareVersion); ok { + if casted, ok := structType.(BACnetConstructedDataApplicationSoftwareVersion); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataApplicationSoftwareVersion); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataApplicationSoftwareVersion) GetLengthInBits(ctx c return lengthInBits } + func (m *_BACnetConstructedDataApplicationSoftwareVersion) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataApplicationSoftwareVersionParseWithBuffer(ctx context. if pullErr := readBuffer.PullContext("applicationSoftwareVersion"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for applicationSoftwareVersion") } - _applicationSoftwareVersion, _applicationSoftwareVersionErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_applicationSoftwareVersion, _applicationSoftwareVersionErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _applicationSoftwareVersionErr != nil { return nil, errors.Wrap(_applicationSoftwareVersionErr, "Error parsing 'applicationSoftwareVersion' field of BACnetConstructedDataApplicationSoftwareVersion") } @@ -186,7 +188,7 @@ func BACnetConstructedDataApplicationSoftwareVersionParseWithBuffer(ctx context. // Create a partially initialized instance _child := &_BACnetConstructedDataApplicationSoftwareVersion{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ApplicationSoftwareVersion: applicationSoftwareVersion, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataApplicationSoftwareVersion) SerializeWithWriteBuf return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataApplicationSoftwareVersion") } - // Simple Field (applicationSoftwareVersion) - if pushErr := writeBuffer.PushContext("applicationSoftwareVersion"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for applicationSoftwareVersion") - } - _applicationSoftwareVersionErr := writeBuffer.WriteSerializable(ctx, m.GetApplicationSoftwareVersion()) - if popErr := writeBuffer.PopContext("applicationSoftwareVersion"); popErr != nil { - return errors.Wrap(popErr, "Error popping for applicationSoftwareVersion") - } - if _applicationSoftwareVersionErr != nil { - return errors.Wrap(_applicationSoftwareVersionErr, "Error serializing 'applicationSoftwareVersion' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (applicationSoftwareVersion) + if pushErr := writeBuffer.PushContext("applicationSoftwareVersion"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for applicationSoftwareVersion") + } + _applicationSoftwareVersionErr := writeBuffer.WriteSerializable(ctx, m.GetApplicationSoftwareVersion()) + if popErr := writeBuffer.PopContext("applicationSoftwareVersion"); popErr != nil { + return errors.Wrap(popErr, "Error popping for applicationSoftwareVersion") + } + if _applicationSoftwareVersionErr != nil { + return errors.Wrap(_applicationSoftwareVersionErr, "Error serializing 'applicationSoftwareVersion' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataApplicationSoftwareVersion"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataApplicationSoftwareVersion") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataApplicationSoftwareVersion) SerializeWithWriteBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataApplicationSoftwareVersion) isBACnetConstructedDataApplicationSoftwareVersion() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataApplicationSoftwareVersion) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataArchive.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataArchive.go index 0ff299f12e2..18d5044a954 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataArchive.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataArchive.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataArchive is the corresponding interface of BACnetConstructedDataArchive type BACnetConstructedDataArchive interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataArchiveExactly interface { // _BACnetConstructedDataArchive is the data-structure of this message type _BACnetConstructedDataArchive struct { *_BACnetConstructedData - Archive BACnetApplicationTagBoolean + Archive BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataArchive) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataArchive) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataArchive) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ARCHIVE -} +func (m *_BACnetConstructedDataArchive) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ARCHIVE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataArchive) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataArchive) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataArchive) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataArchive) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataArchive) GetActualValue() BACnetApplicationTagBoo /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataArchive factory function for _BACnetConstructedDataArchive -func NewBACnetConstructedDataArchive(archive BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataArchive { +func NewBACnetConstructedDataArchive( archive BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataArchive { _result := &_BACnetConstructedDataArchive{ - Archive: archive, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Archive: archive, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataArchive(archive BACnetApplicationTagBoolean, openin // Deprecated: use the interface for direct cast func CastBACnetConstructedDataArchive(structType interface{}) BACnetConstructedDataArchive { - if casted, ok := structType.(BACnetConstructedDataArchive); ok { + if casted, ok := structType.(BACnetConstructedDataArchive); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataArchive); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataArchive) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_BACnetConstructedDataArchive) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataArchiveParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("archive"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for archive") } - _archive, _archiveErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_archive, _archiveErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _archiveErr != nil { return nil, errors.Wrap(_archiveErr, "Error parsing 'archive' field of BACnetConstructedDataArchive") } @@ -186,7 +188,7 @@ func BACnetConstructedDataArchiveParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_BACnetConstructedDataArchive{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Archive: archive, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataArchive) SerializeWithWriteBuffer(ctx context.Con return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataArchive") } - // Simple Field (archive) - if pushErr := writeBuffer.PushContext("archive"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for archive") - } - _archiveErr := writeBuffer.WriteSerializable(ctx, m.GetArchive()) - if popErr := writeBuffer.PopContext("archive"); popErr != nil { - return errors.Wrap(popErr, "Error popping for archive") - } - if _archiveErr != nil { - return errors.Wrap(_archiveErr, "Error serializing 'archive' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (archive) + if pushErr := writeBuffer.PushContext("archive"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for archive") + } + _archiveErr := writeBuffer.WriteSerializable(ctx, m.GetArchive()) + if popErr := writeBuffer.PopContext("archive"); popErr != nil { + return errors.Wrap(popErr, "Error popping for archive") + } + if _archiveErr != nil { + return errors.Wrap(_archiveErr, "Error serializing 'archive' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataArchive"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataArchive") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataArchive) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataArchive) isBACnetConstructedDataArchive() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataArchive) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAssignedAccessRights.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAssignedAccessRights.go index 3f63a01e1f2..24263668da5 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAssignedAccessRights.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAssignedAccessRights.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAssignedAccessRights is the corresponding interface of BACnetConstructedDataAssignedAccessRights type BACnetConstructedDataAssignedAccessRights interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataAssignedAccessRightsExactly interface { // _BACnetConstructedDataAssignedAccessRights is the data-structure of this message type _BACnetConstructedDataAssignedAccessRights struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - AssignedAccessRights []BACnetAssignedAccessRights + NumberOfDataElements BACnetApplicationTagUnsignedInteger + AssignedAccessRights []BACnetAssignedAccessRights } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAssignedAccessRights) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataAssignedAccessRights) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataAssignedAccessRights) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ASSIGNED_ACCESS_RIGHTS -} +func (m *_BACnetConstructedDataAssignedAccessRights) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ASSIGNED_ACCESS_RIGHTS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAssignedAccessRights) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAssignedAccessRights) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAssignedAccessRights) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAssignedAccessRights) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataAssignedAccessRights) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAssignedAccessRights factory function for _BACnetConstructedDataAssignedAccessRights -func NewBACnetConstructedDataAssignedAccessRights(numberOfDataElements BACnetApplicationTagUnsignedInteger, assignedAccessRights []BACnetAssignedAccessRights, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAssignedAccessRights { +func NewBACnetConstructedDataAssignedAccessRights( numberOfDataElements BACnetApplicationTagUnsignedInteger , assignedAccessRights []BACnetAssignedAccessRights , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAssignedAccessRights { _result := &_BACnetConstructedDataAssignedAccessRights{ - NumberOfDataElements: numberOfDataElements, - AssignedAccessRights: assignedAccessRights, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + AssignedAccessRights: assignedAccessRights, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataAssignedAccessRights(numberOfDataElements BACnetApp // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAssignedAccessRights(structType interface{}) BACnetConstructedDataAssignedAccessRights { - if casted, ok := structType.(BACnetConstructedDataAssignedAccessRights); ok { + if casted, ok := structType.(BACnetConstructedDataAssignedAccessRights); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAssignedAccessRights); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataAssignedAccessRights) GetLengthInBits(ctx context return lengthInBits } + func (m *_BACnetConstructedDataAssignedAccessRights) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataAssignedAccessRightsParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataAssignedAccessRightsParseWithBuffer(ctx context.Contex // Terminated array var assignedAccessRights []BACnetAssignedAccessRights { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetAssignedAccessRightsParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetAssignedAccessRightsParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'assignedAccessRights' field of BACnetConstructedDataAssignedAccessRights") } @@ -235,7 +237,7 @@ func BACnetConstructedDataAssignedAccessRightsParseWithBuffer(ctx context.Contex // Create a partially initialized instance _child := &_BACnetConstructedDataAssignedAccessRights{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataAssignedAccessRights) SerializeWithWriteBuffer(ct if pushErr := writeBuffer.PushContext("BACnetConstructedDataAssignedAccessRights"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAssignedAccessRights") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (assignedAccessRights) - if pushErr := writeBuffer.PushContext("assignedAccessRights", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for assignedAccessRights") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetAssignedAccessRights() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAssignedAccessRights()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'assignedAccessRights' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("assignedAccessRights", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for assignedAccessRights") + } + + // Array Field (assignedAccessRights) + if pushErr := writeBuffer.PushContext("assignedAccessRights", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for assignedAccessRights") + } + for _curItem, _element := range m.GetAssignedAccessRights() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAssignedAccessRights()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'assignedAccessRights' field") } + } + if popErr := writeBuffer.PopContext("assignedAccessRights", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for assignedAccessRights") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAssignedAccessRights"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAssignedAccessRights") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataAssignedAccessRights) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAssignedAccessRights) isBACnetConstructedDataAssignedAccessRights() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataAssignedAccessRights) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAssignedLandingCalls.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAssignedLandingCalls.go index 50f4cecb8ee..3185eb65145 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAssignedLandingCalls.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAssignedLandingCalls.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAssignedLandingCalls is the corresponding interface of BACnetConstructedDataAssignedLandingCalls type BACnetConstructedDataAssignedLandingCalls interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataAssignedLandingCallsExactly interface { // _BACnetConstructedDataAssignedLandingCalls is the data-structure of this message type _BACnetConstructedDataAssignedLandingCalls struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - AssignedLandingCalls []BACnetAssignedLandingCalls + NumberOfDataElements BACnetApplicationTagUnsignedInteger + AssignedLandingCalls []BACnetAssignedLandingCalls } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAssignedLandingCalls) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataAssignedLandingCalls) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataAssignedLandingCalls) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ASSIGNED_LANDING_CALLS -} +func (m *_BACnetConstructedDataAssignedLandingCalls) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ASSIGNED_LANDING_CALLS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAssignedLandingCalls) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAssignedLandingCalls) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAssignedLandingCalls) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAssignedLandingCalls) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataAssignedLandingCalls) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAssignedLandingCalls factory function for _BACnetConstructedDataAssignedLandingCalls -func NewBACnetConstructedDataAssignedLandingCalls(numberOfDataElements BACnetApplicationTagUnsignedInteger, assignedLandingCalls []BACnetAssignedLandingCalls, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAssignedLandingCalls { +func NewBACnetConstructedDataAssignedLandingCalls( numberOfDataElements BACnetApplicationTagUnsignedInteger , assignedLandingCalls []BACnetAssignedLandingCalls , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAssignedLandingCalls { _result := &_BACnetConstructedDataAssignedLandingCalls{ - NumberOfDataElements: numberOfDataElements, - AssignedLandingCalls: assignedLandingCalls, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + AssignedLandingCalls: assignedLandingCalls, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataAssignedLandingCalls(numberOfDataElements BACnetApp // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAssignedLandingCalls(structType interface{}) BACnetConstructedDataAssignedLandingCalls { - if casted, ok := structType.(BACnetConstructedDataAssignedLandingCalls); ok { + if casted, ok := structType.(BACnetConstructedDataAssignedLandingCalls); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAssignedLandingCalls); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataAssignedLandingCalls) GetLengthInBits(ctx context return lengthInBits } + func (m *_BACnetConstructedDataAssignedLandingCalls) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataAssignedLandingCallsParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataAssignedLandingCallsParseWithBuffer(ctx context.Contex // Terminated array var assignedLandingCalls []BACnetAssignedLandingCalls { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetAssignedLandingCallsParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetAssignedLandingCallsParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'assignedLandingCalls' field of BACnetConstructedDataAssignedLandingCalls") } @@ -235,7 +237,7 @@ func BACnetConstructedDataAssignedLandingCallsParseWithBuffer(ctx context.Contex // Create a partially initialized instance _child := &_BACnetConstructedDataAssignedLandingCalls{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataAssignedLandingCalls) SerializeWithWriteBuffer(ct if pushErr := writeBuffer.PushContext("BACnetConstructedDataAssignedLandingCalls"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAssignedLandingCalls") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (assignedLandingCalls) - if pushErr := writeBuffer.PushContext("assignedLandingCalls", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for assignedLandingCalls") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetAssignedLandingCalls() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAssignedLandingCalls()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'assignedLandingCalls' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("assignedLandingCalls", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for assignedLandingCalls") + } + + // Array Field (assignedLandingCalls) + if pushErr := writeBuffer.PushContext("assignedLandingCalls", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for assignedLandingCalls") + } + for _curItem, _element := range m.GetAssignedLandingCalls() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAssignedLandingCalls()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'assignedLandingCalls' field") } + } + if popErr := writeBuffer.PopContext("assignedLandingCalls", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for assignedLandingCalls") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAssignedLandingCalls"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAssignedLandingCalls") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataAssignedLandingCalls) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAssignedLandingCalls) isBACnetConstructedDataAssignedLandingCalls() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataAssignedLandingCalls) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAttemptedSamples.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAttemptedSamples.go index 033550600d2..bc23cfddfed 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAttemptedSamples.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAttemptedSamples.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAttemptedSamples is the corresponding interface of BACnetConstructedDataAttemptedSamples type BACnetConstructedDataAttemptedSamples interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAttemptedSamplesExactly interface { // _BACnetConstructedDataAttemptedSamples is the data-structure of this message type _BACnetConstructedDataAttemptedSamples struct { *_BACnetConstructedData - AttemptedSamples BACnetApplicationTagUnsignedInteger + AttemptedSamples BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAttemptedSamples) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataAttemptedSamples) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataAttemptedSamples) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ATTEMPTED_SAMPLES -} +func (m *_BACnetConstructedDataAttemptedSamples) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ATTEMPTED_SAMPLES} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAttemptedSamples) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAttemptedSamples) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAttemptedSamples) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAttemptedSamples) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAttemptedSamples) GetActualValue() BACnetApplicat /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAttemptedSamples factory function for _BACnetConstructedDataAttemptedSamples -func NewBACnetConstructedDataAttemptedSamples(attemptedSamples BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAttemptedSamples { +func NewBACnetConstructedDataAttemptedSamples( attemptedSamples BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAttemptedSamples { _result := &_BACnetConstructedDataAttemptedSamples{ - AttemptedSamples: attemptedSamples, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + AttemptedSamples: attemptedSamples, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAttemptedSamples(attemptedSamples BACnetApplication // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAttemptedSamples(structType interface{}) BACnetConstructedDataAttemptedSamples { - if casted, ok := structType.(BACnetConstructedDataAttemptedSamples); ok { + if casted, ok := structType.(BACnetConstructedDataAttemptedSamples); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAttemptedSamples); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAttemptedSamples) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetConstructedDataAttemptedSamples) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAttemptedSamplesParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("attemptedSamples"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for attemptedSamples") } - _attemptedSamples, _attemptedSamplesErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_attemptedSamples, _attemptedSamplesErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _attemptedSamplesErr != nil { return nil, errors.Wrap(_attemptedSamplesErr, "Error parsing 'attemptedSamples' field of BACnetConstructedDataAttemptedSamples") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAttemptedSamplesParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_BACnetConstructedDataAttemptedSamples{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, AttemptedSamples: attemptedSamples, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAttemptedSamples) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAttemptedSamples") } - // Simple Field (attemptedSamples) - if pushErr := writeBuffer.PushContext("attemptedSamples"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for attemptedSamples") - } - _attemptedSamplesErr := writeBuffer.WriteSerializable(ctx, m.GetAttemptedSamples()) - if popErr := writeBuffer.PopContext("attemptedSamples"); popErr != nil { - return errors.Wrap(popErr, "Error popping for attemptedSamples") - } - if _attemptedSamplesErr != nil { - return errors.Wrap(_attemptedSamplesErr, "Error serializing 'attemptedSamples' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (attemptedSamples) + if pushErr := writeBuffer.PushContext("attemptedSamples"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for attemptedSamples") + } + _attemptedSamplesErr := writeBuffer.WriteSerializable(ctx, m.GetAttemptedSamples()) + if popErr := writeBuffer.PopContext("attemptedSamples"); popErr != nil { + return errors.Wrap(popErr, "Error popping for attemptedSamples") + } + if _attemptedSamplesErr != nil { + return errors.Wrap(_attemptedSamplesErr, "Error serializing 'attemptedSamples' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAttemptedSamples"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAttemptedSamples") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAttemptedSamples) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAttemptedSamples) isBACnetConstructedDataAttemptedSamples() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAttemptedSamples) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAuthenticationFactors.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAuthenticationFactors.go index c4a8eb7fde4..258c50f442a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAuthenticationFactors.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAuthenticationFactors.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAuthenticationFactors is the corresponding interface of BACnetConstructedDataAuthenticationFactors type BACnetConstructedDataAuthenticationFactors interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataAuthenticationFactorsExactly interface { // _BACnetConstructedDataAuthenticationFactors is the data-structure of this message type _BACnetConstructedDataAuthenticationFactors struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - AuthenticationFactors []BACnetCredentialAuthenticationFactor + NumberOfDataElements BACnetApplicationTagUnsignedInteger + AuthenticationFactors []BACnetCredentialAuthenticationFactor } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAuthenticationFactors) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataAuthenticationFactors) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataAuthenticationFactors) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_AUTHENTICATION_FACTORS -} +func (m *_BACnetConstructedDataAuthenticationFactors) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_AUTHENTICATION_FACTORS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAuthenticationFactors) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAuthenticationFactors) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAuthenticationFactors) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAuthenticationFactors) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataAuthenticationFactors) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAuthenticationFactors factory function for _BACnetConstructedDataAuthenticationFactors -func NewBACnetConstructedDataAuthenticationFactors(numberOfDataElements BACnetApplicationTagUnsignedInteger, authenticationFactors []BACnetCredentialAuthenticationFactor, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAuthenticationFactors { +func NewBACnetConstructedDataAuthenticationFactors( numberOfDataElements BACnetApplicationTagUnsignedInteger , authenticationFactors []BACnetCredentialAuthenticationFactor , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAuthenticationFactors { _result := &_BACnetConstructedDataAuthenticationFactors{ - NumberOfDataElements: numberOfDataElements, - AuthenticationFactors: authenticationFactors, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + AuthenticationFactors: authenticationFactors, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataAuthenticationFactors(numberOfDataElements BACnetAp // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAuthenticationFactors(structType interface{}) BACnetConstructedDataAuthenticationFactors { - if casted, ok := structType.(BACnetConstructedDataAuthenticationFactors); ok { + if casted, ok := structType.(BACnetConstructedDataAuthenticationFactors); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAuthenticationFactors); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataAuthenticationFactors) GetLengthInBits(ctx contex return lengthInBits } + func (m *_BACnetConstructedDataAuthenticationFactors) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataAuthenticationFactorsParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataAuthenticationFactorsParseWithBuffer(ctx context.Conte // Terminated array var authenticationFactors []BACnetCredentialAuthenticationFactor { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetCredentialAuthenticationFactorParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetCredentialAuthenticationFactorParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'authenticationFactors' field of BACnetConstructedDataAuthenticationFactors") } @@ -235,10 +237,10 @@ func BACnetConstructedDataAuthenticationFactorsParseWithBuffer(ctx context.Conte // Create a partially initialized instance _child := &_BACnetConstructedDataAuthenticationFactors{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, - NumberOfDataElements: numberOfDataElements, + NumberOfDataElements: numberOfDataElements, AuthenticationFactors: authenticationFactors, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataAuthenticationFactors) SerializeWithWriteBuffer(c if pushErr := writeBuffer.PushContext("BACnetConstructedDataAuthenticationFactors"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAuthenticationFactors") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (authenticationFactors) - if pushErr := writeBuffer.PushContext("authenticationFactors", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for authenticationFactors") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetAuthenticationFactors() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAuthenticationFactors()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'authenticationFactors' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("authenticationFactors", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for authenticationFactors") + } + + // Array Field (authenticationFactors) + if pushErr := writeBuffer.PushContext("authenticationFactors", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for authenticationFactors") + } + for _curItem, _element := range m.GetAuthenticationFactors() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAuthenticationFactors()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'authenticationFactors' field") } + } + if popErr := writeBuffer.PopContext("authenticationFactors", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for authenticationFactors") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAuthenticationFactors"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAuthenticationFactors") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataAuthenticationFactors) SerializeWithWriteBuffer(c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAuthenticationFactors) isBACnetConstructedDataAuthenticationFactors() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataAuthenticationFactors) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAuthenticationPolicyList.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAuthenticationPolicyList.go index 464b90cbc71..ff856235c87 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAuthenticationPolicyList.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAuthenticationPolicyList.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAuthenticationPolicyList is the corresponding interface of BACnetConstructedDataAuthenticationPolicyList type BACnetConstructedDataAuthenticationPolicyList interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataAuthenticationPolicyListExactly interface { // _BACnetConstructedDataAuthenticationPolicyList is the data-structure of this message type _BACnetConstructedDataAuthenticationPolicyList struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - AuthenticationPolicyList []BACnetAuthenticationPolicy + NumberOfDataElements BACnetApplicationTagUnsignedInteger + AuthenticationPolicyList []BACnetAuthenticationPolicy } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAuthenticationPolicyList) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataAuthenticationPolicyList) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataAuthenticationPolicyList) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_AUTHENTICATION_POLICY_LIST -} +func (m *_BACnetConstructedDataAuthenticationPolicyList) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_AUTHENTICATION_POLICY_LIST} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAuthenticationPolicyList) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAuthenticationPolicyList) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAuthenticationPolicyList) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAuthenticationPolicyList) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataAuthenticationPolicyList) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAuthenticationPolicyList factory function for _BACnetConstructedDataAuthenticationPolicyList -func NewBACnetConstructedDataAuthenticationPolicyList(numberOfDataElements BACnetApplicationTagUnsignedInteger, authenticationPolicyList []BACnetAuthenticationPolicy, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAuthenticationPolicyList { +func NewBACnetConstructedDataAuthenticationPolicyList( numberOfDataElements BACnetApplicationTagUnsignedInteger , authenticationPolicyList []BACnetAuthenticationPolicy , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAuthenticationPolicyList { _result := &_BACnetConstructedDataAuthenticationPolicyList{ - NumberOfDataElements: numberOfDataElements, + NumberOfDataElements: numberOfDataElements, AuthenticationPolicyList: authenticationPolicyList, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataAuthenticationPolicyList(numberOfDataElements BACne // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAuthenticationPolicyList(structType interface{}) BACnetConstructedDataAuthenticationPolicyList { - if casted, ok := structType.(BACnetConstructedDataAuthenticationPolicyList); ok { + if casted, ok := structType.(BACnetConstructedDataAuthenticationPolicyList); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAuthenticationPolicyList); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataAuthenticationPolicyList) GetLengthInBits(ctx con return lengthInBits } + func (m *_BACnetConstructedDataAuthenticationPolicyList) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataAuthenticationPolicyListParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataAuthenticationPolicyListParseWithBuffer(ctx context.Co // Terminated array var authenticationPolicyList []BACnetAuthenticationPolicy { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetAuthenticationPolicyParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetAuthenticationPolicyParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'authenticationPolicyList' field of BACnetConstructedDataAuthenticationPolicyList") } @@ -235,10 +237,10 @@ func BACnetConstructedDataAuthenticationPolicyListParseWithBuffer(ctx context.Co // Create a partially initialized instance _child := &_BACnetConstructedDataAuthenticationPolicyList{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, - NumberOfDataElements: numberOfDataElements, + NumberOfDataElements: numberOfDataElements, AuthenticationPolicyList: authenticationPolicyList, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataAuthenticationPolicyList) SerializeWithWriteBuffe if pushErr := writeBuffer.PushContext("BACnetConstructedDataAuthenticationPolicyList"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAuthenticationPolicyList") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (authenticationPolicyList) - if pushErr := writeBuffer.PushContext("authenticationPolicyList", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for authenticationPolicyList") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetAuthenticationPolicyList() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAuthenticationPolicyList()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'authenticationPolicyList' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("authenticationPolicyList", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for authenticationPolicyList") + } + + // Array Field (authenticationPolicyList) + if pushErr := writeBuffer.PushContext("authenticationPolicyList", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for authenticationPolicyList") + } + for _curItem, _element := range m.GetAuthenticationPolicyList() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAuthenticationPolicyList()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'authenticationPolicyList' field") } + } + if popErr := writeBuffer.PopContext("authenticationPolicyList", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for authenticationPolicyList") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAuthenticationPolicyList"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAuthenticationPolicyList") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataAuthenticationPolicyList) SerializeWithWriteBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAuthenticationPolicyList) isBACnetConstructedDataAuthenticationPolicyList() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataAuthenticationPolicyList) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAuthenticationPolicyNames.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAuthenticationPolicyNames.go index 7c9c3a6be6d..2bf5e27ab77 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAuthenticationPolicyNames.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAuthenticationPolicyNames.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAuthenticationPolicyNames is the corresponding interface of BACnetConstructedDataAuthenticationPolicyNames type BACnetConstructedDataAuthenticationPolicyNames interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataAuthenticationPolicyNamesExactly interface { // _BACnetConstructedDataAuthenticationPolicyNames is the data-structure of this message type _BACnetConstructedDataAuthenticationPolicyNames struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - AuthenticationPolicyNames []BACnetApplicationTagCharacterString + NumberOfDataElements BACnetApplicationTagUnsignedInteger + AuthenticationPolicyNames []BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAuthenticationPolicyNames) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataAuthenticationPolicyNames) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataAuthenticationPolicyNames) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_AUTHENTICATION_POLICY_NAMES -} +func (m *_BACnetConstructedDataAuthenticationPolicyNames) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_AUTHENTICATION_POLICY_NAMES} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAuthenticationPolicyNames) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAuthenticationPolicyNames) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAuthenticationPolicyNames) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAuthenticationPolicyNames) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataAuthenticationPolicyNames) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAuthenticationPolicyNames factory function for _BACnetConstructedDataAuthenticationPolicyNames -func NewBACnetConstructedDataAuthenticationPolicyNames(numberOfDataElements BACnetApplicationTagUnsignedInteger, authenticationPolicyNames []BACnetApplicationTagCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAuthenticationPolicyNames { +func NewBACnetConstructedDataAuthenticationPolicyNames( numberOfDataElements BACnetApplicationTagUnsignedInteger , authenticationPolicyNames []BACnetApplicationTagCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAuthenticationPolicyNames { _result := &_BACnetConstructedDataAuthenticationPolicyNames{ - NumberOfDataElements: numberOfDataElements, + NumberOfDataElements: numberOfDataElements, AuthenticationPolicyNames: authenticationPolicyNames, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataAuthenticationPolicyNames(numberOfDataElements BACn // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAuthenticationPolicyNames(structType interface{}) BACnetConstructedDataAuthenticationPolicyNames { - if casted, ok := structType.(BACnetConstructedDataAuthenticationPolicyNames); ok { + if casted, ok := structType.(BACnetConstructedDataAuthenticationPolicyNames); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAuthenticationPolicyNames); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataAuthenticationPolicyNames) GetLengthInBits(ctx co return lengthInBits } + func (m *_BACnetConstructedDataAuthenticationPolicyNames) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataAuthenticationPolicyNamesParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataAuthenticationPolicyNamesParseWithBuffer(ctx context.C // Terminated array var authenticationPolicyNames []BACnetApplicationTagCharacterString { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'authenticationPolicyNames' field of BACnetConstructedDataAuthenticationPolicyNames") } @@ -235,10 +237,10 @@ func BACnetConstructedDataAuthenticationPolicyNamesParseWithBuffer(ctx context.C // Create a partially initialized instance _child := &_BACnetConstructedDataAuthenticationPolicyNames{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, - NumberOfDataElements: numberOfDataElements, + NumberOfDataElements: numberOfDataElements, AuthenticationPolicyNames: authenticationPolicyNames, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataAuthenticationPolicyNames) SerializeWithWriteBuff if pushErr := writeBuffer.PushContext("BACnetConstructedDataAuthenticationPolicyNames"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAuthenticationPolicyNames") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (authenticationPolicyNames) - if pushErr := writeBuffer.PushContext("authenticationPolicyNames", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for authenticationPolicyNames") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetAuthenticationPolicyNames() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAuthenticationPolicyNames()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'authenticationPolicyNames' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("authenticationPolicyNames", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for authenticationPolicyNames") + } + + // Array Field (authenticationPolicyNames) + if pushErr := writeBuffer.PushContext("authenticationPolicyNames", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for authenticationPolicyNames") + } + for _curItem, _element := range m.GetAuthenticationPolicyNames() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAuthenticationPolicyNames()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'authenticationPolicyNames' field") } + } + if popErr := writeBuffer.PopContext("authenticationPolicyNames", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for authenticationPolicyNames") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAuthenticationPolicyNames"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAuthenticationPolicyNames") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataAuthenticationPolicyNames) SerializeWithWriteBuff return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAuthenticationPolicyNames) isBACnetConstructedDataAuthenticationPolicyNames() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataAuthenticationPolicyNames) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAuthenticationStatus.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAuthenticationStatus.go index 910500c1498..18c8e1d831d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAuthenticationStatus.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAuthenticationStatus.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAuthenticationStatus is the corresponding interface of BACnetConstructedDataAuthenticationStatus type BACnetConstructedDataAuthenticationStatus interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAuthenticationStatusExactly interface { // _BACnetConstructedDataAuthenticationStatus is the data-structure of this message type _BACnetConstructedDataAuthenticationStatus struct { *_BACnetConstructedData - AuthenticationStatus BACnetAuthenticationStatusTagged + AuthenticationStatus BACnetAuthenticationStatusTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAuthenticationStatus) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataAuthenticationStatus) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataAuthenticationStatus) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_AUTHENTICATION_STATUS -} +func (m *_BACnetConstructedDataAuthenticationStatus) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_AUTHENTICATION_STATUS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAuthenticationStatus) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAuthenticationStatus) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAuthenticationStatus) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAuthenticationStatus) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAuthenticationStatus) GetActualValue() BACnetAuth /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAuthenticationStatus factory function for _BACnetConstructedDataAuthenticationStatus -func NewBACnetConstructedDataAuthenticationStatus(authenticationStatus BACnetAuthenticationStatusTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAuthenticationStatus { +func NewBACnetConstructedDataAuthenticationStatus( authenticationStatus BACnetAuthenticationStatusTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAuthenticationStatus { _result := &_BACnetConstructedDataAuthenticationStatus{ - AuthenticationStatus: authenticationStatus, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + AuthenticationStatus: authenticationStatus, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAuthenticationStatus(authenticationStatus BACnetAut // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAuthenticationStatus(structType interface{}) BACnetConstructedDataAuthenticationStatus { - if casted, ok := structType.(BACnetConstructedDataAuthenticationStatus); ok { + if casted, ok := structType.(BACnetConstructedDataAuthenticationStatus); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAuthenticationStatus); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAuthenticationStatus) GetLengthInBits(ctx context return lengthInBits } + func (m *_BACnetConstructedDataAuthenticationStatus) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAuthenticationStatusParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("authenticationStatus"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for authenticationStatus") } - _authenticationStatus, _authenticationStatusErr := BACnetAuthenticationStatusTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_authenticationStatus, _authenticationStatusErr := BACnetAuthenticationStatusTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _authenticationStatusErr != nil { return nil, errors.Wrap(_authenticationStatusErr, "Error parsing 'authenticationStatus' field of BACnetConstructedDataAuthenticationStatus") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAuthenticationStatusParseWithBuffer(ctx context.Contex // Create a partially initialized instance _child := &_BACnetConstructedDataAuthenticationStatus{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, AuthenticationStatus: authenticationStatus, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAuthenticationStatus) SerializeWithWriteBuffer(ct return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAuthenticationStatus") } - // Simple Field (authenticationStatus) - if pushErr := writeBuffer.PushContext("authenticationStatus"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for authenticationStatus") - } - _authenticationStatusErr := writeBuffer.WriteSerializable(ctx, m.GetAuthenticationStatus()) - if popErr := writeBuffer.PopContext("authenticationStatus"); popErr != nil { - return errors.Wrap(popErr, "Error popping for authenticationStatus") - } - if _authenticationStatusErr != nil { - return errors.Wrap(_authenticationStatusErr, "Error serializing 'authenticationStatus' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (authenticationStatus) + if pushErr := writeBuffer.PushContext("authenticationStatus"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for authenticationStatus") + } + _authenticationStatusErr := writeBuffer.WriteSerializable(ctx, m.GetAuthenticationStatus()) + if popErr := writeBuffer.PopContext("authenticationStatus"); popErr != nil { + return errors.Wrap(popErr, "Error popping for authenticationStatus") + } + if _authenticationStatusErr != nil { + return errors.Wrap(_authenticationStatusErr, "Error serializing 'authenticationStatus' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAuthenticationStatus"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAuthenticationStatus") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAuthenticationStatus) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAuthenticationStatus) isBACnetConstructedDataAuthenticationStatus() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAuthenticationStatus) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAuthorizationExemptions.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAuthorizationExemptions.go index f2db603d47b..9b600351198 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAuthorizationExemptions.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAuthorizationExemptions.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAuthorizationExemptions is the corresponding interface of BACnetConstructedDataAuthorizationExemptions type BACnetConstructedDataAuthorizationExemptions interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataAuthorizationExemptionsExactly interface { // _BACnetConstructedDataAuthorizationExemptions is the data-structure of this message type _BACnetConstructedDataAuthorizationExemptions struct { *_BACnetConstructedData - AuthorizationExemption []BACnetAuthorizationExemptionTagged + AuthorizationExemption []BACnetAuthorizationExemptionTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAuthorizationExemptions) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataAuthorizationExemptions) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataAuthorizationExemptions) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_AUTHORIZATION_EXEMPTIONS -} +func (m *_BACnetConstructedDataAuthorizationExemptions) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_AUTHORIZATION_EXEMPTIONS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAuthorizationExemptions) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAuthorizationExemptions) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAuthorizationExemptions) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAuthorizationExemptions) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataAuthorizationExemptions) GetAuthorizationExemptio /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAuthorizationExemptions factory function for _BACnetConstructedDataAuthorizationExemptions -func NewBACnetConstructedDataAuthorizationExemptions(authorizationExemption []BACnetAuthorizationExemptionTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAuthorizationExemptions { +func NewBACnetConstructedDataAuthorizationExemptions( authorizationExemption []BACnetAuthorizationExemptionTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAuthorizationExemptions { _result := &_BACnetConstructedDataAuthorizationExemptions{ AuthorizationExemption: authorizationExemption, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataAuthorizationExemptions(authorizationExemption []BA // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAuthorizationExemptions(structType interface{}) BACnetConstructedDataAuthorizationExemptions { - if casted, ok := structType.(BACnetConstructedDataAuthorizationExemptions); ok { + if casted, ok := structType.(BACnetConstructedDataAuthorizationExemptions); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAuthorizationExemptions); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataAuthorizationExemptions) GetLengthInBits(ctx cont return lengthInBits } + func (m *_BACnetConstructedDataAuthorizationExemptions) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataAuthorizationExemptionsParseWithBuffer(ctx context.Con // Terminated array var authorizationExemption []BACnetAuthorizationExemptionTagged { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetAuthorizationExemptionTaggedParseWithBuffer(ctx, readBuffer, uint8(0), TagClass_APPLICATION_TAGS) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetAuthorizationExemptionTaggedParseWithBuffer(ctx, readBuffer , uint8(0) , TagClass_APPLICATION_TAGS ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'authorizationExemption' field of BACnetConstructedDataAuthorizationExemptions") } @@ -173,7 +175,7 @@ func BACnetConstructedDataAuthorizationExemptionsParseWithBuffer(ctx context.Con // Create a partially initialized instance _child := &_BACnetConstructedDataAuthorizationExemptions{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, AuthorizationExemption: authorizationExemption, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataAuthorizationExemptions) SerializeWithWriteBuffer return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAuthorizationExemptions") } - // Array Field (authorizationExemption) - if pushErr := writeBuffer.PushContext("authorizationExemption", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for authorizationExemption") - } - for _curItem, _element := range m.GetAuthorizationExemption() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAuthorizationExemption()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'authorizationExemption' field") - } - } - if popErr := writeBuffer.PopContext("authorizationExemption", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for authorizationExemption") + // Array Field (authorizationExemption) + if pushErr := writeBuffer.PushContext("authorizationExemption", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for authorizationExemption") + } + for _curItem, _element := range m.GetAuthorizationExemption() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAuthorizationExemption()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'authorizationExemption' field") } + } + if popErr := writeBuffer.PopContext("authorizationExemption", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for authorizationExemption") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAuthorizationExemptions"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAuthorizationExemptions") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataAuthorizationExemptions) SerializeWithWriteBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAuthorizationExemptions) isBACnetConstructedDataAuthorizationExemptions() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataAuthorizationExemptions) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAuthorizationMode.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAuthorizationMode.go index 32dde6ba2f7..019e98783bf 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAuthorizationMode.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAuthorizationMode.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAuthorizationMode is the corresponding interface of BACnetConstructedDataAuthorizationMode type BACnetConstructedDataAuthorizationMode interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAuthorizationModeExactly interface { // _BACnetConstructedDataAuthorizationMode is the data-structure of this message type _BACnetConstructedDataAuthorizationMode struct { *_BACnetConstructedData - AuthorizationMode BACnetAuthorizationModeTagged + AuthorizationMode BACnetAuthorizationModeTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAuthorizationMode) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataAuthorizationMode) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataAuthorizationMode) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_AUTHORIZATION_MODE -} +func (m *_BACnetConstructedDataAuthorizationMode) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_AUTHORIZATION_MODE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAuthorizationMode) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAuthorizationMode) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAuthorizationMode) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAuthorizationMode) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAuthorizationMode) GetActualValue() BACnetAuthori /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAuthorizationMode factory function for _BACnetConstructedDataAuthorizationMode -func NewBACnetConstructedDataAuthorizationMode(authorizationMode BACnetAuthorizationModeTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAuthorizationMode { +func NewBACnetConstructedDataAuthorizationMode( authorizationMode BACnetAuthorizationModeTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAuthorizationMode { _result := &_BACnetConstructedDataAuthorizationMode{ - AuthorizationMode: authorizationMode, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + AuthorizationMode: authorizationMode, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAuthorizationMode(authorizationMode BACnetAuthoriza // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAuthorizationMode(structType interface{}) BACnetConstructedDataAuthorizationMode { - if casted, ok := structType.(BACnetConstructedDataAuthorizationMode); ok { + if casted, ok := structType.(BACnetConstructedDataAuthorizationMode); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAuthorizationMode); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAuthorizationMode) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetConstructedDataAuthorizationMode) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAuthorizationModeParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("authorizationMode"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for authorizationMode") } - _authorizationMode, _authorizationModeErr := BACnetAuthorizationModeTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_authorizationMode, _authorizationModeErr := BACnetAuthorizationModeTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _authorizationModeErr != nil { return nil, errors.Wrap(_authorizationModeErr, "Error parsing 'authorizationMode' field of BACnetConstructedDataAuthorizationMode") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAuthorizationModeParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataAuthorizationMode{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, AuthorizationMode: authorizationMode, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAuthorizationMode) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAuthorizationMode") } - // Simple Field (authorizationMode) - if pushErr := writeBuffer.PushContext("authorizationMode"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for authorizationMode") - } - _authorizationModeErr := writeBuffer.WriteSerializable(ctx, m.GetAuthorizationMode()) - if popErr := writeBuffer.PopContext("authorizationMode"); popErr != nil { - return errors.Wrap(popErr, "Error popping for authorizationMode") - } - if _authorizationModeErr != nil { - return errors.Wrap(_authorizationModeErr, "Error serializing 'authorizationMode' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (authorizationMode) + if pushErr := writeBuffer.PushContext("authorizationMode"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for authorizationMode") + } + _authorizationModeErr := writeBuffer.WriteSerializable(ctx, m.GetAuthorizationMode()) + if popErr := writeBuffer.PopContext("authorizationMode"); popErr != nil { + return errors.Wrap(popErr, "Error popping for authorizationMode") + } + if _authorizationModeErr != nil { + return errors.Wrap(_authorizationModeErr, "Error serializing 'authorizationMode' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAuthorizationMode"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAuthorizationMode") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAuthorizationMode) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAuthorizationMode) isBACnetConstructedDataAuthorizationMode() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAuthorizationMode) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAutoSlaveDiscovery.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAutoSlaveDiscovery.go index 0d2a1d49b45..236eaf78dc5 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAutoSlaveDiscovery.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAutoSlaveDiscovery.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAutoSlaveDiscovery is the corresponding interface of BACnetConstructedDataAutoSlaveDiscovery type BACnetConstructedDataAutoSlaveDiscovery interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAutoSlaveDiscoveryExactly interface { // _BACnetConstructedDataAutoSlaveDiscovery is the data-structure of this message type _BACnetConstructedDataAutoSlaveDiscovery struct { *_BACnetConstructedData - AutoSlaveDiscovery BACnetApplicationTagBoolean + AutoSlaveDiscovery BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAutoSlaveDiscovery) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataAutoSlaveDiscovery) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataAutoSlaveDiscovery) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_AUTO_SLAVE_DISCOVERY -} +func (m *_BACnetConstructedDataAutoSlaveDiscovery) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_AUTO_SLAVE_DISCOVERY} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAutoSlaveDiscovery) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAutoSlaveDiscovery) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAutoSlaveDiscovery) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAutoSlaveDiscovery) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAutoSlaveDiscovery) GetActualValue() BACnetApplic /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAutoSlaveDiscovery factory function for _BACnetConstructedDataAutoSlaveDiscovery -func NewBACnetConstructedDataAutoSlaveDiscovery(autoSlaveDiscovery BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAutoSlaveDiscovery { +func NewBACnetConstructedDataAutoSlaveDiscovery( autoSlaveDiscovery BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAutoSlaveDiscovery { _result := &_BACnetConstructedDataAutoSlaveDiscovery{ - AutoSlaveDiscovery: autoSlaveDiscovery, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + AutoSlaveDiscovery: autoSlaveDiscovery, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAutoSlaveDiscovery(autoSlaveDiscovery BACnetApplica // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAutoSlaveDiscovery(structType interface{}) BACnetConstructedDataAutoSlaveDiscovery { - if casted, ok := structType.(BACnetConstructedDataAutoSlaveDiscovery); ok { + if casted, ok := structType.(BACnetConstructedDataAutoSlaveDiscovery); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAutoSlaveDiscovery); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAutoSlaveDiscovery) GetLengthInBits(ctx context.C return lengthInBits } + func (m *_BACnetConstructedDataAutoSlaveDiscovery) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAutoSlaveDiscoveryParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("autoSlaveDiscovery"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for autoSlaveDiscovery") } - _autoSlaveDiscovery, _autoSlaveDiscoveryErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_autoSlaveDiscovery, _autoSlaveDiscoveryErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _autoSlaveDiscoveryErr != nil { return nil, errors.Wrap(_autoSlaveDiscoveryErr, "Error parsing 'autoSlaveDiscovery' field of BACnetConstructedDataAutoSlaveDiscovery") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAutoSlaveDiscoveryParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataAutoSlaveDiscovery{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, AutoSlaveDiscovery: autoSlaveDiscovery, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAutoSlaveDiscovery) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAutoSlaveDiscovery") } - // Simple Field (autoSlaveDiscovery) - if pushErr := writeBuffer.PushContext("autoSlaveDiscovery"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for autoSlaveDiscovery") - } - _autoSlaveDiscoveryErr := writeBuffer.WriteSerializable(ctx, m.GetAutoSlaveDiscovery()) - if popErr := writeBuffer.PopContext("autoSlaveDiscovery"); popErr != nil { - return errors.Wrap(popErr, "Error popping for autoSlaveDiscovery") - } - if _autoSlaveDiscoveryErr != nil { - return errors.Wrap(_autoSlaveDiscoveryErr, "Error serializing 'autoSlaveDiscovery' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (autoSlaveDiscovery) + if pushErr := writeBuffer.PushContext("autoSlaveDiscovery"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for autoSlaveDiscovery") + } + _autoSlaveDiscoveryErr := writeBuffer.WriteSerializable(ctx, m.GetAutoSlaveDiscovery()) + if popErr := writeBuffer.PopContext("autoSlaveDiscovery"); popErr != nil { + return errors.Wrap(popErr, "Error popping for autoSlaveDiscovery") + } + if _autoSlaveDiscoveryErr != nil { + return errors.Wrap(_autoSlaveDiscoveryErr, "Error serializing 'autoSlaveDiscovery' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAutoSlaveDiscovery"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAutoSlaveDiscovery") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAutoSlaveDiscovery) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAutoSlaveDiscovery) isBACnetConstructedDataAutoSlaveDiscovery() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAutoSlaveDiscovery) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAverageValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAverageValue.go index 65d30c94c4e..532d4dcf8f0 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAverageValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAverageValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAverageValue is the corresponding interface of BACnetConstructedDataAverageValue type BACnetConstructedDataAverageValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataAverageValueExactly interface { // _BACnetConstructedDataAverageValue is the data-structure of this message type _BACnetConstructedDataAverageValue struct { *_BACnetConstructedData - AverageValue BACnetApplicationTagReal + AverageValue BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAverageValue) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataAverageValue) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataAverageValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_AVERAGE_VALUE -} +func (m *_BACnetConstructedDataAverageValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_AVERAGE_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAverageValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAverageValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAverageValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAverageValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataAverageValue) GetActualValue() BACnetApplicationT /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataAverageValue factory function for _BACnetConstructedDataAverageValue -func NewBACnetConstructedDataAverageValue(averageValue BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAverageValue { +func NewBACnetConstructedDataAverageValue( averageValue BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAverageValue { _result := &_BACnetConstructedDataAverageValue{ - AverageValue: averageValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + AverageValue: averageValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataAverageValue(averageValue BACnetApplicationTagReal, // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAverageValue(structType interface{}) BACnetConstructedDataAverageValue { - if casted, ok := structType.(BACnetConstructedDataAverageValue); ok { + if casted, ok := structType.(BACnetConstructedDataAverageValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAverageValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataAverageValue) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetConstructedDataAverageValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataAverageValueParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("averageValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for averageValue") } - _averageValue, _averageValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_averageValue, _averageValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _averageValueErr != nil { return nil, errors.Wrap(_averageValueErr, "Error parsing 'averageValue' field of BACnetConstructedDataAverageValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataAverageValueParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetConstructedDataAverageValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, AverageValue: averageValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataAverageValue) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataAverageValue") } - // Simple Field (averageValue) - if pushErr := writeBuffer.PushContext("averageValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for averageValue") - } - _averageValueErr := writeBuffer.WriteSerializable(ctx, m.GetAverageValue()) - if popErr := writeBuffer.PopContext("averageValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for averageValue") - } - if _averageValueErr != nil { - return errors.Wrap(_averageValueErr, "Error serializing 'averageValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (averageValue) + if pushErr := writeBuffer.PushContext("averageValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for averageValue") + } + _averageValueErr := writeBuffer.WriteSerializable(ctx, m.GetAverageValue()) + if popErr := writeBuffer.PopContext("averageValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for averageValue") + } + if _averageValueErr != nil { + return errors.Wrap(_averageValueErr, "Error serializing 'averageValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataAverageValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataAverageValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataAverageValue) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAverageValue) isBACnetConstructedDataAverageValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataAverageValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAveragingAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAveragingAll.go index a5a61f0abb9..631d0b610e9 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAveragingAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataAveragingAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataAveragingAll is the corresponding interface of BACnetConstructedDataAveragingAll type BACnetConstructedDataAveragingAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataAveragingAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataAveragingAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_AVERAGING -} +func (m *_BACnetConstructedDataAveragingAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_AVERAGING} -func (m *_BACnetConstructedDataAveragingAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataAveragingAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataAveragingAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataAveragingAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataAveragingAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataAveragingAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataAveragingAll factory function for _BACnetConstructedDataAveragingAll -func NewBACnetConstructedDataAveragingAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataAveragingAll { +func NewBACnetConstructedDataAveragingAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataAveragingAll { _result := &_BACnetConstructedDataAveragingAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataAveragingAll(openingTag BACnetOpeningTag, peekedTag // Deprecated: use the interface for direct cast func CastBACnetConstructedDataAveragingAll(structType interface{}) BACnetConstructedDataAveragingAll { - if casted, ok := structType.(BACnetConstructedDataAveragingAll); ok { + if casted, ok := structType.(BACnetConstructedDataAveragingAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataAveragingAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataAveragingAll) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetConstructedDataAveragingAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataAveragingAllParseWithBuffer(ctx context.Context, readB _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataAveragingAllParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetConstructedDataAveragingAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataAveragingAll) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataAveragingAll) isBACnetConstructedDataAveragingAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataAveragingAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBACnetIPGlobalAddress.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBACnetIPGlobalAddress.go index 2bf8a993dc4..ecd9ee18dc4 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBACnetIPGlobalAddress.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBACnetIPGlobalAddress.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataBACnetIPGlobalAddress is the corresponding interface of BACnetConstructedDataBACnetIPGlobalAddress type BACnetConstructedDataBACnetIPGlobalAddress interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataBACnetIPGlobalAddressExactly interface { // _BACnetConstructedDataBACnetIPGlobalAddress is the data-structure of this message type _BACnetConstructedDataBACnetIPGlobalAddress struct { *_BACnetConstructedData - BacnetIpGlobalAddress BACnetHostNPort + BacnetIpGlobalAddress BACnetHostNPort } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataBACnetIPGlobalAddress) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataBACnetIPGlobalAddress) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataBACnetIPGlobalAddress) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_BACNET_IP_GLOBAL_ADDRESS -} +func (m *_BACnetConstructedDataBACnetIPGlobalAddress) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_BACNET_IP_GLOBAL_ADDRESS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataBACnetIPGlobalAddress) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataBACnetIPGlobalAddress) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataBACnetIPGlobalAddress) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataBACnetIPGlobalAddress) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataBACnetIPGlobalAddress) GetActualValue() BACnetHos /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataBACnetIPGlobalAddress factory function for _BACnetConstructedDataBACnetIPGlobalAddress -func NewBACnetConstructedDataBACnetIPGlobalAddress(bacnetIpGlobalAddress BACnetHostNPort, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataBACnetIPGlobalAddress { +func NewBACnetConstructedDataBACnetIPGlobalAddress( bacnetIpGlobalAddress BACnetHostNPort , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataBACnetIPGlobalAddress { _result := &_BACnetConstructedDataBACnetIPGlobalAddress{ - BacnetIpGlobalAddress: bacnetIpGlobalAddress, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + BacnetIpGlobalAddress: bacnetIpGlobalAddress, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataBACnetIPGlobalAddress(bacnetIpGlobalAddress BACnetH // Deprecated: use the interface for direct cast func CastBACnetConstructedDataBACnetIPGlobalAddress(structType interface{}) BACnetConstructedDataBACnetIPGlobalAddress { - if casted, ok := structType.(BACnetConstructedDataBACnetIPGlobalAddress); ok { + if casted, ok := structType.(BACnetConstructedDataBACnetIPGlobalAddress); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataBACnetIPGlobalAddress); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataBACnetIPGlobalAddress) GetLengthInBits(ctx contex return lengthInBits } + func (m *_BACnetConstructedDataBACnetIPGlobalAddress) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataBACnetIPGlobalAddressParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("bacnetIpGlobalAddress"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for bacnetIpGlobalAddress") } - _bacnetIpGlobalAddress, _bacnetIpGlobalAddressErr := BACnetHostNPortParseWithBuffer(ctx, readBuffer) +_bacnetIpGlobalAddress, _bacnetIpGlobalAddressErr := BACnetHostNPortParseWithBuffer(ctx, readBuffer) if _bacnetIpGlobalAddressErr != nil { return nil, errors.Wrap(_bacnetIpGlobalAddressErr, "Error parsing 'bacnetIpGlobalAddress' field of BACnetConstructedDataBACnetIPGlobalAddress") } @@ -186,7 +188,7 @@ func BACnetConstructedDataBACnetIPGlobalAddressParseWithBuffer(ctx context.Conte // Create a partially initialized instance _child := &_BACnetConstructedDataBACnetIPGlobalAddress{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, BacnetIpGlobalAddress: bacnetIpGlobalAddress, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataBACnetIPGlobalAddress) SerializeWithWriteBuffer(c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataBACnetIPGlobalAddress") } - // Simple Field (bacnetIpGlobalAddress) - if pushErr := writeBuffer.PushContext("bacnetIpGlobalAddress"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for bacnetIpGlobalAddress") - } - _bacnetIpGlobalAddressErr := writeBuffer.WriteSerializable(ctx, m.GetBacnetIpGlobalAddress()) - if popErr := writeBuffer.PopContext("bacnetIpGlobalAddress"); popErr != nil { - return errors.Wrap(popErr, "Error popping for bacnetIpGlobalAddress") - } - if _bacnetIpGlobalAddressErr != nil { - return errors.Wrap(_bacnetIpGlobalAddressErr, "Error serializing 'bacnetIpGlobalAddress' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (bacnetIpGlobalAddress) + if pushErr := writeBuffer.PushContext("bacnetIpGlobalAddress"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for bacnetIpGlobalAddress") + } + _bacnetIpGlobalAddressErr := writeBuffer.WriteSerializable(ctx, m.GetBacnetIpGlobalAddress()) + if popErr := writeBuffer.PopContext("bacnetIpGlobalAddress"); popErr != nil { + return errors.Wrap(popErr, "Error popping for bacnetIpGlobalAddress") + } + if _bacnetIpGlobalAddressErr != nil { + return errors.Wrap(_bacnetIpGlobalAddressErr, "Error serializing 'bacnetIpGlobalAddress' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataBACnetIPGlobalAddress"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataBACnetIPGlobalAddress") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataBACnetIPGlobalAddress) SerializeWithWriteBuffer(c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataBACnetIPGlobalAddress) isBACnetConstructedDataBACnetIPGlobalAddress() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataBACnetIPGlobalAddress) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBACnetIPMode.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBACnetIPMode.go index 7234433c434..51933001022 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBACnetIPMode.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBACnetIPMode.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataBACnetIPMode is the corresponding interface of BACnetConstructedDataBACnetIPMode type BACnetConstructedDataBACnetIPMode interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataBACnetIPModeExactly interface { // _BACnetConstructedDataBACnetIPMode is the data-structure of this message type _BACnetConstructedDataBACnetIPMode struct { *_BACnetConstructedData - BacnetIpMode BACnetIPModeTagged + BacnetIpMode BACnetIPModeTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataBACnetIPMode) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataBACnetIPMode) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataBACnetIPMode) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_BACNET_IP_MODE -} +func (m *_BACnetConstructedDataBACnetIPMode) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_BACNET_IP_MODE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataBACnetIPMode) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataBACnetIPMode) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataBACnetIPMode) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataBACnetIPMode) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataBACnetIPMode) GetActualValue() BACnetIPModeTagged /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataBACnetIPMode factory function for _BACnetConstructedDataBACnetIPMode -func NewBACnetConstructedDataBACnetIPMode(bacnetIpMode BACnetIPModeTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataBACnetIPMode { +func NewBACnetConstructedDataBACnetIPMode( bacnetIpMode BACnetIPModeTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataBACnetIPMode { _result := &_BACnetConstructedDataBACnetIPMode{ - BacnetIpMode: bacnetIpMode, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + BacnetIpMode: bacnetIpMode, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataBACnetIPMode(bacnetIpMode BACnetIPModeTagged, openi // Deprecated: use the interface for direct cast func CastBACnetConstructedDataBACnetIPMode(structType interface{}) BACnetConstructedDataBACnetIPMode { - if casted, ok := structType.(BACnetConstructedDataBACnetIPMode); ok { + if casted, ok := structType.(BACnetConstructedDataBACnetIPMode); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataBACnetIPMode); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataBACnetIPMode) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetConstructedDataBACnetIPMode) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataBACnetIPModeParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("bacnetIpMode"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for bacnetIpMode") } - _bacnetIpMode, _bacnetIpModeErr := BACnetIPModeTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_bacnetIpMode, _bacnetIpModeErr := BACnetIPModeTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _bacnetIpModeErr != nil { return nil, errors.Wrap(_bacnetIpModeErr, "Error parsing 'bacnetIpMode' field of BACnetConstructedDataBACnetIPMode") } @@ -186,7 +188,7 @@ func BACnetConstructedDataBACnetIPModeParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetConstructedDataBACnetIPMode{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, BacnetIpMode: bacnetIpMode, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataBACnetIPMode) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataBACnetIPMode") } - // Simple Field (bacnetIpMode) - if pushErr := writeBuffer.PushContext("bacnetIpMode"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for bacnetIpMode") - } - _bacnetIpModeErr := writeBuffer.WriteSerializable(ctx, m.GetBacnetIpMode()) - if popErr := writeBuffer.PopContext("bacnetIpMode"); popErr != nil { - return errors.Wrap(popErr, "Error popping for bacnetIpMode") - } - if _bacnetIpModeErr != nil { - return errors.Wrap(_bacnetIpModeErr, "Error serializing 'bacnetIpMode' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (bacnetIpMode) + if pushErr := writeBuffer.PushContext("bacnetIpMode"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for bacnetIpMode") + } + _bacnetIpModeErr := writeBuffer.WriteSerializable(ctx, m.GetBacnetIpMode()) + if popErr := writeBuffer.PopContext("bacnetIpMode"); popErr != nil { + return errors.Wrap(popErr, "Error popping for bacnetIpMode") + } + if _bacnetIpModeErr != nil { + return errors.Wrap(_bacnetIpModeErr, "Error serializing 'bacnetIpMode' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataBACnetIPMode"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataBACnetIPMode") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataBACnetIPMode) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataBACnetIPMode) isBACnetConstructedDataBACnetIPMode() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataBACnetIPMode) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBACnetIPMulticastAddress.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBACnetIPMulticastAddress.go index 6166938d0c4..9ff84758966 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBACnetIPMulticastAddress.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBACnetIPMulticastAddress.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataBACnetIPMulticastAddress is the corresponding interface of BACnetConstructedDataBACnetIPMulticastAddress type BACnetConstructedDataBACnetIPMulticastAddress interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataBACnetIPMulticastAddressExactly interface { // _BACnetConstructedDataBACnetIPMulticastAddress is the data-structure of this message type _BACnetConstructedDataBACnetIPMulticastAddress struct { *_BACnetConstructedData - IpMulticastAddress BACnetApplicationTagOctetString + IpMulticastAddress BACnetApplicationTagOctetString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataBACnetIPMulticastAddress) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataBACnetIPMulticastAddress) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataBACnetIPMulticastAddress) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_BACNET_IP_MULTICAST_ADDRESS -} +func (m *_BACnetConstructedDataBACnetIPMulticastAddress) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_BACNET_IP_MULTICAST_ADDRESS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataBACnetIPMulticastAddress) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataBACnetIPMulticastAddress) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataBACnetIPMulticastAddress) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataBACnetIPMulticastAddress) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataBACnetIPMulticastAddress) GetActualValue() BACnet /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataBACnetIPMulticastAddress factory function for _BACnetConstructedDataBACnetIPMulticastAddress -func NewBACnetConstructedDataBACnetIPMulticastAddress(ipMulticastAddress BACnetApplicationTagOctetString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataBACnetIPMulticastAddress { +func NewBACnetConstructedDataBACnetIPMulticastAddress( ipMulticastAddress BACnetApplicationTagOctetString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataBACnetIPMulticastAddress { _result := &_BACnetConstructedDataBACnetIPMulticastAddress{ - IpMulticastAddress: ipMulticastAddress, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + IpMulticastAddress: ipMulticastAddress, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataBACnetIPMulticastAddress(ipMulticastAddress BACnetA // Deprecated: use the interface for direct cast func CastBACnetConstructedDataBACnetIPMulticastAddress(structType interface{}) BACnetConstructedDataBACnetIPMulticastAddress { - if casted, ok := structType.(BACnetConstructedDataBACnetIPMulticastAddress); ok { + if casted, ok := structType.(BACnetConstructedDataBACnetIPMulticastAddress); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataBACnetIPMulticastAddress); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataBACnetIPMulticastAddress) GetLengthInBits(ctx con return lengthInBits } + func (m *_BACnetConstructedDataBACnetIPMulticastAddress) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataBACnetIPMulticastAddressParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("ipMulticastAddress"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for ipMulticastAddress") } - _ipMulticastAddress, _ipMulticastAddressErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_ipMulticastAddress, _ipMulticastAddressErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _ipMulticastAddressErr != nil { return nil, errors.Wrap(_ipMulticastAddressErr, "Error parsing 'ipMulticastAddress' field of BACnetConstructedDataBACnetIPMulticastAddress") } @@ -186,7 +188,7 @@ func BACnetConstructedDataBACnetIPMulticastAddressParseWithBuffer(ctx context.Co // Create a partially initialized instance _child := &_BACnetConstructedDataBACnetIPMulticastAddress{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, IpMulticastAddress: ipMulticastAddress, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataBACnetIPMulticastAddress) SerializeWithWriteBuffe return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataBACnetIPMulticastAddress") } - // Simple Field (ipMulticastAddress) - if pushErr := writeBuffer.PushContext("ipMulticastAddress"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for ipMulticastAddress") - } - _ipMulticastAddressErr := writeBuffer.WriteSerializable(ctx, m.GetIpMulticastAddress()) - if popErr := writeBuffer.PopContext("ipMulticastAddress"); popErr != nil { - return errors.Wrap(popErr, "Error popping for ipMulticastAddress") - } - if _ipMulticastAddressErr != nil { - return errors.Wrap(_ipMulticastAddressErr, "Error serializing 'ipMulticastAddress' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (ipMulticastAddress) + if pushErr := writeBuffer.PushContext("ipMulticastAddress"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for ipMulticastAddress") + } + _ipMulticastAddressErr := writeBuffer.WriteSerializable(ctx, m.GetIpMulticastAddress()) + if popErr := writeBuffer.PopContext("ipMulticastAddress"); popErr != nil { + return errors.Wrap(popErr, "Error popping for ipMulticastAddress") + } + if _ipMulticastAddressErr != nil { + return errors.Wrap(_ipMulticastAddressErr, "Error serializing 'ipMulticastAddress' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataBACnetIPMulticastAddress"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataBACnetIPMulticastAddress") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataBACnetIPMulticastAddress) SerializeWithWriteBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataBACnetIPMulticastAddress) isBACnetConstructedDataBACnetIPMulticastAddress() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataBACnetIPMulticastAddress) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBACnetIPNATTraversal.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBACnetIPNATTraversal.go index 9e30d9d7367..bc4c98900b5 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBACnetIPNATTraversal.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBACnetIPNATTraversal.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataBACnetIPNATTraversal is the corresponding interface of BACnetConstructedDataBACnetIPNATTraversal type BACnetConstructedDataBACnetIPNATTraversal interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataBACnetIPNATTraversalExactly interface { // _BACnetConstructedDataBACnetIPNATTraversal is the data-structure of this message type _BACnetConstructedDataBACnetIPNATTraversal struct { *_BACnetConstructedData - BacnetIPNATTraversal BACnetApplicationTagBoolean + BacnetIPNATTraversal BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataBACnetIPNATTraversal) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataBACnetIPNATTraversal) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataBACnetIPNATTraversal) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_BACNET_IP_NAT_TRAVERSAL -} +func (m *_BACnetConstructedDataBACnetIPNATTraversal) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_BACNET_IP_NAT_TRAVERSAL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataBACnetIPNATTraversal) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataBACnetIPNATTraversal) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataBACnetIPNATTraversal) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataBACnetIPNATTraversal) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataBACnetIPNATTraversal) GetActualValue() BACnetAppl /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataBACnetIPNATTraversal factory function for _BACnetConstructedDataBACnetIPNATTraversal -func NewBACnetConstructedDataBACnetIPNATTraversal(bacnetIPNATTraversal BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataBACnetIPNATTraversal { +func NewBACnetConstructedDataBACnetIPNATTraversal( bacnetIPNATTraversal BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataBACnetIPNATTraversal { _result := &_BACnetConstructedDataBACnetIPNATTraversal{ - BacnetIPNATTraversal: bacnetIPNATTraversal, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + BacnetIPNATTraversal: bacnetIPNATTraversal, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataBACnetIPNATTraversal(bacnetIPNATTraversal BACnetApp // Deprecated: use the interface for direct cast func CastBACnetConstructedDataBACnetIPNATTraversal(structType interface{}) BACnetConstructedDataBACnetIPNATTraversal { - if casted, ok := structType.(BACnetConstructedDataBACnetIPNATTraversal); ok { + if casted, ok := structType.(BACnetConstructedDataBACnetIPNATTraversal); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataBACnetIPNATTraversal); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataBACnetIPNATTraversal) GetLengthInBits(ctx context return lengthInBits } + func (m *_BACnetConstructedDataBACnetIPNATTraversal) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataBACnetIPNATTraversalParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("bacnetIPNATTraversal"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for bacnetIPNATTraversal") } - _bacnetIPNATTraversal, _bacnetIPNATTraversalErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_bacnetIPNATTraversal, _bacnetIPNATTraversalErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _bacnetIPNATTraversalErr != nil { return nil, errors.Wrap(_bacnetIPNATTraversalErr, "Error parsing 'bacnetIPNATTraversal' field of BACnetConstructedDataBACnetIPNATTraversal") } @@ -186,7 +188,7 @@ func BACnetConstructedDataBACnetIPNATTraversalParseWithBuffer(ctx context.Contex // Create a partially initialized instance _child := &_BACnetConstructedDataBACnetIPNATTraversal{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, BacnetIPNATTraversal: bacnetIPNATTraversal, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataBACnetIPNATTraversal) SerializeWithWriteBuffer(ct return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataBACnetIPNATTraversal") } - // Simple Field (bacnetIPNATTraversal) - if pushErr := writeBuffer.PushContext("bacnetIPNATTraversal"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for bacnetIPNATTraversal") - } - _bacnetIPNATTraversalErr := writeBuffer.WriteSerializable(ctx, m.GetBacnetIPNATTraversal()) - if popErr := writeBuffer.PopContext("bacnetIPNATTraversal"); popErr != nil { - return errors.Wrap(popErr, "Error popping for bacnetIPNATTraversal") - } - if _bacnetIPNATTraversalErr != nil { - return errors.Wrap(_bacnetIPNATTraversalErr, "Error serializing 'bacnetIPNATTraversal' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (bacnetIPNATTraversal) + if pushErr := writeBuffer.PushContext("bacnetIPNATTraversal"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for bacnetIPNATTraversal") + } + _bacnetIPNATTraversalErr := writeBuffer.WriteSerializable(ctx, m.GetBacnetIPNATTraversal()) + if popErr := writeBuffer.PopContext("bacnetIPNATTraversal"); popErr != nil { + return errors.Wrap(popErr, "Error popping for bacnetIPNATTraversal") + } + if _bacnetIPNATTraversalErr != nil { + return errors.Wrap(_bacnetIPNATTraversalErr, "Error serializing 'bacnetIPNATTraversal' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataBACnetIPNATTraversal"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataBACnetIPNATTraversal") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataBACnetIPNATTraversal) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataBACnetIPNATTraversal) isBACnetConstructedDataBACnetIPNATTraversal() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataBACnetIPNATTraversal) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBACnetIPUDPPort.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBACnetIPUDPPort.go index f61c80a137f..a1ee9b684de 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBACnetIPUDPPort.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBACnetIPUDPPort.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataBACnetIPUDPPort is the corresponding interface of BACnetConstructedDataBACnetIPUDPPort type BACnetConstructedDataBACnetIPUDPPort interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataBACnetIPUDPPortExactly interface { // _BACnetConstructedDataBACnetIPUDPPort is the data-structure of this message type _BACnetConstructedDataBACnetIPUDPPort struct { *_BACnetConstructedData - IpUdpPort BACnetApplicationTagUnsignedInteger + IpUdpPort BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataBACnetIPUDPPort) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataBACnetIPUDPPort) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataBACnetIPUDPPort) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_BACNET_IP_UDP_PORT -} +func (m *_BACnetConstructedDataBACnetIPUDPPort) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_BACNET_IP_UDP_PORT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataBACnetIPUDPPort) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataBACnetIPUDPPort) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataBACnetIPUDPPort) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataBACnetIPUDPPort) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataBACnetIPUDPPort) GetActualValue() BACnetApplicati /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataBACnetIPUDPPort factory function for _BACnetConstructedDataBACnetIPUDPPort -func NewBACnetConstructedDataBACnetIPUDPPort(ipUdpPort BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataBACnetIPUDPPort { +func NewBACnetConstructedDataBACnetIPUDPPort( ipUdpPort BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataBACnetIPUDPPort { _result := &_BACnetConstructedDataBACnetIPUDPPort{ - IpUdpPort: ipUdpPort, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + IpUdpPort: ipUdpPort, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataBACnetIPUDPPort(ipUdpPort BACnetApplicationTagUnsig // Deprecated: use the interface for direct cast func CastBACnetConstructedDataBACnetIPUDPPort(structType interface{}) BACnetConstructedDataBACnetIPUDPPort { - if casted, ok := structType.(BACnetConstructedDataBACnetIPUDPPort); ok { + if casted, ok := structType.(BACnetConstructedDataBACnetIPUDPPort); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataBACnetIPUDPPort); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataBACnetIPUDPPort) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetConstructedDataBACnetIPUDPPort) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataBACnetIPUDPPortParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("ipUdpPort"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for ipUdpPort") } - _ipUdpPort, _ipUdpPortErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_ipUdpPort, _ipUdpPortErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _ipUdpPortErr != nil { return nil, errors.Wrap(_ipUdpPortErr, "Error parsing 'ipUdpPort' field of BACnetConstructedDataBACnetIPUDPPort") } @@ -186,7 +188,7 @@ func BACnetConstructedDataBACnetIPUDPPortParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetConstructedDataBACnetIPUDPPort{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, IpUdpPort: ipUdpPort, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataBACnetIPUDPPort) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataBACnetIPUDPPort") } - // Simple Field (ipUdpPort) - if pushErr := writeBuffer.PushContext("ipUdpPort"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for ipUdpPort") - } - _ipUdpPortErr := writeBuffer.WriteSerializable(ctx, m.GetIpUdpPort()) - if popErr := writeBuffer.PopContext("ipUdpPort"); popErr != nil { - return errors.Wrap(popErr, "Error popping for ipUdpPort") - } - if _ipUdpPortErr != nil { - return errors.Wrap(_ipUdpPortErr, "Error serializing 'ipUdpPort' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (ipUdpPort) + if pushErr := writeBuffer.PushContext("ipUdpPort"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for ipUdpPort") + } + _ipUdpPortErr := writeBuffer.WriteSerializable(ctx, m.GetIpUdpPort()) + if popErr := writeBuffer.PopContext("ipUdpPort"); popErr != nil { + return errors.Wrap(popErr, "Error popping for ipUdpPort") + } + if _ipUdpPortErr != nil { + return errors.Wrap(_ipUdpPortErr, "Error serializing 'ipUdpPort' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataBACnetIPUDPPort"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataBACnetIPUDPPort") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataBACnetIPUDPPort) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataBACnetIPUDPPort) isBACnetConstructedDataBACnetIPUDPPort() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataBACnetIPUDPPort) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBACnetIPv6Mode.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBACnetIPv6Mode.go index 41aa0e43a62..e23e28a86f5 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBACnetIPv6Mode.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBACnetIPv6Mode.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataBACnetIPv6Mode is the corresponding interface of BACnetConstructedDataBACnetIPv6Mode type BACnetConstructedDataBACnetIPv6Mode interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataBACnetIPv6ModeExactly interface { // _BACnetConstructedDataBACnetIPv6Mode is the data-structure of this message type _BACnetConstructedDataBACnetIPv6Mode struct { *_BACnetConstructedData - BacnetIpv6Mode BACnetIPModeTagged + BacnetIpv6Mode BACnetIPModeTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataBACnetIPv6Mode) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataBACnetIPv6Mode) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataBACnetIPv6Mode) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_BACNET_IPV6_MODE -} +func (m *_BACnetConstructedDataBACnetIPv6Mode) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_BACNET_IPV6_MODE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataBACnetIPv6Mode) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataBACnetIPv6Mode) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataBACnetIPv6Mode) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataBACnetIPv6Mode) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataBACnetIPv6Mode) GetActualValue() BACnetIPModeTagg /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataBACnetIPv6Mode factory function for _BACnetConstructedDataBACnetIPv6Mode -func NewBACnetConstructedDataBACnetIPv6Mode(bacnetIpv6Mode BACnetIPModeTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataBACnetIPv6Mode { +func NewBACnetConstructedDataBACnetIPv6Mode( bacnetIpv6Mode BACnetIPModeTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataBACnetIPv6Mode { _result := &_BACnetConstructedDataBACnetIPv6Mode{ - BacnetIpv6Mode: bacnetIpv6Mode, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + BacnetIpv6Mode: bacnetIpv6Mode, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataBACnetIPv6Mode(bacnetIpv6Mode BACnetIPModeTagged, o // Deprecated: use the interface for direct cast func CastBACnetConstructedDataBACnetIPv6Mode(structType interface{}) BACnetConstructedDataBACnetIPv6Mode { - if casted, ok := structType.(BACnetConstructedDataBACnetIPv6Mode); ok { + if casted, ok := structType.(BACnetConstructedDataBACnetIPv6Mode); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataBACnetIPv6Mode); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataBACnetIPv6Mode) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConstructedDataBACnetIPv6Mode) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataBACnetIPv6ModeParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("bacnetIpv6Mode"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for bacnetIpv6Mode") } - _bacnetIpv6Mode, _bacnetIpv6ModeErr := BACnetIPModeTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_bacnetIpv6Mode, _bacnetIpv6ModeErr := BACnetIPModeTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _bacnetIpv6ModeErr != nil { return nil, errors.Wrap(_bacnetIpv6ModeErr, "Error parsing 'bacnetIpv6Mode' field of BACnetConstructedDataBACnetIPv6Mode") } @@ -186,7 +188,7 @@ func BACnetConstructedDataBACnetIPv6ModeParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetConstructedDataBACnetIPv6Mode{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, BacnetIpv6Mode: bacnetIpv6Mode, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataBACnetIPv6Mode) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataBACnetIPv6Mode") } - // Simple Field (bacnetIpv6Mode) - if pushErr := writeBuffer.PushContext("bacnetIpv6Mode"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for bacnetIpv6Mode") - } - _bacnetIpv6ModeErr := writeBuffer.WriteSerializable(ctx, m.GetBacnetIpv6Mode()) - if popErr := writeBuffer.PopContext("bacnetIpv6Mode"); popErr != nil { - return errors.Wrap(popErr, "Error popping for bacnetIpv6Mode") - } - if _bacnetIpv6ModeErr != nil { - return errors.Wrap(_bacnetIpv6ModeErr, "Error serializing 'bacnetIpv6Mode' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (bacnetIpv6Mode) + if pushErr := writeBuffer.PushContext("bacnetIpv6Mode"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for bacnetIpv6Mode") + } + _bacnetIpv6ModeErr := writeBuffer.WriteSerializable(ctx, m.GetBacnetIpv6Mode()) + if popErr := writeBuffer.PopContext("bacnetIpv6Mode"); popErr != nil { + return errors.Wrap(popErr, "Error popping for bacnetIpv6Mode") + } + if _bacnetIpv6ModeErr != nil { + return errors.Wrap(_bacnetIpv6ModeErr, "Error serializing 'bacnetIpv6Mode' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataBACnetIPv6Mode"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataBACnetIPv6Mode") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataBACnetIPv6Mode) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataBACnetIPv6Mode) isBACnetConstructedDataBACnetIPv6Mode() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataBACnetIPv6Mode) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBACnetIPv6MulticastAddress.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBACnetIPv6MulticastAddress.go index d3e327677b6..d5c03024871 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBACnetIPv6MulticastAddress.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBACnetIPv6MulticastAddress.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataBACnetIPv6MulticastAddress is the corresponding interface of BACnetConstructedDataBACnetIPv6MulticastAddress type BACnetConstructedDataBACnetIPv6MulticastAddress interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataBACnetIPv6MulticastAddressExactly interface { // _BACnetConstructedDataBACnetIPv6MulticastAddress is the data-structure of this message type _BACnetConstructedDataBACnetIPv6MulticastAddress struct { *_BACnetConstructedData - Ipv6MulticastAddress BACnetApplicationTagOctetString + Ipv6MulticastAddress BACnetApplicationTagOctetString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataBACnetIPv6MulticastAddress) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataBACnetIPv6MulticastAddress) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataBACnetIPv6MulticastAddress) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_BACNET_IPV6_MULTICAST_ADDRESS -} +func (m *_BACnetConstructedDataBACnetIPv6MulticastAddress) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_BACNET_IPV6_MULTICAST_ADDRESS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataBACnetIPv6MulticastAddress) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataBACnetIPv6MulticastAddress) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataBACnetIPv6MulticastAddress) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataBACnetIPv6MulticastAddress) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataBACnetIPv6MulticastAddress) GetActualValue() BACn /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataBACnetIPv6MulticastAddress factory function for _BACnetConstructedDataBACnetIPv6MulticastAddress -func NewBACnetConstructedDataBACnetIPv6MulticastAddress(ipv6MulticastAddress BACnetApplicationTagOctetString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataBACnetIPv6MulticastAddress { +func NewBACnetConstructedDataBACnetIPv6MulticastAddress( ipv6MulticastAddress BACnetApplicationTagOctetString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataBACnetIPv6MulticastAddress { _result := &_BACnetConstructedDataBACnetIPv6MulticastAddress{ - Ipv6MulticastAddress: ipv6MulticastAddress, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Ipv6MulticastAddress: ipv6MulticastAddress, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataBACnetIPv6MulticastAddress(ipv6MulticastAddress BAC // Deprecated: use the interface for direct cast func CastBACnetConstructedDataBACnetIPv6MulticastAddress(structType interface{}) BACnetConstructedDataBACnetIPv6MulticastAddress { - if casted, ok := structType.(BACnetConstructedDataBACnetIPv6MulticastAddress); ok { + if casted, ok := structType.(BACnetConstructedDataBACnetIPv6MulticastAddress); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataBACnetIPv6MulticastAddress); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataBACnetIPv6MulticastAddress) GetLengthInBits(ctx c return lengthInBits } + func (m *_BACnetConstructedDataBACnetIPv6MulticastAddress) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataBACnetIPv6MulticastAddressParseWithBuffer(ctx context. if pullErr := readBuffer.PullContext("ipv6MulticastAddress"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for ipv6MulticastAddress") } - _ipv6MulticastAddress, _ipv6MulticastAddressErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_ipv6MulticastAddress, _ipv6MulticastAddressErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _ipv6MulticastAddressErr != nil { return nil, errors.Wrap(_ipv6MulticastAddressErr, "Error parsing 'ipv6MulticastAddress' field of BACnetConstructedDataBACnetIPv6MulticastAddress") } @@ -186,7 +188,7 @@ func BACnetConstructedDataBACnetIPv6MulticastAddressParseWithBuffer(ctx context. // Create a partially initialized instance _child := &_BACnetConstructedDataBACnetIPv6MulticastAddress{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Ipv6MulticastAddress: ipv6MulticastAddress, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataBACnetIPv6MulticastAddress) SerializeWithWriteBuf return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataBACnetIPv6MulticastAddress") } - // Simple Field (ipv6MulticastAddress) - if pushErr := writeBuffer.PushContext("ipv6MulticastAddress"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for ipv6MulticastAddress") - } - _ipv6MulticastAddressErr := writeBuffer.WriteSerializable(ctx, m.GetIpv6MulticastAddress()) - if popErr := writeBuffer.PopContext("ipv6MulticastAddress"); popErr != nil { - return errors.Wrap(popErr, "Error popping for ipv6MulticastAddress") - } - if _ipv6MulticastAddressErr != nil { - return errors.Wrap(_ipv6MulticastAddressErr, "Error serializing 'ipv6MulticastAddress' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (ipv6MulticastAddress) + if pushErr := writeBuffer.PushContext("ipv6MulticastAddress"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for ipv6MulticastAddress") + } + _ipv6MulticastAddressErr := writeBuffer.WriteSerializable(ctx, m.GetIpv6MulticastAddress()) + if popErr := writeBuffer.PopContext("ipv6MulticastAddress"); popErr != nil { + return errors.Wrap(popErr, "Error popping for ipv6MulticastAddress") + } + if _ipv6MulticastAddressErr != nil { + return errors.Wrap(_ipv6MulticastAddressErr, "Error serializing 'ipv6MulticastAddress' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataBACnetIPv6MulticastAddress"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataBACnetIPv6MulticastAddress") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataBACnetIPv6MulticastAddress) SerializeWithWriteBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataBACnetIPv6MulticastAddress) isBACnetConstructedDataBACnetIPv6MulticastAddress() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataBACnetIPv6MulticastAddress) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBACnetIPv6UDPPort.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBACnetIPv6UDPPort.go index 187c7e158ae..fa1727d2ddb 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBACnetIPv6UDPPort.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBACnetIPv6UDPPort.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataBACnetIPv6UDPPort is the corresponding interface of BACnetConstructedDataBACnetIPv6UDPPort type BACnetConstructedDataBACnetIPv6UDPPort interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataBACnetIPv6UDPPortExactly interface { // _BACnetConstructedDataBACnetIPv6UDPPort is the data-structure of this message type _BACnetConstructedDataBACnetIPv6UDPPort struct { *_BACnetConstructedData - Ipv6UdpPort BACnetApplicationTagUnsignedInteger + Ipv6UdpPort BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataBACnetIPv6UDPPort) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataBACnetIPv6UDPPort) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataBACnetIPv6UDPPort) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_BACNET_IPV6_UDP_PORT -} +func (m *_BACnetConstructedDataBACnetIPv6UDPPort) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_BACNET_IPV6_UDP_PORT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataBACnetIPv6UDPPort) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataBACnetIPv6UDPPort) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataBACnetIPv6UDPPort) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataBACnetIPv6UDPPort) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataBACnetIPv6UDPPort) GetActualValue() BACnetApplica /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataBACnetIPv6UDPPort factory function for _BACnetConstructedDataBACnetIPv6UDPPort -func NewBACnetConstructedDataBACnetIPv6UDPPort(ipv6UdpPort BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataBACnetIPv6UDPPort { +func NewBACnetConstructedDataBACnetIPv6UDPPort( ipv6UdpPort BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataBACnetIPv6UDPPort { _result := &_BACnetConstructedDataBACnetIPv6UDPPort{ - Ipv6UdpPort: ipv6UdpPort, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Ipv6UdpPort: ipv6UdpPort, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataBACnetIPv6UDPPort(ipv6UdpPort BACnetApplicationTagU // Deprecated: use the interface for direct cast func CastBACnetConstructedDataBACnetIPv6UDPPort(structType interface{}) BACnetConstructedDataBACnetIPv6UDPPort { - if casted, ok := structType.(BACnetConstructedDataBACnetIPv6UDPPort); ok { + if casted, ok := structType.(BACnetConstructedDataBACnetIPv6UDPPort); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataBACnetIPv6UDPPort); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataBACnetIPv6UDPPort) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetConstructedDataBACnetIPv6UDPPort) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataBACnetIPv6UDPPortParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("ipv6UdpPort"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for ipv6UdpPort") } - _ipv6UdpPort, _ipv6UdpPortErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_ipv6UdpPort, _ipv6UdpPortErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _ipv6UdpPortErr != nil { return nil, errors.Wrap(_ipv6UdpPortErr, "Error parsing 'ipv6UdpPort' field of BACnetConstructedDataBACnetIPv6UDPPort") } @@ -186,7 +188,7 @@ func BACnetConstructedDataBACnetIPv6UDPPortParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataBACnetIPv6UDPPort{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Ipv6UdpPort: ipv6UdpPort, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataBACnetIPv6UDPPort) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataBACnetIPv6UDPPort") } - // Simple Field (ipv6UdpPort) - if pushErr := writeBuffer.PushContext("ipv6UdpPort"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for ipv6UdpPort") - } - _ipv6UdpPortErr := writeBuffer.WriteSerializable(ctx, m.GetIpv6UdpPort()) - if popErr := writeBuffer.PopContext("ipv6UdpPort"); popErr != nil { - return errors.Wrap(popErr, "Error popping for ipv6UdpPort") - } - if _ipv6UdpPortErr != nil { - return errors.Wrap(_ipv6UdpPortErr, "Error serializing 'ipv6UdpPort' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (ipv6UdpPort) + if pushErr := writeBuffer.PushContext("ipv6UdpPort"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for ipv6UdpPort") + } + _ipv6UdpPortErr := writeBuffer.WriteSerializable(ctx, m.GetIpv6UdpPort()) + if popErr := writeBuffer.PopContext("ipv6UdpPort"); popErr != nil { + return errors.Wrap(popErr, "Error popping for ipv6UdpPort") + } + if _ipv6UdpPortErr != nil { + return errors.Wrap(_ipv6UdpPortErr, "Error serializing 'ipv6UdpPort' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataBACnetIPv6UDPPort"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataBACnetIPv6UDPPort") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataBACnetIPv6UDPPort) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataBACnetIPv6UDPPort) isBACnetConstructedDataBACnetIPv6UDPPort() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataBACnetIPv6UDPPort) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBBMDAcceptFDRegistrations.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBBMDAcceptFDRegistrations.go index 8c8e7dcff9f..7300d84789d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBBMDAcceptFDRegistrations.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBBMDAcceptFDRegistrations.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataBBMDAcceptFDRegistrations is the corresponding interface of BACnetConstructedDataBBMDAcceptFDRegistrations type BACnetConstructedDataBBMDAcceptFDRegistrations interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataBBMDAcceptFDRegistrationsExactly interface { // _BACnetConstructedDataBBMDAcceptFDRegistrations is the data-structure of this message type _BACnetConstructedDataBBMDAcceptFDRegistrations struct { *_BACnetConstructedData - BbmdAcceptFDRegistrations BACnetApplicationTagBoolean + BbmdAcceptFDRegistrations BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataBBMDAcceptFDRegistrations) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataBBMDAcceptFDRegistrations) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataBBMDAcceptFDRegistrations) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_BBMD_ACCEPT_FD_REGISTRATIONS -} +func (m *_BACnetConstructedDataBBMDAcceptFDRegistrations) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_BBMD_ACCEPT_FD_REGISTRATIONS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataBBMDAcceptFDRegistrations) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataBBMDAcceptFDRegistrations) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataBBMDAcceptFDRegistrations) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataBBMDAcceptFDRegistrations) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataBBMDAcceptFDRegistrations) GetActualValue() BACne /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataBBMDAcceptFDRegistrations factory function for _BACnetConstructedDataBBMDAcceptFDRegistrations -func NewBACnetConstructedDataBBMDAcceptFDRegistrations(bbmdAcceptFDRegistrations BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataBBMDAcceptFDRegistrations { +func NewBACnetConstructedDataBBMDAcceptFDRegistrations( bbmdAcceptFDRegistrations BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataBBMDAcceptFDRegistrations { _result := &_BACnetConstructedDataBBMDAcceptFDRegistrations{ BbmdAcceptFDRegistrations: bbmdAcceptFDRegistrations, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataBBMDAcceptFDRegistrations(bbmdAcceptFDRegistrations // Deprecated: use the interface for direct cast func CastBACnetConstructedDataBBMDAcceptFDRegistrations(structType interface{}) BACnetConstructedDataBBMDAcceptFDRegistrations { - if casted, ok := structType.(BACnetConstructedDataBBMDAcceptFDRegistrations); ok { + if casted, ok := structType.(BACnetConstructedDataBBMDAcceptFDRegistrations); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataBBMDAcceptFDRegistrations); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataBBMDAcceptFDRegistrations) GetLengthInBits(ctx co return lengthInBits } + func (m *_BACnetConstructedDataBBMDAcceptFDRegistrations) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataBBMDAcceptFDRegistrationsParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("bbmdAcceptFDRegistrations"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for bbmdAcceptFDRegistrations") } - _bbmdAcceptFDRegistrations, _bbmdAcceptFDRegistrationsErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_bbmdAcceptFDRegistrations, _bbmdAcceptFDRegistrationsErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _bbmdAcceptFDRegistrationsErr != nil { return nil, errors.Wrap(_bbmdAcceptFDRegistrationsErr, "Error parsing 'bbmdAcceptFDRegistrations' field of BACnetConstructedDataBBMDAcceptFDRegistrations") } @@ -186,7 +188,7 @@ func BACnetConstructedDataBBMDAcceptFDRegistrationsParseWithBuffer(ctx context.C // Create a partially initialized instance _child := &_BACnetConstructedDataBBMDAcceptFDRegistrations{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, BbmdAcceptFDRegistrations: bbmdAcceptFDRegistrations, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataBBMDAcceptFDRegistrations) SerializeWithWriteBuff return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataBBMDAcceptFDRegistrations") } - // Simple Field (bbmdAcceptFDRegistrations) - if pushErr := writeBuffer.PushContext("bbmdAcceptFDRegistrations"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for bbmdAcceptFDRegistrations") - } - _bbmdAcceptFDRegistrationsErr := writeBuffer.WriteSerializable(ctx, m.GetBbmdAcceptFDRegistrations()) - if popErr := writeBuffer.PopContext("bbmdAcceptFDRegistrations"); popErr != nil { - return errors.Wrap(popErr, "Error popping for bbmdAcceptFDRegistrations") - } - if _bbmdAcceptFDRegistrationsErr != nil { - return errors.Wrap(_bbmdAcceptFDRegistrationsErr, "Error serializing 'bbmdAcceptFDRegistrations' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (bbmdAcceptFDRegistrations) + if pushErr := writeBuffer.PushContext("bbmdAcceptFDRegistrations"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for bbmdAcceptFDRegistrations") + } + _bbmdAcceptFDRegistrationsErr := writeBuffer.WriteSerializable(ctx, m.GetBbmdAcceptFDRegistrations()) + if popErr := writeBuffer.PopContext("bbmdAcceptFDRegistrations"); popErr != nil { + return errors.Wrap(popErr, "Error popping for bbmdAcceptFDRegistrations") + } + if _bbmdAcceptFDRegistrationsErr != nil { + return errors.Wrap(_bbmdAcceptFDRegistrationsErr, "Error serializing 'bbmdAcceptFDRegistrations' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataBBMDAcceptFDRegistrations"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataBBMDAcceptFDRegistrations") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataBBMDAcceptFDRegistrations) SerializeWithWriteBuff return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataBBMDAcceptFDRegistrations) isBACnetConstructedDataBBMDAcceptFDRegistrations() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataBBMDAcceptFDRegistrations) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBBMDBroadcastDistributionTable.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBBMDBroadcastDistributionTable.go index 9cdc1ee7795..75ab1a757c1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBBMDBroadcastDistributionTable.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBBMDBroadcastDistributionTable.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataBBMDBroadcastDistributionTable is the corresponding interface of BACnetConstructedDataBBMDBroadcastDistributionTable type BACnetConstructedDataBBMDBroadcastDistributionTable interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataBBMDBroadcastDistributionTableExactly interface { // _BACnetConstructedDataBBMDBroadcastDistributionTable is the data-structure of this message type _BACnetConstructedDataBBMDBroadcastDistributionTable struct { *_BACnetConstructedData - BbmdBroadcastDistributionTable []BACnetBDTEntry + BbmdBroadcastDistributionTable []BACnetBDTEntry } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataBBMDBroadcastDistributionTable) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataBBMDBroadcastDistributionTable) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataBBMDBroadcastDistributionTable) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_BBMD_BROADCAST_DISTRIBUTION_TABLE -} +func (m *_BACnetConstructedDataBBMDBroadcastDistributionTable) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_BBMD_BROADCAST_DISTRIBUTION_TABLE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataBBMDBroadcastDistributionTable) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataBBMDBroadcastDistributionTable) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataBBMDBroadcastDistributionTable) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataBBMDBroadcastDistributionTable) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataBBMDBroadcastDistributionTable) GetBbmdBroadcastD /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataBBMDBroadcastDistributionTable factory function for _BACnetConstructedDataBBMDBroadcastDistributionTable -func NewBACnetConstructedDataBBMDBroadcastDistributionTable(bbmdBroadcastDistributionTable []BACnetBDTEntry, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataBBMDBroadcastDistributionTable { +func NewBACnetConstructedDataBBMDBroadcastDistributionTable( bbmdBroadcastDistributionTable []BACnetBDTEntry , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataBBMDBroadcastDistributionTable { _result := &_BACnetConstructedDataBBMDBroadcastDistributionTable{ BbmdBroadcastDistributionTable: bbmdBroadcastDistributionTable, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataBBMDBroadcastDistributionTable(bbmdBroadcastDistrib // Deprecated: use the interface for direct cast func CastBACnetConstructedDataBBMDBroadcastDistributionTable(structType interface{}) BACnetConstructedDataBBMDBroadcastDistributionTable { - if casted, ok := structType.(BACnetConstructedDataBBMDBroadcastDistributionTable); ok { + if casted, ok := structType.(BACnetConstructedDataBBMDBroadcastDistributionTable); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataBBMDBroadcastDistributionTable); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataBBMDBroadcastDistributionTable) GetLengthInBits(c return lengthInBits } + func (m *_BACnetConstructedDataBBMDBroadcastDistributionTable) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataBBMDBroadcastDistributionTableParseWithBuffer(ctx cont // Terminated array var bbmdBroadcastDistributionTable []BACnetBDTEntry { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetBDTEntryParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetBDTEntryParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'bbmdBroadcastDistributionTable' field of BACnetConstructedDataBBMDBroadcastDistributionTable") } @@ -173,7 +175,7 @@ func BACnetConstructedDataBBMDBroadcastDistributionTableParseWithBuffer(ctx cont // Create a partially initialized instance _child := &_BACnetConstructedDataBBMDBroadcastDistributionTable{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, BbmdBroadcastDistributionTable: bbmdBroadcastDistributionTable, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataBBMDBroadcastDistributionTable) SerializeWithWrit return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataBBMDBroadcastDistributionTable") } - // Array Field (bbmdBroadcastDistributionTable) - if pushErr := writeBuffer.PushContext("bbmdBroadcastDistributionTable", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for bbmdBroadcastDistributionTable") - } - for _curItem, _element := range m.GetBbmdBroadcastDistributionTable() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetBbmdBroadcastDistributionTable()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'bbmdBroadcastDistributionTable' field") - } - } - if popErr := writeBuffer.PopContext("bbmdBroadcastDistributionTable", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for bbmdBroadcastDistributionTable") + // Array Field (bbmdBroadcastDistributionTable) + if pushErr := writeBuffer.PushContext("bbmdBroadcastDistributionTable", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for bbmdBroadcastDistributionTable") + } + for _curItem, _element := range m.GetBbmdBroadcastDistributionTable() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetBbmdBroadcastDistributionTable()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'bbmdBroadcastDistributionTable' field") } + } + if popErr := writeBuffer.PopContext("bbmdBroadcastDistributionTable", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for bbmdBroadcastDistributionTable") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataBBMDBroadcastDistributionTable"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataBBMDBroadcastDistributionTable") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataBBMDBroadcastDistributionTable) SerializeWithWrit return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataBBMDBroadcastDistributionTable) isBACnetConstructedDataBBMDBroadcastDistributionTable() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataBBMDBroadcastDistributionTable) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBBMDForeignDeviceTable.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBBMDForeignDeviceTable.go index 96cabe8a542..3a56866ef97 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBBMDForeignDeviceTable.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBBMDForeignDeviceTable.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataBBMDForeignDeviceTable is the corresponding interface of BACnetConstructedDataBBMDForeignDeviceTable type BACnetConstructedDataBBMDForeignDeviceTable interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataBBMDForeignDeviceTableExactly interface { // _BACnetConstructedDataBBMDForeignDeviceTable is the data-structure of this message type _BACnetConstructedDataBBMDForeignDeviceTable struct { *_BACnetConstructedData - BbmdForeignDeviceTable []BACnetBDTEntry + BbmdForeignDeviceTable []BACnetBDTEntry } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataBBMDForeignDeviceTable) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataBBMDForeignDeviceTable) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataBBMDForeignDeviceTable) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_BBMD_FOREIGN_DEVICE_TABLE -} +func (m *_BACnetConstructedDataBBMDForeignDeviceTable) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_BBMD_FOREIGN_DEVICE_TABLE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataBBMDForeignDeviceTable) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataBBMDForeignDeviceTable) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataBBMDForeignDeviceTable) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataBBMDForeignDeviceTable) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataBBMDForeignDeviceTable) GetBbmdForeignDeviceTable /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataBBMDForeignDeviceTable factory function for _BACnetConstructedDataBBMDForeignDeviceTable -func NewBACnetConstructedDataBBMDForeignDeviceTable(bbmdForeignDeviceTable []BACnetBDTEntry, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataBBMDForeignDeviceTable { +func NewBACnetConstructedDataBBMDForeignDeviceTable( bbmdForeignDeviceTable []BACnetBDTEntry , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataBBMDForeignDeviceTable { _result := &_BACnetConstructedDataBBMDForeignDeviceTable{ BbmdForeignDeviceTable: bbmdForeignDeviceTable, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataBBMDForeignDeviceTable(bbmdForeignDeviceTable []BAC // Deprecated: use the interface for direct cast func CastBACnetConstructedDataBBMDForeignDeviceTable(structType interface{}) BACnetConstructedDataBBMDForeignDeviceTable { - if casted, ok := structType.(BACnetConstructedDataBBMDForeignDeviceTable); ok { + if casted, ok := structType.(BACnetConstructedDataBBMDForeignDeviceTable); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataBBMDForeignDeviceTable); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataBBMDForeignDeviceTable) GetLengthInBits(ctx conte return lengthInBits } + func (m *_BACnetConstructedDataBBMDForeignDeviceTable) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataBBMDForeignDeviceTableParseWithBuffer(ctx context.Cont // Terminated array var bbmdForeignDeviceTable []BACnetBDTEntry { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetBDTEntryParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetBDTEntryParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'bbmdForeignDeviceTable' field of BACnetConstructedDataBBMDForeignDeviceTable") } @@ -173,7 +175,7 @@ func BACnetConstructedDataBBMDForeignDeviceTableParseWithBuffer(ctx context.Cont // Create a partially initialized instance _child := &_BACnetConstructedDataBBMDForeignDeviceTable{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, BbmdForeignDeviceTable: bbmdForeignDeviceTable, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataBBMDForeignDeviceTable) SerializeWithWriteBuffer( return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataBBMDForeignDeviceTable") } - // Array Field (bbmdForeignDeviceTable) - if pushErr := writeBuffer.PushContext("bbmdForeignDeviceTable", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for bbmdForeignDeviceTable") - } - for _curItem, _element := range m.GetBbmdForeignDeviceTable() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetBbmdForeignDeviceTable()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'bbmdForeignDeviceTable' field") - } - } - if popErr := writeBuffer.PopContext("bbmdForeignDeviceTable", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for bbmdForeignDeviceTable") + // Array Field (bbmdForeignDeviceTable) + if pushErr := writeBuffer.PushContext("bbmdForeignDeviceTable", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for bbmdForeignDeviceTable") + } + for _curItem, _element := range m.GetBbmdForeignDeviceTable() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetBbmdForeignDeviceTable()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'bbmdForeignDeviceTable' field") } + } + if popErr := writeBuffer.PopContext("bbmdForeignDeviceTable", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for bbmdForeignDeviceTable") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataBBMDForeignDeviceTable"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataBBMDForeignDeviceTable") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataBBMDForeignDeviceTable) SerializeWithWriteBuffer( return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataBBMDForeignDeviceTable) isBACnetConstructedDataBBMDForeignDeviceTable() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataBBMDForeignDeviceTable) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBackupAndRestoreState.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBackupAndRestoreState.go index 99d584bfe2d..e635bfff538 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBackupAndRestoreState.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBackupAndRestoreState.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataBackupAndRestoreState is the corresponding interface of BACnetConstructedDataBackupAndRestoreState type BACnetConstructedDataBackupAndRestoreState interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataBackupAndRestoreStateExactly interface { // _BACnetConstructedDataBackupAndRestoreState is the data-structure of this message type _BACnetConstructedDataBackupAndRestoreState struct { *_BACnetConstructedData - BackupAndRestoreState BACnetBackupStateTagged + BackupAndRestoreState BACnetBackupStateTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataBackupAndRestoreState) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataBackupAndRestoreState) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataBackupAndRestoreState) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_BACKUP_AND_RESTORE_STATE -} +func (m *_BACnetConstructedDataBackupAndRestoreState) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_BACKUP_AND_RESTORE_STATE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataBackupAndRestoreState) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataBackupAndRestoreState) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataBackupAndRestoreState) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataBackupAndRestoreState) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataBackupAndRestoreState) GetActualValue() BACnetBac /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataBackupAndRestoreState factory function for _BACnetConstructedDataBackupAndRestoreState -func NewBACnetConstructedDataBackupAndRestoreState(backupAndRestoreState BACnetBackupStateTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataBackupAndRestoreState { +func NewBACnetConstructedDataBackupAndRestoreState( backupAndRestoreState BACnetBackupStateTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataBackupAndRestoreState { _result := &_BACnetConstructedDataBackupAndRestoreState{ - BackupAndRestoreState: backupAndRestoreState, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + BackupAndRestoreState: backupAndRestoreState, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataBackupAndRestoreState(backupAndRestoreState BACnetB // Deprecated: use the interface for direct cast func CastBACnetConstructedDataBackupAndRestoreState(structType interface{}) BACnetConstructedDataBackupAndRestoreState { - if casted, ok := structType.(BACnetConstructedDataBackupAndRestoreState); ok { + if casted, ok := structType.(BACnetConstructedDataBackupAndRestoreState); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataBackupAndRestoreState); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataBackupAndRestoreState) GetLengthInBits(ctx contex return lengthInBits } + func (m *_BACnetConstructedDataBackupAndRestoreState) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataBackupAndRestoreStateParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("backupAndRestoreState"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for backupAndRestoreState") } - _backupAndRestoreState, _backupAndRestoreStateErr := BACnetBackupStateTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_backupAndRestoreState, _backupAndRestoreStateErr := BACnetBackupStateTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _backupAndRestoreStateErr != nil { return nil, errors.Wrap(_backupAndRestoreStateErr, "Error parsing 'backupAndRestoreState' field of BACnetConstructedDataBackupAndRestoreState") } @@ -186,7 +188,7 @@ func BACnetConstructedDataBackupAndRestoreStateParseWithBuffer(ctx context.Conte // Create a partially initialized instance _child := &_BACnetConstructedDataBackupAndRestoreState{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, BackupAndRestoreState: backupAndRestoreState, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataBackupAndRestoreState) SerializeWithWriteBuffer(c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataBackupAndRestoreState") } - // Simple Field (backupAndRestoreState) - if pushErr := writeBuffer.PushContext("backupAndRestoreState"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for backupAndRestoreState") - } - _backupAndRestoreStateErr := writeBuffer.WriteSerializable(ctx, m.GetBackupAndRestoreState()) - if popErr := writeBuffer.PopContext("backupAndRestoreState"); popErr != nil { - return errors.Wrap(popErr, "Error popping for backupAndRestoreState") - } - if _backupAndRestoreStateErr != nil { - return errors.Wrap(_backupAndRestoreStateErr, "Error serializing 'backupAndRestoreState' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (backupAndRestoreState) + if pushErr := writeBuffer.PushContext("backupAndRestoreState"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for backupAndRestoreState") + } + _backupAndRestoreStateErr := writeBuffer.WriteSerializable(ctx, m.GetBackupAndRestoreState()) + if popErr := writeBuffer.PopContext("backupAndRestoreState"); popErr != nil { + return errors.Wrap(popErr, "Error popping for backupAndRestoreState") + } + if _backupAndRestoreStateErr != nil { + return errors.Wrap(_backupAndRestoreStateErr, "Error serializing 'backupAndRestoreState' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataBackupAndRestoreState"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataBackupAndRestoreState") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataBackupAndRestoreState) SerializeWithWriteBuffer(c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataBackupAndRestoreState) isBACnetConstructedDataBackupAndRestoreState() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataBackupAndRestoreState) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBackupFailureTimeout.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBackupFailureTimeout.go index cc9f3af25d2..52e3f8d6a0b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBackupFailureTimeout.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBackupFailureTimeout.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataBackupFailureTimeout is the corresponding interface of BACnetConstructedDataBackupFailureTimeout type BACnetConstructedDataBackupFailureTimeout interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataBackupFailureTimeoutExactly interface { // _BACnetConstructedDataBackupFailureTimeout is the data-structure of this message type _BACnetConstructedDataBackupFailureTimeout struct { *_BACnetConstructedData - BackupFailureTimeout BACnetApplicationTagUnsignedInteger + BackupFailureTimeout BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataBackupFailureTimeout) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataBackupFailureTimeout) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataBackupFailureTimeout) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_BACKUP_FAILURE_TIMEOUT -} +func (m *_BACnetConstructedDataBackupFailureTimeout) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_BACKUP_FAILURE_TIMEOUT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataBackupFailureTimeout) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataBackupFailureTimeout) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataBackupFailureTimeout) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataBackupFailureTimeout) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataBackupFailureTimeout) GetActualValue() BACnetAppl /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataBackupFailureTimeout factory function for _BACnetConstructedDataBackupFailureTimeout -func NewBACnetConstructedDataBackupFailureTimeout(backupFailureTimeout BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataBackupFailureTimeout { +func NewBACnetConstructedDataBackupFailureTimeout( backupFailureTimeout BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataBackupFailureTimeout { _result := &_BACnetConstructedDataBackupFailureTimeout{ - BackupFailureTimeout: backupFailureTimeout, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + BackupFailureTimeout: backupFailureTimeout, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataBackupFailureTimeout(backupFailureTimeout BACnetApp // Deprecated: use the interface for direct cast func CastBACnetConstructedDataBackupFailureTimeout(structType interface{}) BACnetConstructedDataBackupFailureTimeout { - if casted, ok := structType.(BACnetConstructedDataBackupFailureTimeout); ok { + if casted, ok := structType.(BACnetConstructedDataBackupFailureTimeout); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataBackupFailureTimeout); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataBackupFailureTimeout) GetLengthInBits(ctx context return lengthInBits } + func (m *_BACnetConstructedDataBackupFailureTimeout) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataBackupFailureTimeoutParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("backupFailureTimeout"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for backupFailureTimeout") } - _backupFailureTimeout, _backupFailureTimeoutErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_backupFailureTimeout, _backupFailureTimeoutErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _backupFailureTimeoutErr != nil { return nil, errors.Wrap(_backupFailureTimeoutErr, "Error parsing 'backupFailureTimeout' field of BACnetConstructedDataBackupFailureTimeout") } @@ -186,7 +188,7 @@ func BACnetConstructedDataBackupFailureTimeoutParseWithBuffer(ctx context.Contex // Create a partially initialized instance _child := &_BACnetConstructedDataBackupFailureTimeout{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, BackupFailureTimeout: backupFailureTimeout, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataBackupFailureTimeout) SerializeWithWriteBuffer(ct return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataBackupFailureTimeout") } - // Simple Field (backupFailureTimeout) - if pushErr := writeBuffer.PushContext("backupFailureTimeout"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for backupFailureTimeout") - } - _backupFailureTimeoutErr := writeBuffer.WriteSerializable(ctx, m.GetBackupFailureTimeout()) - if popErr := writeBuffer.PopContext("backupFailureTimeout"); popErr != nil { - return errors.Wrap(popErr, "Error popping for backupFailureTimeout") - } - if _backupFailureTimeoutErr != nil { - return errors.Wrap(_backupFailureTimeoutErr, "Error serializing 'backupFailureTimeout' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (backupFailureTimeout) + if pushErr := writeBuffer.PushContext("backupFailureTimeout"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for backupFailureTimeout") + } + _backupFailureTimeoutErr := writeBuffer.WriteSerializable(ctx, m.GetBackupFailureTimeout()) + if popErr := writeBuffer.PopContext("backupFailureTimeout"); popErr != nil { + return errors.Wrap(popErr, "Error popping for backupFailureTimeout") + } + if _backupFailureTimeoutErr != nil { + return errors.Wrap(_backupFailureTimeoutErr, "Error serializing 'backupFailureTimeout' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataBackupFailureTimeout"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataBackupFailureTimeout") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataBackupFailureTimeout) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataBackupFailureTimeout) isBACnetConstructedDataBackupFailureTimeout() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataBackupFailureTimeout) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBackupPreparationTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBackupPreparationTime.go index 1846c1a10e9..66f3054fc02 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBackupPreparationTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBackupPreparationTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataBackupPreparationTime is the corresponding interface of BACnetConstructedDataBackupPreparationTime type BACnetConstructedDataBackupPreparationTime interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataBackupPreparationTimeExactly interface { // _BACnetConstructedDataBackupPreparationTime is the data-structure of this message type _BACnetConstructedDataBackupPreparationTime struct { *_BACnetConstructedData - BackupPreparationTime BACnetApplicationTagUnsignedInteger + BackupPreparationTime BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataBackupPreparationTime) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataBackupPreparationTime) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataBackupPreparationTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_BACKUP_PREPARATION_TIME -} +func (m *_BACnetConstructedDataBackupPreparationTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_BACKUP_PREPARATION_TIME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataBackupPreparationTime) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataBackupPreparationTime) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataBackupPreparationTime) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataBackupPreparationTime) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataBackupPreparationTime) GetActualValue() BACnetApp /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataBackupPreparationTime factory function for _BACnetConstructedDataBackupPreparationTime -func NewBACnetConstructedDataBackupPreparationTime(backupPreparationTime BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataBackupPreparationTime { +func NewBACnetConstructedDataBackupPreparationTime( backupPreparationTime BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataBackupPreparationTime { _result := &_BACnetConstructedDataBackupPreparationTime{ - BackupPreparationTime: backupPreparationTime, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + BackupPreparationTime: backupPreparationTime, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataBackupPreparationTime(backupPreparationTime BACnetA // Deprecated: use the interface for direct cast func CastBACnetConstructedDataBackupPreparationTime(structType interface{}) BACnetConstructedDataBackupPreparationTime { - if casted, ok := structType.(BACnetConstructedDataBackupPreparationTime); ok { + if casted, ok := structType.(BACnetConstructedDataBackupPreparationTime); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataBackupPreparationTime); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataBackupPreparationTime) GetLengthInBits(ctx contex return lengthInBits } + func (m *_BACnetConstructedDataBackupPreparationTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataBackupPreparationTimeParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("backupPreparationTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for backupPreparationTime") } - _backupPreparationTime, _backupPreparationTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_backupPreparationTime, _backupPreparationTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _backupPreparationTimeErr != nil { return nil, errors.Wrap(_backupPreparationTimeErr, "Error parsing 'backupPreparationTime' field of BACnetConstructedDataBackupPreparationTime") } @@ -186,7 +188,7 @@ func BACnetConstructedDataBackupPreparationTimeParseWithBuffer(ctx context.Conte // Create a partially initialized instance _child := &_BACnetConstructedDataBackupPreparationTime{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, BackupPreparationTime: backupPreparationTime, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataBackupPreparationTime) SerializeWithWriteBuffer(c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataBackupPreparationTime") } - // Simple Field (backupPreparationTime) - if pushErr := writeBuffer.PushContext("backupPreparationTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for backupPreparationTime") - } - _backupPreparationTimeErr := writeBuffer.WriteSerializable(ctx, m.GetBackupPreparationTime()) - if popErr := writeBuffer.PopContext("backupPreparationTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for backupPreparationTime") - } - if _backupPreparationTimeErr != nil { - return errors.Wrap(_backupPreparationTimeErr, "Error serializing 'backupPreparationTime' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (backupPreparationTime) + if pushErr := writeBuffer.PushContext("backupPreparationTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for backupPreparationTime") + } + _backupPreparationTimeErr := writeBuffer.WriteSerializable(ctx, m.GetBackupPreparationTime()) + if popErr := writeBuffer.PopContext("backupPreparationTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for backupPreparationTime") + } + if _backupPreparationTimeErr != nil { + return errors.Wrap(_backupPreparationTimeErr, "Error serializing 'backupPreparationTime' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataBackupPreparationTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataBackupPreparationTime") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataBackupPreparationTime) SerializeWithWriteBuffer(c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataBackupPreparationTime) isBACnetConstructedDataBackupPreparationTime() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataBackupPreparationTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBaseDeviceSecurityPolicy.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBaseDeviceSecurityPolicy.go index 3397b023beb..01bcf7739e7 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBaseDeviceSecurityPolicy.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBaseDeviceSecurityPolicy.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataBaseDeviceSecurityPolicy is the corresponding interface of BACnetConstructedDataBaseDeviceSecurityPolicy type BACnetConstructedDataBaseDeviceSecurityPolicy interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataBaseDeviceSecurityPolicyExactly interface { // _BACnetConstructedDataBaseDeviceSecurityPolicy is the data-structure of this message type _BACnetConstructedDataBaseDeviceSecurityPolicy struct { *_BACnetConstructedData - BaseDeviceSecurityPolicy BACnetSecurityLevelTagged + BaseDeviceSecurityPolicy BACnetSecurityLevelTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataBaseDeviceSecurityPolicy) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataBaseDeviceSecurityPolicy) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataBaseDeviceSecurityPolicy) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_BASE_DEVICE_SECURITY_POLICY -} +func (m *_BACnetConstructedDataBaseDeviceSecurityPolicy) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_BASE_DEVICE_SECURITY_POLICY} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataBaseDeviceSecurityPolicy) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataBaseDeviceSecurityPolicy) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataBaseDeviceSecurityPolicy) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataBaseDeviceSecurityPolicy) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataBaseDeviceSecurityPolicy) GetActualValue() BACnet /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataBaseDeviceSecurityPolicy factory function for _BACnetConstructedDataBaseDeviceSecurityPolicy -func NewBACnetConstructedDataBaseDeviceSecurityPolicy(baseDeviceSecurityPolicy BACnetSecurityLevelTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataBaseDeviceSecurityPolicy { +func NewBACnetConstructedDataBaseDeviceSecurityPolicy( baseDeviceSecurityPolicy BACnetSecurityLevelTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataBaseDeviceSecurityPolicy { _result := &_BACnetConstructedDataBaseDeviceSecurityPolicy{ BaseDeviceSecurityPolicy: baseDeviceSecurityPolicy, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataBaseDeviceSecurityPolicy(baseDeviceSecurityPolicy B // Deprecated: use the interface for direct cast func CastBACnetConstructedDataBaseDeviceSecurityPolicy(structType interface{}) BACnetConstructedDataBaseDeviceSecurityPolicy { - if casted, ok := structType.(BACnetConstructedDataBaseDeviceSecurityPolicy); ok { + if casted, ok := structType.(BACnetConstructedDataBaseDeviceSecurityPolicy); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataBaseDeviceSecurityPolicy); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataBaseDeviceSecurityPolicy) GetLengthInBits(ctx con return lengthInBits } + func (m *_BACnetConstructedDataBaseDeviceSecurityPolicy) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataBaseDeviceSecurityPolicyParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("baseDeviceSecurityPolicy"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for baseDeviceSecurityPolicy") } - _baseDeviceSecurityPolicy, _baseDeviceSecurityPolicyErr := BACnetSecurityLevelTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_baseDeviceSecurityPolicy, _baseDeviceSecurityPolicyErr := BACnetSecurityLevelTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _baseDeviceSecurityPolicyErr != nil { return nil, errors.Wrap(_baseDeviceSecurityPolicyErr, "Error parsing 'baseDeviceSecurityPolicy' field of BACnetConstructedDataBaseDeviceSecurityPolicy") } @@ -186,7 +188,7 @@ func BACnetConstructedDataBaseDeviceSecurityPolicyParseWithBuffer(ctx context.Co // Create a partially initialized instance _child := &_BACnetConstructedDataBaseDeviceSecurityPolicy{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, BaseDeviceSecurityPolicy: baseDeviceSecurityPolicy, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataBaseDeviceSecurityPolicy) SerializeWithWriteBuffe return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataBaseDeviceSecurityPolicy") } - // Simple Field (baseDeviceSecurityPolicy) - if pushErr := writeBuffer.PushContext("baseDeviceSecurityPolicy"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for baseDeviceSecurityPolicy") - } - _baseDeviceSecurityPolicyErr := writeBuffer.WriteSerializable(ctx, m.GetBaseDeviceSecurityPolicy()) - if popErr := writeBuffer.PopContext("baseDeviceSecurityPolicy"); popErr != nil { - return errors.Wrap(popErr, "Error popping for baseDeviceSecurityPolicy") - } - if _baseDeviceSecurityPolicyErr != nil { - return errors.Wrap(_baseDeviceSecurityPolicyErr, "Error serializing 'baseDeviceSecurityPolicy' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (baseDeviceSecurityPolicy) + if pushErr := writeBuffer.PushContext("baseDeviceSecurityPolicy"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for baseDeviceSecurityPolicy") + } + _baseDeviceSecurityPolicyErr := writeBuffer.WriteSerializable(ctx, m.GetBaseDeviceSecurityPolicy()) + if popErr := writeBuffer.PopContext("baseDeviceSecurityPolicy"); popErr != nil { + return errors.Wrap(popErr, "Error popping for baseDeviceSecurityPolicy") + } + if _baseDeviceSecurityPolicyErr != nil { + return errors.Wrap(_baseDeviceSecurityPolicyErr, "Error serializing 'baseDeviceSecurityPolicy' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataBaseDeviceSecurityPolicy"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataBaseDeviceSecurityPolicy") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataBaseDeviceSecurityPolicy) SerializeWithWriteBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataBaseDeviceSecurityPolicy) isBACnetConstructedDataBaseDeviceSecurityPolicy() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataBaseDeviceSecurityPolicy) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBelongsTo.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBelongsTo.go index 9296cc69133..40fe45ca2c4 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBelongsTo.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBelongsTo.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataBelongsTo is the corresponding interface of BACnetConstructedDataBelongsTo type BACnetConstructedDataBelongsTo interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataBelongsToExactly interface { // _BACnetConstructedDataBelongsTo is the data-structure of this message type _BACnetConstructedDataBelongsTo struct { *_BACnetConstructedData - BelongsTo BACnetDeviceObjectReference + BelongsTo BACnetDeviceObjectReference } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataBelongsTo) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataBelongsTo) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataBelongsTo) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_BELONGS_TO -} +func (m *_BACnetConstructedDataBelongsTo) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_BELONGS_TO} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataBelongsTo) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataBelongsTo) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataBelongsTo) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataBelongsTo) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataBelongsTo) GetActualValue() BACnetDeviceObjectRef /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataBelongsTo factory function for _BACnetConstructedDataBelongsTo -func NewBACnetConstructedDataBelongsTo(belongsTo BACnetDeviceObjectReference, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataBelongsTo { +func NewBACnetConstructedDataBelongsTo( belongsTo BACnetDeviceObjectReference , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataBelongsTo { _result := &_BACnetConstructedDataBelongsTo{ - BelongsTo: belongsTo, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + BelongsTo: belongsTo, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataBelongsTo(belongsTo BACnetDeviceObjectReference, op // Deprecated: use the interface for direct cast func CastBACnetConstructedDataBelongsTo(structType interface{}) BACnetConstructedDataBelongsTo { - if casted, ok := structType.(BACnetConstructedDataBelongsTo); ok { + if casted, ok := structType.(BACnetConstructedDataBelongsTo); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataBelongsTo); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataBelongsTo) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetConstructedDataBelongsTo) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataBelongsToParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("belongsTo"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for belongsTo") } - _belongsTo, _belongsToErr := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) +_belongsTo, _belongsToErr := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) if _belongsToErr != nil { return nil, errors.Wrap(_belongsToErr, "Error parsing 'belongsTo' field of BACnetConstructedDataBelongsTo") } @@ -186,7 +188,7 @@ func BACnetConstructedDataBelongsToParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_BACnetConstructedDataBelongsTo{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, BelongsTo: belongsTo, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataBelongsTo) SerializeWithWriteBuffer(ctx context.C return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataBelongsTo") } - // Simple Field (belongsTo) - if pushErr := writeBuffer.PushContext("belongsTo"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for belongsTo") - } - _belongsToErr := writeBuffer.WriteSerializable(ctx, m.GetBelongsTo()) - if popErr := writeBuffer.PopContext("belongsTo"); popErr != nil { - return errors.Wrap(popErr, "Error popping for belongsTo") - } - if _belongsToErr != nil { - return errors.Wrap(_belongsToErr, "Error serializing 'belongsTo' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (belongsTo) + if pushErr := writeBuffer.PushContext("belongsTo"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for belongsTo") + } + _belongsToErr := writeBuffer.WriteSerializable(ctx, m.GetBelongsTo()) + if popErr := writeBuffer.PopContext("belongsTo"); popErr != nil { + return errors.Wrap(popErr, "Error popping for belongsTo") + } + if _belongsToErr != nil { + return errors.Wrap(_belongsToErr, "Error serializing 'belongsTo' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataBelongsTo"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataBelongsTo") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataBelongsTo) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataBelongsTo) isBACnetConstructedDataBelongsTo() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataBelongsTo) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBias.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBias.go index d1136a82195..df6ff40d853 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBias.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBias.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataBias is the corresponding interface of BACnetConstructedDataBias type BACnetConstructedDataBias interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataBiasExactly interface { // _BACnetConstructedDataBias is the data-structure of this message type _BACnetConstructedDataBias struct { *_BACnetConstructedData - Bias BACnetApplicationTagReal + Bias BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataBias) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataBias) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataBias) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_BIAS -} +func (m *_BACnetConstructedDataBias) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_BIAS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataBias) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataBias) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataBias) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataBias) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataBias) GetActualValue() BACnetApplicationTagReal { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataBias factory function for _BACnetConstructedDataBias -func NewBACnetConstructedDataBias(bias BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataBias { +func NewBACnetConstructedDataBias( bias BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataBias { _result := &_BACnetConstructedDataBias{ - Bias: bias, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Bias: bias, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataBias(bias BACnetApplicationTagReal, openingTag BACn // Deprecated: use the interface for direct cast func CastBACnetConstructedDataBias(structType interface{}) BACnetConstructedDataBias { - if casted, ok := structType.(BACnetConstructedDataBias); ok { + if casted, ok := structType.(BACnetConstructedDataBias); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataBias); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataBias) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_BACnetConstructedDataBias) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataBiasParseWithBuffer(ctx context.Context, readBuffer ut if pullErr := readBuffer.PullContext("bias"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for bias") } - _bias, _biasErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_bias, _biasErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _biasErr != nil { return nil, errors.Wrap(_biasErr, "Error parsing 'bias' field of BACnetConstructedDataBias") } @@ -186,7 +188,7 @@ func BACnetConstructedDataBiasParseWithBuffer(ctx context.Context, readBuffer ut // Create a partially initialized instance _child := &_BACnetConstructedDataBias{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Bias: bias, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataBias) SerializeWithWriteBuffer(ctx context.Contex return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataBias") } - // Simple Field (bias) - if pushErr := writeBuffer.PushContext("bias"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for bias") - } - _biasErr := writeBuffer.WriteSerializable(ctx, m.GetBias()) - if popErr := writeBuffer.PopContext("bias"); popErr != nil { - return errors.Wrap(popErr, "Error popping for bias") - } - if _biasErr != nil { - return errors.Wrap(_biasErr, "Error serializing 'bias' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (bias) + if pushErr := writeBuffer.PushContext("bias"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for bias") + } + _biasErr := writeBuffer.WriteSerializable(ctx, m.GetBias()) + if popErr := writeBuffer.PopContext("bias"); popErr != nil { + return errors.Wrap(popErr, "Error popping for bias") + } + if _biasErr != nil { + return errors.Wrap(_biasErr, "Error serializing 'bias' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataBias"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataBias") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataBias) SerializeWithWriteBuffer(ctx context.Contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataBias) isBACnetConstructedDataBias() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataBias) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryInputAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryInputAll.go index 3a9175003b8..069792f1696 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryInputAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryInputAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataBinaryInputAll is the corresponding interface of BACnetConstructedDataBinaryInputAll type BACnetConstructedDataBinaryInputAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataBinaryInputAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataBinaryInputAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_BINARY_INPUT -} +func (m *_BACnetConstructedDataBinaryInputAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_BINARY_INPUT} -func (m *_BACnetConstructedDataBinaryInputAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataBinaryInputAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataBinaryInputAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataBinaryInputAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataBinaryInputAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataBinaryInputAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataBinaryInputAll factory function for _BACnetConstructedDataBinaryInputAll -func NewBACnetConstructedDataBinaryInputAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataBinaryInputAll { +func NewBACnetConstructedDataBinaryInputAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataBinaryInputAll { _result := &_BACnetConstructedDataBinaryInputAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataBinaryInputAll(openingTag BACnetOpeningTag, peekedT // Deprecated: use the interface for direct cast func CastBACnetConstructedDataBinaryInputAll(structType interface{}) BACnetConstructedDataBinaryInputAll { - if casted, ok := structType.(BACnetConstructedDataBinaryInputAll); ok { + if casted, ok := structType.(BACnetConstructedDataBinaryInputAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataBinaryInputAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataBinaryInputAll) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConstructedDataBinaryInputAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataBinaryInputAllParseWithBuffer(ctx context.Context, rea _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataBinaryInputAllParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetConstructedDataBinaryInputAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataBinaryInputAll) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataBinaryInputAll) isBACnetConstructedDataBinaryInputAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataBinaryInputAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryInputInterfaceValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryInputInterfaceValue.go index 01209c4d284..4967716264d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryInputInterfaceValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryInputInterfaceValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataBinaryInputInterfaceValue is the corresponding interface of BACnetConstructedDataBinaryInputInterfaceValue type BACnetConstructedDataBinaryInputInterfaceValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataBinaryInputInterfaceValueExactly interface { // _BACnetConstructedDataBinaryInputInterfaceValue is the data-structure of this message type _BACnetConstructedDataBinaryInputInterfaceValue struct { *_BACnetConstructedData - InterfaceValue BACnetOptionalBinaryPV + InterfaceValue BACnetOptionalBinaryPV } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataBinaryInputInterfaceValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_BINARY_INPUT -} +func (m *_BACnetConstructedDataBinaryInputInterfaceValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_BINARY_INPUT} -func (m *_BACnetConstructedDataBinaryInputInterfaceValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_INTERFACE_VALUE -} +func (m *_BACnetConstructedDataBinaryInputInterfaceValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_INTERFACE_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataBinaryInputInterfaceValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataBinaryInputInterfaceValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataBinaryInputInterfaceValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataBinaryInputInterfaceValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataBinaryInputInterfaceValue) GetActualValue() BACne /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataBinaryInputInterfaceValue factory function for _BACnetConstructedDataBinaryInputInterfaceValue -func NewBACnetConstructedDataBinaryInputInterfaceValue(interfaceValue BACnetOptionalBinaryPV, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataBinaryInputInterfaceValue { +func NewBACnetConstructedDataBinaryInputInterfaceValue( interfaceValue BACnetOptionalBinaryPV , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataBinaryInputInterfaceValue { _result := &_BACnetConstructedDataBinaryInputInterfaceValue{ - InterfaceValue: interfaceValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + InterfaceValue: interfaceValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataBinaryInputInterfaceValue(interfaceValue BACnetOpti // Deprecated: use the interface for direct cast func CastBACnetConstructedDataBinaryInputInterfaceValue(structType interface{}) BACnetConstructedDataBinaryInputInterfaceValue { - if casted, ok := structType.(BACnetConstructedDataBinaryInputInterfaceValue); ok { + if casted, ok := structType.(BACnetConstructedDataBinaryInputInterfaceValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataBinaryInputInterfaceValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataBinaryInputInterfaceValue) GetLengthInBits(ctx co return lengthInBits } + func (m *_BACnetConstructedDataBinaryInputInterfaceValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataBinaryInputInterfaceValueParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("interfaceValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for interfaceValue") } - _interfaceValue, _interfaceValueErr := BACnetOptionalBinaryPVParseWithBuffer(ctx, readBuffer) +_interfaceValue, _interfaceValueErr := BACnetOptionalBinaryPVParseWithBuffer(ctx, readBuffer) if _interfaceValueErr != nil { return nil, errors.Wrap(_interfaceValueErr, "Error parsing 'interfaceValue' field of BACnetConstructedDataBinaryInputInterfaceValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataBinaryInputInterfaceValueParseWithBuffer(ctx context.C // Create a partially initialized instance _child := &_BACnetConstructedDataBinaryInputInterfaceValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, InterfaceValue: interfaceValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataBinaryInputInterfaceValue) SerializeWithWriteBuff return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataBinaryInputInterfaceValue") } - // Simple Field (interfaceValue) - if pushErr := writeBuffer.PushContext("interfaceValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for interfaceValue") - } - _interfaceValueErr := writeBuffer.WriteSerializable(ctx, m.GetInterfaceValue()) - if popErr := writeBuffer.PopContext("interfaceValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for interfaceValue") - } - if _interfaceValueErr != nil { - return errors.Wrap(_interfaceValueErr, "Error serializing 'interfaceValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (interfaceValue) + if pushErr := writeBuffer.PushContext("interfaceValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for interfaceValue") + } + _interfaceValueErr := writeBuffer.WriteSerializable(ctx, m.GetInterfaceValue()) + if popErr := writeBuffer.PopContext("interfaceValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for interfaceValue") + } + if _interfaceValueErr != nil { + return errors.Wrap(_interfaceValueErr, "Error serializing 'interfaceValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataBinaryInputInterfaceValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataBinaryInputInterfaceValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataBinaryInputInterfaceValue) SerializeWithWriteBuff return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataBinaryInputInterfaceValue) isBACnetConstructedDataBinaryInputInterfaceValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataBinaryInputInterfaceValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryInputPresentValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryInputPresentValue.go index 9e0f078a392..5d55fa2ad16 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryInputPresentValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryInputPresentValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataBinaryInputPresentValue is the corresponding interface of BACnetConstructedDataBinaryInputPresentValue type BACnetConstructedDataBinaryInputPresentValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataBinaryInputPresentValueExactly interface { // _BACnetConstructedDataBinaryInputPresentValue is the data-structure of this message type _BACnetConstructedDataBinaryInputPresentValue struct { *_BACnetConstructedData - PresentValue BACnetBinaryPVTagged + PresentValue BACnetBinaryPVTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataBinaryInputPresentValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_BINARY_INPUT -} +func (m *_BACnetConstructedDataBinaryInputPresentValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_BINARY_INPUT} -func (m *_BACnetConstructedDataBinaryInputPresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PRESENT_VALUE -} +func (m *_BACnetConstructedDataBinaryInputPresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PRESENT_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataBinaryInputPresentValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataBinaryInputPresentValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataBinaryInputPresentValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataBinaryInputPresentValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataBinaryInputPresentValue) GetActualValue() BACnetB /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataBinaryInputPresentValue factory function for _BACnetConstructedDataBinaryInputPresentValue -func NewBACnetConstructedDataBinaryInputPresentValue(presentValue BACnetBinaryPVTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataBinaryInputPresentValue { +func NewBACnetConstructedDataBinaryInputPresentValue( presentValue BACnetBinaryPVTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataBinaryInputPresentValue { _result := &_BACnetConstructedDataBinaryInputPresentValue{ - PresentValue: presentValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PresentValue: presentValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataBinaryInputPresentValue(presentValue BACnetBinaryPV // Deprecated: use the interface for direct cast func CastBACnetConstructedDataBinaryInputPresentValue(structType interface{}) BACnetConstructedDataBinaryInputPresentValue { - if casted, ok := structType.(BACnetConstructedDataBinaryInputPresentValue); ok { + if casted, ok := structType.(BACnetConstructedDataBinaryInputPresentValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataBinaryInputPresentValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataBinaryInputPresentValue) GetLengthInBits(ctx cont return lengthInBits } + func (m *_BACnetConstructedDataBinaryInputPresentValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataBinaryInputPresentValueParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("presentValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for presentValue") } - _presentValue, _presentValueErr := BACnetBinaryPVTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_presentValue, _presentValueErr := BACnetBinaryPVTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _presentValueErr != nil { return nil, errors.Wrap(_presentValueErr, "Error parsing 'presentValue' field of BACnetConstructedDataBinaryInputPresentValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataBinaryInputPresentValueParseWithBuffer(ctx context.Con // Create a partially initialized instance _child := &_BACnetConstructedDataBinaryInputPresentValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PresentValue: presentValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataBinaryInputPresentValue) SerializeWithWriteBuffer return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataBinaryInputPresentValue") } - // Simple Field (presentValue) - if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for presentValue") - } - _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) - if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for presentValue") - } - if _presentValueErr != nil { - return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (presentValue) + if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for presentValue") + } + _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) + if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for presentValue") + } + if _presentValueErr != nil { + return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataBinaryInputPresentValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataBinaryInputPresentValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataBinaryInputPresentValue) SerializeWithWriteBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataBinaryInputPresentValue) isBACnetConstructedDataBinaryInputPresentValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataBinaryInputPresentValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryLightingOutputAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryLightingOutputAll.go index 3a89ee09b97..463390b9b68 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryLightingOutputAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryLightingOutputAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataBinaryLightingOutputAll is the corresponding interface of BACnetConstructedDataBinaryLightingOutputAll type BACnetConstructedDataBinaryLightingOutputAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataBinaryLightingOutputAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataBinaryLightingOutputAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_BINARY_LIGHTING_OUTPUT -} +func (m *_BACnetConstructedDataBinaryLightingOutputAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_BINARY_LIGHTING_OUTPUT} -func (m *_BACnetConstructedDataBinaryLightingOutputAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataBinaryLightingOutputAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataBinaryLightingOutputAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataBinaryLightingOutputAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataBinaryLightingOutputAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataBinaryLightingOutputAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataBinaryLightingOutputAll factory function for _BACnetConstructedDataBinaryLightingOutputAll -func NewBACnetConstructedDataBinaryLightingOutputAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataBinaryLightingOutputAll { +func NewBACnetConstructedDataBinaryLightingOutputAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataBinaryLightingOutputAll { _result := &_BACnetConstructedDataBinaryLightingOutputAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataBinaryLightingOutputAll(openingTag BACnetOpeningTag // Deprecated: use the interface for direct cast func CastBACnetConstructedDataBinaryLightingOutputAll(structType interface{}) BACnetConstructedDataBinaryLightingOutputAll { - if casted, ok := structType.(BACnetConstructedDataBinaryLightingOutputAll); ok { + if casted, ok := structType.(BACnetConstructedDataBinaryLightingOutputAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataBinaryLightingOutputAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataBinaryLightingOutputAll) GetLengthInBits(ctx cont return lengthInBits } + func (m *_BACnetConstructedDataBinaryLightingOutputAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataBinaryLightingOutputAllParseWithBuffer(ctx context.Con _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataBinaryLightingOutputAllParseWithBuffer(ctx context.Con // Create a partially initialized instance _child := &_BACnetConstructedDataBinaryLightingOutputAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataBinaryLightingOutputAll) SerializeWithWriteBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataBinaryLightingOutputAll) isBACnetConstructedDataBinaryLightingOutputAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataBinaryLightingOutputAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryLightingOutputFeedbackValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryLightingOutputFeedbackValue.go index 47e3b0173ec..e3cfc75f282 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryLightingOutputFeedbackValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryLightingOutputFeedbackValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataBinaryLightingOutputFeedbackValue is the corresponding interface of BACnetConstructedDataBinaryLightingOutputFeedbackValue type BACnetConstructedDataBinaryLightingOutputFeedbackValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataBinaryLightingOutputFeedbackValueExactly interface { // _BACnetConstructedDataBinaryLightingOutputFeedbackValue is the data-structure of this message type _BACnetConstructedDataBinaryLightingOutputFeedbackValue struct { *_BACnetConstructedData - FeedbackValue BACnetBinaryLightingPVTagged + FeedbackValue BACnetBinaryLightingPVTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataBinaryLightingOutputFeedbackValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_BINARY_LIGHTING_OUTPUT -} +func (m *_BACnetConstructedDataBinaryLightingOutputFeedbackValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_BINARY_LIGHTING_OUTPUT} -func (m *_BACnetConstructedDataBinaryLightingOutputFeedbackValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FEEDBACK_VALUE -} +func (m *_BACnetConstructedDataBinaryLightingOutputFeedbackValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FEEDBACK_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataBinaryLightingOutputFeedbackValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataBinaryLightingOutputFeedbackValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataBinaryLightingOutputFeedbackValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataBinaryLightingOutputFeedbackValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataBinaryLightingOutputFeedbackValue) GetActualValue /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataBinaryLightingOutputFeedbackValue factory function for _BACnetConstructedDataBinaryLightingOutputFeedbackValue -func NewBACnetConstructedDataBinaryLightingOutputFeedbackValue(feedbackValue BACnetBinaryLightingPVTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataBinaryLightingOutputFeedbackValue { +func NewBACnetConstructedDataBinaryLightingOutputFeedbackValue( feedbackValue BACnetBinaryLightingPVTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataBinaryLightingOutputFeedbackValue { _result := &_BACnetConstructedDataBinaryLightingOutputFeedbackValue{ - FeedbackValue: feedbackValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + FeedbackValue: feedbackValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataBinaryLightingOutputFeedbackValue(feedbackValue BAC // Deprecated: use the interface for direct cast func CastBACnetConstructedDataBinaryLightingOutputFeedbackValue(structType interface{}) BACnetConstructedDataBinaryLightingOutputFeedbackValue { - if casted, ok := structType.(BACnetConstructedDataBinaryLightingOutputFeedbackValue); ok { + if casted, ok := structType.(BACnetConstructedDataBinaryLightingOutputFeedbackValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataBinaryLightingOutputFeedbackValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataBinaryLightingOutputFeedbackValue) GetLengthInBit return lengthInBits } + func (m *_BACnetConstructedDataBinaryLightingOutputFeedbackValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataBinaryLightingOutputFeedbackValueParseWithBuffer(ctx c if pullErr := readBuffer.PullContext("feedbackValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for feedbackValue") } - _feedbackValue, _feedbackValueErr := BACnetBinaryLightingPVTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_feedbackValue, _feedbackValueErr := BACnetBinaryLightingPVTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _feedbackValueErr != nil { return nil, errors.Wrap(_feedbackValueErr, "Error parsing 'feedbackValue' field of BACnetConstructedDataBinaryLightingOutputFeedbackValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataBinaryLightingOutputFeedbackValueParseWithBuffer(ctx c // Create a partially initialized instance _child := &_BACnetConstructedDataBinaryLightingOutputFeedbackValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FeedbackValue: feedbackValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataBinaryLightingOutputFeedbackValue) SerializeWithW return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataBinaryLightingOutputFeedbackValue") } - // Simple Field (feedbackValue) - if pushErr := writeBuffer.PushContext("feedbackValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for feedbackValue") - } - _feedbackValueErr := writeBuffer.WriteSerializable(ctx, m.GetFeedbackValue()) - if popErr := writeBuffer.PopContext("feedbackValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for feedbackValue") - } - if _feedbackValueErr != nil { - return errors.Wrap(_feedbackValueErr, "Error serializing 'feedbackValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (feedbackValue) + if pushErr := writeBuffer.PushContext("feedbackValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for feedbackValue") + } + _feedbackValueErr := writeBuffer.WriteSerializable(ctx, m.GetFeedbackValue()) + if popErr := writeBuffer.PopContext("feedbackValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for feedbackValue") + } + if _feedbackValueErr != nil { + return errors.Wrap(_feedbackValueErr, "Error serializing 'feedbackValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataBinaryLightingOutputFeedbackValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataBinaryLightingOutputFeedbackValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataBinaryLightingOutputFeedbackValue) SerializeWithW return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataBinaryLightingOutputFeedbackValue) isBACnetConstructedDataBinaryLightingOutputFeedbackValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataBinaryLightingOutputFeedbackValue) String() strin } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryLightingOutputPresentValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryLightingOutputPresentValue.go index 9bf898c7141..0836f1cc18b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryLightingOutputPresentValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryLightingOutputPresentValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataBinaryLightingOutputPresentValue is the corresponding interface of BACnetConstructedDataBinaryLightingOutputPresentValue type BACnetConstructedDataBinaryLightingOutputPresentValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataBinaryLightingOutputPresentValueExactly interface { // _BACnetConstructedDataBinaryLightingOutputPresentValue is the data-structure of this message type _BACnetConstructedDataBinaryLightingOutputPresentValue struct { *_BACnetConstructedData - PresentValue BACnetBinaryLightingPVTagged + PresentValue BACnetBinaryLightingPVTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataBinaryLightingOutputPresentValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_BINARY_LIGHTING_OUTPUT -} +func (m *_BACnetConstructedDataBinaryLightingOutputPresentValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_BINARY_LIGHTING_OUTPUT} -func (m *_BACnetConstructedDataBinaryLightingOutputPresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PRESENT_VALUE -} +func (m *_BACnetConstructedDataBinaryLightingOutputPresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PRESENT_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataBinaryLightingOutputPresentValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataBinaryLightingOutputPresentValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataBinaryLightingOutputPresentValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataBinaryLightingOutputPresentValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataBinaryLightingOutputPresentValue) GetActualValue( /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataBinaryLightingOutputPresentValue factory function for _BACnetConstructedDataBinaryLightingOutputPresentValue -func NewBACnetConstructedDataBinaryLightingOutputPresentValue(presentValue BACnetBinaryLightingPVTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataBinaryLightingOutputPresentValue { +func NewBACnetConstructedDataBinaryLightingOutputPresentValue( presentValue BACnetBinaryLightingPVTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataBinaryLightingOutputPresentValue { _result := &_BACnetConstructedDataBinaryLightingOutputPresentValue{ - PresentValue: presentValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PresentValue: presentValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataBinaryLightingOutputPresentValue(presentValue BACne // Deprecated: use the interface for direct cast func CastBACnetConstructedDataBinaryLightingOutputPresentValue(structType interface{}) BACnetConstructedDataBinaryLightingOutputPresentValue { - if casted, ok := structType.(BACnetConstructedDataBinaryLightingOutputPresentValue); ok { + if casted, ok := structType.(BACnetConstructedDataBinaryLightingOutputPresentValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataBinaryLightingOutputPresentValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataBinaryLightingOutputPresentValue) GetLengthInBits return lengthInBits } + func (m *_BACnetConstructedDataBinaryLightingOutputPresentValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataBinaryLightingOutputPresentValueParseWithBuffer(ctx co if pullErr := readBuffer.PullContext("presentValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for presentValue") } - _presentValue, _presentValueErr := BACnetBinaryLightingPVTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_presentValue, _presentValueErr := BACnetBinaryLightingPVTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _presentValueErr != nil { return nil, errors.Wrap(_presentValueErr, "Error parsing 'presentValue' field of BACnetConstructedDataBinaryLightingOutputPresentValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataBinaryLightingOutputPresentValueParseWithBuffer(ctx co // Create a partially initialized instance _child := &_BACnetConstructedDataBinaryLightingOutputPresentValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PresentValue: presentValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataBinaryLightingOutputPresentValue) SerializeWithWr return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataBinaryLightingOutputPresentValue") } - // Simple Field (presentValue) - if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for presentValue") - } - _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) - if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for presentValue") - } - if _presentValueErr != nil { - return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (presentValue) + if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for presentValue") + } + _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) + if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for presentValue") + } + if _presentValueErr != nil { + return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataBinaryLightingOutputPresentValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataBinaryLightingOutputPresentValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataBinaryLightingOutputPresentValue) SerializeWithWr return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataBinaryLightingOutputPresentValue) isBACnetConstructedDataBinaryLightingOutputPresentValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataBinaryLightingOutputPresentValue) String() string } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryLightingOutputRelinquishDefault.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryLightingOutputRelinquishDefault.go index 96137260313..efcee2b6a0f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryLightingOutputRelinquishDefault.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryLightingOutputRelinquishDefault.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataBinaryLightingOutputRelinquishDefault is the corresponding interface of BACnetConstructedDataBinaryLightingOutputRelinquishDefault type BACnetConstructedDataBinaryLightingOutputRelinquishDefault interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataBinaryLightingOutputRelinquishDefaultExactly interface // _BACnetConstructedDataBinaryLightingOutputRelinquishDefault is the data-structure of this message type _BACnetConstructedDataBinaryLightingOutputRelinquishDefault struct { *_BACnetConstructedData - RelinquishDefault BACnetBinaryLightingPVTagged + RelinquishDefault BACnetBinaryLightingPVTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataBinaryLightingOutputRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_BINARY_LIGHTING_OUTPUT -} +func (m *_BACnetConstructedDataBinaryLightingOutputRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_BINARY_LIGHTING_OUTPUT} -func (m *_BACnetConstructedDataBinaryLightingOutputRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_RELINQUISH_DEFAULT -} +func (m *_BACnetConstructedDataBinaryLightingOutputRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_RELINQUISH_DEFAULT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataBinaryLightingOutputRelinquishDefault) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataBinaryLightingOutputRelinquishDefault) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataBinaryLightingOutputRelinquishDefault) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataBinaryLightingOutputRelinquishDefault) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataBinaryLightingOutputRelinquishDefault) GetActualV /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataBinaryLightingOutputRelinquishDefault factory function for _BACnetConstructedDataBinaryLightingOutputRelinquishDefault -func NewBACnetConstructedDataBinaryLightingOutputRelinquishDefault(relinquishDefault BACnetBinaryLightingPVTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataBinaryLightingOutputRelinquishDefault { +func NewBACnetConstructedDataBinaryLightingOutputRelinquishDefault( relinquishDefault BACnetBinaryLightingPVTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataBinaryLightingOutputRelinquishDefault { _result := &_BACnetConstructedDataBinaryLightingOutputRelinquishDefault{ - RelinquishDefault: relinquishDefault, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + RelinquishDefault: relinquishDefault, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataBinaryLightingOutputRelinquishDefault(relinquishDef // Deprecated: use the interface for direct cast func CastBACnetConstructedDataBinaryLightingOutputRelinquishDefault(structType interface{}) BACnetConstructedDataBinaryLightingOutputRelinquishDefault { - if casted, ok := structType.(BACnetConstructedDataBinaryLightingOutputRelinquishDefault); ok { + if casted, ok := structType.(BACnetConstructedDataBinaryLightingOutputRelinquishDefault); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataBinaryLightingOutputRelinquishDefault); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataBinaryLightingOutputRelinquishDefault) GetLengthI return lengthInBits } + func (m *_BACnetConstructedDataBinaryLightingOutputRelinquishDefault) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataBinaryLightingOutputRelinquishDefaultParseWithBuffer(c if pullErr := readBuffer.PullContext("relinquishDefault"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for relinquishDefault") } - _relinquishDefault, _relinquishDefaultErr := BACnetBinaryLightingPVTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_relinquishDefault, _relinquishDefaultErr := BACnetBinaryLightingPVTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _relinquishDefaultErr != nil { return nil, errors.Wrap(_relinquishDefaultErr, "Error parsing 'relinquishDefault' field of BACnetConstructedDataBinaryLightingOutputRelinquishDefault") } @@ -186,7 +188,7 @@ func BACnetConstructedDataBinaryLightingOutputRelinquishDefaultParseWithBuffer(c // Create a partially initialized instance _child := &_BACnetConstructedDataBinaryLightingOutputRelinquishDefault{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, RelinquishDefault: relinquishDefault, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataBinaryLightingOutputRelinquishDefault) SerializeW return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataBinaryLightingOutputRelinquishDefault") } - // Simple Field (relinquishDefault) - if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for relinquishDefault") - } - _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) - if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { - return errors.Wrap(popErr, "Error popping for relinquishDefault") - } - if _relinquishDefaultErr != nil { - return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (relinquishDefault) + if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for relinquishDefault") + } + _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) + if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { + return errors.Wrap(popErr, "Error popping for relinquishDefault") + } + if _relinquishDefaultErr != nil { + return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataBinaryLightingOutputRelinquishDefault"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataBinaryLightingOutputRelinquishDefault") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataBinaryLightingOutputRelinquishDefault) SerializeW return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataBinaryLightingOutputRelinquishDefault) isBACnetConstructedDataBinaryLightingOutputRelinquishDefault() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataBinaryLightingOutputRelinquishDefault) String() s } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryOutputAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryOutputAll.go index 07150b38ad3..1a99455ad4b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryOutputAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryOutputAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataBinaryOutputAll is the corresponding interface of BACnetConstructedDataBinaryOutputAll type BACnetConstructedDataBinaryOutputAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataBinaryOutputAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataBinaryOutputAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_BINARY_OUTPUT -} +func (m *_BACnetConstructedDataBinaryOutputAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_BINARY_OUTPUT} -func (m *_BACnetConstructedDataBinaryOutputAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataBinaryOutputAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataBinaryOutputAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataBinaryOutputAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataBinaryOutputAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataBinaryOutputAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataBinaryOutputAll factory function for _BACnetConstructedDataBinaryOutputAll -func NewBACnetConstructedDataBinaryOutputAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataBinaryOutputAll { +func NewBACnetConstructedDataBinaryOutputAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataBinaryOutputAll { _result := &_BACnetConstructedDataBinaryOutputAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataBinaryOutputAll(openingTag BACnetOpeningTag, peeked // Deprecated: use the interface for direct cast func CastBACnetConstructedDataBinaryOutputAll(structType interface{}) BACnetConstructedDataBinaryOutputAll { - if casted, ok := structType.(BACnetConstructedDataBinaryOutputAll); ok { + if casted, ok := structType.(BACnetConstructedDataBinaryOutputAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataBinaryOutputAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataBinaryOutputAll) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetConstructedDataBinaryOutputAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataBinaryOutputAllParseWithBuffer(ctx context.Context, re _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataBinaryOutputAllParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetConstructedDataBinaryOutputAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataBinaryOutputAll) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataBinaryOutputAll) isBACnetConstructedDataBinaryOutputAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataBinaryOutputAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryOutputFeedbackValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryOutputFeedbackValue.go index 1e5e9bd725a..39ef68e0629 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryOutputFeedbackValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryOutputFeedbackValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataBinaryOutputFeedbackValue is the corresponding interface of BACnetConstructedDataBinaryOutputFeedbackValue type BACnetConstructedDataBinaryOutputFeedbackValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataBinaryOutputFeedbackValueExactly interface { // _BACnetConstructedDataBinaryOutputFeedbackValue is the data-structure of this message type _BACnetConstructedDataBinaryOutputFeedbackValue struct { *_BACnetConstructedData - FeedbackValue BACnetBinaryPVTagged + FeedbackValue BACnetBinaryPVTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataBinaryOutputFeedbackValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_BINARY_OUTPUT -} +func (m *_BACnetConstructedDataBinaryOutputFeedbackValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_BINARY_OUTPUT} -func (m *_BACnetConstructedDataBinaryOutputFeedbackValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FEEDBACK_VALUE -} +func (m *_BACnetConstructedDataBinaryOutputFeedbackValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FEEDBACK_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataBinaryOutputFeedbackValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataBinaryOutputFeedbackValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataBinaryOutputFeedbackValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataBinaryOutputFeedbackValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataBinaryOutputFeedbackValue) GetActualValue() BACne /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataBinaryOutputFeedbackValue factory function for _BACnetConstructedDataBinaryOutputFeedbackValue -func NewBACnetConstructedDataBinaryOutputFeedbackValue(feedbackValue BACnetBinaryPVTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataBinaryOutputFeedbackValue { +func NewBACnetConstructedDataBinaryOutputFeedbackValue( feedbackValue BACnetBinaryPVTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataBinaryOutputFeedbackValue { _result := &_BACnetConstructedDataBinaryOutputFeedbackValue{ - FeedbackValue: feedbackValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + FeedbackValue: feedbackValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataBinaryOutputFeedbackValue(feedbackValue BACnetBinar // Deprecated: use the interface for direct cast func CastBACnetConstructedDataBinaryOutputFeedbackValue(structType interface{}) BACnetConstructedDataBinaryOutputFeedbackValue { - if casted, ok := structType.(BACnetConstructedDataBinaryOutputFeedbackValue); ok { + if casted, ok := structType.(BACnetConstructedDataBinaryOutputFeedbackValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataBinaryOutputFeedbackValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataBinaryOutputFeedbackValue) GetLengthInBits(ctx co return lengthInBits } + func (m *_BACnetConstructedDataBinaryOutputFeedbackValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataBinaryOutputFeedbackValueParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("feedbackValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for feedbackValue") } - _feedbackValue, _feedbackValueErr := BACnetBinaryPVTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_feedbackValue, _feedbackValueErr := BACnetBinaryPVTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _feedbackValueErr != nil { return nil, errors.Wrap(_feedbackValueErr, "Error parsing 'feedbackValue' field of BACnetConstructedDataBinaryOutputFeedbackValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataBinaryOutputFeedbackValueParseWithBuffer(ctx context.C // Create a partially initialized instance _child := &_BACnetConstructedDataBinaryOutputFeedbackValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FeedbackValue: feedbackValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataBinaryOutputFeedbackValue) SerializeWithWriteBuff return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataBinaryOutputFeedbackValue") } - // Simple Field (feedbackValue) - if pushErr := writeBuffer.PushContext("feedbackValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for feedbackValue") - } - _feedbackValueErr := writeBuffer.WriteSerializable(ctx, m.GetFeedbackValue()) - if popErr := writeBuffer.PopContext("feedbackValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for feedbackValue") - } - if _feedbackValueErr != nil { - return errors.Wrap(_feedbackValueErr, "Error serializing 'feedbackValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (feedbackValue) + if pushErr := writeBuffer.PushContext("feedbackValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for feedbackValue") + } + _feedbackValueErr := writeBuffer.WriteSerializable(ctx, m.GetFeedbackValue()) + if popErr := writeBuffer.PopContext("feedbackValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for feedbackValue") + } + if _feedbackValueErr != nil { + return errors.Wrap(_feedbackValueErr, "Error serializing 'feedbackValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataBinaryOutputFeedbackValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataBinaryOutputFeedbackValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataBinaryOutputFeedbackValue) SerializeWithWriteBuff return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataBinaryOutputFeedbackValue) isBACnetConstructedDataBinaryOutputFeedbackValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataBinaryOutputFeedbackValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryOutputInterfaceValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryOutputInterfaceValue.go index 428f7ca6db4..dc2760b18df 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryOutputInterfaceValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryOutputInterfaceValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataBinaryOutputInterfaceValue is the corresponding interface of BACnetConstructedDataBinaryOutputInterfaceValue type BACnetConstructedDataBinaryOutputInterfaceValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataBinaryOutputInterfaceValueExactly interface { // _BACnetConstructedDataBinaryOutputInterfaceValue is the data-structure of this message type _BACnetConstructedDataBinaryOutputInterfaceValue struct { *_BACnetConstructedData - InterfaceValue BACnetOptionalBinaryPV + InterfaceValue BACnetOptionalBinaryPV } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataBinaryOutputInterfaceValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_BINARY_OUTPUT -} +func (m *_BACnetConstructedDataBinaryOutputInterfaceValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_BINARY_OUTPUT} -func (m *_BACnetConstructedDataBinaryOutputInterfaceValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_INTERFACE_VALUE -} +func (m *_BACnetConstructedDataBinaryOutputInterfaceValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_INTERFACE_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataBinaryOutputInterfaceValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataBinaryOutputInterfaceValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataBinaryOutputInterfaceValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataBinaryOutputInterfaceValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataBinaryOutputInterfaceValue) GetActualValue() BACn /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataBinaryOutputInterfaceValue factory function for _BACnetConstructedDataBinaryOutputInterfaceValue -func NewBACnetConstructedDataBinaryOutputInterfaceValue(interfaceValue BACnetOptionalBinaryPV, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataBinaryOutputInterfaceValue { +func NewBACnetConstructedDataBinaryOutputInterfaceValue( interfaceValue BACnetOptionalBinaryPV , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataBinaryOutputInterfaceValue { _result := &_BACnetConstructedDataBinaryOutputInterfaceValue{ - InterfaceValue: interfaceValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + InterfaceValue: interfaceValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataBinaryOutputInterfaceValue(interfaceValue BACnetOpt // Deprecated: use the interface for direct cast func CastBACnetConstructedDataBinaryOutputInterfaceValue(structType interface{}) BACnetConstructedDataBinaryOutputInterfaceValue { - if casted, ok := structType.(BACnetConstructedDataBinaryOutputInterfaceValue); ok { + if casted, ok := structType.(BACnetConstructedDataBinaryOutputInterfaceValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataBinaryOutputInterfaceValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataBinaryOutputInterfaceValue) GetLengthInBits(ctx c return lengthInBits } + func (m *_BACnetConstructedDataBinaryOutputInterfaceValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataBinaryOutputInterfaceValueParseWithBuffer(ctx context. if pullErr := readBuffer.PullContext("interfaceValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for interfaceValue") } - _interfaceValue, _interfaceValueErr := BACnetOptionalBinaryPVParseWithBuffer(ctx, readBuffer) +_interfaceValue, _interfaceValueErr := BACnetOptionalBinaryPVParseWithBuffer(ctx, readBuffer) if _interfaceValueErr != nil { return nil, errors.Wrap(_interfaceValueErr, "Error parsing 'interfaceValue' field of BACnetConstructedDataBinaryOutputInterfaceValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataBinaryOutputInterfaceValueParseWithBuffer(ctx context. // Create a partially initialized instance _child := &_BACnetConstructedDataBinaryOutputInterfaceValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, InterfaceValue: interfaceValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataBinaryOutputInterfaceValue) SerializeWithWriteBuf return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataBinaryOutputInterfaceValue") } - // Simple Field (interfaceValue) - if pushErr := writeBuffer.PushContext("interfaceValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for interfaceValue") - } - _interfaceValueErr := writeBuffer.WriteSerializable(ctx, m.GetInterfaceValue()) - if popErr := writeBuffer.PopContext("interfaceValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for interfaceValue") - } - if _interfaceValueErr != nil { - return errors.Wrap(_interfaceValueErr, "Error serializing 'interfaceValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (interfaceValue) + if pushErr := writeBuffer.PushContext("interfaceValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for interfaceValue") + } + _interfaceValueErr := writeBuffer.WriteSerializable(ctx, m.GetInterfaceValue()) + if popErr := writeBuffer.PopContext("interfaceValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for interfaceValue") + } + if _interfaceValueErr != nil { + return errors.Wrap(_interfaceValueErr, "Error serializing 'interfaceValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataBinaryOutputInterfaceValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataBinaryOutputInterfaceValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataBinaryOutputInterfaceValue) SerializeWithWriteBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataBinaryOutputInterfaceValue) isBACnetConstructedDataBinaryOutputInterfaceValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataBinaryOutputInterfaceValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryOutputPresentValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryOutputPresentValue.go index 49baf239144..c1ad68abccb 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryOutputPresentValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryOutputPresentValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataBinaryOutputPresentValue is the corresponding interface of BACnetConstructedDataBinaryOutputPresentValue type BACnetConstructedDataBinaryOutputPresentValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataBinaryOutputPresentValueExactly interface { // _BACnetConstructedDataBinaryOutputPresentValue is the data-structure of this message type _BACnetConstructedDataBinaryOutputPresentValue struct { *_BACnetConstructedData - PresentValue BACnetBinaryPVTagged + PresentValue BACnetBinaryPVTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataBinaryOutputPresentValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_BINARY_OUTPUT -} +func (m *_BACnetConstructedDataBinaryOutputPresentValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_BINARY_OUTPUT} -func (m *_BACnetConstructedDataBinaryOutputPresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PRESENT_VALUE -} +func (m *_BACnetConstructedDataBinaryOutputPresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PRESENT_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataBinaryOutputPresentValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataBinaryOutputPresentValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataBinaryOutputPresentValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataBinaryOutputPresentValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataBinaryOutputPresentValue) GetActualValue() BACnet /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataBinaryOutputPresentValue factory function for _BACnetConstructedDataBinaryOutputPresentValue -func NewBACnetConstructedDataBinaryOutputPresentValue(presentValue BACnetBinaryPVTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataBinaryOutputPresentValue { +func NewBACnetConstructedDataBinaryOutputPresentValue( presentValue BACnetBinaryPVTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataBinaryOutputPresentValue { _result := &_BACnetConstructedDataBinaryOutputPresentValue{ - PresentValue: presentValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PresentValue: presentValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataBinaryOutputPresentValue(presentValue BACnetBinaryP // Deprecated: use the interface for direct cast func CastBACnetConstructedDataBinaryOutputPresentValue(structType interface{}) BACnetConstructedDataBinaryOutputPresentValue { - if casted, ok := structType.(BACnetConstructedDataBinaryOutputPresentValue); ok { + if casted, ok := structType.(BACnetConstructedDataBinaryOutputPresentValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataBinaryOutputPresentValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataBinaryOutputPresentValue) GetLengthInBits(ctx con return lengthInBits } + func (m *_BACnetConstructedDataBinaryOutputPresentValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataBinaryOutputPresentValueParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("presentValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for presentValue") } - _presentValue, _presentValueErr := BACnetBinaryPVTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_presentValue, _presentValueErr := BACnetBinaryPVTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _presentValueErr != nil { return nil, errors.Wrap(_presentValueErr, "Error parsing 'presentValue' field of BACnetConstructedDataBinaryOutputPresentValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataBinaryOutputPresentValueParseWithBuffer(ctx context.Co // Create a partially initialized instance _child := &_BACnetConstructedDataBinaryOutputPresentValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PresentValue: presentValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataBinaryOutputPresentValue) SerializeWithWriteBuffe return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataBinaryOutputPresentValue") } - // Simple Field (presentValue) - if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for presentValue") - } - _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) - if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for presentValue") - } - if _presentValueErr != nil { - return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (presentValue) + if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for presentValue") + } + _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) + if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for presentValue") + } + if _presentValueErr != nil { + return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataBinaryOutputPresentValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataBinaryOutputPresentValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataBinaryOutputPresentValue) SerializeWithWriteBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataBinaryOutputPresentValue) isBACnetConstructedDataBinaryOutputPresentValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataBinaryOutputPresentValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryOutputRelinquishDefault.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryOutputRelinquishDefault.go index a761c9c5d15..33270db8c29 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryOutputRelinquishDefault.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryOutputRelinquishDefault.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataBinaryOutputRelinquishDefault is the corresponding interface of BACnetConstructedDataBinaryOutputRelinquishDefault type BACnetConstructedDataBinaryOutputRelinquishDefault interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataBinaryOutputRelinquishDefaultExactly interface { // _BACnetConstructedDataBinaryOutputRelinquishDefault is the data-structure of this message type _BACnetConstructedDataBinaryOutputRelinquishDefault struct { *_BACnetConstructedData - RelinquishDefault BACnetBinaryPVTagged + RelinquishDefault BACnetBinaryPVTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataBinaryOutputRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_BINARY_OUTPUT -} +func (m *_BACnetConstructedDataBinaryOutputRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_BINARY_OUTPUT} -func (m *_BACnetConstructedDataBinaryOutputRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_RELINQUISH_DEFAULT -} +func (m *_BACnetConstructedDataBinaryOutputRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_RELINQUISH_DEFAULT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataBinaryOutputRelinquishDefault) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataBinaryOutputRelinquishDefault) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataBinaryOutputRelinquishDefault) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataBinaryOutputRelinquishDefault) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataBinaryOutputRelinquishDefault) GetActualValue() B /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataBinaryOutputRelinquishDefault factory function for _BACnetConstructedDataBinaryOutputRelinquishDefault -func NewBACnetConstructedDataBinaryOutputRelinquishDefault(relinquishDefault BACnetBinaryPVTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataBinaryOutputRelinquishDefault { +func NewBACnetConstructedDataBinaryOutputRelinquishDefault( relinquishDefault BACnetBinaryPVTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataBinaryOutputRelinquishDefault { _result := &_BACnetConstructedDataBinaryOutputRelinquishDefault{ - RelinquishDefault: relinquishDefault, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + RelinquishDefault: relinquishDefault, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataBinaryOutputRelinquishDefault(relinquishDefault BAC // Deprecated: use the interface for direct cast func CastBACnetConstructedDataBinaryOutputRelinquishDefault(structType interface{}) BACnetConstructedDataBinaryOutputRelinquishDefault { - if casted, ok := structType.(BACnetConstructedDataBinaryOutputRelinquishDefault); ok { + if casted, ok := structType.(BACnetConstructedDataBinaryOutputRelinquishDefault); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataBinaryOutputRelinquishDefault); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataBinaryOutputRelinquishDefault) GetLengthInBits(ct return lengthInBits } + func (m *_BACnetConstructedDataBinaryOutputRelinquishDefault) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataBinaryOutputRelinquishDefaultParseWithBuffer(ctx conte if pullErr := readBuffer.PullContext("relinquishDefault"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for relinquishDefault") } - _relinquishDefault, _relinquishDefaultErr := BACnetBinaryPVTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_relinquishDefault, _relinquishDefaultErr := BACnetBinaryPVTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _relinquishDefaultErr != nil { return nil, errors.Wrap(_relinquishDefaultErr, "Error parsing 'relinquishDefault' field of BACnetConstructedDataBinaryOutputRelinquishDefault") } @@ -186,7 +188,7 @@ func BACnetConstructedDataBinaryOutputRelinquishDefaultParseWithBuffer(ctx conte // Create a partially initialized instance _child := &_BACnetConstructedDataBinaryOutputRelinquishDefault{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, RelinquishDefault: relinquishDefault, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataBinaryOutputRelinquishDefault) SerializeWithWrite return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataBinaryOutputRelinquishDefault") } - // Simple Field (relinquishDefault) - if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for relinquishDefault") - } - _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) - if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { - return errors.Wrap(popErr, "Error popping for relinquishDefault") - } - if _relinquishDefaultErr != nil { - return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (relinquishDefault) + if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for relinquishDefault") + } + _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) + if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { + return errors.Wrap(popErr, "Error popping for relinquishDefault") + } + if _relinquishDefaultErr != nil { + return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataBinaryOutputRelinquishDefault"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataBinaryOutputRelinquishDefault") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataBinaryOutputRelinquishDefault) SerializeWithWrite return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataBinaryOutputRelinquishDefault) isBACnetConstructedDataBinaryOutputRelinquishDefault() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataBinaryOutputRelinquishDefault) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryValueAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryValueAll.go index a3855365216..79267277297 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryValueAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryValueAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataBinaryValueAll is the corresponding interface of BACnetConstructedDataBinaryValueAll type BACnetConstructedDataBinaryValueAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataBinaryValueAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataBinaryValueAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_BINARY_VALUE -} +func (m *_BACnetConstructedDataBinaryValueAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_BINARY_VALUE} -func (m *_BACnetConstructedDataBinaryValueAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataBinaryValueAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataBinaryValueAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataBinaryValueAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataBinaryValueAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataBinaryValueAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataBinaryValueAll factory function for _BACnetConstructedDataBinaryValueAll -func NewBACnetConstructedDataBinaryValueAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataBinaryValueAll { +func NewBACnetConstructedDataBinaryValueAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataBinaryValueAll { _result := &_BACnetConstructedDataBinaryValueAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataBinaryValueAll(openingTag BACnetOpeningTag, peekedT // Deprecated: use the interface for direct cast func CastBACnetConstructedDataBinaryValueAll(structType interface{}) BACnetConstructedDataBinaryValueAll { - if casted, ok := structType.(BACnetConstructedDataBinaryValueAll); ok { + if casted, ok := structType.(BACnetConstructedDataBinaryValueAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataBinaryValueAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataBinaryValueAll) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConstructedDataBinaryValueAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataBinaryValueAllParseWithBuffer(ctx context.Context, rea _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataBinaryValueAllParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetConstructedDataBinaryValueAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataBinaryValueAll) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataBinaryValueAll) isBACnetConstructedDataBinaryValueAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataBinaryValueAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryValuePresentValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryValuePresentValue.go index f05ea714290..0a8e7a54e6b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryValuePresentValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryValuePresentValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataBinaryValuePresentValue is the corresponding interface of BACnetConstructedDataBinaryValuePresentValue type BACnetConstructedDataBinaryValuePresentValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataBinaryValuePresentValueExactly interface { // _BACnetConstructedDataBinaryValuePresentValue is the data-structure of this message type _BACnetConstructedDataBinaryValuePresentValue struct { *_BACnetConstructedData - PresentValue BACnetBinaryPVTagged + PresentValue BACnetBinaryPVTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataBinaryValuePresentValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_BINARY_VALUE -} +func (m *_BACnetConstructedDataBinaryValuePresentValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_BINARY_VALUE} -func (m *_BACnetConstructedDataBinaryValuePresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PRESENT_VALUE -} +func (m *_BACnetConstructedDataBinaryValuePresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PRESENT_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataBinaryValuePresentValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataBinaryValuePresentValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataBinaryValuePresentValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataBinaryValuePresentValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataBinaryValuePresentValue) GetActualValue() BACnetB /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataBinaryValuePresentValue factory function for _BACnetConstructedDataBinaryValuePresentValue -func NewBACnetConstructedDataBinaryValuePresentValue(presentValue BACnetBinaryPVTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataBinaryValuePresentValue { +func NewBACnetConstructedDataBinaryValuePresentValue( presentValue BACnetBinaryPVTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataBinaryValuePresentValue { _result := &_BACnetConstructedDataBinaryValuePresentValue{ - PresentValue: presentValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PresentValue: presentValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataBinaryValuePresentValue(presentValue BACnetBinaryPV // Deprecated: use the interface for direct cast func CastBACnetConstructedDataBinaryValuePresentValue(structType interface{}) BACnetConstructedDataBinaryValuePresentValue { - if casted, ok := structType.(BACnetConstructedDataBinaryValuePresentValue); ok { + if casted, ok := structType.(BACnetConstructedDataBinaryValuePresentValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataBinaryValuePresentValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataBinaryValuePresentValue) GetLengthInBits(ctx cont return lengthInBits } + func (m *_BACnetConstructedDataBinaryValuePresentValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataBinaryValuePresentValueParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("presentValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for presentValue") } - _presentValue, _presentValueErr := BACnetBinaryPVTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_presentValue, _presentValueErr := BACnetBinaryPVTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _presentValueErr != nil { return nil, errors.Wrap(_presentValueErr, "Error parsing 'presentValue' field of BACnetConstructedDataBinaryValuePresentValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataBinaryValuePresentValueParseWithBuffer(ctx context.Con // Create a partially initialized instance _child := &_BACnetConstructedDataBinaryValuePresentValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PresentValue: presentValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataBinaryValuePresentValue) SerializeWithWriteBuffer return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataBinaryValuePresentValue") } - // Simple Field (presentValue) - if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for presentValue") - } - _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) - if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for presentValue") - } - if _presentValueErr != nil { - return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (presentValue) + if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for presentValue") + } + _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) + if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for presentValue") + } + if _presentValueErr != nil { + return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataBinaryValuePresentValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataBinaryValuePresentValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataBinaryValuePresentValue) SerializeWithWriteBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataBinaryValuePresentValue) isBACnetConstructedDataBinaryValuePresentValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataBinaryValuePresentValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryValueRelinquishDefault.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryValueRelinquishDefault.go index 776d0e7fca2..a65b4d50f29 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryValueRelinquishDefault.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBinaryValueRelinquishDefault.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataBinaryValueRelinquishDefault is the corresponding interface of BACnetConstructedDataBinaryValueRelinquishDefault type BACnetConstructedDataBinaryValueRelinquishDefault interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataBinaryValueRelinquishDefaultExactly interface { // _BACnetConstructedDataBinaryValueRelinquishDefault is the data-structure of this message type _BACnetConstructedDataBinaryValueRelinquishDefault struct { *_BACnetConstructedData - RelinquishDefault BACnetBinaryPVTagged + RelinquishDefault BACnetBinaryPVTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataBinaryValueRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_BINARY_VALUE -} +func (m *_BACnetConstructedDataBinaryValueRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_BINARY_VALUE} -func (m *_BACnetConstructedDataBinaryValueRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_RELINQUISH_DEFAULT -} +func (m *_BACnetConstructedDataBinaryValueRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_RELINQUISH_DEFAULT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataBinaryValueRelinquishDefault) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataBinaryValueRelinquishDefault) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataBinaryValueRelinquishDefault) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataBinaryValueRelinquishDefault) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataBinaryValueRelinquishDefault) GetActualValue() BA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataBinaryValueRelinquishDefault factory function for _BACnetConstructedDataBinaryValueRelinquishDefault -func NewBACnetConstructedDataBinaryValueRelinquishDefault(relinquishDefault BACnetBinaryPVTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataBinaryValueRelinquishDefault { +func NewBACnetConstructedDataBinaryValueRelinquishDefault( relinquishDefault BACnetBinaryPVTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataBinaryValueRelinquishDefault { _result := &_BACnetConstructedDataBinaryValueRelinquishDefault{ - RelinquishDefault: relinquishDefault, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + RelinquishDefault: relinquishDefault, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataBinaryValueRelinquishDefault(relinquishDefault BACn // Deprecated: use the interface for direct cast func CastBACnetConstructedDataBinaryValueRelinquishDefault(structType interface{}) BACnetConstructedDataBinaryValueRelinquishDefault { - if casted, ok := structType.(BACnetConstructedDataBinaryValueRelinquishDefault); ok { + if casted, ok := structType.(BACnetConstructedDataBinaryValueRelinquishDefault); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataBinaryValueRelinquishDefault); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataBinaryValueRelinquishDefault) GetLengthInBits(ctx return lengthInBits } + func (m *_BACnetConstructedDataBinaryValueRelinquishDefault) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataBinaryValueRelinquishDefaultParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("relinquishDefault"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for relinquishDefault") } - _relinquishDefault, _relinquishDefaultErr := BACnetBinaryPVTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_relinquishDefault, _relinquishDefaultErr := BACnetBinaryPVTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _relinquishDefaultErr != nil { return nil, errors.Wrap(_relinquishDefaultErr, "Error parsing 'relinquishDefault' field of BACnetConstructedDataBinaryValueRelinquishDefault") } @@ -186,7 +188,7 @@ func BACnetConstructedDataBinaryValueRelinquishDefaultParseWithBuffer(ctx contex // Create a partially initialized instance _child := &_BACnetConstructedDataBinaryValueRelinquishDefault{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, RelinquishDefault: relinquishDefault, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataBinaryValueRelinquishDefault) SerializeWithWriteB return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataBinaryValueRelinquishDefault") } - // Simple Field (relinquishDefault) - if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for relinquishDefault") - } - _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) - if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { - return errors.Wrap(popErr, "Error popping for relinquishDefault") - } - if _relinquishDefaultErr != nil { - return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (relinquishDefault) + if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for relinquishDefault") + } + _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) + if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { + return errors.Wrap(popErr, "Error popping for relinquishDefault") + } + if _relinquishDefaultErr != nil { + return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataBinaryValueRelinquishDefault"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataBinaryValueRelinquishDefault") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataBinaryValueRelinquishDefault) SerializeWithWriteB return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataBinaryValueRelinquishDefault) isBACnetConstructedDataBinaryValueRelinquishDefault() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataBinaryValueRelinquishDefault) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBitMask.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBitMask.go index 8e8590c1a01..69979adb9a6 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBitMask.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBitMask.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataBitMask is the corresponding interface of BACnetConstructedDataBitMask type BACnetConstructedDataBitMask interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataBitMaskExactly interface { // _BACnetConstructedDataBitMask is the data-structure of this message type _BACnetConstructedDataBitMask struct { *_BACnetConstructedData - BitString BACnetApplicationTagBitString + BitString BACnetApplicationTagBitString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataBitMask) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataBitMask) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataBitMask) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_BIT_MASK -} +func (m *_BACnetConstructedDataBitMask) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_BIT_MASK} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataBitMask) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataBitMask) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataBitMask) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataBitMask) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataBitMask) GetActualValue() BACnetApplicationTagBit /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataBitMask factory function for _BACnetConstructedDataBitMask -func NewBACnetConstructedDataBitMask(bitString BACnetApplicationTagBitString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataBitMask { +func NewBACnetConstructedDataBitMask( bitString BACnetApplicationTagBitString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataBitMask { _result := &_BACnetConstructedDataBitMask{ - BitString: bitString, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + BitString: bitString, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataBitMask(bitString BACnetApplicationTagBitString, op // Deprecated: use the interface for direct cast func CastBACnetConstructedDataBitMask(structType interface{}) BACnetConstructedDataBitMask { - if casted, ok := structType.(BACnetConstructedDataBitMask); ok { + if casted, ok := structType.(BACnetConstructedDataBitMask); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataBitMask); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataBitMask) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_BACnetConstructedDataBitMask) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataBitMaskParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("bitString"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for bitString") } - _bitString, _bitStringErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_bitString, _bitStringErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _bitStringErr != nil { return nil, errors.Wrap(_bitStringErr, "Error parsing 'bitString' field of BACnetConstructedDataBitMask") } @@ -186,7 +188,7 @@ func BACnetConstructedDataBitMaskParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_BACnetConstructedDataBitMask{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, BitString: bitString, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataBitMask) SerializeWithWriteBuffer(ctx context.Con return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataBitMask") } - // Simple Field (bitString) - if pushErr := writeBuffer.PushContext("bitString"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for bitString") - } - _bitStringErr := writeBuffer.WriteSerializable(ctx, m.GetBitString()) - if popErr := writeBuffer.PopContext("bitString"); popErr != nil { - return errors.Wrap(popErr, "Error popping for bitString") - } - if _bitStringErr != nil { - return errors.Wrap(_bitStringErr, "Error serializing 'bitString' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (bitString) + if pushErr := writeBuffer.PushContext("bitString"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for bitString") + } + _bitStringErr := writeBuffer.WriteSerializable(ctx, m.GetBitString()) + if popErr := writeBuffer.PopContext("bitString"); popErr != nil { + return errors.Wrap(popErr, "Error popping for bitString") + } + if _bitStringErr != nil { + return errors.Wrap(_bitStringErr, "Error serializing 'bitString' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataBitMask"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataBitMask") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataBitMask) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataBitMask) isBACnetConstructedDataBitMask() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataBitMask) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBitStringValueAlarmValues.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBitStringValueAlarmValues.go index 2f1ea4959e0..7e28227d824 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBitStringValueAlarmValues.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBitStringValueAlarmValues.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataBitStringValueAlarmValues is the corresponding interface of BACnetConstructedDataBitStringValueAlarmValues type BACnetConstructedDataBitStringValueAlarmValues interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataBitStringValueAlarmValuesExactly interface { // _BACnetConstructedDataBitStringValueAlarmValues is the data-structure of this message type _BACnetConstructedDataBitStringValueAlarmValues struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - AlarmValues []BACnetApplicationTagBitString + NumberOfDataElements BACnetApplicationTagUnsignedInteger + AlarmValues []BACnetApplicationTagBitString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataBitStringValueAlarmValues) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_BITSTRING_VALUE -} +func (m *_BACnetConstructedDataBitStringValueAlarmValues) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_BITSTRING_VALUE} -func (m *_BACnetConstructedDataBitStringValueAlarmValues) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALARM_VALUES -} +func (m *_BACnetConstructedDataBitStringValueAlarmValues) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALARM_VALUES} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataBitStringValueAlarmValues) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataBitStringValueAlarmValues) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataBitStringValueAlarmValues) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataBitStringValueAlarmValues) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataBitStringValueAlarmValues) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataBitStringValueAlarmValues factory function for _BACnetConstructedDataBitStringValueAlarmValues -func NewBACnetConstructedDataBitStringValueAlarmValues(numberOfDataElements BACnetApplicationTagUnsignedInteger, alarmValues []BACnetApplicationTagBitString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataBitStringValueAlarmValues { +func NewBACnetConstructedDataBitStringValueAlarmValues( numberOfDataElements BACnetApplicationTagUnsignedInteger , alarmValues []BACnetApplicationTagBitString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataBitStringValueAlarmValues { _result := &_BACnetConstructedDataBitStringValueAlarmValues{ - NumberOfDataElements: numberOfDataElements, - AlarmValues: alarmValues, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + AlarmValues: alarmValues, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataBitStringValueAlarmValues(numberOfDataElements BACn // Deprecated: use the interface for direct cast func CastBACnetConstructedDataBitStringValueAlarmValues(structType interface{}) BACnetConstructedDataBitStringValueAlarmValues { - if casted, ok := structType.(BACnetConstructedDataBitStringValueAlarmValues); ok { + if casted, ok := structType.(BACnetConstructedDataBitStringValueAlarmValues); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataBitStringValueAlarmValues); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataBitStringValueAlarmValues) GetLengthInBits(ctx co return lengthInBits } + func (m *_BACnetConstructedDataBitStringValueAlarmValues) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataBitStringValueAlarmValuesParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataBitStringValueAlarmValuesParseWithBuffer(ctx context.C // Terminated array var alarmValues []BACnetApplicationTagBitString { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'alarmValues' field of BACnetConstructedDataBitStringValueAlarmValues") } @@ -235,11 +237,11 @@ func BACnetConstructedDataBitStringValueAlarmValuesParseWithBuffer(ctx context.C // Create a partially initialized instance _child := &_BACnetConstructedDataBitStringValueAlarmValues{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - AlarmValues: alarmValues, + AlarmValues: alarmValues, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataBitStringValueAlarmValues) SerializeWithWriteBuff if pushErr := writeBuffer.PushContext("BACnetConstructedDataBitStringValueAlarmValues"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataBitStringValueAlarmValues") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (alarmValues) - if pushErr := writeBuffer.PushContext("alarmValues", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for alarmValues") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetAlarmValues() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAlarmValues()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'alarmValues' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("alarmValues", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for alarmValues") + } + + // Array Field (alarmValues) + if pushErr := writeBuffer.PushContext("alarmValues", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for alarmValues") + } + for _curItem, _element := range m.GetAlarmValues() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAlarmValues()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'alarmValues' field") } + } + if popErr := writeBuffer.PopContext("alarmValues", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for alarmValues") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataBitStringValueAlarmValues"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataBitStringValueAlarmValues") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataBitStringValueAlarmValues) SerializeWithWriteBuff return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataBitStringValueAlarmValues) isBACnetConstructedDataBitStringValueAlarmValues() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataBitStringValueAlarmValues) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBitStringValuePresentValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBitStringValuePresentValue.go index 06b1c7271a4..0191e1be0f6 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBitStringValuePresentValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBitStringValuePresentValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataBitStringValuePresentValue is the corresponding interface of BACnetConstructedDataBitStringValuePresentValue type BACnetConstructedDataBitStringValuePresentValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataBitStringValuePresentValueExactly interface { // _BACnetConstructedDataBitStringValuePresentValue is the data-structure of this message type _BACnetConstructedDataBitStringValuePresentValue struct { *_BACnetConstructedData - PresentValue BACnetApplicationTagBitString + PresentValue BACnetApplicationTagBitString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataBitStringValuePresentValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_BITSTRING_VALUE -} +func (m *_BACnetConstructedDataBitStringValuePresentValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_BITSTRING_VALUE} -func (m *_BACnetConstructedDataBitStringValuePresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PRESENT_VALUE -} +func (m *_BACnetConstructedDataBitStringValuePresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PRESENT_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataBitStringValuePresentValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataBitStringValuePresentValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataBitStringValuePresentValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataBitStringValuePresentValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataBitStringValuePresentValue) GetActualValue() BACn /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataBitStringValuePresentValue factory function for _BACnetConstructedDataBitStringValuePresentValue -func NewBACnetConstructedDataBitStringValuePresentValue(presentValue BACnetApplicationTagBitString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataBitStringValuePresentValue { +func NewBACnetConstructedDataBitStringValuePresentValue( presentValue BACnetApplicationTagBitString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataBitStringValuePresentValue { _result := &_BACnetConstructedDataBitStringValuePresentValue{ - PresentValue: presentValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PresentValue: presentValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataBitStringValuePresentValue(presentValue BACnetAppli // Deprecated: use the interface for direct cast func CastBACnetConstructedDataBitStringValuePresentValue(structType interface{}) BACnetConstructedDataBitStringValuePresentValue { - if casted, ok := structType.(BACnetConstructedDataBitStringValuePresentValue); ok { + if casted, ok := structType.(BACnetConstructedDataBitStringValuePresentValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataBitStringValuePresentValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataBitStringValuePresentValue) GetLengthInBits(ctx c return lengthInBits } + func (m *_BACnetConstructedDataBitStringValuePresentValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataBitStringValuePresentValueParseWithBuffer(ctx context. if pullErr := readBuffer.PullContext("presentValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for presentValue") } - _presentValue, _presentValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_presentValue, _presentValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _presentValueErr != nil { return nil, errors.Wrap(_presentValueErr, "Error parsing 'presentValue' field of BACnetConstructedDataBitStringValuePresentValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataBitStringValuePresentValueParseWithBuffer(ctx context. // Create a partially initialized instance _child := &_BACnetConstructedDataBitStringValuePresentValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PresentValue: presentValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataBitStringValuePresentValue) SerializeWithWriteBuf return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataBitStringValuePresentValue") } - // Simple Field (presentValue) - if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for presentValue") - } - _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) - if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for presentValue") - } - if _presentValueErr != nil { - return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (presentValue) + if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for presentValue") + } + _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) + if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for presentValue") + } + if _presentValueErr != nil { + return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataBitStringValuePresentValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataBitStringValuePresentValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataBitStringValuePresentValue) SerializeWithWriteBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataBitStringValuePresentValue) isBACnetConstructedDataBitStringValuePresentValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataBitStringValuePresentValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBitStringValueRelinquishDefault.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBitStringValueRelinquishDefault.go index 4da9b9f52cc..30c444ca95a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBitStringValueRelinquishDefault.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBitStringValueRelinquishDefault.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataBitStringValueRelinquishDefault is the corresponding interface of BACnetConstructedDataBitStringValueRelinquishDefault type BACnetConstructedDataBitStringValueRelinquishDefault interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataBitStringValueRelinquishDefaultExactly interface { // _BACnetConstructedDataBitStringValueRelinquishDefault is the data-structure of this message type _BACnetConstructedDataBitStringValueRelinquishDefault struct { *_BACnetConstructedData - RelinquishDefault BACnetApplicationTagBitString + RelinquishDefault BACnetApplicationTagBitString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataBitStringValueRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_BITSTRING_VALUE -} +func (m *_BACnetConstructedDataBitStringValueRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_BITSTRING_VALUE} -func (m *_BACnetConstructedDataBitStringValueRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_RELINQUISH_DEFAULT -} +func (m *_BACnetConstructedDataBitStringValueRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_RELINQUISH_DEFAULT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataBitStringValueRelinquishDefault) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataBitStringValueRelinquishDefault) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataBitStringValueRelinquishDefault) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataBitStringValueRelinquishDefault) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataBitStringValueRelinquishDefault) GetActualValue() /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataBitStringValueRelinquishDefault factory function for _BACnetConstructedDataBitStringValueRelinquishDefault -func NewBACnetConstructedDataBitStringValueRelinquishDefault(relinquishDefault BACnetApplicationTagBitString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataBitStringValueRelinquishDefault { +func NewBACnetConstructedDataBitStringValueRelinquishDefault( relinquishDefault BACnetApplicationTagBitString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataBitStringValueRelinquishDefault { _result := &_BACnetConstructedDataBitStringValueRelinquishDefault{ - RelinquishDefault: relinquishDefault, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + RelinquishDefault: relinquishDefault, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataBitStringValueRelinquishDefault(relinquishDefault B // Deprecated: use the interface for direct cast func CastBACnetConstructedDataBitStringValueRelinquishDefault(structType interface{}) BACnetConstructedDataBitStringValueRelinquishDefault { - if casted, ok := structType.(BACnetConstructedDataBitStringValueRelinquishDefault); ok { + if casted, ok := structType.(BACnetConstructedDataBitStringValueRelinquishDefault); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataBitStringValueRelinquishDefault); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataBitStringValueRelinquishDefault) GetLengthInBits( return lengthInBits } + func (m *_BACnetConstructedDataBitStringValueRelinquishDefault) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataBitStringValueRelinquishDefaultParseWithBuffer(ctx con if pullErr := readBuffer.PullContext("relinquishDefault"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for relinquishDefault") } - _relinquishDefault, _relinquishDefaultErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_relinquishDefault, _relinquishDefaultErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _relinquishDefaultErr != nil { return nil, errors.Wrap(_relinquishDefaultErr, "Error parsing 'relinquishDefault' field of BACnetConstructedDataBitStringValueRelinquishDefault") } @@ -186,7 +188,7 @@ func BACnetConstructedDataBitStringValueRelinquishDefaultParseWithBuffer(ctx con // Create a partially initialized instance _child := &_BACnetConstructedDataBitStringValueRelinquishDefault{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, RelinquishDefault: relinquishDefault, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataBitStringValueRelinquishDefault) SerializeWithWri return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataBitStringValueRelinquishDefault") } - // Simple Field (relinquishDefault) - if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for relinquishDefault") - } - _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) - if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { - return errors.Wrap(popErr, "Error popping for relinquishDefault") - } - if _relinquishDefaultErr != nil { - return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (relinquishDefault) + if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for relinquishDefault") + } + _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) + if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { + return errors.Wrap(popErr, "Error popping for relinquishDefault") + } + if _relinquishDefaultErr != nil { + return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataBitStringValueRelinquishDefault"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataBitStringValueRelinquishDefault") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataBitStringValueRelinquishDefault) SerializeWithWri return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataBitStringValueRelinquishDefault) isBACnetConstructedDataBitStringValueRelinquishDefault() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataBitStringValueRelinquishDefault) String() string } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBitText.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBitText.go index ffa877ff87f..bd6934eb91e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBitText.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBitText.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataBitText is the corresponding interface of BACnetConstructedDataBitText type BACnetConstructedDataBitText interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataBitTextExactly interface { // _BACnetConstructedDataBitText is the data-structure of this message type _BACnetConstructedDataBitText struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - BitText []BACnetApplicationTagCharacterString + NumberOfDataElements BACnetApplicationTagUnsignedInteger + BitText []BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataBitText) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataBitText) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataBitText) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_BIT_TEXT -} +func (m *_BACnetConstructedDataBitText) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_BIT_TEXT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataBitText) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataBitText) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataBitText) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataBitText) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataBitText) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataBitText factory function for _BACnetConstructedDataBitText -func NewBACnetConstructedDataBitText(numberOfDataElements BACnetApplicationTagUnsignedInteger, bitText []BACnetApplicationTagCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataBitText { +func NewBACnetConstructedDataBitText( numberOfDataElements BACnetApplicationTagUnsignedInteger , bitText []BACnetApplicationTagCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataBitText { _result := &_BACnetConstructedDataBitText{ - NumberOfDataElements: numberOfDataElements, - BitText: bitText, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + BitText: bitText, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataBitText(numberOfDataElements BACnetApplicationTagUn // Deprecated: use the interface for direct cast func CastBACnetConstructedDataBitText(structType interface{}) BACnetConstructedDataBitText { - if casted, ok := structType.(BACnetConstructedDataBitText); ok { + if casted, ok := structType.(BACnetConstructedDataBitText); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataBitText); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataBitText) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_BACnetConstructedDataBitText) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataBitTextParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataBitTextParseWithBuffer(ctx context.Context, readBuffer // Terminated array var bitText []BACnetApplicationTagCharacterString { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'bitText' field of BACnetConstructedDataBitText") } @@ -235,11 +237,11 @@ func BACnetConstructedDataBitTextParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_BACnetConstructedDataBitText{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - BitText: bitText, + BitText: bitText, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataBitText) SerializeWithWriteBuffer(ctx context.Con if pushErr := writeBuffer.PushContext("BACnetConstructedDataBitText"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataBitText") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (bitText) - if pushErr := writeBuffer.PushContext("bitText", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for bitText") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetBitText() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetBitText()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'bitText' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("bitText", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for bitText") + } + + // Array Field (bitText) + if pushErr := writeBuffer.PushContext("bitText", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for bitText") + } + for _curItem, _element := range m.GetBitText() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetBitText()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'bitText' field") } + } + if popErr := writeBuffer.PopContext("bitText", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for bitText") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataBitText"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataBitText") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataBitText) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataBitText) isBACnetConstructedDataBitText() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataBitText) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBitstringValueAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBitstringValueAll.go index c4ddeda9fd0..935c6651b5e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBitstringValueAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBitstringValueAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataBitstringValueAll is the corresponding interface of BACnetConstructedDataBitstringValueAll type BACnetConstructedDataBitstringValueAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataBitstringValueAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataBitstringValueAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_BITSTRING_VALUE -} +func (m *_BACnetConstructedDataBitstringValueAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_BITSTRING_VALUE} -func (m *_BACnetConstructedDataBitstringValueAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataBitstringValueAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataBitstringValueAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataBitstringValueAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataBitstringValueAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataBitstringValueAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataBitstringValueAll factory function for _BACnetConstructedDataBitstringValueAll -func NewBACnetConstructedDataBitstringValueAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataBitstringValueAll { +func NewBACnetConstructedDataBitstringValueAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataBitstringValueAll { _result := &_BACnetConstructedDataBitstringValueAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataBitstringValueAll(openingTag BACnetOpeningTag, peek // Deprecated: use the interface for direct cast func CastBACnetConstructedDataBitstringValueAll(structType interface{}) BACnetConstructedDataBitstringValueAll { - if casted, ok := structType.(BACnetConstructedDataBitstringValueAll); ok { + if casted, ok := structType.(BACnetConstructedDataBitstringValueAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataBitstringValueAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataBitstringValueAll) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetConstructedDataBitstringValueAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataBitstringValueAllParseWithBuffer(ctx context.Context, _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataBitstringValueAllParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataBitstringValueAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataBitstringValueAll) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataBitstringValueAll) isBACnetConstructedDataBitstringValueAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataBitstringValueAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBlinkWarnEnable.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBlinkWarnEnable.go index c78d4b19e62..33656037f4c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBlinkWarnEnable.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBlinkWarnEnable.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataBlinkWarnEnable is the corresponding interface of BACnetConstructedDataBlinkWarnEnable type BACnetConstructedDataBlinkWarnEnable interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataBlinkWarnEnableExactly interface { // _BACnetConstructedDataBlinkWarnEnable is the data-structure of this message type _BACnetConstructedDataBlinkWarnEnable struct { *_BACnetConstructedData - BlinkWarnEnable BACnetApplicationTagBoolean + BlinkWarnEnable BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataBlinkWarnEnable) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataBlinkWarnEnable) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataBlinkWarnEnable) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_BLINK_WARN_ENABLE -} +func (m *_BACnetConstructedDataBlinkWarnEnable) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_BLINK_WARN_ENABLE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataBlinkWarnEnable) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataBlinkWarnEnable) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataBlinkWarnEnable) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataBlinkWarnEnable) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataBlinkWarnEnable) GetActualValue() BACnetApplicati /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataBlinkWarnEnable factory function for _BACnetConstructedDataBlinkWarnEnable -func NewBACnetConstructedDataBlinkWarnEnable(blinkWarnEnable BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataBlinkWarnEnable { +func NewBACnetConstructedDataBlinkWarnEnable( blinkWarnEnable BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataBlinkWarnEnable { _result := &_BACnetConstructedDataBlinkWarnEnable{ - BlinkWarnEnable: blinkWarnEnable, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + BlinkWarnEnable: blinkWarnEnable, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataBlinkWarnEnable(blinkWarnEnable BACnetApplicationTa // Deprecated: use the interface for direct cast func CastBACnetConstructedDataBlinkWarnEnable(structType interface{}) BACnetConstructedDataBlinkWarnEnable { - if casted, ok := structType.(BACnetConstructedDataBlinkWarnEnable); ok { + if casted, ok := structType.(BACnetConstructedDataBlinkWarnEnable); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataBlinkWarnEnable); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataBlinkWarnEnable) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetConstructedDataBlinkWarnEnable) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataBlinkWarnEnableParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("blinkWarnEnable"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for blinkWarnEnable") } - _blinkWarnEnable, _blinkWarnEnableErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_blinkWarnEnable, _blinkWarnEnableErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _blinkWarnEnableErr != nil { return nil, errors.Wrap(_blinkWarnEnableErr, "Error parsing 'blinkWarnEnable' field of BACnetConstructedDataBlinkWarnEnable") } @@ -186,7 +188,7 @@ func BACnetConstructedDataBlinkWarnEnableParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetConstructedDataBlinkWarnEnable{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, BlinkWarnEnable: blinkWarnEnable, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataBlinkWarnEnable) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataBlinkWarnEnable") } - // Simple Field (blinkWarnEnable) - if pushErr := writeBuffer.PushContext("blinkWarnEnable"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for blinkWarnEnable") - } - _blinkWarnEnableErr := writeBuffer.WriteSerializable(ctx, m.GetBlinkWarnEnable()) - if popErr := writeBuffer.PopContext("blinkWarnEnable"); popErr != nil { - return errors.Wrap(popErr, "Error popping for blinkWarnEnable") - } - if _blinkWarnEnableErr != nil { - return errors.Wrap(_blinkWarnEnableErr, "Error serializing 'blinkWarnEnable' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (blinkWarnEnable) + if pushErr := writeBuffer.PushContext("blinkWarnEnable"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for blinkWarnEnable") + } + _blinkWarnEnableErr := writeBuffer.WriteSerializable(ctx, m.GetBlinkWarnEnable()) + if popErr := writeBuffer.PopContext("blinkWarnEnable"); popErr != nil { + return errors.Wrap(popErr, "Error popping for blinkWarnEnable") + } + if _blinkWarnEnableErr != nil { + return errors.Wrap(_blinkWarnEnableErr, "Error serializing 'blinkWarnEnable' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataBlinkWarnEnable"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataBlinkWarnEnable") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataBlinkWarnEnable) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataBlinkWarnEnable) isBACnetConstructedDataBlinkWarnEnable() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataBlinkWarnEnable) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBufferSize.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBufferSize.go index bbfbd0345f4..e1a4ae59600 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBufferSize.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataBufferSize.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataBufferSize is the corresponding interface of BACnetConstructedDataBufferSize type BACnetConstructedDataBufferSize interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataBufferSizeExactly interface { // _BACnetConstructedDataBufferSize is the data-structure of this message type _BACnetConstructedDataBufferSize struct { *_BACnetConstructedData - BufferSize BACnetApplicationTagUnsignedInteger + BufferSize BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataBufferSize) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataBufferSize) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataBufferSize) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_BUFFER_SIZE -} +func (m *_BACnetConstructedDataBufferSize) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_BUFFER_SIZE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataBufferSize) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataBufferSize) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataBufferSize) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataBufferSize) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataBufferSize) GetActualValue() BACnetApplicationTag /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataBufferSize factory function for _BACnetConstructedDataBufferSize -func NewBACnetConstructedDataBufferSize(bufferSize BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataBufferSize { +func NewBACnetConstructedDataBufferSize( bufferSize BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataBufferSize { _result := &_BACnetConstructedDataBufferSize{ - BufferSize: bufferSize, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + BufferSize: bufferSize, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataBufferSize(bufferSize BACnetApplicationTagUnsignedI // Deprecated: use the interface for direct cast func CastBACnetConstructedDataBufferSize(structType interface{}) BACnetConstructedDataBufferSize { - if casted, ok := structType.(BACnetConstructedDataBufferSize); ok { + if casted, ok := structType.(BACnetConstructedDataBufferSize); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataBufferSize); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataBufferSize) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataBufferSize) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataBufferSizeParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("bufferSize"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for bufferSize") } - _bufferSize, _bufferSizeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_bufferSize, _bufferSizeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _bufferSizeErr != nil { return nil, errors.Wrap(_bufferSizeErr, "Error parsing 'bufferSize' field of BACnetConstructedDataBufferSize") } @@ -186,7 +188,7 @@ func BACnetConstructedDataBufferSizeParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetConstructedDataBufferSize{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, BufferSize: bufferSize, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataBufferSize) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataBufferSize") } - // Simple Field (bufferSize) - if pushErr := writeBuffer.PushContext("bufferSize"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for bufferSize") - } - _bufferSizeErr := writeBuffer.WriteSerializable(ctx, m.GetBufferSize()) - if popErr := writeBuffer.PopContext("bufferSize"); popErr != nil { - return errors.Wrap(popErr, "Error popping for bufferSize") - } - if _bufferSizeErr != nil { - return errors.Wrap(_bufferSizeErr, "Error serializing 'bufferSize' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (bufferSize) + if pushErr := writeBuffer.PushContext("bufferSize"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for bufferSize") + } + _bufferSizeErr := writeBuffer.WriteSerializable(ctx, m.GetBufferSize()) + if popErr := writeBuffer.PopContext("bufferSize"); popErr != nil { + return errors.Wrap(popErr, "Error popping for bufferSize") + } + if _bufferSizeErr != nil { + return errors.Wrap(_bufferSizeErr, "Error serializing 'bufferSize' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataBufferSize"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataBufferSize") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataBufferSize) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataBufferSize) isBACnetConstructedDataBufferSize() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataBufferSize) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCOVIncrement.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCOVIncrement.go index 1f85abdd58a..26954bd39b7 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCOVIncrement.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCOVIncrement.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataCOVIncrement is the corresponding interface of BACnetConstructedDataCOVIncrement type BACnetConstructedDataCOVIncrement interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataCOVIncrementExactly interface { // _BACnetConstructedDataCOVIncrement is the data-structure of this message type _BACnetConstructedDataCOVIncrement struct { *_BACnetConstructedData - CovIncrement BACnetApplicationTagReal + CovIncrement BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataCOVIncrement) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataCOVIncrement) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataCOVIncrement) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_COV_INCREMENT -} +func (m *_BACnetConstructedDataCOVIncrement) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_COV_INCREMENT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataCOVIncrement) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataCOVIncrement) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataCOVIncrement) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataCOVIncrement) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataCOVIncrement) GetActualValue() BACnetApplicationT /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataCOVIncrement factory function for _BACnetConstructedDataCOVIncrement -func NewBACnetConstructedDataCOVIncrement(covIncrement BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataCOVIncrement { +func NewBACnetConstructedDataCOVIncrement( covIncrement BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataCOVIncrement { _result := &_BACnetConstructedDataCOVIncrement{ - CovIncrement: covIncrement, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + CovIncrement: covIncrement, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataCOVIncrement(covIncrement BACnetApplicationTagReal, // Deprecated: use the interface for direct cast func CastBACnetConstructedDataCOVIncrement(structType interface{}) BACnetConstructedDataCOVIncrement { - if casted, ok := structType.(BACnetConstructedDataCOVIncrement); ok { + if casted, ok := structType.(BACnetConstructedDataCOVIncrement); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataCOVIncrement); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataCOVIncrement) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetConstructedDataCOVIncrement) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataCOVIncrementParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("covIncrement"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for covIncrement") } - _covIncrement, _covIncrementErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_covIncrement, _covIncrementErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _covIncrementErr != nil { return nil, errors.Wrap(_covIncrementErr, "Error parsing 'covIncrement' field of BACnetConstructedDataCOVIncrement") } @@ -186,7 +188,7 @@ func BACnetConstructedDataCOVIncrementParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetConstructedDataCOVIncrement{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, CovIncrement: covIncrement, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataCOVIncrement) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataCOVIncrement") } - // Simple Field (covIncrement) - if pushErr := writeBuffer.PushContext("covIncrement"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for covIncrement") - } - _covIncrementErr := writeBuffer.WriteSerializable(ctx, m.GetCovIncrement()) - if popErr := writeBuffer.PopContext("covIncrement"); popErr != nil { - return errors.Wrap(popErr, "Error popping for covIncrement") - } - if _covIncrementErr != nil { - return errors.Wrap(_covIncrementErr, "Error serializing 'covIncrement' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (covIncrement) + if pushErr := writeBuffer.PushContext("covIncrement"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for covIncrement") + } + _covIncrementErr := writeBuffer.WriteSerializable(ctx, m.GetCovIncrement()) + if popErr := writeBuffer.PopContext("covIncrement"); popErr != nil { + return errors.Wrap(popErr, "Error popping for covIncrement") + } + if _covIncrementErr != nil { + return errors.Wrap(_covIncrementErr, "Error serializing 'covIncrement' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataCOVIncrement"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataCOVIncrement") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataCOVIncrement) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataCOVIncrement) isBACnetConstructedDataCOVIncrement() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataCOVIncrement) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCOVPeriod.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCOVPeriod.go index bcc94131d57..c2fe049993c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCOVPeriod.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCOVPeriod.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataCOVPeriod is the corresponding interface of BACnetConstructedDataCOVPeriod type BACnetConstructedDataCOVPeriod interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataCOVPeriodExactly interface { // _BACnetConstructedDataCOVPeriod is the data-structure of this message type _BACnetConstructedDataCOVPeriod struct { *_BACnetConstructedData - CovPeriod BACnetApplicationTagUnsignedInteger + CovPeriod BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataCOVPeriod) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataCOVPeriod) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataCOVPeriod) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_COV_PERIOD -} +func (m *_BACnetConstructedDataCOVPeriod) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_COV_PERIOD} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataCOVPeriod) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataCOVPeriod) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataCOVPeriod) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataCOVPeriod) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataCOVPeriod) GetActualValue() BACnetApplicationTagU /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataCOVPeriod factory function for _BACnetConstructedDataCOVPeriod -func NewBACnetConstructedDataCOVPeriod(covPeriod BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataCOVPeriod { +func NewBACnetConstructedDataCOVPeriod( covPeriod BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataCOVPeriod { _result := &_BACnetConstructedDataCOVPeriod{ - CovPeriod: covPeriod, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + CovPeriod: covPeriod, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataCOVPeriod(covPeriod BACnetApplicationTagUnsignedInt // Deprecated: use the interface for direct cast func CastBACnetConstructedDataCOVPeriod(structType interface{}) BACnetConstructedDataCOVPeriod { - if casted, ok := structType.(BACnetConstructedDataCOVPeriod); ok { + if casted, ok := structType.(BACnetConstructedDataCOVPeriod); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataCOVPeriod); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataCOVPeriod) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetConstructedDataCOVPeriod) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataCOVPeriodParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("covPeriod"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for covPeriod") } - _covPeriod, _covPeriodErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_covPeriod, _covPeriodErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _covPeriodErr != nil { return nil, errors.Wrap(_covPeriodErr, "Error parsing 'covPeriod' field of BACnetConstructedDataCOVPeriod") } @@ -186,7 +188,7 @@ func BACnetConstructedDataCOVPeriodParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_BACnetConstructedDataCOVPeriod{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, CovPeriod: covPeriod, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataCOVPeriod) SerializeWithWriteBuffer(ctx context.C return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataCOVPeriod") } - // Simple Field (covPeriod) - if pushErr := writeBuffer.PushContext("covPeriod"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for covPeriod") - } - _covPeriodErr := writeBuffer.WriteSerializable(ctx, m.GetCovPeriod()) - if popErr := writeBuffer.PopContext("covPeriod"); popErr != nil { - return errors.Wrap(popErr, "Error popping for covPeriod") - } - if _covPeriodErr != nil { - return errors.Wrap(_covPeriodErr, "Error serializing 'covPeriod' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (covPeriod) + if pushErr := writeBuffer.PushContext("covPeriod"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for covPeriod") + } + _covPeriodErr := writeBuffer.WriteSerializable(ctx, m.GetCovPeriod()) + if popErr := writeBuffer.PopContext("covPeriod"); popErr != nil { + return errors.Wrap(popErr, "Error popping for covPeriod") + } + if _covPeriodErr != nil { + return errors.Wrap(_covPeriodErr, "Error serializing 'covPeriod' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataCOVPeriod"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataCOVPeriod") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataCOVPeriod) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataCOVPeriod) isBACnetConstructedDataCOVPeriod() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataCOVPeriod) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCOVResubscriptionInterval.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCOVResubscriptionInterval.go index 9e8a542653e..d2cc30905fa 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCOVResubscriptionInterval.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCOVResubscriptionInterval.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataCOVResubscriptionInterval is the corresponding interface of BACnetConstructedDataCOVResubscriptionInterval type BACnetConstructedDataCOVResubscriptionInterval interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataCOVResubscriptionIntervalExactly interface { // _BACnetConstructedDataCOVResubscriptionInterval is the data-structure of this message type _BACnetConstructedDataCOVResubscriptionInterval struct { *_BACnetConstructedData - CovResubscriptionInterval BACnetApplicationTagUnsignedInteger + CovResubscriptionInterval BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataCOVResubscriptionInterval) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataCOVResubscriptionInterval) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataCOVResubscriptionInterval) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_COV_RESUBSCRIPTION_INTERVAL -} +func (m *_BACnetConstructedDataCOVResubscriptionInterval) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_COV_RESUBSCRIPTION_INTERVAL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataCOVResubscriptionInterval) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataCOVResubscriptionInterval) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataCOVResubscriptionInterval) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataCOVResubscriptionInterval) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataCOVResubscriptionInterval) GetActualValue() BACne /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataCOVResubscriptionInterval factory function for _BACnetConstructedDataCOVResubscriptionInterval -func NewBACnetConstructedDataCOVResubscriptionInterval(covResubscriptionInterval BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataCOVResubscriptionInterval { +func NewBACnetConstructedDataCOVResubscriptionInterval( covResubscriptionInterval BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataCOVResubscriptionInterval { _result := &_BACnetConstructedDataCOVResubscriptionInterval{ CovResubscriptionInterval: covResubscriptionInterval, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataCOVResubscriptionInterval(covResubscriptionInterval // Deprecated: use the interface for direct cast func CastBACnetConstructedDataCOVResubscriptionInterval(structType interface{}) BACnetConstructedDataCOVResubscriptionInterval { - if casted, ok := structType.(BACnetConstructedDataCOVResubscriptionInterval); ok { + if casted, ok := structType.(BACnetConstructedDataCOVResubscriptionInterval); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataCOVResubscriptionInterval); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataCOVResubscriptionInterval) GetLengthInBits(ctx co return lengthInBits } + func (m *_BACnetConstructedDataCOVResubscriptionInterval) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataCOVResubscriptionIntervalParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("covResubscriptionInterval"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for covResubscriptionInterval") } - _covResubscriptionInterval, _covResubscriptionIntervalErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_covResubscriptionInterval, _covResubscriptionIntervalErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _covResubscriptionIntervalErr != nil { return nil, errors.Wrap(_covResubscriptionIntervalErr, "Error parsing 'covResubscriptionInterval' field of BACnetConstructedDataCOVResubscriptionInterval") } @@ -186,7 +188,7 @@ func BACnetConstructedDataCOVResubscriptionIntervalParseWithBuffer(ctx context.C // Create a partially initialized instance _child := &_BACnetConstructedDataCOVResubscriptionInterval{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, CovResubscriptionInterval: covResubscriptionInterval, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataCOVResubscriptionInterval) SerializeWithWriteBuff return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataCOVResubscriptionInterval") } - // Simple Field (covResubscriptionInterval) - if pushErr := writeBuffer.PushContext("covResubscriptionInterval"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for covResubscriptionInterval") - } - _covResubscriptionIntervalErr := writeBuffer.WriteSerializable(ctx, m.GetCovResubscriptionInterval()) - if popErr := writeBuffer.PopContext("covResubscriptionInterval"); popErr != nil { - return errors.Wrap(popErr, "Error popping for covResubscriptionInterval") - } - if _covResubscriptionIntervalErr != nil { - return errors.Wrap(_covResubscriptionIntervalErr, "Error serializing 'covResubscriptionInterval' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (covResubscriptionInterval) + if pushErr := writeBuffer.PushContext("covResubscriptionInterval"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for covResubscriptionInterval") + } + _covResubscriptionIntervalErr := writeBuffer.WriteSerializable(ctx, m.GetCovResubscriptionInterval()) + if popErr := writeBuffer.PopContext("covResubscriptionInterval"); popErr != nil { + return errors.Wrap(popErr, "Error popping for covResubscriptionInterval") + } + if _covResubscriptionIntervalErr != nil { + return errors.Wrap(_covResubscriptionIntervalErr, "Error serializing 'covResubscriptionInterval' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataCOVResubscriptionInterval"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataCOVResubscriptionInterval") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataCOVResubscriptionInterval) SerializeWithWriteBuff return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataCOVResubscriptionInterval) isBACnetConstructedDataCOVResubscriptionInterval() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataCOVResubscriptionInterval) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCOVUPeriod.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCOVUPeriod.go index c66b2fd6717..eef91878fbb 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCOVUPeriod.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCOVUPeriod.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataCOVUPeriod is the corresponding interface of BACnetConstructedDataCOVUPeriod type BACnetConstructedDataCOVUPeriod interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataCOVUPeriodExactly interface { // _BACnetConstructedDataCOVUPeriod is the data-structure of this message type _BACnetConstructedDataCOVUPeriod struct { *_BACnetConstructedData - CovuPeriod BACnetApplicationTagUnsignedInteger + CovuPeriod BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataCOVUPeriod) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataCOVUPeriod) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataCOVUPeriod) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_COVU_PERIOD -} +func (m *_BACnetConstructedDataCOVUPeriod) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_COVU_PERIOD} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataCOVUPeriod) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataCOVUPeriod) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataCOVUPeriod) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataCOVUPeriod) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataCOVUPeriod) GetActualValue() BACnetApplicationTag /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataCOVUPeriod factory function for _BACnetConstructedDataCOVUPeriod -func NewBACnetConstructedDataCOVUPeriod(covuPeriod BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataCOVUPeriod { +func NewBACnetConstructedDataCOVUPeriod( covuPeriod BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataCOVUPeriod { _result := &_BACnetConstructedDataCOVUPeriod{ - CovuPeriod: covuPeriod, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + CovuPeriod: covuPeriod, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataCOVUPeriod(covuPeriod BACnetApplicationTagUnsignedI // Deprecated: use the interface for direct cast func CastBACnetConstructedDataCOVUPeriod(structType interface{}) BACnetConstructedDataCOVUPeriod { - if casted, ok := structType.(BACnetConstructedDataCOVUPeriod); ok { + if casted, ok := structType.(BACnetConstructedDataCOVUPeriod); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataCOVUPeriod); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataCOVUPeriod) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataCOVUPeriod) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataCOVUPeriodParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("covuPeriod"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for covuPeriod") } - _covuPeriod, _covuPeriodErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_covuPeriod, _covuPeriodErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _covuPeriodErr != nil { return nil, errors.Wrap(_covuPeriodErr, "Error parsing 'covuPeriod' field of BACnetConstructedDataCOVUPeriod") } @@ -186,7 +188,7 @@ func BACnetConstructedDataCOVUPeriodParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetConstructedDataCOVUPeriod{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, CovuPeriod: covuPeriod, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataCOVUPeriod) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataCOVUPeriod") } - // Simple Field (covuPeriod) - if pushErr := writeBuffer.PushContext("covuPeriod"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for covuPeriod") - } - _covuPeriodErr := writeBuffer.WriteSerializable(ctx, m.GetCovuPeriod()) - if popErr := writeBuffer.PopContext("covuPeriod"); popErr != nil { - return errors.Wrap(popErr, "Error popping for covuPeriod") - } - if _covuPeriodErr != nil { - return errors.Wrap(_covuPeriodErr, "Error serializing 'covuPeriod' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (covuPeriod) + if pushErr := writeBuffer.PushContext("covuPeriod"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for covuPeriod") + } + _covuPeriodErr := writeBuffer.WriteSerializable(ctx, m.GetCovuPeriod()) + if popErr := writeBuffer.PopContext("covuPeriod"); popErr != nil { + return errors.Wrap(popErr, "Error popping for covuPeriod") + } + if _covuPeriodErr != nil { + return errors.Wrap(_covuPeriodErr, "Error serializing 'covuPeriod' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataCOVUPeriod"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataCOVUPeriod") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataCOVUPeriod) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataCOVUPeriod) isBACnetConstructedDataCOVUPeriod() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataCOVUPeriod) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCOVURecipients.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCOVURecipients.go index 35b10a39e19..1ceedb9abff 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCOVURecipients.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCOVURecipients.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataCOVURecipients is the corresponding interface of BACnetConstructedDataCOVURecipients type BACnetConstructedDataCOVURecipients interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataCOVURecipientsExactly interface { // _BACnetConstructedDataCOVURecipients is the data-structure of this message type _BACnetConstructedDataCOVURecipients struct { *_BACnetConstructedData - CovuRecipients []BACnetRecipient + CovuRecipients []BACnetRecipient } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataCOVURecipients) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataCOVURecipients) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataCOVURecipients) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_COVU_RECIPIENTS -} +func (m *_BACnetConstructedDataCOVURecipients) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_COVU_RECIPIENTS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataCOVURecipients) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataCOVURecipients) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataCOVURecipients) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataCOVURecipients) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataCOVURecipients) GetCovuRecipients() []BACnetRecip /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataCOVURecipients factory function for _BACnetConstructedDataCOVURecipients -func NewBACnetConstructedDataCOVURecipients(covuRecipients []BACnetRecipient, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataCOVURecipients { +func NewBACnetConstructedDataCOVURecipients( covuRecipients []BACnetRecipient , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataCOVURecipients { _result := &_BACnetConstructedDataCOVURecipients{ - CovuRecipients: covuRecipients, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + CovuRecipients: covuRecipients, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataCOVURecipients(covuRecipients []BACnetRecipient, op // Deprecated: use the interface for direct cast func CastBACnetConstructedDataCOVURecipients(structType interface{}) BACnetConstructedDataCOVURecipients { - if casted, ok := structType.(BACnetConstructedDataCOVURecipients); ok { + if casted, ok := structType.(BACnetConstructedDataCOVURecipients); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataCOVURecipients); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataCOVURecipients) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConstructedDataCOVURecipients) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataCOVURecipientsParseWithBuffer(ctx context.Context, rea // Terminated array var covuRecipients []BACnetRecipient { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetRecipientParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetRecipientParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'covuRecipients' field of BACnetConstructedDataCOVURecipients") } @@ -173,7 +175,7 @@ func BACnetConstructedDataCOVURecipientsParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetConstructedDataCOVURecipients{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, CovuRecipients: covuRecipients, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataCOVURecipients) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataCOVURecipients") } - // Array Field (covuRecipients) - if pushErr := writeBuffer.PushContext("covuRecipients", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for covuRecipients") - } - for _curItem, _element := range m.GetCovuRecipients() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetCovuRecipients()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'covuRecipients' field") - } - } - if popErr := writeBuffer.PopContext("covuRecipients", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for covuRecipients") + // Array Field (covuRecipients) + if pushErr := writeBuffer.PushContext("covuRecipients", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for covuRecipients") + } + for _curItem, _element := range m.GetCovuRecipients() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetCovuRecipients()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'covuRecipients' field") } + } + if popErr := writeBuffer.PopContext("covuRecipients", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for covuRecipients") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataCOVURecipients"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataCOVURecipients") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataCOVURecipients) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataCOVURecipients) isBACnetConstructedDataCOVURecipients() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataCOVURecipients) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCalendarAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCalendarAll.go index 773ea4bab6c..ad79489d455 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCalendarAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCalendarAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataCalendarAll is the corresponding interface of BACnetConstructedDataCalendarAll type BACnetConstructedDataCalendarAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataCalendarAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataCalendarAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_CALENDAR -} +func (m *_BACnetConstructedDataCalendarAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_CALENDAR} -func (m *_BACnetConstructedDataCalendarAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataCalendarAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataCalendarAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataCalendarAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataCalendarAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataCalendarAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataCalendarAll factory function for _BACnetConstructedDataCalendarAll -func NewBACnetConstructedDataCalendarAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataCalendarAll { +func NewBACnetConstructedDataCalendarAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataCalendarAll { _result := &_BACnetConstructedDataCalendarAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataCalendarAll(openingTag BACnetOpeningTag, peekedTagH // Deprecated: use the interface for direct cast func CastBACnetConstructedDataCalendarAll(structType interface{}) BACnetConstructedDataCalendarAll { - if casted, ok := structType.(BACnetConstructedDataCalendarAll); ok { + if casted, ok := structType.(BACnetConstructedDataCalendarAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataCalendarAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataCalendarAll) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataCalendarAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataCalendarAllParseWithBuffer(ctx context.Context, readBu _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataCalendarAllParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataCalendarAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataCalendarAll) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataCalendarAll) isBACnetConstructedDataCalendarAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataCalendarAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCalendarPresentValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCalendarPresentValue.go index 6c81793add0..4a308f53309 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCalendarPresentValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCalendarPresentValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataCalendarPresentValue is the corresponding interface of BACnetConstructedDataCalendarPresentValue type BACnetConstructedDataCalendarPresentValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataCalendarPresentValueExactly interface { // _BACnetConstructedDataCalendarPresentValue is the data-structure of this message type _BACnetConstructedDataCalendarPresentValue struct { *_BACnetConstructedData - PresentValue BACnetApplicationTagBoolean + PresentValue BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataCalendarPresentValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_CALENDAR -} +func (m *_BACnetConstructedDataCalendarPresentValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_CALENDAR} -func (m *_BACnetConstructedDataCalendarPresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PRESENT_VALUE -} +func (m *_BACnetConstructedDataCalendarPresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PRESENT_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataCalendarPresentValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataCalendarPresentValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataCalendarPresentValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataCalendarPresentValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataCalendarPresentValue) GetActualValue() BACnetAppl /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataCalendarPresentValue factory function for _BACnetConstructedDataCalendarPresentValue -func NewBACnetConstructedDataCalendarPresentValue(presentValue BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataCalendarPresentValue { +func NewBACnetConstructedDataCalendarPresentValue( presentValue BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataCalendarPresentValue { _result := &_BACnetConstructedDataCalendarPresentValue{ - PresentValue: presentValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PresentValue: presentValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataCalendarPresentValue(presentValue BACnetApplication // Deprecated: use the interface for direct cast func CastBACnetConstructedDataCalendarPresentValue(structType interface{}) BACnetConstructedDataCalendarPresentValue { - if casted, ok := structType.(BACnetConstructedDataCalendarPresentValue); ok { + if casted, ok := structType.(BACnetConstructedDataCalendarPresentValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataCalendarPresentValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataCalendarPresentValue) GetLengthInBits(ctx context return lengthInBits } + func (m *_BACnetConstructedDataCalendarPresentValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataCalendarPresentValueParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("presentValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for presentValue") } - _presentValue, _presentValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_presentValue, _presentValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _presentValueErr != nil { return nil, errors.Wrap(_presentValueErr, "Error parsing 'presentValue' field of BACnetConstructedDataCalendarPresentValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataCalendarPresentValueParseWithBuffer(ctx context.Contex // Create a partially initialized instance _child := &_BACnetConstructedDataCalendarPresentValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PresentValue: presentValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataCalendarPresentValue) SerializeWithWriteBuffer(ct return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataCalendarPresentValue") } - // Simple Field (presentValue) - if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for presentValue") - } - _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) - if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for presentValue") - } - if _presentValueErr != nil { - return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (presentValue) + if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for presentValue") + } + _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) + if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for presentValue") + } + if _presentValueErr != nil { + return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataCalendarPresentValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataCalendarPresentValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataCalendarPresentValue) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataCalendarPresentValue) isBACnetConstructedDataCalendarPresentValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataCalendarPresentValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarAssignedDirection.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarAssignedDirection.go index 9af7e217745..421f78deaaf 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarAssignedDirection.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarAssignedDirection.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataCarAssignedDirection is the corresponding interface of BACnetConstructedDataCarAssignedDirection type BACnetConstructedDataCarAssignedDirection interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataCarAssignedDirectionExactly interface { // _BACnetConstructedDataCarAssignedDirection is the data-structure of this message type _BACnetConstructedDataCarAssignedDirection struct { *_BACnetConstructedData - AssignedDirection BACnetLiftCarDirectionTagged + AssignedDirection BACnetLiftCarDirectionTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataCarAssignedDirection) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataCarAssignedDirection) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataCarAssignedDirection) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_CAR_ASSIGNED_DIRECTION -} +func (m *_BACnetConstructedDataCarAssignedDirection) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_CAR_ASSIGNED_DIRECTION} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataCarAssignedDirection) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataCarAssignedDirection) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataCarAssignedDirection) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataCarAssignedDirection) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataCarAssignedDirection) GetActualValue() BACnetLift /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataCarAssignedDirection factory function for _BACnetConstructedDataCarAssignedDirection -func NewBACnetConstructedDataCarAssignedDirection(assignedDirection BACnetLiftCarDirectionTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataCarAssignedDirection { +func NewBACnetConstructedDataCarAssignedDirection( assignedDirection BACnetLiftCarDirectionTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataCarAssignedDirection { _result := &_BACnetConstructedDataCarAssignedDirection{ - AssignedDirection: assignedDirection, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + AssignedDirection: assignedDirection, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataCarAssignedDirection(assignedDirection BACnetLiftCa // Deprecated: use the interface for direct cast func CastBACnetConstructedDataCarAssignedDirection(structType interface{}) BACnetConstructedDataCarAssignedDirection { - if casted, ok := structType.(BACnetConstructedDataCarAssignedDirection); ok { + if casted, ok := structType.(BACnetConstructedDataCarAssignedDirection); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataCarAssignedDirection); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataCarAssignedDirection) GetLengthInBits(ctx context return lengthInBits } + func (m *_BACnetConstructedDataCarAssignedDirection) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataCarAssignedDirectionParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("assignedDirection"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for assignedDirection") } - _assignedDirection, _assignedDirectionErr := BACnetLiftCarDirectionTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_assignedDirection, _assignedDirectionErr := BACnetLiftCarDirectionTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _assignedDirectionErr != nil { return nil, errors.Wrap(_assignedDirectionErr, "Error parsing 'assignedDirection' field of BACnetConstructedDataCarAssignedDirection") } @@ -186,7 +188,7 @@ func BACnetConstructedDataCarAssignedDirectionParseWithBuffer(ctx context.Contex // Create a partially initialized instance _child := &_BACnetConstructedDataCarAssignedDirection{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, AssignedDirection: assignedDirection, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataCarAssignedDirection) SerializeWithWriteBuffer(ct return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataCarAssignedDirection") } - // Simple Field (assignedDirection) - if pushErr := writeBuffer.PushContext("assignedDirection"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for assignedDirection") - } - _assignedDirectionErr := writeBuffer.WriteSerializable(ctx, m.GetAssignedDirection()) - if popErr := writeBuffer.PopContext("assignedDirection"); popErr != nil { - return errors.Wrap(popErr, "Error popping for assignedDirection") - } - if _assignedDirectionErr != nil { - return errors.Wrap(_assignedDirectionErr, "Error serializing 'assignedDirection' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (assignedDirection) + if pushErr := writeBuffer.PushContext("assignedDirection"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for assignedDirection") + } + _assignedDirectionErr := writeBuffer.WriteSerializable(ctx, m.GetAssignedDirection()) + if popErr := writeBuffer.PopContext("assignedDirection"); popErr != nil { + return errors.Wrap(popErr, "Error popping for assignedDirection") + } + if _assignedDirectionErr != nil { + return errors.Wrap(_assignedDirectionErr, "Error serializing 'assignedDirection' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataCarAssignedDirection"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataCarAssignedDirection") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataCarAssignedDirection) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataCarAssignedDirection) isBACnetConstructedDataCarAssignedDirection() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataCarAssignedDirection) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarDoorCommand.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarDoorCommand.go index c5ec2ccea45..bda899769f1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarDoorCommand.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarDoorCommand.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataCarDoorCommand is the corresponding interface of BACnetConstructedDataCarDoorCommand type BACnetConstructedDataCarDoorCommand interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataCarDoorCommandExactly interface { // _BACnetConstructedDataCarDoorCommand is the data-structure of this message type _BACnetConstructedDataCarDoorCommand struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - CarDoorCommand []BACnetLiftCarDoorCommandTagged + NumberOfDataElements BACnetApplicationTagUnsignedInteger + CarDoorCommand []BACnetLiftCarDoorCommandTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataCarDoorCommand) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataCarDoorCommand) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataCarDoorCommand) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_CAR_DOOR_COMMAND -} +func (m *_BACnetConstructedDataCarDoorCommand) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_CAR_DOOR_COMMAND} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataCarDoorCommand) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataCarDoorCommand) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataCarDoorCommand) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataCarDoorCommand) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataCarDoorCommand) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataCarDoorCommand factory function for _BACnetConstructedDataCarDoorCommand -func NewBACnetConstructedDataCarDoorCommand(numberOfDataElements BACnetApplicationTagUnsignedInteger, carDoorCommand []BACnetLiftCarDoorCommandTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataCarDoorCommand { +func NewBACnetConstructedDataCarDoorCommand( numberOfDataElements BACnetApplicationTagUnsignedInteger , carDoorCommand []BACnetLiftCarDoorCommandTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataCarDoorCommand { _result := &_BACnetConstructedDataCarDoorCommand{ - NumberOfDataElements: numberOfDataElements, - CarDoorCommand: carDoorCommand, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + CarDoorCommand: carDoorCommand, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataCarDoorCommand(numberOfDataElements BACnetApplicati // Deprecated: use the interface for direct cast func CastBACnetConstructedDataCarDoorCommand(structType interface{}) BACnetConstructedDataCarDoorCommand { - if casted, ok := structType.(BACnetConstructedDataCarDoorCommand); ok { + if casted, ok := structType.(BACnetConstructedDataCarDoorCommand); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataCarDoorCommand); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataCarDoorCommand) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConstructedDataCarDoorCommand) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataCarDoorCommandParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataCarDoorCommandParseWithBuffer(ctx context.Context, rea // Terminated array var carDoorCommand []BACnetLiftCarDoorCommandTagged { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetLiftCarDoorCommandTaggedParseWithBuffer(ctx, readBuffer, uint8(0), TagClass_APPLICATION_TAGS) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetLiftCarDoorCommandTaggedParseWithBuffer(ctx, readBuffer , uint8(0) , TagClass_APPLICATION_TAGS ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'carDoorCommand' field of BACnetConstructedDataCarDoorCommand") } @@ -235,11 +237,11 @@ func BACnetConstructedDataCarDoorCommandParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetConstructedDataCarDoorCommand{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - CarDoorCommand: carDoorCommand, + CarDoorCommand: carDoorCommand, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataCarDoorCommand) SerializeWithWriteBuffer(ctx cont if pushErr := writeBuffer.PushContext("BACnetConstructedDataCarDoorCommand"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataCarDoorCommand") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (carDoorCommand) - if pushErr := writeBuffer.PushContext("carDoorCommand", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for carDoorCommand") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetCarDoorCommand() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetCarDoorCommand()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'carDoorCommand' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("carDoorCommand", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for carDoorCommand") + } + + // Array Field (carDoorCommand) + if pushErr := writeBuffer.PushContext("carDoorCommand", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for carDoorCommand") + } + for _curItem, _element := range m.GetCarDoorCommand() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetCarDoorCommand()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'carDoorCommand' field") } + } + if popErr := writeBuffer.PopContext("carDoorCommand", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for carDoorCommand") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataCarDoorCommand"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataCarDoorCommand") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataCarDoorCommand) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataCarDoorCommand) isBACnetConstructedDataCarDoorCommand() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataCarDoorCommand) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarDoorStatus.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarDoorStatus.go index ae716f8da43..df887112ac0 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarDoorStatus.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarDoorStatus.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataCarDoorStatus is the corresponding interface of BACnetConstructedDataCarDoorStatus type BACnetConstructedDataCarDoorStatus interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataCarDoorStatusExactly interface { // _BACnetConstructedDataCarDoorStatus is the data-structure of this message type _BACnetConstructedDataCarDoorStatus struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - CarDoorStatus []BACnetDoorStatusTagged + NumberOfDataElements BACnetApplicationTagUnsignedInteger + CarDoorStatus []BACnetDoorStatusTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataCarDoorStatus) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataCarDoorStatus) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataCarDoorStatus) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_CAR_DOOR_STATUS -} +func (m *_BACnetConstructedDataCarDoorStatus) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_CAR_DOOR_STATUS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataCarDoorStatus) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataCarDoorStatus) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataCarDoorStatus) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataCarDoorStatus) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataCarDoorStatus) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataCarDoorStatus factory function for _BACnetConstructedDataCarDoorStatus -func NewBACnetConstructedDataCarDoorStatus(numberOfDataElements BACnetApplicationTagUnsignedInteger, carDoorStatus []BACnetDoorStatusTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataCarDoorStatus { +func NewBACnetConstructedDataCarDoorStatus( numberOfDataElements BACnetApplicationTagUnsignedInteger , carDoorStatus []BACnetDoorStatusTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataCarDoorStatus { _result := &_BACnetConstructedDataCarDoorStatus{ - NumberOfDataElements: numberOfDataElements, - CarDoorStatus: carDoorStatus, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + CarDoorStatus: carDoorStatus, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataCarDoorStatus(numberOfDataElements BACnetApplicatio // Deprecated: use the interface for direct cast func CastBACnetConstructedDataCarDoorStatus(structType interface{}) BACnetConstructedDataCarDoorStatus { - if casted, ok := structType.(BACnetConstructedDataCarDoorStatus); ok { + if casted, ok := structType.(BACnetConstructedDataCarDoorStatus); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataCarDoorStatus); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataCarDoorStatus) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetConstructedDataCarDoorStatus) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataCarDoorStatusParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataCarDoorStatusParseWithBuffer(ctx context.Context, read // Terminated array var carDoorStatus []BACnetDoorStatusTagged { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetDoorStatusTaggedParseWithBuffer(ctx, readBuffer, uint8(0), TagClass_APPLICATION_TAGS) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetDoorStatusTaggedParseWithBuffer(ctx, readBuffer , uint8(0) , TagClass_APPLICATION_TAGS ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'carDoorStatus' field of BACnetConstructedDataCarDoorStatus") } @@ -235,11 +237,11 @@ func BACnetConstructedDataCarDoorStatusParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetConstructedDataCarDoorStatus{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - CarDoorStatus: carDoorStatus, + CarDoorStatus: carDoorStatus, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataCarDoorStatus) SerializeWithWriteBuffer(ctx conte if pushErr := writeBuffer.PushContext("BACnetConstructedDataCarDoorStatus"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataCarDoorStatus") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (carDoorStatus) - if pushErr := writeBuffer.PushContext("carDoorStatus", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for carDoorStatus") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetCarDoorStatus() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetCarDoorStatus()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'carDoorStatus' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("carDoorStatus", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for carDoorStatus") + } + + // Array Field (carDoorStatus) + if pushErr := writeBuffer.PushContext("carDoorStatus", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for carDoorStatus") + } + for _curItem, _element := range m.GetCarDoorStatus() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetCarDoorStatus()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'carDoorStatus' field") } + } + if popErr := writeBuffer.PopContext("carDoorStatus", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for carDoorStatus") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataCarDoorStatus"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataCarDoorStatus") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataCarDoorStatus) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataCarDoorStatus) isBACnetConstructedDataCarDoorStatus() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataCarDoorStatus) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarDoorText.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarDoorText.go index 29d5def1ec4..df7f91ace2b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarDoorText.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarDoorText.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataCarDoorText is the corresponding interface of BACnetConstructedDataCarDoorText type BACnetConstructedDataCarDoorText interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataCarDoorTextExactly interface { // _BACnetConstructedDataCarDoorText is the data-structure of this message type _BACnetConstructedDataCarDoorText struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - CarDoorText []BACnetApplicationTagCharacterString + NumberOfDataElements BACnetApplicationTagUnsignedInteger + CarDoorText []BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataCarDoorText) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataCarDoorText) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataCarDoorText) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_CAR_DOOR_TEXT -} +func (m *_BACnetConstructedDataCarDoorText) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_CAR_DOOR_TEXT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataCarDoorText) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataCarDoorText) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataCarDoorText) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataCarDoorText) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataCarDoorText) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataCarDoorText factory function for _BACnetConstructedDataCarDoorText -func NewBACnetConstructedDataCarDoorText(numberOfDataElements BACnetApplicationTagUnsignedInteger, carDoorText []BACnetApplicationTagCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataCarDoorText { +func NewBACnetConstructedDataCarDoorText( numberOfDataElements BACnetApplicationTagUnsignedInteger , carDoorText []BACnetApplicationTagCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataCarDoorText { _result := &_BACnetConstructedDataCarDoorText{ - NumberOfDataElements: numberOfDataElements, - CarDoorText: carDoorText, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + CarDoorText: carDoorText, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataCarDoorText(numberOfDataElements BACnetApplicationT // Deprecated: use the interface for direct cast func CastBACnetConstructedDataCarDoorText(structType interface{}) BACnetConstructedDataCarDoorText { - if casted, ok := structType.(BACnetConstructedDataCarDoorText); ok { + if casted, ok := structType.(BACnetConstructedDataCarDoorText); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataCarDoorText); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataCarDoorText) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataCarDoorText) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataCarDoorTextParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataCarDoorTextParseWithBuffer(ctx context.Context, readBu // Terminated array var carDoorText []BACnetApplicationTagCharacterString { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'carDoorText' field of BACnetConstructedDataCarDoorText") } @@ -235,11 +237,11 @@ func BACnetConstructedDataCarDoorTextParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataCarDoorText{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - CarDoorText: carDoorText, + CarDoorText: carDoorText, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataCarDoorText) SerializeWithWriteBuffer(ctx context if pushErr := writeBuffer.PushContext("BACnetConstructedDataCarDoorText"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataCarDoorText") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (carDoorText) - if pushErr := writeBuffer.PushContext("carDoorText", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for carDoorText") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetCarDoorText() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetCarDoorText()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'carDoorText' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("carDoorText", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for carDoorText") + } + + // Array Field (carDoorText) + if pushErr := writeBuffer.PushContext("carDoorText", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for carDoorText") + } + for _curItem, _element := range m.GetCarDoorText() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetCarDoorText()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'carDoorText' field") } + } + if popErr := writeBuffer.PopContext("carDoorText", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for carDoorText") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataCarDoorText"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataCarDoorText") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataCarDoorText) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataCarDoorText) isBACnetConstructedDataCarDoorText() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataCarDoorText) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarDoorZone.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarDoorZone.go index dfa63bc0d25..d80047a0ee5 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarDoorZone.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarDoorZone.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataCarDoorZone is the corresponding interface of BACnetConstructedDataCarDoorZone type BACnetConstructedDataCarDoorZone interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataCarDoorZoneExactly interface { // _BACnetConstructedDataCarDoorZone is the data-structure of this message type _BACnetConstructedDataCarDoorZone struct { *_BACnetConstructedData - CarDoorZone BACnetApplicationTagBoolean + CarDoorZone BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataCarDoorZone) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataCarDoorZone) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataCarDoorZone) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_CAR_DOOR_ZONE -} +func (m *_BACnetConstructedDataCarDoorZone) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_CAR_DOOR_ZONE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataCarDoorZone) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataCarDoorZone) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataCarDoorZone) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataCarDoorZone) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataCarDoorZone) GetActualValue() BACnetApplicationTa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataCarDoorZone factory function for _BACnetConstructedDataCarDoorZone -func NewBACnetConstructedDataCarDoorZone(carDoorZone BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataCarDoorZone { +func NewBACnetConstructedDataCarDoorZone( carDoorZone BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataCarDoorZone { _result := &_BACnetConstructedDataCarDoorZone{ - CarDoorZone: carDoorZone, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + CarDoorZone: carDoorZone, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataCarDoorZone(carDoorZone BACnetApplicationTagBoolean // Deprecated: use the interface for direct cast func CastBACnetConstructedDataCarDoorZone(structType interface{}) BACnetConstructedDataCarDoorZone { - if casted, ok := structType.(BACnetConstructedDataCarDoorZone); ok { + if casted, ok := structType.(BACnetConstructedDataCarDoorZone); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataCarDoorZone); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataCarDoorZone) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataCarDoorZone) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataCarDoorZoneParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("carDoorZone"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for carDoorZone") } - _carDoorZone, _carDoorZoneErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_carDoorZone, _carDoorZoneErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _carDoorZoneErr != nil { return nil, errors.Wrap(_carDoorZoneErr, "Error parsing 'carDoorZone' field of BACnetConstructedDataCarDoorZone") } @@ -186,7 +188,7 @@ func BACnetConstructedDataCarDoorZoneParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataCarDoorZone{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, CarDoorZone: carDoorZone, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataCarDoorZone) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataCarDoorZone") } - // Simple Field (carDoorZone) - if pushErr := writeBuffer.PushContext("carDoorZone"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for carDoorZone") - } - _carDoorZoneErr := writeBuffer.WriteSerializable(ctx, m.GetCarDoorZone()) - if popErr := writeBuffer.PopContext("carDoorZone"); popErr != nil { - return errors.Wrap(popErr, "Error popping for carDoorZone") - } - if _carDoorZoneErr != nil { - return errors.Wrap(_carDoorZoneErr, "Error serializing 'carDoorZone' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (carDoorZone) + if pushErr := writeBuffer.PushContext("carDoorZone"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for carDoorZone") + } + _carDoorZoneErr := writeBuffer.WriteSerializable(ctx, m.GetCarDoorZone()) + if popErr := writeBuffer.PopContext("carDoorZone"); popErr != nil { + return errors.Wrap(popErr, "Error popping for carDoorZone") + } + if _carDoorZoneErr != nil { + return errors.Wrap(_carDoorZoneErr, "Error serializing 'carDoorZone' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataCarDoorZone"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataCarDoorZone") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataCarDoorZone) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataCarDoorZone) isBACnetConstructedDataCarDoorZone() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataCarDoorZone) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarDriveStatus.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarDriveStatus.go index 60c31012f46..27f774c2ccf 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarDriveStatus.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarDriveStatus.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataCarDriveStatus is the corresponding interface of BACnetConstructedDataCarDriveStatus type BACnetConstructedDataCarDriveStatus interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataCarDriveStatusExactly interface { // _BACnetConstructedDataCarDriveStatus is the data-structure of this message type _BACnetConstructedDataCarDriveStatus struct { *_BACnetConstructedData - CarDriveStatus BACnetLiftCarDriveStatusTagged + CarDriveStatus BACnetLiftCarDriveStatusTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataCarDriveStatus) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataCarDriveStatus) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataCarDriveStatus) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_CAR_DRIVE_STATUS -} +func (m *_BACnetConstructedDataCarDriveStatus) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_CAR_DRIVE_STATUS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataCarDriveStatus) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataCarDriveStatus) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataCarDriveStatus) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataCarDriveStatus) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataCarDriveStatus) GetActualValue() BACnetLiftCarDri /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataCarDriveStatus factory function for _BACnetConstructedDataCarDriveStatus -func NewBACnetConstructedDataCarDriveStatus(carDriveStatus BACnetLiftCarDriveStatusTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataCarDriveStatus { +func NewBACnetConstructedDataCarDriveStatus( carDriveStatus BACnetLiftCarDriveStatusTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataCarDriveStatus { _result := &_BACnetConstructedDataCarDriveStatus{ - CarDriveStatus: carDriveStatus, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + CarDriveStatus: carDriveStatus, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataCarDriveStatus(carDriveStatus BACnetLiftCarDriveSta // Deprecated: use the interface for direct cast func CastBACnetConstructedDataCarDriveStatus(structType interface{}) BACnetConstructedDataCarDriveStatus { - if casted, ok := structType.(BACnetConstructedDataCarDriveStatus); ok { + if casted, ok := structType.(BACnetConstructedDataCarDriveStatus); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataCarDriveStatus); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataCarDriveStatus) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConstructedDataCarDriveStatus) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataCarDriveStatusParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("carDriveStatus"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for carDriveStatus") } - _carDriveStatus, _carDriveStatusErr := BACnetLiftCarDriveStatusTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_carDriveStatus, _carDriveStatusErr := BACnetLiftCarDriveStatusTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _carDriveStatusErr != nil { return nil, errors.Wrap(_carDriveStatusErr, "Error parsing 'carDriveStatus' field of BACnetConstructedDataCarDriveStatus") } @@ -186,7 +188,7 @@ func BACnetConstructedDataCarDriveStatusParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetConstructedDataCarDriveStatus{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, CarDriveStatus: carDriveStatus, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataCarDriveStatus) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataCarDriveStatus") } - // Simple Field (carDriveStatus) - if pushErr := writeBuffer.PushContext("carDriveStatus"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for carDriveStatus") - } - _carDriveStatusErr := writeBuffer.WriteSerializable(ctx, m.GetCarDriveStatus()) - if popErr := writeBuffer.PopContext("carDriveStatus"); popErr != nil { - return errors.Wrap(popErr, "Error popping for carDriveStatus") - } - if _carDriveStatusErr != nil { - return errors.Wrap(_carDriveStatusErr, "Error serializing 'carDriveStatus' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (carDriveStatus) + if pushErr := writeBuffer.PushContext("carDriveStatus"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for carDriveStatus") + } + _carDriveStatusErr := writeBuffer.WriteSerializable(ctx, m.GetCarDriveStatus()) + if popErr := writeBuffer.PopContext("carDriveStatus"); popErr != nil { + return errors.Wrap(popErr, "Error popping for carDriveStatus") + } + if _carDriveStatusErr != nil { + return errors.Wrap(_carDriveStatusErr, "Error serializing 'carDriveStatus' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataCarDriveStatus"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataCarDriveStatus") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataCarDriveStatus) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataCarDriveStatus) isBACnetConstructedDataCarDriveStatus() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataCarDriveStatus) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarLoad.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarLoad.go index 3093d8fbfcf..1baec427cdb 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarLoad.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarLoad.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataCarLoad is the corresponding interface of BACnetConstructedDataCarLoad type BACnetConstructedDataCarLoad interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataCarLoadExactly interface { // _BACnetConstructedDataCarLoad is the data-structure of this message type _BACnetConstructedDataCarLoad struct { *_BACnetConstructedData - CarLoad BACnetApplicationTagReal + CarLoad BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataCarLoad) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataCarLoad) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataCarLoad) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_CAR_LOAD -} +func (m *_BACnetConstructedDataCarLoad) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_CAR_LOAD} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataCarLoad) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataCarLoad) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataCarLoad) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataCarLoad) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataCarLoad) GetActualValue() BACnetApplicationTagRea /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataCarLoad factory function for _BACnetConstructedDataCarLoad -func NewBACnetConstructedDataCarLoad(carLoad BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataCarLoad { +func NewBACnetConstructedDataCarLoad( carLoad BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataCarLoad { _result := &_BACnetConstructedDataCarLoad{ - CarLoad: carLoad, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + CarLoad: carLoad, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataCarLoad(carLoad BACnetApplicationTagReal, openingTa // Deprecated: use the interface for direct cast func CastBACnetConstructedDataCarLoad(structType interface{}) BACnetConstructedDataCarLoad { - if casted, ok := structType.(BACnetConstructedDataCarLoad); ok { + if casted, ok := structType.(BACnetConstructedDataCarLoad); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataCarLoad); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataCarLoad) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_BACnetConstructedDataCarLoad) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataCarLoadParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("carLoad"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for carLoad") } - _carLoad, _carLoadErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_carLoad, _carLoadErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _carLoadErr != nil { return nil, errors.Wrap(_carLoadErr, "Error parsing 'carLoad' field of BACnetConstructedDataCarLoad") } @@ -186,7 +188,7 @@ func BACnetConstructedDataCarLoadParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_BACnetConstructedDataCarLoad{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, CarLoad: carLoad, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataCarLoad) SerializeWithWriteBuffer(ctx context.Con return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataCarLoad") } - // Simple Field (carLoad) - if pushErr := writeBuffer.PushContext("carLoad"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for carLoad") - } - _carLoadErr := writeBuffer.WriteSerializable(ctx, m.GetCarLoad()) - if popErr := writeBuffer.PopContext("carLoad"); popErr != nil { - return errors.Wrap(popErr, "Error popping for carLoad") - } - if _carLoadErr != nil { - return errors.Wrap(_carLoadErr, "Error serializing 'carLoad' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (carLoad) + if pushErr := writeBuffer.PushContext("carLoad"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for carLoad") + } + _carLoadErr := writeBuffer.WriteSerializable(ctx, m.GetCarLoad()) + if popErr := writeBuffer.PopContext("carLoad"); popErr != nil { + return errors.Wrap(popErr, "Error popping for carLoad") + } + if _carLoadErr != nil { + return errors.Wrap(_carLoadErr, "Error serializing 'carLoad' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataCarLoad"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataCarLoad") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataCarLoad) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataCarLoad) isBACnetConstructedDataCarLoad() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataCarLoad) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarLoadUnits.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarLoadUnits.go index a177c69bdb5..72d39b6c5ea 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarLoadUnits.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarLoadUnits.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataCarLoadUnits is the corresponding interface of BACnetConstructedDataCarLoadUnits type BACnetConstructedDataCarLoadUnits interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataCarLoadUnitsExactly interface { // _BACnetConstructedDataCarLoadUnits is the data-structure of this message type _BACnetConstructedDataCarLoadUnits struct { *_BACnetConstructedData - Units BACnetEngineeringUnitsTagged + Units BACnetEngineeringUnitsTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataCarLoadUnits) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataCarLoadUnits) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataCarLoadUnits) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_CAR_LOAD_UNITS -} +func (m *_BACnetConstructedDataCarLoadUnits) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_CAR_LOAD_UNITS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataCarLoadUnits) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataCarLoadUnits) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataCarLoadUnits) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataCarLoadUnits) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataCarLoadUnits) GetActualValue() BACnetEngineeringU /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataCarLoadUnits factory function for _BACnetConstructedDataCarLoadUnits -func NewBACnetConstructedDataCarLoadUnits(units BACnetEngineeringUnitsTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataCarLoadUnits { +func NewBACnetConstructedDataCarLoadUnits( units BACnetEngineeringUnitsTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataCarLoadUnits { _result := &_BACnetConstructedDataCarLoadUnits{ - Units: units, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Units: units, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataCarLoadUnits(units BACnetEngineeringUnitsTagged, op // Deprecated: use the interface for direct cast func CastBACnetConstructedDataCarLoadUnits(structType interface{}) BACnetConstructedDataCarLoadUnits { - if casted, ok := structType.(BACnetConstructedDataCarLoadUnits); ok { + if casted, ok := structType.(BACnetConstructedDataCarLoadUnits); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataCarLoadUnits); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataCarLoadUnits) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetConstructedDataCarLoadUnits) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataCarLoadUnitsParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("units"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for units") } - _units, _unitsErr := BACnetEngineeringUnitsTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_units, _unitsErr := BACnetEngineeringUnitsTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _unitsErr != nil { return nil, errors.Wrap(_unitsErr, "Error parsing 'units' field of BACnetConstructedDataCarLoadUnits") } @@ -186,7 +188,7 @@ func BACnetConstructedDataCarLoadUnitsParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetConstructedDataCarLoadUnits{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Units: units, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataCarLoadUnits) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataCarLoadUnits") } - // Simple Field (units) - if pushErr := writeBuffer.PushContext("units"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for units") - } - _unitsErr := writeBuffer.WriteSerializable(ctx, m.GetUnits()) - if popErr := writeBuffer.PopContext("units"); popErr != nil { - return errors.Wrap(popErr, "Error popping for units") - } - if _unitsErr != nil { - return errors.Wrap(_unitsErr, "Error serializing 'units' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (units) + if pushErr := writeBuffer.PushContext("units"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for units") + } + _unitsErr := writeBuffer.WriteSerializable(ctx, m.GetUnits()) + if popErr := writeBuffer.PopContext("units"); popErr != nil { + return errors.Wrap(popErr, "Error popping for units") + } + if _unitsErr != nil { + return errors.Wrap(_unitsErr, "Error serializing 'units' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataCarLoadUnits"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataCarLoadUnits") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataCarLoadUnits) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataCarLoadUnits) isBACnetConstructedDataCarLoadUnits() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataCarLoadUnits) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarMode.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarMode.go index 5c0a68a073d..906f491bfe2 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarMode.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarMode.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataCarMode is the corresponding interface of BACnetConstructedDataCarMode type BACnetConstructedDataCarMode interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataCarModeExactly interface { // _BACnetConstructedDataCarMode is the data-structure of this message type _BACnetConstructedDataCarMode struct { *_BACnetConstructedData - CarMode BACnetLiftCarModeTagged + CarMode BACnetLiftCarModeTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataCarMode) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataCarMode) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataCarMode) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_CAR_MODE -} +func (m *_BACnetConstructedDataCarMode) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_CAR_MODE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataCarMode) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataCarMode) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataCarMode) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataCarMode) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataCarMode) GetActualValue() BACnetLiftCarModeTagged /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataCarMode factory function for _BACnetConstructedDataCarMode -func NewBACnetConstructedDataCarMode(carMode BACnetLiftCarModeTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataCarMode { +func NewBACnetConstructedDataCarMode( carMode BACnetLiftCarModeTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataCarMode { _result := &_BACnetConstructedDataCarMode{ - CarMode: carMode, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + CarMode: carMode, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataCarMode(carMode BACnetLiftCarModeTagged, openingTag // Deprecated: use the interface for direct cast func CastBACnetConstructedDataCarMode(structType interface{}) BACnetConstructedDataCarMode { - if casted, ok := structType.(BACnetConstructedDataCarMode); ok { + if casted, ok := structType.(BACnetConstructedDataCarMode); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataCarMode); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataCarMode) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_BACnetConstructedDataCarMode) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataCarModeParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("carMode"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for carMode") } - _carMode, _carModeErr := BACnetLiftCarModeTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_carMode, _carModeErr := BACnetLiftCarModeTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _carModeErr != nil { return nil, errors.Wrap(_carModeErr, "Error parsing 'carMode' field of BACnetConstructedDataCarMode") } @@ -186,7 +188,7 @@ func BACnetConstructedDataCarModeParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_BACnetConstructedDataCarMode{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, CarMode: carMode, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataCarMode) SerializeWithWriteBuffer(ctx context.Con return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataCarMode") } - // Simple Field (carMode) - if pushErr := writeBuffer.PushContext("carMode"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for carMode") - } - _carModeErr := writeBuffer.WriteSerializable(ctx, m.GetCarMode()) - if popErr := writeBuffer.PopContext("carMode"); popErr != nil { - return errors.Wrap(popErr, "Error popping for carMode") - } - if _carModeErr != nil { - return errors.Wrap(_carModeErr, "Error serializing 'carMode' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (carMode) + if pushErr := writeBuffer.PushContext("carMode"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for carMode") + } + _carModeErr := writeBuffer.WriteSerializable(ctx, m.GetCarMode()) + if popErr := writeBuffer.PopContext("carMode"); popErr != nil { + return errors.Wrap(popErr, "Error popping for carMode") + } + if _carModeErr != nil { + return errors.Wrap(_carModeErr, "Error serializing 'carMode' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataCarMode"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataCarMode") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataCarMode) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataCarMode) isBACnetConstructedDataCarMode() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataCarMode) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarMovingDirection.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarMovingDirection.go index 61916852d72..9d558da7387 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarMovingDirection.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarMovingDirection.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataCarMovingDirection is the corresponding interface of BACnetConstructedDataCarMovingDirection type BACnetConstructedDataCarMovingDirection interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataCarMovingDirectionExactly interface { // _BACnetConstructedDataCarMovingDirection is the data-structure of this message type _BACnetConstructedDataCarMovingDirection struct { *_BACnetConstructedData - CarMovingDirection BACnetLiftCarDirectionTagged + CarMovingDirection BACnetLiftCarDirectionTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataCarMovingDirection) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataCarMovingDirection) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataCarMovingDirection) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_CAR_MOVING_DIRECTION -} +func (m *_BACnetConstructedDataCarMovingDirection) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_CAR_MOVING_DIRECTION} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataCarMovingDirection) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataCarMovingDirection) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataCarMovingDirection) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataCarMovingDirection) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataCarMovingDirection) GetActualValue() BACnetLiftCa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataCarMovingDirection factory function for _BACnetConstructedDataCarMovingDirection -func NewBACnetConstructedDataCarMovingDirection(carMovingDirection BACnetLiftCarDirectionTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataCarMovingDirection { +func NewBACnetConstructedDataCarMovingDirection( carMovingDirection BACnetLiftCarDirectionTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataCarMovingDirection { _result := &_BACnetConstructedDataCarMovingDirection{ - CarMovingDirection: carMovingDirection, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + CarMovingDirection: carMovingDirection, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataCarMovingDirection(carMovingDirection BACnetLiftCar // Deprecated: use the interface for direct cast func CastBACnetConstructedDataCarMovingDirection(structType interface{}) BACnetConstructedDataCarMovingDirection { - if casted, ok := structType.(BACnetConstructedDataCarMovingDirection); ok { + if casted, ok := structType.(BACnetConstructedDataCarMovingDirection); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataCarMovingDirection); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataCarMovingDirection) GetLengthInBits(ctx context.C return lengthInBits } + func (m *_BACnetConstructedDataCarMovingDirection) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataCarMovingDirectionParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("carMovingDirection"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for carMovingDirection") } - _carMovingDirection, _carMovingDirectionErr := BACnetLiftCarDirectionTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_carMovingDirection, _carMovingDirectionErr := BACnetLiftCarDirectionTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _carMovingDirectionErr != nil { return nil, errors.Wrap(_carMovingDirectionErr, "Error parsing 'carMovingDirection' field of BACnetConstructedDataCarMovingDirection") } @@ -186,7 +188,7 @@ func BACnetConstructedDataCarMovingDirectionParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataCarMovingDirection{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, CarMovingDirection: carMovingDirection, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataCarMovingDirection) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataCarMovingDirection") } - // Simple Field (carMovingDirection) - if pushErr := writeBuffer.PushContext("carMovingDirection"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for carMovingDirection") - } - _carMovingDirectionErr := writeBuffer.WriteSerializable(ctx, m.GetCarMovingDirection()) - if popErr := writeBuffer.PopContext("carMovingDirection"); popErr != nil { - return errors.Wrap(popErr, "Error popping for carMovingDirection") - } - if _carMovingDirectionErr != nil { - return errors.Wrap(_carMovingDirectionErr, "Error serializing 'carMovingDirection' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (carMovingDirection) + if pushErr := writeBuffer.PushContext("carMovingDirection"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for carMovingDirection") + } + _carMovingDirectionErr := writeBuffer.WriteSerializable(ctx, m.GetCarMovingDirection()) + if popErr := writeBuffer.PopContext("carMovingDirection"); popErr != nil { + return errors.Wrap(popErr, "Error popping for carMovingDirection") + } + if _carMovingDirectionErr != nil { + return errors.Wrap(_carMovingDirectionErr, "Error serializing 'carMovingDirection' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataCarMovingDirection"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataCarMovingDirection") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataCarMovingDirection) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataCarMovingDirection) isBACnetConstructedDataCarMovingDirection() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataCarMovingDirection) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarPosition.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarPosition.go index 6ae0887932f..221f4153844 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarPosition.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCarPosition.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataCarPosition is the corresponding interface of BACnetConstructedDataCarPosition type BACnetConstructedDataCarPosition interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataCarPositionExactly interface { // _BACnetConstructedDataCarPosition is the data-structure of this message type _BACnetConstructedDataCarPosition struct { *_BACnetConstructedData - CarPosition BACnetApplicationTagUnsignedInteger + CarPosition BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataCarPosition) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataCarPosition) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataCarPosition) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_CAR_POSITION -} +func (m *_BACnetConstructedDataCarPosition) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_CAR_POSITION} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataCarPosition) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataCarPosition) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataCarPosition) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataCarPosition) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataCarPosition) GetActualValue() BACnetApplicationTa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataCarPosition factory function for _BACnetConstructedDataCarPosition -func NewBACnetConstructedDataCarPosition(carPosition BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataCarPosition { +func NewBACnetConstructedDataCarPosition( carPosition BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataCarPosition { _result := &_BACnetConstructedDataCarPosition{ - CarPosition: carPosition, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + CarPosition: carPosition, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataCarPosition(carPosition BACnetApplicationTagUnsigne // Deprecated: use the interface for direct cast func CastBACnetConstructedDataCarPosition(structType interface{}) BACnetConstructedDataCarPosition { - if casted, ok := structType.(BACnetConstructedDataCarPosition); ok { + if casted, ok := structType.(BACnetConstructedDataCarPosition); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataCarPosition); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataCarPosition) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataCarPosition) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataCarPositionParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("carPosition"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for carPosition") } - _carPosition, _carPositionErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_carPosition, _carPositionErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _carPositionErr != nil { return nil, errors.Wrap(_carPositionErr, "Error parsing 'carPosition' field of BACnetConstructedDataCarPosition") } @@ -186,7 +188,7 @@ func BACnetConstructedDataCarPositionParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataCarPosition{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, CarPosition: carPosition, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataCarPosition) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataCarPosition") } - // Simple Field (carPosition) - if pushErr := writeBuffer.PushContext("carPosition"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for carPosition") - } - _carPositionErr := writeBuffer.WriteSerializable(ctx, m.GetCarPosition()) - if popErr := writeBuffer.PopContext("carPosition"); popErr != nil { - return errors.Wrap(popErr, "Error popping for carPosition") - } - if _carPositionErr != nil { - return errors.Wrap(_carPositionErr, "Error serializing 'carPosition' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (carPosition) + if pushErr := writeBuffer.PushContext("carPosition"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for carPosition") + } + _carPositionErr := writeBuffer.WriteSerializable(ctx, m.GetCarPosition()) + if popErr := writeBuffer.PopContext("carPosition"); popErr != nil { + return errors.Wrap(popErr, "Error popping for carPosition") + } + if _carPositionErr != nil { + return errors.Wrap(_carPositionErr, "Error serializing 'carPosition' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataCarPosition"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataCarPosition") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataCarPosition) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataCarPosition) isBACnetConstructedDataCarPosition() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataCarPosition) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataChangeOfStateCount.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataChangeOfStateCount.go index ca1572514c7..9da96c468a8 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataChangeOfStateCount.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataChangeOfStateCount.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataChangeOfStateCount is the corresponding interface of BACnetConstructedDataChangeOfStateCount type BACnetConstructedDataChangeOfStateCount interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataChangeOfStateCountExactly interface { // _BACnetConstructedDataChangeOfStateCount is the data-structure of this message type _BACnetConstructedDataChangeOfStateCount struct { *_BACnetConstructedData - ChangeIfStateCount BACnetApplicationTagUnsignedInteger + ChangeIfStateCount BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataChangeOfStateCount) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataChangeOfStateCount) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataChangeOfStateCount) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_CHANGE_OF_STATE_COUNT -} +func (m *_BACnetConstructedDataChangeOfStateCount) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_CHANGE_OF_STATE_COUNT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataChangeOfStateCount) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataChangeOfStateCount) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataChangeOfStateCount) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataChangeOfStateCount) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataChangeOfStateCount) GetActualValue() BACnetApplic /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataChangeOfStateCount factory function for _BACnetConstructedDataChangeOfStateCount -func NewBACnetConstructedDataChangeOfStateCount(changeIfStateCount BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataChangeOfStateCount { +func NewBACnetConstructedDataChangeOfStateCount( changeIfStateCount BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataChangeOfStateCount { _result := &_BACnetConstructedDataChangeOfStateCount{ - ChangeIfStateCount: changeIfStateCount, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ChangeIfStateCount: changeIfStateCount, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataChangeOfStateCount(changeIfStateCount BACnetApplica // Deprecated: use the interface for direct cast func CastBACnetConstructedDataChangeOfStateCount(structType interface{}) BACnetConstructedDataChangeOfStateCount { - if casted, ok := structType.(BACnetConstructedDataChangeOfStateCount); ok { + if casted, ok := structType.(BACnetConstructedDataChangeOfStateCount); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataChangeOfStateCount); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataChangeOfStateCount) GetLengthInBits(ctx context.C return lengthInBits } + func (m *_BACnetConstructedDataChangeOfStateCount) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataChangeOfStateCountParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("changeIfStateCount"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for changeIfStateCount") } - _changeIfStateCount, _changeIfStateCountErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_changeIfStateCount, _changeIfStateCountErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _changeIfStateCountErr != nil { return nil, errors.Wrap(_changeIfStateCountErr, "Error parsing 'changeIfStateCount' field of BACnetConstructedDataChangeOfStateCount") } @@ -186,7 +188,7 @@ func BACnetConstructedDataChangeOfStateCountParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataChangeOfStateCount{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ChangeIfStateCount: changeIfStateCount, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataChangeOfStateCount) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataChangeOfStateCount") } - // Simple Field (changeIfStateCount) - if pushErr := writeBuffer.PushContext("changeIfStateCount"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for changeIfStateCount") - } - _changeIfStateCountErr := writeBuffer.WriteSerializable(ctx, m.GetChangeIfStateCount()) - if popErr := writeBuffer.PopContext("changeIfStateCount"); popErr != nil { - return errors.Wrap(popErr, "Error popping for changeIfStateCount") - } - if _changeIfStateCountErr != nil { - return errors.Wrap(_changeIfStateCountErr, "Error serializing 'changeIfStateCount' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (changeIfStateCount) + if pushErr := writeBuffer.PushContext("changeIfStateCount"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for changeIfStateCount") + } + _changeIfStateCountErr := writeBuffer.WriteSerializable(ctx, m.GetChangeIfStateCount()) + if popErr := writeBuffer.PopContext("changeIfStateCount"); popErr != nil { + return errors.Wrap(popErr, "Error popping for changeIfStateCount") + } + if _changeIfStateCountErr != nil { + return errors.Wrap(_changeIfStateCountErr, "Error serializing 'changeIfStateCount' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataChangeOfStateCount"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataChangeOfStateCount") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataChangeOfStateCount) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataChangeOfStateCount) isBACnetConstructedDataChangeOfStateCount() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataChangeOfStateCount) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataChangeOfStateTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataChangeOfStateTime.go index 86553ec3846..6e7b3b23bd1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataChangeOfStateTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataChangeOfStateTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataChangeOfStateTime is the corresponding interface of BACnetConstructedDataChangeOfStateTime type BACnetConstructedDataChangeOfStateTime interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataChangeOfStateTimeExactly interface { // _BACnetConstructedDataChangeOfStateTime is the data-structure of this message type _BACnetConstructedDataChangeOfStateTime struct { *_BACnetConstructedData - ChangeOfStateTime BACnetDateTime + ChangeOfStateTime BACnetDateTime } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataChangeOfStateTime) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataChangeOfStateTime) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataChangeOfStateTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_CHANGE_OF_STATE_TIME -} +func (m *_BACnetConstructedDataChangeOfStateTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_CHANGE_OF_STATE_TIME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataChangeOfStateTime) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataChangeOfStateTime) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataChangeOfStateTime) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataChangeOfStateTime) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataChangeOfStateTime) GetActualValue() BACnetDateTim /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataChangeOfStateTime factory function for _BACnetConstructedDataChangeOfStateTime -func NewBACnetConstructedDataChangeOfStateTime(changeOfStateTime BACnetDateTime, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataChangeOfStateTime { +func NewBACnetConstructedDataChangeOfStateTime( changeOfStateTime BACnetDateTime , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataChangeOfStateTime { _result := &_BACnetConstructedDataChangeOfStateTime{ - ChangeOfStateTime: changeOfStateTime, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ChangeOfStateTime: changeOfStateTime, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataChangeOfStateTime(changeOfStateTime BACnetDateTime, // Deprecated: use the interface for direct cast func CastBACnetConstructedDataChangeOfStateTime(structType interface{}) BACnetConstructedDataChangeOfStateTime { - if casted, ok := structType.(BACnetConstructedDataChangeOfStateTime); ok { + if casted, ok := structType.(BACnetConstructedDataChangeOfStateTime); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataChangeOfStateTime); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataChangeOfStateTime) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetConstructedDataChangeOfStateTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataChangeOfStateTimeParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("changeOfStateTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for changeOfStateTime") } - _changeOfStateTime, _changeOfStateTimeErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) +_changeOfStateTime, _changeOfStateTimeErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) if _changeOfStateTimeErr != nil { return nil, errors.Wrap(_changeOfStateTimeErr, "Error parsing 'changeOfStateTime' field of BACnetConstructedDataChangeOfStateTime") } @@ -186,7 +188,7 @@ func BACnetConstructedDataChangeOfStateTimeParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataChangeOfStateTime{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ChangeOfStateTime: changeOfStateTime, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataChangeOfStateTime) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataChangeOfStateTime") } - // Simple Field (changeOfStateTime) - if pushErr := writeBuffer.PushContext("changeOfStateTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for changeOfStateTime") - } - _changeOfStateTimeErr := writeBuffer.WriteSerializable(ctx, m.GetChangeOfStateTime()) - if popErr := writeBuffer.PopContext("changeOfStateTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for changeOfStateTime") - } - if _changeOfStateTimeErr != nil { - return errors.Wrap(_changeOfStateTimeErr, "Error serializing 'changeOfStateTime' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (changeOfStateTime) + if pushErr := writeBuffer.PushContext("changeOfStateTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for changeOfStateTime") + } + _changeOfStateTimeErr := writeBuffer.WriteSerializable(ctx, m.GetChangeOfStateTime()) + if popErr := writeBuffer.PopContext("changeOfStateTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for changeOfStateTime") + } + if _changeOfStateTimeErr != nil { + return errors.Wrap(_changeOfStateTimeErr, "Error serializing 'changeOfStateTime' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataChangeOfStateTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataChangeOfStateTime") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataChangeOfStateTime) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataChangeOfStateTime) isBACnetConstructedDataChangeOfStateTime() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataChangeOfStateTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataChangesPending.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataChangesPending.go index 2ddb759c3f2..8a826d1f0c4 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataChangesPending.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataChangesPending.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataChangesPending is the corresponding interface of BACnetConstructedDataChangesPending type BACnetConstructedDataChangesPending interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataChangesPendingExactly interface { // _BACnetConstructedDataChangesPending is the data-structure of this message type _BACnetConstructedDataChangesPending struct { *_BACnetConstructedData - ChangesPending BACnetApplicationTagBoolean + ChangesPending BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataChangesPending) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataChangesPending) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataChangesPending) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_CHANGES_PENDING -} +func (m *_BACnetConstructedDataChangesPending) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_CHANGES_PENDING} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataChangesPending) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataChangesPending) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataChangesPending) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataChangesPending) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataChangesPending) GetActualValue() BACnetApplicatio /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataChangesPending factory function for _BACnetConstructedDataChangesPending -func NewBACnetConstructedDataChangesPending(changesPending BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataChangesPending { +func NewBACnetConstructedDataChangesPending( changesPending BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataChangesPending { _result := &_BACnetConstructedDataChangesPending{ - ChangesPending: changesPending, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ChangesPending: changesPending, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataChangesPending(changesPending BACnetApplicationTagB // Deprecated: use the interface for direct cast func CastBACnetConstructedDataChangesPending(structType interface{}) BACnetConstructedDataChangesPending { - if casted, ok := structType.(BACnetConstructedDataChangesPending); ok { + if casted, ok := structType.(BACnetConstructedDataChangesPending); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataChangesPending); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataChangesPending) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConstructedDataChangesPending) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataChangesPendingParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("changesPending"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for changesPending") } - _changesPending, _changesPendingErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_changesPending, _changesPendingErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _changesPendingErr != nil { return nil, errors.Wrap(_changesPendingErr, "Error parsing 'changesPending' field of BACnetConstructedDataChangesPending") } @@ -186,7 +188,7 @@ func BACnetConstructedDataChangesPendingParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetConstructedDataChangesPending{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ChangesPending: changesPending, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataChangesPending) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataChangesPending") } - // Simple Field (changesPending) - if pushErr := writeBuffer.PushContext("changesPending"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for changesPending") - } - _changesPendingErr := writeBuffer.WriteSerializable(ctx, m.GetChangesPending()) - if popErr := writeBuffer.PopContext("changesPending"); popErr != nil { - return errors.Wrap(popErr, "Error popping for changesPending") - } - if _changesPendingErr != nil { - return errors.Wrap(_changesPendingErr, "Error serializing 'changesPending' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (changesPending) + if pushErr := writeBuffer.PushContext("changesPending"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for changesPending") + } + _changesPendingErr := writeBuffer.WriteSerializable(ctx, m.GetChangesPending()) + if popErr := writeBuffer.PopContext("changesPending"); popErr != nil { + return errors.Wrap(popErr, "Error popping for changesPending") + } + if _changesPendingErr != nil { + return errors.Wrap(_changesPendingErr, "Error serializing 'changesPending' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataChangesPending"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataChangesPending") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataChangesPending) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataChangesPending) isBACnetConstructedDataChangesPending() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataChangesPending) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataChannelAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataChannelAll.go index fbefb2a2c8c..e7471c57fb5 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataChannelAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataChannelAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataChannelAll is the corresponding interface of BACnetConstructedDataChannelAll type BACnetConstructedDataChannelAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataChannelAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataChannelAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_CHANNEL -} +func (m *_BACnetConstructedDataChannelAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_CHANNEL} -func (m *_BACnetConstructedDataChannelAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataChannelAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataChannelAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataChannelAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataChannelAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataChannelAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataChannelAll factory function for _BACnetConstructedDataChannelAll -func NewBACnetConstructedDataChannelAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataChannelAll { +func NewBACnetConstructedDataChannelAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataChannelAll { _result := &_BACnetConstructedDataChannelAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataChannelAll(openingTag BACnetOpeningTag, peekedTagHe // Deprecated: use the interface for direct cast func CastBACnetConstructedDataChannelAll(structType interface{}) BACnetConstructedDataChannelAll { - if casted, ok := structType.(BACnetConstructedDataChannelAll); ok { + if casted, ok := structType.(BACnetConstructedDataChannelAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataChannelAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataChannelAll) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataChannelAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataChannelAllParseWithBuffer(ctx context.Context, readBuf _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataChannelAllParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetConstructedDataChannelAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataChannelAll) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataChannelAll) isBACnetConstructedDataChannelAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataChannelAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataChannelListOfObjectPropertyReferences.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataChannelListOfObjectPropertyReferences.go index 1b7bcf185ca..bbae39d069f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataChannelListOfObjectPropertyReferences.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataChannelListOfObjectPropertyReferences.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataChannelListOfObjectPropertyReferences is the corresponding interface of BACnetConstructedDataChannelListOfObjectPropertyReferences type BACnetConstructedDataChannelListOfObjectPropertyReferences interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataChannelListOfObjectPropertyReferencesExactly interface // _BACnetConstructedDataChannelListOfObjectPropertyReferences is the data-structure of this message type _BACnetConstructedDataChannelListOfObjectPropertyReferences struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - References []BACnetDeviceObjectPropertyReference + NumberOfDataElements BACnetApplicationTagUnsignedInteger + References []BACnetDeviceObjectPropertyReference } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataChannelListOfObjectPropertyReferences) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_CHANNEL -} +func (m *_BACnetConstructedDataChannelListOfObjectPropertyReferences) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_CHANNEL} -func (m *_BACnetConstructedDataChannelListOfObjectPropertyReferences) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LIST_OF_OBJECT_PROPERTY_REFERENCES -} +func (m *_BACnetConstructedDataChannelListOfObjectPropertyReferences) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LIST_OF_OBJECT_PROPERTY_REFERENCES} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataChannelListOfObjectPropertyReferences) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataChannelListOfObjectPropertyReferences) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataChannelListOfObjectPropertyReferences) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataChannelListOfObjectPropertyReferences) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataChannelListOfObjectPropertyReferences) GetZero() /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataChannelListOfObjectPropertyReferences factory function for _BACnetConstructedDataChannelListOfObjectPropertyReferences -func NewBACnetConstructedDataChannelListOfObjectPropertyReferences(numberOfDataElements BACnetApplicationTagUnsignedInteger, references []BACnetDeviceObjectPropertyReference, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataChannelListOfObjectPropertyReferences { +func NewBACnetConstructedDataChannelListOfObjectPropertyReferences( numberOfDataElements BACnetApplicationTagUnsignedInteger , references []BACnetDeviceObjectPropertyReference , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataChannelListOfObjectPropertyReferences { _result := &_BACnetConstructedDataChannelListOfObjectPropertyReferences{ - NumberOfDataElements: numberOfDataElements, - References: references, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + References: references, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataChannelListOfObjectPropertyReferences(numberOfDataE // Deprecated: use the interface for direct cast func CastBACnetConstructedDataChannelListOfObjectPropertyReferences(structType interface{}) BACnetConstructedDataChannelListOfObjectPropertyReferences { - if casted, ok := structType.(BACnetConstructedDataChannelListOfObjectPropertyReferences); ok { + if casted, ok := structType.(BACnetConstructedDataChannelListOfObjectPropertyReferences); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataChannelListOfObjectPropertyReferences); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataChannelListOfObjectPropertyReferences) GetLengthI return lengthInBits } + func (m *_BACnetConstructedDataChannelListOfObjectPropertyReferences) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataChannelListOfObjectPropertyReferencesParseWithBuffer(c if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataChannelListOfObjectPropertyReferencesParseWithBuffer(c // Terminated array var references []BACnetDeviceObjectPropertyReference { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetDeviceObjectPropertyReferenceParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetDeviceObjectPropertyReferenceParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'references' field of BACnetConstructedDataChannelListOfObjectPropertyReferences") } @@ -235,11 +237,11 @@ func BACnetConstructedDataChannelListOfObjectPropertyReferencesParseWithBuffer(c // Create a partially initialized instance _child := &_BACnetConstructedDataChannelListOfObjectPropertyReferences{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - References: references, + References: references, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataChannelListOfObjectPropertyReferences) SerializeW if pushErr := writeBuffer.PushContext("BACnetConstructedDataChannelListOfObjectPropertyReferences"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataChannelListOfObjectPropertyReferences") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (references) - if pushErr := writeBuffer.PushContext("references", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for references") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetReferences() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetReferences()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'references' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("references", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for references") + } + + // Array Field (references) + if pushErr := writeBuffer.PushContext("references", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for references") + } + for _curItem, _element := range m.GetReferences() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetReferences()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'references' field") } + } + if popErr := writeBuffer.PopContext("references", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for references") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataChannelListOfObjectPropertyReferences"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataChannelListOfObjectPropertyReferences") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataChannelListOfObjectPropertyReferences) SerializeW return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataChannelListOfObjectPropertyReferences) isBACnetConstructedDataChannelListOfObjectPropertyReferences() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataChannelListOfObjectPropertyReferences) String() s } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataChannelNumber.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataChannelNumber.go index 296e2b9188a..312f86dd74d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataChannelNumber.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataChannelNumber.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataChannelNumber is the corresponding interface of BACnetConstructedDataChannelNumber type BACnetConstructedDataChannelNumber interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataChannelNumberExactly interface { // _BACnetConstructedDataChannelNumber is the data-structure of this message type _BACnetConstructedDataChannelNumber struct { *_BACnetConstructedData - ChannelNumber BACnetApplicationTagUnsignedInteger + ChannelNumber BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataChannelNumber) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataChannelNumber) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataChannelNumber) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_CHANNEL_NUMBER -} +func (m *_BACnetConstructedDataChannelNumber) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_CHANNEL_NUMBER} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataChannelNumber) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataChannelNumber) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataChannelNumber) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataChannelNumber) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataChannelNumber) GetActualValue() BACnetApplication /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataChannelNumber factory function for _BACnetConstructedDataChannelNumber -func NewBACnetConstructedDataChannelNumber(channelNumber BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataChannelNumber { +func NewBACnetConstructedDataChannelNumber( channelNumber BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataChannelNumber { _result := &_BACnetConstructedDataChannelNumber{ - ChannelNumber: channelNumber, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ChannelNumber: channelNumber, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataChannelNumber(channelNumber BACnetApplicationTagUns // Deprecated: use the interface for direct cast func CastBACnetConstructedDataChannelNumber(structType interface{}) BACnetConstructedDataChannelNumber { - if casted, ok := structType.(BACnetConstructedDataChannelNumber); ok { + if casted, ok := structType.(BACnetConstructedDataChannelNumber); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataChannelNumber); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataChannelNumber) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetConstructedDataChannelNumber) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataChannelNumberParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("channelNumber"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for channelNumber") } - _channelNumber, _channelNumberErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_channelNumber, _channelNumberErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _channelNumberErr != nil { return nil, errors.Wrap(_channelNumberErr, "Error parsing 'channelNumber' field of BACnetConstructedDataChannelNumber") } @@ -186,7 +188,7 @@ func BACnetConstructedDataChannelNumberParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetConstructedDataChannelNumber{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ChannelNumber: channelNumber, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataChannelNumber) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataChannelNumber") } - // Simple Field (channelNumber) - if pushErr := writeBuffer.PushContext("channelNumber"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for channelNumber") - } - _channelNumberErr := writeBuffer.WriteSerializable(ctx, m.GetChannelNumber()) - if popErr := writeBuffer.PopContext("channelNumber"); popErr != nil { - return errors.Wrap(popErr, "Error popping for channelNumber") - } - if _channelNumberErr != nil { - return errors.Wrap(_channelNumberErr, "Error serializing 'channelNumber' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (channelNumber) + if pushErr := writeBuffer.PushContext("channelNumber"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for channelNumber") + } + _channelNumberErr := writeBuffer.WriteSerializable(ctx, m.GetChannelNumber()) + if popErr := writeBuffer.PopContext("channelNumber"); popErr != nil { + return errors.Wrap(popErr, "Error popping for channelNumber") + } + if _channelNumberErr != nil { + return errors.Wrap(_channelNumberErr, "Error serializing 'channelNumber' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataChannelNumber"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataChannelNumber") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataChannelNumber) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataChannelNumber) isBACnetConstructedDataChannelNumber() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataChannelNumber) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataChannelPresentValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataChannelPresentValue.go index deb387fccc1..8fe1e16b0b4 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataChannelPresentValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataChannelPresentValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataChannelPresentValue is the corresponding interface of BACnetConstructedDataChannelPresentValue type BACnetConstructedDataChannelPresentValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataChannelPresentValueExactly interface { // _BACnetConstructedDataChannelPresentValue is the data-structure of this message type _BACnetConstructedDataChannelPresentValue struct { *_BACnetConstructedData - PresentValue BACnetChannelValue + PresentValue BACnetChannelValue } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataChannelPresentValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_CHANNEL -} +func (m *_BACnetConstructedDataChannelPresentValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_CHANNEL} -func (m *_BACnetConstructedDataChannelPresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PRESENT_VALUE -} +func (m *_BACnetConstructedDataChannelPresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PRESENT_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataChannelPresentValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataChannelPresentValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataChannelPresentValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataChannelPresentValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataChannelPresentValue) GetActualValue() BACnetChann /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataChannelPresentValue factory function for _BACnetConstructedDataChannelPresentValue -func NewBACnetConstructedDataChannelPresentValue(presentValue BACnetChannelValue, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataChannelPresentValue { +func NewBACnetConstructedDataChannelPresentValue( presentValue BACnetChannelValue , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataChannelPresentValue { _result := &_BACnetConstructedDataChannelPresentValue{ - PresentValue: presentValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PresentValue: presentValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataChannelPresentValue(presentValue BACnetChannelValue // Deprecated: use the interface for direct cast func CastBACnetConstructedDataChannelPresentValue(structType interface{}) BACnetConstructedDataChannelPresentValue { - if casted, ok := structType.(BACnetConstructedDataChannelPresentValue); ok { + if casted, ok := structType.(BACnetConstructedDataChannelPresentValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataChannelPresentValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataChannelPresentValue) GetLengthInBits(ctx context. return lengthInBits } + func (m *_BACnetConstructedDataChannelPresentValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataChannelPresentValueParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("presentValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for presentValue") } - _presentValue, _presentValueErr := BACnetChannelValueParseWithBuffer(ctx, readBuffer) +_presentValue, _presentValueErr := BACnetChannelValueParseWithBuffer(ctx, readBuffer) if _presentValueErr != nil { return nil, errors.Wrap(_presentValueErr, "Error parsing 'presentValue' field of BACnetConstructedDataChannelPresentValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataChannelPresentValueParseWithBuffer(ctx context.Context // Create a partially initialized instance _child := &_BACnetConstructedDataChannelPresentValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PresentValue: presentValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataChannelPresentValue) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataChannelPresentValue") } - // Simple Field (presentValue) - if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for presentValue") - } - _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) - if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for presentValue") - } - if _presentValueErr != nil { - return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (presentValue) + if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for presentValue") + } + _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) + if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for presentValue") + } + if _presentValueErr != nil { + return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataChannelPresentValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataChannelPresentValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataChannelPresentValue) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataChannelPresentValue) isBACnetConstructedDataChannelPresentValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataChannelPresentValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCharacterStringValueAlarmValues.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCharacterStringValueAlarmValues.go index 22ad4fb276d..53fb4b13769 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCharacterStringValueAlarmValues.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCharacterStringValueAlarmValues.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataCharacterStringValueAlarmValues is the corresponding interface of BACnetConstructedDataCharacterStringValueAlarmValues type BACnetConstructedDataCharacterStringValueAlarmValues interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataCharacterStringValueAlarmValuesExactly interface { // _BACnetConstructedDataCharacterStringValueAlarmValues is the data-structure of this message type _BACnetConstructedDataCharacterStringValueAlarmValues struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - AlarmValues []BACnetOptionalCharacterString + NumberOfDataElements BACnetApplicationTagUnsignedInteger + AlarmValues []BACnetOptionalCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataCharacterStringValueAlarmValues) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_CHARACTERSTRING_VALUE -} +func (m *_BACnetConstructedDataCharacterStringValueAlarmValues) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_CHARACTERSTRING_VALUE} -func (m *_BACnetConstructedDataCharacterStringValueAlarmValues) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALARM_VALUES -} +func (m *_BACnetConstructedDataCharacterStringValueAlarmValues) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALARM_VALUES} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataCharacterStringValueAlarmValues) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataCharacterStringValueAlarmValues) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataCharacterStringValueAlarmValues) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataCharacterStringValueAlarmValues) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataCharacterStringValueAlarmValues) GetZero() uint64 /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataCharacterStringValueAlarmValues factory function for _BACnetConstructedDataCharacterStringValueAlarmValues -func NewBACnetConstructedDataCharacterStringValueAlarmValues(numberOfDataElements BACnetApplicationTagUnsignedInteger, alarmValues []BACnetOptionalCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataCharacterStringValueAlarmValues { +func NewBACnetConstructedDataCharacterStringValueAlarmValues( numberOfDataElements BACnetApplicationTagUnsignedInteger , alarmValues []BACnetOptionalCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataCharacterStringValueAlarmValues { _result := &_BACnetConstructedDataCharacterStringValueAlarmValues{ - NumberOfDataElements: numberOfDataElements, - AlarmValues: alarmValues, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + AlarmValues: alarmValues, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataCharacterStringValueAlarmValues(numberOfDataElement // Deprecated: use the interface for direct cast func CastBACnetConstructedDataCharacterStringValueAlarmValues(structType interface{}) BACnetConstructedDataCharacterStringValueAlarmValues { - if casted, ok := structType.(BACnetConstructedDataCharacterStringValueAlarmValues); ok { + if casted, ok := structType.(BACnetConstructedDataCharacterStringValueAlarmValues); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataCharacterStringValueAlarmValues); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataCharacterStringValueAlarmValues) GetLengthInBits( return lengthInBits } + func (m *_BACnetConstructedDataCharacterStringValueAlarmValues) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataCharacterStringValueAlarmValuesParseWithBuffer(ctx con if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataCharacterStringValueAlarmValuesParseWithBuffer(ctx con // Terminated array var alarmValues []BACnetOptionalCharacterString { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetOptionalCharacterStringParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetOptionalCharacterStringParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'alarmValues' field of BACnetConstructedDataCharacterStringValueAlarmValues") } @@ -235,11 +237,11 @@ func BACnetConstructedDataCharacterStringValueAlarmValuesParseWithBuffer(ctx con // Create a partially initialized instance _child := &_BACnetConstructedDataCharacterStringValueAlarmValues{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - AlarmValues: alarmValues, + AlarmValues: alarmValues, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataCharacterStringValueAlarmValues) SerializeWithWri if pushErr := writeBuffer.PushContext("BACnetConstructedDataCharacterStringValueAlarmValues"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataCharacterStringValueAlarmValues") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (alarmValues) - if pushErr := writeBuffer.PushContext("alarmValues", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for alarmValues") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetAlarmValues() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAlarmValues()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'alarmValues' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("alarmValues", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for alarmValues") + } + + // Array Field (alarmValues) + if pushErr := writeBuffer.PushContext("alarmValues", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for alarmValues") + } + for _curItem, _element := range m.GetAlarmValues() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAlarmValues()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'alarmValues' field") } + } + if popErr := writeBuffer.PopContext("alarmValues", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for alarmValues") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataCharacterStringValueAlarmValues"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataCharacterStringValueAlarmValues") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataCharacterStringValueAlarmValues) SerializeWithWri return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataCharacterStringValueAlarmValues) isBACnetConstructedDataCharacterStringValueAlarmValues() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataCharacterStringValueAlarmValues) String() string } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCharacterStringValueFaultValues.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCharacterStringValueFaultValues.go index 6cf163f0f6c..7bbdf768329 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCharacterStringValueFaultValues.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCharacterStringValueFaultValues.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataCharacterStringValueFaultValues is the corresponding interface of BACnetConstructedDataCharacterStringValueFaultValues type BACnetConstructedDataCharacterStringValueFaultValues interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataCharacterStringValueFaultValuesExactly interface { // _BACnetConstructedDataCharacterStringValueFaultValues is the data-structure of this message type _BACnetConstructedDataCharacterStringValueFaultValues struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - FaultValues []BACnetOptionalCharacterString + NumberOfDataElements BACnetApplicationTagUnsignedInteger + FaultValues []BACnetOptionalCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataCharacterStringValueFaultValues) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_CHARACTERSTRING_VALUE -} +func (m *_BACnetConstructedDataCharacterStringValueFaultValues) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_CHARACTERSTRING_VALUE} -func (m *_BACnetConstructedDataCharacterStringValueFaultValues) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FAULT_VALUES -} +func (m *_BACnetConstructedDataCharacterStringValueFaultValues) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FAULT_VALUES} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataCharacterStringValueFaultValues) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataCharacterStringValueFaultValues) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataCharacterStringValueFaultValues) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataCharacterStringValueFaultValues) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataCharacterStringValueFaultValues) GetZero() uint64 /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataCharacterStringValueFaultValues factory function for _BACnetConstructedDataCharacterStringValueFaultValues -func NewBACnetConstructedDataCharacterStringValueFaultValues(numberOfDataElements BACnetApplicationTagUnsignedInteger, faultValues []BACnetOptionalCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataCharacterStringValueFaultValues { +func NewBACnetConstructedDataCharacterStringValueFaultValues( numberOfDataElements BACnetApplicationTagUnsignedInteger , faultValues []BACnetOptionalCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataCharacterStringValueFaultValues { _result := &_BACnetConstructedDataCharacterStringValueFaultValues{ - NumberOfDataElements: numberOfDataElements, - FaultValues: faultValues, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + FaultValues: faultValues, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataCharacterStringValueFaultValues(numberOfDataElement // Deprecated: use the interface for direct cast func CastBACnetConstructedDataCharacterStringValueFaultValues(structType interface{}) BACnetConstructedDataCharacterStringValueFaultValues { - if casted, ok := structType.(BACnetConstructedDataCharacterStringValueFaultValues); ok { + if casted, ok := structType.(BACnetConstructedDataCharacterStringValueFaultValues); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataCharacterStringValueFaultValues); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataCharacterStringValueFaultValues) GetLengthInBits( return lengthInBits } + func (m *_BACnetConstructedDataCharacterStringValueFaultValues) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataCharacterStringValueFaultValuesParseWithBuffer(ctx con if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataCharacterStringValueFaultValuesParseWithBuffer(ctx con // Terminated array var faultValues []BACnetOptionalCharacterString { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetOptionalCharacterStringParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetOptionalCharacterStringParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'faultValues' field of BACnetConstructedDataCharacterStringValueFaultValues") } @@ -235,11 +237,11 @@ func BACnetConstructedDataCharacterStringValueFaultValuesParseWithBuffer(ctx con // Create a partially initialized instance _child := &_BACnetConstructedDataCharacterStringValueFaultValues{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - FaultValues: faultValues, + FaultValues: faultValues, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataCharacterStringValueFaultValues) SerializeWithWri if pushErr := writeBuffer.PushContext("BACnetConstructedDataCharacterStringValueFaultValues"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataCharacterStringValueFaultValues") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (faultValues) - if pushErr := writeBuffer.PushContext("faultValues", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for faultValues") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetFaultValues() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetFaultValues()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'faultValues' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("faultValues", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for faultValues") + } + + // Array Field (faultValues) + if pushErr := writeBuffer.PushContext("faultValues", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for faultValues") + } + for _curItem, _element := range m.GetFaultValues() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetFaultValues()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'faultValues' field") } + } + if popErr := writeBuffer.PopContext("faultValues", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for faultValues") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataCharacterStringValueFaultValues"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataCharacterStringValueFaultValues") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataCharacterStringValueFaultValues) SerializeWithWri return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataCharacterStringValueFaultValues) isBACnetConstructedDataCharacterStringValueFaultValues() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataCharacterStringValueFaultValues) String() string } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCharacterStringValuePresentValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCharacterStringValuePresentValue.go index 58d7b5bc3f4..f1c55cefed3 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCharacterStringValuePresentValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCharacterStringValuePresentValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataCharacterStringValuePresentValue is the corresponding interface of BACnetConstructedDataCharacterStringValuePresentValue type BACnetConstructedDataCharacterStringValuePresentValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataCharacterStringValuePresentValueExactly interface { // _BACnetConstructedDataCharacterStringValuePresentValue is the data-structure of this message type _BACnetConstructedDataCharacterStringValuePresentValue struct { *_BACnetConstructedData - PresentValue BACnetApplicationTagCharacterString + PresentValue BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataCharacterStringValuePresentValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_CHARACTERSTRING_VALUE -} +func (m *_BACnetConstructedDataCharacterStringValuePresentValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_CHARACTERSTRING_VALUE} -func (m *_BACnetConstructedDataCharacterStringValuePresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PRESENT_VALUE -} +func (m *_BACnetConstructedDataCharacterStringValuePresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PRESENT_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataCharacterStringValuePresentValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataCharacterStringValuePresentValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataCharacterStringValuePresentValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataCharacterStringValuePresentValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataCharacterStringValuePresentValue) GetActualValue( /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataCharacterStringValuePresentValue factory function for _BACnetConstructedDataCharacterStringValuePresentValue -func NewBACnetConstructedDataCharacterStringValuePresentValue(presentValue BACnetApplicationTagCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataCharacterStringValuePresentValue { +func NewBACnetConstructedDataCharacterStringValuePresentValue( presentValue BACnetApplicationTagCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataCharacterStringValuePresentValue { _result := &_BACnetConstructedDataCharacterStringValuePresentValue{ - PresentValue: presentValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PresentValue: presentValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataCharacterStringValuePresentValue(presentValue BACne // Deprecated: use the interface for direct cast func CastBACnetConstructedDataCharacterStringValuePresentValue(structType interface{}) BACnetConstructedDataCharacterStringValuePresentValue { - if casted, ok := structType.(BACnetConstructedDataCharacterStringValuePresentValue); ok { + if casted, ok := structType.(BACnetConstructedDataCharacterStringValuePresentValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataCharacterStringValuePresentValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataCharacterStringValuePresentValue) GetLengthInBits return lengthInBits } + func (m *_BACnetConstructedDataCharacterStringValuePresentValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataCharacterStringValuePresentValueParseWithBuffer(ctx co if pullErr := readBuffer.PullContext("presentValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for presentValue") } - _presentValue, _presentValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_presentValue, _presentValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _presentValueErr != nil { return nil, errors.Wrap(_presentValueErr, "Error parsing 'presentValue' field of BACnetConstructedDataCharacterStringValuePresentValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataCharacterStringValuePresentValueParseWithBuffer(ctx co // Create a partially initialized instance _child := &_BACnetConstructedDataCharacterStringValuePresentValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PresentValue: presentValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataCharacterStringValuePresentValue) SerializeWithWr return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataCharacterStringValuePresentValue") } - // Simple Field (presentValue) - if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for presentValue") - } - _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) - if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for presentValue") - } - if _presentValueErr != nil { - return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (presentValue) + if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for presentValue") + } + _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) + if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for presentValue") + } + if _presentValueErr != nil { + return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataCharacterStringValuePresentValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataCharacterStringValuePresentValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataCharacterStringValuePresentValue) SerializeWithWr return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataCharacterStringValuePresentValue) isBACnetConstructedDataCharacterStringValuePresentValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataCharacterStringValuePresentValue) String() string } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCharacterStringValueRelinquishDefault.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCharacterStringValueRelinquishDefault.go index 68da1d8b143..06b01776382 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCharacterStringValueRelinquishDefault.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCharacterStringValueRelinquishDefault.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataCharacterStringValueRelinquishDefault is the corresponding interface of BACnetConstructedDataCharacterStringValueRelinquishDefault type BACnetConstructedDataCharacterStringValueRelinquishDefault interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataCharacterStringValueRelinquishDefaultExactly interface // _BACnetConstructedDataCharacterStringValueRelinquishDefault is the data-structure of this message type _BACnetConstructedDataCharacterStringValueRelinquishDefault struct { *_BACnetConstructedData - RelinquishDefault BACnetApplicationTagCharacterString + RelinquishDefault BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataCharacterStringValueRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_CHARACTERSTRING_VALUE -} +func (m *_BACnetConstructedDataCharacterStringValueRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_CHARACTERSTRING_VALUE} -func (m *_BACnetConstructedDataCharacterStringValueRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_RELINQUISH_DEFAULT -} +func (m *_BACnetConstructedDataCharacterStringValueRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_RELINQUISH_DEFAULT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataCharacterStringValueRelinquishDefault) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataCharacterStringValueRelinquishDefault) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataCharacterStringValueRelinquishDefault) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataCharacterStringValueRelinquishDefault) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataCharacterStringValueRelinquishDefault) GetActualV /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataCharacterStringValueRelinquishDefault factory function for _BACnetConstructedDataCharacterStringValueRelinquishDefault -func NewBACnetConstructedDataCharacterStringValueRelinquishDefault(relinquishDefault BACnetApplicationTagCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataCharacterStringValueRelinquishDefault { +func NewBACnetConstructedDataCharacterStringValueRelinquishDefault( relinquishDefault BACnetApplicationTagCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataCharacterStringValueRelinquishDefault { _result := &_BACnetConstructedDataCharacterStringValueRelinquishDefault{ - RelinquishDefault: relinquishDefault, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + RelinquishDefault: relinquishDefault, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataCharacterStringValueRelinquishDefault(relinquishDef // Deprecated: use the interface for direct cast func CastBACnetConstructedDataCharacterStringValueRelinquishDefault(structType interface{}) BACnetConstructedDataCharacterStringValueRelinquishDefault { - if casted, ok := structType.(BACnetConstructedDataCharacterStringValueRelinquishDefault); ok { + if casted, ok := structType.(BACnetConstructedDataCharacterStringValueRelinquishDefault); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataCharacterStringValueRelinquishDefault); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataCharacterStringValueRelinquishDefault) GetLengthI return lengthInBits } + func (m *_BACnetConstructedDataCharacterStringValueRelinquishDefault) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataCharacterStringValueRelinquishDefaultParseWithBuffer(c if pullErr := readBuffer.PullContext("relinquishDefault"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for relinquishDefault") } - _relinquishDefault, _relinquishDefaultErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_relinquishDefault, _relinquishDefaultErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _relinquishDefaultErr != nil { return nil, errors.Wrap(_relinquishDefaultErr, "Error parsing 'relinquishDefault' field of BACnetConstructedDataCharacterStringValueRelinquishDefault") } @@ -186,7 +188,7 @@ func BACnetConstructedDataCharacterStringValueRelinquishDefaultParseWithBuffer(c // Create a partially initialized instance _child := &_BACnetConstructedDataCharacterStringValueRelinquishDefault{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, RelinquishDefault: relinquishDefault, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataCharacterStringValueRelinquishDefault) SerializeW return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataCharacterStringValueRelinquishDefault") } - // Simple Field (relinquishDefault) - if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for relinquishDefault") - } - _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) - if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { - return errors.Wrap(popErr, "Error popping for relinquishDefault") - } - if _relinquishDefaultErr != nil { - return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (relinquishDefault) + if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for relinquishDefault") + } + _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) + if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { + return errors.Wrap(popErr, "Error popping for relinquishDefault") + } + if _relinquishDefaultErr != nil { + return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataCharacterStringValueRelinquishDefault"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataCharacterStringValueRelinquishDefault") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataCharacterStringValueRelinquishDefault) SerializeW return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataCharacterStringValueRelinquishDefault) isBACnetConstructedDataCharacterStringValueRelinquishDefault() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataCharacterStringValueRelinquishDefault) String() s } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCharacterstringValueAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCharacterstringValueAll.go index 688acd70946..a8ba8df805a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCharacterstringValueAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCharacterstringValueAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataCharacterstringValueAll is the corresponding interface of BACnetConstructedDataCharacterstringValueAll type BACnetConstructedDataCharacterstringValueAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataCharacterstringValueAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataCharacterstringValueAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_CHARACTERSTRING_VALUE -} +func (m *_BACnetConstructedDataCharacterstringValueAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_CHARACTERSTRING_VALUE} -func (m *_BACnetConstructedDataCharacterstringValueAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataCharacterstringValueAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataCharacterstringValueAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataCharacterstringValueAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataCharacterstringValueAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataCharacterstringValueAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataCharacterstringValueAll factory function for _BACnetConstructedDataCharacterstringValueAll -func NewBACnetConstructedDataCharacterstringValueAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataCharacterstringValueAll { +func NewBACnetConstructedDataCharacterstringValueAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataCharacterstringValueAll { _result := &_BACnetConstructedDataCharacterstringValueAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataCharacterstringValueAll(openingTag BACnetOpeningTag // Deprecated: use the interface for direct cast func CastBACnetConstructedDataCharacterstringValueAll(structType interface{}) BACnetConstructedDataCharacterstringValueAll { - if casted, ok := structType.(BACnetConstructedDataCharacterstringValueAll); ok { + if casted, ok := structType.(BACnetConstructedDataCharacterstringValueAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataCharacterstringValueAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataCharacterstringValueAll) GetLengthInBits(ctx cont return lengthInBits } + func (m *_BACnetConstructedDataCharacterstringValueAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataCharacterstringValueAllParseWithBuffer(ctx context.Con _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataCharacterstringValueAllParseWithBuffer(ctx context.Con // Create a partially initialized instance _child := &_BACnetConstructedDataCharacterstringValueAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataCharacterstringValueAll) SerializeWithWriteBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataCharacterstringValueAll) isBACnetConstructedDataCharacterstringValueAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataCharacterstringValueAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataClientCOVIncrement.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataClientCOVIncrement.go index 961495234e4..46599079e09 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataClientCOVIncrement.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataClientCOVIncrement.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataClientCOVIncrement is the corresponding interface of BACnetConstructedDataClientCOVIncrement type BACnetConstructedDataClientCOVIncrement interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataClientCOVIncrementExactly interface { // _BACnetConstructedDataClientCOVIncrement is the data-structure of this message type _BACnetConstructedDataClientCOVIncrement struct { *_BACnetConstructedData - CovIncrement BACnetClientCOV + CovIncrement BACnetClientCOV } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataClientCOVIncrement) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataClientCOVIncrement) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataClientCOVIncrement) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_CLIENT_COV_INCREMENT -} +func (m *_BACnetConstructedDataClientCOVIncrement) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_CLIENT_COV_INCREMENT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataClientCOVIncrement) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataClientCOVIncrement) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataClientCOVIncrement) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataClientCOVIncrement) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataClientCOVIncrement) GetActualValue() BACnetClient /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataClientCOVIncrement factory function for _BACnetConstructedDataClientCOVIncrement -func NewBACnetConstructedDataClientCOVIncrement(covIncrement BACnetClientCOV, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataClientCOVIncrement { +func NewBACnetConstructedDataClientCOVIncrement( covIncrement BACnetClientCOV , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataClientCOVIncrement { _result := &_BACnetConstructedDataClientCOVIncrement{ - CovIncrement: covIncrement, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + CovIncrement: covIncrement, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataClientCOVIncrement(covIncrement BACnetClientCOV, op // Deprecated: use the interface for direct cast func CastBACnetConstructedDataClientCOVIncrement(structType interface{}) BACnetConstructedDataClientCOVIncrement { - if casted, ok := structType.(BACnetConstructedDataClientCOVIncrement); ok { + if casted, ok := structType.(BACnetConstructedDataClientCOVIncrement); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataClientCOVIncrement); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataClientCOVIncrement) GetLengthInBits(ctx context.C return lengthInBits } + func (m *_BACnetConstructedDataClientCOVIncrement) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataClientCOVIncrementParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("covIncrement"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for covIncrement") } - _covIncrement, _covIncrementErr := BACnetClientCOVParseWithBuffer(ctx, readBuffer) +_covIncrement, _covIncrementErr := BACnetClientCOVParseWithBuffer(ctx, readBuffer) if _covIncrementErr != nil { return nil, errors.Wrap(_covIncrementErr, "Error parsing 'covIncrement' field of BACnetConstructedDataClientCOVIncrement") } @@ -186,7 +188,7 @@ func BACnetConstructedDataClientCOVIncrementParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataClientCOVIncrement{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, CovIncrement: covIncrement, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataClientCOVIncrement) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataClientCOVIncrement") } - // Simple Field (covIncrement) - if pushErr := writeBuffer.PushContext("covIncrement"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for covIncrement") - } - _covIncrementErr := writeBuffer.WriteSerializable(ctx, m.GetCovIncrement()) - if popErr := writeBuffer.PopContext("covIncrement"); popErr != nil { - return errors.Wrap(popErr, "Error popping for covIncrement") - } - if _covIncrementErr != nil { - return errors.Wrap(_covIncrementErr, "Error serializing 'covIncrement' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (covIncrement) + if pushErr := writeBuffer.PushContext("covIncrement"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for covIncrement") + } + _covIncrementErr := writeBuffer.WriteSerializable(ctx, m.GetCovIncrement()) + if popErr := writeBuffer.PopContext("covIncrement"); popErr != nil { + return errors.Wrap(popErr, "Error popping for covIncrement") + } + if _covIncrementErr != nil { + return errors.Wrap(_covIncrementErr, "Error serializing 'covIncrement' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataClientCOVIncrement"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataClientCOVIncrement") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataClientCOVIncrement) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataClientCOVIncrement) isBACnetConstructedDataClientCOVIncrement() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataClientCOVIncrement) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCommand.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCommand.go index 536cf60310f..a0338cf6377 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCommand.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCommand.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataCommand is the corresponding interface of BACnetConstructedDataCommand type BACnetConstructedDataCommand interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataCommandExactly interface { // _BACnetConstructedDataCommand is the data-structure of this message type _BACnetConstructedDataCommand struct { *_BACnetConstructedData - Command BACnetNetworkPortCommandTagged + Command BACnetNetworkPortCommandTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataCommand) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataCommand) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataCommand) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_COMMAND -} +func (m *_BACnetConstructedDataCommand) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_COMMAND} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataCommand) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataCommand) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataCommand) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataCommand) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataCommand) GetActualValue() BACnetNetworkPortComman /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataCommand factory function for _BACnetConstructedDataCommand -func NewBACnetConstructedDataCommand(command BACnetNetworkPortCommandTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataCommand { +func NewBACnetConstructedDataCommand( command BACnetNetworkPortCommandTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataCommand { _result := &_BACnetConstructedDataCommand{ - Command: command, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Command: command, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataCommand(command BACnetNetworkPortCommandTagged, ope // Deprecated: use the interface for direct cast func CastBACnetConstructedDataCommand(structType interface{}) BACnetConstructedDataCommand { - if casted, ok := structType.(BACnetConstructedDataCommand); ok { + if casted, ok := structType.(BACnetConstructedDataCommand); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataCommand); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataCommand) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_BACnetConstructedDataCommand) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataCommandParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("command"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for command") } - _command, _commandErr := BACnetNetworkPortCommandTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_command, _commandErr := BACnetNetworkPortCommandTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _commandErr != nil { return nil, errors.Wrap(_commandErr, "Error parsing 'command' field of BACnetConstructedDataCommand") } @@ -186,7 +188,7 @@ func BACnetConstructedDataCommandParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_BACnetConstructedDataCommand{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Command: command, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataCommand) SerializeWithWriteBuffer(ctx context.Con return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataCommand") } - // Simple Field (command) - if pushErr := writeBuffer.PushContext("command"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for command") - } - _commandErr := writeBuffer.WriteSerializable(ctx, m.GetCommand()) - if popErr := writeBuffer.PopContext("command"); popErr != nil { - return errors.Wrap(popErr, "Error popping for command") - } - if _commandErr != nil { - return errors.Wrap(_commandErr, "Error serializing 'command' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (command) + if pushErr := writeBuffer.PushContext("command"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for command") + } + _commandErr := writeBuffer.WriteSerializable(ctx, m.GetCommand()) + if popErr := writeBuffer.PopContext("command"); popErr != nil { + return errors.Wrap(popErr, "Error popping for command") + } + if _commandErr != nil { + return errors.Wrap(_commandErr, "Error serializing 'command' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataCommand"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataCommand") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataCommand) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataCommand) isBACnetConstructedDataCommand() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataCommand) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCommandAction.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCommandAction.go index 9db0b1ca154..3089c411b20 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCommandAction.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCommandAction.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataCommandAction is the corresponding interface of BACnetConstructedDataCommandAction type BACnetConstructedDataCommandAction interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataCommandActionExactly interface { // _BACnetConstructedDataCommandAction is the data-structure of this message type _BACnetConstructedDataCommandAction struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - ActionLists []BACnetActionList + NumberOfDataElements BACnetApplicationTagUnsignedInteger + ActionLists []BACnetActionList } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataCommandAction) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_COMMAND -} +func (m *_BACnetConstructedDataCommandAction) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_COMMAND} -func (m *_BACnetConstructedDataCommandAction) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ACTION -} +func (m *_BACnetConstructedDataCommandAction) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ACTION} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataCommandAction) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataCommandAction) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataCommandAction) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataCommandAction) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataCommandAction) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataCommandAction factory function for _BACnetConstructedDataCommandAction -func NewBACnetConstructedDataCommandAction(numberOfDataElements BACnetApplicationTagUnsignedInteger, actionLists []BACnetActionList, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataCommandAction { +func NewBACnetConstructedDataCommandAction( numberOfDataElements BACnetApplicationTagUnsignedInteger , actionLists []BACnetActionList , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataCommandAction { _result := &_BACnetConstructedDataCommandAction{ - NumberOfDataElements: numberOfDataElements, - ActionLists: actionLists, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + ActionLists: actionLists, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataCommandAction(numberOfDataElements BACnetApplicatio // Deprecated: use the interface for direct cast func CastBACnetConstructedDataCommandAction(structType interface{}) BACnetConstructedDataCommandAction { - if casted, ok := structType.(BACnetConstructedDataCommandAction); ok { + if casted, ok := structType.(BACnetConstructedDataCommandAction); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataCommandAction); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataCommandAction) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetConstructedDataCommandAction) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataCommandActionParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataCommandActionParseWithBuffer(ctx context.Context, read // Terminated array var actionLists []BACnetActionList { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetActionListParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetActionListParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'actionLists' field of BACnetConstructedDataCommandAction") } @@ -235,11 +237,11 @@ func BACnetConstructedDataCommandActionParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetConstructedDataCommandAction{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - ActionLists: actionLists, + ActionLists: actionLists, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataCommandAction) SerializeWithWriteBuffer(ctx conte if pushErr := writeBuffer.PushContext("BACnetConstructedDataCommandAction"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataCommandAction") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (actionLists) - if pushErr := writeBuffer.PushContext("actionLists", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for actionLists") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetActionLists() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetActionLists()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'actionLists' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("actionLists", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for actionLists") + } + + // Array Field (actionLists) + if pushErr := writeBuffer.PushContext("actionLists", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for actionLists") + } + for _curItem, _element := range m.GetActionLists() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetActionLists()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'actionLists' field") } + } + if popErr := writeBuffer.PopContext("actionLists", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for actionLists") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataCommandAction"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataCommandAction") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataCommandAction) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataCommandAction) isBACnetConstructedDataCommandAction() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataCommandAction) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCommandAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCommandAll.go index 999cd46c398..e0703a1a6c4 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCommandAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCommandAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataCommandAll is the corresponding interface of BACnetConstructedDataCommandAll type BACnetConstructedDataCommandAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataCommandAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataCommandAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_COMMAND -} +func (m *_BACnetConstructedDataCommandAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_COMMAND} -func (m *_BACnetConstructedDataCommandAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataCommandAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataCommandAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataCommandAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataCommandAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataCommandAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataCommandAll factory function for _BACnetConstructedDataCommandAll -func NewBACnetConstructedDataCommandAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataCommandAll { +func NewBACnetConstructedDataCommandAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataCommandAll { _result := &_BACnetConstructedDataCommandAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataCommandAll(openingTag BACnetOpeningTag, peekedTagHe // Deprecated: use the interface for direct cast func CastBACnetConstructedDataCommandAll(structType interface{}) BACnetConstructedDataCommandAll { - if casted, ok := structType.(BACnetConstructedDataCommandAll); ok { + if casted, ok := structType.(BACnetConstructedDataCommandAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataCommandAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataCommandAll) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataCommandAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataCommandAllParseWithBuffer(ctx context.Context, readBuf _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataCommandAllParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetConstructedDataCommandAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataCommandAll) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataCommandAll) isBACnetConstructedDataCommandAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataCommandAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCommandTimeArray.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCommandTimeArray.go index eabd329a6b5..9b7639d0833 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCommandTimeArray.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCommandTimeArray.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataCommandTimeArray is the corresponding interface of BACnetConstructedDataCommandTimeArray type BACnetConstructedDataCommandTimeArray interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataCommandTimeArrayExactly interface { // _BACnetConstructedDataCommandTimeArray is the data-structure of this message type _BACnetConstructedDataCommandTimeArray struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - CommandTimeArray []BACnetTimeStamp + NumberOfDataElements BACnetApplicationTagUnsignedInteger + CommandTimeArray []BACnetTimeStamp } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataCommandTimeArray) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataCommandTimeArray) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataCommandTimeArray) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_COMMAND_TIME_ARRAY -} +func (m *_BACnetConstructedDataCommandTimeArray) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_COMMAND_TIME_ARRAY} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataCommandTimeArray) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataCommandTimeArray) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataCommandTimeArray) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataCommandTimeArray) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataCommandTimeArray) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataCommandTimeArray factory function for _BACnetConstructedDataCommandTimeArray -func NewBACnetConstructedDataCommandTimeArray(numberOfDataElements BACnetApplicationTagUnsignedInteger, commandTimeArray []BACnetTimeStamp, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataCommandTimeArray { +func NewBACnetConstructedDataCommandTimeArray( numberOfDataElements BACnetApplicationTagUnsignedInteger , commandTimeArray []BACnetTimeStamp , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataCommandTimeArray { _result := &_BACnetConstructedDataCommandTimeArray{ - NumberOfDataElements: numberOfDataElements, - CommandTimeArray: commandTimeArray, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + CommandTimeArray: commandTimeArray, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataCommandTimeArray(numberOfDataElements BACnetApplica // Deprecated: use the interface for direct cast func CastBACnetConstructedDataCommandTimeArray(structType interface{}) BACnetConstructedDataCommandTimeArray { - if casted, ok := structType.(BACnetConstructedDataCommandTimeArray); ok { + if casted, ok := structType.(BACnetConstructedDataCommandTimeArray); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataCommandTimeArray); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataCommandTimeArray) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetConstructedDataCommandTimeArray) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataCommandTimeArrayParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataCommandTimeArrayParseWithBuffer(ctx context.Context, r // Terminated array var commandTimeArray []BACnetTimeStamp { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetTimeStampParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetTimeStampParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'commandTimeArray' field of BACnetConstructedDataCommandTimeArray") } @@ -229,7 +231,7 @@ func BACnetConstructedDataCommandTimeArrayParseWithBuffer(ctx context.Context, r } // Validation - if !(bool(bool((arrayIndexArgument) != (nil))) || bool(bool((len(commandTimeArray)) == (16)))) { + if (!(bool(bool((arrayIndexArgument) != (nil))) || bool(bool(((len(commandTimeArray))) == ((16)))))) { return nil, errors.WithStack(utils.ParseValidationError{"commandTimeArray should have exactly 16 values"}) } @@ -240,11 +242,11 @@ func BACnetConstructedDataCommandTimeArrayParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_BACnetConstructedDataCommandTimeArray{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - CommandTimeArray: commandTimeArray, + CommandTimeArray: commandTimeArray, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -265,43 +267,43 @@ func (m *_BACnetConstructedDataCommandTimeArray) SerializeWithWriteBuffer(ctx co if pushErr := writeBuffer.PushContext("BACnetConstructedDataCommandTimeArray"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataCommandTimeArray") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (commandTimeArray) - if pushErr := writeBuffer.PushContext("commandTimeArray", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for commandTimeArray") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetCommandTimeArray() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetCommandTimeArray()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'commandTimeArray' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("commandTimeArray", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for commandTimeArray") + } + + // Array Field (commandTimeArray) + if pushErr := writeBuffer.PushContext("commandTimeArray", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for commandTimeArray") + } + for _curItem, _element := range m.GetCommandTimeArray() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetCommandTimeArray()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'commandTimeArray' field") } + } + if popErr := writeBuffer.PopContext("commandTimeArray", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for commandTimeArray") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataCommandTimeArray"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataCommandTimeArray") @@ -311,6 +313,7 @@ func (m *_BACnetConstructedDataCommandTimeArray) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataCommandTimeArray) isBACnetConstructedDataCommandTimeArray() bool { return true } @@ -325,3 +328,6 @@ func (m *_BACnetConstructedDataCommandTimeArray) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataConfigurationFiles.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataConfigurationFiles.go index f818089d17a..f082bdbf2d7 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataConfigurationFiles.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataConfigurationFiles.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataConfigurationFiles is the corresponding interface of BACnetConstructedDataConfigurationFiles type BACnetConstructedDataConfigurationFiles interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataConfigurationFilesExactly interface { // _BACnetConstructedDataConfigurationFiles is the data-structure of this message type _BACnetConstructedDataConfigurationFiles struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - ConfigurationFiles []BACnetApplicationTagObjectIdentifier + NumberOfDataElements BACnetApplicationTagUnsignedInteger + ConfigurationFiles []BACnetApplicationTagObjectIdentifier } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataConfigurationFiles) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataConfigurationFiles) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataConfigurationFiles) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_CONFIGURATION_FILES -} +func (m *_BACnetConstructedDataConfigurationFiles) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_CONFIGURATION_FILES} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataConfigurationFiles) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataConfigurationFiles) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataConfigurationFiles) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataConfigurationFiles) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataConfigurationFiles) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataConfigurationFiles factory function for _BACnetConstructedDataConfigurationFiles -func NewBACnetConstructedDataConfigurationFiles(numberOfDataElements BACnetApplicationTagUnsignedInteger, configurationFiles []BACnetApplicationTagObjectIdentifier, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataConfigurationFiles { +func NewBACnetConstructedDataConfigurationFiles( numberOfDataElements BACnetApplicationTagUnsignedInteger , configurationFiles []BACnetApplicationTagObjectIdentifier , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataConfigurationFiles { _result := &_BACnetConstructedDataConfigurationFiles{ - NumberOfDataElements: numberOfDataElements, - ConfigurationFiles: configurationFiles, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + ConfigurationFiles: configurationFiles, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataConfigurationFiles(numberOfDataElements BACnetAppli // Deprecated: use the interface for direct cast func CastBACnetConstructedDataConfigurationFiles(structType interface{}) BACnetConstructedDataConfigurationFiles { - if casted, ok := structType.(BACnetConstructedDataConfigurationFiles); ok { + if casted, ok := structType.(BACnetConstructedDataConfigurationFiles); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataConfigurationFiles); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataConfigurationFiles) GetLengthInBits(ctx context.C return lengthInBits } + func (m *_BACnetConstructedDataConfigurationFiles) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataConfigurationFilesParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataConfigurationFilesParseWithBuffer(ctx context.Context, // Terminated array var configurationFiles []BACnetApplicationTagObjectIdentifier { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'configurationFiles' field of BACnetConstructedDataConfigurationFiles") } @@ -235,11 +237,11 @@ func BACnetConstructedDataConfigurationFilesParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataConfigurationFiles{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - ConfigurationFiles: configurationFiles, + ConfigurationFiles: configurationFiles, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataConfigurationFiles) SerializeWithWriteBuffer(ctx if pushErr := writeBuffer.PushContext("BACnetConstructedDataConfigurationFiles"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataConfigurationFiles") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (configurationFiles) - if pushErr := writeBuffer.PushContext("configurationFiles", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for configurationFiles") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetConfigurationFiles() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetConfigurationFiles()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'configurationFiles' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("configurationFiles", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for configurationFiles") + } + + // Array Field (configurationFiles) + if pushErr := writeBuffer.PushContext("configurationFiles", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for configurationFiles") + } + for _curItem, _element := range m.GetConfigurationFiles() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetConfigurationFiles()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'configurationFiles' field") } + } + if popErr := writeBuffer.PopContext("configurationFiles", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for configurationFiles") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataConfigurationFiles"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataConfigurationFiles") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataConfigurationFiles) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataConfigurationFiles) isBACnetConstructedDataConfigurationFiles() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataConfigurationFiles) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataControlGroups.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataControlGroups.go index 648d00ae91c..c3bf0f57749 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataControlGroups.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataControlGroups.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataControlGroups is the corresponding interface of BACnetConstructedDataControlGroups type BACnetConstructedDataControlGroups interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataControlGroupsExactly interface { // _BACnetConstructedDataControlGroups is the data-structure of this message type _BACnetConstructedDataControlGroups struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - ControlGroups []BACnetApplicationTagUnsignedInteger + NumberOfDataElements BACnetApplicationTagUnsignedInteger + ControlGroups []BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataControlGroups) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataControlGroups) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataControlGroups) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_CONTROL_GROUPS -} +func (m *_BACnetConstructedDataControlGroups) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_CONTROL_GROUPS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataControlGroups) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataControlGroups) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataControlGroups) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataControlGroups) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataControlGroups) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataControlGroups factory function for _BACnetConstructedDataControlGroups -func NewBACnetConstructedDataControlGroups(numberOfDataElements BACnetApplicationTagUnsignedInteger, controlGroups []BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataControlGroups { +func NewBACnetConstructedDataControlGroups( numberOfDataElements BACnetApplicationTagUnsignedInteger , controlGroups []BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataControlGroups { _result := &_BACnetConstructedDataControlGroups{ - NumberOfDataElements: numberOfDataElements, - ControlGroups: controlGroups, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + ControlGroups: controlGroups, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataControlGroups(numberOfDataElements BACnetApplicatio // Deprecated: use the interface for direct cast func CastBACnetConstructedDataControlGroups(structType interface{}) BACnetConstructedDataControlGroups { - if casted, ok := structType.(BACnetConstructedDataControlGroups); ok { + if casted, ok := structType.(BACnetConstructedDataControlGroups); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataControlGroups); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataControlGroups) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetConstructedDataControlGroups) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataControlGroupsParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataControlGroupsParseWithBuffer(ctx context.Context, read // Terminated array var controlGroups []BACnetApplicationTagUnsignedInteger { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'controlGroups' field of BACnetConstructedDataControlGroups") } @@ -235,11 +237,11 @@ func BACnetConstructedDataControlGroupsParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetConstructedDataControlGroups{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - ControlGroups: controlGroups, + ControlGroups: controlGroups, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataControlGroups) SerializeWithWriteBuffer(ctx conte if pushErr := writeBuffer.PushContext("BACnetConstructedDataControlGroups"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataControlGroups") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (controlGroups) - if pushErr := writeBuffer.PushContext("controlGroups", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for controlGroups") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetControlGroups() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetControlGroups()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'controlGroups' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("controlGroups", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for controlGroups") + } + + // Array Field (controlGroups) + if pushErr := writeBuffer.PushContext("controlGroups", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for controlGroups") + } + for _curItem, _element := range m.GetControlGroups() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetControlGroups()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'controlGroups' field") } + } + if popErr := writeBuffer.PopContext("controlGroups", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for controlGroups") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataControlGroups"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataControlGroups") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataControlGroups) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataControlGroups) isBACnetConstructedDataControlGroups() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataControlGroups) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataControlledVariableReference.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataControlledVariableReference.go index 630e564325a..b14d0e24823 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataControlledVariableReference.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataControlledVariableReference.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataControlledVariableReference is the corresponding interface of BACnetConstructedDataControlledVariableReference type BACnetConstructedDataControlledVariableReference interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataControlledVariableReferenceExactly interface { // _BACnetConstructedDataControlledVariableReference is the data-structure of this message type _BACnetConstructedDataControlledVariableReference struct { *_BACnetConstructedData - ControlledVariableReference BACnetObjectPropertyReference + ControlledVariableReference BACnetObjectPropertyReference } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataControlledVariableReference) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataControlledVariableReference) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataControlledVariableReference) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_CONTROLLED_VARIABLE_REFERENCE -} +func (m *_BACnetConstructedDataControlledVariableReference) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_CONTROLLED_VARIABLE_REFERENCE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataControlledVariableReference) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataControlledVariableReference) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataControlledVariableReference) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataControlledVariableReference) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataControlledVariableReference) GetActualValue() BAC /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataControlledVariableReference factory function for _BACnetConstructedDataControlledVariableReference -func NewBACnetConstructedDataControlledVariableReference(controlledVariableReference BACnetObjectPropertyReference, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataControlledVariableReference { +func NewBACnetConstructedDataControlledVariableReference( controlledVariableReference BACnetObjectPropertyReference , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataControlledVariableReference { _result := &_BACnetConstructedDataControlledVariableReference{ ControlledVariableReference: controlledVariableReference, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataControlledVariableReference(controlledVariableRefer // Deprecated: use the interface for direct cast func CastBACnetConstructedDataControlledVariableReference(structType interface{}) BACnetConstructedDataControlledVariableReference { - if casted, ok := structType.(BACnetConstructedDataControlledVariableReference); ok { + if casted, ok := structType.(BACnetConstructedDataControlledVariableReference); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataControlledVariableReference); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataControlledVariableReference) GetLengthInBits(ctx return lengthInBits } + func (m *_BACnetConstructedDataControlledVariableReference) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataControlledVariableReferenceParseWithBuffer(ctx context if pullErr := readBuffer.PullContext("controlledVariableReference"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for controlledVariableReference") } - _controlledVariableReference, _controlledVariableReferenceErr := BACnetObjectPropertyReferenceParseWithBuffer(ctx, readBuffer) +_controlledVariableReference, _controlledVariableReferenceErr := BACnetObjectPropertyReferenceParseWithBuffer(ctx, readBuffer) if _controlledVariableReferenceErr != nil { return nil, errors.Wrap(_controlledVariableReferenceErr, "Error parsing 'controlledVariableReference' field of BACnetConstructedDataControlledVariableReference") } @@ -186,7 +188,7 @@ func BACnetConstructedDataControlledVariableReferenceParseWithBuffer(ctx context // Create a partially initialized instance _child := &_BACnetConstructedDataControlledVariableReference{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ControlledVariableReference: controlledVariableReference, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataControlledVariableReference) SerializeWithWriteBu return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataControlledVariableReference") } - // Simple Field (controlledVariableReference) - if pushErr := writeBuffer.PushContext("controlledVariableReference"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for controlledVariableReference") - } - _controlledVariableReferenceErr := writeBuffer.WriteSerializable(ctx, m.GetControlledVariableReference()) - if popErr := writeBuffer.PopContext("controlledVariableReference"); popErr != nil { - return errors.Wrap(popErr, "Error popping for controlledVariableReference") - } - if _controlledVariableReferenceErr != nil { - return errors.Wrap(_controlledVariableReferenceErr, "Error serializing 'controlledVariableReference' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (controlledVariableReference) + if pushErr := writeBuffer.PushContext("controlledVariableReference"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for controlledVariableReference") + } + _controlledVariableReferenceErr := writeBuffer.WriteSerializable(ctx, m.GetControlledVariableReference()) + if popErr := writeBuffer.PopContext("controlledVariableReference"); popErr != nil { + return errors.Wrap(popErr, "Error popping for controlledVariableReference") + } + if _controlledVariableReferenceErr != nil { + return errors.Wrap(_controlledVariableReferenceErr, "Error serializing 'controlledVariableReference' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataControlledVariableReference"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataControlledVariableReference") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataControlledVariableReference) SerializeWithWriteBu return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataControlledVariableReference) isBACnetConstructedDataControlledVariableReference() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataControlledVariableReference) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataControlledVariableUnits.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataControlledVariableUnits.go index 5b10a317889..c4ed1e00a3a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataControlledVariableUnits.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataControlledVariableUnits.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataControlledVariableUnits is the corresponding interface of BACnetConstructedDataControlledVariableUnits type BACnetConstructedDataControlledVariableUnits interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataControlledVariableUnitsExactly interface { // _BACnetConstructedDataControlledVariableUnits is the data-structure of this message type _BACnetConstructedDataControlledVariableUnits struct { *_BACnetConstructedData - Units BACnetEngineeringUnitsTagged + Units BACnetEngineeringUnitsTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataControlledVariableUnits) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataControlledVariableUnits) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataControlledVariableUnits) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_CONTROLLED_VARIABLE_UNITS -} +func (m *_BACnetConstructedDataControlledVariableUnits) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_CONTROLLED_VARIABLE_UNITS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataControlledVariableUnits) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataControlledVariableUnits) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataControlledVariableUnits) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataControlledVariableUnits) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataControlledVariableUnits) GetActualValue() BACnetE /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataControlledVariableUnits factory function for _BACnetConstructedDataControlledVariableUnits -func NewBACnetConstructedDataControlledVariableUnits(units BACnetEngineeringUnitsTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataControlledVariableUnits { +func NewBACnetConstructedDataControlledVariableUnits( units BACnetEngineeringUnitsTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataControlledVariableUnits { _result := &_BACnetConstructedDataControlledVariableUnits{ - Units: units, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Units: units, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataControlledVariableUnits(units BACnetEngineeringUnit // Deprecated: use the interface for direct cast func CastBACnetConstructedDataControlledVariableUnits(structType interface{}) BACnetConstructedDataControlledVariableUnits { - if casted, ok := structType.(BACnetConstructedDataControlledVariableUnits); ok { + if casted, ok := structType.(BACnetConstructedDataControlledVariableUnits); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataControlledVariableUnits); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataControlledVariableUnits) GetLengthInBits(ctx cont return lengthInBits } + func (m *_BACnetConstructedDataControlledVariableUnits) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataControlledVariableUnitsParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("units"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for units") } - _units, _unitsErr := BACnetEngineeringUnitsTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_units, _unitsErr := BACnetEngineeringUnitsTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _unitsErr != nil { return nil, errors.Wrap(_unitsErr, "Error parsing 'units' field of BACnetConstructedDataControlledVariableUnits") } @@ -186,7 +188,7 @@ func BACnetConstructedDataControlledVariableUnitsParseWithBuffer(ctx context.Con // Create a partially initialized instance _child := &_BACnetConstructedDataControlledVariableUnits{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Units: units, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataControlledVariableUnits) SerializeWithWriteBuffer return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataControlledVariableUnits") } - // Simple Field (units) - if pushErr := writeBuffer.PushContext("units"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for units") - } - _unitsErr := writeBuffer.WriteSerializable(ctx, m.GetUnits()) - if popErr := writeBuffer.PopContext("units"); popErr != nil { - return errors.Wrap(popErr, "Error popping for units") - } - if _unitsErr != nil { - return errors.Wrap(_unitsErr, "Error serializing 'units' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (units) + if pushErr := writeBuffer.PushContext("units"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for units") + } + _unitsErr := writeBuffer.WriteSerializable(ctx, m.GetUnits()) + if popErr := writeBuffer.PopContext("units"); popErr != nil { + return errors.Wrap(popErr, "Error popping for units") + } + if _unitsErr != nil { + return errors.Wrap(_unitsErr, "Error serializing 'units' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataControlledVariableUnits"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataControlledVariableUnits") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataControlledVariableUnits) SerializeWithWriteBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataControlledVariableUnits) isBACnetConstructedDataControlledVariableUnits() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataControlledVariableUnits) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataControlledVariableValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataControlledVariableValue.go index 1660bebd81d..bae411f75df 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataControlledVariableValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataControlledVariableValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataControlledVariableValue is the corresponding interface of BACnetConstructedDataControlledVariableValue type BACnetConstructedDataControlledVariableValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataControlledVariableValueExactly interface { // _BACnetConstructedDataControlledVariableValue is the data-structure of this message type _BACnetConstructedDataControlledVariableValue struct { *_BACnetConstructedData - ControlledVariableValue BACnetApplicationTagReal + ControlledVariableValue BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataControlledVariableValue) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataControlledVariableValue) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataControlledVariableValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_CONTROLLED_VARIABLE_VALUE -} +func (m *_BACnetConstructedDataControlledVariableValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_CONTROLLED_VARIABLE_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataControlledVariableValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataControlledVariableValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataControlledVariableValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataControlledVariableValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataControlledVariableValue) GetActualValue() BACnetA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataControlledVariableValue factory function for _BACnetConstructedDataControlledVariableValue -func NewBACnetConstructedDataControlledVariableValue(controlledVariableValue BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataControlledVariableValue { +func NewBACnetConstructedDataControlledVariableValue( controlledVariableValue BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataControlledVariableValue { _result := &_BACnetConstructedDataControlledVariableValue{ ControlledVariableValue: controlledVariableValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataControlledVariableValue(controlledVariableValue BAC // Deprecated: use the interface for direct cast func CastBACnetConstructedDataControlledVariableValue(structType interface{}) BACnetConstructedDataControlledVariableValue { - if casted, ok := structType.(BACnetConstructedDataControlledVariableValue); ok { + if casted, ok := structType.(BACnetConstructedDataControlledVariableValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataControlledVariableValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataControlledVariableValue) GetLengthInBits(ctx cont return lengthInBits } + func (m *_BACnetConstructedDataControlledVariableValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataControlledVariableValueParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("controlledVariableValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for controlledVariableValue") } - _controlledVariableValue, _controlledVariableValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_controlledVariableValue, _controlledVariableValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _controlledVariableValueErr != nil { return nil, errors.Wrap(_controlledVariableValueErr, "Error parsing 'controlledVariableValue' field of BACnetConstructedDataControlledVariableValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataControlledVariableValueParseWithBuffer(ctx context.Con // Create a partially initialized instance _child := &_BACnetConstructedDataControlledVariableValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ControlledVariableValue: controlledVariableValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataControlledVariableValue) SerializeWithWriteBuffer return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataControlledVariableValue") } - // Simple Field (controlledVariableValue) - if pushErr := writeBuffer.PushContext("controlledVariableValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for controlledVariableValue") - } - _controlledVariableValueErr := writeBuffer.WriteSerializable(ctx, m.GetControlledVariableValue()) - if popErr := writeBuffer.PopContext("controlledVariableValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for controlledVariableValue") - } - if _controlledVariableValueErr != nil { - return errors.Wrap(_controlledVariableValueErr, "Error serializing 'controlledVariableValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (controlledVariableValue) + if pushErr := writeBuffer.PushContext("controlledVariableValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for controlledVariableValue") + } + _controlledVariableValueErr := writeBuffer.WriteSerializable(ctx, m.GetControlledVariableValue()) + if popErr := writeBuffer.PopContext("controlledVariableValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for controlledVariableValue") + } + if _controlledVariableValueErr != nil { + return errors.Wrap(_controlledVariableValueErr, "Error serializing 'controlledVariableValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataControlledVariableValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataControlledVariableValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataControlledVariableValue) SerializeWithWriteBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataControlledVariableValue) isBACnetConstructedDataControlledVariableValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataControlledVariableValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCount.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCount.go index a932c9a92d3..f7c15dc401e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCount.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCount.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataCount is the corresponding interface of BACnetConstructedDataCount type BACnetConstructedDataCount interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataCountExactly interface { // _BACnetConstructedDataCount is the data-structure of this message type _BACnetConstructedDataCount struct { *_BACnetConstructedData - Count BACnetApplicationTagUnsignedInteger + Count BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataCount) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataCount) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataCount) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_COUNT -} +func (m *_BACnetConstructedDataCount) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_COUNT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataCount) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataCount) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataCount) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataCount) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataCount) GetActualValue() BACnetApplicationTagUnsig /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataCount factory function for _BACnetConstructedDataCount -func NewBACnetConstructedDataCount(count BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataCount { +func NewBACnetConstructedDataCount( count BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataCount { _result := &_BACnetConstructedDataCount{ - Count: count, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Count: count, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataCount(count BACnetApplicationTagUnsignedInteger, op // Deprecated: use the interface for direct cast func CastBACnetConstructedDataCount(structType interface{}) BACnetConstructedDataCount { - if casted, ok := structType.(BACnetConstructedDataCount); ok { + if casted, ok := structType.(BACnetConstructedDataCount); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataCount); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataCount) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_BACnetConstructedDataCount) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataCountParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("count"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for count") } - _count, _countErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_count, _countErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _countErr != nil { return nil, errors.Wrap(_countErr, "Error parsing 'count' field of BACnetConstructedDataCount") } @@ -186,7 +188,7 @@ func BACnetConstructedDataCountParseWithBuffer(ctx context.Context, readBuffer u // Create a partially initialized instance _child := &_BACnetConstructedDataCount{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Count: count, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataCount) SerializeWithWriteBuffer(ctx context.Conte return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataCount") } - // Simple Field (count) - if pushErr := writeBuffer.PushContext("count"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for count") - } - _countErr := writeBuffer.WriteSerializable(ctx, m.GetCount()) - if popErr := writeBuffer.PopContext("count"); popErr != nil { - return errors.Wrap(popErr, "Error popping for count") - } - if _countErr != nil { - return errors.Wrap(_countErr, "Error serializing 'count' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (count) + if pushErr := writeBuffer.PushContext("count"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for count") + } + _countErr := writeBuffer.WriteSerializable(ctx, m.GetCount()) + if popErr := writeBuffer.PopContext("count"); popErr != nil { + return errors.Wrap(popErr, "Error popping for count") + } + if _countErr != nil { + return errors.Wrap(_countErr, "Error serializing 'count' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataCount"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataCount") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataCount) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataCount) isBACnetConstructedDataCount() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataCount) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCountBeforeChange.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCountBeforeChange.go index 707379d6004..8766f1a4629 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCountBeforeChange.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCountBeforeChange.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataCountBeforeChange is the corresponding interface of BACnetConstructedDataCountBeforeChange type BACnetConstructedDataCountBeforeChange interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataCountBeforeChangeExactly interface { // _BACnetConstructedDataCountBeforeChange is the data-structure of this message type _BACnetConstructedDataCountBeforeChange struct { *_BACnetConstructedData - CountBeforeChange BACnetApplicationTagUnsignedInteger + CountBeforeChange BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataCountBeforeChange) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataCountBeforeChange) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataCountBeforeChange) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_COUNT_BEFORE_CHANGE -} +func (m *_BACnetConstructedDataCountBeforeChange) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_COUNT_BEFORE_CHANGE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataCountBeforeChange) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataCountBeforeChange) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataCountBeforeChange) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataCountBeforeChange) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataCountBeforeChange) GetActualValue() BACnetApplica /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataCountBeforeChange factory function for _BACnetConstructedDataCountBeforeChange -func NewBACnetConstructedDataCountBeforeChange(countBeforeChange BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataCountBeforeChange { +func NewBACnetConstructedDataCountBeforeChange( countBeforeChange BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataCountBeforeChange { _result := &_BACnetConstructedDataCountBeforeChange{ - CountBeforeChange: countBeforeChange, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + CountBeforeChange: countBeforeChange, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataCountBeforeChange(countBeforeChange BACnetApplicati // Deprecated: use the interface for direct cast func CastBACnetConstructedDataCountBeforeChange(structType interface{}) BACnetConstructedDataCountBeforeChange { - if casted, ok := structType.(BACnetConstructedDataCountBeforeChange); ok { + if casted, ok := structType.(BACnetConstructedDataCountBeforeChange); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataCountBeforeChange); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataCountBeforeChange) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetConstructedDataCountBeforeChange) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataCountBeforeChangeParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("countBeforeChange"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for countBeforeChange") } - _countBeforeChange, _countBeforeChangeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_countBeforeChange, _countBeforeChangeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _countBeforeChangeErr != nil { return nil, errors.Wrap(_countBeforeChangeErr, "Error parsing 'countBeforeChange' field of BACnetConstructedDataCountBeforeChange") } @@ -186,7 +188,7 @@ func BACnetConstructedDataCountBeforeChangeParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataCountBeforeChange{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, CountBeforeChange: countBeforeChange, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataCountBeforeChange) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataCountBeforeChange") } - // Simple Field (countBeforeChange) - if pushErr := writeBuffer.PushContext("countBeforeChange"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for countBeforeChange") - } - _countBeforeChangeErr := writeBuffer.WriteSerializable(ctx, m.GetCountBeforeChange()) - if popErr := writeBuffer.PopContext("countBeforeChange"); popErr != nil { - return errors.Wrap(popErr, "Error popping for countBeforeChange") - } - if _countBeforeChangeErr != nil { - return errors.Wrap(_countBeforeChangeErr, "Error serializing 'countBeforeChange' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (countBeforeChange) + if pushErr := writeBuffer.PushContext("countBeforeChange"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for countBeforeChange") + } + _countBeforeChangeErr := writeBuffer.WriteSerializable(ctx, m.GetCountBeforeChange()) + if popErr := writeBuffer.PopContext("countBeforeChange"); popErr != nil { + return errors.Wrap(popErr, "Error popping for countBeforeChange") + } + if _countBeforeChangeErr != nil { + return errors.Wrap(_countBeforeChangeErr, "Error serializing 'countBeforeChange' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataCountBeforeChange"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataCountBeforeChange") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataCountBeforeChange) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataCountBeforeChange) isBACnetConstructedDataCountBeforeChange() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataCountBeforeChange) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCountChangeTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCountChangeTime.go index edb71f320ef..08f6b6df48c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCountChangeTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCountChangeTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataCountChangeTime is the corresponding interface of BACnetConstructedDataCountChangeTime type BACnetConstructedDataCountChangeTime interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataCountChangeTimeExactly interface { // _BACnetConstructedDataCountChangeTime is the data-structure of this message type _BACnetConstructedDataCountChangeTime struct { *_BACnetConstructedData - CountChangeTime BACnetDateTime + CountChangeTime BACnetDateTime } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataCountChangeTime) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataCountChangeTime) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataCountChangeTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_COUNT_CHANGE_TIME -} +func (m *_BACnetConstructedDataCountChangeTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_COUNT_CHANGE_TIME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataCountChangeTime) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataCountChangeTime) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataCountChangeTime) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataCountChangeTime) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataCountChangeTime) GetActualValue() BACnetDateTime /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataCountChangeTime factory function for _BACnetConstructedDataCountChangeTime -func NewBACnetConstructedDataCountChangeTime(countChangeTime BACnetDateTime, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataCountChangeTime { +func NewBACnetConstructedDataCountChangeTime( countChangeTime BACnetDateTime , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataCountChangeTime { _result := &_BACnetConstructedDataCountChangeTime{ - CountChangeTime: countChangeTime, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + CountChangeTime: countChangeTime, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataCountChangeTime(countChangeTime BACnetDateTime, ope // Deprecated: use the interface for direct cast func CastBACnetConstructedDataCountChangeTime(structType interface{}) BACnetConstructedDataCountChangeTime { - if casted, ok := structType.(BACnetConstructedDataCountChangeTime); ok { + if casted, ok := structType.(BACnetConstructedDataCountChangeTime); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataCountChangeTime); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataCountChangeTime) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetConstructedDataCountChangeTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataCountChangeTimeParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("countChangeTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for countChangeTime") } - _countChangeTime, _countChangeTimeErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) +_countChangeTime, _countChangeTimeErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) if _countChangeTimeErr != nil { return nil, errors.Wrap(_countChangeTimeErr, "Error parsing 'countChangeTime' field of BACnetConstructedDataCountChangeTime") } @@ -186,7 +188,7 @@ func BACnetConstructedDataCountChangeTimeParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetConstructedDataCountChangeTime{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, CountChangeTime: countChangeTime, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataCountChangeTime) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataCountChangeTime") } - // Simple Field (countChangeTime) - if pushErr := writeBuffer.PushContext("countChangeTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for countChangeTime") - } - _countChangeTimeErr := writeBuffer.WriteSerializable(ctx, m.GetCountChangeTime()) - if popErr := writeBuffer.PopContext("countChangeTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for countChangeTime") - } - if _countChangeTimeErr != nil { - return errors.Wrap(_countChangeTimeErr, "Error serializing 'countChangeTime' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (countChangeTime) + if pushErr := writeBuffer.PushContext("countChangeTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for countChangeTime") + } + _countChangeTimeErr := writeBuffer.WriteSerializable(ctx, m.GetCountChangeTime()) + if popErr := writeBuffer.PopContext("countChangeTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for countChangeTime") + } + if _countChangeTimeErr != nil { + return errors.Wrap(_countChangeTimeErr, "Error serializing 'countChangeTime' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataCountChangeTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataCountChangeTime") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataCountChangeTime) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataCountChangeTime) isBACnetConstructedDataCountChangeTime() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataCountChangeTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCredentialDataInputAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCredentialDataInputAll.go index db727931745..332cbfbe420 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCredentialDataInputAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCredentialDataInputAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataCredentialDataInputAll is the corresponding interface of BACnetConstructedDataCredentialDataInputAll type BACnetConstructedDataCredentialDataInputAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataCredentialDataInputAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataCredentialDataInputAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_CREDENTIAL_DATA_INPUT -} +func (m *_BACnetConstructedDataCredentialDataInputAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_CREDENTIAL_DATA_INPUT} -func (m *_BACnetConstructedDataCredentialDataInputAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataCredentialDataInputAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataCredentialDataInputAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataCredentialDataInputAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataCredentialDataInputAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataCredentialDataInputAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataCredentialDataInputAll factory function for _BACnetConstructedDataCredentialDataInputAll -func NewBACnetConstructedDataCredentialDataInputAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataCredentialDataInputAll { +func NewBACnetConstructedDataCredentialDataInputAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataCredentialDataInputAll { _result := &_BACnetConstructedDataCredentialDataInputAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataCredentialDataInputAll(openingTag BACnetOpeningTag, // Deprecated: use the interface for direct cast func CastBACnetConstructedDataCredentialDataInputAll(structType interface{}) BACnetConstructedDataCredentialDataInputAll { - if casted, ok := structType.(BACnetConstructedDataCredentialDataInputAll); ok { + if casted, ok := structType.(BACnetConstructedDataCredentialDataInputAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataCredentialDataInputAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataCredentialDataInputAll) GetLengthInBits(ctx conte return lengthInBits } + func (m *_BACnetConstructedDataCredentialDataInputAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataCredentialDataInputAllParseWithBuffer(ctx context.Cont _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataCredentialDataInputAllParseWithBuffer(ctx context.Cont // Create a partially initialized instance _child := &_BACnetConstructedDataCredentialDataInputAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataCredentialDataInputAll) SerializeWithWriteBuffer( return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataCredentialDataInputAll) isBACnetConstructedDataCredentialDataInputAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataCredentialDataInputAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCredentialDataInputPresentValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCredentialDataInputPresentValue.go index a60306c60ae..4431199a43e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCredentialDataInputPresentValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCredentialDataInputPresentValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataCredentialDataInputPresentValue is the corresponding interface of BACnetConstructedDataCredentialDataInputPresentValue type BACnetConstructedDataCredentialDataInputPresentValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataCredentialDataInputPresentValueExactly interface { // _BACnetConstructedDataCredentialDataInputPresentValue is the data-structure of this message type _BACnetConstructedDataCredentialDataInputPresentValue struct { *_BACnetConstructedData - PresentValue BACnetAuthenticationFactor + PresentValue BACnetAuthenticationFactor } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataCredentialDataInputPresentValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_CREDENTIAL_DATA_INPUT -} +func (m *_BACnetConstructedDataCredentialDataInputPresentValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_CREDENTIAL_DATA_INPUT} -func (m *_BACnetConstructedDataCredentialDataInputPresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PRESENT_VALUE -} +func (m *_BACnetConstructedDataCredentialDataInputPresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PRESENT_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataCredentialDataInputPresentValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataCredentialDataInputPresentValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataCredentialDataInputPresentValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataCredentialDataInputPresentValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataCredentialDataInputPresentValue) GetActualValue() /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataCredentialDataInputPresentValue factory function for _BACnetConstructedDataCredentialDataInputPresentValue -func NewBACnetConstructedDataCredentialDataInputPresentValue(presentValue BACnetAuthenticationFactor, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataCredentialDataInputPresentValue { +func NewBACnetConstructedDataCredentialDataInputPresentValue( presentValue BACnetAuthenticationFactor , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataCredentialDataInputPresentValue { _result := &_BACnetConstructedDataCredentialDataInputPresentValue{ - PresentValue: presentValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PresentValue: presentValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataCredentialDataInputPresentValue(presentValue BACnet // Deprecated: use the interface for direct cast func CastBACnetConstructedDataCredentialDataInputPresentValue(structType interface{}) BACnetConstructedDataCredentialDataInputPresentValue { - if casted, ok := structType.(BACnetConstructedDataCredentialDataInputPresentValue); ok { + if casted, ok := structType.(BACnetConstructedDataCredentialDataInputPresentValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataCredentialDataInputPresentValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataCredentialDataInputPresentValue) GetLengthInBits( return lengthInBits } + func (m *_BACnetConstructedDataCredentialDataInputPresentValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataCredentialDataInputPresentValueParseWithBuffer(ctx con if pullErr := readBuffer.PullContext("presentValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for presentValue") } - _presentValue, _presentValueErr := BACnetAuthenticationFactorParseWithBuffer(ctx, readBuffer) +_presentValue, _presentValueErr := BACnetAuthenticationFactorParseWithBuffer(ctx, readBuffer) if _presentValueErr != nil { return nil, errors.Wrap(_presentValueErr, "Error parsing 'presentValue' field of BACnetConstructedDataCredentialDataInputPresentValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataCredentialDataInputPresentValueParseWithBuffer(ctx con // Create a partially initialized instance _child := &_BACnetConstructedDataCredentialDataInputPresentValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PresentValue: presentValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataCredentialDataInputPresentValue) SerializeWithWri return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataCredentialDataInputPresentValue") } - // Simple Field (presentValue) - if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for presentValue") - } - _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) - if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for presentValue") - } - if _presentValueErr != nil { - return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (presentValue) + if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for presentValue") + } + _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) + if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for presentValue") + } + if _presentValueErr != nil { + return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataCredentialDataInputPresentValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataCredentialDataInputPresentValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataCredentialDataInputPresentValue) SerializeWithWri return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataCredentialDataInputPresentValue) isBACnetConstructedDataCredentialDataInputPresentValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataCredentialDataInputPresentValue) String() string } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCredentialDataInputUpdateTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCredentialDataInputUpdateTime.go index 0f1ac8903e6..9118c912208 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCredentialDataInputUpdateTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCredentialDataInputUpdateTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataCredentialDataInputUpdateTime is the corresponding interface of BACnetConstructedDataCredentialDataInputUpdateTime type BACnetConstructedDataCredentialDataInputUpdateTime interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataCredentialDataInputUpdateTimeExactly interface { // _BACnetConstructedDataCredentialDataInputUpdateTime is the data-structure of this message type _BACnetConstructedDataCredentialDataInputUpdateTime struct { *_BACnetConstructedData - UpdateTime BACnetTimeStamp + UpdateTime BACnetTimeStamp } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataCredentialDataInputUpdateTime) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_CREDENTIAL_DATA_INPUT -} +func (m *_BACnetConstructedDataCredentialDataInputUpdateTime) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_CREDENTIAL_DATA_INPUT} -func (m *_BACnetConstructedDataCredentialDataInputUpdateTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_UPDATE_TIME -} +func (m *_BACnetConstructedDataCredentialDataInputUpdateTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_UPDATE_TIME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataCredentialDataInputUpdateTime) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataCredentialDataInputUpdateTime) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataCredentialDataInputUpdateTime) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataCredentialDataInputUpdateTime) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataCredentialDataInputUpdateTime) GetActualValue() B /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataCredentialDataInputUpdateTime factory function for _BACnetConstructedDataCredentialDataInputUpdateTime -func NewBACnetConstructedDataCredentialDataInputUpdateTime(updateTime BACnetTimeStamp, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataCredentialDataInputUpdateTime { +func NewBACnetConstructedDataCredentialDataInputUpdateTime( updateTime BACnetTimeStamp , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataCredentialDataInputUpdateTime { _result := &_BACnetConstructedDataCredentialDataInputUpdateTime{ - UpdateTime: updateTime, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + UpdateTime: updateTime, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataCredentialDataInputUpdateTime(updateTime BACnetTime // Deprecated: use the interface for direct cast func CastBACnetConstructedDataCredentialDataInputUpdateTime(structType interface{}) BACnetConstructedDataCredentialDataInputUpdateTime { - if casted, ok := structType.(BACnetConstructedDataCredentialDataInputUpdateTime); ok { + if casted, ok := structType.(BACnetConstructedDataCredentialDataInputUpdateTime); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataCredentialDataInputUpdateTime); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataCredentialDataInputUpdateTime) GetLengthInBits(ct return lengthInBits } + func (m *_BACnetConstructedDataCredentialDataInputUpdateTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataCredentialDataInputUpdateTimeParseWithBuffer(ctx conte if pullErr := readBuffer.PullContext("updateTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for updateTime") } - _updateTime, _updateTimeErr := BACnetTimeStampParseWithBuffer(ctx, readBuffer) +_updateTime, _updateTimeErr := BACnetTimeStampParseWithBuffer(ctx, readBuffer) if _updateTimeErr != nil { return nil, errors.Wrap(_updateTimeErr, "Error parsing 'updateTime' field of BACnetConstructedDataCredentialDataInputUpdateTime") } @@ -186,7 +188,7 @@ func BACnetConstructedDataCredentialDataInputUpdateTimeParseWithBuffer(ctx conte // Create a partially initialized instance _child := &_BACnetConstructedDataCredentialDataInputUpdateTime{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, UpdateTime: updateTime, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataCredentialDataInputUpdateTime) SerializeWithWrite return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataCredentialDataInputUpdateTime") } - // Simple Field (updateTime) - if pushErr := writeBuffer.PushContext("updateTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for updateTime") - } - _updateTimeErr := writeBuffer.WriteSerializable(ctx, m.GetUpdateTime()) - if popErr := writeBuffer.PopContext("updateTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for updateTime") - } - if _updateTimeErr != nil { - return errors.Wrap(_updateTimeErr, "Error serializing 'updateTime' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (updateTime) + if pushErr := writeBuffer.PushContext("updateTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for updateTime") + } + _updateTimeErr := writeBuffer.WriteSerializable(ctx, m.GetUpdateTime()) + if popErr := writeBuffer.PopContext("updateTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for updateTime") + } + if _updateTimeErr != nil { + return errors.Wrap(_updateTimeErr, "Error serializing 'updateTime' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataCredentialDataInputUpdateTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataCredentialDataInputUpdateTime") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataCredentialDataInputUpdateTime) SerializeWithWrite return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataCredentialDataInputUpdateTime) isBACnetConstructedDataCredentialDataInputUpdateTime() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataCredentialDataInputUpdateTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCredentialDisable.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCredentialDisable.go index 84b4d5dd504..9e374bea40d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCredentialDisable.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCredentialDisable.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataCredentialDisable is the corresponding interface of BACnetConstructedDataCredentialDisable type BACnetConstructedDataCredentialDisable interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataCredentialDisableExactly interface { // _BACnetConstructedDataCredentialDisable is the data-structure of this message type _BACnetConstructedDataCredentialDisable struct { *_BACnetConstructedData - CredentialDisable BACnetAccessCredentialDisableTagged + CredentialDisable BACnetAccessCredentialDisableTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataCredentialDisable) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataCredentialDisable) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataCredentialDisable) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_CREDENTIAL_DISABLE -} +func (m *_BACnetConstructedDataCredentialDisable) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_CREDENTIAL_DISABLE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataCredentialDisable) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataCredentialDisable) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataCredentialDisable) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataCredentialDisable) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataCredentialDisable) GetActualValue() BACnetAccessC /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataCredentialDisable factory function for _BACnetConstructedDataCredentialDisable -func NewBACnetConstructedDataCredentialDisable(credentialDisable BACnetAccessCredentialDisableTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataCredentialDisable { +func NewBACnetConstructedDataCredentialDisable( credentialDisable BACnetAccessCredentialDisableTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataCredentialDisable { _result := &_BACnetConstructedDataCredentialDisable{ - CredentialDisable: credentialDisable, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + CredentialDisable: credentialDisable, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataCredentialDisable(credentialDisable BACnetAccessCre // Deprecated: use the interface for direct cast func CastBACnetConstructedDataCredentialDisable(structType interface{}) BACnetConstructedDataCredentialDisable { - if casted, ok := structType.(BACnetConstructedDataCredentialDisable); ok { + if casted, ok := structType.(BACnetConstructedDataCredentialDisable); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataCredentialDisable); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataCredentialDisable) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetConstructedDataCredentialDisable) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataCredentialDisableParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("credentialDisable"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for credentialDisable") } - _credentialDisable, _credentialDisableErr := BACnetAccessCredentialDisableTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_credentialDisable, _credentialDisableErr := BACnetAccessCredentialDisableTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _credentialDisableErr != nil { return nil, errors.Wrap(_credentialDisableErr, "Error parsing 'credentialDisable' field of BACnetConstructedDataCredentialDisable") } @@ -186,7 +188,7 @@ func BACnetConstructedDataCredentialDisableParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataCredentialDisable{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, CredentialDisable: credentialDisable, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataCredentialDisable) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataCredentialDisable") } - // Simple Field (credentialDisable) - if pushErr := writeBuffer.PushContext("credentialDisable"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for credentialDisable") - } - _credentialDisableErr := writeBuffer.WriteSerializable(ctx, m.GetCredentialDisable()) - if popErr := writeBuffer.PopContext("credentialDisable"); popErr != nil { - return errors.Wrap(popErr, "Error popping for credentialDisable") - } - if _credentialDisableErr != nil { - return errors.Wrap(_credentialDisableErr, "Error serializing 'credentialDisable' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (credentialDisable) + if pushErr := writeBuffer.PushContext("credentialDisable"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for credentialDisable") + } + _credentialDisableErr := writeBuffer.WriteSerializable(ctx, m.GetCredentialDisable()) + if popErr := writeBuffer.PopContext("credentialDisable"); popErr != nil { + return errors.Wrap(popErr, "Error popping for credentialDisable") + } + if _credentialDisableErr != nil { + return errors.Wrap(_credentialDisableErr, "Error serializing 'credentialDisable' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataCredentialDisable"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataCredentialDisable") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataCredentialDisable) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataCredentialDisable) isBACnetConstructedDataCredentialDisable() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataCredentialDisable) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCredentialStatus.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCredentialStatus.go index 80766424d00..47a9630c9ea 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCredentialStatus.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCredentialStatus.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataCredentialStatus is the corresponding interface of BACnetConstructedDataCredentialStatus type BACnetConstructedDataCredentialStatus interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataCredentialStatusExactly interface { // _BACnetConstructedDataCredentialStatus is the data-structure of this message type _BACnetConstructedDataCredentialStatus struct { *_BACnetConstructedData - BinaryPv BACnetBinaryPVTagged + BinaryPv BACnetBinaryPVTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataCredentialStatus) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataCredentialStatus) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataCredentialStatus) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_CREDENTIAL_STATUS -} +func (m *_BACnetConstructedDataCredentialStatus) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_CREDENTIAL_STATUS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataCredentialStatus) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataCredentialStatus) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataCredentialStatus) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataCredentialStatus) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataCredentialStatus) GetActualValue() BACnetBinaryPV /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataCredentialStatus factory function for _BACnetConstructedDataCredentialStatus -func NewBACnetConstructedDataCredentialStatus(binaryPv BACnetBinaryPVTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataCredentialStatus { +func NewBACnetConstructedDataCredentialStatus( binaryPv BACnetBinaryPVTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataCredentialStatus { _result := &_BACnetConstructedDataCredentialStatus{ - BinaryPv: binaryPv, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + BinaryPv: binaryPv, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataCredentialStatus(binaryPv BACnetBinaryPVTagged, ope // Deprecated: use the interface for direct cast func CastBACnetConstructedDataCredentialStatus(structType interface{}) BACnetConstructedDataCredentialStatus { - if casted, ok := structType.(BACnetConstructedDataCredentialStatus); ok { + if casted, ok := structType.(BACnetConstructedDataCredentialStatus); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataCredentialStatus); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataCredentialStatus) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetConstructedDataCredentialStatus) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataCredentialStatusParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("binaryPv"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for binaryPv") } - _binaryPv, _binaryPvErr := BACnetBinaryPVTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_binaryPv, _binaryPvErr := BACnetBinaryPVTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _binaryPvErr != nil { return nil, errors.Wrap(_binaryPvErr, "Error parsing 'binaryPv' field of BACnetConstructedDataCredentialStatus") } @@ -186,7 +188,7 @@ func BACnetConstructedDataCredentialStatusParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_BACnetConstructedDataCredentialStatus{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, BinaryPv: binaryPv, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataCredentialStatus) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataCredentialStatus") } - // Simple Field (binaryPv) - if pushErr := writeBuffer.PushContext("binaryPv"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for binaryPv") - } - _binaryPvErr := writeBuffer.WriteSerializable(ctx, m.GetBinaryPv()) - if popErr := writeBuffer.PopContext("binaryPv"); popErr != nil { - return errors.Wrap(popErr, "Error popping for binaryPv") - } - if _binaryPvErr != nil { - return errors.Wrap(_binaryPvErr, "Error serializing 'binaryPv' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (binaryPv) + if pushErr := writeBuffer.PushContext("binaryPv"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for binaryPv") + } + _binaryPvErr := writeBuffer.WriteSerializable(ctx, m.GetBinaryPv()) + if popErr := writeBuffer.PopContext("binaryPv"); popErr != nil { + return errors.Wrap(popErr, "Error popping for binaryPv") + } + if _binaryPvErr != nil { + return errors.Wrap(_binaryPvErr, "Error serializing 'binaryPv' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataCredentialStatus"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataCredentialStatus") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataCredentialStatus) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataCredentialStatus) isBACnetConstructedDataCredentialStatus() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataCredentialStatus) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCredentials.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCredentials.go index 6129c96050c..3fcd1c617c8 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCredentials.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCredentials.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataCredentials is the corresponding interface of BACnetConstructedDataCredentials type BACnetConstructedDataCredentials interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataCredentialsExactly interface { // _BACnetConstructedDataCredentials is the data-structure of this message type _BACnetConstructedDataCredentials struct { *_BACnetConstructedData - Credentials []BACnetDeviceObjectReference + Credentials []BACnetDeviceObjectReference } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataCredentials) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataCredentials) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataCredentials) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_CREDENTIALS -} +func (m *_BACnetConstructedDataCredentials) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_CREDENTIALS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataCredentials) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataCredentials) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataCredentials) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataCredentials) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataCredentials) GetCredentials() []BACnetDeviceObjec /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataCredentials factory function for _BACnetConstructedDataCredentials -func NewBACnetConstructedDataCredentials(credentials []BACnetDeviceObjectReference, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataCredentials { +func NewBACnetConstructedDataCredentials( credentials []BACnetDeviceObjectReference , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataCredentials { _result := &_BACnetConstructedDataCredentials{ - Credentials: credentials, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Credentials: credentials, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataCredentials(credentials []BACnetDeviceObjectReferen // Deprecated: use the interface for direct cast func CastBACnetConstructedDataCredentials(structType interface{}) BACnetConstructedDataCredentials { - if casted, ok := structType.(BACnetConstructedDataCredentials); ok { + if casted, ok := structType.(BACnetConstructedDataCredentials); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataCredentials); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataCredentials) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataCredentials) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataCredentialsParseWithBuffer(ctx context.Context, readBu // Terminated array var credentials []BACnetDeviceObjectReference { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'credentials' field of BACnetConstructedDataCredentials") } @@ -173,7 +175,7 @@ func BACnetConstructedDataCredentialsParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataCredentials{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Credentials: credentials, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataCredentials) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataCredentials") } - // Array Field (credentials) - if pushErr := writeBuffer.PushContext("credentials", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for credentials") - } - for _curItem, _element := range m.GetCredentials() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetCredentials()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'credentials' field") - } - } - if popErr := writeBuffer.PopContext("credentials", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for credentials") + // Array Field (credentials) + if pushErr := writeBuffer.PushContext("credentials", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for credentials") + } + for _curItem, _element := range m.GetCredentials() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetCredentials()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'credentials' field") } + } + if popErr := writeBuffer.PopContext("credentials", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for credentials") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataCredentials"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataCredentials") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataCredentials) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataCredentials) isBACnetConstructedDataCredentials() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataCredentials) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCredentialsInZone.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCredentialsInZone.go index f107c8dba22..a35600a57d1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCredentialsInZone.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCredentialsInZone.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataCredentialsInZone is the corresponding interface of BACnetConstructedDataCredentialsInZone type BACnetConstructedDataCredentialsInZone interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataCredentialsInZoneExactly interface { // _BACnetConstructedDataCredentialsInZone is the data-structure of this message type _BACnetConstructedDataCredentialsInZone struct { *_BACnetConstructedData - CredentialsInZone []BACnetDeviceObjectReference + CredentialsInZone []BACnetDeviceObjectReference } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataCredentialsInZone) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataCredentialsInZone) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataCredentialsInZone) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_CREDENTIALS_IN_ZONE -} +func (m *_BACnetConstructedDataCredentialsInZone) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_CREDENTIALS_IN_ZONE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataCredentialsInZone) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataCredentialsInZone) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataCredentialsInZone) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataCredentialsInZone) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataCredentialsInZone) GetCredentialsInZone() []BACne /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataCredentialsInZone factory function for _BACnetConstructedDataCredentialsInZone -func NewBACnetConstructedDataCredentialsInZone(credentialsInZone []BACnetDeviceObjectReference, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataCredentialsInZone { +func NewBACnetConstructedDataCredentialsInZone( credentialsInZone []BACnetDeviceObjectReference , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataCredentialsInZone { _result := &_BACnetConstructedDataCredentialsInZone{ - CredentialsInZone: credentialsInZone, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + CredentialsInZone: credentialsInZone, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataCredentialsInZone(credentialsInZone []BACnetDeviceO // Deprecated: use the interface for direct cast func CastBACnetConstructedDataCredentialsInZone(structType interface{}) BACnetConstructedDataCredentialsInZone { - if casted, ok := structType.(BACnetConstructedDataCredentialsInZone); ok { + if casted, ok := structType.(BACnetConstructedDataCredentialsInZone); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataCredentialsInZone); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataCredentialsInZone) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetConstructedDataCredentialsInZone) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataCredentialsInZoneParseWithBuffer(ctx context.Context, // Terminated array var credentialsInZone []BACnetDeviceObjectReference { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'credentialsInZone' field of BACnetConstructedDataCredentialsInZone") } @@ -173,7 +175,7 @@ func BACnetConstructedDataCredentialsInZoneParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataCredentialsInZone{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, CredentialsInZone: credentialsInZone, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataCredentialsInZone) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataCredentialsInZone") } - // Array Field (credentialsInZone) - if pushErr := writeBuffer.PushContext("credentialsInZone", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for credentialsInZone") - } - for _curItem, _element := range m.GetCredentialsInZone() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetCredentialsInZone()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'credentialsInZone' field") - } - } - if popErr := writeBuffer.PopContext("credentialsInZone", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for credentialsInZone") + // Array Field (credentialsInZone) + if pushErr := writeBuffer.PushContext("credentialsInZone", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for credentialsInZone") + } + for _curItem, _element := range m.GetCredentialsInZone() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetCredentialsInZone()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'credentialsInZone' field") } + } + if popErr := writeBuffer.PopContext("credentialsInZone", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for credentialsInZone") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataCredentialsInZone"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataCredentialsInZone") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataCredentialsInZone) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataCredentialsInZone) isBACnetConstructedDataCredentialsInZone() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataCredentialsInZone) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCurrentCommandPriority.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCurrentCommandPriority.go index 234e751f84b..c8f700092f8 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCurrentCommandPriority.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataCurrentCommandPriority.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataCurrentCommandPriority is the corresponding interface of BACnetConstructedDataCurrentCommandPriority type BACnetConstructedDataCurrentCommandPriority interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataCurrentCommandPriorityExactly interface { // _BACnetConstructedDataCurrentCommandPriority is the data-structure of this message type _BACnetConstructedDataCurrentCommandPriority struct { *_BACnetConstructedData - CurrentCommandPriority BACnetOptionalUnsigned + CurrentCommandPriority BACnetOptionalUnsigned } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataCurrentCommandPriority) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataCurrentCommandPriority) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataCurrentCommandPriority) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_CURRENT_COMMAND_PRIORITY -} +func (m *_BACnetConstructedDataCurrentCommandPriority) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_CURRENT_COMMAND_PRIORITY} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataCurrentCommandPriority) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataCurrentCommandPriority) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataCurrentCommandPriority) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataCurrentCommandPriority) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataCurrentCommandPriority) GetActualValue() BACnetOp /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataCurrentCommandPriority factory function for _BACnetConstructedDataCurrentCommandPriority -func NewBACnetConstructedDataCurrentCommandPriority(currentCommandPriority BACnetOptionalUnsigned, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataCurrentCommandPriority { +func NewBACnetConstructedDataCurrentCommandPriority( currentCommandPriority BACnetOptionalUnsigned , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataCurrentCommandPriority { _result := &_BACnetConstructedDataCurrentCommandPriority{ CurrentCommandPriority: currentCommandPriority, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataCurrentCommandPriority(currentCommandPriority BACne // Deprecated: use the interface for direct cast func CastBACnetConstructedDataCurrentCommandPriority(structType interface{}) BACnetConstructedDataCurrentCommandPriority { - if casted, ok := structType.(BACnetConstructedDataCurrentCommandPriority); ok { + if casted, ok := structType.(BACnetConstructedDataCurrentCommandPriority); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataCurrentCommandPriority); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataCurrentCommandPriority) GetLengthInBits(ctx conte return lengthInBits } + func (m *_BACnetConstructedDataCurrentCommandPriority) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataCurrentCommandPriorityParseWithBuffer(ctx context.Cont if pullErr := readBuffer.PullContext("currentCommandPriority"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for currentCommandPriority") } - _currentCommandPriority, _currentCommandPriorityErr := BACnetOptionalUnsignedParseWithBuffer(ctx, readBuffer) +_currentCommandPriority, _currentCommandPriorityErr := BACnetOptionalUnsignedParseWithBuffer(ctx, readBuffer) if _currentCommandPriorityErr != nil { return nil, errors.Wrap(_currentCommandPriorityErr, "Error parsing 'currentCommandPriority' field of BACnetConstructedDataCurrentCommandPriority") } @@ -186,7 +188,7 @@ func BACnetConstructedDataCurrentCommandPriorityParseWithBuffer(ctx context.Cont // Create a partially initialized instance _child := &_BACnetConstructedDataCurrentCommandPriority{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, CurrentCommandPriority: currentCommandPriority, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataCurrentCommandPriority) SerializeWithWriteBuffer( return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataCurrentCommandPriority") } - // Simple Field (currentCommandPriority) - if pushErr := writeBuffer.PushContext("currentCommandPriority"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for currentCommandPriority") - } - _currentCommandPriorityErr := writeBuffer.WriteSerializable(ctx, m.GetCurrentCommandPriority()) - if popErr := writeBuffer.PopContext("currentCommandPriority"); popErr != nil { - return errors.Wrap(popErr, "Error popping for currentCommandPriority") - } - if _currentCommandPriorityErr != nil { - return errors.Wrap(_currentCommandPriorityErr, "Error serializing 'currentCommandPriority' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (currentCommandPriority) + if pushErr := writeBuffer.PushContext("currentCommandPriority"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for currentCommandPriority") + } + _currentCommandPriorityErr := writeBuffer.WriteSerializable(ctx, m.GetCurrentCommandPriority()) + if popErr := writeBuffer.PopContext("currentCommandPriority"); popErr != nil { + return errors.Wrap(popErr, "Error popping for currentCommandPriority") + } + if _currentCommandPriorityErr != nil { + return errors.Wrap(_currentCommandPriorityErr, "Error serializing 'currentCommandPriority' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataCurrentCommandPriority"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataCurrentCommandPriority") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataCurrentCommandPriority) SerializeWithWriteBuffer( return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataCurrentCommandPriority) isBACnetConstructedDataCurrentCommandPriority() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataCurrentCommandPriority) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDatabaseRevision.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDatabaseRevision.go index 7bade2ebf37..1da790d4edf 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDatabaseRevision.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDatabaseRevision.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDatabaseRevision is the corresponding interface of BACnetConstructedDataDatabaseRevision type BACnetConstructedDataDatabaseRevision interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataDatabaseRevisionExactly interface { // _BACnetConstructedDataDatabaseRevision is the data-structure of this message type _BACnetConstructedDataDatabaseRevision struct { *_BACnetConstructedData - DatabaseRevision BACnetApplicationTagUnsignedInteger + DatabaseRevision BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDatabaseRevision) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataDatabaseRevision) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataDatabaseRevision) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_DATABASE_REVISION -} +func (m *_BACnetConstructedDataDatabaseRevision) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_DATABASE_REVISION} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDatabaseRevision) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDatabaseRevision) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDatabaseRevision) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDatabaseRevision) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataDatabaseRevision) GetActualValue() BACnetApplicat /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataDatabaseRevision factory function for _BACnetConstructedDataDatabaseRevision -func NewBACnetConstructedDataDatabaseRevision(databaseRevision BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDatabaseRevision { +func NewBACnetConstructedDataDatabaseRevision( databaseRevision BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDatabaseRevision { _result := &_BACnetConstructedDataDatabaseRevision{ - DatabaseRevision: databaseRevision, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + DatabaseRevision: databaseRevision, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataDatabaseRevision(databaseRevision BACnetApplication // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDatabaseRevision(structType interface{}) BACnetConstructedDataDatabaseRevision { - if casted, ok := structType.(BACnetConstructedDataDatabaseRevision); ok { + if casted, ok := structType.(BACnetConstructedDataDatabaseRevision); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDatabaseRevision); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataDatabaseRevision) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetConstructedDataDatabaseRevision) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataDatabaseRevisionParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("databaseRevision"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for databaseRevision") } - _databaseRevision, _databaseRevisionErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_databaseRevision, _databaseRevisionErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _databaseRevisionErr != nil { return nil, errors.Wrap(_databaseRevisionErr, "Error parsing 'databaseRevision' field of BACnetConstructedDataDatabaseRevision") } @@ -186,7 +188,7 @@ func BACnetConstructedDataDatabaseRevisionParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_BACnetConstructedDataDatabaseRevision{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, DatabaseRevision: databaseRevision, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataDatabaseRevision) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataDatabaseRevision") } - // Simple Field (databaseRevision) - if pushErr := writeBuffer.PushContext("databaseRevision"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for databaseRevision") - } - _databaseRevisionErr := writeBuffer.WriteSerializable(ctx, m.GetDatabaseRevision()) - if popErr := writeBuffer.PopContext("databaseRevision"); popErr != nil { - return errors.Wrap(popErr, "Error popping for databaseRevision") - } - if _databaseRevisionErr != nil { - return errors.Wrap(_databaseRevisionErr, "Error serializing 'databaseRevision' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (databaseRevision) + if pushErr := writeBuffer.PushContext("databaseRevision"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for databaseRevision") + } + _databaseRevisionErr := writeBuffer.WriteSerializable(ctx, m.GetDatabaseRevision()) + if popErr := writeBuffer.PopContext("databaseRevision"); popErr != nil { + return errors.Wrap(popErr, "Error popping for databaseRevision") + } + if _databaseRevisionErr != nil { + return errors.Wrap(_databaseRevisionErr, "Error serializing 'databaseRevision' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataDatabaseRevision"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataDatabaseRevision") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataDatabaseRevision) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDatabaseRevision) isBACnetConstructedDataDatabaseRevision() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataDatabaseRevision) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDateList.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDateList.go index b4be96f519b..9cc19a04f6d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDateList.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDateList.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDateList is the corresponding interface of BACnetConstructedDataDateList type BACnetConstructedDataDateList interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataDateListExactly interface { // _BACnetConstructedDataDateList is the data-structure of this message type _BACnetConstructedDataDateList struct { *_BACnetConstructedData - DateList []BACnetCalendarEntry + DateList []BACnetCalendarEntry } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDateList) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataDateList) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataDateList) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_DATE_LIST -} +func (m *_BACnetConstructedDataDateList) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_DATE_LIST} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDateList) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDateList) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDateList) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDateList) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataDateList) GetDateList() []BACnetCalendarEntry { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataDateList factory function for _BACnetConstructedDataDateList -func NewBACnetConstructedDataDateList(dateList []BACnetCalendarEntry, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDateList { +func NewBACnetConstructedDataDateList( dateList []BACnetCalendarEntry , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDateList { _result := &_BACnetConstructedDataDateList{ - DateList: dateList, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + DateList: dateList, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataDateList(dateList []BACnetCalendarEntry, openingTag // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDateList(structType interface{}) BACnetConstructedDataDateList { - if casted, ok := structType.(BACnetConstructedDataDateList); ok { + if casted, ok := structType.(BACnetConstructedDataDateList); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDateList); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataDateList) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetConstructedDataDateList) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataDateListParseWithBuffer(ctx context.Context, readBuffe // Terminated array var dateList []BACnetCalendarEntry { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetCalendarEntryParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetCalendarEntryParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'dateList' field of BACnetConstructedDataDateList") } @@ -173,7 +175,7 @@ func BACnetConstructedDataDateListParseWithBuffer(ctx context.Context, readBuffe // Create a partially initialized instance _child := &_BACnetConstructedDataDateList{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, DateList: dateList, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataDateList) SerializeWithWriteBuffer(ctx context.Co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataDateList") } - // Array Field (dateList) - if pushErr := writeBuffer.PushContext("dateList", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for dateList") - } - for _curItem, _element := range m.GetDateList() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetDateList()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'dateList' field") - } - } - if popErr := writeBuffer.PopContext("dateList", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for dateList") + // Array Field (dateList) + if pushErr := writeBuffer.PushContext("dateList", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for dateList") + } + for _curItem, _element := range m.GetDateList() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetDateList()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'dateList' field") } + } + if popErr := writeBuffer.PopContext("dateList", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for dateList") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataDateList"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataDateList") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataDateList) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDateList) isBACnetConstructedDataDateList() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataDateList) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDatePatternValuePresentValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDatePatternValuePresentValue.go index 00df9b9e7f8..ad6fa8072a2 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDatePatternValuePresentValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDatePatternValuePresentValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDatePatternValuePresentValue is the corresponding interface of BACnetConstructedDataDatePatternValuePresentValue type BACnetConstructedDataDatePatternValuePresentValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataDatePatternValuePresentValueExactly interface { // _BACnetConstructedDataDatePatternValuePresentValue is the data-structure of this message type _BACnetConstructedDataDatePatternValuePresentValue struct { *_BACnetConstructedData - PresentValue BACnetApplicationTagDate + PresentValue BACnetApplicationTagDate } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDatePatternValuePresentValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_DATEPATTERN_VALUE -} +func (m *_BACnetConstructedDataDatePatternValuePresentValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_DATEPATTERN_VALUE} -func (m *_BACnetConstructedDataDatePatternValuePresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PRESENT_VALUE -} +func (m *_BACnetConstructedDataDatePatternValuePresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PRESENT_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDatePatternValuePresentValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDatePatternValuePresentValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDatePatternValuePresentValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDatePatternValuePresentValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataDatePatternValuePresentValue) GetActualValue() BA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataDatePatternValuePresentValue factory function for _BACnetConstructedDataDatePatternValuePresentValue -func NewBACnetConstructedDataDatePatternValuePresentValue(presentValue BACnetApplicationTagDate, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDatePatternValuePresentValue { +func NewBACnetConstructedDataDatePatternValuePresentValue( presentValue BACnetApplicationTagDate , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDatePatternValuePresentValue { _result := &_BACnetConstructedDataDatePatternValuePresentValue{ - PresentValue: presentValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PresentValue: presentValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataDatePatternValuePresentValue(presentValue BACnetApp // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDatePatternValuePresentValue(structType interface{}) BACnetConstructedDataDatePatternValuePresentValue { - if casted, ok := structType.(BACnetConstructedDataDatePatternValuePresentValue); ok { + if casted, ok := structType.(BACnetConstructedDataDatePatternValuePresentValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDatePatternValuePresentValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataDatePatternValuePresentValue) GetLengthInBits(ctx return lengthInBits } + func (m *_BACnetConstructedDataDatePatternValuePresentValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataDatePatternValuePresentValueParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("presentValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for presentValue") } - _presentValue, _presentValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_presentValue, _presentValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _presentValueErr != nil { return nil, errors.Wrap(_presentValueErr, "Error parsing 'presentValue' field of BACnetConstructedDataDatePatternValuePresentValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataDatePatternValuePresentValueParseWithBuffer(ctx contex // Create a partially initialized instance _child := &_BACnetConstructedDataDatePatternValuePresentValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PresentValue: presentValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataDatePatternValuePresentValue) SerializeWithWriteB return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataDatePatternValuePresentValue") } - // Simple Field (presentValue) - if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for presentValue") - } - _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) - if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for presentValue") - } - if _presentValueErr != nil { - return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (presentValue) + if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for presentValue") + } + _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) + if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for presentValue") + } + if _presentValueErr != nil { + return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataDatePatternValuePresentValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataDatePatternValuePresentValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataDatePatternValuePresentValue) SerializeWithWriteB return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDatePatternValuePresentValue) isBACnetConstructedDataDatePatternValuePresentValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataDatePatternValuePresentValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDatePatternValueRelinquishDefault.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDatePatternValueRelinquishDefault.go index ba60290fa0c..2328c06670a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDatePatternValueRelinquishDefault.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDatePatternValueRelinquishDefault.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDatePatternValueRelinquishDefault is the corresponding interface of BACnetConstructedDataDatePatternValueRelinquishDefault type BACnetConstructedDataDatePatternValueRelinquishDefault interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataDatePatternValueRelinquishDefaultExactly interface { // _BACnetConstructedDataDatePatternValueRelinquishDefault is the data-structure of this message type _BACnetConstructedDataDatePatternValueRelinquishDefault struct { *_BACnetConstructedData - RelinquishDefault BACnetApplicationTagDate + RelinquishDefault BACnetApplicationTagDate } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDatePatternValueRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_DATEPATTERN_VALUE -} +func (m *_BACnetConstructedDataDatePatternValueRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_DATEPATTERN_VALUE} -func (m *_BACnetConstructedDataDatePatternValueRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_RELINQUISH_DEFAULT -} +func (m *_BACnetConstructedDataDatePatternValueRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_RELINQUISH_DEFAULT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDatePatternValueRelinquishDefault) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDatePatternValueRelinquishDefault) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDatePatternValueRelinquishDefault) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDatePatternValueRelinquishDefault) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataDatePatternValueRelinquishDefault) GetActualValue /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataDatePatternValueRelinquishDefault factory function for _BACnetConstructedDataDatePatternValueRelinquishDefault -func NewBACnetConstructedDataDatePatternValueRelinquishDefault(relinquishDefault BACnetApplicationTagDate, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDatePatternValueRelinquishDefault { +func NewBACnetConstructedDataDatePatternValueRelinquishDefault( relinquishDefault BACnetApplicationTagDate , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDatePatternValueRelinquishDefault { _result := &_BACnetConstructedDataDatePatternValueRelinquishDefault{ - RelinquishDefault: relinquishDefault, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + RelinquishDefault: relinquishDefault, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataDatePatternValueRelinquishDefault(relinquishDefault // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDatePatternValueRelinquishDefault(structType interface{}) BACnetConstructedDataDatePatternValueRelinquishDefault { - if casted, ok := structType.(BACnetConstructedDataDatePatternValueRelinquishDefault); ok { + if casted, ok := structType.(BACnetConstructedDataDatePatternValueRelinquishDefault); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDatePatternValueRelinquishDefault); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataDatePatternValueRelinquishDefault) GetLengthInBit return lengthInBits } + func (m *_BACnetConstructedDataDatePatternValueRelinquishDefault) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataDatePatternValueRelinquishDefaultParseWithBuffer(ctx c if pullErr := readBuffer.PullContext("relinquishDefault"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for relinquishDefault") } - _relinquishDefault, _relinquishDefaultErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_relinquishDefault, _relinquishDefaultErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _relinquishDefaultErr != nil { return nil, errors.Wrap(_relinquishDefaultErr, "Error parsing 'relinquishDefault' field of BACnetConstructedDataDatePatternValueRelinquishDefault") } @@ -186,7 +188,7 @@ func BACnetConstructedDataDatePatternValueRelinquishDefaultParseWithBuffer(ctx c // Create a partially initialized instance _child := &_BACnetConstructedDataDatePatternValueRelinquishDefault{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, RelinquishDefault: relinquishDefault, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataDatePatternValueRelinquishDefault) SerializeWithW return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataDatePatternValueRelinquishDefault") } - // Simple Field (relinquishDefault) - if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for relinquishDefault") - } - _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) - if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { - return errors.Wrap(popErr, "Error popping for relinquishDefault") - } - if _relinquishDefaultErr != nil { - return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (relinquishDefault) + if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for relinquishDefault") + } + _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) + if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { + return errors.Wrap(popErr, "Error popping for relinquishDefault") + } + if _relinquishDefaultErr != nil { + return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataDatePatternValueRelinquishDefault"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataDatePatternValueRelinquishDefault") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataDatePatternValueRelinquishDefault) SerializeWithW return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDatePatternValueRelinquishDefault) isBACnetConstructedDataDatePatternValueRelinquishDefault() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataDatePatternValueRelinquishDefault) String() strin } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDateTimePatternValuePresentValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDateTimePatternValuePresentValue.go index 32bd9032ea1..256b71b26fd 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDateTimePatternValuePresentValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDateTimePatternValuePresentValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDateTimePatternValuePresentValue is the corresponding interface of BACnetConstructedDataDateTimePatternValuePresentValue type BACnetConstructedDataDateTimePatternValuePresentValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataDateTimePatternValuePresentValueExactly interface { // _BACnetConstructedDataDateTimePatternValuePresentValue is the data-structure of this message type _BACnetConstructedDataDateTimePatternValuePresentValue struct { *_BACnetConstructedData - PresentValue BACnetDateTime + PresentValue BACnetDateTime } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDateTimePatternValuePresentValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_DATETIMEPATTERN_VALUE -} +func (m *_BACnetConstructedDataDateTimePatternValuePresentValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_DATETIMEPATTERN_VALUE} -func (m *_BACnetConstructedDataDateTimePatternValuePresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PRESENT_VALUE -} +func (m *_BACnetConstructedDataDateTimePatternValuePresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PRESENT_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDateTimePatternValuePresentValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDateTimePatternValuePresentValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDateTimePatternValuePresentValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDateTimePatternValuePresentValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataDateTimePatternValuePresentValue) GetActualValue( /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataDateTimePatternValuePresentValue factory function for _BACnetConstructedDataDateTimePatternValuePresentValue -func NewBACnetConstructedDataDateTimePatternValuePresentValue(presentValue BACnetDateTime, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDateTimePatternValuePresentValue { +func NewBACnetConstructedDataDateTimePatternValuePresentValue( presentValue BACnetDateTime , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDateTimePatternValuePresentValue { _result := &_BACnetConstructedDataDateTimePatternValuePresentValue{ - PresentValue: presentValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PresentValue: presentValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataDateTimePatternValuePresentValue(presentValue BACne // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDateTimePatternValuePresentValue(structType interface{}) BACnetConstructedDataDateTimePatternValuePresentValue { - if casted, ok := structType.(BACnetConstructedDataDateTimePatternValuePresentValue); ok { + if casted, ok := structType.(BACnetConstructedDataDateTimePatternValuePresentValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDateTimePatternValuePresentValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataDateTimePatternValuePresentValue) GetLengthInBits return lengthInBits } + func (m *_BACnetConstructedDataDateTimePatternValuePresentValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataDateTimePatternValuePresentValueParseWithBuffer(ctx co if pullErr := readBuffer.PullContext("presentValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for presentValue") } - _presentValue, _presentValueErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) +_presentValue, _presentValueErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) if _presentValueErr != nil { return nil, errors.Wrap(_presentValueErr, "Error parsing 'presentValue' field of BACnetConstructedDataDateTimePatternValuePresentValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataDateTimePatternValuePresentValueParseWithBuffer(ctx co // Create a partially initialized instance _child := &_BACnetConstructedDataDateTimePatternValuePresentValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PresentValue: presentValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataDateTimePatternValuePresentValue) SerializeWithWr return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataDateTimePatternValuePresentValue") } - // Simple Field (presentValue) - if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for presentValue") - } - _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) - if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for presentValue") - } - if _presentValueErr != nil { - return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (presentValue) + if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for presentValue") + } + _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) + if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for presentValue") + } + if _presentValueErr != nil { + return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataDateTimePatternValuePresentValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataDateTimePatternValuePresentValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataDateTimePatternValuePresentValue) SerializeWithWr return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDateTimePatternValuePresentValue) isBACnetConstructedDataDateTimePatternValuePresentValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataDateTimePatternValuePresentValue) String() string } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDateTimePatternValueRelinquishDefault.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDateTimePatternValueRelinquishDefault.go index 7dd0c73d2df..03f4973a205 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDateTimePatternValueRelinquishDefault.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDateTimePatternValueRelinquishDefault.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDateTimePatternValueRelinquishDefault is the corresponding interface of BACnetConstructedDataDateTimePatternValueRelinquishDefault type BACnetConstructedDataDateTimePatternValueRelinquishDefault interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataDateTimePatternValueRelinquishDefaultExactly interface // _BACnetConstructedDataDateTimePatternValueRelinquishDefault is the data-structure of this message type _BACnetConstructedDataDateTimePatternValueRelinquishDefault struct { *_BACnetConstructedData - RelinquishDefault BACnetDateTime + RelinquishDefault BACnetDateTime } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDateTimePatternValueRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_DATETIMEPATTERN_VALUE -} +func (m *_BACnetConstructedDataDateTimePatternValueRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_DATETIMEPATTERN_VALUE} -func (m *_BACnetConstructedDataDateTimePatternValueRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_RELINQUISH_DEFAULT -} +func (m *_BACnetConstructedDataDateTimePatternValueRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_RELINQUISH_DEFAULT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDateTimePatternValueRelinquishDefault) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDateTimePatternValueRelinquishDefault) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDateTimePatternValueRelinquishDefault) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDateTimePatternValueRelinquishDefault) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataDateTimePatternValueRelinquishDefault) GetActualV /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataDateTimePatternValueRelinquishDefault factory function for _BACnetConstructedDataDateTimePatternValueRelinquishDefault -func NewBACnetConstructedDataDateTimePatternValueRelinquishDefault(relinquishDefault BACnetDateTime, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDateTimePatternValueRelinquishDefault { +func NewBACnetConstructedDataDateTimePatternValueRelinquishDefault( relinquishDefault BACnetDateTime , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDateTimePatternValueRelinquishDefault { _result := &_BACnetConstructedDataDateTimePatternValueRelinquishDefault{ - RelinquishDefault: relinquishDefault, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + RelinquishDefault: relinquishDefault, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataDateTimePatternValueRelinquishDefault(relinquishDef // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDateTimePatternValueRelinquishDefault(structType interface{}) BACnetConstructedDataDateTimePatternValueRelinquishDefault { - if casted, ok := structType.(BACnetConstructedDataDateTimePatternValueRelinquishDefault); ok { + if casted, ok := structType.(BACnetConstructedDataDateTimePatternValueRelinquishDefault); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDateTimePatternValueRelinquishDefault); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataDateTimePatternValueRelinquishDefault) GetLengthI return lengthInBits } + func (m *_BACnetConstructedDataDateTimePatternValueRelinquishDefault) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataDateTimePatternValueRelinquishDefaultParseWithBuffer(c if pullErr := readBuffer.PullContext("relinquishDefault"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for relinquishDefault") } - _relinquishDefault, _relinquishDefaultErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) +_relinquishDefault, _relinquishDefaultErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) if _relinquishDefaultErr != nil { return nil, errors.Wrap(_relinquishDefaultErr, "Error parsing 'relinquishDefault' field of BACnetConstructedDataDateTimePatternValueRelinquishDefault") } @@ -186,7 +188,7 @@ func BACnetConstructedDataDateTimePatternValueRelinquishDefaultParseWithBuffer(c // Create a partially initialized instance _child := &_BACnetConstructedDataDateTimePatternValueRelinquishDefault{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, RelinquishDefault: relinquishDefault, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataDateTimePatternValueRelinquishDefault) SerializeW return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataDateTimePatternValueRelinquishDefault") } - // Simple Field (relinquishDefault) - if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for relinquishDefault") - } - _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) - if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { - return errors.Wrap(popErr, "Error popping for relinquishDefault") - } - if _relinquishDefaultErr != nil { - return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (relinquishDefault) + if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for relinquishDefault") + } + _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) + if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { + return errors.Wrap(popErr, "Error popping for relinquishDefault") + } + if _relinquishDefaultErr != nil { + return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataDateTimePatternValueRelinquishDefault"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataDateTimePatternValueRelinquishDefault") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataDateTimePatternValueRelinquishDefault) SerializeW return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDateTimePatternValueRelinquishDefault) isBACnetConstructedDataDateTimePatternValueRelinquishDefault() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataDateTimePatternValueRelinquishDefault) String() s } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDateTimeValuePresentValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDateTimeValuePresentValue.go index 71fa4c10592..ecdebf919c4 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDateTimeValuePresentValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDateTimeValuePresentValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDateTimeValuePresentValue is the corresponding interface of BACnetConstructedDataDateTimeValuePresentValue type BACnetConstructedDataDateTimeValuePresentValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataDateTimeValuePresentValueExactly interface { // _BACnetConstructedDataDateTimeValuePresentValue is the data-structure of this message type _BACnetConstructedDataDateTimeValuePresentValue struct { *_BACnetConstructedData - PresentValue BACnetDateTime + PresentValue BACnetDateTime } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDateTimeValuePresentValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_DATETIME_VALUE -} +func (m *_BACnetConstructedDataDateTimeValuePresentValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_DATETIME_VALUE} -func (m *_BACnetConstructedDataDateTimeValuePresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PRESENT_VALUE -} +func (m *_BACnetConstructedDataDateTimeValuePresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PRESENT_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDateTimeValuePresentValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDateTimeValuePresentValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDateTimeValuePresentValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDateTimeValuePresentValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataDateTimeValuePresentValue) GetActualValue() BACne /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataDateTimeValuePresentValue factory function for _BACnetConstructedDataDateTimeValuePresentValue -func NewBACnetConstructedDataDateTimeValuePresentValue(presentValue BACnetDateTime, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDateTimeValuePresentValue { +func NewBACnetConstructedDataDateTimeValuePresentValue( presentValue BACnetDateTime , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDateTimeValuePresentValue { _result := &_BACnetConstructedDataDateTimeValuePresentValue{ - PresentValue: presentValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PresentValue: presentValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataDateTimeValuePresentValue(presentValue BACnetDateTi // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDateTimeValuePresentValue(structType interface{}) BACnetConstructedDataDateTimeValuePresentValue { - if casted, ok := structType.(BACnetConstructedDataDateTimeValuePresentValue); ok { + if casted, ok := structType.(BACnetConstructedDataDateTimeValuePresentValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDateTimeValuePresentValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataDateTimeValuePresentValue) GetLengthInBits(ctx co return lengthInBits } + func (m *_BACnetConstructedDataDateTimeValuePresentValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataDateTimeValuePresentValueParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("presentValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for presentValue") } - _presentValue, _presentValueErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) +_presentValue, _presentValueErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) if _presentValueErr != nil { return nil, errors.Wrap(_presentValueErr, "Error parsing 'presentValue' field of BACnetConstructedDataDateTimeValuePresentValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataDateTimeValuePresentValueParseWithBuffer(ctx context.C // Create a partially initialized instance _child := &_BACnetConstructedDataDateTimeValuePresentValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PresentValue: presentValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataDateTimeValuePresentValue) SerializeWithWriteBuff return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataDateTimeValuePresentValue") } - // Simple Field (presentValue) - if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for presentValue") - } - _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) - if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for presentValue") - } - if _presentValueErr != nil { - return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (presentValue) + if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for presentValue") + } + _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) + if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for presentValue") + } + if _presentValueErr != nil { + return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataDateTimeValuePresentValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataDateTimeValuePresentValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataDateTimeValuePresentValue) SerializeWithWriteBuff return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDateTimeValuePresentValue) isBACnetConstructedDataDateTimeValuePresentValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataDateTimeValuePresentValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDateTimeValueRelinquishDefault.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDateTimeValueRelinquishDefault.go index ae5e160c028..7f41239a09c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDateTimeValueRelinquishDefault.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDateTimeValueRelinquishDefault.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDateTimeValueRelinquishDefault is the corresponding interface of BACnetConstructedDataDateTimeValueRelinquishDefault type BACnetConstructedDataDateTimeValueRelinquishDefault interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataDateTimeValueRelinquishDefaultExactly interface { // _BACnetConstructedDataDateTimeValueRelinquishDefault is the data-structure of this message type _BACnetConstructedDataDateTimeValueRelinquishDefault struct { *_BACnetConstructedData - RelinquishDefault BACnetDateTime + RelinquishDefault BACnetDateTime } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDateTimeValueRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_DATETIME_VALUE -} +func (m *_BACnetConstructedDataDateTimeValueRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_DATETIME_VALUE} -func (m *_BACnetConstructedDataDateTimeValueRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_RELINQUISH_DEFAULT -} +func (m *_BACnetConstructedDataDateTimeValueRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_RELINQUISH_DEFAULT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDateTimeValueRelinquishDefault) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDateTimeValueRelinquishDefault) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDateTimeValueRelinquishDefault) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDateTimeValueRelinquishDefault) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataDateTimeValueRelinquishDefault) GetActualValue() /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataDateTimeValueRelinquishDefault factory function for _BACnetConstructedDataDateTimeValueRelinquishDefault -func NewBACnetConstructedDataDateTimeValueRelinquishDefault(relinquishDefault BACnetDateTime, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDateTimeValueRelinquishDefault { +func NewBACnetConstructedDataDateTimeValueRelinquishDefault( relinquishDefault BACnetDateTime , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDateTimeValueRelinquishDefault { _result := &_BACnetConstructedDataDateTimeValueRelinquishDefault{ - RelinquishDefault: relinquishDefault, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + RelinquishDefault: relinquishDefault, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataDateTimeValueRelinquishDefault(relinquishDefault BA // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDateTimeValueRelinquishDefault(structType interface{}) BACnetConstructedDataDateTimeValueRelinquishDefault { - if casted, ok := structType.(BACnetConstructedDataDateTimeValueRelinquishDefault); ok { + if casted, ok := structType.(BACnetConstructedDataDateTimeValueRelinquishDefault); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDateTimeValueRelinquishDefault); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataDateTimeValueRelinquishDefault) GetLengthInBits(c return lengthInBits } + func (m *_BACnetConstructedDataDateTimeValueRelinquishDefault) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataDateTimeValueRelinquishDefaultParseWithBuffer(ctx cont if pullErr := readBuffer.PullContext("relinquishDefault"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for relinquishDefault") } - _relinquishDefault, _relinquishDefaultErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) +_relinquishDefault, _relinquishDefaultErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) if _relinquishDefaultErr != nil { return nil, errors.Wrap(_relinquishDefaultErr, "Error parsing 'relinquishDefault' field of BACnetConstructedDataDateTimeValueRelinquishDefault") } @@ -186,7 +188,7 @@ func BACnetConstructedDataDateTimeValueRelinquishDefaultParseWithBuffer(ctx cont // Create a partially initialized instance _child := &_BACnetConstructedDataDateTimeValueRelinquishDefault{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, RelinquishDefault: relinquishDefault, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataDateTimeValueRelinquishDefault) SerializeWithWrit return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataDateTimeValueRelinquishDefault") } - // Simple Field (relinquishDefault) - if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for relinquishDefault") - } - _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) - if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { - return errors.Wrap(popErr, "Error popping for relinquishDefault") - } - if _relinquishDefaultErr != nil { - return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (relinquishDefault) + if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for relinquishDefault") + } + _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) + if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { + return errors.Wrap(popErr, "Error popping for relinquishDefault") + } + if _relinquishDefaultErr != nil { + return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataDateTimeValueRelinquishDefault"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataDateTimeValueRelinquishDefault") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataDateTimeValueRelinquishDefault) SerializeWithWrit return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDateTimeValueRelinquishDefault) isBACnetConstructedDataDateTimeValueRelinquishDefault() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataDateTimeValueRelinquishDefault) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDateValueAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDateValueAll.go index 68dcc0cb490..628270f94a2 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDateValueAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDateValueAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDateValueAll is the corresponding interface of BACnetConstructedDataDateValueAll type BACnetConstructedDataDateValueAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataDateValueAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDateValueAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_DATE_VALUE -} +func (m *_BACnetConstructedDataDateValueAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_DATE_VALUE} -func (m *_BACnetConstructedDataDateValueAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataDateValueAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDateValueAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDateValueAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDateValueAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDateValueAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataDateValueAll factory function for _BACnetConstructedDataDateValueAll -func NewBACnetConstructedDataDateValueAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDateValueAll { +func NewBACnetConstructedDataDateValueAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDateValueAll { _result := &_BACnetConstructedDataDateValueAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataDateValueAll(openingTag BACnetOpeningTag, peekedTag // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDateValueAll(structType interface{}) BACnetConstructedDataDateValueAll { - if casted, ok := structType.(BACnetConstructedDataDateValueAll); ok { + if casted, ok := structType.(BACnetConstructedDataDateValueAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDateValueAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataDateValueAll) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetConstructedDataDateValueAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataDateValueAllParseWithBuffer(ctx context.Context, readB _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataDateValueAllParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetConstructedDataDateValueAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataDateValueAll) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDateValueAll) isBACnetConstructedDataDateValueAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataDateValueAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDateValuePresentValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDateValuePresentValue.go index d12cb2eabf3..b85a66475bd 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDateValuePresentValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDateValuePresentValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDateValuePresentValue is the corresponding interface of BACnetConstructedDataDateValuePresentValue type BACnetConstructedDataDateValuePresentValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataDateValuePresentValueExactly interface { // _BACnetConstructedDataDateValuePresentValue is the data-structure of this message type _BACnetConstructedDataDateValuePresentValue struct { *_BACnetConstructedData - PresentValue BACnetApplicationTagDate + PresentValue BACnetApplicationTagDate } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDateValuePresentValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_DATE_VALUE -} +func (m *_BACnetConstructedDataDateValuePresentValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_DATE_VALUE} -func (m *_BACnetConstructedDataDateValuePresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PRESENT_VALUE -} +func (m *_BACnetConstructedDataDateValuePresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PRESENT_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDateValuePresentValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDateValuePresentValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDateValuePresentValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDateValuePresentValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataDateValuePresentValue) GetActualValue() BACnetApp /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataDateValuePresentValue factory function for _BACnetConstructedDataDateValuePresentValue -func NewBACnetConstructedDataDateValuePresentValue(presentValue BACnetApplicationTagDate, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDateValuePresentValue { +func NewBACnetConstructedDataDateValuePresentValue( presentValue BACnetApplicationTagDate , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDateValuePresentValue { _result := &_BACnetConstructedDataDateValuePresentValue{ - PresentValue: presentValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PresentValue: presentValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataDateValuePresentValue(presentValue BACnetApplicatio // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDateValuePresentValue(structType interface{}) BACnetConstructedDataDateValuePresentValue { - if casted, ok := structType.(BACnetConstructedDataDateValuePresentValue); ok { + if casted, ok := structType.(BACnetConstructedDataDateValuePresentValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDateValuePresentValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataDateValuePresentValue) GetLengthInBits(ctx contex return lengthInBits } + func (m *_BACnetConstructedDataDateValuePresentValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataDateValuePresentValueParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("presentValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for presentValue") } - _presentValue, _presentValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_presentValue, _presentValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _presentValueErr != nil { return nil, errors.Wrap(_presentValueErr, "Error parsing 'presentValue' field of BACnetConstructedDataDateValuePresentValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataDateValuePresentValueParseWithBuffer(ctx context.Conte // Create a partially initialized instance _child := &_BACnetConstructedDataDateValuePresentValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PresentValue: presentValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataDateValuePresentValue) SerializeWithWriteBuffer(c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataDateValuePresentValue") } - // Simple Field (presentValue) - if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for presentValue") - } - _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) - if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for presentValue") - } - if _presentValueErr != nil { - return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (presentValue) + if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for presentValue") + } + _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) + if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for presentValue") + } + if _presentValueErr != nil { + return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataDateValuePresentValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataDateValuePresentValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataDateValuePresentValue) SerializeWithWriteBuffer(c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDateValuePresentValue) isBACnetConstructedDataDateValuePresentValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataDateValuePresentValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDateValueRelinquishDefault.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDateValueRelinquishDefault.go index 6612377402f..5f217f8e486 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDateValueRelinquishDefault.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDateValueRelinquishDefault.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDateValueRelinquishDefault is the corresponding interface of BACnetConstructedDataDateValueRelinquishDefault type BACnetConstructedDataDateValueRelinquishDefault interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataDateValueRelinquishDefaultExactly interface { // _BACnetConstructedDataDateValueRelinquishDefault is the data-structure of this message type _BACnetConstructedDataDateValueRelinquishDefault struct { *_BACnetConstructedData - RelinquishDefault BACnetApplicationTagDate + RelinquishDefault BACnetApplicationTagDate } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDateValueRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_DATE_VALUE -} +func (m *_BACnetConstructedDataDateValueRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_DATE_VALUE} -func (m *_BACnetConstructedDataDateValueRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_RELINQUISH_DEFAULT -} +func (m *_BACnetConstructedDataDateValueRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_RELINQUISH_DEFAULT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDateValueRelinquishDefault) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDateValueRelinquishDefault) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDateValueRelinquishDefault) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDateValueRelinquishDefault) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataDateValueRelinquishDefault) GetActualValue() BACn /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataDateValueRelinquishDefault factory function for _BACnetConstructedDataDateValueRelinquishDefault -func NewBACnetConstructedDataDateValueRelinquishDefault(relinquishDefault BACnetApplicationTagDate, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDateValueRelinquishDefault { +func NewBACnetConstructedDataDateValueRelinquishDefault( relinquishDefault BACnetApplicationTagDate , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDateValueRelinquishDefault { _result := &_BACnetConstructedDataDateValueRelinquishDefault{ - RelinquishDefault: relinquishDefault, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + RelinquishDefault: relinquishDefault, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataDateValueRelinquishDefault(relinquishDefault BACnet // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDateValueRelinquishDefault(structType interface{}) BACnetConstructedDataDateValueRelinquishDefault { - if casted, ok := structType.(BACnetConstructedDataDateValueRelinquishDefault); ok { + if casted, ok := structType.(BACnetConstructedDataDateValueRelinquishDefault); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDateValueRelinquishDefault); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataDateValueRelinquishDefault) GetLengthInBits(ctx c return lengthInBits } + func (m *_BACnetConstructedDataDateValueRelinquishDefault) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataDateValueRelinquishDefaultParseWithBuffer(ctx context. if pullErr := readBuffer.PullContext("relinquishDefault"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for relinquishDefault") } - _relinquishDefault, _relinquishDefaultErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_relinquishDefault, _relinquishDefaultErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _relinquishDefaultErr != nil { return nil, errors.Wrap(_relinquishDefaultErr, "Error parsing 'relinquishDefault' field of BACnetConstructedDataDateValueRelinquishDefault") } @@ -186,7 +188,7 @@ func BACnetConstructedDataDateValueRelinquishDefaultParseWithBuffer(ctx context. // Create a partially initialized instance _child := &_BACnetConstructedDataDateValueRelinquishDefault{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, RelinquishDefault: relinquishDefault, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataDateValueRelinquishDefault) SerializeWithWriteBuf return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataDateValueRelinquishDefault") } - // Simple Field (relinquishDefault) - if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for relinquishDefault") - } - _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) - if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { - return errors.Wrap(popErr, "Error popping for relinquishDefault") - } - if _relinquishDefaultErr != nil { - return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (relinquishDefault) + if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for relinquishDefault") + } + _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) + if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { + return errors.Wrap(popErr, "Error popping for relinquishDefault") + } + if _relinquishDefaultErr != nil { + return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataDateValueRelinquishDefault"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataDateValueRelinquishDefault") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataDateValueRelinquishDefault) SerializeWithWriteBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDateValueRelinquishDefault) isBACnetConstructedDataDateValueRelinquishDefault() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataDateValueRelinquishDefault) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDatepatternValueAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDatepatternValueAll.go index d4b39f0a0bb..808f1ec82a0 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDatepatternValueAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDatepatternValueAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDatepatternValueAll is the corresponding interface of BACnetConstructedDataDatepatternValueAll type BACnetConstructedDataDatepatternValueAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataDatepatternValueAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDatepatternValueAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_DATEPATTERN_VALUE -} +func (m *_BACnetConstructedDataDatepatternValueAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_DATEPATTERN_VALUE} -func (m *_BACnetConstructedDataDatepatternValueAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataDatepatternValueAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDatepatternValueAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDatepatternValueAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDatepatternValueAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDatepatternValueAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataDatepatternValueAll factory function for _BACnetConstructedDataDatepatternValueAll -func NewBACnetConstructedDataDatepatternValueAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDatepatternValueAll { +func NewBACnetConstructedDataDatepatternValueAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDatepatternValueAll { _result := &_BACnetConstructedDataDatepatternValueAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataDatepatternValueAll(openingTag BACnetOpeningTag, pe // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDatepatternValueAll(structType interface{}) BACnetConstructedDataDatepatternValueAll { - if casted, ok := structType.(BACnetConstructedDataDatepatternValueAll); ok { + if casted, ok := structType.(BACnetConstructedDataDatepatternValueAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDatepatternValueAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataDatepatternValueAll) GetLengthInBits(ctx context. return lengthInBits } + func (m *_BACnetConstructedDataDatepatternValueAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataDatepatternValueAllParseWithBuffer(ctx context.Context _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataDatepatternValueAllParseWithBuffer(ctx context.Context // Create a partially initialized instance _child := &_BACnetConstructedDataDatepatternValueAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataDatepatternValueAll) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDatepatternValueAll) isBACnetConstructedDataDatepatternValueAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataDatepatternValueAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDatetimeValueAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDatetimeValueAll.go index 0ec3e407b44..bd2093a5bbc 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDatetimeValueAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDatetimeValueAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDatetimeValueAll is the corresponding interface of BACnetConstructedDataDatetimeValueAll type BACnetConstructedDataDatetimeValueAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataDatetimeValueAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDatetimeValueAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_DATETIME_VALUE -} +func (m *_BACnetConstructedDataDatetimeValueAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_DATETIME_VALUE} -func (m *_BACnetConstructedDataDatetimeValueAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataDatetimeValueAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDatetimeValueAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDatetimeValueAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDatetimeValueAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDatetimeValueAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataDatetimeValueAll factory function for _BACnetConstructedDataDatetimeValueAll -func NewBACnetConstructedDataDatetimeValueAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDatetimeValueAll { +func NewBACnetConstructedDataDatetimeValueAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDatetimeValueAll { _result := &_BACnetConstructedDataDatetimeValueAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataDatetimeValueAll(openingTag BACnetOpeningTag, peeke // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDatetimeValueAll(structType interface{}) BACnetConstructedDataDatetimeValueAll { - if casted, ok := structType.(BACnetConstructedDataDatetimeValueAll); ok { + if casted, ok := structType.(BACnetConstructedDataDatetimeValueAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDatetimeValueAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataDatetimeValueAll) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetConstructedDataDatetimeValueAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataDatetimeValueAllParseWithBuffer(ctx context.Context, r _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataDatetimeValueAllParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_BACnetConstructedDataDatetimeValueAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataDatetimeValueAll) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDatetimeValueAll) isBACnetConstructedDataDatetimeValueAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataDatetimeValueAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDatetimepatternValueAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDatetimepatternValueAll.go index fae0e687ee4..eb347487052 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDatetimepatternValueAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDatetimepatternValueAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDatetimepatternValueAll is the corresponding interface of BACnetConstructedDataDatetimepatternValueAll type BACnetConstructedDataDatetimepatternValueAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataDatetimepatternValueAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDatetimepatternValueAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_DATETIMEPATTERN_VALUE -} +func (m *_BACnetConstructedDataDatetimepatternValueAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_DATETIMEPATTERN_VALUE} -func (m *_BACnetConstructedDataDatetimepatternValueAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataDatetimepatternValueAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDatetimepatternValueAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDatetimepatternValueAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDatetimepatternValueAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDatetimepatternValueAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataDatetimepatternValueAll factory function for _BACnetConstructedDataDatetimepatternValueAll -func NewBACnetConstructedDataDatetimepatternValueAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDatetimepatternValueAll { +func NewBACnetConstructedDataDatetimepatternValueAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDatetimepatternValueAll { _result := &_BACnetConstructedDataDatetimepatternValueAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataDatetimepatternValueAll(openingTag BACnetOpeningTag // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDatetimepatternValueAll(structType interface{}) BACnetConstructedDataDatetimepatternValueAll { - if casted, ok := structType.(BACnetConstructedDataDatetimepatternValueAll); ok { + if casted, ok := structType.(BACnetConstructedDataDatetimepatternValueAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDatetimepatternValueAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataDatetimepatternValueAll) GetLengthInBits(ctx cont return lengthInBits } + func (m *_BACnetConstructedDataDatetimepatternValueAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataDatetimepatternValueAllParseWithBuffer(ctx context.Con _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataDatetimepatternValueAllParseWithBuffer(ctx context.Con // Create a partially initialized instance _child := &_BACnetConstructedDataDatetimepatternValueAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataDatetimepatternValueAll) SerializeWithWriteBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDatetimepatternValueAll) isBACnetConstructedDataDatetimepatternValueAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataDatetimepatternValueAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDaylightSavingsStatus.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDaylightSavingsStatus.go index 0806d540b7f..a99822a84af 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDaylightSavingsStatus.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDaylightSavingsStatus.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDaylightSavingsStatus is the corresponding interface of BACnetConstructedDataDaylightSavingsStatus type BACnetConstructedDataDaylightSavingsStatus interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataDaylightSavingsStatusExactly interface { // _BACnetConstructedDataDaylightSavingsStatus is the data-structure of this message type _BACnetConstructedDataDaylightSavingsStatus struct { *_BACnetConstructedData - DaylightSavingsStatus BACnetApplicationTagBoolean + DaylightSavingsStatus BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDaylightSavingsStatus) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataDaylightSavingsStatus) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataDaylightSavingsStatus) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_DAYLIGHT_SAVINGS_STATUS -} +func (m *_BACnetConstructedDataDaylightSavingsStatus) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_DAYLIGHT_SAVINGS_STATUS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDaylightSavingsStatus) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDaylightSavingsStatus) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDaylightSavingsStatus) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDaylightSavingsStatus) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataDaylightSavingsStatus) GetActualValue() BACnetApp /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataDaylightSavingsStatus factory function for _BACnetConstructedDataDaylightSavingsStatus -func NewBACnetConstructedDataDaylightSavingsStatus(daylightSavingsStatus BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDaylightSavingsStatus { +func NewBACnetConstructedDataDaylightSavingsStatus( daylightSavingsStatus BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDaylightSavingsStatus { _result := &_BACnetConstructedDataDaylightSavingsStatus{ - DaylightSavingsStatus: daylightSavingsStatus, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + DaylightSavingsStatus: daylightSavingsStatus, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataDaylightSavingsStatus(daylightSavingsStatus BACnetA // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDaylightSavingsStatus(structType interface{}) BACnetConstructedDataDaylightSavingsStatus { - if casted, ok := structType.(BACnetConstructedDataDaylightSavingsStatus); ok { + if casted, ok := structType.(BACnetConstructedDataDaylightSavingsStatus); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDaylightSavingsStatus); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataDaylightSavingsStatus) GetLengthInBits(ctx contex return lengthInBits } + func (m *_BACnetConstructedDataDaylightSavingsStatus) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataDaylightSavingsStatusParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("daylightSavingsStatus"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for daylightSavingsStatus") } - _daylightSavingsStatus, _daylightSavingsStatusErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_daylightSavingsStatus, _daylightSavingsStatusErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _daylightSavingsStatusErr != nil { return nil, errors.Wrap(_daylightSavingsStatusErr, "Error parsing 'daylightSavingsStatus' field of BACnetConstructedDataDaylightSavingsStatus") } @@ -186,7 +188,7 @@ func BACnetConstructedDataDaylightSavingsStatusParseWithBuffer(ctx context.Conte // Create a partially initialized instance _child := &_BACnetConstructedDataDaylightSavingsStatus{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, DaylightSavingsStatus: daylightSavingsStatus, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataDaylightSavingsStatus) SerializeWithWriteBuffer(c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataDaylightSavingsStatus") } - // Simple Field (daylightSavingsStatus) - if pushErr := writeBuffer.PushContext("daylightSavingsStatus"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for daylightSavingsStatus") - } - _daylightSavingsStatusErr := writeBuffer.WriteSerializable(ctx, m.GetDaylightSavingsStatus()) - if popErr := writeBuffer.PopContext("daylightSavingsStatus"); popErr != nil { - return errors.Wrap(popErr, "Error popping for daylightSavingsStatus") - } - if _daylightSavingsStatusErr != nil { - return errors.Wrap(_daylightSavingsStatusErr, "Error serializing 'daylightSavingsStatus' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (daylightSavingsStatus) + if pushErr := writeBuffer.PushContext("daylightSavingsStatus"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for daylightSavingsStatus") + } + _daylightSavingsStatusErr := writeBuffer.WriteSerializable(ctx, m.GetDaylightSavingsStatus()) + if popErr := writeBuffer.PopContext("daylightSavingsStatus"); popErr != nil { + return errors.Wrap(popErr, "Error popping for daylightSavingsStatus") + } + if _daylightSavingsStatusErr != nil { + return errors.Wrap(_daylightSavingsStatusErr, "Error serializing 'daylightSavingsStatus' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataDaylightSavingsStatus"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataDaylightSavingsStatus") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataDaylightSavingsStatus) SerializeWithWriteBuffer(c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDaylightSavingsStatus) isBACnetConstructedDataDaylightSavingsStatus() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataDaylightSavingsStatus) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDaysRemaining.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDaysRemaining.go index c23c9a5aaa0..05dd32b6620 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDaysRemaining.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDaysRemaining.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDaysRemaining is the corresponding interface of BACnetConstructedDataDaysRemaining type BACnetConstructedDataDaysRemaining interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataDaysRemainingExactly interface { // _BACnetConstructedDataDaysRemaining is the data-structure of this message type _BACnetConstructedDataDaysRemaining struct { *_BACnetConstructedData - DaysRemaining BACnetApplicationTagSignedInteger + DaysRemaining BACnetApplicationTagSignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDaysRemaining) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataDaysRemaining) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataDaysRemaining) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_DAYS_REMAINING -} +func (m *_BACnetConstructedDataDaysRemaining) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_DAYS_REMAINING} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDaysRemaining) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDaysRemaining) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDaysRemaining) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDaysRemaining) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataDaysRemaining) GetActualValue() BACnetApplication /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataDaysRemaining factory function for _BACnetConstructedDataDaysRemaining -func NewBACnetConstructedDataDaysRemaining(daysRemaining BACnetApplicationTagSignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDaysRemaining { +func NewBACnetConstructedDataDaysRemaining( daysRemaining BACnetApplicationTagSignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDaysRemaining { _result := &_BACnetConstructedDataDaysRemaining{ - DaysRemaining: daysRemaining, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + DaysRemaining: daysRemaining, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataDaysRemaining(daysRemaining BACnetApplicationTagSig // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDaysRemaining(structType interface{}) BACnetConstructedDataDaysRemaining { - if casted, ok := structType.(BACnetConstructedDataDaysRemaining); ok { + if casted, ok := structType.(BACnetConstructedDataDaysRemaining); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDaysRemaining); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataDaysRemaining) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetConstructedDataDaysRemaining) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataDaysRemainingParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("daysRemaining"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for daysRemaining") } - _daysRemaining, _daysRemainingErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_daysRemaining, _daysRemainingErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _daysRemainingErr != nil { return nil, errors.Wrap(_daysRemainingErr, "Error parsing 'daysRemaining' field of BACnetConstructedDataDaysRemaining") } @@ -186,7 +188,7 @@ func BACnetConstructedDataDaysRemainingParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetConstructedDataDaysRemaining{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, DaysRemaining: daysRemaining, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataDaysRemaining) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataDaysRemaining") } - // Simple Field (daysRemaining) - if pushErr := writeBuffer.PushContext("daysRemaining"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for daysRemaining") - } - _daysRemainingErr := writeBuffer.WriteSerializable(ctx, m.GetDaysRemaining()) - if popErr := writeBuffer.PopContext("daysRemaining"); popErr != nil { - return errors.Wrap(popErr, "Error popping for daysRemaining") - } - if _daysRemainingErr != nil { - return errors.Wrap(_daysRemainingErr, "Error serializing 'daysRemaining' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (daysRemaining) + if pushErr := writeBuffer.PushContext("daysRemaining"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for daysRemaining") + } + _daysRemainingErr := writeBuffer.WriteSerializable(ctx, m.GetDaysRemaining()) + if popErr := writeBuffer.PopContext("daysRemaining"); popErr != nil { + return errors.Wrap(popErr, "Error popping for daysRemaining") + } + if _daysRemainingErr != nil { + return errors.Wrap(_daysRemainingErr, "Error serializing 'daysRemaining' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataDaysRemaining"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataDaysRemaining") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataDaysRemaining) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDaysRemaining) isBACnetConstructedDataDaysRemaining() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataDaysRemaining) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDeadband.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDeadband.go index 9b317eb3fa1..6a95db2b065 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDeadband.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDeadband.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDeadband is the corresponding interface of BACnetConstructedDataDeadband type BACnetConstructedDataDeadband interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataDeadbandExactly interface { // _BACnetConstructedDataDeadband is the data-structure of this message type _BACnetConstructedDataDeadband struct { *_BACnetConstructedData - Deadband BACnetApplicationTagReal + Deadband BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDeadband) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataDeadband) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataDeadband) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_DEADBAND -} +func (m *_BACnetConstructedDataDeadband) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_DEADBAND} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDeadband) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDeadband) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDeadband) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDeadband) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataDeadband) GetActualValue() BACnetApplicationTagRe /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataDeadband factory function for _BACnetConstructedDataDeadband -func NewBACnetConstructedDataDeadband(deadband BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDeadband { +func NewBACnetConstructedDataDeadband( deadband BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDeadband { _result := &_BACnetConstructedDataDeadband{ - Deadband: deadband, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Deadband: deadband, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataDeadband(deadband BACnetApplicationTagReal, opening // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDeadband(structType interface{}) BACnetConstructedDataDeadband { - if casted, ok := structType.(BACnetConstructedDataDeadband); ok { + if casted, ok := structType.(BACnetConstructedDataDeadband); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDeadband); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataDeadband) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetConstructedDataDeadband) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataDeadbandParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("deadband"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for deadband") } - _deadband, _deadbandErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_deadband, _deadbandErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _deadbandErr != nil { return nil, errors.Wrap(_deadbandErr, "Error parsing 'deadband' field of BACnetConstructedDataDeadband") } @@ -186,7 +188,7 @@ func BACnetConstructedDataDeadbandParseWithBuffer(ctx context.Context, readBuffe // Create a partially initialized instance _child := &_BACnetConstructedDataDeadband{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Deadband: deadband, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataDeadband) SerializeWithWriteBuffer(ctx context.Co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataDeadband") } - // Simple Field (deadband) - if pushErr := writeBuffer.PushContext("deadband"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for deadband") - } - _deadbandErr := writeBuffer.WriteSerializable(ctx, m.GetDeadband()) - if popErr := writeBuffer.PopContext("deadband"); popErr != nil { - return errors.Wrap(popErr, "Error popping for deadband") - } - if _deadbandErr != nil { - return errors.Wrap(_deadbandErr, "Error serializing 'deadband' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (deadband) + if pushErr := writeBuffer.PushContext("deadband"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for deadband") + } + _deadbandErr := writeBuffer.WriteSerializable(ctx, m.GetDeadband()) + if popErr := writeBuffer.PopContext("deadband"); popErr != nil { + return errors.Wrap(popErr, "Error popping for deadband") + } + if _deadbandErr != nil { + return errors.Wrap(_deadbandErr, "Error serializing 'deadband' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataDeadband"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataDeadband") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataDeadband) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDeadband) isBACnetConstructedDataDeadband() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataDeadband) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDefaultFadeTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDefaultFadeTime.go index 43d58b2656e..61f423a1186 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDefaultFadeTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDefaultFadeTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDefaultFadeTime is the corresponding interface of BACnetConstructedDataDefaultFadeTime type BACnetConstructedDataDefaultFadeTime interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataDefaultFadeTimeExactly interface { // _BACnetConstructedDataDefaultFadeTime is the data-structure of this message type _BACnetConstructedDataDefaultFadeTime struct { *_BACnetConstructedData - DefaultFadeTime BACnetApplicationTagUnsignedInteger + DefaultFadeTime BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDefaultFadeTime) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataDefaultFadeTime) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataDefaultFadeTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_DEFAULT_FADE_TIME -} +func (m *_BACnetConstructedDataDefaultFadeTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_DEFAULT_FADE_TIME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDefaultFadeTime) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDefaultFadeTime) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDefaultFadeTime) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDefaultFadeTime) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataDefaultFadeTime) GetActualValue() BACnetApplicati /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataDefaultFadeTime factory function for _BACnetConstructedDataDefaultFadeTime -func NewBACnetConstructedDataDefaultFadeTime(defaultFadeTime BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDefaultFadeTime { +func NewBACnetConstructedDataDefaultFadeTime( defaultFadeTime BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDefaultFadeTime { _result := &_BACnetConstructedDataDefaultFadeTime{ - DefaultFadeTime: defaultFadeTime, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + DefaultFadeTime: defaultFadeTime, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataDefaultFadeTime(defaultFadeTime BACnetApplicationTa // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDefaultFadeTime(structType interface{}) BACnetConstructedDataDefaultFadeTime { - if casted, ok := structType.(BACnetConstructedDataDefaultFadeTime); ok { + if casted, ok := structType.(BACnetConstructedDataDefaultFadeTime); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDefaultFadeTime); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataDefaultFadeTime) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetConstructedDataDefaultFadeTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataDefaultFadeTimeParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("defaultFadeTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for defaultFadeTime") } - _defaultFadeTime, _defaultFadeTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_defaultFadeTime, _defaultFadeTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _defaultFadeTimeErr != nil { return nil, errors.Wrap(_defaultFadeTimeErr, "Error parsing 'defaultFadeTime' field of BACnetConstructedDataDefaultFadeTime") } @@ -186,7 +188,7 @@ func BACnetConstructedDataDefaultFadeTimeParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetConstructedDataDefaultFadeTime{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, DefaultFadeTime: defaultFadeTime, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataDefaultFadeTime) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataDefaultFadeTime") } - // Simple Field (defaultFadeTime) - if pushErr := writeBuffer.PushContext("defaultFadeTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for defaultFadeTime") - } - _defaultFadeTimeErr := writeBuffer.WriteSerializable(ctx, m.GetDefaultFadeTime()) - if popErr := writeBuffer.PopContext("defaultFadeTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for defaultFadeTime") - } - if _defaultFadeTimeErr != nil { - return errors.Wrap(_defaultFadeTimeErr, "Error serializing 'defaultFadeTime' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (defaultFadeTime) + if pushErr := writeBuffer.PushContext("defaultFadeTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for defaultFadeTime") + } + _defaultFadeTimeErr := writeBuffer.WriteSerializable(ctx, m.GetDefaultFadeTime()) + if popErr := writeBuffer.PopContext("defaultFadeTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for defaultFadeTime") + } + if _defaultFadeTimeErr != nil { + return errors.Wrap(_defaultFadeTimeErr, "Error serializing 'defaultFadeTime' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataDefaultFadeTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataDefaultFadeTime") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataDefaultFadeTime) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDefaultFadeTime) isBACnetConstructedDataDefaultFadeTime() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataDefaultFadeTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDefaultRampRate.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDefaultRampRate.go index 7e3bd0e8979..61decdf5cce 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDefaultRampRate.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDefaultRampRate.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDefaultRampRate is the corresponding interface of BACnetConstructedDataDefaultRampRate type BACnetConstructedDataDefaultRampRate interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataDefaultRampRateExactly interface { // _BACnetConstructedDataDefaultRampRate is the data-structure of this message type _BACnetConstructedDataDefaultRampRate struct { *_BACnetConstructedData - DefaultRampRate BACnetApplicationTagReal + DefaultRampRate BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDefaultRampRate) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataDefaultRampRate) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataDefaultRampRate) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_DEFAULT_RAMP_RATE -} +func (m *_BACnetConstructedDataDefaultRampRate) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_DEFAULT_RAMP_RATE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDefaultRampRate) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDefaultRampRate) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDefaultRampRate) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDefaultRampRate) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataDefaultRampRate) GetActualValue() BACnetApplicati /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataDefaultRampRate factory function for _BACnetConstructedDataDefaultRampRate -func NewBACnetConstructedDataDefaultRampRate(defaultRampRate BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDefaultRampRate { +func NewBACnetConstructedDataDefaultRampRate( defaultRampRate BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDefaultRampRate { _result := &_BACnetConstructedDataDefaultRampRate{ - DefaultRampRate: defaultRampRate, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + DefaultRampRate: defaultRampRate, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataDefaultRampRate(defaultRampRate BACnetApplicationTa // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDefaultRampRate(structType interface{}) BACnetConstructedDataDefaultRampRate { - if casted, ok := structType.(BACnetConstructedDataDefaultRampRate); ok { + if casted, ok := structType.(BACnetConstructedDataDefaultRampRate); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDefaultRampRate); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataDefaultRampRate) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetConstructedDataDefaultRampRate) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataDefaultRampRateParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("defaultRampRate"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for defaultRampRate") } - _defaultRampRate, _defaultRampRateErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_defaultRampRate, _defaultRampRateErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _defaultRampRateErr != nil { return nil, errors.Wrap(_defaultRampRateErr, "Error parsing 'defaultRampRate' field of BACnetConstructedDataDefaultRampRate") } @@ -186,7 +188,7 @@ func BACnetConstructedDataDefaultRampRateParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetConstructedDataDefaultRampRate{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, DefaultRampRate: defaultRampRate, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataDefaultRampRate) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataDefaultRampRate") } - // Simple Field (defaultRampRate) - if pushErr := writeBuffer.PushContext("defaultRampRate"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for defaultRampRate") - } - _defaultRampRateErr := writeBuffer.WriteSerializable(ctx, m.GetDefaultRampRate()) - if popErr := writeBuffer.PopContext("defaultRampRate"); popErr != nil { - return errors.Wrap(popErr, "Error popping for defaultRampRate") - } - if _defaultRampRateErr != nil { - return errors.Wrap(_defaultRampRateErr, "Error serializing 'defaultRampRate' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (defaultRampRate) + if pushErr := writeBuffer.PushContext("defaultRampRate"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for defaultRampRate") + } + _defaultRampRateErr := writeBuffer.WriteSerializable(ctx, m.GetDefaultRampRate()) + if popErr := writeBuffer.PopContext("defaultRampRate"); popErr != nil { + return errors.Wrap(popErr, "Error popping for defaultRampRate") + } + if _defaultRampRateErr != nil { + return errors.Wrap(_defaultRampRateErr, "Error serializing 'defaultRampRate' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataDefaultRampRate"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataDefaultRampRate") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataDefaultRampRate) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDefaultRampRate) isBACnetConstructedDataDefaultRampRate() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataDefaultRampRate) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDefaultStepIncrement.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDefaultStepIncrement.go index 2eaac4336c5..429be7b124f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDefaultStepIncrement.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDefaultStepIncrement.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDefaultStepIncrement is the corresponding interface of BACnetConstructedDataDefaultStepIncrement type BACnetConstructedDataDefaultStepIncrement interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataDefaultStepIncrementExactly interface { // _BACnetConstructedDataDefaultStepIncrement is the data-structure of this message type _BACnetConstructedDataDefaultStepIncrement struct { *_BACnetConstructedData - DefaultStepIncrement BACnetApplicationTagReal + DefaultStepIncrement BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDefaultStepIncrement) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataDefaultStepIncrement) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataDefaultStepIncrement) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_DEFAULT_STEP_INCREMENT -} +func (m *_BACnetConstructedDataDefaultStepIncrement) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_DEFAULT_STEP_INCREMENT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDefaultStepIncrement) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDefaultStepIncrement) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDefaultStepIncrement) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDefaultStepIncrement) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataDefaultStepIncrement) GetActualValue() BACnetAppl /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataDefaultStepIncrement factory function for _BACnetConstructedDataDefaultStepIncrement -func NewBACnetConstructedDataDefaultStepIncrement(defaultStepIncrement BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDefaultStepIncrement { +func NewBACnetConstructedDataDefaultStepIncrement( defaultStepIncrement BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDefaultStepIncrement { _result := &_BACnetConstructedDataDefaultStepIncrement{ - DefaultStepIncrement: defaultStepIncrement, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + DefaultStepIncrement: defaultStepIncrement, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataDefaultStepIncrement(defaultStepIncrement BACnetApp // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDefaultStepIncrement(structType interface{}) BACnetConstructedDataDefaultStepIncrement { - if casted, ok := structType.(BACnetConstructedDataDefaultStepIncrement); ok { + if casted, ok := structType.(BACnetConstructedDataDefaultStepIncrement); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDefaultStepIncrement); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataDefaultStepIncrement) GetLengthInBits(ctx context return lengthInBits } + func (m *_BACnetConstructedDataDefaultStepIncrement) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataDefaultStepIncrementParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("defaultStepIncrement"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for defaultStepIncrement") } - _defaultStepIncrement, _defaultStepIncrementErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_defaultStepIncrement, _defaultStepIncrementErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _defaultStepIncrementErr != nil { return nil, errors.Wrap(_defaultStepIncrementErr, "Error parsing 'defaultStepIncrement' field of BACnetConstructedDataDefaultStepIncrement") } @@ -186,7 +188,7 @@ func BACnetConstructedDataDefaultStepIncrementParseWithBuffer(ctx context.Contex // Create a partially initialized instance _child := &_BACnetConstructedDataDefaultStepIncrement{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, DefaultStepIncrement: defaultStepIncrement, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataDefaultStepIncrement) SerializeWithWriteBuffer(ct return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataDefaultStepIncrement") } - // Simple Field (defaultStepIncrement) - if pushErr := writeBuffer.PushContext("defaultStepIncrement"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for defaultStepIncrement") - } - _defaultStepIncrementErr := writeBuffer.WriteSerializable(ctx, m.GetDefaultStepIncrement()) - if popErr := writeBuffer.PopContext("defaultStepIncrement"); popErr != nil { - return errors.Wrap(popErr, "Error popping for defaultStepIncrement") - } - if _defaultStepIncrementErr != nil { - return errors.Wrap(_defaultStepIncrementErr, "Error serializing 'defaultStepIncrement' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (defaultStepIncrement) + if pushErr := writeBuffer.PushContext("defaultStepIncrement"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for defaultStepIncrement") + } + _defaultStepIncrementErr := writeBuffer.WriteSerializable(ctx, m.GetDefaultStepIncrement()) + if popErr := writeBuffer.PopContext("defaultStepIncrement"); popErr != nil { + return errors.Wrap(popErr, "Error popping for defaultStepIncrement") + } + if _defaultStepIncrementErr != nil { + return errors.Wrap(_defaultStepIncrementErr, "Error serializing 'defaultStepIncrement' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataDefaultStepIncrement"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataDefaultStepIncrement") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataDefaultStepIncrement) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDefaultStepIncrement) isBACnetConstructedDataDefaultStepIncrement() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataDefaultStepIncrement) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDefaultSubordinateRelationship.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDefaultSubordinateRelationship.go index 79762bc2107..e366b31c020 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDefaultSubordinateRelationship.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDefaultSubordinateRelationship.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDefaultSubordinateRelationship is the corresponding interface of BACnetConstructedDataDefaultSubordinateRelationship type BACnetConstructedDataDefaultSubordinateRelationship interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataDefaultSubordinateRelationshipExactly interface { // _BACnetConstructedDataDefaultSubordinateRelationship is the data-structure of this message type _BACnetConstructedDataDefaultSubordinateRelationship struct { *_BACnetConstructedData - DefaultSubordinateRelationship BACnetRelationshipTagged + DefaultSubordinateRelationship BACnetRelationshipTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDefaultSubordinateRelationship) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataDefaultSubordinateRelationship) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataDefaultSubordinateRelationship) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_DEFAULT_SUBORDINATE_RELATIONSHIP -} +func (m *_BACnetConstructedDataDefaultSubordinateRelationship) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_DEFAULT_SUBORDINATE_RELATIONSHIP} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDefaultSubordinateRelationship) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDefaultSubordinateRelationship) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDefaultSubordinateRelationship) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDefaultSubordinateRelationship) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataDefaultSubordinateRelationship) GetActualValue() /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataDefaultSubordinateRelationship factory function for _BACnetConstructedDataDefaultSubordinateRelationship -func NewBACnetConstructedDataDefaultSubordinateRelationship(defaultSubordinateRelationship BACnetRelationshipTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDefaultSubordinateRelationship { +func NewBACnetConstructedDataDefaultSubordinateRelationship( defaultSubordinateRelationship BACnetRelationshipTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDefaultSubordinateRelationship { _result := &_BACnetConstructedDataDefaultSubordinateRelationship{ DefaultSubordinateRelationship: defaultSubordinateRelationship, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataDefaultSubordinateRelationship(defaultSubordinateRe // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDefaultSubordinateRelationship(structType interface{}) BACnetConstructedDataDefaultSubordinateRelationship { - if casted, ok := structType.(BACnetConstructedDataDefaultSubordinateRelationship); ok { + if casted, ok := structType.(BACnetConstructedDataDefaultSubordinateRelationship); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDefaultSubordinateRelationship); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataDefaultSubordinateRelationship) GetLengthInBits(c return lengthInBits } + func (m *_BACnetConstructedDataDefaultSubordinateRelationship) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataDefaultSubordinateRelationshipParseWithBuffer(ctx cont if pullErr := readBuffer.PullContext("defaultSubordinateRelationship"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for defaultSubordinateRelationship") } - _defaultSubordinateRelationship, _defaultSubordinateRelationshipErr := BACnetRelationshipTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_defaultSubordinateRelationship, _defaultSubordinateRelationshipErr := BACnetRelationshipTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _defaultSubordinateRelationshipErr != nil { return nil, errors.Wrap(_defaultSubordinateRelationshipErr, "Error parsing 'defaultSubordinateRelationship' field of BACnetConstructedDataDefaultSubordinateRelationship") } @@ -186,7 +188,7 @@ func BACnetConstructedDataDefaultSubordinateRelationshipParseWithBuffer(ctx cont // Create a partially initialized instance _child := &_BACnetConstructedDataDefaultSubordinateRelationship{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, DefaultSubordinateRelationship: defaultSubordinateRelationship, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataDefaultSubordinateRelationship) SerializeWithWrit return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataDefaultSubordinateRelationship") } - // Simple Field (defaultSubordinateRelationship) - if pushErr := writeBuffer.PushContext("defaultSubordinateRelationship"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for defaultSubordinateRelationship") - } - _defaultSubordinateRelationshipErr := writeBuffer.WriteSerializable(ctx, m.GetDefaultSubordinateRelationship()) - if popErr := writeBuffer.PopContext("defaultSubordinateRelationship"); popErr != nil { - return errors.Wrap(popErr, "Error popping for defaultSubordinateRelationship") - } - if _defaultSubordinateRelationshipErr != nil { - return errors.Wrap(_defaultSubordinateRelationshipErr, "Error serializing 'defaultSubordinateRelationship' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (defaultSubordinateRelationship) + if pushErr := writeBuffer.PushContext("defaultSubordinateRelationship"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for defaultSubordinateRelationship") + } + _defaultSubordinateRelationshipErr := writeBuffer.WriteSerializable(ctx, m.GetDefaultSubordinateRelationship()) + if popErr := writeBuffer.PopContext("defaultSubordinateRelationship"); popErr != nil { + return errors.Wrap(popErr, "Error popping for defaultSubordinateRelationship") + } + if _defaultSubordinateRelationshipErr != nil { + return errors.Wrap(_defaultSubordinateRelationshipErr, "Error serializing 'defaultSubordinateRelationship' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataDefaultSubordinateRelationship"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataDefaultSubordinateRelationship") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataDefaultSubordinateRelationship) SerializeWithWrit return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDefaultSubordinateRelationship) isBACnetConstructedDataDefaultSubordinateRelationship() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataDefaultSubordinateRelationship) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDefaultTimeout.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDefaultTimeout.go index 894edba3b85..0c4cca82552 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDefaultTimeout.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDefaultTimeout.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDefaultTimeout is the corresponding interface of BACnetConstructedDataDefaultTimeout type BACnetConstructedDataDefaultTimeout interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataDefaultTimeoutExactly interface { // _BACnetConstructedDataDefaultTimeout is the data-structure of this message type _BACnetConstructedDataDefaultTimeout struct { *_BACnetConstructedData - DefaultTimeout BACnetApplicationTagUnsignedInteger + DefaultTimeout BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDefaultTimeout) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataDefaultTimeout) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataDefaultTimeout) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_DEFAULT_TIMEOUT -} +func (m *_BACnetConstructedDataDefaultTimeout) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_DEFAULT_TIMEOUT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDefaultTimeout) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDefaultTimeout) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDefaultTimeout) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDefaultTimeout) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataDefaultTimeout) GetActualValue() BACnetApplicatio /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataDefaultTimeout factory function for _BACnetConstructedDataDefaultTimeout -func NewBACnetConstructedDataDefaultTimeout(defaultTimeout BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDefaultTimeout { +func NewBACnetConstructedDataDefaultTimeout( defaultTimeout BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDefaultTimeout { _result := &_BACnetConstructedDataDefaultTimeout{ - DefaultTimeout: defaultTimeout, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + DefaultTimeout: defaultTimeout, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataDefaultTimeout(defaultTimeout BACnetApplicationTagU // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDefaultTimeout(structType interface{}) BACnetConstructedDataDefaultTimeout { - if casted, ok := structType.(BACnetConstructedDataDefaultTimeout); ok { + if casted, ok := structType.(BACnetConstructedDataDefaultTimeout); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDefaultTimeout); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataDefaultTimeout) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConstructedDataDefaultTimeout) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataDefaultTimeoutParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("defaultTimeout"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for defaultTimeout") } - _defaultTimeout, _defaultTimeoutErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_defaultTimeout, _defaultTimeoutErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _defaultTimeoutErr != nil { return nil, errors.Wrap(_defaultTimeoutErr, "Error parsing 'defaultTimeout' field of BACnetConstructedDataDefaultTimeout") } @@ -186,7 +188,7 @@ func BACnetConstructedDataDefaultTimeoutParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetConstructedDataDefaultTimeout{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, DefaultTimeout: defaultTimeout, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataDefaultTimeout) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataDefaultTimeout") } - // Simple Field (defaultTimeout) - if pushErr := writeBuffer.PushContext("defaultTimeout"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for defaultTimeout") - } - _defaultTimeoutErr := writeBuffer.WriteSerializable(ctx, m.GetDefaultTimeout()) - if popErr := writeBuffer.PopContext("defaultTimeout"); popErr != nil { - return errors.Wrap(popErr, "Error popping for defaultTimeout") - } - if _defaultTimeoutErr != nil { - return errors.Wrap(_defaultTimeoutErr, "Error serializing 'defaultTimeout' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (defaultTimeout) + if pushErr := writeBuffer.PushContext("defaultTimeout"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for defaultTimeout") + } + _defaultTimeoutErr := writeBuffer.WriteSerializable(ctx, m.GetDefaultTimeout()) + if popErr := writeBuffer.PopContext("defaultTimeout"); popErr != nil { + return errors.Wrap(popErr, "Error popping for defaultTimeout") + } + if _defaultTimeoutErr != nil { + return errors.Wrap(_defaultTimeoutErr, "Error serializing 'defaultTimeout' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataDefaultTimeout"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataDefaultTimeout") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataDefaultTimeout) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDefaultTimeout) isBACnetConstructedDataDefaultTimeout() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataDefaultTimeout) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDeployedProfileLocation.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDeployedProfileLocation.go index 444b341d2b3..6e9d4d771ab 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDeployedProfileLocation.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDeployedProfileLocation.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDeployedProfileLocation is the corresponding interface of BACnetConstructedDataDeployedProfileLocation type BACnetConstructedDataDeployedProfileLocation interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataDeployedProfileLocationExactly interface { // _BACnetConstructedDataDeployedProfileLocation is the data-structure of this message type _BACnetConstructedDataDeployedProfileLocation struct { *_BACnetConstructedData - DeployedProfileLocation BACnetApplicationTagCharacterString + DeployedProfileLocation BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDeployedProfileLocation) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataDeployedProfileLocation) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataDeployedProfileLocation) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_DEPLOYED_PROFILE_LOCATION -} +func (m *_BACnetConstructedDataDeployedProfileLocation) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_DEPLOYED_PROFILE_LOCATION} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDeployedProfileLocation) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDeployedProfileLocation) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDeployedProfileLocation) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDeployedProfileLocation) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataDeployedProfileLocation) GetActualValue() BACnetA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataDeployedProfileLocation factory function for _BACnetConstructedDataDeployedProfileLocation -func NewBACnetConstructedDataDeployedProfileLocation(deployedProfileLocation BACnetApplicationTagCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDeployedProfileLocation { +func NewBACnetConstructedDataDeployedProfileLocation( deployedProfileLocation BACnetApplicationTagCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDeployedProfileLocation { _result := &_BACnetConstructedDataDeployedProfileLocation{ DeployedProfileLocation: deployedProfileLocation, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataDeployedProfileLocation(deployedProfileLocation BAC // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDeployedProfileLocation(structType interface{}) BACnetConstructedDataDeployedProfileLocation { - if casted, ok := structType.(BACnetConstructedDataDeployedProfileLocation); ok { + if casted, ok := structType.(BACnetConstructedDataDeployedProfileLocation); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDeployedProfileLocation); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataDeployedProfileLocation) GetLengthInBits(ctx cont return lengthInBits } + func (m *_BACnetConstructedDataDeployedProfileLocation) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataDeployedProfileLocationParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("deployedProfileLocation"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for deployedProfileLocation") } - _deployedProfileLocation, _deployedProfileLocationErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_deployedProfileLocation, _deployedProfileLocationErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _deployedProfileLocationErr != nil { return nil, errors.Wrap(_deployedProfileLocationErr, "Error parsing 'deployedProfileLocation' field of BACnetConstructedDataDeployedProfileLocation") } @@ -186,7 +188,7 @@ func BACnetConstructedDataDeployedProfileLocationParseWithBuffer(ctx context.Con // Create a partially initialized instance _child := &_BACnetConstructedDataDeployedProfileLocation{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, DeployedProfileLocation: deployedProfileLocation, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataDeployedProfileLocation) SerializeWithWriteBuffer return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataDeployedProfileLocation") } - // Simple Field (deployedProfileLocation) - if pushErr := writeBuffer.PushContext("deployedProfileLocation"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for deployedProfileLocation") - } - _deployedProfileLocationErr := writeBuffer.WriteSerializable(ctx, m.GetDeployedProfileLocation()) - if popErr := writeBuffer.PopContext("deployedProfileLocation"); popErr != nil { - return errors.Wrap(popErr, "Error popping for deployedProfileLocation") - } - if _deployedProfileLocationErr != nil { - return errors.Wrap(_deployedProfileLocationErr, "Error serializing 'deployedProfileLocation' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (deployedProfileLocation) + if pushErr := writeBuffer.PushContext("deployedProfileLocation"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for deployedProfileLocation") + } + _deployedProfileLocationErr := writeBuffer.WriteSerializable(ctx, m.GetDeployedProfileLocation()) + if popErr := writeBuffer.PopContext("deployedProfileLocation"); popErr != nil { + return errors.Wrap(popErr, "Error popping for deployedProfileLocation") + } + if _deployedProfileLocationErr != nil { + return errors.Wrap(_deployedProfileLocationErr, "Error serializing 'deployedProfileLocation' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataDeployedProfileLocation"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataDeployedProfileLocation") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataDeployedProfileLocation) SerializeWithWriteBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDeployedProfileLocation) isBACnetConstructedDataDeployedProfileLocation() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataDeployedProfileLocation) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDerivativeConstant.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDerivativeConstant.go index f3a6569e5f4..783f849f8b2 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDerivativeConstant.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDerivativeConstant.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDerivativeConstant is the corresponding interface of BACnetConstructedDataDerivativeConstant type BACnetConstructedDataDerivativeConstant interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataDerivativeConstantExactly interface { // _BACnetConstructedDataDerivativeConstant is the data-structure of this message type _BACnetConstructedDataDerivativeConstant struct { *_BACnetConstructedData - DerivativeConstant BACnetApplicationTagReal + DerivativeConstant BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDerivativeConstant) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataDerivativeConstant) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataDerivativeConstant) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_DERIVATIVE_CONSTANT -} +func (m *_BACnetConstructedDataDerivativeConstant) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_DERIVATIVE_CONSTANT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDerivativeConstant) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDerivativeConstant) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDerivativeConstant) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDerivativeConstant) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataDerivativeConstant) GetActualValue() BACnetApplic /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataDerivativeConstant factory function for _BACnetConstructedDataDerivativeConstant -func NewBACnetConstructedDataDerivativeConstant(derivativeConstant BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDerivativeConstant { +func NewBACnetConstructedDataDerivativeConstant( derivativeConstant BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDerivativeConstant { _result := &_BACnetConstructedDataDerivativeConstant{ - DerivativeConstant: derivativeConstant, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + DerivativeConstant: derivativeConstant, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataDerivativeConstant(derivativeConstant BACnetApplica // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDerivativeConstant(structType interface{}) BACnetConstructedDataDerivativeConstant { - if casted, ok := structType.(BACnetConstructedDataDerivativeConstant); ok { + if casted, ok := structType.(BACnetConstructedDataDerivativeConstant); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDerivativeConstant); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataDerivativeConstant) GetLengthInBits(ctx context.C return lengthInBits } + func (m *_BACnetConstructedDataDerivativeConstant) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataDerivativeConstantParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("derivativeConstant"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for derivativeConstant") } - _derivativeConstant, _derivativeConstantErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_derivativeConstant, _derivativeConstantErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _derivativeConstantErr != nil { return nil, errors.Wrap(_derivativeConstantErr, "Error parsing 'derivativeConstant' field of BACnetConstructedDataDerivativeConstant") } @@ -186,7 +188,7 @@ func BACnetConstructedDataDerivativeConstantParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataDerivativeConstant{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, DerivativeConstant: derivativeConstant, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataDerivativeConstant) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataDerivativeConstant") } - // Simple Field (derivativeConstant) - if pushErr := writeBuffer.PushContext("derivativeConstant"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for derivativeConstant") - } - _derivativeConstantErr := writeBuffer.WriteSerializable(ctx, m.GetDerivativeConstant()) - if popErr := writeBuffer.PopContext("derivativeConstant"); popErr != nil { - return errors.Wrap(popErr, "Error popping for derivativeConstant") - } - if _derivativeConstantErr != nil { - return errors.Wrap(_derivativeConstantErr, "Error serializing 'derivativeConstant' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (derivativeConstant) + if pushErr := writeBuffer.PushContext("derivativeConstant"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for derivativeConstant") + } + _derivativeConstantErr := writeBuffer.WriteSerializable(ctx, m.GetDerivativeConstant()) + if popErr := writeBuffer.PopContext("derivativeConstant"); popErr != nil { + return errors.Wrap(popErr, "Error popping for derivativeConstant") + } + if _derivativeConstantErr != nil { + return errors.Wrap(_derivativeConstantErr, "Error serializing 'derivativeConstant' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataDerivativeConstant"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataDerivativeConstant") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataDerivativeConstant) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDerivativeConstant) isBACnetConstructedDataDerivativeConstant() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataDerivativeConstant) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDerivativeConstantUnits.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDerivativeConstantUnits.go index e4516061116..52f1d206568 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDerivativeConstantUnits.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDerivativeConstantUnits.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDerivativeConstantUnits is the corresponding interface of BACnetConstructedDataDerivativeConstantUnits type BACnetConstructedDataDerivativeConstantUnits interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataDerivativeConstantUnitsExactly interface { // _BACnetConstructedDataDerivativeConstantUnits is the data-structure of this message type _BACnetConstructedDataDerivativeConstantUnits struct { *_BACnetConstructedData - Units BACnetEngineeringUnitsTagged + Units BACnetEngineeringUnitsTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDerivativeConstantUnits) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataDerivativeConstantUnits) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataDerivativeConstantUnits) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_DERIVATIVE_CONSTANT_UNITS -} +func (m *_BACnetConstructedDataDerivativeConstantUnits) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_DERIVATIVE_CONSTANT_UNITS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDerivativeConstantUnits) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDerivativeConstantUnits) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDerivativeConstantUnits) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDerivativeConstantUnits) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataDerivativeConstantUnits) GetActualValue() BACnetE /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataDerivativeConstantUnits factory function for _BACnetConstructedDataDerivativeConstantUnits -func NewBACnetConstructedDataDerivativeConstantUnits(units BACnetEngineeringUnitsTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDerivativeConstantUnits { +func NewBACnetConstructedDataDerivativeConstantUnits( units BACnetEngineeringUnitsTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDerivativeConstantUnits { _result := &_BACnetConstructedDataDerivativeConstantUnits{ - Units: units, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Units: units, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataDerivativeConstantUnits(units BACnetEngineeringUnit // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDerivativeConstantUnits(structType interface{}) BACnetConstructedDataDerivativeConstantUnits { - if casted, ok := structType.(BACnetConstructedDataDerivativeConstantUnits); ok { + if casted, ok := structType.(BACnetConstructedDataDerivativeConstantUnits); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDerivativeConstantUnits); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataDerivativeConstantUnits) GetLengthInBits(ctx cont return lengthInBits } + func (m *_BACnetConstructedDataDerivativeConstantUnits) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataDerivativeConstantUnitsParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("units"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for units") } - _units, _unitsErr := BACnetEngineeringUnitsTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_units, _unitsErr := BACnetEngineeringUnitsTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _unitsErr != nil { return nil, errors.Wrap(_unitsErr, "Error parsing 'units' field of BACnetConstructedDataDerivativeConstantUnits") } @@ -186,7 +188,7 @@ func BACnetConstructedDataDerivativeConstantUnitsParseWithBuffer(ctx context.Con // Create a partially initialized instance _child := &_BACnetConstructedDataDerivativeConstantUnits{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Units: units, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataDerivativeConstantUnits) SerializeWithWriteBuffer return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataDerivativeConstantUnits") } - // Simple Field (units) - if pushErr := writeBuffer.PushContext("units"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for units") - } - _unitsErr := writeBuffer.WriteSerializable(ctx, m.GetUnits()) - if popErr := writeBuffer.PopContext("units"); popErr != nil { - return errors.Wrap(popErr, "Error popping for units") - } - if _unitsErr != nil { - return errors.Wrap(_unitsErr, "Error serializing 'units' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (units) + if pushErr := writeBuffer.PushContext("units"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for units") + } + _unitsErr := writeBuffer.WriteSerializable(ctx, m.GetUnits()) + if popErr := writeBuffer.PopContext("units"); popErr != nil { + return errors.Wrap(popErr, "Error popping for units") + } + if _unitsErr != nil { + return errors.Wrap(_unitsErr, "Error serializing 'units' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataDerivativeConstantUnits"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataDerivativeConstantUnits") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataDerivativeConstantUnits) SerializeWithWriteBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDerivativeConstantUnits) isBACnetConstructedDataDerivativeConstantUnits() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataDerivativeConstantUnits) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDescription.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDescription.go index 10171d075c5..b7d8e251a89 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDescription.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDescription.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDescription is the corresponding interface of BACnetConstructedDataDescription type BACnetConstructedDataDescription interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataDescriptionExactly interface { // _BACnetConstructedDataDescription is the data-structure of this message type _BACnetConstructedDataDescription struct { *_BACnetConstructedData - Description BACnetApplicationTagCharacterString + Description BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDescription) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataDescription) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataDescription) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_DESCRIPTION -} +func (m *_BACnetConstructedDataDescription) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_DESCRIPTION} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDescription) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDescription) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDescription) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDescription) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataDescription) GetActualValue() BACnetApplicationTa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataDescription factory function for _BACnetConstructedDataDescription -func NewBACnetConstructedDataDescription(description BACnetApplicationTagCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDescription { +func NewBACnetConstructedDataDescription( description BACnetApplicationTagCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDescription { _result := &_BACnetConstructedDataDescription{ - Description: description, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Description: description, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataDescription(description BACnetApplicationTagCharact // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDescription(structType interface{}) BACnetConstructedDataDescription { - if casted, ok := structType.(BACnetConstructedDataDescription); ok { + if casted, ok := structType.(BACnetConstructedDataDescription); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDescription); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataDescription) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataDescription) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataDescriptionParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("description"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for description") } - _description, _descriptionErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_description, _descriptionErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _descriptionErr != nil { return nil, errors.Wrap(_descriptionErr, "Error parsing 'description' field of BACnetConstructedDataDescription") } @@ -186,7 +188,7 @@ func BACnetConstructedDataDescriptionParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataDescription{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Description: description, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataDescription) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataDescription") } - // Simple Field (description) - if pushErr := writeBuffer.PushContext("description"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for description") - } - _descriptionErr := writeBuffer.WriteSerializable(ctx, m.GetDescription()) - if popErr := writeBuffer.PopContext("description"); popErr != nil { - return errors.Wrap(popErr, "Error popping for description") - } - if _descriptionErr != nil { - return errors.Wrap(_descriptionErr, "Error serializing 'description' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (description) + if pushErr := writeBuffer.PushContext("description"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for description") + } + _descriptionErr := writeBuffer.WriteSerializable(ctx, m.GetDescription()) + if popErr := writeBuffer.PopContext("description"); popErr != nil { + return errors.Wrap(popErr, "Error popping for description") + } + if _descriptionErr != nil { + return errors.Wrap(_descriptionErr, "Error serializing 'description' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataDescription"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataDescription") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataDescription) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDescription) isBACnetConstructedDataDescription() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataDescription) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDescriptionOfHalt.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDescriptionOfHalt.go index 9c6b5a786a6..6338ee711fc 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDescriptionOfHalt.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDescriptionOfHalt.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDescriptionOfHalt is the corresponding interface of BACnetConstructedDataDescriptionOfHalt type BACnetConstructedDataDescriptionOfHalt interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataDescriptionOfHaltExactly interface { // _BACnetConstructedDataDescriptionOfHalt is the data-structure of this message type _BACnetConstructedDataDescriptionOfHalt struct { *_BACnetConstructedData - DescriptionForHalt BACnetApplicationTagCharacterString + DescriptionForHalt BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDescriptionOfHalt) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataDescriptionOfHalt) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataDescriptionOfHalt) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_DESCRIPTION_OF_HALT -} +func (m *_BACnetConstructedDataDescriptionOfHalt) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_DESCRIPTION_OF_HALT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDescriptionOfHalt) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDescriptionOfHalt) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDescriptionOfHalt) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDescriptionOfHalt) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataDescriptionOfHalt) GetActualValue() BACnetApplica /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataDescriptionOfHalt factory function for _BACnetConstructedDataDescriptionOfHalt -func NewBACnetConstructedDataDescriptionOfHalt(descriptionForHalt BACnetApplicationTagCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDescriptionOfHalt { +func NewBACnetConstructedDataDescriptionOfHalt( descriptionForHalt BACnetApplicationTagCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDescriptionOfHalt { _result := &_BACnetConstructedDataDescriptionOfHalt{ - DescriptionForHalt: descriptionForHalt, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + DescriptionForHalt: descriptionForHalt, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataDescriptionOfHalt(descriptionForHalt BACnetApplicat // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDescriptionOfHalt(structType interface{}) BACnetConstructedDataDescriptionOfHalt { - if casted, ok := structType.(BACnetConstructedDataDescriptionOfHalt); ok { + if casted, ok := structType.(BACnetConstructedDataDescriptionOfHalt); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDescriptionOfHalt); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataDescriptionOfHalt) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetConstructedDataDescriptionOfHalt) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataDescriptionOfHaltParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("descriptionForHalt"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for descriptionForHalt") } - _descriptionForHalt, _descriptionForHaltErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_descriptionForHalt, _descriptionForHaltErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _descriptionForHaltErr != nil { return nil, errors.Wrap(_descriptionForHaltErr, "Error parsing 'descriptionForHalt' field of BACnetConstructedDataDescriptionOfHalt") } @@ -186,7 +188,7 @@ func BACnetConstructedDataDescriptionOfHaltParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataDescriptionOfHalt{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, DescriptionForHalt: descriptionForHalt, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataDescriptionOfHalt) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataDescriptionOfHalt") } - // Simple Field (descriptionForHalt) - if pushErr := writeBuffer.PushContext("descriptionForHalt"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for descriptionForHalt") - } - _descriptionForHaltErr := writeBuffer.WriteSerializable(ctx, m.GetDescriptionForHalt()) - if popErr := writeBuffer.PopContext("descriptionForHalt"); popErr != nil { - return errors.Wrap(popErr, "Error popping for descriptionForHalt") - } - if _descriptionForHaltErr != nil { - return errors.Wrap(_descriptionForHaltErr, "Error serializing 'descriptionForHalt' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (descriptionForHalt) + if pushErr := writeBuffer.PushContext("descriptionForHalt"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for descriptionForHalt") + } + _descriptionForHaltErr := writeBuffer.WriteSerializable(ctx, m.GetDescriptionForHalt()) + if popErr := writeBuffer.PopContext("descriptionForHalt"); popErr != nil { + return errors.Wrap(popErr, "Error popping for descriptionForHalt") + } + if _descriptionForHaltErr != nil { + return errors.Wrap(_descriptionForHaltErr, "Error serializing 'descriptionForHalt' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataDescriptionOfHalt"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataDescriptionOfHalt") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataDescriptionOfHalt) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDescriptionOfHalt) isBACnetConstructedDataDescriptionOfHalt() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataDescriptionOfHalt) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDeviceAddressBinding.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDeviceAddressBinding.go index b1adb784803..2488c3a6678 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDeviceAddressBinding.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDeviceAddressBinding.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDeviceAddressBinding is the corresponding interface of BACnetConstructedDataDeviceAddressBinding type BACnetConstructedDataDeviceAddressBinding interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataDeviceAddressBindingExactly interface { // _BACnetConstructedDataDeviceAddressBinding is the data-structure of this message type _BACnetConstructedDataDeviceAddressBinding struct { *_BACnetConstructedData - DeviceAddressBinding []BACnetAddressBinding + DeviceAddressBinding []BACnetAddressBinding } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDeviceAddressBinding) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataDeviceAddressBinding) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataDeviceAddressBinding) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_DEVICE_ADDRESS_BINDING -} +func (m *_BACnetConstructedDataDeviceAddressBinding) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_DEVICE_ADDRESS_BINDING} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDeviceAddressBinding) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDeviceAddressBinding) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDeviceAddressBinding) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDeviceAddressBinding) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataDeviceAddressBinding) GetDeviceAddressBinding() [ /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataDeviceAddressBinding factory function for _BACnetConstructedDataDeviceAddressBinding -func NewBACnetConstructedDataDeviceAddressBinding(deviceAddressBinding []BACnetAddressBinding, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDeviceAddressBinding { +func NewBACnetConstructedDataDeviceAddressBinding( deviceAddressBinding []BACnetAddressBinding , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDeviceAddressBinding { _result := &_BACnetConstructedDataDeviceAddressBinding{ - DeviceAddressBinding: deviceAddressBinding, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + DeviceAddressBinding: deviceAddressBinding, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataDeviceAddressBinding(deviceAddressBinding []BACnetA // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDeviceAddressBinding(structType interface{}) BACnetConstructedDataDeviceAddressBinding { - if casted, ok := structType.(BACnetConstructedDataDeviceAddressBinding); ok { + if casted, ok := structType.(BACnetConstructedDataDeviceAddressBinding); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDeviceAddressBinding); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataDeviceAddressBinding) GetLengthInBits(ctx context return lengthInBits } + func (m *_BACnetConstructedDataDeviceAddressBinding) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataDeviceAddressBindingParseWithBuffer(ctx context.Contex // Terminated array var deviceAddressBinding []BACnetAddressBinding { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetAddressBindingParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetAddressBindingParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'deviceAddressBinding' field of BACnetConstructedDataDeviceAddressBinding") } @@ -173,7 +175,7 @@ func BACnetConstructedDataDeviceAddressBindingParseWithBuffer(ctx context.Contex // Create a partially initialized instance _child := &_BACnetConstructedDataDeviceAddressBinding{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, DeviceAddressBinding: deviceAddressBinding, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataDeviceAddressBinding) SerializeWithWriteBuffer(ct return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataDeviceAddressBinding") } - // Array Field (deviceAddressBinding) - if pushErr := writeBuffer.PushContext("deviceAddressBinding", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for deviceAddressBinding") - } - for _curItem, _element := range m.GetDeviceAddressBinding() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetDeviceAddressBinding()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'deviceAddressBinding' field") - } - } - if popErr := writeBuffer.PopContext("deviceAddressBinding", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for deviceAddressBinding") + // Array Field (deviceAddressBinding) + if pushErr := writeBuffer.PushContext("deviceAddressBinding", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for deviceAddressBinding") + } + for _curItem, _element := range m.GetDeviceAddressBinding() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetDeviceAddressBinding()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'deviceAddressBinding' field") } + } + if popErr := writeBuffer.PopContext("deviceAddressBinding", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for deviceAddressBinding") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataDeviceAddressBinding"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataDeviceAddressBinding") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataDeviceAddressBinding) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDeviceAddressBinding) isBACnetConstructedDataDeviceAddressBinding() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataDeviceAddressBinding) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDeviceAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDeviceAll.go index 0c914a7d715..d4f2c9ff9fa 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDeviceAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDeviceAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDeviceAll is the corresponding interface of BACnetConstructedDataDeviceAll type BACnetConstructedDataDeviceAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataDeviceAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDeviceAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_DEVICE -} +func (m *_BACnetConstructedDataDeviceAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_DEVICE} -func (m *_BACnetConstructedDataDeviceAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataDeviceAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDeviceAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDeviceAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDeviceAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDeviceAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataDeviceAll factory function for _BACnetConstructedDataDeviceAll -func NewBACnetConstructedDataDeviceAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDeviceAll { +func NewBACnetConstructedDataDeviceAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDeviceAll { _result := &_BACnetConstructedDataDeviceAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataDeviceAll(openingTag BACnetOpeningTag, peekedTagHea // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDeviceAll(structType interface{}) BACnetConstructedDataDeviceAll { - if casted, ok := structType.(BACnetConstructedDataDeviceAll); ok { + if casted, ok := structType.(BACnetConstructedDataDeviceAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDeviceAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataDeviceAll) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetConstructedDataDeviceAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataDeviceAllParseWithBuffer(ctx context.Context, readBuff _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataDeviceAllParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_BACnetConstructedDataDeviceAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataDeviceAll) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDeviceAll) isBACnetConstructedDataDeviceAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataDeviceAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDeviceMaxInfoFrames.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDeviceMaxInfoFrames.go index 0bb107eb5b8..93f413a5817 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDeviceMaxInfoFrames.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDeviceMaxInfoFrames.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDeviceMaxInfoFrames is the corresponding interface of BACnetConstructedDataDeviceMaxInfoFrames type BACnetConstructedDataDeviceMaxInfoFrames interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataDeviceMaxInfoFramesExactly interface { // _BACnetConstructedDataDeviceMaxInfoFrames is the data-structure of this message type _BACnetConstructedDataDeviceMaxInfoFrames struct { *_BACnetConstructedData - MaxInfoFrames BACnetApplicationTagUnsignedInteger + MaxInfoFrames BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDeviceMaxInfoFrames) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_DEVICE -} +func (m *_BACnetConstructedDataDeviceMaxInfoFrames) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_DEVICE} -func (m *_BACnetConstructedDataDeviceMaxInfoFrames) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MAX_INFO_FRAMES -} +func (m *_BACnetConstructedDataDeviceMaxInfoFrames) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MAX_INFO_FRAMES} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDeviceMaxInfoFrames) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDeviceMaxInfoFrames) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDeviceMaxInfoFrames) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDeviceMaxInfoFrames) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataDeviceMaxInfoFrames) GetActualValue() BACnetAppli /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataDeviceMaxInfoFrames factory function for _BACnetConstructedDataDeviceMaxInfoFrames -func NewBACnetConstructedDataDeviceMaxInfoFrames(maxInfoFrames BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDeviceMaxInfoFrames { +func NewBACnetConstructedDataDeviceMaxInfoFrames( maxInfoFrames BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDeviceMaxInfoFrames { _result := &_BACnetConstructedDataDeviceMaxInfoFrames{ - MaxInfoFrames: maxInfoFrames, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + MaxInfoFrames: maxInfoFrames, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataDeviceMaxInfoFrames(maxInfoFrames BACnetApplication // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDeviceMaxInfoFrames(structType interface{}) BACnetConstructedDataDeviceMaxInfoFrames { - if casted, ok := structType.(BACnetConstructedDataDeviceMaxInfoFrames); ok { + if casted, ok := structType.(BACnetConstructedDataDeviceMaxInfoFrames); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDeviceMaxInfoFrames); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataDeviceMaxInfoFrames) GetLengthInBits(ctx context. return lengthInBits } + func (m *_BACnetConstructedDataDeviceMaxInfoFrames) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataDeviceMaxInfoFramesParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("maxInfoFrames"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for maxInfoFrames") } - _maxInfoFrames, _maxInfoFramesErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_maxInfoFrames, _maxInfoFramesErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _maxInfoFramesErr != nil { return nil, errors.Wrap(_maxInfoFramesErr, "Error parsing 'maxInfoFrames' field of BACnetConstructedDataDeviceMaxInfoFrames") } @@ -186,7 +188,7 @@ func BACnetConstructedDataDeviceMaxInfoFramesParseWithBuffer(ctx context.Context // Create a partially initialized instance _child := &_BACnetConstructedDataDeviceMaxInfoFrames{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, MaxInfoFrames: maxInfoFrames, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataDeviceMaxInfoFrames) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataDeviceMaxInfoFrames") } - // Simple Field (maxInfoFrames) - if pushErr := writeBuffer.PushContext("maxInfoFrames"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for maxInfoFrames") - } - _maxInfoFramesErr := writeBuffer.WriteSerializable(ctx, m.GetMaxInfoFrames()) - if popErr := writeBuffer.PopContext("maxInfoFrames"); popErr != nil { - return errors.Wrap(popErr, "Error popping for maxInfoFrames") - } - if _maxInfoFramesErr != nil { - return errors.Wrap(_maxInfoFramesErr, "Error serializing 'maxInfoFrames' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (maxInfoFrames) + if pushErr := writeBuffer.PushContext("maxInfoFrames"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for maxInfoFrames") + } + _maxInfoFramesErr := writeBuffer.WriteSerializable(ctx, m.GetMaxInfoFrames()) + if popErr := writeBuffer.PopContext("maxInfoFrames"); popErr != nil { + return errors.Wrap(popErr, "Error popping for maxInfoFrames") + } + if _maxInfoFramesErr != nil { + return errors.Wrap(_maxInfoFramesErr, "Error serializing 'maxInfoFrames' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataDeviceMaxInfoFrames"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataDeviceMaxInfoFrames") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataDeviceMaxInfoFrames) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDeviceMaxInfoFrames) isBACnetConstructedDataDeviceMaxInfoFrames() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataDeviceMaxInfoFrames) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDeviceMaxMaster.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDeviceMaxMaster.go index a24261e8fba..a0526b8b0e3 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDeviceMaxMaster.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDeviceMaxMaster.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDeviceMaxMaster is the corresponding interface of BACnetConstructedDataDeviceMaxMaster type BACnetConstructedDataDeviceMaxMaster interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataDeviceMaxMasterExactly interface { // _BACnetConstructedDataDeviceMaxMaster is the data-structure of this message type _BACnetConstructedDataDeviceMaxMaster struct { *_BACnetConstructedData - MaxMaster BACnetApplicationTagUnsignedInteger + MaxMaster BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDeviceMaxMaster) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_DEVICE -} +func (m *_BACnetConstructedDataDeviceMaxMaster) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_DEVICE} -func (m *_BACnetConstructedDataDeviceMaxMaster) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MAX_MASTER -} +func (m *_BACnetConstructedDataDeviceMaxMaster) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MAX_MASTER} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDeviceMaxMaster) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDeviceMaxMaster) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDeviceMaxMaster) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDeviceMaxMaster) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataDeviceMaxMaster) GetActualValue() BACnetApplicati /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataDeviceMaxMaster factory function for _BACnetConstructedDataDeviceMaxMaster -func NewBACnetConstructedDataDeviceMaxMaster(maxMaster BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDeviceMaxMaster { +func NewBACnetConstructedDataDeviceMaxMaster( maxMaster BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDeviceMaxMaster { _result := &_BACnetConstructedDataDeviceMaxMaster{ - MaxMaster: maxMaster, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + MaxMaster: maxMaster, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataDeviceMaxMaster(maxMaster BACnetApplicationTagUnsig // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDeviceMaxMaster(structType interface{}) BACnetConstructedDataDeviceMaxMaster { - if casted, ok := structType.(BACnetConstructedDataDeviceMaxMaster); ok { + if casted, ok := structType.(BACnetConstructedDataDeviceMaxMaster); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDeviceMaxMaster); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataDeviceMaxMaster) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetConstructedDataDeviceMaxMaster) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataDeviceMaxMasterParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("maxMaster"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for maxMaster") } - _maxMaster, _maxMasterErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_maxMaster, _maxMasterErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _maxMasterErr != nil { return nil, errors.Wrap(_maxMasterErr, "Error parsing 'maxMaster' field of BACnetConstructedDataDeviceMaxMaster") } @@ -186,7 +188,7 @@ func BACnetConstructedDataDeviceMaxMasterParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetConstructedDataDeviceMaxMaster{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, MaxMaster: maxMaster, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataDeviceMaxMaster) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataDeviceMaxMaster") } - // Simple Field (maxMaster) - if pushErr := writeBuffer.PushContext("maxMaster"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for maxMaster") - } - _maxMasterErr := writeBuffer.WriteSerializable(ctx, m.GetMaxMaster()) - if popErr := writeBuffer.PopContext("maxMaster"); popErr != nil { - return errors.Wrap(popErr, "Error popping for maxMaster") - } - if _maxMasterErr != nil { - return errors.Wrap(_maxMasterErr, "Error serializing 'maxMaster' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (maxMaster) + if pushErr := writeBuffer.PushContext("maxMaster"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for maxMaster") + } + _maxMasterErr := writeBuffer.WriteSerializable(ctx, m.GetMaxMaster()) + if popErr := writeBuffer.PopContext("maxMaster"); popErr != nil { + return errors.Wrap(popErr, "Error popping for maxMaster") + } + if _maxMasterErr != nil { + return errors.Wrap(_maxMasterErr, "Error serializing 'maxMaster' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataDeviceMaxMaster"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataDeviceMaxMaster") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataDeviceMaxMaster) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDeviceMaxMaster) isBACnetConstructedDataDeviceMaxMaster() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataDeviceMaxMaster) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDeviceType.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDeviceType.go index f0c2aecd594..d618ac5892f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDeviceType.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDeviceType.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDeviceType is the corresponding interface of BACnetConstructedDataDeviceType type BACnetConstructedDataDeviceType interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataDeviceTypeExactly interface { // _BACnetConstructedDataDeviceType is the data-structure of this message type _BACnetConstructedDataDeviceType struct { *_BACnetConstructedData - DeviceType BACnetApplicationTagCharacterString + DeviceType BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDeviceType) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataDeviceType) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataDeviceType) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_DEVICE_TYPE -} +func (m *_BACnetConstructedDataDeviceType) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_DEVICE_TYPE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDeviceType) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDeviceType) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDeviceType) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDeviceType) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataDeviceType) GetActualValue() BACnetApplicationTag /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataDeviceType factory function for _BACnetConstructedDataDeviceType -func NewBACnetConstructedDataDeviceType(deviceType BACnetApplicationTagCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDeviceType { +func NewBACnetConstructedDataDeviceType( deviceType BACnetApplicationTagCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDeviceType { _result := &_BACnetConstructedDataDeviceType{ - DeviceType: deviceType, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + DeviceType: deviceType, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataDeviceType(deviceType BACnetApplicationTagCharacter // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDeviceType(structType interface{}) BACnetConstructedDataDeviceType { - if casted, ok := structType.(BACnetConstructedDataDeviceType); ok { + if casted, ok := structType.(BACnetConstructedDataDeviceType); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDeviceType); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataDeviceType) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataDeviceType) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataDeviceTypeParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("deviceType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for deviceType") } - _deviceType, _deviceTypeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_deviceType, _deviceTypeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _deviceTypeErr != nil { return nil, errors.Wrap(_deviceTypeErr, "Error parsing 'deviceType' field of BACnetConstructedDataDeviceType") } @@ -186,7 +188,7 @@ func BACnetConstructedDataDeviceTypeParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetConstructedDataDeviceType{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, DeviceType: deviceType, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataDeviceType) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataDeviceType") } - // Simple Field (deviceType) - if pushErr := writeBuffer.PushContext("deviceType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for deviceType") - } - _deviceTypeErr := writeBuffer.WriteSerializable(ctx, m.GetDeviceType()) - if popErr := writeBuffer.PopContext("deviceType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for deviceType") - } - if _deviceTypeErr != nil { - return errors.Wrap(_deviceTypeErr, "Error serializing 'deviceType' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (deviceType) + if pushErr := writeBuffer.PushContext("deviceType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for deviceType") + } + _deviceTypeErr := writeBuffer.WriteSerializable(ctx, m.GetDeviceType()) + if popErr := writeBuffer.PopContext("deviceType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for deviceType") + } + if _deviceTypeErr != nil { + return errors.Wrap(_deviceTypeErr, "Error serializing 'deviceType' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataDeviceType"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataDeviceType") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataDeviceType) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDeviceType) isBACnetConstructedDataDeviceType() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataDeviceType) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDirectReading.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDirectReading.go index 475b89ba437..35ed021fea2 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDirectReading.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDirectReading.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDirectReading is the corresponding interface of BACnetConstructedDataDirectReading type BACnetConstructedDataDirectReading interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataDirectReadingExactly interface { // _BACnetConstructedDataDirectReading is the data-structure of this message type _BACnetConstructedDataDirectReading struct { *_BACnetConstructedData - DirectReading BACnetApplicationTagReal + DirectReading BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDirectReading) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataDirectReading) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataDirectReading) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_DIRECT_READING -} +func (m *_BACnetConstructedDataDirectReading) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_DIRECT_READING} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDirectReading) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDirectReading) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDirectReading) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDirectReading) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataDirectReading) GetActualValue() BACnetApplication /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataDirectReading factory function for _BACnetConstructedDataDirectReading -func NewBACnetConstructedDataDirectReading(directReading BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDirectReading { +func NewBACnetConstructedDataDirectReading( directReading BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDirectReading { _result := &_BACnetConstructedDataDirectReading{ - DirectReading: directReading, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + DirectReading: directReading, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataDirectReading(directReading BACnetApplicationTagRea // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDirectReading(structType interface{}) BACnetConstructedDataDirectReading { - if casted, ok := structType.(BACnetConstructedDataDirectReading); ok { + if casted, ok := structType.(BACnetConstructedDataDirectReading); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDirectReading); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataDirectReading) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetConstructedDataDirectReading) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataDirectReadingParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("directReading"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for directReading") } - _directReading, _directReadingErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_directReading, _directReadingErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _directReadingErr != nil { return nil, errors.Wrap(_directReadingErr, "Error parsing 'directReading' field of BACnetConstructedDataDirectReading") } @@ -186,7 +188,7 @@ func BACnetConstructedDataDirectReadingParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetConstructedDataDirectReading{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, DirectReading: directReading, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataDirectReading) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataDirectReading") } - // Simple Field (directReading) - if pushErr := writeBuffer.PushContext("directReading"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for directReading") - } - _directReadingErr := writeBuffer.WriteSerializable(ctx, m.GetDirectReading()) - if popErr := writeBuffer.PopContext("directReading"); popErr != nil { - return errors.Wrap(popErr, "Error popping for directReading") - } - if _directReadingErr != nil { - return errors.Wrap(_directReadingErr, "Error serializing 'directReading' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (directReading) + if pushErr := writeBuffer.PushContext("directReading"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for directReading") + } + _directReadingErr := writeBuffer.WriteSerializable(ctx, m.GetDirectReading()) + if popErr := writeBuffer.PopContext("directReading"); popErr != nil { + return errors.Wrap(popErr, "Error popping for directReading") + } + if _directReadingErr != nil { + return errors.Wrap(_directReadingErr, "Error serializing 'directReading' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataDirectReading"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataDirectReading") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataDirectReading) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDirectReading) isBACnetConstructedDataDirectReading() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataDirectReading) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDistributionKeyRevision.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDistributionKeyRevision.go index 02b61434433..a40143d3d12 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDistributionKeyRevision.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDistributionKeyRevision.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDistributionKeyRevision is the corresponding interface of BACnetConstructedDataDistributionKeyRevision type BACnetConstructedDataDistributionKeyRevision interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataDistributionKeyRevisionExactly interface { // _BACnetConstructedDataDistributionKeyRevision is the data-structure of this message type _BACnetConstructedDataDistributionKeyRevision struct { *_BACnetConstructedData - DistributionKeyRevision BACnetApplicationTagUnsignedInteger + DistributionKeyRevision BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDistributionKeyRevision) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataDistributionKeyRevision) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataDistributionKeyRevision) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_DISTRIBUTION_KEY_REVISION -} +func (m *_BACnetConstructedDataDistributionKeyRevision) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_DISTRIBUTION_KEY_REVISION} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDistributionKeyRevision) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDistributionKeyRevision) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDistributionKeyRevision) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDistributionKeyRevision) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataDistributionKeyRevision) GetActualValue() BACnetA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataDistributionKeyRevision factory function for _BACnetConstructedDataDistributionKeyRevision -func NewBACnetConstructedDataDistributionKeyRevision(distributionKeyRevision BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDistributionKeyRevision { +func NewBACnetConstructedDataDistributionKeyRevision( distributionKeyRevision BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDistributionKeyRevision { _result := &_BACnetConstructedDataDistributionKeyRevision{ DistributionKeyRevision: distributionKeyRevision, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataDistributionKeyRevision(distributionKeyRevision BAC // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDistributionKeyRevision(structType interface{}) BACnetConstructedDataDistributionKeyRevision { - if casted, ok := structType.(BACnetConstructedDataDistributionKeyRevision); ok { + if casted, ok := structType.(BACnetConstructedDataDistributionKeyRevision); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDistributionKeyRevision); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataDistributionKeyRevision) GetLengthInBits(ctx cont return lengthInBits } + func (m *_BACnetConstructedDataDistributionKeyRevision) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataDistributionKeyRevisionParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("distributionKeyRevision"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for distributionKeyRevision") } - _distributionKeyRevision, _distributionKeyRevisionErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_distributionKeyRevision, _distributionKeyRevisionErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _distributionKeyRevisionErr != nil { return nil, errors.Wrap(_distributionKeyRevisionErr, "Error parsing 'distributionKeyRevision' field of BACnetConstructedDataDistributionKeyRevision") } @@ -186,7 +188,7 @@ func BACnetConstructedDataDistributionKeyRevisionParseWithBuffer(ctx context.Con // Create a partially initialized instance _child := &_BACnetConstructedDataDistributionKeyRevision{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, DistributionKeyRevision: distributionKeyRevision, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataDistributionKeyRevision) SerializeWithWriteBuffer return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataDistributionKeyRevision") } - // Simple Field (distributionKeyRevision) - if pushErr := writeBuffer.PushContext("distributionKeyRevision"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for distributionKeyRevision") - } - _distributionKeyRevisionErr := writeBuffer.WriteSerializable(ctx, m.GetDistributionKeyRevision()) - if popErr := writeBuffer.PopContext("distributionKeyRevision"); popErr != nil { - return errors.Wrap(popErr, "Error popping for distributionKeyRevision") - } - if _distributionKeyRevisionErr != nil { - return errors.Wrap(_distributionKeyRevisionErr, "Error serializing 'distributionKeyRevision' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (distributionKeyRevision) + if pushErr := writeBuffer.PushContext("distributionKeyRevision"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for distributionKeyRevision") + } + _distributionKeyRevisionErr := writeBuffer.WriteSerializable(ctx, m.GetDistributionKeyRevision()) + if popErr := writeBuffer.PopContext("distributionKeyRevision"); popErr != nil { + return errors.Wrap(popErr, "Error popping for distributionKeyRevision") + } + if _distributionKeyRevisionErr != nil { + return errors.Wrap(_distributionKeyRevisionErr, "Error serializing 'distributionKeyRevision' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataDistributionKeyRevision"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataDistributionKeyRevision") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataDistributionKeyRevision) SerializeWithWriteBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDistributionKeyRevision) isBACnetConstructedDataDistributionKeyRevision() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataDistributionKeyRevision) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDoNotHide.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDoNotHide.go index 845155aa444..07d1c3c41a9 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDoNotHide.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDoNotHide.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDoNotHide is the corresponding interface of BACnetConstructedDataDoNotHide type BACnetConstructedDataDoNotHide interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataDoNotHideExactly interface { // _BACnetConstructedDataDoNotHide is the data-structure of this message type _BACnetConstructedDataDoNotHide struct { *_BACnetConstructedData - DoNotHide BACnetApplicationTagBoolean + DoNotHide BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDoNotHide) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataDoNotHide) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataDoNotHide) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_DO_NOT_HIDE -} +func (m *_BACnetConstructedDataDoNotHide) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_DO_NOT_HIDE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDoNotHide) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDoNotHide) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDoNotHide) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDoNotHide) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataDoNotHide) GetActualValue() BACnetApplicationTagB /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataDoNotHide factory function for _BACnetConstructedDataDoNotHide -func NewBACnetConstructedDataDoNotHide(doNotHide BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDoNotHide { +func NewBACnetConstructedDataDoNotHide( doNotHide BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDoNotHide { _result := &_BACnetConstructedDataDoNotHide{ - DoNotHide: doNotHide, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + DoNotHide: doNotHide, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataDoNotHide(doNotHide BACnetApplicationTagBoolean, op // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDoNotHide(structType interface{}) BACnetConstructedDataDoNotHide { - if casted, ok := structType.(BACnetConstructedDataDoNotHide); ok { + if casted, ok := structType.(BACnetConstructedDataDoNotHide); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDoNotHide); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataDoNotHide) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetConstructedDataDoNotHide) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataDoNotHideParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("doNotHide"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for doNotHide") } - _doNotHide, _doNotHideErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_doNotHide, _doNotHideErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _doNotHideErr != nil { return nil, errors.Wrap(_doNotHideErr, "Error parsing 'doNotHide' field of BACnetConstructedDataDoNotHide") } @@ -186,7 +188,7 @@ func BACnetConstructedDataDoNotHideParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_BACnetConstructedDataDoNotHide{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, DoNotHide: doNotHide, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataDoNotHide) SerializeWithWriteBuffer(ctx context.C return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataDoNotHide") } - // Simple Field (doNotHide) - if pushErr := writeBuffer.PushContext("doNotHide"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for doNotHide") - } - _doNotHideErr := writeBuffer.WriteSerializable(ctx, m.GetDoNotHide()) - if popErr := writeBuffer.PopContext("doNotHide"); popErr != nil { - return errors.Wrap(popErr, "Error popping for doNotHide") - } - if _doNotHideErr != nil { - return errors.Wrap(_doNotHideErr, "Error serializing 'doNotHide' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (doNotHide) + if pushErr := writeBuffer.PushContext("doNotHide"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for doNotHide") + } + _doNotHideErr := writeBuffer.WriteSerializable(ctx, m.GetDoNotHide()) + if popErr := writeBuffer.PopContext("doNotHide"); popErr != nil { + return errors.Wrap(popErr, "Error popping for doNotHide") + } + if _doNotHideErr != nil { + return errors.Wrap(_doNotHideErr, "Error serializing 'doNotHide' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataDoNotHide"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataDoNotHide") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataDoNotHide) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDoNotHide) isBACnetConstructedDataDoNotHide() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataDoNotHide) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDoorAlarmState.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDoorAlarmState.go index e0efdca606f..d02aec03fc7 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDoorAlarmState.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDoorAlarmState.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDoorAlarmState is the corresponding interface of BACnetConstructedDataDoorAlarmState type BACnetConstructedDataDoorAlarmState interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataDoorAlarmStateExactly interface { // _BACnetConstructedDataDoorAlarmState is the data-structure of this message type _BACnetConstructedDataDoorAlarmState struct { *_BACnetConstructedData - DoorAlarmState BACnetDoorAlarmStateTagged + DoorAlarmState BACnetDoorAlarmStateTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDoorAlarmState) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataDoorAlarmState) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataDoorAlarmState) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_DOOR_ALARM_STATE -} +func (m *_BACnetConstructedDataDoorAlarmState) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_DOOR_ALARM_STATE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDoorAlarmState) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDoorAlarmState) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDoorAlarmState) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDoorAlarmState) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataDoorAlarmState) GetActualValue() BACnetDoorAlarmS /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataDoorAlarmState factory function for _BACnetConstructedDataDoorAlarmState -func NewBACnetConstructedDataDoorAlarmState(doorAlarmState BACnetDoorAlarmStateTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDoorAlarmState { +func NewBACnetConstructedDataDoorAlarmState( doorAlarmState BACnetDoorAlarmStateTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDoorAlarmState { _result := &_BACnetConstructedDataDoorAlarmState{ - DoorAlarmState: doorAlarmState, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + DoorAlarmState: doorAlarmState, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataDoorAlarmState(doorAlarmState BACnetDoorAlarmStateT // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDoorAlarmState(structType interface{}) BACnetConstructedDataDoorAlarmState { - if casted, ok := structType.(BACnetConstructedDataDoorAlarmState); ok { + if casted, ok := structType.(BACnetConstructedDataDoorAlarmState); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDoorAlarmState); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataDoorAlarmState) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConstructedDataDoorAlarmState) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataDoorAlarmStateParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("doorAlarmState"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for doorAlarmState") } - _doorAlarmState, _doorAlarmStateErr := BACnetDoorAlarmStateTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_doorAlarmState, _doorAlarmStateErr := BACnetDoorAlarmStateTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _doorAlarmStateErr != nil { return nil, errors.Wrap(_doorAlarmStateErr, "Error parsing 'doorAlarmState' field of BACnetConstructedDataDoorAlarmState") } @@ -186,7 +188,7 @@ func BACnetConstructedDataDoorAlarmStateParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetConstructedDataDoorAlarmState{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, DoorAlarmState: doorAlarmState, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataDoorAlarmState) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataDoorAlarmState") } - // Simple Field (doorAlarmState) - if pushErr := writeBuffer.PushContext("doorAlarmState"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for doorAlarmState") - } - _doorAlarmStateErr := writeBuffer.WriteSerializable(ctx, m.GetDoorAlarmState()) - if popErr := writeBuffer.PopContext("doorAlarmState"); popErr != nil { - return errors.Wrap(popErr, "Error popping for doorAlarmState") - } - if _doorAlarmStateErr != nil { - return errors.Wrap(_doorAlarmStateErr, "Error serializing 'doorAlarmState' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (doorAlarmState) + if pushErr := writeBuffer.PushContext("doorAlarmState"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for doorAlarmState") + } + _doorAlarmStateErr := writeBuffer.WriteSerializable(ctx, m.GetDoorAlarmState()) + if popErr := writeBuffer.PopContext("doorAlarmState"); popErr != nil { + return errors.Wrap(popErr, "Error popping for doorAlarmState") + } + if _doorAlarmStateErr != nil { + return errors.Wrap(_doorAlarmStateErr, "Error serializing 'doorAlarmState' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataDoorAlarmState"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataDoorAlarmState") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataDoorAlarmState) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDoorAlarmState) isBACnetConstructedDataDoorAlarmState() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataDoorAlarmState) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDoorExtendedPulseTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDoorExtendedPulseTime.go index 38f7942ecfa..ad8743d5689 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDoorExtendedPulseTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDoorExtendedPulseTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDoorExtendedPulseTime is the corresponding interface of BACnetConstructedDataDoorExtendedPulseTime type BACnetConstructedDataDoorExtendedPulseTime interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataDoorExtendedPulseTimeExactly interface { // _BACnetConstructedDataDoorExtendedPulseTime is the data-structure of this message type _BACnetConstructedDataDoorExtendedPulseTime struct { *_BACnetConstructedData - DoorExtendedPulseTime BACnetApplicationTagUnsignedInteger + DoorExtendedPulseTime BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDoorExtendedPulseTime) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataDoorExtendedPulseTime) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataDoorExtendedPulseTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_DOOR_EXTENDED_PULSE_TIME -} +func (m *_BACnetConstructedDataDoorExtendedPulseTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_DOOR_EXTENDED_PULSE_TIME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDoorExtendedPulseTime) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDoorExtendedPulseTime) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDoorExtendedPulseTime) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDoorExtendedPulseTime) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataDoorExtendedPulseTime) GetActualValue() BACnetApp /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataDoorExtendedPulseTime factory function for _BACnetConstructedDataDoorExtendedPulseTime -func NewBACnetConstructedDataDoorExtendedPulseTime(doorExtendedPulseTime BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDoorExtendedPulseTime { +func NewBACnetConstructedDataDoorExtendedPulseTime( doorExtendedPulseTime BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDoorExtendedPulseTime { _result := &_BACnetConstructedDataDoorExtendedPulseTime{ - DoorExtendedPulseTime: doorExtendedPulseTime, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + DoorExtendedPulseTime: doorExtendedPulseTime, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataDoorExtendedPulseTime(doorExtendedPulseTime BACnetA // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDoorExtendedPulseTime(structType interface{}) BACnetConstructedDataDoorExtendedPulseTime { - if casted, ok := structType.(BACnetConstructedDataDoorExtendedPulseTime); ok { + if casted, ok := structType.(BACnetConstructedDataDoorExtendedPulseTime); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDoorExtendedPulseTime); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataDoorExtendedPulseTime) GetLengthInBits(ctx contex return lengthInBits } + func (m *_BACnetConstructedDataDoorExtendedPulseTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataDoorExtendedPulseTimeParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("doorExtendedPulseTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for doorExtendedPulseTime") } - _doorExtendedPulseTime, _doorExtendedPulseTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_doorExtendedPulseTime, _doorExtendedPulseTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _doorExtendedPulseTimeErr != nil { return nil, errors.Wrap(_doorExtendedPulseTimeErr, "Error parsing 'doorExtendedPulseTime' field of BACnetConstructedDataDoorExtendedPulseTime") } @@ -186,7 +188,7 @@ func BACnetConstructedDataDoorExtendedPulseTimeParseWithBuffer(ctx context.Conte // Create a partially initialized instance _child := &_BACnetConstructedDataDoorExtendedPulseTime{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, DoorExtendedPulseTime: doorExtendedPulseTime, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataDoorExtendedPulseTime) SerializeWithWriteBuffer(c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataDoorExtendedPulseTime") } - // Simple Field (doorExtendedPulseTime) - if pushErr := writeBuffer.PushContext("doorExtendedPulseTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for doorExtendedPulseTime") - } - _doorExtendedPulseTimeErr := writeBuffer.WriteSerializable(ctx, m.GetDoorExtendedPulseTime()) - if popErr := writeBuffer.PopContext("doorExtendedPulseTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for doorExtendedPulseTime") - } - if _doorExtendedPulseTimeErr != nil { - return errors.Wrap(_doorExtendedPulseTimeErr, "Error serializing 'doorExtendedPulseTime' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (doorExtendedPulseTime) + if pushErr := writeBuffer.PushContext("doorExtendedPulseTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for doorExtendedPulseTime") + } + _doorExtendedPulseTimeErr := writeBuffer.WriteSerializable(ctx, m.GetDoorExtendedPulseTime()) + if popErr := writeBuffer.PopContext("doorExtendedPulseTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for doorExtendedPulseTime") + } + if _doorExtendedPulseTimeErr != nil { + return errors.Wrap(_doorExtendedPulseTimeErr, "Error serializing 'doorExtendedPulseTime' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataDoorExtendedPulseTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataDoorExtendedPulseTime") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataDoorExtendedPulseTime) SerializeWithWriteBuffer(c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDoorExtendedPulseTime) isBACnetConstructedDataDoorExtendedPulseTime() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataDoorExtendedPulseTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDoorMembers.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDoorMembers.go index 423899b24f4..6267afc3b79 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDoorMembers.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDoorMembers.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDoorMembers is the corresponding interface of BACnetConstructedDataDoorMembers type BACnetConstructedDataDoorMembers interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataDoorMembersExactly interface { // _BACnetConstructedDataDoorMembers is the data-structure of this message type _BACnetConstructedDataDoorMembers struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - DoorMembers []BACnetDeviceObjectReference + NumberOfDataElements BACnetApplicationTagUnsignedInteger + DoorMembers []BACnetDeviceObjectReference } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDoorMembers) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataDoorMembers) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataDoorMembers) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_DOOR_MEMBERS -} +func (m *_BACnetConstructedDataDoorMembers) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_DOOR_MEMBERS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDoorMembers) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDoorMembers) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDoorMembers) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDoorMembers) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataDoorMembers) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataDoorMembers factory function for _BACnetConstructedDataDoorMembers -func NewBACnetConstructedDataDoorMembers(numberOfDataElements BACnetApplicationTagUnsignedInteger, doorMembers []BACnetDeviceObjectReference, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDoorMembers { +func NewBACnetConstructedDataDoorMembers( numberOfDataElements BACnetApplicationTagUnsignedInteger , doorMembers []BACnetDeviceObjectReference , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDoorMembers { _result := &_BACnetConstructedDataDoorMembers{ - NumberOfDataElements: numberOfDataElements, - DoorMembers: doorMembers, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + DoorMembers: doorMembers, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataDoorMembers(numberOfDataElements BACnetApplicationT // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDoorMembers(structType interface{}) BACnetConstructedDataDoorMembers { - if casted, ok := structType.(BACnetConstructedDataDoorMembers); ok { + if casted, ok := structType.(BACnetConstructedDataDoorMembers); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDoorMembers); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataDoorMembers) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataDoorMembers) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataDoorMembersParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataDoorMembersParseWithBuffer(ctx context.Context, readBu // Terminated array var doorMembers []BACnetDeviceObjectReference { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'doorMembers' field of BACnetConstructedDataDoorMembers") } @@ -235,11 +237,11 @@ func BACnetConstructedDataDoorMembersParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataDoorMembers{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - DoorMembers: doorMembers, + DoorMembers: doorMembers, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataDoorMembers) SerializeWithWriteBuffer(ctx context if pushErr := writeBuffer.PushContext("BACnetConstructedDataDoorMembers"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataDoorMembers") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (doorMembers) - if pushErr := writeBuffer.PushContext("doorMembers", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for doorMembers") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetDoorMembers() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetDoorMembers()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'doorMembers' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("doorMembers", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for doorMembers") + } + + // Array Field (doorMembers) + if pushErr := writeBuffer.PushContext("doorMembers", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for doorMembers") + } + for _curItem, _element := range m.GetDoorMembers() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetDoorMembers()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'doorMembers' field") } + } + if popErr := writeBuffer.PopContext("doorMembers", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for doorMembers") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataDoorMembers"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataDoorMembers") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataDoorMembers) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDoorMembers) isBACnetConstructedDataDoorMembers() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataDoorMembers) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDoorOpenTooLongTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDoorOpenTooLongTime.go index b8a2be6f5ff..d13525cb75e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDoorOpenTooLongTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDoorOpenTooLongTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDoorOpenTooLongTime is the corresponding interface of BACnetConstructedDataDoorOpenTooLongTime type BACnetConstructedDataDoorOpenTooLongTime interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataDoorOpenTooLongTimeExactly interface { // _BACnetConstructedDataDoorOpenTooLongTime is the data-structure of this message type _BACnetConstructedDataDoorOpenTooLongTime struct { *_BACnetConstructedData - DoorOpenTooLongTime BACnetApplicationTagUnsignedInteger + DoorOpenTooLongTime BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDoorOpenTooLongTime) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataDoorOpenTooLongTime) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataDoorOpenTooLongTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_DOOR_OPEN_TOO_LONG_TIME -} +func (m *_BACnetConstructedDataDoorOpenTooLongTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_DOOR_OPEN_TOO_LONG_TIME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDoorOpenTooLongTime) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDoorOpenTooLongTime) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDoorOpenTooLongTime) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDoorOpenTooLongTime) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataDoorOpenTooLongTime) GetActualValue() BACnetAppli /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataDoorOpenTooLongTime factory function for _BACnetConstructedDataDoorOpenTooLongTime -func NewBACnetConstructedDataDoorOpenTooLongTime(doorOpenTooLongTime BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDoorOpenTooLongTime { +func NewBACnetConstructedDataDoorOpenTooLongTime( doorOpenTooLongTime BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDoorOpenTooLongTime { _result := &_BACnetConstructedDataDoorOpenTooLongTime{ - DoorOpenTooLongTime: doorOpenTooLongTime, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + DoorOpenTooLongTime: doorOpenTooLongTime, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataDoorOpenTooLongTime(doorOpenTooLongTime BACnetAppli // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDoorOpenTooLongTime(structType interface{}) BACnetConstructedDataDoorOpenTooLongTime { - if casted, ok := structType.(BACnetConstructedDataDoorOpenTooLongTime); ok { + if casted, ok := structType.(BACnetConstructedDataDoorOpenTooLongTime); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDoorOpenTooLongTime); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataDoorOpenTooLongTime) GetLengthInBits(ctx context. return lengthInBits } + func (m *_BACnetConstructedDataDoorOpenTooLongTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataDoorOpenTooLongTimeParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("doorOpenTooLongTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for doorOpenTooLongTime") } - _doorOpenTooLongTime, _doorOpenTooLongTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_doorOpenTooLongTime, _doorOpenTooLongTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _doorOpenTooLongTimeErr != nil { return nil, errors.Wrap(_doorOpenTooLongTimeErr, "Error parsing 'doorOpenTooLongTime' field of BACnetConstructedDataDoorOpenTooLongTime") } @@ -186,7 +188,7 @@ func BACnetConstructedDataDoorOpenTooLongTimeParseWithBuffer(ctx context.Context // Create a partially initialized instance _child := &_BACnetConstructedDataDoorOpenTooLongTime{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, DoorOpenTooLongTime: doorOpenTooLongTime, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataDoorOpenTooLongTime) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataDoorOpenTooLongTime") } - // Simple Field (doorOpenTooLongTime) - if pushErr := writeBuffer.PushContext("doorOpenTooLongTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for doorOpenTooLongTime") - } - _doorOpenTooLongTimeErr := writeBuffer.WriteSerializable(ctx, m.GetDoorOpenTooLongTime()) - if popErr := writeBuffer.PopContext("doorOpenTooLongTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for doorOpenTooLongTime") - } - if _doorOpenTooLongTimeErr != nil { - return errors.Wrap(_doorOpenTooLongTimeErr, "Error serializing 'doorOpenTooLongTime' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (doorOpenTooLongTime) + if pushErr := writeBuffer.PushContext("doorOpenTooLongTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for doorOpenTooLongTime") + } + _doorOpenTooLongTimeErr := writeBuffer.WriteSerializable(ctx, m.GetDoorOpenTooLongTime()) + if popErr := writeBuffer.PopContext("doorOpenTooLongTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for doorOpenTooLongTime") + } + if _doorOpenTooLongTimeErr != nil { + return errors.Wrap(_doorOpenTooLongTimeErr, "Error serializing 'doorOpenTooLongTime' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataDoorOpenTooLongTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataDoorOpenTooLongTime") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataDoorOpenTooLongTime) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDoorOpenTooLongTime) isBACnetConstructedDataDoorOpenTooLongTime() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataDoorOpenTooLongTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDoorPulseTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDoorPulseTime.go index 6f7023c59c2..798722acf00 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDoorPulseTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDoorPulseTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDoorPulseTime is the corresponding interface of BACnetConstructedDataDoorPulseTime type BACnetConstructedDataDoorPulseTime interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataDoorPulseTimeExactly interface { // _BACnetConstructedDataDoorPulseTime is the data-structure of this message type _BACnetConstructedDataDoorPulseTime struct { *_BACnetConstructedData - DoorPulseTime BACnetApplicationTagUnsignedInteger + DoorPulseTime BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDoorPulseTime) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataDoorPulseTime) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataDoorPulseTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_DOOR_PULSE_TIME -} +func (m *_BACnetConstructedDataDoorPulseTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_DOOR_PULSE_TIME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDoorPulseTime) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDoorPulseTime) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDoorPulseTime) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDoorPulseTime) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataDoorPulseTime) GetActualValue() BACnetApplication /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataDoorPulseTime factory function for _BACnetConstructedDataDoorPulseTime -func NewBACnetConstructedDataDoorPulseTime(doorPulseTime BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDoorPulseTime { +func NewBACnetConstructedDataDoorPulseTime( doorPulseTime BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDoorPulseTime { _result := &_BACnetConstructedDataDoorPulseTime{ - DoorPulseTime: doorPulseTime, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + DoorPulseTime: doorPulseTime, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataDoorPulseTime(doorPulseTime BACnetApplicationTagUns // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDoorPulseTime(structType interface{}) BACnetConstructedDataDoorPulseTime { - if casted, ok := structType.(BACnetConstructedDataDoorPulseTime); ok { + if casted, ok := structType.(BACnetConstructedDataDoorPulseTime); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDoorPulseTime); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataDoorPulseTime) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetConstructedDataDoorPulseTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataDoorPulseTimeParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("doorPulseTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for doorPulseTime") } - _doorPulseTime, _doorPulseTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_doorPulseTime, _doorPulseTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _doorPulseTimeErr != nil { return nil, errors.Wrap(_doorPulseTimeErr, "Error parsing 'doorPulseTime' field of BACnetConstructedDataDoorPulseTime") } @@ -186,7 +188,7 @@ func BACnetConstructedDataDoorPulseTimeParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetConstructedDataDoorPulseTime{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, DoorPulseTime: doorPulseTime, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataDoorPulseTime) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataDoorPulseTime") } - // Simple Field (doorPulseTime) - if pushErr := writeBuffer.PushContext("doorPulseTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for doorPulseTime") - } - _doorPulseTimeErr := writeBuffer.WriteSerializable(ctx, m.GetDoorPulseTime()) - if popErr := writeBuffer.PopContext("doorPulseTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for doorPulseTime") - } - if _doorPulseTimeErr != nil { - return errors.Wrap(_doorPulseTimeErr, "Error serializing 'doorPulseTime' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (doorPulseTime) + if pushErr := writeBuffer.PushContext("doorPulseTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for doorPulseTime") + } + _doorPulseTimeErr := writeBuffer.WriteSerializable(ctx, m.GetDoorPulseTime()) + if popErr := writeBuffer.PopContext("doorPulseTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for doorPulseTime") + } + if _doorPulseTimeErr != nil { + return errors.Wrap(_doorPulseTimeErr, "Error serializing 'doorPulseTime' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataDoorPulseTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataDoorPulseTime") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataDoorPulseTime) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDoorPulseTime) isBACnetConstructedDataDoorPulseTime() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataDoorPulseTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDoorStatus.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDoorStatus.go index 0095a1e36ed..a62d095521c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDoorStatus.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDoorStatus.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDoorStatus is the corresponding interface of BACnetConstructedDataDoorStatus type BACnetConstructedDataDoorStatus interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataDoorStatusExactly interface { // _BACnetConstructedDataDoorStatus is the data-structure of this message type _BACnetConstructedDataDoorStatus struct { *_BACnetConstructedData - DoorStatus BACnetDoorStatusTagged + DoorStatus BACnetDoorStatusTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDoorStatus) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataDoorStatus) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataDoorStatus) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_DOOR_STATUS -} +func (m *_BACnetConstructedDataDoorStatus) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_DOOR_STATUS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDoorStatus) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDoorStatus) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDoorStatus) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDoorStatus) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataDoorStatus) GetActualValue() BACnetDoorStatusTagg /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataDoorStatus factory function for _BACnetConstructedDataDoorStatus -func NewBACnetConstructedDataDoorStatus(doorStatus BACnetDoorStatusTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDoorStatus { +func NewBACnetConstructedDataDoorStatus( doorStatus BACnetDoorStatusTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDoorStatus { _result := &_BACnetConstructedDataDoorStatus{ - DoorStatus: doorStatus, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + DoorStatus: doorStatus, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataDoorStatus(doorStatus BACnetDoorStatusTagged, openi // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDoorStatus(structType interface{}) BACnetConstructedDataDoorStatus { - if casted, ok := structType.(BACnetConstructedDataDoorStatus); ok { + if casted, ok := structType.(BACnetConstructedDataDoorStatus); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDoorStatus); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataDoorStatus) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataDoorStatus) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataDoorStatusParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("doorStatus"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for doorStatus") } - _doorStatus, _doorStatusErr := BACnetDoorStatusTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_doorStatus, _doorStatusErr := BACnetDoorStatusTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _doorStatusErr != nil { return nil, errors.Wrap(_doorStatusErr, "Error parsing 'doorStatus' field of BACnetConstructedDataDoorStatus") } @@ -186,7 +188,7 @@ func BACnetConstructedDataDoorStatusParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetConstructedDataDoorStatus{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, DoorStatus: doorStatus, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataDoorStatus) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataDoorStatus") } - // Simple Field (doorStatus) - if pushErr := writeBuffer.PushContext("doorStatus"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for doorStatus") - } - _doorStatusErr := writeBuffer.WriteSerializable(ctx, m.GetDoorStatus()) - if popErr := writeBuffer.PopContext("doorStatus"); popErr != nil { - return errors.Wrap(popErr, "Error popping for doorStatus") - } - if _doorStatusErr != nil { - return errors.Wrap(_doorStatusErr, "Error serializing 'doorStatus' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (doorStatus) + if pushErr := writeBuffer.PushContext("doorStatus"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for doorStatus") + } + _doorStatusErr := writeBuffer.WriteSerializable(ctx, m.GetDoorStatus()) + if popErr := writeBuffer.PopContext("doorStatus"); popErr != nil { + return errors.Wrap(popErr, "Error popping for doorStatus") + } + if _doorStatusErr != nil { + return errors.Wrap(_doorStatusErr, "Error serializing 'doorStatus' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataDoorStatus"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataDoorStatus") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataDoorStatus) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDoorStatus) isBACnetConstructedDataDoorStatus() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataDoorStatus) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDoorUnlockDelayTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDoorUnlockDelayTime.go index 92a6b9a91de..71138cf8079 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDoorUnlockDelayTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDoorUnlockDelayTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDoorUnlockDelayTime is the corresponding interface of BACnetConstructedDataDoorUnlockDelayTime type BACnetConstructedDataDoorUnlockDelayTime interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataDoorUnlockDelayTimeExactly interface { // _BACnetConstructedDataDoorUnlockDelayTime is the data-structure of this message type _BACnetConstructedDataDoorUnlockDelayTime struct { *_BACnetConstructedData - DoorUnlockDelayTime BACnetApplicationTagUnsignedInteger + DoorUnlockDelayTime BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDoorUnlockDelayTime) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataDoorUnlockDelayTime) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataDoorUnlockDelayTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_DOOR_UNLOCK_DELAY_TIME -} +func (m *_BACnetConstructedDataDoorUnlockDelayTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_DOOR_UNLOCK_DELAY_TIME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDoorUnlockDelayTime) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDoorUnlockDelayTime) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDoorUnlockDelayTime) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDoorUnlockDelayTime) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataDoorUnlockDelayTime) GetActualValue() BACnetAppli /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataDoorUnlockDelayTime factory function for _BACnetConstructedDataDoorUnlockDelayTime -func NewBACnetConstructedDataDoorUnlockDelayTime(doorUnlockDelayTime BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDoorUnlockDelayTime { +func NewBACnetConstructedDataDoorUnlockDelayTime( doorUnlockDelayTime BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDoorUnlockDelayTime { _result := &_BACnetConstructedDataDoorUnlockDelayTime{ - DoorUnlockDelayTime: doorUnlockDelayTime, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + DoorUnlockDelayTime: doorUnlockDelayTime, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataDoorUnlockDelayTime(doorUnlockDelayTime BACnetAppli // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDoorUnlockDelayTime(structType interface{}) BACnetConstructedDataDoorUnlockDelayTime { - if casted, ok := structType.(BACnetConstructedDataDoorUnlockDelayTime); ok { + if casted, ok := structType.(BACnetConstructedDataDoorUnlockDelayTime); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDoorUnlockDelayTime); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataDoorUnlockDelayTime) GetLengthInBits(ctx context. return lengthInBits } + func (m *_BACnetConstructedDataDoorUnlockDelayTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataDoorUnlockDelayTimeParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("doorUnlockDelayTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for doorUnlockDelayTime") } - _doorUnlockDelayTime, _doorUnlockDelayTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_doorUnlockDelayTime, _doorUnlockDelayTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _doorUnlockDelayTimeErr != nil { return nil, errors.Wrap(_doorUnlockDelayTimeErr, "Error parsing 'doorUnlockDelayTime' field of BACnetConstructedDataDoorUnlockDelayTime") } @@ -186,7 +188,7 @@ func BACnetConstructedDataDoorUnlockDelayTimeParseWithBuffer(ctx context.Context // Create a partially initialized instance _child := &_BACnetConstructedDataDoorUnlockDelayTime{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, DoorUnlockDelayTime: doorUnlockDelayTime, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataDoorUnlockDelayTime) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataDoorUnlockDelayTime") } - // Simple Field (doorUnlockDelayTime) - if pushErr := writeBuffer.PushContext("doorUnlockDelayTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for doorUnlockDelayTime") - } - _doorUnlockDelayTimeErr := writeBuffer.WriteSerializable(ctx, m.GetDoorUnlockDelayTime()) - if popErr := writeBuffer.PopContext("doorUnlockDelayTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for doorUnlockDelayTime") - } - if _doorUnlockDelayTimeErr != nil { - return errors.Wrap(_doorUnlockDelayTimeErr, "Error serializing 'doorUnlockDelayTime' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (doorUnlockDelayTime) + if pushErr := writeBuffer.PushContext("doorUnlockDelayTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for doorUnlockDelayTime") + } + _doorUnlockDelayTimeErr := writeBuffer.WriteSerializable(ctx, m.GetDoorUnlockDelayTime()) + if popErr := writeBuffer.PopContext("doorUnlockDelayTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for doorUnlockDelayTime") + } + if _doorUnlockDelayTimeErr != nil { + return errors.Wrap(_doorUnlockDelayTimeErr, "Error serializing 'doorUnlockDelayTime' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataDoorUnlockDelayTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataDoorUnlockDelayTime") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataDoorUnlockDelayTime) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDoorUnlockDelayTime) isBACnetConstructedDataDoorUnlockDelayTime() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataDoorUnlockDelayTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDutyWindow.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDutyWindow.go index 6ecd7823b68..850c1311dc6 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDutyWindow.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataDutyWindow.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataDutyWindow is the corresponding interface of BACnetConstructedDataDutyWindow type BACnetConstructedDataDutyWindow interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataDutyWindowExactly interface { // _BACnetConstructedDataDutyWindow is the data-structure of this message type _BACnetConstructedDataDutyWindow struct { *_BACnetConstructedData - DutyWindow BACnetApplicationTagUnsignedInteger + DutyWindow BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataDutyWindow) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataDutyWindow) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataDutyWindow) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_DUTY_WINDOW -} +func (m *_BACnetConstructedDataDutyWindow) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_DUTY_WINDOW} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataDutyWindow) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataDutyWindow) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataDutyWindow) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataDutyWindow) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataDutyWindow) GetActualValue() BACnetApplicationTag /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataDutyWindow factory function for _BACnetConstructedDataDutyWindow -func NewBACnetConstructedDataDutyWindow(dutyWindow BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataDutyWindow { +func NewBACnetConstructedDataDutyWindow( dutyWindow BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataDutyWindow { _result := &_BACnetConstructedDataDutyWindow{ - DutyWindow: dutyWindow, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + DutyWindow: dutyWindow, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataDutyWindow(dutyWindow BACnetApplicationTagUnsignedI // Deprecated: use the interface for direct cast func CastBACnetConstructedDataDutyWindow(structType interface{}) BACnetConstructedDataDutyWindow { - if casted, ok := structType.(BACnetConstructedDataDutyWindow); ok { + if casted, ok := structType.(BACnetConstructedDataDutyWindow); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataDutyWindow); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataDutyWindow) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataDutyWindow) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataDutyWindowParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("dutyWindow"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for dutyWindow") } - _dutyWindow, _dutyWindowErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_dutyWindow, _dutyWindowErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _dutyWindowErr != nil { return nil, errors.Wrap(_dutyWindowErr, "Error parsing 'dutyWindow' field of BACnetConstructedDataDutyWindow") } @@ -186,7 +188,7 @@ func BACnetConstructedDataDutyWindowParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetConstructedDataDutyWindow{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, DutyWindow: dutyWindow, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataDutyWindow) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataDutyWindow") } - // Simple Field (dutyWindow) - if pushErr := writeBuffer.PushContext("dutyWindow"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for dutyWindow") - } - _dutyWindowErr := writeBuffer.WriteSerializable(ctx, m.GetDutyWindow()) - if popErr := writeBuffer.PopContext("dutyWindow"); popErr != nil { - return errors.Wrap(popErr, "Error popping for dutyWindow") - } - if _dutyWindowErr != nil { - return errors.Wrap(_dutyWindowErr, "Error serializing 'dutyWindow' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (dutyWindow) + if pushErr := writeBuffer.PushContext("dutyWindow"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for dutyWindow") + } + _dutyWindowErr := writeBuffer.WriteSerializable(ctx, m.GetDutyWindow()) + if popErr := writeBuffer.PopContext("dutyWindow"); popErr != nil { + return errors.Wrap(popErr, "Error popping for dutyWindow") + } + if _dutyWindowErr != nil { + return errors.Wrap(_dutyWindowErr, "Error serializing 'dutyWindow' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataDutyWindow"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataDutyWindow") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataDutyWindow) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataDutyWindow) isBACnetConstructedDataDutyWindow() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataDutyWindow) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEffectivePeriod.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEffectivePeriod.go index 68d1b86b279..4c80bf1ecc9 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEffectivePeriod.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEffectivePeriod.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataEffectivePeriod is the corresponding interface of BACnetConstructedDataEffectivePeriod type BACnetConstructedDataEffectivePeriod interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataEffectivePeriodExactly interface { // _BACnetConstructedDataEffectivePeriod is the data-structure of this message type _BACnetConstructedDataEffectivePeriod struct { *_BACnetConstructedData - DateRange BACnetDateRange + DateRange BACnetDateRange } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataEffectivePeriod) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataEffectivePeriod) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataEffectivePeriod) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_EFFECTIVE_PERIOD -} +func (m *_BACnetConstructedDataEffectivePeriod) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_EFFECTIVE_PERIOD} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataEffectivePeriod) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataEffectivePeriod) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataEffectivePeriod) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataEffectivePeriod) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataEffectivePeriod) GetActualValue() BACnetDateRange /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataEffectivePeriod factory function for _BACnetConstructedDataEffectivePeriod -func NewBACnetConstructedDataEffectivePeriod(dateRange BACnetDateRange, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataEffectivePeriod { +func NewBACnetConstructedDataEffectivePeriod( dateRange BACnetDateRange , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataEffectivePeriod { _result := &_BACnetConstructedDataEffectivePeriod{ - DateRange: dateRange, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + DateRange: dateRange, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataEffectivePeriod(dateRange BACnetDateRange, openingT // Deprecated: use the interface for direct cast func CastBACnetConstructedDataEffectivePeriod(structType interface{}) BACnetConstructedDataEffectivePeriod { - if casted, ok := structType.(BACnetConstructedDataEffectivePeriod); ok { + if casted, ok := structType.(BACnetConstructedDataEffectivePeriod); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataEffectivePeriod); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataEffectivePeriod) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetConstructedDataEffectivePeriod) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataEffectivePeriodParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("dateRange"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for dateRange") } - _dateRange, _dateRangeErr := BACnetDateRangeParseWithBuffer(ctx, readBuffer) +_dateRange, _dateRangeErr := BACnetDateRangeParseWithBuffer(ctx, readBuffer) if _dateRangeErr != nil { return nil, errors.Wrap(_dateRangeErr, "Error parsing 'dateRange' field of BACnetConstructedDataEffectivePeriod") } @@ -186,7 +188,7 @@ func BACnetConstructedDataEffectivePeriodParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetConstructedDataEffectivePeriod{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, DateRange: dateRange, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataEffectivePeriod) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataEffectivePeriod") } - // Simple Field (dateRange) - if pushErr := writeBuffer.PushContext("dateRange"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for dateRange") - } - _dateRangeErr := writeBuffer.WriteSerializable(ctx, m.GetDateRange()) - if popErr := writeBuffer.PopContext("dateRange"); popErr != nil { - return errors.Wrap(popErr, "Error popping for dateRange") - } - if _dateRangeErr != nil { - return errors.Wrap(_dateRangeErr, "Error serializing 'dateRange' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (dateRange) + if pushErr := writeBuffer.PushContext("dateRange"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for dateRange") + } + _dateRangeErr := writeBuffer.WriteSerializable(ctx, m.GetDateRange()) + if popErr := writeBuffer.PopContext("dateRange"); popErr != nil { + return errors.Wrap(popErr, "Error popping for dateRange") + } + if _dateRangeErr != nil { + return errors.Wrap(_dateRangeErr, "Error serializing 'dateRange' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataEffectivePeriod"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataEffectivePeriod") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataEffectivePeriod) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataEffectivePeriod) isBACnetConstructedDataEffectivePeriod() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataEffectivePeriod) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEgressActive.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEgressActive.go index e34eb8e41ab..9454fdc1d6c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEgressActive.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEgressActive.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataEgressActive is the corresponding interface of BACnetConstructedDataEgressActive type BACnetConstructedDataEgressActive interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataEgressActiveExactly interface { // _BACnetConstructedDataEgressActive is the data-structure of this message type _BACnetConstructedDataEgressActive struct { *_BACnetConstructedData - EgressActive BACnetApplicationTagBoolean + EgressActive BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataEgressActive) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataEgressActive) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataEgressActive) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_EGRESS_ACTIVE -} +func (m *_BACnetConstructedDataEgressActive) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_EGRESS_ACTIVE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataEgressActive) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataEgressActive) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataEgressActive) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataEgressActive) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataEgressActive) GetActualValue() BACnetApplicationT /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataEgressActive factory function for _BACnetConstructedDataEgressActive -func NewBACnetConstructedDataEgressActive(egressActive BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataEgressActive { +func NewBACnetConstructedDataEgressActive( egressActive BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataEgressActive { _result := &_BACnetConstructedDataEgressActive{ - EgressActive: egressActive, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + EgressActive: egressActive, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataEgressActive(egressActive BACnetApplicationTagBoole // Deprecated: use the interface for direct cast func CastBACnetConstructedDataEgressActive(structType interface{}) BACnetConstructedDataEgressActive { - if casted, ok := structType.(BACnetConstructedDataEgressActive); ok { + if casted, ok := structType.(BACnetConstructedDataEgressActive); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataEgressActive); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataEgressActive) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetConstructedDataEgressActive) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataEgressActiveParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("egressActive"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for egressActive") } - _egressActive, _egressActiveErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_egressActive, _egressActiveErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _egressActiveErr != nil { return nil, errors.Wrap(_egressActiveErr, "Error parsing 'egressActive' field of BACnetConstructedDataEgressActive") } @@ -186,7 +188,7 @@ func BACnetConstructedDataEgressActiveParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetConstructedDataEgressActive{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, EgressActive: egressActive, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataEgressActive) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataEgressActive") } - // Simple Field (egressActive) - if pushErr := writeBuffer.PushContext("egressActive"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for egressActive") - } - _egressActiveErr := writeBuffer.WriteSerializable(ctx, m.GetEgressActive()) - if popErr := writeBuffer.PopContext("egressActive"); popErr != nil { - return errors.Wrap(popErr, "Error popping for egressActive") - } - if _egressActiveErr != nil { - return errors.Wrap(_egressActiveErr, "Error serializing 'egressActive' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (egressActive) + if pushErr := writeBuffer.PushContext("egressActive"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for egressActive") + } + _egressActiveErr := writeBuffer.WriteSerializable(ctx, m.GetEgressActive()) + if popErr := writeBuffer.PopContext("egressActive"); popErr != nil { + return errors.Wrap(popErr, "Error popping for egressActive") + } + if _egressActiveErr != nil { + return errors.Wrap(_egressActiveErr, "Error serializing 'egressActive' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataEgressActive"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataEgressActive") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataEgressActive) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataEgressActive) isBACnetConstructedDataEgressActive() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataEgressActive) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEgressTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEgressTime.go index c7abf763b56..383915ad4ef 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEgressTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEgressTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataEgressTime is the corresponding interface of BACnetConstructedDataEgressTime type BACnetConstructedDataEgressTime interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataEgressTimeExactly interface { // _BACnetConstructedDataEgressTime is the data-structure of this message type _BACnetConstructedDataEgressTime struct { *_BACnetConstructedData - EgressTime BACnetApplicationTagUnsignedInteger + EgressTime BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataEgressTime) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataEgressTime) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataEgressTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_EGRESS_TIME -} +func (m *_BACnetConstructedDataEgressTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_EGRESS_TIME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataEgressTime) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataEgressTime) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataEgressTime) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataEgressTime) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataEgressTime) GetActualValue() BACnetApplicationTag /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataEgressTime factory function for _BACnetConstructedDataEgressTime -func NewBACnetConstructedDataEgressTime(egressTime BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataEgressTime { +func NewBACnetConstructedDataEgressTime( egressTime BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataEgressTime { _result := &_BACnetConstructedDataEgressTime{ - EgressTime: egressTime, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + EgressTime: egressTime, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataEgressTime(egressTime BACnetApplicationTagUnsignedI // Deprecated: use the interface for direct cast func CastBACnetConstructedDataEgressTime(structType interface{}) BACnetConstructedDataEgressTime { - if casted, ok := structType.(BACnetConstructedDataEgressTime); ok { + if casted, ok := structType.(BACnetConstructedDataEgressTime); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataEgressTime); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataEgressTime) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataEgressTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataEgressTimeParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("egressTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for egressTime") } - _egressTime, _egressTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_egressTime, _egressTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _egressTimeErr != nil { return nil, errors.Wrap(_egressTimeErr, "Error parsing 'egressTime' field of BACnetConstructedDataEgressTime") } @@ -186,7 +188,7 @@ func BACnetConstructedDataEgressTimeParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetConstructedDataEgressTime{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, EgressTime: egressTime, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataEgressTime) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataEgressTime") } - // Simple Field (egressTime) - if pushErr := writeBuffer.PushContext("egressTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for egressTime") - } - _egressTimeErr := writeBuffer.WriteSerializable(ctx, m.GetEgressTime()) - if popErr := writeBuffer.PopContext("egressTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for egressTime") - } - if _egressTimeErr != nil { - return errors.Wrap(_egressTimeErr, "Error serializing 'egressTime' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (egressTime) + if pushErr := writeBuffer.PushContext("egressTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for egressTime") + } + _egressTimeErr := writeBuffer.WriteSerializable(ctx, m.GetEgressTime()) + if popErr := writeBuffer.PopContext("egressTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for egressTime") + } + if _egressTimeErr != nil { + return errors.Wrap(_egressTimeErr, "Error serializing 'egressTime' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataEgressTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataEgressTime") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataEgressTime) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataEgressTime) isBACnetConstructedDataEgressTime() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataEgressTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataElapsedActiveTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataElapsedActiveTime.go index 9236941c39a..a2119f7b869 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataElapsedActiveTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataElapsedActiveTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataElapsedActiveTime is the corresponding interface of BACnetConstructedDataElapsedActiveTime type BACnetConstructedDataElapsedActiveTime interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataElapsedActiveTimeExactly interface { // _BACnetConstructedDataElapsedActiveTime is the data-structure of this message type _BACnetConstructedDataElapsedActiveTime struct { *_BACnetConstructedData - ElapsedActiveTime BACnetApplicationTagUnsignedInteger + ElapsedActiveTime BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataElapsedActiveTime) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataElapsedActiveTime) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataElapsedActiveTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ELAPSED_ACTIVE_TIME -} +func (m *_BACnetConstructedDataElapsedActiveTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ELAPSED_ACTIVE_TIME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataElapsedActiveTime) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataElapsedActiveTime) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataElapsedActiveTime) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataElapsedActiveTime) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataElapsedActiveTime) GetActualValue() BACnetApplica /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataElapsedActiveTime factory function for _BACnetConstructedDataElapsedActiveTime -func NewBACnetConstructedDataElapsedActiveTime(elapsedActiveTime BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataElapsedActiveTime { +func NewBACnetConstructedDataElapsedActiveTime( elapsedActiveTime BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataElapsedActiveTime { _result := &_BACnetConstructedDataElapsedActiveTime{ - ElapsedActiveTime: elapsedActiveTime, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ElapsedActiveTime: elapsedActiveTime, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataElapsedActiveTime(elapsedActiveTime BACnetApplicati // Deprecated: use the interface for direct cast func CastBACnetConstructedDataElapsedActiveTime(structType interface{}) BACnetConstructedDataElapsedActiveTime { - if casted, ok := structType.(BACnetConstructedDataElapsedActiveTime); ok { + if casted, ok := structType.(BACnetConstructedDataElapsedActiveTime); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataElapsedActiveTime); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataElapsedActiveTime) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetConstructedDataElapsedActiveTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataElapsedActiveTimeParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("elapsedActiveTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for elapsedActiveTime") } - _elapsedActiveTime, _elapsedActiveTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_elapsedActiveTime, _elapsedActiveTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _elapsedActiveTimeErr != nil { return nil, errors.Wrap(_elapsedActiveTimeErr, "Error parsing 'elapsedActiveTime' field of BACnetConstructedDataElapsedActiveTime") } @@ -186,7 +188,7 @@ func BACnetConstructedDataElapsedActiveTimeParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataElapsedActiveTime{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ElapsedActiveTime: elapsedActiveTime, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataElapsedActiveTime) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataElapsedActiveTime") } - // Simple Field (elapsedActiveTime) - if pushErr := writeBuffer.PushContext("elapsedActiveTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for elapsedActiveTime") - } - _elapsedActiveTimeErr := writeBuffer.WriteSerializable(ctx, m.GetElapsedActiveTime()) - if popErr := writeBuffer.PopContext("elapsedActiveTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for elapsedActiveTime") - } - if _elapsedActiveTimeErr != nil { - return errors.Wrap(_elapsedActiveTimeErr, "Error serializing 'elapsedActiveTime' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (elapsedActiveTime) + if pushErr := writeBuffer.PushContext("elapsedActiveTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for elapsedActiveTime") + } + _elapsedActiveTimeErr := writeBuffer.WriteSerializable(ctx, m.GetElapsedActiveTime()) + if popErr := writeBuffer.PopContext("elapsedActiveTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for elapsedActiveTime") + } + if _elapsedActiveTimeErr != nil { + return errors.Wrap(_elapsedActiveTimeErr, "Error serializing 'elapsedActiveTime' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataElapsedActiveTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataElapsedActiveTime") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataElapsedActiveTime) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataElapsedActiveTime) isBACnetConstructedDataElapsedActiveTime() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataElapsedActiveTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataElement.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataElement.go index 39f73d6266e..c38f4dcd2b9 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataElement.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataElement.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataElement is the corresponding interface of BACnetConstructedDataElement type BACnetConstructedDataElement interface { @@ -59,17 +61,18 @@ type BACnetConstructedDataElementExactly interface { // _BACnetConstructedDataElement is the data-structure of this message type _BACnetConstructedDataElement struct { - PeekedTagHeader BACnetTagHeader - ApplicationTag BACnetApplicationTag - ContextTag BACnetContextTag - ConstructedData BACnetConstructedData + PeekedTagHeader BACnetTagHeader + ApplicationTag BACnetApplicationTag + ContextTag BACnetContextTag + ConstructedData BACnetConstructedData // Arguments. - ObjectTypeArgument BACnetObjectType + ObjectTypeArgument BACnetObjectType PropertyIdentifierArgument BACnetPropertyIdentifier - ArrayIndexArgument BACnetTagPayloadUnsignedInteger + ArrayIndexArgument BACnetTagPayloadUnsignedInteger } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -153,14 +156,15 @@ func (m *_BACnetConstructedDataElement) GetIsContextTag() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataElement factory function for _BACnetConstructedDataElement -func NewBACnetConstructedDataElement(peekedTagHeader BACnetTagHeader, applicationTag BACnetApplicationTag, contextTag BACnetContextTag, constructedData BACnetConstructedData, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataElement { - return &_BACnetConstructedDataElement{PeekedTagHeader: peekedTagHeader, ApplicationTag: applicationTag, ContextTag: contextTag, ConstructedData: constructedData, ObjectTypeArgument: objectTypeArgument, PropertyIdentifierArgument: propertyIdentifierArgument, ArrayIndexArgument: arrayIndexArgument} +func NewBACnetConstructedDataElement( peekedTagHeader BACnetTagHeader , applicationTag BACnetApplicationTag , contextTag BACnetContextTag , constructedData BACnetConstructedData , objectTypeArgument BACnetObjectType , propertyIdentifierArgument BACnetPropertyIdentifier , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataElement { +return &_BACnetConstructedDataElement{ PeekedTagHeader: peekedTagHeader , ApplicationTag: applicationTag , ContextTag: contextTag , ConstructedData: constructedData , ObjectTypeArgument: objectTypeArgument , PropertyIdentifierArgument: propertyIdentifierArgument , ArrayIndexArgument: arrayIndexArgument } } // Deprecated: use the interface for direct cast func CastBACnetConstructedDataElement(structType interface{}) BACnetConstructedDataElement { - if casted, ok := structType.(BACnetConstructedDataElement); ok { + if casted, ok := structType.(BACnetConstructedDataElement); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataElement); ok { @@ -202,6 +206,7 @@ func (m *_BACnetConstructedDataElement) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_BACnetConstructedDataElement) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -219,13 +224,13 @@ func BACnetConstructedDataElementParseWithBuffer(ctx context.Context, readBuffer currentPos := positionAware.GetPos() _ = currentPos - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Virtual field _peekedTagNumber := peekedTagHeader.GetActualTagNumber() @@ -248,7 +253,7 @@ func BACnetConstructedDataElementParseWithBuffer(ctx context.Context, readBuffer _ = isContextTag // Validation - if !(bool(!(isContextTag)) || bool((bool(isContextTag) && bool(bool((peekedTagHeader.GetLengthValueType()) != (0x7)))))) { + if (!(bool(!(isContextTag)) || bool((bool(isContextTag) && bool(bool((peekedTagHeader.GetLengthValueType()) != (0x7))))))) { return nil, errors.WithStack(utils.ParseValidationError{"unexpected closing tag"}) } @@ -259,7 +264,7 @@ func BACnetConstructedDataElementParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("applicationTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for applicationTag") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -281,7 +286,7 @@ func BACnetConstructedDataElementParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("contextTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for contextTag") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, peekedTagNumber, BACnetDataType_UNKNOWN) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , peekedTagNumber , BACnetDataType_UNKNOWN ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -303,7 +308,7 @@ func BACnetConstructedDataElementParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("constructedData"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for constructedData") } - _val, _err := BACnetConstructedDataParseWithBuffer(ctx, readBuffer, peekedTagNumber, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) +_val, _err := BACnetConstructedDataParseWithBuffer(ctx, readBuffer , peekedTagNumber , objectTypeArgument , propertyIdentifierArgument , arrayIndexArgument ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -319,7 +324,7 @@ func BACnetConstructedDataElementParseWithBuffer(ctx context.Context, readBuffer } // Validation - if !(bool(bool((bool(isApplicationTag) && bool(bool((applicationTag) != (nil))))) || bool((bool(isContextTag) && bool(bool((contextTag) != (nil)))))) || bool((bool(isConstructedData) && bool(bool((constructedData) != (nil)))))) { + if (!(bool(bool((bool(isApplicationTag) && bool(bool(((applicationTag)) != (nil))))) || bool((bool(isContextTag) && bool(bool(((contextTag)) != (nil)))))) || bool((bool(isConstructedData) && bool(bool(((constructedData)) != (nil))))))) { return nil, errors.WithStack(utils.ParseValidationError{"BACnetConstructedDataElement could not parse anything"}) } @@ -329,14 +334,14 @@ func BACnetConstructedDataElementParseWithBuffer(ctx context.Context, readBuffer // Create the instance return &_BACnetConstructedDataElement{ - ObjectTypeArgument: objectTypeArgument, - PropertyIdentifierArgument: propertyIdentifierArgument, - ArrayIndexArgument: arrayIndexArgument, - PeekedTagHeader: peekedTagHeader, - ApplicationTag: applicationTag, - ContextTag: contextTag, - ConstructedData: constructedData, - }, nil + ObjectTypeArgument: objectTypeArgument, + PropertyIdentifierArgument: propertyIdentifierArgument, + ArrayIndexArgument: arrayIndexArgument, + PeekedTagHeader: peekedTagHeader, + ApplicationTag: applicationTag, + ContextTag: contextTag, + ConstructedData: constructedData, + }, nil } func (m *_BACnetConstructedDataElement) Serialize() ([]byte, error) { @@ -350,7 +355,7 @@ func (m *_BACnetConstructedDataElement) Serialize() ([]byte, error) { func (m *_BACnetConstructedDataElement) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetConstructedDataElement"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetConstructedDataElement"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataElement") } // Virtual field @@ -424,6 +429,7 @@ func (m *_BACnetConstructedDataElement) SerializeWithWriteBuffer(ctx context.Con return nil } + //// // Arguments Getter @@ -436,7 +442,6 @@ func (m *_BACnetConstructedDataElement) GetPropertyIdentifierArgument() BACnetPr func (m *_BACnetConstructedDataElement) GetArrayIndexArgument() BACnetTagPayloadUnsignedInteger { return m.ArrayIndexArgument } - // //// @@ -454,3 +459,6 @@ func (m *_BACnetConstructedDataElement) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataElevatorGroup.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataElevatorGroup.go index 80e99861e81..30daac98d4a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataElevatorGroup.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataElevatorGroup.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataElevatorGroup is the corresponding interface of BACnetConstructedDataElevatorGroup type BACnetConstructedDataElevatorGroup interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataElevatorGroupExactly interface { // _BACnetConstructedDataElevatorGroup is the data-structure of this message type _BACnetConstructedDataElevatorGroup struct { *_BACnetConstructedData - ElevatorGroup BACnetApplicationTagObjectIdentifier + ElevatorGroup BACnetApplicationTagObjectIdentifier } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataElevatorGroup) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataElevatorGroup) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataElevatorGroup) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ELEVATOR_GROUP -} +func (m *_BACnetConstructedDataElevatorGroup) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ELEVATOR_GROUP} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataElevatorGroup) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataElevatorGroup) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataElevatorGroup) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataElevatorGroup) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataElevatorGroup) GetActualValue() BACnetApplication /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataElevatorGroup factory function for _BACnetConstructedDataElevatorGroup -func NewBACnetConstructedDataElevatorGroup(elevatorGroup BACnetApplicationTagObjectIdentifier, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataElevatorGroup { +func NewBACnetConstructedDataElevatorGroup( elevatorGroup BACnetApplicationTagObjectIdentifier , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataElevatorGroup { _result := &_BACnetConstructedDataElevatorGroup{ - ElevatorGroup: elevatorGroup, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ElevatorGroup: elevatorGroup, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataElevatorGroup(elevatorGroup BACnetApplicationTagObj // Deprecated: use the interface for direct cast func CastBACnetConstructedDataElevatorGroup(structType interface{}) BACnetConstructedDataElevatorGroup { - if casted, ok := structType.(BACnetConstructedDataElevatorGroup); ok { + if casted, ok := structType.(BACnetConstructedDataElevatorGroup); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataElevatorGroup); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataElevatorGroup) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetConstructedDataElevatorGroup) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataElevatorGroupParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("elevatorGroup"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for elevatorGroup") } - _elevatorGroup, _elevatorGroupErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_elevatorGroup, _elevatorGroupErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _elevatorGroupErr != nil { return nil, errors.Wrap(_elevatorGroupErr, "Error parsing 'elevatorGroup' field of BACnetConstructedDataElevatorGroup") } @@ -186,7 +188,7 @@ func BACnetConstructedDataElevatorGroupParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetConstructedDataElevatorGroup{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ElevatorGroup: elevatorGroup, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataElevatorGroup) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataElevatorGroup") } - // Simple Field (elevatorGroup) - if pushErr := writeBuffer.PushContext("elevatorGroup"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for elevatorGroup") - } - _elevatorGroupErr := writeBuffer.WriteSerializable(ctx, m.GetElevatorGroup()) - if popErr := writeBuffer.PopContext("elevatorGroup"); popErr != nil { - return errors.Wrap(popErr, "Error popping for elevatorGroup") - } - if _elevatorGroupErr != nil { - return errors.Wrap(_elevatorGroupErr, "Error serializing 'elevatorGroup' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (elevatorGroup) + if pushErr := writeBuffer.PushContext("elevatorGroup"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for elevatorGroup") + } + _elevatorGroupErr := writeBuffer.WriteSerializable(ctx, m.GetElevatorGroup()) + if popErr := writeBuffer.PopContext("elevatorGroup"); popErr != nil { + return errors.Wrap(popErr, "Error popping for elevatorGroup") + } + if _elevatorGroupErr != nil { + return errors.Wrap(_elevatorGroupErr, "Error serializing 'elevatorGroup' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataElevatorGroup"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataElevatorGroup") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataElevatorGroup) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataElevatorGroup) isBACnetConstructedDataElevatorGroup() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataElevatorGroup) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataElevatorGroupAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataElevatorGroupAll.go index 84b1ade81e2..ef8035a7257 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataElevatorGroupAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataElevatorGroupAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataElevatorGroupAll is the corresponding interface of BACnetConstructedDataElevatorGroupAll type BACnetConstructedDataElevatorGroupAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataElevatorGroupAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataElevatorGroupAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ELEVATOR_GROUP -} +func (m *_BACnetConstructedDataElevatorGroupAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ELEVATOR_GROUP} -func (m *_BACnetConstructedDataElevatorGroupAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataElevatorGroupAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataElevatorGroupAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataElevatorGroupAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataElevatorGroupAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataElevatorGroupAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataElevatorGroupAll factory function for _BACnetConstructedDataElevatorGroupAll -func NewBACnetConstructedDataElevatorGroupAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataElevatorGroupAll { +func NewBACnetConstructedDataElevatorGroupAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataElevatorGroupAll { _result := &_BACnetConstructedDataElevatorGroupAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataElevatorGroupAll(openingTag BACnetOpeningTag, peeke // Deprecated: use the interface for direct cast func CastBACnetConstructedDataElevatorGroupAll(structType interface{}) BACnetConstructedDataElevatorGroupAll { - if casted, ok := structType.(BACnetConstructedDataElevatorGroupAll); ok { + if casted, ok := structType.(BACnetConstructedDataElevatorGroupAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataElevatorGroupAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataElevatorGroupAll) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetConstructedDataElevatorGroupAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataElevatorGroupAllParseWithBuffer(ctx context.Context, r _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataElevatorGroupAllParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_BACnetConstructedDataElevatorGroupAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataElevatorGroupAll) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataElevatorGroupAll) isBACnetConstructedDataElevatorGroupAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataElevatorGroupAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataElevatorGroupGroupMembers.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataElevatorGroupGroupMembers.go index 8877d131b13..59f4c06ee38 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataElevatorGroupGroupMembers.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataElevatorGroupGroupMembers.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataElevatorGroupGroupMembers is the corresponding interface of BACnetConstructedDataElevatorGroupGroupMembers type BACnetConstructedDataElevatorGroupGroupMembers interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataElevatorGroupGroupMembersExactly interface { // _BACnetConstructedDataElevatorGroupGroupMembers is the data-structure of this message type _BACnetConstructedDataElevatorGroupGroupMembers struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - GroupMembers []BACnetApplicationTagObjectIdentifier + NumberOfDataElements BACnetApplicationTagUnsignedInteger + GroupMembers []BACnetApplicationTagObjectIdentifier } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataElevatorGroupGroupMembers) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ELEVATOR_GROUP -} +func (m *_BACnetConstructedDataElevatorGroupGroupMembers) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ELEVATOR_GROUP} -func (m *_BACnetConstructedDataElevatorGroupGroupMembers) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_GROUP_MEMBERS -} +func (m *_BACnetConstructedDataElevatorGroupGroupMembers) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_GROUP_MEMBERS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataElevatorGroupGroupMembers) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataElevatorGroupGroupMembers) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataElevatorGroupGroupMembers) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataElevatorGroupGroupMembers) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataElevatorGroupGroupMembers) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataElevatorGroupGroupMembers factory function for _BACnetConstructedDataElevatorGroupGroupMembers -func NewBACnetConstructedDataElevatorGroupGroupMembers(numberOfDataElements BACnetApplicationTagUnsignedInteger, groupMembers []BACnetApplicationTagObjectIdentifier, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataElevatorGroupGroupMembers { +func NewBACnetConstructedDataElevatorGroupGroupMembers( numberOfDataElements BACnetApplicationTagUnsignedInteger , groupMembers []BACnetApplicationTagObjectIdentifier , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataElevatorGroupGroupMembers { _result := &_BACnetConstructedDataElevatorGroupGroupMembers{ - NumberOfDataElements: numberOfDataElements, - GroupMembers: groupMembers, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + GroupMembers: groupMembers, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataElevatorGroupGroupMembers(numberOfDataElements BACn // Deprecated: use the interface for direct cast func CastBACnetConstructedDataElevatorGroupGroupMembers(structType interface{}) BACnetConstructedDataElevatorGroupGroupMembers { - if casted, ok := structType.(BACnetConstructedDataElevatorGroupGroupMembers); ok { + if casted, ok := structType.(BACnetConstructedDataElevatorGroupGroupMembers); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataElevatorGroupGroupMembers); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataElevatorGroupGroupMembers) GetLengthInBits(ctx co return lengthInBits } + func (m *_BACnetConstructedDataElevatorGroupGroupMembers) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataElevatorGroupGroupMembersParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataElevatorGroupGroupMembersParseWithBuffer(ctx context.C // Terminated array var groupMembers []BACnetApplicationTagObjectIdentifier { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'groupMembers' field of BACnetConstructedDataElevatorGroupGroupMembers") } @@ -235,11 +237,11 @@ func BACnetConstructedDataElevatorGroupGroupMembersParseWithBuffer(ctx context.C // Create a partially initialized instance _child := &_BACnetConstructedDataElevatorGroupGroupMembers{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - GroupMembers: groupMembers, + GroupMembers: groupMembers, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataElevatorGroupGroupMembers) SerializeWithWriteBuff if pushErr := writeBuffer.PushContext("BACnetConstructedDataElevatorGroupGroupMembers"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataElevatorGroupGroupMembers") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (groupMembers) - if pushErr := writeBuffer.PushContext("groupMembers", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for groupMembers") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetGroupMembers() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetGroupMembers()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'groupMembers' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("groupMembers", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for groupMembers") + } + + // Array Field (groupMembers) + if pushErr := writeBuffer.PushContext("groupMembers", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for groupMembers") + } + for _curItem, _element := range m.GetGroupMembers() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetGroupMembers()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'groupMembers' field") } + } + if popErr := writeBuffer.PopContext("groupMembers", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for groupMembers") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataElevatorGroupGroupMembers"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataElevatorGroupGroupMembers") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataElevatorGroupGroupMembers) SerializeWithWriteBuff return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataElevatorGroupGroupMembers) isBACnetConstructedDataElevatorGroupGroupMembers() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataElevatorGroupGroupMembers) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEnable.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEnable.go index b57fa74e1d7..d1ff9bbba0e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEnable.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEnable.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataEnable is the corresponding interface of BACnetConstructedDataEnable type BACnetConstructedDataEnable interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataEnableExactly interface { // _BACnetConstructedDataEnable is the data-structure of this message type _BACnetConstructedDataEnable struct { *_BACnetConstructedData - Enable BACnetApplicationTagBoolean + Enable BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataEnable) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataEnable) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataEnable) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ENABLE -} +func (m *_BACnetConstructedDataEnable) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ENABLE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataEnable) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataEnable) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataEnable) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataEnable) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataEnable) GetActualValue() BACnetApplicationTagBool /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataEnable factory function for _BACnetConstructedDataEnable -func NewBACnetConstructedDataEnable(enable BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataEnable { +func NewBACnetConstructedDataEnable( enable BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataEnable { _result := &_BACnetConstructedDataEnable{ - Enable: enable, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Enable: enable, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataEnable(enable BACnetApplicationTagBoolean, openingT // Deprecated: use the interface for direct cast func CastBACnetConstructedDataEnable(structType interface{}) BACnetConstructedDataEnable { - if casted, ok := structType.(BACnetConstructedDataEnable); ok { + if casted, ok := structType.(BACnetConstructedDataEnable); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataEnable); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataEnable) GetLengthInBits(ctx context.Context) uint return lengthInBits } + func (m *_BACnetConstructedDataEnable) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataEnableParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("enable"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for enable") } - _enable, _enableErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_enable, _enableErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _enableErr != nil { return nil, errors.Wrap(_enableErr, "Error parsing 'enable' field of BACnetConstructedDataEnable") } @@ -186,7 +188,7 @@ func BACnetConstructedDataEnableParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_BACnetConstructedDataEnable{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Enable: enable, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataEnable) SerializeWithWriteBuffer(ctx context.Cont return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataEnable") } - // Simple Field (enable) - if pushErr := writeBuffer.PushContext("enable"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for enable") - } - _enableErr := writeBuffer.WriteSerializable(ctx, m.GetEnable()) - if popErr := writeBuffer.PopContext("enable"); popErr != nil { - return errors.Wrap(popErr, "Error popping for enable") - } - if _enableErr != nil { - return errors.Wrap(_enableErr, "Error serializing 'enable' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (enable) + if pushErr := writeBuffer.PushContext("enable"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for enable") + } + _enableErr := writeBuffer.WriteSerializable(ctx, m.GetEnable()) + if popErr := writeBuffer.PopContext("enable"); popErr != nil { + return errors.Wrap(popErr, "Error popping for enable") + } + if _enableErr != nil { + return errors.Wrap(_enableErr, "Error serializing 'enable' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataEnable"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataEnable") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataEnable) SerializeWithWriteBuffer(ctx context.Cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataEnable) isBACnetConstructedDataEnable() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataEnable) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEnergyMeter.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEnergyMeter.go index 5d2311c51f9..d33af10a9cb 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEnergyMeter.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEnergyMeter.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataEnergyMeter is the corresponding interface of BACnetConstructedDataEnergyMeter type BACnetConstructedDataEnergyMeter interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataEnergyMeterExactly interface { // _BACnetConstructedDataEnergyMeter is the data-structure of this message type _BACnetConstructedDataEnergyMeter struct { *_BACnetConstructedData - EnergyMeter BACnetApplicationTagReal + EnergyMeter BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataEnergyMeter) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataEnergyMeter) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataEnergyMeter) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ENERGY_METER -} +func (m *_BACnetConstructedDataEnergyMeter) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ENERGY_METER} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataEnergyMeter) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataEnergyMeter) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataEnergyMeter) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataEnergyMeter) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataEnergyMeter) GetActualValue() BACnetApplicationTa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataEnergyMeter factory function for _BACnetConstructedDataEnergyMeter -func NewBACnetConstructedDataEnergyMeter(energyMeter BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataEnergyMeter { +func NewBACnetConstructedDataEnergyMeter( energyMeter BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataEnergyMeter { _result := &_BACnetConstructedDataEnergyMeter{ - EnergyMeter: energyMeter, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + EnergyMeter: energyMeter, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataEnergyMeter(energyMeter BACnetApplicationTagReal, o // Deprecated: use the interface for direct cast func CastBACnetConstructedDataEnergyMeter(structType interface{}) BACnetConstructedDataEnergyMeter { - if casted, ok := structType.(BACnetConstructedDataEnergyMeter); ok { + if casted, ok := structType.(BACnetConstructedDataEnergyMeter); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataEnergyMeter); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataEnergyMeter) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataEnergyMeter) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataEnergyMeterParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("energyMeter"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for energyMeter") } - _energyMeter, _energyMeterErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_energyMeter, _energyMeterErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _energyMeterErr != nil { return nil, errors.Wrap(_energyMeterErr, "Error parsing 'energyMeter' field of BACnetConstructedDataEnergyMeter") } @@ -186,7 +188,7 @@ func BACnetConstructedDataEnergyMeterParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataEnergyMeter{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, EnergyMeter: energyMeter, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataEnergyMeter) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataEnergyMeter") } - // Simple Field (energyMeter) - if pushErr := writeBuffer.PushContext("energyMeter"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for energyMeter") - } - _energyMeterErr := writeBuffer.WriteSerializable(ctx, m.GetEnergyMeter()) - if popErr := writeBuffer.PopContext("energyMeter"); popErr != nil { - return errors.Wrap(popErr, "Error popping for energyMeter") - } - if _energyMeterErr != nil { - return errors.Wrap(_energyMeterErr, "Error serializing 'energyMeter' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (energyMeter) + if pushErr := writeBuffer.PushContext("energyMeter"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for energyMeter") + } + _energyMeterErr := writeBuffer.WriteSerializable(ctx, m.GetEnergyMeter()) + if popErr := writeBuffer.PopContext("energyMeter"); popErr != nil { + return errors.Wrap(popErr, "Error popping for energyMeter") + } + if _energyMeterErr != nil { + return errors.Wrap(_energyMeterErr, "Error serializing 'energyMeter' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataEnergyMeter"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataEnergyMeter") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataEnergyMeter) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataEnergyMeter) isBACnetConstructedDataEnergyMeter() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataEnergyMeter) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEnergyMeterRef.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEnergyMeterRef.go index 90ea679f5a2..ca07e1adef5 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEnergyMeterRef.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEnergyMeterRef.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataEnergyMeterRef is the corresponding interface of BACnetConstructedDataEnergyMeterRef type BACnetConstructedDataEnergyMeterRef interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataEnergyMeterRefExactly interface { // _BACnetConstructedDataEnergyMeterRef is the data-structure of this message type _BACnetConstructedDataEnergyMeterRef struct { *_BACnetConstructedData - EnergyMeterRef BACnetDeviceObjectReference + EnergyMeterRef BACnetDeviceObjectReference } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataEnergyMeterRef) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataEnergyMeterRef) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataEnergyMeterRef) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ENERGY_METER_REF -} +func (m *_BACnetConstructedDataEnergyMeterRef) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ENERGY_METER_REF} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataEnergyMeterRef) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataEnergyMeterRef) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataEnergyMeterRef) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataEnergyMeterRef) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataEnergyMeterRef) GetActualValue() BACnetDeviceObje /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataEnergyMeterRef factory function for _BACnetConstructedDataEnergyMeterRef -func NewBACnetConstructedDataEnergyMeterRef(energyMeterRef BACnetDeviceObjectReference, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataEnergyMeterRef { +func NewBACnetConstructedDataEnergyMeterRef( energyMeterRef BACnetDeviceObjectReference , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataEnergyMeterRef { _result := &_BACnetConstructedDataEnergyMeterRef{ - EnergyMeterRef: energyMeterRef, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + EnergyMeterRef: energyMeterRef, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataEnergyMeterRef(energyMeterRef BACnetDeviceObjectRef // Deprecated: use the interface for direct cast func CastBACnetConstructedDataEnergyMeterRef(structType interface{}) BACnetConstructedDataEnergyMeterRef { - if casted, ok := structType.(BACnetConstructedDataEnergyMeterRef); ok { + if casted, ok := structType.(BACnetConstructedDataEnergyMeterRef); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataEnergyMeterRef); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataEnergyMeterRef) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConstructedDataEnergyMeterRef) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataEnergyMeterRefParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("energyMeterRef"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for energyMeterRef") } - _energyMeterRef, _energyMeterRefErr := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) +_energyMeterRef, _energyMeterRefErr := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) if _energyMeterRefErr != nil { return nil, errors.Wrap(_energyMeterRefErr, "Error parsing 'energyMeterRef' field of BACnetConstructedDataEnergyMeterRef") } @@ -186,7 +188,7 @@ func BACnetConstructedDataEnergyMeterRefParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetConstructedDataEnergyMeterRef{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, EnergyMeterRef: energyMeterRef, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataEnergyMeterRef) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataEnergyMeterRef") } - // Simple Field (energyMeterRef) - if pushErr := writeBuffer.PushContext("energyMeterRef"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for energyMeterRef") - } - _energyMeterRefErr := writeBuffer.WriteSerializable(ctx, m.GetEnergyMeterRef()) - if popErr := writeBuffer.PopContext("energyMeterRef"); popErr != nil { - return errors.Wrap(popErr, "Error popping for energyMeterRef") - } - if _energyMeterRefErr != nil { - return errors.Wrap(_energyMeterRefErr, "Error serializing 'energyMeterRef' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (energyMeterRef) + if pushErr := writeBuffer.PushContext("energyMeterRef"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for energyMeterRef") + } + _energyMeterRefErr := writeBuffer.WriteSerializable(ctx, m.GetEnergyMeterRef()) + if popErr := writeBuffer.PopContext("energyMeterRef"); popErr != nil { + return errors.Wrap(popErr, "Error popping for energyMeterRef") + } + if _energyMeterRefErr != nil { + return errors.Wrap(_energyMeterRefErr, "Error serializing 'energyMeterRef' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataEnergyMeterRef"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataEnergyMeterRef") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataEnergyMeterRef) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataEnergyMeterRef) isBACnetConstructedDataEnergyMeterRef() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataEnergyMeterRef) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEntryPoints.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEntryPoints.go index be9d49905e6..8db31ad4a82 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEntryPoints.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEntryPoints.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataEntryPoints is the corresponding interface of BACnetConstructedDataEntryPoints type BACnetConstructedDataEntryPoints interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataEntryPointsExactly interface { // _BACnetConstructedDataEntryPoints is the data-structure of this message type _BACnetConstructedDataEntryPoints struct { *_BACnetConstructedData - EntryPoints []BACnetDeviceObjectReference + EntryPoints []BACnetDeviceObjectReference } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataEntryPoints) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataEntryPoints) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataEntryPoints) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ENTRY_POINTS -} +func (m *_BACnetConstructedDataEntryPoints) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ENTRY_POINTS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataEntryPoints) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataEntryPoints) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataEntryPoints) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataEntryPoints) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataEntryPoints) GetEntryPoints() []BACnetDeviceObjec /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataEntryPoints factory function for _BACnetConstructedDataEntryPoints -func NewBACnetConstructedDataEntryPoints(entryPoints []BACnetDeviceObjectReference, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataEntryPoints { +func NewBACnetConstructedDataEntryPoints( entryPoints []BACnetDeviceObjectReference , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataEntryPoints { _result := &_BACnetConstructedDataEntryPoints{ - EntryPoints: entryPoints, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + EntryPoints: entryPoints, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataEntryPoints(entryPoints []BACnetDeviceObjectReferen // Deprecated: use the interface for direct cast func CastBACnetConstructedDataEntryPoints(structType interface{}) BACnetConstructedDataEntryPoints { - if casted, ok := structType.(BACnetConstructedDataEntryPoints); ok { + if casted, ok := structType.(BACnetConstructedDataEntryPoints); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataEntryPoints); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataEntryPoints) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataEntryPoints) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataEntryPointsParseWithBuffer(ctx context.Context, readBu // Terminated array var entryPoints []BACnetDeviceObjectReference { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'entryPoints' field of BACnetConstructedDataEntryPoints") } @@ -173,7 +175,7 @@ func BACnetConstructedDataEntryPointsParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataEntryPoints{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, EntryPoints: entryPoints, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataEntryPoints) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataEntryPoints") } - // Array Field (entryPoints) - if pushErr := writeBuffer.PushContext("entryPoints", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for entryPoints") - } - for _curItem, _element := range m.GetEntryPoints() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetEntryPoints()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'entryPoints' field") - } - } - if popErr := writeBuffer.PopContext("entryPoints", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for entryPoints") + // Array Field (entryPoints) + if pushErr := writeBuffer.PushContext("entryPoints", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for entryPoints") + } + for _curItem, _element := range m.GetEntryPoints() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetEntryPoints()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'entryPoints' field") } + } + if popErr := writeBuffer.PopContext("entryPoints", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for entryPoints") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataEntryPoints"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataEntryPoints") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataEntryPoints) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataEntryPoints) isBACnetConstructedDataEntryPoints() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataEntryPoints) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataErrorLimit.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataErrorLimit.go index 1930959992b..47ce3541beb 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataErrorLimit.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataErrorLimit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataErrorLimit is the corresponding interface of BACnetConstructedDataErrorLimit type BACnetConstructedDataErrorLimit interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataErrorLimitExactly interface { // _BACnetConstructedDataErrorLimit is the data-structure of this message type _BACnetConstructedDataErrorLimit struct { *_BACnetConstructedData - ErrorLimit BACnetApplicationTagReal + ErrorLimit BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataErrorLimit) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataErrorLimit) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataErrorLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ERROR_LIMIT -} +func (m *_BACnetConstructedDataErrorLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ERROR_LIMIT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataErrorLimit) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataErrorLimit) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataErrorLimit) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataErrorLimit) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataErrorLimit) GetActualValue() BACnetApplicationTag /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataErrorLimit factory function for _BACnetConstructedDataErrorLimit -func NewBACnetConstructedDataErrorLimit(errorLimit BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataErrorLimit { +func NewBACnetConstructedDataErrorLimit( errorLimit BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataErrorLimit { _result := &_BACnetConstructedDataErrorLimit{ - ErrorLimit: errorLimit, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ErrorLimit: errorLimit, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataErrorLimit(errorLimit BACnetApplicationTagReal, ope // Deprecated: use the interface for direct cast func CastBACnetConstructedDataErrorLimit(structType interface{}) BACnetConstructedDataErrorLimit { - if casted, ok := structType.(BACnetConstructedDataErrorLimit); ok { + if casted, ok := structType.(BACnetConstructedDataErrorLimit); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataErrorLimit); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataErrorLimit) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataErrorLimit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataErrorLimitParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("errorLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for errorLimit") } - _errorLimit, _errorLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_errorLimit, _errorLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _errorLimitErr != nil { return nil, errors.Wrap(_errorLimitErr, "Error parsing 'errorLimit' field of BACnetConstructedDataErrorLimit") } @@ -186,7 +188,7 @@ func BACnetConstructedDataErrorLimitParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetConstructedDataErrorLimit{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ErrorLimit: errorLimit, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataErrorLimit) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataErrorLimit") } - // Simple Field (errorLimit) - if pushErr := writeBuffer.PushContext("errorLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for errorLimit") - } - _errorLimitErr := writeBuffer.WriteSerializable(ctx, m.GetErrorLimit()) - if popErr := writeBuffer.PopContext("errorLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for errorLimit") - } - if _errorLimitErr != nil { - return errors.Wrap(_errorLimitErr, "Error serializing 'errorLimit' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (errorLimit) + if pushErr := writeBuffer.PushContext("errorLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for errorLimit") + } + _errorLimitErr := writeBuffer.WriteSerializable(ctx, m.GetErrorLimit()) + if popErr := writeBuffer.PopContext("errorLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for errorLimit") + } + if _errorLimitErr != nil { + return errors.Wrap(_errorLimitErr, "Error serializing 'errorLimit' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataErrorLimit"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataErrorLimit") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataErrorLimit) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataErrorLimit) isBACnetConstructedDataErrorLimit() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataErrorLimit) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEscalatorAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEscalatorAll.go index f3283b094e9..eacd62fa401 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEscalatorAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEscalatorAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataEscalatorAll is the corresponding interface of BACnetConstructedDataEscalatorAll type BACnetConstructedDataEscalatorAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataEscalatorAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataEscalatorAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ESCALATOR -} +func (m *_BACnetConstructedDataEscalatorAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ESCALATOR} -func (m *_BACnetConstructedDataEscalatorAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataEscalatorAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataEscalatorAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataEscalatorAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataEscalatorAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataEscalatorAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataEscalatorAll factory function for _BACnetConstructedDataEscalatorAll -func NewBACnetConstructedDataEscalatorAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataEscalatorAll { +func NewBACnetConstructedDataEscalatorAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataEscalatorAll { _result := &_BACnetConstructedDataEscalatorAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataEscalatorAll(openingTag BACnetOpeningTag, peekedTag // Deprecated: use the interface for direct cast func CastBACnetConstructedDataEscalatorAll(structType interface{}) BACnetConstructedDataEscalatorAll { - if casted, ok := structType.(BACnetConstructedDataEscalatorAll); ok { + if casted, ok := structType.(BACnetConstructedDataEscalatorAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataEscalatorAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataEscalatorAll) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetConstructedDataEscalatorAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataEscalatorAllParseWithBuffer(ctx context.Context, readB _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataEscalatorAllParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetConstructedDataEscalatorAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataEscalatorAll) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataEscalatorAll) isBACnetConstructedDataEscalatorAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataEscalatorAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEscalatorFaultSignals.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEscalatorFaultSignals.go index 441e20dd1fc..f1b73055e29 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEscalatorFaultSignals.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEscalatorFaultSignals.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataEscalatorFaultSignals is the corresponding interface of BACnetConstructedDataEscalatorFaultSignals type BACnetConstructedDataEscalatorFaultSignals interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataEscalatorFaultSignalsExactly interface { // _BACnetConstructedDataEscalatorFaultSignals is the data-structure of this message type _BACnetConstructedDataEscalatorFaultSignals struct { *_BACnetConstructedData - FaultSignals []BACnetEscalatorFaultTagged + FaultSignals []BACnetEscalatorFaultTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataEscalatorFaultSignals) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_ESCALATOR -} +func (m *_BACnetConstructedDataEscalatorFaultSignals) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_ESCALATOR} -func (m *_BACnetConstructedDataEscalatorFaultSignals) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FAULT_SIGNALS -} +func (m *_BACnetConstructedDataEscalatorFaultSignals) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FAULT_SIGNALS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataEscalatorFaultSignals) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataEscalatorFaultSignals) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataEscalatorFaultSignals) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataEscalatorFaultSignals) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataEscalatorFaultSignals) GetFaultSignals() []BACnet /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataEscalatorFaultSignals factory function for _BACnetConstructedDataEscalatorFaultSignals -func NewBACnetConstructedDataEscalatorFaultSignals(faultSignals []BACnetEscalatorFaultTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataEscalatorFaultSignals { +func NewBACnetConstructedDataEscalatorFaultSignals( faultSignals []BACnetEscalatorFaultTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataEscalatorFaultSignals { _result := &_BACnetConstructedDataEscalatorFaultSignals{ - FaultSignals: faultSignals, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + FaultSignals: faultSignals, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataEscalatorFaultSignals(faultSignals []BACnetEscalato // Deprecated: use the interface for direct cast func CastBACnetConstructedDataEscalatorFaultSignals(structType interface{}) BACnetConstructedDataEscalatorFaultSignals { - if casted, ok := structType.(BACnetConstructedDataEscalatorFaultSignals); ok { + if casted, ok := structType.(BACnetConstructedDataEscalatorFaultSignals); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataEscalatorFaultSignals); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataEscalatorFaultSignals) GetLengthInBits(ctx contex return lengthInBits } + func (m *_BACnetConstructedDataEscalatorFaultSignals) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataEscalatorFaultSignalsParseWithBuffer(ctx context.Conte // Terminated array var faultSignals []BACnetEscalatorFaultTagged { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetEscalatorFaultTaggedParseWithBuffer(ctx, readBuffer, uint8(0), TagClass_APPLICATION_TAGS) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetEscalatorFaultTaggedParseWithBuffer(ctx, readBuffer , uint8(0) , TagClass_APPLICATION_TAGS ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'faultSignals' field of BACnetConstructedDataEscalatorFaultSignals") } @@ -173,7 +175,7 @@ func BACnetConstructedDataEscalatorFaultSignalsParseWithBuffer(ctx context.Conte // Create a partially initialized instance _child := &_BACnetConstructedDataEscalatorFaultSignals{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FaultSignals: faultSignals, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataEscalatorFaultSignals) SerializeWithWriteBuffer(c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataEscalatorFaultSignals") } - // Array Field (faultSignals) - if pushErr := writeBuffer.PushContext("faultSignals", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for faultSignals") - } - for _curItem, _element := range m.GetFaultSignals() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetFaultSignals()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'faultSignals' field") - } - } - if popErr := writeBuffer.PopContext("faultSignals", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for faultSignals") + // Array Field (faultSignals) + if pushErr := writeBuffer.PushContext("faultSignals", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for faultSignals") + } + for _curItem, _element := range m.GetFaultSignals() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetFaultSignals()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'faultSignals' field") } + } + if popErr := writeBuffer.PopContext("faultSignals", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for faultSignals") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataEscalatorFaultSignals"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataEscalatorFaultSignals") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataEscalatorFaultSignals) SerializeWithWriteBuffer(c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataEscalatorFaultSignals) isBACnetConstructedDataEscalatorFaultSignals() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataEscalatorFaultSignals) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEscalatorMode.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEscalatorMode.go index 5a62df89650..ab160a41ed8 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEscalatorMode.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEscalatorMode.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataEscalatorMode is the corresponding interface of BACnetConstructedDataEscalatorMode type BACnetConstructedDataEscalatorMode interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataEscalatorModeExactly interface { // _BACnetConstructedDataEscalatorMode is the data-structure of this message type _BACnetConstructedDataEscalatorMode struct { *_BACnetConstructedData - EscalatorMode BACnetEscalatorModeTagged + EscalatorMode BACnetEscalatorModeTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataEscalatorMode) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataEscalatorMode) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataEscalatorMode) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ESCALATOR_MODE -} +func (m *_BACnetConstructedDataEscalatorMode) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ESCALATOR_MODE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataEscalatorMode) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataEscalatorMode) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataEscalatorMode) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataEscalatorMode) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataEscalatorMode) GetActualValue() BACnetEscalatorMo /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataEscalatorMode factory function for _BACnetConstructedDataEscalatorMode -func NewBACnetConstructedDataEscalatorMode(escalatorMode BACnetEscalatorModeTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataEscalatorMode { +func NewBACnetConstructedDataEscalatorMode( escalatorMode BACnetEscalatorModeTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataEscalatorMode { _result := &_BACnetConstructedDataEscalatorMode{ - EscalatorMode: escalatorMode, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + EscalatorMode: escalatorMode, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataEscalatorMode(escalatorMode BACnetEscalatorModeTagg // Deprecated: use the interface for direct cast func CastBACnetConstructedDataEscalatorMode(structType interface{}) BACnetConstructedDataEscalatorMode { - if casted, ok := structType.(BACnetConstructedDataEscalatorMode); ok { + if casted, ok := structType.(BACnetConstructedDataEscalatorMode); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataEscalatorMode); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataEscalatorMode) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetConstructedDataEscalatorMode) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataEscalatorModeParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("escalatorMode"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for escalatorMode") } - _escalatorMode, _escalatorModeErr := BACnetEscalatorModeTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_escalatorMode, _escalatorModeErr := BACnetEscalatorModeTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _escalatorModeErr != nil { return nil, errors.Wrap(_escalatorModeErr, "Error parsing 'escalatorMode' field of BACnetConstructedDataEscalatorMode") } @@ -186,7 +188,7 @@ func BACnetConstructedDataEscalatorModeParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetConstructedDataEscalatorMode{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, EscalatorMode: escalatorMode, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataEscalatorMode) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataEscalatorMode") } - // Simple Field (escalatorMode) - if pushErr := writeBuffer.PushContext("escalatorMode"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for escalatorMode") - } - _escalatorModeErr := writeBuffer.WriteSerializable(ctx, m.GetEscalatorMode()) - if popErr := writeBuffer.PopContext("escalatorMode"); popErr != nil { - return errors.Wrap(popErr, "Error popping for escalatorMode") - } - if _escalatorModeErr != nil { - return errors.Wrap(_escalatorModeErr, "Error serializing 'escalatorMode' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (escalatorMode) + if pushErr := writeBuffer.PushContext("escalatorMode"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for escalatorMode") + } + _escalatorModeErr := writeBuffer.WriteSerializable(ctx, m.GetEscalatorMode()) + if popErr := writeBuffer.PopContext("escalatorMode"); popErr != nil { + return errors.Wrap(popErr, "Error popping for escalatorMode") + } + if _escalatorModeErr != nil { + return errors.Wrap(_escalatorModeErr, "Error serializing 'escalatorMode' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataEscalatorMode"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataEscalatorMode") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataEscalatorMode) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataEscalatorMode) isBACnetConstructedDataEscalatorMode() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataEscalatorMode) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventAlgorithmInhibit.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventAlgorithmInhibit.go index 264c75d7795..2b9bd82494d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventAlgorithmInhibit.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventAlgorithmInhibit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataEventAlgorithmInhibit is the corresponding interface of BACnetConstructedDataEventAlgorithmInhibit type BACnetConstructedDataEventAlgorithmInhibit interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataEventAlgorithmInhibitExactly interface { // _BACnetConstructedDataEventAlgorithmInhibit is the data-structure of this message type _BACnetConstructedDataEventAlgorithmInhibit struct { *_BACnetConstructedData - EventAlgorithmInhibit BACnetApplicationTagBoolean + EventAlgorithmInhibit BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataEventAlgorithmInhibit) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataEventAlgorithmInhibit) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataEventAlgorithmInhibit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_EVENT_ALGORITHM_INHIBIT -} +func (m *_BACnetConstructedDataEventAlgorithmInhibit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_EVENT_ALGORITHM_INHIBIT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataEventAlgorithmInhibit) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataEventAlgorithmInhibit) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataEventAlgorithmInhibit) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataEventAlgorithmInhibit) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataEventAlgorithmInhibit) GetActualValue() BACnetApp /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataEventAlgorithmInhibit factory function for _BACnetConstructedDataEventAlgorithmInhibit -func NewBACnetConstructedDataEventAlgorithmInhibit(eventAlgorithmInhibit BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataEventAlgorithmInhibit { +func NewBACnetConstructedDataEventAlgorithmInhibit( eventAlgorithmInhibit BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataEventAlgorithmInhibit { _result := &_BACnetConstructedDataEventAlgorithmInhibit{ - EventAlgorithmInhibit: eventAlgorithmInhibit, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + EventAlgorithmInhibit: eventAlgorithmInhibit, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataEventAlgorithmInhibit(eventAlgorithmInhibit BACnetA // Deprecated: use the interface for direct cast func CastBACnetConstructedDataEventAlgorithmInhibit(structType interface{}) BACnetConstructedDataEventAlgorithmInhibit { - if casted, ok := structType.(BACnetConstructedDataEventAlgorithmInhibit); ok { + if casted, ok := structType.(BACnetConstructedDataEventAlgorithmInhibit); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataEventAlgorithmInhibit); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataEventAlgorithmInhibit) GetLengthInBits(ctx contex return lengthInBits } + func (m *_BACnetConstructedDataEventAlgorithmInhibit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataEventAlgorithmInhibitParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("eventAlgorithmInhibit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for eventAlgorithmInhibit") } - _eventAlgorithmInhibit, _eventAlgorithmInhibitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_eventAlgorithmInhibit, _eventAlgorithmInhibitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _eventAlgorithmInhibitErr != nil { return nil, errors.Wrap(_eventAlgorithmInhibitErr, "Error parsing 'eventAlgorithmInhibit' field of BACnetConstructedDataEventAlgorithmInhibit") } @@ -186,7 +188,7 @@ func BACnetConstructedDataEventAlgorithmInhibitParseWithBuffer(ctx context.Conte // Create a partially initialized instance _child := &_BACnetConstructedDataEventAlgorithmInhibit{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, EventAlgorithmInhibit: eventAlgorithmInhibit, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataEventAlgorithmInhibit) SerializeWithWriteBuffer(c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataEventAlgorithmInhibit") } - // Simple Field (eventAlgorithmInhibit) - if pushErr := writeBuffer.PushContext("eventAlgorithmInhibit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for eventAlgorithmInhibit") - } - _eventAlgorithmInhibitErr := writeBuffer.WriteSerializable(ctx, m.GetEventAlgorithmInhibit()) - if popErr := writeBuffer.PopContext("eventAlgorithmInhibit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for eventAlgorithmInhibit") - } - if _eventAlgorithmInhibitErr != nil { - return errors.Wrap(_eventAlgorithmInhibitErr, "Error serializing 'eventAlgorithmInhibit' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (eventAlgorithmInhibit) + if pushErr := writeBuffer.PushContext("eventAlgorithmInhibit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for eventAlgorithmInhibit") + } + _eventAlgorithmInhibitErr := writeBuffer.WriteSerializable(ctx, m.GetEventAlgorithmInhibit()) + if popErr := writeBuffer.PopContext("eventAlgorithmInhibit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for eventAlgorithmInhibit") + } + if _eventAlgorithmInhibitErr != nil { + return errors.Wrap(_eventAlgorithmInhibitErr, "Error serializing 'eventAlgorithmInhibit' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataEventAlgorithmInhibit"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataEventAlgorithmInhibit") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataEventAlgorithmInhibit) SerializeWithWriteBuffer(c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataEventAlgorithmInhibit) isBACnetConstructedDataEventAlgorithmInhibit() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataEventAlgorithmInhibit) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventAlgorithmInhibitRef.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventAlgorithmInhibitRef.go index 5244eaf16dc..27608c6c768 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventAlgorithmInhibitRef.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventAlgorithmInhibitRef.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataEventAlgorithmInhibitRef is the corresponding interface of BACnetConstructedDataEventAlgorithmInhibitRef type BACnetConstructedDataEventAlgorithmInhibitRef interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataEventAlgorithmInhibitRefExactly interface { // _BACnetConstructedDataEventAlgorithmInhibitRef is the data-structure of this message type _BACnetConstructedDataEventAlgorithmInhibitRef struct { *_BACnetConstructedData - EventAlgorithmInhibitRef BACnetObjectPropertyReference + EventAlgorithmInhibitRef BACnetObjectPropertyReference } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataEventAlgorithmInhibitRef) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataEventAlgorithmInhibitRef) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataEventAlgorithmInhibitRef) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_EVENT_ALGORITHM_INHIBIT_REF -} +func (m *_BACnetConstructedDataEventAlgorithmInhibitRef) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_EVENT_ALGORITHM_INHIBIT_REF} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataEventAlgorithmInhibitRef) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataEventAlgorithmInhibitRef) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataEventAlgorithmInhibitRef) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataEventAlgorithmInhibitRef) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataEventAlgorithmInhibitRef) GetActualValue() BACnet /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataEventAlgorithmInhibitRef factory function for _BACnetConstructedDataEventAlgorithmInhibitRef -func NewBACnetConstructedDataEventAlgorithmInhibitRef(eventAlgorithmInhibitRef BACnetObjectPropertyReference, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataEventAlgorithmInhibitRef { +func NewBACnetConstructedDataEventAlgorithmInhibitRef( eventAlgorithmInhibitRef BACnetObjectPropertyReference , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataEventAlgorithmInhibitRef { _result := &_BACnetConstructedDataEventAlgorithmInhibitRef{ EventAlgorithmInhibitRef: eventAlgorithmInhibitRef, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataEventAlgorithmInhibitRef(eventAlgorithmInhibitRef B // Deprecated: use the interface for direct cast func CastBACnetConstructedDataEventAlgorithmInhibitRef(structType interface{}) BACnetConstructedDataEventAlgorithmInhibitRef { - if casted, ok := structType.(BACnetConstructedDataEventAlgorithmInhibitRef); ok { + if casted, ok := structType.(BACnetConstructedDataEventAlgorithmInhibitRef); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataEventAlgorithmInhibitRef); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataEventAlgorithmInhibitRef) GetLengthInBits(ctx con return lengthInBits } + func (m *_BACnetConstructedDataEventAlgorithmInhibitRef) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataEventAlgorithmInhibitRefParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("eventAlgorithmInhibitRef"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for eventAlgorithmInhibitRef") } - _eventAlgorithmInhibitRef, _eventAlgorithmInhibitRefErr := BACnetObjectPropertyReferenceParseWithBuffer(ctx, readBuffer) +_eventAlgorithmInhibitRef, _eventAlgorithmInhibitRefErr := BACnetObjectPropertyReferenceParseWithBuffer(ctx, readBuffer) if _eventAlgorithmInhibitRefErr != nil { return nil, errors.Wrap(_eventAlgorithmInhibitRefErr, "Error parsing 'eventAlgorithmInhibitRef' field of BACnetConstructedDataEventAlgorithmInhibitRef") } @@ -186,7 +188,7 @@ func BACnetConstructedDataEventAlgorithmInhibitRefParseWithBuffer(ctx context.Co // Create a partially initialized instance _child := &_BACnetConstructedDataEventAlgorithmInhibitRef{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, EventAlgorithmInhibitRef: eventAlgorithmInhibitRef, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataEventAlgorithmInhibitRef) SerializeWithWriteBuffe return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataEventAlgorithmInhibitRef") } - // Simple Field (eventAlgorithmInhibitRef) - if pushErr := writeBuffer.PushContext("eventAlgorithmInhibitRef"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for eventAlgorithmInhibitRef") - } - _eventAlgorithmInhibitRefErr := writeBuffer.WriteSerializable(ctx, m.GetEventAlgorithmInhibitRef()) - if popErr := writeBuffer.PopContext("eventAlgorithmInhibitRef"); popErr != nil { - return errors.Wrap(popErr, "Error popping for eventAlgorithmInhibitRef") - } - if _eventAlgorithmInhibitRefErr != nil { - return errors.Wrap(_eventAlgorithmInhibitRefErr, "Error serializing 'eventAlgorithmInhibitRef' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (eventAlgorithmInhibitRef) + if pushErr := writeBuffer.PushContext("eventAlgorithmInhibitRef"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for eventAlgorithmInhibitRef") + } + _eventAlgorithmInhibitRefErr := writeBuffer.WriteSerializable(ctx, m.GetEventAlgorithmInhibitRef()) + if popErr := writeBuffer.PopContext("eventAlgorithmInhibitRef"); popErr != nil { + return errors.Wrap(popErr, "Error popping for eventAlgorithmInhibitRef") + } + if _eventAlgorithmInhibitRefErr != nil { + return errors.Wrap(_eventAlgorithmInhibitRefErr, "Error serializing 'eventAlgorithmInhibitRef' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataEventAlgorithmInhibitRef"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataEventAlgorithmInhibitRef") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataEventAlgorithmInhibitRef) SerializeWithWriteBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataEventAlgorithmInhibitRef) isBACnetConstructedDataEventAlgorithmInhibitRef() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataEventAlgorithmInhibitRef) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventDetectionEnable.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventDetectionEnable.go index c4329d9fb25..4f6edf948ec 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventDetectionEnable.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventDetectionEnable.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataEventDetectionEnable is the corresponding interface of BACnetConstructedDataEventDetectionEnable type BACnetConstructedDataEventDetectionEnable interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataEventDetectionEnableExactly interface { // _BACnetConstructedDataEventDetectionEnable is the data-structure of this message type _BACnetConstructedDataEventDetectionEnable struct { *_BACnetConstructedData - EventDetectionEnable BACnetApplicationTagBoolean + EventDetectionEnable BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataEventDetectionEnable) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataEventDetectionEnable) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataEventDetectionEnable) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_EVENT_DETECTION_ENABLE -} +func (m *_BACnetConstructedDataEventDetectionEnable) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_EVENT_DETECTION_ENABLE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataEventDetectionEnable) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataEventDetectionEnable) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataEventDetectionEnable) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataEventDetectionEnable) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataEventDetectionEnable) GetActualValue() BACnetAppl /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataEventDetectionEnable factory function for _BACnetConstructedDataEventDetectionEnable -func NewBACnetConstructedDataEventDetectionEnable(eventDetectionEnable BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataEventDetectionEnable { +func NewBACnetConstructedDataEventDetectionEnable( eventDetectionEnable BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataEventDetectionEnable { _result := &_BACnetConstructedDataEventDetectionEnable{ - EventDetectionEnable: eventDetectionEnable, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + EventDetectionEnable: eventDetectionEnable, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataEventDetectionEnable(eventDetectionEnable BACnetApp // Deprecated: use the interface for direct cast func CastBACnetConstructedDataEventDetectionEnable(structType interface{}) BACnetConstructedDataEventDetectionEnable { - if casted, ok := structType.(BACnetConstructedDataEventDetectionEnable); ok { + if casted, ok := structType.(BACnetConstructedDataEventDetectionEnable); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataEventDetectionEnable); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataEventDetectionEnable) GetLengthInBits(ctx context return lengthInBits } + func (m *_BACnetConstructedDataEventDetectionEnable) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataEventDetectionEnableParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("eventDetectionEnable"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for eventDetectionEnable") } - _eventDetectionEnable, _eventDetectionEnableErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_eventDetectionEnable, _eventDetectionEnableErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _eventDetectionEnableErr != nil { return nil, errors.Wrap(_eventDetectionEnableErr, "Error parsing 'eventDetectionEnable' field of BACnetConstructedDataEventDetectionEnable") } @@ -186,7 +188,7 @@ func BACnetConstructedDataEventDetectionEnableParseWithBuffer(ctx context.Contex // Create a partially initialized instance _child := &_BACnetConstructedDataEventDetectionEnable{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, EventDetectionEnable: eventDetectionEnable, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataEventDetectionEnable) SerializeWithWriteBuffer(ct return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataEventDetectionEnable") } - // Simple Field (eventDetectionEnable) - if pushErr := writeBuffer.PushContext("eventDetectionEnable"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for eventDetectionEnable") - } - _eventDetectionEnableErr := writeBuffer.WriteSerializable(ctx, m.GetEventDetectionEnable()) - if popErr := writeBuffer.PopContext("eventDetectionEnable"); popErr != nil { - return errors.Wrap(popErr, "Error popping for eventDetectionEnable") - } - if _eventDetectionEnableErr != nil { - return errors.Wrap(_eventDetectionEnableErr, "Error serializing 'eventDetectionEnable' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (eventDetectionEnable) + if pushErr := writeBuffer.PushContext("eventDetectionEnable"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for eventDetectionEnable") + } + _eventDetectionEnableErr := writeBuffer.WriteSerializable(ctx, m.GetEventDetectionEnable()) + if popErr := writeBuffer.PopContext("eventDetectionEnable"); popErr != nil { + return errors.Wrap(popErr, "Error popping for eventDetectionEnable") + } + if _eventDetectionEnableErr != nil { + return errors.Wrap(_eventDetectionEnableErr, "Error serializing 'eventDetectionEnable' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataEventDetectionEnable"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataEventDetectionEnable") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataEventDetectionEnable) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataEventDetectionEnable) isBACnetConstructedDataEventDetectionEnable() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataEventDetectionEnable) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventEnable.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventEnable.go index e54b4942c20..346af7281f1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventEnable.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventEnable.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataEventEnable is the corresponding interface of BACnetConstructedDataEventEnable type BACnetConstructedDataEventEnable interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataEventEnableExactly interface { // _BACnetConstructedDataEventEnable is the data-structure of this message type _BACnetConstructedDataEventEnable struct { *_BACnetConstructedData - EventEnable BACnetEventTransitionBitsTagged + EventEnable BACnetEventTransitionBitsTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataEventEnable) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataEventEnable) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataEventEnable) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_EVENT_ENABLE -} +func (m *_BACnetConstructedDataEventEnable) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_EVENT_ENABLE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataEventEnable) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataEventEnable) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataEventEnable) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataEventEnable) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataEventEnable) GetActualValue() BACnetEventTransiti /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataEventEnable factory function for _BACnetConstructedDataEventEnable -func NewBACnetConstructedDataEventEnable(eventEnable BACnetEventTransitionBitsTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataEventEnable { +func NewBACnetConstructedDataEventEnable( eventEnable BACnetEventTransitionBitsTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataEventEnable { _result := &_BACnetConstructedDataEventEnable{ - EventEnable: eventEnable, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + EventEnable: eventEnable, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataEventEnable(eventEnable BACnetEventTransitionBitsTa // Deprecated: use the interface for direct cast func CastBACnetConstructedDataEventEnable(structType interface{}) BACnetConstructedDataEventEnable { - if casted, ok := structType.(BACnetConstructedDataEventEnable); ok { + if casted, ok := structType.(BACnetConstructedDataEventEnable); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataEventEnable); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataEventEnable) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataEventEnable) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataEventEnableParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("eventEnable"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for eventEnable") } - _eventEnable, _eventEnableErr := BACnetEventTransitionBitsTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_eventEnable, _eventEnableErr := BACnetEventTransitionBitsTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _eventEnableErr != nil { return nil, errors.Wrap(_eventEnableErr, "Error parsing 'eventEnable' field of BACnetConstructedDataEventEnable") } @@ -186,7 +188,7 @@ func BACnetConstructedDataEventEnableParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataEventEnable{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, EventEnable: eventEnable, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataEventEnable) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataEventEnable") } - // Simple Field (eventEnable) - if pushErr := writeBuffer.PushContext("eventEnable"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for eventEnable") - } - _eventEnableErr := writeBuffer.WriteSerializable(ctx, m.GetEventEnable()) - if popErr := writeBuffer.PopContext("eventEnable"); popErr != nil { - return errors.Wrap(popErr, "Error popping for eventEnable") - } - if _eventEnableErr != nil { - return errors.Wrap(_eventEnableErr, "Error serializing 'eventEnable' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (eventEnable) + if pushErr := writeBuffer.PushContext("eventEnable"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for eventEnable") + } + _eventEnableErr := writeBuffer.WriteSerializable(ctx, m.GetEventEnable()) + if popErr := writeBuffer.PopContext("eventEnable"); popErr != nil { + return errors.Wrap(popErr, "Error popping for eventEnable") + } + if _eventEnableErr != nil { + return errors.Wrap(_eventEnableErr, "Error serializing 'eventEnable' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataEventEnable"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataEventEnable") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataEventEnable) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataEventEnable) isBACnetConstructedDataEventEnable() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataEventEnable) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventEnrollmentAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventEnrollmentAll.go index 098dfea1863..e60815e4365 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventEnrollmentAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventEnrollmentAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataEventEnrollmentAll is the corresponding interface of BACnetConstructedDataEventEnrollmentAll type BACnetConstructedDataEventEnrollmentAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataEventEnrollmentAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataEventEnrollmentAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_EVENT_ENROLLMENT -} +func (m *_BACnetConstructedDataEventEnrollmentAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_EVENT_ENROLLMENT} -func (m *_BACnetConstructedDataEventEnrollmentAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataEventEnrollmentAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataEventEnrollmentAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataEventEnrollmentAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataEventEnrollmentAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataEventEnrollmentAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataEventEnrollmentAll factory function for _BACnetConstructedDataEventEnrollmentAll -func NewBACnetConstructedDataEventEnrollmentAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataEventEnrollmentAll { +func NewBACnetConstructedDataEventEnrollmentAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataEventEnrollmentAll { _result := &_BACnetConstructedDataEventEnrollmentAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataEventEnrollmentAll(openingTag BACnetOpeningTag, pee // Deprecated: use the interface for direct cast func CastBACnetConstructedDataEventEnrollmentAll(structType interface{}) BACnetConstructedDataEventEnrollmentAll { - if casted, ok := structType.(BACnetConstructedDataEventEnrollmentAll); ok { + if casted, ok := structType.(BACnetConstructedDataEventEnrollmentAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataEventEnrollmentAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataEventEnrollmentAll) GetLengthInBits(ctx context.C return lengthInBits } + func (m *_BACnetConstructedDataEventEnrollmentAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataEventEnrollmentAllParseWithBuffer(ctx context.Context, _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataEventEnrollmentAllParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataEventEnrollmentAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataEventEnrollmentAll) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataEventEnrollmentAll) isBACnetConstructedDataEventEnrollmentAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataEventEnrollmentAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventLogAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventLogAll.go index d85c7454cc3..9fa8c210c99 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventLogAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventLogAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataEventLogAll is the corresponding interface of BACnetConstructedDataEventLogAll type BACnetConstructedDataEventLogAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataEventLogAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataEventLogAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_EVENT_LOG -} +func (m *_BACnetConstructedDataEventLogAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_EVENT_LOG} -func (m *_BACnetConstructedDataEventLogAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataEventLogAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataEventLogAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataEventLogAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataEventLogAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataEventLogAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataEventLogAll factory function for _BACnetConstructedDataEventLogAll -func NewBACnetConstructedDataEventLogAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataEventLogAll { +func NewBACnetConstructedDataEventLogAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataEventLogAll { _result := &_BACnetConstructedDataEventLogAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataEventLogAll(openingTag BACnetOpeningTag, peekedTagH // Deprecated: use the interface for direct cast func CastBACnetConstructedDataEventLogAll(structType interface{}) BACnetConstructedDataEventLogAll { - if casted, ok := structType.(BACnetConstructedDataEventLogAll); ok { + if casted, ok := structType.(BACnetConstructedDataEventLogAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataEventLogAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataEventLogAll) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataEventLogAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataEventLogAllParseWithBuffer(ctx context.Context, readBu _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataEventLogAllParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataEventLogAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataEventLogAll) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataEventLogAll) isBACnetConstructedDataEventLogAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataEventLogAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventLogLogBuffer.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventLogLogBuffer.go index 6032c4fe436..e8beb989c5a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventLogLogBuffer.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventLogLogBuffer.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataEventLogLogBuffer is the corresponding interface of BACnetConstructedDataEventLogLogBuffer type BACnetConstructedDataEventLogLogBuffer interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataEventLogLogBufferExactly interface { // _BACnetConstructedDataEventLogLogBuffer is the data-structure of this message type _BACnetConstructedDataEventLogLogBuffer struct { *_BACnetConstructedData - FloorText []BACnetEventLogRecord + FloorText []BACnetEventLogRecord } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataEventLogLogBuffer) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_EVENT_LOG -} +func (m *_BACnetConstructedDataEventLogLogBuffer) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_EVENT_LOG} -func (m *_BACnetConstructedDataEventLogLogBuffer) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LOG_BUFFER -} +func (m *_BACnetConstructedDataEventLogLogBuffer) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LOG_BUFFER} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataEventLogLogBuffer) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataEventLogLogBuffer) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataEventLogLogBuffer) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataEventLogLogBuffer) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataEventLogLogBuffer) GetFloorText() []BACnetEventLo /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataEventLogLogBuffer factory function for _BACnetConstructedDataEventLogLogBuffer -func NewBACnetConstructedDataEventLogLogBuffer(floorText []BACnetEventLogRecord, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataEventLogLogBuffer { +func NewBACnetConstructedDataEventLogLogBuffer( floorText []BACnetEventLogRecord , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataEventLogLogBuffer { _result := &_BACnetConstructedDataEventLogLogBuffer{ - FloorText: floorText, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + FloorText: floorText, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataEventLogLogBuffer(floorText []BACnetEventLogRecord, // Deprecated: use the interface for direct cast func CastBACnetConstructedDataEventLogLogBuffer(structType interface{}) BACnetConstructedDataEventLogLogBuffer { - if casted, ok := structType.(BACnetConstructedDataEventLogLogBuffer); ok { + if casted, ok := structType.(BACnetConstructedDataEventLogLogBuffer); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataEventLogLogBuffer); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataEventLogLogBuffer) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetConstructedDataEventLogLogBuffer) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataEventLogLogBufferParseWithBuffer(ctx context.Context, // Terminated array var floorText []BACnetEventLogRecord { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetEventLogRecordParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetEventLogRecordParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'floorText' field of BACnetConstructedDataEventLogLogBuffer") } @@ -173,7 +175,7 @@ func BACnetConstructedDataEventLogLogBufferParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataEventLogLogBuffer{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FloorText: floorText, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataEventLogLogBuffer) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataEventLogLogBuffer") } - // Array Field (floorText) - if pushErr := writeBuffer.PushContext("floorText", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for floorText") - } - for _curItem, _element := range m.GetFloorText() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetFloorText()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'floorText' field") - } - } - if popErr := writeBuffer.PopContext("floorText", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for floorText") + // Array Field (floorText) + if pushErr := writeBuffer.PushContext("floorText", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for floorText") + } + for _curItem, _element := range m.GetFloorText() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetFloorText()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'floorText' field") } + } + if popErr := writeBuffer.PopContext("floorText", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for floorText") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataEventLogLogBuffer"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataEventLogLogBuffer") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataEventLogLogBuffer) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataEventLogLogBuffer) isBACnetConstructedDataEventLogLogBuffer() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataEventLogLogBuffer) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventMessageTexts.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventMessageTexts.go index a4c509fa13f..6ae57c8dfd9 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventMessageTexts.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventMessageTexts.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataEventMessageTexts is the corresponding interface of BACnetConstructedDataEventMessageTexts type BACnetConstructedDataEventMessageTexts interface { @@ -58,38 +60,36 @@ type BACnetConstructedDataEventMessageTextsExactly interface { // _BACnetConstructedDataEventMessageTexts is the data-structure of this message type _BACnetConstructedDataEventMessageTexts struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - EventMessageTexts []BACnetOptionalCharacterString + NumberOfDataElements BACnetApplicationTagUnsignedInteger + EventMessageTexts []BACnetOptionalCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataEventMessageTexts) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataEventMessageTexts) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataEventMessageTexts) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_EVENT_MESSAGE_TEXTS -} +func (m *_BACnetConstructedDataEventMessageTexts) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_EVENT_MESSAGE_TEXTS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataEventMessageTexts) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataEventMessageTexts) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataEventMessageTexts) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataEventMessageTexts) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -125,7 +125,7 @@ func (m *_BACnetConstructedDataEventMessageTexts) GetToOffnormalText() BACnetOpt _ = ctx numberOfDataElements := m.NumberOfDataElements _ = numberOfDataElements - return CastBACnetOptionalCharacterString(CastBACnetOptionalCharacterString(utils.InlineIf(bool((len(m.GetEventMessageTexts())) == (3)), func() interface{} { return CastBACnetOptionalCharacterString(m.GetEventMessageTexts()[0]) }, func() interface{} { return CastBACnetOptionalCharacterString(nil) }))) + return CastBACnetOptionalCharacterString(CastBACnetOptionalCharacterString(utils.InlineIf(bool(((len(m.GetEventMessageTexts()))) == ((3))), func() interface{} {return CastBACnetOptionalCharacterString(m.GetEventMessageTexts()[0])}, func() interface{} {return CastBACnetOptionalCharacterString(nil)}))) } func (m *_BACnetConstructedDataEventMessageTexts) GetToFaultText() BACnetOptionalCharacterString { @@ -133,7 +133,7 @@ func (m *_BACnetConstructedDataEventMessageTexts) GetToFaultText() BACnetOptiona _ = ctx numberOfDataElements := m.NumberOfDataElements _ = numberOfDataElements - return CastBACnetOptionalCharacterString(CastBACnetOptionalCharacterString(utils.InlineIf(bool((len(m.GetEventMessageTexts())) == (3)), func() interface{} { return CastBACnetOptionalCharacterString(m.GetEventMessageTexts()[1]) }, func() interface{} { return CastBACnetOptionalCharacterString(nil) }))) + return CastBACnetOptionalCharacterString(CastBACnetOptionalCharacterString(utils.InlineIf(bool(((len(m.GetEventMessageTexts()))) == ((3))), func() interface{} {return CastBACnetOptionalCharacterString(m.GetEventMessageTexts()[1])}, func() interface{} {return CastBACnetOptionalCharacterString(nil)}))) } func (m *_BACnetConstructedDataEventMessageTexts) GetToNormalText() BACnetOptionalCharacterString { @@ -141,7 +141,7 @@ func (m *_BACnetConstructedDataEventMessageTexts) GetToNormalText() BACnetOption _ = ctx numberOfDataElements := m.NumberOfDataElements _ = numberOfDataElements - return CastBACnetOptionalCharacterString(CastBACnetOptionalCharacterString(utils.InlineIf(bool((len(m.GetEventMessageTexts())) == (3)), func() interface{} { return CastBACnetOptionalCharacterString(m.GetEventMessageTexts()[2]) }, func() interface{} { return CastBACnetOptionalCharacterString(nil) }))) + return CastBACnetOptionalCharacterString(CastBACnetOptionalCharacterString(utils.InlineIf(bool(((len(m.GetEventMessageTexts()))) == ((3))), func() interface{} {return CastBACnetOptionalCharacterString(m.GetEventMessageTexts()[2])}, func() interface{} {return CastBACnetOptionalCharacterString(nil)}))) } /////////////////////// @@ -149,12 +149,13 @@ func (m *_BACnetConstructedDataEventMessageTexts) GetToNormalText() BACnetOption /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataEventMessageTexts factory function for _BACnetConstructedDataEventMessageTexts -func NewBACnetConstructedDataEventMessageTexts(numberOfDataElements BACnetApplicationTagUnsignedInteger, eventMessageTexts []BACnetOptionalCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataEventMessageTexts { +func NewBACnetConstructedDataEventMessageTexts( numberOfDataElements BACnetApplicationTagUnsignedInteger , eventMessageTexts []BACnetOptionalCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataEventMessageTexts { _result := &_BACnetConstructedDataEventMessageTexts{ - NumberOfDataElements: numberOfDataElements, - EventMessageTexts: eventMessageTexts, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + EventMessageTexts: eventMessageTexts, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -162,7 +163,7 @@ func NewBACnetConstructedDataEventMessageTexts(numberOfDataElements BACnetApplic // Deprecated: use the interface for direct cast func CastBACnetConstructedDataEventMessageTexts(structType interface{}) BACnetConstructedDataEventMessageTexts { - if casted, ok := structType.(BACnetConstructedDataEventMessageTexts); ok { + if casted, ok := structType.(BACnetConstructedDataEventMessageTexts); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataEventMessageTexts); ok { @@ -201,6 +202,7 @@ func (m *_BACnetConstructedDataEventMessageTexts) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetConstructedDataEventMessageTexts) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -230,7 +232,7 @@ func BACnetConstructedDataEventMessageTextsParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -252,8 +254,8 @@ func BACnetConstructedDataEventMessageTextsParseWithBuffer(ctx context.Context, // Terminated array var eventMessageTexts []BACnetOptionalCharacterString { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetOptionalCharacterStringParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetOptionalCharacterStringParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'eventMessageTexts' field of BACnetConstructedDataEventMessageTexts") } @@ -265,22 +267,22 @@ func BACnetConstructedDataEventMessageTextsParseWithBuffer(ctx context.Context, } // Virtual field - _toOffnormalText := CastBACnetOptionalCharacterString(utils.InlineIf(bool((len(eventMessageTexts)) == (3)), func() interface{} { return CastBACnetOptionalCharacterString(eventMessageTexts[0]) }, func() interface{} { return CastBACnetOptionalCharacterString(nil) })) + _toOffnormalText := CastBACnetOptionalCharacterString(utils.InlineIf(bool(((len(eventMessageTexts))) == ((3))), func() interface{} {return CastBACnetOptionalCharacterString(eventMessageTexts[0])}, func() interface{} {return CastBACnetOptionalCharacterString(nil)})) toOffnormalText := _toOffnormalText _ = toOffnormalText // Virtual field - _toFaultText := CastBACnetOptionalCharacterString(utils.InlineIf(bool((len(eventMessageTexts)) == (3)), func() interface{} { return CastBACnetOptionalCharacterString(eventMessageTexts[1]) }, func() interface{} { return CastBACnetOptionalCharacterString(nil) })) + _toFaultText := CastBACnetOptionalCharacterString(utils.InlineIf(bool(((len(eventMessageTexts))) == ((3))), func() interface{} {return CastBACnetOptionalCharacterString(eventMessageTexts[1])}, func() interface{} {return CastBACnetOptionalCharacterString(nil)})) toFaultText := _toFaultText _ = toFaultText // Virtual field - _toNormalText := CastBACnetOptionalCharacterString(utils.InlineIf(bool((len(eventMessageTexts)) == (3)), func() interface{} { return CastBACnetOptionalCharacterString(eventMessageTexts[2]) }, func() interface{} { return CastBACnetOptionalCharacterString(nil) })) + _toNormalText := CastBACnetOptionalCharacterString(utils.InlineIf(bool(((len(eventMessageTexts))) == ((3))), func() interface{} {return CastBACnetOptionalCharacterString(eventMessageTexts[2])}, func() interface{} {return CastBACnetOptionalCharacterString(nil)})) toNormalText := _toNormalText _ = toNormalText // Validation - if !(bool(bool((arrayIndexArgument) != (nil))) || bool(bool((len(eventMessageTexts)) == (3)))) { + if (!(bool(bool((arrayIndexArgument) != (nil))) || bool(bool(((len(eventMessageTexts))) == ((3)))))) { return nil, errors.WithStack(utils.ParseValidationError{"eventMessageTexts should have exactly 3 values"}) } @@ -291,11 +293,11 @@ func BACnetConstructedDataEventMessageTextsParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataEventMessageTexts{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - EventMessageTexts: eventMessageTexts, + EventMessageTexts: eventMessageTexts, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -316,55 +318,55 @@ func (m *_BACnetConstructedDataEventMessageTexts) SerializeWithWriteBuffer(ctx c if pushErr := writeBuffer.PushContext("BACnetConstructedDataEventMessageTexts"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataEventMessageTexts") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } - - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Array Field (eventMessageTexts) - if pushErr := writeBuffer.PushContext("eventMessageTexts", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for eventMessageTexts") - } - for _curItem, _element := range m.GetEventMessageTexts() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetEventMessageTexts()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'eventMessageTexts' field") - } - } - if popErr := writeBuffer.PopContext("eventMessageTexts", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for eventMessageTexts") + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - // Virtual field - if _toOffnormalTextErr := writeBuffer.WriteVirtual(ctx, "toOffnormalText", m.GetToOffnormalText()); _toOffnormalTextErr != nil { - return errors.Wrap(_toOffnormalTextErr, "Error serializing 'toOffnormalText' field") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - // Virtual field - if _toFaultTextErr := writeBuffer.WriteVirtual(ctx, "toFaultText", m.GetToFaultText()); _toFaultTextErr != nil { - return errors.Wrap(_toFaultTextErr, "Error serializing 'toFaultText' field") + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - // Virtual field - if _toNormalTextErr := writeBuffer.WriteVirtual(ctx, "toNormalText", m.GetToNormalText()); _toNormalTextErr != nil { - return errors.Wrap(_toNormalTextErr, "Error serializing 'toNormalText' field") + } + + // Array Field (eventMessageTexts) + if pushErr := writeBuffer.PushContext("eventMessageTexts", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for eventMessageTexts") + } + for _curItem, _element := range m.GetEventMessageTexts() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetEventMessageTexts()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'eventMessageTexts' field") } + } + if popErr := writeBuffer.PopContext("eventMessageTexts", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for eventMessageTexts") + } + // Virtual field + if _toOffnormalTextErr := writeBuffer.WriteVirtual(ctx, "toOffnormalText", m.GetToOffnormalText()); _toOffnormalTextErr != nil { + return errors.Wrap(_toOffnormalTextErr, "Error serializing 'toOffnormalText' field") + } + // Virtual field + if _toFaultTextErr := writeBuffer.WriteVirtual(ctx, "toFaultText", m.GetToFaultText()); _toFaultTextErr != nil { + return errors.Wrap(_toFaultTextErr, "Error serializing 'toFaultText' field") + } + // Virtual field + if _toNormalTextErr := writeBuffer.WriteVirtual(ctx, "toNormalText", m.GetToNormalText()); _toNormalTextErr != nil { + return errors.Wrap(_toNormalTextErr, "Error serializing 'toNormalText' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataEventMessageTexts"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataEventMessageTexts") @@ -374,6 +376,7 @@ func (m *_BACnetConstructedDataEventMessageTexts) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataEventMessageTexts) isBACnetConstructedDataEventMessageTexts() bool { return true } @@ -388,3 +391,6 @@ func (m *_BACnetConstructedDataEventMessageTexts) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventMessageTextsConfig.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventMessageTextsConfig.go index 6286d243b4e..0cf02dd1c7d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventMessageTextsConfig.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventMessageTextsConfig.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataEventMessageTextsConfig is the corresponding interface of BACnetConstructedDataEventMessageTextsConfig type BACnetConstructedDataEventMessageTextsConfig interface { @@ -58,38 +60,36 @@ type BACnetConstructedDataEventMessageTextsConfigExactly interface { // _BACnetConstructedDataEventMessageTextsConfig is the data-structure of this message type _BACnetConstructedDataEventMessageTextsConfig struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - EventMessageTextsConfig []BACnetOptionalCharacterString + NumberOfDataElements BACnetApplicationTagUnsignedInteger + EventMessageTextsConfig []BACnetOptionalCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataEventMessageTextsConfig) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataEventMessageTextsConfig) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataEventMessageTextsConfig) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_EVENT_MESSAGE_TEXTS_CONFIG -} +func (m *_BACnetConstructedDataEventMessageTextsConfig) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_EVENT_MESSAGE_TEXTS_CONFIG} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataEventMessageTextsConfig) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataEventMessageTextsConfig) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataEventMessageTextsConfig) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataEventMessageTextsConfig) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -125,7 +125,7 @@ func (m *_BACnetConstructedDataEventMessageTextsConfig) GetToOffnormalTextConfig _ = ctx numberOfDataElements := m.NumberOfDataElements _ = numberOfDataElements - return CastBACnetOptionalCharacterString(CastBACnetOptionalCharacterString(utils.InlineIf(bool((len(m.GetEventMessageTextsConfig())) == (3)), func() interface{} { return CastBACnetOptionalCharacterString(m.GetEventMessageTextsConfig()[0]) }, func() interface{} { return CastBACnetOptionalCharacterString(nil) }))) + return CastBACnetOptionalCharacterString(CastBACnetOptionalCharacterString(utils.InlineIf(bool(((len(m.GetEventMessageTextsConfig()))) == ((3))), func() interface{} {return CastBACnetOptionalCharacterString(m.GetEventMessageTextsConfig()[0])}, func() interface{} {return CastBACnetOptionalCharacterString(nil)}))) } func (m *_BACnetConstructedDataEventMessageTextsConfig) GetToFaultTextConfig() BACnetOptionalCharacterString { @@ -133,7 +133,7 @@ func (m *_BACnetConstructedDataEventMessageTextsConfig) GetToFaultTextConfig() B _ = ctx numberOfDataElements := m.NumberOfDataElements _ = numberOfDataElements - return CastBACnetOptionalCharacterString(CastBACnetOptionalCharacterString(utils.InlineIf(bool((len(m.GetEventMessageTextsConfig())) == (3)), func() interface{} { return CastBACnetOptionalCharacterString(m.GetEventMessageTextsConfig()[1]) }, func() interface{} { return CastBACnetOptionalCharacterString(nil) }))) + return CastBACnetOptionalCharacterString(CastBACnetOptionalCharacterString(utils.InlineIf(bool(((len(m.GetEventMessageTextsConfig()))) == ((3))), func() interface{} {return CastBACnetOptionalCharacterString(m.GetEventMessageTextsConfig()[1])}, func() interface{} {return CastBACnetOptionalCharacterString(nil)}))) } func (m *_BACnetConstructedDataEventMessageTextsConfig) GetToNormalTextConfig() BACnetOptionalCharacterString { @@ -141,7 +141,7 @@ func (m *_BACnetConstructedDataEventMessageTextsConfig) GetToNormalTextConfig() _ = ctx numberOfDataElements := m.NumberOfDataElements _ = numberOfDataElements - return CastBACnetOptionalCharacterString(CastBACnetOptionalCharacterString(utils.InlineIf(bool((len(m.GetEventMessageTextsConfig())) == (3)), func() interface{} { return CastBACnetOptionalCharacterString(m.GetEventMessageTextsConfig()[2]) }, func() interface{} { return CastBACnetOptionalCharacterString(nil) }))) + return CastBACnetOptionalCharacterString(CastBACnetOptionalCharacterString(utils.InlineIf(bool(((len(m.GetEventMessageTextsConfig()))) == ((3))), func() interface{} {return CastBACnetOptionalCharacterString(m.GetEventMessageTextsConfig()[2])}, func() interface{} {return CastBACnetOptionalCharacterString(nil)}))) } /////////////////////// @@ -149,12 +149,13 @@ func (m *_BACnetConstructedDataEventMessageTextsConfig) GetToNormalTextConfig() /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataEventMessageTextsConfig factory function for _BACnetConstructedDataEventMessageTextsConfig -func NewBACnetConstructedDataEventMessageTextsConfig(numberOfDataElements BACnetApplicationTagUnsignedInteger, eventMessageTextsConfig []BACnetOptionalCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataEventMessageTextsConfig { +func NewBACnetConstructedDataEventMessageTextsConfig( numberOfDataElements BACnetApplicationTagUnsignedInteger , eventMessageTextsConfig []BACnetOptionalCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataEventMessageTextsConfig { _result := &_BACnetConstructedDataEventMessageTextsConfig{ - NumberOfDataElements: numberOfDataElements, + NumberOfDataElements: numberOfDataElements, EventMessageTextsConfig: eventMessageTextsConfig, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -162,7 +163,7 @@ func NewBACnetConstructedDataEventMessageTextsConfig(numberOfDataElements BACnet // Deprecated: use the interface for direct cast func CastBACnetConstructedDataEventMessageTextsConfig(structType interface{}) BACnetConstructedDataEventMessageTextsConfig { - if casted, ok := structType.(BACnetConstructedDataEventMessageTextsConfig); ok { + if casted, ok := structType.(BACnetConstructedDataEventMessageTextsConfig); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataEventMessageTextsConfig); ok { @@ -201,6 +202,7 @@ func (m *_BACnetConstructedDataEventMessageTextsConfig) GetLengthInBits(ctx cont return lengthInBits } + func (m *_BACnetConstructedDataEventMessageTextsConfig) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -230,7 +232,7 @@ func BACnetConstructedDataEventMessageTextsConfigParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -252,8 +254,8 @@ func BACnetConstructedDataEventMessageTextsConfigParseWithBuffer(ctx context.Con // Terminated array var eventMessageTextsConfig []BACnetOptionalCharacterString { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetOptionalCharacterStringParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetOptionalCharacterStringParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'eventMessageTextsConfig' field of BACnetConstructedDataEventMessageTextsConfig") } @@ -265,22 +267,22 @@ func BACnetConstructedDataEventMessageTextsConfigParseWithBuffer(ctx context.Con } // Virtual field - _toOffnormalTextConfig := CastBACnetOptionalCharacterString(utils.InlineIf(bool((len(eventMessageTextsConfig)) == (3)), func() interface{} { return CastBACnetOptionalCharacterString(eventMessageTextsConfig[0]) }, func() interface{} { return CastBACnetOptionalCharacterString(nil) })) + _toOffnormalTextConfig := CastBACnetOptionalCharacterString(utils.InlineIf(bool(((len(eventMessageTextsConfig))) == ((3))), func() interface{} {return CastBACnetOptionalCharacterString(eventMessageTextsConfig[0])}, func() interface{} {return CastBACnetOptionalCharacterString(nil)})) toOffnormalTextConfig := _toOffnormalTextConfig _ = toOffnormalTextConfig // Virtual field - _toFaultTextConfig := CastBACnetOptionalCharacterString(utils.InlineIf(bool((len(eventMessageTextsConfig)) == (3)), func() interface{} { return CastBACnetOptionalCharacterString(eventMessageTextsConfig[1]) }, func() interface{} { return CastBACnetOptionalCharacterString(nil) })) + _toFaultTextConfig := CastBACnetOptionalCharacterString(utils.InlineIf(bool(((len(eventMessageTextsConfig))) == ((3))), func() interface{} {return CastBACnetOptionalCharacterString(eventMessageTextsConfig[1])}, func() interface{} {return CastBACnetOptionalCharacterString(nil)})) toFaultTextConfig := _toFaultTextConfig _ = toFaultTextConfig // Virtual field - _toNormalTextConfig := CastBACnetOptionalCharacterString(utils.InlineIf(bool((len(eventMessageTextsConfig)) == (3)), func() interface{} { return CastBACnetOptionalCharacterString(eventMessageTextsConfig[2]) }, func() interface{} { return CastBACnetOptionalCharacterString(nil) })) + _toNormalTextConfig := CastBACnetOptionalCharacterString(utils.InlineIf(bool(((len(eventMessageTextsConfig))) == ((3))), func() interface{} {return CastBACnetOptionalCharacterString(eventMessageTextsConfig[2])}, func() interface{} {return CastBACnetOptionalCharacterString(nil)})) toNormalTextConfig := _toNormalTextConfig _ = toNormalTextConfig // Validation - if !(bool(bool((arrayIndexArgument) != (nil))) || bool(bool((len(eventMessageTextsConfig)) == (3)))) { + if (!(bool(bool((arrayIndexArgument) != (nil))) || bool(bool(((len(eventMessageTextsConfig))) == ((3)))))) { return nil, errors.WithStack(utils.ParseValidationError{"eventMessageTextsConfig should have exactly 3 values"}) } @@ -291,10 +293,10 @@ func BACnetConstructedDataEventMessageTextsConfigParseWithBuffer(ctx context.Con // Create a partially initialized instance _child := &_BACnetConstructedDataEventMessageTextsConfig{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, - NumberOfDataElements: numberOfDataElements, + NumberOfDataElements: numberOfDataElements, EventMessageTextsConfig: eventMessageTextsConfig, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child @@ -316,55 +318,55 @@ func (m *_BACnetConstructedDataEventMessageTextsConfig) SerializeWithWriteBuffer if pushErr := writeBuffer.PushContext("BACnetConstructedDataEventMessageTextsConfig"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataEventMessageTextsConfig") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } - - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Array Field (eventMessageTextsConfig) - if pushErr := writeBuffer.PushContext("eventMessageTextsConfig", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for eventMessageTextsConfig") - } - for _curItem, _element := range m.GetEventMessageTextsConfig() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetEventMessageTextsConfig()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'eventMessageTextsConfig' field") - } - } - if popErr := writeBuffer.PopContext("eventMessageTextsConfig", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for eventMessageTextsConfig") + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - // Virtual field - if _toOffnormalTextConfigErr := writeBuffer.WriteVirtual(ctx, "toOffnormalTextConfig", m.GetToOffnormalTextConfig()); _toOffnormalTextConfigErr != nil { - return errors.Wrap(_toOffnormalTextConfigErr, "Error serializing 'toOffnormalTextConfig' field") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - // Virtual field - if _toFaultTextConfigErr := writeBuffer.WriteVirtual(ctx, "toFaultTextConfig", m.GetToFaultTextConfig()); _toFaultTextConfigErr != nil { - return errors.Wrap(_toFaultTextConfigErr, "Error serializing 'toFaultTextConfig' field") + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - // Virtual field - if _toNormalTextConfigErr := writeBuffer.WriteVirtual(ctx, "toNormalTextConfig", m.GetToNormalTextConfig()); _toNormalTextConfigErr != nil { - return errors.Wrap(_toNormalTextConfigErr, "Error serializing 'toNormalTextConfig' field") + } + + // Array Field (eventMessageTextsConfig) + if pushErr := writeBuffer.PushContext("eventMessageTextsConfig", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for eventMessageTextsConfig") + } + for _curItem, _element := range m.GetEventMessageTextsConfig() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetEventMessageTextsConfig()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'eventMessageTextsConfig' field") } + } + if popErr := writeBuffer.PopContext("eventMessageTextsConfig", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for eventMessageTextsConfig") + } + // Virtual field + if _toOffnormalTextConfigErr := writeBuffer.WriteVirtual(ctx, "toOffnormalTextConfig", m.GetToOffnormalTextConfig()); _toOffnormalTextConfigErr != nil { + return errors.Wrap(_toOffnormalTextConfigErr, "Error serializing 'toOffnormalTextConfig' field") + } + // Virtual field + if _toFaultTextConfigErr := writeBuffer.WriteVirtual(ctx, "toFaultTextConfig", m.GetToFaultTextConfig()); _toFaultTextConfigErr != nil { + return errors.Wrap(_toFaultTextConfigErr, "Error serializing 'toFaultTextConfig' field") + } + // Virtual field + if _toNormalTextConfigErr := writeBuffer.WriteVirtual(ctx, "toNormalTextConfig", m.GetToNormalTextConfig()); _toNormalTextConfigErr != nil { + return errors.Wrap(_toNormalTextConfigErr, "Error serializing 'toNormalTextConfig' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataEventMessageTextsConfig"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataEventMessageTextsConfig") @@ -374,6 +376,7 @@ func (m *_BACnetConstructedDataEventMessageTextsConfig) SerializeWithWriteBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataEventMessageTextsConfig) isBACnetConstructedDataEventMessageTextsConfig() bool { return true } @@ -388,3 +391,6 @@ func (m *_BACnetConstructedDataEventMessageTextsConfig) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventParameters.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventParameters.go index 5fc807df1ad..1dfb0213aaa 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventParameters.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventParameters.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataEventParameters is the corresponding interface of BACnetConstructedDataEventParameters type BACnetConstructedDataEventParameters interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataEventParametersExactly interface { // _BACnetConstructedDataEventParameters is the data-structure of this message type _BACnetConstructedDataEventParameters struct { *_BACnetConstructedData - EventParameter BACnetEventParameter + EventParameter BACnetEventParameter } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataEventParameters) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataEventParameters) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataEventParameters) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_EVENT_PARAMETERS -} +func (m *_BACnetConstructedDataEventParameters) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_EVENT_PARAMETERS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataEventParameters) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataEventParameters) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataEventParameters) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataEventParameters) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataEventParameters) GetActualValue() BACnetEventPara /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataEventParameters factory function for _BACnetConstructedDataEventParameters -func NewBACnetConstructedDataEventParameters(eventParameter BACnetEventParameter, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataEventParameters { +func NewBACnetConstructedDataEventParameters( eventParameter BACnetEventParameter , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataEventParameters { _result := &_BACnetConstructedDataEventParameters{ - EventParameter: eventParameter, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + EventParameter: eventParameter, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataEventParameters(eventParameter BACnetEventParameter // Deprecated: use the interface for direct cast func CastBACnetConstructedDataEventParameters(structType interface{}) BACnetConstructedDataEventParameters { - if casted, ok := structType.(BACnetConstructedDataEventParameters); ok { + if casted, ok := structType.(BACnetConstructedDataEventParameters); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataEventParameters); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataEventParameters) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetConstructedDataEventParameters) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataEventParametersParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("eventParameter"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for eventParameter") } - _eventParameter, _eventParameterErr := BACnetEventParameterParseWithBuffer(ctx, readBuffer) +_eventParameter, _eventParameterErr := BACnetEventParameterParseWithBuffer(ctx, readBuffer) if _eventParameterErr != nil { return nil, errors.Wrap(_eventParameterErr, "Error parsing 'eventParameter' field of BACnetConstructedDataEventParameters") } @@ -186,7 +188,7 @@ func BACnetConstructedDataEventParametersParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetConstructedDataEventParameters{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, EventParameter: eventParameter, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataEventParameters) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataEventParameters") } - // Simple Field (eventParameter) - if pushErr := writeBuffer.PushContext("eventParameter"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for eventParameter") - } - _eventParameterErr := writeBuffer.WriteSerializable(ctx, m.GetEventParameter()) - if popErr := writeBuffer.PopContext("eventParameter"); popErr != nil { - return errors.Wrap(popErr, "Error popping for eventParameter") - } - if _eventParameterErr != nil { - return errors.Wrap(_eventParameterErr, "Error serializing 'eventParameter' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (eventParameter) + if pushErr := writeBuffer.PushContext("eventParameter"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for eventParameter") + } + _eventParameterErr := writeBuffer.WriteSerializable(ctx, m.GetEventParameter()) + if popErr := writeBuffer.PopContext("eventParameter"); popErr != nil { + return errors.Wrap(popErr, "Error popping for eventParameter") + } + if _eventParameterErr != nil { + return errors.Wrap(_eventParameterErr, "Error serializing 'eventParameter' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataEventParameters"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataEventParameters") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataEventParameters) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataEventParameters) isBACnetConstructedDataEventParameters() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataEventParameters) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventState.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventState.go index cf8a99cbb5b..27ebf2b5225 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventState.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventState.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataEventState is the corresponding interface of BACnetConstructedDataEventState type BACnetConstructedDataEventState interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataEventStateExactly interface { // _BACnetConstructedDataEventState is the data-structure of this message type _BACnetConstructedDataEventState struct { *_BACnetConstructedData - EventState BACnetEventStateTagged + EventState BACnetEventStateTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataEventState) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataEventState) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataEventState) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_EVENT_STATE -} +func (m *_BACnetConstructedDataEventState) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_EVENT_STATE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataEventState) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataEventState) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataEventState) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataEventState) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataEventState) GetActualValue() BACnetEventStateTagg /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataEventState factory function for _BACnetConstructedDataEventState -func NewBACnetConstructedDataEventState(eventState BACnetEventStateTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataEventState { +func NewBACnetConstructedDataEventState( eventState BACnetEventStateTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataEventState { _result := &_BACnetConstructedDataEventState{ - EventState: eventState, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + EventState: eventState, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataEventState(eventState BACnetEventStateTagged, openi // Deprecated: use the interface for direct cast func CastBACnetConstructedDataEventState(structType interface{}) BACnetConstructedDataEventState { - if casted, ok := structType.(BACnetConstructedDataEventState); ok { + if casted, ok := structType.(BACnetConstructedDataEventState); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataEventState); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataEventState) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataEventState) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataEventStateParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("eventState"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for eventState") } - _eventState, _eventStateErr := BACnetEventStateTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_eventState, _eventStateErr := BACnetEventStateTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _eventStateErr != nil { return nil, errors.Wrap(_eventStateErr, "Error parsing 'eventState' field of BACnetConstructedDataEventState") } @@ -186,7 +188,7 @@ func BACnetConstructedDataEventStateParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetConstructedDataEventState{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, EventState: eventState, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataEventState) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataEventState") } - // Simple Field (eventState) - if pushErr := writeBuffer.PushContext("eventState"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for eventState") - } - _eventStateErr := writeBuffer.WriteSerializable(ctx, m.GetEventState()) - if popErr := writeBuffer.PopContext("eventState"); popErr != nil { - return errors.Wrap(popErr, "Error popping for eventState") - } - if _eventStateErr != nil { - return errors.Wrap(_eventStateErr, "Error serializing 'eventState' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (eventState) + if pushErr := writeBuffer.PushContext("eventState"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for eventState") + } + _eventStateErr := writeBuffer.WriteSerializable(ctx, m.GetEventState()) + if popErr := writeBuffer.PopContext("eventState"); popErr != nil { + return errors.Wrap(popErr, "Error popping for eventState") + } + if _eventStateErr != nil { + return errors.Wrap(_eventStateErr, "Error serializing 'eventState' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataEventState"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataEventState") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataEventState) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataEventState) isBACnetConstructedDataEventState() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataEventState) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventTimeStamps.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventTimeStamps.go index 37abd57b8f1..6d24449bbcd 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventTimeStamps.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventTimeStamps.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataEventTimeStamps is the corresponding interface of BACnetConstructedDataEventTimeStamps type BACnetConstructedDataEventTimeStamps interface { @@ -58,38 +60,36 @@ type BACnetConstructedDataEventTimeStampsExactly interface { // _BACnetConstructedDataEventTimeStamps is the data-structure of this message type _BACnetConstructedDataEventTimeStamps struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - EventTimeStamps []BACnetTimeStamp + NumberOfDataElements BACnetApplicationTagUnsignedInteger + EventTimeStamps []BACnetTimeStamp } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataEventTimeStamps) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataEventTimeStamps) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataEventTimeStamps) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_EVENT_TIME_STAMPS -} +func (m *_BACnetConstructedDataEventTimeStamps) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_EVENT_TIME_STAMPS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataEventTimeStamps) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataEventTimeStamps) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataEventTimeStamps) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataEventTimeStamps) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -125,7 +125,7 @@ func (m *_BACnetConstructedDataEventTimeStamps) GetToOffnormal() BACnetTimeStamp _ = ctx numberOfDataElements := m.NumberOfDataElements _ = numberOfDataElements - return CastBACnetTimeStamp(CastBACnetTimeStamp(utils.InlineIf(bool((len(m.GetEventTimeStamps())) == (3)), func() interface{} { return CastBACnetTimeStamp(m.GetEventTimeStamps()[0]) }, func() interface{} { return CastBACnetTimeStamp(nil) }))) + return CastBACnetTimeStamp(CastBACnetTimeStamp(utils.InlineIf(bool(((len(m.GetEventTimeStamps()))) == ((3))), func() interface{} {return CastBACnetTimeStamp(m.GetEventTimeStamps()[0])}, func() interface{} {return CastBACnetTimeStamp(nil)}))) } func (m *_BACnetConstructedDataEventTimeStamps) GetToFault() BACnetTimeStamp { @@ -133,7 +133,7 @@ func (m *_BACnetConstructedDataEventTimeStamps) GetToFault() BACnetTimeStamp { _ = ctx numberOfDataElements := m.NumberOfDataElements _ = numberOfDataElements - return CastBACnetTimeStamp(CastBACnetTimeStamp(utils.InlineIf(bool((len(m.GetEventTimeStamps())) == (3)), func() interface{} { return CastBACnetTimeStamp(m.GetEventTimeStamps()[1]) }, func() interface{} { return CastBACnetTimeStamp(nil) }))) + return CastBACnetTimeStamp(CastBACnetTimeStamp(utils.InlineIf(bool(((len(m.GetEventTimeStamps()))) == ((3))), func() interface{} {return CastBACnetTimeStamp(m.GetEventTimeStamps()[1])}, func() interface{} {return CastBACnetTimeStamp(nil)}))) } func (m *_BACnetConstructedDataEventTimeStamps) GetToNormal() BACnetTimeStamp { @@ -141,7 +141,7 @@ func (m *_BACnetConstructedDataEventTimeStamps) GetToNormal() BACnetTimeStamp { _ = ctx numberOfDataElements := m.NumberOfDataElements _ = numberOfDataElements - return CastBACnetTimeStamp(CastBACnetTimeStamp(utils.InlineIf(bool((len(m.GetEventTimeStamps())) == (3)), func() interface{} { return CastBACnetTimeStamp(m.GetEventTimeStamps()[2]) }, func() interface{} { return CastBACnetTimeStamp(nil) }))) + return CastBACnetTimeStamp(CastBACnetTimeStamp(utils.InlineIf(bool(((len(m.GetEventTimeStamps()))) == ((3))), func() interface{} {return CastBACnetTimeStamp(m.GetEventTimeStamps()[2])}, func() interface{} {return CastBACnetTimeStamp(nil)}))) } /////////////////////// @@ -149,12 +149,13 @@ func (m *_BACnetConstructedDataEventTimeStamps) GetToNormal() BACnetTimeStamp { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataEventTimeStamps factory function for _BACnetConstructedDataEventTimeStamps -func NewBACnetConstructedDataEventTimeStamps(numberOfDataElements BACnetApplicationTagUnsignedInteger, eventTimeStamps []BACnetTimeStamp, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataEventTimeStamps { +func NewBACnetConstructedDataEventTimeStamps( numberOfDataElements BACnetApplicationTagUnsignedInteger , eventTimeStamps []BACnetTimeStamp , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataEventTimeStamps { _result := &_BACnetConstructedDataEventTimeStamps{ - NumberOfDataElements: numberOfDataElements, - EventTimeStamps: eventTimeStamps, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + EventTimeStamps: eventTimeStamps, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -162,7 +163,7 @@ func NewBACnetConstructedDataEventTimeStamps(numberOfDataElements BACnetApplicat // Deprecated: use the interface for direct cast func CastBACnetConstructedDataEventTimeStamps(structType interface{}) BACnetConstructedDataEventTimeStamps { - if casted, ok := structType.(BACnetConstructedDataEventTimeStamps); ok { + if casted, ok := structType.(BACnetConstructedDataEventTimeStamps); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataEventTimeStamps); ok { @@ -201,6 +202,7 @@ func (m *_BACnetConstructedDataEventTimeStamps) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetConstructedDataEventTimeStamps) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -230,7 +232,7 @@ func BACnetConstructedDataEventTimeStampsParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -252,8 +254,8 @@ func BACnetConstructedDataEventTimeStampsParseWithBuffer(ctx context.Context, re // Terminated array var eventTimeStamps []BACnetTimeStamp { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetTimeStampParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetTimeStampParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'eventTimeStamps' field of BACnetConstructedDataEventTimeStamps") } @@ -265,22 +267,22 @@ func BACnetConstructedDataEventTimeStampsParseWithBuffer(ctx context.Context, re } // Virtual field - _toOffnormal := CastBACnetTimeStamp(utils.InlineIf(bool((len(eventTimeStamps)) == (3)), func() interface{} { return CastBACnetTimeStamp(eventTimeStamps[0]) }, func() interface{} { return CastBACnetTimeStamp(nil) })) + _toOffnormal := CastBACnetTimeStamp(utils.InlineIf(bool(((len(eventTimeStamps))) == ((3))), func() interface{} {return CastBACnetTimeStamp(eventTimeStamps[0])}, func() interface{} {return CastBACnetTimeStamp(nil)})) toOffnormal := _toOffnormal _ = toOffnormal // Virtual field - _toFault := CastBACnetTimeStamp(utils.InlineIf(bool((len(eventTimeStamps)) == (3)), func() interface{} { return CastBACnetTimeStamp(eventTimeStamps[1]) }, func() interface{} { return CastBACnetTimeStamp(nil) })) + _toFault := CastBACnetTimeStamp(utils.InlineIf(bool(((len(eventTimeStamps))) == ((3))), func() interface{} {return CastBACnetTimeStamp(eventTimeStamps[1])}, func() interface{} {return CastBACnetTimeStamp(nil)})) toFault := _toFault _ = toFault // Virtual field - _toNormal := CastBACnetTimeStamp(utils.InlineIf(bool((len(eventTimeStamps)) == (3)), func() interface{} { return CastBACnetTimeStamp(eventTimeStamps[2]) }, func() interface{} { return CastBACnetTimeStamp(nil) })) + _toNormal := CastBACnetTimeStamp(utils.InlineIf(bool(((len(eventTimeStamps))) == ((3))), func() interface{} {return CastBACnetTimeStamp(eventTimeStamps[2])}, func() interface{} {return CastBACnetTimeStamp(nil)})) toNormal := _toNormal _ = toNormal // Validation - if !(bool(bool((arrayIndexArgument) != (nil))) || bool(bool((len(eventTimeStamps)) == (3)))) { + if (!(bool(bool((arrayIndexArgument) != (nil))) || bool(bool(((len(eventTimeStamps))) == ((3)))))) { return nil, errors.WithStack(utils.ParseValidationError{"eventTimeStamps should have exactly 3 values"}) } @@ -291,11 +293,11 @@ func BACnetConstructedDataEventTimeStampsParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetConstructedDataEventTimeStamps{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - EventTimeStamps: eventTimeStamps, + EventTimeStamps: eventTimeStamps, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -316,55 +318,55 @@ func (m *_BACnetConstructedDataEventTimeStamps) SerializeWithWriteBuffer(ctx con if pushErr := writeBuffer.PushContext("BACnetConstructedDataEventTimeStamps"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataEventTimeStamps") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } - - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Array Field (eventTimeStamps) - if pushErr := writeBuffer.PushContext("eventTimeStamps", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for eventTimeStamps") - } - for _curItem, _element := range m.GetEventTimeStamps() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetEventTimeStamps()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'eventTimeStamps' field") - } - } - if popErr := writeBuffer.PopContext("eventTimeStamps", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for eventTimeStamps") + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - // Virtual field - if _toOffnormalErr := writeBuffer.WriteVirtual(ctx, "toOffnormal", m.GetToOffnormal()); _toOffnormalErr != nil { - return errors.Wrap(_toOffnormalErr, "Error serializing 'toOffnormal' field") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - // Virtual field - if _toFaultErr := writeBuffer.WriteVirtual(ctx, "toFault", m.GetToFault()); _toFaultErr != nil { - return errors.Wrap(_toFaultErr, "Error serializing 'toFault' field") + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - // Virtual field - if _toNormalErr := writeBuffer.WriteVirtual(ctx, "toNormal", m.GetToNormal()); _toNormalErr != nil { - return errors.Wrap(_toNormalErr, "Error serializing 'toNormal' field") + } + + // Array Field (eventTimeStamps) + if pushErr := writeBuffer.PushContext("eventTimeStamps", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for eventTimeStamps") + } + for _curItem, _element := range m.GetEventTimeStamps() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetEventTimeStamps()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'eventTimeStamps' field") } + } + if popErr := writeBuffer.PopContext("eventTimeStamps", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for eventTimeStamps") + } + // Virtual field + if _toOffnormalErr := writeBuffer.WriteVirtual(ctx, "toOffnormal", m.GetToOffnormal()); _toOffnormalErr != nil { + return errors.Wrap(_toOffnormalErr, "Error serializing 'toOffnormal' field") + } + // Virtual field + if _toFaultErr := writeBuffer.WriteVirtual(ctx, "toFault", m.GetToFault()); _toFaultErr != nil { + return errors.Wrap(_toFaultErr, "Error serializing 'toFault' field") + } + // Virtual field + if _toNormalErr := writeBuffer.WriteVirtual(ctx, "toNormal", m.GetToNormal()); _toNormalErr != nil { + return errors.Wrap(_toNormalErr, "Error serializing 'toNormal' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataEventTimeStamps"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataEventTimeStamps") @@ -374,6 +376,7 @@ func (m *_BACnetConstructedDataEventTimeStamps) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataEventTimeStamps) isBACnetConstructedDataEventTimeStamps() bool { return true } @@ -388,3 +391,6 @@ func (m *_BACnetConstructedDataEventTimeStamps) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventType.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventType.go index f2c42834982..3c021025e73 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventType.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataEventType.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataEventType is the corresponding interface of BACnetConstructedDataEventType type BACnetConstructedDataEventType interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataEventTypeExactly interface { // _BACnetConstructedDataEventType is the data-structure of this message type _BACnetConstructedDataEventType struct { *_BACnetConstructedData - EventType BACnetEventTypeTagged + EventType BACnetEventTypeTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataEventType) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataEventType) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataEventType) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_EVENT_TYPE -} +func (m *_BACnetConstructedDataEventType) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_EVENT_TYPE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataEventType) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataEventType) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataEventType) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataEventType) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataEventType) GetActualValue() BACnetEventTypeTagged /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataEventType factory function for _BACnetConstructedDataEventType -func NewBACnetConstructedDataEventType(eventType BACnetEventTypeTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataEventType { +func NewBACnetConstructedDataEventType( eventType BACnetEventTypeTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataEventType { _result := &_BACnetConstructedDataEventType{ - EventType: eventType, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + EventType: eventType, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataEventType(eventType BACnetEventTypeTagged, openingT // Deprecated: use the interface for direct cast func CastBACnetConstructedDataEventType(structType interface{}) BACnetConstructedDataEventType { - if casted, ok := structType.(BACnetConstructedDataEventType); ok { + if casted, ok := structType.(BACnetConstructedDataEventType); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataEventType); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataEventType) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetConstructedDataEventType) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataEventTypeParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("eventType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for eventType") } - _eventType, _eventTypeErr := BACnetEventTypeTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_eventType, _eventTypeErr := BACnetEventTypeTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _eventTypeErr != nil { return nil, errors.Wrap(_eventTypeErr, "Error parsing 'eventType' field of BACnetConstructedDataEventType") } @@ -186,7 +188,7 @@ func BACnetConstructedDataEventTypeParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_BACnetConstructedDataEventType{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, EventType: eventType, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataEventType) SerializeWithWriteBuffer(ctx context.C return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataEventType") } - // Simple Field (eventType) - if pushErr := writeBuffer.PushContext("eventType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for eventType") - } - _eventTypeErr := writeBuffer.WriteSerializable(ctx, m.GetEventType()) - if popErr := writeBuffer.PopContext("eventType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for eventType") - } - if _eventTypeErr != nil { - return errors.Wrap(_eventTypeErr, "Error serializing 'eventType' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (eventType) + if pushErr := writeBuffer.PushContext("eventType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for eventType") + } + _eventTypeErr := writeBuffer.WriteSerializable(ctx, m.GetEventType()) + if popErr := writeBuffer.PopContext("eventType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for eventType") + } + if _eventTypeErr != nil { + return errors.Wrap(_eventTypeErr, "Error serializing 'eventType' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataEventType"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataEventType") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataEventType) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataEventType) isBACnetConstructedDataEventType() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataEventType) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataExceptionSchedule.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataExceptionSchedule.go index 75d2dc9ccb1..c4e530bd68a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataExceptionSchedule.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataExceptionSchedule.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataExceptionSchedule is the corresponding interface of BACnetConstructedDataExceptionSchedule type BACnetConstructedDataExceptionSchedule interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataExceptionScheduleExactly interface { // _BACnetConstructedDataExceptionSchedule is the data-structure of this message type _BACnetConstructedDataExceptionSchedule struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - ExceptionSchedule []BACnetSpecialEvent + NumberOfDataElements BACnetApplicationTagUnsignedInteger + ExceptionSchedule []BACnetSpecialEvent } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataExceptionSchedule) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataExceptionSchedule) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataExceptionSchedule) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_EXCEPTION_SCHEDULE -} +func (m *_BACnetConstructedDataExceptionSchedule) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_EXCEPTION_SCHEDULE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataExceptionSchedule) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataExceptionSchedule) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataExceptionSchedule) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataExceptionSchedule) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataExceptionSchedule) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataExceptionSchedule factory function for _BACnetConstructedDataExceptionSchedule -func NewBACnetConstructedDataExceptionSchedule(numberOfDataElements BACnetApplicationTagUnsignedInteger, exceptionSchedule []BACnetSpecialEvent, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataExceptionSchedule { +func NewBACnetConstructedDataExceptionSchedule( numberOfDataElements BACnetApplicationTagUnsignedInteger , exceptionSchedule []BACnetSpecialEvent , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataExceptionSchedule { _result := &_BACnetConstructedDataExceptionSchedule{ - NumberOfDataElements: numberOfDataElements, - ExceptionSchedule: exceptionSchedule, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + ExceptionSchedule: exceptionSchedule, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataExceptionSchedule(numberOfDataElements BACnetApplic // Deprecated: use the interface for direct cast func CastBACnetConstructedDataExceptionSchedule(structType interface{}) BACnetConstructedDataExceptionSchedule { - if casted, ok := structType.(BACnetConstructedDataExceptionSchedule); ok { + if casted, ok := structType.(BACnetConstructedDataExceptionSchedule); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataExceptionSchedule); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataExceptionSchedule) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetConstructedDataExceptionSchedule) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataExceptionScheduleParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataExceptionScheduleParseWithBuffer(ctx context.Context, // Terminated array var exceptionSchedule []BACnetSpecialEvent { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetSpecialEventParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetSpecialEventParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'exceptionSchedule' field of BACnetConstructedDataExceptionSchedule") } @@ -235,11 +237,11 @@ func BACnetConstructedDataExceptionScheduleParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataExceptionSchedule{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - ExceptionSchedule: exceptionSchedule, + ExceptionSchedule: exceptionSchedule, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataExceptionSchedule) SerializeWithWriteBuffer(ctx c if pushErr := writeBuffer.PushContext("BACnetConstructedDataExceptionSchedule"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataExceptionSchedule") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (exceptionSchedule) - if pushErr := writeBuffer.PushContext("exceptionSchedule", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for exceptionSchedule") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetExceptionSchedule() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetExceptionSchedule()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'exceptionSchedule' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("exceptionSchedule", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for exceptionSchedule") + } + + // Array Field (exceptionSchedule) + if pushErr := writeBuffer.PushContext("exceptionSchedule", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for exceptionSchedule") + } + for _curItem, _element := range m.GetExceptionSchedule() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetExceptionSchedule()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'exceptionSchedule' field") } + } + if popErr := writeBuffer.PopContext("exceptionSchedule", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for exceptionSchedule") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataExceptionSchedule"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataExceptionSchedule") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataExceptionSchedule) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataExceptionSchedule) isBACnetConstructedDataExceptionSchedule() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataExceptionSchedule) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataExecutionDelay.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataExecutionDelay.go index af2940c0d92..30f47a4ea0e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataExecutionDelay.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataExecutionDelay.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataExecutionDelay is the corresponding interface of BACnetConstructedDataExecutionDelay type BACnetConstructedDataExecutionDelay interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataExecutionDelayExactly interface { // _BACnetConstructedDataExecutionDelay is the data-structure of this message type _BACnetConstructedDataExecutionDelay struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - ExecutionDelay []BACnetApplicationTagUnsignedInteger + NumberOfDataElements BACnetApplicationTagUnsignedInteger + ExecutionDelay []BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataExecutionDelay) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataExecutionDelay) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataExecutionDelay) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_EXECUTION_DELAY -} +func (m *_BACnetConstructedDataExecutionDelay) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_EXECUTION_DELAY} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataExecutionDelay) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataExecutionDelay) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataExecutionDelay) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataExecutionDelay) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataExecutionDelay) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataExecutionDelay factory function for _BACnetConstructedDataExecutionDelay -func NewBACnetConstructedDataExecutionDelay(numberOfDataElements BACnetApplicationTagUnsignedInteger, executionDelay []BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataExecutionDelay { +func NewBACnetConstructedDataExecutionDelay( numberOfDataElements BACnetApplicationTagUnsignedInteger , executionDelay []BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataExecutionDelay { _result := &_BACnetConstructedDataExecutionDelay{ - NumberOfDataElements: numberOfDataElements, - ExecutionDelay: executionDelay, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + ExecutionDelay: executionDelay, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataExecutionDelay(numberOfDataElements BACnetApplicati // Deprecated: use the interface for direct cast func CastBACnetConstructedDataExecutionDelay(structType interface{}) BACnetConstructedDataExecutionDelay { - if casted, ok := structType.(BACnetConstructedDataExecutionDelay); ok { + if casted, ok := structType.(BACnetConstructedDataExecutionDelay); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataExecutionDelay); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataExecutionDelay) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConstructedDataExecutionDelay) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataExecutionDelayParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataExecutionDelayParseWithBuffer(ctx context.Context, rea // Terminated array var executionDelay []BACnetApplicationTagUnsignedInteger { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'executionDelay' field of BACnetConstructedDataExecutionDelay") } @@ -235,11 +237,11 @@ func BACnetConstructedDataExecutionDelayParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetConstructedDataExecutionDelay{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - ExecutionDelay: executionDelay, + ExecutionDelay: executionDelay, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataExecutionDelay) SerializeWithWriteBuffer(ctx cont if pushErr := writeBuffer.PushContext("BACnetConstructedDataExecutionDelay"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataExecutionDelay") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (executionDelay) - if pushErr := writeBuffer.PushContext("executionDelay", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for executionDelay") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetExecutionDelay() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetExecutionDelay()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'executionDelay' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("executionDelay", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for executionDelay") + } + + // Array Field (executionDelay) + if pushErr := writeBuffer.PushContext("executionDelay", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for executionDelay") + } + for _curItem, _element := range m.GetExecutionDelay() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetExecutionDelay()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'executionDelay' field") } + } + if popErr := writeBuffer.PopContext("executionDelay", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for executionDelay") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataExecutionDelay"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataExecutionDelay") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataExecutionDelay) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataExecutionDelay) isBACnetConstructedDataExecutionDelay() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataExecutionDelay) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataExitPoints.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataExitPoints.go index c2c03068bd2..24470e44fee 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataExitPoints.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataExitPoints.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataExitPoints is the corresponding interface of BACnetConstructedDataExitPoints type BACnetConstructedDataExitPoints interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataExitPointsExactly interface { // _BACnetConstructedDataExitPoints is the data-structure of this message type _BACnetConstructedDataExitPoints struct { *_BACnetConstructedData - ExitPoints []BACnetDeviceObjectReference + ExitPoints []BACnetDeviceObjectReference } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataExitPoints) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataExitPoints) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataExitPoints) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_EXIT_POINTS -} +func (m *_BACnetConstructedDataExitPoints) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_EXIT_POINTS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataExitPoints) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataExitPoints) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataExitPoints) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataExitPoints) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataExitPoints) GetExitPoints() []BACnetDeviceObjectR /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataExitPoints factory function for _BACnetConstructedDataExitPoints -func NewBACnetConstructedDataExitPoints(exitPoints []BACnetDeviceObjectReference, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataExitPoints { +func NewBACnetConstructedDataExitPoints( exitPoints []BACnetDeviceObjectReference , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataExitPoints { _result := &_BACnetConstructedDataExitPoints{ - ExitPoints: exitPoints, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ExitPoints: exitPoints, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataExitPoints(exitPoints []BACnetDeviceObjectReference // Deprecated: use the interface for direct cast func CastBACnetConstructedDataExitPoints(structType interface{}) BACnetConstructedDataExitPoints { - if casted, ok := structType.(BACnetConstructedDataExitPoints); ok { + if casted, ok := structType.(BACnetConstructedDataExitPoints); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataExitPoints); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataExitPoints) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataExitPoints) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataExitPointsParseWithBuffer(ctx context.Context, readBuf // Terminated array var exitPoints []BACnetDeviceObjectReference { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'exitPoints' field of BACnetConstructedDataExitPoints") } @@ -173,7 +175,7 @@ func BACnetConstructedDataExitPointsParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetConstructedDataExitPoints{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ExitPoints: exitPoints, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataExitPoints) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataExitPoints") } - // Array Field (exitPoints) - if pushErr := writeBuffer.PushContext("exitPoints", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for exitPoints") - } - for _curItem, _element := range m.GetExitPoints() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetExitPoints()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'exitPoints' field") - } - } - if popErr := writeBuffer.PopContext("exitPoints", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for exitPoints") + // Array Field (exitPoints) + if pushErr := writeBuffer.PushContext("exitPoints", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for exitPoints") + } + for _curItem, _element := range m.GetExitPoints() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetExitPoints()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'exitPoints' field") } + } + if popErr := writeBuffer.PopContext("exitPoints", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for exitPoints") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataExitPoints"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataExitPoints") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataExitPoints) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataExitPoints) isBACnetConstructedDataExitPoints() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataExitPoints) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataExpectedShedLevel.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataExpectedShedLevel.go index c0e0262b440..fd0306ac011 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataExpectedShedLevel.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataExpectedShedLevel.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataExpectedShedLevel is the corresponding interface of BACnetConstructedDataExpectedShedLevel type BACnetConstructedDataExpectedShedLevel interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataExpectedShedLevelExactly interface { // _BACnetConstructedDataExpectedShedLevel is the data-structure of this message type _BACnetConstructedDataExpectedShedLevel struct { *_BACnetConstructedData - ExpectedShedLevel BACnetShedLevel + ExpectedShedLevel BACnetShedLevel } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataExpectedShedLevel) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataExpectedShedLevel) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataExpectedShedLevel) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_EXPECTED_SHED_LEVEL -} +func (m *_BACnetConstructedDataExpectedShedLevel) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_EXPECTED_SHED_LEVEL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataExpectedShedLevel) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataExpectedShedLevel) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataExpectedShedLevel) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataExpectedShedLevel) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataExpectedShedLevel) GetActualValue() BACnetShedLev /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataExpectedShedLevel factory function for _BACnetConstructedDataExpectedShedLevel -func NewBACnetConstructedDataExpectedShedLevel(expectedShedLevel BACnetShedLevel, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataExpectedShedLevel { +func NewBACnetConstructedDataExpectedShedLevel( expectedShedLevel BACnetShedLevel , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataExpectedShedLevel { _result := &_BACnetConstructedDataExpectedShedLevel{ - ExpectedShedLevel: expectedShedLevel, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ExpectedShedLevel: expectedShedLevel, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataExpectedShedLevel(expectedShedLevel BACnetShedLevel // Deprecated: use the interface for direct cast func CastBACnetConstructedDataExpectedShedLevel(structType interface{}) BACnetConstructedDataExpectedShedLevel { - if casted, ok := structType.(BACnetConstructedDataExpectedShedLevel); ok { + if casted, ok := structType.(BACnetConstructedDataExpectedShedLevel); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataExpectedShedLevel); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataExpectedShedLevel) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetConstructedDataExpectedShedLevel) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataExpectedShedLevelParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("expectedShedLevel"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for expectedShedLevel") } - _expectedShedLevel, _expectedShedLevelErr := BACnetShedLevelParseWithBuffer(ctx, readBuffer) +_expectedShedLevel, _expectedShedLevelErr := BACnetShedLevelParseWithBuffer(ctx, readBuffer) if _expectedShedLevelErr != nil { return nil, errors.Wrap(_expectedShedLevelErr, "Error parsing 'expectedShedLevel' field of BACnetConstructedDataExpectedShedLevel") } @@ -186,7 +188,7 @@ func BACnetConstructedDataExpectedShedLevelParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataExpectedShedLevel{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ExpectedShedLevel: expectedShedLevel, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataExpectedShedLevel) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataExpectedShedLevel") } - // Simple Field (expectedShedLevel) - if pushErr := writeBuffer.PushContext("expectedShedLevel"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for expectedShedLevel") - } - _expectedShedLevelErr := writeBuffer.WriteSerializable(ctx, m.GetExpectedShedLevel()) - if popErr := writeBuffer.PopContext("expectedShedLevel"); popErr != nil { - return errors.Wrap(popErr, "Error popping for expectedShedLevel") - } - if _expectedShedLevelErr != nil { - return errors.Wrap(_expectedShedLevelErr, "Error serializing 'expectedShedLevel' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (expectedShedLevel) + if pushErr := writeBuffer.PushContext("expectedShedLevel"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for expectedShedLevel") + } + _expectedShedLevelErr := writeBuffer.WriteSerializable(ctx, m.GetExpectedShedLevel()) + if popErr := writeBuffer.PopContext("expectedShedLevel"); popErr != nil { + return errors.Wrap(popErr, "Error popping for expectedShedLevel") + } + if _expectedShedLevelErr != nil { + return errors.Wrap(_expectedShedLevelErr, "Error serializing 'expectedShedLevel' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataExpectedShedLevel"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataExpectedShedLevel") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataExpectedShedLevel) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataExpectedShedLevel) isBACnetConstructedDataExpectedShedLevel() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataExpectedShedLevel) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataExpirationTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataExpirationTime.go index 20eba2f6db4..6d939372d67 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataExpirationTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataExpirationTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataExpirationTime is the corresponding interface of BACnetConstructedDataExpirationTime type BACnetConstructedDataExpirationTime interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataExpirationTimeExactly interface { // _BACnetConstructedDataExpirationTime is the data-structure of this message type _BACnetConstructedDataExpirationTime struct { *_BACnetConstructedData - ExpirationTime BACnetDateTime + ExpirationTime BACnetDateTime } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataExpirationTime) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataExpirationTime) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataExpirationTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_EXPIRATION_TIME -} +func (m *_BACnetConstructedDataExpirationTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_EXPIRATION_TIME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataExpirationTime) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataExpirationTime) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataExpirationTime) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataExpirationTime) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataExpirationTime) GetActualValue() BACnetDateTime { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataExpirationTime factory function for _BACnetConstructedDataExpirationTime -func NewBACnetConstructedDataExpirationTime(expirationTime BACnetDateTime, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataExpirationTime { +func NewBACnetConstructedDataExpirationTime( expirationTime BACnetDateTime , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataExpirationTime { _result := &_BACnetConstructedDataExpirationTime{ - ExpirationTime: expirationTime, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ExpirationTime: expirationTime, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataExpirationTime(expirationTime BACnetDateTime, openi // Deprecated: use the interface for direct cast func CastBACnetConstructedDataExpirationTime(structType interface{}) BACnetConstructedDataExpirationTime { - if casted, ok := structType.(BACnetConstructedDataExpirationTime); ok { + if casted, ok := structType.(BACnetConstructedDataExpirationTime); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataExpirationTime); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataExpirationTime) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConstructedDataExpirationTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataExpirationTimeParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("expirationTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for expirationTime") } - _expirationTime, _expirationTimeErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) +_expirationTime, _expirationTimeErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) if _expirationTimeErr != nil { return nil, errors.Wrap(_expirationTimeErr, "Error parsing 'expirationTime' field of BACnetConstructedDataExpirationTime") } @@ -186,7 +188,7 @@ func BACnetConstructedDataExpirationTimeParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetConstructedDataExpirationTime{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ExpirationTime: expirationTime, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataExpirationTime) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataExpirationTime") } - // Simple Field (expirationTime) - if pushErr := writeBuffer.PushContext("expirationTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for expirationTime") - } - _expirationTimeErr := writeBuffer.WriteSerializable(ctx, m.GetExpirationTime()) - if popErr := writeBuffer.PopContext("expirationTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for expirationTime") - } - if _expirationTimeErr != nil { - return errors.Wrap(_expirationTimeErr, "Error serializing 'expirationTime' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (expirationTime) + if pushErr := writeBuffer.PushContext("expirationTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for expirationTime") + } + _expirationTimeErr := writeBuffer.WriteSerializable(ctx, m.GetExpirationTime()) + if popErr := writeBuffer.PopContext("expirationTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for expirationTime") + } + if _expirationTimeErr != nil { + return errors.Wrap(_expirationTimeErr, "Error serializing 'expirationTime' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataExpirationTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataExpirationTime") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataExpirationTime) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataExpirationTime) isBACnetConstructedDataExpirationTime() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataExpirationTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataExtendedTimeEnable.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataExtendedTimeEnable.go index 59a9e55d842..ddaaeae6076 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataExtendedTimeEnable.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataExtendedTimeEnable.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataExtendedTimeEnable is the corresponding interface of BACnetConstructedDataExtendedTimeEnable type BACnetConstructedDataExtendedTimeEnable interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataExtendedTimeEnableExactly interface { // _BACnetConstructedDataExtendedTimeEnable is the data-structure of this message type _BACnetConstructedDataExtendedTimeEnable struct { *_BACnetConstructedData - ExtendedTimeEnable BACnetApplicationTagBoolean + ExtendedTimeEnable BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataExtendedTimeEnable) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataExtendedTimeEnable) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataExtendedTimeEnable) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_EXTENDED_TIME_ENABLE -} +func (m *_BACnetConstructedDataExtendedTimeEnable) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_EXTENDED_TIME_ENABLE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataExtendedTimeEnable) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataExtendedTimeEnable) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataExtendedTimeEnable) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataExtendedTimeEnable) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataExtendedTimeEnable) GetActualValue() BACnetApplic /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataExtendedTimeEnable factory function for _BACnetConstructedDataExtendedTimeEnable -func NewBACnetConstructedDataExtendedTimeEnable(extendedTimeEnable BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataExtendedTimeEnable { +func NewBACnetConstructedDataExtendedTimeEnable( extendedTimeEnable BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataExtendedTimeEnable { _result := &_BACnetConstructedDataExtendedTimeEnable{ - ExtendedTimeEnable: extendedTimeEnable, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ExtendedTimeEnable: extendedTimeEnable, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataExtendedTimeEnable(extendedTimeEnable BACnetApplica // Deprecated: use the interface for direct cast func CastBACnetConstructedDataExtendedTimeEnable(structType interface{}) BACnetConstructedDataExtendedTimeEnable { - if casted, ok := structType.(BACnetConstructedDataExtendedTimeEnable); ok { + if casted, ok := structType.(BACnetConstructedDataExtendedTimeEnable); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataExtendedTimeEnable); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataExtendedTimeEnable) GetLengthInBits(ctx context.C return lengthInBits } + func (m *_BACnetConstructedDataExtendedTimeEnable) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataExtendedTimeEnableParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("extendedTimeEnable"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for extendedTimeEnable") } - _extendedTimeEnable, _extendedTimeEnableErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_extendedTimeEnable, _extendedTimeEnableErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _extendedTimeEnableErr != nil { return nil, errors.Wrap(_extendedTimeEnableErr, "Error parsing 'extendedTimeEnable' field of BACnetConstructedDataExtendedTimeEnable") } @@ -186,7 +188,7 @@ func BACnetConstructedDataExtendedTimeEnableParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataExtendedTimeEnable{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ExtendedTimeEnable: extendedTimeEnable, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataExtendedTimeEnable) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataExtendedTimeEnable") } - // Simple Field (extendedTimeEnable) - if pushErr := writeBuffer.PushContext("extendedTimeEnable"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for extendedTimeEnable") - } - _extendedTimeEnableErr := writeBuffer.WriteSerializable(ctx, m.GetExtendedTimeEnable()) - if popErr := writeBuffer.PopContext("extendedTimeEnable"); popErr != nil { - return errors.Wrap(popErr, "Error popping for extendedTimeEnable") - } - if _extendedTimeEnableErr != nil { - return errors.Wrap(_extendedTimeEnableErr, "Error serializing 'extendedTimeEnable' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (extendedTimeEnable) + if pushErr := writeBuffer.PushContext("extendedTimeEnable"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for extendedTimeEnable") + } + _extendedTimeEnableErr := writeBuffer.WriteSerializable(ctx, m.GetExtendedTimeEnable()) + if popErr := writeBuffer.PopContext("extendedTimeEnable"); popErr != nil { + return errors.Wrap(popErr, "Error popping for extendedTimeEnable") + } + if _extendedTimeEnableErr != nil { + return errors.Wrap(_extendedTimeEnableErr, "Error serializing 'extendedTimeEnable' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataExtendedTimeEnable"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataExtendedTimeEnable") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataExtendedTimeEnable) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataExtendedTimeEnable) isBACnetConstructedDataExtendedTimeEnable() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataExtendedTimeEnable) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFDBBMDAddress.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFDBBMDAddress.go index 44d5b316806..84cb5a1ab29 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFDBBMDAddress.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFDBBMDAddress.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataFDBBMDAddress is the corresponding interface of BACnetConstructedDataFDBBMDAddress type BACnetConstructedDataFDBBMDAddress interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataFDBBMDAddressExactly interface { // _BACnetConstructedDataFDBBMDAddress is the data-structure of this message type _BACnetConstructedDataFDBBMDAddress struct { *_BACnetConstructedData - FDBBMDAddress BACnetHostNPort + FDBBMDAddress BACnetHostNPort } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataFDBBMDAddress) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataFDBBMDAddress) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataFDBBMDAddress) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FD_BBMD_ADDRESS -} +func (m *_BACnetConstructedDataFDBBMDAddress) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FD_BBMD_ADDRESS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataFDBBMDAddress) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataFDBBMDAddress) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataFDBBMDAddress) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataFDBBMDAddress) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataFDBBMDAddress) GetActualValue() BACnetHostNPort { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataFDBBMDAddress factory function for _BACnetConstructedDataFDBBMDAddress -func NewBACnetConstructedDataFDBBMDAddress(fDBBMDAddress BACnetHostNPort, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataFDBBMDAddress { +func NewBACnetConstructedDataFDBBMDAddress( fDBBMDAddress BACnetHostNPort , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataFDBBMDAddress { _result := &_BACnetConstructedDataFDBBMDAddress{ - FDBBMDAddress: fDBBMDAddress, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + FDBBMDAddress: fDBBMDAddress, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataFDBBMDAddress(fDBBMDAddress BACnetHostNPort, openin // Deprecated: use the interface for direct cast func CastBACnetConstructedDataFDBBMDAddress(structType interface{}) BACnetConstructedDataFDBBMDAddress { - if casted, ok := structType.(BACnetConstructedDataFDBBMDAddress); ok { + if casted, ok := structType.(BACnetConstructedDataFDBBMDAddress); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataFDBBMDAddress); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataFDBBMDAddress) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetConstructedDataFDBBMDAddress) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataFDBBMDAddressParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("fDBBMDAddress"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for fDBBMDAddress") } - _fDBBMDAddress, _fDBBMDAddressErr := BACnetHostNPortParseWithBuffer(ctx, readBuffer) +_fDBBMDAddress, _fDBBMDAddressErr := BACnetHostNPortParseWithBuffer(ctx, readBuffer) if _fDBBMDAddressErr != nil { return nil, errors.Wrap(_fDBBMDAddressErr, "Error parsing 'fDBBMDAddress' field of BACnetConstructedDataFDBBMDAddress") } @@ -186,7 +188,7 @@ func BACnetConstructedDataFDBBMDAddressParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetConstructedDataFDBBMDAddress{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FDBBMDAddress: fDBBMDAddress, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataFDBBMDAddress) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataFDBBMDAddress") } - // Simple Field (fDBBMDAddress) - if pushErr := writeBuffer.PushContext("fDBBMDAddress"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for fDBBMDAddress") - } - _fDBBMDAddressErr := writeBuffer.WriteSerializable(ctx, m.GetFDBBMDAddress()) - if popErr := writeBuffer.PopContext("fDBBMDAddress"); popErr != nil { - return errors.Wrap(popErr, "Error popping for fDBBMDAddress") - } - if _fDBBMDAddressErr != nil { - return errors.Wrap(_fDBBMDAddressErr, "Error serializing 'fDBBMDAddress' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (fDBBMDAddress) + if pushErr := writeBuffer.PushContext("fDBBMDAddress"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for fDBBMDAddress") + } + _fDBBMDAddressErr := writeBuffer.WriteSerializable(ctx, m.GetFDBBMDAddress()) + if popErr := writeBuffer.PopContext("fDBBMDAddress"); popErr != nil { + return errors.Wrap(popErr, "Error popping for fDBBMDAddress") + } + if _fDBBMDAddressErr != nil { + return errors.Wrap(_fDBBMDAddressErr, "Error serializing 'fDBBMDAddress' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataFDBBMDAddress"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataFDBBMDAddress") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataFDBBMDAddress) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataFDBBMDAddress) isBACnetConstructedDataFDBBMDAddress() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataFDBBMDAddress) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFDSubscriptionLifetime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFDSubscriptionLifetime.go index 8e6b8f76a81..a5ddef85ae0 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFDSubscriptionLifetime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFDSubscriptionLifetime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataFDSubscriptionLifetime is the corresponding interface of BACnetConstructedDataFDSubscriptionLifetime type BACnetConstructedDataFDSubscriptionLifetime interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataFDSubscriptionLifetimeExactly interface { // _BACnetConstructedDataFDSubscriptionLifetime is the data-structure of this message type _BACnetConstructedDataFDSubscriptionLifetime struct { *_BACnetConstructedData - FdSubscriptionLifetime BACnetApplicationTagUnsignedInteger + FdSubscriptionLifetime BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataFDSubscriptionLifetime) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataFDSubscriptionLifetime) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataFDSubscriptionLifetime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FD_SUBSCRIPTION_LIFETIME -} +func (m *_BACnetConstructedDataFDSubscriptionLifetime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FD_SUBSCRIPTION_LIFETIME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataFDSubscriptionLifetime) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataFDSubscriptionLifetime) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataFDSubscriptionLifetime) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataFDSubscriptionLifetime) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataFDSubscriptionLifetime) GetActualValue() BACnetAp /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataFDSubscriptionLifetime factory function for _BACnetConstructedDataFDSubscriptionLifetime -func NewBACnetConstructedDataFDSubscriptionLifetime(fdSubscriptionLifetime BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataFDSubscriptionLifetime { +func NewBACnetConstructedDataFDSubscriptionLifetime( fdSubscriptionLifetime BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataFDSubscriptionLifetime { _result := &_BACnetConstructedDataFDSubscriptionLifetime{ FdSubscriptionLifetime: fdSubscriptionLifetime, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataFDSubscriptionLifetime(fdSubscriptionLifetime BACne // Deprecated: use the interface for direct cast func CastBACnetConstructedDataFDSubscriptionLifetime(structType interface{}) BACnetConstructedDataFDSubscriptionLifetime { - if casted, ok := structType.(BACnetConstructedDataFDSubscriptionLifetime); ok { + if casted, ok := structType.(BACnetConstructedDataFDSubscriptionLifetime); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataFDSubscriptionLifetime); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataFDSubscriptionLifetime) GetLengthInBits(ctx conte return lengthInBits } + func (m *_BACnetConstructedDataFDSubscriptionLifetime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataFDSubscriptionLifetimeParseWithBuffer(ctx context.Cont if pullErr := readBuffer.PullContext("fdSubscriptionLifetime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for fdSubscriptionLifetime") } - _fdSubscriptionLifetime, _fdSubscriptionLifetimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_fdSubscriptionLifetime, _fdSubscriptionLifetimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _fdSubscriptionLifetimeErr != nil { return nil, errors.Wrap(_fdSubscriptionLifetimeErr, "Error parsing 'fdSubscriptionLifetime' field of BACnetConstructedDataFDSubscriptionLifetime") } @@ -186,7 +188,7 @@ func BACnetConstructedDataFDSubscriptionLifetimeParseWithBuffer(ctx context.Cont // Create a partially initialized instance _child := &_BACnetConstructedDataFDSubscriptionLifetime{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FdSubscriptionLifetime: fdSubscriptionLifetime, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataFDSubscriptionLifetime) SerializeWithWriteBuffer( return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataFDSubscriptionLifetime") } - // Simple Field (fdSubscriptionLifetime) - if pushErr := writeBuffer.PushContext("fdSubscriptionLifetime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for fdSubscriptionLifetime") - } - _fdSubscriptionLifetimeErr := writeBuffer.WriteSerializable(ctx, m.GetFdSubscriptionLifetime()) - if popErr := writeBuffer.PopContext("fdSubscriptionLifetime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for fdSubscriptionLifetime") - } - if _fdSubscriptionLifetimeErr != nil { - return errors.Wrap(_fdSubscriptionLifetimeErr, "Error serializing 'fdSubscriptionLifetime' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (fdSubscriptionLifetime) + if pushErr := writeBuffer.PushContext("fdSubscriptionLifetime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for fdSubscriptionLifetime") + } + _fdSubscriptionLifetimeErr := writeBuffer.WriteSerializable(ctx, m.GetFdSubscriptionLifetime()) + if popErr := writeBuffer.PopContext("fdSubscriptionLifetime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for fdSubscriptionLifetime") + } + if _fdSubscriptionLifetimeErr != nil { + return errors.Wrap(_fdSubscriptionLifetimeErr, "Error serializing 'fdSubscriptionLifetime' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataFDSubscriptionLifetime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataFDSubscriptionLifetime") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataFDSubscriptionLifetime) SerializeWithWriteBuffer( return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataFDSubscriptionLifetime) isBACnetConstructedDataFDSubscriptionLifetime() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataFDSubscriptionLifetime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFailedAttemptEvents.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFailedAttemptEvents.go index 63c71f6d8fb..99232a31601 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFailedAttemptEvents.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFailedAttemptEvents.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataFailedAttemptEvents is the corresponding interface of BACnetConstructedDataFailedAttemptEvents type BACnetConstructedDataFailedAttemptEvents interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataFailedAttemptEventsExactly interface { // _BACnetConstructedDataFailedAttemptEvents is the data-structure of this message type _BACnetConstructedDataFailedAttemptEvents struct { *_BACnetConstructedData - FailedAttemptEvents []BACnetAccessEventTagged + FailedAttemptEvents []BACnetAccessEventTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataFailedAttemptEvents) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataFailedAttemptEvents) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataFailedAttemptEvents) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FAILED_ATTEMPT_EVENTS -} +func (m *_BACnetConstructedDataFailedAttemptEvents) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FAILED_ATTEMPT_EVENTS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataFailedAttemptEvents) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataFailedAttemptEvents) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataFailedAttemptEvents) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataFailedAttemptEvents) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataFailedAttemptEvents) GetFailedAttemptEvents() []B /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataFailedAttemptEvents factory function for _BACnetConstructedDataFailedAttemptEvents -func NewBACnetConstructedDataFailedAttemptEvents(failedAttemptEvents []BACnetAccessEventTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataFailedAttemptEvents { +func NewBACnetConstructedDataFailedAttemptEvents( failedAttemptEvents []BACnetAccessEventTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataFailedAttemptEvents { _result := &_BACnetConstructedDataFailedAttemptEvents{ - FailedAttemptEvents: failedAttemptEvents, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + FailedAttemptEvents: failedAttemptEvents, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataFailedAttemptEvents(failedAttemptEvents []BACnetAcc // Deprecated: use the interface for direct cast func CastBACnetConstructedDataFailedAttemptEvents(structType interface{}) BACnetConstructedDataFailedAttemptEvents { - if casted, ok := structType.(BACnetConstructedDataFailedAttemptEvents); ok { + if casted, ok := structType.(BACnetConstructedDataFailedAttemptEvents); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataFailedAttemptEvents); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataFailedAttemptEvents) GetLengthInBits(ctx context. return lengthInBits } + func (m *_BACnetConstructedDataFailedAttemptEvents) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataFailedAttemptEventsParseWithBuffer(ctx context.Context // Terminated array var failedAttemptEvents []BACnetAccessEventTagged { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetAccessEventTaggedParseWithBuffer(ctx, readBuffer, uint8(0), TagClass_APPLICATION_TAGS) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetAccessEventTaggedParseWithBuffer(ctx, readBuffer , uint8(0) , TagClass_APPLICATION_TAGS ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'failedAttemptEvents' field of BACnetConstructedDataFailedAttemptEvents") } @@ -173,7 +175,7 @@ func BACnetConstructedDataFailedAttemptEventsParseWithBuffer(ctx context.Context // Create a partially initialized instance _child := &_BACnetConstructedDataFailedAttemptEvents{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FailedAttemptEvents: failedAttemptEvents, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataFailedAttemptEvents) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataFailedAttemptEvents") } - // Array Field (failedAttemptEvents) - if pushErr := writeBuffer.PushContext("failedAttemptEvents", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for failedAttemptEvents") - } - for _curItem, _element := range m.GetFailedAttemptEvents() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetFailedAttemptEvents()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'failedAttemptEvents' field") - } - } - if popErr := writeBuffer.PopContext("failedAttemptEvents", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for failedAttemptEvents") + // Array Field (failedAttemptEvents) + if pushErr := writeBuffer.PushContext("failedAttemptEvents", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for failedAttemptEvents") + } + for _curItem, _element := range m.GetFailedAttemptEvents() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetFailedAttemptEvents()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'failedAttemptEvents' field") } + } + if popErr := writeBuffer.PopContext("failedAttemptEvents", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for failedAttemptEvents") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataFailedAttemptEvents"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataFailedAttemptEvents") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataFailedAttemptEvents) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataFailedAttemptEvents) isBACnetConstructedDataFailedAttemptEvents() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataFailedAttemptEvents) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFailedAttempts.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFailedAttempts.go index 8c94eff3869..2902c324891 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFailedAttempts.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFailedAttempts.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataFailedAttempts is the corresponding interface of BACnetConstructedDataFailedAttempts type BACnetConstructedDataFailedAttempts interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataFailedAttemptsExactly interface { // _BACnetConstructedDataFailedAttempts is the data-structure of this message type _BACnetConstructedDataFailedAttempts struct { *_BACnetConstructedData - FailedAttempts BACnetApplicationTagUnsignedInteger + FailedAttempts BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataFailedAttempts) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataFailedAttempts) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataFailedAttempts) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FAILED_ATTEMPTS -} +func (m *_BACnetConstructedDataFailedAttempts) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FAILED_ATTEMPTS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataFailedAttempts) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataFailedAttempts) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataFailedAttempts) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataFailedAttempts) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataFailedAttempts) GetActualValue() BACnetApplicatio /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataFailedAttempts factory function for _BACnetConstructedDataFailedAttempts -func NewBACnetConstructedDataFailedAttempts(failedAttempts BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataFailedAttempts { +func NewBACnetConstructedDataFailedAttempts( failedAttempts BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataFailedAttempts { _result := &_BACnetConstructedDataFailedAttempts{ - FailedAttempts: failedAttempts, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + FailedAttempts: failedAttempts, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataFailedAttempts(failedAttempts BACnetApplicationTagU // Deprecated: use the interface for direct cast func CastBACnetConstructedDataFailedAttempts(structType interface{}) BACnetConstructedDataFailedAttempts { - if casted, ok := structType.(BACnetConstructedDataFailedAttempts); ok { + if casted, ok := structType.(BACnetConstructedDataFailedAttempts); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataFailedAttempts); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataFailedAttempts) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConstructedDataFailedAttempts) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataFailedAttemptsParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("failedAttempts"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for failedAttempts") } - _failedAttempts, _failedAttemptsErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_failedAttempts, _failedAttemptsErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _failedAttemptsErr != nil { return nil, errors.Wrap(_failedAttemptsErr, "Error parsing 'failedAttempts' field of BACnetConstructedDataFailedAttempts") } @@ -186,7 +188,7 @@ func BACnetConstructedDataFailedAttemptsParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetConstructedDataFailedAttempts{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FailedAttempts: failedAttempts, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataFailedAttempts) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataFailedAttempts") } - // Simple Field (failedAttempts) - if pushErr := writeBuffer.PushContext("failedAttempts"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for failedAttempts") - } - _failedAttemptsErr := writeBuffer.WriteSerializable(ctx, m.GetFailedAttempts()) - if popErr := writeBuffer.PopContext("failedAttempts"); popErr != nil { - return errors.Wrap(popErr, "Error popping for failedAttempts") - } - if _failedAttemptsErr != nil { - return errors.Wrap(_failedAttemptsErr, "Error serializing 'failedAttempts' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (failedAttempts) + if pushErr := writeBuffer.PushContext("failedAttempts"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for failedAttempts") + } + _failedAttemptsErr := writeBuffer.WriteSerializable(ctx, m.GetFailedAttempts()) + if popErr := writeBuffer.PopContext("failedAttempts"); popErr != nil { + return errors.Wrap(popErr, "Error popping for failedAttempts") + } + if _failedAttemptsErr != nil { + return errors.Wrap(_failedAttemptsErr, "Error serializing 'failedAttempts' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataFailedAttempts"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataFailedAttempts") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataFailedAttempts) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataFailedAttempts) isBACnetConstructedDataFailedAttempts() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataFailedAttempts) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFailedAttemptsTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFailedAttemptsTime.go index b4b3097d638..5e32b0087e0 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFailedAttemptsTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFailedAttemptsTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataFailedAttemptsTime is the corresponding interface of BACnetConstructedDataFailedAttemptsTime type BACnetConstructedDataFailedAttemptsTime interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataFailedAttemptsTimeExactly interface { // _BACnetConstructedDataFailedAttemptsTime is the data-structure of this message type _BACnetConstructedDataFailedAttemptsTime struct { *_BACnetConstructedData - FailedAttemptsTime BACnetApplicationTagUnsignedInteger + FailedAttemptsTime BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataFailedAttemptsTime) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataFailedAttemptsTime) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataFailedAttemptsTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FAILED_ATTEMPTS_TIME -} +func (m *_BACnetConstructedDataFailedAttemptsTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FAILED_ATTEMPTS_TIME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataFailedAttemptsTime) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataFailedAttemptsTime) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataFailedAttemptsTime) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataFailedAttemptsTime) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataFailedAttemptsTime) GetActualValue() BACnetApplic /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataFailedAttemptsTime factory function for _BACnetConstructedDataFailedAttemptsTime -func NewBACnetConstructedDataFailedAttemptsTime(failedAttemptsTime BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataFailedAttemptsTime { +func NewBACnetConstructedDataFailedAttemptsTime( failedAttemptsTime BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataFailedAttemptsTime { _result := &_BACnetConstructedDataFailedAttemptsTime{ - FailedAttemptsTime: failedAttemptsTime, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + FailedAttemptsTime: failedAttemptsTime, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataFailedAttemptsTime(failedAttemptsTime BACnetApplica // Deprecated: use the interface for direct cast func CastBACnetConstructedDataFailedAttemptsTime(structType interface{}) BACnetConstructedDataFailedAttemptsTime { - if casted, ok := structType.(BACnetConstructedDataFailedAttemptsTime); ok { + if casted, ok := structType.(BACnetConstructedDataFailedAttemptsTime); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataFailedAttemptsTime); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataFailedAttemptsTime) GetLengthInBits(ctx context.C return lengthInBits } + func (m *_BACnetConstructedDataFailedAttemptsTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataFailedAttemptsTimeParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("failedAttemptsTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for failedAttemptsTime") } - _failedAttemptsTime, _failedAttemptsTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_failedAttemptsTime, _failedAttemptsTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _failedAttemptsTimeErr != nil { return nil, errors.Wrap(_failedAttemptsTimeErr, "Error parsing 'failedAttemptsTime' field of BACnetConstructedDataFailedAttemptsTime") } @@ -186,7 +188,7 @@ func BACnetConstructedDataFailedAttemptsTimeParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataFailedAttemptsTime{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FailedAttemptsTime: failedAttemptsTime, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataFailedAttemptsTime) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataFailedAttemptsTime") } - // Simple Field (failedAttemptsTime) - if pushErr := writeBuffer.PushContext("failedAttemptsTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for failedAttemptsTime") - } - _failedAttemptsTimeErr := writeBuffer.WriteSerializable(ctx, m.GetFailedAttemptsTime()) - if popErr := writeBuffer.PopContext("failedAttemptsTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for failedAttemptsTime") - } - if _failedAttemptsTimeErr != nil { - return errors.Wrap(_failedAttemptsTimeErr, "Error serializing 'failedAttemptsTime' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (failedAttemptsTime) + if pushErr := writeBuffer.PushContext("failedAttemptsTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for failedAttemptsTime") + } + _failedAttemptsTimeErr := writeBuffer.WriteSerializable(ctx, m.GetFailedAttemptsTime()) + if popErr := writeBuffer.PopContext("failedAttemptsTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for failedAttemptsTime") + } + if _failedAttemptsTimeErr != nil { + return errors.Wrap(_failedAttemptsTimeErr, "Error serializing 'failedAttemptsTime' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataFailedAttemptsTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataFailedAttemptsTime") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataFailedAttemptsTime) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataFailedAttemptsTime) isBACnetConstructedDataFailedAttemptsTime() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataFailedAttemptsTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFaultHighLimit.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFaultHighLimit.go index 1a31d962c30..2eed93f6f2e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFaultHighLimit.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFaultHighLimit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataFaultHighLimit is the corresponding interface of BACnetConstructedDataFaultHighLimit type BACnetConstructedDataFaultHighLimit interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataFaultHighLimitExactly interface { // _BACnetConstructedDataFaultHighLimit is the data-structure of this message type _BACnetConstructedDataFaultHighLimit struct { *_BACnetConstructedData - FaultHighLimit BACnetApplicationTagUnsignedInteger + FaultHighLimit BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataFaultHighLimit) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataFaultHighLimit) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataFaultHighLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FAULT_HIGH_LIMIT -} +func (m *_BACnetConstructedDataFaultHighLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FAULT_HIGH_LIMIT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataFaultHighLimit) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataFaultHighLimit) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataFaultHighLimit) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataFaultHighLimit) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataFaultHighLimit) GetActualValue() BACnetApplicatio /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataFaultHighLimit factory function for _BACnetConstructedDataFaultHighLimit -func NewBACnetConstructedDataFaultHighLimit(faultHighLimit BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataFaultHighLimit { +func NewBACnetConstructedDataFaultHighLimit( faultHighLimit BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataFaultHighLimit { _result := &_BACnetConstructedDataFaultHighLimit{ - FaultHighLimit: faultHighLimit, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + FaultHighLimit: faultHighLimit, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataFaultHighLimit(faultHighLimit BACnetApplicationTagU // Deprecated: use the interface for direct cast func CastBACnetConstructedDataFaultHighLimit(structType interface{}) BACnetConstructedDataFaultHighLimit { - if casted, ok := structType.(BACnetConstructedDataFaultHighLimit); ok { + if casted, ok := structType.(BACnetConstructedDataFaultHighLimit); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataFaultHighLimit); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataFaultHighLimit) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConstructedDataFaultHighLimit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataFaultHighLimitParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("faultHighLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for faultHighLimit") } - _faultHighLimit, _faultHighLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_faultHighLimit, _faultHighLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _faultHighLimitErr != nil { return nil, errors.Wrap(_faultHighLimitErr, "Error parsing 'faultHighLimit' field of BACnetConstructedDataFaultHighLimit") } @@ -186,7 +188,7 @@ func BACnetConstructedDataFaultHighLimitParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetConstructedDataFaultHighLimit{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FaultHighLimit: faultHighLimit, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataFaultHighLimit) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataFaultHighLimit") } - // Simple Field (faultHighLimit) - if pushErr := writeBuffer.PushContext("faultHighLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for faultHighLimit") - } - _faultHighLimitErr := writeBuffer.WriteSerializable(ctx, m.GetFaultHighLimit()) - if popErr := writeBuffer.PopContext("faultHighLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for faultHighLimit") - } - if _faultHighLimitErr != nil { - return errors.Wrap(_faultHighLimitErr, "Error serializing 'faultHighLimit' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (faultHighLimit) + if pushErr := writeBuffer.PushContext("faultHighLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for faultHighLimit") + } + _faultHighLimitErr := writeBuffer.WriteSerializable(ctx, m.GetFaultHighLimit()) + if popErr := writeBuffer.PopContext("faultHighLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for faultHighLimit") + } + if _faultHighLimitErr != nil { + return errors.Wrap(_faultHighLimitErr, "Error serializing 'faultHighLimit' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataFaultHighLimit"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataFaultHighLimit") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataFaultHighLimit) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataFaultHighLimit) isBACnetConstructedDataFaultHighLimit() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataFaultHighLimit) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFaultLowLimit.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFaultLowLimit.go index ae6bcdf70b4..282f8b775fd 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFaultLowLimit.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFaultLowLimit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataFaultLowLimit is the corresponding interface of BACnetConstructedDataFaultLowLimit type BACnetConstructedDataFaultLowLimit interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataFaultLowLimitExactly interface { // _BACnetConstructedDataFaultLowLimit is the data-structure of this message type _BACnetConstructedDataFaultLowLimit struct { *_BACnetConstructedData - FaultLowLimit BACnetApplicationTagReal + FaultLowLimit BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataFaultLowLimit) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataFaultLowLimit) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataFaultLowLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FAULT_LOW_LIMIT -} +func (m *_BACnetConstructedDataFaultLowLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FAULT_LOW_LIMIT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataFaultLowLimit) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataFaultLowLimit) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataFaultLowLimit) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataFaultLowLimit) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataFaultLowLimit) GetActualValue() BACnetApplication /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataFaultLowLimit factory function for _BACnetConstructedDataFaultLowLimit -func NewBACnetConstructedDataFaultLowLimit(faultLowLimit BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataFaultLowLimit { +func NewBACnetConstructedDataFaultLowLimit( faultLowLimit BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataFaultLowLimit { _result := &_BACnetConstructedDataFaultLowLimit{ - FaultLowLimit: faultLowLimit, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + FaultLowLimit: faultLowLimit, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataFaultLowLimit(faultLowLimit BACnetApplicationTagRea // Deprecated: use the interface for direct cast func CastBACnetConstructedDataFaultLowLimit(structType interface{}) BACnetConstructedDataFaultLowLimit { - if casted, ok := structType.(BACnetConstructedDataFaultLowLimit); ok { + if casted, ok := structType.(BACnetConstructedDataFaultLowLimit); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataFaultLowLimit); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataFaultLowLimit) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetConstructedDataFaultLowLimit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataFaultLowLimitParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("faultLowLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for faultLowLimit") } - _faultLowLimit, _faultLowLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_faultLowLimit, _faultLowLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _faultLowLimitErr != nil { return nil, errors.Wrap(_faultLowLimitErr, "Error parsing 'faultLowLimit' field of BACnetConstructedDataFaultLowLimit") } @@ -186,7 +188,7 @@ func BACnetConstructedDataFaultLowLimitParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetConstructedDataFaultLowLimit{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FaultLowLimit: faultLowLimit, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataFaultLowLimit) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataFaultLowLimit") } - // Simple Field (faultLowLimit) - if pushErr := writeBuffer.PushContext("faultLowLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for faultLowLimit") - } - _faultLowLimitErr := writeBuffer.WriteSerializable(ctx, m.GetFaultLowLimit()) - if popErr := writeBuffer.PopContext("faultLowLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for faultLowLimit") - } - if _faultLowLimitErr != nil { - return errors.Wrap(_faultLowLimitErr, "Error serializing 'faultLowLimit' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (faultLowLimit) + if pushErr := writeBuffer.PushContext("faultLowLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for faultLowLimit") + } + _faultLowLimitErr := writeBuffer.WriteSerializable(ctx, m.GetFaultLowLimit()) + if popErr := writeBuffer.PopContext("faultLowLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for faultLowLimit") + } + if _faultLowLimitErr != nil { + return errors.Wrap(_faultLowLimitErr, "Error serializing 'faultLowLimit' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataFaultLowLimit"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataFaultLowLimit") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataFaultLowLimit) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataFaultLowLimit) isBACnetConstructedDataFaultLowLimit() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataFaultLowLimit) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFaultParameters.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFaultParameters.go index 465ae113f88..354ffa4b255 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFaultParameters.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFaultParameters.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataFaultParameters is the corresponding interface of BACnetConstructedDataFaultParameters type BACnetConstructedDataFaultParameters interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataFaultParametersExactly interface { // _BACnetConstructedDataFaultParameters is the data-structure of this message type _BACnetConstructedDataFaultParameters struct { *_BACnetConstructedData - FaultParameters BACnetFaultParameter + FaultParameters BACnetFaultParameter } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataFaultParameters) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataFaultParameters) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataFaultParameters) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FAULT_PARAMETERS -} +func (m *_BACnetConstructedDataFaultParameters) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FAULT_PARAMETERS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataFaultParameters) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataFaultParameters) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataFaultParameters) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataFaultParameters) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataFaultParameters) GetActualValue() BACnetFaultPara /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataFaultParameters factory function for _BACnetConstructedDataFaultParameters -func NewBACnetConstructedDataFaultParameters(faultParameters BACnetFaultParameter, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataFaultParameters { +func NewBACnetConstructedDataFaultParameters( faultParameters BACnetFaultParameter , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataFaultParameters { _result := &_BACnetConstructedDataFaultParameters{ - FaultParameters: faultParameters, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + FaultParameters: faultParameters, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataFaultParameters(faultParameters BACnetFaultParamete // Deprecated: use the interface for direct cast func CastBACnetConstructedDataFaultParameters(structType interface{}) BACnetConstructedDataFaultParameters { - if casted, ok := structType.(BACnetConstructedDataFaultParameters); ok { + if casted, ok := structType.(BACnetConstructedDataFaultParameters); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataFaultParameters); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataFaultParameters) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetConstructedDataFaultParameters) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataFaultParametersParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("faultParameters"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for faultParameters") } - _faultParameters, _faultParametersErr := BACnetFaultParameterParseWithBuffer(ctx, readBuffer) +_faultParameters, _faultParametersErr := BACnetFaultParameterParseWithBuffer(ctx, readBuffer) if _faultParametersErr != nil { return nil, errors.Wrap(_faultParametersErr, "Error parsing 'faultParameters' field of BACnetConstructedDataFaultParameters") } @@ -186,7 +188,7 @@ func BACnetConstructedDataFaultParametersParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetConstructedDataFaultParameters{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FaultParameters: faultParameters, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataFaultParameters) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataFaultParameters") } - // Simple Field (faultParameters) - if pushErr := writeBuffer.PushContext("faultParameters"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for faultParameters") - } - _faultParametersErr := writeBuffer.WriteSerializable(ctx, m.GetFaultParameters()) - if popErr := writeBuffer.PopContext("faultParameters"); popErr != nil { - return errors.Wrap(popErr, "Error popping for faultParameters") - } - if _faultParametersErr != nil { - return errors.Wrap(_faultParametersErr, "Error serializing 'faultParameters' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (faultParameters) + if pushErr := writeBuffer.PushContext("faultParameters"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for faultParameters") + } + _faultParametersErr := writeBuffer.WriteSerializable(ctx, m.GetFaultParameters()) + if popErr := writeBuffer.PopContext("faultParameters"); popErr != nil { + return errors.Wrap(popErr, "Error popping for faultParameters") + } + if _faultParametersErr != nil { + return errors.Wrap(_faultParametersErr, "Error serializing 'faultParameters' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataFaultParameters"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataFaultParameters") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataFaultParameters) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataFaultParameters) isBACnetConstructedDataFaultParameters() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataFaultParameters) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFaultSignals.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFaultSignals.go index 38f915c187b..0497880cd7d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFaultSignals.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFaultSignals.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataFaultSignals is the corresponding interface of BACnetConstructedDataFaultSignals type BACnetConstructedDataFaultSignals interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataFaultSignalsExactly interface { // _BACnetConstructedDataFaultSignals is the data-structure of this message type _BACnetConstructedDataFaultSignals struct { *_BACnetConstructedData - FaultSignals []BACnetLiftFaultTagged + FaultSignals []BACnetLiftFaultTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataFaultSignals) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataFaultSignals) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataFaultSignals) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FAULT_SIGNALS -} +func (m *_BACnetConstructedDataFaultSignals) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FAULT_SIGNALS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataFaultSignals) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataFaultSignals) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataFaultSignals) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataFaultSignals) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataFaultSignals) GetFaultSignals() []BACnetLiftFault /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataFaultSignals factory function for _BACnetConstructedDataFaultSignals -func NewBACnetConstructedDataFaultSignals(faultSignals []BACnetLiftFaultTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataFaultSignals { +func NewBACnetConstructedDataFaultSignals( faultSignals []BACnetLiftFaultTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataFaultSignals { _result := &_BACnetConstructedDataFaultSignals{ - FaultSignals: faultSignals, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + FaultSignals: faultSignals, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataFaultSignals(faultSignals []BACnetLiftFaultTagged, // Deprecated: use the interface for direct cast func CastBACnetConstructedDataFaultSignals(structType interface{}) BACnetConstructedDataFaultSignals { - if casted, ok := structType.(BACnetConstructedDataFaultSignals); ok { + if casted, ok := structType.(BACnetConstructedDataFaultSignals); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataFaultSignals); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataFaultSignals) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetConstructedDataFaultSignals) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataFaultSignalsParseWithBuffer(ctx context.Context, readB // Terminated array var faultSignals []BACnetLiftFaultTagged { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetLiftFaultTaggedParseWithBuffer(ctx, readBuffer, uint8(0), TagClass_APPLICATION_TAGS) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetLiftFaultTaggedParseWithBuffer(ctx, readBuffer , uint8(0) , TagClass_APPLICATION_TAGS ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'faultSignals' field of BACnetConstructedDataFaultSignals") } @@ -173,7 +175,7 @@ func BACnetConstructedDataFaultSignalsParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetConstructedDataFaultSignals{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FaultSignals: faultSignals, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataFaultSignals) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataFaultSignals") } - // Array Field (faultSignals) - if pushErr := writeBuffer.PushContext("faultSignals", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for faultSignals") - } - for _curItem, _element := range m.GetFaultSignals() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetFaultSignals()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'faultSignals' field") - } - } - if popErr := writeBuffer.PopContext("faultSignals", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for faultSignals") + // Array Field (faultSignals) + if pushErr := writeBuffer.PushContext("faultSignals", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for faultSignals") + } + for _curItem, _element := range m.GetFaultSignals() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetFaultSignals()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'faultSignals' field") } + } + if popErr := writeBuffer.PopContext("faultSignals", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for faultSignals") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataFaultSignals"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataFaultSignals") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataFaultSignals) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataFaultSignals) isBACnetConstructedDataFaultSignals() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataFaultSignals) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFaultType.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFaultType.go index f9053b707ee..46d34b342a4 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFaultType.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFaultType.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataFaultType is the corresponding interface of BACnetConstructedDataFaultType type BACnetConstructedDataFaultType interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataFaultTypeExactly interface { // _BACnetConstructedDataFaultType is the data-structure of this message type _BACnetConstructedDataFaultType struct { *_BACnetConstructedData - FaultType BACnetFaultTypeTagged + FaultType BACnetFaultTypeTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataFaultType) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataFaultType) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataFaultType) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FAULT_TYPE -} +func (m *_BACnetConstructedDataFaultType) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FAULT_TYPE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataFaultType) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataFaultType) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataFaultType) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataFaultType) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataFaultType) GetActualValue() BACnetFaultTypeTagged /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataFaultType factory function for _BACnetConstructedDataFaultType -func NewBACnetConstructedDataFaultType(faultType BACnetFaultTypeTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataFaultType { +func NewBACnetConstructedDataFaultType( faultType BACnetFaultTypeTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataFaultType { _result := &_BACnetConstructedDataFaultType{ - FaultType: faultType, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + FaultType: faultType, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataFaultType(faultType BACnetFaultTypeTagged, openingT // Deprecated: use the interface for direct cast func CastBACnetConstructedDataFaultType(structType interface{}) BACnetConstructedDataFaultType { - if casted, ok := structType.(BACnetConstructedDataFaultType); ok { + if casted, ok := structType.(BACnetConstructedDataFaultType); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataFaultType); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataFaultType) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetConstructedDataFaultType) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataFaultTypeParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("faultType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for faultType") } - _faultType, _faultTypeErr := BACnetFaultTypeTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_faultType, _faultTypeErr := BACnetFaultTypeTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _faultTypeErr != nil { return nil, errors.Wrap(_faultTypeErr, "Error parsing 'faultType' field of BACnetConstructedDataFaultType") } @@ -186,7 +188,7 @@ func BACnetConstructedDataFaultTypeParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_BACnetConstructedDataFaultType{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FaultType: faultType, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataFaultType) SerializeWithWriteBuffer(ctx context.C return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataFaultType") } - // Simple Field (faultType) - if pushErr := writeBuffer.PushContext("faultType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for faultType") - } - _faultTypeErr := writeBuffer.WriteSerializable(ctx, m.GetFaultType()) - if popErr := writeBuffer.PopContext("faultType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for faultType") - } - if _faultTypeErr != nil { - return errors.Wrap(_faultTypeErr, "Error serializing 'faultType' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (faultType) + if pushErr := writeBuffer.PushContext("faultType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for faultType") + } + _faultTypeErr := writeBuffer.WriteSerializable(ctx, m.GetFaultType()) + if popErr := writeBuffer.PopContext("faultType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for faultType") + } + if _faultTypeErr != nil { + return errors.Wrap(_faultTypeErr, "Error serializing 'faultType' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataFaultType"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataFaultType") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataFaultType) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataFaultType) isBACnetConstructedDataFaultType() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataFaultType) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFaultValues.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFaultValues.go index f0fde83726e..bc34938d829 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFaultValues.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFaultValues.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataFaultValues is the corresponding interface of BACnetConstructedDataFaultValues type BACnetConstructedDataFaultValues interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataFaultValuesExactly interface { // _BACnetConstructedDataFaultValues is the data-structure of this message type _BACnetConstructedDataFaultValues struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - FaultValues []BACnetLifeSafetyStateTagged + NumberOfDataElements BACnetApplicationTagUnsignedInteger + FaultValues []BACnetLifeSafetyStateTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataFaultValues) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataFaultValues) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataFaultValues) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FAULT_VALUES -} +func (m *_BACnetConstructedDataFaultValues) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FAULT_VALUES} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataFaultValues) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataFaultValues) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataFaultValues) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataFaultValues) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataFaultValues) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataFaultValues factory function for _BACnetConstructedDataFaultValues -func NewBACnetConstructedDataFaultValues(numberOfDataElements BACnetApplicationTagUnsignedInteger, faultValues []BACnetLifeSafetyStateTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataFaultValues { +func NewBACnetConstructedDataFaultValues( numberOfDataElements BACnetApplicationTagUnsignedInteger , faultValues []BACnetLifeSafetyStateTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataFaultValues { _result := &_BACnetConstructedDataFaultValues{ - NumberOfDataElements: numberOfDataElements, - FaultValues: faultValues, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + FaultValues: faultValues, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataFaultValues(numberOfDataElements BACnetApplicationT // Deprecated: use the interface for direct cast func CastBACnetConstructedDataFaultValues(structType interface{}) BACnetConstructedDataFaultValues { - if casted, ok := structType.(BACnetConstructedDataFaultValues); ok { + if casted, ok := structType.(BACnetConstructedDataFaultValues); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataFaultValues); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataFaultValues) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataFaultValues) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataFaultValuesParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataFaultValuesParseWithBuffer(ctx context.Context, readBu // Terminated array var faultValues []BACnetLifeSafetyStateTagged { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetLifeSafetyStateTaggedParseWithBuffer(ctx, readBuffer, uint8(0), TagClass_APPLICATION_TAGS) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetLifeSafetyStateTaggedParseWithBuffer(ctx, readBuffer , uint8(0) , TagClass_APPLICATION_TAGS ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'faultValues' field of BACnetConstructedDataFaultValues") } @@ -235,11 +237,11 @@ func BACnetConstructedDataFaultValuesParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataFaultValues{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - FaultValues: faultValues, + FaultValues: faultValues, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataFaultValues) SerializeWithWriteBuffer(ctx context if pushErr := writeBuffer.PushContext("BACnetConstructedDataFaultValues"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataFaultValues") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (faultValues) - if pushErr := writeBuffer.PushContext("faultValues", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for faultValues") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetFaultValues() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetFaultValues()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'faultValues' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("faultValues", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for faultValues") + } + + // Array Field (faultValues) + if pushErr := writeBuffer.PushContext("faultValues", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for faultValues") + } + for _curItem, _element := range m.GetFaultValues() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetFaultValues()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'faultValues' field") } + } + if popErr := writeBuffer.PopContext("faultValues", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for faultValues") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataFaultValues"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataFaultValues") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataFaultValues) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataFaultValues) isBACnetConstructedDataFaultValues() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataFaultValues) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFileAccessMethod.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFileAccessMethod.go index a622585d85a..45ab282ecba 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFileAccessMethod.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFileAccessMethod.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataFileAccessMethod is the corresponding interface of BACnetConstructedDataFileAccessMethod type BACnetConstructedDataFileAccessMethod interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataFileAccessMethodExactly interface { // _BACnetConstructedDataFileAccessMethod is the data-structure of this message type _BACnetConstructedDataFileAccessMethod struct { *_BACnetConstructedData - FileAccessMethod BACnetFileAccessMethodTagged + FileAccessMethod BACnetFileAccessMethodTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataFileAccessMethod) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataFileAccessMethod) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataFileAccessMethod) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FILE_ACCESS_METHOD -} +func (m *_BACnetConstructedDataFileAccessMethod) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FILE_ACCESS_METHOD} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataFileAccessMethod) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataFileAccessMethod) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataFileAccessMethod) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataFileAccessMethod) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataFileAccessMethod) GetActualValue() BACnetFileAcce /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataFileAccessMethod factory function for _BACnetConstructedDataFileAccessMethod -func NewBACnetConstructedDataFileAccessMethod(fileAccessMethod BACnetFileAccessMethodTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataFileAccessMethod { +func NewBACnetConstructedDataFileAccessMethod( fileAccessMethod BACnetFileAccessMethodTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataFileAccessMethod { _result := &_BACnetConstructedDataFileAccessMethod{ - FileAccessMethod: fileAccessMethod, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + FileAccessMethod: fileAccessMethod, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataFileAccessMethod(fileAccessMethod BACnetFileAccessM // Deprecated: use the interface for direct cast func CastBACnetConstructedDataFileAccessMethod(structType interface{}) BACnetConstructedDataFileAccessMethod { - if casted, ok := structType.(BACnetConstructedDataFileAccessMethod); ok { + if casted, ok := structType.(BACnetConstructedDataFileAccessMethod); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataFileAccessMethod); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataFileAccessMethod) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetConstructedDataFileAccessMethod) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataFileAccessMethodParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("fileAccessMethod"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for fileAccessMethod") } - _fileAccessMethod, _fileAccessMethodErr := BACnetFileAccessMethodTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_fileAccessMethod, _fileAccessMethodErr := BACnetFileAccessMethodTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _fileAccessMethodErr != nil { return nil, errors.Wrap(_fileAccessMethodErr, "Error parsing 'fileAccessMethod' field of BACnetConstructedDataFileAccessMethod") } @@ -186,7 +188,7 @@ func BACnetConstructedDataFileAccessMethodParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_BACnetConstructedDataFileAccessMethod{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FileAccessMethod: fileAccessMethod, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataFileAccessMethod) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataFileAccessMethod") } - // Simple Field (fileAccessMethod) - if pushErr := writeBuffer.PushContext("fileAccessMethod"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for fileAccessMethod") - } - _fileAccessMethodErr := writeBuffer.WriteSerializable(ctx, m.GetFileAccessMethod()) - if popErr := writeBuffer.PopContext("fileAccessMethod"); popErr != nil { - return errors.Wrap(popErr, "Error popping for fileAccessMethod") - } - if _fileAccessMethodErr != nil { - return errors.Wrap(_fileAccessMethodErr, "Error serializing 'fileAccessMethod' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (fileAccessMethod) + if pushErr := writeBuffer.PushContext("fileAccessMethod"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for fileAccessMethod") + } + _fileAccessMethodErr := writeBuffer.WriteSerializable(ctx, m.GetFileAccessMethod()) + if popErr := writeBuffer.PopContext("fileAccessMethod"); popErr != nil { + return errors.Wrap(popErr, "Error popping for fileAccessMethod") + } + if _fileAccessMethodErr != nil { + return errors.Wrap(_fileAccessMethodErr, "Error serializing 'fileAccessMethod' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataFileAccessMethod"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataFileAccessMethod") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataFileAccessMethod) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataFileAccessMethod) isBACnetConstructedDataFileAccessMethod() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataFileAccessMethod) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFileAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFileAll.go index 6262cdf1572..dd7b758e67e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFileAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFileAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataFileAll is the corresponding interface of BACnetConstructedDataFileAll type BACnetConstructedDataFileAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataFileAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataFileAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_FILE -} +func (m *_BACnetConstructedDataFileAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_FILE} -func (m *_BACnetConstructedDataFileAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataFileAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataFileAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataFileAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataFileAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataFileAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataFileAll factory function for _BACnetConstructedDataFileAll -func NewBACnetConstructedDataFileAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataFileAll { +func NewBACnetConstructedDataFileAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataFileAll { _result := &_BACnetConstructedDataFileAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataFileAll(openingTag BACnetOpeningTag, peekedTagHeade // Deprecated: use the interface for direct cast func CastBACnetConstructedDataFileAll(structType interface{}) BACnetConstructedDataFileAll { - if casted, ok := structType.(BACnetConstructedDataFileAll); ok { + if casted, ok := structType.(BACnetConstructedDataFileAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataFileAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataFileAll) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_BACnetConstructedDataFileAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataFileAllParseWithBuffer(ctx context.Context, readBuffer _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataFileAllParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_BACnetConstructedDataFileAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataFileAll) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataFileAll) isBACnetConstructedDataFileAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataFileAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFileRecordCount.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFileRecordCount.go index 75fb0a7831f..b7e0e59b368 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFileRecordCount.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFileRecordCount.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataFileRecordCount is the corresponding interface of BACnetConstructedDataFileRecordCount type BACnetConstructedDataFileRecordCount interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataFileRecordCountExactly interface { // _BACnetConstructedDataFileRecordCount is the data-structure of this message type _BACnetConstructedDataFileRecordCount struct { *_BACnetConstructedData - RecordCount BACnetApplicationTagUnsignedInteger + RecordCount BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataFileRecordCount) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_FILE -} +func (m *_BACnetConstructedDataFileRecordCount) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_FILE} -func (m *_BACnetConstructedDataFileRecordCount) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_RECORD_COUNT -} +func (m *_BACnetConstructedDataFileRecordCount) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_RECORD_COUNT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataFileRecordCount) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataFileRecordCount) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataFileRecordCount) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataFileRecordCount) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataFileRecordCount) GetActualValue() BACnetApplicati /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataFileRecordCount factory function for _BACnetConstructedDataFileRecordCount -func NewBACnetConstructedDataFileRecordCount(recordCount BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataFileRecordCount { +func NewBACnetConstructedDataFileRecordCount( recordCount BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataFileRecordCount { _result := &_BACnetConstructedDataFileRecordCount{ - RecordCount: recordCount, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + RecordCount: recordCount, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataFileRecordCount(recordCount BACnetApplicationTagUns // Deprecated: use the interface for direct cast func CastBACnetConstructedDataFileRecordCount(structType interface{}) BACnetConstructedDataFileRecordCount { - if casted, ok := structType.(BACnetConstructedDataFileRecordCount); ok { + if casted, ok := structType.(BACnetConstructedDataFileRecordCount); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataFileRecordCount); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataFileRecordCount) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetConstructedDataFileRecordCount) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataFileRecordCountParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("recordCount"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for recordCount") } - _recordCount, _recordCountErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_recordCount, _recordCountErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _recordCountErr != nil { return nil, errors.Wrap(_recordCountErr, "Error parsing 'recordCount' field of BACnetConstructedDataFileRecordCount") } @@ -186,7 +188,7 @@ func BACnetConstructedDataFileRecordCountParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetConstructedDataFileRecordCount{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, RecordCount: recordCount, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataFileRecordCount) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataFileRecordCount") } - // Simple Field (recordCount) - if pushErr := writeBuffer.PushContext("recordCount"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for recordCount") - } - _recordCountErr := writeBuffer.WriteSerializable(ctx, m.GetRecordCount()) - if popErr := writeBuffer.PopContext("recordCount"); popErr != nil { - return errors.Wrap(popErr, "Error popping for recordCount") - } - if _recordCountErr != nil { - return errors.Wrap(_recordCountErr, "Error serializing 'recordCount' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (recordCount) + if pushErr := writeBuffer.PushContext("recordCount"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for recordCount") + } + _recordCountErr := writeBuffer.WriteSerializable(ctx, m.GetRecordCount()) + if popErr := writeBuffer.PopContext("recordCount"); popErr != nil { + return errors.Wrap(popErr, "Error popping for recordCount") + } + if _recordCountErr != nil { + return errors.Wrap(_recordCountErr, "Error serializing 'recordCount' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataFileRecordCount"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataFileRecordCount") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataFileRecordCount) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataFileRecordCount) isBACnetConstructedDataFileRecordCount() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataFileRecordCount) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFileSize.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFileSize.go index 5f4f2b4909d..fa2871d0d49 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFileSize.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFileSize.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataFileSize is the corresponding interface of BACnetConstructedDataFileSize type BACnetConstructedDataFileSize interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataFileSizeExactly interface { // _BACnetConstructedDataFileSize is the data-structure of this message type _BACnetConstructedDataFileSize struct { *_BACnetConstructedData - FileSize BACnetApplicationTagUnsignedInteger + FileSize BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataFileSize) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataFileSize) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataFileSize) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FILE_SIZE -} +func (m *_BACnetConstructedDataFileSize) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FILE_SIZE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataFileSize) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataFileSize) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataFileSize) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataFileSize) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataFileSize) GetActualValue() BACnetApplicationTagUn /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataFileSize factory function for _BACnetConstructedDataFileSize -func NewBACnetConstructedDataFileSize(fileSize BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataFileSize { +func NewBACnetConstructedDataFileSize( fileSize BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataFileSize { _result := &_BACnetConstructedDataFileSize{ - FileSize: fileSize, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + FileSize: fileSize, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataFileSize(fileSize BACnetApplicationTagUnsignedInteg // Deprecated: use the interface for direct cast func CastBACnetConstructedDataFileSize(structType interface{}) BACnetConstructedDataFileSize { - if casted, ok := structType.(BACnetConstructedDataFileSize); ok { + if casted, ok := structType.(BACnetConstructedDataFileSize); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataFileSize); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataFileSize) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetConstructedDataFileSize) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataFileSizeParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("fileSize"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for fileSize") } - _fileSize, _fileSizeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_fileSize, _fileSizeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _fileSizeErr != nil { return nil, errors.Wrap(_fileSizeErr, "Error parsing 'fileSize' field of BACnetConstructedDataFileSize") } @@ -186,7 +188,7 @@ func BACnetConstructedDataFileSizeParseWithBuffer(ctx context.Context, readBuffe // Create a partially initialized instance _child := &_BACnetConstructedDataFileSize{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FileSize: fileSize, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataFileSize) SerializeWithWriteBuffer(ctx context.Co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataFileSize") } - // Simple Field (fileSize) - if pushErr := writeBuffer.PushContext("fileSize"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for fileSize") - } - _fileSizeErr := writeBuffer.WriteSerializable(ctx, m.GetFileSize()) - if popErr := writeBuffer.PopContext("fileSize"); popErr != nil { - return errors.Wrap(popErr, "Error popping for fileSize") - } - if _fileSizeErr != nil { - return errors.Wrap(_fileSizeErr, "Error serializing 'fileSize' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (fileSize) + if pushErr := writeBuffer.PushContext("fileSize"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for fileSize") + } + _fileSizeErr := writeBuffer.WriteSerializable(ctx, m.GetFileSize()) + if popErr := writeBuffer.PopContext("fileSize"); popErr != nil { + return errors.Wrap(popErr, "Error popping for fileSize") + } + if _fileSizeErr != nil { + return errors.Wrap(_fileSizeErr, "Error serializing 'fileSize' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataFileSize"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataFileSize") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataFileSize) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataFileSize) isBACnetConstructedDataFileSize() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataFileSize) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFileType.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFileType.go index 717b3bc0497..6772fb252f3 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFileType.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFileType.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataFileType is the corresponding interface of BACnetConstructedDataFileType type BACnetConstructedDataFileType interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataFileTypeExactly interface { // _BACnetConstructedDataFileType is the data-structure of this message type _BACnetConstructedDataFileType struct { *_BACnetConstructedData - FileType BACnetApplicationTagCharacterString + FileType BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataFileType) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataFileType) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataFileType) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FILE_TYPE -} +func (m *_BACnetConstructedDataFileType) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FILE_TYPE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataFileType) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataFileType) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataFileType) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataFileType) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataFileType) GetActualValue() BACnetApplicationTagCh /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataFileType factory function for _BACnetConstructedDataFileType -func NewBACnetConstructedDataFileType(fileType BACnetApplicationTagCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataFileType { +func NewBACnetConstructedDataFileType( fileType BACnetApplicationTagCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataFileType { _result := &_BACnetConstructedDataFileType{ - FileType: fileType, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + FileType: fileType, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataFileType(fileType BACnetApplicationTagCharacterStri // Deprecated: use the interface for direct cast func CastBACnetConstructedDataFileType(structType interface{}) BACnetConstructedDataFileType { - if casted, ok := structType.(BACnetConstructedDataFileType); ok { + if casted, ok := structType.(BACnetConstructedDataFileType); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataFileType); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataFileType) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetConstructedDataFileType) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataFileTypeParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("fileType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for fileType") } - _fileType, _fileTypeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_fileType, _fileTypeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _fileTypeErr != nil { return nil, errors.Wrap(_fileTypeErr, "Error parsing 'fileType' field of BACnetConstructedDataFileType") } @@ -186,7 +188,7 @@ func BACnetConstructedDataFileTypeParseWithBuffer(ctx context.Context, readBuffe // Create a partially initialized instance _child := &_BACnetConstructedDataFileType{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FileType: fileType, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataFileType) SerializeWithWriteBuffer(ctx context.Co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataFileType") } - // Simple Field (fileType) - if pushErr := writeBuffer.PushContext("fileType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for fileType") - } - _fileTypeErr := writeBuffer.WriteSerializable(ctx, m.GetFileType()) - if popErr := writeBuffer.PopContext("fileType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for fileType") - } - if _fileTypeErr != nil { - return errors.Wrap(_fileTypeErr, "Error serializing 'fileType' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (fileType) + if pushErr := writeBuffer.PushContext("fileType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for fileType") + } + _fileTypeErr := writeBuffer.WriteSerializable(ctx, m.GetFileType()) + if popErr := writeBuffer.PopContext("fileType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for fileType") + } + if _fileTypeErr != nil { + return errors.Wrap(_fileTypeErr, "Error serializing 'fileType' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataFileType"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataFileType") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataFileType) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataFileType) isBACnetConstructedDataFileType() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataFileType) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFirmwareRevision.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFirmwareRevision.go index 6b507c41ef7..b0ac7c8ceef 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFirmwareRevision.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFirmwareRevision.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataFirmwareRevision is the corresponding interface of BACnetConstructedDataFirmwareRevision type BACnetConstructedDataFirmwareRevision interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataFirmwareRevisionExactly interface { // _BACnetConstructedDataFirmwareRevision is the data-structure of this message type _BACnetConstructedDataFirmwareRevision struct { *_BACnetConstructedData - FirmwareRevision BACnetApplicationTagCharacterString + FirmwareRevision BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataFirmwareRevision) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataFirmwareRevision) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataFirmwareRevision) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FIRMWARE_REVISION -} +func (m *_BACnetConstructedDataFirmwareRevision) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FIRMWARE_REVISION} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataFirmwareRevision) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataFirmwareRevision) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataFirmwareRevision) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataFirmwareRevision) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataFirmwareRevision) GetActualValue() BACnetApplicat /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataFirmwareRevision factory function for _BACnetConstructedDataFirmwareRevision -func NewBACnetConstructedDataFirmwareRevision(firmwareRevision BACnetApplicationTagCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataFirmwareRevision { +func NewBACnetConstructedDataFirmwareRevision( firmwareRevision BACnetApplicationTagCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataFirmwareRevision { _result := &_BACnetConstructedDataFirmwareRevision{ - FirmwareRevision: firmwareRevision, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + FirmwareRevision: firmwareRevision, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataFirmwareRevision(firmwareRevision BACnetApplication // Deprecated: use the interface for direct cast func CastBACnetConstructedDataFirmwareRevision(structType interface{}) BACnetConstructedDataFirmwareRevision { - if casted, ok := structType.(BACnetConstructedDataFirmwareRevision); ok { + if casted, ok := structType.(BACnetConstructedDataFirmwareRevision); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataFirmwareRevision); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataFirmwareRevision) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetConstructedDataFirmwareRevision) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataFirmwareRevisionParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("firmwareRevision"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for firmwareRevision") } - _firmwareRevision, _firmwareRevisionErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_firmwareRevision, _firmwareRevisionErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _firmwareRevisionErr != nil { return nil, errors.Wrap(_firmwareRevisionErr, "Error parsing 'firmwareRevision' field of BACnetConstructedDataFirmwareRevision") } @@ -186,7 +188,7 @@ func BACnetConstructedDataFirmwareRevisionParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_BACnetConstructedDataFirmwareRevision{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FirmwareRevision: firmwareRevision, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataFirmwareRevision) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataFirmwareRevision") } - // Simple Field (firmwareRevision) - if pushErr := writeBuffer.PushContext("firmwareRevision"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for firmwareRevision") - } - _firmwareRevisionErr := writeBuffer.WriteSerializable(ctx, m.GetFirmwareRevision()) - if popErr := writeBuffer.PopContext("firmwareRevision"); popErr != nil { - return errors.Wrap(popErr, "Error popping for firmwareRevision") - } - if _firmwareRevisionErr != nil { - return errors.Wrap(_firmwareRevisionErr, "Error serializing 'firmwareRevision' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (firmwareRevision) + if pushErr := writeBuffer.PushContext("firmwareRevision"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for firmwareRevision") + } + _firmwareRevisionErr := writeBuffer.WriteSerializable(ctx, m.GetFirmwareRevision()) + if popErr := writeBuffer.PopContext("firmwareRevision"); popErr != nil { + return errors.Wrap(popErr, "Error popping for firmwareRevision") + } + if _firmwareRevisionErr != nil { + return errors.Wrap(_firmwareRevisionErr, "Error serializing 'firmwareRevision' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataFirmwareRevision"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataFirmwareRevision") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataFirmwareRevision) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataFirmwareRevision) isBACnetConstructedDataFirmwareRevision() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataFirmwareRevision) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFloorText.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFloorText.go index 91aa1532e31..4e80b312716 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFloorText.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFloorText.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataFloorText is the corresponding interface of BACnetConstructedDataFloorText type BACnetConstructedDataFloorText interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataFloorTextExactly interface { // _BACnetConstructedDataFloorText is the data-structure of this message type _BACnetConstructedDataFloorText struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - FloorText []BACnetApplicationTagCharacterString + NumberOfDataElements BACnetApplicationTagUnsignedInteger + FloorText []BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataFloorText) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataFloorText) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataFloorText) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FLOOR_TEXT -} +func (m *_BACnetConstructedDataFloorText) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FLOOR_TEXT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataFloorText) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataFloorText) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataFloorText) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataFloorText) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataFloorText) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataFloorText factory function for _BACnetConstructedDataFloorText -func NewBACnetConstructedDataFloorText(numberOfDataElements BACnetApplicationTagUnsignedInteger, floorText []BACnetApplicationTagCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataFloorText { +func NewBACnetConstructedDataFloorText( numberOfDataElements BACnetApplicationTagUnsignedInteger , floorText []BACnetApplicationTagCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataFloorText { _result := &_BACnetConstructedDataFloorText{ - NumberOfDataElements: numberOfDataElements, - FloorText: floorText, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + FloorText: floorText, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataFloorText(numberOfDataElements BACnetApplicationTag // Deprecated: use the interface for direct cast func CastBACnetConstructedDataFloorText(structType interface{}) BACnetConstructedDataFloorText { - if casted, ok := structType.(BACnetConstructedDataFloorText); ok { + if casted, ok := structType.(BACnetConstructedDataFloorText); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataFloorText); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataFloorText) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetConstructedDataFloorText) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataFloorTextParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataFloorTextParseWithBuffer(ctx context.Context, readBuff // Terminated array var floorText []BACnetApplicationTagCharacterString { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'floorText' field of BACnetConstructedDataFloorText") } @@ -235,11 +237,11 @@ func BACnetConstructedDataFloorTextParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_BACnetConstructedDataFloorText{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - FloorText: floorText, + FloorText: floorText, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataFloorText) SerializeWithWriteBuffer(ctx context.C if pushErr := writeBuffer.PushContext("BACnetConstructedDataFloorText"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataFloorText") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (floorText) - if pushErr := writeBuffer.PushContext("floorText", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for floorText") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetFloorText() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetFloorText()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'floorText' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("floorText", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for floorText") + } + + // Array Field (floorText) + if pushErr := writeBuffer.PushContext("floorText", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for floorText") + } + for _curItem, _element := range m.GetFloorText() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetFloorText()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'floorText' field") } + } + if popErr := writeBuffer.PopContext("floorText", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for floorText") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataFloorText"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataFloorText") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataFloorText) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataFloorText) isBACnetConstructedDataFloorText() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataFloorText) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFullDutyBaseline.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFullDutyBaseline.go index 1587db54eab..fb2d998779c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFullDutyBaseline.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataFullDutyBaseline.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataFullDutyBaseline is the corresponding interface of BACnetConstructedDataFullDutyBaseline type BACnetConstructedDataFullDutyBaseline interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataFullDutyBaselineExactly interface { // _BACnetConstructedDataFullDutyBaseline is the data-structure of this message type _BACnetConstructedDataFullDutyBaseline struct { *_BACnetConstructedData - FullDutyBaseLine BACnetApplicationTagReal + FullDutyBaseLine BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataFullDutyBaseline) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataFullDutyBaseline) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataFullDutyBaseline) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FULL_DUTY_BASELINE -} +func (m *_BACnetConstructedDataFullDutyBaseline) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FULL_DUTY_BASELINE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataFullDutyBaseline) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataFullDutyBaseline) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataFullDutyBaseline) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataFullDutyBaseline) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataFullDutyBaseline) GetActualValue() BACnetApplicat /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataFullDutyBaseline factory function for _BACnetConstructedDataFullDutyBaseline -func NewBACnetConstructedDataFullDutyBaseline(fullDutyBaseLine BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataFullDutyBaseline { +func NewBACnetConstructedDataFullDutyBaseline( fullDutyBaseLine BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataFullDutyBaseline { _result := &_BACnetConstructedDataFullDutyBaseline{ - FullDutyBaseLine: fullDutyBaseLine, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + FullDutyBaseLine: fullDutyBaseLine, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataFullDutyBaseline(fullDutyBaseLine BACnetApplication // Deprecated: use the interface for direct cast func CastBACnetConstructedDataFullDutyBaseline(structType interface{}) BACnetConstructedDataFullDutyBaseline { - if casted, ok := structType.(BACnetConstructedDataFullDutyBaseline); ok { + if casted, ok := structType.(BACnetConstructedDataFullDutyBaseline); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataFullDutyBaseline); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataFullDutyBaseline) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetConstructedDataFullDutyBaseline) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataFullDutyBaselineParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("fullDutyBaseLine"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for fullDutyBaseLine") } - _fullDutyBaseLine, _fullDutyBaseLineErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_fullDutyBaseLine, _fullDutyBaseLineErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _fullDutyBaseLineErr != nil { return nil, errors.Wrap(_fullDutyBaseLineErr, "Error parsing 'fullDutyBaseLine' field of BACnetConstructedDataFullDutyBaseline") } @@ -186,7 +188,7 @@ func BACnetConstructedDataFullDutyBaselineParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_BACnetConstructedDataFullDutyBaseline{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FullDutyBaseLine: fullDutyBaseLine, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataFullDutyBaseline) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataFullDutyBaseline") } - // Simple Field (fullDutyBaseLine) - if pushErr := writeBuffer.PushContext("fullDutyBaseLine"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for fullDutyBaseLine") - } - _fullDutyBaseLineErr := writeBuffer.WriteSerializable(ctx, m.GetFullDutyBaseLine()) - if popErr := writeBuffer.PopContext("fullDutyBaseLine"); popErr != nil { - return errors.Wrap(popErr, "Error popping for fullDutyBaseLine") - } - if _fullDutyBaseLineErr != nil { - return errors.Wrap(_fullDutyBaseLineErr, "Error serializing 'fullDutyBaseLine' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (fullDutyBaseLine) + if pushErr := writeBuffer.PushContext("fullDutyBaseLine"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for fullDutyBaseLine") + } + _fullDutyBaseLineErr := writeBuffer.WriteSerializable(ctx, m.GetFullDutyBaseLine()) + if popErr := writeBuffer.PopContext("fullDutyBaseLine"); popErr != nil { + return errors.Wrap(popErr, "Error popping for fullDutyBaseLine") + } + if _fullDutyBaseLineErr != nil { + return errors.Wrap(_fullDutyBaseLineErr, "Error serializing 'fullDutyBaseLine' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataFullDutyBaseline"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataFullDutyBaseline") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataFullDutyBaseline) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataFullDutyBaseline) isBACnetConstructedDataFullDutyBaseline() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataFullDutyBaseline) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataGlobalGroupAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataGlobalGroupAll.go index b827ea401ba..190d22250d5 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataGlobalGroupAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataGlobalGroupAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataGlobalGroupAll is the corresponding interface of BACnetConstructedDataGlobalGroupAll type BACnetConstructedDataGlobalGroupAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataGlobalGroupAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataGlobalGroupAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_GLOBAL_GROUP -} +func (m *_BACnetConstructedDataGlobalGroupAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_GLOBAL_GROUP} -func (m *_BACnetConstructedDataGlobalGroupAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataGlobalGroupAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataGlobalGroupAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataGlobalGroupAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataGlobalGroupAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataGlobalGroupAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataGlobalGroupAll factory function for _BACnetConstructedDataGlobalGroupAll -func NewBACnetConstructedDataGlobalGroupAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataGlobalGroupAll { +func NewBACnetConstructedDataGlobalGroupAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataGlobalGroupAll { _result := &_BACnetConstructedDataGlobalGroupAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataGlobalGroupAll(openingTag BACnetOpeningTag, peekedT // Deprecated: use the interface for direct cast func CastBACnetConstructedDataGlobalGroupAll(structType interface{}) BACnetConstructedDataGlobalGroupAll { - if casted, ok := structType.(BACnetConstructedDataGlobalGroupAll); ok { + if casted, ok := structType.(BACnetConstructedDataGlobalGroupAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataGlobalGroupAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataGlobalGroupAll) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConstructedDataGlobalGroupAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataGlobalGroupAllParseWithBuffer(ctx context.Context, rea _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataGlobalGroupAllParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetConstructedDataGlobalGroupAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataGlobalGroupAll) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataGlobalGroupAll) isBACnetConstructedDataGlobalGroupAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataGlobalGroupAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataGlobalGroupGroupMembers.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataGlobalGroupGroupMembers.go index 57960a52c16..1cc1478a86c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataGlobalGroupGroupMembers.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataGlobalGroupGroupMembers.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataGlobalGroupGroupMembers is the corresponding interface of BACnetConstructedDataGlobalGroupGroupMembers type BACnetConstructedDataGlobalGroupGroupMembers interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataGlobalGroupGroupMembersExactly interface { // _BACnetConstructedDataGlobalGroupGroupMembers is the data-structure of this message type _BACnetConstructedDataGlobalGroupGroupMembers struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - GroupMembers []BACnetDeviceObjectPropertyReference + NumberOfDataElements BACnetApplicationTagUnsignedInteger + GroupMembers []BACnetDeviceObjectPropertyReference } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataGlobalGroupGroupMembers) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_GLOBAL_GROUP -} +func (m *_BACnetConstructedDataGlobalGroupGroupMembers) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_GLOBAL_GROUP} -func (m *_BACnetConstructedDataGlobalGroupGroupMembers) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_GROUP_MEMBERS -} +func (m *_BACnetConstructedDataGlobalGroupGroupMembers) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_GROUP_MEMBERS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataGlobalGroupGroupMembers) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataGlobalGroupGroupMembers) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataGlobalGroupGroupMembers) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataGlobalGroupGroupMembers) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataGlobalGroupGroupMembers) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataGlobalGroupGroupMembers factory function for _BACnetConstructedDataGlobalGroupGroupMembers -func NewBACnetConstructedDataGlobalGroupGroupMembers(numberOfDataElements BACnetApplicationTagUnsignedInteger, groupMembers []BACnetDeviceObjectPropertyReference, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataGlobalGroupGroupMembers { +func NewBACnetConstructedDataGlobalGroupGroupMembers( numberOfDataElements BACnetApplicationTagUnsignedInteger , groupMembers []BACnetDeviceObjectPropertyReference , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataGlobalGroupGroupMembers { _result := &_BACnetConstructedDataGlobalGroupGroupMembers{ - NumberOfDataElements: numberOfDataElements, - GroupMembers: groupMembers, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + GroupMembers: groupMembers, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataGlobalGroupGroupMembers(numberOfDataElements BACnet // Deprecated: use the interface for direct cast func CastBACnetConstructedDataGlobalGroupGroupMembers(structType interface{}) BACnetConstructedDataGlobalGroupGroupMembers { - if casted, ok := structType.(BACnetConstructedDataGlobalGroupGroupMembers); ok { + if casted, ok := structType.(BACnetConstructedDataGlobalGroupGroupMembers); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataGlobalGroupGroupMembers); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataGlobalGroupGroupMembers) GetLengthInBits(ctx cont return lengthInBits } + func (m *_BACnetConstructedDataGlobalGroupGroupMembers) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataGlobalGroupGroupMembersParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataGlobalGroupGroupMembersParseWithBuffer(ctx context.Con // Terminated array var groupMembers []BACnetDeviceObjectPropertyReference { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetDeviceObjectPropertyReferenceParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetDeviceObjectPropertyReferenceParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'groupMembers' field of BACnetConstructedDataGlobalGroupGroupMembers") } @@ -235,11 +237,11 @@ func BACnetConstructedDataGlobalGroupGroupMembersParseWithBuffer(ctx context.Con // Create a partially initialized instance _child := &_BACnetConstructedDataGlobalGroupGroupMembers{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - GroupMembers: groupMembers, + GroupMembers: groupMembers, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataGlobalGroupGroupMembers) SerializeWithWriteBuffer if pushErr := writeBuffer.PushContext("BACnetConstructedDataGlobalGroupGroupMembers"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataGlobalGroupGroupMembers") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (groupMembers) - if pushErr := writeBuffer.PushContext("groupMembers", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for groupMembers") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetGroupMembers() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetGroupMembers()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'groupMembers' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("groupMembers", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for groupMembers") + } + + // Array Field (groupMembers) + if pushErr := writeBuffer.PushContext("groupMembers", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for groupMembers") + } + for _curItem, _element := range m.GetGroupMembers() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetGroupMembers()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'groupMembers' field") } + } + if popErr := writeBuffer.PopContext("groupMembers", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for groupMembers") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataGlobalGroupGroupMembers"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataGlobalGroupGroupMembers") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataGlobalGroupGroupMembers) SerializeWithWriteBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataGlobalGroupGroupMembers) isBACnetConstructedDataGlobalGroupGroupMembers() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataGlobalGroupGroupMembers) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataGlobalGroupPresentValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataGlobalGroupPresentValue.go index 15048157d1f..2daf489af75 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataGlobalGroupPresentValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataGlobalGroupPresentValue.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataGlobalGroupPresentValue is the corresponding interface of BACnetConstructedDataGlobalGroupPresentValue type BACnetConstructedDataGlobalGroupPresentValue interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataGlobalGroupPresentValueExactly interface { // _BACnetConstructedDataGlobalGroupPresentValue is the data-structure of this message type _BACnetConstructedDataGlobalGroupPresentValue struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - PresentValue []BACnetPropertyAccessResult + NumberOfDataElements BACnetApplicationTagUnsignedInteger + PresentValue []BACnetPropertyAccessResult } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataGlobalGroupPresentValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_GLOBAL_GROUP -} +func (m *_BACnetConstructedDataGlobalGroupPresentValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_GLOBAL_GROUP} -func (m *_BACnetConstructedDataGlobalGroupPresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PRESENT_VALUE -} +func (m *_BACnetConstructedDataGlobalGroupPresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PRESENT_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataGlobalGroupPresentValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataGlobalGroupPresentValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataGlobalGroupPresentValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataGlobalGroupPresentValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataGlobalGroupPresentValue) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataGlobalGroupPresentValue factory function for _BACnetConstructedDataGlobalGroupPresentValue -func NewBACnetConstructedDataGlobalGroupPresentValue(numberOfDataElements BACnetApplicationTagUnsignedInteger, presentValue []BACnetPropertyAccessResult, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataGlobalGroupPresentValue { +func NewBACnetConstructedDataGlobalGroupPresentValue( numberOfDataElements BACnetApplicationTagUnsignedInteger , presentValue []BACnetPropertyAccessResult , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataGlobalGroupPresentValue { _result := &_BACnetConstructedDataGlobalGroupPresentValue{ - NumberOfDataElements: numberOfDataElements, - PresentValue: presentValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + PresentValue: presentValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataGlobalGroupPresentValue(numberOfDataElements BACnet // Deprecated: use the interface for direct cast func CastBACnetConstructedDataGlobalGroupPresentValue(structType interface{}) BACnetConstructedDataGlobalGroupPresentValue { - if casted, ok := structType.(BACnetConstructedDataGlobalGroupPresentValue); ok { + if casted, ok := structType.(BACnetConstructedDataGlobalGroupPresentValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataGlobalGroupPresentValue); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataGlobalGroupPresentValue) GetLengthInBits(ctx cont return lengthInBits } + func (m *_BACnetConstructedDataGlobalGroupPresentValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataGlobalGroupPresentValueParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataGlobalGroupPresentValueParseWithBuffer(ctx context.Con // Terminated array var presentValue []BACnetPropertyAccessResult { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetPropertyAccessResultParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetPropertyAccessResultParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'presentValue' field of BACnetConstructedDataGlobalGroupPresentValue") } @@ -235,11 +237,11 @@ func BACnetConstructedDataGlobalGroupPresentValueParseWithBuffer(ctx context.Con // Create a partially initialized instance _child := &_BACnetConstructedDataGlobalGroupPresentValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - PresentValue: presentValue, + PresentValue: presentValue, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataGlobalGroupPresentValue) SerializeWithWriteBuffer if pushErr := writeBuffer.PushContext("BACnetConstructedDataGlobalGroupPresentValue"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataGlobalGroupPresentValue") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (presentValue) - if pushErr := writeBuffer.PushContext("presentValue", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for presentValue") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetPresentValue() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetPresentValue()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'presentValue' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("presentValue", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for presentValue") + } + + // Array Field (presentValue) + if pushErr := writeBuffer.PushContext("presentValue", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for presentValue") + } + for _curItem, _element := range m.GetPresentValue() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetPresentValue()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'presentValue' field") } + } + if popErr := writeBuffer.PopContext("presentValue", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for presentValue") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataGlobalGroupPresentValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataGlobalGroupPresentValue") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataGlobalGroupPresentValue) SerializeWithWriteBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataGlobalGroupPresentValue) isBACnetConstructedDataGlobalGroupPresentValue() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataGlobalGroupPresentValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataGlobalIdentifier.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataGlobalIdentifier.go index ee3cb09caf9..a37a95acb3f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataGlobalIdentifier.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataGlobalIdentifier.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataGlobalIdentifier is the corresponding interface of BACnetConstructedDataGlobalIdentifier type BACnetConstructedDataGlobalIdentifier interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataGlobalIdentifierExactly interface { // _BACnetConstructedDataGlobalIdentifier is the data-structure of this message type _BACnetConstructedDataGlobalIdentifier struct { *_BACnetConstructedData - GlobalIdentifier BACnetApplicationTagUnsignedInteger + GlobalIdentifier BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataGlobalIdentifier) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataGlobalIdentifier) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataGlobalIdentifier) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_GLOBAL_IDENTIFIER -} +func (m *_BACnetConstructedDataGlobalIdentifier) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_GLOBAL_IDENTIFIER} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataGlobalIdentifier) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataGlobalIdentifier) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataGlobalIdentifier) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataGlobalIdentifier) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataGlobalIdentifier) GetActualValue() BACnetApplicat /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataGlobalIdentifier factory function for _BACnetConstructedDataGlobalIdentifier -func NewBACnetConstructedDataGlobalIdentifier(globalIdentifier BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataGlobalIdentifier { +func NewBACnetConstructedDataGlobalIdentifier( globalIdentifier BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataGlobalIdentifier { _result := &_BACnetConstructedDataGlobalIdentifier{ - GlobalIdentifier: globalIdentifier, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + GlobalIdentifier: globalIdentifier, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataGlobalIdentifier(globalIdentifier BACnetApplication // Deprecated: use the interface for direct cast func CastBACnetConstructedDataGlobalIdentifier(structType interface{}) BACnetConstructedDataGlobalIdentifier { - if casted, ok := structType.(BACnetConstructedDataGlobalIdentifier); ok { + if casted, ok := structType.(BACnetConstructedDataGlobalIdentifier); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataGlobalIdentifier); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataGlobalIdentifier) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetConstructedDataGlobalIdentifier) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataGlobalIdentifierParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("globalIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for globalIdentifier") } - _globalIdentifier, _globalIdentifierErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_globalIdentifier, _globalIdentifierErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _globalIdentifierErr != nil { return nil, errors.Wrap(_globalIdentifierErr, "Error parsing 'globalIdentifier' field of BACnetConstructedDataGlobalIdentifier") } @@ -186,7 +188,7 @@ func BACnetConstructedDataGlobalIdentifierParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_BACnetConstructedDataGlobalIdentifier{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, GlobalIdentifier: globalIdentifier, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataGlobalIdentifier) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataGlobalIdentifier") } - // Simple Field (globalIdentifier) - if pushErr := writeBuffer.PushContext("globalIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for globalIdentifier") - } - _globalIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetGlobalIdentifier()) - if popErr := writeBuffer.PopContext("globalIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for globalIdentifier") - } - if _globalIdentifierErr != nil { - return errors.Wrap(_globalIdentifierErr, "Error serializing 'globalIdentifier' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (globalIdentifier) + if pushErr := writeBuffer.PushContext("globalIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for globalIdentifier") + } + _globalIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetGlobalIdentifier()) + if popErr := writeBuffer.PopContext("globalIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for globalIdentifier") + } + if _globalIdentifierErr != nil { + return errors.Wrap(_globalIdentifierErr, "Error serializing 'globalIdentifier' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataGlobalIdentifier"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataGlobalIdentifier") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataGlobalIdentifier) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataGlobalIdentifier) isBACnetConstructedDataGlobalIdentifier() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataGlobalIdentifier) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataGroupAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataGroupAll.go index f0f163bd354..c7f3af0ee13 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataGroupAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataGroupAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataGroupAll is the corresponding interface of BACnetConstructedDataGroupAll type BACnetConstructedDataGroupAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataGroupAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataGroupAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_GROUP -} +func (m *_BACnetConstructedDataGroupAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_GROUP} -func (m *_BACnetConstructedDataGroupAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataGroupAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataGroupAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataGroupAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataGroupAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataGroupAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataGroupAll factory function for _BACnetConstructedDataGroupAll -func NewBACnetConstructedDataGroupAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataGroupAll { +func NewBACnetConstructedDataGroupAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataGroupAll { _result := &_BACnetConstructedDataGroupAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataGroupAll(openingTag BACnetOpeningTag, peekedTagHead // Deprecated: use the interface for direct cast func CastBACnetConstructedDataGroupAll(structType interface{}) BACnetConstructedDataGroupAll { - if casted, ok := structType.(BACnetConstructedDataGroupAll); ok { + if casted, ok := structType.(BACnetConstructedDataGroupAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataGroupAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataGroupAll) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetConstructedDataGroupAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataGroupAllParseWithBuffer(ctx context.Context, readBuffe _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataGroupAllParseWithBuffer(ctx context.Context, readBuffe // Create a partially initialized instance _child := &_BACnetConstructedDataGroupAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataGroupAll) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataGroupAll) isBACnetConstructedDataGroupAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataGroupAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataGroupID.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataGroupID.go index db15577611e..dfb2559e3d1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataGroupID.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataGroupID.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataGroupID is the corresponding interface of BACnetConstructedDataGroupID type BACnetConstructedDataGroupID interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataGroupIDExactly interface { // _BACnetConstructedDataGroupID is the data-structure of this message type _BACnetConstructedDataGroupID struct { *_BACnetConstructedData - GroupId BACnetApplicationTagUnsignedInteger + GroupId BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataGroupID) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataGroupID) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataGroupID) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_GROUP_ID -} +func (m *_BACnetConstructedDataGroupID) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_GROUP_ID} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataGroupID) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataGroupID) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataGroupID) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataGroupID) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataGroupID) GetActualValue() BACnetApplicationTagUns /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataGroupID factory function for _BACnetConstructedDataGroupID -func NewBACnetConstructedDataGroupID(groupId BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataGroupID { +func NewBACnetConstructedDataGroupID( groupId BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataGroupID { _result := &_BACnetConstructedDataGroupID{ - GroupId: groupId, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + GroupId: groupId, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataGroupID(groupId BACnetApplicationTagUnsignedInteger // Deprecated: use the interface for direct cast func CastBACnetConstructedDataGroupID(structType interface{}) BACnetConstructedDataGroupID { - if casted, ok := structType.(BACnetConstructedDataGroupID); ok { + if casted, ok := structType.(BACnetConstructedDataGroupID); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataGroupID); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataGroupID) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_BACnetConstructedDataGroupID) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataGroupIDParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("groupId"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for groupId") } - _groupId, _groupIdErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_groupId, _groupIdErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _groupIdErr != nil { return nil, errors.Wrap(_groupIdErr, "Error parsing 'groupId' field of BACnetConstructedDataGroupID") } @@ -186,7 +188,7 @@ func BACnetConstructedDataGroupIDParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_BACnetConstructedDataGroupID{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, GroupId: groupId, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataGroupID) SerializeWithWriteBuffer(ctx context.Con return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataGroupID") } - // Simple Field (groupId) - if pushErr := writeBuffer.PushContext("groupId"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for groupId") - } - _groupIdErr := writeBuffer.WriteSerializable(ctx, m.GetGroupId()) - if popErr := writeBuffer.PopContext("groupId"); popErr != nil { - return errors.Wrap(popErr, "Error popping for groupId") - } - if _groupIdErr != nil { - return errors.Wrap(_groupIdErr, "Error serializing 'groupId' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (groupId) + if pushErr := writeBuffer.PushContext("groupId"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for groupId") + } + _groupIdErr := writeBuffer.WriteSerializable(ctx, m.GetGroupId()) + if popErr := writeBuffer.PopContext("groupId"); popErr != nil { + return errors.Wrap(popErr, "Error popping for groupId") + } + if _groupIdErr != nil { + return errors.Wrap(_groupIdErr, "Error serializing 'groupId' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataGroupID"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataGroupID") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataGroupID) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataGroupID) isBACnetConstructedDataGroupID() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataGroupID) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataGroupMemberNames.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataGroupMemberNames.go index eb86acbd3ea..0af2f1eeafb 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataGroupMemberNames.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataGroupMemberNames.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataGroupMemberNames is the corresponding interface of BACnetConstructedDataGroupMemberNames type BACnetConstructedDataGroupMemberNames interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataGroupMemberNamesExactly interface { // _BACnetConstructedDataGroupMemberNames is the data-structure of this message type _BACnetConstructedDataGroupMemberNames struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - GroupMemberNames []BACnetApplicationTagCharacterString + NumberOfDataElements BACnetApplicationTagUnsignedInteger + GroupMemberNames []BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataGroupMemberNames) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataGroupMemberNames) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataGroupMemberNames) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_GROUP_MEMBER_NAMES -} +func (m *_BACnetConstructedDataGroupMemberNames) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_GROUP_MEMBER_NAMES} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataGroupMemberNames) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataGroupMemberNames) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataGroupMemberNames) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataGroupMemberNames) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataGroupMemberNames) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataGroupMemberNames factory function for _BACnetConstructedDataGroupMemberNames -func NewBACnetConstructedDataGroupMemberNames(numberOfDataElements BACnetApplicationTagUnsignedInteger, groupMemberNames []BACnetApplicationTagCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataGroupMemberNames { +func NewBACnetConstructedDataGroupMemberNames( numberOfDataElements BACnetApplicationTagUnsignedInteger , groupMemberNames []BACnetApplicationTagCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataGroupMemberNames { _result := &_BACnetConstructedDataGroupMemberNames{ - NumberOfDataElements: numberOfDataElements, - GroupMemberNames: groupMemberNames, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + GroupMemberNames: groupMemberNames, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataGroupMemberNames(numberOfDataElements BACnetApplica // Deprecated: use the interface for direct cast func CastBACnetConstructedDataGroupMemberNames(structType interface{}) BACnetConstructedDataGroupMemberNames { - if casted, ok := structType.(BACnetConstructedDataGroupMemberNames); ok { + if casted, ok := structType.(BACnetConstructedDataGroupMemberNames); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataGroupMemberNames); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataGroupMemberNames) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetConstructedDataGroupMemberNames) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataGroupMemberNamesParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataGroupMemberNamesParseWithBuffer(ctx context.Context, r // Terminated array var groupMemberNames []BACnetApplicationTagCharacterString { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'groupMemberNames' field of BACnetConstructedDataGroupMemberNames") } @@ -235,11 +237,11 @@ func BACnetConstructedDataGroupMemberNamesParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_BACnetConstructedDataGroupMemberNames{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - GroupMemberNames: groupMemberNames, + GroupMemberNames: groupMemberNames, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataGroupMemberNames) SerializeWithWriteBuffer(ctx co if pushErr := writeBuffer.PushContext("BACnetConstructedDataGroupMemberNames"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataGroupMemberNames") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (groupMemberNames) - if pushErr := writeBuffer.PushContext("groupMemberNames", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for groupMemberNames") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetGroupMemberNames() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetGroupMemberNames()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'groupMemberNames' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("groupMemberNames", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for groupMemberNames") + } + + // Array Field (groupMemberNames) + if pushErr := writeBuffer.PushContext("groupMemberNames", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for groupMemberNames") + } + for _curItem, _element := range m.GetGroupMemberNames() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetGroupMemberNames()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'groupMemberNames' field") } + } + if popErr := writeBuffer.PopContext("groupMemberNames", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for groupMemberNames") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataGroupMemberNames"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataGroupMemberNames") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataGroupMemberNames) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataGroupMemberNames) isBACnetConstructedDataGroupMemberNames() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataGroupMemberNames) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataGroupMembers.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataGroupMembers.go index ae12318df43..a3b4e9550e4 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataGroupMembers.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataGroupMembers.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataGroupMembers is the corresponding interface of BACnetConstructedDataGroupMembers type BACnetConstructedDataGroupMembers interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataGroupMembersExactly interface { // _BACnetConstructedDataGroupMembers is the data-structure of this message type _BACnetConstructedDataGroupMembers struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - GroupMembers []BACnetApplicationTagObjectIdentifier + NumberOfDataElements BACnetApplicationTagUnsignedInteger + GroupMembers []BACnetApplicationTagObjectIdentifier } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataGroupMembers) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataGroupMembers) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataGroupMembers) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_GROUP_MEMBERS -} +func (m *_BACnetConstructedDataGroupMembers) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_GROUP_MEMBERS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataGroupMembers) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataGroupMembers) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataGroupMembers) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataGroupMembers) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataGroupMembers) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataGroupMembers factory function for _BACnetConstructedDataGroupMembers -func NewBACnetConstructedDataGroupMembers(numberOfDataElements BACnetApplicationTagUnsignedInteger, groupMembers []BACnetApplicationTagObjectIdentifier, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataGroupMembers { +func NewBACnetConstructedDataGroupMembers( numberOfDataElements BACnetApplicationTagUnsignedInteger , groupMembers []BACnetApplicationTagObjectIdentifier , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataGroupMembers { _result := &_BACnetConstructedDataGroupMembers{ - NumberOfDataElements: numberOfDataElements, - GroupMembers: groupMembers, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + GroupMembers: groupMembers, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataGroupMembers(numberOfDataElements BACnetApplication // Deprecated: use the interface for direct cast func CastBACnetConstructedDataGroupMembers(structType interface{}) BACnetConstructedDataGroupMembers { - if casted, ok := structType.(BACnetConstructedDataGroupMembers); ok { + if casted, ok := structType.(BACnetConstructedDataGroupMembers); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataGroupMembers); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataGroupMembers) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetConstructedDataGroupMembers) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataGroupMembersParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataGroupMembersParseWithBuffer(ctx context.Context, readB // Terminated array var groupMembers []BACnetApplicationTagObjectIdentifier { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'groupMembers' field of BACnetConstructedDataGroupMembers") } @@ -235,11 +237,11 @@ func BACnetConstructedDataGroupMembersParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetConstructedDataGroupMembers{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - GroupMembers: groupMembers, + GroupMembers: groupMembers, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataGroupMembers) SerializeWithWriteBuffer(ctx contex if pushErr := writeBuffer.PushContext("BACnetConstructedDataGroupMembers"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataGroupMembers") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (groupMembers) - if pushErr := writeBuffer.PushContext("groupMembers", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for groupMembers") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetGroupMembers() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetGroupMembers()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'groupMembers' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("groupMembers", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for groupMembers") + } + + // Array Field (groupMembers) + if pushErr := writeBuffer.PushContext("groupMembers", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for groupMembers") + } + for _curItem, _element := range m.GetGroupMembers() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetGroupMembers()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'groupMembers' field") } + } + if popErr := writeBuffer.PopContext("groupMembers", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for groupMembers") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataGroupMembers"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataGroupMembers") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataGroupMembers) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataGroupMembers) isBACnetConstructedDataGroupMembers() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataGroupMembers) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataGroupMode.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataGroupMode.go index 0aa9f57059a..49770603e6e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataGroupMode.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataGroupMode.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataGroupMode is the corresponding interface of BACnetConstructedDataGroupMode type BACnetConstructedDataGroupMode interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataGroupModeExactly interface { // _BACnetConstructedDataGroupMode is the data-structure of this message type _BACnetConstructedDataGroupMode struct { *_BACnetConstructedData - GroupMode BACnetLiftGroupModeTagged + GroupMode BACnetLiftGroupModeTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataGroupMode) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataGroupMode) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataGroupMode) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_GROUP_MODE -} +func (m *_BACnetConstructedDataGroupMode) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_GROUP_MODE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataGroupMode) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataGroupMode) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataGroupMode) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataGroupMode) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataGroupMode) GetActualValue() BACnetLiftGroupModeTa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataGroupMode factory function for _BACnetConstructedDataGroupMode -func NewBACnetConstructedDataGroupMode(groupMode BACnetLiftGroupModeTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataGroupMode { +func NewBACnetConstructedDataGroupMode( groupMode BACnetLiftGroupModeTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataGroupMode { _result := &_BACnetConstructedDataGroupMode{ - GroupMode: groupMode, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + GroupMode: groupMode, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataGroupMode(groupMode BACnetLiftGroupModeTagged, open // Deprecated: use the interface for direct cast func CastBACnetConstructedDataGroupMode(structType interface{}) BACnetConstructedDataGroupMode { - if casted, ok := structType.(BACnetConstructedDataGroupMode); ok { + if casted, ok := structType.(BACnetConstructedDataGroupMode); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataGroupMode); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataGroupMode) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetConstructedDataGroupMode) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataGroupModeParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("groupMode"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for groupMode") } - _groupMode, _groupModeErr := BACnetLiftGroupModeTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_groupMode, _groupModeErr := BACnetLiftGroupModeTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _groupModeErr != nil { return nil, errors.Wrap(_groupModeErr, "Error parsing 'groupMode' field of BACnetConstructedDataGroupMode") } @@ -186,7 +188,7 @@ func BACnetConstructedDataGroupModeParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_BACnetConstructedDataGroupMode{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, GroupMode: groupMode, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataGroupMode) SerializeWithWriteBuffer(ctx context.C return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataGroupMode") } - // Simple Field (groupMode) - if pushErr := writeBuffer.PushContext("groupMode"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for groupMode") - } - _groupModeErr := writeBuffer.WriteSerializable(ctx, m.GetGroupMode()) - if popErr := writeBuffer.PopContext("groupMode"); popErr != nil { - return errors.Wrap(popErr, "Error popping for groupMode") - } - if _groupModeErr != nil { - return errors.Wrap(_groupModeErr, "Error serializing 'groupMode' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (groupMode) + if pushErr := writeBuffer.PushContext("groupMode"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for groupMode") + } + _groupModeErr := writeBuffer.WriteSerializable(ctx, m.GetGroupMode()) + if popErr := writeBuffer.PopContext("groupMode"); popErr != nil { + return errors.Wrap(popErr, "Error popping for groupMode") + } + if _groupModeErr != nil { + return errors.Wrap(_groupModeErr, "Error serializing 'groupMode' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataGroupMode"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataGroupMode") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataGroupMode) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataGroupMode) isBACnetConstructedDataGroupMode() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataGroupMode) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataGroupPresentValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataGroupPresentValue.go index c558d48675f..fac8ab18366 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataGroupPresentValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataGroupPresentValue.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataGroupPresentValue is the corresponding interface of BACnetConstructedDataGroupPresentValue type BACnetConstructedDataGroupPresentValue interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataGroupPresentValueExactly interface { // _BACnetConstructedDataGroupPresentValue is the data-structure of this message type _BACnetConstructedDataGroupPresentValue struct { *_BACnetConstructedData - PresentValue []BACnetReadAccessResult + PresentValue []BACnetReadAccessResult } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataGroupPresentValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_GROUP -} +func (m *_BACnetConstructedDataGroupPresentValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_GROUP} -func (m *_BACnetConstructedDataGroupPresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PRESENT_VALUE -} +func (m *_BACnetConstructedDataGroupPresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PRESENT_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataGroupPresentValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataGroupPresentValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataGroupPresentValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataGroupPresentValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataGroupPresentValue) GetPresentValue() []BACnetRead /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataGroupPresentValue factory function for _BACnetConstructedDataGroupPresentValue -func NewBACnetConstructedDataGroupPresentValue(presentValue []BACnetReadAccessResult, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataGroupPresentValue { +func NewBACnetConstructedDataGroupPresentValue( presentValue []BACnetReadAccessResult , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataGroupPresentValue { _result := &_BACnetConstructedDataGroupPresentValue{ - PresentValue: presentValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PresentValue: presentValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataGroupPresentValue(presentValue []BACnetReadAccessRe // Deprecated: use the interface for direct cast func CastBACnetConstructedDataGroupPresentValue(structType interface{}) BACnetConstructedDataGroupPresentValue { - if casted, ok := structType.(BACnetConstructedDataGroupPresentValue); ok { + if casted, ok := structType.(BACnetConstructedDataGroupPresentValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataGroupPresentValue); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataGroupPresentValue) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetConstructedDataGroupPresentValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataGroupPresentValueParseWithBuffer(ctx context.Context, // Terminated array var presentValue []BACnetReadAccessResult { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetReadAccessResultParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetReadAccessResultParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'presentValue' field of BACnetConstructedDataGroupPresentValue") } @@ -173,7 +175,7 @@ func BACnetConstructedDataGroupPresentValueParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataGroupPresentValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PresentValue: presentValue, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataGroupPresentValue) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataGroupPresentValue") } - // Array Field (presentValue) - if pushErr := writeBuffer.PushContext("presentValue", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for presentValue") - } - for _curItem, _element := range m.GetPresentValue() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetPresentValue()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'presentValue' field") - } - } - if popErr := writeBuffer.PopContext("presentValue", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for presentValue") + // Array Field (presentValue) + if pushErr := writeBuffer.PushContext("presentValue", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for presentValue") + } + for _curItem, _element := range m.GetPresentValue() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetPresentValue()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'presentValue' field") } + } + if popErr := writeBuffer.PopContext("presentValue", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for presentValue") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataGroupPresentValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataGroupPresentValue") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataGroupPresentValue) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataGroupPresentValue) isBACnetConstructedDataGroupPresentValue() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataGroupPresentValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataHighLimit.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataHighLimit.go index 57dfd150053..79f0d540cdd 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataHighLimit.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataHighLimit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataHighLimit is the corresponding interface of BACnetConstructedDataHighLimit type BACnetConstructedDataHighLimit interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataHighLimitExactly interface { // _BACnetConstructedDataHighLimit is the data-structure of this message type _BACnetConstructedDataHighLimit struct { *_BACnetConstructedData - HighLimit BACnetApplicationTagReal + HighLimit BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataHighLimit) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataHighLimit) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataHighLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_HIGH_LIMIT -} +func (m *_BACnetConstructedDataHighLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_HIGH_LIMIT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataHighLimit) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataHighLimit) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataHighLimit) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataHighLimit) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataHighLimit) GetActualValue() BACnetApplicationTagR /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataHighLimit factory function for _BACnetConstructedDataHighLimit -func NewBACnetConstructedDataHighLimit(highLimit BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataHighLimit { +func NewBACnetConstructedDataHighLimit( highLimit BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataHighLimit { _result := &_BACnetConstructedDataHighLimit{ - HighLimit: highLimit, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + HighLimit: highLimit, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataHighLimit(highLimit BACnetApplicationTagReal, openi // Deprecated: use the interface for direct cast func CastBACnetConstructedDataHighLimit(structType interface{}) BACnetConstructedDataHighLimit { - if casted, ok := structType.(BACnetConstructedDataHighLimit); ok { + if casted, ok := structType.(BACnetConstructedDataHighLimit); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataHighLimit); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataHighLimit) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetConstructedDataHighLimit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataHighLimitParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("highLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for highLimit") } - _highLimit, _highLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_highLimit, _highLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _highLimitErr != nil { return nil, errors.Wrap(_highLimitErr, "Error parsing 'highLimit' field of BACnetConstructedDataHighLimit") } @@ -186,7 +188,7 @@ func BACnetConstructedDataHighLimitParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_BACnetConstructedDataHighLimit{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, HighLimit: highLimit, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataHighLimit) SerializeWithWriteBuffer(ctx context.C return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataHighLimit") } - // Simple Field (highLimit) - if pushErr := writeBuffer.PushContext("highLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for highLimit") - } - _highLimitErr := writeBuffer.WriteSerializable(ctx, m.GetHighLimit()) - if popErr := writeBuffer.PopContext("highLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for highLimit") - } - if _highLimitErr != nil { - return errors.Wrap(_highLimitErr, "Error serializing 'highLimit' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (highLimit) + if pushErr := writeBuffer.PushContext("highLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for highLimit") + } + _highLimitErr := writeBuffer.WriteSerializable(ctx, m.GetHighLimit()) + if popErr := writeBuffer.PopContext("highLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for highLimit") + } + if _highLimitErr != nil { + return errors.Wrap(_highLimitErr, "Error serializing 'highLimit' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataHighLimit"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataHighLimit") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataHighLimit) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataHighLimit) isBACnetConstructedDataHighLimit() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataHighLimit) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataHigherDeck.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataHigherDeck.go index 5e9cacfbdde..fcacdfc3da3 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataHigherDeck.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataHigherDeck.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataHigherDeck is the corresponding interface of BACnetConstructedDataHigherDeck type BACnetConstructedDataHigherDeck interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataHigherDeckExactly interface { // _BACnetConstructedDataHigherDeck is the data-structure of this message type _BACnetConstructedDataHigherDeck struct { *_BACnetConstructedData - HigherDeck BACnetApplicationTagObjectIdentifier + HigherDeck BACnetApplicationTagObjectIdentifier } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataHigherDeck) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataHigherDeck) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataHigherDeck) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_HIGHER_DECK -} +func (m *_BACnetConstructedDataHigherDeck) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_HIGHER_DECK} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataHigherDeck) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataHigherDeck) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataHigherDeck) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataHigherDeck) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataHigherDeck) GetActualValue() BACnetApplicationTag /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataHigherDeck factory function for _BACnetConstructedDataHigherDeck -func NewBACnetConstructedDataHigherDeck(higherDeck BACnetApplicationTagObjectIdentifier, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataHigherDeck { +func NewBACnetConstructedDataHigherDeck( higherDeck BACnetApplicationTagObjectIdentifier , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataHigherDeck { _result := &_BACnetConstructedDataHigherDeck{ - HigherDeck: higherDeck, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + HigherDeck: higherDeck, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataHigherDeck(higherDeck BACnetApplicationTagObjectIde // Deprecated: use the interface for direct cast func CastBACnetConstructedDataHigherDeck(structType interface{}) BACnetConstructedDataHigherDeck { - if casted, ok := structType.(BACnetConstructedDataHigherDeck); ok { + if casted, ok := structType.(BACnetConstructedDataHigherDeck); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataHigherDeck); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataHigherDeck) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataHigherDeck) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataHigherDeckParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("higherDeck"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for higherDeck") } - _higherDeck, _higherDeckErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_higherDeck, _higherDeckErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _higherDeckErr != nil { return nil, errors.Wrap(_higherDeckErr, "Error parsing 'higherDeck' field of BACnetConstructedDataHigherDeck") } @@ -186,7 +188,7 @@ func BACnetConstructedDataHigherDeckParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetConstructedDataHigherDeck{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, HigherDeck: higherDeck, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataHigherDeck) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataHigherDeck") } - // Simple Field (higherDeck) - if pushErr := writeBuffer.PushContext("higherDeck"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for higherDeck") - } - _higherDeckErr := writeBuffer.WriteSerializable(ctx, m.GetHigherDeck()) - if popErr := writeBuffer.PopContext("higherDeck"); popErr != nil { - return errors.Wrap(popErr, "Error popping for higherDeck") - } - if _higherDeckErr != nil { - return errors.Wrap(_higherDeckErr, "Error serializing 'higherDeck' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (higherDeck) + if pushErr := writeBuffer.PushContext("higherDeck"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for higherDeck") + } + _higherDeckErr := writeBuffer.WriteSerializable(ctx, m.GetHigherDeck()) + if popErr := writeBuffer.PopContext("higherDeck"); popErr != nil { + return errors.Wrap(popErr, "Error popping for higherDeck") + } + if _higherDeckErr != nil { + return errors.Wrap(_higherDeckErr, "Error serializing 'higherDeck' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataHigherDeck"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataHigherDeck") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataHigherDeck) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataHigherDeck) isBACnetConstructedDataHigherDeck() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataHigherDeck) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPAddress.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPAddress.go index 5d9bd91e488..c8ab5d7e0ee 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPAddress.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPAddress.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataIPAddress is the corresponding interface of BACnetConstructedDataIPAddress type BACnetConstructedDataIPAddress interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataIPAddressExactly interface { // _BACnetConstructedDataIPAddress is the data-structure of this message type _BACnetConstructedDataIPAddress struct { *_BACnetConstructedData - IpAddress BACnetApplicationTagOctetString + IpAddress BACnetApplicationTagOctetString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataIPAddress) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataIPAddress) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataIPAddress) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_IP_ADDRESS -} +func (m *_BACnetConstructedDataIPAddress) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_IP_ADDRESS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataIPAddress) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataIPAddress) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataIPAddress) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataIPAddress) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataIPAddress) GetActualValue() BACnetApplicationTagO /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataIPAddress factory function for _BACnetConstructedDataIPAddress -func NewBACnetConstructedDataIPAddress(ipAddress BACnetApplicationTagOctetString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataIPAddress { +func NewBACnetConstructedDataIPAddress( ipAddress BACnetApplicationTagOctetString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataIPAddress { _result := &_BACnetConstructedDataIPAddress{ - IpAddress: ipAddress, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + IpAddress: ipAddress, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataIPAddress(ipAddress BACnetApplicationTagOctetString // Deprecated: use the interface for direct cast func CastBACnetConstructedDataIPAddress(structType interface{}) BACnetConstructedDataIPAddress { - if casted, ok := structType.(BACnetConstructedDataIPAddress); ok { + if casted, ok := structType.(BACnetConstructedDataIPAddress); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataIPAddress); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataIPAddress) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetConstructedDataIPAddress) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataIPAddressParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("ipAddress"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for ipAddress") } - _ipAddress, _ipAddressErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_ipAddress, _ipAddressErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _ipAddressErr != nil { return nil, errors.Wrap(_ipAddressErr, "Error parsing 'ipAddress' field of BACnetConstructedDataIPAddress") } @@ -186,7 +188,7 @@ func BACnetConstructedDataIPAddressParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_BACnetConstructedDataIPAddress{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, IpAddress: ipAddress, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataIPAddress) SerializeWithWriteBuffer(ctx context.C return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataIPAddress") } - // Simple Field (ipAddress) - if pushErr := writeBuffer.PushContext("ipAddress"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for ipAddress") - } - _ipAddressErr := writeBuffer.WriteSerializable(ctx, m.GetIpAddress()) - if popErr := writeBuffer.PopContext("ipAddress"); popErr != nil { - return errors.Wrap(popErr, "Error popping for ipAddress") - } - if _ipAddressErr != nil { - return errors.Wrap(_ipAddressErr, "Error serializing 'ipAddress' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (ipAddress) + if pushErr := writeBuffer.PushContext("ipAddress"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for ipAddress") + } + _ipAddressErr := writeBuffer.WriteSerializable(ctx, m.GetIpAddress()) + if popErr := writeBuffer.PopContext("ipAddress"); popErr != nil { + return errors.Wrap(popErr, "Error popping for ipAddress") + } + if _ipAddressErr != nil { + return errors.Wrap(_ipAddressErr, "Error serializing 'ipAddress' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataIPAddress"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataIPAddress") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataIPAddress) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataIPAddress) isBACnetConstructedDataIPAddress() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataIPAddress) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPDHCPEnable.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPDHCPEnable.go index ad19ac20d7f..3aca744e349 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPDHCPEnable.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPDHCPEnable.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataIPDHCPEnable is the corresponding interface of BACnetConstructedDataIPDHCPEnable type BACnetConstructedDataIPDHCPEnable interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataIPDHCPEnableExactly interface { // _BACnetConstructedDataIPDHCPEnable is the data-structure of this message type _BACnetConstructedDataIPDHCPEnable struct { *_BACnetConstructedData - IpDhcpEnable BACnetApplicationTagBoolean + IpDhcpEnable BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataIPDHCPEnable) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataIPDHCPEnable) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataIPDHCPEnable) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_IP_DHCP_ENABLE -} +func (m *_BACnetConstructedDataIPDHCPEnable) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_IP_DHCP_ENABLE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataIPDHCPEnable) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataIPDHCPEnable) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataIPDHCPEnable) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataIPDHCPEnable) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataIPDHCPEnable) GetActualValue() BACnetApplicationT /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataIPDHCPEnable factory function for _BACnetConstructedDataIPDHCPEnable -func NewBACnetConstructedDataIPDHCPEnable(ipDhcpEnable BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataIPDHCPEnable { +func NewBACnetConstructedDataIPDHCPEnable( ipDhcpEnable BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataIPDHCPEnable { _result := &_BACnetConstructedDataIPDHCPEnable{ - IpDhcpEnable: ipDhcpEnable, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + IpDhcpEnable: ipDhcpEnable, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataIPDHCPEnable(ipDhcpEnable BACnetApplicationTagBoole // Deprecated: use the interface for direct cast func CastBACnetConstructedDataIPDHCPEnable(structType interface{}) BACnetConstructedDataIPDHCPEnable { - if casted, ok := structType.(BACnetConstructedDataIPDHCPEnable); ok { + if casted, ok := structType.(BACnetConstructedDataIPDHCPEnable); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataIPDHCPEnable); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataIPDHCPEnable) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetConstructedDataIPDHCPEnable) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataIPDHCPEnableParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("ipDhcpEnable"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for ipDhcpEnable") } - _ipDhcpEnable, _ipDhcpEnableErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_ipDhcpEnable, _ipDhcpEnableErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _ipDhcpEnableErr != nil { return nil, errors.Wrap(_ipDhcpEnableErr, "Error parsing 'ipDhcpEnable' field of BACnetConstructedDataIPDHCPEnable") } @@ -186,7 +188,7 @@ func BACnetConstructedDataIPDHCPEnableParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetConstructedDataIPDHCPEnable{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, IpDhcpEnable: ipDhcpEnable, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataIPDHCPEnable) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataIPDHCPEnable") } - // Simple Field (ipDhcpEnable) - if pushErr := writeBuffer.PushContext("ipDhcpEnable"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for ipDhcpEnable") - } - _ipDhcpEnableErr := writeBuffer.WriteSerializable(ctx, m.GetIpDhcpEnable()) - if popErr := writeBuffer.PopContext("ipDhcpEnable"); popErr != nil { - return errors.Wrap(popErr, "Error popping for ipDhcpEnable") - } - if _ipDhcpEnableErr != nil { - return errors.Wrap(_ipDhcpEnableErr, "Error serializing 'ipDhcpEnable' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (ipDhcpEnable) + if pushErr := writeBuffer.PushContext("ipDhcpEnable"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for ipDhcpEnable") + } + _ipDhcpEnableErr := writeBuffer.WriteSerializable(ctx, m.GetIpDhcpEnable()) + if popErr := writeBuffer.PopContext("ipDhcpEnable"); popErr != nil { + return errors.Wrap(popErr, "Error popping for ipDhcpEnable") + } + if _ipDhcpEnableErr != nil { + return errors.Wrap(_ipDhcpEnableErr, "Error serializing 'ipDhcpEnable' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataIPDHCPEnable"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataIPDHCPEnable") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataIPDHCPEnable) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataIPDHCPEnable) isBACnetConstructedDataIPDHCPEnable() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataIPDHCPEnable) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPDHCPLeaseTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPDHCPLeaseTime.go index 20ed51ac396..a36194dda90 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPDHCPLeaseTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPDHCPLeaseTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataIPDHCPLeaseTime is the corresponding interface of BACnetConstructedDataIPDHCPLeaseTime type BACnetConstructedDataIPDHCPLeaseTime interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataIPDHCPLeaseTimeExactly interface { // _BACnetConstructedDataIPDHCPLeaseTime is the data-structure of this message type _BACnetConstructedDataIPDHCPLeaseTime struct { *_BACnetConstructedData - IpDhcpLeaseTime BACnetApplicationTagUnsignedInteger + IpDhcpLeaseTime BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataIPDHCPLeaseTime) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataIPDHCPLeaseTime) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataIPDHCPLeaseTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_IP_DHCP_LEASE_TIME -} +func (m *_BACnetConstructedDataIPDHCPLeaseTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_IP_DHCP_LEASE_TIME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataIPDHCPLeaseTime) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataIPDHCPLeaseTime) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataIPDHCPLeaseTime) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataIPDHCPLeaseTime) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataIPDHCPLeaseTime) GetActualValue() BACnetApplicati /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataIPDHCPLeaseTime factory function for _BACnetConstructedDataIPDHCPLeaseTime -func NewBACnetConstructedDataIPDHCPLeaseTime(ipDhcpLeaseTime BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataIPDHCPLeaseTime { +func NewBACnetConstructedDataIPDHCPLeaseTime( ipDhcpLeaseTime BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataIPDHCPLeaseTime { _result := &_BACnetConstructedDataIPDHCPLeaseTime{ - IpDhcpLeaseTime: ipDhcpLeaseTime, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + IpDhcpLeaseTime: ipDhcpLeaseTime, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataIPDHCPLeaseTime(ipDhcpLeaseTime BACnetApplicationTa // Deprecated: use the interface for direct cast func CastBACnetConstructedDataIPDHCPLeaseTime(structType interface{}) BACnetConstructedDataIPDHCPLeaseTime { - if casted, ok := structType.(BACnetConstructedDataIPDHCPLeaseTime); ok { + if casted, ok := structType.(BACnetConstructedDataIPDHCPLeaseTime); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataIPDHCPLeaseTime); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataIPDHCPLeaseTime) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetConstructedDataIPDHCPLeaseTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataIPDHCPLeaseTimeParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("ipDhcpLeaseTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for ipDhcpLeaseTime") } - _ipDhcpLeaseTime, _ipDhcpLeaseTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_ipDhcpLeaseTime, _ipDhcpLeaseTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _ipDhcpLeaseTimeErr != nil { return nil, errors.Wrap(_ipDhcpLeaseTimeErr, "Error parsing 'ipDhcpLeaseTime' field of BACnetConstructedDataIPDHCPLeaseTime") } @@ -186,7 +188,7 @@ func BACnetConstructedDataIPDHCPLeaseTimeParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetConstructedDataIPDHCPLeaseTime{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, IpDhcpLeaseTime: ipDhcpLeaseTime, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataIPDHCPLeaseTime) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataIPDHCPLeaseTime") } - // Simple Field (ipDhcpLeaseTime) - if pushErr := writeBuffer.PushContext("ipDhcpLeaseTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for ipDhcpLeaseTime") - } - _ipDhcpLeaseTimeErr := writeBuffer.WriteSerializable(ctx, m.GetIpDhcpLeaseTime()) - if popErr := writeBuffer.PopContext("ipDhcpLeaseTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for ipDhcpLeaseTime") - } - if _ipDhcpLeaseTimeErr != nil { - return errors.Wrap(_ipDhcpLeaseTimeErr, "Error serializing 'ipDhcpLeaseTime' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (ipDhcpLeaseTime) + if pushErr := writeBuffer.PushContext("ipDhcpLeaseTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for ipDhcpLeaseTime") + } + _ipDhcpLeaseTimeErr := writeBuffer.WriteSerializable(ctx, m.GetIpDhcpLeaseTime()) + if popErr := writeBuffer.PopContext("ipDhcpLeaseTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for ipDhcpLeaseTime") + } + if _ipDhcpLeaseTimeErr != nil { + return errors.Wrap(_ipDhcpLeaseTimeErr, "Error serializing 'ipDhcpLeaseTime' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataIPDHCPLeaseTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataIPDHCPLeaseTime") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataIPDHCPLeaseTime) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataIPDHCPLeaseTime) isBACnetConstructedDataIPDHCPLeaseTime() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataIPDHCPLeaseTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPDHCPLeaseTimeRemaining.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPDHCPLeaseTimeRemaining.go index e054100914f..f5b1d7387ae 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPDHCPLeaseTimeRemaining.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPDHCPLeaseTimeRemaining.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataIPDHCPLeaseTimeRemaining is the corresponding interface of BACnetConstructedDataIPDHCPLeaseTimeRemaining type BACnetConstructedDataIPDHCPLeaseTimeRemaining interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataIPDHCPLeaseTimeRemainingExactly interface { // _BACnetConstructedDataIPDHCPLeaseTimeRemaining is the data-structure of this message type _BACnetConstructedDataIPDHCPLeaseTimeRemaining struct { *_BACnetConstructedData - IpDhcpLeaseTimeRemaining BACnetApplicationTagUnsignedInteger + IpDhcpLeaseTimeRemaining BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataIPDHCPLeaseTimeRemaining) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataIPDHCPLeaseTimeRemaining) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataIPDHCPLeaseTimeRemaining) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_IP_DHCP_LEASE_TIME_REMAINING -} +func (m *_BACnetConstructedDataIPDHCPLeaseTimeRemaining) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_IP_DHCP_LEASE_TIME_REMAINING} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataIPDHCPLeaseTimeRemaining) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataIPDHCPLeaseTimeRemaining) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataIPDHCPLeaseTimeRemaining) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataIPDHCPLeaseTimeRemaining) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataIPDHCPLeaseTimeRemaining) GetActualValue() BACnet /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataIPDHCPLeaseTimeRemaining factory function for _BACnetConstructedDataIPDHCPLeaseTimeRemaining -func NewBACnetConstructedDataIPDHCPLeaseTimeRemaining(ipDhcpLeaseTimeRemaining BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataIPDHCPLeaseTimeRemaining { +func NewBACnetConstructedDataIPDHCPLeaseTimeRemaining( ipDhcpLeaseTimeRemaining BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataIPDHCPLeaseTimeRemaining { _result := &_BACnetConstructedDataIPDHCPLeaseTimeRemaining{ IpDhcpLeaseTimeRemaining: ipDhcpLeaseTimeRemaining, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataIPDHCPLeaseTimeRemaining(ipDhcpLeaseTimeRemaining B // Deprecated: use the interface for direct cast func CastBACnetConstructedDataIPDHCPLeaseTimeRemaining(structType interface{}) BACnetConstructedDataIPDHCPLeaseTimeRemaining { - if casted, ok := structType.(BACnetConstructedDataIPDHCPLeaseTimeRemaining); ok { + if casted, ok := structType.(BACnetConstructedDataIPDHCPLeaseTimeRemaining); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataIPDHCPLeaseTimeRemaining); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataIPDHCPLeaseTimeRemaining) GetLengthInBits(ctx con return lengthInBits } + func (m *_BACnetConstructedDataIPDHCPLeaseTimeRemaining) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataIPDHCPLeaseTimeRemainingParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("ipDhcpLeaseTimeRemaining"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for ipDhcpLeaseTimeRemaining") } - _ipDhcpLeaseTimeRemaining, _ipDhcpLeaseTimeRemainingErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_ipDhcpLeaseTimeRemaining, _ipDhcpLeaseTimeRemainingErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _ipDhcpLeaseTimeRemainingErr != nil { return nil, errors.Wrap(_ipDhcpLeaseTimeRemainingErr, "Error parsing 'ipDhcpLeaseTimeRemaining' field of BACnetConstructedDataIPDHCPLeaseTimeRemaining") } @@ -186,7 +188,7 @@ func BACnetConstructedDataIPDHCPLeaseTimeRemainingParseWithBuffer(ctx context.Co // Create a partially initialized instance _child := &_BACnetConstructedDataIPDHCPLeaseTimeRemaining{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, IpDhcpLeaseTimeRemaining: ipDhcpLeaseTimeRemaining, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataIPDHCPLeaseTimeRemaining) SerializeWithWriteBuffe return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataIPDHCPLeaseTimeRemaining") } - // Simple Field (ipDhcpLeaseTimeRemaining) - if pushErr := writeBuffer.PushContext("ipDhcpLeaseTimeRemaining"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for ipDhcpLeaseTimeRemaining") - } - _ipDhcpLeaseTimeRemainingErr := writeBuffer.WriteSerializable(ctx, m.GetIpDhcpLeaseTimeRemaining()) - if popErr := writeBuffer.PopContext("ipDhcpLeaseTimeRemaining"); popErr != nil { - return errors.Wrap(popErr, "Error popping for ipDhcpLeaseTimeRemaining") - } - if _ipDhcpLeaseTimeRemainingErr != nil { - return errors.Wrap(_ipDhcpLeaseTimeRemainingErr, "Error serializing 'ipDhcpLeaseTimeRemaining' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (ipDhcpLeaseTimeRemaining) + if pushErr := writeBuffer.PushContext("ipDhcpLeaseTimeRemaining"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for ipDhcpLeaseTimeRemaining") + } + _ipDhcpLeaseTimeRemainingErr := writeBuffer.WriteSerializable(ctx, m.GetIpDhcpLeaseTimeRemaining()) + if popErr := writeBuffer.PopContext("ipDhcpLeaseTimeRemaining"); popErr != nil { + return errors.Wrap(popErr, "Error popping for ipDhcpLeaseTimeRemaining") + } + if _ipDhcpLeaseTimeRemainingErr != nil { + return errors.Wrap(_ipDhcpLeaseTimeRemainingErr, "Error serializing 'ipDhcpLeaseTimeRemaining' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataIPDHCPLeaseTimeRemaining"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataIPDHCPLeaseTimeRemaining") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataIPDHCPLeaseTimeRemaining) SerializeWithWriteBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataIPDHCPLeaseTimeRemaining) isBACnetConstructedDataIPDHCPLeaseTimeRemaining() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataIPDHCPLeaseTimeRemaining) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPDHCPServer.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPDHCPServer.go index 3dbf299ac19..d2750d926e3 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPDHCPServer.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPDHCPServer.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataIPDHCPServer is the corresponding interface of BACnetConstructedDataIPDHCPServer type BACnetConstructedDataIPDHCPServer interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataIPDHCPServerExactly interface { // _BACnetConstructedDataIPDHCPServer is the data-structure of this message type _BACnetConstructedDataIPDHCPServer struct { *_BACnetConstructedData - DhcpServer BACnetApplicationTagOctetString + DhcpServer BACnetApplicationTagOctetString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataIPDHCPServer) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataIPDHCPServer) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataIPDHCPServer) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_IP_DHCP_SERVER -} +func (m *_BACnetConstructedDataIPDHCPServer) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_IP_DHCP_SERVER} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataIPDHCPServer) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataIPDHCPServer) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataIPDHCPServer) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataIPDHCPServer) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataIPDHCPServer) GetActualValue() BACnetApplicationT /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataIPDHCPServer factory function for _BACnetConstructedDataIPDHCPServer -func NewBACnetConstructedDataIPDHCPServer(dhcpServer BACnetApplicationTagOctetString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataIPDHCPServer { +func NewBACnetConstructedDataIPDHCPServer( dhcpServer BACnetApplicationTagOctetString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataIPDHCPServer { _result := &_BACnetConstructedDataIPDHCPServer{ - DhcpServer: dhcpServer, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + DhcpServer: dhcpServer, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataIPDHCPServer(dhcpServer BACnetApplicationTagOctetSt // Deprecated: use the interface for direct cast func CastBACnetConstructedDataIPDHCPServer(structType interface{}) BACnetConstructedDataIPDHCPServer { - if casted, ok := structType.(BACnetConstructedDataIPDHCPServer); ok { + if casted, ok := structType.(BACnetConstructedDataIPDHCPServer); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataIPDHCPServer); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataIPDHCPServer) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetConstructedDataIPDHCPServer) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataIPDHCPServerParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("dhcpServer"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for dhcpServer") } - _dhcpServer, _dhcpServerErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_dhcpServer, _dhcpServerErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _dhcpServerErr != nil { return nil, errors.Wrap(_dhcpServerErr, "Error parsing 'dhcpServer' field of BACnetConstructedDataIPDHCPServer") } @@ -186,7 +188,7 @@ func BACnetConstructedDataIPDHCPServerParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetConstructedDataIPDHCPServer{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, DhcpServer: dhcpServer, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataIPDHCPServer) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataIPDHCPServer") } - // Simple Field (dhcpServer) - if pushErr := writeBuffer.PushContext("dhcpServer"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for dhcpServer") - } - _dhcpServerErr := writeBuffer.WriteSerializable(ctx, m.GetDhcpServer()) - if popErr := writeBuffer.PopContext("dhcpServer"); popErr != nil { - return errors.Wrap(popErr, "Error popping for dhcpServer") - } - if _dhcpServerErr != nil { - return errors.Wrap(_dhcpServerErr, "Error serializing 'dhcpServer' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (dhcpServer) + if pushErr := writeBuffer.PushContext("dhcpServer"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for dhcpServer") + } + _dhcpServerErr := writeBuffer.WriteSerializable(ctx, m.GetDhcpServer()) + if popErr := writeBuffer.PopContext("dhcpServer"); popErr != nil { + return errors.Wrap(popErr, "Error popping for dhcpServer") + } + if _dhcpServerErr != nil { + return errors.Wrap(_dhcpServerErr, "Error serializing 'dhcpServer' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataIPDHCPServer"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataIPDHCPServer") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataIPDHCPServer) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataIPDHCPServer) isBACnetConstructedDataIPDHCPServer() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataIPDHCPServer) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPDNSServer.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPDNSServer.go index 34e99dc28c5..988199426a0 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPDNSServer.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPDNSServer.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataIPDNSServer is the corresponding interface of BACnetConstructedDataIPDNSServer type BACnetConstructedDataIPDNSServer interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataIPDNSServerExactly interface { // _BACnetConstructedDataIPDNSServer is the data-structure of this message type _BACnetConstructedDataIPDNSServer struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - IpDnsServer []BACnetApplicationTagOctetString + NumberOfDataElements BACnetApplicationTagUnsignedInteger + IpDnsServer []BACnetApplicationTagOctetString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataIPDNSServer) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataIPDNSServer) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataIPDNSServer) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_IP_DNS_SERVER -} +func (m *_BACnetConstructedDataIPDNSServer) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_IP_DNS_SERVER} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataIPDNSServer) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataIPDNSServer) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataIPDNSServer) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataIPDNSServer) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataIPDNSServer) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataIPDNSServer factory function for _BACnetConstructedDataIPDNSServer -func NewBACnetConstructedDataIPDNSServer(numberOfDataElements BACnetApplicationTagUnsignedInteger, ipDnsServer []BACnetApplicationTagOctetString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataIPDNSServer { +func NewBACnetConstructedDataIPDNSServer( numberOfDataElements BACnetApplicationTagUnsignedInteger , ipDnsServer []BACnetApplicationTagOctetString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataIPDNSServer { _result := &_BACnetConstructedDataIPDNSServer{ - NumberOfDataElements: numberOfDataElements, - IpDnsServer: ipDnsServer, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + IpDnsServer: ipDnsServer, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataIPDNSServer(numberOfDataElements BACnetApplicationT // Deprecated: use the interface for direct cast func CastBACnetConstructedDataIPDNSServer(structType interface{}) BACnetConstructedDataIPDNSServer { - if casted, ok := structType.(BACnetConstructedDataIPDNSServer); ok { + if casted, ok := structType.(BACnetConstructedDataIPDNSServer); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataIPDNSServer); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataIPDNSServer) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataIPDNSServer) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataIPDNSServerParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataIPDNSServerParseWithBuffer(ctx context.Context, readBu // Terminated array var ipDnsServer []BACnetApplicationTagOctetString { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'ipDnsServer' field of BACnetConstructedDataIPDNSServer") } @@ -235,11 +237,11 @@ func BACnetConstructedDataIPDNSServerParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataIPDNSServer{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - IpDnsServer: ipDnsServer, + IpDnsServer: ipDnsServer, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataIPDNSServer) SerializeWithWriteBuffer(ctx context if pushErr := writeBuffer.PushContext("BACnetConstructedDataIPDNSServer"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataIPDNSServer") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (ipDnsServer) - if pushErr := writeBuffer.PushContext("ipDnsServer", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for ipDnsServer") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetIpDnsServer() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetIpDnsServer()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'ipDnsServer' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("ipDnsServer", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for ipDnsServer") + } + + // Array Field (ipDnsServer) + if pushErr := writeBuffer.PushContext("ipDnsServer", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for ipDnsServer") + } + for _curItem, _element := range m.GetIpDnsServer() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetIpDnsServer()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'ipDnsServer' field") } + } + if popErr := writeBuffer.PopContext("ipDnsServer", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for ipDnsServer") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataIPDNSServer"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataIPDNSServer") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataIPDNSServer) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataIPDNSServer) isBACnetConstructedDataIPDNSServer() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataIPDNSServer) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPDefaultGateway.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPDefaultGateway.go index 8e112a1ada4..8e401f1783c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPDefaultGateway.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPDefaultGateway.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataIPDefaultGateway is the corresponding interface of BACnetConstructedDataIPDefaultGateway type BACnetConstructedDataIPDefaultGateway interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataIPDefaultGatewayExactly interface { // _BACnetConstructedDataIPDefaultGateway is the data-structure of this message type _BACnetConstructedDataIPDefaultGateway struct { *_BACnetConstructedData - IpDefaultGateway BACnetApplicationTagOctetString + IpDefaultGateway BACnetApplicationTagOctetString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataIPDefaultGateway) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataIPDefaultGateway) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataIPDefaultGateway) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_IP_DEFAULT_GATEWAY -} +func (m *_BACnetConstructedDataIPDefaultGateway) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_IP_DEFAULT_GATEWAY} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataIPDefaultGateway) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataIPDefaultGateway) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataIPDefaultGateway) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataIPDefaultGateway) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataIPDefaultGateway) GetActualValue() BACnetApplicat /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataIPDefaultGateway factory function for _BACnetConstructedDataIPDefaultGateway -func NewBACnetConstructedDataIPDefaultGateway(ipDefaultGateway BACnetApplicationTagOctetString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataIPDefaultGateway { +func NewBACnetConstructedDataIPDefaultGateway( ipDefaultGateway BACnetApplicationTagOctetString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataIPDefaultGateway { _result := &_BACnetConstructedDataIPDefaultGateway{ - IpDefaultGateway: ipDefaultGateway, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + IpDefaultGateway: ipDefaultGateway, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataIPDefaultGateway(ipDefaultGateway BACnetApplication // Deprecated: use the interface for direct cast func CastBACnetConstructedDataIPDefaultGateway(structType interface{}) BACnetConstructedDataIPDefaultGateway { - if casted, ok := structType.(BACnetConstructedDataIPDefaultGateway); ok { + if casted, ok := structType.(BACnetConstructedDataIPDefaultGateway); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataIPDefaultGateway); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataIPDefaultGateway) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetConstructedDataIPDefaultGateway) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataIPDefaultGatewayParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("ipDefaultGateway"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for ipDefaultGateway") } - _ipDefaultGateway, _ipDefaultGatewayErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_ipDefaultGateway, _ipDefaultGatewayErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _ipDefaultGatewayErr != nil { return nil, errors.Wrap(_ipDefaultGatewayErr, "Error parsing 'ipDefaultGateway' field of BACnetConstructedDataIPDefaultGateway") } @@ -186,7 +188,7 @@ func BACnetConstructedDataIPDefaultGatewayParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_BACnetConstructedDataIPDefaultGateway{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, IpDefaultGateway: ipDefaultGateway, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataIPDefaultGateway) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataIPDefaultGateway") } - // Simple Field (ipDefaultGateway) - if pushErr := writeBuffer.PushContext("ipDefaultGateway"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for ipDefaultGateway") - } - _ipDefaultGatewayErr := writeBuffer.WriteSerializable(ctx, m.GetIpDefaultGateway()) - if popErr := writeBuffer.PopContext("ipDefaultGateway"); popErr != nil { - return errors.Wrap(popErr, "Error popping for ipDefaultGateway") - } - if _ipDefaultGatewayErr != nil { - return errors.Wrap(_ipDefaultGatewayErr, "Error serializing 'ipDefaultGateway' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (ipDefaultGateway) + if pushErr := writeBuffer.PushContext("ipDefaultGateway"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for ipDefaultGateway") + } + _ipDefaultGatewayErr := writeBuffer.WriteSerializable(ctx, m.GetIpDefaultGateway()) + if popErr := writeBuffer.PopContext("ipDefaultGateway"); popErr != nil { + return errors.Wrap(popErr, "Error popping for ipDefaultGateway") + } + if _ipDefaultGatewayErr != nil { + return errors.Wrap(_ipDefaultGatewayErr, "Error serializing 'ipDefaultGateway' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataIPDefaultGateway"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataIPDefaultGateway") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataIPDefaultGateway) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataIPDefaultGateway) isBACnetConstructedDataIPDefaultGateway() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataIPDefaultGateway) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPSubnetMask.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPSubnetMask.go index 48c9dd637b2..24d93c60ff8 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPSubnetMask.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPSubnetMask.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataIPSubnetMask is the corresponding interface of BACnetConstructedDataIPSubnetMask type BACnetConstructedDataIPSubnetMask interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataIPSubnetMaskExactly interface { // _BACnetConstructedDataIPSubnetMask is the data-structure of this message type _BACnetConstructedDataIPSubnetMask struct { *_BACnetConstructedData - IpSubnetMask BACnetApplicationTagOctetString + IpSubnetMask BACnetApplicationTagOctetString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataIPSubnetMask) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataIPSubnetMask) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataIPSubnetMask) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_IP_SUBNET_MASK -} +func (m *_BACnetConstructedDataIPSubnetMask) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_IP_SUBNET_MASK} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataIPSubnetMask) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataIPSubnetMask) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataIPSubnetMask) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataIPSubnetMask) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataIPSubnetMask) GetActualValue() BACnetApplicationT /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataIPSubnetMask factory function for _BACnetConstructedDataIPSubnetMask -func NewBACnetConstructedDataIPSubnetMask(ipSubnetMask BACnetApplicationTagOctetString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataIPSubnetMask { +func NewBACnetConstructedDataIPSubnetMask( ipSubnetMask BACnetApplicationTagOctetString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataIPSubnetMask { _result := &_BACnetConstructedDataIPSubnetMask{ - IpSubnetMask: ipSubnetMask, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + IpSubnetMask: ipSubnetMask, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataIPSubnetMask(ipSubnetMask BACnetApplicationTagOctet // Deprecated: use the interface for direct cast func CastBACnetConstructedDataIPSubnetMask(structType interface{}) BACnetConstructedDataIPSubnetMask { - if casted, ok := structType.(BACnetConstructedDataIPSubnetMask); ok { + if casted, ok := structType.(BACnetConstructedDataIPSubnetMask); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataIPSubnetMask); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataIPSubnetMask) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetConstructedDataIPSubnetMask) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataIPSubnetMaskParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("ipSubnetMask"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for ipSubnetMask") } - _ipSubnetMask, _ipSubnetMaskErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_ipSubnetMask, _ipSubnetMaskErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _ipSubnetMaskErr != nil { return nil, errors.Wrap(_ipSubnetMaskErr, "Error parsing 'ipSubnetMask' field of BACnetConstructedDataIPSubnetMask") } @@ -186,7 +188,7 @@ func BACnetConstructedDataIPSubnetMaskParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetConstructedDataIPSubnetMask{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, IpSubnetMask: ipSubnetMask, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataIPSubnetMask) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataIPSubnetMask") } - // Simple Field (ipSubnetMask) - if pushErr := writeBuffer.PushContext("ipSubnetMask"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for ipSubnetMask") - } - _ipSubnetMaskErr := writeBuffer.WriteSerializable(ctx, m.GetIpSubnetMask()) - if popErr := writeBuffer.PopContext("ipSubnetMask"); popErr != nil { - return errors.Wrap(popErr, "Error popping for ipSubnetMask") - } - if _ipSubnetMaskErr != nil { - return errors.Wrap(_ipSubnetMaskErr, "Error serializing 'ipSubnetMask' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (ipSubnetMask) + if pushErr := writeBuffer.PushContext("ipSubnetMask"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for ipSubnetMask") + } + _ipSubnetMaskErr := writeBuffer.WriteSerializable(ctx, m.GetIpSubnetMask()) + if popErr := writeBuffer.PopContext("ipSubnetMask"); popErr != nil { + return errors.Wrap(popErr, "Error popping for ipSubnetMask") + } + if _ipSubnetMaskErr != nil { + return errors.Wrap(_ipSubnetMaskErr, "Error serializing 'ipSubnetMask' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataIPSubnetMask"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataIPSubnetMask") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataIPSubnetMask) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataIPSubnetMask) isBACnetConstructedDataIPSubnetMask() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataIPSubnetMask) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPv6Address.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPv6Address.go index 46ec12e945b..70da50ea9d1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPv6Address.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPv6Address.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataIPv6Address is the corresponding interface of BACnetConstructedDataIPv6Address type BACnetConstructedDataIPv6Address interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataIPv6AddressExactly interface { // _BACnetConstructedDataIPv6Address is the data-structure of this message type _BACnetConstructedDataIPv6Address struct { *_BACnetConstructedData - Ipv6Address BACnetApplicationTagOctetString + Ipv6Address BACnetApplicationTagOctetString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataIPv6Address) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataIPv6Address) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataIPv6Address) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_IPV6_ADDRESS -} +func (m *_BACnetConstructedDataIPv6Address) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_IPV6_ADDRESS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataIPv6Address) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataIPv6Address) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataIPv6Address) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataIPv6Address) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataIPv6Address) GetActualValue() BACnetApplicationTa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataIPv6Address factory function for _BACnetConstructedDataIPv6Address -func NewBACnetConstructedDataIPv6Address(ipv6Address BACnetApplicationTagOctetString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataIPv6Address { +func NewBACnetConstructedDataIPv6Address( ipv6Address BACnetApplicationTagOctetString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataIPv6Address { _result := &_BACnetConstructedDataIPv6Address{ - Ipv6Address: ipv6Address, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Ipv6Address: ipv6Address, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataIPv6Address(ipv6Address BACnetApplicationTagOctetSt // Deprecated: use the interface for direct cast func CastBACnetConstructedDataIPv6Address(structType interface{}) BACnetConstructedDataIPv6Address { - if casted, ok := structType.(BACnetConstructedDataIPv6Address); ok { + if casted, ok := structType.(BACnetConstructedDataIPv6Address); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataIPv6Address); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataIPv6Address) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataIPv6Address) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataIPv6AddressParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("ipv6Address"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for ipv6Address") } - _ipv6Address, _ipv6AddressErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_ipv6Address, _ipv6AddressErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _ipv6AddressErr != nil { return nil, errors.Wrap(_ipv6AddressErr, "Error parsing 'ipv6Address' field of BACnetConstructedDataIPv6Address") } @@ -186,7 +188,7 @@ func BACnetConstructedDataIPv6AddressParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataIPv6Address{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Ipv6Address: ipv6Address, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataIPv6Address) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataIPv6Address") } - // Simple Field (ipv6Address) - if pushErr := writeBuffer.PushContext("ipv6Address"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for ipv6Address") - } - _ipv6AddressErr := writeBuffer.WriteSerializable(ctx, m.GetIpv6Address()) - if popErr := writeBuffer.PopContext("ipv6Address"); popErr != nil { - return errors.Wrap(popErr, "Error popping for ipv6Address") - } - if _ipv6AddressErr != nil { - return errors.Wrap(_ipv6AddressErr, "Error serializing 'ipv6Address' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (ipv6Address) + if pushErr := writeBuffer.PushContext("ipv6Address"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for ipv6Address") + } + _ipv6AddressErr := writeBuffer.WriteSerializable(ctx, m.GetIpv6Address()) + if popErr := writeBuffer.PopContext("ipv6Address"); popErr != nil { + return errors.Wrap(popErr, "Error popping for ipv6Address") + } + if _ipv6AddressErr != nil { + return errors.Wrap(_ipv6AddressErr, "Error serializing 'ipv6Address' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataIPv6Address"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataIPv6Address") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataIPv6Address) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataIPv6Address) isBACnetConstructedDataIPv6Address() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataIPv6Address) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPv6AutoAddressingEnable.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPv6AutoAddressingEnable.go index 4484e1126f1..238cb80df5d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPv6AutoAddressingEnable.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPv6AutoAddressingEnable.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataIPv6AutoAddressingEnable is the corresponding interface of BACnetConstructedDataIPv6AutoAddressingEnable type BACnetConstructedDataIPv6AutoAddressingEnable interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataIPv6AutoAddressingEnableExactly interface { // _BACnetConstructedDataIPv6AutoAddressingEnable is the data-structure of this message type _BACnetConstructedDataIPv6AutoAddressingEnable struct { *_BACnetConstructedData - AutoAddressingEnable BACnetApplicationTagBoolean + AutoAddressingEnable BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataIPv6AutoAddressingEnable) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataIPv6AutoAddressingEnable) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataIPv6AutoAddressingEnable) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_IPV6_AUTO_ADDRESSING_ENABLE -} +func (m *_BACnetConstructedDataIPv6AutoAddressingEnable) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_IPV6_AUTO_ADDRESSING_ENABLE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataIPv6AutoAddressingEnable) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataIPv6AutoAddressingEnable) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataIPv6AutoAddressingEnable) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataIPv6AutoAddressingEnable) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataIPv6AutoAddressingEnable) GetActualValue() BACnet /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataIPv6AutoAddressingEnable factory function for _BACnetConstructedDataIPv6AutoAddressingEnable -func NewBACnetConstructedDataIPv6AutoAddressingEnable(autoAddressingEnable BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataIPv6AutoAddressingEnable { +func NewBACnetConstructedDataIPv6AutoAddressingEnable( autoAddressingEnable BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataIPv6AutoAddressingEnable { _result := &_BACnetConstructedDataIPv6AutoAddressingEnable{ - AutoAddressingEnable: autoAddressingEnable, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + AutoAddressingEnable: autoAddressingEnable, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataIPv6AutoAddressingEnable(autoAddressingEnable BACne // Deprecated: use the interface for direct cast func CastBACnetConstructedDataIPv6AutoAddressingEnable(structType interface{}) BACnetConstructedDataIPv6AutoAddressingEnable { - if casted, ok := structType.(BACnetConstructedDataIPv6AutoAddressingEnable); ok { + if casted, ok := structType.(BACnetConstructedDataIPv6AutoAddressingEnable); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataIPv6AutoAddressingEnable); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataIPv6AutoAddressingEnable) GetLengthInBits(ctx con return lengthInBits } + func (m *_BACnetConstructedDataIPv6AutoAddressingEnable) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataIPv6AutoAddressingEnableParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("autoAddressingEnable"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for autoAddressingEnable") } - _autoAddressingEnable, _autoAddressingEnableErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_autoAddressingEnable, _autoAddressingEnableErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _autoAddressingEnableErr != nil { return nil, errors.Wrap(_autoAddressingEnableErr, "Error parsing 'autoAddressingEnable' field of BACnetConstructedDataIPv6AutoAddressingEnable") } @@ -186,7 +188,7 @@ func BACnetConstructedDataIPv6AutoAddressingEnableParseWithBuffer(ctx context.Co // Create a partially initialized instance _child := &_BACnetConstructedDataIPv6AutoAddressingEnable{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, AutoAddressingEnable: autoAddressingEnable, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataIPv6AutoAddressingEnable) SerializeWithWriteBuffe return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataIPv6AutoAddressingEnable") } - // Simple Field (autoAddressingEnable) - if pushErr := writeBuffer.PushContext("autoAddressingEnable"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for autoAddressingEnable") - } - _autoAddressingEnableErr := writeBuffer.WriteSerializable(ctx, m.GetAutoAddressingEnable()) - if popErr := writeBuffer.PopContext("autoAddressingEnable"); popErr != nil { - return errors.Wrap(popErr, "Error popping for autoAddressingEnable") - } - if _autoAddressingEnableErr != nil { - return errors.Wrap(_autoAddressingEnableErr, "Error serializing 'autoAddressingEnable' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (autoAddressingEnable) + if pushErr := writeBuffer.PushContext("autoAddressingEnable"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for autoAddressingEnable") + } + _autoAddressingEnableErr := writeBuffer.WriteSerializable(ctx, m.GetAutoAddressingEnable()) + if popErr := writeBuffer.PopContext("autoAddressingEnable"); popErr != nil { + return errors.Wrap(popErr, "Error popping for autoAddressingEnable") + } + if _autoAddressingEnableErr != nil { + return errors.Wrap(_autoAddressingEnableErr, "Error serializing 'autoAddressingEnable' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataIPv6AutoAddressingEnable"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataIPv6AutoAddressingEnable") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataIPv6AutoAddressingEnable) SerializeWithWriteBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataIPv6AutoAddressingEnable) isBACnetConstructedDataIPv6AutoAddressingEnable() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataIPv6AutoAddressingEnable) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPv6DHCPLeaseTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPv6DHCPLeaseTime.go index f0fef8dc920..4016211ae7e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPv6DHCPLeaseTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPv6DHCPLeaseTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataIPv6DHCPLeaseTime is the corresponding interface of BACnetConstructedDataIPv6DHCPLeaseTime type BACnetConstructedDataIPv6DHCPLeaseTime interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataIPv6DHCPLeaseTimeExactly interface { // _BACnetConstructedDataIPv6DHCPLeaseTime is the data-structure of this message type _BACnetConstructedDataIPv6DHCPLeaseTime struct { *_BACnetConstructedData - Ipv6DhcpLeaseTime BACnetApplicationTagUnsignedInteger + Ipv6DhcpLeaseTime BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataIPv6DHCPLeaseTime) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataIPv6DHCPLeaseTime) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataIPv6DHCPLeaseTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_IPV6_DHCP_LEASE_TIME -} +func (m *_BACnetConstructedDataIPv6DHCPLeaseTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_IPV6_DHCP_LEASE_TIME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataIPv6DHCPLeaseTime) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataIPv6DHCPLeaseTime) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataIPv6DHCPLeaseTime) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataIPv6DHCPLeaseTime) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataIPv6DHCPLeaseTime) GetActualValue() BACnetApplica /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataIPv6DHCPLeaseTime factory function for _BACnetConstructedDataIPv6DHCPLeaseTime -func NewBACnetConstructedDataIPv6DHCPLeaseTime(ipv6DhcpLeaseTime BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataIPv6DHCPLeaseTime { +func NewBACnetConstructedDataIPv6DHCPLeaseTime( ipv6DhcpLeaseTime BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataIPv6DHCPLeaseTime { _result := &_BACnetConstructedDataIPv6DHCPLeaseTime{ - Ipv6DhcpLeaseTime: ipv6DhcpLeaseTime, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Ipv6DhcpLeaseTime: ipv6DhcpLeaseTime, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataIPv6DHCPLeaseTime(ipv6DhcpLeaseTime BACnetApplicati // Deprecated: use the interface for direct cast func CastBACnetConstructedDataIPv6DHCPLeaseTime(structType interface{}) BACnetConstructedDataIPv6DHCPLeaseTime { - if casted, ok := structType.(BACnetConstructedDataIPv6DHCPLeaseTime); ok { + if casted, ok := structType.(BACnetConstructedDataIPv6DHCPLeaseTime); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataIPv6DHCPLeaseTime); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataIPv6DHCPLeaseTime) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetConstructedDataIPv6DHCPLeaseTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataIPv6DHCPLeaseTimeParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("ipv6DhcpLeaseTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for ipv6DhcpLeaseTime") } - _ipv6DhcpLeaseTime, _ipv6DhcpLeaseTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_ipv6DhcpLeaseTime, _ipv6DhcpLeaseTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _ipv6DhcpLeaseTimeErr != nil { return nil, errors.Wrap(_ipv6DhcpLeaseTimeErr, "Error parsing 'ipv6DhcpLeaseTime' field of BACnetConstructedDataIPv6DHCPLeaseTime") } @@ -186,7 +188,7 @@ func BACnetConstructedDataIPv6DHCPLeaseTimeParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataIPv6DHCPLeaseTime{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Ipv6DhcpLeaseTime: ipv6DhcpLeaseTime, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataIPv6DHCPLeaseTime) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataIPv6DHCPLeaseTime") } - // Simple Field (ipv6DhcpLeaseTime) - if pushErr := writeBuffer.PushContext("ipv6DhcpLeaseTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for ipv6DhcpLeaseTime") - } - _ipv6DhcpLeaseTimeErr := writeBuffer.WriteSerializable(ctx, m.GetIpv6DhcpLeaseTime()) - if popErr := writeBuffer.PopContext("ipv6DhcpLeaseTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for ipv6DhcpLeaseTime") - } - if _ipv6DhcpLeaseTimeErr != nil { - return errors.Wrap(_ipv6DhcpLeaseTimeErr, "Error serializing 'ipv6DhcpLeaseTime' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (ipv6DhcpLeaseTime) + if pushErr := writeBuffer.PushContext("ipv6DhcpLeaseTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for ipv6DhcpLeaseTime") + } + _ipv6DhcpLeaseTimeErr := writeBuffer.WriteSerializable(ctx, m.GetIpv6DhcpLeaseTime()) + if popErr := writeBuffer.PopContext("ipv6DhcpLeaseTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for ipv6DhcpLeaseTime") + } + if _ipv6DhcpLeaseTimeErr != nil { + return errors.Wrap(_ipv6DhcpLeaseTimeErr, "Error serializing 'ipv6DhcpLeaseTime' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataIPv6DHCPLeaseTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataIPv6DHCPLeaseTime") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataIPv6DHCPLeaseTime) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataIPv6DHCPLeaseTime) isBACnetConstructedDataIPv6DHCPLeaseTime() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataIPv6DHCPLeaseTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPv6DHCPLeaseTimeRemaining.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPv6DHCPLeaseTimeRemaining.go index 416501b8fd0..ba84e351444 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPv6DHCPLeaseTimeRemaining.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPv6DHCPLeaseTimeRemaining.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataIPv6DHCPLeaseTimeRemaining is the corresponding interface of BACnetConstructedDataIPv6DHCPLeaseTimeRemaining type BACnetConstructedDataIPv6DHCPLeaseTimeRemaining interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataIPv6DHCPLeaseTimeRemainingExactly interface { // _BACnetConstructedDataIPv6DHCPLeaseTimeRemaining is the data-structure of this message type _BACnetConstructedDataIPv6DHCPLeaseTimeRemaining struct { *_BACnetConstructedData - Ipv6DhcpLeaseTimeRemaining BACnetApplicationTagUnsignedInteger + Ipv6DhcpLeaseTimeRemaining BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataIPv6DHCPLeaseTimeRemaining) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataIPv6DHCPLeaseTimeRemaining) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataIPv6DHCPLeaseTimeRemaining) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_IPV6_DHCP_LEASE_TIME_REMAINING -} +func (m *_BACnetConstructedDataIPv6DHCPLeaseTimeRemaining) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_IPV6_DHCP_LEASE_TIME_REMAINING} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataIPv6DHCPLeaseTimeRemaining) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataIPv6DHCPLeaseTimeRemaining) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataIPv6DHCPLeaseTimeRemaining) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataIPv6DHCPLeaseTimeRemaining) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataIPv6DHCPLeaseTimeRemaining) GetActualValue() BACn /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataIPv6DHCPLeaseTimeRemaining factory function for _BACnetConstructedDataIPv6DHCPLeaseTimeRemaining -func NewBACnetConstructedDataIPv6DHCPLeaseTimeRemaining(ipv6DhcpLeaseTimeRemaining BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataIPv6DHCPLeaseTimeRemaining { +func NewBACnetConstructedDataIPv6DHCPLeaseTimeRemaining( ipv6DhcpLeaseTimeRemaining BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataIPv6DHCPLeaseTimeRemaining { _result := &_BACnetConstructedDataIPv6DHCPLeaseTimeRemaining{ Ipv6DhcpLeaseTimeRemaining: ipv6DhcpLeaseTimeRemaining, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataIPv6DHCPLeaseTimeRemaining(ipv6DhcpLeaseTimeRemaini // Deprecated: use the interface for direct cast func CastBACnetConstructedDataIPv6DHCPLeaseTimeRemaining(structType interface{}) BACnetConstructedDataIPv6DHCPLeaseTimeRemaining { - if casted, ok := structType.(BACnetConstructedDataIPv6DHCPLeaseTimeRemaining); ok { + if casted, ok := structType.(BACnetConstructedDataIPv6DHCPLeaseTimeRemaining); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataIPv6DHCPLeaseTimeRemaining); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataIPv6DHCPLeaseTimeRemaining) GetLengthInBits(ctx c return lengthInBits } + func (m *_BACnetConstructedDataIPv6DHCPLeaseTimeRemaining) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataIPv6DHCPLeaseTimeRemainingParseWithBuffer(ctx context. if pullErr := readBuffer.PullContext("ipv6DhcpLeaseTimeRemaining"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for ipv6DhcpLeaseTimeRemaining") } - _ipv6DhcpLeaseTimeRemaining, _ipv6DhcpLeaseTimeRemainingErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_ipv6DhcpLeaseTimeRemaining, _ipv6DhcpLeaseTimeRemainingErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _ipv6DhcpLeaseTimeRemainingErr != nil { return nil, errors.Wrap(_ipv6DhcpLeaseTimeRemainingErr, "Error parsing 'ipv6DhcpLeaseTimeRemaining' field of BACnetConstructedDataIPv6DHCPLeaseTimeRemaining") } @@ -186,7 +188,7 @@ func BACnetConstructedDataIPv6DHCPLeaseTimeRemainingParseWithBuffer(ctx context. // Create a partially initialized instance _child := &_BACnetConstructedDataIPv6DHCPLeaseTimeRemaining{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Ipv6DhcpLeaseTimeRemaining: ipv6DhcpLeaseTimeRemaining, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataIPv6DHCPLeaseTimeRemaining) SerializeWithWriteBuf return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataIPv6DHCPLeaseTimeRemaining") } - // Simple Field (ipv6DhcpLeaseTimeRemaining) - if pushErr := writeBuffer.PushContext("ipv6DhcpLeaseTimeRemaining"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for ipv6DhcpLeaseTimeRemaining") - } - _ipv6DhcpLeaseTimeRemainingErr := writeBuffer.WriteSerializable(ctx, m.GetIpv6DhcpLeaseTimeRemaining()) - if popErr := writeBuffer.PopContext("ipv6DhcpLeaseTimeRemaining"); popErr != nil { - return errors.Wrap(popErr, "Error popping for ipv6DhcpLeaseTimeRemaining") - } - if _ipv6DhcpLeaseTimeRemainingErr != nil { - return errors.Wrap(_ipv6DhcpLeaseTimeRemainingErr, "Error serializing 'ipv6DhcpLeaseTimeRemaining' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (ipv6DhcpLeaseTimeRemaining) + if pushErr := writeBuffer.PushContext("ipv6DhcpLeaseTimeRemaining"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for ipv6DhcpLeaseTimeRemaining") + } + _ipv6DhcpLeaseTimeRemainingErr := writeBuffer.WriteSerializable(ctx, m.GetIpv6DhcpLeaseTimeRemaining()) + if popErr := writeBuffer.PopContext("ipv6DhcpLeaseTimeRemaining"); popErr != nil { + return errors.Wrap(popErr, "Error popping for ipv6DhcpLeaseTimeRemaining") + } + if _ipv6DhcpLeaseTimeRemainingErr != nil { + return errors.Wrap(_ipv6DhcpLeaseTimeRemainingErr, "Error serializing 'ipv6DhcpLeaseTimeRemaining' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataIPv6DHCPLeaseTimeRemaining"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataIPv6DHCPLeaseTimeRemaining") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataIPv6DHCPLeaseTimeRemaining) SerializeWithWriteBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataIPv6DHCPLeaseTimeRemaining) isBACnetConstructedDataIPv6DHCPLeaseTimeRemaining() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataIPv6DHCPLeaseTimeRemaining) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPv6DHCPServer.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPv6DHCPServer.go index aa6ac50b64c..ef41d94da1b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPv6DHCPServer.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPv6DHCPServer.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataIPv6DHCPServer is the corresponding interface of BACnetConstructedDataIPv6DHCPServer type BACnetConstructedDataIPv6DHCPServer interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataIPv6DHCPServerExactly interface { // _BACnetConstructedDataIPv6DHCPServer is the data-structure of this message type _BACnetConstructedDataIPv6DHCPServer struct { *_BACnetConstructedData - DhcpServer BACnetApplicationTagOctetString + DhcpServer BACnetApplicationTagOctetString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataIPv6DHCPServer) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataIPv6DHCPServer) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataIPv6DHCPServer) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_IPV6_DHCP_SERVER -} +func (m *_BACnetConstructedDataIPv6DHCPServer) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_IPV6_DHCP_SERVER} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataIPv6DHCPServer) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataIPv6DHCPServer) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataIPv6DHCPServer) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataIPv6DHCPServer) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataIPv6DHCPServer) GetActualValue() BACnetApplicatio /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataIPv6DHCPServer factory function for _BACnetConstructedDataIPv6DHCPServer -func NewBACnetConstructedDataIPv6DHCPServer(dhcpServer BACnetApplicationTagOctetString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataIPv6DHCPServer { +func NewBACnetConstructedDataIPv6DHCPServer( dhcpServer BACnetApplicationTagOctetString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataIPv6DHCPServer { _result := &_BACnetConstructedDataIPv6DHCPServer{ - DhcpServer: dhcpServer, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + DhcpServer: dhcpServer, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataIPv6DHCPServer(dhcpServer BACnetApplicationTagOctet // Deprecated: use the interface for direct cast func CastBACnetConstructedDataIPv6DHCPServer(structType interface{}) BACnetConstructedDataIPv6DHCPServer { - if casted, ok := structType.(BACnetConstructedDataIPv6DHCPServer); ok { + if casted, ok := structType.(BACnetConstructedDataIPv6DHCPServer); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataIPv6DHCPServer); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataIPv6DHCPServer) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConstructedDataIPv6DHCPServer) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataIPv6DHCPServerParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("dhcpServer"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for dhcpServer") } - _dhcpServer, _dhcpServerErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_dhcpServer, _dhcpServerErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _dhcpServerErr != nil { return nil, errors.Wrap(_dhcpServerErr, "Error parsing 'dhcpServer' field of BACnetConstructedDataIPv6DHCPServer") } @@ -186,7 +188,7 @@ func BACnetConstructedDataIPv6DHCPServerParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetConstructedDataIPv6DHCPServer{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, DhcpServer: dhcpServer, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataIPv6DHCPServer) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataIPv6DHCPServer") } - // Simple Field (dhcpServer) - if pushErr := writeBuffer.PushContext("dhcpServer"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for dhcpServer") - } - _dhcpServerErr := writeBuffer.WriteSerializable(ctx, m.GetDhcpServer()) - if popErr := writeBuffer.PopContext("dhcpServer"); popErr != nil { - return errors.Wrap(popErr, "Error popping for dhcpServer") - } - if _dhcpServerErr != nil { - return errors.Wrap(_dhcpServerErr, "Error serializing 'dhcpServer' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (dhcpServer) + if pushErr := writeBuffer.PushContext("dhcpServer"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for dhcpServer") + } + _dhcpServerErr := writeBuffer.WriteSerializable(ctx, m.GetDhcpServer()) + if popErr := writeBuffer.PopContext("dhcpServer"); popErr != nil { + return errors.Wrap(popErr, "Error popping for dhcpServer") + } + if _dhcpServerErr != nil { + return errors.Wrap(_dhcpServerErr, "Error serializing 'dhcpServer' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataIPv6DHCPServer"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataIPv6DHCPServer") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataIPv6DHCPServer) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataIPv6DHCPServer) isBACnetConstructedDataIPv6DHCPServer() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataIPv6DHCPServer) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPv6DNSServer.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPv6DNSServer.go index 347a4b3ca6e..04ee0793d68 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPv6DNSServer.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPv6DNSServer.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataIPv6DNSServer is the corresponding interface of BACnetConstructedDataIPv6DNSServer type BACnetConstructedDataIPv6DNSServer interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataIPv6DNSServerExactly interface { // _BACnetConstructedDataIPv6DNSServer is the data-structure of this message type _BACnetConstructedDataIPv6DNSServer struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - Ipv6DnsServer []BACnetApplicationTagOctetString + NumberOfDataElements BACnetApplicationTagUnsignedInteger + Ipv6DnsServer []BACnetApplicationTagOctetString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataIPv6DNSServer) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataIPv6DNSServer) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataIPv6DNSServer) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_IPV6_DNS_SERVER -} +func (m *_BACnetConstructedDataIPv6DNSServer) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_IPV6_DNS_SERVER} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataIPv6DNSServer) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataIPv6DNSServer) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataIPv6DNSServer) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataIPv6DNSServer) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataIPv6DNSServer) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataIPv6DNSServer factory function for _BACnetConstructedDataIPv6DNSServer -func NewBACnetConstructedDataIPv6DNSServer(numberOfDataElements BACnetApplicationTagUnsignedInteger, ipv6DnsServer []BACnetApplicationTagOctetString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataIPv6DNSServer { +func NewBACnetConstructedDataIPv6DNSServer( numberOfDataElements BACnetApplicationTagUnsignedInteger , ipv6DnsServer []BACnetApplicationTagOctetString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataIPv6DNSServer { _result := &_BACnetConstructedDataIPv6DNSServer{ - NumberOfDataElements: numberOfDataElements, - Ipv6DnsServer: ipv6DnsServer, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + Ipv6DnsServer: ipv6DnsServer, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataIPv6DNSServer(numberOfDataElements BACnetApplicatio // Deprecated: use the interface for direct cast func CastBACnetConstructedDataIPv6DNSServer(structType interface{}) BACnetConstructedDataIPv6DNSServer { - if casted, ok := structType.(BACnetConstructedDataIPv6DNSServer); ok { + if casted, ok := structType.(BACnetConstructedDataIPv6DNSServer); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataIPv6DNSServer); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataIPv6DNSServer) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetConstructedDataIPv6DNSServer) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataIPv6DNSServerParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataIPv6DNSServerParseWithBuffer(ctx context.Context, read // Terminated array var ipv6DnsServer []BACnetApplicationTagOctetString { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'ipv6DnsServer' field of BACnetConstructedDataIPv6DNSServer") } @@ -235,11 +237,11 @@ func BACnetConstructedDataIPv6DNSServerParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetConstructedDataIPv6DNSServer{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - Ipv6DnsServer: ipv6DnsServer, + Ipv6DnsServer: ipv6DnsServer, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataIPv6DNSServer) SerializeWithWriteBuffer(ctx conte if pushErr := writeBuffer.PushContext("BACnetConstructedDataIPv6DNSServer"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataIPv6DNSServer") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (ipv6DnsServer) - if pushErr := writeBuffer.PushContext("ipv6DnsServer", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for ipv6DnsServer") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetIpv6DnsServer() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetIpv6DnsServer()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'ipv6DnsServer' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("ipv6DnsServer", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for ipv6DnsServer") + } + + // Array Field (ipv6DnsServer) + if pushErr := writeBuffer.PushContext("ipv6DnsServer", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for ipv6DnsServer") + } + for _curItem, _element := range m.GetIpv6DnsServer() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetIpv6DnsServer()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'ipv6DnsServer' field") } + } + if popErr := writeBuffer.PopContext("ipv6DnsServer", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for ipv6DnsServer") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataIPv6DNSServer"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataIPv6DNSServer") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataIPv6DNSServer) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataIPv6DNSServer) isBACnetConstructedDataIPv6DNSServer() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataIPv6DNSServer) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPv6DefaultGateway.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPv6DefaultGateway.go index eee2637c55c..5b7d2c73102 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPv6DefaultGateway.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPv6DefaultGateway.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataIPv6DefaultGateway is the corresponding interface of BACnetConstructedDataIPv6DefaultGateway type BACnetConstructedDataIPv6DefaultGateway interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataIPv6DefaultGatewayExactly interface { // _BACnetConstructedDataIPv6DefaultGateway is the data-structure of this message type _BACnetConstructedDataIPv6DefaultGateway struct { *_BACnetConstructedData - Ipv6DefaultGateway BACnetApplicationTagOctetString + Ipv6DefaultGateway BACnetApplicationTagOctetString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataIPv6DefaultGateway) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataIPv6DefaultGateway) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataIPv6DefaultGateway) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_IPV6_DEFAULT_GATEWAY -} +func (m *_BACnetConstructedDataIPv6DefaultGateway) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_IPV6_DEFAULT_GATEWAY} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataIPv6DefaultGateway) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataIPv6DefaultGateway) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataIPv6DefaultGateway) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataIPv6DefaultGateway) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataIPv6DefaultGateway) GetActualValue() BACnetApplic /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataIPv6DefaultGateway factory function for _BACnetConstructedDataIPv6DefaultGateway -func NewBACnetConstructedDataIPv6DefaultGateway(ipv6DefaultGateway BACnetApplicationTagOctetString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataIPv6DefaultGateway { +func NewBACnetConstructedDataIPv6DefaultGateway( ipv6DefaultGateway BACnetApplicationTagOctetString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataIPv6DefaultGateway { _result := &_BACnetConstructedDataIPv6DefaultGateway{ - Ipv6DefaultGateway: ipv6DefaultGateway, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Ipv6DefaultGateway: ipv6DefaultGateway, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataIPv6DefaultGateway(ipv6DefaultGateway BACnetApplica // Deprecated: use the interface for direct cast func CastBACnetConstructedDataIPv6DefaultGateway(structType interface{}) BACnetConstructedDataIPv6DefaultGateway { - if casted, ok := structType.(BACnetConstructedDataIPv6DefaultGateway); ok { + if casted, ok := structType.(BACnetConstructedDataIPv6DefaultGateway); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataIPv6DefaultGateway); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataIPv6DefaultGateway) GetLengthInBits(ctx context.C return lengthInBits } + func (m *_BACnetConstructedDataIPv6DefaultGateway) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataIPv6DefaultGatewayParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("ipv6DefaultGateway"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for ipv6DefaultGateway") } - _ipv6DefaultGateway, _ipv6DefaultGatewayErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_ipv6DefaultGateway, _ipv6DefaultGatewayErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _ipv6DefaultGatewayErr != nil { return nil, errors.Wrap(_ipv6DefaultGatewayErr, "Error parsing 'ipv6DefaultGateway' field of BACnetConstructedDataIPv6DefaultGateway") } @@ -186,7 +188,7 @@ func BACnetConstructedDataIPv6DefaultGatewayParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataIPv6DefaultGateway{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Ipv6DefaultGateway: ipv6DefaultGateway, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataIPv6DefaultGateway) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataIPv6DefaultGateway") } - // Simple Field (ipv6DefaultGateway) - if pushErr := writeBuffer.PushContext("ipv6DefaultGateway"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for ipv6DefaultGateway") - } - _ipv6DefaultGatewayErr := writeBuffer.WriteSerializable(ctx, m.GetIpv6DefaultGateway()) - if popErr := writeBuffer.PopContext("ipv6DefaultGateway"); popErr != nil { - return errors.Wrap(popErr, "Error popping for ipv6DefaultGateway") - } - if _ipv6DefaultGatewayErr != nil { - return errors.Wrap(_ipv6DefaultGatewayErr, "Error serializing 'ipv6DefaultGateway' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (ipv6DefaultGateway) + if pushErr := writeBuffer.PushContext("ipv6DefaultGateway"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for ipv6DefaultGateway") + } + _ipv6DefaultGatewayErr := writeBuffer.WriteSerializable(ctx, m.GetIpv6DefaultGateway()) + if popErr := writeBuffer.PopContext("ipv6DefaultGateway"); popErr != nil { + return errors.Wrap(popErr, "Error popping for ipv6DefaultGateway") + } + if _ipv6DefaultGatewayErr != nil { + return errors.Wrap(_ipv6DefaultGatewayErr, "Error serializing 'ipv6DefaultGateway' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataIPv6DefaultGateway"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataIPv6DefaultGateway") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataIPv6DefaultGateway) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataIPv6DefaultGateway) isBACnetConstructedDataIPv6DefaultGateway() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataIPv6DefaultGateway) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPv6PrefixLength.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPv6PrefixLength.go index e941c60aa7f..c1d33040605 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPv6PrefixLength.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPv6PrefixLength.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataIPv6PrefixLength is the corresponding interface of BACnetConstructedDataIPv6PrefixLength type BACnetConstructedDataIPv6PrefixLength interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataIPv6PrefixLengthExactly interface { // _BACnetConstructedDataIPv6PrefixLength is the data-structure of this message type _BACnetConstructedDataIPv6PrefixLength struct { *_BACnetConstructedData - Ipv6PrefixLength BACnetApplicationTagUnsignedInteger + Ipv6PrefixLength BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataIPv6PrefixLength) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataIPv6PrefixLength) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataIPv6PrefixLength) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_IPV6_PREFIX_LENGTH -} +func (m *_BACnetConstructedDataIPv6PrefixLength) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_IPV6_PREFIX_LENGTH} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataIPv6PrefixLength) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataIPv6PrefixLength) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataIPv6PrefixLength) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataIPv6PrefixLength) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataIPv6PrefixLength) GetActualValue() BACnetApplicat /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataIPv6PrefixLength factory function for _BACnetConstructedDataIPv6PrefixLength -func NewBACnetConstructedDataIPv6PrefixLength(ipv6PrefixLength BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataIPv6PrefixLength { +func NewBACnetConstructedDataIPv6PrefixLength( ipv6PrefixLength BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataIPv6PrefixLength { _result := &_BACnetConstructedDataIPv6PrefixLength{ - Ipv6PrefixLength: ipv6PrefixLength, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Ipv6PrefixLength: ipv6PrefixLength, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataIPv6PrefixLength(ipv6PrefixLength BACnetApplication // Deprecated: use the interface for direct cast func CastBACnetConstructedDataIPv6PrefixLength(structType interface{}) BACnetConstructedDataIPv6PrefixLength { - if casted, ok := structType.(BACnetConstructedDataIPv6PrefixLength); ok { + if casted, ok := structType.(BACnetConstructedDataIPv6PrefixLength); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataIPv6PrefixLength); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataIPv6PrefixLength) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetConstructedDataIPv6PrefixLength) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataIPv6PrefixLengthParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("ipv6PrefixLength"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for ipv6PrefixLength") } - _ipv6PrefixLength, _ipv6PrefixLengthErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_ipv6PrefixLength, _ipv6PrefixLengthErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _ipv6PrefixLengthErr != nil { return nil, errors.Wrap(_ipv6PrefixLengthErr, "Error parsing 'ipv6PrefixLength' field of BACnetConstructedDataIPv6PrefixLength") } @@ -186,7 +188,7 @@ func BACnetConstructedDataIPv6PrefixLengthParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_BACnetConstructedDataIPv6PrefixLength{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Ipv6PrefixLength: ipv6PrefixLength, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataIPv6PrefixLength) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataIPv6PrefixLength") } - // Simple Field (ipv6PrefixLength) - if pushErr := writeBuffer.PushContext("ipv6PrefixLength"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for ipv6PrefixLength") - } - _ipv6PrefixLengthErr := writeBuffer.WriteSerializable(ctx, m.GetIpv6PrefixLength()) - if popErr := writeBuffer.PopContext("ipv6PrefixLength"); popErr != nil { - return errors.Wrap(popErr, "Error popping for ipv6PrefixLength") - } - if _ipv6PrefixLengthErr != nil { - return errors.Wrap(_ipv6PrefixLengthErr, "Error serializing 'ipv6PrefixLength' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (ipv6PrefixLength) + if pushErr := writeBuffer.PushContext("ipv6PrefixLength"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for ipv6PrefixLength") + } + _ipv6PrefixLengthErr := writeBuffer.WriteSerializable(ctx, m.GetIpv6PrefixLength()) + if popErr := writeBuffer.PopContext("ipv6PrefixLength"); popErr != nil { + return errors.Wrap(popErr, "Error popping for ipv6PrefixLength") + } + if _ipv6PrefixLengthErr != nil { + return errors.Wrap(_ipv6PrefixLengthErr, "Error serializing 'ipv6PrefixLength' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataIPv6PrefixLength"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataIPv6PrefixLength") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataIPv6PrefixLength) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataIPv6PrefixLength) isBACnetConstructedDataIPv6PrefixLength() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataIPv6PrefixLength) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPv6ZoneIndex.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPv6ZoneIndex.go index 61ae7ae93bb..10fd9911e54 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPv6ZoneIndex.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIPv6ZoneIndex.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataIPv6ZoneIndex is the corresponding interface of BACnetConstructedDataIPv6ZoneIndex type BACnetConstructedDataIPv6ZoneIndex interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataIPv6ZoneIndexExactly interface { // _BACnetConstructedDataIPv6ZoneIndex is the data-structure of this message type _BACnetConstructedDataIPv6ZoneIndex struct { *_BACnetConstructedData - Ipv6ZoneIndex BACnetApplicationTagCharacterString + Ipv6ZoneIndex BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataIPv6ZoneIndex) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataIPv6ZoneIndex) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataIPv6ZoneIndex) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_IPV6_ZONE_INDEX -} +func (m *_BACnetConstructedDataIPv6ZoneIndex) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_IPV6_ZONE_INDEX} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataIPv6ZoneIndex) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataIPv6ZoneIndex) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataIPv6ZoneIndex) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataIPv6ZoneIndex) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataIPv6ZoneIndex) GetActualValue() BACnetApplication /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataIPv6ZoneIndex factory function for _BACnetConstructedDataIPv6ZoneIndex -func NewBACnetConstructedDataIPv6ZoneIndex(ipv6ZoneIndex BACnetApplicationTagCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataIPv6ZoneIndex { +func NewBACnetConstructedDataIPv6ZoneIndex( ipv6ZoneIndex BACnetApplicationTagCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataIPv6ZoneIndex { _result := &_BACnetConstructedDataIPv6ZoneIndex{ - Ipv6ZoneIndex: ipv6ZoneIndex, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Ipv6ZoneIndex: ipv6ZoneIndex, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataIPv6ZoneIndex(ipv6ZoneIndex BACnetApplicationTagCha // Deprecated: use the interface for direct cast func CastBACnetConstructedDataIPv6ZoneIndex(structType interface{}) BACnetConstructedDataIPv6ZoneIndex { - if casted, ok := structType.(BACnetConstructedDataIPv6ZoneIndex); ok { + if casted, ok := structType.(BACnetConstructedDataIPv6ZoneIndex); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataIPv6ZoneIndex); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataIPv6ZoneIndex) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetConstructedDataIPv6ZoneIndex) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataIPv6ZoneIndexParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("ipv6ZoneIndex"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for ipv6ZoneIndex") } - _ipv6ZoneIndex, _ipv6ZoneIndexErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_ipv6ZoneIndex, _ipv6ZoneIndexErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _ipv6ZoneIndexErr != nil { return nil, errors.Wrap(_ipv6ZoneIndexErr, "Error parsing 'ipv6ZoneIndex' field of BACnetConstructedDataIPv6ZoneIndex") } @@ -186,7 +188,7 @@ func BACnetConstructedDataIPv6ZoneIndexParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetConstructedDataIPv6ZoneIndex{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Ipv6ZoneIndex: ipv6ZoneIndex, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataIPv6ZoneIndex) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataIPv6ZoneIndex") } - // Simple Field (ipv6ZoneIndex) - if pushErr := writeBuffer.PushContext("ipv6ZoneIndex"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for ipv6ZoneIndex") - } - _ipv6ZoneIndexErr := writeBuffer.WriteSerializable(ctx, m.GetIpv6ZoneIndex()) - if popErr := writeBuffer.PopContext("ipv6ZoneIndex"); popErr != nil { - return errors.Wrap(popErr, "Error popping for ipv6ZoneIndex") - } - if _ipv6ZoneIndexErr != nil { - return errors.Wrap(_ipv6ZoneIndexErr, "Error serializing 'ipv6ZoneIndex' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (ipv6ZoneIndex) + if pushErr := writeBuffer.PushContext("ipv6ZoneIndex"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for ipv6ZoneIndex") + } + _ipv6ZoneIndexErr := writeBuffer.WriteSerializable(ctx, m.GetIpv6ZoneIndex()) + if popErr := writeBuffer.PopContext("ipv6ZoneIndex"); popErr != nil { + return errors.Wrap(popErr, "Error popping for ipv6ZoneIndex") + } + if _ipv6ZoneIndexErr != nil { + return errors.Wrap(_ipv6ZoneIndexErr, "Error serializing 'ipv6ZoneIndex' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataIPv6ZoneIndex"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataIPv6ZoneIndex") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataIPv6ZoneIndex) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataIPv6ZoneIndex) isBACnetConstructedDataIPv6ZoneIndex() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataIPv6ZoneIndex) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataInProcess.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataInProcess.go index 68957815a8f..7e515eabc82 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataInProcess.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataInProcess.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataInProcess is the corresponding interface of BACnetConstructedDataInProcess type BACnetConstructedDataInProcess interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataInProcessExactly interface { // _BACnetConstructedDataInProcess is the data-structure of this message type _BACnetConstructedDataInProcess struct { *_BACnetConstructedData - InProcess BACnetApplicationTagBoolean + InProcess BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataInProcess) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataInProcess) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataInProcess) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_IN_PROCESS -} +func (m *_BACnetConstructedDataInProcess) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_IN_PROCESS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataInProcess) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataInProcess) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataInProcess) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataInProcess) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataInProcess) GetActualValue() BACnetApplicationTagB /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataInProcess factory function for _BACnetConstructedDataInProcess -func NewBACnetConstructedDataInProcess(inProcess BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataInProcess { +func NewBACnetConstructedDataInProcess( inProcess BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataInProcess { _result := &_BACnetConstructedDataInProcess{ - InProcess: inProcess, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + InProcess: inProcess, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataInProcess(inProcess BACnetApplicationTagBoolean, op // Deprecated: use the interface for direct cast func CastBACnetConstructedDataInProcess(structType interface{}) BACnetConstructedDataInProcess { - if casted, ok := structType.(BACnetConstructedDataInProcess); ok { + if casted, ok := structType.(BACnetConstructedDataInProcess); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataInProcess); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataInProcess) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetConstructedDataInProcess) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataInProcessParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("inProcess"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for inProcess") } - _inProcess, _inProcessErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_inProcess, _inProcessErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _inProcessErr != nil { return nil, errors.Wrap(_inProcessErr, "Error parsing 'inProcess' field of BACnetConstructedDataInProcess") } @@ -186,7 +188,7 @@ func BACnetConstructedDataInProcessParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_BACnetConstructedDataInProcess{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, InProcess: inProcess, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataInProcess) SerializeWithWriteBuffer(ctx context.C return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataInProcess") } - // Simple Field (inProcess) - if pushErr := writeBuffer.PushContext("inProcess"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for inProcess") - } - _inProcessErr := writeBuffer.WriteSerializable(ctx, m.GetInProcess()) - if popErr := writeBuffer.PopContext("inProcess"); popErr != nil { - return errors.Wrap(popErr, "Error popping for inProcess") - } - if _inProcessErr != nil { - return errors.Wrap(_inProcessErr, "Error serializing 'inProcess' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (inProcess) + if pushErr := writeBuffer.PushContext("inProcess"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for inProcess") + } + _inProcessErr := writeBuffer.WriteSerializable(ctx, m.GetInProcess()) + if popErr := writeBuffer.PopContext("inProcess"); popErr != nil { + return errors.Wrap(popErr, "Error popping for inProcess") + } + if _inProcessErr != nil { + return errors.Wrap(_inProcessErr, "Error serializing 'inProcess' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataInProcess"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataInProcess") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataInProcess) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataInProcess) isBACnetConstructedDataInProcess() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataInProcess) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataInProgress.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataInProgress.go index a344a0f3a5d..113a0076303 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataInProgress.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataInProgress.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataInProgress is the corresponding interface of BACnetConstructedDataInProgress type BACnetConstructedDataInProgress interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataInProgressExactly interface { // _BACnetConstructedDataInProgress is the data-structure of this message type _BACnetConstructedDataInProgress struct { *_BACnetConstructedData - InProgress BACnetLightingInProgressTagged + InProgress BACnetLightingInProgressTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataInProgress) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataInProgress) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataInProgress) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_IN_PROGRESS -} +func (m *_BACnetConstructedDataInProgress) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_IN_PROGRESS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataInProgress) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataInProgress) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataInProgress) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataInProgress) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataInProgress) GetActualValue() BACnetLightingInProg /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataInProgress factory function for _BACnetConstructedDataInProgress -func NewBACnetConstructedDataInProgress(inProgress BACnetLightingInProgressTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataInProgress { +func NewBACnetConstructedDataInProgress( inProgress BACnetLightingInProgressTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataInProgress { _result := &_BACnetConstructedDataInProgress{ - InProgress: inProgress, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + InProgress: inProgress, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataInProgress(inProgress BACnetLightingInProgressTagge // Deprecated: use the interface for direct cast func CastBACnetConstructedDataInProgress(structType interface{}) BACnetConstructedDataInProgress { - if casted, ok := structType.(BACnetConstructedDataInProgress); ok { + if casted, ok := structType.(BACnetConstructedDataInProgress); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataInProgress); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataInProgress) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataInProgress) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataInProgressParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("inProgress"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for inProgress") } - _inProgress, _inProgressErr := BACnetLightingInProgressTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_inProgress, _inProgressErr := BACnetLightingInProgressTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _inProgressErr != nil { return nil, errors.Wrap(_inProgressErr, "Error parsing 'inProgress' field of BACnetConstructedDataInProgress") } @@ -186,7 +188,7 @@ func BACnetConstructedDataInProgressParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetConstructedDataInProgress{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, InProgress: inProgress, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataInProgress) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataInProgress") } - // Simple Field (inProgress) - if pushErr := writeBuffer.PushContext("inProgress"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for inProgress") - } - _inProgressErr := writeBuffer.WriteSerializable(ctx, m.GetInProgress()) - if popErr := writeBuffer.PopContext("inProgress"); popErr != nil { - return errors.Wrap(popErr, "Error popping for inProgress") - } - if _inProgressErr != nil { - return errors.Wrap(_inProgressErr, "Error serializing 'inProgress' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (inProgress) + if pushErr := writeBuffer.PushContext("inProgress"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for inProgress") + } + _inProgressErr := writeBuffer.WriteSerializable(ctx, m.GetInProgress()) + if popErr := writeBuffer.PopContext("inProgress"); popErr != nil { + return errors.Wrap(popErr, "Error popping for inProgress") + } + if _inProgressErr != nil { + return errors.Wrap(_inProgressErr, "Error serializing 'inProgress' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataInProgress"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataInProgress") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataInProgress) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataInProgress) isBACnetConstructedDataInProgress() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataInProgress) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataInactiveText.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataInactiveText.go index 14c1ac73599..0910f025aa8 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataInactiveText.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataInactiveText.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataInactiveText is the corresponding interface of BACnetConstructedDataInactiveText type BACnetConstructedDataInactiveText interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataInactiveTextExactly interface { // _BACnetConstructedDataInactiveText is the data-structure of this message type _BACnetConstructedDataInactiveText struct { *_BACnetConstructedData - InactiveText BACnetApplicationTagCharacterString + InactiveText BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataInactiveText) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataInactiveText) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataInactiveText) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_INACTIVE_TEXT -} +func (m *_BACnetConstructedDataInactiveText) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_INACTIVE_TEXT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataInactiveText) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataInactiveText) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataInactiveText) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataInactiveText) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataInactiveText) GetActualValue() BACnetApplicationT /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataInactiveText factory function for _BACnetConstructedDataInactiveText -func NewBACnetConstructedDataInactiveText(inactiveText BACnetApplicationTagCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataInactiveText { +func NewBACnetConstructedDataInactiveText( inactiveText BACnetApplicationTagCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataInactiveText { _result := &_BACnetConstructedDataInactiveText{ - InactiveText: inactiveText, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + InactiveText: inactiveText, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataInactiveText(inactiveText BACnetApplicationTagChara // Deprecated: use the interface for direct cast func CastBACnetConstructedDataInactiveText(structType interface{}) BACnetConstructedDataInactiveText { - if casted, ok := structType.(BACnetConstructedDataInactiveText); ok { + if casted, ok := structType.(BACnetConstructedDataInactiveText); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataInactiveText); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataInactiveText) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetConstructedDataInactiveText) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataInactiveTextParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("inactiveText"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for inactiveText") } - _inactiveText, _inactiveTextErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_inactiveText, _inactiveTextErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _inactiveTextErr != nil { return nil, errors.Wrap(_inactiveTextErr, "Error parsing 'inactiveText' field of BACnetConstructedDataInactiveText") } @@ -186,7 +188,7 @@ func BACnetConstructedDataInactiveTextParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetConstructedDataInactiveText{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, InactiveText: inactiveText, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataInactiveText) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataInactiveText") } - // Simple Field (inactiveText) - if pushErr := writeBuffer.PushContext("inactiveText"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for inactiveText") - } - _inactiveTextErr := writeBuffer.WriteSerializable(ctx, m.GetInactiveText()) - if popErr := writeBuffer.PopContext("inactiveText"); popErr != nil { - return errors.Wrap(popErr, "Error popping for inactiveText") - } - if _inactiveTextErr != nil { - return errors.Wrap(_inactiveTextErr, "Error serializing 'inactiveText' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (inactiveText) + if pushErr := writeBuffer.PushContext("inactiveText"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for inactiveText") + } + _inactiveTextErr := writeBuffer.WriteSerializable(ctx, m.GetInactiveText()) + if popErr := writeBuffer.PopContext("inactiveText"); popErr != nil { + return errors.Wrap(popErr, "Error popping for inactiveText") + } + if _inactiveTextErr != nil { + return errors.Wrap(_inactiveTextErr, "Error serializing 'inactiveText' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataInactiveText"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataInactiveText") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataInactiveText) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataInactiveText) isBACnetConstructedDataInactiveText() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataInactiveText) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataInitialTimeout.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataInitialTimeout.go index 0abe13eb30a..f410d841773 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataInitialTimeout.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataInitialTimeout.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataInitialTimeout is the corresponding interface of BACnetConstructedDataInitialTimeout type BACnetConstructedDataInitialTimeout interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataInitialTimeoutExactly interface { // _BACnetConstructedDataInitialTimeout is the data-structure of this message type _BACnetConstructedDataInitialTimeout struct { *_BACnetConstructedData - InitialTimeout BACnetApplicationTagUnsignedInteger + InitialTimeout BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataInitialTimeout) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataInitialTimeout) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataInitialTimeout) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_INITIAL_TIMEOUT -} +func (m *_BACnetConstructedDataInitialTimeout) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_INITIAL_TIMEOUT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataInitialTimeout) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataInitialTimeout) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataInitialTimeout) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataInitialTimeout) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataInitialTimeout) GetActualValue() BACnetApplicatio /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataInitialTimeout factory function for _BACnetConstructedDataInitialTimeout -func NewBACnetConstructedDataInitialTimeout(initialTimeout BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataInitialTimeout { +func NewBACnetConstructedDataInitialTimeout( initialTimeout BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataInitialTimeout { _result := &_BACnetConstructedDataInitialTimeout{ - InitialTimeout: initialTimeout, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + InitialTimeout: initialTimeout, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataInitialTimeout(initialTimeout BACnetApplicationTagU // Deprecated: use the interface for direct cast func CastBACnetConstructedDataInitialTimeout(structType interface{}) BACnetConstructedDataInitialTimeout { - if casted, ok := structType.(BACnetConstructedDataInitialTimeout); ok { + if casted, ok := structType.(BACnetConstructedDataInitialTimeout); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataInitialTimeout); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataInitialTimeout) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConstructedDataInitialTimeout) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataInitialTimeoutParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("initialTimeout"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for initialTimeout") } - _initialTimeout, _initialTimeoutErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_initialTimeout, _initialTimeoutErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _initialTimeoutErr != nil { return nil, errors.Wrap(_initialTimeoutErr, "Error parsing 'initialTimeout' field of BACnetConstructedDataInitialTimeout") } @@ -186,7 +188,7 @@ func BACnetConstructedDataInitialTimeoutParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetConstructedDataInitialTimeout{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, InitialTimeout: initialTimeout, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataInitialTimeout) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataInitialTimeout") } - // Simple Field (initialTimeout) - if pushErr := writeBuffer.PushContext("initialTimeout"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for initialTimeout") - } - _initialTimeoutErr := writeBuffer.WriteSerializable(ctx, m.GetInitialTimeout()) - if popErr := writeBuffer.PopContext("initialTimeout"); popErr != nil { - return errors.Wrap(popErr, "Error popping for initialTimeout") - } - if _initialTimeoutErr != nil { - return errors.Wrap(_initialTimeoutErr, "Error serializing 'initialTimeout' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (initialTimeout) + if pushErr := writeBuffer.PushContext("initialTimeout"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for initialTimeout") + } + _initialTimeoutErr := writeBuffer.WriteSerializable(ctx, m.GetInitialTimeout()) + if popErr := writeBuffer.PopContext("initialTimeout"); popErr != nil { + return errors.Wrap(popErr, "Error popping for initialTimeout") + } + if _initialTimeoutErr != nil { + return errors.Wrap(_initialTimeoutErr, "Error serializing 'initialTimeout' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataInitialTimeout"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataInitialTimeout") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataInitialTimeout) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataInitialTimeout) isBACnetConstructedDataInitialTimeout() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataInitialTimeout) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataInputReference.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataInputReference.go index 4287dd21933..cd1c7545bb9 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataInputReference.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataInputReference.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataInputReference is the corresponding interface of BACnetConstructedDataInputReference type BACnetConstructedDataInputReference interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataInputReferenceExactly interface { // _BACnetConstructedDataInputReference is the data-structure of this message type _BACnetConstructedDataInputReference struct { *_BACnetConstructedData - InputReference BACnetObjectPropertyReference + InputReference BACnetObjectPropertyReference } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataInputReference) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataInputReference) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataInputReference) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_INPUT_REFERENCE -} +func (m *_BACnetConstructedDataInputReference) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_INPUT_REFERENCE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataInputReference) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataInputReference) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataInputReference) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataInputReference) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataInputReference) GetActualValue() BACnetObjectProp /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataInputReference factory function for _BACnetConstructedDataInputReference -func NewBACnetConstructedDataInputReference(inputReference BACnetObjectPropertyReference, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataInputReference { +func NewBACnetConstructedDataInputReference( inputReference BACnetObjectPropertyReference , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataInputReference { _result := &_BACnetConstructedDataInputReference{ - InputReference: inputReference, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + InputReference: inputReference, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataInputReference(inputReference BACnetObjectPropertyR // Deprecated: use the interface for direct cast func CastBACnetConstructedDataInputReference(structType interface{}) BACnetConstructedDataInputReference { - if casted, ok := structType.(BACnetConstructedDataInputReference); ok { + if casted, ok := structType.(BACnetConstructedDataInputReference); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataInputReference); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataInputReference) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConstructedDataInputReference) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataInputReferenceParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("inputReference"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for inputReference") } - _inputReference, _inputReferenceErr := BACnetObjectPropertyReferenceParseWithBuffer(ctx, readBuffer) +_inputReference, _inputReferenceErr := BACnetObjectPropertyReferenceParseWithBuffer(ctx, readBuffer) if _inputReferenceErr != nil { return nil, errors.Wrap(_inputReferenceErr, "Error parsing 'inputReference' field of BACnetConstructedDataInputReference") } @@ -186,7 +188,7 @@ func BACnetConstructedDataInputReferenceParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetConstructedDataInputReference{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, InputReference: inputReference, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataInputReference) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataInputReference") } - // Simple Field (inputReference) - if pushErr := writeBuffer.PushContext("inputReference"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for inputReference") - } - _inputReferenceErr := writeBuffer.WriteSerializable(ctx, m.GetInputReference()) - if popErr := writeBuffer.PopContext("inputReference"); popErr != nil { - return errors.Wrap(popErr, "Error popping for inputReference") - } - if _inputReferenceErr != nil { - return errors.Wrap(_inputReferenceErr, "Error serializing 'inputReference' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (inputReference) + if pushErr := writeBuffer.PushContext("inputReference"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for inputReference") + } + _inputReferenceErr := writeBuffer.WriteSerializable(ctx, m.GetInputReference()) + if popErr := writeBuffer.PopContext("inputReference"); popErr != nil { + return errors.Wrap(popErr, "Error popping for inputReference") + } + if _inputReferenceErr != nil { + return errors.Wrap(_inputReferenceErr, "Error serializing 'inputReference' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataInputReference"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataInputReference") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataInputReference) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataInputReference) isBACnetConstructedDataInputReference() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataInputReference) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataInstallationID.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataInstallationID.go index d160180342d..10bc7b1cc90 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataInstallationID.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataInstallationID.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataInstallationID is the corresponding interface of BACnetConstructedDataInstallationID type BACnetConstructedDataInstallationID interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataInstallationIDExactly interface { // _BACnetConstructedDataInstallationID is the data-structure of this message type _BACnetConstructedDataInstallationID struct { *_BACnetConstructedData - InstallationId BACnetApplicationTagUnsignedInteger + InstallationId BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataInstallationID) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataInstallationID) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataInstallationID) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_INSTALLATION_ID -} +func (m *_BACnetConstructedDataInstallationID) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_INSTALLATION_ID} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataInstallationID) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataInstallationID) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataInstallationID) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataInstallationID) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataInstallationID) GetActualValue() BACnetApplicatio /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataInstallationID factory function for _BACnetConstructedDataInstallationID -func NewBACnetConstructedDataInstallationID(installationId BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataInstallationID { +func NewBACnetConstructedDataInstallationID( installationId BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataInstallationID { _result := &_BACnetConstructedDataInstallationID{ - InstallationId: installationId, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + InstallationId: installationId, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataInstallationID(installationId BACnetApplicationTagU // Deprecated: use the interface for direct cast func CastBACnetConstructedDataInstallationID(structType interface{}) BACnetConstructedDataInstallationID { - if casted, ok := structType.(BACnetConstructedDataInstallationID); ok { + if casted, ok := structType.(BACnetConstructedDataInstallationID); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataInstallationID); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataInstallationID) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConstructedDataInstallationID) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataInstallationIDParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("installationId"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for installationId") } - _installationId, _installationIdErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_installationId, _installationIdErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _installationIdErr != nil { return nil, errors.Wrap(_installationIdErr, "Error parsing 'installationId' field of BACnetConstructedDataInstallationID") } @@ -186,7 +188,7 @@ func BACnetConstructedDataInstallationIDParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetConstructedDataInstallationID{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, InstallationId: installationId, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataInstallationID) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataInstallationID") } - // Simple Field (installationId) - if pushErr := writeBuffer.PushContext("installationId"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for installationId") - } - _installationIdErr := writeBuffer.WriteSerializable(ctx, m.GetInstallationId()) - if popErr := writeBuffer.PopContext("installationId"); popErr != nil { - return errors.Wrap(popErr, "Error popping for installationId") - } - if _installationIdErr != nil { - return errors.Wrap(_installationIdErr, "Error serializing 'installationId' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (installationId) + if pushErr := writeBuffer.PushContext("installationId"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for installationId") + } + _installationIdErr := writeBuffer.WriteSerializable(ctx, m.GetInstallationId()) + if popErr := writeBuffer.PopContext("installationId"); popErr != nil { + return errors.Wrap(popErr, "Error popping for installationId") + } + if _installationIdErr != nil { + return errors.Wrap(_installationIdErr, "Error serializing 'installationId' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataInstallationID"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataInstallationID") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataInstallationID) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataInstallationID) isBACnetConstructedDataInstallationID() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataInstallationID) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataInstanceOf.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataInstanceOf.go index 02f8dc33ff8..fff3e006d1d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataInstanceOf.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataInstanceOf.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataInstanceOf is the corresponding interface of BACnetConstructedDataInstanceOf type BACnetConstructedDataInstanceOf interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataInstanceOfExactly interface { // _BACnetConstructedDataInstanceOf is the data-structure of this message type _BACnetConstructedDataInstanceOf struct { *_BACnetConstructedData - InstanceOf BACnetApplicationTagCharacterString + InstanceOf BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataInstanceOf) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataInstanceOf) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataInstanceOf) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_INSTANCE_OF -} +func (m *_BACnetConstructedDataInstanceOf) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_INSTANCE_OF} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataInstanceOf) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataInstanceOf) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataInstanceOf) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataInstanceOf) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataInstanceOf) GetActualValue() BACnetApplicationTag /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataInstanceOf factory function for _BACnetConstructedDataInstanceOf -func NewBACnetConstructedDataInstanceOf(instanceOf BACnetApplicationTagCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataInstanceOf { +func NewBACnetConstructedDataInstanceOf( instanceOf BACnetApplicationTagCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataInstanceOf { _result := &_BACnetConstructedDataInstanceOf{ - InstanceOf: instanceOf, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + InstanceOf: instanceOf, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataInstanceOf(instanceOf BACnetApplicationTagCharacter // Deprecated: use the interface for direct cast func CastBACnetConstructedDataInstanceOf(structType interface{}) BACnetConstructedDataInstanceOf { - if casted, ok := structType.(BACnetConstructedDataInstanceOf); ok { + if casted, ok := structType.(BACnetConstructedDataInstanceOf); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataInstanceOf); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataInstanceOf) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataInstanceOf) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataInstanceOfParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("instanceOf"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for instanceOf") } - _instanceOf, _instanceOfErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_instanceOf, _instanceOfErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _instanceOfErr != nil { return nil, errors.Wrap(_instanceOfErr, "Error parsing 'instanceOf' field of BACnetConstructedDataInstanceOf") } @@ -186,7 +188,7 @@ func BACnetConstructedDataInstanceOfParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetConstructedDataInstanceOf{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, InstanceOf: instanceOf, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataInstanceOf) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataInstanceOf") } - // Simple Field (instanceOf) - if pushErr := writeBuffer.PushContext("instanceOf"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for instanceOf") - } - _instanceOfErr := writeBuffer.WriteSerializable(ctx, m.GetInstanceOf()) - if popErr := writeBuffer.PopContext("instanceOf"); popErr != nil { - return errors.Wrap(popErr, "Error popping for instanceOf") - } - if _instanceOfErr != nil { - return errors.Wrap(_instanceOfErr, "Error serializing 'instanceOf' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (instanceOf) + if pushErr := writeBuffer.PushContext("instanceOf"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for instanceOf") + } + _instanceOfErr := writeBuffer.WriteSerializable(ctx, m.GetInstanceOf()) + if popErr := writeBuffer.PopContext("instanceOf"); popErr != nil { + return errors.Wrap(popErr, "Error popping for instanceOf") + } + if _instanceOfErr != nil { + return errors.Wrap(_instanceOfErr, "Error serializing 'instanceOf' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataInstanceOf"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataInstanceOf") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataInstanceOf) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataInstanceOf) isBACnetConstructedDataInstanceOf() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataInstanceOf) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataInstantaneousPower.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataInstantaneousPower.go index 438d9560831..a0c6645e5ef 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataInstantaneousPower.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataInstantaneousPower.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataInstantaneousPower is the corresponding interface of BACnetConstructedDataInstantaneousPower type BACnetConstructedDataInstantaneousPower interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataInstantaneousPowerExactly interface { // _BACnetConstructedDataInstantaneousPower is the data-structure of this message type _BACnetConstructedDataInstantaneousPower struct { *_BACnetConstructedData - InstantaneousPower BACnetApplicationTagReal + InstantaneousPower BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataInstantaneousPower) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataInstantaneousPower) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataInstantaneousPower) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_INSTANTANEOUS_POWER -} +func (m *_BACnetConstructedDataInstantaneousPower) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_INSTANTANEOUS_POWER} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataInstantaneousPower) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataInstantaneousPower) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataInstantaneousPower) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataInstantaneousPower) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataInstantaneousPower) GetActualValue() BACnetApplic /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataInstantaneousPower factory function for _BACnetConstructedDataInstantaneousPower -func NewBACnetConstructedDataInstantaneousPower(instantaneousPower BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataInstantaneousPower { +func NewBACnetConstructedDataInstantaneousPower( instantaneousPower BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataInstantaneousPower { _result := &_BACnetConstructedDataInstantaneousPower{ - InstantaneousPower: instantaneousPower, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + InstantaneousPower: instantaneousPower, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataInstantaneousPower(instantaneousPower BACnetApplica // Deprecated: use the interface for direct cast func CastBACnetConstructedDataInstantaneousPower(structType interface{}) BACnetConstructedDataInstantaneousPower { - if casted, ok := structType.(BACnetConstructedDataInstantaneousPower); ok { + if casted, ok := structType.(BACnetConstructedDataInstantaneousPower); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataInstantaneousPower); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataInstantaneousPower) GetLengthInBits(ctx context.C return lengthInBits } + func (m *_BACnetConstructedDataInstantaneousPower) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataInstantaneousPowerParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("instantaneousPower"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for instantaneousPower") } - _instantaneousPower, _instantaneousPowerErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_instantaneousPower, _instantaneousPowerErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _instantaneousPowerErr != nil { return nil, errors.Wrap(_instantaneousPowerErr, "Error parsing 'instantaneousPower' field of BACnetConstructedDataInstantaneousPower") } @@ -186,7 +188,7 @@ func BACnetConstructedDataInstantaneousPowerParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataInstantaneousPower{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, InstantaneousPower: instantaneousPower, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataInstantaneousPower) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataInstantaneousPower") } - // Simple Field (instantaneousPower) - if pushErr := writeBuffer.PushContext("instantaneousPower"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for instantaneousPower") - } - _instantaneousPowerErr := writeBuffer.WriteSerializable(ctx, m.GetInstantaneousPower()) - if popErr := writeBuffer.PopContext("instantaneousPower"); popErr != nil { - return errors.Wrap(popErr, "Error popping for instantaneousPower") - } - if _instantaneousPowerErr != nil { - return errors.Wrap(_instantaneousPowerErr, "Error serializing 'instantaneousPower' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (instantaneousPower) + if pushErr := writeBuffer.PushContext("instantaneousPower"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for instantaneousPower") + } + _instantaneousPowerErr := writeBuffer.WriteSerializable(ctx, m.GetInstantaneousPower()) + if popErr := writeBuffer.PopContext("instantaneousPower"); popErr != nil { + return errors.Wrap(popErr, "Error popping for instantaneousPower") + } + if _instantaneousPowerErr != nil { + return errors.Wrap(_instantaneousPowerErr, "Error serializing 'instantaneousPower' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataInstantaneousPower"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataInstantaneousPower") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataInstantaneousPower) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataInstantaneousPower) isBACnetConstructedDataInstantaneousPower() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataInstantaneousPower) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueAll.go index 919d9b3bd94..f506788891d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataIntegerValueAll is the corresponding interface of BACnetConstructedDataIntegerValueAll type BACnetConstructedDataIntegerValueAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataIntegerValueAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataIntegerValueAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_INTEGER_VALUE -} +func (m *_BACnetConstructedDataIntegerValueAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_INTEGER_VALUE} -func (m *_BACnetConstructedDataIntegerValueAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataIntegerValueAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataIntegerValueAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataIntegerValueAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataIntegerValueAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataIntegerValueAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataIntegerValueAll factory function for _BACnetConstructedDataIntegerValueAll -func NewBACnetConstructedDataIntegerValueAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataIntegerValueAll { +func NewBACnetConstructedDataIntegerValueAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataIntegerValueAll { _result := &_BACnetConstructedDataIntegerValueAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataIntegerValueAll(openingTag BACnetOpeningTag, peeked // Deprecated: use the interface for direct cast func CastBACnetConstructedDataIntegerValueAll(structType interface{}) BACnetConstructedDataIntegerValueAll { - if casted, ok := structType.(BACnetConstructedDataIntegerValueAll); ok { + if casted, ok := structType.(BACnetConstructedDataIntegerValueAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataIntegerValueAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataIntegerValueAll) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetConstructedDataIntegerValueAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataIntegerValueAllParseWithBuffer(ctx context.Context, re _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataIntegerValueAllParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetConstructedDataIntegerValueAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataIntegerValueAll) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataIntegerValueAll) isBACnetConstructedDataIntegerValueAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataIntegerValueAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueCOVIncrement.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueCOVIncrement.go index 0fd1ad90b00..72b14f29637 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueCOVIncrement.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueCOVIncrement.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataIntegerValueCOVIncrement is the corresponding interface of BACnetConstructedDataIntegerValueCOVIncrement type BACnetConstructedDataIntegerValueCOVIncrement interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataIntegerValueCOVIncrementExactly interface { // _BACnetConstructedDataIntegerValueCOVIncrement is the data-structure of this message type _BACnetConstructedDataIntegerValueCOVIncrement struct { *_BACnetConstructedData - CovIncrement BACnetApplicationTagUnsignedInteger + CovIncrement BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataIntegerValueCOVIncrement) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_INTEGER_VALUE -} +func (m *_BACnetConstructedDataIntegerValueCOVIncrement) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_INTEGER_VALUE} -func (m *_BACnetConstructedDataIntegerValueCOVIncrement) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_COV_INCREMENT -} +func (m *_BACnetConstructedDataIntegerValueCOVIncrement) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_COV_INCREMENT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataIntegerValueCOVIncrement) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataIntegerValueCOVIncrement) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataIntegerValueCOVIncrement) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataIntegerValueCOVIncrement) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataIntegerValueCOVIncrement) GetActualValue() BACnet /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataIntegerValueCOVIncrement factory function for _BACnetConstructedDataIntegerValueCOVIncrement -func NewBACnetConstructedDataIntegerValueCOVIncrement(covIncrement BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataIntegerValueCOVIncrement { +func NewBACnetConstructedDataIntegerValueCOVIncrement( covIncrement BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataIntegerValueCOVIncrement { _result := &_BACnetConstructedDataIntegerValueCOVIncrement{ - CovIncrement: covIncrement, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + CovIncrement: covIncrement, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataIntegerValueCOVIncrement(covIncrement BACnetApplica // Deprecated: use the interface for direct cast func CastBACnetConstructedDataIntegerValueCOVIncrement(structType interface{}) BACnetConstructedDataIntegerValueCOVIncrement { - if casted, ok := structType.(BACnetConstructedDataIntegerValueCOVIncrement); ok { + if casted, ok := structType.(BACnetConstructedDataIntegerValueCOVIncrement); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataIntegerValueCOVIncrement); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataIntegerValueCOVIncrement) GetLengthInBits(ctx con return lengthInBits } + func (m *_BACnetConstructedDataIntegerValueCOVIncrement) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataIntegerValueCOVIncrementParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("covIncrement"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for covIncrement") } - _covIncrement, _covIncrementErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_covIncrement, _covIncrementErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _covIncrementErr != nil { return nil, errors.Wrap(_covIncrementErr, "Error parsing 'covIncrement' field of BACnetConstructedDataIntegerValueCOVIncrement") } @@ -186,7 +188,7 @@ func BACnetConstructedDataIntegerValueCOVIncrementParseWithBuffer(ctx context.Co // Create a partially initialized instance _child := &_BACnetConstructedDataIntegerValueCOVIncrement{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, CovIncrement: covIncrement, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataIntegerValueCOVIncrement) SerializeWithWriteBuffe return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataIntegerValueCOVIncrement") } - // Simple Field (covIncrement) - if pushErr := writeBuffer.PushContext("covIncrement"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for covIncrement") - } - _covIncrementErr := writeBuffer.WriteSerializable(ctx, m.GetCovIncrement()) - if popErr := writeBuffer.PopContext("covIncrement"); popErr != nil { - return errors.Wrap(popErr, "Error popping for covIncrement") - } - if _covIncrementErr != nil { - return errors.Wrap(_covIncrementErr, "Error serializing 'covIncrement' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (covIncrement) + if pushErr := writeBuffer.PushContext("covIncrement"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for covIncrement") + } + _covIncrementErr := writeBuffer.WriteSerializable(ctx, m.GetCovIncrement()) + if popErr := writeBuffer.PopContext("covIncrement"); popErr != nil { + return errors.Wrap(popErr, "Error popping for covIncrement") + } + if _covIncrementErr != nil { + return errors.Wrap(_covIncrementErr, "Error serializing 'covIncrement' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataIntegerValueCOVIncrement"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataIntegerValueCOVIncrement") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataIntegerValueCOVIncrement) SerializeWithWriteBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataIntegerValueCOVIncrement) isBACnetConstructedDataIntegerValueCOVIncrement() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataIntegerValueCOVIncrement) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueDeadband.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueDeadband.go index 46e3be143f5..414f4856a3c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueDeadband.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueDeadband.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataIntegerValueDeadband is the corresponding interface of BACnetConstructedDataIntegerValueDeadband type BACnetConstructedDataIntegerValueDeadband interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataIntegerValueDeadbandExactly interface { // _BACnetConstructedDataIntegerValueDeadband is the data-structure of this message type _BACnetConstructedDataIntegerValueDeadband struct { *_BACnetConstructedData - Deadband BACnetApplicationTagUnsignedInteger + Deadband BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataIntegerValueDeadband) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_INTEGER_VALUE -} +func (m *_BACnetConstructedDataIntegerValueDeadband) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_INTEGER_VALUE} -func (m *_BACnetConstructedDataIntegerValueDeadband) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_DEADBAND -} +func (m *_BACnetConstructedDataIntegerValueDeadband) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_DEADBAND} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataIntegerValueDeadband) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataIntegerValueDeadband) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataIntegerValueDeadband) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataIntegerValueDeadband) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataIntegerValueDeadband) GetActualValue() BACnetAppl /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataIntegerValueDeadband factory function for _BACnetConstructedDataIntegerValueDeadband -func NewBACnetConstructedDataIntegerValueDeadband(deadband BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataIntegerValueDeadband { +func NewBACnetConstructedDataIntegerValueDeadband( deadband BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataIntegerValueDeadband { _result := &_BACnetConstructedDataIntegerValueDeadband{ - Deadband: deadband, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Deadband: deadband, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataIntegerValueDeadband(deadband BACnetApplicationTagU // Deprecated: use the interface for direct cast func CastBACnetConstructedDataIntegerValueDeadband(structType interface{}) BACnetConstructedDataIntegerValueDeadband { - if casted, ok := structType.(BACnetConstructedDataIntegerValueDeadband); ok { + if casted, ok := structType.(BACnetConstructedDataIntegerValueDeadband); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataIntegerValueDeadband); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataIntegerValueDeadband) GetLengthInBits(ctx context return lengthInBits } + func (m *_BACnetConstructedDataIntegerValueDeadband) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataIntegerValueDeadbandParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("deadband"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for deadband") } - _deadband, _deadbandErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_deadband, _deadbandErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _deadbandErr != nil { return nil, errors.Wrap(_deadbandErr, "Error parsing 'deadband' field of BACnetConstructedDataIntegerValueDeadband") } @@ -186,7 +188,7 @@ func BACnetConstructedDataIntegerValueDeadbandParseWithBuffer(ctx context.Contex // Create a partially initialized instance _child := &_BACnetConstructedDataIntegerValueDeadband{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Deadband: deadband, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataIntegerValueDeadband) SerializeWithWriteBuffer(ct return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataIntegerValueDeadband") } - // Simple Field (deadband) - if pushErr := writeBuffer.PushContext("deadband"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for deadband") - } - _deadbandErr := writeBuffer.WriteSerializable(ctx, m.GetDeadband()) - if popErr := writeBuffer.PopContext("deadband"); popErr != nil { - return errors.Wrap(popErr, "Error popping for deadband") - } - if _deadbandErr != nil { - return errors.Wrap(_deadbandErr, "Error serializing 'deadband' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (deadband) + if pushErr := writeBuffer.PushContext("deadband"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for deadband") + } + _deadbandErr := writeBuffer.WriteSerializable(ctx, m.GetDeadband()) + if popErr := writeBuffer.PopContext("deadband"); popErr != nil { + return errors.Wrap(popErr, "Error popping for deadband") + } + if _deadbandErr != nil { + return errors.Wrap(_deadbandErr, "Error serializing 'deadband' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataIntegerValueDeadband"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataIntegerValueDeadband") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataIntegerValueDeadband) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataIntegerValueDeadband) isBACnetConstructedDataIntegerValueDeadband() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataIntegerValueDeadband) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueFaultHighLimit.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueFaultHighLimit.go index 1199315927f..472dc98b379 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueFaultHighLimit.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueFaultHighLimit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataIntegerValueFaultHighLimit is the corresponding interface of BACnetConstructedDataIntegerValueFaultHighLimit type BACnetConstructedDataIntegerValueFaultHighLimit interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataIntegerValueFaultHighLimitExactly interface { // _BACnetConstructedDataIntegerValueFaultHighLimit is the data-structure of this message type _BACnetConstructedDataIntegerValueFaultHighLimit struct { *_BACnetConstructedData - FaultHighLimit BACnetApplicationTagSignedInteger + FaultHighLimit BACnetApplicationTagSignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataIntegerValueFaultHighLimit) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_INTEGER_VALUE -} +func (m *_BACnetConstructedDataIntegerValueFaultHighLimit) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_INTEGER_VALUE} -func (m *_BACnetConstructedDataIntegerValueFaultHighLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FAULT_HIGH_LIMIT -} +func (m *_BACnetConstructedDataIntegerValueFaultHighLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FAULT_HIGH_LIMIT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataIntegerValueFaultHighLimit) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataIntegerValueFaultHighLimit) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataIntegerValueFaultHighLimit) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataIntegerValueFaultHighLimit) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataIntegerValueFaultHighLimit) GetActualValue() BACn /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataIntegerValueFaultHighLimit factory function for _BACnetConstructedDataIntegerValueFaultHighLimit -func NewBACnetConstructedDataIntegerValueFaultHighLimit(faultHighLimit BACnetApplicationTagSignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataIntegerValueFaultHighLimit { +func NewBACnetConstructedDataIntegerValueFaultHighLimit( faultHighLimit BACnetApplicationTagSignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataIntegerValueFaultHighLimit { _result := &_BACnetConstructedDataIntegerValueFaultHighLimit{ - FaultHighLimit: faultHighLimit, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + FaultHighLimit: faultHighLimit, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataIntegerValueFaultHighLimit(faultHighLimit BACnetApp // Deprecated: use the interface for direct cast func CastBACnetConstructedDataIntegerValueFaultHighLimit(structType interface{}) BACnetConstructedDataIntegerValueFaultHighLimit { - if casted, ok := structType.(BACnetConstructedDataIntegerValueFaultHighLimit); ok { + if casted, ok := structType.(BACnetConstructedDataIntegerValueFaultHighLimit); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataIntegerValueFaultHighLimit); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataIntegerValueFaultHighLimit) GetLengthInBits(ctx c return lengthInBits } + func (m *_BACnetConstructedDataIntegerValueFaultHighLimit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataIntegerValueFaultHighLimitParseWithBuffer(ctx context. if pullErr := readBuffer.PullContext("faultHighLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for faultHighLimit") } - _faultHighLimit, _faultHighLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_faultHighLimit, _faultHighLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _faultHighLimitErr != nil { return nil, errors.Wrap(_faultHighLimitErr, "Error parsing 'faultHighLimit' field of BACnetConstructedDataIntegerValueFaultHighLimit") } @@ -186,7 +188,7 @@ func BACnetConstructedDataIntegerValueFaultHighLimitParseWithBuffer(ctx context. // Create a partially initialized instance _child := &_BACnetConstructedDataIntegerValueFaultHighLimit{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FaultHighLimit: faultHighLimit, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataIntegerValueFaultHighLimit) SerializeWithWriteBuf return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataIntegerValueFaultHighLimit") } - // Simple Field (faultHighLimit) - if pushErr := writeBuffer.PushContext("faultHighLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for faultHighLimit") - } - _faultHighLimitErr := writeBuffer.WriteSerializable(ctx, m.GetFaultHighLimit()) - if popErr := writeBuffer.PopContext("faultHighLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for faultHighLimit") - } - if _faultHighLimitErr != nil { - return errors.Wrap(_faultHighLimitErr, "Error serializing 'faultHighLimit' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (faultHighLimit) + if pushErr := writeBuffer.PushContext("faultHighLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for faultHighLimit") + } + _faultHighLimitErr := writeBuffer.WriteSerializable(ctx, m.GetFaultHighLimit()) + if popErr := writeBuffer.PopContext("faultHighLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for faultHighLimit") + } + if _faultHighLimitErr != nil { + return errors.Wrap(_faultHighLimitErr, "Error serializing 'faultHighLimit' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataIntegerValueFaultHighLimit"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataIntegerValueFaultHighLimit") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataIntegerValueFaultHighLimit) SerializeWithWriteBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataIntegerValueFaultHighLimit) isBACnetConstructedDataIntegerValueFaultHighLimit() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataIntegerValueFaultHighLimit) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueFaultLowLimit.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueFaultLowLimit.go index 77de15edd83..a223cabb0a2 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueFaultLowLimit.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueFaultLowLimit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataIntegerValueFaultLowLimit is the corresponding interface of BACnetConstructedDataIntegerValueFaultLowLimit type BACnetConstructedDataIntegerValueFaultLowLimit interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataIntegerValueFaultLowLimitExactly interface { // _BACnetConstructedDataIntegerValueFaultLowLimit is the data-structure of this message type _BACnetConstructedDataIntegerValueFaultLowLimit struct { *_BACnetConstructedData - FaultLowLimit BACnetApplicationTagSignedInteger + FaultLowLimit BACnetApplicationTagSignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataIntegerValueFaultLowLimit) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_INTEGER_VALUE -} +func (m *_BACnetConstructedDataIntegerValueFaultLowLimit) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_INTEGER_VALUE} -func (m *_BACnetConstructedDataIntegerValueFaultLowLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FAULT_LOW_LIMIT -} +func (m *_BACnetConstructedDataIntegerValueFaultLowLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FAULT_LOW_LIMIT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataIntegerValueFaultLowLimit) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataIntegerValueFaultLowLimit) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataIntegerValueFaultLowLimit) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataIntegerValueFaultLowLimit) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataIntegerValueFaultLowLimit) GetActualValue() BACne /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataIntegerValueFaultLowLimit factory function for _BACnetConstructedDataIntegerValueFaultLowLimit -func NewBACnetConstructedDataIntegerValueFaultLowLimit(faultLowLimit BACnetApplicationTagSignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataIntegerValueFaultLowLimit { +func NewBACnetConstructedDataIntegerValueFaultLowLimit( faultLowLimit BACnetApplicationTagSignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataIntegerValueFaultLowLimit { _result := &_BACnetConstructedDataIntegerValueFaultLowLimit{ - FaultLowLimit: faultLowLimit, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + FaultLowLimit: faultLowLimit, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataIntegerValueFaultLowLimit(faultLowLimit BACnetAppli // Deprecated: use the interface for direct cast func CastBACnetConstructedDataIntegerValueFaultLowLimit(structType interface{}) BACnetConstructedDataIntegerValueFaultLowLimit { - if casted, ok := structType.(BACnetConstructedDataIntegerValueFaultLowLimit); ok { + if casted, ok := structType.(BACnetConstructedDataIntegerValueFaultLowLimit); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataIntegerValueFaultLowLimit); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataIntegerValueFaultLowLimit) GetLengthInBits(ctx co return lengthInBits } + func (m *_BACnetConstructedDataIntegerValueFaultLowLimit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataIntegerValueFaultLowLimitParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("faultLowLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for faultLowLimit") } - _faultLowLimit, _faultLowLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_faultLowLimit, _faultLowLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _faultLowLimitErr != nil { return nil, errors.Wrap(_faultLowLimitErr, "Error parsing 'faultLowLimit' field of BACnetConstructedDataIntegerValueFaultLowLimit") } @@ -186,7 +188,7 @@ func BACnetConstructedDataIntegerValueFaultLowLimitParseWithBuffer(ctx context.C // Create a partially initialized instance _child := &_BACnetConstructedDataIntegerValueFaultLowLimit{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FaultLowLimit: faultLowLimit, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataIntegerValueFaultLowLimit) SerializeWithWriteBuff return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataIntegerValueFaultLowLimit") } - // Simple Field (faultLowLimit) - if pushErr := writeBuffer.PushContext("faultLowLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for faultLowLimit") - } - _faultLowLimitErr := writeBuffer.WriteSerializable(ctx, m.GetFaultLowLimit()) - if popErr := writeBuffer.PopContext("faultLowLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for faultLowLimit") - } - if _faultLowLimitErr != nil { - return errors.Wrap(_faultLowLimitErr, "Error serializing 'faultLowLimit' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (faultLowLimit) + if pushErr := writeBuffer.PushContext("faultLowLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for faultLowLimit") + } + _faultLowLimitErr := writeBuffer.WriteSerializable(ctx, m.GetFaultLowLimit()) + if popErr := writeBuffer.PopContext("faultLowLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for faultLowLimit") + } + if _faultLowLimitErr != nil { + return errors.Wrap(_faultLowLimitErr, "Error serializing 'faultLowLimit' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataIntegerValueFaultLowLimit"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataIntegerValueFaultLowLimit") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataIntegerValueFaultLowLimit) SerializeWithWriteBuff return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataIntegerValueFaultLowLimit) isBACnetConstructedDataIntegerValueFaultLowLimit() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataIntegerValueFaultLowLimit) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueHighLimit.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueHighLimit.go index 505a6852f53..5fe7d837d2a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueHighLimit.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueHighLimit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataIntegerValueHighLimit is the corresponding interface of BACnetConstructedDataIntegerValueHighLimit type BACnetConstructedDataIntegerValueHighLimit interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataIntegerValueHighLimitExactly interface { // _BACnetConstructedDataIntegerValueHighLimit is the data-structure of this message type _BACnetConstructedDataIntegerValueHighLimit struct { *_BACnetConstructedData - HighLimit BACnetApplicationTagSignedInteger + HighLimit BACnetApplicationTagSignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataIntegerValueHighLimit) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_INTEGER_VALUE -} +func (m *_BACnetConstructedDataIntegerValueHighLimit) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_INTEGER_VALUE} -func (m *_BACnetConstructedDataIntegerValueHighLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_HIGH_LIMIT -} +func (m *_BACnetConstructedDataIntegerValueHighLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_HIGH_LIMIT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataIntegerValueHighLimit) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataIntegerValueHighLimit) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataIntegerValueHighLimit) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataIntegerValueHighLimit) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataIntegerValueHighLimit) GetActualValue() BACnetApp /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataIntegerValueHighLimit factory function for _BACnetConstructedDataIntegerValueHighLimit -func NewBACnetConstructedDataIntegerValueHighLimit(highLimit BACnetApplicationTagSignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataIntegerValueHighLimit { +func NewBACnetConstructedDataIntegerValueHighLimit( highLimit BACnetApplicationTagSignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataIntegerValueHighLimit { _result := &_BACnetConstructedDataIntegerValueHighLimit{ - HighLimit: highLimit, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + HighLimit: highLimit, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataIntegerValueHighLimit(highLimit BACnetApplicationTa // Deprecated: use the interface for direct cast func CastBACnetConstructedDataIntegerValueHighLimit(structType interface{}) BACnetConstructedDataIntegerValueHighLimit { - if casted, ok := structType.(BACnetConstructedDataIntegerValueHighLimit); ok { + if casted, ok := structType.(BACnetConstructedDataIntegerValueHighLimit); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataIntegerValueHighLimit); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataIntegerValueHighLimit) GetLengthInBits(ctx contex return lengthInBits } + func (m *_BACnetConstructedDataIntegerValueHighLimit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataIntegerValueHighLimitParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("highLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for highLimit") } - _highLimit, _highLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_highLimit, _highLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _highLimitErr != nil { return nil, errors.Wrap(_highLimitErr, "Error parsing 'highLimit' field of BACnetConstructedDataIntegerValueHighLimit") } @@ -186,7 +188,7 @@ func BACnetConstructedDataIntegerValueHighLimitParseWithBuffer(ctx context.Conte // Create a partially initialized instance _child := &_BACnetConstructedDataIntegerValueHighLimit{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, HighLimit: highLimit, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataIntegerValueHighLimit) SerializeWithWriteBuffer(c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataIntegerValueHighLimit") } - // Simple Field (highLimit) - if pushErr := writeBuffer.PushContext("highLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for highLimit") - } - _highLimitErr := writeBuffer.WriteSerializable(ctx, m.GetHighLimit()) - if popErr := writeBuffer.PopContext("highLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for highLimit") - } - if _highLimitErr != nil { - return errors.Wrap(_highLimitErr, "Error serializing 'highLimit' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (highLimit) + if pushErr := writeBuffer.PushContext("highLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for highLimit") + } + _highLimitErr := writeBuffer.WriteSerializable(ctx, m.GetHighLimit()) + if popErr := writeBuffer.PopContext("highLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for highLimit") + } + if _highLimitErr != nil { + return errors.Wrap(_highLimitErr, "Error serializing 'highLimit' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataIntegerValueHighLimit"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataIntegerValueHighLimit") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataIntegerValueHighLimit) SerializeWithWriteBuffer(c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataIntegerValueHighLimit) isBACnetConstructedDataIntegerValueHighLimit() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataIntegerValueHighLimit) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueLowLimit.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueLowLimit.go index 5ad25fca4e5..ee1e88066f4 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueLowLimit.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueLowLimit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataIntegerValueLowLimit is the corresponding interface of BACnetConstructedDataIntegerValueLowLimit type BACnetConstructedDataIntegerValueLowLimit interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataIntegerValueLowLimitExactly interface { // _BACnetConstructedDataIntegerValueLowLimit is the data-structure of this message type _BACnetConstructedDataIntegerValueLowLimit struct { *_BACnetConstructedData - LowLimit BACnetApplicationTagSignedInteger + LowLimit BACnetApplicationTagSignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataIntegerValueLowLimit) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_INTEGER_VALUE -} +func (m *_BACnetConstructedDataIntegerValueLowLimit) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_INTEGER_VALUE} -func (m *_BACnetConstructedDataIntegerValueLowLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LOW_LIMIT -} +func (m *_BACnetConstructedDataIntegerValueLowLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LOW_LIMIT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataIntegerValueLowLimit) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataIntegerValueLowLimit) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataIntegerValueLowLimit) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataIntegerValueLowLimit) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataIntegerValueLowLimit) GetActualValue() BACnetAppl /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataIntegerValueLowLimit factory function for _BACnetConstructedDataIntegerValueLowLimit -func NewBACnetConstructedDataIntegerValueLowLimit(lowLimit BACnetApplicationTagSignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataIntegerValueLowLimit { +func NewBACnetConstructedDataIntegerValueLowLimit( lowLimit BACnetApplicationTagSignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataIntegerValueLowLimit { _result := &_BACnetConstructedDataIntegerValueLowLimit{ - LowLimit: lowLimit, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + LowLimit: lowLimit, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataIntegerValueLowLimit(lowLimit BACnetApplicationTagS // Deprecated: use the interface for direct cast func CastBACnetConstructedDataIntegerValueLowLimit(structType interface{}) BACnetConstructedDataIntegerValueLowLimit { - if casted, ok := structType.(BACnetConstructedDataIntegerValueLowLimit); ok { + if casted, ok := structType.(BACnetConstructedDataIntegerValueLowLimit); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataIntegerValueLowLimit); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataIntegerValueLowLimit) GetLengthInBits(ctx context return lengthInBits } + func (m *_BACnetConstructedDataIntegerValueLowLimit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataIntegerValueLowLimitParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("lowLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lowLimit") } - _lowLimit, _lowLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_lowLimit, _lowLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _lowLimitErr != nil { return nil, errors.Wrap(_lowLimitErr, "Error parsing 'lowLimit' field of BACnetConstructedDataIntegerValueLowLimit") } @@ -186,7 +188,7 @@ func BACnetConstructedDataIntegerValueLowLimitParseWithBuffer(ctx context.Contex // Create a partially initialized instance _child := &_BACnetConstructedDataIntegerValueLowLimit{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LowLimit: lowLimit, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataIntegerValueLowLimit) SerializeWithWriteBuffer(ct return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataIntegerValueLowLimit") } - // Simple Field (lowLimit) - if pushErr := writeBuffer.PushContext("lowLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lowLimit") - } - _lowLimitErr := writeBuffer.WriteSerializable(ctx, m.GetLowLimit()) - if popErr := writeBuffer.PopContext("lowLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lowLimit") - } - if _lowLimitErr != nil { - return errors.Wrap(_lowLimitErr, "Error serializing 'lowLimit' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (lowLimit) + if pushErr := writeBuffer.PushContext("lowLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lowLimit") + } + _lowLimitErr := writeBuffer.WriteSerializable(ctx, m.GetLowLimit()) + if popErr := writeBuffer.PopContext("lowLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lowLimit") + } + if _lowLimitErr != nil { + return errors.Wrap(_lowLimitErr, "Error serializing 'lowLimit' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataIntegerValueLowLimit"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataIntegerValueLowLimit") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataIntegerValueLowLimit) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataIntegerValueLowLimit) isBACnetConstructedDataIntegerValueLowLimit() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataIntegerValueLowLimit) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueMaxPresValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueMaxPresValue.go index cab7372278d..19d600a5b27 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueMaxPresValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueMaxPresValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataIntegerValueMaxPresValue is the corresponding interface of BACnetConstructedDataIntegerValueMaxPresValue type BACnetConstructedDataIntegerValueMaxPresValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataIntegerValueMaxPresValueExactly interface { // _BACnetConstructedDataIntegerValueMaxPresValue is the data-structure of this message type _BACnetConstructedDataIntegerValueMaxPresValue struct { *_BACnetConstructedData - MaxPresValue BACnetApplicationTagSignedInteger + MaxPresValue BACnetApplicationTagSignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataIntegerValueMaxPresValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_INTEGER_VALUE -} +func (m *_BACnetConstructedDataIntegerValueMaxPresValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_INTEGER_VALUE} -func (m *_BACnetConstructedDataIntegerValueMaxPresValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MAX_PRES_VALUE -} +func (m *_BACnetConstructedDataIntegerValueMaxPresValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MAX_PRES_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataIntegerValueMaxPresValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataIntegerValueMaxPresValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataIntegerValueMaxPresValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataIntegerValueMaxPresValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataIntegerValueMaxPresValue) GetActualValue() BACnet /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataIntegerValueMaxPresValue factory function for _BACnetConstructedDataIntegerValueMaxPresValue -func NewBACnetConstructedDataIntegerValueMaxPresValue(maxPresValue BACnetApplicationTagSignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataIntegerValueMaxPresValue { +func NewBACnetConstructedDataIntegerValueMaxPresValue( maxPresValue BACnetApplicationTagSignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataIntegerValueMaxPresValue { _result := &_BACnetConstructedDataIntegerValueMaxPresValue{ - MaxPresValue: maxPresValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + MaxPresValue: maxPresValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataIntegerValueMaxPresValue(maxPresValue BACnetApplica // Deprecated: use the interface for direct cast func CastBACnetConstructedDataIntegerValueMaxPresValue(structType interface{}) BACnetConstructedDataIntegerValueMaxPresValue { - if casted, ok := structType.(BACnetConstructedDataIntegerValueMaxPresValue); ok { + if casted, ok := structType.(BACnetConstructedDataIntegerValueMaxPresValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataIntegerValueMaxPresValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataIntegerValueMaxPresValue) GetLengthInBits(ctx con return lengthInBits } + func (m *_BACnetConstructedDataIntegerValueMaxPresValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataIntegerValueMaxPresValueParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("maxPresValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for maxPresValue") } - _maxPresValue, _maxPresValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_maxPresValue, _maxPresValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _maxPresValueErr != nil { return nil, errors.Wrap(_maxPresValueErr, "Error parsing 'maxPresValue' field of BACnetConstructedDataIntegerValueMaxPresValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataIntegerValueMaxPresValueParseWithBuffer(ctx context.Co // Create a partially initialized instance _child := &_BACnetConstructedDataIntegerValueMaxPresValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, MaxPresValue: maxPresValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataIntegerValueMaxPresValue) SerializeWithWriteBuffe return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataIntegerValueMaxPresValue") } - // Simple Field (maxPresValue) - if pushErr := writeBuffer.PushContext("maxPresValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for maxPresValue") - } - _maxPresValueErr := writeBuffer.WriteSerializable(ctx, m.GetMaxPresValue()) - if popErr := writeBuffer.PopContext("maxPresValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for maxPresValue") - } - if _maxPresValueErr != nil { - return errors.Wrap(_maxPresValueErr, "Error serializing 'maxPresValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (maxPresValue) + if pushErr := writeBuffer.PushContext("maxPresValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for maxPresValue") + } + _maxPresValueErr := writeBuffer.WriteSerializable(ctx, m.GetMaxPresValue()) + if popErr := writeBuffer.PopContext("maxPresValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for maxPresValue") + } + if _maxPresValueErr != nil { + return errors.Wrap(_maxPresValueErr, "Error serializing 'maxPresValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataIntegerValueMaxPresValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataIntegerValueMaxPresValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataIntegerValueMaxPresValue) SerializeWithWriteBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataIntegerValueMaxPresValue) isBACnetConstructedDataIntegerValueMaxPresValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataIntegerValueMaxPresValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueMinPresValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueMinPresValue.go index 28aa42e6fad..dc0458d54a1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueMinPresValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueMinPresValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataIntegerValueMinPresValue is the corresponding interface of BACnetConstructedDataIntegerValueMinPresValue type BACnetConstructedDataIntegerValueMinPresValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataIntegerValueMinPresValueExactly interface { // _BACnetConstructedDataIntegerValueMinPresValue is the data-structure of this message type _BACnetConstructedDataIntegerValueMinPresValue struct { *_BACnetConstructedData - MinPresValue BACnetApplicationTagSignedInteger + MinPresValue BACnetApplicationTagSignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataIntegerValueMinPresValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_INTEGER_VALUE -} +func (m *_BACnetConstructedDataIntegerValueMinPresValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_INTEGER_VALUE} -func (m *_BACnetConstructedDataIntegerValueMinPresValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MIN_PRES_VALUE -} +func (m *_BACnetConstructedDataIntegerValueMinPresValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MIN_PRES_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataIntegerValueMinPresValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataIntegerValueMinPresValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataIntegerValueMinPresValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataIntegerValueMinPresValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataIntegerValueMinPresValue) GetActualValue() BACnet /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataIntegerValueMinPresValue factory function for _BACnetConstructedDataIntegerValueMinPresValue -func NewBACnetConstructedDataIntegerValueMinPresValue(minPresValue BACnetApplicationTagSignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataIntegerValueMinPresValue { +func NewBACnetConstructedDataIntegerValueMinPresValue( minPresValue BACnetApplicationTagSignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataIntegerValueMinPresValue { _result := &_BACnetConstructedDataIntegerValueMinPresValue{ - MinPresValue: minPresValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + MinPresValue: minPresValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataIntegerValueMinPresValue(minPresValue BACnetApplica // Deprecated: use the interface for direct cast func CastBACnetConstructedDataIntegerValueMinPresValue(structType interface{}) BACnetConstructedDataIntegerValueMinPresValue { - if casted, ok := structType.(BACnetConstructedDataIntegerValueMinPresValue); ok { + if casted, ok := structType.(BACnetConstructedDataIntegerValueMinPresValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataIntegerValueMinPresValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataIntegerValueMinPresValue) GetLengthInBits(ctx con return lengthInBits } + func (m *_BACnetConstructedDataIntegerValueMinPresValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataIntegerValueMinPresValueParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("minPresValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for minPresValue") } - _minPresValue, _minPresValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_minPresValue, _minPresValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _minPresValueErr != nil { return nil, errors.Wrap(_minPresValueErr, "Error parsing 'minPresValue' field of BACnetConstructedDataIntegerValueMinPresValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataIntegerValueMinPresValueParseWithBuffer(ctx context.Co // Create a partially initialized instance _child := &_BACnetConstructedDataIntegerValueMinPresValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, MinPresValue: minPresValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataIntegerValueMinPresValue) SerializeWithWriteBuffe return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataIntegerValueMinPresValue") } - // Simple Field (minPresValue) - if pushErr := writeBuffer.PushContext("minPresValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for minPresValue") - } - _minPresValueErr := writeBuffer.WriteSerializable(ctx, m.GetMinPresValue()) - if popErr := writeBuffer.PopContext("minPresValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for minPresValue") - } - if _minPresValueErr != nil { - return errors.Wrap(_minPresValueErr, "Error serializing 'minPresValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (minPresValue) + if pushErr := writeBuffer.PushContext("minPresValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for minPresValue") + } + _minPresValueErr := writeBuffer.WriteSerializable(ctx, m.GetMinPresValue()) + if popErr := writeBuffer.PopContext("minPresValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for minPresValue") + } + if _minPresValueErr != nil { + return errors.Wrap(_minPresValueErr, "Error serializing 'minPresValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataIntegerValueMinPresValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataIntegerValueMinPresValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataIntegerValueMinPresValue) SerializeWithWriteBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataIntegerValueMinPresValue) isBACnetConstructedDataIntegerValueMinPresValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataIntegerValueMinPresValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValuePresentValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValuePresentValue.go index 5de490cf307..9a0df45ccfe 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValuePresentValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValuePresentValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataIntegerValuePresentValue is the corresponding interface of BACnetConstructedDataIntegerValuePresentValue type BACnetConstructedDataIntegerValuePresentValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataIntegerValuePresentValueExactly interface { // _BACnetConstructedDataIntegerValuePresentValue is the data-structure of this message type _BACnetConstructedDataIntegerValuePresentValue struct { *_BACnetConstructedData - PresentValue BACnetApplicationTagSignedInteger + PresentValue BACnetApplicationTagSignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataIntegerValuePresentValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_INTEGER_VALUE -} +func (m *_BACnetConstructedDataIntegerValuePresentValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_INTEGER_VALUE} -func (m *_BACnetConstructedDataIntegerValuePresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PRESENT_VALUE -} +func (m *_BACnetConstructedDataIntegerValuePresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PRESENT_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataIntegerValuePresentValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataIntegerValuePresentValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataIntegerValuePresentValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataIntegerValuePresentValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataIntegerValuePresentValue) GetActualValue() BACnet /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataIntegerValuePresentValue factory function for _BACnetConstructedDataIntegerValuePresentValue -func NewBACnetConstructedDataIntegerValuePresentValue(presentValue BACnetApplicationTagSignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataIntegerValuePresentValue { +func NewBACnetConstructedDataIntegerValuePresentValue( presentValue BACnetApplicationTagSignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataIntegerValuePresentValue { _result := &_BACnetConstructedDataIntegerValuePresentValue{ - PresentValue: presentValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PresentValue: presentValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataIntegerValuePresentValue(presentValue BACnetApplica // Deprecated: use the interface for direct cast func CastBACnetConstructedDataIntegerValuePresentValue(structType interface{}) BACnetConstructedDataIntegerValuePresentValue { - if casted, ok := structType.(BACnetConstructedDataIntegerValuePresentValue); ok { + if casted, ok := structType.(BACnetConstructedDataIntegerValuePresentValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataIntegerValuePresentValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataIntegerValuePresentValue) GetLengthInBits(ctx con return lengthInBits } + func (m *_BACnetConstructedDataIntegerValuePresentValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataIntegerValuePresentValueParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("presentValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for presentValue") } - _presentValue, _presentValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_presentValue, _presentValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _presentValueErr != nil { return nil, errors.Wrap(_presentValueErr, "Error parsing 'presentValue' field of BACnetConstructedDataIntegerValuePresentValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataIntegerValuePresentValueParseWithBuffer(ctx context.Co // Create a partially initialized instance _child := &_BACnetConstructedDataIntegerValuePresentValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PresentValue: presentValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataIntegerValuePresentValue) SerializeWithWriteBuffe return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataIntegerValuePresentValue") } - // Simple Field (presentValue) - if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for presentValue") - } - _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) - if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for presentValue") - } - if _presentValueErr != nil { - return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (presentValue) + if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for presentValue") + } + _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) + if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for presentValue") + } + if _presentValueErr != nil { + return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataIntegerValuePresentValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataIntegerValuePresentValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataIntegerValuePresentValue) SerializeWithWriteBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataIntegerValuePresentValue) isBACnetConstructedDataIntegerValuePresentValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataIntegerValuePresentValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueRelinquishDefault.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueRelinquishDefault.go index 63f96b79e51..884b049ac38 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueRelinquishDefault.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueRelinquishDefault.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataIntegerValueRelinquishDefault is the corresponding interface of BACnetConstructedDataIntegerValueRelinquishDefault type BACnetConstructedDataIntegerValueRelinquishDefault interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataIntegerValueRelinquishDefaultExactly interface { // _BACnetConstructedDataIntegerValueRelinquishDefault is the data-structure of this message type _BACnetConstructedDataIntegerValueRelinquishDefault struct { *_BACnetConstructedData - RelinquishDefault BACnetApplicationTagSignedInteger + RelinquishDefault BACnetApplicationTagSignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataIntegerValueRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_INTEGER_VALUE -} +func (m *_BACnetConstructedDataIntegerValueRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_INTEGER_VALUE} -func (m *_BACnetConstructedDataIntegerValueRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_RELINQUISH_DEFAULT -} +func (m *_BACnetConstructedDataIntegerValueRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_RELINQUISH_DEFAULT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataIntegerValueRelinquishDefault) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataIntegerValueRelinquishDefault) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataIntegerValueRelinquishDefault) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataIntegerValueRelinquishDefault) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataIntegerValueRelinquishDefault) GetActualValue() B /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataIntegerValueRelinquishDefault factory function for _BACnetConstructedDataIntegerValueRelinquishDefault -func NewBACnetConstructedDataIntegerValueRelinquishDefault(relinquishDefault BACnetApplicationTagSignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataIntegerValueRelinquishDefault { +func NewBACnetConstructedDataIntegerValueRelinquishDefault( relinquishDefault BACnetApplicationTagSignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataIntegerValueRelinquishDefault { _result := &_BACnetConstructedDataIntegerValueRelinquishDefault{ - RelinquishDefault: relinquishDefault, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + RelinquishDefault: relinquishDefault, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataIntegerValueRelinquishDefault(relinquishDefault BAC // Deprecated: use the interface for direct cast func CastBACnetConstructedDataIntegerValueRelinquishDefault(structType interface{}) BACnetConstructedDataIntegerValueRelinquishDefault { - if casted, ok := structType.(BACnetConstructedDataIntegerValueRelinquishDefault); ok { + if casted, ok := structType.(BACnetConstructedDataIntegerValueRelinquishDefault); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataIntegerValueRelinquishDefault); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataIntegerValueRelinquishDefault) GetLengthInBits(ct return lengthInBits } + func (m *_BACnetConstructedDataIntegerValueRelinquishDefault) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataIntegerValueRelinquishDefaultParseWithBuffer(ctx conte if pullErr := readBuffer.PullContext("relinquishDefault"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for relinquishDefault") } - _relinquishDefault, _relinquishDefaultErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_relinquishDefault, _relinquishDefaultErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _relinquishDefaultErr != nil { return nil, errors.Wrap(_relinquishDefaultErr, "Error parsing 'relinquishDefault' field of BACnetConstructedDataIntegerValueRelinquishDefault") } @@ -186,7 +188,7 @@ func BACnetConstructedDataIntegerValueRelinquishDefaultParseWithBuffer(ctx conte // Create a partially initialized instance _child := &_BACnetConstructedDataIntegerValueRelinquishDefault{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, RelinquishDefault: relinquishDefault, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataIntegerValueRelinquishDefault) SerializeWithWrite return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataIntegerValueRelinquishDefault") } - // Simple Field (relinquishDefault) - if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for relinquishDefault") - } - _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) - if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { - return errors.Wrap(popErr, "Error popping for relinquishDefault") - } - if _relinquishDefaultErr != nil { - return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (relinquishDefault) + if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for relinquishDefault") + } + _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) + if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { + return errors.Wrap(popErr, "Error popping for relinquishDefault") + } + if _relinquishDefaultErr != nil { + return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataIntegerValueRelinquishDefault"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataIntegerValueRelinquishDefault") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataIntegerValueRelinquishDefault) SerializeWithWrite return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataIntegerValueRelinquishDefault) isBACnetConstructedDataIntegerValueRelinquishDefault() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataIntegerValueRelinquishDefault) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueResolution.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueResolution.go index bdd6ee9ee5b..53caffd30a8 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueResolution.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegerValueResolution.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataIntegerValueResolution is the corresponding interface of BACnetConstructedDataIntegerValueResolution type BACnetConstructedDataIntegerValueResolution interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataIntegerValueResolutionExactly interface { // _BACnetConstructedDataIntegerValueResolution is the data-structure of this message type _BACnetConstructedDataIntegerValueResolution struct { *_BACnetConstructedData - Resolution BACnetApplicationTagSignedInteger + Resolution BACnetApplicationTagSignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataIntegerValueResolution) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_INTEGER_VALUE -} +func (m *_BACnetConstructedDataIntegerValueResolution) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_INTEGER_VALUE} -func (m *_BACnetConstructedDataIntegerValueResolution) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_RESOLUTION -} +func (m *_BACnetConstructedDataIntegerValueResolution) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_RESOLUTION} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataIntegerValueResolution) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataIntegerValueResolution) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataIntegerValueResolution) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataIntegerValueResolution) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataIntegerValueResolution) GetActualValue() BACnetAp /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataIntegerValueResolution factory function for _BACnetConstructedDataIntegerValueResolution -func NewBACnetConstructedDataIntegerValueResolution(resolution BACnetApplicationTagSignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataIntegerValueResolution { +func NewBACnetConstructedDataIntegerValueResolution( resolution BACnetApplicationTagSignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataIntegerValueResolution { _result := &_BACnetConstructedDataIntegerValueResolution{ - Resolution: resolution, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Resolution: resolution, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataIntegerValueResolution(resolution BACnetApplication // Deprecated: use the interface for direct cast func CastBACnetConstructedDataIntegerValueResolution(structType interface{}) BACnetConstructedDataIntegerValueResolution { - if casted, ok := structType.(BACnetConstructedDataIntegerValueResolution); ok { + if casted, ok := structType.(BACnetConstructedDataIntegerValueResolution); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataIntegerValueResolution); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataIntegerValueResolution) GetLengthInBits(ctx conte return lengthInBits } + func (m *_BACnetConstructedDataIntegerValueResolution) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataIntegerValueResolutionParseWithBuffer(ctx context.Cont if pullErr := readBuffer.PullContext("resolution"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for resolution") } - _resolution, _resolutionErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_resolution, _resolutionErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _resolutionErr != nil { return nil, errors.Wrap(_resolutionErr, "Error parsing 'resolution' field of BACnetConstructedDataIntegerValueResolution") } @@ -186,7 +188,7 @@ func BACnetConstructedDataIntegerValueResolutionParseWithBuffer(ctx context.Cont // Create a partially initialized instance _child := &_BACnetConstructedDataIntegerValueResolution{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Resolution: resolution, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataIntegerValueResolution) SerializeWithWriteBuffer( return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataIntegerValueResolution") } - // Simple Field (resolution) - if pushErr := writeBuffer.PushContext("resolution"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for resolution") - } - _resolutionErr := writeBuffer.WriteSerializable(ctx, m.GetResolution()) - if popErr := writeBuffer.PopContext("resolution"); popErr != nil { - return errors.Wrap(popErr, "Error popping for resolution") - } - if _resolutionErr != nil { - return errors.Wrap(_resolutionErr, "Error serializing 'resolution' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (resolution) + if pushErr := writeBuffer.PushContext("resolution"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for resolution") + } + _resolutionErr := writeBuffer.WriteSerializable(ctx, m.GetResolution()) + if popErr := writeBuffer.PopContext("resolution"); popErr != nil { + return errors.Wrap(popErr, "Error popping for resolution") + } + if _resolutionErr != nil { + return errors.Wrap(_resolutionErr, "Error serializing 'resolution' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataIntegerValueResolution"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataIntegerValueResolution") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataIntegerValueResolution) SerializeWithWriteBuffer( return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataIntegerValueResolution) isBACnetConstructedDataIntegerValueResolution() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataIntegerValueResolution) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegralConstant.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegralConstant.go index d33b61f2631..8447d150bc6 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegralConstant.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegralConstant.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataIntegralConstant is the corresponding interface of BACnetConstructedDataIntegralConstant type BACnetConstructedDataIntegralConstant interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataIntegralConstantExactly interface { // _BACnetConstructedDataIntegralConstant is the data-structure of this message type _BACnetConstructedDataIntegralConstant struct { *_BACnetConstructedData - IntegralConstant BACnetApplicationTagReal + IntegralConstant BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataIntegralConstant) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataIntegralConstant) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataIntegralConstant) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_INTEGRAL_CONSTANT -} +func (m *_BACnetConstructedDataIntegralConstant) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_INTEGRAL_CONSTANT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataIntegralConstant) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataIntegralConstant) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataIntegralConstant) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataIntegralConstant) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataIntegralConstant) GetActualValue() BACnetApplicat /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataIntegralConstant factory function for _BACnetConstructedDataIntegralConstant -func NewBACnetConstructedDataIntegralConstant(integralConstant BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataIntegralConstant { +func NewBACnetConstructedDataIntegralConstant( integralConstant BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataIntegralConstant { _result := &_BACnetConstructedDataIntegralConstant{ - IntegralConstant: integralConstant, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + IntegralConstant: integralConstant, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataIntegralConstant(integralConstant BACnetApplication // Deprecated: use the interface for direct cast func CastBACnetConstructedDataIntegralConstant(structType interface{}) BACnetConstructedDataIntegralConstant { - if casted, ok := structType.(BACnetConstructedDataIntegralConstant); ok { + if casted, ok := structType.(BACnetConstructedDataIntegralConstant); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataIntegralConstant); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataIntegralConstant) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetConstructedDataIntegralConstant) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataIntegralConstantParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("integralConstant"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for integralConstant") } - _integralConstant, _integralConstantErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_integralConstant, _integralConstantErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _integralConstantErr != nil { return nil, errors.Wrap(_integralConstantErr, "Error parsing 'integralConstant' field of BACnetConstructedDataIntegralConstant") } @@ -186,7 +188,7 @@ func BACnetConstructedDataIntegralConstantParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_BACnetConstructedDataIntegralConstant{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, IntegralConstant: integralConstant, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataIntegralConstant) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataIntegralConstant") } - // Simple Field (integralConstant) - if pushErr := writeBuffer.PushContext("integralConstant"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for integralConstant") - } - _integralConstantErr := writeBuffer.WriteSerializable(ctx, m.GetIntegralConstant()) - if popErr := writeBuffer.PopContext("integralConstant"); popErr != nil { - return errors.Wrap(popErr, "Error popping for integralConstant") - } - if _integralConstantErr != nil { - return errors.Wrap(_integralConstantErr, "Error serializing 'integralConstant' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (integralConstant) + if pushErr := writeBuffer.PushContext("integralConstant"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for integralConstant") + } + _integralConstantErr := writeBuffer.WriteSerializable(ctx, m.GetIntegralConstant()) + if popErr := writeBuffer.PopContext("integralConstant"); popErr != nil { + return errors.Wrap(popErr, "Error popping for integralConstant") + } + if _integralConstantErr != nil { + return errors.Wrap(_integralConstantErr, "Error serializing 'integralConstant' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataIntegralConstant"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataIntegralConstant") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataIntegralConstant) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataIntegralConstant) isBACnetConstructedDataIntegralConstant() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataIntegralConstant) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegralConstantUnits.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegralConstantUnits.go index 6f68a732454..eb981a8beaf 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegralConstantUnits.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntegralConstantUnits.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataIntegralConstantUnits is the corresponding interface of BACnetConstructedDataIntegralConstantUnits type BACnetConstructedDataIntegralConstantUnits interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataIntegralConstantUnitsExactly interface { // _BACnetConstructedDataIntegralConstantUnits is the data-structure of this message type _BACnetConstructedDataIntegralConstantUnits struct { *_BACnetConstructedData - Units BACnetEngineeringUnitsTagged + Units BACnetEngineeringUnitsTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataIntegralConstantUnits) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataIntegralConstantUnits) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataIntegralConstantUnits) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_INTEGRAL_CONSTANT_UNITS -} +func (m *_BACnetConstructedDataIntegralConstantUnits) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_INTEGRAL_CONSTANT_UNITS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataIntegralConstantUnits) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataIntegralConstantUnits) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataIntegralConstantUnits) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataIntegralConstantUnits) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataIntegralConstantUnits) GetActualValue() BACnetEng /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataIntegralConstantUnits factory function for _BACnetConstructedDataIntegralConstantUnits -func NewBACnetConstructedDataIntegralConstantUnits(units BACnetEngineeringUnitsTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataIntegralConstantUnits { +func NewBACnetConstructedDataIntegralConstantUnits( units BACnetEngineeringUnitsTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataIntegralConstantUnits { _result := &_BACnetConstructedDataIntegralConstantUnits{ - Units: units, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Units: units, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataIntegralConstantUnits(units BACnetEngineeringUnitsT // Deprecated: use the interface for direct cast func CastBACnetConstructedDataIntegralConstantUnits(structType interface{}) BACnetConstructedDataIntegralConstantUnits { - if casted, ok := structType.(BACnetConstructedDataIntegralConstantUnits); ok { + if casted, ok := structType.(BACnetConstructedDataIntegralConstantUnits); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataIntegralConstantUnits); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataIntegralConstantUnits) GetLengthInBits(ctx contex return lengthInBits } + func (m *_BACnetConstructedDataIntegralConstantUnits) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataIntegralConstantUnitsParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("units"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for units") } - _units, _unitsErr := BACnetEngineeringUnitsTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_units, _unitsErr := BACnetEngineeringUnitsTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _unitsErr != nil { return nil, errors.Wrap(_unitsErr, "Error parsing 'units' field of BACnetConstructedDataIntegralConstantUnits") } @@ -186,7 +188,7 @@ func BACnetConstructedDataIntegralConstantUnitsParseWithBuffer(ctx context.Conte // Create a partially initialized instance _child := &_BACnetConstructedDataIntegralConstantUnits{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Units: units, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataIntegralConstantUnits) SerializeWithWriteBuffer(c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataIntegralConstantUnits") } - // Simple Field (units) - if pushErr := writeBuffer.PushContext("units"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for units") - } - _unitsErr := writeBuffer.WriteSerializable(ctx, m.GetUnits()) - if popErr := writeBuffer.PopContext("units"); popErr != nil { - return errors.Wrap(popErr, "Error popping for units") - } - if _unitsErr != nil { - return errors.Wrap(_unitsErr, "Error serializing 'units' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (units) + if pushErr := writeBuffer.PushContext("units"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for units") + } + _unitsErr := writeBuffer.WriteSerializable(ctx, m.GetUnits()) + if popErr := writeBuffer.PopContext("units"); popErr != nil { + return errors.Wrap(popErr, "Error popping for units") + } + if _unitsErr != nil { + return errors.Wrap(_unitsErr, "Error serializing 'units' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataIntegralConstantUnits"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataIntegralConstantUnits") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataIntegralConstantUnits) SerializeWithWriteBuffer(c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataIntegralConstantUnits) isBACnetConstructedDataIntegralConstantUnits() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataIntegralConstantUnits) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntervalOffset.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntervalOffset.go index c0e0b81004c..950d46023e7 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntervalOffset.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIntervalOffset.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataIntervalOffset is the corresponding interface of BACnetConstructedDataIntervalOffset type BACnetConstructedDataIntervalOffset interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataIntervalOffsetExactly interface { // _BACnetConstructedDataIntervalOffset is the data-structure of this message type _BACnetConstructedDataIntervalOffset struct { *_BACnetConstructedData - IntervalOffset BACnetApplicationTagUnsignedInteger + IntervalOffset BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataIntervalOffset) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataIntervalOffset) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataIntervalOffset) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_INTERVAL_OFFSET -} +func (m *_BACnetConstructedDataIntervalOffset) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_INTERVAL_OFFSET} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataIntervalOffset) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataIntervalOffset) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataIntervalOffset) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataIntervalOffset) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataIntervalOffset) GetActualValue() BACnetApplicatio /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataIntervalOffset factory function for _BACnetConstructedDataIntervalOffset -func NewBACnetConstructedDataIntervalOffset(intervalOffset BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataIntervalOffset { +func NewBACnetConstructedDataIntervalOffset( intervalOffset BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataIntervalOffset { _result := &_BACnetConstructedDataIntervalOffset{ - IntervalOffset: intervalOffset, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + IntervalOffset: intervalOffset, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataIntervalOffset(intervalOffset BACnetApplicationTagU // Deprecated: use the interface for direct cast func CastBACnetConstructedDataIntervalOffset(structType interface{}) BACnetConstructedDataIntervalOffset { - if casted, ok := structType.(BACnetConstructedDataIntervalOffset); ok { + if casted, ok := structType.(BACnetConstructedDataIntervalOffset); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataIntervalOffset); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataIntervalOffset) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConstructedDataIntervalOffset) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataIntervalOffsetParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("intervalOffset"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for intervalOffset") } - _intervalOffset, _intervalOffsetErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_intervalOffset, _intervalOffsetErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _intervalOffsetErr != nil { return nil, errors.Wrap(_intervalOffsetErr, "Error parsing 'intervalOffset' field of BACnetConstructedDataIntervalOffset") } @@ -186,7 +188,7 @@ func BACnetConstructedDataIntervalOffsetParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetConstructedDataIntervalOffset{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, IntervalOffset: intervalOffset, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataIntervalOffset) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataIntervalOffset") } - // Simple Field (intervalOffset) - if pushErr := writeBuffer.PushContext("intervalOffset"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for intervalOffset") - } - _intervalOffsetErr := writeBuffer.WriteSerializable(ctx, m.GetIntervalOffset()) - if popErr := writeBuffer.PopContext("intervalOffset"); popErr != nil { - return errors.Wrap(popErr, "Error popping for intervalOffset") - } - if _intervalOffsetErr != nil { - return errors.Wrap(_intervalOffsetErr, "Error serializing 'intervalOffset' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (intervalOffset) + if pushErr := writeBuffer.PushContext("intervalOffset"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for intervalOffset") + } + _intervalOffsetErr := writeBuffer.WriteSerializable(ctx, m.GetIntervalOffset()) + if popErr := writeBuffer.PopContext("intervalOffset"); popErr != nil { + return errors.Wrap(popErr, "Error popping for intervalOffset") + } + if _intervalOffsetErr != nil { + return errors.Wrap(_intervalOffsetErr, "Error serializing 'intervalOffset' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataIntervalOffset"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataIntervalOffset") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataIntervalOffset) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataIntervalOffset) isBACnetConstructedDataIntervalOffset() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataIntervalOffset) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIsUTC.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIsUTC.go index a9a6dd3044e..fffd2ad169c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIsUTC.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataIsUTC.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataIsUTC is the corresponding interface of BACnetConstructedDataIsUTC type BACnetConstructedDataIsUTC interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataIsUTCExactly interface { // _BACnetConstructedDataIsUTC is the data-structure of this message type _BACnetConstructedDataIsUTC struct { *_BACnetConstructedData - IsUtc BACnetApplicationTagBoolean + IsUtc BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataIsUTC) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataIsUTC) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataIsUTC) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_IS_UTC -} +func (m *_BACnetConstructedDataIsUTC) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_IS_UTC} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataIsUTC) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataIsUTC) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataIsUTC) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataIsUTC) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataIsUTC) GetActualValue() BACnetApplicationTagBoole /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataIsUTC factory function for _BACnetConstructedDataIsUTC -func NewBACnetConstructedDataIsUTC(isUtc BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataIsUTC { +func NewBACnetConstructedDataIsUTC( isUtc BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataIsUTC { _result := &_BACnetConstructedDataIsUTC{ - IsUtc: isUtc, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + IsUtc: isUtc, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataIsUTC(isUtc BACnetApplicationTagBoolean, openingTag // Deprecated: use the interface for direct cast func CastBACnetConstructedDataIsUTC(structType interface{}) BACnetConstructedDataIsUTC { - if casted, ok := structType.(BACnetConstructedDataIsUTC); ok { + if casted, ok := structType.(BACnetConstructedDataIsUTC); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataIsUTC); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataIsUTC) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_BACnetConstructedDataIsUTC) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataIsUTCParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("isUtc"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for isUtc") } - _isUtc, _isUtcErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_isUtc, _isUtcErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _isUtcErr != nil { return nil, errors.Wrap(_isUtcErr, "Error parsing 'isUtc' field of BACnetConstructedDataIsUTC") } @@ -186,7 +188,7 @@ func BACnetConstructedDataIsUTCParseWithBuffer(ctx context.Context, readBuffer u // Create a partially initialized instance _child := &_BACnetConstructedDataIsUTC{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, IsUtc: isUtc, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataIsUTC) SerializeWithWriteBuffer(ctx context.Conte return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataIsUTC") } - // Simple Field (isUtc) - if pushErr := writeBuffer.PushContext("isUtc"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for isUtc") - } - _isUtcErr := writeBuffer.WriteSerializable(ctx, m.GetIsUtc()) - if popErr := writeBuffer.PopContext("isUtc"); popErr != nil { - return errors.Wrap(popErr, "Error popping for isUtc") - } - if _isUtcErr != nil { - return errors.Wrap(_isUtcErr, "Error serializing 'isUtc' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (isUtc) + if pushErr := writeBuffer.PushContext("isUtc"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for isUtc") + } + _isUtcErr := writeBuffer.WriteSerializable(ctx, m.GetIsUtc()) + if popErr := writeBuffer.PopContext("isUtc"); popErr != nil { + return errors.Wrap(popErr, "Error popping for isUtc") + } + if _isUtcErr != nil { + return errors.Wrap(_isUtcErr, "Error serializing 'isUtc' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataIsUTC"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataIsUTC") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataIsUTC) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataIsUTC) isBACnetConstructedDataIsUTC() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataIsUTC) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataKeySets.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataKeySets.go index bb50448faa6..b974dddb19a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataKeySets.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataKeySets.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataKeySets is the corresponding interface of BACnetConstructedDataKeySets type BACnetConstructedDataKeySets interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataKeySetsExactly interface { // _BACnetConstructedDataKeySets is the data-structure of this message type _BACnetConstructedDataKeySets struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - KeySets []BACnetSecurityKeySet + NumberOfDataElements BACnetApplicationTagUnsignedInteger + KeySets []BACnetSecurityKeySet } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataKeySets) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataKeySets) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataKeySets) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_KEY_SETS -} +func (m *_BACnetConstructedDataKeySets) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_KEY_SETS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataKeySets) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataKeySets) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataKeySets) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataKeySets) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataKeySets) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataKeySets factory function for _BACnetConstructedDataKeySets -func NewBACnetConstructedDataKeySets(numberOfDataElements BACnetApplicationTagUnsignedInteger, keySets []BACnetSecurityKeySet, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataKeySets { +func NewBACnetConstructedDataKeySets( numberOfDataElements BACnetApplicationTagUnsignedInteger , keySets []BACnetSecurityKeySet , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataKeySets { _result := &_BACnetConstructedDataKeySets{ - NumberOfDataElements: numberOfDataElements, - KeySets: keySets, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + KeySets: keySets, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataKeySets(numberOfDataElements BACnetApplicationTagUn // Deprecated: use the interface for direct cast func CastBACnetConstructedDataKeySets(structType interface{}) BACnetConstructedDataKeySets { - if casted, ok := structType.(BACnetConstructedDataKeySets); ok { + if casted, ok := structType.(BACnetConstructedDataKeySets); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataKeySets); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataKeySets) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_BACnetConstructedDataKeySets) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataKeySetsParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataKeySetsParseWithBuffer(ctx context.Context, readBuffer // Terminated array var keySets []BACnetSecurityKeySet { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetSecurityKeySetParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetSecurityKeySetParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'keySets' field of BACnetConstructedDataKeySets") } @@ -229,7 +231,7 @@ func BACnetConstructedDataKeySetsParseWithBuffer(ctx context.Context, readBuffer } // Validation - if !(bool(bool((arrayIndexArgument) != (nil))) || bool(bool((len(keySets)) == (2)))) { + if (!(bool(bool((arrayIndexArgument) != (nil))) || bool(bool(((len(keySets))) == ((2)))))) { return nil, errors.WithStack(utils.ParseValidationError{"keySets should have exactly 2 values"}) } @@ -240,11 +242,11 @@ func BACnetConstructedDataKeySetsParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_BACnetConstructedDataKeySets{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - KeySets: keySets, + KeySets: keySets, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -265,43 +267,43 @@ func (m *_BACnetConstructedDataKeySets) SerializeWithWriteBuffer(ctx context.Con if pushErr := writeBuffer.PushContext("BACnetConstructedDataKeySets"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataKeySets") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (keySets) - if pushErr := writeBuffer.PushContext("keySets", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for keySets") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetKeySets() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetKeySets()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'keySets' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("keySets", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for keySets") + } + + // Array Field (keySets) + if pushErr := writeBuffer.PushContext("keySets", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for keySets") + } + for _curItem, _element := range m.GetKeySets() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetKeySets()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'keySets' field") } + } + if popErr := writeBuffer.PopContext("keySets", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for keySets") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataKeySets"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataKeySets") @@ -311,6 +313,7 @@ func (m *_BACnetConstructedDataKeySets) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataKeySets) isBACnetConstructedDataKeySets() bool { return true } @@ -325,3 +328,6 @@ func (m *_BACnetConstructedDataKeySets) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLandingCallControl.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLandingCallControl.go index 0b9bba53f70..fe08a8c6627 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLandingCallControl.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLandingCallControl.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLandingCallControl is the corresponding interface of BACnetConstructedDataLandingCallControl type BACnetConstructedDataLandingCallControl interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLandingCallControlExactly interface { // _BACnetConstructedDataLandingCallControl is the data-structure of this message type _BACnetConstructedDataLandingCallControl struct { *_BACnetConstructedData - LandingCallControl BACnetLandingCallStatus + LandingCallControl BACnetLandingCallStatus } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLandingCallControl) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLandingCallControl) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLandingCallControl) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LANDING_CALL_CONTROL -} +func (m *_BACnetConstructedDataLandingCallControl) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LANDING_CALL_CONTROL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLandingCallControl) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLandingCallControl) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLandingCallControl) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLandingCallControl) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLandingCallControl) GetActualValue() BACnetLandin /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLandingCallControl factory function for _BACnetConstructedDataLandingCallControl -func NewBACnetConstructedDataLandingCallControl(landingCallControl BACnetLandingCallStatus, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLandingCallControl { +func NewBACnetConstructedDataLandingCallControl( landingCallControl BACnetLandingCallStatus , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLandingCallControl { _result := &_BACnetConstructedDataLandingCallControl{ - LandingCallControl: landingCallControl, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + LandingCallControl: landingCallControl, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLandingCallControl(landingCallControl BACnetLanding // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLandingCallControl(structType interface{}) BACnetConstructedDataLandingCallControl { - if casted, ok := structType.(BACnetConstructedDataLandingCallControl); ok { + if casted, ok := structType.(BACnetConstructedDataLandingCallControl); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLandingCallControl); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLandingCallControl) GetLengthInBits(ctx context.C return lengthInBits } + func (m *_BACnetConstructedDataLandingCallControl) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLandingCallControlParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("landingCallControl"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for landingCallControl") } - _landingCallControl, _landingCallControlErr := BACnetLandingCallStatusParseWithBuffer(ctx, readBuffer) +_landingCallControl, _landingCallControlErr := BACnetLandingCallStatusParseWithBuffer(ctx, readBuffer) if _landingCallControlErr != nil { return nil, errors.Wrap(_landingCallControlErr, "Error parsing 'landingCallControl' field of BACnetConstructedDataLandingCallControl") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLandingCallControlParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataLandingCallControl{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LandingCallControl: landingCallControl, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLandingCallControl) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLandingCallControl") } - // Simple Field (landingCallControl) - if pushErr := writeBuffer.PushContext("landingCallControl"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for landingCallControl") - } - _landingCallControlErr := writeBuffer.WriteSerializable(ctx, m.GetLandingCallControl()) - if popErr := writeBuffer.PopContext("landingCallControl"); popErr != nil { - return errors.Wrap(popErr, "Error popping for landingCallControl") - } - if _landingCallControlErr != nil { - return errors.Wrap(_landingCallControlErr, "Error serializing 'landingCallControl' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (landingCallControl) + if pushErr := writeBuffer.PushContext("landingCallControl"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for landingCallControl") + } + _landingCallControlErr := writeBuffer.WriteSerializable(ctx, m.GetLandingCallControl()) + if popErr := writeBuffer.PopContext("landingCallControl"); popErr != nil { + return errors.Wrap(popErr, "Error popping for landingCallControl") + } + if _landingCallControlErr != nil { + return errors.Wrap(_landingCallControlErr, "Error serializing 'landingCallControl' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLandingCallControl"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLandingCallControl") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLandingCallControl) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLandingCallControl) isBACnetConstructedDataLandingCallControl() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLandingCallControl) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLandingCalls.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLandingCalls.go index 0dfa2570c91..0ad5e64e531 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLandingCalls.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLandingCalls.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLandingCalls is the corresponding interface of BACnetConstructedDataLandingCalls type BACnetConstructedDataLandingCalls interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataLandingCallsExactly interface { // _BACnetConstructedDataLandingCalls is the data-structure of this message type _BACnetConstructedDataLandingCalls struct { *_BACnetConstructedData - LandingCallStatus []BACnetLandingCallStatus + LandingCallStatus []BACnetLandingCallStatus } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLandingCalls) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLandingCalls) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLandingCalls) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LANDING_CALLS -} +func (m *_BACnetConstructedDataLandingCalls) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LANDING_CALLS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLandingCalls) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLandingCalls) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLandingCalls) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLandingCalls) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataLandingCalls) GetLandingCallStatus() []BACnetLand /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLandingCalls factory function for _BACnetConstructedDataLandingCalls -func NewBACnetConstructedDataLandingCalls(landingCallStatus []BACnetLandingCallStatus, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLandingCalls { +func NewBACnetConstructedDataLandingCalls( landingCallStatus []BACnetLandingCallStatus , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLandingCalls { _result := &_BACnetConstructedDataLandingCalls{ - LandingCallStatus: landingCallStatus, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + LandingCallStatus: landingCallStatus, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataLandingCalls(landingCallStatus []BACnetLandingCallS // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLandingCalls(structType interface{}) BACnetConstructedDataLandingCalls { - if casted, ok := structType.(BACnetConstructedDataLandingCalls); ok { + if casted, ok := structType.(BACnetConstructedDataLandingCalls); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLandingCalls); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataLandingCalls) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetConstructedDataLandingCalls) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataLandingCallsParseWithBuffer(ctx context.Context, readB // Terminated array var landingCallStatus []BACnetLandingCallStatus { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetLandingCallStatusParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetLandingCallStatusParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'landingCallStatus' field of BACnetConstructedDataLandingCalls") } @@ -173,7 +175,7 @@ func BACnetConstructedDataLandingCallsParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetConstructedDataLandingCalls{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LandingCallStatus: landingCallStatus, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataLandingCalls) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLandingCalls") } - // Array Field (landingCallStatus) - if pushErr := writeBuffer.PushContext("landingCallStatus", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for landingCallStatus") - } - for _curItem, _element := range m.GetLandingCallStatus() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetLandingCallStatus()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'landingCallStatus' field") - } - } - if popErr := writeBuffer.PopContext("landingCallStatus", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for landingCallStatus") + // Array Field (landingCallStatus) + if pushErr := writeBuffer.PushContext("landingCallStatus", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for landingCallStatus") + } + for _curItem, _element := range m.GetLandingCallStatus() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetLandingCallStatus()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'landingCallStatus' field") } + } + if popErr := writeBuffer.PopContext("landingCallStatus", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for landingCallStatus") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLandingCalls"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLandingCalls") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataLandingCalls) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLandingCalls) isBACnetConstructedDataLandingCalls() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataLandingCalls) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLandingDoorStatus.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLandingDoorStatus.go index 89f2136276d..814eec536f8 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLandingDoorStatus.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLandingDoorStatus.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLandingDoorStatus is the corresponding interface of BACnetConstructedDataLandingDoorStatus type BACnetConstructedDataLandingDoorStatus interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataLandingDoorStatusExactly interface { // _BACnetConstructedDataLandingDoorStatus is the data-structure of this message type _BACnetConstructedDataLandingDoorStatus struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - LandingDoorStatus []BACnetLandingDoorStatus + NumberOfDataElements BACnetApplicationTagUnsignedInteger + LandingDoorStatus []BACnetLandingDoorStatus } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLandingDoorStatus) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLandingDoorStatus) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLandingDoorStatus) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LANDING_DOOR_STATUS -} +func (m *_BACnetConstructedDataLandingDoorStatus) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LANDING_DOOR_STATUS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLandingDoorStatus) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLandingDoorStatus) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLandingDoorStatus) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLandingDoorStatus) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataLandingDoorStatus) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLandingDoorStatus factory function for _BACnetConstructedDataLandingDoorStatus -func NewBACnetConstructedDataLandingDoorStatus(numberOfDataElements BACnetApplicationTagUnsignedInteger, landingDoorStatus []BACnetLandingDoorStatus, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLandingDoorStatus { +func NewBACnetConstructedDataLandingDoorStatus( numberOfDataElements BACnetApplicationTagUnsignedInteger , landingDoorStatus []BACnetLandingDoorStatus , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLandingDoorStatus { _result := &_BACnetConstructedDataLandingDoorStatus{ - NumberOfDataElements: numberOfDataElements, - LandingDoorStatus: landingDoorStatus, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + LandingDoorStatus: landingDoorStatus, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataLandingDoorStatus(numberOfDataElements BACnetApplic // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLandingDoorStatus(structType interface{}) BACnetConstructedDataLandingDoorStatus { - if casted, ok := structType.(BACnetConstructedDataLandingDoorStatus); ok { + if casted, ok := structType.(BACnetConstructedDataLandingDoorStatus); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLandingDoorStatus); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataLandingDoorStatus) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetConstructedDataLandingDoorStatus) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataLandingDoorStatusParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataLandingDoorStatusParseWithBuffer(ctx context.Context, // Terminated array var landingDoorStatus []BACnetLandingDoorStatus { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetLandingDoorStatusParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetLandingDoorStatusParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'landingDoorStatus' field of BACnetConstructedDataLandingDoorStatus") } @@ -235,11 +237,11 @@ func BACnetConstructedDataLandingDoorStatusParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataLandingDoorStatus{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - LandingDoorStatus: landingDoorStatus, + LandingDoorStatus: landingDoorStatus, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataLandingDoorStatus) SerializeWithWriteBuffer(ctx c if pushErr := writeBuffer.PushContext("BACnetConstructedDataLandingDoorStatus"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLandingDoorStatus") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (landingDoorStatus) - if pushErr := writeBuffer.PushContext("landingDoorStatus", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for landingDoorStatus") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetLandingDoorStatus() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetLandingDoorStatus()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'landingDoorStatus' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("landingDoorStatus", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for landingDoorStatus") + } + + // Array Field (landingDoorStatus) + if pushErr := writeBuffer.PushContext("landingDoorStatus", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for landingDoorStatus") + } + for _curItem, _element := range m.GetLandingDoorStatus() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetLandingDoorStatus()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'landingDoorStatus' field") } + } + if popErr := writeBuffer.PopContext("landingDoorStatus", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for landingDoorStatus") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLandingDoorStatus"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLandingDoorStatus") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataLandingDoorStatus) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLandingDoorStatus) isBACnetConstructedDataLandingDoorStatus() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataLandingDoorStatus) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueAll.go index 0f086f1f334..daad3f2f332 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLargeAnalogValueAll is the corresponding interface of BACnetConstructedDataLargeAnalogValueAll type BACnetConstructedDataLargeAnalogValueAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataLargeAnalogValueAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLargeAnalogValueAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_LARGE_ANALOG_VALUE -} +func (m *_BACnetConstructedDataLargeAnalogValueAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_LARGE_ANALOG_VALUE} -func (m *_BACnetConstructedDataLargeAnalogValueAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataLargeAnalogValueAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLargeAnalogValueAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLargeAnalogValueAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLargeAnalogValueAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLargeAnalogValueAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataLargeAnalogValueAll factory function for _BACnetConstructedDataLargeAnalogValueAll -func NewBACnetConstructedDataLargeAnalogValueAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLargeAnalogValueAll { +func NewBACnetConstructedDataLargeAnalogValueAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLargeAnalogValueAll { _result := &_BACnetConstructedDataLargeAnalogValueAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataLargeAnalogValueAll(openingTag BACnetOpeningTag, pe // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLargeAnalogValueAll(structType interface{}) BACnetConstructedDataLargeAnalogValueAll { - if casted, ok := structType.(BACnetConstructedDataLargeAnalogValueAll); ok { + if casted, ok := structType.(BACnetConstructedDataLargeAnalogValueAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLargeAnalogValueAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataLargeAnalogValueAll) GetLengthInBits(ctx context. return lengthInBits } + func (m *_BACnetConstructedDataLargeAnalogValueAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataLargeAnalogValueAllParseWithBuffer(ctx context.Context _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataLargeAnalogValueAllParseWithBuffer(ctx context.Context // Create a partially initialized instance _child := &_BACnetConstructedDataLargeAnalogValueAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataLargeAnalogValueAll) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLargeAnalogValueAll) isBACnetConstructedDataLargeAnalogValueAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataLargeAnalogValueAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueCOVIncrement.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueCOVIncrement.go index 8de229213c4..354d16f1380 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueCOVIncrement.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueCOVIncrement.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLargeAnalogValueCOVIncrement is the corresponding interface of BACnetConstructedDataLargeAnalogValueCOVIncrement type BACnetConstructedDataLargeAnalogValueCOVIncrement interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLargeAnalogValueCOVIncrementExactly interface { // _BACnetConstructedDataLargeAnalogValueCOVIncrement is the data-structure of this message type _BACnetConstructedDataLargeAnalogValueCOVIncrement struct { *_BACnetConstructedData - CovIncrement BACnetApplicationTagDouble + CovIncrement BACnetApplicationTagDouble } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLargeAnalogValueCOVIncrement) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_LARGE_ANALOG_VALUE -} +func (m *_BACnetConstructedDataLargeAnalogValueCOVIncrement) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_LARGE_ANALOG_VALUE} -func (m *_BACnetConstructedDataLargeAnalogValueCOVIncrement) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_COV_INCREMENT -} +func (m *_BACnetConstructedDataLargeAnalogValueCOVIncrement) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_COV_INCREMENT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLargeAnalogValueCOVIncrement) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLargeAnalogValueCOVIncrement) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLargeAnalogValueCOVIncrement) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLargeAnalogValueCOVIncrement) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLargeAnalogValueCOVIncrement) GetActualValue() BA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLargeAnalogValueCOVIncrement factory function for _BACnetConstructedDataLargeAnalogValueCOVIncrement -func NewBACnetConstructedDataLargeAnalogValueCOVIncrement(covIncrement BACnetApplicationTagDouble, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLargeAnalogValueCOVIncrement { +func NewBACnetConstructedDataLargeAnalogValueCOVIncrement( covIncrement BACnetApplicationTagDouble , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLargeAnalogValueCOVIncrement { _result := &_BACnetConstructedDataLargeAnalogValueCOVIncrement{ - CovIncrement: covIncrement, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + CovIncrement: covIncrement, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLargeAnalogValueCOVIncrement(covIncrement BACnetApp // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLargeAnalogValueCOVIncrement(structType interface{}) BACnetConstructedDataLargeAnalogValueCOVIncrement { - if casted, ok := structType.(BACnetConstructedDataLargeAnalogValueCOVIncrement); ok { + if casted, ok := structType.(BACnetConstructedDataLargeAnalogValueCOVIncrement); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLargeAnalogValueCOVIncrement); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLargeAnalogValueCOVIncrement) GetLengthInBits(ctx return lengthInBits } + func (m *_BACnetConstructedDataLargeAnalogValueCOVIncrement) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLargeAnalogValueCOVIncrementParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("covIncrement"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for covIncrement") } - _covIncrement, _covIncrementErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_covIncrement, _covIncrementErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _covIncrementErr != nil { return nil, errors.Wrap(_covIncrementErr, "Error parsing 'covIncrement' field of BACnetConstructedDataLargeAnalogValueCOVIncrement") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLargeAnalogValueCOVIncrementParseWithBuffer(ctx contex // Create a partially initialized instance _child := &_BACnetConstructedDataLargeAnalogValueCOVIncrement{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, CovIncrement: covIncrement, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLargeAnalogValueCOVIncrement) SerializeWithWriteB return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLargeAnalogValueCOVIncrement") } - // Simple Field (covIncrement) - if pushErr := writeBuffer.PushContext("covIncrement"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for covIncrement") - } - _covIncrementErr := writeBuffer.WriteSerializable(ctx, m.GetCovIncrement()) - if popErr := writeBuffer.PopContext("covIncrement"); popErr != nil { - return errors.Wrap(popErr, "Error popping for covIncrement") - } - if _covIncrementErr != nil { - return errors.Wrap(_covIncrementErr, "Error serializing 'covIncrement' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (covIncrement) + if pushErr := writeBuffer.PushContext("covIncrement"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for covIncrement") + } + _covIncrementErr := writeBuffer.WriteSerializable(ctx, m.GetCovIncrement()) + if popErr := writeBuffer.PopContext("covIncrement"); popErr != nil { + return errors.Wrap(popErr, "Error popping for covIncrement") + } + if _covIncrementErr != nil { + return errors.Wrap(_covIncrementErr, "Error serializing 'covIncrement' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLargeAnalogValueCOVIncrement"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLargeAnalogValueCOVIncrement") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLargeAnalogValueCOVIncrement) SerializeWithWriteB return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLargeAnalogValueCOVIncrement) isBACnetConstructedDataLargeAnalogValueCOVIncrement() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLargeAnalogValueCOVIncrement) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueDeadband.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueDeadband.go index 6c8245ff881..3fbd2eb2e66 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueDeadband.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueDeadband.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLargeAnalogValueDeadband is the corresponding interface of BACnetConstructedDataLargeAnalogValueDeadband type BACnetConstructedDataLargeAnalogValueDeadband interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLargeAnalogValueDeadbandExactly interface { // _BACnetConstructedDataLargeAnalogValueDeadband is the data-structure of this message type _BACnetConstructedDataLargeAnalogValueDeadband struct { *_BACnetConstructedData - Deadband BACnetApplicationTagDouble + Deadband BACnetApplicationTagDouble } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLargeAnalogValueDeadband) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_LARGE_ANALOG_VALUE -} +func (m *_BACnetConstructedDataLargeAnalogValueDeadband) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_LARGE_ANALOG_VALUE} -func (m *_BACnetConstructedDataLargeAnalogValueDeadband) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_DEADBAND -} +func (m *_BACnetConstructedDataLargeAnalogValueDeadband) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_DEADBAND} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLargeAnalogValueDeadband) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLargeAnalogValueDeadband) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLargeAnalogValueDeadband) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLargeAnalogValueDeadband) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLargeAnalogValueDeadband) GetActualValue() BACnet /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLargeAnalogValueDeadband factory function for _BACnetConstructedDataLargeAnalogValueDeadband -func NewBACnetConstructedDataLargeAnalogValueDeadband(deadband BACnetApplicationTagDouble, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLargeAnalogValueDeadband { +func NewBACnetConstructedDataLargeAnalogValueDeadband( deadband BACnetApplicationTagDouble , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLargeAnalogValueDeadband { _result := &_BACnetConstructedDataLargeAnalogValueDeadband{ - Deadband: deadband, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Deadband: deadband, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLargeAnalogValueDeadband(deadband BACnetApplication // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLargeAnalogValueDeadband(structType interface{}) BACnetConstructedDataLargeAnalogValueDeadband { - if casted, ok := structType.(BACnetConstructedDataLargeAnalogValueDeadband); ok { + if casted, ok := structType.(BACnetConstructedDataLargeAnalogValueDeadband); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLargeAnalogValueDeadband); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLargeAnalogValueDeadband) GetLengthInBits(ctx con return lengthInBits } + func (m *_BACnetConstructedDataLargeAnalogValueDeadband) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLargeAnalogValueDeadbandParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("deadband"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for deadband") } - _deadband, _deadbandErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_deadband, _deadbandErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _deadbandErr != nil { return nil, errors.Wrap(_deadbandErr, "Error parsing 'deadband' field of BACnetConstructedDataLargeAnalogValueDeadband") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLargeAnalogValueDeadbandParseWithBuffer(ctx context.Co // Create a partially initialized instance _child := &_BACnetConstructedDataLargeAnalogValueDeadband{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Deadband: deadband, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLargeAnalogValueDeadband) SerializeWithWriteBuffe return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLargeAnalogValueDeadband") } - // Simple Field (deadband) - if pushErr := writeBuffer.PushContext("deadband"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for deadband") - } - _deadbandErr := writeBuffer.WriteSerializable(ctx, m.GetDeadband()) - if popErr := writeBuffer.PopContext("deadband"); popErr != nil { - return errors.Wrap(popErr, "Error popping for deadband") - } - if _deadbandErr != nil { - return errors.Wrap(_deadbandErr, "Error serializing 'deadband' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (deadband) + if pushErr := writeBuffer.PushContext("deadband"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for deadband") + } + _deadbandErr := writeBuffer.WriteSerializable(ctx, m.GetDeadband()) + if popErr := writeBuffer.PopContext("deadband"); popErr != nil { + return errors.Wrap(popErr, "Error popping for deadband") + } + if _deadbandErr != nil { + return errors.Wrap(_deadbandErr, "Error serializing 'deadband' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLargeAnalogValueDeadband"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLargeAnalogValueDeadband") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLargeAnalogValueDeadband) SerializeWithWriteBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLargeAnalogValueDeadband) isBACnetConstructedDataLargeAnalogValueDeadband() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLargeAnalogValueDeadband) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueFaultHighLimit.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueFaultHighLimit.go index 0e9a612857d..c1b1ed3bce9 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueFaultHighLimit.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueFaultHighLimit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLargeAnalogValueFaultHighLimit is the corresponding interface of BACnetConstructedDataLargeAnalogValueFaultHighLimit type BACnetConstructedDataLargeAnalogValueFaultHighLimit interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLargeAnalogValueFaultHighLimitExactly interface { // _BACnetConstructedDataLargeAnalogValueFaultHighLimit is the data-structure of this message type _BACnetConstructedDataLargeAnalogValueFaultHighLimit struct { *_BACnetConstructedData - FaultHighLimit BACnetApplicationTagDouble + FaultHighLimit BACnetApplicationTagDouble } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLargeAnalogValueFaultHighLimit) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_LARGE_ANALOG_VALUE -} +func (m *_BACnetConstructedDataLargeAnalogValueFaultHighLimit) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_LARGE_ANALOG_VALUE} -func (m *_BACnetConstructedDataLargeAnalogValueFaultHighLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FAULT_HIGH_LIMIT -} +func (m *_BACnetConstructedDataLargeAnalogValueFaultHighLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FAULT_HIGH_LIMIT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLargeAnalogValueFaultHighLimit) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLargeAnalogValueFaultHighLimit) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLargeAnalogValueFaultHighLimit) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLargeAnalogValueFaultHighLimit) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLargeAnalogValueFaultHighLimit) GetActualValue() /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLargeAnalogValueFaultHighLimit factory function for _BACnetConstructedDataLargeAnalogValueFaultHighLimit -func NewBACnetConstructedDataLargeAnalogValueFaultHighLimit(faultHighLimit BACnetApplicationTagDouble, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLargeAnalogValueFaultHighLimit { +func NewBACnetConstructedDataLargeAnalogValueFaultHighLimit( faultHighLimit BACnetApplicationTagDouble , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLargeAnalogValueFaultHighLimit { _result := &_BACnetConstructedDataLargeAnalogValueFaultHighLimit{ - FaultHighLimit: faultHighLimit, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + FaultHighLimit: faultHighLimit, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLargeAnalogValueFaultHighLimit(faultHighLimit BACne // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLargeAnalogValueFaultHighLimit(structType interface{}) BACnetConstructedDataLargeAnalogValueFaultHighLimit { - if casted, ok := structType.(BACnetConstructedDataLargeAnalogValueFaultHighLimit); ok { + if casted, ok := structType.(BACnetConstructedDataLargeAnalogValueFaultHighLimit); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLargeAnalogValueFaultHighLimit); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLargeAnalogValueFaultHighLimit) GetLengthInBits(c return lengthInBits } + func (m *_BACnetConstructedDataLargeAnalogValueFaultHighLimit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLargeAnalogValueFaultHighLimitParseWithBuffer(ctx cont if pullErr := readBuffer.PullContext("faultHighLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for faultHighLimit") } - _faultHighLimit, _faultHighLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_faultHighLimit, _faultHighLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _faultHighLimitErr != nil { return nil, errors.Wrap(_faultHighLimitErr, "Error parsing 'faultHighLimit' field of BACnetConstructedDataLargeAnalogValueFaultHighLimit") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLargeAnalogValueFaultHighLimitParseWithBuffer(ctx cont // Create a partially initialized instance _child := &_BACnetConstructedDataLargeAnalogValueFaultHighLimit{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FaultHighLimit: faultHighLimit, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLargeAnalogValueFaultHighLimit) SerializeWithWrit return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLargeAnalogValueFaultHighLimit") } - // Simple Field (faultHighLimit) - if pushErr := writeBuffer.PushContext("faultHighLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for faultHighLimit") - } - _faultHighLimitErr := writeBuffer.WriteSerializable(ctx, m.GetFaultHighLimit()) - if popErr := writeBuffer.PopContext("faultHighLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for faultHighLimit") - } - if _faultHighLimitErr != nil { - return errors.Wrap(_faultHighLimitErr, "Error serializing 'faultHighLimit' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (faultHighLimit) + if pushErr := writeBuffer.PushContext("faultHighLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for faultHighLimit") + } + _faultHighLimitErr := writeBuffer.WriteSerializable(ctx, m.GetFaultHighLimit()) + if popErr := writeBuffer.PopContext("faultHighLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for faultHighLimit") + } + if _faultHighLimitErr != nil { + return errors.Wrap(_faultHighLimitErr, "Error serializing 'faultHighLimit' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLargeAnalogValueFaultHighLimit"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLargeAnalogValueFaultHighLimit") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLargeAnalogValueFaultHighLimit) SerializeWithWrit return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLargeAnalogValueFaultHighLimit) isBACnetConstructedDataLargeAnalogValueFaultHighLimit() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLargeAnalogValueFaultHighLimit) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueFaultLowLimit.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueFaultLowLimit.go index 04d1a82de46..7c4d42128ed 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueFaultLowLimit.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueFaultLowLimit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLargeAnalogValueFaultLowLimit is the corresponding interface of BACnetConstructedDataLargeAnalogValueFaultLowLimit type BACnetConstructedDataLargeAnalogValueFaultLowLimit interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLargeAnalogValueFaultLowLimitExactly interface { // _BACnetConstructedDataLargeAnalogValueFaultLowLimit is the data-structure of this message type _BACnetConstructedDataLargeAnalogValueFaultLowLimit struct { *_BACnetConstructedData - FaultLowLimit BACnetApplicationTagDouble + FaultLowLimit BACnetApplicationTagDouble } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLargeAnalogValueFaultLowLimit) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_LARGE_ANALOG_VALUE -} +func (m *_BACnetConstructedDataLargeAnalogValueFaultLowLimit) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_LARGE_ANALOG_VALUE} -func (m *_BACnetConstructedDataLargeAnalogValueFaultLowLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FAULT_LOW_LIMIT -} +func (m *_BACnetConstructedDataLargeAnalogValueFaultLowLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FAULT_LOW_LIMIT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLargeAnalogValueFaultLowLimit) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLargeAnalogValueFaultLowLimit) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLargeAnalogValueFaultLowLimit) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLargeAnalogValueFaultLowLimit) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLargeAnalogValueFaultLowLimit) GetActualValue() B /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLargeAnalogValueFaultLowLimit factory function for _BACnetConstructedDataLargeAnalogValueFaultLowLimit -func NewBACnetConstructedDataLargeAnalogValueFaultLowLimit(faultLowLimit BACnetApplicationTagDouble, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLargeAnalogValueFaultLowLimit { +func NewBACnetConstructedDataLargeAnalogValueFaultLowLimit( faultLowLimit BACnetApplicationTagDouble , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLargeAnalogValueFaultLowLimit { _result := &_BACnetConstructedDataLargeAnalogValueFaultLowLimit{ - FaultLowLimit: faultLowLimit, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + FaultLowLimit: faultLowLimit, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLargeAnalogValueFaultLowLimit(faultLowLimit BACnetA // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLargeAnalogValueFaultLowLimit(structType interface{}) BACnetConstructedDataLargeAnalogValueFaultLowLimit { - if casted, ok := structType.(BACnetConstructedDataLargeAnalogValueFaultLowLimit); ok { + if casted, ok := structType.(BACnetConstructedDataLargeAnalogValueFaultLowLimit); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLargeAnalogValueFaultLowLimit); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLargeAnalogValueFaultLowLimit) GetLengthInBits(ct return lengthInBits } + func (m *_BACnetConstructedDataLargeAnalogValueFaultLowLimit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLargeAnalogValueFaultLowLimitParseWithBuffer(ctx conte if pullErr := readBuffer.PullContext("faultLowLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for faultLowLimit") } - _faultLowLimit, _faultLowLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_faultLowLimit, _faultLowLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _faultLowLimitErr != nil { return nil, errors.Wrap(_faultLowLimitErr, "Error parsing 'faultLowLimit' field of BACnetConstructedDataLargeAnalogValueFaultLowLimit") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLargeAnalogValueFaultLowLimitParseWithBuffer(ctx conte // Create a partially initialized instance _child := &_BACnetConstructedDataLargeAnalogValueFaultLowLimit{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FaultLowLimit: faultLowLimit, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLargeAnalogValueFaultLowLimit) SerializeWithWrite return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLargeAnalogValueFaultLowLimit") } - // Simple Field (faultLowLimit) - if pushErr := writeBuffer.PushContext("faultLowLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for faultLowLimit") - } - _faultLowLimitErr := writeBuffer.WriteSerializable(ctx, m.GetFaultLowLimit()) - if popErr := writeBuffer.PopContext("faultLowLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for faultLowLimit") - } - if _faultLowLimitErr != nil { - return errors.Wrap(_faultLowLimitErr, "Error serializing 'faultLowLimit' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (faultLowLimit) + if pushErr := writeBuffer.PushContext("faultLowLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for faultLowLimit") + } + _faultLowLimitErr := writeBuffer.WriteSerializable(ctx, m.GetFaultLowLimit()) + if popErr := writeBuffer.PopContext("faultLowLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for faultLowLimit") + } + if _faultLowLimitErr != nil { + return errors.Wrap(_faultLowLimitErr, "Error serializing 'faultLowLimit' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLargeAnalogValueFaultLowLimit"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLargeAnalogValueFaultLowLimit") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLargeAnalogValueFaultLowLimit) SerializeWithWrite return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLargeAnalogValueFaultLowLimit) isBACnetConstructedDataLargeAnalogValueFaultLowLimit() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLargeAnalogValueFaultLowLimit) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueHighLimit.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueHighLimit.go index 0459ee5780d..81bdc40ba85 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueHighLimit.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueHighLimit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLargeAnalogValueHighLimit is the corresponding interface of BACnetConstructedDataLargeAnalogValueHighLimit type BACnetConstructedDataLargeAnalogValueHighLimit interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLargeAnalogValueHighLimitExactly interface { // _BACnetConstructedDataLargeAnalogValueHighLimit is the data-structure of this message type _BACnetConstructedDataLargeAnalogValueHighLimit struct { *_BACnetConstructedData - HighLimit BACnetApplicationTagDouble + HighLimit BACnetApplicationTagDouble } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLargeAnalogValueHighLimit) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_LARGE_ANALOG_VALUE -} +func (m *_BACnetConstructedDataLargeAnalogValueHighLimit) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_LARGE_ANALOG_VALUE} -func (m *_BACnetConstructedDataLargeAnalogValueHighLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_HIGH_LIMIT -} +func (m *_BACnetConstructedDataLargeAnalogValueHighLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_HIGH_LIMIT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLargeAnalogValueHighLimit) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLargeAnalogValueHighLimit) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLargeAnalogValueHighLimit) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLargeAnalogValueHighLimit) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLargeAnalogValueHighLimit) GetActualValue() BACne /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLargeAnalogValueHighLimit factory function for _BACnetConstructedDataLargeAnalogValueHighLimit -func NewBACnetConstructedDataLargeAnalogValueHighLimit(highLimit BACnetApplicationTagDouble, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLargeAnalogValueHighLimit { +func NewBACnetConstructedDataLargeAnalogValueHighLimit( highLimit BACnetApplicationTagDouble , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLargeAnalogValueHighLimit { _result := &_BACnetConstructedDataLargeAnalogValueHighLimit{ - HighLimit: highLimit, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + HighLimit: highLimit, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLargeAnalogValueHighLimit(highLimit BACnetApplicati // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLargeAnalogValueHighLimit(structType interface{}) BACnetConstructedDataLargeAnalogValueHighLimit { - if casted, ok := structType.(BACnetConstructedDataLargeAnalogValueHighLimit); ok { + if casted, ok := structType.(BACnetConstructedDataLargeAnalogValueHighLimit); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLargeAnalogValueHighLimit); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLargeAnalogValueHighLimit) GetLengthInBits(ctx co return lengthInBits } + func (m *_BACnetConstructedDataLargeAnalogValueHighLimit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLargeAnalogValueHighLimitParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("highLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for highLimit") } - _highLimit, _highLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_highLimit, _highLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _highLimitErr != nil { return nil, errors.Wrap(_highLimitErr, "Error parsing 'highLimit' field of BACnetConstructedDataLargeAnalogValueHighLimit") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLargeAnalogValueHighLimitParseWithBuffer(ctx context.C // Create a partially initialized instance _child := &_BACnetConstructedDataLargeAnalogValueHighLimit{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, HighLimit: highLimit, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLargeAnalogValueHighLimit) SerializeWithWriteBuff return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLargeAnalogValueHighLimit") } - // Simple Field (highLimit) - if pushErr := writeBuffer.PushContext("highLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for highLimit") - } - _highLimitErr := writeBuffer.WriteSerializable(ctx, m.GetHighLimit()) - if popErr := writeBuffer.PopContext("highLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for highLimit") - } - if _highLimitErr != nil { - return errors.Wrap(_highLimitErr, "Error serializing 'highLimit' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (highLimit) + if pushErr := writeBuffer.PushContext("highLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for highLimit") + } + _highLimitErr := writeBuffer.WriteSerializable(ctx, m.GetHighLimit()) + if popErr := writeBuffer.PopContext("highLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for highLimit") + } + if _highLimitErr != nil { + return errors.Wrap(_highLimitErr, "Error serializing 'highLimit' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLargeAnalogValueHighLimit"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLargeAnalogValueHighLimit") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLargeAnalogValueHighLimit) SerializeWithWriteBuff return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLargeAnalogValueHighLimit) isBACnetConstructedDataLargeAnalogValueHighLimit() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLargeAnalogValueHighLimit) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueLowLimit.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueLowLimit.go index e36fe31cb06..2af9409c0cb 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueLowLimit.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueLowLimit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLargeAnalogValueLowLimit is the corresponding interface of BACnetConstructedDataLargeAnalogValueLowLimit type BACnetConstructedDataLargeAnalogValueLowLimit interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLargeAnalogValueLowLimitExactly interface { // _BACnetConstructedDataLargeAnalogValueLowLimit is the data-structure of this message type _BACnetConstructedDataLargeAnalogValueLowLimit struct { *_BACnetConstructedData - LowLimit BACnetApplicationTagDouble + LowLimit BACnetApplicationTagDouble } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLargeAnalogValueLowLimit) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_LARGE_ANALOG_VALUE -} +func (m *_BACnetConstructedDataLargeAnalogValueLowLimit) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_LARGE_ANALOG_VALUE} -func (m *_BACnetConstructedDataLargeAnalogValueLowLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LOW_LIMIT -} +func (m *_BACnetConstructedDataLargeAnalogValueLowLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LOW_LIMIT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLargeAnalogValueLowLimit) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLargeAnalogValueLowLimit) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLargeAnalogValueLowLimit) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLargeAnalogValueLowLimit) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLargeAnalogValueLowLimit) GetActualValue() BACnet /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLargeAnalogValueLowLimit factory function for _BACnetConstructedDataLargeAnalogValueLowLimit -func NewBACnetConstructedDataLargeAnalogValueLowLimit(lowLimit BACnetApplicationTagDouble, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLargeAnalogValueLowLimit { +func NewBACnetConstructedDataLargeAnalogValueLowLimit( lowLimit BACnetApplicationTagDouble , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLargeAnalogValueLowLimit { _result := &_BACnetConstructedDataLargeAnalogValueLowLimit{ - LowLimit: lowLimit, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + LowLimit: lowLimit, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLargeAnalogValueLowLimit(lowLimit BACnetApplication // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLargeAnalogValueLowLimit(structType interface{}) BACnetConstructedDataLargeAnalogValueLowLimit { - if casted, ok := structType.(BACnetConstructedDataLargeAnalogValueLowLimit); ok { + if casted, ok := structType.(BACnetConstructedDataLargeAnalogValueLowLimit); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLargeAnalogValueLowLimit); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLargeAnalogValueLowLimit) GetLengthInBits(ctx con return lengthInBits } + func (m *_BACnetConstructedDataLargeAnalogValueLowLimit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLargeAnalogValueLowLimitParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("lowLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lowLimit") } - _lowLimit, _lowLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_lowLimit, _lowLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _lowLimitErr != nil { return nil, errors.Wrap(_lowLimitErr, "Error parsing 'lowLimit' field of BACnetConstructedDataLargeAnalogValueLowLimit") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLargeAnalogValueLowLimitParseWithBuffer(ctx context.Co // Create a partially initialized instance _child := &_BACnetConstructedDataLargeAnalogValueLowLimit{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LowLimit: lowLimit, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLargeAnalogValueLowLimit) SerializeWithWriteBuffe return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLargeAnalogValueLowLimit") } - // Simple Field (lowLimit) - if pushErr := writeBuffer.PushContext("lowLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lowLimit") - } - _lowLimitErr := writeBuffer.WriteSerializable(ctx, m.GetLowLimit()) - if popErr := writeBuffer.PopContext("lowLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lowLimit") - } - if _lowLimitErr != nil { - return errors.Wrap(_lowLimitErr, "Error serializing 'lowLimit' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (lowLimit) + if pushErr := writeBuffer.PushContext("lowLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lowLimit") + } + _lowLimitErr := writeBuffer.WriteSerializable(ctx, m.GetLowLimit()) + if popErr := writeBuffer.PopContext("lowLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lowLimit") + } + if _lowLimitErr != nil { + return errors.Wrap(_lowLimitErr, "Error serializing 'lowLimit' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLargeAnalogValueLowLimit"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLargeAnalogValueLowLimit") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLargeAnalogValueLowLimit) SerializeWithWriteBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLargeAnalogValueLowLimit) isBACnetConstructedDataLargeAnalogValueLowLimit() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLargeAnalogValueLowLimit) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueMaxPresValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueMaxPresValue.go index 338f480e34f..9b7880b10a6 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueMaxPresValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueMaxPresValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLargeAnalogValueMaxPresValue is the corresponding interface of BACnetConstructedDataLargeAnalogValueMaxPresValue type BACnetConstructedDataLargeAnalogValueMaxPresValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLargeAnalogValueMaxPresValueExactly interface { // _BACnetConstructedDataLargeAnalogValueMaxPresValue is the data-structure of this message type _BACnetConstructedDataLargeAnalogValueMaxPresValue struct { *_BACnetConstructedData - MaxPresValue BACnetApplicationTagDouble + MaxPresValue BACnetApplicationTagDouble } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLargeAnalogValueMaxPresValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_LARGE_ANALOG_VALUE -} +func (m *_BACnetConstructedDataLargeAnalogValueMaxPresValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_LARGE_ANALOG_VALUE} -func (m *_BACnetConstructedDataLargeAnalogValueMaxPresValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MAX_PRES_VALUE -} +func (m *_BACnetConstructedDataLargeAnalogValueMaxPresValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MAX_PRES_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLargeAnalogValueMaxPresValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLargeAnalogValueMaxPresValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLargeAnalogValueMaxPresValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLargeAnalogValueMaxPresValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLargeAnalogValueMaxPresValue) GetActualValue() BA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLargeAnalogValueMaxPresValue factory function for _BACnetConstructedDataLargeAnalogValueMaxPresValue -func NewBACnetConstructedDataLargeAnalogValueMaxPresValue(maxPresValue BACnetApplicationTagDouble, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLargeAnalogValueMaxPresValue { +func NewBACnetConstructedDataLargeAnalogValueMaxPresValue( maxPresValue BACnetApplicationTagDouble , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLargeAnalogValueMaxPresValue { _result := &_BACnetConstructedDataLargeAnalogValueMaxPresValue{ - MaxPresValue: maxPresValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + MaxPresValue: maxPresValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLargeAnalogValueMaxPresValue(maxPresValue BACnetApp // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLargeAnalogValueMaxPresValue(structType interface{}) BACnetConstructedDataLargeAnalogValueMaxPresValue { - if casted, ok := structType.(BACnetConstructedDataLargeAnalogValueMaxPresValue); ok { + if casted, ok := structType.(BACnetConstructedDataLargeAnalogValueMaxPresValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLargeAnalogValueMaxPresValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLargeAnalogValueMaxPresValue) GetLengthInBits(ctx return lengthInBits } + func (m *_BACnetConstructedDataLargeAnalogValueMaxPresValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLargeAnalogValueMaxPresValueParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("maxPresValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for maxPresValue") } - _maxPresValue, _maxPresValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_maxPresValue, _maxPresValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _maxPresValueErr != nil { return nil, errors.Wrap(_maxPresValueErr, "Error parsing 'maxPresValue' field of BACnetConstructedDataLargeAnalogValueMaxPresValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLargeAnalogValueMaxPresValueParseWithBuffer(ctx contex // Create a partially initialized instance _child := &_BACnetConstructedDataLargeAnalogValueMaxPresValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, MaxPresValue: maxPresValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLargeAnalogValueMaxPresValue) SerializeWithWriteB return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLargeAnalogValueMaxPresValue") } - // Simple Field (maxPresValue) - if pushErr := writeBuffer.PushContext("maxPresValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for maxPresValue") - } - _maxPresValueErr := writeBuffer.WriteSerializable(ctx, m.GetMaxPresValue()) - if popErr := writeBuffer.PopContext("maxPresValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for maxPresValue") - } - if _maxPresValueErr != nil { - return errors.Wrap(_maxPresValueErr, "Error serializing 'maxPresValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (maxPresValue) + if pushErr := writeBuffer.PushContext("maxPresValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for maxPresValue") + } + _maxPresValueErr := writeBuffer.WriteSerializable(ctx, m.GetMaxPresValue()) + if popErr := writeBuffer.PopContext("maxPresValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for maxPresValue") + } + if _maxPresValueErr != nil { + return errors.Wrap(_maxPresValueErr, "Error serializing 'maxPresValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLargeAnalogValueMaxPresValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLargeAnalogValueMaxPresValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLargeAnalogValueMaxPresValue) SerializeWithWriteB return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLargeAnalogValueMaxPresValue) isBACnetConstructedDataLargeAnalogValueMaxPresValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLargeAnalogValueMaxPresValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueMinPresValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueMinPresValue.go index 54b42e6beab..17bc8133914 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueMinPresValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueMinPresValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLargeAnalogValueMinPresValue is the corresponding interface of BACnetConstructedDataLargeAnalogValueMinPresValue type BACnetConstructedDataLargeAnalogValueMinPresValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLargeAnalogValueMinPresValueExactly interface { // _BACnetConstructedDataLargeAnalogValueMinPresValue is the data-structure of this message type _BACnetConstructedDataLargeAnalogValueMinPresValue struct { *_BACnetConstructedData - MinPresValue BACnetApplicationTagDouble + MinPresValue BACnetApplicationTagDouble } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLargeAnalogValueMinPresValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_LARGE_ANALOG_VALUE -} +func (m *_BACnetConstructedDataLargeAnalogValueMinPresValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_LARGE_ANALOG_VALUE} -func (m *_BACnetConstructedDataLargeAnalogValueMinPresValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MIN_PRES_VALUE -} +func (m *_BACnetConstructedDataLargeAnalogValueMinPresValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MIN_PRES_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLargeAnalogValueMinPresValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLargeAnalogValueMinPresValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLargeAnalogValueMinPresValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLargeAnalogValueMinPresValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLargeAnalogValueMinPresValue) GetActualValue() BA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLargeAnalogValueMinPresValue factory function for _BACnetConstructedDataLargeAnalogValueMinPresValue -func NewBACnetConstructedDataLargeAnalogValueMinPresValue(minPresValue BACnetApplicationTagDouble, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLargeAnalogValueMinPresValue { +func NewBACnetConstructedDataLargeAnalogValueMinPresValue( minPresValue BACnetApplicationTagDouble , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLargeAnalogValueMinPresValue { _result := &_BACnetConstructedDataLargeAnalogValueMinPresValue{ - MinPresValue: minPresValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + MinPresValue: minPresValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLargeAnalogValueMinPresValue(minPresValue BACnetApp // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLargeAnalogValueMinPresValue(structType interface{}) BACnetConstructedDataLargeAnalogValueMinPresValue { - if casted, ok := structType.(BACnetConstructedDataLargeAnalogValueMinPresValue); ok { + if casted, ok := structType.(BACnetConstructedDataLargeAnalogValueMinPresValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLargeAnalogValueMinPresValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLargeAnalogValueMinPresValue) GetLengthInBits(ctx return lengthInBits } + func (m *_BACnetConstructedDataLargeAnalogValueMinPresValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLargeAnalogValueMinPresValueParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("minPresValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for minPresValue") } - _minPresValue, _minPresValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_minPresValue, _minPresValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _minPresValueErr != nil { return nil, errors.Wrap(_minPresValueErr, "Error parsing 'minPresValue' field of BACnetConstructedDataLargeAnalogValueMinPresValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLargeAnalogValueMinPresValueParseWithBuffer(ctx contex // Create a partially initialized instance _child := &_BACnetConstructedDataLargeAnalogValueMinPresValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, MinPresValue: minPresValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLargeAnalogValueMinPresValue) SerializeWithWriteB return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLargeAnalogValueMinPresValue") } - // Simple Field (minPresValue) - if pushErr := writeBuffer.PushContext("minPresValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for minPresValue") - } - _minPresValueErr := writeBuffer.WriteSerializable(ctx, m.GetMinPresValue()) - if popErr := writeBuffer.PopContext("minPresValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for minPresValue") - } - if _minPresValueErr != nil { - return errors.Wrap(_minPresValueErr, "Error serializing 'minPresValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (minPresValue) + if pushErr := writeBuffer.PushContext("minPresValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for minPresValue") + } + _minPresValueErr := writeBuffer.WriteSerializable(ctx, m.GetMinPresValue()) + if popErr := writeBuffer.PopContext("minPresValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for minPresValue") + } + if _minPresValueErr != nil { + return errors.Wrap(_minPresValueErr, "Error serializing 'minPresValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLargeAnalogValueMinPresValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLargeAnalogValueMinPresValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLargeAnalogValueMinPresValue) SerializeWithWriteB return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLargeAnalogValueMinPresValue) isBACnetConstructedDataLargeAnalogValueMinPresValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLargeAnalogValueMinPresValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValuePresentValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValuePresentValue.go index 3bfdd8ea075..3364922bf71 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValuePresentValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValuePresentValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLargeAnalogValuePresentValue is the corresponding interface of BACnetConstructedDataLargeAnalogValuePresentValue type BACnetConstructedDataLargeAnalogValuePresentValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLargeAnalogValuePresentValueExactly interface { // _BACnetConstructedDataLargeAnalogValuePresentValue is the data-structure of this message type _BACnetConstructedDataLargeAnalogValuePresentValue struct { *_BACnetConstructedData - PresentValue BACnetApplicationTagDouble + PresentValue BACnetApplicationTagDouble } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLargeAnalogValuePresentValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_LARGE_ANALOG_VALUE -} +func (m *_BACnetConstructedDataLargeAnalogValuePresentValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_LARGE_ANALOG_VALUE} -func (m *_BACnetConstructedDataLargeAnalogValuePresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PRESENT_VALUE -} +func (m *_BACnetConstructedDataLargeAnalogValuePresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PRESENT_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLargeAnalogValuePresentValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLargeAnalogValuePresentValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLargeAnalogValuePresentValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLargeAnalogValuePresentValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLargeAnalogValuePresentValue) GetActualValue() BA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLargeAnalogValuePresentValue factory function for _BACnetConstructedDataLargeAnalogValuePresentValue -func NewBACnetConstructedDataLargeAnalogValuePresentValue(presentValue BACnetApplicationTagDouble, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLargeAnalogValuePresentValue { +func NewBACnetConstructedDataLargeAnalogValuePresentValue( presentValue BACnetApplicationTagDouble , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLargeAnalogValuePresentValue { _result := &_BACnetConstructedDataLargeAnalogValuePresentValue{ - PresentValue: presentValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PresentValue: presentValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLargeAnalogValuePresentValue(presentValue BACnetApp // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLargeAnalogValuePresentValue(structType interface{}) BACnetConstructedDataLargeAnalogValuePresentValue { - if casted, ok := structType.(BACnetConstructedDataLargeAnalogValuePresentValue); ok { + if casted, ok := structType.(BACnetConstructedDataLargeAnalogValuePresentValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLargeAnalogValuePresentValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLargeAnalogValuePresentValue) GetLengthInBits(ctx return lengthInBits } + func (m *_BACnetConstructedDataLargeAnalogValuePresentValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLargeAnalogValuePresentValueParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("presentValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for presentValue") } - _presentValue, _presentValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_presentValue, _presentValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _presentValueErr != nil { return nil, errors.Wrap(_presentValueErr, "Error parsing 'presentValue' field of BACnetConstructedDataLargeAnalogValuePresentValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLargeAnalogValuePresentValueParseWithBuffer(ctx contex // Create a partially initialized instance _child := &_BACnetConstructedDataLargeAnalogValuePresentValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PresentValue: presentValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLargeAnalogValuePresentValue) SerializeWithWriteB return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLargeAnalogValuePresentValue") } - // Simple Field (presentValue) - if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for presentValue") - } - _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) - if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for presentValue") - } - if _presentValueErr != nil { - return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (presentValue) + if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for presentValue") + } + _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) + if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for presentValue") + } + if _presentValueErr != nil { + return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLargeAnalogValuePresentValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLargeAnalogValuePresentValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLargeAnalogValuePresentValue) SerializeWithWriteB return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLargeAnalogValuePresentValue) isBACnetConstructedDataLargeAnalogValuePresentValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLargeAnalogValuePresentValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueRelinquishDefault.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueRelinquishDefault.go index 7203e7f3e8b..6e7f34431da 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueRelinquishDefault.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueRelinquishDefault.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLargeAnalogValueRelinquishDefault is the corresponding interface of BACnetConstructedDataLargeAnalogValueRelinquishDefault type BACnetConstructedDataLargeAnalogValueRelinquishDefault interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLargeAnalogValueRelinquishDefaultExactly interface { // _BACnetConstructedDataLargeAnalogValueRelinquishDefault is the data-structure of this message type _BACnetConstructedDataLargeAnalogValueRelinquishDefault struct { *_BACnetConstructedData - RelinquishDefault BACnetApplicationTagDouble + RelinquishDefault BACnetApplicationTagDouble } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLargeAnalogValueRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_LARGE_ANALOG_VALUE -} +func (m *_BACnetConstructedDataLargeAnalogValueRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_LARGE_ANALOG_VALUE} -func (m *_BACnetConstructedDataLargeAnalogValueRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_RELINQUISH_DEFAULT -} +func (m *_BACnetConstructedDataLargeAnalogValueRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_RELINQUISH_DEFAULT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLargeAnalogValueRelinquishDefault) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLargeAnalogValueRelinquishDefault) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLargeAnalogValueRelinquishDefault) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLargeAnalogValueRelinquishDefault) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLargeAnalogValueRelinquishDefault) GetActualValue /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLargeAnalogValueRelinquishDefault factory function for _BACnetConstructedDataLargeAnalogValueRelinquishDefault -func NewBACnetConstructedDataLargeAnalogValueRelinquishDefault(relinquishDefault BACnetApplicationTagDouble, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLargeAnalogValueRelinquishDefault { +func NewBACnetConstructedDataLargeAnalogValueRelinquishDefault( relinquishDefault BACnetApplicationTagDouble , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLargeAnalogValueRelinquishDefault { _result := &_BACnetConstructedDataLargeAnalogValueRelinquishDefault{ - RelinquishDefault: relinquishDefault, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + RelinquishDefault: relinquishDefault, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLargeAnalogValueRelinquishDefault(relinquishDefault // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLargeAnalogValueRelinquishDefault(structType interface{}) BACnetConstructedDataLargeAnalogValueRelinquishDefault { - if casted, ok := structType.(BACnetConstructedDataLargeAnalogValueRelinquishDefault); ok { + if casted, ok := structType.(BACnetConstructedDataLargeAnalogValueRelinquishDefault); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLargeAnalogValueRelinquishDefault); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLargeAnalogValueRelinquishDefault) GetLengthInBit return lengthInBits } + func (m *_BACnetConstructedDataLargeAnalogValueRelinquishDefault) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLargeAnalogValueRelinquishDefaultParseWithBuffer(ctx c if pullErr := readBuffer.PullContext("relinquishDefault"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for relinquishDefault") } - _relinquishDefault, _relinquishDefaultErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_relinquishDefault, _relinquishDefaultErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _relinquishDefaultErr != nil { return nil, errors.Wrap(_relinquishDefaultErr, "Error parsing 'relinquishDefault' field of BACnetConstructedDataLargeAnalogValueRelinquishDefault") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLargeAnalogValueRelinquishDefaultParseWithBuffer(ctx c // Create a partially initialized instance _child := &_BACnetConstructedDataLargeAnalogValueRelinquishDefault{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, RelinquishDefault: relinquishDefault, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLargeAnalogValueRelinquishDefault) SerializeWithW return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLargeAnalogValueRelinquishDefault") } - // Simple Field (relinquishDefault) - if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for relinquishDefault") - } - _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) - if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { - return errors.Wrap(popErr, "Error popping for relinquishDefault") - } - if _relinquishDefaultErr != nil { - return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (relinquishDefault) + if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for relinquishDefault") + } + _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) + if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { + return errors.Wrap(popErr, "Error popping for relinquishDefault") + } + if _relinquishDefaultErr != nil { + return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLargeAnalogValueRelinquishDefault"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLargeAnalogValueRelinquishDefault") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLargeAnalogValueRelinquishDefault) SerializeWithW return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLargeAnalogValueRelinquishDefault) isBACnetConstructedDataLargeAnalogValueRelinquishDefault() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLargeAnalogValueRelinquishDefault) String() strin } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueResolution.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueResolution.go index 9b2d2133f0a..9be36a0635d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueResolution.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLargeAnalogValueResolution.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLargeAnalogValueResolution is the corresponding interface of BACnetConstructedDataLargeAnalogValueResolution type BACnetConstructedDataLargeAnalogValueResolution interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLargeAnalogValueResolutionExactly interface { // _BACnetConstructedDataLargeAnalogValueResolution is the data-structure of this message type _BACnetConstructedDataLargeAnalogValueResolution struct { *_BACnetConstructedData - Resolution BACnetApplicationTagDouble + Resolution BACnetApplicationTagDouble } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLargeAnalogValueResolution) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_LARGE_ANALOG_VALUE -} +func (m *_BACnetConstructedDataLargeAnalogValueResolution) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_LARGE_ANALOG_VALUE} -func (m *_BACnetConstructedDataLargeAnalogValueResolution) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_RESOLUTION -} +func (m *_BACnetConstructedDataLargeAnalogValueResolution) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_RESOLUTION} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLargeAnalogValueResolution) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLargeAnalogValueResolution) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLargeAnalogValueResolution) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLargeAnalogValueResolution) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLargeAnalogValueResolution) GetActualValue() BACn /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLargeAnalogValueResolution factory function for _BACnetConstructedDataLargeAnalogValueResolution -func NewBACnetConstructedDataLargeAnalogValueResolution(resolution BACnetApplicationTagDouble, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLargeAnalogValueResolution { +func NewBACnetConstructedDataLargeAnalogValueResolution( resolution BACnetApplicationTagDouble , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLargeAnalogValueResolution { _result := &_BACnetConstructedDataLargeAnalogValueResolution{ - Resolution: resolution, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Resolution: resolution, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLargeAnalogValueResolution(resolution BACnetApplica // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLargeAnalogValueResolution(structType interface{}) BACnetConstructedDataLargeAnalogValueResolution { - if casted, ok := structType.(BACnetConstructedDataLargeAnalogValueResolution); ok { + if casted, ok := structType.(BACnetConstructedDataLargeAnalogValueResolution); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLargeAnalogValueResolution); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLargeAnalogValueResolution) GetLengthInBits(ctx c return lengthInBits } + func (m *_BACnetConstructedDataLargeAnalogValueResolution) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLargeAnalogValueResolutionParseWithBuffer(ctx context. if pullErr := readBuffer.PullContext("resolution"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for resolution") } - _resolution, _resolutionErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_resolution, _resolutionErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _resolutionErr != nil { return nil, errors.Wrap(_resolutionErr, "Error parsing 'resolution' field of BACnetConstructedDataLargeAnalogValueResolution") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLargeAnalogValueResolutionParseWithBuffer(ctx context. // Create a partially initialized instance _child := &_BACnetConstructedDataLargeAnalogValueResolution{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Resolution: resolution, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLargeAnalogValueResolution) SerializeWithWriteBuf return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLargeAnalogValueResolution") } - // Simple Field (resolution) - if pushErr := writeBuffer.PushContext("resolution"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for resolution") - } - _resolutionErr := writeBuffer.WriteSerializable(ctx, m.GetResolution()) - if popErr := writeBuffer.PopContext("resolution"); popErr != nil { - return errors.Wrap(popErr, "Error popping for resolution") - } - if _resolutionErr != nil { - return errors.Wrap(_resolutionErr, "Error serializing 'resolution' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (resolution) + if pushErr := writeBuffer.PushContext("resolution"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for resolution") + } + _resolutionErr := writeBuffer.WriteSerializable(ctx, m.GetResolution()) + if popErr := writeBuffer.PopContext("resolution"); popErr != nil { + return errors.Wrap(popErr, "Error popping for resolution") + } + if _resolutionErr != nil { + return errors.Wrap(_resolutionErr, "Error serializing 'resolution' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLargeAnalogValueResolution"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLargeAnalogValueResolution") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLargeAnalogValueResolution) SerializeWithWriteBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLargeAnalogValueResolution) isBACnetConstructedDataLargeAnalogValueResolution() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLargeAnalogValueResolution) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastAccessEvent.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastAccessEvent.go index 88b399d276c..4ef7346e4d4 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastAccessEvent.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastAccessEvent.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLastAccessEvent is the corresponding interface of BACnetConstructedDataLastAccessEvent type BACnetConstructedDataLastAccessEvent interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLastAccessEventExactly interface { // _BACnetConstructedDataLastAccessEvent is the data-structure of this message type _BACnetConstructedDataLastAccessEvent struct { *_BACnetConstructedData - LastAccessEvent BACnetAccessEventTagged + LastAccessEvent BACnetAccessEventTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLastAccessEvent) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLastAccessEvent) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLastAccessEvent) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LAST_ACCESS_EVENT -} +func (m *_BACnetConstructedDataLastAccessEvent) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LAST_ACCESS_EVENT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLastAccessEvent) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLastAccessEvent) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLastAccessEvent) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLastAccessEvent) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLastAccessEvent) GetActualValue() BACnetAccessEve /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLastAccessEvent factory function for _BACnetConstructedDataLastAccessEvent -func NewBACnetConstructedDataLastAccessEvent(lastAccessEvent BACnetAccessEventTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLastAccessEvent { +func NewBACnetConstructedDataLastAccessEvent( lastAccessEvent BACnetAccessEventTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLastAccessEvent { _result := &_BACnetConstructedDataLastAccessEvent{ - LastAccessEvent: lastAccessEvent, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + LastAccessEvent: lastAccessEvent, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLastAccessEvent(lastAccessEvent BACnetAccessEventTa // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLastAccessEvent(structType interface{}) BACnetConstructedDataLastAccessEvent { - if casted, ok := structType.(BACnetConstructedDataLastAccessEvent); ok { + if casted, ok := structType.(BACnetConstructedDataLastAccessEvent); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLastAccessEvent); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLastAccessEvent) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetConstructedDataLastAccessEvent) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLastAccessEventParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("lastAccessEvent"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lastAccessEvent") } - _lastAccessEvent, _lastAccessEventErr := BACnetAccessEventTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_lastAccessEvent, _lastAccessEventErr := BACnetAccessEventTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _lastAccessEventErr != nil { return nil, errors.Wrap(_lastAccessEventErr, "Error parsing 'lastAccessEvent' field of BACnetConstructedDataLastAccessEvent") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLastAccessEventParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetConstructedDataLastAccessEvent{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LastAccessEvent: lastAccessEvent, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLastAccessEvent) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLastAccessEvent") } - // Simple Field (lastAccessEvent) - if pushErr := writeBuffer.PushContext("lastAccessEvent"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lastAccessEvent") - } - _lastAccessEventErr := writeBuffer.WriteSerializable(ctx, m.GetLastAccessEvent()) - if popErr := writeBuffer.PopContext("lastAccessEvent"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lastAccessEvent") - } - if _lastAccessEventErr != nil { - return errors.Wrap(_lastAccessEventErr, "Error serializing 'lastAccessEvent' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (lastAccessEvent) + if pushErr := writeBuffer.PushContext("lastAccessEvent"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lastAccessEvent") + } + _lastAccessEventErr := writeBuffer.WriteSerializable(ctx, m.GetLastAccessEvent()) + if popErr := writeBuffer.PopContext("lastAccessEvent"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lastAccessEvent") + } + if _lastAccessEventErr != nil { + return errors.Wrap(_lastAccessEventErr, "Error serializing 'lastAccessEvent' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLastAccessEvent"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLastAccessEvent") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLastAccessEvent) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLastAccessEvent) isBACnetConstructedDataLastAccessEvent() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLastAccessEvent) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastAccessPoint.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastAccessPoint.go index cba1df4ed70..fb07fbbace8 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastAccessPoint.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastAccessPoint.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLastAccessPoint is the corresponding interface of BACnetConstructedDataLastAccessPoint type BACnetConstructedDataLastAccessPoint interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLastAccessPointExactly interface { // _BACnetConstructedDataLastAccessPoint is the data-structure of this message type _BACnetConstructedDataLastAccessPoint struct { *_BACnetConstructedData - LastAccessPoint BACnetDeviceObjectReference + LastAccessPoint BACnetDeviceObjectReference } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLastAccessPoint) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLastAccessPoint) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLastAccessPoint) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LAST_ACCESS_POINT -} +func (m *_BACnetConstructedDataLastAccessPoint) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LAST_ACCESS_POINT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLastAccessPoint) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLastAccessPoint) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLastAccessPoint) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLastAccessPoint) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLastAccessPoint) GetActualValue() BACnetDeviceObj /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLastAccessPoint factory function for _BACnetConstructedDataLastAccessPoint -func NewBACnetConstructedDataLastAccessPoint(lastAccessPoint BACnetDeviceObjectReference, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLastAccessPoint { +func NewBACnetConstructedDataLastAccessPoint( lastAccessPoint BACnetDeviceObjectReference , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLastAccessPoint { _result := &_BACnetConstructedDataLastAccessPoint{ - LastAccessPoint: lastAccessPoint, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + LastAccessPoint: lastAccessPoint, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLastAccessPoint(lastAccessPoint BACnetDeviceObjectR // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLastAccessPoint(structType interface{}) BACnetConstructedDataLastAccessPoint { - if casted, ok := structType.(BACnetConstructedDataLastAccessPoint); ok { + if casted, ok := structType.(BACnetConstructedDataLastAccessPoint); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLastAccessPoint); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLastAccessPoint) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetConstructedDataLastAccessPoint) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLastAccessPointParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("lastAccessPoint"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lastAccessPoint") } - _lastAccessPoint, _lastAccessPointErr := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) +_lastAccessPoint, _lastAccessPointErr := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) if _lastAccessPointErr != nil { return nil, errors.Wrap(_lastAccessPointErr, "Error parsing 'lastAccessPoint' field of BACnetConstructedDataLastAccessPoint") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLastAccessPointParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetConstructedDataLastAccessPoint{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LastAccessPoint: lastAccessPoint, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLastAccessPoint) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLastAccessPoint") } - // Simple Field (lastAccessPoint) - if pushErr := writeBuffer.PushContext("lastAccessPoint"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lastAccessPoint") - } - _lastAccessPointErr := writeBuffer.WriteSerializable(ctx, m.GetLastAccessPoint()) - if popErr := writeBuffer.PopContext("lastAccessPoint"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lastAccessPoint") - } - if _lastAccessPointErr != nil { - return errors.Wrap(_lastAccessPointErr, "Error serializing 'lastAccessPoint' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (lastAccessPoint) + if pushErr := writeBuffer.PushContext("lastAccessPoint"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lastAccessPoint") + } + _lastAccessPointErr := writeBuffer.WriteSerializable(ctx, m.GetLastAccessPoint()) + if popErr := writeBuffer.PopContext("lastAccessPoint"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lastAccessPoint") + } + if _lastAccessPointErr != nil { + return errors.Wrap(_lastAccessPointErr, "Error serializing 'lastAccessPoint' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLastAccessPoint"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLastAccessPoint") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLastAccessPoint) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLastAccessPoint) isBACnetConstructedDataLastAccessPoint() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLastAccessPoint) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastCommandTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastCommandTime.go index 50347b2dcca..8033429a611 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastCommandTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastCommandTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLastCommandTime is the corresponding interface of BACnetConstructedDataLastCommandTime type BACnetConstructedDataLastCommandTime interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLastCommandTimeExactly interface { // _BACnetConstructedDataLastCommandTime is the data-structure of this message type _BACnetConstructedDataLastCommandTime struct { *_BACnetConstructedData - LastCommandTime BACnetTimeStamp + LastCommandTime BACnetTimeStamp } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLastCommandTime) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLastCommandTime) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLastCommandTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LAST_COMMAND_TIME -} +func (m *_BACnetConstructedDataLastCommandTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LAST_COMMAND_TIME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLastCommandTime) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLastCommandTime) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLastCommandTime) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLastCommandTime) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLastCommandTime) GetActualValue() BACnetTimeStamp /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLastCommandTime factory function for _BACnetConstructedDataLastCommandTime -func NewBACnetConstructedDataLastCommandTime(lastCommandTime BACnetTimeStamp, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLastCommandTime { +func NewBACnetConstructedDataLastCommandTime( lastCommandTime BACnetTimeStamp , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLastCommandTime { _result := &_BACnetConstructedDataLastCommandTime{ - LastCommandTime: lastCommandTime, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + LastCommandTime: lastCommandTime, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLastCommandTime(lastCommandTime BACnetTimeStamp, op // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLastCommandTime(structType interface{}) BACnetConstructedDataLastCommandTime { - if casted, ok := structType.(BACnetConstructedDataLastCommandTime); ok { + if casted, ok := structType.(BACnetConstructedDataLastCommandTime); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLastCommandTime); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLastCommandTime) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetConstructedDataLastCommandTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLastCommandTimeParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("lastCommandTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lastCommandTime") } - _lastCommandTime, _lastCommandTimeErr := BACnetTimeStampParseWithBuffer(ctx, readBuffer) +_lastCommandTime, _lastCommandTimeErr := BACnetTimeStampParseWithBuffer(ctx, readBuffer) if _lastCommandTimeErr != nil { return nil, errors.Wrap(_lastCommandTimeErr, "Error parsing 'lastCommandTime' field of BACnetConstructedDataLastCommandTime") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLastCommandTimeParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetConstructedDataLastCommandTime{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LastCommandTime: lastCommandTime, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLastCommandTime) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLastCommandTime") } - // Simple Field (lastCommandTime) - if pushErr := writeBuffer.PushContext("lastCommandTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lastCommandTime") - } - _lastCommandTimeErr := writeBuffer.WriteSerializable(ctx, m.GetLastCommandTime()) - if popErr := writeBuffer.PopContext("lastCommandTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lastCommandTime") - } - if _lastCommandTimeErr != nil { - return errors.Wrap(_lastCommandTimeErr, "Error serializing 'lastCommandTime' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (lastCommandTime) + if pushErr := writeBuffer.PushContext("lastCommandTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lastCommandTime") + } + _lastCommandTimeErr := writeBuffer.WriteSerializable(ctx, m.GetLastCommandTime()) + if popErr := writeBuffer.PopContext("lastCommandTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lastCommandTime") + } + if _lastCommandTimeErr != nil { + return errors.Wrap(_lastCommandTimeErr, "Error serializing 'lastCommandTime' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLastCommandTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLastCommandTime") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLastCommandTime) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLastCommandTime) isBACnetConstructedDataLastCommandTime() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLastCommandTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastCredentialAdded.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastCredentialAdded.go index 33c73634e1f..daef48fbed5 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastCredentialAdded.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastCredentialAdded.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLastCredentialAdded is the corresponding interface of BACnetConstructedDataLastCredentialAdded type BACnetConstructedDataLastCredentialAdded interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLastCredentialAddedExactly interface { // _BACnetConstructedDataLastCredentialAdded is the data-structure of this message type _BACnetConstructedDataLastCredentialAdded struct { *_BACnetConstructedData - LastCredentialAdded BACnetDeviceObjectReference + LastCredentialAdded BACnetDeviceObjectReference } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLastCredentialAdded) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLastCredentialAdded) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLastCredentialAdded) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LAST_CREDENTIAL_ADDED -} +func (m *_BACnetConstructedDataLastCredentialAdded) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LAST_CREDENTIAL_ADDED} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLastCredentialAdded) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLastCredentialAdded) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLastCredentialAdded) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLastCredentialAdded) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLastCredentialAdded) GetActualValue() BACnetDevic /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLastCredentialAdded factory function for _BACnetConstructedDataLastCredentialAdded -func NewBACnetConstructedDataLastCredentialAdded(lastCredentialAdded BACnetDeviceObjectReference, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLastCredentialAdded { +func NewBACnetConstructedDataLastCredentialAdded( lastCredentialAdded BACnetDeviceObjectReference , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLastCredentialAdded { _result := &_BACnetConstructedDataLastCredentialAdded{ - LastCredentialAdded: lastCredentialAdded, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + LastCredentialAdded: lastCredentialAdded, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLastCredentialAdded(lastCredentialAdded BACnetDevic // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLastCredentialAdded(structType interface{}) BACnetConstructedDataLastCredentialAdded { - if casted, ok := structType.(BACnetConstructedDataLastCredentialAdded); ok { + if casted, ok := structType.(BACnetConstructedDataLastCredentialAdded); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLastCredentialAdded); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLastCredentialAdded) GetLengthInBits(ctx context. return lengthInBits } + func (m *_BACnetConstructedDataLastCredentialAdded) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLastCredentialAddedParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("lastCredentialAdded"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lastCredentialAdded") } - _lastCredentialAdded, _lastCredentialAddedErr := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) +_lastCredentialAdded, _lastCredentialAddedErr := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) if _lastCredentialAddedErr != nil { return nil, errors.Wrap(_lastCredentialAddedErr, "Error parsing 'lastCredentialAdded' field of BACnetConstructedDataLastCredentialAdded") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLastCredentialAddedParseWithBuffer(ctx context.Context // Create a partially initialized instance _child := &_BACnetConstructedDataLastCredentialAdded{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LastCredentialAdded: lastCredentialAdded, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLastCredentialAdded) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLastCredentialAdded") } - // Simple Field (lastCredentialAdded) - if pushErr := writeBuffer.PushContext("lastCredentialAdded"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lastCredentialAdded") - } - _lastCredentialAddedErr := writeBuffer.WriteSerializable(ctx, m.GetLastCredentialAdded()) - if popErr := writeBuffer.PopContext("lastCredentialAdded"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lastCredentialAdded") - } - if _lastCredentialAddedErr != nil { - return errors.Wrap(_lastCredentialAddedErr, "Error serializing 'lastCredentialAdded' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (lastCredentialAdded) + if pushErr := writeBuffer.PushContext("lastCredentialAdded"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lastCredentialAdded") + } + _lastCredentialAddedErr := writeBuffer.WriteSerializable(ctx, m.GetLastCredentialAdded()) + if popErr := writeBuffer.PopContext("lastCredentialAdded"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lastCredentialAdded") + } + if _lastCredentialAddedErr != nil { + return errors.Wrap(_lastCredentialAddedErr, "Error serializing 'lastCredentialAdded' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLastCredentialAdded"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLastCredentialAdded") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLastCredentialAdded) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLastCredentialAdded) isBACnetConstructedDataLastCredentialAdded() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLastCredentialAdded) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastCredentialAddedTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastCredentialAddedTime.go index f83d80f6347..53825968a67 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastCredentialAddedTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastCredentialAddedTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLastCredentialAddedTime is the corresponding interface of BACnetConstructedDataLastCredentialAddedTime type BACnetConstructedDataLastCredentialAddedTime interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLastCredentialAddedTimeExactly interface { // _BACnetConstructedDataLastCredentialAddedTime is the data-structure of this message type _BACnetConstructedDataLastCredentialAddedTime struct { *_BACnetConstructedData - LastCredentialAddedTime BACnetDateTime + LastCredentialAddedTime BACnetDateTime } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLastCredentialAddedTime) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLastCredentialAddedTime) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLastCredentialAddedTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LAST_CREDENTIAL_ADDED_TIME -} +func (m *_BACnetConstructedDataLastCredentialAddedTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LAST_CREDENTIAL_ADDED_TIME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLastCredentialAddedTime) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLastCredentialAddedTime) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLastCredentialAddedTime) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLastCredentialAddedTime) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLastCredentialAddedTime) GetActualValue() BACnetD /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLastCredentialAddedTime factory function for _BACnetConstructedDataLastCredentialAddedTime -func NewBACnetConstructedDataLastCredentialAddedTime(lastCredentialAddedTime BACnetDateTime, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLastCredentialAddedTime { +func NewBACnetConstructedDataLastCredentialAddedTime( lastCredentialAddedTime BACnetDateTime , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLastCredentialAddedTime { _result := &_BACnetConstructedDataLastCredentialAddedTime{ LastCredentialAddedTime: lastCredentialAddedTime, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLastCredentialAddedTime(lastCredentialAddedTime BAC // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLastCredentialAddedTime(structType interface{}) BACnetConstructedDataLastCredentialAddedTime { - if casted, ok := structType.(BACnetConstructedDataLastCredentialAddedTime); ok { + if casted, ok := structType.(BACnetConstructedDataLastCredentialAddedTime); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLastCredentialAddedTime); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLastCredentialAddedTime) GetLengthInBits(ctx cont return lengthInBits } + func (m *_BACnetConstructedDataLastCredentialAddedTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLastCredentialAddedTimeParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("lastCredentialAddedTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lastCredentialAddedTime") } - _lastCredentialAddedTime, _lastCredentialAddedTimeErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) +_lastCredentialAddedTime, _lastCredentialAddedTimeErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) if _lastCredentialAddedTimeErr != nil { return nil, errors.Wrap(_lastCredentialAddedTimeErr, "Error parsing 'lastCredentialAddedTime' field of BACnetConstructedDataLastCredentialAddedTime") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLastCredentialAddedTimeParseWithBuffer(ctx context.Con // Create a partially initialized instance _child := &_BACnetConstructedDataLastCredentialAddedTime{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LastCredentialAddedTime: lastCredentialAddedTime, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLastCredentialAddedTime) SerializeWithWriteBuffer return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLastCredentialAddedTime") } - // Simple Field (lastCredentialAddedTime) - if pushErr := writeBuffer.PushContext("lastCredentialAddedTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lastCredentialAddedTime") - } - _lastCredentialAddedTimeErr := writeBuffer.WriteSerializable(ctx, m.GetLastCredentialAddedTime()) - if popErr := writeBuffer.PopContext("lastCredentialAddedTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lastCredentialAddedTime") - } - if _lastCredentialAddedTimeErr != nil { - return errors.Wrap(_lastCredentialAddedTimeErr, "Error serializing 'lastCredentialAddedTime' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (lastCredentialAddedTime) + if pushErr := writeBuffer.PushContext("lastCredentialAddedTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lastCredentialAddedTime") + } + _lastCredentialAddedTimeErr := writeBuffer.WriteSerializable(ctx, m.GetLastCredentialAddedTime()) + if popErr := writeBuffer.PopContext("lastCredentialAddedTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lastCredentialAddedTime") + } + if _lastCredentialAddedTimeErr != nil { + return errors.Wrap(_lastCredentialAddedTimeErr, "Error serializing 'lastCredentialAddedTime' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLastCredentialAddedTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLastCredentialAddedTime") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLastCredentialAddedTime) SerializeWithWriteBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLastCredentialAddedTime) isBACnetConstructedDataLastCredentialAddedTime() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLastCredentialAddedTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastCredentialRemoved.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastCredentialRemoved.go index 195c7214c89..dc57d701f26 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastCredentialRemoved.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastCredentialRemoved.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLastCredentialRemoved is the corresponding interface of BACnetConstructedDataLastCredentialRemoved type BACnetConstructedDataLastCredentialRemoved interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLastCredentialRemovedExactly interface { // _BACnetConstructedDataLastCredentialRemoved is the data-structure of this message type _BACnetConstructedDataLastCredentialRemoved struct { *_BACnetConstructedData - LastCredentialRemoved BACnetDeviceObjectReference + LastCredentialRemoved BACnetDeviceObjectReference } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLastCredentialRemoved) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLastCredentialRemoved) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLastCredentialRemoved) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LAST_CREDENTIAL_REMOVED -} +func (m *_BACnetConstructedDataLastCredentialRemoved) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LAST_CREDENTIAL_REMOVED} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLastCredentialRemoved) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLastCredentialRemoved) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLastCredentialRemoved) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLastCredentialRemoved) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLastCredentialRemoved) GetActualValue() BACnetDev /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLastCredentialRemoved factory function for _BACnetConstructedDataLastCredentialRemoved -func NewBACnetConstructedDataLastCredentialRemoved(lastCredentialRemoved BACnetDeviceObjectReference, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLastCredentialRemoved { +func NewBACnetConstructedDataLastCredentialRemoved( lastCredentialRemoved BACnetDeviceObjectReference , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLastCredentialRemoved { _result := &_BACnetConstructedDataLastCredentialRemoved{ - LastCredentialRemoved: lastCredentialRemoved, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + LastCredentialRemoved: lastCredentialRemoved, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLastCredentialRemoved(lastCredentialRemoved BACnetD // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLastCredentialRemoved(structType interface{}) BACnetConstructedDataLastCredentialRemoved { - if casted, ok := structType.(BACnetConstructedDataLastCredentialRemoved); ok { + if casted, ok := structType.(BACnetConstructedDataLastCredentialRemoved); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLastCredentialRemoved); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLastCredentialRemoved) GetLengthInBits(ctx contex return lengthInBits } + func (m *_BACnetConstructedDataLastCredentialRemoved) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLastCredentialRemovedParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("lastCredentialRemoved"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lastCredentialRemoved") } - _lastCredentialRemoved, _lastCredentialRemovedErr := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) +_lastCredentialRemoved, _lastCredentialRemovedErr := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) if _lastCredentialRemovedErr != nil { return nil, errors.Wrap(_lastCredentialRemovedErr, "Error parsing 'lastCredentialRemoved' field of BACnetConstructedDataLastCredentialRemoved") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLastCredentialRemovedParseWithBuffer(ctx context.Conte // Create a partially initialized instance _child := &_BACnetConstructedDataLastCredentialRemoved{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LastCredentialRemoved: lastCredentialRemoved, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLastCredentialRemoved) SerializeWithWriteBuffer(c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLastCredentialRemoved") } - // Simple Field (lastCredentialRemoved) - if pushErr := writeBuffer.PushContext("lastCredentialRemoved"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lastCredentialRemoved") - } - _lastCredentialRemovedErr := writeBuffer.WriteSerializable(ctx, m.GetLastCredentialRemoved()) - if popErr := writeBuffer.PopContext("lastCredentialRemoved"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lastCredentialRemoved") - } - if _lastCredentialRemovedErr != nil { - return errors.Wrap(_lastCredentialRemovedErr, "Error serializing 'lastCredentialRemoved' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (lastCredentialRemoved) + if pushErr := writeBuffer.PushContext("lastCredentialRemoved"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lastCredentialRemoved") + } + _lastCredentialRemovedErr := writeBuffer.WriteSerializable(ctx, m.GetLastCredentialRemoved()) + if popErr := writeBuffer.PopContext("lastCredentialRemoved"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lastCredentialRemoved") + } + if _lastCredentialRemovedErr != nil { + return errors.Wrap(_lastCredentialRemovedErr, "Error serializing 'lastCredentialRemoved' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLastCredentialRemoved"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLastCredentialRemoved") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLastCredentialRemoved) SerializeWithWriteBuffer(c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLastCredentialRemoved) isBACnetConstructedDataLastCredentialRemoved() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLastCredentialRemoved) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastCredentialRemovedTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastCredentialRemovedTime.go index 658655c42e0..e3981b3f90b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastCredentialRemovedTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastCredentialRemovedTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLastCredentialRemovedTime is the corresponding interface of BACnetConstructedDataLastCredentialRemovedTime type BACnetConstructedDataLastCredentialRemovedTime interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLastCredentialRemovedTimeExactly interface { // _BACnetConstructedDataLastCredentialRemovedTime is the data-structure of this message type _BACnetConstructedDataLastCredentialRemovedTime struct { *_BACnetConstructedData - LastCredentialRemovedTime BACnetDateTime + LastCredentialRemovedTime BACnetDateTime } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLastCredentialRemovedTime) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLastCredentialRemovedTime) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLastCredentialRemovedTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LAST_CREDENTIAL_REMOVED_TIME -} +func (m *_BACnetConstructedDataLastCredentialRemovedTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LAST_CREDENTIAL_REMOVED_TIME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLastCredentialRemovedTime) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLastCredentialRemovedTime) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLastCredentialRemovedTime) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLastCredentialRemovedTime) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLastCredentialRemovedTime) GetActualValue() BACne /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLastCredentialRemovedTime factory function for _BACnetConstructedDataLastCredentialRemovedTime -func NewBACnetConstructedDataLastCredentialRemovedTime(lastCredentialRemovedTime BACnetDateTime, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLastCredentialRemovedTime { +func NewBACnetConstructedDataLastCredentialRemovedTime( lastCredentialRemovedTime BACnetDateTime , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLastCredentialRemovedTime { _result := &_BACnetConstructedDataLastCredentialRemovedTime{ LastCredentialRemovedTime: lastCredentialRemovedTime, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLastCredentialRemovedTime(lastCredentialRemovedTime // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLastCredentialRemovedTime(structType interface{}) BACnetConstructedDataLastCredentialRemovedTime { - if casted, ok := structType.(BACnetConstructedDataLastCredentialRemovedTime); ok { + if casted, ok := structType.(BACnetConstructedDataLastCredentialRemovedTime); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLastCredentialRemovedTime); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLastCredentialRemovedTime) GetLengthInBits(ctx co return lengthInBits } + func (m *_BACnetConstructedDataLastCredentialRemovedTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLastCredentialRemovedTimeParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("lastCredentialRemovedTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lastCredentialRemovedTime") } - _lastCredentialRemovedTime, _lastCredentialRemovedTimeErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) +_lastCredentialRemovedTime, _lastCredentialRemovedTimeErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) if _lastCredentialRemovedTimeErr != nil { return nil, errors.Wrap(_lastCredentialRemovedTimeErr, "Error parsing 'lastCredentialRemovedTime' field of BACnetConstructedDataLastCredentialRemovedTime") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLastCredentialRemovedTimeParseWithBuffer(ctx context.C // Create a partially initialized instance _child := &_BACnetConstructedDataLastCredentialRemovedTime{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LastCredentialRemovedTime: lastCredentialRemovedTime, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLastCredentialRemovedTime) SerializeWithWriteBuff return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLastCredentialRemovedTime") } - // Simple Field (lastCredentialRemovedTime) - if pushErr := writeBuffer.PushContext("lastCredentialRemovedTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lastCredentialRemovedTime") - } - _lastCredentialRemovedTimeErr := writeBuffer.WriteSerializable(ctx, m.GetLastCredentialRemovedTime()) - if popErr := writeBuffer.PopContext("lastCredentialRemovedTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lastCredentialRemovedTime") - } - if _lastCredentialRemovedTimeErr != nil { - return errors.Wrap(_lastCredentialRemovedTimeErr, "Error serializing 'lastCredentialRemovedTime' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (lastCredentialRemovedTime) + if pushErr := writeBuffer.PushContext("lastCredentialRemovedTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lastCredentialRemovedTime") + } + _lastCredentialRemovedTimeErr := writeBuffer.WriteSerializable(ctx, m.GetLastCredentialRemovedTime()) + if popErr := writeBuffer.PopContext("lastCredentialRemovedTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lastCredentialRemovedTime") + } + if _lastCredentialRemovedTimeErr != nil { + return errors.Wrap(_lastCredentialRemovedTimeErr, "Error serializing 'lastCredentialRemovedTime' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLastCredentialRemovedTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLastCredentialRemovedTime") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLastCredentialRemovedTime) SerializeWithWriteBuff return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLastCredentialRemovedTime) isBACnetConstructedDataLastCredentialRemovedTime() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLastCredentialRemovedTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastKeyServer.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastKeyServer.go index a8e54c93cfd..551b43fc8bb 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastKeyServer.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastKeyServer.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLastKeyServer is the corresponding interface of BACnetConstructedDataLastKeyServer type BACnetConstructedDataLastKeyServer interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLastKeyServerExactly interface { // _BACnetConstructedDataLastKeyServer is the data-structure of this message type _BACnetConstructedDataLastKeyServer struct { *_BACnetConstructedData - LastKeyServer BACnetAddressBinding + LastKeyServer BACnetAddressBinding } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLastKeyServer) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLastKeyServer) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLastKeyServer) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LAST_KEY_SERVER -} +func (m *_BACnetConstructedDataLastKeyServer) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LAST_KEY_SERVER} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLastKeyServer) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLastKeyServer) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLastKeyServer) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLastKeyServer) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLastKeyServer) GetActualValue() BACnetAddressBind /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLastKeyServer factory function for _BACnetConstructedDataLastKeyServer -func NewBACnetConstructedDataLastKeyServer(lastKeyServer BACnetAddressBinding, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLastKeyServer { +func NewBACnetConstructedDataLastKeyServer( lastKeyServer BACnetAddressBinding , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLastKeyServer { _result := &_BACnetConstructedDataLastKeyServer{ - LastKeyServer: lastKeyServer, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + LastKeyServer: lastKeyServer, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLastKeyServer(lastKeyServer BACnetAddressBinding, o // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLastKeyServer(structType interface{}) BACnetConstructedDataLastKeyServer { - if casted, ok := structType.(BACnetConstructedDataLastKeyServer); ok { + if casted, ok := structType.(BACnetConstructedDataLastKeyServer); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLastKeyServer); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLastKeyServer) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetConstructedDataLastKeyServer) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLastKeyServerParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("lastKeyServer"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lastKeyServer") } - _lastKeyServer, _lastKeyServerErr := BACnetAddressBindingParseWithBuffer(ctx, readBuffer) +_lastKeyServer, _lastKeyServerErr := BACnetAddressBindingParseWithBuffer(ctx, readBuffer) if _lastKeyServerErr != nil { return nil, errors.Wrap(_lastKeyServerErr, "Error parsing 'lastKeyServer' field of BACnetConstructedDataLastKeyServer") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLastKeyServerParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetConstructedDataLastKeyServer{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LastKeyServer: lastKeyServer, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLastKeyServer) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLastKeyServer") } - // Simple Field (lastKeyServer) - if pushErr := writeBuffer.PushContext("lastKeyServer"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lastKeyServer") - } - _lastKeyServerErr := writeBuffer.WriteSerializable(ctx, m.GetLastKeyServer()) - if popErr := writeBuffer.PopContext("lastKeyServer"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lastKeyServer") - } - if _lastKeyServerErr != nil { - return errors.Wrap(_lastKeyServerErr, "Error serializing 'lastKeyServer' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (lastKeyServer) + if pushErr := writeBuffer.PushContext("lastKeyServer"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lastKeyServer") + } + _lastKeyServerErr := writeBuffer.WriteSerializable(ctx, m.GetLastKeyServer()) + if popErr := writeBuffer.PopContext("lastKeyServer"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lastKeyServer") + } + if _lastKeyServerErr != nil { + return errors.Wrap(_lastKeyServerErr, "Error serializing 'lastKeyServer' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLastKeyServer"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLastKeyServer") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLastKeyServer) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLastKeyServer) isBACnetConstructedDataLastKeyServer() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLastKeyServer) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastNotifyRecord.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastNotifyRecord.go index 593af5ec1cf..1013a3fda20 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastNotifyRecord.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastNotifyRecord.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLastNotifyRecord is the corresponding interface of BACnetConstructedDataLastNotifyRecord type BACnetConstructedDataLastNotifyRecord interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLastNotifyRecordExactly interface { // _BACnetConstructedDataLastNotifyRecord is the data-structure of this message type _BACnetConstructedDataLastNotifyRecord struct { *_BACnetConstructedData - LastNotifyRecord BACnetApplicationTagUnsignedInteger + LastNotifyRecord BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLastNotifyRecord) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLastNotifyRecord) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLastNotifyRecord) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LAST_NOTIFY_RECORD -} +func (m *_BACnetConstructedDataLastNotifyRecord) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LAST_NOTIFY_RECORD} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLastNotifyRecord) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLastNotifyRecord) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLastNotifyRecord) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLastNotifyRecord) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLastNotifyRecord) GetActualValue() BACnetApplicat /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLastNotifyRecord factory function for _BACnetConstructedDataLastNotifyRecord -func NewBACnetConstructedDataLastNotifyRecord(lastNotifyRecord BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLastNotifyRecord { +func NewBACnetConstructedDataLastNotifyRecord( lastNotifyRecord BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLastNotifyRecord { _result := &_BACnetConstructedDataLastNotifyRecord{ - LastNotifyRecord: lastNotifyRecord, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + LastNotifyRecord: lastNotifyRecord, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLastNotifyRecord(lastNotifyRecord BACnetApplication // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLastNotifyRecord(structType interface{}) BACnetConstructedDataLastNotifyRecord { - if casted, ok := structType.(BACnetConstructedDataLastNotifyRecord); ok { + if casted, ok := structType.(BACnetConstructedDataLastNotifyRecord); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLastNotifyRecord); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLastNotifyRecord) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetConstructedDataLastNotifyRecord) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLastNotifyRecordParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("lastNotifyRecord"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lastNotifyRecord") } - _lastNotifyRecord, _lastNotifyRecordErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_lastNotifyRecord, _lastNotifyRecordErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _lastNotifyRecordErr != nil { return nil, errors.Wrap(_lastNotifyRecordErr, "Error parsing 'lastNotifyRecord' field of BACnetConstructedDataLastNotifyRecord") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLastNotifyRecordParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_BACnetConstructedDataLastNotifyRecord{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LastNotifyRecord: lastNotifyRecord, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLastNotifyRecord) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLastNotifyRecord") } - // Simple Field (lastNotifyRecord) - if pushErr := writeBuffer.PushContext("lastNotifyRecord"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lastNotifyRecord") - } - _lastNotifyRecordErr := writeBuffer.WriteSerializable(ctx, m.GetLastNotifyRecord()) - if popErr := writeBuffer.PopContext("lastNotifyRecord"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lastNotifyRecord") - } - if _lastNotifyRecordErr != nil { - return errors.Wrap(_lastNotifyRecordErr, "Error serializing 'lastNotifyRecord' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (lastNotifyRecord) + if pushErr := writeBuffer.PushContext("lastNotifyRecord"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lastNotifyRecord") + } + _lastNotifyRecordErr := writeBuffer.WriteSerializable(ctx, m.GetLastNotifyRecord()) + if popErr := writeBuffer.PopContext("lastNotifyRecord"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lastNotifyRecord") + } + if _lastNotifyRecordErr != nil { + return errors.Wrap(_lastNotifyRecordErr, "Error serializing 'lastNotifyRecord' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLastNotifyRecord"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLastNotifyRecord") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLastNotifyRecord) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLastNotifyRecord) isBACnetConstructedDataLastNotifyRecord() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLastNotifyRecord) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastPriority.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastPriority.go index 79e41e2cc6c..98a3b2edab4 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastPriority.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastPriority.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLastPriority is the corresponding interface of BACnetConstructedDataLastPriority type BACnetConstructedDataLastPriority interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLastPriorityExactly interface { // _BACnetConstructedDataLastPriority is the data-structure of this message type _BACnetConstructedDataLastPriority struct { *_BACnetConstructedData - LastPriority BACnetApplicationTagUnsignedInteger + LastPriority BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLastPriority) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLastPriority) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLastPriority) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LAST_PRIORITY -} +func (m *_BACnetConstructedDataLastPriority) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LAST_PRIORITY} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLastPriority) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLastPriority) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLastPriority) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLastPriority) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLastPriority) GetActualValue() BACnetApplicationT /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLastPriority factory function for _BACnetConstructedDataLastPriority -func NewBACnetConstructedDataLastPriority(lastPriority BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLastPriority { +func NewBACnetConstructedDataLastPriority( lastPriority BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLastPriority { _result := &_BACnetConstructedDataLastPriority{ - LastPriority: lastPriority, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + LastPriority: lastPriority, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLastPriority(lastPriority BACnetApplicationTagUnsig // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLastPriority(structType interface{}) BACnetConstructedDataLastPriority { - if casted, ok := structType.(BACnetConstructedDataLastPriority); ok { + if casted, ok := structType.(BACnetConstructedDataLastPriority); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLastPriority); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLastPriority) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetConstructedDataLastPriority) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLastPriorityParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("lastPriority"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lastPriority") } - _lastPriority, _lastPriorityErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_lastPriority, _lastPriorityErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _lastPriorityErr != nil { return nil, errors.Wrap(_lastPriorityErr, "Error parsing 'lastPriority' field of BACnetConstructedDataLastPriority") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLastPriorityParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetConstructedDataLastPriority{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LastPriority: lastPriority, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLastPriority) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLastPriority") } - // Simple Field (lastPriority) - if pushErr := writeBuffer.PushContext("lastPriority"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lastPriority") - } - _lastPriorityErr := writeBuffer.WriteSerializable(ctx, m.GetLastPriority()) - if popErr := writeBuffer.PopContext("lastPriority"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lastPriority") - } - if _lastPriorityErr != nil { - return errors.Wrap(_lastPriorityErr, "Error serializing 'lastPriority' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (lastPriority) + if pushErr := writeBuffer.PushContext("lastPriority"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lastPriority") + } + _lastPriorityErr := writeBuffer.WriteSerializable(ctx, m.GetLastPriority()) + if popErr := writeBuffer.PopContext("lastPriority"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lastPriority") + } + if _lastPriorityErr != nil { + return errors.Wrap(_lastPriorityErr, "Error serializing 'lastPriority' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLastPriority"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLastPriority") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLastPriority) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLastPriority) isBACnetConstructedDataLastPriority() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLastPriority) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastRestartReason.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastRestartReason.go index c31287eaf4f..b77e5b1af42 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastRestartReason.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastRestartReason.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLastRestartReason is the corresponding interface of BACnetConstructedDataLastRestartReason type BACnetConstructedDataLastRestartReason interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLastRestartReasonExactly interface { // _BACnetConstructedDataLastRestartReason is the data-structure of this message type _BACnetConstructedDataLastRestartReason struct { *_BACnetConstructedData - LastRestartReason BACnetRestartReasonTagged + LastRestartReason BACnetRestartReasonTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLastRestartReason) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLastRestartReason) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLastRestartReason) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LAST_RESTART_REASON -} +func (m *_BACnetConstructedDataLastRestartReason) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LAST_RESTART_REASON} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLastRestartReason) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLastRestartReason) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLastRestartReason) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLastRestartReason) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLastRestartReason) GetActualValue() BACnetRestart /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLastRestartReason factory function for _BACnetConstructedDataLastRestartReason -func NewBACnetConstructedDataLastRestartReason(lastRestartReason BACnetRestartReasonTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLastRestartReason { +func NewBACnetConstructedDataLastRestartReason( lastRestartReason BACnetRestartReasonTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLastRestartReason { _result := &_BACnetConstructedDataLastRestartReason{ - LastRestartReason: lastRestartReason, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + LastRestartReason: lastRestartReason, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLastRestartReason(lastRestartReason BACnetRestartRe // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLastRestartReason(structType interface{}) BACnetConstructedDataLastRestartReason { - if casted, ok := structType.(BACnetConstructedDataLastRestartReason); ok { + if casted, ok := structType.(BACnetConstructedDataLastRestartReason); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLastRestartReason); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLastRestartReason) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetConstructedDataLastRestartReason) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLastRestartReasonParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("lastRestartReason"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lastRestartReason") } - _lastRestartReason, _lastRestartReasonErr := BACnetRestartReasonTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_lastRestartReason, _lastRestartReasonErr := BACnetRestartReasonTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _lastRestartReasonErr != nil { return nil, errors.Wrap(_lastRestartReasonErr, "Error parsing 'lastRestartReason' field of BACnetConstructedDataLastRestartReason") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLastRestartReasonParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataLastRestartReason{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LastRestartReason: lastRestartReason, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLastRestartReason) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLastRestartReason") } - // Simple Field (lastRestartReason) - if pushErr := writeBuffer.PushContext("lastRestartReason"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lastRestartReason") - } - _lastRestartReasonErr := writeBuffer.WriteSerializable(ctx, m.GetLastRestartReason()) - if popErr := writeBuffer.PopContext("lastRestartReason"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lastRestartReason") - } - if _lastRestartReasonErr != nil { - return errors.Wrap(_lastRestartReasonErr, "Error serializing 'lastRestartReason' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (lastRestartReason) + if pushErr := writeBuffer.PushContext("lastRestartReason"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lastRestartReason") + } + _lastRestartReasonErr := writeBuffer.WriteSerializable(ctx, m.GetLastRestartReason()) + if popErr := writeBuffer.PopContext("lastRestartReason"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lastRestartReason") + } + if _lastRestartReasonErr != nil { + return errors.Wrap(_lastRestartReasonErr, "Error serializing 'lastRestartReason' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLastRestartReason"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLastRestartReason") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLastRestartReason) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLastRestartReason) isBACnetConstructedDataLastRestartReason() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLastRestartReason) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastRestoreTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastRestoreTime.go index 400ef868370..78d23493fcf 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastRestoreTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastRestoreTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLastRestoreTime is the corresponding interface of BACnetConstructedDataLastRestoreTime type BACnetConstructedDataLastRestoreTime interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLastRestoreTimeExactly interface { // _BACnetConstructedDataLastRestoreTime is the data-structure of this message type _BACnetConstructedDataLastRestoreTime struct { *_BACnetConstructedData - LastRestoreTime BACnetTimeStamp + LastRestoreTime BACnetTimeStamp } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLastRestoreTime) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLastRestoreTime) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLastRestoreTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LAST_RESTORE_TIME -} +func (m *_BACnetConstructedDataLastRestoreTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LAST_RESTORE_TIME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLastRestoreTime) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLastRestoreTime) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLastRestoreTime) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLastRestoreTime) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLastRestoreTime) GetActualValue() BACnetTimeStamp /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLastRestoreTime factory function for _BACnetConstructedDataLastRestoreTime -func NewBACnetConstructedDataLastRestoreTime(lastRestoreTime BACnetTimeStamp, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLastRestoreTime { +func NewBACnetConstructedDataLastRestoreTime( lastRestoreTime BACnetTimeStamp , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLastRestoreTime { _result := &_BACnetConstructedDataLastRestoreTime{ - LastRestoreTime: lastRestoreTime, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + LastRestoreTime: lastRestoreTime, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLastRestoreTime(lastRestoreTime BACnetTimeStamp, op // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLastRestoreTime(structType interface{}) BACnetConstructedDataLastRestoreTime { - if casted, ok := structType.(BACnetConstructedDataLastRestoreTime); ok { + if casted, ok := structType.(BACnetConstructedDataLastRestoreTime); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLastRestoreTime); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLastRestoreTime) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetConstructedDataLastRestoreTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLastRestoreTimeParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("lastRestoreTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lastRestoreTime") } - _lastRestoreTime, _lastRestoreTimeErr := BACnetTimeStampParseWithBuffer(ctx, readBuffer) +_lastRestoreTime, _lastRestoreTimeErr := BACnetTimeStampParseWithBuffer(ctx, readBuffer) if _lastRestoreTimeErr != nil { return nil, errors.Wrap(_lastRestoreTimeErr, "Error parsing 'lastRestoreTime' field of BACnetConstructedDataLastRestoreTime") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLastRestoreTimeParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetConstructedDataLastRestoreTime{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LastRestoreTime: lastRestoreTime, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLastRestoreTime) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLastRestoreTime") } - // Simple Field (lastRestoreTime) - if pushErr := writeBuffer.PushContext("lastRestoreTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lastRestoreTime") - } - _lastRestoreTimeErr := writeBuffer.WriteSerializable(ctx, m.GetLastRestoreTime()) - if popErr := writeBuffer.PopContext("lastRestoreTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lastRestoreTime") - } - if _lastRestoreTimeErr != nil { - return errors.Wrap(_lastRestoreTimeErr, "Error serializing 'lastRestoreTime' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (lastRestoreTime) + if pushErr := writeBuffer.PushContext("lastRestoreTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lastRestoreTime") + } + _lastRestoreTimeErr := writeBuffer.WriteSerializable(ctx, m.GetLastRestoreTime()) + if popErr := writeBuffer.PopContext("lastRestoreTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lastRestoreTime") + } + if _lastRestoreTimeErr != nil { + return errors.Wrap(_lastRestoreTimeErr, "Error serializing 'lastRestoreTime' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLastRestoreTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLastRestoreTime") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLastRestoreTime) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLastRestoreTime) isBACnetConstructedDataLastRestoreTime() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLastRestoreTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastStateChange.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastStateChange.go index 2a428668685..e7065cb3da3 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastStateChange.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastStateChange.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLastStateChange is the corresponding interface of BACnetConstructedDataLastStateChange type BACnetConstructedDataLastStateChange interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLastStateChangeExactly interface { // _BACnetConstructedDataLastStateChange is the data-structure of this message type _BACnetConstructedDataLastStateChange struct { *_BACnetConstructedData - LastStateChange BACnetTimerTransitionTagged + LastStateChange BACnetTimerTransitionTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLastStateChange) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLastStateChange) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLastStateChange) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LAST_STATE_CHANGE -} +func (m *_BACnetConstructedDataLastStateChange) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LAST_STATE_CHANGE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLastStateChange) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLastStateChange) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLastStateChange) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLastStateChange) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLastStateChange) GetActualValue() BACnetTimerTran /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLastStateChange factory function for _BACnetConstructedDataLastStateChange -func NewBACnetConstructedDataLastStateChange(lastStateChange BACnetTimerTransitionTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLastStateChange { +func NewBACnetConstructedDataLastStateChange( lastStateChange BACnetTimerTransitionTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLastStateChange { _result := &_BACnetConstructedDataLastStateChange{ - LastStateChange: lastStateChange, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + LastStateChange: lastStateChange, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLastStateChange(lastStateChange BACnetTimerTransiti // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLastStateChange(structType interface{}) BACnetConstructedDataLastStateChange { - if casted, ok := structType.(BACnetConstructedDataLastStateChange); ok { + if casted, ok := structType.(BACnetConstructedDataLastStateChange); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLastStateChange); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLastStateChange) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetConstructedDataLastStateChange) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLastStateChangeParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("lastStateChange"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lastStateChange") } - _lastStateChange, _lastStateChangeErr := BACnetTimerTransitionTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_lastStateChange, _lastStateChangeErr := BACnetTimerTransitionTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _lastStateChangeErr != nil { return nil, errors.Wrap(_lastStateChangeErr, "Error parsing 'lastStateChange' field of BACnetConstructedDataLastStateChange") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLastStateChangeParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetConstructedDataLastStateChange{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LastStateChange: lastStateChange, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLastStateChange) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLastStateChange") } - // Simple Field (lastStateChange) - if pushErr := writeBuffer.PushContext("lastStateChange"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lastStateChange") - } - _lastStateChangeErr := writeBuffer.WriteSerializable(ctx, m.GetLastStateChange()) - if popErr := writeBuffer.PopContext("lastStateChange"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lastStateChange") - } - if _lastStateChangeErr != nil { - return errors.Wrap(_lastStateChangeErr, "Error serializing 'lastStateChange' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (lastStateChange) + if pushErr := writeBuffer.PushContext("lastStateChange"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lastStateChange") + } + _lastStateChangeErr := writeBuffer.WriteSerializable(ctx, m.GetLastStateChange()) + if popErr := writeBuffer.PopContext("lastStateChange"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lastStateChange") + } + if _lastStateChangeErr != nil { + return errors.Wrap(_lastStateChangeErr, "Error serializing 'lastStateChange' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLastStateChange"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLastStateChange") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLastStateChange) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLastStateChange) isBACnetConstructedDataLastStateChange() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLastStateChange) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastUseTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastUseTime.go index 4a8fe4f88ca..bf38ae96058 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastUseTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLastUseTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLastUseTime is the corresponding interface of BACnetConstructedDataLastUseTime type BACnetConstructedDataLastUseTime interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLastUseTimeExactly interface { // _BACnetConstructedDataLastUseTime is the data-structure of this message type _BACnetConstructedDataLastUseTime struct { *_BACnetConstructedData - LastUseTime BACnetDateTime + LastUseTime BACnetDateTime } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLastUseTime) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLastUseTime) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLastUseTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LAST_USE_TIME -} +func (m *_BACnetConstructedDataLastUseTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LAST_USE_TIME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLastUseTime) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLastUseTime) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLastUseTime) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLastUseTime) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLastUseTime) GetActualValue() BACnetDateTime { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLastUseTime factory function for _BACnetConstructedDataLastUseTime -func NewBACnetConstructedDataLastUseTime(lastUseTime BACnetDateTime, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLastUseTime { +func NewBACnetConstructedDataLastUseTime( lastUseTime BACnetDateTime , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLastUseTime { _result := &_BACnetConstructedDataLastUseTime{ - LastUseTime: lastUseTime, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + LastUseTime: lastUseTime, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLastUseTime(lastUseTime BACnetDateTime, openingTag // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLastUseTime(structType interface{}) BACnetConstructedDataLastUseTime { - if casted, ok := structType.(BACnetConstructedDataLastUseTime); ok { + if casted, ok := structType.(BACnetConstructedDataLastUseTime); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLastUseTime); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLastUseTime) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataLastUseTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLastUseTimeParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("lastUseTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lastUseTime") } - _lastUseTime, _lastUseTimeErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) +_lastUseTime, _lastUseTimeErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) if _lastUseTimeErr != nil { return nil, errors.Wrap(_lastUseTimeErr, "Error parsing 'lastUseTime' field of BACnetConstructedDataLastUseTime") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLastUseTimeParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataLastUseTime{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LastUseTime: lastUseTime, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLastUseTime) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLastUseTime") } - // Simple Field (lastUseTime) - if pushErr := writeBuffer.PushContext("lastUseTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lastUseTime") - } - _lastUseTimeErr := writeBuffer.WriteSerializable(ctx, m.GetLastUseTime()) - if popErr := writeBuffer.PopContext("lastUseTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lastUseTime") - } - if _lastUseTimeErr != nil { - return errors.Wrap(_lastUseTimeErr, "Error serializing 'lastUseTime' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (lastUseTime) + if pushErr := writeBuffer.PushContext("lastUseTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lastUseTime") + } + _lastUseTimeErr := writeBuffer.WriteSerializable(ctx, m.GetLastUseTime()) + if popErr := writeBuffer.PopContext("lastUseTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lastUseTime") + } + if _lastUseTimeErr != nil { + return errors.Wrap(_lastUseTimeErr, "Error serializing 'lastUseTime' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLastUseTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLastUseTime") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLastUseTime) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLastUseTime) isBACnetConstructedDataLastUseTime() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLastUseTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLifeSafetyAlarmValues.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLifeSafetyAlarmValues.go index 909642f25e6..23817d84626 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLifeSafetyAlarmValues.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLifeSafetyAlarmValues.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLifeSafetyAlarmValues is the corresponding interface of BACnetConstructedDataLifeSafetyAlarmValues type BACnetConstructedDataLifeSafetyAlarmValues interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataLifeSafetyAlarmValuesExactly interface { // _BACnetConstructedDataLifeSafetyAlarmValues is the data-structure of this message type _BACnetConstructedDataLifeSafetyAlarmValues struct { *_BACnetConstructedData - AlarmValues []BACnetLifeSafetyStateTagged + AlarmValues []BACnetLifeSafetyStateTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLifeSafetyAlarmValues) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLifeSafetyAlarmValues) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLifeSafetyAlarmValues) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LIFE_SAFETY_ALARM_VALUES -} +func (m *_BACnetConstructedDataLifeSafetyAlarmValues) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LIFE_SAFETY_ALARM_VALUES} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLifeSafetyAlarmValues) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLifeSafetyAlarmValues) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLifeSafetyAlarmValues) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLifeSafetyAlarmValues) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataLifeSafetyAlarmValues) GetAlarmValues() []BACnetL /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLifeSafetyAlarmValues factory function for _BACnetConstructedDataLifeSafetyAlarmValues -func NewBACnetConstructedDataLifeSafetyAlarmValues(alarmValues []BACnetLifeSafetyStateTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLifeSafetyAlarmValues { +func NewBACnetConstructedDataLifeSafetyAlarmValues( alarmValues []BACnetLifeSafetyStateTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLifeSafetyAlarmValues { _result := &_BACnetConstructedDataLifeSafetyAlarmValues{ - AlarmValues: alarmValues, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + AlarmValues: alarmValues, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataLifeSafetyAlarmValues(alarmValues []BACnetLifeSafet // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLifeSafetyAlarmValues(structType interface{}) BACnetConstructedDataLifeSafetyAlarmValues { - if casted, ok := structType.(BACnetConstructedDataLifeSafetyAlarmValues); ok { + if casted, ok := structType.(BACnetConstructedDataLifeSafetyAlarmValues); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLifeSafetyAlarmValues); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataLifeSafetyAlarmValues) GetLengthInBits(ctx contex return lengthInBits } + func (m *_BACnetConstructedDataLifeSafetyAlarmValues) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataLifeSafetyAlarmValuesParseWithBuffer(ctx context.Conte // Terminated array var alarmValues []BACnetLifeSafetyStateTagged { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetLifeSafetyStateTaggedParseWithBuffer(ctx, readBuffer, uint8(0), TagClass_APPLICATION_TAGS) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetLifeSafetyStateTaggedParseWithBuffer(ctx, readBuffer , uint8(0) , TagClass_APPLICATION_TAGS ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'alarmValues' field of BACnetConstructedDataLifeSafetyAlarmValues") } @@ -173,7 +175,7 @@ func BACnetConstructedDataLifeSafetyAlarmValuesParseWithBuffer(ctx context.Conte // Create a partially initialized instance _child := &_BACnetConstructedDataLifeSafetyAlarmValues{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, AlarmValues: alarmValues, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataLifeSafetyAlarmValues) SerializeWithWriteBuffer(c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLifeSafetyAlarmValues") } - // Array Field (alarmValues) - if pushErr := writeBuffer.PushContext("alarmValues", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for alarmValues") - } - for _curItem, _element := range m.GetAlarmValues() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAlarmValues()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'alarmValues' field") - } - } - if popErr := writeBuffer.PopContext("alarmValues", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for alarmValues") + // Array Field (alarmValues) + if pushErr := writeBuffer.PushContext("alarmValues", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for alarmValues") + } + for _curItem, _element := range m.GetAlarmValues() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAlarmValues()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'alarmValues' field") } + } + if popErr := writeBuffer.PopContext("alarmValues", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for alarmValues") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLifeSafetyAlarmValues"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLifeSafetyAlarmValues") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataLifeSafetyAlarmValues) SerializeWithWriteBuffer(c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLifeSafetyAlarmValues) isBACnetConstructedDataLifeSafetyAlarmValues() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataLifeSafetyAlarmValues) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLifeSafetyPointAlarmValues.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLifeSafetyPointAlarmValues.go index cb669b87a4c..e0533d6af50 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLifeSafetyPointAlarmValues.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLifeSafetyPointAlarmValues.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLifeSafetyPointAlarmValues is the corresponding interface of BACnetConstructedDataLifeSafetyPointAlarmValues type BACnetConstructedDataLifeSafetyPointAlarmValues interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataLifeSafetyPointAlarmValuesExactly interface { // _BACnetConstructedDataLifeSafetyPointAlarmValues is the data-structure of this message type _BACnetConstructedDataLifeSafetyPointAlarmValues struct { *_BACnetConstructedData - AlarmValues []BACnetLifeSafetyStateTagged + AlarmValues []BACnetLifeSafetyStateTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLifeSafetyPointAlarmValues) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_LIFE_SAFETY_POINT -} +func (m *_BACnetConstructedDataLifeSafetyPointAlarmValues) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_LIFE_SAFETY_POINT} -func (m *_BACnetConstructedDataLifeSafetyPointAlarmValues) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALARM_VALUES -} +func (m *_BACnetConstructedDataLifeSafetyPointAlarmValues) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALARM_VALUES} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLifeSafetyPointAlarmValues) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLifeSafetyPointAlarmValues) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLifeSafetyPointAlarmValues) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLifeSafetyPointAlarmValues) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataLifeSafetyPointAlarmValues) GetAlarmValues() []BA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLifeSafetyPointAlarmValues factory function for _BACnetConstructedDataLifeSafetyPointAlarmValues -func NewBACnetConstructedDataLifeSafetyPointAlarmValues(alarmValues []BACnetLifeSafetyStateTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLifeSafetyPointAlarmValues { +func NewBACnetConstructedDataLifeSafetyPointAlarmValues( alarmValues []BACnetLifeSafetyStateTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLifeSafetyPointAlarmValues { _result := &_BACnetConstructedDataLifeSafetyPointAlarmValues{ - AlarmValues: alarmValues, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + AlarmValues: alarmValues, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataLifeSafetyPointAlarmValues(alarmValues []BACnetLife // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLifeSafetyPointAlarmValues(structType interface{}) BACnetConstructedDataLifeSafetyPointAlarmValues { - if casted, ok := structType.(BACnetConstructedDataLifeSafetyPointAlarmValues); ok { + if casted, ok := structType.(BACnetConstructedDataLifeSafetyPointAlarmValues); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLifeSafetyPointAlarmValues); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataLifeSafetyPointAlarmValues) GetLengthInBits(ctx c return lengthInBits } + func (m *_BACnetConstructedDataLifeSafetyPointAlarmValues) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataLifeSafetyPointAlarmValuesParseWithBuffer(ctx context. // Terminated array var alarmValues []BACnetLifeSafetyStateTagged { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetLifeSafetyStateTaggedParseWithBuffer(ctx, readBuffer, uint8(0), TagClass_APPLICATION_TAGS) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetLifeSafetyStateTaggedParseWithBuffer(ctx, readBuffer , uint8(0) , TagClass_APPLICATION_TAGS ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'alarmValues' field of BACnetConstructedDataLifeSafetyPointAlarmValues") } @@ -173,7 +175,7 @@ func BACnetConstructedDataLifeSafetyPointAlarmValuesParseWithBuffer(ctx context. // Create a partially initialized instance _child := &_BACnetConstructedDataLifeSafetyPointAlarmValues{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, AlarmValues: alarmValues, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataLifeSafetyPointAlarmValues) SerializeWithWriteBuf return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLifeSafetyPointAlarmValues") } - // Array Field (alarmValues) - if pushErr := writeBuffer.PushContext("alarmValues", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for alarmValues") - } - for _curItem, _element := range m.GetAlarmValues() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAlarmValues()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'alarmValues' field") - } - } - if popErr := writeBuffer.PopContext("alarmValues", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for alarmValues") + // Array Field (alarmValues) + if pushErr := writeBuffer.PushContext("alarmValues", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for alarmValues") + } + for _curItem, _element := range m.GetAlarmValues() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAlarmValues()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'alarmValues' field") } + } + if popErr := writeBuffer.PopContext("alarmValues", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for alarmValues") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLifeSafetyPointAlarmValues"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLifeSafetyPointAlarmValues") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataLifeSafetyPointAlarmValues) SerializeWithWriteBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLifeSafetyPointAlarmValues) isBACnetConstructedDataLifeSafetyPointAlarmValues() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataLifeSafetyPointAlarmValues) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLifeSafetyPointAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLifeSafetyPointAll.go index a5a677bdcbb..4392cfd33d1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLifeSafetyPointAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLifeSafetyPointAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLifeSafetyPointAll is the corresponding interface of BACnetConstructedDataLifeSafetyPointAll type BACnetConstructedDataLifeSafetyPointAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataLifeSafetyPointAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLifeSafetyPointAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_LIFE_SAFETY_POINT -} +func (m *_BACnetConstructedDataLifeSafetyPointAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_LIFE_SAFETY_POINT} -func (m *_BACnetConstructedDataLifeSafetyPointAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataLifeSafetyPointAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLifeSafetyPointAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLifeSafetyPointAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLifeSafetyPointAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLifeSafetyPointAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataLifeSafetyPointAll factory function for _BACnetConstructedDataLifeSafetyPointAll -func NewBACnetConstructedDataLifeSafetyPointAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLifeSafetyPointAll { +func NewBACnetConstructedDataLifeSafetyPointAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLifeSafetyPointAll { _result := &_BACnetConstructedDataLifeSafetyPointAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataLifeSafetyPointAll(openingTag BACnetOpeningTag, pee // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLifeSafetyPointAll(structType interface{}) BACnetConstructedDataLifeSafetyPointAll { - if casted, ok := structType.(BACnetConstructedDataLifeSafetyPointAll); ok { + if casted, ok := structType.(BACnetConstructedDataLifeSafetyPointAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLifeSafetyPointAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataLifeSafetyPointAll) GetLengthInBits(ctx context.C return lengthInBits } + func (m *_BACnetConstructedDataLifeSafetyPointAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataLifeSafetyPointAllParseWithBuffer(ctx context.Context, _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataLifeSafetyPointAllParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataLifeSafetyPointAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataLifeSafetyPointAll) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLifeSafetyPointAll) isBACnetConstructedDataLifeSafetyPointAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataLifeSafetyPointAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLifeSafetyPointFaultValues.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLifeSafetyPointFaultValues.go index 3652bd36e15..826dd73e041 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLifeSafetyPointFaultValues.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLifeSafetyPointFaultValues.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLifeSafetyPointFaultValues is the corresponding interface of BACnetConstructedDataLifeSafetyPointFaultValues type BACnetConstructedDataLifeSafetyPointFaultValues interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataLifeSafetyPointFaultValuesExactly interface { // _BACnetConstructedDataLifeSafetyPointFaultValues is the data-structure of this message type _BACnetConstructedDataLifeSafetyPointFaultValues struct { *_BACnetConstructedData - FaultValues []BACnetLifeSafetyStateTagged + FaultValues []BACnetLifeSafetyStateTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLifeSafetyPointFaultValues) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_LIFE_SAFETY_POINT -} +func (m *_BACnetConstructedDataLifeSafetyPointFaultValues) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_LIFE_SAFETY_POINT} -func (m *_BACnetConstructedDataLifeSafetyPointFaultValues) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FAULT_VALUES -} +func (m *_BACnetConstructedDataLifeSafetyPointFaultValues) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FAULT_VALUES} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLifeSafetyPointFaultValues) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLifeSafetyPointFaultValues) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLifeSafetyPointFaultValues) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLifeSafetyPointFaultValues) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataLifeSafetyPointFaultValues) GetFaultValues() []BA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLifeSafetyPointFaultValues factory function for _BACnetConstructedDataLifeSafetyPointFaultValues -func NewBACnetConstructedDataLifeSafetyPointFaultValues(faultValues []BACnetLifeSafetyStateTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLifeSafetyPointFaultValues { +func NewBACnetConstructedDataLifeSafetyPointFaultValues( faultValues []BACnetLifeSafetyStateTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLifeSafetyPointFaultValues { _result := &_BACnetConstructedDataLifeSafetyPointFaultValues{ - FaultValues: faultValues, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + FaultValues: faultValues, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataLifeSafetyPointFaultValues(faultValues []BACnetLife // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLifeSafetyPointFaultValues(structType interface{}) BACnetConstructedDataLifeSafetyPointFaultValues { - if casted, ok := structType.(BACnetConstructedDataLifeSafetyPointFaultValues); ok { + if casted, ok := structType.(BACnetConstructedDataLifeSafetyPointFaultValues); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLifeSafetyPointFaultValues); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataLifeSafetyPointFaultValues) GetLengthInBits(ctx c return lengthInBits } + func (m *_BACnetConstructedDataLifeSafetyPointFaultValues) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataLifeSafetyPointFaultValuesParseWithBuffer(ctx context. // Terminated array var faultValues []BACnetLifeSafetyStateTagged { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetLifeSafetyStateTaggedParseWithBuffer(ctx, readBuffer, uint8(0), TagClass_APPLICATION_TAGS) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetLifeSafetyStateTaggedParseWithBuffer(ctx, readBuffer , uint8(0) , TagClass_APPLICATION_TAGS ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'faultValues' field of BACnetConstructedDataLifeSafetyPointFaultValues") } @@ -173,7 +175,7 @@ func BACnetConstructedDataLifeSafetyPointFaultValuesParseWithBuffer(ctx context. // Create a partially initialized instance _child := &_BACnetConstructedDataLifeSafetyPointFaultValues{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FaultValues: faultValues, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataLifeSafetyPointFaultValues) SerializeWithWriteBuf return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLifeSafetyPointFaultValues") } - // Array Field (faultValues) - if pushErr := writeBuffer.PushContext("faultValues", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for faultValues") - } - for _curItem, _element := range m.GetFaultValues() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetFaultValues()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'faultValues' field") - } - } - if popErr := writeBuffer.PopContext("faultValues", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for faultValues") + // Array Field (faultValues) + if pushErr := writeBuffer.PushContext("faultValues", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for faultValues") + } + for _curItem, _element := range m.GetFaultValues() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetFaultValues()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'faultValues' field") } + } + if popErr := writeBuffer.PopContext("faultValues", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for faultValues") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLifeSafetyPointFaultValues"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLifeSafetyPointFaultValues") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataLifeSafetyPointFaultValues) SerializeWithWriteBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLifeSafetyPointFaultValues) isBACnetConstructedDataLifeSafetyPointFaultValues() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataLifeSafetyPointFaultValues) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLifeSafetyPointPresentValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLifeSafetyPointPresentValue.go index ad0bded14f9..db11c99074d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLifeSafetyPointPresentValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLifeSafetyPointPresentValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLifeSafetyPointPresentValue is the corresponding interface of BACnetConstructedDataLifeSafetyPointPresentValue type BACnetConstructedDataLifeSafetyPointPresentValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLifeSafetyPointPresentValueExactly interface { // _BACnetConstructedDataLifeSafetyPointPresentValue is the data-structure of this message type _BACnetConstructedDataLifeSafetyPointPresentValue struct { *_BACnetConstructedData - PresentValue BACnetLifeSafetyStateTagged + PresentValue BACnetLifeSafetyStateTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLifeSafetyPointPresentValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_LIFE_SAFETY_POINT -} +func (m *_BACnetConstructedDataLifeSafetyPointPresentValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_LIFE_SAFETY_POINT} -func (m *_BACnetConstructedDataLifeSafetyPointPresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PRESENT_VALUE -} +func (m *_BACnetConstructedDataLifeSafetyPointPresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PRESENT_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLifeSafetyPointPresentValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLifeSafetyPointPresentValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLifeSafetyPointPresentValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLifeSafetyPointPresentValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLifeSafetyPointPresentValue) GetActualValue() BAC /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLifeSafetyPointPresentValue factory function for _BACnetConstructedDataLifeSafetyPointPresentValue -func NewBACnetConstructedDataLifeSafetyPointPresentValue(presentValue BACnetLifeSafetyStateTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLifeSafetyPointPresentValue { +func NewBACnetConstructedDataLifeSafetyPointPresentValue( presentValue BACnetLifeSafetyStateTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLifeSafetyPointPresentValue { _result := &_BACnetConstructedDataLifeSafetyPointPresentValue{ - PresentValue: presentValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PresentValue: presentValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLifeSafetyPointPresentValue(presentValue BACnetLife // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLifeSafetyPointPresentValue(structType interface{}) BACnetConstructedDataLifeSafetyPointPresentValue { - if casted, ok := structType.(BACnetConstructedDataLifeSafetyPointPresentValue); ok { + if casted, ok := structType.(BACnetConstructedDataLifeSafetyPointPresentValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLifeSafetyPointPresentValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLifeSafetyPointPresentValue) GetLengthInBits(ctx return lengthInBits } + func (m *_BACnetConstructedDataLifeSafetyPointPresentValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLifeSafetyPointPresentValueParseWithBuffer(ctx context if pullErr := readBuffer.PullContext("presentValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for presentValue") } - _presentValue, _presentValueErr := BACnetLifeSafetyStateTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_presentValue, _presentValueErr := BACnetLifeSafetyStateTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _presentValueErr != nil { return nil, errors.Wrap(_presentValueErr, "Error parsing 'presentValue' field of BACnetConstructedDataLifeSafetyPointPresentValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLifeSafetyPointPresentValueParseWithBuffer(ctx context // Create a partially initialized instance _child := &_BACnetConstructedDataLifeSafetyPointPresentValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PresentValue: presentValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLifeSafetyPointPresentValue) SerializeWithWriteBu return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLifeSafetyPointPresentValue") } - // Simple Field (presentValue) - if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for presentValue") - } - _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) - if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for presentValue") - } - if _presentValueErr != nil { - return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (presentValue) + if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for presentValue") + } + _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) + if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for presentValue") + } + if _presentValueErr != nil { + return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLifeSafetyPointPresentValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLifeSafetyPointPresentValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLifeSafetyPointPresentValue) SerializeWithWriteBu return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLifeSafetyPointPresentValue) isBACnetConstructedDataLifeSafetyPointPresentValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLifeSafetyPointPresentValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLifeSafetyZoneAlarmValues.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLifeSafetyZoneAlarmValues.go index 5c5f38fa0d0..1744c56a2c1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLifeSafetyZoneAlarmValues.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLifeSafetyZoneAlarmValues.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLifeSafetyZoneAlarmValues is the corresponding interface of BACnetConstructedDataLifeSafetyZoneAlarmValues type BACnetConstructedDataLifeSafetyZoneAlarmValues interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataLifeSafetyZoneAlarmValuesExactly interface { // _BACnetConstructedDataLifeSafetyZoneAlarmValues is the data-structure of this message type _BACnetConstructedDataLifeSafetyZoneAlarmValues struct { *_BACnetConstructedData - AlarmValues []BACnetLifeSafetyStateTagged + AlarmValues []BACnetLifeSafetyStateTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLifeSafetyZoneAlarmValues) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_LIFE_SAFETY_ZONE -} +func (m *_BACnetConstructedDataLifeSafetyZoneAlarmValues) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_LIFE_SAFETY_ZONE} -func (m *_BACnetConstructedDataLifeSafetyZoneAlarmValues) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALARM_VALUES -} +func (m *_BACnetConstructedDataLifeSafetyZoneAlarmValues) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALARM_VALUES} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLifeSafetyZoneAlarmValues) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLifeSafetyZoneAlarmValues) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLifeSafetyZoneAlarmValues) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLifeSafetyZoneAlarmValues) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataLifeSafetyZoneAlarmValues) GetAlarmValues() []BAC /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLifeSafetyZoneAlarmValues factory function for _BACnetConstructedDataLifeSafetyZoneAlarmValues -func NewBACnetConstructedDataLifeSafetyZoneAlarmValues(alarmValues []BACnetLifeSafetyStateTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLifeSafetyZoneAlarmValues { +func NewBACnetConstructedDataLifeSafetyZoneAlarmValues( alarmValues []BACnetLifeSafetyStateTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLifeSafetyZoneAlarmValues { _result := &_BACnetConstructedDataLifeSafetyZoneAlarmValues{ - AlarmValues: alarmValues, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + AlarmValues: alarmValues, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataLifeSafetyZoneAlarmValues(alarmValues []BACnetLifeS // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLifeSafetyZoneAlarmValues(structType interface{}) BACnetConstructedDataLifeSafetyZoneAlarmValues { - if casted, ok := structType.(BACnetConstructedDataLifeSafetyZoneAlarmValues); ok { + if casted, ok := structType.(BACnetConstructedDataLifeSafetyZoneAlarmValues); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLifeSafetyZoneAlarmValues); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataLifeSafetyZoneAlarmValues) GetLengthInBits(ctx co return lengthInBits } + func (m *_BACnetConstructedDataLifeSafetyZoneAlarmValues) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataLifeSafetyZoneAlarmValuesParseWithBuffer(ctx context.C // Terminated array var alarmValues []BACnetLifeSafetyStateTagged { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetLifeSafetyStateTaggedParseWithBuffer(ctx, readBuffer, uint8(0), TagClass_APPLICATION_TAGS) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetLifeSafetyStateTaggedParseWithBuffer(ctx, readBuffer , uint8(0) , TagClass_APPLICATION_TAGS ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'alarmValues' field of BACnetConstructedDataLifeSafetyZoneAlarmValues") } @@ -173,7 +175,7 @@ func BACnetConstructedDataLifeSafetyZoneAlarmValuesParseWithBuffer(ctx context.C // Create a partially initialized instance _child := &_BACnetConstructedDataLifeSafetyZoneAlarmValues{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, AlarmValues: alarmValues, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataLifeSafetyZoneAlarmValues) SerializeWithWriteBuff return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLifeSafetyZoneAlarmValues") } - // Array Field (alarmValues) - if pushErr := writeBuffer.PushContext("alarmValues", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for alarmValues") - } - for _curItem, _element := range m.GetAlarmValues() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAlarmValues()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'alarmValues' field") - } - } - if popErr := writeBuffer.PopContext("alarmValues", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for alarmValues") + // Array Field (alarmValues) + if pushErr := writeBuffer.PushContext("alarmValues", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for alarmValues") + } + for _curItem, _element := range m.GetAlarmValues() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAlarmValues()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'alarmValues' field") } + } + if popErr := writeBuffer.PopContext("alarmValues", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for alarmValues") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLifeSafetyZoneAlarmValues"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLifeSafetyZoneAlarmValues") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataLifeSafetyZoneAlarmValues) SerializeWithWriteBuff return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLifeSafetyZoneAlarmValues) isBACnetConstructedDataLifeSafetyZoneAlarmValues() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataLifeSafetyZoneAlarmValues) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLifeSafetyZoneAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLifeSafetyZoneAll.go index 62a70cf8a5c..665a7e331e4 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLifeSafetyZoneAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLifeSafetyZoneAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLifeSafetyZoneAll is the corresponding interface of BACnetConstructedDataLifeSafetyZoneAll type BACnetConstructedDataLifeSafetyZoneAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataLifeSafetyZoneAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLifeSafetyZoneAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_LIFE_SAFETY_ZONE -} +func (m *_BACnetConstructedDataLifeSafetyZoneAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_LIFE_SAFETY_ZONE} -func (m *_BACnetConstructedDataLifeSafetyZoneAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataLifeSafetyZoneAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLifeSafetyZoneAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLifeSafetyZoneAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLifeSafetyZoneAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLifeSafetyZoneAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataLifeSafetyZoneAll factory function for _BACnetConstructedDataLifeSafetyZoneAll -func NewBACnetConstructedDataLifeSafetyZoneAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLifeSafetyZoneAll { +func NewBACnetConstructedDataLifeSafetyZoneAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLifeSafetyZoneAll { _result := &_BACnetConstructedDataLifeSafetyZoneAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataLifeSafetyZoneAll(openingTag BACnetOpeningTag, peek // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLifeSafetyZoneAll(structType interface{}) BACnetConstructedDataLifeSafetyZoneAll { - if casted, ok := structType.(BACnetConstructedDataLifeSafetyZoneAll); ok { + if casted, ok := structType.(BACnetConstructedDataLifeSafetyZoneAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLifeSafetyZoneAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataLifeSafetyZoneAll) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetConstructedDataLifeSafetyZoneAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataLifeSafetyZoneAllParseWithBuffer(ctx context.Context, _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataLifeSafetyZoneAllParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataLifeSafetyZoneAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataLifeSafetyZoneAll) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLifeSafetyZoneAll) isBACnetConstructedDataLifeSafetyZoneAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataLifeSafetyZoneAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLifeSafetyZoneFaultValues.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLifeSafetyZoneFaultValues.go index 00f14764df5..4942246c41f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLifeSafetyZoneFaultValues.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLifeSafetyZoneFaultValues.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLifeSafetyZoneFaultValues is the corresponding interface of BACnetConstructedDataLifeSafetyZoneFaultValues type BACnetConstructedDataLifeSafetyZoneFaultValues interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataLifeSafetyZoneFaultValuesExactly interface { // _BACnetConstructedDataLifeSafetyZoneFaultValues is the data-structure of this message type _BACnetConstructedDataLifeSafetyZoneFaultValues struct { *_BACnetConstructedData - FaultValues []BACnetLifeSafetyStateTagged + FaultValues []BACnetLifeSafetyStateTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLifeSafetyZoneFaultValues) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_LIFE_SAFETY_ZONE -} +func (m *_BACnetConstructedDataLifeSafetyZoneFaultValues) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_LIFE_SAFETY_ZONE} -func (m *_BACnetConstructedDataLifeSafetyZoneFaultValues) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FAULT_VALUES -} +func (m *_BACnetConstructedDataLifeSafetyZoneFaultValues) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FAULT_VALUES} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLifeSafetyZoneFaultValues) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLifeSafetyZoneFaultValues) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLifeSafetyZoneFaultValues) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLifeSafetyZoneFaultValues) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataLifeSafetyZoneFaultValues) GetFaultValues() []BAC /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLifeSafetyZoneFaultValues factory function for _BACnetConstructedDataLifeSafetyZoneFaultValues -func NewBACnetConstructedDataLifeSafetyZoneFaultValues(faultValues []BACnetLifeSafetyStateTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLifeSafetyZoneFaultValues { +func NewBACnetConstructedDataLifeSafetyZoneFaultValues( faultValues []BACnetLifeSafetyStateTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLifeSafetyZoneFaultValues { _result := &_BACnetConstructedDataLifeSafetyZoneFaultValues{ - FaultValues: faultValues, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + FaultValues: faultValues, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataLifeSafetyZoneFaultValues(faultValues []BACnetLifeS // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLifeSafetyZoneFaultValues(structType interface{}) BACnetConstructedDataLifeSafetyZoneFaultValues { - if casted, ok := structType.(BACnetConstructedDataLifeSafetyZoneFaultValues); ok { + if casted, ok := structType.(BACnetConstructedDataLifeSafetyZoneFaultValues); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLifeSafetyZoneFaultValues); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataLifeSafetyZoneFaultValues) GetLengthInBits(ctx co return lengthInBits } + func (m *_BACnetConstructedDataLifeSafetyZoneFaultValues) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataLifeSafetyZoneFaultValuesParseWithBuffer(ctx context.C // Terminated array var faultValues []BACnetLifeSafetyStateTagged { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetLifeSafetyStateTaggedParseWithBuffer(ctx, readBuffer, uint8(0), TagClass_APPLICATION_TAGS) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetLifeSafetyStateTaggedParseWithBuffer(ctx, readBuffer , uint8(0) , TagClass_APPLICATION_TAGS ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'faultValues' field of BACnetConstructedDataLifeSafetyZoneFaultValues") } @@ -173,7 +175,7 @@ func BACnetConstructedDataLifeSafetyZoneFaultValuesParseWithBuffer(ctx context.C // Create a partially initialized instance _child := &_BACnetConstructedDataLifeSafetyZoneFaultValues{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FaultValues: faultValues, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataLifeSafetyZoneFaultValues) SerializeWithWriteBuff return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLifeSafetyZoneFaultValues") } - // Array Field (faultValues) - if pushErr := writeBuffer.PushContext("faultValues", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for faultValues") - } - for _curItem, _element := range m.GetFaultValues() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetFaultValues()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'faultValues' field") - } - } - if popErr := writeBuffer.PopContext("faultValues", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for faultValues") + // Array Field (faultValues) + if pushErr := writeBuffer.PushContext("faultValues", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for faultValues") + } + for _curItem, _element := range m.GetFaultValues() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetFaultValues()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'faultValues' field") } + } + if popErr := writeBuffer.PopContext("faultValues", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for faultValues") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLifeSafetyZoneFaultValues"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLifeSafetyZoneFaultValues") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataLifeSafetyZoneFaultValues) SerializeWithWriteBuff return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLifeSafetyZoneFaultValues) isBACnetConstructedDataLifeSafetyZoneFaultValues() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataLifeSafetyZoneFaultValues) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLifeSafetyZoneMaintenanceRequired.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLifeSafetyZoneMaintenanceRequired.go index 2e77490760d..c38cec789ff 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLifeSafetyZoneMaintenanceRequired.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLifeSafetyZoneMaintenanceRequired.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLifeSafetyZoneMaintenanceRequired is the corresponding interface of BACnetConstructedDataLifeSafetyZoneMaintenanceRequired type BACnetConstructedDataLifeSafetyZoneMaintenanceRequired interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLifeSafetyZoneMaintenanceRequiredExactly interface { // _BACnetConstructedDataLifeSafetyZoneMaintenanceRequired is the data-structure of this message type _BACnetConstructedDataLifeSafetyZoneMaintenanceRequired struct { *_BACnetConstructedData - MaintenanceRequired BACnetApplicationTagBoolean + MaintenanceRequired BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLifeSafetyZoneMaintenanceRequired) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_LIFE_SAFETY_ZONE -} +func (m *_BACnetConstructedDataLifeSafetyZoneMaintenanceRequired) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_LIFE_SAFETY_ZONE} -func (m *_BACnetConstructedDataLifeSafetyZoneMaintenanceRequired) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MAINTENANCE_REQUIRED -} +func (m *_BACnetConstructedDataLifeSafetyZoneMaintenanceRequired) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MAINTENANCE_REQUIRED} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLifeSafetyZoneMaintenanceRequired) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLifeSafetyZoneMaintenanceRequired) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLifeSafetyZoneMaintenanceRequired) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLifeSafetyZoneMaintenanceRequired) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLifeSafetyZoneMaintenanceRequired) GetActualValue /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLifeSafetyZoneMaintenanceRequired factory function for _BACnetConstructedDataLifeSafetyZoneMaintenanceRequired -func NewBACnetConstructedDataLifeSafetyZoneMaintenanceRequired(maintenanceRequired BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLifeSafetyZoneMaintenanceRequired { +func NewBACnetConstructedDataLifeSafetyZoneMaintenanceRequired( maintenanceRequired BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLifeSafetyZoneMaintenanceRequired { _result := &_BACnetConstructedDataLifeSafetyZoneMaintenanceRequired{ - MaintenanceRequired: maintenanceRequired, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + MaintenanceRequired: maintenanceRequired, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLifeSafetyZoneMaintenanceRequired(maintenanceRequir // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLifeSafetyZoneMaintenanceRequired(structType interface{}) BACnetConstructedDataLifeSafetyZoneMaintenanceRequired { - if casted, ok := structType.(BACnetConstructedDataLifeSafetyZoneMaintenanceRequired); ok { + if casted, ok := structType.(BACnetConstructedDataLifeSafetyZoneMaintenanceRequired); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLifeSafetyZoneMaintenanceRequired); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLifeSafetyZoneMaintenanceRequired) GetLengthInBit return lengthInBits } + func (m *_BACnetConstructedDataLifeSafetyZoneMaintenanceRequired) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLifeSafetyZoneMaintenanceRequiredParseWithBuffer(ctx c if pullErr := readBuffer.PullContext("maintenanceRequired"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for maintenanceRequired") } - _maintenanceRequired, _maintenanceRequiredErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_maintenanceRequired, _maintenanceRequiredErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _maintenanceRequiredErr != nil { return nil, errors.Wrap(_maintenanceRequiredErr, "Error parsing 'maintenanceRequired' field of BACnetConstructedDataLifeSafetyZoneMaintenanceRequired") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLifeSafetyZoneMaintenanceRequiredParseWithBuffer(ctx c // Create a partially initialized instance _child := &_BACnetConstructedDataLifeSafetyZoneMaintenanceRequired{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, MaintenanceRequired: maintenanceRequired, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLifeSafetyZoneMaintenanceRequired) SerializeWithW return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLifeSafetyZoneMaintenanceRequired") } - // Simple Field (maintenanceRequired) - if pushErr := writeBuffer.PushContext("maintenanceRequired"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for maintenanceRequired") - } - _maintenanceRequiredErr := writeBuffer.WriteSerializable(ctx, m.GetMaintenanceRequired()) - if popErr := writeBuffer.PopContext("maintenanceRequired"); popErr != nil { - return errors.Wrap(popErr, "Error popping for maintenanceRequired") - } - if _maintenanceRequiredErr != nil { - return errors.Wrap(_maintenanceRequiredErr, "Error serializing 'maintenanceRequired' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (maintenanceRequired) + if pushErr := writeBuffer.PushContext("maintenanceRequired"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for maintenanceRequired") + } + _maintenanceRequiredErr := writeBuffer.WriteSerializable(ctx, m.GetMaintenanceRequired()) + if popErr := writeBuffer.PopContext("maintenanceRequired"); popErr != nil { + return errors.Wrap(popErr, "Error popping for maintenanceRequired") + } + if _maintenanceRequiredErr != nil { + return errors.Wrap(_maintenanceRequiredErr, "Error serializing 'maintenanceRequired' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLifeSafetyZoneMaintenanceRequired"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLifeSafetyZoneMaintenanceRequired") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLifeSafetyZoneMaintenanceRequired) SerializeWithW return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLifeSafetyZoneMaintenanceRequired) isBACnetConstructedDataLifeSafetyZoneMaintenanceRequired() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLifeSafetyZoneMaintenanceRequired) String() strin } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLifeSafetyZonePresentValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLifeSafetyZonePresentValue.go index 09e7f0c57aa..4157f66f2c3 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLifeSafetyZonePresentValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLifeSafetyZonePresentValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLifeSafetyZonePresentValue is the corresponding interface of BACnetConstructedDataLifeSafetyZonePresentValue type BACnetConstructedDataLifeSafetyZonePresentValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLifeSafetyZonePresentValueExactly interface { // _BACnetConstructedDataLifeSafetyZonePresentValue is the data-structure of this message type _BACnetConstructedDataLifeSafetyZonePresentValue struct { *_BACnetConstructedData - PresentValue BACnetLifeSafetyStateTagged + PresentValue BACnetLifeSafetyStateTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLifeSafetyZonePresentValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_LIFE_SAFETY_ZONE -} +func (m *_BACnetConstructedDataLifeSafetyZonePresentValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_LIFE_SAFETY_ZONE} -func (m *_BACnetConstructedDataLifeSafetyZonePresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PRESENT_VALUE -} +func (m *_BACnetConstructedDataLifeSafetyZonePresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PRESENT_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLifeSafetyZonePresentValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLifeSafetyZonePresentValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLifeSafetyZonePresentValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLifeSafetyZonePresentValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLifeSafetyZonePresentValue) GetActualValue() BACn /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLifeSafetyZonePresentValue factory function for _BACnetConstructedDataLifeSafetyZonePresentValue -func NewBACnetConstructedDataLifeSafetyZonePresentValue(presentValue BACnetLifeSafetyStateTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLifeSafetyZonePresentValue { +func NewBACnetConstructedDataLifeSafetyZonePresentValue( presentValue BACnetLifeSafetyStateTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLifeSafetyZonePresentValue { _result := &_BACnetConstructedDataLifeSafetyZonePresentValue{ - PresentValue: presentValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PresentValue: presentValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLifeSafetyZonePresentValue(presentValue BACnetLifeS // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLifeSafetyZonePresentValue(structType interface{}) BACnetConstructedDataLifeSafetyZonePresentValue { - if casted, ok := structType.(BACnetConstructedDataLifeSafetyZonePresentValue); ok { + if casted, ok := structType.(BACnetConstructedDataLifeSafetyZonePresentValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLifeSafetyZonePresentValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLifeSafetyZonePresentValue) GetLengthInBits(ctx c return lengthInBits } + func (m *_BACnetConstructedDataLifeSafetyZonePresentValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLifeSafetyZonePresentValueParseWithBuffer(ctx context. if pullErr := readBuffer.PullContext("presentValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for presentValue") } - _presentValue, _presentValueErr := BACnetLifeSafetyStateTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_presentValue, _presentValueErr := BACnetLifeSafetyStateTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _presentValueErr != nil { return nil, errors.Wrap(_presentValueErr, "Error parsing 'presentValue' field of BACnetConstructedDataLifeSafetyZonePresentValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLifeSafetyZonePresentValueParseWithBuffer(ctx context. // Create a partially initialized instance _child := &_BACnetConstructedDataLifeSafetyZonePresentValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PresentValue: presentValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLifeSafetyZonePresentValue) SerializeWithWriteBuf return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLifeSafetyZonePresentValue") } - // Simple Field (presentValue) - if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for presentValue") - } - _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) - if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for presentValue") - } - if _presentValueErr != nil { - return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (presentValue) + if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for presentValue") + } + _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) + if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for presentValue") + } + if _presentValueErr != nil { + return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLifeSafetyZonePresentValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLifeSafetyZonePresentValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLifeSafetyZonePresentValue) SerializeWithWriteBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLifeSafetyZonePresentValue) isBACnetConstructedDataLifeSafetyZonePresentValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLifeSafetyZonePresentValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLiftAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLiftAll.go index fa68948c8e0..9c2a5144042 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLiftAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLiftAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLiftAll is the corresponding interface of BACnetConstructedDataLiftAll type BACnetConstructedDataLiftAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataLiftAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLiftAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_LIFT -} +func (m *_BACnetConstructedDataLiftAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_LIFT} -func (m *_BACnetConstructedDataLiftAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataLiftAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLiftAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLiftAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLiftAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLiftAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataLiftAll factory function for _BACnetConstructedDataLiftAll -func NewBACnetConstructedDataLiftAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLiftAll { +func NewBACnetConstructedDataLiftAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLiftAll { _result := &_BACnetConstructedDataLiftAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataLiftAll(openingTag BACnetOpeningTag, peekedTagHeade // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLiftAll(structType interface{}) BACnetConstructedDataLiftAll { - if casted, ok := structType.(BACnetConstructedDataLiftAll); ok { + if casted, ok := structType.(BACnetConstructedDataLiftAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLiftAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataLiftAll) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_BACnetConstructedDataLiftAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataLiftAllParseWithBuffer(ctx context.Context, readBuffer _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataLiftAllParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_BACnetConstructedDataLiftAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataLiftAll) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLiftAll) isBACnetConstructedDataLiftAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataLiftAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLiftFaultSignals.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLiftFaultSignals.go index df762604e74..a6444fd7e7f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLiftFaultSignals.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLiftFaultSignals.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLiftFaultSignals is the corresponding interface of BACnetConstructedDataLiftFaultSignals type BACnetConstructedDataLiftFaultSignals interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataLiftFaultSignalsExactly interface { // _BACnetConstructedDataLiftFaultSignals is the data-structure of this message type _BACnetConstructedDataLiftFaultSignals struct { *_BACnetConstructedData - FaultSignals []BACnetLiftFaultTagged + FaultSignals []BACnetLiftFaultTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLiftFaultSignals) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_LIFT -} +func (m *_BACnetConstructedDataLiftFaultSignals) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_LIFT} -func (m *_BACnetConstructedDataLiftFaultSignals) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FAULT_SIGNALS -} +func (m *_BACnetConstructedDataLiftFaultSignals) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FAULT_SIGNALS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLiftFaultSignals) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLiftFaultSignals) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLiftFaultSignals) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLiftFaultSignals) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataLiftFaultSignals) GetFaultSignals() []BACnetLiftF /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLiftFaultSignals factory function for _BACnetConstructedDataLiftFaultSignals -func NewBACnetConstructedDataLiftFaultSignals(faultSignals []BACnetLiftFaultTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLiftFaultSignals { +func NewBACnetConstructedDataLiftFaultSignals( faultSignals []BACnetLiftFaultTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLiftFaultSignals { _result := &_BACnetConstructedDataLiftFaultSignals{ - FaultSignals: faultSignals, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + FaultSignals: faultSignals, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataLiftFaultSignals(faultSignals []BACnetLiftFaultTagg // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLiftFaultSignals(structType interface{}) BACnetConstructedDataLiftFaultSignals { - if casted, ok := structType.(BACnetConstructedDataLiftFaultSignals); ok { + if casted, ok := structType.(BACnetConstructedDataLiftFaultSignals); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLiftFaultSignals); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataLiftFaultSignals) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetConstructedDataLiftFaultSignals) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataLiftFaultSignalsParseWithBuffer(ctx context.Context, r // Terminated array var faultSignals []BACnetLiftFaultTagged { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetLiftFaultTaggedParseWithBuffer(ctx, readBuffer, uint8(0), TagClass_APPLICATION_TAGS) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetLiftFaultTaggedParseWithBuffer(ctx, readBuffer , uint8(0) , TagClass_APPLICATION_TAGS ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'faultSignals' field of BACnetConstructedDataLiftFaultSignals") } @@ -173,7 +175,7 @@ func BACnetConstructedDataLiftFaultSignalsParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_BACnetConstructedDataLiftFaultSignals{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FaultSignals: faultSignals, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataLiftFaultSignals) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLiftFaultSignals") } - // Array Field (faultSignals) - if pushErr := writeBuffer.PushContext("faultSignals", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for faultSignals") - } - for _curItem, _element := range m.GetFaultSignals() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetFaultSignals()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'faultSignals' field") - } - } - if popErr := writeBuffer.PopContext("faultSignals", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for faultSignals") + // Array Field (faultSignals) + if pushErr := writeBuffer.PushContext("faultSignals", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for faultSignals") + } + for _curItem, _element := range m.GetFaultSignals() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetFaultSignals()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'faultSignals' field") } + } + if popErr := writeBuffer.PopContext("faultSignals", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for faultSignals") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLiftFaultSignals"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLiftFaultSignals") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataLiftFaultSignals) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLiftFaultSignals) isBACnetConstructedDataLiftFaultSignals() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataLiftFaultSignals) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLightingCommand.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLightingCommand.go index 419ec51d71a..0e911713307 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLightingCommand.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLightingCommand.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLightingCommand is the corresponding interface of BACnetConstructedDataLightingCommand type BACnetConstructedDataLightingCommand interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLightingCommandExactly interface { // _BACnetConstructedDataLightingCommand is the data-structure of this message type _BACnetConstructedDataLightingCommand struct { *_BACnetConstructedData - LightingCommand BACnetLightingCommand + LightingCommand BACnetLightingCommand } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLightingCommand) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLightingCommand) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLightingCommand) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LIGHTING_COMMAND -} +func (m *_BACnetConstructedDataLightingCommand) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LIGHTING_COMMAND} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLightingCommand) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLightingCommand) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLightingCommand) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLightingCommand) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLightingCommand) GetActualValue() BACnetLightingC /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLightingCommand factory function for _BACnetConstructedDataLightingCommand -func NewBACnetConstructedDataLightingCommand(lightingCommand BACnetLightingCommand, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLightingCommand { +func NewBACnetConstructedDataLightingCommand( lightingCommand BACnetLightingCommand , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLightingCommand { _result := &_BACnetConstructedDataLightingCommand{ - LightingCommand: lightingCommand, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + LightingCommand: lightingCommand, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLightingCommand(lightingCommand BACnetLightingComma // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLightingCommand(structType interface{}) BACnetConstructedDataLightingCommand { - if casted, ok := structType.(BACnetConstructedDataLightingCommand); ok { + if casted, ok := structType.(BACnetConstructedDataLightingCommand); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLightingCommand); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLightingCommand) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetConstructedDataLightingCommand) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLightingCommandParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("lightingCommand"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lightingCommand") } - _lightingCommand, _lightingCommandErr := BACnetLightingCommandParseWithBuffer(ctx, readBuffer) +_lightingCommand, _lightingCommandErr := BACnetLightingCommandParseWithBuffer(ctx, readBuffer) if _lightingCommandErr != nil { return nil, errors.Wrap(_lightingCommandErr, "Error parsing 'lightingCommand' field of BACnetConstructedDataLightingCommand") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLightingCommandParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetConstructedDataLightingCommand{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LightingCommand: lightingCommand, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLightingCommand) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLightingCommand") } - // Simple Field (lightingCommand) - if pushErr := writeBuffer.PushContext("lightingCommand"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lightingCommand") - } - _lightingCommandErr := writeBuffer.WriteSerializable(ctx, m.GetLightingCommand()) - if popErr := writeBuffer.PopContext("lightingCommand"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lightingCommand") - } - if _lightingCommandErr != nil { - return errors.Wrap(_lightingCommandErr, "Error serializing 'lightingCommand' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (lightingCommand) + if pushErr := writeBuffer.PushContext("lightingCommand"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lightingCommand") + } + _lightingCommandErr := writeBuffer.WriteSerializable(ctx, m.GetLightingCommand()) + if popErr := writeBuffer.PopContext("lightingCommand"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lightingCommand") + } + if _lightingCommandErr != nil { + return errors.Wrap(_lightingCommandErr, "Error serializing 'lightingCommand' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLightingCommand"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLightingCommand") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLightingCommand) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLightingCommand) isBACnetConstructedDataLightingCommand() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLightingCommand) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLightingCommandDefaultPriority.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLightingCommandDefaultPriority.go index 5f5a53a1eb7..910b03ad030 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLightingCommandDefaultPriority.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLightingCommandDefaultPriority.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLightingCommandDefaultPriority is the corresponding interface of BACnetConstructedDataLightingCommandDefaultPriority type BACnetConstructedDataLightingCommandDefaultPriority interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLightingCommandDefaultPriorityExactly interface { // _BACnetConstructedDataLightingCommandDefaultPriority is the data-structure of this message type _BACnetConstructedDataLightingCommandDefaultPriority struct { *_BACnetConstructedData - LightingCommandDefaultPriority BACnetApplicationTagUnsignedInteger + LightingCommandDefaultPriority BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLightingCommandDefaultPriority) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLightingCommandDefaultPriority) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLightingCommandDefaultPriority) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LIGHTING_COMMAND_DEFAULT_PRIORITY -} +func (m *_BACnetConstructedDataLightingCommandDefaultPriority) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LIGHTING_COMMAND_DEFAULT_PRIORITY} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLightingCommandDefaultPriority) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLightingCommandDefaultPriority) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLightingCommandDefaultPriority) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLightingCommandDefaultPriority) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLightingCommandDefaultPriority) GetActualValue() /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLightingCommandDefaultPriority factory function for _BACnetConstructedDataLightingCommandDefaultPriority -func NewBACnetConstructedDataLightingCommandDefaultPriority(lightingCommandDefaultPriority BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLightingCommandDefaultPriority { +func NewBACnetConstructedDataLightingCommandDefaultPriority( lightingCommandDefaultPriority BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLightingCommandDefaultPriority { _result := &_BACnetConstructedDataLightingCommandDefaultPriority{ LightingCommandDefaultPriority: lightingCommandDefaultPriority, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLightingCommandDefaultPriority(lightingCommandDefau // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLightingCommandDefaultPriority(structType interface{}) BACnetConstructedDataLightingCommandDefaultPriority { - if casted, ok := structType.(BACnetConstructedDataLightingCommandDefaultPriority); ok { + if casted, ok := structType.(BACnetConstructedDataLightingCommandDefaultPriority); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLightingCommandDefaultPriority); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLightingCommandDefaultPriority) GetLengthInBits(c return lengthInBits } + func (m *_BACnetConstructedDataLightingCommandDefaultPriority) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLightingCommandDefaultPriorityParseWithBuffer(ctx cont if pullErr := readBuffer.PullContext("lightingCommandDefaultPriority"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lightingCommandDefaultPriority") } - _lightingCommandDefaultPriority, _lightingCommandDefaultPriorityErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_lightingCommandDefaultPriority, _lightingCommandDefaultPriorityErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _lightingCommandDefaultPriorityErr != nil { return nil, errors.Wrap(_lightingCommandDefaultPriorityErr, "Error parsing 'lightingCommandDefaultPriority' field of BACnetConstructedDataLightingCommandDefaultPriority") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLightingCommandDefaultPriorityParseWithBuffer(ctx cont // Create a partially initialized instance _child := &_BACnetConstructedDataLightingCommandDefaultPriority{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LightingCommandDefaultPriority: lightingCommandDefaultPriority, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLightingCommandDefaultPriority) SerializeWithWrit return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLightingCommandDefaultPriority") } - // Simple Field (lightingCommandDefaultPriority) - if pushErr := writeBuffer.PushContext("lightingCommandDefaultPriority"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lightingCommandDefaultPriority") - } - _lightingCommandDefaultPriorityErr := writeBuffer.WriteSerializable(ctx, m.GetLightingCommandDefaultPriority()) - if popErr := writeBuffer.PopContext("lightingCommandDefaultPriority"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lightingCommandDefaultPriority") - } - if _lightingCommandDefaultPriorityErr != nil { - return errors.Wrap(_lightingCommandDefaultPriorityErr, "Error serializing 'lightingCommandDefaultPriority' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (lightingCommandDefaultPriority) + if pushErr := writeBuffer.PushContext("lightingCommandDefaultPriority"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lightingCommandDefaultPriority") + } + _lightingCommandDefaultPriorityErr := writeBuffer.WriteSerializable(ctx, m.GetLightingCommandDefaultPriority()) + if popErr := writeBuffer.PopContext("lightingCommandDefaultPriority"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lightingCommandDefaultPriority") + } + if _lightingCommandDefaultPriorityErr != nil { + return errors.Wrap(_lightingCommandDefaultPriorityErr, "Error serializing 'lightingCommandDefaultPriority' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLightingCommandDefaultPriority"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLightingCommandDefaultPriority") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLightingCommandDefaultPriority) SerializeWithWrit return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLightingCommandDefaultPriority) isBACnetConstructedDataLightingCommandDefaultPriority() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLightingCommandDefaultPriority) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLightingOutputAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLightingOutputAll.go index ca9731d3be0..11d583115ba 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLightingOutputAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLightingOutputAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLightingOutputAll is the corresponding interface of BACnetConstructedDataLightingOutputAll type BACnetConstructedDataLightingOutputAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataLightingOutputAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLightingOutputAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_LIGHTING_OUTPUT -} +func (m *_BACnetConstructedDataLightingOutputAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_LIGHTING_OUTPUT} -func (m *_BACnetConstructedDataLightingOutputAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataLightingOutputAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLightingOutputAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLightingOutputAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLightingOutputAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLightingOutputAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataLightingOutputAll factory function for _BACnetConstructedDataLightingOutputAll -func NewBACnetConstructedDataLightingOutputAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLightingOutputAll { +func NewBACnetConstructedDataLightingOutputAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLightingOutputAll { _result := &_BACnetConstructedDataLightingOutputAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataLightingOutputAll(openingTag BACnetOpeningTag, peek // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLightingOutputAll(structType interface{}) BACnetConstructedDataLightingOutputAll { - if casted, ok := structType.(BACnetConstructedDataLightingOutputAll); ok { + if casted, ok := structType.(BACnetConstructedDataLightingOutputAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLightingOutputAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataLightingOutputAll) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetConstructedDataLightingOutputAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataLightingOutputAllParseWithBuffer(ctx context.Context, _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataLightingOutputAllParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataLightingOutputAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataLightingOutputAll) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLightingOutputAll) isBACnetConstructedDataLightingOutputAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataLightingOutputAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLightingOutputFeedbackValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLightingOutputFeedbackValue.go index 141b421a638..7448cbbe267 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLightingOutputFeedbackValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLightingOutputFeedbackValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLightingOutputFeedbackValue is the corresponding interface of BACnetConstructedDataLightingOutputFeedbackValue type BACnetConstructedDataLightingOutputFeedbackValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLightingOutputFeedbackValueExactly interface { // _BACnetConstructedDataLightingOutputFeedbackValue is the data-structure of this message type _BACnetConstructedDataLightingOutputFeedbackValue struct { *_BACnetConstructedData - FeedbackValue BACnetApplicationTagReal + FeedbackValue BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLightingOutputFeedbackValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_LIGHTING_OUTPUT -} +func (m *_BACnetConstructedDataLightingOutputFeedbackValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_LIGHTING_OUTPUT} -func (m *_BACnetConstructedDataLightingOutputFeedbackValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FEEDBACK_VALUE -} +func (m *_BACnetConstructedDataLightingOutputFeedbackValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FEEDBACK_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLightingOutputFeedbackValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLightingOutputFeedbackValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLightingOutputFeedbackValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLightingOutputFeedbackValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLightingOutputFeedbackValue) GetActualValue() BAC /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLightingOutputFeedbackValue factory function for _BACnetConstructedDataLightingOutputFeedbackValue -func NewBACnetConstructedDataLightingOutputFeedbackValue(feedbackValue BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLightingOutputFeedbackValue { +func NewBACnetConstructedDataLightingOutputFeedbackValue( feedbackValue BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLightingOutputFeedbackValue { _result := &_BACnetConstructedDataLightingOutputFeedbackValue{ - FeedbackValue: feedbackValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + FeedbackValue: feedbackValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLightingOutputFeedbackValue(feedbackValue BACnetApp // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLightingOutputFeedbackValue(structType interface{}) BACnetConstructedDataLightingOutputFeedbackValue { - if casted, ok := structType.(BACnetConstructedDataLightingOutputFeedbackValue); ok { + if casted, ok := structType.(BACnetConstructedDataLightingOutputFeedbackValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLightingOutputFeedbackValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLightingOutputFeedbackValue) GetLengthInBits(ctx return lengthInBits } + func (m *_BACnetConstructedDataLightingOutputFeedbackValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLightingOutputFeedbackValueParseWithBuffer(ctx context if pullErr := readBuffer.PullContext("feedbackValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for feedbackValue") } - _feedbackValue, _feedbackValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_feedbackValue, _feedbackValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _feedbackValueErr != nil { return nil, errors.Wrap(_feedbackValueErr, "Error parsing 'feedbackValue' field of BACnetConstructedDataLightingOutputFeedbackValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLightingOutputFeedbackValueParseWithBuffer(ctx context // Create a partially initialized instance _child := &_BACnetConstructedDataLightingOutputFeedbackValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FeedbackValue: feedbackValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLightingOutputFeedbackValue) SerializeWithWriteBu return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLightingOutputFeedbackValue") } - // Simple Field (feedbackValue) - if pushErr := writeBuffer.PushContext("feedbackValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for feedbackValue") - } - _feedbackValueErr := writeBuffer.WriteSerializable(ctx, m.GetFeedbackValue()) - if popErr := writeBuffer.PopContext("feedbackValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for feedbackValue") - } - if _feedbackValueErr != nil { - return errors.Wrap(_feedbackValueErr, "Error serializing 'feedbackValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (feedbackValue) + if pushErr := writeBuffer.PushContext("feedbackValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for feedbackValue") + } + _feedbackValueErr := writeBuffer.WriteSerializable(ctx, m.GetFeedbackValue()) + if popErr := writeBuffer.PopContext("feedbackValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for feedbackValue") + } + if _feedbackValueErr != nil { + return errors.Wrap(_feedbackValueErr, "Error serializing 'feedbackValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLightingOutputFeedbackValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLightingOutputFeedbackValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLightingOutputFeedbackValue) SerializeWithWriteBu return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLightingOutputFeedbackValue) isBACnetConstructedDataLightingOutputFeedbackValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLightingOutputFeedbackValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLightingOutputPresentValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLightingOutputPresentValue.go index afdf29782bd..cfb74204df8 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLightingOutputPresentValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLightingOutputPresentValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLightingOutputPresentValue is the corresponding interface of BACnetConstructedDataLightingOutputPresentValue type BACnetConstructedDataLightingOutputPresentValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLightingOutputPresentValueExactly interface { // _BACnetConstructedDataLightingOutputPresentValue is the data-structure of this message type _BACnetConstructedDataLightingOutputPresentValue struct { *_BACnetConstructedData - PresentValue BACnetApplicationTagReal + PresentValue BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLightingOutputPresentValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_LIGHTING_OUTPUT -} +func (m *_BACnetConstructedDataLightingOutputPresentValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_LIGHTING_OUTPUT} -func (m *_BACnetConstructedDataLightingOutputPresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PRESENT_VALUE -} +func (m *_BACnetConstructedDataLightingOutputPresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PRESENT_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLightingOutputPresentValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLightingOutputPresentValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLightingOutputPresentValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLightingOutputPresentValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLightingOutputPresentValue) GetActualValue() BACn /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLightingOutputPresentValue factory function for _BACnetConstructedDataLightingOutputPresentValue -func NewBACnetConstructedDataLightingOutputPresentValue(presentValue BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLightingOutputPresentValue { +func NewBACnetConstructedDataLightingOutputPresentValue( presentValue BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLightingOutputPresentValue { _result := &_BACnetConstructedDataLightingOutputPresentValue{ - PresentValue: presentValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PresentValue: presentValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLightingOutputPresentValue(presentValue BACnetAppli // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLightingOutputPresentValue(structType interface{}) BACnetConstructedDataLightingOutputPresentValue { - if casted, ok := structType.(BACnetConstructedDataLightingOutputPresentValue); ok { + if casted, ok := structType.(BACnetConstructedDataLightingOutputPresentValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLightingOutputPresentValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLightingOutputPresentValue) GetLengthInBits(ctx c return lengthInBits } + func (m *_BACnetConstructedDataLightingOutputPresentValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLightingOutputPresentValueParseWithBuffer(ctx context. if pullErr := readBuffer.PullContext("presentValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for presentValue") } - _presentValue, _presentValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_presentValue, _presentValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _presentValueErr != nil { return nil, errors.Wrap(_presentValueErr, "Error parsing 'presentValue' field of BACnetConstructedDataLightingOutputPresentValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLightingOutputPresentValueParseWithBuffer(ctx context. // Create a partially initialized instance _child := &_BACnetConstructedDataLightingOutputPresentValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PresentValue: presentValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLightingOutputPresentValue) SerializeWithWriteBuf return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLightingOutputPresentValue") } - // Simple Field (presentValue) - if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for presentValue") - } - _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) - if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for presentValue") - } - if _presentValueErr != nil { - return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (presentValue) + if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for presentValue") + } + _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) + if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for presentValue") + } + if _presentValueErr != nil { + return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLightingOutputPresentValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLightingOutputPresentValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLightingOutputPresentValue) SerializeWithWriteBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLightingOutputPresentValue) isBACnetConstructedDataLightingOutputPresentValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLightingOutputPresentValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLightingOutputRelinquishDefault.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLightingOutputRelinquishDefault.go index 88b9b4c9ae7..f20bfdab547 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLightingOutputRelinquishDefault.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLightingOutputRelinquishDefault.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLightingOutputRelinquishDefault is the corresponding interface of BACnetConstructedDataLightingOutputRelinquishDefault type BACnetConstructedDataLightingOutputRelinquishDefault interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLightingOutputRelinquishDefaultExactly interface { // _BACnetConstructedDataLightingOutputRelinquishDefault is the data-structure of this message type _BACnetConstructedDataLightingOutputRelinquishDefault struct { *_BACnetConstructedData - RelinquishDefault BACnetApplicationTagReal + RelinquishDefault BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLightingOutputRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_LIGHTING_OUTPUT -} +func (m *_BACnetConstructedDataLightingOutputRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_LIGHTING_OUTPUT} -func (m *_BACnetConstructedDataLightingOutputRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_RELINQUISH_DEFAULT -} +func (m *_BACnetConstructedDataLightingOutputRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_RELINQUISH_DEFAULT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLightingOutputRelinquishDefault) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLightingOutputRelinquishDefault) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLightingOutputRelinquishDefault) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLightingOutputRelinquishDefault) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLightingOutputRelinquishDefault) GetActualValue() /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLightingOutputRelinquishDefault factory function for _BACnetConstructedDataLightingOutputRelinquishDefault -func NewBACnetConstructedDataLightingOutputRelinquishDefault(relinquishDefault BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLightingOutputRelinquishDefault { +func NewBACnetConstructedDataLightingOutputRelinquishDefault( relinquishDefault BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLightingOutputRelinquishDefault { _result := &_BACnetConstructedDataLightingOutputRelinquishDefault{ - RelinquishDefault: relinquishDefault, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + RelinquishDefault: relinquishDefault, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLightingOutputRelinquishDefault(relinquishDefault B // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLightingOutputRelinquishDefault(structType interface{}) BACnetConstructedDataLightingOutputRelinquishDefault { - if casted, ok := structType.(BACnetConstructedDataLightingOutputRelinquishDefault); ok { + if casted, ok := structType.(BACnetConstructedDataLightingOutputRelinquishDefault); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLightingOutputRelinquishDefault); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLightingOutputRelinquishDefault) GetLengthInBits( return lengthInBits } + func (m *_BACnetConstructedDataLightingOutputRelinquishDefault) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLightingOutputRelinquishDefaultParseWithBuffer(ctx con if pullErr := readBuffer.PullContext("relinquishDefault"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for relinquishDefault") } - _relinquishDefault, _relinquishDefaultErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_relinquishDefault, _relinquishDefaultErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _relinquishDefaultErr != nil { return nil, errors.Wrap(_relinquishDefaultErr, "Error parsing 'relinquishDefault' field of BACnetConstructedDataLightingOutputRelinquishDefault") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLightingOutputRelinquishDefaultParseWithBuffer(ctx con // Create a partially initialized instance _child := &_BACnetConstructedDataLightingOutputRelinquishDefault{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, RelinquishDefault: relinquishDefault, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLightingOutputRelinquishDefault) SerializeWithWri return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLightingOutputRelinquishDefault") } - // Simple Field (relinquishDefault) - if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for relinquishDefault") - } - _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) - if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { - return errors.Wrap(popErr, "Error popping for relinquishDefault") - } - if _relinquishDefaultErr != nil { - return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (relinquishDefault) + if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for relinquishDefault") + } + _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) + if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { + return errors.Wrap(popErr, "Error popping for relinquishDefault") + } + if _relinquishDefaultErr != nil { + return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLightingOutputRelinquishDefault"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLightingOutputRelinquishDefault") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLightingOutputRelinquishDefault) SerializeWithWri return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLightingOutputRelinquishDefault) isBACnetConstructedDataLightingOutputRelinquishDefault() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLightingOutputRelinquishDefault) String() string } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLightingOutputTrackingValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLightingOutputTrackingValue.go index b67382b1ec2..48bfd509891 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLightingOutputTrackingValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLightingOutputTrackingValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLightingOutputTrackingValue is the corresponding interface of BACnetConstructedDataLightingOutputTrackingValue type BACnetConstructedDataLightingOutputTrackingValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLightingOutputTrackingValueExactly interface { // _BACnetConstructedDataLightingOutputTrackingValue is the data-structure of this message type _BACnetConstructedDataLightingOutputTrackingValue struct { *_BACnetConstructedData - TrackingValue BACnetApplicationTagReal + TrackingValue BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLightingOutputTrackingValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_LIGHTING_OUTPUT -} +func (m *_BACnetConstructedDataLightingOutputTrackingValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_LIGHTING_OUTPUT} -func (m *_BACnetConstructedDataLightingOutputTrackingValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_TRACKING_VALUE -} +func (m *_BACnetConstructedDataLightingOutputTrackingValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_TRACKING_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLightingOutputTrackingValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLightingOutputTrackingValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLightingOutputTrackingValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLightingOutputTrackingValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLightingOutputTrackingValue) GetActualValue() BAC /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLightingOutputTrackingValue factory function for _BACnetConstructedDataLightingOutputTrackingValue -func NewBACnetConstructedDataLightingOutputTrackingValue(trackingValue BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLightingOutputTrackingValue { +func NewBACnetConstructedDataLightingOutputTrackingValue( trackingValue BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLightingOutputTrackingValue { _result := &_BACnetConstructedDataLightingOutputTrackingValue{ - TrackingValue: trackingValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + TrackingValue: trackingValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLightingOutputTrackingValue(trackingValue BACnetApp // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLightingOutputTrackingValue(structType interface{}) BACnetConstructedDataLightingOutputTrackingValue { - if casted, ok := structType.(BACnetConstructedDataLightingOutputTrackingValue); ok { + if casted, ok := structType.(BACnetConstructedDataLightingOutputTrackingValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLightingOutputTrackingValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLightingOutputTrackingValue) GetLengthInBits(ctx return lengthInBits } + func (m *_BACnetConstructedDataLightingOutputTrackingValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLightingOutputTrackingValueParseWithBuffer(ctx context if pullErr := readBuffer.PullContext("trackingValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for trackingValue") } - _trackingValue, _trackingValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_trackingValue, _trackingValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _trackingValueErr != nil { return nil, errors.Wrap(_trackingValueErr, "Error parsing 'trackingValue' field of BACnetConstructedDataLightingOutputTrackingValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLightingOutputTrackingValueParseWithBuffer(ctx context // Create a partially initialized instance _child := &_BACnetConstructedDataLightingOutputTrackingValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, TrackingValue: trackingValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLightingOutputTrackingValue) SerializeWithWriteBu return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLightingOutputTrackingValue") } - // Simple Field (trackingValue) - if pushErr := writeBuffer.PushContext("trackingValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for trackingValue") - } - _trackingValueErr := writeBuffer.WriteSerializable(ctx, m.GetTrackingValue()) - if popErr := writeBuffer.PopContext("trackingValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for trackingValue") - } - if _trackingValueErr != nil { - return errors.Wrap(_trackingValueErr, "Error serializing 'trackingValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (trackingValue) + if pushErr := writeBuffer.PushContext("trackingValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for trackingValue") + } + _trackingValueErr := writeBuffer.WriteSerializable(ctx, m.GetTrackingValue()) + if popErr := writeBuffer.PopContext("trackingValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for trackingValue") + } + if _trackingValueErr != nil { + return errors.Wrap(_trackingValueErr, "Error serializing 'trackingValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLightingOutputTrackingValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLightingOutputTrackingValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLightingOutputTrackingValue) SerializeWithWriteBu return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLightingOutputTrackingValue) isBACnetConstructedDataLightingOutputTrackingValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLightingOutputTrackingValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLimitEnable.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLimitEnable.go index 549d0af6d38..927fc7856ac 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLimitEnable.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLimitEnable.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLimitEnable is the corresponding interface of BACnetConstructedDataLimitEnable type BACnetConstructedDataLimitEnable interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLimitEnableExactly interface { // _BACnetConstructedDataLimitEnable is the data-structure of this message type _BACnetConstructedDataLimitEnable struct { *_BACnetConstructedData - LimitEnable BACnetLimitEnableTagged + LimitEnable BACnetLimitEnableTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLimitEnable) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLimitEnable) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLimitEnable) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LIMIT_ENABLE -} +func (m *_BACnetConstructedDataLimitEnable) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LIMIT_ENABLE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLimitEnable) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLimitEnable) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLimitEnable) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLimitEnable) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLimitEnable) GetActualValue() BACnetLimitEnableTa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLimitEnable factory function for _BACnetConstructedDataLimitEnable -func NewBACnetConstructedDataLimitEnable(limitEnable BACnetLimitEnableTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLimitEnable { +func NewBACnetConstructedDataLimitEnable( limitEnable BACnetLimitEnableTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLimitEnable { _result := &_BACnetConstructedDataLimitEnable{ - LimitEnable: limitEnable, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + LimitEnable: limitEnable, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLimitEnable(limitEnable BACnetLimitEnableTagged, op // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLimitEnable(structType interface{}) BACnetConstructedDataLimitEnable { - if casted, ok := structType.(BACnetConstructedDataLimitEnable); ok { + if casted, ok := structType.(BACnetConstructedDataLimitEnable); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLimitEnable); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLimitEnable) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataLimitEnable) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLimitEnableParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("limitEnable"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for limitEnable") } - _limitEnable, _limitEnableErr := BACnetLimitEnableTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_limitEnable, _limitEnableErr := BACnetLimitEnableTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _limitEnableErr != nil { return nil, errors.Wrap(_limitEnableErr, "Error parsing 'limitEnable' field of BACnetConstructedDataLimitEnable") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLimitEnableParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataLimitEnable{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LimitEnable: limitEnable, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLimitEnable) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLimitEnable") } - // Simple Field (limitEnable) - if pushErr := writeBuffer.PushContext("limitEnable"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for limitEnable") - } - _limitEnableErr := writeBuffer.WriteSerializable(ctx, m.GetLimitEnable()) - if popErr := writeBuffer.PopContext("limitEnable"); popErr != nil { - return errors.Wrap(popErr, "Error popping for limitEnable") - } - if _limitEnableErr != nil { - return errors.Wrap(_limitEnableErr, "Error serializing 'limitEnable' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (limitEnable) + if pushErr := writeBuffer.PushContext("limitEnable"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for limitEnable") + } + _limitEnableErr := writeBuffer.WriteSerializable(ctx, m.GetLimitEnable()) + if popErr := writeBuffer.PopContext("limitEnable"); popErr != nil { + return errors.Wrap(popErr, "Error popping for limitEnable") + } + if _limitEnableErr != nil { + return errors.Wrap(_limitEnableErr, "Error serializing 'limitEnable' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLimitEnable"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLimitEnable") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLimitEnable) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLimitEnable) isBACnetConstructedDataLimitEnable() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLimitEnable) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLimitMonitoringInterval.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLimitMonitoringInterval.go index 7f152597269..341a5ccf80d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLimitMonitoringInterval.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLimitMonitoringInterval.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLimitMonitoringInterval is the corresponding interface of BACnetConstructedDataLimitMonitoringInterval type BACnetConstructedDataLimitMonitoringInterval interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLimitMonitoringIntervalExactly interface { // _BACnetConstructedDataLimitMonitoringInterval is the data-structure of this message type _BACnetConstructedDataLimitMonitoringInterval struct { *_BACnetConstructedData - LimitMonitoringInterval BACnetApplicationTagUnsignedInteger + LimitMonitoringInterval BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLimitMonitoringInterval) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLimitMonitoringInterval) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLimitMonitoringInterval) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LIMIT_MONITORING_INTERVAL -} +func (m *_BACnetConstructedDataLimitMonitoringInterval) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LIMIT_MONITORING_INTERVAL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLimitMonitoringInterval) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLimitMonitoringInterval) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLimitMonitoringInterval) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLimitMonitoringInterval) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLimitMonitoringInterval) GetActualValue() BACnetA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLimitMonitoringInterval factory function for _BACnetConstructedDataLimitMonitoringInterval -func NewBACnetConstructedDataLimitMonitoringInterval(limitMonitoringInterval BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLimitMonitoringInterval { +func NewBACnetConstructedDataLimitMonitoringInterval( limitMonitoringInterval BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLimitMonitoringInterval { _result := &_BACnetConstructedDataLimitMonitoringInterval{ LimitMonitoringInterval: limitMonitoringInterval, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLimitMonitoringInterval(limitMonitoringInterval BAC // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLimitMonitoringInterval(structType interface{}) BACnetConstructedDataLimitMonitoringInterval { - if casted, ok := structType.(BACnetConstructedDataLimitMonitoringInterval); ok { + if casted, ok := structType.(BACnetConstructedDataLimitMonitoringInterval); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLimitMonitoringInterval); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLimitMonitoringInterval) GetLengthInBits(ctx cont return lengthInBits } + func (m *_BACnetConstructedDataLimitMonitoringInterval) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLimitMonitoringIntervalParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("limitMonitoringInterval"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for limitMonitoringInterval") } - _limitMonitoringInterval, _limitMonitoringIntervalErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_limitMonitoringInterval, _limitMonitoringIntervalErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _limitMonitoringIntervalErr != nil { return nil, errors.Wrap(_limitMonitoringIntervalErr, "Error parsing 'limitMonitoringInterval' field of BACnetConstructedDataLimitMonitoringInterval") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLimitMonitoringIntervalParseWithBuffer(ctx context.Con // Create a partially initialized instance _child := &_BACnetConstructedDataLimitMonitoringInterval{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LimitMonitoringInterval: limitMonitoringInterval, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLimitMonitoringInterval) SerializeWithWriteBuffer return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLimitMonitoringInterval") } - // Simple Field (limitMonitoringInterval) - if pushErr := writeBuffer.PushContext("limitMonitoringInterval"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for limitMonitoringInterval") - } - _limitMonitoringIntervalErr := writeBuffer.WriteSerializable(ctx, m.GetLimitMonitoringInterval()) - if popErr := writeBuffer.PopContext("limitMonitoringInterval"); popErr != nil { - return errors.Wrap(popErr, "Error popping for limitMonitoringInterval") - } - if _limitMonitoringIntervalErr != nil { - return errors.Wrap(_limitMonitoringIntervalErr, "Error serializing 'limitMonitoringInterval' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (limitMonitoringInterval) + if pushErr := writeBuffer.PushContext("limitMonitoringInterval"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for limitMonitoringInterval") + } + _limitMonitoringIntervalErr := writeBuffer.WriteSerializable(ctx, m.GetLimitMonitoringInterval()) + if popErr := writeBuffer.PopContext("limitMonitoringInterval"); popErr != nil { + return errors.Wrap(popErr, "Error popping for limitMonitoringInterval") + } + if _limitMonitoringIntervalErr != nil { + return errors.Wrap(_limitMonitoringIntervalErr, "Error serializing 'limitMonitoringInterval' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLimitMonitoringInterval"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLimitMonitoringInterval") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLimitMonitoringInterval) SerializeWithWriteBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLimitMonitoringInterval) isBACnetConstructedDataLimitMonitoringInterval() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLimitMonitoringInterval) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLinkSpeed.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLinkSpeed.go index 3d049b47e84..984d16e286e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLinkSpeed.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLinkSpeed.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLinkSpeed is the corresponding interface of BACnetConstructedDataLinkSpeed type BACnetConstructedDataLinkSpeed interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLinkSpeedExactly interface { // _BACnetConstructedDataLinkSpeed is the data-structure of this message type _BACnetConstructedDataLinkSpeed struct { *_BACnetConstructedData - LinkSpeed BACnetApplicationTagReal + LinkSpeed BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLinkSpeed) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLinkSpeed) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLinkSpeed) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LINK_SPEED -} +func (m *_BACnetConstructedDataLinkSpeed) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LINK_SPEED} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLinkSpeed) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLinkSpeed) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLinkSpeed) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLinkSpeed) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLinkSpeed) GetActualValue() BACnetApplicationTagR /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLinkSpeed factory function for _BACnetConstructedDataLinkSpeed -func NewBACnetConstructedDataLinkSpeed(linkSpeed BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLinkSpeed { +func NewBACnetConstructedDataLinkSpeed( linkSpeed BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLinkSpeed { _result := &_BACnetConstructedDataLinkSpeed{ - LinkSpeed: linkSpeed, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + LinkSpeed: linkSpeed, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLinkSpeed(linkSpeed BACnetApplicationTagReal, openi // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLinkSpeed(structType interface{}) BACnetConstructedDataLinkSpeed { - if casted, ok := structType.(BACnetConstructedDataLinkSpeed); ok { + if casted, ok := structType.(BACnetConstructedDataLinkSpeed); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLinkSpeed); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLinkSpeed) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetConstructedDataLinkSpeed) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLinkSpeedParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("linkSpeed"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for linkSpeed") } - _linkSpeed, _linkSpeedErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_linkSpeed, _linkSpeedErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _linkSpeedErr != nil { return nil, errors.Wrap(_linkSpeedErr, "Error parsing 'linkSpeed' field of BACnetConstructedDataLinkSpeed") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLinkSpeedParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_BACnetConstructedDataLinkSpeed{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LinkSpeed: linkSpeed, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLinkSpeed) SerializeWithWriteBuffer(ctx context.C return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLinkSpeed") } - // Simple Field (linkSpeed) - if pushErr := writeBuffer.PushContext("linkSpeed"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for linkSpeed") - } - _linkSpeedErr := writeBuffer.WriteSerializable(ctx, m.GetLinkSpeed()) - if popErr := writeBuffer.PopContext("linkSpeed"); popErr != nil { - return errors.Wrap(popErr, "Error popping for linkSpeed") - } - if _linkSpeedErr != nil { - return errors.Wrap(_linkSpeedErr, "Error serializing 'linkSpeed' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (linkSpeed) + if pushErr := writeBuffer.PushContext("linkSpeed"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for linkSpeed") + } + _linkSpeedErr := writeBuffer.WriteSerializable(ctx, m.GetLinkSpeed()) + if popErr := writeBuffer.PopContext("linkSpeed"); popErr != nil { + return errors.Wrap(popErr, "Error popping for linkSpeed") + } + if _linkSpeedErr != nil { + return errors.Wrap(_linkSpeedErr, "Error serializing 'linkSpeed' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLinkSpeed"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLinkSpeed") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLinkSpeed) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLinkSpeed) isBACnetConstructedDataLinkSpeed() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLinkSpeed) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLinkSpeedAutonegotiate.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLinkSpeedAutonegotiate.go index f340928edb6..24f62e4ecb4 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLinkSpeedAutonegotiate.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLinkSpeedAutonegotiate.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLinkSpeedAutonegotiate is the corresponding interface of BACnetConstructedDataLinkSpeedAutonegotiate type BACnetConstructedDataLinkSpeedAutonegotiate interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLinkSpeedAutonegotiateExactly interface { // _BACnetConstructedDataLinkSpeedAutonegotiate is the data-structure of this message type _BACnetConstructedDataLinkSpeedAutonegotiate struct { *_BACnetConstructedData - LinkSpeedAutonegotiate BACnetApplicationTagBoolean + LinkSpeedAutonegotiate BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLinkSpeedAutonegotiate) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLinkSpeedAutonegotiate) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLinkSpeedAutonegotiate) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LINK_SPEED_AUTONEGOTIATE -} +func (m *_BACnetConstructedDataLinkSpeedAutonegotiate) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LINK_SPEED_AUTONEGOTIATE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLinkSpeedAutonegotiate) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLinkSpeedAutonegotiate) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLinkSpeedAutonegotiate) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLinkSpeedAutonegotiate) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLinkSpeedAutonegotiate) GetActualValue() BACnetAp /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLinkSpeedAutonegotiate factory function for _BACnetConstructedDataLinkSpeedAutonegotiate -func NewBACnetConstructedDataLinkSpeedAutonegotiate(linkSpeedAutonegotiate BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLinkSpeedAutonegotiate { +func NewBACnetConstructedDataLinkSpeedAutonegotiate( linkSpeedAutonegotiate BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLinkSpeedAutonegotiate { _result := &_BACnetConstructedDataLinkSpeedAutonegotiate{ LinkSpeedAutonegotiate: linkSpeedAutonegotiate, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLinkSpeedAutonegotiate(linkSpeedAutonegotiate BACne // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLinkSpeedAutonegotiate(structType interface{}) BACnetConstructedDataLinkSpeedAutonegotiate { - if casted, ok := structType.(BACnetConstructedDataLinkSpeedAutonegotiate); ok { + if casted, ok := structType.(BACnetConstructedDataLinkSpeedAutonegotiate); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLinkSpeedAutonegotiate); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLinkSpeedAutonegotiate) GetLengthInBits(ctx conte return lengthInBits } + func (m *_BACnetConstructedDataLinkSpeedAutonegotiate) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLinkSpeedAutonegotiateParseWithBuffer(ctx context.Cont if pullErr := readBuffer.PullContext("linkSpeedAutonegotiate"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for linkSpeedAutonegotiate") } - _linkSpeedAutonegotiate, _linkSpeedAutonegotiateErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_linkSpeedAutonegotiate, _linkSpeedAutonegotiateErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _linkSpeedAutonegotiateErr != nil { return nil, errors.Wrap(_linkSpeedAutonegotiateErr, "Error parsing 'linkSpeedAutonegotiate' field of BACnetConstructedDataLinkSpeedAutonegotiate") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLinkSpeedAutonegotiateParseWithBuffer(ctx context.Cont // Create a partially initialized instance _child := &_BACnetConstructedDataLinkSpeedAutonegotiate{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LinkSpeedAutonegotiate: linkSpeedAutonegotiate, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLinkSpeedAutonegotiate) SerializeWithWriteBuffer( return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLinkSpeedAutonegotiate") } - // Simple Field (linkSpeedAutonegotiate) - if pushErr := writeBuffer.PushContext("linkSpeedAutonegotiate"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for linkSpeedAutonegotiate") - } - _linkSpeedAutonegotiateErr := writeBuffer.WriteSerializable(ctx, m.GetLinkSpeedAutonegotiate()) - if popErr := writeBuffer.PopContext("linkSpeedAutonegotiate"); popErr != nil { - return errors.Wrap(popErr, "Error popping for linkSpeedAutonegotiate") - } - if _linkSpeedAutonegotiateErr != nil { - return errors.Wrap(_linkSpeedAutonegotiateErr, "Error serializing 'linkSpeedAutonegotiate' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (linkSpeedAutonegotiate) + if pushErr := writeBuffer.PushContext("linkSpeedAutonegotiate"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for linkSpeedAutonegotiate") + } + _linkSpeedAutonegotiateErr := writeBuffer.WriteSerializable(ctx, m.GetLinkSpeedAutonegotiate()) + if popErr := writeBuffer.PopContext("linkSpeedAutonegotiate"); popErr != nil { + return errors.Wrap(popErr, "Error popping for linkSpeedAutonegotiate") + } + if _linkSpeedAutonegotiateErr != nil { + return errors.Wrap(_linkSpeedAutonegotiateErr, "Error serializing 'linkSpeedAutonegotiate' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLinkSpeedAutonegotiate"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLinkSpeedAutonegotiate") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLinkSpeedAutonegotiate) SerializeWithWriteBuffer( return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLinkSpeedAutonegotiate) isBACnetConstructedDataLinkSpeedAutonegotiate() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLinkSpeedAutonegotiate) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLinkSpeeds.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLinkSpeeds.go index adb9bdf4550..1cde364b053 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLinkSpeeds.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLinkSpeeds.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLinkSpeeds is the corresponding interface of BACnetConstructedDataLinkSpeeds type BACnetConstructedDataLinkSpeeds interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataLinkSpeedsExactly interface { // _BACnetConstructedDataLinkSpeeds is the data-structure of this message type _BACnetConstructedDataLinkSpeeds struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - LinkSpeeds []BACnetApplicationTagReal + NumberOfDataElements BACnetApplicationTagUnsignedInteger + LinkSpeeds []BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLinkSpeeds) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLinkSpeeds) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLinkSpeeds) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LINK_SPEEDS -} +func (m *_BACnetConstructedDataLinkSpeeds) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LINK_SPEEDS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLinkSpeeds) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLinkSpeeds) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLinkSpeeds) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLinkSpeeds) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataLinkSpeeds) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLinkSpeeds factory function for _BACnetConstructedDataLinkSpeeds -func NewBACnetConstructedDataLinkSpeeds(numberOfDataElements BACnetApplicationTagUnsignedInteger, linkSpeeds []BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLinkSpeeds { +func NewBACnetConstructedDataLinkSpeeds( numberOfDataElements BACnetApplicationTagUnsignedInteger , linkSpeeds []BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLinkSpeeds { _result := &_BACnetConstructedDataLinkSpeeds{ - NumberOfDataElements: numberOfDataElements, - LinkSpeeds: linkSpeeds, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + LinkSpeeds: linkSpeeds, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataLinkSpeeds(numberOfDataElements BACnetApplicationTa // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLinkSpeeds(structType interface{}) BACnetConstructedDataLinkSpeeds { - if casted, ok := structType.(BACnetConstructedDataLinkSpeeds); ok { + if casted, ok := structType.(BACnetConstructedDataLinkSpeeds); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLinkSpeeds); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataLinkSpeeds) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataLinkSpeeds) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataLinkSpeedsParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataLinkSpeedsParseWithBuffer(ctx context.Context, readBuf // Terminated array var linkSpeeds []BACnetApplicationTagReal { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'linkSpeeds' field of BACnetConstructedDataLinkSpeeds") } @@ -235,11 +237,11 @@ func BACnetConstructedDataLinkSpeedsParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetConstructedDataLinkSpeeds{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - LinkSpeeds: linkSpeeds, + LinkSpeeds: linkSpeeds, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataLinkSpeeds) SerializeWithWriteBuffer(ctx context. if pushErr := writeBuffer.PushContext("BACnetConstructedDataLinkSpeeds"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLinkSpeeds") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (linkSpeeds) - if pushErr := writeBuffer.PushContext("linkSpeeds", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for linkSpeeds") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetLinkSpeeds() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetLinkSpeeds()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'linkSpeeds' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("linkSpeeds", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for linkSpeeds") + } + + // Array Field (linkSpeeds) + if pushErr := writeBuffer.PushContext("linkSpeeds", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for linkSpeeds") + } + for _curItem, _element := range m.GetLinkSpeeds() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetLinkSpeeds()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'linkSpeeds' field") } + } + if popErr := writeBuffer.PopContext("linkSpeeds", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for linkSpeeds") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLinkSpeeds"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLinkSpeeds") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataLinkSpeeds) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLinkSpeeds) isBACnetConstructedDataLinkSpeeds() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataLinkSpeeds) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataListOfGroupMembers.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataListOfGroupMembers.go index 0b6ef34d683..fd634637549 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataListOfGroupMembers.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataListOfGroupMembers.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataListOfGroupMembers is the corresponding interface of BACnetConstructedDataListOfGroupMembers type BACnetConstructedDataListOfGroupMembers interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataListOfGroupMembersExactly interface { // _BACnetConstructedDataListOfGroupMembers is the data-structure of this message type _BACnetConstructedDataListOfGroupMembers struct { *_BACnetConstructedData - ListOfGroupMembers []BACnetReadAccessSpecification + ListOfGroupMembers []BACnetReadAccessSpecification } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataListOfGroupMembers) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataListOfGroupMembers) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataListOfGroupMembers) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LIST_OF_GROUP_MEMBERS -} +func (m *_BACnetConstructedDataListOfGroupMembers) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LIST_OF_GROUP_MEMBERS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataListOfGroupMembers) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataListOfGroupMembers) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataListOfGroupMembers) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataListOfGroupMembers) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataListOfGroupMembers) GetListOfGroupMembers() []BAC /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataListOfGroupMembers factory function for _BACnetConstructedDataListOfGroupMembers -func NewBACnetConstructedDataListOfGroupMembers(listOfGroupMembers []BACnetReadAccessSpecification, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataListOfGroupMembers { +func NewBACnetConstructedDataListOfGroupMembers( listOfGroupMembers []BACnetReadAccessSpecification , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataListOfGroupMembers { _result := &_BACnetConstructedDataListOfGroupMembers{ - ListOfGroupMembers: listOfGroupMembers, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ListOfGroupMembers: listOfGroupMembers, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataListOfGroupMembers(listOfGroupMembers []BACnetReadA // Deprecated: use the interface for direct cast func CastBACnetConstructedDataListOfGroupMembers(structType interface{}) BACnetConstructedDataListOfGroupMembers { - if casted, ok := structType.(BACnetConstructedDataListOfGroupMembers); ok { + if casted, ok := structType.(BACnetConstructedDataListOfGroupMembers); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataListOfGroupMembers); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataListOfGroupMembers) GetLengthInBits(ctx context.C return lengthInBits } + func (m *_BACnetConstructedDataListOfGroupMembers) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataListOfGroupMembersParseWithBuffer(ctx context.Context, // Terminated array var listOfGroupMembers []BACnetReadAccessSpecification { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetReadAccessSpecificationParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetReadAccessSpecificationParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'listOfGroupMembers' field of BACnetConstructedDataListOfGroupMembers") } @@ -173,7 +175,7 @@ func BACnetConstructedDataListOfGroupMembersParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataListOfGroupMembers{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ListOfGroupMembers: listOfGroupMembers, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataListOfGroupMembers) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataListOfGroupMembers") } - // Array Field (listOfGroupMembers) - if pushErr := writeBuffer.PushContext("listOfGroupMembers", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for listOfGroupMembers") - } - for _curItem, _element := range m.GetListOfGroupMembers() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetListOfGroupMembers()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'listOfGroupMembers' field") - } - } - if popErr := writeBuffer.PopContext("listOfGroupMembers", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for listOfGroupMembers") + // Array Field (listOfGroupMembers) + if pushErr := writeBuffer.PushContext("listOfGroupMembers", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for listOfGroupMembers") + } + for _curItem, _element := range m.GetListOfGroupMembers() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetListOfGroupMembers()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'listOfGroupMembers' field") } + } + if popErr := writeBuffer.PopContext("listOfGroupMembers", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for listOfGroupMembers") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataListOfGroupMembers"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataListOfGroupMembers") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataListOfGroupMembers) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataListOfGroupMembers) isBACnetConstructedDataListOfGroupMembers() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataListOfGroupMembers) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataListOfObjectPropertyReferences.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataListOfObjectPropertyReferences.go index 764574a13d3..e4e01e7bef8 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataListOfObjectPropertyReferences.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataListOfObjectPropertyReferences.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataListOfObjectPropertyReferences is the corresponding interface of BACnetConstructedDataListOfObjectPropertyReferences type BACnetConstructedDataListOfObjectPropertyReferences interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataListOfObjectPropertyReferencesExactly interface { // _BACnetConstructedDataListOfObjectPropertyReferences is the data-structure of this message type _BACnetConstructedDataListOfObjectPropertyReferences struct { *_BACnetConstructedData - References []BACnetDeviceObjectPropertyReference + References []BACnetDeviceObjectPropertyReference } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataListOfObjectPropertyReferences) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataListOfObjectPropertyReferences) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataListOfObjectPropertyReferences) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LIST_OF_OBJECT_PROPERTY_REFERENCES -} +func (m *_BACnetConstructedDataListOfObjectPropertyReferences) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LIST_OF_OBJECT_PROPERTY_REFERENCES} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataListOfObjectPropertyReferences) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataListOfObjectPropertyReferences) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataListOfObjectPropertyReferences) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataListOfObjectPropertyReferences) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataListOfObjectPropertyReferences) GetReferences() [ /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataListOfObjectPropertyReferences factory function for _BACnetConstructedDataListOfObjectPropertyReferences -func NewBACnetConstructedDataListOfObjectPropertyReferences(references []BACnetDeviceObjectPropertyReference, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataListOfObjectPropertyReferences { +func NewBACnetConstructedDataListOfObjectPropertyReferences( references []BACnetDeviceObjectPropertyReference , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataListOfObjectPropertyReferences { _result := &_BACnetConstructedDataListOfObjectPropertyReferences{ - References: references, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + References: references, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataListOfObjectPropertyReferences(references []BACnetD // Deprecated: use the interface for direct cast func CastBACnetConstructedDataListOfObjectPropertyReferences(structType interface{}) BACnetConstructedDataListOfObjectPropertyReferences { - if casted, ok := structType.(BACnetConstructedDataListOfObjectPropertyReferences); ok { + if casted, ok := structType.(BACnetConstructedDataListOfObjectPropertyReferences); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataListOfObjectPropertyReferences); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataListOfObjectPropertyReferences) GetLengthInBits(c return lengthInBits } + func (m *_BACnetConstructedDataListOfObjectPropertyReferences) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataListOfObjectPropertyReferencesParseWithBuffer(ctx cont // Terminated array var references []BACnetDeviceObjectPropertyReference { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetDeviceObjectPropertyReferenceParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetDeviceObjectPropertyReferenceParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'references' field of BACnetConstructedDataListOfObjectPropertyReferences") } @@ -173,7 +175,7 @@ func BACnetConstructedDataListOfObjectPropertyReferencesParseWithBuffer(ctx cont // Create a partially initialized instance _child := &_BACnetConstructedDataListOfObjectPropertyReferences{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, References: references, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataListOfObjectPropertyReferences) SerializeWithWrit return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataListOfObjectPropertyReferences") } - // Array Field (references) - if pushErr := writeBuffer.PushContext("references", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for references") - } - for _curItem, _element := range m.GetReferences() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetReferences()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'references' field") - } - } - if popErr := writeBuffer.PopContext("references", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for references") + // Array Field (references) + if pushErr := writeBuffer.PushContext("references", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for references") + } + for _curItem, _element := range m.GetReferences() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetReferences()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'references' field") } + } + if popErr := writeBuffer.PopContext("references", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for references") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataListOfObjectPropertyReferences"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataListOfObjectPropertyReferences") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataListOfObjectPropertyReferences) SerializeWithWrit return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataListOfObjectPropertyReferences) isBACnetConstructedDataListOfObjectPropertyReferences() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataListOfObjectPropertyReferences) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLoadControlAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLoadControlAll.go index 1484a027dcd..d26bd8494cc 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLoadControlAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLoadControlAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLoadControlAll is the corresponding interface of BACnetConstructedDataLoadControlAll type BACnetConstructedDataLoadControlAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataLoadControlAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLoadControlAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_LOAD_CONTROL -} +func (m *_BACnetConstructedDataLoadControlAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_LOAD_CONTROL} -func (m *_BACnetConstructedDataLoadControlAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataLoadControlAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLoadControlAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLoadControlAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLoadControlAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLoadControlAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataLoadControlAll factory function for _BACnetConstructedDataLoadControlAll -func NewBACnetConstructedDataLoadControlAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLoadControlAll { +func NewBACnetConstructedDataLoadControlAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLoadControlAll { _result := &_BACnetConstructedDataLoadControlAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataLoadControlAll(openingTag BACnetOpeningTag, peekedT // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLoadControlAll(structType interface{}) BACnetConstructedDataLoadControlAll { - if casted, ok := structType.(BACnetConstructedDataLoadControlAll); ok { + if casted, ok := structType.(BACnetConstructedDataLoadControlAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLoadControlAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataLoadControlAll) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConstructedDataLoadControlAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataLoadControlAllParseWithBuffer(ctx context.Context, rea _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataLoadControlAllParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetConstructedDataLoadControlAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataLoadControlAll) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLoadControlAll) isBACnetConstructedDataLoadControlAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataLoadControlAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLoadControlPresentValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLoadControlPresentValue.go index ebc3d2673e6..9e0fac63bfc 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLoadControlPresentValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLoadControlPresentValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLoadControlPresentValue is the corresponding interface of BACnetConstructedDataLoadControlPresentValue type BACnetConstructedDataLoadControlPresentValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLoadControlPresentValueExactly interface { // _BACnetConstructedDataLoadControlPresentValue is the data-structure of this message type _BACnetConstructedDataLoadControlPresentValue struct { *_BACnetConstructedData - PresentValue BACnetShedStateTagged + PresentValue BACnetShedStateTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLoadControlPresentValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_LOAD_CONTROL -} +func (m *_BACnetConstructedDataLoadControlPresentValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_LOAD_CONTROL} -func (m *_BACnetConstructedDataLoadControlPresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PRESENT_VALUE -} +func (m *_BACnetConstructedDataLoadControlPresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PRESENT_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLoadControlPresentValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLoadControlPresentValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLoadControlPresentValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLoadControlPresentValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLoadControlPresentValue) GetActualValue() BACnetS /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLoadControlPresentValue factory function for _BACnetConstructedDataLoadControlPresentValue -func NewBACnetConstructedDataLoadControlPresentValue(presentValue BACnetShedStateTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLoadControlPresentValue { +func NewBACnetConstructedDataLoadControlPresentValue( presentValue BACnetShedStateTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLoadControlPresentValue { _result := &_BACnetConstructedDataLoadControlPresentValue{ - PresentValue: presentValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PresentValue: presentValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLoadControlPresentValue(presentValue BACnetShedStat // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLoadControlPresentValue(structType interface{}) BACnetConstructedDataLoadControlPresentValue { - if casted, ok := structType.(BACnetConstructedDataLoadControlPresentValue); ok { + if casted, ok := structType.(BACnetConstructedDataLoadControlPresentValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLoadControlPresentValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLoadControlPresentValue) GetLengthInBits(ctx cont return lengthInBits } + func (m *_BACnetConstructedDataLoadControlPresentValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLoadControlPresentValueParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("presentValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for presentValue") } - _presentValue, _presentValueErr := BACnetShedStateTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_presentValue, _presentValueErr := BACnetShedStateTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _presentValueErr != nil { return nil, errors.Wrap(_presentValueErr, "Error parsing 'presentValue' field of BACnetConstructedDataLoadControlPresentValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLoadControlPresentValueParseWithBuffer(ctx context.Con // Create a partially initialized instance _child := &_BACnetConstructedDataLoadControlPresentValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PresentValue: presentValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLoadControlPresentValue) SerializeWithWriteBuffer return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLoadControlPresentValue") } - // Simple Field (presentValue) - if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for presentValue") - } - _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) - if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for presentValue") - } - if _presentValueErr != nil { - return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (presentValue) + if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for presentValue") + } + _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) + if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for presentValue") + } + if _presentValueErr != nil { + return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLoadControlPresentValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLoadControlPresentValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLoadControlPresentValue) SerializeWithWriteBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLoadControlPresentValue) isBACnetConstructedDataLoadControlPresentValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLoadControlPresentValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLocalDate.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLocalDate.go index bdccbebe246..083a0312842 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLocalDate.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLocalDate.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLocalDate is the corresponding interface of BACnetConstructedDataLocalDate type BACnetConstructedDataLocalDate interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLocalDateExactly interface { // _BACnetConstructedDataLocalDate is the data-structure of this message type _BACnetConstructedDataLocalDate struct { *_BACnetConstructedData - LocalDate BACnetApplicationTagDate + LocalDate BACnetApplicationTagDate } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLocalDate) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLocalDate) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLocalDate) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LOCAL_DATE -} +func (m *_BACnetConstructedDataLocalDate) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LOCAL_DATE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLocalDate) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLocalDate) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLocalDate) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLocalDate) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLocalDate) GetActualValue() BACnetApplicationTagD /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLocalDate factory function for _BACnetConstructedDataLocalDate -func NewBACnetConstructedDataLocalDate(localDate BACnetApplicationTagDate, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLocalDate { +func NewBACnetConstructedDataLocalDate( localDate BACnetApplicationTagDate , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLocalDate { _result := &_BACnetConstructedDataLocalDate{ - LocalDate: localDate, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + LocalDate: localDate, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLocalDate(localDate BACnetApplicationTagDate, openi // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLocalDate(structType interface{}) BACnetConstructedDataLocalDate { - if casted, ok := structType.(BACnetConstructedDataLocalDate); ok { + if casted, ok := structType.(BACnetConstructedDataLocalDate); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLocalDate); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLocalDate) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetConstructedDataLocalDate) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLocalDateParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("localDate"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for localDate") } - _localDate, _localDateErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_localDate, _localDateErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _localDateErr != nil { return nil, errors.Wrap(_localDateErr, "Error parsing 'localDate' field of BACnetConstructedDataLocalDate") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLocalDateParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_BACnetConstructedDataLocalDate{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LocalDate: localDate, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLocalDate) SerializeWithWriteBuffer(ctx context.C return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLocalDate") } - // Simple Field (localDate) - if pushErr := writeBuffer.PushContext("localDate"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for localDate") - } - _localDateErr := writeBuffer.WriteSerializable(ctx, m.GetLocalDate()) - if popErr := writeBuffer.PopContext("localDate"); popErr != nil { - return errors.Wrap(popErr, "Error popping for localDate") - } - if _localDateErr != nil { - return errors.Wrap(_localDateErr, "Error serializing 'localDate' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (localDate) + if pushErr := writeBuffer.PushContext("localDate"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for localDate") + } + _localDateErr := writeBuffer.WriteSerializable(ctx, m.GetLocalDate()) + if popErr := writeBuffer.PopContext("localDate"); popErr != nil { + return errors.Wrap(popErr, "Error popping for localDate") + } + if _localDateErr != nil { + return errors.Wrap(_localDateErr, "Error serializing 'localDate' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLocalDate"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLocalDate") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLocalDate) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLocalDate) isBACnetConstructedDataLocalDate() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLocalDate) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLocalForwardingOnly.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLocalForwardingOnly.go index b92e22d71b0..01c47bba82a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLocalForwardingOnly.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLocalForwardingOnly.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLocalForwardingOnly is the corresponding interface of BACnetConstructedDataLocalForwardingOnly type BACnetConstructedDataLocalForwardingOnly interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLocalForwardingOnlyExactly interface { // _BACnetConstructedDataLocalForwardingOnly is the data-structure of this message type _BACnetConstructedDataLocalForwardingOnly struct { *_BACnetConstructedData - LocalForwardingOnly BACnetApplicationTagBoolean + LocalForwardingOnly BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLocalForwardingOnly) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLocalForwardingOnly) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLocalForwardingOnly) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LOCAL_FORWARDING_ONLY -} +func (m *_BACnetConstructedDataLocalForwardingOnly) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LOCAL_FORWARDING_ONLY} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLocalForwardingOnly) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLocalForwardingOnly) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLocalForwardingOnly) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLocalForwardingOnly) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLocalForwardingOnly) GetActualValue() BACnetAppli /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLocalForwardingOnly factory function for _BACnetConstructedDataLocalForwardingOnly -func NewBACnetConstructedDataLocalForwardingOnly(localForwardingOnly BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLocalForwardingOnly { +func NewBACnetConstructedDataLocalForwardingOnly( localForwardingOnly BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLocalForwardingOnly { _result := &_BACnetConstructedDataLocalForwardingOnly{ - LocalForwardingOnly: localForwardingOnly, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + LocalForwardingOnly: localForwardingOnly, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLocalForwardingOnly(localForwardingOnly BACnetAppli // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLocalForwardingOnly(structType interface{}) BACnetConstructedDataLocalForwardingOnly { - if casted, ok := structType.(BACnetConstructedDataLocalForwardingOnly); ok { + if casted, ok := structType.(BACnetConstructedDataLocalForwardingOnly); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLocalForwardingOnly); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLocalForwardingOnly) GetLengthInBits(ctx context. return lengthInBits } + func (m *_BACnetConstructedDataLocalForwardingOnly) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLocalForwardingOnlyParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("localForwardingOnly"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for localForwardingOnly") } - _localForwardingOnly, _localForwardingOnlyErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_localForwardingOnly, _localForwardingOnlyErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _localForwardingOnlyErr != nil { return nil, errors.Wrap(_localForwardingOnlyErr, "Error parsing 'localForwardingOnly' field of BACnetConstructedDataLocalForwardingOnly") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLocalForwardingOnlyParseWithBuffer(ctx context.Context // Create a partially initialized instance _child := &_BACnetConstructedDataLocalForwardingOnly{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LocalForwardingOnly: localForwardingOnly, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLocalForwardingOnly) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLocalForwardingOnly") } - // Simple Field (localForwardingOnly) - if pushErr := writeBuffer.PushContext("localForwardingOnly"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for localForwardingOnly") - } - _localForwardingOnlyErr := writeBuffer.WriteSerializable(ctx, m.GetLocalForwardingOnly()) - if popErr := writeBuffer.PopContext("localForwardingOnly"); popErr != nil { - return errors.Wrap(popErr, "Error popping for localForwardingOnly") - } - if _localForwardingOnlyErr != nil { - return errors.Wrap(_localForwardingOnlyErr, "Error serializing 'localForwardingOnly' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (localForwardingOnly) + if pushErr := writeBuffer.PushContext("localForwardingOnly"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for localForwardingOnly") + } + _localForwardingOnlyErr := writeBuffer.WriteSerializable(ctx, m.GetLocalForwardingOnly()) + if popErr := writeBuffer.PopContext("localForwardingOnly"); popErr != nil { + return errors.Wrap(popErr, "Error popping for localForwardingOnly") + } + if _localForwardingOnlyErr != nil { + return errors.Wrap(_localForwardingOnlyErr, "Error serializing 'localForwardingOnly' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLocalForwardingOnly"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLocalForwardingOnly") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLocalForwardingOnly) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLocalForwardingOnly) isBACnetConstructedDataLocalForwardingOnly() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLocalForwardingOnly) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLocalTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLocalTime.go index 19506ef31d2..c5fe1d0f652 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLocalTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLocalTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLocalTime is the corresponding interface of BACnetConstructedDataLocalTime type BACnetConstructedDataLocalTime interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLocalTimeExactly interface { // _BACnetConstructedDataLocalTime is the data-structure of this message type _BACnetConstructedDataLocalTime struct { *_BACnetConstructedData - LocalTime BACnetApplicationTagTime + LocalTime BACnetApplicationTagTime } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLocalTime) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLocalTime) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLocalTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LOCAL_TIME -} +func (m *_BACnetConstructedDataLocalTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LOCAL_TIME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLocalTime) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLocalTime) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLocalTime) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLocalTime) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLocalTime) GetActualValue() BACnetApplicationTagT /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLocalTime factory function for _BACnetConstructedDataLocalTime -func NewBACnetConstructedDataLocalTime(localTime BACnetApplicationTagTime, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLocalTime { +func NewBACnetConstructedDataLocalTime( localTime BACnetApplicationTagTime , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLocalTime { _result := &_BACnetConstructedDataLocalTime{ - LocalTime: localTime, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + LocalTime: localTime, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLocalTime(localTime BACnetApplicationTagTime, openi // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLocalTime(structType interface{}) BACnetConstructedDataLocalTime { - if casted, ok := structType.(BACnetConstructedDataLocalTime); ok { + if casted, ok := structType.(BACnetConstructedDataLocalTime); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLocalTime); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLocalTime) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetConstructedDataLocalTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLocalTimeParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("localTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for localTime") } - _localTime, _localTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_localTime, _localTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _localTimeErr != nil { return nil, errors.Wrap(_localTimeErr, "Error parsing 'localTime' field of BACnetConstructedDataLocalTime") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLocalTimeParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_BACnetConstructedDataLocalTime{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LocalTime: localTime, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLocalTime) SerializeWithWriteBuffer(ctx context.C return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLocalTime") } - // Simple Field (localTime) - if pushErr := writeBuffer.PushContext("localTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for localTime") - } - _localTimeErr := writeBuffer.WriteSerializable(ctx, m.GetLocalTime()) - if popErr := writeBuffer.PopContext("localTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for localTime") - } - if _localTimeErr != nil { - return errors.Wrap(_localTimeErr, "Error serializing 'localTime' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (localTime) + if pushErr := writeBuffer.PushContext("localTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for localTime") + } + _localTimeErr := writeBuffer.WriteSerializable(ctx, m.GetLocalTime()) + if popErr := writeBuffer.PopContext("localTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for localTime") + } + if _localTimeErr != nil { + return errors.Wrap(_localTimeErr, "Error serializing 'localTime' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLocalTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLocalTime") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLocalTime) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLocalTime) isBACnetConstructedDataLocalTime() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLocalTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLocation.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLocation.go index ea51a0723de..7ef1b991077 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLocation.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLocation.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLocation is the corresponding interface of BACnetConstructedDataLocation type BACnetConstructedDataLocation interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLocationExactly interface { // _BACnetConstructedDataLocation is the data-structure of this message type _BACnetConstructedDataLocation struct { *_BACnetConstructedData - Location BACnetApplicationTagCharacterString + Location BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLocation) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLocation) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLocation) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LOCATION -} +func (m *_BACnetConstructedDataLocation) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LOCATION} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLocation) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLocation) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLocation) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLocation) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLocation) GetActualValue() BACnetApplicationTagCh /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLocation factory function for _BACnetConstructedDataLocation -func NewBACnetConstructedDataLocation(location BACnetApplicationTagCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLocation { +func NewBACnetConstructedDataLocation( location BACnetApplicationTagCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLocation { _result := &_BACnetConstructedDataLocation{ - Location: location, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Location: location, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLocation(location BACnetApplicationTagCharacterStri // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLocation(structType interface{}) BACnetConstructedDataLocation { - if casted, ok := structType.(BACnetConstructedDataLocation); ok { + if casted, ok := structType.(BACnetConstructedDataLocation); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLocation); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLocation) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetConstructedDataLocation) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLocationParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("location"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for location") } - _location, _locationErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_location, _locationErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _locationErr != nil { return nil, errors.Wrap(_locationErr, "Error parsing 'location' field of BACnetConstructedDataLocation") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLocationParseWithBuffer(ctx context.Context, readBuffe // Create a partially initialized instance _child := &_BACnetConstructedDataLocation{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Location: location, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLocation) SerializeWithWriteBuffer(ctx context.Co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLocation") } - // Simple Field (location) - if pushErr := writeBuffer.PushContext("location"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for location") - } - _locationErr := writeBuffer.WriteSerializable(ctx, m.GetLocation()) - if popErr := writeBuffer.PopContext("location"); popErr != nil { - return errors.Wrap(popErr, "Error popping for location") - } - if _locationErr != nil { - return errors.Wrap(_locationErr, "Error serializing 'location' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (location) + if pushErr := writeBuffer.PushContext("location"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for location") + } + _locationErr := writeBuffer.WriteSerializable(ctx, m.GetLocation()) + if popErr := writeBuffer.PopContext("location"); popErr != nil { + return errors.Wrap(popErr, "Error popping for location") + } + if _locationErr != nil { + return errors.Wrap(_locationErr, "Error serializing 'location' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLocation"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLocation") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLocation) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLocation) isBACnetConstructedDataLocation() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLocation) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLockStatus.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLockStatus.go index 6995f96aecb..f991ff83846 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLockStatus.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLockStatus.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLockStatus is the corresponding interface of BACnetConstructedDataLockStatus type BACnetConstructedDataLockStatus interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLockStatusExactly interface { // _BACnetConstructedDataLockStatus is the data-structure of this message type _BACnetConstructedDataLockStatus struct { *_BACnetConstructedData - LockStatus BACnetLockStatusTagged + LockStatus BACnetLockStatusTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLockStatus) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLockStatus) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLockStatus) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LOCK_STATUS -} +func (m *_BACnetConstructedDataLockStatus) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LOCK_STATUS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLockStatus) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLockStatus) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLockStatus) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLockStatus) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLockStatus) GetActualValue() BACnetLockStatusTagg /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLockStatus factory function for _BACnetConstructedDataLockStatus -func NewBACnetConstructedDataLockStatus(lockStatus BACnetLockStatusTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLockStatus { +func NewBACnetConstructedDataLockStatus( lockStatus BACnetLockStatusTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLockStatus { _result := &_BACnetConstructedDataLockStatus{ - LockStatus: lockStatus, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + LockStatus: lockStatus, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLockStatus(lockStatus BACnetLockStatusTagged, openi // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLockStatus(structType interface{}) BACnetConstructedDataLockStatus { - if casted, ok := structType.(BACnetConstructedDataLockStatus); ok { + if casted, ok := structType.(BACnetConstructedDataLockStatus); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLockStatus); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLockStatus) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataLockStatus) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLockStatusParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("lockStatus"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lockStatus") } - _lockStatus, _lockStatusErr := BACnetLockStatusTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_lockStatus, _lockStatusErr := BACnetLockStatusTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _lockStatusErr != nil { return nil, errors.Wrap(_lockStatusErr, "Error parsing 'lockStatus' field of BACnetConstructedDataLockStatus") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLockStatusParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetConstructedDataLockStatus{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LockStatus: lockStatus, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLockStatus) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLockStatus") } - // Simple Field (lockStatus) - if pushErr := writeBuffer.PushContext("lockStatus"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lockStatus") - } - _lockStatusErr := writeBuffer.WriteSerializable(ctx, m.GetLockStatus()) - if popErr := writeBuffer.PopContext("lockStatus"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lockStatus") - } - if _lockStatusErr != nil { - return errors.Wrap(_lockStatusErr, "Error serializing 'lockStatus' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (lockStatus) + if pushErr := writeBuffer.PushContext("lockStatus"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lockStatus") + } + _lockStatusErr := writeBuffer.WriteSerializable(ctx, m.GetLockStatus()) + if popErr := writeBuffer.PopContext("lockStatus"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lockStatus") + } + if _lockStatusErr != nil { + return errors.Wrap(_lockStatusErr, "Error serializing 'lockStatus' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLockStatus"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLockStatus") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLockStatus) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLockStatus) isBACnetConstructedDataLockStatus() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLockStatus) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLockout.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLockout.go index 045e5dd773e..f3d037fcb4e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLockout.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLockout.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLockout is the corresponding interface of BACnetConstructedDataLockout type BACnetConstructedDataLockout interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLockoutExactly interface { // _BACnetConstructedDataLockout is the data-structure of this message type _BACnetConstructedDataLockout struct { *_BACnetConstructedData - Lockout BACnetApplicationTagBoolean + Lockout BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLockout) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLockout) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLockout) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LOCKOUT -} +func (m *_BACnetConstructedDataLockout) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LOCKOUT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLockout) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLockout) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLockout) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLockout) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLockout) GetActualValue() BACnetApplicationTagBoo /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLockout factory function for _BACnetConstructedDataLockout -func NewBACnetConstructedDataLockout(lockout BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLockout { +func NewBACnetConstructedDataLockout( lockout BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLockout { _result := &_BACnetConstructedDataLockout{ - Lockout: lockout, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Lockout: lockout, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLockout(lockout BACnetApplicationTagBoolean, openin // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLockout(structType interface{}) BACnetConstructedDataLockout { - if casted, ok := structType.(BACnetConstructedDataLockout); ok { + if casted, ok := structType.(BACnetConstructedDataLockout); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLockout); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLockout) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_BACnetConstructedDataLockout) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLockoutParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("lockout"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lockout") } - _lockout, _lockoutErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_lockout, _lockoutErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _lockoutErr != nil { return nil, errors.Wrap(_lockoutErr, "Error parsing 'lockout' field of BACnetConstructedDataLockout") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLockoutParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_BACnetConstructedDataLockout{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Lockout: lockout, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLockout) SerializeWithWriteBuffer(ctx context.Con return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLockout") } - // Simple Field (lockout) - if pushErr := writeBuffer.PushContext("lockout"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lockout") - } - _lockoutErr := writeBuffer.WriteSerializable(ctx, m.GetLockout()) - if popErr := writeBuffer.PopContext("lockout"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lockout") - } - if _lockoutErr != nil { - return errors.Wrap(_lockoutErr, "Error serializing 'lockout' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (lockout) + if pushErr := writeBuffer.PushContext("lockout"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lockout") + } + _lockoutErr := writeBuffer.WriteSerializable(ctx, m.GetLockout()) + if popErr := writeBuffer.PopContext("lockout"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lockout") + } + if _lockoutErr != nil { + return errors.Wrap(_lockoutErr, "Error serializing 'lockout' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLockout"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLockout") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLockout) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLockout) isBACnetConstructedDataLockout() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLockout) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLockoutRelinquishTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLockoutRelinquishTime.go index dbcfbc2243a..99fad9f1037 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLockoutRelinquishTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLockoutRelinquishTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLockoutRelinquishTime is the corresponding interface of BACnetConstructedDataLockoutRelinquishTime type BACnetConstructedDataLockoutRelinquishTime interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLockoutRelinquishTimeExactly interface { // _BACnetConstructedDataLockoutRelinquishTime is the data-structure of this message type _BACnetConstructedDataLockoutRelinquishTime struct { *_BACnetConstructedData - LockoutRelinquishTime BACnetApplicationTagUnsignedInteger + LockoutRelinquishTime BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLockoutRelinquishTime) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLockoutRelinquishTime) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLockoutRelinquishTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LOCKOUT_RELINQUISH_TIME -} +func (m *_BACnetConstructedDataLockoutRelinquishTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LOCKOUT_RELINQUISH_TIME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLockoutRelinquishTime) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLockoutRelinquishTime) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLockoutRelinquishTime) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLockoutRelinquishTime) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLockoutRelinquishTime) GetActualValue() BACnetApp /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLockoutRelinquishTime factory function for _BACnetConstructedDataLockoutRelinquishTime -func NewBACnetConstructedDataLockoutRelinquishTime(lockoutRelinquishTime BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLockoutRelinquishTime { +func NewBACnetConstructedDataLockoutRelinquishTime( lockoutRelinquishTime BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLockoutRelinquishTime { _result := &_BACnetConstructedDataLockoutRelinquishTime{ - LockoutRelinquishTime: lockoutRelinquishTime, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + LockoutRelinquishTime: lockoutRelinquishTime, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLockoutRelinquishTime(lockoutRelinquishTime BACnetA // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLockoutRelinquishTime(structType interface{}) BACnetConstructedDataLockoutRelinquishTime { - if casted, ok := structType.(BACnetConstructedDataLockoutRelinquishTime); ok { + if casted, ok := structType.(BACnetConstructedDataLockoutRelinquishTime); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLockoutRelinquishTime); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLockoutRelinquishTime) GetLengthInBits(ctx contex return lengthInBits } + func (m *_BACnetConstructedDataLockoutRelinquishTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLockoutRelinquishTimeParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("lockoutRelinquishTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lockoutRelinquishTime") } - _lockoutRelinquishTime, _lockoutRelinquishTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_lockoutRelinquishTime, _lockoutRelinquishTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _lockoutRelinquishTimeErr != nil { return nil, errors.Wrap(_lockoutRelinquishTimeErr, "Error parsing 'lockoutRelinquishTime' field of BACnetConstructedDataLockoutRelinquishTime") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLockoutRelinquishTimeParseWithBuffer(ctx context.Conte // Create a partially initialized instance _child := &_BACnetConstructedDataLockoutRelinquishTime{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LockoutRelinquishTime: lockoutRelinquishTime, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLockoutRelinquishTime) SerializeWithWriteBuffer(c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLockoutRelinquishTime") } - // Simple Field (lockoutRelinquishTime) - if pushErr := writeBuffer.PushContext("lockoutRelinquishTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lockoutRelinquishTime") - } - _lockoutRelinquishTimeErr := writeBuffer.WriteSerializable(ctx, m.GetLockoutRelinquishTime()) - if popErr := writeBuffer.PopContext("lockoutRelinquishTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lockoutRelinquishTime") - } - if _lockoutRelinquishTimeErr != nil { - return errors.Wrap(_lockoutRelinquishTimeErr, "Error serializing 'lockoutRelinquishTime' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (lockoutRelinquishTime) + if pushErr := writeBuffer.PushContext("lockoutRelinquishTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lockoutRelinquishTime") + } + _lockoutRelinquishTimeErr := writeBuffer.WriteSerializable(ctx, m.GetLockoutRelinquishTime()) + if popErr := writeBuffer.PopContext("lockoutRelinquishTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lockoutRelinquishTime") + } + if _lockoutRelinquishTimeErr != nil { + return errors.Wrap(_lockoutRelinquishTimeErr, "Error serializing 'lockoutRelinquishTime' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLockoutRelinquishTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLockoutRelinquishTime") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLockoutRelinquishTime) SerializeWithWriteBuffer(c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLockoutRelinquishTime) isBACnetConstructedDataLockoutRelinquishTime() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLockoutRelinquishTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLogBuffer.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLogBuffer.go index 0bb111d4466..42a4e402680 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLogBuffer.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLogBuffer.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLogBuffer is the corresponding interface of BACnetConstructedDataLogBuffer type BACnetConstructedDataLogBuffer interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataLogBufferExactly interface { // _BACnetConstructedDataLogBuffer is the data-structure of this message type _BACnetConstructedDataLogBuffer struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - FloorText []BACnetLogRecord + NumberOfDataElements BACnetApplicationTagUnsignedInteger + FloorText []BACnetLogRecord } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLogBuffer) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLogBuffer) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLogBuffer) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LOG_BUFFER -} +func (m *_BACnetConstructedDataLogBuffer) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LOG_BUFFER} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLogBuffer) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLogBuffer) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLogBuffer) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLogBuffer) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataLogBuffer) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLogBuffer factory function for _BACnetConstructedDataLogBuffer -func NewBACnetConstructedDataLogBuffer(numberOfDataElements BACnetApplicationTagUnsignedInteger, floorText []BACnetLogRecord, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLogBuffer { +func NewBACnetConstructedDataLogBuffer( numberOfDataElements BACnetApplicationTagUnsignedInteger , floorText []BACnetLogRecord , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLogBuffer { _result := &_BACnetConstructedDataLogBuffer{ - NumberOfDataElements: numberOfDataElements, - FloorText: floorText, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + FloorText: floorText, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataLogBuffer(numberOfDataElements BACnetApplicationTag // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLogBuffer(structType interface{}) BACnetConstructedDataLogBuffer { - if casted, ok := structType.(BACnetConstructedDataLogBuffer); ok { + if casted, ok := structType.(BACnetConstructedDataLogBuffer); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLogBuffer); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataLogBuffer) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetConstructedDataLogBuffer) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataLogBufferParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataLogBufferParseWithBuffer(ctx context.Context, readBuff // Terminated array var floorText []BACnetLogRecord { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetLogRecordParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetLogRecordParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'floorText' field of BACnetConstructedDataLogBuffer") } @@ -235,11 +237,11 @@ func BACnetConstructedDataLogBufferParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_BACnetConstructedDataLogBuffer{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - FloorText: floorText, + FloorText: floorText, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataLogBuffer) SerializeWithWriteBuffer(ctx context.C if pushErr := writeBuffer.PushContext("BACnetConstructedDataLogBuffer"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLogBuffer") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (floorText) - if pushErr := writeBuffer.PushContext("floorText", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for floorText") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetFloorText() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetFloorText()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'floorText' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("floorText", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for floorText") + } + + // Array Field (floorText) + if pushErr := writeBuffer.PushContext("floorText", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for floorText") + } + for _curItem, _element := range m.GetFloorText() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetFloorText()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'floorText' field") } + } + if popErr := writeBuffer.PopContext("floorText", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for floorText") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLogBuffer"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLogBuffer") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataLogBuffer) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLogBuffer) isBACnetConstructedDataLogBuffer() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataLogBuffer) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLogDeviceObjectProperty.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLogDeviceObjectProperty.go index fcc06560737..2b682dfce78 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLogDeviceObjectProperty.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLogDeviceObjectProperty.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLogDeviceObjectProperty is the corresponding interface of BACnetConstructedDataLogDeviceObjectProperty type BACnetConstructedDataLogDeviceObjectProperty interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLogDeviceObjectPropertyExactly interface { // _BACnetConstructedDataLogDeviceObjectProperty is the data-structure of this message type _BACnetConstructedDataLogDeviceObjectProperty struct { *_BACnetConstructedData - LogDeviceObjectProperty BACnetDeviceObjectPropertyReference + LogDeviceObjectProperty BACnetDeviceObjectPropertyReference } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLogDeviceObjectProperty) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLogDeviceObjectProperty) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLogDeviceObjectProperty) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LOG_DEVICE_OBJECT_PROPERTY -} +func (m *_BACnetConstructedDataLogDeviceObjectProperty) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LOG_DEVICE_OBJECT_PROPERTY} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLogDeviceObjectProperty) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLogDeviceObjectProperty) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLogDeviceObjectProperty) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLogDeviceObjectProperty) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLogDeviceObjectProperty) GetActualValue() BACnetD /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLogDeviceObjectProperty factory function for _BACnetConstructedDataLogDeviceObjectProperty -func NewBACnetConstructedDataLogDeviceObjectProperty(logDeviceObjectProperty BACnetDeviceObjectPropertyReference, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLogDeviceObjectProperty { +func NewBACnetConstructedDataLogDeviceObjectProperty( logDeviceObjectProperty BACnetDeviceObjectPropertyReference , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLogDeviceObjectProperty { _result := &_BACnetConstructedDataLogDeviceObjectProperty{ LogDeviceObjectProperty: logDeviceObjectProperty, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLogDeviceObjectProperty(logDeviceObjectProperty BAC // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLogDeviceObjectProperty(structType interface{}) BACnetConstructedDataLogDeviceObjectProperty { - if casted, ok := structType.(BACnetConstructedDataLogDeviceObjectProperty); ok { + if casted, ok := structType.(BACnetConstructedDataLogDeviceObjectProperty); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLogDeviceObjectProperty); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLogDeviceObjectProperty) GetLengthInBits(ctx cont return lengthInBits } + func (m *_BACnetConstructedDataLogDeviceObjectProperty) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLogDeviceObjectPropertyParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("logDeviceObjectProperty"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for logDeviceObjectProperty") } - _logDeviceObjectProperty, _logDeviceObjectPropertyErr := BACnetDeviceObjectPropertyReferenceParseWithBuffer(ctx, readBuffer) +_logDeviceObjectProperty, _logDeviceObjectPropertyErr := BACnetDeviceObjectPropertyReferenceParseWithBuffer(ctx, readBuffer) if _logDeviceObjectPropertyErr != nil { return nil, errors.Wrap(_logDeviceObjectPropertyErr, "Error parsing 'logDeviceObjectProperty' field of BACnetConstructedDataLogDeviceObjectProperty") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLogDeviceObjectPropertyParseWithBuffer(ctx context.Con // Create a partially initialized instance _child := &_BACnetConstructedDataLogDeviceObjectProperty{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LogDeviceObjectProperty: logDeviceObjectProperty, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLogDeviceObjectProperty) SerializeWithWriteBuffer return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLogDeviceObjectProperty") } - // Simple Field (logDeviceObjectProperty) - if pushErr := writeBuffer.PushContext("logDeviceObjectProperty"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for logDeviceObjectProperty") - } - _logDeviceObjectPropertyErr := writeBuffer.WriteSerializable(ctx, m.GetLogDeviceObjectProperty()) - if popErr := writeBuffer.PopContext("logDeviceObjectProperty"); popErr != nil { - return errors.Wrap(popErr, "Error popping for logDeviceObjectProperty") - } - if _logDeviceObjectPropertyErr != nil { - return errors.Wrap(_logDeviceObjectPropertyErr, "Error serializing 'logDeviceObjectProperty' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (logDeviceObjectProperty) + if pushErr := writeBuffer.PushContext("logDeviceObjectProperty"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for logDeviceObjectProperty") + } + _logDeviceObjectPropertyErr := writeBuffer.WriteSerializable(ctx, m.GetLogDeviceObjectProperty()) + if popErr := writeBuffer.PopContext("logDeviceObjectProperty"); popErr != nil { + return errors.Wrap(popErr, "Error popping for logDeviceObjectProperty") + } + if _logDeviceObjectPropertyErr != nil { + return errors.Wrap(_logDeviceObjectPropertyErr, "Error serializing 'logDeviceObjectProperty' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLogDeviceObjectProperty"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLogDeviceObjectProperty") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLogDeviceObjectProperty) SerializeWithWriteBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLogDeviceObjectProperty) isBACnetConstructedDataLogDeviceObjectProperty() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLogDeviceObjectProperty) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLogInterval.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLogInterval.go index 50553317447..6e8e4dab37e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLogInterval.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLogInterval.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLogInterval is the corresponding interface of BACnetConstructedDataLogInterval type BACnetConstructedDataLogInterval interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLogIntervalExactly interface { // _BACnetConstructedDataLogInterval is the data-structure of this message type _BACnetConstructedDataLogInterval struct { *_BACnetConstructedData - LogInterval BACnetApplicationTagUnsignedInteger + LogInterval BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLogInterval) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLogInterval) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLogInterval) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LOG_INTERVAL -} +func (m *_BACnetConstructedDataLogInterval) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LOG_INTERVAL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLogInterval) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLogInterval) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLogInterval) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLogInterval) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLogInterval) GetActualValue() BACnetApplicationTa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLogInterval factory function for _BACnetConstructedDataLogInterval -func NewBACnetConstructedDataLogInterval(logInterval BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLogInterval { +func NewBACnetConstructedDataLogInterval( logInterval BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLogInterval { _result := &_BACnetConstructedDataLogInterval{ - LogInterval: logInterval, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + LogInterval: logInterval, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLogInterval(logInterval BACnetApplicationTagUnsigne // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLogInterval(structType interface{}) BACnetConstructedDataLogInterval { - if casted, ok := structType.(BACnetConstructedDataLogInterval); ok { + if casted, ok := structType.(BACnetConstructedDataLogInterval); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLogInterval); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLogInterval) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataLogInterval) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLogIntervalParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("logInterval"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for logInterval") } - _logInterval, _logIntervalErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_logInterval, _logIntervalErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _logIntervalErr != nil { return nil, errors.Wrap(_logIntervalErr, "Error parsing 'logInterval' field of BACnetConstructedDataLogInterval") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLogIntervalParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataLogInterval{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LogInterval: logInterval, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLogInterval) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLogInterval") } - // Simple Field (logInterval) - if pushErr := writeBuffer.PushContext("logInterval"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for logInterval") - } - _logIntervalErr := writeBuffer.WriteSerializable(ctx, m.GetLogInterval()) - if popErr := writeBuffer.PopContext("logInterval"); popErr != nil { - return errors.Wrap(popErr, "Error popping for logInterval") - } - if _logIntervalErr != nil { - return errors.Wrap(_logIntervalErr, "Error serializing 'logInterval' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (logInterval) + if pushErr := writeBuffer.PushContext("logInterval"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for logInterval") + } + _logIntervalErr := writeBuffer.WriteSerializable(ctx, m.GetLogInterval()) + if popErr := writeBuffer.PopContext("logInterval"); popErr != nil { + return errors.Wrap(popErr, "Error popping for logInterval") + } + if _logIntervalErr != nil { + return errors.Wrap(_logIntervalErr, "Error serializing 'logInterval' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLogInterval"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLogInterval") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLogInterval) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLogInterval) isBACnetConstructedDataLogInterval() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLogInterval) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLoggingObject.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLoggingObject.go index fff46625c19..3ff03312e7d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLoggingObject.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLoggingObject.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLoggingObject is the corresponding interface of BACnetConstructedDataLoggingObject type BACnetConstructedDataLoggingObject interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLoggingObjectExactly interface { // _BACnetConstructedDataLoggingObject is the data-structure of this message type _BACnetConstructedDataLoggingObject struct { *_BACnetConstructedData - LoggingObject BACnetApplicationTagObjectIdentifier + LoggingObject BACnetApplicationTagObjectIdentifier } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLoggingObject) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLoggingObject) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLoggingObject) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LOGGING_OBJECT -} +func (m *_BACnetConstructedDataLoggingObject) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LOGGING_OBJECT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLoggingObject) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLoggingObject) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLoggingObject) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLoggingObject) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLoggingObject) GetActualValue() BACnetApplication /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLoggingObject factory function for _BACnetConstructedDataLoggingObject -func NewBACnetConstructedDataLoggingObject(loggingObject BACnetApplicationTagObjectIdentifier, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLoggingObject { +func NewBACnetConstructedDataLoggingObject( loggingObject BACnetApplicationTagObjectIdentifier , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLoggingObject { _result := &_BACnetConstructedDataLoggingObject{ - LoggingObject: loggingObject, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + LoggingObject: loggingObject, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLoggingObject(loggingObject BACnetApplicationTagObj // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLoggingObject(structType interface{}) BACnetConstructedDataLoggingObject { - if casted, ok := structType.(BACnetConstructedDataLoggingObject); ok { + if casted, ok := structType.(BACnetConstructedDataLoggingObject); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLoggingObject); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLoggingObject) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetConstructedDataLoggingObject) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLoggingObjectParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("loggingObject"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for loggingObject") } - _loggingObject, _loggingObjectErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_loggingObject, _loggingObjectErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _loggingObjectErr != nil { return nil, errors.Wrap(_loggingObjectErr, "Error parsing 'loggingObject' field of BACnetConstructedDataLoggingObject") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLoggingObjectParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetConstructedDataLoggingObject{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LoggingObject: loggingObject, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLoggingObject) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLoggingObject") } - // Simple Field (loggingObject) - if pushErr := writeBuffer.PushContext("loggingObject"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for loggingObject") - } - _loggingObjectErr := writeBuffer.WriteSerializable(ctx, m.GetLoggingObject()) - if popErr := writeBuffer.PopContext("loggingObject"); popErr != nil { - return errors.Wrap(popErr, "Error popping for loggingObject") - } - if _loggingObjectErr != nil { - return errors.Wrap(_loggingObjectErr, "Error serializing 'loggingObject' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (loggingObject) + if pushErr := writeBuffer.PushContext("loggingObject"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for loggingObject") + } + _loggingObjectErr := writeBuffer.WriteSerializable(ctx, m.GetLoggingObject()) + if popErr := writeBuffer.PopContext("loggingObject"); popErr != nil { + return errors.Wrap(popErr, "Error popping for loggingObject") + } + if _loggingObjectErr != nil { + return errors.Wrap(_loggingObjectErr, "Error serializing 'loggingObject' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLoggingObject"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLoggingObject") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLoggingObject) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLoggingObject) isBACnetConstructedDataLoggingObject() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLoggingObject) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLoggingRecord.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLoggingRecord.go index a768b568ed8..52847b29d3c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLoggingRecord.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLoggingRecord.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLoggingRecord is the corresponding interface of BACnetConstructedDataLoggingRecord type BACnetConstructedDataLoggingRecord interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLoggingRecordExactly interface { // _BACnetConstructedDataLoggingRecord is the data-structure of this message type _BACnetConstructedDataLoggingRecord struct { *_BACnetConstructedData - LoggingRecord BACnetAccumulatorRecord + LoggingRecord BACnetAccumulatorRecord } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLoggingRecord) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLoggingRecord) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLoggingRecord) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LOGGING_RECORD -} +func (m *_BACnetConstructedDataLoggingRecord) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LOGGING_RECORD} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLoggingRecord) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLoggingRecord) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLoggingRecord) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLoggingRecord) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLoggingRecord) GetActualValue() BACnetAccumulator /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLoggingRecord factory function for _BACnetConstructedDataLoggingRecord -func NewBACnetConstructedDataLoggingRecord(loggingRecord BACnetAccumulatorRecord, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLoggingRecord { +func NewBACnetConstructedDataLoggingRecord( loggingRecord BACnetAccumulatorRecord , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLoggingRecord { _result := &_BACnetConstructedDataLoggingRecord{ - LoggingRecord: loggingRecord, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + LoggingRecord: loggingRecord, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLoggingRecord(loggingRecord BACnetAccumulatorRecord // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLoggingRecord(structType interface{}) BACnetConstructedDataLoggingRecord { - if casted, ok := structType.(BACnetConstructedDataLoggingRecord); ok { + if casted, ok := structType.(BACnetConstructedDataLoggingRecord); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLoggingRecord); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLoggingRecord) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetConstructedDataLoggingRecord) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLoggingRecordParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("loggingRecord"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for loggingRecord") } - _loggingRecord, _loggingRecordErr := BACnetAccumulatorRecordParseWithBuffer(ctx, readBuffer) +_loggingRecord, _loggingRecordErr := BACnetAccumulatorRecordParseWithBuffer(ctx, readBuffer) if _loggingRecordErr != nil { return nil, errors.Wrap(_loggingRecordErr, "Error parsing 'loggingRecord' field of BACnetConstructedDataLoggingRecord") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLoggingRecordParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetConstructedDataLoggingRecord{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LoggingRecord: loggingRecord, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLoggingRecord) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLoggingRecord") } - // Simple Field (loggingRecord) - if pushErr := writeBuffer.PushContext("loggingRecord"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for loggingRecord") - } - _loggingRecordErr := writeBuffer.WriteSerializable(ctx, m.GetLoggingRecord()) - if popErr := writeBuffer.PopContext("loggingRecord"); popErr != nil { - return errors.Wrap(popErr, "Error popping for loggingRecord") - } - if _loggingRecordErr != nil { - return errors.Wrap(_loggingRecordErr, "Error serializing 'loggingRecord' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (loggingRecord) + if pushErr := writeBuffer.PushContext("loggingRecord"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for loggingRecord") + } + _loggingRecordErr := writeBuffer.WriteSerializable(ctx, m.GetLoggingRecord()) + if popErr := writeBuffer.PopContext("loggingRecord"); popErr != nil { + return errors.Wrap(popErr, "Error popping for loggingRecord") + } + if _loggingRecordErr != nil { + return errors.Wrap(_loggingRecordErr, "Error serializing 'loggingRecord' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLoggingRecord"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLoggingRecord") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLoggingRecord) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLoggingRecord) isBACnetConstructedDataLoggingRecord() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLoggingRecord) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLoggingType.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLoggingType.go index 77053dec522..a1a33b13689 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLoggingType.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLoggingType.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLoggingType is the corresponding interface of BACnetConstructedDataLoggingType type BACnetConstructedDataLoggingType interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLoggingTypeExactly interface { // _BACnetConstructedDataLoggingType is the data-structure of this message type _BACnetConstructedDataLoggingType struct { *_BACnetConstructedData - LoggingType BACnetLoggingTypeTagged + LoggingType BACnetLoggingTypeTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLoggingType) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLoggingType) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLoggingType) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LOGGING_TYPE -} +func (m *_BACnetConstructedDataLoggingType) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LOGGING_TYPE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLoggingType) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLoggingType) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLoggingType) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLoggingType) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLoggingType) GetActualValue() BACnetLoggingTypeTa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLoggingType factory function for _BACnetConstructedDataLoggingType -func NewBACnetConstructedDataLoggingType(loggingType BACnetLoggingTypeTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLoggingType { +func NewBACnetConstructedDataLoggingType( loggingType BACnetLoggingTypeTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLoggingType { _result := &_BACnetConstructedDataLoggingType{ - LoggingType: loggingType, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + LoggingType: loggingType, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLoggingType(loggingType BACnetLoggingTypeTagged, op // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLoggingType(structType interface{}) BACnetConstructedDataLoggingType { - if casted, ok := structType.(BACnetConstructedDataLoggingType); ok { + if casted, ok := structType.(BACnetConstructedDataLoggingType); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLoggingType); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLoggingType) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataLoggingType) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLoggingTypeParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("loggingType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for loggingType") } - _loggingType, _loggingTypeErr := BACnetLoggingTypeTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_loggingType, _loggingTypeErr := BACnetLoggingTypeTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _loggingTypeErr != nil { return nil, errors.Wrap(_loggingTypeErr, "Error parsing 'loggingType' field of BACnetConstructedDataLoggingType") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLoggingTypeParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataLoggingType{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LoggingType: loggingType, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLoggingType) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLoggingType") } - // Simple Field (loggingType) - if pushErr := writeBuffer.PushContext("loggingType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for loggingType") - } - _loggingTypeErr := writeBuffer.WriteSerializable(ctx, m.GetLoggingType()) - if popErr := writeBuffer.PopContext("loggingType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for loggingType") - } - if _loggingTypeErr != nil { - return errors.Wrap(_loggingTypeErr, "Error serializing 'loggingType' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (loggingType) + if pushErr := writeBuffer.PushContext("loggingType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for loggingType") + } + _loggingTypeErr := writeBuffer.WriteSerializable(ctx, m.GetLoggingType()) + if popErr := writeBuffer.PopContext("loggingType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for loggingType") + } + if _loggingTypeErr != nil { + return errors.Wrap(_loggingTypeErr, "Error serializing 'loggingType' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLoggingType"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLoggingType") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLoggingType) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLoggingType) isBACnetConstructedDataLoggingType() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLoggingType) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLoopAction.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLoopAction.go index eef9b6345fb..dc0ba9cf369 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLoopAction.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLoopAction.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLoopAction is the corresponding interface of BACnetConstructedDataLoopAction type BACnetConstructedDataLoopAction interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLoopActionExactly interface { // _BACnetConstructedDataLoopAction is the data-structure of this message type _BACnetConstructedDataLoopAction struct { *_BACnetConstructedData - Action BACnetActionTagged + Action BACnetActionTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLoopAction) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_LOOP -} +func (m *_BACnetConstructedDataLoopAction) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_LOOP} -func (m *_BACnetConstructedDataLoopAction) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ACTION -} +func (m *_BACnetConstructedDataLoopAction) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ACTION} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLoopAction) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLoopAction) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLoopAction) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLoopAction) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLoopAction) GetActualValue() BACnetActionTagged { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLoopAction factory function for _BACnetConstructedDataLoopAction -func NewBACnetConstructedDataLoopAction(action BACnetActionTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLoopAction { +func NewBACnetConstructedDataLoopAction( action BACnetActionTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLoopAction { _result := &_BACnetConstructedDataLoopAction{ - Action: action, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Action: action, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLoopAction(action BACnetActionTagged, openingTag BA // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLoopAction(structType interface{}) BACnetConstructedDataLoopAction { - if casted, ok := structType.(BACnetConstructedDataLoopAction); ok { + if casted, ok := structType.(BACnetConstructedDataLoopAction); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLoopAction); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLoopAction) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataLoopAction) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLoopActionParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("action"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for action") } - _action, _actionErr := BACnetActionTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_action, _actionErr := BACnetActionTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _actionErr != nil { return nil, errors.Wrap(_actionErr, "Error parsing 'action' field of BACnetConstructedDataLoopAction") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLoopActionParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetConstructedDataLoopAction{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Action: action, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLoopAction) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLoopAction") } - // Simple Field (action) - if pushErr := writeBuffer.PushContext("action"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for action") - } - _actionErr := writeBuffer.WriteSerializable(ctx, m.GetAction()) - if popErr := writeBuffer.PopContext("action"); popErr != nil { - return errors.Wrap(popErr, "Error popping for action") - } - if _actionErr != nil { - return errors.Wrap(_actionErr, "Error serializing 'action' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (action) + if pushErr := writeBuffer.PushContext("action"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for action") + } + _actionErr := writeBuffer.WriteSerializable(ctx, m.GetAction()) + if popErr := writeBuffer.PopContext("action"); popErr != nil { + return errors.Wrap(popErr, "Error popping for action") + } + if _actionErr != nil { + return errors.Wrap(_actionErr, "Error serializing 'action' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLoopAction"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLoopAction") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLoopAction) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLoopAction) isBACnetConstructedDataLoopAction() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLoopAction) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLoopAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLoopAll.go index 26ef0fae422..cdb31f6a3e1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLoopAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLoopAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLoopAll is the corresponding interface of BACnetConstructedDataLoopAll type BACnetConstructedDataLoopAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataLoopAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLoopAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_LOOP -} +func (m *_BACnetConstructedDataLoopAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_LOOP} -func (m *_BACnetConstructedDataLoopAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataLoopAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLoopAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLoopAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLoopAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLoopAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataLoopAll factory function for _BACnetConstructedDataLoopAll -func NewBACnetConstructedDataLoopAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLoopAll { +func NewBACnetConstructedDataLoopAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLoopAll { _result := &_BACnetConstructedDataLoopAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataLoopAll(openingTag BACnetOpeningTag, peekedTagHeade // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLoopAll(structType interface{}) BACnetConstructedDataLoopAll { - if casted, ok := structType.(BACnetConstructedDataLoopAll); ok { + if casted, ok := structType.(BACnetConstructedDataLoopAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLoopAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataLoopAll) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_BACnetConstructedDataLoopAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataLoopAllParseWithBuffer(ctx context.Context, readBuffer _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataLoopAllParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_BACnetConstructedDataLoopAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataLoopAll) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLoopAll) isBACnetConstructedDataLoopAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataLoopAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLoopPresentValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLoopPresentValue.go index fdcb27a7c64..efdc987429a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLoopPresentValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLoopPresentValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLoopPresentValue is the corresponding interface of BACnetConstructedDataLoopPresentValue type BACnetConstructedDataLoopPresentValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLoopPresentValueExactly interface { // _BACnetConstructedDataLoopPresentValue is the data-structure of this message type _BACnetConstructedDataLoopPresentValue struct { *_BACnetConstructedData - PresentValue BACnetApplicationTagReal + PresentValue BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLoopPresentValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_LOOP -} +func (m *_BACnetConstructedDataLoopPresentValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_LOOP} -func (m *_BACnetConstructedDataLoopPresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PRESENT_VALUE -} +func (m *_BACnetConstructedDataLoopPresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PRESENT_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLoopPresentValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLoopPresentValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLoopPresentValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLoopPresentValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLoopPresentValue) GetActualValue() BACnetApplicat /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLoopPresentValue factory function for _BACnetConstructedDataLoopPresentValue -func NewBACnetConstructedDataLoopPresentValue(presentValue BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLoopPresentValue { +func NewBACnetConstructedDataLoopPresentValue( presentValue BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLoopPresentValue { _result := &_BACnetConstructedDataLoopPresentValue{ - PresentValue: presentValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PresentValue: presentValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLoopPresentValue(presentValue BACnetApplicationTagR // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLoopPresentValue(structType interface{}) BACnetConstructedDataLoopPresentValue { - if casted, ok := structType.(BACnetConstructedDataLoopPresentValue); ok { + if casted, ok := structType.(BACnetConstructedDataLoopPresentValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLoopPresentValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLoopPresentValue) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetConstructedDataLoopPresentValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLoopPresentValueParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("presentValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for presentValue") } - _presentValue, _presentValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_presentValue, _presentValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _presentValueErr != nil { return nil, errors.Wrap(_presentValueErr, "Error parsing 'presentValue' field of BACnetConstructedDataLoopPresentValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLoopPresentValueParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_BACnetConstructedDataLoopPresentValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PresentValue: presentValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLoopPresentValue) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLoopPresentValue") } - // Simple Field (presentValue) - if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for presentValue") - } - _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) - if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for presentValue") - } - if _presentValueErr != nil { - return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (presentValue) + if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for presentValue") + } + _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) + if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for presentValue") + } + if _presentValueErr != nil { + return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLoopPresentValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLoopPresentValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLoopPresentValue) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLoopPresentValue) isBACnetConstructedDataLoopPresentValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLoopPresentValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLowDiffLimit.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLowDiffLimit.go index 360dd3c6964..507fe52780e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLowDiffLimit.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLowDiffLimit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLowDiffLimit is the corresponding interface of BACnetConstructedDataLowDiffLimit type BACnetConstructedDataLowDiffLimit interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLowDiffLimitExactly interface { // _BACnetConstructedDataLowDiffLimit is the data-structure of this message type _BACnetConstructedDataLowDiffLimit struct { *_BACnetConstructedData - LowDiffLimit BACnetOptionalREAL + LowDiffLimit BACnetOptionalREAL } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLowDiffLimit) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLowDiffLimit) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLowDiffLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LOW_DIFF_LIMIT -} +func (m *_BACnetConstructedDataLowDiffLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LOW_DIFF_LIMIT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLowDiffLimit) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLowDiffLimit) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLowDiffLimit) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLowDiffLimit) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLowDiffLimit) GetActualValue() BACnetOptionalREAL /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLowDiffLimit factory function for _BACnetConstructedDataLowDiffLimit -func NewBACnetConstructedDataLowDiffLimit(lowDiffLimit BACnetOptionalREAL, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLowDiffLimit { +func NewBACnetConstructedDataLowDiffLimit( lowDiffLimit BACnetOptionalREAL , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLowDiffLimit { _result := &_BACnetConstructedDataLowDiffLimit{ - LowDiffLimit: lowDiffLimit, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + LowDiffLimit: lowDiffLimit, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLowDiffLimit(lowDiffLimit BACnetOptionalREAL, openi // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLowDiffLimit(structType interface{}) BACnetConstructedDataLowDiffLimit { - if casted, ok := structType.(BACnetConstructedDataLowDiffLimit); ok { + if casted, ok := structType.(BACnetConstructedDataLowDiffLimit); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLowDiffLimit); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLowDiffLimit) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetConstructedDataLowDiffLimit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLowDiffLimitParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("lowDiffLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lowDiffLimit") } - _lowDiffLimit, _lowDiffLimitErr := BACnetOptionalREALParseWithBuffer(ctx, readBuffer) +_lowDiffLimit, _lowDiffLimitErr := BACnetOptionalREALParseWithBuffer(ctx, readBuffer) if _lowDiffLimitErr != nil { return nil, errors.Wrap(_lowDiffLimitErr, "Error parsing 'lowDiffLimit' field of BACnetConstructedDataLowDiffLimit") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLowDiffLimitParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetConstructedDataLowDiffLimit{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LowDiffLimit: lowDiffLimit, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLowDiffLimit) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLowDiffLimit") } - // Simple Field (lowDiffLimit) - if pushErr := writeBuffer.PushContext("lowDiffLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lowDiffLimit") - } - _lowDiffLimitErr := writeBuffer.WriteSerializable(ctx, m.GetLowDiffLimit()) - if popErr := writeBuffer.PopContext("lowDiffLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lowDiffLimit") - } - if _lowDiffLimitErr != nil { - return errors.Wrap(_lowDiffLimitErr, "Error serializing 'lowDiffLimit' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (lowDiffLimit) + if pushErr := writeBuffer.PushContext("lowDiffLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lowDiffLimit") + } + _lowDiffLimitErr := writeBuffer.WriteSerializable(ctx, m.GetLowDiffLimit()) + if popErr := writeBuffer.PopContext("lowDiffLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lowDiffLimit") + } + if _lowDiffLimitErr != nil { + return errors.Wrap(_lowDiffLimitErr, "Error serializing 'lowDiffLimit' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLowDiffLimit"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLowDiffLimit") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLowDiffLimit) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLowDiffLimit) isBACnetConstructedDataLowDiffLimit() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLowDiffLimit) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLowLimit.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLowLimit.go index b1ae794e905..e12b72efe37 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLowLimit.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLowLimit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLowLimit is the corresponding interface of BACnetConstructedDataLowLimit type BACnetConstructedDataLowLimit interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLowLimitExactly interface { // _BACnetConstructedDataLowLimit is the data-structure of this message type _BACnetConstructedDataLowLimit struct { *_BACnetConstructedData - LowLimit BACnetApplicationTagReal + LowLimit BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLowLimit) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLowLimit) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLowLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LOW_LIMIT -} +func (m *_BACnetConstructedDataLowLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LOW_LIMIT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLowLimit) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLowLimit) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLowLimit) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLowLimit) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLowLimit) GetActualValue() BACnetApplicationTagRe /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLowLimit factory function for _BACnetConstructedDataLowLimit -func NewBACnetConstructedDataLowLimit(lowLimit BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLowLimit { +func NewBACnetConstructedDataLowLimit( lowLimit BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLowLimit { _result := &_BACnetConstructedDataLowLimit{ - LowLimit: lowLimit, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + LowLimit: lowLimit, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLowLimit(lowLimit BACnetApplicationTagReal, opening // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLowLimit(structType interface{}) BACnetConstructedDataLowLimit { - if casted, ok := structType.(BACnetConstructedDataLowLimit); ok { + if casted, ok := structType.(BACnetConstructedDataLowLimit); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLowLimit); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLowLimit) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetConstructedDataLowLimit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLowLimitParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("lowLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lowLimit") } - _lowLimit, _lowLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_lowLimit, _lowLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _lowLimitErr != nil { return nil, errors.Wrap(_lowLimitErr, "Error parsing 'lowLimit' field of BACnetConstructedDataLowLimit") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLowLimitParseWithBuffer(ctx context.Context, readBuffe // Create a partially initialized instance _child := &_BACnetConstructedDataLowLimit{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LowLimit: lowLimit, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLowLimit) SerializeWithWriteBuffer(ctx context.Co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLowLimit") } - // Simple Field (lowLimit) - if pushErr := writeBuffer.PushContext("lowLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lowLimit") - } - _lowLimitErr := writeBuffer.WriteSerializable(ctx, m.GetLowLimit()) - if popErr := writeBuffer.PopContext("lowLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lowLimit") - } - if _lowLimitErr != nil { - return errors.Wrap(_lowLimitErr, "Error serializing 'lowLimit' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (lowLimit) + if pushErr := writeBuffer.PushContext("lowLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lowLimit") + } + _lowLimitErr := writeBuffer.WriteSerializable(ctx, m.GetLowLimit()) + if popErr := writeBuffer.PopContext("lowLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lowLimit") + } + if _lowLimitErr != nil { + return errors.Wrap(_lowLimitErr, "Error serializing 'lowLimit' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLowLimit"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLowLimit") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLowLimit) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLowLimit) isBACnetConstructedDataLowLimit() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLowLimit) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLowerDeck.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLowerDeck.go index 2742cdf438e..ec874762f65 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLowerDeck.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataLowerDeck.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataLowerDeck is the corresponding interface of BACnetConstructedDataLowerDeck type BACnetConstructedDataLowerDeck interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataLowerDeckExactly interface { // _BACnetConstructedDataLowerDeck is the data-structure of this message type _BACnetConstructedDataLowerDeck struct { *_BACnetConstructedData - LowerDeck BACnetApplicationTagObjectIdentifier + LowerDeck BACnetApplicationTagObjectIdentifier } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataLowerDeck) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataLowerDeck) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataLowerDeck) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LOWER_DECK -} +func (m *_BACnetConstructedDataLowerDeck) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LOWER_DECK} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataLowerDeck) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataLowerDeck) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataLowerDeck) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataLowerDeck) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataLowerDeck) GetActualValue() BACnetApplicationTagO /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataLowerDeck factory function for _BACnetConstructedDataLowerDeck -func NewBACnetConstructedDataLowerDeck(lowerDeck BACnetApplicationTagObjectIdentifier, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataLowerDeck { +func NewBACnetConstructedDataLowerDeck( lowerDeck BACnetApplicationTagObjectIdentifier , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataLowerDeck { _result := &_BACnetConstructedDataLowerDeck{ - LowerDeck: lowerDeck, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + LowerDeck: lowerDeck, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataLowerDeck(lowerDeck BACnetApplicationTagObjectIdent // Deprecated: use the interface for direct cast func CastBACnetConstructedDataLowerDeck(structType interface{}) BACnetConstructedDataLowerDeck { - if casted, ok := structType.(BACnetConstructedDataLowerDeck); ok { + if casted, ok := structType.(BACnetConstructedDataLowerDeck); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataLowerDeck); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataLowerDeck) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetConstructedDataLowerDeck) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataLowerDeckParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("lowerDeck"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lowerDeck") } - _lowerDeck, _lowerDeckErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_lowerDeck, _lowerDeckErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _lowerDeckErr != nil { return nil, errors.Wrap(_lowerDeckErr, "Error parsing 'lowerDeck' field of BACnetConstructedDataLowerDeck") } @@ -186,7 +188,7 @@ func BACnetConstructedDataLowerDeckParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_BACnetConstructedDataLowerDeck{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LowerDeck: lowerDeck, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataLowerDeck) SerializeWithWriteBuffer(ctx context.C return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataLowerDeck") } - // Simple Field (lowerDeck) - if pushErr := writeBuffer.PushContext("lowerDeck"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lowerDeck") - } - _lowerDeckErr := writeBuffer.WriteSerializable(ctx, m.GetLowerDeck()) - if popErr := writeBuffer.PopContext("lowerDeck"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lowerDeck") - } - if _lowerDeckErr != nil { - return errors.Wrap(_lowerDeckErr, "Error serializing 'lowerDeck' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (lowerDeck) + if pushErr := writeBuffer.PushContext("lowerDeck"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lowerDeck") + } + _lowerDeckErr := writeBuffer.WriteSerializable(ctx, m.GetLowerDeck()) + if popErr := writeBuffer.PopContext("lowerDeck"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lowerDeck") + } + if _lowerDeckErr != nil { + return errors.Wrap(_lowerDeckErr, "Error serializing 'lowerDeck' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataLowerDeck"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataLowerDeck") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataLowerDeck) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataLowerDeck) isBACnetConstructedDataLowerDeck() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataLowerDeck) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMACAddress.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMACAddress.go index 733036a596a..2770db1d0ab 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMACAddress.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMACAddress.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataMACAddress is the corresponding interface of BACnetConstructedDataMACAddress type BACnetConstructedDataMACAddress interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataMACAddressExactly interface { // _BACnetConstructedDataMACAddress is the data-structure of this message type _BACnetConstructedDataMACAddress struct { *_BACnetConstructedData - MacAddress BACnetApplicationTagOctetString + MacAddress BACnetApplicationTagOctetString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataMACAddress) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataMACAddress) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataMACAddress) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MAC_ADDRESS -} +func (m *_BACnetConstructedDataMACAddress) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MAC_ADDRESS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataMACAddress) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataMACAddress) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataMACAddress) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataMACAddress) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataMACAddress) GetActualValue() BACnetApplicationTag /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataMACAddress factory function for _BACnetConstructedDataMACAddress -func NewBACnetConstructedDataMACAddress(macAddress BACnetApplicationTagOctetString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataMACAddress { +func NewBACnetConstructedDataMACAddress( macAddress BACnetApplicationTagOctetString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataMACAddress { _result := &_BACnetConstructedDataMACAddress{ - MacAddress: macAddress, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + MacAddress: macAddress, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataMACAddress(macAddress BACnetApplicationTagOctetStri // Deprecated: use the interface for direct cast func CastBACnetConstructedDataMACAddress(structType interface{}) BACnetConstructedDataMACAddress { - if casted, ok := structType.(BACnetConstructedDataMACAddress); ok { + if casted, ok := structType.(BACnetConstructedDataMACAddress); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataMACAddress); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataMACAddress) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataMACAddress) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataMACAddressParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("macAddress"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for macAddress") } - _macAddress, _macAddressErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_macAddress, _macAddressErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _macAddressErr != nil { return nil, errors.Wrap(_macAddressErr, "Error parsing 'macAddress' field of BACnetConstructedDataMACAddress") } @@ -186,7 +188,7 @@ func BACnetConstructedDataMACAddressParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetConstructedDataMACAddress{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, MacAddress: macAddress, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataMACAddress) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataMACAddress") } - // Simple Field (macAddress) - if pushErr := writeBuffer.PushContext("macAddress"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for macAddress") - } - _macAddressErr := writeBuffer.WriteSerializable(ctx, m.GetMacAddress()) - if popErr := writeBuffer.PopContext("macAddress"); popErr != nil { - return errors.Wrap(popErr, "Error popping for macAddress") - } - if _macAddressErr != nil { - return errors.Wrap(_macAddressErr, "Error serializing 'macAddress' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (macAddress) + if pushErr := writeBuffer.PushContext("macAddress"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for macAddress") + } + _macAddressErr := writeBuffer.WriteSerializable(ctx, m.GetMacAddress()) + if popErr := writeBuffer.PopContext("macAddress"); popErr != nil { + return errors.Wrap(popErr, "Error popping for macAddress") + } + if _macAddressErr != nil { + return errors.Wrap(_macAddressErr, "Error serializing 'macAddress' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataMACAddress"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataMACAddress") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataMACAddress) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataMACAddress) isBACnetConstructedDataMACAddress() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataMACAddress) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMachineRoomID.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMachineRoomID.go index 5426c27cf04..ce070951a94 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMachineRoomID.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMachineRoomID.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataMachineRoomID is the corresponding interface of BACnetConstructedDataMachineRoomID type BACnetConstructedDataMachineRoomID interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataMachineRoomIDExactly interface { // _BACnetConstructedDataMachineRoomID is the data-structure of this message type _BACnetConstructedDataMachineRoomID struct { *_BACnetConstructedData - MachineRoomId BACnetApplicationTagObjectIdentifier + MachineRoomId BACnetApplicationTagObjectIdentifier } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataMachineRoomID) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataMachineRoomID) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataMachineRoomID) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MACHINE_ROOM_ID -} +func (m *_BACnetConstructedDataMachineRoomID) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MACHINE_ROOM_ID} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataMachineRoomID) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataMachineRoomID) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataMachineRoomID) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataMachineRoomID) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataMachineRoomID) GetActualValue() BACnetApplication /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataMachineRoomID factory function for _BACnetConstructedDataMachineRoomID -func NewBACnetConstructedDataMachineRoomID(machineRoomId BACnetApplicationTagObjectIdentifier, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataMachineRoomID { +func NewBACnetConstructedDataMachineRoomID( machineRoomId BACnetApplicationTagObjectIdentifier , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataMachineRoomID { _result := &_BACnetConstructedDataMachineRoomID{ - MachineRoomId: machineRoomId, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + MachineRoomId: machineRoomId, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataMachineRoomID(machineRoomId BACnetApplicationTagObj // Deprecated: use the interface for direct cast func CastBACnetConstructedDataMachineRoomID(structType interface{}) BACnetConstructedDataMachineRoomID { - if casted, ok := structType.(BACnetConstructedDataMachineRoomID); ok { + if casted, ok := structType.(BACnetConstructedDataMachineRoomID); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataMachineRoomID); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataMachineRoomID) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetConstructedDataMachineRoomID) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataMachineRoomIDParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("machineRoomId"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for machineRoomId") } - _machineRoomId, _machineRoomIdErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_machineRoomId, _machineRoomIdErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _machineRoomIdErr != nil { return nil, errors.Wrap(_machineRoomIdErr, "Error parsing 'machineRoomId' field of BACnetConstructedDataMachineRoomID") } @@ -186,7 +188,7 @@ func BACnetConstructedDataMachineRoomIDParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetConstructedDataMachineRoomID{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, MachineRoomId: machineRoomId, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataMachineRoomID) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataMachineRoomID") } - // Simple Field (machineRoomId) - if pushErr := writeBuffer.PushContext("machineRoomId"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for machineRoomId") - } - _machineRoomIdErr := writeBuffer.WriteSerializable(ctx, m.GetMachineRoomId()) - if popErr := writeBuffer.PopContext("machineRoomId"); popErr != nil { - return errors.Wrap(popErr, "Error popping for machineRoomId") - } - if _machineRoomIdErr != nil { - return errors.Wrap(_machineRoomIdErr, "Error serializing 'machineRoomId' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (machineRoomId) + if pushErr := writeBuffer.PushContext("machineRoomId"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for machineRoomId") + } + _machineRoomIdErr := writeBuffer.WriteSerializable(ctx, m.GetMachineRoomId()) + if popErr := writeBuffer.PopContext("machineRoomId"); popErr != nil { + return errors.Wrap(popErr, "Error popping for machineRoomId") + } + if _machineRoomIdErr != nil { + return errors.Wrap(_machineRoomIdErr, "Error serializing 'machineRoomId' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataMachineRoomID"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataMachineRoomID") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataMachineRoomID) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataMachineRoomID) isBACnetConstructedDataMachineRoomID() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataMachineRoomID) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaintenanceRequired.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaintenanceRequired.go index 26f9db37990..69a9b739528 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaintenanceRequired.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaintenanceRequired.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataMaintenanceRequired is the corresponding interface of BACnetConstructedDataMaintenanceRequired type BACnetConstructedDataMaintenanceRequired interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataMaintenanceRequiredExactly interface { // _BACnetConstructedDataMaintenanceRequired is the data-structure of this message type _BACnetConstructedDataMaintenanceRequired struct { *_BACnetConstructedData - MaintenanceRequired BACnetMaintenanceTagged + MaintenanceRequired BACnetMaintenanceTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataMaintenanceRequired) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataMaintenanceRequired) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataMaintenanceRequired) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MAINTENANCE_REQUIRED -} +func (m *_BACnetConstructedDataMaintenanceRequired) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MAINTENANCE_REQUIRED} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataMaintenanceRequired) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataMaintenanceRequired) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataMaintenanceRequired) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataMaintenanceRequired) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataMaintenanceRequired) GetActualValue() BACnetMaint /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataMaintenanceRequired factory function for _BACnetConstructedDataMaintenanceRequired -func NewBACnetConstructedDataMaintenanceRequired(maintenanceRequired BACnetMaintenanceTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataMaintenanceRequired { +func NewBACnetConstructedDataMaintenanceRequired( maintenanceRequired BACnetMaintenanceTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataMaintenanceRequired { _result := &_BACnetConstructedDataMaintenanceRequired{ - MaintenanceRequired: maintenanceRequired, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + MaintenanceRequired: maintenanceRequired, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataMaintenanceRequired(maintenanceRequired BACnetMaint // Deprecated: use the interface for direct cast func CastBACnetConstructedDataMaintenanceRequired(structType interface{}) BACnetConstructedDataMaintenanceRequired { - if casted, ok := structType.(BACnetConstructedDataMaintenanceRequired); ok { + if casted, ok := structType.(BACnetConstructedDataMaintenanceRequired); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataMaintenanceRequired); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataMaintenanceRequired) GetLengthInBits(ctx context. return lengthInBits } + func (m *_BACnetConstructedDataMaintenanceRequired) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataMaintenanceRequiredParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("maintenanceRequired"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for maintenanceRequired") } - _maintenanceRequired, _maintenanceRequiredErr := BACnetMaintenanceTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_maintenanceRequired, _maintenanceRequiredErr := BACnetMaintenanceTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _maintenanceRequiredErr != nil { return nil, errors.Wrap(_maintenanceRequiredErr, "Error parsing 'maintenanceRequired' field of BACnetConstructedDataMaintenanceRequired") } @@ -186,7 +188,7 @@ func BACnetConstructedDataMaintenanceRequiredParseWithBuffer(ctx context.Context // Create a partially initialized instance _child := &_BACnetConstructedDataMaintenanceRequired{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, MaintenanceRequired: maintenanceRequired, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataMaintenanceRequired) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataMaintenanceRequired") } - // Simple Field (maintenanceRequired) - if pushErr := writeBuffer.PushContext("maintenanceRequired"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for maintenanceRequired") - } - _maintenanceRequiredErr := writeBuffer.WriteSerializable(ctx, m.GetMaintenanceRequired()) - if popErr := writeBuffer.PopContext("maintenanceRequired"); popErr != nil { - return errors.Wrap(popErr, "Error popping for maintenanceRequired") - } - if _maintenanceRequiredErr != nil { - return errors.Wrap(_maintenanceRequiredErr, "Error serializing 'maintenanceRequired' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (maintenanceRequired) + if pushErr := writeBuffer.PushContext("maintenanceRequired"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for maintenanceRequired") + } + _maintenanceRequiredErr := writeBuffer.WriteSerializable(ctx, m.GetMaintenanceRequired()) + if popErr := writeBuffer.PopContext("maintenanceRequired"); popErr != nil { + return errors.Wrap(popErr, "Error popping for maintenanceRequired") + } + if _maintenanceRequiredErr != nil { + return errors.Wrap(_maintenanceRequiredErr, "Error serializing 'maintenanceRequired' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataMaintenanceRequired"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataMaintenanceRequired") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataMaintenanceRequired) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataMaintenanceRequired) isBACnetConstructedDataMaintenanceRequired() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataMaintenanceRequired) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMakingCarCall.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMakingCarCall.go index f41120937ce..243a97f1be1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMakingCarCall.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMakingCarCall.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataMakingCarCall is the corresponding interface of BACnetConstructedDataMakingCarCall type BACnetConstructedDataMakingCarCall interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataMakingCarCallExactly interface { // _BACnetConstructedDataMakingCarCall is the data-structure of this message type _BACnetConstructedDataMakingCarCall struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - MakingCarCall []BACnetApplicationTagUnsignedInteger + NumberOfDataElements BACnetApplicationTagUnsignedInteger + MakingCarCall []BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataMakingCarCall) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataMakingCarCall) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataMakingCarCall) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MAKING_CAR_CALL -} +func (m *_BACnetConstructedDataMakingCarCall) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MAKING_CAR_CALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataMakingCarCall) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataMakingCarCall) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataMakingCarCall) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataMakingCarCall) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataMakingCarCall) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataMakingCarCall factory function for _BACnetConstructedDataMakingCarCall -func NewBACnetConstructedDataMakingCarCall(numberOfDataElements BACnetApplicationTagUnsignedInteger, makingCarCall []BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataMakingCarCall { +func NewBACnetConstructedDataMakingCarCall( numberOfDataElements BACnetApplicationTagUnsignedInteger , makingCarCall []BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataMakingCarCall { _result := &_BACnetConstructedDataMakingCarCall{ - NumberOfDataElements: numberOfDataElements, - MakingCarCall: makingCarCall, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + MakingCarCall: makingCarCall, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataMakingCarCall(numberOfDataElements BACnetApplicatio // Deprecated: use the interface for direct cast func CastBACnetConstructedDataMakingCarCall(structType interface{}) BACnetConstructedDataMakingCarCall { - if casted, ok := structType.(BACnetConstructedDataMakingCarCall); ok { + if casted, ok := structType.(BACnetConstructedDataMakingCarCall); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataMakingCarCall); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataMakingCarCall) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetConstructedDataMakingCarCall) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataMakingCarCallParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataMakingCarCallParseWithBuffer(ctx context.Context, read // Terminated array var makingCarCall []BACnetApplicationTagUnsignedInteger { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'makingCarCall' field of BACnetConstructedDataMakingCarCall") } @@ -235,11 +237,11 @@ func BACnetConstructedDataMakingCarCallParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetConstructedDataMakingCarCall{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - MakingCarCall: makingCarCall, + MakingCarCall: makingCarCall, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataMakingCarCall) SerializeWithWriteBuffer(ctx conte if pushErr := writeBuffer.PushContext("BACnetConstructedDataMakingCarCall"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataMakingCarCall") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (makingCarCall) - if pushErr := writeBuffer.PushContext("makingCarCall", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for makingCarCall") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetMakingCarCall() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetMakingCarCall()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'makingCarCall' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("makingCarCall", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for makingCarCall") + } + + // Array Field (makingCarCall) + if pushErr := writeBuffer.PushContext("makingCarCall", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for makingCarCall") + } + for _curItem, _element := range m.GetMakingCarCall() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetMakingCarCall()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'makingCarCall' field") } + } + if popErr := writeBuffer.PopContext("makingCarCall", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for makingCarCall") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataMakingCarCall"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataMakingCarCall") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataMakingCarCall) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataMakingCarCall) isBACnetConstructedDataMakingCarCall() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataMakingCarCall) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataManipulatedVariableReference.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataManipulatedVariableReference.go index e7bba2de14e..b43c1b52399 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataManipulatedVariableReference.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataManipulatedVariableReference.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataManipulatedVariableReference is the corresponding interface of BACnetConstructedDataManipulatedVariableReference type BACnetConstructedDataManipulatedVariableReference interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataManipulatedVariableReferenceExactly interface { // _BACnetConstructedDataManipulatedVariableReference is the data-structure of this message type _BACnetConstructedDataManipulatedVariableReference struct { *_BACnetConstructedData - ManipulatedVariableReference BACnetObjectPropertyReference + ManipulatedVariableReference BACnetObjectPropertyReference } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataManipulatedVariableReference) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataManipulatedVariableReference) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataManipulatedVariableReference) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MANIPULATED_VARIABLE_REFERENCE -} +func (m *_BACnetConstructedDataManipulatedVariableReference) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MANIPULATED_VARIABLE_REFERENCE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataManipulatedVariableReference) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataManipulatedVariableReference) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataManipulatedVariableReference) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataManipulatedVariableReference) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataManipulatedVariableReference) GetActualValue() BA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataManipulatedVariableReference factory function for _BACnetConstructedDataManipulatedVariableReference -func NewBACnetConstructedDataManipulatedVariableReference(manipulatedVariableReference BACnetObjectPropertyReference, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataManipulatedVariableReference { +func NewBACnetConstructedDataManipulatedVariableReference( manipulatedVariableReference BACnetObjectPropertyReference , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataManipulatedVariableReference { _result := &_BACnetConstructedDataManipulatedVariableReference{ ManipulatedVariableReference: manipulatedVariableReference, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataManipulatedVariableReference(manipulatedVariableRef // Deprecated: use the interface for direct cast func CastBACnetConstructedDataManipulatedVariableReference(structType interface{}) BACnetConstructedDataManipulatedVariableReference { - if casted, ok := structType.(BACnetConstructedDataManipulatedVariableReference); ok { + if casted, ok := structType.(BACnetConstructedDataManipulatedVariableReference); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataManipulatedVariableReference); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataManipulatedVariableReference) GetLengthInBits(ctx return lengthInBits } + func (m *_BACnetConstructedDataManipulatedVariableReference) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataManipulatedVariableReferenceParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("manipulatedVariableReference"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for manipulatedVariableReference") } - _manipulatedVariableReference, _manipulatedVariableReferenceErr := BACnetObjectPropertyReferenceParseWithBuffer(ctx, readBuffer) +_manipulatedVariableReference, _manipulatedVariableReferenceErr := BACnetObjectPropertyReferenceParseWithBuffer(ctx, readBuffer) if _manipulatedVariableReferenceErr != nil { return nil, errors.Wrap(_manipulatedVariableReferenceErr, "Error parsing 'manipulatedVariableReference' field of BACnetConstructedDataManipulatedVariableReference") } @@ -186,7 +188,7 @@ func BACnetConstructedDataManipulatedVariableReferenceParseWithBuffer(ctx contex // Create a partially initialized instance _child := &_BACnetConstructedDataManipulatedVariableReference{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ManipulatedVariableReference: manipulatedVariableReference, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataManipulatedVariableReference) SerializeWithWriteB return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataManipulatedVariableReference") } - // Simple Field (manipulatedVariableReference) - if pushErr := writeBuffer.PushContext("manipulatedVariableReference"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for manipulatedVariableReference") - } - _manipulatedVariableReferenceErr := writeBuffer.WriteSerializable(ctx, m.GetManipulatedVariableReference()) - if popErr := writeBuffer.PopContext("manipulatedVariableReference"); popErr != nil { - return errors.Wrap(popErr, "Error popping for manipulatedVariableReference") - } - if _manipulatedVariableReferenceErr != nil { - return errors.Wrap(_manipulatedVariableReferenceErr, "Error serializing 'manipulatedVariableReference' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (manipulatedVariableReference) + if pushErr := writeBuffer.PushContext("manipulatedVariableReference"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for manipulatedVariableReference") + } + _manipulatedVariableReferenceErr := writeBuffer.WriteSerializable(ctx, m.GetManipulatedVariableReference()) + if popErr := writeBuffer.PopContext("manipulatedVariableReference"); popErr != nil { + return errors.Wrap(popErr, "Error popping for manipulatedVariableReference") + } + if _manipulatedVariableReferenceErr != nil { + return errors.Wrap(_manipulatedVariableReferenceErr, "Error serializing 'manipulatedVariableReference' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataManipulatedVariableReference"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataManipulatedVariableReference") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataManipulatedVariableReference) SerializeWithWriteB return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataManipulatedVariableReference) isBACnetConstructedDataManipulatedVariableReference() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataManipulatedVariableReference) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataManualSlaveAddressBinding.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataManualSlaveAddressBinding.go index 41022d61098..d09b10aadda 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataManualSlaveAddressBinding.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataManualSlaveAddressBinding.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataManualSlaveAddressBinding is the corresponding interface of BACnetConstructedDataManualSlaveAddressBinding type BACnetConstructedDataManualSlaveAddressBinding interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataManualSlaveAddressBindingExactly interface { // _BACnetConstructedDataManualSlaveAddressBinding is the data-structure of this message type _BACnetConstructedDataManualSlaveAddressBinding struct { *_BACnetConstructedData - ManualSlaveAddressBinding []BACnetAddressBinding + ManualSlaveAddressBinding []BACnetAddressBinding } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataManualSlaveAddressBinding) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataManualSlaveAddressBinding) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataManualSlaveAddressBinding) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MANUAL_SLAVE_ADDRESS_BINDING -} +func (m *_BACnetConstructedDataManualSlaveAddressBinding) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MANUAL_SLAVE_ADDRESS_BINDING} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataManualSlaveAddressBinding) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataManualSlaveAddressBinding) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataManualSlaveAddressBinding) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataManualSlaveAddressBinding) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataManualSlaveAddressBinding) GetManualSlaveAddressB /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataManualSlaveAddressBinding factory function for _BACnetConstructedDataManualSlaveAddressBinding -func NewBACnetConstructedDataManualSlaveAddressBinding(manualSlaveAddressBinding []BACnetAddressBinding, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataManualSlaveAddressBinding { +func NewBACnetConstructedDataManualSlaveAddressBinding( manualSlaveAddressBinding []BACnetAddressBinding , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataManualSlaveAddressBinding { _result := &_BACnetConstructedDataManualSlaveAddressBinding{ ManualSlaveAddressBinding: manualSlaveAddressBinding, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataManualSlaveAddressBinding(manualSlaveAddressBinding // Deprecated: use the interface for direct cast func CastBACnetConstructedDataManualSlaveAddressBinding(structType interface{}) BACnetConstructedDataManualSlaveAddressBinding { - if casted, ok := structType.(BACnetConstructedDataManualSlaveAddressBinding); ok { + if casted, ok := structType.(BACnetConstructedDataManualSlaveAddressBinding); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataManualSlaveAddressBinding); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataManualSlaveAddressBinding) GetLengthInBits(ctx co return lengthInBits } + func (m *_BACnetConstructedDataManualSlaveAddressBinding) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataManualSlaveAddressBindingParseWithBuffer(ctx context.C // Terminated array var manualSlaveAddressBinding []BACnetAddressBinding { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetAddressBindingParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetAddressBindingParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'manualSlaveAddressBinding' field of BACnetConstructedDataManualSlaveAddressBinding") } @@ -173,7 +175,7 @@ func BACnetConstructedDataManualSlaveAddressBindingParseWithBuffer(ctx context.C // Create a partially initialized instance _child := &_BACnetConstructedDataManualSlaveAddressBinding{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ManualSlaveAddressBinding: manualSlaveAddressBinding, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataManualSlaveAddressBinding) SerializeWithWriteBuff return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataManualSlaveAddressBinding") } - // Array Field (manualSlaveAddressBinding) - if pushErr := writeBuffer.PushContext("manualSlaveAddressBinding", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for manualSlaveAddressBinding") - } - for _curItem, _element := range m.GetManualSlaveAddressBinding() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetManualSlaveAddressBinding()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'manualSlaveAddressBinding' field") - } - } - if popErr := writeBuffer.PopContext("manualSlaveAddressBinding", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for manualSlaveAddressBinding") + // Array Field (manualSlaveAddressBinding) + if pushErr := writeBuffer.PushContext("manualSlaveAddressBinding", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for manualSlaveAddressBinding") + } + for _curItem, _element := range m.GetManualSlaveAddressBinding() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetManualSlaveAddressBinding()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'manualSlaveAddressBinding' field") } + } + if popErr := writeBuffer.PopContext("manualSlaveAddressBinding", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for manualSlaveAddressBinding") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataManualSlaveAddressBinding"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataManualSlaveAddressBinding") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataManualSlaveAddressBinding) SerializeWithWriteBuff return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataManualSlaveAddressBinding) isBACnetConstructedDataManualSlaveAddressBinding() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataManualSlaveAddressBinding) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaskedAlarmValues.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaskedAlarmValues.go index 798cf567c2e..b16e6c817e5 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaskedAlarmValues.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaskedAlarmValues.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataMaskedAlarmValues is the corresponding interface of BACnetConstructedDataMaskedAlarmValues type BACnetConstructedDataMaskedAlarmValues interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataMaskedAlarmValuesExactly interface { // _BACnetConstructedDataMaskedAlarmValues is the data-structure of this message type _BACnetConstructedDataMaskedAlarmValues struct { *_BACnetConstructedData - MaskedAlarmValues []BACnetDoorAlarmStateTagged + MaskedAlarmValues []BACnetDoorAlarmStateTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataMaskedAlarmValues) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataMaskedAlarmValues) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataMaskedAlarmValues) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MASKED_ALARM_VALUES -} +func (m *_BACnetConstructedDataMaskedAlarmValues) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MASKED_ALARM_VALUES} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataMaskedAlarmValues) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataMaskedAlarmValues) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataMaskedAlarmValues) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataMaskedAlarmValues) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataMaskedAlarmValues) GetMaskedAlarmValues() []BACne /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataMaskedAlarmValues factory function for _BACnetConstructedDataMaskedAlarmValues -func NewBACnetConstructedDataMaskedAlarmValues(maskedAlarmValues []BACnetDoorAlarmStateTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataMaskedAlarmValues { +func NewBACnetConstructedDataMaskedAlarmValues( maskedAlarmValues []BACnetDoorAlarmStateTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataMaskedAlarmValues { _result := &_BACnetConstructedDataMaskedAlarmValues{ - MaskedAlarmValues: maskedAlarmValues, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + MaskedAlarmValues: maskedAlarmValues, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataMaskedAlarmValues(maskedAlarmValues []BACnetDoorAla // Deprecated: use the interface for direct cast func CastBACnetConstructedDataMaskedAlarmValues(structType interface{}) BACnetConstructedDataMaskedAlarmValues { - if casted, ok := structType.(BACnetConstructedDataMaskedAlarmValues); ok { + if casted, ok := structType.(BACnetConstructedDataMaskedAlarmValues); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataMaskedAlarmValues); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataMaskedAlarmValues) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetConstructedDataMaskedAlarmValues) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataMaskedAlarmValuesParseWithBuffer(ctx context.Context, // Terminated array var maskedAlarmValues []BACnetDoorAlarmStateTagged { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetDoorAlarmStateTaggedParseWithBuffer(ctx, readBuffer, uint8(0), TagClass_APPLICATION_TAGS) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetDoorAlarmStateTaggedParseWithBuffer(ctx, readBuffer , uint8(0) , TagClass_APPLICATION_TAGS ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'maskedAlarmValues' field of BACnetConstructedDataMaskedAlarmValues") } @@ -173,7 +175,7 @@ func BACnetConstructedDataMaskedAlarmValuesParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataMaskedAlarmValues{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, MaskedAlarmValues: maskedAlarmValues, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataMaskedAlarmValues) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataMaskedAlarmValues") } - // Array Field (maskedAlarmValues) - if pushErr := writeBuffer.PushContext("maskedAlarmValues", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for maskedAlarmValues") - } - for _curItem, _element := range m.GetMaskedAlarmValues() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetMaskedAlarmValues()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'maskedAlarmValues' field") - } - } - if popErr := writeBuffer.PopContext("maskedAlarmValues", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for maskedAlarmValues") + // Array Field (maskedAlarmValues) + if pushErr := writeBuffer.PushContext("maskedAlarmValues", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for maskedAlarmValues") + } + for _curItem, _element := range m.GetMaskedAlarmValues() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetMaskedAlarmValues()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'maskedAlarmValues' field") } + } + if popErr := writeBuffer.PopContext("maskedAlarmValues", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for maskedAlarmValues") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataMaskedAlarmValues"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataMaskedAlarmValues") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataMaskedAlarmValues) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataMaskedAlarmValues) isBACnetConstructedDataMaskedAlarmValues() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataMaskedAlarmValues) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaxAPDULengthAccepted.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaxAPDULengthAccepted.go index 1be2e7bfc0a..1036615802e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaxAPDULengthAccepted.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaxAPDULengthAccepted.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataMaxAPDULengthAccepted is the corresponding interface of BACnetConstructedDataMaxAPDULengthAccepted type BACnetConstructedDataMaxAPDULengthAccepted interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataMaxAPDULengthAcceptedExactly interface { // _BACnetConstructedDataMaxAPDULengthAccepted is the data-structure of this message type _BACnetConstructedDataMaxAPDULengthAccepted struct { *_BACnetConstructedData - MaxApduLengthAccepted BACnetApplicationTagUnsignedInteger + MaxApduLengthAccepted BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataMaxAPDULengthAccepted) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataMaxAPDULengthAccepted) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataMaxAPDULengthAccepted) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MAX_APDU_LENGTH_ACCEPTED -} +func (m *_BACnetConstructedDataMaxAPDULengthAccepted) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MAX_APDU_LENGTH_ACCEPTED} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataMaxAPDULengthAccepted) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataMaxAPDULengthAccepted) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataMaxAPDULengthAccepted) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataMaxAPDULengthAccepted) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataMaxAPDULengthAccepted) GetActualValue() BACnetApp /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataMaxAPDULengthAccepted factory function for _BACnetConstructedDataMaxAPDULengthAccepted -func NewBACnetConstructedDataMaxAPDULengthAccepted(maxApduLengthAccepted BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataMaxAPDULengthAccepted { +func NewBACnetConstructedDataMaxAPDULengthAccepted( maxApduLengthAccepted BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataMaxAPDULengthAccepted { _result := &_BACnetConstructedDataMaxAPDULengthAccepted{ - MaxApduLengthAccepted: maxApduLengthAccepted, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + MaxApduLengthAccepted: maxApduLengthAccepted, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataMaxAPDULengthAccepted(maxApduLengthAccepted BACnetA // Deprecated: use the interface for direct cast func CastBACnetConstructedDataMaxAPDULengthAccepted(structType interface{}) BACnetConstructedDataMaxAPDULengthAccepted { - if casted, ok := structType.(BACnetConstructedDataMaxAPDULengthAccepted); ok { + if casted, ok := structType.(BACnetConstructedDataMaxAPDULengthAccepted); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataMaxAPDULengthAccepted); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataMaxAPDULengthAccepted) GetLengthInBits(ctx contex return lengthInBits } + func (m *_BACnetConstructedDataMaxAPDULengthAccepted) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataMaxAPDULengthAcceptedParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("maxApduLengthAccepted"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for maxApduLengthAccepted") } - _maxApduLengthAccepted, _maxApduLengthAcceptedErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_maxApduLengthAccepted, _maxApduLengthAcceptedErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _maxApduLengthAcceptedErr != nil { return nil, errors.Wrap(_maxApduLengthAcceptedErr, "Error parsing 'maxApduLengthAccepted' field of BACnetConstructedDataMaxAPDULengthAccepted") } @@ -186,7 +188,7 @@ func BACnetConstructedDataMaxAPDULengthAcceptedParseWithBuffer(ctx context.Conte // Create a partially initialized instance _child := &_BACnetConstructedDataMaxAPDULengthAccepted{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, MaxApduLengthAccepted: maxApduLengthAccepted, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataMaxAPDULengthAccepted) SerializeWithWriteBuffer(c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataMaxAPDULengthAccepted") } - // Simple Field (maxApduLengthAccepted) - if pushErr := writeBuffer.PushContext("maxApduLengthAccepted"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for maxApduLengthAccepted") - } - _maxApduLengthAcceptedErr := writeBuffer.WriteSerializable(ctx, m.GetMaxApduLengthAccepted()) - if popErr := writeBuffer.PopContext("maxApduLengthAccepted"); popErr != nil { - return errors.Wrap(popErr, "Error popping for maxApduLengthAccepted") - } - if _maxApduLengthAcceptedErr != nil { - return errors.Wrap(_maxApduLengthAcceptedErr, "Error serializing 'maxApduLengthAccepted' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (maxApduLengthAccepted) + if pushErr := writeBuffer.PushContext("maxApduLengthAccepted"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for maxApduLengthAccepted") + } + _maxApduLengthAcceptedErr := writeBuffer.WriteSerializable(ctx, m.GetMaxApduLengthAccepted()) + if popErr := writeBuffer.PopContext("maxApduLengthAccepted"); popErr != nil { + return errors.Wrap(popErr, "Error popping for maxApduLengthAccepted") + } + if _maxApduLengthAcceptedErr != nil { + return errors.Wrap(_maxApduLengthAcceptedErr, "Error serializing 'maxApduLengthAccepted' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataMaxAPDULengthAccepted"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataMaxAPDULengthAccepted") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataMaxAPDULengthAccepted) SerializeWithWriteBuffer(c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataMaxAPDULengthAccepted) isBACnetConstructedDataMaxAPDULengthAccepted() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataMaxAPDULengthAccepted) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaxActualValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaxActualValue.go index 3d2282951b1..41038d38c32 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaxActualValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaxActualValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataMaxActualValue is the corresponding interface of BACnetConstructedDataMaxActualValue type BACnetConstructedDataMaxActualValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataMaxActualValueExactly interface { // _BACnetConstructedDataMaxActualValue is the data-structure of this message type _BACnetConstructedDataMaxActualValue struct { *_BACnetConstructedData - MaxActualValue BACnetApplicationTagReal + MaxActualValue BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataMaxActualValue) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataMaxActualValue) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataMaxActualValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MAX_ACTUAL_VALUE -} +func (m *_BACnetConstructedDataMaxActualValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MAX_ACTUAL_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataMaxActualValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataMaxActualValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataMaxActualValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataMaxActualValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataMaxActualValue) GetActualValue() BACnetApplicatio /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataMaxActualValue factory function for _BACnetConstructedDataMaxActualValue -func NewBACnetConstructedDataMaxActualValue(maxActualValue BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataMaxActualValue { +func NewBACnetConstructedDataMaxActualValue( maxActualValue BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataMaxActualValue { _result := &_BACnetConstructedDataMaxActualValue{ - MaxActualValue: maxActualValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + MaxActualValue: maxActualValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataMaxActualValue(maxActualValue BACnetApplicationTagR // Deprecated: use the interface for direct cast func CastBACnetConstructedDataMaxActualValue(structType interface{}) BACnetConstructedDataMaxActualValue { - if casted, ok := structType.(BACnetConstructedDataMaxActualValue); ok { + if casted, ok := structType.(BACnetConstructedDataMaxActualValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataMaxActualValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataMaxActualValue) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConstructedDataMaxActualValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataMaxActualValueParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("maxActualValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for maxActualValue") } - _maxActualValue, _maxActualValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_maxActualValue, _maxActualValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _maxActualValueErr != nil { return nil, errors.Wrap(_maxActualValueErr, "Error parsing 'maxActualValue' field of BACnetConstructedDataMaxActualValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataMaxActualValueParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetConstructedDataMaxActualValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, MaxActualValue: maxActualValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataMaxActualValue) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataMaxActualValue") } - // Simple Field (maxActualValue) - if pushErr := writeBuffer.PushContext("maxActualValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for maxActualValue") - } - _maxActualValueErr := writeBuffer.WriteSerializable(ctx, m.GetMaxActualValue()) - if popErr := writeBuffer.PopContext("maxActualValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for maxActualValue") - } - if _maxActualValueErr != nil { - return errors.Wrap(_maxActualValueErr, "Error serializing 'maxActualValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (maxActualValue) + if pushErr := writeBuffer.PushContext("maxActualValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for maxActualValue") + } + _maxActualValueErr := writeBuffer.WriteSerializable(ctx, m.GetMaxActualValue()) + if popErr := writeBuffer.PopContext("maxActualValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for maxActualValue") + } + if _maxActualValueErr != nil { + return errors.Wrap(_maxActualValueErr, "Error serializing 'maxActualValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataMaxActualValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataMaxActualValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataMaxActualValue) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataMaxActualValue) isBACnetConstructedDataMaxActualValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataMaxActualValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaxFailedAttempts.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaxFailedAttempts.go index 54e0e24c483..8621f0621c5 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaxFailedAttempts.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaxFailedAttempts.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataMaxFailedAttempts is the corresponding interface of BACnetConstructedDataMaxFailedAttempts type BACnetConstructedDataMaxFailedAttempts interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataMaxFailedAttemptsExactly interface { // _BACnetConstructedDataMaxFailedAttempts is the data-structure of this message type _BACnetConstructedDataMaxFailedAttempts struct { *_BACnetConstructedData - MaxFailedAttempts BACnetApplicationTagUnsignedInteger + MaxFailedAttempts BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataMaxFailedAttempts) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataMaxFailedAttempts) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataMaxFailedAttempts) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MAX_FAILED_ATTEMPTS -} +func (m *_BACnetConstructedDataMaxFailedAttempts) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MAX_FAILED_ATTEMPTS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataMaxFailedAttempts) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataMaxFailedAttempts) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataMaxFailedAttempts) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataMaxFailedAttempts) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataMaxFailedAttempts) GetActualValue() BACnetApplica /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataMaxFailedAttempts factory function for _BACnetConstructedDataMaxFailedAttempts -func NewBACnetConstructedDataMaxFailedAttempts(maxFailedAttempts BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataMaxFailedAttempts { +func NewBACnetConstructedDataMaxFailedAttempts( maxFailedAttempts BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataMaxFailedAttempts { _result := &_BACnetConstructedDataMaxFailedAttempts{ - MaxFailedAttempts: maxFailedAttempts, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + MaxFailedAttempts: maxFailedAttempts, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataMaxFailedAttempts(maxFailedAttempts BACnetApplicati // Deprecated: use the interface for direct cast func CastBACnetConstructedDataMaxFailedAttempts(structType interface{}) BACnetConstructedDataMaxFailedAttempts { - if casted, ok := structType.(BACnetConstructedDataMaxFailedAttempts); ok { + if casted, ok := structType.(BACnetConstructedDataMaxFailedAttempts); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataMaxFailedAttempts); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataMaxFailedAttempts) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetConstructedDataMaxFailedAttempts) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataMaxFailedAttemptsParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("maxFailedAttempts"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for maxFailedAttempts") } - _maxFailedAttempts, _maxFailedAttemptsErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_maxFailedAttempts, _maxFailedAttemptsErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _maxFailedAttemptsErr != nil { return nil, errors.Wrap(_maxFailedAttemptsErr, "Error parsing 'maxFailedAttempts' field of BACnetConstructedDataMaxFailedAttempts") } @@ -186,7 +188,7 @@ func BACnetConstructedDataMaxFailedAttemptsParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataMaxFailedAttempts{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, MaxFailedAttempts: maxFailedAttempts, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataMaxFailedAttempts) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataMaxFailedAttempts") } - // Simple Field (maxFailedAttempts) - if pushErr := writeBuffer.PushContext("maxFailedAttempts"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for maxFailedAttempts") - } - _maxFailedAttemptsErr := writeBuffer.WriteSerializable(ctx, m.GetMaxFailedAttempts()) - if popErr := writeBuffer.PopContext("maxFailedAttempts"); popErr != nil { - return errors.Wrap(popErr, "Error popping for maxFailedAttempts") - } - if _maxFailedAttemptsErr != nil { - return errors.Wrap(_maxFailedAttemptsErr, "Error serializing 'maxFailedAttempts' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (maxFailedAttempts) + if pushErr := writeBuffer.PushContext("maxFailedAttempts"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for maxFailedAttempts") + } + _maxFailedAttemptsErr := writeBuffer.WriteSerializable(ctx, m.GetMaxFailedAttempts()) + if popErr := writeBuffer.PopContext("maxFailedAttempts"); popErr != nil { + return errors.Wrap(popErr, "Error popping for maxFailedAttempts") + } + if _maxFailedAttemptsErr != nil { + return errors.Wrap(_maxFailedAttemptsErr, "Error serializing 'maxFailedAttempts' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataMaxFailedAttempts"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataMaxFailedAttempts") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataMaxFailedAttempts) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataMaxFailedAttempts) isBACnetConstructedDataMaxFailedAttempts() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataMaxFailedAttempts) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaxInfoFrames.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaxInfoFrames.go index 1855d73e690..f8ec2397e0f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaxInfoFrames.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaxInfoFrames.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataMaxInfoFrames is the corresponding interface of BACnetConstructedDataMaxInfoFrames type BACnetConstructedDataMaxInfoFrames interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataMaxInfoFramesExactly interface { // _BACnetConstructedDataMaxInfoFrames is the data-structure of this message type _BACnetConstructedDataMaxInfoFrames struct { *_BACnetConstructedData - MaxInfoFrames BACnetApplicationTagUnsignedInteger + MaxInfoFrames BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataMaxInfoFrames) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataMaxInfoFrames) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataMaxInfoFrames) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MAX_INFO_FRAMES -} +func (m *_BACnetConstructedDataMaxInfoFrames) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MAX_INFO_FRAMES} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataMaxInfoFrames) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataMaxInfoFrames) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataMaxInfoFrames) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataMaxInfoFrames) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataMaxInfoFrames) GetActualValue() BACnetApplication /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataMaxInfoFrames factory function for _BACnetConstructedDataMaxInfoFrames -func NewBACnetConstructedDataMaxInfoFrames(maxInfoFrames BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataMaxInfoFrames { +func NewBACnetConstructedDataMaxInfoFrames( maxInfoFrames BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataMaxInfoFrames { _result := &_BACnetConstructedDataMaxInfoFrames{ - MaxInfoFrames: maxInfoFrames, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + MaxInfoFrames: maxInfoFrames, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataMaxInfoFrames(maxInfoFrames BACnetApplicationTagUns // Deprecated: use the interface for direct cast func CastBACnetConstructedDataMaxInfoFrames(structType interface{}) BACnetConstructedDataMaxInfoFrames { - if casted, ok := structType.(BACnetConstructedDataMaxInfoFrames); ok { + if casted, ok := structType.(BACnetConstructedDataMaxInfoFrames); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataMaxInfoFrames); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataMaxInfoFrames) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetConstructedDataMaxInfoFrames) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataMaxInfoFramesParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("maxInfoFrames"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for maxInfoFrames") } - _maxInfoFrames, _maxInfoFramesErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_maxInfoFrames, _maxInfoFramesErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _maxInfoFramesErr != nil { return nil, errors.Wrap(_maxInfoFramesErr, "Error parsing 'maxInfoFrames' field of BACnetConstructedDataMaxInfoFrames") } @@ -186,7 +188,7 @@ func BACnetConstructedDataMaxInfoFramesParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetConstructedDataMaxInfoFrames{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, MaxInfoFrames: maxInfoFrames, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataMaxInfoFrames) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataMaxInfoFrames") } - // Simple Field (maxInfoFrames) - if pushErr := writeBuffer.PushContext("maxInfoFrames"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for maxInfoFrames") - } - _maxInfoFramesErr := writeBuffer.WriteSerializable(ctx, m.GetMaxInfoFrames()) - if popErr := writeBuffer.PopContext("maxInfoFrames"); popErr != nil { - return errors.Wrap(popErr, "Error popping for maxInfoFrames") - } - if _maxInfoFramesErr != nil { - return errors.Wrap(_maxInfoFramesErr, "Error serializing 'maxInfoFrames' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (maxInfoFrames) + if pushErr := writeBuffer.PushContext("maxInfoFrames"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for maxInfoFrames") + } + _maxInfoFramesErr := writeBuffer.WriteSerializable(ctx, m.GetMaxInfoFrames()) + if popErr := writeBuffer.PopContext("maxInfoFrames"); popErr != nil { + return errors.Wrap(popErr, "Error popping for maxInfoFrames") + } + if _maxInfoFramesErr != nil { + return errors.Wrap(_maxInfoFramesErr, "Error serializing 'maxInfoFrames' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataMaxInfoFrames"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataMaxInfoFrames") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataMaxInfoFrames) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataMaxInfoFrames) isBACnetConstructedDataMaxInfoFrames() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataMaxInfoFrames) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaxMaster.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaxMaster.go index 3701bad8ce7..2a7951b8c33 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaxMaster.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaxMaster.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataMaxMaster is the corresponding interface of BACnetConstructedDataMaxMaster type BACnetConstructedDataMaxMaster interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataMaxMasterExactly interface { // _BACnetConstructedDataMaxMaster is the data-structure of this message type _BACnetConstructedDataMaxMaster struct { *_BACnetConstructedData - MaxMaster BACnetApplicationTagUnsignedInteger + MaxMaster BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataMaxMaster) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataMaxMaster) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataMaxMaster) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MAX_MASTER -} +func (m *_BACnetConstructedDataMaxMaster) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MAX_MASTER} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataMaxMaster) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataMaxMaster) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataMaxMaster) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataMaxMaster) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataMaxMaster) GetActualValue() BACnetApplicationTagU /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataMaxMaster factory function for _BACnetConstructedDataMaxMaster -func NewBACnetConstructedDataMaxMaster(maxMaster BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataMaxMaster { +func NewBACnetConstructedDataMaxMaster( maxMaster BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataMaxMaster { _result := &_BACnetConstructedDataMaxMaster{ - MaxMaster: maxMaster, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + MaxMaster: maxMaster, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataMaxMaster(maxMaster BACnetApplicationTagUnsignedInt // Deprecated: use the interface for direct cast func CastBACnetConstructedDataMaxMaster(structType interface{}) BACnetConstructedDataMaxMaster { - if casted, ok := structType.(BACnetConstructedDataMaxMaster); ok { + if casted, ok := structType.(BACnetConstructedDataMaxMaster); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataMaxMaster); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataMaxMaster) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetConstructedDataMaxMaster) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataMaxMasterParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("maxMaster"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for maxMaster") } - _maxMaster, _maxMasterErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_maxMaster, _maxMasterErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _maxMasterErr != nil { return nil, errors.Wrap(_maxMasterErr, "Error parsing 'maxMaster' field of BACnetConstructedDataMaxMaster") } @@ -186,7 +188,7 @@ func BACnetConstructedDataMaxMasterParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_BACnetConstructedDataMaxMaster{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, MaxMaster: maxMaster, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataMaxMaster) SerializeWithWriteBuffer(ctx context.C return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataMaxMaster") } - // Simple Field (maxMaster) - if pushErr := writeBuffer.PushContext("maxMaster"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for maxMaster") - } - _maxMasterErr := writeBuffer.WriteSerializable(ctx, m.GetMaxMaster()) - if popErr := writeBuffer.PopContext("maxMaster"); popErr != nil { - return errors.Wrap(popErr, "Error popping for maxMaster") - } - if _maxMasterErr != nil { - return errors.Wrap(_maxMasterErr, "Error serializing 'maxMaster' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (maxMaster) + if pushErr := writeBuffer.PushContext("maxMaster"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for maxMaster") + } + _maxMasterErr := writeBuffer.WriteSerializable(ctx, m.GetMaxMaster()) + if popErr := writeBuffer.PopContext("maxMaster"); popErr != nil { + return errors.Wrap(popErr, "Error popping for maxMaster") + } + if _maxMasterErr != nil { + return errors.Wrap(_maxMasterErr, "Error serializing 'maxMaster' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataMaxMaster"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataMaxMaster") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataMaxMaster) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataMaxMaster) isBACnetConstructedDataMaxMaster() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataMaxMaster) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaxPresValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaxPresValue.go index 08730ec7cbb..8e902372bc7 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaxPresValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaxPresValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataMaxPresValue is the corresponding interface of BACnetConstructedDataMaxPresValue type BACnetConstructedDataMaxPresValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataMaxPresValueExactly interface { // _BACnetConstructedDataMaxPresValue is the data-structure of this message type _BACnetConstructedDataMaxPresValue struct { *_BACnetConstructedData - MaxPresValue BACnetApplicationTagReal + MaxPresValue BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataMaxPresValue) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataMaxPresValue) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataMaxPresValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MAX_PRES_VALUE -} +func (m *_BACnetConstructedDataMaxPresValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MAX_PRES_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataMaxPresValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataMaxPresValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataMaxPresValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataMaxPresValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataMaxPresValue) GetActualValue() BACnetApplicationT /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataMaxPresValue factory function for _BACnetConstructedDataMaxPresValue -func NewBACnetConstructedDataMaxPresValue(maxPresValue BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataMaxPresValue { +func NewBACnetConstructedDataMaxPresValue( maxPresValue BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataMaxPresValue { _result := &_BACnetConstructedDataMaxPresValue{ - MaxPresValue: maxPresValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + MaxPresValue: maxPresValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataMaxPresValue(maxPresValue BACnetApplicationTagReal, // Deprecated: use the interface for direct cast func CastBACnetConstructedDataMaxPresValue(structType interface{}) BACnetConstructedDataMaxPresValue { - if casted, ok := structType.(BACnetConstructedDataMaxPresValue); ok { + if casted, ok := structType.(BACnetConstructedDataMaxPresValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataMaxPresValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataMaxPresValue) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetConstructedDataMaxPresValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataMaxPresValueParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("maxPresValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for maxPresValue") } - _maxPresValue, _maxPresValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_maxPresValue, _maxPresValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _maxPresValueErr != nil { return nil, errors.Wrap(_maxPresValueErr, "Error parsing 'maxPresValue' field of BACnetConstructedDataMaxPresValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataMaxPresValueParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetConstructedDataMaxPresValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, MaxPresValue: maxPresValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataMaxPresValue) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataMaxPresValue") } - // Simple Field (maxPresValue) - if pushErr := writeBuffer.PushContext("maxPresValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for maxPresValue") - } - _maxPresValueErr := writeBuffer.WriteSerializable(ctx, m.GetMaxPresValue()) - if popErr := writeBuffer.PopContext("maxPresValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for maxPresValue") - } - if _maxPresValueErr != nil { - return errors.Wrap(_maxPresValueErr, "Error serializing 'maxPresValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (maxPresValue) + if pushErr := writeBuffer.PushContext("maxPresValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for maxPresValue") + } + _maxPresValueErr := writeBuffer.WriteSerializable(ctx, m.GetMaxPresValue()) + if popErr := writeBuffer.PopContext("maxPresValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for maxPresValue") + } + if _maxPresValueErr != nil { + return errors.Wrap(_maxPresValueErr, "Error serializing 'maxPresValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataMaxPresValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataMaxPresValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataMaxPresValue) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataMaxPresValue) isBACnetConstructedDataMaxPresValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataMaxPresValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaxSegmentsAccepted.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaxSegmentsAccepted.go index d98f248846b..099b7e89a31 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaxSegmentsAccepted.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaxSegmentsAccepted.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataMaxSegmentsAccepted is the corresponding interface of BACnetConstructedDataMaxSegmentsAccepted type BACnetConstructedDataMaxSegmentsAccepted interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataMaxSegmentsAcceptedExactly interface { // _BACnetConstructedDataMaxSegmentsAccepted is the data-structure of this message type _BACnetConstructedDataMaxSegmentsAccepted struct { *_BACnetConstructedData - MaxSegmentsAccepted BACnetApplicationTagUnsignedInteger + MaxSegmentsAccepted BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataMaxSegmentsAccepted) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataMaxSegmentsAccepted) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataMaxSegmentsAccepted) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MAX_SEGMENTS_ACCEPTED -} +func (m *_BACnetConstructedDataMaxSegmentsAccepted) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MAX_SEGMENTS_ACCEPTED} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataMaxSegmentsAccepted) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataMaxSegmentsAccepted) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataMaxSegmentsAccepted) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataMaxSegmentsAccepted) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataMaxSegmentsAccepted) GetActualValue() BACnetAppli /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataMaxSegmentsAccepted factory function for _BACnetConstructedDataMaxSegmentsAccepted -func NewBACnetConstructedDataMaxSegmentsAccepted(maxSegmentsAccepted BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataMaxSegmentsAccepted { +func NewBACnetConstructedDataMaxSegmentsAccepted( maxSegmentsAccepted BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataMaxSegmentsAccepted { _result := &_BACnetConstructedDataMaxSegmentsAccepted{ - MaxSegmentsAccepted: maxSegmentsAccepted, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + MaxSegmentsAccepted: maxSegmentsAccepted, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataMaxSegmentsAccepted(maxSegmentsAccepted BACnetAppli // Deprecated: use the interface for direct cast func CastBACnetConstructedDataMaxSegmentsAccepted(structType interface{}) BACnetConstructedDataMaxSegmentsAccepted { - if casted, ok := structType.(BACnetConstructedDataMaxSegmentsAccepted); ok { + if casted, ok := structType.(BACnetConstructedDataMaxSegmentsAccepted); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataMaxSegmentsAccepted); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataMaxSegmentsAccepted) GetLengthInBits(ctx context. return lengthInBits } + func (m *_BACnetConstructedDataMaxSegmentsAccepted) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataMaxSegmentsAcceptedParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("maxSegmentsAccepted"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for maxSegmentsAccepted") } - _maxSegmentsAccepted, _maxSegmentsAcceptedErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_maxSegmentsAccepted, _maxSegmentsAcceptedErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _maxSegmentsAcceptedErr != nil { return nil, errors.Wrap(_maxSegmentsAcceptedErr, "Error parsing 'maxSegmentsAccepted' field of BACnetConstructedDataMaxSegmentsAccepted") } @@ -186,7 +188,7 @@ func BACnetConstructedDataMaxSegmentsAcceptedParseWithBuffer(ctx context.Context // Create a partially initialized instance _child := &_BACnetConstructedDataMaxSegmentsAccepted{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, MaxSegmentsAccepted: maxSegmentsAccepted, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataMaxSegmentsAccepted) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataMaxSegmentsAccepted") } - // Simple Field (maxSegmentsAccepted) - if pushErr := writeBuffer.PushContext("maxSegmentsAccepted"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for maxSegmentsAccepted") - } - _maxSegmentsAcceptedErr := writeBuffer.WriteSerializable(ctx, m.GetMaxSegmentsAccepted()) - if popErr := writeBuffer.PopContext("maxSegmentsAccepted"); popErr != nil { - return errors.Wrap(popErr, "Error popping for maxSegmentsAccepted") - } - if _maxSegmentsAcceptedErr != nil { - return errors.Wrap(_maxSegmentsAcceptedErr, "Error serializing 'maxSegmentsAccepted' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (maxSegmentsAccepted) + if pushErr := writeBuffer.PushContext("maxSegmentsAccepted"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for maxSegmentsAccepted") + } + _maxSegmentsAcceptedErr := writeBuffer.WriteSerializable(ctx, m.GetMaxSegmentsAccepted()) + if popErr := writeBuffer.PopContext("maxSegmentsAccepted"); popErr != nil { + return errors.Wrap(popErr, "Error popping for maxSegmentsAccepted") + } + if _maxSegmentsAcceptedErr != nil { + return errors.Wrap(_maxSegmentsAcceptedErr, "Error serializing 'maxSegmentsAccepted' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataMaxSegmentsAccepted"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataMaxSegmentsAccepted") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataMaxSegmentsAccepted) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataMaxSegmentsAccepted) isBACnetConstructedDataMaxSegmentsAccepted() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataMaxSegmentsAccepted) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaximumOutput.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaximumOutput.go index 679b132f389..6b71a824591 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaximumOutput.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaximumOutput.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataMaximumOutput is the corresponding interface of BACnetConstructedDataMaximumOutput type BACnetConstructedDataMaximumOutput interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataMaximumOutputExactly interface { // _BACnetConstructedDataMaximumOutput is the data-structure of this message type _BACnetConstructedDataMaximumOutput struct { *_BACnetConstructedData - MaximumOutput BACnetApplicationTagReal + MaximumOutput BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataMaximumOutput) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataMaximumOutput) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataMaximumOutput) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MAXIMUM_OUTPUT -} +func (m *_BACnetConstructedDataMaximumOutput) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MAXIMUM_OUTPUT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataMaximumOutput) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataMaximumOutput) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataMaximumOutput) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataMaximumOutput) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataMaximumOutput) GetActualValue() BACnetApplication /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataMaximumOutput factory function for _BACnetConstructedDataMaximumOutput -func NewBACnetConstructedDataMaximumOutput(maximumOutput BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataMaximumOutput { +func NewBACnetConstructedDataMaximumOutput( maximumOutput BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataMaximumOutput { _result := &_BACnetConstructedDataMaximumOutput{ - MaximumOutput: maximumOutput, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + MaximumOutput: maximumOutput, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataMaximumOutput(maximumOutput BACnetApplicationTagRea // Deprecated: use the interface for direct cast func CastBACnetConstructedDataMaximumOutput(structType interface{}) BACnetConstructedDataMaximumOutput { - if casted, ok := structType.(BACnetConstructedDataMaximumOutput); ok { + if casted, ok := structType.(BACnetConstructedDataMaximumOutput); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataMaximumOutput); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataMaximumOutput) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetConstructedDataMaximumOutput) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataMaximumOutputParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("maximumOutput"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for maximumOutput") } - _maximumOutput, _maximumOutputErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_maximumOutput, _maximumOutputErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _maximumOutputErr != nil { return nil, errors.Wrap(_maximumOutputErr, "Error parsing 'maximumOutput' field of BACnetConstructedDataMaximumOutput") } @@ -186,7 +188,7 @@ func BACnetConstructedDataMaximumOutputParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetConstructedDataMaximumOutput{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, MaximumOutput: maximumOutput, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataMaximumOutput) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataMaximumOutput") } - // Simple Field (maximumOutput) - if pushErr := writeBuffer.PushContext("maximumOutput"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for maximumOutput") - } - _maximumOutputErr := writeBuffer.WriteSerializable(ctx, m.GetMaximumOutput()) - if popErr := writeBuffer.PopContext("maximumOutput"); popErr != nil { - return errors.Wrap(popErr, "Error popping for maximumOutput") - } - if _maximumOutputErr != nil { - return errors.Wrap(_maximumOutputErr, "Error serializing 'maximumOutput' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (maximumOutput) + if pushErr := writeBuffer.PushContext("maximumOutput"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for maximumOutput") + } + _maximumOutputErr := writeBuffer.WriteSerializable(ctx, m.GetMaximumOutput()) + if popErr := writeBuffer.PopContext("maximumOutput"); popErr != nil { + return errors.Wrap(popErr, "Error popping for maximumOutput") + } + if _maximumOutputErr != nil { + return errors.Wrap(_maximumOutputErr, "Error serializing 'maximumOutput' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataMaximumOutput"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataMaximumOutput") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataMaximumOutput) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataMaximumOutput) isBACnetConstructedDataMaximumOutput() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataMaximumOutput) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaximumValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaximumValue.go index 3abbfffee31..44ccff50c19 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaximumValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaximumValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataMaximumValue is the corresponding interface of BACnetConstructedDataMaximumValue type BACnetConstructedDataMaximumValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataMaximumValueExactly interface { // _BACnetConstructedDataMaximumValue is the data-structure of this message type _BACnetConstructedDataMaximumValue struct { *_BACnetConstructedData - MaximumValue BACnetApplicationTagReal + MaximumValue BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataMaximumValue) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataMaximumValue) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataMaximumValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MAXIMUM_VALUE -} +func (m *_BACnetConstructedDataMaximumValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MAXIMUM_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataMaximumValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataMaximumValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataMaximumValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataMaximumValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataMaximumValue) GetActualValue() BACnetApplicationT /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataMaximumValue factory function for _BACnetConstructedDataMaximumValue -func NewBACnetConstructedDataMaximumValue(maximumValue BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataMaximumValue { +func NewBACnetConstructedDataMaximumValue( maximumValue BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataMaximumValue { _result := &_BACnetConstructedDataMaximumValue{ - MaximumValue: maximumValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + MaximumValue: maximumValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataMaximumValue(maximumValue BACnetApplicationTagReal, // Deprecated: use the interface for direct cast func CastBACnetConstructedDataMaximumValue(structType interface{}) BACnetConstructedDataMaximumValue { - if casted, ok := structType.(BACnetConstructedDataMaximumValue); ok { + if casted, ok := structType.(BACnetConstructedDataMaximumValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataMaximumValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataMaximumValue) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetConstructedDataMaximumValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataMaximumValueParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("maximumValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for maximumValue") } - _maximumValue, _maximumValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_maximumValue, _maximumValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _maximumValueErr != nil { return nil, errors.Wrap(_maximumValueErr, "Error parsing 'maximumValue' field of BACnetConstructedDataMaximumValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataMaximumValueParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetConstructedDataMaximumValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, MaximumValue: maximumValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataMaximumValue) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataMaximumValue") } - // Simple Field (maximumValue) - if pushErr := writeBuffer.PushContext("maximumValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for maximumValue") - } - _maximumValueErr := writeBuffer.WriteSerializable(ctx, m.GetMaximumValue()) - if popErr := writeBuffer.PopContext("maximumValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for maximumValue") - } - if _maximumValueErr != nil { - return errors.Wrap(_maximumValueErr, "Error serializing 'maximumValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (maximumValue) + if pushErr := writeBuffer.PushContext("maximumValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for maximumValue") + } + _maximumValueErr := writeBuffer.WriteSerializable(ctx, m.GetMaximumValue()) + if popErr := writeBuffer.PopContext("maximumValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for maximumValue") + } + if _maximumValueErr != nil { + return errors.Wrap(_maximumValueErr, "Error serializing 'maximumValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataMaximumValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataMaximumValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataMaximumValue) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataMaximumValue) isBACnetConstructedDataMaximumValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataMaximumValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaximumValueTimestamp.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaximumValueTimestamp.go index f9ad40afabe..ff1349bc9e7 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaximumValueTimestamp.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMaximumValueTimestamp.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataMaximumValueTimestamp is the corresponding interface of BACnetConstructedDataMaximumValueTimestamp type BACnetConstructedDataMaximumValueTimestamp interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataMaximumValueTimestampExactly interface { // _BACnetConstructedDataMaximumValueTimestamp is the data-structure of this message type _BACnetConstructedDataMaximumValueTimestamp struct { *_BACnetConstructedData - MaximumValueTimestamp BACnetDateTime + MaximumValueTimestamp BACnetDateTime } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataMaximumValueTimestamp) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataMaximumValueTimestamp) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataMaximumValueTimestamp) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MAXIMUM_VALUE_TIMESTAMP -} +func (m *_BACnetConstructedDataMaximumValueTimestamp) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MAXIMUM_VALUE_TIMESTAMP} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataMaximumValueTimestamp) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataMaximumValueTimestamp) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataMaximumValueTimestamp) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataMaximumValueTimestamp) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataMaximumValueTimestamp) GetActualValue() BACnetDat /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataMaximumValueTimestamp factory function for _BACnetConstructedDataMaximumValueTimestamp -func NewBACnetConstructedDataMaximumValueTimestamp(maximumValueTimestamp BACnetDateTime, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataMaximumValueTimestamp { +func NewBACnetConstructedDataMaximumValueTimestamp( maximumValueTimestamp BACnetDateTime , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataMaximumValueTimestamp { _result := &_BACnetConstructedDataMaximumValueTimestamp{ - MaximumValueTimestamp: maximumValueTimestamp, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + MaximumValueTimestamp: maximumValueTimestamp, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataMaximumValueTimestamp(maximumValueTimestamp BACnetD // Deprecated: use the interface for direct cast func CastBACnetConstructedDataMaximumValueTimestamp(structType interface{}) BACnetConstructedDataMaximumValueTimestamp { - if casted, ok := structType.(BACnetConstructedDataMaximumValueTimestamp); ok { + if casted, ok := structType.(BACnetConstructedDataMaximumValueTimestamp); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataMaximumValueTimestamp); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataMaximumValueTimestamp) GetLengthInBits(ctx contex return lengthInBits } + func (m *_BACnetConstructedDataMaximumValueTimestamp) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataMaximumValueTimestampParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("maximumValueTimestamp"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for maximumValueTimestamp") } - _maximumValueTimestamp, _maximumValueTimestampErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) +_maximumValueTimestamp, _maximumValueTimestampErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) if _maximumValueTimestampErr != nil { return nil, errors.Wrap(_maximumValueTimestampErr, "Error parsing 'maximumValueTimestamp' field of BACnetConstructedDataMaximumValueTimestamp") } @@ -186,7 +188,7 @@ func BACnetConstructedDataMaximumValueTimestampParseWithBuffer(ctx context.Conte // Create a partially initialized instance _child := &_BACnetConstructedDataMaximumValueTimestamp{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, MaximumValueTimestamp: maximumValueTimestamp, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataMaximumValueTimestamp) SerializeWithWriteBuffer(c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataMaximumValueTimestamp") } - // Simple Field (maximumValueTimestamp) - if pushErr := writeBuffer.PushContext("maximumValueTimestamp"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for maximumValueTimestamp") - } - _maximumValueTimestampErr := writeBuffer.WriteSerializable(ctx, m.GetMaximumValueTimestamp()) - if popErr := writeBuffer.PopContext("maximumValueTimestamp"); popErr != nil { - return errors.Wrap(popErr, "Error popping for maximumValueTimestamp") - } - if _maximumValueTimestampErr != nil { - return errors.Wrap(_maximumValueTimestampErr, "Error serializing 'maximumValueTimestamp' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (maximumValueTimestamp) + if pushErr := writeBuffer.PushContext("maximumValueTimestamp"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for maximumValueTimestamp") + } + _maximumValueTimestampErr := writeBuffer.WriteSerializable(ctx, m.GetMaximumValueTimestamp()) + if popErr := writeBuffer.PopContext("maximumValueTimestamp"); popErr != nil { + return errors.Wrap(popErr, "Error popping for maximumValueTimestamp") + } + if _maximumValueTimestampErr != nil { + return errors.Wrap(_maximumValueTimestampErr, "Error serializing 'maximumValueTimestamp' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataMaximumValueTimestamp"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataMaximumValueTimestamp") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataMaximumValueTimestamp) SerializeWithWriteBuffer(c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataMaximumValueTimestamp) isBACnetConstructedDataMaximumValueTimestamp() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataMaximumValueTimestamp) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMemberOf.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMemberOf.go index c05ac5115a5..2945d897788 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMemberOf.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMemberOf.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataMemberOf is the corresponding interface of BACnetConstructedDataMemberOf type BACnetConstructedDataMemberOf interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataMemberOfExactly interface { // _BACnetConstructedDataMemberOf is the data-structure of this message type _BACnetConstructedDataMemberOf struct { *_BACnetConstructedData - Zones []BACnetDeviceObjectReference + Zones []BACnetDeviceObjectReference } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataMemberOf) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataMemberOf) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataMemberOf) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MEMBER_OF -} +func (m *_BACnetConstructedDataMemberOf) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MEMBER_OF} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataMemberOf) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataMemberOf) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataMemberOf) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataMemberOf) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataMemberOf) GetZones() []BACnetDeviceObjectReferenc /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataMemberOf factory function for _BACnetConstructedDataMemberOf -func NewBACnetConstructedDataMemberOf(zones []BACnetDeviceObjectReference, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataMemberOf { +func NewBACnetConstructedDataMemberOf( zones []BACnetDeviceObjectReference , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataMemberOf { _result := &_BACnetConstructedDataMemberOf{ - Zones: zones, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Zones: zones, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataMemberOf(zones []BACnetDeviceObjectReference, openi // Deprecated: use the interface for direct cast func CastBACnetConstructedDataMemberOf(structType interface{}) BACnetConstructedDataMemberOf { - if casted, ok := structType.(BACnetConstructedDataMemberOf); ok { + if casted, ok := structType.(BACnetConstructedDataMemberOf); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataMemberOf); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataMemberOf) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetConstructedDataMemberOf) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataMemberOfParseWithBuffer(ctx context.Context, readBuffe // Terminated array var zones []BACnetDeviceObjectReference { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'zones' field of BACnetConstructedDataMemberOf") } @@ -173,7 +175,7 @@ func BACnetConstructedDataMemberOfParseWithBuffer(ctx context.Context, readBuffe // Create a partially initialized instance _child := &_BACnetConstructedDataMemberOf{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Zones: zones, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataMemberOf) SerializeWithWriteBuffer(ctx context.Co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataMemberOf") } - // Array Field (zones) - if pushErr := writeBuffer.PushContext("zones", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for zones") - } - for _curItem, _element := range m.GetZones() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetZones()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'zones' field") - } - } - if popErr := writeBuffer.PopContext("zones", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for zones") + // Array Field (zones) + if pushErr := writeBuffer.PushContext("zones", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for zones") + } + for _curItem, _element := range m.GetZones() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetZones()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'zones' field") } + } + if popErr := writeBuffer.PopContext("zones", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for zones") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataMemberOf"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataMemberOf") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataMemberOf) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataMemberOf) isBACnetConstructedDataMemberOf() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataMemberOf) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMemberStatusFlags.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMemberStatusFlags.go index c1dc3f573f3..12a6c5a98ad 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMemberStatusFlags.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMemberStatusFlags.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataMemberStatusFlags is the corresponding interface of BACnetConstructedDataMemberStatusFlags type BACnetConstructedDataMemberStatusFlags interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataMemberStatusFlagsExactly interface { // _BACnetConstructedDataMemberStatusFlags is the data-structure of this message type _BACnetConstructedDataMemberStatusFlags struct { *_BACnetConstructedData - StatusFlags BACnetStatusFlagsTagged + StatusFlags BACnetStatusFlagsTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataMemberStatusFlags) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataMemberStatusFlags) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataMemberStatusFlags) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MEMBER_STATUS_FLAGS -} +func (m *_BACnetConstructedDataMemberStatusFlags) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MEMBER_STATUS_FLAGS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataMemberStatusFlags) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataMemberStatusFlags) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataMemberStatusFlags) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataMemberStatusFlags) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataMemberStatusFlags) GetActualValue() BACnetStatusF /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataMemberStatusFlags factory function for _BACnetConstructedDataMemberStatusFlags -func NewBACnetConstructedDataMemberStatusFlags(statusFlags BACnetStatusFlagsTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataMemberStatusFlags { +func NewBACnetConstructedDataMemberStatusFlags( statusFlags BACnetStatusFlagsTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataMemberStatusFlags { _result := &_BACnetConstructedDataMemberStatusFlags{ - StatusFlags: statusFlags, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + StatusFlags: statusFlags, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataMemberStatusFlags(statusFlags BACnetStatusFlagsTagg // Deprecated: use the interface for direct cast func CastBACnetConstructedDataMemberStatusFlags(structType interface{}) BACnetConstructedDataMemberStatusFlags { - if casted, ok := structType.(BACnetConstructedDataMemberStatusFlags); ok { + if casted, ok := structType.(BACnetConstructedDataMemberStatusFlags); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataMemberStatusFlags); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataMemberStatusFlags) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetConstructedDataMemberStatusFlags) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataMemberStatusFlagsParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("statusFlags"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for statusFlags") } - _statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _statusFlagsErr != nil { return nil, errors.Wrap(_statusFlagsErr, "Error parsing 'statusFlags' field of BACnetConstructedDataMemberStatusFlags") } @@ -186,7 +188,7 @@ func BACnetConstructedDataMemberStatusFlagsParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataMemberStatusFlags{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, StatusFlags: statusFlags, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataMemberStatusFlags) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataMemberStatusFlags") } - // Simple Field (statusFlags) - if pushErr := writeBuffer.PushContext("statusFlags"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for statusFlags") - } - _statusFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetStatusFlags()) - if popErr := writeBuffer.PopContext("statusFlags"); popErr != nil { - return errors.Wrap(popErr, "Error popping for statusFlags") - } - if _statusFlagsErr != nil { - return errors.Wrap(_statusFlagsErr, "Error serializing 'statusFlags' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (statusFlags) + if pushErr := writeBuffer.PushContext("statusFlags"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for statusFlags") + } + _statusFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetStatusFlags()) + if popErr := writeBuffer.PopContext("statusFlags"); popErr != nil { + return errors.Wrap(popErr, "Error popping for statusFlags") + } + if _statusFlagsErr != nil { + return errors.Wrap(_statusFlagsErr, "Error serializing 'statusFlags' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataMemberStatusFlags"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataMemberStatusFlags") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataMemberStatusFlags) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataMemberStatusFlags) isBACnetConstructedDataMemberStatusFlags() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataMemberStatusFlags) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMembers.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMembers.go index 1331d64d61f..a97a94d82a2 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMembers.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMembers.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataMembers is the corresponding interface of BACnetConstructedDataMembers type BACnetConstructedDataMembers interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataMembersExactly interface { // _BACnetConstructedDataMembers is the data-structure of this message type _BACnetConstructedDataMembers struct { *_BACnetConstructedData - Members []BACnetDeviceObjectReference + Members []BACnetDeviceObjectReference } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataMembers) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataMembers) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataMembers) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MEMBERS -} +func (m *_BACnetConstructedDataMembers) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MEMBERS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataMembers) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataMembers) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataMembers) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataMembers) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataMembers) GetMembers() []BACnetDeviceObjectReferen /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataMembers factory function for _BACnetConstructedDataMembers -func NewBACnetConstructedDataMembers(members []BACnetDeviceObjectReference, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataMembers { +func NewBACnetConstructedDataMembers( members []BACnetDeviceObjectReference , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataMembers { _result := &_BACnetConstructedDataMembers{ - Members: members, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Members: members, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataMembers(members []BACnetDeviceObjectReference, open // Deprecated: use the interface for direct cast func CastBACnetConstructedDataMembers(structType interface{}) BACnetConstructedDataMembers { - if casted, ok := structType.(BACnetConstructedDataMembers); ok { + if casted, ok := structType.(BACnetConstructedDataMembers); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataMembers); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataMembers) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_BACnetConstructedDataMembers) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataMembersParseWithBuffer(ctx context.Context, readBuffer // Terminated array var members []BACnetDeviceObjectReference { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'members' field of BACnetConstructedDataMembers") } @@ -173,7 +175,7 @@ func BACnetConstructedDataMembersParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_BACnetConstructedDataMembers{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Members: members, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataMembers) SerializeWithWriteBuffer(ctx context.Con return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataMembers") } - // Array Field (members) - if pushErr := writeBuffer.PushContext("members", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for members") - } - for _curItem, _element := range m.GetMembers() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetMembers()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'members' field") - } - } - if popErr := writeBuffer.PopContext("members", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for members") + // Array Field (members) + if pushErr := writeBuffer.PushContext("members", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for members") + } + for _curItem, _element := range m.GetMembers() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetMembers()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'members' field") } + } + if popErr := writeBuffer.PopContext("members", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for members") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataMembers"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataMembers") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataMembers) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataMembers) isBACnetConstructedDataMembers() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataMembers) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMinActualValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMinActualValue.go index 8cf6fb106fc..ba1ef4d392a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMinActualValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMinActualValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataMinActualValue is the corresponding interface of BACnetConstructedDataMinActualValue type BACnetConstructedDataMinActualValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataMinActualValueExactly interface { // _BACnetConstructedDataMinActualValue is the data-structure of this message type _BACnetConstructedDataMinActualValue struct { *_BACnetConstructedData - MinActualValue BACnetApplicationTagReal + MinActualValue BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataMinActualValue) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataMinActualValue) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataMinActualValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MIN_ACTUAL_VALUE -} +func (m *_BACnetConstructedDataMinActualValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MIN_ACTUAL_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataMinActualValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataMinActualValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataMinActualValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataMinActualValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataMinActualValue) GetActualValue() BACnetApplicatio /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataMinActualValue factory function for _BACnetConstructedDataMinActualValue -func NewBACnetConstructedDataMinActualValue(minActualValue BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataMinActualValue { +func NewBACnetConstructedDataMinActualValue( minActualValue BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataMinActualValue { _result := &_BACnetConstructedDataMinActualValue{ - MinActualValue: minActualValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + MinActualValue: minActualValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataMinActualValue(minActualValue BACnetApplicationTagR // Deprecated: use the interface for direct cast func CastBACnetConstructedDataMinActualValue(structType interface{}) BACnetConstructedDataMinActualValue { - if casted, ok := structType.(BACnetConstructedDataMinActualValue); ok { + if casted, ok := structType.(BACnetConstructedDataMinActualValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataMinActualValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataMinActualValue) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConstructedDataMinActualValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataMinActualValueParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("minActualValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for minActualValue") } - _minActualValue, _minActualValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_minActualValue, _minActualValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _minActualValueErr != nil { return nil, errors.Wrap(_minActualValueErr, "Error parsing 'minActualValue' field of BACnetConstructedDataMinActualValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataMinActualValueParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetConstructedDataMinActualValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, MinActualValue: minActualValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataMinActualValue) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataMinActualValue") } - // Simple Field (minActualValue) - if pushErr := writeBuffer.PushContext("minActualValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for minActualValue") - } - _minActualValueErr := writeBuffer.WriteSerializable(ctx, m.GetMinActualValue()) - if popErr := writeBuffer.PopContext("minActualValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for minActualValue") - } - if _minActualValueErr != nil { - return errors.Wrap(_minActualValueErr, "Error serializing 'minActualValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (minActualValue) + if pushErr := writeBuffer.PushContext("minActualValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for minActualValue") + } + _minActualValueErr := writeBuffer.WriteSerializable(ctx, m.GetMinActualValue()) + if popErr := writeBuffer.PopContext("minActualValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for minActualValue") + } + if _minActualValueErr != nil { + return errors.Wrap(_minActualValueErr, "Error serializing 'minActualValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataMinActualValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataMinActualValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataMinActualValue) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataMinActualValue) isBACnetConstructedDataMinActualValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataMinActualValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMinPresValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMinPresValue.go index 7fd5c6bb7b1..96e1d1c669e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMinPresValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMinPresValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataMinPresValue is the corresponding interface of BACnetConstructedDataMinPresValue type BACnetConstructedDataMinPresValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataMinPresValueExactly interface { // _BACnetConstructedDataMinPresValue is the data-structure of this message type _BACnetConstructedDataMinPresValue struct { *_BACnetConstructedData - MinPresValue BACnetApplicationTagReal + MinPresValue BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataMinPresValue) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataMinPresValue) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataMinPresValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MIN_PRES_VALUE -} +func (m *_BACnetConstructedDataMinPresValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MIN_PRES_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataMinPresValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataMinPresValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataMinPresValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataMinPresValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataMinPresValue) GetActualValue() BACnetApplicationT /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataMinPresValue factory function for _BACnetConstructedDataMinPresValue -func NewBACnetConstructedDataMinPresValue(minPresValue BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataMinPresValue { +func NewBACnetConstructedDataMinPresValue( minPresValue BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataMinPresValue { _result := &_BACnetConstructedDataMinPresValue{ - MinPresValue: minPresValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + MinPresValue: minPresValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataMinPresValue(minPresValue BACnetApplicationTagReal, // Deprecated: use the interface for direct cast func CastBACnetConstructedDataMinPresValue(structType interface{}) BACnetConstructedDataMinPresValue { - if casted, ok := structType.(BACnetConstructedDataMinPresValue); ok { + if casted, ok := structType.(BACnetConstructedDataMinPresValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataMinPresValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataMinPresValue) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetConstructedDataMinPresValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataMinPresValueParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("minPresValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for minPresValue") } - _minPresValue, _minPresValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_minPresValue, _minPresValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _minPresValueErr != nil { return nil, errors.Wrap(_minPresValueErr, "Error parsing 'minPresValue' field of BACnetConstructedDataMinPresValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataMinPresValueParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetConstructedDataMinPresValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, MinPresValue: minPresValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataMinPresValue) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataMinPresValue") } - // Simple Field (minPresValue) - if pushErr := writeBuffer.PushContext("minPresValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for minPresValue") - } - _minPresValueErr := writeBuffer.WriteSerializable(ctx, m.GetMinPresValue()) - if popErr := writeBuffer.PopContext("minPresValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for minPresValue") - } - if _minPresValueErr != nil { - return errors.Wrap(_minPresValueErr, "Error serializing 'minPresValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (minPresValue) + if pushErr := writeBuffer.PushContext("minPresValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for minPresValue") + } + _minPresValueErr := writeBuffer.WriteSerializable(ctx, m.GetMinPresValue()) + if popErr := writeBuffer.PopContext("minPresValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for minPresValue") + } + if _minPresValueErr != nil { + return errors.Wrap(_minPresValueErr, "Error serializing 'minPresValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataMinPresValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataMinPresValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataMinPresValue) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataMinPresValue) isBACnetConstructedDataMinPresValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataMinPresValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMinimumOffTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMinimumOffTime.go index d08c5939269..09f7a5cfbd8 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMinimumOffTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMinimumOffTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataMinimumOffTime is the corresponding interface of BACnetConstructedDataMinimumOffTime type BACnetConstructedDataMinimumOffTime interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataMinimumOffTimeExactly interface { // _BACnetConstructedDataMinimumOffTime is the data-structure of this message type _BACnetConstructedDataMinimumOffTime struct { *_BACnetConstructedData - MinimumOffTime BACnetApplicationTagUnsignedInteger + MinimumOffTime BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataMinimumOffTime) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataMinimumOffTime) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataMinimumOffTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MINIMUM_OFF_TIME -} +func (m *_BACnetConstructedDataMinimumOffTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MINIMUM_OFF_TIME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataMinimumOffTime) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataMinimumOffTime) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataMinimumOffTime) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataMinimumOffTime) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataMinimumOffTime) GetActualValue() BACnetApplicatio /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataMinimumOffTime factory function for _BACnetConstructedDataMinimumOffTime -func NewBACnetConstructedDataMinimumOffTime(minimumOffTime BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataMinimumOffTime { +func NewBACnetConstructedDataMinimumOffTime( minimumOffTime BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataMinimumOffTime { _result := &_BACnetConstructedDataMinimumOffTime{ - MinimumOffTime: minimumOffTime, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + MinimumOffTime: minimumOffTime, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataMinimumOffTime(minimumOffTime BACnetApplicationTagU // Deprecated: use the interface for direct cast func CastBACnetConstructedDataMinimumOffTime(structType interface{}) BACnetConstructedDataMinimumOffTime { - if casted, ok := structType.(BACnetConstructedDataMinimumOffTime); ok { + if casted, ok := structType.(BACnetConstructedDataMinimumOffTime); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataMinimumOffTime); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataMinimumOffTime) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConstructedDataMinimumOffTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataMinimumOffTimeParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("minimumOffTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for minimumOffTime") } - _minimumOffTime, _minimumOffTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_minimumOffTime, _minimumOffTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _minimumOffTimeErr != nil { return nil, errors.Wrap(_minimumOffTimeErr, "Error parsing 'minimumOffTime' field of BACnetConstructedDataMinimumOffTime") } @@ -186,7 +188,7 @@ func BACnetConstructedDataMinimumOffTimeParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetConstructedDataMinimumOffTime{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, MinimumOffTime: minimumOffTime, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataMinimumOffTime) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataMinimumOffTime") } - // Simple Field (minimumOffTime) - if pushErr := writeBuffer.PushContext("minimumOffTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for minimumOffTime") - } - _minimumOffTimeErr := writeBuffer.WriteSerializable(ctx, m.GetMinimumOffTime()) - if popErr := writeBuffer.PopContext("minimumOffTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for minimumOffTime") - } - if _minimumOffTimeErr != nil { - return errors.Wrap(_minimumOffTimeErr, "Error serializing 'minimumOffTime' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (minimumOffTime) + if pushErr := writeBuffer.PushContext("minimumOffTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for minimumOffTime") + } + _minimumOffTimeErr := writeBuffer.WriteSerializable(ctx, m.GetMinimumOffTime()) + if popErr := writeBuffer.PopContext("minimumOffTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for minimumOffTime") + } + if _minimumOffTimeErr != nil { + return errors.Wrap(_minimumOffTimeErr, "Error serializing 'minimumOffTime' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataMinimumOffTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataMinimumOffTime") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataMinimumOffTime) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataMinimumOffTime) isBACnetConstructedDataMinimumOffTime() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataMinimumOffTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMinimumOnTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMinimumOnTime.go index 7fa999ed1e1..20f4111db82 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMinimumOnTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMinimumOnTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataMinimumOnTime is the corresponding interface of BACnetConstructedDataMinimumOnTime type BACnetConstructedDataMinimumOnTime interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataMinimumOnTimeExactly interface { // _BACnetConstructedDataMinimumOnTime is the data-structure of this message type _BACnetConstructedDataMinimumOnTime struct { *_BACnetConstructedData - MinimumOnTime BACnetApplicationTagUnsignedInteger + MinimumOnTime BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataMinimumOnTime) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataMinimumOnTime) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataMinimumOnTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MINIMUM_ON_TIME -} +func (m *_BACnetConstructedDataMinimumOnTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MINIMUM_ON_TIME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataMinimumOnTime) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataMinimumOnTime) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataMinimumOnTime) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataMinimumOnTime) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataMinimumOnTime) GetActualValue() BACnetApplication /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataMinimumOnTime factory function for _BACnetConstructedDataMinimumOnTime -func NewBACnetConstructedDataMinimumOnTime(minimumOnTime BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataMinimumOnTime { +func NewBACnetConstructedDataMinimumOnTime( minimumOnTime BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataMinimumOnTime { _result := &_BACnetConstructedDataMinimumOnTime{ - MinimumOnTime: minimumOnTime, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + MinimumOnTime: minimumOnTime, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataMinimumOnTime(minimumOnTime BACnetApplicationTagUns // Deprecated: use the interface for direct cast func CastBACnetConstructedDataMinimumOnTime(structType interface{}) BACnetConstructedDataMinimumOnTime { - if casted, ok := structType.(BACnetConstructedDataMinimumOnTime); ok { + if casted, ok := structType.(BACnetConstructedDataMinimumOnTime); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataMinimumOnTime); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataMinimumOnTime) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetConstructedDataMinimumOnTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataMinimumOnTimeParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("minimumOnTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for minimumOnTime") } - _minimumOnTime, _minimumOnTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_minimumOnTime, _minimumOnTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _minimumOnTimeErr != nil { return nil, errors.Wrap(_minimumOnTimeErr, "Error parsing 'minimumOnTime' field of BACnetConstructedDataMinimumOnTime") } @@ -186,7 +188,7 @@ func BACnetConstructedDataMinimumOnTimeParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetConstructedDataMinimumOnTime{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, MinimumOnTime: minimumOnTime, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataMinimumOnTime) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataMinimumOnTime") } - // Simple Field (minimumOnTime) - if pushErr := writeBuffer.PushContext("minimumOnTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for minimumOnTime") - } - _minimumOnTimeErr := writeBuffer.WriteSerializable(ctx, m.GetMinimumOnTime()) - if popErr := writeBuffer.PopContext("minimumOnTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for minimumOnTime") - } - if _minimumOnTimeErr != nil { - return errors.Wrap(_minimumOnTimeErr, "Error serializing 'minimumOnTime' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (minimumOnTime) + if pushErr := writeBuffer.PushContext("minimumOnTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for minimumOnTime") + } + _minimumOnTimeErr := writeBuffer.WriteSerializable(ctx, m.GetMinimumOnTime()) + if popErr := writeBuffer.PopContext("minimumOnTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for minimumOnTime") + } + if _minimumOnTimeErr != nil { + return errors.Wrap(_minimumOnTimeErr, "Error serializing 'minimumOnTime' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataMinimumOnTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataMinimumOnTime") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataMinimumOnTime) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataMinimumOnTime) isBACnetConstructedDataMinimumOnTime() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataMinimumOnTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMinimumOutput.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMinimumOutput.go index 62167064ec1..6d6314781bd 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMinimumOutput.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMinimumOutput.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataMinimumOutput is the corresponding interface of BACnetConstructedDataMinimumOutput type BACnetConstructedDataMinimumOutput interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataMinimumOutputExactly interface { // _BACnetConstructedDataMinimumOutput is the data-structure of this message type _BACnetConstructedDataMinimumOutput struct { *_BACnetConstructedData - MinimumOutput BACnetApplicationTagReal + MinimumOutput BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataMinimumOutput) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataMinimumOutput) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataMinimumOutput) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MINIMUM_OUTPUT -} +func (m *_BACnetConstructedDataMinimumOutput) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MINIMUM_OUTPUT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataMinimumOutput) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataMinimumOutput) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataMinimumOutput) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataMinimumOutput) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataMinimumOutput) GetActualValue() BACnetApplication /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataMinimumOutput factory function for _BACnetConstructedDataMinimumOutput -func NewBACnetConstructedDataMinimumOutput(minimumOutput BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataMinimumOutput { +func NewBACnetConstructedDataMinimumOutput( minimumOutput BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataMinimumOutput { _result := &_BACnetConstructedDataMinimumOutput{ - MinimumOutput: minimumOutput, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + MinimumOutput: minimumOutput, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataMinimumOutput(minimumOutput BACnetApplicationTagRea // Deprecated: use the interface for direct cast func CastBACnetConstructedDataMinimumOutput(structType interface{}) BACnetConstructedDataMinimumOutput { - if casted, ok := structType.(BACnetConstructedDataMinimumOutput); ok { + if casted, ok := structType.(BACnetConstructedDataMinimumOutput); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataMinimumOutput); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataMinimumOutput) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetConstructedDataMinimumOutput) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataMinimumOutputParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("minimumOutput"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for minimumOutput") } - _minimumOutput, _minimumOutputErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_minimumOutput, _minimumOutputErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _minimumOutputErr != nil { return nil, errors.Wrap(_minimumOutputErr, "Error parsing 'minimumOutput' field of BACnetConstructedDataMinimumOutput") } @@ -186,7 +188,7 @@ func BACnetConstructedDataMinimumOutputParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetConstructedDataMinimumOutput{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, MinimumOutput: minimumOutput, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataMinimumOutput) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataMinimumOutput") } - // Simple Field (minimumOutput) - if pushErr := writeBuffer.PushContext("minimumOutput"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for minimumOutput") - } - _minimumOutputErr := writeBuffer.WriteSerializable(ctx, m.GetMinimumOutput()) - if popErr := writeBuffer.PopContext("minimumOutput"); popErr != nil { - return errors.Wrap(popErr, "Error popping for minimumOutput") - } - if _minimumOutputErr != nil { - return errors.Wrap(_minimumOutputErr, "Error serializing 'minimumOutput' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (minimumOutput) + if pushErr := writeBuffer.PushContext("minimumOutput"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for minimumOutput") + } + _minimumOutputErr := writeBuffer.WriteSerializable(ctx, m.GetMinimumOutput()) + if popErr := writeBuffer.PopContext("minimumOutput"); popErr != nil { + return errors.Wrap(popErr, "Error popping for minimumOutput") + } + if _minimumOutputErr != nil { + return errors.Wrap(_minimumOutputErr, "Error serializing 'minimumOutput' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataMinimumOutput"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataMinimumOutput") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataMinimumOutput) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataMinimumOutput) isBACnetConstructedDataMinimumOutput() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataMinimumOutput) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMinimumValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMinimumValue.go index acd3132f147..d20af6a1361 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMinimumValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMinimumValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataMinimumValue is the corresponding interface of BACnetConstructedDataMinimumValue type BACnetConstructedDataMinimumValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataMinimumValueExactly interface { // _BACnetConstructedDataMinimumValue is the data-structure of this message type _BACnetConstructedDataMinimumValue struct { *_BACnetConstructedData - MinimumValue BACnetApplicationTagReal + MinimumValue BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataMinimumValue) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataMinimumValue) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataMinimumValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MINIMUM_VALUE -} +func (m *_BACnetConstructedDataMinimumValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MINIMUM_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataMinimumValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataMinimumValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataMinimumValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataMinimumValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataMinimumValue) GetActualValue() BACnetApplicationT /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataMinimumValue factory function for _BACnetConstructedDataMinimumValue -func NewBACnetConstructedDataMinimumValue(minimumValue BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataMinimumValue { +func NewBACnetConstructedDataMinimumValue( minimumValue BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataMinimumValue { _result := &_BACnetConstructedDataMinimumValue{ - MinimumValue: minimumValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + MinimumValue: minimumValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataMinimumValue(minimumValue BACnetApplicationTagReal, // Deprecated: use the interface for direct cast func CastBACnetConstructedDataMinimumValue(structType interface{}) BACnetConstructedDataMinimumValue { - if casted, ok := structType.(BACnetConstructedDataMinimumValue); ok { + if casted, ok := structType.(BACnetConstructedDataMinimumValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataMinimumValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataMinimumValue) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetConstructedDataMinimumValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataMinimumValueParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("minimumValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for minimumValue") } - _minimumValue, _minimumValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_minimumValue, _minimumValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _minimumValueErr != nil { return nil, errors.Wrap(_minimumValueErr, "Error parsing 'minimumValue' field of BACnetConstructedDataMinimumValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataMinimumValueParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetConstructedDataMinimumValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, MinimumValue: minimumValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataMinimumValue) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataMinimumValue") } - // Simple Field (minimumValue) - if pushErr := writeBuffer.PushContext("minimumValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for minimumValue") - } - _minimumValueErr := writeBuffer.WriteSerializable(ctx, m.GetMinimumValue()) - if popErr := writeBuffer.PopContext("minimumValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for minimumValue") - } - if _minimumValueErr != nil { - return errors.Wrap(_minimumValueErr, "Error serializing 'minimumValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (minimumValue) + if pushErr := writeBuffer.PushContext("minimumValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for minimumValue") + } + _minimumValueErr := writeBuffer.WriteSerializable(ctx, m.GetMinimumValue()) + if popErr := writeBuffer.PopContext("minimumValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for minimumValue") + } + if _minimumValueErr != nil { + return errors.Wrap(_minimumValueErr, "Error serializing 'minimumValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataMinimumValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataMinimumValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataMinimumValue) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataMinimumValue) isBACnetConstructedDataMinimumValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataMinimumValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMinimumValueTimestamp.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMinimumValueTimestamp.go index 592e77f064a..2e497406b0e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMinimumValueTimestamp.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMinimumValueTimestamp.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataMinimumValueTimestamp is the corresponding interface of BACnetConstructedDataMinimumValueTimestamp type BACnetConstructedDataMinimumValueTimestamp interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataMinimumValueTimestampExactly interface { // _BACnetConstructedDataMinimumValueTimestamp is the data-structure of this message type _BACnetConstructedDataMinimumValueTimestamp struct { *_BACnetConstructedData - MinimumValueTimestamp BACnetDateTime + MinimumValueTimestamp BACnetDateTime } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataMinimumValueTimestamp) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataMinimumValueTimestamp) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataMinimumValueTimestamp) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MINIMUM_VALUE_TIMESTAMP -} +func (m *_BACnetConstructedDataMinimumValueTimestamp) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MINIMUM_VALUE_TIMESTAMP} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataMinimumValueTimestamp) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataMinimumValueTimestamp) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataMinimumValueTimestamp) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataMinimumValueTimestamp) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataMinimumValueTimestamp) GetActualValue() BACnetDat /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataMinimumValueTimestamp factory function for _BACnetConstructedDataMinimumValueTimestamp -func NewBACnetConstructedDataMinimumValueTimestamp(minimumValueTimestamp BACnetDateTime, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataMinimumValueTimestamp { +func NewBACnetConstructedDataMinimumValueTimestamp( minimumValueTimestamp BACnetDateTime , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataMinimumValueTimestamp { _result := &_BACnetConstructedDataMinimumValueTimestamp{ - MinimumValueTimestamp: minimumValueTimestamp, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + MinimumValueTimestamp: minimumValueTimestamp, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataMinimumValueTimestamp(minimumValueTimestamp BACnetD // Deprecated: use the interface for direct cast func CastBACnetConstructedDataMinimumValueTimestamp(structType interface{}) BACnetConstructedDataMinimumValueTimestamp { - if casted, ok := structType.(BACnetConstructedDataMinimumValueTimestamp); ok { + if casted, ok := structType.(BACnetConstructedDataMinimumValueTimestamp); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataMinimumValueTimestamp); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataMinimumValueTimestamp) GetLengthInBits(ctx contex return lengthInBits } + func (m *_BACnetConstructedDataMinimumValueTimestamp) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataMinimumValueTimestampParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("minimumValueTimestamp"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for minimumValueTimestamp") } - _minimumValueTimestamp, _minimumValueTimestampErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) +_minimumValueTimestamp, _minimumValueTimestampErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) if _minimumValueTimestampErr != nil { return nil, errors.Wrap(_minimumValueTimestampErr, "Error parsing 'minimumValueTimestamp' field of BACnetConstructedDataMinimumValueTimestamp") } @@ -186,7 +188,7 @@ func BACnetConstructedDataMinimumValueTimestampParseWithBuffer(ctx context.Conte // Create a partially initialized instance _child := &_BACnetConstructedDataMinimumValueTimestamp{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, MinimumValueTimestamp: minimumValueTimestamp, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataMinimumValueTimestamp) SerializeWithWriteBuffer(c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataMinimumValueTimestamp") } - // Simple Field (minimumValueTimestamp) - if pushErr := writeBuffer.PushContext("minimumValueTimestamp"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for minimumValueTimestamp") - } - _minimumValueTimestampErr := writeBuffer.WriteSerializable(ctx, m.GetMinimumValueTimestamp()) - if popErr := writeBuffer.PopContext("minimumValueTimestamp"); popErr != nil { - return errors.Wrap(popErr, "Error popping for minimumValueTimestamp") - } - if _minimumValueTimestampErr != nil { - return errors.Wrap(_minimumValueTimestampErr, "Error serializing 'minimumValueTimestamp' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (minimumValueTimestamp) + if pushErr := writeBuffer.PushContext("minimumValueTimestamp"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for minimumValueTimestamp") + } + _minimumValueTimestampErr := writeBuffer.WriteSerializable(ctx, m.GetMinimumValueTimestamp()) + if popErr := writeBuffer.PopContext("minimumValueTimestamp"); popErr != nil { + return errors.Wrap(popErr, "Error popping for minimumValueTimestamp") + } + if _minimumValueTimestampErr != nil { + return errors.Wrap(_minimumValueTimestampErr, "Error serializing 'minimumValueTimestamp' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataMinimumValueTimestamp"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataMinimumValueTimestamp") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataMinimumValueTimestamp) SerializeWithWriteBuffer(c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataMinimumValueTimestamp) isBACnetConstructedDataMinimumValueTimestamp() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataMinimumValueTimestamp) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMode.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMode.go index 4cccd066b37..954743d1567 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMode.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMode.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataMode is the corresponding interface of BACnetConstructedDataMode type BACnetConstructedDataMode interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataModeExactly interface { // _BACnetConstructedDataMode is the data-structure of this message type _BACnetConstructedDataMode struct { *_BACnetConstructedData - Mode BACnetLifeSafetyModeTagged + Mode BACnetLifeSafetyModeTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataMode) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataMode) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataMode) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MODE -} +func (m *_BACnetConstructedDataMode) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MODE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataMode) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataMode) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataMode) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataMode) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataMode) GetActualValue() BACnetLifeSafetyModeTagged /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataMode factory function for _BACnetConstructedDataMode -func NewBACnetConstructedDataMode(mode BACnetLifeSafetyModeTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataMode { +func NewBACnetConstructedDataMode( mode BACnetLifeSafetyModeTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataMode { _result := &_BACnetConstructedDataMode{ - Mode: mode, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Mode: mode, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataMode(mode BACnetLifeSafetyModeTagged, openingTag BA // Deprecated: use the interface for direct cast func CastBACnetConstructedDataMode(structType interface{}) BACnetConstructedDataMode { - if casted, ok := structType.(BACnetConstructedDataMode); ok { + if casted, ok := structType.(BACnetConstructedDataMode); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataMode); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataMode) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_BACnetConstructedDataMode) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataModeParseWithBuffer(ctx context.Context, readBuffer ut if pullErr := readBuffer.PullContext("mode"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for mode") } - _mode, _modeErr := BACnetLifeSafetyModeTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_mode, _modeErr := BACnetLifeSafetyModeTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _modeErr != nil { return nil, errors.Wrap(_modeErr, "Error parsing 'mode' field of BACnetConstructedDataMode") } @@ -186,7 +188,7 @@ func BACnetConstructedDataModeParseWithBuffer(ctx context.Context, readBuffer ut // Create a partially initialized instance _child := &_BACnetConstructedDataMode{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Mode: mode, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataMode) SerializeWithWriteBuffer(ctx context.Contex return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataMode") } - // Simple Field (mode) - if pushErr := writeBuffer.PushContext("mode"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for mode") - } - _modeErr := writeBuffer.WriteSerializable(ctx, m.GetMode()) - if popErr := writeBuffer.PopContext("mode"); popErr != nil { - return errors.Wrap(popErr, "Error popping for mode") - } - if _modeErr != nil { - return errors.Wrap(_modeErr, "Error serializing 'mode' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (mode) + if pushErr := writeBuffer.PushContext("mode"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for mode") + } + _modeErr := writeBuffer.WriteSerializable(ctx, m.GetMode()) + if popErr := writeBuffer.PopContext("mode"); popErr != nil { + return errors.Wrap(popErr, "Error popping for mode") + } + if _modeErr != nil { + return errors.Wrap(_modeErr, "Error serializing 'mode' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataMode"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataMode") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataMode) SerializeWithWriteBuffer(ctx context.Contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataMode) isBACnetConstructedDataMode() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataMode) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataModelName.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataModelName.go index c304d527f18..e2bdebecb75 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataModelName.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataModelName.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataModelName is the corresponding interface of BACnetConstructedDataModelName type BACnetConstructedDataModelName interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataModelNameExactly interface { // _BACnetConstructedDataModelName is the data-structure of this message type _BACnetConstructedDataModelName struct { *_BACnetConstructedData - ModelName BACnetApplicationTagCharacterString + ModelName BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataModelName) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataModelName) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataModelName) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MODEL_NAME -} +func (m *_BACnetConstructedDataModelName) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MODEL_NAME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataModelName) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataModelName) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataModelName) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataModelName) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataModelName) GetActualValue() BACnetApplicationTagC /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataModelName factory function for _BACnetConstructedDataModelName -func NewBACnetConstructedDataModelName(modelName BACnetApplicationTagCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataModelName { +func NewBACnetConstructedDataModelName( modelName BACnetApplicationTagCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataModelName { _result := &_BACnetConstructedDataModelName{ - ModelName: modelName, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ModelName: modelName, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataModelName(modelName BACnetApplicationTagCharacterSt // Deprecated: use the interface for direct cast func CastBACnetConstructedDataModelName(structType interface{}) BACnetConstructedDataModelName { - if casted, ok := structType.(BACnetConstructedDataModelName); ok { + if casted, ok := structType.(BACnetConstructedDataModelName); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataModelName); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataModelName) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetConstructedDataModelName) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataModelNameParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("modelName"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for modelName") } - _modelName, _modelNameErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_modelName, _modelNameErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _modelNameErr != nil { return nil, errors.Wrap(_modelNameErr, "Error parsing 'modelName' field of BACnetConstructedDataModelName") } @@ -186,7 +188,7 @@ func BACnetConstructedDataModelNameParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_BACnetConstructedDataModelName{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ModelName: modelName, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataModelName) SerializeWithWriteBuffer(ctx context.C return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataModelName") } - // Simple Field (modelName) - if pushErr := writeBuffer.PushContext("modelName"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for modelName") - } - _modelNameErr := writeBuffer.WriteSerializable(ctx, m.GetModelName()) - if popErr := writeBuffer.PopContext("modelName"); popErr != nil { - return errors.Wrap(popErr, "Error popping for modelName") - } - if _modelNameErr != nil { - return errors.Wrap(_modelNameErr, "Error serializing 'modelName' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (modelName) + if pushErr := writeBuffer.PushContext("modelName"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for modelName") + } + _modelNameErr := writeBuffer.WriteSerializable(ctx, m.GetModelName()) + if popErr := writeBuffer.PopContext("modelName"); popErr != nil { + return errors.Wrap(popErr, "Error popping for modelName") + } + if _modelNameErr != nil { + return errors.Wrap(_modelNameErr, "Error serializing 'modelName' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataModelName"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataModelName") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataModelName) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataModelName) isBACnetConstructedDataModelName() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataModelName) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataModificationDate.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataModificationDate.go index cef6e33f448..6e5102a0daf 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataModificationDate.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataModificationDate.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataModificationDate is the corresponding interface of BACnetConstructedDataModificationDate type BACnetConstructedDataModificationDate interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataModificationDateExactly interface { // _BACnetConstructedDataModificationDate is the data-structure of this message type _BACnetConstructedDataModificationDate struct { *_BACnetConstructedData - ModificationDate BACnetDateTime + ModificationDate BACnetDateTime } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataModificationDate) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataModificationDate) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataModificationDate) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MODIFICATION_DATE -} +func (m *_BACnetConstructedDataModificationDate) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MODIFICATION_DATE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataModificationDate) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataModificationDate) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataModificationDate) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataModificationDate) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataModificationDate) GetActualValue() BACnetDateTime /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataModificationDate factory function for _BACnetConstructedDataModificationDate -func NewBACnetConstructedDataModificationDate(modificationDate BACnetDateTime, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataModificationDate { +func NewBACnetConstructedDataModificationDate( modificationDate BACnetDateTime , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataModificationDate { _result := &_BACnetConstructedDataModificationDate{ - ModificationDate: modificationDate, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ModificationDate: modificationDate, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataModificationDate(modificationDate BACnetDateTime, o // Deprecated: use the interface for direct cast func CastBACnetConstructedDataModificationDate(structType interface{}) BACnetConstructedDataModificationDate { - if casted, ok := structType.(BACnetConstructedDataModificationDate); ok { + if casted, ok := structType.(BACnetConstructedDataModificationDate); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataModificationDate); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataModificationDate) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetConstructedDataModificationDate) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataModificationDateParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("modificationDate"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for modificationDate") } - _modificationDate, _modificationDateErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) +_modificationDate, _modificationDateErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) if _modificationDateErr != nil { return nil, errors.Wrap(_modificationDateErr, "Error parsing 'modificationDate' field of BACnetConstructedDataModificationDate") } @@ -186,7 +188,7 @@ func BACnetConstructedDataModificationDateParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_BACnetConstructedDataModificationDate{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ModificationDate: modificationDate, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataModificationDate) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataModificationDate") } - // Simple Field (modificationDate) - if pushErr := writeBuffer.PushContext("modificationDate"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for modificationDate") - } - _modificationDateErr := writeBuffer.WriteSerializable(ctx, m.GetModificationDate()) - if popErr := writeBuffer.PopContext("modificationDate"); popErr != nil { - return errors.Wrap(popErr, "Error popping for modificationDate") - } - if _modificationDateErr != nil { - return errors.Wrap(_modificationDateErr, "Error serializing 'modificationDate' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (modificationDate) + if pushErr := writeBuffer.PushContext("modificationDate"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for modificationDate") + } + _modificationDateErr := writeBuffer.WriteSerializable(ctx, m.GetModificationDate()) + if popErr := writeBuffer.PopContext("modificationDate"); popErr != nil { + return errors.Wrap(popErr, "Error popping for modificationDate") + } + if _modificationDateErr != nil { + return errors.Wrap(_modificationDateErr, "Error serializing 'modificationDate' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataModificationDate"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataModificationDate") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataModificationDate) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataModificationDate) isBACnetConstructedDataModificationDate() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataModificationDate) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateInputAlarmValues.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateInputAlarmValues.go index c1f1156d785..e03ba23ee78 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateInputAlarmValues.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateInputAlarmValues.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataMultiStateInputAlarmValues is the corresponding interface of BACnetConstructedDataMultiStateInputAlarmValues type BACnetConstructedDataMultiStateInputAlarmValues interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataMultiStateInputAlarmValuesExactly interface { // _BACnetConstructedDataMultiStateInputAlarmValues is the data-structure of this message type _BACnetConstructedDataMultiStateInputAlarmValues struct { *_BACnetConstructedData - AlarmValues []BACnetApplicationTagUnsignedInteger + AlarmValues []BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataMultiStateInputAlarmValues) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_MULTI_STATE_INPUT -} +func (m *_BACnetConstructedDataMultiStateInputAlarmValues) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_MULTI_STATE_INPUT} -func (m *_BACnetConstructedDataMultiStateInputAlarmValues) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALARM_VALUES -} +func (m *_BACnetConstructedDataMultiStateInputAlarmValues) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALARM_VALUES} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataMultiStateInputAlarmValues) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataMultiStateInputAlarmValues) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataMultiStateInputAlarmValues) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataMultiStateInputAlarmValues) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataMultiStateInputAlarmValues) GetAlarmValues() []BA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataMultiStateInputAlarmValues factory function for _BACnetConstructedDataMultiStateInputAlarmValues -func NewBACnetConstructedDataMultiStateInputAlarmValues(alarmValues []BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataMultiStateInputAlarmValues { +func NewBACnetConstructedDataMultiStateInputAlarmValues( alarmValues []BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataMultiStateInputAlarmValues { _result := &_BACnetConstructedDataMultiStateInputAlarmValues{ - AlarmValues: alarmValues, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + AlarmValues: alarmValues, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataMultiStateInputAlarmValues(alarmValues []BACnetAppl // Deprecated: use the interface for direct cast func CastBACnetConstructedDataMultiStateInputAlarmValues(structType interface{}) BACnetConstructedDataMultiStateInputAlarmValues { - if casted, ok := structType.(BACnetConstructedDataMultiStateInputAlarmValues); ok { + if casted, ok := structType.(BACnetConstructedDataMultiStateInputAlarmValues); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataMultiStateInputAlarmValues); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataMultiStateInputAlarmValues) GetLengthInBits(ctx c return lengthInBits } + func (m *_BACnetConstructedDataMultiStateInputAlarmValues) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataMultiStateInputAlarmValuesParseWithBuffer(ctx context. // Terminated array var alarmValues []BACnetApplicationTagUnsignedInteger { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'alarmValues' field of BACnetConstructedDataMultiStateInputAlarmValues") } @@ -173,7 +175,7 @@ func BACnetConstructedDataMultiStateInputAlarmValuesParseWithBuffer(ctx context. // Create a partially initialized instance _child := &_BACnetConstructedDataMultiStateInputAlarmValues{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, AlarmValues: alarmValues, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataMultiStateInputAlarmValues) SerializeWithWriteBuf return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataMultiStateInputAlarmValues") } - // Array Field (alarmValues) - if pushErr := writeBuffer.PushContext("alarmValues", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for alarmValues") - } - for _curItem, _element := range m.GetAlarmValues() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAlarmValues()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'alarmValues' field") - } - } - if popErr := writeBuffer.PopContext("alarmValues", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for alarmValues") + // Array Field (alarmValues) + if pushErr := writeBuffer.PushContext("alarmValues", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for alarmValues") + } + for _curItem, _element := range m.GetAlarmValues() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAlarmValues()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'alarmValues' field") } + } + if popErr := writeBuffer.PopContext("alarmValues", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for alarmValues") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataMultiStateInputAlarmValues"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataMultiStateInputAlarmValues") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataMultiStateInputAlarmValues) SerializeWithWriteBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataMultiStateInputAlarmValues) isBACnetConstructedDataMultiStateInputAlarmValues() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataMultiStateInputAlarmValues) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateInputAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateInputAll.go index 85d8328e0ad..67d5a33788d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateInputAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateInputAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataMultiStateInputAll is the corresponding interface of BACnetConstructedDataMultiStateInputAll type BACnetConstructedDataMultiStateInputAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataMultiStateInputAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataMultiStateInputAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_MULTI_STATE_INPUT -} +func (m *_BACnetConstructedDataMultiStateInputAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_MULTI_STATE_INPUT} -func (m *_BACnetConstructedDataMultiStateInputAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataMultiStateInputAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataMultiStateInputAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataMultiStateInputAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataMultiStateInputAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataMultiStateInputAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataMultiStateInputAll factory function for _BACnetConstructedDataMultiStateInputAll -func NewBACnetConstructedDataMultiStateInputAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataMultiStateInputAll { +func NewBACnetConstructedDataMultiStateInputAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataMultiStateInputAll { _result := &_BACnetConstructedDataMultiStateInputAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataMultiStateInputAll(openingTag BACnetOpeningTag, pee // Deprecated: use the interface for direct cast func CastBACnetConstructedDataMultiStateInputAll(structType interface{}) BACnetConstructedDataMultiStateInputAll { - if casted, ok := structType.(BACnetConstructedDataMultiStateInputAll); ok { + if casted, ok := structType.(BACnetConstructedDataMultiStateInputAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataMultiStateInputAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataMultiStateInputAll) GetLengthInBits(ctx context.C return lengthInBits } + func (m *_BACnetConstructedDataMultiStateInputAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataMultiStateInputAllParseWithBuffer(ctx context.Context, _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataMultiStateInputAllParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataMultiStateInputAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataMultiStateInputAll) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataMultiStateInputAll) isBACnetConstructedDataMultiStateInputAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataMultiStateInputAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateInputFaultValues.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateInputFaultValues.go index 58f17d0cf66..2bc1cf89f86 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateInputFaultValues.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateInputFaultValues.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataMultiStateInputFaultValues is the corresponding interface of BACnetConstructedDataMultiStateInputFaultValues type BACnetConstructedDataMultiStateInputFaultValues interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataMultiStateInputFaultValuesExactly interface { // _BACnetConstructedDataMultiStateInputFaultValues is the data-structure of this message type _BACnetConstructedDataMultiStateInputFaultValues struct { *_BACnetConstructedData - FaultValues []BACnetApplicationTagUnsignedInteger + FaultValues []BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataMultiStateInputFaultValues) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_MULTI_STATE_INPUT -} +func (m *_BACnetConstructedDataMultiStateInputFaultValues) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_MULTI_STATE_INPUT} -func (m *_BACnetConstructedDataMultiStateInputFaultValues) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FAULT_VALUES -} +func (m *_BACnetConstructedDataMultiStateInputFaultValues) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FAULT_VALUES} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataMultiStateInputFaultValues) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataMultiStateInputFaultValues) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataMultiStateInputFaultValues) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataMultiStateInputFaultValues) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataMultiStateInputFaultValues) GetFaultValues() []BA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataMultiStateInputFaultValues factory function for _BACnetConstructedDataMultiStateInputFaultValues -func NewBACnetConstructedDataMultiStateInputFaultValues(faultValues []BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataMultiStateInputFaultValues { +func NewBACnetConstructedDataMultiStateInputFaultValues( faultValues []BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataMultiStateInputFaultValues { _result := &_BACnetConstructedDataMultiStateInputFaultValues{ - FaultValues: faultValues, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + FaultValues: faultValues, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataMultiStateInputFaultValues(faultValues []BACnetAppl // Deprecated: use the interface for direct cast func CastBACnetConstructedDataMultiStateInputFaultValues(structType interface{}) BACnetConstructedDataMultiStateInputFaultValues { - if casted, ok := structType.(BACnetConstructedDataMultiStateInputFaultValues); ok { + if casted, ok := structType.(BACnetConstructedDataMultiStateInputFaultValues); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataMultiStateInputFaultValues); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataMultiStateInputFaultValues) GetLengthInBits(ctx c return lengthInBits } + func (m *_BACnetConstructedDataMultiStateInputFaultValues) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataMultiStateInputFaultValuesParseWithBuffer(ctx context. // Terminated array var faultValues []BACnetApplicationTagUnsignedInteger { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'faultValues' field of BACnetConstructedDataMultiStateInputFaultValues") } @@ -173,7 +175,7 @@ func BACnetConstructedDataMultiStateInputFaultValuesParseWithBuffer(ctx context. // Create a partially initialized instance _child := &_BACnetConstructedDataMultiStateInputFaultValues{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FaultValues: faultValues, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataMultiStateInputFaultValues) SerializeWithWriteBuf return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataMultiStateInputFaultValues") } - // Array Field (faultValues) - if pushErr := writeBuffer.PushContext("faultValues", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for faultValues") - } - for _curItem, _element := range m.GetFaultValues() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetFaultValues()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'faultValues' field") - } - } - if popErr := writeBuffer.PopContext("faultValues", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for faultValues") + // Array Field (faultValues) + if pushErr := writeBuffer.PushContext("faultValues", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for faultValues") + } + for _curItem, _element := range m.GetFaultValues() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetFaultValues()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'faultValues' field") } + } + if popErr := writeBuffer.PopContext("faultValues", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for faultValues") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataMultiStateInputFaultValues"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataMultiStateInputFaultValues") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataMultiStateInputFaultValues) SerializeWithWriteBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataMultiStateInputFaultValues) isBACnetConstructedDataMultiStateInputFaultValues() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataMultiStateInputFaultValues) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateInputInterfaceValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateInputInterfaceValue.go index 6c0bc1a9a6e..a2845ead69c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateInputInterfaceValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateInputInterfaceValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataMultiStateInputInterfaceValue is the corresponding interface of BACnetConstructedDataMultiStateInputInterfaceValue type BACnetConstructedDataMultiStateInputInterfaceValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataMultiStateInputInterfaceValueExactly interface { // _BACnetConstructedDataMultiStateInputInterfaceValue is the data-structure of this message type _BACnetConstructedDataMultiStateInputInterfaceValue struct { *_BACnetConstructedData - InterfaceValue BACnetOptionalBinaryPV + InterfaceValue BACnetOptionalBinaryPV } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataMultiStateInputInterfaceValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_MULTI_STATE_INPUT -} +func (m *_BACnetConstructedDataMultiStateInputInterfaceValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_MULTI_STATE_INPUT} -func (m *_BACnetConstructedDataMultiStateInputInterfaceValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_INTERFACE_VALUE -} +func (m *_BACnetConstructedDataMultiStateInputInterfaceValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_INTERFACE_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataMultiStateInputInterfaceValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataMultiStateInputInterfaceValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataMultiStateInputInterfaceValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataMultiStateInputInterfaceValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataMultiStateInputInterfaceValue) GetActualValue() B /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataMultiStateInputInterfaceValue factory function for _BACnetConstructedDataMultiStateInputInterfaceValue -func NewBACnetConstructedDataMultiStateInputInterfaceValue(interfaceValue BACnetOptionalBinaryPV, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataMultiStateInputInterfaceValue { +func NewBACnetConstructedDataMultiStateInputInterfaceValue( interfaceValue BACnetOptionalBinaryPV , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataMultiStateInputInterfaceValue { _result := &_BACnetConstructedDataMultiStateInputInterfaceValue{ - InterfaceValue: interfaceValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + InterfaceValue: interfaceValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataMultiStateInputInterfaceValue(interfaceValue BACnet // Deprecated: use the interface for direct cast func CastBACnetConstructedDataMultiStateInputInterfaceValue(structType interface{}) BACnetConstructedDataMultiStateInputInterfaceValue { - if casted, ok := structType.(BACnetConstructedDataMultiStateInputInterfaceValue); ok { + if casted, ok := structType.(BACnetConstructedDataMultiStateInputInterfaceValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataMultiStateInputInterfaceValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataMultiStateInputInterfaceValue) GetLengthInBits(ct return lengthInBits } + func (m *_BACnetConstructedDataMultiStateInputInterfaceValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataMultiStateInputInterfaceValueParseWithBuffer(ctx conte if pullErr := readBuffer.PullContext("interfaceValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for interfaceValue") } - _interfaceValue, _interfaceValueErr := BACnetOptionalBinaryPVParseWithBuffer(ctx, readBuffer) +_interfaceValue, _interfaceValueErr := BACnetOptionalBinaryPVParseWithBuffer(ctx, readBuffer) if _interfaceValueErr != nil { return nil, errors.Wrap(_interfaceValueErr, "Error parsing 'interfaceValue' field of BACnetConstructedDataMultiStateInputInterfaceValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataMultiStateInputInterfaceValueParseWithBuffer(ctx conte // Create a partially initialized instance _child := &_BACnetConstructedDataMultiStateInputInterfaceValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, InterfaceValue: interfaceValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataMultiStateInputInterfaceValue) SerializeWithWrite return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataMultiStateInputInterfaceValue") } - // Simple Field (interfaceValue) - if pushErr := writeBuffer.PushContext("interfaceValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for interfaceValue") - } - _interfaceValueErr := writeBuffer.WriteSerializable(ctx, m.GetInterfaceValue()) - if popErr := writeBuffer.PopContext("interfaceValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for interfaceValue") - } - if _interfaceValueErr != nil { - return errors.Wrap(_interfaceValueErr, "Error serializing 'interfaceValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (interfaceValue) + if pushErr := writeBuffer.PushContext("interfaceValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for interfaceValue") + } + _interfaceValueErr := writeBuffer.WriteSerializable(ctx, m.GetInterfaceValue()) + if popErr := writeBuffer.PopContext("interfaceValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for interfaceValue") + } + if _interfaceValueErr != nil { + return errors.Wrap(_interfaceValueErr, "Error serializing 'interfaceValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataMultiStateInputInterfaceValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataMultiStateInputInterfaceValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataMultiStateInputInterfaceValue) SerializeWithWrite return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataMultiStateInputInterfaceValue) isBACnetConstructedDataMultiStateInputInterfaceValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataMultiStateInputInterfaceValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateOutputAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateOutputAll.go index e6d752f3dc4..33f82e88e2d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateOutputAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateOutputAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataMultiStateOutputAll is the corresponding interface of BACnetConstructedDataMultiStateOutputAll type BACnetConstructedDataMultiStateOutputAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataMultiStateOutputAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataMultiStateOutputAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_MULTI_STATE_OUTPUT -} +func (m *_BACnetConstructedDataMultiStateOutputAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_MULTI_STATE_OUTPUT} -func (m *_BACnetConstructedDataMultiStateOutputAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataMultiStateOutputAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataMultiStateOutputAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataMultiStateOutputAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataMultiStateOutputAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataMultiStateOutputAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataMultiStateOutputAll factory function for _BACnetConstructedDataMultiStateOutputAll -func NewBACnetConstructedDataMultiStateOutputAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataMultiStateOutputAll { +func NewBACnetConstructedDataMultiStateOutputAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataMultiStateOutputAll { _result := &_BACnetConstructedDataMultiStateOutputAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataMultiStateOutputAll(openingTag BACnetOpeningTag, pe // Deprecated: use the interface for direct cast func CastBACnetConstructedDataMultiStateOutputAll(structType interface{}) BACnetConstructedDataMultiStateOutputAll { - if casted, ok := structType.(BACnetConstructedDataMultiStateOutputAll); ok { + if casted, ok := structType.(BACnetConstructedDataMultiStateOutputAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataMultiStateOutputAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataMultiStateOutputAll) GetLengthInBits(ctx context. return lengthInBits } + func (m *_BACnetConstructedDataMultiStateOutputAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataMultiStateOutputAllParseWithBuffer(ctx context.Context _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataMultiStateOutputAllParseWithBuffer(ctx context.Context // Create a partially initialized instance _child := &_BACnetConstructedDataMultiStateOutputAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataMultiStateOutputAll) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataMultiStateOutputAll) isBACnetConstructedDataMultiStateOutputAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataMultiStateOutputAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateOutputFeedbackValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateOutputFeedbackValue.go index b186a06281b..1a73ca77f0c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateOutputFeedbackValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateOutputFeedbackValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataMultiStateOutputFeedbackValue is the corresponding interface of BACnetConstructedDataMultiStateOutputFeedbackValue type BACnetConstructedDataMultiStateOutputFeedbackValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataMultiStateOutputFeedbackValueExactly interface { // _BACnetConstructedDataMultiStateOutputFeedbackValue is the data-structure of this message type _BACnetConstructedDataMultiStateOutputFeedbackValue struct { *_BACnetConstructedData - FeedbackValue BACnetApplicationTagUnsignedInteger + FeedbackValue BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataMultiStateOutputFeedbackValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_MULTI_STATE_OUTPUT -} +func (m *_BACnetConstructedDataMultiStateOutputFeedbackValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_MULTI_STATE_OUTPUT} -func (m *_BACnetConstructedDataMultiStateOutputFeedbackValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FEEDBACK_VALUE -} +func (m *_BACnetConstructedDataMultiStateOutputFeedbackValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FEEDBACK_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataMultiStateOutputFeedbackValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataMultiStateOutputFeedbackValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataMultiStateOutputFeedbackValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataMultiStateOutputFeedbackValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataMultiStateOutputFeedbackValue) GetActualValue() B /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataMultiStateOutputFeedbackValue factory function for _BACnetConstructedDataMultiStateOutputFeedbackValue -func NewBACnetConstructedDataMultiStateOutputFeedbackValue(feedbackValue BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataMultiStateOutputFeedbackValue { +func NewBACnetConstructedDataMultiStateOutputFeedbackValue( feedbackValue BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataMultiStateOutputFeedbackValue { _result := &_BACnetConstructedDataMultiStateOutputFeedbackValue{ - FeedbackValue: feedbackValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + FeedbackValue: feedbackValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataMultiStateOutputFeedbackValue(feedbackValue BACnetA // Deprecated: use the interface for direct cast func CastBACnetConstructedDataMultiStateOutputFeedbackValue(structType interface{}) BACnetConstructedDataMultiStateOutputFeedbackValue { - if casted, ok := structType.(BACnetConstructedDataMultiStateOutputFeedbackValue); ok { + if casted, ok := structType.(BACnetConstructedDataMultiStateOutputFeedbackValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataMultiStateOutputFeedbackValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataMultiStateOutputFeedbackValue) GetLengthInBits(ct return lengthInBits } + func (m *_BACnetConstructedDataMultiStateOutputFeedbackValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataMultiStateOutputFeedbackValueParseWithBuffer(ctx conte if pullErr := readBuffer.PullContext("feedbackValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for feedbackValue") } - _feedbackValue, _feedbackValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_feedbackValue, _feedbackValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _feedbackValueErr != nil { return nil, errors.Wrap(_feedbackValueErr, "Error parsing 'feedbackValue' field of BACnetConstructedDataMultiStateOutputFeedbackValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataMultiStateOutputFeedbackValueParseWithBuffer(ctx conte // Create a partially initialized instance _child := &_BACnetConstructedDataMultiStateOutputFeedbackValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FeedbackValue: feedbackValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataMultiStateOutputFeedbackValue) SerializeWithWrite return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataMultiStateOutputFeedbackValue") } - // Simple Field (feedbackValue) - if pushErr := writeBuffer.PushContext("feedbackValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for feedbackValue") - } - _feedbackValueErr := writeBuffer.WriteSerializable(ctx, m.GetFeedbackValue()) - if popErr := writeBuffer.PopContext("feedbackValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for feedbackValue") - } - if _feedbackValueErr != nil { - return errors.Wrap(_feedbackValueErr, "Error serializing 'feedbackValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (feedbackValue) + if pushErr := writeBuffer.PushContext("feedbackValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for feedbackValue") + } + _feedbackValueErr := writeBuffer.WriteSerializable(ctx, m.GetFeedbackValue()) + if popErr := writeBuffer.PopContext("feedbackValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for feedbackValue") + } + if _feedbackValueErr != nil { + return errors.Wrap(_feedbackValueErr, "Error serializing 'feedbackValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataMultiStateOutputFeedbackValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataMultiStateOutputFeedbackValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataMultiStateOutputFeedbackValue) SerializeWithWrite return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataMultiStateOutputFeedbackValue) isBACnetConstructedDataMultiStateOutputFeedbackValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataMultiStateOutputFeedbackValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateOutputInterfaceValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateOutputInterfaceValue.go index acc417be698..7fabfdeaed2 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateOutputInterfaceValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateOutputInterfaceValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataMultiStateOutputInterfaceValue is the corresponding interface of BACnetConstructedDataMultiStateOutputInterfaceValue type BACnetConstructedDataMultiStateOutputInterfaceValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataMultiStateOutputInterfaceValueExactly interface { // _BACnetConstructedDataMultiStateOutputInterfaceValue is the data-structure of this message type _BACnetConstructedDataMultiStateOutputInterfaceValue struct { *_BACnetConstructedData - InterfaceValue BACnetOptionalBinaryPV + InterfaceValue BACnetOptionalBinaryPV } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataMultiStateOutputInterfaceValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_MULTI_STATE_OUTPUT -} +func (m *_BACnetConstructedDataMultiStateOutputInterfaceValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_MULTI_STATE_OUTPUT} -func (m *_BACnetConstructedDataMultiStateOutputInterfaceValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_INTERFACE_VALUE -} +func (m *_BACnetConstructedDataMultiStateOutputInterfaceValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_INTERFACE_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataMultiStateOutputInterfaceValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataMultiStateOutputInterfaceValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataMultiStateOutputInterfaceValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataMultiStateOutputInterfaceValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataMultiStateOutputInterfaceValue) GetActualValue() /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataMultiStateOutputInterfaceValue factory function for _BACnetConstructedDataMultiStateOutputInterfaceValue -func NewBACnetConstructedDataMultiStateOutputInterfaceValue(interfaceValue BACnetOptionalBinaryPV, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataMultiStateOutputInterfaceValue { +func NewBACnetConstructedDataMultiStateOutputInterfaceValue( interfaceValue BACnetOptionalBinaryPV , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataMultiStateOutputInterfaceValue { _result := &_BACnetConstructedDataMultiStateOutputInterfaceValue{ - InterfaceValue: interfaceValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + InterfaceValue: interfaceValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataMultiStateOutputInterfaceValue(interfaceValue BACne // Deprecated: use the interface for direct cast func CastBACnetConstructedDataMultiStateOutputInterfaceValue(structType interface{}) BACnetConstructedDataMultiStateOutputInterfaceValue { - if casted, ok := structType.(BACnetConstructedDataMultiStateOutputInterfaceValue); ok { + if casted, ok := structType.(BACnetConstructedDataMultiStateOutputInterfaceValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataMultiStateOutputInterfaceValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataMultiStateOutputInterfaceValue) GetLengthInBits(c return lengthInBits } + func (m *_BACnetConstructedDataMultiStateOutputInterfaceValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataMultiStateOutputInterfaceValueParseWithBuffer(ctx cont if pullErr := readBuffer.PullContext("interfaceValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for interfaceValue") } - _interfaceValue, _interfaceValueErr := BACnetOptionalBinaryPVParseWithBuffer(ctx, readBuffer) +_interfaceValue, _interfaceValueErr := BACnetOptionalBinaryPVParseWithBuffer(ctx, readBuffer) if _interfaceValueErr != nil { return nil, errors.Wrap(_interfaceValueErr, "Error parsing 'interfaceValue' field of BACnetConstructedDataMultiStateOutputInterfaceValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataMultiStateOutputInterfaceValueParseWithBuffer(ctx cont // Create a partially initialized instance _child := &_BACnetConstructedDataMultiStateOutputInterfaceValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, InterfaceValue: interfaceValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataMultiStateOutputInterfaceValue) SerializeWithWrit return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataMultiStateOutputInterfaceValue") } - // Simple Field (interfaceValue) - if pushErr := writeBuffer.PushContext("interfaceValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for interfaceValue") - } - _interfaceValueErr := writeBuffer.WriteSerializable(ctx, m.GetInterfaceValue()) - if popErr := writeBuffer.PopContext("interfaceValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for interfaceValue") - } - if _interfaceValueErr != nil { - return errors.Wrap(_interfaceValueErr, "Error serializing 'interfaceValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (interfaceValue) + if pushErr := writeBuffer.PushContext("interfaceValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for interfaceValue") + } + _interfaceValueErr := writeBuffer.WriteSerializable(ctx, m.GetInterfaceValue()) + if popErr := writeBuffer.PopContext("interfaceValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for interfaceValue") + } + if _interfaceValueErr != nil { + return errors.Wrap(_interfaceValueErr, "Error serializing 'interfaceValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataMultiStateOutputInterfaceValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataMultiStateOutputInterfaceValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataMultiStateOutputInterfaceValue) SerializeWithWrit return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataMultiStateOutputInterfaceValue) isBACnetConstructedDataMultiStateOutputInterfaceValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataMultiStateOutputInterfaceValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateOutputRelinquishDefault.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateOutputRelinquishDefault.go index ddfd7d53ab4..2ae683e62f1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateOutputRelinquishDefault.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateOutputRelinquishDefault.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataMultiStateOutputRelinquishDefault is the corresponding interface of BACnetConstructedDataMultiStateOutputRelinquishDefault type BACnetConstructedDataMultiStateOutputRelinquishDefault interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataMultiStateOutputRelinquishDefaultExactly interface { // _BACnetConstructedDataMultiStateOutputRelinquishDefault is the data-structure of this message type _BACnetConstructedDataMultiStateOutputRelinquishDefault struct { *_BACnetConstructedData - RelinquishDefault BACnetApplicationTagUnsignedInteger + RelinquishDefault BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataMultiStateOutputRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_MULTI_STATE_OUTPUT -} +func (m *_BACnetConstructedDataMultiStateOutputRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_MULTI_STATE_OUTPUT} -func (m *_BACnetConstructedDataMultiStateOutputRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_RELINQUISH_DEFAULT -} +func (m *_BACnetConstructedDataMultiStateOutputRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_RELINQUISH_DEFAULT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataMultiStateOutputRelinquishDefault) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataMultiStateOutputRelinquishDefault) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataMultiStateOutputRelinquishDefault) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataMultiStateOutputRelinquishDefault) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataMultiStateOutputRelinquishDefault) GetActualValue /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataMultiStateOutputRelinquishDefault factory function for _BACnetConstructedDataMultiStateOutputRelinquishDefault -func NewBACnetConstructedDataMultiStateOutputRelinquishDefault(relinquishDefault BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataMultiStateOutputRelinquishDefault { +func NewBACnetConstructedDataMultiStateOutputRelinquishDefault( relinquishDefault BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataMultiStateOutputRelinquishDefault { _result := &_BACnetConstructedDataMultiStateOutputRelinquishDefault{ - RelinquishDefault: relinquishDefault, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + RelinquishDefault: relinquishDefault, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataMultiStateOutputRelinquishDefault(relinquishDefault // Deprecated: use the interface for direct cast func CastBACnetConstructedDataMultiStateOutputRelinquishDefault(structType interface{}) BACnetConstructedDataMultiStateOutputRelinquishDefault { - if casted, ok := structType.(BACnetConstructedDataMultiStateOutputRelinquishDefault); ok { + if casted, ok := structType.(BACnetConstructedDataMultiStateOutputRelinquishDefault); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataMultiStateOutputRelinquishDefault); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataMultiStateOutputRelinquishDefault) GetLengthInBit return lengthInBits } + func (m *_BACnetConstructedDataMultiStateOutputRelinquishDefault) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataMultiStateOutputRelinquishDefaultParseWithBuffer(ctx c if pullErr := readBuffer.PullContext("relinquishDefault"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for relinquishDefault") } - _relinquishDefault, _relinquishDefaultErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_relinquishDefault, _relinquishDefaultErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _relinquishDefaultErr != nil { return nil, errors.Wrap(_relinquishDefaultErr, "Error parsing 'relinquishDefault' field of BACnetConstructedDataMultiStateOutputRelinquishDefault") } @@ -186,7 +188,7 @@ func BACnetConstructedDataMultiStateOutputRelinquishDefaultParseWithBuffer(ctx c // Create a partially initialized instance _child := &_BACnetConstructedDataMultiStateOutputRelinquishDefault{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, RelinquishDefault: relinquishDefault, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataMultiStateOutputRelinquishDefault) SerializeWithW return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataMultiStateOutputRelinquishDefault") } - // Simple Field (relinquishDefault) - if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for relinquishDefault") - } - _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) - if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { - return errors.Wrap(popErr, "Error popping for relinquishDefault") - } - if _relinquishDefaultErr != nil { - return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (relinquishDefault) + if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for relinquishDefault") + } + _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) + if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { + return errors.Wrap(popErr, "Error popping for relinquishDefault") + } + if _relinquishDefaultErr != nil { + return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataMultiStateOutputRelinquishDefault"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataMultiStateOutputRelinquishDefault") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataMultiStateOutputRelinquishDefault) SerializeWithW return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataMultiStateOutputRelinquishDefault) isBACnetConstructedDataMultiStateOutputRelinquishDefault() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataMultiStateOutputRelinquishDefault) String() strin } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateValueAlarmValues.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateValueAlarmValues.go index 0019fcaaf16..2bc3adec934 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateValueAlarmValues.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateValueAlarmValues.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataMultiStateValueAlarmValues is the corresponding interface of BACnetConstructedDataMultiStateValueAlarmValues type BACnetConstructedDataMultiStateValueAlarmValues interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataMultiStateValueAlarmValuesExactly interface { // _BACnetConstructedDataMultiStateValueAlarmValues is the data-structure of this message type _BACnetConstructedDataMultiStateValueAlarmValues struct { *_BACnetConstructedData - AlarmValues []BACnetApplicationTagUnsignedInteger + AlarmValues []BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataMultiStateValueAlarmValues) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_MULTI_STATE_VALUE -} +func (m *_BACnetConstructedDataMultiStateValueAlarmValues) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_MULTI_STATE_VALUE} -func (m *_BACnetConstructedDataMultiStateValueAlarmValues) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALARM_VALUES -} +func (m *_BACnetConstructedDataMultiStateValueAlarmValues) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALARM_VALUES} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataMultiStateValueAlarmValues) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataMultiStateValueAlarmValues) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataMultiStateValueAlarmValues) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataMultiStateValueAlarmValues) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataMultiStateValueAlarmValues) GetAlarmValues() []BA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataMultiStateValueAlarmValues factory function for _BACnetConstructedDataMultiStateValueAlarmValues -func NewBACnetConstructedDataMultiStateValueAlarmValues(alarmValues []BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataMultiStateValueAlarmValues { +func NewBACnetConstructedDataMultiStateValueAlarmValues( alarmValues []BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataMultiStateValueAlarmValues { _result := &_BACnetConstructedDataMultiStateValueAlarmValues{ - AlarmValues: alarmValues, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + AlarmValues: alarmValues, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataMultiStateValueAlarmValues(alarmValues []BACnetAppl // Deprecated: use the interface for direct cast func CastBACnetConstructedDataMultiStateValueAlarmValues(structType interface{}) BACnetConstructedDataMultiStateValueAlarmValues { - if casted, ok := structType.(BACnetConstructedDataMultiStateValueAlarmValues); ok { + if casted, ok := structType.(BACnetConstructedDataMultiStateValueAlarmValues); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataMultiStateValueAlarmValues); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataMultiStateValueAlarmValues) GetLengthInBits(ctx c return lengthInBits } + func (m *_BACnetConstructedDataMultiStateValueAlarmValues) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataMultiStateValueAlarmValuesParseWithBuffer(ctx context. // Terminated array var alarmValues []BACnetApplicationTagUnsignedInteger { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'alarmValues' field of BACnetConstructedDataMultiStateValueAlarmValues") } @@ -173,7 +175,7 @@ func BACnetConstructedDataMultiStateValueAlarmValuesParseWithBuffer(ctx context. // Create a partially initialized instance _child := &_BACnetConstructedDataMultiStateValueAlarmValues{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, AlarmValues: alarmValues, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataMultiStateValueAlarmValues) SerializeWithWriteBuf return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataMultiStateValueAlarmValues") } - // Array Field (alarmValues) - if pushErr := writeBuffer.PushContext("alarmValues", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for alarmValues") - } - for _curItem, _element := range m.GetAlarmValues() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAlarmValues()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'alarmValues' field") - } - } - if popErr := writeBuffer.PopContext("alarmValues", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for alarmValues") + // Array Field (alarmValues) + if pushErr := writeBuffer.PushContext("alarmValues", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for alarmValues") + } + for _curItem, _element := range m.GetAlarmValues() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAlarmValues()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'alarmValues' field") } + } + if popErr := writeBuffer.PopContext("alarmValues", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for alarmValues") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataMultiStateValueAlarmValues"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataMultiStateValueAlarmValues") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataMultiStateValueAlarmValues) SerializeWithWriteBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataMultiStateValueAlarmValues) isBACnetConstructedDataMultiStateValueAlarmValues() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataMultiStateValueAlarmValues) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateValueAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateValueAll.go index 08dc0c3ce9e..83eeb4a062b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateValueAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateValueAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataMultiStateValueAll is the corresponding interface of BACnetConstructedDataMultiStateValueAll type BACnetConstructedDataMultiStateValueAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataMultiStateValueAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataMultiStateValueAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_MULTI_STATE_VALUE -} +func (m *_BACnetConstructedDataMultiStateValueAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_MULTI_STATE_VALUE} -func (m *_BACnetConstructedDataMultiStateValueAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataMultiStateValueAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataMultiStateValueAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataMultiStateValueAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataMultiStateValueAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataMultiStateValueAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataMultiStateValueAll factory function for _BACnetConstructedDataMultiStateValueAll -func NewBACnetConstructedDataMultiStateValueAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataMultiStateValueAll { +func NewBACnetConstructedDataMultiStateValueAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataMultiStateValueAll { _result := &_BACnetConstructedDataMultiStateValueAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataMultiStateValueAll(openingTag BACnetOpeningTag, pee // Deprecated: use the interface for direct cast func CastBACnetConstructedDataMultiStateValueAll(structType interface{}) BACnetConstructedDataMultiStateValueAll { - if casted, ok := structType.(BACnetConstructedDataMultiStateValueAll); ok { + if casted, ok := structType.(BACnetConstructedDataMultiStateValueAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataMultiStateValueAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataMultiStateValueAll) GetLengthInBits(ctx context.C return lengthInBits } + func (m *_BACnetConstructedDataMultiStateValueAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataMultiStateValueAllParseWithBuffer(ctx context.Context, _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataMultiStateValueAllParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataMultiStateValueAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataMultiStateValueAll) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataMultiStateValueAll) isBACnetConstructedDataMultiStateValueAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataMultiStateValueAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateValueFaultValues.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateValueFaultValues.go index 2bfb7bf021c..b70377491f9 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateValueFaultValues.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateValueFaultValues.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataMultiStateValueFaultValues is the corresponding interface of BACnetConstructedDataMultiStateValueFaultValues type BACnetConstructedDataMultiStateValueFaultValues interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataMultiStateValueFaultValuesExactly interface { // _BACnetConstructedDataMultiStateValueFaultValues is the data-structure of this message type _BACnetConstructedDataMultiStateValueFaultValues struct { *_BACnetConstructedData - FaultValues []BACnetApplicationTagUnsignedInteger + FaultValues []BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataMultiStateValueFaultValues) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_MULTI_STATE_VALUE -} +func (m *_BACnetConstructedDataMultiStateValueFaultValues) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_MULTI_STATE_VALUE} -func (m *_BACnetConstructedDataMultiStateValueFaultValues) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FAULT_VALUES -} +func (m *_BACnetConstructedDataMultiStateValueFaultValues) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FAULT_VALUES} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataMultiStateValueFaultValues) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataMultiStateValueFaultValues) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataMultiStateValueFaultValues) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataMultiStateValueFaultValues) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataMultiStateValueFaultValues) GetFaultValues() []BA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataMultiStateValueFaultValues factory function for _BACnetConstructedDataMultiStateValueFaultValues -func NewBACnetConstructedDataMultiStateValueFaultValues(faultValues []BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataMultiStateValueFaultValues { +func NewBACnetConstructedDataMultiStateValueFaultValues( faultValues []BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataMultiStateValueFaultValues { _result := &_BACnetConstructedDataMultiStateValueFaultValues{ - FaultValues: faultValues, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + FaultValues: faultValues, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataMultiStateValueFaultValues(faultValues []BACnetAppl // Deprecated: use the interface for direct cast func CastBACnetConstructedDataMultiStateValueFaultValues(structType interface{}) BACnetConstructedDataMultiStateValueFaultValues { - if casted, ok := structType.(BACnetConstructedDataMultiStateValueFaultValues); ok { + if casted, ok := structType.(BACnetConstructedDataMultiStateValueFaultValues); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataMultiStateValueFaultValues); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataMultiStateValueFaultValues) GetLengthInBits(ctx c return lengthInBits } + func (m *_BACnetConstructedDataMultiStateValueFaultValues) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataMultiStateValueFaultValuesParseWithBuffer(ctx context. // Terminated array var faultValues []BACnetApplicationTagUnsignedInteger { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'faultValues' field of BACnetConstructedDataMultiStateValueFaultValues") } @@ -173,7 +175,7 @@ func BACnetConstructedDataMultiStateValueFaultValuesParseWithBuffer(ctx context. // Create a partially initialized instance _child := &_BACnetConstructedDataMultiStateValueFaultValues{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FaultValues: faultValues, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataMultiStateValueFaultValues) SerializeWithWriteBuf return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataMultiStateValueFaultValues") } - // Array Field (faultValues) - if pushErr := writeBuffer.PushContext("faultValues", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for faultValues") - } - for _curItem, _element := range m.GetFaultValues() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetFaultValues()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'faultValues' field") - } - } - if popErr := writeBuffer.PopContext("faultValues", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for faultValues") + // Array Field (faultValues) + if pushErr := writeBuffer.PushContext("faultValues", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for faultValues") + } + for _curItem, _element := range m.GetFaultValues() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetFaultValues()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'faultValues' field") } + } + if popErr := writeBuffer.PopContext("faultValues", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for faultValues") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataMultiStateValueFaultValues"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataMultiStateValueFaultValues") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataMultiStateValueFaultValues) SerializeWithWriteBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataMultiStateValueFaultValues) isBACnetConstructedDataMultiStateValueFaultValues() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataMultiStateValueFaultValues) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateValueRelinquishDefault.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateValueRelinquishDefault.go index f655f9240c5..2c3203db9ab 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateValueRelinquishDefault.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMultiStateValueRelinquishDefault.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataMultiStateValueRelinquishDefault is the corresponding interface of BACnetConstructedDataMultiStateValueRelinquishDefault type BACnetConstructedDataMultiStateValueRelinquishDefault interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataMultiStateValueRelinquishDefaultExactly interface { // _BACnetConstructedDataMultiStateValueRelinquishDefault is the data-structure of this message type _BACnetConstructedDataMultiStateValueRelinquishDefault struct { *_BACnetConstructedData - RelinquishDefault BACnetApplicationTagUnsignedInteger + RelinquishDefault BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataMultiStateValueRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_MULTI_STATE_VALUE -} +func (m *_BACnetConstructedDataMultiStateValueRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_MULTI_STATE_VALUE} -func (m *_BACnetConstructedDataMultiStateValueRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_RELINQUISH_DEFAULT -} +func (m *_BACnetConstructedDataMultiStateValueRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_RELINQUISH_DEFAULT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataMultiStateValueRelinquishDefault) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataMultiStateValueRelinquishDefault) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataMultiStateValueRelinquishDefault) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataMultiStateValueRelinquishDefault) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataMultiStateValueRelinquishDefault) GetActualValue( /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataMultiStateValueRelinquishDefault factory function for _BACnetConstructedDataMultiStateValueRelinquishDefault -func NewBACnetConstructedDataMultiStateValueRelinquishDefault(relinquishDefault BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataMultiStateValueRelinquishDefault { +func NewBACnetConstructedDataMultiStateValueRelinquishDefault( relinquishDefault BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataMultiStateValueRelinquishDefault { _result := &_BACnetConstructedDataMultiStateValueRelinquishDefault{ - RelinquishDefault: relinquishDefault, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + RelinquishDefault: relinquishDefault, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataMultiStateValueRelinquishDefault(relinquishDefault // Deprecated: use the interface for direct cast func CastBACnetConstructedDataMultiStateValueRelinquishDefault(structType interface{}) BACnetConstructedDataMultiStateValueRelinquishDefault { - if casted, ok := structType.(BACnetConstructedDataMultiStateValueRelinquishDefault); ok { + if casted, ok := structType.(BACnetConstructedDataMultiStateValueRelinquishDefault); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataMultiStateValueRelinquishDefault); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataMultiStateValueRelinquishDefault) GetLengthInBits return lengthInBits } + func (m *_BACnetConstructedDataMultiStateValueRelinquishDefault) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataMultiStateValueRelinquishDefaultParseWithBuffer(ctx co if pullErr := readBuffer.PullContext("relinquishDefault"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for relinquishDefault") } - _relinquishDefault, _relinquishDefaultErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_relinquishDefault, _relinquishDefaultErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _relinquishDefaultErr != nil { return nil, errors.Wrap(_relinquishDefaultErr, "Error parsing 'relinquishDefault' field of BACnetConstructedDataMultiStateValueRelinquishDefault") } @@ -186,7 +188,7 @@ func BACnetConstructedDataMultiStateValueRelinquishDefaultParseWithBuffer(ctx co // Create a partially initialized instance _child := &_BACnetConstructedDataMultiStateValueRelinquishDefault{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, RelinquishDefault: relinquishDefault, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataMultiStateValueRelinquishDefault) SerializeWithWr return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataMultiStateValueRelinquishDefault") } - // Simple Field (relinquishDefault) - if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for relinquishDefault") - } - _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) - if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { - return errors.Wrap(popErr, "Error popping for relinquishDefault") - } - if _relinquishDefaultErr != nil { - return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (relinquishDefault) + if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for relinquishDefault") + } + _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) + if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { + return errors.Wrap(popErr, "Error popping for relinquishDefault") + } + if _relinquishDefaultErr != nil { + return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataMultiStateValueRelinquishDefault"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataMultiStateValueRelinquishDefault") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataMultiStateValueRelinquishDefault) SerializeWithWr return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataMultiStateValueRelinquishDefault) isBACnetConstructedDataMultiStateValueRelinquishDefault() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataMultiStateValueRelinquishDefault) String() string } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMusterPoint.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMusterPoint.go index 167a8394b19..3c28c499055 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMusterPoint.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataMusterPoint.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataMusterPoint is the corresponding interface of BACnetConstructedDataMusterPoint type BACnetConstructedDataMusterPoint interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataMusterPointExactly interface { // _BACnetConstructedDataMusterPoint is the data-structure of this message type _BACnetConstructedDataMusterPoint struct { *_BACnetConstructedData - MusterPoint BACnetApplicationTagBoolean + MusterPoint BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataMusterPoint) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataMusterPoint) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataMusterPoint) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MUSTER_POINT -} +func (m *_BACnetConstructedDataMusterPoint) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MUSTER_POINT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataMusterPoint) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataMusterPoint) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataMusterPoint) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataMusterPoint) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataMusterPoint) GetActualValue() BACnetApplicationTa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataMusterPoint factory function for _BACnetConstructedDataMusterPoint -func NewBACnetConstructedDataMusterPoint(musterPoint BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataMusterPoint { +func NewBACnetConstructedDataMusterPoint( musterPoint BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataMusterPoint { _result := &_BACnetConstructedDataMusterPoint{ - MusterPoint: musterPoint, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + MusterPoint: musterPoint, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataMusterPoint(musterPoint BACnetApplicationTagBoolean // Deprecated: use the interface for direct cast func CastBACnetConstructedDataMusterPoint(structType interface{}) BACnetConstructedDataMusterPoint { - if casted, ok := structType.(BACnetConstructedDataMusterPoint); ok { + if casted, ok := structType.(BACnetConstructedDataMusterPoint); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataMusterPoint); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataMusterPoint) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataMusterPoint) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataMusterPointParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("musterPoint"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for musterPoint") } - _musterPoint, _musterPointErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_musterPoint, _musterPointErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _musterPointErr != nil { return nil, errors.Wrap(_musterPointErr, "Error parsing 'musterPoint' field of BACnetConstructedDataMusterPoint") } @@ -186,7 +188,7 @@ func BACnetConstructedDataMusterPointParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataMusterPoint{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, MusterPoint: musterPoint, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataMusterPoint) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataMusterPoint") } - // Simple Field (musterPoint) - if pushErr := writeBuffer.PushContext("musterPoint"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for musterPoint") - } - _musterPointErr := writeBuffer.WriteSerializable(ctx, m.GetMusterPoint()) - if popErr := writeBuffer.PopContext("musterPoint"); popErr != nil { - return errors.Wrap(popErr, "Error popping for musterPoint") - } - if _musterPointErr != nil { - return errors.Wrap(_musterPointErr, "Error serializing 'musterPoint' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (musterPoint) + if pushErr := writeBuffer.PushContext("musterPoint"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for musterPoint") + } + _musterPointErr := writeBuffer.WriteSerializable(ctx, m.GetMusterPoint()) + if popErr := writeBuffer.PopContext("musterPoint"); popErr != nil { + return errors.Wrap(popErr, "Error popping for musterPoint") + } + if _musterPointErr != nil { + return errors.Wrap(_musterPointErr, "Error serializing 'musterPoint' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataMusterPoint"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataMusterPoint") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataMusterPoint) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataMusterPoint) isBACnetConstructedDataMusterPoint() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataMusterPoint) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNegativeAccessRules.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNegativeAccessRules.go index 5672878b131..0b88f46923c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNegativeAccessRules.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNegativeAccessRules.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataNegativeAccessRules is the corresponding interface of BACnetConstructedDataNegativeAccessRules type BACnetConstructedDataNegativeAccessRules interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataNegativeAccessRulesExactly interface { // _BACnetConstructedDataNegativeAccessRules is the data-structure of this message type _BACnetConstructedDataNegativeAccessRules struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - NegativeAccessRules []BACnetAccessRule + NumberOfDataElements BACnetApplicationTagUnsignedInteger + NegativeAccessRules []BACnetAccessRule } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataNegativeAccessRules) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataNegativeAccessRules) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataNegativeAccessRules) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_NEGATIVE_ACCESS_RULES -} +func (m *_BACnetConstructedDataNegativeAccessRules) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_NEGATIVE_ACCESS_RULES} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataNegativeAccessRules) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataNegativeAccessRules) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataNegativeAccessRules) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataNegativeAccessRules) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataNegativeAccessRules) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataNegativeAccessRules factory function for _BACnetConstructedDataNegativeAccessRules -func NewBACnetConstructedDataNegativeAccessRules(numberOfDataElements BACnetApplicationTagUnsignedInteger, negativeAccessRules []BACnetAccessRule, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataNegativeAccessRules { +func NewBACnetConstructedDataNegativeAccessRules( numberOfDataElements BACnetApplicationTagUnsignedInteger , negativeAccessRules []BACnetAccessRule , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataNegativeAccessRules { _result := &_BACnetConstructedDataNegativeAccessRules{ - NumberOfDataElements: numberOfDataElements, - NegativeAccessRules: negativeAccessRules, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + NegativeAccessRules: negativeAccessRules, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataNegativeAccessRules(numberOfDataElements BACnetAppl // Deprecated: use the interface for direct cast func CastBACnetConstructedDataNegativeAccessRules(structType interface{}) BACnetConstructedDataNegativeAccessRules { - if casted, ok := structType.(BACnetConstructedDataNegativeAccessRules); ok { + if casted, ok := structType.(BACnetConstructedDataNegativeAccessRules); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataNegativeAccessRules); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataNegativeAccessRules) GetLengthInBits(ctx context. return lengthInBits } + func (m *_BACnetConstructedDataNegativeAccessRules) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataNegativeAccessRulesParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataNegativeAccessRulesParseWithBuffer(ctx context.Context // Terminated array var negativeAccessRules []BACnetAccessRule { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetAccessRuleParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetAccessRuleParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'negativeAccessRules' field of BACnetConstructedDataNegativeAccessRules") } @@ -235,11 +237,11 @@ func BACnetConstructedDataNegativeAccessRulesParseWithBuffer(ctx context.Context // Create a partially initialized instance _child := &_BACnetConstructedDataNegativeAccessRules{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - NegativeAccessRules: negativeAccessRules, + NegativeAccessRules: negativeAccessRules, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataNegativeAccessRules) SerializeWithWriteBuffer(ctx if pushErr := writeBuffer.PushContext("BACnetConstructedDataNegativeAccessRules"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataNegativeAccessRules") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (negativeAccessRules) - if pushErr := writeBuffer.PushContext("negativeAccessRules", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for negativeAccessRules") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetNegativeAccessRules() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetNegativeAccessRules()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'negativeAccessRules' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("negativeAccessRules", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for negativeAccessRules") + } + + // Array Field (negativeAccessRules) + if pushErr := writeBuffer.PushContext("negativeAccessRules", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for negativeAccessRules") + } + for _curItem, _element := range m.GetNegativeAccessRules() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetNegativeAccessRules()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'negativeAccessRules' field") } + } + if popErr := writeBuffer.PopContext("negativeAccessRules", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for negativeAccessRules") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataNegativeAccessRules"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataNegativeAccessRules") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataNegativeAccessRules) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataNegativeAccessRules) isBACnetConstructedDataNegativeAccessRules() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataNegativeAccessRules) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNetworkAccessSecurityPolicies.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNetworkAccessSecurityPolicies.go index b300f2e27a1..63a9536e8b2 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNetworkAccessSecurityPolicies.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNetworkAccessSecurityPolicies.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataNetworkAccessSecurityPolicies is the corresponding interface of BACnetConstructedDataNetworkAccessSecurityPolicies type BACnetConstructedDataNetworkAccessSecurityPolicies interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataNetworkAccessSecurityPoliciesExactly interface { // _BACnetConstructedDataNetworkAccessSecurityPolicies is the data-structure of this message type _BACnetConstructedDataNetworkAccessSecurityPolicies struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - NetworkAccessSecurityPolicies []BACnetNetworkSecurityPolicy + NumberOfDataElements BACnetApplicationTagUnsignedInteger + NetworkAccessSecurityPolicies []BACnetNetworkSecurityPolicy } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataNetworkAccessSecurityPolicies) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataNetworkAccessSecurityPolicies) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataNetworkAccessSecurityPolicies) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_NETWORK_ACCESS_SECURITY_POLICIES -} +func (m *_BACnetConstructedDataNetworkAccessSecurityPolicies) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_NETWORK_ACCESS_SECURITY_POLICIES} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataNetworkAccessSecurityPolicies) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataNetworkAccessSecurityPolicies) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataNetworkAccessSecurityPolicies) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataNetworkAccessSecurityPolicies) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataNetworkAccessSecurityPolicies) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataNetworkAccessSecurityPolicies factory function for _BACnetConstructedDataNetworkAccessSecurityPolicies -func NewBACnetConstructedDataNetworkAccessSecurityPolicies(numberOfDataElements BACnetApplicationTagUnsignedInteger, networkAccessSecurityPolicies []BACnetNetworkSecurityPolicy, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataNetworkAccessSecurityPolicies { +func NewBACnetConstructedDataNetworkAccessSecurityPolicies( numberOfDataElements BACnetApplicationTagUnsignedInteger , networkAccessSecurityPolicies []BACnetNetworkSecurityPolicy , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataNetworkAccessSecurityPolicies { _result := &_BACnetConstructedDataNetworkAccessSecurityPolicies{ - NumberOfDataElements: numberOfDataElements, + NumberOfDataElements: numberOfDataElements, NetworkAccessSecurityPolicies: networkAccessSecurityPolicies, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataNetworkAccessSecurityPolicies(numberOfDataElements // Deprecated: use the interface for direct cast func CastBACnetConstructedDataNetworkAccessSecurityPolicies(structType interface{}) BACnetConstructedDataNetworkAccessSecurityPolicies { - if casted, ok := structType.(BACnetConstructedDataNetworkAccessSecurityPolicies); ok { + if casted, ok := structType.(BACnetConstructedDataNetworkAccessSecurityPolicies); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataNetworkAccessSecurityPolicies); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataNetworkAccessSecurityPolicies) GetLengthInBits(ct return lengthInBits } + func (m *_BACnetConstructedDataNetworkAccessSecurityPolicies) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataNetworkAccessSecurityPoliciesParseWithBuffer(ctx conte if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataNetworkAccessSecurityPoliciesParseWithBuffer(ctx conte // Terminated array var networkAccessSecurityPolicies []BACnetNetworkSecurityPolicy { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetNetworkSecurityPolicyParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetNetworkSecurityPolicyParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'networkAccessSecurityPolicies' field of BACnetConstructedDataNetworkAccessSecurityPolicies") } @@ -235,10 +237,10 @@ func BACnetConstructedDataNetworkAccessSecurityPoliciesParseWithBuffer(ctx conte // Create a partially initialized instance _child := &_BACnetConstructedDataNetworkAccessSecurityPolicies{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, - NumberOfDataElements: numberOfDataElements, + NumberOfDataElements: numberOfDataElements, NetworkAccessSecurityPolicies: networkAccessSecurityPolicies, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataNetworkAccessSecurityPolicies) SerializeWithWrite if pushErr := writeBuffer.PushContext("BACnetConstructedDataNetworkAccessSecurityPolicies"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataNetworkAccessSecurityPolicies") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (networkAccessSecurityPolicies) - if pushErr := writeBuffer.PushContext("networkAccessSecurityPolicies", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for networkAccessSecurityPolicies") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetNetworkAccessSecurityPolicies() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetNetworkAccessSecurityPolicies()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'networkAccessSecurityPolicies' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("networkAccessSecurityPolicies", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for networkAccessSecurityPolicies") + } + + // Array Field (networkAccessSecurityPolicies) + if pushErr := writeBuffer.PushContext("networkAccessSecurityPolicies", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for networkAccessSecurityPolicies") + } + for _curItem, _element := range m.GetNetworkAccessSecurityPolicies() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetNetworkAccessSecurityPolicies()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'networkAccessSecurityPolicies' field") } + } + if popErr := writeBuffer.PopContext("networkAccessSecurityPolicies", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for networkAccessSecurityPolicies") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataNetworkAccessSecurityPolicies"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataNetworkAccessSecurityPolicies") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataNetworkAccessSecurityPolicies) SerializeWithWrite return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataNetworkAccessSecurityPolicies) isBACnetConstructedDataNetworkAccessSecurityPolicies() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataNetworkAccessSecurityPolicies) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNetworkInterfaceName.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNetworkInterfaceName.go index 08cf8c14157..21237b9095b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNetworkInterfaceName.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNetworkInterfaceName.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataNetworkInterfaceName is the corresponding interface of BACnetConstructedDataNetworkInterfaceName type BACnetConstructedDataNetworkInterfaceName interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataNetworkInterfaceNameExactly interface { // _BACnetConstructedDataNetworkInterfaceName is the data-structure of this message type _BACnetConstructedDataNetworkInterfaceName struct { *_BACnetConstructedData - NetworkInterfaceName BACnetApplicationTagCharacterString + NetworkInterfaceName BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataNetworkInterfaceName) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataNetworkInterfaceName) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataNetworkInterfaceName) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_NETWORK_INTERFACE_NAME -} +func (m *_BACnetConstructedDataNetworkInterfaceName) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_NETWORK_INTERFACE_NAME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataNetworkInterfaceName) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataNetworkInterfaceName) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataNetworkInterfaceName) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataNetworkInterfaceName) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataNetworkInterfaceName) GetActualValue() BACnetAppl /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataNetworkInterfaceName factory function for _BACnetConstructedDataNetworkInterfaceName -func NewBACnetConstructedDataNetworkInterfaceName(networkInterfaceName BACnetApplicationTagCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataNetworkInterfaceName { +func NewBACnetConstructedDataNetworkInterfaceName( networkInterfaceName BACnetApplicationTagCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataNetworkInterfaceName { _result := &_BACnetConstructedDataNetworkInterfaceName{ - NetworkInterfaceName: networkInterfaceName, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NetworkInterfaceName: networkInterfaceName, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataNetworkInterfaceName(networkInterfaceName BACnetApp // Deprecated: use the interface for direct cast func CastBACnetConstructedDataNetworkInterfaceName(structType interface{}) BACnetConstructedDataNetworkInterfaceName { - if casted, ok := structType.(BACnetConstructedDataNetworkInterfaceName); ok { + if casted, ok := structType.(BACnetConstructedDataNetworkInterfaceName); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataNetworkInterfaceName); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataNetworkInterfaceName) GetLengthInBits(ctx context return lengthInBits } + func (m *_BACnetConstructedDataNetworkInterfaceName) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataNetworkInterfaceNameParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("networkInterfaceName"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for networkInterfaceName") } - _networkInterfaceName, _networkInterfaceNameErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_networkInterfaceName, _networkInterfaceNameErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _networkInterfaceNameErr != nil { return nil, errors.Wrap(_networkInterfaceNameErr, "Error parsing 'networkInterfaceName' field of BACnetConstructedDataNetworkInterfaceName") } @@ -186,7 +188,7 @@ func BACnetConstructedDataNetworkInterfaceNameParseWithBuffer(ctx context.Contex // Create a partially initialized instance _child := &_BACnetConstructedDataNetworkInterfaceName{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NetworkInterfaceName: networkInterfaceName, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataNetworkInterfaceName) SerializeWithWriteBuffer(ct return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataNetworkInterfaceName") } - // Simple Field (networkInterfaceName) - if pushErr := writeBuffer.PushContext("networkInterfaceName"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for networkInterfaceName") - } - _networkInterfaceNameErr := writeBuffer.WriteSerializable(ctx, m.GetNetworkInterfaceName()) - if popErr := writeBuffer.PopContext("networkInterfaceName"); popErr != nil { - return errors.Wrap(popErr, "Error popping for networkInterfaceName") - } - if _networkInterfaceNameErr != nil { - return errors.Wrap(_networkInterfaceNameErr, "Error serializing 'networkInterfaceName' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (networkInterfaceName) + if pushErr := writeBuffer.PushContext("networkInterfaceName"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for networkInterfaceName") + } + _networkInterfaceNameErr := writeBuffer.WriteSerializable(ctx, m.GetNetworkInterfaceName()) + if popErr := writeBuffer.PopContext("networkInterfaceName"); popErr != nil { + return errors.Wrap(popErr, "Error popping for networkInterfaceName") + } + if _networkInterfaceNameErr != nil { + return errors.Wrap(_networkInterfaceNameErr, "Error serializing 'networkInterfaceName' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataNetworkInterfaceName"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataNetworkInterfaceName") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataNetworkInterfaceName) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataNetworkInterfaceName) isBACnetConstructedDataNetworkInterfaceName() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataNetworkInterfaceName) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNetworkNumber.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNetworkNumber.go index e2c247ae866..2652bacfc72 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNetworkNumber.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNetworkNumber.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataNetworkNumber is the corresponding interface of BACnetConstructedDataNetworkNumber type BACnetConstructedDataNetworkNumber interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataNetworkNumberExactly interface { // _BACnetConstructedDataNetworkNumber is the data-structure of this message type _BACnetConstructedDataNetworkNumber struct { *_BACnetConstructedData - NetworkNumber BACnetApplicationTagUnsignedInteger + NetworkNumber BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataNetworkNumber) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataNetworkNumber) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataNetworkNumber) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_NETWORK_NUMBER -} +func (m *_BACnetConstructedDataNetworkNumber) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_NETWORK_NUMBER} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataNetworkNumber) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataNetworkNumber) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataNetworkNumber) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataNetworkNumber) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataNetworkNumber) GetActualValue() BACnetApplication /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataNetworkNumber factory function for _BACnetConstructedDataNetworkNumber -func NewBACnetConstructedDataNetworkNumber(networkNumber BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataNetworkNumber { +func NewBACnetConstructedDataNetworkNumber( networkNumber BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataNetworkNumber { _result := &_BACnetConstructedDataNetworkNumber{ - NetworkNumber: networkNumber, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NetworkNumber: networkNumber, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataNetworkNumber(networkNumber BACnetApplicationTagUns // Deprecated: use the interface for direct cast func CastBACnetConstructedDataNetworkNumber(structType interface{}) BACnetConstructedDataNetworkNumber { - if casted, ok := structType.(BACnetConstructedDataNetworkNumber); ok { + if casted, ok := structType.(BACnetConstructedDataNetworkNumber); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataNetworkNumber); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataNetworkNumber) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetConstructedDataNetworkNumber) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataNetworkNumberParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("networkNumber"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for networkNumber") } - _networkNumber, _networkNumberErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_networkNumber, _networkNumberErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _networkNumberErr != nil { return nil, errors.Wrap(_networkNumberErr, "Error parsing 'networkNumber' field of BACnetConstructedDataNetworkNumber") } @@ -186,7 +188,7 @@ func BACnetConstructedDataNetworkNumberParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetConstructedDataNetworkNumber{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NetworkNumber: networkNumber, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataNetworkNumber) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataNetworkNumber") } - // Simple Field (networkNumber) - if pushErr := writeBuffer.PushContext("networkNumber"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for networkNumber") - } - _networkNumberErr := writeBuffer.WriteSerializable(ctx, m.GetNetworkNumber()) - if popErr := writeBuffer.PopContext("networkNumber"); popErr != nil { - return errors.Wrap(popErr, "Error popping for networkNumber") - } - if _networkNumberErr != nil { - return errors.Wrap(_networkNumberErr, "Error serializing 'networkNumber' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (networkNumber) + if pushErr := writeBuffer.PushContext("networkNumber"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for networkNumber") + } + _networkNumberErr := writeBuffer.WriteSerializable(ctx, m.GetNetworkNumber()) + if popErr := writeBuffer.PopContext("networkNumber"); popErr != nil { + return errors.Wrap(popErr, "Error popping for networkNumber") + } + if _networkNumberErr != nil { + return errors.Wrap(_networkNumberErr, "Error serializing 'networkNumber' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataNetworkNumber"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataNetworkNumber") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataNetworkNumber) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataNetworkNumber) isBACnetConstructedDataNetworkNumber() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataNetworkNumber) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNetworkNumberQuality.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNetworkNumberQuality.go index c916801e6d4..eba04b4b876 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNetworkNumberQuality.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNetworkNumberQuality.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataNetworkNumberQuality is the corresponding interface of BACnetConstructedDataNetworkNumberQuality type BACnetConstructedDataNetworkNumberQuality interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataNetworkNumberQualityExactly interface { // _BACnetConstructedDataNetworkNumberQuality is the data-structure of this message type _BACnetConstructedDataNetworkNumberQuality struct { *_BACnetConstructedData - NetworkNumberQuality BACnetNetworkNumberQualityTagged + NetworkNumberQuality BACnetNetworkNumberQualityTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataNetworkNumberQuality) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataNetworkNumberQuality) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataNetworkNumberQuality) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_NETWORK_NUMBER_QUALITY -} +func (m *_BACnetConstructedDataNetworkNumberQuality) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_NETWORK_NUMBER_QUALITY} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataNetworkNumberQuality) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataNetworkNumberQuality) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataNetworkNumberQuality) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataNetworkNumberQuality) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataNetworkNumberQuality) GetActualValue() BACnetNetw /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataNetworkNumberQuality factory function for _BACnetConstructedDataNetworkNumberQuality -func NewBACnetConstructedDataNetworkNumberQuality(networkNumberQuality BACnetNetworkNumberQualityTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataNetworkNumberQuality { +func NewBACnetConstructedDataNetworkNumberQuality( networkNumberQuality BACnetNetworkNumberQualityTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataNetworkNumberQuality { _result := &_BACnetConstructedDataNetworkNumberQuality{ - NetworkNumberQuality: networkNumberQuality, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NetworkNumberQuality: networkNumberQuality, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataNetworkNumberQuality(networkNumberQuality BACnetNet // Deprecated: use the interface for direct cast func CastBACnetConstructedDataNetworkNumberQuality(structType interface{}) BACnetConstructedDataNetworkNumberQuality { - if casted, ok := structType.(BACnetConstructedDataNetworkNumberQuality); ok { + if casted, ok := structType.(BACnetConstructedDataNetworkNumberQuality); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataNetworkNumberQuality); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataNetworkNumberQuality) GetLengthInBits(ctx context return lengthInBits } + func (m *_BACnetConstructedDataNetworkNumberQuality) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataNetworkNumberQualityParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("networkNumberQuality"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for networkNumberQuality") } - _networkNumberQuality, _networkNumberQualityErr := BACnetNetworkNumberQualityTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_networkNumberQuality, _networkNumberQualityErr := BACnetNetworkNumberQualityTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _networkNumberQualityErr != nil { return nil, errors.Wrap(_networkNumberQualityErr, "Error parsing 'networkNumberQuality' field of BACnetConstructedDataNetworkNumberQuality") } @@ -186,7 +188,7 @@ func BACnetConstructedDataNetworkNumberQualityParseWithBuffer(ctx context.Contex // Create a partially initialized instance _child := &_BACnetConstructedDataNetworkNumberQuality{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NetworkNumberQuality: networkNumberQuality, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataNetworkNumberQuality) SerializeWithWriteBuffer(ct return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataNetworkNumberQuality") } - // Simple Field (networkNumberQuality) - if pushErr := writeBuffer.PushContext("networkNumberQuality"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for networkNumberQuality") - } - _networkNumberQualityErr := writeBuffer.WriteSerializable(ctx, m.GetNetworkNumberQuality()) - if popErr := writeBuffer.PopContext("networkNumberQuality"); popErr != nil { - return errors.Wrap(popErr, "Error popping for networkNumberQuality") - } - if _networkNumberQualityErr != nil { - return errors.Wrap(_networkNumberQualityErr, "Error serializing 'networkNumberQuality' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (networkNumberQuality) + if pushErr := writeBuffer.PushContext("networkNumberQuality"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for networkNumberQuality") + } + _networkNumberQualityErr := writeBuffer.WriteSerializable(ctx, m.GetNetworkNumberQuality()) + if popErr := writeBuffer.PopContext("networkNumberQuality"); popErr != nil { + return errors.Wrap(popErr, "Error popping for networkNumberQuality") + } + if _networkNumberQualityErr != nil { + return errors.Wrap(_networkNumberQualityErr, "Error serializing 'networkNumberQuality' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataNetworkNumberQuality"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataNetworkNumberQuality") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataNetworkNumberQuality) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataNetworkNumberQuality) isBACnetConstructedDataNetworkNumberQuality() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataNetworkNumberQuality) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNetworkPortAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNetworkPortAll.go index d4a511bb933..5026dc7f34a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNetworkPortAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNetworkPortAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataNetworkPortAll is the corresponding interface of BACnetConstructedDataNetworkPortAll type BACnetConstructedDataNetworkPortAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataNetworkPortAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataNetworkPortAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_NETWORK_PORT -} +func (m *_BACnetConstructedDataNetworkPortAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_NETWORK_PORT} -func (m *_BACnetConstructedDataNetworkPortAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataNetworkPortAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataNetworkPortAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataNetworkPortAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataNetworkPortAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataNetworkPortAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataNetworkPortAll factory function for _BACnetConstructedDataNetworkPortAll -func NewBACnetConstructedDataNetworkPortAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataNetworkPortAll { +func NewBACnetConstructedDataNetworkPortAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataNetworkPortAll { _result := &_BACnetConstructedDataNetworkPortAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataNetworkPortAll(openingTag BACnetOpeningTag, peekedT // Deprecated: use the interface for direct cast func CastBACnetConstructedDataNetworkPortAll(structType interface{}) BACnetConstructedDataNetworkPortAll { - if casted, ok := structType.(BACnetConstructedDataNetworkPortAll); ok { + if casted, ok := structType.(BACnetConstructedDataNetworkPortAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataNetworkPortAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataNetworkPortAll) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConstructedDataNetworkPortAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataNetworkPortAllParseWithBuffer(ctx context.Context, rea _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataNetworkPortAllParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetConstructedDataNetworkPortAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataNetworkPortAll) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataNetworkPortAll) isBACnetConstructedDataNetworkPortAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataNetworkPortAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNetworkPortMaxInfoFrames.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNetworkPortMaxInfoFrames.go index 0af4d6cbe22..b049c5079e8 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNetworkPortMaxInfoFrames.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNetworkPortMaxInfoFrames.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataNetworkPortMaxInfoFrames is the corresponding interface of BACnetConstructedDataNetworkPortMaxInfoFrames type BACnetConstructedDataNetworkPortMaxInfoFrames interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataNetworkPortMaxInfoFramesExactly interface { // _BACnetConstructedDataNetworkPortMaxInfoFrames is the data-structure of this message type _BACnetConstructedDataNetworkPortMaxInfoFrames struct { *_BACnetConstructedData - MaxInfoFrames BACnetApplicationTagUnsignedInteger + MaxInfoFrames BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataNetworkPortMaxInfoFrames) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_NETWORK_PORT -} +func (m *_BACnetConstructedDataNetworkPortMaxInfoFrames) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_NETWORK_PORT} -func (m *_BACnetConstructedDataNetworkPortMaxInfoFrames) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MAX_INFO_FRAMES -} +func (m *_BACnetConstructedDataNetworkPortMaxInfoFrames) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MAX_INFO_FRAMES} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataNetworkPortMaxInfoFrames) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataNetworkPortMaxInfoFrames) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataNetworkPortMaxInfoFrames) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataNetworkPortMaxInfoFrames) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataNetworkPortMaxInfoFrames) GetActualValue() BACnet /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataNetworkPortMaxInfoFrames factory function for _BACnetConstructedDataNetworkPortMaxInfoFrames -func NewBACnetConstructedDataNetworkPortMaxInfoFrames(maxInfoFrames BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataNetworkPortMaxInfoFrames { +func NewBACnetConstructedDataNetworkPortMaxInfoFrames( maxInfoFrames BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataNetworkPortMaxInfoFrames { _result := &_BACnetConstructedDataNetworkPortMaxInfoFrames{ - MaxInfoFrames: maxInfoFrames, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + MaxInfoFrames: maxInfoFrames, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataNetworkPortMaxInfoFrames(maxInfoFrames BACnetApplic // Deprecated: use the interface for direct cast func CastBACnetConstructedDataNetworkPortMaxInfoFrames(structType interface{}) BACnetConstructedDataNetworkPortMaxInfoFrames { - if casted, ok := structType.(BACnetConstructedDataNetworkPortMaxInfoFrames); ok { + if casted, ok := structType.(BACnetConstructedDataNetworkPortMaxInfoFrames); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataNetworkPortMaxInfoFrames); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataNetworkPortMaxInfoFrames) GetLengthInBits(ctx con return lengthInBits } + func (m *_BACnetConstructedDataNetworkPortMaxInfoFrames) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataNetworkPortMaxInfoFramesParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("maxInfoFrames"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for maxInfoFrames") } - _maxInfoFrames, _maxInfoFramesErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_maxInfoFrames, _maxInfoFramesErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _maxInfoFramesErr != nil { return nil, errors.Wrap(_maxInfoFramesErr, "Error parsing 'maxInfoFrames' field of BACnetConstructedDataNetworkPortMaxInfoFrames") } @@ -186,7 +188,7 @@ func BACnetConstructedDataNetworkPortMaxInfoFramesParseWithBuffer(ctx context.Co // Create a partially initialized instance _child := &_BACnetConstructedDataNetworkPortMaxInfoFrames{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, MaxInfoFrames: maxInfoFrames, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataNetworkPortMaxInfoFrames) SerializeWithWriteBuffe return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataNetworkPortMaxInfoFrames") } - // Simple Field (maxInfoFrames) - if pushErr := writeBuffer.PushContext("maxInfoFrames"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for maxInfoFrames") - } - _maxInfoFramesErr := writeBuffer.WriteSerializable(ctx, m.GetMaxInfoFrames()) - if popErr := writeBuffer.PopContext("maxInfoFrames"); popErr != nil { - return errors.Wrap(popErr, "Error popping for maxInfoFrames") - } - if _maxInfoFramesErr != nil { - return errors.Wrap(_maxInfoFramesErr, "Error serializing 'maxInfoFrames' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (maxInfoFrames) + if pushErr := writeBuffer.PushContext("maxInfoFrames"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for maxInfoFrames") + } + _maxInfoFramesErr := writeBuffer.WriteSerializable(ctx, m.GetMaxInfoFrames()) + if popErr := writeBuffer.PopContext("maxInfoFrames"); popErr != nil { + return errors.Wrap(popErr, "Error popping for maxInfoFrames") + } + if _maxInfoFramesErr != nil { + return errors.Wrap(_maxInfoFramesErr, "Error serializing 'maxInfoFrames' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataNetworkPortMaxInfoFrames"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataNetworkPortMaxInfoFrames") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataNetworkPortMaxInfoFrames) SerializeWithWriteBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataNetworkPortMaxInfoFrames) isBACnetConstructedDataNetworkPortMaxInfoFrames() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataNetworkPortMaxInfoFrames) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNetworkPortMaxMaster.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNetworkPortMaxMaster.go index 59ed7d4345a..9336fa9f3a0 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNetworkPortMaxMaster.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNetworkPortMaxMaster.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataNetworkPortMaxMaster is the corresponding interface of BACnetConstructedDataNetworkPortMaxMaster type BACnetConstructedDataNetworkPortMaxMaster interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataNetworkPortMaxMasterExactly interface { // _BACnetConstructedDataNetworkPortMaxMaster is the data-structure of this message type _BACnetConstructedDataNetworkPortMaxMaster struct { *_BACnetConstructedData - MaxMaster BACnetApplicationTagUnsignedInteger + MaxMaster BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataNetworkPortMaxMaster) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_NETWORK_PORT -} +func (m *_BACnetConstructedDataNetworkPortMaxMaster) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_NETWORK_PORT} -func (m *_BACnetConstructedDataNetworkPortMaxMaster) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MAX_MASTER -} +func (m *_BACnetConstructedDataNetworkPortMaxMaster) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MAX_MASTER} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataNetworkPortMaxMaster) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataNetworkPortMaxMaster) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataNetworkPortMaxMaster) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataNetworkPortMaxMaster) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataNetworkPortMaxMaster) GetActualValue() BACnetAppl /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataNetworkPortMaxMaster factory function for _BACnetConstructedDataNetworkPortMaxMaster -func NewBACnetConstructedDataNetworkPortMaxMaster(maxMaster BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataNetworkPortMaxMaster { +func NewBACnetConstructedDataNetworkPortMaxMaster( maxMaster BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataNetworkPortMaxMaster { _result := &_BACnetConstructedDataNetworkPortMaxMaster{ - MaxMaster: maxMaster, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + MaxMaster: maxMaster, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataNetworkPortMaxMaster(maxMaster BACnetApplicationTag // Deprecated: use the interface for direct cast func CastBACnetConstructedDataNetworkPortMaxMaster(structType interface{}) BACnetConstructedDataNetworkPortMaxMaster { - if casted, ok := structType.(BACnetConstructedDataNetworkPortMaxMaster); ok { + if casted, ok := structType.(BACnetConstructedDataNetworkPortMaxMaster); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataNetworkPortMaxMaster); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataNetworkPortMaxMaster) GetLengthInBits(ctx context return lengthInBits } + func (m *_BACnetConstructedDataNetworkPortMaxMaster) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataNetworkPortMaxMasterParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("maxMaster"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for maxMaster") } - _maxMaster, _maxMasterErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_maxMaster, _maxMasterErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _maxMasterErr != nil { return nil, errors.Wrap(_maxMasterErr, "Error parsing 'maxMaster' field of BACnetConstructedDataNetworkPortMaxMaster") } @@ -186,7 +188,7 @@ func BACnetConstructedDataNetworkPortMaxMasterParseWithBuffer(ctx context.Contex // Create a partially initialized instance _child := &_BACnetConstructedDataNetworkPortMaxMaster{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, MaxMaster: maxMaster, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataNetworkPortMaxMaster) SerializeWithWriteBuffer(ct return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataNetworkPortMaxMaster") } - // Simple Field (maxMaster) - if pushErr := writeBuffer.PushContext("maxMaster"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for maxMaster") - } - _maxMasterErr := writeBuffer.WriteSerializable(ctx, m.GetMaxMaster()) - if popErr := writeBuffer.PopContext("maxMaster"); popErr != nil { - return errors.Wrap(popErr, "Error popping for maxMaster") - } - if _maxMasterErr != nil { - return errors.Wrap(_maxMasterErr, "Error serializing 'maxMaster' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (maxMaster) + if pushErr := writeBuffer.PushContext("maxMaster"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for maxMaster") + } + _maxMasterErr := writeBuffer.WriteSerializable(ctx, m.GetMaxMaster()) + if popErr := writeBuffer.PopContext("maxMaster"); popErr != nil { + return errors.Wrap(popErr, "Error popping for maxMaster") + } + if _maxMasterErr != nil { + return errors.Wrap(_maxMasterErr, "Error serializing 'maxMaster' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataNetworkPortMaxMaster"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataNetworkPortMaxMaster") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataNetworkPortMaxMaster) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataNetworkPortMaxMaster) isBACnetConstructedDataNetworkPortMaxMaster() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataNetworkPortMaxMaster) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNetworkSecurityAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNetworkSecurityAll.go index 7d947bd6f09..cf2818c5e2d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNetworkSecurityAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNetworkSecurityAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataNetworkSecurityAll is the corresponding interface of BACnetConstructedDataNetworkSecurityAll type BACnetConstructedDataNetworkSecurityAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataNetworkSecurityAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataNetworkSecurityAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_NETWORK_SECURITY -} +func (m *_BACnetConstructedDataNetworkSecurityAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_NETWORK_SECURITY} -func (m *_BACnetConstructedDataNetworkSecurityAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataNetworkSecurityAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataNetworkSecurityAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataNetworkSecurityAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataNetworkSecurityAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataNetworkSecurityAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataNetworkSecurityAll factory function for _BACnetConstructedDataNetworkSecurityAll -func NewBACnetConstructedDataNetworkSecurityAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataNetworkSecurityAll { +func NewBACnetConstructedDataNetworkSecurityAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataNetworkSecurityAll { _result := &_BACnetConstructedDataNetworkSecurityAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataNetworkSecurityAll(openingTag BACnetOpeningTag, pee // Deprecated: use the interface for direct cast func CastBACnetConstructedDataNetworkSecurityAll(structType interface{}) BACnetConstructedDataNetworkSecurityAll { - if casted, ok := structType.(BACnetConstructedDataNetworkSecurityAll); ok { + if casted, ok := structType.(BACnetConstructedDataNetworkSecurityAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataNetworkSecurityAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataNetworkSecurityAll) GetLengthInBits(ctx context.C return lengthInBits } + func (m *_BACnetConstructedDataNetworkSecurityAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataNetworkSecurityAllParseWithBuffer(ctx context.Context, _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataNetworkSecurityAllParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataNetworkSecurityAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataNetworkSecurityAll) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataNetworkSecurityAll) isBACnetConstructedDataNetworkSecurityAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataNetworkSecurityAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNetworkType.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNetworkType.go index bf9f139c27f..1f6b9e1c69e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNetworkType.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNetworkType.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataNetworkType is the corresponding interface of BACnetConstructedDataNetworkType type BACnetConstructedDataNetworkType interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataNetworkTypeExactly interface { // _BACnetConstructedDataNetworkType is the data-structure of this message type _BACnetConstructedDataNetworkType struct { *_BACnetConstructedData - NetworkType BACnetNetworkTypeTagged + NetworkType BACnetNetworkTypeTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataNetworkType) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataNetworkType) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataNetworkType) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_NETWORK_TYPE -} +func (m *_BACnetConstructedDataNetworkType) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_NETWORK_TYPE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataNetworkType) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataNetworkType) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataNetworkType) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataNetworkType) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataNetworkType) GetActualValue() BACnetNetworkTypeTa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataNetworkType factory function for _BACnetConstructedDataNetworkType -func NewBACnetConstructedDataNetworkType(networkType BACnetNetworkTypeTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataNetworkType { +func NewBACnetConstructedDataNetworkType( networkType BACnetNetworkTypeTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataNetworkType { _result := &_BACnetConstructedDataNetworkType{ - NetworkType: networkType, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NetworkType: networkType, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataNetworkType(networkType BACnetNetworkTypeTagged, op // Deprecated: use the interface for direct cast func CastBACnetConstructedDataNetworkType(structType interface{}) BACnetConstructedDataNetworkType { - if casted, ok := structType.(BACnetConstructedDataNetworkType); ok { + if casted, ok := structType.(BACnetConstructedDataNetworkType); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataNetworkType); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataNetworkType) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataNetworkType) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataNetworkTypeParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("networkType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for networkType") } - _networkType, _networkTypeErr := BACnetNetworkTypeTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_networkType, _networkTypeErr := BACnetNetworkTypeTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _networkTypeErr != nil { return nil, errors.Wrap(_networkTypeErr, "Error parsing 'networkType' field of BACnetConstructedDataNetworkType") } @@ -186,7 +188,7 @@ func BACnetConstructedDataNetworkTypeParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataNetworkType{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NetworkType: networkType, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataNetworkType) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataNetworkType") } - // Simple Field (networkType) - if pushErr := writeBuffer.PushContext("networkType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for networkType") - } - _networkTypeErr := writeBuffer.WriteSerializable(ctx, m.GetNetworkType()) - if popErr := writeBuffer.PopContext("networkType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for networkType") - } - if _networkTypeErr != nil { - return errors.Wrap(_networkTypeErr, "Error serializing 'networkType' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (networkType) + if pushErr := writeBuffer.PushContext("networkType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for networkType") + } + _networkTypeErr := writeBuffer.WriteSerializable(ctx, m.GetNetworkType()) + if popErr := writeBuffer.PopContext("networkType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for networkType") + } + if _networkTypeErr != nil { + return errors.Wrap(_networkTypeErr, "Error serializing 'networkType' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataNetworkType"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataNetworkType") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataNetworkType) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataNetworkType) isBACnetConstructedDataNetworkType() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataNetworkType) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNextStoppingFloor.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNextStoppingFloor.go index e6baecf8cbd..a3192aea346 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNextStoppingFloor.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNextStoppingFloor.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataNextStoppingFloor is the corresponding interface of BACnetConstructedDataNextStoppingFloor type BACnetConstructedDataNextStoppingFloor interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataNextStoppingFloorExactly interface { // _BACnetConstructedDataNextStoppingFloor is the data-structure of this message type _BACnetConstructedDataNextStoppingFloor struct { *_BACnetConstructedData - NextStoppingFloor BACnetApplicationTagUnsignedInteger + NextStoppingFloor BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataNextStoppingFloor) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataNextStoppingFloor) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataNextStoppingFloor) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_NEXT_STOPPING_FLOOR -} +func (m *_BACnetConstructedDataNextStoppingFloor) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_NEXT_STOPPING_FLOOR} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataNextStoppingFloor) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataNextStoppingFloor) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataNextStoppingFloor) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataNextStoppingFloor) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataNextStoppingFloor) GetActualValue() BACnetApplica /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataNextStoppingFloor factory function for _BACnetConstructedDataNextStoppingFloor -func NewBACnetConstructedDataNextStoppingFloor(nextStoppingFloor BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataNextStoppingFloor { +func NewBACnetConstructedDataNextStoppingFloor( nextStoppingFloor BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataNextStoppingFloor { _result := &_BACnetConstructedDataNextStoppingFloor{ - NextStoppingFloor: nextStoppingFloor, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NextStoppingFloor: nextStoppingFloor, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataNextStoppingFloor(nextStoppingFloor BACnetApplicati // Deprecated: use the interface for direct cast func CastBACnetConstructedDataNextStoppingFloor(structType interface{}) BACnetConstructedDataNextStoppingFloor { - if casted, ok := structType.(BACnetConstructedDataNextStoppingFloor); ok { + if casted, ok := structType.(BACnetConstructedDataNextStoppingFloor); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataNextStoppingFloor); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataNextStoppingFloor) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetConstructedDataNextStoppingFloor) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataNextStoppingFloorParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("nextStoppingFloor"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for nextStoppingFloor") } - _nextStoppingFloor, _nextStoppingFloorErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_nextStoppingFloor, _nextStoppingFloorErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _nextStoppingFloorErr != nil { return nil, errors.Wrap(_nextStoppingFloorErr, "Error parsing 'nextStoppingFloor' field of BACnetConstructedDataNextStoppingFloor") } @@ -186,7 +188,7 @@ func BACnetConstructedDataNextStoppingFloorParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataNextStoppingFloor{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NextStoppingFloor: nextStoppingFloor, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataNextStoppingFloor) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataNextStoppingFloor") } - // Simple Field (nextStoppingFloor) - if pushErr := writeBuffer.PushContext("nextStoppingFloor"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for nextStoppingFloor") - } - _nextStoppingFloorErr := writeBuffer.WriteSerializable(ctx, m.GetNextStoppingFloor()) - if popErr := writeBuffer.PopContext("nextStoppingFloor"); popErr != nil { - return errors.Wrap(popErr, "Error popping for nextStoppingFloor") - } - if _nextStoppingFloorErr != nil { - return errors.Wrap(_nextStoppingFloorErr, "Error serializing 'nextStoppingFloor' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (nextStoppingFloor) + if pushErr := writeBuffer.PushContext("nextStoppingFloor"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for nextStoppingFloor") + } + _nextStoppingFloorErr := writeBuffer.WriteSerializable(ctx, m.GetNextStoppingFloor()) + if popErr := writeBuffer.PopContext("nextStoppingFloor"); popErr != nil { + return errors.Wrap(popErr, "Error popping for nextStoppingFloor") + } + if _nextStoppingFloorErr != nil { + return errors.Wrap(_nextStoppingFloorErr, "Error serializing 'nextStoppingFloor' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataNextStoppingFloor"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataNextStoppingFloor") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataNextStoppingFloor) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataNextStoppingFloor) isBACnetConstructedDataNextStoppingFloor() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataNextStoppingFloor) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNodeSubtype.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNodeSubtype.go index 573ca8f2c55..9e953ffcefc 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNodeSubtype.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNodeSubtype.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataNodeSubtype is the corresponding interface of BACnetConstructedDataNodeSubtype type BACnetConstructedDataNodeSubtype interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataNodeSubtypeExactly interface { // _BACnetConstructedDataNodeSubtype is the data-structure of this message type _BACnetConstructedDataNodeSubtype struct { *_BACnetConstructedData - NodeSubType BACnetApplicationTagCharacterString + NodeSubType BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataNodeSubtype) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataNodeSubtype) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataNodeSubtype) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_NODE_SUBTYPE -} +func (m *_BACnetConstructedDataNodeSubtype) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_NODE_SUBTYPE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataNodeSubtype) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataNodeSubtype) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataNodeSubtype) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataNodeSubtype) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataNodeSubtype) GetActualValue() BACnetApplicationTa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataNodeSubtype factory function for _BACnetConstructedDataNodeSubtype -func NewBACnetConstructedDataNodeSubtype(nodeSubType BACnetApplicationTagCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataNodeSubtype { +func NewBACnetConstructedDataNodeSubtype( nodeSubType BACnetApplicationTagCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataNodeSubtype { _result := &_BACnetConstructedDataNodeSubtype{ - NodeSubType: nodeSubType, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NodeSubType: nodeSubType, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataNodeSubtype(nodeSubType BACnetApplicationTagCharact // Deprecated: use the interface for direct cast func CastBACnetConstructedDataNodeSubtype(structType interface{}) BACnetConstructedDataNodeSubtype { - if casted, ok := structType.(BACnetConstructedDataNodeSubtype); ok { + if casted, ok := structType.(BACnetConstructedDataNodeSubtype); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataNodeSubtype); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataNodeSubtype) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataNodeSubtype) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataNodeSubtypeParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("nodeSubType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for nodeSubType") } - _nodeSubType, _nodeSubTypeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_nodeSubType, _nodeSubTypeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _nodeSubTypeErr != nil { return nil, errors.Wrap(_nodeSubTypeErr, "Error parsing 'nodeSubType' field of BACnetConstructedDataNodeSubtype") } @@ -186,7 +188,7 @@ func BACnetConstructedDataNodeSubtypeParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataNodeSubtype{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NodeSubType: nodeSubType, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataNodeSubtype) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataNodeSubtype") } - // Simple Field (nodeSubType) - if pushErr := writeBuffer.PushContext("nodeSubType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for nodeSubType") - } - _nodeSubTypeErr := writeBuffer.WriteSerializable(ctx, m.GetNodeSubType()) - if popErr := writeBuffer.PopContext("nodeSubType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for nodeSubType") - } - if _nodeSubTypeErr != nil { - return errors.Wrap(_nodeSubTypeErr, "Error serializing 'nodeSubType' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (nodeSubType) + if pushErr := writeBuffer.PushContext("nodeSubType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for nodeSubType") + } + _nodeSubTypeErr := writeBuffer.WriteSerializable(ctx, m.GetNodeSubType()) + if popErr := writeBuffer.PopContext("nodeSubType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for nodeSubType") + } + if _nodeSubTypeErr != nil { + return errors.Wrap(_nodeSubTypeErr, "Error serializing 'nodeSubType' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataNodeSubtype"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataNodeSubtype") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataNodeSubtype) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataNodeSubtype) isBACnetConstructedDataNodeSubtype() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataNodeSubtype) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNodeType.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNodeType.go index 8b2ee34b411..b997f4b767c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNodeType.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNodeType.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataNodeType is the corresponding interface of BACnetConstructedDataNodeType type BACnetConstructedDataNodeType interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataNodeTypeExactly interface { // _BACnetConstructedDataNodeType is the data-structure of this message type _BACnetConstructedDataNodeType struct { *_BACnetConstructedData - NodeType BACnetNodeTypeTagged + NodeType BACnetNodeTypeTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataNodeType) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataNodeType) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataNodeType) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_NODE_TYPE -} +func (m *_BACnetConstructedDataNodeType) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_NODE_TYPE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataNodeType) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataNodeType) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataNodeType) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataNodeType) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataNodeType) GetActualValue() BACnetNodeTypeTagged { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataNodeType factory function for _BACnetConstructedDataNodeType -func NewBACnetConstructedDataNodeType(nodeType BACnetNodeTypeTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataNodeType { +func NewBACnetConstructedDataNodeType( nodeType BACnetNodeTypeTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataNodeType { _result := &_BACnetConstructedDataNodeType{ - NodeType: nodeType, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NodeType: nodeType, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataNodeType(nodeType BACnetNodeTypeTagged, openingTag // Deprecated: use the interface for direct cast func CastBACnetConstructedDataNodeType(structType interface{}) BACnetConstructedDataNodeType { - if casted, ok := structType.(BACnetConstructedDataNodeType); ok { + if casted, ok := structType.(BACnetConstructedDataNodeType); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataNodeType); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataNodeType) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetConstructedDataNodeType) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataNodeTypeParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("nodeType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for nodeType") } - _nodeType, _nodeTypeErr := BACnetNodeTypeTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_nodeType, _nodeTypeErr := BACnetNodeTypeTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _nodeTypeErr != nil { return nil, errors.Wrap(_nodeTypeErr, "Error parsing 'nodeType' field of BACnetConstructedDataNodeType") } @@ -186,7 +188,7 @@ func BACnetConstructedDataNodeTypeParseWithBuffer(ctx context.Context, readBuffe // Create a partially initialized instance _child := &_BACnetConstructedDataNodeType{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NodeType: nodeType, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataNodeType) SerializeWithWriteBuffer(ctx context.Co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataNodeType") } - // Simple Field (nodeType) - if pushErr := writeBuffer.PushContext("nodeType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for nodeType") - } - _nodeTypeErr := writeBuffer.WriteSerializable(ctx, m.GetNodeType()) - if popErr := writeBuffer.PopContext("nodeType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for nodeType") - } - if _nodeTypeErr != nil { - return errors.Wrap(_nodeTypeErr, "Error serializing 'nodeType' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (nodeType) + if pushErr := writeBuffer.PushContext("nodeType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for nodeType") + } + _nodeTypeErr := writeBuffer.WriteSerializable(ctx, m.GetNodeType()) + if popErr := writeBuffer.PopContext("nodeType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for nodeType") + } + if _nodeTypeErr != nil { + return errors.Wrap(_nodeTypeErr, "Error serializing 'nodeType' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataNodeType"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataNodeType") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataNodeType) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataNodeType) isBACnetConstructedDataNodeType() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataNodeType) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNotificationClass.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNotificationClass.go index 61bf734fc00..3d977d431c5 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNotificationClass.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNotificationClass.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataNotificationClass is the corresponding interface of BACnetConstructedDataNotificationClass type BACnetConstructedDataNotificationClass interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataNotificationClassExactly interface { // _BACnetConstructedDataNotificationClass is the data-structure of this message type _BACnetConstructedDataNotificationClass struct { *_BACnetConstructedData - NotificationClass BACnetApplicationTagUnsignedInteger + NotificationClass BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataNotificationClass) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataNotificationClass) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataNotificationClass) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_NOTIFICATION_CLASS -} +func (m *_BACnetConstructedDataNotificationClass) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_NOTIFICATION_CLASS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataNotificationClass) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataNotificationClass) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataNotificationClass) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataNotificationClass) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataNotificationClass) GetActualValue() BACnetApplica /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataNotificationClass factory function for _BACnetConstructedDataNotificationClass -func NewBACnetConstructedDataNotificationClass(notificationClass BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataNotificationClass { +func NewBACnetConstructedDataNotificationClass( notificationClass BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataNotificationClass { _result := &_BACnetConstructedDataNotificationClass{ - NotificationClass: notificationClass, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NotificationClass: notificationClass, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataNotificationClass(notificationClass BACnetApplicati // Deprecated: use the interface for direct cast func CastBACnetConstructedDataNotificationClass(structType interface{}) BACnetConstructedDataNotificationClass { - if casted, ok := structType.(BACnetConstructedDataNotificationClass); ok { + if casted, ok := structType.(BACnetConstructedDataNotificationClass); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataNotificationClass); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataNotificationClass) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetConstructedDataNotificationClass) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataNotificationClassParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("notificationClass"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for notificationClass") } - _notificationClass, _notificationClassErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_notificationClass, _notificationClassErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _notificationClassErr != nil { return nil, errors.Wrap(_notificationClassErr, "Error parsing 'notificationClass' field of BACnetConstructedDataNotificationClass") } @@ -186,7 +188,7 @@ func BACnetConstructedDataNotificationClassParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataNotificationClass{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NotificationClass: notificationClass, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataNotificationClass) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataNotificationClass") } - // Simple Field (notificationClass) - if pushErr := writeBuffer.PushContext("notificationClass"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for notificationClass") - } - _notificationClassErr := writeBuffer.WriteSerializable(ctx, m.GetNotificationClass()) - if popErr := writeBuffer.PopContext("notificationClass"); popErr != nil { - return errors.Wrap(popErr, "Error popping for notificationClass") - } - if _notificationClassErr != nil { - return errors.Wrap(_notificationClassErr, "Error serializing 'notificationClass' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (notificationClass) + if pushErr := writeBuffer.PushContext("notificationClass"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for notificationClass") + } + _notificationClassErr := writeBuffer.WriteSerializable(ctx, m.GetNotificationClass()) + if popErr := writeBuffer.PopContext("notificationClass"); popErr != nil { + return errors.Wrap(popErr, "Error popping for notificationClass") + } + if _notificationClassErr != nil { + return errors.Wrap(_notificationClassErr, "Error serializing 'notificationClass' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataNotificationClass"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataNotificationClass") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataNotificationClass) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataNotificationClass) isBACnetConstructedDataNotificationClass() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataNotificationClass) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNotificationClassAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNotificationClassAll.go index bdc212d86be..24aa1229260 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNotificationClassAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNotificationClassAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataNotificationClassAll is the corresponding interface of BACnetConstructedDataNotificationClassAll type BACnetConstructedDataNotificationClassAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataNotificationClassAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataNotificationClassAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_NOTIFICATION_CLASS -} +func (m *_BACnetConstructedDataNotificationClassAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_NOTIFICATION_CLASS} -func (m *_BACnetConstructedDataNotificationClassAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataNotificationClassAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataNotificationClassAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataNotificationClassAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataNotificationClassAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataNotificationClassAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataNotificationClassAll factory function for _BACnetConstructedDataNotificationClassAll -func NewBACnetConstructedDataNotificationClassAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataNotificationClassAll { +func NewBACnetConstructedDataNotificationClassAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataNotificationClassAll { _result := &_BACnetConstructedDataNotificationClassAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataNotificationClassAll(openingTag BACnetOpeningTag, p // Deprecated: use the interface for direct cast func CastBACnetConstructedDataNotificationClassAll(structType interface{}) BACnetConstructedDataNotificationClassAll { - if casted, ok := structType.(BACnetConstructedDataNotificationClassAll); ok { + if casted, ok := structType.(BACnetConstructedDataNotificationClassAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataNotificationClassAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataNotificationClassAll) GetLengthInBits(ctx context return lengthInBits } + func (m *_BACnetConstructedDataNotificationClassAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataNotificationClassAllParseWithBuffer(ctx context.Contex _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataNotificationClassAllParseWithBuffer(ctx context.Contex // Create a partially initialized instance _child := &_BACnetConstructedDataNotificationClassAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataNotificationClassAll) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataNotificationClassAll) isBACnetConstructedDataNotificationClassAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataNotificationClassAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNotificationForwarderAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNotificationForwarderAll.go index f0a2cceba3f..a615da9d306 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNotificationForwarderAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNotificationForwarderAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataNotificationForwarderAll is the corresponding interface of BACnetConstructedDataNotificationForwarderAll type BACnetConstructedDataNotificationForwarderAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataNotificationForwarderAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataNotificationForwarderAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_NOTIFICATION_FORWARDER -} +func (m *_BACnetConstructedDataNotificationForwarderAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_NOTIFICATION_FORWARDER} -func (m *_BACnetConstructedDataNotificationForwarderAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataNotificationForwarderAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataNotificationForwarderAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataNotificationForwarderAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataNotificationForwarderAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataNotificationForwarderAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataNotificationForwarderAll factory function for _BACnetConstructedDataNotificationForwarderAll -func NewBACnetConstructedDataNotificationForwarderAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataNotificationForwarderAll { +func NewBACnetConstructedDataNotificationForwarderAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataNotificationForwarderAll { _result := &_BACnetConstructedDataNotificationForwarderAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataNotificationForwarderAll(openingTag BACnetOpeningTa // Deprecated: use the interface for direct cast func CastBACnetConstructedDataNotificationForwarderAll(structType interface{}) BACnetConstructedDataNotificationForwarderAll { - if casted, ok := structType.(BACnetConstructedDataNotificationForwarderAll); ok { + if casted, ok := structType.(BACnetConstructedDataNotificationForwarderAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataNotificationForwarderAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataNotificationForwarderAll) GetLengthInBits(ctx con return lengthInBits } + func (m *_BACnetConstructedDataNotificationForwarderAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataNotificationForwarderAllParseWithBuffer(ctx context.Co _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataNotificationForwarderAllParseWithBuffer(ctx context.Co // Create a partially initialized instance _child := &_BACnetConstructedDataNotificationForwarderAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataNotificationForwarderAll) SerializeWithWriteBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataNotificationForwarderAll) isBACnetConstructedDataNotificationForwarderAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataNotificationForwarderAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNotificationThreshold.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNotificationThreshold.go index 218f958f072..ce050e7f088 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNotificationThreshold.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNotificationThreshold.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataNotificationThreshold is the corresponding interface of BACnetConstructedDataNotificationThreshold type BACnetConstructedDataNotificationThreshold interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataNotificationThresholdExactly interface { // _BACnetConstructedDataNotificationThreshold is the data-structure of this message type _BACnetConstructedDataNotificationThreshold struct { *_BACnetConstructedData - NotificationThreshold BACnetApplicationTagUnsignedInteger + NotificationThreshold BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataNotificationThreshold) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataNotificationThreshold) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataNotificationThreshold) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_NOTIFICATION_THRESHOLD -} +func (m *_BACnetConstructedDataNotificationThreshold) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_NOTIFICATION_THRESHOLD} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataNotificationThreshold) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataNotificationThreshold) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataNotificationThreshold) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataNotificationThreshold) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataNotificationThreshold) GetActualValue() BACnetApp /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataNotificationThreshold factory function for _BACnetConstructedDataNotificationThreshold -func NewBACnetConstructedDataNotificationThreshold(notificationThreshold BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataNotificationThreshold { +func NewBACnetConstructedDataNotificationThreshold( notificationThreshold BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataNotificationThreshold { _result := &_BACnetConstructedDataNotificationThreshold{ - NotificationThreshold: notificationThreshold, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NotificationThreshold: notificationThreshold, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataNotificationThreshold(notificationThreshold BACnetA // Deprecated: use the interface for direct cast func CastBACnetConstructedDataNotificationThreshold(structType interface{}) BACnetConstructedDataNotificationThreshold { - if casted, ok := structType.(BACnetConstructedDataNotificationThreshold); ok { + if casted, ok := structType.(BACnetConstructedDataNotificationThreshold); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataNotificationThreshold); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataNotificationThreshold) GetLengthInBits(ctx contex return lengthInBits } + func (m *_BACnetConstructedDataNotificationThreshold) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataNotificationThresholdParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("notificationThreshold"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for notificationThreshold") } - _notificationThreshold, _notificationThresholdErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_notificationThreshold, _notificationThresholdErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _notificationThresholdErr != nil { return nil, errors.Wrap(_notificationThresholdErr, "Error parsing 'notificationThreshold' field of BACnetConstructedDataNotificationThreshold") } @@ -186,7 +188,7 @@ func BACnetConstructedDataNotificationThresholdParseWithBuffer(ctx context.Conte // Create a partially initialized instance _child := &_BACnetConstructedDataNotificationThreshold{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NotificationThreshold: notificationThreshold, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataNotificationThreshold) SerializeWithWriteBuffer(c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataNotificationThreshold") } - // Simple Field (notificationThreshold) - if pushErr := writeBuffer.PushContext("notificationThreshold"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for notificationThreshold") - } - _notificationThresholdErr := writeBuffer.WriteSerializable(ctx, m.GetNotificationThreshold()) - if popErr := writeBuffer.PopContext("notificationThreshold"); popErr != nil { - return errors.Wrap(popErr, "Error popping for notificationThreshold") - } - if _notificationThresholdErr != nil { - return errors.Wrap(_notificationThresholdErr, "Error serializing 'notificationThreshold' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (notificationThreshold) + if pushErr := writeBuffer.PushContext("notificationThreshold"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for notificationThreshold") + } + _notificationThresholdErr := writeBuffer.WriteSerializable(ctx, m.GetNotificationThreshold()) + if popErr := writeBuffer.PopContext("notificationThreshold"); popErr != nil { + return errors.Wrap(popErr, "Error popping for notificationThreshold") + } + if _notificationThresholdErr != nil { + return errors.Wrap(_notificationThresholdErr, "Error serializing 'notificationThreshold' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataNotificationThreshold"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataNotificationThreshold") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataNotificationThreshold) SerializeWithWriteBuffer(c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataNotificationThreshold) isBACnetConstructedDataNotificationThreshold() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataNotificationThreshold) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNotifyType.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNotifyType.go index 576692f41b7..f2a74a9b406 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNotifyType.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNotifyType.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataNotifyType is the corresponding interface of BACnetConstructedDataNotifyType type BACnetConstructedDataNotifyType interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataNotifyTypeExactly interface { // _BACnetConstructedDataNotifyType is the data-structure of this message type _BACnetConstructedDataNotifyType struct { *_BACnetConstructedData - NotifyType BACnetNotifyTypeTagged + NotifyType BACnetNotifyTypeTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataNotifyType) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataNotifyType) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataNotifyType) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_NOTIFY_TYPE -} +func (m *_BACnetConstructedDataNotifyType) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_NOTIFY_TYPE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataNotifyType) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataNotifyType) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataNotifyType) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataNotifyType) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataNotifyType) GetActualValue() BACnetNotifyTypeTagg /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataNotifyType factory function for _BACnetConstructedDataNotifyType -func NewBACnetConstructedDataNotifyType(notifyType BACnetNotifyTypeTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataNotifyType { +func NewBACnetConstructedDataNotifyType( notifyType BACnetNotifyTypeTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataNotifyType { _result := &_BACnetConstructedDataNotifyType{ - NotifyType: notifyType, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NotifyType: notifyType, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataNotifyType(notifyType BACnetNotifyTypeTagged, openi // Deprecated: use the interface for direct cast func CastBACnetConstructedDataNotifyType(structType interface{}) BACnetConstructedDataNotifyType { - if casted, ok := structType.(BACnetConstructedDataNotifyType); ok { + if casted, ok := structType.(BACnetConstructedDataNotifyType); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataNotifyType); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataNotifyType) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataNotifyType) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataNotifyTypeParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("notifyType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for notifyType") } - _notifyType, _notifyTypeErr := BACnetNotifyTypeTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_notifyType, _notifyTypeErr := BACnetNotifyTypeTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _notifyTypeErr != nil { return nil, errors.Wrap(_notifyTypeErr, "Error parsing 'notifyType' field of BACnetConstructedDataNotifyType") } @@ -186,7 +188,7 @@ func BACnetConstructedDataNotifyTypeParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetConstructedDataNotifyType{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NotifyType: notifyType, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataNotifyType) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataNotifyType") } - // Simple Field (notifyType) - if pushErr := writeBuffer.PushContext("notifyType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for notifyType") - } - _notifyTypeErr := writeBuffer.WriteSerializable(ctx, m.GetNotifyType()) - if popErr := writeBuffer.PopContext("notifyType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for notifyType") - } - if _notifyTypeErr != nil { - return errors.Wrap(_notifyTypeErr, "Error serializing 'notifyType' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (notifyType) + if pushErr := writeBuffer.PushContext("notifyType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for notifyType") + } + _notifyTypeErr := writeBuffer.WriteSerializable(ctx, m.GetNotifyType()) + if popErr := writeBuffer.PopContext("notifyType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for notifyType") + } + if _notifyTypeErr != nil { + return errors.Wrap(_notifyTypeErr, "Error serializing 'notifyType' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataNotifyType"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataNotifyType") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataNotifyType) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataNotifyType) isBACnetConstructedDataNotifyType() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataNotifyType) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNumberOfAPDURetries.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNumberOfAPDURetries.go index abb29496d9f..22d8c6b7b7d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNumberOfAPDURetries.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNumberOfAPDURetries.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataNumberOfAPDURetries is the corresponding interface of BACnetConstructedDataNumberOfAPDURetries type BACnetConstructedDataNumberOfAPDURetries interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataNumberOfAPDURetriesExactly interface { // _BACnetConstructedDataNumberOfAPDURetries is the data-structure of this message type _BACnetConstructedDataNumberOfAPDURetries struct { *_BACnetConstructedData - NumberOfApduRetries BACnetApplicationTagUnsignedInteger + NumberOfApduRetries BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataNumberOfAPDURetries) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataNumberOfAPDURetries) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataNumberOfAPDURetries) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_NUMBER_OF_APDU_RETRIES -} +func (m *_BACnetConstructedDataNumberOfAPDURetries) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_NUMBER_OF_APDU_RETRIES} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataNumberOfAPDURetries) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataNumberOfAPDURetries) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataNumberOfAPDURetries) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataNumberOfAPDURetries) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataNumberOfAPDURetries) GetActualValue() BACnetAppli /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataNumberOfAPDURetries factory function for _BACnetConstructedDataNumberOfAPDURetries -func NewBACnetConstructedDataNumberOfAPDURetries(numberOfApduRetries BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataNumberOfAPDURetries { +func NewBACnetConstructedDataNumberOfAPDURetries( numberOfApduRetries BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataNumberOfAPDURetries { _result := &_BACnetConstructedDataNumberOfAPDURetries{ - NumberOfApduRetries: numberOfApduRetries, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfApduRetries: numberOfApduRetries, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataNumberOfAPDURetries(numberOfApduRetries BACnetAppli // Deprecated: use the interface for direct cast func CastBACnetConstructedDataNumberOfAPDURetries(structType interface{}) BACnetConstructedDataNumberOfAPDURetries { - if casted, ok := structType.(BACnetConstructedDataNumberOfAPDURetries); ok { + if casted, ok := structType.(BACnetConstructedDataNumberOfAPDURetries); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataNumberOfAPDURetries); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataNumberOfAPDURetries) GetLengthInBits(ctx context. return lengthInBits } + func (m *_BACnetConstructedDataNumberOfAPDURetries) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataNumberOfAPDURetriesParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("numberOfApduRetries"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfApduRetries") } - _numberOfApduRetries, _numberOfApduRetriesErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_numberOfApduRetries, _numberOfApduRetriesErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _numberOfApduRetriesErr != nil { return nil, errors.Wrap(_numberOfApduRetriesErr, "Error parsing 'numberOfApduRetries' field of BACnetConstructedDataNumberOfAPDURetries") } @@ -186,7 +188,7 @@ func BACnetConstructedDataNumberOfAPDURetriesParseWithBuffer(ctx context.Context // Create a partially initialized instance _child := &_BACnetConstructedDataNumberOfAPDURetries{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfApduRetries: numberOfApduRetries, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataNumberOfAPDURetries) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataNumberOfAPDURetries") } - // Simple Field (numberOfApduRetries) - if pushErr := writeBuffer.PushContext("numberOfApduRetries"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfApduRetries") - } - _numberOfApduRetriesErr := writeBuffer.WriteSerializable(ctx, m.GetNumberOfApduRetries()) - if popErr := writeBuffer.PopContext("numberOfApduRetries"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfApduRetries") - } - if _numberOfApduRetriesErr != nil { - return errors.Wrap(_numberOfApduRetriesErr, "Error serializing 'numberOfApduRetries' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (numberOfApduRetries) + if pushErr := writeBuffer.PushContext("numberOfApduRetries"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfApduRetries") + } + _numberOfApduRetriesErr := writeBuffer.WriteSerializable(ctx, m.GetNumberOfApduRetries()) + if popErr := writeBuffer.PopContext("numberOfApduRetries"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfApduRetries") + } + if _numberOfApduRetriesErr != nil { + return errors.Wrap(_numberOfApduRetriesErr, "Error serializing 'numberOfApduRetries' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataNumberOfAPDURetries"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataNumberOfAPDURetries") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataNumberOfAPDURetries) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataNumberOfAPDURetries) isBACnetConstructedDataNumberOfAPDURetries() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataNumberOfAPDURetries) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNumberOfAuthenticationPolicies.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNumberOfAuthenticationPolicies.go index efb1ae50005..8eac6c15ad9 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNumberOfAuthenticationPolicies.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNumberOfAuthenticationPolicies.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataNumberOfAuthenticationPolicies is the corresponding interface of BACnetConstructedDataNumberOfAuthenticationPolicies type BACnetConstructedDataNumberOfAuthenticationPolicies interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataNumberOfAuthenticationPoliciesExactly interface { // _BACnetConstructedDataNumberOfAuthenticationPolicies is the data-structure of this message type _BACnetConstructedDataNumberOfAuthenticationPolicies struct { *_BACnetConstructedData - NumberOfAuthenticationPolicies BACnetApplicationTagUnsignedInteger + NumberOfAuthenticationPolicies BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataNumberOfAuthenticationPolicies) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataNumberOfAuthenticationPolicies) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataNumberOfAuthenticationPolicies) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_NUMBER_OF_AUTHENTICATION_POLICIES -} +func (m *_BACnetConstructedDataNumberOfAuthenticationPolicies) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_NUMBER_OF_AUTHENTICATION_POLICIES} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataNumberOfAuthenticationPolicies) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataNumberOfAuthenticationPolicies) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataNumberOfAuthenticationPolicies) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataNumberOfAuthenticationPolicies) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataNumberOfAuthenticationPolicies) GetActualValue() /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataNumberOfAuthenticationPolicies factory function for _BACnetConstructedDataNumberOfAuthenticationPolicies -func NewBACnetConstructedDataNumberOfAuthenticationPolicies(numberOfAuthenticationPolicies BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataNumberOfAuthenticationPolicies { +func NewBACnetConstructedDataNumberOfAuthenticationPolicies( numberOfAuthenticationPolicies BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataNumberOfAuthenticationPolicies { _result := &_BACnetConstructedDataNumberOfAuthenticationPolicies{ NumberOfAuthenticationPolicies: numberOfAuthenticationPolicies, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataNumberOfAuthenticationPolicies(numberOfAuthenticati // Deprecated: use the interface for direct cast func CastBACnetConstructedDataNumberOfAuthenticationPolicies(structType interface{}) BACnetConstructedDataNumberOfAuthenticationPolicies { - if casted, ok := structType.(BACnetConstructedDataNumberOfAuthenticationPolicies); ok { + if casted, ok := structType.(BACnetConstructedDataNumberOfAuthenticationPolicies); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataNumberOfAuthenticationPolicies); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataNumberOfAuthenticationPolicies) GetLengthInBits(c return lengthInBits } + func (m *_BACnetConstructedDataNumberOfAuthenticationPolicies) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataNumberOfAuthenticationPoliciesParseWithBuffer(ctx cont if pullErr := readBuffer.PullContext("numberOfAuthenticationPolicies"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfAuthenticationPolicies") } - _numberOfAuthenticationPolicies, _numberOfAuthenticationPoliciesErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_numberOfAuthenticationPolicies, _numberOfAuthenticationPoliciesErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _numberOfAuthenticationPoliciesErr != nil { return nil, errors.Wrap(_numberOfAuthenticationPoliciesErr, "Error parsing 'numberOfAuthenticationPolicies' field of BACnetConstructedDataNumberOfAuthenticationPolicies") } @@ -186,7 +188,7 @@ func BACnetConstructedDataNumberOfAuthenticationPoliciesParseWithBuffer(ctx cont // Create a partially initialized instance _child := &_BACnetConstructedDataNumberOfAuthenticationPolicies{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfAuthenticationPolicies: numberOfAuthenticationPolicies, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataNumberOfAuthenticationPolicies) SerializeWithWrit return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataNumberOfAuthenticationPolicies") } - // Simple Field (numberOfAuthenticationPolicies) - if pushErr := writeBuffer.PushContext("numberOfAuthenticationPolicies"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfAuthenticationPolicies") - } - _numberOfAuthenticationPoliciesErr := writeBuffer.WriteSerializable(ctx, m.GetNumberOfAuthenticationPolicies()) - if popErr := writeBuffer.PopContext("numberOfAuthenticationPolicies"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfAuthenticationPolicies") - } - if _numberOfAuthenticationPoliciesErr != nil { - return errors.Wrap(_numberOfAuthenticationPoliciesErr, "Error serializing 'numberOfAuthenticationPolicies' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (numberOfAuthenticationPolicies) + if pushErr := writeBuffer.PushContext("numberOfAuthenticationPolicies"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfAuthenticationPolicies") + } + _numberOfAuthenticationPoliciesErr := writeBuffer.WriteSerializable(ctx, m.GetNumberOfAuthenticationPolicies()) + if popErr := writeBuffer.PopContext("numberOfAuthenticationPolicies"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfAuthenticationPolicies") + } + if _numberOfAuthenticationPoliciesErr != nil { + return errors.Wrap(_numberOfAuthenticationPoliciesErr, "Error serializing 'numberOfAuthenticationPolicies' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataNumberOfAuthenticationPolicies"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataNumberOfAuthenticationPolicies") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataNumberOfAuthenticationPolicies) SerializeWithWrit return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataNumberOfAuthenticationPolicies) isBACnetConstructedDataNumberOfAuthenticationPolicies() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataNumberOfAuthenticationPolicies) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNumberOfStates.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNumberOfStates.go index 4d7f53f03fc..58ea566b0f4 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNumberOfStates.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataNumberOfStates.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataNumberOfStates is the corresponding interface of BACnetConstructedDataNumberOfStates type BACnetConstructedDataNumberOfStates interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataNumberOfStatesExactly interface { // _BACnetConstructedDataNumberOfStates is the data-structure of this message type _BACnetConstructedDataNumberOfStates struct { *_BACnetConstructedData - NumberOfState BACnetApplicationTagUnsignedInteger + NumberOfState BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataNumberOfStates) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataNumberOfStates) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataNumberOfStates) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_NUMBER_OF_STATES -} +func (m *_BACnetConstructedDataNumberOfStates) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_NUMBER_OF_STATES} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataNumberOfStates) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataNumberOfStates) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataNumberOfStates) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataNumberOfStates) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataNumberOfStates) GetActualValue() BACnetApplicatio /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataNumberOfStates factory function for _BACnetConstructedDataNumberOfStates -func NewBACnetConstructedDataNumberOfStates(numberOfState BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataNumberOfStates { +func NewBACnetConstructedDataNumberOfStates( numberOfState BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataNumberOfStates { _result := &_BACnetConstructedDataNumberOfStates{ - NumberOfState: numberOfState, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfState: numberOfState, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataNumberOfStates(numberOfState BACnetApplicationTagUn // Deprecated: use the interface for direct cast func CastBACnetConstructedDataNumberOfStates(structType interface{}) BACnetConstructedDataNumberOfStates { - if casted, ok := structType.(BACnetConstructedDataNumberOfStates); ok { + if casted, ok := structType.(BACnetConstructedDataNumberOfStates); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataNumberOfStates); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataNumberOfStates) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConstructedDataNumberOfStates) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataNumberOfStatesParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("numberOfState"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfState") } - _numberOfState, _numberOfStateErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_numberOfState, _numberOfStateErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _numberOfStateErr != nil { return nil, errors.Wrap(_numberOfStateErr, "Error parsing 'numberOfState' field of BACnetConstructedDataNumberOfStates") } @@ -186,7 +188,7 @@ func BACnetConstructedDataNumberOfStatesParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetConstructedDataNumberOfStates{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfState: numberOfState, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataNumberOfStates) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataNumberOfStates") } - // Simple Field (numberOfState) - if pushErr := writeBuffer.PushContext("numberOfState"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfState") - } - _numberOfStateErr := writeBuffer.WriteSerializable(ctx, m.GetNumberOfState()) - if popErr := writeBuffer.PopContext("numberOfState"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfState") - } - if _numberOfStateErr != nil { - return errors.Wrap(_numberOfStateErr, "Error serializing 'numberOfState' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (numberOfState) + if pushErr := writeBuffer.PushContext("numberOfState"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfState") + } + _numberOfStateErr := writeBuffer.WriteSerializable(ctx, m.GetNumberOfState()) + if popErr := writeBuffer.PopContext("numberOfState"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfState") + } + if _numberOfStateErr != nil { + return errors.Wrap(_numberOfStateErr, "Error serializing 'numberOfState' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataNumberOfStates"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataNumberOfStates") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataNumberOfStates) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataNumberOfStates) isBACnetConstructedDataNumberOfStates() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataNumberOfStates) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataObjectIdentifier.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataObjectIdentifier.go index 298abe463a5..2720197c1d5 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataObjectIdentifier.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataObjectIdentifier.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataObjectIdentifier is the corresponding interface of BACnetConstructedDataObjectIdentifier type BACnetConstructedDataObjectIdentifier interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataObjectIdentifierExactly interface { // _BACnetConstructedDataObjectIdentifier is the data-structure of this message type _BACnetConstructedDataObjectIdentifier struct { *_BACnetConstructedData - ObjectIdentifier BACnetApplicationTagObjectIdentifier + ObjectIdentifier BACnetApplicationTagObjectIdentifier } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataObjectIdentifier) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataObjectIdentifier) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataObjectIdentifier) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_OBJECT_IDENTIFIER -} +func (m *_BACnetConstructedDataObjectIdentifier) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_OBJECT_IDENTIFIER} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataObjectIdentifier) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataObjectIdentifier) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataObjectIdentifier) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataObjectIdentifier) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataObjectIdentifier) GetActualValue() BACnetApplicat /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataObjectIdentifier factory function for _BACnetConstructedDataObjectIdentifier -func NewBACnetConstructedDataObjectIdentifier(objectIdentifier BACnetApplicationTagObjectIdentifier, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataObjectIdentifier { +func NewBACnetConstructedDataObjectIdentifier( objectIdentifier BACnetApplicationTagObjectIdentifier , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataObjectIdentifier { _result := &_BACnetConstructedDataObjectIdentifier{ - ObjectIdentifier: objectIdentifier, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ObjectIdentifier: objectIdentifier, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataObjectIdentifier(objectIdentifier BACnetApplication // Deprecated: use the interface for direct cast func CastBACnetConstructedDataObjectIdentifier(structType interface{}) BACnetConstructedDataObjectIdentifier { - if casted, ok := structType.(BACnetConstructedDataObjectIdentifier); ok { + if casted, ok := structType.(BACnetConstructedDataObjectIdentifier); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataObjectIdentifier); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataObjectIdentifier) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetConstructedDataObjectIdentifier) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataObjectIdentifierParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("objectIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for objectIdentifier") } - _objectIdentifier, _objectIdentifierErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_objectIdentifier, _objectIdentifierErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _objectIdentifierErr != nil { return nil, errors.Wrap(_objectIdentifierErr, "Error parsing 'objectIdentifier' field of BACnetConstructedDataObjectIdentifier") } @@ -186,7 +188,7 @@ func BACnetConstructedDataObjectIdentifierParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_BACnetConstructedDataObjectIdentifier{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ObjectIdentifier: objectIdentifier, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataObjectIdentifier) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataObjectIdentifier") } - // Simple Field (objectIdentifier) - if pushErr := writeBuffer.PushContext("objectIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for objectIdentifier") - } - _objectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetObjectIdentifier()) - if popErr := writeBuffer.PopContext("objectIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for objectIdentifier") - } - if _objectIdentifierErr != nil { - return errors.Wrap(_objectIdentifierErr, "Error serializing 'objectIdentifier' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (objectIdentifier) + if pushErr := writeBuffer.PushContext("objectIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for objectIdentifier") + } + _objectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetObjectIdentifier()) + if popErr := writeBuffer.PopContext("objectIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for objectIdentifier") + } + if _objectIdentifierErr != nil { + return errors.Wrap(_objectIdentifierErr, "Error serializing 'objectIdentifier' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataObjectIdentifier"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataObjectIdentifier") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataObjectIdentifier) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataObjectIdentifier) isBACnetConstructedDataObjectIdentifier() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataObjectIdentifier) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataObjectList.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataObjectList.go index 6d68ccb6acf..8276623d5e9 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataObjectList.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataObjectList.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataObjectList is the corresponding interface of BACnetConstructedDataObjectList type BACnetConstructedDataObjectList interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataObjectListExactly interface { // _BACnetConstructedDataObjectList is the data-structure of this message type _BACnetConstructedDataObjectList struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - ObjectList []BACnetApplicationTagObjectIdentifier + NumberOfDataElements BACnetApplicationTagUnsignedInteger + ObjectList []BACnetApplicationTagObjectIdentifier } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataObjectList) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataObjectList) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataObjectList) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_OBJECT_LIST -} +func (m *_BACnetConstructedDataObjectList) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_OBJECT_LIST} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataObjectList) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataObjectList) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataObjectList) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataObjectList) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataObjectList) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataObjectList factory function for _BACnetConstructedDataObjectList -func NewBACnetConstructedDataObjectList(numberOfDataElements BACnetApplicationTagUnsignedInteger, objectList []BACnetApplicationTagObjectIdentifier, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataObjectList { +func NewBACnetConstructedDataObjectList( numberOfDataElements BACnetApplicationTagUnsignedInteger , objectList []BACnetApplicationTagObjectIdentifier , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataObjectList { _result := &_BACnetConstructedDataObjectList{ - NumberOfDataElements: numberOfDataElements, - ObjectList: objectList, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + ObjectList: objectList, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataObjectList(numberOfDataElements BACnetApplicationTa // Deprecated: use the interface for direct cast func CastBACnetConstructedDataObjectList(structType interface{}) BACnetConstructedDataObjectList { - if casted, ok := structType.(BACnetConstructedDataObjectList); ok { + if casted, ok := structType.(BACnetConstructedDataObjectList); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataObjectList); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataObjectList) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataObjectList) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataObjectListParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataObjectListParseWithBuffer(ctx context.Context, readBuf // Terminated array var objectList []BACnetApplicationTagObjectIdentifier { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'objectList' field of BACnetConstructedDataObjectList") } @@ -235,11 +237,11 @@ func BACnetConstructedDataObjectListParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetConstructedDataObjectList{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - ObjectList: objectList, + ObjectList: objectList, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataObjectList) SerializeWithWriteBuffer(ctx context. if pushErr := writeBuffer.PushContext("BACnetConstructedDataObjectList"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataObjectList") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (objectList) - if pushErr := writeBuffer.PushContext("objectList", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for objectList") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetObjectList() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetObjectList()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'objectList' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("objectList", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for objectList") + } + + // Array Field (objectList) + if pushErr := writeBuffer.PushContext("objectList", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for objectList") + } + for _curItem, _element := range m.GetObjectList() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetObjectList()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'objectList' field") } + } + if popErr := writeBuffer.PopContext("objectList", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for objectList") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataObjectList"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataObjectList") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataObjectList) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataObjectList) isBACnetConstructedDataObjectList() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataObjectList) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataObjectName.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataObjectName.go index 26faaf6d0a6..bd604f8f6f7 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataObjectName.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataObjectName.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataObjectName is the corresponding interface of BACnetConstructedDataObjectName type BACnetConstructedDataObjectName interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataObjectNameExactly interface { // _BACnetConstructedDataObjectName is the data-structure of this message type _BACnetConstructedDataObjectName struct { *_BACnetConstructedData - ObjectName BACnetApplicationTagCharacterString + ObjectName BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataObjectName) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataObjectName) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataObjectName) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_OBJECT_NAME -} +func (m *_BACnetConstructedDataObjectName) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_OBJECT_NAME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataObjectName) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataObjectName) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataObjectName) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataObjectName) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataObjectName) GetActualValue() BACnetApplicationTag /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataObjectName factory function for _BACnetConstructedDataObjectName -func NewBACnetConstructedDataObjectName(objectName BACnetApplicationTagCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataObjectName { +func NewBACnetConstructedDataObjectName( objectName BACnetApplicationTagCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataObjectName { _result := &_BACnetConstructedDataObjectName{ - ObjectName: objectName, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ObjectName: objectName, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataObjectName(objectName BACnetApplicationTagCharacter // Deprecated: use the interface for direct cast func CastBACnetConstructedDataObjectName(structType interface{}) BACnetConstructedDataObjectName { - if casted, ok := structType.(BACnetConstructedDataObjectName); ok { + if casted, ok := structType.(BACnetConstructedDataObjectName); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataObjectName); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataObjectName) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataObjectName) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataObjectNameParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("objectName"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for objectName") } - _objectName, _objectNameErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_objectName, _objectNameErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _objectNameErr != nil { return nil, errors.Wrap(_objectNameErr, "Error parsing 'objectName' field of BACnetConstructedDataObjectName") } @@ -186,7 +188,7 @@ func BACnetConstructedDataObjectNameParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetConstructedDataObjectName{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ObjectName: objectName, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataObjectName) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataObjectName") } - // Simple Field (objectName) - if pushErr := writeBuffer.PushContext("objectName"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for objectName") - } - _objectNameErr := writeBuffer.WriteSerializable(ctx, m.GetObjectName()) - if popErr := writeBuffer.PopContext("objectName"); popErr != nil { - return errors.Wrap(popErr, "Error popping for objectName") - } - if _objectNameErr != nil { - return errors.Wrap(_objectNameErr, "Error serializing 'objectName' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (objectName) + if pushErr := writeBuffer.PushContext("objectName"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for objectName") + } + _objectNameErr := writeBuffer.WriteSerializable(ctx, m.GetObjectName()) + if popErr := writeBuffer.PopContext("objectName"); popErr != nil { + return errors.Wrap(popErr, "Error popping for objectName") + } + if _objectNameErr != nil { + return errors.Wrap(_objectNameErr, "Error serializing 'objectName' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataObjectName"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataObjectName") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataObjectName) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataObjectName) isBACnetConstructedDataObjectName() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataObjectName) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataObjectPropertyReference.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataObjectPropertyReference.go index b9e23febca8..6f3fbd4438c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataObjectPropertyReference.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataObjectPropertyReference.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataObjectPropertyReference is the corresponding interface of BACnetConstructedDataObjectPropertyReference type BACnetConstructedDataObjectPropertyReference interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataObjectPropertyReferenceExactly interface { // _BACnetConstructedDataObjectPropertyReference is the data-structure of this message type _BACnetConstructedDataObjectPropertyReference struct { *_BACnetConstructedData - PropertyReference BACnetDeviceObjectPropertyReference + PropertyReference BACnetDeviceObjectPropertyReference } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataObjectPropertyReference) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataObjectPropertyReference) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataObjectPropertyReference) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_OBJECT_PROPERTY_REFERENCE -} +func (m *_BACnetConstructedDataObjectPropertyReference) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_OBJECT_PROPERTY_REFERENCE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataObjectPropertyReference) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataObjectPropertyReference) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataObjectPropertyReference) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataObjectPropertyReference) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataObjectPropertyReference) GetActualValue() BACnetD /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataObjectPropertyReference factory function for _BACnetConstructedDataObjectPropertyReference -func NewBACnetConstructedDataObjectPropertyReference(propertyReference BACnetDeviceObjectPropertyReference, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataObjectPropertyReference { +func NewBACnetConstructedDataObjectPropertyReference( propertyReference BACnetDeviceObjectPropertyReference , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataObjectPropertyReference { _result := &_BACnetConstructedDataObjectPropertyReference{ - PropertyReference: propertyReference, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PropertyReference: propertyReference, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataObjectPropertyReference(propertyReference BACnetDev // Deprecated: use the interface for direct cast func CastBACnetConstructedDataObjectPropertyReference(structType interface{}) BACnetConstructedDataObjectPropertyReference { - if casted, ok := structType.(BACnetConstructedDataObjectPropertyReference); ok { + if casted, ok := structType.(BACnetConstructedDataObjectPropertyReference); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataObjectPropertyReference); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataObjectPropertyReference) GetLengthInBits(ctx cont return lengthInBits } + func (m *_BACnetConstructedDataObjectPropertyReference) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataObjectPropertyReferenceParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("propertyReference"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for propertyReference") } - _propertyReference, _propertyReferenceErr := BACnetDeviceObjectPropertyReferenceParseWithBuffer(ctx, readBuffer) +_propertyReference, _propertyReferenceErr := BACnetDeviceObjectPropertyReferenceParseWithBuffer(ctx, readBuffer) if _propertyReferenceErr != nil { return nil, errors.Wrap(_propertyReferenceErr, "Error parsing 'propertyReference' field of BACnetConstructedDataObjectPropertyReference") } @@ -186,7 +188,7 @@ func BACnetConstructedDataObjectPropertyReferenceParseWithBuffer(ctx context.Con // Create a partially initialized instance _child := &_BACnetConstructedDataObjectPropertyReference{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PropertyReference: propertyReference, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataObjectPropertyReference) SerializeWithWriteBuffer return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataObjectPropertyReference") } - // Simple Field (propertyReference) - if pushErr := writeBuffer.PushContext("propertyReference"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for propertyReference") - } - _propertyReferenceErr := writeBuffer.WriteSerializable(ctx, m.GetPropertyReference()) - if popErr := writeBuffer.PopContext("propertyReference"); popErr != nil { - return errors.Wrap(popErr, "Error popping for propertyReference") - } - if _propertyReferenceErr != nil { - return errors.Wrap(_propertyReferenceErr, "Error serializing 'propertyReference' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (propertyReference) + if pushErr := writeBuffer.PushContext("propertyReference"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for propertyReference") + } + _propertyReferenceErr := writeBuffer.WriteSerializable(ctx, m.GetPropertyReference()) + if popErr := writeBuffer.PopContext("propertyReference"); popErr != nil { + return errors.Wrap(popErr, "Error popping for propertyReference") + } + if _propertyReferenceErr != nil { + return errors.Wrap(_propertyReferenceErr, "Error serializing 'propertyReference' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataObjectPropertyReference"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataObjectPropertyReference") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataObjectPropertyReference) SerializeWithWriteBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataObjectPropertyReference) isBACnetConstructedDataObjectPropertyReference() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataObjectPropertyReference) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataObjectType.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataObjectType.go index 9d2cdbc1eb8..9f195d2d453 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataObjectType.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataObjectType.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataObjectType is the corresponding interface of BACnetConstructedDataObjectType type BACnetConstructedDataObjectType interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataObjectTypeExactly interface { // _BACnetConstructedDataObjectType is the data-structure of this message type _BACnetConstructedDataObjectType struct { *_BACnetConstructedData - ObjectType BACnetObjectTypeTagged + ObjectType BACnetObjectTypeTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataObjectType) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataObjectType) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataObjectType) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_OBJECT_TYPE -} +func (m *_BACnetConstructedDataObjectType) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_OBJECT_TYPE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataObjectType) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataObjectType) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataObjectType) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataObjectType) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataObjectType) GetActualValue() BACnetObjectTypeTagg /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataObjectType factory function for _BACnetConstructedDataObjectType -func NewBACnetConstructedDataObjectType(objectType BACnetObjectTypeTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataObjectType { +func NewBACnetConstructedDataObjectType( objectType BACnetObjectTypeTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataObjectType { _result := &_BACnetConstructedDataObjectType{ - ObjectType: objectType, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ObjectType: objectType, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataObjectType(objectType BACnetObjectTypeTagged, openi // Deprecated: use the interface for direct cast func CastBACnetConstructedDataObjectType(structType interface{}) BACnetConstructedDataObjectType { - if casted, ok := structType.(BACnetConstructedDataObjectType); ok { + if casted, ok := structType.(BACnetConstructedDataObjectType); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataObjectType); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataObjectType) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataObjectType) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataObjectTypeParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("objectType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for objectType") } - _objectType, _objectTypeErr := BACnetObjectTypeTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_objectType, _objectTypeErr := BACnetObjectTypeTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _objectTypeErr != nil { return nil, errors.Wrap(_objectTypeErr, "Error parsing 'objectType' field of BACnetConstructedDataObjectType") } @@ -186,7 +188,7 @@ func BACnetConstructedDataObjectTypeParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetConstructedDataObjectType{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ObjectType: objectType, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataObjectType) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataObjectType") } - // Simple Field (objectType) - if pushErr := writeBuffer.PushContext("objectType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for objectType") - } - _objectTypeErr := writeBuffer.WriteSerializable(ctx, m.GetObjectType()) - if popErr := writeBuffer.PopContext("objectType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for objectType") - } - if _objectTypeErr != nil { - return errors.Wrap(_objectTypeErr, "Error serializing 'objectType' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (objectType) + if pushErr := writeBuffer.PushContext("objectType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for objectType") + } + _objectTypeErr := writeBuffer.WriteSerializable(ctx, m.GetObjectType()) + if popErr := writeBuffer.PopContext("objectType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for objectType") + } + if _objectTypeErr != nil { + return errors.Wrap(_objectTypeErr, "Error serializing 'objectType' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataObjectType"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataObjectType") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataObjectType) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataObjectType) isBACnetConstructedDataObjectType() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataObjectType) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyCount.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyCount.go index df666dd46dd..ad486f787a6 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyCount.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyCount.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataOccupancyCount is the corresponding interface of BACnetConstructedDataOccupancyCount type BACnetConstructedDataOccupancyCount interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataOccupancyCountExactly interface { // _BACnetConstructedDataOccupancyCount is the data-structure of this message type _BACnetConstructedDataOccupancyCount struct { *_BACnetConstructedData - OccupancyCount BACnetApplicationTagUnsignedInteger + OccupancyCount BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataOccupancyCount) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataOccupancyCount) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataOccupancyCount) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_OCCUPANCY_COUNT -} +func (m *_BACnetConstructedDataOccupancyCount) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_OCCUPANCY_COUNT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataOccupancyCount) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataOccupancyCount) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataOccupancyCount) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataOccupancyCount) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataOccupancyCount) GetActualValue() BACnetApplicatio /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataOccupancyCount factory function for _BACnetConstructedDataOccupancyCount -func NewBACnetConstructedDataOccupancyCount(occupancyCount BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataOccupancyCount { +func NewBACnetConstructedDataOccupancyCount( occupancyCount BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataOccupancyCount { _result := &_BACnetConstructedDataOccupancyCount{ - OccupancyCount: occupancyCount, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + OccupancyCount: occupancyCount, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataOccupancyCount(occupancyCount BACnetApplicationTagU // Deprecated: use the interface for direct cast func CastBACnetConstructedDataOccupancyCount(structType interface{}) BACnetConstructedDataOccupancyCount { - if casted, ok := structType.(BACnetConstructedDataOccupancyCount); ok { + if casted, ok := structType.(BACnetConstructedDataOccupancyCount); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataOccupancyCount); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataOccupancyCount) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConstructedDataOccupancyCount) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataOccupancyCountParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("occupancyCount"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for occupancyCount") } - _occupancyCount, _occupancyCountErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_occupancyCount, _occupancyCountErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _occupancyCountErr != nil { return nil, errors.Wrap(_occupancyCountErr, "Error parsing 'occupancyCount' field of BACnetConstructedDataOccupancyCount") } @@ -186,7 +188,7 @@ func BACnetConstructedDataOccupancyCountParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetConstructedDataOccupancyCount{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, OccupancyCount: occupancyCount, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataOccupancyCount) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataOccupancyCount") } - // Simple Field (occupancyCount) - if pushErr := writeBuffer.PushContext("occupancyCount"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for occupancyCount") - } - _occupancyCountErr := writeBuffer.WriteSerializable(ctx, m.GetOccupancyCount()) - if popErr := writeBuffer.PopContext("occupancyCount"); popErr != nil { - return errors.Wrap(popErr, "Error popping for occupancyCount") - } - if _occupancyCountErr != nil { - return errors.Wrap(_occupancyCountErr, "Error serializing 'occupancyCount' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (occupancyCount) + if pushErr := writeBuffer.PushContext("occupancyCount"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for occupancyCount") + } + _occupancyCountErr := writeBuffer.WriteSerializable(ctx, m.GetOccupancyCount()) + if popErr := writeBuffer.PopContext("occupancyCount"); popErr != nil { + return errors.Wrap(popErr, "Error popping for occupancyCount") + } + if _occupancyCountErr != nil { + return errors.Wrap(_occupancyCountErr, "Error serializing 'occupancyCount' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataOccupancyCount"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataOccupancyCount") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataOccupancyCount) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataOccupancyCount) isBACnetConstructedDataOccupancyCount() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataOccupancyCount) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyCountAdjust.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyCountAdjust.go index 6e143db8ddf..836de49592c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyCountAdjust.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyCountAdjust.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataOccupancyCountAdjust is the corresponding interface of BACnetConstructedDataOccupancyCountAdjust type BACnetConstructedDataOccupancyCountAdjust interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataOccupancyCountAdjustExactly interface { // _BACnetConstructedDataOccupancyCountAdjust is the data-structure of this message type _BACnetConstructedDataOccupancyCountAdjust struct { *_BACnetConstructedData - OccupancyCountAdjust BACnetApplicationTagBoolean + OccupancyCountAdjust BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataOccupancyCountAdjust) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataOccupancyCountAdjust) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataOccupancyCountAdjust) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_OCCUPANCY_COUNT_ADJUST -} +func (m *_BACnetConstructedDataOccupancyCountAdjust) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_OCCUPANCY_COUNT_ADJUST} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataOccupancyCountAdjust) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataOccupancyCountAdjust) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataOccupancyCountAdjust) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataOccupancyCountAdjust) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataOccupancyCountAdjust) GetActualValue() BACnetAppl /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataOccupancyCountAdjust factory function for _BACnetConstructedDataOccupancyCountAdjust -func NewBACnetConstructedDataOccupancyCountAdjust(occupancyCountAdjust BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataOccupancyCountAdjust { +func NewBACnetConstructedDataOccupancyCountAdjust( occupancyCountAdjust BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataOccupancyCountAdjust { _result := &_BACnetConstructedDataOccupancyCountAdjust{ - OccupancyCountAdjust: occupancyCountAdjust, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + OccupancyCountAdjust: occupancyCountAdjust, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataOccupancyCountAdjust(occupancyCountAdjust BACnetApp // Deprecated: use the interface for direct cast func CastBACnetConstructedDataOccupancyCountAdjust(structType interface{}) BACnetConstructedDataOccupancyCountAdjust { - if casted, ok := structType.(BACnetConstructedDataOccupancyCountAdjust); ok { + if casted, ok := structType.(BACnetConstructedDataOccupancyCountAdjust); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataOccupancyCountAdjust); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataOccupancyCountAdjust) GetLengthInBits(ctx context return lengthInBits } + func (m *_BACnetConstructedDataOccupancyCountAdjust) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataOccupancyCountAdjustParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("occupancyCountAdjust"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for occupancyCountAdjust") } - _occupancyCountAdjust, _occupancyCountAdjustErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_occupancyCountAdjust, _occupancyCountAdjustErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _occupancyCountAdjustErr != nil { return nil, errors.Wrap(_occupancyCountAdjustErr, "Error parsing 'occupancyCountAdjust' field of BACnetConstructedDataOccupancyCountAdjust") } @@ -186,7 +188,7 @@ func BACnetConstructedDataOccupancyCountAdjustParseWithBuffer(ctx context.Contex // Create a partially initialized instance _child := &_BACnetConstructedDataOccupancyCountAdjust{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, OccupancyCountAdjust: occupancyCountAdjust, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataOccupancyCountAdjust) SerializeWithWriteBuffer(ct return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataOccupancyCountAdjust") } - // Simple Field (occupancyCountAdjust) - if pushErr := writeBuffer.PushContext("occupancyCountAdjust"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for occupancyCountAdjust") - } - _occupancyCountAdjustErr := writeBuffer.WriteSerializable(ctx, m.GetOccupancyCountAdjust()) - if popErr := writeBuffer.PopContext("occupancyCountAdjust"); popErr != nil { - return errors.Wrap(popErr, "Error popping for occupancyCountAdjust") - } - if _occupancyCountAdjustErr != nil { - return errors.Wrap(_occupancyCountAdjustErr, "Error serializing 'occupancyCountAdjust' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (occupancyCountAdjust) + if pushErr := writeBuffer.PushContext("occupancyCountAdjust"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for occupancyCountAdjust") + } + _occupancyCountAdjustErr := writeBuffer.WriteSerializable(ctx, m.GetOccupancyCountAdjust()) + if popErr := writeBuffer.PopContext("occupancyCountAdjust"); popErr != nil { + return errors.Wrap(popErr, "Error popping for occupancyCountAdjust") + } + if _occupancyCountAdjustErr != nil { + return errors.Wrap(_occupancyCountAdjustErr, "Error serializing 'occupancyCountAdjust' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataOccupancyCountAdjust"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataOccupancyCountAdjust") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataOccupancyCountAdjust) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataOccupancyCountAdjust) isBACnetConstructedDataOccupancyCountAdjust() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataOccupancyCountAdjust) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyCountEnable.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyCountEnable.go index 1fc3672fae6..d7da41183f9 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyCountEnable.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyCountEnable.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataOccupancyCountEnable is the corresponding interface of BACnetConstructedDataOccupancyCountEnable type BACnetConstructedDataOccupancyCountEnable interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataOccupancyCountEnableExactly interface { // _BACnetConstructedDataOccupancyCountEnable is the data-structure of this message type _BACnetConstructedDataOccupancyCountEnable struct { *_BACnetConstructedData - OccupancyCountEnable BACnetApplicationTagBoolean + OccupancyCountEnable BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataOccupancyCountEnable) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataOccupancyCountEnable) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataOccupancyCountEnable) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_OCCUPANCY_COUNT_ENABLE -} +func (m *_BACnetConstructedDataOccupancyCountEnable) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_OCCUPANCY_COUNT_ENABLE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataOccupancyCountEnable) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataOccupancyCountEnable) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataOccupancyCountEnable) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataOccupancyCountEnable) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataOccupancyCountEnable) GetActualValue() BACnetAppl /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataOccupancyCountEnable factory function for _BACnetConstructedDataOccupancyCountEnable -func NewBACnetConstructedDataOccupancyCountEnable(occupancyCountEnable BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataOccupancyCountEnable { +func NewBACnetConstructedDataOccupancyCountEnable( occupancyCountEnable BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataOccupancyCountEnable { _result := &_BACnetConstructedDataOccupancyCountEnable{ - OccupancyCountEnable: occupancyCountEnable, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + OccupancyCountEnable: occupancyCountEnable, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataOccupancyCountEnable(occupancyCountEnable BACnetApp // Deprecated: use the interface for direct cast func CastBACnetConstructedDataOccupancyCountEnable(structType interface{}) BACnetConstructedDataOccupancyCountEnable { - if casted, ok := structType.(BACnetConstructedDataOccupancyCountEnable); ok { + if casted, ok := structType.(BACnetConstructedDataOccupancyCountEnable); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataOccupancyCountEnable); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataOccupancyCountEnable) GetLengthInBits(ctx context return lengthInBits } + func (m *_BACnetConstructedDataOccupancyCountEnable) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataOccupancyCountEnableParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("occupancyCountEnable"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for occupancyCountEnable") } - _occupancyCountEnable, _occupancyCountEnableErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_occupancyCountEnable, _occupancyCountEnableErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _occupancyCountEnableErr != nil { return nil, errors.Wrap(_occupancyCountEnableErr, "Error parsing 'occupancyCountEnable' field of BACnetConstructedDataOccupancyCountEnable") } @@ -186,7 +188,7 @@ func BACnetConstructedDataOccupancyCountEnableParseWithBuffer(ctx context.Contex // Create a partially initialized instance _child := &_BACnetConstructedDataOccupancyCountEnable{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, OccupancyCountEnable: occupancyCountEnable, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataOccupancyCountEnable) SerializeWithWriteBuffer(ct return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataOccupancyCountEnable") } - // Simple Field (occupancyCountEnable) - if pushErr := writeBuffer.PushContext("occupancyCountEnable"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for occupancyCountEnable") - } - _occupancyCountEnableErr := writeBuffer.WriteSerializable(ctx, m.GetOccupancyCountEnable()) - if popErr := writeBuffer.PopContext("occupancyCountEnable"); popErr != nil { - return errors.Wrap(popErr, "Error popping for occupancyCountEnable") - } - if _occupancyCountEnableErr != nil { - return errors.Wrap(_occupancyCountEnableErr, "Error serializing 'occupancyCountEnable' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (occupancyCountEnable) + if pushErr := writeBuffer.PushContext("occupancyCountEnable"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for occupancyCountEnable") + } + _occupancyCountEnableErr := writeBuffer.WriteSerializable(ctx, m.GetOccupancyCountEnable()) + if popErr := writeBuffer.PopContext("occupancyCountEnable"); popErr != nil { + return errors.Wrap(popErr, "Error popping for occupancyCountEnable") + } + if _occupancyCountEnableErr != nil { + return errors.Wrap(_occupancyCountEnableErr, "Error serializing 'occupancyCountEnable' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataOccupancyCountEnable"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataOccupancyCountEnable") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataOccupancyCountEnable) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataOccupancyCountEnable) isBACnetConstructedDataOccupancyCountEnable() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataOccupancyCountEnable) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyLowerLimit.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyLowerLimit.go index ccab1f713d8..c082a077b51 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyLowerLimit.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyLowerLimit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataOccupancyLowerLimit is the corresponding interface of BACnetConstructedDataOccupancyLowerLimit type BACnetConstructedDataOccupancyLowerLimit interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataOccupancyLowerLimitExactly interface { // _BACnetConstructedDataOccupancyLowerLimit is the data-structure of this message type _BACnetConstructedDataOccupancyLowerLimit struct { *_BACnetConstructedData - OccupancyLowerLimit BACnetApplicationTagUnsignedInteger + OccupancyLowerLimit BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataOccupancyLowerLimit) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataOccupancyLowerLimit) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataOccupancyLowerLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_OCCUPANCY_LOWER_LIMIT -} +func (m *_BACnetConstructedDataOccupancyLowerLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_OCCUPANCY_LOWER_LIMIT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataOccupancyLowerLimit) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataOccupancyLowerLimit) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataOccupancyLowerLimit) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataOccupancyLowerLimit) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataOccupancyLowerLimit) GetActualValue() BACnetAppli /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataOccupancyLowerLimit factory function for _BACnetConstructedDataOccupancyLowerLimit -func NewBACnetConstructedDataOccupancyLowerLimit(occupancyLowerLimit BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataOccupancyLowerLimit { +func NewBACnetConstructedDataOccupancyLowerLimit( occupancyLowerLimit BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataOccupancyLowerLimit { _result := &_BACnetConstructedDataOccupancyLowerLimit{ - OccupancyLowerLimit: occupancyLowerLimit, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + OccupancyLowerLimit: occupancyLowerLimit, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataOccupancyLowerLimit(occupancyLowerLimit BACnetAppli // Deprecated: use the interface for direct cast func CastBACnetConstructedDataOccupancyLowerLimit(structType interface{}) BACnetConstructedDataOccupancyLowerLimit { - if casted, ok := structType.(BACnetConstructedDataOccupancyLowerLimit); ok { + if casted, ok := structType.(BACnetConstructedDataOccupancyLowerLimit); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataOccupancyLowerLimit); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataOccupancyLowerLimit) GetLengthInBits(ctx context. return lengthInBits } + func (m *_BACnetConstructedDataOccupancyLowerLimit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataOccupancyLowerLimitParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("occupancyLowerLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for occupancyLowerLimit") } - _occupancyLowerLimit, _occupancyLowerLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_occupancyLowerLimit, _occupancyLowerLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _occupancyLowerLimitErr != nil { return nil, errors.Wrap(_occupancyLowerLimitErr, "Error parsing 'occupancyLowerLimit' field of BACnetConstructedDataOccupancyLowerLimit") } @@ -186,7 +188,7 @@ func BACnetConstructedDataOccupancyLowerLimitParseWithBuffer(ctx context.Context // Create a partially initialized instance _child := &_BACnetConstructedDataOccupancyLowerLimit{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, OccupancyLowerLimit: occupancyLowerLimit, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataOccupancyLowerLimit) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataOccupancyLowerLimit") } - // Simple Field (occupancyLowerLimit) - if pushErr := writeBuffer.PushContext("occupancyLowerLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for occupancyLowerLimit") - } - _occupancyLowerLimitErr := writeBuffer.WriteSerializable(ctx, m.GetOccupancyLowerLimit()) - if popErr := writeBuffer.PopContext("occupancyLowerLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for occupancyLowerLimit") - } - if _occupancyLowerLimitErr != nil { - return errors.Wrap(_occupancyLowerLimitErr, "Error serializing 'occupancyLowerLimit' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (occupancyLowerLimit) + if pushErr := writeBuffer.PushContext("occupancyLowerLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for occupancyLowerLimit") + } + _occupancyLowerLimitErr := writeBuffer.WriteSerializable(ctx, m.GetOccupancyLowerLimit()) + if popErr := writeBuffer.PopContext("occupancyLowerLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for occupancyLowerLimit") + } + if _occupancyLowerLimitErr != nil { + return errors.Wrap(_occupancyLowerLimitErr, "Error serializing 'occupancyLowerLimit' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataOccupancyLowerLimit"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataOccupancyLowerLimit") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataOccupancyLowerLimit) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataOccupancyLowerLimit) isBACnetConstructedDataOccupancyLowerLimit() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataOccupancyLowerLimit) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyLowerLimitEnforced.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyLowerLimitEnforced.go index 26bc918aa0a..ad4be1b99a3 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyLowerLimitEnforced.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyLowerLimitEnforced.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataOccupancyLowerLimitEnforced is the corresponding interface of BACnetConstructedDataOccupancyLowerLimitEnforced type BACnetConstructedDataOccupancyLowerLimitEnforced interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataOccupancyLowerLimitEnforcedExactly interface { // _BACnetConstructedDataOccupancyLowerLimitEnforced is the data-structure of this message type _BACnetConstructedDataOccupancyLowerLimitEnforced struct { *_BACnetConstructedData - OccupancyLowerLimitEnforced BACnetApplicationTagBoolean + OccupancyLowerLimitEnforced BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataOccupancyLowerLimitEnforced) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataOccupancyLowerLimitEnforced) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataOccupancyLowerLimitEnforced) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_OCCUPANCY_LOWER_LIMIT_ENFORCED -} +func (m *_BACnetConstructedDataOccupancyLowerLimitEnforced) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_OCCUPANCY_LOWER_LIMIT_ENFORCED} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataOccupancyLowerLimitEnforced) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataOccupancyLowerLimitEnforced) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataOccupancyLowerLimitEnforced) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataOccupancyLowerLimitEnforced) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataOccupancyLowerLimitEnforced) GetActualValue() BAC /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataOccupancyLowerLimitEnforced factory function for _BACnetConstructedDataOccupancyLowerLimitEnforced -func NewBACnetConstructedDataOccupancyLowerLimitEnforced(occupancyLowerLimitEnforced BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataOccupancyLowerLimitEnforced { +func NewBACnetConstructedDataOccupancyLowerLimitEnforced( occupancyLowerLimitEnforced BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataOccupancyLowerLimitEnforced { _result := &_BACnetConstructedDataOccupancyLowerLimitEnforced{ OccupancyLowerLimitEnforced: occupancyLowerLimitEnforced, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataOccupancyLowerLimitEnforced(occupancyLowerLimitEnfo // Deprecated: use the interface for direct cast func CastBACnetConstructedDataOccupancyLowerLimitEnforced(structType interface{}) BACnetConstructedDataOccupancyLowerLimitEnforced { - if casted, ok := structType.(BACnetConstructedDataOccupancyLowerLimitEnforced); ok { + if casted, ok := structType.(BACnetConstructedDataOccupancyLowerLimitEnforced); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataOccupancyLowerLimitEnforced); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataOccupancyLowerLimitEnforced) GetLengthInBits(ctx return lengthInBits } + func (m *_BACnetConstructedDataOccupancyLowerLimitEnforced) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataOccupancyLowerLimitEnforcedParseWithBuffer(ctx context if pullErr := readBuffer.PullContext("occupancyLowerLimitEnforced"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for occupancyLowerLimitEnforced") } - _occupancyLowerLimitEnforced, _occupancyLowerLimitEnforcedErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_occupancyLowerLimitEnforced, _occupancyLowerLimitEnforcedErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _occupancyLowerLimitEnforcedErr != nil { return nil, errors.Wrap(_occupancyLowerLimitEnforcedErr, "Error parsing 'occupancyLowerLimitEnforced' field of BACnetConstructedDataOccupancyLowerLimitEnforced") } @@ -186,7 +188,7 @@ func BACnetConstructedDataOccupancyLowerLimitEnforcedParseWithBuffer(ctx context // Create a partially initialized instance _child := &_BACnetConstructedDataOccupancyLowerLimitEnforced{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, OccupancyLowerLimitEnforced: occupancyLowerLimitEnforced, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataOccupancyLowerLimitEnforced) SerializeWithWriteBu return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataOccupancyLowerLimitEnforced") } - // Simple Field (occupancyLowerLimitEnforced) - if pushErr := writeBuffer.PushContext("occupancyLowerLimitEnforced"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for occupancyLowerLimitEnforced") - } - _occupancyLowerLimitEnforcedErr := writeBuffer.WriteSerializable(ctx, m.GetOccupancyLowerLimitEnforced()) - if popErr := writeBuffer.PopContext("occupancyLowerLimitEnforced"); popErr != nil { - return errors.Wrap(popErr, "Error popping for occupancyLowerLimitEnforced") - } - if _occupancyLowerLimitEnforcedErr != nil { - return errors.Wrap(_occupancyLowerLimitEnforcedErr, "Error serializing 'occupancyLowerLimitEnforced' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (occupancyLowerLimitEnforced) + if pushErr := writeBuffer.PushContext("occupancyLowerLimitEnforced"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for occupancyLowerLimitEnforced") + } + _occupancyLowerLimitEnforcedErr := writeBuffer.WriteSerializable(ctx, m.GetOccupancyLowerLimitEnforced()) + if popErr := writeBuffer.PopContext("occupancyLowerLimitEnforced"); popErr != nil { + return errors.Wrap(popErr, "Error popping for occupancyLowerLimitEnforced") + } + if _occupancyLowerLimitEnforcedErr != nil { + return errors.Wrap(_occupancyLowerLimitEnforcedErr, "Error serializing 'occupancyLowerLimitEnforced' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataOccupancyLowerLimitEnforced"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataOccupancyLowerLimitEnforced") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataOccupancyLowerLimitEnforced) SerializeWithWriteBu return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataOccupancyLowerLimitEnforced) isBACnetConstructedDataOccupancyLowerLimitEnforced() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataOccupancyLowerLimitEnforced) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyState.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyState.go index e78608e2579..1a53dfb4807 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyState.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyState.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataOccupancyState is the corresponding interface of BACnetConstructedDataOccupancyState type BACnetConstructedDataOccupancyState interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataOccupancyStateExactly interface { // _BACnetConstructedDataOccupancyState is the data-structure of this message type _BACnetConstructedDataOccupancyState struct { *_BACnetConstructedData - OccupancyState BACnetAccessZoneOccupancyStateTagged + OccupancyState BACnetAccessZoneOccupancyStateTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataOccupancyState) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataOccupancyState) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataOccupancyState) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_OCCUPANCY_STATE -} +func (m *_BACnetConstructedDataOccupancyState) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_OCCUPANCY_STATE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataOccupancyState) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataOccupancyState) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataOccupancyState) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataOccupancyState) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataOccupancyState) GetActualValue() BACnetAccessZone /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataOccupancyState factory function for _BACnetConstructedDataOccupancyState -func NewBACnetConstructedDataOccupancyState(occupancyState BACnetAccessZoneOccupancyStateTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataOccupancyState { +func NewBACnetConstructedDataOccupancyState( occupancyState BACnetAccessZoneOccupancyStateTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataOccupancyState { _result := &_BACnetConstructedDataOccupancyState{ - OccupancyState: occupancyState, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + OccupancyState: occupancyState, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataOccupancyState(occupancyState BACnetAccessZoneOccup // Deprecated: use the interface for direct cast func CastBACnetConstructedDataOccupancyState(structType interface{}) BACnetConstructedDataOccupancyState { - if casted, ok := structType.(BACnetConstructedDataOccupancyState); ok { + if casted, ok := structType.(BACnetConstructedDataOccupancyState); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataOccupancyState); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataOccupancyState) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConstructedDataOccupancyState) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataOccupancyStateParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("occupancyState"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for occupancyState") } - _occupancyState, _occupancyStateErr := BACnetAccessZoneOccupancyStateTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_occupancyState, _occupancyStateErr := BACnetAccessZoneOccupancyStateTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _occupancyStateErr != nil { return nil, errors.Wrap(_occupancyStateErr, "Error parsing 'occupancyState' field of BACnetConstructedDataOccupancyState") } @@ -186,7 +188,7 @@ func BACnetConstructedDataOccupancyStateParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetConstructedDataOccupancyState{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, OccupancyState: occupancyState, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataOccupancyState) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataOccupancyState") } - // Simple Field (occupancyState) - if pushErr := writeBuffer.PushContext("occupancyState"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for occupancyState") - } - _occupancyStateErr := writeBuffer.WriteSerializable(ctx, m.GetOccupancyState()) - if popErr := writeBuffer.PopContext("occupancyState"); popErr != nil { - return errors.Wrap(popErr, "Error popping for occupancyState") - } - if _occupancyStateErr != nil { - return errors.Wrap(_occupancyStateErr, "Error serializing 'occupancyState' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (occupancyState) + if pushErr := writeBuffer.PushContext("occupancyState"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for occupancyState") + } + _occupancyStateErr := writeBuffer.WriteSerializable(ctx, m.GetOccupancyState()) + if popErr := writeBuffer.PopContext("occupancyState"); popErr != nil { + return errors.Wrap(popErr, "Error popping for occupancyState") + } + if _occupancyStateErr != nil { + return errors.Wrap(_occupancyStateErr, "Error serializing 'occupancyState' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataOccupancyState"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataOccupancyState") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataOccupancyState) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataOccupancyState) isBACnetConstructedDataOccupancyState() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataOccupancyState) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyUpperLimit.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyUpperLimit.go index 1036403182e..af54364a991 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyUpperLimit.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyUpperLimit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataOccupancyUpperLimit is the corresponding interface of BACnetConstructedDataOccupancyUpperLimit type BACnetConstructedDataOccupancyUpperLimit interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataOccupancyUpperLimitExactly interface { // _BACnetConstructedDataOccupancyUpperLimit is the data-structure of this message type _BACnetConstructedDataOccupancyUpperLimit struct { *_BACnetConstructedData - OccupancyUpperLimit BACnetApplicationTagUnsignedInteger + OccupancyUpperLimit BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataOccupancyUpperLimit) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataOccupancyUpperLimit) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataOccupancyUpperLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_OCCUPANCY_UPPER_LIMIT -} +func (m *_BACnetConstructedDataOccupancyUpperLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_OCCUPANCY_UPPER_LIMIT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataOccupancyUpperLimit) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataOccupancyUpperLimit) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataOccupancyUpperLimit) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataOccupancyUpperLimit) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataOccupancyUpperLimit) GetActualValue() BACnetAppli /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataOccupancyUpperLimit factory function for _BACnetConstructedDataOccupancyUpperLimit -func NewBACnetConstructedDataOccupancyUpperLimit(occupancyUpperLimit BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataOccupancyUpperLimit { +func NewBACnetConstructedDataOccupancyUpperLimit( occupancyUpperLimit BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataOccupancyUpperLimit { _result := &_BACnetConstructedDataOccupancyUpperLimit{ - OccupancyUpperLimit: occupancyUpperLimit, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + OccupancyUpperLimit: occupancyUpperLimit, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataOccupancyUpperLimit(occupancyUpperLimit BACnetAppli // Deprecated: use the interface for direct cast func CastBACnetConstructedDataOccupancyUpperLimit(structType interface{}) BACnetConstructedDataOccupancyUpperLimit { - if casted, ok := structType.(BACnetConstructedDataOccupancyUpperLimit); ok { + if casted, ok := structType.(BACnetConstructedDataOccupancyUpperLimit); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataOccupancyUpperLimit); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataOccupancyUpperLimit) GetLengthInBits(ctx context. return lengthInBits } + func (m *_BACnetConstructedDataOccupancyUpperLimit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataOccupancyUpperLimitParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("occupancyUpperLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for occupancyUpperLimit") } - _occupancyUpperLimit, _occupancyUpperLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_occupancyUpperLimit, _occupancyUpperLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _occupancyUpperLimitErr != nil { return nil, errors.Wrap(_occupancyUpperLimitErr, "Error parsing 'occupancyUpperLimit' field of BACnetConstructedDataOccupancyUpperLimit") } @@ -186,7 +188,7 @@ func BACnetConstructedDataOccupancyUpperLimitParseWithBuffer(ctx context.Context // Create a partially initialized instance _child := &_BACnetConstructedDataOccupancyUpperLimit{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, OccupancyUpperLimit: occupancyUpperLimit, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataOccupancyUpperLimit) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataOccupancyUpperLimit") } - // Simple Field (occupancyUpperLimit) - if pushErr := writeBuffer.PushContext("occupancyUpperLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for occupancyUpperLimit") - } - _occupancyUpperLimitErr := writeBuffer.WriteSerializable(ctx, m.GetOccupancyUpperLimit()) - if popErr := writeBuffer.PopContext("occupancyUpperLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for occupancyUpperLimit") - } - if _occupancyUpperLimitErr != nil { - return errors.Wrap(_occupancyUpperLimitErr, "Error serializing 'occupancyUpperLimit' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (occupancyUpperLimit) + if pushErr := writeBuffer.PushContext("occupancyUpperLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for occupancyUpperLimit") + } + _occupancyUpperLimitErr := writeBuffer.WriteSerializable(ctx, m.GetOccupancyUpperLimit()) + if popErr := writeBuffer.PopContext("occupancyUpperLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for occupancyUpperLimit") + } + if _occupancyUpperLimitErr != nil { + return errors.Wrap(_occupancyUpperLimitErr, "Error serializing 'occupancyUpperLimit' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataOccupancyUpperLimit"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataOccupancyUpperLimit") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataOccupancyUpperLimit) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataOccupancyUpperLimit) isBACnetConstructedDataOccupancyUpperLimit() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataOccupancyUpperLimit) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyUpperLimitEnforced.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyUpperLimitEnforced.go index 34648060099..a2da0f41c31 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyUpperLimitEnforced.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOccupancyUpperLimitEnforced.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataOccupancyUpperLimitEnforced is the corresponding interface of BACnetConstructedDataOccupancyUpperLimitEnforced type BACnetConstructedDataOccupancyUpperLimitEnforced interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataOccupancyUpperLimitEnforcedExactly interface { // _BACnetConstructedDataOccupancyUpperLimitEnforced is the data-structure of this message type _BACnetConstructedDataOccupancyUpperLimitEnforced struct { *_BACnetConstructedData - OccupancyUpperLimitEnforced BACnetApplicationTagBoolean + OccupancyUpperLimitEnforced BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataOccupancyUpperLimitEnforced) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataOccupancyUpperLimitEnforced) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataOccupancyUpperLimitEnforced) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_OCCUPANCY_UPPER_LIMIT_ENFORCED -} +func (m *_BACnetConstructedDataOccupancyUpperLimitEnforced) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_OCCUPANCY_UPPER_LIMIT_ENFORCED} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataOccupancyUpperLimitEnforced) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataOccupancyUpperLimitEnforced) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataOccupancyUpperLimitEnforced) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataOccupancyUpperLimitEnforced) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataOccupancyUpperLimitEnforced) GetActualValue() BAC /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataOccupancyUpperLimitEnforced factory function for _BACnetConstructedDataOccupancyUpperLimitEnforced -func NewBACnetConstructedDataOccupancyUpperLimitEnforced(occupancyUpperLimitEnforced BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataOccupancyUpperLimitEnforced { +func NewBACnetConstructedDataOccupancyUpperLimitEnforced( occupancyUpperLimitEnforced BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataOccupancyUpperLimitEnforced { _result := &_BACnetConstructedDataOccupancyUpperLimitEnforced{ OccupancyUpperLimitEnforced: occupancyUpperLimitEnforced, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataOccupancyUpperLimitEnforced(occupancyUpperLimitEnfo // Deprecated: use the interface for direct cast func CastBACnetConstructedDataOccupancyUpperLimitEnforced(structType interface{}) BACnetConstructedDataOccupancyUpperLimitEnforced { - if casted, ok := structType.(BACnetConstructedDataOccupancyUpperLimitEnforced); ok { + if casted, ok := structType.(BACnetConstructedDataOccupancyUpperLimitEnforced); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataOccupancyUpperLimitEnforced); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataOccupancyUpperLimitEnforced) GetLengthInBits(ctx return lengthInBits } + func (m *_BACnetConstructedDataOccupancyUpperLimitEnforced) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataOccupancyUpperLimitEnforcedParseWithBuffer(ctx context if pullErr := readBuffer.PullContext("occupancyUpperLimitEnforced"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for occupancyUpperLimitEnforced") } - _occupancyUpperLimitEnforced, _occupancyUpperLimitEnforcedErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_occupancyUpperLimitEnforced, _occupancyUpperLimitEnforcedErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _occupancyUpperLimitEnforcedErr != nil { return nil, errors.Wrap(_occupancyUpperLimitEnforcedErr, "Error parsing 'occupancyUpperLimitEnforced' field of BACnetConstructedDataOccupancyUpperLimitEnforced") } @@ -186,7 +188,7 @@ func BACnetConstructedDataOccupancyUpperLimitEnforcedParseWithBuffer(ctx context // Create a partially initialized instance _child := &_BACnetConstructedDataOccupancyUpperLimitEnforced{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, OccupancyUpperLimitEnforced: occupancyUpperLimitEnforced, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataOccupancyUpperLimitEnforced) SerializeWithWriteBu return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataOccupancyUpperLimitEnforced") } - // Simple Field (occupancyUpperLimitEnforced) - if pushErr := writeBuffer.PushContext("occupancyUpperLimitEnforced"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for occupancyUpperLimitEnforced") - } - _occupancyUpperLimitEnforcedErr := writeBuffer.WriteSerializable(ctx, m.GetOccupancyUpperLimitEnforced()) - if popErr := writeBuffer.PopContext("occupancyUpperLimitEnforced"); popErr != nil { - return errors.Wrap(popErr, "Error popping for occupancyUpperLimitEnforced") - } - if _occupancyUpperLimitEnforcedErr != nil { - return errors.Wrap(_occupancyUpperLimitEnforcedErr, "Error serializing 'occupancyUpperLimitEnforced' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (occupancyUpperLimitEnforced) + if pushErr := writeBuffer.PushContext("occupancyUpperLimitEnforced"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for occupancyUpperLimitEnforced") + } + _occupancyUpperLimitEnforcedErr := writeBuffer.WriteSerializable(ctx, m.GetOccupancyUpperLimitEnforced()) + if popErr := writeBuffer.PopContext("occupancyUpperLimitEnforced"); popErr != nil { + return errors.Wrap(popErr, "Error popping for occupancyUpperLimitEnforced") + } + if _occupancyUpperLimitEnforcedErr != nil { + return errors.Wrap(_occupancyUpperLimitEnforcedErr, "Error serializing 'occupancyUpperLimitEnforced' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataOccupancyUpperLimitEnforced"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataOccupancyUpperLimitEnforced") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataOccupancyUpperLimitEnforced) SerializeWithWriteBu return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataOccupancyUpperLimitEnforced) isBACnetConstructedDataOccupancyUpperLimitEnforced() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataOccupancyUpperLimitEnforced) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOctetStringValuePresentValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOctetStringValuePresentValue.go index 22a56e42828..05f5541c3c5 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOctetStringValuePresentValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOctetStringValuePresentValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataOctetStringValuePresentValue is the corresponding interface of BACnetConstructedDataOctetStringValuePresentValue type BACnetConstructedDataOctetStringValuePresentValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataOctetStringValuePresentValueExactly interface { // _BACnetConstructedDataOctetStringValuePresentValue is the data-structure of this message type _BACnetConstructedDataOctetStringValuePresentValue struct { *_BACnetConstructedData - PresentValue BACnetApplicationTagOctetString + PresentValue BACnetApplicationTagOctetString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataOctetStringValuePresentValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_OCTETSTRING_VALUE -} +func (m *_BACnetConstructedDataOctetStringValuePresentValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_OCTETSTRING_VALUE} -func (m *_BACnetConstructedDataOctetStringValuePresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PRESENT_VALUE -} +func (m *_BACnetConstructedDataOctetStringValuePresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PRESENT_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataOctetStringValuePresentValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataOctetStringValuePresentValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataOctetStringValuePresentValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataOctetStringValuePresentValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataOctetStringValuePresentValue) GetActualValue() BA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataOctetStringValuePresentValue factory function for _BACnetConstructedDataOctetStringValuePresentValue -func NewBACnetConstructedDataOctetStringValuePresentValue(presentValue BACnetApplicationTagOctetString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataOctetStringValuePresentValue { +func NewBACnetConstructedDataOctetStringValuePresentValue( presentValue BACnetApplicationTagOctetString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataOctetStringValuePresentValue { _result := &_BACnetConstructedDataOctetStringValuePresentValue{ - PresentValue: presentValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PresentValue: presentValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataOctetStringValuePresentValue(presentValue BACnetApp // Deprecated: use the interface for direct cast func CastBACnetConstructedDataOctetStringValuePresentValue(structType interface{}) BACnetConstructedDataOctetStringValuePresentValue { - if casted, ok := structType.(BACnetConstructedDataOctetStringValuePresentValue); ok { + if casted, ok := structType.(BACnetConstructedDataOctetStringValuePresentValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataOctetStringValuePresentValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataOctetStringValuePresentValue) GetLengthInBits(ctx return lengthInBits } + func (m *_BACnetConstructedDataOctetStringValuePresentValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataOctetStringValuePresentValueParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("presentValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for presentValue") } - _presentValue, _presentValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_presentValue, _presentValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _presentValueErr != nil { return nil, errors.Wrap(_presentValueErr, "Error parsing 'presentValue' field of BACnetConstructedDataOctetStringValuePresentValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataOctetStringValuePresentValueParseWithBuffer(ctx contex // Create a partially initialized instance _child := &_BACnetConstructedDataOctetStringValuePresentValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PresentValue: presentValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataOctetStringValuePresentValue) SerializeWithWriteB return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataOctetStringValuePresentValue") } - // Simple Field (presentValue) - if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for presentValue") - } - _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) - if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for presentValue") - } - if _presentValueErr != nil { - return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (presentValue) + if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for presentValue") + } + _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) + if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for presentValue") + } + if _presentValueErr != nil { + return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataOctetStringValuePresentValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataOctetStringValuePresentValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataOctetStringValuePresentValue) SerializeWithWriteB return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataOctetStringValuePresentValue) isBACnetConstructedDataOctetStringValuePresentValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataOctetStringValuePresentValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOctetStringValueRelinquishDefault.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOctetStringValueRelinquishDefault.go index 75d62e0868e..fe4ba36cac5 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOctetStringValueRelinquishDefault.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOctetStringValueRelinquishDefault.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataOctetStringValueRelinquishDefault is the corresponding interface of BACnetConstructedDataOctetStringValueRelinquishDefault type BACnetConstructedDataOctetStringValueRelinquishDefault interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataOctetStringValueRelinquishDefaultExactly interface { // _BACnetConstructedDataOctetStringValueRelinquishDefault is the data-structure of this message type _BACnetConstructedDataOctetStringValueRelinquishDefault struct { *_BACnetConstructedData - RelinquishDefault BACnetApplicationTagSignedInteger + RelinquishDefault BACnetApplicationTagSignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataOctetStringValueRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_OCTETSTRING_VALUE -} +func (m *_BACnetConstructedDataOctetStringValueRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_OCTETSTRING_VALUE} -func (m *_BACnetConstructedDataOctetStringValueRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_RELINQUISH_DEFAULT -} +func (m *_BACnetConstructedDataOctetStringValueRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_RELINQUISH_DEFAULT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataOctetStringValueRelinquishDefault) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataOctetStringValueRelinquishDefault) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataOctetStringValueRelinquishDefault) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataOctetStringValueRelinquishDefault) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataOctetStringValueRelinquishDefault) GetActualValue /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataOctetStringValueRelinquishDefault factory function for _BACnetConstructedDataOctetStringValueRelinquishDefault -func NewBACnetConstructedDataOctetStringValueRelinquishDefault(relinquishDefault BACnetApplicationTagSignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataOctetStringValueRelinquishDefault { +func NewBACnetConstructedDataOctetStringValueRelinquishDefault( relinquishDefault BACnetApplicationTagSignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataOctetStringValueRelinquishDefault { _result := &_BACnetConstructedDataOctetStringValueRelinquishDefault{ - RelinquishDefault: relinquishDefault, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + RelinquishDefault: relinquishDefault, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataOctetStringValueRelinquishDefault(relinquishDefault // Deprecated: use the interface for direct cast func CastBACnetConstructedDataOctetStringValueRelinquishDefault(structType interface{}) BACnetConstructedDataOctetStringValueRelinquishDefault { - if casted, ok := structType.(BACnetConstructedDataOctetStringValueRelinquishDefault); ok { + if casted, ok := structType.(BACnetConstructedDataOctetStringValueRelinquishDefault); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataOctetStringValueRelinquishDefault); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataOctetStringValueRelinquishDefault) GetLengthInBit return lengthInBits } + func (m *_BACnetConstructedDataOctetStringValueRelinquishDefault) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataOctetStringValueRelinquishDefaultParseWithBuffer(ctx c if pullErr := readBuffer.PullContext("relinquishDefault"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for relinquishDefault") } - _relinquishDefault, _relinquishDefaultErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_relinquishDefault, _relinquishDefaultErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _relinquishDefaultErr != nil { return nil, errors.Wrap(_relinquishDefaultErr, "Error parsing 'relinquishDefault' field of BACnetConstructedDataOctetStringValueRelinquishDefault") } @@ -186,7 +188,7 @@ func BACnetConstructedDataOctetStringValueRelinquishDefaultParseWithBuffer(ctx c // Create a partially initialized instance _child := &_BACnetConstructedDataOctetStringValueRelinquishDefault{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, RelinquishDefault: relinquishDefault, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataOctetStringValueRelinquishDefault) SerializeWithW return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataOctetStringValueRelinquishDefault") } - // Simple Field (relinquishDefault) - if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for relinquishDefault") - } - _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) - if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { - return errors.Wrap(popErr, "Error popping for relinquishDefault") - } - if _relinquishDefaultErr != nil { - return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (relinquishDefault) + if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for relinquishDefault") + } + _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) + if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { + return errors.Wrap(popErr, "Error popping for relinquishDefault") + } + if _relinquishDefaultErr != nil { + return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataOctetStringValueRelinquishDefault"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataOctetStringValueRelinquishDefault") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataOctetStringValueRelinquishDefault) SerializeWithW return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataOctetStringValueRelinquishDefault) isBACnetConstructedDataOctetStringValueRelinquishDefault() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataOctetStringValueRelinquishDefault) String() strin } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOctetstringValueAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOctetstringValueAll.go index fddbaa6bf94..6369ecfb6e5 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOctetstringValueAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOctetstringValueAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataOctetstringValueAll is the corresponding interface of BACnetConstructedDataOctetstringValueAll type BACnetConstructedDataOctetstringValueAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataOctetstringValueAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataOctetstringValueAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_OCTETSTRING_VALUE -} +func (m *_BACnetConstructedDataOctetstringValueAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_OCTETSTRING_VALUE} -func (m *_BACnetConstructedDataOctetstringValueAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataOctetstringValueAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataOctetstringValueAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataOctetstringValueAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataOctetstringValueAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataOctetstringValueAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataOctetstringValueAll factory function for _BACnetConstructedDataOctetstringValueAll -func NewBACnetConstructedDataOctetstringValueAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataOctetstringValueAll { +func NewBACnetConstructedDataOctetstringValueAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataOctetstringValueAll { _result := &_BACnetConstructedDataOctetstringValueAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataOctetstringValueAll(openingTag BACnetOpeningTag, pe // Deprecated: use the interface for direct cast func CastBACnetConstructedDataOctetstringValueAll(structType interface{}) BACnetConstructedDataOctetstringValueAll { - if casted, ok := structType.(BACnetConstructedDataOctetstringValueAll); ok { + if casted, ok := structType.(BACnetConstructedDataOctetstringValueAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataOctetstringValueAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataOctetstringValueAll) GetLengthInBits(ctx context. return lengthInBits } + func (m *_BACnetConstructedDataOctetstringValueAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataOctetstringValueAllParseWithBuffer(ctx context.Context _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataOctetstringValueAllParseWithBuffer(ctx context.Context // Create a partially initialized instance _child := &_BACnetConstructedDataOctetstringValueAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataOctetstringValueAll) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataOctetstringValueAll) isBACnetConstructedDataOctetstringValueAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataOctetstringValueAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOperationDirection.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOperationDirection.go index 30e3c041fa3..08357889978 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOperationDirection.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOperationDirection.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataOperationDirection is the corresponding interface of BACnetConstructedDataOperationDirection type BACnetConstructedDataOperationDirection interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataOperationDirectionExactly interface { // _BACnetConstructedDataOperationDirection is the data-structure of this message type _BACnetConstructedDataOperationDirection struct { *_BACnetConstructedData - OperationDirection BACnetEscalatorOperationDirectionTagged + OperationDirection BACnetEscalatorOperationDirectionTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataOperationDirection) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataOperationDirection) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataOperationDirection) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_OPERATION_DIRECTION -} +func (m *_BACnetConstructedDataOperationDirection) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_OPERATION_DIRECTION} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataOperationDirection) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataOperationDirection) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataOperationDirection) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataOperationDirection) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataOperationDirection) GetActualValue() BACnetEscala /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataOperationDirection factory function for _BACnetConstructedDataOperationDirection -func NewBACnetConstructedDataOperationDirection(operationDirection BACnetEscalatorOperationDirectionTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataOperationDirection { +func NewBACnetConstructedDataOperationDirection( operationDirection BACnetEscalatorOperationDirectionTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataOperationDirection { _result := &_BACnetConstructedDataOperationDirection{ - OperationDirection: operationDirection, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + OperationDirection: operationDirection, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataOperationDirection(operationDirection BACnetEscalat // Deprecated: use the interface for direct cast func CastBACnetConstructedDataOperationDirection(structType interface{}) BACnetConstructedDataOperationDirection { - if casted, ok := structType.(BACnetConstructedDataOperationDirection); ok { + if casted, ok := structType.(BACnetConstructedDataOperationDirection); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataOperationDirection); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataOperationDirection) GetLengthInBits(ctx context.C return lengthInBits } + func (m *_BACnetConstructedDataOperationDirection) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataOperationDirectionParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("operationDirection"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for operationDirection") } - _operationDirection, _operationDirectionErr := BACnetEscalatorOperationDirectionTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_operationDirection, _operationDirectionErr := BACnetEscalatorOperationDirectionTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _operationDirectionErr != nil { return nil, errors.Wrap(_operationDirectionErr, "Error parsing 'operationDirection' field of BACnetConstructedDataOperationDirection") } @@ -186,7 +188,7 @@ func BACnetConstructedDataOperationDirectionParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataOperationDirection{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, OperationDirection: operationDirection, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataOperationDirection) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataOperationDirection") } - // Simple Field (operationDirection) - if pushErr := writeBuffer.PushContext("operationDirection"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for operationDirection") - } - _operationDirectionErr := writeBuffer.WriteSerializable(ctx, m.GetOperationDirection()) - if popErr := writeBuffer.PopContext("operationDirection"); popErr != nil { - return errors.Wrap(popErr, "Error popping for operationDirection") - } - if _operationDirectionErr != nil { - return errors.Wrap(_operationDirectionErr, "Error serializing 'operationDirection' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (operationDirection) + if pushErr := writeBuffer.PushContext("operationDirection"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for operationDirection") + } + _operationDirectionErr := writeBuffer.WriteSerializable(ctx, m.GetOperationDirection()) + if popErr := writeBuffer.PopContext("operationDirection"); popErr != nil { + return errors.Wrap(popErr, "Error popping for operationDirection") + } + if _operationDirectionErr != nil { + return errors.Wrap(_operationDirectionErr, "Error serializing 'operationDirection' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataOperationDirection"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataOperationDirection") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataOperationDirection) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataOperationDirection) isBACnetConstructedDataOperationDirection() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataOperationDirection) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOperationExpected.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOperationExpected.go index fdc4dec4a53..514a7c37013 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOperationExpected.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOperationExpected.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataOperationExpected is the corresponding interface of BACnetConstructedDataOperationExpected type BACnetConstructedDataOperationExpected interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataOperationExpectedExactly interface { // _BACnetConstructedDataOperationExpected is the data-structure of this message type _BACnetConstructedDataOperationExpected struct { *_BACnetConstructedData - LifeSafetyOperations BACnetLifeSafetyOperationTagged + LifeSafetyOperations BACnetLifeSafetyOperationTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataOperationExpected) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataOperationExpected) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataOperationExpected) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_OPERATION_EXPECTED -} +func (m *_BACnetConstructedDataOperationExpected) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_OPERATION_EXPECTED} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataOperationExpected) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataOperationExpected) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataOperationExpected) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataOperationExpected) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataOperationExpected) GetActualValue() BACnetLifeSaf /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataOperationExpected factory function for _BACnetConstructedDataOperationExpected -func NewBACnetConstructedDataOperationExpected(lifeSafetyOperations BACnetLifeSafetyOperationTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataOperationExpected { +func NewBACnetConstructedDataOperationExpected( lifeSafetyOperations BACnetLifeSafetyOperationTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataOperationExpected { _result := &_BACnetConstructedDataOperationExpected{ - LifeSafetyOperations: lifeSafetyOperations, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + LifeSafetyOperations: lifeSafetyOperations, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataOperationExpected(lifeSafetyOperations BACnetLifeSa // Deprecated: use the interface for direct cast func CastBACnetConstructedDataOperationExpected(structType interface{}) BACnetConstructedDataOperationExpected { - if casted, ok := structType.(BACnetConstructedDataOperationExpected); ok { + if casted, ok := structType.(BACnetConstructedDataOperationExpected); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataOperationExpected); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataOperationExpected) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetConstructedDataOperationExpected) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataOperationExpectedParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("lifeSafetyOperations"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lifeSafetyOperations") } - _lifeSafetyOperations, _lifeSafetyOperationsErr := BACnetLifeSafetyOperationTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_lifeSafetyOperations, _lifeSafetyOperationsErr := BACnetLifeSafetyOperationTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _lifeSafetyOperationsErr != nil { return nil, errors.Wrap(_lifeSafetyOperationsErr, "Error parsing 'lifeSafetyOperations' field of BACnetConstructedDataOperationExpected") } @@ -186,7 +188,7 @@ func BACnetConstructedDataOperationExpectedParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataOperationExpected{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LifeSafetyOperations: lifeSafetyOperations, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataOperationExpected) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataOperationExpected") } - // Simple Field (lifeSafetyOperations) - if pushErr := writeBuffer.PushContext("lifeSafetyOperations"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lifeSafetyOperations") - } - _lifeSafetyOperationsErr := writeBuffer.WriteSerializable(ctx, m.GetLifeSafetyOperations()) - if popErr := writeBuffer.PopContext("lifeSafetyOperations"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lifeSafetyOperations") - } - if _lifeSafetyOperationsErr != nil { - return errors.Wrap(_lifeSafetyOperationsErr, "Error serializing 'lifeSafetyOperations' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (lifeSafetyOperations) + if pushErr := writeBuffer.PushContext("lifeSafetyOperations"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lifeSafetyOperations") + } + _lifeSafetyOperationsErr := writeBuffer.WriteSerializable(ctx, m.GetLifeSafetyOperations()) + if popErr := writeBuffer.PopContext("lifeSafetyOperations"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lifeSafetyOperations") + } + if _lifeSafetyOperationsErr != nil { + return errors.Wrap(_lifeSafetyOperationsErr, "Error serializing 'lifeSafetyOperations' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataOperationExpected"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataOperationExpected") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataOperationExpected) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataOperationExpected) isBACnetConstructedDataOperationExpected() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataOperationExpected) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOptional.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOptional.go index 213511aef52..8090095244a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOptional.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOptional.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataOptional is the corresponding interface of BACnetConstructedDataOptional type BACnetConstructedDataOptional interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataOptional struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataOptional) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataOptional) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataOptional) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_OPTIONAL -} +func (m *_BACnetConstructedDataOptional) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_OPTIONAL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataOptional) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataOptional) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataOptional) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataOptional) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataOptional factory function for _BACnetConstructedDataOptional -func NewBACnetConstructedDataOptional(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataOptional { +func NewBACnetConstructedDataOptional( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataOptional { _result := &_BACnetConstructedDataOptional{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataOptional(openingTag BACnetOpeningTag, peekedTagHead // Deprecated: use the interface for direct cast func CastBACnetConstructedDataOptional(structType interface{}) BACnetConstructedDataOptional { - if casted, ok := structType.(BACnetConstructedDataOptional); ok { + if casted, ok := structType.(BACnetConstructedDataOptional); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataOptional); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataOptional) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetConstructedDataOptional) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataOptionalParseWithBuffer(ctx context.Context, readBuffe _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"An property identified by OPTIONAL should never occur in the wild"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataOptionalParseWithBuffer(ctx context.Context, readBuffe // Create a partially initialized instance _child := &_BACnetConstructedDataOptional{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataOptional) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataOptional) isBACnetConstructedDataOptional() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataOptional) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOutOfService.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOutOfService.go index 8243abd6082..6a20897b258 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOutOfService.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOutOfService.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataOutOfService is the corresponding interface of BACnetConstructedDataOutOfService type BACnetConstructedDataOutOfService interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataOutOfServiceExactly interface { // _BACnetConstructedDataOutOfService is the data-structure of this message type _BACnetConstructedDataOutOfService struct { *_BACnetConstructedData - OutOfService BACnetApplicationTagBoolean + OutOfService BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataOutOfService) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataOutOfService) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataOutOfService) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_OUT_OF_SERVICE -} +func (m *_BACnetConstructedDataOutOfService) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_OUT_OF_SERVICE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataOutOfService) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataOutOfService) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataOutOfService) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataOutOfService) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataOutOfService) GetActualValue() BACnetApplicationT /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataOutOfService factory function for _BACnetConstructedDataOutOfService -func NewBACnetConstructedDataOutOfService(outOfService BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataOutOfService { +func NewBACnetConstructedDataOutOfService( outOfService BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataOutOfService { _result := &_BACnetConstructedDataOutOfService{ - OutOfService: outOfService, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + OutOfService: outOfService, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataOutOfService(outOfService BACnetApplicationTagBoole // Deprecated: use the interface for direct cast func CastBACnetConstructedDataOutOfService(structType interface{}) BACnetConstructedDataOutOfService { - if casted, ok := structType.(BACnetConstructedDataOutOfService); ok { + if casted, ok := structType.(BACnetConstructedDataOutOfService); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataOutOfService); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataOutOfService) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetConstructedDataOutOfService) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataOutOfServiceParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("outOfService"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for outOfService") } - _outOfService, _outOfServiceErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_outOfService, _outOfServiceErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _outOfServiceErr != nil { return nil, errors.Wrap(_outOfServiceErr, "Error parsing 'outOfService' field of BACnetConstructedDataOutOfService") } @@ -186,7 +188,7 @@ func BACnetConstructedDataOutOfServiceParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetConstructedDataOutOfService{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, OutOfService: outOfService, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataOutOfService) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataOutOfService") } - // Simple Field (outOfService) - if pushErr := writeBuffer.PushContext("outOfService"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for outOfService") - } - _outOfServiceErr := writeBuffer.WriteSerializable(ctx, m.GetOutOfService()) - if popErr := writeBuffer.PopContext("outOfService"); popErr != nil { - return errors.Wrap(popErr, "Error popping for outOfService") - } - if _outOfServiceErr != nil { - return errors.Wrap(_outOfServiceErr, "Error serializing 'outOfService' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (outOfService) + if pushErr := writeBuffer.PushContext("outOfService"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for outOfService") + } + _outOfServiceErr := writeBuffer.WriteSerializable(ctx, m.GetOutOfService()) + if popErr := writeBuffer.PopContext("outOfService"); popErr != nil { + return errors.Wrap(popErr, "Error popping for outOfService") + } + if _outOfServiceErr != nil { + return errors.Wrap(_outOfServiceErr, "Error serializing 'outOfService' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataOutOfService"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataOutOfService") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataOutOfService) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataOutOfService) isBACnetConstructedDataOutOfService() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataOutOfService) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOutputUnits.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOutputUnits.go index 71e68a20774..b275c796b80 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOutputUnits.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataOutputUnits.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataOutputUnits is the corresponding interface of BACnetConstructedDataOutputUnits type BACnetConstructedDataOutputUnits interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataOutputUnitsExactly interface { // _BACnetConstructedDataOutputUnits is the data-structure of this message type _BACnetConstructedDataOutputUnits struct { *_BACnetConstructedData - Units BACnetEngineeringUnitsTagged + Units BACnetEngineeringUnitsTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataOutputUnits) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataOutputUnits) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataOutputUnits) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_OUTPUT_UNITS -} +func (m *_BACnetConstructedDataOutputUnits) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_OUTPUT_UNITS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataOutputUnits) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataOutputUnits) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataOutputUnits) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataOutputUnits) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataOutputUnits) GetActualValue() BACnetEngineeringUn /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataOutputUnits factory function for _BACnetConstructedDataOutputUnits -func NewBACnetConstructedDataOutputUnits(units BACnetEngineeringUnitsTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataOutputUnits { +func NewBACnetConstructedDataOutputUnits( units BACnetEngineeringUnitsTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataOutputUnits { _result := &_BACnetConstructedDataOutputUnits{ - Units: units, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Units: units, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataOutputUnits(units BACnetEngineeringUnitsTagged, ope // Deprecated: use the interface for direct cast func CastBACnetConstructedDataOutputUnits(structType interface{}) BACnetConstructedDataOutputUnits { - if casted, ok := structType.(BACnetConstructedDataOutputUnits); ok { + if casted, ok := structType.(BACnetConstructedDataOutputUnits); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataOutputUnits); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataOutputUnits) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataOutputUnits) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataOutputUnitsParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("units"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for units") } - _units, _unitsErr := BACnetEngineeringUnitsTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_units, _unitsErr := BACnetEngineeringUnitsTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _unitsErr != nil { return nil, errors.Wrap(_unitsErr, "Error parsing 'units' field of BACnetConstructedDataOutputUnits") } @@ -186,7 +188,7 @@ func BACnetConstructedDataOutputUnitsParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataOutputUnits{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Units: units, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataOutputUnits) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataOutputUnits") } - // Simple Field (units) - if pushErr := writeBuffer.PushContext("units"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for units") - } - _unitsErr := writeBuffer.WriteSerializable(ctx, m.GetUnits()) - if popErr := writeBuffer.PopContext("units"); popErr != nil { - return errors.Wrap(popErr, "Error popping for units") - } - if _unitsErr != nil { - return errors.Wrap(_unitsErr, "Error serializing 'units' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (units) + if pushErr := writeBuffer.PushContext("units"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for units") + } + _unitsErr := writeBuffer.WriteSerializable(ctx, m.GetUnits()) + if popErr := writeBuffer.PopContext("units"); popErr != nil { + return errors.Wrap(popErr, "Error popping for units") + } + if _unitsErr != nil { + return errors.Wrap(_unitsErr, "Error serializing 'units' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataOutputUnits"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataOutputUnits") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataOutputUnits) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataOutputUnits) isBACnetConstructedDataOutputUnits() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataOutputUnits) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPacketReorderTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPacketReorderTime.go index 7710cb5125b..b257d486618 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPacketReorderTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPacketReorderTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataPacketReorderTime is the corresponding interface of BACnetConstructedDataPacketReorderTime type BACnetConstructedDataPacketReorderTime interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataPacketReorderTimeExactly interface { // _BACnetConstructedDataPacketReorderTime is the data-structure of this message type _BACnetConstructedDataPacketReorderTime struct { *_BACnetConstructedData - PacketReorderTime BACnetApplicationTagUnsignedInteger + PacketReorderTime BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataPacketReorderTime) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataPacketReorderTime) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataPacketReorderTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PACKET_REORDER_TIME -} +func (m *_BACnetConstructedDataPacketReorderTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PACKET_REORDER_TIME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataPacketReorderTime) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataPacketReorderTime) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataPacketReorderTime) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataPacketReorderTime) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataPacketReorderTime) GetActualValue() BACnetApplica /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataPacketReorderTime factory function for _BACnetConstructedDataPacketReorderTime -func NewBACnetConstructedDataPacketReorderTime(packetReorderTime BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataPacketReorderTime { +func NewBACnetConstructedDataPacketReorderTime( packetReorderTime BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataPacketReorderTime { _result := &_BACnetConstructedDataPacketReorderTime{ - PacketReorderTime: packetReorderTime, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PacketReorderTime: packetReorderTime, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataPacketReorderTime(packetReorderTime BACnetApplicati // Deprecated: use the interface for direct cast func CastBACnetConstructedDataPacketReorderTime(structType interface{}) BACnetConstructedDataPacketReorderTime { - if casted, ok := structType.(BACnetConstructedDataPacketReorderTime); ok { + if casted, ok := structType.(BACnetConstructedDataPacketReorderTime); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataPacketReorderTime); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataPacketReorderTime) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetConstructedDataPacketReorderTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataPacketReorderTimeParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("packetReorderTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for packetReorderTime") } - _packetReorderTime, _packetReorderTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_packetReorderTime, _packetReorderTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _packetReorderTimeErr != nil { return nil, errors.Wrap(_packetReorderTimeErr, "Error parsing 'packetReorderTime' field of BACnetConstructedDataPacketReorderTime") } @@ -186,7 +188,7 @@ func BACnetConstructedDataPacketReorderTimeParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataPacketReorderTime{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PacketReorderTime: packetReorderTime, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataPacketReorderTime) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataPacketReorderTime") } - // Simple Field (packetReorderTime) - if pushErr := writeBuffer.PushContext("packetReorderTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for packetReorderTime") - } - _packetReorderTimeErr := writeBuffer.WriteSerializable(ctx, m.GetPacketReorderTime()) - if popErr := writeBuffer.PopContext("packetReorderTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for packetReorderTime") - } - if _packetReorderTimeErr != nil { - return errors.Wrap(_packetReorderTimeErr, "Error serializing 'packetReorderTime' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (packetReorderTime) + if pushErr := writeBuffer.PushContext("packetReorderTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for packetReorderTime") + } + _packetReorderTimeErr := writeBuffer.WriteSerializable(ctx, m.GetPacketReorderTime()) + if popErr := writeBuffer.PopContext("packetReorderTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for packetReorderTime") + } + if _packetReorderTimeErr != nil { + return errors.Wrap(_packetReorderTimeErr, "Error serializing 'packetReorderTime' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataPacketReorderTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataPacketReorderTime") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataPacketReorderTime) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataPacketReorderTime) isBACnetConstructedDataPacketReorderTime() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataPacketReorderTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPassbackMode.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPassbackMode.go index d5965809d5d..eccfd0586de 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPassbackMode.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPassbackMode.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataPassbackMode is the corresponding interface of BACnetConstructedDataPassbackMode type BACnetConstructedDataPassbackMode interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataPassbackModeExactly interface { // _BACnetConstructedDataPassbackMode is the data-structure of this message type _BACnetConstructedDataPassbackMode struct { *_BACnetConstructedData - PassbackMode BACnetAccessPassbackModeTagged + PassbackMode BACnetAccessPassbackModeTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataPassbackMode) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataPassbackMode) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataPassbackMode) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PASSBACK_MODE -} +func (m *_BACnetConstructedDataPassbackMode) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PASSBACK_MODE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataPassbackMode) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataPassbackMode) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataPassbackMode) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataPassbackMode) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataPassbackMode) GetActualValue() BACnetAccessPassba /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataPassbackMode factory function for _BACnetConstructedDataPassbackMode -func NewBACnetConstructedDataPassbackMode(passbackMode BACnetAccessPassbackModeTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataPassbackMode { +func NewBACnetConstructedDataPassbackMode( passbackMode BACnetAccessPassbackModeTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataPassbackMode { _result := &_BACnetConstructedDataPassbackMode{ - PassbackMode: passbackMode, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PassbackMode: passbackMode, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataPassbackMode(passbackMode BACnetAccessPassbackModeT // Deprecated: use the interface for direct cast func CastBACnetConstructedDataPassbackMode(structType interface{}) BACnetConstructedDataPassbackMode { - if casted, ok := structType.(BACnetConstructedDataPassbackMode); ok { + if casted, ok := structType.(BACnetConstructedDataPassbackMode); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataPassbackMode); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataPassbackMode) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetConstructedDataPassbackMode) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataPassbackModeParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("passbackMode"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for passbackMode") } - _passbackMode, _passbackModeErr := BACnetAccessPassbackModeTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_passbackMode, _passbackModeErr := BACnetAccessPassbackModeTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _passbackModeErr != nil { return nil, errors.Wrap(_passbackModeErr, "Error parsing 'passbackMode' field of BACnetConstructedDataPassbackMode") } @@ -186,7 +188,7 @@ func BACnetConstructedDataPassbackModeParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetConstructedDataPassbackMode{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PassbackMode: passbackMode, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataPassbackMode) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataPassbackMode") } - // Simple Field (passbackMode) - if pushErr := writeBuffer.PushContext("passbackMode"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for passbackMode") - } - _passbackModeErr := writeBuffer.WriteSerializable(ctx, m.GetPassbackMode()) - if popErr := writeBuffer.PopContext("passbackMode"); popErr != nil { - return errors.Wrap(popErr, "Error popping for passbackMode") - } - if _passbackModeErr != nil { - return errors.Wrap(_passbackModeErr, "Error serializing 'passbackMode' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (passbackMode) + if pushErr := writeBuffer.PushContext("passbackMode"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for passbackMode") + } + _passbackModeErr := writeBuffer.WriteSerializable(ctx, m.GetPassbackMode()) + if popErr := writeBuffer.PopContext("passbackMode"); popErr != nil { + return errors.Wrap(popErr, "Error popping for passbackMode") + } + if _passbackModeErr != nil { + return errors.Wrap(_passbackModeErr, "Error serializing 'passbackMode' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataPassbackMode"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataPassbackMode") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataPassbackMode) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataPassbackMode) isBACnetConstructedDataPassbackMode() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataPassbackMode) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPassbackTimeout.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPassbackTimeout.go index da914e44290..5d8e76603dd 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPassbackTimeout.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPassbackTimeout.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataPassbackTimeout is the corresponding interface of BACnetConstructedDataPassbackTimeout type BACnetConstructedDataPassbackTimeout interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataPassbackTimeoutExactly interface { // _BACnetConstructedDataPassbackTimeout is the data-structure of this message type _BACnetConstructedDataPassbackTimeout struct { *_BACnetConstructedData - PassbackTimeout BACnetApplicationTagUnsignedInteger + PassbackTimeout BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataPassbackTimeout) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataPassbackTimeout) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataPassbackTimeout) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PASSBACK_TIMEOUT -} +func (m *_BACnetConstructedDataPassbackTimeout) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PASSBACK_TIMEOUT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataPassbackTimeout) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataPassbackTimeout) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataPassbackTimeout) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataPassbackTimeout) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataPassbackTimeout) GetActualValue() BACnetApplicati /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataPassbackTimeout factory function for _BACnetConstructedDataPassbackTimeout -func NewBACnetConstructedDataPassbackTimeout(passbackTimeout BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataPassbackTimeout { +func NewBACnetConstructedDataPassbackTimeout( passbackTimeout BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataPassbackTimeout { _result := &_BACnetConstructedDataPassbackTimeout{ - PassbackTimeout: passbackTimeout, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PassbackTimeout: passbackTimeout, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataPassbackTimeout(passbackTimeout BACnetApplicationTa // Deprecated: use the interface for direct cast func CastBACnetConstructedDataPassbackTimeout(structType interface{}) BACnetConstructedDataPassbackTimeout { - if casted, ok := structType.(BACnetConstructedDataPassbackTimeout); ok { + if casted, ok := structType.(BACnetConstructedDataPassbackTimeout); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataPassbackTimeout); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataPassbackTimeout) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetConstructedDataPassbackTimeout) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataPassbackTimeoutParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("passbackTimeout"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for passbackTimeout") } - _passbackTimeout, _passbackTimeoutErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_passbackTimeout, _passbackTimeoutErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _passbackTimeoutErr != nil { return nil, errors.Wrap(_passbackTimeoutErr, "Error parsing 'passbackTimeout' field of BACnetConstructedDataPassbackTimeout") } @@ -186,7 +188,7 @@ func BACnetConstructedDataPassbackTimeoutParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetConstructedDataPassbackTimeout{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PassbackTimeout: passbackTimeout, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataPassbackTimeout) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataPassbackTimeout") } - // Simple Field (passbackTimeout) - if pushErr := writeBuffer.PushContext("passbackTimeout"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for passbackTimeout") - } - _passbackTimeoutErr := writeBuffer.WriteSerializable(ctx, m.GetPassbackTimeout()) - if popErr := writeBuffer.PopContext("passbackTimeout"); popErr != nil { - return errors.Wrap(popErr, "Error popping for passbackTimeout") - } - if _passbackTimeoutErr != nil { - return errors.Wrap(_passbackTimeoutErr, "Error serializing 'passbackTimeout' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (passbackTimeout) + if pushErr := writeBuffer.PushContext("passbackTimeout"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for passbackTimeout") + } + _passbackTimeoutErr := writeBuffer.WriteSerializable(ctx, m.GetPassbackTimeout()) + if popErr := writeBuffer.PopContext("passbackTimeout"); popErr != nil { + return errors.Wrap(popErr, "Error popping for passbackTimeout") + } + if _passbackTimeoutErr != nil { + return errors.Wrap(_passbackTimeoutErr, "Error serializing 'passbackTimeout' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataPassbackTimeout"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataPassbackTimeout") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataPassbackTimeout) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataPassbackTimeout) isBACnetConstructedDataPassbackTimeout() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataPassbackTimeout) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPassengerAlarm.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPassengerAlarm.go index c32d7e8bfa3..db7ee69ac9d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPassengerAlarm.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPassengerAlarm.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataPassengerAlarm is the corresponding interface of BACnetConstructedDataPassengerAlarm type BACnetConstructedDataPassengerAlarm interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataPassengerAlarmExactly interface { // _BACnetConstructedDataPassengerAlarm is the data-structure of this message type _BACnetConstructedDataPassengerAlarm struct { *_BACnetConstructedData - PassengerAlarm BACnetApplicationTagBoolean + PassengerAlarm BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataPassengerAlarm) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataPassengerAlarm) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataPassengerAlarm) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PASSENGER_ALARM -} +func (m *_BACnetConstructedDataPassengerAlarm) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PASSENGER_ALARM} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataPassengerAlarm) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataPassengerAlarm) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataPassengerAlarm) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataPassengerAlarm) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataPassengerAlarm) GetActualValue() BACnetApplicatio /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataPassengerAlarm factory function for _BACnetConstructedDataPassengerAlarm -func NewBACnetConstructedDataPassengerAlarm(passengerAlarm BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataPassengerAlarm { +func NewBACnetConstructedDataPassengerAlarm( passengerAlarm BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataPassengerAlarm { _result := &_BACnetConstructedDataPassengerAlarm{ - PassengerAlarm: passengerAlarm, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PassengerAlarm: passengerAlarm, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataPassengerAlarm(passengerAlarm BACnetApplicationTagB // Deprecated: use the interface for direct cast func CastBACnetConstructedDataPassengerAlarm(structType interface{}) BACnetConstructedDataPassengerAlarm { - if casted, ok := structType.(BACnetConstructedDataPassengerAlarm); ok { + if casted, ok := structType.(BACnetConstructedDataPassengerAlarm); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataPassengerAlarm); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataPassengerAlarm) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConstructedDataPassengerAlarm) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataPassengerAlarmParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("passengerAlarm"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for passengerAlarm") } - _passengerAlarm, _passengerAlarmErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_passengerAlarm, _passengerAlarmErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _passengerAlarmErr != nil { return nil, errors.Wrap(_passengerAlarmErr, "Error parsing 'passengerAlarm' field of BACnetConstructedDataPassengerAlarm") } @@ -186,7 +188,7 @@ func BACnetConstructedDataPassengerAlarmParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetConstructedDataPassengerAlarm{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PassengerAlarm: passengerAlarm, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataPassengerAlarm) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataPassengerAlarm") } - // Simple Field (passengerAlarm) - if pushErr := writeBuffer.PushContext("passengerAlarm"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for passengerAlarm") - } - _passengerAlarmErr := writeBuffer.WriteSerializable(ctx, m.GetPassengerAlarm()) - if popErr := writeBuffer.PopContext("passengerAlarm"); popErr != nil { - return errors.Wrap(popErr, "Error popping for passengerAlarm") - } - if _passengerAlarmErr != nil { - return errors.Wrap(_passengerAlarmErr, "Error serializing 'passengerAlarm' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (passengerAlarm) + if pushErr := writeBuffer.PushContext("passengerAlarm"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for passengerAlarm") + } + _passengerAlarmErr := writeBuffer.WriteSerializable(ctx, m.GetPassengerAlarm()) + if popErr := writeBuffer.PopContext("passengerAlarm"); popErr != nil { + return errors.Wrap(popErr, "Error popping for passengerAlarm") + } + if _passengerAlarmErr != nil { + return errors.Wrap(_passengerAlarmErr, "Error serializing 'passengerAlarm' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataPassengerAlarm"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataPassengerAlarm") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataPassengerAlarm) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataPassengerAlarm) isBACnetConstructedDataPassengerAlarm() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataPassengerAlarm) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPolarity.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPolarity.go index f0147b38855..c0fd2da8073 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPolarity.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPolarity.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataPolarity is the corresponding interface of BACnetConstructedDataPolarity type BACnetConstructedDataPolarity interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataPolarityExactly interface { // _BACnetConstructedDataPolarity is the data-structure of this message type _BACnetConstructedDataPolarity struct { *_BACnetConstructedData - Polarity BACnetPolarityTagged + Polarity BACnetPolarityTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataPolarity) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataPolarity) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataPolarity) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_POLARITY -} +func (m *_BACnetConstructedDataPolarity) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_POLARITY} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataPolarity) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataPolarity) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataPolarity) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataPolarity) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataPolarity) GetActualValue() BACnetPolarityTagged { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataPolarity factory function for _BACnetConstructedDataPolarity -func NewBACnetConstructedDataPolarity(polarity BACnetPolarityTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataPolarity { +func NewBACnetConstructedDataPolarity( polarity BACnetPolarityTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataPolarity { _result := &_BACnetConstructedDataPolarity{ - Polarity: polarity, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Polarity: polarity, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataPolarity(polarity BACnetPolarityTagged, openingTag // Deprecated: use the interface for direct cast func CastBACnetConstructedDataPolarity(structType interface{}) BACnetConstructedDataPolarity { - if casted, ok := structType.(BACnetConstructedDataPolarity); ok { + if casted, ok := structType.(BACnetConstructedDataPolarity); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataPolarity); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataPolarity) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetConstructedDataPolarity) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataPolarityParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("polarity"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for polarity") } - _polarity, _polarityErr := BACnetPolarityTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_polarity, _polarityErr := BACnetPolarityTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _polarityErr != nil { return nil, errors.Wrap(_polarityErr, "Error parsing 'polarity' field of BACnetConstructedDataPolarity") } @@ -186,7 +188,7 @@ func BACnetConstructedDataPolarityParseWithBuffer(ctx context.Context, readBuffe // Create a partially initialized instance _child := &_BACnetConstructedDataPolarity{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Polarity: polarity, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataPolarity) SerializeWithWriteBuffer(ctx context.Co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataPolarity") } - // Simple Field (polarity) - if pushErr := writeBuffer.PushContext("polarity"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for polarity") - } - _polarityErr := writeBuffer.WriteSerializable(ctx, m.GetPolarity()) - if popErr := writeBuffer.PopContext("polarity"); popErr != nil { - return errors.Wrap(popErr, "Error popping for polarity") - } - if _polarityErr != nil { - return errors.Wrap(_polarityErr, "Error serializing 'polarity' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (polarity) + if pushErr := writeBuffer.PushContext("polarity"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for polarity") + } + _polarityErr := writeBuffer.WriteSerializable(ctx, m.GetPolarity()) + if popErr := writeBuffer.PopContext("polarity"); popErr != nil { + return errors.Wrap(popErr, "Error popping for polarity") + } + if _polarityErr != nil { + return errors.Wrap(_polarityErr, "Error serializing 'polarity' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataPolarity"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataPolarity") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataPolarity) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataPolarity) isBACnetConstructedDataPolarity() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataPolarity) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPortFilter.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPortFilter.go index 3ee28d04087..958b007807a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPortFilter.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPortFilter.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataPortFilter is the corresponding interface of BACnetConstructedDataPortFilter type BACnetConstructedDataPortFilter interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataPortFilterExactly interface { // _BACnetConstructedDataPortFilter is the data-structure of this message type _BACnetConstructedDataPortFilter struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - PortFilter []BACnetPortPermission + NumberOfDataElements BACnetApplicationTagUnsignedInteger + PortFilter []BACnetPortPermission } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataPortFilter) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataPortFilter) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataPortFilter) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PORT_FILTER -} +func (m *_BACnetConstructedDataPortFilter) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PORT_FILTER} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataPortFilter) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataPortFilter) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataPortFilter) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataPortFilter) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataPortFilter) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataPortFilter factory function for _BACnetConstructedDataPortFilter -func NewBACnetConstructedDataPortFilter(numberOfDataElements BACnetApplicationTagUnsignedInteger, portFilter []BACnetPortPermission, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataPortFilter { +func NewBACnetConstructedDataPortFilter( numberOfDataElements BACnetApplicationTagUnsignedInteger , portFilter []BACnetPortPermission , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataPortFilter { _result := &_BACnetConstructedDataPortFilter{ - NumberOfDataElements: numberOfDataElements, - PortFilter: portFilter, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + PortFilter: portFilter, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataPortFilter(numberOfDataElements BACnetApplicationTa // Deprecated: use the interface for direct cast func CastBACnetConstructedDataPortFilter(structType interface{}) BACnetConstructedDataPortFilter { - if casted, ok := structType.(BACnetConstructedDataPortFilter); ok { + if casted, ok := structType.(BACnetConstructedDataPortFilter); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataPortFilter); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataPortFilter) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataPortFilter) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataPortFilterParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataPortFilterParseWithBuffer(ctx context.Context, readBuf // Terminated array var portFilter []BACnetPortPermission { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetPortPermissionParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetPortPermissionParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'portFilter' field of BACnetConstructedDataPortFilter") } @@ -235,11 +237,11 @@ func BACnetConstructedDataPortFilterParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetConstructedDataPortFilter{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - PortFilter: portFilter, + PortFilter: portFilter, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataPortFilter) SerializeWithWriteBuffer(ctx context. if pushErr := writeBuffer.PushContext("BACnetConstructedDataPortFilter"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataPortFilter") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (portFilter) - if pushErr := writeBuffer.PushContext("portFilter", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for portFilter") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetPortFilter() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetPortFilter()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'portFilter' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("portFilter", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for portFilter") + } + + // Array Field (portFilter) + if pushErr := writeBuffer.PushContext("portFilter", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for portFilter") + } + for _curItem, _element := range m.GetPortFilter() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetPortFilter()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'portFilter' field") } + } + if popErr := writeBuffer.PopContext("portFilter", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for portFilter") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataPortFilter"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataPortFilter") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataPortFilter) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataPortFilter) isBACnetConstructedDataPortFilter() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataPortFilter) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveAccessRules.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveAccessRules.go index f1db3ccdd20..65b08286173 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveAccessRules.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveAccessRules.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataPositiveAccessRules is the corresponding interface of BACnetConstructedDataPositiveAccessRules type BACnetConstructedDataPositiveAccessRules interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataPositiveAccessRulesExactly interface { // _BACnetConstructedDataPositiveAccessRules is the data-structure of this message type _BACnetConstructedDataPositiveAccessRules struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - PositiveAccessRules []BACnetAccessRule + NumberOfDataElements BACnetApplicationTagUnsignedInteger + PositiveAccessRules []BACnetAccessRule } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataPositiveAccessRules) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataPositiveAccessRules) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataPositiveAccessRules) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_POSITIVE_ACCESS_RULES -} +func (m *_BACnetConstructedDataPositiveAccessRules) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_POSITIVE_ACCESS_RULES} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataPositiveAccessRules) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataPositiveAccessRules) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataPositiveAccessRules) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataPositiveAccessRules) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataPositiveAccessRules) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataPositiveAccessRules factory function for _BACnetConstructedDataPositiveAccessRules -func NewBACnetConstructedDataPositiveAccessRules(numberOfDataElements BACnetApplicationTagUnsignedInteger, positiveAccessRules []BACnetAccessRule, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataPositiveAccessRules { +func NewBACnetConstructedDataPositiveAccessRules( numberOfDataElements BACnetApplicationTagUnsignedInteger , positiveAccessRules []BACnetAccessRule , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataPositiveAccessRules { _result := &_BACnetConstructedDataPositiveAccessRules{ - NumberOfDataElements: numberOfDataElements, - PositiveAccessRules: positiveAccessRules, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + PositiveAccessRules: positiveAccessRules, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataPositiveAccessRules(numberOfDataElements BACnetAppl // Deprecated: use the interface for direct cast func CastBACnetConstructedDataPositiveAccessRules(structType interface{}) BACnetConstructedDataPositiveAccessRules { - if casted, ok := structType.(BACnetConstructedDataPositiveAccessRules); ok { + if casted, ok := structType.(BACnetConstructedDataPositiveAccessRules); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataPositiveAccessRules); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataPositiveAccessRules) GetLengthInBits(ctx context. return lengthInBits } + func (m *_BACnetConstructedDataPositiveAccessRules) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataPositiveAccessRulesParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataPositiveAccessRulesParseWithBuffer(ctx context.Context // Terminated array var positiveAccessRules []BACnetAccessRule { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetAccessRuleParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetAccessRuleParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'positiveAccessRules' field of BACnetConstructedDataPositiveAccessRules") } @@ -235,11 +237,11 @@ func BACnetConstructedDataPositiveAccessRulesParseWithBuffer(ctx context.Context // Create a partially initialized instance _child := &_BACnetConstructedDataPositiveAccessRules{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - PositiveAccessRules: positiveAccessRules, + PositiveAccessRules: positiveAccessRules, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataPositiveAccessRules) SerializeWithWriteBuffer(ctx if pushErr := writeBuffer.PushContext("BACnetConstructedDataPositiveAccessRules"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataPositiveAccessRules") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (positiveAccessRules) - if pushErr := writeBuffer.PushContext("positiveAccessRules", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for positiveAccessRules") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetPositiveAccessRules() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetPositiveAccessRules()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'positiveAccessRules' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("positiveAccessRules", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for positiveAccessRules") + } + + // Array Field (positiveAccessRules) + if pushErr := writeBuffer.PushContext("positiveAccessRules", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for positiveAccessRules") + } + for _curItem, _element := range m.GetPositiveAccessRules() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetPositiveAccessRules()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'positiveAccessRules' field") } + } + if popErr := writeBuffer.PopContext("positiveAccessRules", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for positiveAccessRules") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataPositiveAccessRules"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataPositiveAccessRules") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataPositiveAccessRules) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataPositiveAccessRules) isBACnetConstructedDataPositiveAccessRules() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataPositiveAccessRules) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueAll.go index cc960fb439a..0f1578b752d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataPositiveIntegerValueAll is the corresponding interface of BACnetConstructedDataPositiveIntegerValueAll type BACnetConstructedDataPositiveIntegerValueAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataPositiveIntegerValueAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataPositiveIntegerValueAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_POSITIVE_INTEGER_VALUE -} +func (m *_BACnetConstructedDataPositiveIntegerValueAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_POSITIVE_INTEGER_VALUE} -func (m *_BACnetConstructedDataPositiveIntegerValueAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataPositiveIntegerValueAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataPositiveIntegerValueAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataPositiveIntegerValueAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataPositiveIntegerValueAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataPositiveIntegerValueAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataPositiveIntegerValueAll factory function for _BACnetConstructedDataPositiveIntegerValueAll -func NewBACnetConstructedDataPositiveIntegerValueAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataPositiveIntegerValueAll { +func NewBACnetConstructedDataPositiveIntegerValueAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataPositiveIntegerValueAll { _result := &_BACnetConstructedDataPositiveIntegerValueAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataPositiveIntegerValueAll(openingTag BACnetOpeningTag // Deprecated: use the interface for direct cast func CastBACnetConstructedDataPositiveIntegerValueAll(structType interface{}) BACnetConstructedDataPositiveIntegerValueAll { - if casted, ok := structType.(BACnetConstructedDataPositiveIntegerValueAll); ok { + if casted, ok := structType.(BACnetConstructedDataPositiveIntegerValueAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataPositiveIntegerValueAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataPositiveIntegerValueAll) GetLengthInBits(ctx cont return lengthInBits } + func (m *_BACnetConstructedDataPositiveIntegerValueAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataPositiveIntegerValueAllParseWithBuffer(ctx context.Con _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataPositiveIntegerValueAllParseWithBuffer(ctx context.Con // Create a partially initialized instance _child := &_BACnetConstructedDataPositiveIntegerValueAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataPositiveIntegerValueAll) SerializeWithWriteBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataPositiveIntegerValueAll) isBACnetConstructedDataPositiveIntegerValueAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataPositiveIntegerValueAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueCOVIncrement.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueCOVIncrement.go index fa1612d6d9b..cd555e5c2aa 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueCOVIncrement.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueCOVIncrement.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataPositiveIntegerValueCOVIncrement is the corresponding interface of BACnetConstructedDataPositiveIntegerValueCOVIncrement type BACnetConstructedDataPositiveIntegerValueCOVIncrement interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataPositiveIntegerValueCOVIncrementExactly interface { // _BACnetConstructedDataPositiveIntegerValueCOVIncrement is the data-structure of this message type _BACnetConstructedDataPositiveIntegerValueCOVIncrement struct { *_BACnetConstructedData - CovIncrement BACnetApplicationTagUnsignedInteger + CovIncrement BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataPositiveIntegerValueCOVIncrement) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_POSITIVE_INTEGER_VALUE -} +func (m *_BACnetConstructedDataPositiveIntegerValueCOVIncrement) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_POSITIVE_INTEGER_VALUE} -func (m *_BACnetConstructedDataPositiveIntegerValueCOVIncrement) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_COV_INCREMENT -} +func (m *_BACnetConstructedDataPositiveIntegerValueCOVIncrement) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_COV_INCREMENT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataPositiveIntegerValueCOVIncrement) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataPositiveIntegerValueCOVIncrement) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataPositiveIntegerValueCOVIncrement) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataPositiveIntegerValueCOVIncrement) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataPositiveIntegerValueCOVIncrement) GetActualValue( /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataPositiveIntegerValueCOVIncrement factory function for _BACnetConstructedDataPositiveIntegerValueCOVIncrement -func NewBACnetConstructedDataPositiveIntegerValueCOVIncrement(covIncrement BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataPositiveIntegerValueCOVIncrement { +func NewBACnetConstructedDataPositiveIntegerValueCOVIncrement( covIncrement BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataPositiveIntegerValueCOVIncrement { _result := &_BACnetConstructedDataPositiveIntegerValueCOVIncrement{ - CovIncrement: covIncrement, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + CovIncrement: covIncrement, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataPositiveIntegerValueCOVIncrement(covIncrement BACne // Deprecated: use the interface for direct cast func CastBACnetConstructedDataPositiveIntegerValueCOVIncrement(structType interface{}) BACnetConstructedDataPositiveIntegerValueCOVIncrement { - if casted, ok := structType.(BACnetConstructedDataPositiveIntegerValueCOVIncrement); ok { + if casted, ok := structType.(BACnetConstructedDataPositiveIntegerValueCOVIncrement); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataPositiveIntegerValueCOVIncrement); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataPositiveIntegerValueCOVIncrement) GetLengthInBits return lengthInBits } + func (m *_BACnetConstructedDataPositiveIntegerValueCOVIncrement) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataPositiveIntegerValueCOVIncrementParseWithBuffer(ctx co if pullErr := readBuffer.PullContext("covIncrement"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for covIncrement") } - _covIncrement, _covIncrementErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_covIncrement, _covIncrementErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _covIncrementErr != nil { return nil, errors.Wrap(_covIncrementErr, "Error parsing 'covIncrement' field of BACnetConstructedDataPositiveIntegerValueCOVIncrement") } @@ -186,7 +188,7 @@ func BACnetConstructedDataPositiveIntegerValueCOVIncrementParseWithBuffer(ctx co // Create a partially initialized instance _child := &_BACnetConstructedDataPositiveIntegerValueCOVIncrement{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, CovIncrement: covIncrement, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataPositiveIntegerValueCOVIncrement) SerializeWithWr return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataPositiveIntegerValueCOVIncrement") } - // Simple Field (covIncrement) - if pushErr := writeBuffer.PushContext("covIncrement"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for covIncrement") - } - _covIncrementErr := writeBuffer.WriteSerializable(ctx, m.GetCovIncrement()) - if popErr := writeBuffer.PopContext("covIncrement"); popErr != nil { - return errors.Wrap(popErr, "Error popping for covIncrement") - } - if _covIncrementErr != nil { - return errors.Wrap(_covIncrementErr, "Error serializing 'covIncrement' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (covIncrement) + if pushErr := writeBuffer.PushContext("covIncrement"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for covIncrement") + } + _covIncrementErr := writeBuffer.WriteSerializable(ctx, m.GetCovIncrement()) + if popErr := writeBuffer.PopContext("covIncrement"); popErr != nil { + return errors.Wrap(popErr, "Error popping for covIncrement") + } + if _covIncrementErr != nil { + return errors.Wrap(_covIncrementErr, "Error serializing 'covIncrement' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataPositiveIntegerValueCOVIncrement"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataPositiveIntegerValueCOVIncrement") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataPositiveIntegerValueCOVIncrement) SerializeWithWr return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataPositiveIntegerValueCOVIncrement) isBACnetConstructedDataPositiveIntegerValueCOVIncrement() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataPositiveIntegerValueCOVIncrement) String() string } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueDeadband.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueDeadband.go index f1105f6663f..fd226f098d3 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueDeadband.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueDeadband.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataPositiveIntegerValueDeadband is the corresponding interface of BACnetConstructedDataPositiveIntegerValueDeadband type BACnetConstructedDataPositiveIntegerValueDeadband interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataPositiveIntegerValueDeadbandExactly interface { // _BACnetConstructedDataPositiveIntegerValueDeadband is the data-structure of this message type _BACnetConstructedDataPositiveIntegerValueDeadband struct { *_BACnetConstructedData - Deadband BACnetApplicationTagUnsignedInteger + Deadband BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataPositiveIntegerValueDeadband) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_POSITIVE_INTEGER_VALUE -} +func (m *_BACnetConstructedDataPositiveIntegerValueDeadband) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_POSITIVE_INTEGER_VALUE} -func (m *_BACnetConstructedDataPositiveIntegerValueDeadband) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_DEADBAND -} +func (m *_BACnetConstructedDataPositiveIntegerValueDeadband) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_DEADBAND} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataPositiveIntegerValueDeadband) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataPositiveIntegerValueDeadband) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataPositiveIntegerValueDeadband) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataPositiveIntegerValueDeadband) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataPositiveIntegerValueDeadband) GetActualValue() BA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataPositiveIntegerValueDeadband factory function for _BACnetConstructedDataPositiveIntegerValueDeadband -func NewBACnetConstructedDataPositiveIntegerValueDeadband(deadband BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataPositiveIntegerValueDeadband { +func NewBACnetConstructedDataPositiveIntegerValueDeadband( deadband BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataPositiveIntegerValueDeadband { _result := &_BACnetConstructedDataPositiveIntegerValueDeadband{ - Deadband: deadband, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Deadband: deadband, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataPositiveIntegerValueDeadband(deadband BACnetApplica // Deprecated: use the interface for direct cast func CastBACnetConstructedDataPositiveIntegerValueDeadband(structType interface{}) BACnetConstructedDataPositiveIntegerValueDeadband { - if casted, ok := structType.(BACnetConstructedDataPositiveIntegerValueDeadband); ok { + if casted, ok := structType.(BACnetConstructedDataPositiveIntegerValueDeadband); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataPositiveIntegerValueDeadband); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataPositiveIntegerValueDeadband) GetLengthInBits(ctx return lengthInBits } + func (m *_BACnetConstructedDataPositiveIntegerValueDeadband) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataPositiveIntegerValueDeadbandParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("deadband"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for deadband") } - _deadband, _deadbandErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_deadband, _deadbandErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _deadbandErr != nil { return nil, errors.Wrap(_deadbandErr, "Error parsing 'deadband' field of BACnetConstructedDataPositiveIntegerValueDeadband") } @@ -186,7 +188,7 @@ func BACnetConstructedDataPositiveIntegerValueDeadbandParseWithBuffer(ctx contex // Create a partially initialized instance _child := &_BACnetConstructedDataPositiveIntegerValueDeadband{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Deadband: deadband, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataPositiveIntegerValueDeadband) SerializeWithWriteB return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataPositiveIntegerValueDeadband") } - // Simple Field (deadband) - if pushErr := writeBuffer.PushContext("deadband"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for deadband") - } - _deadbandErr := writeBuffer.WriteSerializable(ctx, m.GetDeadband()) - if popErr := writeBuffer.PopContext("deadband"); popErr != nil { - return errors.Wrap(popErr, "Error popping for deadband") - } - if _deadbandErr != nil { - return errors.Wrap(_deadbandErr, "Error serializing 'deadband' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (deadband) + if pushErr := writeBuffer.PushContext("deadband"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for deadband") + } + _deadbandErr := writeBuffer.WriteSerializable(ctx, m.GetDeadband()) + if popErr := writeBuffer.PopContext("deadband"); popErr != nil { + return errors.Wrap(popErr, "Error popping for deadband") + } + if _deadbandErr != nil { + return errors.Wrap(_deadbandErr, "Error serializing 'deadband' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataPositiveIntegerValueDeadband"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataPositiveIntegerValueDeadband") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataPositiveIntegerValueDeadband) SerializeWithWriteB return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataPositiveIntegerValueDeadband) isBACnetConstructedDataPositiveIntegerValueDeadband() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataPositiveIntegerValueDeadband) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueFaultHighLimit.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueFaultHighLimit.go index 180be5466c8..3e76c3e632d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueFaultHighLimit.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueFaultHighLimit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataPositiveIntegerValueFaultHighLimit is the corresponding interface of BACnetConstructedDataPositiveIntegerValueFaultHighLimit type BACnetConstructedDataPositiveIntegerValueFaultHighLimit interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataPositiveIntegerValueFaultHighLimitExactly interface { // _BACnetConstructedDataPositiveIntegerValueFaultHighLimit is the data-structure of this message type _BACnetConstructedDataPositiveIntegerValueFaultHighLimit struct { *_BACnetConstructedData - FaultHighLimit BACnetApplicationTagUnsignedInteger + FaultHighLimit BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataPositiveIntegerValueFaultHighLimit) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_POSITIVE_INTEGER_VALUE -} +func (m *_BACnetConstructedDataPositiveIntegerValueFaultHighLimit) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_POSITIVE_INTEGER_VALUE} -func (m *_BACnetConstructedDataPositiveIntegerValueFaultHighLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FAULT_HIGH_LIMIT -} +func (m *_BACnetConstructedDataPositiveIntegerValueFaultHighLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FAULT_HIGH_LIMIT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataPositiveIntegerValueFaultHighLimit) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataPositiveIntegerValueFaultHighLimit) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataPositiveIntegerValueFaultHighLimit) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataPositiveIntegerValueFaultHighLimit) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataPositiveIntegerValueFaultHighLimit) GetActualValu /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataPositiveIntegerValueFaultHighLimit factory function for _BACnetConstructedDataPositiveIntegerValueFaultHighLimit -func NewBACnetConstructedDataPositiveIntegerValueFaultHighLimit(faultHighLimit BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataPositiveIntegerValueFaultHighLimit { +func NewBACnetConstructedDataPositiveIntegerValueFaultHighLimit( faultHighLimit BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataPositiveIntegerValueFaultHighLimit { _result := &_BACnetConstructedDataPositiveIntegerValueFaultHighLimit{ - FaultHighLimit: faultHighLimit, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + FaultHighLimit: faultHighLimit, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataPositiveIntegerValueFaultHighLimit(faultHighLimit B // Deprecated: use the interface for direct cast func CastBACnetConstructedDataPositiveIntegerValueFaultHighLimit(structType interface{}) BACnetConstructedDataPositiveIntegerValueFaultHighLimit { - if casted, ok := structType.(BACnetConstructedDataPositiveIntegerValueFaultHighLimit); ok { + if casted, ok := structType.(BACnetConstructedDataPositiveIntegerValueFaultHighLimit); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataPositiveIntegerValueFaultHighLimit); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataPositiveIntegerValueFaultHighLimit) GetLengthInBi return lengthInBits } + func (m *_BACnetConstructedDataPositiveIntegerValueFaultHighLimit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataPositiveIntegerValueFaultHighLimitParseWithBuffer(ctx if pullErr := readBuffer.PullContext("faultHighLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for faultHighLimit") } - _faultHighLimit, _faultHighLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_faultHighLimit, _faultHighLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _faultHighLimitErr != nil { return nil, errors.Wrap(_faultHighLimitErr, "Error parsing 'faultHighLimit' field of BACnetConstructedDataPositiveIntegerValueFaultHighLimit") } @@ -186,7 +188,7 @@ func BACnetConstructedDataPositiveIntegerValueFaultHighLimitParseWithBuffer(ctx // Create a partially initialized instance _child := &_BACnetConstructedDataPositiveIntegerValueFaultHighLimit{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FaultHighLimit: faultHighLimit, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataPositiveIntegerValueFaultHighLimit) SerializeWith return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataPositiveIntegerValueFaultHighLimit") } - // Simple Field (faultHighLimit) - if pushErr := writeBuffer.PushContext("faultHighLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for faultHighLimit") - } - _faultHighLimitErr := writeBuffer.WriteSerializable(ctx, m.GetFaultHighLimit()) - if popErr := writeBuffer.PopContext("faultHighLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for faultHighLimit") - } - if _faultHighLimitErr != nil { - return errors.Wrap(_faultHighLimitErr, "Error serializing 'faultHighLimit' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (faultHighLimit) + if pushErr := writeBuffer.PushContext("faultHighLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for faultHighLimit") + } + _faultHighLimitErr := writeBuffer.WriteSerializable(ctx, m.GetFaultHighLimit()) + if popErr := writeBuffer.PopContext("faultHighLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for faultHighLimit") + } + if _faultHighLimitErr != nil { + return errors.Wrap(_faultHighLimitErr, "Error serializing 'faultHighLimit' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataPositiveIntegerValueFaultHighLimit"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataPositiveIntegerValueFaultHighLimit") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataPositiveIntegerValueFaultHighLimit) SerializeWith return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataPositiveIntegerValueFaultHighLimit) isBACnetConstructedDataPositiveIntegerValueFaultHighLimit() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataPositiveIntegerValueFaultHighLimit) String() stri } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueFaultLowLimit.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueFaultLowLimit.go index 2461411b9f4..2c72915d8a0 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueFaultLowLimit.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueFaultLowLimit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataPositiveIntegerValueFaultLowLimit is the corresponding interface of BACnetConstructedDataPositiveIntegerValueFaultLowLimit type BACnetConstructedDataPositiveIntegerValueFaultLowLimit interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataPositiveIntegerValueFaultLowLimitExactly interface { // _BACnetConstructedDataPositiveIntegerValueFaultLowLimit is the data-structure of this message type _BACnetConstructedDataPositiveIntegerValueFaultLowLimit struct { *_BACnetConstructedData - FaultLowLimit BACnetApplicationTagUnsignedInteger + FaultLowLimit BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataPositiveIntegerValueFaultLowLimit) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_POSITIVE_INTEGER_VALUE -} +func (m *_BACnetConstructedDataPositiveIntegerValueFaultLowLimit) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_POSITIVE_INTEGER_VALUE} -func (m *_BACnetConstructedDataPositiveIntegerValueFaultLowLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_FAULT_LOW_LIMIT -} +func (m *_BACnetConstructedDataPositiveIntegerValueFaultLowLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_FAULT_LOW_LIMIT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataPositiveIntegerValueFaultLowLimit) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataPositiveIntegerValueFaultLowLimit) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataPositiveIntegerValueFaultLowLimit) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataPositiveIntegerValueFaultLowLimit) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataPositiveIntegerValueFaultLowLimit) GetActualValue /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataPositiveIntegerValueFaultLowLimit factory function for _BACnetConstructedDataPositiveIntegerValueFaultLowLimit -func NewBACnetConstructedDataPositiveIntegerValueFaultLowLimit(faultLowLimit BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataPositiveIntegerValueFaultLowLimit { +func NewBACnetConstructedDataPositiveIntegerValueFaultLowLimit( faultLowLimit BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataPositiveIntegerValueFaultLowLimit { _result := &_BACnetConstructedDataPositiveIntegerValueFaultLowLimit{ - FaultLowLimit: faultLowLimit, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + FaultLowLimit: faultLowLimit, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataPositiveIntegerValueFaultLowLimit(faultLowLimit BAC // Deprecated: use the interface for direct cast func CastBACnetConstructedDataPositiveIntegerValueFaultLowLimit(structType interface{}) BACnetConstructedDataPositiveIntegerValueFaultLowLimit { - if casted, ok := structType.(BACnetConstructedDataPositiveIntegerValueFaultLowLimit); ok { + if casted, ok := structType.(BACnetConstructedDataPositiveIntegerValueFaultLowLimit); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataPositiveIntegerValueFaultLowLimit); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataPositiveIntegerValueFaultLowLimit) GetLengthInBit return lengthInBits } + func (m *_BACnetConstructedDataPositiveIntegerValueFaultLowLimit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataPositiveIntegerValueFaultLowLimitParseWithBuffer(ctx c if pullErr := readBuffer.PullContext("faultLowLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for faultLowLimit") } - _faultLowLimit, _faultLowLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_faultLowLimit, _faultLowLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _faultLowLimitErr != nil { return nil, errors.Wrap(_faultLowLimitErr, "Error parsing 'faultLowLimit' field of BACnetConstructedDataPositiveIntegerValueFaultLowLimit") } @@ -186,7 +188,7 @@ func BACnetConstructedDataPositiveIntegerValueFaultLowLimitParseWithBuffer(ctx c // Create a partially initialized instance _child := &_BACnetConstructedDataPositiveIntegerValueFaultLowLimit{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FaultLowLimit: faultLowLimit, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataPositiveIntegerValueFaultLowLimit) SerializeWithW return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataPositiveIntegerValueFaultLowLimit") } - // Simple Field (faultLowLimit) - if pushErr := writeBuffer.PushContext("faultLowLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for faultLowLimit") - } - _faultLowLimitErr := writeBuffer.WriteSerializable(ctx, m.GetFaultLowLimit()) - if popErr := writeBuffer.PopContext("faultLowLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for faultLowLimit") - } - if _faultLowLimitErr != nil { - return errors.Wrap(_faultLowLimitErr, "Error serializing 'faultLowLimit' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (faultLowLimit) + if pushErr := writeBuffer.PushContext("faultLowLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for faultLowLimit") + } + _faultLowLimitErr := writeBuffer.WriteSerializable(ctx, m.GetFaultLowLimit()) + if popErr := writeBuffer.PopContext("faultLowLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for faultLowLimit") + } + if _faultLowLimitErr != nil { + return errors.Wrap(_faultLowLimitErr, "Error serializing 'faultLowLimit' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataPositiveIntegerValueFaultLowLimit"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataPositiveIntegerValueFaultLowLimit") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataPositiveIntegerValueFaultLowLimit) SerializeWithW return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataPositiveIntegerValueFaultLowLimit) isBACnetConstructedDataPositiveIntegerValueFaultLowLimit() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataPositiveIntegerValueFaultLowLimit) String() strin } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueHighLimit.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueHighLimit.go index 3b83649032d..5024be3ee21 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueHighLimit.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueHighLimit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataPositiveIntegerValueHighLimit is the corresponding interface of BACnetConstructedDataPositiveIntegerValueHighLimit type BACnetConstructedDataPositiveIntegerValueHighLimit interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataPositiveIntegerValueHighLimitExactly interface { // _BACnetConstructedDataPositiveIntegerValueHighLimit is the data-structure of this message type _BACnetConstructedDataPositiveIntegerValueHighLimit struct { *_BACnetConstructedData - HighLimit BACnetApplicationTagUnsignedInteger + HighLimit BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataPositiveIntegerValueHighLimit) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_POSITIVE_INTEGER_VALUE -} +func (m *_BACnetConstructedDataPositiveIntegerValueHighLimit) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_POSITIVE_INTEGER_VALUE} -func (m *_BACnetConstructedDataPositiveIntegerValueHighLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_HIGH_LIMIT -} +func (m *_BACnetConstructedDataPositiveIntegerValueHighLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_HIGH_LIMIT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataPositiveIntegerValueHighLimit) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataPositiveIntegerValueHighLimit) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataPositiveIntegerValueHighLimit) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataPositiveIntegerValueHighLimit) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataPositiveIntegerValueHighLimit) GetActualValue() B /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataPositiveIntegerValueHighLimit factory function for _BACnetConstructedDataPositiveIntegerValueHighLimit -func NewBACnetConstructedDataPositiveIntegerValueHighLimit(highLimit BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataPositiveIntegerValueHighLimit { +func NewBACnetConstructedDataPositiveIntegerValueHighLimit( highLimit BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataPositiveIntegerValueHighLimit { _result := &_BACnetConstructedDataPositiveIntegerValueHighLimit{ - HighLimit: highLimit, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + HighLimit: highLimit, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataPositiveIntegerValueHighLimit(highLimit BACnetAppli // Deprecated: use the interface for direct cast func CastBACnetConstructedDataPositiveIntegerValueHighLimit(structType interface{}) BACnetConstructedDataPositiveIntegerValueHighLimit { - if casted, ok := structType.(BACnetConstructedDataPositiveIntegerValueHighLimit); ok { + if casted, ok := structType.(BACnetConstructedDataPositiveIntegerValueHighLimit); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataPositiveIntegerValueHighLimit); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataPositiveIntegerValueHighLimit) GetLengthInBits(ct return lengthInBits } + func (m *_BACnetConstructedDataPositiveIntegerValueHighLimit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataPositiveIntegerValueHighLimitParseWithBuffer(ctx conte if pullErr := readBuffer.PullContext("highLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for highLimit") } - _highLimit, _highLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_highLimit, _highLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _highLimitErr != nil { return nil, errors.Wrap(_highLimitErr, "Error parsing 'highLimit' field of BACnetConstructedDataPositiveIntegerValueHighLimit") } @@ -186,7 +188,7 @@ func BACnetConstructedDataPositiveIntegerValueHighLimitParseWithBuffer(ctx conte // Create a partially initialized instance _child := &_BACnetConstructedDataPositiveIntegerValueHighLimit{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, HighLimit: highLimit, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataPositiveIntegerValueHighLimit) SerializeWithWrite return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataPositiveIntegerValueHighLimit") } - // Simple Field (highLimit) - if pushErr := writeBuffer.PushContext("highLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for highLimit") - } - _highLimitErr := writeBuffer.WriteSerializable(ctx, m.GetHighLimit()) - if popErr := writeBuffer.PopContext("highLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for highLimit") - } - if _highLimitErr != nil { - return errors.Wrap(_highLimitErr, "Error serializing 'highLimit' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (highLimit) + if pushErr := writeBuffer.PushContext("highLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for highLimit") + } + _highLimitErr := writeBuffer.WriteSerializable(ctx, m.GetHighLimit()) + if popErr := writeBuffer.PopContext("highLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for highLimit") + } + if _highLimitErr != nil { + return errors.Wrap(_highLimitErr, "Error serializing 'highLimit' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataPositiveIntegerValueHighLimit"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataPositiveIntegerValueHighLimit") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataPositiveIntegerValueHighLimit) SerializeWithWrite return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataPositiveIntegerValueHighLimit) isBACnetConstructedDataPositiveIntegerValueHighLimit() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataPositiveIntegerValueHighLimit) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueLowLimit.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueLowLimit.go index cd791d883ff..8f2cc9690f6 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueLowLimit.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueLowLimit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataPositiveIntegerValueLowLimit is the corresponding interface of BACnetConstructedDataPositiveIntegerValueLowLimit type BACnetConstructedDataPositiveIntegerValueLowLimit interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataPositiveIntegerValueLowLimitExactly interface { // _BACnetConstructedDataPositiveIntegerValueLowLimit is the data-structure of this message type _BACnetConstructedDataPositiveIntegerValueLowLimit struct { *_BACnetConstructedData - LowLimit BACnetApplicationTagUnsignedInteger + LowLimit BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataPositiveIntegerValueLowLimit) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_POSITIVE_INTEGER_VALUE -} +func (m *_BACnetConstructedDataPositiveIntegerValueLowLimit) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_POSITIVE_INTEGER_VALUE} -func (m *_BACnetConstructedDataPositiveIntegerValueLowLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LOW_LIMIT -} +func (m *_BACnetConstructedDataPositiveIntegerValueLowLimit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LOW_LIMIT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataPositiveIntegerValueLowLimit) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataPositiveIntegerValueLowLimit) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataPositiveIntegerValueLowLimit) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataPositiveIntegerValueLowLimit) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataPositiveIntegerValueLowLimit) GetActualValue() BA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataPositiveIntegerValueLowLimit factory function for _BACnetConstructedDataPositiveIntegerValueLowLimit -func NewBACnetConstructedDataPositiveIntegerValueLowLimit(lowLimit BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataPositiveIntegerValueLowLimit { +func NewBACnetConstructedDataPositiveIntegerValueLowLimit( lowLimit BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataPositiveIntegerValueLowLimit { _result := &_BACnetConstructedDataPositiveIntegerValueLowLimit{ - LowLimit: lowLimit, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + LowLimit: lowLimit, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataPositiveIntegerValueLowLimit(lowLimit BACnetApplica // Deprecated: use the interface for direct cast func CastBACnetConstructedDataPositiveIntegerValueLowLimit(structType interface{}) BACnetConstructedDataPositiveIntegerValueLowLimit { - if casted, ok := structType.(BACnetConstructedDataPositiveIntegerValueLowLimit); ok { + if casted, ok := structType.(BACnetConstructedDataPositiveIntegerValueLowLimit); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataPositiveIntegerValueLowLimit); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataPositiveIntegerValueLowLimit) GetLengthInBits(ctx return lengthInBits } + func (m *_BACnetConstructedDataPositiveIntegerValueLowLimit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataPositiveIntegerValueLowLimitParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("lowLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lowLimit") } - _lowLimit, _lowLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_lowLimit, _lowLimitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _lowLimitErr != nil { return nil, errors.Wrap(_lowLimitErr, "Error parsing 'lowLimit' field of BACnetConstructedDataPositiveIntegerValueLowLimit") } @@ -186,7 +188,7 @@ func BACnetConstructedDataPositiveIntegerValueLowLimitParseWithBuffer(ctx contex // Create a partially initialized instance _child := &_BACnetConstructedDataPositiveIntegerValueLowLimit{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LowLimit: lowLimit, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataPositiveIntegerValueLowLimit) SerializeWithWriteB return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataPositiveIntegerValueLowLimit") } - // Simple Field (lowLimit) - if pushErr := writeBuffer.PushContext("lowLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lowLimit") - } - _lowLimitErr := writeBuffer.WriteSerializable(ctx, m.GetLowLimit()) - if popErr := writeBuffer.PopContext("lowLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lowLimit") - } - if _lowLimitErr != nil { - return errors.Wrap(_lowLimitErr, "Error serializing 'lowLimit' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (lowLimit) + if pushErr := writeBuffer.PushContext("lowLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lowLimit") + } + _lowLimitErr := writeBuffer.WriteSerializable(ctx, m.GetLowLimit()) + if popErr := writeBuffer.PopContext("lowLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lowLimit") + } + if _lowLimitErr != nil { + return errors.Wrap(_lowLimitErr, "Error serializing 'lowLimit' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataPositiveIntegerValueLowLimit"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataPositiveIntegerValueLowLimit") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataPositiveIntegerValueLowLimit) SerializeWithWriteB return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataPositiveIntegerValueLowLimit) isBACnetConstructedDataPositiveIntegerValueLowLimit() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataPositiveIntegerValueLowLimit) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueMaxPresValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueMaxPresValue.go index 5ab515d9b7d..2aad2e61078 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueMaxPresValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueMaxPresValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataPositiveIntegerValueMaxPresValue is the corresponding interface of BACnetConstructedDataPositiveIntegerValueMaxPresValue type BACnetConstructedDataPositiveIntegerValueMaxPresValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataPositiveIntegerValueMaxPresValueExactly interface { // _BACnetConstructedDataPositiveIntegerValueMaxPresValue is the data-structure of this message type _BACnetConstructedDataPositiveIntegerValueMaxPresValue struct { *_BACnetConstructedData - MaxPresValue BACnetApplicationTagUnsignedInteger + MaxPresValue BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataPositiveIntegerValueMaxPresValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_POSITIVE_INTEGER_VALUE -} +func (m *_BACnetConstructedDataPositiveIntegerValueMaxPresValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_POSITIVE_INTEGER_VALUE} -func (m *_BACnetConstructedDataPositiveIntegerValueMaxPresValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MAX_PRES_VALUE -} +func (m *_BACnetConstructedDataPositiveIntegerValueMaxPresValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MAX_PRES_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataPositiveIntegerValueMaxPresValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataPositiveIntegerValueMaxPresValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataPositiveIntegerValueMaxPresValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataPositiveIntegerValueMaxPresValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataPositiveIntegerValueMaxPresValue) GetActualValue( /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataPositiveIntegerValueMaxPresValue factory function for _BACnetConstructedDataPositiveIntegerValueMaxPresValue -func NewBACnetConstructedDataPositiveIntegerValueMaxPresValue(maxPresValue BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataPositiveIntegerValueMaxPresValue { +func NewBACnetConstructedDataPositiveIntegerValueMaxPresValue( maxPresValue BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataPositiveIntegerValueMaxPresValue { _result := &_BACnetConstructedDataPositiveIntegerValueMaxPresValue{ - MaxPresValue: maxPresValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + MaxPresValue: maxPresValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataPositiveIntegerValueMaxPresValue(maxPresValue BACne // Deprecated: use the interface for direct cast func CastBACnetConstructedDataPositiveIntegerValueMaxPresValue(structType interface{}) BACnetConstructedDataPositiveIntegerValueMaxPresValue { - if casted, ok := structType.(BACnetConstructedDataPositiveIntegerValueMaxPresValue); ok { + if casted, ok := structType.(BACnetConstructedDataPositiveIntegerValueMaxPresValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataPositiveIntegerValueMaxPresValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataPositiveIntegerValueMaxPresValue) GetLengthInBits return lengthInBits } + func (m *_BACnetConstructedDataPositiveIntegerValueMaxPresValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataPositiveIntegerValueMaxPresValueParseWithBuffer(ctx co if pullErr := readBuffer.PullContext("maxPresValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for maxPresValue") } - _maxPresValue, _maxPresValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_maxPresValue, _maxPresValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _maxPresValueErr != nil { return nil, errors.Wrap(_maxPresValueErr, "Error parsing 'maxPresValue' field of BACnetConstructedDataPositiveIntegerValueMaxPresValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataPositiveIntegerValueMaxPresValueParseWithBuffer(ctx co // Create a partially initialized instance _child := &_BACnetConstructedDataPositiveIntegerValueMaxPresValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, MaxPresValue: maxPresValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataPositiveIntegerValueMaxPresValue) SerializeWithWr return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataPositiveIntegerValueMaxPresValue") } - // Simple Field (maxPresValue) - if pushErr := writeBuffer.PushContext("maxPresValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for maxPresValue") - } - _maxPresValueErr := writeBuffer.WriteSerializable(ctx, m.GetMaxPresValue()) - if popErr := writeBuffer.PopContext("maxPresValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for maxPresValue") - } - if _maxPresValueErr != nil { - return errors.Wrap(_maxPresValueErr, "Error serializing 'maxPresValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (maxPresValue) + if pushErr := writeBuffer.PushContext("maxPresValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for maxPresValue") + } + _maxPresValueErr := writeBuffer.WriteSerializable(ctx, m.GetMaxPresValue()) + if popErr := writeBuffer.PopContext("maxPresValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for maxPresValue") + } + if _maxPresValueErr != nil { + return errors.Wrap(_maxPresValueErr, "Error serializing 'maxPresValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataPositiveIntegerValueMaxPresValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataPositiveIntegerValueMaxPresValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataPositiveIntegerValueMaxPresValue) SerializeWithWr return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataPositiveIntegerValueMaxPresValue) isBACnetConstructedDataPositiveIntegerValueMaxPresValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataPositiveIntegerValueMaxPresValue) String() string } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueMinPresValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueMinPresValue.go index d5cd1f91766..3c17c56e02f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueMinPresValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueMinPresValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataPositiveIntegerValueMinPresValue is the corresponding interface of BACnetConstructedDataPositiveIntegerValueMinPresValue type BACnetConstructedDataPositiveIntegerValueMinPresValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataPositiveIntegerValueMinPresValueExactly interface { // _BACnetConstructedDataPositiveIntegerValueMinPresValue is the data-structure of this message type _BACnetConstructedDataPositiveIntegerValueMinPresValue struct { *_BACnetConstructedData - MinPresValue BACnetApplicationTagUnsignedInteger + MinPresValue BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataPositiveIntegerValueMinPresValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_POSITIVE_INTEGER_VALUE -} +func (m *_BACnetConstructedDataPositiveIntegerValueMinPresValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_POSITIVE_INTEGER_VALUE} -func (m *_BACnetConstructedDataPositiveIntegerValueMinPresValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MIN_PRES_VALUE -} +func (m *_BACnetConstructedDataPositiveIntegerValueMinPresValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MIN_PRES_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataPositiveIntegerValueMinPresValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataPositiveIntegerValueMinPresValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataPositiveIntegerValueMinPresValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataPositiveIntegerValueMinPresValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataPositiveIntegerValueMinPresValue) GetActualValue( /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataPositiveIntegerValueMinPresValue factory function for _BACnetConstructedDataPositiveIntegerValueMinPresValue -func NewBACnetConstructedDataPositiveIntegerValueMinPresValue(minPresValue BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataPositiveIntegerValueMinPresValue { +func NewBACnetConstructedDataPositiveIntegerValueMinPresValue( minPresValue BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataPositiveIntegerValueMinPresValue { _result := &_BACnetConstructedDataPositiveIntegerValueMinPresValue{ - MinPresValue: minPresValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + MinPresValue: minPresValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataPositiveIntegerValueMinPresValue(minPresValue BACne // Deprecated: use the interface for direct cast func CastBACnetConstructedDataPositiveIntegerValueMinPresValue(structType interface{}) BACnetConstructedDataPositiveIntegerValueMinPresValue { - if casted, ok := structType.(BACnetConstructedDataPositiveIntegerValueMinPresValue); ok { + if casted, ok := structType.(BACnetConstructedDataPositiveIntegerValueMinPresValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataPositiveIntegerValueMinPresValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataPositiveIntegerValueMinPresValue) GetLengthInBits return lengthInBits } + func (m *_BACnetConstructedDataPositiveIntegerValueMinPresValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataPositiveIntegerValueMinPresValueParseWithBuffer(ctx co if pullErr := readBuffer.PullContext("minPresValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for minPresValue") } - _minPresValue, _minPresValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_minPresValue, _minPresValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _minPresValueErr != nil { return nil, errors.Wrap(_minPresValueErr, "Error parsing 'minPresValue' field of BACnetConstructedDataPositiveIntegerValueMinPresValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataPositiveIntegerValueMinPresValueParseWithBuffer(ctx co // Create a partially initialized instance _child := &_BACnetConstructedDataPositiveIntegerValueMinPresValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, MinPresValue: minPresValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataPositiveIntegerValueMinPresValue) SerializeWithWr return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataPositiveIntegerValueMinPresValue") } - // Simple Field (minPresValue) - if pushErr := writeBuffer.PushContext("minPresValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for minPresValue") - } - _minPresValueErr := writeBuffer.WriteSerializable(ctx, m.GetMinPresValue()) - if popErr := writeBuffer.PopContext("minPresValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for minPresValue") - } - if _minPresValueErr != nil { - return errors.Wrap(_minPresValueErr, "Error serializing 'minPresValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (minPresValue) + if pushErr := writeBuffer.PushContext("minPresValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for minPresValue") + } + _minPresValueErr := writeBuffer.WriteSerializable(ctx, m.GetMinPresValue()) + if popErr := writeBuffer.PopContext("minPresValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for minPresValue") + } + if _minPresValueErr != nil { + return errors.Wrap(_minPresValueErr, "Error serializing 'minPresValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataPositiveIntegerValueMinPresValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataPositiveIntegerValueMinPresValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataPositiveIntegerValueMinPresValue) SerializeWithWr return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataPositiveIntegerValueMinPresValue) isBACnetConstructedDataPositiveIntegerValueMinPresValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataPositiveIntegerValueMinPresValue) String() string } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueRelinquishDefault.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueRelinquishDefault.go index eba318740a5..f5c89a6fe3a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueRelinquishDefault.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueRelinquishDefault.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataPositiveIntegerValueRelinquishDefault is the corresponding interface of BACnetConstructedDataPositiveIntegerValueRelinquishDefault type BACnetConstructedDataPositiveIntegerValueRelinquishDefault interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataPositiveIntegerValueRelinquishDefaultExactly interface // _BACnetConstructedDataPositiveIntegerValueRelinquishDefault is the data-structure of this message type _BACnetConstructedDataPositiveIntegerValueRelinquishDefault struct { *_BACnetConstructedData - RelinquishDefault BACnetApplicationTagUnsignedInteger + RelinquishDefault BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataPositiveIntegerValueRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_POSITIVE_INTEGER_VALUE -} +func (m *_BACnetConstructedDataPositiveIntegerValueRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_POSITIVE_INTEGER_VALUE} -func (m *_BACnetConstructedDataPositiveIntegerValueRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_RELINQUISH_DEFAULT -} +func (m *_BACnetConstructedDataPositiveIntegerValueRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_RELINQUISH_DEFAULT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataPositiveIntegerValueRelinquishDefault) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataPositiveIntegerValueRelinquishDefault) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataPositiveIntegerValueRelinquishDefault) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataPositiveIntegerValueRelinquishDefault) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataPositiveIntegerValueRelinquishDefault) GetActualV /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataPositiveIntegerValueRelinquishDefault factory function for _BACnetConstructedDataPositiveIntegerValueRelinquishDefault -func NewBACnetConstructedDataPositiveIntegerValueRelinquishDefault(relinquishDefault BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataPositiveIntegerValueRelinquishDefault { +func NewBACnetConstructedDataPositiveIntegerValueRelinquishDefault( relinquishDefault BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataPositiveIntegerValueRelinquishDefault { _result := &_BACnetConstructedDataPositiveIntegerValueRelinquishDefault{ - RelinquishDefault: relinquishDefault, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + RelinquishDefault: relinquishDefault, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataPositiveIntegerValueRelinquishDefault(relinquishDef // Deprecated: use the interface for direct cast func CastBACnetConstructedDataPositiveIntegerValueRelinquishDefault(structType interface{}) BACnetConstructedDataPositiveIntegerValueRelinquishDefault { - if casted, ok := structType.(BACnetConstructedDataPositiveIntegerValueRelinquishDefault); ok { + if casted, ok := structType.(BACnetConstructedDataPositiveIntegerValueRelinquishDefault); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataPositiveIntegerValueRelinquishDefault); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataPositiveIntegerValueRelinquishDefault) GetLengthI return lengthInBits } + func (m *_BACnetConstructedDataPositiveIntegerValueRelinquishDefault) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataPositiveIntegerValueRelinquishDefaultParseWithBuffer(c if pullErr := readBuffer.PullContext("relinquishDefault"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for relinquishDefault") } - _relinquishDefault, _relinquishDefaultErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_relinquishDefault, _relinquishDefaultErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _relinquishDefaultErr != nil { return nil, errors.Wrap(_relinquishDefaultErr, "Error parsing 'relinquishDefault' field of BACnetConstructedDataPositiveIntegerValueRelinquishDefault") } @@ -186,7 +188,7 @@ func BACnetConstructedDataPositiveIntegerValueRelinquishDefaultParseWithBuffer(c // Create a partially initialized instance _child := &_BACnetConstructedDataPositiveIntegerValueRelinquishDefault{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, RelinquishDefault: relinquishDefault, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataPositiveIntegerValueRelinquishDefault) SerializeW return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataPositiveIntegerValueRelinquishDefault") } - // Simple Field (relinquishDefault) - if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for relinquishDefault") - } - _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) - if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { - return errors.Wrap(popErr, "Error popping for relinquishDefault") - } - if _relinquishDefaultErr != nil { - return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (relinquishDefault) + if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for relinquishDefault") + } + _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) + if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { + return errors.Wrap(popErr, "Error popping for relinquishDefault") + } + if _relinquishDefaultErr != nil { + return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataPositiveIntegerValueRelinquishDefault"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataPositiveIntegerValueRelinquishDefault") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataPositiveIntegerValueRelinquishDefault) SerializeW return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataPositiveIntegerValueRelinquishDefault) isBACnetConstructedDataPositiveIntegerValueRelinquishDefault() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataPositiveIntegerValueRelinquishDefault) String() s } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueResolution.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueResolution.go index 8d9b7c2ddf8..dee58c99ed8 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueResolution.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPositiveIntegerValueResolution.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataPositiveIntegerValueResolution is the corresponding interface of BACnetConstructedDataPositiveIntegerValueResolution type BACnetConstructedDataPositiveIntegerValueResolution interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataPositiveIntegerValueResolutionExactly interface { // _BACnetConstructedDataPositiveIntegerValueResolution is the data-structure of this message type _BACnetConstructedDataPositiveIntegerValueResolution struct { *_BACnetConstructedData - Resolution BACnetApplicationTagUnsignedInteger + Resolution BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataPositiveIntegerValueResolution) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_POSITIVE_INTEGER_VALUE -} +func (m *_BACnetConstructedDataPositiveIntegerValueResolution) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_POSITIVE_INTEGER_VALUE} -func (m *_BACnetConstructedDataPositiveIntegerValueResolution) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_RESOLUTION -} +func (m *_BACnetConstructedDataPositiveIntegerValueResolution) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_RESOLUTION} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataPositiveIntegerValueResolution) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataPositiveIntegerValueResolution) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataPositiveIntegerValueResolution) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataPositiveIntegerValueResolution) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataPositiveIntegerValueResolution) GetActualValue() /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataPositiveIntegerValueResolution factory function for _BACnetConstructedDataPositiveIntegerValueResolution -func NewBACnetConstructedDataPositiveIntegerValueResolution(resolution BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataPositiveIntegerValueResolution { +func NewBACnetConstructedDataPositiveIntegerValueResolution( resolution BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataPositiveIntegerValueResolution { _result := &_BACnetConstructedDataPositiveIntegerValueResolution{ - Resolution: resolution, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Resolution: resolution, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataPositiveIntegerValueResolution(resolution BACnetApp // Deprecated: use the interface for direct cast func CastBACnetConstructedDataPositiveIntegerValueResolution(structType interface{}) BACnetConstructedDataPositiveIntegerValueResolution { - if casted, ok := structType.(BACnetConstructedDataPositiveIntegerValueResolution); ok { + if casted, ok := structType.(BACnetConstructedDataPositiveIntegerValueResolution); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataPositiveIntegerValueResolution); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataPositiveIntegerValueResolution) GetLengthInBits(c return lengthInBits } + func (m *_BACnetConstructedDataPositiveIntegerValueResolution) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataPositiveIntegerValueResolutionParseWithBuffer(ctx cont if pullErr := readBuffer.PullContext("resolution"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for resolution") } - _resolution, _resolutionErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_resolution, _resolutionErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _resolutionErr != nil { return nil, errors.Wrap(_resolutionErr, "Error parsing 'resolution' field of BACnetConstructedDataPositiveIntegerValueResolution") } @@ -186,7 +188,7 @@ func BACnetConstructedDataPositiveIntegerValueResolutionParseWithBuffer(ctx cont // Create a partially initialized instance _child := &_BACnetConstructedDataPositiveIntegerValueResolution{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Resolution: resolution, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataPositiveIntegerValueResolution) SerializeWithWrit return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataPositiveIntegerValueResolution") } - // Simple Field (resolution) - if pushErr := writeBuffer.PushContext("resolution"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for resolution") - } - _resolutionErr := writeBuffer.WriteSerializable(ctx, m.GetResolution()) - if popErr := writeBuffer.PopContext("resolution"); popErr != nil { - return errors.Wrap(popErr, "Error popping for resolution") - } - if _resolutionErr != nil { - return errors.Wrap(_resolutionErr, "Error serializing 'resolution' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (resolution) + if pushErr := writeBuffer.PushContext("resolution"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for resolution") + } + _resolutionErr := writeBuffer.WriteSerializable(ctx, m.GetResolution()) + if popErr := writeBuffer.PopContext("resolution"); popErr != nil { + return errors.Wrap(popErr, "Error popping for resolution") + } + if _resolutionErr != nil { + return errors.Wrap(_resolutionErr, "Error serializing 'resolution' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataPositiveIntegerValueResolution"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataPositiveIntegerValueResolution") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataPositiveIntegerValueResolution) SerializeWithWrit return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataPositiveIntegerValueResolution) isBACnetConstructedDataPositiveIntegerValueResolution() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataPositiveIntegerValueResolution) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPower.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPower.go index ae876142bc5..137d8787245 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPower.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPower.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataPower is the corresponding interface of BACnetConstructedDataPower type BACnetConstructedDataPower interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataPowerExactly interface { // _BACnetConstructedDataPower is the data-structure of this message type _BACnetConstructedDataPower struct { *_BACnetConstructedData - Power BACnetApplicationTagReal + Power BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataPower) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataPower) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataPower) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_POWER -} +func (m *_BACnetConstructedDataPower) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_POWER} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataPower) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataPower) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataPower) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataPower) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataPower) GetActualValue() BACnetApplicationTagReal /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataPower factory function for _BACnetConstructedDataPower -func NewBACnetConstructedDataPower(power BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataPower { +func NewBACnetConstructedDataPower( power BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataPower { _result := &_BACnetConstructedDataPower{ - Power: power, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Power: power, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataPower(power BACnetApplicationTagReal, openingTag BA // Deprecated: use the interface for direct cast func CastBACnetConstructedDataPower(structType interface{}) BACnetConstructedDataPower { - if casted, ok := structType.(BACnetConstructedDataPower); ok { + if casted, ok := structType.(BACnetConstructedDataPower); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataPower); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataPower) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_BACnetConstructedDataPower) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataPowerParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("power"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for power") } - _power, _powerErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_power, _powerErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _powerErr != nil { return nil, errors.Wrap(_powerErr, "Error parsing 'power' field of BACnetConstructedDataPower") } @@ -186,7 +188,7 @@ func BACnetConstructedDataPowerParseWithBuffer(ctx context.Context, readBuffer u // Create a partially initialized instance _child := &_BACnetConstructedDataPower{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Power: power, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataPower) SerializeWithWriteBuffer(ctx context.Conte return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataPower") } - // Simple Field (power) - if pushErr := writeBuffer.PushContext("power"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for power") - } - _powerErr := writeBuffer.WriteSerializable(ctx, m.GetPower()) - if popErr := writeBuffer.PopContext("power"); popErr != nil { - return errors.Wrap(popErr, "Error popping for power") - } - if _powerErr != nil { - return errors.Wrap(_powerErr, "Error serializing 'power' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (power) + if pushErr := writeBuffer.PushContext("power"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for power") + } + _powerErr := writeBuffer.WriteSerializable(ctx, m.GetPower()) + if popErr := writeBuffer.PopContext("power"); popErr != nil { + return errors.Wrap(popErr, "Error popping for power") + } + if _powerErr != nil { + return errors.Wrap(_powerErr, "Error serializing 'power' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataPower"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataPower") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataPower) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataPower) isBACnetConstructedDataPower() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataPower) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPowerMode.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPowerMode.go index 314e50de639..ce11349caa8 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPowerMode.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPowerMode.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataPowerMode is the corresponding interface of BACnetConstructedDataPowerMode type BACnetConstructedDataPowerMode interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataPowerModeExactly interface { // _BACnetConstructedDataPowerMode is the data-structure of this message type _BACnetConstructedDataPowerMode struct { *_BACnetConstructedData - PowerMode BACnetApplicationTagBoolean + PowerMode BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataPowerMode) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataPowerMode) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataPowerMode) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_POWER_MODE -} +func (m *_BACnetConstructedDataPowerMode) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_POWER_MODE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataPowerMode) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataPowerMode) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataPowerMode) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataPowerMode) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataPowerMode) GetActualValue() BACnetApplicationTagB /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataPowerMode factory function for _BACnetConstructedDataPowerMode -func NewBACnetConstructedDataPowerMode(powerMode BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataPowerMode { +func NewBACnetConstructedDataPowerMode( powerMode BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataPowerMode { _result := &_BACnetConstructedDataPowerMode{ - PowerMode: powerMode, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PowerMode: powerMode, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataPowerMode(powerMode BACnetApplicationTagBoolean, op // Deprecated: use the interface for direct cast func CastBACnetConstructedDataPowerMode(structType interface{}) BACnetConstructedDataPowerMode { - if casted, ok := structType.(BACnetConstructedDataPowerMode); ok { + if casted, ok := structType.(BACnetConstructedDataPowerMode); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataPowerMode); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataPowerMode) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetConstructedDataPowerMode) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataPowerModeParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("powerMode"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for powerMode") } - _powerMode, _powerModeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_powerMode, _powerModeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _powerModeErr != nil { return nil, errors.Wrap(_powerModeErr, "Error parsing 'powerMode' field of BACnetConstructedDataPowerMode") } @@ -186,7 +188,7 @@ func BACnetConstructedDataPowerModeParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_BACnetConstructedDataPowerMode{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PowerMode: powerMode, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataPowerMode) SerializeWithWriteBuffer(ctx context.C return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataPowerMode") } - // Simple Field (powerMode) - if pushErr := writeBuffer.PushContext("powerMode"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for powerMode") - } - _powerModeErr := writeBuffer.WriteSerializable(ctx, m.GetPowerMode()) - if popErr := writeBuffer.PopContext("powerMode"); popErr != nil { - return errors.Wrap(popErr, "Error popping for powerMode") - } - if _powerModeErr != nil { - return errors.Wrap(_powerModeErr, "Error serializing 'powerMode' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (powerMode) + if pushErr := writeBuffer.PushContext("powerMode"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for powerMode") + } + _powerModeErr := writeBuffer.WriteSerializable(ctx, m.GetPowerMode()) + if popErr := writeBuffer.PopContext("powerMode"); popErr != nil { + return errors.Wrap(popErr, "Error popping for powerMode") + } + if _powerModeErr != nil { + return errors.Wrap(_powerModeErr, "Error serializing 'powerMode' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataPowerMode"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataPowerMode") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataPowerMode) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataPowerMode) isBACnetConstructedDataPowerMode() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataPowerMode) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPrescale.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPrescale.go index 74930b68dcc..617a960265b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPrescale.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPrescale.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataPrescale is the corresponding interface of BACnetConstructedDataPrescale type BACnetConstructedDataPrescale interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataPrescaleExactly interface { // _BACnetConstructedDataPrescale is the data-structure of this message type _BACnetConstructedDataPrescale struct { *_BACnetConstructedData - Prescale BACnetPrescale + Prescale BACnetPrescale } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataPrescale) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataPrescale) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataPrescale) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PRESCALE -} +func (m *_BACnetConstructedDataPrescale) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PRESCALE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataPrescale) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataPrescale) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataPrescale) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataPrescale) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataPrescale) GetActualValue() BACnetPrescale { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataPrescale factory function for _BACnetConstructedDataPrescale -func NewBACnetConstructedDataPrescale(prescale BACnetPrescale, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataPrescale { +func NewBACnetConstructedDataPrescale( prescale BACnetPrescale , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataPrescale { _result := &_BACnetConstructedDataPrescale{ - Prescale: prescale, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Prescale: prescale, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataPrescale(prescale BACnetPrescale, openingTag BACnet // Deprecated: use the interface for direct cast func CastBACnetConstructedDataPrescale(structType interface{}) BACnetConstructedDataPrescale { - if casted, ok := structType.(BACnetConstructedDataPrescale); ok { + if casted, ok := structType.(BACnetConstructedDataPrescale); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataPrescale); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataPrescale) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetConstructedDataPrescale) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataPrescaleParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("prescale"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for prescale") } - _prescale, _prescaleErr := BACnetPrescaleParseWithBuffer(ctx, readBuffer) +_prescale, _prescaleErr := BACnetPrescaleParseWithBuffer(ctx, readBuffer) if _prescaleErr != nil { return nil, errors.Wrap(_prescaleErr, "Error parsing 'prescale' field of BACnetConstructedDataPrescale") } @@ -186,7 +188,7 @@ func BACnetConstructedDataPrescaleParseWithBuffer(ctx context.Context, readBuffe // Create a partially initialized instance _child := &_BACnetConstructedDataPrescale{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Prescale: prescale, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataPrescale) SerializeWithWriteBuffer(ctx context.Co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataPrescale") } - // Simple Field (prescale) - if pushErr := writeBuffer.PushContext("prescale"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for prescale") - } - _prescaleErr := writeBuffer.WriteSerializable(ctx, m.GetPrescale()) - if popErr := writeBuffer.PopContext("prescale"); popErr != nil { - return errors.Wrap(popErr, "Error popping for prescale") - } - if _prescaleErr != nil { - return errors.Wrap(_prescaleErr, "Error serializing 'prescale' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (prescale) + if pushErr := writeBuffer.PushContext("prescale"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for prescale") + } + _prescaleErr := writeBuffer.WriteSerializable(ctx, m.GetPrescale()) + if popErr := writeBuffer.PopContext("prescale"); popErr != nil { + return errors.Wrap(popErr, "Error popping for prescale") + } + if _prescaleErr != nil { + return errors.Wrap(_prescaleErr, "Error serializing 'prescale' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataPrescale"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataPrescale") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataPrescale) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataPrescale) isBACnetConstructedDataPrescale() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataPrescale) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPresentValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPresentValue.go index 8863d1635f5..8eac2d6bf20 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPresentValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPresentValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataPresentValue is the corresponding interface of BACnetConstructedDataPresentValue type BACnetConstructedDataPresentValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataPresentValueExactly interface { // _BACnetConstructedDataPresentValue is the data-structure of this message type _BACnetConstructedDataPresentValue struct { *_BACnetConstructedData - PresentValue BACnetApplicationTagUnsignedInteger + PresentValue BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataPresentValue) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataPresentValue) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataPresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PRESENT_VALUE -} +func (m *_BACnetConstructedDataPresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PRESENT_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataPresentValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataPresentValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataPresentValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataPresentValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataPresentValue) GetActualValue() BACnetApplicationT /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataPresentValue factory function for _BACnetConstructedDataPresentValue -func NewBACnetConstructedDataPresentValue(presentValue BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataPresentValue { +func NewBACnetConstructedDataPresentValue( presentValue BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataPresentValue { _result := &_BACnetConstructedDataPresentValue{ - PresentValue: presentValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PresentValue: presentValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataPresentValue(presentValue BACnetApplicationTagUnsig // Deprecated: use the interface for direct cast func CastBACnetConstructedDataPresentValue(structType interface{}) BACnetConstructedDataPresentValue { - if casted, ok := structType.(BACnetConstructedDataPresentValue); ok { + if casted, ok := structType.(BACnetConstructedDataPresentValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataPresentValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataPresentValue) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetConstructedDataPresentValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataPresentValueParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("presentValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for presentValue") } - _presentValue, _presentValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_presentValue, _presentValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _presentValueErr != nil { return nil, errors.Wrap(_presentValueErr, "Error parsing 'presentValue' field of BACnetConstructedDataPresentValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataPresentValueParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetConstructedDataPresentValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PresentValue: presentValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataPresentValue) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataPresentValue") } - // Simple Field (presentValue) - if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for presentValue") - } - _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) - if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for presentValue") - } - if _presentValueErr != nil { - return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (presentValue) + if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for presentValue") + } + _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) + if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for presentValue") + } + if _presentValueErr != nil { + return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataPresentValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataPresentValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataPresentValue) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataPresentValue) isBACnetConstructedDataPresentValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataPresentValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPriority.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPriority.go index 64b4689624e..fe180965061 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPriority.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPriority.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataPriority is the corresponding interface of BACnetConstructedDataPriority type BACnetConstructedDataPriority interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataPriorityExactly interface { // _BACnetConstructedDataPriority is the data-structure of this message type _BACnetConstructedDataPriority struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - Priority []BACnetApplicationTagUnsignedInteger + NumberOfDataElements BACnetApplicationTagUnsignedInteger + Priority []BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataPriority) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataPriority) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataPriority) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PRIORITY -} +func (m *_BACnetConstructedDataPriority) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PRIORITY} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataPriority) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataPriority) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataPriority) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataPriority) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataPriority) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataPriority factory function for _BACnetConstructedDataPriority -func NewBACnetConstructedDataPriority(numberOfDataElements BACnetApplicationTagUnsignedInteger, priority []BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataPriority { +func NewBACnetConstructedDataPriority( numberOfDataElements BACnetApplicationTagUnsignedInteger , priority []BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataPriority { _result := &_BACnetConstructedDataPriority{ - NumberOfDataElements: numberOfDataElements, - Priority: priority, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + Priority: priority, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataPriority(numberOfDataElements BACnetApplicationTagU // Deprecated: use the interface for direct cast func CastBACnetConstructedDataPriority(structType interface{}) BACnetConstructedDataPriority { - if casted, ok := structType.(BACnetConstructedDataPriority); ok { + if casted, ok := structType.(BACnetConstructedDataPriority); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataPriority); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataPriority) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetConstructedDataPriority) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataPriorityParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataPriorityParseWithBuffer(ctx context.Context, readBuffe // Terminated array var priority []BACnetApplicationTagUnsignedInteger { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'priority' field of BACnetConstructedDataPriority") } @@ -229,7 +231,7 @@ func BACnetConstructedDataPriorityParseWithBuffer(ctx context.Context, readBuffe } // Validation - if !(bool(bool((arrayIndexArgument) != (nil))) || bool(bool((len(priority)) == (3)))) { + if (!(bool(bool((arrayIndexArgument) != (nil))) || bool(bool(((len(priority))) == ((3)))))) { return nil, errors.WithStack(utils.ParseValidationError{"priority should have exactly 3 values"}) } @@ -240,11 +242,11 @@ func BACnetConstructedDataPriorityParseWithBuffer(ctx context.Context, readBuffe // Create a partially initialized instance _child := &_BACnetConstructedDataPriority{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - Priority: priority, + Priority: priority, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -265,43 +267,43 @@ func (m *_BACnetConstructedDataPriority) SerializeWithWriteBuffer(ctx context.Co if pushErr := writeBuffer.PushContext("BACnetConstructedDataPriority"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataPriority") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (priority) - if pushErr := writeBuffer.PushContext("priority", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for priority") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetPriority() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetPriority()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'priority' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("priority", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for priority") + } + + // Array Field (priority) + if pushErr := writeBuffer.PushContext("priority", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for priority") + } + for _curItem, _element := range m.GetPriority() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetPriority()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'priority' field") } + } + if popErr := writeBuffer.PopContext("priority", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for priority") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataPriority"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataPriority") @@ -311,6 +313,7 @@ func (m *_BACnetConstructedDataPriority) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataPriority) isBACnetConstructedDataPriority() bool { return true } @@ -325,3 +328,6 @@ func (m *_BACnetConstructedDataPriority) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPriorityArray.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPriorityArray.go index 8057e1e1cce..33545c1ad86 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPriorityArray.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPriorityArray.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataPriorityArray is the corresponding interface of BACnetConstructedDataPriorityArray type BACnetConstructedDataPriorityArray interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataPriorityArrayExactly interface { // _BACnetConstructedDataPriorityArray is the data-structure of this message type _BACnetConstructedDataPriorityArray struct { *_BACnetConstructedData - PriorityArray BACnetPriorityArray + PriorityArray BACnetPriorityArray } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataPriorityArray) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataPriorityArray) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataPriorityArray) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PRIORITY_ARRAY -} +func (m *_BACnetConstructedDataPriorityArray) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PRIORITY_ARRAY} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataPriorityArray) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataPriorityArray) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataPriorityArray) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataPriorityArray) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataPriorityArray) GetActualValue() BACnetPriorityArr /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataPriorityArray factory function for _BACnetConstructedDataPriorityArray -func NewBACnetConstructedDataPriorityArray(priorityArray BACnetPriorityArray, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataPriorityArray { +func NewBACnetConstructedDataPriorityArray( priorityArray BACnetPriorityArray , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataPriorityArray { _result := &_BACnetConstructedDataPriorityArray{ - PriorityArray: priorityArray, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PriorityArray: priorityArray, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataPriorityArray(priorityArray BACnetPriorityArray, op // Deprecated: use the interface for direct cast func CastBACnetConstructedDataPriorityArray(structType interface{}) BACnetConstructedDataPriorityArray { - if casted, ok := structType.(BACnetConstructedDataPriorityArray); ok { + if casted, ok := structType.(BACnetConstructedDataPriorityArray); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataPriorityArray); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataPriorityArray) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetConstructedDataPriorityArray) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataPriorityArrayParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("priorityArray"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for priorityArray") } - _priorityArray, _priorityArrayErr := BACnetPriorityArrayParseWithBuffer(ctx, readBuffer, BACnetObjectType(objectTypeArgument), uint8(tagNumber), arrayIndexArgument) +_priorityArray, _priorityArrayErr := BACnetPriorityArrayParseWithBuffer(ctx, readBuffer , BACnetObjectType( objectTypeArgument ) , uint8( tagNumber ) , arrayIndexArgument ) if _priorityArrayErr != nil { return nil, errors.Wrap(_priorityArrayErr, "Error parsing 'priorityArray' field of BACnetConstructedDataPriorityArray") } @@ -186,7 +188,7 @@ func BACnetConstructedDataPriorityArrayParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetConstructedDataPriorityArray{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PriorityArray: priorityArray, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataPriorityArray) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataPriorityArray") } - // Simple Field (priorityArray) - if pushErr := writeBuffer.PushContext("priorityArray"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for priorityArray") - } - _priorityArrayErr := writeBuffer.WriteSerializable(ctx, m.GetPriorityArray()) - if popErr := writeBuffer.PopContext("priorityArray"); popErr != nil { - return errors.Wrap(popErr, "Error popping for priorityArray") - } - if _priorityArrayErr != nil { - return errors.Wrap(_priorityArrayErr, "Error serializing 'priorityArray' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (priorityArray) + if pushErr := writeBuffer.PushContext("priorityArray"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for priorityArray") + } + _priorityArrayErr := writeBuffer.WriteSerializable(ctx, m.GetPriorityArray()) + if popErr := writeBuffer.PopContext("priorityArray"); popErr != nil { + return errors.Wrap(popErr, "Error popping for priorityArray") + } + if _priorityArrayErr != nil { + return errors.Wrap(_priorityArrayErr, "Error serializing 'priorityArray' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataPriorityArray"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataPriorityArray") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataPriorityArray) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataPriorityArray) isBACnetConstructedDataPriorityArray() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataPriorityArray) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPriorityForWriting.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPriorityForWriting.go index d568dce68dc..3dddfd77610 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPriorityForWriting.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPriorityForWriting.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataPriorityForWriting is the corresponding interface of BACnetConstructedDataPriorityForWriting type BACnetConstructedDataPriorityForWriting interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataPriorityForWritingExactly interface { // _BACnetConstructedDataPriorityForWriting is the data-structure of this message type _BACnetConstructedDataPriorityForWriting struct { *_BACnetConstructedData - PriorityForWriting BACnetApplicationTagUnsignedInteger + PriorityForWriting BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataPriorityForWriting) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataPriorityForWriting) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataPriorityForWriting) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PRIORITY_FOR_WRITING -} +func (m *_BACnetConstructedDataPriorityForWriting) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PRIORITY_FOR_WRITING} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataPriorityForWriting) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataPriorityForWriting) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataPriorityForWriting) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataPriorityForWriting) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataPriorityForWriting) GetActualValue() BACnetApplic /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataPriorityForWriting factory function for _BACnetConstructedDataPriorityForWriting -func NewBACnetConstructedDataPriorityForWriting(priorityForWriting BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataPriorityForWriting { +func NewBACnetConstructedDataPriorityForWriting( priorityForWriting BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataPriorityForWriting { _result := &_BACnetConstructedDataPriorityForWriting{ - PriorityForWriting: priorityForWriting, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PriorityForWriting: priorityForWriting, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataPriorityForWriting(priorityForWriting BACnetApplica // Deprecated: use the interface for direct cast func CastBACnetConstructedDataPriorityForWriting(structType interface{}) BACnetConstructedDataPriorityForWriting { - if casted, ok := structType.(BACnetConstructedDataPriorityForWriting); ok { + if casted, ok := structType.(BACnetConstructedDataPriorityForWriting); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataPriorityForWriting); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataPriorityForWriting) GetLengthInBits(ctx context.C return lengthInBits } + func (m *_BACnetConstructedDataPriorityForWriting) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataPriorityForWritingParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("priorityForWriting"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for priorityForWriting") } - _priorityForWriting, _priorityForWritingErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_priorityForWriting, _priorityForWritingErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _priorityForWritingErr != nil { return nil, errors.Wrap(_priorityForWritingErr, "Error parsing 'priorityForWriting' field of BACnetConstructedDataPriorityForWriting") } @@ -186,7 +188,7 @@ func BACnetConstructedDataPriorityForWritingParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataPriorityForWriting{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PriorityForWriting: priorityForWriting, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataPriorityForWriting) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataPriorityForWriting") } - // Simple Field (priorityForWriting) - if pushErr := writeBuffer.PushContext("priorityForWriting"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for priorityForWriting") - } - _priorityForWritingErr := writeBuffer.WriteSerializable(ctx, m.GetPriorityForWriting()) - if popErr := writeBuffer.PopContext("priorityForWriting"); popErr != nil { - return errors.Wrap(popErr, "Error popping for priorityForWriting") - } - if _priorityForWritingErr != nil { - return errors.Wrap(_priorityForWritingErr, "Error serializing 'priorityForWriting' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (priorityForWriting) + if pushErr := writeBuffer.PushContext("priorityForWriting"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for priorityForWriting") + } + _priorityForWritingErr := writeBuffer.WriteSerializable(ctx, m.GetPriorityForWriting()) + if popErr := writeBuffer.PopContext("priorityForWriting"); popErr != nil { + return errors.Wrap(popErr, "Error popping for priorityForWriting") + } + if _priorityForWritingErr != nil { + return errors.Wrap(_priorityForWritingErr, "Error serializing 'priorityForWriting' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataPriorityForWriting"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataPriorityForWriting") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataPriorityForWriting) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataPriorityForWriting) isBACnetConstructedDataPriorityForWriting() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataPriorityForWriting) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProcessIdentifier.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProcessIdentifier.go index 6d5525fe2cf..1ea0c3f29b9 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProcessIdentifier.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProcessIdentifier.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataProcessIdentifier is the corresponding interface of BACnetConstructedDataProcessIdentifier type BACnetConstructedDataProcessIdentifier interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataProcessIdentifierExactly interface { // _BACnetConstructedDataProcessIdentifier is the data-structure of this message type _BACnetConstructedDataProcessIdentifier struct { *_BACnetConstructedData - ProcessIdentifier BACnetApplicationTagUnsignedInteger + ProcessIdentifier BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataProcessIdentifier) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataProcessIdentifier) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataProcessIdentifier) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PROCESS_IDENTIFIER -} +func (m *_BACnetConstructedDataProcessIdentifier) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PROCESS_IDENTIFIER} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataProcessIdentifier) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataProcessIdentifier) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataProcessIdentifier) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataProcessIdentifier) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataProcessIdentifier) GetActualValue() BACnetApplica /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataProcessIdentifier factory function for _BACnetConstructedDataProcessIdentifier -func NewBACnetConstructedDataProcessIdentifier(processIdentifier BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataProcessIdentifier { +func NewBACnetConstructedDataProcessIdentifier( processIdentifier BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataProcessIdentifier { _result := &_BACnetConstructedDataProcessIdentifier{ - ProcessIdentifier: processIdentifier, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ProcessIdentifier: processIdentifier, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataProcessIdentifier(processIdentifier BACnetApplicati // Deprecated: use the interface for direct cast func CastBACnetConstructedDataProcessIdentifier(structType interface{}) BACnetConstructedDataProcessIdentifier { - if casted, ok := structType.(BACnetConstructedDataProcessIdentifier); ok { + if casted, ok := structType.(BACnetConstructedDataProcessIdentifier); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataProcessIdentifier); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataProcessIdentifier) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetConstructedDataProcessIdentifier) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataProcessIdentifierParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("processIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for processIdentifier") } - _processIdentifier, _processIdentifierErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_processIdentifier, _processIdentifierErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _processIdentifierErr != nil { return nil, errors.Wrap(_processIdentifierErr, "Error parsing 'processIdentifier' field of BACnetConstructedDataProcessIdentifier") } @@ -186,7 +188,7 @@ func BACnetConstructedDataProcessIdentifierParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataProcessIdentifier{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ProcessIdentifier: processIdentifier, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataProcessIdentifier) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataProcessIdentifier") } - // Simple Field (processIdentifier) - if pushErr := writeBuffer.PushContext("processIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for processIdentifier") - } - _processIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetProcessIdentifier()) - if popErr := writeBuffer.PopContext("processIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for processIdentifier") - } - if _processIdentifierErr != nil { - return errors.Wrap(_processIdentifierErr, "Error serializing 'processIdentifier' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (processIdentifier) + if pushErr := writeBuffer.PushContext("processIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for processIdentifier") + } + _processIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetProcessIdentifier()) + if popErr := writeBuffer.PopContext("processIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for processIdentifier") + } + if _processIdentifierErr != nil { + return errors.Wrap(_processIdentifierErr, "Error serializing 'processIdentifier' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataProcessIdentifier"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataProcessIdentifier") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataProcessIdentifier) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataProcessIdentifier) isBACnetConstructedDataProcessIdentifier() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataProcessIdentifier) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProcessIdentifierFilter.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProcessIdentifierFilter.go index 3045e4a49ce..c62bd7a1bc3 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProcessIdentifierFilter.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProcessIdentifierFilter.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataProcessIdentifierFilter is the corresponding interface of BACnetConstructedDataProcessIdentifierFilter type BACnetConstructedDataProcessIdentifierFilter interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataProcessIdentifierFilterExactly interface { // _BACnetConstructedDataProcessIdentifierFilter is the data-structure of this message type _BACnetConstructedDataProcessIdentifierFilter struct { *_BACnetConstructedData - ProcessIdentifierFilter BACnetProcessIdSelection + ProcessIdentifierFilter BACnetProcessIdSelection } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataProcessIdentifierFilter) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataProcessIdentifierFilter) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataProcessIdentifierFilter) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PROCESS_IDENTIFIER_FILTER -} +func (m *_BACnetConstructedDataProcessIdentifierFilter) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PROCESS_IDENTIFIER_FILTER} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataProcessIdentifierFilter) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataProcessIdentifierFilter) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataProcessIdentifierFilter) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataProcessIdentifierFilter) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataProcessIdentifierFilter) GetActualValue() BACnetP /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataProcessIdentifierFilter factory function for _BACnetConstructedDataProcessIdentifierFilter -func NewBACnetConstructedDataProcessIdentifierFilter(processIdentifierFilter BACnetProcessIdSelection, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataProcessIdentifierFilter { +func NewBACnetConstructedDataProcessIdentifierFilter( processIdentifierFilter BACnetProcessIdSelection , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataProcessIdentifierFilter { _result := &_BACnetConstructedDataProcessIdentifierFilter{ ProcessIdentifierFilter: processIdentifierFilter, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataProcessIdentifierFilter(processIdentifierFilter BAC // Deprecated: use the interface for direct cast func CastBACnetConstructedDataProcessIdentifierFilter(structType interface{}) BACnetConstructedDataProcessIdentifierFilter { - if casted, ok := structType.(BACnetConstructedDataProcessIdentifierFilter); ok { + if casted, ok := structType.(BACnetConstructedDataProcessIdentifierFilter); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataProcessIdentifierFilter); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataProcessIdentifierFilter) GetLengthInBits(ctx cont return lengthInBits } + func (m *_BACnetConstructedDataProcessIdentifierFilter) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataProcessIdentifierFilterParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("processIdentifierFilter"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for processIdentifierFilter") } - _processIdentifierFilter, _processIdentifierFilterErr := BACnetProcessIdSelectionParseWithBuffer(ctx, readBuffer) +_processIdentifierFilter, _processIdentifierFilterErr := BACnetProcessIdSelectionParseWithBuffer(ctx, readBuffer) if _processIdentifierFilterErr != nil { return nil, errors.Wrap(_processIdentifierFilterErr, "Error parsing 'processIdentifierFilter' field of BACnetConstructedDataProcessIdentifierFilter") } @@ -186,7 +188,7 @@ func BACnetConstructedDataProcessIdentifierFilterParseWithBuffer(ctx context.Con // Create a partially initialized instance _child := &_BACnetConstructedDataProcessIdentifierFilter{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ProcessIdentifierFilter: processIdentifierFilter, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataProcessIdentifierFilter) SerializeWithWriteBuffer return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataProcessIdentifierFilter") } - // Simple Field (processIdentifierFilter) - if pushErr := writeBuffer.PushContext("processIdentifierFilter"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for processIdentifierFilter") - } - _processIdentifierFilterErr := writeBuffer.WriteSerializable(ctx, m.GetProcessIdentifierFilter()) - if popErr := writeBuffer.PopContext("processIdentifierFilter"); popErr != nil { - return errors.Wrap(popErr, "Error popping for processIdentifierFilter") - } - if _processIdentifierFilterErr != nil { - return errors.Wrap(_processIdentifierFilterErr, "Error serializing 'processIdentifierFilter' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (processIdentifierFilter) + if pushErr := writeBuffer.PushContext("processIdentifierFilter"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for processIdentifierFilter") + } + _processIdentifierFilterErr := writeBuffer.WriteSerializable(ctx, m.GetProcessIdentifierFilter()) + if popErr := writeBuffer.PopContext("processIdentifierFilter"); popErr != nil { + return errors.Wrap(popErr, "Error popping for processIdentifierFilter") + } + if _processIdentifierFilterErr != nil { + return errors.Wrap(_processIdentifierFilterErr, "Error serializing 'processIdentifierFilter' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataProcessIdentifierFilter"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataProcessIdentifierFilter") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataProcessIdentifierFilter) SerializeWithWriteBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataProcessIdentifierFilter) isBACnetConstructedDataProcessIdentifierFilter() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataProcessIdentifierFilter) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProfileLocation.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProfileLocation.go index 2b2815a5cb5..69e2dbe9270 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProfileLocation.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProfileLocation.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataProfileLocation is the corresponding interface of BACnetConstructedDataProfileLocation type BACnetConstructedDataProfileLocation interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataProfileLocationExactly interface { // _BACnetConstructedDataProfileLocation is the data-structure of this message type _BACnetConstructedDataProfileLocation struct { *_BACnetConstructedData - ProfileLocation BACnetApplicationTagCharacterString + ProfileLocation BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataProfileLocation) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataProfileLocation) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataProfileLocation) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PROFILE_LOCATION -} +func (m *_BACnetConstructedDataProfileLocation) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PROFILE_LOCATION} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataProfileLocation) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataProfileLocation) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataProfileLocation) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataProfileLocation) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataProfileLocation) GetActualValue() BACnetApplicati /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataProfileLocation factory function for _BACnetConstructedDataProfileLocation -func NewBACnetConstructedDataProfileLocation(profileLocation BACnetApplicationTagCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataProfileLocation { +func NewBACnetConstructedDataProfileLocation( profileLocation BACnetApplicationTagCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataProfileLocation { _result := &_BACnetConstructedDataProfileLocation{ - ProfileLocation: profileLocation, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ProfileLocation: profileLocation, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataProfileLocation(profileLocation BACnetApplicationTa // Deprecated: use the interface for direct cast func CastBACnetConstructedDataProfileLocation(structType interface{}) BACnetConstructedDataProfileLocation { - if casted, ok := structType.(BACnetConstructedDataProfileLocation); ok { + if casted, ok := structType.(BACnetConstructedDataProfileLocation); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataProfileLocation); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataProfileLocation) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetConstructedDataProfileLocation) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataProfileLocationParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("profileLocation"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for profileLocation") } - _profileLocation, _profileLocationErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_profileLocation, _profileLocationErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _profileLocationErr != nil { return nil, errors.Wrap(_profileLocationErr, "Error parsing 'profileLocation' field of BACnetConstructedDataProfileLocation") } @@ -186,7 +188,7 @@ func BACnetConstructedDataProfileLocationParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetConstructedDataProfileLocation{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ProfileLocation: profileLocation, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataProfileLocation) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataProfileLocation") } - // Simple Field (profileLocation) - if pushErr := writeBuffer.PushContext("profileLocation"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for profileLocation") - } - _profileLocationErr := writeBuffer.WriteSerializable(ctx, m.GetProfileLocation()) - if popErr := writeBuffer.PopContext("profileLocation"); popErr != nil { - return errors.Wrap(popErr, "Error popping for profileLocation") - } - if _profileLocationErr != nil { - return errors.Wrap(_profileLocationErr, "Error serializing 'profileLocation' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (profileLocation) + if pushErr := writeBuffer.PushContext("profileLocation"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for profileLocation") + } + _profileLocationErr := writeBuffer.WriteSerializable(ctx, m.GetProfileLocation()) + if popErr := writeBuffer.PopContext("profileLocation"); popErr != nil { + return errors.Wrap(popErr, "Error popping for profileLocation") + } + if _profileLocationErr != nil { + return errors.Wrap(_profileLocationErr, "Error serializing 'profileLocation' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataProfileLocation"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataProfileLocation") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataProfileLocation) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataProfileLocation) isBACnetConstructedDataProfileLocation() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataProfileLocation) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProfileName.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProfileName.go index 06550f5ed85..4a4a179d058 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProfileName.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProfileName.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataProfileName is the corresponding interface of BACnetConstructedDataProfileName type BACnetConstructedDataProfileName interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataProfileNameExactly interface { // _BACnetConstructedDataProfileName is the data-structure of this message type _BACnetConstructedDataProfileName struct { *_BACnetConstructedData - ProfileName BACnetApplicationTagCharacterString + ProfileName BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataProfileName) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataProfileName) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataProfileName) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PROFILE_NAME -} +func (m *_BACnetConstructedDataProfileName) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PROFILE_NAME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataProfileName) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataProfileName) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataProfileName) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataProfileName) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataProfileName) GetActualValue() BACnetApplicationTa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataProfileName factory function for _BACnetConstructedDataProfileName -func NewBACnetConstructedDataProfileName(profileName BACnetApplicationTagCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataProfileName { +func NewBACnetConstructedDataProfileName( profileName BACnetApplicationTagCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataProfileName { _result := &_BACnetConstructedDataProfileName{ - ProfileName: profileName, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ProfileName: profileName, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataProfileName(profileName BACnetApplicationTagCharact // Deprecated: use the interface for direct cast func CastBACnetConstructedDataProfileName(structType interface{}) BACnetConstructedDataProfileName { - if casted, ok := structType.(BACnetConstructedDataProfileName); ok { + if casted, ok := structType.(BACnetConstructedDataProfileName); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataProfileName); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataProfileName) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataProfileName) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataProfileNameParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("profileName"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for profileName") } - _profileName, _profileNameErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_profileName, _profileNameErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _profileNameErr != nil { return nil, errors.Wrap(_profileNameErr, "Error parsing 'profileName' field of BACnetConstructedDataProfileName") } @@ -186,7 +188,7 @@ func BACnetConstructedDataProfileNameParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataProfileName{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ProfileName: profileName, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataProfileName) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataProfileName") } - // Simple Field (profileName) - if pushErr := writeBuffer.PushContext("profileName"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for profileName") - } - _profileNameErr := writeBuffer.WriteSerializable(ctx, m.GetProfileName()) - if popErr := writeBuffer.PopContext("profileName"); popErr != nil { - return errors.Wrap(popErr, "Error popping for profileName") - } - if _profileNameErr != nil { - return errors.Wrap(_profileNameErr, "Error serializing 'profileName' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (profileName) + if pushErr := writeBuffer.PushContext("profileName"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for profileName") + } + _profileNameErr := writeBuffer.WriteSerializable(ctx, m.GetProfileName()) + if popErr := writeBuffer.PopContext("profileName"); popErr != nil { + return errors.Wrap(popErr, "Error popping for profileName") + } + if _profileNameErr != nil { + return errors.Wrap(_profileNameErr, "Error serializing 'profileName' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataProfileName"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataProfileName") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataProfileName) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataProfileName) isBACnetConstructedDataProfileName() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataProfileName) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProgramAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProgramAll.go index 29fd055a3ed..029c632d1a0 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProgramAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProgramAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataProgramAll is the corresponding interface of BACnetConstructedDataProgramAll type BACnetConstructedDataProgramAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataProgramAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataProgramAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_PROGRAM -} +func (m *_BACnetConstructedDataProgramAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_PROGRAM} -func (m *_BACnetConstructedDataProgramAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataProgramAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataProgramAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataProgramAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataProgramAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataProgramAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataProgramAll factory function for _BACnetConstructedDataProgramAll -func NewBACnetConstructedDataProgramAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataProgramAll { +func NewBACnetConstructedDataProgramAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataProgramAll { _result := &_BACnetConstructedDataProgramAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataProgramAll(openingTag BACnetOpeningTag, peekedTagHe // Deprecated: use the interface for direct cast func CastBACnetConstructedDataProgramAll(structType interface{}) BACnetConstructedDataProgramAll { - if casted, ok := structType.(BACnetConstructedDataProgramAll); ok { + if casted, ok := structType.(BACnetConstructedDataProgramAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataProgramAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataProgramAll) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataProgramAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataProgramAllParseWithBuffer(ctx context.Context, readBuf _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataProgramAllParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetConstructedDataProgramAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataProgramAll) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataProgramAll) isBACnetConstructedDataProgramAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataProgramAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProgramChange.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProgramChange.go index bd811409f59..0c2ce135400 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProgramChange.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProgramChange.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataProgramChange is the corresponding interface of BACnetConstructedDataProgramChange type BACnetConstructedDataProgramChange interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataProgramChangeExactly interface { // _BACnetConstructedDataProgramChange is the data-structure of this message type _BACnetConstructedDataProgramChange struct { *_BACnetConstructedData - ProgramChange BACnetProgramRequestTagged + ProgramChange BACnetProgramRequestTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataProgramChange) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataProgramChange) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataProgramChange) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PROGRAM_CHANGE -} +func (m *_BACnetConstructedDataProgramChange) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PROGRAM_CHANGE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataProgramChange) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataProgramChange) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataProgramChange) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataProgramChange) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataProgramChange) GetActualValue() BACnetProgramRequ /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataProgramChange factory function for _BACnetConstructedDataProgramChange -func NewBACnetConstructedDataProgramChange(programChange BACnetProgramRequestTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataProgramChange { +func NewBACnetConstructedDataProgramChange( programChange BACnetProgramRequestTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataProgramChange { _result := &_BACnetConstructedDataProgramChange{ - ProgramChange: programChange, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ProgramChange: programChange, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataProgramChange(programChange BACnetProgramRequestTag // Deprecated: use the interface for direct cast func CastBACnetConstructedDataProgramChange(structType interface{}) BACnetConstructedDataProgramChange { - if casted, ok := structType.(BACnetConstructedDataProgramChange); ok { + if casted, ok := structType.(BACnetConstructedDataProgramChange); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataProgramChange); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataProgramChange) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetConstructedDataProgramChange) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataProgramChangeParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("programChange"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for programChange") } - _programChange, _programChangeErr := BACnetProgramRequestTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_programChange, _programChangeErr := BACnetProgramRequestTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _programChangeErr != nil { return nil, errors.Wrap(_programChangeErr, "Error parsing 'programChange' field of BACnetConstructedDataProgramChange") } @@ -186,7 +188,7 @@ func BACnetConstructedDataProgramChangeParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetConstructedDataProgramChange{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ProgramChange: programChange, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataProgramChange) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataProgramChange") } - // Simple Field (programChange) - if pushErr := writeBuffer.PushContext("programChange"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for programChange") - } - _programChangeErr := writeBuffer.WriteSerializable(ctx, m.GetProgramChange()) - if popErr := writeBuffer.PopContext("programChange"); popErr != nil { - return errors.Wrap(popErr, "Error popping for programChange") - } - if _programChangeErr != nil { - return errors.Wrap(_programChangeErr, "Error serializing 'programChange' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (programChange) + if pushErr := writeBuffer.PushContext("programChange"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for programChange") + } + _programChangeErr := writeBuffer.WriteSerializable(ctx, m.GetProgramChange()) + if popErr := writeBuffer.PopContext("programChange"); popErr != nil { + return errors.Wrap(popErr, "Error popping for programChange") + } + if _programChangeErr != nil { + return errors.Wrap(_programChangeErr, "Error serializing 'programChange' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataProgramChange"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataProgramChange") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataProgramChange) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataProgramChange) isBACnetConstructedDataProgramChange() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataProgramChange) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProgramLocation.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProgramLocation.go index dde07074679..b128442d28f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProgramLocation.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProgramLocation.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataProgramLocation is the corresponding interface of BACnetConstructedDataProgramLocation type BACnetConstructedDataProgramLocation interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataProgramLocationExactly interface { // _BACnetConstructedDataProgramLocation is the data-structure of this message type _BACnetConstructedDataProgramLocation struct { *_BACnetConstructedData - ProgramLocation BACnetApplicationTagCharacterString + ProgramLocation BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataProgramLocation) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataProgramLocation) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataProgramLocation) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PROGRAM_LOCATION -} +func (m *_BACnetConstructedDataProgramLocation) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PROGRAM_LOCATION} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataProgramLocation) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataProgramLocation) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataProgramLocation) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataProgramLocation) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataProgramLocation) GetActualValue() BACnetApplicati /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataProgramLocation factory function for _BACnetConstructedDataProgramLocation -func NewBACnetConstructedDataProgramLocation(programLocation BACnetApplicationTagCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataProgramLocation { +func NewBACnetConstructedDataProgramLocation( programLocation BACnetApplicationTagCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataProgramLocation { _result := &_BACnetConstructedDataProgramLocation{ - ProgramLocation: programLocation, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ProgramLocation: programLocation, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataProgramLocation(programLocation BACnetApplicationTa // Deprecated: use the interface for direct cast func CastBACnetConstructedDataProgramLocation(structType interface{}) BACnetConstructedDataProgramLocation { - if casted, ok := structType.(BACnetConstructedDataProgramLocation); ok { + if casted, ok := structType.(BACnetConstructedDataProgramLocation); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataProgramLocation); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataProgramLocation) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetConstructedDataProgramLocation) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataProgramLocationParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("programLocation"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for programLocation") } - _programLocation, _programLocationErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_programLocation, _programLocationErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _programLocationErr != nil { return nil, errors.Wrap(_programLocationErr, "Error parsing 'programLocation' field of BACnetConstructedDataProgramLocation") } @@ -186,7 +188,7 @@ func BACnetConstructedDataProgramLocationParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetConstructedDataProgramLocation{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ProgramLocation: programLocation, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataProgramLocation) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataProgramLocation") } - // Simple Field (programLocation) - if pushErr := writeBuffer.PushContext("programLocation"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for programLocation") - } - _programLocationErr := writeBuffer.WriteSerializable(ctx, m.GetProgramLocation()) - if popErr := writeBuffer.PopContext("programLocation"); popErr != nil { - return errors.Wrap(popErr, "Error popping for programLocation") - } - if _programLocationErr != nil { - return errors.Wrap(_programLocationErr, "Error serializing 'programLocation' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (programLocation) + if pushErr := writeBuffer.PushContext("programLocation"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for programLocation") + } + _programLocationErr := writeBuffer.WriteSerializable(ctx, m.GetProgramLocation()) + if popErr := writeBuffer.PopContext("programLocation"); popErr != nil { + return errors.Wrap(popErr, "Error popping for programLocation") + } + if _programLocationErr != nil { + return errors.Wrap(_programLocationErr, "Error serializing 'programLocation' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataProgramLocation"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataProgramLocation") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataProgramLocation) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataProgramLocation) isBACnetConstructedDataProgramLocation() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataProgramLocation) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProgramState.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProgramState.go index 2cbf7bd6dba..8045c05b207 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProgramState.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProgramState.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataProgramState is the corresponding interface of BACnetConstructedDataProgramState type BACnetConstructedDataProgramState interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataProgramStateExactly interface { // _BACnetConstructedDataProgramState is the data-structure of this message type _BACnetConstructedDataProgramState struct { *_BACnetConstructedData - ProgramState BACnetProgramStateTagged + ProgramState BACnetProgramStateTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataProgramState) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataProgramState) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataProgramState) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PROGRAM_STATE -} +func (m *_BACnetConstructedDataProgramState) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PROGRAM_STATE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataProgramState) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataProgramState) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataProgramState) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataProgramState) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataProgramState) GetActualValue() BACnetProgramState /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataProgramState factory function for _BACnetConstructedDataProgramState -func NewBACnetConstructedDataProgramState(programState BACnetProgramStateTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataProgramState { +func NewBACnetConstructedDataProgramState( programState BACnetProgramStateTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataProgramState { _result := &_BACnetConstructedDataProgramState{ - ProgramState: programState, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ProgramState: programState, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataProgramState(programState BACnetProgramStateTagged, // Deprecated: use the interface for direct cast func CastBACnetConstructedDataProgramState(structType interface{}) BACnetConstructedDataProgramState { - if casted, ok := structType.(BACnetConstructedDataProgramState); ok { + if casted, ok := structType.(BACnetConstructedDataProgramState); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataProgramState); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataProgramState) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetConstructedDataProgramState) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataProgramStateParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("programState"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for programState") } - _programState, _programStateErr := BACnetProgramStateTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_programState, _programStateErr := BACnetProgramStateTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _programStateErr != nil { return nil, errors.Wrap(_programStateErr, "Error parsing 'programState' field of BACnetConstructedDataProgramState") } @@ -186,7 +188,7 @@ func BACnetConstructedDataProgramStateParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetConstructedDataProgramState{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ProgramState: programState, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataProgramState) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataProgramState") } - // Simple Field (programState) - if pushErr := writeBuffer.PushContext("programState"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for programState") - } - _programStateErr := writeBuffer.WriteSerializable(ctx, m.GetProgramState()) - if popErr := writeBuffer.PopContext("programState"); popErr != nil { - return errors.Wrap(popErr, "Error popping for programState") - } - if _programStateErr != nil { - return errors.Wrap(_programStateErr, "Error serializing 'programState' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (programState) + if pushErr := writeBuffer.PushContext("programState"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for programState") + } + _programStateErr := writeBuffer.WriteSerializable(ctx, m.GetProgramState()) + if popErr := writeBuffer.PopContext("programState"); popErr != nil { + return errors.Wrap(popErr, "Error popping for programState") + } + if _programStateErr != nil { + return errors.Wrap(_programStateErr, "Error serializing 'programState' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataProgramState"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataProgramState") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataProgramState) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataProgramState) isBACnetConstructedDataProgramState() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataProgramState) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPropertyList.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPropertyList.go index 850b44f11f0..9cf47d58a49 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPropertyList.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPropertyList.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataPropertyList is the corresponding interface of BACnetConstructedDataPropertyList type BACnetConstructedDataPropertyList interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataPropertyListExactly interface { // _BACnetConstructedDataPropertyList is the data-structure of this message type _BACnetConstructedDataPropertyList struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - PropertyList []BACnetPropertyIdentifierTagged + NumberOfDataElements BACnetApplicationTagUnsignedInteger + PropertyList []BACnetPropertyIdentifierTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataPropertyList) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataPropertyList) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataPropertyList) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PROPERTY_LIST -} +func (m *_BACnetConstructedDataPropertyList) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PROPERTY_LIST} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataPropertyList) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataPropertyList) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataPropertyList) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataPropertyList) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataPropertyList) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataPropertyList factory function for _BACnetConstructedDataPropertyList -func NewBACnetConstructedDataPropertyList(numberOfDataElements BACnetApplicationTagUnsignedInteger, propertyList []BACnetPropertyIdentifierTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataPropertyList { +func NewBACnetConstructedDataPropertyList( numberOfDataElements BACnetApplicationTagUnsignedInteger , propertyList []BACnetPropertyIdentifierTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataPropertyList { _result := &_BACnetConstructedDataPropertyList{ - NumberOfDataElements: numberOfDataElements, - PropertyList: propertyList, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + PropertyList: propertyList, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataPropertyList(numberOfDataElements BACnetApplication // Deprecated: use the interface for direct cast func CastBACnetConstructedDataPropertyList(structType interface{}) BACnetConstructedDataPropertyList { - if casted, ok := structType.(BACnetConstructedDataPropertyList); ok { + if casted, ok := structType.(BACnetConstructedDataPropertyList); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataPropertyList); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataPropertyList) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetConstructedDataPropertyList) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataPropertyListParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataPropertyListParseWithBuffer(ctx context.Context, readB // Terminated array var propertyList []BACnetPropertyIdentifierTagged { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetPropertyIdentifierTaggedParseWithBuffer(ctx, readBuffer, uint8(0), TagClass_APPLICATION_TAGS) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetPropertyIdentifierTaggedParseWithBuffer(ctx, readBuffer , uint8(0) , TagClass_APPLICATION_TAGS ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'propertyList' field of BACnetConstructedDataPropertyList") } @@ -235,11 +237,11 @@ func BACnetConstructedDataPropertyListParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetConstructedDataPropertyList{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - PropertyList: propertyList, + PropertyList: propertyList, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataPropertyList) SerializeWithWriteBuffer(ctx contex if pushErr := writeBuffer.PushContext("BACnetConstructedDataPropertyList"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataPropertyList") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (propertyList) - if pushErr := writeBuffer.PushContext("propertyList", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for propertyList") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetPropertyList() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetPropertyList()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'propertyList' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("propertyList", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for propertyList") + } + + // Array Field (propertyList) + if pushErr := writeBuffer.PushContext("propertyList", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for propertyList") + } + for _curItem, _element := range m.GetPropertyList() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetPropertyList()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'propertyList' field") } + } + if popErr := writeBuffer.PopContext("propertyList", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for propertyList") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataPropertyList"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataPropertyList") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataPropertyList) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataPropertyList) isBACnetConstructedDataPropertyList() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataPropertyList) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProportionalConstant.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProportionalConstant.go index 8aba40789d4..8472ecd1f3e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProportionalConstant.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProportionalConstant.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataProportionalConstant is the corresponding interface of BACnetConstructedDataProportionalConstant type BACnetConstructedDataProportionalConstant interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataProportionalConstantExactly interface { // _BACnetConstructedDataProportionalConstant is the data-structure of this message type _BACnetConstructedDataProportionalConstant struct { *_BACnetConstructedData - ProportionalConstant BACnetApplicationTagReal + ProportionalConstant BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataProportionalConstant) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataProportionalConstant) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataProportionalConstant) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PROPORTIONAL_CONSTANT -} +func (m *_BACnetConstructedDataProportionalConstant) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PROPORTIONAL_CONSTANT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataProportionalConstant) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataProportionalConstant) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataProportionalConstant) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataProportionalConstant) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataProportionalConstant) GetActualValue() BACnetAppl /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataProportionalConstant factory function for _BACnetConstructedDataProportionalConstant -func NewBACnetConstructedDataProportionalConstant(proportionalConstant BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataProportionalConstant { +func NewBACnetConstructedDataProportionalConstant( proportionalConstant BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataProportionalConstant { _result := &_BACnetConstructedDataProportionalConstant{ - ProportionalConstant: proportionalConstant, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ProportionalConstant: proportionalConstant, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataProportionalConstant(proportionalConstant BACnetApp // Deprecated: use the interface for direct cast func CastBACnetConstructedDataProportionalConstant(structType interface{}) BACnetConstructedDataProportionalConstant { - if casted, ok := structType.(BACnetConstructedDataProportionalConstant); ok { + if casted, ok := structType.(BACnetConstructedDataProportionalConstant); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataProportionalConstant); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataProportionalConstant) GetLengthInBits(ctx context return lengthInBits } + func (m *_BACnetConstructedDataProportionalConstant) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataProportionalConstantParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("proportionalConstant"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for proportionalConstant") } - _proportionalConstant, _proportionalConstantErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_proportionalConstant, _proportionalConstantErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _proportionalConstantErr != nil { return nil, errors.Wrap(_proportionalConstantErr, "Error parsing 'proportionalConstant' field of BACnetConstructedDataProportionalConstant") } @@ -186,7 +188,7 @@ func BACnetConstructedDataProportionalConstantParseWithBuffer(ctx context.Contex // Create a partially initialized instance _child := &_BACnetConstructedDataProportionalConstant{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ProportionalConstant: proportionalConstant, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataProportionalConstant) SerializeWithWriteBuffer(ct return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataProportionalConstant") } - // Simple Field (proportionalConstant) - if pushErr := writeBuffer.PushContext("proportionalConstant"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for proportionalConstant") - } - _proportionalConstantErr := writeBuffer.WriteSerializable(ctx, m.GetProportionalConstant()) - if popErr := writeBuffer.PopContext("proportionalConstant"); popErr != nil { - return errors.Wrap(popErr, "Error popping for proportionalConstant") - } - if _proportionalConstantErr != nil { - return errors.Wrap(_proportionalConstantErr, "Error serializing 'proportionalConstant' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (proportionalConstant) + if pushErr := writeBuffer.PushContext("proportionalConstant"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for proportionalConstant") + } + _proportionalConstantErr := writeBuffer.WriteSerializable(ctx, m.GetProportionalConstant()) + if popErr := writeBuffer.PopContext("proportionalConstant"); popErr != nil { + return errors.Wrap(popErr, "Error popping for proportionalConstant") + } + if _proportionalConstantErr != nil { + return errors.Wrap(_proportionalConstantErr, "Error serializing 'proportionalConstant' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataProportionalConstant"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataProportionalConstant") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataProportionalConstant) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataProportionalConstant) isBACnetConstructedDataProportionalConstant() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataProportionalConstant) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProportionalConstantUnits.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProportionalConstantUnits.go index 6024722907d..52536f03fe9 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProportionalConstantUnits.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProportionalConstantUnits.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataProportionalConstantUnits is the corresponding interface of BACnetConstructedDataProportionalConstantUnits type BACnetConstructedDataProportionalConstantUnits interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataProportionalConstantUnitsExactly interface { // _BACnetConstructedDataProportionalConstantUnits is the data-structure of this message type _BACnetConstructedDataProportionalConstantUnits struct { *_BACnetConstructedData - Units BACnetEngineeringUnitsTagged + Units BACnetEngineeringUnitsTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataProportionalConstantUnits) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataProportionalConstantUnits) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataProportionalConstantUnits) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PROPORTIONAL_CONSTANT_UNITS -} +func (m *_BACnetConstructedDataProportionalConstantUnits) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PROPORTIONAL_CONSTANT_UNITS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataProportionalConstantUnits) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataProportionalConstantUnits) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataProportionalConstantUnits) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataProportionalConstantUnits) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataProportionalConstantUnits) GetActualValue() BACne /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataProportionalConstantUnits factory function for _BACnetConstructedDataProportionalConstantUnits -func NewBACnetConstructedDataProportionalConstantUnits(units BACnetEngineeringUnitsTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataProportionalConstantUnits { +func NewBACnetConstructedDataProportionalConstantUnits( units BACnetEngineeringUnitsTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataProportionalConstantUnits { _result := &_BACnetConstructedDataProportionalConstantUnits{ - Units: units, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Units: units, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataProportionalConstantUnits(units BACnetEngineeringUn // Deprecated: use the interface for direct cast func CastBACnetConstructedDataProportionalConstantUnits(structType interface{}) BACnetConstructedDataProportionalConstantUnits { - if casted, ok := structType.(BACnetConstructedDataProportionalConstantUnits); ok { + if casted, ok := structType.(BACnetConstructedDataProportionalConstantUnits); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataProportionalConstantUnits); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataProportionalConstantUnits) GetLengthInBits(ctx co return lengthInBits } + func (m *_BACnetConstructedDataProportionalConstantUnits) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataProportionalConstantUnitsParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("units"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for units") } - _units, _unitsErr := BACnetEngineeringUnitsTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_units, _unitsErr := BACnetEngineeringUnitsTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _unitsErr != nil { return nil, errors.Wrap(_unitsErr, "Error parsing 'units' field of BACnetConstructedDataProportionalConstantUnits") } @@ -186,7 +188,7 @@ func BACnetConstructedDataProportionalConstantUnitsParseWithBuffer(ctx context.C // Create a partially initialized instance _child := &_BACnetConstructedDataProportionalConstantUnits{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Units: units, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataProportionalConstantUnits) SerializeWithWriteBuff return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataProportionalConstantUnits") } - // Simple Field (units) - if pushErr := writeBuffer.PushContext("units"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for units") - } - _unitsErr := writeBuffer.WriteSerializable(ctx, m.GetUnits()) - if popErr := writeBuffer.PopContext("units"); popErr != nil { - return errors.Wrap(popErr, "Error popping for units") - } - if _unitsErr != nil { - return errors.Wrap(_unitsErr, "Error serializing 'units' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (units) + if pushErr := writeBuffer.PushContext("units"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for units") + } + _unitsErr := writeBuffer.WriteSerializable(ctx, m.GetUnits()) + if popErr := writeBuffer.PopContext("units"); popErr != nil { + return errors.Wrap(popErr, "Error popping for units") + } + if _unitsErr != nil { + return errors.Wrap(_unitsErr, "Error serializing 'units' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataProportionalConstantUnits"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataProportionalConstantUnits") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataProportionalConstantUnits) SerializeWithWriteBuff return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataProportionalConstantUnits) isBACnetConstructedDataProportionalConstantUnits() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataProportionalConstantUnits) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProtocolLevel.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProtocolLevel.go index a2a9966835b..a9a7f2eb464 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProtocolLevel.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProtocolLevel.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataProtocolLevel is the corresponding interface of BACnetConstructedDataProtocolLevel type BACnetConstructedDataProtocolLevel interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataProtocolLevelExactly interface { // _BACnetConstructedDataProtocolLevel is the data-structure of this message type _BACnetConstructedDataProtocolLevel struct { *_BACnetConstructedData - ProtocolLevel BACnetProtocolLevelTagged + ProtocolLevel BACnetProtocolLevelTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataProtocolLevel) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataProtocolLevel) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataProtocolLevel) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PROTOCOL_LEVEL -} +func (m *_BACnetConstructedDataProtocolLevel) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PROTOCOL_LEVEL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataProtocolLevel) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataProtocolLevel) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataProtocolLevel) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataProtocolLevel) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataProtocolLevel) GetActualValue() BACnetProtocolLev /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataProtocolLevel factory function for _BACnetConstructedDataProtocolLevel -func NewBACnetConstructedDataProtocolLevel(protocolLevel BACnetProtocolLevelTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataProtocolLevel { +func NewBACnetConstructedDataProtocolLevel( protocolLevel BACnetProtocolLevelTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataProtocolLevel { _result := &_BACnetConstructedDataProtocolLevel{ - ProtocolLevel: protocolLevel, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ProtocolLevel: protocolLevel, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataProtocolLevel(protocolLevel BACnetProtocolLevelTagg // Deprecated: use the interface for direct cast func CastBACnetConstructedDataProtocolLevel(structType interface{}) BACnetConstructedDataProtocolLevel { - if casted, ok := structType.(BACnetConstructedDataProtocolLevel); ok { + if casted, ok := structType.(BACnetConstructedDataProtocolLevel); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataProtocolLevel); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataProtocolLevel) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetConstructedDataProtocolLevel) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataProtocolLevelParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("protocolLevel"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for protocolLevel") } - _protocolLevel, _protocolLevelErr := BACnetProtocolLevelTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_protocolLevel, _protocolLevelErr := BACnetProtocolLevelTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _protocolLevelErr != nil { return nil, errors.Wrap(_protocolLevelErr, "Error parsing 'protocolLevel' field of BACnetConstructedDataProtocolLevel") } @@ -186,7 +188,7 @@ func BACnetConstructedDataProtocolLevelParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetConstructedDataProtocolLevel{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ProtocolLevel: protocolLevel, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataProtocolLevel) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataProtocolLevel") } - // Simple Field (protocolLevel) - if pushErr := writeBuffer.PushContext("protocolLevel"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for protocolLevel") - } - _protocolLevelErr := writeBuffer.WriteSerializable(ctx, m.GetProtocolLevel()) - if popErr := writeBuffer.PopContext("protocolLevel"); popErr != nil { - return errors.Wrap(popErr, "Error popping for protocolLevel") - } - if _protocolLevelErr != nil { - return errors.Wrap(_protocolLevelErr, "Error serializing 'protocolLevel' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (protocolLevel) + if pushErr := writeBuffer.PushContext("protocolLevel"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for protocolLevel") + } + _protocolLevelErr := writeBuffer.WriteSerializable(ctx, m.GetProtocolLevel()) + if popErr := writeBuffer.PopContext("protocolLevel"); popErr != nil { + return errors.Wrap(popErr, "Error popping for protocolLevel") + } + if _protocolLevelErr != nil { + return errors.Wrap(_protocolLevelErr, "Error serializing 'protocolLevel' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataProtocolLevel"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataProtocolLevel") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataProtocolLevel) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataProtocolLevel) isBACnetConstructedDataProtocolLevel() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataProtocolLevel) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProtocolObjectTypesSupported.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProtocolObjectTypesSupported.go index 67e83eb27b1..1c242da2b04 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProtocolObjectTypesSupported.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProtocolObjectTypesSupported.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataProtocolObjectTypesSupported is the corresponding interface of BACnetConstructedDataProtocolObjectTypesSupported type BACnetConstructedDataProtocolObjectTypesSupported interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataProtocolObjectTypesSupportedExactly interface { // _BACnetConstructedDataProtocolObjectTypesSupported is the data-structure of this message type _BACnetConstructedDataProtocolObjectTypesSupported struct { *_BACnetConstructedData - ProtocolObjectTypesSupported BACnetObjectTypesSupportedTagged + ProtocolObjectTypesSupported BACnetObjectTypesSupportedTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataProtocolObjectTypesSupported) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataProtocolObjectTypesSupported) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataProtocolObjectTypesSupported) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PROTOCOL_OBJECT_TYPES_SUPPORTED -} +func (m *_BACnetConstructedDataProtocolObjectTypesSupported) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PROTOCOL_OBJECT_TYPES_SUPPORTED} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataProtocolObjectTypesSupported) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataProtocolObjectTypesSupported) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataProtocolObjectTypesSupported) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataProtocolObjectTypesSupported) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataProtocolObjectTypesSupported) GetActualValue() BA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataProtocolObjectTypesSupported factory function for _BACnetConstructedDataProtocolObjectTypesSupported -func NewBACnetConstructedDataProtocolObjectTypesSupported(protocolObjectTypesSupported BACnetObjectTypesSupportedTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataProtocolObjectTypesSupported { +func NewBACnetConstructedDataProtocolObjectTypesSupported( protocolObjectTypesSupported BACnetObjectTypesSupportedTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataProtocolObjectTypesSupported { _result := &_BACnetConstructedDataProtocolObjectTypesSupported{ ProtocolObjectTypesSupported: protocolObjectTypesSupported, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataProtocolObjectTypesSupported(protocolObjectTypesSup // Deprecated: use the interface for direct cast func CastBACnetConstructedDataProtocolObjectTypesSupported(structType interface{}) BACnetConstructedDataProtocolObjectTypesSupported { - if casted, ok := structType.(BACnetConstructedDataProtocolObjectTypesSupported); ok { + if casted, ok := structType.(BACnetConstructedDataProtocolObjectTypesSupported); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataProtocolObjectTypesSupported); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataProtocolObjectTypesSupported) GetLengthInBits(ctx return lengthInBits } + func (m *_BACnetConstructedDataProtocolObjectTypesSupported) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataProtocolObjectTypesSupportedParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("protocolObjectTypesSupported"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for protocolObjectTypesSupported") } - _protocolObjectTypesSupported, _protocolObjectTypesSupportedErr := BACnetObjectTypesSupportedTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_protocolObjectTypesSupported, _protocolObjectTypesSupportedErr := BACnetObjectTypesSupportedTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _protocolObjectTypesSupportedErr != nil { return nil, errors.Wrap(_protocolObjectTypesSupportedErr, "Error parsing 'protocolObjectTypesSupported' field of BACnetConstructedDataProtocolObjectTypesSupported") } @@ -186,7 +188,7 @@ func BACnetConstructedDataProtocolObjectTypesSupportedParseWithBuffer(ctx contex // Create a partially initialized instance _child := &_BACnetConstructedDataProtocolObjectTypesSupported{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ProtocolObjectTypesSupported: protocolObjectTypesSupported, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataProtocolObjectTypesSupported) SerializeWithWriteB return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataProtocolObjectTypesSupported") } - // Simple Field (protocolObjectTypesSupported) - if pushErr := writeBuffer.PushContext("protocolObjectTypesSupported"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for protocolObjectTypesSupported") - } - _protocolObjectTypesSupportedErr := writeBuffer.WriteSerializable(ctx, m.GetProtocolObjectTypesSupported()) - if popErr := writeBuffer.PopContext("protocolObjectTypesSupported"); popErr != nil { - return errors.Wrap(popErr, "Error popping for protocolObjectTypesSupported") - } - if _protocolObjectTypesSupportedErr != nil { - return errors.Wrap(_protocolObjectTypesSupportedErr, "Error serializing 'protocolObjectTypesSupported' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (protocolObjectTypesSupported) + if pushErr := writeBuffer.PushContext("protocolObjectTypesSupported"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for protocolObjectTypesSupported") + } + _protocolObjectTypesSupportedErr := writeBuffer.WriteSerializable(ctx, m.GetProtocolObjectTypesSupported()) + if popErr := writeBuffer.PopContext("protocolObjectTypesSupported"); popErr != nil { + return errors.Wrap(popErr, "Error popping for protocolObjectTypesSupported") + } + if _protocolObjectTypesSupportedErr != nil { + return errors.Wrap(_protocolObjectTypesSupportedErr, "Error serializing 'protocolObjectTypesSupported' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataProtocolObjectTypesSupported"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataProtocolObjectTypesSupported") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataProtocolObjectTypesSupported) SerializeWithWriteB return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataProtocolObjectTypesSupported) isBACnetConstructedDataProtocolObjectTypesSupported() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataProtocolObjectTypesSupported) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProtocolRevision.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProtocolRevision.go index 4d19a7b90ef..4e50b47f933 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProtocolRevision.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProtocolRevision.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataProtocolRevision is the corresponding interface of BACnetConstructedDataProtocolRevision type BACnetConstructedDataProtocolRevision interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataProtocolRevisionExactly interface { // _BACnetConstructedDataProtocolRevision is the data-structure of this message type _BACnetConstructedDataProtocolRevision struct { *_BACnetConstructedData - ProtocolRevision BACnetApplicationTagUnsignedInteger + ProtocolRevision BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataProtocolRevision) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataProtocolRevision) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataProtocolRevision) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PROTOCOL_REVISION -} +func (m *_BACnetConstructedDataProtocolRevision) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PROTOCOL_REVISION} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataProtocolRevision) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataProtocolRevision) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataProtocolRevision) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataProtocolRevision) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataProtocolRevision) GetActualValue() BACnetApplicat /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataProtocolRevision factory function for _BACnetConstructedDataProtocolRevision -func NewBACnetConstructedDataProtocolRevision(protocolRevision BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataProtocolRevision { +func NewBACnetConstructedDataProtocolRevision( protocolRevision BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataProtocolRevision { _result := &_BACnetConstructedDataProtocolRevision{ - ProtocolRevision: protocolRevision, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ProtocolRevision: protocolRevision, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataProtocolRevision(protocolRevision BACnetApplication // Deprecated: use the interface for direct cast func CastBACnetConstructedDataProtocolRevision(structType interface{}) BACnetConstructedDataProtocolRevision { - if casted, ok := structType.(BACnetConstructedDataProtocolRevision); ok { + if casted, ok := structType.(BACnetConstructedDataProtocolRevision); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataProtocolRevision); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataProtocolRevision) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetConstructedDataProtocolRevision) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataProtocolRevisionParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("protocolRevision"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for protocolRevision") } - _protocolRevision, _protocolRevisionErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_protocolRevision, _protocolRevisionErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _protocolRevisionErr != nil { return nil, errors.Wrap(_protocolRevisionErr, "Error parsing 'protocolRevision' field of BACnetConstructedDataProtocolRevision") } @@ -186,7 +188,7 @@ func BACnetConstructedDataProtocolRevisionParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_BACnetConstructedDataProtocolRevision{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ProtocolRevision: protocolRevision, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataProtocolRevision) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataProtocolRevision") } - // Simple Field (protocolRevision) - if pushErr := writeBuffer.PushContext("protocolRevision"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for protocolRevision") - } - _protocolRevisionErr := writeBuffer.WriteSerializable(ctx, m.GetProtocolRevision()) - if popErr := writeBuffer.PopContext("protocolRevision"); popErr != nil { - return errors.Wrap(popErr, "Error popping for protocolRevision") - } - if _protocolRevisionErr != nil { - return errors.Wrap(_protocolRevisionErr, "Error serializing 'protocolRevision' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (protocolRevision) + if pushErr := writeBuffer.PushContext("protocolRevision"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for protocolRevision") + } + _protocolRevisionErr := writeBuffer.WriteSerializable(ctx, m.GetProtocolRevision()) + if popErr := writeBuffer.PopContext("protocolRevision"); popErr != nil { + return errors.Wrap(popErr, "Error popping for protocolRevision") + } + if _protocolRevisionErr != nil { + return errors.Wrap(_protocolRevisionErr, "Error serializing 'protocolRevision' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataProtocolRevision"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataProtocolRevision") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataProtocolRevision) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataProtocolRevision) isBACnetConstructedDataProtocolRevision() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataProtocolRevision) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProtocolServicesSupported.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProtocolServicesSupported.go index b1bdebad86b..d74b81c0f4e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProtocolServicesSupported.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProtocolServicesSupported.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataProtocolServicesSupported is the corresponding interface of BACnetConstructedDataProtocolServicesSupported type BACnetConstructedDataProtocolServicesSupported interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataProtocolServicesSupportedExactly interface { // _BACnetConstructedDataProtocolServicesSupported is the data-structure of this message type _BACnetConstructedDataProtocolServicesSupported struct { *_BACnetConstructedData - ProtocolServicesSupported BACnetServicesSupportedTagged + ProtocolServicesSupported BACnetServicesSupportedTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataProtocolServicesSupported) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataProtocolServicesSupported) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataProtocolServicesSupported) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PROTOCOL_SERVICES_SUPPORTED -} +func (m *_BACnetConstructedDataProtocolServicesSupported) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PROTOCOL_SERVICES_SUPPORTED} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataProtocolServicesSupported) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataProtocolServicesSupported) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataProtocolServicesSupported) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataProtocolServicesSupported) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataProtocolServicesSupported) GetActualValue() BACne /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataProtocolServicesSupported factory function for _BACnetConstructedDataProtocolServicesSupported -func NewBACnetConstructedDataProtocolServicesSupported(protocolServicesSupported BACnetServicesSupportedTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataProtocolServicesSupported { +func NewBACnetConstructedDataProtocolServicesSupported( protocolServicesSupported BACnetServicesSupportedTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataProtocolServicesSupported { _result := &_BACnetConstructedDataProtocolServicesSupported{ ProtocolServicesSupported: protocolServicesSupported, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataProtocolServicesSupported(protocolServicesSupported // Deprecated: use the interface for direct cast func CastBACnetConstructedDataProtocolServicesSupported(structType interface{}) BACnetConstructedDataProtocolServicesSupported { - if casted, ok := structType.(BACnetConstructedDataProtocolServicesSupported); ok { + if casted, ok := structType.(BACnetConstructedDataProtocolServicesSupported); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataProtocolServicesSupported); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataProtocolServicesSupported) GetLengthInBits(ctx co return lengthInBits } + func (m *_BACnetConstructedDataProtocolServicesSupported) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataProtocolServicesSupportedParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("protocolServicesSupported"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for protocolServicesSupported") } - _protocolServicesSupported, _protocolServicesSupportedErr := BACnetServicesSupportedTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_protocolServicesSupported, _protocolServicesSupportedErr := BACnetServicesSupportedTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _protocolServicesSupportedErr != nil { return nil, errors.Wrap(_protocolServicesSupportedErr, "Error parsing 'protocolServicesSupported' field of BACnetConstructedDataProtocolServicesSupported") } @@ -186,7 +188,7 @@ func BACnetConstructedDataProtocolServicesSupportedParseWithBuffer(ctx context.C // Create a partially initialized instance _child := &_BACnetConstructedDataProtocolServicesSupported{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ProtocolServicesSupported: protocolServicesSupported, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataProtocolServicesSupported) SerializeWithWriteBuff return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataProtocolServicesSupported") } - // Simple Field (protocolServicesSupported) - if pushErr := writeBuffer.PushContext("protocolServicesSupported"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for protocolServicesSupported") - } - _protocolServicesSupportedErr := writeBuffer.WriteSerializable(ctx, m.GetProtocolServicesSupported()) - if popErr := writeBuffer.PopContext("protocolServicesSupported"); popErr != nil { - return errors.Wrap(popErr, "Error popping for protocolServicesSupported") - } - if _protocolServicesSupportedErr != nil { - return errors.Wrap(_protocolServicesSupportedErr, "Error serializing 'protocolServicesSupported' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (protocolServicesSupported) + if pushErr := writeBuffer.PushContext("protocolServicesSupported"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for protocolServicesSupported") + } + _protocolServicesSupportedErr := writeBuffer.WriteSerializable(ctx, m.GetProtocolServicesSupported()) + if popErr := writeBuffer.PopContext("protocolServicesSupported"); popErr != nil { + return errors.Wrap(popErr, "Error popping for protocolServicesSupported") + } + if _protocolServicesSupportedErr != nil { + return errors.Wrap(_protocolServicesSupportedErr, "Error serializing 'protocolServicesSupported' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataProtocolServicesSupported"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataProtocolServicesSupported") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataProtocolServicesSupported) SerializeWithWriteBuff return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataProtocolServicesSupported) isBACnetConstructedDataProtocolServicesSupported() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataProtocolServicesSupported) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProtocolVersion.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProtocolVersion.go index f057f896171..595d857fafd 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProtocolVersion.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataProtocolVersion.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataProtocolVersion is the corresponding interface of BACnetConstructedDataProtocolVersion type BACnetConstructedDataProtocolVersion interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataProtocolVersionExactly interface { // _BACnetConstructedDataProtocolVersion is the data-structure of this message type _BACnetConstructedDataProtocolVersion struct { *_BACnetConstructedData - ProtocolVersion BACnetApplicationTagUnsignedInteger + ProtocolVersion BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataProtocolVersion) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataProtocolVersion) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataProtocolVersion) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PROTOCOL_VERSION -} +func (m *_BACnetConstructedDataProtocolVersion) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PROTOCOL_VERSION} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataProtocolVersion) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataProtocolVersion) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataProtocolVersion) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataProtocolVersion) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataProtocolVersion) GetActualValue() BACnetApplicati /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataProtocolVersion factory function for _BACnetConstructedDataProtocolVersion -func NewBACnetConstructedDataProtocolVersion(protocolVersion BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataProtocolVersion { +func NewBACnetConstructedDataProtocolVersion( protocolVersion BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataProtocolVersion { _result := &_BACnetConstructedDataProtocolVersion{ - ProtocolVersion: protocolVersion, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ProtocolVersion: protocolVersion, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataProtocolVersion(protocolVersion BACnetApplicationTa // Deprecated: use the interface for direct cast func CastBACnetConstructedDataProtocolVersion(structType interface{}) BACnetConstructedDataProtocolVersion { - if casted, ok := structType.(BACnetConstructedDataProtocolVersion); ok { + if casted, ok := structType.(BACnetConstructedDataProtocolVersion); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataProtocolVersion); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataProtocolVersion) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetConstructedDataProtocolVersion) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataProtocolVersionParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("protocolVersion"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for protocolVersion") } - _protocolVersion, _protocolVersionErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_protocolVersion, _protocolVersionErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _protocolVersionErr != nil { return nil, errors.Wrap(_protocolVersionErr, "Error parsing 'protocolVersion' field of BACnetConstructedDataProtocolVersion") } @@ -186,7 +188,7 @@ func BACnetConstructedDataProtocolVersionParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetConstructedDataProtocolVersion{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ProtocolVersion: protocolVersion, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataProtocolVersion) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataProtocolVersion") } - // Simple Field (protocolVersion) - if pushErr := writeBuffer.PushContext("protocolVersion"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for protocolVersion") - } - _protocolVersionErr := writeBuffer.WriteSerializable(ctx, m.GetProtocolVersion()) - if popErr := writeBuffer.PopContext("protocolVersion"); popErr != nil { - return errors.Wrap(popErr, "Error popping for protocolVersion") - } - if _protocolVersionErr != nil { - return errors.Wrap(_protocolVersionErr, "Error serializing 'protocolVersion' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (protocolVersion) + if pushErr := writeBuffer.PushContext("protocolVersion"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for protocolVersion") + } + _protocolVersionErr := writeBuffer.WriteSerializable(ctx, m.GetProtocolVersion()) + if popErr := writeBuffer.PopContext("protocolVersion"); popErr != nil { + return errors.Wrap(popErr, "Error popping for protocolVersion") + } + if _protocolVersionErr != nil { + return errors.Wrap(_protocolVersionErr, "Error serializing 'protocolVersion' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataProtocolVersion"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataProtocolVersion") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataProtocolVersion) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataProtocolVersion) isBACnetConstructedDataProtocolVersion() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataProtocolVersion) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPulseConverterAdjustValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPulseConverterAdjustValue.go index 1bbc39a8765..a9bd70be79e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPulseConverterAdjustValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPulseConverterAdjustValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataPulseConverterAdjustValue is the corresponding interface of BACnetConstructedDataPulseConverterAdjustValue type BACnetConstructedDataPulseConverterAdjustValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataPulseConverterAdjustValueExactly interface { // _BACnetConstructedDataPulseConverterAdjustValue is the data-structure of this message type _BACnetConstructedDataPulseConverterAdjustValue struct { *_BACnetConstructedData - AdjustValue BACnetApplicationTagReal + AdjustValue BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataPulseConverterAdjustValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_PULSE_CONVERTER -} +func (m *_BACnetConstructedDataPulseConverterAdjustValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_PULSE_CONVERTER} -func (m *_BACnetConstructedDataPulseConverterAdjustValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ADJUST_VALUE -} +func (m *_BACnetConstructedDataPulseConverterAdjustValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ADJUST_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataPulseConverterAdjustValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataPulseConverterAdjustValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataPulseConverterAdjustValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataPulseConverterAdjustValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataPulseConverterAdjustValue) GetActualValue() BACne /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataPulseConverterAdjustValue factory function for _BACnetConstructedDataPulseConverterAdjustValue -func NewBACnetConstructedDataPulseConverterAdjustValue(adjustValue BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataPulseConverterAdjustValue { +func NewBACnetConstructedDataPulseConverterAdjustValue( adjustValue BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataPulseConverterAdjustValue { _result := &_BACnetConstructedDataPulseConverterAdjustValue{ - AdjustValue: adjustValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + AdjustValue: adjustValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataPulseConverterAdjustValue(adjustValue BACnetApplica // Deprecated: use the interface for direct cast func CastBACnetConstructedDataPulseConverterAdjustValue(structType interface{}) BACnetConstructedDataPulseConverterAdjustValue { - if casted, ok := structType.(BACnetConstructedDataPulseConverterAdjustValue); ok { + if casted, ok := structType.(BACnetConstructedDataPulseConverterAdjustValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataPulseConverterAdjustValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataPulseConverterAdjustValue) GetLengthInBits(ctx co return lengthInBits } + func (m *_BACnetConstructedDataPulseConverterAdjustValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataPulseConverterAdjustValueParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("adjustValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for adjustValue") } - _adjustValue, _adjustValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_adjustValue, _adjustValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _adjustValueErr != nil { return nil, errors.Wrap(_adjustValueErr, "Error parsing 'adjustValue' field of BACnetConstructedDataPulseConverterAdjustValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataPulseConverterAdjustValueParseWithBuffer(ctx context.C // Create a partially initialized instance _child := &_BACnetConstructedDataPulseConverterAdjustValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, AdjustValue: adjustValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataPulseConverterAdjustValue) SerializeWithWriteBuff return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataPulseConverterAdjustValue") } - // Simple Field (adjustValue) - if pushErr := writeBuffer.PushContext("adjustValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for adjustValue") - } - _adjustValueErr := writeBuffer.WriteSerializable(ctx, m.GetAdjustValue()) - if popErr := writeBuffer.PopContext("adjustValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for adjustValue") - } - if _adjustValueErr != nil { - return errors.Wrap(_adjustValueErr, "Error serializing 'adjustValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (adjustValue) + if pushErr := writeBuffer.PushContext("adjustValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for adjustValue") + } + _adjustValueErr := writeBuffer.WriteSerializable(ctx, m.GetAdjustValue()) + if popErr := writeBuffer.PopContext("adjustValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for adjustValue") + } + if _adjustValueErr != nil { + return errors.Wrap(_adjustValueErr, "Error serializing 'adjustValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataPulseConverterAdjustValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataPulseConverterAdjustValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataPulseConverterAdjustValue) SerializeWithWriteBuff return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataPulseConverterAdjustValue) isBACnetConstructedDataPulseConverterAdjustValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataPulseConverterAdjustValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPulseConverterAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPulseConverterAll.go index 00fe8d03417..2f2bebf9ca3 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPulseConverterAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPulseConverterAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataPulseConverterAll is the corresponding interface of BACnetConstructedDataPulseConverterAll type BACnetConstructedDataPulseConverterAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataPulseConverterAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataPulseConverterAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_PULSE_CONVERTER -} +func (m *_BACnetConstructedDataPulseConverterAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_PULSE_CONVERTER} -func (m *_BACnetConstructedDataPulseConverterAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataPulseConverterAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataPulseConverterAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataPulseConverterAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataPulseConverterAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataPulseConverterAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataPulseConverterAll factory function for _BACnetConstructedDataPulseConverterAll -func NewBACnetConstructedDataPulseConverterAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataPulseConverterAll { +func NewBACnetConstructedDataPulseConverterAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataPulseConverterAll { _result := &_BACnetConstructedDataPulseConverterAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataPulseConverterAll(openingTag BACnetOpeningTag, peek // Deprecated: use the interface for direct cast func CastBACnetConstructedDataPulseConverterAll(structType interface{}) BACnetConstructedDataPulseConverterAll { - if casted, ok := structType.(BACnetConstructedDataPulseConverterAll); ok { + if casted, ok := structType.(BACnetConstructedDataPulseConverterAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataPulseConverterAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataPulseConverterAll) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetConstructedDataPulseConverterAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataPulseConverterAllParseWithBuffer(ctx context.Context, _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataPulseConverterAllParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataPulseConverterAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataPulseConverterAll) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataPulseConverterAll) isBACnetConstructedDataPulseConverterAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataPulseConverterAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPulseConverterPresentValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPulseConverterPresentValue.go index 95c105d9ab5..19cdac676ee 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPulseConverterPresentValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPulseConverterPresentValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataPulseConverterPresentValue is the corresponding interface of BACnetConstructedDataPulseConverterPresentValue type BACnetConstructedDataPulseConverterPresentValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataPulseConverterPresentValueExactly interface { // _BACnetConstructedDataPulseConverterPresentValue is the data-structure of this message type _BACnetConstructedDataPulseConverterPresentValue struct { *_BACnetConstructedData - PresentValue BACnetApplicationTagReal + PresentValue BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataPulseConverterPresentValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_PULSE_CONVERTER -} +func (m *_BACnetConstructedDataPulseConverterPresentValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_PULSE_CONVERTER} -func (m *_BACnetConstructedDataPulseConverterPresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PRESENT_VALUE -} +func (m *_BACnetConstructedDataPulseConverterPresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PRESENT_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataPulseConverterPresentValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataPulseConverterPresentValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataPulseConverterPresentValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataPulseConverterPresentValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataPulseConverterPresentValue) GetActualValue() BACn /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataPulseConverterPresentValue factory function for _BACnetConstructedDataPulseConverterPresentValue -func NewBACnetConstructedDataPulseConverterPresentValue(presentValue BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataPulseConverterPresentValue { +func NewBACnetConstructedDataPulseConverterPresentValue( presentValue BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataPulseConverterPresentValue { _result := &_BACnetConstructedDataPulseConverterPresentValue{ - PresentValue: presentValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PresentValue: presentValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataPulseConverterPresentValue(presentValue BACnetAppli // Deprecated: use the interface for direct cast func CastBACnetConstructedDataPulseConverterPresentValue(structType interface{}) BACnetConstructedDataPulseConverterPresentValue { - if casted, ok := structType.(BACnetConstructedDataPulseConverterPresentValue); ok { + if casted, ok := structType.(BACnetConstructedDataPulseConverterPresentValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataPulseConverterPresentValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataPulseConverterPresentValue) GetLengthInBits(ctx c return lengthInBits } + func (m *_BACnetConstructedDataPulseConverterPresentValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataPulseConverterPresentValueParseWithBuffer(ctx context. if pullErr := readBuffer.PullContext("presentValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for presentValue") } - _presentValue, _presentValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_presentValue, _presentValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _presentValueErr != nil { return nil, errors.Wrap(_presentValueErr, "Error parsing 'presentValue' field of BACnetConstructedDataPulseConverterPresentValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataPulseConverterPresentValueParseWithBuffer(ctx context. // Create a partially initialized instance _child := &_BACnetConstructedDataPulseConverterPresentValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PresentValue: presentValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataPulseConverterPresentValue) SerializeWithWriteBuf return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataPulseConverterPresentValue") } - // Simple Field (presentValue) - if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for presentValue") - } - _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) - if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for presentValue") - } - if _presentValueErr != nil { - return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (presentValue) + if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for presentValue") + } + _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) + if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for presentValue") + } + if _presentValueErr != nil { + return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataPulseConverterPresentValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataPulseConverterPresentValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataPulseConverterPresentValue) SerializeWithWriteBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataPulseConverterPresentValue) isBACnetConstructedDataPulseConverterPresentValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataPulseConverterPresentValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPulseRate.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPulseRate.go index 09ef8de606d..852b44698b1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPulseRate.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPulseRate.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataPulseRate is the corresponding interface of BACnetConstructedDataPulseRate type BACnetConstructedDataPulseRate interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataPulseRateExactly interface { // _BACnetConstructedDataPulseRate is the data-structure of this message type _BACnetConstructedDataPulseRate struct { *_BACnetConstructedData - PulseRate BACnetApplicationTagUnsignedInteger + PulseRate BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataPulseRate) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataPulseRate) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataPulseRate) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PULSE_RATE -} +func (m *_BACnetConstructedDataPulseRate) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PULSE_RATE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataPulseRate) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataPulseRate) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataPulseRate) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataPulseRate) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataPulseRate) GetActualValue() BACnetApplicationTagU /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataPulseRate factory function for _BACnetConstructedDataPulseRate -func NewBACnetConstructedDataPulseRate(pulseRate BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataPulseRate { +func NewBACnetConstructedDataPulseRate( pulseRate BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataPulseRate { _result := &_BACnetConstructedDataPulseRate{ - PulseRate: pulseRate, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PulseRate: pulseRate, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataPulseRate(pulseRate BACnetApplicationTagUnsignedInt // Deprecated: use the interface for direct cast func CastBACnetConstructedDataPulseRate(structType interface{}) BACnetConstructedDataPulseRate { - if casted, ok := structType.(BACnetConstructedDataPulseRate); ok { + if casted, ok := structType.(BACnetConstructedDataPulseRate); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataPulseRate); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataPulseRate) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetConstructedDataPulseRate) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataPulseRateParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("pulseRate"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for pulseRate") } - _pulseRate, _pulseRateErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_pulseRate, _pulseRateErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _pulseRateErr != nil { return nil, errors.Wrap(_pulseRateErr, "Error parsing 'pulseRate' field of BACnetConstructedDataPulseRate") } @@ -186,7 +188,7 @@ func BACnetConstructedDataPulseRateParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_BACnetConstructedDataPulseRate{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PulseRate: pulseRate, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataPulseRate) SerializeWithWriteBuffer(ctx context.C return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataPulseRate") } - // Simple Field (pulseRate) - if pushErr := writeBuffer.PushContext("pulseRate"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for pulseRate") - } - _pulseRateErr := writeBuffer.WriteSerializable(ctx, m.GetPulseRate()) - if popErr := writeBuffer.PopContext("pulseRate"); popErr != nil { - return errors.Wrap(popErr, "Error popping for pulseRate") - } - if _pulseRateErr != nil { - return errors.Wrap(_pulseRateErr, "Error serializing 'pulseRate' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (pulseRate) + if pushErr := writeBuffer.PushContext("pulseRate"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for pulseRate") + } + _pulseRateErr := writeBuffer.WriteSerializable(ctx, m.GetPulseRate()) + if popErr := writeBuffer.PopContext("pulseRate"); popErr != nil { + return errors.Wrap(popErr, "Error popping for pulseRate") + } + if _pulseRateErr != nil { + return errors.Wrap(_pulseRateErr, "Error serializing 'pulseRate' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataPulseRate"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataPulseRate") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataPulseRate) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataPulseRate) isBACnetConstructedDataPulseRate() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataPulseRate) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataReadOnly.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataReadOnly.go index 77101901214..f28e7b7846b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataReadOnly.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataReadOnly.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataReadOnly is the corresponding interface of BACnetConstructedDataReadOnly type BACnetConstructedDataReadOnly interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataReadOnlyExactly interface { // _BACnetConstructedDataReadOnly is the data-structure of this message type _BACnetConstructedDataReadOnly struct { *_BACnetConstructedData - ReadOnly BACnetApplicationTagBoolean + ReadOnly BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataReadOnly) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataReadOnly) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataReadOnly) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_READ_ONLY -} +func (m *_BACnetConstructedDataReadOnly) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_READ_ONLY} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataReadOnly) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataReadOnly) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataReadOnly) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataReadOnly) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataReadOnly) GetActualValue() BACnetApplicationTagBo /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataReadOnly factory function for _BACnetConstructedDataReadOnly -func NewBACnetConstructedDataReadOnly(readOnly BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataReadOnly { +func NewBACnetConstructedDataReadOnly( readOnly BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataReadOnly { _result := &_BACnetConstructedDataReadOnly{ - ReadOnly: readOnly, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ReadOnly: readOnly, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataReadOnly(readOnly BACnetApplicationTagBoolean, open // Deprecated: use the interface for direct cast func CastBACnetConstructedDataReadOnly(structType interface{}) BACnetConstructedDataReadOnly { - if casted, ok := structType.(BACnetConstructedDataReadOnly); ok { + if casted, ok := structType.(BACnetConstructedDataReadOnly); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataReadOnly); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataReadOnly) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetConstructedDataReadOnly) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataReadOnlyParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("readOnly"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for readOnly") } - _readOnly, _readOnlyErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_readOnly, _readOnlyErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _readOnlyErr != nil { return nil, errors.Wrap(_readOnlyErr, "Error parsing 'readOnly' field of BACnetConstructedDataReadOnly") } @@ -186,7 +188,7 @@ func BACnetConstructedDataReadOnlyParseWithBuffer(ctx context.Context, readBuffe // Create a partially initialized instance _child := &_BACnetConstructedDataReadOnly{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ReadOnly: readOnly, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataReadOnly) SerializeWithWriteBuffer(ctx context.Co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataReadOnly") } - // Simple Field (readOnly) - if pushErr := writeBuffer.PushContext("readOnly"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for readOnly") - } - _readOnlyErr := writeBuffer.WriteSerializable(ctx, m.GetReadOnly()) - if popErr := writeBuffer.PopContext("readOnly"); popErr != nil { - return errors.Wrap(popErr, "Error popping for readOnly") - } - if _readOnlyErr != nil { - return errors.Wrap(_readOnlyErr, "Error serializing 'readOnly' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (readOnly) + if pushErr := writeBuffer.PushContext("readOnly"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for readOnly") + } + _readOnlyErr := writeBuffer.WriteSerializable(ctx, m.GetReadOnly()) + if popErr := writeBuffer.PopContext("readOnly"); popErr != nil { + return errors.Wrap(popErr, "Error popping for readOnly") + } + if _readOnlyErr != nil { + return errors.Wrap(_readOnlyErr, "Error serializing 'readOnly' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataReadOnly"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataReadOnly") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataReadOnly) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataReadOnly) isBACnetConstructedDataReadOnly() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataReadOnly) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataReasonForDisable.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataReasonForDisable.go index 1caa3a8bef4..2bd45cd13e1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataReasonForDisable.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataReasonForDisable.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataReasonForDisable is the corresponding interface of BACnetConstructedDataReasonForDisable type BACnetConstructedDataReasonForDisable interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataReasonForDisableExactly interface { // _BACnetConstructedDataReasonForDisable is the data-structure of this message type _BACnetConstructedDataReasonForDisable struct { *_BACnetConstructedData - ReasonForDisable []BACnetAccessCredentialDisableReasonTagged + ReasonForDisable []BACnetAccessCredentialDisableReasonTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataReasonForDisable) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataReasonForDisable) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataReasonForDisable) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_REASON_FOR_DISABLE -} +func (m *_BACnetConstructedDataReasonForDisable) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_REASON_FOR_DISABLE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataReasonForDisable) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataReasonForDisable) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataReasonForDisable) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataReasonForDisable) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataReasonForDisable) GetReasonForDisable() []BACnetA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataReasonForDisable factory function for _BACnetConstructedDataReasonForDisable -func NewBACnetConstructedDataReasonForDisable(reasonForDisable []BACnetAccessCredentialDisableReasonTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataReasonForDisable { +func NewBACnetConstructedDataReasonForDisable( reasonForDisable []BACnetAccessCredentialDisableReasonTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataReasonForDisable { _result := &_BACnetConstructedDataReasonForDisable{ - ReasonForDisable: reasonForDisable, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ReasonForDisable: reasonForDisable, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataReasonForDisable(reasonForDisable []BACnetAccessCre // Deprecated: use the interface for direct cast func CastBACnetConstructedDataReasonForDisable(structType interface{}) BACnetConstructedDataReasonForDisable { - if casted, ok := structType.(BACnetConstructedDataReasonForDisable); ok { + if casted, ok := structType.(BACnetConstructedDataReasonForDisable); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataReasonForDisable); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataReasonForDisable) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetConstructedDataReasonForDisable) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataReasonForDisableParseWithBuffer(ctx context.Context, r // Terminated array var reasonForDisable []BACnetAccessCredentialDisableReasonTagged { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetAccessCredentialDisableReasonTaggedParseWithBuffer(ctx, readBuffer, uint8(0), TagClass_APPLICATION_TAGS) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetAccessCredentialDisableReasonTaggedParseWithBuffer(ctx, readBuffer , uint8(0) , TagClass_APPLICATION_TAGS ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'reasonForDisable' field of BACnetConstructedDataReasonForDisable") } @@ -173,7 +175,7 @@ func BACnetConstructedDataReasonForDisableParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_BACnetConstructedDataReasonForDisable{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ReasonForDisable: reasonForDisable, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataReasonForDisable) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataReasonForDisable") } - // Array Field (reasonForDisable) - if pushErr := writeBuffer.PushContext("reasonForDisable", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for reasonForDisable") - } - for _curItem, _element := range m.GetReasonForDisable() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetReasonForDisable()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'reasonForDisable' field") - } - } - if popErr := writeBuffer.PopContext("reasonForDisable", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for reasonForDisable") + // Array Field (reasonForDisable) + if pushErr := writeBuffer.PushContext("reasonForDisable", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for reasonForDisable") + } + for _curItem, _element := range m.GetReasonForDisable() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetReasonForDisable()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'reasonForDisable' field") } + } + if popErr := writeBuffer.PopContext("reasonForDisable", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for reasonForDisable") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataReasonForDisable"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataReasonForDisable") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataReasonForDisable) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataReasonForDisable) isBACnetConstructedDataReasonForDisable() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataReasonForDisable) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataReasonForHalt.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataReasonForHalt.go index efaa3487c7d..c986d8d4865 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataReasonForHalt.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataReasonForHalt.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataReasonForHalt is the corresponding interface of BACnetConstructedDataReasonForHalt type BACnetConstructedDataReasonForHalt interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataReasonForHaltExactly interface { // _BACnetConstructedDataReasonForHalt is the data-structure of this message type _BACnetConstructedDataReasonForHalt struct { *_BACnetConstructedData - ProgramError BACnetProgramErrorTagged + ProgramError BACnetProgramErrorTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataReasonForHalt) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataReasonForHalt) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataReasonForHalt) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_REASON_FOR_HALT -} +func (m *_BACnetConstructedDataReasonForHalt) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_REASON_FOR_HALT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataReasonForHalt) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataReasonForHalt) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataReasonForHalt) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataReasonForHalt) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataReasonForHalt) GetActualValue() BACnetProgramErro /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataReasonForHalt factory function for _BACnetConstructedDataReasonForHalt -func NewBACnetConstructedDataReasonForHalt(programError BACnetProgramErrorTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataReasonForHalt { +func NewBACnetConstructedDataReasonForHalt( programError BACnetProgramErrorTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataReasonForHalt { _result := &_BACnetConstructedDataReasonForHalt{ - ProgramError: programError, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ProgramError: programError, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataReasonForHalt(programError BACnetProgramErrorTagged // Deprecated: use the interface for direct cast func CastBACnetConstructedDataReasonForHalt(structType interface{}) BACnetConstructedDataReasonForHalt { - if casted, ok := structType.(BACnetConstructedDataReasonForHalt); ok { + if casted, ok := structType.(BACnetConstructedDataReasonForHalt); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataReasonForHalt); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataReasonForHalt) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetConstructedDataReasonForHalt) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataReasonForHaltParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("programError"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for programError") } - _programError, _programErrorErr := BACnetProgramErrorTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_programError, _programErrorErr := BACnetProgramErrorTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _programErrorErr != nil { return nil, errors.Wrap(_programErrorErr, "Error parsing 'programError' field of BACnetConstructedDataReasonForHalt") } @@ -186,7 +188,7 @@ func BACnetConstructedDataReasonForHaltParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetConstructedDataReasonForHalt{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ProgramError: programError, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataReasonForHalt) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataReasonForHalt") } - // Simple Field (programError) - if pushErr := writeBuffer.PushContext("programError"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for programError") - } - _programErrorErr := writeBuffer.WriteSerializable(ctx, m.GetProgramError()) - if popErr := writeBuffer.PopContext("programError"); popErr != nil { - return errors.Wrap(popErr, "Error popping for programError") - } - if _programErrorErr != nil { - return errors.Wrap(_programErrorErr, "Error serializing 'programError' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (programError) + if pushErr := writeBuffer.PushContext("programError"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for programError") + } + _programErrorErr := writeBuffer.WriteSerializable(ctx, m.GetProgramError()) + if popErr := writeBuffer.PopContext("programError"); popErr != nil { + return errors.Wrap(popErr, "Error popping for programError") + } + if _programErrorErr != nil { + return errors.Wrap(_programErrorErr, "Error serializing 'programError' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataReasonForHalt"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataReasonForHalt") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataReasonForHalt) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataReasonForHalt) isBACnetConstructedDataReasonForHalt() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataReasonForHalt) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRecipientList.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRecipientList.go index a197c3f82fd..f4a470907cc 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRecipientList.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRecipientList.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataRecipientList is the corresponding interface of BACnetConstructedDataRecipientList type BACnetConstructedDataRecipientList interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataRecipientListExactly interface { // _BACnetConstructedDataRecipientList is the data-structure of this message type _BACnetConstructedDataRecipientList struct { *_BACnetConstructedData - RecipientList []BACnetDestination + RecipientList []BACnetDestination } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataRecipientList) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataRecipientList) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataRecipientList) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_RECIPIENT_LIST -} +func (m *_BACnetConstructedDataRecipientList) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_RECIPIENT_LIST} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataRecipientList) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataRecipientList) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataRecipientList) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataRecipientList) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataRecipientList) GetRecipientList() []BACnetDestina /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataRecipientList factory function for _BACnetConstructedDataRecipientList -func NewBACnetConstructedDataRecipientList(recipientList []BACnetDestination, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataRecipientList { +func NewBACnetConstructedDataRecipientList( recipientList []BACnetDestination , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataRecipientList { _result := &_BACnetConstructedDataRecipientList{ - RecipientList: recipientList, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + RecipientList: recipientList, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataRecipientList(recipientList []BACnetDestination, op // Deprecated: use the interface for direct cast func CastBACnetConstructedDataRecipientList(structType interface{}) BACnetConstructedDataRecipientList { - if casted, ok := structType.(BACnetConstructedDataRecipientList); ok { + if casted, ok := structType.(BACnetConstructedDataRecipientList); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataRecipientList); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataRecipientList) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetConstructedDataRecipientList) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataRecipientListParseWithBuffer(ctx context.Context, read // Terminated array var recipientList []BACnetDestination { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetDestinationParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetDestinationParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'recipientList' field of BACnetConstructedDataRecipientList") } @@ -173,7 +175,7 @@ func BACnetConstructedDataRecipientListParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetConstructedDataRecipientList{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, RecipientList: recipientList, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataRecipientList) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataRecipientList") } - // Array Field (recipientList) - if pushErr := writeBuffer.PushContext("recipientList", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for recipientList") - } - for _curItem, _element := range m.GetRecipientList() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetRecipientList()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'recipientList' field") - } - } - if popErr := writeBuffer.PopContext("recipientList", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for recipientList") + // Array Field (recipientList) + if pushErr := writeBuffer.PushContext("recipientList", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for recipientList") + } + for _curItem, _element := range m.GetRecipientList() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetRecipientList()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'recipientList' field") } + } + if popErr := writeBuffer.PopContext("recipientList", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for recipientList") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataRecipientList"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataRecipientList") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataRecipientList) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataRecipientList) isBACnetConstructedDataRecipientList() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataRecipientList) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRecordCount.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRecordCount.go index 8df5f435e24..e92f5b802f0 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRecordCount.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRecordCount.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataRecordCount is the corresponding interface of BACnetConstructedDataRecordCount type BACnetConstructedDataRecordCount interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataRecordCountExactly interface { // _BACnetConstructedDataRecordCount is the data-structure of this message type _BACnetConstructedDataRecordCount struct { *_BACnetConstructedData - RecordCount BACnetApplicationTagUnsignedInteger + RecordCount BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataRecordCount) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataRecordCount) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataRecordCount) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_RECORD_COUNT -} +func (m *_BACnetConstructedDataRecordCount) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_RECORD_COUNT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataRecordCount) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataRecordCount) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataRecordCount) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataRecordCount) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataRecordCount) GetActualValue() BACnetApplicationTa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataRecordCount factory function for _BACnetConstructedDataRecordCount -func NewBACnetConstructedDataRecordCount(recordCount BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataRecordCount { +func NewBACnetConstructedDataRecordCount( recordCount BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataRecordCount { _result := &_BACnetConstructedDataRecordCount{ - RecordCount: recordCount, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + RecordCount: recordCount, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataRecordCount(recordCount BACnetApplicationTagUnsigne // Deprecated: use the interface for direct cast func CastBACnetConstructedDataRecordCount(structType interface{}) BACnetConstructedDataRecordCount { - if casted, ok := structType.(BACnetConstructedDataRecordCount); ok { + if casted, ok := structType.(BACnetConstructedDataRecordCount); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataRecordCount); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataRecordCount) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataRecordCount) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataRecordCountParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("recordCount"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for recordCount") } - _recordCount, _recordCountErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_recordCount, _recordCountErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _recordCountErr != nil { return nil, errors.Wrap(_recordCountErr, "Error parsing 'recordCount' field of BACnetConstructedDataRecordCount") } @@ -186,7 +188,7 @@ func BACnetConstructedDataRecordCountParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataRecordCount{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, RecordCount: recordCount, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataRecordCount) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataRecordCount") } - // Simple Field (recordCount) - if pushErr := writeBuffer.PushContext("recordCount"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for recordCount") - } - _recordCountErr := writeBuffer.WriteSerializable(ctx, m.GetRecordCount()) - if popErr := writeBuffer.PopContext("recordCount"); popErr != nil { - return errors.Wrap(popErr, "Error popping for recordCount") - } - if _recordCountErr != nil { - return errors.Wrap(_recordCountErr, "Error serializing 'recordCount' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (recordCount) + if pushErr := writeBuffer.PushContext("recordCount"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for recordCount") + } + _recordCountErr := writeBuffer.WriteSerializable(ctx, m.GetRecordCount()) + if popErr := writeBuffer.PopContext("recordCount"); popErr != nil { + return errors.Wrap(popErr, "Error popping for recordCount") + } + if _recordCountErr != nil { + return errors.Wrap(_recordCountErr, "Error serializing 'recordCount' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataRecordCount"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataRecordCount") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataRecordCount) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataRecordCount) isBACnetConstructedDataRecordCount() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataRecordCount) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRecordsSinceNotification.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRecordsSinceNotification.go index be19b7d2b95..c18a01f7a4c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRecordsSinceNotification.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRecordsSinceNotification.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataRecordsSinceNotification is the corresponding interface of BACnetConstructedDataRecordsSinceNotification type BACnetConstructedDataRecordsSinceNotification interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataRecordsSinceNotificationExactly interface { // _BACnetConstructedDataRecordsSinceNotification is the data-structure of this message type _BACnetConstructedDataRecordsSinceNotification struct { *_BACnetConstructedData - RecordsSinceNotifications BACnetApplicationTagUnsignedInteger + RecordsSinceNotifications BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataRecordsSinceNotification) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataRecordsSinceNotification) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataRecordsSinceNotification) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_RECORDS_SINCE_NOTIFICATION -} +func (m *_BACnetConstructedDataRecordsSinceNotification) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_RECORDS_SINCE_NOTIFICATION} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataRecordsSinceNotification) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataRecordsSinceNotification) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataRecordsSinceNotification) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataRecordsSinceNotification) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataRecordsSinceNotification) GetActualValue() BACnet /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataRecordsSinceNotification factory function for _BACnetConstructedDataRecordsSinceNotification -func NewBACnetConstructedDataRecordsSinceNotification(recordsSinceNotifications BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataRecordsSinceNotification { +func NewBACnetConstructedDataRecordsSinceNotification( recordsSinceNotifications BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataRecordsSinceNotification { _result := &_BACnetConstructedDataRecordsSinceNotification{ RecordsSinceNotifications: recordsSinceNotifications, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataRecordsSinceNotification(recordsSinceNotifications // Deprecated: use the interface for direct cast func CastBACnetConstructedDataRecordsSinceNotification(structType interface{}) BACnetConstructedDataRecordsSinceNotification { - if casted, ok := structType.(BACnetConstructedDataRecordsSinceNotification); ok { + if casted, ok := structType.(BACnetConstructedDataRecordsSinceNotification); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataRecordsSinceNotification); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataRecordsSinceNotification) GetLengthInBits(ctx con return lengthInBits } + func (m *_BACnetConstructedDataRecordsSinceNotification) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataRecordsSinceNotificationParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("recordsSinceNotifications"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for recordsSinceNotifications") } - _recordsSinceNotifications, _recordsSinceNotificationsErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_recordsSinceNotifications, _recordsSinceNotificationsErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _recordsSinceNotificationsErr != nil { return nil, errors.Wrap(_recordsSinceNotificationsErr, "Error parsing 'recordsSinceNotifications' field of BACnetConstructedDataRecordsSinceNotification") } @@ -186,7 +188,7 @@ func BACnetConstructedDataRecordsSinceNotificationParseWithBuffer(ctx context.Co // Create a partially initialized instance _child := &_BACnetConstructedDataRecordsSinceNotification{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, RecordsSinceNotifications: recordsSinceNotifications, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataRecordsSinceNotification) SerializeWithWriteBuffe return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataRecordsSinceNotification") } - // Simple Field (recordsSinceNotifications) - if pushErr := writeBuffer.PushContext("recordsSinceNotifications"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for recordsSinceNotifications") - } - _recordsSinceNotificationsErr := writeBuffer.WriteSerializable(ctx, m.GetRecordsSinceNotifications()) - if popErr := writeBuffer.PopContext("recordsSinceNotifications"); popErr != nil { - return errors.Wrap(popErr, "Error popping for recordsSinceNotifications") - } - if _recordsSinceNotificationsErr != nil { - return errors.Wrap(_recordsSinceNotificationsErr, "Error serializing 'recordsSinceNotifications' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (recordsSinceNotifications) + if pushErr := writeBuffer.PushContext("recordsSinceNotifications"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for recordsSinceNotifications") + } + _recordsSinceNotificationsErr := writeBuffer.WriteSerializable(ctx, m.GetRecordsSinceNotifications()) + if popErr := writeBuffer.PopContext("recordsSinceNotifications"); popErr != nil { + return errors.Wrap(popErr, "Error popping for recordsSinceNotifications") + } + if _recordsSinceNotificationsErr != nil { + return errors.Wrap(_recordsSinceNotificationsErr, "Error serializing 'recordsSinceNotifications' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataRecordsSinceNotification"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataRecordsSinceNotification") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataRecordsSinceNotification) SerializeWithWriteBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataRecordsSinceNotification) isBACnetConstructedDataRecordsSinceNotification() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataRecordsSinceNotification) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataReferencePort.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataReferencePort.go index 0f0883dd96c..afc630cc5ab 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataReferencePort.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataReferencePort.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataReferencePort is the corresponding interface of BACnetConstructedDataReferencePort type BACnetConstructedDataReferencePort interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataReferencePortExactly interface { // _BACnetConstructedDataReferencePort is the data-structure of this message type _BACnetConstructedDataReferencePort struct { *_BACnetConstructedData - ReferencePort BACnetApplicationTagUnsignedInteger + ReferencePort BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataReferencePort) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataReferencePort) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataReferencePort) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_REFERENCE_PORT -} +func (m *_BACnetConstructedDataReferencePort) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_REFERENCE_PORT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataReferencePort) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataReferencePort) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataReferencePort) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataReferencePort) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataReferencePort) GetActualValue() BACnetApplication /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataReferencePort factory function for _BACnetConstructedDataReferencePort -func NewBACnetConstructedDataReferencePort(referencePort BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataReferencePort { +func NewBACnetConstructedDataReferencePort( referencePort BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataReferencePort { _result := &_BACnetConstructedDataReferencePort{ - ReferencePort: referencePort, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ReferencePort: referencePort, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataReferencePort(referencePort BACnetApplicationTagUns // Deprecated: use the interface for direct cast func CastBACnetConstructedDataReferencePort(structType interface{}) BACnetConstructedDataReferencePort { - if casted, ok := structType.(BACnetConstructedDataReferencePort); ok { + if casted, ok := structType.(BACnetConstructedDataReferencePort); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataReferencePort); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataReferencePort) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetConstructedDataReferencePort) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataReferencePortParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("referencePort"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for referencePort") } - _referencePort, _referencePortErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_referencePort, _referencePortErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _referencePortErr != nil { return nil, errors.Wrap(_referencePortErr, "Error parsing 'referencePort' field of BACnetConstructedDataReferencePort") } @@ -186,7 +188,7 @@ func BACnetConstructedDataReferencePortParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetConstructedDataReferencePort{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ReferencePort: referencePort, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataReferencePort) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataReferencePort") } - // Simple Field (referencePort) - if pushErr := writeBuffer.PushContext("referencePort"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for referencePort") - } - _referencePortErr := writeBuffer.WriteSerializable(ctx, m.GetReferencePort()) - if popErr := writeBuffer.PopContext("referencePort"); popErr != nil { - return errors.Wrap(popErr, "Error popping for referencePort") - } - if _referencePortErr != nil { - return errors.Wrap(_referencePortErr, "Error serializing 'referencePort' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (referencePort) + if pushErr := writeBuffer.PushContext("referencePort"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for referencePort") + } + _referencePortErr := writeBuffer.WriteSerializable(ctx, m.GetReferencePort()) + if popErr := writeBuffer.PopContext("referencePort"); popErr != nil { + return errors.Wrap(popErr, "Error popping for referencePort") + } + if _referencePortErr != nil { + return errors.Wrap(_referencePortErr, "Error serializing 'referencePort' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataReferencePort"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataReferencePort") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataReferencePort) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataReferencePort) isBACnetConstructedDataReferencePort() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataReferencePort) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRegisteredCarCall.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRegisteredCarCall.go index 77bd136a608..0ddb137126c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRegisteredCarCall.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRegisteredCarCall.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataRegisteredCarCall is the corresponding interface of BACnetConstructedDataRegisteredCarCall type BACnetConstructedDataRegisteredCarCall interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataRegisteredCarCallExactly interface { // _BACnetConstructedDataRegisteredCarCall is the data-structure of this message type _BACnetConstructedDataRegisteredCarCall struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - RegisteredCarCall []BACnetLiftCarCallList + NumberOfDataElements BACnetApplicationTagUnsignedInteger + RegisteredCarCall []BACnetLiftCarCallList } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataRegisteredCarCall) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataRegisteredCarCall) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataRegisteredCarCall) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_REGISTERED_CAR_CALL -} +func (m *_BACnetConstructedDataRegisteredCarCall) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_REGISTERED_CAR_CALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataRegisteredCarCall) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataRegisteredCarCall) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataRegisteredCarCall) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataRegisteredCarCall) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataRegisteredCarCall) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataRegisteredCarCall factory function for _BACnetConstructedDataRegisteredCarCall -func NewBACnetConstructedDataRegisteredCarCall(numberOfDataElements BACnetApplicationTagUnsignedInteger, registeredCarCall []BACnetLiftCarCallList, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataRegisteredCarCall { +func NewBACnetConstructedDataRegisteredCarCall( numberOfDataElements BACnetApplicationTagUnsignedInteger , registeredCarCall []BACnetLiftCarCallList , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataRegisteredCarCall { _result := &_BACnetConstructedDataRegisteredCarCall{ - NumberOfDataElements: numberOfDataElements, - RegisteredCarCall: registeredCarCall, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + RegisteredCarCall: registeredCarCall, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataRegisteredCarCall(numberOfDataElements BACnetApplic // Deprecated: use the interface for direct cast func CastBACnetConstructedDataRegisteredCarCall(structType interface{}) BACnetConstructedDataRegisteredCarCall { - if casted, ok := structType.(BACnetConstructedDataRegisteredCarCall); ok { + if casted, ok := structType.(BACnetConstructedDataRegisteredCarCall); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataRegisteredCarCall); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataRegisteredCarCall) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetConstructedDataRegisteredCarCall) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataRegisteredCarCallParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataRegisteredCarCallParseWithBuffer(ctx context.Context, // Terminated array var registeredCarCall []BACnetLiftCarCallList { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetLiftCarCallListParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetLiftCarCallListParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'registeredCarCall' field of BACnetConstructedDataRegisteredCarCall") } @@ -235,11 +237,11 @@ func BACnetConstructedDataRegisteredCarCallParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataRegisteredCarCall{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - RegisteredCarCall: registeredCarCall, + RegisteredCarCall: registeredCarCall, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataRegisteredCarCall) SerializeWithWriteBuffer(ctx c if pushErr := writeBuffer.PushContext("BACnetConstructedDataRegisteredCarCall"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataRegisteredCarCall") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (registeredCarCall) - if pushErr := writeBuffer.PushContext("registeredCarCall", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for registeredCarCall") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetRegisteredCarCall() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetRegisteredCarCall()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'registeredCarCall' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("registeredCarCall", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for registeredCarCall") + } + + // Array Field (registeredCarCall) + if pushErr := writeBuffer.PushContext("registeredCarCall", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for registeredCarCall") + } + for _curItem, _element := range m.GetRegisteredCarCall() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetRegisteredCarCall()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'registeredCarCall' field") } + } + if popErr := writeBuffer.PopContext("registeredCarCall", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for registeredCarCall") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataRegisteredCarCall"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataRegisteredCarCall") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataRegisteredCarCall) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataRegisteredCarCall) isBACnetConstructedDataRegisteredCarCall() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataRegisteredCarCall) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataReliability.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataReliability.go index 86c84584318..9fb9fe2f190 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataReliability.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataReliability.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataReliability is the corresponding interface of BACnetConstructedDataReliability type BACnetConstructedDataReliability interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataReliabilityExactly interface { // _BACnetConstructedDataReliability is the data-structure of this message type _BACnetConstructedDataReliability struct { *_BACnetConstructedData - Reliability BACnetReliabilityTagged + Reliability BACnetReliabilityTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataReliability) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataReliability) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataReliability) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_RELIABILITY -} +func (m *_BACnetConstructedDataReliability) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_RELIABILITY} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataReliability) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataReliability) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataReliability) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataReliability) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataReliability) GetActualValue() BACnetReliabilityTa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataReliability factory function for _BACnetConstructedDataReliability -func NewBACnetConstructedDataReliability(reliability BACnetReliabilityTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataReliability { +func NewBACnetConstructedDataReliability( reliability BACnetReliabilityTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataReliability { _result := &_BACnetConstructedDataReliability{ - Reliability: reliability, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Reliability: reliability, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataReliability(reliability BACnetReliabilityTagged, op // Deprecated: use the interface for direct cast func CastBACnetConstructedDataReliability(structType interface{}) BACnetConstructedDataReliability { - if casted, ok := structType.(BACnetConstructedDataReliability); ok { + if casted, ok := structType.(BACnetConstructedDataReliability); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataReliability); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataReliability) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataReliability) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataReliabilityParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("reliability"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for reliability") } - _reliability, _reliabilityErr := BACnetReliabilityTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_reliability, _reliabilityErr := BACnetReliabilityTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _reliabilityErr != nil { return nil, errors.Wrap(_reliabilityErr, "Error parsing 'reliability' field of BACnetConstructedDataReliability") } @@ -186,7 +188,7 @@ func BACnetConstructedDataReliabilityParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataReliability{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Reliability: reliability, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataReliability) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataReliability") } - // Simple Field (reliability) - if pushErr := writeBuffer.PushContext("reliability"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for reliability") - } - _reliabilityErr := writeBuffer.WriteSerializable(ctx, m.GetReliability()) - if popErr := writeBuffer.PopContext("reliability"); popErr != nil { - return errors.Wrap(popErr, "Error popping for reliability") - } - if _reliabilityErr != nil { - return errors.Wrap(_reliabilityErr, "Error serializing 'reliability' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (reliability) + if pushErr := writeBuffer.PushContext("reliability"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for reliability") + } + _reliabilityErr := writeBuffer.WriteSerializable(ctx, m.GetReliability()) + if popErr := writeBuffer.PopContext("reliability"); popErr != nil { + return errors.Wrap(popErr, "Error popping for reliability") + } + if _reliabilityErr != nil { + return errors.Wrap(_reliabilityErr, "Error serializing 'reliability' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataReliability"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataReliability") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataReliability) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataReliability) isBACnetConstructedDataReliability() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataReliability) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataReliabilityEvaluationInhibit.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataReliabilityEvaluationInhibit.go index 86daa7971b0..5b2ed732636 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataReliabilityEvaluationInhibit.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataReliabilityEvaluationInhibit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataReliabilityEvaluationInhibit is the corresponding interface of BACnetConstructedDataReliabilityEvaluationInhibit type BACnetConstructedDataReliabilityEvaluationInhibit interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataReliabilityEvaluationInhibitExactly interface { // _BACnetConstructedDataReliabilityEvaluationInhibit is the data-structure of this message type _BACnetConstructedDataReliabilityEvaluationInhibit struct { *_BACnetConstructedData - ReliabilityEvaluationInhibit BACnetApplicationTagBoolean + ReliabilityEvaluationInhibit BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataReliabilityEvaluationInhibit) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataReliabilityEvaluationInhibit) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataReliabilityEvaluationInhibit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_RELIABILITY_EVALUATION_INHIBIT -} +func (m *_BACnetConstructedDataReliabilityEvaluationInhibit) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_RELIABILITY_EVALUATION_INHIBIT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataReliabilityEvaluationInhibit) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataReliabilityEvaluationInhibit) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataReliabilityEvaluationInhibit) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataReliabilityEvaluationInhibit) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataReliabilityEvaluationInhibit) GetActualValue() BA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataReliabilityEvaluationInhibit factory function for _BACnetConstructedDataReliabilityEvaluationInhibit -func NewBACnetConstructedDataReliabilityEvaluationInhibit(reliabilityEvaluationInhibit BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataReliabilityEvaluationInhibit { +func NewBACnetConstructedDataReliabilityEvaluationInhibit( reliabilityEvaluationInhibit BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataReliabilityEvaluationInhibit { _result := &_BACnetConstructedDataReliabilityEvaluationInhibit{ ReliabilityEvaluationInhibit: reliabilityEvaluationInhibit, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataReliabilityEvaluationInhibit(reliabilityEvaluationI // Deprecated: use the interface for direct cast func CastBACnetConstructedDataReliabilityEvaluationInhibit(structType interface{}) BACnetConstructedDataReliabilityEvaluationInhibit { - if casted, ok := structType.(BACnetConstructedDataReliabilityEvaluationInhibit); ok { + if casted, ok := structType.(BACnetConstructedDataReliabilityEvaluationInhibit); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataReliabilityEvaluationInhibit); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataReliabilityEvaluationInhibit) GetLengthInBits(ctx return lengthInBits } + func (m *_BACnetConstructedDataReliabilityEvaluationInhibit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataReliabilityEvaluationInhibitParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("reliabilityEvaluationInhibit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for reliabilityEvaluationInhibit") } - _reliabilityEvaluationInhibit, _reliabilityEvaluationInhibitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_reliabilityEvaluationInhibit, _reliabilityEvaluationInhibitErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _reliabilityEvaluationInhibitErr != nil { return nil, errors.Wrap(_reliabilityEvaluationInhibitErr, "Error parsing 'reliabilityEvaluationInhibit' field of BACnetConstructedDataReliabilityEvaluationInhibit") } @@ -186,7 +188,7 @@ func BACnetConstructedDataReliabilityEvaluationInhibitParseWithBuffer(ctx contex // Create a partially initialized instance _child := &_BACnetConstructedDataReliabilityEvaluationInhibit{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ReliabilityEvaluationInhibit: reliabilityEvaluationInhibit, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataReliabilityEvaluationInhibit) SerializeWithWriteB return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataReliabilityEvaluationInhibit") } - // Simple Field (reliabilityEvaluationInhibit) - if pushErr := writeBuffer.PushContext("reliabilityEvaluationInhibit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for reliabilityEvaluationInhibit") - } - _reliabilityEvaluationInhibitErr := writeBuffer.WriteSerializable(ctx, m.GetReliabilityEvaluationInhibit()) - if popErr := writeBuffer.PopContext("reliabilityEvaluationInhibit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for reliabilityEvaluationInhibit") - } - if _reliabilityEvaluationInhibitErr != nil { - return errors.Wrap(_reliabilityEvaluationInhibitErr, "Error serializing 'reliabilityEvaluationInhibit' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (reliabilityEvaluationInhibit) + if pushErr := writeBuffer.PushContext("reliabilityEvaluationInhibit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for reliabilityEvaluationInhibit") + } + _reliabilityEvaluationInhibitErr := writeBuffer.WriteSerializable(ctx, m.GetReliabilityEvaluationInhibit()) + if popErr := writeBuffer.PopContext("reliabilityEvaluationInhibit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for reliabilityEvaluationInhibit") + } + if _reliabilityEvaluationInhibitErr != nil { + return errors.Wrap(_reliabilityEvaluationInhibitErr, "Error serializing 'reliabilityEvaluationInhibit' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataReliabilityEvaluationInhibit"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataReliabilityEvaluationInhibit") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataReliabilityEvaluationInhibit) SerializeWithWriteB return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataReliabilityEvaluationInhibit) isBACnetConstructedDataReliabilityEvaluationInhibit() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataReliabilityEvaluationInhibit) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRelinquishDefault.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRelinquishDefault.go index 37a3f078a59..9661ad3322d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRelinquishDefault.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRelinquishDefault.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataRelinquishDefault is the corresponding interface of BACnetConstructedDataRelinquishDefault type BACnetConstructedDataRelinquishDefault interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataRelinquishDefaultExactly interface { // _BACnetConstructedDataRelinquishDefault is the data-structure of this message type _BACnetConstructedDataRelinquishDefault struct { *_BACnetConstructedData - RelinquishDefault BACnetApplicationTagUnsignedInteger + RelinquishDefault BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_RELINQUISH_DEFAULT -} +func (m *_BACnetConstructedDataRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_RELINQUISH_DEFAULT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataRelinquishDefault) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataRelinquishDefault) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataRelinquishDefault) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataRelinquishDefault) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataRelinquishDefault) GetActualValue() BACnetApplica /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataRelinquishDefault factory function for _BACnetConstructedDataRelinquishDefault -func NewBACnetConstructedDataRelinquishDefault(relinquishDefault BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataRelinquishDefault { +func NewBACnetConstructedDataRelinquishDefault( relinquishDefault BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataRelinquishDefault { _result := &_BACnetConstructedDataRelinquishDefault{ - RelinquishDefault: relinquishDefault, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + RelinquishDefault: relinquishDefault, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataRelinquishDefault(relinquishDefault BACnetApplicati // Deprecated: use the interface for direct cast func CastBACnetConstructedDataRelinquishDefault(structType interface{}) BACnetConstructedDataRelinquishDefault { - if casted, ok := structType.(BACnetConstructedDataRelinquishDefault); ok { + if casted, ok := structType.(BACnetConstructedDataRelinquishDefault); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataRelinquishDefault); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataRelinquishDefault) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetConstructedDataRelinquishDefault) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataRelinquishDefaultParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("relinquishDefault"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for relinquishDefault") } - _relinquishDefault, _relinquishDefaultErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_relinquishDefault, _relinquishDefaultErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _relinquishDefaultErr != nil { return nil, errors.Wrap(_relinquishDefaultErr, "Error parsing 'relinquishDefault' field of BACnetConstructedDataRelinquishDefault") } @@ -186,7 +188,7 @@ func BACnetConstructedDataRelinquishDefaultParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataRelinquishDefault{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, RelinquishDefault: relinquishDefault, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataRelinquishDefault) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataRelinquishDefault") } - // Simple Field (relinquishDefault) - if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for relinquishDefault") - } - _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) - if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { - return errors.Wrap(popErr, "Error popping for relinquishDefault") - } - if _relinquishDefaultErr != nil { - return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (relinquishDefault) + if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for relinquishDefault") + } + _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) + if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { + return errors.Wrap(popErr, "Error popping for relinquishDefault") + } + if _relinquishDefaultErr != nil { + return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataRelinquishDefault"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataRelinquishDefault") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataRelinquishDefault) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataRelinquishDefault) isBACnetConstructedDataRelinquishDefault() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataRelinquishDefault) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRepresents.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRepresents.go index 9ebe8f697b8..91f7edad44d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRepresents.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRepresents.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataRepresents is the corresponding interface of BACnetConstructedDataRepresents type BACnetConstructedDataRepresents interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataRepresentsExactly interface { // _BACnetConstructedDataRepresents is the data-structure of this message type _BACnetConstructedDataRepresents struct { *_BACnetConstructedData - Represents BACnetDeviceObjectReference + Represents BACnetDeviceObjectReference } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataRepresents) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataRepresents) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataRepresents) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_REPRESENTS -} +func (m *_BACnetConstructedDataRepresents) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_REPRESENTS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataRepresents) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataRepresents) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataRepresents) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataRepresents) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataRepresents) GetActualValue() BACnetDeviceObjectRe /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataRepresents factory function for _BACnetConstructedDataRepresents -func NewBACnetConstructedDataRepresents(represents BACnetDeviceObjectReference, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataRepresents { +func NewBACnetConstructedDataRepresents( represents BACnetDeviceObjectReference , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataRepresents { _result := &_BACnetConstructedDataRepresents{ - Represents: represents, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Represents: represents, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataRepresents(represents BACnetDeviceObjectReference, // Deprecated: use the interface for direct cast func CastBACnetConstructedDataRepresents(structType interface{}) BACnetConstructedDataRepresents { - if casted, ok := structType.(BACnetConstructedDataRepresents); ok { + if casted, ok := structType.(BACnetConstructedDataRepresents); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataRepresents); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataRepresents) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataRepresents) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataRepresentsParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("represents"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for represents") } - _represents, _representsErr := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) +_represents, _representsErr := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) if _representsErr != nil { return nil, errors.Wrap(_representsErr, "Error parsing 'represents' field of BACnetConstructedDataRepresents") } @@ -186,7 +188,7 @@ func BACnetConstructedDataRepresentsParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetConstructedDataRepresents{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Represents: represents, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataRepresents) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataRepresents") } - // Simple Field (represents) - if pushErr := writeBuffer.PushContext("represents"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for represents") - } - _representsErr := writeBuffer.WriteSerializable(ctx, m.GetRepresents()) - if popErr := writeBuffer.PopContext("represents"); popErr != nil { - return errors.Wrap(popErr, "Error popping for represents") - } - if _representsErr != nil { - return errors.Wrap(_representsErr, "Error serializing 'represents' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (represents) + if pushErr := writeBuffer.PushContext("represents"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for represents") + } + _representsErr := writeBuffer.WriteSerializable(ctx, m.GetRepresents()) + if popErr := writeBuffer.PopContext("represents"); popErr != nil { + return errors.Wrap(popErr, "Error popping for represents") + } + if _representsErr != nil { + return errors.Wrap(_representsErr, "Error serializing 'represents' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataRepresents"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataRepresents") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataRepresents) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataRepresents) isBACnetConstructedDataRepresents() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataRepresents) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRequestedShedLevel.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRequestedShedLevel.go index 8a9b6550104..5c3ab7a64de 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRequestedShedLevel.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRequestedShedLevel.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataRequestedShedLevel is the corresponding interface of BACnetConstructedDataRequestedShedLevel type BACnetConstructedDataRequestedShedLevel interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataRequestedShedLevelExactly interface { // _BACnetConstructedDataRequestedShedLevel is the data-structure of this message type _BACnetConstructedDataRequestedShedLevel struct { *_BACnetConstructedData - RequestedShedLevel BACnetShedLevel + RequestedShedLevel BACnetShedLevel } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataRequestedShedLevel) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataRequestedShedLevel) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataRequestedShedLevel) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_REQUESTED_SHED_LEVEL -} +func (m *_BACnetConstructedDataRequestedShedLevel) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_REQUESTED_SHED_LEVEL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataRequestedShedLevel) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataRequestedShedLevel) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataRequestedShedLevel) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataRequestedShedLevel) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataRequestedShedLevel) GetActualValue() BACnetShedLe /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataRequestedShedLevel factory function for _BACnetConstructedDataRequestedShedLevel -func NewBACnetConstructedDataRequestedShedLevel(requestedShedLevel BACnetShedLevel, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataRequestedShedLevel { +func NewBACnetConstructedDataRequestedShedLevel( requestedShedLevel BACnetShedLevel , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataRequestedShedLevel { _result := &_BACnetConstructedDataRequestedShedLevel{ - RequestedShedLevel: requestedShedLevel, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + RequestedShedLevel: requestedShedLevel, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataRequestedShedLevel(requestedShedLevel BACnetShedLev // Deprecated: use the interface for direct cast func CastBACnetConstructedDataRequestedShedLevel(structType interface{}) BACnetConstructedDataRequestedShedLevel { - if casted, ok := structType.(BACnetConstructedDataRequestedShedLevel); ok { + if casted, ok := structType.(BACnetConstructedDataRequestedShedLevel); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataRequestedShedLevel); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataRequestedShedLevel) GetLengthInBits(ctx context.C return lengthInBits } + func (m *_BACnetConstructedDataRequestedShedLevel) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataRequestedShedLevelParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("requestedShedLevel"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for requestedShedLevel") } - _requestedShedLevel, _requestedShedLevelErr := BACnetShedLevelParseWithBuffer(ctx, readBuffer) +_requestedShedLevel, _requestedShedLevelErr := BACnetShedLevelParseWithBuffer(ctx, readBuffer) if _requestedShedLevelErr != nil { return nil, errors.Wrap(_requestedShedLevelErr, "Error parsing 'requestedShedLevel' field of BACnetConstructedDataRequestedShedLevel") } @@ -186,7 +188,7 @@ func BACnetConstructedDataRequestedShedLevelParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataRequestedShedLevel{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, RequestedShedLevel: requestedShedLevel, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataRequestedShedLevel) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataRequestedShedLevel") } - // Simple Field (requestedShedLevel) - if pushErr := writeBuffer.PushContext("requestedShedLevel"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for requestedShedLevel") - } - _requestedShedLevelErr := writeBuffer.WriteSerializable(ctx, m.GetRequestedShedLevel()) - if popErr := writeBuffer.PopContext("requestedShedLevel"); popErr != nil { - return errors.Wrap(popErr, "Error popping for requestedShedLevel") - } - if _requestedShedLevelErr != nil { - return errors.Wrap(_requestedShedLevelErr, "Error serializing 'requestedShedLevel' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (requestedShedLevel) + if pushErr := writeBuffer.PushContext("requestedShedLevel"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for requestedShedLevel") + } + _requestedShedLevelErr := writeBuffer.WriteSerializable(ctx, m.GetRequestedShedLevel()) + if popErr := writeBuffer.PopContext("requestedShedLevel"); popErr != nil { + return errors.Wrap(popErr, "Error popping for requestedShedLevel") + } + if _requestedShedLevelErr != nil { + return errors.Wrap(_requestedShedLevelErr, "Error serializing 'requestedShedLevel' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataRequestedShedLevel"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataRequestedShedLevel") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataRequestedShedLevel) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataRequestedShedLevel) isBACnetConstructedDataRequestedShedLevel() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataRequestedShedLevel) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRequestedUpdateInterval.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRequestedUpdateInterval.go index a757f4aaa17..527443acce8 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRequestedUpdateInterval.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRequestedUpdateInterval.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataRequestedUpdateInterval is the corresponding interface of BACnetConstructedDataRequestedUpdateInterval type BACnetConstructedDataRequestedUpdateInterval interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataRequestedUpdateIntervalExactly interface { // _BACnetConstructedDataRequestedUpdateInterval is the data-structure of this message type _BACnetConstructedDataRequestedUpdateInterval struct { *_BACnetConstructedData - RequestedUpdateInterval BACnetApplicationTagUnsignedInteger + RequestedUpdateInterval BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataRequestedUpdateInterval) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataRequestedUpdateInterval) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataRequestedUpdateInterval) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_REQUESTED_UPDATE_INTERVAL -} +func (m *_BACnetConstructedDataRequestedUpdateInterval) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_REQUESTED_UPDATE_INTERVAL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataRequestedUpdateInterval) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataRequestedUpdateInterval) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataRequestedUpdateInterval) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataRequestedUpdateInterval) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataRequestedUpdateInterval) GetActualValue() BACnetA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataRequestedUpdateInterval factory function for _BACnetConstructedDataRequestedUpdateInterval -func NewBACnetConstructedDataRequestedUpdateInterval(requestedUpdateInterval BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataRequestedUpdateInterval { +func NewBACnetConstructedDataRequestedUpdateInterval( requestedUpdateInterval BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataRequestedUpdateInterval { _result := &_BACnetConstructedDataRequestedUpdateInterval{ RequestedUpdateInterval: requestedUpdateInterval, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataRequestedUpdateInterval(requestedUpdateInterval BAC // Deprecated: use the interface for direct cast func CastBACnetConstructedDataRequestedUpdateInterval(structType interface{}) BACnetConstructedDataRequestedUpdateInterval { - if casted, ok := structType.(BACnetConstructedDataRequestedUpdateInterval); ok { + if casted, ok := structType.(BACnetConstructedDataRequestedUpdateInterval); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataRequestedUpdateInterval); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataRequestedUpdateInterval) GetLengthInBits(ctx cont return lengthInBits } + func (m *_BACnetConstructedDataRequestedUpdateInterval) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataRequestedUpdateIntervalParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("requestedUpdateInterval"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for requestedUpdateInterval") } - _requestedUpdateInterval, _requestedUpdateIntervalErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_requestedUpdateInterval, _requestedUpdateIntervalErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _requestedUpdateIntervalErr != nil { return nil, errors.Wrap(_requestedUpdateIntervalErr, "Error parsing 'requestedUpdateInterval' field of BACnetConstructedDataRequestedUpdateInterval") } @@ -186,7 +188,7 @@ func BACnetConstructedDataRequestedUpdateIntervalParseWithBuffer(ctx context.Con // Create a partially initialized instance _child := &_BACnetConstructedDataRequestedUpdateInterval{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, RequestedUpdateInterval: requestedUpdateInterval, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataRequestedUpdateInterval) SerializeWithWriteBuffer return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataRequestedUpdateInterval") } - // Simple Field (requestedUpdateInterval) - if pushErr := writeBuffer.PushContext("requestedUpdateInterval"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for requestedUpdateInterval") - } - _requestedUpdateIntervalErr := writeBuffer.WriteSerializable(ctx, m.GetRequestedUpdateInterval()) - if popErr := writeBuffer.PopContext("requestedUpdateInterval"); popErr != nil { - return errors.Wrap(popErr, "Error popping for requestedUpdateInterval") - } - if _requestedUpdateIntervalErr != nil { - return errors.Wrap(_requestedUpdateIntervalErr, "Error serializing 'requestedUpdateInterval' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (requestedUpdateInterval) + if pushErr := writeBuffer.PushContext("requestedUpdateInterval"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for requestedUpdateInterval") + } + _requestedUpdateIntervalErr := writeBuffer.WriteSerializable(ctx, m.GetRequestedUpdateInterval()) + if popErr := writeBuffer.PopContext("requestedUpdateInterval"); popErr != nil { + return errors.Wrap(popErr, "Error popping for requestedUpdateInterval") + } + if _requestedUpdateIntervalErr != nil { + return errors.Wrap(_requestedUpdateIntervalErr, "Error serializing 'requestedUpdateInterval' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataRequestedUpdateInterval"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataRequestedUpdateInterval") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataRequestedUpdateInterval) SerializeWithWriteBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataRequestedUpdateInterval) isBACnetConstructedDataRequestedUpdateInterval() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataRequestedUpdateInterval) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRequired.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRequired.go index 6fc2cf854ce..51c8677c630 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRequired.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRequired.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataRequired is the corresponding interface of BACnetConstructedDataRequired type BACnetConstructedDataRequired interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataRequired struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataRequired) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataRequired) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataRequired) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_REQUIRED -} +func (m *_BACnetConstructedDataRequired) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_REQUIRED} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataRequired) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataRequired) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataRequired) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataRequired) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataRequired factory function for _BACnetConstructedDataRequired -func NewBACnetConstructedDataRequired(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataRequired { +func NewBACnetConstructedDataRequired( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataRequired { _result := &_BACnetConstructedDataRequired{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataRequired(openingTag BACnetOpeningTag, peekedTagHead // Deprecated: use the interface for direct cast func CastBACnetConstructedDataRequired(structType interface{}) BACnetConstructedDataRequired { - if casted, ok := structType.(BACnetConstructedDataRequired); ok { + if casted, ok := structType.(BACnetConstructedDataRequired); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataRequired); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataRequired) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetConstructedDataRequired) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataRequiredParseWithBuffer(ctx context.Context, readBuffe _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"An property identified by REQUIRED should never occur in the wild"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataRequiredParseWithBuffer(ctx context.Context, readBuffe // Create a partially initialized instance _child := &_BACnetConstructedDataRequired{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataRequired) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataRequired) isBACnetConstructedDataRequired() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataRequired) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataResolution.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataResolution.go index eca2b97f90f..5b5bc81ff80 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataResolution.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataResolution.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataResolution is the corresponding interface of BACnetConstructedDataResolution type BACnetConstructedDataResolution interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataResolutionExactly interface { // _BACnetConstructedDataResolution is the data-structure of this message type _BACnetConstructedDataResolution struct { *_BACnetConstructedData - Resolution BACnetApplicationTagReal + Resolution BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataResolution) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataResolution) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataResolution) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_RESOLUTION -} +func (m *_BACnetConstructedDataResolution) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_RESOLUTION} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataResolution) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataResolution) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataResolution) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataResolution) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataResolution) GetActualValue() BACnetApplicationTag /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataResolution factory function for _BACnetConstructedDataResolution -func NewBACnetConstructedDataResolution(resolution BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataResolution { +func NewBACnetConstructedDataResolution( resolution BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataResolution { _result := &_BACnetConstructedDataResolution{ - Resolution: resolution, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Resolution: resolution, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataResolution(resolution BACnetApplicationTagReal, ope // Deprecated: use the interface for direct cast func CastBACnetConstructedDataResolution(structType interface{}) BACnetConstructedDataResolution { - if casted, ok := structType.(BACnetConstructedDataResolution); ok { + if casted, ok := structType.(BACnetConstructedDataResolution); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataResolution); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataResolution) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataResolution) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataResolutionParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("resolution"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for resolution") } - _resolution, _resolutionErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_resolution, _resolutionErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _resolutionErr != nil { return nil, errors.Wrap(_resolutionErr, "Error parsing 'resolution' field of BACnetConstructedDataResolution") } @@ -186,7 +188,7 @@ func BACnetConstructedDataResolutionParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetConstructedDataResolution{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Resolution: resolution, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataResolution) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataResolution") } - // Simple Field (resolution) - if pushErr := writeBuffer.PushContext("resolution"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for resolution") - } - _resolutionErr := writeBuffer.WriteSerializable(ctx, m.GetResolution()) - if popErr := writeBuffer.PopContext("resolution"); popErr != nil { - return errors.Wrap(popErr, "Error popping for resolution") - } - if _resolutionErr != nil { - return errors.Wrap(_resolutionErr, "Error serializing 'resolution' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (resolution) + if pushErr := writeBuffer.PushContext("resolution"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for resolution") + } + _resolutionErr := writeBuffer.WriteSerializable(ctx, m.GetResolution()) + if popErr := writeBuffer.PopContext("resolution"); popErr != nil { + return errors.Wrap(popErr, "Error popping for resolution") + } + if _resolutionErr != nil { + return errors.Wrap(_resolutionErr, "Error serializing 'resolution' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataResolution"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataResolution") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataResolution) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataResolution) isBACnetConstructedDataResolution() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataResolution) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRestartNotificationRecipients.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRestartNotificationRecipients.go index d8191d1d757..9e5dcb77b3c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRestartNotificationRecipients.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRestartNotificationRecipients.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataRestartNotificationRecipients is the corresponding interface of BACnetConstructedDataRestartNotificationRecipients type BACnetConstructedDataRestartNotificationRecipients interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataRestartNotificationRecipientsExactly interface { // _BACnetConstructedDataRestartNotificationRecipients is the data-structure of this message type _BACnetConstructedDataRestartNotificationRecipients struct { *_BACnetConstructedData - RestartNotificationRecipients []BACnetRecipient + RestartNotificationRecipients []BACnetRecipient } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataRestartNotificationRecipients) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataRestartNotificationRecipients) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataRestartNotificationRecipients) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_RESTART_NOTIFICATION_RECIPIENTS -} +func (m *_BACnetConstructedDataRestartNotificationRecipients) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_RESTART_NOTIFICATION_RECIPIENTS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataRestartNotificationRecipients) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataRestartNotificationRecipients) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataRestartNotificationRecipients) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataRestartNotificationRecipients) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataRestartNotificationRecipients) GetRestartNotifica /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataRestartNotificationRecipients factory function for _BACnetConstructedDataRestartNotificationRecipients -func NewBACnetConstructedDataRestartNotificationRecipients(restartNotificationRecipients []BACnetRecipient, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataRestartNotificationRecipients { +func NewBACnetConstructedDataRestartNotificationRecipients( restartNotificationRecipients []BACnetRecipient , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataRestartNotificationRecipients { _result := &_BACnetConstructedDataRestartNotificationRecipients{ RestartNotificationRecipients: restartNotificationRecipients, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataRestartNotificationRecipients(restartNotificationRe // Deprecated: use the interface for direct cast func CastBACnetConstructedDataRestartNotificationRecipients(structType interface{}) BACnetConstructedDataRestartNotificationRecipients { - if casted, ok := structType.(BACnetConstructedDataRestartNotificationRecipients); ok { + if casted, ok := structType.(BACnetConstructedDataRestartNotificationRecipients); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataRestartNotificationRecipients); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataRestartNotificationRecipients) GetLengthInBits(ct return lengthInBits } + func (m *_BACnetConstructedDataRestartNotificationRecipients) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataRestartNotificationRecipientsParseWithBuffer(ctx conte // Terminated array var restartNotificationRecipients []BACnetRecipient { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetRecipientParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetRecipientParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'restartNotificationRecipients' field of BACnetConstructedDataRestartNotificationRecipients") } @@ -173,7 +175,7 @@ func BACnetConstructedDataRestartNotificationRecipientsParseWithBuffer(ctx conte // Create a partially initialized instance _child := &_BACnetConstructedDataRestartNotificationRecipients{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, RestartNotificationRecipients: restartNotificationRecipients, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataRestartNotificationRecipients) SerializeWithWrite return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataRestartNotificationRecipients") } - // Array Field (restartNotificationRecipients) - if pushErr := writeBuffer.PushContext("restartNotificationRecipients", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for restartNotificationRecipients") - } - for _curItem, _element := range m.GetRestartNotificationRecipients() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetRestartNotificationRecipients()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'restartNotificationRecipients' field") - } - } - if popErr := writeBuffer.PopContext("restartNotificationRecipients", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for restartNotificationRecipients") + // Array Field (restartNotificationRecipients) + if pushErr := writeBuffer.PushContext("restartNotificationRecipients", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for restartNotificationRecipients") + } + for _curItem, _element := range m.GetRestartNotificationRecipients() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetRestartNotificationRecipients()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'restartNotificationRecipients' field") } + } + if popErr := writeBuffer.PopContext("restartNotificationRecipients", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for restartNotificationRecipients") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataRestartNotificationRecipients"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataRestartNotificationRecipients") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataRestartNotificationRecipients) SerializeWithWrite return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataRestartNotificationRecipients) isBACnetConstructedDataRestartNotificationRecipients() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataRestartNotificationRecipients) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRestoreCompletionTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRestoreCompletionTime.go index a1ebd36444b..e5ee7999259 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRestoreCompletionTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRestoreCompletionTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataRestoreCompletionTime is the corresponding interface of BACnetConstructedDataRestoreCompletionTime type BACnetConstructedDataRestoreCompletionTime interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataRestoreCompletionTimeExactly interface { // _BACnetConstructedDataRestoreCompletionTime is the data-structure of this message type _BACnetConstructedDataRestoreCompletionTime struct { *_BACnetConstructedData - CompletionTime BACnetApplicationTagUnsignedInteger + CompletionTime BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataRestoreCompletionTime) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataRestoreCompletionTime) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataRestoreCompletionTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_RESTORE_COMPLETION_TIME -} +func (m *_BACnetConstructedDataRestoreCompletionTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_RESTORE_COMPLETION_TIME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataRestoreCompletionTime) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataRestoreCompletionTime) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataRestoreCompletionTime) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataRestoreCompletionTime) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataRestoreCompletionTime) GetActualValue() BACnetApp /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataRestoreCompletionTime factory function for _BACnetConstructedDataRestoreCompletionTime -func NewBACnetConstructedDataRestoreCompletionTime(completionTime BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataRestoreCompletionTime { +func NewBACnetConstructedDataRestoreCompletionTime( completionTime BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataRestoreCompletionTime { _result := &_BACnetConstructedDataRestoreCompletionTime{ - CompletionTime: completionTime, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + CompletionTime: completionTime, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataRestoreCompletionTime(completionTime BACnetApplicat // Deprecated: use the interface for direct cast func CastBACnetConstructedDataRestoreCompletionTime(structType interface{}) BACnetConstructedDataRestoreCompletionTime { - if casted, ok := structType.(BACnetConstructedDataRestoreCompletionTime); ok { + if casted, ok := structType.(BACnetConstructedDataRestoreCompletionTime); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataRestoreCompletionTime); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataRestoreCompletionTime) GetLengthInBits(ctx contex return lengthInBits } + func (m *_BACnetConstructedDataRestoreCompletionTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataRestoreCompletionTimeParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("completionTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for completionTime") } - _completionTime, _completionTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_completionTime, _completionTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _completionTimeErr != nil { return nil, errors.Wrap(_completionTimeErr, "Error parsing 'completionTime' field of BACnetConstructedDataRestoreCompletionTime") } @@ -186,7 +188,7 @@ func BACnetConstructedDataRestoreCompletionTimeParseWithBuffer(ctx context.Conte // Create a partially initialized instance _child := &_BACnetConstructedDataRestoreCompletionTime{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, CompletionTime: completionTime, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataRestoreCompletionTime) SerializeWithWriteBuffer(c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataRestoreCompletionTime") } - // Simple Field (completionTime) - if pushErr := writeBuffer.PushContext("completionTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for completionTime") - } - _completionTimeErr := writeBuffer.WriteSerializable(ctx, m.GetCompletionTime()) - if popErr := writeBuffer.PopContext("completionTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for completionTime") - } - if _completionTimeErr != nil { - return errors.Wrap(_completionTimeErr, "Error serializing 'completionTime' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (completionTime) + if pushErr := writeBuffer.PushContext("completionTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for completionTime") + } + _completionTimeErr := writeBuffer.WriteSerializable(ctx, m.GetCompletionTime()) + if popErr := writeBuffer.PopContext("completionTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for completionTime") + } + if _completionTimeErr != nil { + return errors.Wrap(_completionTimeErr, "Error serializing 'completionTime' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataRestoreCompletionTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataRestoreCompletionTime") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataRestoreCompletionTime) SerializeWithWriteBuffer(c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataRestoreCompletionTime) isBACnetConstructedDataRestoreCompletionTime() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataRestoreCompletionTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRestorePreparationTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRestorePreparationTime.go index 8c384fd45e3..92ccb1f434d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRestorePreparationTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRestorePreparationTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataRestorePreparationTime is the corresponding interface of BACnetConstructedDataRestorePreparationTime type BACnetConstructedDataRestorePreparationTime interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataRestorePreparationTimeExactly interface { // _BACnetConstructedDataRestorePreparationTime is the data-structure of this message type _BACnetConstructedDataRestorePreparationTime struct { *_BACnetConstructedData - RestorePreparationTime BACnetApplicationTagUnsignedInteger + RestorePreparationTime BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataRestorePreparationTime) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataRestorePreparationTime) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataRestorePreparationTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_RESTORE_PREPARATION_TIME -} +func (m *_BACnetConstructedDataRestorePreparationTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_RESTORE_PREPARATION_TIME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataRestorePreparationTime) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataRestorePreparationTime) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataRestorePreparationTime) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataRestorePreparationTime) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataRestorePreparationTime) GetActualValue() BACnetAp /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataRestorePreparationTime factory function for _BACnetConstructedDataRestorePreparationTime -func NewBACnetConstructedDataRestorePreparationTime(restorePreparationTime BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataRestorePreparationTime { +func NewBACnetConstructedDataRestorePreparationTime( restorePreparationTime BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataRestorePreparationTime { _result := &_BACnetConstructedDataRestorePreparationTime{ RestorePreparationTime: restorePreparationTime, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataRestorePreparationTime(restorePreparationTime BACne // Deprecated: use the interface for direct cast func CastBACnetConstructedDataRestorePreparationTime(structType interface{}) BACnetConstructedDataRestorePreparationTime { - if casted, ok := structType.(BACnetConstructedDataRestorePreparationTime); ok { + if casted, ok := structType.(BACnetConstructedDataRestorePreparationTime); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataRestorePreparationTime); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataRestorePreparationTime) GetLengthInBits(ctx conte return lengthInBits } + func (m *_BACnetConstructedDataRestorePreparationTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataRestorePreparationTimeParseWithBuffer(ctx context.Cont if pullErr := readBuffer.PullContext("restorePreparationTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for restorePreparationTime") } - _restorePreparationTime, _restorePreparationTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_restorePreparationTime, _restorePreparationTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _restorePreparationTimeErr != nil { return nil, errors.Wrap(_restorePreparationTimeErr, "Error parsing 'restorePreparationTime' field of BACnetConstructedDataRestorePreparationTime") } @@ -186,7 +188,7 @@ func BACnetConstructedDataRestorePreparationTimeParseWithBuffer(ctx context.Cont // Create a partially initialized instance _child := &_BACnetConstructedDataRestorePreparationTime{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, RestorePreparationTime: restorePreparationTime, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataRestorePreparationTime) SerializeWithWriteBuffer( return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataRestorePreparationTime") } - // Simple Field (restorePreparationTime) - if pushErr := writeBuffer.PushContext("restorePreparationTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for restorePreparationTime") - } - _restorePreparationTimeErr := writeBuffer.WriteSerializable(ctx, m.GetRestorePreparationTime()) - if popErr := writeBuffer.PopContext("restorePreparationTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for restorePreparationTime") - } - if _restorePreparationTimeErr != nil { - return errors.Wrap(_restorePreparationTimeErr, "Error serializing 'restorePreparationTime' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (restorePreparationTime) + if pushErr := writeBuffer.PushContext("restorePreparationTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for restorePreparationTime") + } + _restorePreparationTimeErr := writeBuffer.WriteSerializable(ctx, m.GetRestorePreparationTime()) + if popErr := writeBuffer.PopContext("restorePreparationTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for restorePreparationTime") + } + if _restorePreparationTimeErr != nil { + return errors.Wrap(_restorePreparationTimeErr, "Error serializing 'restorePreparationTime' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataRestorePreparationTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataRestorePreparationTime") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataRestorePreparationTime) SerializeWithWriteBuffer( return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataRestorePreparationTime) isBACnetConstructedDataRestorePreparationTime() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataRestorePreparationTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRoutingTable.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRoutingTable.go index b83b668aa93..6162af1808c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRoutingTable.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataRoutingTable.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataRoutingTable is the corresponding interface of BACnetConstructedDataRoutingTable type BACnetConstructedDataRoutingTable interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataRoutingTableExactly interface { // _BACnetConstructedDataRoutingTable is the data-structure of this message type _BACnetConstructedDataRoutingTable struct { *_BACnetConstructedData - RoutingTable []BACnetRouterEntry + RoutingTable []BACnetRouterEntry } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataRoutingTable) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataRoutingTable) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataRoutingTable) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ROUTING_TABLE -} +func (m *_BACnetConstructedDataRoutingTable) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ROUTING_TABLE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataRoutingTable) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataRoutingTable) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataRoutingTable) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataRoutingTable) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataRoutingTable) GetRoutingTable() []BACnetRouterEnt /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataRoutingTable factory function for _BACnetConstructedDataRoutingTable -func NewBACnetConstructedDataRoutingTable(routingTable []BACnetRouterEntry, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataRoutingTable { +func NewBACnetConstructedDataRoutingTable( routingTable []BACnetRouterEntry , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataRoutingTable { _result := &_BACnetConstructedDataRoutingTable{ - RoutingTable: routingTable, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + RoutingTable: routingTable, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataRoutingTable(routingTable []BACnetRouterEntry, open // Deprecated: use the interface for direct cast func CastBACnetConstructedDataRoutingTable(structType interface{}) BACnetConstructedDataRoutingTable { - if casted, ok := structType.(BACnetConstructedDataRoutingTable); ok { + if casted, ok := structType.(BACnetConstructedDataRoutingTable); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataRoutingTable); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataRoutingTable) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetConstructedDataRoutingTable) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataRoutingTableParseWithBuffer(ctx context.Context, readB // Terminated array var routingTable []BACnetRouterEntry { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetRouterEntryParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetRouterEntryParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'routingTable' field of BACnetConstructedDataRoutingTable") } @@ -173,7 +175,7 @@ func BACnetConstructedDataRoutingTableParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetConstructedDataRoutingTable{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, RoutingTable: routingTable, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataRoutingTable) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataRoutingTable") } - // Array Field (routingTable) - if pushErr := writeBuffer.PushContext("routingTable", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for routingTable") - } - for _curItem, _element := range m.GetRoutingTable() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetRoutingTable()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'routingTable' field") - } - } - if popErr := writeBuffer.PopContext("routingTable", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for routingTable") + // Array Field (routingTable) + if pushErr := writeBuffer.PushContext("routingTable", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for routingTable") + } + for _curItem, _element := range m.GetRoutingTable() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetRoutingTable()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'routingTable' field") } + } + if popErr := writeBuffer.PopContext("routingTable", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for routingTable") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataRoutingTable"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataRoutingTable") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataRoutingTable) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataRoutingTable) isBACnetConstructedDataRoutingTable() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataRoutingTable) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataScale.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataScale.go index 1772c652193..5a63b36b547 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataScale.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataScale.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataScale is the corresponding interface of BACnetConstructedDataScale type BACnetConstructedDataScale interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataScaleExactly interface { // _BACnetConstructedDataScale is the data-structure of this message type _BACnetConstructedDataScale struct { *_BACnetConstructedData - Scale BACnetScale + Scale BACnetScale } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataScale) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataScale) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataScale) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_SCALE -} +func (m *_BACnetConstructedDataScale) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_SCALE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataScale) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataScale) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataScale) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataScale) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataScale) GetActualValue() BACnetScale { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataScale factory function for _BACnetConstructedDataScale -func NewBACnetConstructedDataScale(scale BACnetScale, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataScale { +func NewBACnetConstructedDataScale( scale BACnetScale , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataScale { _result := &_BACnetConstructedDataScale{ - Scale: scale, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Scale: scale, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataScale(scale BACnetScale, openingTag BACnetOpeningTa // Deprecated: use the interface for direct cast func CastBACnetConstructedDataScale(structType interface{}) BACnetConstructedDataScale { - if casted, ok := structType.(BACnetConstructedDataScale); ok { + if casted, ok := structType.(BACnetConstructedDataScale); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataScale); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataScale) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_BACnetConstructedDataScale) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataScaleParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("scale"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for scale") } - _scale, _scaleErr := BACnetScaleParseWithBuffer(ctx, readBuffer) +_scale, _scaleErr := BACnetScaleParseWithBuffer(ctx, readBuffer) if _scaleErr != nil { return nil, errors.Wrap(_scaleErr, "Error parsing 'scale' field of BACnetConstructedDataScale") } @@ -186,7 +188,7 @@ func BACnetConstructedDataScaleParseWithBuffer(ctx context.Context, readBuffer u // Create a partially initialized instance _child := &_BACnetConstructedDataScale{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Scale: scale, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataScale) SerializeWithWriteBuffer(ctx context.Conte return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataScale") } - // Simple Field (scale) - if pushErr := writeBuffer.PushContext("scale"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for scale") - } - _scaleErr := writeBuffer.WriteSerializable(ctx, m.GetScale()) - if popErr := writeBuffer.PopContext("scale"); popErr != nil { - return errors.Wrap(popErr, "Error popping for scale") - } - if _scaleErr != nil { - return errors.Wrap(_scaleErr, "Error serializing 'scale' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (scale) + if pushErr := writeBuffer.PushContext("scale"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for scale") + } + _scaleErr := writeBuffer.WriteSerializable(ctx, m.GetScale()) + if popErr := writeBuffer.PopContext("scale"); popErr != nil { + return errors.Wrap(popErr, "Error popping for scale") + } + if _scaleErr != nil { + return errors.Wrap(_scaleErr, "Error serializing 'scale' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataScale"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataScale") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataScale) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataScale) isBACnetConstructedDataScale() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataScale) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataScaleFactor.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataScaleFactor.go index fd4589e9bcd..cb996dce5bd 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataScaleFactor.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataScaleFactor.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataScaleFactor is the corresponding interface of BACnetConstructedDataScaleFactor type BACnetConstructedDataScaleFactor interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataScaleFactorExactly interface { // _BACnetConstructedDataScaleFactor is the data-structure of this message type _BACnetConstructedDataScaleFactor struct { *_BACnetConstructedData - ScaleFactor BACnetApplicationTagReal + ScaleFactor BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataScaleFactor) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataScaleFactor) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataScaleFactor) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_SCALE_FACTOR -} +func (m *_BACnetConstructedDataScaleFactor) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_SCALE_FACTOR} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataScaleFactor) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataScaleFactor) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataScaleFactor) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataScaleFactor) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataScaleFactor) GetActualValue() BACnetApplicationTa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataScaleFactor factory function for _BACnetConstructedDataScaleFactor -func NewBACnetConstructedDataScaleFactor(scaleFactor BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataScaleFactor { +func NewBACnetConstructedDataScaleFactor( scaleFactor BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataScaleFactor { _result := &_BACnetConstructedDataScaleFactor{ - ScaleFactor: scaleFactor, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ScaleFactor: scaleFactor, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataScaleFactor(scaleFactor BACnetApplicationTagReal, o // Deprecated: use the interface for direct cast func CastBACnetConstructedDataScaleFactor(structType interface{}) BACnetConstructedDataScaleFactor { - if casted, ok := structType.(BACnetConstructedDataScaleFactor); ok { + if casted, ok := structType.(BACnetConstructedDataScaleFactor); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataScaleFactor); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataScaleFactor) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataScaleFactor) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataScaleFactorParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("scaleFactor"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for scaleFactor") } - _scaleFactor, _scaleFactorErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_scaleFactor, _scaleFactorErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _scaleFactorErr != nil { return nil, errors.Wrap(_scaleFactorErr, "Error parsing 'scaleFactor' field of BACnetConstructedDataScaleFactor") } @@ -186,7 +188,7 @@ func BACnetConstructedDataScaleFactorParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataScaleFactor{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ScaleFactor: scaleFactor, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataScaleFactor) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataScaleFactor") } - // Simple Field (scaleFactor) - if pushErr := writeBuffer.PushContext("scaleFactor"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for scaleFactor") - } - _scaleFactorErr := writeBuffer.WriteSerializable(ctx, m.GetScaleFactor()) - if popErr := writeBuffer.PopContext("scaleFactor"); popErr != nil { - return errors.Wrap(popErr, "Error popping for scaleFactor") - } - if _scaleFactorErr != nil { - return errors.Wrap(_scaleFactorErr, "Error serializing 'scaleFactor' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (scaleFactor) + if pushErr := writeBuffer.PushContext("scaleFactor"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for scaleFactor") + } + _scaleFactorErr := writeBuffer.WriteSerializable(ctx, m.GetScaleFactor()) + if popErr := writeBuffer.PopContext("scaleFactor"); popErr != nil { + return errors.Wrap(popErr, "Error popping for scaleFactor") + } + if _scaleFactorErr != nil { + return errors.Wrap(_scaleFactorErr, "Error serializing 'scaleFactor' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataScaleFactor"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataScaleFactor") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataScaleFactor) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataScaleFactor) isBACnetConstructedDataScaleFactor() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataScaleFactor) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataScheduleAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataScheduleAll.go index 8f1c0e7b515..bc3b05adaaa 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataScheduleAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataScheduleAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataScheduleAll is the corresponding interface of BACnetConstructedDataScheduleAll type BACnetConstructedDataScheduleAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataScheduleAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataScheduleAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_SCHEDULE -} +func (m *_BACnetConstructedDataScheduleAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_SCHEDULE} -func (m *_BACnetConstructedDataScheduleAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataScheduleAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataScheduleAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataScheduleAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataScheduleAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataScheduleAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataScheduleAll factory function for _BACnetConstructedDataScheduleAll -func NewBACnetConstructedDataScheduleAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataScheduleAll { +func NewBACnetConstructedDataScheduleAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataScheduleAll { _result := &_BACnetConstructedDataScheduleAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataScheduleAll(openingTag BACnetOpeningTag, peekedTagH // Deprecated: use the interface for direct cast func CastBACnetConstructedDataScheduleAll(structType interface{}) BACnetConstructedDataScheduleAll { - if casted, ok := structType.(BACnetConstructedDataScheduleAll); ok { + if casted, ok := structType.(BACnetConstructedDataScheduleAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataScheduleAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataScheduleAll) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataScheduleAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataScheduleAllParseWithBuffer(ctx context.Context, readBu _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataScheduleAllParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataScheduleAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataScheduleAll) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataScheduleAll) isBACnetConstructedDataScheduleAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataScheduleAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataScheduleDefault.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataScheduleDefault.go index 3d1699b74d8..46273961128 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataScheduleDefault.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataScheduleDefault.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataScheduleDefault is the corresponding interface of BACnetConstructedDataScheduleDefault type BACnetConstructedDataScheduleDefault interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataScheduleDefaultExactly interface { // _BACnetConstructedDataScheduleDefault is the data-structure of this message type _BACnetConstructedDataScheduleDefault struct { *_BACnetConstructedData - ScheduleDefault BACnetConstructedDataElement + ScheduleDefault BACnetConstructedDataElement } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataScheduleDefault) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataScheduleDefault) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataScheduleDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_SCHEDULE_DEFAULT -} +func (m *_BACnetConstructedDataScheduleDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_SCHEDULE_DEFAULT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataScheduleDefault) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataScheduleDefault) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataScheduleDefault) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataScheduleDefault) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataScheduleDefault) GetActualValue() BACnetConstruct /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataScheduleDefault factory function for _BACnetConstructedDataScheduleDefault -func NewBACnetConstructedDataScheduleDefault(scheduleDefault BACnetConstructedDataElement, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataScheduleDefault { +func NewBACnetConstructedDataScheduleDefault( scheduleDefault BACnetConstructedDataElement , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataScheduleDefault { _result := &_BACnetConstructedDataScheduleDefault{ - ScheduleDefault: scheduleDefault, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ScheduleDefault: scheduleDefault, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataScheduleDefault(scheduleDefault BACnetConstructedDa // Deprecated: use the interface for direct cast func CastBACnetConstructedDataScheduleDefault(structType interface{}) BACnetConstructedDataScheduleDefault { - if casted, ok := structType.(BACnetConstructedDataScheduleDefault); ok { + if casted, ok := structType.(BACnetConstructedDataScheduleDefault); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataScheduleDefault); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataScheduleDefault) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetConstructedDataScheduleDefault) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataScheduleDefaultParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("scheduleDefault"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for scheduleDefault") } - _scheduleDefault, _scheduleDefaultErr := BACnetConstructedDataElementParseWithBuffer(ctx, readBuffer, BACnetObjectType(objectTypeArgument), BACnetPropertyIdentifier(propertyIdentifierArgument), nil) +_scheduleDefault, _scheduleDefaultErr := BACnetConstructedDataElementParseWithBuffer(ctx, readBuffer , BACnetObjectType( objectTypeArgument ) , BACnetPropertyIdentifier( propertyIdentifierArgument ) , nil ) if _scheduleDefaultErr != nil { return nil, errors.Wrap(_scheduleDefaultErr, "Error parsing 'scheduleDefault' field of BACnetConstructedDataScheduleDefault") } @@ -186,7 +188,7 @@ func BACnetConstructedDataScheduleDefaultParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetConstructedDataScheduleDefault{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ScheduleDefault: scheduleDefault, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataScheduleDefault) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataScheduleDefault") } - // Simple Field (scheduleDefault) - if pushErr := writeBuffer.PushContext("scheduleDefault"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for scheduleDefault") - } - _scheduleDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetScheduleDefault()) - if popErr := writeBuffer.PopContext("scheduleDefault"); popErr != nil { - return errors.Wrap(popErr, "Error popping for scheduleDefault") - } - if _scheduleDefaultErr != nil { - return errors.Wrap(_scheduleDefaultErr, "Error serializing 'scheduleDefault' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (scheduleDefault) + if pushErr := writeBuffer.PushContext("scheduleDefault"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for scheduleDefault") + } + _scheduleDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetScheduleDefault()) + if popErr := writeBuffer.PopContext("scheduleDefault"); popErr != nil { + return errors.Wrap(popErr, "Error popping for scheduleDefault") + } + if _scheduleDefaultErr != nil { + return errors.Wrap(_scheduleDefaultErr, "Error serializing 'scheduleDefault' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataScheduleDefault"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataScheduleDefault") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataScheduleDefault) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataScheduleDefault) isBACnetConstructedDataScheduleDefault() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataScheduleDefault) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSchedulePresentValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSchedulePresentValue.go index 4c6529f1f4b..38f373d223c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSchedulePresentValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSchedulePresentValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataSchedulePresentValue is the corresponding interface of BACnetConstructedDataSchedulePresentValue type BACnetConstructedDataSchedulePresentValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataSchedulePresentValueExactly interface { // _BACnetConstructedDataSchedulePresentValue is the data-structure of this message type _BACnetConstructedDataSchedulePresentValue struct { *_BACnetConstructedData - PresentValue BACnetConstructedDataElement + PresentValue BACnetConstructedDataElement } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataSchedulePresentValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_SCHEDULE -} +func (m *_BACnetConstructedDataSchedulePresentValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_SCHEDULE} -func (m *_BACnetConstructedDataSchedulePresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PRESENT_VALUE -} +func (m *_BACnetConstructedDataSchedulePresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PRESENT_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataSchedulePresentValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataSchedulePresentValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataSchedulePresentValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataSchedulePresentValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataSchedulePresentValue) GetActualValue() BACnetCons /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataSchedulePresentValue factory function for _BACnetConstructedDataSchedulePresentValue -func NewBACnetConstructedDataSchedulePresentValue(presentValue BACnetConstructedDataElement, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataSchedulePresentValue { +func NewBACnetConstructedDataSchedulePresentValue( presentValue BACnetConstructedDataElement , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataSchedulePresentValue { _result := &_BACnetConstructedDataSchedulePresentValue{ - PresentValue: presentValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PresentValue: presentValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataSchedulePresentValue(presentValue BACnetConstructed // Deprecated: use the interface for direct cast func CastBACnetConstructedDataSchedulePresentValue(structType interface{}) BACnetConstructedDataSchedulePresentValue { - if casted, ok := structType.(BACnetConstructedDataSchedulePresentValue); ok { + if casted, ok := structType.(BACnetConstructedDataSchedulePresentValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataSchedulePresentValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataSchedulePresentValue) GetLengthInBits(ctx context return lengthInBits } + func (m *_BACnetConstructedDataSchedulePresentValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataSchedulePresentValueParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("presentValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for presentValue") } - _presentValue, _presentValueErr := BACnetConstructedDataElementParseWithBuffer(ctx, readBuffer, BACnetObjectType(BACnetObjectType_VENDOR_PROPRIETARY_VALUE), BACnetPropertyIdentifier(BACnetPropertyIdentifier_VENDOR_PROPRIETARY_VALUE), nil) +_presentValue, _presentValueErr := BACnetConstructedDataElementParseWithBuffer(ctx, readBuffer , BACnetObjectType( BACnetObjectType_VENDOR_PROPRIETARY_VALUE ) , BACnetPropertyIdentifier( BACnetPropertyIdentifier_VENDOR_PROPRIETARY_VALUE ) , nil ) if _presentValueErr != nil { return nil, errors.Wrap(_presentValueErr, "Error parsing 'presentValue' field of BACnetConstructedDataSchedulePresentValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataSchedulePresentValueParseWithBuffer(ctx context.Contex // Create a partially initialized instance _child := &_BACnetConstructedDataSchedulePresentValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PresentValue: presentValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataSchedulePresentValue) SerializeWithWriteBuffer(ct return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataSchedulePresentValue") } - // Simple Field (presentValue) - if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for presentValue") - } - _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) - if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for presentValue") - } - if _presentValueErr != nil { - return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (presentValue) + if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for presentValue") + } + _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) + if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for presentValue") + } + if _presentValueErr != nil { + return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataSchedulePresentValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataSchedulePresentValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataSchedulePresentValue) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataSchedulePresentValue) isBACnetConstructedDataSchedulePresentValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataSchedulePresentValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSecuredStatus.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSecuredStatus.go index 41933a84ed2..969236e3ddc 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSecuredStatus.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSecuredStatus.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataSecuredStatus is the corresponding interface of BACnetConstructedDataSecuredStatus type BACnetConstructedDataSecuredStatus interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataSecuredStatusExactly interface { // _BACnetConstructedDataSecuredStatus is the data-structure of this message type _BACnetConstructedDataSecuredStatus struct { *_BACnetConstructedData - SecuredStatus BACnetDoorSecuredStatusTagged + SecuredStatus BACnetDoorSecuredStatusTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataSecuredStatus) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataSecuredStatus) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataSecuredStatus) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_SECURED_STATUS -} +func (m *_BACnetConstructedDataSecuredStatus) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_SECURED_STATUS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataSecuredStatus) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataSecuredStatus) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataSecuredStatus) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataSecuredStatus) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataSecuredStatus) GetActualValue() BACnetDoorSecured /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataSecuredStatus factory function for _BACnetConstructedDataSecuredStatus -func NewBACnetConstructedDataSecuredStatus(securedStatus BACnetDoorSecuredStatusTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataSecuredStatus { +func NewBACnetConstructedDataSecuredStatus( securedStatus BACnetDoorSecuredStatusTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataSecuredStatus { _result := &_BACnetConstructedDataSecuredStatus{ - SecuredStatus: securedStatus, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + SecuredStatus: securedStatus, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataSecuredStatus(securedStatus BACnetDoorSecuredStatus // Deprecated: use the interface for direct cast func CastBACnetConstructedDataSecuredStatus(structType interface{}) BACnetConstructedDataSecuredStatus { - if casted, ok := structType.(BACnetConstructedDataSecuredStatus); ok { + if casted, ok := structType.(BACnetConstructedDataSecuredStatus); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataSecuredStatus); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataSecuredStatus) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetConstructedDataSecuredStatus) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataSecuredStatusParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("securedStatus"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for securedStatus") } - _securedStatus, _securedStatusErr := BACnetDoorSecuredStatusTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_securedStatus, _securedStatusErr := BACnetDoorSecuredStatusTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _securedStatusErr != nil { return nil, errors.Wrap(_securedStatusErr, "Error parsing 'securedStatus' field of BACnetConstructedDataSecuredStatus") } @@ -186,7 +188,7 @@ func BACnetConstructedDataSecuredStatusParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetConstructedDataSecuredStatus{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, SecuredStatus: securedStatus, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataSecuredStatus) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataSecuredStatus") } - // Simple Field (securedStatus) - if pushErr := writeBuffer.PushContext("securedStatus"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for securedStatus") - } - _securedStatusErr := writeBuffer.WriteSerializable(ctx, m.GetSecuredStatus()) - if popErr := writeBuffer.PopContext("securedStatus"); popErr != nil { - return errors.Wrap(popErr, "Error popping for securedStatus") - } - if _securedStatusErr != nil { - return errors.Wrap(_securedStatusErr, "Error serializing 'securedStatus' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (securedStatus) + if pushErr := writeBuffer.PushContext("securedStatus"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for securedStatus") + } + _securedStatusErr := writeBuffer.WriteSerializable(ctx, m.GetSecuredStatus()) + if popErr := writeBuffer.PopContext("securedStatus"); popErr != nil { + return errors.Wrap(popErr, "Error popping for securedStatus") + } + if _securedStatusErr != nil { + return errors.Wrap(_securedStatusErr, "Error serializing 'securedStatus' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataSecuredStatus"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataSecuredStatus") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataSecuredStatus) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataSecuredStatus) isBACnetConstructedDataSecuredStatus() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataSecuredStatus) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSecurityPDUTimeout.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSecurityPDUTimeout.go index 50d85c03558..9ea4ba3df1b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSecurityPDUTimeout.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSecurityPDUTimeout.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataSecurityPDUTimeout is the corresponding interface of BACnetConstructedDataSecurityPDUTimeout type BACnetConstructedDataSecurityPDUTimeout interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataSecurityPDUTimeoutExactly interface { // _BACnetConstructedDataSecurityPDUTimeout is the data-structure of this message type _BACnetConstructedDataSecurityPDUTimeout struct { *_BACnetConstructedData - SecurityPduTimeout BACnetApplicationTagUnsignedInteger + SecurityPduTimeout BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataSecurityPDUTimeout) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataSecurityPDUTimeout) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataSecurityPDUTimeout) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_SECURITY_PDU_TIMEOUT -} +func (m *_BACnetConstructedDataSecurityPDUTimeout) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_SECURITY_PDU_TIMEOUT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataSecurityPDUTimeout) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataSecurityPDUTimeout) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataSecurityPDUTimeout) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataSecurityPDUTimeout) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataSecurityPDUTimeout) GetActualValue() BACnetApplic /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataSecurityPDUTimeout factory function for _BACnetConstructedDataSecurityPDUTimeout -func NewBACnetConstructedDataSecurityPDUTimeout(securityPduTimeout BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataSecurityPDUTimeout { +func NewBACnetConstructedDataSecurityPDUTimeout( securityPduTimeout BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataSecurityPDUTimeout { _result := &_BACnetConstructedDataSecurityPDUTimeout{ - SecurityPduTimeout: securityPduTimeout, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + SecurityPduTimeout: securityPduTimeout, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataSecurityPDUTimeout(securityPduTimeout BACnetApplica // Deprecated: use the interface for direct cast func CastBACnetConstructedDataSecurityPDUTimeout(structType interface{}) BACnetConstructedDataSecurityPDUTimeout { - if casted, ok := structType.(BACnetConstructedDataSecurityPDUTimeout); ok { + if casted, ok := structType.(BACnetConstructedDataSecurityPDUTimeout); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataSecurityPDUTimeout); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataSecurityPDUTimeout) GetLengthInBits(ctx context.C return lengthInBits } + func (m *_BACnetConstructedDataSecurityPDUTimeout) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataSecurityPDUTimeoutParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("securityPduTimeout"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for securityPduTimeout") } - _securityPduTimeout, _securityPduTimeoutErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_securityPduTimeout, _securityPduTimeoutErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _securityPduTimeoutErr != nil { return nil, errors.Wrap(_securityPduTimeoutErr, "Error parsing 'securityPduTimeout' field of BACnetConstructedDataSecurityPDUTimeout") } @@ -186,7 +188,7 @@ func BACnetConstructedDataSecurityPDUTimeoutParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataSecurityPDUTimeout{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, SecurityPduTimeout: securityPduTimeout, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataSecurityPDUTimeout) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataSecurityPDUTimeout") } - // Simple Field (securityPduTimeout) - if pushErr := writeBuffer.PushContext("securityPduTimeout"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for securityPduTimeout") - } - _securityPduTimeoutErr := writeBuffer.WriteSerializable(ctx, m.GetSecurityPduTimeout()) - if popErr := writeBuffer.PopContext("securityPduTimeout"); popErr != nil { - return errors.Wrap(popErr, "Error popping for securityPduTimeout") - } - if _securityPduTimeoutErr != nil { - return errors.Wrap(_securityPduTimeoutErr, "Error serializing 'securityPduTimeout' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (securityPduTimeout) + if pushErr := writeBuffer.PushContext("securityPduTimeout"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for securityPduTimeout") + } + _securityPduTimeoutErr := writeBuffer.WriteSerializable(ctx, m.GetSecurityPduTimeout()) + if popErr := writeBuffer.PopContext("securityPduTimeout"); popErr != nil { + return errors.Wrap(popErr, "Error popping for securityPduTimeout") + } + if _securityPduTimeoutErr != nil { + return errors.Wrap(_securityPduTimeoutErr, "Error serializing 'securityPduTimeout' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataSecurityPDUTimeout"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataSecurityPDUTimeout") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataSecurityPDUTimeout) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataSecurityPDUTimeout) isBACnetConstructedDataSecurityPDUTimeout() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataSecurityPDUTimeout) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSecurityTimeWindow.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSecurityTimeWindow.go index 26f11e569a5..60dbe32e2d0 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSecurityTimeWindow.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSecurityTimeWindow.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataSecurityTimeWindow is the corresponding interface of BACnetConstructedDataSecurityTimeWindow type BACnetConstructedDataSecurityTimeWindow interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataSecurityTimeWindowExactly interface { // _BACnetConstructedDataSecurityTimeWindow is the data-structure of this message type _BACnetConstructedDataSecurityTimeWindow struct { *_BACnetConstructedData - SecurityTimeWindow BACnetApplicationTagUnsignedInteger + SecurityTimeWindow BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataSecurityTimeWindow) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataSecurityTimeWindow) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataSecurityTimeWindow) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_SECURITY_TIME_WINDOW -} +func (m *_BACnetConstructedDataSecurityTimeWindow) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_SECURITY_TIME_WINDOW} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataSecurityTimeWindow) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataSecurityTimeWindow) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataSecurityTimeWindow) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataSecurityTimeWindow) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataSecurityTimeWindow) GetActualValue() BACnetApplic /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataSecurityTimeWindow factory function for _BACnetConstructedDataSecurityTimeWindow -func NewBACnetConstructedDataSecurityTimeWindow(securityTimeWindow BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataSecurityTimeWindow { +func NewBACnetConstructedDataSecurityTimeWindow( securityTimeWindow BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataSecurityTimeWindow { _result := &_BACnetConstructedDataSecurityTimeWindow{ - SecurityTimeWindow: securityTimeWindow, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + SecurityTimeWindow: securityTimeWindow, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataSecurityTimeWindow(securityTimeWindow BACnetApplica // Deprecated: use the interface for direct cast func CastBACnetConstructedDataSecurityTimeWindow(structType interface{}) BACnetConstructedDataSecurityTimeWindow { - if casted, ok := structType.(BACnetConstructedDataSecurityTimeWindow); ok { + if casted, ok := structType.(BACnetConstructedDataSecurityTimeWindow); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataSecurityTimeWindow); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataSecurityTimeWindow) GetLengthInBits(ctx context.C return lengthInBits } + func (m *_BACnetConstructedDataSecurityTimeWindow) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataSecurityTimeWindowParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("securityTimeWindow"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for securityTimeWindow") } - _securityTimeWindow, _securityTimeWindowErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_securityTimeWindow, _securityTimeWindowErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _securityTimeWindowErr != nil { return nil, errors.Wrap(_securityTimeWindowErr, "Error parsing 'securityTimeWindow' field of BACnetConstructedDataSecurityTimeWindow") } @@ -186,7 +188,7 @@ func BACnetConstructedDataSecurityTimeWindowParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataSecurityTimeWindow{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, SecurityTimeWindow: securityTimeWindow, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataSecurityTimeWindow) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataSecurityTimeWindow") } - // Simple Field (securityTimeWindow) - if pushErr := writeBuffer.PushContext("securityTimeWindow"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for securityTimeWindow") - } - _securityTimeWindowErr := writeBuffer.WriteSerializable(ctx, m.GetSecurityTimeWindow()) - if popErr := writeBuffer.PopContext("securityTimeWindow"); popErr != nil { - return errors.Wrap(popErr, "Error popping for securityTimeWindow") - } - if _securityTimeWindowErr != nil { - return errors.Wrap(_securityTimeWindowErr, "Error serializing 'securityTimeWindow' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (securityTimeWindow) + if pushErr := writeBuffer.PushContext("securityTimeWindow"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for securityTimeWindow") + } + _securityTimeWindowErr := writeBuffer.WriteSerializable(ctx, m.GetSecurityTimeWindow()) + if popErr := writeBuffer.PopContext("securityTimeWindow"); popErr != nil { + return errors.Wrap(popErr, "Error popping for securityTimeWindow") + } + if _securityTimeWindowErr != nil { + return errors.Wrap(_securityTimeWindowErr, "Error serializing 'securityTimeWindow' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataSecurityTimeWindow"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataSecurityTimeWindow") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataSecurityTimeWindow) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataSecurityTimeWindow) isBACnetConstructedDataSecurityTimeWindow() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataSecurityTimeWindow) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSegmentationSupported.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSegmentationSupported.go index ea21e729988..492a76e54e2 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSegmentationSupported.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSegmentationSupported.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataSegmentationSupported is the corresponding interface of BACnetConstructedDataSegmentationSupported type BACnetConstructedDataSegmentationSupported interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataSegmentationSupportedExactly interface { // _BACnetConstructedDataSegmentationSupported is the data-structure of this message type _BACnetConstructedDataSegmentationSupported struct { *_BACnetConstructedData - SegmentationSupported BACnetSegmentationTagged + SegmentationSupported BACnetSegmentationTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataSegmentationSupported) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataSegmentationSupported) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataSegmentationSupported) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_SEGMENTATION_SUPPORTED -} +func (m *_BACnetConstructedDataSegmentationSupported) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_SEGMENTATION_SUPPORTED} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataSegmentationSupported) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataSegmentationSupported) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataSegmentationSupported) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataSegmentationSupported) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataSegmentationSupported) GetActualValue() BACnetSeg /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataSegmentationSupported factory function for _BACnetConstructedDataSegmentationSupported -func NewBACnetConstructedDataSegmentationSupported(segmentationSupported BACnetSegmentationTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataSegmentationSupported { +func NewBACnetConstructedDataSegmentationSupported( segmentationSupported BACnetSegmentationTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataSegmentationSupported { _result := &_BACnetConstructedDataSegmentationSupported{ - SegmentationSupported: segmentationSupported, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + SegmentationSupported: segmentationSupported, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataSegmentationSupported(segmentationSupported BACnetS // Deprecated: use the interface for direct cast func CastBACnetConstructedDataSegmentationSupported(structType interface{}) BACnetConstructedDataSegmentationSupported { - if casted, ok := structType.(BACnetConstructedDataSegmentationSupported); ok { + if casted, ok := structType.(BACnetConstructedDataSegmentationSupported); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataSegmentationSupported); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataSegmentationSupported) GetLengthInBits(ctx contex return lengthInBits } + func (m *_BACnetConstructedDataSegmentationSupported) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataSegmentationSupportedParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("segmentationSupported"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for segmentationSupported") } - _segmentationSupported, _segmentationSupportedErr := BACnetSegmentationTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_segmentationSupported, _segmentationSupportedErr := BACnetSegmentationTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _segmentationSupportedErr != nil { return nil, errors.Wrap(_segmentationSupportedErr, "Error parsing 'segmentationSupported' field of BACnetConstructedDataSegmentationSupported") } @@ -186,7 +188,7 @@ func BACnetConstructedDataSegmentationSupportedParseWithBuffer(ctx context.Conte // Create a partially initialized instance _child := &_BACnetConstructedDataSegmentationSupported{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, SegmentationSupported: segmentationSupported, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataSegmentationSupported) SerializeWithWriteBuffer(c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataSegmentationSupported") } - // Simple Field (segmentationSupported) - if pushErr := writeBuffer.PushContext("segmentationSupported"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for segmentationSupported") - } - _segmentationSupportedErr := writeBuffer.WriteSerializable(ctx, m.GetSegmentationSupported()) - if popErr := writeBuffer.PopContext("segmentationSupported"); popErr != nil { - return errors.Wrap(popErr, "Error popping for segmentationSupported") - } - if _segmentationSupportedErr != nil { - return errors.Wrap(_segmentationSupportedErr, "Error serializing 'segmentationSupported' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (segmentationSupported) + if pushErr := writeBuffer.PushContext("segmentationSupported"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for segmentationSupported") + } + _segmentationSupportedErr := writeBuffer.WriteSerializable(ctx, m.GetSegmentationSupported()) + if popErr := writeBuffer.PopContext("segmentationSupported"); popErr != nil { + return errors.Wrap(popErr, "Error popping for segmentationSupported") + } + if _segmentationSupportedErr != nil { + return errors.Wrap(_segmentationSupportedErr, "Error serializing 'segmentationSupported' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataSegmentationSupported"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataSegmentationSupported") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataSegmentationSupported) SerializeWithWriteBuffer(c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataSegmentationSupported) isBACnetConstructedDataSegmentationSupported() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataSegmentationSupported) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSerialNumber.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSerialNumber.go index 87db0a5b056..5afa4e2ee57 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSerialNumber.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSerialNumber.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataSerialNumber is the corresponding interface of BACnetConstructedDataSerialNumber type BACnetConstructedDataSerialNumber interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataSerialNumberExactly interface { // _BACnetConstructedDataSerialNumber is the data-structure of this message type _BACnetConstructedDataSerialNumber struct { *_BACnetConstructedData - SerialNumber BACnetApplicationTagCharacterString + SerialNumber BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataSerialNumber) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataSerialNumber) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataSerialNumber) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_SERIAL_NUMBER -} +func (m *_BACnetConstructedDataSerialNumber) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_SERIAL_NUMBER} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataSerialNumber) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataSerialNumber) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataSerialNumber) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataSerialNumber) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataSerialNumber) GetActualValue() BACnetApplicationT /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataSerialNumber factory function for _BACnetConstructedDataSerialNumber -func NewBACnetConstructedDataSerialNumber(serialNumber BACnetApplicationTagCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataSerialNumber { +func NewBACnetConstructedDataSerialNumber( serialNumber BACnetApplicationTagCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataSerialNumber { _result := &_BACnetConstructedDataSerialNumber{ - SerialNumber: serialNumber, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + SerialNumber: serialNumber, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataSerialNumber(serialNumber BACnetApplicationTagChara // Deprecated: use the interface for direct cast func CastBACnetConstructedDataSerialNumber(structType interface{}) BACnetConstructedDataSerialNumber { - if casted, ok := structType.(BACnetConstructedDataSerialNumber); ok { + if casted, ok := structType.(BACnetConstructedDataSerialNumber); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataSerialNumber); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataSerialNumber) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetConstructedDataSerialNumber) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataSerialNumberParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("serialNumber"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for serialNumber") } - _serialNumber, _serialNumberErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_serialNumber, _serialNumberErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _serialNumberErr != nil { return nil, errors.Wrap(_serialNumberErr, "Error parsing 'serialNumber' field of BACnetConstructedDataSerialNumber") } @@ -186,7 +188,7 @@ func BACnetConstructedDataSerialNumberParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetConstructedDataSerialNumber{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, SerialNumber: serialNumber, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataSerialNumber) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataSerialNumber") } - // Simple Field (serialNumber) - if pushErr := writeBuffer.PushContext("serialNumber"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for serialNumber") - } - _serialNumberErr := writeBuffer.WriteSerializable(ctx, m.GetSerialNumber()) - if popErr := writeBuffer.PopContext("serialNumber"); popErr != nil { - return errors.Wrap(popErr, "Error popping for serialNumber") - } - if _serialNumberErr != nil { - return errors.Wrap(_serialNumberErr, "Error serializing 'serialNumber' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (serialNumber) + if pushErr := writeBuffer.PushContext("serialNumber"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for serialNumber") + } + _serialNumberErr := writeBuffer.WriteSerializable(ctx, m.GetSerialNumber()) + if popErr := writeBuffer.PopContext("serialNumber"); popErr != nil { + return errors.Wrap(popErr, "Error popping for serialNumber") + } + if _serialNumberErr != nil { + return errors.Wrap(_serialNumberErr, "Error serializing 'serialNumber' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataSerialNumber"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataSerialNumber") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataSerialNumber) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataSerialNumber) isBACnetConstructedDataSerialNumber() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataSerialNumber) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSetpoint.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSetpoint.go index 538f7efdb06..6df72983dce 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSetpoint.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSetpoint.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataSetpoint is the corresponding interface of BACnetConstructedDataSetpoint type BACnetConstructedDataSetpoint interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataSetpointExactly interface { // _BACnetConstructedDataSetpoint is the data-structure of this message type _BACnetConstructedDataSetpoint struct { *_BACnetConstructedData - Setpoint BACnetApplicationTagReal + Setpoint BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataSetpoint) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataSetpoint) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataSetpoint) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_SETPOINT -} +func (m *_BACnetConstructedDataSetpoint) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_SETPOINT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataSetpoint) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataSetpoint) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataSetpoint) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataSetpoint) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataSetpoint) GetActualValue() BACnetApplicationTagRe /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataSetpoint factory function for _BACnetConstructedDataSetpoint -func NewBACnetConstructedDataSetpoint(setpoint BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataSetpoint { +func NewBACnetConstructedDataSetpoint( setpoint BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataSetpoint { _result := &_BACnetConstructedDataSetpoint{ - Setpoint: setpoint, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Setpoint: setpoint, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataSetpoint(setpoint BACnetApplicationTagReal, opening // Deprecated: use the interface for direct cast func CastBACnetConstructedDataSetpoint(structType interface{}) BACnetConstructedDataSetpoint { - if casted, ok := structType.(BACnetConstructedDataSetpoint); ok { + if casted, ok := structType.(BACnetConstructedDataSetpoint); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataSetpoint); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataSetpoint) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetConstructedDataSetpoint) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataSetpointParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("setpoint"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for setpoint") } - _setpoint, _setpointErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_setpoint, _setpointErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _setpointErr != nil { return nil, errors.Wrap(_setpointErr, "Error parsing 'setpoint' field of BACnetConstructedDataSetpoint") } @@ -186,7 +188,7 @@ func BACnetConstructedDataSetpointParseWithBuffer(ctx context.Context, readBuffe // Create a partially initialized instance _child := &_BACnetConstructedDataSetpoint{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Setpoint: setpoint, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataSetpoint) SerializeWithWriteBuffer(ctx context.Co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataSetpoint") } - // Simple Field (setpoint) - if pushErr := writeBuffer.PushContext("setpoint"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for setpoint") - } - _setpointErr := writeBuffer.WriteSerializable(ctx, m.GetSetpoint()) - if popErr := writeBuffer.PopContext("setpoint"); popErr != nil { - return errors.Wrap(popErr, "Error popping for setpoint") - } - if _setpointErr != nil { - return errors.Wrap(_setpointErr, "Error serializing 'setpoint' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (setpoint) + if pushErr := writeBuffer.PushContext("setpoint"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for setpoint") + } + _setpointErr := writeBuffer.WriteSerializable(ctx, m.GetSetpoint()) + if popErr := writeBuffer.PopContext("setpoint"); popErr != nil { + return errors.Wrap(popErr, "Error popping for setpoint") + } + if _setpointErr != nil { + return errors.Wrap(_setpointErr, "Error serializing 'setpoint' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataSetpoint"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataSetpoint") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataSetpoint) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataSetpoint) isBACnetConstructedDataSetpoint() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataSetpoint) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSetpointReference.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSetpointReference.go index c73f22c3b30..8e83066e448 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSetpointReference.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSetpointReference.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataSetpointReference is the corresponding interface of BACnetConstructedDataSetpointReference type BACnetConstructedDataSetpointReference interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataSetpointReferenceExactly interface { // _BACnetConstructedDataSetpointReference is the data-structure of this message type _BACnetConstructedDataSetpointReference struct { *_BACnetConstructedData - SetpointReference BACnetSetpointReference + SetpointReference BACnetSetpointReference } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataSetpointReference) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataSetpointReference) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataSetpointReference) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_SETPOINT_REFERENCE -} +func (m *_BACnetConstructedDataSetpointReference) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_SETPOINT_REFERENCE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataSetpointReference) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataSetpointReference) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataSetpointReference) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataSetpointReference) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataSetpointReference) GetActualValue() BACnetSetpoin /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataSetpointReference factory function for _BACnetConstructedDataSetpointReference -func NewBACnetConstructedDataSetpointReference(setpointReference BACnetSetpointReference, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataSetpointReference { +func NewBACnetConstructedDataSetpointReference( setpointReference BACnetSetpointReference , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataSetpointReference { _result := &_BACnetConstructedDataSetpointReference{ - SetpointReference: setpointReference, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + SetpointReference: setpointReference, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataSetpointReference(setpointReference BACnetSetpointR // Deprecated: use the interface for direct cast func CastBACnetConstructedDataSetpointReference(structType interface{}) BACnetConstructedDataSetpointReference { - if casted, ok := structType.(BACnetConstructedDataSetpointReference); ok { + if casted, ok := structType.(BACnetConstructedDataSetpointReference); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataSetpointReference); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataSetpointReference) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetConstructedDataSetpointReference) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataSetpointReferenceParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("setpointReference"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for setpointReference") } - _setpointReference, _setpointReferenceErr := BACnetSetpointReferenceParseWithBuffer(ctx, readBuffer) +_setpointReference, _setpointReferenceErr := BACnetSetpointReferenceParseWithBuffer(ctx, readBuffer) if _setpointReferenceErr != nil { return nil, errors.Wrap(_setpointReferenceErr, "Error parsing 'setpointReference' field of BACnetConstructedDataSetpointReference") } @@ -186,7 +188,7 @@ func BACnetConstructedDataSetpointReferenceParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataSetpointReference{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, SetpointReference: setpointReference, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataSetpointReference) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataSetpointReference") } - // Simple Field (setpointReference) - if pushErr := writeBuffer.PushContext("setpointReference"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for setpointReference") - } - _setpointReferenceErr := writeBuffer.WriteSerializable(ctx, m.GetSetpointReference()) - if popErr := writeBuffer.PopContext("setpointReference"); popErr != nil { - return errors.Wrap(popErr, "Error popping for setpointReference") - } - if _setpointReferenceErr != nil { - return errors.Wrap(_setpointReferenceErr, "Error serializing 'setpointReference' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (setpointReference) + if pushErr := writeBuffer.PushContext("setpointReference"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for setpointReference") + } + _setpointReferenceErr := writeBuffer.WriteSerializable(ctx, m.GetSetpointReference()) + if popErr := writeBuffer.PopContext("setpointReference"); popErr != nil { + return errors.Wrap(popErr, "Error popping for setpointReference") + } + if _setpointReferenceErr != nil { + return errors.Wrap(_setpointReferenceErr, "Error serializing 'setpointReference' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataSetpointReference"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataSetpointReference") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataSetpointReference) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataSetpointReference) isBACnetConstructedDataSetpointReference() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataSetpointReference) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSetting.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSetting.go index ead357963bb..5bdc992b097 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSetting.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSetting.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataSetting is the corresponding interface of BACnetConstructedDataSetting type BACnetConstructedDataSetting interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataSettingExactly interface { // _BACnetConstructedDataSetting is the data-structure of this message type _BACnetConstructedDataSetting struct { *_BACnetConstructedData - Setting BACnetApplicationTagUnsignedInteger + Setting BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataSetting) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataSetting) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataSetting) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_SETTING -} +func (m *_BACnetConstructedDataSetting) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_SETTING} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataSetting) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataSetting) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataSetting) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataSetting) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataSetting) GetActualValue() BACnetApplicationTagUns /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataSetting factory function for _BACnetConstructedDataSetting -func NewBACnetConstructedDataSetting(setting BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataSetting { +func NewBACnetConstructedDataSetting( setting BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataSetting { _result := &_BACnetConstructedDataSetting{ - Setting: setting, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Setting: setting, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataSetting(setting BACnetApplicationTagUnsignedInteger // Deprecated: use the interface for direct cast func CastBACnetConstructedDataSetting(structType interface{}) BACnetConstructedDataSetting { - if casted, ok := structType.(BACnetConstructedDataSetting); ok { + if casted, ok := structType.(BACnetConstructedDataSetting); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataSetting); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataSetting) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_BACnetConstructedDataSetting) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataSettingParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("setting"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for setting") } - _setting, _settingErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_setting, _settingErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _settingErr != nil { return nil, errors.Wrap(_settingErr, "Error parsing 'setting' field of BACnetConstructedDataSetting") } @@ -186,7 +188,7 @@ func BACnetConstructedDataSettingParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_BACnetConstructedDataSetting{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Setting: setting, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataSetting) SerializeWithWriteBuffer(ctx context.Con return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataSetting") } - // Simple Field (setting) - if pushErr := writeBuffer.PushContext("setting"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for setting") - } - _settingErr := writeBuffer.WriteSerializable(ctx, m.GetSetting()) - if popErr := writeBuffer.PopContext("setting"); popErr != nil { - return errors.Wrap(popErr, "Error popping for setting") - } - if _settingErr != nil { - return errors.Wrap(_settingErr, "Error serializing 'setting' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (setting) + if pushErr := writeBuffer.PushContext("setting"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for setting") + } + _settingErr := writeBuffer.WriteSerializable(ctx, m.GetSetting()) + if popErr := writeBuffer.PopContext("setting"); popErr != nil { + return errors.Wrap(popErr, "Error popping for setting") + } + if _settingErr != nil { + return errors.Wrap(_settingErr, "Error serializing 'setting' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataSetting"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataSetting") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataSetting) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataSetting) isBACnetConstructedDataSetting() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataSetting) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataShedDuration.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataShedDuration.go index bcccf8a5b10..30b773d30bf 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataShedDuration.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataShedDuration.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataShedDuration is the corresponding interface of BACnetConstructedDataShedDuration type BACnetConstructedDataShedDuration interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataShedDurationExactly interface { // _BACnetConstructedDataShedDuration is the data-structure of this message type _BACnetConstructedDataShedDuration struct { *_BACnetConstructedData - ShedDuration BACnetApplicationTagUnsignedInteger + ShedDuration BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataShedDuration) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataShedDuration) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataShedDuration) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_SHED_DURATION -} +func (m *_BACnetConstructedDataShedDuration) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_SHED_DURATION} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataShedDuration) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataShedDuration) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataShedDuration) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataShedDuration) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataShedDuration) GetActualValue() BACnetApplicationT /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataShedDuration factory function for _BACnetConstructedDataShedDuration -func NewBACnetConstructedDataShedDuration(shedDuration BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataShedDuration { +func NewBACnetConstructedDataShedDuration( shedDuration BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataShedDuration { _result := &_BACnetConstructedDataShedDuration{ - ShedDuration: shedDuration, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ShedDuration: shedDuration, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataShedDuration(shedDuration BACnetApplicationTagUnsig // Deprecated: use the interface for direct cast func CastBACnetConstructedDataShedDuration(structType interface{}) BACnetConstructedDataShedDuration { - if casted, ok := structType.(BACnetConstructedDataShedDuration); ok { + if casted, ok := structType.(BACnetConstructedDataShedDuration); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataShedDuration); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataShedDuration) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetConstructedDataShedDuration) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataShedDurationParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("shedDuration"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for shedDuration") } - _shedDuration, _shedDurationErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_shedDuration, _shedDurationErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _shedDurationErr != nil { return nil, errors.Wrap(_shedDurationErr, "Error parsing 'shedDuration' field of BACnetConstructedDataShedDuration") } @@ -186,7 +188,7 @@ func BACnetConstructedDataShedDurationParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetConstructedDataShedDuration{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ShedDuration: shedDuration, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataShedDuration) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataShedDuration") } - // Simple Field (shedDuration) - if pushErr := writeBuffer.PushContext("shedDuration"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for shedDuration") - } - _shedDurationErr := writeBuffer.WriteSerializable(ctx, m.GetShedDuration()) - if popErr := writeBuffer.PopContext("shedDuration"); popErr != nil { - return errors.Wrap(popErr, "Error popping for shedDuration") - } - if _shedDurationErr != nil { - return errors.Wrap(_shedDurationErr, "Error serializing 'shedDuration' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (shedDuration) + if pushErr := writeBuffer.PushContext("shedDuration"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for shedDuration") + } + _shedDurationErr := writeBuffer.WriteSerializable(ctx, m.GetShedDuration()) + if popErr := writeBuffer.PopContext("shedDuration"); popErr != nil { + return errors.Wrap(popErr, "Error popping for shedDuration") + } + if _shedDurationErr != nil { + return errors.Wrap(_shedDurationErr, "Error serializing 'shedDuration' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataShedDuration"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataShedDuration") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataShedDuration) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataShedDuration) isBACnetConstructedDataShedDuration() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataShedDuration) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataShedLevelDescriptions.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataShedLevelDescriptions.go index 3e8091136eb..5cb30984719 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataShedLevelDescriptions.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataShedLevelDescriptions.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataShedLevelDescriptions is the corresponding interface of BACnetConstructedDataShedLevelDescriptions type BACnetConstructedDataShedLevelDescriptions interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataShedLevelDescriptionsExactly interface { // _BACnetConstructedDataShedLevelDescriptions is the data-structure of this message type _BACnetConstructedDataShedLevelDescriptions struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - ShedLevelDescriptions []BACnetApplicationTagCharacterString + NumberOfDataElements BACnetApplicationTagUnsignedInteger + ShedLevelDescriptions []BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataShedLevelDescriptions) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataShedLevelDescriptions) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataShedLevelDescriptions) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_SHED_LEVEL_DESCRIPTIONS -} +func (m *_BACnetConstructedDataShedLevelDescriptions) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_SHED_LEVEL_DESCRIPTIONS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataShedLevelDescriptions) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataShedLevelDescriptions) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataShedLevelDescriptions) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataShedLevelDescriptions) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataShedLevelDescriptions) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataShedLevelDescriptions factory function for _BACnetConstructedDataShedLevelDescriptions -func NewBACnetConstructedDataShedLevelDescriptions(numberOfDataElements BACnetApplicationTagUnsignedInteger, shedLevelDescriptions []BACnetApplicationTagCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataShedLevelDescriptions { +func NewBACnetConstructedDataShedLevelDescriptions( numberOfDataElements BACnetApplicationTagUnsignedInteger , shedLevelDescriptions []BACnetApplicationTagCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataShedLevelDescriptions { _result := &_BACnetConstructedDataShedLevelDescriptions{ - NumberOfDataElements: numberOfDataElements, - ShedLevelDescriptions: shedLevelDescriptions, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + ShedLevelDescriptions: shedLevelDescriptions, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataShedLevelDescriptions(numberOfDataElements BACnetAp // Deprecated: use the interface for direct cast func CastBACnetConstructedDataShedLevelDescriptions(structType interface{}) BACnetConstructedDataShedLevelDescriptions { - if casted, ok := structType.(BACnetConstructedDataShedLevelDescriptions); ok { + if casted, ok := structType.(BACnetConstructedDataShedLevelDescriptions); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataShedLevelDescriptions); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataShedLevelDescriptions) GetLengthInBits(ctx contex return lengthInBits } + func (m *_BACnetConstructedDataShedLevelDescriptions) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataShedLevelDescriptionsParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataShedLevelDescriptionsParseWithBuffer(ctx context.Conte // Terminated array var shedLevelDescriptions []BACnetApplicationTagCharacterString { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'shedLevelDescriptions' field of BACnetConstructedDataShedLevelDescriptions") } @@ -235,10 +237,10 @@ func BACnetConstructedDataShedLevelDescriptionsParseWithBuffer(ctx context.Conte // Create a partially initialized instance _child := &_BACnetConstructedDataShedLevelDescriptions{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, - NumberOfDataElements: numberOfDataElements, + NumberOfDataElements: numberOfDataElements, ShedLevelDescriptions: shedLevelDescriptions, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataShedLevelDescriptions) SerializeWithWriteBuffer(c if pushErr := writeBuffer.PushContext("BACnetConstructedDataShedLevelDescriptions"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataShedLevelDescriptions") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (shedLevelDescriptions) - if pushErr := writeBuffer.PushContext("shedLevelDescriptions", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for shedLevelDescriptions") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetShedLevelDescriptions() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetShedLevelDescriptions()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'shedLevelDescriptions' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("shedLevelDescriptions", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for shedLevelDescriptions") + } + + // Array Field (shedLevelDescriptions) + if pushErr := writeBuffer.PushContext("shedLevelDescriptions", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for shedLevelDescriptions") + } + for _curItem, _element := range m.GetShedLevelDescriptions() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetShedLevelDescriptions()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'shedLevelDescriptions' field") } + } + if popErr := writeBuffer.PopContext("shedLevelDescriptions", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for shedLevelDescriptions") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataShedLevelDescriptions"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataShedLevelDescriptions") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataShedLevelDescriptions) SerializeWithWriteBuffer(c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataShedLevelDescriptions) isBACnetConstructedDataShedLevelDescriptions() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataShedLevelDescriptions) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataShedLevels.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataShedLevels.go index 9f2676bf6fa..fc367c75e93 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataShedLevels.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataShedLevels.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataShedLevels is the corresponding interface of BACnetConstructedDataShedLevels type BACnetConstructedDataShedLevels interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataShedLevelsExactly interface { // _BACnetConstructedDataShedLevels is the data-structure of this message type _BACnetConstructedDataShedLevels struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - ShedLevels []BACnetApplicationTagUnsignedInteger + NumberOfDataElements BACnetApplicationTagUnsignedInteger + ShedLevels []BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataShedLevels) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataShedLevels) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataShedLevels) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_SHED_LEVELS -} +func (m *_BACnetConstructedDataShedLevels) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_SHED_LEVELS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataShedLevels) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataShedLevels) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataShedLevels) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataShedLevels) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataShedLevels) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataShedLevels factory function for _BACnetConstructedDataShedLevels -func NewBACnetConstructedDataShedLevels(numberOfDataElements BACnetApplicationTagUnsignedInteger, shedLevels []BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataShedLevels { +func NewBACnetConstructedDataShedLevels( numberOfDataElements BACnetApplicationTagUnsignedInteger , shedLevels []BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataShedLevels { _result := &_BACnetConstructedDataShedLevels{ - NumberOfDataElements: numberOfDataElements, - ShedLevels: shedLevels, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + ShedLevels: shedLevels, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataShedLevels(numberOfDataElements BACnetApplicationTa // Deprecated: use the interface for direct cast func CastBACnetConstructedDataShedLevels(structType interface{}) BACnetConstructedDataShedLevels { - if casted, ok := structType.(BACnetConstructedDataShedLevels); ok { + if casted, ok := structType.(BACnetConstructedDataShedLevels); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataShedLevels); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataShedLevels) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataShedLevels) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataShedLevelsParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataShedLevelsParseWithBuffer(ctx context.Context, readBuf // Terminated array var shedLevels []BACnetApplicationTagUnsignedInteger { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'shedLevels' field of BACnetConstructedDataShedLevels") } @@ -235,11 +237,11 @@ func BACnetConstructedDataShedLevelsParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetConstructedDataShedLevels{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - ShedLevels: shedLevels, + ShedLevels: shedLevels, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataShedLevels) SerializeWithWriteBuffer(ctx context. if pushErr := writeBuffer.PushContext("BACnetConstructedDataShedLevels"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataShedLevels") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (shedLevels) - if pushErr := writeBuffer.PushContext("shedLevels", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for shedLevels") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetShedLevels() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetShedLevels()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'shedLevels' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("shedLevels", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for shedLevels") + } + + // Array Field (shedLevels) + if pushErr := writeBuffer.PushContext("shedLevels", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for shedLevels") + } + for _curItem, _element := range m.GetShedLevels() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetShedLevels()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'shedLevels' field") } + } + if popErr := writeBuffer.PopContext("shedLevels", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for shedLevels") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataShedLevels"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataShedLevels") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataShedLevels) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataShedLevels) isBACnetConstructedDataShedLevels() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataShedLevels) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSilenced.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSilenced.go index f4f547ff468..1215652bf52 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSilenced.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSilenced.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataSilenced is the corresponding interface of BACnetConstructedDataSilenced type BACnetConstructedDataSilenced interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataSilencedExactly interface { // _BACnetConstructedDataSilenced is the data-structure of this message type _BACnetConstructedDataSilenced struct { *_BACnetConstructedData - Silenced BACnetSilencedStateTagged + Silenced BACnetSilencedStateTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataSilenced) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataSilenced) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataSilenced) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_SILENCED -} +func (m *_BACnetConstructedDataSilenced) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_SILENCED} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataSilenced) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataSilenced) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataSilenced) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataSilenced) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataSilenced) GetActualValue() BACnetSilencedStateTag /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataSilenced factory function for _BACnetConstructedDataSilenced -func NewBACnetConstructedDataSilenced(silenced BACnetSilencedStateTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataSilenced { +func NewBACnetConstructedDataSilenced( silenced BACnetSilencedStateTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataSilenced { _result := &_BACnetConstructedDataSilenced{ - Silenced: silenced, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Silenced: silenced, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataSilenced(silenced BACnetSilencedStateTagged, openin // Deprecated: use the interface for direct cast func CastBACnetConstructedDataSilenced(structType interface{}) BACnetConstructedDataSilenced { - if casted, ok := structType.(BACnetConstructedDataSilenced); ok { + if casted, ok := structType.(BACnetConstructedDataSilenced); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataSilenced); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataSilenced) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetConstructedDataSilenced) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataSilencedParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("silenced"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for silenced") } - _silenced, _silencedErr := BACnetSilencedStateTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_silenced, _silencedErr := BACnetSilencedStateTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _silencedErr != nil { return nil, errors.Wrap(_silencedErr, "Error parsing 'silenced' field of BACnetConstructedDataSilenced") } @@ -186,7 +188,7 @@ func BACnetConstructedDataSilencedParseWithBuffer(ctx context.Context, readBuffe // Create a partially initialized instance _child := &_BACnetConstructedDataSilenced{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Silenced: silenced, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataSilenced) SerializeWithWriteBuffer(ctx context.Co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataSilenced") } - // Simple Field (silenced) - if pushErr := writeBuffer.PushContext("silenced"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for silenced") - } - _silencedErr := writeBuffer.WriteSerializable(ctx, m.GetSilenced()) - if popErr := writeBuffer.PopContext("silenced"); popErr != nil { - return errors.Wrap(popErr, "Error popping for silenced") - } - if _silencedErr != nil { - return errors.Wrap(_silencedErr, "Error serializing 'silenced' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (silenced) + if pushErr := writeBuffer.PushContext("silenced"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for silenced") + } + _silencedErr := writeBuffer.WriteSerializable(ctx, m.GetSilenced()) + if popErr := writeBuffer.PopContext("silenced"); popErr != nil { + return errors.Wrap(popErr, "Error popping for silenced") + } + if _silencedErr != nil { + return errors.Wrap(_silencedErr, "Error serializing 'silenced' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataSilenced"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataSilenced") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataSilenced) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataSilenced) isBACnetConstructedDataSilenced() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataSilenced) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSlaveAddressBinding.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSlaveAddressBinding.go index cd094dd3089..203c8ff1db9 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSlaveAddressBinding.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSlaveAddressBinding.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataSlaveAddressBinding is the corresponding interface of BACnetConstructedDataSlaveAddressBinding type BACnetConstructedDataSlaveAddressBinding interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataSlaveAddressBindingExactly interface { // _BACnetConstructedDataSlaveAddressBinding is the data-structure of this message type _BACnetConstructedDataSlaveAddressBinding struct { *_BACnetConstructedData - SlaveAddressBinding []BACnetAddressBinding + SlaveAddressBinding []BACnetAddressBinding } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataSlaveAddressBinding) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataSlaveAddressBinding) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataSlaveAddressBinding) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_SLAVE_ADDRESS_BINDING -} +func (m *_BACnetConstructedDataSlaveAddressBinding) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_SLAVE_ADDRESS_BINDING} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataSlaveAddressBinding) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataSlaveAddressBinding) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataSlaveAddressBinding) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataSlaveAddressBinding) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataSlaveAddressBinding) GetSlaveAddressBinding() []B /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataSlaveAddressBinding factory function for _BACnetConstructedDataSlaveAddressBinding -func NewBACnetConstructedDataSlaveAddressBinding(slaveAddressBinding []BACnetAddressBinding, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataSlaveAddressBinding { +func NewBACnetConstructedDataSlaveAddressBinding( slaveAddressBinding []BACnetAddressBinding , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataSlaveAddressBinding { _result := &_BACnetConstructedDataSlaveAddressBinding{ - SlaveAddressBinding: slaveAddressBinding, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + SlaveAddressBinding: slaveAddressBinding, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataSlaveAddressBinding(slaveAddressBinding []BACnetAdd // Deprecated: use the interface for direct cast func CastBACnetConstructedDataSlaveAddressBinding(structType interface{}) BACnetConstructedDataSlaveAddressBinding { - if casted, ok := structType.(BACnetConstructedDataSlaveAddressBinding); ok { + if casted, ok := structType.(BACnetConstructedDataSlaveAddressBinding); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataSlaveAddressBinding); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataSlaveAddressBinding) GetLengthInBits(ctx context. return lengthInBits } + func (m *_BACnetConstructedDataSlaveAddressBinding) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataSlaveAddressBindingParseWithBuffer(ctx context.Context // Terminated array var slaveAddressBinding []BACnetAddressBinding { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetAddressBindingParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetAddressBindingParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'slaveAddressBinding' field of BACnetConstructedDataSlaveAddressBinding") } @@ -173,7 +175,7 @@ func BACnetConstructedDataSlaveAddressBindingParseWithBuffer(ctx context.Context // Create a partially initialized instance _child := &_BACnetConstructedDataSlaveAddressBinding{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, SlaveAddressBinding: slaveAddressBinding, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataSlaveAddressBinding) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataSlaveAddressBinding") } - // Array Field (slaveAddressBinding) - if pushErr := writeBuffer.PushContext("slaveAddressBinding", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for slaveAddressBinding") - } - for _curItem, _element := range m.GetSlaveAddressBinding() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetSlaveAddressBinding()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'slaveAddressBinding' field") - } - } - if popErr := writeBuffer.PopContext("slaveAddressBinding", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for slaveAddressBinding") + // Array Field (slaveAddressBinding) + if pushErr := writeBuffer.PushContext("slaveAddressBinding", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for slaveAddressBinding") + } + for _curItem, _element := range m.GetSlaveAddressBinding() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetSlaveAddressBinding()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'slaveAddressBinding' field") } + } + if popErr := writeBuffer.PopContext("slaveAddressBinding", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for slaveAddressBinding") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataSlaveAddressBinding"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataSlaveAddressBinding") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataSlaveAddressBinding) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataSlaveAddressBinding) isBACnetConstructedDataSlaveAddressBinding() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataSlaveAddressBinding) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSlaveProxyEnable.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSlaveProxyEnable.go index fdff5735cce..b927793de48 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSlaveProxyEnable.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSlaveProxyEnable.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataSlaveProxyEnable is the corresponding interface of BACnetConstructedDataSlaveProxyEnable type BACnetConstructedDataSlaveProxyEnable interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataSlaveProxyEnableExactly interface { // _BACnetConstructedDataSlaveProxyEnable is the data-structure of this message type _BACnetConstructedDataSlaveProxyEnable struct { *_BACnetConstructedData - SlaveProxyEnable BACnetApplicationTagBoolean + SlaveProxyEnable BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataSlaveProxyEnable) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataSlaveProxyEnable) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataSlaveProxyEnable) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_SLAVE_PROXY_ENABLE -} +func (m *_BACnetConstructedDataSlaveProxyEnable) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_SLAVE_PROXY_ENABLE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataSlaveProxyEnable) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataSlaveProxyEnable) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataSlaveProxyEnable) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataSlaveProxyEnable) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataSlaveProxyEnable) GetActualValue() BACnetApplicat /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataSlaveProxyEnable factory function for _BACnetConstructedDataSlaveProxyEnable -func NewBACnetConstructedDataSlaveProxyEnable(slaveProxyEnable BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataSlaveProxyEnable { +func NewBACnetConstructedDataSlaveProxyEnable( slaveProxyEnable BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataSlaveProxyEnable { _result := &_BACnetConstructedDataSlaveProxyEnable{ - SlaveProxyEnable: slaveProxyEnable, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + SlaveProxyEnable: slaveProxyEnable, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataSlaveProxyEnable(slaveProxyEnable BACnetApplication // Deprecated: use the interface for direct cast func CastBACnetConstructedDataSlaveProxyEnable(structType interface{}) BACnetConstructedDataSlaveProxyEnable { - if casted, ok := structType.(BACnetConstructedDataSlaveProxyEnable); ok { + if casted, ok := structType.(BACnetConstructedDataSlaveProxyEnable); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataSlaveProxyEnable); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataSlaveProxyEnable) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetConstructedDataSlaveProxyEnable) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataSlaveProxyEnableParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("slaveProxyEnable"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for slaveProxyEnable") } - _slaveProxyEnable, _slaveProxyEnableErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_slaveProxyEnable, _slaveProxyEnableErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _slaveProxyEnableErr != nil { return nil, errors.Wrap(_slaveProxyEnableErr, "Error parsing 'slaveProxyEnable' field of BACnetConstructedDataSlaveProxyEnable") } @@ -186,7 +188,7 @@ func BACnetConstructedDataSlaveProxyEnableParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_BACnetConstructedDataSlaveProxyEnable{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, SlaveProxyEnable: slaveProxyEnable, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataSlaveProxyEnable) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataSlaveProxyEnable") } - // Simple Field (slaveProxyEnable) - if pushErr := writeBuffer.PushContext("slaveProxyEnable"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for slaveProxyEnable") - } - _slaveProxyEnableErr := writeBuffer.WriteSerializable(ctx, m.GetSlaveProxyEnable()) - if popErr := writeBuffer.PopContext("slaveProxyEnable"); popErr != nil { - return errors.Wrap(popErr, "Error popping for slaveProxyEnable") - } - if _slaveProxyEnableErr != nil { - return errors.Wrap(_slaveProxyEnableErr, "Error serializing 'slaveProxyEnable' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (slaveProxyEnable) + if pushErr := writeBuffer.PushContext("slaveProxyEnable"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for slaveProxyEnable") + } + _slaveProxyEnableErr := writeBuffer.WriteSerializable(ctx, m.GetSlaveProxyEnable()) + if popErr := writeBuffer.PopContext("slaveProxyEnable"); popErr != nil { + return errors.Wrap(popErr, "Error popping for slaveProxyEnable") + } + if _slaveProxyEnableErr != nil { + return errors.Wrap(_slaveProxyEnableErr, "Error serializing 'slaveProxyEnable' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataSlaveProxyEnable"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataSlaveProxyEnable") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataSlaveProxyEnable) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataSlaveProxyEnable) isBACnetConstructedDataSlaveProxyEnable() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataSlaveProxyEnable) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStartTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStartTime.go index b491fb896c5..77cdda83349 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStartTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStartTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataStartTime is the corresponding interface of BACnetConstructedDataStartTime type BACnetConstructedDataStartTime interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataStartTimeExactly interface { // _BACnetConstructedDataStartTime is the data-structure of this message type _BACnetConstructedDataStartTime struct { *_BACnetConstructedData - StartTime BACnetDateTime + StartTime BACnetDateTime } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataStartTime) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataStartTime) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataStartTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_START_TIME -} +func (m *_BACnetConstructedDataStartTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_START_TIME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataStartTime) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataStartTime) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataStartTime) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataStartTime) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataStartTime) GetActualValue() BACnetDateTime { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataStartTime factory function for _BACnetConstructedDataStartTime -func NewBACnetConstructedDataStartTime(startTime BACnetDateTime, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataStartTime { +func NewBACnetConstructedDataStartTime( startTime BACnetDateTime , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataStartTime { _result := &_BACnetConstructedDataStartTime{ - StartTime: startTime, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + StartTime: startTime, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataStartTime(startTime BACnetDateTime, openingTag BACn // Deprecated: use the interface for direct cast func CastBACnetConstructedDataStartTime(structType interface{}) BACnetConstructedDataStartTime { - if casted, ok := structType.(BACnetConstructedDataStartTime); ok { + if casted, ok := structType.(BACnetConstructedDataStartTime); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataStartTime); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataStartTime) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetConstructedDataStartTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataStartTimeParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("startTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for startTime") } - _startTime, _startTimeErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) +_startTime, _startTimeErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) if _startTimeErr != nil { return nil, errors.Wrap(_startTimeErr, "Error parsing 'startTime' field of BACnetConstructedDataStartTime") } @@ -186,7 +188,7 @@ func BACnetConstructedDataStartTimeParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_BACnetConstructedDataStartTime{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, StartTime: startTime, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataStartTime) SerializeWithWriteBuffer(ctx context.C return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataStartTime") } - // Simple Field (startTime) - if pushErr := writeBuffer.PushContext("startTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for startTime") - } - _startTimeErr := writeBuffer.WriteSerializable(ctx, m.GetStartTime()) - if popErr := writeBuffer.PopContext("startTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for startTime") - } - if _startTimeErr != nil { - return errors.Wrap(_startTimeErr, "Error serializing 'startTime' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (startTime) + if pushErr := writeBuffer.PushContext("startTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for startTime") + } + _startTimeErr := writeBuffer.WriteSerializable(ctx, m.GetStartTime()) + if popErr := writeBuffer.PopContext("startTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for startTime") + } + if _startTimeErr != nil { + return errors.Wrap(_startTimeErr, "Error serializing 'startTime' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataStartTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataStartTime") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataStartTime) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataStartTime) isBACnetConstructedDataStartTime() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataStartTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStateChangeValues.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStateChangeValues.go index 928c6c2271c..bff5b5febb3 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStateChangeValues.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStateChangeValues.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataStateChangeValues is the corresponding interface of BACnetConstructedDataStateChangeValues type BACnetConstructedDataStateChangeValues interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataStateChangeValuesExactly interface { // _BACnetConstructedDataStateChangeValues is the data-structure of this message type _BACnetConstructedDataStateChangeValues struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - StateChangeValues []BACnetTimerStateChangeValue + NumberOfDataElements BACnetApplicationTagUnsignedInteger + StateChangeValues []BACnetTimerStateChangeValue } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataStateChangeValues) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataStateChangeValues) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataStateChangeValues) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_STATE_CHANGE_VALUES -} +func (m *_BACnetConstructedDataStateChangeValues) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_STATE_CHANGE_VALUES} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataStateChangeValues) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataStateChangeValues) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataStateChangeValues) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataStateChangeValues) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataStateChangeValues) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataStateChangeValues factory function for _BACnetConstructedDataStateChangeValues -func NewBACnetConstructedDataStateChangeValues(numberOfDataElements BACnetApplicationTagUnsignedInteger, stateChangeValues []BACnetTimerStateChangeValue, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataStateChangeValues { +func NewBACnetConstructedDataStateChangeValues( numberOfDataElements BACnetApplicationTagUnsignedInteger , stateChangeValues []BACnetTimerStateChangeValue , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataStateChangeValues { _result := &_BACnetConstructedDataStateChangeValues{ - NumberOfDataElements: numberOfDataElements, - StateChangeValues: stateChangeValues, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + StateChangeValues: stateChangeValues, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataStateChangeValues(numberOfDataElements BACnetApplic // Deprecated: use the interface for direct cast func CastBACnetConstructedDataStateChangeValues(structType interface{}) BACnetConstructedDataStateChangeValues { - if casted, ok := structType.(BACnetConstructedDataStateChangeValues); ok { + if casted, ok := structType.(BACnetConstructedDataStateChangeValues); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataStateChangeValues); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataStateChangeValues) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetConstructedDataStateChangeValues) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataStateChangeValuesParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataStateChangeValuesParseWithBuffer(ctx context.Context, // Terminated array var stateChangeValues []BACnetTimerStateChangeValue { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetTimerStateChangeValueParseWithBuffer(ctx, readBuffer, objectTypeArgument) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetTimerStateChangeValueParseWithBuffer(ctx, readBuffer , objectTypeArgument ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'stateChangeValues' field of BACnetConstructedDataStateChangeValues") } @@ -229,7 +231,7 @@ func BACnetConstructedDataStateChangeValuesParseWithBuffer(ctx context.Context, } // Validation - if !(bool(bool((arrayIndexArgument) != (nil))) || bool(bool((len(stateChangeValues)) == (7)))) { + if (!(bool(bool((arrayIndexArgument) != (nil))) || bool(bool(((len(stateChangeValues))) == ((7)))))) { return nil, errors.WithStack(utils.ParseValidationError{"stateChangeValues should have exactly 7 values"}) } @@ -240,11 +242,11 @@ func BACnetConstructedDataStateChangeValuesParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataStateChangeValues{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - StateChangeValues: stateChangeValues, + StateChangeValues: stateChangeValues, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -265,43 +267,43 @@ func (m *_BACnetConstructedDataStateChangeValues) SerializeWithWriteBuffer(ctx c if pushErr := writeBuffer.PushContext("BACnetConstructedDataStateChangeValues"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataStateChangeValues") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (stateChangeValues) - if pushErr := writeBuffer.PushContext("stateChangeValues", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for stateChangeValues") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetStateChangeValues() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetStateChangeValues()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'stateChangeValues' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("stateChangeValues", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for stateChangeValues") + } + + // Array Field (stateChangeValues) + if pushErr := writeBuffer.PushContext("stateChangeValues", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for stateChangeValues") + } + for _curItem, _element := range m.GetStateChangeValues() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetStateChangeValues()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'stateChangeValues' field") } + } + if popErr := writeBuffer.PopContext("stateChangeValues", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for stateChangeValues") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataStateChangeValues"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataStateChangeValues") @@ -311,6 +313,7 @@ func (m *_BACnetConstructedDataStateChangeValues) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataStateChangeValues) isBACnetConstructedDataStateChangeValues() bool { return true } @@ -325,3 +328,6 @@ func (m *_BACnetConstructedDataStateChangeValues) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStateDescription.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStateDescription.go index 3a27ed1b202..f01929178e7 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStateDescription.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStateDescription.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataStateDescription is the corresponding interface of BACnetConstructedDataStateDescription type BACnetConstructedDataStateDescription interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataStateDescriptionExactly interface { // _BACnetConstructedDataStateDescription is the data-structure of this message type _BACnetConstructedDataStateDescription struct { *_BACnetConstructedData - StateDescription BACnetApplicationTagCharacterString + StateDescription BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataStateDescription) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataStateDescription) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataStateDescription) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_STATE_DESCRIPTION -} +func (m *_BACnetConstructedDataStateDescription) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_STATE_DESCRIPTION} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataStateDescription) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataStateDescription) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataStateDescription) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataStateDescription) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataStateDescription) GetActualValue() BACnetApplicat /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataStateDescription factory function for _BACnetConstructedDataStateDescription -func NewBACnetConstructedDataStateDescription(stateDescription BACnetApplicationTagCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataStateDescription { +func NewBACnetConstructedDataStateDescription( stateDescription BACnetApplicationTagCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataStateDescription { _result := &_BACnetConstructedDataStateDescription{ - StateDescription: stateDescription, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + StateDescription: stateDescription, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataStateDescription(stateDescription BACnetApplication // Deprecated: use the interface for direct cast func CastBACnetConstructedDataStateDescription(structType interface{}) BACnetConstructedDataStateDescription { - if casted, ok := structType.(BACnetConstructedDataStateDescription); ok { + if casted, ok := structType.(BACnetConstructedDataStateDescription); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataStateDescription); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataStateDescription) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetConstructedDataStateDescription) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataStateDescriptionParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("stateDescription"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for stateDescription") } - _stateDescription, _stateDescriptionErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_stateDescription, _stateDescriptionErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _stateDescriptionErr != nil { return nil, errors.Wrap(_stateDescriptionErr, "Error parsing 'stateDescription' field of BACnetConstructedDataStateDescription") } @@ -186,7 +188,7 @@ func BACnetConstructedDataStateDescriptionParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_BACnetConstructedDataStateDescription{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, StateDescription: stateDescription, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataStateDescription) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataStateDescription") } - // Simple Field (stateDescription) - if pushErr := writeBuffer.PushContext("stateDescription"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for stateDescription") - } - _stateDescriptionErr := writeBuffer.WriteSerializable(ctx, m.GetStateDescription()) - if popErr := writeBuffer.PopContext("stateDescription"); popErr != nil { - return errors.Wrap(popErr, "Error popping for stateDescription") - } - if _stateDescriptionErr != nil { - return errors.Wrap(_stateDescriptionErr, "Error serializing 'stateDescription' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (stateDescription) + if pushErr := writeBuffer.PushContext("stateDescription"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for stateDescription") + } + _stateDescriptionErr := writeBuffer.WriteSerializable(ctx, m.GetStateDescription()) + if popErr := writeBuffer.PopContext("stateDescription"); popErr != nil { + return errors.Wrap(popErr, "Error popping for stateDescription") + } + if _stateDescriptionErr != nil { + return errors.Wrap(_stateDescriptionErr, "Error serializing 'stateDescription' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataStateDescription"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataStateDescription") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataStateDescription) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataStateDescription) isBACnetConstructedDataStateDescription() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataStateDescription) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStateText.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStateText.go index c9aa3feb433..63cd054417b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStateText.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStateText.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataStateText is the corresponding interface of BACnetConstructedDataStateText type BACnetConstructedDataStateText interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataStateTextExactly interface { // _BACnetConstructedDataStateText is the data-structure of this message type _BACnetConstructedDataStateText struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - StateText []BACnetApplicationTagCharacterString + NumberOfDataElements BACnetApplicationTagUnsignedInteger + StateText []BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataStateText) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataStateText) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataStateText) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_STATE_TEXT -} +func (m *_BACnetConstructedDataStateText) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_STATE_TEXT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataStateText) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataStateText) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataStateText) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataStateText) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataStateText) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataStateText factory function for _BACnetConstructedDataStateText -func NewBACnetConstructedDataStateText(numberOfDataElements BACnetApplicationTagUnsignedInteger, stateText []BACnetApplicationTagCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataStateText { +func NewBACnetConstructedDataStateText( numberOfDataElements BACnetApplicationTagUnsignedInteger , stateText []BACnetApplicationTagCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataStateText { _result := &_BACnetConstructedDataStateText{ - NumberOfDataElements: numberOfDataElements, - StateText: stateText, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + StateText: stateText, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataStateText(numberOfDataElements BACnetApplicationTag // Deprecated: use the interface for direct cast func CastBACnetConstructedDataStateText(structType interface{}) BACnetConstructedDataStateText { - if casted, ok := structType.(BACnetConstructedDataStateText); ok { + if casted, ok := structType.(BACnetConstructedDataStateText); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataStateText); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataStateText) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetConstructedDataStateText) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataStateTextParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataStateTextParseWithBuffer(ctx context.Context, readBuff // Terminated array var stateText []BACnetApplicationTagCharacterString { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'stateText' field of BACnetConstructedDataStateText") } @@ -235,11 +237,11 @@ func BACnetConstructedDataStateTextParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_BACnetConstructedDataStateText{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - StateText: stateText, + StateText: stateText, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataStateText) SerializeWithWriteBuffer(ctx context.C if pushErr := writeBuffer.PushContext("BACnetConstructedDataStateText"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataStateText") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (stateText) - if pushErr := writeBuffer.PushContext("stateText", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for stateText") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetStateText() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetStateText()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'stateText' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("stateText", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for stateText") + } + + // Array Field (stateText) + if pushErr := writeBuffer.PushContext("stateText", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for stateText") + } + for _curItem, _element := range m.GetStateText() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetStateText()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'stateText' field") } + } + if popErr := writeBuffer.PopContext("stateText", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for stateText") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataStateText"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataStateText") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataStateText) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataStateText) isBACnetConstructedDataStateText() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataStateText) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStatusFlags.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStatusFlags.go index 24be6cb18cc..246005c7794 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStatusFlags.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStatusFlags.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataStatusFlags is the corresponding interface of BACnetConstructedDataStatusFlags type BACnetConstructedDataStatusFlags interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataStatusFlagsExactly interface { // _BACnetConstructedDataStatusFlags is the data-structure of this message type _BACnetConstructedDataStatusFlags struct { *_BACnetConstructedData - StatusFlags BACnetStatusFlagsTagged + StatusFlags BACnetStatusFlagsTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataStatusFlags) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataStatusFlags) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataStatusFlags) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_STATUS_FLAGS -} +func (m *_BACnetConstructedDataStatusFlags) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_STATUS_FLAGS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataStatusFlags) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataStatusFlags) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataStatusFlags) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataStatusFlags) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataStatusFlags) GetActualValue() BACnetStatusFlagsTa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataStatusFlags factory function for _BACnetConstructedDataStatusFlags -func NewBACnetConstructedDataStatusFlags(statusFlags BACnetStatusFlagsTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataStatusFlags { +func NewBACnetConstructedDataStatusFlags( statusFlags BACnetStatusFlagsTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataStatusFlags { _result := &_BACnetConstructedDataStatusFlags{ - StatusFlags: statusFlags, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + StatusFlags: statusFlags, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataStatusFlags(statusFlags BACnetStatusFlagsTagged, op // Deprecated: use the interface for direct cast func CastBACnetConstructedDataStatusFlags(structType interface{}) BACnetConstructedDataStatusFlags { - if casted, ok := structType.(BACnetConstructedDataStatusFlags); ok { + if casted, ok := structType.(BACnetConstructedDataStatusFlags); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataStatusFlags); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataStatusFlags) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataStatusFlags) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataStatusFlagsParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("statusFlags"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for statusFlags") } - _statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _statusFlagsErr != nil { return nil, errors.Wrap(_statusFlagsErr, "Error parsing 'statusFlags' field of BACnetConstructedDataStatusFlags") } @@ -186,7 +188,7 @@ func BACnetConstructedDataStatusFlagsParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataStatusFlags{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, StatusFlags: statusFlags, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataStatusFlags) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataStatusFlags") } - // Simple Field (statusFlags) - if pushErr := writeBuffer.PushContext("statusFlags"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for statusFlags") - } - _statusFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetStatusFlags()) - if popErr := writeBuffer.PopContext("statusFlags"); popErr != nil { - return errors.Wrap(popErr, "Error popping for statusFlags") - } - if _statusFlagsErr != nil { - return errors.Wrap(_statusFlagsErr, "Error serializing 'statusFlags' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (statusFlags) + if pushErr := writeBuffer.PushContext("statusFlags"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for statusFlags") + } + _statusFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetStatusFlags()) + if popErr := writeBuffer.PopContext("statusFlags"); popErr != nil { + return errors.Wrap(popErr, "Error popping for statusFlags") + } + if _statusFlagsErr != nil { + return errors.Wrap(_statusFlagsErr, "Error serializing 'statusFlags' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataStatusFlags"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataStatusFlags") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataStatusFlags) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataStatusFlags) isBACnetConstructedDataStatusFlags() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataStatusFlags) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStopTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStopTime.go index 03b7ff9cbf9..79488548310 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStopTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStopTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataStopTime is the corresponding interface of BACnetConstructedDataStopTime type BACnetConstructedDataStopTime interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataStopTimeExactly interface { // _BACnetConstructedDataStopTime is the data-structure of this message type _BACnetConstructedDataStopTime struct { *_BACnetConstructedData - StopTime BACnetDateTime + StopTime BACnetDateTime } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataStopTime) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataStopTime) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataStopTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_STOP_TIME -} +func (m *_BACnetConstructedDataStopTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_STOP_TIME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataStopTime) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataStopTime) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataStopTime) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataStopTime) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataStopTime) GetActualValue() BACnetDateTime { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataStopTime factory function for _BACnetConstructedDataStopTime -func NewBACnetConstructedDataStopTime(stopTime BACnetDateTime, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataStopTime { +func NewBACnetConstructedDataStopTime( stopTime BACnetDateTime , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataStopTime { _result := &_BACnetConstructedDataStopTime{ - StopTime: stopTime, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + StopTime: stopTime, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataStopTime(stopTime BACnetDateTime, openingTag BACnet // Deprecated: use the interface for direct cast func CastBACnetConstructedDataStopTime(structType interface{}) BACnetConstructedDataStopTime { - if casted, ok := structType.(BACnetConstructedDataStopTime); ok { + if casted, ok := structType.(BACnetConstructedDataStopTime); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataStopTime); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataStopTime) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetConstructedDataStopTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataStopTimeParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("stopTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for stopTime") } - _stopTime, _stopTimeErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) +_stopTime, _stopTimeErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) if _stopTimeErr != nil { return nil, errors.Wrap(_stopTimeErr, "Error parsing 'stopTime' field of BACnetConstructedDataStopTime") } @@ -186,7 +188,7 @@ func BACnetConstructedDataStopTimeParseWithBuffer(ctx context.Context, readBuffe // Create a partially initialized instance _child := &_BACnetConstructedDataStopTime{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, StopTime: stopTime, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataStopTime) SerializeWithWriteBuffer(ctx context.Co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataStopTime") } - // Simple Field (stopTime) - if pushErr := writeBuffer.PushContext("stopTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for stopTime") - } - _stopTimeErr := writeBuffer.WriteSerializable(ctx, m.GetStopTime()) - if popErr := writeBuffer.PopContext("stopTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for stopTime") - } - if _stopTimeErr != nil { - return errors.Wrap(_stopTimeErr, "Error serializing 'stopTime' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (stopTime) + if pushErr := writeBuffer.PushContext("stopTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for stopTime") + } + _stopTimeErr := writeBuffer.WriteSerializable(ctx, m.GetStopTime()) + if popErr := writeBuffer.PopContext("stopTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for stopTime") + } + if _stopTimeErr != nil { + return errors.Wrap(_stopTimeErr, "Error serializing 'stopTime' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataStopTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataStopTime") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataStopTime) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataStopTime) isBACnetConstructedDataStopTime() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataStopTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStopWhenFull.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStopWhenFull.go index 7b0ef68bb38..27f4712d239 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStopWhenFull.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStopWhenFull.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataStopWhenFull is the corresponding interface of BACnetConstructedDataStopWhenFull type BACnetConstructedDataStopWhenFull interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataStopWhenFullExactly interface { // _BACnetConstructedDataStopWhenFull is the data-structure of this message type _BACnetConstructedDataStopWhenFull struct { *_BACnetConstructedData - StopWhenFull BACnetApplicationTagBoolean + StopWhenFull BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataStopWhenFull) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataStopWhenFull) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataStopWhenFull) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_STOP_WHEN_FULL -} +func (m *_BACnetConstructedDataStopWhenFull) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_STOP_WHEN_FULL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataStopWhenFull) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataStopWhenFull) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataStopWhenFull) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataStopWhenFull) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataStopWhenFull) GetActualValue() BACnetApplicationT /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataStopWhenFull factory function for _BACnetConstructedDataStopWhenFull -func NewBACnetConstructedDataStopWhenFull(stopWhenFull BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataStopWhenFull { +func NewBACnetConstructedDataStopWhenFull( stopWhenFull BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataStopWhenFull { _result := &_BACnetConstructedDataStopWhenFull{ - StopWhenFull: stopWhenFull, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + StopWhenFull: stopWhenFull, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataStopWhenFull(stopWhenFull BACnetApplicationTagBoole // Deprecated: use the interface for direct cast func CastBACnetConstructedDataStopWhenFull(structType interface{}) BACnetConstructedDataStopWhenFull { - if casted, ok := structType.(BACnetConstructedDataStopWhenFull); ok { + if casted, ok := structType.(BACnetConstructedDataStopWhenFull); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataStopWhenFull); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataStopWhenFull) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetConstructedDataStopWhenFull) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataStopWhenFullParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("stopWhenFull"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for stopWhenFull") } - _stopWhenFull, _stopWhenFullErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_stopWhenFull, _stopWhenFullErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _stopWhenFullErr != nil { return nil, errors.Wrap(_stopWhenFullErr, "Error parsing 'stopWhenFull' field of BACnetConstructedDataStopWhenFull") } @@ -186,7 +188,7 @@ func BACnetConstructedDataStopWhenFullParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetConstructedDataStopWhenFull{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, StopWhenFull: stopWhenFull, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataStopWhenFull) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataStopWhenFull") } - // Simple Field (stopWhenFull) - if pushErr := writeBuffer.PushContext("stopWhenFull"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for stopWhenFull") - } - _stopWhenFullErr := writeBuffer.WriteSerializable(ctx, m.GetStopWhenFull()) - if popErr := writeBuffer.PopContext("stopWhenFull"); popErr != nil { - return errors.Wrap(popErr, "Error popping for stopWhenFull") - } - if _stopWhenFullErr != nil { - return errors.Wrap(_stopWhenFullErr, "Error serializing 'stopWhenFull' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (stopWhenFull) + if pushErr := writeBuffer.PushContext("stopWhenFull"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for stopWhenFull") + } + _stopWhenFullErr := writeBuffer.WriteSerializable(ctx, m.GetStopWhenFull()) + if popErr := writeBuffer.PopContext("stopWhenFull"); popErr != nil { + return errors.Wrap(popErr, "Error popping for stopWhenFull") + } + if _stopWhenFullErr != nil { + return errors.Wrap(_stopWhenFullErr, "Error serializing 'stopWhenFull' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataStopWhenFull"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataStopWhenFull") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataStopWhenFull) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataStopWhenFull) isBACnetConstructedDataStopWhenFull() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataStopWhenFull) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStrikeCount.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStrikeCount.go index a57a7ef8072..27a694370fb 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStrikeCount.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStrikeCount.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataStrikeCount is the corresponding interface of BACnetConstructedDataStrikeCount type BACnetConstructedDataStrikeCount interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataStrikeCountExactly interface { // _BACnetConstructedDataStrikeCount is the data-structure of this message type _BACnetConstructedDataStrikeCount struct { *_BACnetConstructedData - StrikeCount BACnetApplicationTagUnsignedInteger + StrikeCount BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataStrikeCount) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataStrikeCount) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataStrikeCount) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_STRIKE_COUNT -} +func (m *_BACnetConstructedDataStrikeCount) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_STRIKE_COUNT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataStrikeCount) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataStrikeCount) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataStrikeCount) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataStrikeCount) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataStrikeCount) GetActualValue() BACnetApplicationTa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataStrikeCount factory function for _BACnetConstructedDataStrikeCount -func NewBACnetConstructedDataStrikeCount(strikeCount BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataStrikeCount { +func NewBACnetConstructedDataStrikeCount( strikeCount BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataStrikeCount { _result := &_BACnetConstructedDataStrikeCount{ - StrikeCount: strikeCount, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + StrikeCount: strikeCount, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataStrikeCount(strikeCount BACnetApplicationTagUnsigne // Deprecated: use the interface for direct cast func CastBACnetConstructedDataStrikeCount(structType interface{}) BACnetConstructedDataStrikeCount { - if casted, ok := structType.(BACnetConstructedDataStrikeCount); ok { + if casted, ok := structType.(BACnetConstructedDataStrikeCount); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataStrikeCount); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataStrikeCount) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataStrikeCount) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataStrikeCountParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("strikeCount"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for strikeCount") } - _strikeCount, _strikeCountErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_strikeCount, _strikeCountErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _strikeCountErr != nil { return nil, errors.Wrap(_strikeCountErr, "Error parsing 'strikeCount' field of BACnetConstructedDataStrikeCount") } @@ -186,7 +188,7 @@ func BACnetConstructedDataStrikeCountParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataStrikeCount{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, StrikeCount: strikeCount, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataStrikeCount) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataStrikeCount") } - // Simple Field (strikeCount) - if pushErr := writeBuffer.PushContext("strikeCount"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for strikeCount") - } - _strikeCountErr := writeBuffer.WriteSerializable(ctx, m.GetStrikeCount()) - if popErr := writeBuffer.PopContext("strikeCount"); popErr != nil { - return errors.Wrap(popErr, "Error popping for strikeCount") - } - if _strikeCountErr != nil { - return errors.Wrap(_strikeCountErr, "Error serializing 'strikeCount' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (strikeCount) + if pushErr := writeBuffer.PushContext("strikeCount"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for strikeCount") + } + _strikeCountErr := writeBuffer.WriteSerializable(ctx, m.GetStrikeCount()) + if popErr := writeBuffer.PopContext("strikeCount"); popErr != nil { + return errors.Wrap(popErr, "Error popping for strikeCount") + } + if _strikeCountErr != nil { + return errors.Wrap(_strikeCountErr, "Error serializing 'strikeCount' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataStrikeCount"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataStrikeCount") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataStrikeCount) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataStrikeCount) isBACnetConstructedDataStrikeCount() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataStrikeCount) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStructuredObjectList.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStructuredObjectList.go index 6281c2656c4..b3acda517e9 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStructuredObjectList.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStructuredObjectList.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataStructuredObjectList is the corresponding interface of BACnetConstructedDataStructuredObjectList type BACnetConstructedDataStructuredObjectList interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataStructuredObjectListExactly interface { // _BACnetConstructedDataStructuredObjectList is the data-structure of this message type _BACnetConstructedDataStructuredObjectList struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - StructuredObjectList []BACnetApplicationTagObjectIdentifier + NumberOfDataElements BACnetApplicationTagUnsignedInteger + StructuredObjectList []BACnetApplicationTagObjectIdentifier } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataStructuredObjectList) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataStructuredObjectList) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataStructuredObjectList) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_STRUCTURED_OBJECT_LIST -} +func (m *_BACnetConstructedDataStructuredObjectList) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_STRUCTURED_OBJECT_LIST} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataStructuredObjectList) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataStructuredObjectList) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataStructuredObjectList) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataStructuredObjectList) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataStructuredObjectList) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataStructuredObjectList factory function for _BACnetConstructedDataStructuredObjectList -func NewBACnetConstructedDataStructuredObjectList(numberOfDataElements BACnetApplicationTagUnsignedInteger, structuredObjectList []BACnetApplicationTagObjectIdentifier, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataStructuredObjectList { +func NewBACnetConstructedDataStructuredObjectList( numberOfDataElements BACnetApplicationTagUnsignedInteger , structuredObjectList []BACnetApplicationTagObjectIdentifier , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataStructuredObjectList { _result := &_BACnetConstructedDataStructuredObjectList{ - NumberOfDataElements: numberOfDataElements, - StructuredObjectList: structuredObjectList, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + StructuredObjectList: structuredObjectList, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataStructuredObjectList(numberOfDataElements BACnetApp // Deprecated: use the interface for direct cast func CastBACnetConstructedDataStructuredObjectList(structType interface{}) BACnetConstructedDataStructuredObjectList { - if casted, ok := structType.(BACnetConstructedDataStructuredObjectList); ok { + if casted, ok := structType.(BACnetConstructedDataStructuredObjectList); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataStructuredObjectList); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataStructuredObjectList) GetLengthInBits(ctx context return lengthInBits } + func (m *_BACnetConstructedDataStructuredObjectList) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataStructuredObjectListParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataStructuredObjectListParseWithBuffer(ctx context.Contex // Terminated array var structuredObjectList []BACnetApplicationTagObjectIdentifier { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'structuredObjectList' field of BACnetConstructedDataStructuredObjectList") } @@ -235,7 +237,7 @@ func BACnetConstructedDataStructuredObjectListParseWithBuffer(ctx context.Contex // Create a partially initialized instance _child := &_BACnetConstructedDataStructuredObjectList{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataStructuredObjectList) SerializeWithWriteBuffer(ct if pushErr := writeBuffer.PushContext("BACnetConstructedDataStructuredObjectList"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataStructuredObjectList") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (structuredObjectList) - if pushErr := writeBuffer.PushContext("structuredObjectList", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for structuredObjectList") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetStructuredObjectList() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetStructuredObjectList()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'structuredObjectList' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("structuredObjectList", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for structuredObjectList") + } + + // Array Field (structuredObjectList) + if pushErr := writeBuffer.PushContext("structuredObjectList", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for structuredObjectList") + } + for _curItem, _element := range m.GetStructuredObjectList() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetStructuredObjectList()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'structuredObjectList' field") } + } + if popErr := writeBuffer.PopContext("structuredObjectList", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for structuredObjectList") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataStructuredObjectList"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataStructuredObjectList") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataStructuredObjectList) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataStructuredObjectList) isBACnetConstructedDataStructuredObjectList() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataStructuredObjectList) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStructuredViewAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStructuredViewAll.go index 662c2e9946d..05cc9d1e39c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStructuredViewAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataStructuredViewAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataStructuredViewAll is the corresponding interface of BACnetConstructedDataStructuredViewAll type BACnetConstructedDataStructuredViewAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataStructuredViewAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataStructuredViewAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_STRUCTURED_VIEW -} +func (m *_BACnetConstructedDataStructuredViewAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_STRUCTURED_VIEW} -func (m *_BACnetConstructedDataStructuredViewAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataStructuredViewAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataStructuredViewAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataStructuredViewAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataStructuredViewAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataStructuredViewAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataStructuredViewAll factory function for _BACnetConstructedDataStructuredViewAll -func NewBACnetConstructedDataStructuredViewAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataStructuredViewAll { +func NewBACnetConstructedDataStructuredViewAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataStructuredViewAll { _result := &_BACnetConstructedDataStructuredViewAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataStructuredViewAll(openingTag BACnetOpeningTag, peek // Deprecated: use the interface for direct cast func CastBACnetConstructedDataStructuredViewAll(structType interface{}) BACnetConstructedDataStructuredViewAll { - if casted, ok := structType.(BACnetConstructedDataStructuredViewAll); ok { + if casted, ok := structType.(BACnetConstructedDataStructuredViewAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataStructuredViewAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataStructuredViewAll) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetConstructedDataStructuredViewAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataStructuredViewAllParseWithBuffer(ctx context.Context, _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataStructuredViewAllParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataStructuredViewAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataStructuredViewAll) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataStructuredViewAll) isBACnetConstructedDataStructuredViewAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataStructuredViewAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSubordinateAnnotations.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSubordinateAnnotations.go index 86d8509f084..1e6320e0b95 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSubordinateAnnotations.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSubordinateAnnotations.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataSubordinateAnnotations is the corresponding interface of BACnetConstructedDataSubordinateAnnotations type BACnetConstructedDataSubordinateAnnotations interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataSubordinateAnnotationsExactly interface { // _BACnetConstructedDataSubordinateAnnotations is the data-structure of this message type _BACnetConstructedDataSubordinateAnnotations struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - SubordinateAnnotations []BACnetApplicationTagCharacterString + NumberOfDataElements BACnetApplicationTagUnsignedInteger + SubordinateAnnotations []BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataSubordinateAnnotations) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataSubordinateAnnotations) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataSubordinateAnnotations) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_SUBORDINATE_ANNOTATIONS -} +func (m *_BACnetConstructedDataSubordinateAnnotations) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_SUBORDINATE_ANNOTATIONS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataSubordinateAnnotations) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataSubordinateAnnotations) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataSubordinateAnnotations) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataSubordinateAnnotations) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataSubordinateAnnotations) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataSubordinateAnnotations factory function for _BACnetConstructedDataSubordinateAnnotations -func NewBACnetConstructedDataSubordinateAnnotations(numberOfDataElements BACnetApplicationTagUnsignedInteger, subordinateAnnotations []BACnetApplicationTagCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataSubordinateAnnotations { +func NewBACnetConstructedDataSubordinateAnnotations( numberOfDataElements BACnetApplicationTagUnsignedInteger , subordinateAnnotations []BACnetApplicationTagCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataSubordinateAnnotations { _result := &_BACnetConstructedDataSubordinateAnnotations{ - NumberOfDataElements: numberOfDataElements, + NumberOfDataElements: numberOfDataElements, SubordinateAnnotations: subordinateAnnotations, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataSubordinateAnnotations(numberOfDataElements BACnetA // Deprecated: use the interface for direct cast func CastBACnetConstructedDataSubordinateAnnotations(structType interface{}) BACnetConstructedDataSubordinateAnnotations { - if casted, ok := structType.(BACnetConstructedDataSubordinateAnnotations); ok { + if casted, ok := structType.(BACnetConstructedDataSubordinateAnnotations); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataSubordinateAnnotations); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataSubordinateAnnotations) GetLengthInBits(ctx conte return lengthInBits } + func (m *_BACnetConstructedDataSubordinateAnnotations) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataSubordinateAnnotationsParseWithBuffer(ctx context.Cont if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataSubordinateAnnotationsParseWithBuffer(ctx context.Cont // Terminated array var subordinateAnnotations []BACnetApplicationTagCharacterString { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'subordinateAnnotations' field of BACnetConstructedDataSubordinateAnnotations") } @@ -235,10 +237,10 @@ func BACnetConstructedDataSubordinateAnnotationsParseWithBuffer(ctx context.Cont // Create a partially initialized instance _child := &_BACnetConstructedDataSubordinateAnnotations{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, - NumberOfDataElements: numberOfDataElements, + NumberOfDataElements: numberOfDataElements, SubordinateAnnotations: subordinateAnnotations, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataSubordinateAnnotations) SerializeWithWriteBuffer( if pushErr := writeBuffer.PushContext("BACnetConstructedDataSubordinateAnnotations"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataSubordinateAnnotations") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (subordinateAnnotations) - if pushErr := writeBuffer.PushContext("subordinateAnnotations", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for subordinateAnnotations") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetSubordinateAnnotations() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetSubordinateAnnotations()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'subordinateAnnotations' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("subordinateAnnotations", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for subordinateAnnotations") + } + + // Array Field (subordinateAnnotations) + if pushErr := writeBuffer.PushContext("subordinateAnnotations", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for subordinateAnnotations") + } + for _curItem, _element := range m.GetSubordinateAnnotations() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetSubordinateAnnotations()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'subordinateAnnotations' field") } + } + if popErr := writeBuffer.PopContext("subordinateAnnotations", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for subordinateAnnotations") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataSubordinateAnnotations"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataSubordinateAnnotations") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataSubordinateAnnotations) SerializeWithWriteBuffer( return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataSubordinateAnnotations) isBACnetConstructedDataSubordinateAnnotations() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataSubordinateAnnotations) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSubordinateList.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSubordinateList.go index 45163cc4ac3..ceb7b682291 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSubordinateList.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSubordinateList.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataSubordinateList is the corresponding interface of BACnetConstructedDataSubordinateList type BACnetConstructedDataSubordinateList interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataSubordinateListExactly interface { // _BACnetConstructedDataSubordinateList is the data-structure of this message type _BACnetConstructedDataSubordinateList struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - SubordinateList []BACnetDeviceObjectReference + NumberOfDataElements BACnetApplicationTagUnsignedInteger + SubordinateList []BACnetDeviceObjectReference } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataSubordinateList) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataSubordinateList) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataSubordinateList) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_SUBORDINATE_LIST -} +func (m *_BACnetConstructedDataSubordinateList) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_SUBORDINATE_LIST} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataSubordinateList) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataSubordinateList) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataSubordinateList) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataSubordinateList) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataSubordinateList) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataSubordinateList factory function for _BACnetConstructedDataSubordinateList -func NewBACnetConstructedDataSubordinateList(numberOfDataElements BACnetApplicationTagUnsignedInteger, subordinateList []BACnetDeviceObjectReference, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataSubordinateList { +func NewBACnetConstructedDataSubordinateList( numberOfDataElements BACnetApplicationTagUnsignedInteger , subordinateList []BACnetDeviceObjectReference , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataSubordinateList { _result := &_BACnetConstructedDataSubordinateList{ - NumberOfDataElements: numberOfDataElements, - SubordinateList: subordinateList, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + SubordinateList: subordinateList, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataSubordinateList(numberOfDataElements BACnetApplicat // Deprecated: use the interface for direct cast func CastBACnetConstructedDataSubordinateList(structType interface{}) BACnetConstructedDataSubordinateList { - if casted, ok := structType.(BACnetConstructedDataSubordinateList); ok { + if casted, ok := structType.(BACnetConstructedDataSubordinateList); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataSubordinateList); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataSubordinateList) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetConstructedDataSubordinateList) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataSubordinateListParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataSubordinateListParseWithBuffer(ctx context.Context, re // Terminated array var subordinateList []BACnetDeviceObjectReference { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'subordinateList' field of BACnetConstructedDataSubordinateList") } @@ -235,11 +237,11 @@ func BACnetConstructedDataSubordinateListParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetConstructedDataSubordinateList{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - SubordinateList: subordinateList, + SubordinateList: subordinateList, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataSubordinateList) SerializeWithWriteBuffer(ctx con if pushErr := writeBuffer.PushContext("BACnetConstructedDataSubordinateList"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataSubordinateList") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (subordinateList) - if pushErr := writeBuffer.PushContext("subordinateList", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for subordinateList") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetSubordinateList() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetSubordinateList()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'subordinateList' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("subordinateList", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for subordinateList") + } + + // Array Field (subordinateList) + if pushErr := writeBuffer.PushContext("subordinateList", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for subordinateList") + } + for _curItem, _element := range m.GetSubordinateList() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetSubordinateList()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'subordinateList' field") } + } + if popErr := writeBuffer.PopContext("subordinateList", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for subordinateList") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataSubordinateList"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataSubordinateList") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataSubordinateList) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataSubordinateList) isBACnetConstructedDataSubordinateList() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataSubordinateList) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSubordinateNodeTypes.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSubordinateNodeTypes.go index e25c86ff15d..b2f3b4ccc21 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSubordinateNodeTypes.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSubordinateNodeTypes.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataSubordinateNodeTypes is the corresponding interface of BACnetConstructedDataSubordinateNodeTypes type BACnetConstructedDataSubordinateNodeTypes interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataSubordinateNodeTypesExactly interface { // _BACnetConstructedDataSubordinateNodeTypes is the data-structure of this message type _BACnetConstructedDataSubordinateNodeTypes struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - SubordinateNodeTypes []BACnetNodeTypeTagged + NumberOfDataElements BACnetApplicationTagUnsignedInteger + SubordinateNodeTypes []BACnetNodeTypeTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataSubordinateNodeTypes) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataSubordinateNodeTypes) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataSubordinateNodeTypes) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_SUBORDINATE_NODE_TYPES -} +func (m *_BACnetConstructedDataSubordinateNodeTypes) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_SUBORDINATE_NODE_TYPES} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataSubordinateNodeTypes) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataSubordinateNodeTypes) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataSubordinateNodeTypes) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataSubordinateNodeTypes) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataSubordinateNodeTypes) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataSubordinateNodeTypes factory function for _BACnetConstructedDataSubordinateNodeTypes -func NewBACnetConstructedDataSubordinateNodeTypes(numberOfDataElements BACnetApplicationTagUnsignedInteger, subordinateNodeTypes []BACnetNodeTypeTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataSubordinateNodeTypes { +func NewBACnetConstructedDataSubordinateNodeTypes( numberOfDataElements BACnetApplicationTagUnsignedInteger , subordinateNodeTypes []BACnetNodeTypeTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataSubordinateNodeTypes { _result := &_BACnetConstructedDataSubordinateNodeTypes{ - NumberOfDataElements: numberOfDataElements, - SubordinateNodeTypes: subordinateNodeTypes, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + SubordinateNodeTypes: subordinateNodeTypes, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataSubordinateNodeTypes(numberOfDataElements BACnetApp // Deprecated: use the interface for direct cast func CastBACnetConstructedDataSubordinateNodeTypes(structType interface{}) BACnetConstructedDataSubordinateNodeTypes { - if casted, ok := structType.(BACnetConstructedDataSubordinateNodeTypes); ok { + if casted, ok := structType.(BACnetConstructedDataSubordinateNodeTypes); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataSubordinateNodeTypes); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataSubordinateNodeTypes) GetLengthInBits(ctx context return lengthInBits } + func (m *_BACnetConstructedDataSubordinateNodeTypes) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataSubordinateNodeTypesParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataSubordinateNodeTypesParseWithBuffer(ctx context.Contex // Terminated array var subordinateNodeTypes []BACnetNodeTypeTagged { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetNodeTypeTaggedParseWithBuffer(ctx, readBuffer, uint8(0), TagClass_APPLICATION_TAGS) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetNodeTypeTaggedParseWithBuffer(ctx, readBuffer , uint8(0) , TagClass_APPLICATION_TAGS ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'subordinateNodeTypes' field of BACnetConstructedDataSubordinateNodeTypes") } @@ -235,7 +237,7 @@ func BACnetConstructedDataSubordinateNodeTypesParseWithBuffer(ctx context.Contex // Create a partially initialized instance _child := &_BACnetConstructedDataSubordinateNodeTypes{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataSubordinateNodeTypes) SerializeWithWriteBuffer(ct if pushErr := writeBuffer.PushContext("BACnetConstructedDataSubordinateNodeTypes"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataSubordinateNodeTypes") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (subordinateNodeTypes) - if pushErr := writeBuffer.PushContext("subordinateNodeTypes", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for subordinateNodeTypes") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetSubordinateNodeTypes() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetSubordinateNodeTypes()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'subordinateNodeTypes' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("subordinateNodeTypes", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for subordinateNodeTypes") + } + + // Array Field (subordinateNodeTypes) + if pushErr := writeBuffer.PushContext("subordinateNodeTypes", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for subordinateNodeTypes") + } + for _curItem, _element := range m.GetSubordinateNodeTypes() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetSubordinateNodeTypes()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'subordinateNodeTypes' field") } + } + if popErr := writeBuffer.PopContext("subordinateNodeTypes", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for subordinateNodeTypes") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataSubordinateNodeTypes"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataSubordinateNodeTypes") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataSubordinateNodeTypes) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataSubordinateNodeTypes) isBACnetConstructedDataSubordinateNodeTypes() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataSubordinateNodeTypes) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSubordinateRelationships.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSubordinateRelationships.go index 112fb3a8ae1..413b0d291ae 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSubordinateRelationships.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSubordinateRelationships.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataSubordinateRelationships is the corresponding interface of BACnetConstructedDataSubordinateRelationships type BACnetConstructedDataSubordinateRelationships interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataSubordinateRelationshipsExactly interface { // _BACnetConstructedDataSubordinateRelationships is the data-structure of this message type _BACnetConstructedDataSubordinateRelationships struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - SubordinateRelationships []BACnetRelationshipTagged + NumberOfDataElements BACnetApplicationTagUnsignedInteger + SubordinateRelationships []BACnetRelationshipTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataSubordinateRelationships) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataSubordinateRelationships) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataSubordinateRelationships) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_SUBORDINATE_RELATIONSHIPS -} +func (m *_BACnetConstructedDataSubordinateRelationships) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_SUBORDINATE_RELATIONSHIPS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataSubordinateRelationships) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataSubordinateRelationships) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataSubordinateRelationships) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataSubordinateRelationships) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataSubordinateRelationships) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataSubordinateRelationships factory function for _BACnetConstructedDataSubordinateRelationships -func NewBACnetConstructedDataSubordinateRelationships(numberOfDataElements BACnetApplicationTagUnsignedInteger, subordinateRelationships []BACnetRelationshipTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataSubordinateRelationships { +func NewBACnetConstructedDataSubordinateRelationships( numberOfDataElements BACnetApplicationTagUnsignedInteger , subordinateRelationships []BACnetRelationshipTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataSubordinateRelationships { _result := &_BACnetConstructedDataSubordinateRelationships{ - NumberOfDataElements: numberOfDataElements, + NumberOfDataElements: numberOfDataElements, SubordinateRelationships: subordinateRelationships, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataSubordinateRelationships(numberOfDataElements BACne // Deprecated: use the interface for direct cast func CastBACnetConstructedDataSubordinateRelationships(structType interface{}) BACnetConstructedDataSubordinateRelationships { - if casted, ok := structType.(BACnetConstructedDataSubordinateRelationships); ok { + if casted, ok := structType.(BACnetConstructedDataSubordinateRelationships); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataSubordinateRelationships); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataSubordinateRelationships) GetLengthInBits(ctx con return lengthInBits } + func (m *_BACnetConstructedDataSubordinateRelationships) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataSubordinateRelationshipsParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataSubordinateRelationshipsParseWithBuffer(ctx context.Co // Terminated array var subordinateRelationships []BACnetRelationshipTagged { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetRelationshipTaggedParseWithBuffer(ctx, readBuffer, uint8(0), TagClass_APPLICATION_TAGS) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetRelationshipTaggedParseWithBuffer(ctx, readBuffer , uint8(0) , TagClass_APPLICATION_TAGS ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'subordinateRelationships' field of BACnetConstructedDataSubordinateRelationships") } @@ -235,10 +237,10 @@ func BACnetConstructedDataSubordinateRelationshipsParseWithBuffer(ctx context.Co // Create a partially initialized instance _child := &_BACnetConstructedDataSubordinateRelationships{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, - NumberOfDataElements: numberOfDataElements, + NumberOfDataElements: numberOfDataElements, SubordinateRelationships: subordinateRelationships, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataSubordinateRelationships) SerializeWithWriteBuffe if pushErr := writeBuffer.PushContext("BACnetConstructedDataSubordinateRelationships"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataSubordinateRelationships") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (subordinateRelationships) - if pushErr := writeBuffer.PushContext("subordinateRelationships", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for subordinateRelationships") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetSubordinateRelationships() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetSubordinateRelationships()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'subordinateRelationships' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("subordinateRelationships", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for subordinateRelationships") + } + + // Array Field (subordinateRelationships) + if pushErr := writeBuffer.PushContext("subordinateRelationships", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for subordinateRelationships") + } + for _curItem, _element := range m.GetSubordinateRelationships() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetSubordinateRelationships()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'subordinateRelationships' field") } + } + if popErr := writeBuffer.PopContext("subordinateRelationships", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for subordinateRelationships") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataSubordinateRelationships"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataSubordinateRelationships") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataSubordinateRelationships) SerializeWithWriteBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataSubordinateRelationships) isBACnetConstructedDataSubordinateRelationships() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataSubordinateRelationships) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSubordinateTags.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSubordinateTags.go index 0ff813fa1fd..df9ba3eca94 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSubordinateTags.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSubordinateTags.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataSubordinateTags is the corresponding interface of BACnetConstructedDataSubordinateTags type BACnetConstructedDataSubordinateTags interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataSubordinateTagsExactly interface { // _BACnetConstructedDataSubordinateTags is the data-structure of this message type _BACnetConstructedDataSubordinateTags struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - SubordinateList []BACnetNameValueCollection + NumberOfDataElements BACnetApplicationTagUnsignedInteger + SubordinateList []BACnetNameValueCollection } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataSubordinateTags) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataSubordinateTags) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataSubordinateTags) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_SUBORDINATE_TAGS -} +func (m *_BACnetConstructedDataSubordinateTags) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_SUBORDINATE_TAGS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataSubordinateTags) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataSubordinateTags) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataSubordinateTags) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataSubordinateTags) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataSubordinateTags) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataSubordinateTags factory function for _BACnetConstructedDataSubordinateTags -func NewBACnetConstructedDataSubordinateTags(numberOfDataElements BACnetApplicationTagUnsignedInteger, subordinateList []BACnetNameValueCollection, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataSubordinateTags { +func NewBACnetConstructedDataSubordinateTags( numberOfDataElements BACnetApplicationTagUnsignedInteger , subordinateList []BACnetNameValueCollection , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataSubordinateTags { _result := &_BACnetConstructedDataSubordinateTags{ - NumberOfDataElements: numberOfDataElements, - SubordinateList: subordinateList, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + SubordinateList: subordinateList, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataSubordinateTags(numberOfDataElements BACnetApplicat // Deprecated: use the interface for direct cast func CastBACnetConstructedDataSubordinateTags(structType interface{}) BACnetConstructedDataSubordinateTags { - if casted, ok := structType.(BACnetConstructedDataSubordinateTags); ok { + if casted, ok := structType.(BACnetConstructedDataSubordinateTags); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataSubordinateTags); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataSubordinateTags) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetConstructedDataSubordinateTags) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataSubordinateTagsParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataSubordinateTagsParseWithBuffer(ctx context.Context, re // Terminated array var subordinateList []BACnetNameValueCollection { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetNameValueCollectionParseWithBuffer(ctx, readBuffer, uint8(0)) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetNameValueCollectionParseWithBuffer(ctx, readBuffer , uint8(0) ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'subordinateList' field of BACnetConstructedDataSubordinateTags") } @@ -235,11 +237,11 @@ func BACnetConstructedDataSubordinateTagsParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetConstructedDataSubordinateTags{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - SubordinateList: subordinateList, + SubordinateList: subordinateList, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataSubordinateTags) SerializeWithWriteBuffer(ctx con if pushErr := writeBuffer.PushContext("BACnetConstructedDataSubordinateTags"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataSubordinateTags") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (subordinateList) - if pushErr := writeBuffer.PushContext("subordinateList", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for subordinateList") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetSubordinateList() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetSubordinateList()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'subordinateList' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("subordinateList", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for subordinateList") + } + + // Array Field (subordinateList) + if pushErr := writeBuffer.PushContext("subordinateList", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for subordinateList") + } + for _curItem, _element := range m.GetSubordinateList() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetSubordinateList()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'subordinateList' field") } + } + if popErr := writeBuffer.PopContext("subordinateList", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for subordinateList") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataSubordinateTags"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataSubordinateTags") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataSubordinateTags) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataSubordinateTags) isBACnetConstructedDataSubordinateTags() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataSubordinateTags) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSubscribedRecipients.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSubscribedRecipients.go index 3a5412c3a6d..2da7e8a8d69 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSubscribedRecipients.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSubscribedRecipients.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataSubscribedRecipients is the corresponding interface of BACnetConstructedDataSubscribedRecipients type BACnetConstructedDataSubscribedRecipients interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataSubscribedRecipientsExactly interface { // _BACnetConstructedDataSubscribedRecipients is the data-structure of this message type _BACnetConstructedDataSubscribedRecipients struct { *_BACnetConstructedData - SubscribedRecipients []BACnetEventNotificationSubscription + SubscribedRecipients []BACnetEventNotificationSubscription } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataSubscribedRecipients) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataSubscribedRecipients) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataSubscribedRecipients) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_SUBSCRIBED_RECIPIENTS -} +func (m *_BACnetConstructedDataSubscribedRecipients) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_SUBSCRIBED_RECIPIENTS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataSubscribedRecipients) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataSubscribedRecipients) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataSubscribedRecipients) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataSubscribedRecipients) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataSubscribedRecipients) GetSubscribedRecipients() [ /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataSubscribedRecipients factory function for _BACnetConstructedDataSubscribedRecipients -func NewBACnetConstructedDataSubscribedRecipients(subscribedRecipients []BACnetEventNotificationSubscription, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataSubscribedRecipients { +func NewBACnetConstructedDataSubscribedRecipients( subscribedRecipients []BACnetEventNotificationSubscription , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataSubscribedRecipients { _result := &_BACnetConstructedDataSubscribedRecipients{ - SubscribedRecipients: subscribedRecipients, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + SubscribedRecipients: subscribedRecipients, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataSubscribedRecipients(subscribedRecipients []BACnetE // Deprecated: use the interface for direct cast func CastBACnetConstructedDataSubscribedRecipients(structType interface{}) BACnetConstructedDataSubscribedRecipients { - if casted, ok := structType.(BACnetConstructedDataSubscribedRecipients); ok { + if casted, ok := structType.(BACnetConstructedDataSubscribedRecipients); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataSubscribedRecipients); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataSubscribedRecipients) GetLengthInBits(ctx context return lengthInBits } + func (m *_BACnetConstructedDataSubscribedRecipients) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataSubscribedRecipientsParseWithBuffer(ctx context.Contex // Terminated array var subscribedRecipients []BACnetEventNotificationSubscription { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetEventNotificationSubscriptionParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetEventNotificationSubscriptionParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'subscribedRecipients' field of BACnetConstructedDataSubscribedRecipients") } @@ -173,7 +175,7 @@ func BACnetConstructedDataSubscribedRecipientsParseWithBuffer(ctx context.Contex // Create a partially initialized instance _child := &_BACnetConstructedDataSubscribedRecipients{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, SubscribedRecipients: subscribedRecipients, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataSubscribedRecipients) SerializeWithWriteBuffer(ct return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataSubscribedRecipients") } - // Array Field (subscribedRecipients) - if pushErr := writeBuffer.PushContext("subscribedRecipients", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for subscribedRecipients") - } - for _curItem, _element := range m.GetSubscribedRecipients() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetSubscribedRecipients()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'subscribedRecipients' field") - } - } - if popErr := writeBuffer.PopContext("subscribedRecipients", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for subscribedRecipients") + // Array Field (subscribedRecipients) + if pushErr := writeBuffer.PushContext("subscribedRecipients", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for subscribedRecipients") + } + for _curItem, _element := range m.GetSubscribedRecipients() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetSubscribedRecipients()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'subscribedRecipients' field") } + } + if popErr := writeBuffer.PopContext("subscribedRecipients", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for subscribedRecipients") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataSubscribedRecipients"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataSubscribedRecipients") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataSubscribedRecipients) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataSubscribedRecipients) isBACnetConstructedDataSubscribedRecipients() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataSubscribedRecipients) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSupportedFormatClasses.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSupportedFormatClasses.go index aa61d4a43c6..a314c43de24 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSupportedFormatClasses.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSupportedFormatClasses.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataSupportedFormatClasses is the corresponding interface of BACnetConstructedDataSupportedFormatClasses type BACnetConstructedDataSupportedFormatClasses interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataSupportedFormatClassesExactly interface { // _BACnetConstructedDataSupportedFormatClasses is the data-structure of this message type _BACnetConstructedDataSupportedFormatClasses struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - SupportedFormats []BACnetApplicationTagUnsignedInteger + NumberOfDataElements BACnetApplicationTagUnsignedInteger + SupportedFormats []BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataSupportedFormatClasses) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataSupportedFormatClasses) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataSupportedFormatClasses) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_SUPPORTED_FORMAT_CLASSES -} +func (m *_BACnetConstructedDataSupportedFormatClasses) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_SUPPORTED_FORMAT_CLASSES} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataSupportedFormatClasses) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataSupportedFormatClasses) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataSupportedFormatClasses) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataSupportedFormatClasses) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataSupportedFormatClasses) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataSupportedFormatClasses factory function for _BACnetConstructedDataSupportedFormatClasses -func NewBACnetConstructedDataSupportedFormatClasses(numberOfDataElements BACnetApplicationTagUnsignedInteger, supportedFormats []BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataSupportedFormatClasses { +func NewBACnetConstructedDataSupportedFormatClasses( numberOfDataElements BACnetApplicationTagUnsignedInteger , supportedFormats []BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataSupportedFormatClasses { _result := &_BACnetConstructedDataSupportedFormatClasses{ - NumberOfDataElements: numberOfDataElements, - SupportedFormats: supportedFormats, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + SupportedFormats: supportedFormats, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataSupportedFormatClasses(numberOfDataElements BACnetA // Deprecated: use the interface for direct cast func CastBACnetConstructedDataSupportedFormatClasses(structType interface{}) BACnetConstructedDataSupportedFormatClasses { - if casted, ok := structType.(BACnetConstructedDataSupportedFormatClasses); ok { + if casted, ok := structType.(BACnetConstructedDataSupportedFormatClasses); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataSupportedFormatClasses); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataSupportedFormatClasses) GetLengthInBits(ctx conte return lengthInBits } + func (m *_BACnetConstructedDataSupportedFormatClasses) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataSupportedFormatClassesParseWithBuffer(ctx context.Cont if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataSupportedFormatClassesParseWithBuffer(ctx context.Cont // Terminated array var supportedFormats []BACnetApplicationTagUnsignedInteger { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'supportedFormats' field of BACnetConstructedDataSupportedFormatClasses") } @@ -235,11 +237,11 @@ func BACnetConstructedDataSupportedFormatClassesParseWithBuffer(ctx context.Cont // Create a partially initialized instance _child := &_BACnetConstructedDataSupportedFormatClasses{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - SupportedFormats: supportedFormats, + SupportedFormats: supportedFormats, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataSupportedFormatClasses) SerializeWithWriteBuffer( if pushErr := writeBuffer.PushContext("BACnetConstructedDataSupportedFormatClasses"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataSupportedFormatClasses") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (supportedFormats) - if pushErr := writeBuffer.PushContext("supportedFormats", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for supportedFormats") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetSupportedFormats() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetSupportedFormats()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'supportedFormats' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("supportedFormats", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for supportedFormats") + } + + // Array Field (supportedFormats) + if pushErr := writeBuffer.PushContext("supportedFormats", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for supportedFormats") + } + for _curItem, _element := range m.GetSupportedFormats() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetSupportedFormats()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'supportedFormats' field") } + } + if popErr := writeBuffer.PopContext("supportedFormats", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for supportedFormats") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataSupportedFormatClasses"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataSupportedFormatClasses") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataSupportedFormatClasses) SerializeWithWriteBuffer( return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataSupportedFormatClasses) isBACnetConstructedDataSupportedFormatClasses() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataSupportedFormatClasses) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSupportedFormats.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSupportedFormats.go index dd55c5ab718..f944d0d24a3 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSupportedFormats.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSupportedFormats.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataSupportedFormats is the corresponding interface of BACnetConstructedDataSupportedFormats type BACnetConstructedDataSupportedFormats interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataSupportedFormatsExactly interface { // _BACnetConstructedDataSupportedFormats is the data-structure of this message type _BACnetConstructedDataSupportedFormats struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - SupportedFormats []BACnetAuthenticationFactorFormat + NumberOfDataElements BACnetApplicationTagUnsignedInteger + SupportedFormats []BACnetAuthenticationFactorFormat } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataSupportedFormats) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataSupportedFormats) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataSupportedFormats) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_SUPPORTED_FORMATS -} +func (m *_BACnetConstructedDataSupportedFormats) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_SUPPORTED_FORMATS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataSupportedFormats) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataSupportedFormats) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataSupportedFormats) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataSupportedFormats) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataSupportedFormats) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataSupportedFormats factory function for _BACnetConstructedDataSupportedFormats -func NewBACnetConstructedDataSupportedFormats(numberOfDataElements BACnetApplicationTagUnsignedInteger, supportedFormats []BACnetAuthenticationFactorFormat, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataSupportedFormats { +func NewBACnetConstructedDataSupportedFormats( numberOfDataElements BACnetApplicationTagUnsignedInteger , supportedFormats []BACnetAuthenticationFactorFormat , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataSupportedFormats { _result := &_BACnetConstructedDataSupportedFormats{ - NumberOfDataElements: numberOfDataElements, - SupportedFormats: supportedFormats, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + SupportedFormats: supportedFormats, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataSupportedFormats(numberOfDataElements BACnetApplica // Deprecated: use the interface for direct cast func CastBACnetConstructedDataSupportedFormats(structType interface{}) BACnetConstructedDataSupportedFormats { - if casted, ok := structType.(BACnetConstructedDataSupportedFormats); ok { + if casted, ok := structType.(BACnetConstructedDataSupportedFormats); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataSupportedFormats); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataSupportedFormats) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetConstructedDataSupportedFormats) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataSupportedFormatsParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataSupportedFormatsParseWithBuffer(ctx context.Context, r // Terminated array var supportedFormats []BACnetAuthenticationFactorFormat { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetAuthenticationFactorFormatParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetAuthenticationFactorFormatParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'supportedFormats' field of BACnetConstructedDataSupportedFormats") } @@ -235,11 +237,11 @@ func BACnetConstructedDataSupportedFormatsParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_BACnetConstructedDataSupportedFormats{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - SupportedFormats: supportedFormats, + SupportedFormats: supportedFormats, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataSupportedFormats) SerializeWithWriteBuffer(ctx co if pushErr := writeBuffer.PushContext("BACnetConstructedDataSupportedFormats"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataSupportedFormats") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (supportedFormats) - if pushErr := writeBuffer.PushContext("supportedFormats", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for supportedFormats") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetSupportedFormats() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetSupportedFormats()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'supportedFormats' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("supportedFormats", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for supportedFormats") + } + + // Array Field (supportedFormats) + if pushErr := writeBuffer.PushContext("supportedFormats", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for supportedFormats") + } + for _curItem, _element := range m.GetSupportedFormats() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetSupportedFormats()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'supportedFormats' field") } + } + if popErr := writeBuffer.PopContext("supportedFormats", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for supportedFormats") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataSupportedFormats"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataSupportedFormats") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataSupportedFormats) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataSupportedFormats) isBACnetConstructedDataSupportedFormats() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataSupportedFormats) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSupportedSecurityAlgorithms.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSupportedSecurityAlgorithms.go index 63dc21e7d1b..23b6a3d16c7 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSupportedSecurityAlgorithms.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSupportedSecurityAlgorithms.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataSupportedSecurityAlgorithms is the corresponding interface of BACnetConstructedDataSupportedSecurityAlgorithms type BACnetConstructedDataSupportedSecurityAlgorithms interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataSupportedSecurityAlgorithmsExactly interface { // _BACnetConstructedDataSupportedSecurityAlgorithms is the data-structure of this message type _BACnetConstructedDataSupportedSecurityAlgorithms struct { *_BACnetConstructedData - SupportedSecurityAlgorithms []BACnetApplicationTagUnsignedInteger + SupportedSecurityAlgorithms []BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataSupportedSecurityAlgorithms) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataSupportedSecurityAlgorithms) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataSupportedSecurityAlgorithms) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_SUPPORTED_SECURITY_ALGORITHMS -} +func (m *_BACnetConstructedDataSupportedSecurityAlgorithms) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_SUPPORTED_SECURITY_ALGORITHMS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataSupportedSecurityAlgorithms) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataSupportedSecurityAlgorithms) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataSupportedSecurityAlgorithms) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataSupportedSecurityAlgorithms) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataSupportedSecurityAlgorithms) GetSupportedSecurity /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataSupportedSecurityAlgorithms factory function for _BACnetConstructedDataSupportedSecurityAlgorithms -func NewBACnetConstructedDataSupportedSecurityAlgorithms(supportedSecurityAlgorithms []BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataSupportedSecurityAlgorithms { +func NewBACnetConstructedDataSupportedSecurityAlgorithms( supportedSecurityAlgorithms []BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataSupportedSecurityAlgorithms { _result := &_BACnetConstructedDataSupportedSecurityAlgorithms{ SupportedSecurityAlgorithms: supportedSecurityAlgorithms, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataSupportedSecurityAlgorithms(supportedSecurityAlgori // Deprecated: use the interface for direct cast func CastBACnetConstructedDataSupportedSecurityAlgorithms(structType interface{}) BACnetConstructedDataSupportedSecurityAlgorithms { - if casted, ok := structType.(BACnetConstructedDataSupportedSecurityAlgorithms); ok { + if casted, ok := structType.(BACnetConstructedDataSupportedSecurityAlgorithms); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataSupportedSecurityAlgorithms); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataSupportedSecurityAlgorithms) GetLengthInBits(ctx return lengthInBits } + func (m *_BACnetConstructedDataSupportedSecurityAlgorithms) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataSupportedSecurityAlgorithmsParseWithBuffer(ctx context // Terminated array var supportedSecurityAlgorithms []BACnetApplicationTagUnsignedInteger { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'supportedSecurityAlgorithms' field of BACnetConstructedDataSupportedSecurityAlgorithms") } @@ -173,7 +175,7 @@ func BACnetConstructedDataSupportedSecurityAlgorithmsParseWithBuffer(ctx context // Create a partially initialized instance _child := &_BACnetConstructedDataSupportedSecurityAlgorithms{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, SupportedSecurityAlgorithms: supportedSecurityAlgorithms, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataSupportedSecurityAlgorithms) SerializeWithWriteBu return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataSupportedSecurityAlgorithms") } - // Array Field (supportedSecurityAlgorithms) - if pushErr := writeBuffer.PushContext("supportedSecurityAlgorithms", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for supportedSecurityAlgorithms") - } - for _curItem, _element := range m.GetSupportedSecurityAlgorithms() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetSupportedSecurityAlgorithms()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'supportedSecurityAlgorithms' field") - } - } - if popErr := writeBuffer.PopContext("supportedSecurityAlgorithms", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for supportedSecurityAlgorithms") + // Array Field (supportedSecurityAlgorithms) + if pushErr := writeBuffer.PushContext("supportedSecurityAlgorithms", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for supportedSecurityAlgorithms") + } + for _curItem, _element := range m.GetSupportedSecurityAlgorithms() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetSupportedSecurityAlgorithms()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'supportedSecurityAlgorithms' field") } + } + if popErr := writeBuffer.PopContext("supportedSecurityAlgorithms", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for supportedSecurityAlgorithms") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataSupportedSecurityAlgorithms"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataSupportedSecurityAlgorithms") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataSupportedSecurityAlgorithms) SerializeWithWriteBu return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataSupportedSecurityAlgorithms) isBACnetConstructedDataSupportedSecurityAlgorithms() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataSupportedSecurityAlgorithms) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSystemStatus.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSystemStatus.go index fb78f6d629a..bfd03b6b121 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSystemStatus.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataSystemStatus.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataSystemStatus is the corresponding interface of BACnetConstructedDataSystemStatus type BACnetConstructedDataSystemStatus interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataSystemStatusExactly interface { // _BACnetConstructedDataSystemStatus is the data-structure of this message type _BACnetConstructedDataSystemStatus struct { *_BACnetConstructedData - SystemStatus BACnetDeviceStatusTagged + SystemStatus BACnetDeviceStatusTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataSystemStatus) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataSystemStatus) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataSystemStatus) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_SYSTEM_STATUS -} +func (m *_BACnetConstructedDataSystemStatus) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_SYSTEM_STATUS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataSystemStatus) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataSystemStatus) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataSystemStatus) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataSystemStatus) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataSystemStatus) GetActualValue() BACnetDeviceStatus /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataSystemStatus factory function for _BACnetConstructedDataSystemStatus -func NewBACnetConstructedDataSystemStatus(systemStatus BACnetDeviceStatusTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataSystemStatus { +func NewBACnetConstructedDataSystemStatus( systemStatus BACnetDeviceStatusTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataSystemStatus { _result := &_BACnetConstructedDataSystemStatus{ - SystemStatus: systemStatus, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + SystemStatus: systemStatus, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataSystemStatus(systemStatus BACnetDeviceStatusTagged, // Deprecated: use the interface for direct cast func CastBACnetConstructedDataSystemStatus(structType interface{}) BACnetConstructedDataSystemStatus { - if casted, ok := structType.(BACnetConstructedDataSystemStatus); ok { + if casted, ok := structType.(BACnetConstructedDataSystemStatus); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataSystemStatus); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataSystemStatus) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetConstructedDataSystemStatus) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataSystemStatusParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("systemStatus"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for systemStatus") } - _systemStatus, _systemStatusErr := BACnetDeviceStatusTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_systemStatus, _systemStatusErr := BACnetDeviceStatusTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _systemStatusErr != nil { return nil, errors.Wrap(_systemStatusErr, "Error parsing 'systemStatus' field of BACnetConstructedDataSystemStatus") } @@ -186,7 +188,7 @@ func BACnetConstructedDataSystemStatusParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetConstructedDataSystemStatus{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, SystemStatus: systemStatus, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataSystemStatus) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataSystemStatus") } - // Simple Field (systemStatus) - if pushErr := writeBuffer.PushContext("systemStatus"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for systemStatus") - } - _systemStatusErr := writeBuffer.WriteSerializable(ctx, m.GetSystemStatus()) - if popErr := writeBuffer.PopContext("systemStatus"); popErr != nil { - return errors.Wrap(popErr, "Error popping for systemStatus") - } - if _systemStatusErr != nil { - return errors.Wrap(_systemStatusErr, "Error serializing 'systemStatus' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (systemStatus) + if pushErr := writeBuffer.PushContext("systemStatus"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for systemStatus") + } + _systemStatusErr := writeBuffer.WriteSerializable(ctx, m.GetSystemStatus()) + if popErr := writeBuffer.PopContext("systemStatus"); popErr != nil { + return errors.Wrap(popErr, "Error popping for systemStatus") + } + if _systemStatusErr != nil { + return errors.Wrap(_systemStatusErr, "Error serializing 'systemStatus' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataSystemStatus"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataSystemStatus") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataSystemStatus) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataSystemStatus) isBACnetConstructedDataSystemStatus() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataSystemStatus) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTags.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTags.go index 9609f0a7fe8..8ee4f095104 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTags.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTags.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataTags is the corresponding interface of BACnetConstructedDataTags type BACnetConstructedDataTags interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataTagsExactly interface { // _BACnetConstructedDataTags is the data-structure of this message type _BACnetConstructedDataTags struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - Tags []BACnetNameValue + NumberOfDataElements BACnetApplicationTagUnsignedInteger + Tags []BACnetNameValue } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataTags) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataTags) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataTags) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_TAGS -} +func (m *_BACnetConstructedDataTags) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_TAGS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataTags) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataTags) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataTags) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataTags) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataTags) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataTags factory function for _BACnetConstructedDataTags -func NewBACnetConstructedDataTags(numberOfDataElements BACnetApplicationTagUnsignedInteger, tags []BACnetNameValue, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataTags { +func NewBACnetConstructedDataTags( numberOfDataElements BACnetApplicationTagUnsignedInteger , tags []BACnetNameValue , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataTags { _result := &_BACnetConstructedDataTags{ - NumberOfDataElements: numberOfDataElements, - Tags: tags, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + Tags: tags, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataTags(numberOfDataElements BACnetApplicationTagUnsig // Deprecated: use the interface for direct cast func CastBACnetConstructedDataTags(structType interface{}) BACnetConstructedDataTags { - if casted, ok := structType.(BACnetConstructedDataTags); ok { + if casted, ok := structType.(BACnetConstructedDataTags); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataTags); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataTags) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_BACnetConstructedDataTags) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataTagsParseWithBuffer(ctx context.Context, readBuffer ut if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataTagsParseWithBuffer(ctx context.Context, readBuffer ut // Terminated array var tags []BACnetNameValue { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetNameValueParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetNameValueParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'tags' field of BACnetConstructedDataTags") } @@ -235,11 +237,11 @@ func BACnetConstructedDataTagsParseWithBuffer(ctx context.Context, readBuffer ut // Create a partially initialized instance _child := &_BACnetConstructedDataTags{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - Tags: tags, + Tags: tags, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataTags) SerializeWithWriteBuffer(ctx context.Contex if pushErr := writeBuffer.PushContext("BACnetConstructedDataTags"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataTags") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (tags) - if pushErr := writeBuffer.PushContext("tags", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for tags") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetTags() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetTags()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'tags' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("tags", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for tags") + } + + // Array Field (tags) + if pushErr := writeBuffer.PushContext("tags", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for tags") + } + for _curItem, _element := range m.GetTags() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetTags()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'tags' field") } + } + if popErr := writeBuffer.PopContext("tags", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for tags") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataTags"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataTags") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataTags) SerializeWithWriteBuffer(ctx context.Contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataTags) isBACnetConstructedDataTags() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataTags) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataThreatAuthority.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataThreatAuthority.go index 5f7958da1aa..6a33a5202d5 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataThreatAuthority.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataThreatAuthority.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataThreatAuthority is the corresponding interface of BACnetConstructedDataThreatAuthority type BACnetConstructedDataThreatAuthority interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataThreatAuthorityExactly interface { // _BACnetConstructedDataThreatAuthority is the data-structure of this message type _BACnetConstructedDataThreatAuthority struct { *_BACnetConstructedData - ThreatAuthority BACnetAccessThreatLevel + ThreatAuthority BACnetAccessThreatLevel } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataThreatAuthority) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataThreatAuthority) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataThreatAuthority) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_THREAT_AUTHORITY -} +func (m *_BACnetConstructedDataThreatAuthority) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_THREAT_AUTHORITY} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataThreatAuthority) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataThreatAuthority) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataThreatAuthority) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataThreatAuthority) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataThreatAuthority) GetActualValue() BACnetAccessThr /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataThreatAuthority factory function for _BACnetConstructedDataThreatAuthority -func NewBACnetConstructedDataThreatAuthority(threatAuthority BACnetAccessThreatLevel, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataThreatAuthority { +func NewBACnetConstructedDataThreatAuthority( threatAuthority BACnetAccessThreatLevel , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataThreatAuthority { _result := &_BACnetConstructedDataThreatAuthority{ - ThreatAuthority: threatAuthority, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ThreatAuthority: threatAuthority, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataThreatAuthority(threatAuthority BACnetAccessThreatL // Deprecated: use the interface for direct cast func CastBACnetConstructedDataThreatAuthority(structType interface{}) BACnetConstructedDataThreatAuthority { - if casted, ok := structType.(BACnetConstructedDataThreatAuthority); ok { + if casted, ok := structType.(BACnetConstructedDataThreatAuthority); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataThreatAuthority); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataThreatAuthority) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetConstructedDataThreatAuthority) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataThreatAuthorityParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("threatAuthority"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for threatAuthority") } - _threatAuthority, _threatAuthorityErr := BACnetAccessThreatLevelParseWithBuffer(ctx, readBuffer) +_threatAuthority, _threatAuthorityErr := BACnetAccessThreatLevelParseWithBuffer(ctx, readBuffer) if _threatAuthorityErr != nil { return nil, errors.Wrap(_threatAuthorityErr, "Error parsing 'threatAuthority' field of BACnetConstructedDataThreatAuthority") } @@ -186,7 +188,7 @@ func BACnetConstructedDataThreatAuthorityParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetConstructedDataThreatAuthority{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ThreatAuthority: threatAuthority, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataThreatAuthority) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataThreatAuthority") } - // Simple Field (threatAuthority) - if pushErr := writeBuffer.PushContext("threatAuthority"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for threatAuthority") - } - _threatAuthorityErr := writeBuffer.WriteSerializable(ctx, m.GetThreatAuthority()) - if popErr := writeBuffer.PopContext("threatAuthority"); popErr != nil { - return errors.Wrap(popErr, "Error popping for threatAuthority") - } - if _threatAuthorityErr != nil { - return errors.Wrap(_threatAuthorityErr, "Error serializing 'threatAuthority' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (threatAuthority) + if pushErr := writeBuffer.PushContext("threatAuthority"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for threatAuthority") + } + _threatAuthorityErr := writeBuffer.WriteSerializable(ctx, m.GetThreatAuthority()) + if popErr := writeBuffer.PopContext("threatAuthority"); popErr != nil { + return errors.Wrap(popErr, "Error popping for threatAuthority") + } + if _threatAuthorityErr != nil { + return errors.Wrap(_threatAuthorityErr, "Error serializing 'threatAuthority' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataThreatAuthority"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataThreatAuthority") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataThreatAuthority) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataThreatAuthority) isBACnetConstructedDataThreatAuthority() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataThreatAuthority) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataThreatLevel.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataThreatLevel.go index 5225fe5e166..f991fc3bff0 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataThreatLevel.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataThreatLevel.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataThreatLevel is the corresponding interface of BACnetConstructedDataThreatLevel type BACnetConstructedDataThreatLevel interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataThreatLevelExactly interface { // _BACnetConstructedDataThreatLevel is the data-structure of this message type _BACnetConstructedDataThreatLevel struct { *_BACnetConstructedData - ThreatLevel BACnetAccessThreatLevel + ThreatLevel BACnetAccessThreatLevel } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataThreatLevel) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataThreatLevel) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataThreatLevel) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_THREAT_LEVEL -} +func (m *_BACnetConstructedDataThreatLevel) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_THREAT_LEVEL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataThreatLevel) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataThreatLevel) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataThreatLevel) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataThreatLevel) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataThreatLevel) GetActualValue() BACnetAccessThreatL /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataThreatLevel factory function for _BACnetConstructedDataThreatLevel -func NewBACnetConstructedDataThreatLevel(threatLevel BACnetAccessThreatLevel, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataThreatLevel { +func NewBACnetConstructedDataThreatLevel( threatLevel BACnetAccessThreatLevel , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataThreatLevel { _result := &_BACnetConstructedDataThreatLevel{ - ThreatLevel: threatLevel, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ThreatLevel: threatLevel, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataThreatLevel(threatLevel BACnetAccessThreatLevel, op // Deprecated: use the interface for direct cast func CastBACnetConstructedDataThreatLevel(structType interface{}) BACnetConstructedDataThreatLevel { - if casted, ok := structType.(BACnetConstructedDataThreatLevel); ok { + if casted, ok := structType.(BACnetConstructedDataThreatLevel); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataThreatLevel); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataThreatLevel) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataThreatLevel) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataThreatLevelParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("threatLevel"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for threatLevel") } - _threatLevel, _threatLevelErr := BACnetAccessThreatLevelParseWithBuffer(ctx, readBuffer) +_threatLevel, _threatLevelErr := BACnetAccessThreatLevelParseWithBuffer(ctx, readBuffer) if _threatLevelErr != nil { return nil, errors.Wrap(_threatLevelErr, "Error parsing 'threatLevel' field of BACnetConstructedDataThreatLevel") } @@ -186,7 +188,7 @@ func BACnetConstructedDataThreatLevelParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataThreatLevel{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ThreatLevel: threatLevel, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataThreatLevel) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataThreatLevel") } - // Simple Field (threatLevel) - if pushErr := writeBuffer.PushContext("threatLevel"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for threatLevel") - } - _threatLevelErr := writeBuffer.WriteSerializable(ctx, m.GetThreatLevel()) - if popErr := writeBuffer.PopContext("threatLevel"); popErr != nil { - return errors.Wrap(popErr, "Error popping for threatLevel") - } - if _threatLevelErr != nil { - return errors.Wrap(_threatLevelErr, "Error serializing 'threatLevel' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (threatLevel) + if pushErr := writeBuffer.PushContext("threatLevel"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for threatLevel") + } + _threatLevelErr := writeBuffer.WriteSerializable(ctx, m.GetThreatLevel()) + if popErr := writeBuffer.PopContext("threatLevel"); popErr != nil { + return errors.Wrap(popErr, "Error popping for threatLevel") + } + if _threatLevelErr != nil { + return errors.Wrap(_threatLevelErr, "Error serializing 'threatLevel' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataThreatLevel"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataThreatLevel") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataThreatLevel) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataThreatLevel) isBACnetConstructedDataThreatLevel() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataThreatLevel) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeDelay.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeDelay.go index b4f8a866cb6..7fd394fd523 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeDelay.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeDelay.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataTimeDelay is the corresponding interface of BACnetConstructedDataTimeDelay type BACnetConstructedDataTimeDelay interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataTimeDelayExactly interface { // _BACnetConstructedDataTimeDelay is the data-structure of this message type _BACnetConstructedDataTimeDelay struct { *_BACnetConstructedData - TimeDelay BACnetApplicationTagUnsignedInteger + TimeDelay BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataTimeDelay) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataTimeDelay) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataTimeDelay) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_TIME_DELAY -} +func (m *_BACnetConstructedDataTimeDelay) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_TIME_DELAY} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataTimeDelay) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataTimeDelay) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataTimeDelay) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataTimeDelay) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataTimeDelay) GetActualValue() BACnetApplicationTagU /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataTimeDelay factory function for _BACnetConstructedDataTimeDelay -func NewBACnetConstructedDataTimeDelay(timeDelay BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataTimeDelay { +func NewBACnetConstructedDataTimeDelay( timeDelay BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataTimeDelay { _result := &_BACnetConstructedDataTimeDelay{ - TimeDelay: timeDelay, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + TimeDelay: timeDelay, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataTimeDelay(timeDelay BACnetApplicationTagUnsignedInt // Deprecated: use the interface for direct cast func CastBACnetConstructedDataTimeDelay(structType interface{}) BACnetConstructedDataTimeDelay { - if casted, ok := structType.(BACnetConstructedDataTimeDelay); ok { + if casted, ok := structType.(BACnetConstructedDataTimeDelay); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataTimeDelay); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataTimeDelay) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetConstructedDataTimeDelay) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataTimeDelayParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("timeDelay"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeDelay") } - _timeDelay, _timeDelayErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_timeDelay, _timeDelayErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _timeDelayErr != nil { return nil, errors.Wrap(_timeDelayErr, "Error parsing 'timeDelay' field of BACnetConstructedDataTimeDelay") } @@ -186,7 +188,7 @@ func BACnetConstructedDataTimeDelayParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_BACnetConstructedDataTimeDelay{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, TimeDelay: timeDelay, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataTimeDelay) SerializeWithWriteBuffer(ctx context.C return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataTimeDelay") } - // Simple Field (timeDelay) - if pushErr := writeBuffer.PushContext("timeDelay"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timeDelay") - } - _timeDelayErr := writeBuffer.WriteSerializable(ctx, m.GetTimeDelay()) - if popErr := writeBuffer.PopContext("timeDelay"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timeDelay") - } - if _timeDelayErr != nil { - return errors.Wrap(_timeDelayErr, "Error serializing 'timeDelay' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (timeDelay) + if pushErr := writeBuffer.PushContext("timeDelay"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timeDelay") + } + _timeDelayErr := writeBuffer.WriteSerializable(ctx, m.GetTimeDelay()) + if popErr := writeBuffer.PopContext("timeDelay"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timeDelay") + } + if _timeDelayErr != nil { + return errors.Wrap(_timeDelayErr, "Error serializing 'timeDelay' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataTimeDelay"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataTimeDelay") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataTimeDelay) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataTimeDelay) isBACnetConstructedDataTimeDelay() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataTimeDelay) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeDelayNormal.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeDelayNormal.go index 9d4198e3809..b80fc30e860 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeDelayNormal.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeDelayNormal.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataTimeDelayNormal is the corresponding interface of BACnetConstructedDataTimeDelayNormal type BACnetConstructedDataTimeDelayNormal interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataTimeDelayNormalExactly interface { // _BACnetConstructedDataTimeDelayNormal is the data-structure of this message type _BACnetConstructedDataTimeDelayNormal struct { *_BACnetConstructedData - TimeDelayNormal BACnetApplicationTagUnsignedInteger + TimeDelayNormal BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataTimeDelayNormal) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataTimeDelayNormal) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataTimeDelayNormal) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_TIME_DELAY_NORMAL -} +func (m *_BACnetConstructedDataTimeDelayNormal) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_TIME_DELAY_NORMAL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataTimeDelayNormal) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataTimeDelayNormal) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataTimeDelayNormal) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataTimeDelayNormal) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataTimeDelayNormal) GetActualValue() BACnetApplicati /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataTimeDelayNormal factory function for _BACnetConstructedDataTimeDelayNormal -func NewBACnetConstructedDataTimeDelayNormal(timeDelayNormal BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataTimeDelayNormal { +func NewBACnetConstructedDataTimeDelayNormal( timeDelayNormal BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataTimeDelayNormal { _result := &_BACnetConstructedDataTimeDelayNormal{ - TimeDelayNormal: timeDelayNormal, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + TimeDelayNormal: timeDelayNormal, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataTimeDelayNormal(timeDelayNormal BACnetApplicationTa // Deprecated: use the interface for direct cast func CastBACnetConstructedDataTimeDelayNormal(structType interface{}) BACnetConstructedDataTimeDelayNormal { - if casted, ok := structType.(BACnetConstructedDataTimeDelayNormal); ok { + if casted, ok := structType.(BACnetConstructedDataTimeDelayNormal); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataTimeDelayNormal); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataTimeDelayNormal) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetConstructedDataTimeDelayNormal) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataTimeDelayNormalParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("timeDelayNormal"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeDelayNormal") } - _timeDelayNormal, _timeDelayNormalErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_timeDelayNormal, _timeDelayNormalErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _timeDelayNormalErr != nil { return nil, errors.Wrap(_timeDelayNormalErr, "Error parsing 'timeDelayNormal' field of BACnetConstructedDataTimeDelayNormal") } @@ -186,7 +188,7 @@ func BACnetConstructedDataTimeDelayNormalParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetConstructedDataTimeDelayNormal{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, TimeDelayNormal: timeDelayNormal, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataTimeDelayNormal) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataTimeDelayNormal") } - // Simple Field (timeDelayNormal) - if pushErr := writeBuffer.PushContext("timeDelayNormal"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timeDelayNormal") - } - _timeDelayNormalErr := writeBuffer.WriteSerializable(ctx, m.GetTimeDelayNormal()) - if popErr := writeBuffer.PopContext("timeDelayNormal"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timeDelayNormal") - } - if _timeDelayNormalErr != nil { - return errors.Wrap(_timeDelayNormalErr, "Error serializing 'timeDelayNormal' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (timeDelayNormal) + if pushErr := writeBuffer.PushContext("timeDelayNormal"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timeDelayNormal") + } + _timeDelayNormalErr := writeBuffer.WriteSerializable(ctx, m.GetTimeDelayNormal()) + if popErr := writeBuffer.PopContext("timeDelayNormal"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timeDelayNormal") + } + if _timeDelayNormalErr != nil { + return errors.Wrap(_timeDelayNormalErr, "Error serializing 'timeDelayNormal' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataTimeDelayNormal"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataTimeDelayNormal") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataTimeDelayNormal) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataTimeDelayNormal) isBACnetConstructedDataTimeDelayNormal() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataTimeDelayNormal) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeOfActiveTimeReset.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeOfActiveTimeReset.go index c62f8657484..c6d47f6cee9 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeOfActiveTimeReset.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeOfActiveTimeReset.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataTimeOfActiveTimeReset is the corresponding interface of BACnetConstructedDataTimeOfActiveTimeReset type BACnetConstructedDataTimeOfActiveTimeReset interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataTimeOfActiveTimeResetExactly interface { // _BACnetConstructedDataTimeOfActiveTimeReset is the data-structure of this message type _BACnetConstructedDataTimeOfActiveTimeReset struct { *_BACnetConstructedData - TimeOfActiveTimeReset BACnetDateTime + TimeOfActiveTimeReset BACnetDateTime } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataTimeOfActiveTimeReset) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataTimeOfActiveTimeReset) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataTimeOfActiveTimeReset) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_TIME_OF_ACTIVE_TIME_RESET -} +func (m *_BACnetConstructedDataTimeOfActiveTimeReset) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_TIME_OF_ACTIVE_TIME_RESET} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataTimeOfActiveTimeReset) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataTimeOfActiveTimeReset) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataTimeOfActiveTimeReset) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataTimeOfActiveTimeReset) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataTimeOfActiveTimeReset) GetActualValue() BACnetDat /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataTimeOfActiveTimeReset factory function for _BACnetConstructedDataTimeOfActiveTimeReset -func NewBACnetConstructedDataTimeOfActiveTimeReset(timeOfActiveTimeReset BACnetDateTime, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataTimeOfActiveTimeReset { +func NewBACnetConstructedDataTimeOfActiveTimeReset( timeOfActiveTimeReset BACnetDateTime , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataTimeOfActiveTimeReset { _result := &_BACnetConstructedDataTimeOfActiveTimeReset{ - TimeOfActiveTimeReset: timeOfActiveTimeReset, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + TimeOfActiveTimeReset: timeOfActiveTimeReset, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataTimeOfActiveTimeReset(timeOfActiveTimeReset BACnetD // Deprecated: use the interface for direct cast func CastBACnetConstructedDataTimeOfActiveTimeReset(structType interface{}) BACnetConstructedDataTimeOfActiveTimeReset { - if casted, ok := structType.(BACnetConstructedDataTimeOfActiveTimeReset); ok { + if casted, ok := structType.(BACnetConstructedDataTimeOfActiveTimeReset); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataTimeOfActiveTimeReset); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataTimeOfActiveTimeReset) GetLengthInBits(ctx contex return lengthInBits } + func (m *_BACnetConstructedDataTimeOfActiveTimeReset) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataTimeOfActiveTimeResetParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("timeOfActiveTimeReset"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeOfActiveTimeReset") } - _timeOfActiveTimeReset, _timeOfActiveTimeResetErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) +_timeOfActiveTimeReset, _timeOfActiveTimeResetErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) if _timeOfActiveTimeResetErr != nil { return nil, errors.Wrap(_timeOfActiveTimeResetErr, "Error parsing 'timeOfActiveTimeReset' field of BACnetConstructedDataTimeOfActiveTimeReset") } @@ -186,7 +188,7 @@ func BACnetConstructedDataTimeOfActiveTimeResetParseWithBuffer(ctx context.Conte // Create a partially initialized instance _child := &_BACnetConstructedDataTimeOfActiveTimeReset{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, TimeOfActiveTimeReset: timeOfActiveTimeReset, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataTimeOfActiveTimeReset) SerializeWithWriteBuffer(c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataTimeOfActiveTimeReset") } - // Simple Field (timeOfActiveTimeReset) - if pushErr := writeBuffer.PushContext("timeOfActiveTimeReset"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timeOfActiveTimeReset") - } - _timeOfActiveTimeResetErr := writeBuffer.WriteSerializable(ctx, m.GetTimeOfActiveTimeReset()) - if popErr := writeBuffer.PopContext("timeOfActiveTimeReset"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timeOfActiveTimeReset") - } - if _timeOfActiveTimeResetErr != nil { - return errors.Wrap(_timeOfActiveTimeResetErr, "Error serializing 'timeOfActiveTimeReset' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (timeOfActiveTimeReset) + if pushErr := writeBuffer.PushContext("timeOfActiveTimeReset"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timeOfActiveTimeReset") + } + _timeOfActiveTimeResetErr := writeBuffer.WriteSerializable(ctx, m.GetTimeOfActiveTimeReset()) + if popErr := writeBuffer.PopContext("timeOfActiveTimeReset"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timeOfActiveTimeReset") + } + if _timeOfActiveTimeResetErr != nil { + return errors.Wrap(_timeOfActiveTimeResetErr, "Error serializing 'timeOfActiveTimeReset' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataTimeOfActiveTimeReset"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataTimeOfActiveTimeReset") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataTimeOfActiveTimeReset) SerializeWithWriteBuffer(c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataTimeOfActiveTimeReset) isBACnetConstructedDataTimeOfActiveTimeReset() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataTimeOfActiveTimeReset) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeOfDeviceRestart.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeOfDeviceRestart.go index 06d9503d710..7a07b67d17e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeOfDeviceRestart.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeOfDeviceRestart.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataTimeOfDeviceRestart is the corresponding interface of BACnetConstructedDataTimeOfDeviceRestart type BACnetConstructedDataTimeOfDeviceRestart interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataTimeOfDeviceRestartExactly interface { // _BACnetConstructedDataTimeOfDeviceRestart is the data-structure of this message type _BACnetConstructedDataTimeOfDeviceRestart struct { *_BACnetConstructedData - TimeOfDeviceRestart BACnetTimeStamp + TimeOfDeviceRestart BACnetTimeStamp } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataTimeOfDeviceRestart) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataTimeOfDeviceRestart) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataTimeOfDeviceRestart) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_TIME_OF_DEVICE_RESTART -} +func (m *_BACnetConstructedDataTimeOfDeviceRestart) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_TIME_OF_DEVICE_RESTART} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataTimeOfDeviceRestart) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataTimeOfDeviceRestart) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataTimeOfDeviceRestart) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataTimeOfDeviceRestart) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataTimeOfDeviceRestart) GetActualValue() BACnetTimeS /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataTimeOfDeviceRestart factory function for _BACnetConstructedDataTimeOfDeviceRestart -func NewBACnetConstructedDataTimeOfDeviceRestart(timeOfDeviceRestart BACnetTimeStamp, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataTimeOfDeviceRestart { +func NewBACnetConstructedDataTimeOfDeviceRestart( timeOfDeviceRestart BACnetTimeStamp , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataTimeOfDeviceRestart { _result := &_BACnetConstructedDataTimeOfDeviceRestart{ - TimeOfDeviceRestart: timeOfDeviceRestart, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + TimeOfDeviceRestart: timeOfDeviceRestart, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataTimeOfDeviceRestart(timeOfDeviceRestart BACnetTimeS // Deprecated: use the interface for direct cast func CastBACnetConstructedDataTimeOfDeviceRestart(structType interface{}) BACnetConstructedDataTimeOfDeviceRestart { - if casted, ok := structType.(BACnetConstructedDataTimeOfDeviceRestart); ok { + if casted, ok := structType.(BACnetConstructedDataTimeOfDeviceRestart); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataTimeOfDeviceRestart); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataTimeOfDeviceRestart) GetLengthInBits(ctx context. return lengthInBits } + func (m *_BACnetConstructedDataTimeOfDeviceRestart) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataTimeOfDeviceRestartParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("timeOfDeviceRestart"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeOfDeviceRestart") } - _timeOfDeviceRestart, _timeOfDeviceRestartErr := BACnetTimeStampParseWithBuffer(ctx, readBuffer) +_timeOfDeviceRestart, _timeOfDeviceRestartErr := BACnetTimeStampParseWithBuffer(ctx, readBuffer) if _timeOfDeviceRestartErr != nil { return nil, errors.Wrap(_timeOfDeviceRestartErr, "Error parsing 'timeOfDeviceRestart' field of BACnetConstructedDataTimeOfDeviceRestart") } @@ -186,7 +188,7 @@ func BACnetConstructedDataTimeOfDeviceRestartParseWithBuffer(ctx context.Context // Create a partially initialized instance _child := &_BACnetConstructedDataTimeOfDeviceRestart{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, TimeOfDeviceRestart: timeOfDeviceRestart, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataTimeOfDeviceRestart) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataTimeOfDeviceRestart") } - // Simple Field (timeOfDeviceRestart) - if pushErr := writeBuffer.PushContext("timeOfDeviceRestart"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timeOfDeviceRestart") - } - _timeOfDeviceRestartErr := writeBuffer.WriteSerializable(ctx, m.GetTimeOfDeviceRestart()) - if popErr := writeBuffer.PopContext("timeOfDeviceRestart"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timeOfDeviceRestart") - } - if _timeOfDeviceRestartErr != nil { - return errors.Wrap(_timeOfDeviceRestartErr, "Error serializing 'timeOfDeviceRestart' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (timeOfDeviceRestart) + if pushErr := writeBuffer.PushContext("timeOfDeviceRestart"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timeOfDeviceRestart") + } + _timeOfDeviceRestartErr := writeBuffer.WriteSerializable(ctx, m.GetTimeOfDeviceRestart()) + if popErr := writeBuffer.PopContext("timeOfDeviceRestart"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timeOfDeviceRestart") + } + if _timeOfDeviceRestartErr != nil { + return errors.Wrap(_timeOfDeviceRestartErr, "Error serializing 'timeOfDeviceRestart' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataTimeOfDeviceRestart"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataTimeOfDeviceRestart") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataTimeOfDeviceRestart) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataTimeOfDeviceRestart) isBACnetConstructedDataTimeOfDeviceRestart() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataTimeOfDeviceRestart) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeOfStateCountReset.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeOfStateCountReset.go index bb780307855..eb478d89c09 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeOfStateCountReset.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeOfStateCountReset.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataTimeOfStateCountReset is the corresponding interface of BACnetConstructedDataTimeOfStateCountReset type BACnetConstructedDataTimeOfStateCountReset interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataTimeOfStateCountResetExactly interface { // _BACnetConstructedDataTimeOfStateCountReset is the data-structure of this message type _BACnetConstructedDataTimeOfStateCountReset struct { *_BACnetConstructedData - TimeOfStateCountReset BACnetDateTime + TimeOfStateCountReset BACnetDateTime } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataTimeOfStateCountReset) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataTimeOfStateCountReset) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataTimeOfStateCountReset) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_TIME_OF_STATE_COUNT_RESET -} +func (m *_BACnetConstructedDataTimeOfStateCountReset) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_TIME_OF_STATE_COUNT_RESET} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataTimeOfStateCountReset) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataTimeOfStateCountReset) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataTimeOfStateCountReset) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataTimeOfStateCountReset) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataTimeOfStateCountReset) GetActualValue() BACnetDat /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataTimeOfStateCountReset factory function for _BACnetConstructedDataTimeOfStateCountReset -func NewBACnetConstructedDataTimeOfStateCountReset(timeOfStateCountReset BACnetDateTime, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataTimeOfStateCountReset { +func NewBACnetConstructedDataTimeOfStateCountReset( timeOfStateCountReset BACnetDateTime , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataTimeOfStateCountReset { _result := &_BACnetConstructedDataTimeOfStateCountReset{ - TimeOfStateCountReset: timeOfStateCountReset, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + TimeOfStateCountReset: timeOfStateCountReset, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataTimeOfStateCountReset(timeOfStateCountReset BACnetD // Deprecated: use the interface for direct cast func CastBACnetConstructedDataTimeOfStateCountReset(structType interface{}) BACnetConstructedDataTimeOfStateCountReset { - if casted, ok := structType.(BACnetConstructedDataTimeOfStateCountReset); ok { + if casted, ok := structType.(BACnetConstructedDataTimeOfStateCountReset); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataTimeOfStateCountReset); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataTimeOfStateCountReset) GetLengthInBits(ctx contex return lengthInBits } + func (m *_BACnetConstructedDataTimeOfStateCountReset) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataTimeOfStateCountResetParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("timeOfStateCountReset"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeOfStateCountReset") } - _timeOfStateCountReset, _timeOfStateCountResetErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) +_timeOfStateCountReset, _timeOfStateCountResetErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) if _timeOfStateCountResetErr != nil { return nil, errors.Wrap(_timeOfStateCountResetErr, "Error parsing 'timeOfStateCountReset' field of BACnetConstructedDataTimeOfStateCountReset") } @@ -186,7 +188,7 @@ func BACnetConstructedDataTimeOfStateCountResetParseWithBuffer(ctx context.Conte // Create a partially initialized instance _child := &_BACnetConstructedDataTimeOfStateCountReset{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, TimeOfStateCountReset: timeOfStateCountReset, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataTimeOfStateCountReset) SerializeWithWriteBuffer(c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataTimeOfStateCountReset") } - // Simple Field (timeOfStateCountReset) - if pushErr := writeBuffer.PushContext("timeOfStateCountReset"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timeOfStateCountReset") - } - _timeOfStateCountResetErr := writeBuffer.WriteSerializable(ctx, m.GetTimeOfStateCountReset()) - if popErr := writeBuffer.PopContext("timeOfStateCountReset"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timeOfStateCountReset") - } - if _timeOfStateCountResetErr != nil { - return errors.Wrap(_timeOfStateCountResetErr, "Error serializing 'timeOfStateCountReset' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (timeOfStateCountReset) + if pushErr := writeBuffer.PushContext("timeOfStateCountReset"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timeOfStateCountReset") + } + _timeOfStateCountResetErr := writeBuffer.WriteSerializable(ctx, m.GetTimeOfStateCountReset()) + if popErr := writeBuffer.PopContext("timeOfStateCountReset"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timeOfStateCountReset") + } + if _timeOfStateCountResetErr != nil { + return errors.Wrap(_timeOfStateCountResetErr, "Error serializing 'timeOfStateCountReset' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataTimeOfStateCountReset"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataTimeOfStateCountReset") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataTimeOfStateCountReset) SerializeWithWriteBuffer(c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataTimeOfStateCountReset) isBACnetConstructedDataTimeOfStateCountReset() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataTimeOfStateCountReset) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeOfStrikeCountReset.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeOfStrikeCountReset.go index fbe9769bce7..7e2c5c0551d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeOfStrikeCountReset.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeOfStrikeCountReset.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataTimeOfStrikeCountReset is the corresponding interface of BACnetConstructedDataTimeOfStrikeCountReset type BACnetConstructedDataTimeOfStrikeCountReset interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataTimeOfStrikeCountResetExactly interface { // _BACnetConstructedDataTimeOfStrikeCountReset is the data-structure of this message type _BACnetConstructedDataTimeOfStrikeCountReset struct { *_BACnetConstructedData - TimeOfStrikeCountReset BACnetDateTime + TimeOfStrikeCountReset BACnetDateTime } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataTimeOfStrikeCountReset) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataTimeOfStrikeCountReset) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataTimeOfStrikeCountReset) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_TIME_OF_STRIKE_COUNT_RESET -} +func (m *_BACnetConstructedDataTimeOfStrikeCountReset) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_TIME_OF_STRIKE_COUNT_RESET} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataTimeOfStrikeCountReset) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataTimeOfStrikeCountReset) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataTimeOfStrikeCountReset) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataTimeOfStrikeCountReset) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataTimeOfStrikeCountReset) GetActualValue() BACnetDa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataTimeOfStrikeCountReset factory function for _BACnetConstructedDataTimeOfStrikeCountReset -func NewBACnetConstructedDataTimeOfStrikeCountReset(timeOfStrikeCountReset BACnetDateTime, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataTimeOfStrikeCountReset { +func NewBACnetConstructedDataTimeOfStrikeCountReset( timeOfStrikeCountReset BACnetDateTime , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataTimeOfStrikeCountReset { _result := &_BACnetConstructedDataTimeOfStrikeCountReset{ TimeOfStrikeCountReset: timeOfStrikeCountReset, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataTimeOfStrikeCountReset(timeOfStrikeCountReset BACne // Deprecated: use the interface for direct cast func CastBACnetConstructedDataTimeOfStrikeCountReset(structType interface{}) BACnetConstructedDataTimeOfStrikeCountReset { - if casted, ok := structType.(BACnetConstructedDataTimeOfStrikeCountReset); ok { + if casted, ok := structType.(BACnetConstructedDataTimeOfStrikeCountReset); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataTimeOfStrikeCountReset); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataTimeOfStrikeCountReset) GetLengthInBits(ctx conte return lengthInBits } + func (m *_BACnetConstructedDataTimeOfStrikeCountReset) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataTimeOfStrikeCountResetParseWithBuffer(ctx context.Cont if pullErr := readBuffer.PullContext("timeOfStrikeCountReset"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeOfStrikeCountReset") } - _timeOfStrikeCountReset, _timeOfStrikeCountResetErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) +_timeOfStrikeCountReset, _timeOfStrikeCountResetErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) if _timeOfStrikeCountResetErr != nil { return nil, errors.Wrap(_timeOfStrikeCountResetErr, "Error parsing 'timeOfStrikeCountReset' field of BACnetConstructedDataTimeOfStrikeCountReset") } @@ -186,7 +188,7 @@ func BACnetConstructedDataTimeOfStrikeCountResetParseWithBuffer(ctx context.Cont // Create a partially initialized instance _child := &_BACnetConstructedDataTimeOfStrikeCountReset{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, TimeOfStrikeCountReset: timeOfStrikeCountReset, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataTimeOfStrikeCountReset) SerializeWithWriteBuffer( return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataTimeOfStrikeCountReset") } - // Simple Field (timeOfStrikeCountReset) - if pushErr := writeBuffer.PushContext("timeOfStrikeCountReset"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timeOfStrikeCountReset") - } - _timeOfStrikeCountResetErr := writeBuffer.WriteSerializable(ctx, m.GetTimeOfStrikeCountReset()) - if popErr := writeBuffer.PopContext("timeOfStrikeCountReset"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timeOfStrikeCountReset") - } - if _timeOfStrikeCountResetErr != nil { - return errors.Wrap(_timeOfStrikeCountResetErr, "Error serializing 'timeOfStrikeCountReset' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (timeOfStrikeCountReset) + if pushErr := writeBuffer.PushContext("timeOfStrikeCountReset"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timeOfStrikeCountReset") + } + _timeOfStrikeCountResetErr := writeBuffer.WriteSerializable(ctx, m.GetTimeOfStrikeCountReset()) + if popErr := writeBuffer.PopContext("timeOfStrikeCountReset"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timeOfStrikeCountReset") + } + if _timeOfStrikeCountResetErr != nil { + return errors.Wrap(_timeOfStrikeCountResetErr, "Error serializing 'timeOfStrikeCountReset' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataTimeOfStrikeCountReset"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataTimeOfStrikeCountReset") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataTimeOfStrikeCountReset) SerializeWithWriteBuffer( return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataTimeOfStrikeCountReset) isBACnetConstructedDataTimeOfStrikeCountReset() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataTimeOfStrikeCountReset) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimePatternValuePresentValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimePatternValuePresentValue.go index 10e5ff599e2..3fc12ecbafd 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimePatternValuePresentValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimePatternValuePresentValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataTimePatternValuePresentValue is the corresponding interface of BACnetConstructedDataTimePatternValuePresentValue type BACnetConstructedDataTimePatternValuePresentValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataTimePatternValuePresentValueExactly interface { // _BACnetConstructedDataTimePatternValuePresentValue is the data-structure of this message type _BACnetConstructedDataTimePatternValuePresentValue struct { *_BACnetConstructedData - PresentValue BACnetApplicationTagTime + PresentValue BACnetApplicationTagTime } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataTimePatternValuePresentValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_TIMEPATTERN_VALUE -} +func (m *_BACnetConstructedDataTimePatternValuePresentValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_TIMEPATTERN_VALUE} -func (m *_BACnetConstructedDataTimePatternValuePresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PRESENT_VALUE -} +func (m *_BACnetConstructedDataTimePatternValuePresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PRESENT_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataTimePatternValuePresentValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataTimePatternValuePresentValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataTimePatternValuePresentValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataTimePatternValuePresentValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataTimePatternValuePresentValue) GetActualValue() BA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataTimePatternValuePresentValue factory function for _BACnetConstructedDataTimePatternValuePresentValue -func NewBACnetConstructedDataTimePatternValuePresentValue(presentValue BACnetApplicationTagTime, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataTimePatternValuePresentValue { +func NewBACnetConstructedDataTimePatternValuePresentValue( presentValue BACnetApplicationTagTime , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataTimePatternValuePresentValue { _result := &_BACnetConstructedDataTimePatternValuePresentValue{ - PresentValue: presentValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PresentValue: presentValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataTimePatternValuePresentValue(presentValue BACnetApp // Deprecated: use the interface for direct cast func CastBACnetConstructedDataTimePatternValuePresentValue(structType interface{}) BACnetConstructedDataTimePatternValuePresentValue { - if casted, ok := structType.(BACnetConstructedDataTimePatternValuePresentValue); ok { + if casted, ok := structType.(BACnetConstructedDataTimePatternValuePresentValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataTimePatternValuePresentValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataTimePatternValuePresentValue) GetLengthInBits(ctx return lengthInBits } + func (m *_BACnetConstructedDataTimePatternValuePresentValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataTimePatternValuePresentValueParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("presentValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for presentValue") } - _presentValue, _presentValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_presentValue, _presentValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _presentValueErr != nil { return nil, errors.Wrap(_presentValueErr, "Error parsing 'presentValue' field of BACnetConstructedDataTimePatternValuePresentValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataTimePatternValuePresentValueParseWithBuffer(ctx contex // Create a partially initialized instance _child := &_BACnetConstructedDataTimePatternValuePresentValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PresentValue: presentValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataTimePatternValuePresentValue) SerializeWithWriteB return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataTimePatternValuePresentValue") } - // Simple Field (presentValue) - if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for presentValue") - } - _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) - if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for presentValue") - } - if _presentValueErr != nil { - return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (presentValue) + if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for presentValue") + } + _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) + if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for presentValue") + } + if _presentValueErr != nil { + return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataTimePatternValuePresentValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataTimePatternValuePresentValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataTimePatternValuePresentValue) SerializeWithWriteB return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataTimePatternValuePresentValue) isBACnetConstructedDataTimePatternValuePresentValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataTimePatternValuePresentValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimePatternValueRelinquishDefault.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimePatternValueRelinquishDefault.go index 803d098da13..886389ed5d1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimePatternValueRelinquishDefault.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimePatternValueRelinquishDefault.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataTimePatternValueRelinquishDefault is the corresponding interface of BACnetConstructedDataTimePatternValueRelinquishDefault type BACnetConstructedDataTimePatternValueRelinquishDefault interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataTimePatternValueRelinquishDefaultExactly interface { // _BACnetConstructedDataTimePatternValueRelinquishDefault is the data-structure of this message type _BACnetConstructedDataTimePatternValueRelinquishDefault struct { *_BACnetConstructedData - RelinquishDefault BACnetApplicationTagTime + RelinquishDefault BACnetApplicationTagTime } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataTimePatternValueRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_TIMEPATTERN_VALUE -} +func (m *_BACnetConstructedDataTimePatternValueRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_TIMEPATTERN_VALUE} -func (m *_BACnetConstructedDataTimePatternValueRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_RELINQUISH_DEFAULT -} +func (m *_BACnetConstructedDataTimePatternValueRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_RELINQUISH_DEFAULT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataTimePatternValueRelinquishDefault) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataTimePatternValueRelinquishDefault) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataTimePatternValueRelinquishDefault) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataTimePatternValueRelinquishDefault) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataTimePatternValueRelinquishDefault) GetActualValue /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataTimePatternValueRelinquishDefault factory function for _BACnetConstructedDataTimePatternValueRelinquishDefault -func NewBACnetConstructedDataTimePatternValueRelinquishDefault(relinquishDefault BACnetApplicationTagTime, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataTimePatternValueRelinquishDefault { +func NewBACnetConstructedDataTimePatternValueRelinquishDefault( relinquishDefault BACnetApplicationTagTime , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataTimePatternValueRelinquishDefault { _result := &_BACnetConstructedDataTimePatternValueRelinquishDefault{ - RelinquishDefault: relinquishDefault, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + RelinquishDefault: relinquishDefault, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataTimePatternValueRelinquishDefault(relinquishDefault // Deprecated: use the interface for direct cast func CastBACnetConstructedDataTimePatternValueRelinquishDefault(structType interface{}) BACnetConstructedDataTimePatternValueRelinquishDefault { - if casted, ok := structType.(BACnetConstructedDataTimePatternValueRelinquishDefault); ok { + if casted, ok := structType.(BACnetConstructedDataTimePatternValueRelinquishDefault); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataTimePatternValueRelinquishDefault); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataTimePatternValueRelinquishDefault) GetLengthInBit return lengthInBits } + func (m *_BACnetConstructedDataTimePatternValueRelinquishDefault) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataTimePatternValueRelinquishDefaultParseWithBuffer(ctx c if pullErr := readBuffer.PullContext("relinquishDefault"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for relinquishDefault") } - _relinquishDefault, _relinquishDefaultErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_relinquishDefault, _relinquishDefaultErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _relinquishDefaultErr != nil { return nil, errors.Wrap(_relinquishDefaultErr, "Error parsing 'relinquishDefault' field of BACnetConstructedDataTimePatternValueRelinquishDefault") } @@ -186,7 +188,7 @@ func BACnetConstructedDataTimePatternValueRelinquishDefaultParseWithBuffer(ctx c // Create a partially initialized instance _child := &_BACnetConstructedDataTimePatternValueRelinquishDefault{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, RelinquishDefault: relinquishDefault, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataTimePatternValueRelinquishDefault) SerializeWithW return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataTimePatternValueRelinquishDefault") } - // Simple Field (relinquishDefault) - if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for relinquishDefault") - } - _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) - if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { - return errors.Wrap(popErr, "Error popping for relinquishDefault") - } - if _relinquishDefaultErr != nil { - return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (relinquishDefault) + if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for relinquishDefault") + } + _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) + if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { + return errors.Wrap(popErr, "Error popping for relinquishDefault") + } + if _relinquishDefaultErr != nil { + return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataTimePatternValueRelinquishDefault"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataTimePatternValueRelinquishDefault") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataTimePatternValueRelinquishDefault) SerializeWithW return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataTimePatternValueRelinquishDefault) isBACnetConstructedDataTimePatternValueRelinquishDefault() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataTimePatternValueRelinquishDefault) String() strin } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeSynchronizationInterval.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeSynchronizationInterval.go index 305a1791072..48c83346302 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeSynchronizationInterval.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeSynchronizationInterval.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataTimeSynchronizationInterval is the corresponding interface of BACnetConstructedDataTimeSynchronizationInterval type BACnetConstructedDataTimeSynchronizationInterval interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataTimeSynchronizationIntervalExactly interface { // _BACnetConstructedDataTimeSynchronizationInterval is the data-structure of this message type _BACnetConstructedDataTimeSynchronizationInterval struct { *_BACnetConstructedData - TimeSynchronization BACnetApplicationTagUnsignedInteger + TimeSynchronization BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataTimeSynchronizationInterval) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataTimeSynchronizationInterval) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataTimeSynchronizationInterval) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_TIME_SYNCHRONIZATION_INTERVAL -} +func (m *_BACnetConstructedDataTimeSynchronizationInterval) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_TIME_SYNCHRONIZATION_INTERVAL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataTimeSynchronizationInterval) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataTimeSynchronizationInterval) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataTimeSynchronizationInterval) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataTimeSynchronizationInterval) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataTimeSynchronizationInterval) GetActualValue() BAC /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataTimeSynchronizationInterval factory function for _BACnetConstructedDataTimeSynchronizationInterval -func NewBACnetConstructedDataTimeSynchronizationInterval(timeSynchronization BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataTimeSynchronizationInterval { +func NewBACnetConstructedDataTimeSynchronizationInterval( timeSynchronization BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataTimeSynchronizationInterval { _result := &_BACnetConstructedDataTimeSynchronizationInterval{ - TimeSynchronization: timeSynchronization, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + TimeSynchronization: timeSynchronization, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataTimeSynchronizationInterval(timeSynchronization BAC // Deprecated: use the interface for direct cast func CastBACnetConstructedDataTimeSynchronizationInterval(structType interface{}) BACnetConstructedDataTimeSynchronizationInterval { - if casted, ok := structType.(BACnetConstructedDataTimeSynchronizationInterval); ok { + if casted, ok := structType.(BACnetConstructedDataTimeSynchronizationInterval); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataTimeSynchronizationInterval); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataTimeSynchronizationInterval) GetLengthInBits(ctx return lengthInBits } + func (m *_BACnetConstructedDataTimeSynchronizationInterval) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataTimeSynchronizationIntervalParseWithBuffer(ctx context if pullErr := readBuffer.PullContext("timeSynchronization"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeSynchronization") } - _timeSynchronization, _timeSynchronizationErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_timeSynchronization, _timeSynchronizationErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _timeSynchronizationErr != nil { return nil, errors.Wrap(_timeSynchronizationErr, "Error parsing 'timeSynchronization' field of BACnetConstructedDataTimeSynchronizationInterval") } @@ -186,7 +188,7 @@ func BACnetConstructedDataTimeSynchronizationIntervalParseWithBuffer(ctx context // Create a partially initialized instance _child := &_BACnetConstructedDataTimeSynchronizationInterval{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, TimeSynchronization: timeSynchronization, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataTimeSynchronizationInterval) SerializeWithWriteBu return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataTimeSynchronizationInterval") } - // Simple Field (timeSynchronization) - if pushErr := writeBuffer.PushContext("timeSynchronization"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timeSynchronization") - } - _timeSynchronizationErr := writeBuffer.WriteSerializable(ctx, m.GetTimeSynchronization()) - if popErr := writeBuffer.PopContext("timeSynchronization"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timeSynchronization") - } - if _timeSynchronizationErr != nil { - return errors.Wrap(_timeSynchronizationErr, "Error serializing 'timeSynchronization' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (timeSynchronization) + if pushErr := writeBuffer.PushContext("timeSynchronization"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timeSynchronization") + } + _timeSynchronizationErr := writeBuffer.WriteSerializable(ctx, m.GetTimeSynchronization()) + if popErr := writeBuffer.PopContext("timeSynchronization"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timeSynchronization") + } + if _timeSynchronizationErr != nil { + return errors.Wrap(_timeSynchronizationErr, "Error serializing 'timeSynchronization' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataTimeSynchronizationInterval"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataTimeSynchronizationInterval") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataTimeSynchronizationInterval) SerializeWithWriteBu return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataTimeSynchronizationInterval) isBACnetConstructedDataTimeSynchronizationInterval() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataTimeSynchronizationInterval) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeSynchronizationRecipients.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeSynchronizationRecipients.go index 0f8902ff385..a3a240875e4 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeSynchronizationRecipients.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeSynchronizationRecipients.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataTimeSynchronizationRecipients is the corresponding interface of BACnetConstructedDataTimeSynchronizationRecipients type BACnetConstructedDataTimeSynchronizationRecipients interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataTimeSynchronizationRecipientsExactly interface { // _BACnetConstructedDataTimeSynchronizationRecipients is the data-structure of this message type _BACnetConstructedDataTimeSynchronizationRecipients struct { *_BACnetConstructedData - TimeSynchronizationRecipients []BACnetRecipient + TimeSynchronizationRecipients []BACnetRecipient } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataTimeSynchronizationRecipients) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataTimeSynchronizationRecipients) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataTimeSynchronizationRecipients) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_TIME_SYNCHRONIZATION_RECIPIENTS -} +func (m *_BACnetConstructedDataTimeSynchronizationRecipients) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_TIME_SYNCHRONIZATION_RECIPIENTS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataTimeSynchronizationRecipients) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataTimeSynchronizationRecipients) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataTimeSynchronizationRecipients) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataTimeSynchronizationRecipients) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataTimeSynchronizationRecipients) GetTimeSynchroniza /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataTimeSynchronizationRecipients factory function for _BACnetConstructedDataTimeSynchronizationRecipients -func NewBACnetConstructedDataTimeSynchronizationRecipients(timeSynchronizationRecipients []BACnetRecipient, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataTimeSynchronizationRecipients { +func NewBACnetConstructedDataTimeSynchronizationRecipients( timeSynchronizationRecipients []BACnetRecipient , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataTimeSynchronizationRecipients { _result := &_BACnetConstructedDataTimeSynchronizationRecipients{ TimeSynchronizationRecipients: timeSynchronizationRecipients, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataTimeSynchronizationRecipients(timeSynchronizationRe // Deprecated: use the interface for direct cast func CastBACnetConstructedDataTimeSynchronizationRecipients(structType interface{}) BACnetConstructedDataTimeSynchronizationRecipients { - if casted, ok := structType.(BACnetConstructedDataTimeSynchronizationRecipients); ok { + if casted, ok := structType.(BACnetConstructedDataTimeSynchronizationRecipients); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataTimeSynchronizationRecipients); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataTimeSynchronizationRecipients) GetLengthInBits(ct return lengthInBits } + func (m *_BACnetConstructedDataTimeSynchronizationRecipients) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataTimeSynchronizationRecipientsParseWithBuffer(ctx conte // Terminated array var timeSynchronizationRecipients []BACnetRecipient { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetRecipientParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetRecipientParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'timeSynchronizationRecipients' field of BACnetConstructedDataTimeSynchronizationRecipients") } @@ -173,7 +175,7 @@ func BACnetConstructedDataTimeSynchronizationRecipientsParseWithBuffer(ctx conte // Create a partially initialized instance _child := &_BACnetConstructedDataTimeSynchronizationRecipients{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, TimeSynchronizationRecipients: timeSynchronizationRecipients, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataTimeSynchronizationRecipients) SerializeWithWrite return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataTimeSynchronizationRecipients") } - // Array Field (timeSynchronizationRecipients) - if pushErr := writeBuffer.PushContext("timeSynchronizationRecipients", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timeSynchronizationRecipients") - } - for _curItem, _element := range m.GetTimeSynchronizationRecipients() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetTimeSynchronizationRecipients()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'timeSynchronizationRecipients' field") - } - } - if popErr := writeBuffer.PopContext("timeSynchronizationRecipients", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for timeSynchronizationRecipients") + // Array Field (timeSynchronizationRecipients) + if pushErr := writeBuffer.PushContext("timeSynchronizationRecipients", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timeSynchronizationRecipients") + } + for _curItem, _element := range m.GetTimeSynchronizationRecipients() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetTimeSynchronizationRecipients()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'timeSynchronizationRecipients' field") } + } + if popErr := writeBuffer.PopContext("timeSynchronizationRecipients", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for timeSynchronizationRecipients") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataTimeSynchronizationRecipients"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataTimeSynchronizationRecipients") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataTimeSynchronizationRecipients) SerializeWithWrite return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataTimeSynchronizationRecipients) isBACnetConstructedDataTimeSynchronizationRecipients() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataTimeSynchronizationRecipients) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeValueAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeValueAll.go index d7c3ba8dd47..861b3a5eb0a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeValueAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeValueAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataTimeValueAll is the corresponding interface of BACnetConstructedDataTimeValueAll type BACnetConstructedDataTimeValueAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataTimeValueAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataTimeValueAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_TIME_VALUE -} +func (m *_BACnetConstructedDataTimeValueAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_TIME_VALUE} -func (m *_BACnetConstructedDataTimeValueAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataTimeValueAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataTimeValueAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataTimeValueAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataTimeValueAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataTimeValueAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataTimeValueAll factory function for _BACnetConstructedDataTimeValueAll -func NewBACnetConstructedDataTimeValueAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataTimeValueAll { +func NewBACnetConstructedDataTimeValueAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataTimeValueAll { _result := &_BACnetConstructedDataTimeValueAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataTimeValueAll(openingTag BACnetOpeningTag, peekedTag // Deprecated: use the interface for direct cast func CastBACnetConstructedDataTimeValueAll(structType interface{}) BACnetConstructedDataTimeValueAll { - if casted, ok := structType.(BACnetConstructedDataTimeValueAll); ok { + if casted, ok := structType.(BACnetConstructedDataTimeValueAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataTimeValueAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataTimeValueAll) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetConstructedDataTimeValueAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataTimeValueAllParseWithBuffer(ctx context.Context, readB _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataTimeValueAllParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetConstructedDataTimeValueAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataTimeValueAll) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataTimeValueAll) isBACnetConstructedDataTimeValueAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataTimeValueAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeValuePresentValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeValuePresentValue.go index f23587e4911..d6ce46392d5 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeValuePresentValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeValuePresentValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataTimeValuePresentValue is the corresponding interface of BACnetConstructedDataTimeValuePresentValue type BACnetConstructedDataTimeValuePresentValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataTimeValuePresentValueExactly interface { // _BACnetConstructedDataTimeValuePresentValue is the data-structure of this message type _BACnetConstructedDataTimeValuePresentValue struct { *_BACnetConstructedData - PresentValue BACnetApplicationTagTime + PresentValue BACnetApplicationTagTime } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataTimeValuePresentValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_TIME_VALUE -} +func (m *_BACnetConstructedDataTimeValuePresentValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_TIME_VALUE} -func (m *_BACnetConstructedDataTimeValuePresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_PRESENT_VALUE -} +func (m *_BACnetConstructedDataTimeValuePresentValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_PRESENT_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataTimeValuePresentValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataTimeValuePresentValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataTimeValuePresentValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataTimeValuePresentValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataTimeValuePresentValue) GetActualValue() BACnetApp /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataTimeValuePresentValue factory function for _BACnetConstructedDataTimeValuePresentValue -func NewBACnetConstructedDataTimeValuePresentValue(presentValue BACnetApplicationTagTime, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataTimeValuePresentValue { +func NewBACnetConstructedDataTimeValuePresentValue( presentValue BACnetApplicationTagTime , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataTimeValuePresentValue { _result := &_BACnetConstructedDataTimeValuePresentValue{ - PresentValue: presentValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + PresentValue: presentValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataTimeValuePresentValue(presentValue BACnetApplicatio // Deprecated: use the interface for direct cast func CastBACnetConstructedDataTimeValuePresentValue(structType interface{}) BACnetConstructedDataTimeValuePresentValue { - if casted, ok := structType.(BACnetConstructedDataTimeValuePresentValue); ok { + if casted, ok := structType.(BACnetConstructedDataTimeValuePresentValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataTimeValuePresentValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataTimeValuePresentValue) GetLengthInBits(ctx contex return lengthInBits } + func (m *_BACnetConstructedDataTimeValuePresentValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataTimeValuePresentValueParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("presentValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for presentValue") } - _presentValue, _presentValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_presentValue, _presentValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _presentValueErr != nil { return nil, errors.Wrap(_presentValueErr, "Error parsing 'presentValue' field of BACnetConstructedDataTimeValuePresentValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataTimeValuePresentValueParseWithBuffer(ctx context.Conte // Create a partially initialized instance _child := &_BACnetConstructedDataTimeValuePresentValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, PresentValue: presentValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataTimeValuePresentValue) SerializeWithWriteBuffer(c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataTimeValuePresentValue") } - // Simple Field (presentValue) - if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for presentValue") - } - _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) - if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for presentValue") - } - if _presentValueErr != nil { - return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (presentValue) + if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for presentValue") + } + _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) + if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for presentValue") + } + if _presentValueErr != nil { + return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataTimeValuePresentValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataTimeValuePresentValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataTimeValuePresentValue) SerializeWithWriteBuffer(c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataTimeValuePresentValue) isBACnetConstructedDataTimeValuePresentValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataTimeValuePresentValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeValueRelinquishDefault.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeValueRelinquishDefault.go index a62a0530a3e..50583489786 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeValueRelinquishDefault.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimeValueRelinquishDefault.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataTimeValueRelinquishDefault is the corresponding interface of BACnetConstructedDataTimeValueRelinquishDefault type BACnetConstructedDataTimeValueRelinquishDefault interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataTimeValueRelinquishDefaultExactly interface { // _BACnetConstructedDataTimeValueRelinquishDefault is the data-structure of this message type _BACnetConstructedDataTimeValueRelinquishDefault struct { *_BACnetConstructedData - RelinquishDefault BACnetApplicationTagTime + RelinquishDefault BACnetApplicationTagTime } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataTimeValueRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_TIME_VALUE -} +func (m *_BACnetConstructedDataTimeValueRelinquishDefault) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_TIME_VALUE} -func (m *_BACnetConstructedDataTimeValueRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_RELINQUISH_DEFAULT -} +func (m *_BACnetConstructedDataTimeValueRelinquishDefault) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_RELINQUISH_DEFAULT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataTimeValueRelinquishDefault) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataTimeValueRelinquishDefault) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataTimeValueRelinquishDefault) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataTimeValueRelinquishDefault) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataTimeValueRelinquishDefault) GetActualValue() BACn /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataTimeValueRelinquishDefault factory function for _BACnetConstructedDataTimeValueRelinquishDefault -func NewBACnetConstructedDataTimeValueRelinquishDefault(relinquishDefault BACnetApplicationTagTime, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataTimeValueRelinquishDefault { +func NewBACnetConstructedDataTimeValueRelinquishDefault( relinquishDefault BACnetApplicationTagTime , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataTimeValueRelinquishDefault { _result := &_BACnetConstructedDataTimeValueRelinquishDefault{ - RelinquishDefault: relinquishDefault, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + RelinquishDefault: relinquishDefault, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataTimeValueRelinquishDefault(relinquishDefault BACnet // Deprecated: use the interface for direct cast func CastBACnetConstructedDataTimeValueRelinquishDefault(structType interface{}) BACnetConstructedDataTimeValueRelinquishDefault { - if casted, ok := structType.(BACnetConstructedDataTimeValueRelinquishDefault); ok { + if casted, ok := structType.(BACnetConstructedDataTimeValueRelinquishDefault); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataTimeValueRelinquishDefault); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataTimeValueRelinquishDefault) GetLengthInBits(ctx c return lengthInBits } + func (m *_BACnetConstructedDataTimeValueRelinquishDefault) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataTimeValueRelinquishDefaultParseWithBuffer(ctx context. if pullErr := readBuffer.PullContext("relinquishDefault"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for relinquishDefault") } - _relinquishDefault, _relinquishDefaultErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_relinquishDefault, _relinquishDefaultErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _relinquishDefaultErr != nil { return nil, errors.Wrap(_relinquishDefaultErr, "Error parsing 'relinquishDefault' field of BACnetConstructedDataTimeValueRelinquishDefault") } @@ -186,7 +188,7 @@ func BACnetConstructedDataTimeValueRelinquishDefaultParseWithBuffer(ctx context. // Create a partially initialized instance _child := &_BACnetConstructedDataTimeValueRelinquishDefault{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, RelinquishDefault: relinquishDefault, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataTimeValueRelinquishDefault) SerializeWithWriteBuf return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataTimeValueRelinquishDefault") } - // Simple Field (relinquishDefault) - if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for relinquishDefault") - } - _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) - if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { - return errors.Wrap(popErr, "Error popping for relinquishDefault") - } - if _relinquishDefaultErr != nil { - return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (relinquishDefault) + if pushErr := writeBuffer.PushContext("relinquishDefault"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for relinquishDefault") + } + _relinquishDefaultErr := writeBuffer.WriteSerializable(ctx, m.GetRelinquishDefault()) + if popErr := writeBuffer.PopContext("relinquishDefault"); popErr != nil { + return errors.Wrap(popErr, "Error popping for relinquishDefault") + } + if _relinquishDefaultErr != nil { + return errors.Wrap(_relinquishDefaultErr, "Error serializing 'relinquishDefault' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataTimeValueRelinquishDefault"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataTimeValueRelinquishDefault") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataTimeValueRelinquishDefault) SerializeWithWriteBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataTimeValueRelinquishDefault) isBACnetConstructedDataTimeValueRelinquishDefault() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataTimeValueRelinquishDefault) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimepatternValueAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimepatternValueAll.go index d3f043458c8..c52a32b9cfd 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimepatternValueAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimepatternValueAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataTimepatternValueAll is the corresponding interface of BACnetConstructedDataTimepatternValueAll type BACnetConstructedDataTimepatternValueAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataTimepatternValueAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataTimepatternValueAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_TIMEPATTERN_VALUE -} +func (m *_BACnetConstructedDataTimepatternValueAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_TIMEPATTERN_VALUE} -func (m *_BACnetConstructedDataTimepatternValueAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataTimepatternValueAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataTimepatternValueAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataTimepatternValueAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataTimepatternValueAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataTimepatternValueAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataTimepatternValueAll factory function for _BACnetConstructedDataTimepatternValueAll -func NewBACnetConstructedDataTimepatternValueAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataTimepatternValueAll { +func NewBACnetConstructedDataTimepatternValueAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataTimepatternValueAll { _result := &_BACnetConstructedDataTimepatternValueAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataTimepatternValueAll(openingTag BACnetOpeningTag, pe // Deprecated: use the interface for direct cast func CastBACnetConstructedDataTimepatternValueAll(structType interface{}) BACnetConstructedDataTimepatternValueAll { - if casted, ok := structType.(BACnetConstructedDataTimepatternValueAll); ok { + if casted, ok := structType.(BACnetConstructedDataTimepatternValueAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataTimepatternValueAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataTimepatternValueAll) GetLengthInBits(ctx context. return lengthInBits } + func (m *_BACnetConstructedDataTimepatternValueAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataTimepatternValueAllParseWithBuffer(ctx context.Context _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataTimepatternValueAllParseWithBuffer(ctx context.Context // Create a partially initialized instance _child := &_BACnetConstructedDataTimepatternValueAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataTimepatternValueAll) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataTimepatternValueAll) isBACnetConstructedDataTimepatternValueAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataTimepatternValueAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimerAlarmValues.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimerAlarmValues.go index 638df1520f3..a7ff312e55f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimerAlarmValues.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimerAlarmValues.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataTimerAlarmValues is the corresponding interface of BACnetConstructedDataTimerAlarmValues type BACnetConstructedDataTimerAlarmValues interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataTimerAlarmValuesExactly interface { // _BACnetConstructedDataTimerAlarmValues is the data-structure of this message type _BACnetConstructedDataTimerAlarmValues struct { *_BACnetConstructedData - AlarmValues []BACnetTimerStateTagged + AlarmValues []BACnetTimerStateTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataTimerAlarmValues) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_TIMER -} +func (m *_BACnetConstructedDataTimerAlarmValues) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_TIMER} -func (m *_BACnetConstructedDataTimerAlarmValues) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALARM_VALUES -} +func (m *_BACnetConstructedDataTimerAlarmValues) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALARM_VALUES} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataTimerAlarmValues) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataTimerAlarmValues) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataTimerAlarmValues) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataTimerAlarmValues) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataTimerAlarmValues) GetAlarmValues() []BACnetTimerS /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataTimerAlarmValues factory function for _BACnetConstructedDataTimerAlarmValues -func NewBACnetConstructedDataTimerAlarmValues(alarmValues []BACnetTimerStateTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataTimerAlarmValues { +func NewBACnetConstructedDataTimerAlarmValues( alarmValues []BACnetTimerStateTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataTimerAlarmValues { _result := &_BACnetConstructedDataTimerAlarmValues{ - AlarmValues: alarmValues, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + AlarmValues: alarmValues, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataTimerAlarmValues(alarmValues []BACnetTimerStateTagg // Deprecated: use the interface for direct cast func CastBACnetConstructedDataTimerAlarmValues(structType interface{}) BACnetConstructedDataTimerAlarmValues { - if casted, ok := structType.(BACnetConstructedDataTimerAlarmValues); ok { + if casted, ok := structType.(BACnetConstructedDataTimerAlarmValues); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataTimerAlarmValues); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataTimerAlarmValues) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetConstructedDataTimerAlarmValues) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataTimerAlarmValuesParseWithBuffer(ctx context.Context, r // Terminated array var alarmValues []BACnetTimerStateTagged { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetTimerStateTaggedParseWithBuffer(ctx, readBuffer, uint8(0), TagClass_APPLICATION_TAGS) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetTimerStateTaggedParseWithBuffer(ctx, readBuffer , uint8(0) , TagClass_APPLICATION_TAGS ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'alarmValues' field of BACnetConstructedDataTimerAlarmValues") } @@ -173,7 +175,7 @@ func BACnetConstructedDataTimerAlarmValuesParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_BACnetConstructedDataTimerAlarmValues{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, AlarmValues: alarmValues, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataTimerAlarmValues) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataTimerAlarmValues") } - // Array Field (alarmValues) - if pushErr := writeBuffer.PushContext("alarmValues", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for alarmValues") - } - for _curItem, _element := range m.GetAlarmValues() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAlarmValues()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'alarmValues' field") - } - } - if popErr := writeBuffer.PopContext("alarmValues", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for alarmValues") + // Array Field (alarmValues) + if pushErr := writeBuffer.PushContext("alarmValues", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for alarmValues") + } + for _curItem, _element := range m.GetAlarmValues() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAlarmValues()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'alarmValues' field") } + } + if popErr := writeBuffer.PopContext("alarmValues", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for alarmValues") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataTimerAlarmValues"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataTimerAlarmValues") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataTimerAlarmValues) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataTimerAlarmValues) isBACnetConstructedDataTimerAlarmValues() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataTimerAlarmValues) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimerAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimerAll.go index cec7db4e599..d14f00a0f0c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimerAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimerAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataTimerAll is the corresponding interface of BACnetConstructedDataTimerAll type BACnetConstructedDataTimerAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataTimerAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataTimerAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_TIMER -} +func (m *_BACnetConstructedDataTimerAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_TIMER} -func (m *_BACnetConstructedDataTimerAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataTimerAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataTimerAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataTimerAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataTimerAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataTimerAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataTimerAll factory function for _BACnetConstructedDataTimerAll -func NewBACnetConstructedDataTimerAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataTimerAll { +func NewBACnetConstructedDataTimerAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataTimerAll { _result := &_BACnetConstructedDataTimerAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataTimerAll(openingTag BACnetOpeningTag, peekedTagHead // Deprecated: use the interface for direct cast func CastBACnetConstructedDataTimerAll(structType interface{}) BACnetConstructedDataTimerAll { - if casted, ok := structType.(BACnetConstructedDataTimerAll); ok { + if casted, ok := structType.(BACnetConstructedDataTimerAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataTimerAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataTimerAll) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetConstructedDataTimerAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataTimerAllParseWithBuffer(ctx context.Context, readBuffe _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataTimerAllParseWithBuffer(ctx context.Context, readBuffe // Create a partially initialized instance _child := &_BACnetConstructedDataTimerAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataTimerAll) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataTimerAll) isBACnetConstructedDataTimerAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataTimerAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimerMaxPresValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimerMaxPresValue.go index ef3db1b653a..709637bca5a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimerMaxPresValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimerMaxPresValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataTimerMaxPresValue is the corresponding interface of BACnetConstructedDataTimerMaxPresValue type BACnetConstructedDataTimerMaxPresValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataTimerMaxPresValueExactly interface { // _BACnetConstructedDataTimerMaxPresValue is the data-structure of this message type _BACnetConstructedDataTimerMaxPresValue struct { *_BACnetConstructedData - MaxPresValue BACnetApplicationTagUnsignedInteger + MaxPresValue BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataTimerMaxPresValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_TIMER -} +func (m *_BACnetConstructedDataTimerMaxPresValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_TIMER} -func (m *_BACnetConstructedDataTimerMaxPresValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MAX_PRES_VALUE -} +func (m *_BACnetConstructedDataTimerMaxPresValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MAX_PRES_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataTimerMaxPresValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataTimerMaxPresValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataTimerMaxPresValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataTimerMaxPresValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataTimerMaxPresValue) GetActualValue() BACnetApplica /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataTimerMaxPresValue factory function for _BACnetConstructedDataTimerMaxPresValue -func NewBACnetConstructedDataTimerMaxPresValue(maxPresValue BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataTimerMaxPresValue { +func NewBACnetConstructedDataTimerMaxPresValue( maxPresValue BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataTimerMaxPresValue { _result := &_BACnetConstructedDataTimerMaxPresValue{ - MaxPresValue: maxPresValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + MaxPresValue: maxPresValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataTimerMaxPresValue(maxPresValue BACnetApplicationTag // Deprecated: use the interface for direct cast func CastBACnetConstructedDataTimerMaxPresValue(structType interface{}) BACnetConstructedDataTimerMaxPresValue { - if casted, ok := structType.(BACnetConstructedDataTimerMaxPresValue); ok { + if casted, ok := structType.(BACnetConstructedDataTimerMaxPresValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataTimerMaxPresValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataTimerMaxPresValue) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetConstructedDataTimerMaxPresValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataTimerMaxPresValueParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("maxPresValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for maxPresValue") } - _maxPresValue, _maxPresValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_maxPresValue, _maxPresValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _maxPresValueErr != nil { return nil, errors.Wrap(_maxPresValueErr, "Error parsing 'maxPresValue' field of BACnetConstructedDataTimerMaxPresValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataTimerMaxPresValueParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataTimerMaxPresValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, MaxPresValue: maxPresValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataTimerMaxPresValue) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataTimerMaxPresValue") } - // Simple Field (maxPresValue) - if pushErr := writeBuffer.PushContext("maxPresValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for maxPresValue") - } - _maxPresValueErr := writeBuffer.WriteSerializable(ctx, m.GetMaxPresValue()) - if popErr := writeBuffer.PopContext("maxPresValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for maxPresValue") - } - if _maxPresValueErr != nil { - return errors.Wrap(_maxPresValueErr, "Error serializing 'maxPresValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (maxPresValue) + if pushErr := writeBuffer.PushContext("maxPresValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for maxPresValue") + } + _maxPresValueErr := writeBuffer.WriteSerializable(ctx, m.GetMaxPresValue()) + if popErr := writeBuffer.PopContext("maxPresValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for maxPresValue") + } + if _maxPresValueErr != nil { + return errors.Wrap(_maxPresValueErr, "Error serializing 'maxPresValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataTimerMaxPresValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataTimerMaxPresValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataTimerMaxPresValue) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataTimerMaxPresValue) isBACnetConstructedDataTimerMaxPresValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataTimerMaxPresValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimerMinPresValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimerMinPresValue.go index b6ab3014723..ab3123031fe 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimerMinPresValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimerMinPresValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataTimerMinPresValue is the corresponding interface of BACnetConstructedDataTimerMinPresValue type BACnetConstructedDataTimerMinPresValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataTimerMinPresValueExactly interface { // _BACnetConstructedDataTimerMinPresValue is the data-structure of this message type _BACnetConstructedDataTimerMinPresValue struct { *_BACnetConstructedData - MinPresValue BACnetApplicationTagUnsignedInteger + MinPresValue BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataTimerMinPresValue) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_TIMER -} +func (m *_BACnetConstructedDataTimerMinPresValue) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_TIMER} -func (m *_BACnetConstructedDataTimerMinPresValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_MIN_PRES_VALUE -} +func (m *_BACnetConstructedDataTimerMinPresValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_MIN_PRES_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataTimerMinPresValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataTimerMinPresValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataTimerMinPresValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataTimerMinPresValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataTimerMinPresValue) GetActualValue() BACnetApplica /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataTimerMinPresValue factory function for _BACnetConstructedDataTimerMinPresValue -func NewBACnetConstructedDataTimerMinPresValue(minPresValue BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataTimerMinPresValue { +func NewBACnetConstructedDataTimerMinPresValue( minPresValue BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataTimerMinPresValue { _result := &_BACnetConstructedDataTimerMinPresValue{ - MinPresValue: minPresValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + MinPresValue: minPresValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataTimerMinPresValue(minPresValue BACnetApplicationTag // Deprecated: use the interface for direct cast func CastBACnetConstructedDataTimerMinPresValue(structType interface{}) BACnetConstructedDataTimerMinPresValue { - if casted, ok := structType.(BACnetConstructedDataTimerMinPresValue); ok { + if casted, ok := structType.(BACnetConstructedDataTimerMinPresValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataTimerMinPresValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataTimerMinPresValue) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetConstructedDataTimerMinPresValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataTimerMinPresValueParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("minPresValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for minPresValue") } - _minPresValue, _minPresValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_minPresValue, _minPresValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _minPresValueErr != nil { return nil, errors.Wrap(_minPresValueErr, "Error parsing 'minPresValue' field of BACnetConstructedDataTimerMinPresValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataTimerMinPresValueParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataTimerMinPresValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, MinPresValue: minPresValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataTimerMinPresValue) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataTimerMinPresValue") } - // Simple Field (minPresValue) - if pushErr := writeBuffer.PushContext("minPresValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for minPresValue") - } - _minPresValueErr := writeBuffer.WriteSerializable(ctx, m.GetMinPresValue()) - if popErr := writeBuffer.PopContext("minPresValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for minPresValue") - } - if _minPresValueErr != nil { - return errors.Wrap(_minPresValueErr, "Error serializing 'minPresValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (minPresValue) + if pushErr := writeBuffer.PushContext("minPresValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for minPresValue") + } + _minPresValueErr := writeBuffer.WriteSerializable(ctx, m.GetMinPresValue()) + if popErr := writeBuffer.PopContext("minPresValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for minPresValue") + } + if _minPresValueErr != nil { + return errors.Wrap(_minPresValueErr, "Error serializing 'minPresValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataTimerMinPresValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataTimerMinPresValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataTimerMinPresValue) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataTimerMinPresValue) isBACnetConstructedDataTimerMinPresValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataTimerMinPresValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimerResolution.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimerResolution.go index c477c2e31ee..70bbc17e65e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimerResolution.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimerResolution.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataTimerResolution is the corresponding interface of BACnetConstructedDataTimerResolution type BACnetConstructedDataTimerResolution interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataTimerResolutionExactly interface { // _BACnetConstructedDataTimerResolution is the data-structure of this message type _BACnetConstructedDataTimerResolution struct { *_BACnetConstructedData - Resolution BACnetApplicationTagUnsignedInteger + Resolution BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataTimerResolution) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_TIMER -} +func (m *_BACnetConstructedDataTimerResolution) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_TIMER} -func (m *_BACnetConstructedDataTimerResolution) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_RESOLUTION -} +func (m *_BACnetConstructedDataTimerResolution) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_RESOLUTION} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataTimerResolution) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataTimerResolution) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataTimerResolution) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataTimerResolution) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataTimerResolution) GetActualValue() BACnetApplicati /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataTimerResolution factory function for _BACnetConstructedDataTimerResolution -func NewBACnetConstructedDataTimerResolution(resolution BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataTimerResolution { +func NewBACnetConstructedDataTimerResolution( resolution BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataTimerResolution { _result := &_BACnetConstructedDataTimerResolution{ - Resolution: resolution, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Resolution: resolution, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataTimerResolution(resolution BACnetApplicationTagUnsi // Deprecated: use the interface for direct cast func CastBACnetConstructedDataTimerResolution(structType interface{}) BACnetConstructedDataTimerResolution { - if casted, ok := structType.(BACnetConstructedDataTimerResolution); ok { + if casted, ok := structType.(BACnetConstructedDataTimerResolution); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataTimerResolution); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataTimerResolution) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetConstructedDataTimerResolution) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataTimerResolutionParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("resolution"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for resolution") } - _resolution, _resolutionErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_resolution, _resolutionErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _resolutionErr != nil { return nil, errors.Wrap(_resolutionErr, "Error parsing 'resolution' field of BACnetConstructedDataTimerResolution") } @@ -186,7 +188,7 @@ func BACnetConstructedDataTimerResolutionParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetConstructedDataTimerResolution{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Resolution: resolution, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataTimerResolution) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataTimerResolution") } - // Simple Field (resolution) - if pushErr := writeBuffer.PushContext("resolution"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for resolution") - } - _resolutionErr := writeBuffer.WriteSerializable(ctx, m.GetResolution()) - if popErr := writeBuffer.PopContext("resolution"); popErr != nil { - return errors.Wrap(popErr, "Error popping for resolution") - } - if _resolutionErr != nil { - return errors.Wrap(_resolutionErr, "Error serializing 'resolution' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (resolution) + if pushErr := writeBuffer.PushContext("resolution"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for resolution") + } + _resolutionErr := writeBuffer.WriteSerializable(ctx, m.GetResolution()) + if popErr := writeBuffer.PopContext("resolution"); popErr != nil { + return errors.Wrap(popErr, "Error popping for resolution") + } + if _resolutionErr != nil { + return errors.Wrap(_resolutionErr, "Error serializing 'resolution' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataTimerResolution"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataTimerResolution") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataTimerResolution) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataTimerResolution) isBACnetConstructedDataTimerResolution() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataTimerResolution) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimerRunning.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimerRunning.go index d4367078d01..c1390218b09 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimerRunning.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimerRunning.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataTimerRunning is the corresponding interface of BACnetConstructedDataTimerRunning type BACnetConstructedDataTimerRunning interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataTimerRunningExactly interface { // _BACnetConstructedDataTimerRunning is the data-structure of this message type _BACnetConstructedDataTimerRunning struct { *_BACnetConstructedData - TimerRunning BACnetApplicationTagBoolean + TimerRunning BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataTimerRunning) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataTimerRunning) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataTimerRunning) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_TIMER_RUNNING -} +func (m *_BACnetConstructedDataTimerRunning) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_TIMER_RUNNING} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataTimerRunning) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataTimerRunning) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataTimerRunning) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataTimerRunning) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataTimerRunning) GetActualValue() BACnetApplicationT /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataTimerRunning factory function for _BACnetConstructedDataTimerRunning -func NewBACnetConstructedDataTimerRunning(timerRunning BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataTimerRunning { +func NewBACnetConstructedDataTimerRunning( timerRunning BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataTimerRunning { _result := &_BACnetConstructedDataTimerRunning{ - TimerRunning: timerRunning, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + TimerRunning: timerRunning, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataTimerRunning(timerRunning BACnetApplicationTagBoole // Deprecated: use the interface for direct cast func CastBACnetConstructedDataTimerRunning(structType interface{}) BACnetConstructedDataTimerRunning { - if casted, ok := structType.(BACnetConstructedDataTimerRunning); ok { + if casted, ok := structType.(BACnetConstructedDataTimerRunning); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataTimerRunning); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataTimerRunning) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetConstructedDataTimerRunning) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataTimerRunningParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("timerRunning"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timerRunning") } - _timerRunning, _timerRunningErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_timerRunning, _timerRunningErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _timerRunningErr != nil { return nil, errors.Wrap(_timerRunningErr, "Error parsing 'timerRunning' field of BACnetConstructedDataTimerRunning") } @@ -186,7 +188,7 @@ func BACnetConstructedDataTimerRunningParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetConstructedDataTimerRunning{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, TimerRunning: timerRunning, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataTimerRunning) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataTimerRunning") } - // Simple Field (timerRunning) - if pushErr := writeBuffer.PushContext("timerRunning"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timerRunning") - } - _timerRunningErr := writeBuffer.WriteSerializable(ctx, m.GetTimerRunning()) - if popErr := writeBuffer.PopContext("timerRunning"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timerRunning") - } - if _timerRunningErr != nil { - return errors.Wrap(_timerRunningErr, "Error serializing 'timerRunning' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (timerRunning) + if pushErr := writeBuffer.PushContext("timerRunning"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timerRunning") + } + _timerRunningErr := writeBuffer.WriteSerializable(ctx, m.GetTimerRunning()) + if popErr := writeBuffer.PopContext("timerRunning"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timerRunning") + } + if _timerRunningErr != nil { + return errors.Wrap(_timerRunningErr, "Error serializing 'timerRunning' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataTimerRunning"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataTimerRunning") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataTimerRunning) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataTimerRunning) isBACnetConstructedDataTimerRunning() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataTimerRunning) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimerState.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimerState.go index 39da21aeaef..cc741e2281c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimerState.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTimerState.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataTimerState is the corresponding interface of BACnetConstructedDataTimerState type BACnetConstructedDataTimerState interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataTimerStateExactly interface { // _BACnetConstructedDataTimerState is the data-structure of this message type _BACnetConstructedDataTimerState struct { *_BACnetConstructedData - TimerState BACnetTimerStateTagged + TimerState BACnetTimerStateTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataTimerState) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataTimerState) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataTimerState) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_TIMER_STATE -} +func (m *_BACnetConstructedDataTimerState) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_TIMER_STATE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataTimerState) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataTimerState) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataTimerState) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataTimerState) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataTimerState) GetActualValue() BACnetTimerStateTagg /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataTimerState factory function for _BACnetConstructedDataTimerState -func NewBACnetConstructedDataTimerState(timerState BACnetTimerStateTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataTimerState { +func NewBACnetConstructedDataTimerState( timerState BACnetTimerStateTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataTimerState { _result := &_BACnetConstructedDataTimerState{ - TimerState: timerState, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + TimerState: timerState, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataTimerState(timerState BACnetTimerStateTagged, openi // Deprecated: use the interface for direct cast func CastBACnetConstructedDataTimerState(structType interface{}) BACnetConstructedDataTimerState { - if casted, ok := structType.(BACnetConstructedDataTimerState); ok { + if casted, ok := structType.(BACnetConstructedDataTimerState); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataTimerState); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataTimerState) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataTimerState) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataTimerStateParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("timerState"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timerState") } - _timerState, _timerStateErr := BACnetTimerStateTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_timerState, _timerStateErr := BACnetTimerStateTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _timerStateErr != nil { return nil, errors.Wrap(_timerStateErr, "Error parsing 'timerState' field of BACnetConstructedDataTimerState") } @@ -186,7 +188,7 @@ func BACnetConstructedDataTimerStateParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetConstructedDataTimerState{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, TimerState: timerState, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataTimerState) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataTimerState") } - // Simple Field (timerState) - if pushErr := writeBuffer.PushContext("timerState"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timerState") - } - _timerStateErr := writeBuffer.WriteSerializable(ctx, m.GetTimerState()) - if popErr := writeBuffer.PopContext("timerState"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timerState") - } - if _timerStateErr != nil { - return errors.Wrap(_timerStateErr, "Error serializing 'timerState' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (timerState) + if pushErr := writeBuffer.PushContext("timerState"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timerState") + } + _timerStateErr := writeBuffer.WriteSerializable(ctx, m.GetTimerState()) + if popErr := writeBuffer.PopContext("timerState"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timerState") + } + if _timerStateErr != nil { + return errors.Wrap(_timerStateErr, "Error serializing 'timerState' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataTimerState"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataTimerState") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataTimerState) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataTimerState) isBACnetConstructedDataTimerState() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataTimerState) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTotalRecordCount.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTotalRecordCount.go index 95cfb70d941..c3d5a595e9f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTotalRecordCount.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTotalRecordCount.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataTotalRecordCount is the corresponding interface of BACnetConstructedDataTotalRecordCount type BACnetConstructedDataTotalRecordCount interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataTotalRecordCountExactly interface { // _BACnetConstructedDataTotalRecordCount is the data-structure of this message type _BACnetConstructedDataTotalRecordCount struct { *_BACnetConstructedData - TotalRecordCount BACnetApplicationTagUnsignedInteger + TotalRecordCount BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataTotalRecordCount) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataTotalRecordCount) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataTotalRecordCount) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_TOTAL_RECORD_COUNT -} +func (m *_BACnetConstructedDataTotalRecordCount) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_TOTAL_RECORD_COUNT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataTotalRecordCount) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataTotalRecordCount) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataTotalRecordCount) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataTotalRecordCount) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataTotalRecordCount) GetActualValue() BACnetApplicat /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataTotalRecordCount factory function for _BACnetConstructedDataTotalRecordCount -func NewBACnetConstructedDataTotalRecordCount(totalRecordCount BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataTotalRecordCount { +func NewBACnetConstructedDataTotalRecordCount( totalRecordCount BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataTotalRecordCount { _result := &_BACnetConstructedDataTotalRecordCount{ - TotalRecordCount: totalRecordCount, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + TotalRecordCount: totalRecordCount, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataTotalRecordCount(totalRecordCount BACnetApplication // Deprecated: use the interface for direct cast func CastBACnetConstructedDataTotalRecordCount(structType interface{}) BACnetConstructedDataTotalRecordCount { - if casted, ok := structType.(BACnetConstructedDataTotalRecordCount); ok { + if casted, ok := structType.(BACnetConstructedDataTotalRecordCount); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataTotalRecordCount); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataTotalRecordCount) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetConstructedDataTotalRecordCount) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataTotalRecordCountParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("totalRecordCount"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for totalRecordCount") } - _totalRecordCount, _totalRecordCountErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_totalRecordCount, _totalRecordCountErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _totalRecordCountErr != nil { return nil, errors.Wrap(_totalRecordCountErr, "Error parsing 'totalRecordCount' field of BACnetConstructedDataTotalRecordCount") } @@ -186,7 +188,7 @@ func BACnetConstructedDataTotalRecordCountParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_BACnetConstructedDataTotalRecordCount{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, TotalRecordCount: totalRecordCount, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataTotalRecordCount) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataTotalRecordCount") } - // Simple Field (totalRecordCount) - if pushErr := writeBuffer.PushContext("totalRecordCount"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for totalRecordCount") - } - _totalRecordCountErr := writeBuffer.WriteSerializable(ctx, m.GetTotalRecordCount()) - if popErr := writeBuffer.PopContext("totalRecordCount"); popErr != nil { - return errors.Wrap(popErr, "Error popping for totalRecordCount") - } - if _totalRecordCountErr != nil { - return errors.Wrap(_totalRecordCountErr, "Error serializing 'totalRecordCount' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (totalRecordCount) + if pushErr := writeBuffer.PushContext("totalRecordCount"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for totalRecordCount") + } + _totalRecordCountErr := writeBuffer.WriteSerializable(ctx, m.GetTotalRecordCount()) + if popErr := writeBuffer.PopContext("totalRecordCount"); popErr != nil { + return errors.Wrap(popErr, "Error popping for totalRecordCount") + } + if _totalRecordCountErr != nil { + return errors.Wrap(_totalRecordCountErr, "Error serializing 'totalRecordCount' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataTotalRecordCount"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataTotalRecordCount") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataTotalRecordCount) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataTotalRecordCount) isBACnetConstructedDataTotalRecordCount() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataTotalRecordCount) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTraceFlag.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTraceFlag.go index 21d065f905d..5ac79cb095c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTraceFlag.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTraceFlag.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataTraceFlag is the corresponding interface of BACnetConstructedDataTraceFlag type BACnetConstructedDataTraceFlag interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataTraceFlagExactly interface { // _BACnetConstructedDataTraceFlag is the data-structure of this message type _BACnetConstructedDataTraceFlag struct { *_BACnetConstructedData - TraceFlag BACnetApplicationTagBoolean + TraceFlag BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataTraceFlag) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataTraceFlag) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataTraceFlag) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_TRACE_FLAG -} +func (m *_BACnetConstructedDataTraceFlag) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_TRACE_FLAG} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataTraceFlag) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataTraceFlag) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataTraceFlag) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataTraceFlag) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataTraceFlag) GetActualValue() BACnetApplicationTagB /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataTraceFlag factory function for _BACnetConstructedDataTraceFlag -func NewBACnetConstructedDataTraceFlag(traceFlag BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataTraceFlag { +func NewBACnetConstructedDataTraceFlag( traceFlag BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataTraceFlag { _result := &_BACnetConstructedDataTraceFlag{ - TraceFlag: traceFlag, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + TraceFlag: traceFlag, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataTraceFlag(traceFlag BACnetApplicationTagBoolean, op // Deprecated: use the interface for direct cast func CastBACnetConstructedDataTraceFlag(structType interface{}) BACnetConstructedDataTraceFlag { - if casted, ok := structType.(BACnetConstructedDataTraceFlag); ok { + if casted, ok := structType.(BACnetConstructedDataTraceFlag); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataTraceFlag); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataTraceFlag) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetConstructedDataTraceFlag) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataTraceFlagParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("traceFlag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for traceFlag") } - _traceFlag, _traceFlagErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_traceFlag, _traceFlagErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _traceFlagErr != nil { return nil, errors.Wrap(_traceFlagErr, "Error parsing 'traceFlag' field of BACnetConstructedDataTraceFlag") } @@ -186,7 +188,7 @@ func BACnetConstructedDataTraceFlagParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_BACnetConstructedDataTraceFlag{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, TraceFlag: traceFlag, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataTraceFlag) SerializeWithWriteBuffer(ctx context.C return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataTraceFlag") } - // Simple Field (traceFlag) - if pushErr := writeBuffer.PushContext("traceFlag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for traceFlag") - } - _traceFlagErr := writeBuffer.WriteSerializable(ctx, m.GetTraceFlag()) - if popErr := writeBuffer.PopContext("traceFlag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for traceFlag") - } - if _traceFlagErr != nil { - return errors.Wrap(_traceFlagErr, "Error serializing 'traceFlag' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (traceFlag) + if pushErr := writeBuffer.PushContext("traceFlag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for traceFlag") + } + _traceFlagErr := writeBuffer.WriteSerializable(ctx, m.GetTraceFlag()) + if popErr := writeBuffer.PopContext("traceFlag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for traceFlag") + } + if _traceFlagErr != nil { + return errors.Wrap(_traceFlagErr, "Error serializing 'traceFlag' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataTraceFlag"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataTraceFlag") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataTraceFlag) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataTraceFlag) isBACnetConstructedDataTraceFlag() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataTraceFlag) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTrackingValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTrackingValue.go index 738fea005e5..b8099e543b5 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTrackingValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTrackingValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataTrackingValue is the corresponding interface of BACnetConstructedDataTrackingValue type BACnetConstructedDataTrackingValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataTrackingValueExactly interface { // _BACnetConstructedDataTrackingValue is the data-structure of this message type _BACnetConstructedDataTrackingValue struct { *_BACnetConstructedData - TrackingValue BACnetLifeSafetyStateTagged + TrackingValue BACnetLifeSafetyStateTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataTrackingValue) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataTrackingValue) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataTrackingValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_TRACKING_VALUE -} +func (m *_BACnetConstructedDataTrackingValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_TRACKING_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataTrackingValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataTrackingValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataTrackingValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataTrackingValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataTrackingValue) GetActualValue() BACnetLifeSafetyS /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataTrackingValue factory function for _BACnetConstructedDataTrackingValue -func NewBACnetConstructedDataTrackingValue(trackingValue BACnetLifeSafetyStateTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataTrackingValue { +func NewBACnetConstructedDataTrackingValue( trackingValue BACnetLifeSafetyStateTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataTrackingValue { _result := &_BACnetConstructedDataTrackingValue{ - TrackingValue: trackingValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + TrackingValue: trackingValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataTrackingValue(trackingValue BACnetLifeSafetyStateTa // Deprecated: use the interface for direct cast func CastBACnetConstructedDataTrackingValue(structType interface{}) BACnetConstructedDataTrackingValue { - if casted, ok := structType.(BACnetConstructedDataTrackingValue); ok { + if casted, ok := structType.(BACnetConstructedDataTrackingValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataTrackingValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataTrackingValue) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetConstructedDataTrackingValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataTrackingValueParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("trackingValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for trackingValue") } - _trackingValue, _trackingValueErr := BACnetLifeSafetyStateTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_trackingValue, _trackingValueErr := BACnetLifeSafetyStateTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _trackingValueErr != nil { return nil, errors.Wrap(_trackingValueErr, "Error parsing 'trackingValue' field of BACnetConstructedDataTrackingValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataTrackingValueParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetConstructedDataTrackingValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, TrackingValue: trackingValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataTrackingValue) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataTrackingValue") } - // Simple Field (trackingValue) - if pushErr := writeBuffer.PushContext("trackingValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for trackingValue") - } - _trackingValueErr := writeBuffer.WriteSerializable(ctx, m.GetTrackingValue()) - if popErr := writeBuffer.PopContext("trackingValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for trackingValue") - } - if _trackingValueErr != nil { - return errors.Wrap(_trackingValueErr, "Error serializing 'trackingValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (trackingValue) + if pushErr := writeBuffer.PushContext("trackingValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for trackingValue") + } + _trackingValueErr := writeBuffer.WriteSerializable(ctx, m.GetTrackingValue()) + if popErr := writeBuffer.PopContext("trackingValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for trackingValue") + } + if _trackingValueErr != nil { + return errors.Wrap(_trackingValueErr, "Error serializing 'trackingValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataTrackingValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataTrackingValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataTrackingValue) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataTrackingValue) isBACnetConstructedDataTrackingValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataTrackingValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTransactionNotificationClass.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTransactionNotificationClass.go index 007eb60f031..f326b517327 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTransactionNotificationClass.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTransactionNotificationClass.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataTransactionNotificationClass is the corresponding interface of BACnetConstructedDataTransactionNotificationClass type BACnetConstructedDataTransactionNotificationClass interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataTransactionNotificationClassExactly interface { // _BACnetConstructedDataTransactionNotificationClass is the data-structure of this message type _BACnetConstructedDataTransactionNotificationClass struct { *_BACnetConstructedData - TransactionNotificationClass BACnetApplicationTagUnsignedInteger + TransactionNotificationClass BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataTransactionNotificationClass) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataTransactionNotificationClass) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataTransactionNotificationClass) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_TRANSACTION_NOTIFICATION_CLASS -} +func (m *_BACnetConstructedDataTransactionNotificationClass) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_TRANSACTION_NOTIFICATION_CLASS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataTransactionNotificationClass) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataTransactionNotificationClass) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataTransactionNotificationClass) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataTransactionNotificationClass) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataTransactionNotificationClass) GetActualValue() BA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataTransactionNotificationClass factory function for _BACnetConstructedDataTransactionNotificationClass -func NewBACnetConstructedDataTransactionNotificationClass(transactionNotificationClass BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataTransactionNotificationClass { +func NewBACnetConstructedDataTransactionNotificationClass( transactionNotificationClass BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataTransactionNotificationClass { _result := &_BACnetConstructedDataTransactionNotificationClass{ TransactionNotificationClass: transactionNotificationClass, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataTransactionNotificationClass(transactionNotificatio // Deprecated: use the interface for direct cast func CastBACnetConstructedDataTransactionNotificationClass(structType interface{}) BACnetConstructedDataTransactionNotificationClass { - if casted, ok := structType.(BACnetConstructedDataTransactionNotificationClass); ok { + if casted, ok := structType.(BACnetConstructedDataTransactionNotificationClass); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataTransactionNotificationClass); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataTransactionNotificationClass) GetLengthInBits(ctx return lengthInBits } + func (m *_BACnetConstructedDataTransactionNotificationClass) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataTransactionNotificationClassParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("transactionNotificationClass"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for transactionNotificationClass") } - _transactionNotificationClass, _transactionNotificationClassErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_transactionNotificationClass, _transactionNotificationClassErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _transactionNotificationClassErr != nil { return nil, errors.Wrap(_transactionNotificationClassErr, "Error parsing 'transactionNotificationClass' field of BACnetConstructedDataTransactionNotificationClass") } @@ -186,7 +188,7 @@ func BACnetConstructedDataTransactionNotificationClassParseWithBuffer(ctx contex // Create a partially initialized instance _child := &_BACnetConstructedDataTransactionNotificationClass{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, TransactionNotificationClass: transactionNotificationClass, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataTransactionNotificationClass) SerializeWithWriteB return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataTransactionNotificationClass") } - // Simple Field (transactionNotificationClass) - if pushErr := writeBuffer.PushContext("transactionNotificationClass"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for transactionNotificationClass") - } - _transactionNotificationClassErr := writeBuffer.WriteSerializable(ctx, m.GetTransactionNotificationClass()) - if popErr := writeBuffer.PopContext("transactionNotificationClass"); popErr != nil { - return errors.Wrap(popErr, "Error popping for transactionNotificationClass") - } - if _transactionNotificationClassErr != nil { - return errors.Wrap(_transactionNotificationClassErr, "Error serializing 'transactionNotificationClass' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (transactionNotificationClass) + if pushErr := writeBuffer.PushContext("transactionNotificationClass"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for transactionNotificationClass") + } + _transactionNotificationClassErr := writeBuffer.WriteSerializable(ctx, m.GetTransactionNotificationClass()) + if popErr := writeBuffer.PopContext("transactionNotificationClass"); popErr != nil { + return errors.Wrap(popErr, "Error popping for transactionNotificationClass") + } + if _transactionNotificationClassErr != nil { + return errors.Wrap(_transactionNotificationClassErr, "Error serializing 'transactionNotificationClass' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataTransactionNotificationClass"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataTransactionNotificationClass") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataTransactionNotificationClass) SerializeWithWriteB return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataTransactionNotificationClass) isBACnetConstructedDataTransactionNotificationClass() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataTransactionNotificationClass) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTransition.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTransition.go index 8ed14db9bed..18d4ae05d46 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTransition.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTransition.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataTransition is the corresponding interface of BACnetConstructedDataTransition type BACnetConstructedDataTransition interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataTransitionExactly interface { // _BACnetConstructedDataTransition is the data-structure of this message type _BACnetConstructedDataTransition struct { *_BACnetConstructedData - Transition BACnetLightingTransitionTagged + Transition BACnetLightingTransitionTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataTransition) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataTransition) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataTransition) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_TRANSITION -} +func (m *_BACnetConstructedDataTransition) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_TRANSITION} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataTransition) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataTransition) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataTransition) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataTransition) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataTransition) GetActualValue() BACnetLightingTransi /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataTransition factory function for _BACnetConstructedDataTransition -func NewBACnetConstructedDataTransition(transition BACnetLightingTransitionTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataTransition { +func NewBACnetConstructedDataTransition( transition BACnetLightingTransitionTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataTransition { _result := &_BACnetConstructedDataTransition{ - Transition: transition, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Transition: transition, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataTransition(transition BACnetLightingTransitionTagge // Deprecated: use the interface for direct cast func CastBACnetConstructedDataTransition(structType interface{}) BACnetConstructedDataTransition { - if casted, ok := structType.(BACnetConstructedDataTransition); ok { + if casted, ok := structType.(BACnetConstructedDataTransition); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataTransition); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataTransition) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataTransition) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataTransitionParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("transition"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for transition") } - _transition, _transitionErr := BACnetLightingTransitionTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_transition, _transitionErr := BACnetLightingTransitionTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _transitionErr != nil { return nil, errors.Wrap(_transitionErr, "Error parsing 'transition' field of BACnetConstructedDataTransition") } @@ -186,7 +188,7 @@ func BACnetConstructedDataTransitionParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetConstructedDataTransition{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Transition: transition, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataTransition) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataTransition") } - // Simple Field (transition) - if pushErr := writeBuffer.PushContext("transition"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for transition") - } - _transitionErr := writeBuffer.WriteSerializable(ctx, m.GetTransition()) - if popErr := writeBuffer.PopContext("transition"); popErr != nil { - return errors.Wrap(popErr, "Error popping for transition") - } - if _transitionErr != nil { - return errors.Wrap(_transitionErr, "Error serializing 'transition' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (transition) + if pushErr := writeBuffer.PushContext("transition"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for transition") + } + _transitionErr := writeBuffer.WriteSerializable(ctx, m.GetTransition()) + if popErr := writeBuffer.PopContext("transition"); popErr != nil { + return errors.Wrap(popErr, "Error popping for transition") + } + if _transitionErr != nil { + return errors.Wrap(_transitionErr, "Error serializing 'transition' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataTransition"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataTransition") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataTransition) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataTransition) isBACnetConstructedDataTransition() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataTransition) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTrendLogAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTrendLogAll.go index 5cdb2a2e52d..4f85a367813 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTrendLogAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTrendLogAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataTrendLogAll is the corresponding interface of BACnetConstructedDataTrendLogAll type BACnetConstructedDataTrendLogAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataTrendLogAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataTrendLogAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_TREND_LOG -} +func (m *_BACnetConstructedDataTrendLogAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_TREND_LOG} -func (m *_BACnetConstructedDataTrendLogAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataTrendLogAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataTrendLogAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataTrendLogAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataTrendLogAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataTrendLogAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataTrendLogAll factory function for _BACnetConstructedDataTrendLogAll -func NewBACnetConstructedDataTrendLogAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataTrendLogAll { +func NewBACnetConstructedDataTrendLogAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataTrendLogAll { _result := &_BACnetConstructedDataTrendLogAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataTrendLogAll(openingTag BACnetOpeningTag, peekedTagH // Deprecated: use the interface for direct cast func CastBACnetConstructedDataTrendLogAll(structType interface{}) BACnetConstructedDataTrendLogAll { - if casted, ok := structType.(BACnetConstructedDataTrendLogAll); ok { + if casted, ok := structType.(BACnetConstructedDataTrendLogAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataTrendLogAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataTrendLogAll) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataTrendLogAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataTrendLogAllParseWithBuffer(ctx context.Context, readBu _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataTrendLogAllParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataTrendLogAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataTrendLogAll) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataTrendLogAll) isBACnetConstructedDataTrendLogAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataTrendLogAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTrendLogLogBuffer.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTrendLogLogBuffer.go index 4992f20b6e8..f6e53093155 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTrendLogLogBuffer.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTrendLogLogBuffer.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataTrendLogLogBuffer is the corresponding interface of BACnetConstructedDataTrendLogLogBuffer type BACnetConstructedDataTrendLogLogBuffer interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataTrendLogLogBufferExactly interface { // _BACnetConstructedDataTrendLogLogBuffer is the data-structure of this message type _BACnetConstructedDataTrendLogLogBuffer struct { *_BACnetConstructedData - FloorText []BACnetLogRecord + FloorText []BACnetLogRecord } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataTrendLogLogBuffer) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_TREND_LOG -} +func (m *_BACnetConstructedDataTrendLogLogBuffer) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_TREND_LOG} -func (m *_BACnetConstructedDataTrendLogLogBuffer) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LOG_BUFFER -} +func (m *_BACnetConstructedDataTrendLogLogBuffer) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LOG_BUFFER} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataTrendLogLogBuffer) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataTrendLogLogBuffer) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataTrendLogLogBuffer) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataTrendLogLogBuffer) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataTrendLogLogBuffer) GetFloorText() []BACnetLogReco /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataTrendLogLogBuffer factory function for _BACnetConstructedDataTrendLogLogBuffer -func NewBACnetConstructedDataTrendLogLogBuffer(floorText []BACnetLogRecord, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataTrendLogLogBuffer { +func NewBACnetConstructedDataTrendLogLogBuffer( floorText []BACnetLogRecord , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataTrendLogLogBuffer { _result := &_BACnetConstructedDataTrendLogLogBuffer{ - FloorText: floorText, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + FloorText: floorText, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataTrendLogLogBuffer(floorText []BACnetLogRecord, open // Deprecated: use the interface for direct cast func CastBACnetConstructedDataTrendLogLogBuffer(structType interface{}) BACnetConstructedDataTrendLogLogBuffer { - if casted, ok := structType.(BACnetConstructedDataTrendLogLogBuffer); ok { + if casted, ok := structType.(BACnetConstructedDataTrendLogLogBuffer); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataTrendLogLogBuffer); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataTrendLogLogBuffer) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetConstructedDataTrendLogLogBuffer) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataTrendLogLogBufferParseWithBuffer(ctx context.Context, // Terminated array var floorText []BACnetLogRecord { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetLogRecordParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetLogRecordParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'floorText' field of BACnetConstructedDataTrendLogLogBuffer") } @@ -173,7 +175,7 @@ func BACnetConstructedDataTrendLogLogBufferParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataTrendLogLogBuffer{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FloorText: floorText, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataTrendLogLogBuffer) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataTrendLogLogBuffer") } - // Array Field (floorText) - if pushErr := writeBuffer.PushContext("floorText", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for floorText") - } - for _curItem, _element := range m.GetFloorText() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetFloorText()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'floorText' field") - } - } - if popErr := writeBuffer.PopContext("floorText", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for floorText") + // Array Field (floorText) + if pushErr := writeBuffer.PushContext("floorText", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for floorText") + } + for _curItem, _element := range m.GetFloorText() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetFloorText()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'floorText' field") } + } + if popErr := writeBuffer.PopContext("floorText", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for floorText") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataTrendLogLogBuffer"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataTrendLogLogBuffer") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataTrendLogLogBuffer) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataTrendLogLogBuffer) isBACnetConstructedDataTrendLogLogBuffer() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataTrendLogLogBuffer) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTrendLogLogDeviceObjectProperty.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTrendLogLogDeviceObjectProperty.go index eb0dda7d7a3..1531d0c7c83 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTrendLogLogDeviceObjectProperty.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTrendLogLogDeviceObjectProperty.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataTrendLogLogDeviceObjectProperty is the corresponding interface of BACnetConstructedDataTrendLogLogDeviceObjectProperty type BACnetConstructedDataTrendLogLogDeviceObjectProperty interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataTrendLogLogDeviceObjectPropertyExactly interface { // _BACnetConstructedDataTrendLogLogDeviceObjectProperty is the data-structure of this message type _BACnetConstructedDataTrendLogLogDeviceObjectProperty struct { *_BACnetConstructedData - LogDeviceObjectProperty BACnetDeviceObjectPropertyReference + LogDeviceObjectProperty BACnetDeviceObjectPropertyReference } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataTrendLogLogDeviceObjectProperty) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_TREND_LOG -} +func (m *_BACnetConstructedDataTrendLogLogDeviceObjectProperty) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_TREND_LOG} -func (m *_BACnetConstructedDataTrendLogLogDeviceObjectProperty) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LOG_DEVICE_OBJECT_PROPERTY -} +func (m *_BACnetConstructedDataTrendLogLogDeviceObjectProperty) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LOG_DEVICE_OBJECT_PROPERTY} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataTrendLogLogDeviceObjectProperty) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataTrendLogLogDeviceObjectProperty) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataTrendLogLogDeviceObjectProperty) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataTrendLogLogDeviceObjectProperty) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataTrendLogLogDeviceObjectProperty) GetActualValue() /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataTrendLogLogDeviceObjectProperty factory function for _BACnetConstructedDataTrendLogLogDeviceObjectProperty -func NewBACnetConstructedDataTrendLogLogDeviceObjectProperty(logDeviceObjectProperty BACnetDeviceObjectPropertyReference, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataTrendLogLogDeviceObjectProperty { +func NewBACnetConstructedDataTrendLogLogDeviceObjectProperty( logDeviceObjectProperty BACnetDeviceObjectPropertyReference , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataTrendLogLogDeviceObjectProperty { _result := &_BACnetConstructedDataTrendLogLogDeviceObjectProperty{ LogDeviceObjectProperty: logDeviceObjectProperty, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataTrendLogLogDeviceObjectProperty(logDeviceObjectProp // Deprecated: use the interface for direct cast func CastBACnetConstructedDataTrendLogLogDeviceObjectProperty(structType interface{}) BACnetConstructedDataTrendLogLogDeviceObjectProperty { - if casted, ok := structType.(BACnetConstructedDataTrendLogLogDeviceObjectProperty); ok { + if casted, ok := structType.(BACnetConstructedDataTrendLogLogDeviceObjectProperty); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataTrendLogLogDeviceObjectProperty); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataTrendLogLogDeviceObjectProperty) GetLengthInBits( return lengthInBits } + func (m *_BACnetConstructedDataTrendLogLogDeviceObjectProperty) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataTrendLogLogDeviceObjectPropertyParseWithBuffer(ctx con if pullErr := readBuffer.PullContext("logDeviceObjectProperty"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for logDeviceObjectProperty") } - _logDeviceObjectProperty, _logDeviceObjectPropertyErr := BACnetDeviceObjectPropertyReferenceParseWithBuffer(ctx, readBuffer) +_logDeviceObjectProperty, _logDeviceObjectPropertyErr := BACnetDeviceObjectPropertyReferenceParseWithBuffer(ctx, readBuffer) if _logDeviceObjectPropertyErr != nil { return nil, errors.Wrap(_logDeviceObjectPropertyErr, "Error parsing 'logDeviceObjectProperty' field of BACnetConstructedDataTrendLogLogDeviceObjectProperty") } @@ -186,7 +188,7 @@ func BACnetConstructedDataTrendLogLogDeviceObjectPropertyParseWithBuffer(ctx con // Create a partially initialized instance _child := &_BACnetConstructedDataTrendLogLogDeviceObjectProperty{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, LogDeviceObjectProperty: logDeviceObjectProperty, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataTrendLogLogDeviceObjectProperty) SerializeWithWri return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataTrendLogLogDeviceObjectProperty") } - // Simple Field (logDeviceObjectProperty) - if pushErr := writeBuffer.PushContext("logDeviceObjectProperty"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for logDeviceObjectProperty") - } - _logDeviceObjectPropertyErr := writeBuffer.WriteSerializable(ctx, m.GetLogDeviceObjectProperty()) - if popErr := writeBuffer.PopContext("logDeviceObjectProperty"); popErr != nil { - return errors.Wrap(popErr, "Error popping for logDeviceObjectProperty") - } - if _logDeviceObjectPropertyErr != nil { - return errors.Wrap(_logDeviceObjectPropertyErr, "Error serializing 'logDeviceObjectProperty' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (logDeviceObjectProperty) + if pushErr := writeBuffer.PushContext("logDeviceObjectProperty"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for logDeviceObjectProperty") + } + _logDeviceObjectPropertyErr := writeBuffer.WriteSerializable(ctx, m.GetLogDeviceObjectProperty()) + if popErr := writeBuffer.PopContext("logDeviceObjectProperty"); popErr != nil { + return errors.Wrap(popErr, "Error popping for logDeviceObjectProperty") + } + if _logDeviceObjectPropertyErr != nil { + return errors.Wrap(_logDeviceObjectPropertyErr, "Error serializing 'logDeviceObjectProperty' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataTrendLogLogDeviceObjectProperty"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataTrendLogLogDeviceObjectProperty") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataTrendLogLogDeviceObjectProperty) SerializeWithWri return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataTrendLogLogDeviceObjectProperty) isBACnetConstructedDataTrendLogLogDeviceObjectProperty() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataTrendLogLogDeviceObjectProperty) String() string } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTrendLogMultipleAll.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTrendLogMultipleAll.go index 555c5c49bac..7de22d34a47 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTrendLogMultipleAll.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTrendLogMultipleAll.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataTrendLogMultipleAll is the corresponding interface of BACnetConstructedDataTrendLogMultipleAll type BACnetConstructedDataTrendLogMultipleAll interface { @@ -46,38 +48,38 @@ type _BACnetConstructedDataTrendLogMultipleAll struct { *_BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataTrendLogMultipleAll) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_TREND_LOG_MULTIPLE -} +func (m *_BACnetConstructedDataTrendLogMultipleAll) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_TREND_LOG_MULTIPLE} -func (m *_BACnetConstructedDataTrendLogMultipleAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ALL -} +func (m *_BACnetConstructedDataTrendLogMultipleAll) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ALL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataTrendLogMultipleAll) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataTrendLogMultipleAll) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataTrendLogMultipleAll) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataTrendLogMultipleAll) GetParent() BACnetConstructedData { return m._BACnetConstructedData } + // NewBACnetConstructedDataTrendLogMultipleAll factory function for _BACnetConstructedDataTrendLogMultipleAll -func NewBACnetConstructedDataTrendLogMultipleAll(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataTrendLogMultipleAll { +func NewBACnetConstructedDataTrendLogMultipleAll( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataTrendLogMultipleAll { _result := &_BACnetConstructedDataTrendLogMultipleAll{ - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewBACnetConstructedDataTrendLogMultipleAll(openingTag BACnetOpeningTag, pe // Deprecated: use the interface for direct cast func CastBACnetConstructedDataTrendLogMultipleAll(structType interface{}) BACnetConstructedDataTrendLogMultipleAll { - if casted, ok := structType.(BACnetConstructedDataTrendLogMultipleAll); ok { + if casted, ok := structType.(BACnetConstructedDataTrendLogMultipleAll); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataTrendLogMultipleAll); ok { @@ -104,6 +106,7 @@ func (m *_BACnetConstructedDataTrendLogMultipleAll) GetLengthInBits(ctx context. return lengthInBits } + func (m *_BACnetConstructedDataTrendLogMultipleAll) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +125,7 @@ func BACnetConstructedDataTrendLogMultipleAllParseWithBuffer(ctx context.Context _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"All should never occur in context of constructed data. If it does please report"}) } @@ -133,7 +136,7 @@ func BACnetConstructedDataTrendLogMultipleAllParseWithBuffer(ctx context.Context // Create a partially initialized instance _child := &_BACnetConstructedDataTrendLogMultipleAll{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, } @@ -165,6 +168,7 @@ func (m *_BACnetConstructedDataTrendLogMultipleAll) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataTrendLogMultipleAll) isBACnetConstructedDataTrendLogMultipleAll() bool { return true } @@ -179,3 +183,6 @@ func (m *_BACnetConstructedDataTrendLogMultipleAll) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTrendLogMultipleLogBuffer.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTrendLogMultipleLogBuffer.go index 18b8e412036..4332f26ca92 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTrendLogMultipleLogBuffer.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTrendLogMultipleLogBuffer.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataTrendLogMultipleLogBuffer is the corresponding interface of BACnetConstructedDataTrendLogMultipleLogBuffer type BACnetConstructedDataTrendLogMultipleLogBuffer interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataTrendLogMultipleLogBufferExactly interface { // _BACnetConstructedDataTrendLogMultipleLogBuffer is the data-structure of this message type _BACnetConstructedDataTrendLogMultipleLogBuffer struct { *_BACnetConstructedData - FloorText []BACnetLogMultipleRecord + FloorText []BACnetLogMultipleRecord } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataTrendLogMultipleLogBuffer) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_TREND_LOG_MULTIPLE -} +func (m *_BACnetConstructedDataTrendLogMultipleLogBuffer) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_TREND_LOG_MULTIPLE} -func (m *_BACnetConstructedDataTrendLogMultipleLogBuffer) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LOG_BUFFER -} +func (m *_BACnetConstructedDataTrendLogMultipleLogBuffer) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LOG_BUFFER} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataTrendLogMultipleLogBuffer) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataTrendLogMultipleLogBuffer) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataTrendLogMultipleLogBuffer) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataTrendLogMultipleLogBuffer) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataTrendLogMultipleLogBuffer) GetFloorText() []BACne /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataTrendLogMultipleLogBuffer factory function for _BACnetConstructedDataTrendLogMultipleLogBuffer -func NewBACnetConstructedDataTrendLogMultipleLogBuffer(floorText []BACnetLogMultipleRecord, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataTrendLogMultipleLogBuffer { +func NewBACnetConstructedDataTrendLogMultipleLogBuffer( floorText []BACnetLogMultipleRecord , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataTrendLogMultipleLogBuffer { _result := &_BACnetConstructedDataTrendLogMultipleLogBuffer{ - FloorText: floorText, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + FloorText: floorText, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataTrendLogMultipleLogBuffer(floorText []BACnetLogMult // Deprecated: use the interface for direct cast func CastBACnetConstructedDataTrendLogMultipleLogBuffer(structType interface{}) BACnetConstructedDataTrendLogMultipleLogBuffer { - if casted, ok := structType.(BACnetConstructedDataTrendLogMultipleLogBuffer); ok { + if casted, ok := structType.(BACnetConstructedDataTrendLogMultipleLogBuffer); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataTrendLogMultipleLogBuffer); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataTrendLogMultipleLogBuffer) GetLengthInBits(ctx co return lengthInBits } + func (m *_BACnetConstructedDataTrendLogMultipleLogBuffer) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataTrendLogMultipleLogBufferParseWithBuffer(ctx context.C // Terminated array var floorText []BACnetLogMultipleRecord { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetLogMultipleRecordParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetLogMultipleRecordParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'floorText' field of BACnetConstructedDataTrendLogMultipleLogBuffer") } @@ -173,7 +175,7 @@ func BACnetConstructedDataTrendLogMultipleLogBufferParseWithBuffer(ctx context.C // Create a partially initialized instance _child := &_BACnetConstructedDataTrendLogMultipleLogBuffer{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, FloorText: floorText, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataTrendLogMultipleLogBuffer) SerializeWithWriteBuff return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataTrendLogMultipleLogBuffer") } - // Array Field (floorText) - if pushErr := writeBuffer.PushContext("floorText", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for floorText") - } - for _curItem, _element := range m.GetFloorText() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetFloorText()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'floorText' field") - } - } - if popErr := writeBuffer.PopContext("floorText", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for floorText") + // Array Field (floorText) + if pushErr := writeBuffer.PushContext("floorText", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for floorText") + } + for _curItem, _element := range m.GetFloorText() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetFloorText()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'floorText' field") } + } + if popErr := writeBuffer.PopContext("floorText", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for floorText") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataTrendLogMultipleLogBuffer"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataTrendLogMultipleLogBuffer") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataTrendLogMultipleLogBuffer) SerializeWithWriteBuff return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataTrendLogMultipleLogBuffer) isBACnetConstructedDataTrendLogMultipleLogBuffer() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataTrendLogMultipleLogBuffer) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty.go index 998cce9c7d4..e8044b84285 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty is the corresponding interface of BACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty type BACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataTrendLogMultipleLogDeviceObjectPropertyExactly interfa // _BACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty is the data-structure of this message type _BACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - GroupMembers []BACnetDeviceObjectPropertyReference + NumberOfDataElements BACnetApplicationTagUnsignedInteger + GroupMembers []BACnetDeviceObjectPropertyReference } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty) GetObjectTypeArgument() BACnetObjectType { - return BACnetObjectType_TREND_LOG_MULTIPLE -} +func (m *_BACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty) GetObjectTypeArgument() BACnetObjectType { +return BACnetObjectType_TREND_LOG_MULTIPLE} -func (m *_BACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_LOG_DEVICE_OBJECT_PROPERTY -} +func (m *_BACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_LOG_DEVICE_OBJECT_PROPERTY} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty) GetZero( /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty factory function for _BACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty -func NewBACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty(numberOfDataElements BACnetApplicationTagUnsignedInteger, groupMembers []BACnetDeviceObjectPropertyReference, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty { +func NewBACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty( numberOfDataElements BACnetApplicationTagUnsignedInteger , groupMembers []BACnetDeviceObjectPropertyReference , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty { _result := &_BACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty{ - NumberOfDataElements: numberOfDataElements, - GroupMembers: groupMembers, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + GroupMembers: groupMembers, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty(numberOfDat // Deprecated: use the interface for direct cast func CastBACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty(structType interface{}) BACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty { - if casted, ok := structType.(BACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty); ok { + if casted, ok := structType.(BACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty) GetLengt return lengthInBits } + func (m *_BACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataTrendLogMultipleLogDeviceObjectPropertyParseWithBuffer if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataTrendLogMultipleLogDeviceObjectPropertyParseWithBuffer // Terminated array var groupMembers []BACnetDeviceObjectPropertyReference { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetDeviceObjectPropertyReferenceParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetDeviceObjectPropertyReferenceParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'groupMembers' field of BACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty") } @@ -235,11 +237,11 @@ func BACnetConstructedDataTrendLogMultipleLogDeviceObjectPropertyParseWithBuffer // Create a partially initialized instance _child := &_BACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - GroupMembers: groupMembers, + GroupMembers: groupMembers, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty) Serializ if pushErr := writeBuffer.PushContext("BACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (groupMembers) - if pushErr := writeBuffer.PushContext("groupMembers", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for groupMembers") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetGroupMembers() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetGroupMembers()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'groupMembers' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("groupMembers", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for groupMembers") + } + + // Array Field (groupMembers) + if pushErr := writeBuffer.PushContext("groupMembers", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for groupMembers") + } + for _curItem, _element := range m.GetGroupMembers() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetGroupMembers()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'groupMembers' field") } + } + if popErr := writeBuffer.PopContext("groupMembers", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for groupMembers") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty) Serializ return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty) isBACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataTrendLogMultipleLogDeviceObjectProperty) String() } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTrigger.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTrigger.go index 8767bfe1087..097dcdfa316 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTrigger.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataTrigger.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataTrigger is the corresponding interface of BACnetConstructedDataTrigger type BACnetConstructedDataTrigger interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataTriggerExactly interface { // _BACnetConstructedDataTrigger is the data-structure of this message type _BACnetConstructedDataTrigger struct { *_BACnetConstructedData - Trigger BACnetApplicationTagBoolean + Trigger BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataTrigger) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataTrigger) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataTrigger) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_TRIGGER -} +func (m *_BACnetConstructedDataTrigger) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_TRIGGER} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataTrigger) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataTrigger) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataTrigger) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataTrigger) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataTrigger) GetActualValue() BACnetApplicationTagBoo /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataTrigger factory function for _BACnetConstructedDataTrigger -func NewBACnetConstructedDataTrigger(trigger BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataTrigger { +func NewBACnetConstructedDataTrigger( trigger BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataTrigger { _result := &_BACnetConstructedDataTrigger{ - Trigger: trigger, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Trigger: trigger, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataTrigger(trigger BACnetApplicationTagBoolean, openin // Deprecated: use the interface for direct cast func CastBACnetConstructedDataTrigger(structType interface{}) BACnetConstructedDataTrigger { - if casted, ok := structType.(BACnetConstructedDataTrigger); ok { + if casted, ok := structType.(BACnetConstructedDataTrigger); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataTrigger); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataTrigger) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_BACnetConstructedDataTrigger) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataTriggerParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("trigger"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for trigger") } - _trigger, _triggerErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_trigger, _triggerErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _triggerErr != nil { return nil, errors.Wrap(_triggerErr, "Error parsing 'trigger' field of BACnetConstructedDataTrigger") } @@ -186,7 +188,7 @@ func BACnetConstructedDataTriggerParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_BACnetConstructedDataTrigger{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Trigger: trigger, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataTrigger) SerializeWithWriteBuffer(ctx context.Con return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataTrigger") } - // Simple Field (trigger) - if pushErr := writeBuffer.PushContext("trigger"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for trigger") - } - _triggerErr := writeBuffer.WriteSerializable(ctx, m.GetTrigger()) - if popErr := writeBuffer.PopContext("trigger"); popErr != nil { - return errors.Wrap(popErr, "Error popping for trigger") - } - if _triggerErr != nil { - return errors.Wrap(_triggerErr, "Error serializing 'trigger' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (trigger) + if pushErr := writeBuffer.PushContext("trigger"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for trigger") + } + _triggerErr := writeBuffer.WriteSerializable(ctx, m.GetTrigger()) + if popErr := writeBuffer.PopContext("trigger"); popErr != nil { + return errors.Wrap(popErr, "Error popping for trigger") + } + if _triggerErr != nil { + return errors.Wrap(_triggerErr, "Error serializing 'trigger' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataTrigger"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataTrigger") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataTrigger) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataTrigger) isBACnetConstructedDataTrigger() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataTrigger) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUTCOffset.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUTCOffset.go index 31891933a5f..f1ca6a334ea 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUTCOffset.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUTCOffset.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataUTCOffset is the corresponding interface of BACnetConstructedDataUTCOffset type BACnetConstructedDataUTCOffset interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataUTCOffsetExactly interface { // _BACnetConstructedDataUTCOffset is the data-structure of this message type _BACnetConstructedDataUTCOffset struct { *_BACnetConstructedData - UtcOffset BACnetApplicationTagSignedInteger + UtcOffset BACnetApplicationTagSignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataUTCOffset) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataUTCOffset) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataUTCOffset) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_UTC_OFFSET -} +func (m *_BACnetConstructedDataUTCOffset) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_UTC_OFFSET} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataUTCOffset) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataUTCOffset) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataUTCOffset) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataUTCOffset) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataUTCOffset) GetActualValue() BACnetApplicationTagS /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataUTCOffset factory function for _BACnetConstructedDataUTCOffset -func NewBACnetConstructedDataUTCOffset(utcOffset BACnetApplicationTagSignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataUTCOffset { +func NewBACnetConstructedDataUTCOffset( utcOffset BACnetApplicationTagSignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataUTCOffset { _result := &_BACnetConstructedDataUTCOffset{ - UtcOffset: utcOffset, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + UtcOffset: utcOffset, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataUTCOffset(utcOffset BACnetApplicationTagSignedInteg // Deprecated: use the interface for direct cast func CastBACnetConstructedDataUTCOffset(structType interface{}) BACnetConstructedDataUTCOffset { - if casted, ok := structType.(BACnetConstructedDataUTCOffset); ok { + if casted, ok := structType.(BACnetConstructedDataUTCOffset); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataUTCOffset); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataUTCOffset) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetConstructedDataUTCOffset) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataUTCOffsetParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("utcOffset"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for utcOffset") } - _utcOffset, _utcOffsetErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_utcOffset, _utcOffsetErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _utcOffsetErr != nil { return nil, errors.Wrap(_utcOffsetErr, "Error parsing 'utcOffset' field of BACnetConstructedDataUTCOffset") } @@ -186,7 +188,7 @@ func BACnetConstructedDataUTCOffsetParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_BACnetConstructedDataUTCOffset{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, UtcOffset: utcOffset, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataUTCOffset) SerializeWithWriteBuffer(ctx context.C return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataUTCOffset") } - // Simple Field (utcOffset) - if pushErr := writeBuffer.PushContext("utcOffset"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for utcOffset") - } - _utcOffsetErr := writeBuffer.WriteSerializable(ctx, m.GetUtcOffset()) - if popErr := writeBuffer.PopContext("utcOffset"); popErr != nil { - return errors.Wrap(popErr, "Error popping for utcOffset") - } - if _utcOffsetErr != nil { - return errors.Wrap(_utcOffsetErr, "Error serializing 'utcOffset' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (utcOffset) + if pushErr := writeBuffer.PushContext("utcOffset"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for utcOffset") + } + _utcOffsetErr := writeBuffer.WriteSerializable(ctx, m.GetUtcOffset()) + if popErr := writeBuffer.PopContext("utcOffset"); popErr != nil { + return errors.Wrap(popErr, "Error popping for utcOffset") + } + if _utcOffsetErr != nil { + return errors.Wrap(_utcOffsetErr, "Error serializing 'utcOffset' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataUTCOffset"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataUTCOffset") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataUTCOffset) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataUTCOffset) isBACnetConstructedDataUTCOffset() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataUTCOffset) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUTCTimeSynchronizationRecipients.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUTCTimeSynchronizationRecipients.go index b017eea5729..274fddc5813 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUTCTimeSynchronizationRecipients.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUTCTimeSynchronizationRecipients.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataUTCTimeSynchronizationRecipients is the corresponding interface of BACnetConstructedDataUTCTimeSynchronizationRecipients type BACnetConstructedDataUTCTimeSynchronizationRecipients interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataUTCTimeSynchronizationRecipientsExactly interface { // _BACnetConstructedDataUTCTimeSynchronizationRecipients is the data-structure of this message type _BACnetConstructedDataUTCTimeSynchronizationRecipients struct { *_BACnetConstructedData - UtcTimeSynchronizationRecipients []BACnetRecipient + UtcTimeSynchronizationRecipients []BACnetRecipient } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataUTCTimeSynchronizationRecipients) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataUTCTimeSynchronizationRecipients) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataUTCTimeSynchronizationRecipients) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_UTC_TIME_SYNCHRONIZATION_RECIPIENTS -} +func (m *_BACnetConstructedDataUTCTimeSynchronizationRecipients) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_UTC_TIME_SYNCHRONIZATION_RECIPIENTS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataUTCTimeSynchronizationRecipients) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataUTCTimeSynchronizationRecipients) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataUTCTimeSynchronizationRecipients) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataUTCTimeSynchronizationRecipients) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataUTCTimeSynchronizationRecipients) GetUtcTimeSynch /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataUTCTimeSynchronizationRecipients factory function for _BACnetConstructedDataUTCTimeSynchronizationRecipients -func NewBACnetConstructedDataUTCTimeSynchronizationRecipients(utcTimeSynchronizationRecipients []BACnetRecipient, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataUTCTimeSynchronizationRecipients { +func NewBACnetConstructedDataUTCTimeSynchronizationRecipients( utcTimeSynchronizationRecipients []BACnetRecipient , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataUTCTimeSynchronizationRecipients { _result := &_BACnetConstructedDataUTCTimeSynchronizationRecipients{ UtcTimeSynchronizationRecipients: utcTimeSynchronizationRecipients, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataUTCTimeSynchronizationRecipients(utcTimeSynchroniza // Deprecated: use the interface for direct cast func CastBACnetConstructedDataUTCTimeSynchronizationRecipients(structType interface{}) BACnetConstructedDataUTCTimeSynchronizationRecipients { - if casted, ok := structType.(BACnetConstructedDataUTCTimeSynchronizationRecipients); ok { + if casted, ok := structType.(BACnetConstructedDataUTCTimeSynchronizationRecipients); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataUTCTimeSynchronizationRecipients); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataUTCTimeSynchronizationRecipients) GetLengthInBits return lengthInBits } + func (m *_BACnetConstructedDataUTCTimeSynchronizationRecipients) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataUTCTimeSynchronizationRecipientsParseWithBuffer(ctx co // Terminated array var utcTimeSynchronizationRecipients []BACnetRecipient { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetRecipientParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetRecipientParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'utcTimeSynchronizationRecipients' field of BACnetConstructedDataUTCTimeSynchronizationRecipients") } @@ -173,7 +175,7 @@ func BACnetConstructedDataUTCTimeSynchronizationRecipientsParseWithBuffer(ctx co // Create a partially initialized instance _child := &_BACnetConstructedDataUTCTimeSynchronizationRecipients{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, UtcTimeSynchronizationRecipients: utcTimeSynchronizationRecipients, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataUTCTimeSynchronizationRecipients) SerializeWithWr return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataUTCTimeSynchronizationRecipients") } - // Array Field (utcTimeSynchronizationRecipients) - if pushErr := writeBuffer.PushContext("utcTimeSynchronizationRecipients", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for utcTimeSynchronizationRecipients") - } - for _curItem, _element := range m.GetUtcTimeSynchronizationRecipients() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetUtcTimeSynchronizationRecipients()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'utcTimeSynchronizationRecipients' field") - } - } - if popErr := writeBuffer.PopContext("utcTimeSynchronizationRecipients", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for utcTimeSynchronizationRecipients") + // Array Field (utcTimeSynchronizationRecipients) + if pushErr := writeBuffer.PushContext("utcTimeSynchronizationRecipients", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for utcTimeSynchronizationRecipients") + } + for _curItem, _element := range m.GetUtcTimeSynchronizationRecipients() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetUtcTimeSynchronizationRecipients()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'utcTimeSynchronizationRecipients' field") } + } + if popErr := writeBuffer.PopContext("utcTimeSynchronizationRecipients", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for utcTimeSynchronizationRecipients") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataUTCTimeSynchronizationRecipients"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataUTCTimeSynchronizationRecipients") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataUTCTimeSynchronizationRecipients) SerializeWithWr return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataUTCTimeSynchronizationRecipients) isBACnetConstructedDataUTCTimeSynchronizationRecipients() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataUTCTimeSynchronizationRecipients) String() string } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUnits.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUnits.go index d81ba00f0e3..ad03ba7752f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUnits.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUnits.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataUnits is the corresponding interface of BACnetConstructedDataUnits type BACnetConstructedDataUnits interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataUnitsExactly interface { // _BACnetConstructedDataUnits is the data-structure of this message type _BACnetConstructedDataUnits struct { *_BACnetConstructedData - Units BACnetEngineeringUnitsTagged + Units BACnetEngineeringUnitsTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataUnits) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataUnits) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataUnits) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_UNITS -} +func (m *_BACnetConstructedDataUnits) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_UNITS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataUnits) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataUnits) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataUnits) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataUnits) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataUnits) GetActualValue() BACnetEngineeringUnitsTag /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataUnits factory function for _BACnetConstructedDataUnits -func NewBACnetConstructedDataUnits(units BACnetEngineeringUnitsTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataUnits { +func NewBACnetConstructedDataUnits( units BACnetEngineeringUnitsTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataUnits { _result := &_BACnetConstructedDataUnits{ - Units: units, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Units: units, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataUnits(units BACnetEngineeringUnitsTagged, openingTa // Deprecated: use the interface for direct cast func CastBACnetConstructedDataUnits(structType interface{}) BACnetConstructedDataUnits { - if casted, ok := structType.(BACnetConstructedDataUnits); ok { + if casted, ok := structType.(BACnetConstructedDataUnits); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataUnits); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataUnits) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_BACnetConstructedDataUnits) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataUnitsParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("units"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for units") } - _units, _unitsErr := BACnetEngineeringUnitsTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_units, _unitsErr := BACnetEngineeringUnitsTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _unitsErr != nil { return nil, errors.Wrap(_unitsErr, "Error parsing 'units' field of BACnetConstructedDataUnits") } @@ -186,7 +188,7 @@ func BACnetConstructedDataUnitsParseWithBuffer(ctx context.Context, readBuffer u // Create a partially initialized instance _child := &_BACnetConstructedDataUnits{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Units: units, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataUnits) SerializeWithWriteBuffer(ctx context.Conte return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataUnits") } - // Simple Field (units) - if pushErr := writeBuffer.PushContext("units"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for units") - } - _unitsErr := writeBuffer.WriteSerializable(ctx, m.GetUnits()) - if popErr := writeBuffer.PopContext("units"); popErr != nil { - return errors.Wrap(popErr, "Error popping for units") - } - if _unitsErr != nil { - return errors.Wrap(_unitsErr, "Error serializing 'units' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (units) + if pushErr := writeBuffer.PushContext("units"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for units") + } + _unitsErr := writeBuffer.WriteSerializable(ctx, m.GetUnits()) + if popErr := writeBuffer.PopContext("units"); popErr != nil { + return errors.Wrap(popErr, "Error popping for units") + } + if _unitsErr != nil { + return errors.Wrap(_unitsErr, "Error serializing 'units' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataUnits"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataUnits") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataUnits) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataUnits) isBACnetConstructedDataUnits() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataUnits) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUnspecified.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUnspecified.go index f98dd32d60f..5cdef2b9e2f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUnspecified.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUnspecified.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataUnspecified is the corresponding interface of BACnetConstructedDataUnspecified type BACnetConstructedDataUnspecified interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataUnspecifiedExactly interface { // _BACnetConstructedDataUnspecified is the data-structure of this message type _BACnetConstructedDataUnspecified struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - Data []BACnetConstructedDataElement + NumberOfDataElements BACnetApplicationTagUnsignedInteger + Data []BACnetConstructedDataElement } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataUnspecified) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataUnspecified) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataUnspecified) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return 0 -} +func (m *_BACnetConstructedDataUnspecified) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return 0} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataUnspecified) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataUnspecified) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataUnspecified) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataUnspecified) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataUnspecified) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataUnspecified factory function for _BACnetConstructedDataUnspecified -func NewBACnetConstructedDataUnspecified(numberOfDataElements BACnetApplicationTagUnsignedInteger, data []BACnetConstructedDataElement, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataUnspecified { +func NewBACnetConstructedDataUnspecified( numberOfDataElements BACnetApplicationTagUnsignedInteger , data []BACnetConstructedDataElement , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataUnspecified { _result := &_BACnetConstructedDataUnspecified{ - NumberOfDataElements: numberOfDataElements, - Data: data, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + Data: data, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataUnspecified(numberOfDataElements BACnetApplicationT // Deprecated: use the interface for direct cast func CastBACnetConstructedDataUnspecified(structType interface{}) BACnetConstructedDataUnspecified { - if casted, ok := structType.(BACnetConstructedDataUnspecified); ok { + if casted, ok := structType.(BACnetConstructedDataUnspecified); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataUnspecified); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataUnspecified) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataUnspecified) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataUnspecifiedParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataUnspecifiedParseWithBuffer(ctx context.Context, readBu // Terminated array var data []BACnetConstructedDataElement { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetConstructedDataElementParseWithBuffer(ctx, readBuffer, objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetConstructedDataElementParseWithBuffer(ctx, readBuffer , objectTypeArgument , propertyIdentifierArgument , arrayIndexArgument ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'data' field of BACnetConstructedDataUnspecified") } @@ -235,11 +237,11 @@ func BACnetConstructedDataUnspecifiedParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataUnspecified{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - Data: data, + Data: data, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -260,43 +262,43 @@ func (m *_BACnetConstructedDataUnspecified) SerializeWithWriteBuffer(ctx context if pushErr := writeBuffer.PushContext("BACnetConstructedDataUnspecified"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataUnspecified") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (data) - if pushErr := writeBuffer.PushContext("data", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for data") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetData() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetData()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'data' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("data", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for data") + } + + // Array Field (data) + if pushErr := writeBuffer.PushContext("data", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for data") + } + for _curItem, _element := range m.GetData() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetData()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'data' field") } + } + if popErr := writeBuffer.PopContext("data", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for data") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataUnspecified"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataUnspecified") @@ -306,6 +308,7 @@ func (m *_BACnetConstructedDataUnspecified) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataUnspecified) isBACnetConstructedDataUnspecified() bool { return true } @@ -320,3 +323,6 @@ func (m *_BACnetConstructedDataUnspecified) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUpdateInterval.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUpdateInterval.go index f124498581f..c9c758f7c90 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUpdateInterval.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUpdateInterval.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataUpdateInterval is the corresponding interface of BACnetConstructedDataUpdateInterval type BACnetConstructedDataUpdateInterval interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataUpdateIntervalExactly interface { // _BACnetConstructedDataUpdateInterval is the data-structure of this message type _BACnetConstructedDataUpdateInterval struct { *_BACnetConstructedData - UpdateInterval BACnetApplicationTagUnsignedInteger + UpdateInterval BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataUpdateInterval) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataUpdateInterval) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataUpdateInterval) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_UPDATE_INTERVAL -} +func (m *_BACnetConstructedDataUpdateInterval) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_UPDATE_INTERVAL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataUpdateInterval) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataUpdateInterval) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataUpdateInterval) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataUpdateInterval) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataUpdateInterval) GetActualValue() BACnetApplicatio /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataUpdateInterval factory function for _BACnetConstructedDataUpdateInterval -func NewBACnetConstructedDataUpdateInterval(updateInterval BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataUpdateInterval { +func NewBACnetConstructedDataUpdateInterval( updateInterval BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataUpdateInterval { _result := &_BACnetConstructedDataUpdateInterval{ - UpdateInterval: updateInterval, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + UpdateInterval: updateInterval, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataUpdateInterval(updateInterval BACnetApplicationTagU // Deprecated: use the interface for direct cast func CastBACnetConstructedDataUpdateInterval(structType interface{}) BACnetConstructedDataUpdateInterval { - if casted, ok := structType.(BACnetConstructedDataUpdateInterval); ok { + if casted, ok := structType.(BACnetConstructedDataUpdateInterval); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataUpdateInterval); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataUpdateInterval) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConstructedDataUpdateInterval) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataUpdateIntervalParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("updateInterval"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for updateInterval") } - _updateInterval, _updateIntervalErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_updateInterval, _updateIntervalErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _updateIntervalErr != nil { return nil, errors.Wrap(_updateIntervalErr, "Error parsing 'updateInterval' field of BACnetConstructedDataUpdateInterval") } @@ -186,7 +188,7 @@ func BACnetConstructedDataUpdateIntervalParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetConstructedDataUpdateInterval{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, UpdateInterval: updateInterval, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataUpdateInterval) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataUpdateInterval") } - // Simple Field (updateInterval) - if pushErr := writeBuffer.PushContext("updateInterval"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for updateInterval") - } - _updateIntervalErr := writeBuffer.WriteSerializable(ctx, m.GetUpdateInterval()) - if popErr := writeBuffer.PopContext("updateInterval"); popErr != nil { - return errors.Wrap(popErr, "Error popping for updateInterval") - } - if _updateIntervalErr != nil { - return errors.Wrap(_updateIntervalErr, "Error serializing 'updateInterval' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (updateInterval) + if pushErr := writeBuffer.PushContext("updateInterval"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for updateInterval") + } + _updateIntervalErr := writeBuffer.WriteSerializable(ctx, m.GetUpdateInterval()) + if popErr := writeBuffer.PopContext("updateInterval"); popErr != nil { + return errors.Wrap(popErr, "Error popping for updateInterval") + } + if _updateIntervalErr != nil { + return errors.Wrap(_updateIntervalErr, "Error serializing 'updateInterval' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataUpdateInterval"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataUpdateInterval") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataUpdateInterval) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataUpdateInterval) isBACnetConstructedDataUpdateInterval() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataUpdateInterval) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUpdateKeySetTimeout.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUpdateKeySetTimeout.go index d445ff2e0cc..ee2e3b0e682 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUpdateKeySetTimeout.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUpdateKeySetTimeout.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataUpdateKeySetTimeout is the corresponding interface of BACnetConstructedDataUpdateKeySetTimeout type BACnetConstructedDataUpdateKeySetTimeout interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataUpdateKeySetTimeoutExactly interface { // _BACnetConstructedDataUpdateKeySetTimeout is the data-structure of this message type _BACnetConstructedDataUpdateKeySetTimeout struct { *_BACnetConstructedData - UpdateKeySetTimeout BACnetApplicationTagUnsignedInteger + UpdateKeySetTimeout BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataUpdateKeySetTimeout) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataUpdateKeySetTimeout) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataUpdateKeySetTimeout) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_UPDATE_KEY_SET_TIMEOUT -} +func (m *_BACnetConstructedDataUpdateKeySetTimeout) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_UPDATE_KEY_SET_TIMEOUT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataUpdateKeySetTimeout) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataUpdateKeySetTimeout) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataUpdateKeySetTimeout) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataUpdateKeySetTimeout) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataUpdateKeySetTimeout) GetActualValue() BACnetAppli /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataUpdateKeySetTimeout factory function for _BACnetConstructedDataUpdateKeySetTimeout -func NewBACnetConstructedDataUpdateKeySetTimeout(updateKeySetTimeout BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataUpdateKeySetTimeout { +func NewBACnetConstructedDataUpdateKeySetTimeout( updateKeySetTimeout BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataUpdateKeySetTimeout { _result := &_BACnetConstructedDataUpdateKeySetTimeout{ - UpdateKeySetTimeout: updateKeySetTimeout, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + UpdateKeySetTimeout: updateKeySetTimeout, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataUpdateKeySetTimeout(updateKeySetTimeout BACnetAppli // Deprecated: use the interface for direct cast func CastBACnetConstructedDataUpdateKeySetTimeout(structType interface{}) BACnetConstructedDataUpdateKeySetTimeout { - if casted, ok := structType.(BACnetConstructedDataUpdateKeySetTimeout); ok { + if casted, ok := structType.(BACnetConstructedDataUpdateKeySetTimeout); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataUpdateKeySetTimeout); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataUpdateKeySetTimeout) GetLengthInBits(ctx context. return lengthInBits } + func (m *_BACnetConstructedDataUpdateKeySetTimeout) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataUpdateKeySetTimeoutParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("updateKeySetTimeout"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for updateKeySetTimeout") } - _updateKeySetTimeout, _updateKeySetTimeoutErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_updateKeySetTimeout, _updateKeySetTimeoutErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _updateKeySetTimeoutErr != nil { return nil, errors.Wrap(_updateKeySetTimeoutErr, "Error parsing 'updateKeySetTimeout' field of BACnetConstructedDataUpdateKeySetTimeout") } @@ -186,7 +188,7 @@ func BACnetConstructedDataUpdateKeySetTimeoutParseWithBuffer(ctx context.Context // Create a partially initialized instance _child := &_BACnetConstructedDataUpdateKeySetTimeout{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, UpdateKeySetTimeout: updateKeySetTimeout, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataUpdateKeySetTimeout) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataUpdateKeySetTimeout") } - // Simple Field (updateKeySetTimeout) - if pushErr := writeBuffer.PushContext("updateKeySetTimeout"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for updateKeySetTimeout") - } - _updateKeySetTimeoutErr := writeBuffer.WriteSerializable(ctx, m.GetUpdateKeySetTimeout()) - if popErr := writeBuffer.PopContext("updateKeySetTimeout"); popErr != nil { - return errors.Wrap(popErr, "Error popping for updateKeySetTimeout") - } - if _updateKeySetTimeoutErr != nil { - return errors.Wrap(_updateKeySetTimeoutErr, "Error serializing 'updateKeySetTimeout' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (updateKeySetTimeout) + if pushErr := writeBuffer.PushContext("updateKeySetTimeout"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for updateKeySetTimeout") + } + _updateKeySetTimeoutErr := writeBuffer.WriteSerializable(ctx, m.GetUpdateKeySetTimeout()) + if popErr := writeBuffer.PopContext("updateKeySetTimeout"); popErr != nil { + return errors.Wrap(popErr, "Error popping for updateKeySetTimeout") + } + if _updateKeySetTimeoutErr != nil { + return errors.Wrap(_updateKeySetTimeoutErr, "Error serializing 'updateKeySetTimeout' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataUpdateKeySetTimeout"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataUpdateKeySetTimeout") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataUpdateKeySetTimeout) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataUpdateKeySetTimeout) isBACnetConstructedDataUpdateKeySetTimeout() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataUpdateKeySetTimeout) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUpdateTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUpdateTime.go index b2afdba5a20..07801b03468 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUpdateTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUpdateTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataUpdateTime is the corresponding interface of BACnetConstructedDataUpdateTime type BACnetConstructedDataUpdateTime interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataUpdateTimeExactly interface { // _BACnetConstructedDataUpdateTime is the data-structure of this message type _BACnetConstructedDataUpdateTime struct { *_BACnetConstructedData - UpdateTime BACnetDateTime + UpdateTime BACnetDateTime } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataUpdateTime) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataUpdateTime) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataUpdateTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_UPDATE_TIME -} +func (m *_BACnetConstructedDataUpdateTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_UPDATE_TIME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataUpdateTime) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataUpdateTime) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataUpdateTime) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataUpdateTime) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataUpdateTime) GetActualValue() BACnetDateTime { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataUpdateTime factory function for _BACnetConstructedDataUpdateTime -func NewBACnetConstructedDataUpdateTime(updateTime BACnetDateTime, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataUpdateTime { +func NewBACnetConstructedDataUpdateTime( updateTime BACnetDateTime , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataUpdateTime { _result := &_BACnetConstructedDataUpdateTime{ - UpdateTime: updateTime, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + UpdateTime: updateTime, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataUpdateTime(updateTime BACnetDateTime, openingTag BA // Deprecated: use the interface for direct cast func CastBACnetConstructedDataUpdateTime(structType interface{}) BACnetConstructedDataUpdateTime { - if casted, ok := structType.(BACnetConstructedDataUpdateTime); ok { + if casted, ok := structType.(BACnetConstructedDataUpdateTime); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataUpdateTime); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataUpdateTime) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataUpdateTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataUpdateTimeParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("updateTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for updateTime") } - _updateTime, _updateTimeErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) +_updateTime, _updateTimeErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) if _updateTimeErr != nil { return nil, errors.Wrap(_updateTimeErr, "Error parsing 'updateTime' field of BACnetConstructedDataUpdateTime") } @@ -186,7 +188,7 @@ func BACnetConstructedDataUpdateTimeParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetConstructedDataUpdateTime{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, UpdateTime: updateTime, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataUpdateTime) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataUpdateTime") } - // Simple Field (updateTime) - if pushErr := writeBuffer.PushContext("updateTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for updateTime") - } - _updateTimeErr := writeBuffer.WriteSerializable(ctx, m.GetUpdateTime()) - if popErr := writeBuffer.PopContext("updateTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for updateTime") - } - if _updateTimeErr != nil { - return errors.Wrap(_updateTimeErr, "Error serializing 'updateTime' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (updateTime) + if pushErr := writeBuffer.PushContext("updateTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for updateTime") + } + _updateTimeErr := writeBuffer.WriteSerializable(ctx, m.GetUpdateTime()) + if popErr := writeBuffer.PopContext("updateTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for updateTime") + } + if _updateTimeErr != nil { + return errors.Wrap(_updateTimeErr, "Error serializing 'updateTime' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataUpdateTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataUpdateTime") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataUpdateTime) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataUpdateTime) isBACnetConstructedDataUpdateTime() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataUpdateTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUserExternalIdentifier.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUserExternalIdentifier.go index b88cd1ddfea..a81dcbbc474 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUserExternalIdentifier.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUserExternalIdentifier.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataUserExternalIdentifier is the corresponding interface of BACnetConstructedDataUserExternalIdentifier type BACnetConstructedDataUserExternalIdentifier interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataUserExternalIdentifierExactly interface { // _BACnetConstructedDataUserExternalIdentifier is the data-structure of this message type _BACnetConstructedDataUserExternalIdentifier struct { *_BACnetConstructedData - UserExternalIdentifier BACnetApplicationTagCharacterString + UserExternalIdentifier BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataUserExternalIdentifier) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataUserExternalIdentifier) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataUserExternalIdentifier) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_USER_EXTERNAL_IDENTIFIER -} +func (m *_BACnetConstructedDataUserExternalIdentifier) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_USER_EXTERNAL_IDENTIFIER} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataUserExternalIdentifier) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataUserExternalIdentifier) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataUserExternalIdentifier) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataUserExternalIdentifier) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataUserExternalIdentifier) GetActualValue() BACnetAp /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataUserExternalIdentifier factory function for _BACnetConstructedDataUserExternalIdentifier -func NewBACnetConstructedDataUserExternalIdentifier(userExternalIdentifier BACnetApplicationTagCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataUserExternalIdentifier { +func NewBACnetConstructedDataUserExternalIdentifier( userExternalIdentifier BACnetApplicationTagCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataUserExternalIdentifier { _result := &_BACnetConstructedDataUserExternalIdentifier{ UserExternalIdentifier: userExternalIdentifier, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataUserExternalIdentifier(userExternalIdentifier BACne // Deprecated: use the interface for direct cast func CastBACnetConstructedDataUserExternalIdentifier(structType interface{}) BACnetConstructedDataUserExternalIdentifier { - if casted, ok := structType.(BACnetConstructedDataUserExternalIdentifier); ok { + if casted, ok := structType.(BACnetConstructedDataUserExternalIdentifier); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataUserExternalIdentifier); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataUserExternalIdentifier) GetLengthInBits(ctx conte return lengthInBits } + func (m *_BACnetConstructedDataUserExternalIdentifier) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataUserExternalIdentifierParseWithBuffer(ctx context.Cont if pullErr := readBuffer.PullContext("userExternalIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for userExternalIdentifier") } - _userExternalIdentifier, _userExternalIdentifierErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_userExternalIdentifier, _userExternalIdentifierErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _userExternalIdentifierErr != nil { return nil, errors.Wrap(_userExternalIdentifierErr, "Error parsing 'userExternalIdentifier' field of BACnetConstructedDataUserExternalIdentifier") } @@ -186,7 +188,7 @@ func BACnetConstructedDataUserExternalIdentifierParseWithBuffer(ctx context.Cont // Create a partially initialized instance _child := &_BACnetConstructedDataUserExternalIdentifier{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, UserExternalIdentifier: userExternalIdentifier, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataUserExternalIdentifier) SerializeWithWriteBuffer( return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataUserExternalIdentifier") } - // Simple Field (userExternalIdentifier) - if pushErr := writeBuffer.PushContext("userExternalIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for userExternalIdentifier") - } - _userExternalIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetUserExternalIdentifier()) - if popErr := writeBuffer.PopContext("userExternalIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for userExternalIdentifier") - } - if _userExternalIdentifierErr != nil { - return errors.Wrap(_userExternalIdentifierErr, "Error serializing 'userExternalIdentifier' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (userExternalIdentifier) + if pushErr := writeBuffer.PushContext("userExternalIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for userExternalIdentifier") + } + _userExternalIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetUserExternalIdentifier()) + if popErr := writeBuffer.PopContext("userExternalIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for userExternalIdentifier") + } + if _userExternalIdentifierErr != nil { + return errors.Wrap(_userExternalIdentifierErr, "Error serializing 'userExternalIdentifier' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataUserExternalIdentifier"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataUserExternalIdentifier") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataUserExternalIdentifier) SerializeWithWriteBuffer( return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataUserExternalIdentifier) isBACnetConstructedDataUserExternalIdentifier() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataUserExternalIdentifier) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUserInformationReference.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUserInformationReference.go index c1cec308e2d..fef907cba71 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUserInformationReference.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUserInformationReference.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataUserInformationReference is the corresponding interface of BACnetConstructedDataUserInformationReference type BACnetConstructedDataUserInformationReference interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataUserInformationReferenceExactly interface { // _BACnetConstructedDataUserInformationReference is the data-structure of this message type _BACnetConstructedDataUserInformationReference struct { *_BACnetConstructedData - UserInformationReference BACnetApplicationTagCharacterString + UserInformationReference BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataUserInformationReference) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataUserInformationReference) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataUserInformationReference) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_USER_INFORMATION_REFERENCE -} +func (m *_BACnetConstructedDataUserInformationReference) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_USER_INFORMATION_REFERENCE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataUserInformationReference) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataUserInformationReference) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataUserInformationReference) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataUserInformationReference) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataUserInformationReference) GetActualValue() BACnet /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataUserInformationReference factory function for _BACnetConstructedDataUserInformationReference -func NewBACnetConstructedDataUserInformationReference(userInformationReference BACnetApplicationTagCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataUserInformationReference { +func NewBACnetConstructedDataUserInformationReference( userInformationReference BACnetApplicationTagCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataUserInformationReference { _result := &_BACnetConstructedDataUserInformationReference{ UserInformationReference: userInformationReference, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataUserInformationReference(userInformationReference B // Deprecated: use the interface for direct cast func CastBACnetConstructedDataUserInformationReference(structType interface{}) BACnetConstructedDataUserInformationReference { - if casted, ok := structType.(BACnetConstructedDataUserInformationReference); ok { + if casted, ok := structType.(BACnetConstructedDataUserInformationReference); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataUserInformationReference); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataUserInformationReference) GetLengthInBits(ctx con return lengthInBits } + func (m *_BACnetConstructedDataUserInformationReference) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataUserInformationReferenceParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("userInformationReference"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for userInformationReference") } - _userInformationReference, _userInformationReferenceErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_userInformationReference, _userInformationReferenceErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _userInformationReferenceErr != nil { return nil, errors.Wrap(_userInformationReferenceErr, "Error parsing 'userInformationReference' field of BACnetConstructedDataUserInformationReference") } @@ -186,7 +188,7 @@ func BACnetConstructedDataUserInformationReferenceParseWithBuffer(ctx context.Co // Create a partially initialized instance _child := &_BACnetConstructedDataUserInformationReference{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, UserInformationReference: userInformationReference, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataUserInformationReference) SerializeWithWriteBuffe return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataUserInformationReference") } - // Simple Field (userInformationReference) - if pushErr := writeBuffer.PushContext("userInformationReference"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for userInformationReference") - } - _userInformationReferenceErr := writeBuffer.WriteSerializable(ctx, m.GetUserInformationReference()) - if popErr := writeBuffer.PopContext("userInformationReference"); popErr != nil { - return errors.Wrap(popErr, "Error popping for userInformationReference") - } - if _userInformationReferenceErr != nil { - return errors.Wrap(_userInformationReferenceErr, "Error serializing 'userInformationReference' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (userInformationReference) + if pushErr := writeBuffer.PushContext("userInformationReference"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for userInformationReference") + } + _userInformationReferenceErr := writeBuffer.WriteSerializable(ctx, m.GetUserInformationReference()) + if popErr := writeBuffer.PopContext("userInformationReference"); popErr != nil { + return errors.Wrap(popErr, "Error popping for userInformationReference") + } + if _userInformationReferenceErr != nil { + return errors.Wrap(_userInformationReferenceErr, "Error serializing 'userInformationReference' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataUserInformationReference"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataUserInformationReference") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataUserInformationReference) SerializeWithWriteBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataUserInformationReference) isBACnetConstructedDataUserInformationReference() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataUserInformationReference) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUserName.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUserName.go index 878c0a5a11e..cb6f87df00b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUserName.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUserName.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataUserName is the corresponding interface of BACnetConstructedDataUserName type BACnetConstructedDataUserName interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataUserNameExactly interface { // _BACnetConstructedDataUserName is the data-structure of this message type _BACnetConstructedDataUserName struct { *_BACnetConstructedData - UserName BACnetApplicationTagCharacterString + UserName BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataUserName) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataUserName) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataUserName) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_USER_NAME -} +func (m *_BACnetConstructedDataUserName) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_USER_NAME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataUserName) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataUserName) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataUserName) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataUserName) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataUserName) GetActualValue() BACnetApplicationTagCh /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataUserName factory function for _BACnetConstructedDataUserName -func NewBACnetConstructedDataUserName(userName BACnetApplicationTagCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataUserName { +func NewBACnetConstructedDataUserName( userName BACnetApplicationTagCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataUserName { _result := &_BACnetConstructedDataUserName{ - UserName: userName, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + UserName: userName, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataUserName(userName BACnetApplicationTagCharacterStri // Deprecated: use the interface for direct cast func CastBACnetConstructedDataUserName(structType interface{}) BACnetConstructedDataUserName { - if casted, ok := structType.(BACnetConstructedDataUserName); ok { + if casted, ok := structType.(BACnetConstructedDataUserName); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataUserName); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataUserName) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetConstructedDataUserName) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataUserNameParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("userName"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for userName") } - _userName, _userNameErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_userName, _userNameErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _userNameErr != nil { return nil, errors.Wrap(_userNameErr, "Error parsing 'userName' field of BACnetConstructedDataUserName") } @@ -186,7 +188,7 @@ func BACnetConstructedDataUserNameParseWithBuffer(ctx context.Context, readBuffe // Create a partially initialized instance _child := &_BACnetConstructedDataUserName{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, UserName: userName, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataUserName) SerializeWithWriteBuffer(ctx context.Co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataUserName") } - // Simple Field (userName) - if pushErr := writeBuffer.PushContext("userName"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for userName") - } - _userNameErr := writeBuffer.WriteSerializable(ctx, m.GetUserName()) - if popErr := writeBuffer.PopContext("userName"); popErr != nil { - return errors.Wrap(popErr, "Error popping for userName") - } - if _userNameErr != nil { - return errors.Wrap(_userNameErr, "Error serializing 'userName' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (userName) + if pushErr := writeBuffer.PushContext("userName"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for userName") + } + _userNameErr := writeBuffer.WriteSerializable(ctx, m.GetUserName()) + if popErr := writeBuffer.PopContext("userName"); popErr != nil { + return errors.Wrap(popErr, "Error popping for userName") + } + if _userNameErr != nil { + return errors.Wrap(_userNameErr, "Error serializing 'userName' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataUserName"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataUserName") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataUserName) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataUserName) isBACnetConstructedDataUserName() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataUserName) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUserType.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUserType.go index ab5b38824b3..f3d17d0f407 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUserType.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUserType.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataUserType is the corresponding interface of BACnetConstructedDataUserType type BACnetConstructedDataUserType interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataUserTypeExactly interface { // _BACnetConstructedDataUserType is the data-structure of this message type _BACnetConstructedDataUserType struct { *_BACnetConstructedData - UserType BACnetAccessUserTypeTagged + UserType BACnetAccessUserTypeTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataUserType) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataUserType) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataUserType) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_USER_TYPE -} +func (m *_BACnetConstructedDataUserType) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_USER_TYPE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataUserType) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataUserType) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataUserType) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataUserType) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataUserType) GetActualValue() BACnetAccessUserTypeTa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataUserType factory function for _BACnetConstructedDataUserType -func NewBACnetConstructedDataUserType(userType BACnetAccessUserTypeTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataUserType { +func NewBACnetConstructedDataUserType( userType BACnetAccessUserTypeTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataUserType { _result := &_BACnetConstructedDataUserType{ - UserType: userType, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + UserType: userType, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataUserType(userType BACnetAccessUserTypeTagged, openi // Deprecated: use the interface for direct cast func CastBACnetConstructedDataUserType(structType interface{}) BACnetConstructedDataUserType { - if casted, ok := structType.(BACnetConstructedDataUserType); ok { + if casted, ok := structType.(BACnetConstructedDataUserType); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataUserType); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataUserType) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetConstructedDataUserType) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataUserTypeParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("userType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for userType") } - _userType, _userTypeErr := BACnetAccessUserTypeTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_userType, _userTypeErr := BACnetAccessUserTypeTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _userTypeErr != nil { return nil, errors.Wrap(_userTypeErr, "Error parsing 'userType' field of BACnetConstructedDataUserType") } @@ -186,7 +188,7 @@ func BACnetConstructedDataUserTypeParseWithBuffer(ctx context.Context, readBuffe // Create a partially initialized instance _child := &_BACnetConstructedDataUserType{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, UserType: userType, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataUserType) SerializeWithWriteBuffer(ctx context.Co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataUserType") } - // Simple Field (userType) - if pushErr := writeBuffer.PushContext("userType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for userType") - } - _userTypeErr := writeBuffer.WriteSerializable(ctx, m.GetUserType()) - if popErr := writeBuffer.PopContext("userType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for userType") - } - if _userTypeErr != nil { - return errors.Wrap(_userTypeErr, "Error serializing 'userType' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (userType) + if pushErr := writeBuffer.PushContext("userType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for userType") + } + _userTypeErr := writeBuffer.WriteSerializable(ctx, m.GetUserType()) + if popErr := writeBuffer.PopContext("userType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for userType") + } + if _userTypeErr != nil { + return errors.Wrap(_userTypeErr, "Error serializing 'userType' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataUserType"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataUserType") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataUserType) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataUserType) isBACnetConstructedDataUserType() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataUserType) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUsesRemaining.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUsesRemaining.go index 1c3a05a4998..4103c45efaf 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUsesRemaining.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataUsesRemaining.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataUsesRemaining is the corresponding interface of BACnetConstructedDataUsesRemaining type BACnetConstructedDataUsesRemaining interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataUsesRemainingExactly interface { // _BACnetConstructedDataUsesRemaining is the data-structure of this message type _BACnetConstructedDataUsesRemaining struct { *_BACnetConstructedData - UsesRemaining BACnetApplicationTagSignedInteger + UsesRemaining BACnetApplicationTagSignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataUsesRemaining) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataUsesRemaining) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataUsesRemaining) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_USES_REMAINING -} +func (m *_BACnetConstructedDataUsesRemaining) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_USES_REMAINING} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataUsesRemaining) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataUsesRemaining) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataUsesRemaining) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataUsesRemaining) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataUsesRemaining) GetActualValue() BACnetApplication /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataUsesRemaining factory function for _BACnetConstructedDataUsesRemaining -func NewBACnetConstructedDataUsesRemaining(usesRemaining BACnetApplicationTagSignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataUsesRemaining { +func NewBACnetConstructedDataUsesRemaining( usesRemaining BACnetApplicationTagSignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataUsesRemaining { _result := &_BACnetConstructedDataUsesRemaining{ - UsesRemaining: usesRemaining, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + UsesRemaining: usesRemaining, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataUsesRemaining(usesRemaining BACnetApplicationTagSig // Deprecated: use the interface for direct cast func CastBACnetConstructedDataUsesRemaining(structType interface{}) BACnetConstructedDataUsesRemaining { - if casted, ok := structType.(BACnetConstructedDataUsesRemaining); ok { + if casted, ok := structType.(BACnetConstructedDataUsesRemaining); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataUsesRemaining); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataUsesRemaining) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetConstructedDataUsesRemaining) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataUsesRemainingParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("usesRemaining"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for usesRemaining") } - _usesRemaining, _usesRemainingErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_usesRemaining, _usesRemainingErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _usesRemainingErr != nil { return nil, errors.Wrap(_usesRemainingErr, "Error parsing 'usesRemaining' field of BACnetConstructedDataUsesRemaining") } @@ -186,7 +188,7 @@ func BACnetConstructedDataUsesRemainingParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetConstructedDataUsesRemaining{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, UsesRemaining: usesRemaining, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataUsesRemaining) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataUsesRemaining") } - // Simple Field (usesRemaining) - if pushErr := writeBuffer.PushContext("usesRemaining"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for usesRemaining") - } - _usesRemainingErr := writeBuffer.WriteSerializable(ctx, m.GetUsesRemaining()) - if popErr := writeBuffer.PopContext("usesRemaining"); popErr != nil { - return errors.Wrap(popErr, "Error popping for usesRemaining") - } - if _usesRemainingErr != nil { - return errors.Wrap(_usesRemainingErr, "Error serializing 'usesRemaining' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (usesRemaining) + if pushErr := writeBuffer.PushContext("usesRemaining"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for usesRemaining") + } + _usesRemainingErr := writeBuffer.WriteSerializable(ctx, m.GetUsesRemaining()) + if popErr := writeBuffer.PopContext("usesRemaining"); popErr != nil { + return errors.Wrap(popErr, "Error popping for usesRemaining") + } + if _usesRemainingErr != nil { + return errors.Wrap(_usesRemainingErr, "Error serializing 'usesRemaining' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataUsesRemaining"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataUsesRemaining") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataUsesRemaining) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataUsesRemaining) isBACnetConstructedDataUsesRemaining() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataUsesRemaining) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataVTClassesSupported.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataVTClassesSupported.go index f55d9651951..36596445a5c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataVTClassesSupported.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataVTClassesSupported.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataVTClassesSupported is the corresponding interface of BACnetConstructedDataVTClassesSupported type BACnetConstructedDataVTClassesSupported interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataVTClassesSupportedExactly interface { // _BACnetConstructedDataVTClassesSupported is the data-structure of this message type _BACnetConstructedDataVTClassesSupported struct { *_BACnetConstructedData - VtClassesSupported []BACnetVTClassTagged + VtClassesSupported []BACnetVTClassTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataVTClassesSupported) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataVTClassesSupported) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataVTClassesSupported) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_VT_CLASSES_SUPPORTED -} +func (m *_BACnetConstructedDataVTClassesSupported) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_VT_CLASSES_SUPPORTED} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataVTClassesSupported) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataVTClassesSupported) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataVTClassesSupported) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataVTClassesSupported) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataVTClassesSupported) GetVtClassesSupported() []BAC /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataVTClassesSupported factory function for _BACnetConstructedDataVTClassesSupported -func NewBACnetConstructedDataVTClassesSupported(vtClassesSupported []BACnetVTClassTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataVTClassesSupported { +func NewBACnetConstructedDataVTClassesSupported( vtClassesSupported []BACnetVTClassTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataVTClassesSupported { _result := &_BACnetConstructedDataVTClassesSupported{ - VtClassesSupported: vtClassesSupported, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + VtClassesSupported: vtClassesSupported, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataVTClassesSupported(vtClassesSupported []BACnetVTCla // Deprecated: use the interface for direct cast func CastBACnetConstructedDataVTClassesSupported(structType interface{}) BACnetConstructedDataVTClassesSupported { - if casted, ok := structType.(BACnetConstructedDataVTClassesSupported); ok { + if casted, ok := structType.(BACnetConstructedDataVTClassesSupported); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataVTClassesSupported); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataVTClassesSupported) GetLengthInBits(ctx context.C return lengthInBits } + func (m *_BACnetConstructedDataVTClassesSupported) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataVTClassesSupportedParseWithBuffer(ctx context.Context, // Terminated array var vtClassesSupported []BACnetVTClassTagged { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetVTClassTaggedParseWithBuffer(ctx, readBuffer, uint8(0), TagClass_APPLICATION_TAGS) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetVTClassTaggedParseWithBuffer(ctx, readBuffer , uint8(0) , TagClass_APPLICATION_TAGS ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'vtClassesSupported' field of BACnetConstructedDataVTClassesSupported") } @@ -173,7 +175,7 @@ func BACnetConstructedDataVTClassesSupportedParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataVTClassesSupported{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, VtClassesSupported: vtClassesSupported, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataVTClassesSupported) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataVTClassesSupported") } - // Array Field (vtClassesSupported) - if pushErr := writeBuffer.PushContext("vtClassesSupported", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for vtClassesSupported") - } - for _curItem, _element := range m.GetVtClassesSupported() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetVtClassesSupported()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'vtClassesSupported' field") - } - } - if popErr := writeBuffer.PopContext("vtClassesSupported", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for vtClassesSupported") + // Array Field (vtClassesSupported) + if pushErr := writeBuffer.PushContext("vtClassesSupported", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for vtClassesSupported") + } + for _curItem, _element := range m.GetVtClassesSupported() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetVtClassesSupported()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'vtClassesSupported' field") } + } + if popErr := writeBuffer.PopContext("vtClassesSupported", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for vtClassesSupported") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataVTClassesSupported"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataVTClassesSupported") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataVTClassesSupported) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataVTClassesSupported) isBACnetConstructedDataVTClassesSupported() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataVTClassesSupported) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataValidSamples.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataValidSamples.go index b636cf6f793..782777771bb 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataValidSamples.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataValidSamples.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataValidSamples is the corresponding interface of BACnetConstructedDataValidSamples type BACnetConstructedDataValidSamples interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataValidSamplesExactly interface { // _BACnetConstructedDataValidSamples is the data-structure of this message type _BACnetConstructedDataValidSamples struct { *_BACnetConstructedData - ValidSamples BACnetApplicationTagUnsignedInteger + ValidSamples BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataValidSamples) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataValidSamples) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataValidSamples) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_VALID_SAMPLES -} +func (m *_BACnetConstructedDataValidSamples) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_VALID_SAMPLES} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataValidSamples) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataValidSamples) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataValidSamples) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataValidSamples) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataValidSamples) GetActualValue() BACnetApplicationT /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataValidSamples factory function for _BACnetConstructedDataValidSamples -func NewBACnetConstructedDataValidSamples(validSamples BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataValidSamples { +func NewBACnetConstructedDataValidSamples( validSamples BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataValidSamples { _result := &_BACnetConstructedDataValidSamples{ - ValidSamples: validSamples, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ValidSamples: validSamples, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataValidSamples(validSamples BACnetApplicationTagUnsig // Deprecated: use the interface for direct cast func CastBACnetConstructedDataValidSamples(structType interface{}) BACnetConstructedDataValidSamples { - if casted, ok := structType.(BACnetConstructedDataValidSamples); ok { + if casted, ok := structType.(BACnetConstructedDataValidSamples); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataValidSamples); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataValidSamples) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetConstructedDataValidSamples) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataValidSamplesParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("validSamples"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for validSamples") } - _validSamples, _validSamplesErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_validSamples, _validSamplesErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _validSamplesErr != nil { return nil, errors.Wrap(_validSamplesErr, "Error parsing 'validSamples' field of BACnetConstructedDataValidSamples") } @@ -186,7 +188,7 @@ func BACnetConstructedDataValidSamplesParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetConstructedDataValidSamples{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ValidSamples: validSamples, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataValidSamples) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataValidSamples") } - // Simple Field (validSamples) - if pushErr := writeBuffer.PushContext("validSamples"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for validSamples") - } - _validSamplesErr := writeBuffer.WriteSerializable(ctx, m.GetValidSamples()) - if popErr := writeBuffer.PopContext("validSamples"); popErr != nil { - return errors.Wrap(popErr, "Error popping for validSamples") - } - if _validSamplesErr != nil { - return errors.Wrap(_validSamplesErr, "Error serializing 'validSamples' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (validSamples) + if pushErr := writeBuffer.PushContext("validSamples"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for validSamples") + } + _validSamplesErr := writeBuffer.WriteSerializable(ctx, m.GetValidSamples()) + if popErr := writeBuffer.PopContext("validSamples"); popErr != nil { + return errors.Wrap(popErr, "Error popping for validSamples") + } + if _validSamplesErr != nil { + return errors.Wrap(_validSamplesErr, "Error serializing 'validSamples' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataValidSamples"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataValidSamples") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataValidSamples) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataValidSamples) isBACnetConstructedDataValidSamples() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataValidSamples) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataValueBeforeChange.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataValueBeforeChange.go index b0ffb8d81b7..0c208136896 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataValueBeforeChange.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataValueBeforeChange.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataValueBeforeChange is the corresponding interface of BACnetConstructedDataValueBeforeChange type BACnetConstructedDataValueBeforeChange interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataValueBeforeChangeExactly interface { // _BACnetConstructedDataValueBeforeChange is the data-structure of this message type _BACnetConstructedDataValueBeforeChange struct { *_BACnetConstructedData - ValuesBeforeChange BACnetApplicationTagUnsignedInteger + ValuesBeforeChange BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataValueBeforeChange) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataValueBeforeChange) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataValueBeforeChange) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_VALUE_BEFORE_CHANGE -} +func (m *_BACnetConstructedDataValueBeforeChange) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_VALUE_BEFORE_CHANGE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataValueBeforeChange) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataValueBeforeChange) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataValueBeforeChange) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataValueBeforeChange) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataValueBeforeChange) GetActualValue() BACnetApplica /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataValueBeforeChange factory function for _BACnetConstructedDataValueBeforeChange -func NewBACnetConstructedDataValueBeforeChange(valuesBeforeChange BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataValueBeforeChange { +func NewBACnetConstructedDataValueBeforeChange( valuesBeforeChange BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataValueBeforeChange { _result := &_BACnetConstructedDataValueBeforeChange{ - ValuesBeforeChange: valuesBeforeChange, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ValuesBeforeChange: valuesBeforeChange, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataValueBeforeChange(valuesBeforeChange BACnetApplicat // Deprecated: use the interface for direct cast func CastBACnetConstructedDataValueBeforeChange(structType interface{}) BACnetConstructedDataValueBeforeChange { - if casted, ok := structType.(BACnetConstructedDataValueBeforeChange); ok { + if casted, ok := structType.(BACnetConstructedDataValueBeforeChange); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataValueBeforeChange); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataValueBeforeChange) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetConstructedDataValueBeforeChange) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataValueBeforeChangeParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("valuesBeforeChange"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for valuesBeforeChange") } - _valuesBeforeChange, _valuesBeforeChangeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_valuesBeforeChange, _valuesBeforeChangeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _valuesBeforeChangeErr != nil { return nil, errors.Wrap(_valuesBeforeChangeErr, "Error parsing 'valuesBeforeChange' field of BACnetConstructedDataValueBeforeChange") } @@ -186,7 +188,7 @@ func BACnetConstructedDataValueBeforeChangeParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetConstructedDataValueBeforeChange{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ValuesBeforeChange: valuesBeforeChange, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataValueBeforeChange) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataValueBeforeChange") } - // Simple Field (valuesBeforeChange) - if pushErr := writeBuffer.PushContext("valuesBeforeChange"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for valuesBeforeChange") - } - _valuesBeforeChangeErr := writeBuffer.WriteSerializable(ctx, m.GetValuesBeforeChange()) - if popErr := writeBuffer.PopContext("valuesBeforeChange"); popErr != nil { - return errors.Wrap(popErr, "Error popping for valuesBeforeChange") - } - if _valuesBeforeChangeErr != nil { - return errors.Wrap(_valuesBeforeChangeErr, "Error serializing 'valuesBeforeChange' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (valuesBeforeChange) + if pushErr := writeBuffer.PushContext("valuesBeforeChange"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for valuesBeforeChange") + } + _valuesBeforeChangeErr := writeBuffer.WriteSerializable(ctx, m.GetValuesBeforeChange()) + if popErr := writeBuffer.PopContext("valuesBeforeChange"); popErr != nil { + return errors.Wrap(popErr, "Error popping for valuesBeforeChange") + } + if _valuesBeforeChangeErr != nil { + return errors.Wrap(_valuesBeforeChangeErr, "Error serializing 'valuesBeforeChange' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataValueBeforeChange"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataValueBeforeChange") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataValueBeforeChange) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataValueBeforeChange) isBACnetConstructedDataValueBeforeChange() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataValueBeforeChange) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataValueChangeTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataValueChangeTime.go index 299966725f4..fe5ed26212d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataValueChangeTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataValueChangeTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataValueChangeTime is the corresponding interface of BACnetConstructedDataValueChangeTime type BACnetConstructedDataValueChangeTime interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataValueChangeTimeExactly interface { // _BACnetConstructedDataValueChangeTime is the data-structure of this message type _BACnetConstructedDataValueChangeTime struct { *_BACnetConstructedData - ValueChangeTime BACnetDateTime + ValueChangeTime BACnetDateTime } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataValueChangeTime) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataValueChangeTime) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataValueChangeTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_VALUE_CHANGE_TIME -} +func (m *_BACnetConstructedDataValueChangeTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_VALUE_CHANGE_TIME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataValueChangeTime) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataValueChangeTime) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataValueChangeTime) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataValueChangeTime) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataValueChangeTime) GetActualValue() BACnetDateTime /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataValueChangeTime factory function for _BACnetConstructedDataValueChangeTime -func NewBACnetConstructedDataValueChangeTime(valueChangeTime BACnetDateTime, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataValueChangeTime { +func NewBACnetConstructedDataValueChangeTime( valueChangeTime BACnetDateTime , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataValueChangeTime { _result := &_BACnetConstructedDataValueChangeTime{ - ValueChangeTime: valueChangeTime, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ValueChangeTime: valueChangeTime, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataValueChangeTime(valueChangeTime BACnetDateTime, ope // Deprecated: use the interface for direct cast func CastBACnetConstructedDataValueChangeTime(structType interface{}) BACnetConstructedDataValueChangeTime { - if casted, ok := structType.(BACnetConstructedDataValueChangeTime); ok { + if casted, ok := structType.(BACnetConstructedDataValueChangeTime); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataValueChangeTime); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataValueChangeTime) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetConstructedDataValueChangeTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataValueChangeTimeParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("valueChangeTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for valueChangeTime") } - _valueChangeTime, _valueChangeTimeErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) +_valueChangeTime, _valueChangeTimeErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) if _valueChangeTimeErr != nil { return nil, errors.Wrap(_valueChangeTimeErr, "Error parsing 'valueChangeTime' field of BACnetConstructedDataValueChangeTime") } @@ -186,7 +188,7 @@ func BACnetConstructedDataValueChangeTimeParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetConstructedDataValueChangeTime{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ValueChangeTime: valueChangeTime, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataValueChangeTime) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataValueChangeTime") } - // Simple Field (valueChangeTime) - if pushErr := writeBuffer.PushContext("valueChangeTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for valueChangeTime") - } - _valueChangeTimeErr := writeBuffer.WriteSerializable(ctx, m.GetValueChangeTime()) - if popErr := writeBuffer.PopContext("valueChangeTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for valueChangeTime") - } - if _valueChangeTimeErr != nil { - return errors.Wrap(_valueChangeTimeErr, "Error serializing 'valueChangeTime' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (valueChangeTime) + if pushErr := writeBuffer.PushContext("valueChangeTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for valueChangeTime") + } + _valueChangeTimeErr := writeBuffer.WriteSerializable(ctx, m.GetValueChangeTime()) + if popErr := writeBuffer.PopContext("valueChangeTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for valueChangeTime") + } + if _valueChangeTimeErr != nil { + return errors.Wrap(_valueChangeTimeErr, "Error serializing 'valueChangeTime' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataValueChangeTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataValueChangeTime") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataValueChangeTime) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataValueChangeTime) isBACnetConstructedDataValueChangeTime() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataValueChangeTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataValueSet.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataValueSet.go index 419d4398220..a4913311cdb 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataValueSet.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataValueSet.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataValueSet is the corresponding interface of BACnetConstructedDataValueSet type BACnetConstructedDataValueSet interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataValueSetExactly interface { // _BACnetConstructedDataValueSet is the data-structure of this message type _BACnetConstructedDataValueSet struct { *_BACnetConstructedData - ValueSet BACnetApplicationTagUnsignedInteger + ValueSet BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataValueSet) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataValueSet) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataValueSet) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_VALUE_SET -} +func (m *_BACnetConstructedDataValueSet) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_VALUE_SET} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataValueSet) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataValueSet) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataValueSet) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataValueSet) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataValueSet) GetActualValue() BACnetApplicationTagUn /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataValueSet factory function for _BACnetConstructedDataValueSet -func NewBACnetConstructedDataValueSet(valueSet BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataValueSet { +func NewBACnetConstructedDataValueSet( valueSet BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataValueSet { _result := &_BACnetConstructedDataValueSet{ - ValueSet: valueSet, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ValueSet: valueSet, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataValueSet(valueSet BACnetApplicationTagUnsignedInteg // Deprecated: use the interface for direct cast func CastBACnetConstructedDataValueSet(structType interface{}) BACnetConstructedDataValueSet { - if casted, ok := structType.(BACnetConstructedDataValueSet); ok { + if casted, ok := structType.(BACnetConstructedDataValueSet); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataValueSet); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataValueSet) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetConstructedDataValueSet) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataValueSetParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("valueSet"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for valueSet") } - _valueSet, _valueSetErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_valueSet, _valueSetErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _valueSetErr != nil { return nil, errors.Wrap(_valueSetErr, "Error parsing 'valueSet' field of BACnetConstructedDataValueSet") } @@ -186,7 +188,7 @@ func BACnetConstructedDataValueSetParseWithBuffer(ctx context.Context, readBuffe // Create a partially initialized instance _child := &_BACnetConstructedDataValueSet{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ValueSet: valueSet, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataValueSet) SerializeWithWriteBuffer(ctx context.Co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataValueSet") } - // Simple Field (valueSet) - if pushErr := writeBuffer.PushContext("valueSet"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for valueSet") - } - _valueSetErr := writeBuffer.WriteSerializable(ctx, m.GetValueSet()) - if popErr := writeBuffer.PopContext("valueSet"); popErr != nil { - return errors.Wrap(popErr, "Error popping for valueSet") - } - if _valueSetErr != nil { - return errors.Wrap(_valueSetErr, "Error serializing 'valueSet' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (valueSet) + if pushErr := writeBuffer.PushContext("valueSet"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for valueSet") + } + _valueSetErr := writeBuffer.WriteSerializable(ctx, m.GetValueSet()) + if popErr := writeBuffer.PopContext("valueSet"); popErr != nil { + return errors.Wrap(popErr, "Error popping for valueSet") + } + if _valueSetErr != nil { + return errors.Wrap(_valueSetErr, "Error serializing 'valueSet' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataValueSet"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataValueSet") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataValueSet) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataValueSet) isBACnetConstructedDataValueSet() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataValueSet) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataValueSource.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataValueSource.go index 9f7eab366e8..4597874aeb5 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataValueSource.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataValueSource.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataValueSource is the corresponding interface of BACnetConstructedDataValueSource type BACnetConstructedDataValueSource interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataValueSourceExactly interface { // _BACnetConstructedDataValueSource is the data-structure of this message type _BACnetConstructedDataValueSource struct { *_BACnetConstructedData - ValueSource BACnetValueSource + ValueSource BACnetValueSource } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataValueSource) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataValueSource) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataValueSource) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_VALUE_SOURCE -} +func (m *_BACnetConstructedDataValueSource) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_VALUE_SOURCE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataValueSource) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataValueSource) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataValueSource) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataValueSource) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataValueSource) GetActualValue() BACnetValueSource { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataValueSource factory function for _BACnetConstructedDataValueSource -func NewBACnetConstructedDataValueSource(valueSource BACnetValueSource, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataValueSource { +func NewBACnetConstructedDataValueSource( valueSource BACnetValueSource , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataValueSource { _result := &_BACnetConstructedDataValueSource{ - ValueSource: valueSource, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ValueSource: valueSource, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataValueSource(valueSource BACnetValueSource, openingT // Deprecated: use the interface for direct cast func CastBACnetConstructedDataValueSource(structType interface{}) BACnetConstructedDataValueSource { - if casted, ok := structType.(BACnetConstructedDataValueSource); ok { + if casted, ok := structType.(BACnetConstructedDataValueSource); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataValueSource); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataValueSource) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataValueSource) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataValueSourceParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("valueSource"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for valueSource") } - _valueSource, _valueSourceErr := BACnetValueSourceParseWithBuffer(ctx, readBuffer) +_valueSource, _valueSourceErr := BACnetValueSourceParseWithBuffer(ctx, readBuffer) if _valueSourceErr != nil { return nil, errors.Wrap(_valueSourceErr, "Error parsing 'valueSource' field of BACnetConstructedDataValueSource") } @@ -186,7 +188,7 @@ func BACnetConstructedDataValueSourceParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataValueSource{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ValueSource: valueSource, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataValueSource) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataValueSource") } - // Simple Field (valueSource) - if pushErr := writeBuffer.PushContext("valueSource"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for valueSource") - } - _valueSourceErr := writeBuffer.WriteSerializable(ctx, m.GetValueSource()) - if popErr := writeBuffer.PopContext("valueSource"); popErr != nil { - return errors.Wrap(popErr, "Error popping for valueSource") - } - if _valueSourceErr != nil { - return errors.Wrap(_valueSourceErr, "Error serializing 'valueSource' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (valueSource) + if pushErr := writeBuffer.PushContext("valueSource"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for valueSource") + } + _valueSourceErr := writeBuffer.WriteSerializable(ctx, m.GetValueSource()) + if popErr := writeBuffer.PopContext("valueSource"); popErr != nil { + return errors.Wrap(popErr, "Error popping for valueSource") + } + if _valueSourceErr != nil { + return errors.Wrap(_valueSourceErr, "Error serializing 'valueSource' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataValueSource"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataValueSource") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataValueSource) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataValueSource) isBACnetConstructedDataValueSource() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataValueSource) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataValueSourceArray.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataValueSourceArray.go index 3c2b5fef51c..4241eeb52da 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataValueSourceArray.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataValueSourceArray.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataValueSourceArray is the corresponding interface of BACnetConstructedDataValueSourceArray type BACnetConstructedDataValueSourceArray interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataValueSourceArrayExactly interface { // _BACnetConstructedDataValueSourceArray is the data-structure of this message type _BACnetConstructedDataValueSourceArray struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - VtClassesSupported []BACnetValueSource + NumberOfDataElements BACnetApplicationTagUnsignedInteger + VtClassesSupported []BACnetValueSource } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataValueSourceArray) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataValueSourceArray) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataValueSourceArray) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_VALUE_SOURCE_ARRAY -} +func (m *_BACnetConstructedDataValueSourceArray) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_VALUE_SOURCE_ARRAY} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataValueSourceArray) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataValueSourceArray) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataValueSourceArray) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataValueSourceArray) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataValueSourceArray) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataValueSourceArray factory function for _BACnetConstructedDataValueSourceArray -func NewBACnetConstructedDataValueSourceArray(numberOfDataElements BACnetApplicationTagUnsignedInteger, vtClassesSupported []BACnetValueSource, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataValueSourceArray { +func NewBACnetConstructedDataValueSourceArray( numberOfDataElements BACnetApplicationTagUnsignedInteger , vtClassesSupported []BACnetValueSource , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataValueSourceArray { _result := &_BACnetConstructedDataValueSourceArray{ - NumberOfDataElements: numberOfDataElements, - VtClassesSupported: vtClassesSupported, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + VtClassesSupported: vtClassesSupported, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataValueSourceArray(numberOfDataElements BACnetApplica // Deprecated: use the interface for direct cast func CastBACnetConstructedDataValueSourceArray(structType interface{}) BACnetConstructedDataValueSourceArray { - if casted, ok := structType.(BACnetConstructedDataValueSourceArray); ok { + if casted, ok := structType.(BACnetConstructedDataValueSourceArray); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataValueSourceArray); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataValueSourceArray) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetConstructedDataValueSourceArray) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataValueSourceArrayParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataValueSourceArrayParseWithBuffer(ctx context.Context, r // Terminated array var vtClassesSupported []BACnetValueSource { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetValueSourceParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetValueSourceParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'vtClassesSupported' field of BACnetConstructedDataValueSourceArray") } @@ -229,7 +231,7 @@ func BACnetConstructedDataValueSourceArrayParseWithBuffer(ctx context.Context, r } // Validation - if !(bool(bool((arrayIndexArgument) != (nil))) || bool(bool((len(vtClassesSupported)) == (16)))) { + if (!(bool(bool((arrayIndexArgument) != (nil))) || bool(bool(((len(vtClassesSupported))) == ((16)))))) { return nil, errors.WithStack(utils.ParseValidationError{"vtClassesSupported should have exactly 16 values"}) } @@ -240,11 +242,11 @@ func BACnetConstructedDataValueSourceArrayParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_BACnetConstructedDataValueSourceArray{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - VtClassesSupported: vtClassesSupported, + VtClassesSupported: vtClassesSupported, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -265,43 +267,43 @@ func (m *_BACnetConstructedDataValueSourceArray) SerializeWithWriteBuffer(ctx co if pushErr := writeBuffer.PushContext("BACnetConstructedDataValueSourceArray"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataValueSourceArray") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (vtClassesSupported) - if pushErr := writeBuffer.PushContext("vtClassesSupported", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for vtClassesSupported") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetVtClassesSupported() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetVtClassesSupported()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'vtClassesSupported' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("vtClassesSupported", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for vtClassesSupported") + } + + // Array Field (vtClassesSupported) + if pushErr := writeBuffer.PushContext("vtClassesSupported", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for vtClassesSupported") + } + for _curItem, _element := range m.GetVtClassesSupported() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetVtClassesSupported()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'vtClassesSupported' field") } + } + if popErr := writeBuffer.PopContext("vtClassesSupported", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for vtClassesSupported") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataValueSourceArray"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataValueSourceArray") @@ -311,6 +313,7 @@ func (m *_BACnetConstructedDataValueSourceArray) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataValueSourceArray) isBACnetConstructedDataValueSourceArray() bool { return true } @@ -325,3 +328,6 @@ func (m *_BACnetConstructedDataValueSourceArray) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataVarianceValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataVarianceValue.go index 10b565a14ee..47aee62c9e0 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataVarianceValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataVarianceValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataVarianceValue is the corresponding interface of BACnetConstructedDataVarianceValue type BACnetConstructedDataVarianceValue interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataVarianceValueExactly interface { // _BACnetConstructedDataVarianceValue is the data-structure of this message type _BACnetConstructedDataVarianceValue struct { *_BACnetConstructedData - VarianceValue BACnetApplicationTagReal + VarianceValue BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataVarianceValue) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataVarianceValue) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataVarianceValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_VARIANCE_VALUE -} +func (m *_BACnetConstructedDataVarianceValue) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_VARIANCE_VALUE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataVarianceValue) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataVarianceValue) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataVarianceValue) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataVarianceValue) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataVarianceValue) GetActualValue() BACnetApplication /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataVarianceValue factory function for _BACnetConstructedDataVarianceValue -func NewBACnetConstructedDataVarianceValue(varianceValue BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataVarianceValue { +func NewBACnetConstructedDataVarianceValue( varianceValue BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataVarianceValue { _result := &_BACnetConstructedDataVarianceValue{ - VarianceValue: varianceValue, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + VarianceValue: varianceValue, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataVarianceValue(varianceValue BACnetApplicationTagRea // Deprecated: use the interface for direct cast func CastBACnetConstructedDataVarianceValue(structType interface{}) BACnetConstructedDataVarianceValue { - if casted, ok := structType.(BACnetConstructedDataVarianceValue); ok { + if casted, ok := structType.(BACnetConstructedDataVarianceValue); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataVarianceValue); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataVarianceValue) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetConstructedDataVarianceValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataVarianceValueParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("varianceValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for varianceValue") } - _varianceValue, _varianceValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_varianceValue, _varianceValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _varianceValueErr != nil { return nil, errors.Wrap(_varianceValueErr, "Error parsing 'varianceValue' field of BACnetConstructedDataVarianceValue") } @@ -186,7 +188,7 @@ func BACnetConstructedDataVarianceValueParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetConstructedDataVarianceValue{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, VarianceValue: varianceValue, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataVarianceValue) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataVarianceValue") } - // Simple Field (varianceValue) - if pushErr := writeBuffer.PushContext("varianceValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for varianceValue") - } - _varianceValueErr := writeBuffer.WriteSerializable(ctx, m.GetVarianceValue()) - if popErr := writeBuffer.PopContext("varianceValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for varianceValue") - } - if _varianceValueErr != nil { - return errors.Wrap(_varianceValueErr, "Error serializing 'varianceValue' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (varianceValue) + if pushErr := writeBuffer.PushContext("varianceValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for varianceValue") + } + _varianceValueErr := writeBuffer.WriteSerializable(ctx, m.GetVarianceValue()) + if popErr := writeBuffer.PopContext("varianceValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for varianceValue") + } + if _varianceValueErr != nil { + return errors.Wrap(_varianceValueErr, "Error serializing 'varianceValue' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataVarianceValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataVarianceValue") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataVarianceValue) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataVarianceValue) isBACnetConstructedDataVarianceValue() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataVarianceValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataVendorIdentifier.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataVendorIdentifier.go index c9d6154ab75..3acbf67849a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataVendorIdentifier.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataVendorIdentifier.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataVendorIdentifier is the corresponding interface of BACnetConstructedDataVendorIdentifier type BACnetConstructedDataVendorIdentifier interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataVendorIdentifierExactly interface { // _BACnetConstructedDataVendorIdentifier is the data-structure of this message type _BACnetConstructedDataVendorIdentifier struct { *_BACnetConstructedData - VendorIdentifier BACnetVendorIdTagged + VendorIdentifier BACnetVendorIdTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataVendorIdentifier) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataVendorIdentifier) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataVendorIdentifier) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_VENDOR_IDENTIFIER -} +func (m *_BACnetConstructedDataVendorIdentifier) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_VENDOR_IDENTIFIER} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataVendorIdentifier) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataVendorIdentifier) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataVendorIdentifier) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataVendorIdentifier) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataVendorIdentifier) GetActualValue() BACnetVendorId /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataVendorIdentifier factory function for _BACnetConstructedDataVendorIdentifier -func NewBACnetConstructedDataVendorIdentifier(vendorIdentifier BACnetVendorIdTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataVendorIdentifier { +func NewBACnetConstructedDataVendorIdentifier( vendorIdentifier BACnetVendorIdTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataVendorIdentifier { _result := &_BACnetConstructedDataVendorIdentifier{ - VendorIdentifier: vendorIdentifier, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + VendorIdentifier: vendorIdentifier, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataVendorIdentifier(vendorIdentifier BACnetVendorIdTag // Deprecated: use the interface for direct cast func CastBACnetConstructedDataVendorIdentifier(structType interface{}) BACnetConstructedDataVendorIdentifier { - if casted, ok := structType.(BACnetConstructedDataVendorIdentifier); ok { + if casted, ok := structType.(BACnetConstructedDataVendorIdentifier); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataVendorIdentifier); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataVendorIdentifier) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetConstructedDataVendorIdentifier) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataVendorIdentifierParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("vendorIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for vendorIdentifier") } - _vendorIdentifier, _vendorIdentifierErr := BACnetVendorIdTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_vendorIdentifier, _vendorIdentifierErr := BACnetVendorIdTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _vendorIdentifierErr != nil { return nil, errors.Wrap(_vendorIdentifierErr, "Error parsing 'vendorIdentifier' field of BACnetConstructedDataVendorIdentifier") } @@ -186,7 +188,7 @@ func BACnetConstructedDataVendorIdentifierParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_BACnetConstructedDataVendorIdentifier{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, VendorIdentifier: vendorIdentifier, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataVendorIdentifier) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataVendorIdentifier") } - // Simple Field (vendorIdentifier) - if pushErr := writeBuffer.PushContext("vendorIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for vendorIdentifier") - } - _vendorIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetVendorIdentifier()) - if popErr := writeBuffer.PopContext("vendorIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for vendorIdentifier") - } - if _vendorIdentifierErr != nil { - return errors.Wrap(_vendorIdentifierErr, "Error serializing 'vendorIdentifier' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (vendorIdentifier) + if pushErr := writeBuffer.PushContext("vendorIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for vendorIdentifier") + } + _vendorIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetVendorIdentifier()) + if popErr := writeBuffer.PopContext("vendorIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for vendorIdentifier") + } + if _vendorIdentifierErr != nil { + return errors.Wrap(_vendorIdentifierErr, "Error serializing 'vendorIdentifier' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataVendorIdentifier"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataVendorIdentifier") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataVendorIdentifier) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataVendorIdentifier) isBACnetConstructedDataVendorIdentifier() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataVendorIdentifier) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataVendorName.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataVendorName.go index 13c2b75076e..d569bfb4560 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataVendorName.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataVendorName.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataVendorName is the corresponding interface of BACnetConstructedDataVendorName type BACnetConstructedDataVendorName interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataVendorNameExactly interface { // _BACnetConstructedDataVendorName is the data-structure of this message type _BACnetConstructedDataVendorName struct { *_BACnetConstructedData - VendorName BACnetApplicationTagCharacterString + VendorName BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataVendorName) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataVendorName) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataVendorName) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_VENDOR_NAME -} +func (m *_BACnetConstructedDataVendorName) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_VENDOR_NAME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataVendorName) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataVendorName) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataVendorName) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataVendorName) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataVendorName) GetActualValue() BACnetApplicationTag /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataVendorName factory function for _BACnetConstructedDataVendorName -func NewBACnetConstructedDataVendorName(vendorName BACnetApplicationTagCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataVendorName { +func NewBACnetConstructedDataVendorName( vendorName BACnetApplicationTagCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataVendorName { _result := &_BACnetConstructedDataVendorName{ - VendorName: vendorName, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + VendorName: vendorName, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataVendorName(vendorName BACnetApplicationTagCharacter // Deprecated: use the interface for direct cast func CastBACnetConstructedDataVendorName(structType interface{}) BACnetConstructedDataVendorName { - if casted, ok := structType.(BACnetConstructedDataVendorName); ok { + if casted, ok := structType.(BACnetConstructedDataVendorName); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataVendorName); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataVendorName) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataVendorName) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataVendorNameParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("vendorName"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for vendorName") } - _vendorName, _vendorNameErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_vendorName, _vendorNameErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _vendorNameErr != nil { return nil, errors.Wrap(_vendorNameErr, "Error parsing 'vendorName' field of BACnetConstructedDataVendorName") } @@ -186,7 +188,7 @@ func BACnetConstructedDataVendorNameParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetConstructedDataVendorName{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, VendorName: vendorName, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataVendorName) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataVendorName") } - // Simple Field (vendorName) - if pushErr := writeBuffer.PushContext("vendorName"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for vendorName") - } - _vendorNameErr := writeBuffer.WriteSerializable(ctx, m.GetVendorName()) - if popErr := writeBuffer.PopContext("vendorName"); popErr != nil { - return errors.Wrap(popErr, "Error popping for vendorName") - } - if _vendorNameErr != nil { - return errors.Wrap(_vendorNameErr, "Error serializing 'vendorName' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (vendorName) + if pushErr := writeBuffer.PushContext("vendorName"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for vendorName") + } + _vendorNameErr := writeBuffer.WriteSerializable(ctx, m.GetVendorName()) + if popErr := writeBuffer.PopContext("vendorName"); popErr != nil { + return errors.Wrap(popErr, "Error popping for vendorName") + } + if _vendorNameErr != nil { + return errors.Wrap(_vendorNameErr, "Error serializing 'vendorName' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataVendorName"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataVendorName") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataVendorName) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataVendorName) isBACnetConstructedDataVendorName() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataVendorName) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataVerificationTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataVerificationTime.go index 04b4d34a533..6a2a121615a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataVerificationTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataVerificationTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataVerificationTime is the corresponding interface of BACnetConstructedDataVerificationTime type BACnetConstructedDataVerificationTime interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataVerificationTimeExactly interface { // _BACnetConstructedDataVerificationTime is the data-structure of this message type _BACnetConstructedDataVerificationTime struct { *_BACnetConstructedData - VerificationTime BACnetApplicationTagSignedInteger + VerificationTime BACnetApplicationTagSignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataVerificationTime) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataVerificationTime) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataVerificationTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_VERIFICATION_TIME -} +func (m *_BACnetConstructedDataVerificationTime) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_VERIFICATION_TIME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataVerificationTime) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataVerificationTime) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataVerificationTime) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataVerificationTime) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataVerificationTime) GetActualValue() BACnetApplicat /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataVerificationTime factory function for _BACnetConstructedDataVerificationTime -func NewBACnetConstructedDataVerificationTime(verificationTime BACnetApplicationTagSignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataVerificationTime { +func NewBACnetConstructedDataVerificationTime( verificationTime BACnetApplicationTagSignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataVerificationTime { _result := &_BACnetConstructedDataVerificationTime{ - VerificationTime: verificationTime, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + VerificationTime: verificationTime, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataVerificationTime(verificationTime BACnetApplication // Deprecated: use the interface for direct cast func CastBACnetConstructedDataVerificationTime(structType interface{}) BACnetConstructedDataVerificationTime { - if casted, ok := structType.(BACnetConstructedDataVerificationTime); ok { + if casted, ok := structType.(BACnetConstructedDataVerificationTime); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataVerificationTime); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataVerificationTime) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetConstructedDataVerificationTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataVerificationTimeParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("verificationTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for verificationTime") } - _verificationTime, _verificationTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_verificationTime, _verificationTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _verificationTimeErr != nil { return nil, errors.Wrap(_verificationTimeErr, "Error parsing 'verificationTime' field of BACnetConstructedDataVerificationTime") } @@ -186,7 +188,7 @@ func BACnetConstructedDataVerificationTimeParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_BACnetConstructedDataVerificationTime{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, VerificationTime: verificationTime, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataVerificationTime) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataVerificationTime") } - // Simple Field (verificationTime) - if pushErr := writeBuffer.PushContext("verificationTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for verificationTime") - } - _verificationTimeErr := writeBuffer.WriteSerializable(ctx, m.GetVerificationTime()) - if popErr := writeBuffer.PopContext("verificationTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for verificationTime") - } - if _verificationTimeErr != nil { - return errors.Wrap(_verificationTimeErr, "Error serializing 'verificationTime' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (verificationTime) + if pushErr := writeBuffer.PushContext("verificationTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for verificationTime") + } + _verificationTimeErr := writeBuffer.WriteSerializable(ctx, m.GetVerificationTime()) + if popErr := writeBuffer.PopContext("verificationTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for verificationTime") + } + if _verificationTimeErr != nil { + return errors.Wrap(_verificationTimeErr, "Error serializing 'verificationTime' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataVerificationTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataVerificationTime") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataVerificationTime) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataVerificationTime) isBACnetConstructedDataVerificationTime() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataVerificationTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataVirtualMACAddressTable.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataVirtualMACAddressTable.go index 97e22c48345..481bd925bb5 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataVirtualMACAddressTable.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataVirtualMACAddressTable.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataVirtualMACAddressTable is the corresponding interface of BACnetConstructedDataVirtualMACAddressTable type BACnetConstructedDataVirtualMACAddressTable interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataVirtualMACAddressTableExactly interface { // _BACnetConstructedDataVirtualMACAddressTable is the data-structure of this message type _BACnetConstructedDataVirtualMACAddressTable struct { *_BACnetConstructedData - VirtualMacAddressTable []BACnetVMACEntry + VirtualMacAddressTable []BACnetVMACEntry } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataVirtualMACAddressTable) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataVirtualMACAddressTable) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataVirtualMACAddressTable) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_VIRTUAL_MAC_ADDRESS_TABLE -} +func (m *_BACnetConstructedDataVirtualMACAddressTable) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_VIRTUAL_MAC_ADDRESS_TABLE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataVirtualMACAddressTable) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataVirtualMACAddressTable) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataVirtualMACAddressTable) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataVirtualMACAddressTable) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataVirtualMACAddressTable) GetVirtualMacAddressTable /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataVirtualMACAddressTable factory function for _BACnetConstructedDataVirtualMACAddressTable -func NewBACnetConstructedDataVirtualMACAddressTable(virtualMacAddressTable []BACnetVMACEntry, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataVirtualMACAddressTable { +func NewBACnetConstructedDataVirtualMACAddressTable( virtualMacAddressTable []BACnetVMACEntry , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataVirtualMACAddressTable { _result := &_BACnetConstructedDataVirtualMACAddressTable{ VirtualMacAddressTable: virtualMacAddressTable, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataVirtualMACAddressTable(virtualMacAddressTable []BAC // Deprecated: use the interface for direct cast func CastBACnetConstructedDataVirtualMACAddressTable(structType interface{}) BACnetConstructedDataVirtualMACAddressTable { - if casted, ok := structType.(BACnetConstructedDataVirtualMACAddressTable); ok { + if casted, ok := structType.(BACnetConstructedDataVirtualMACAddressTable); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataVirtualMACAddressTable); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataVirtualMACAddressTable) GetLengthInBits(ctx conte return lengthInBits } + func (m *_BACnetConstructedDataVirtualMACAddressTable) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataVirtualMACAddressTableParseWithBuffer(ctx context.Cont // Terminated array var virtualMacAddressTable []BACnetVMACEntry { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetVMACEntryParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetVMACEntryParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'virtualMacAddressTable' field of BACnetConstructedDataVirtualMACAddressTable") } @@ -173,7 +175,7 @@ func BACnetConstructedDataVirtualMACAddressTableParseWithBuffer(ctx context.Cont // Create a partially initialized instance _child := &_BACnetConstructedDataVirtualMACAddressTable{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, VirtualMacAddressTable: virtualMacAddressTable, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataVirtualMACAddressTable) SerializeWithWriteBuffer( return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataVirtualMACAddressTable") } - // Array Field (virtualMacAddressTable) - if pushErr := writeBuffer.PushContext("virtualMacAddressTable", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for virtualMacAddressTable") - } - for _curItem, _element := range m.GetVirtualMacAddressTable() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetVirtualMacAddressTable()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'virtualMacAddressTable' field") - } - } - if popErr := writeBuffer.PopContext("virtualMacAddressTable", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for virtualMacAddressTable") + // Array Field (virtualMacAddressTable) + if pushErr := writeBuffer.PushContext("virtualMacAddressTable", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for virtualMacAddressTable") + } + for _curItem, _element := range m.GetVirtualMacAddressTable() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetVirtualMacAddressTable()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'virtualMacAddressTable' field") } + } + if popErr := writeBuffer.PopContext("virtualMacAddressTable", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for virtualMacAddressTable") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataVirtualMACAddressTable"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataVirtualMACAddressTable") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataVirtualMACAddressTable) SerializeWithWriteBuffer( return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataVirtualMACAddressTable) isBACnetConstructedDataVirtualMACAddressTable() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataVirtualMACAddressTable) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataWeeklySchedule.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataWeeklySchedule.go index 34825417b84..6fd8b467e31 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataWeeklySchedule.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataWeeklySchedule.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataWeeklySchedule is the corresponding interface of BACnetConstructedDataWeeklySchedule type BACnetConstructedDataWeeklySchedule interface { @@ -52,38 +54,36 @@ type BACnetConstructedDataWeeklyScheduleExactly interface { // _BACnetConstructedDataWeeklySchedule is the data-structure of this message type _BACnetConstructedDataWeeklySchedule struct { *_BACnetConstructedData - NumberOfDataElements BACnetApplicationTagUnsignedInteger - WeeklySchedule []BACnetDailySchedule + NumberOfDataElements BACnetApplicationTagUnsignedInteger + WeeklySchedule []BACnetDailySchedule } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataWeeklySchedule) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataWeeklySchedule) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataWeeklySchedule) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_WEEKLY_SCHEDULE -} +func (m *_BACnetConstructedDataWeeklySchedule) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_WEEKLY_SCHEDULE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataWeeklySchedule) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataWeeklySchedule) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataWeeklySchedule) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataWeeklySchedule) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,12 +119,13 @@ func (m *_BACnetConstructedDataWeeklySchedule) GetZero() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataWeeklySchedule factory function for _BACnetConstructedDataWeeklySchedule -func NewBACnetConstructedDataWeeklySchedule(numberOfDataElements BACnetApplicationTagUnsignedInteger, weeklySchedule []BACnetDailySchedule, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataWeeklySchedule { +func NewBACnetConstructedDataWeeklySchedule( numberOfDataElements BACnetApplicationTagUnsignedInteger , weeklySchedule []BACnetDailySchedule , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataWeeklySchedule { _result := &_BACnetConstructedDataWeeklySchedule{ - NumberOfDataElements: numberOfDataElements, - WeeklySchedule: weeklySchedule, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + NumberOfDataElements: numberOfDataElements, + WeeklySchedule: weeklySchedule, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -132,7 +133,7 @@ func NewBACnetConstructedDataWeeklySchedule(numberOfDataElements BACnetApplicati // Deprecated: use the interface for direct cast func CastBACnetConstructedDataWeeklySchedule(structType interface{}) BACnetConstructedDataWeeklySchedule { - if casted, ok := structType.(BACnetConstructedDataWeeklySchedule); ok { + if casted, ok := structType.(BACnetConstructedDataWeeklySchedule); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataWeeklySchedule); ok { @@ -165,6 +166,7 @@ func (m *_BACnetConstructedDataWeeklySchedule) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConstructedDataWeeklySchedule) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -194,7 +196,7 @@ func BACnetConstructedDataWeeklyScheduleParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,8 +218,8 @@ func BACnetConstructedDataWeeklyScheduleParseWithBuffer(ctx context.Context, rea // Terminated array var weeklySchedule []BACnetDailySchedule { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetDailyScheduleParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetDailyScheduleParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'weeklySchedule' field of BACnetConstructedDataWeeklySchedule") } @@ -229,7 +231,7 @@ func BACnetConstructedDataWeeklyScheduleParseWithBuffer(ctx context.Context, rea } // Validation - if !(bool(bool((arrayIndexArgument) != (nil))) || bool(bool((len(weeklySchedule)) == (7)))) { + if (!(bool(bool((arrayIndexArgument) != (nil))) || bool(bool(((len(weeklySchedule))) == ((7)))))) { return nil, errors.WithStack(utils.ParseValidationError{"weeklySchedule should have exactly 7 values"}) } @@ -240,11 +242,11 @@ func BACnetConstructedDataWeeklyScheduleParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetConstructedDataWeeklySchedule{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, NumberOfDataElements: numberOfDataElements, - WeeklySchedule: weeklySchedule, + WeeklySchedule: weeklySchedule, } _child._BACnetConstructedData._BACnetConstructedDataChildRequirements = _child return _child, nil @@ -265,43 +267,43 @@ func (m *_BACnetConstructedDataWeeklySchedule) SerializeWithWriteBuffer(ctx cont if pushErr := writeBuffer.PushContext("BACnetConstructedDataWeeklySchedule"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataWeeklySchedule") } - // Virtual field - if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { - return errors.Wrap(_zeroErr, "Error serializing 'zero' field") - } + // Virtual field + if _zeroErr := writeBuffer.WriteVirtual(ctx, "zero", m.GetZero()); _zeroErr != nil { + return errors.Wrap(_zeroErr, "Error serializing 'zero' field") + } - // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) - var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil - if m.GetNumberOfDataElements() != nil { - if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") - } - numberOfDataElements = m.GetNumberOfDataElements() - _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) - if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { - return errors.Wrap(popErr, "Error popping for numberOfDataElements") - } - if _numberOfDataElementsErr != nil { - return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") - } + // Optional Field (numberOfDataElements) (Can be skipped, if the value is null) + var numberOfDataElements BACnetApplicationTagUnsignedInteger = nil + if m.GetNumberOfDataElements() != nil { + if pushErr := writeBuffer.PushContext("numberOfDataElements"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for numberOfDataElements") } - - // Array Field (weeklySchedule) - if pushErr := writeBuffer.PushContext("weeklySchedule", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for weeklySchedule") + numberOfDataElements = m.GetNumberOfDataElements() + _numberOfDataElementsErr := writeBuffer.WriteSerializable(ctx, numberOfDataElements) + if popErr := writeBuffer.PopContext("numberOfDataElements"); popErr != nil { + return errors.Wrap(popErr, "Error popping for numberOfDataElements") } - for _curItem, _element := range m.GetWeeklySchedule() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetWeeklySchedule()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'weeklySchedule' field") - } + if _numberOfDataElementsErr != nil { + return errors.Wrap(_numberOfDataElementsErr, "Error serializing 'numberOfDataElements' field") } - if popErr := writeBuffer.PopContext("weeklySchedule", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for weeklySchedule") + } + + // Array Field (weeklySchedule) + if pushErr := writeBuffer.PushContext("weeklySchedule", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for weeklySchedule") + } + for _curItem, _element := range m.GetWeeklySchedule() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetWeeklySchedule()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'weeklySchedule' field") } + } + if popErr := writeBuffer.PopContext("weeklySchedule", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for weeklySchedule") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataWeeklySchedule"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataWeeklySchedule") @@ -311,6 +313,7 @@ func (m *_BACnetConstructedDataWeeklySchedule) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataWeeklySchedule) isBACnetConstructedDataWeeklySchedule() bool { return true } @@ -325,3 +328,6 @@ func (m *_BACnetConstructedDataWeeklySchedule) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataWindowInterval.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataWindowInterval.go index 1b4a05c1c41..0be1fdd5dde 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataWindowInterval.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataWindowInterval.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataWindowInterval is the corresponding interface of BACnetConstructedDataWindowInterval type BACnetConstructedDataWindowInterval interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataWindowIntervalExactly interface { // _BACnetConstructedDataWindowInterval is the data-structure of this message type _BACnetConstructedDataWindowInterval struct { *_BACnetConstructedData - WindowInterval BACnetApplicationTagUnsignedInteger + WindowInterval BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataWindowInterval) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataWindowInterval) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataWindowInterval) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_WINDOW_INTERVAL -} +func (m *_BACnetConstructedDataWindowInterval) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_WINDOW_INTERVAL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataWindowInterval) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataWindowInterval) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataWindowInterval) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataWindowInterval) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataWindowInterval) GetActualValue() BACnetApplicatio /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataWindowInterval factory function for _BACnetConstructedDataWindowInterval -func NewBACnetConstructedDataWindowInterval(windowInterval BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataWindowInterval { +func NewBACnetConstructedDataWindowInterval( windowInterval BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataWindowInterval { _result := &_BACnetConstructedDataWindowInterval{ - WindowInterval: windowInterval, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + WindowInterval: windowInterval, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataWindowInterval(windowInterval BACnetApplicationTagU // Deprecated: use the interface for direct cast func CastBACnetConstructedDataWindowInterval(structType interface{}) BACnetConstructedDataWindowInterval { - if casted, ok := structType.(BACnetConstructedDataWindowInterval); ok { + if casted, ok := structType.(BACnetConstructedDataWindowInterval); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataWindowInterval); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataWindowInterval) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetConstructedDataWindowInterval) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataWindowIntervalParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("windowInterval"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for windowInterval") } - _windowInterval, _windowIntervalErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_windowInterval, _windowIntervalErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _windowIntervalErr != nil { return nil, errors.Wrap(_windowIntervalErr, "Error parsing 'windowInterval' field of BACnetConstructedDataWindowInterval") } @@ -186,7 +188,7 @@ func BACnetConstructedDataWindowIntervalParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetConstructedDataWindowInterval{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, WindowInterval: windowInterval, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataWindowInterval) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataWindowInterval") } - // Simple Field (windowInterval) - if pushErr := writeBuffer.PushContext("windowInterval"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for windowInterval") - } - _windowIntervalErr := writeBuffer.WriteSerializable(ctx, m.GetWindowInterval()) - if popErr := writeBuffer.PopContext("windowInterval"); popErr != nil { - return errors.Wrap(popErr, "Error popping for windowInterval") - } - if _windowIntervalErr != nil { - return errors.Wrap(_windowIntervalErr, "Error serializing 'windowInterval' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (windowInterval) + if pushErr := writeBuffer.PushContext("windowInterval"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for windowInterval") + } + _windowIntervalErr := writeBuffer.WriteSerializable(ctx, m.GetWindowInterval()) + if popErr := writeBuffer.PopContext("windowInterval"); popErr != nil { + return errors.Wrap(popErr, "Error popping for windowInterval") + } + if _windowIntervalErr != nil { + return errors.Wrap(_windowIntervalErr, "Error serializing 'windowInterval' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataWindowInterval"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataWindowInterval") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataWindowInterval) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataWindowInterval) isBACnetConstructedDataWindowInterval() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataWindowInterval) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataWindowSamples.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataWindowSamples.go index b8154fe56dd..a71dd41a906 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataWindowSamples.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataWindowSamples.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataWindowSamples is the corresponding interface of BACnetConstructedDataWindowSamples type BACnetConstructedDataWindowSamples interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataWindowSamplesExactly interface { // _BACnetConstructedDataWindowSamples is the data-structure of this message type _BACnetConstructedDataWindowSamples struct { *_BACnetConstructedData - WindowSamples BACnetApplicationTagUnsignedInteger + WindowSamples BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataWindowSamples) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataWindowSamples) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataWindowSamples) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_WINDOW_SAMPLES -} +func (m *_BACnetConstructedDataWindowSamples) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_WINDOW_SAMPLES} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataWindowSamples) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataWindowSamples) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataWindowSamples) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataWindowSamples) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataWindowSamples) GetActualValue() BACnetApplication /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataWindowSamples factory function for _BACnetConstructedDataWindowSamples -func NewBACnetConstructedDataWindowSamples(windowSamples BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataWindowSamples { +func NewBACnetConstructedDataWindowSamples( windowSamples BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataWindowSamples { _result := &_BACnetConstructedDataWindowSamples{ - WindowSamples: windowSamples, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + WindowSamples: windowSamples, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataWindowSamples(windowSamples BACnetApplicationTagUns // Deprecated: use the interface for direct cast func CastBACnetConstructedDataWindowSamples(structType interface{}) BACnetConstructedDataWindowSamples { - if casted, ok := structType.(BACnetConstructedDataWindowSamples); ok { + if casted, ok := structType.(BACnetConstructedDataWindowSamples); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataWindowSamples); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataWindowSamples) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetConstructedDataWindowSamples) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataWindowSamplesParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("windowSamples"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for windowSamples") } - _windowSamples, _windowSamplesErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_windowSamples, _windowSamplesErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _windowSamplesErr != nil { return nil, errors.Wrap(_windowSamplesErr, "Error parsing 'windowSamples' field of BACnetConstructedDataWindowSamples") } @@ -186,7 +188,7 @@ func BACnetConstructedDataWindowSamplesParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetConstructedDataWindowSamples{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, WindowSamples: windowSamples, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataWindowSamples) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataWindowSamples") } - // Simple Field (windowSamples) - if pushErr := writeBuffer.PushContext("windowSamples"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for windowSamples") - } - _windowSamplesErr := writeBuffer.WriteSerializable(ctx, m.GetWindowSamples()) - if popErr := writeBuffer.PopContext("windowSamples"); popErr != nil { - return errors.Wrap(popErr, "Error popping for windowSamples") - } - if _windowSamplesErr != nil { - return errors.Wrap(_windowSamplesErr, "Error serializing 'windowSamples' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (windowSamples) + if pushErr := writeBuffer.PushContext("windowSamples"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for windowSamples") + } + _windowSamplesErr := writeBuffer.WriteSerializable(ctx, m.GetWindowSamples()) + if popErr := writeBuffer.PopContext("windowSamples"); popErr != nil { + return errors.Wrap(popErr, "Error popping for windowSamples") + } + if _windowSamplesErr != nil { + return errors.Wrap(_windowSamplesErr, "Error serializing 'windowSamples' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataWindowSamples"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataWindowSamples") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataWindowSamples) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataWindowSamples) isBACnetConstructedDataWindowSamples() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataWindowSamples) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataWriteStatus.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataWriteStatus.go index a605b08befe..74f898d79e4 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataWriteStatus.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataWriteStatus.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataWriteStatus is the corresponding interface of BACnetConstructedDataWriteStatus type BACnetConstructedDataWriteStatus interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataWriteStatusExactly interface { // _BACnetConstructedDataWriteStatus is the data-structure of this message type _BACnetConstructedDataWriteStatus struct { *_BACnetConstructedData - WriteStatus BACnetWriteStatusTagged + WriteStatus BACnetWriteStatusTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataWriteStatus) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataWriteStatus) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataWriteStatus) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_WRITE_STATUS -} +func (m *_BACnetConstructedDataWriteStatus) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_WRITE_STATUS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataWriteStatus) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataWriteStatus) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataWriteStatus) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataWriteStatus) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataWriteStatus) GetActualValue() BACnetWriteStatusTa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataWriteStatus factory function for _BACnetConstructedDataWriteStatus -func NewBACnetConstructedDataWriteStatus(writeStatus BACnetWriteStatusTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataWriteStatus { +func NewBACnetConstructedDataWriteStatus( writeStatus BACnetWriteStatusTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataWriteStatus { _result := &_BACnetConstructedDataWriteStatus{ - WriteStatus: writeStatus, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + WriteStatus: writeStatus, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataWriteStatus(writeStatus BACnetWriteStatusTagged, op // Deprecated: use the interface for direct cast func CastBACnetConstructedDataWriteStatus(structType interface{}) BACnetConstructedDataWriteStatus { - if casted, ok := structType.(BACnetConstructedDataWriteStatus); ok { + if casted, ok := structType.(BACnetConstructedDataWriteStatus); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataWriteStatus); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataWriteStatus) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataWriteStatus) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataWriteStatusParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("writeStatus"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for writeStatus") } - _writeStatus, _writeStatusErr := BACnetWriteStatusTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_writeStatus, _writeStatusErr := BACnetWriteStatusTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _writeStatusErr != nil { return nil, errors.Wrap(_writeStatusErr, "Error parsing 'writeStatus' field of BACnetConstructedDataWriteStatus") } @@ -186,7 +188,7 @@ func BACnetConstructedDataWriteStatusParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataWriteStatus{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, WriteStatus: writeStatus, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataWriteStatus) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataWriteStatus") } - // Simple Field (writeStatus) - if pushErr := writeBuffer.PushContext("writeStatus"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for writeStatus") - } - _writeStatusErr := writeBuffer.WriteSerializable(ctx, m.GetWriteStatus()) - if popErr := writeBuffer.PopContext("writeStatus"); popErr != nil { - return errors.Wrap(popErr, "Error popping for writeStatus") - } - if _writeStatusErr != nil { - return errors.Wrap(_writeStatusErr, "Error serializing 'writeStatus' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (writeStatus) + if pushErr := writeBuffer.PushContext("writeStatus"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for writeStatus") + } + _writeStatusErr := writeBuffer.WriteSerializable(ctx, m.GetWriteStatus()) + if popErr := writeBuffer.PopContext("writeStatus"); popErr != nil { + return errors.Wrap(popErr, "Error popping for writeStatus") + } + if _writeStatusErr != nil { + return errors.Wrap(_writeStatusErr, "Error serializing 'writeStatus' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataWriteStatus"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataWriteStatus") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataWriteStatus) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataWriteStatus) isBACnetConstructedDataWriteStatus() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataWriteStatus) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataZoneFrom.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataZoneFrom.go index b55c42255cc..f6ce87820eb 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataZoneFrom.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataZoneFrom.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataZoneFrom is the corresponding interface of BACnetConstructedDataZoneFrom type BACnetConstructedDataZoneFrom interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataZoneFromExactly interface { // _BACnetConstructedDataZoneFrom is the data-structure of this message type _BACnetConstructedDataZoneFrom struct { *_BACnetConstructedData - ZoneFrom BACnetDeviceObjectReference + ZoneFrom BACnetDeviceObjectReference } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataZoneFrom) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataZoneFrom) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataZoneFrom) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ZONE_FROM -} +func (m *_BACnetConstructedDataZoneFrom) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ZONE_FROM} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataZoneFrom) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataZoneFrom) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataZoneFrom) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataZoneFrom) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataZoneFrom) GetActualValue() BACnetDeviceObjectRefe /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataZoneFrom factory function for _BACnetConstructedDataZoneFrom -func NewBACnetConstructedDataZoneFrom(zoneFrom BACnetDeviceObjectReference, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataZoneFrom { +func NewBACnetConstructedDataZoneFrom( zoneFrom BACnetDeviceObjectReference , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataZoneFrom { _result := &_BACnetConstructedDataZoneFrom{ - ZoneFrom: zoneFrom, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ZoneFrom: zoneFrom, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataZoneFrom(zoneFrom BACnetDeviceObjectReference, open // Deprecated: use the interface for direct cast func CastBACnetConstructedDataZoneFrom(structType interface{}) BACnetConstructedDataZoneFrom { - if casted, ok := structType.(BACnetConstructedDataZoneFrom); ok { + if casted, ok := structType.(BACnetConstructedDataZoneFrom); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataZoneFrom); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataZoneFrom) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetConstructedDataZoneFrom) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataZoneFromParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("zoneFrom"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for zoneFrom") } - _zoneFrom, _zoneFromErr := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) +_zoneFrom, _zoneFromErr := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) if _zoneFromErr != nil { return nil, errors.Wrap(_zoneFromErr, "Error parsing 'zoneFrom' field of BACnetConstructedDataZoneFrom") } @@ -186,7 +188,7 @@ func BACnetConstructedDataZoneFromParseWithBuffer(ctx context.Context, readBuffe // Create a partially initialized instance _child := &_BACnetConstructedDataZoneFrom{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ZoneFrom: zoneFrom, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataZoneFrom) SerializeWithWriteBuffer(ctx context.Co return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataZoneFrom") } - // Simple Field (zoneFrom) - if pushErr := writeBuffer.PushContext("zoneFrom"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for zoneFrom") - } - _zoneFromErr := writeBuffer.WriteSerializable(ctx, m.GetZoneFrom()) - if popErr := writeBuffer.PopContext("zoneFrom"); popErr != nil { - return errors.Wrap(popErr, "Error popping for zoneFrom") - } - if _zoneFromErr != nil { - return errors.Wrap(_zoneFromErr, "Error serializing 'zoneFrom' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (zoneFrom) + if pushErr := writeBuffer.PushContext("zoneFrom"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for zoneFrom") + } + _zoneFromErr := writeBuffer.WriteSerializable(ctx, m.GetZoneFrom()) + if popErr := writeBuffer.PopContext("zoneFrom"); popErr != nil { + return errors.Wrap(popErr, "Error popping for zoneFrom") + } + if _zoneFromErr != nil { + return errors.Wrap(_zoneFromErr, "Error serializing 'zoneFrom' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataZoneFrom"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataZoneFrom") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataZoneFrom) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataZoneFrom) isBACnetConstructedDataZoneFrom() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataZoneFrom) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataZoneMembers.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataZoneMembers.go index decd7b68d88..161202ffac9 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataZoneMembers.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataZoneMembers.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataZoneMembers is the corresponding interface of BACnetConstructedDataZoneMembers type BACnetConstructedDataZoneMembers interface { @@ -47,37 +49,35 @@ type BACnetConstructedDataZoneMembersExactly interface { // _BACnetConstructedDataZoneMembers is the data-structure of this message type _BACnetConstructedDataZoneMembers struct { *_BACnetConstructedData - Members []BACnetDeviceObjectReference + Members []BACnetDeviceObjectReference } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataZoneMembers) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataZoneMembers) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataZoneMembers) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ZONE_MEMBERS -} +func (m *_BACnetConstructedDataZoneMembers) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ZONE_MEMBERS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataZoneMembers) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataZoneMembers) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataZoneMembers) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataZoneMembers) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_BACnetConstructedDataZoneMembers) GetMembers() []BACnetDeviceObjectRef /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataZoneMembers factory function for _BACnetConstructedDataZoneMembers -func NewBACnetConstructedDataZoneMembers(members []BACnetDeviceObjectReference, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataZoneMembers { +func NewBACnetConstructedDataZoneMembers( members []BACnetDeviceObjectReference , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataZoneMembers { _result := &_BACnetConstructedDataZoneMembers{ - Members: members, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + Members: members, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewBACnetConstructedDataZoneMembers(members []BACnetDeviceObjectReference, // Deprecated: use the interface for direct cast func CastBACnetConstructedDataZoneMembers(structType interface{}) BACnetConstructedDataZoneMembers { - if casted, ok := structType.(BACnetConstructedDataZoneMembers); ok { + if casted, ok := structType.(BACnetConstructedDataZoneMembers); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataZoneMembers); ok { @@ -130,6 +131,7 @@ func (m *_BACnetConstructedDataZoneMembers) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetConstructedDataZoneMembers) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,8 +156,8 @@ func BACnetConstructedDataZoneMembersParseWithBuffer(ctx context.Context, readBu // Terminated array var members []BACnetDeviceObjectReference { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'members' field of BACnetConstructedDataZoneMembers") } @@ -173,7 +175,7 @@ func BACnetConstructedDataZoneMembersParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetConstructedDataZoneMembers{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, Members: members, @@ -198,22 +200,22 @@ func (m *_BACnetConstructedDataZoneMembers) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataZoneMembers") } - // Array Field (members) - if pushErr := writeBuffer.PushContext("members", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for members") - } - for _curItem, _element := range m.GetMembers() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetMembers()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'members' field") - } - } - if popErr := writeBuffer.PopContext("members", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for members") + // Array Field (members) + if pushErr := writeBuffer.PushContext("members", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for members") + } + for _curItem, _element := range m.GetMembers() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetMembers()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'members' field") } + } + if popErr := writeBuffer.PopContext("members", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for members") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataZoneMembers"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataZoneMembers") @@ -223,6 +225,7 @@ func (m *_BACnetConstructedDataZoneMembers) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataZoneMembers) isBACnetConstructedDataZoneMembers() bool { return true } @@ -237,3 +240,6 @@ func (m *_BACnetConstructedDataZoneMembers) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataZoneTo.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataZoneTo.go index cb0e7ec0ace..d417ef293d9 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataZoneTo.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataZoneTo.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetConstructedDataZoneTo is the corresponding interface of BACnetConstructedDataZoneTo type BACnetConstructedDataZoneTo interface { @@ -48,37 +50,35 @@ type BACnetConstructedDataZoneToExactly interface { // _BACnetConstructedDataZoneTo is the data-structure of this message type _BACnetConstructedDataZoneTo struct { *_BACnetConstructedData - ZoneTo BACnetDeviceObjectReference + ZoneTo BACnetDeviceObjectReference } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetConstructedDataZoneTo) GetObjectTypeArgument() BACnetObjectType { - return 0 -} +func (m *_BACnetConstructedDataZoneTo) GetObjectTypeArgument() BACnetObjectType { +return 0} -func (m *_BACnetConstructedDataZoneTo) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { - return BACnetPropertyIdentifier_ZONE_TO -} +func (m *_BACnetConstructedDataZoneTo) GetPropertyIdentifierArgument() BACnetPropertyIdentifier { +return BACnetPropertyIdentifier_ZONE_TO} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetConstructedDataZoneTo) InitializeParent(parent BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetConstructedDataZoneTo) InitializeParent(parent BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetConstructedDataZoneTo) GetParent() BACnetConstructedData { +func (m *_BACnetConstructedDataZoneTo) GetParent() BACnetConstructedData { return m._BACnetConstructedData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -108,11 +108,12 @@ func (m *_BACnetConstructedDataZoneTo) GetActualValue() BACnetDeviceObjectRefere /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetConstructedDataZoneTo factory function for _BACnetConstructedDataZoneTo -func NewBACnetConstructedDataZoneTo(zoneTo BACnetDeviceObjectReference, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetConstructedDataZoneTo { +func NewBACnetConstructedDataZoneTo( zoneTo BACnetDeviceObjectReference , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetConstructedDataZoneTo { _result := &_BACnetConstructedDataZoneTo{ - ZoneTo: zoneTo, - _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), + ZoneTo: zoneTo, + _BACnetConstructedData: NewBACnetConstructedData(openingTag, peekedTagHeader, closingTag, tagNumber, arrayIndexArgument), } _result._BACnetConstructedData._BACnetConstructedDataChildRequirements = _result return _result @@ -120,7 +121,7 @@ func NewBACnetConstructedDataZoneTo(zoneTo BACnetDeviceObjectReference, openingT // Deprecated: use the interface for direct cast func CastBACnetConstructedDataZoneTo(structType interface{}) BACnetConstructedDataZoneTo { - if casted, ok := structType.(BACnetConstructedDataZoneTo); ok { + if casted, ok := structType.(BACnetConstructedDataZoneTo); ok { return casted } if casted, ok := structType.(*BACnetConstructedDataZoneTo); ok { @@ -144,6 +145,7 @@ func (m *_BACnetConstructedDataZoneTo) GetLengthInBits(ctx context.Context) uint return lengthInBits } + func (m *_BACnetConstructedDataZoneTo) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +167,7 @@ func BACnetConstructedDataZoneToParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("zoneTo"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for zoneTo") } - _zoneTo, _zoneToErr := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) +_zoneTo, _zoneToErr := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) if _zoneToErr != nil { return nil, errors.Wrap(_zoneToErr, "Error parsing 'zoneTo' field of BACnetConstructedDataZoneTo") } @@ -186,7 +188,7 @@ func BACnetConstructedDataZoneToParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_BACnetConstructedDataZoneTo{ _BACnetConstructedData: &_BACnetConstructedData{ - TagNumber: tagNumber, + TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument, }, ZoneTo: zoneTo, @@ -211,21 +213,21 @@ func (m *_BACnetConstructedDataZoneTo) SerializeWithWriteBuffer(ctx context.Cont return errors.Wrap(pushErr, "Error pushing for BACnetConstructedDataZoneTo") } - // Simple Field (zoneTo) - if pushErr := writeBuffer.PushContext("zoneTo"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for zoneTo") - } - _zoneToErr := writeBuffer.WriteSerializable(ctx, m.GetZoneTo()) - if popErr := writeBuffer.PopContext("zoneTo"); popErr != nil { - return errors.Wrap(popErr, "Error popping for zoneTo") - } - if _zoneToErr != nil { - return errors.Wrap(_zoneToErr, "Error serializing 'zoneTo' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (zoneTo) + if pushErr := writeBuffer.PushContext("zoneTo"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for zoneTo") + } + _zoneToErr := writeBuffer.WriteSerializable(ctx, m.GetZoneTo()) + if popErr := writeBuffer.PopContext("zoneTo"); popErr != nil { + return errors.Wrap(popErr, "Error popping for zoneTo") + } + if _zoneToErr != nil { + return errors.Wrap(_zoneToErr, "Error serializing 'zoneTo' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetConstructedDataZoneTo"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetConstructedDataZoneTo") @@ -235,6 +237,7 @@ func (m *_BACnetConstructedDataZoneTo) SerializeWithWriteBuffer(ctx context.Cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetConstructedDataZoneTo) isBACnetConstructedDataZoneTo() bool { return true } @@ -249,3 +252,6 @@ func (m *_BACnetConstructedDataZoneTo) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTag.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTag.go index a2626f3b0fe..11c7b591148 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTag.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTag.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetContextTag is the corresponding interface of BACnetContextTag type BACnetContextTag interface { @@ -51,7 +53,7 @@ type BACnetContextTagExactly interface { // _BACnetContextTag is the data-structure of this message type _BACnetContextTag struct { _BACnetContextTagChildRequirements - Header BACnetTagHeader + Header BACnetTagHeader // Arguments. TagNumberArgument uint8 @@ -63,6 +65,7 @@ type _BACnetContextTagChildRequirements interface { GetDataType() BACnetDataType } + type BACnetContextTagParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetContextTag, serializeChildFunction func() error) error GetTypeName() string @@ -70,13 +73,12 @@ type BACnetContextTagParent interface { type BACnetContextTagChild interface { utils.Serializable - InitializeParent(parent BACnetContextTag, header BACnetTagHeader) +InitializeParent(parent BACnetContextTag , header BACnetTagHeader ) GetParent() *BACnetContextTag GetTypeName() string BACnetContextTag } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -112,14 +114,15 @@ func (m *_BACnetContextTag) GetActualLength() uint32 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetContextTag factory function for _BACnetContextTag -func NewBACnetContextTag(header BACnetTagHeader, tagNumberArgument uint8) *_BACnetContextTag { - return &_BACnetContextTag{Header: header, TagNumberArgument: tagNumberArgument} +func NewBACnetContextTag( header BACnetTagHeader , tagNumberArgument uint8 ) *_BACnetContextTag { +return &_BACnetContextTag{ Header: header , TagNumberArgument: tagNumberArgument } } // Deprecated: use the interface for direct cast func CastBACnetContextTag(structType interface{}) BACnetContextTag { - if casted, ok := structType.(BACnetContextTag); ok { + if casted, ok := structType.(BACnetContextTag); ok { return casted } if casted, ok := structType.(*BACnetContextTag); ok { @@ -132,6 +135,7 @@ func (m *_BACnetContextTag) GetTypeName() string { return "BACnetContextTag" } + func (m *_BACnetContextTag) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -166,7 +170,7 @@ func BACnetContextTagParseWithBuffer(ctx context.Context, readBuffer utils.ReadB if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetContextTag") } @@ -176,12 +180,12 @@ func BACnetContextTagParseWithBuffer(ctx context.Context, readBuffer utils.ReadB } // Validation - if !(bool((header.GetActualTagNumber()) == (tagNumberArgument))) { + if (!(bool((header.GetActualTagNumber()) == (tagNumberArgument)))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } // Validation - if !(bool((header.GetTagClass()) == (TagClass_CONTEXT_SPECIFIC_TAGS))) { + if (!(bool((header.GetTagClass()) == (TagClass_CONTEXT_SPECIFIC_TAGS)))) { return nil, errors.WithStack(utils.ParseValidationError{"should be a context tag"}) } @@ -196,47 +200,47 @@ func BACnetContextTagParseWithBuffer(ctx context.Context, readBuffer utils.ReadB _ = actualLength // Validation - if !(bool(bool((header.GetLengthValueType()) != (6))) && bool(bool((header.GetLengthValueType()) != (7)))) { + if (!(bool(bool((header.GetLengthValueType()) != ((6)))) && bool(bool((header.GetLengthValueType()) != ((7)))))) { return nil, errors.WithStack(utils.ParseAssertError{"length 6 and 7 reserved for opening and closing tag"}) } // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetContextTagChildSerializeRequirement interface { BACnetContextTag - InitializeParent(BACnetContextTag, BACnetTagHeader) + InitializeParent(BACnetContextTag, BACnetTagHeader) GetParent() BACnetContextTag } var _childTemp interface{} var _child BACnetContextTagChildSerializeRequirement var typeSwitchError error switch { - case dataType == BACnetDataType_NULL: // BACnetContextTagNull +case dataType == BACnetDataType_NULL : // BACnetContextTagNull _childTemp, typeSwitchError = BACnetContextTagNullParseWithBuffer(ctx, readBuffer, header, tagNumberArgument, dataType) - case dataType == BACnetDataType_BOOLEAN: // BACnetContextTagBoolean +case dataType == BACnetDataType_BOOLEAN : // BACnetContextTagBoolean _childTemp, typeSwitchError = BACnetContextTagBooleanParseWithBuffer(ctx, readBuffer, header, tagNumberArgument, dataType) - case dataType == BACnetDataType_UNSIGNED_INTEGER: // BACnetContextTagUnsignedInteger +case dataType == BACnetDataType_UNSIGNED_INTEGER : // BACnetContextTagUnsignedInteger _childTemp, typeSwitchError = BACnetContextTagUnsignedIntegerParseWithBuffer(ctx, readBuffer, header, tagNumberArgument, dataType) - case dataType == BACnetDataType_SIGNED_INTEGER: // BACnetContextTagSignedInteger +case dataType == BACnetDataType_SIGNED_INTEGER : // BACnetContextTagSignedInteger _childTemp, typeSwitchError = BACnetContextTagSignedIntegerParseWithBuffer(ctx, readBuffer, header, tagNumberArgument, dataType) - case dataType == BACnetDataType_REAL: // BACnetContextTagReal +case dataType == BACnetDataType_REAL : // BACnetContextTagReal _childTemp, typeSwitchError = BACnetContextTagRealParseWithBuffer(ctx, readBuffer, tagNumberArgument, dataType) - case dataType == BACnetDataType_DOUBLE: // BACnetContextTagDouble +case dataType == BACnetDataType_DOUBLE : // BACnetContextTagDouble _childTemp, typeSwitchError = BACnetContextTagDoubleParseWithBuffer(ctx, readBuffer, tagNumberArgument, dataType) - case dataType == BACnetDataType_OCTET_STRING: // BACnetContextTagOctetString +case dataType == BACnetDataType_OCTET_STRING : // BACnetContextTagOctetString _childTemp, typeSwitchError = BACnetContextTagOctetStringParseWithBuffer(ctx, readBuffer, header, tagNumberArgument, dataType) - case dataType == BACnetDataType_CHARACTER_STRING: // BACnetContextTagCharacterString +case dataType == BACnetDataType_CHARACTER_STRING : // BACnetContextTagCharacterString _childTemp, typeSwitchError = BACnetContextTagCharacterStringParseWithBuffer(ctx, readBuffer, header, tagNumberArgument, dataType) - case dataType == BACnetDataType_BIT_STRING: // BACnetContextTagBitString +case dataType == BACnetDataType_BIT_STRING : // BACnetContextTagBitString _childTemp, typeSwitchError = BACnetContextTagBitStringParseWithBuffer(ctx, readBuffer, header, tagNumberArgument, dataType) - case dataType == BACnetDataType_ENUMERATED: // BACnetContextTagEnumerated +case dataType == BACnetDataType_ENUMERATED : // BACnetContextTagEnumerated _childTemp, typeSwitchError = BACnetContextTagEnumeratedParseWithBuffer(ctx, readBuffer, header, tagNumberArgument, dataType) - case dataType == BACnetDataType_DATE: // BACnetContextTagDate +case dataType == BACnetDataType_DATE : // BACnetContextTagDate _childTemp, typeSwitchError = BACnetContextTagDateParseWithBuffer(ctx, readBuffer, tagNumberArgument, dataType) - case dataType == BACnetDataType_TIME: // BACnetContextTagTime +case dataType == BACnetDataType_TIME : // BACnetContextTagTime _childTemp, typeSwitchError = BACnetContextTagTimeParseWithBuffer(ctx, readBuffer, tagNumberArgument, dataType) - case dataType == BACnetDataType_BACNET_OBJECT_IDENTIFIER: // BACnetContextTagObjectIdentifier +case dataType == BACnetDataType_BACNET_OBJECT_IDENTIFIER : // BACnetContextTagObjectIdentifier _childTemp, typeSwitchError = BACnetContextTagObjectIdentifierParseWithBuffer(ctx, readBuffer, tagNumberArgument, dataType) - case dataType == BACnetDataType_UNKNOWN: // BACnetContextTagUnknown +case dataType == BACnetDataType_UNKNOWN : // BACnetContextTagUnknown _childTemp, typeSwitchError = BACnetContextTagUnknownParseWithBuffer(ctx, readBuffer, actualLength, tagNumberArgument, dataType) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [dataType=%v]", dataType) @@ -251,7 +255,7 @@ func BACnetContextTagParseWithBuffer(ctx context.Context, readBuffer utils.ReadB } // Finish initializing - _child.InitializeParent(_child, header) +_child.InitializeParent(_child , header ) return _child, nil } @@ -261,7 +265,7 @@ func (pm *_BACnetContextTag) SerializeParent(ctx context.Context, writeBuffer ut _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetContextTag"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetContextTag"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetContextTag") } @@ -296,13 +300,13 @@ func (pm *_BACnetContextTag) SerializeParent(ctx context.Context, writeBuffer ut return nil } + //// // Arguments Getter func (m *_BACnetContextTag) GetTagNumberArgument() uint8 { return m.TagNumberArgument } - // //// @@ -320,3 +324,6 @@ func (m *_BACnetContextTag) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagBitString.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagBitString.go index 06a74fcbd04..d1b1d50fb7b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagBitString.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagBitString.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetContextTagBitString is the corresponding interface of BACnetContextTagBitString type BACnetContextTagBitString interface { @@ -46,31 +48,30 @@ type BACnetContextTagBitStringExactly interface { // _BACnetContextTagBitString is the data-structure of this message type _BACnetContextTagBitString struct { *_BACnetContextTag - Payload BACnetTagPayloadBitString + Payload BACnetTagPayloadBitString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetContextTagBitString) GetDataType() BACnetDataType { - return BACnetDataType_BIT_STRING -} +func (m *_BACnetContextTagBitString) GetDataType() BACnetDataType { +return BACnetDataType_BIT_STRING} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetContextTagBitString) InitializeParent(parent BACnetContextTag, header BACnetTagHeader) { - m.Header = header +func (m *_BACnetContextTagBitString) InitializeParent(parent BACnetContextTag , header BACnetTagHeader ) { m.Header = header } -func (m *_BACnetContextTagBitString) GetParent() BACnetContextTag { +func (m *_BACnetContextTagBitString) GetParent() BACnetContextTag { return m._BACnetContextTag } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -85,11 +86,12 @@ func (m *_BACnetContextTagBitString) GetPayload() BACnetTagPayloadBitString { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetContextTagBitString factory function for _BACnetContextTagBitString -func NewBACnetContextTagBitString(payload BACnetTagPayloadBitString, header BACnetTagHeader, tagNumberArgument uint8) *_BACnetContextTagBitString { +func NewBACnetContextTagBitString( payload BACnetTagPayloadBitString , header BACnetTagHeader , tagNumberArgument uint8 ) *_BACnetContextTagBitString { _result := &_BACnetContextTagBitString{ - Payload: payload, - _BACnetContextTag: NewBACnetContextTag(header, tagNumberArgument), + Payload: payload, + _BACnetContextTag: NewBACnetContextTag(header, tagNumberArgument), } _result._BACnetContextTag._BACnetContextTagChildRequirements = _result return _result @@ -97,7 +99,7 @@ func NewBACnetContextTagBitString(payload BACnetTagPayloadBitString, header BACn // Deprecated: use the interface for direct cast func CastBACnetContextTagBitString(structType interface{}) BACnetContextTagBitString { - if casted, ok := structType.(BACnetContextTagBitString); ok { + if casted, ok := structType.(BACnetContextTagBitString); ok { return casted } if casted, ok := structType.(*BACnetContextTagBitString); ok { @@ -119,6 +121,7 @@ func (m *_BACnetContextTagBitString) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_BACnetContextTagBitString) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -140,7 +143,7 @@ func BACnetContextTagBitStringParseWithBuffer(ctx context.Context, readBuffer ut if pullErr := readBuffer.PullContext("payload"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for payload") } - _payload, _payloadErr := BACnetTagPayloadBitStringParseWithBuffer(ctx, readBuffer, uint32(header.GetActualLength())) +_payload, _payloadErr := BACnetTagPayloadBitStringParseWithBuffer(ctx, readBuffer , uint32( header.GetActualLength() ) ) if _payloadErr != nil { return nil, errors.Wrap(_payloadErr, "Error parsing 'payload' field of BACnetContextTagBitString") } @@ -180,17 +183,17 @@ func (m *_BACnetContextTagBitString) SerializeWithWriteBuffer(ctx context.Contex return errors.Wrap(pushErr, "Error pushing for BACnetContextTagBitString") } - // Simple Field (payload) - if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for payload") - } - _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) - if popErr := writeBuffer.PopContext("payload"); popErr != nil { - return errors.Wrap(popErr, "Error popping for payload") - } - if _payloadErr != nil { - return errors.Wrap(_payloadErr, "Error serializing 'payload' field") - } + // Simple Field (payload) + if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for payload") + } + _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) + if popErr := writeBuffer.PopContext("payload"); popErr != nil { + return errors.Wrap(popErr, "Error popping for payload") + } + if _payloadErr != nil { + return errors.Wrap(_payloadErr, "Error serializing 'payload' field") + } if popErr := writeBuffer.PopContext("BACnetContextTagBitString"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetContextTagBitString") @@ -200,6 +203,7 @@ func (m *_BACnetContextTagBitString) SerializeWithWriteBuffer(ctx context.Contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetContextTagBitString) isBACnetContextTagBitString() bool { return true } @@ -214,3 +218,6 @@ func (m *_BACnetContextTagBitString) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagBoolean.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagBoolean.go index 8ef58aa8706..1ce49e2fea1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagBoolean.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagBoolean.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetContextTagBoolean is the corresponding interface of BACnetContextTagBoolean type BACnetContextTagBoolean interface { @@ -50,32 +52,31 @@ type BACnetContextTagBooleanExactly interface { // _BACnetContextTagBoolean is the data-structure of this message type _BACnetContextTagBoolean struct { *_BACnetContextTag - Value uint8 - Payload BACnetTagPayloadBoolean + Value uint8 + Payload BACnetTagPayloadBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetContextTagBoolean) GetDataType() BACnetDataType { - return BACnetDataType_BOOLEAN -} +func (m *_BACnetContextTagBoolean) GetDataType() BACnetDataType { +return BACnetDataType_BOOLEAN} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetContextTagBoolean) InitializeParent(parent BACnetContextTag, header BACnetTagHeader) { - m.Header = header +func (m *_BACnetContextTagBoolean) InitializeParent(parent BACnetContextTag , header BACnetTagHeader ) { m.Header = header } -func (m *_BACnetContextTagBoolean) GetParent() BACnetContextTag { +func (m *_BACnetContextTagBoolean) GetParent() BACnetContextTag { return m._BACnetContextTag } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -109,12 +110,13 @@ func (m *_BACnetContextTagBoolean) GetActualValue() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetContextTagBoolean factory function for _BACnetContextTagBoolean -func NewBACnetContextTagBoolean(value uint8, payload BACnetTagPayloadBoolean, header BACnetTagHeader, tagNumberArgument uint8) *_BACnetContextTagBoolean { +func NewBACnetContextTagBoolean( value uint8 , payload BACnetTagPayloadBoolean , header BACnetTagHeader , tagNumberArgument uint8 ) *_BACnetContextTagBoolean { _result := &_BACnetContextTagBoolean{ - Value: value, - Payload: payload, - _BACnetContextTag: NewBACnetContextTag(header, tagNumberArgument), + Value: value, + Payload: payload, + _BACnetContextTag: NewBACnetContextTag(header, tagNumberArgument), } _result._BACnetContextTag._BACnetContextTagChildRequirements = _result return _result @@ -122,7 +124,7 @@ func NewBACnetContextTagBoolean(value uint8, payload BACnetTagPayloadBoolean, he // Deprecated: use the interface for direct cast func CastBACnetContextTagBoolean(structType interface{}) BACnetContextTagBoolean { - if casted, ok := structType.(BACnetContextTagBoolean); ok { + if casted, ok := structType.(BACnetContextTagBoolean); ok { return casted } if casted, ok := structType.(*BACnetContextTagBoolean); ok { @@ -139,7 +141,7 @@ func (m *_BACnetContextTagBoolean) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (value) - lengthInBits += 8 + lengthInBits += 8; // Simple field (payload) lengthInBits += m.Payload.GetLengthInBits(ctx) @@ -149,6 +151,7 @@ func (m *_BACnetContextTagBoolean) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetContextTagBoolean) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -167,12 +170,12 @@ func BACnetContextTagBooleanParseWithBuffer(ctx context.Context, readBuffer util _ = currentPos // Validation - if !(bool((header.GetActualLength()) == (1))) { + if (!(bool((header.GetActualLength()) == ((1))))) { return nil, errors.WithStack(utils.ParseValidationError{"length field should be 1"}) } // Simple Field (value) - _value, _valueErr := readBuffer.ReadUint8("value", 8) +_value, _valueErr := readBuffer.ReadUint8("value", 8) if _valueErr != nil { return nil, errors.Wrap(_valueErr, "Error parsing 'value' field of BACnetContextTagBoolean") } @@ -182,7 +185,7 @@ func BACnetContextTagBooleanParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("payload"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for payload") } - _payload, _payloadErr := BACnetTagPayloadBooleanParseWithBuffer(ctx, readBuffer, uint32(value)) +_payload, _payloadErr := BACnetTagPayloadBooleanParseWithBuffer(ctx, readBuffer , uint32( value ) ) if _payloadErr != nil { return nil, errors.Wrap(_payloadErr, "Error parsing 'payload' field of BACnetContextTagBoolean") } @@ -205,7 +208,7 @@ func BACnetContextTagBooleanParseWithBuffer(ctx context.Context, readBuffer util _BACnetContextTag: &_BACnetContextTag{ TagNumberArgument: tagNumberArgument, }, - Value: value, + Value: value, Payload: payload, } _child._BACnetContextTag._BACnetContextTagChildRequirements = _child @@ -228,28 +231,28 @@ func (m *_BACnetContextTagBoolean) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for BACnetContextTagBoolean") } - // Simple Field (value) - value := uint8(m.GetValue()) - _valueErr := writeBuffer.WriteUint8("value", 8, (value)) - if _valueErr != nil { - return errors.Wrap(_valueErr, "Error serializing 'value' field") - } + // Simple Field (value) + value := uint8(m.GetValue()) + _valueErr := writeBuffer.WriteUint8("value", 8, (value)) + if _valueErr != nil { + return errors.Wrap(_valueErr, "Error serializing 'value' field") + } - // Simple Field (payload) - if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for payload") - } - _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) - if popErr := writeBuffer.PopContext("payload"); popErr != nil { - return errors.Wrap(popErr, "Error popping for payload") - } - if _payloadErr != nil { - return errors.Wrap(_payloadErr, "Error serializing 'payload' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (payload) + if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for payload") + } + _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) + if popErr := writeBuffer.PopContext("payload"); popErr != nil { + return errors.Wrap(popErr, "Error popping for payload") + } + if _payloadErr != nil { + return errors.Wrap(_payloadErr, "Error serializing 'payload' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetContextTagBoolean"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetContextTagBoolean") @@ -259,6 +262,7 @@ func (m *_BACnetContextTagBoolean) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetContextTagBoolean) isBACnetContextTagBoolean() bool { return true } @@ -273,3 +277,6 @@ func (m *_BACnetContextTagBoolean) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagCharacterString.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagCharacterString.go index 328e000e10f..cbacd459ac2 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagCharacterString.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagCharacterString.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetContextTagCharacterString is the corresponding interface of BACnetContextTagCharacterString type BACnetContextTagCharacterString interface { @@ -48,31 +50,30 @@ type BACnetContextTagCharacterStringExactly interface { // _BACnetContextTagCharacterString is the data-structure of this message type _BACnetContextTagCharacterString struct { *_BACnetContextTag - Payload BACnetTagPayloadCharacterString + Payload BACnetTagPayloadCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetContextTagCharacterString) GetDataType() BACnetDataType { - return BACnetDataType_CHARACTER_STRING -} +func (m *_BACnetContextTagCharacterString) GetDataType() BACnetDataType { +return BACnetDataType_CHARACTER_STRING} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetContextTagCharacterString) InitializeParent(parent BACnetContextTag, header BACnetTagHeader) { - m.Header = header +func (m *_BACnetContextTagCharacterString) InitializeParent(parent BACnetContextTag , header BACnetTagHeader ) { m.Header = header } -func (m *_BACnetContextTagCharacterString) GetParent() BACnetContextTag { +func (m *_BACnetContextTagCharacterString) GetParent() BACnetContextTag { return m._BACnetContextTag } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -102,11 +103,12 @@ func (m *_BACnetContextTagCharacterString) GetValue() string { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetContextTagCharacterString factory function for _BACnetContextTagCharacterString -func NewBACnetContextTagCharacterString(payload BACnetTagPayloadCharacterString, header BACnetTagHeader, tagNumberArgument uint8) *_BACnetContextTagCharacterString { +func NewBACnetContextTagCharacterString( payload BACnetTagPayloadCharacterString , header BACnetTagHeader , tagNumberArgument uint8 ) *_BACnetContextTagCharacterString { _result := &_BACnetContextTagCharacterString{ - Payload: payload, - _BACnetContextTag: NewBACnetContextTag(header, tagNumberArgument), + Payload: payload, + _BACnetContextTag: NewBACnetContextTag(header, tagNumberArgument), } _result._BACnetContextTag._BACnetContextTagChildRequirements = _result return _result @@ -114,7 +116,7 @@ func NewBACnetContextTagCharacterString(payload BACnetTagPayloadCharacterString, // Deprecated: use the interface for direct cast func CastBACnetContextTagCharacterString(structType interface{}) BACnetContextTagCharacterString { - if casted, ok := structType.(BACnetContextTagCharacterString); ok { + if casted, ok := structType.(BACnetContextTagCharacterString); ok { return casted } if casted, ok := structType.(*BACnetContextTagCharacterString); ok { @@ -138,6 +140,7 @@ func (m *_BACnetContextTagCharacterString) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetContextTagCharacterString) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -159,7 +162,7 @@ func BACnetContextTagCharacterStringParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("payload"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for payload") } - _payload, _payloadErr := BACnetTagPayloadCharacterStringParseWithBuffer(ctx, readBuffer, uint32(header.GetActualLength())) +_payload, _payloadErr := BACnetTagPayloadCharacterStringParseWithBuffer(ctx, readBuffer , uint32( header.GetActualLength() ) ) if _payloadErr != nil { return nil, errors.Wrap(_payloadErr, "Error parsing 'payload' field of BACnetContextTagCharacterString") } @@ -204,21 +207,21 @@ func (m *_BACnetContextTagCharacterString) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetContextTagCharacterString") } - // Simple Field (payload) - if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for payload") - } - _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) - if popErr := writeBuffer.PopContext("payload"); popErr != nil { - return errors.Wrap(popErr, "Error popping for payload") - } - if _payloadErr != nil { - return errors.Wrap(_payloadErr, "Error serializing 'payload' field") - } - // Virtual field - if _valueErr := writeBuffer.WriteVirtual(ctx, "value", m.GetValue()); _valueErr != nil { - return errors.Wrap(_valueErr, "Error serializing 'value' field") - } + // Simple Field (payload) + if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for payload") + } + _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) + if popErr := writeBuffer.PopContext("payload"); popErr != nil { + return errors.Wrap(popErr, "Error popping for payload") + } + if _payloadErr != nil { + return errors.Wrap(_payloadErr, "Error serializing 'payload' field") + } + // Virtual field + if _valueErr := writeBuffer.WriteVirtual(ctx, "value", m.GetValue()); _valueErr != nil { + return errors.Wrap(_valueErr, "Error serializing 'value' field") + } if popErr := writeBuffer.PopContext("BACnetContextTagCharacterString"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetContextTagCharacterString") @@ -228,6 +231,7 @@ func (m *_BACnetContextTagCharacterString) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetContextTagCharacterString) isBACnetContextTagCharacterString() bool { return true } @@ -242,3 +246,6 @@ func (m *_BACnetContextTagCharacterString) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagDate.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagDate.go index 86e16f3c025..882af330367 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagDate.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagDate.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetContextTagDate is the corresponding interface of BACnetContextTagDate type BACnetContextTagDate interface { @@ -46,31 +48,30 @@ type BACnetContextTagDateExactly interface { // _BACnetContextTagDate is the data-structure of this message type _BACnetContextTagDate struct { *_BACnetContextTag - Payload BACnetTagPayloadDate + Payload BACnetTagPayloadDate } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetContextTagDate) GetDataType() BACnetDataType { - return BACnetDataType_DATE -} +func (m *_BACnetContextTagDate) GetDataType() BACnetDataType { +return BACnetDataType_DATE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetContextTagDate) InitializeParent(parent BACnetContextTag, header BACnetTagHeader) { - m.Header = header +func (m *_BACnetContextTagDate) InitializeParent(parent BACnetContextTag , header BACnetTagHeader ) { m.Header = header } -func (m *_BACnetContextTagDate) GetParent() BACnetContextTag { +func (m *_BACnetContextTagDate) GetParent() BACnetContextTag { return m._BACnetContextTag } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -85,11 +86,12 @@ func (m *_BACnetContextTagDate) GetPayload() BACnetTagPayloadDate { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetContextTagDate factory function for _BACnetContextTagDate -func NewBACnetContextTagDate(payload BACnetTagPayloadDate, header BACnetTagHeader, tagNumberArgument uint8) *_BACnetContextTagDate { +func NewBACnetContextTagDate( payload BACnetTagPayloadDate , header BACnetTagHeader , tagNumberArgument uint8 ) *_BACnetContextTagDate { _result := &_BACnetContextTagDate{ - Payload: payload, - _BACnetContextTag: NewBACnetContextTag(header, tagNumberArgument), + Payload: payload, + _BACnetContextTag: NewBACnetContextTag(header, tagNumberArgument), } _result._BACnetContextTag._BACnetContextTagChildRequirements = _result return _result @@ -97,7 +99,7 @@ func NewBACnetContextTagDate(payload BACnetTagPayloadDate, header BACnetTagHeade // Deprecated: use the interface for direct cast func CastBACnetContextTagDate(structType interface{}) BACnetContextTagDate { - if casted, ok := structType.(BACnetContextTagDate); ok { + if casted, ok := structType.(BACnetContextTagDate); ok { return casted } if casted, ok := structType.(*BACnetContextTagDate); ok { @@ -119,6 +121,7 @@ func (m *_BACnetContextTagDate) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetContextTagDate) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -140,7 +143,7 @@ func BACnetContextTagDateParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("payload"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for payload") } - _payload, _payloadErr := BACnetTagPayloadDateParseWithBuffer(ctx, readBuffer) +_payload, _payloadErr := BACnetTagPayloadDateParseWithBuffer(ctx, readBuffer) if _payloadErr != nil { return nil, errors.Wrap(_payloadErr, "Error parsing 'payload' field of BACnetContextTagDate") } @@ -180,17 +183,17 @@ func (m *_BACnetContextTagDate) SerializeWithWriteBuffer(ctx context.Context, wr return errors.Wrap(pushErr, "Error pushing for BACnetContextTagDate") } - // Simple Field (payload) - if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for payload") - } - _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) - if popErr := writeBuffer.PopContext("payload"); popErr != nil { - return errors.Wrap(popErr, "Error popping for payload") - } - if _payloadErr != nil { - return errors.Wrap(_payloadErr, "Error serializing 'payload' field") - } + // Simple Field (payload) + if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for payload") + } + _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) + if popErr := writeBuffer.PopContext("payload"); popErr != nil { + return errors.Wrap(popErr, "Error popping for payload") + } + if _payloadErr != nil { + return errors.Wrap(_payloadErr, "Error serializing 'payload' field") + } if popErr := writeBuffer.PopContext("BACnetContextTagDate"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetContextTagDate") @@ -200,6 +203,7 @@ func (m *_BACnetContextTagDate) SerializeWithWriteBuffer(ctx context.Context, wr return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetContextTagDate) isBACnetContextTagDate() bool { return true } @@ -214,3 +218,6 @@ func (m *_BACnetContextTagDate) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagDouble.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagDouble.go index c2ff74faeb9..2bec7f671af 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagDouble.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagDouble.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetContextTagDouble is the corresponding interface of BACnetContextTagDouble type BACnetContextTagDouble interface { @@ -48,31 +50,30 @@ type BACnetContextTagDoubleExactly interface { // _BACnetContextTagDouble is the data-structure of this message type _BACnetContextTagDouble struct { *_BACnetContextTag - Payload BACnetTagPayloadDouble + Payload BACnetTagPayloadDouble } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetContextTagDouble) GetDataType() BACnetDataType { - return BACnetDataType_DOUBLE -} +func (m *_BACnetContextTagDouble) GetDataType() BACnetDataType { +return BACnetDataType_DOUBLE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetContextTagDouble) InitializeParent(parent BACnetContextTag, header BACnetTagHeader) { - m.Header = header +func (m *_BACnetContextTagDouble) InitializeParent(parent BACnetContextTag , header BACnetTagHeader ) { m.Header = header } -func (m *_BACnetContextTagDouble) GetParent() BACnetContextTag { +func (m *_BACnetContextTagDouble) GetParent() BACnetContextTag { return m._BACnetContextTag } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -102,11 +103,12 @@ func (m *_BACnetContextTagDouble) GetActualValue() float64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetContextTagDouble factory function for _BACnetContextTagDouble -func NewBACnetContextTagDouble(payload BACnetTagPayloadDouble, header BACnetTagHeader, tagNumberArgument uint8) *_BACnetContextTagDouble { +func NewBACnetContextTagDouble( payload BACnetTagPayloadDouble , header BACnetTagHeader , tagNumberArgument uint8 ) *_BACnetContextTagDouble { _result := &_BACnetContextTagDouble{ - Payload: payload, - _BACnetContextTag: NewBACnetContextTag(header, tagNumberArgument), + Payload: payload, + _BACnetContextTag: NewBACnetContextTag(header, tagNumberArgument), } _result._BACnetContextTag._BACnetContextTagChildRequirements = _result return _result @@ -114,7 +116,7 @@ func NewBACnetContextTagDouble(payload BACnetTagPayloadDouble, header BACnetTagH // Deprecated: use the interface for direct cast func CastBACnetContextTagDouble(structType interface{}) BACnetContextTagDouble { - if casted, ok := structType.(BACnetContextTagDouble); ok { + if casted, ok := structType.(BACnetContextTagDouble); ok { return casted } if casted, ok := structType.(*BACnetContextTagDouble); ok { @@ -138,6 +140,7 @@ func (m *_BACnetContextTagDouble) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetContextTagDouble) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -159,7 +162,7 @@ func BACnetContextTagDoubleParseWithBuffer(ctx context.Context, readBuffer utils if pullErr := readBuffer.PullContext("payload"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for payload") } - _payload, _payloadErr := BACnetTagPayloadDoubleParseWithBuffer(ctx, readBuffer) +_payload, _payloadErr := BACnetTagPayloadDoubleParseWithBuffer(ctx, readBuffer) if _payloadErr != nil { return nil, errors.Wrap(_payloadErr, "Error parsing 'payload' field of BACnetContextTagDouble") } @@ -204,21 +207,21 @@ func (m *_BACnetContextTagDouble) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for BACnetContextTagDouble") } - // Simple Field (payload) - if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for payload") - } - _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) - if popErr := writeBuffer.PopContext("payload"); popErr != nil { - return errors.Wrap(popErr, "Error popping for payload") - } - if _payloadErr != nil { - return errors.Wrap(_payloadErr, "Error serializing 'payload' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (payload) + if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for payload") + } + _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) + if popErr := writeBuffer.PopContext("payload"); popErr != nil { + return errors.Wrap(popErr, "Error popping for payload") + } + if _payloadErr != nil { + return errors.Wrap(_payloadErr, "Error serializing 'payload' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetContextTagDouble"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetContextTagDouble") @@ -228,6 +231,7 @@ func (m *_BACnetContextTagDouble) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetContextTagDouble) isBACnetContextTagDouble() bool { return true } @@ -242,3 +246,6 @@ func (m *_BACnetContextTagDouble) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagEnumerated.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagEnumerated.go index b749528cf2c..4a669b20f3d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagEnumerated.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagEnumerated.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetContextTagEnumerated is the corresponding interface of BACnetContextTagEnumerated type BACnetContextTagEnumerated interface { @@ -48,31 +50,30 @@ type BACnetContextTagEnumeratedExactly interface { // _BACnetContextTagEnumerated is the data-structure of this message type _BACnetContextTagEnumerated struct { *_BACnetContextTag - Payload BACnetTagPayloadEnumerated + Payload BACnetTagPayloadEnumerated } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetContextTagEnumerated) GetDataType() BACnetDataType { - return BACnetDataType_ENUMERATED -} +func (m *_BACnetContextTagEnumerated) GetDataType() BACnetDataType { +return BACnetDataType_ENUMERATED} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetContextTagEnumerated) InitializeParent(parent BACnetContextTag, header BACnetTagHeader) { - m.Header = header +func (m *_BACnetContextTagEnumerated) InitializeParent(parent BACnetContextTag , header BACnetTagHeader ) { m.Header = header } -func (m *_BACnetContextTagEnumerated) GetParent() BACnetContextTag { +func (m *_BACnetContextTagEnumerated) GetParent() BACnetContextTag { return m._BACnetContextTag } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -102,11 +103,12 @@ func (m *_BACnetContextTagEnumerated) GetActualValue() uint32 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetContextTagEnumerated factory function for _BACnetContextTagEnumerated -func NewBACnetContextTagEnumerated(payload BACnetTagPayloadEnumerated, header BACnetTagHeader, tagNumberArgument uint8) *_BACnetContextTagEnumerated { +func NewBACnetContextTagEnumerated( payload BACnetTagPayloadEnumerated , header BACnetTagHeader , tagNumberArgument uint8 ) *_BACnetContextTagEnumerated { _result := &_BACnetContextTagEnumerated{ - Payload: payload, - _BACnetContextTag: NewBACnetContextTag(header, tagNumberArgument), + Payload: payload, + _BACnetContextTag: NewBACnetContextTag(header, tagNumberArgument), } _result._BACnetContextTag._BACnetContextTagChildRequirements = _result return _result @@ -114,7 +116,7 @@ func NewBACnetContextTagEnumerated(payload BACnetTagPayloadEnumerated, header BA // Deprecated: use the interface for direct cast func CastBACnetContextTagEnumerated(structType interface{}) BACnetContextTagEnumerated { - if casted, ok := structType.(BACnetContextTagEnumerated); ok { + if casted, ok := structType.(BACnetContextTagEnumerated); ok { return casted } if casted, ok := structType.(*BACnetContextTagEnumerated); ok { @@ -138,6 +140,7 @@ func (m *_BACnetContextTagEnumerated) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_BACnetContextTagEnumerated) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -159,7 +162,7 @@ func BACnetContextTagEnumeratedParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("payload"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for payload") } - _payload, _payloadErr := BACnetTagPayloadEnumeratedParseWithBuffer(ctx, readBuffer, uint32(header.GetActualLength())) +_payload, _payloadErr := BACnetTagPayloadEnumeratedParseWithBuffer(ctx, readBuffer , uint32( header.GetActualLength() ) ) if _payloadErr != nil { return nil, errors.Wrap(_payloadErr, "Error parsing 'payload' field of BACnetContextTagEnumerated") } @@ -204,21 +207,21 @@ func (m *_BACnetContextTagEnumerated) SerializeWithWriteBuffer(ctx context.Conte return errors.Wrap(pushErr, "Error pushing for BACnetContextTagEnumerated") } - // Simple Field (payload) - if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for payload") - } - _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) - if popErr := writeBuffer.PopContext("payload"); popErr != nil { - return errors.Wrap(popErr, "Error popping for payload") - } - if _payloadErr != nil { - return errors.Wrap(_payloadErr, "Error serializing 'payload' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (payload) + if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for payload") + } + _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) + if popErr := writeBuffer.PopContext("payload"); popErr != nil { + return errors.Wrap(popErr, "Error popping for payload") + } + if _payloadErr != nil { + return errors.Wrap(_payloadErr, "Error serializing 'payload' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetContextTagEnumerated"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetContextTagEnumerated") @@ -228,6 +231,7 @@ func (m *_BACnetContextTagEnumerated) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetContextTagEnumerated) isBACnetContextTagEnumerated() bool { return true } @@ -242,3 +246,6 @@ func (m *_BACnetContextTagEnumerated) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagNull.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagNull.go index c8d22b52054..0b5f8236358 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagNull.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagNull.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetContextTagNull is the corresponding interface of BACnetContextTagNull type BACnetContextTagNull interface { @@ -46,32 +48,33 @@ type _BACnetContextTagNull struct { *_BACnetContextTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetContextTagNull) GetDataType() BACnetDataType { - return BACnetDataType_NULL -} +func (m *_BACnetContextTagNull) GetDataType() BACnetDataType { +return BACnetDataType_NULL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetContextTagNull) InitializeParent(parent BACnetContextTag, header BACnetTagHeader) { - m.Header = header +func (m *_BACnetContextTagNull) InitializeParent(parent BACnetContextTag , header BACnetTagHeader ) { m.Header = header } -func (m *_BACnetContextTagNull) GetParent() BACnetContextTag { +func (m *_BACnetContextTagNull) GetParent() BACnetContextTag { return m._BACnetContextTag } + // NewBACnetContextTagNull factory function for _BACnetContextTagNull -func NewBACnetContextTagNull(header BACnetTagHeader, tagNumberArgument uint8) *_BACnetContextTagNull { +func NewBACnetContextTagNull( header BACnetTagHeader , tagNumberArgument uint8 ) *_BACnetContextTagNull { _result := &_BACnetContextTagNull{ - _BACnetContextTag: NewBACnetContextTag(header, tagNumberArgument), + _BACnetContextTag: NewBACnetContextTag(header, tagNumberArgument), } _result._BACnetContextTag._BACnetContextTagChildRequirements = _result return _result @@ -79,7 +82,7 @@ func NewBACnetContextTagNull(header BACnetTagHeader, tagNumberArgument uint8) *_ // Deprecated: use the interface for direct cast func CastBACnetContextTagNull(structType interface{}) BACnetContextTagNull { - if casted, ok := structType.(BACnetContextTagNull); ok { + if casted, ok := structType.(BACnetContextTagNull); ok { return casted } if casted, ok := structType.(*BACnetContextTagNull); ok { @@ -98,6 +101,7 @@ func (m *_BACnetContextTagNull) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetContextTagNull) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -116,7 +120,7 @@ func BACnetContextTagNullParseWithBuffer(ctx context.Context, readBuffer utils.R _ = currentPos // Validation - if !(bool((header.GetActualLength()) == (0))) { + if (!(bool((header.GetActualLength()) == ((0))))) { return nil, errors.WithStack(utils.ParseValidationError{"length field should be 0"}) } @@ -158,6 +162,7 @@ func (m *_BACnetContextTagNull) SerializeWithWriteBuffer(ctx context.Context, wr return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetContextTagNull) isBACnetContextTagNull() bool { return true } @@ -172,3 +177,6 @@ func (m *_BACnetContextTagNull) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagObjectIdentifier.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagObjectIdentifier.go index 287dc013608..a596dfa1358 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagObjectIdentifier.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagObjectIdentifier.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetContextTagObjectIdentifier is the corresponding interface of BACnetContextTagObjectIdentifier type BACnetContextTagObjectIdentifier interface { @@ -50,31 +52,30 @@ type BACnetContextTagObjectIdentifierExactly interface { // _BACnetContextTagObjectIdentifier is the data-structure of this message type _BACnetContextTagObjectIdentifier struct { *_BACnetContextTag - Payload BACnetTagPayloadObjectIdentifier + Payload BACnetTagPayloadObjectIdentifier } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetContextTagObjectIdentifier) GetDataType() BACnetDataType { - return BACnetDataType_BACNET_OBJECT_IDENTIFIER -} +func (m *_BACnetContextTagObjectIdentifier) GetDataType() BACnetDataType { +return BACnetDataType_BACNET_OBJECT_IDENTIFIER} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetContextTagObjectIdentifier) InitializeParent(parent BACnetContextTag, header BACnetTagHeader) { - m.Header = header +func (m *_BACnetContextTagObjectIdentifier) InitializeParent(parent BACnetContextTag , header BACnetTagHeader ) { m.Header = header } -func (m *_BACnetContextTagObjectIdentifier) GetParent() BACnetContextTag { +func (m *_BACnetContextTagObjectIdentifier) GetParent() BACnetContextTag { return m._BACnetContextTag } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -110,11 +111,12 @@ func (m *_BACnetContextTagObjectIdentifier) GetInstanceNumber() uint32 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetContextTagObjectIdentifier factory function for _BACnetContextTagObjectIdentifier -func NewBACnetContextTagObjectIdentifier(payload BACnetTagPayloadObjectIdentifier, header BACnetTagHeader, tagNumberArgument uint8) *_BACnetContextTagObjectIdentifier { +func NewBACnetContextTagObjectIdentifier( payload BACnetTagPayloadObjectIdentifier , header BACnetTagHeader , tagNumberArgument uint8 ) *_BACnetContextTagObjectIdentifier { _result := &_BACnetContextTagObjectIdentifier{ - Payload: payload, - _BACnetContextTag: NewBACnetContextTag(header, tagNumberArgument), + Payload: payload, + _BACnetContextTag: NewBACnetContextTag(header, tagNumberArgument), } _result._BACnetContextTag._BACnetContextTagChildRequirements = _result return _result @@ -122,7 +124,7 @@ func NewBACnetContextTagObjectIdentifier(payload BACnetTagPayloadObjectIdentifie // Deprecated: use the interface for direct cast func CastBACnetContextTagObjectIdentifier(structType interface{}) BACnetContextTagObjectIdentifier { - if casted, ok := structType.(BACnetContextTagObjectIdentifier); ok { + if casted, ok := structType.(BACnetContextTagObjectIdentifier); ok { return casted } if casted, ok := structType.(*BACnetContextTagObjectIdentifier); ok { @@ -148,6 +150,7 @@ func (m *_BACnetContextTagObjectIdentifier) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetContextTagObjectIdentifier) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -169,7 +172,7 @@ func BACnetContextTagObjectIdentifierParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("payload"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for payload") } - _payload, _payloadErr := BACnetTagPayloadObjectIdentifierParseWithBuffer(ctx, readBuffer) +_payload, _payloadErr := BACnetTagPayloadObjectIdentifierParseWithBuffer(ctx, readBuffer) if _payloadErr != nil { return nil, errors.Wrap(_payloadErr, "Error parsing 'payload' field of BACnetContextTagObjectIdentifier") } @@ -219,25 +222,25 @@ func (m *_BACnetContextTagObjectIdentifier) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for BACnetContextTagObjectIdentifier") } - // Simple Field (payload) - if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for payload") - } - _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) - if popErr := writeBuffer.PopContext("payload"); popErr != nil { - return errors.Wrap(popErr, "Error popping for payload") - } - if _payloadErr != nil { - return errors.Wrap(_payloadErr, "Error serializing 'payload' field") - } - // Virtual field - if _objectTypeErr := writeBuffer.WriteVirtual(ctx, "objectType", m.GetObjectType()); _objectTypeErr != nil { - return errors.Wrap(_objectTypeErr, "Error serializing 'objectType' field") - } - // Virtual field - if _instanceNumberErr := writeBuffer.WriteVirtual(ctx, "instanceNumber", m.GetInstanceNumber()); _instanceNumberErr != nil { - return errors.Wrap(_instanceNumberErr, "Error serializing 'instanceNumber' field") - } + // Simple Field (payload) + if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for payload") + } + _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) + if popErr := writeBuffer.PopContext("payload"); popErr != nil { + return errors.Wrap(popErr, "Error popping for payload") + } + if _payloadErr != nil { + return errors.Wrap(_payloadErr, "Error serializing 'payload' field") + } + // Virtual field + if _objectTypeErr := writeBuffer.WriteVirtual(ctx, "objectType", m.GetObjectType()); _objectTypeErr != nil { + return errors.Wrap(_objectTypeErr, "Error serializing 'objectType' field") + } + // Virtual field + if _instanceNumberErr := writeBuffer.WriteVirtual(ctx, "instanceNumber", m.GetInstanceNumber()); _instanceNumberErr != nil { + return errors.Wrap(_instanceNumberErr, "Error serializing 'instanceNumber' field") + } if popErr := writeBuffer.PopContext("BACnetContextTagObjectIdentifier"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetContextTagObjectIdentifier") @@ -247,6 +250,7 @@ func (m *_BACnetContextTagObjectIdentifier) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetContextTagObjectIdentifier) isBACnetContextTagObjectIdentifier() bool { return true } @@ -261,3 +265,6 @@ func (m *_BACnetContextTagObjectIdentifier) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagOctetString.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagOctetString.go index c7335d4b8c8..0f5ca3947d1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagOctetString.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagOctetString.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetContextTagOctetString is the corresponding interface of BACnetContextTagOctetString type BACnetContextTagOctetString interface { @@ -46,31 +48,30 @@ type BACnetContextTagOctetStringExactly interface { // _BACnetContextTagOctetString is the data-structure of this message type _BACnetContextTagOctetString struct { *_BACnetContextTag - Payload BACnetTagPayloadOctetString + Payload BACnetTagPayloadOctetString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetContextTagOctetString) GetDataType() BACnetDataType { - return BACnetDataType_OCTET_STRING -} +func (m *_BACnetContextTagOctetString) GetDataType() BACnetDataType { +return BACnetDataType_OCTET_STRING} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetContextTagOctetString) InitializeParent(parent BACnetContextTag, header BACnetTagHeader) { - m.Header = header +func (m *_BACnetContextTagOctetString) InitializeParent(parent BACnetContextTag , header BACnetTagHeader ) { m.Header = header } -func (m *_BACnetContextTagOctetString) GetParent() BACnetContextTag { +func (m *_BACnetContextTagOctetString) GetParent() BACnetContextTag { return m._BACnetContextTag } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -85,11 +86,12 @@ func (m *_BACnetContextTagOctetString) GetPayload() BACnetTagPayloadOctetString /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetContextTagOctetString factory function for _BACnetContextTagOctetString -func NewBACnetContextTagOctetString(payload BACnetTagPayloadOctetString, header BACnetTagHeader, tagNumberArgument uint8) *_BACnetContextTagOctetString { +func NewBACnetContextTagOctetString( payload BACnetTagPayloadOctetString , header BACnetTagHeader , tagNumberArgument uint8 ) *_BACnetContextTagOctetString { _result := &_BACnetContextTagOctetString{ - Payload: payload, - _BACnetContextTag: NewBACnetContextTag(header, tagNumberArgument), + Payload: payload, + _BACnetContextTag: NewBACnetContextTag(header, tagNumberArgument), } _result._BACnetContextTag._BACnetContextTagChildRequirements = _result return _result @@ -97,7 +99,7 @@ func NewBACnetContextTagOctetString(payload BACnetTagPayloadOctetString, header // Deprecated: use the interface for direct cast func CastBACnetContextTagOctetString(structType interface{}) BACnetContextTagOctetString { - if casted, ok := structType.(BACnetContextTagOctetString); ok { + if casted, ok := structType.(BACnetContextTagOctetString); ok { return casted } if casted, ok := structType.(*BACnetContextTagOctetString); ok { @@ -119,6 +121,7 @@ func (m *_BACnetContextTagOctetString) GetLengthInBits(ctx context.Context) uint return lengthInBits } + func (m *_BACnetContextTagOctetString) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -140,7 +143,7 @@ func BACnetContextTagOctetStringParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("payload"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for payload") } - _payload, _payloadErr := BACnetTagPayloadOctetStringParseWithBuffer(ctx, readBuffer, uint32(header.GetActualLength())) +_payload, _payloadErr := BACnetTagPayloadOctetStringParseWithBuffer(ctx, readBuffer , uint32( header.GetActualLength() ) ) if _payloadErr != nil { return nil, errors.Wrap(_payloadErr, "Error parsing 'payload' field of BACnetContextTagOctetString") } @@ -180,17 +183,17 @@ func (m *_BACnetContextTagOctetString) SerializeWithWriteBuffer(ctx context.Cont return errors.Wrap(pushErr, "Error pushing for BACnetContextTagOctetString") } - // Simple Field (payload) - if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for payload") - } - _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) - if popErr := writeBuffer.PopContext("payload"); popErr != nil { - return errors.Wrap(popErr, "Error popping for payload") - } - if _payloadErr != nil { - return errors.Wrap(_payloadErr, "Error serializing 'payload' field") - } + // Simple Field (payload) + if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for payload") + } + _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) + if popErr := writeBuffer.PopContext("payload"); popErr != nil { + return errors.Wrap(popErr, "Error popping for payload") + } + if _payloadErr != nil { + return errors.Wrap(_payloadErr, "Error serializing 'payload' field") + } if popErr := writeBuffer.PopContext("BACnetContextTagOctetString"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetContextTagOctetString") @@ -200,6 +203,7 @@ func (m *_BACnetContextTagOctetString) SerializeWithWriteBuffer(ctx context.Cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetContextTagOctetString) isBACnetContextTagOctetString() bool { return true } @@ -214,3 +218,6 @@ func (m *_BACnetContextTagOctetString) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagReal.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagReal.go index 93b9e9c81bc..95ace05f82f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagReal.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagReal.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetContextTagReal is the corresponding interface of BACnetContextTagReal type BACnetContextTagReal interface { @@ -48,31 +50,30 @@ type BACnetContextTagRealExactly interface { // _BACnetContextTagReal is the data-structure of this message type _BACnetContextTagReal struct { *_BACnetContextTag - Payload BACnetTagPayloadReal + Payload BACnetTagPayloadReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetContextTagReal) GetDataType() BACnetDataType { - return BACnetDataType_REAL -} +func (m *_BACnetContextTagReal) GetDataType() BACnetDataType { +return BACnetDataType_REAL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetContextTagReal) InitializeParent(parent BACnetContextTag, header BACnetTagHeader) { - m.Header = header +func (m *_BACnetContextTagReal) InitializeParent(parent BACnetContextTag , header BACnetTagHeader ) { m.Header = header } -func (m *_BACnetContextTagReal) GetParent() BACnetContextTag { +func (m *_BACnetContextTagReal) GetParent() BACnetContextTag { return m._BACnetContextTag } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -102,11 +103,12 @@ func (m *_BACnetContextTagReal) GetActualValue() float32 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetContextTagReal factory function for _BACnetContextTagReal -func NewBACnetContextTagReal(payload BACnetTagPayloadReal, header BACnetTagHeader, tagNumberArgument uint8) *_BACnetContextTagReal { +func NewBACnetContextTagReal( payload BACnetTagPayloadReal , header BACnetTagHeader , tagNumberArgument uint8 ) *_BACnetContextTagReal { _result := &_BACnetContextTagReal{ - Payload: payload, - _BACnetContextTag: NewBACnetContextTag(header, tagNumberArgument), + Payload: payload, + _BACnetContextTag: NewBACnetContextTag(header, tagNumberArgument), } _result._BACnetContextTag._BACnetContextTagChildRequirements = _result return _result @@ -114,7 +116,7 @@ func NewBACnetContextTagReal(payload BACnetTagPayloadReal, header BACnetTagHeade // Deprecated: use the interface for direct cast func CastBACnetContextTagReal(structType interface{}) BACnetContextTagReal { - if casted, ok := structType.(BACnetContextTagReal); ok { + if casted, ok := structType.(BACnetContextTagReal); ok { return casted } if casted, ok := structType.(*BACnetContextTagReal); ok { @@ -138,6 +140,7 @@ func (m *_BACnetContextTagReal) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetContextTagReal) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -159,7 +162,7 @@ func BACnetContextTagRealParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("payload"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for payload") } - _payload, _payloadErr := BACnetTagPayloadRealParseWithBuffer(ctx, readBuffer) +_payload, _payloadErr := BACnetTagPayloadRealParseWithBuffer(ctx, readBuffer) if _payloadErr != nil { return nil, errors.Wrap(_payloadErr, "Error parsing 'payload' field of BACnetContextTagReal") } @@ -204,21 +207,21 @@ func (m *_BACnetContextTagReal) SerializeWithWriteBuffer(ctx context.Context, wr return errors.Wrap(pushErr, "Error pushing for BACnetContextTagReal") } - // Simple Field (payload) - if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for payload") - } - _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) - if popErr := writeBuffer.PopContext("payload"); popErr != nil { - return errors.Wrap(popErr, "Error popping for payload") - } - if _payloadErr != nil { - return errors.Wrap(_payloadErr, "Error serializing 'payload' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (payload) + if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for payload") + } + _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) + if popErr := writeBuffer.PopContext("payload"); popErr != nil { + return errors.Wrap(popErr, "Error popping for payload") + } + if _payloadErr != nil { + return errors.Wrap(_payloadErr, "Error serializing 'payload' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetContextTagReal"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetContextTagReal") @@ -228,6 +231,7 @@ func (m *_BACnetContextTagReal) SerializeWithWriteBuffer(ctx context.Context, wr return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetContextTagReal) isBACnetContextTagReal() bool { return true } @@ -242,3 +246,6 @@ func (m *_BACnetContextTagReal) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagSignedInteger.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagSignedInteger.go index 88f21fb83ba..aae95b2dc9f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagSignedInteger.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagSignedInteger.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetContextTagSignedInteger is the corresponding interface of BACnetContextTagSignedInteger type BACnetContextTagSignedInteger interface { @@ -48,31 +50,30 @@ type BACnetContextTagSignedIntegerExactly interface { // _BACnetContextTagSignedInteger is the data-structure of this message type _BACnetContextTagSignedInteger struct { *_BACnetContextTag - Payload BACnetTagPayloadSignedInteger + Payload BACnetTagPayloadSignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetContextTagSignedInteger) GetDataType() BACnetDataType { - return BACnetDataType_SIGNED_INTEGER -} +func (m *_BACnetContextTagSignedInteger) GetDataType() BACnetDataType { +return BACnetDataType_SIGNED_INTEGER} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetContextTagSignedInteger) InitializeParent(parent BACnetContextTag, header BACnetTagHeader) { - m.Header = header +func (m *_BACnetContextTagSignedInteger) InitializeParent(parent BACnetContextTag , header BACnetTagHeader ) { m.Header = header } -func (m *_BACnetContextTagSignedInteger) GetParent() BACnetContextTag { +func (m *_BACnetContextTagSignedInteger) GetParent() BACnetContextTag { return m._BACnetContextTag } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -102,11 +103,12 @@ func (m *_BACnetContextTagSignedInteger) GetActualValue() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetContextTagSignedInteger factory function for _BACnetContextTagSignedInteger -func NewBACnetContextTagSignedInteger(payload BACnetTagPayloadSignedInteger, header BACnetTagHeader, tagNumberArgument uint8) *_BACnetContextTagSignedInteger { +func NewBACnetContextTagSignedInteger( payload BACnetTagPayloadSignedInteger , header BACnetTagHeader , tagNumberArgument uint8 ) *_BACnetContextTagSignedInteger { _result := &_BACnetContextTagSignedInteger{ - Payload: payload, - _BACnetContextTag: NewBACnetContextTag(header, tagNumberArgument), + Payload: payload, + _BACnetContextTag: NewBACnetContextTag(header, tagNumberArgument), } _result._BACnetContextTag._BACnetContextTagChildRequirements = _result return _result @@ -114,7 +116,7 @@ func NewBACnetContextTagSignedInteger(payload BACnetTagPayloadSignedInteger, hea // Deprecated: use the interface for direct cast func CastBACnetContextTagSignedInteger(structType interface{}) BACnetContextTagSignedInteger { - if casted, ok := structType.(BACnetContextTagSignedInteger); ok { + if casted, ok := structType.(BACnetContextTagSignedInteger); ok { return casted } if casted, ok := structType.(*BACnetContextTagSignedInteger); ok { @@ -138,6 +140,7 @@ func (m *_BACnetContextTagSignedInteger) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetContextTagSignedInteger) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -159,7 +162,7 @@ func BACnetContextTagSignedIntegerParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("payload"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for payload") } - _payload, _payloadErr := BACnetTagPayloadSignedIntegerParseWithBuffer(ctx, readBuffer, uint32(header.GetActualLength())) +_payload, _payloadErr := BACnetTagPayloadSignedIntegerParseWithBuffer(ctx, readBuffer , uint32( header.GetActualLength() ) ) if _payloadErr != nil { return nil, errors.Wrap(_payloadErr, "Error parsing 'payload' field of BACnetContextTagSignedInteger") } @@ -204,21 +207,21 @@ func (m *_BACnetContextTagSignedInteger) SerializeWithWriteBuffer(ctx context.Co return errors.Wrap(pushErr, "Error pushing for BACnetContextTagSignedInteger") } - // Simple Field (payload) - if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for payload") - } - _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) - if popErr := writeBuffer.PopContext("payload"); popErr != nil { - return errors.Wrap(popErr, "Error popping for payload") - } - if _payloadErr != nil { - return errors.Wrap(_payloadErr, "Error serializing 'payload' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (payload) + if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for payload") + } + _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) + if popErr := writeBuffer.PopContext("payload"); popErr != nil { + return errors.Wrap(popErr, "Error popping for payload") + } + if _payloadErr != nil { + return errors.Wrap(_payloadErr, "Error serializing 'payload' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetContextTagSignedInteger"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetContextTagSignedInteger") @@ -228,6 +231,7 @@ func (m *_BACnetContextTagSignedInteger) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetContextTagSignedInteger) isBACnetContextTagSignedInteger() bool { return true } @@ -242,3 +246,6 @@ func (m *_BACnetContextTagSignedInteger) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagTime.go index b2fe588278e..be83ada0ab1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetContextTagTime is the corresponding interface of BACnetContextTagTime type BACnetContextTagTime interface { @@ -46,31 +48,30 @@ type BACnetContextTagTimeExactly interface { // _BACnetContextTagTime is the data-structure of this message type _BACnetContextTagTime struct { *_BACnetContextTag - Payload BACnetTagPayloadTime + Payload BACnetTagPayloadTime } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetContextTagTime) GetDataType() BACnetDataType { - return BACnetDataType_TIME -} +func (m *_BACnetContextTagTime) GetDataType() BACnetDataType { +return BACnetDataType_TIME} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetContextTagTime) InitializeParent(parent BACnetContextTag, header BACnetTagHeader) { - m.Header = header +func (m *_BACnetContextTagTime) InitializeParent(parent BACnetContextTag , header BACnetTagHeader ) { m.Header = header } -func (m *_BACnetContextTagTime) GetParent() BACnetContextTag { +func (m *_BACnetContextTagTime) GetParent() BACnetContextTag { return m._BACnetContextTag } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -85,11 +86,12 @@ func (m *_BACnetContextTagTime) GetPayload() BACnetTagPayloadTime { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetContextTagTime factory function for _BACnetContextTagTime -func NewBACnetContextTagTime(payload BACnetTagPayloadTime, header BACnetTagHeader, tagNumberArgument uint8) *_BACnetContextTagTime { +func NewBACnetContextTagTime( payload BACnetTagPayloadTime , header BACnetTagHeader , tagNumberArgument uint8 ) *_BACnetContextTagTime { _result := &_BACnetContextTagTime{ - Payload: payload, - _BACnetContextTag: NewBACnetContextTag(header, tagNumberArgument), + Payload: payload, + _BACnetContextTag: NewBACnetContextTag(header, tagNumberArgument), } _result._BACnetContextTag._BACnetContextTagChildRequirements = _result return _result @@ -97,7 +99,7 @@ func NewBACnetContextTagTime(payload BACnetTagPayloadTime, header BACnetTagHeade // Deprecated: use the interface for direct cast func CastBACnetContextTagTime(structType interface{}) BACnetContextTagTime { - if casted, ok := structType.(BACnetContextTagTime); ok { + if casted, ok := structType.(BACnetContextTagTime); ok { return casted } if casted, ok := structType.(*BACnetContextTagTime); ok { @@ -119,6 +121,7 @@ func (m *_BACnetContextTagTime) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetContextTagTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -140,7 +143,7 @@ func BACnetContextTagTimeParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("payload"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for payload") } - _payload, _payloadErr := BACnetTagPayloadTimeParseWithBuffer(ctx, readBuffer) +_payload, _payloadErr := BACnetTagPayloadTimeParseWithBuffer(ctx, readBuffer) if _payloadErr != nil { return nil, errors.Wrap(_payloadErr, "Error parsing 'payload' field of BACnetContextTagTime") } @@ -180,17 +183,17 @@ func (m *_BACnetContextTagTime) SerializeWithWriteBuffer(ctx context.Context, wr return errors.Wrap(pushErr, "Error pushing for BACnetContextTagTime") } - // Simple Field (payload) - if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for payload") - } - _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) - if popErr := writeBuffer.PopContext("payload"); popErr != nil { - return errors.Wrap(popErr, "Error popping for payload") - } - if _payloadErr != nil { - return errors.Wrap(_payloadErr, "Error serializing 'payload' field") - } + // Simple Field (payload) + if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for payload") + } + _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) + if popErr := writeBuffer.PopContext("payload"); popErr != nil { + return errors.Wrap(popErr, "Error popping for payload") + } + if _payloadErr != nil { + return errors.Wrap(_payloadErr, "Error serializing 'payload' field") + } if popErr := writeBuffer.PopContext("BACnetContextTagTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetContextTagTime") @@ -200,6 +203,7 @@ func (m *_BACnetContextTagTime) SerializeWithWriteBuffer(ctx context.Context, wr return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetContextTagTime) isBACnetContextTagTime() bool { return true } @@ -214,3 +218,6 @@ func (m *_BACnetContextTagTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagUnknown.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagUnknown.go index 8eda99e687c..d086e60c1f4 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagUnknown.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagUnknown.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetContextTagUnknown is the corresponding interface of BACnetContextTagUnknown type BACnetContextTagUnknown interface { @@ -46,34 +48,33 @@ type BACnetContextTagUnknownExactly interface { // _BACnetContextTagUnknown is the data-structure of this message type _BACnetContextTagUnknown struct { *_BACnetContextTag - UnknownData []byte + UnknownData []byte // Arguments. ActualLength uint32 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetContextTagUnknown) GetDataType() BACnetDataType { - return BACnetDataType_UNKNOWN -} +func (m *_BACnetContextTagUnknown) GetDataType() BACnetDataType { +return BACnetDataType_UNKNOWN} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetContextTagUnknown) InitializeParent(parent BACnetContextTag, header BACnetTagHeader) { - m.Header = header +func (m *_BACnetContextTagUnknown) InitializeParent(parent BACnetContextTag , header BACnetTagHeader ) { m.Header = header } -func (m *_BACnetContextTagUnknown) GetParent() BACnetContextTag { +func (m *_BACnetContextTagUnknown) GetParent() BACnetContextTag { return m._BACnetContextTag } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -88,11 +89,12 @@ func (m *_BACnetContextTagUnknown) GetUnknownData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetContextTagUnknown factory function for _BACnetContextTagUnknown -func NewBACnetContextTagUnknown(unknownData []byte, header BACnetTagHeader, actualLength uint32, tagNumberArgument uint8) *_BACnetContextTagUnknown { +func NewBACnetContextTagUnknown( unknownData []byte , header BACnetTagHeader , actualLength uint32 , tagNumberArgument uint8 ) *_BACnetContextTagUnknown { _result := &_BACnetContextTagUnknown{ - UnknownData: unknownData, - _BACnetContextTag: NewBACnetContextTag(header, tagNumberArgument), + UnknownData: unknownData, + _BACnetContextTag: NewBACnetContextTag(header, tagNumberArgument), } _result._BACnetContextTag._BACnetContextTagChildRequirements = _result return _result @@ -100,7 +102,7 @@ func NewBACnetContextTagUnknown(unknownData []byte, header BACnetTagHeader, actu // Deprecated: use the interface for direct cast func CastBACnetContextTagUnknown(structType interface{}) BACnetContextTagUnknown { - if casted, ok := structType.(BACnetContextTagUnknown); ok { + if casted, ok := structType.(BACnetContextTagUnknown); ok { return casted } if casted, ok := structType.(*BACnetContextTagUnknown); ok { @@ -124,6 +126,7 @@ func (m *_BACnetContextTagUnknown) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetContextTagUnknown) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -178,11 +181,11 @@ func (m *_BACnetContextTagUnknown) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for BACnetContextTagUnknown") } - // Array Field (unknownData) - // Byte Array field (unknownData) - if err := writeBuffer.WriteByteArray("unknownData", m.GetUnknownData()); err != nil { - return errors.Wrap(err, "Error serializing 'unknownData' field") - } + // Array Field (unknownData) + // Byte Array field (unknownData) + if err := writeBuffer.WriteByteArray("unknownData", m.GetUnknownData()); err != nil { + return errors.Wrap(err, "Error serializing 'unknownData' field") + } if popErr := writeBuffer.PopContext("BACnetContextTagUnknown"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetContextTagUnknown") @@ -192,13 +195,13 @@ func (m *_BACnetContextTagUnknown) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + //// // Arguments Getter func (m *_BACnetContextTagUnknown) GetActualLength() uint32 { return m.ActualLength } - // //// @@ -216,3 +219,6 @@ func (m *_BACnetContextTagUnknown) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagUnsignedInteger.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagUnsignedInteger.go index 28be0b1221b..235e6e949e6 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagUnsignedInteger.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagUnsignedInteger.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetContextTagUnsignedInteger is the corresponding interface of BACnetContextTagUnsignedInteger type BACnetContextTagUnsignedInteger interface { @@ -48,31 +50,30 @@ type BACnetContextTagUnsignedIntegerExactly interface { // _BACnetContextTagUnsignedInteger is the data-structure of this message type _BACnetContextTagUnsignedInteger struct { *_BACnetContextTag - Payload BACnetTagPayloadUnsignedInteger + Payload BACnetTagPayloadUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetContextTagUnsignedInteger) GetDataType() BACnetDataType { - return BACnetDataType_UNSIGNED_INTEGER -} +func (m *_BACnetContextTagUnsignedInteger) GetDataType() BACnetDataType { +return BACnetDataType_UNSIGNED_INTEGER} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetContextTagUnsignedInteger) InitializeParent(parent BACnetContextTag, header BACnetTagHeader) { - m.Header = header +func (m *_BACnetContextTagUnsignedInteger) InitializeParent(parent BACnetContextTag , header BACnetTagHeader ) { m.Header = header } -func (m *_BACnetContextTagUnsignedInteger) GetParent() BACnetContextTag { +func (m *_BACnetContextTagUnsignedInteger) GetParent() BACnetContextTag { return m._BACnetContextTag } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -102,11 +103,12 @@ func (m *_BACnetContextTagUnsignedInteger) GetActualValue() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetContextTagUnsignedInteger factory function for _BACnetContextTagUnsignedInteger -func NewBACnetContextTagUnsignedInteger(payload BACnetTagPayloadUnsignedInteger, header BACnetTagHeader, tagNumberArgument uint8) *_BACnetContextTagUnsignedInteger { +func NewBACnetContextTagUnsignedInteger( payload BACnetTagPayloadUnsignedInteger , header BACnetTagHeader , tagNumberArgument uint8 ) *_BACnetContextTagUnsignedInteger { _result := &_BACnetContextTagUnsignedInteger{ - Payload: payload, - _BACnetContextTag: NewBACnetContextTag(header, tagNumberArgument), + Payload: payload, + _BACnetContextTag: NewBACnetContextTag(header, tagNumberArgument), } _result._BACnetContextTag._BACnetContextTagChildRequirements = _result return _result @@ -114,7 +116,7 @@ func NewBACnetContextTagUnsignedInteger(payload BACnetTagPayloadUnsignedInteger, // Deprecated: use the interface for direct cast func CastBACnetContextTagUnsignedInteger(structType interface{}) BACnetContextTagUnsignedInteger { - if casted, ok := structType.(BACnetContextTagUnsignedInteger); ok { + if casted, ok := structType.(BACnetContextTagUnsignedInteger); ok { return casted } if casted, ok := structType.(*BACnetContextTagUnsignedInteger); ok { @@ -138,6 +140,7 @@ func (m *_BACnetContextTagUnsignedInteger) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetContextTagUnsignedInteger) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -159,7 +162,7 @@ func BACnetContextTagUnsignedIntegerParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("payload"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for payload") } - _payload, _payloadErr := BACnetTagPayloadUnsignedIntegerParseWithBuffer(ctx, readBuffer, uint32(header.GetActualLength())) +_payload, _payloadErr := BACnetTagPayloadUnsignedIntegerParseWithBuffer(ctx, readBuffer , uint32( header.GetActualLength() ) ) if _payloadErr != nil { return nil, errors.Wrap(_payloadErr, "Error parsing 'payload' field of BACnetContextTagUnsignedInteger") } @@ -204,21 +207,21 @@ func (m *_BACnetContextTagUnsignedInteger) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetContextTagUnsignedInteger") } - // Simple Field (payload) - if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for payload") - } - _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) - if popErr := writeBuffer.PopContext("payload"); popErr != nil { - return errors.Wrap(popErr, "Error popping for payload") - } - if _payloadErr != nil { - return errors.Wrap(_payloadErr, "Error serializing 'payload' field") - } - // Virtual field - if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { - return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") - } + // Simple Field (payload) + if pushErr := writeBuffer.PushContext("payload"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for payload") + } + _payloadErr := writeBuffer.WriteSerializable(ctx, m.GetPayload()) + if popErr := writeBuffer.PopContext("payload"); popErr != nil { + return errors.Wrap(popErr, "Error popping for payload") + } + if _payloadErr != nil { + return errors.Wrap(_payloadErr, "Error serializing 'payload' field") + } + // Virtual field + if _actualValueErr := writeBuffer.WriteVirtual(ctx, "actualValue", m.GetActualValue()); _actualValueErr != nil { + return errors.Wrap(_actualValueErr, "Error serializing 'actualValue' field") + } if popErr := writeBuffer.PopContext("BACnetContextTagUnsignedInteger"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetContextTagUnsignedInteger") @@ -228,6 +231,7 @@ func (m *_BACnetContextTagUnsignedInteger) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetContextTagUnsignedInteger) isBACnetContextTagUnsignedInteger() bool { return true } @@ -242,3 +246,6 @@ func (m *_BACnetContextTagUnsignedInteger) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetCredentialAuthenticationFactor.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetCredentialAuthenticationFactor.go index 94d5f9ecb97..c4b420546d0 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetCredentialAuthenticationFactor.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetCredentialAuthenticationFactor.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetCredentialAuthenticationFactor is the corresponding interface of BACnetCredentialAuthenticationFactor type BACnetCredentialAuthenticationFactor interface { @@ -46,10 +48,11 @@ type BACnetCredentialAuthenticationFactorExactly interface { // _BACnetCredentialAuthenticationFactor is the data-structure of this message type _BACnetCredentialAuthenticationFactor struct { - Disable BACnetAccessAuthenticationFactorDisableTagged - AuthenticationFactor BACnetAuthenticationFactorEnclosed + Disable BACnetAccessAuthenticationFactorDisableTagged + AuthenticationFactor BACnetAuthenticationFactorEnclosed } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -68,14 +71,15 @@ func (m *_BACnetCredentialAuthenticationFactor) GetAuthenticationFactor() BACnet /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetCredentialAuthenticationFactor factory function for _BACnetCredentialAuthenticationFactor -func NewBACnetCredentialAuthenticationFactor(disable BACnetAccessAuthenticationFactorDisableTagged, authenticationFactor BACnetAuthenticationFactorEnclosed) *_BACnetCredentialAuthenticationFactor { - return &_BACnetCredentialAuthenticationFactor{Disable: disable, AuthenticationFactor: authenticationFactor} +func NewBACnetCredentialAuthenticationFactor( disable BACnetAccessAuthenticationFactorDisableTagged , authenticationFactor BACnetAuthenticationFactorEnclosed ) *_BACnetCredentialAuthenticationFactor { +return &_BACnetCredentialAuthenticationFactor{ Disable: disable , AuthenticationFactor: authenticationFactor } } // Deprecated: use the interface for direct cast func CastBACnetCredentialAuthenticationFactor(structType interface{}) BACnetCredentialAuthenticationFactor { - if casted, ok := structType.(BACnetCredentialAuthenticationFactor); ok { + if casted, ok := structType.(BACnetCredentialAuthenticationFactor); ok { return casted } if casted, ok := structType.(*BACnetCredentialAuthenticationFactor); ok { @@ -100,6 +104,7 @@ func (m *_BACnetCredentialAuthenticationFactor) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetCredentialAuthenticationFactor) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -121,7 +126,7 @@ func BACnetCredentialAuthenticationFactorParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("disable"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for disable") } - _disable, _disableErr := BACnetAccessAuthenticationFactorDisableTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_disable, _disableErr := BACnetAccessAuthenticationFactorDisableTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _disableErr != nil { return nil, errors.Wrap(_disableErr, "Error parsing 'disable' field of BACnetCredentialAuthenticationFactor") } @@ -134,7 +139,7 @@ func BACnetCredentialAuthenticationFactorParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("authenticationFactor"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for authenticationFactor") } - _authenticationFactor, _authenticationFactorErr := BACnetAuthenticationFactorEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(1))) +_authenticationFactor, _authenticationFactorErr := BACnetAuthenticationFactorEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) ) if _authenticationFactorErr != nil { return nil, errors.Wrap(_authenticationFactorErr, "Error parsing 'authenticationFactor' field of BACnetCredentialAuthenticationFactor") } @@ -149,9 +154,9 @@ func BACnetCredentialAuthenticationFactorParseWithBuffer(ctx context.Context, re // Create the instance return &_BACnetCredentialAuthenticationFactor{ - Disable: disable, - AuthenticationFactor: authenticationFactor, - }, nil + Disable: disable, + AuthenticationFactor: authenticationFactor, + }, nil } func (m *_BACnetCredentialAuthenticationFactor) Serialize() ([]byte, error) { @@ -165,7 +170,7 @@ func (m *_BACnetCredentialAuthenticationFactor) Serialize() ([]byte, error) { func (m *_BACnetCredentialAuthenticationFactor) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetCredentialAuthenticationFactor"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetCredentialAuthenticationFactor"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetCredentialAuthenticationFactor") } @@ -199,6 +204,7 @@ func (m *_BACnetCredentialAuthenticationFactor) SerializeWithWriteBuffer(ctx con return nil } + func (m *_BACnetCredentialAuthenticationFactor) isBACnetCredentialAuthenticationFactor() bool { return true } @@ -213,3 +219,6 @@ func (m *_BACnetCredentialAuthenticationFactor) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetDailySchedule.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetDailySchedule.go index 3d4942c8e7b..15383601ff6 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetDailySchedule.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetDailySchedule.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetDailySchedule is the corresponding interface of BACnetDailySchedule type BACnetDailySchedule interface { @@ -49,11 +51,12 @@ type BACnetDailyScheduleExactly interface { // _BACnetDailySchedule is the data-structure of this message type _BACnetDailySchedule struct { - OpeningTag BACnetOpeningTag - DaySchedule []BACnetTimeValue - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + DaySchedule []BACnetTimeValue + ClosingTag BACnetClosingTag } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -76,14 +79,15 @@ func (m *_BACnetDailySchedule) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetDailySchedule factory function for _BACnetDailySchedule -func NewBACnetDailySchedule(openingTag BACnetOpeningTag, daySchedule []BACnetTimeValue, closingTag BACnetClosingTag) *_BACnetDailySchedule { - return &_BACnetDailySchedule{OpeningTag: openingTag, DaySchedule: daySchedule, ClosingTag: closingTag} +func NewBACnetDailySchedule( openingTag BACnetOpeningTag , daySchedule []BACnetTimeValue , closingTag BACnetClosingTag ) *_BACnetDailySchedule { +return &_BACnetDailySchedule{ OpeningTag: openingTag , DaySchedule: daySchedule , ClosingTag: closingTag } } // Deprecated: use the interface for direct cast func CastBACnetDailySchedule(structType interface{}) BACnetDailySchedule { - if casted, ok := structType.(BACnetDailySchedule); ok { + if casted, ok := structType.(BACnetDailySchedule); ok { return casted } if casted, ok := structType.(*BACnetDailySchedule); ok { @@ -115,6 +119,7 @@ func (m *_BACnetDailySchedule) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetDailySchedule) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +141,7 @@ func BACnetDailyScheduleParseWithBuffer(ctx context.Context, readBuffer utils.Re if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetDailySchedule") } @@ -152,8 +157,8 @@ func BACnetDailyScheduleParseWithBuffer(ctx context.Context, readBuffer utils.Re // Terminated array var daySchedule []BACnetTimeValue { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, 0)) { - _item, _err := BACnetTimeValueParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, 0)); { +_item, _err := BACnetTimeValueParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'daySchedule' field of BACnetDailySchedule") } @@ -168,7 +173,7 @@ func BACnetDailyScheduleParseWithBuffer(ctx context.Context, readBuffer utils.Re if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetDailySchedule") } @@ -183,10 +188,10 @@ func BACnetDailyScheduleParseWithBuffer(ctx context.Context, readBuffer utils.Re // Create the instance return &_BACnetDailySchedule{ - OpeningTag: openingTag, - DaySchedule: daySchedule, - ClosingTag: closingTag, - }, nil + OpeningTag: openingTag, + DaySchedule: daySchedule, + ClosingTag: closingTag, + }, nil } func (m *_BACnetDailySchedule) Serialize() ([]byte, error) { @@ -200,7 +205,7 @@ func (m *_BACnetDailySchedule) Serialize() ([]byte, error) { func (m *_BACnetDailySchedule) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetDailySchedule"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetDailySchedule"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetDailySchedule") } @@ -251,6 +256,7 @@ func (m *_BACnetDailySchedule) SerializeWithWriteBuffer(ctx context.Context, wri return nil } + func (m *_BACnetDailySchedule) isBACnetDailySchedule() bool { return true } @@ -265,3 +271,6 @@ func (m *_BACnetDailySchedule) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetDataType.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetDataType.go index bae6936789b..55d26f3d89d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetDataType.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetDataType.go @@ -34,28 +34,28 @@ type IBACnetDataType interface { utils.Serializable } -const ( - BACnetDataType_NULL BACnetDataType = 0 - BACnetDataType_BOOLEAN BACnetDataType = 1 - BACnetDataType_UNSIGNED_INTEGER BACnetDataType = 2 - BACnetDataType_SIGNED_INTEGER BACnetDataType = 3 - BACnetDataType_REAL BACnetDataType = 4 - BACnetDataType_DOUBLE BACnetDataType = 5 - BACnetDataType_OCTET_STRING BACnetDataType = 6 - BACnetDataType_CHARACTER_STRING BACnetDataType = 7 - BACnetDataType_BIT_STRING BACnetDataType = 8 - BACnetDataType_ENUMERATED BACnetDataType = 9 - BACnetDataType_DATE BACnetDataType = 10 - BACnetDataType_TIME BACnetDataType = 11 +const( + BACnetDataType_NULL BACnetDataType = 0 + BACnetDataType_BOOLEAN BACnetDataType = 1 + BACnetDataType_UNSIGNED_INTEGER BACnetDataType = 2 + BACnetDataType_SIGNED_INTEGER BACnetDataType = 3 + BACnetDataType_REAL BACnetDataType = 4 + BACnetDataType_DOUBLE BACnetDataType = 5 + BACnetDataType_OCTET_STRING BACnetDataType = 6 + BACnetDataType_CHARACTER_STRING BACnetDataType = 7 + BACnetDataType_BIT_STRING BACnetDataType = 8 + BACnetDataType_ENUMERATED BACnetDataType = 9 + BACnetDataType_DATE BACnetDataType = 10 + BACnetDataType_TIME BACnetDataType = 11 BACnetDataType_BACNET_OBJECT_IDENTIFIER BACnetDataType = 12 - BACnetDataType_UNKNOWN BACnetDataType = 33 + BACnetDataType_UNKNOWN BACnetDataType = 33 ) var BACnetDataTypeValues []BACnetDataType func init() { _ = errors.New - BACnetDataTypeValues = []BACnetDataType{ + BACnetDataTypeValues = []BACnetDataType { BACnetDataType_NULL, BACnetDataType_BOOLEAN, BACnetDataType_UNSIGNED_INTEGER, @@ -75,34 +75,34 @@ func init() { func BACnetDataTypeByValue(value uint8) (enum BACnetDataType, ok bool) { switch value { - case 0: - return BACnetDataType_NULL, true - case 1: - return BACnetDataType_BOOLEAN, true - case 10: - return BACnetDataType_DATE, true - case 11: - return BACnetDataType_TIME, true - case 12: - return BACnetDataType_BACNET_OBJECT_IDENTIFIER, true - case 2: - return BACnetDataType_UNSIGNED_INTEGER, true - case 3: - return BACnetDataType_SIGNED_INTEGER, true - case 33: - return BACnetDataType_UNKNOWN, true - case 4: - return BACnetDataType_REAL, true - case 5: - return BACnetDataType_DOUBLE, true - case 6: - return BACnetDataType_OCTET_STRING, true - case 7: - return BACnetDataType_CHARACTER_STRING, true - case 8: - return BACnetDataType_BIT_STRING, true - case 9: - return BACnetDataType_ENUMERATED, true + case 0: + return BACnetDataType_NULL, true + case 1: + return BACnetDataType_BOOLEAN, true + case 10: + return BACnetDataType_DATE, true + case 11: + return BACnetDataType_TIME, true + case 12: + return BACnetDataType_BACNET_OBJECT_IDENTIFIER, true + case 2: + return BACnetDataType_UNSIGNED_INTEGER, true + case 3: + return BACnetDataType_SIGNED_INTEGER, true + case 33: + return BACnetDataType_UNKNOWN, true + case 4: + return BACnetDataType_REAL, true + case 5: + return BACnetDataType_DOUBLE, true + case 6: + return BACnetDataType_OCTET_STRING, true + case 7: + return BACnetDataType_CHARACTER_STRING, true + case 8: + return BACnetDataType_BIT_STRING, true + case 9: + return BACnetDataType_ENUMERATED, true } return 0, false } @@ -141,13 +141,13 @@ func BACnetDataTypeByName(value string) (enum BACnetDataType, ok bool) { return 0, false } -func BACnetDataTypeKnows(value uint8) bool { +func BACnetDataTypeKnows(value uint8) bool { for _, typeValue := range BACnetDataTypeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetDataType(structType interface{}) BACnetDataType { @@ -235,3 +235,4 @@ func (e BACnetDataType) PLC4XEnumName() string { func (e BACnetDataType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetDateRange.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetDateRange.go index c0a9027f103..d33b814315b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetDateRange.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetDateRange.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetDateRange is the corresponding interface of BACnetDateRange type BACnetDateRange interface { @@ -46,10 +48,11 @@ type BACnetDateRangeExactly interface { // _BACnetDateRange is the data-structure of this message type _BACnetDateRange struct { - StartDate BACnetApplicationTagDate - EndDate BACnetApplicationTagDate + StartDate BACnetApplicationTagDate + EndDate BACnetApplicationTagDate } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -68,14 +71,15 @@ func (m *_BACnetDateRange) GetEndDate() BACnetApplicationTagDate { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetDateRange factory function for _BACnetDateRange -func NewBACnetDateRange(startDate BACnetApplicationTagDate, endDate BACnetApplicationTagDate) *_BACnetDateRange { - return &_BACnetDateRange{StartDate: startDate, EndDate: endDate} +func NewBACnetDateRange( startDate BACnetApplicationTagDate , endDate BACnetApplicationTagDate ) *_BACnetDateRange { +return &_BACnetDateRange{ StartDate: startDate , EndDate: endDate } } // Deprecated: use the interface for direct cast func CastBACnetDateRange(structType interface{}) BACnetDateRange { - if casted, ok := structType.(BACnetDateRange); ok { + if casted, ok := structType.(BACnetDateRange); ok { return casted } if casted, ok := structType.(*BACnetDateRange); ok { @@ -100,6 +104,7 @@ func (m *_BACnetDateRange) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetDateRange) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -121,7 +126,7 @@ func BACnetDateRangeParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu if pullErr := readBuffer.PullContext("startDate"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for startDate") } - _startDate, _startDateErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_startDate, _startDateErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _startDateErr != nil { return nil, errors.Wrap(_startDateErr, "Error parsing 'startDate' field of BACnetDateRange") } @@ -134,7 +139,7 @@ func BACnetDateRangeParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu if pullErr := readBuffer.PullContext("endDate"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for endDate") } - _endDate, _endDateErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_endDate, _endDateErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _endDateErr != nil { return nil, errors.Wrap(_endDateErr, "Error parsing 'endDate' field of BACnetDateRange") } @@ -149,9 +154,9 @@ func BACnetDateRangeParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu // Create the instance return &_BACnetDateRange{ - StartDate: startDate, - EndDate: endDate, - }, nil + StartDate: startDate, + EndDate: endDate, + }, nil } func (m *_BACnetDateRange) Serialize() ([]byte, error) { @@ -165,7 +170,7 @@ func (m *_BACnetDateRange) Serialize() ([]byte, error) { func (m *_BACnetDateRange) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetDateRange"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetDateRange"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetDateRange") } @@ -199,6 +204,7 @@ func (m *_BACnetDateRange) SerializeWithWriteBuffer(ctx context.Context, writeBu return nil } + func (m *_BACnetDateRange) isBACnetDateRange() bool { return true } @@ -213,3 +219,6 @@ func (m *_BACnetDateRange) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetDateRangeEnclosed.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetDateRangeEnclosed.go index 07a10449b8f..57428e66507 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetDateRangeEnclosed.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetDateRangeEnclosed.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetDateRangeEnclosed is the corresponding interface of BACnetDateRangeEnclosed type BACnetDateRangeEnclosed interface { @@ -48,14 +50,15 @@ type BACnetDateRangeEnclosedExactly interface { // _BACnetDateRangeEnclosed is the data-structure of this message type _BACnetDateRangeEnclosed struct { - OpeningTag BACnetOpeningTag - DateRange BACnetDateRange - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + DateRange BACnetDateRange + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -78,14 +81,15 @@ func (m *_BACnetDateRangeEnclosed) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetDateRangeEnclosed factory function for _BACnetDateRangeEnclosed -func NewBACnetDateRangeEnclosed(openingTag BACnetOpeningTag, dateRange BACnetDateRange, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetDateRangeEnclosed { - return &_BACnetDateRangeEnclosed{OpeningTag: openingTag, DateRange: dateRange, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetDateRangeEnclosed( openingTag BACnetOpeningTag , dateRange BACnetDateRange , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetDateRangeEnclosed { +return &_BACnetDateRangeEnclosed{ OpeningTag: openingTag , DateRange: dateRange , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetDateRangeEnclosed(structType interface{}) BACnetDateRangeEnclosed { - if casted, ok := structType.(BACnetDateRangeEnclosed); ok { + if casted, ok := structType.(BACnetDateRangeEnclosed); ok { return casted } if casted, ok := structType.(*BACnetDateRangeEnclosed); ok { @@ -113,6 +117,7 @@ func (m *_BACnetDateRangeEnclosed) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetDateRangeEnclosed) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -134,7 +139,7 @@ func BACnetDateRangeEnclosedParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetDateRangeEnclosed") } @@ -147,7 +152,7 @@ func BACnetDateRangeEnclosedParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("dateRange"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for dateRange") } - _dateRange, _dateRangeErr := BACnetDateRangeParseWithBuffer(ctx, readBuffer) +_dateRange, _dateRangeErr := BACnetDateRangeParseWithBuffer(ctx, readBuffer) if _dateRangeErr != nil { return nil, errors.Wrap(_dateRangeErr, "Error parsing 'dateRange' field of BACnetDateRangeEnclosed") } @@ -160,7 +165,7 @@ func BACnetDateRangeEnclosedParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetDateRangeEnclosed") } @@ -175,11 +180,11 @@ func BACnetDateRangeEnclosedParseWithBuffer(ctx context.Context, readBuffer util // Create the instance return &_BACnetDateRangeEnclosed{ - TagNumber: tagNumber, - OpeningTag: openingTag, - DateRange: dateRange, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + DateRange: dateRange, + ClosingTag: closingTag, + }, nil } func (m *_BACnetDateRangeEnclosed) Serialize() ([]byte, error) { @@ -193,7 +198,7 @@ func (m *_BACnetDateRangeEnclosed) Serialize() ([]byte, error) { func (m *_BACnetDateRangeEnclosed) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetDateRangeEnclosed"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetDateRangeEnclosed"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetDateRangeEnclosed") } @@ -239,13 +244,13 @@ func (m *_BACnetDateRangeEnclosed) SerializeWithWriteBuffer(ctx context.Context, return nil } + //// // Arguments Getter func (m *_BACnetDateRangeEnclosed) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -263,3 +268,6 @@ func (m *_BACnetDateRangeEnclosed) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetDateTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetDateTime.go index 646825f7594..29e1fd3115a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetDateTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetDateTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetDateTime is the corresponding interface of BACnetDateTime type BACnetDateTime interface { @@ -46,10 +48,11 @@ type BACnetDateTimeExactly interface { // _BACnetDateTime is the data-structure of this message type _BACnetDateTime struct { - DateValue BACnetApplicationTagDate - TimeValue BACnetApplicationTagTime + DateValue BACnetApplicationTagDate + TimeValue BACnetApplicationTagTime } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -68,14 +71,15 @@ func (m *_BACnetDateTime) GetTimeValue() BACnetApplicationTagTime { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetDateTime factory function for _BACnetDateTime -func NewBACnetDateTime(dateValue BACnetApplicationTagDate, timeValue BACnetApplicationTagTime) *_BACnetDateTime { - return &_BACnetDateTime{DateValue: dateValue, TimeValue: timeValue} +func NewBACnetDateTime( dateValue BACnetApplicationTagDate , timeValue BACnetApplicationTagTime ) *_BACnetDateTime { +return &_BACnetDateTime{ DateValue: dateValue , TimeValue: timeValue } } // Deprecated: use the interface for direct cast func CastBACnetDateTime(structType interface{}) BACnetDateTime { - if casted, ok := structType.(BACnetDateTime); ok { + if casted, ok := structType.(BACnetDateTime); ok { return casted } if casted, ok := structType.(*BACnetDateTime); ok { @@ -100,6 +104,7 @@ func (m *_BACnetDateTime) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetDateTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -121,7 +126,7 @@ func BACnetDateTimeParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf if pullErr := readBuffer.PullContext("dateValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for dateValue") } - _dateValue, _dateValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_dateValue, _dateValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _dateValueErr != nil { return nil, errors.Wrap(_dateValueErr, "Error parsing 'dateValue' field of BACnetDateTime") } @@ -134,7 +139,7 @@ func BACnetDateTimeParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf if pullErr := readBuffer.PullContext("timeValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeValue") } - _timeValue, _timeValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_timeValue, _timeValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _timeValueErr != nil { return nil, errors.Wrap(_timeValueErr, "Error parsing 'timeValue' field of BACnetDateTime") } @@ -149,9 +154,9 @@ func BACnetDateTimeParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf // Create the instance return &_BACnetDateTime{ - DateValue: dateValue, - TimeValue: timeValue, - }, nil + DateValue: dateValue, + TimeValue: timeValue, + }, nil } func (m *_BACnetDateTime) Serialize() ([]byte, error) { @@ -165,7 +170,7 @@ func (m *_BACnetDateTime) Serialize() ([]byte, error) { func (m *_BACnetDateTime) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetDateTime"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetDateTime"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetDateTime") } @@ -199,6 +204,7 @@ func (m *_BACnetDateTime) SerializeWithWriteBuffer(ctx context.Context, writeBuf return nil } + func (m *_BACnetDateTime) isBACnetDateTime() bool { return true } @@ -213,3 +219,6 @@ func (m *_BACnetDateTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetDateTimeEnclosed.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetDateTimeEnclosed.go index e154c49e283..6f72f6bf04b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetDateTimeEnclosed.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetDateTimeEnclosed.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetDateTimeEnclosed is the corresponding interface of BACnetDateTimeEnclosed type BACnetDateTimeEnclosed interface { @@ -48,14 +50,15 @@ type BACnetDateTimeEnclosedExactly interface { // _BACnetDateTimeEnclosed is the data-structure of this message type _BACnetDateTimeEnclosed struct { - OpeningTag BACnetOpeningTag - DateTimeValue BACnetDateTime - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + DateTimeValue BACnetDateTime + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -78,14 +81,15 @@ func (m *_BACnetDateTimeEnclosed) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetDateTimeEnclosed factory function for _BACnetDateTimeEnclosed -func NewBACnetDateTimeEnclosed(openingTag BACnetOpeningTag, dateTimeValue BACnetDateTime, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetDateTimeEnclosed { - return &_BACnetDateTimeEnclosed{OpeningTag: openingTag, DateTimeValue: dateTimeValue, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetDateTimeEnclosed( openingTag BACnetOpeningTag , dateTimeValue BACnetDateTime , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetDateTimeEnclosed { +return &_BACnetDateTimeEnclosed{ OpeningTag: openingTag , DateTimeValue: dateTimeValue , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetDateTimeEnclosed(structType interface{}) BACnetDateTimeEnclosed { - if casted, ok := structType.(BACnetDateTimeEnclosed); ok { + if casted, ok := structType.(BACnetDateTimeEnclosed); ok { return casted } if casted, ok := structType.(*BACnetDateTimeEnclosed); ok { @@ -113,6 +117,7 @@ func (m *_BACnetDateTimeEnclosed) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetDateTimeEnclosed) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -134,7 +139,7 @@ func BACnetDateTimeEnclosedParseWithBuffer(ctx context.Context, readBuffer utils if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetDateTimeEnclosed") } @@ -147,7 +152,7 @@ func BACnetDateTimeEnclosedParseWithBuffer(ctx context.Context, readBuffer utils if pullErr := readBuffer.PullContext("dateTimeValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for dateTimeValue") } - _dateTimeValue, _dateTimeValueErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) +_dateTimeValue, _dateTimeValueErr := BACnetDateTimeParseWithBuffer(ctx, readBuffer) if _dateTimeValueErr != nil { return nil, errors.Wrap(_dateTimeValueErr, "Error parsing 'dateTimeValue' field of BACnetDateTimeEnclosed") } @@ -160,7 +165,7 @@ func BACnetDateTimeEnclosedParseWithBuffer(ctx context.Context, readBuffer utils if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetDateTimeEnclosed") } @@ -175,11 +180,11 @@ func BACnetDateTimeEnclosedParseWithBuffer(ctx context.Context, readBuffer utils // Create the instance return &_BACnetDateTimeEnclosed{ - TagNumber: tagNumber, - OpeningTag: openingTag, - DateTimeValue: dateTimeValue, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + DateTimeValue: dateTimeValue, + ClosingTag: closingTag, + }, nil } func (m *_BACnetDateTimeEnclosed) Serialize() ([]byte, error) { @@ -193,7 +198,7 @@ func (m *_BACnetDateTimeEnclosed) Serialize() ([]byte, error) { func (m *_BACnetDateTimeEnclosed) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetDateTimeEnclosed"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetDateTimeEnclosed"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetDateTimeEnclosed") } @@ -239,13 +244,13 @@ func (m *_BACnetDateTimeEnclosed) SerializeWithWriteBuffer(ctx context.Context, return nil } + //// // Arguments Getter func (m *_BACnetDateTimeEnclosed) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -263,3 +268,6 @@ func (m *_BACnetDateTimeEnclosed) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetDaysOfWeek.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetDaysOfWeek.go index eb9a56e3de9..d56a5eb55ae 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetDaysOfWeek.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetDaysOfWeek.go @@ -34,21 +34,21 @@ type IBACnetDaysOfWeek interface { utils.Serializable } -const ( - BACnetDaysOfWeek_MONDAY BACnetDaysOfWeek = 0 - BACnetDaysOfWeek_TUESDAY BACnetDaysOfWeek = 1 +const( + BACnetDaysOfWeek_MONDAY BACnetDaysOfWeek = 0 + BACnetDaysOfWeek_TUESDAY BACnetDaysOfWeek = 1 BACnetDaysOfWeek_WEDNESDAY BACnetDaysOfWeek = 2 - BACnetDaysOfWeek_THURSDAY BACnetDaysOfWeek = 3 - BACnetDaysOfWeek_FRIDAY BACnetDaysOfWeek = 4 - BACnetDaysOfWeek_SATURDAY BACnetDaysOfWeek = 5 - BACnetDaysOfWeek_SUNDAY BACnetDaysOfWeek = 6 + BACnetDaysOfWeek_THURSDAY BACnetDaysOfWeek = 3 + BACnetDaysOfWeek_FRIDAY BACnetDaysOfWeek = 4 + BACnetDaysOfWeek_SATURDAY BACnetDaysOfWeek = 5 + BACnetDaysOfWeek_SUNDAY BACnetDaysOfWeek = 6 ) var BACnetDaysOfWeekValues []BACnetDaysOfWeek func init() { _ = errors.New - BACnetDaysOfWeekValues = []BACnetDaysOfWeek{ + BACnetDaysOfWeekValues = []BACnetDaysOfWeek { BACnetDaysOfWeek_MONDAY, BACnetDaysOfWeek_TUESDAY, BACnetDaysOfWeek_WEDNESDAY, @@ -61,20 +61,20 @@ func init() { func BACnetDaysOfWeekByValue(value uint8) (enum BACnetDaysOfWeek, ok bool) { switch value { - case 0: - return BACnetDaysOfWeek_MONDAY, true - case 1: - return BACnetDaysOfWeek_TUESDAY, true - case 2: - return BACnetDaysOfWeek_WEDNESDAY, true - case 3: - return BACnetDaysOfWeek_THURSDAY, true - case 4: - return BACnetDaysOfWeek_FRIDAY, true - case 5: - return BACnetDaysOfWeek_SATURDAY, true - case 6: - return BACnetDaysOfWeek_SUNDAY, true + case 0: + return BACnetDaysOfWeek_MONDAY, true + case 1: + return BACnetDaysOfWeek_TUESDAY, true + case 2: + return BACnetDaysOfWeek_WEDNESDAY, true + case 3: + return BACnetDaysOfWeek_THURSDAY, true + case 4: + return BACnetDaysOfWeek_FRIDAY, true + case 5: + return BACnetDaysOfWeek_SATURDAY, true + case 6: + return BACnetDaysOfWeek_SUNDAY, true } return 0, false } @@ -99,13 +99,13 @@ func BACnetDaysOfWeekByName(value string) (enum BACnetDaysOfWeek, ok bool) { return 0, false } -func BACnetDaysOfWeekKnows(value uint8) bool { +func BACnetDaysOfWeekKnows(value uint8) bool { for _, typeValue := range BACnetDaysOfWeekValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetDaysOfWeek(structType interface{}) BACnetDaysOfWeek { @@ -179,3 +179,4 @@ func (e BACnetDaysOfWeek) PLC4XEnumName() string { func (e BACnetDaysOfWeek) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetDaysOfWeekTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetDaysOfWeekTagged.go index d6079670a90..ba9eaf3a122 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetDaysOfWeekTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetDaysOfWeekTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetDaysOfWeekTagged is the corresponding interface of BACnetDaysOfWeekTagged type BACnetDaysOfWeekTagged interface { @@ -60,14 +62,15 @@ type BACnetDaysOfWeekTaggedExactly interface { // _BACnetDaysOfWeekTagged is the data-structure of this message type _BACnetDaysOfWeekTagged struct { - Header BACnetTagHeader - Payload BACnetTagPayloadBitString + Header BACnetTagHeader + Payload BACnetTagPayloadBitString // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -93,43 +96,43 @@ func (m *_BACnetDaysOfWeekTagged) GetPayload() BACnetTagPayloadBitString { func (m *_BACnetDaysOfWeekTagged) GetMonday() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (0))), func() interface{} { return bool(m.GetPayload().GetData()[0]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((0)))), func() interface{} {return bool(m.GetPayload().GetData()[0])}, func() interface{} {return bool(bool(false))}).(bool)) } func (m *_BACnetDaysOfWeekTagged) GetTuesday() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (1))), func() interface{} { return bool(m.GetPayload().GetData()[1]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((1)))), func() interface{} {return bool(m.GetPayload().GetData()[1])}, func() interface{} {return bool(bool(false))}).(bool)) } func (m *_BACnetDaysOfWeekTagged) GetWednesday() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (2))), func() interface{} { return bool(m.GetPayload().GetData()[2]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((2)))), func() interface{} {return bool(m.GetPayload().GetData()[2])}, func() interface{} {return bool(bool(false))}).(bool)) } func (m *_BACnetDaysOfWeekTagged) GetThursday() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (3))), func() interface{} { return bool(m.GetPayload().GetData()[3]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((3)))), func() interface{} {return bool(m.GetPayload().GetData()[3])}, func() interface{} {return bool(bool(false))}).(bool)) } func (m *_BACnetDaysOfWeekTagged) GetFriday() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (4))), func() interface{} { return bool(m.GetPayload().GetData()[4]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((4)))), func() interface{} {return bool(m.GetPayload().GetData()[4])}, func() interface{} {return bool(bool(false))}).(bool)) } func (m *_BACnetDaysOfWeekTagged) GetSaturday() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (5))), func() interface{} { return bool(m.GetPayload().GetData()[5]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((5)))), func() interface{} {return bool(m.GetPayload().GetData()[5])}, func() interface{} {return bool(bool(false))}).(bool)) } func (m *_BACnetDaysOfWeekTagged) GetSunday() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (6))), func() interface{} { return bool(m.GetPayload().GetData()[6]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((6)))), func() interface{} {return bool(m.GetPayload().GetData()[6])}, func() interface{} {return bool(bool(false))}).(bool)) } /////////////////////// @@ -137,14 +140,15 @@ func (m *_BACnetDaysOfWeekTagged) GetSunday() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetDaysOfWeekTagged factory function for _BACnetDaysOfWeekTagged -func NewBACnetDaysOfWeekTagged(header BACnetTagHeader, payload BACnetTagPayloadBitString, tagNumber uint8, tagClass TagClass) *_BACnetDaysOfWeekTagged { - return &_BACnetDaysOfWeekTagged{Header: header, Payload: payload, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetDaysOfWeekTagged( header BACnetTagHeader , payload BACnetTagPayloadBitString , tagNumber uint8 , tagClass TagClass ) *_BACnetDaysOfWeekTagged { +return &_BACnetDaysOfWeekTagged{ Header: header , Payload: payload , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetDaysOfWeekTagged(structType interface{}) BACnetDaysOfWeekTagged { - if casted, ok := structType.(BACnetDaysOfWeekTagged); ok { + if casted, ok := structType.(BACnetDaysOfWeekTagged); ok { return casted } if casted, ok := structType.(*BACnetDaysOfWeekTagged); ok { @@ -183,6 +187,7 @@ func (m *_BACnetDaysOfWeekTagged) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetDaysOfWeekTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -204,7 +209,7 @@ func BACnetDaysOfWeekTaggedParseWithBuffer(ctx context.Context, readBuffer utils if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetDaysOfWeekTagged") } @@ -214,12 +219,12 @@ func BACnetDaysOfWeekTaggedParseWithBuffer(ctx context.Context, readBuffer utils } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -227,7 +232,7 @@ func BACnetDaysOfWeekTaggedParseWithBuffer(ctx context.Context, readBuffer utils if pullErr := readBuffer.PullContext("payload"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for payload") } - _payload, _payloadErr := BACnetTagPayloadBitStringParseWithBuffer(ctx, readBuffer, uint32(header.GetActualLength())) +_payload, _payloadErr := BACnetTagPayloadBitStringParseWithBuffer(ctx, readBuffer , uint32( header.GetActualLength() ) ) if _payloadErr != nil { return nil, errors.Wrap(_payloadErr, "Error parsing 'payload' field of BACnetDaysOfWeekTagged") } @@ -237,37 +242,37 @@ func BACnetDaysOfWeekTaggedParseWithBuffer(ctx context.Context, readBuffer utils } // Virtual field - _monday := utils.InlineIf((bool((len(payload.GetData())) > (0))), func() interface{} { return bool(payload.GetData()[0]) }, func() interface{} { return bool(bool(false)) }).(bool) + _monday := utils.InlineIf((bool(((len(payload.GetData()))) > ((0)))), func() interface{} {return bool(payload.GetData()[0])}, func() interface{} {return bool(bool(false))}).(bool) monday := bool(_monday) _ = monday // Virtual field - _tuesday := utils.InlineIf((bool((len(payload.GetData())) > (1))), func() interface{} { return bool(payload.GetData()[1]) }, func() interface{} { return bool(bool(false)) }).(bool) + _tuesday := utils.InlineIf((bool(((len(payload.GetData()))) > ((1)))), func() interface{} {return bool(payload.GetData()[1])}, func() interface{} {return bool(bool(false))}).(bool) tuesday := bool(_tuesday) _ = tuesday // Virtual field - _wednesday := utils.InlineIf((bool((len(payload.GetData())) > (2))), func() interface{} { return bool(payload.GetData()[2]) }, func() interface{} { return bool(bool(false)) }).(bool) + _wednesday := utils.InlineIf((bool(((len(payload.GetData()))) > ((2)))), func() interface{} {return bool(payload.GetData()[2])}, func() interface{} {return bool(bool(false))}).(bool) wednesday := bool(_wednesday) _ = wednesday // Virtual field - _thursday := utils.InlineIf((bool((len(payload.GetData())) > (3))), func() interface{} { return bool(payload.GetData()[3]) }, func() interface{} { return bool(bool(false)) }).(bool) + _thursday := utils.InlineIf((bool(((len(payload.GetData()))) > ((3)))), func() interface{} {return bool(payload.GetData()[3])}, func() interface{} {return bool(bool(false))}).(bool) thursday := bool(_thursday) _ = thursday // Virtual field - _friday := utils.InlineIf((bool((len(payload.GetData())) > (4))), func() interface{} { return bool(payload.GetData()[4]) }, func() interface{} { return bool(bool(false)) }).(bool) + _friday := utils.InlineIf((bool(((len(payload.GetData()))) > ((4)))), func() interface{} {return bool(payload.GetData()[4])}, func() interface{} {return bool(bool(false))}).(bool) friday := bool(_friday) _ = friday // Virtual field - _saturday := utils.InlineIf((bool((len(payload.GetData())) > (5))), func() interface{} { return bool(payload.GetData()[5]) }, func() interface{} { return bool(bool(false)) }).(bool) + _saturday := utils.InlineIf((bool(((len(payload.GetData()))) > ((5)))), func() interface{} {return bool(payload.GetData()[5])}, func() interface{} {return bool(bool(false))}).(bool) saturday := bool(_saturday) _ = saturday // Virtual field - _sunday := utils.InlineIf((bool((len(payload.GetData())) > (6))), func() interface{} { return bool(payload.GetData()[6]) }, func() interface{} { return bool(bool(false)) }).(bool) + _sunday := utils.InlineIf((bool(((len(payload.GetData()))) > ((6)))), func() interface{} {return bool(payload.GetData()[6])}, func() interface{} {return bool(bool(false))}).(bool) sunday := bool(_sunday) _ = sunday @@ -277,11 +282,11 @@ func BACnetDaysOfWeekTaggedParseWithBuffer(ctx context.Context, readBuffer utils // Create the instance return &_BACnetDaysOfWeekTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Payload: payload, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Payload: payload, + }, nil } func (m *_BACnetDaysOfWeekTagged) Serialize() ([]byte, error) { @@ -295,7 +300,7 @@ func (m *_BACnetDaysOfWeekTagged) Serialize() ([]byte, error) { func (m *_BACnetDaysOfWeekTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetDaysOfWeekTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetDaysOfWeekTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetDaysOfWeekTagged") } @@ -357,6 +362,7 @@ func (m *_BACnetDaysOfWeekTagged) SerializeWithWriteBuffer(ctx context.Context, return nil } + //// // Arguments Getter @@ -366,7 +372,6 @@ func (m *_BACnetDaysOfWeekTagged) GetTagNumber() uint8 { func (m *_BACnetDaysOfWeekTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -384,3 +389,6 @@ func (m *_BACnetDaysOfWeekTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetDestination.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetDestination.go index 2c4ead4cbce..48697281abb 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetDestination.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetDestination.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetDestination is the corresponding interface of BACnetDestination type BACnetDestination interface { @@ -56,15 +58,16 @@ type BACnetDestinationExactly interface { // _BACnetDestination is the data-structure of this message type _BACnetDestination struct { - ValidDays BACnetDaysOfWeekTagged - FromTime BACnetApplicationTagTime - ToTime BACnetApplicationTagTime - Recipient BACnetRecipient - ProcessIdentifier BACnetApplicationTagUnsignedInteger - IssueConfirmedNotifications BACnetApplicationTagBoolean - Transitions BACnetEventTransitionBitsTagged + ValidDays BACnetDaysOfWeekTagged + FromTime BACnetApplicationTagTime + ToTime BACnetApplicationTagTime + Recipient BACnetRecipient + ProcessIdentifier BACnetApplicationTagUnsignedInteger + IssueConfirmedNotifications BACnetApplicationTagBoolean + Transitions BACnetEventTransitionBitsTagged } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -103,14 +106,15 @@ func (m *_BACnetDestination) GetTransitions() BACnetEventTransitionBitsTagged { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetDestination factory function for _BACnetDestination -func NewBACnetDestination(validDays BACnetDaysOfWeekTagged, fromTime BACnetApplicationTagTime, toTime BACnetApplicationTagTime, recipient BACnetRecipient, processIdentifier BACnetApplicationTagUnsignedInteger, issueConfirmedNotifications BACnetApplicationTagBoolean, transitions BACnetEventTransitionBitsTagged) *_BACnetDestination { - return &_BACnetDestination{ValidDays: validDays, FromTime: fromTime, ToTime: toTime, Recipient: recipient, ProcessIdentifier: processIdentifier, IssueConfirmedNotifications: issueConfirmedNotifications, Transitions: transitions} +func NewBACnetDestination( validDays BACnetDaysOfWeekTagged , fromTime BACnetApplicationTagTime , toTime BACnetApplicationTagTime , recipient BACnetRecipient , processIdentifier BACnetApplicationTagUnsignedInteger , issueConfirmedNotifications BACnetApplicationTagBoolean , transitions BACnetEventTransitionBitsTagged ) *_BACnetDestination { +return &_BACnetDestination{ ValidDays: validDays , FromTime: fromTime , ToTime: toTime , Recipient: recipient , ProcessIdentifier: processIdentifier , IssueConfirmedNotifications: issueConfirmedNotifications , Transitions: transitions } } // Deprecated: use the interface for direct cast func CastBACnetDestination(structType interface{}) BACnetDestination { - if casted, ok := structType.(BACnetDestination); ok { + if casted, ok := structType.(BACnetDestination); ok { return casted } if casted, ok := structType.(*BACnetDestination); ok { @@ -150,6 +154,7 @@ func (m *_BACnetDestination) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetDestination) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -171,7 +176,7 @@ func BACnetDestinationParseWithBuffer(ctx context.Context, readBuffer utils.Read if pullErr := readBuffer.PullContext("validDays"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for validDays") } - _validDays, _validDaysErr := BACnetDaysOfWeekTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_validDays, _validDaysErr := BACnetDaysOfWeekTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _validDaysErr != nil { return nil, errors.Wrap(_validDaysErr, "Error parsing 'validDays' field of BACnetDestination") } @@ -184,7 +189,7 @@ func BACnetDestinationParseWithBuffer(ctx context.Context, readBuffer utils.Read if pullErr := readBuffer.PullContext("fromTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for fromTime") } - _fromTime, _fromTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_fromTime, _fromTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _fromTimeErr != nil { return nil, errors.Wrap(_fromTimeErr, "Error parsing 'fromTime' field of BACnetDestination") } @@ -197,7 +202,7 @@ func BACnetDestinationParseWithBuffer(ctx context.Context, readBuffer utils.Read if pullErr := readBuffer.PullContext("toTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for toTime") } - _toTime, _toTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_toTime, _toTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _toTimeErr != nil { return nil, errors.Wrap(_toTimeErr, "Error parsing 'toTime' field of BACnetDestination") } @@ -210,7 +215,7 @@ func BACnetDestinationParseWithBuffer(ctx context.Context, readBuffer utils.Read if pullErr := readBuffer.PullContext("recipient"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for recipient") } - _recipient, _recipientErr := BACnetRecipientParseWithBuffer(ctx, readBuffer) +_recipient, _recipientErr := BACnetRecipientParseWithBuffer(ctx, readBuffer) if _recipientErr != nil { return nil, errors.Wrap(_recipientErr, "Error parsing 'recipient' field of BACnetDestination") } @@ -223,7 +228,7 @@ func BACnetDestinationParseWithBuffer(ctx context.Context, readBuffer utils.Read if pullErr := readBuffer.PullContext("processIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for processIdentifier") } - _processIdentifier, _processIdentifierErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_processIdentifier, _processIdentifierErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _processIdentifierErr != nil { return nil, errors.Wrap(_processIdentifierErr, "Error parsing 'processIdentifier' field of BACnetDestination") } @@ -236,7 +241,7 @@ func BACnetDestinationParseWithBuffer(ctx context.Context, readBuffer utils.Read if pullErr := readBuffer.PullContext("issueConfirmedNotifications"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for issueConfirmedNotifications") } - _issueConfirmedNotifications, _issueConfirmedNotificationsErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_issueConfirmedNotifications, _issueConfirmedNotificationsErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _issueConfirmedNotificationsErr != nil { return nil, errors.Wrap(_issueConfirmedNotificationsErr, "Error parsing 'issueConfirmedNotifications' field of BACnetDestination") } @@ -249,7 +254,7 @@ func BACnetDestinationParseWithBuffer(ctx context.Context, readBuffer utils.Read if pullErr := readBuffer.PullContext("transitions"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for transitions") } - _transitions, _transitionsErr := BACnetEventTransitionBitsTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_transitions, _transitionsErr := BACnetEventTransitionBitsTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _transitionsErr != nil { return nil, errors.Wrap(_transitionsErr, "Error parsing 'transitions' field of BACnetDestination") } @@ -264,14 +269,14 @@ func BACnetDestinationParseWithBuffer(ctx context.Context, readBuffer utils.Read // Create the instance return &_BACnetDestination{ - ValidDays: validDays, - FromTime: fromTime, - ToTime: toTime, - Recipient: recipient, - ProcessIdentifier: processIdentifier, - IssueConfirmedNotifications: issueConfirmedNotifications, - Transitions: transitions, - }, nil + ValidDays: validDays, + FromTime: fromTime, + ToTime: toTime, + Recipient: recipient, + ProcessIdentifier: processIdentifier, + IssueConfirmedNotifications: issueConfirmedNotifications, + Transitions: transitions, + }, nil } func (m *_BACnetDestination) Serialize() ([]byte, error) { @@ -285,7 +290,7 @@ func (m *_BACnetDestination) Serialize() ([]byte, error) { func (m *_BACnetDestination) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetDestination"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetDestination"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetDestination") } @@ -379,6 +384,7 @@ func (m *_BACnetDestination) SerializeWithWriteBuffer(ctx context.Context, write return nil } + func (m *_BACnetDestination) isBACnetDestination() bool { return true } @@ -393,3 +399,6 @@ func (m *_BACnetDestination) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetDeviceObjectPropertyReference.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetDeviceObjectPropertyReference.go index 3949294a198..e916004ace0 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetDeviceObjectPropertyReference.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetDeviceObjectPropertyReference.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetDeviceObjectPropertyReference is the corresponding interface of BACnetDeviceObjectPropertyReference type BACnetDeviceObjectPropertyReference interface { @@ -51,12 +53,13 @@ type BACnetDeviceObjectPropertyReferenceExactly interface { // _BACnetDeviceObjectPropertyReference is the data-structure of this message type _BACnetDeviceObjectPropertyReference struct { - ObjectIdentifier BACnetContextTagObjectIdentifier - PropertyIdentifier BACnetPropertyIdentifierTagged - ArrayIndex BACnetContextTagUnsignedInteger - DeviceIdentifier BACnetContextTagObjectIdentifier + ObjectIdentifier BACnetContextTagObjectIdentifier + PropertyIdentifier BACnetPropertyIdentifierTagged + ArrayIndex BACnetContextTagUnsignedInteger + DeviceIdentifier BACnetContextTagObjectIdentifier } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,14 +86,15 @@ func (m *_BACnetDeviceObjectPropertyReference) GetDeviceIdentifier() BACnetConte /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetDeviceObjectPropertyReference factory function for _BACnetDeviceObjectPropertyReference -func NewBACnetDeviceObjectPropertyReference(objectIdentifier BACnetContextTagObjectIdentifier, propertyIdentifier BACnetPropertyIdentifierTagged, arrayIndex BACnetContextTagUnsignedInteger, deviceIdentifier BACnetContextTagObjectIdentifier) *_BACnetDeviceObjectPropertyReference { - return &_BACnetDeviceObjectPropertyReference{ObjectIdentifier: objectIdentifier, PropertyIdentifier: propertyIdentifier, ArrayIndex: arrayIndex, DeviceIdentifier: deviceIdentifier} +func NewBACnetDeviceObjectPropertyReference( objectIdentifier BACnetContextTagObjectIdentifier , propertyIdentifier BACnetPropertyIdentifierTagged , arrayIndex BACnetContextTagUnsignedInteger , deviceIdentifier BACnetContextTagObjectIdentifier ) *_BACnetDeviceObjectPropertyReference { +return &_BACnetDeviceObjectPropertyReference{ ObjectIdentifier: objectIdentifier , PropertyIdentifier: propertyIdentifier , ArrayIndex: arrayIndex , DeviceIdentifier: deviceIdentifier } } // Deprecated: use the interface for direct cast func CastBACnetDeviceObjectPropertyReference(structType interface{}) BACnetDeviceObjectPropertyReference { - if casted, ok := structType.(BACnetDeviceObjectPropertyReference); ok { + if casted, ok := structType.(BACnetDeviceObjectPropertyReference); ok { return casted } if casted, ok := structType.(*BACnetDeviceObjectPropertyReference); ok { @@ -125,6 +129,7 @@ func (m *_BACnetDeviceObjectPropertyReference) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetDeviceObjectPropertyReference) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -146,7 +151,7 @@ func BACnetDeviceObjectPropertyReferenceParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("objectIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for objectIdentifier") } - _objectIdentifier, _objectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER)) +_objectIdentifier, _objectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_BACNET_OBJECT_IDENTIFIER ) ) if _objectIdentifierErr != nil { return nil, errors.Wrap(_objectIdentifierErr, "Error parsing 'objectIdentifier' field of BACnetDeviceObjectPropertyReference") } @@ -159,7 +164,7 @@ func BACnetDeviceObjectPropertyReferenceParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("propertyIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for propertyIdentifier") } - _propertyIdentifier, _propertyIdentifierErr := BACnetPropertyIdentifierTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_propertyIdentifier, _propertyIdentifierErr := BACnetPropertyIdentifierTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _propertyIdentifierErr != nil { return nil, errors.Wrap(_propertyIdentifierErr, "Error parsing 'propertyIdentifier' field of BACnetDeviceObjectPropertyReference") } @@ -170,12 +175,12 @@ func BACnetDeviceObjectPropertyReferenceParseWithBuffer(ctx context.Context, rea // Optional Field (arrayIndex) (Can be skipped, if a given expression evaluates to false) var arrayIndex BACnetContextTagUnsignedInteger = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("arrayIndex"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for arrayIndex") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(2), BACnetDataType_UNSIGNED_INTEGER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(2) , BACnetDataType_UNSIGNED_INTEGER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -192,12 +197,12 @@ func BACnetDeviceObjectPropertyReferenceParseWithBuffer(ctx context.Context, rea // Optional Field (deviceIdentifier) (Can be skipped, if a given expression evaluates to false) var deviceIdentifier BACnetContextTagObjectIdentifier = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("deviceIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for deviceIdentifier") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(3), BACnetDataType_BACNET_OBJECT_IDENTIFIER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(3) , BACnetDataType_BACNET_OBJECT_IDENTIFIER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -218,11 +223,11 @@ func BACnetDeviceObjectPropertyReferenceParseWithBuffer(ctx context.Context, rea // Create the instance return &_BACnetDeviceObjectPropertyReference{ - ObjectIdentifier: objectIdentifier, - PropertyIdentifier: propertyIdentifier, - ArrayIndex: arrayIndex, - DeviceIdentifier: deviceIdentifier, - }, nil + ObjectIdentifier: objectIdentifier, + PropertyIdentifier: propertyIdentifier, + ArrayIndex: arrayIndex, + DeviceIdentifier: deviceIdentifier, + }, nil } func (m *_BACnetDeviceObjectPropertyReference) Serialize() ([]byte, error) { @@ -236,7 +241,7 @@ func (m *_BACnetDeviceObjectPropertyReference) Serialize() ([]byte, error) { func (m *_BACnetDeviceObjectPropertyReference) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetDeviceObjectPropertyReference"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetDeviceObjectPropertyReference"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetDeviceObjectPropertyReference") } @@ -302,6 +307,7 @@ func (m *_BACnetDeviceObjectPropertyReference) SerializeWithWriteBuffer(ctx cont return nil } + func (m *_BACnetDeviceObjectPropertyReference) isBACnetDeviceObjectPropertyReference() bool { return true } @@ -316,3 +322,6 @@ func (m *_BACnetDeviceObjectPropertyReference) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetDeviceObjectPropertyReferenceEnclosed.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetDeviceObjectPropertyReferenceEnclosed.go index c0cf6950a57..d664ed7f655 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetDeviceObjectPropertyReferenceEnclosed.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetDeviceObjectPropertyReferenceEnclosed.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetDeviceObjectPropertyReferenceEnclosed is the corresponding interface of BACnetDeviceObjectPropertyReferenceEnclosed type BACnetDeviceObjectPropertyReferenceEnclosed interface { @@ -48,14 +50,15 @@ type BACnetDeviceObjectPropertyReferenceEnclosedExactly interface { // _BACnetDeviceObjectPropertyReferenceEnclosed is the data-structure of this message type _BACnetDeviceObjectPropertyReferenceEnclosed struct { - OpeningTag BACnetOpeningTag - Value BACnetDeviceObjectPropertyReference - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + Value BACnetDeviceObjectPropertyReference + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -78,14 +81,15 @@ func (m *_BACnetDeviceObjectPropertyReferenceEnclosed) GetClosingTag() BACnetClo /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetDeviceObjectPropertyReferenceEnclosed factory function for _BACnetDeviceObjectPropertyReferenceEnclosed -func NewBACnetDeviceObjectPropertyReferenceEnclosed(openingTag BACnetOpeningTag, value BACnetDeviceObjectPropertyReference, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetDeviceObjectPropertyReferenceEnclosed { - return &_BACnetDeviceObjectPropertyReferenceEnclosed{OpeningTag: openingTag, Value: value, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetDeviceObjectPropertyReferenceEnclosed( openingTag BACnetOpeningTag , value BACnetDeviceObjectPropertyReference , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetDeviceObjectPropertyReferenceEnclosed { +return &_BACnetDeviceObjectPropertyReferenceEnclosed{ OpeningTag: openingTag , Value: value , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetDeviceObjectPropertyReferenceEnclosed(structType interface{}) BACnetDeviceObjectPropertyReferenceEnclosed { - if casted, ok := structType.(BACnetDeviceObjectPropertyReferenceEnclosed); ok { + if casted, ok := structType.(BACnetDeviceObjectPropertyReferenceEnclosed); ok { return casted } if casted, ok := structType.(*BACnetDeviceObjectPropertyReferenceEnclosed); ok { @@ -113,6 +117,7 @@ func (m *_BACnetDeviceObjectPropertyReferenceEnclosed) GetLengthInBits(ctx conte return lengthInBits } + func (m *_BACnetDeviceObjectPropertyReferenceEnclosed) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -134,7 +139,7 @@ func BACnetDeviceObjectPropertyReferenceEnclosedParseWithBuffer(ctx context.Cont if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetDeviceObjectPropertyReferenceEnclosed") } @@ -147,7 +152,7 @@ func BACnetDeviceObjectPropertyReferenceEnclosedParseWithBuffer(ctx context.Cont if pullErr := readBuffer.PullContext("value"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for value") } - _value, _valueErr := BACnetDeviceObjectPropertyReferenceParseWithBuffer(ctx, readBuffer) +_value, _valueErr := BACnetDeviceObjectPropertyReferenceParseWithBuffer(ctx, readBuffer) if _valueErr != nil { return nil, errors.Wrap(_valueErr, "Error parsing 'value' field of BACnetDeviceObjectPropertyReferenceEnclosed") } @@ -160,7 +165,7 @@ func BACnetDeviceObjectPropertyReferenceEnclosedParseWithBuffer(ctx context.Cont if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetDeviceObjectPropertyReferenceEnclosed") } @@ -175,11 +180,11 @@ func BACnetDeviceObjectPropertyReferenceEnclosedParseWithBuffer(ctx context.Cont // Create the instance return &_BACnetDeviceObjectPropertyReferenceEnclosed{ - TagNumber: tagNumber, - OpeningTag: openingTag, - Value: value, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + Value: value, + ClosingTag: closingTag, + }, nil } func (m *_BACnetDeviceObjectPropertyReferenceEnclosed) Serialize() ([]byte, error) { @@ -193,7 +198,7 @@ func (m *_BACnetDeviceObjectPropertyReferenceEnclosed) Serialize() ([]byte, erro func (m *_BACnetDeviceObjectPropertyReferenceEnclosed) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetDeviceObjectPropertyReferenceEnclosed"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetDeviceObjectPropertyReferenceEnclosed"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetDeviceObjectPropertyReferenceEnclosed") } @@ -239,13 +244,13 @@ func (m *_BACnetDeviceObjectPropertyReferenceEnclosed) SerializeWithWriteBuffer( return nil } + //// // Arguments Getter func (m *_BACnetDeviceObjectPropertyReferenceEnclosed) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -263,3 +268,6 @@ func (m *_BACnetDeviceObjectPropertyReferenceEnclosed) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetDeviceObjectReference.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetDeviceObjectReference.go index 5b20ba2db06..1ed6209c910 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetDeviceObjectReference.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetDeviceObjectReference.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetDeviceObjectReference is the corresponding interface of BACnetDeviceObjectReference type BACnetDeviceObjectReference interface { @@ -47,10 +49,11 @@ type BACnetDeviceObjectReferenceExactly interface { // _BACnetDeviceObjectReference is the data-structure of this message type _BACnetDeviceObjectReference struct { - DeviceIdentifier BACnetContextTagObjectIdentifier - ObjectIdentifier BACnetContextTagObjectIdentifier + DeviceIdentifier BACnetContextTagObjectIdentifier + ObjectIdentifier BACnetContextTagObjectIdentifier } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -69,14 +72,15 @@ func (m *_BACnetDeviceObjectReference) GetObjectIdentifier() BACnetContextTagObj /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetDeviceObjectReference factory function for _BACnetDeviceObjectReference -func NewBACnetDeviceObjectReference(deviceIdentifier BACnetContextTagObjectIdentifier, objectIdentifier BACnetContextTagObjectIdentifier) *_BACnetDeviceObjectReference { - return &_BACnetDeviceObjectReference{DeviceIdentifier: deviceIdentifier, ObjectIdentifier: objectIdentifier} +func NewBACnetDeviceObjectReference( deviceIdentifier BACnetContextTagObjectIdentifier , objectIdentifier BACnetContextTagObjectIdentifier ) *_BACnetDeviceObjectReference { +return &_BACnetDeviceObjectReference{ DeviceIdentifier: deviceIdentifier , ObjectIdentifier: objectIdentifier } } // Deprecated: use the interface for direct cast func CastBACnetDeviceObjectReference(structType interface{}) BACnetDeviceObjectReference { - if casted, ok := structType.(BACnetDeviceObjectReference); ok { + if casted, ok := structType.(BACnetDeviceObjectReference); ok { return casted } if casted, ok := structType.(*BACnetDeviceObjectReference); ok { @@ -103,6 +107,7 @@ func (m *_BACnetDeviceObjectReference) GetLengthInBits(ctx context.Context) uint return lengthInBits } + func (m *_BACnetDeviceObjectReference) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,12 +127,12 @@ func BACnetDeviceObjectReferenceParseWithBuffer(ctx context.Context, readBuffer // Optional Field (deviceIdentifier) (Can be skipped, if a given expression evaluates to false) var deviceIdentifier BACnetContextTagObjectIdentifier = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("deviceIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for deviceIdentifier") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(0), BACnetDataType_BACNET_OBJECT_IDENTIFIER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(0) , BACnetDataType_BACNET_OBJECT_IDENTIFIER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -146,7 +151,7 @@ func BACnetDeviceObjectReferenceParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("objectIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for objectIdentifier") } - _objectIdentifier, _objectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER)) +_objectIdentifier, _objectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_BACNET_OBJECT_IDENTIFIER ) ) if _objectIdentifierErr != nil { return nil, errors.Wrap(_objectIdentifierErr, "Error parsing 'objectIdentifier' field of BACnetDeviceObjectReference") } @@ -161,9 +166,9 @@ func BACnetDeviceObjectReferenceParseWithBuffer(ctx context.Context, readBuffer // Create the instance return &_BACnetDeviceObjectReference{ - DeviceIdentifier: deviceIdentifier, - ObjectIdentifier: objectIdentifier, - }, nil + DeviceIdentifier: deviceIdentifier, + ObjectIdentifier: objectIdentifier, + }, nil } func (m *_BACnetDeviceObjectReference) Serialize() ([]byte, error) { @@ -177,7 +182,7 @@ func (m *_BACnetDeviceObjectReference) Serialize() ([]byte, error) { func (m *_BACnetDeviceObjectReference) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetDeviceObjectReference"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetDeviceObjectReference"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetDeviceObjectReference") } @@ -215,6 +220,7 @@ func (m *_BACnetDeviceObjectReference) SerializeWithWriteBuffer(ctx context.Cont return nil } + func (m *_BACnetDeviceObjectReference) isBACnetDeviceObjectReference() bool { return true } @@ -229,3 +235,6 @@ func (m *_BACnetDeviceObjectReference) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetDeviceObjectReferenceEnclosed.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetDeviceObjectReferenceEnclosed.go index 4f7e30bcaee..246bc2733c7 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetDeviceObjectReferenceEnclosed.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetDeviceObjectReferenceEnclosed.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetDeviceObjectReferenceEnclosed is the corresponding interface of BACnetDeviceObjectReferenceEnclosed type BACnetDeviceObjectReferenceEnclosed interface { @@ -48,14 +50,15 @@ type BACnetDeviceObjectReferenceEnclosedExactly interface { // _BACnetDeviceObjectReferenceEnclosed is the data-structure of this message type _BACnetDeviceObjectReferenceEnclosed struct { - OpeningTag BACnetOpeningTag - ObjectReference BACnetDeviceObjectReference - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + ObjectReference BACnetDeviceObjectReference + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -78,14 +81,15 @@ func (m *_BACnetDeviceObjectReferenceEnclosed) GetClosingTag() BACnetClosingTag /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetDeviceObjectReferenceEnclosed factory function for _BACnetDeviceObjectReferenceEnclosed -func NewBACnetDeviceObjectReferenceEnclosed(openingTag BACnetOpeningTag, objectReference BACnetDeviceObjectReference, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetDeviceObjectReferenceEnclosed { - return &_BACnetDeviceObjectReferenceEnclosed{OpeningTag: openingTag, ObjectReference: objectReference, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetDeviceObjectReferenceEnclosed( openingTag BACnetOpeningTag , objectReference BACnetDeviceObjectReference , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetDeviceObjectReferenceEnclosed { +return &_BACnetDeviceObjectReferenceEnclosed{ OpeningTag: openingTag , ObjectReference: objectReference , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetDeviceObjectReferenceEnclosed(structType interface{}) BACnetDeviceObjectReferenceEnclosed { - if casted, ok := structType.(BACnetDeviceObjectReferenceEnclosed); ok { + if casted, ok := structType.(BACnetDeviceObjectReferenceEnclosed); ok { return casted } if casted, ok := structType.(*BACnetDeviceObjectReferenceEnclosed); ok { @@ -113,6 +117,7 @@ func (m *_BACnetDeviceObjectReferenceEnclosed) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetDeviceObjectReferenceEnclosed) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -134,7 +139,7 @@ func BACnetDeviceObjectReferenceEnclosedParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetDeviceObjectReferenceEnclosed") } @@ -147,7 +152,7 @@ func BACnetDeviceObjectReferenceEnclosedParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("objectReference"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for objectReference") } - _objectReference, _objectReferenceErr := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) +_objectReference, _objectReferenceErr := BACnetDeviceObjectReferenceParseWithBuffer(ctx, readBuffer) if _objectReferenceErr != nil { return nil, errors.Wrap(_objectReferenceErr, "Error parsing 'objectReference' field of BACnetDeviceObjectReferenceEnclosed") } @@ -160,7 +165,7 @@ func BACnetDeviceObjectReferenceEnclosedParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetDeviceObjectReferenceEnclosed") } @@ -175,11 +180,11 @@ func BACnetDeviceObjectReferenceEnclosedParseWithBuffer(ctx context.Context, rea // Create the instance return &_BACnetDeviceObjectReferenceEnclosed{ - TagNumber: tagNumber, - OpeningTag: openingTag, - ObjectReference: objectReference, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + ObjectReference: objectReference, + ClosingTag: closingTag, + }, nil } func (m *_BACnetDeviceObjectReferenceEnclosed) Serialize() ([]byte, error) { @@ -193,7 +198,7 @@ func (m *_BACnetDeviceObjectReferenceEnclosed) Serialize() ([]byte, error) { func (m *_BACnetDeviceObjectReferenceEnclosed) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetDeviceObjectReferenceEnclosed"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetDeviceObjectReferenceEnclosed"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetDeviceObjectReferenceEnclosed") } @@ -239,13 +244,13 @@ func (m *_BACnetDeviceObjectReferenceEnclosed) SerializeWithWriteBuffer(ctx cont return nil } + //// // Arguments Getter func (m *_BACnetDeviceObjectReferenceEnclosed) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -263,3 +268,6 @@ func (m *_BACnetDeviceObjectReferenceEnclosed) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetDeviceStatus.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetDeviceStatus.go index 76d91a20653..2361f28e3f6 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetDeviceStatus.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetDeviceStatus.go @@ -34,21 +34,21 @@ type IBACnetDeviceStatus interface { utils.Serializable } -const ( - BACnetDeviceStatus_OPERATIONAL BACnetDeviceStatus = 0 - BACnetDeviceStatus_OPERATIONAL_READ_ONLY BACnetDeviceStatus = 1 - BACnetDeviceStatus_DOWNLOAD_REQUIRED BACnetDeviceStatus = 2 - BACnetDeviceStatus_DOWNLOAD_IN_PROGRESS BACnetDeviceStatus = 3 - BACnetDeviceStatus_NON_OPERATIONAL BACnetDeviceStatus = 4 - BACnetDeviceStatus_BACKUP_IN_PROGRESS BACnetDeviceStatus = 5 - BACnetDeviceStatus_VENDOR_PROPRIETARY_VALUE BACnetDeviceStatus = 0xFFFF +const( + BACnetDeviceStatus_OPERATIONAL BACnetDeviceStatus = 0 + BACnetDeviceStatus_OPERATIONAL_READ_ONLY BACnetDeviceStatus = 1 + BACnetDeviceStatus_DOWNLOAD_REQUIRED BACnetDeviceStatus = 2 + BACnetDeviceStatus_DOWNLOAD_IN_PROGRESS BACnetDeviceStatus = 3 + BACnetDeviceStatus_NON_OPERATIONAL BACnetDeviceStatus = 4 + BACnetDeviceStatus_BACKUP_IN_PROGRESS BACnetDeviceStatus = 5 + BACnetDeviceStatus_VENDOR_PROPRIETARY_VALUE BACnetDeviceStatus = 0XFFFF ) var BACnetDeviceStatusValues []BACnetDeviceStatus func init() { _ = errors.New - BACnetDeviceStatusValues = []BACnetDeviceStatus{ + BACnetDeviceStatusValues = []BACnetDeviceStatus { BACnetDeviceStatus_OPERATIONAL, BACnetDeviceStatus_OPERATIONAL_READ_ONLY, BACnetDeviceStatus_DOWNLOAD_REQUIRED, @@ -61,20 +61,20 @@ func init() { func BACnetDeviceStatusByValue(value uint16) (enum BACnetDeviceStatus, ok bool) { switch value { - case 0: - return BACnetDeviceStatus_OPERATIONAL, true - case 0xFFFF: - return BACnetDeviceStatus_VENDOR_PROPRIETARY_VALUE, true - case 1: - return BACnetDeviceStatus_OPERATIONAL_READ_ONLY, true - case 2: - return BACnetDeviceStatus_DOWNLOAD_REQUIRED, true - case 3: - return BACnetDeviceStatus_DOWNLOAD_IN_PROGRESS, true - case 4: - return BACnetDeviceStatus_NON_OPERATIONAL, true - case 5: - return BACnetDeviceStatus_BACKUP_IN_PROGRESS, true + case 0: + return BACnetDeviceStatus_OPERATIONAL, true + case 0XFFFF: + return BACnetDeviceStatus_VENDOR_PROPRIETARY_VALUE, true + case 1: + return BACnetDeviceStatus_OPERATIONAL_READ_ONLY, true + case 2: + return BACnetDeviceStatus_DOWNLOAD_REQUIRED, true + case 3: + return BACnetDeviceStatus_DOWNLOAD_IN_PROGRESS, true + case 4: + return BACnetDeviceStatus_NON_OPERATIONAL, true + case 5: + return BACnetDeviceStatus_BACKUP_IN_PROGRESS, true } return 0, false } @@ -99,13 +99,13 @@ func BACnetDeviceStatusByName(value string) (enum BACnetDeviceStatus, ok bool) { return 0, false } -func BACnetDeviceStatusKnows(value uint16) bool { +func BACnetDeviceStatusKnows(value uint16) bool { for _, typeValue := range BACnetDeviceStatusValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastBACnetDeviceStatus(structType interface{}) BACnetDeviceStatus { @@ -179,3 +179,4 @@ func (e BACnetDeviceStatus) PLC4XEnumName() string { func (e BACnetDeviceStatus) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetDeviceStatusTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetDeviceStatusTagged.go index 81ae45d9a58..80fdf1c3762 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetDeviceStatusTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetDeviceStatusTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetDeviceStatusTagged is the corresponding interface of BACnetDeviceStatusTagged type BACnetDeviceStatusTagged interface { @@ -50,15 +52,16 @@ type BACnetDeviceStatusTaggedExactly interface { // _BACnetDeviceStatusTagged is the data-structure of this message type _BACnetDeviceStatusTagged struct { - Header BACnetTagHeader - Value BACnetDeviceStatus - ProprietaryValue uint32 + Header BACnetTagHeader + Value BACnetDeviceStatus + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_BACnetDeviceStatusTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetDeviceStatusTagged factory function for _BACnetDeviceStatusTagged -func NewBACnetDeviceStatusTagged(header BACnetTagHeader, value BACnetDeviceStatus, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_BACnetDeviceStatusTagged { - return &_BACnetDeviceStatusTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetDeviceStatusTagged( header BACnetTagHeader , value BACnetDeviceStatus , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_BACnetDeviceStatusTagged { +return &_BACnetDeviceStatusTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetDeviceStatusTagged(structType interface{}) BACnetDeviceStatusTagged { - if casted, ok := structType.(BACnetDeviceStatusTagged); ok { + if casted, ok := structType.(BACnetDeviceStatusTagged); ok { return casted } if casted, ok := structType.(*BACnetDeviceStatusTagged); ok { @@ -123,16 +127,17 @@ func (m *_BACnetDeviceStatusTagged) GetLengthInBits(ctx context.Context) uint16 lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetDeviceStatusTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetDeviceStatusTaggedParseWithBuffer(ctx context.Context, readBuffer uti if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetDeviceStatusTagged") } @@ -164,12 +169,12 @@ func BACnetDeviceStatusTaggedParseWithBuffer(ctx context.Context, readBuffer uti } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func BACnetDeviceStatusTaggedParseWithBuffer(ctx context.Context, readBuffer uti } var value BACnetDeviceStatus if _value != nil { - value = _value.(BACnetDeviceStatus) + value = _value.(BACnetDeviceStatus) } // Virtual field @@ -195,7 +200,7 @@ func BACnetDeviceStatusTaggedParseWithBuffer(ctx context.Context, readBuffer uti } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetDeviceStatusTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func BACnetDeviceStatusTaggedParseWithBuffer(ctx context.Context, readBuffer uti // Create the instance return &_BACnetDeviceStatusTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetDeviceStatusTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_BACnetDeviceStatusTagged) Serialize() ([]byte, error) { func (m *_BACnetDeviceStatusTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetDeviceStatusTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetDeviceStatusTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetDeviceStatusTagged") } @@ -261,6 +266,7 @@ func (m *_BACnetDeviceStatusTagged) SerializeWithWriteBuffer(ctx context.Context return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_BACnetDeviceStatusTagged) GetTagNumber() uint8 { func (m *_BACnetDeviceStatusTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_BACnetDeviceStatusTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetDoorAlarmState.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetDoorAlarmState.go index 479c20374e0..562c33c6435 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetDoorAlarmState.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetDoorAlarmState.go @@ -34,24 +34,24 @@ type IBACnetDoorAlarmState interface { utils.Serializable } -const ( - BACnetDoorAlarmState_NORMAL BACnetDoorAlarmState = 0 - BACnetDoorAlarmState_ALARM BACnetDoorAlarmState = 1 - BACnetDoorAlarmState_DOOR_OPEN_TOO_LONG BACnetDoorAlarmState = 2 - BACnetDoorAlarmState_FORCED_OPEN BACnetDoorAlarmState = 3 - BACnetDoorAlarmState_TAMPER BACnetDoorAlarmState = 4 - BACnetDoorAlarmState_DOOR_FAULT BACnetDoorAlarmState = 5 - BACnetDoorAlarmState_LOCK_DOWN BACnetDoorAlarmState = 6 - BACnetDoorAlarmState_FREE_ACCESS BACnetDoorAlarmState = 7 - BACnetDoorAlarmState_EGRESS_OPEN BACnetDoorAlarmState = 8 - BACnetDoorAlarmState_VENDOR_PROPRIETARY_VALUE BACnetDoorAlarmState = 0xFF +const( + BACnetDoorAlarmState_NORMAL BACnetDoorAlarmState = 0 + BACnetDoorAlarmState_ALARM BACnetDoorAlarmState = 1 + BACnetDoorAlarmState_DOOR_OPEN_TOO_LONG BACnetDoorAlarmState = 2 + BACnetDoorAlarmState_FORCED_OPEN BACnetDoorAlarmState = 3 + BACnetDoorAlarmState_TAMPER BACnetDoorAlarmState = 4 + BACnetDoorAlarmState_DOOR_FAULT BACnetDoorAlarmState = 5 + BACnetDoorAlarmState_LOCK_DOWN BACnetDoorAlarmState = 6 + BACnetDoorAlarmState_FREE_ACCESS BACnetDoorAlarmState = 7 + BACnetDoorAlarmState_EGRESS_OPEN BACnetDoorAlarmState = 8 + BACnetDoorAlarmState_VENDOR_PROPRIETARY_VALUE BACnetDoorAlarmState = 0XFF ) var BACnetDoorAlarmStateValues []BACnetDoorAlarmState func init() { _ = errors.New - BACnetDoorAlarmStateValues = []BACnetDoorAlarmState{ + BACnetDoorAlarmStateValues = []BACnetDoorAlarmState { BACnetDoorAlarmState_NORMAL, BACnetDoorAlarmState_ALARM, BACnetDoorAlarmState_DOOR_OPEN_TOO_LONG, @@ -67,26 +67,26 @@ func init() { func BACnetDoorAlarmStateByValue(value uint8) (enum BACnetDoorAlarmState, ok bool) { switch value { - case 0: - return BACnetDoorAlarmState_NORMAL, true - case 0xFF: - return BACnetDoorAlarmState_VENDOR_PROPRIETARY_VALUE, true - case 1: - return BACnetDoorAlarmState_ALARM, true - case 2: - return BACnetDoorAlarmState_DOOR_OPEN_TOO_LONG, true - case 3: - return BACnetDoorAlarmState_FORCED_OPEN, true - case 4: - return BACnetDoorAlarmState_TAMPER, true - case 5: - return BACnetDoorAlarmState_DOOR_FAULT, true - case 6: - return BACnetDoorAlarmState_LOCK_DOWN, true - case 7: - return BACnetDoorAlarmState_FREE_ACCESS, true - case 8: - return BACnetDoorAlarmState_EGRESS_OPEN, true + case 0: + return BACnetDoorAlarmState_NORMAL, true + case 0XFF: + return BACnetDoorAlarmState_VENDOR_PROPRIETARY_VALUE, true + case 1: + return BACnetDoorAlarmState_ALARM, true + case 2: + return BACnetDoorAlarmState_DOOR_OPEN_TOO_LONG, true + case 3: + return BACnetDoorAlarmState_FORCED_OPEN, true + case 4: + return BACnetDoorAlarmState_TAMPER, true + case 5: + return BACnetDoorAlarmState_DOOR_FAULT, true + case 6: + return BACnetDoorAlarmState_LOCK_DOWN, true + case 7: + return BACnetDoorAlarmState_FREE_ACCESS, true + case 8: + return BACnetDoorAlarmState_EGRESS_OPEN, true } return 0, false } @@ -117,13 +117,13 @@ func BACnetDoorAlarmStateByName(value string) (enum BACnetDoorAlarmState, ok boo return 0, false } -func BACnetDoorAlarmStateKnows(value uint8) bool { +func BACnetDoorAlarmStateKnows(value uint8) bool { for _, typeValue := range BACnetDoorAlarmStateValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetDoorAlarmState(structType interface{}) BACnetDoorAlarmState { @@ -203,3 +203,4 @@ func (e BACnetDoorAlarmState) PLC4XEnumName() string { func (e BACnetDoorAlarmState) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetDoorAlarmStateTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetDoorAlarmStateTagged.go index 21d875713bb..6953b1f2797 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetDoorAlarmStateTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetDoorAlarmStateTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetDoorAlarmStateTagged is the corresponding interface of BACnetDoorAlarmStateTagged type BACnetDoorAlarmStateTagged interface { @@ -50,15 +52,16 @@ type BACnetDoorAlarmStateTaggedExactly interface { // _BACnetDoorAlarmStateTagged is the data-structure of this message type _BACnetDoorAlarmStateTagged struct { - Header BACnetTagHeader - Value BACnetDoorAlarmState - ProprietaryValue uint32 + Header BACnetTagHeader + Value BACnetDoorAlarmState + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_BACnetDoorAlarmStateTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetDoorAlarmStateTagged factory function for _BACnetDoorAlarmStateTagged -func NewBACnetDoorAlarmStateTagged(header BACnetTagHeader, value BACnetDoorAlarmState, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_BACnetDoorAlarmStateTagged { - return &_BACnetDoorAlarmStateTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetDoorAlarmStateTagged( header BACnetTagHeader , value BACnetDoorAlarmState , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_BACnetDoorAlarmStateTagged { +return &_BACnetDoorAlarmStateTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetDoorAlarmStateTagged(structType interface{}) BACnetDoorAlarmStateTagged { - if casted, ok := structType.(BACnetDoorAlarmStateTagged); ok { + if casted, ok := structType.(BACnetDoorAlarmStateTagged); ok { return casted } if casted, ok := structType.(*BACnetDoorAlarmStateTagged); ok { @@ -123,16 +127,17 @@ func (m *_BACnetDoorAlarmStateTagged) GetLengthInBits(ctx context.Context) uint1 lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetDoorAlarmStateTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetDoorAlarmStateTaggedParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetDoorAlarmStateTagged") } @@ -164,12 +169,12 @@ func BACnetDoorAlarmStateTaggedParseWithBuffer(ctx context.Context, readBuffer u } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func BACnetDoorAlarmStateTaggedParseWithBuffer(ctx context.Context, readBuffer u } var value BACnetDoorAlarmState if _value != nil { - value = _value.(BACnetDoorAlarmState) + value = _value.(BACnetDoorAlarmState) } // Virtual field @@ -195,7 +200,7 @@ func BACnetDoorAlarmStateTaggedParseWithBuffer(ctx context.Context, readBuffer u } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetDoorAlarmStateTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func BACnetDoorAlarmStateTaggedParseWithBuffer(ctx context.Context, readBuffer u // Create the instance return &_BACnetDoorAlarmStateTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetDoorAlarmStateTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_BACnetDoorAlarmStateTagged) Serialize() ([]byte, error) { func (m *_BACnetDoorAlarmStateTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetDoorAlarmStateTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetDoorAlarmStateTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetDoorAlarmStateTagged") } @@ -261,6 +266,7 @@ func (m *_BACnetDoorAlarmStateTagged) SerializeWithWriteBuffer(ctx context.Conte return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_BACnetDoorAlarmStateTagged) GetTagNumber() uint8 { func (m *_BACnetDoorAlarmStateTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_BACnetDoorAlarmStateTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetDoorSecuredStatus.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetDoorSecuredStatus.go index a12e098cc19..b09dce94f7b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetDoorSecuredStatus.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetDoorSecuredStatus.go @@ -34,17 +34,17 @@ type IBACnetDoorSecuredStatus interface { utils.Serializable } -const ( - BACnetDoorSecuredStatus_SECURED BACnetDoorSecuredStatus = 0 +const( + BACnetDoorSecuredStatus_SECURED BACnetDoorSecuredStatus = 0 BACnetDoorSecuredStatus_UNSECURED BACnetDoorSecuredStatus = 1 - BACnetDoorSecuredStatus_UNKNOWN BACnetDoorSecuredStatus = 2 + BACnetDoorSecuredStatus_UNKNOWN BACnetDoorSecuredStatus = 2 ) var BACnetDoorSecuredStatusValues []BACnetDoorSecuredStatus func init() { _ = errors.New - BACnetDoorSecuredStatusValues = []BACnetDoorSecuredStatus{ + BACnetDoorSecuredStatusValues = []BACnetDoorSecuredStatus { BACnetDoorSecuredStatus_SECURED, BACnetDoorSecuredStatus_UNSECURED, BACnetDoorSecuredStatus_UNKNOWN, @@ -53,12 +53,12 @@ func init() { func BACnetDoorSecuredStatusByValue(value uint8) (enum BACnetDoorSecuredStatus, ok bool) { switch value { - case 0: - return BACnetDoorSecuredStatus_SECURED, true - case 1: - return BACnetDoorSecuredStatus_UNSECURED, true - case 2: - return BACnetDoorSecuredStatus_UNKNOWN, true + case 0: + return BACnetDoorSecuredStatus_SECURED, true + case 1: + return BACnetDoorSecuredStatus_UNSECURED, true + case 2: + return BACnetDoorSecuredStatus_UNKNOWN, true } return 0, false } @@ -75,13 +75,13 @@ func BACnetDoorSecuredStatusByName(value string) (enum BACnetDoorSecuredStatus, return 0, false } -func BACnetDoorSecuredStatusKnows(value uint8) bool { +func BACnetDoorSecuredStatusKnows(value uint8) bool { for _, typeValue := range BACnetDoorSecuredStatusValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetDoorSecuredStatus(structType interface{}) BACnetDoorSecuredStatus { @@ -147,3 +147,4 @@ func (e BACnetDoorSecuredStatus) PLC4XEnumName() string { func (e BACnetDoorSecuredStatus) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetDoorSecuredStatusTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetDoorSecuredStatusTagged.go index 482d9c4273d..b831e652c56 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetDoorSecuredStatusTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetDoorSecuredStatusTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetDoorSecuredStatusTagged is the corresponding interface of BACnetDoorSecuredStatusTagged type BACnetDoorSecuredStatusTagged interface { @@ -46,14 +48,15 @@ type BACnetDoorSecuredStatusTaggedExactly interface { // _BACnetDoorSecuredStatusTagged is the data-structure of this message type _BACnetDoorSecuredStatusTagged struct { - Header BACnetTagHeader - Value BACnetDoorSecuredStatus + Header BACnetTagHeader + Value BACnetDoorSecuredStatus // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_BACnetDoorSecuredStatusTagged) GetValue() BACnetDoorSecuredStatus { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetDoorSecuredStatusTagged factory function for _BACnetDoorSecuredStatusTagged -func NewBACnetDoorSecuredStatusTagged(header BACnetTagHeader, value BACnetDoorSecuredStatus, tagNumber uint8, tagClass TagClass) *_BACnetDoorSecuredStatusTagged { - return &_BACnetDoorSecuredStatusTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetDoorSecuredStatusTagged( header BACnetTagHeader , value BACnetDoorSecuredStatus , tagNumber uint8 , tagClass TagClass ) *_BACnetDoorSecuredStatusTagged { +return &_BACnetDoorSecuredStatusTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetDoorSecuredStatusTagged(structType interface{}) BACnetDoorSecuredStatusTagged { - if casted, ok := structType.(BACnetDoorSecuredStatusTagged); ok { + if casted, ok := structType.(BACnetDoorSecuredStatusTagged); ok { return casted } if casted, ok := structType.(*BACnetDoorSecuredStatusTagged); ok { @@ -104,6 +108,7 @@ func (m *_BACnetDoorSecuredStatusTagged) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetDoorSecuredStatusTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func BACnetDoorSecuredStatusTaggedParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetDoorSecuredStatusTagged") } @@ -135,12 +140,12 @@ func BACnetDoorSecuredStatusTaggedParseWithBuffer(ctx context.Context, readBuffe } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func BACnetDoorSecuredStatusTaggedParseWithBuffer(ctx context.Context, readBuffe } var value BACnetDoorSecuredStatus if _value != nil { - value = _value.(BACnetDoorSecuredStatus) + value = _value.(BACnetDoorSecuredStatus) } if closeErr := readBuffer.CloseContext("BACnetDoorSecuredStatusTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func BACnetDoorSecuredStatusTaggedParseWithBuffer(ctx context.Context, readBuffe // Create the instance return &_BACnetDoorSecuredStatusTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_BACnetDoorSecuredStatusTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_BACnetDoorSecuredStatusTagged) Serialize() ([]byte, error) { func (m *_BACnetDoorSecuredStatusTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetDoorSecuredStatusTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetDoorSecuredStatusTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetDoorSecuredStatusTagged") } @@ -206,6 +211,7 @@ func (m *_BACnetDoorSecuredStatusTagged) SerializeWithWriteBuffer(ctx context.Co return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_BACnetDoorSecuredStatusTagged) GetTagNumber() uint8 { func (m *_BACnetDoorSecuredStatusTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_BACnetDoorSecuredStatusTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetDoorStatus.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetDoorStatus.go index d2b4a31c684..34ee5d8278c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetDoorStatus.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetDoorStatus.go @@ -34,25 +34,25 @@ type IBACnetDoorStatus interface { utils.Serializable } -const ( - BACnetDoorStatus_CLOSED BACnetDoorStatus = 0 - BACnetDoorStatus_OPENED BACnetDoorStatus = 1 - BACnetDoorStatus_UNKNOWN BACnetDoorStatus = 2 - BACnetDoorStatus_DOOR_FAULT BACnetDoorStatus = 3 - BACnetDoorStatus_UNUSED BACnetDoorStatus = 4 - BACnetDoorStatus_NONE BACnetDoorStatus = 5 - BACnetDoorStatus_CLOSING BACnetDoorStatus = 6 - BACnetDoorStatus_OPENING BACnetDoorStatus = 7 - BACnetDoorStatus_SAFETY_LOCKED BACnetDoorStatus = 8 - BACnetDoorStatus_LIMITED_OPENED BACnetDoorStatus = 9 - BACnetDoorStatus_VENDOR_PROPRIETARY_VALUE BACnetDoorStatus = 0xFFFF +const( + BACnetDoorStatus_CLOSED BACnetDoorStatus = 0 + BACnetDoorStatus_OPENED BACnetDoorStatus = 1 + BACnetDoorStatus_UNKNOWN BACnetDoorStatus = 2 + BACnetDoorStatus_DOOR_FAULT BACnetDoorStatus = 3 + BACnetDoorStatus_UNUSED BACnetDoorStatus = 4 + BACnetDoorStatus_NONE BACnetDoorStatus = 5 + BACnetDoorStatus_CLOSING BACnetDoorStatus = 6 + BACnetDoorStatus_OPENING BACnetDoorStatus = 7 + BACnetDoorStatus_SAFETY_LOCKED BACnetDoorStatus = 8 + BACnetDoorStatus_LIMITED_OPENED BACnetDoorStatus = 9 + BACnetDoorStatus_VENDOR_PROPRIETARY_VALUE BACnetDoorStatus = 0XFFFF ) var BACnetDoorStatusValues []BACnetDoorStatus func init() { _ = errors.New - BACnetDoorStatusValues = []BACnetDoorStatus{ + BACnetDoorStatusValues = []BACnetDoorStatus { BACnetDoorStatus_CLOSED, BACnetDoorStatus_OPENED, BACnetDoorStatus_UNKNOWN, @@ -69,28 +69,28 @@ func init() { func BACnetDoorStatusByValue(value uint16) (enum BACnetDoorStatus, ok bool) { switch value { - case 0: - return BACnetDoorStatus_CLOSED, true - case 0xFFFF: - return BACnetDoorStatus_VENDOR_PROPRIETARY_VALUE, true - case 1: - return BACnetDoorStatus_OPENED, true - case 2: - return BACnetDoorStatus_UNKNOWN, true - case 3: - return BACnetDoorStatus_DOOR_FAULT, true - case 4: - return BACnetDoorStatus_UNUSED, true - case 5: - return BACnetDoorStatus_NONE, true - case 6: - return BACnetDoorStatus_CLOSING, true - case 7: - return BACnetDoorStatus_OPENING, true - case 8: - return BACnetDoorStatus_SAFETY_LOCKED, true - case 9: - return BACnetDoorStatus_LIMITED_OPENED, true + case 0: + return BACnetDoorStatus_CLOSED, true + case 0XFFFF: + return BACnetDoorStatus_VENDOR_PROPRIETARY_VALUE, true + case 1: + return BACnetDoorStatus_OPENED, true + case 2: + return BACnetDoorStatus_UNKNOWN, true + case 3: + return BACnetDoorStatus_DOOR_FAULT, true + case 4: + return BACnetDoorStatus_UNUSED, true + case 5: + return BACnetDoorStatus_NONE, true + case 6: + return BACnetDoorStatus_CLOSING, true + case 7: + return BACnetDoorStatus_OPENING, true + case 8: + return BACnetDoorStatus_SAFETY_LOCKED, true + case 9: + return BACnetDoorStatus_LIMITED_OPENED, true } return 0, false } @@ -123,13 +123,13 @@ func BACnetDoorStatusByName(value string) (enum BACnetDoorStatus, ok bool) { return 0, false } -func BACnetDoorStatusKnows(value uint16) bool { +func BACnetDoorStatusKnows(value uint16) bool { for _, typeValue := range BACnetDoorStatusValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastBACnetDoorStatus(structType interface{}) BACnetDoorStatus { @@ -211,3 +211,4 @@ func (e BACnetDoorStatus) PLC4XEnumName() string { func (e BACnetDoorStatus) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetDoorStatusTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetDoorStatusTagged.go index 6b42a2d0905..368ea60c7fa 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetDoorStatusTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetDoorStatusTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetDoorStatusTagged is the corresponding interface of BACnetDoorStatusTagged type BACnetDoorStatusTagged interface { @@ -50,15 +52,16 @@ type BACnetDoorStatusTaggedExactly interface { // _BACnetDoorStatusTagged is the data-structure of this message type _BACnetDoorStatusTagged struct { - Header BACnetTagHeader - Value BACnetDoorStatus - ProprietaryValue uint32 + Header BACnetTagHeader + Value BACnetDoorStatus + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_BACnetDoorStatusTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetDoorStatusTagged factory function for _BACnetDoorStatusTagged -func NewBACnetDoorStatusTagged(header BACnetTagHeader, value BACnetDoorStatus, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_BACnetDoorStatusTagged { - return &_BACnetDoorStatusTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetDoorStatusTagged( header BACnetTagHeader , value BACnetDoorStatus , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_BACnetDoorStatusTagged { +return &_BACnetDoorStatusTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetDoorStatusTagged(structType interface{}) BACnetDoorStatusTagged { - if casted, ok := structType.(BACnetDoorStatusTagged); ok { + if casted, ok := structType.(BACnetDoorStatusTagged); ok { return casted } if casted, ok := structType.(*BACnetDoorStatusTagged); ok { @@ -123,16 +127,17 @@ func (m *_BACnetDoorStatusTagged) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetDoorStatusTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetDoorStatusTaggedParseWithBuffer(ctx context.Context, readBuffer utils if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetDoorStatusTagged") } @@ -164,12 +169,12 @@ func BACnetDoorStatusTaggedParseWithBuffer(ctx context.Context, readBuffer utils } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func BACnetDoorStatusTaggedParseWithBuffer(ctx context.Context, readBuffer utils } var value BACnetDoorStatus if _value != nil { - value = _value.(BACnetDoorStatus) + value = _value.(BACnetDoorStatus) } // Virtual field @@ -195,7 +200,7 @@ func BACnetDoorStatusTaggedParseWithBuffer(ctx context.Context, readBuffer utils } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetDoorStatusTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func BACnetDoorStatusTaggedParseWithBuffer(ctx context.Context, readBuffer utils // Create the instance return &_BACnetDoorStatusTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetDoorStatusTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_BACnetDoorStatusTagged) Serialize() ([]byte, error) { func (m *_BACnetDoorStatusTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetDoorStatusTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetDoorStatusTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetDoorStatusTagged") } @@ -261,6 +266,7 @@ func (m *_BACnetDoorStatusTagged) SerializeWithWriteBuffer(ctx context.Context, return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_BACnetDoorStatusTagged) GetTagNumber() uint8 { func (m *_BACnetDoorStatusTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_BACnetDoorStatusTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetDoorValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetDoorValue.go index fda2c5da9f6..b73e9ed9fd9 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetDoorValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetDoorValue.go @@ -34,10 +34,10 @@ type IBACnetDoorValue interface { utils.Serializable } -const ( - BACnetDoorValue_LOCK BACnetDoorValue = 0 - BACnetDoorValue_UNLOCK BACnetDoorValue = 1 - BACnetDoorValue_PULSE_UNLOCK BACnetDoorValue = 2 +const( + BACnetDoorValue_LOCK BACnetDoorValue = 0 + BACnetDoorValue_UNLOCK BACnetDoorValue = 1 + BACnetDoorValue_PULSE_UNLOCK BACnetDoorValue = 2 BACnetDoorValue_EXTENDED_PULSE_UNLOCK BACnetDoorValue = 3 ) @@ -45,7 +45,7 @@ var BACnetDoorValueValues []BACnetDoorValue func init() { _ = errors.New - BACnetDoorValueValues = []BACnetDoorValue{ + BACnetDoorValueValues = []BACnetDoorValue { BACnetDoorValue_LOCK, BACnetDoorValue_UNLOCK, BACnetDoorValue_PULSE_UNLOCK, @@ -55,14 +55,14 @@ func init() { func BACnetDoorValueByValue(value uint8) (enum BACnetDoorValue, ok bool) { switch value { - case 0: - return BACnetDoorValue_LOCK, true - case 1: - return BACnetDoorValue_UNLOCK, true - case 2: - return BACnetDoorValue_PULSE_UNLOCK, true - case 3: - return BACnetDoorValue_EXTENDED_PULSE_UNLOCK, true + case 0: + return BACnetDoorValue_LOCK, true + case 1: + return BACnetDoorValue_UNLOCK, true + case 2: + return BACnetDoorValue_PULSE_UNLOCK, true + case 3: + return BACnetDoorValue_EXTENDED_PULSE_UNLOCK, true } return 0, false } @@ -81,13 +81,13 @@ func BACnetDoorValueByName(value string) (enum BACnetDoorValue, ok bool) { return 0, false } -func BACnetDoorValueKnows(value uint8) bool { +func BACnetDoorValueKnows(value uint8) bool { for _, typeValue := range BACnetDoorValueValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetDoorValue(structType interface{}) BACnetDoorValue { @@ -155,3 +155,4 @@ func (e BACnetDoorValue) PLC4XEnumName() string { func (e BACnetDoorValue) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetDoorValueTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetDoorValueTagged.go index d742b1f12cb..0c803a5cebd 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetDoorValueTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetDoorValueTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetDoorValueTagged is the corresponding interface of BACnetDoorValueTagged type BACnetDoorValueTagged interface { @@ -46,14 +48,15 @@ type BACnetDoorValueTaggedExactly interface { // _BACnetDoorValueTagged is the data-structure of this message type _BACnetDoorValueTagged struct { - Header BACnetTagHeader - Value BACnetDoorValue + Header BACnetTagHeader + Value BACnetDoorValue // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_BACnetDoorValueTagged) GetValue() BACnetDoorValue { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetDoorValueTagged factory function for _BACnetDoorValueTagged -func NewBACnetDoorValueTagged(header BACnetTagHeader, value BACnetDoorValue, tagNumber uint8, tagClass TagClass) *_BACnetDoorValueTagged { - return &_BACnetDoorValueTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetDoorValueTagged( header BACnetTagHeader , value BACnetDoorValue , tagNumber uint8 , tagClass TagClass ) *_BACnetDoorValueTagged { +return &_BACnetDoorValueTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetDoorValueTagged(structType interface{}) BACnetDoorValueTagged { - if casted, ok := structType.(BACnetDoorValueTagged); ok { + if casted, ok := structType.(BACnetDoorValueTagged); ok { return casted } if casted, ok := structType.(*BACnetDoorValueTagged); ok { @@ -104,6 +108,7 @@ func (m *_BACnetDoorValueTagged) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetDoorValueTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func BACnetDoorValueTaggedParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetDoorValueTagged") } @@ -135,12 +140,12 @@ func BACnetDoorValueTaggedParseWithBuffer(ctx context.Context, readBuffer utils. } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func BACnetDoorValueTaggedParseWithBuffer(ctx context.Context, readBuffer utils. } var value BACnetDoorValue if _value != nil { - value = _value.(BACnetDoorValue) + value = _value.(BACnetDoorValue) } if closeErr := readBuffer.CloseContext("BACnetDoorValueTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func BACnetDoorValueTaggedParseWithBuffer(ctx context.Context, readBuffer utils. // Create the instance return &_BACnetDoorValueTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_BACnetDoorValueTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_BACnetDoorValueTagged) Serialize() ([]byte, error) { func (m *_BACnetDoorValueTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetDoorValueTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetDoorValueTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetDoorValueTagged") } @@ -206,6 +211,7 @@ func (m *_BACnetDoorValueTagged) SerializeWithWriteBuffer(ctx context.Context, w return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_BACnetDoorValueTagged) GetTagNumber() uint8 { func (m *_BACnetDoorValueTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_BACnetDoorValueTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEngineeringUnits.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEngineeringUnits.go index d0c066a1898..a545729c658 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEngineeringUnits.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEngineeringUnits.go @@ -34,266 +34,266 @@ type IBACnetEngineeringUnits interface { utils.Serializable } -const ( - BACnetEngineeringUnits_METERS_PER_SECOND_PER_SECOND BACnetEngineeringUnits = 166 - BACnetEngineeringUnits_SQUARE_METERS BACnetEngineeringUnits = 0 - BACnetEngineeringUnits_SQUARE_CENTIMETERS BACnetEngineeringUnits = 116 - BACnetEngineeringUnits_SQUARE_FEET BACnetEngineeringUnits = 1 - BACnetEngineeringUnits_SQUARE_INCHES BACnetEngineeringUnits = 115 - BACnetEngineeringUnits_CURRENCY1 BACnetEngineeringUnits = 105 - BACnetEngineeringUnits_CURRENCY2 BACnetEngineeringUnits = 106 - BACnetEngineeringUnits_CURRENCY3 BACnetEngineeringUnits = 107 - BACnetEngineeringUnits_CURRENCY4 BACnetEngineeringUnits = 108 - BACnetEngineeringUnits_CURRENCY5 BACnetEngineeringUnits = 109 - BACnetEngineeringUnits_CURRENCY6 BACnetEngineeringUnits = 110 - BACnetEngineeringUnits_CURRENCY7 BACnetEngineeringUnits = 111 - BACnetEngineeringUnits_CURRENCY8 BACnetEngineeringUnits = 112 - BACnetEngineeringUnits_CURRENCY9 BACnetEngineeringUnits = 113 - BACnetEngineeringUnits_CURRENCY10 BACnetEngineeringUnits = 114 - BACnetEngineeringUnits_MILLIAMPERES BACnetEngineeringUnits = 2 - BACnetEngineeringUnits_AMPERES BACnetEngineeringUnits = 3 - BACnetEngineeringUnits_AMPERES_PER_METER BACnetEngineeringUnits = 167 - BACnetEngineeringUnits_AMPERES_PER_SQUARE_METER BACnetEngineeringUnits = 168 - BACnetEngineeringUnits_AMPERE_SQUARE_METERS BACnetEngineeringUnits = 169 - BACnetEngineeringUnits_DECIBELS BACnetEngineeringUnits = 199 - BACnetEngineeringUnits_DECIBELS_MILLIVOLT BACnetEngineeringUnits = 200 - BACnetEngineeringUnits_DECIBELS_VOLT BACnetEngineeringUnits = 201 - BACnetEngineeringUnits_FARADS BACnetEngineeringUnits = 170 - BACnetEngineeringUnits_HENRYS BACnetEngineeringUnits = 171 - BACnetEngineeringUnits_OHMS BACnetEngineeringUnits = 4 - BACnetEngineeringUnits_OHM_METER_SQUARED_PER_METER BACnetEngineeringUnits = 237 - BACnetEngineeringUnits_OHM_METERS BACnetEngineeringUnits = 172 - BACnetEngineeringUnits_MILLIOHMS BACnetEngineeringUnits = 145 - BACnetEngineeringUnits_KILOHMS BACnetEngineeringUnits = 122 - BACnetEngineeringUnits_MEGOHMS BACnetEngineeringUnits = 123 - BACnetEngineeringUnits_MICROSIEMENS BACnetEngineeringUnits = 190 - BACnetEngineeringUnits_MILLISIEMENS BACnetEngineeringUnits = 202 - BACnetEngineeringUnits_SIEMENS BACnetEngineeringUnits = 173 - BACnetEngineeringUnits_SIEMENS_PER_METER BACnetEngineeringUnits = 174 - BACnetEngineeringUnits_TESLAS BACnetEngineeringUnits = 175 - BACnetEngineeringUnits_VOLTS BACnetEngineeringUnits = 5 - BACnetEngineeringUnits_MILLIVOLTS BACnetEngineeringUnits = 124 - BACnetEngineeringUnits_KILOVOLTS BACnetEngineeringUnits = 6 - BACnetEngineeringUnits_MEGAVOLTS BACnetEngineeringUnits = 7 - BACnetEngineeringUnits_VOLT_AMPERES BACnetEngineeringUnits = 8 - BACnetEngineeringUnits_KILOVOLT_AMPERES BACnetEngineeringUnits = 9 - BACnetEngineeringUnits_MEGAVOLT_AMPERES BACnetEngineeringUnits = 10 - BACnetEngineeringUnits_VOLT_AMPERES_REACTIVE BACnetEngineeringUnits = 11 - BACnetEngineeringUnits_KILOVOLT_AMPERES_REACTIVE BACnetEngineeringUnits = 12 - BACnetEngineeringUnits_MEGAVOLT_AMPERES_REACTIVE BACnetEngineeringUnits = 13 - BACnetEngineeringUnits_VOLTS_PER_DEGREE_KELVIN BACnetEngineeringUnits = 176 - BACnetEngineeringUnits_VOLTS_PER_METER BACnetEngineeringUnits = 177 - BACnetEngineeringUnits_DEGREES_PHASE BACnetEngineeringUnits = 14 - BACnetEngineeringUnits_POWER_FACTOR BACnetEngineeringUnits = 15 - BACnetEngineeringUnits_WEBERS BACnetEngineeringUnits = 178 - BACnetEngineeringUnits_AMPERE_SECONDS BACnetEngineeringUnits = 238 - BACnetEngineeringUnits_VOLT_AMPERE_HOURS BACnetEngineeringUnits = 239 - BACnetEngineeringUnits_KILOVOLT_AMPERE_HOURS BACnetEngineeringUnits = 240 - BACnetEngineeringUnits_MEGAVOLT_AMPERE_HOURS BACnetEngineeringUnits = 241 - BACnetEngineeringUnits_VOLT_AMPERE_HOURS_REACTIVE BACnetEngineeringUnits = 242 - BACnetEngineeringUnits_KILOVOLT_AMPERE_HOURS_REACTIVE BACnetEngineeringUnits = 243 - BACnetEngineeringUnits_MEGAVOLT_AMPERE_HOURS_REACTIVE BACnetEngineeringUnits = 244 - BACnetEngineeringUnits_VOLT_SQUARE_HOURS BACnetEngineeringUnits = 245 - BACnetEngineeringUnits_AMPERE_SQUARE_HOURS BACnetEngineeringUnits = 246 - BACnetEngineeringUnits_JOULES BACnetEngineeringUnits = 16 - BACnetEngineeringUnits_KILOJOULES BACnetEngineeringUnits = 17 - BACnetEngineeringUnits_KILOJOULES_PER_KILOGRAM BACnetEngineeringUnits = 125 - BACnetEngineeringUnits_MEGAJOULES BACnetEngineeringUnits = 126 - BACnetEngineeringUnits_WATT_HOURS BACnetEngineeringUnits = 18 - BACnetEngineeringUnits_KILOWATT_HOURS BACnetEngineeringUnits = 19 - BACnetEngineeringUnits_MEGAWATT_HOURS BACnetEngineeringUnits = 146 - BACnetEngineeringUnits_WATT_HOURS_REACTIVE BACnetEngineeringUnits = 203 - BACnetEngineeringUnits_KILOWATT_HOURS_REACTIVE BACnetEngineeringUnits = 204 - BACnetEngineeringUnits_MEGAWATT_HOURS_REACTIVE BACnetEngineeringUnits = 205 - BACnetEngineeringUnits_BTUS BACnetEngineeringUnits = 20 - BACnetEngineeringUnits_KILO_BTUS BACnetEngineeringUnits = 147 - BACnetEngineeringUnits_MEGA_BTUS BACnetEngineeringUnits = 148 - BACnetEngineeringUnits_THERMS BACnetEngineeringUnits = 21 - BACnetEngineeringUnits_TON_HOURS BACnetEngineeringUnits = 22 - BACnetEngineeringUnits_JOULES_PER_KILOGRAM_DRY_AIR BACnetEngineeringUnits = 23 - BACnetEngineeringUnits_KILOJOULES_PER_KILOGRAM_DRY_AIR BACnetEngineeringUnits = 149 - BACnetEngineeringUnits_MEGAJOULES_PER_KILOGRAM_DRY_AIR BACnetEngineeringUnits = 150 - BACnetEngineeringUnits_BTUS_PER_POUND_DRY_AIR BACnetEngineeringUnits = 24 - BACnetEngineeringUnits_BTUS_PER_POUND BACnetEngineeringUnits = 117 - BACnetEngineeringUnits_GRAMS_OF_WATER_PER_KILOGRAM_DRY_AIR BACnetEngineeringUnits = 28 - BACnetEngineeringUnits_PERCENT_RELATIVE_HUMIDITY BACnetEngineeringUnits = 29 - BACnetEngineeringUnits_MICROMETERS BACnetEngineeringUnits = 194 - BACnetEngineeringUnits_MILLIMETERS BACnetEngineeringUnits = 30 - BACnetEngineeringUnits_CENTIMETERS BACnetEngineeringUnits = 118 - BACnetEngineeringUnits_KILOMETERS BACnetEngineeringUnits = 193 - BACnetEngineeringUnits_METERS BACnetEngineeringUnits = 31 - BACnetEngineeringUnits_INCHES BACnetEngineeringUnits = 32 - BACnetEngineeringUnits_FEET BACnetEngineeringUnits = 33 - BACnetEngineeringUnits_CANDELAS BACnetEngineeringUnits = 179 - BACnetEngineeringUnits_CANDELAS_PER_SQUARE_METER BACnetEngineeringUnits = 180 - BACnetEngineeringUnits_WATTS_PER_SQUARE_FOOT BACnetEngineeringUnits = 34 - BACnetEngineeringUnits_WATTS_PER_SQUARE_METER BACnetEngineeringUnits = 35 - BACnetEngineeringUnits_LUMENS BACnetEngineeringUnits = 36 - BACnetEngineeringUnits_LUXES BACnetEngineeringUnits = 37 - BACnetEngineeringUnits_FOOT_CANDLES BACnetEngineeringUnits = 38 - BACnetEngineeringUnits_MILLIGRAMS BACnetEngineeringUnits = 196 - BACnetEngineeringUnits_GRAMS BACnetEngineeringUnits = 195 - BACnetEngineeringUnits_KILOGRAMS BACnetEngineeringUnits = 39 - BACnetEngineeringUnits_POUNDS_MASS BACnetEngineeringUnits = 40 - BACnetEngineeringUnits_TONS BACnetEngineeringUnits = 41 - BACnetEngineeringUnits_GRAMS_PER_SECOND BACnetEngineeringUnits = 154 - BACnetEngineeringUnits_GRAMS_PER_MINUTE BACnetEngineeringUnits = 155 - BACnetEngineeringUnits_KILOGRAMS_PER_SECOND BACnetEngineeringUnits = 42 - BACnetEngineeringUnits_KILOGRAMS_PER_MINUTE BACnetEngineeringUnits = 43 - BACnetEngineeringUnits_KILOGRAMS_PER_HOUR BACnetEngineeringUnits = 44 - BACnetEngineeringUnits_POUNDS_MASS_PER_SECOND BACnetEngineeringUnits = 119 - BACnetEngineeringUnits_POUNDS_MASS_PER_MINUTE BACnetEngineeringUnits = 45 - BACnetEngineeringUnits_POUNDS_MASS_PER_HOUR BACnetEngineeringUnits = 46 - BACnetEngineeringUnits_TONS_PER_HOUR BACnetEngineeringUnits = 156 - BACnetEngineeringUnits_IWATTS BACnetEngineeringUnits = 132 - BACnetEngineeringUnits_WATTS BACnetEngineeringUnits = 47 - BACnetEngineeringUnits_KILOWATTS BACnetEngineeringUnits = 48 - BACnetEngineeringUnits_MEGAWATTS BACnetEngineeringUnits = 49 - BACnetEngineeringUnits_BTUS_PER_HOUR BACnetEngineeringUnits = 50 - BACnetEngineeringUnits_KILO_BTUS_PER_HOUR BACnetEngineeringUnits = 157 - BACnetEngineeringUnits_JOULE_PER_HOURS BACnetEngineeringUnits = 247 - BACnetEngineeringUnits_HORSEPOWER BACnetEngineeringUnits = 51 - BACnetEngineeringUnits_TONS_REFRIGERATION BACnetEngineeringUnits = 52 - BACnetEngineeringUnits_PASCALS BACnetEngineeringUnits = 53 - BACnetEngineeringUnits_HECTOPASCALS BACnetEngineeringUnits = 133 - BACnetEngineeringUnits_KILOPASCALS BACnetEngineeringUnits = 54 - BACnetEngineeringUnits_MILLIBARS BACnetEngineeringUnits = 134 - BACnetEngineeringUnits_BARS BACnetEngineeringUnits = 55 - BACnetEngineeringUnits_POUNDS_FORCE_PER_SQUARE_INCH BACnetEngineeringUnits = 56 - BACnetEngineeringUnits_MILLIMETERS_OF_WATER BACnetEngineeringUnits = 206 - BACnetEngineeringUnits_CENTIMETERS_OF_WATER BACnetEngineeringUnits = 57 - BACnetEngineeringUnits_INCHES_OF_WATER BACnetEngineeringUnits = 58 - BACnetEngineeringUnits_MILLIMETERS_OF_MERCURY BACnetEngineeringUnits = 59 - BACnetEngineeringUnits_CENTIMETERS_OF_MERCURY BACnetEngineeringUnits = 60 - BACnetEngineeringUnits_INCHES_OF_MERCURY BACnetEngineeringUnits = 61 - BACnetEngineeringUnits_DEGREES_CELSIUS BACnetEngineeringUnits = 62 - BACnetEngineeringUnits_DEGREES_KELVIN BACnetEngineeringUnits = 63 - BACnetEngineeringUnits_DEGREES_KELVIN_PER_HOUR BACnetEngineeringUnits = 181 - BACnetEngineeringUnits_DEGREES_KELVIN_PER_MINUTE BACnetEngineeringUnits = 182 - BACnetEngineeringUnits_DEGREES_FAHRENHEIT BACnetEngineeringUnits = 64 - BACnetEngineeringUnits_DEGREE_DAYS_CELSIUS BACnetEngineeringUnits = 65 - BACnetEngineeringUnits_DEGREE_DAYS_FAHRENHEIT BACnetEngineeringUnits = 66 - BACnetEngineeringUnits_DELTA_DEGREES_FAHRENHEIT BACnetEngineeringUnits = 120 - BACnetEngineeringUnits_DELTA_DEGREES_KELVIN BACnetEngineeringUnits = 121 - BACnetEngineeringUnits_YEARS BACnetEngineeringUnits = 67 - BACnetEngineeringUnits_MONTHS BACnetEngineeringUnits = 68 - BACnetEngineeringUnits_WEEKS BACnetEngineeringUnits = 69 - BACnetEngineeringUnits_DAYS BACnetEngineeringUnits = 70 - BACnetEngineeringUnits_HOURS BACnetEngineeringUnits = 71 - BACnetEngineeringUnits_MINUTES BACnetEngineeringUnits = 72 - BACnetEngineeringUnits_SECONDS BACnetEngineeringUnits = 73 - BACnetEngineeringUnits_HUNDREDTHS_SECONDS BACnetEngineeringUnits = 158 - BACnetEngineeringUnits_MILLISECONDS BACnetEngineeringUnits = 159 - BACnetEngineeringUnits_NEWTON_METERS BACnetEngineeringUnits = 160 - BACnetEngineeringUnits_MILLIMETERS_PER_SECOND BACnetEngineeringUnits = 161 - BACnetEngineeringUnits_MILLIMETERS_PER_MINUTE BACnetEngineeringUnits = 162 - BACnetEngineeringUnits_METERS_PER_SECOND BACnetEngineeringUnits = 74 - BACnetEngineeringUnits_METERS_PER_MINUTE BACnetEngineeringUnits = 163 - BACnetEngineeringUnits_METERS_PER_HOUR BACnetEngineeringUnits = 164 - BACnetEngineeringUnits_KILOMETERS_PER_HOUR BACnetEngineeringUnits = 75 - BACnetEngineeringUnits_FEET_PER_SECOND BACnetEngineeringUnits = 76 - BACnetEngineeringUnits_FEET_PER_MINUTE BACnetEngineeringUnits = 77 - BACnetEngineeringUnits_MILES_PER_HOUR BACnetEngineeringUnits = 78 - BACnetEngineeringUnits_CUBIC_FEET BACnetEngineeringUnits = 79 - BACnetEngineeringUnits_CUBIC_METERS BACnetEngineeringUnits = 80 - BACnetEngineeringUnits_IMPERIAL_GALLONS BACnetEngineeringUnits = 81 - BACnetEngineeringUnits_MILLILITERS BACnetEngineeringUnits = 197 - BACnetEngineeringUnits_LITERS BACnetEngineeringUnits = 82 - BACnetEngineeringUnits_US_GALLONS BACnetEngineeringUnits = 83 - BACnetEngineeringUnits_CUBIC_FEET_PER_SECOND BACnetEngineeringUnits = 142 - BACnetEngineeringUnits_CUBIC_FEET_PER_MINUTE BACnetEngineeringUnits = 84 +const( + BACnetEngineeringUnits_METERS_PER_SECOND_PER_SECOND BACnetEngineeringUnits = 166 + BACnetEngineeringUnits_SQUARE_METERS BACnetEngineeringUnits = 0 + BACnetEngineeringUnits_SQUARE_CENTIMETERS BACnetEngineeringUnits = 116 + BACnetEngineeringUnits_SQUARE_FEET BACnetEngineeringUnits = 1 + BACnetEngineeringUnits_SQUARE_INCHES BACnetEngineeringUnits = 115 + BACnetEngineeringUnits_CURRENCY1 BACnetEngineeringUnits = 105 + BACnetEngineeringUnits_CURRENCY2 BACnetEngineeringUnits = 106 + BACnetEngineeringUnits_CURRENCY3 BACnetEngineeringUnits = 107 + BACnetEngineeringUnits_CURRENCY4 BACnetEngineeringUnits = 108 + BACnetEngineeringUnits_CURRENCY5 BACnetEngineeringUnits = 109 + BACnetEngineeringUnits_CURRENCY6 BACnetEngineeringUnits = 110 + BACnetEngineeringUnits_CURRENCY7 BACnetEngineeringUnits = 111 + BACnetEngineeringUnits_CURRENCY8 BACnetEngineeringUnits = 112 + BACnetEngineeringUnits_CURRENCY9 BACnetEngineeringUnits = 113 + BACnetEngineeringUnits_CURRENCY10 BACnetEngineeringUnits = 114 + BACnetEngineeringUnits_MILLIAMPERES BACnetEngineeringUnits = 2 + BACnetEngineeringUnits_AMPERES BACnetEngineeringUnits = 3 + BACnetEngineeringUnits_AMPERES_PER_METER BACnetEngineeringUnits = 167 + BACnetEngineeringUnits_AMPERES_PER_SQUARE_METER BACnetEngineeringUnits = 168 + BACnetEngineeringUnits_AMPERE_SQUARE_METERS BACnetEngineeringUnits = 169 + BACnetEngineeringUnits_DECIBELS BACnetEngineeringUnits = 199 + BACnetEngineeringUnits_DECIBELS_MILLIVOLT BACnetEngineeringUnits = 200 + BACnetEngineeringUnits_DECIBELS_VOLT BACnetEngineeringUnits = 201 + BACnetEngineeringUnits_FARADS BACnetEngineeringUnits = 170 + BACnetEngineeringUnits_HENRYS BACnetEngineeringUnits = 171 + BACnetEngineeringUnits_OHMS BACnetEngineeringUnits = 4 + BACnetEngineeringUnits_OHM_METER_SQUARED_PER_METER BACnetEngineeringUnits = 237 + BACnetEngineeringUnits_OHM_METERS BACnetEngineeringUnits = 172 + BACnetEngineeringUnits_MILLIOHMS BACnetEngineeringUnits = 145 + BACnetEngineeringUnits_KILOHMS BACnetEngineeringUnits = 122 + BACnetEngineeringUnits_MEGOHMS BACnetEngineeringUnits = 123 + BACnetEngineeringUnits_MICROSIEMENS BACnetEngineeringUnits = 190 + BACnetEngineeringUnits_MILLISIEMENS BACnetEngineeringUnits = 202 + BACnetEngineeringUnits_SIEMENS BACnetEngineeringUnits = 173 + BACnetEngineeringUnits_SIEMENS_PER_METER BACnetEngineeringUnits = 174 + BACnetEngineeringUnits_TESLAS BACnetEngineeringUnits = 175 + BACnetEngineeringUnits_VOLTS BACnetEngineeringUnits = 5 + BACnetEngineeringUnits_MILLIVOLTS BACnetEngineeringUnits = 124 + BACnetEngineeringUnits_KILOVOLTS BACnetEngineeringUnits = 6 + BACnetEngineeringUnits_MEGAVOLTS BACnetEngineeringUnits = 7 + BACnetEngineeringUnits_VOLT_AMPERES BACnetEngineeringUnits = 8 + BACnetEngineeringUnits_KILOVOLT_AMPERES BACnetEngineeringUnits = 9 + BACnetEngineeringUnits_MEGAVOLT_AMPERES BACnetEngineeringUnits = 10 + BACnetEngineeringUnits_VOLT_AMPERES_REACTIVE BACnetEngineeringUnits = 11 + BACnetEngineeringUnits_KILOVOLT_AMPERES_REACTIVE BACnetEngineeringUnits = 12 + BACnetEngineeringUnits_MEGAVOLT_AMPERES_REACTIVE BACnetEngineeringUnits = 13 + BACnetEngineeringUnits_VOLTS_PER_DEGREE_KELVIN BACnetEngineeringUnits = 176 + BACnetEngineeringUnits_VOLTS_PER_METER BACnetEngineeringUnits = 177 + BACnetEngineeringUnits_DEGREES_PHASE BACnetEngineeringUnits = 14 + BACnetEngineeringUnits_POWER_FACTOR BACnetEngineeringUnits = 15 + BACnetEngineeringUnits_WEBERS BACnetEngineeringUnits = 178 + BACnetEngineeringUnits_AMPERE_SECONDS BACnetEngineeringUnits = 238 + BACnetEngineeringUnits_VOLT_AMPERE_HOURS BACnetEngineeringUnits = 239 + BACnetEngineeringUnits_KILOVOLT_AMPERE_HOURS BACnetEngineeringUnits = 240 + BACnetEngineeringUnits_MEGAVOLT_AMPERE_HOURS BACnetEngineeringUnits = 241 + BACnetEngineeringUnits_VOLT_AMPERE_HOURS_REACTIVE BACnetEngineeringUnits = 242 + BACnetEngineeringUnits_KILOVOLT_AMPERE_HOURS_REACTIVE BACnetEngineeringUnits = 243 + BACnetEngineeringUnits_MEGAVOLT_AMPERE_HOURS_REACTIVE BACnetEngineeringUnits = 244 + BACnetEngineeringUnits_VOLT_SQUARE_HOURS BACnetEngineeringUnits = 245 + BACnetEngineeringUnits_AMPERE_SQUARE_HOURS BACnetEngineeringUnits = 246 + BACnetEngineeringUnits_JOULES BACnetEngineeringUnits = 16 + BACnetEngineeringUnits_KILOJOULES BACnetEngineeringUnits = 17 + BACnetEngineeringUnits_KILOJOULES_PER_KILOGRAM BACnetEngineeringUnits = 125 + BACnetEngineeringUnits_MEGAJOULES BACnetEngineeringUnits = 126 + BACnetEngineeringUnits_WATT_HOURS BACnetEngineeringUnits = 18 + BACnetEngineeringUnits_KILOWATT_HOURS BACnetEngineeringUnits = 19 + BACnetEngineeringUnits_MEGAWATT_HOURS BACnetEngineeringUnits = 146 + BACnetEngineeringUnits_WATT_HOURS_REACTIVE BACnetEngineeringUnits = 203 + BACnetEngineeringUnits_KILOWATT_HOURS_REACTIVE BACnetEngineeringUnits = 204 + BACnetEngineeringUnits_MEGAWATT_HOURS_REACTIVE BACnetEngineeringUnits = 205 + BACnetEngineeringUnits_BTUS BACnetEngineeringUnits = 20 + BACnetEngineeringUnits_KILO_BTUS BACnetEngineeringUnits = 147 + BACnetEngineeringUnits_MEGA_BTUS BACnetEngineeringUnits = 148 + BACnetEngineeringUnits_THERMS BACnetEngineeringUnits = 21 + BACnetEngineeringUnits_TON_HOURS BACnetEngineeringUnits = 22 + BACnetEngineeringUnits_JOULES_PER_KILOGRAM_DRY_AIR BACnetEngineeringUnits = 23 + BACnetEngineeringUnits_KILOJOULES_PER_KILOGRAM_DRY_AIR BACnetEngineeringUnits = 149 + BACnetEngineeringUnits_MEGAJOULES_PER_KILOGRAM_DRY_AIR BACnetEngineeringUnits = 150 + BACnetEngineeringUnits_BTUS_PER_POUND_DRY_AIR BACnetEngineeringUnits = 24 + BACnetEngineeringUnits_BTUS_PER_POUND BACnetEngineeringUnits = 117 + BACnetEngineeringUnits_GRAMS_OF_WATER_PER_KILOGRAM_DRY_AIR BACnetEngineeringUnits = 28 + BACnetEngineeringUnits_PERCENT_RELATIVE_HUMIDITY BACnetEngineeringUnits = 29 + BACnetEngineeringUnits_MICROMETERS BACnetEngineeringUnits = 194 + BACnetEngineeringUnits_MILLIMETERS BACnetEngineeringUnits = 30 + BACnetEngineeringUnits_CENTIMETERS BACnetEngineeringUnits = 118 + BACnetEngineeringUnits_KILOMETERS BACnetEngineeringUnits = 193 + BACnetEngineeringUnits_METERS BACnetEngineeringUnits = 31 + BACnetEngineeringUnits_INCHES BACnetEngineeringUnits = 32 + BACnetEngineeringUnits_FEET BACnetEngineeringUnits = 33 + BACnetEngineeringUnits_CANDELAS BACnetEngineeringUnits = 179 + BACnetEngineeringUnits_CANDELAS_PER_SQUARE_METER BACnetEngineeringUnits = 180 + BACnetEngineeringUnits_WATTS_PER_SQUARE_FOOT BACnetEngineeringUnits = 34 + BACnetEngineeringUnits_WATTS_PER_SQUARE_METER BACnetEngineeringUnits = 35 + BACnetEngineeringUnits_LUMENS BACnetEngineeringUnits = 36 + BACnetEngineeringUnits_LUXES BACnetEngineeringUnits = 37 + BACnetEngineeringUnits_FOOT_CANDLES BACnetEngineeringUnits = 38 + BACnetEngineeringUnits_MILLIGRAMS BACnetEngineeringUnits = 196 + BACnetEngineeringUnits_GRAMS BACnetEngineeringUnits = 195 + BACnetEngineeringUnits_KILOGRAMS BACnetEngineeringUnits = 39 + BACnetEngineeringUnits_POUNDS_MASS BACnetEngineeringUnits = 40 + BACnetEngineeringUnits_TONS BACnetEngineeringUnits = 41 + BACnetEngineeringUnits_GRAMS_PER_SECOND BACnetEngineeringUnits = 154 + BACnetEngineeringUnits_GRAMS_PER_MINUTE BACnetEngineeringUnits = 155 + BACnetEngineeringUnits_KILOGRAMS_PER_SECOND BACnetEngineeringUnits = 42 + BACnetEngineeringUnits_KILOGRAMS_PER_MINUTE BACnetEngineeringUnits = 43 + BACnetEngineeringUnits_KILOGRAMS_PER_HOUR BACnetEngineeringUnits = 44 + BACnetEngineeringUnits_POUNDS_MASS_PER_SECOND BACnetEngineeringUnits = 119 + BACnetEngineeringUnits_POUNDS_MASS_PER_MINUTE BACnetEngineeringUnits = 45 + BACnetEngineeringUnits_POUNDS_MASS_PER_HOUR BACnetEngineeringUnits = 46 + BACnetEngineeringUnits_TONS_PER_HOUR BACnetEngineeringUnits = 156 + BACnetEngineeringUnits_IWATTS BACnetEngineeringUnits = 132 + BACnetEngineeringUnits_WATTS BACnetEngineeringUnits = 47 + BACnetEngineeringUnits_KILOWATTS BACnetEngineeringUnits = 48 + BACnetEngineeringUnits_MEGAWATTS BACnetEngineeringUnits = 49 + BACnetEngineeringUnits_BTUS_PER_HOUR BACnetEngineeringUnits = 50 + BACnetEngineeringUnits_KILO_BTUS_PER_HOUR BACnetEngineeringUnits = 157 + BACnetEngineeringUnits_JOULE_PER_HOURS BACnetEngineeringUnits = 247 + BACnetEngineeringUnits_HORSEPOWER BACnetEngineeringUnits = 51 + BACnetEngineeringUnits_TONS_REFRIGERATION BACnetEngineeringUnits = 52 + BACnetEngineeringUnits_PASCALS BACnetEngineeringUnits = 53 + BACnetEngineeringUnits_HECTOPASCALS BACnetEngineeringUnits = 133 + BACnetEngineeringUnits_KILOPASCALS BACnetEngineeringUnits = 54 + BACnetEngineeringUnits_MILLIBARS BACnetEngineeringUnits = 134 + BACnetEngineeringUnits_BARS BACnetEngineeringUnits = 55 + BACnetEngineeringUnits_POUNDS_FORCE_PER_SQUARE_INCH BACnetEngineeringUnits = 56 + BACnetEngineeringUnits_MILLIMETERS_OF_WATER BACnetEngineeringUnits = 206 + BACnetEngineeringUnits_CENTIMETERS_OF_WATER BACnetEngineeringUnits = 57 + BACnetEngineeringUnits_INCHES_OF_WATER BACnetEngineeringUnits = 58 + BACnetEngineeringUnits_MILLIMETERS_OF_MERCURY BACnetEngineeringUnits = 59 + BACnetEngineeringUnits_CENTIMETERS_OF_MERCURY BACnetEngineeringUnits = 60 + BACnetEngineeringUnits_INCHES_OF_MERCURY BACnetEngineeringUnits = 61 + BACnetEngineeringUnits_DEGREES_CELSIUS BACnetEngineeringUnits = 62 + BACnetEngineeringUnits_DEGREES_KELVIN BACnetEngineeringUnits = 63 + BACnetEngineeringUnits_DEGREES_KELVIN_PER_HOUR BACnetEngineeringUnits = 181 + BACnetEngineeringUnits_DEGREES_KELVIN_PER_MINUTE BACnetEngineeringUnits = 182 + BACnetEngineeringUnits_DEGREES_FAHRENHEIT BACnetEngineeringUnits = 64 + BACnetEngineeringUnits_DEGREE_DAYS_CELSIUS BACnetEngineeringUnits = 65 + BACnetEngineeringUnits_DEGREE_DAYS_FAHRENHEIT BACnetEngineeringUnits = 66 + BACnetEngineeringUnits_DELTA_DEGREES_FAHRENHEIT BACnetEngineeringUnits = 120 + BACnetEngineeringUnits_DELTA_DEGREES_KELVIN BACnetEngineeringUnits = 121 + BACnetEngineeringUnits_YEARS BACnetEngineeringUnits = 67 + BACnetEngineeringUnits_MONTHS BACnetEngineeringUnits = 68 + BACnetEngineeringUnits_WEEKS BACnetEngineeringUnits = 69 + BACnetEngineeringUnits_DAYS BACnetEngineeringUnits = 70 + BACnetEngineeringUnits_HOURS BACnetEngineeringUnits = 71 + BACnetEngineeringUnits_MINUTES BACnetEngineeringUnits = 72 + BACnetEngineeringUnits_SECONDS BACnetEngineeringUnits = 73 + BACnetEngineeringUnits_HUNDREDTHS_SECONDS BACnetEngineeringUnits = 158 + BACnetEngineeringUnits_MILLISECONDS BACnetEngineeringUnits = 159 + BACnetEngineeringUnits_NEWTON_METERS BACnetEngineeringUnits = 160 + BACnetEngineeringUnits_MILLIMETERS_PER_SECOND BACnetEngineeringUnits = 161 + BACnetEngineeringUnits_MILLIMETERS_PER_MINUTE BACnetEngineeringUnits = 162 + BACnetEngineeringUnits_METERS_PER_SECOND BACnetEngineeringUnits = 74 + BACnetEngineeringUnits_METERS_PER_MINUTE BACnetEngineeringUnits = 163 + BACnetEngineeringUnits_METERS_PER_HOUR BACnetEngineeringUnits = 164 + BACnetEngineeringUnits_KILOMETERS_PER_HOUR BACnetEngineeringUnits = 75 + BACnetEngineeringUnits_FEET_PER_SECOND BACnetEngineeringUnits = 76 + BACnetEngineeringUnits_FEET_PER_MINUTE BACnetEngineeringUnits = 77 + BACnetEngineeringUnits_MILES_PER_HOUR BACnetEngineeringUnits = 78 + BACnetEngineeringUnits_CUBIC_FEET BACnetEngineeringUnits = 79 + BACnetEngineeringUnits_CUBIC_METERS BACnetEngineeringUnits = 80 + BACnetEngineeringUnits_IMPERIAL_GALLONS BACnetEngineeringUnits = 81 + BACnetEngineeringUnits_MILLILITERS BACnetEngineeringUnits = 197 + BACnetEngineeringUnits_LITERS BACnetEngineeringUnits = 82 + BACnetEngineeringUnits_US_GALLONS BACnetEngineeringUnits = 83 + BACnetEngineeringUnits_CUBIC_FEET_PER_SECOND BACnetEngineeringUnits = 142 + BACnetEngineeringUnits_CUBIC_FEET_PER_MINUTE BACnetEngineeringUnits = 84 BACnetEngineeringUnits_MILLION_STANDARD_CUBIC_FEET_PER_MINUTE BACnetEngineeringUnits = 254 - BACnetEngineeringUnits_CUBIC_FEET_PER_HOUR BACnetEngineeringUnits = 191 - BACnetEngineeringUnits_CUBIC_FEET_PER_DAY BACnetEngineeringUnits = 248 - BACnetEngineeringUnits_STANDARD_CUBIC_FEET_PER_DAY BACnetEngineeringUnits = 47808 - BACnetEngineeringUnits_MILLION_STANDARD_CUBIC_FEET_PER_DAY BACnetEngineeringUnits = 47809 - BACnetEngineeringUnits_THOUSAND_CUBIC_FEET_PER_DAY BACnetEngineeringUnits = 47810 - BACnetEngineeringUnits_THOUSAND_STANDARD_CUBIC_FEET_PER_DAY BACnetEngineeringUnits = 47811 - BACnetEngineeringUnits_POUNDS_MASS_PER_DAY BACnetEngineeringUnits = 47812 - BACnetEngineeringUnits_CUBIC_METERS_PER_SECOND BACnetEngineeringUnits = 85 - BACnetEngineeringUnits_CUBIC_METERS_PER_MINUTE BACnetEngineeringUnits = 165 - BACnetEngineeringUnits_CUBIC_METERS_PER_HOUR BACnetEngineeringUnits = 135 - BACnetEngineeringUnits_CUBIC_METERS_PER_DAY BACnetEngineeringUnits = 249 - BACnetEngineeringUnits_IMPERIAL_GALLONS_PER_MINUTE BACnetEngineeringUnits = 86 - BACnetEngineeringUnits_MILLILITERS_PER_SECOND BACnetEngineeringUnits = 198 - BACnetEngineeringUnits_LITERS_PER_SECOND BACnetEngineeringUnits = 87 - BACnetEngineeringUnits_LITERS_PER_MINUTE BACnetEngineeringUnits = 88 - BACnetEngineeringUnits_LITERS_PER_HOUR BACnetEngineeringUnits = 136 - BACnetEngineeringUnits_US_GALLONS_PER_MINUTE BACnetEngineeringUnits = 89 - BACnetEngineeringUnits_US_GALLONS_PER_HOUR BACnetEngineeringUnits = 192 - BACnetEngineeringUnits_DEGREES_ANGULAR BACnetEngineeringUnits = 90 - BACnetEngineeringUnits_DEGREES_CELSIUS_PER_HOUR BACnetEngineeringUnits = 91 - BACnetEngineeringUnits_DEGREES_CELSIUS_PER_MINUTE BACnetEngineeringUnits = 92 - BACnetEngineeringUnits_DEGREES_FAHRENHEIT_PER_HOUR BACnetEngineeringUnits = 93 - BACnetEngineeringUnits_DEGREES_FAHRENHEIT_PER_MINUTE BACnetEngineeringUnits = 94 - BACnetEngineeringUnits_JOULE_SECONDS BACnetEngineeringUnits = 183 - BACnetEngineeringUnits_KILOGRAMS_PER_CUBIC_METER BACnetEngineeringUnits = 186 - BACnetEngineeringUnits_KILOWATT_HOURS_PER_SQUARE_METER BACnetEngineeringUnits = 137 - BACnetEngineeringUnits_KILOWATT_HOURS_PER_SQUARE_FOOT BACnetEngineeringUnits = 138 - BACnetEngineeringUnits_WATT_HOURS_PER_CUBIC_METER BACnetEngineeringUnits = 250 - BACnetEngineeringUnits_JOULES_PER_CUBIC_METER BACnetEngineeringUnits = 251 - BACnetEngineeringUnits_MEGAJOULES_PER_SQUARE_METER BACnetEngineeringUnits = 139 - BACnetEngineeringUnits_MEGAJOULES_PER_SQUARE_FOOT BACnetEngineeringUnits = 140 - BACnetEngineeringUnits_MOLE_PERCENT BACnetEngineeringUnits = 252 - BACnetEngineeringUnits_NO_UNITS BACnetEngineeringUnits = 95 - BACnetEngineeringUnits_NEWTON_SECONDS BACnetEngineeringUnits = 187 - BACnetEngineeringUnits_NEWTONS_PER_METER BACnetEngineeringUnits = 188 - BACnetEngineeringUnits_PARTS_PER_MILLION BACnetEngineeringUnits = 96 - BACnetEngineeringUnits_PARTS_PER_BILLION BACnetEngineeringUnits = 97 - BACnetEngineeringUnits_PASCAL_SECONDS BACnetEngineeringUnits = 253 - BACnetEngineeringUnits_PERCENT BACnetEngineeringUnits = 98 - BACnetEngineeringUnits_PERCENT_OBSCURATION_PER_FOOT BACnetEngineeringUnits = 143 - BACnetEngineeringUnits_PERCENT_OBSCURATION_PER_METER BACnetEngineeringUnits = 144 - BACnetEngineeringUnits_PERCENT_PER_SECOND BACnetEngineeringUnits = 99 - BACnetEngineeringUnits_PER_MINUTE BACnetEngineeringUnits = 100 - BACnetEngineeringUnits_PER_SECOND BACnetEngineeringUnits = 101 - BACnetEngineeringUnits_PSI_PER_DEGREE_FAHRENHEIT BACnetEngineeringUnits = 102 - BACnetEngineeringUnits_RADIANS BACnetEngineeringUnits = 103 - BACnetEngineeringUnits_RADIANS_PER_SECOND BACnetEngineeringUnits = 184 - BACnetEngineeringUnits_REVOLUTIONS_PER_MINUTE BACnetEngineeringUnits = 104 - BACnetEngineeringUnits_SQUARE_METERS_PER_NEWTON BACnetEngineeringUnits = 185 - BACnetEngineeringUnits_WATTS_PER_METER_PER_DEGREE_KELVIN BACnetEngineeringUnits = 189 - BACnetEngineeringUnits_WATTS_PER_SQUARE_METER_DEGREE_KELVIN BACnetEngineeringUnits = 141 - BACnetEngineeringUnits_PER_MILLE BACnetEngineeringUnits = 207 - BACnetEngineeringUnits_GRAMS_PER_GRAM BACnetEngineeringUnits = 208 - BACnetEngineeringUnits_KILOGRAMS_PER_KILOGRAM BACnetEngineeringUnits = 209 - BACnetEngineeringUnits_GRAMS_PER_KILOGRAM BACnetEngineeringUnits = 210 - BACnetEngineeringUnits_MILLIGRAMS_PER_GRAM BACnetEngineeringUnits = 211 - BACnetEngineeringUnits_MILLIGRAMS_PER_KILOGRAM BACnetEngineeringUnits = 212 - BACnetEngineeringUnits_GRAMS_PER_MILLILITER BACnetEngineeringUnits = 213 - BACnetEngineeringUnits_GRAMS_PER_LITER BACnetEngineeringUnits = 214 - BACnetEngineeringUnits_MILLIGRAMS_PER_LITER BACnetEngineeringUnits = 215 - BACnetEngineeringUnits_MICROGRAMS_PER_LITER BACnetEngineeringUnits = 216 - BACnetEngineeringUnits_GRAMS_PER_CUBIC_METER BACnetEngineeringUnits = 217 - BACnetEngineeringUnits_MILLIGRAMS_PER_CUBIC_METER BACnetEngineeringUnits = 218 - BACnetEngineeringUnits_MICROGRAMS_PER_CUBIC_METER BACnetEngineeringUnits = 219 - BACnetEngineeringUnits_NANOGRAMS_PER_CUBIC_METER BACnetEngineeringUnits = 220 - BACnetEngineeringUnits_GRAMS_PER_CUBIC_CENTIMETER BACnetEngineeringUnits = 221 - BACnetEngineeringUnits_BECQUERELS BACnetEngineeringUnits = 222 - BACnetEngineeringUnits_KILOBECQUERELS BACnetEngineeringUnits = 223 - BACnetEngineeringUnits_MEGABECQUERELS BACnetEngineeringUnits = 224 - BACnetEngineeringUnits_GRAY BACnetEngineeringUnits = 225 - BACnetEngineeringUnits_MILLIGRAY BACnetEngineeringUnits = 226 - BACnetEngineeringUnits_MICROGRAY BACnetEngineeringUnits = 227 - BACnetEngineeringUnits_SIEVERTS BACnetEngineeringUnits = 228 - BACnetEngineeringUnits_MILLISIEVERTS BACnetEngineeringUnits = 229 - BACnetEngineeringUnits_MICROSIEVERTS BACnetEngineeringUnits = 230 - BACnetEngineeringUnits_MICROSIEVERTS_PER_HOUR BACnetEngineeringUnits = 231 - BACnetEngineeringUnits_MILLIREMS BACnetEngineeringUnits = 47814 - BACnetEngineeringUnits_MILLIREMS_PER_HOUR BACnetEngineeringUnits = 47815 - BACnetEngineeringUnits_DECIBELS_A BACnetEngineeringUnits = 232 - BACnetEngineeringUnits_NEPHELOMETRIC_TURBIDITY_UNIT BACnetEngineeringUnits = 233 - BACnetEngineeringUnits_P_H BACnetEngineeringUnits = 234 - BACnetEngineeringUnits_GRAMS_PER_SQUARE_METER BACnetEngineeringUnits = 235 - BACnetEngineeringUnits_MINUTES_PER_DEGREE_KELVIN BACnetEngineeringUnits = 236 - BACnetEngineeringUnits_VENDOR_PROPRIETARY_VALUE BACnetEngineeringUnits = 0xFF + BACnetEngineeringUnits_CUBIC_FEET_PER_HOUR BACnetEngineeringUnits = 191 + BACnetEngineeringUnits_CUBIC_FEET_PER_DAY BACnetEngineeringUnits = 248 + BACnetEngineeringUnits_STANDARD_CUBIC_FEET_PER_DAY BACnetEngineeringUnits = 47808 + BACnetEngineeringUnits_MILLION_STANDARD_CUBIC_FEET_PER_DAY BACnetEngineeringUnits = 47809 + BACnetEngineeringUnits_THOUSAND_CUBIC_FEET_PER_DAY BACnetEngineeringUnits = 47810 + BACnetEngineeringUnits_THOUSAND_STANDARD_CUBIC_FEET_PER_DAY BACnetEngineeringUnits = 47811 + BACnetEngineeringUnits_POUNDS_MASS_PER_DAY BACnetEngineeringUnits = 47812 + BACnetEngineeringUnits_CUBIC_METERS_PER_SECOND BACnetEngineeringUnits = 85 + BACnetEngineeringUnits_CUBIC_METERS_PER_MINUTE BACnetEngineeringUnits = 165 + BACnetEngineeringUnits_CUBIC_METERS_PER_HOUR BACnetEngineeringUnits = 135 + BACnetEngineeringUnits_CUBIC_METERS_PER_DAY BACnetEngineeringUnits = 249 + BACnetEngineeringUnits_IMPERIAL_GALLONS_PER_MINUTE BACnetEngineeringUnits = 86 + BACnetEngineeringUnits_MILLILITERS_PER_SECOND BACnetEngineeringUnits = 198 + BACnetEngineeringUnits_LITERS_PER_SECOND BACnetEngineeringUnits = 87 + BACnetEngineeringUnits_LITERS_PER_MINUTE BACnetEngineeringUnits = 88 + BACnetEngineeringUnits_LITERS_PER_HOUR BACnetEngineeringUnits = 136 + BACnetEngineeringUnits_US_GALLONS_PER_MINUTE BACnetEngineeringUnits = 89 + BACnetEngineeringUnits_US_GALLONS_PER_HOUR BACnetEngineeringUnits = 192 + BACnetEngineeringUnits_DEGREES_ANGULAR BACnetEngineeringUnits = 90 + BACnetEngineeringUnits_DEGREES_CELSIUS_PER_HOUR BACnetEngineeringUnits = 91 + BACnetEngineeringUnits_DEGREES_CELSIUS_PER_MINUTE BACnetEngineeringUnits = 92 + BACnetEngineeringUnits_DEGREES_FAHRENHEIT_PER_HOUR BACnetEngineeringUnits = 93 + BACnetEngineeringUnits_DEGREES_FAHRENHEIT_PER_MINUTE BACnetEngineeringUnits = 94 + BACnetEngineeringUnits_JOULE_SECONDS BACnetEngineeringUnits = 183 + BACnetEngineeringUnits_KILOGRAMS_PER_CUBIC_METER BACnetEngineeringUnits = 186 + BACnetEngineeringUnits_KILOWATT_HOURS_PER_SQUARE_METER BACnetEngineeringUnits = 137 + BACnetEngineeringUnits_KILOWATT_HOURS_PER_SQUARE_FOOT BACnetEngineeringUnits = 138 + BACnetEngineeringUnits_WATT_HOURS_PER_CUBIC_METER BACnetEngineeringUnits = 250 + BACnetEngineeringUnits_JOULES_PER_CUBIC_METER BACnetEngineeringUnits = 251 + BACnetEngineeringUnits_MEGAJOULES_PER_SQUARE_METER BACnetEngineeringUnits = 139 + BACnetEngineeringUnits_MEGAJOULES_PER_SQUARE_FOOT BACnetEngineeringUnits = 140 + BACnetEngineeringUnits_MOLE_PERCENT BACnetEngineeringUnits = 252 + BACnetEngineeringUnits_NO_UNITS BACnetEngineeringUnits = 95 + BACnetEngineeringUnits_NEWTON_SECONDS BACnetEngineeringUnits = 187 + BACnetEngineeringUnits_NEWTONS_PER_METER BACnetEngineeringUnits = 188 + BACnetEngineeringUnits_PARTS_PER_MILLION BACnetEngineeringUnits = 96 + BACnetEngineeringUnits_PARTS_PER_BILLION BACnetEngineeringUnits = 97 + BACnetEngineeringUnits_PASCAL_SECONDS BACnetEngineeringUnits = 253 + BACnetEngineeringUnits_PERCENT BACnetEngineeringUnits = 98 + BACnetEngineeringUnits_PERCENT_OBSCURATION_PER_FOOT BACnetEngineeringUnits = 143 + BACnetEngineeringUnits_PERCENT_OBSCURATION_PER_METER BACnetEngineeringUnits = 144 + BACnetEngineeringUnits_PERCENT_PER_SECOND BACnetEngineeringUnits = 99 + BACnetEngineeringUnits_PER_MINUTE BACnetEngineeringUnits = 100 + BACnetEngineeringUnits_PER_SECOND BACnetEngineeringUnits = 101 + BACnetEngineeringUnits_PSI_PER_DEGREE_FAHRENHEIT BACnetEngineeringUnits = 102 + BACnetEngineeringUnits_RADIANS BACnetEngineeringUnits = 103 + BACnetEngineeringUnits_RADIANS_PER_SECOND BACnetEngineeringUnits = 184 + BACnetEngineeringUnits_REVOLUTIONS_PER_MINUTE BACnetEngineeringUnits = 104 + BACnetEngineeringUnits_SQUARE_METERS_PER_NEWTON BACnetEngineeringUnits = 185 + BACnetEngineeringUnits_WATTS_PER_METER_PER_DEGREE_KELVIN BACnetEngineeringUnits = 189 + BACnetEngineeringUnits_WATTS_PER_SQUARE_METER_DEGREE_KELVIN BACnetEngineeringUnits = 141 + BACnetEngineeringUnits_PER_MILLE BACnetEngineeringUnits = 207 + BACnetEngineeringUnits_GRAMS_PER_GRAM BACnetEngineeringUnits = 208 + BACnetEngineeringUnits_KILOGRAMS_PER_KILOGRAM BACnetEngineeringUnits = 209 + BACnetEngineeringUnits_GRAMS_PER_KILOGRAM BACnetEngineeringUnits = 210 + BACnetEngineeringUnits_MILLIGRAMS_PER_GRAM BACnetEngineeringUnits = 211 + BACnetEngineeringUnits_MILLIGRAMS_PER_KILOGRAM BACnetEngineeringUnits = 212 + BACnetEngineeringUnits_GRAMS_PER_MILLILITER BACnetEngineeringUnits = 213 + BACnetEngineeringUnits_GRAMS_PER_LITER BACnetEngineeringUnits = 214 + BACnetEngineeringUnits_MILLIGRAMS_PER_LITER BACnetEngineeringUnits = 215 + BACnetEngineeringUnits_MICROGRAMS_PER_LITER BACnetEngineeringUnits = 216 + BACnetEngineeringUnits_GRAMS_PER_CUBIC_METER BACnetEngineeringUnits = 217 + BACnetEngineeringUnits_MILLIGRAMS_PER_CUBIC_METER BACnetEngineeringUnits = 218 + BACnetEngineeringUnits_MICROGRAMS_PER_CUBIC_METER BACnetEngineeringUnits = 219 + BACnetEngineeringUnits_NANOGRAMS_PER_CUBIC_METER BACnetEngineeringUnits = 220 + BACnetEngineeringUnits_GRAMS_PER_CUBIC_CENTIMETER BACnetEngineeringUnits = 221 + BACnetEngineeringUnits_BECQUERELS BACnetEngineeringUnits = 222 + BACnetEngineeringUnits_KILOBECQUERELS BACnetEngineeringUnits = 223 + BACnetEngineeringUnits_MEGABECQUERELS BACnetEngineeringUnits = 224 + BACnetEngineeringUnits_GRAY BACnetEngineeringUnits = 225 + BACnetEngineeringUnits_MILLIGRAY BACnetEngineeringUnits = 226 + BACnetEngineeringUnits_MICROGRAY BACnetEngineeringUnits = 227 + BACnetEngineeringUnits_SIEVERTS BACnetEngineeringUnits = 228 + BACnetEngineeringUnits_MILLISIEVERTS BACnetEngineeringUnits = 229 + BACnetEngineeringUnits_MICROSIEVERTS BACnetEngineeringUnits = 230 + BACnetEngineeringUnits_MICROSIEVERTS_PER_HOUR BACnetEngineeringUnits = 231 + BACnetEngineeringUnits_MILLIREMS BACnetEngineeringUnits = 47814 + BACnetEngineeringUnits_MILLIREMS_PER_HOUR BACnetEngineeringUnits = 47815 + BACnetEngineeringUnits_DECIBELS_A BACnetEngineeringUnits = 232 + BACnetEngineeringUnits_NEPHELOMETRIC_TURBIDITY_UNIT BACnetEngineeringUnits = 233 + BACnetEngineeringUnits_P_H BACnetEngineeringUnits = 234 + BACnetEngineeringUnits_GRAMS_PER_SQUARE_METER BACnetEngineeringUnits = 235 + BACnetEngineeringUnits_MINUTES_PER_DEGREE_KELVIN BACnetEngineeringUnits = 236 + BACnetEngineeringUnits_VENDOR_PROPRIETARY_VALUE BACnetEngineeringUnits = 0XFF ) var BACnetEngineeringUnitsValues []BACnetEngineeringUnits func init() { _ = errors.New - BACnetEngineeringUnitsValues = []BACnetEngineeringUnits{ + BACnetEngineeringUnitsValues = []BACnetEngineeringUnits { BACnetEngineeringUnits_METERS_PER_SECOND_PER_SECOND, BACnetEngineeringUnits_SQUARE_METERS, BACnetEngineeringUnits_SQUARE_CENTIMETERS, @@ -551,510 +551,510 @@ func init() { func BACnetEngineeringUnitsByValue(value uint32) (enum BACnetEngineeringUnits, ok bool) { switch value { - case 0: - return BACnetEngineeringUnits_SQUARE_METERS, true - case 0xFF: - return BACnetEngineeringUnits_VENDOR_PROPRIETARY_VALUE, true - case 1: - return BACnetEngineeringUnits_SQUARE_FEET, true - case 10: - return BACnetEngineeringUnits_MEGAVOLT_AMPERES, true - case 100: - return BACnetEngineeringUnits_PER_MINUTE, true - case 101: - return BACnetEngineeringUnits_PER_SECOND, true - case 102: - return BACnetEngineeringUnits_PSI_PER_DEGREE_FAHRENHEIT, true - case 103: - return BACnetEngineeringUnits_RADIANS, true - case 104: - return BACnetEngineeringUnits_REVOLUTIONS_PER_MINUTE, true - case 105: - return BACnetEngineeringUnits_CURRENCY1, true - case 106: - return BACnetEngineeringUnits_CURRENCY2, true - case 107: - return BACnetEngineeringUnits_CURRENCY3, true - case 108: - return BACnetEngineeringUnits_CURRENCY4, true - case 109: - return BACnetEngineeringUnits_CURRENCY5, true - case 11: - return BACnetEngineeringUnits_VOLT_AMPERES_REACTIVE, true - case 110: - return BACnetEngineeringUnits_CURRENCY6, true - case 111: - return BACnetEngineeringUnits_CURRENCY7, true - case 112: - return BACnetEngineeringUnits_CURRENCY8, true - case 113: - return BACnetEngineeringUnits_CURRENCY9, true - case 114: - return BACnetEngineeringUnits_CURRENCY10, true - case 115: - return BACnetEngineeringUnits_SQUARE_INCHES, true - case 116: - return BACnetEngineeringUnits_SQUARE_CENTIMETERS, true - case 117: - return BACnetEngineeringUnits_BTUS_PER_POUND, true - case 118: - return BACnetEngineeringUnits_CENTIMETERS, true - case 119: - return BACnetEngineeringUnits_POUNDS_MASS_PER_SECOND, true - case 12: - return BACnetEngineeringUnits_KILOVOLT_AMPERES_REACTIVE, true - case 120: - return BACnetEngineeringUnits_DELTA_DEGREES_FAHRENHEIT, true - case 121: - return BACnetEngineeringUnits_DELTA_DEGREES_KELVIN, true - case 122: - return BACnetEngineeringUnits_KILOHMS, true - case 123: - return BACnetEngineeringUnits_MEGOHMS, true - case 124: - return BACnetEngineeringUnits_MILLIVOLTS, true - case 125: - return BACnetEngineeringUnits_KILOJOULES_PER_KILOGRAM, true - case 126: - return BACnetEngineeringUnits_MEGAJOULES, true - case 13: - return BACnetEngineeringUnits_MEGAVOLT_AMPERES_REACTIVE, true - case 132: - return BACnetEngineeringUnits_IWATTS, true - case 133: - return BACnetEngineeringUnits_HECTOPASCALS, true - case 134: - return BACnetEngineeringUnits_MILLIBARS, true - case 135: - return BACnetEngineeringUnits_CUBIC_METERS_PER_HOUR, true - case 136: - return BACnetEngineeringUnits_LITERS_PER_HOUR, true - case 137: - return BACnetEngineeringUnits_KILOWATT_HOURS_PER_SQUARE_METER, true - case 138: - return BACnetEngineeringUnits_KILOWATT_HOURS_PER_SQUARE_FOOT, true - case 139: - return BACnetEngineeringUnits_MEGAJOULES_PER_SQUARE_METER, true - case 14: - return BACnetEngineeringUnits_DEGREES_PHASE, true - case 140: - return BACnetEngineeringUnits_MEGAJOULES_PER_SQUARE_FOOT, true - case 141: - return BACnetEngineeringUnits_WATTS_PER_SQUARE_METER_DEGREE_KELVIN, true - case 142: - return BACnetEngineeringUnits_CUBIC_FEET_PER_SECOND, true - case 143: - return BACnetEngineeringUnits_PERCENT_OBSCURATION_PER_FOOT, true - case 144: - return BACnetEngineeringUnits_PERCENT_OBSCURATION_PER_METER, true - case 145: - return BACnetEngineeringUnits_MILLIOHMS, true - case 146: - return BACnetEngineeringUnits_MEGAWATT_HOURS, true - case 147: - return BACnetEngineeringUnits_KILO_BTUS, true - case 148: - return BACnetEngineeringUnits_MEGA_BTUS, true - case 149: - return BACnetEngineeringUnits_KILOJOULES_PER_KILOGRAM_DRY_AIR, true - case 15: - return BACnetEngineeringUnits_POWER_FACTOR, true - case 150: - return BACnetEngineeringUnits_MEGAJOULES_PER_KILOGRAM_DRY_AIR, true - case 154: - return BACnetEngineeringUnits_GRAMS_PER_SECOND, true - case 155: - return BACnetEngineeringUnits_GRAMS_PER_MINUTE, true - case 156: - return BACnetEngineeringUnits_TONS_PER_HOUR, true - case 157: - return BACnetEngineeringUnits_KILO_BTUS_PER_HOUR, true - case 158: - return BACnetEngineeringUnits_HUNDREDTHS_SECONDS, true - case 159: - return BACnetEngineeringUnits_MILLISECONDS, true - case 16: - return BACnetEngineeringUnits_JOULES, true - case 160: - return BACnetEngineeringUnits_NEWTON_METERS, true - case 161: - return BACnetEngineeringUnits_MILLIMETERS_PER_SECOND, true - case 162: - return BACnetEngineeringUnits_MILLIMETERS_PER_MINUTE, true - case 163: - return BACnetEngineeringUnits_METERS_PER_MINUTE, true - case 164: - return BACnetEngineeringUnits_METERS_PER_HOUR, true - case 165: - return BACnetEngineeringUnits_CUBIC_METERS_PER_MINUTE, true - case 166: - return BACnetEngineeringUnits_METERS_PER_SECOND_PER_SECOND, true - case 167: - return BACnetEngineeringUnits_AMPERES_PER_METER, true - case 168: - return BACnetEngineeringUnits_AMPERES_PER_SQUARE_METER, true - case 169: - return BACnetEngineeringUnits_AMPERE_SQUARE_METERS, true - case 17: - return BACnetEngineeringUnits_KILOJOULES, true - case 170: - return BACnetEngineeringUnits_FARADS, true - case 171: - return BACnetEngineeringUnits_HENRYS, true - case 172: - return BACnetEngineeringUnits_OHM_METERS, true - case 173: - return BACnetEngineeringUnits_SIEMENS, true - case 174: - return BACnetEngineeringUnits_SIEMENS_PER_METER, true - case 175: - return BACnetEngineeringUnits_TESLAS, true - case 176: - return BACnetEngineeringUnits_VOLTS_PER_DEGREE_KELVIN, true - case 177: - return BACnetEngineeringUnits_VOLTS_PER_METER, true - case 178: - return BACnetEngineeringUnits_WEBERS, true - case 179: - return BACnetEngineeringUnits_CANDELAS, true - case 18: - return BACnetEngineeringUnits_WATT_HOURS, true - case 180: - return BACnetEngineeringUnits_CANDELAS_PER_SQUARE_METER, true - case 181: - return BACnetEngineeringUnits_DEGREES_KELVIN_PER_HOUR, true - case 182: - return BACnetEngineeringUnits_DEGREES_KELVIN_PER_MINUTE, true - case 183: - return BACnetEngineeringUnits_JOULE_SECONDS, true - case 184: - return BACnetEngineeringUnits_RADIANS_PER_SECOND, true - case 185: - return BACnetEngineeringUnits_SQUARE_METERS_PER_NEWTON, true - case 186: - return BACnetEngineeringUnits_KILOGRAMS_PER_CUBIC_METER, true - case 187: - return BACnetEngineeringUnits_NEWTON_SECONDS, true - case 188: - return BACnetEngineeringUnits_NEWTONS_PER_METER, true - case 189: - return BACnetEngineeringUnits_WATTS_PER_METER_PER_DEGREE_KELVIN, true - case 19: - return BACnetEngineeringUnits_KILOWATT_HOURS, true - case 190: - return BACnetEngineeringUnits_MICROSIEMENS, true - case 191: - return BACnetEngineeringUnits_CUBIC_FEET_PER_HOUR, true - case 192: - return BACnetEngineeringUnits_US_GALLONS_PER_HOUR, true - case 193: - return BACnetEngineeringUnits_KILOMETERS, true - case 194: - return BACnetEngineeringUnits_MICROMETERS, true - case 195: - return BACnetEngineeringUnits_GRAMS, true - case 196: - return BACnetEngineeringUnits_MILLIGRAMS, true - case 197: - return BACnetEngineeringUnits_MILLILITERS, true - case 198: - return BACnetEngineeringUnits_MILLILITERS_PER_SECOND, true - case 199: - return BACnetEngineeringUnits_DECIBELS, true - case 2: - return BACnetEngineeringUnits_MILLIAMPERES, true - case 20: - return BACnetEngineeringUnits_BTUS, true - case 200: - return BACnetEngineeringUnits_DECIBELS_MILLIVOLT, true - case 201: - return BACnetEngineeringUnits_DECIBELS_VOLT, true - case 202: - return BACnetEngineeringUnits_MILLISIEMENS, true - case 203: - return BACnetEngineeringUnits_WATT_HOURS_REACTIVE, true - case 204: - return BACnetEngineeringUnits_KILOWATT_HOURS_REACTIVE, true - case 205: - return BACnetEngineeringUnits_MEGAWATT_HOURS_REACTIVE, true - case 206: - return BACnetEngineeringUnits_MILLIMETERS_OF_WATER, true - case 207: - return BACnetEngineeringUnits_PER_MILLE, true - case 208: - return BACnetEngineeringUnits_GRAMS_PER_GRAM, true - case 209: - return BACnetEngineeringUnits_KILOGRAMS_PER_KILOGRAM, true - case 21: - return BACnetEngineeringUnits_THERMS, true - case 210: - return BACnetEngineeringUnits_GRAMS_PER_KILOGRAM, true - case 211: - return BACnetEngineeringUnits_MILLIGRAMS_PER_GRAM, true - case 212: - return BACnetEngineeringUnits_MILLIGRAMS_PER_KILOGRAM, true - case 213: - return BACnetEngineeringUnits_GRAMS_PER_MILLILITER, true - case 214: - return BACnetEngineeringUnits_GRAMS_PER_LITER, true - case 215: - return BACnetEngineeringUnits_MILLIGRAMS_PER_LITER, true - case 216: - return BACnetEngineeringUnits_MICROGRAMS_PER_LITER, true - case 217: - return BACnetEngineeringUnits_GRAMS_PER_CUBIC_METER, true - case 218: - return BACnetEngineeringUnits_MILLIGRAMS_PER_CUBIC_METER, true - case 219: - return BACnetEngineeringUnits_MICROGRAMS_PER_CUBIC_METER, true - case 22: - return BACnetEngineeringUnits_TON_HOURS, true - case 220: - return BACnetEngineeringUnits_NANOGRAMS_PER_CUBIC_METER, true - case 221: - return BACnetEngineeringUnits_GRAMS_PER_CUBIC_CENTIMETER, true - case 222: - return BACnetEngineeringUnits_BECQUERELS, true - case 223: - return BACnetEngineeringUnits_KILOBECQUERELS, true - case 224: - return BACnetEngineeringUnits_MEGABECQUERELS, true - case 225: - return BACnetEngineeringUnits_GRAY, true - case 226: - return BACnetEngineeringUnits_MILLIGRAY, true - case 227: - return BACnetEngineeringUnits_MICROGRAY, true - case 228: - return BACnetEngineeringUnits_SIEVERTS, true - case 229: - return BACnetEngineeringUnits_MILLISIEVERTS, true - case 23: - return BACnetEngineeringUnits_JOULES_PER_KILOGRAM_DRY_AIR, true - case 230: - return BACnetEngineeringUnits_MICROSIEVERTS, true - case 231: - return BACnetEngineeringUnits_MICROSIEVERTS_PER_HOUR, true - case 232: - return BACnetEngineeringUnits_DECIBELS_A, true - case 233: - return BACnetEngineeringUnits_NEPHELOMETRIC_TURBIDITY_UNIT, true - case 234: - return BACnetEngineeringUnits_P_H, true - case 235: - return BACnetEngineeringUnits_GRAMS_PER_SQUARE_METER, true - case 236: - return BACnetEngineeringUnits_MINUTES_PER_DEGREE_KELVIN, true - case 237: - return BACnetEngineeringUnits_OHM_METER_SQUARED_PER_METER, true - case 238: - return BACnetEngineeringUnits_AMPERE_SECONDS, true - case 239: - return BACnetEngineeringUnits_VOLT_AMPERE_HOURS, true - case 24: - return BACnetEngineeringUnits_BTUS_PER_POUND_DRY_AIR, true - case 240: - return BACnetEngineeringUnits_KILOVOLT_AMPERE_HOURS, true - case 241: - return BACnetEngineeringUnits_MEGAVOLT_AMPERE_HOURS, true - case 242: - return BACnetEngineeringUnits_VOLT_AMPERE_HOURS_REACTIVE, true - case 243: - return BACnetEngineeringUnits_KILOVOLT_AMPERE_HOURS_REACTIVE, true - case 244: - return BACnetEngineeringUnits_MEGAVOLT_AMPERE_HOURS_REACTIVE, true - case 245: - return BACnetEngineeringUnits_VOLT_SQUARE_HOURS, true - case 246: - return BACnetEngineeringUnits_AMPERE_SQUARE_HOURS, true - case 247: - return BACnetEngineeringUnits_JOULE_PER_HOURS, true - case 248: - return BACnetEngineeringUnits_CUBIC_FEET_PER_DAY, true - case 249: - return BACnetEngineeringUnits_CUBIC_METERS_PER_DAY, true - case 250: - return BACnetEngineeringUnits_WATT_HOURS_PER_CUBIC_METER, true - case 251: - return BACnetEngineeringUnits_JOULES_PER_CUBIC_METER, true - case 252: - return BACnetEngineeringUnits_MOLE_PERCENT, true - case 253: - return BACnetEngineeringUnits_PASCAL_SECONDS, true - case 254: - return BACnetEngineeringUnits_MILLION_STANDARD_CUBIC_FEET_PER_MINUTE, true - case 28: - return BACnetEngineeringUnits_GRAMS_OF_WATER_PER_KILOGRAM_DRY_AIR, true - case 29: - return BACnetEngineeringUnits_PERCENT_RELATIVE_HUMIDITY, true - case 3: - return BACnetEngineeringUnits_AMPERES, true - case 30: - return BACnetEngineeringUnits_MILLIMETERS, true - case 31: - return BACnetEngineeringUnits_METERS, true - case 32: - return BACnetEngineeringUnits_INCHES, true - case 33: - return BACnetEngineeringUnits_FEET, true - case 34: - return BACnetEngineeringUnits_WATTS_PER_SQUARE_FOOT, true - case 35: - return BACnetEngineeringUnits_WATTS_PER_SQUARE_METER, true - case 36: - return BACnetEngineeringUnits_LUMENS, true - case 37: - return BACnetEngineeringUnits_LUXES, true - case 38: - return BACnetEngineeringUnits_FOOT_CANDLES, true - case 39: - return BACnetEngineeringUnits_KILOGRAMS, true - case 4: - return BACnetEngineeringUnits_OHMS, true - case 40: - return BACnetEngineeringUnits_POUNDS_MASS, true - case 41: - return BACnetEngineeringUnits_TONS, true - case 42: - return BACnetEngineeringUnits_KILOGRAMS_PER_SECOND, true - case 43: - return BACnetEngineeringUnits_KILOGRAMS_PER_MINUTE, true - case 44: - return BACnetEngineeringUnits_KILOGRAMS_PER_HOUR, true - case 45: - return BACnetEngineeringUnits_POUNDS_MASS_PER_MINUTE, true - case 46: - return BACnetEngineeringUnits_POUNDS_MASS_PER_HOUR, true - case 47: - return BACnetEngineeringUnits_WATTS, true - case 47808: - return BACnetEngineeringUnits_STANDARD_CUBIC_FEET_PER_DAY, true - case 47809: - return BACnetEngineeringUnits_MILLION_STANDARD_CUBIC_FEET_PER_DAY, true - case 47810: - return BACnetEngineeringUnits_THOUSAND_CUBIC_FEET_PER_DAY, true - case 47811: - return BACnetEngineeringUnits_THOUSAND_STANDARD_CUBIC_FEET_PER_DAY, true - case 47812: - return BACnetEngineeringUnits_POUNDS_MASS_PER_DAY, true - case 47814: - return BACnetEngineeringUnits_MILLIREMS, true - case 47815: - return BACnetEngineeringUnits_MILLIREMS_PER_HOUR, true - case 48: - return BACnetEngineeringUnits_KILOWATTS, true - case 49: - return BACnetEngineeringUnits_MEGAWATTS, true - case 5: - return BACnetEngineeringUnits_VOLTS, true - case 50: - return BACnetEngineeringUnits_BTUS_PER_HOUR, true - case 51: - return BACnetEngineeringUnits_HORSEPOWER, true - case 52: - return BACnetEngineeringUnits_TONS_REFRIGERATION, true - case 53: - return BACnetEngineeringUnits_PASCALS, true - case 54: - return BACnetEngineeringUnits_KILOPASCALS, true - case 55: - return BACnetEngineeringUnits_BARS, true - case 56: - return BACnetEngineeringUnits_POUNDS_FORCE_PER_SQUARE_INCH, true - case 57: - return BACnetEngineeringUnits_CENTIMETERS_OF_WATER, true - case 58: - return BACnetEngineeringUnits_INCHES_OF_WATER, true - case 59: - return BACnetEngineeringUnits_MILLIMETERS_OF_MERCURY, true - case 6: - return BACnetEngineeringUnits_KILOVOLTS, true - case 60: - return BACnetEngineeringUnits_CENTIMETERS_OF_MERCURY, true - case 61: - return BACnetEngineeringUnits_INCHES_OF_MERCURY, true - case 62: - return BACnetEngineeringUnits_DEGREES_CELSIUS, true - case 63: - return BACnetEngineeringUnits_DEGREES_KELVIN, true - case 64: - return BACnetEngineeringUnits_DEGREES_FAHRENHEIT, true - case 65: - return BACnetEngineeringUnits_DEGREE_DAYS_CELSIUS, true - case 66: - return BACnetEngineeringUnits_DEGREE_DAYS_FAHRENHEIT, true - case 67: - return BACnetEngineeringUnits_YEARS, true - case 68: - return BACnetEngineeringUnits_MONTHS, true - case 69: - return BACnetEngineeringUnits_WEEKS, true - case 7: - return BACnetEngineeringUnits_MEGAVOLTS, true - case 70: - return BACnetEngineeringUnits_DAYS, true - case 71: - return BACnetEngineeringUnits_HOURS, true - case 72: - return BACnetEngineeringUnits_MINUTES, true - case 73: - return BACnetEngineeringUnits_SECONDS, true - case 74: - return BACnetEngineeringUnits_METERS_PER_SECOND, true - case 75: - return BACnetEngineeringUnits_KILOMETERS_PER_HOUR, true - case 76: - return BACnetEngineeringUnits_FEET_PER_SECOND, true - case 77: - return BACnetEngineeringUnits_FEET_PER_MINUTE, true - case 78: - return BACnetEngineeringUnits_MILES_PER_HOUR, true - case 79: - return BACnetEngineeringUnits_CUBIC_FEET, true - case 8: - return BACnetEngineeringUnits_VOLT_AMPERES, true - case 80: - return BACnetEngineeringUnits_CUBIC_METERS, true - case 81: - return BACnetEngineeringUnits_IMPERIAL_GALLONS, true - case 82: - return BACnetEngineeringUnits_LITERS, true - case 83: - return BACnetEngineeringUnits_US_GALLONS, true - case 84: - return BACnetEngineeringUnits_CUBIC_FEET_PER_MINUTE, true - case 85: - return BACnetEngineeringUnits_CUBIC_METERS_PER_SECOND, true - case 86: - return BACnetEngineeringUnits_IMPERIAL_GALLONS_PER_MINUTE, true - case 87: - return BACnetEngineeringUnits_LITERS_PER_SECOND, true - case 88: - return BACnetEngineeringUnits_LITERS_PER_MINUTE, true - case 89: - return BACnetEngineeringUnits_US_GALLONS_PER_MINUTE, true - case 9: - return BACnetEngineeringUnits_KILOVOLT_AMPERES, true - case 90: - return BACnetEngineeringUnits_DEGREES_ANGULAR, true - case 91: - return BACnetEngineeringUnits_DEGREES_CELSIUS_PER_HOUR, true - case 92: - return BACnetEngineeringUnits_DEGREES_CELSIUS_PER_MINUTE, true - case 93: - return BACnetEngineeringUnits_DEGREES_FAHRENHEIT_PER_HOUR, true - case 94: - return BACnetEngineeringUnits_DEGREES_FAHRENHEIT_PER_MINUTE, true - case 95: - return BACnetEngineeringUnits_NO_UNITS, true - case 96: - return BACnetEngineeringUnits_PARTS_PER_MILLION, true - case 97: - return BACnetEngineeringUnits_PARTS_PER_BILLION, true - case 98: - return BACnetEngineeringUnits_PERCENT, true - case 99: - return BACnetEngineeringUnits_PERCENT_PER_SECOND, true + case 0: + return BACnetEngineeringUnits_SQUARE_METERS, true + case 0XFF: + return BACnetEngineeringUnits_VENDOR_PROPRIETARY_VALUE, true + case 1: + return BACnetEngineeringUnits_SQUARE_FEET, true + case 10: + return BACnetEngineeringUnits_MEGAVOLT_AMPERES, true + case 100: + return BACnetEngineeringUnits_PER_MINUTE, true + case 101: + return BACnetEngineeringUnits_PER_SECOND, true + case 102: + return BACnetEngineeringUnits_PSI_PER_DEGREE_FAHRENHEIT, true + case 103: + return BACnetEngineeringUnits_RADIANS, true + case 104: + return BACnetEngineeringUnits_REVOLUTIONS_PER_MINUTE, true + case 105: + return BACnetEngineeringUnits_CURRENCY1, true + case 106: + return BACnetEngineeringUnits_CURRENCY2, true + case 107: + return BACnetEngineeringUnits_CURRENCY3, true + case 108: + return BACnetEngineeringUnits_CURRENCY4, true + case 109: + return BACnetEngineeringUnits_CURRENCY5, true + case 11: + return BACnetEngineeringUnits_VOLT_AMPERES_REACTIVE, true + case 110: + return BACnetEngineeringUnits_CURRENCY6, true + case 111: + return BACnetEngineeringUnits_CURRENCY7, true + case 112: + return BACnetEngineeringUnits_CURRENCY8, true + case 113: + return BACnetEngineeringUnits_CURRENCY9, true + case 114: + return BACnetEngineeringUnits_CURRENCY10, true + case 115: + return BACnetEngineeringUnits_SQUARE_INCHES, true + case 116: + return BACnetEngineeringUnits_SQUARE_CENTIMETERS, true + case 117: + return BACnetEngineeringUnits_BTUS_PER_POUND, true + case 118: + return BACnetEngineeringUnits_CENTIMETERS, true + case 119: + return BACnetEngineeringUnits_POUNDS_MASS_PER_SECOND, true + case 12: + return BACnetEngineeringUnits_KILOVOLT_AMPERES_REACTIVE, true + case 120: + return BACnetEngineeringUnits_DELTA_DEGREES_FAHRENHEIT, true + case 121: + return BACnetEngineeringUnits_DELTA_DEGREES_KELVIN, true + case 122: + return BACnetEngineeringUnits_KILOHMS, true + case 123: + return BACnetEngineeringUnits_MEGOHMS, true + case 124: + return BACnetEngineeringUnits_MILLIVOLTS, true + case 125: + return BACnetEngineeringUnits_KILOJOULES_PER_KILOGRAM, true + case 126: + return BACnetEngineeringUnits_MEGAJOULES, true + case 13: + return BACnetEngineeringUnits_MEGAVOLT_AMPERES_REACTIVE, true + case 132: + return BACnetEngineeringUnits_IWATTS, true + case 133: + return BACnetEngineeringUnits_HECTOPASCALS, true + case 134: + return BACnetEngineeringUnits_MILLIBARS, true + case 135: + return BACnetEngineeringUnits_CUBIC_METERS_PER_HOUR, true + case 136: + return BACnetEngineeringUnits_LITERS_PER_HOUR, true + case 137: + return BACnetEngineeringUnits_KILOWATT_HOURS_PER_SQUARE_METER, true + case 138: + return BACnetEngineeringUnits_KILOWATT_HOURS_PER_SQUARE_FOOT, true + case 139: + return BACnetEngineeringUnits_MEGAJOULES_PER_SQUARE_METER, true + case 14: + return BACnetEngineeringUnits_DEGREES_PHASE, true + case 140: + return BACnetEngineeringUnits_MEGAJOULES_PER_SQUARE_FOOT, true + case 141: + return BACnetEngineeringUnits_WATTS_PER_SQUARE_METER_DEGREE_KELVIN, true + case 142: + return BACnetEngineeringUnits_CUBIC_FEET_PER_SECOND, true + case 143: + return BACnetEngineeringUnits_PERCENT_OBSCURATION_PER_FOOT, true + case 144: + return BACnetEngineeringUnits_PERCENT_OBSCURATION_PER_METER, true + case 145: + return BACnetEngineeringUnits_MILLIOHMS, true + case 146: + return BACnetEngineeringUnits_MEGAWATT_HOURS, true + case 147: + return BACnetEngineeringUnits_KILO_BTUS, true + case 148: + return BACnetEngineeringUnits_MEGA_BTUS, true + case 149: + return BACnetEngineeringUnits_KILOJOULES_PER_KILOGRAM_DRY_AIR, true + case 15: + return BACnetEngineeringUnits_POWER_FACTOR, true + case 150: + return BACnetEngineeringUnits_MEGAJOULES_PER_KILOGRAM_DRY_AIR, true + case 154: + return BACnetEngineeringUnits_GRAMS_PER_SECOND, true + case 155: + return BACnetEngineeringUnits_GRAMS_PER_MINUTE, true + case 156: + return BACnetEngineeringUnits_TONS_PER_HOUR, true + case 157: + return BACnetEngineeringUnits_KILO_BTUS_PER_HOUR, true + case 158: + return BACnetEngineeringUnits_HUNDREDTHS_SECONDS, true + case 159: + return BACnetEngineeringUnits_MILLISECONDS, true + case 16: + return BACnetEngineeringUnits_JOULES, true + case 160: + return BACnetEngineeringUnits_NEWTON_METERS, true + case 161: + return BACnetEngineeringUnits_MILLIMETERS_PER_SECOND, true + case 162: + return BACnetEngineeringUnits_MILLIMETERS_PER_MINUTE, true + case 163: + return BACnetEngineeringUnits_METERS_PER_MINUTE, true + case 164: + return BACnetEngineeringUnits_METERS_PER_HOUR, true + case 165: + return BACnetEngineeringUnits_CUBIC_METERS_PER_MINUTE, true + case 166: + return BACnetEngineeringUnits_METERS_PER_SECOND_PER_SECOND, true + case 167: + return BACnetEngineeringUnits_AMPERES_PER_METER, true + case 168: + return BACnetEngineeringUnits_AMPERES_PER_SQUARE_METER, true + case 169: + return BACnetEngineeringUnits_AMPERE_SQUARE_METERS, true + case 17: + return BACnetEngineeringUnits_KILOJOULES, true + case 170: + return BACnetEngineeringUnits_FARADS, true + case 171: + return BACnetEngineeringUnits_HENRYS, true + case 172: + return BACnetEngineeringUnits_OHM_METERS, true + case 173: + return BACnetEngineeringUnits_SIEMENS, true + case 174: + return BACnetEngineeringUnits_SIEMENS_PER_METER, true + case 175: + return BACnetEngineeringUnits_TESLAS, true + case 176: + return BACnetEngineeringUnits_VOLTS_PER_DEGREE_KELVIN, true + case 177: + return BACnetEngineeringUnits_VOLTS_PER_METER, true + case 178: + return BACnetEngineeringUnits_WEBERS, true + case 179: + return BACnetEngineeringUnits_CANDELAS, true + case 18: + return BACnetEngineeringUnits_WATT_HOURS, true + case 180: + return BACnetEngineeringUnits_CANDELAS_PER_SQUARE_METER, true + case 181: + return BACnetEngineeringUnits_DEGREES_KELVIN_PER_HOUR, true + case 182: + return BACnetEngineeringUnits_DEGREES_KELVIN_PER_MINUTE, true + case 183: + return BACnetEngineeringUnits_JOULE_SECONDS, true + case 184: + return BACnetEngineeringUnits_RADIANS_PER_SECOND, true + case 185: + return BACnetEngineeringUnits_SQUARE_METERS_PER_NEWTON, true + case 186: + return BACnetEngineeringUnits_KILOGRAMS_PER_CUBIC_METER, true + case 187: + return BACnetEngineeringUnits_NEWTON_SECONDS, true + case 188: + return BACnetEngineeringUnits_NEWTONS_PER_METER, true + case 189: + return BACnetEngineeringUnits_WATTS_PER_METER_PER_DEGREE_KELVIN, true + case 19: + return BACnetEngineeringUnits_KILOWATT_HOURS, true + case 190: + return BACnetEngineeringUnits_MICROSIEMENS, true + case 191: + return BACnetEngineeringUnits_CUBIC_FEET_PER_HOUR, true + case 192: + return BACnetEngineeringUnits_US_GALLONS_PER_HOUR, true + case 193: + return BACnetEngineeringUnits_KILOMETERS, true + case 194: + return BACnetEngineeringUnits_MICROMETERS, true + case 195: + return BACnetEngineeringUnits_GRAMS, true + case 196: + return BACnetEngineeringUnits_MILLIGRAMS, true + case 197: + return BACnetEngineeringUnits_MILLILITERS, true + case 198: + return BACnetEngineeringUnits_MILLILITERS_PER_SECOND, true + case 199: + return BACnetEngineeringUnits_DECIBELS, true + case 2: + return BACnetEngineeringUnits_MILLIAMPERES, true + case 20: + return BACnetEngineeringUnits_BTUS, true + case 200: + return BACnetEngineeringUnits_DECIBELS_MILLIVOLT, true + case 201: + return BACnetEngineeringUnits_DECIBELS_VOLT, true + case 202: + return BACnetEngineeringUnits_MILLISIEMENS, true + case 203: + return BACnetEngineeringUnits_WATT_HOURS_REACTIVE, true + case 204: + return BACnetEngineeringUnits_KILOWATT_HOURS_REACTIVE, true + case 205: + return BACnetEngineeringUnits_MEGAWATT_HOURS_REACTIVE, true + case 206: + return BACnetEngineeringUnits_MILLIMETERS_OF_WATER, true + case 207: + return BACnetEngineeringUnits_PER_MILLE, true + case 208: + return BACnetEngineeringUnits_GRAMS_PER_GRAM, true + case 209: + return BACnetEngineeringUnits_KILOGRAMS_PER_KILOGRAM, true + case 21: + return BACnetEngineeringUnits_THERMS, true + case 210: + return BACnetEngineeringUnits_GRAMS_PER_KILOGRAM, true + case 211: + return BACnetEngineeringUnits_MILLIGRAMS_PER_GRAM, true + case 212: + return BACnetEngineeringUnits_MILLIGRAMS_PER_KILOGRAM, true + case 213: + return BACnetEngineeringUnits_GRAMS_PER_MILLILITER, true + case 214: + return BACnetEngineeringUnits_GRAMS_PER_LITER, true + case 215: + return BACnetEngineeringUnits_MILLIGRAMS_PER_LITER, true + case 216: + return BACnetEngineeringUnits_MICROGRAMS_PER_LITER, true + case 217: + return BACnetEngineeringUnits_GRAMS_PER_CUBIC_METER, true + case 218: + return BACnetEngineeringUnits_MILLIGRAMS_PER_CUBIC_METER, true + case 219: + return BACnetEngineeringUnits_MICROGRAMS_PER_CUBIC_METER, true + case 22: + return BACnetEngineeringUnits_TON_HOURS, true + case 220: + return BACnetEngineeringUnits_NANOGRAMS_PER_CUBIC_METER, true + case 221: + return BACnetEngineeringUnits_GRAMS_PER_CUBIC_CENTIMETER, true + case 222: + return BACnetEngineeringUnits_BECQUERELS, true + case 223: + return BACnetEngineeringUnits_KILOBECQUERELS, true + case 224: + return BACnetEngineeringUnits_MEGABECQUERELS, true + case 225: + return BACnetEngineeringUnits_GRAY, true + case 226: + return BACnetEngineeringUnits_MILLIGRAY, true + case 227: + return BACnetEngineeringUnits_MICROGRAY, true + case 228: + return BACnetEngineeringUnits_SIEVERTS, true + case 229: + return BACnetEngineeringUnits_MILLISIEVERTS, true + case 23: + return BACnetEngineeringUnits_JOULES_PER_KILOGRAM_DRY_AIR, true + case 230: + return BACnetEngineeringUnits_MICROSIEVERTS, true + case 231: + return BACnetEngineeringUnits_MICROSIEVERTS_PER_HOUR, true + case 232: + return BACnetEngineeringUnits_DECIBELS_A, true + case 233: + return BACnetEngineeringUnits_NEPHELOMETRIC_TURBIDITY_UNIT, true + case 234: + return BACnetEngineeringUnits_P_H, true + case 235: + return BACnetEngineeringUnits_GRAMS_PER_SQUARE_METER, true + case 236: + return BACnetEngineeringUnits_MINUTES_PER_DEGREE_KELVIN, true + case 237: + return BACnetEngineeringUnits_OHM_METER_SQUARED_PER_METER, true + case 238: + return BACnetEngineeringUnits_AMPERE_SECONDS, true + case 239: + return BACnetEngineeringUnits_VOLT_AMPERE_HOURS, true + case 24: + return BACnetEngineeringUnits_BTUS_PER_POUND_DRY_AIR, true + case 240: + return BACnetEngineeringUnits_KILOVOLT_AMPERE_HOURS, true + case 241: + return BACnetEngineeringUnits_MEGAVOLT_AMPERE_HOURS, true + case 242: + return BACnetEngineeringUnits_VOLT_AMPERE_HOURS_REACTIVE, true + case 243: + return BACnetEngineeringUnits_KILOVOLT_AMPERE_HOURS_REACTIVE, true + case 244: + return BACnetEngineeringUnits_MEGAVOLT_AMPERE_HOURS_REACTIVE, true + case 245: + return BACnetEngineeringUnits_VOLT_SQUARE_HOURS, true + case 246: + return BACnetEngineeringUnits_AMPERE_SQUARE_HOURS, true + case 247: + return BACnetEngineeringUnits_JOULE_PER_HOURS, true + case 248: + return BACnetEngineeringUnits_CUBIC_FEET_PER_DAY, true + case 249: + return BACnetEngineeringUnits_CUBIC_METERS_PER_DAY, true + case 250: + return BACnetEngineeringUnits_WATT_HOURS_PER_CUBIC_METER, true + case 251: + return BACnetEngineeringUnits_JOULES_PER_CUBIC_METER, true + case 252: + return BACnetEngineeringUnits_MOLE_PERCENT, true + case 253: + return BACnetEngineeringUnits_PASCAL_SECONDS, true + case 254: + return BACnetEngineeringUnits_MILLION_STANDARD_CUBIC_FEET_PER_MINUTE, true + case 28: + return BACnetEngineeringUnits_GRAMS_OF_WATER_PER_KILOGRAM_DRY_AIR, true + case 29: + return BACnetEngineeringUnits_PERCENT_RELATIVE_HUMIDITY, true + case 3: + return BACnetEngineeringUnits_AMPERES, true + case 30: + return BACnetEngineeringUnits_MILLIMETERS, true + case 31: + return BACnetEngineeringUnits_METERS, true + case 32: + return BACnetEngineeringUnits_INCHES, true + case 33: + return BACnetEngineeringUnits_FEET, true + case 34: + return BACnetEngineeringUnits_WATTS_PER_SQUARE_FOOT, true + case 35: + return BACnetEngineeringUnits_WATTS_PER_SQUARE_METER, true + case 36: + return BACnetEngineeringUnits_LUMENS, true + case 37: + return BACnetEngineeringUnits_LUXES, true + case 38: + return BACnetEngineeringUnits_FOOT_CANDLES, true + case 39: + return BACnetEngineeringUnits_KILOGRAMS, true + case 4: + return BACnetEngineeringUnits_OHMS, true + case 40: + return BACnetEngineeringUnits_POUNDS_MASS, true + case 41: + return BACnetEngineeringUnits_TONS, true + case 42: + return BACnetEngineeringUnits_KILOGRAMS_PER_SECOND, true + case 43: + return BACnetEngineeringUnits_KILOGRAMS_PER_MINUTE, true + case 44: + return BACnetEngineeringUnits_KILOGRAMS_PER_HOUR, true + case 45: + return BACnetEngineeringUnits_POUNDS_MASS_PER_MINUTE, true + case 46: + return BACnetEngineeringUnits_POUNDS_MASS_PER_HOUR, true + case 47: + return BACnetEngineeringUnits_WATTS, true + case 47808: + return BACnetEngineeringUnits_STANDARD_CUBIC_FEET_PER_DAY, true + case 47809: + return BACnetEngineeringUnits_MILLION_STANDARD_CUBIC_FEET_PER_DAY, true + case 47810: + return BACnetEngineeringUnits_THOUSAND_CUBIC_FEET_PER_DAY, true + case 47811: + return BACnetEngineeringUnits_THOUSAND_STANDARD_CUBIC_FEET_PER_DAY, true + case 47812: + return BACnetEngineeringUnits_POUNDS_MASS_PER_DAY, true + case 47814: + return BACnetEngineeringUnits_MILLIREMS, true + case 47815: + return BACnetEngineeringUnits_MILLIREMS_PER_HOUR, true + case 48: + return BACnetEngineeringUnits_KILOWATTS, true + case 49: + return BACnetEngineeringUnits_MEGAWATTS, true + case 5: + return BACnetEngineeringUnits_VOLTS, true + case 50: + return BACnetEngineeringUnits_BTUS_PER_HOUR, true + case 51: + return BACnetEngineeringUnits_HORSEPOWER, true + case 52: + return BACnetEngineeringUnits_TONS_REFRIGERATION, true + case 53: + return BACnetEngineeringUnits_PASCALS, true + case 54: + return BACnetEngineeringUnits_KILOPASCALS, true + case 55: + return BACnetEngineeringUnits_BARS, true + case 56: + return BACnetEngineeringUnits_POUNDS_FORCE_PER_SQUARE_INCH, true + case 57: + return BACnetEngineeringUnits_CENTIMETERS_OF_WATER, true + case 58: + return BACnetEngineeringUnits_INCHES_OF_WATER, true + case 59: + return BACnetEngineeringUnits_MILLIMETERS_OF_MERCURY, true + case 6: + return BACnetEngineeringUnits_KILOVOLTS, true + case 60: + return BACnetEngineeringUnits_CENTIMETERS_OF_MERCURY, true + case 61: + return BACnetEngineeringUnits_INCHES_OF_MERCURY, true + case 62: + return BACnetEngineeringUnits_DEGREES_CELSIUS, true + case 63: + return BACnetEngineeringUnits_DEGREES_KELVIN, true + case 64: + return BACnetEngineeringUnits_DEGREES_FAHRENHEIT, true + case 65: + return BACnetEngineeringUnits_DEGREE_DAYS_CELSIUS, true + case 66: + return BACnetEngineeringUnits_DEGREE_DAYS_FAHRENHEIT, true + case 67: + return BACnetEngineeringUnits_YEARS, true + case 68: + return BACnetEngineeringUnits_MONTHS, true + case 69: + return BACnetEngineeringUnits_WEEKS, true + case 7: + return BACnetEngineeringUnits_MEGAVOLTS, true + case 70: + return BACnetEngineeringUnits_DAYS, true + case 71: + return BACnetEngineeringUnits_HOURS, true + case 72: + return BACnetEngineeringUnits_MINUTES, true + case 73: + return BACnetEngineeringUnits_SECONDS, true + case 74: + return BACnetEngineeringUnits_METERS_PER_SECOND, true + case 75: + return BACnetEngineeringUnits_KILOMETERS_PER_HOUR, true + case 76: + return BACnetEngineeringUnits_FEET_PER_SECOND, true + case 77: + return BACnetEngineeringUnits_FEET_PER_MINUTE, true + case 78: + return BACnetEngineeringUnits_MILES_PER_HOUR, true + case 79: + return BACnetEngineeringUnits_CUBIC_FEET, true + case 8: + return BACnetEngineeringUnits_VOLT_AMPERES, true + case 80: + return BACnetEngineeringUnits_CUBIC_METERS, true + case 81: + return BACnetEngineeringUnits_IMPERIAL_GALLONS, true + case 82: + return BACnetEngineeringUnits_LITERS, true + case 83: + return BACnetEngineeringUnits_US_GALLONS, true + case 84: + return BACnetEngineeringUnits_CUBIC_FEET_PER_MINUTE, true + case 85: + return BACnetEngineeringUnits_CUBIC_METERS_PER_SECOND, true + case 86: + return BACnetEngineeringUnits_IMPERIAL_GALLONS_PER_MINUTE, true + case 87: + return BACnetEngineeringUnits_LITERS_PER_SECOND, true + case 88: + return BACnetEngineeringUnits_LITERS_PER_MINUTE, true + case 89: + return BACnetEngineeringUnits_US_GALLONS_PER_MINUTE, true + case 9: + return BACnetEngineeringUnits_KILOVOLT_AMPERES, true + case 90: + return BACnetEngineeringUnits_DEGREES_ANGULAR, true + case 91: + return BACnetEngineeringUnits_DEGREES_CELSIUS_PER_HOUR, true + case 92: + return BACnetEngineeringUnits_DEGREES_CELSIUS_PER_MINUTE, true + case 93: + return BACnetEngineeringUnits_DEGREES_FAHRENHEIT_PER_HOUR, true + case 94: + return BACnetEngineeringUnits_DEGREES_FAHRENHEIT_PER_MINUTE, true + case 95: + return BACnetEngineeringUnits_NO_UNITS, true + case 96: + return BACnetEngineeringUnits_PARTS_PER_MILLION, true + case 97: + return BACnetEngineeringUnits_PARTS_PER_BILLION, true + case 98: + return BACnetEngineeringUnits_PERCENT, true + case 99: + return BACnetEngineeringUnits_PERCENT_PER_SECOND, true } return 0, false } @@ -1569,13 +1569,13 @@ func BACnetEngineeringUnitsByName(value string) (enum BACnetEngineeringUnits, ok return 0, false } -func BACnetEngineeringUnitsKnows(value uint32) bool { +func BACnetEngineeringUnitsKnows(value uint32) bool { for _, typeValue := range BACnetEngineeringUnitsValues { if uint32(typeValue) == value { return true } } - return false + return false; } func CastBACnetEngineeringUnits(structType interface{}) BACnetEngineeringUnits { @@ -2139,3 +2139,4 @@ func (e BACnetEngineeringUnits) PLC4XEnumName() string { func (e BACnetEngineeringUnits) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEngineeringUnitsTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEngineeringUnitsTagged.go index c9fc483e039..60a470fc979 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEngineeringUnitsTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEngineeringUnitsTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEngineeringUnitsTagged is the corresponding interface of BACnetEngineeringUnitsTagged type BACnetEngineeringUnitsTagged interface { @@ -50,15 +52,16 @@ type BACnetEngineeringUnitsTaggedExactly interface { // _BACnetEngineeringUnitsTagged is the data-structure of this message type _BACnetEngineeringUnitsTagged struct { - Header BACnetTagHeader - Value BACnetEngineeringUnits - ProprietaryValue uint32 + Header BACnetTagHeader + Value BACnetEngineeringUnits + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_BACnetEngineeringUnitsTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEngineeringUnitsTagged factory function for _BACnetEngineeringUnitsTagged -func NewBACnetEngineeringUnitsTagged(header BACnetTagHeader, value BACnetEngineeringUnits, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_BACnetEngineeringUnitsTagged { - return &_BACnetEngineeringUnitsTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetEngineeringUnitsTagged( header BACnetTagHeader , value BACnetEngineeringUnits , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_BACnetEngineeringUnitsTagged { +return &_BACnetEngineeringUnitsTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetEngineeringUnitsTagged(structType interface{}) BACnetEngineeringUnitsTagged { - if casted, ok := structType.(BACnetEngineeringUnitsTagged); ok { + if casted, ok := structType.(BACnetEngineeringUnitsTagged); ok { return casted } if casted, ok := structType.(*BACnetEngineeringUnitsTagged); ok { @@ -123,16 +127,17 @@ func (m *_BACnetEngineeringUnitsTagged) GetLengthInBits(ctx context.Context) uin lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetEngineeringUnitsTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetEngineeringUnitsTaggedParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetEngineeringUnitsTagged") } @@ -164,12 +169,12 @@ func BACnetEngineeringUnitsTaggedParseWithBuffer(ctx context.Context, readBuffer } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func BACnetEngineeringUnitsTaggedParseWithBuffer(ctx context.Context, readBuffer } var value BACnetEngineeringUnits if _value != nil { - value = _value.(BACnetEngineeringUnits) + value = _value.(BACnetEngineeringUnits) } // Virtual field @@ -195,7 +200,7 @@ func BACnetEngineeringUnitsTaggedParseWithBuffer(ctx context.Context, readBuffer } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetEngineeringUnitsTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func BACnetEngineeringUnitsTaggedParseWithBuffer(ctx context.Context, readBuffer // Create the instance return &_BACnetEngineeringUnitsTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetEngineeringUnitsTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_BACnetEngineeringUnitsTagged) Serialize() ([]byte, error) { func (m *_BACnetEngineeringUnitsTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetEngineeringUnitsTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetEngineeringUnitsTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetEngineeringUnitsTagged") } @@ -261,6 +266,7 @@ func (m *_BACnetEngineeringUnitsTagged) SerializeWithWriteBuffer(ctx context.Con return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_BACnetEngineeringUnitsTagged) GetTagNumber() uint8 { func (m *_BACnetEngineeringUnitsTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_BACnetEngineeringUnitsTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetError.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetError.go index 4ec661b97fe..872e095faaa 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetError.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetError.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetError is the corresponding interface of BACnetError type BACnetError interface { @@ -53,6 +55,7 @@ type _BACnetErrorChildRequirements interface { GetErrorChoice() BACnetConfirmedServiceChoice } + type BACnetErrorParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetError, serializeChildFunction func() error) error GetTypeName() string @@ -60,21 +63,22 @@ type BACnetErrorParent interface { type BACnetErrorChild interface { utils.Serializable - InitializeParent(parent BACnetError) +InitializeParent(parent BACnetError ) GetParent() *BACnetError GetTypeName() string BACnetError } + // NewBACnetError factory function for _BACnetError -func NewBACnetError() *_BACnetError { - return &_BACnetError{} +func NewBACnetError( ) *_BACnetError { +return &_BACnetError{ } } // Deprecated: use the interface for direct cast func CastBACnetError(structType interface{}) BACnetError { - if casted, ok := structType.(BACnetError); ok { + if casted, ok := structType.(BACnetError); ok { return casted } if casted, ok := structType.(*BACnetError); ok { @@ -87,6 +91,7 @@ func (m *_BACnetError) GetTypeName() string { return "BACnetError" } + func (m *_BACnetError) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -113,28 +118,28 @@ func BACnetErrorParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetErrorChildSerializeRequirement interface { BACnetError - InitializeParent(BACnetError) + InitializeParent(BACnetError ) GetParent() BACnetError } var _childTemp interface{} var _child BACnetErrorChildSerializeRequirement var typeSwitchError error switch { - case errorChoice == BACnetConfirmedServiceChoice_SUBSCRIBE_COV_PROPERTY_MULTIPLE: // SubscribeCOVPropertyMultipleError +case errorChoice == BACnetConfirmedServiceChoice_SUBSCRIBE_COV_PROPERTY_MULTIPLE : // SubscribeCOVPropertyMultipleError _childTemp, typeSwitchError = SubscribeCOVPropertyMultipleErrorParseWithBuffer(ctx, readBuffer, errorChoice) - case errorChoice == BACnetConfirmedServiceChoice_ADD_LIST_ELEMENT: // ChangeListAddError +case errorChoice == BACnetConfirmedServiceChoice_ADD_LIST_ELEMENT : // ChangeListAddError _childTemp, typeSwitchError = ChangeListAddErrorParseWithBuffer(ctx, readBuffer, errorChoice) - case errorChoice == BACnetConfirmedServiceChoice_REMOVE_LIST_ELEMENT: // ChangeListRemoveError +case errorChoice == BACnetConfirmedServiceChoice_REMOVE_LIST_ELEMENT : // ChangeListRemoveError _childTemp, typeSwitchError = ChangeListRemoveErrorParseWithBuffer(ctx, readBuffer, errorChoice) - case errorChoice == BACnetConfirmedServiceChoice_CREATE_OBJECT: // CreateObjectError +case errorChoice == BACnetConfirmedServiceChoice_CREATE_OBJECT : // CreateObjectError _childTemp, typeSwitchError = CreateObjectErrorParseWithBuffer(ctx, readBuffer, errorChoice) - case errorChoice == BACnetConfirmedServiceChoice_WRITE_PROPERTY_MULTIPLE: // WritePropertyMultipleError +case errorChoice == BACnetConfirmedServiceChoice_WRITE_PROPERTY_MULTIPLE : // WritePropertyMultipleError _childTemp, typeSwitchError = WritePropertyMultipleErrorParseWithBuffer(ctx, readBuffer, errorChoice) - case errorChoice == BACnetConfirmedServiceChoice_CONFIRMED_PRIVATE_TRANSFER: // ConfirmedPrivateTransferError +case errorChoice == BACnetConfirmedServiceChoice_CONFIRMED_PRIVATE_TRANSFER : // ConfirmedPrivateTransferError _childTemp, typeSwitchError = ConfirmedPrivateTransferErrorParseWithBuffer(ctx, readBuffer, errorChoice) - case errorChoice == BACnetConfirmedServiceChoice_VT_CLOSE: // VTCloseError +case errorChoice == BACnetConfirmedServiceChoice_VT_CLOSE : // VTCloseError _childTemp, typeSwitchError = VTCloseErrorParseWithBuffer(ctx, readBuffer, errorChoice) - case 0 == 0: // BACnetErrorGeneral +case 0==0 : // BACnetErrorGeneral _childTemp, typeSwitchError = BACnetErrorGeneralParseWithBuffer(ctx, readBuffer, errorChoice) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [errorChoice=%v]", errorChoice) @@ -149,7 +154,7 @@ func BACnetErrorParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer } // Finish initializing - _child.InitializeParent(_child) +_child.InitializeParent(_child ) return _child, nil } @@ -159,7 +164,7 @@ func (pm *_BACnetError) SerializeParent(ctx context.Context, writeBuffer utils.W _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetError"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetError"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetError") } @@ -174,6 +179,7 @@ func (pm *_BACnetError) SerializeParent(ctx context.Context, writeBuffer utils.W return nil } + func (m *_BACnetError) isBACnetError() bool { return true } @@ -188,3 +194,6 @@ func (m *_BACnetError) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetErrorGeneral.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetErrorGeneral.go index d0e9f9e4474..0a9e3f4b89d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetErrorGeneral.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetErrorGeneral.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetErrorGeneral is the corresponding interface of BACnetErrorGeneral type BACnetErrorGeneral interface { @@ -46,29 +48,29 @@ type BACnetErrorGeneralExactly interface { // _BACnetErrorGeneral is the data-structure of this message type _BACnetErrorGeneral struct { *_BACnetError - Error Error + Error Error } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetErrorGeneral) GetErrorChoice() BACnetConfirmedServiceChoice { - return 0 -} +func (m *_BACnetErrorGeneral) GetErrorChoice() BACnetConfirmedServiceChoice { +return 0} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetErrorGeneral) InitializeParent(parent BACnetError) {} +func (m *_BACnetErrorGeneral) InitializeParent(parent BACnetError ) {} -func (m *_BACnetErrorGeneral) GetParent() BACnetError { +func (m *_BACnetErrorGeneral) GetParent() BACnetError { return m._BACnetError } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetErrorGeneral) GetError() Error { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetErrorGeneral factory function for _BACnetErrorGeneral -func NewBACnetErrorGeneral(error Error) *_BACnetErrorGeneral { +func NewBACnetErrorGeneral( error Error ) *_BACnetErrorGeneral { _result := &_BACnetErrorGeneral{ - Error: error, - _BACnetError: NewBACnetError(), + Error: error, + _BACnetError: NewBACnetError(), } _result._BACnetError._BACnetErrorChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetErrorGeneral(error Error) *_BACnetErrorGeneral { // Deprecated: use the interface for direct cast func CastBACnetErrorGeneral(structType interface{}) BACnetErrorGeneral { - if casted, ok := structType.(BACnetErrorGeneral); ok { + if casted, ok := structType.(BACnetErrorGeneral); ok { return casted } if casted, ok := structType.(*BACnetErrorGeneral); ok { @@ -117,6 +120,7 @@ func (m *_BACnetErrorGeneral) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetErrorGeneral) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetErrorGeneralParseWithBuffer(ctx context.Context, readBuffer utils.Rea if pullErr := readBuffer.PullContext("error"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for error") } - _error, _errorErr := ErrorParseWithBuffer(ctx, readBuffer) +_error, _errorErr := ErrorParseWithBuffer(ctx, readBuffer) if _errorErr != nil { return nil, errors.Wrap(_errorErr, "Error parsing 'error' field of BACnetErrorGeneral") } @@ -153,8 +157,9 @@ func BACnetErrorGeneralParseWithBuffer(ctx context.Context, readBuffer utils.Rea // Create a partially initialized instance _child := &_BACnetErrorGeneral{ - _BACnetError: &_BACnetError{}, - Error: error, + _BACnetError: &_BACnetError{ + }, + Error: error, } _child._BACnetError._BACnetErrorChildRequirements = _child return _child, nil @@ -176,17 +181,17 @@ func (m *_BACnetErrorGeneral) SerializeWithWriteBuffer(ctx context.Context, writ return errors.Wrap(pushErr, "Error pushing for BACnetErrorGeneral") } - // Simple Field (error) - if pushErr := writeBuffer.PushContext("error"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for error") - } - _errorErr := writeBuffer.WriteSerializable(ctx, m.GetError()) - if popErr := writeBuffer.PopContext("error"); popErr != nil { - return errors.Wrap(popErr, "Error popping for error") - } - if _errorErr != nil { - return errors.Wrap(_errorErr, "Error serializing 'error' field") - } + // Simple Field (error) + if pushErr := writeBuffer.PushContext("error"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for error") + } + _errorErr := writeBuffer.WriteSerializable(ctx, m.GetError()) + if popErr := writeBuffer.PopContext("error"); popErr != nil { + return errors.Wrap(popErr, "Error popping for error") + } + if _errorErr != nil { + return errors.Wrap(_errorErr, "Error serializing 'error' field") + } if popErr := writeBuffer.PopContext("BACnetErrorGeneral"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetErrorGeneral") @@ -196,6 +201,7 @@ func (m *_BACnetErrorGeneral) SerializeWithWriteBuffer(ctx context.Context, writ return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetErrorGeneral) isBACnetErrorGeneral() bool { return true } @@ -210,3 +216,6 @@ func (m *_BACnetErrorGeneral) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEscalatorFault.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEscalatorFault.go index daabb535a80..19320ab291c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEscalatorFault.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEscalatorFault.go @@ -34,24 +34,24 @@ type IBACnetEscalatorFault interface { utils.Serializable } -const ( - BACnetEscalatorFault_CONTROLLER_FAULT BACnetEscalatorFault = 0 - BACnetEscalatorFault_DRIVE_AND_MOTOR_FAULT BACnetEscalatorFault = 1 +const( + BACnetEscalatorFault_CONTROLLER_FAULT BACnetEscalatorFault = 0 + BACnetEscalatorFault_DRIVE_AND_MOTOR_FAULT BACnetEscalatorFault = 1 BACnetEscalatorFault_MECHANICAL_COMPONENT_FAULT BACnetEscalatorFault = 2 - BACnetEscalatorFault_OVERSPEED_FAULT BACnetEscalatorFault = 3 - BACnetEscalatorFault_POWER_SUPPLY_FAULT BACnetEscalatorFault = 4 - BACnetEscalatorFault_SAFETY_DEVICE_FAULT BACnetEscalatorFault = 5 - BACnetEscalatorFault_CONTROLLER_SUPPLY_FAULT BACnetEscalatorFault = 6 + BACnetEscalatorFault_OVERSPEED_FAULT BACnetEscalatorFault = 3 + BACnetEscalatorFault_POWER_SUPPLY_FAULT BACnetEscalatorFault = 4 + BACnetEscalatorFault_SAFETY_DEVICE_FAULT BACnetEscalatorFault = 5 + BACnetEscalatorFault_CONTROLLER_SUPPLY_FAULT BACnetEscalatorFault = 6 BACnetEscalatorFault_DRIVE_TEMPERATURE_EXCEEDED BACnetEscalatorFault = 7 - BACnetEscalatorFault_COMB_PLATE_FAULT BACnetEscalatorFault = 8 - BACnetEscalatorFault_VENDOR_PROPRIETARY_VALUE BACnetEscalatorFault = 0xFFFF + BACnetEscalatorFault_COMB_PLATE_FAULT BACnetEscalatorFault = 8 + BACnetEscalatorFault_VENDOR_PROPRIETARY_VALUE BACnetEscalatorFault = 0XFFFF ) var BACnetEscalatorFaultValues []BACnetEscalatorFault func init() { _ = errors.New - BACnetEscalatorFaultValues = []BACnetEscalatorFault{ + BACnetEscalatorFaultValues = []BACnetEscalatorFault { BACnetEscalatorFault_CONTROLLER_FAULT, BACnetEscalatorFault_DRIVE_AND_MOTOR_FAULT, BACnetEscalatorFault_MECHANICAL_COMPONENT_FAULT, @@ -67,26 +67,26 @@ func init() { func BACnetEscalatorFaultByValue(value uint16) (enum BACnetEscalatorFault, ok bool) { switch value { - case 0: - return BACnetEscalatorFault_CONTROLLER_FAULT, true - case 0xFFFF: - return BACnetEscalatorFault_VENDOR_PROPRIETARY_VALUE, true - case 1: - return BACnetEscalatorFault_DRIVE_AND_MOTOR_FAULT, true - case 2: - return BACnetEscalatorFault_MECHANICAL_COMPONENT_FAULT, true - case 3: - return BACnetEscalatorFault_OVERSPEED_FAULT, true - case 4: - return BACnetEscalatorFault_POWER_SUPPLY_FAULT, true - case 5: - return BACnetEscalatorFault_SAFETY_DEVICE_FAULT, true - case 6: - return BACnetEscalatorFault_CONTROLLER_SUPPLY_FAULT, true - case 7: - return BACnetEscalatorFault_DRIVE_TEMPERATURE_EXCEEDED, true - case 8: - return BACnetEscalatorFault_COMB_PLATE_FAULT, true + case 0: + return BACnetEscalatorFault_CONTROLLER_FAULT, true + case 0XFFFF: + return BACnetEscalatorFault_VENDOR_PROPRIETARY_VALUE, true + case 1: + return BACnetEscalatorFault_DRIVE_AND_MOTOR_FAULT, true + case 2: + return BACnetEscalatorFault_MECHANICAL_COMPONENT_FAULT, true + case 3: + return BACnetEscalatorFault_OVERSPEED_FAULT, true + case 4: + return BACnetEscalatorFault_POWER_SUPPLY_FAULT, true + case 5: + return BACnetEscalatorFault_SAFETY_DEVICE_FAULT, true + case 6: + return BACnetEscalatorFault_CONTROLLER_SUPPLY_FAULT, true + case 7: + return BACnetEscalatorFault_DRIVE_TEMPERATURE_EXCEEDED, true + case 8: + return BACnetEscalatorFault_COMB_PLATE_FAULT, true } return 0, false } @@ -117,13 +117,13 @@ func BACnetEscalatorFaultByName(value string) (enum BACnetEscalatorFault, ok boo return 0, false } -func BACnetEscalatorFaultKnows(value uint16) bool { +func BACnetEscalatorFaultKnows(value uint16) bool { for _, typeValue := range BACnetEscalatorFaultValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastBACnetEscalatorFault(structType interface{}) BACnetEscalatorFault { @@ -203,3 +203,4 @@ func (e BACnetEscalatorFault) PLC4XEnumName() string { func (e BACnetEscalatorFault) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEscalatorFaultTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEscalatorFaultTagged.go index a9d318ea214..2389be16e0a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEscalatorFaultTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEscalatorFaultTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEscalatorFaultTagged is the corresponding interface of BACnetEscalatorFaultTagged type BACnetEscalatorFaultTagged interface { @@ -50,15 +52,16 @@ type BACnetEscalatorFaultTaggedExactly interface { // _BACnetEscalatorFaultTagged is the data-structure of this message type _BACnetEscalatorFaultTagged struct { - Header BACnetTagHeader - Value BACnetEscalatorFault - ProprietaryValue uint32 + Header BACnetTagHeader + Value BACnetEscalatorFault + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_BACnetEscalatorFaultTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEscalatorFaultTagged factory function for _BACnetEscalatorFaultTagged -func NewBACnetEscalatorFaultTagged(header BACnetTagHeader, value BACnetEscalatorFault, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_BACnetEscalatorFaultTagged { - return &_BACnetEscalatorFaultTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetEscalatorFaultTagged( header BACnetTagHeader , value BACnetEscalatorFault , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_BACnetEscalatorFaultTagged { +return &_BACnetEscalatorFaultTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetEscalatorFaultTagged(structType interface{}) BACnetEscalatorFaultTagged { - if casted, ok := structType.(BACnetEscalatorFaultTagged); ok { + if casted, ok := structType.(BACnetEscalatorFaultTagged); ok { return casted } if casted, ok := structType.(*BACnetEscalatorFaultTagged); ok { @@ -123,16 +127,17 @@ func (m *_BACnetEscalatorFaultTagged) GetLengthInBits(ctx context.Context) uint1 lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetEscalatorFaultTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetEscalatorFaultTaggedParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetEscalatorFaultTagged") } @@ -164,12 +169,12 @@ func BACnetEscalatorFaultTaggedParseWithBuffer(ctx context.Context, readBuffer u } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func BACnetEscalatorFaultTaggedParseWithBuffer(ctx context.Context, readBuffer u } var value BACnetEscalatorFault if _value != nil { - value = _value.(BACnetEscalatorFault) + value = _value.(BACnetEscalatorFault) } // Virtual field @@ -195,7 +200,7 @@ func BACnetEscalatorFaultTaggedParseWithBuffer(ctx context.Context, readBuffer u } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetEscalatorFaultTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func BACnetEscalatorFaultTaggedParseWithBuffer(ctx context.Context, readBuffer u // Create the instance return &_BACnetEscalatorFaultTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetEscalatorFaultTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_BACnetEscalatorFaultTagged) Serialize() ([]byte, error) { func (m *_BACnetEscalatorFaultTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetEscalatorFaultTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetEscalatorFaultTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetEscalatorFaultTagged") } @@ -261,6 +266,7 @@ func (m *_BACnetEscalatorFaultTagged) SerializeWithWriteBuffer(ctx context.Conte return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_BACnetEscalatorFaultTagged) GetTagNumber() uint8 { func (m *_BACnetEscalatorFaultTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_BACnetEscalatorFaultTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEscalatorMode.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEscalatorMode.go index 78b601cb6db..35a38fcb0fd 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEscalatorMode.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEscalatorMode.go @@ -34,21 +34,21 @@ type IBACnetEscalatorMode interface { utils.Serializable } -const ( - BACnetEscalatorMode_UNKNOWN BACnetEscalatorMode = 0 - BACnetEscalatorMode_STOP BACnetEscalatorMode = 1 - BACnetEscalatorMode_UP BACnetEscalatorMode = 2 - BACnetEscalatorMode_DOWN BACnetEscalatorMode = 3 - BACnetEscalatorMode_INSPECTION BACnetEscalatorMode = 4 - BACnetEscalatorMode_OUT_OF_SERVICE BACnetEscalatorMode = 5 - BACnetEscalatorMode_VENDOR_PROPRIETARY_VALUE BACnetEscalatorMode = 0xFFFF +const( + BACnetEscalatorMode_UNKNOWN BACnetEscalatorMode = 0 + BACnetEscalatorMode_STOP BACnetEscalatorMode = 1 + BACnetEscalatorMode_UP BACnetEscalatorMode = 2 + BACnetEscalatorMode_DOWN BACnetEscalatorMode = 3 + BACnetEscalatorMode_INSPECTION BACnetEscalatorMode = 4 + BACnetEscalatorMode_OUT_OF_SERVICE BACnetEscalatorMode = 5 + BACnetEscalatorMode_VENDOR_PROPRIETARY_VALUE BACnetEscalatorMode = 0XFFFF ) var BACnetEscalatorModeValues []BACnetEscalatorMode func init() { _ = errors.New - BACnetEscalatorModeValues = []BACnetEscalatorMode{ + BACnetEscalatorModeValues = []BACnetEscalatorMode { BACnetEscalatorMode_UNKNOWN, BACnetEscalatorMode_STOP, BACnetEscalatorMode_UP, @@ -61,20 +61,20 @@ func init() { func BACnetEscalatorModeByValue(value uint16) (enum BACnetEscalatorMode, ok bool) { switch value { - case 0: - return BACnetEscalatorMode_UNKNOWN, true - case 0xFFFF: - return BACnetEscalatorMode_VENDOR_PROPRIETARY_VALUE, true - case 1: - return BACnetEscalatorMode_STOP, true - case 2: - return BACnetEscalatorMode_UP, true - case 3: - return BACnetEscalatorMode_DOWN, true - case 4: - return BACnetEscalatorMode_INSPECTION, true - case 5: - return BACnetEscalatorMode_OUT_OF_SERVICE, true + case 0: + return BACnetEscalatorMode_UNKNOWN, true + case 0XFFFF: + return BACnetEscalatorMode_VENDOR_PROPRIETARY_VALUE, true + case 1: + return BACnetEscalatorMode_STOP, true + case 2: + return BACnetEscalatorMode_UP, true + case 3: + return BACnetEscalatorMode_DOWN, true + case 4: + return BACnetEscalatorMode_INSPECTION, true + case 5: + return BACnetEscalatorMode_OUT_OF_SERVICE, true } return 0, false } @@ -99,13 +99,13 @@ func BACnetEscalatorModeByName(value string) (enum BACnetEscalatorMode, ok bool) return 0, false } -func BACnetEscalatorModeKnows(value uint16) bool { +func BACnetEscalatorModeKnows(value uint16) bool { for _, typeValue := range BACnetEscalatorModeValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastBACnetEscalatorMode(structType interface{}) BACnetEscalatorMode { @@ -179,3 +179,4 @@ func (e BACnetEscalatorMode) PLC4XEnumName() string { func (e BACnetEscalatorMode) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEscalatorModeTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEscalatorModeTagged.go index a56a552b7f6..b89e9da6133 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEscalatorModeTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEscalatorModeTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEscalatorModeTagged is the corresponding interface of BACnetEscalatorModeTagged type BACnetEscalatorModeTagged interface { @@ -50,15 +52,16 @@ type BACnetEscalatorModeTaggedExactly interface { // _BACnetEscalatorModeTagged is the data-structure of this message type _BACnetEscalatorModeTagged struct { - Header BACnetTagHeader - Value BACnetEscalatorMode - ProprietaryValue uint32 + Header BACnetTagHeader + Value BACnetEscalatorMode + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_BACnetEscalatorModeTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEscalatorModeTagged factory function for _BACnetEscalatorModeTagged -func NewBACnetEscalatorModeTagged(header BACnetTagHeader, value BACnetEscalatorMode, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_BACnetEscalatorModeTagged { - return &_BACnetEscalatorModeTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetEscalatorModeTagged( header BACnetTagHeader , value BACnetEscalatorMode , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_BACnetEscalatorModeTagged { +return &_BACnetEscalatorModeTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetEscalatorModeTagged(structType interface{}) BACnetEscalatorModeTagged { - if casted, ok := structType.(BACnetEscalatorModeTagged); ok { + if casted, ok := structType.(BACnetEscalatorModeTagged); ok { return casted } if casted, ok := structType.(*BACnetEscalatorModeTagged); ok { @@ -123,16 +127,17 @@ func (m *_BACnetEscalatorModeTagged) GetLengthInBits(ctx context.Context) uint16 lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetEscalatorModeTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetEscalatorModeTaggedParseWithBuffer(ctx context.Context, readBuffer ut if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetEscalatorModeTagged") } @@ -164,12 +169,12 @@ func BACnetEscalatorModeTaggedParseWithBuffer(ctx context.Context, readBuffer ut } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func BACnetEscalatorModeTaggedParseWithBuffer(ctx context.Context, readBuffer ut } var value BACnetEscalatorMode if _value != nil { - value = _value.(BACnetEscalatorMode) + value = _value.(BACnetEscalatorMode) } // Virtual field @@ -195,7 +200,7 @@ func BACnetEscalatorModeTaggedParseWithBuffer(ctx context.Context, readBuffer ut } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetEscalatorModeTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func BACnetEscalatorModeTaggedParseWithBuffer(ctx context.Context, readBuffer ut // Create the instance return &_BACnetEscalatorModeTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetEscalatorModeTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_BACnetEscalatorModeTagged) Serialize() ([]byte, error) { func (m *_BACnetEscalatorModeTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetEscalatorModeTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetEscalatorModeTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetEscalatorModeTagged") } @@ -261,6 +266,7 @@ func (m *_BACnetEscalatorModeTagged) SerializeWithWriteBuffer(ctx context.Contex return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_BACnetEscalatorModeTagged) GetTagNumber() uint8 { func (m *_BACnetEscalatorModeTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_BACnetEscalatorModeTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEscalatorOperationDirection.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEscalatorOperationDirection.go index 4f8b0328903..d37a093370e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEscalatorOperationDirection.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEscalatorOperationDirection.go @@ -34,21 +34,21 @@ type IBACnetEscalatorOperationDirection interface { utils.Serializable } -const ( - BACnetEscalatorOperationDirection_UNKNOWN BACnetEscalatorOperationDirection = 0 - BACnetEscalatorOperationDirection_STOPPED BACnetEscalatorOperationDirection = 1 - BACnetEscalatorOperationDirection_UP_RATED_SPEED BACnetEscalatorOperationDirection = 2 - BACnetEscalatorOperationDirection_UP_REDUCED_SPEED BACnetEscalatorOperationDirection = 3 - BACnetEscalatorOperationDirection_DOWN_RATED_SPEED BACnetEscalatorOperationDirection = 4 - BACnetEscalatorOperationDirection_DOWN_REDUCED_SPEED BACnetEscalatorOperationDirection = 5 - BACnetEscalatorOperationDirection_VENDOR_PROPRIETARY_VALUE BACnetEscalatorOperationDirection = 0xFFFF +const( + BACnetEscalatorOperationDirection_UNKNOWN BACnetEscalatorOperationDirection = 0 + BACnetEscalatorOperationDirection_STOPPED BACnetEscalatorOperationDirection = 1 + BACnetEscalatorOperationDirection_UP_RATED_SPEED BACnetEscalatorOperationDirection = 2 + BACnetEscalatorOperationDirection_UP_REDUCED_SPEED BACnetEscalatorOperationDirection = 3 + BACnetEscalatorOperationDirection_DOWN_RATED_SPEED BACnetEscalatorOperationDirection = 4 + BACnetEscalatorOperationDirection_DOWN_REDUCED_SPEED BACnetEscalatorOperationDirection = 5 + BACnetEscalatorOperationDirection_VENDOR_PROPRIETARY_VALUE BACnetEscalatorOperationDirection = 0XFFFF ) var BACnetEscalatorOperationDirectionValues []BACnetEscalatorOperationDirection func init() { _ = errors.New - BACnetEscalatorOperationDirectionValues = []BACnetEscalatorOperationDirection{ + BACnetEscalatorOperationDirectionValues = []BACnetEscalatorOperationDirection { BACnetEscalatorOperationDirection_UNKNOWN, BACnetEscalatorOperationDirection_STOPPED, BACnetEscalatorOperationDirection_UP_RATED_SPEED, @@ -61,20 +61,20 @@ func init() { func BACnetEscalatorOperationDirectionByValue(value uint16) (enum BACnetEscalatorOperationDirection, ok bool) { switch value { - case 0: - return BACnetEscalatorOperationDirection_UNKNOWN, true - case 0xFFFF: - return BACnetEscalatorOperationDirection_VENDOR_PROPRIETARY_VALUE, true - case 1: - return BACnetEscalatorOperationDirection_STOPPED, true - case 2: - return BACnetEscalatorOperationDirection_UP_RATED_SPEED, true - case 3: - return BACnetEscalatorOperationDirection_UP_REDUCED_SPEED, true - case 4: - return BACnetEscalatorOperationDirection_DOWN_RATED_SPEED, true - case 5: - return BACnetEscalatorOperationDirection_DOWN_REDUCED_SPEED, true + case 0: + return BACnetEscalatorOperationDirection_UNKNOWN, true + case 0XFFFF: + return BACnetEscalatorOperationDirection_VENDOR_PROPRIETARY_VALUE, true + case 1: + return BACnetEscalatorOperationDirection_STOPPED, true + case 2: + return BACnetEscalatorOperationDirection_UP_RATED_SPEED, true + case 3: + return BACnetEscalatorOperationDirection_UP_REDUCED_SPEED, true + case 4: + return BACnetEscalatorOperationDirection_DOWN_RATED_SPEED, true + case 5: + return BACnetEscalatorOperationDirection_DOWN_REDUCED_SPEED, true } return 0, false } @@ -99,13 +99,13 @@ func BACnetEscalatorOperationDirectionByName(value string) (enum BACnetEscalator return 0, false } -func BACnetEscalatorOperationDirectionKnows(value uint16) bool { +func BACnetEscalatorOperationDirectionKnows(value uint16) bool { for _, typeValue := range BACnetEscalatorOperationDirectionValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastBACnetEscalatorOperationDirection(structType interface{}) BACnetEscalatorOperationDirection { @@ -179,3 +179,4 @@ func (e BACnetEscalatorOperationDirection) PLC4XEnumName() string { func (e BACnetEscalatorOperationDirection) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEscalatorOperationDirectionTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEscalatorOperationDirectionTagged.go index 76b5ba45cc2..877683970c6 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEscalatorOperationDirectionTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEscalatorOperationDirectionTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEscalatorOperationDirectionTagged is the corresponding interface of BACnetEscalatorOperationDirectionTagged type BACnetEscalatorOperationDirectionTagged interface { @@ -50,15 +52,16 @@ type BACnetEscalatorOperationDirectionTaggedExactly interface { // _BACnetEscalatorOperationDirectionTagged is the data-structure of this message type _BACnetEscalatorOperationDirectionTagged struct { - Header BACnetTagHeader - Value BACnetEscalatorOperationDirection - ProprietaryValue uint32 + Header BACnetTagHeader + Value BACnetEscalatorOperationDirection + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_BACnetEscalatorOperationDirectionTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEscalatorOperationDirectionTagged factory function for _BACnetEscalatorOperationDirectionTagged -func NewBACnetEscalatorOperationDirectionTagged(header BACnetTagHeader, value BACnetEscalatorOperationDirection, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_BACnetEscalatorOperationDirectionTagged { - return &_BACnetEscalatorOperationDirectionTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetEscalatorOperationDirectionTagged( header BACnetTagHeader , value BACnetEscalatorOperationDirection , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_BACnetEscalatorOperationDirectionTagged { +return &_BACnetEscalatorOperationDirectionTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetEscalatorOperationDirectionTagged(structType interface{}) BACnetEscalatorOperationDirectionTagged { - if casted, ok := structType.(BACnetEscalatorOperationDirectionTagged); ok { + if casted, ok := structType.(BACnetEscalatorOperationDirectionTagged); ok { return casted } if casted, ok := structType.(*BACnetEscalatorOperationDirectionTagged); ok { @@ -123,16 +127,17 @@ func (m *_BACnetEscalatorOperationDirectionTagged) GetLengthInBits(ctx context.C lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetEscalatorOperationDirectionTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetEscalatorOperationDirectionTaggedParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetEscalatorOperationDirectionTagged") } @@ -164,12 +169,12 @@ func BACnetEscalatorOperationDirectionTaggedParseWithBuffer(ctx context.Context, } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func BACnetEscalatorOperationDirectionTaggedParseWithBuffer(ctx context.Context, } var value BACnetEscalatorOperationDirection if _value != nil { - value = _value.(BACnetEscalatorOperationDirection) + value = _value.(BACnetEscalatorOperationDirection) } // Virtual field @@ -195,7 +200,7 @@ func BACnetEscalatorOperationDirectionTaggedParseWithBuffer(ctx context.Context, } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetEscalatorOperationDirectionTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func BACnetEscalatorOperationDirectionTaggedParseWithBuffer(ctx context.Context, // Create the instance return &_BACnetEscalatorOperationDirectionTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetEscalatorOperationDirectionTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_BACnetEscalatorOperationDirectionTagged) Serialize() ([]byte, error) { func (m *_BACnetEscalatorOperationDirectionTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetEscalatorOperationDirectionTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetEscalatorOperationDirectionTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetEscalatorOperationDirectionTagged") } @@ -261,6 +266,7 @@ func (m *_BACnetEscalatorOperationDirectionTagged) SerializeWithWriteBuffer(ctx return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_BACnetEscalatorOperationDirectionTagged) GetTagNumber() uint8 { func (m *_BACnetEscalatorOperationDirectionTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_BACnetEscalatorOperationDirectionTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventLogRecord.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventLogRecord.go index e62956f6377..4b9d18f8e89 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventLogRecord.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventLogRecord.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventLogRecord is the corresponding interface of BACnetEventLogRecord type BACnetEventLogRecord interface { @@ -46,10 +48,11 @@ type BACnetEventLogRecordExactly interface { // _BACnetEventLogRecord is the data-structure of this message type _BACnetEventLogRecord struct { - Timestamp BACnetDateTimeEnclosed - LogDatum BACnetEventLogRecordLogDatum + Timestamp BACnetDateTimeEnclosed + LogDatum BACnetEventLogRecordLogDatum } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -68,14 +71,15 @@ func (m *_BACnetEventLogRecord) GetLogDatum() BACnetEventLogRecordLogDatum { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventLogRecord factory function for _BACnetEventLogRecord -func NewBACnetEventLogRecord(timestamp BACnetDateTimeEnclosed, logDatum BACnetEventLogRecordLogDatum) *_BACnetEventLogRecord { - return &_BACnetEventLogRecord{Timestamp: timestamp, LogDatum: logDatum} +func NewBACnetEventLogRecord( timestamp BACnetDateTimeEnclosed , logDatum BACnetEventLogRecordLogDatum ) *_BACnetEventLogRecord { +return &_BACnetEventLogRecord{ Timestamp: timestamp , LogDatum: logDatum } } // Deprecated: use the interface for direct cast func CastBACnetEventLogRecord(structType interface{}) BACnetEventLogRecord { - if casted, ok := structType.(BACnetEventLogRecord); ok { + if casted, ok := structType.(BACnetEventLogRecord); ok { return casted } if casted, ok := structType.(*BACnetEventLogRecord); ok { @@ -100,6 +104,7 @@ func (m *_BACnetEventLogRecord) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetEventLogRecord) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -121,7 +126,7 @@ func BACnetEventLogRecordParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("timestamp"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timestamp") } - _timestamp, _timestampErr := BACnetDateTimeEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_timestamp, _timestampErr := BACnetDateTimeEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _timestampErr != nil { return nil, errors.Wrap(_timestampErr, "Error parsing 'timestamp' field of BACnetEventLogRecord") } @@ -134,7 +139,7 @@ func BACnetEventLogRecordParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("logDatum"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for logDatum") } - _logDatum, _logDatumErr := BACnetEventLogRecordLogDatumParseWithBuffer(ctx, readBuffer, uint8(uint8(1))) +_logDatum, _logDatumErr := BACnetEventLogRecordLogDatumParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) ) if _logDatumErr != nil { return nil, errors.Wrap(_logDatumErr, "Error parsing 'logDatum' field of BACnetEventLogRecord") } @@ -149,9 +154,9 @@ func BACnetEventLogRecordParseWithBuffer(ctx context.Context, readBuffer utils.R // Create the instance return &_BACnetEventLogRecord{ - Timestamp: timestamp, - LogDatum: logDatum, - }, nil + Timestamp: timestamp, + LogDatum: logDatum, + }, nil } func (m *_BACnetEventLogRecord) Serialize() ([]byte, error) { @@ -165,7 +170,7 @@ func (m *_BACnetEventLogRecord) Serialize() ([]byte, error) { func (m *_BACnetEventLogRecord) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetEventLogRecord"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetEventLogRecord"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetEventLogRecord") } @@ -199,6 +204,7 @@ func (m *_BACnetEventLogRecord) SerializeWithWriteBuffer(ctx context.Context, wr return nil } + func (m *_BACnetEventLogRecord) isBACnetEventLogRecord() bool { return true } @@ -213,3 +219,6 @@ func (m *_BACnetEventLogRecord) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventLogRecordLogDatum.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventLogRecordLogDatum.go index 6372e385289..10c3a90b62f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventLogRecordLogDatum.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventLogRecordLogDatum.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventLogRecordLogDatum is the corresponding interface of BACnetEventLogRecordLogDatum type BACnetEventLogRecordLogDatum interface { @@ -51,9 +53,9 @@ type BACnetEventLogRecordLogDatumExactly interface { // _BACnetEventLogRecordLogDatum is the data-structure of this message type _BACnetEventLogRecordLogDatum struct { _BACnetEventLogRecordLogDatumChildRequirements - OpeningTag BACnetOpeningTag - PeekedTagHeader BACnetTagHeader - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + PeekedTagHeader BACnetTagHeader + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 @@ -64,6 +66,7 @@ type _BACnetEventLogRecordLogDatumChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type BACnetEventLogRecordLogDatumParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetEventLogRecordLogDatum, serializeChildFunction func() error) error GetTypeName() string @@ -71,13 +74,12 @@ type BACnetEventLogRecordLogDatumParent interface { type BACnetEventLogRecordLogDatumChild interface { utils.Serializable - InitializeParent(parent BACnetEventLogRecordLogDatum, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) +InitializeParent(parent BACnetEventLogRecordLogDatum , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) GetParent() *BACnetEventLogRecordLogDatum GetTypeName() string BACnetEventLogRecordLogDatum } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -115,14 +117,15 @@ func (m *_BACnetEventLogRecordLogDatum) GetPeekedTagNumber() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventLogRecordLogDatum factory function for _BACnetEventLogRecordLogDatum -func NewBACnetEventLogRecordLogDatum(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetEventLogRecordLogDatum { - return &_BACnetEventLogRecordLogDatum{OpeningTag: openingTag, PeekedTagHeader: peekedTagHeader, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetEventLogRecordLogDatum( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetEventLogRecordLogDatum { +return &_BACnetEventLogRecordLogDatum{ OpeningTag: openingTag , PeekedTagHeader: peekedTagHeader , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetEventLogRecordLogDatum(structType interface{}) BACnetEventLogRecordLogDatum { - if casted, ok := structType.(BACnetEventLogRecordLogDatum); ok { + if casted, ok := structType.(BACnetEventLogRecordLogDatum); ok { return casted } if casted, ok := structType.(*BACnetEventLogRecordLogDatum); ok { @@ -135,6 +138,7 @@ func (m *_BACnetEventLogRecordLogDatum) GetTypeName() string { return "BACnetEventLogRecordLogDatum" } + func (m *_BACnetEventLogRecordLogDatum) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -170,7 +174,7 @@ func BACnetEventLogRecordLogDatumParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetEventLogRecordLogDatum") } @@ -179,13 +183,13 @@ func BACnetEventLogRecordLogDatumParseWithBuffer(ctx context.Context, readBuffer return nil, errors.Wrap(closeErr, "Error closing for openingTag") } - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Virtual field _peekedTagNumber := peekedTagHeader.GetActualTagNumber() @@ -195,18 +199,18 @@ func BACnetEventLogRecordLogDatumParseWithBuffer(ctx context.Context, readBuffer // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetEventLogRecordLogDatumChildSerializeRequirement interface { BACnetEventLogRecordLogDatum - InitializeParent(BACnetEventLogRecordLogDatum, BACnetOpeningTag, BACnetTagHeader, BACnetClosingTag) + InitializeParent(BACnetEventLogRecordLogDatum, BACnetOpeningTag, BACnetTagHeader, BACnetClosingTag) GetParent() BACnetEventLogRecordLogDatum } var _childTemp interface{} var _child BACnetEventLogRecordLogDatumChildSerializeRequirement var typeSwitchError error switch { - case peekedTagNumber == uint8(0): // BACnetEventLogRecordLogDatumLogStatus +case peekedTagNumber == uint8(0) : // BACnetEventLogRecordLogDatumLogStatus _childTemp, typeSwitchError = BACnetEventLogRecordLogDatumLogStatusParseWithBuffer(ctx, readBuffer, tagNumber) - case peekedTagNumber == uint8(1): // BACnetEventLogRecordLogDatumNotification +case peekedTagNumber == uint8(1) : // BACnetEventLogRecordLogDatumNotification _childTemp, typeSwitchError = BACnetEventLogRecordLogDatumNotificationParseWithBuffer(ctx, readBuffer, tagNumber) - case peekedTagNumber == uint8(2): // BACnetEventLogRecordLogDatumTimeChange +case peekedTagNumber == uint8(2) : // BACnetEventLogRecordLogDatumTimeChange _childTemp, typeSwitchError = BACnetEventLogRecordLogDatumTimeChangeParseWithBuffer(ctx, readBuffer, tagNumber) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedTagNumber=%v]", peekedTagNumber) @@ -220,7 +224,7 @@ func BACnetEventLogRecordLogDatumParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetEventLogRecordLogDatum") } @@ -234,7 +238,7 @@ func BACnetEventLogRecordLogDatumParseWithBuffer(ctx context.Context, readBuffer } // Finish initializing - _child.InitializeParent(_child, openingTag, peekedTagHeader, closingTag) +_child.InitializeParent(_child , openingTag , peekedTagHeader , closingTag ) return _child, nil } @@ -244,7 +248,7 @@ func (pm *_BACnetEventLogRecordLogDatum) SerializeParent(ctx context.Context, wr _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetEventLogRecordLogDatum"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetEventLogRecordLogDatum"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetEventLogRecordLogDatum") } @@ -287,13 +291,13 @@ func (pm *_BACnetEventLogRecordLogDatum) SerializeParent(ctx context.Context, wr return nil } + //// // Arguments Getter func (m *_BACnetEventLogRecordLogDatum) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -311,3 +315,6 @@ func (m *_BACnetEventLogRecordLogDatum) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventLogRecordLogDatumLogStatus.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventLogRecordLogDatumLogStatus.go index 88284c96539..aea44dcec30 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventLogRecordLogDatumLogStatus.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventLogRecordLogDatumLogStatus.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventLogRecordLogDatumLogStatus is the corresponding interface of BACnetEventLogRecordLogDatumLogStatus type BACnetEventLogRecordLogDatumLogStatus interface { @@ -46,9 +48,11 @@ type BACnetEventLogRecordLogDatumLogStatusExactly interface { // _BACnetEventLogRecordLogDatumLogStatus is the data-structure of this message type _BACnetEventLogRecordLogDatumLogStatus struct { *_BACnetEventLogRecordLogDatum - LogStatus BACnetLogStatusTagged + LogStatus BACnetLogStatusTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,16 +63,14 @@ type _BACnetEventLogRecordLogDatumLogStatus struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetEventLogRecordLogDatumLogStatus) InitializeParent(parent BACnetEventLogRecordLogDatum, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetEventLogRecordLogDatumLogStatus) InitializeParent(parent BACnetEventLogRecordLogDatum , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetEventLogRecordLogDatumLogStatus) GetParent() BACnetEventLogRecordLogDatum { +func (m *_BACnetEventLogRecordLogDatumLogStatus) GetParent() BACnetEventLogRecordLogDatum { return m._BACnetEventLogRecordLogDatum } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetEventLogRecordLogDatumLogStatus) GetLogStatus() BACnetLogStatusT /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventLogRecordLogDatumLogStatus factory function for _BACnetEventLogRecordLogDatumLogStatus -func NewBACnetEventLogRecordLogDatumLogStatus(logStatus BACnetLogStatusTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetEventLogRecordLogDatumLogStatus { +func NewBACnetEventLogRecordLogDatumLogStatus( logStatus BACnetLogStatusTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetEventLogRecordLogDatumLogStatus { _result := &_BACnetEventLogRecordLogDatumLogStatus{ - LogStatus: logStatus, - _BACnetEventLogRecordLogDatum: NewBACnetEventLogRecordLogDatum(openingTag, peekedTagHeader, closingTag, tagNumber), + LogStatus: logStatus, + _BACnetEventLogRecordLogDatum: NewBACnetEventLogRecordLogDatum(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetEventLogRecordLogDatum._BACnetEventLogRecordLogDatumChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetEventLogRecordLogDatumLogStatus(logStatus BACnetLogStatusTagged, o // Deprecated: use the interface for direct cast func CastBACnetEventLogRecordLogDatumLogStatus(structType interface{}) BACnetEventLogRecordLogDatumLogStatus { - if casted, ok := structType.(BACnetEventLogRecordLogDatumLogStatus); ok { + if casted, ok := structType.(BACnetEventLogRecordLogDatumLogStatus); ok { return casted } if casted, ok := structType.(*BACnetEventLogRecordLogDatumLogStatus); ok { @@ -117,6 +120,7 @@ func (m *_BACnetEventLogRecordLogDatumLogStatus) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetEventLogRecordLogDatumLogStatus) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetEventLogRecordLogDatumLogStatusParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("logStatus"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for logStatus") } - _logStatus, _logStatusErr := BACnetLogStatusTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_logStatus, _logStatusErr := BACnetLogStatusTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _logStatusErr != nil { return nil, errors.Wrap(_logStatusErr, "Error parsing 'logStatus' field of BACnetEventLogRecordLogDatumLogStatus") } @@ -178,17 +182,17 @@ func (m *_BACnetEventLogRecordLogDatumLogStatus) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for BACnetEventLogRecordLogDatumLogStatus") } - // Simple Field (logStatus) - if pushErr := writeBuffer.PushContext("logStatus"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for logStatus") - } - _logStatusErr := writeBuffer.WriteSerializable(ctx, m.GetLogStatus()) - if popErr := writeBuffer.PopContext("logStatus"); popErr != nil { - return errors.Wrap(popErr, "Error popping for logStatus") - } - if _logStatusErr != nil { - return errors.Wrap(_logStatusErr, "Error serializing 'logStatus' field") - } + // Simple Field (logStatus) + if pushErr := writeBuffer.PushContext("logStatus"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for logStatus") + } + _logStatusErr := writeBuffer.WriteSerializable(ctx, m.GetLogStatus()) + if popErr := writeBuffer.PopContext("logStatus"); popErr != nil { + return errors.Wrap(popErr, "Error popping for logStatus") + } + if _logStatusErr != nil { + return errors.Wrap(_logStatusErr, "Error serializing 'logStatus' field") + } if popErr := writeBuffer.PopContext("BACnetEventLogRecordLogDatumLogStatus"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetEventLogRecordLogDatumLogStatus") @@ -198,6 +202,7 @@ func (m *_BACnetEventLogRecordLogDatumLogStatus) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetEventLogRecordLogDatumLogStatus) isBACnetEventLogRecordLogDatumLogStatus() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetEventLogRecordLogDatumLogStatus) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventLogRecordLogDatumNotification.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventLogRecordLogDatumNotification.go index 5b7eeb11b0a..c4d00823eb2 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventLogRecordLogDatumNotification.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventLogRecordLogDatumNotification.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventLogRecordLogDatumNotification is the corresponding interface of BACnetEventLogRecordLogDatumNotification type BACnetEventLogRecordLogDatumNotification interface { @@ -50,11 +52,13 @@ type BACnetEventLogRecordLogDatumNotificationExactly interface { // _BACnetEventLogRecordLogDatumNotification is the data-structure of this message type _BACnetEventLogRecordLogDatumNotification struct { *_BACnetEventLogRecordLogDatum - InnerOpeningTag BACnetOpeningTag - Notification ConfirmedEventNotificationRequest - InnerClosingTag BACnetClosingTag + InnerOpeningTag BACnetOpeningTag + Notification ConfirmedEventNotificationRequest + InnerClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -65,16 +69,14 @@ type _BACnetEventLogRecordLogDatumNotification struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetEventLogRecordLogDatumNotification) InitializeParent(parent BACnetEventLogRecordLogDatum, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetEventLogRecordLogDatumNotification) InitializeParent(parent BACnetEventLogRecordLogDatum , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetEventLogRecordLogDatumNotification) GetParent() BACnetEventLogRecordLogDatum { +func (m *_BACnetEventLogRecordLogDatumNotification) GetParent() BACnetEventLogRecordLogDatum { return m._BACnetEventLogRecordLogDatum } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -97,13 +99,14 @@ func (m *_BACnetEventLogRecordLogDatumNotification) GetInnerClosingTag() BACnetC /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventLogRecordLogDatumNotification factory function for _BACnetEventLogRecordLogDatumNotification -func NewBACnetEventLogRecordLogDatumNotification(innerOpeningTag BACnetOpeningTag, notification ConfirmedEventNotificationRequest, innerClosingTag BACnetClosingTag, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetEventLogRecordLogDatumNotification { +func NewBACnetEventLogRecordLogDatumNotification( innerOpeningTag BACnetOpeningTag , notification ConfirmedEventNotificationRequest , innerClosingTag BACnetClosingTag , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetEventLogRecordLogDatumNotification { _result := &_BACnetEventLogRecordLogDatumNotification{ - InnerOpeningTag: innerOpeningTag, - Notification: notification, - InnerClosingTag: innerClosingTag, - _BACnetEventLogRecordLogDatum: NewBACnetEventLogRecordLogDatum(openingTag, peekedTagHeader, closingTag, tagNumber), + InnerOpeningTag: innerOpeningTag, + Notification: notification, + InnerClosingTag: innerClosingTag, + _BACnetEventLogRecordLogDatum: NewBACnetEventLogRecordLogDatum(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetEventLogRecordLogDatum._BACnetEventLogRecordLogDatumChildRequirements = _result return _result @@ -111,7 +114,7 @@ func NewBACnetEventLogRecordLogDatumNotification(innerOpeningTag BACnetOpeningTa // Deprecated: use the interface for direct cast func CastBACnetEventLogRecordLogDatumNotification(structType interface{}) BACnetEventLogRecordLogDatumNotification { - if casted, ok := structType.(BACnetEventLogRecordLogDatumNotification); ok { + if casted, ok := structType.(BACnetEventLogRecordLogDatumNotification); ok { return casted } if casted, ok := structType.(*BACnetEventLogRecordLogDatumNotification); ok { @@ -139,6 +142,7 @@ func (m *_BACnetEventLogRecordLogDatumNotification) GetLengthInBits(ctx context. return lengthInBits } + func (m *_BACnetEventLogRecordLogDatumNotification) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -160,7 +164,7 @@ func BACnetEventLogRecordLogDatumNotificationParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("innerOpeningTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerOpeningTag") } - _innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1))) +_innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) ) if _innerOpeningTagErr != nil { return nil, errors.Wrap(_innerOpeningTagErr, "Error parsing 'innerOpeningTag' field of BACnetEventLogRecordLogDatumNotification") } @@ -173,7 +177,7 @@ func BACnetEventLogRecordLogDatumNotificationParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("notification"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for notification") } - _notification, _notificationErr := ConfirmedEventNotificationRequestParseWithBuffer(ctx, readBuffer) +_notification, _notificationErr := ConfirmedEventNotificationRequestParseWithBuffer(ctx, readBuffer) if _notificationErr != nil { return nil, errors.Wrap(_notificationErr, "Error parsing 'notification' field of BACnetEventLogRecordLogDatumNotification") } @@ -186,7 +190,7 @@ func BACnetEventLogRecordLogDatumNotificationParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("innerClosingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerClosingTag") } - _innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _innerClosingTagErr != nil { return nil, errors.Wrap(_innerClosingTagErr, "Error parsing 'innerClosingTag' field of BACnetEventLogRecordLogDatumNotification") } @@ -205,7 +209,7 @@ func BACnetEventLogRecordLogDatumNotificationParseWithBuffer(ctx context.Context TagNumber: tagNumber, }, InnerOpeningTag: innerOpeningTag, - Notification: notification, + Notification: notification, InnerClosingTag: innerClosingTag, } _child._BACnetEventLogRecordLogDatum._BACnetEventLogRecordLogDatumChildRequirements = _child @@ -228,41 +232,41 @@ func (m *_BACnetEventLogRecordLogDatumNotification) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetEventLogRecordLogDatumNotification") } - // Simple Field (innerOpeningTag) - if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") - } - _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) - if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerOpeningTag") - } - if _innerOpeningTagErr != nil { - return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") - } + // Simple Field (innerOpeningTag) + if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") + } + _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) + if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerOpeningTag") + } + if _innerOpeningTagErr != nil { + return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") + } - // Simple Field (notification) - if pushErr := writeBuffer.PushContext("notification"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for notification") - } - _notificationErr := writeBuffer.WriteSerializable(ctx, m.GetNotification()) - if popErr := writeBuffer.PopContext("notification"); popErr != nil { - return errors.Wrap(popErr, "Error popping for notification") - } - if _notificationErr != nil { - return errors.Wrap(_notificationErr, "Error serializing 'notification' field") - } + // Simple Field (notification) + if pushErr := writeBuffer.PushContext("notification"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for notification") + } + _notificationErr := writeBuffer.WriteSerializable(ctx, m.GetNotification()) + if popErr := writeBuffer.PopContext("notification"); popErr != nil { + return errors.Wrap(popErr, "Error popping for notification") + } + if _notificationErr != nil { + return errors.Wrap(_notificationErr, "Error serializing 'notification' field") + } - // Simple Field (innerClosingTag) - if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerClosingTag") - } - _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) - if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerClosingTag") - } - if _innerClosingTagErr != nil { - return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") - } + // Simple Field (innerClosingTag) + if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerClosingTag") + } + _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) + if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerClosingTag") + } + if _innerClosingTagErr != nil { + return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") + } if popErr := writeBuffer.PopContext("BACnetEventLogRecordLogDatumNotification"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetEventLogRecordLogDatumNotification") @@ -272,6 +276,7 @@ func (m *_BACnetEventLogRecordLogDatumNotification) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetEventLogRecordLogDatumNotification) isBACnetEventLogRecordLogDatumNotification() bool { return true } @@ -286,3 +291,6 @@ func (m *_BACnetEventLogRecordLogDatumNotification) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventLogRecordLogDatumTimeChange.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventLogRecordLogDatumTimeChange.go index 11dd4b83c63..78bdb5c9026 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventLogRecordLogDatumTimeChange.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventLogRecordLogDatumTimeChange.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventLogRecordLogDatumTimeChange is the corresponding interface of BACnetEventLogRecordLogDatumTimeChange type BACnetEventLogRecordLogDatumTimeChange interface { @@ -46,9 +48,11 @@ type BACnetEventLogRecordLogDatumTimeChangeExactly interface { // _BACnetEventLogRecordLogDatumTimeChange is the data-structure of this message type _BACnetEventLogRecordLogDatumTimeChange struct { *_BACnetEventLogRecordLogDatum - TimeChange BACnetContextTagReal + TimeChange BACnetContextTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,16 +63,14 @@ type _BACnetEventLogRecordLogDatumTimeChange struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetEventLogRecordLogDatumTimeChange) InitializeParent(parent BACnetEventLogRecordLogDatum, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetEventLogRecordLogDatumTimeChange) InitializeParent(parent BACnetEventLogRecordLogDatum , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetEventLogRecordLogDatumTimeChange) GetParent() BACnetEventLogRecordLogDatum { +func (m *_BACnetEventLogRecordLogDatumTimeChange) GetParent() BACnetEventLogRecordLogDatum { return m._BACnetEventLogRecordLogDatum } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetEventLogRecordLogDatumTimeChange) GetTimeChange() BACnetContextT /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventLogRecordLogDatumTimeChange factory function for _BACnetEventLogRecordLogDatumTimeChange -func NewBACnetEventLogRecordLogDatumTimeChange(timeChange BACnetContextTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetEventLogRecordLogDatumTimeChange { +func NewBACnetEventLogRecordLogDatumTimeChange( timeChange BACnetContextTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetEventLogRecordLogDatumTimeChange { _result := &_BACnetEventLogRecordLogDatumTimeChange{ - TimeChange: timeChange, - _BACnetEventLogRecordLogDatum: NewBACnetEventLogRecordLogDatum(openingTag, peekedTagHeader, closingTag, tagNumber), + TimeChange: timeChange, + _BACnetEventLogRecordLogDatum: NewBACnetEventLogRecordLogDatum(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetEventLogRecordLogDatum._BACnetEventLogRecordLogDatumChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetEventLogRecordLogDatumTimeChange(timeChange BACnetContextTagReal, // Deprecated: use the interface for direct cast func CastBACnetEventLogRecordLogDatumTimeChange(structType interface{}) BACnetEventLogRecordLogDatumTimeChange { - if casted, ok := structType.(BACnetEventLogRecordLogDatumTimeChange); ok { + if casted, ok := structType.(BACnetEventLogRecordLogDatumTimeChange); ok { return casted } if casted, ok := structType.(*BACnetEventLogRecordLogDatumTimeChange); ok { @@ -117,6 +120,7 @@ func (m *_BACnetEventLogRecordLogDatumTimeChange) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetEventLogRecordLogDatumTimeChange) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetEventLogRecordLogDatumTimeChangeParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("timeChange"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeChange") } - _timeChange, _timeChangeErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), BACnetDataType(BACnetDataType_REAL)) +_timeChange, _timeChangeErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , BACnetDataType( BACnetDataType_REAL ) ) if _timeChangeErr != nil { return nil, errors.Wrap(_timeChangeErr, "Error parsing 'timeChange' field of BACnetEventLogRecordLogDatumTimeChange") } @@ -178,17 +182,17 @@ func (m *_BACnetEventLogRecordLogDatumTimeChange) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetEventLogRecordLogDatumTimeChange") } - // Simple Field (timeChange) - if pushErr := writeBuffer.PushContext("timeChange"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timeChange") - } - _timeChangeErr := writeBuffer.WriteSerializable(ctx, m.GetTimeChange()) - if popErr := writeBuffer.PopContext("timeChange"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timeChange") - } - if _timeChangeErr != nil { - return errors.Wrap(_timeChangeErr, "Error serializing 'timeChange' field") - } + // Simple Field (timeChange) + if pushErr := writeBuffer.PushContext("timeChange"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timeChange") + } + _timeChangeErr := writeBuffer.WriteSerializable(ctx, m.GetTimeChange()) + if popErr := writeBuffer.PopContext("timeChange"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timeChange") + } + if _timeChangeErr != nil { + return errors.Wrap(_timeChangeErr, "Error serializing 'timeChange' field") + } if popErr := writeBuffer.PopContext("BACnetEventLogRecordLogDatumTimeChange"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetEventLogRecordLogDatumTimeChange") @@ -198,6 +202,7 @@ func (m *_BACnetEventLogRecordLogDatumTimeChange) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetEventLogRecordLogDatumTimeChange) isBACnetEventLogRecordLogDatumTimeChange() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetEventLogRecordLogDatumTimeChange) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventNotificationSubscription.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventNotificationSubscription.go index 3ca75437cc9..9b1e2ef4615 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventNotificationSubscription.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventNotificationSubscription.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventNotificationSubscription is the corresponding interface of BACnetEventNotificationSubscription type BACnetEventNotificationSubscription interface { @@ -51,12 +53,13 @@ type BACnetEventNotificationSubscriptionExactly interface { // _BACnetEventNotificationSubscription is the data-structure of this message type _BACnetEventNotificationSubscription struct { - Recipient BACnetRecipientEnclosed - ProcessIdentifier BACnetContextTagUnsignedInteger - IssueConfirmedNotifications BACnetContextTagBoolean - TimeRemaining BACnetContextTagUnsignedInteger + Recipient BACnetRecipientEnclosed + ProcessIdentifier BACnetContextTagUnsignedInteger + IssueConfirmedNotifications BACnetContextTagBoolean + TimeRemaining BACnetContextTagUnsignedInteger } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,14 +86,15 @@ func (m *_BACnetEventNotificationSubscription) GetTimeRemaining() BACnetContextT /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventNotificationSubscription factory function for _BACnetEventNotificationSubscription -func NewBACnetEventNotificationSubscription(recipient BACnetRecipientEnclosed, processIdentifier BACnetContextTagUnsignedInteger, issueConfirmedNotifications BACnetContextTagBoolean, timeRemaining BACnetContextTagUnsignedInteger) *_BACnetEventNotificationSubscription { - return &_BACnetEventNotificationSubscription{Recipient: recipient, ProcessIdentifier: processIdentifier, IssueConfirmedNotifications: issueConfirmedNotifications, TimeRemaining: timeRemaining} +func NewBACnetEventNotificationSubscription( recipient BACnetRecipientEnclosed , processIdentifier BACnetContextTagUnsignedInteger , issueConfirmedNotifications BACnetContextTagBoolean , timeRemaining BACnetContextTagUnsignedInteger ) *_BACnetEventNotificationSubscription { +return &_BACnetEventNotificationSubscription{ Recipient: recipient , ProcessIdentifier: processIdentifier , IssueConfirmedNotifications: issueConfirmedNotifications , TimeRemaining: timeRemaining } } // Deprecated: use the interface for direct cast func CastBACnetEventNotificationSubscription(structType interface{}) BACnetEventNotificationSubscription { - if casted, ok := structType.(BACnetEventNotificationSubscription); ok { + if casted, ok := structType.(BACnetEventNotificationSubscription); ok { return casted } if casted, ok := structType.(*BACnetEventNotificationSubscription); ok { @@ -123,6 +127,7 @@ func (m *_BACnetEventNotificationSubscription) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetEventNotificationSubscription) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -144,7 +149,7 @@ func BACnetEventNotificationSubscriptionParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("recipient"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for recipient") } - _recipient, _recipientErr := BACnetRecipientEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_recipient, _recipientErr := BACnetRecipientEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _recipientErr != nil { return nil, errors.Wrap(_recipientErr, "Error parsing 'recipient' field of BACnetEventNotificationSubscription") } @@ -157,7 +162,7 @@ func BACnetEventNotificationSubscriptionParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("processIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for processIdentifier") } - _processIdentifier, _processIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_processIdentifier, _processIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _processIdentifierErr != nil { return nil, errors.Wrap(_processIdentifierErr, "Error parsing 'processIdentifier' field of BACnetEventNotificationSubscription") } @@ -168,12 +173,12 @@ func BACnetEventNotificationSubscriptionParseWithBuffer(ctx context.Context, rea // Optional Field (issueConfirmedNotifications) (Can be skipped, if a given expression evaluates to false) var issueConfirmedNotifications BACnetContextTagBoolean = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("issueConfirmedNotifications"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for issueConfirmedNotifications") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(2), BACnetDataType_BOOLEAN) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(2) , BACnetDataType_BOOLEAN ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -192,7 +197,7 @@ func BACnetEventNotificationSubscriptionParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("timeRemaining"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeRemaining") } - _timeRemaining, _timeRemainingErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(3)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_timeRemaining, _timeRemainingErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(3) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _timeRemainingErr != nil { return nil, errors.Wrap(_timeRemainingErr, "Error parsing 'timeRemaining' field of BACnetEventNotificationSubscription") } @@ -207,11 +212,11 @@ func BACnetEventNotificationSubscriptionParseWithBuffer(ctx context.Context, rea // Create the instance return &_BACnetEventNotificationSubscription{ - Recipient: recipient, - ProcessIdentifier: processIdentifier, - IssueConfirmedNotifications: issueConfirmedNotifications, - TimeRemaining: timeRemaining, - }, nil + Recipient: recipient, + ProcessIdentifier: processIdentifier, + IssueConfirmedNotifications: issueConfirmedNotifications, + TimeRemaining: timeRemaining, + }, nil } func (m *_BACnetEventNotificationSubscription) Serialize() ([]byte, error) { @@ -225,7 +230,7 @@ func (m *_BACnetEventNotificationSubscription) Serialize() ([]byte, error) { func (m *_BACnetEventNotificationSubscription) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetEventNotificationSubscription"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetEventNotificationSubscription"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetEventNotificationSubscription") } @@ -287,6 +292,7 @@ func (m *_BACnetEventNotificationSubscription) SerializeWithWriteBuffer(ctx cont return nil } + func (m *_BACnetEventNotificationSubscription) isBACnetEventNotificationSubscription() bool { return true } @@ -301,3 +307,6 @@ func (m *_BACnetEventNotificationSubscription) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameter.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameter.go index de33004ae09..0b9885ef3ae 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameter.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameter.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventParameter is the corresponding interface of BACnetEventParameter type BACnetEventParameter interface { @@ -47,7 +49,7 @@ type BACnetEventParameterExactly interface { // _BACnetEventParameter is the data-structure of this message type _BACnetEventParameter struct { _BACnetEventParameterChildRequirements - PeekedTagHeader BACnetTagHeader + PeekedTagHeader BACnetTagHeader } type _BACnetEventParameterChildRequirements interface { @@ -55,6 +57,7 @@ type _BACnetEventParameterChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type BACnetEventParameterParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetEventParameter, serializeChildFunction func() error) error GetTypeName() string @@ -62,13 +65,12 @@ type BACnetEventParameterParent interface { type BACnetEventParameterChild interface { utils.Serializable - InitializeParent(parent BACnetEventParameter, peekedTagHeader BACnetTagHeader) +InitializeParent(parent BACnetEventParameter , peekedTagHeader BACnetTagHeader ) GetParent() *BACnetEventParameter GetTypeName() string BACnetEventParameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,14 +100,15 @@ func (m *_BACnetEventParameter) GetPeekedTagNumber() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventParameter factory function for _BACnetEventParameter -func NewBACnetEventParameter(peekedTagHeader BACnetTagHeader) *_BACnetEventParameter { - return &_BACnetEventParameter{PeekedTagHeader: peekedTagHeader} +func NewBACnetEventParameter( peekedTagHeader BACnetTagHeader ) *_BACnetEventParameter { +return &_BACnetEventParameter{ PeekedTagHeader: peekedTagHeader } } // Deprecated: use the interface for direct cast func CastBACnetEventParameter(structType interface{}) BACnetEventParameter { - if casted, ok := structType.(BACnetEventParameter); ok { + if casted, ok := structType.(BACnetEventParameter); ok { return casted } if casted, ok := structType.(*BACnetEventParameter); ok { @@ -118,6 +121,7 @@ func (m *_BACnetEventParameter) GetTypeName() string { return "BACnetEventParameter" } + func (m *_BACnetEventParameter) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -143,13 +147,13 @@ func BACnetEventParameterParseWithBuffer(ctx context.Context, readBuffer utils.R currentPos := positionAware.GetPos() _ = currentPos - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Virtual field _peekedTagNumber := peekedTagHeader.GetActualTagNumber() @@ -159,51 +163,51 @@ func BACnetEventParameterParseWithBuffer(ctx context.Context, readBuffer utils.R // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetEventParameterChildSerializeRequirement interface { BACnetEventParameter - InitializeParent(BACnetEventParameter, BACnetTagHeader) + InitializeParent(BACnetEventParameter, BACnetTagHeader) GetParent() BACnetEventParameter } var _childTemp interface{} var _child BACnetEventParameterChildSerializeRequirement var typeSwitchError error switch { - case peekedTagNumber == uint8(0): // BACnetEventParameterChangeOfBitstring - _childTemp, typeSwitchError = BACnetEventParameterChangeOfBitstringParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(1): // BACnetEventParameterChangeOfState - _childTemp, typeSwitchError = BACnetEventParameterChangeOfStateParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(2): // BACnetEventParameterChangeOfValue - _childTemp, typeSwitchError = BACnetEventParameterChangeOfValueParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(3): // BACnetEventParameterCommandFailure - _childTemp, typeSwitchError = BACnetEventParameterCommandFailureParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(4): // BACnetEventParameterFloatingLimit - _childTemp, typeSwitchError = BACnetEventParameterFloatingLimitParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(5): // BACnetEventParameterOutOfRange - _childTemp, typeSwitchError = BACnetEventParameterOutOfRangeParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(8): // BACnetEventParameterChangeOfLifeSavety - _childTemp, typeSwitchError = BACnetEventParameterChangeOfLifeSavetyParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(9): // BACnetEventParameterExtended - _childTemp, typeSwitchError = BACnetEventParameterExtendedParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(10): // BACnetEventParameterBufferReady - _childTemp, typeSwitchError = BACnetEventParameterBufferReadyParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(11): // BACnetEventParameterUnsignedRange - _childTemp, typeSwitchError = BACnetEventParameterUnsignedRangeParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(13): // BACnetEventParameterAccessEvent - _childTemp, typeSwitchError = BACnetEventParameterAccessEventParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(14): // BACnetEventParameterDoubleOutOfRange - _childTemp, typeSwitchError = BACnetEventParameterDoubleOutOfRangeParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(15): // BACnetEventParameterSignedOutOfRange - _childTemp, typeSwitchError = BACnetEventParameterSignedOutOfRangeParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(16): // BACnetEventParameterUnsignedOutOfRange - _childTemp, typeSwitchError = BACnetEventParameterUnsignedOutOfRangeParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(17): // BACnetEventParameterChangeOfCharacterString - _childTemp, typeSwitchError = BACnetEventParameterChangeOfCharacterStringParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(18): // BACnetEventParameterChangeOfStatusFlags - _childTemp, typeSwitchError = BACnetEventParameterChangeOfStatusFlagsParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(20): // BACnetEventParameterNone - _childTemp, typeSwitchError = BACnetEventParameterNoneParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(21): // BACnetEventParameterChangeOfDiscreteValue - _childTemp, typeSwitchError = BACnetEventParameterChangeOfDiscreteValueParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(22): // BACnetEventParameterChangeOfTimer - _childTemp, typeSwitchError = BACnetEventParameterChangeOfTimerParseWithBuffer(ctx, readBuffer) +case peekedTagNumber == uint8(0) : // BACnetEventParameterChangeOfBitstring + _childTemp, typeSwitchError = BACnetEventParameterChangeOfBitstringParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(1) : // BACnetEventParameterChangeOfState + _childTemp, typeSwitchError = BACnetEventParameterChangeOfStateParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(2) : // BACnetEventParameterChangeOfValue + _childTemp, typeSwitchError = BACnetEventParameterChangeOfValueParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(3) : // BACnetEventParameterCommandFailure + _childTemp, typeSwitchError = BACnetEventParameterCommandFailureParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(4) : // BACnetEventParameterFloatingLimit + _childTemp, typeSwitchError = BACnetEventParameterFloatingLimitParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(5) : // BACnetEventParameterOutOfRange + _childTemp, typeSwitchError = BACnetEventParameterOutOfRangeParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(8) : // BACnetEventParameterChangeOfLifeSavety + _childTemp, typeSwitchError = BACnetEventParameterChangeOfLifeSavetyParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(9) : // BACnetEventParameterExtended + _childTemp, typeSwitchError = BACnetEventParameterExtendedParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(10) : // BACnetEventParameterBufferReady + _childTemp, typeSwitchError = BACnetEventParameterBufferReadyParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(11) : // BACnetEventParameterUnsignedRange + _childTemp, typeSwitchError = BACnetEventParameterUnsignedRangeParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(13) : // BACnetEventParameterAccessEvent + _childTemp, typeSwitchError = BACnetEventParameterAccessEventParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(14) : // BACnetEventParameterDoubleOutOfRange + _childTemp, typeSwitchError = BACnetEventParameterDoubleOutOfRangeParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(15) : // BACnetEventParameterSignedOutOfRange + _childTemp, typeSwitchError = BACnetEventParameterSignedOutOfRangeParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(16) : // BACnetEventParameterUnsignedOutOfRange + _childTemp, typeSwitchError = BACnetEventParameterUnsignedOutOfRangeParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(17) : // BACnetEventParameterChangeOfCharacterString + _childTemp, typeSwitchError = BACnetEventParameterChangeOfCharacterStringParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(18) : // BACnetEventParameterChangeOfStatusFlags + _childTemp, typeSwitchError = BACnetEventParameterChangeOfStatusFlagsParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(20) : // BACnetEventParameterNone + _childTemp, typeSwitchError = BACnetEventParameterNoneParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(21) : // BACnetEventParameterChangeOfDiscreteValue + _childTemp, typeSwitchError = BACnetEventParameterChangeOfDiscreteValueParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(22) : // BACnetEventParameterChangeOfTimer + _childTemp, typeSwitchError = BACnetEventParameterChangeOfTimerParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedTagNumber=%v]", peekedTagNumber) } @@ -217,7 +221,7 @@ func BACnetEventParameterParseWithBuffer(ctx context.Context, readBuffer utils.R } // Finish initializing - _child.InitializeParent(_child, peekedTagHeader) +_child.InitializeParent(_child , peekedTagHeader ) return _child, nil } @@ -227,7 +231,7 @@ func (pm *_BACnetEventParameter) SerializeParent(ctx context.Context, writeBuffe _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetEventParameter"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetEventParameter"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetEventParameter") } // Virtual field @@ -246,6 +250,7 @@ func (pm *_BACnetEventParameter) SerializeParent(ctx context.Context, writeBuffe return nil } + func (m *_BACnetEventParameter) isBACnetEventParameter() bool { return true } @@ -260,3 +265,6 @@ func (m *_BACnetEventParameter) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterAccessEvent.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterAccessEvent.go index b840756597d..872203f922f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterAccessEvent.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterAccessEvent.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventParameterAccessEvent is the corresponding interface of BACnetEventParameterAccessEvent type BACnetEventParameterAccessEvent interface { @@ -52,12 +54,14 @@ type BACnetEventParameterAccessEventExactly interface { // _BACnetEventParameterAccessEvent is the data-structure of this message type _BACnetEventParameterAccessEvent struct { *_BACnetEventParameter - OpeningTag BACnetOpeningTag - ListOfAccessEvents BACnetEventParameterAccessEventListOfAccessEvents - AccessEventTimeReference BACnetDeviceObjectPropertyReferenceEnclosed - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + ListOfAccessEvents BACnetEventParameterAccessEventListOfAccessEvents + AccessEventTimeReference BACnetDeviceObjectPropertyReferenceEnclosed + ClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -68,14 +72,12 @@ type _BACnetEventParameterAccessEvent struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetEventParameterAccessEvent) InitializeParent(parent BACnetEventParameter, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetEventParameterAccessEvent) InitializeParent(parent BACnetEventParameter , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetEventParameterAccessEvent) GetParent() BACnetEventParameter { +func (m *_BACnetEventParameterAccessEvent) GetParent() BACnetEventParameter { return m._BACnetEventParameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -102,14 +104,15 @@ func (m *_BACnetEventParameterAccessEvent) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventParameterAccessEvent factory function for _BACnetEventParameterAccessEvent -func NewBACnetEventParameterAccessEvent(openingTag BACnetOpeningTag, listOfAccessEvents BACnetEventParameterAccessEventListOfAccessEvents, accessEventTimeReference BACnetDeviceObjectPropertyReferenceEnclosed, closingTag BACnetClosingTag, peekedTagHeader BACnetTagHeader) *_BACnetEventParameterAccessEvent { +func NewBACnetEventParameterAccessEvent( openingTag BACnetOpeningTag , listOfAccessEvents BACnetEventParameterAccessEventListOfAccessEvents , accessEventTimeReference BACnetDeviceObjectPropertyReferenceEnclosed , closingTag BACnetClosingTag , peekedTagHeader BACnetTagHeader ) *_BACnetEventParameterAccessEvent { _result := &_BACnetEventParameterAccessEvent{ - OpeningTag: openingTag, - ListOfAccessEvents: listOfAccessEvents, + OpeningTag: openingTag, + ListOfAccessEvents: listOfAccessEvents, AccessEventTimeReference: accessEventTimeReference, - ClosingTag: closingTag, - _BACnetEventParameter: NewBACnetEventParameter(peekedTagHeader), + ClosingTag: closingTag, + _BACnetEventParameter: NewBACnetEventParameter(peekedTagHeader), } _result._BACnetEventParameter._BACnetEventParameterChildRequirements = _result return _result @@ -117,7 +120,7 @@ func NewBACnetEventParameterAccessEvent(openingTag BACnetOpeningTag, listOfAcces // Deprecated: use the interface for direct cast func CastBACnetEventParameterAccessEvent(structType interface{}) BACnetEventParameterAccessEvent { - if casted, ok := structType.(BACnetEventParameterAccessEvent); ok { + if casted, ok := structType.(BACnetEventParameterAccessEvent); ok { return casted } if casted, ok := structType.(*BACnetEventParameterAccessEvent); ok { @@ -148,6 +151,7 @@ func (m *_BACnetEventParameterAccessEvent) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetEventParameterAccessEvent) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -169,7 +173,7 @@ func BACnetEventParameterAccessEventParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(uint8(13))) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( uint8(13) ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetEventParameterAccessEvent") } @@ -182,7 +186,7 @@ func BACnetEventParameterAccessEventParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("listOfAccessEvents"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for listOfAccessEvents") } - _listOfAccessEvents, _listOfAccessEventsErr := BACnetEventParameterAccessEventListOfAccessEventsParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_listOfAccessEvents, _listOfAccessEventsErr := BACnetEventParameterAccessEventListOfAccessEventsParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _listOfAccessEventsErr != nil { return nil, errors.Wrap(_listOfAccessEventsErr, "Error parsing 'listOfAccessEvents' field of BACnetEventParameterAccessEvent") } @@ -195,7 +199,7 @@ func BACnetEventParameterAccessEventParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("accessEventTimeReference"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for accessEventTimeReference") } - _accessEventTimeReference, _accessEventTimeReferenceErr := BACnetDeviceObjectPropertyReferenceEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(1))) +_accessEventTimeReference, _accessEventTimeReferenceErr := BACnetDeviceObjectPropertyReferenceEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) ) if _accessEventTimeReferenceErr != nil { return nil, errors.Wrap(_accessEventTimeReferenceErr, "Error parsing 'accessEventTimeReference' field of BACnetEventParameterAccessEvent") } @@ -208,7 +212,7 @@ func BACnetEventParameterAccessEventParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(uint8(13))) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( uint8(13) ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetEventParameterAccessEvent") } @@ -223,11 +227,12 @@ func BACnetEventParameterAccessEventParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetEventParameterAccessEvent{ - _BACnetEventParameter: &_BACnetEventParameter{}, - OpeningTag: openingTag, - ListOfAccessEvents: listOfAccessEvents, + _BACnetEventParameter: &_BACnetEventParameter{ + }, + OpeningTag: openingTag, + ListOfAccessEvents: listOfAccessEvents, AccessEventTimeReference: accessEventTimeReference, - ClosingTag: closingTag, + ClosingTag: closingTag, } _child._BACnetEventParameter._BACnetEventParameterChildRequirements = _child return _child, nil @@ -249,53 +254,53 @@ func (m *_BACnetEventParameterAccessEvent) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetEventParameterAccessEvent") } - // Simple Field (openingTag) - if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for openingTag") - } - _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) - if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for openingTag") - } - if _openingTagErr != nil { - return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") - } + // Simple Field (openingTag) + if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for openingTag") + } + _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) + if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for openingTag") + } + if _openingTagErr != nil { + return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") + } - // Simple Field (listOfAccessEvents) - if pushErr := writeBuffer.PushContext("listOfAccessEvents"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for listOfAccessEvents") - } - _listOfAccessEventsErr := writeBuffer.WriteSerializable(ctx, m.GetListOfAccessEvents()) - if popErr := writeBuffer.PopContext("listOfAccessEvents"); popErr != nil { - return errors.Wrap(popErr, "Error popping for listOfAccessEvents") - } - if _listOfAccessEventsErr != nil { - return errors.Wrap(_listOfAccessEventsErr, "Error serializing 'listOfAccessEvents' field") - } + // Simple Field (listOfAccessEvents) + if pushErr := writeBuffer.PushContext("listOfAccessEvents"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for listOfAccessEvents") + } + _listOfAccessEventsErr := writeBuffer.WriteSerializable(ctx, m.GetListOfAccessEvents()) + if popErr := writeBuffer.PopContext("listOfAccessEvents"); popErr != nil { + return errors.Wrap(popErr, "Error popping for listOfAccessEvents") + } + if _listOfAccessEventsErr != nil { + return errors.Wrap(_listOfAccessEventsErr, "Error serializing 'listOfAccessEvents' field") + } - // Simple Field (accessEventTimeReference) - if pushErr := writeBuffer.PushContext("accessEventTimeReference"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for accessEventTimeReference") - } - _accessEventTimeReferenceErr := writeBuffer.WriteSerializable(ctx, m.GetAccessEventTimeReference()) - if popErr := writeBuffer.PopContext("accessEventTimeReference"); popErr != nil { - return errors.Wrap(popErr, "Error popping for accessEventTimeReference") - } - if _accessEventTimeReferenceErr != nil { - return errors.Wrap(_accessEventTimeReferenceErr, "Error serializing 'accessEventTimeReference' field") - } + // Simple Field (accessEventTimeReference) + if pushErr := writeBuffer.PushContext("accessEventTimeReference"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for accessEventTimeReference") + } + _accessEventTimeReferenceErr := writeBuffer.WriteSerializable(ctx, m.GetAccessEventTimeReference()) + if popErr := writeBuffer.PopContext("accessEventTimeReference"); popErr != nil { + return errors.Wrap(popErr, "Error popping for accessEventTimeReference") + } + if _accessEventTimeReferenceErr != nil { + return errors.Wrap(_accessEventTimeReferenceErr, "Error serializing 'accessEventTimeReference' field") + } - // Simple Field (closingTag) - if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for closingTag") - } - _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) - if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for closingTag") - } - if _closingTagErr != nil { - return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") - } + // Simple Field (closingTag) + if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for closingTag") + } + _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) + if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for closingTag") + } + if _closingTagErr != nil { + return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") + } if popErr := writeBuffer.PopContext("BACnetEventParameterAccessEvent"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetEventParameterAccessEvent") @@ -305,6 +310,7 @@ func (m *_BACnetEventParameterAccessEvent) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetEventParameterAccessEvent) isBACnetEventParameterAccessEvent() bool { return true } @@ -319,3 +325,6 @@ func (m *_BACnetEventParameterAccessEvent) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterAccessEventListOfAccessEvents.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterAccessEventListOfAccessEvents.go index 879723ffd71..5fa147bc9c8 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterAccessEventListOfAccessEvents.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterAccessEventListOfAccessEvents.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventParameterAccessEventListOfAccessEvents is the corresponding interface of BACnetEventParameterAccessEventListOfAccessEvents type BACnetEventParameterAccessEventListOfAccessEvents interface { @@ -49,14 +51,15 @@ type BACnetEventParameterAccessEventListOfAccessEventsExactly interface { // _BACnetEventParameterAccessEventListOfAccessEvents is the data-structure of this message type _BACnetEventParameterAccessEventListOfAccessEvents struct { - OpeningTag BACnetOpeningTag - ListOfAccessEvents []BACnetDeviceObjectPropertyReference - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + ListOfAccessEvents []BACnetDeviceObjectPropertyReference + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -79,14 +82,15 @@ func (m *_BACnetEventParameterAccessEventListOfAccessEvents) GetClosingTag() BAC /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventParameterAccessEventListOfAccessEvents factory function for _BACnetEventParameterAccessEventListOfAccessEvents -func NewBACnetEventParameterAccessEventListOfAccessEvents(openingTag BACnetOpeningTag, listOfAccessEvents []BACnetDeviceObjectPropertyReference, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetEventParameterAccessEventListOfAccessEvents { - return &_BACnetEventParameterAccessEventListOfAccessEvents{OpeningTag: openingTag, ListOfAccessEvents: listOfAccessEvents, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetEventParameterAccessEventListOfAccessEvents( openingTag BACnetOpeningTag , listOfAccessEvents []BACnetDeviceObjectPropertyReference , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetEventParameterAccessEventListOfAccessEvents { +return &_BACnetEventParameterAccessEventListOfAccessEvents{ OpeningTag: openingTag , ListOfAccessEvents: listOfAccessEvents , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetEventParameterAccessEventListOfAccessEvents(structType interface{}) BACnetEventParameterAccessEventListOfAccessEvents { - if casted, ok := structType.(BACnetEventParameterAccessEventListOfAccessEvents); ok { + if casted, ok := structType.(BACnetEventParameterAccessEventListOfAccessEvents); ok { return casted } if casted, ok := structType.(*BACnetEventParameterAccessEventListOfAccessEvents); ok { @@ -118,6 +122,7 @@ func (m *_BACnetEventParameterAccessEventListOfAccessEvents) GetLengthInBits(ctx return lengthInBits } + func (m *_BACnetEventParameterAccessEventListOfAccessEvents) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +144,7 @@ func BACnetEventParameterAccessEventListOfAccessEventsParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetEventParameterAccessEventListOfAccessEvents") } @@ -155,8 +160,8 @@ func BACnetEventParameterAccessEventListOfAccessEventsParseWithBuffer(ctx contex // Terminated array var listOfAccessEvents []BACnetDeviceObjectPropertyReference { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetDeviceObjectPropertyReferenceParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetDeviceObjectPropertyReferenceParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'listOfAccessEvents' field of BACnetEventParameterAccessEventListOfAccessEvents") } @@ -171,7 +176,7 @@ func BACnetEventParameterAccessEventListOfAccessEventsParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetEventParameterAccessEventListOfAccessEvents") } @@ -186,11 +191,11 @@ func BACnetEventParameterAccessEventListOfAccessEventsParseWithBuffer(ctx contex // Create the instance return &_BACnetEventParameterAccessEventListOfAccessEvents{ - TagNumber: tagNumber, - OpeningTag: openingTag, - ListOfAccessEvents: listOfAccessEvents, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + ListOfAccessEvents: listOfAccessEvents, + ClosingTag: closingTag, + }, nil } func (m *_BACnetEventParameterAccessEventListOfAccessEvents) Serialize() ([]byte, error) { @@ -204,7 +209,7 @@ func (m *_BACnetEventParameterAccessEventListOfAccessEvents) Serialize() ([]byte func (m *_BACnetEventParameterAccessEventListOfAccessEvents) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetEventParameterAccessEventListOfAccessEvents"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetEventParameterAccessEventListOfAccessEvents"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetEventParameterAccessEventListOfAccessEvents") } @@ -255,13 +260,13 @@ func (m *_BACnetEventParameterAccessEventListOfAccessEvents) SerializeWithWriteB return nil } + //// // Arguments Getter func (m *_BACnetEventParameterAccessEventListOfAccessEvents) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -279,3 +284,6 @@ func (m *_BACnetEventParameterAccessEventListOfAccessEvents) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterBufferReady.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterBufferReady.go index 0789cc30e69..f4677f61d7f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterBufferReady.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterBufferReady.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventParameterBufferReady is the corresponding interface of BACnetEventParameterBufferReady type BACnetEventParameterBufferReady interface { @@ -52,12 +54,14 @@ type BACnetEventParameterBufferReadyExactly interface { // _BACnetEventParameterBufferReady is the data-structure of this message type _BACnetEventParameterBufferReady struct { *_BACnetEventParameter - OpeningTag BACnetOpeningTag - NotificationThreshold BACnetContextTagUnsignedInteger - PreviousNotificationCount BACnetContextTagUnsignedInteger - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + NotificationThreshold BACnetContextTagUnsignedInteger + PreviousNotificationCount BACnetContextTagUnsignedInteger + ClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -68,14 +72,12 @@ type _BACnetEventParameterBufferReady struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetEventParameterBufferReady) InitializeParent(parent BACnetEventParameter, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetEventParameterBufferReady) InitializeParent(parent BACnetEventParameter , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetEventParameterBufferReady) GetParent() BACnetEventParameter { +func (m *_BACnetEventParameterBufferReady) GetParent() BACnetEventParameter { return m._BACnetEventParameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -102,14 +104,15 @@ func (m *_BACnetEventParameterBufferReady) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventParameterBufferReady factory function for _BACnetEventParameterBufferReady -func NewBACnetEventParameterBufferReady(openingTag BACnetOpeningTag, notificationThreshold BACnetContextTagUnsignedInteger, previousNotificationCount BACnetContextTagUnsignedInteger, closingTag BACnetClosingTag, peekedTagHeader BACnetTagHeader) *_BACnetEventParameterBufferReady { +func NewBACnetEventParameterBufferReady( openingTag BACnetOpeningTag , notificationThreshold BACnetContextTagUnsignedInteger , previousNotificationCount BACnetContextTagUnsignedInteger , closingTag BACnetClosingTag , peekedTagHeader BACnetTagHeader ) *_BACnetEventParameterBufferReady { _result := &_BACnetEventParameterBufferReady{ - OpeningTag: openingTag, - NotificationThreshold: notificationThreshold, + OpeningTag: openingTag, + NotificationThreshold: notificationThreshold, PreviousNotificationCount: previousNotificationCount, - ClosingTag: closingTag, - _BACnetEventParameter: NewBACnetEventParameter(peekedTagHeader), + ClosingTag: closingTag, + _BACnetEventParameter: NewBACnetEventParameter(peekedTagHeader), } _result._BACnetEventParameter._BACnetEventParameterChildRequirements = _result return _result @@ -117,7 +120,7 @@ func NewBACnetEventParameterBufferReady(openingTag BACnetOpeningTag, notificatio // Deprecated: use the interface for direct cast func CastBACnetEventParameterBufferReady(structType interface{}) BACnetEventParameterBufferReady { - if casted, ok := structType.(BACnetEventParameterBufferReady); ok { + if casted, ok := structType.(BACnetEventParameterBufferReady); ok { return casted } if casted, ok := structType.(*BACnetEventParameterBufferReady); ok { @@ -148,6 +151,7 @@ func (m *_BACnetEventParameterBufferReady) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetEventParameterBufferReady) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -169,7 +173,7 @@ func BACnetEventParameterBufferReadyParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(uint8(10))) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( uint8(10) ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetEventParameterBufferReady") } @@ -182,7 +186,7 @@ func BACnetEventParameterBufferReadyParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("notificationThreshold"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for notificationThreshold") } - _notificationThreshold, _notificationThresholdErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_notificationThreshold, _notificationThresholdErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _notificationThresholdErr != nil { return nil, errors.Wrap(_notificationThresholdErr, "Error parsing 'notificationThreshold' field of BACnetEventParameterBufferReady") } @@ -195,7 +199,7 @@ func BACnetEventParameterBufferReadyParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("previousNotificationCount"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for previousNotificationCount") } - _previousNotificationCount, _previousNotificationCountErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_previousNotificationCount, _previousNotificationCountErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _previousNotificationCountErr != nil { return nil, errors.Wrap(_previousNotificationCountErr, "Error parsing 'previousNotificationCount' field of BACnetEventParameterBufferReady") } @@ -208,7 +212,7 @@ func BACnetEventParameterBufferReadyParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(uint8(10))) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( uint8(10) ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetEventParameterBufferReady") } @@ -223,11 +227,12 @@ func BACnetEventParameterBufferReadyParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetEventParameterBufferReady{ - _BACnetEventParameter: &_BACnetEventParameter{}, - OpeningTag: openingTag, - NotificationThreshold: notificationThreshold, + _BACnetEventParameter: &_BACnetEventParameter{ + }, + OpeningTag: openingTag, + NotificationThreshold: notificationThreshold, PreviousNotificationCount: previousNotificationCount, - ClosingTag: closingTag, + ClosingTag: closingTag, } _child._BACnetEventParameter._BACnetEventParameterChildRequirements = _child return _child, nil @@ -249,53 +254,53 @@ func (m *_BACnetEventParameterBufferReady) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetEventParameterBufferReady") } - // Simple Field (openingTag) - if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for openingTag") - } - _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) - if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for openingTag") - } - if _openingTagErr != nil { - return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") - } + // Simple Field (openingTag) + if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for openingTag") + } + _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) + if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for openingTag") + } + if _openingTagErr != nil { + return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") + } - // Simple Field (notificationThreshold) - if pushErr := writeBuffer.PushContext("notificationThreshold"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for notificationThreshold") - } - _notificationThresholdErr := writeBuffer.WriteSerializable(ctx, m.GetNotificationThreshold()) - if popErr := writeBuffer.PopContext("notificationThreshold"); popErr != nil { - return errors.Wrap(popErr, "Error popping for notificationThreshold") - } - if _notificationThresholdErr != nil { - return errors.Wrap(_notificationThresholdErr, "Error serializing 'notificationThreshold' field") - } + // Simple Field (notificationThreshold) + if pushErr := writeBuffer.PushContext("notificationThreshold"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for notificationThreshold") + } + _notificationThresholdErr := writeBuffer.WriteSerializable(ctx, m.GetNotificationThreshold()) + if popErr := writeBuffer.PopContext("notificationThreshold"); popErr != nil { + return errors.Wrap(popErr, "Error popping for notificationThreshold") + } + if _notificationThresholdErr != nil { + return errors.Wrap(_notificationThresholdErr, "Error serializing 'notificationThreshold' field") + } - // Simple Field (previousNotificationCount) - if pushErr := writeBuffer.PushContext("previousNotificationCount"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for previousNotificationCount") - } - _previousNotificationCountErr := writeBuffer.WriteSerializable(ctx, m.GetPreviousNotificationCount()) - if popErr := writeBuffer.PopContext("previousNotificationCount"); popErr != nil { - return errors.Wrap(popErr, "Error popping for previousNotificationCount") - } - if _previousNotificationCountErr != nil { - return errors.Wrap(_previousNotificationCountErr, "Error serializing 'previousNotificationCount' field") - } + // Simple Field (previousNotificationCount) + if pushErr := writeBuffer.PushContext("previousNotificationCount"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for previousNotificationCount") + } + _previousNotificationCountErr := writeBuffer.WriteSerializable(ctx, m.GetPreviousNotificationCount()) + if popErr := writeBuffer.PopContext("previousNotificationCount"); popErr != nil { + return errors.Wrap(popErr, "Error popping for previousNotificationCount") + } + if _previousNotificationCountErr != nil { + return errors.Wrap(_previousNotificationCountErr, "Error serializing 'previousNotificationCount' field") + } - // Simple Field (closingTag) - if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for closingTag") - } - _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) - if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for closingTag") - } - if _closingTagErr != nil { - return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") - } + // Simple Field (closingTag) + if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for closingTag") + } + _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) + if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for closingTag") + } + if _closingTagErr != nil { + return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") + } if popErr := writeBuffer.PopContext("BACnetEventParameterBufferReady"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetEventParameterBufferReady") @@ -305,6 +310,7 @@ func (m *_BACnetEventParameterBufferReady) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetEventParameterBufferReady) isBACnetEventParameterBufferReady() bool { return true } @@ -319,3 +325,6 @@ func (m *_BACnetEventParameterBufferReady) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfBitstring.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfBitstring.go index a79c235024b..1370e4619fa 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfBitstring.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfBitstring.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventParameterChangeOfBitstring is the corresponding interface of BACnetEventParameterChangeOfBitstring type BACnetEventParameterChangeOfBitstring interface { @@ -54,13 +56,15 @@ type BACnetEventParameterChangeOfBitstringExactly interface { // _BACnetEventParameterChangeOfBitstring is the data-structure of this message type _BACnetEventParameterChangeOfBitstring struct { *_BACnetEventParameter - OpeningTag BACnetOpeningTag - TimeDelay BACnetContextTagUnsignedInteger - Bitmask BACnetContextTagBitString - ListOfBitstringValues BACnetEventParameterChangeOfBitstringListOfBitstringValues - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + TimeDelay BACnetContextTagUnsignedInteger + Bitmask BACnetContextTagBitString + ListOfBitstringValues BACnetEventParameterChangeOfBitstringListOfBitstringValues + ClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -71,14 +75,12 @@ type _BACnetEventParameterChangeOfBitstring struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetEventParameterChangeOfBitstring) InitializeParent(parent BACnetEventParameter, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetEventParameterChangeOfBitstring) InitializeParent(parent BACnetEventParameter , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetEventParameterChangeOfBitstring) GetParent() BACnetEventParameter { +func (m *_BACnetEventParameterChangeOfBitstring) GetParent() BACnetEventParameter { return m._BACnetEventParameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -109,15 +111,16 @@ func (m *_BACnetEventParameterChangeOfBitstring) GetClosingTag() BACnetClosingTa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventParameterChangeOfBitstring factory function for _BACnetEventParameterChangeOfBitstring -func NewBACnetEventParameterChangeOfBitstring(openingTag BACnetOpeningTag, timeDelay BACnetContextTagUnsignedInteger, bitmask BACnetContextTagBitString, listOfBitstringValues BACnetEventParameterChangeOfBitstringListOfBitstringValues, closingTag BACnetClosingTag, peekedTagHeader BACnetTagHeader) *_BACnetEventParameterChangeOfBitstring { +func NewBACnetEventParameterChangeOfBitstring( openingTag BACnetOpeningTag , timeDelay BACnetContextTagUnsignedInteger , bitmask BACnetContextTagBitString , listOfBitstringValues BACnetEventParameterChangeOfBitstringListOfBitstringValues , closingTag BACnetClosingTag , peekedTagHeader BACnetTagHeader ) *_BACnetEventParameterChangeOfBitstring { _result := &_BACnetEventParameterChangeOfBitstring{ - OpeningTag: openingTag, - TimeDelay: timeDelay, - Bitmask: bitmask, + OpeningTag: openingTag, + TimeDelay: timeDelay, + Bitmask: bitmask, ListOfBitstringValues: listOfBitstringValues, - ClosingTag: closingTag, - _BACnetEventParameter: NewBACnetEventParameter(peekedTagHeader), + ClosingTag: closingTag, + _BACnetEventParameter: NewBACnetEventParameter(peekedTagHeader), } _result._BACnetEventParameter._BACnetEventParameterChildRequirements = _result return _result @@ -125,7 +128,7 @@ func NewBACnetEventParameterChangeOfBitstring(openingTag BACnetOpeningTag, timeD // Deprecated: use the interface for direct cast func CastBACnetEventParameterChangeOfBitstring(structType interface{}) BACnetEventParameterChangeOfBitstring { - if casted, ok := structType.(BACnetEventParameterChangeOfBitstring); ok { + if casted, ok := structType.(BACnetEventParameterChangeOfBitstring); ok { return casted } if casted, ok := structType.(*BACnetEventParameterChangeOfBitstring); ok { @@ -159,6 +162,7 @@ func (m *_BACnetEventParameterChangeOfBitstring) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetEventParameterChangeOfBitstring) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -180,7 +184,7 @@ func BACnetEventParameterChangeOfBitstringParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetEventParameterChangeOfBitstring") } @@ -193,7 +197,7 @@ func BACnetEventParameterChangeOfBitstringParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("timeDelay"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeDelay") } - _timeDelay, _timeDelayErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_timeDelay, _timeDelayErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _timeDelayErr != nil { return nil, errors.Wrap(_timeDelayErr, "Error parsing 'timeDelay' field of BACnetEventParameterChangeOfBitstring") } @@ -206,7 +210,7 @@ func BACnetEventParameterChangeOfBitstringParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("bitmask"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for bitmask") } - _bitmask, _bitmaskErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_BIT_STRING)) +_bitmask, _bitmaskErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_BIT_STRING ) ) if _bitmaskErr != nil { return nil, errors.Wrap(_bitmaskErr, "Error parsing 'bitmask' field of BACnetEventParameterChangeOfBitstring") } @@ -219,7 +223,7 @@ func BACnetEventParameterChangeOfBitstringParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("listOfBitstringValues"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for listOfBitstringValues") } - _listOfBitstringValues, _listOfBitstringValuesErr := BACnetEventParameterChangeOfBitstringListOfBitstringValuesParseWithBuffer(ctx, readBuffer, uint8(uint8(2))) +_listOfBitstringValues, _listOfBitstringValuesErr := BACnetEventParameterChangeOfBitstringListOfBitstringValuesParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) ) if _listOfBitstringValuesErr != nil { return nil, errors.Wrap(_listOfBitstringValuesErr, "Error parsing 'listOfBitstringValues' field of BACnetEventParameterChangeOfBitstring") } @@ -232,7 +236,7 @@ func BACnetEventParameterChangeOfBitstringParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetEventParameterChangeOfBitstring") } @@ -247,12 +251,13 @@ func BACnetEventParameterChangeOfBitstringParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_BACnetEventParameterChangeOfBitstring{ - _BACnetEventParameter: &_BACnetEventParameter{}, - OpeningTag: openingTag, - TimeDelay: timeDelay, - Bitmask: bitmask, + _BACnetEventParameter: &_BACnetEventParameter{ + }, + OpeningTag: openingTag, + TimeDelay: timeDelay, + Bitmask: bitmask, ListOfBitstringValues: listOfBitstringValues, - ClosingTag: closingTag, + ClosingTag: closingTag, } _child._BACnetEventParameter._BACnetEventParameterChildRequirements = _child return _child, nil @@ -274,65 +279,65 @@ func (m *_BACnetEventParameterChangeOfBitstring) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for BACnetEventParameterChangeOfBitstring") } - // Simple Field (openingTag) - if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for openingTag") - } - _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) - if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for openingTag") - } - if _openingTagErr != nil { - return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") - } + // Simple Field (openingTag) + if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for openingTag") + } + _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) + if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for openingTag") + } + if _openingTagErr != nil { + return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") + } - // Simple Field (timeDelay) - if pushErr := writeBuffer.PushContext("timeDelay"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timeDelay") - } - _timeDelayErr := writeBuffer.WriteSerializable(ctx, m.GetTimeDelay()) - if popErr := writeBuffer.PopContext("timeDelay"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timeDelay") - } - if _timeDelayErr != nil { - return errors.Wrap(_timeDelayErr, "Error serializing 'timeDelay' field") - } + // Simple Field (timeDelay) + if pushErr := writeBuffer.PushContext("timeDelay"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timeDelay") + } + _timeDelayErr := writeBuffer.WriteSerializable(ctx, m.GetTimeDelay()) + if popErr := writeBuffer.PopContext("timeDelay"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timeDelay") + } + if _timeDelayErr != nil { + return errors.Wrap(_timeDelayErr, "Error serializing 'timeDelay' field") + } - // Simple Field (bitmask) - if pushErr := writeBuffer.PushContext("bitmask"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for bitmask") - } - _bitmaskErr := writeBuffer.WriteSerializable(ctx, m.GetBitmask()) - if popErr := writeBuffer.PopContext("bitmask"); popErr != nil { - return errors.Wrap(popErr, "Error popping for bitmask") - } - if _bitmaskErr != nil { - return errors.Wrap(_bitmaskErr, "Error serializing 'bitmask' field") - } + // Simple Field (bitmask) + if pushErr := writeBuffer.PushContext("bitmask"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for bitmask") + } + _bitmaskErr := writeBuffer.WriteSerializable(ctx, m.GetBitmask()) + if popErr := writeBuffer.PopContext("bitmask"); popErr != nil { + return errors.Wrap(popErr, "Error popping for bitmask") + } + if _bitmaskErr != nil { + return errors.Wrap(_bitmaskErr, "Error serializing 'bitmask' field") + } - // Simple Field (listOfBitstringValues) - if pushErr := writeBuffer.PushContext("listOfBitstringValues"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for listOfBitstringValues") - } - _listOfBitstringValuesErr := writeBuffer.WriteSerializable(ctx, m.GetListOfBitstringValues()) - if popErr := writeBuffer.PopContext("listOfBitstringValues"); popErr != nil { - return errors.Wrap(popErr, "Error popping for listOfBitstringValues") - } - if _listOfBitstringValuesErr != nil { - return errors.Wrap(_listOfBitstringValuesErr, "Error serializing 'listOfBitstringValues' field") - } + // Simple Field (listOfBitstringValues) + if pushErr := writeBuffer.PushContext("listOfBitstringValues"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for listOfBitstringValues") + } + _listOfBitstringValuesErr := writeBuffer.WriteSerializable(ctx, m.GetListOfBitstringValues()) + if popErr := writeBuffer.PopContext("listOfBitstringValues"); popErr != nil { + return errors.Wrap(popErr, "Error popping for listOfBitstringValues") + } + if _listOfBitstringValuesErr != nil { + return errors.Wrap(_listOfBitstringValuesErr, "Error serializing 'listOfBitstringValues' field") + } - // Simple Field (closingTag) - if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for closingTag") - } - _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) - if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for closingTag") - } - if _closingTagErr != nil { - return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") - } + // Simple Field (closingTag) + if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for closingTag") + } + _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) + if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for closingTag") + } + if _closingTagErr != nil { + return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") + } if popErr := writeBuffer.PopContext("BACnetEventParameterChangeOfBitstring"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetEventParameterChangeOfBitstring") @@ -342,6 +347,7 @@ func (m *_BACnetEventParameterChangeOfBitstring) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetEventParameterChangeOfBitstring) isBACnetEventParameterChangeOfBitstring() bool { return true } @@ -356,3 +362,6 @@ func (m *_BACnetEventParameterChangeOfBitstring) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfBitstringListOfBitstringValues.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfBitstringListOfBitstringValues.go index 99daf3d55f7..fd12e455a2b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfBitstringListOfBitstringValues.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfBitstringListOfBitstringValues.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventParameterChangeOfBitstringListOfBitstringValues is the corresponding interface of BACnetEventParameterChangeOfBitstringListOfBitstringValues type BACnetEventParameterChangeOfBitstringListOfBitstringValues interface { @@ -49,14 +51,15 @@ type BACnetEventParameterChangeOfBitstringListOfBitstringValuesExactly interface // _BACnetEventParameterChangeOfBitstringListOfBitstringValues is the data-structure of this message type _BACnetEventParameterChangeOfBitstringListOfBitstringValues struct { - OpeningTag BACnetOpeningTag - ListOfBitstringValues []BACnetApplicationTagBitString - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + ListOfBitstringValues []BACnetApplicationTagBitString + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -79,14 +82,15 @@ func (m *_BACnetEventParameterChangeOfBitstringListOfBitstringValues) GetClosing /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventParameterChangeOfBitstringListOfBitstringValues factory function for _BACnetEventParameterChangeOfBitstringListOfBitstringValues -func NewBACnetEventParameterChangeOfBitstringListOfBitstringValues(openingTag BACnetOpeningTag, listOfBitstringValues []BACnetApplicationTagBitString, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetEventParameterChangeOfBitstringListOfBitstringValues { - return &_BACnetEventParameterChangeOfBitstringListOfBitstringValues{OpeningTag: openingTag, ListOfBitstringValues: listOfBitstringValues, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetEventParameterChangeOfBitstringListOfBitstringValues( openingTag BACnetOpeningTag , listOfBitstringValues []BACnetApplicationTagBitString , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetEventParameterChangeOfBitstringListOfBitstringValues { +return &_BACnetEventParameterChangeOfBitstringListOfBitstringValues{ OpeningTag: openingTag , ListOfBitstringValues: listOfBitstringValues , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetEventParameterChangeOfBitstringListOfBitstringValues(structType interface{}) BACnetEventParameterChangeOfBitstringListOfBitstringValues { - if casted, ok := structType.(BACnetEventParameterChangeOfBitstringListOfBitstringValues); ok { + if casted, ok := structType.(BACnetEventParameterChangeOfBitstringListOfBitstringValues); ok { return casted } if casted, ok := structType.(*BACnetEventParameterChangeOfBitstringListOfBitstringValues); ok { @@ -118,6 +122,7 @@ func (m *_BACnetEventParameterChangeOfBitstringListOfBitstringValues) GetLengthI return lengthInBits } + func (m *_BACnetEventParameterChangeOfBitstringListOfBitstringValues) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +144,7 @@ func BACnetEventParameterChangeOfBitstringListOfBitstringValuesParseWithBuffer(c if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetEventParameterChangeOfBitstringListOfBitstringValues") } @@ -155,8 +160,8 @@ func BACnetEventParameterChangeOfBitstringListOfBitstringValuesParseWithBuffer(c // Terminated array var listOfBitstringValues []BACnetApplicationTagBitString { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'listOfBitstringValues' field of BACnetEventParameterChangeOfBitstringListOfBitstringValues") } @@ -171,7 +176,7 @@ func BACnetEventParameterChangeOfBitstringListOfBitstringValuesParseWithBuffer(c if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetEventParameterChangeOfBitstringListOfBitstringValues") } @@ -186,11 +191,11 @@ func BACnetEventParameterChangeOfBitstringListOfBitstringValuesParseWithBuffer(c // Create the instance return &_BACnetEventParameterChangeOfBitstringListOfBitstringValues{ - TagNumber: tagNumber, - OpeningTag: openingTag, - ListOfBitstringValues: listOfBitstringValues, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + ListOfBitstringValues: listOfBitstringValues, + ClosingTag: closingTag, + }, nil } func (m *_BACnetEventParameterChangeOfBitstringListOfBitstringValues) Serialize() ([]byte, error) { @@ -204,7 +209,7 @@ func (m *_BACnetEventParameterChangeOfBitstringListOfBitstringValues) Serialize( func (m *_BACnetEventParameterChangeOfBitstringListOfBitstringValues) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetEventParameterChangeOfBitstringListOfBitstringValues"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetEventParameterChangeOfBitstringListOfBitstringValues"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetEventParameterChangeOfBitstringListOfBitstringValues") } @@ -255,13 +260,13 @@ func (m *_BACnetEventParameterChangeOfBitstringListOfBitstringValues) SerializeW return nil } + //// // Arguments Getter func (m *_BACnetEventParameterChangeOfBitstringListOfBitstringValues) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -279,3 +284,6 @@ func (m *_BACnetEventParameterChangeOfBitstringListOfBitstringValues) String() s } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfCharacterString.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfCharacterString.go index 10a5ed68cfb..5ca7c130801 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfCharacterString.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfCharacterString.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventParameterChangeOfCharacterString is the corresponding interface of BACnetEventParameterChangeOfCharacterString type BACnetEventParameterChangeOfCharacterString interface { @@ -52,12 +54,14 @@ type BACnetEventParameterChangeOfCharacterStringExactly interface { // _BACnetEventParameterChangeOfCharacterString is the data-structure of this message type _BACnetEventParameterChangeOfCharacterString struct { *_BACnetEventParameter - OpeningTag BACnetOpeningTag - TimeDelay BACnetContextTagUnsignedInteger - ListOfAlarmValues BACnetEventParameterChangeOfCharacterStringListOfAlarmValues - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + TimeDelay BACnetContextTagUnsignedInteger + ListOfAlarmValues BACnetEventParameterChangeOfCharacterStringListOfAlarmValues + ClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -68,14 +72,12 @@ type _BACnetEventParameterChangeOfCharacterString struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetEventParameterChangeOfCharacterString) InitializeParent(parent BACnetEventParameter, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetEventParameterChangeOfCharacterString) InitializeParent(parent BACnetEventParameter , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetEventParameterChangeOfCharacterString) GetParent() BACnetEventParameter { +func (m *_BACnetEventParameterChangeOfCharacterString) GetParent() BACnetEventParameter { return m._BACnetEventParameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -102,14 +104,15 @@ func (m *_BACnetEventParameterChangeOfCharacterString) GetClosingTag() BACnetClo /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventParameterChangeOfCharacterString factory function for _BACnetEventParameterChangeOfCharacterString -func NewBACnetEventParameterChangeOfCharacterString(openingTag BACnetOpeningTag, timeDelay BACnetContextTagUnsignedInteger, listOfAlarmValues BACnetEventParameterChangeOfCharacterStringListOfAlarmValues, closingTag BACnetClosingTag, peekedTagHeader BACnetTagHeader) *_BACnetEventParameterChangeOfCharacterString { +func NewBACnetEventParameterChangeOfCharacterString( openingTag BACnetOpeningTag , timeDelay BACnetContextTagUnsignedInteger , listOfAlarmValues BACnetEventParameterChangeOfCharacterStringListOfAlarmValues , closingTag BACnetClosingTag , peekedTagHeader BACnetTagHeader ) *_BACnetEventParameterChangeOfCharacterString { _result := &_BACnetEventParameterChangeOfCharacterString{ - OpeningTag: openingTag, - TimeDelay: timeDelay, - ListOfAlarmValues: listOfAlarmValues, - ClosingTag: closingTag, - _BACnetEventParameter: NewBACnetEventParameter(peekedTagHeader), + OpeningTag: openingTag, + TimeDelay: timeDelay, + ListOfAlarmValues: listOfAlarmValues, + ClosingTag: closingTag, + _BACnetEventParameter: NewBACnetEventParameter(peekedTagHeader), } _result._BACnetEventParameter._BACnetEventParameterChildRequirements = _result return _result @@ -117,7 +120,7 @@ func NewBACnetEventParameterChangeOfCharacterString(openingTag BACnetOpeningTag, // Deprecated: use the interface for direct cast func CastBACnetEventParameterChangeOfCharacterString(structType interface{}) BACnetEventParameterChangeOfCharacterString { - if casted, ok := structType.(BACnetEventParameterChangeOfCharacterString); ok { + if casted, ok := structType.(BACnetEventParameterChangeOfCharacterString); ok { return casted } if casted, ok := structType.(*BACnetEventParameterChangeOfCharacterString); ok { @@ -148,6 +151,7 @@ func (m *_BACnetEventParameterChangeOfCharacterString) GetLengthInBits(ctx conte return lengthInBits } + func (m *_BACnetEventParameterChangeOfCharacterString) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -169,7 +173,7 @@ func BACnetEventParameterChangeOfCharacterStringParseWithBuffer(ctx context.Cont if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(uint8(17))) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( uint8(17) ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetEventParameterChangeOfCharacterString") } @@ -182,7 +186,7 @@ func BACnetEventParameterChangeOfCharacterStringParseWithBuffer(ctx context.Cont if pullErr := readBuffer.PullContext("timeDelay"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeDelay") } - _timeDelay, _timeDelayErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_timeDelay, _timeDelayErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _timeDelayErr != nil { return nil, errors.Wrap(_timeDelayErr, "Error parsing 'timeDelay' field of BACnetEventParameterChangeOfCharacterString") } @@ -195,7 +199,7 @@ func BACnetEventParameterChangeOfCharacterStringParseWithBuffer(ctx context.Cont if pullErr := readBuffer.PullContext("listOfAlarmValues"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for listOfAlarmValues") } - _listOfAlarmValues, _listOfAlarmValuesErr := BACnetEventParameterChangeOfCharacterStringListOfAlarmValuesParseWithBuffer(ctx, readBuffer, uint8(uint8(1))) +_listOfAlarmValues, _listOfAlarmValuesErr := BACnetEventParameterChangeOfCharacterStringListOfAlarmValuesParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) ) if _listOfAlarmValuesErr != nil { return nil, errors.Wrap(_listOfAlarmValuesErr, "Error parsing 'listOfAlarmValues' field of BACnetEventParameterChangeOfCharacterString") } @@ -208,7 +212,7 @@ func BACnetEventParameterChangeOfCharacterStringParseWithBuffer(ctx context.Cont if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(uint8(17))) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( uint8(17) ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetEventParameterChangeOfCharacterString") } @@ -223,11 +227,12 @@ func BACnetEventParameterChangeOfCharacterStringParseWithBuffer(ctx context.Cont // Create a partially initialized instance _child := &_BACnetEventParameterChangeOfCharacterString{ - _BACnetEventParameter: &_BACnetEventParameter{}, - OpeningTag: openingTag, - TimeDelay: timeDelay, - ListOfAlarmValues: listOfAlarmValues, - ClosingTag: closingTag, + _BACnetEventParameter: &_BACnetEventParameter{ + }, + OpeningTag: openingTag, + TimeDelay: timeDelay, + ListOfAlarmValues: listOfAlarmValues, + ClosingTag: closingTag, } _child._BACnetEventParameter._BACnetEventParameterChildRequirements = _child return _child, nil @@ -249,53 +254,53 @@ func (m *_BACnetEventParameterChangeOfCharacterString) SerializeWithWriteBuffer( return errors.Wrap(pushErr, "Error pushing for BACnetEventParameterChangeOfCharacterString") } - // Simple Field (openingTag) - if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for openingTag") - } - _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) - if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for openingTag") - } - if _openingTagErr != nil { - return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") - } + // Simple Field (openingTag) + if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for openingTag") + } + _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) + if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for openingTag") + } + if _openingTagErr != nil { + return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") + } - // Simple Field (timeDelay) - if pushErr := writeBuffer.PushContext("timeDelay"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timeDelay") - } - _timeDelayErr := writeBuffer.WriteSerializable(ctx, m.GetTimeDelay()) - if popErr := writeBuffer.PopContext("timeDelay"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timeDelay") - } - if _timeDelayErr != nil { - return errors.Wrap(_timeDelayErr, "Error serializing 'timeDelay' field") - } + // Simple Field (timeDelay) + if pushErr := writeBuffer.PushContext("timeDelay"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timeDelay") + } + _timeDelayErr := writeBuffer.WriteSerializable(ctx, m.GetTimeDelay()) + if popErr := writeBuffer.PopContext("timeDelay"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timeDelay") + } + if _timeDelayErr != nil { + return errors.Wrap(_timeDelayErr, "Error serializing 'timeDelay' field") + } - // Simple Field (listOfAlarmValues) - if pushErr := writeBuffer.PushContext("listOfAlarmValues"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for listOfAlarmValues") - } - _listOfAlarmValuesErr := writeBuffer.WriteSerializable(ctx, m.GetListOfAlarmValues()) - if popErr := writeBuffer.PopContext("listOfAlarmValues"); popErr != nil { - return errors.Wrap(popErr, "Error popping for listOfAlarmValues") - } - if _listOfAlarmValuesErr != nil { - return errors.Wrap(_listOfAlarmValuesErr, "Error serializing 'listOfAlarmValues' field") - } + // Simple Field (listOfAlarmValues) + if pushErr := writeBuffer.PushContext("listOfAlarmValues"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for listOfAlarmValues") + } + _listOfAlarmValuesErr := writeBuffer.WriteSerializable(ctx, m.GetListOfAlarmValues()) + if popErr := writeBuffer.PopContext("listOfAlarmValues"); popErr != nil { + return errors.Wrap(popErr, "Error popping for listOfAlarmValues") + } + if _listOfAlarmValuesErr != nil { + return errors.Wrap(_listOfAlarmValuesErr, "Error serializing 'listOfAlarmValues' field") + } - // Simple Field (closingTag) - if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for closingTag") - } - _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) - if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for closingTag") - } - if _closingTagErr != nil { - return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") - } + // Simple Field (closingTag) + if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for closingTag") + } + _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) + if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for closingTag") + } + if _closingTagErr != nil { + return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") + } if popErr := writeBuffer.PopContext("BACnetEventParameterChangeOfCharacterString"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetEventParameterChangeOfCharacterString") @@ -305,6 +310,7 @@ func (m *_BACnetEventParameterChangeOfCharacterString) SerializeWithWriteBuffer( return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetEventParameterChangeOfCharacterString) isBACnetEventParameterChangeOfCharacterString() bool { return true } @@ -319,3 +325,6 @@ func (m *_BACnetEventParameterChangeOfCharacterString) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfCharacterStringListOfAlarmValues.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfCharacterStringListOfAlarmValues.go index f05bb8e4ca9..7c58559de83 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfCharacterStringListOfAlarmValues.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfCharacterStringListOfAlarmValues.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventParameterChangeOfCharacterStringListOfAlarmValues is the corresponding interface of BACnetEventParameterChangeOfCharacterStringListOfAlarmValues type BACnetEventParameterChangeOfCharacterStringListOfAlarmValues interface { @@ -49,14 +51,15 @@ type BACnetEventParameterChangeOfCharacterStringListOfAlarmValuesExactly interfa // _BACnetEventParameterChangeOfCharacterStringListOfAlarmValues is the data-structure of this message type _BACnetEventParameterChangeOfCharacterStringListOfAlarmValues struct { - OpeningTag BACnetOpeningTag - ListOfAlarmValues []BACnetApplicationTagCharacterString - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + ListOfAlarmValues []BACnetApplicationTagCharacterString + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -79,14 +82,15 @@ func (m *_BACnetEventParameterChangeOfCharacterStringListOfAlarmValues) GetClosi /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventParameterChangeOfCharacterStringListOfAlarmValues factory function for _BACnetEventParameterChangeOfCharacterStringListOfAlarmValues -func NewBACnetEventParameterChangeOfCharacterStringListOfAlarmValues(openingTag BACnetOpeningTag, listOfAlarmValues []BACnetApplicationTagCharacterString, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetEventParameterChangeOfCharacterStringListOfAlarmValues { - return &_BACnetEventParameterChangeOfCharacterStringListOfAlarmValues{OpeningTag: openingTag, ListOfAlarmValues: listOfAlarmValues, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetEventParameterChangeOfCharacterStringListOfAlarmValues( openingTag BACnetOpeningTag , listOfAlarmValues []BACnetApplicationTagCharacterString , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetEventParameterChangeOfCharacterStringListOfAlarmValues { +return &_BACnetEventParameterChangeOfCharacterStringListOfAlarmValues{ OpeningTag: openingTag , ListOfAlarmValues: listOfAlarmValues , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetEventParameterChangeOfCharacterStringListOfAlarmValues(structType interface{}) BACnetEventParameterChangeOfCharacterStringListOfAlarmValues { - if casted, ok := structType.(BACnetEventParameterChangeOfCharacterStringListOfAlarmValues); ok { + if casted, ok := structType.(BACnetEventParameterChangeOfCharacterStringListOfAlarmValues); ok { return casted } if casted, ok := structType.(*BACnetEventParameterChangeOfCharacterStringListOfAlarmValues); ok { @@ -118,6 +122,7 @@ func (m *_BACnetEventParameterChangeOfCharacterStringListOfAlarmValues) GetLengt return lengthInBits } + func (m *_BACnetEventParameterChangeOfCharacterStringListOfAlarmValues) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +144,7 @@ func BACnetEventParameterChangeOfCharacterStringListOfAlarmValuesParseWithBuffer if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetEventParameterChangeOfCharacterStringListOfAlarmValues") } @@ -155,8 +160,8 @@ func BACnetEventParameterChangeOfCharacterStringListOfAlarmValuesParseWithBuffer // Terminated array var listOfAlarmValues []BACnetApplicationTagCharacterString { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'listOfAlarmValues' field of BACnetEventParameterChangeOfCharacterStringListOfAlarmValues") } @@ -171,7 +176,7 @@ func BACnetEventParameterChangeOfCharacterStringListOfAlarmValuesParseWithBuffer if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetEventParameterChangeOfCharacterStringListOfAlarmValues") } @@ -186,11 +191,11 @@ func BACnetEventParameterChangeOfCharacterStringListOfAlarmValuesParseWithBuffer // Create the instance return &_BACnetEventParameterChangeOfCharacterStringListOfAlarmValues{ - TagNumber: tagNumber, - OpeningTag: openingTag, - ListOfAlarmValues: listOfAlarmValues, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + ListOfAlarmValues: listOfAlarmValues, + ClosingTag: closingTag, + }, nil } func (m *_BACnetEventParameterChangeOfCharacterStringListOfAlarmValues) Serialize() ([]byte, error) { @@ -204,7 +209,7 @@ func (m *_BACnetEventParameterChangeOfCharacterStringListOfAlarmValues) Serializ func (m *_BACnetEventParameterChangeOfCharacterStringListOfAlarmValues) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetEventParameterChangeOfCharacterStringListOfAlarmValues"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetEventParameterChangeOfCharacterStringListOfAlarmValues"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetEventParameterChangeOfCharacterStringListOfAlarmValues") } @@ -255,13 +260,13 @@ func (m *_BACnetEventParameterChangeOfCharacterStringListOfAlarmValues) Serializ return nil } + //// // Arguments Getter func (m *_BACnetEventParameterChangeOfCharacterStringListOfAlarmValues) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -279,3 +284,6 @@ func (m *_BACnetEventParameterChangeOfCharacterStringListOfAlarmValues) String() } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfDiscreteValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfDiscreteValue.go index d35a9e54e67..a2cfe0c9fc1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfDiscreteValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfDiscreteValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventParameterChangeOfDiscreteValue is the corresponding interface of BACnetEventParameterChangeOfDiscreteValue type BACnetEventParameterChangeOfDiscreteValue interface { @@ -50,11 +52,13 @@ type BACnetEventParameterChangeOfDiscreteValueExactly interface { // _BACnetEventParameterChangeOfDiscreteValue is the data-structure of this message type _BACnetEventParameterChangeOfDiscreteValue struct { *_BACnetEventParameter - OpeningTag BACnetOpeningTag - TimeDelay BACnetContextTagUnsignedInteger - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + TimeDelay BACnetContextTagUnsignedInteger + ClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -65,14 +69,12 @@ type _BACnetEventParameterChangeOfDiscreteValue struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetEventParameterChangeOfDiscreteValue) InitializeParent(parent BACnetEventParameter, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetEventParameterChangeOfDiscreteValue) InitializeParent(parent BACnetEventParameter , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetEventParameterChangeOfDiscreteValue) GetParent() BACnetEventParameter { +func (m *_BACnetEventParameterChangeOfDiscreteValue) GetParent() BACnetEventParameter { return m._BACnetEventParameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -95,13 +97,14 @@ func (m *_BACnetEventParameterChangeOfDiscreteValue) GetClosingTag() BACnetClosi /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventParameterChangeOfDiscreteValue factory function for _BACnetEventParameterChangeOfDiscreteValue -func NewBACnetEventParameterChangeOfDiscreteValue(openingTag BACnetOpeningTag, timeDelay BACnetContextTagUnsignedInteger, closingTag BACnetClosingTag, peekedTagHeader BACnetTagHeader) *_BACnetEventParameterChangeOfDiscreteValue { +func NewBACnetEventParameterChangeOfDiscreteValue( openingTag BACnetOpeningTag , timeDelay BACnetContextTagUnsignedInteger , closingTag BACnetClosingTag , peekedTagHeader BACnetTagHeader ) *_BACnetEventParameterChangeOfDiscreteValue { _result := &_BACnetEventParameterChangeOfDiscreteValue{ - OpeningTag: openingTag, - TimeDelay: timeDelay, - ClosingTag: closingTag, - _BACnetEventParameter: NewBACnetEventParameter(peekedTagHeader), + OpeningTag: openingTag, + TimeDelay: timeDelay, + ClosingTag: closingTag, + _BACnetEventParameter: NewBACnetEventParameter(peekedTagHeader), } _result._BACnetEventParameter._BACnetEventParameterChildRequirements = _result return _result @@ -109,7 +112,7 @@ func NewBACnetEventParameterChangeOfDiscreteValue(openingTag BACnetOpeningTag, t // Deprecated: use the interface for direct cast func CastBACnetEventParameterChangeOfDiscreteValue(structType interface{}) BACnetEventParameterChangeOfDiscreteValue { - if casted, ok := structType.(BACnetEventParameterChangeOfDiscreteValue); ok { + if casted, ok := structType.(BACnetEventParameterChangeOfDiscreteValue); ok { return casted } if casted, ok := structType.(*BACnetEventParameterChangeOfDiscreteValue); ok { @@ -137,6 +140,7 @@ func (m *_BACnetEventParameterChangeOfDiscreteValue) GetLengthInBits(ctx context return lengthInBits } + func (m *_BACnetEventParameterChangeOfDiscreteValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -158,7 +162,7 @@ func BACnetEventParameterChangeOfDiscreteValueParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(uint8(21))) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( uint8(21) ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetEventParameterChangeOfDiscreteValue") } @@ -171,7 +175,7 @@ func BACnetEventParameterChangeOfDiscreteValueParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("timeDelay"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeDelay") } - _timeDelay, _timeDelayErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_timeDelay, _timeDelayErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _timeDelayErr != nil { return nil, errors.Wrap(_timeDelayErr, "Error parsing 'timeDelay' field of BACnetEventParameterChangeOfDiscreteValue") } @@ -184,7 +188,7 @@ func BACnetEventParameterChangeOfDiscreteValueParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(uint8(21))) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( uint8(21) ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetEventParameterChangeOfDiscreteValue") } @@ -199,10 +203,11 @@ func BACnetEventParameterChangeOfDiscreteValueParseWithBuffer(ctx context.Contex // Create a partially initialized instance _child := &_BACnetEventParameterChangeOfDiscreteValue{ - _BACnetEventParameter: &_BACnetEventParameter{}, - OpeningTag: openingTag, - TimeDelay: timeDelay, - ClosingTag: closingTag, + _BACnetEventParameter: &_BACnetEventParameter{ + }, + OpeningTag: openingTag, + TimeDelay: timeDelay, + ClosingTag: closingTag, } _child._BACnetEventParameter._BACnetEventParameterChildRequirements = _child return _child, nil @@ -224,41 +229,41 @@ func (m *_BACnetEventParameterChangeOfDiscreteValue) SerializeWithWriteBuffer(ct return errors.Wrap(pushErr, "Error pushing for BACnetEventParameterChangeOfDiscreteValue") } - // Simple Field (openingTag) - if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for openingTag") - } - _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) - if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for openingTag") - } - if _openingTagErr != nil { - return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") - } + // Simple Field (openingTag) + if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for openingTag") + } + _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) + if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for openingTag") + } + if _openingTagErr != nil { + return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") + } - // Simple Field (timeDelay) - if pushErr := writeBuffer.PushContext("timeDelay"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timeDelay") - } - _timeDelayErr := writeBuffer.WriteSerializable(ctx, m.GetTimeDelay()) - if popErr := writeBuffer.PopContext("timeDelay"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timeDelay") - } - if _timeDelayErr != nil { - return errors.Wrap(_timeDelayErr, "Error serializing 'timeDelay' field") - } + // Simple Field (timeDelay) + if pushErr := writeBuffer.PushContext("timeDelay"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timeDelay") + } + _timeDelayErr := writeBuffer.WriteSerializable(ctx, m.GetTimeDelay()) + if popErr := writeBuffer.PopContext("timeDelay"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timeDelay") + } + if _timeDelayErr != nil { + return errors.Wrap(_timeDelayErr, "Error serializing 'timeDelay' field") + } - // Simple Field (closingTag) - if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for closingTag") - } - _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) - if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for closingTag") - } - if _closingTagErr != nil { - return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") - } + // Simple Field (closingTag) + if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for closingTag") + } + _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) + if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for closingTag") + } + if _closingTagErr != nil { + return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") + } if popErr := writeBuffer.PopContext("BACnetEventParameterChangeOfDiscreteValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetEventParameterChangeOfDiscreteValue") @@ -268,6 +273,7 @@ func (m *_BACnetEventParameterChangeOfDiscreteValue) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetEventParameterChangeOfDiscreteValue) isBACnetEventParameterChangeOfDiscreteValue() bool { return true } @@ -282,3 +288,6 @@ func (m *_BACnetEventParameterChangeOfDiscreteValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfLifeSavety.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfLifeSavety.go index b062f3bc376..42267b6e855 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfLifeSavety.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfLifeSavety.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventParameterChangeOfLifeSavety is the corresponding interface of BACnetEventParameterChangeOfLifeSavety type BACnetEventParameterChangeOfLifeSavety interface { @@ -56,14 +58,16 @@ type BACnetEventParameterChangeOfLifeSavetyExactly interface { // _BACnetEventParameterChangeOfLifeSavety is the data-structure of this message type _BACnetEventParameterChangeOfLifeSavety struct { *_BACnetEventParameter - OpeningTag BACnetOpeningTag - TimeDelay BACnetContextTagUnsignedInteger - ListOfLifeSavetyAlarmValues BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues - ListOfAlarmValues BACnetEventParameterChangeOfLifeSavetyListOfAlarmValues - ModePropertyReference BACnetDeviceObjectPropertyReferenceEnclosed - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + TimeDelay BACnetContextTagUnsignedInteger + ListOfLifeSavetyAlarmValues BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues + ListOfAlarmValues BACnetEventParameterChangeOfLifeSavetyListOfAlarmValues + ModePropertyReference BACnetDeviceObjectPropertyReferenceEnclosed + ClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -74,14 +78,12 @@ type _BACnetEventParameterChangeOfLifeSavety struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetEventParameterChangeOfLifeSavety) InitializeParent(parent BACnetEventParameter, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetEventParameterChangeOfLifeSavety) InitializeParent(parent BACnetEventParameter , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetEventParameterChangeOfLifeSavety) GetParent() BACnetEventParameter { +func (m *_BACnetEventParameterChangeOfLifeSavety) GetParent() BACnetEventParameter { return m._BACnetEventParameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -116,16 +118,17 @@ func (m *_BACnetEventParameterChangeOfLifeSavety) GetClosingTag() BACnetClosingT /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventParameterChangeOfLifeSavety factory function for _BACnetEventParameterChangeOfLifeSavety -func NewBACnetEventParameterChangeOfLifeSavety(openingTag BACnetOpeningTag, timeDelay BACnetContextTagUnsignedInteger, listOfLifeSavetyAlarmValues BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues, listOfAlarmValues BACnetEventParameterChangeOfLifeSavetyListOfAlarmValues, modePropertyReference BACnetDeviceObjectPropertyReferenceEnclosed, closingTag BACnetClosingTag, peekedTagHeader BACnetTagHeader) *_BACnetEventParameterChangeOfLifeSavety { +func NewBACnetEventParameterChangeOfLifeSavety( openingTag BACnetOpeningTag , timeDelay BACnetContextTagUnsignedInteger , listOfLifeSavetyAlarmValues BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues , listOfAlarmValues BACnetEventParameterChangeOfLifeSavetyListOfAlarmValues , modePropertyReference BACnetDeviceObjectPropertyReferenceEnclosed , closingTag BACnetClosingTag , peekedTagHeader BACnetTagHeader ) *_BACnetEventParameterChangeOfLifeSavety { _result := &_BACnetEventParameterChangeOfLifeSavety{ - OpeningTag: openingTag, - TimeDelay: timeDelay, + OpeningTag: openingTag, + TimeDelay: timeDelay, ListOfLifeSavetyAlarmValues: listOfLifeSavetyAlarmValues, - ListOfAlarmValues: listOfAlarmValues, - ModePropertyReference: modePropertyReference, - ClosingTag: closingTag, - _BACnetEventParameter: NewBACnetEventParameter(peekedTagHeader), + ListOfAlarmValues: listOfAlarmValues, + ModePropertyReference: modePropertyReference, + ClosingTag: closingTag, + _BACnetEventParameter: NewBACnetEventParameter(peekedTagHeader), } _result._BACnetEventParameter._BACnetEventParameterChildRequirements = _result return _result @@ -133,7 +136,7 @@ func NewBACnetEventParameterChangeOfLifeSavety(openingTag BACnetOpeningTag, time // Deprecated: use the interface for direct cast func CastBACnetEventParameterChangeOfLifeSavety(structType interface{}) BACnetEventParameterChangeOfLifeSavety { - if casted, ok := structType.(BACnetEventParameterChangeOfLifeSavety); ok { + if casted, ok := structType.(BACnetEventParameterChangeOfLifeSavety); ok { return casted } if casted, ok := structType.(*BACnetEventParameterChangeOfLifeSavety); ok { @@ -170,6 +173,7 @@ func (m *_BACnetEventParameterChangeOfLifeSavety) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetEventParameterChangeOfLifeSavety) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -191,7 +195,7 @@ func BACnetEventParameterChangeOfLifeSavetyParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(uint8(8))) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( uint8(8) ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetEventParameterChangeOfLifeSavety") } @@ -204,7 +208,7 @@ func BACnetEventParameterChangeOfLifeSavetyParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("timeDelay"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeDelay") } - _timeDelay, _timeDelayErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_timeDelay, _timeDelayErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _timeDelayErr != nil { return nil, errors.Wrap(_timeDelayErr, "Error parsing 'timeDelay' field of BACnetEventParameterChangeOfLifeSavety") } @@ -217,7 +221,7 @@ func BACnetEventParameterChangeOfLifeSavetyParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("listOfLifeSavetyAlarmValues"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for listOfLifeSavetyAlarmValues") } - _listOfLifeSavetyAlarmValues, _listOfLifeSavetyAlarmValuesErr := BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValuesParseWithBuffer(ctx, readBuffer, uint8(uint8(1))) +_listOfLifeSavetyAlarmValues, _listOfLifeSavetyAlarmValuesErr := BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValuesParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) ) if _listOfLifeSavetyAlarmValuesErr != nil { return nil, errors.Wrap(_listOfLifeSavetyAlarmValuesErr, "Error parsing 'listOfLifeSavetyAlarmValues' field of BACnetEventParameterChangeOfLifeSavety") } @@ -230,7 +234,7 @@ func BACnetEventParameterChangeOfLifeSavetyParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("listOfAlarmValues"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for listOfAlarmValues") } - _listOfAlarmValues, _listOfAlarmValuesErr := BACnetEventParameterChangeOfLifeSavetyListOfAlarmValuesParseWithBuffer(ctx, readBuffer, uint8(uint8(2))) +_listOfAlarmValues, _listOfAlarmValuesErr := BACnetEventParameterChangeOfLifeSavetyListOfAlarmValuesParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) ) if _listOfAlarmValuesErr != nil { return nil, errors.Wrap(_listOfAlarmValuesErr, "Error parsing 'listOfAlarmValues' field of BACnetEventParameterChangeOfLifeSavety") } @@ -243,7 +247,7 @@ func BACnetEventParameterChangeOfLifeSavetyParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("modePropertyReference"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for modePropertyReference") } - _modePropertyReference, _modePropertyReferenceErr := BACnetDeviceObjectPropertyReferenceEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(4))) +_modePropertyReference, _modePropertyReferenceErr := BACnetDeviceObjectPropertyReferenceEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(4) ) ) if _modePropertyReferenceErr != nil { return nil, errors.Wrap(_modePropertyReferenceErr, "Error parsing 'modePropertyReference' field of BACnetEventParameterChangeOfLifeSavety") } @@ -256,7 +260,7 @@ func BACnetEventParameterChangeOfLifeSavetyParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(uint8(8))) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( uint8(8) ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetEventParameterChangeOfLifeSavety") } @@ -271,13 +275,14 @@ func BACnetEventParameterChangeOfLifeSavetyParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetEventParameterChangeOfLifeSavety{ - _BACnetEventParameter: &_BACnetEventParameter{}, - OpeningTag: openingTag, - TimeDelay: timeDelay, + _BACnetEventParameter: &_BACnetEventParameter{ + }, + OpeningTag: openingTag, + TimeDelay: timeDelay, ListOfLifeSavetyAlarmValues: listOfLifeSavetyAlarmValues, - ListOfAlarmValues: listOfAlarmValues, - ModePropertyReference: modePropertyReference, - ClosingTag: closingTag, + ListOfAlarmValues: listOfAlarmValues, + ModePropertyReference: modePropertyReference, + ClosingTag: closingTag, } _child._BACnetEventParameter._BACnetEventParameterChildRequirements = _child return _child, nil @@ -299,77 +304,77 @@ func (m *_BACnetEventParameterChangeOfLifeSavety) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetEventParameterChangeOfLifeSavety") } - // Simple Field (openingTag) - if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for openingTag") - } - _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) - if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for openingTag") - } - if _openingTagErr != nil { - return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") - } + // Simple Field (openingTag) + if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for openingTag") + } + _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) + if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for openingTag") + } + if _openingTagErr != nil { + return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") + } - // Simple Field (timeDelay) - if pushErr := writeBuffer.PushContext("timeDelay"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timeDelay") - } - _timeDelayErr := writeBuffer.WriteSerializable(ctx, m.GetTimeDelay()) - if popErr := writeBuffer.PopContext("timeDelay"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timeDelay") - } - if _timeDelayErr != nil { - return errors.Wrap(_timeDelayErr, "Error serializing 'timeDelay' field") - } + // Simple Field (timeDelay) + if pushErr := writeBuffer.PushContext("timeDelay"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timeDelay") + } + _timeDelayErr := writeBuffer.WriteSerializable(ctx, m.GetTimeDelay()) + if popErr := writeBuffer.PopContext("timeDelay"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timeDelay") + } + if _timeDelayErr != nil { + return errors.Wrap(_timeDelayErr, "Error serializing 'timeDelay' field") + } - // Simple Field (listOfLifeSavetyAlarmValues) - if pushErr := writeBuffer.PushContext("listOfLifeSavetyAlarmValues"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for listOfLifeSavetyAlarmValues") - } - _listOfLifeSavetyAlarmValuesErr := writeBuffer.WriteSerializable(ctx, m.GetListOfLifeSavetyAlarmValues()) - if popErr := writeBuffer.PopContext("listOfLifeSavetyAlarmValues"); popErr != nil { - return errors.Wrap(popErr, "Error popping for listOfLifeSavetyAlarmValues") - } - if _listOfLifeSavetyAlarmValuesErr != nil { - return errors.Wrap(_listOfLifeSavetyAlarmValuesErr, "Error serializing 'listOfLifeSavetyAlarmValues' field") - } + // Simple Field (listOfLifeSavetyAlarmValues) + if pushErr := writeBuffer.PushContext("listOfLifeSavetyAlarmValues"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for listOfLifeSavetyAlarmValues") + } + _listOfLifeSavetyAlarmValuesErr := writeBuffer.WriteSerializable(ctx, m.GetListOfLifeSavetyAlarmValues()) + if popErr := writeBuffer.PopContext("listOfLifeSavetyAlarmValues"); popErr != nil { + return errors.Wrap(popErr, "Error popping for listOfLifeSavetyAlarmValues") + } + if _listOfLifeSavetyAlarmValuesErr != nil { + return errors.Wrap(_listOfLifeSavetyAlarmValuesErr, "Error serializing 'listOfLifeSavetyAlarmValues' field") + } - // Simple Field (listOfAlarmValues) - if pushErr := writeBuffer.PushContext("listOfAlarmValues"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for listOfAlarmValues") - } - _listOfAlarmValuesErr := writeBuffer.WriteSerializable(ctx, m.GetListOfAlarmValues()) - if popErr := writeBuffer.PopContext("listOfAlarmValues"); popErr != nil { - return errors.Wrap(popErr, "Error popping for listOfAlarmValues") - } - if _listOfAlarmValuesErr != nil { - return errors.Wrap(_listOfAlarmValuesErr, "Error serializing 'listOfAlarmValues' field") - } + // Simple Field (listOfAlarmValues) + if pushErr := writeBuffer.PushContext("listOfAlarmValues"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for listOfAlarmValues") + } + _listOfAlarmValuesErr := writeBuffer.WriteSerializable(ctx, m.GetListOfAlarmValues()) + if popErr := writeBuffer.PopContext("listOfAlarmValues"); popErr != nil { + return errors.Wrap(popErr, "Error popping for listOfAlarmValues") + } + if _listOfAlarmValuesErr != nil { + return errors.Wrap(_listOfAlarmValuesErr, "Error serializing 'listOfAlarmValues' field") + } - // Simple Field (modePropertyReference) - if pushErr := writeBuffer.PushContext("modePropertyReference"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for modePropertyReference") - } - _modePropertyReferenceErr := writeBuffer.WriteSerializable(ctx, m.GetModePropertyReference()) - if popErr := writeBuffer.PopContext("modePropertyReference"); popErr != nil { - return errors.Wrap(popErr, "Error popping for modePropertyReference") - } - if _modePropertyReferenceErr != nil { - return errors.Wrap(_modePropertyReferenceErr, "Error serializing 'modePropertyReference' field") - } + // Simple Field (modePropertyReference) + if pushErr := writeBuffer.PushContext("modePropertyReference"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for modePropertyReference") + } + _modePropertyReferenceErr := writeBuffer.WriteSerializable(ctx, m.GetModePropertyReference()) + if popErr := writeBuffer.PopContext("modePropertyReference"); popErr != nil { + return errors.Wrap(popErr, "Error popping for modePropertyReference") + } + if _modePropertyReferenceErr != nil { + return errors.Wrap(_modePropertyReferenceErr, "Error serializing 'modePropertyReference' field") + } - // Simple Field (closingTag) - if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for closingTag") - } - _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) - if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for closingTag") - } - if _closingTagErr != nil { - return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") - } + // Simple Field (closingTag) + if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for closingTag") + } + _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) + if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for closingTag") + } + if _closingTagErr != nil { + return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") + } if popErr := writeBuffer.PopContext("BACnetEventParameterChangeOfLifeSavety"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetEventParameterChangeOfLifeSavety") @@ -379,6 +384,7 @@ func (m *_BACnetEventParameterChangeOfLifeSavety) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetEventParameterChangeOfLifeSavety) isBACnetEventParameterChangeOfLifeSavety() bool { return true } @@ -393,3 +399,6 @@ func (m *_BACnetEventParameterChangeOfLifeSavety) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfLifeSavetyListOfAlarmValues.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfLifeSavetyListOfAlarmValues.go index 6e24e8f84de..519d0d4404e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfLifeSavetyListOfAlarmValues.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfLifeSavetyListOfAlarmValues.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventParameterChangeOfLifeSavetyListOfAlarmValues is the corresponding interface of BACnetEventParameterChangeOfLifeSavetyListOfAlarmValues type BACnetEventParameterChangeOfLifeSavetyListOfAlarmValues interface { @@ -49,14 +51,15 @@ type BACnetEventParameterChangeOfLifeSavetyListOfAlarmValuesExactly interface { // _BACnetEventParameterChangeOfLifeSavetyListOfAlarmValues is the data-structure of this message type _BACnetEventParameterChangeOfLifeSavetyListOfAlarmValues struct { - OpeningTag BACnetOpeningTag - ListOfAlarmValues []BACnetLifeSafetyStateTagged - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + ListOfAlarmValues []BACnetLifeSafetyStateTagged + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -79,14 +82,15 @@ func (m *_BACnetEventParameterChangeOfLifeSavetyListOfAlarmValues) GetClosingTag /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventParameterChangeOfLifeSavetyListOfAlarmValues factory function for _BACnetEventParameterChangeOfLifeSavetyListOfAlarmValues -func NewBACnetEventParameterChangeOfLifeSavetyListOfAlarmValues(openingTag BACnetOpeningTag, listOfAlarmValues []BACnetLifeSafetyStateTagged, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetEventParameterChangeOfLifeSavetyListOfAlarmValues { - return &_BACnetEventParameterChangeOfLifeSavetyListOfAlarmValues{OpeningTag: openingTag, ListOfAlarmValues: listOfAlarmValues, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetEventParameterChangeOfLifeSavetyListOfAlarmValues( openingTag BACnetOpeningTag , listOfAlarmValues []BACnetLifeSafetyStateTagged , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetEventParameterChangeOfLifeSavetyListOfAlarmValues { +return &_BACnetEventParameterChangeOfLifeSavetyListOfAlarmValues{ OpeningTag: openingTag , ListOfAlarmValues: listOfAlarmValues , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetEventParameterChangeOfLifeSavetyListOfAlarmValues(structType interface{}) BACnetEventParameterChangeOfLifeSavetyListOfAlarmValues { - if casted, ok := structType.(BACnetEventParameterChangeOfLifeSavetyListOfAlarmValues); ok { + if casted, ok := structType.(BACnetEventParameterChangeOfLifeSavetyListOfAlarmValues); ok { return casted } if casted, ok := structType.(*BACnetEventParameterChangeOfLifeSavetyListOfAlarmValues); ok { @@ -118,6 +122,7 @@ func (m *_BACnetEventParameterChangeOfLifeSavetyListOfAlarmValues) GetLengthInBi return lengthInBits } + func (m *_BACnetEventParameterChangeOfLifeSavetyListOfAlarmValues) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +144,7 @@ func BACnetEventParameterChangeOfLifeSavetyListOfAlarmValuesParseWithBuffer(ctx if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetEventParameterChangeOfLifeSavetyListOfAlarmValues") } @@ -155,8 +160,8 @@ func BACnetEventParameterChangeOfLifeSavetyListOfAlarmValuesParseWithBuffer(ctx // Terminated array var listOfAlarmValues []BACnetLifeSafetyStateTagged { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetLifeSafetyStateTaggedParseWithBuffer(ctx, readBuffer, uint8(0), TagClass_APPLICATION_TAGS) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetLifeSafetyStateTaggedParseWithBuffer(ctx, readBuffer , uint8(0) , TagClass_APPLICATION_TAGS ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'listOfAlarmValues' field of BACnetEventParameterChangeOfLifeSavetyListOfAlarmValues") } @@ -171,7 +176,7 @@ func BACnetEventParameterChangeOfLifeSavetyListOfAlarmValuesParseWithBuffer(ctx if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetEventParameterChangeOfLifeSavetyListOfAlarmValues") } @@ -186,11 +191,11 @@ func BACnetEventParameterChangeOfLifeSavetyListOfAlarmValuesParseWithBuffer(ctx // Create the instance return &_BACnetEventParameterChangeOfLifeSavetyListOfAlarmValues{ - TagNumber: tagNumber, - OpeningTag: openingTag, - ListOfAlarmValues: listOfAlarmValues, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + ListOfAlarmValues: listOfAlarmValues, + ClosingTag: closingTag, + }, nil } func (m *_BACnetEventParameterChangeOfLifeSavetyListOfAlarmValues) Serialize() ([]byte, error) { @@ -204,7 +209,7 @@ func (m *_BACnetEventParameterChangeOfLifeSavetyListOfAlarmValues) Serialize() ( func (m *_BACnetEventParameterChangeOfLifeSavetyListOfAlarmValues) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetEventParameterChangeOfLifeSavetyListOfAlarmValues"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetEventParameterChangeOfLifeSavetyListOfAlarmValues"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetEventParameterChangeOfLifeSavetyListOfAlarmValues") } @@ -255,13 +260,13 @@ func (m *_BACnetEventParameterChangeOfLifeSavetyListOfAlarmValues) SerializeWith return nil } + //// // Arguments Getter func (m *_BACnetEventParameterChangeOfLifeSavetyListOfAlarmValues) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -279,3 +284,6 @@ func (m *_BACnetEventParameterChangeOfLifeSavetyListOfAlarmValues) String() stri } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues.go index a69b8fe924b..a842ede4a5e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues is the corresponding interface of BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues type BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues interface { @@ -49,14 +51,15 @@ type BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValuesExactly in // _BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues is the data-structure of this message type _BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues struct { - OpeningTag BACnetOpeningTag - ListOfLifeSavetyAlarmValues []BACnetLifeSafetyStateTagged - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + ListOfLifeSavetyAlarmValues []BACnetLifeSafetyStateTagged + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -79,14 +82,15 @@ func (m *_BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues) Get /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues factory function for _BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues -func NewBACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues(openingTag BACnetOpeningTag, listOfLifeSavetyAlarmValues []BACnetLifeSafetyStateTagged, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues { - return &_BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues{OpeningTag: openingTag, ListOfLifeSavetyAlarmValues: listOfLifeSavetyAlarmValues, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues( openingTag BACnetOpeningTag , listOfLifeSavetyAlarmValues []BACnetLifeSafetyStateTagged , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues { +return &_BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues{ OpeningTag: openingTag , ListOfLifeSavetyAlarmValues: listOfLifeSavetyAlarmValues , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues(structType interface{}) BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues { - if casted, ok := structType.(BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues); ok { + if casted, ok := structType.(BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues); ok { return casted } if casted, ok := structType.(*BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues); ok { @@ -118,6 +122,7 @@ func (m *_BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues) Get return lengthInBits } + func (m *_BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +144,7 @@ func BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValuesParseWithB if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues") } @@ -155,8 +160,8 @@ func BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValuesParseWithB // Terminated array var listOfLifeSavetyAlarmValues []BACnetLifeSafetyStateTagged { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetLifeSafetyStateTaggedParseWithBuffer(ctx, readBuffer, uint8(0), TagClass_APPLICATION_TAGS) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetLifeSafetyStateTaggedParseWithBuffer(ctx, readBuffer , uint8(0) , TagClass_APPLICATION_TAGS ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'listOfLifeSavetyAlarmValues' field of BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues") } @@ -171,7 +176,7 @@ func BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValuesParseWithB if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues") } @@ -186,11 +191,11 @@ func BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValuesParseWithB // Create the instance return &_BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues{ - TagNumber: tagNumber, - OpeningTag: openingTag, - ListOfLifeSavetyAlarmValues: listOfLifeSavetyAlarmValues, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + ListOfLifeSavetyAlarmValues: listOfLifeSavetyAlarmValues, + ClosingTag: closingTag, + }, nil } func (m *_BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues) Serialize() ([]byte, error) { @@ -204,7 +209,7 @@ func (m *_BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues) Ser func (m *_BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues") } @@ -255,13 +260,13 @@ func (m *_BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues) Ser return nil } + //// // Arguments Getter func (m *_BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -279,3 +284,6 @@ func (m *_BACnetEventParameterChangeOfLifeSavetyListOfLifeSavetyAlarmValues) Str } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfState.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfState.go index 534726edf7c..2f53ecc44b7 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfState.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfState.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventParameterChangeOfState is the corresponding interface of BACnetEventParameterChangeOfState type BACnetEventParameterChangeOfState interface { @@ -52,12 +54,14 @@ type BACnetEventParameterChangeOfStateExactly interface { // _BACnetEventParameterChangeOfState is the data-structure of this message type _BACnetEventParameterChangeOfState struct { *_BACnetEventParameter - OpeningTag BACnetOpeningTag - TimeDelay BACnetContextTagUnsignedInteger - ListOfValues BACnetEventParameterChangeOfStateListOfValues - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + TimeDelay BACnetContextTagUnsignedInteger + ListOfValues BACnetEventParameterChangeOfStateListOfValues + ClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -68,14 +72,12 @@ type _BACnetEventParameterChangeOfState struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetEventParameterChangeOfState) InitializeParent(parent BACnetEventParameter, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetEventParameterChangeOfState) InitializeParent(parent BACnetEventParameter , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetEventParameterChangeOfState) GetParent() BACnetEventParameter { +func (m *_BACnetEventParameterChangeOfState) GetParent() BACnetEventParameter { return m._BACnetEventParameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -102,14 +104,15 @@ func (m *_BACnetEventParameterChangeOfState) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventParameterChangeOfState factory function for _BACnetEventParameterChangeOfState -func NewBACnetEventParameterChangeOfState(openingTag BACnetOpeningTag, timeDelay BACnetContextTagUnsignedInteger, listOfValues BACnetEventParameterChangeOfStateListOfValues, closingTag BACnetClosingTag, peekedTagHeader BACnetTagHeader) *_BACnetEventParameterChangeOfState { +func NewBACnetEventParameterChangeOfState( openingTag BACnetOpeningTag , timeDelay BACnetContextTagUnsignedInteger , listOfValues BACnetEventParameterChangeOfStateListOfValues , closingTag BACnetClosingTag , peekedTagHeader BACnetTagHeader ) *_BACnetEventParameterChangeOfState { _result := &_BACnetEventParameterChangeOfState{ - OpeningTag: openingTag, - TimeDelay: timeDelay, - ListOfValues: listOfValues, - ClosingTag: closingTag, - _BACnetEventParameter: NewBACnetEventParameter(peekedTagHeader), + OpeningTag: openingTag, + TimeDelay: timeDelay, + ListOfValues: listOfValues, + ClosingTag: closingTag, + _BACnetEventParameter: NewBACnetEventParameter(peekedTagHeader), } _result._BACnetEventParameter._BACnetEventParameterChildRequirements = _result return _result @@ -117,7 +120,7 @@ func NewBACnetEventParameterChangeOfState(openingTag BACnetOpeningTag, timeDelay // Deprecated: use the interface for direct cast func CastBACnetEventParameterChangeOfState(structType interface{}) BACnetEventParameterChangeOfState { - if casted, ok := structType.(BACnetEventParameterChangeOfState); ok { + if casted, ok := structType.(BACnetEventParameterChangeOfState); ok { return casted } if casted, ok := structType.(*BACnetEventParameterChangeOfState); ok { @@ -148,6 +151,7 @@ func (m *_BACnetEventParameterChangeOfState) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetEventParameterChangeOfState) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -169,7 +173,7 @@ func BACnetEventParameterChangeOfStateParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1))) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetEventParameterChangeOfState") } @@ -182,7 +186,7 @@ func BACnetEventParameterChangeOfStateParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("timeDelay"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeDelay") } - _timeDelay, _timeDelayErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_timeDelay, _timeDelayErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _timeDelayErr != nil { return nil, errors.Wrap(_timeDelayErr, "Error parsing 'timeDelay' field of BACnetEventParameterChangeOfState") } @@ -195,7 +199,7 @@ func BACnetEventParameterChangeOfStateParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("listOfValues"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for listOfValues") } - _listOfValues, _listOfValuesErr := BACnetEventParameterChangeOfStateListOfValuesParseWithBuffer(ctx, readBuffer, uint8(uint8(1))) +_listOfValues, _listOfValuesErr := BACnetEventParameterChangeOfStateListOfValuesParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) ) if _listOfValuesErr != nil { return nil, errors.Wrap(_listOfValuesErr, "Error parsing 'listOfValues' field of BACnetEventParameterChangeOfState") } @@ -208,7 +212,7 @@ func BACnetEventParameterChangeOfStateParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1))) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetEventParameterChangeOfState") } @@ -223,11 +227,12 @@ func BACnetEventParameterChangeOfStateParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetEventParameterChangeOfState{ - _BACnetEventParameter: &_BACnetEventParameter{}, - OpeningTag: openingTag, - TimeDelay: timeDelay, - ListOfValues: listOfValues, - ClosingTag: closingTag, + _BACnetEventParameter: &_BACnetEventParameter{ + }, + OpeningTag: openingTag, + TimeDelay: timeDelay, + ListOfValues: listOfValues, + ClosingTag: closingTag, } _child._BACnetEventParameter._BACnetEventParameterChildRequirements = _child return _child, nil @@ -249,53 +254,53 @@ func (m *_BACnetEventParameterChangeOfState) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetEventParameterChangeOfState") } - // Simple Field (openingTag) - if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for openingTag") - } - _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) - if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for openingTag") - } - if _openingTagErr != nil { - return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") - } + // Simple Field (openingTag) + if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for openingTag") + } + _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) + if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for openingTag") + } + if _openingTagErr != nil { + return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") + } - // Simple Field (timeDelay) - if pushErr := writeBuffer.PushContext("timeDelay"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timeDelay") - } - _timeDelayErr := writeBuffer.WriteSerializable(ctx, m.GetTimeDelay()) - if popErr := writeBuffer.PopContext("timeDelay"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timeDelay") - } - if _timeDelayErr != nil { - return errors.Wrap(_timeDelayErr, "Error serializing 'timeDelay' field") - } + // Simple Field (timeDelay) + if pushErr := writeBuffer.PushContext("timeDelay"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timeDelay") + } + _timeDelayErr := writeBuffer.WriteSerializable(ctx, m.GetTimeDelay()) + if popErr := writeBuffer.PopContext("timeDelay"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timeDelay") + } + if _timeDelayErr != nil { + return errors.Wrap(_timeDelayErr, "Error serializing 'timeDelay' field") + } - // Simple Field (listOfValues) - if pushErr := writeBuffer.PushContext("listOfValues"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for listOfValues") - } - _listOfValuesErr := writeBuffer.WriteSerializable(ctx, m.GetListOfValues()) - if popErr := writeBuffer.PopContext("listOfValues"); popErr != nil { - return errors.Wrap(popErr, "Error popping for listOfValues") - } - if _listOfValuesErr != nil { - return errors.Wrap(_listOfValuesErr, "Error serializing 'listOfValues' field") - } + // Simple Field (listOfValues) + if pushErr := writeBuffer.PushContext("listOfValues"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for listOfValues") + } + _listOfValuesErr := writeBuffer.WriteSerializable(ctx, m.GetListOfValues()) + if popErr := writeBuffer.PopContext("listOfValues"); popErr != nil { + return errors.Wrap(popErr, "Error popping for listOfValues") + } + if _listOfValuesErr != nil { + return errors.Wrap(_listOfValuesErr, "Error serializing 'listOfValues' field") + } - // Simple Field (closingTag) - if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for closingTag") - } - _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) - if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for closingTag") - } - if _closingTagErr != nil { - return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") - } + // Simple Field (closingTag) + if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for closingTag") + } + _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) + if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for closingTag") + } + if _closingTagErr != nil { + return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") + } if popErr := writeBuffer.PopContext("BACnetEventParameterChangeOfState"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetEventParameterChangeOfState") @@ -305,6 +310,7 @@ func (m *_BACnetEventParameterChangeOfState) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetEventParameterChangeOfState) isBACnetEventParameterChangeOfState() bool { return true } @@ -319,3 +325,6 @@ func (m *_BACnetEventParameterChangeOfState) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfStateListOfValues.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfStateListOfValues.go index a774eb3f5d7..aeab6e7227f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfStateListOfValues.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfStateListOfValues.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventParameterChangeOfStateListOfValues is the corresponding interface of BACnetEventParameterChangeOfStateListOfValues type BACnetEventParameterChangeOfStateListOfValues interface { @@ -49,14 +51,15 @@ type BACnetEventParameterChangeOfStateListOfValuesExactly interface { // _BACnetEventParameterChangeOfStateListOfValues is the data-structure of this message type _BACnetEventParameterChangeOfStateListOfValues struct { - OpeningTag BACnetOpeningTag - ListOfValues []BACnetPropertyStates - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + ListOfValues []BACnetPropertyStates + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -79,14 +82,15 @@ func (m *_BACnetEventParameterChangeOfStateListOfValues) GetClosingTag() BACnetC /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventParameterChangeOfStateListOfValues factory function for _BACnetEventParameterChangeOfStateListOfValues -func NewBACnetEventParameterChangeOfStateListOfValues(openingTag BACnetOpeningTag, listOfValues []BACnetPropertyStates, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetEventParameterChangeOfStateListOfValues { - return &_BACnetEventParameterChangeOfStateListOfValues{OpeningTag: openingTag, ListOfValues: listOfValues, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetEventParameterChangeOfStateListOfValues( openingTag BACnetOpeningTag , listOfValues []BACnetPropertyStates , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetEventParameterChangeOfStateListOfValues { +return &_BACnetEventParameterChangeOfStateListOfValues{ OpeningTag: openingTag , ListOfValues: listOfValues , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetEventParameterChangeOfStateListOfValues(structType interface{}) BACnetEventParameterChangeOfStateListOfValues { - if casted, ok := structType.(BACnetEventParameterChangeOfStateListOfValues); ok { + if casted, ok := structType.(BACnetEventParameterChangeOfStateListOfValues); ok { return casted } if casted, ok := structType.(*BACnetEventParameterChangeOfStateListOfValues); ok { @@ -118,6 +122,7 @@ func (m *_BACnetEventParameterChangeOfStateListOfValues) GetLengthInBits(ctx con return lengthInBits } + func (m *_BACnetEventParameterChangeOfStateListOfValues) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +144,7 @@ func BACnetEventParameterChangeOfStateListOfValuesParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetEventParameterChangeOfStateListOfValues") } @@ -155,8 +160,8 @@ func BACnetEventParameterChangeOfStateListOfValuesParseWithBuffer(ctx context.Co // Terminated array var listOfValues []BACnetPropertyStates { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetPropertyStatesParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetPropertyStatesParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'listOfValues' field of BACnetEventParameterChangeOfStateListOfValues") } @@ -171,7 +176,7 @@ func BACnetEventParameterChangeOfStateListOfValuesParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetEventParameterChangeOfStateListOfValues") } @@ -186,11 +191,11 @@ func BACnetEventParameterChangeOfStateListOfValuesParseWithBuffer(ctx context.Co // Create the instance return &_BACnetEventParameterChangeOfStateListOfValues{ - TagNumber: tagNumber, - OpeningTag: openingTag, - ListOfValues: listOfValues, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + ListOfValues: listOfValues, + ClosingTag: closingTag, + }, nil } func (m *_BACnetEventParameterChangeOfStateListOfValues) Serialize() ([]byte, error) { @@ -204,7 +209,7 @@ func (m *_BACnetEventParameterChangeOfStateListOfValues) Serialize() ([]byte, er func (m *_BACnetEventParameterChangeOfStateListOfValues) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetEventParameterChangeOfStateListOfValues"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetEventParameterChangeOfStateListOfValues"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetEventParameterChangeOfStateListOfValues") } @@ -255,13 +260,13 @@ func (m *_BACnetEventParameterChangeOfStateListOfValues) SerializeWithWriteBuffe return nil } + //// // Arguments Getter func (m *_BACnetEventParameterChangeOfStateListOfValues) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -279,3 +284,6 @@ func (m *_BACnetEventParameterChangeOfStateListOfValues) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfStatusFlags.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfStatusFlags.go index f93a9345cf4..8eb11b50fe7 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfStatusFlags.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfStatusFlags.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventParameterChangeOfStatusFlags is the corresponding interface of BACnetEventParameterChangeOfStatusFlags type BACnetEventParameterChangeOfStatusFlags interface { @@ -52,12 +54,14 @@ type BACnetEventParameterChangeOfStatusFlagsExactly interface { // _BACnetEventParameterChangeOfStatusFlags is the data-structure of this message type _BACnetEventParameterChangeOfStatusFlags struct { *_BACnetEventParameter - OpeningTag BACnetOpeningTag - TimeDelay BACnetContextTagUnsignedInteger - SelectedFlags BACnetStatusFlagsTagged - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + TimeDelay BACnetContextTagUnsignedInteger + SelectedFlags BACnetStatusFlagsTagged + ClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -68,14 +72,12 @@ type _BACnetEventParameterChangeOfStatusFlags struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetEventParameterChangeOfStatusFlags) InitializeParent(parent BACnetEventParameter, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetEventParameterChangeOfStatusFlags) InitializeParent(parent BACnetEventParameter , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetEventParameterChangeOfStatusFlags) GetParent() BACnetEventParameter { +func (m *_BACnetEventParameterChangeOfStatusFlags) GetParent() BACnetEventParameter { return m._BACnetEventParameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -102,14 +104,15 @@ func (m *_BACnetEventParameterChangeOfStatusFlags) GetClosingTag() BACnetClosing /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventParameterChangeOfStatusFlags factory function for _BACnetEventParameterChangeOfStatusFlags -func NewBACnetEventParameterChangeOfStatusFlags(openingTag BACnetOpeningTag, timeDelay BACnetContextTagUnsignedInteger, selectedFlags BACnetStatusFlagsTagged, closingTag BACnetClosingTag, peekedTagHeader BACnetTagHeader) *_BACnetEventParameterChangeOfStatusFlags { +func NewBACnetEventParameterChangeOfStatusFlags( openingTag BACnetOpeningTag , timeDelay BACnetContextTagUnsignedInteger , selectedFlags BACnetStatusFlagsTagged , closingTag BACnetClosingTag , peekedTagHeader BACnetTagHeader ) *_BACnetEventParameterChangeOfStatusFlags { _result := &_BACnetEventParameterChangeOfStatusFlags{ - OpeningTag: openingTag, - TimeDelay: timeDelay, - SelectedFlags: selectedFlags, - ClosingTag: closingTag, - _BACnetEventParameter: NewBACnetEventParameter(peekedTagHeader), + OpeningTag: openingTag, + TimeDelay: timeDelay, + SelectedFlags: selectedFlags, + ClosingTag: closingTag, + _BACnetEventParameter: NewBACnetEventParameter(peekedTagHeader), } _result._BACnetEventParameter._BACnetEventParameterChildRequirements = _result return _result @@ -117,7 +120,7 @@ func NewBACnetEventParameterChangeOfStatusFlags(openingTag BACnetOpeningTag, tim // Deprecated: use the interface for direct cast func CastBACnetEventParameterChangeOfStatusFlags(structType interface{}) BACnetEventParameterChangeOfStatusFlags { - if casted, ok := structType.(BACnetEventParameterChangeOfStatusFlags); ok { + if casted, ok := structType.(BACnetEventParameterChangeOfStatusFlags); ok { return casted } if casted, ok := structType.(*BACnetEventParameterChangeOfStatusFlags); ok { @@ -148,6 +151,7 @@ func (m *_BACnetEventParameterChangeOfStatusFlags) GetLengthInBits(ctx context.C return lengthInBits } + func (m *_BACnetEventParameterChangeOfStatusFlags) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -169,7 +173,7 @@ func BACnetEventParameterChangeOfStatusFlagsParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(uint8(18))) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( uint8(18) ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetEventParameterChangeOfStatusFlags") } @@ -182,7 +186,7 @@ func BACnetEventParameterChangeOfStatusFlagsParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("timeDelay"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeDelay") } - _timeDelay, _timeDelayErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_timeDelay, _timeDelayErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _timeDelayErr != nil { return nil, errors.Wrap(_timeDelayErr, "Error parsing 'timeDelay' field of BACnetEventParameterChangeOfStatusFlags") } @@ -195,7 +199,7 @@ func BACnetEventParameterChangeOfStatusFlagsParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("selectedFlags"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for selectedFlags") } - _selectedFlags, _selectedFlagsErr := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_selectedFlags, _selectedFlagsErr := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _selectedFlagsErr != nil { return nil, errors.Wrap(_selectedFlagsErr, "Error parsing 'selectedFlags' field of BACnetEventParameterChangeOfStatusFlags") } @@ -208,7 +212,7 @@ func BACnetEventParameterChangeOfStatusFlagsParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(uint8(18))) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( uint8(18) ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetEventParameterChangeOfStatusFlags") } @@ -223,11 +227,12 @@ func BACnetEventParameterChangeOfStatusFlagsParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetEventParameterChangeOfStatusFlags{ - _BACnetEventParameter: &_BACnetEventParameter{}, - OpeningTag: openingTag, - TimeDelay: timeDelay, - SelectedFlags: selectedFlags, - ClosingTag: closingTag, + _BACnetEventParameter: &_BACnetEventParameter{ + }, + OpeningTag: openingTag, + TimeDelay: timeDelay, + SelectedFlags: selectedFlags, + ClosingTag: closingTag, } _child._BACnetEventParameter._BACnetEventParameterChildRequirements = _child return _child, nil @@ -249,53 +254,53 @@ func (m *_BACnetEventParameterChangeOfStatusFlags) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetEventParameterChangeOfStatusFlags") } - // Simple Field (openingTag) - if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for openingTag") - } - _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) - if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for openingTag") - } - if _openingTagErr != nil { - return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") - } + // Simple Field (openingTag) + if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for openingTag") + } + _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) + if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for openingTag") + } + if _openingTagErr != nil { + return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") + } - // Simple Field (timeDelay) - if pushErr := writeBuffer.PushContext("timeDelay"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timeDelay") - } - _timeDelayErr := writeBuffer.WriteSerializable(ctx, m.GetTimeDelay()) - if popErr := writeBuffer.PopContext("timeDelay"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timeDelay") - } - if _timeDelayErr != nil { - return errors.Wrap(_timeDelayErr, "Error serializing 'timeDelay' field") - } + // Simple Field (timeDelay) + if pushErr := writeBuffer.PushContext("timeDelay"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timeDelay") + } + _timeDelayErr := writeBuffer.WriteSerializable(ctx, m.GetTimeDelay()) + if popErr := writeBuffer.PopContext("timeDelay"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timeDelay") + } + if _timeDelayErr != nil { + return errors.Wrap(_timeDelayErr, "Error serializing 'timeDelay' field") + } - // Simple Field (selectedFlags) - if pushErr := writeBuffer.PushContext("selectedFlags"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for selectedFlags") - } - _selectedFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetSelectedFlags()) - if popErr := writeBuffer.PopContext("selectedFlags"); popErr != nil { - return errors.Wrap(popErr, "Error popping for selectedFlags") - } - if _selectedFlagsErr != nil { - return errors.Wrap(_selectedFlagsErr, "Error serializing 'selectedFlags' field") - } + // Simple Field (selectedFlags) + if pushErr := writeBuffer.PushContext("selectedFlags"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for selectedFlags") + } + _selectedFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetSelectedFlags()) + if popErr := writeBuffer.PopContext("selectedFlags"); popErr != nil { + return errors.Wrap(popErr, "Error popping for selectedFlags") + } + if _selectedFlagsErr != nil { + return errors.Wrap(_selectedFlagsErr, "Error serializing 'selectedFlags' field") + } - // Simple Field (closingTag) - if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for closingTag") - } - _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) - if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for closingTag") - } - if _closingTagErr != nil { - return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") - } + // Simple Field (closingTag) + if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for closingTag") + } + _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) + if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for closingTag") + } + if _closingTagErr != nil { + return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") + } if popErr := writeBuffer.PopContext("BACnetEventParameterChangeOfStatusFlags"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetEventParameterChangeOfStatusFlags") @@ -305,6 +310,7 @@ func (m *_BACnetEventParameterChangeOfStatusFlags) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetEventParameterChangeOfStatusFlags) isBACnetEventParameterChangeOfStatusFlags() bool { return true } @@ -319,3 +325,6 @@ func (m *_BACnetEventParameterChangeOfStatusFlags) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfTimer.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfTimer.go index 0003404569a..eb27a441792 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfTimer.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfTimer.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventParameterChangeOfTimer is the corresponding interface of BACnetEventParameterChangeOfTimer type BACnetEventParameterChangeOfTimer interface { @@ -54,13 +56,15 @@ type BACnetEventParameterChangeOfTimerExactly interface { // _BACnetEventParameterChangeOfTimer is the data-structure of this message type _BACnetEventParameterChangeOfTimer struct { *_BACnetEventParameter - OpeningTag BACnetOpeningTag - TimeDelay BACnetContextTagUnsignedInteger - AlarmValues BACnetEventParameterChangeOfTimerAlarmValue - UpdateTimeReference BACnetDeviceObjectPropertyReferenceEnclosed - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + TimeDelay BACnetContextTagUnsignedInteger + AlarmValues BACnetEventParameterChangeOfTimerAlarmValue + UpdateTimeReference BACnetDeviceObjectPropertyReferenceEnclosed + ClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -71,14 +75,12 @@ type _BACnetEventParameterChangeOfTimer struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetEventParameterChangeOfTimer) InitializeParent(parent BACnetEventParameter, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetEventParameterChangeOfTimer) InitializeParent(parent BACnetEventParameter , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetEventParameterChangeOfTimer) GetParent() BACnetEventParameter { +func (m *_BACnetEventParameterChangeOfTimer) GetParent() BACnetEventParameter { return m._BACnetEventParameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -109,15 +111,16 @@ func (m *_BACnetEventParameterChangeOfTimer) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventParameterChangeOfTimer factory function for _BACnetEventParameterChangeOfTimer -func NewBACnetEventParameterChangeOfTimer(openingTag BACnetOpeningTag, timeDelay BACnetContextTagUnsignedInteger, alarmValues BACnetEventParameterChangeOfTimerAlarmValue, updateTimeReference BACnetDeviceObjectPropertyReferenceEnclosed, closingTag BACnetClosingTag, peekedTagHeader BACnetTagHeader) *_BACnetEventParameterChangeOfTimer { +func NewBACnetEventParameterChangeOfTimer( openingTag BACnetOpeningTag , timeDelay BACnetContextTagUnsignedInteger , alarmValues BACnetEventParameterChangeOfTimerAlarmValue , updateTimeReference BACnetDeviceObjectPropertyReferenceEnclosed , closingTag BACnetClosingTag , peekedTagHeader BACnetTagHeader ) *_BACnetEventParameterChangeOfTimer { _result := &_BACnetEventParameterChangeOfTimer{ - OpeningTag: openingTag, - TimeDelay: timeDelay, - AlarmValues: alarmValues, - UpdateTimeReference: updateTimeReference, - ClosingTag: closingTag, - _BACnetEventParameter: NewBACnetEventParameter(peekedTagHeader), + OpeningTag: openingTag, + TimeDelay: timeDelay, + AlarmValues: alarmValues, + UpdateTimeReference: updateTimeReference, + ClosingTag: closingTag, + _BACnetEventParameter: NewBACnetEventParameter(peekedTagHeader), } _result._BACnetEventParameter._BACnetEventParameterChildRequirements = _result return _result @@ -125,7 +128,7 @@ func NewBACnetEventParameterChangeOfTimer(openingTag BACnetOpeningTag, timeDelay // Deprecated: use the interface for direct cast func CastBACnetEventParameterChangeOfTimer(structType interface{}) BACnetEventParameterChangeOfTimer { - if casted, ok := structType.(BACnetEventParameterChangeOfTimer); ok { + if casted, ok := structType.(BACnetEventParameterChangeOfTimer); ok { return casted } if casted, ok := structType.(*BACnetEventParameterChangeOfTimer); ok { @@ -159,6 +162,7 @@ func (m *_BACnetEventParameterChangeOfTimer) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetEventParameterChangeOfTimer) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -180,7 +184,7 @@ func BACnetEventParameterChangeOfTimerParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(uint8(22))) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( uint8(22) ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetEventParameterChangeOfTimer") } @@ -193,7 +197,7 @@ func BACnetEventParameterChangeOfTimerParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("timeDelay"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeDelay") } - _timeDelay, _timeDelayErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_timeDelay, _timeDelayErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _timeDelayErr != nil { return nil, errors.Wrap(_timeDelayErr, "Error parsing 'timeDelay' field of BACnetEventParameterChangeOfTimer") } @@ -206,7 +210,7 @@ func BACnetEventParameterChangeOfTimerParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("alarmValues"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for alarmValues") } - _alarmValues, _alarmValuesErr := BACnetEventParameterChangeOfTimerAlarmValueParseWithBuffer(ctx, readBuffer, uint8(uint8(1))) +_alarmValues, _alarmValuesErr := BACnetEventParameterChangeOfTimerAlarmValueParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) ) if _alarmValuesErr != nil { return nil, errors.Wrap(_alarmValuesErr, "Error parsing 'alarmValues' field of BACnetEventParameterChangeOfTimer") } @@ -219,7 +223,7 @@ func BACnetEventParameterChangeOfTimerParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("updateTimeReference"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for updateTimeReference") } - _updateTimeReference, _updateTimeReferenceErr := BACnetDeviceObjectPropertyReferenceEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(2))) +_updateTimeReference, _updateTimeReferenceErr := BACnetDeviceObjectPropertyReferenceEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) ) if _updateTimeReferenceErr != nil { return nil, errors.Wrap(_updateTimeReferenceErr, "Error parsing 'updateTimeReference' field of BACnetEventParameterChangeOfTimer") } @@ -232,7 +236,7 @@ func BACnetEventParameterChangeOfTimerParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(uint8(22))) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( uint8(22) ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetEventParameterChangeOfTimer") } @@ -247,12 +251,13 @@ func BACnetEventParameterChangeOfTimerParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetEventParameterChangeOfTimer{ - _BACnetEventParameter: &_BACnetEventParameter{}, - OpeningTag: openingTag, - TimeDelay: timeDelay, - AlarmValues: alarmValues, - UpdateTimeReference: updateTimeReference, - ClosingTag: closingTag, + _BACnetEventParameter: &_BACnetEventParameter{ + }, + OpeningTag: openingTag, + TimeDelay: timeDelay, + AlarmValues: alarmValues, + UpdateTimeReference: updateTimeReference, + ClosingTag: closingTag, } _child._BACnetEventParameter._BACnetEventParameterChildRequirements = _child return _child, nil @@ -274,65 +279,65 @@ func (m *_BACnetEventParameterChangeOfTimer) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetEventParameterChangeOfTimer") } - // Simple Field (openingTag) - if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for openingTag") - } - _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) - if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for openingTag") - } - if _openingTagErr != nil { - return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") - } + // Simple Field (openingTag) + if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for openingTag") + } + _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) + if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for openingTag") + } + if _openingTagErr != nil { + return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") + } - // Simple Field (timeDelay) - if pushErr := writeBuffer.PushContext("timeDelay"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timeDelay") - } - _timeDelayErr := writeBuffer.WriteSerializable(ctx, m.GetTimeDelay()) - if popErr := writeBuffer.PopContext("timeDelay"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timeDelay") - } - if _timeDelayErr != nil { - return errors.Wrap(_timeDelayErr, "Error serializing 'timeDelay' field") - } + // Simple Field (timeDelay) + if pushErr := writeBuffer.PushContext("timeDelay"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timeDelay") + } + _timeDelayErr := writeBuffer.WriteSerializable(ctx, m.GetTimeDelay()) + if popErr := writeBuffer.PopContext("timeDelay"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timeDelay") + } + if _timeDelayErr != nil { + return errors.Wrap(_timeDelayErr, "Error serializing 'timeDelay' field") + } - // Simple Field (alarmValues) - if pushErr := writeBuffer.PushContext("alarmValues"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for alarmValues") - } - _alarmValuesErr := writeBuffer.WriteSerializable(ctx, m.GetAlarmValues()) - if popErr := writeBuffer.PopContext("alarmValues"); popErr != nil { - return errors.Wrap(popErr, "Error popping for alarmValues") - } - if _alarmValuesErr != nil { - return errors.Wrap(_alarmValuesErr, "Error serializing 'alarmValues' field") - } + // Simple Field (alarmValues) + if pushErr := writeBuffer.PushContext("alarmValues"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for alarmValues") + } + _alarmValuesErr := writeBuffer.WriteSerializable(ctx, m.GetAlarmValues()) + if popErr := writeBuffer.PopContext("alarmValues"); popErr != nil { + return errors.Wrap(popErr, "Error popping for alarmValues") + } + if _alarmValuesErr != nil { + return errors.Wrap(_alarmValuesErr, "Error serializing 'alarmValues' field") + } - // Simple Field (updateTimeReference) - if pushErr := writeBuffer.PushContext("updateTimeReference"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for updateTimeReference") - } - _updateTimeReferenceErr := writeBuffer.WriteSerializable(ctx, m.GetUpdateTimeReference()) - if popErr := writeBuffer.PopContext("updateTimeReference"); popErr != nil { - return errors.Wrap(popErr, "Error popping for updateTimeReference") - } - if _updateTimeReferenceErr != nil { - return errors.Wrap(_updateTimeReferenceErr, "Error serializing 'updateTimeReference' field") - } + // Simple Field (updateTimeReference) + if pushErr := writeBuffer.PushContext("updateTimeReference"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for updateTimeReference") + } + _updateTimeReferenceErr := writeBuffer.WriteSerializable(ctx, m.GetUpdateTimeReference()) + if popErr := writeBuffer.PopContext("updateTimeReference"); popErr != nil { + return errors.Wrap(popErr, "Error popping for updateTimeReference") + } + if _updateTimeReferenceErr != nil { + return errors.Wrap(_updateTimeReferenceErr, "Error serializing 'updateTimeReference' field") + } - // Simple Field (closingTag) - if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for closingTag") - } - _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) - if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for closingTag") - } - if _closingTagErr != nil { - return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") - } + // Simple Field (closingTag) + if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for closingTag") + } + _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) + if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for closingTag") + } + if _closingTagErr != nil { + return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") + } if popErr := writeBuffer.PopContext("BACnetEventParameterChangeOfTimer"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetEventParameterChangeOfTimer") @@ -342,6 +347,7 @@ func (m *_BACnetEventParameterChangeOfTimer) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetEventParameterChangeOfTimer) isBACnetEventParameterChangeOfTimer() bool { return true } @@ -356,3 +362,6 @@ func (m *_BACnetEventParameterChangeOfTimer) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfTimerAlarmValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfTimerAlarmValue.go index e33b58839db..b0a40ea24e5 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfTimerAlarmValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfTimerAlarmValue.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventParameterChangeOfTimerAlarmValue is the corresponding interface of BACnetEventParameterChangeOfTimerAlarmValue type BACnetEventParameterChangeOfTimerAlarmValue interface { @@ -49,14 +51,15 @@ type BACnetEventParameterChangeOfTimerAlarmValueExactly interface { // _BACnetEventParameterChangeOfTimerAlarmValue is the data-structure of this message type _BACnetEventParameterChangeOfTimerAlarmValue struct { - OpeningTag BACnetOpeningTag - AlarmValues []BACnetTimerStateTagged - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + AlarmValues []BACnetTimerStateTagged + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -79,14 +82,15 @@ func (m *_BACnetEventParameterChangeOfTimerAlarmValue) GetClosingTag() BACnetClo /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventParameterChangeOfTimerAlarmValue factory function for _BACnetEventParameterChangeOfTimerAlarmValue -func NewBACnetEventParameterChangeOfTimerAlarmValue(openingTag BACnetOpeningTag, alarmValues []BACnetTimerStateTagged, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetEventParameterChangeOfTimerAlarmValue { - return &_BACnetEventParameterChangeOfTimerAlarmValue{OpeningTag: openingTag, AlarmValues: alarmValues, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetEventParameterChangeOfTimerAlarmValue( openingTag BACnetOpeningTag , alarmValues []BACnetTimerStateTagged , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetEventParameterChangeOfTimerAlarmValue { +return &_BACnetEventParameterChangeOfTimerAlarmValue{ OpeningTag: openingTag , AlarmValues: alarmValues , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetEventParameterChangeOfTimerAlarmValue(structType interface{}) BACnetEventParameterChangeOfTimerAlarmValue { - if casted, ok := structType.(BACnetEventParameterChangeOfTimerAlarmValue); ok { + if casted, ok := structType.(BACnetEventParameterChangeOfTimerAlarmValue); ok { return casted } if casted, ok := structType.(*BACnetEventParameterChangeOfTimerAlarmValue); ok { @@ -118,6 +122,7 @@ func (m *_BACnetEventParameterChangeOfTimerAlarmValue) GetLengthInBits(ctx conte return lengthInBits } + func (m *_BACnetEventParameterChangeOfTimerAlarmValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +144,7 @@ func BACnetEventParameterChangeOfTimerAlarmValueParseWithBuffer(ctx context.Cont if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetEventParameterChangeOfTimerAlarmValue") } @@ -155,8 +160,8 @@ func BACnetEventParameterChangeOfTimerAlarmValueParseWithBuffer(ctx context.Cont // Terminated array var alarmValues []BACnetTimerStateTagged { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetTimerStateTaggedParseWithBuffer(ctx, readBuffer, uint8(0), TagClass_APPLICATION_TAGS) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetTimerStateTaggedParseWithBuffer(ctx, readBuffer , uint8(0) , TagClass_APPLICATION_TAGS ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'alarmValues' field of BACnetEventParameterChangeOfTimerAlarmValue") } @@ -171,7 +176,7 @@ func BACnetEventParameterChangeOfTimerAlarmValueParseWithBuffer(ctx context.Cont if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetEventParameterChangeOfTimerAlarmValue") } @@ -186,11 +191,11 @@ func BACnetEventParameterChangeOfTimerAlarmValueParseWithBuffer(ctx context.Cont // Create the instance return &_BACnetEventParameterChangeOfTimerAlarmValue{ - TagNumber: tagNumber, - OpeningTag: openingTag, - AlarmValues: alarmValues, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + AlarmValues: alarmValues, + ClosingTag: closingTag, + }, nil } func (m *_BACnetEventParameterChangeOfTimerAlarmValue) Serialize() ([]byte, error) { @@ -204,7 +209,7 @@ func (m *_BACnetEventParameterChangeOfTimerAlarmValue) Serialize() ([]byte, erro func (m *_BACnetEventParameterChangeOfTimerAlarmValue) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetEventParameterChangeOfTimerAlarmValue"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetEventParameterChangeOfTimerAlarmValue"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetEventParameterChangeOfTimerAlarmValue") } @@ -255,13 +260,13 @@ func (m *_BACnetEventParameterChangeOfTimerAlarmValue) SerializeWithWriteBuffer( return nil } + //// // Arguments Getter func (m *_BACnetEventParameterChangeOfTimerAlarmValue) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -279,3 +284,6 @@ func (m *_BACnetEventParameterChangeOfTimerAlarmValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfValue.go index ecb1a365695..04d026b4b4a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventParameterChangeOfValue is the corresponding interface of BACnetEventParameterChangeOfValue type BACnetEventParameterChangeOfValue interface { @@ -52,12 +54,14 @@ type BACnetEventParameterChangeOfValueExactly interface { // _BACnetEventParameterChangeOfValue is the data-structure of this message type _BACnetEventParameterChangeOfValue struct { *_BACnetEventParameter - OpeningTag BACnetOpeningTag - TimeDelay BACnetContextTagUnsignedInteger - CovCriteria BACnetEventParameterChangeOfValueCivCriteria - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + TimeDelay BACnetContextTagUnsignedInteger + CovCriteria BACnetEventParameterChangeOfValueCivCriteria + ClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -68,14 +72,12 @@ type _BACnetEventParameterChangeOfValue struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetEventParameterChangeOfValue) InitializeParent(parent BACnetEventParameter, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetEventParameterChangeOfValue) InitializeParent(parent BACnetEventParameter , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetEventParameterChangeOfValue) GetParent() BACnetEventParameter { +func (m *_BACnetEventParameterChangeOfValue) GetParent() BACnetEventParameter { return m._BACnetEventParameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -102,14 +104,15 @@ func (m *_BACnetEventParameterChangeOfValue) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventParameterChangeOfValue factory function for _BACnetEventParameterChangeOfValue -func NewBACnetEventParameterChangeOfValue(openingTag BACnetOpeningTag, timeDelay BACnetContextTagUnsignedInteger, covCriteria BACnetEventParameterChangeOfValueCivCriteria, closingTag BACnetClosingTag, peekedTagHeader BACnetTagHeader) *_BACnetEventParameterChangeOfValue { +func NewBACnetEventParameterChangeOfValue( openingTag BACnetOpeningTag , timeDelay BACnetContextTagUnsignedInteger , covCriteria BACnetEventParameterChangeOfValueCivCriteria , closingTag BACnetClosingTag , peekedTagHeader BACnetTagHeader ) *_BACnetEventParameterChangeOfValue { _result := &_BACnetEventParameterChangeOfValue{ - OpeningTag: openingTag, - TimeDelay: timeDelay, - CovCriteria: covCriteria, - ClosingTag: closingTag, - _BACnetEventParameter: NewBACnetEventParameter(peekedTagHeader), + OpeningTag: openingTag, + TimeDelay: timeDelay, + CovCriteria: covCriteria, + ClosingTag: closingTag, + _BACnetEventParameter: NewBACnetEventParameter(peekedTagHeader), } _result._BACnetEventParameter._BACnetEventParameterChildRequirements = _result return _result @@ -117,7 +120,7 @@ func NewBACnetEventParameterChangeOfValue(openingTag BACnetOpeningTag, timeDelay // Deprecated: use the interface for direct cast func CastBACnetEventParameterChangeOfValue(structType interface{}) BACnetEventParameterChangeOfValue { - if casted, ok := structType.(BACnetEventParameterChangeOfValue); ok { + if casted, ok := structType.(BACnetEventParameterChangeOfValue); ok { return casted } if casted, ok := structType.(*BACnetEventParameterChangeOfValue); ok { @@ -148,6 +151,7 @@ func (m *_BACnetEventParameterChangeOfValue) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetEventParameterChangeOfValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -169,7 +173,7 @@ func BACnetEventParameterChangeOfValueParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2))) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetEventParameterChangeOfValue") } @@ -182,7 +186,7 @@ func BACnetEventParameterChangeOfValueParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("timeDelay"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeDelay") } - _timeDelay, _timeDelayErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_timeDelay, _timeDelayErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _timeDelayErr != nil { return nil, errors.Wrap(_timeDelayErr, "Error parsing 'timeDelay' field of BACnetEventParameterChangeOfValue") } @@ -195,7 +199,7 @@ func BACnetEventParameterChangeOfValueParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("covCriteria"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for covCriteria") } - _covCriteria, _covCriteriaErr := BACnetEventParameterChangeOfValueCivCriteriaParseWithBuffer(ctx, readBuffer, uint8(uint8(1))) +_covCriteria, _covCriteriaErr := BACnetEventParameterChangeOfValueCivCriteriaParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) ) if _covCriteriaErr != nil { return nil, errors.Wrap(_covCriteriaErr, "Error parsing 'covCriteria' field of BACnetEventParameterChangeOfValue") } @@ -208,7 +212,7 @@ func BACnetEventParameterChangeOfValueParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2))) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetEventParameterChangeOfValue") } @@ -223,11 +227,12 @@ func BACnetEventParameterChangeOfValueParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetEventParameterChangeOfValue{ - _BACnetEventParameter: &_BACnetEventParameter{}, - OpeningTag: openingTag, - TimeDelay: timeDelay, - CovCriteria: covCriteria, - ClosingTag: closingTag, + _BACnetEventParameter: &_BACnetEventParameter{ + }, + OpeningTag: openingTag, + TimeDelay: timeDelay, + CovCriteria: covCriteria, + ClosingTag: closingTag, } _child._BACnetEventParameter._BACnetEventParameterChildRequirements = _child return _child, nil @@ -249,53 +254,53 @@ func (m *_BACnetEventParameterChangeOfValue) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetEventParameterChangeOfValue") } - // Simple Field (openingTag) - if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for openingTag") - } - _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) - if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for openingTag") - } - if _openingTagErr != nil { - return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") - } + // Simple Field (openingTag) + if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for openingTag") + } + _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) + if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for openingTag") + } + if _openingTagErr != nil { + return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") + } - // Simple Field (timeDelay) - if pushErr := writeBuffer.PushContext("timeDelay"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timeDelay") - } - _timeDelayErr := writeBuffer.WriteSerializable(ctx, m.GetTimeDelay()) - if popErr := writeBuffer.PopContext("timeDelay"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timeDelay") - } - if _timeDelayErr != nil { - return errors.Wrap(_timeDelayErr, "Error serializing 'timeDelay' field") - } + // Simple Field (timeDelay) + if pushErr := writeBuffer.PushContext("timeDelay"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timeDelay") + } + _timeDelayErr := writeBuffer.WriteSerializable(ctx, m.GetTimeDelay()) + if popErr := writeBuffer.PopContext("timeDelay"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timeDelay") + } + if _timeDelayErr != nil { + return errors.Wrap(_timeDelayErr, "Error serializing 'timeDelay' field") + } - // Simple Field (covCriteria) - if pushErr := writeBuffer.PushContext("covCriteria"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for covCriteria") - } - _covCriteriaErr := writeBuffer.WriteSerializable(ctx, m.GetCovCriteria()) - if popErr := writeBuffer.PopContext("covCriteria"); popErr != nil { - return errors.Wrap(popErr, "Error popping for covCriteria") - } - if _covCriteriaErr != nil { - return errors.Wrap(_covCriteriaErr, "Error serializing 'covCriteria' field") - } + // Simple Field (covCriteria) + if pushErr := writeBuffer.PushContext("covCriteria"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for covCriteria") + } + _covCriteriaErr := writeBuffer.WriteSerializable(ctx, m.GetCovCriteria()) + if popErr := writeBuffer.PopContext("covCriteria"); popErr != nil { + return errors.Wrap(popErr, "Error popping for covCriteria") + } + if _covCriteriaErr != nil { + return errors.Wrap(_covCriteriaErr, "Error serializing 'covCriteria' field") + } - // Simple Field (closingTag) - if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for closingTag") - } - _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) - if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for closingTag") - } - if _closingTagErr != nil { - return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") - } + // Simple Field (closingTag) + if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for closingTag") + } + _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) + if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for closingTag") + } + if _closingTagErr != nil { + return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") + } if popErr := writeBuffer.PopContext("BACnetEventParameterChangeOfValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetEventParameterChangeOfValue") @@ -305,6 +310,7 @@ func (m *_BACnetEventParameterChangeOfValue) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetEventParameterChangeOfValue) isBACnetEventParameterChangeOfValue() bool { return true } @@ -319,3 +325,6 @@ func (m *_BACnetEventParameterChangeOfValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfValueCivCriteria.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfValueCivCriteria.go index 284278a33d0..b199370279c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfValueCivCriteria.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfValueCivCriteria.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventParameterChangeOfValueCivCriteria is the corresponding interface of BACnetEventParameterChangeOfValueCivCriteria type BACnetEventParameterChangeOfValueCivCriteria interface { @@ -51,9 +53,9 @@ type BACnetEventParameterChangeOfValueCivCriteriaExactly interface { // _BACnetEventParameterChangeOfValueCivCriteria is the data-structure of this message type _BACnetEventParameterChangeOfValueCivCriteria struct { _BACnetEventParameterChangeOfValueCivCriteriaChildRequirements - OpeningTag BACnetOpeningTag - PeekedTagHeader BACnetTagHeader - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + PeekedTagHeader BACnetTagHeader + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 @@ -64,6 +66,7 @@ type _BACnetEventParameterChangeOfValueCivCriteriaChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type BACnetEventParameterChangeOfValueCivCriteriaParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetEventParameterChangeOfValueCivCriteria, serializeChildFunction func() error) error GetTypeName() string @@ -71,13 +74,12 @@ type BACnetEventParameterChangeOfValueCivCriteriaParent interface { type BACnetEventParameterChangeOfValueCivCriteriaChild interface { utils.Serializable - InitializeParent(parent BACnetEventParameterChangeOfValueCivCriteria, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) +InitializeParent(parent BACnetEventParameterChangeOfValueCivCriteria , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) GetParent() *BACnetEventParameterChangeOfValueCivCriteria GetTypeName() string BACnetEventParameterChangeOfValueCivCriteria } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -115,14 +117,15 @@ func (m *_BACnetEventParameterChangeOfValueCivCriteria) GetPeekedTagNumber() uin /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventParameterChangeOfValueCivCriteria factory function for _BACnetEventParameterChangeOfValueCivCriteria -func NewBACnetEventParameterChangeOfValueCivCriteria(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetEventParameterChangeOfValueCivCriteria { - return &_BACnetEventParameterChangeOfValueCivCriteria{OpeningTag: openingTag, PeekedTagHeader: peekedTagHeader, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetEventParameterChangeOfValueCivCriteria( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetEventParameterChangeOfValueCivCriteria { +return &_BACnetEventParameterChangeOfValueCivCriteria{ OpeningTag: openingTag , PeekedTagHeader: peekedTagHeader , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetEventParameterChangeOfValueCivCriteria(structType interface{}) BACnetEventParameterChangeOfValueCivCriteria { - if casted, ok := structType.(BACnetEventParameterChangeOfValueCivCriteria); ok { + if casted, ok := structType.(BACnetEventParameterChangeOfValueCivCriteria); ok { return casted } if casted, ok := structType.(*BACnetEventParameterChangeOfValueCivCriteria); ok { @@ -135,6 +138,7 @@ func (m *_BACnetEventParameterChangeOfValueCivCriteria) GetTypeName() string { return "BACnetEventParameterChangeOfValueCivCriteria" } + func (m *_BACnetEventParameterChangeOfValueCivCriteria) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -170,7 +174,7 @@ func BACnetEventParameterChangeOfValueCivCriteriaParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetEventParameterChangeOfValueCivCriteria") } @@ -179,13 +183,13 @@ func BACnetEventParameterChangeOfValueCivCriteriaParseWithBuffer(ctx context.Con return nil, errors.Wrap(closeErr, "Error closing for openingTag") } - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Virtual field _peekedTagNumber := peekedTagHeader.GetActualTagNumber() @@ -195,16 +199,16 @@ func BACnetEventParameterChangeOfValueCivCriteriaParseWithBuffer(ctx context.Con // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetEventParameterChangeOfValueCivCriteriaChildSerializeRequirement interface { BACnetEventParameterChangeOfValueCivCriteria - InitializeParent(BACnetEventParameterChangeOfValueCivCriteria, BACnetOpeningTag, BACnetTagHeader, BACnetClosingTag) + InitializeParent(BACnetEventParameterChangeOfValueCivCriteria, BACnetOpeningTag, BACnetTagHeader, BACnetClosingTag) GetParent() BACnetEventParameterChangeOfValueCivCriteria } var _childTemp interface{} var _child BACnetEventParameterChangeOfValueCivCriteriaChildSerializeRequirement var typeSwitchError error switch { - case peekedTagNumber == uint8(0): // BACnetEventParameterChangeOfValueCivCriteriaBitmask +case peekedTagNumber == uint8(0) : // BACnetEventParameterChangeOfValueCivCriteriaBitmask _childTemp, typeSwitchError = BACnetEventParameterChangeOfValueCivCriteriaBitmaskParseWithBuffer(ctx, readBuffer, tagNumber) - case peekedTagNumber == uint8(1): // BACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncrement +case peekedTagNumber == uint8(1) : // BACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncrement _childTemp, typeSwitchError = BACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncrementParseWithBuffer(ctx, readBuffer, tagNumber) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedTagNumber=%v]", peekedTagNumber) @@ -218,7 +222,7 @@ func BACnetEventParameterChangeOfValueCivCriteriaParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetEventParameterChangeOfValueCivCriteria") } @@ -232,7 +236,7 @@ func BACnetEventParameterChangeOfValueCivCriteriaParseWithBuffer(ctx context.Con } // Finish initializing - _child.InitializeParent(_child, openingTag, peekedTagHeader, closingTag) +_child.InitializeParent(_child , openingTag , peekedTagHeader , closingTag ) return _child, nil } @@ -242,7 +246,7 @@ func (pm *_BACnetEventParameterChangeOfValueCivCriteria) SerializeParent(ctx con _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetEventParameterChangeOfValueCivCriteria"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetEventParameterChangeOfValueCivCriteria"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetEventParameterChangeOfValueCivCriteria") } @@ -285,13 +289,13 @@ func (pm *_BACnetEventParameterChangeOfValueCivCriteria) SerializeParent(ctx con return nil } + //// // Arguments Getter func (m *_BACnetEventParameterChangeOfValueCivCriteria) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -309,3 +313,6 @@ func (m *_BACnetEventParameterChangeOfValueCivCriteria) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfValueCivCriteriaBitmask.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfValueCivCriteriaBitmask.go index cdbc917481e..8e6703b0d8a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfValueCivCriteriaBitmask.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfValueCivCriteriaBitmask.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventParameterChangeOfValueCivCriteriaBitmask is the corresponding interface of BACnetEventParameterChangeOfValueCivCriteriaBitmask type BACnetEventParameterChangeOfValueCivCriteriaBitmask interface { @@ -46,9 +48,11 @@ type BACnetEventParameterChangeOfValueCivCriteriaBitmaskExactly interface { // _BACnetEventParameterChangeOfValueCivCriteriaBitmask is the data-structure of this message type _BACnetEventParameterChangeOfValueCivCriteriaBitmask struct { *_BACnetEventParameterChangeOfValueCivCriteria - Bitmask BACnetContextTagBitString + Bitmask BACnetContextTagBitString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,16 +63,14 @@ type _BACnetEventParameterChangeOfValueCivCriteriaBitmask struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetEventParameterChangeOfValueCivCriteriaBitmask) InitializeParent(parent BACnetEventParameterChangeOfValueCivCriteria, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetEventParameterChangeOfValueCivCriteriaBitmask) InitializeParent(parent BACnetEventParameterChangeOfValueCivCriteria , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetEventParameterChangeOfValueCivCriteriaBitmask) GetParent() BACnetEventParameterChangeOfValueCivCriteria { +func (m *_BACnetEventParameterChangeOfValueCivCriteriaBitmask) GetParent() BACnetEventParameterChangeOfValueCivCriteria { return m._BACnetEventParameterChangeOfValueCivCriteria } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetEventParameterChangeOfValueCivCriteriaBitmask) GetBitmask() BACn /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventParameterChangeOfValueCivCriteriaBitmask factory function for _BACnetEventParameterChangeOfValueCivCriteriaBitmask -func NewBACnetEventParameterChangeOfValueCivCriteriaBitmask(bitmask BACnetContextTagBitString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetEventParameterChangeOfValueCivCriteriaBitmask { +func NewBACnetEventParameterChangeOfValueCivCriteriaBitmask( bitmask BACnetContextTagBitString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetEventParameterChangeOfValueCivCriteriaBitmask { _result := &_BACnetEventParameterChangeOfValueCivCriteriaBitmask{ Bitmask: bitmask, - _BACnetEventParameterChangeOfValueCivCriteria: NewBACnetEventParameterChangeOfValueCivCriteria(openingTag, peekedTagHeader, closingTag, tagNumber), + _BACnetEventParameterChangeOfValueCivCriteria: NewBACnetEventParameterChangeOfValueCivCriteria(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetEventParameterChangeOfValueCivCriteria._BACnetEventParameterChangeOfValueCivCriteriaChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetEventParameterChangeOfValueCivCriteriaBitmask(bitmask BACnetContex // Deprecated: use the interface for direct cast func CastBACnetEventParameterChangeOfValueCivCriteriaBitmask(structType interface{}) BACnetEventParameterChangeOfValueCivCriteriaBitmask { - if casted, ok := structType.(BACnetEventParameterChangeOfValueCivCriteriaBitmask); ok { + if casted, ok := structType.(BACnetEventParameterChangeOfValueCivCriteriaBitmask); ok { return casted } if casted, ok := structType.(*BACnetEventParameterChangeOfValueCivCriteriaBitmask); ok { @@ -117,6 +120,7 @@ func (m *_BACnetEventParameterChangeOfValueCivCriteriaBitmask) GetLengthInBits(c return lengthInBits } + func (m *_BACnetEventParameterChangeOfValueCivCriteriaBitmask) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetEventParameterChangeOfValueCivCriteriaBitmaskParseWithBuffer(ctx cont if pullErr := readBuffer.PullContext("bitmask"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for bitmask") } - _bitmask, _bitmaskErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_BIT_STRING)) +_bitmask, _bitmaskErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_BIT_STRING ) ) if _bitmaskErr != nil { return nil, errors.Wrap(_bitmaskErr, "Error parsing 'bitmask' field of BACnetEventParameterChangeOfValueCivCriteriaBitmask") } @@ -178,17 +182,17 @@ func (m *_BACnetEventParameterChangeOfValueCivCriteriaBitmask) SerializeWithWrit return errors.Wrap(pushErr, "Error pushing for BACnetEventParameterChangeOfValueCivCriteriaBitmask") } - // Simple Field (bitmask) - if pushErr := writeBuffer.PushContext("bitmask"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for bitmask") - } - _bitmaskErr := writeBuffer.WriteSerializable(ctx, m.GetBitmask()) - if popErr := writeBuffer.PopContext("bitmask"); popErr != nil { - return errors.Wrap(popErr, "Error popping for bitmask") - } - if _bitmaskErr != nil { - return errors.Wrap(_bitmaskErr, "Error serializing 'bitmask' field") - } + // Simple Field (bitmask) + if pushErr := writeBuffer.PushContext("bitmask"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for bitmask") + } + _bitmaskErr := writeBuffer.WriteSerializable(ctx, m.GetBitmask()) + if popErr := writeBuffer.PopContext("bitmask"); popErr != nil { + return errors.Wrap(popErr, "Error popping for bitmask") + } + if _bitmaskErr != nil { + return errors.Wrap(_bitmaskErr, "Error serializing 'bitmask' field") + } if popErr := writeBuffer.PopContext("BACnetEventParameterChangeOfValueCivCriteriaBitmask"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetEventParameterChangeOfValueCivCriteriaBitmask") @@ -198,6 +202,7 @@ func (m *_BACnetEventParameterChangeOfValueCivCriteriaBitmask) SerializeWithWrit return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetEventParameterChangeOfValueCivCriteriaBitmask) isBACnetEventParameterChangeOfValueCivCriteriaBitmask() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetEventParameterChangeOfValueCivCriteriaBitmask) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncrement.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncrement.go index 8e9f7a9a745..ea31dbcd1a2 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncrement.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncrement.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncrement is the corresponding interface of BACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncrement type BACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncrement interface { @@ -46,9 +48,11 @@ type BACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncrementExac // _BACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncrement is the data-structure of this message type _BACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncrement struct { *_BACnetEventParameterChangeOfValueCivCriteria - ReferencedPropertyIncrement BACnetContextTagReal + ReferencedPropertyIncrement BACnetContextTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,16 +63,14 @@ type _BACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncrement st /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncrement) InitializeParent(parent BACnetEventParameterChangeOfValueCivCriteria, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncrement) InitializeParent(parent BACnetEventParameterChangeOfValueCivCriteria , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncrement) GetParent() BACnetEventParameterChangeOfValueCivCriteria { +func (m *_BACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncrement) GetParent() BACnetEventParameterChangeOfValueCivCriteria { return m._BACnetEventParameterChangeOfValueCivCriteria } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncremen /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncrement factory function for _BACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncrement -func NewBACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncrement(referencedPropertyIncrement BACnetContextTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncrement { +func NewBACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncrement( referencedPropertyIncrement BACnetContextTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncrement { _result := &_BACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncrement{ - ReferencedPropertyIncrement: referencedPropertyIncrement, - _BACnetEventParameterChangeOfValueCivCriteria: NewBACnetEventParameterChangeOfValueCivCriteria(openingTag, peekedTagHeader, closingTag, tagNumber), + ReferencedPropertyIncrement: referencedPropertyIncrement, + _BACnetEventParameterChangeOfValueCivCriteria: NewBACnetEventParameterChangeOfValueCivCriteria(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetEventParameterChangeOfValueCivCriteria._BACnetEventParameterChangeOfValueCivCriteriaChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncrement( // Deprecated: use the interface for direct cast func CastBACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncrement(structType interface{}) BACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncrement { - if casted, ok := structType.(BACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncrement); ok { + if casted, ok := structType.(BACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncrement); ok { return casted } if casted, ok := structType.(*BACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncrement); ok { @@ -117,6 +120,7 @@ func (m *_BACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncremen return lengthInBits } + func (m *_BACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncrement) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncrementPars if pullErr := readBuffer.PullContext("referencedPropertyIncrement"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for referencedPropertyIncrement") } - _referencedPropertyIncrement, _referencedPropertyIncrementErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_REAL)) +_referencedPropertyIncrement, _referencedPropertyIncrementErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_REAL ) ) if _referencedPropertyIncrementErr != nil { return nil, errors.Wrap(_referencedPropertyIncrementErr, "Error parsing 'referencedPropertyIncrement' field of BACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncrement") } @@ -178,17 +182,17 @@ func (m *_BACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncremen return errors.Wrap(pushErr, "Error pushing for BACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncrement") } - // Simple Field (referencedPropertyIncrement) - if pushErr := writeBuffer.PushContext("referencedPropertyIncrement"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for referencedPropertyIncrement") - } - _referencedPropertyIncrementErr := writeBuffer.WriteSerializable(ctx, m.GetReferencedPropertyIncrement()) - if popErr := writeBuffer.PopContext("referencedPropertyIncrement"); popErr != nil { - return errors.Wrap(popErr, "Error popping for referencedPropertyIncrement") - } - if _referencedPropertyIncrementErr != nil { - return errors.Wrap(_referencedPropertyIncrementErr, "Error serializing 'referencedPropertyIncrement' field") - } + // Simple Field (referencedPropertyIncrement) + if pushErr := writeBuffer.PushContext("referencedPropertyIncrement"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for referencedPropertyIncrement") + } + _referencedPropertyIncrementErr := writeBuffer.WriteSerializable(ctx, m.GetReferencedPropertyIncrement()) + if popErr := writeBuffer.PopContext("referencedPropertyIncrement"); popErr != nil { + return errors.Wrap(popErr, "Error popping for referencedPropertyIncrement") + } + if _referencedPropertyIncrementErr != nil { + return errors.Wrap(_referencedPropertyIncrementErr, "Error serializing 'referencedPropertyIncrement' field") + } if popErr := writeBuffer.PopContext("BACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncrement"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncrement") @@ -198,6 +202,7 @@ func (m *_BACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncremen return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncrement) isBACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncrement() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetEventParameterChangeOfValueCivCriteriaReferencedPropertyIncremen } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterCommandFailure.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterCommandFailure.go index 5367ec4cb07..d6bcc07242b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterCommandFailure.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterCommandFailure.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventParameterCommandFailure is the corresponding interface of BACnetEventParameterCommandFailure type BACnetEventParameterCommandFailure interface { @@ -52,12 +54,14 @@ type BACnetEventParameterCommandFailureExactly interface { // _BACnetEventParameterCommandFailure is the data-structure of this message type _BACnetEventParameterCommandFailure struct { *_BACnetEventParameter - OpeningTag BACnetOpeningTag - TimeDelay BACnetContextTagUnsignedInteger - FeedbackPropertyReference BACnetDeviceObjectPropertyReferenceEnclosed - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + TimeDelay BACnetContextTagUnsignedInteger + FeedbackPropertyReference BACnetDeviceObjectPropertyReferenceEnclosed + ClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -68,14 +72,12 @@ type _BACnetEventParameterCommandFailure struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetEventParameterCommandFailure) InitializeParent(parent BACnetEventParameter, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetEventParameterCommandFailure) InitializeParent(parent BACnetEventParameter , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetEventParameterCommandFailure) GetParent() BACnetEventParameter { +func (m *_BACnetEventParameterCommandFailure) GetParent() BACnetEventParameter { return m._BACnetEventParameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -102,14 +104,15 @@ func (m *_BACnetEventParameterCommandFailure) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventParameterCommandFailure factory function for _BACnetEventParameterCommandFailure -func NewBACnetEventParameterCommandFailure(openingTag BACnetOpeningTag, timeDelay BACnetContextTagUnsignedInteger, feedbackPropertyReference BACnetDeviceObjectPropertyReferenceEnclosed, closingTag BACnetClosingTag, peekedTagHeader BACnetTagHeader) *_BACnetEventParameterCommandFailure { +func NewBACnetEventParameterCommandFailure( openingTag BACnetOpeningTag , timeDelay BACnetContextTagUnsignedInteger , feedbackPropertyReference BACnetDeviceObjectPropertyReferenceEnclosed , closingTag BACnetClosingTag , peekedTagHeader BACnetTagHeader ) *_BACnetEventParameterCommandFailure { _result := &_BACnetEventParameterCommandFailure{ - OpeningTag: openingTag, - TimeDelay: timeDelay, + OpeningTag: openingTag, + TimeDelay: timeDelay, FeedbackPropertyReference: feedbackPropertyReference, - ClosingTag: closingTag, - _BACnetEventParameter: NewBACnetEventParameter(peekedTagHeader), + ClosingTag: closingTag, + _BACnetEventParameter: NewBACnetEventParameter(peekedTagHeader), } _result._BACnetEventParameter._BACnetEventParameterChildRequirements = _result return _result @@ -117,7 +120,7 @@ func NewBACnetEventParameterCommandFailure(openingTag BACnetOpeningTag, timeDela // Deprecated: use the interface for direct cast func CastBACnetEventParameterCommandFailure(structType interface{}) BACnetEventParameterCommandFailure { - if casted, ok := structType.(BACnetEventParameterCommandFailure); ok { + if casted, ok := structType.(BACnetEventParameterCommandFailure); ok { return casted } if casted, ok := structType.(*BACnetEventParameterCommandFailure); ok { @@ -148,6 +151,7 @@ func (m *_BACnetEventParameterCommandFailure) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetEventParameterCommandFailure) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -169,7 +173,7 @@ func BACnetEventParameterCommandFailureParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(uint8(3))) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( uint8(3) ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetEventParameterCommandFailure") } @@ -182,7 +186,7 @@ func BACnetEventParameterCommandFailureParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("timeDelay"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeDelay") } - _timeDelay, _timeDelayErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_timeDelay, _timeDelayErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _timeDelayErr != nil { return nil, errors.Wrap(_timeDelayErr, "Error parsing 'timeDelay' field of BACnetEventParameterCommandFailure") } @@ -195,7 +199,7 @@ func BACnetEventParameterCommandFailureParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("feedbackPropertyReference"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for feedbackPropertyReference") } - _feedbackPropertyReference, _feedbackPropertyReferenceErr := BACnetDeviceObjectPropertyReferenceEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(1))) +_feedbackPropertyReference, _feedbackPropertyReferenceErr := BACnetDeviceObjectPropertyReferenceEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) ) if _feedbackPropertyReferenceErr != nil { return nil, errors.Wrap(_feedbackPropertyReferenceErr, "Error parsing 'feedbackPropertyReference' field of BACnetEventParameterCommandFailure") } @@ -208,7 +212,7 @@ func BACnetEventParameterCommandFailureParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(uint8(3))) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( uint8(3) ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetEventParameterCommandFailure") } @@ -223,11 +227,12 @@ func BACnetEventParameterCommandFailureParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetEventParameterCommandFailure{ - _BACnetEventParameter: &_BACnetEventParameter{}, - OpeningTag: openingTag, - TimeDelay: timeDelay, + _BACnetEventParameter: &_BACnetEventParameter{ + }, + OpeningTag: openingTag, + TimeDelay: timeDelay, FeedbackPropertyReference: feedbackPropertyReference, - ClosingTag: closingTag, + ClosingTag: closingTag, } _child._BACnetEventParameter._BACnetEventParameterChildRequirements = _child return _child, nil @@ -249,53 +254,53 @@ func (m *_BACnetEventParameterCommandFailure) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetEventParameterCommandFailure") } - // Simple Field (openingTag) - if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for openingTag") - } - _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) - if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for openingTag") - } - if _openingTagErr != nil { - return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") - } + // Simple Field (openingTag) + if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for openingTag") + } + _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) + if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for openingTag") + } + if _openingTagErr != nil { + return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") + } - // Simple Field (timeDelay) - if pushErr := writeBuffer.PushContext("timeDelay"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timeDelay") - } - _timeDelayErr := writeBuffer.WriteSerializable(ctx, m.GetTimeDelay()) - if popErr := writeBuffer.PopContext("timeDelay"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timeDelay") - } - if _timeDelayErr != nil { - return errors.Wrap(_timeDelayErr, "Error serializing 'timeDelay' field") - } + // Simple Field (timeDelay) + if pushErr := writeBuffer.PushContext("timeDelay"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timeDelay") + } + _timeDelayErr := writeBuffer.WriteSerializable(ctx, m.GetTimeDelay()) + if popErr := writeBuffer.PopContext("timeDelay"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timeDelay") + } + if _timeDelayErr != nil { + return errors.Wrap(_timeDelayErr, "Error serializing 'timeDelay' field") + } - // Simple Field (feedbackPropertyReference) - if pushErr := writeBuffer.PushContext("feedbackPropertyReference"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for feedbackPropertyReference") - } - _feedbackPropertyReferenceErr := writeBuffer.WriteSerializable(ctx, m.GetFeedbackPropertyReference()) - if popErr := writeBuffer.PopContext("feedbackPropertyReference"); popErr != nil { - return errors.Wrap(popErr, "Error popping for feedbackPropertyReference") - } - if _feedbackPropertyReferenceErr != nil { - return errors.Wrap(_feedbackPropertyReferenceErr, "Error serializing 'feedbackPropertyReference' field") - } + // Simple Field (feedbackPropertyReference) + if pushErr := writeBuffer.PushContext("feedbackPropertyReference"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for feedbackPropertyReference") + } + _feedbackPropertyReferenceErr := writeBuffer.WriteSerializable(ctx, m.GetFeedbackPropertyReference()) + if popErr := writeBuffer.PopContext("feedbackPropertyReference"); popErr != nil { + return errors.Wrap(popErr, "Error popping for feedbackPropertyReference") + } + if _feedbackPropertyReferenceErr != nil { + return errors.Wrap(_feedbackPropertyReferenceErr, "Error serializing 'feedbackPropertyReference' field") + } - // Simple Field (closingTag) - if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for closingTag") - } - _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) - if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for closingTag") - } - if _closingTagErr != nil { - return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") - } + // Simple Field (closingTag) + if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for closingTag") + } + _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) + if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for closingTag") + } + if _closingTagErr != nil { + return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") + } if popErr := writeBuffer.PopContext("BACnetEventParameterCommandFailure"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetEventParameterCommandFailure") @@ -305,6 +310,7 @@ func (m *_BACnetEventParameterCommandFailure) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetEventParameterCommandFailure) isBACnetEventParameterCommandFailure() bool { return true } @@ -319,3 +325,6 @@ func (m *_BACnetEventParameterCommandFailure) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterDoubleOutOfRange.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterDoubleOutOfRange.go index 875c8c82a9c..14220bc4d27 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterDoubleOutOfRange.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterDoubleOutOfRange.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventParameterDoubleOutOfRange is the corresponding interface of BACnetEventParameterDoubleOutOfRange type BACnetEventParameterDoubleOutOfRange interface { @@ -56,14 +58,16 @@ type BACnetEventParameterDoubleOutOfRangeExactly interface { // _BACnetEventParameterDoubleOutOfRange is the data-structure of this message type _BACnetEventParameterDoubleOutOfRange struct { *_BACnetEventParameter - OpeningTag BACnetOpeningTag - TimeDelay BACnetContextTagUnsignedInteger - LowLimit BACnetContextTagDouble - HighLimit BACnetContextTagDouble - Deadband BACnetContextTagDouble - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + TimeDelay BACnetContextTagUnsignedInteger + LowLimit BACnetContextTagDouble + HighLimit BACnetContextTagDouble + Deadband BACnetContextTagDouble + ClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -74,14 +78,12 @@ type _BACnetEventParameterDoubleOutOfRange struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetEventParameterDoubleOutOfRange) InitializeParent(parent BACnetEventParameter, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetEventParameterDoubleOutOfRange) InitializeParent(parent BACnetEventParameter , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetEventParameterDoubleOutOfRange) GetParent() BACnetEventParameter { +func (m *_BACnetEventParameterDoubleOutOfRange) GetParent() BACnetEventParameter { return m._BACnetEventParameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -116,16 +118,17 @@ func (m *_BACnetEventParameterDoubleOutOfRange) GetClosingTag() BACnetClosingTag /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventParameterDoubleOutOfRange factory function for _BACnetEventParameterDoubleOutOfRange -func NewBACnetEventParameterDoubleOutOfRange(openingTag BACnetOpeningTag, timeDelay BACnetContextTagUnsignedInteger, lowLimit BACnetContextTagDouble, highLimit BACnetContextTagDouble, deadband BACnetContextTagDouble, closingTag BACnetClosingTag, peekedTagHeader BACnetTagHeader) *_BACnetEventParameterDoubleOutOfRange { +func NewBACnetEventParameterDoubleOutOfRange( openingTag BACnetOpeningTag , timeDelay BACnetContextTagUnsignedInteger , lowLimit BACnetContextTagDouble , highLimit BACnetContextTagDouble , deadband BACnetContextTagDouble , closingTag BACnetClosingTag , peekedTagHeader BACnetTagHeader ) *_BACnetEventParameterDoubleOutOfRange { _result := &_BACnetEventParameterDoubleOutOfRange{ - OpeningTag: openingTag, - TimeDelay: timeDelay, - LowLimit: lowLimit, - HighLimit: highLimit, - Deadband: deadband, - ClosingTag: closingTag, - _BACnetEventParameter: NewBACnetEventParameter(peekedTagHeader), + OpeningTag: openingTag, + TimeDelay: timeDelay, + LowLimit: lowLimit, + HighLimit: highLimit, + Deadband: deadband, + ClosingTag: closingTag, + _BACnetEventParameter: NewBACnetEventParameter(peekedTagHeader), } _result._BACnetEventParameter._BACnetEventParameterChildRequirements = _result return _result @@ -133,7 +136,7 @@ func NewBACnetEventParameterDoubleOutOfRange(openingTag BACnetOpeningTag, timeDe // Deprecated: use the interface for direct cast func CastBACnetEventParameterDoubleOutOfRange(structType interface{}) BACnetEventParameterDoubleOutOfRange { - if casted, ok := structType.(BACnetEventParameterDoubleOutOfRange); ok { + if casted, ok := structType.(BACnetEventParameterDoubleOutOfRange); ok { return casted } if casted, ok := structType.(*BACnetEventParameterDoubleOutOfRange); ok { @@ -170,6 +173,7 @@ func (m *_BACnetEventParameterDoubleOutOfRange) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetEventParameterDoubleOutOfRange) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -191,7 +195,7 @@ func BACnetEventParameterDoubleOutOfRangeParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(uint8(14))) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( uint8(14) ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetEventParameterDoubleOutOfRange") } @@ -204,7 +208,7 @@ func BACnetEventParameterDoubleOutOfRangeParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("timeDelay"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeDelay") } - _timeDelay, _timeDelayErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_timeDelay, _timeDelayErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _timeDelayErr != nil { return nil, errors.Wrap(_timeDelayErr, "Error parsing 'timeDelay' field of BACnetEventParameterDoubleOutOfRange") } @@ -217,7 +221,7 @@ func BACnetEventParameterDoubleOutOfRangeParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("lowLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lowLimit") } - _lowLimit, _lowLimitErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_DOUBLE)) +_lowLimit, _lowLimitErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_DOUBLE ) ) if _lowLimitErr != nil { return nil, errors.Wrap(_lowLimitErr, "Error parsing 'lowLimit' field of BACnetEventParameterDoubleOutOfRange") } @@ -230,7 +234,7 @@ func BACnetEventParameterDoubleOutOfRangeParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("highLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for highLimit") } - _highLimit, _highLimitErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), BACnetDataType(BACnetDataType_DOUBLE)) +_highLimit, _highLimitErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , BACnetDataType( BACnetDataType_DOUBLE ) ) if _highLimitErr != nil { return nil, errors.Wrap(_highLimitErr, "Error parsing 'highLimit' field of BACnetEventParameterDoubleOutOfRange") } @@ -243,7 +247,7 @@ func BACnetEventParameterDoubleOutOfRangeParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("deadband"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for deadband") } - _deadband, _deadbandErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(3)), BACnetDataType(BACnetDataType_DOUBLE)) +_deadband, _deadbandErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(3) ) , BACnetDataType( BACnetDataType_DOUBLE ) ) if _deadbandErr != nil { return nil, errors.Wrap(_deadbandErr, "Error parsing 'deadband' field of BACnetEventParameterDoubleOutOfRange") } @@ -256,7 +260,7 @@ func BACnetEventParameterDoubleOutOfRangeParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(uint8(14))) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( uint8(14) ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetEventParameterDoubleOutOfRange") } @@ -271,13 +275,14 @@ func BACnetEventParameterDoubleOutOfRangeParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetEventParameterDoubleOutOfRange{ - _BACnetEventParameter: &_BACnetEventParameter{}, - OpeningTag: openingTag, - TimeDelay: timeDelay, - LowLimit: lowLimit, - HighLimit: highLimit, - Deadband: deadband, - ClosingTag: closingTag, + _BACnetEventParameter: &_BACnetEventParameter{ + }, + OpeningTag: openingTag, + TimeDelay: timeDelay, + LowLimit: lowLimit, + HighLimit: highLimit, + Deadband: deadband, + ClosingTag: closingTag, } _child._BACnetEventParameter._BACnetEventParameterChildRequirements = _child return _child, nil @@ -299,77 +304,77 @@ func (m *_BACnetEventParameterDoubleOutOfRange) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetEventParameterDoubleOutOfRange") } - // Simple Field (openingTag) - if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for openingTag") - } - _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) - if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for openingTag") - } - if _openingTagErr != nil { - return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") - } + // Simple Field (openingTag) + if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for openingTag") + } + _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) + if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for openingTag") + } + if _openingTagErr != nil { + return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") + } - // Simple Field (timeDelay) - if pushErr := writeBuffer.PushContext("timeDelay"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timeDelay") - } - _timeDelayErr := writeBuffer.WriteSerializable(ctx, m.GetTimeDelay()) - if popErr := writeBuffer.PopContext("timeDelay"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timeDelay") - } - if _timeDelayErr != nil { - return errors.Wrap(_timeDelayErr, "Error serializing 'timeDelay' field") - } + // Simple Field (timeDelay) + if pushErr := writeBuffer.PushContext("timeDelay"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timeDelay") + } + _timeDelayErr := writeBuffer.WriteSerializable(ctx, m.GetTimeDelay()) + if popErr := writeBuffer.PopContext("timeDelay"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timeDelay") + } + if _timeDelayErr != nil { + return errors.Wrap(_timeDelayErr, "Error serializing 'timeDelay' field") + } - // Simple Field (lowLimit) - if pushErr := writeBuffer.PushContext("lowLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lowLimit") - } - _lowLimitErr := writeBuffer.WriteSerializable(ctx, m.GetLowLimit()) - if popErr := writeBuffer.PopContext("lowLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lowLimit") - } - if _lowLimitErr != nil { - return errors.Wrap(_lowLimitErr, "Error serializing 'lowLimit' field") - } + // Simple Field (lowLimit) + if pushErr := writeBuffer.PushContext("lowLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lowLimit") + } + _lowLimitErr := writeBuffer.WriteSerializable(ctx, m.GetLowLimit()) + if popErr := writeBuffer.PopContext("lowLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lowLimit") + } + if _lowLimitErr != nil { + return errors.Wrap(_lowLimitErr, "Error serializing 'lowLimit' field") + } - // Simple Field (highLimit) - if pushErr := writeBuffer.PushContext("highLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for highLimit") - } - _highLimitErr := writeBuffer.WriteSerializable(ctx, m.GetHighLimit()) - if popErr := writeBuffer.PopContext("highLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for highLimit") - } - if _highLimitErr != nil { - return errors.Wrap(_highLimitErr, "Error serializing 'highLimit' field") - } + // Simple Field (highLimit) + if pushErr := writeBuffer.PushContext("highLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for highLimit") + } + _highLimitErr := writeBuffer.WriteSerializable(ctx, m.GetHighLimit()) + if popErr := writeBuffer.PopContext("highLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for highLimit") + } + if _highLimitErr != nil { + return errors.Wrap(_highLimitErr, "Error serializing 'highLimit' field") + } - // Simple Field (deadband) - if pushErr := writeBuffer.PushContext("deadband"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for deadband") - } - _deadbandErr := writeBuffer.WriteSerializable(ctx, m.GetDeadband()) - if popErr := writeBuffer.PopContext("deadband"); popErr != nil { - return errors.Wrap(popErr, "Error popping for deadband") - } - if _deadbandErr != nil { - return errors.Wrap(_deadbandErr, "Error serializing 'deadband' field") - } + // Simple Field (deadband) + if pushErr := writeBuffer.PushContext("deadband"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for deadband") + } + _deadbandErr := writeBuffer.WriteSerializable(ctx, m.GetDeadband()) + if popErr := writeBuffer.PopContext("deadband"); popErr != nil { + return errors.Wrap(popErr, "Error popping for deadband") + } + if _deadbandErr != nil { + return errors.Wrap(_deadbandErr, "Error serializing 'deadband' field") + } - // Simple Field (closingTag) - if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for closingTag") - } - _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) - if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for closingTag") - } - if _closingTagErr != nil { - return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") - } + // Simple Field (closingTag) + if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for closingTag") + } + _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) + if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for closingTag") + } + if _closingTagErr != nil { + return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") + } if popErr := writeBuffer.PopContext("BACnetEventParameterDoubleOutOfRange"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetEventParameterDoubleOutOfRange") @@ -379,6 +384,7 @@ func (m *_BACnetEventParameterDoubleOutOfRange) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetEventParameterDoubleOutOfRange) isBACnetEventParameterDoubleOutOfRange() bool { return true } @@ -393,3 +399,6 @@ func (m *_BACnetEventParameterDoubleOutOfRange) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterExtended.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterExtended.go index a73d03abc70..6b18d3b545e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterExtended.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterExtended.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventParameterExtended is the corresponding interface of BACnetEventParameterExtended type BACnetEventParameterExtended interface { @@ -54,13 +56,15 @@ type BACnetEventParameterExtendedExactly interface { // _BACnetEventParameterExtended is the data-structure of this message type _BACnetEventParameterExtended struct { *_BACnetEventParameter - OpeningTag BACnetOpeningTag - VendorId BACnetVendorIdTagged - ExtendedEventType BACnetContextTagUnsignedInteger - Parameters BACnetEventParameterExtendedParameters - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + VendorId BACnetVendorIdTagged + ExtendedEventType BACnetContextTagUnsignedInteger + Parameters BACnetEventParameterExtendedParameters + ClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -71,14 +75,12 @@ type _BACnetEventParameterExtended struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetEventParameterExtended) InitializeParent(parent BACnetEventParameter, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetEventParameterExtended) InitializeParent(parent BACnetEventParameter , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetEventParameterExtended) GetParent() BACnetEventParameter { +func (m *_BACnetEventParameterExtended) GetParent() BACnetEventParameter { return m._BACnetEventParameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -109,15 +111,16 @@ func (m *_BACnetEventParameterExtended) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventParameterExtended factory function for _BACnetEventParameterExtended -func NewBACnetEventParameterExtended(openingTag BACnetOpeningTag, vendorId BACnetVendorIdTagged, extendedEventType BACnetContextTagUnsignedInteger, parameters BACnetEventParameterExtendedParameters, closingTag BACnetClosingTag, peekedTagHeader BACnetTagHeader) *_BACnetEventParameterExtended { +func NewBACnetEventParameterExtended( openingTag BACnetOpeningTag , vendorId BACnetVendorIdTagged , extendedEventType BACnetContextTagUnsignedInteger , parameters BACnetEventParameterExtendedParameters , closingTag BACnetClosingTag , peekedTagHeader BACnetTagHeader ) *_BACnetEventParameterExtended { _result := &_BACnetEventParameterExtended{ - OpeningTag: openingTag, - VendorId: vendorId, - ExtendedEventType: extendedEventType, - Parameters: parameters, - ClosingTag: closingTag, - _BACnetEventParameter: NewBACnetEventParameter(peekedTagHeader), + OpeningTag: openingTag, + VendorId: vendorId, + ExtendedEventType: extendedEventType, + Parameters: parameters, + ClosingTag: closingTag, + _BACnetEventParameter: NewBACnetEventParameter(peekedTagHeader), } _result._BACnetEventParameter._BACnetEventParameterChildRequirements = _result return _result @@ -125,7 +128,7 @@ func NewBACnetEventParameterExtended(openingTag BACnetOpeningTag, vendorId BACne // Deprecated: use the interface for direct cast func CastBACnetEventParameterExtended(structType interface{}) BACnetEventParameterExtended { - if casted, ok := structType.(BACnetEventParameterExtended); ok { + if casted, ok := structType.(BACnetEventParameterExtended); ok { return casted } if casted, ok := structType.(*BACnetEventParameterExtended); ok { @@ -159,6 +162,7 @@ func (m *_BACnetEventParameterExtended) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_BACnetEventParameterExtended) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -180,7 +184,7 @@ func BACnetEventParameterExtendedParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(uint8(9))) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( uint8(9) ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetEventParameterExtended") } @@ -193,7 +197,7 @@ func BACnetEventParameterExtendedParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("vendorId"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for vendorId") } - _vendorId, _vendorIdErr := BACnetVendorIdTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_vendorId, _vendorIdErr := BACnetVendorIdTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _vendorIdErr != nil { return nil, errors.Wrap(_vendorIdErr, "Error parsing 'vendorId' field of BACnetEventParameterExtended") } @@ -206,7 +210,7 @@ func BACnetEventParameterExtendedParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("extendedEventType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for extendedEventType") } - _extendedEventType, _extendedEventTypeErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_extendedEventType, _extendedEventTypeErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _extendedEventTypeErr != nil { return nil, errors.Wrap(_extendedEventTypeErr, "Error parsing 'extendedEventType' field of BACnetEventParameterExtended") } @@ -219,7 +223,7 @@ func BACnetEventParameterExtendedParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("parameters"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for parameters") } - _parameters, _parametersErr := BACnetEventParameterExtendedParametersParseWithBuffer(ctx, readBuffer, uint8(uint8(2))) +_parameters, _parametersErr := BACnetEventParameterExtendedParametersParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) ) if _parametersErr != nil { return nil, errors.Wrap(_parametersErr, "Error parsing 'parameters' field of BACnetEventParameterExtended") } @@ -232,7 +236,7 @@ func BACnetEventParameterExtendedParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(uint8(9))) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( uint8(9) ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetEventParameterExtended") } @@ -247,12 +251,13 @@ func BACnetEventParameterExtendedParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_BACnetEventParameterExtended{ - _BACnetEventParameter: &_BACnetEventParameter{}, - OpeningTag: openingTag, - VendorId: vendorId, - ExtendedEventType: extendedEventType, - Parameters: parameters, - ClosingTag: closingTag, + _BACnetEventParameter: &_BACnetEventParameter{ + }, + OpeningTag: openingTag, + VendorId: vendorId, + ExtendedEventType: extendedEventType, + Parameters: parameters, + ClosingTag: closingTag, } _child._BACnetEventParameter._BACnetEventParameterChildRequirements = _child return _child, nil @@ -274,65 +279,65 @@ func (m *_BACnetEventParameterExtended) SerializeWithWriteBuffer(ctx context.Con return errors.Wrap(pushErr, "Error pushing for BACnetEventParameterExtended") } - // Simple Field (openingTag) - if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for openingTag") - } - _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) - if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for openingTag") - } - if _openingTagErr != nil { - return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") - } + // Simple Field (openingTag) + if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for openingTag") + } + _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) + if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for openingTag") + } + if _openingTagErr != nil { + return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") + } - // Simple Field (vendorId) - if pushErr := writeBuffer.PushContext("vendorId"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for vendorId") - } - _vendorIdErr := writeBuffer.WriteSerializable(ctx, m.GetVendorId()) - if popErr := writeBuffer.PopContext("vendorId"); popErr != nil { - return errors.Wrap(popErr, "Error popping for vendorId") - } - if _vendorIdErr != nil { - return errors.Wrap(_vendorIdErr, "Error serializing 'vendorId' field") - } + // Simple Field (vendorId) + if pushErr := writeBuffer.PushContext("vendorId"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for vendorId") + } + _vendorIdErr := writeBuffer.WriteSerializable(ctx, m.GetVendorId()) + if popErr := writeBuffer.PopContext("vendorId"); popErr != nil { + return errors.Wrap(popErr, "Error popping for vendorId") + } + if _vendorIdErr != nil { + return errors.Wrap(_vendorIdErr, "Error serializing 'vendorId' field") + } - // Simple Field (extendedEventType) - if pushErr := writeBuffer.PushContext("extendedEventType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for extendedEventType") - } - _extendedEventTypeErr := writeBuffer.WriteSerializable(ctx, m.GetExtendedEventType()) - if popErr := writeBuffer.PopContext("extendedEventType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for extendedEventType") - } - if _extendedEventTypeErr != nil { - return errors.Wrap(_extendedEventTypeErr, "Error serializing 'extendedEventType' field") - } + // Simple Field (extendedEventType) + if pushErr := writeBuffer.PushContext("extendedEventType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for extendedEventType") + } + _extendedEventTypeErr := writeBuffer.WriteSerializable(ctx, m.GetExtendedEventType()) + if popErr := writeBuffer.PopContext("extendedEventType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for extendedEventType") + } + if _extendedEventTypeErr != nil { + return errors.Wrap(_extendedEventTypeErr, "Error serializing 'extendedEventType' field") + } - // Simple Field (parameters) - if pushErr := writeBuffer.PushContext("parameters"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for parameters") - } - _parametersErr := writeBuffer.WriteSerializable(ctx, m.GetParameters()) - if popErr := writeBuffer.PopContext("parameters"); popErr != nil { - return errors.Wrap(popErr, "Error popping for parameters") - } - if _parametersErr != nil { - return errors.Wrap(_parametersErr, "Error serializing 'parameters' field") - } + // Simple Field (parameters) + if pushErr := writeBuffer.PushContext("parameters"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for parameters") + } + _parametersErr := writeBuffer.WriteSerializable(ctx, m.GetParameters()) + if popErr := writeBuffer.PopContext("parameters"); popErr != nil { + return errors.Wrap(popErr, "Error popping for parameters") + } + if _parametersErr != nil { + return errors.Wrap(_parametersErr, "Error serializing 'parameters' field") + } - // Simple Field (closingTag) - if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for closingTag") - } - _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) - if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for closingTag") - } - if _closingTagErr != nil { - return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") - } + // Simple Field (closingTag) + if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for closingTag") + } + _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) + if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for closingTag") + } + if _closingTagErr != nil { + return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") + } if popErr := writeBuffer.PopContext("BACnetEventParameterExtended"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetEventParameterExtended") @@ -342,6 +347,7 @@ func (m *_BACnetEventParameterExtended) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetEventParameterExtended) isBACnetEventParameterExtended() bool { return true } @@ -356,3 +362,6 @@ func (m *_BACnetEventParameterExtended) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterExtendedParameters.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterExtendedParameters.go index e623875bef9..d0f2c2837e7 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterExtendedParameters.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterExtendedParameters.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventParameterExtendedParameters is the corresponding interface of BACnetEventParameterExtendedParameters type BACnetEventParameterExtendedParameters interface { @@ -83,28 +85,29 @@ type BACnetEventParameterExtendedParametersExactly interface { // _BACnetEventParameterExtendedParameters is the data-structure of this message type _BACnetEventParameterExtendedParameters struct { - OpeningTag BACnetOpeningTag - PeekedTagHeader BACnetTagHeader - NullValue BACnetApplicationTagNull - RealValue BACnetApplicationTagReal - UnsignedValue BACnetApplicationTagUnsignedInteger - BooleanValue BACnetApplicationTagBoolean - IntegerValue BACnetApplicationTagSignedInteger - DoubleValue BACnetApplicationTagDouble - OctetStringValue BACnetApplicationTagOctetString - CharacterStringValue BACnetApplicationTagCharacterString - BitStringValue BACnetApplicationTagBitString - EnumeratedValue BACnetApplicationTagEnumerated - DateValue BACnetApplicationTagDate - TimeValue BACnetApplicationTagTime - ObjectIdentifier BACnetApplicationTagObjectIdentifier - Reference BACnetDeviceObjectPropertyReferenceEnclosed - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + PeekedTagHeader BACnetTagHeader + NullValue BACnetApplicationTagNull + RealValue BACnetApplicationTagReal + UnsignedValue BACnetApplicationTagUnsignedInteger + BooleanValue BACnetApplicationTagBoolean + IntegerValue BACnetApplicationTagSignedInteger + DoubleValue BACnetApplicationTagDouble + OctetStringValue BACnetApplicationTagOctetString + CharacterStringValue BACnetApplicationTagCharacterString + BitStringValue BACnetApplicationTagBitString + EnumeratedValue BACnetApplicationTagEnumerated + DateValue BACnetApplicationTagDate + TimeValue BACnetApplicationTagTime + ObjectIdentifier BACnetApplicationTagObjectIdentifier + Reference BACnetDeviceObjectPropertyReferenceEnclosed + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -294,14 +297,15 @@ func (m *_BACnetEventParameterExtendedParameters) GetIsClosingTag() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventParameterExtendedParameters factory function for _BACnetEventParameterExtendedParameters -func NewBACnetEventParameterExtendedParameters(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, nullValue BACnetApplicationTagNull, realValue BACnetApplicationTagReal, unsignedValue BACnetApplicationTagUnsignedInteger, booleanValue BACnetApplicationTagBoolean, integerValue BACnetApplicationTagSignedInteger, doubleValue BACnetApplicationTagDouble, octetStringValue BACnetApplicationTagOctetString, characterStringValue BACnetApplicationTagCharacterString, bitStringValue BACnetApplicationTagBitString, enumeratedValue BACnetApplicationTagEnumerated, dateValue BACnetApplicationTagDate, timeValue BACnetApplicationTagTime, objectIdentifier BACnetApplicationTagObjectIdentifier, reference BACnetDeviceObjectPropertyReferenceEnclosed, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetEventParameterExtendedParameters { - return &_BACnetEventParameterExtendedParameters{OpeningTag: openingTag, PeekedTagHeader: peekedTagHeader, NullValue: nullValue, RealValue: realValue, UnsignedValue: unsignedValue, BooleanValue: booleanValue, IntegerValue: integerValue, DoubleValue: doubleValue, OctetStringValue: octetStringValue, CharacterStringValue: characterStringValue, BitStringValue: bitStringValue, EnumeratedValue: enumeratedValue, DateValue: dateValue, TimeValue: timeValue, ObjectIdentifier: objectIdentifier, Reference: reference, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetEventParameterExtendedParameters( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , nullValue BACnetApplicationTagNull , realValue BACnetApplicationTagReal , unsignedValue BACnetApplicationTagUnsignedInteger , booleanValue BACnetApplicationTagBoolean , integerValue BACnetApplicationTagSignedInteger , doubleValue BACnetApplicationTagDouble , octetStringValue BACnetApplicationTagOctetString , characterStringValue BACnetApplicationTagCharacterString , bitStringValue BACnetApplicationTagBitString , enumeratedValue BACnetApplicationTagEnumerated , dateValue BACnetApplicationTagDate , timeValue BACnetApplicationTagTime , objectIdentifier BACnetApplicationTagObjectIdentifier , reference BACnetDeviceObjectPropertyReferenceEnclosed , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetEventParameterExtendedParameters { +return &_BACnetEventParameterExtendedParameters{ OpeningTag: openingTag , PeekedTagHeader: peekedTagHeader , NullValue: nullValue , RealValue: realValue , UnsignedValue: unsignedValue , BooleanValue: booleanValue , IntegerValue: integerValue , DoubleValue: doubleValue , OctetStringValue: octetStringValue , CharacterStringValue: characterStringValue , BitStringValue: bitStringValue , EnumeratedValue: enumeratedValue , DateValue: dateValue , TimeValue: timeValue , ObjectIdentifier: objectIdentifier , Reference: reference , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetEventParameterExtendedParameters(structType interface{}) BACnetEventParameterExtendedParameters { - if casted, ok := structType.(BACnetEventParameterExtendedParameters); ok { + if casted, ok := structType.(BACnetEventParameterExtendedParameters); ok { return casted } if casted, ok := structType.(*BACnetEventParameterExtendedParameters); ok { @@ -402,6 +406,7 @@ func (m *_BACnetEventParameterExtendedParameters) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetEventParameterExtendedParameters) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -423,7 +428,7 @@ func BACnetEventParameterExtendedParametersParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetEventParameterExtendedParameters") } @@ -432,13 +437,13 @@ func BACnetEventParameterExtendedParametersParseWithBuffer(ctx context.Context, return nil, errors.Wrap(closeErr, "Error closing for openingTag") } - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Virtual field _peekedTagNumber := peekedTagHeader.GetActualTagNumber() @@ -462,7 +467,7 @@ func BACnetEventParameterExtendedParametersParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("nullValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for nullValue") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -484,7 +489,7 @@ func BACnetEventParameterExtendedParametersParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("realValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for realValue") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -506,7 +511,7 @@ func BACnetEventParameterExtendedParametersParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("unsignedValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for unsignedValue") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -528,7 +533,7 @@ func BACnetEventParameterExtendedParametersParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("booleanValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for booleanValue") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -550,7 +555,7 @@ func BACnetEventParameterExtendedParametersParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("integerValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for integerValue") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -572,7 +577,7 @@ func BACnetEventParameterExtendedParametersParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("doubleValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for doubleValue") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -594,7 +599,7 @@ func BACnetEventParameterExtendedParametersParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("octetStringValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for octetStringValue") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -616,7 +621,7 @@ func BACnetEventParameterExtendedParametersParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("characterStringValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for characterStringValue") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -638,7 +643,7 @@ func BACnetEventParameterExtendedParametersParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("bitStringValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for bitStringValue") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -660,7 +665,7 @@ func BACnetEventParameterExtendedParametersParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("enumeratedValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for enumeratedValue") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -682,7 +687,7 @@ func BACnetEventParameterExtendedParametersParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("dateValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for dateValue") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -704,7 +709,7 @@ func BACnetEventParameterExtendedParametersParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("timeValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeValue") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -726,7 +731,7 @@ func BACnetEventParameterExtendedParametersParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("objectIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for objectIdentifier") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -748,7 +753,7 @@ func BACnetEventParameterExtendedParametersParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("reference"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for reference") } - _val, _err := BACnetDeviceObjectPropertyReferenceEnclosedParseWithBuffer(ctx, readBuffer, uint8(0)) +_val, _err := BACnetDeviceObjectPropertyReferenceEnclosedParseWithBuffer(ctx, readBuffer , uint8(0) ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -767,7 +772,7 @@ func BACnetEventParameterExtendedParametersParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetEventParameterExtendedParameters") } @@ -782,25 +787,25 @@ func BACnetEventParameterExtendedParametersParseWithBuffer(ctx context.Context, // Create the instance return &_BACnetEventParameterExtendedParameters{ - TagNumber: tagNumber, - OpeningTag: openingTag, - PeekedTagHeader: peekedTagHeader, - NullValue: nullValue, - RealValue: realValue, - UnsignedValue: unsignedValue, - BooleanValue: booleanValue, - IntegerValue: integerValue, - DoubleValue: doubleValue, - OctetStringValue: octetStringValue, - CharacterStringValue: characterStringValue, - BitStringValue: bitStringValue, - EnumeratedValue: enumeratedValue, - DateValue: dateValue, - TimeValue: timeValue, - ObjectIdentifier: objectIdentifier, - Reference: reference, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + PeekedTagHeader: peekedTagHeader, + NullValue: nullValue, + RealValue: realValue, + UnsignedValue: unsignedValue, + BooleanValue: booleanValue, + IntegerValue: integerValue, + DoubleValue: doubleValue, + OctetStringValue: octetStringValue, + CharacterStringValue: characterStringValue, + BitStringValue: bitStringValue, + EnumeratedValue: enumeratedValue, + DateValue: dateValue, + TimeValue: timeValue, + ObjectIdentifier: objectIdentifier, + Reference: reference, + ClosingTag: closingTag, + }, nil } func (m *_BACnetEventParameterExtendedParameters) Serialize() ([]byte, error) { @@ -814,7 +819,7 @@ func (m *_BACnetEventParameterExtendedParameters) Serialize() ([]byte, error) { func (m *_BACnetEventParameterExtendedParameters) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetEventParameterExtendedParameters"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetEventParameterExtendedParameters"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetEventParameterExtendedParameters") } @@ -1084,13 +1089,13 @@ func (m *_BACnetEventParameterExtendedParameters) SerializeWithWriteBuffer(ctx c return nil } + //// // Arguments Getter func (m *_BACnetEventParameterExtendedParameters) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -1108,3 +1113,6 @@ func (m *_BACnetEventParameterExtendedParameters) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterFloatingLimit.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterFloatingLimit.go index c41f2a59dce..2a0e86c0d39 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterFloatingLimit.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterFloatingLimit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventParameterFloatingLimit is the corresponding interface of BACnetEventParameterFloatingLimit type BACnetEventParameterFloatingLimit interface { @@ -58,15 +60,17 @@ type BACnetEventParameterFloatingLimitExactly interface { // _BACnetEventParameterFloatingLimit is the data-structure of this message type _BACnetEventParameterFloatingLimit struct { *_BACnetEventParameter - OpeningTag BACnetOpeningTag - TimeDelay BACnetContextTagUnsignedInteger - SetpointReference BACnetDeviceObjectPropertyReferenceEnclosed - LowDiffLimit BACnetContextTagReal - HighDiffLimit BACnetContextTagReal - Deadband BACnetContextTagReal - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + TimeDelay BACnetContextTagUnsignedInteger + SetpointReference BACnetDeviceObjectPropertyReferenceEnclosed + LowDiffLimit BACnetContextTagReal + HighDiffLimit BACnetContextTagReal + Deadband BACnetContextTagReal + ClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -77,14 +81,12 @@ type _BACnetEventParameterFloatingLimit struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetEventParameterFloatingLimit) InitializeParent(parent BACnetEventParameter, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetEventParameterFloatingLimit) InitializeParent(parent BACnetEventParameter , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetEventParameterFloatingLimit) GetParent() BACnetEventParameter { +func (m *_BACnetEventParameterFloatingLimit) GetParent() BACnetEventParameter { return m._BACnetEventParameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -123,17 +125,18 @@ func (m *_BACnetEventParameterFloatingLimit) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventParameterFloatingLimit factory function for _BACnetEventParameterFloatingLimit -func NewBACnetEventParameterFloatingLimit(openingTag BACnetOpeningTag, timeDelay BACnetContextTagUnsignedInteger, setpointReference BACnetDeviceObjectPropertyReferenceEnclosed, lowDiffLimit BACnetContextTagReal, highDiffLimit BACnetContextTagReal, deadband BACnetContextTagReal, closingTag BACnetClosingTag, peekedTagHeader BACnetTagHeader) *_BACnetEventParameterFloatingLimit { +func NewBACnetEventParameterFloatingLimit( openingTag BACnetOpeningTag , timeDelay BACnetContextTagUnsignedInteger , setpointReference BACnetDeviceObjectPropertyReferenceEnclosed , lowDiffLimit BACnetContextTagReal , highDiffLimit BACnetContextTagReal , deadband BACnetContextTagReal , closingTag BACnetClosingTag , peekedTagHeader BACnetTagHeader ) *_BACnetEventParameterFloatingLimit { _result := &_BACnetEventParameterFloatingLimit{ - OpeningTag: openingTag, - TimeDelay: timeDelay, - SetpointReference: setpointReference, - LowDiffLimit: lowDiffLimit, - HighDiffLimit: highDiffLimit, - Deadband: deadband, - ClosingTag: closingTag, - _BACnetEventParameter: NewBACnetEventParameter(peekedTagHeader), + OpeningTag: openingTag, + TimeDelay: timeDelay, + SetpointReference: setpointReference, + LowDiffLimit: lowDiffLimit, + HighDiffLimit: highDiffLimit, + Deadband: deadband, + ClosingTag: closingTag, + _BACnetEventParameter: NewBACnetEventParameter(peekedTagHeader), } _result._BACnetEventParameter._BACnetEventParameterChildRequirements = _result return _result @@ -141,7 +144,7 @@ func NewBACnetEventParameterFloatingLimit(openingTag BACnetOpeningTag, timeDelay // Deprecated: use the interface for direct cast func CastBACnetEventParameterFloatingLimit(structType interface{}) BACnetEventParameterFloatingLimit { - if casted, ok := structType.(BACnetEventParameterFloatingLimit); ok { + if casted, ok := structType.(BACnetEventParameterFloatingLimit); ok { return casted } if casted, ok := structType.(*BACnetEventParameterFloatingLimit); ok { @@ -181,6 +184,7 @@ func (m *_BACnetEventParameterFloatingLimit) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetEventParameterFloatingLimit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -202,7 +206,7 @@ func BACnetEventParameterFloatingLimitParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(uint8(4))) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( uint8(4) ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetEventParameterFloatingLimit") } @@ -215,7 +219,7 @@ func BACnetEventParameterFloatingLimitParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("timeDelay"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeDelay") } - _timeDelay, _timeDelayErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_timeDelay, _timeDelayErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _timeDelayErr != nil { return nil, errors.Wrap(_timeDelayErr, "Error parsing 'timeDelay' field of BACnetEventParameterFloatingLimit") } @@ -228,7 +232,7 @@ func BACnetEventParameterFloatingLimitParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("setpointReference"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for setpointReference") } - _setpointReference, _setpointReferenceErr := BACnetDeviceObjectPropertyReferenceEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(1))) +_setpointReference, _setpointReferenceErr := BACnetDeviceObjectPropertyReferenceEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) ) if _setpointReferenceErr != nil { return nil, errors.Wrap(_setpointReferenceErr, "Error parsing 'setpointReference' field of BACnetEventParameterFloatingLimit") } @@ -241,7 +245,7 @@ func BACnetEventParameterFloatingLimitParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("lowDiffLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lowDiffLimit") } - _lowDiffLimit, _lowDiffLimitErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), BACnetDataType(BACnetDataType_REAL)) +_lowDiffLimit, _lowDiffLimitErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , BACnetDataType( BACnetDataType_REAL ) ) if _lowDiffLimitErr != nil { return nil, errors.Wrap(_lowDiffLimitErr, "Error parsing 'lowDiffLimit' field of BACnetEventParameterFloatingLimit") } @@ -254,7 +258,7 @@ func BACnetEventParameterFloatingLimitParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("highDiffLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for highDiffLimit") } - _highDiffLimit, _highDiffLimitErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(3)), BACnetDataType(BACnetDataType_REAL)) +_highDiffLimit, _highDiffLimitErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(3) ) , BACnetDataType( BACnetDataType_REAL ) ) if _highDiffLimitErr != nil { return nil, errors.Wrap(_highDiffLimitErr, "Error parsing 'highDiffLimit' field of BACnetEventParameterFloatingLimit") } @@ -267,7 +271,7 @@ func BACnetEventParameterFloatingLimitParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("deadband"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for deadband") } - _deadband, _deadbandErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(4)), BACnetDataType(BACnetDataType_REAL)) +_deadband, _deadbandErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(4) ) , BACnetDataType( BACnetDataType_REAL ) ) if _deadbandErr != nil { return nil, errors.Wrap(_deadbandErr, "Error parsing 'deadband' field of BACnetEventParameterFloatingLimit") } @@ -280,7 +284,7 @@ func BACnetEventParameterFloatingLimitParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(uint8(4))) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( uint8(4) ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetEventParameterFloatingLimit") } @@ -295,14 +299,15 @@ func BACnetEventParameterFloatingLimitParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetEventParameterFloatingLimit{ - _BACnetEventParameter: &_BACnetEventParameter{}, - OpeningTag: openingTag, - TimeDelay: timeDelay, - SetpointReference: setpointReference, - LowDiffLimit: lowDiffLimit, - HighDiffLimit: highDiffLimit, - Deadband: deadband, - ClosingTag: closingTag, + _BACnetEventParameter: &_BACnetEventParameter{ + }, + OpeningTag: openingTag, + TimeDelay: timeDelay, + SetpointReference: setpointReference, + LowDiffLimit: lowDiffLimit, + HighDiffLimit: highDiffLimit, + Deadband: deadband, + ClosingTag: closingTag, } _child._BACnetEventParameter._BACnetEventParameterChildRequirements = _child return _child, nil @@ -324,89 +329,89 @@ func (m *_BACnetEventParameterFloatingLimit) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetEventParameterFloatingLimit") } - // Simple Field (openingTag) - if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for openingTag") - } - _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) - if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for openingTag") - } - if _openingTagErr != nil { - return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") - } + // Simple Field (openingTag) + if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for openingTag") + } + _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) + if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for openingTag") + } + if _openingTagErr != nil { + return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") + } - // Simple Field (timeDelay) - if pushErr := writeBuffer.PushContext("timeDelay"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timeDelay") - } - _timeDelayErr := writeBuffer.WriteSerializable(ctx, m.GetTimeDelay()) - if popErr := writeBuffer.PopContext("timeDelay"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timeDelay") - } - if _timeDelayErr != nil { - return errors.Wrap(_timeDelayErr, "Error serializing 'timeDelay' field") - } + // Simple Field (timeDelay) + if pushErr := writeBuffer.PushContext("timeDelay"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timeDelay") + } + _timeDelayErr := writeBuffer.WriteSerializable(ctx, m.GetTimeDelay()) + if popErr := writeBuffer.PopContext("timeDelay"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timeDelay") + } + if _timeDelayErr != nil { + return errors.Wrap(_timeDelayErr, "Error serializing 'timeDelay' field") + } - // Simple Field (setpointReference) - if pushErr := writeBuffer.PushContext("setpointReference"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for setpointReference") - } - _setpointReferenceErr := writeBuffer.WriteSerializable(ctx, m.GetSetpointReference()) - if popErr := writeBuffer.PopContext("setpointReference"); popErr != nil { - return errors.Wrap(popErr, "Error popping for setpointReference") - } - if _setpointReferenceErr != nil { - return errors.Wrap(_setpointReferenceErr, "Error serializing 'setpointReference' field") - } + // Simple Field (setpointReference) + if pushErr := writeBuffer.PushContext("setpointReference"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for setpointReference") + } + _setpointReferenceErr := writeBuffer.WriteSerializable(ctx, m.GetSetpointReference()) + if popErr := writeBuffer.PopContext("setpointReference"); popErr != nil { + return errors.Wrap(popErr, "Error popping for setpointReference") + } + if _setpointReferenceErr != nil { + return errors.Wrap(_setpointReferenceErr, "Error serializing 'setpointReference' field") + } - // Simple Field (lowDiffLimit) - if pushErr := writeBuffer.PushContext("lowDiffLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lowDiffLimit") - } - _lowDiffLimitErr := writeBuffer.WriteSerializable(ctx, m.GetLowDiffLimit()) - if popErr := writeBuffer.PopContext("lowDiffLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lowDiffLimit") - } - if _lowDiffLimitErr != nil { - return errors.Wrap(_lowDiffLimitErr, "Error serializing 'lowDiffLimit' field") - } + // Simple Field (lowDiffLimit) + if pushErr := writeBuffer.PushContext("lowDiffLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lowDiffLimit") + } + _lowDiffLimitErr := writeBuffer.WriteSerializable(ctx, m.GetLowDiffLimit()) + if popErr := writeBuffer.PopContext("lowDiffLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lowDiffLimit") + } + if _lowDiffLimitErr != nil { + return errors.Wrap(_lowDiffLimitErr, "Error serializing 'lowDiffLimit' field") + } - // Simple Field (highDiffLimit) - if pushErr := writeBuffer.PushContext("highDiffLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for highDiffLimit") - } - _highDiffLimitErr := writeBuffer.WriteSerializable(ctx, m.GetHighDiffLimit()) - if popErr := writeBuffer.PopContext("highDiffLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for highDiffLimit") - } - if _highDiffLimitErr != nil { - return errors.Wrap(_highDiffLimitErr, "Error serializing 'highDiffLimit' field") - } + // Simple Field (highDiffLimit) + if pushErr := writeBuffer.PushContext("highDiffLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for highDiffLimit") + } + _highDiffLimitErr := writeBuffer.WriteSerializable(ctx, m.GetHighDiffLimit()) + if popErr := writeBuffer.PopContext("highDiffLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for highDiffLimit") + } + if _highDiffLimitErr != nil { + return errors.Wrap(_highDiffLimitErr, "Error serializing 'highDiffLimit' field") + } - // Simple Field (deadband) - if pushErr := writeBuffer.PushContext("deadband"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for deadband") - } - _deadbandErr := writeBuffer.WriteSerializable(ctx, m.GetDeadband()) - if popErr := writeBuffer.PopContext("deadband"); popErr != nil { - return errors.Wrap(popErr, "Error popping for deadband") - } - if _deadbandErr != nil { - return errors.Wrap(_deadbandErr, "Error serializing 'deadband' field") - } + // Simple Field (deadband) + if pushErr := writeBuffer.PushContext("deadband"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for deadband") + } + _deadbandErr := writeBuffer.WriteSerializable(ctx, m.GetDeadband()) + if popErr := writeBuffer.PopContext("deadband"); popErr != nil { + return errors.Wrap(popErr, "Error popping for deadband") + } + if _deadbandErr != nil { + return errors.Wrap(_deadbandErr, "Error serializing 'deadband' field") + } - // Simple Field (closingTag) - if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for closingTag") - } - _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) - if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for closingTag") - } - if _closingTagErr != nil { - return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") - } + // Simple Field (closingTag) + if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for closingTag") + } + _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) + if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for closingTag") + } + if _closingTagErr != nil { + return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") + } if popErr := writeBuffer.PopContext("BACnetEventParameterFloatingLimit"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetEventParameterFloatingLimit") @@ -416,6 +421,7 @@ func (m *_BACnetEventParameterFloatingLimit) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetEventParameterFloatingLimit) isBACnetEventParameterFloatingLimit() bool { return true } @@ -430,3 +436,6 @@ func (m *_BACnetEventParameterFloatingLimit) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterNone.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterNone.go index ef529ea12b3..c07674fd2b0 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterNone.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterNone.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventParameterNone is the corresponding interface of BACnetEventParameterNone type BACnetEventParameterNone interface { @@ -46,9 +48,11 @@ type BACnetEventParameterNoneExactly interface { // _BACnetEventParameterNone is the data-structure of this message type _BACnetEventParameterNone struct { *_BACnetEventParameter - None BACnetContextTagNull + None BACnetContextTagNull } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetEventParameterNone struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetEventParameterNone) InitializeParent(parent BACnetEventParameter, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetEventParameterNone) InitializeParent(parent BACnetEventParameter , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetEventParameterNone) GetParent() BACnetEventParameter { +func (m *_BACnetEventParameterNone) GetParent() BACnetEventParameter { return m._BACnetEventParameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetEventParameterNone) GetNone() BACnetContextTagNull { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventParameterNone factory function for _BACnetEventParameterNone -func NewBACnetEventParameterNone(none BACnetContextTagNull, peekedTagHeader BACnetTagHeader) *_BACnetEventParameterNone { +func NewBACnetEventParameterNone( none BACnetContextTagNull , peekedTagHeader BACnetTagHeader ) *_BACnetEventParameterNone { _result := &_BACnetEventParameterNone{ - None: none, - _BACnetEventParameter: NewBACnetEventParameter(peekedTagHeader), + None: none, + _BACnetEventParameter: NewBACnetEventParameter(peekedTagHeader), } _result._BACnetEventParameter._BACnetEventParameterChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetEventParameterNone(none BACnetContextTagNull, peekedTagHeader BACn // Deprecated: use the interface for direct cast func CastBACnetEventParameterNone(structType interface{}) BACnetEventParameterNone { - if casted, ok := structType.(BACnetEventParameterNone); ok { + if casted, ok := structType.(BACnetEventParameterNone); ok { return casted } if casted, ok := structType.(*BACnetEventParameterNone); ok { @@ -115,6 +118,7 @@ func (m *_BACnetEventParameterNone) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_BACnetEventParameterNone) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetEventParameterNoneParseWithBuffer(ctx context.Context, readBuffer uti if pullErr := readBuffer.PullContext("none"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for none") } - _none, _noneErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(20)), BACnetDataType(BACnetDataType_NULL)) +_none, _noneErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(20) ) , BACnetDataType( BACnetDataType_NULL ) ) if _noneErr != nil { return nil, errors.Wrap(_noneErr, "Error parsing 'none' field of BACnetEventParameterNone") } @@ -151,8 +155,9 @@ func BACnetEventParameterNoneParseWithBuffer(ctx context.Context, readBuffer uti // Create a partially initialized instance _child := &_BACnetEventParameterNone{ - _BACnetEventParameter: &_BACnetEventParameter{}, - None: none, + _BACnetEventParameter: &_BACnetEventParameter{ + }, + None: none, } _child._BACnetEventParameter._BACnetEventParameterChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetEventParameterNone) SerializeWithWriteBuffer(ctx context.Context return errors.Wrap(pushErr, "Error pushing for BACnetEventParameterNone") } - // Simple Field (none) - if pushErr := writeBuffer.PushContext("none"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for none") - } - _noneErr := writeBuffer.WriteSerializable(ctx, m.GetNone()) - if popErr := writeBuffer.PopContext("none"); popErr != nil { - return errors.Wrap(popErr, "Error popping for none") - } - if _noneErr != nil { - return errors.Wrap(_noneErr, "Error serializing 'none' field") - } + // Simple Field (none) + if pushErr := writeBuffer.PushContext("none"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for none") + } + _noneErr := writeBuffer.WriteSerializable(ctx, m.GetNone()) + if popErr := writeBuffer.PopContext("none"); popErr != nil { + return errors.Wrap(popErr, "Error popping for none") + } + if _noneErr != nil { + return errors.Wrap(_noneErr, "Error serializing 'none' field") + } if popErr := writeBuffer.PopContext("BACnetEventParameterNone"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetEventParameterNone") @@ -194,6 +199,7 @@ func (m *_BACnetEventParameterNone) SerializeWithWriteBuffer(ctx context.Context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetEventParameterNone) isBACnetEventParameterNone() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetEventParameterNone) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterOutOfRange.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterOutOfRange.go index 0e0a47585bd..ee1307c4ad3 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterOutOfRange.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterOutOfRange.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventParameterOutOfRange is the corresponding interface of BACnetEventParameterOutOfRange type BACnetEventParameterOutOfRange interface { @@ -56,14 +58,16 @@ type BACnetEventParameterOutOfRangeExactly interface { // _BACnetEventParameterOutOfRange is the data-structure of this message type _BACnetEventParameterOutOfRange struct { *_BACnetEventParameter - OpeningTag BACnetOpeningTag - TimeDelay BACnetContextTagUnsignedInteger - LowDiffLimit BACnetContextTagReal - HighDiffLimit BACnetContextTagReal - Deadband BACnetContextTagReal - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + TimeDelay BACnetContextTagUnsignedInteger + LowDiffLimit BACnetContextTagReal + HighDiffLimit BACnetContextTagReal + Deadband BACnetContextTagReal + ClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -74,14 +78,12 @@ type _BACnetEventParameterOutOfRange struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetEventParameterOutOfRange) InitializeParent(parent BACnetEventParameter, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetEventParameterOutOfRange) InitializeParent(parent BACnetEventParameter , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetEventParameterOutOfRange) GetParent() BACnetEventParameter { +func (m *_BACnetEventParameterOutOfRange) GetParent() BACnetEventParameter { return m._BACnetEventParameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -116,16 +118,17 @@ func (m *_BACnetEventParameterOutOfRange) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventParameterOutOfRange factory function for _BACnetEventParameterOutOfRange -func NewBACnetEventParameterOutOfRange(openingTag BACnetOpeningTag, timeDelay BACnetContextTagUnsignedInteger, lowDiffLimit BACnetContextTagReal, highDiffLimit BACnetContextTagReal, deadband BACnetContextTagReal, closingTag BACnetClosingTag, peekedTagHeader BACnetTagHeader) *_BACnetEventParameterOutOfRange { +func NewBACnetEventParameterOutOfRange( openingTag BACnetOpeningTag , timeDelay BACnetContextTagUnsignedInteger , lowDiffLimit BACnetContextTagReal , highDiffLimit BACnetContextTagReal , deadband BACnetContextTagReal , closingTag BACnetClosingTag , peekedTagHeader BACnetTagHeader ) *_BACnetEventParameterOutOfRange { _result := &_BACnetEventParameterOutOfRange{ - OpeningTag: openingTag, - TimeDelay: timeDelay, - LowDiffLimit: lowDiffLimit, - HighDiffLimit: highDiffLimit, - Deadband: deadband, - ClosingTag: closingTag, - _BACnetEventParameter: NewBACnetEventParameter(peekedTagHeader), + OpeningTag: openingTag, + TimeDelay: timeDelay, + LowDiffLimit: lowDiffLimit, + HighDiffLimit: highDiffLimit, + Deadband: deadband, + ClosingTag: closingTag, + _BACnetEventParameter: NewBACnetEventParameter(peekedTagHeader), } _result._BACnetEventParameter._BACnetEventParameterChildRequirements = _result return _result @@ -133,7 +136,7 @@ func NewBACnetEventParameterOutOfRange(openingTag BACnetOpeningTag, timeDelay BA // Deprecated: use the interface for direct cast func CastBACnetEventParameterOutOfRange(structType interface{}) BACnetEventParameterOutOfRange { - if casted, ok := structType.(BACnetEventParameterOutOfRange); ok { + if casted, ok := structType.(BACnetEventParameterOutOfRange); ok { return casted } if casted, ok := structType.(*BACnetEventParameterOutOfRange); ok { @@ -170,6 +173,7 @@ func (m *_BACnetEventParameterOutOfRange) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetEventParameterOutOfRange) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -191,7 +195,7 @@ func BACnetEventParameterOutOfRangeParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(uint8(5))) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( uint8(5) ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetEventParameterOutOfRange") } @@ -204,7 +208,7 @@ func BACnetEventParameterOutOfRangeParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("timeDelay"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeDelay") } - _timeDelay, _timeDelayErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_timeDelay, _timeDelayErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _timeDelayErr != nil { return nil, errors.Wrap(_timeDelayErr, "Error parsing 'timeDelay' field of BACnetEventParameterOutOfRange") } @@ -217,7 +221,7 @@ func BACnetEventParameterOutOfRangeParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("lowDiffLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lowDiffLimit") } - _lowDiffLimit, _lowDiffLimitErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_REAL)) +_lowDiffLimit, _lowDiffLimitErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_REAL ) ) if _lowDiffLimitErr != nil { return nil, errors.Wrap(_lowDiffLimitErr, "Error parsing 'lowDiffLimit' field of BACnetEventParameterOutOfRange") } @@ -230,7 +234,7 @@ func BACnetEventParameterOutOfRangeParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("highDiffLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for highDiffLimit") } - _highDiffLimit, _highDiffLimitErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), BACnetDataType(BACnetDataType_REAL)) +_highDiffLimit, _highDiffLimitErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , BACnetDataType( BACnetDataType_REAL ) ) if _highDiffLimitErr != nil { return nil, errors.Wrap(_highDiffLimitErr, "Error parsing 'highDiffLimit' field of BACnetEventParameterOutOfRange") } @@ -243,7 +247,7 @@ func BACnetEventParameterOutOfRangeParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("deadband"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for deadband") } - _deadband, _deadbandErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(3)), BACnetDataType(BACnetDataType_REAL)) +_deadband, _deadbandErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(3) ) , BACnetDataType( BACnetDataType_REAL ) ) if _deadbandErr != nil { return nil, errors.Wrap(_deadbandErr, "Error parsing 'deadband' field of BACnetEventParameterOutOfRange") } @@ -256,7 +260,7 @@ func BACnetEventParameterOutOfRangeParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(uint8(5))) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( uint8(5) ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetEventParameterOutOfRange") } @@ -271,13 +275,14 @@ func BACnetEventParameterOutOfRangeParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_BACnetEventParameterOutOfRange{ - _BACnetEventParameter: &_BACnetEventParameter{}, - OpeningTag: openingTag, - TimeDelay: timeDelay, - LowDiffLimit: lowDiffLimit, - HighDiffLimit: highDiffLimit, - Deadband: deadband, - ClosingTag: closingTag, + _BACnetEventParameter: &_BACnetEventParameter{ + }, + OpeningTag: openingTag, + TimeDelay: timeDelay, + LowDiffLimit: lowDiffLimit, + HighDiffLimit: highDiffLimit, + Deadband: deadband, + ClosingTag: closingTag, } _child._BACnetEventParameter._BACnetEventParameterChildRequirements = _child return _child, nil @@ -299,77 +304,77 @@ func (m *_BACnetEventParameterOutOfRange) SerializeWithWriteBuffer(ctx context.C return errors.Wrap(pushErr, "Error pushing for BACnetEventParameterOutOfRange") } - // Simple Field (openingTag) - if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for openingTag") - } - _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) - if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for openingTag") - } - if _openingTagErr != nil { - return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") - } + // Simple Field (openingTag) + if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for openingTag") + } + _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) + if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for openingTag") + } + if _openingTagErr != nil { + return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") + } - // Simple Field (timeDelay) - if pushErr := writeBuffer.PushContext("timeDelay"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timeDelay") - } - _timeDelayErr := writeBuffer.WriteSerializable(ctx, m.GetTimeDelay()) - if popErr := writeBuffer.PopContext("timeDelay"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timeDelay") - } - if _timeDelayErr != nil { - return errors.Wrap(_timeDelayErr, "Error serializing 'timeDelay' field") - } + // Simple Field (timeDelay) + if pushErr := writeBuffer.PushContext("timeDelay"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timeDelay") + } + _timeDelayErr := writeBuffer.WriteSerializable(ctx, m.GetTimeDelay()) + if popErr := writeBuffer.PopContext("timeDelay"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timeDelay") + } + if _timeDelayErr != nil { + return errors.Wrap(_timeDelayErr, "Error serializing 'timeDelay' field") + } - // Simple Field (lowDiffLimit) - if pushErr := writeBuffer.PushContext("lowDiffLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lowDiffLimit") - } - _lowDiffLimitErr := writeBuffer.WriteSerializable(ctx, m.GetLowDiffLimit()) - if popErr := writeBuffer.PopContext("lowDiffLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lowDiffLimit") - } - if _lowDiffLimitErr != nil { - return errors.Wrap(_lowDiffLimitErr, "Error serializing 'lowDiffLimit' field") - } + // Simple Field (lowDiffLimit) + if pushErr := writeBuffer.PushContext("lowDiffLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lowDiffLimit") + } + _lowDiffLimitErr := writeBuffer.WriteSerializable(ctx, m.GetLowDiffLimit()) + if popErr := writeBuffer.PopContext("lowDiffLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lowDiffLimit") + } + if _lowDiffLimitErr != nil { + return errors.Wrap(_lowDiffLimitErr, "Error serializing 'lowDiffLimit' field") + } - // Simple Field (highDiffLimit) - if pushErr := writeBuffer.PushContext("highDiffLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for highDiffLimit") - } - _highDiffLimitErr := writeBuffer.WriteSerializable(ctx, m.GetHighDiffLimit()) - if popErr := writeBuffer.PopContext("highDiffLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for highDiffLimit") - } - if _highDiffLimitErr != nil { - return errors.Wrap(_highDiffLimitErr, "Error serializing 'highDiffLimit' field") - } + // Simple Field (highDiffLimit) + if pushErr := writeBuffer.PushContext("highDiffLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for highDiffLimit") + } + _highDiffLimitErr := writeBuffer.WriteSerializable(ctx, m.GetHighDiffLimit()) + if popErr := writeBuffer.PopContext("highDiffLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for highDiffLimit") + } + if _highDiffLimitErr != nil { + return errors.Wrap(_highDiffLimitErr, "Error serializing 'highDiffLimit' field") + } - // Simple Field (deadband) - if pushErr := writeBuffer.PushContext("deadband"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for deadband") - } - _deadbandErr := writeBuffer.WriteSerializable(ctx, m.GetDeadband()) - if popErr := writeBuffer.PopContext("deadband"); popErr != nil { - return errors.Wrap(popErr, "Error popping for deadband") - } - if _deadbandErr != nil { - return errors.Wrap(_deadbandErr, "Error serializing 'deadband' field") - } + // Simple Field (deadband) + if pushErr := writeBuffer.PushContext("deadband"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for deadband") + } + _deadbandErr := writeBuffer.WriteSerializable(ctx, m.GetDeadband()) + if popErr := writeBuffer.PopContext("deadband"); popErr != nil { + return errors.Wrap(popErr, "Error popping for deadband") + } + if _deadbandErr != nil { + return errors.Wrap(_deadbandErr, "Error serializing 'deadband' field") + } - // Simple Field (closingTag) - if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for closingTag") - } - _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) - if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for closingTag") - } - if _closingTagErr != nil { - return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") - } + // Simple Field (closingTag) + if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for closingTag") + } + _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) + if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for closingTag") + } + if _closingTagErr != nil { + return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") + } if popErr := writeBuffer.PopContext("BACnetEventParameterOutOfRange"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetEventParameterOutOfRange") @@ -379,6 +384,7 @@ func (m *_BACnetEventParameterOutOfRange) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetEventParameterOutOfRange) isBACnetEventParameterOutOfRange() bool { return true } @@ -393,3 +399,6 @@ func (m *_BACnetEventParameterOutOfRange) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterSignedOutOfRange.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterSignedOutOfRange.go index a3f3f1eaafa..a962ec42ad1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterSignedOutOfRange.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterSignedOutOfRange.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventParameterSignedOutOfRange is the corresponding interface of BACnetEventParameterSignedOutOfRange type BACnetEventParameterSignedOutOfRange interface { @@ -56,14 +58,16 @@ type BACnetEventParameterSignedOutOfRangeExactly interface { // _BACnetEventParameterSignedOutOfRange is the data-structure of this message type _BACnetEventParameterSignedOutOfRange struct { *_BACnetEventParameter - OpeningTag BACnetOpeningTag - TimeDelay BACnetContextTagUnsignedInteger - LowLimit BACnetContextTagSignedInteger - HighLimit BACnetContextTagSignedInteger - Deadband BACnetContextTagUnsignedInteger - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + TimeDelay BACnetContextTagUnsignedInteger + LowLimit BACnetContextTagSignedInteger + HighLimit BACnetContextTagSignedInteger + Deadband BACnetContextTagUnsignedInteger + ClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -74,14 +78,12 @@ type _BACnetEventParameterSignedOutOfRange struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetEventParameterSignedOutOfRange) InitializeParent(parent BACnetEventParameter, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetEventParameterSignedOutOfRange) InitializeParent(parent BACnetEventParameter , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetEventParameterSignedOutOfRange) GetParent() BACnetEventParameter { +func (m *_BACnetEventParameterSignedOutOfRange) GetParent() BACnetEventParameter { return m._BACnetEventParameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -116,16 +118,17 @@ func (m *_BACnetEventParameterSignedOutOfRange) GetClosingTag() BACnetClosingTag /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventParameterSignedOutOfRange factory function for _BACnetEventParameterSignedOutOfRange -func NewBACnetEventParameterSignedOutOfRange(openingTag BACnetOpeningTag, timeDelay BACnetContextTagUnsignedInteger, lowLimit BACnetContextTagSignedInteger, highLimit BACnetContextTagSignedInteger, deadband BACnetContextTagUnsignedInteger, closingTag BACnetClosingTag, peekedTagHeader BACnetTagHeader) *_BACnetEventParameterSignedOutOfRange { +func NewBACnetEventParameterSignedOutOfRange( openingTag BACnetOpeningTag , timeDelay BACnetContextTagUnsignedInteger , lowLimit BACnetContextTagSignedInteger , highLimit BACnetContextTagSignedInteger , deadband BACnetContextTagUnsignedInteger , closingTag BACnetClosingTag , peekedTagHeader BACnetTagHeader ) *_BACnetEventParameterSignedOutOfRange { _result := &_BACnetEventParameterSignedOutOfRange{ - OpeningTag: openingTag, - TimeDelay: timeDelay, - LowLimit: lowLimit, - HighLimit: highLimit, - Deadband: deadband, - ClosingTag: closingTag, - _BACnetEventParameter: NewBACnetEventParameter(peekedTagHeader), + OpeningTag: openingTag, + TimeDelay: timeDelay, + LowLimit: lowLimit, + HighLimit: highLimit, + Deadband: deadband, + ClosingTag: closingTag, + _BACnetEventParameter: NewBACnetEventParameter(peekedTagHeader), } _result._BACnetEventParameter._BACnetEventParameterChildRequirements = _result return _result @@ -133,7 +136,7 @@ func NewBACnetEventParameterSignedOutOfRange(openingTag BACnetOpeningTag, timeDe // Deprecated: use the interface for direct cast func CastBACnetEventParameterSignedOutOfRange(structType interface{}) BACnetEventParameterSignedOutOfRange { - if casted, ok := structType.(BACnetEventParameterSignedOutOfRange); ok { + if casted, ok := structType.(BACnetEventParameterSignedOutOfRange); ok { return casted } if casted, ok := structType.(*BACnetEventParameterSignedOutOfRange); ok { @@ -170,6 +173,7 @@ func (m *_BACnetEventParameterSignedOutOfRange) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetEventParameterSignedOutOfRange) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -191,7 +195,7 @@ func BACnetEventParameterSignedOutOfRangeParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(uint8(15))) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( uint8(15) ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetEventParameterSignedOutOfRange") } @@ -204,7 +208,7 @@ func BACnetEventParameterSignedOutOfRangeParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("timeDelay"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeDelay") } - _timeDelay, _timeDelayErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_timeDelay, _timeDelayErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _timeDelayErr != nil { return nil, errors.Wrap(_timeDelayErr, "Error parsing 'timeDelay' field of BACnetEventParameterSignedOutOfRange") } @@ -217,7 +221,7 @@ func BACnetEventParameterSignedOutOfRangeParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("lowLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lowLimit") } - _lowLimit, _lowLimitErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_SIGNED_INTEGER)) +_lowLimit, _lowLimitErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_SIGNED_INTEGER ) ) if _lowLimitErr != nil { return nil, errors.Wrap(_lowLimitErr, "Error parsing 'lowLimit' field of BACnetEventParameterSignedOutOfRange") } @@ -230,7 +234,7 @@ func BACnetEventParameterSignedOutOfRangeParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("highLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for highLimit") } - _highLimit, _highLimitErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), BACnetDataType(BACnetDataType_SIGNED_INTEGER)) +_highLimit, _highLimitErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , BACnetDataType( BACnetDataType_SIGNED_INTEGER ) ) if _highLimitErr != nil { return nil, errors.Wrap(_highLimitErr, "Error parsing 'highLimit' field of BACnetEventParameterSignedOutOfRange") } @@ -243,7 +247,7 @@ func BACnetEventParameterSignedOutOfRangeParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("deadband"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for deadband") } - _deadband, _deadbandErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(3)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_deadband, _deadbandErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(3) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _deadbandErr != nil { return nil, errors.Wrap(_deadbandErr, "Error parsing 'deadband' field of BACnetEventParameterSignedOutOfRange") } @@ -256,7 +260,7 @@ func BACnetEventParameterSignedOutOfRangeParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(uint8(15))) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( uint8(15) ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetEventParameterSignedOutOfRange") } @@ -271,13 +275,14 @@ func BACnetEventParameterSignedOutOfRangeParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetEventParameterSignedOutOfRange{ - _BACnetEventParameter: &_BACnetEventParameter{}, - OpeningTag: openingTag, - TimeDelay: timeDelay, - LowLimit: lowLimit, - HighLimit: highLimit, - Deadband: deadband, - ClosingTag: closingTag, + _BACnetEventParameter: &_BACnetEventParameter{ + }, + OpeningTag: openingTag, + TimeDelay: timeDelay, + LowLimit: lowLimit, + HighLimit: highLimit, + Deadband: deadband, + ClosingTag: closingTag, } _child._BACnetEventParameter._BACnetEventParameterChildRequirements = _child return _child, nil @@ -299,77 +304,77 @@ func (m *_BACnetEventParameterSignedOutOfRange) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetEventParameterSignedOutOfRange") } - // Simple Field (openingTag) - if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for openingTag") - } - _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) - if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for openingTag") - } - if _openingTagErr != nil { - return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") - } + // Simple Field (openingTag) + if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for openingTag") + } + _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) + if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for openingTag") + } + if _openingTagErr != nil { + return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") + } - // Simple Field (timeDelay) - if pushErr := writeBuffer.PushContext("timeDelay"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timeDelay") - } - _timeDelayErr := writeBuffer.WriteSerializable(ctx, m.GetTimeDelay()) - if popErr := writeBuffer.PopContext("timeDelay"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timeDelay") - } - if _timeDelayErr != nil { - return errors.Wrap(_timeDelayErr, "Error serializing 'timeDelay' field") - } + // Simple Field (timeDelay) + if pushErr := writeBuffer.PushContext("timeDelay"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timeDelay") + } + _timeDelayErr := writeBuffer.WriteSerializable(ctx, m.GetTimeDelay()) + if popErr := writeBuffer.PopContext("timeDelay"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timeDelay") + } + if _timeDelayErr != nil { + return errors.Wrap(_timeDelayErr, "Error serializing 'timeDelay' field") + } - // Simple Field (lowLimit) - if pushErr := writeBuffer.PushContext("lowLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lowLimit") - } - _lowLimitErr := writeBuffer.WriteSerializable(ctx, m.GetLowLimit()) - if popErr := writeBuffer.PopContext("lowLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lowLimit") - } - if _lowLimitErr != nil { - return errors.Wrap(_lowLimitErr, "Error serializing 'lowLimit' field") - } + // Simple Field (lowLimit) + if pushErr := writeBuffer.PushContext("lowLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lowLimit") + } + _lowLimitErr := writeBuffer.WriteSerializable(ctx, m.GetLowLimit()) + if popErr := writeBuffer.PopContext("lowLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lowLimit") + } + if _lowLimitErr != nil { + return errors.Wrap(_lowLimitErr, "Error serializing 'lowLimit' field") + } - // Simple Field (highLimit) - if pushErr := writeBuffer.PushContext("highLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for highLimit") - } - _highLimitErr := writeBuffer.WriteSerializable(ctx, m.GetHighLimit()) - if popErr := writeBuffer.PopContext("highLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for highLimit") - } - if _highLimitErr != nil { - return errors.Wrap(_highLimitErr, "Error serializing 'highLimit' field") - } + // Simple Field (highLimit) + if pushErr := writeBuffer.PushContext("highLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for highLimit") + } + _highLimitErr := writeBuffer.WriteSerializable(ctx, m.GetHighLimit()) + if popErr := writeBuffer.PopContext("highLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for highLimit") + } + if _highLimitErr != nil { + return errors.Wrap(_highLimitErr, "Error serializing 'highLimit' field") + } - // Simple Field (deadband) - if pushErr := writeBuffer.PushContext("deadband"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for deadband") - } - _deadbandErr := writeBuffer.WriteSerializable(ctx, m.GetDeadband()) - if popErr := writeBuffer.PopContext("deadband"); popErr != nil { - return errors.Wrap(popErr, "Error popping for deadband") - } - if _deadbandErr != nil { - return errors.Wrap(_deadbandErr, "Error serializing 'deadband' field") - } + // Simple Field (deadband) + if pushErr := writeBuffer.PushContext("deadband"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for deadband") + } + _deadbandErr := writeBuffer.WriteSerializable(ctx, m.GetDeadband()) + if popErr := writeBuffer.PopContext("deadband"); popErr != nil { + return errors.Wrap(popErr, "Error popping for deadband") + } + if _deadbandErr != nil { + return errors.Wrap(_deadbandErr, "Error serializing 'deadband' field") + } - // Simple Field (closingTag) - if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for closingTag") - } - _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) - if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for closingTag") - } - if _closingTagErr != nil { - return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") - } + // Simple Field (closingTag) + if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for closingTag") + } + _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) + if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for closingTag") + } + if _closingTagErr != nil { + return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") + } if popErr := writeBuffer.PopContext("BACnetEventParameterSignedOutOfRange"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetEventParameterSignedOutOfRange") @@ -379,6 +384,7 @@ func (m *_BACnetEventParameterSignedOutOfRange) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetEventParameterSignedOutOfRange) isBACnetEventParameterSignedOutOfRange() bool { return true } @@ -393,3 +399,6 @@ func (m *_BACnetEventParameterSignedOutOfRange) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterUnsignedOutOfRange.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterUnsignedOutOfRange.go index 3c456056c84..a12c6b8125c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterUnsignedOutOfRange.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterUnsignedOutOfRange.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventParameterUnsignedOutOfRange is the corresponding interface of BACnetEventParameterUnsignedOutOfRange type BACnetEventParameterUnsignedOutOfRange interface { @@ -56,14 +58,16 @@ type BACnetEventParameterUnsignedOutOfRangeExactly interface { // _BACnetEventParameterUnsignedOutOfRange is the data-structure of this message type _BACnetEventParameterUnsignedOutOfRange struct { *_BACnetEventParameter - OpeningTag BACnetOpeningTag - TimeDelay BACnetContextTagUnsignedInteger - LowLimit BACnetContextTagUnsignedInteger - HighLimit BACnetContextTagUnsignedInteger - Deadband BACnetContextTagUnsignedInteger - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + TimeDelay BACnetContextTagUnsignedInteger + LowLimit BACnetContextTagUnsignedInteger + HighLimit BACnetContextTagUnsignedInteger + Deadband BACnetContextTagUnsignedInteger + ClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -74,14 +78,12 @@ type _BACnetEventParameterUnsignedOutOfRange struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetEventParameterUnsignedOutOfRange) InitializeParent(parent BACnetEventParameter, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetEventParameterUnsignedOutOfRange) InitializeParent(parent BACnetEventParameter , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetEventParameterUnsignedOutOfRange) GetParent() BACnetEventParameter { +func (m *_BACnetEventParameterUnsignedOutOfRange) GetParent() BACnetEventParameter { return m._BACnetEventParameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -116,16 +118,17 @@ func (m *_BACnetEventParameterUnsignedOutOfRange) GetClosingTag() BACnetClosingT /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventParameterUnsignedOutOfRange factory function for _BACnetEventParameterUnsignedOutOfRange -func NewBACnetEventParameterUnsignedOutOfRange(openingTag BACnetOpeningTag, timeDelay BACnetContextTagUnsignedInteger, lowLimit BACnetContextTagUnsignedInteger, highLimit BACnetContextTagUnsignedInteger, deadband BACnetContextTagUnsignedInteger, closingTag BACnetClosingTag, peekedTagHeader BACnetTagHeader) *_BACnetEventParameterUnsignedOutOfRange { +func NewBACnetEventParameterUnsignedOutOfRange( openingTag BACnetOpeningTag , timeDelay BACnetContextTagUnsignedInteger , lowLimit BACnetContextTagUnsignedInteger , highLimit BACnetContextTagUnsignedInteger , deadband BACnetContextTagUnsignedInteger , closingTag BACnetClosingTag , peekedTagHeader BACnetTagHeader ) *_BACnetEventParameterUnsignedOutOfRange { _result := &_BACnetEventParameterUnsignedOutOfRange{ - OpeningTag: openingTag, - TimeDelay: timeDelay, - LowLimit: lowLimit, - HighLimit: highLimit, - Deadband: deadband, - ClosingTag: closingTag, - _BACnetEventParameter: NewBACnetEventParameter(peekedTagHeader), + OpeningTag: openingTag, + TimeDelay: timeDelay, + LowLimit: lowLimit, + HighLimit: highLimit, + Deadband: deadband, + ClosingTag: closingTag, + _BACnetEventParameter: NewBACnetEventParameter(peekedTagHeader), } _result._BACnetEventParameter._BACnetEventParameterChildRequirements = _result return _result @@ -133,7 +136,7 @@ func NewBACnetEventParameterUnsignedOutOfRange(openingTag BACnetOpeningTag, time // Deprecated: use the interface for direct cast func CastBACnetEventParameterUnsignedOutOfRange(structType interface{}) BACnetEventParameterUnsignedOutOfRange { - if casted, ok := structType.(BACnetEventParameterUnsignedOutOfRange); ok { + if casted, ok := structType.(BACnetEventParameterUnsignedOutOfRange); ok { return casted } if casted, ok := structType.(*BACnetEventParameterUnsignedOutOfRange); ok { @@ -170,6 +173,7 @@ func (m *_BACnetEventParameterUnsignedOutOfRange) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetEventParameterUnsignedOutOfRange) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -191,7 +195,7 @@ func BACnetEventParameterUnsignedOutOfRangeParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(uint8(16))) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( uint8(16) ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetEventParameterUnsignedOutOfRange") } @@ -204,7 +208,7 @@ func BACnetEventParameterUnsignedOutOfRangeParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("timeDelay"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeDelay") } - _timeDelay, _timeDelayErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_timeDelay, _timeDelayErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _timeDelayErr != nil { return nil, errors.Wrap(_timeDelayErr, "Error parsing 'timeDelay' field of BACnetEventParameterUnsignedOutOfRange") } @@ -217,7 +221,7 @@ func BACnetEventParameterUnsignedOutOfRangeParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("lowLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lowLimit") } - _lowLimit, _lowLimitErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_lowLimit, _lowLimitErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _lowLimitErr != nil { return nil, errors.Wrap(_lowLimitErr, "Error parsing 'lowLimit' field of BACnetEventParameterUnsignedOutOfRange") } @@ -230,7 +234,7 @@ func BACnetEventParameterUnsignedOutOfRangeParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("highLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for highLimit") } - _highLimit, _highLimitErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_highLimit, _highLimitErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _highLimitErr != nil { return nil, errors.Wrap(_highLimitErr, "Error parsing 'highLimit' field of BACnetEventParameterUnsignedOutOfRange") } @@ -243,7 +247,7 @@ func BACnetEventParameterUnsignedOutOfRangeParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("deadband"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for deadband") } - _deadband, _deadbandErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(3)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_deadband, _deadbandErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(3) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _deadbandErr != nil { return nil, errors.Wrap(_deadbandErr, "Error parsing 'deadband' field of BACnetEventParameterUnsignedOutOfRange") } @@ -256,7 +260,7 @@ func BACnetEventParameterUnsignedOutOfRangeParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(uint8(16))) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( uint8(16) ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetEventParameterUnsignedOutOfRange") } @@ -271,13 +275,14 @@ func BACnetEventParameterUnsignedOutOfRangeParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetEventParameterUnsignedOutOfRange{ - _BACnetEventParameter: &_BACnetEventParameter{}, - OpeningTag: openingTag, - TimeDelay: timeDelay, - LowLimit: lowLimit, - HighLimit: highLimit, - Deadband: deadband, - ClosingTag: closingTag, + _BACnetEventParameter: &_BACnetEventParameter{ + }, + OpeningTag: openingTag, + TimeDelay: timeDelay, + LowLimit: lowLimit, + HighLimit: highLimit, + Deadband: deadband, + ClosingTag: closingTag, } _child._BACnetEventParameter._BACnetEventParameterChildRequirements = _child return _child, nil @@ -299,77 +304,77 @@ func (m *_BACnetEventParameterUnsignedOutOfRange) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetEventParameterUnsignedOutOfRange") } - // Simple Field (openingTag) - if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for openingTag") - } - _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) - if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for openingTag") - } - if _openingTagErr != nil { - return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") - } + // Simple Field (openingTag) + if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for openingTag") + } + _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) + if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for openingTag") + } + if _openingTagErr != nil { + return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") + } - // Simple Field (timeDelay) - if pushErr := writeBuffer.PushContext("timeDelay"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timeDelay") - } - _timeDelayErr := writeBuffer.WriteSerializable(ctx, m.GetTimeDelay()) - if popErr := writeBuffer.PopContext("timeDelay"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timeDelay") - } - if _timeDelayErr != nil { - return errors.Wrap(_timeDelayErr, "Error serializing 'timeDelay' field") - } + // Simple Field (timeDelay) + if pushErr := writeBuffer.PushContext("timeDelay"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timeDelay") + } + _timeDelayErr := writeBuffer.WriteSerializable(ctx, m.GetTimeDelay()) + if popErr := writeBuffer.PopContext("timeDelay"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timeDelay") + } + if _timeDelayErr != nil { + return errors.Wrap(_timeDelayErr, "Error serializing 'timeDelay' field") + } - // Simple Field (lowLimit) - if pushErr := writeBuffer.PushContext("lowLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lowLimit") - } - _lowLimitErr := writeBuffer.WriteSerializable(ctx, m.GetLowLimit()) - if popErr := writeBuffer.PopContext("lowLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lowLimit") - } - if _lowLimitErr != nil { - return errors.Wrap(_lowLimitErr, "Error serializing 'lowLimit' field") - } + // Simple Field (lowLimit) + if pushErr := writeBuffer.PushContext("lowLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lowLimit") + } + _lowLimitErr := writeBuffer.WriteSerializable(ctx, m.GetLowLimit()) + if popErr := writeBuffer.PopContext("lowLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lowLimit") + } + if _lowLimitErr != nil { + return errors.Wrap(_lowLimitErr, "Error serializing 'lowLimit' field") + } - // Simple Field (highLimit) - if pushErr := writeBuffer.PushContext("highLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for highLimit") - } - _highLimitErr := writeBuffer.WriteSerializable(ctx, m.GetHighLimit()) - if popErr := writeBuffer.PopContext("highLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for highLimit") - } - if _highLimitErr != nil { - return errors.Wrap(_highLimitErr, "Error serializing 'highLimit' field") - } + // Simple Field (highLimit) + if pushErr := writeBuffer.PushContext("highLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for highLimit") + } + _highLimitErr := writeBuffer.WriteSerializable(ctx, m.GetHighLimit()) + if popErr := writeBuffer.PopContext("highLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for highLimit") + } + if _highLimitErr != nil { + return errors.Wrap(_highLimitErr, "Error serializing 'highLimit' field") + } - // Simple Field (deadband) - if pushErr := writeBuffer.PushContext("deadband"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for deadband") - } - _deadbandErr := writeBuffer.WriteSerializable(ctx, m.GetDeadband()) - if popErr := writeBuffer.PopContext("deadband"); popErr != nil { - return errors.Wrap(popErr, "Error popping for deadband") - } - if _deadbandErr != nil { - return errors.Wrap(_deadbandErr, "Error serializing 'deadband' field") - } + // Simple Field (deadband) + if pushErr := writeBuffer.PushContext("deadband"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for deadband") + } + _deadbandErr := writeBuffer.WriteSerializable(ctx, m.GetDeadband()) + if popErr := writeBuffer.PopContext("deadband"); popErr != nil { + return errors.Wrap(popErr, "Error popping for deadband") + } + if _deadbandErr != nil { + return errors.Wrap(_deadbandErr, "Error serializing 'deadband' field") + } - // Simple Field (closingTag) - if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for closingTag") - } - _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) - if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for closingTag") - } - if _closingTagErr != nil { - return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") - } + // Simple Field (closingTag) + if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for closingTag") + } + _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) + if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for closingTag") + } + if _closingTagErr != nil { + return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") + } if popErr := writeBuffer.PopContext("BACnetEventParameterUnsignedOutOfRange"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetEventParameterUnsignedOutOfRange") @@ -379,6 +384,7 @@ func (m *_BACnetEventParameterUnsignedOutOfRange) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetEventParameterUnsignedOutOfRange) isBACnetEventParameterUnsignedOutOfRange() bool { return true } @@ -393,3 +399,6 @@ func (m *_BACnetEventParameterUnsignedOutOfRange) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterUnsignedRange.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterUnsignedRange.go index 9afbae9f47d..02756a6bd22 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterUnsignedRange.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventParameterUnsignedRange.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventParameterUnsignedRange is the corresponding interface of BACnetEventParameterUnsignedRange type BACnetEventParameterUnsignedRange interface { @@ -54,13 +56,15 @@ type BACnetEventParameterUnsignedRangeExactly interface { // _BACnetEventParameterUnsignedRange is the data-structure of this message type _BACnetEventParameterUnsignedRange struct { *_BACnetEventParameter - OpeningTag BACnetOpeningTag - TimeDelay BACnetContextTagUnsignedInteger - LowLimit BACnetContextTagUnsignedInteger - HighLimit BACnetContextTagUnsignedInteger - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + TimeDelay BACnetContextTagUnsignedInteger + LowLimit BACnetContextTagUnsignedInteger + HighLimit BACnetContextTagUnsignedInteger + ClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -71,14 +75,12 @@ type _BACnetEventParameterUnsignedRange struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetEventParameterUnsignedRange) InitializeParent(parent BACnetEventParameter, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetEventParameterUnsignedRange) InitializeParent(parent BACnetEventParameter , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetEventParameterUnsignedRange) GetParent() BACnetEventParameter { +func (m *_BACnetEventParameterUnsignedRange) GetParent() BACnetEventParameter { return m._BACnetEventParameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -109,15 +111,16 @@ func (m *_BACnetEventParameterUnsignedRange) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventParameterUnsignedRange factory function for _BACnetEventParameterUnsignedRange -func NewBACnetEventParameterUnsignedRange(openingTag BACnetOpeningTag, timeDelay BACnetContextTagUnsignedInteger, lowLimit BACnetContextTagUnsignedInteger, highLimit BACnetContextTagUnsignedInteger, closingTag BACnetClosingTag, peekedTagHeader BACnetTagHeader) *_BACnetEventParameterUnsignedRange { +func NewBACnetEventParameterUnsignedRange( openingTag BACnetOpeningTag , timeDelay BACnetContextTagUnsignedInteger , lowLimit BACnetContextTagUnsignedInteger , highLimit BACnetContextTagUnsignedInteger , closingTag BACnetClosingTag , peekedTagHeader BACnetTagHeader ) *_BACnetEventParameterUnsignedRange { _result := &_BACnetEventParameterUnsignedRange{ - OpeningTag: openingTag, - TimeDelay: timeDelay, - LowLimit: lowLimit, - HighLimit: highLimit, - ClosingTag: closingTag, - _BACnetEventParameter: NewBACnetEventParameter(peekedTagHeader), + OpeningTag: openingTag, + TimeDelay: timeDelay, + LowLimit: lowLimit, + HighLimit: highLimit, + ClosingTag: closingTag, + _BACnetEventParameter: NewBACnetEventParameter(peekedTagHeader), } _result._BACnetEventParameter._BACnetEventParameterChildRequirements = _result return _result @@ -125,7 +128,7 @@ func NewBACnetEventParameterUnsignedRange(openingTag BACnetOpeningTag, timeDelay // Deprecated: use the interface for direct cast func CastBACnetEventParameterUnsignedRange(structType interface{}) BACnetEventParameterUnsignedRange { - if casted, ok := structType.(BACnetEventParameterUnsignedRange); ok { + if casted, ok := structType.(BACnetEventParameterUnsignedRange); ok { return casted } if casted, ok := structType.(*BACnetEventParameterUnsignedRange); ok { @@ -159,6 +162,7 @@ func (m *_BACnetEventParameterUnsignedRange) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetEventParameterUnsignedRange) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -180,7 +184,7 @@ func BACnetEventParameterUnsignedRangeParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(uint8(11))) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( uint8(11) ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetEventParameterUnsignedRange") } @@ -193,7 +197,7 @@ func BACnetEventParameterUnsignedRangeParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("timeDelay"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeDelay") } - _timeDelay, _timeDelayErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_timeDelay, _timeDelayErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _timeDelayErr != nil { return nil, errors.Wrap(_timeDelayErr, "Error parsing 'timeDelay' field of BACnetEventParameterUnsignedRange") } @@ -206,7 +210,7 @@ func BACnetEventParameterUnsignedRangeParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("lowLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lowLimit") } - _lowLimit, _lowLimitErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_lowLimit, _lowLimitErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _lowLimitErr != nil { return nil, errors.Wrap(_lowLimitErr, "Error parsing 'lowLimit' field of BACnetEventParameterUnsignedRange") } @@ -219,7 +223,7 @@ func BACnetEventParameterUnsignedRangeParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("highLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for highLimit") } - _highLimit, _highLimitErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_highLimit, _highLimitErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _highLimitErr != nil { return nil, errors.Wrap(_highLimitErr, "Error parsing 'highLimit' field of BACnetEventParameterUnsignedRange") } @@ -232,7 +236,7 @@ func BACnetEventParameterUnsignedRangeParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(uint8(11))) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( uint8(11) ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetEventParameterUnsignedRange") } @@ -247,12 +251,13 @@ func BACnetEventParameterUnsignedRangeParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetEventParameterUnsignedRange{ - _BACnetEventParameter: &_BACnetEventParameter{}, - OpeningTag: openingTag, - TimeDelay: timeDelay, - LowLimit: lowLimit, - HighLimit: highLimit, - ClosingTag: closingTag, + _BACnetEventParameter: &_BACnetEventParameter{ + }, + OpeningTag: openingTag, + TimeDelay: timeDelay, + LowLimit: lowLimit, + HighLimit: highLimit, + ClosingTag: closingTag, } _child._BACnetEventParameter._BACnetEventParameterChildRequirements = _child return _child, nil @@ -274,65 +279,65 @@ func (m *_BACnetEventParameterUnsignedRange) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetEventParameterUnsignedRange") } - // Simple Field (openingTag) - if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for openingTag") - } - _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) - if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for openingTag") - } - if _openingTagErr != nil { - return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") - } + // Simple Field (openingTag) + if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for openingTag") + } + _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) + if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for openingTag") + } + if _openingTagErr != nil { + return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") + } - // Simple Field (timeDelay) - if pushErr := writeBuffer.PushContext("timeDelay"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timeDelay") - } - _timeDelayErr := writeBuffer.WriteSerializable(ctx, m.GetTimeDelay()) - if popErr := writeBuffer.PopContext("timeDelay"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timeDelay") - } - if _timeDelayErr != nil { - return errors.Wrap(_timeDelayErr, "Error serializing 'timeDelay' field") - } + // Simple Field (timeDelay) + if pushErr := writeBuffer.PushContext("timeDelay"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timeDelay") + } + _timeDelayErr := writeBuffer.WriteSerializable(ctx, m.GetTimeDelay()) + if popErr := writeBuffer.PopContext("timeDelay"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timeDelay") + } + if _timeDelayErr != nil { + return errors.Wrap(_timeDelayErr, "Error serializing 'timeDelay' field") + } - // Simple Field (lowLimit) - if pushErr := writeBuffer.PushContext("lowLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lowLimit") - } - _lowLimitErr := writeBuffer.WriteSerializable(ctx, m.GetLowLimit()) - if popErr := writeBuffer.PopContext("lowLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lowLimit") - } - if _lowLimitErr != nil { - return errors.Wrap(_lowLimitErr, "Error serializing 'lowLimit' field") - } + // Simple Field (lowLimit) + if pushErr := writeBuffer.PushContext("lowLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lowLimit") + } + _lowLimitErr := writeBuffer.WriteSerializable(ctx, m.GetLowLimit()) + if popErr := writeBuffer.PopContext("lowLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lowLimit") + } + if _lowLimitErr != nil { + return errors.Wrap(_lowLimitErr, "Error serializing 'lowLimit' field") + } - // Simple Field (highLimit) - if pushErr := writeBuffer.PushContext("highLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for highLimit") - } - _highLimitErr := writeBuffer.WriteSerializable(ctx, m.GetHighLimit()) - if popErr := writeBuffer.PopContext("highLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for highLimit") - } - if _highLimitErr != nil { - return errors.Wrap(_highLimitErr, "Error serializing 'highLimit' field") - } + // Simple Field (highLimit) + if pushErr := writeBuffer.PushContext("highLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for highLimit") + } + _highLimitErr := writeBuffer.WriteSerializable(ctx, m.GetHighLimit()) + if popErr := writeBuffer.PopContext("highLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for highLimit") + } + if _highLimitErr != nil { + return errors.Wrap(_highLimitErr, "Error serializing 'highLimit' field") + } - // Simple Field (closingTag) - if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for closingTag") - } - _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) - if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for closingTag") - } - if _closingTagErr != nil { - return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") - } + // Simple Field (closingTag) + if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for closingTag") + } + _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) + if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for closingTag") + } + if _closingTagErr != nil { + return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") + } if popErr := writeBuffer.PopContext("BACnetEventParameterUnsignedRange"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetEventParameterUnsignedRange") @@ -342,6 +347,7 @@ func (m *_BACnetEventParameterUnsignedRange) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetEventParameterUnsignedRange) isBACnetEventParameterUnsignedRange() bool { return true } @@ -356,3 +362,6 @@ func (m *_BACnetEventParameterUnsignedRange) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventPriorities.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventPriorities.go index 3ea621ad90b..3b7ed0e2d7a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventPriorities.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventPriorities.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventPriorities is the corresponding interface of BACnetEventPriorities type BACnetEventPriorities interface { @@ -52,16 +54,17 @@ type BACnetEventPrioritiesExactly interface { // _BACnetEventPriorities is the data-structure of this message type _BACnetEventPriorities struct { - OpeningTag BACnetOpeningTag - ToOffnormal BACnetApplicationTagUnsignedInteger - ToFault BACnetApplicationTagUnsignedInteger - ToNormal BACnetApplicationTagUnsignedInteger - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + ToOffnormal BACnetApplicationTagUnsignedInteger + ToFault BACnetApplicationTagUnsignedInteger + ToNormal BACnetApplicationTagUnsignedInteger + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,14 +95,15 @@ func (m *_BACnetEventPriorities) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventPriorities factory function for _BACnetEventPriorities -func NewBACnetEventPriorities(openingTag BACnetOpeningTag, toOffnormal BACnetApplicationTagUnsignedInteger, toFault BACnetApplicationTagUnsignedInteger, toNormal BACnetApplicationTagUnsignedInteger, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetEventPriorities { - return &_BACnetEventPriorities{OpeningTag: openingTag, ToOffnormal: toOffnormal, ToFault: toFault, ToNormal: toNormal, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetEventPriorities( openingTag BACnetOpeningTag , toOffnormal BACnetApplicationTagUnsignedInteger , toFault BACnetApplicationTagUnsignedInteger , toNormal BACnetApplicationTagUnsignedInteger , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetEventPriorities { +return &_BACnetEventPriorities{ OpeningTag: openingTag , ToOffnormal: toOffnormal , ToFault: toFault , ToNormal: toNormal , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetEventPriorities(structType interface{}) BACnetEventPriorities { - if casted, ok := structType.(BACnetEventPriorities); ok { + if casted, ok := structType.(BACnetEventPriorities); ok { return casted } if casted, ok := structType.(*BACnetEventPriorities); ok { @@ -133,6 +137,7 @@ func (m *_BACnetEventPriorities) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetEventPriorities) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetEventPrioritiesParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetEventPriorities") } @@ -167,7 +172,7 @@ func BACnetEventPrioritiesParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("toOffnormal"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for toOffnormal") } - _toOffnormal, _toOffnormalErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_toOffnormal, _toOffnormalErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _toOffnormalErr != nil { return nil, errors.Wrap(_toOffnormalErr, "Error parsing 'toOffnormal' field of BACnetEventPriorities") } @@ -180,7 +185,7 @@ func BACnetEventPrioritiesParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("toFault"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for toFault") } - _toFault, _toFaultErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_toFault, _toFaultErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _toFaultErr != nil { return nil, errors.Wrap(_toFaultErr, "Error parsing 'toFault' field of BACnetEventPriorities") } @@ -193,7 +198,7 @@ func BACnetEventPrioritiesParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("toNormal"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for toNormal") } - _toNormal, _toNormalErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_toNormal, _toNormalErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _toNormalErr != nil { return nil, errors.Wrap(_toNormalErr, "Error parsing 'toNormal' field of BACnetEventPriorities") } @@ -206,7 +211,7 @@ func BACnetEventPrioritiesParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetEventPriorities") } @@ -221,13 +226,13 @@ func BACnetEventPrioritiesParseWithBuffer(ctx context.Context, readBuffer utils. // Create the instance return &_BACnetEventPriorities{ - TagNumber: tagNumber, - OpeningTag: openingTag, - ToOffnormal: toOffnormal, - ToFault: toFault, - ToNormal: toNormal, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + ToOffnormal: toOffnormal, + ToFault: toFault, + ToNormal: toNormal, + ClosingTag: closingTag, + }, nil } func (m *_BACnetEventPriorities) Serialize() ([]byte, error) { @@ -241,7 +246,7 @@ func (m *_BACnetEventPriorities) Serialize() ([]byte, error) { func (m *_BACnetEventPriorities) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetEventPriorities"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetEventPriorities"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetEventPriorities") } @@ -311,13 +316,13 @@ func (m *_BACnetEventPriorities) SerializeWithWriteBuffer(ctx context.Context, w return nil } + //// // Arguments Getter func (m *_BACnetEventPriorities) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -335,3 +340,6 @@ func (m *_BACnetEventPriorities) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventState.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventState.go index 90618d8675b..e76c8756ee5 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventState.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventState.go @@ -34,13 +34,13 @@ type IBACnetEventState interface { utils.Serializable } -const ( - BACnetEventState_NORMAL BACnetEventState = 0 - BACnetEventState_FAULT BACnetEventState = 1 - BACnetEventState_OFFNORMAL BACnetEventState = 2 - BACnetEventState_HIGH_LIMIT BACnetEventState = 3 - BACnetEventState_LOW_LIMIT BACnetEventState = 4 - BACnetEventState_LIFE_SAVETY_ALARM BACnetEventState = 5 +const( + BACnetEventState_NORMAL BACnetEventState = 0 + BACnetEventState_FAULT BACnetEventState = 1 + BACnetEventState_OFFNORMAL BACnetEventState = 2 + BACnetEventState_HIGH_LIMIT BACnetEventState = 3 + BACnetEventState_LOW_LIMIT BACnetEventState = 4 + BACnetEventState_LIFE_SAVETY_ALARM BACnetEventState = 5 BACnetEventState_VENDOR_PROPRIETARY_VALUE BACnetEventState = 0xFFFF ) @@ -48,7 +48,7 @@ var BACnetEventStateValues []BACnetEventState func init() { _ = errors.New - BACnetEventStateValues = []BACnetEventState{ + BACnetEventStateValues = []BACnetEventState { BACnetEventState_NORMAL, BACnetEventState_FAULT, BACnetEventState_OFFNORMAL, @@ -61,20 +61,20 @@ func init() { func BACnetEventStateByValue(value uint16) (enum BACnetEventState, ok bool) { switch value { - case 0: - return BACnetEventState_NORMAL, true - case 0xFFFF: - return BACnetEventState_VENDOR_PROPRIETARY_VALUE, true - case 1: - return BACnetEventState_FAULT, true - case 2: - return BACnetEventState_OFFNORMAL, true - case 3: - return BACnetEventState_HIGH_LIMIT, true - case 4: - return BACnetEventState_LOW_LIMIT, true - case 5: - return BACnetEventState_LIFE_SAVETY_ALARM, true + case 0: + return BACnetEventState_NORMAL, true + case 0xFFFF: + return BACnetEventState_VENDOR_PROPRIETARY_VALUE, true + case 1: + return BACnetEventState_FAULT, true + case 2: + return BACnetEventState_OFFNORMAL, true + case 3: + return BACnetEventState_HIGH_LIMIT, true + case 4: + return BACnetEventState_LOW_LIMIT, true + case 5: + return BACnetEventState_LIFE_SAVETY_ALARM, true } return 0, false } @@ -99,13 +99,13 @@ func BACnetEventStateByName(value string) (enum BACnetEventState, ok bool) { return 0, false } -func BACnetEventStateKnows(value uint16) bool { +func BACnetEventStateKnows(value uint16) bool { for _, typeValue := range BACnetEventStateValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastBACnetEventState(structType interface{}) BACnetEventState { @@ -179,3 +179,4 @@ func (e BACnetEventState) PLC4XEnumName() string { func (e BACnetEventState) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventStateTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventStateTagged.go index f44600de091..245872cdb9d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventStateTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventStateTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventStateTagged is the corresponding interface of BACnetEventStateTagged type BACnetEventStateTagged interface { @@ -50,15 +52,16 @@ type BACnetEventStateTaggedExactly interface { // _BACnetEventStateTagged is the data-structure of this message type _BACnetEventStateTagged struct { - Header BACnetTagHeader - Value BACnetEventState - ProprietaryValue uint32 + Header BACnetTagHeader + Value BACnetEventState + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_BACnetEventStateTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventStateTagged factory function for _BACnetEventStateTagged -func NewBACnetEventStateTagged(header BACnetTagHeader, value BACnetEventState, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_BACnetEventStateTagged { - return &_BACnetEventStateTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetEventStateTagged( header BACnetTagHeader , value BACnetEventState , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_BACnetEventStateTagged { +return &_BACnetEventStateTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetEventStateTagged(structType interface{}) BACnetEventStateTagged { - if casted, ok := structType.(BACnetEventStateTagged); ok { + if casted, ok := structType.(BACnetEventStateTagged); ok { return casted } if casted, ok := structType.(*BACnetEventStateTagged); ok { @@ -123,16 +127,17 @@ func (m *_BACnetEventStateTagged) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetEventStateTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetEventStateTaggedParseWithBuffer(ctx context.Context, readBuffer utils if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetEventStateTagged") } @@ -164,12 +169,12 @@ func BACnetEventStateTaggedParseWithBuffer(ctx context.Context, readBuffer utils } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func BACnetEventStateTaggedParseWithBuffer(ctx context.Context, readBuffer utils } var value BACnetEventState if _value != nil { - value = _value.(BACnetEventState) + value = _value.(BACnetEventState) } // Virtual field @@ -195,7 +200,7 @@ func BACnetEventStateTaggedParseWithBuffer(ctx context.Context, readBuffer utils } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetEventStateTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func BACnetEventStateTaggedParseWithBuffer(ctx context.Context, readBuffer utils // Create the instance return &_BACnetEventStateTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetEventStateTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_BACnetEventStateTagged) Serialize() ([]byte, error) { func (m *_BACnetEventStateTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetEventStateTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetEventStateTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetEventStateTagged") } @@ -261,6 +266,7 @@ func (m *_BACnetEventStateTagged) SerializeWithWriteBuffer(ctx context.Context, return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_BACnetEventStateTagged) GetTagNumber() uint8 { func (m *_BACnetEventStateTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_BACnetEventStateTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventSummariesList.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventSummariesList.go index d674abb4136..59434b882c0 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventSummariesList.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventSummariesList.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventSummariesList is the corresponding interface of BACnetEventSummariesList type BACnetEventSummariesList interface { @@ -49,14 +51,15 @@ type BACnetEventSummariesListExactly interface { // _BACnetEventSummariesList is the data-structure of this message type _BACnetEventSummariesList struct { - OpeningTag BACnetOpeningTag - ListOfEventSummaries []BACnetEventSummary - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + ListOfEventSummaries []BACnetEventSummary + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -79,14 +82,15 @@ func (m *_BACnetEventSummariesList) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventSummariesList factory function for _BACnetEventSummariesList -func NewBACnetEventSummariesList(openingTag BACnetOpeningTag, listOfEventSummaries []BACnetEventSummary, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetEventSummariesList { - return &_BACnetEventSummariesList{OpeningTag: openingTag, ListOfEventSummaries: listOfEventSummaries, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetEventSummariesList( openingTag BACnetOpeningTag , listOfEventSummaries []BACnetEventSummary , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetEventSummariesList { +return &_BACnetEventSummariesList{ OpeningTag: openingTag , ListOfEventSummaries: listOfEventSummaries , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetEventSummariesList(structType interface{}) BACnetEventSummariesList { - if casted, ok := structType.(BACnetEventSummariesList); ok { + if casted, ok := structType.(BACnetEventSummariesList); ok { return casted } if casted, ok := structType.(*BACnetEventSummariesList); ok { @@ -118,6 +122,7 @@ func (m *_BACnetEventSummariesList) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_BACnetEventSummariesList) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +144,7 @@ func BACnetEventSummariesListParseWithBuffer(ctx context.Context, readBuffer uti if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetEventSummariesList") } @@ -155,8 +160,8 @@ func BACnetEventSummariesListParseWithBuffer(ctx context.Context, readBuffer uti // Terminated array var listOfEventSummaries []BACnetEventSummary { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetEventSummaryParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetEventSummaryParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'listOfEventSummaries' field of BACnetEventSummariesList") } @@ -171,7 +176,7 @@ func BACnetEventSummariesListParseWithBuffer(ctx context.Context, readBuffer uti if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetEventSummariesList") } @@ -186,11 +191,11 @@ func BACnetEventSummariesListParseWithBuffer(ctx context.Context, readBuffer uti // Create the instance return &_BACnetEventSummariesList{ - TagNumber: tagNumber, - OpeningTag: openingTag, - ListOfEventSummaries: listOfEventSummaries, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + ListOfEventSummaries: listOfEventSummaries, + ClosingTag: closingTag, + }, nil } func (m *_BACnetEventSummariesList) Serialize() ([]byte, error) { @@ -204,7 +209,7 @@ func (m *_BACnetEventSummariesList) Serialize() ([]byte, error) { func (m *_BACnetEventSummariesList) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetEventSummariesList"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetEventSummariesList"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetEventSummariesList") } @@ -255,13 +260,13 @@ func (m *_BACnetEventSummariesList) SerializeWithWriteBuffer(ctx context.Context return nil } + //// // Arguments Getter func (m *_BACnetEventSummariesList) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -279,3 +284,6 @@ func (m *_BACnetEventSummariesList) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventSummary.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventSummary.go index eb8a1ab9082..b1aa36abf29 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventSummary.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventSummary.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventSummary is the corresponding interface of BACnetEventSummary type BACnetEventSummary interface { @@ -56,15 +58,16 @@ type BACnetEventSummaryExactly interface { // _BACnetEventSummary is the data-structure of this message type _BACnetEventSummary struct { - ObjectIdentifier BACnetContextTagObjectIdentifier - EventState BACnetEventStateTagged - AcknowledgedTransitions BACnetEventTransitionBitsTagged - EventTimestamps BACnetEventTimestampsEnclosed - NotifyType BACnetNotifyTypeTagged - EventEnable BACnetEventTransitionBitsTagged - EventPriorities BACnetEventPriorities + ObjectIdentifier BACnetContextTagObjectIdentifier + EventState BACnetEventStateTagged + AcknowledgedTransitions BACnetEventTransitionBitsTagged + EventTimestamps BACnetEventTimestampsEnclosed + NotifyType BACnetNotifyTypeTagged + EventEnable BACnetEventTransitionBitsTagged + EventPriorities BACnetEventPriorities } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -103,14 +106,15 @@ func (m *_BACnetEventSummary) GetEventPriorities() BACnetEventPriorities { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventSummary factory function for _BACnetEventSummary -func NewBACnetEventSummary(objectIdentifier BACnetContextTagObjectIdentifier, eventState BACnetEventStateTagged, acknowledgedTransitions BACnetEventTransitionBitsTagged, eventTimestamps BACnetEventTimestampsEnclosed, notifyType BACnetNotifyTypeTagged, eventEnable BACnetEventTransitionBitsTagged, eventPriorities BACnetEventPriorities) *_BACnetEventSummary { - return &_BACnetEventSummary{ObjectIdentifier: objectIdentifier, EventState: eventState, AcknowledgedTransitions: acknowledgedTransitions, EventTimestamps: eventTimestamps, NotifyType: notifyType, EventEnable: eventEnable, EventPriorities: eventPriorities} +func NewBACnetEventSummary( objectIdentifier BACnetContextTagObjectIdentifier , eventState BACnetEventStateTagged , acknowledgedTransitions BACnetEventTransitionBitsTagged , eventTimestamps BACnetEventTimestampsEnclosed , notifyType BACnetNotifyTypeTagged , eventEnable BACnetEventTransitionBitsTagged , eventPriorities BACnetEventPriorities ) *_BACnetEventSummary { +return &_BACnetEventSummary{ ObjectIdentifier: objectIdentifier , EventState: eventState , AcknowledgedTransitions: acknowledgedTransitions , EventTimestamps: eventTimestamps , NotifyType: notifyType , EventEnable: eventEnable , EventPriorities: eventPriorities } } // Deprecated: use the interface for direct cast func CastBACnetEventSummary(structType interface{}) BACnetEventSummary { - if casted, ok := structType.(BACnetEventSummary); ok { + if casted, ok := structType.(BACnetEventSummary); ok { return casted } if casted, ok := structType.(*BACnetEventSummary); ok { @@ -150,6 +154,7 @@ func (m *_BACnetEventSummary) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetEventSummary) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -171,7 +176,7 @@ func BACnetEventSummaryParseWithBuffer(ctx context.Context, readBuffer utils.Rea if pullErr := readBuffer.PullContext("objectIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for objectIdentifier") } - _objectIdentifier, _objectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER)) +_objectIdentifier, _objectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_BACNET_OBJECT_IDENTIFIER ) ) if _objectIdentifierErr != nil { return nil, errors.Wrap(_objectIdentifierErr, "Error parsing 'objectIdentifier' field of BACnetEventSummary") } @@ -184,7 +189,7 @@ func BACnetEventSummaryParseWithBuffer(ctx context.Context, readBuffer utils.Rea if pullErr := readBuffer.PullContext("eventState"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for eventState") } - _eventState, _eventStateErr := BACnetEventStateTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_eventState, _eventStateErr := BACnetEventStateTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _eventStateErr != nil { return nil, errors.Wrap(_eventStateErr, "Error parsing 'eventState' field of BACnetEventSummary") } @@ -197,7 +202,7 @@ func BACnetEventSummaryParseWithBuffer(ctx context.Context, readBuffer utils.Rea if pullErr := readBuffer.PullContext("acknowledgedTransitions"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for acknowledgedTransitions") } - _acknowledgedTransitions, _acknowledgedTransitionsErr := BACnetEventTransitionBitsTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_acknowledgedTransitions, _acknowledgedTransitionsErr := BACnetEventTransitionBitsTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _acknowledgedTransitionsErr != nil { return nil, errors.Wrap(_acknowledgedTransitionsErr, "Error parsing 'acknowledgedTransitions' field of BACnetEventSummary") } @@ -210,7 +215,7 @@ func BACnetEventSummaryParseWithBuffer(ctx context.Context, readBuffer utils.Rea if pullErr := readBuffer.PullContext("eventTimestamps"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for eventTimestamps") } - _eventTimestamps, _eventTimestampsErr := BACnetEventTimestampsEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(3))) +_eventTimestamps, _eventTimestampsErr := BACnetEventTimestampsEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(3) ) ) if _eventTimestampsErr != nil { return nil, errors.Wrap(_eventTimestampsErr, "Error parsing 'eventTimestamps' field of BACnetEventSummary") } @@ -223,7 +228,7 @@ func BACnetEventSummaryParseWithBuffer(ctx context.Context, readBuffer utils.Rea if pullErr := readBuffer.PullContext("notifyType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for notifyType") } - _notifyType, _notifyTypeErr := BACnetNotifyTypeTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(4)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_notifyType, _notifyTypeErr := BACnetNotifyTypeTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(4) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _notifyTypeErr != nil { return nil, errors.Wrap(_notifyTypeErr, "Error parsing 'notifyType' field of BACnetEventSummary") } @@ -236,7 +241,7 @@ func BACnetEventSummaryParseWithBuffer(ctx context.Context, readBuffer utils.Rea if pullErr := readBuffer.PullContext("eventEnable"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for eventEnable") } - _eventEnable, _eventEnableErr := BACnetEventTransitionBitsTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(5)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_eventEnable, _eventEnableErr := BACnetEventTransitionBitsTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(5) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _eventEnableErr != nil { return nil, errors.Wrap(_eventEnableErr, "Error parsing 'eventEnable' field of BACnetEventSummary") } @@ -249,7 +254,7 @@ func BACnetEventSummaryParseWithBuffer(ctx context.Context, readBuffer utils.Rea if pullErr := readBuffer.PullContext("eventPriorities"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for eventPriorities") } - _eventPriorities, _eventPrioritiesErr := BACnetEventPrioritiesParseWithBuffer(ctx, readBuffer, uint8(uint8(6))) +_eventPriorities, _eventPrioritiesErr := BACnetEventPrioritiesParseWithBuffer(ctx, readBuffer , uint8( uint8(6) ) ) if _eventPrioritiesErr != nil { return nil, errors.Wrap(_eventPrioritiesErr, "Error parsing 'eventPriorities' field of BACnetEventSummary") } @@ -264,14 +269,14 @@ func BACnetEventSummaryParseWithBuffer(ctx context.Context, readBuffer utils.Rea // Create the instance return &_BACnetEventSummary{ - ObjectIdentifier: objectIdentifier, - EventState: eventState, - AcknowledgedTransitions: acknowledgedTransitions, - EventTimestamps: eventTimestamps, - NotifyType: notifyType, - EventEnable: eventEnable, - EventPriorities: eventPriorities, - }, nil + ObjectIdentifier: objectIdentifier, + EventState: eventState, + AcknowledgedTransitions: acknowledgedTransitions, + EventTimestamps: eventTimestamps, + NotifyType: notifyType, + EventEnable: eventEnable, + EventPriorities: eventPriorities, + }, nil } func (m *_BACnetEventSummary) Serialize() ([]byte, error) { @@ -285,7 +290,7 @@ func (m *_BACnetEventSummary) Serialize() ([]byte, error) { func (m *_BACnetEventSummary) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetEventSummary"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetEventSummary"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetEventSummary") } @@ -379,6 +384,7 @@ func (m *_BACnetEventSummary) SerializeWithWriteBuffer(ctx context.Context, writ return nil } + func (m *_BACnetEventSummary) isBACnetEventSummary() bool { return true } @@ -393,3 +399,6 @@ func (m *_BACnetEventSummary) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventTimestamps.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventTimestamps.go index cddb546c6db..bea059fdf54 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventTimestamps.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventTimestamps.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventTimestamps is the corresponding interface of BACnetEventTimestamps type BACnetEventTimestamps interface { @@ -48,11 +50,12 @@ type BACnetEventTimestampsExactly interface { // _BACnetEventTimestamps is the data-structure of this message type _BACnetEventTimestamps struct { - ToOffnormal BACnetTimeStamp - ToFault BACnetTimeStamp - ToNormal BACnetTimeStamp + ToOffnormal BACnetTimeStamp + ToFault BACnetTimeStamp + ToNormal BACnetTimeStamp } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -75,14 +78,15 @@ func (m *_BACnetEventTimestamps) GetToNormal() BACnetTimeStamp { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventTimestamps factory function for _BACnetEventTimestamps -func NewBACnetEventTimestamps(toOffnormal BACnetTimeStamp, toFault BACnetTimeStamp, toNormal BACnetTimeStamp) *_BACnetEventTimestamps { - return &_BACnetEventTimestamps{ToOffnormal: toOffnormal, ToFault: toFault, ToNormal: toNormal} +func NewBACnetEventTimestamps( toOffnormal BACnetTimeStamp , toFault BACnetTimeStamp , toNormal BACnetTimeStamp ) *_BACnetEventTimestamps { +return &_BACnetEventTimestamps{ ToOffnormal: toOffnormal , ToFault: toFault , ToNormal: toNormal } } // Deprecated: use the interface for direct cast func CastBACnetEventTimestamps(structType interface{}) BACnetEventTimestamps { - if casted, ok := structType.(BACnetEventTimestamps); ok { + if casted, ok := structType.(BACnetEventTimestamps); ok { return casted } if casted, ok := structType.(*BACnetEventTimestamps); ok { @@ -110,6 +114,7 @@ func (m *_BACnetEventTimestamps) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetEventTimestamps) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -131,7 +136,7 @@ func BACnetEventTimestampsParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("toOffnormal"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for toOffnormal") } - _toOffnormal, _toOffnormalErr := BACnetTimeStampParseWithBuffer(ctx, readBuffer) +_toOffnormal, _toOffnormalErr := BACnetTimeStampParseWithBuffer(ctx, readBuffer) if _toOffnormalErr != nil { return nil, errors.Wrap(_toOffnormalErr, "Error parsing 'toOffnormal' field of BACnetEventTimestamps") } @@ -144,7 +149,7 @@ func BACnetEventTimestampsParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("toFault"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for toFault") } - _toFault, _toFaultErr := BACnetTimeStampParseWithBuffer(ctx, readBuffer) +_toFault, _toFaultErr := BACnetTimeStampParseWithBuffer(ctx, readBuffer) if _toFaultErr != nil { return nil, errors.Wrap(_toFaultErr, "Error parsing 'toFault' field of BACnetEventTimestamps") } @@ -157,7 +162,7 @@ func BACnetEventTimestampsParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("toNormal"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for toNormal") } - _toNormal, _toNormalErr := BACnetTimeStampParseWithBuffer(ctx, readBuffer) +_toNormal, _toNormalErr := BACnetTimeStampParseWithBuffer(ctx, readBuffer) if _toNormalErr != nil { return nil, errors.Wrap(_toNormalErr, "Error parsing 'toNormal' field of BACnetEventTimestamps") } @@ -172,10 +177,10 @@ func BACnetEventTimestampsParseWithBuffer(ctx context.Context, readBuffer utils. // Create the instance return &_BACnetEventTimestamps{ - ToOffnormal: toOffnormal, - ToFault: toFault, - ToNormal: toNormal, - }, nil + ToOffnormal: toOffnormal, + ToFault: toFault, + ToNormal: toNormal, + }, nil } func (m *_BACnetEventTimestamps) Serialize() ([]byte, error) { @@ -189,7 +194,7 @@ func (m *_BACnetEventTimestamps) Serialize() ([]byte, error) { func (m *_BACnetEventTimestamps) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetEventTimestamps"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetEventTimestamps"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetEventTimestamps") } @@ -235,6 +240,7 @@ func (m *_BACnetEventTimestamps) SerializeWithWriteBuffer(ctx context.Context, w return nil } + func (m *_BACnetEventTimestamps) isBACnetEventTimestamps() bool { return true } @@ -249,3 +255,6 @@ func (m *_BACnetEventTimestamps) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventTimestampsEnclosed.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventTimestampsEnclosed.go index 820de6c6b3f..7fc710a8a26 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventTimestampsEnclosed.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventTimestampsEnclosed.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventTimestampsEnclosed is the corresponding interface of BACnetEventTimestampsEnclosed type BACnetEventTimestampsEnclosed interface { @@ -48,14 +50,15 @@ type BACnetEventTimestampsEnclosedExactly interface { // _BACnetEventTimestampsEnclosed is the data-structure of this message type _BACnetEventTimestampsEnclosed struct { - OpeningTag BACnetOpeningTag - EventTimestamps BACnetEventTimestamps - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + EventTimestamps BACnetEventTimestamps + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -78,14 +81,15 @@ func (m *_BACnetEventTimestampsEnclosed) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventTimestampsEnclosed factory function for _BACnetEventTimestampsEnclosed -func NewBACnetEventTimestampsEnclosed(openingTag BACnetOpeningTag, eventTimestamps BACnetEventTimestamps, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetEventTimestampsEnclosed { - return &_BACnetEventTimestampsEnclosed{OpeningTag: openingTag, EventTimestamps: eventTimestamps, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetEventTimestampsEnclosed( openingTag BACnetOpeningTag , eventTimestamps BACnetEventTimestamps , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetEventTimestampsEnclosed { +return &_BACnetEventTimestampsEnclosed{ OpeningTag: openingTag , EventTimestamps: eventTimestamps , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetEventTimestampsEnclosed(structType interface{}) BACnetEventTimestampsEnclosed { - if casted, ok := structType.(BACnetEventTimestampsEnclosed); ok { + if casted, ok := structType.(BACnetEventTimestampsEnclosed); ok { return casted } if casted, ok := structType.(*BACnetEventTimestampsEnclosed); ok { @@ -113,6 +117,7 @@ func (m *_BACnetEventTimestampsEnclosed) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetEventTimestampsEnclosed) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -134,7 +139,7 @@ func BACnetEventTimestampsEnclosedParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetEventTimestampsEnclosed") } @@ -147,7 +152,7 @@ func BACnetEventTimestampsEnclosedParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("eventTimestamps"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for eventTimestamps") } - _eventTimestamps, _eventTimestampsErr := BACnetEventTimestampsParseWithBuffer(ctx, readBuffer) +_eventTimestamps, _eventTimestampsErr := BACnetEventTimestampsParseWithBuffer(ctx, readBuffer) if _eventTimestampsErr != nil { return nil, errors.Wrap(_eventTimestampsErr, "Error parsing 'eventTimestamps' field of BACnetEventTimestampsEnclosed") } @@ -160,7 +165,7 @@ func BACnetEventTimestampsEnclosedParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetEventTimestampsEnclosed") } @@ -175,11 +180,11 @@ func BACnetEventTimestampsEnclosedParseWithBuffer(ctx context.Context, readBuffe // Create the instance return &_BACnetEventTimestampsEnclosed{ - TagNumber: tagNumber, - OpeningTag: openingTag, - EventTimestamps: eventTimestamps, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + EventTimestamps: eventTimestamps, + ClosingTag: closingTag, + }, nil } func (m *_BACnetEventTimestampsEnclosed) Serialize() ([]byte, error) { @@ -193,7 +198,7 @@ func (m *_BACnetEventTimestampsEnclosed) Serialize() ([]byte, error) { func (m *_BACnetEventTimestampsEnclosed) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetEventTimestampsEnclosed"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetEventTimestampsEnclosed"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetEventTimestampsEnclosed") } @@ -239,13 +244,13 @@ func (m *_BACnetEventTimestampsEnclosed) SerializeWithWriteBuffer(ctx context.Co return nil } + //// // Arguments Getter func (m *_BACnetEventTimestampsEnclosed) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -263,3 +268,6 @@ func (m *_BACnetEventTimestampsEnclosed) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventTransitionBits.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventTransitionBits.go index ecfac96790b..52ce4c9e01f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventTransitionBits.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventTransitionBits.go @@ -34,17 +34,17 @@ type IBACnetEventTransitionBits interface { utils.Serializable } -const ( +const( BACnetEventTransitionBits_TO_OFFNORMAL BACnetEventTransitionBits = 0 - BACnetEventTransitionBits_TO_FAULT BACnetEventTransitionBits = 1 - BACnetEventTransitionBits_TO_NORMAL BACnetEventTransitionBits = 2 + BACnetEventTransitionBits_TO_FAULT BACnetEventTransitionBits = 1 + BACnetEventTransitionBits_TO_NORMAL BACnetEventTransitionBits = 2 ) var BACnetEventTransitionBitsValues []BACnetEventTransitionBits func init() { _ = errors.New - BACnetEventTransitionBitsValues = []BACnetEventTransitionBits{ + BACnetEventTransitionBitsValues = []BACnetEventTransitionBits { BACnetEventTransitionBits_TO_OFFNORMAL, BACnetEventTransitionBits_TO_FAULT, BACnetEventTransitionBits_TO_NORMAL, @@ -53,12 +53,12 @@ func init() { func BACnetEventTransitionBitsByValue(value uint8) (enum BACnetEventTransitionBits, ok bool) { switch value { - case 0: - return BACnetEventTransitionBits_TO_OFFNORMAL, true - case 1: - return BACnetEventTransitionBits_TO_FAULT, true - case 2: - return BACnetEventTransitionBits_TO_NORMAL, true + case 0: + return BACnetEventTransitionBits_TO_OFFNORMAL, true + case 1: + return BACnetEventTransitionBits_TO_FAULT, true + case 2: + return BACnetEventTransitionBits_TO_NORMAL, true } return 0, false } @@ -75,13 +75,13 @@ func BACnetEventTransitionBitsByName(value string) (enum BACnetEventTransitionBi return 0, false } -func BACnetEventTransitionBitsKnows(value uint8) bool { +func BACnetEventTransitionBitsKnows(value uint8) bool { for _, typeValue := range BACnetEventTransitionBitsValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetEventTransitionBits(structType interface{}) BACnetEventTransitionBits { @@ -147,3 +147,4 @@ func (e BACnetEventTransitionBits) PLC4XEnumName() string { func (e BACnetEventTransitionBits) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventTransitionBitsTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventTransitionBitsTagged.go index c101b3f11da..714de6ff004 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventTransitionBitsTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventTransitionBitsTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventTransitionBitsTagged is the corresponding interface of BACnetEventTransitionBitsTagged type BACnetEventTransitionBitsTagged interface { @@ -52,14 +54,15 @@ type BACnetEventTransitionBitsTaggedExactly interface { // _BACnetEventTransitionBitsTagged is the data-structure of this message type _BACnetEventTransitionBitsTagged struct { - Header BACnetTagHeader - Payload BACnetTagPayloadBitString + Header BACnetTagHeader + Payload BACnetTagPayloadBitString // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -85,19 +88,19 @@ func (m *_BACnetEventTransitionBitsTagged) GetPayload() BACnetTagPayloadBitStrin func (m *_BACnetEventTransitionBitsTagged) GetToOffnormal() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (0))), func() interface{} { return bool(m.GetPayload().GetData()[0]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((0)))), func() interface{} {return bool(m.GetPayload().GetData()[0])}, func() interface{} {return bool(bool(false))}).(bool)) } func (m *_BACnetEventTransitionBitsTagged) GetToFault() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (1))), func() interface{} { return bool(m.GetPayload().GetData()[1]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((1)))), func() interface{} {return bool(m.GetPayload().GetData()[1])}, func() interface{} {return bool(bool(false))}).(bool)) } func (m *_BACnetEventTransitionBitsTagged) GetToNormal() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (2))), func() interface{} { return bool(m.GetPayload().GetData()[2]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((2)))), func() interface{} {return bool(m.GetPayload().GetData()[2])}, func() interface{} {return bool(bool(false))}).(bool)) } /////////////////////// @@ -105,14 +108,15 @@ func (m *_BACnetEventTransitionBitsTagged) GetToNormal() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventTransitionBitsTagged factory function for _BACnetEventTransitionBitsTagged -func NewBACnetEventTransitionBitsTagged(header BACnetTagHeader, payload BACnetTagPayloadBitString, tagNumber uint8, tagClass TagClass) *_BACnetEventTransitionBitsTagged { - return &_BACnetEventTransitionBitsTagged{Header: header, Payload: payload, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetEventTransitionBitsTagged( header BACnetTagHeader , payload BACnetTagPayloadBitString , tagNumber uint8 , tagClass TagClass ) *_BACnetEventTransitionBitsTagged { +return &_BACnetEventTransitionBitsTagged{ Header: header , Payload: payload , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetEventTransitionBitsTagged(structType interface{}) BACnetEventTransitionBitsTagged { - if casted, ok := structType.(BACnetEventTransitionBitsTagged); ok { + if casted, ok := structType.(BACnetEventTransitionBitsTagged); ok { return casted } if casted, ok := structType.(*BACnetEventTransitionBitsTagged); ok { @@ -143,6 +147,7 @@ func (m *_BACnetEventTransitionBitsTagged) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetEventTransitionBitsTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -164,7 +169,7 @@ func BACnetEventTransitionBitsTaggedParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetEventTransitionBitsTagged") } @@ -174,12 +179,12 @@ func BACnetEventTransitionBitsTaggedParseWithBuffer(ctx context.Context, readBuf } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -187,7 +192,7 @@ func BACnetEventTransitionBitsTaggedParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("payload"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for payload") } - _payload, _payloadErr := BACnetTagPayloadBitStringParseWithBuffer(ctx, readBuffer, uint32(header.GetActualLength())) +_payload, _payloadErr := BACnetTagPayloadBitStringParseWithBuffer(ctx, readBuffer , uint32( header.GetActualLength() ) ) if _payloadErr != nil { return nil, errors.Wrap(_payloadErr, "Error parsing 'payload' field of BACnetEventTransitionBitsTagged") } @@ -197,17 +202,17 @@ func BACnetEventTransitionBitsTaggedParseWithBuffer(ctx context.Context, readBuf } // Virtual field - _toOffnormal := utils.InlineIf((bool((len(payload.GetData())) > (0))), func() interface{} { return bool(payload.GetData()[0]) }, func() interface{} { return bool(bool(false)) }).(bool) + _toOffnormal := utils.InlineIf((bool(((len(payload.GetData()))) > ((0)))), func() interface{} {return bool(payload.GetData()[0])}, func() interface{} {return bool(bool(false))}).(bool) toOffnormal := bool(_toOffnormal) _ = toOffnormal // Virtual field - _toFault := utils.InlineIf((bool((len(payload.GetData())) > (1))), func() interface{} { return bool(payload.GetData()[1]) }, func() interface{} { return bool(bool(false)) }).(bool) + _toFault := utils.InlineIf((bool(((len(payload.GetData()))) > ((1)))), func() interface{} {return bool(payload.GetData()[1])}, func() interface{} {return bool(bool(false))}).(bool) toFault := bool(_toFault) _ = toFault // Virtual field - _toNormal := utils.InlineIf((bool((len(payload.GetData())) > (2))), func() interface{} { return bool(payload.GetData()[2]) }, func() interface{} { return bool(bool(false)) }).(bool) + _toNormal := utils.InlineIf((bool(((len(payload.GetData()))) > ((2)))), func() interface{} {return bool(payload.GetData()[2])}, func() interface{} {return bool(bool(false))}).(bool) toNormal := bool(_toNormal) _ = toNormal @@ -217,11 +222,11 @@ func BACnetEventTransitionBitsTaggedParseWithBuffer(ctx context.Context, readBuf // Create the instance return &_BACnetEventTransitionBitsTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Payload: payload, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Payload: payload, + }, nil } func (m *_BACnetEventTransitionBitsTagged) Serialize() ([]byte, error) { @@ -235,7 +240,7 @@ func (m *_BACnetEventTransitionBitsTagged) Serialize() ([]byte, error) { func (m *_BACnetEventTransitionBitsTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetEventTransitionBitsTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetEventTransitionBitsTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetEventTransitionBitsTagged") } @@ -281,6 +286,7 @@ func (m *_BACnetEventTransitionBitsTagged) SerializeWithWriteBuffer(ctx context. return nil } + //// // Arguments Getter @@ -290,7 +296,6 @@ func (m *_BACnetEventTransitionBitsTagged) GetTagNumber() uint8 { func (m *_BACnetEventTransitionBitsTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -308,3 +313,6 @@ func (m *_BACnetEventTransitionBitsTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventType.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventType.go index 6230b5847bf..cbbd3ccb660 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventType.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventType.go @@ -34,35 +34,35 @@ type IBACnetEventType interface { utils.Serializable } -const ( - BACnetEventType_CHANGE_OF_BITSTRING BACnetEventType = 0 - BACnetEventType_CHANGE_OF_STATE BACnetEventType = 1 - BACnetEventType_CHANGE_OF_VALUE BACnetEventType = 2 - BACnetEventType_COMMAND_FAILURE BACnetEventType = 3 - BACnetEventType_FLOATING_LIMIT BACnetEventType = 4 - BACnetEventType_OUT_OF_RANGE BACnetEventType = 5 - BACnetEventType_CHANGE_OF_LIFE_SAFETY BACnetEventType = 8 - BACnetEventType_EXTENDED BACnetEventType = 9 - BACnetEventType_BUFFER_READY BACnetEventType = 10 - BACnetEventType_UNSIGNED_RANGE BACnetEventType = 11 - BACnetEventType_ACCESS_EVENT BACnetEventType = 13 - BACnetEventType_DOUBLE_OUT_OF_RANGE BACnetEventType = 14 - BACnetEventType_SIGNED_OUT_OF_RANGE BACnetEventType = 15 - BACnetEventType_UNSIGNED_OUT_OF_RANGE BACnetEventType = 16 +const( + BACnetEventType_CHANGE_OF_BITSTRING BACnetEventType = 0 + BACnetEventType_CHANGE_OF_STATE BACnetEventType = 1 + BACnetEventType_CHANGE_OF_VALUE BACnetEventType = 2 + BACnetEventType_COMMAND_FAILURE BACnetEventType = 3 + BACnetEventType_FLOATING_LIMIT BACnetEventType = 4 + BACnetEventType_OUT_OF_RANGE BACnetEventType = 5 + BACnetEventType_CHANGE_OF_LIFE_SAFETY BACnetEventType = 8 + BACnetEventType_EXTENDED BACnetEventType = 9 + BACnetEventType_BUFFER_READY BACnetEventType = 10 + BACnetEventType_UNSIGNED_RANGE BACnetEventType = 11 + BACnetEventType_ACCESS_EVENT BACnetEventType = 13 + BACnetEventType_DOUBLE_OUT_OF_RANGE BACnetEventType = 14 + BACnetEventType_SIGNED_OUT_OF_RANGE BACnetEventType = 15 + BACnetEventType_UNSIGNED_OUT_OF_RANGE BACnetEventType = 16 BACnetEventType_CHANGE_OF_CHARACTERSTRING BACnetEventType = 17 - BACnetEventType_CHANGE_OF_STATUS_FLAGS BACnetEventType = 18 - BACnetEventType_CHANGE_OF_RELIABILITY BACnetEventType = 19 - BACnetEventType_NONE BACnetEventType = 20 - BACnetEventType_CHANGE_OF_DISCRETE_VALUE BACnetEventType = 21 - BACnetEventType_CHANGE_OF_TIMER BACnetEventType = 22 - BACnetEventType_VENDOR_PROPRIETARY_VALUE BACnetEventType = 0xFFFF + BACnetEventType_CHANGE_OF_STATUS_FLAGS BACnetEventType = 18 + BACnetEventType_CHANGE_OF_RELIABILITY BACnetEventType = 19 + BACnetEventType_NONE BACnetEventType = 20 + BACnetEventType_CHANGE_OF_DISCRETE_VALUE BACnetEventType = 21 + BACnetEventType_CHANGE_OF_TIMER BACnetEventType = 22 + BACnetEventType_VENDOR_PROPRIETARY_VALUE BACnetEventType = 0xFFFF ) var BACnetEventTypeValues []BACnetEventType func init() { _ = errors.New - BACnetEventTypeValues = []BACnetEventType{ + BACnetEventTypeValues = []BACnetEventType { BACnetEventType_CHANGE_OF_BITSTRING, BACnetEventType_CHANGE_OF_STATE, BACnetEventType_CHANGE_OF_VALUE, @@ -89,48 +89,48 @@ func init() { func BACnetEventTypeByValue(value uint16) (enum BACnetEventType, ok bool) { switch value { - case 0: - return BACnetEventType_CHANGE_OF_BITSTRING, true - case 0xFFFF: - return BACnetEventType_VENDOR_PROPRIETARY_VALUE, true - case 1: - return BACnetEventType_CHANGE_OF_STATE, true - case 10: - return BACnetEventType_BUFFER_READY, true - case 11: - return BACnetEventType_UNSIGNED_RANGE, true - case 13: - return BACnetEventType_ACCESS_EVENT, true - case 14: - return BACnetEventType_DOUBLE_OUT_OF_RANGE, true - case 15: - return BACnetEventType_SIGNED_OUT_OF_RANGE, true - case 16: - return BACnetEventType_UNSIGNED_OUT_OF_RANGE, true - case 17: - return BACnetEventType_CHANGE_OF_CHARACTERSTRING, true - case 18: - return BACnetEventType_CHANGE_OF_STATUS_FLAGS, true - case 19: - return BACnetEventType_CHANGE_OF_RELIABILITY, true - case 2: - return BACnetEventType_CHANGE_OF_VALUE, true - case 20: - return BACnetEventType_NONE, true - case 21: - return BACnetEventType_CHANGE_OF_DISCRETE_VALUE, true - case 22: - return BACnetEventType_CHANGE_OF_TIMER, true - case 3: - return BACnetEventType_COMMAND_FAILURE, true - case 4: - return BACnetEventType_FLOATING_LIMIT, true - case 5: - return BACnetEventType_OUT_OF_RANGE, true - case 8: - return BACnetEventType_CHANGE_OF_LIFE_SAFETY, true - case 9: - return BACnetEventType_EXTENDED, true + case 0: + return BACnetEventType_CHANGE_OF_BITSTRING, true + case 0xFFFF: + return BACnetEventType_VENDOR_PROPRIETARY_VALUE, true + case 1: + return BACnetEventType_CHANGE_OF_STATE, true + case 10: + return BACnetEventType_BUFFER_READY, true + case 11: + return BACnetEventType_UNSIGNED_RANGE, true + case 13: + return BACnetEventType_ACCESS_EVENT, true + case 14: + return BACnetEventType_DOUBLE_OUT_OF_RANGE, true + case 15: + return BACnetEventType_SIGNED_OUT_OF_RANGE, true + case 16: + return BACnetEventType_UNSIGNED_OUT_OF_RANGE, true + case 17: + return BACnetEventType_CHANGE_OF_CHARACTERSTRING, true + case 18: + return BACnetEventType_CHANGE_OF_STATUS_FLAGS, true + case 19: + return BACnetEventType_CHANGE_OF_RELIABILITY, true + case 2: + return BACnetEventType_CHANGE_OF_VALUE, true + case 20: + return BACnetEventType_NONE, true + case 21: + return BACnetEventType_CHANGE_OF_DISCRETE_VALUE, true + case 22: + return BACnetEventType_CHANGE_OF_TIMER, true + case 3: + return BACnetEventType_COMMAND_FAILURE, true + case 4: + return BACnetEventType_FLOATING_LIMIT, true + case 5: + return BACnetEventType_OUT_OF_RANGE, true + case 8: + return BACnetEventType_CHANGE_OF_LIFE_SAFETY, true + case 9: + return BACnetEventType_EXTENDED, true } return 0, false } @@ -183,13 +183,13 @@ func BACnetEventTypeByName(value string) (enum BACnetEventType, ok bool) { return 0, false } -func BACnetEventTypeKnows(value uint16) bool { +func BACnetEventTypeKnows(value uint16) bool { for _, typeValue := range BACnetEventTypeValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastBACnetEventType(structType interface{}) BACnetEventType { @@ -291,3 +291,4 @@ func (e BACnetEventType) PLC4XEnumName() string { func (e BACnetEventType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventTypeTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventTypeTagged.go index 0c321fa1974..7a01491e627 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventTypeTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventTypeTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetEventTypeTagged is the corresponding interface of BACnetEventTypeTagged type BACnetEventTypeTagged interface { @@ -50,15 +52,16 @@ type BACnetEventTypeTaggedExactly interface { // _BACnetEventTypeTagged is the data-structure of this message type _BACnetEventTypeTagged struct { - Header BACnetTagHeader - Value BACnetEventType - ProprietaryValue uint32 + Header BACnetTagHeader + Value BACnetEventType + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_BACnetEventTypeTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetEventTypeTagged factory function for _BACnetEventTypeTagged -func NewBACnetEventTypeTagged(header BACnetTagHeader, value BACnetEventType, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_BACnetEventTypeTagged { - return &_BACnetEventTypeTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetEventTypeTagged( header BACnetTagHeader , value BACnetEventType , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_BACnetEventTypeTagged { +return &_BACnetEventTypeTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetEventTypeTagged(structType interface{}) BACnetEventTypeTagged { - if casted, ok := structType.(BACnetEventTypeTagged); ok { + if casted, ok := structType.(BACnetEventTypeTagged); ok { return casted } if casted, ok := structType.(*BACnetEventTypeTagged); ok { @@ -123,16 +127,17 @@ func (m *_BACnetEventTypeTagged) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetEventTypeTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetEventTypeTaggedParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetEventTypeTagged") } @@ -164,12 +169,12 @@ func BACnetEventTypeTaggedParseWithBuffer(ctx context.Context, readBuffer utils. } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func BACnetEventTypeTaggedParseWithBuffer(ctx context.Context, readBuffer utils. } var value BACnetEventType if _value != nil { - value = _value.(BACnetEventType) + value = _value.(BACnetEventType) } // Virtual field @@ -195,7 +200,7 @@ func BACnetEventTypeTaggedParseWithBuffer(ctx context.Context, readBuffer utils. } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetEventTypeTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func BACnetEventTypeTaggedParseWithBuffer(ctx context.Context, readBuffer utils. // Create the instance return &_BACnetEventTypeTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetEventTypeTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_BACnetEventTypeTagged) Serialize() ([]byte, error) { func (m *_BACnetEventTypeTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetEventTypeTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetEventTypeTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetEventTypeTagged") } @@ -261,6 +266,7 @@ func (m *_BACnetEventTypeTagged) SerializeWithWriteBuffer(ctx context.Context, w return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_BACnetEventTypeTagged) GetTagNumber() uint8 { func (m *_BACnetEventTypeTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_BACnetEventTypeTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameter.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameter.go index 21768854620..29c03fa27cf 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameter.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameter.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetFaultParameter is the corresponding interface of BACnetFaultParameter type BACnetFaultParameter interface { @@ -47,7 +49,7 @@ type BACnetFaultParameterExactly interface { // _BACnetFaultParameter is the data-structure of this message type _BACnetFaultParameter struct { _BACnetFaultParameterChildRequirements - PeekedTagHeader BACnetTagHeader + PeekedTagHeader BACnetTagHeader } type _BACnetFaultParameterChildRequirements interface { @@ -55,6 +57,7 @@ type _BACnetFaultParameterChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type BACnetFaultParameterParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetFaultParameter, serializeChildFunction func() error) error GetTypeName() string @@ -62,13 +65,12 @@ type BACnetFaultParameterParent interface { type BACnetFaultParameterChild interface { utils.Serializable - InitializeParent(parent BACnetFaultParameter, peekedTagHeader BACnetTagHeader) +InitializeParent(parent BACnetFaultParameter , peekedTagHeader BACnetTagHeader ) GetParent() *BACnetFaultParameter GetTypeName() string BACnetFaultParameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,14 +100,15 @@ func (m *_BACnetFaultParameter) GetPeekedTagNumber() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetFaultParameter factory function for _BACnetFaultParameter -func NewBACnetFaultParameter(peekedTagHeader BACnetTagHeader) *_BACnetFaultParameter { - return &_BACnetFaultParameter{PeekedTagHeader: peekedTagHeader} +func NewBACnetFaultParameter( peekedTagHeader BACnetTagHeader ) *_BACnetFaultParameter { +return &_BACnetFaultParameter{ PeekedTagHeader: peekedTagHeader } } // Deprecated: use the interface for direct cast func CastBACnetFaultParameter(structType interface{}) BACnetFaultParameter { - if casted, ok := structType.(BACnetFaultParameter); ok { + if casted, ok := structType.(BACnetFaultParameter); ok { return casted } if casted, ok := structType.(*BACnetFaultParameter); ok { @@ -118,6 +121,7 @@ func (m *_BACnetFaultParameter) GetTypeName() string { return "BACnetFaultParameter" } + func (m *_BACnetFaultParameter) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -143,13 +147,13 @@ func BACnetFaultParameterParseWithBuffer(ctx context.Context, readBuffer utils.R currentPos := positionAware.GetPos() _ = currentPos - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Virtual field _peekedTagNumber := peekedTagHeader.GetActualTagNumber() @@ -159,29 +163,29 @@ func BACnetFaultParameterParseWithBuffer(ctx context.Context, readBuffer utils.R // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetFaultParameterChildSerializeRequirement interface { BACnetFaultParameter - InitializeParent(BACnetFaultParameter, BACnetTagHeader) + InitializeParent(BACnetFaultParameter, BACnetTagHeader) GetParent() BACnetFaultParameter } var _childTemp interface{} var _child BACnetFaultParameterChildSerializeRequirement var typeSwitchError error switch { - case peekedTagNumber == uint8(0): // BACnetFaultParameterNone - _childTemp, typeSwitchError = BACnetFaultParameterNoneParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(1): // BACnetFaultParameterFaultCharacterString - _childTemp, typeSwitchError = BACnetFaultParameterFaultCharacterStringParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(2): // BACnetFaultParameterFaultExtended - _childTemp, typeSwitchError = BACnetFaultParameterFaultExtendedParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(3): // BACnetFaultParameterFaultLifeSafety - _childTemp, typeSwitchError = BACnetFaultParameterFaultLifeSafetyParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(4): // BACnetFaultParameterFaultState - _childTemp, typeSwitchError = BACnetFaultParameterFaultStateParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(5): // BACnetFaultParameterFaultStatusFlags - _childTemp, typeSwitchError = BACnetFaultParameterFaultStatusFlagsParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(6): // BACnetFaultParameterFaultOutOfRange - _childTemp, typeSwitchError = BACnetFaultParameterFaultOutOfRangeParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(7): // BACnetFaultParameterFaultListed - _childTemp, typeSwitchError = BACnetFaultParameterFaultListedParseWithBuffer(ctx, readBuffer) +case peekedTagNumber == uint8(0) : // BACnetFaultParameterNone + _childTemp, typeSwitchError = BACnetFaultParameterNoneParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(1) : // BACnetFaultParameterFaultCharacterString + _childTemp, typeSwitchError = BACnetFaultParameterFaultCharacterStringParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(2) : // BACnetFaultParameterFaultExtended + _childTemp, typeSwitchError = BACnetFaultParameterFaultExtendedParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(3) : // BACnetFaultParameterFaultLifeSafety + _childTemp, typeSwitchError = BACnetFaultParameterFaultLifeSafetyParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(4) : // BACnetFaultParameterFaultState + _childTemp, typeSwitchError = BACnetFaultParameterFaultStateParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(5) : // BACnetFaultParameterFaultStatusFlags + _childTemp, typeSwitchError = BACnetFaultParameterFaultStatusFlagsParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(6) : // BACnetFaultParameterFaultOutOfRange + _childTemp, typeSwitchError = BACnetFaultParameterFaultOutOfRangeParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(7) : // BACnetFaultParameterFaultListed + _childTemp, typeSwitchError = BACnetFaultParameterFaultListedParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedTagNumber=%v]", peekedTagNumber) } @@ -195,7 +199,7 @@ func BACnetFaultParameterParseWithBuffer(ctx context.Context, readBuffer utils.R } // Finish initializing - _child.InitializeParent(_child, peekedTagHeader) +_child.InitializeParent(_child , peekedTagHeader ) return _child, nil } @@ -205,7 +209,7 @@ func (pm *_BACnetFaultParameter) SerializeParent(ctx context.Context, writeBuffe _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetFaultParameter"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetFaultParameter"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetFaultParameter") } // Virtual field @@ -224,6 +228,7 @@ func (pm *_BACnetFaultParameter) SerializeParent(ctx context.Context, writeBuffe return nil } + func (m *_BACnetFaultParameter) isBACnetFaultParameter() bool { return true } @@ -238,3 +243,6 @@ func (m *_BACnetFaultParameter) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultCharacterString.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultCharacterString.go index a4865bee6ae..8de4e279a0c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultCharacterString.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultCharacterString.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetFaultParameterFaultCharacterString is the corresponding interface of BACnetFaultParameterFaultCharacterString type BACnetFaultParameterFaultCharacterString interface { @@ -50,11 +52,13 @@ type BACnetFaultParameterFaultCharacterStringExactly interface { // _BACnetFaultParameterFaultCharacterString is the data-structure of this message type _BACnetFaultParameterFaultCharacterString struct { *_BACnetFaultParameter - OpeningTag BACnetOpeningTag - ListOfFaultValues BACnetFaultParameterFaultCharacterStringListOfFaultValues - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + ListOfFaultValues BACnetFaultParameterFaultCharacterStringListOfFaultValues + ClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -65,14 +69,12 @@ type _BACnetFaultParameterFaultCharacterString struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetFaultParameterFaultCharacterString) InitializeParent(parent BACnetFaultParameter, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetFaultParameterFaultCharacterString) InitializeParent(parent BACnetFaultParameter , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetFaultParameterFaultCharacterString) GetParent() BACnetFaultParameter { +func (m *_BACnetFaultParameterFaultCharacterString) GetParent() BACnetFaultParameter { return m._BACnetFaultParameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -95,13 +97,14 @@ func (m *_BACnetFaultParameterFaultCharacterString) GetClosingTag() BACnetClosin /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetFaultParameterFaultCharacterString factory function for _BACnetFaultParameterFaultCharacterString -func NewBACnetFaultParameterFaultCharacterString(openingTag BACnetOpeningTag, listOfFaultValues BACnetFaultParameterFaultCharacterStringListOfFaultValues, closingTag BACnetClosingTag, peekedTagHeader BACnetTagHeader) *_BACnetFaultParameterFaultCharacterString { +func NewBACnetFaultParameterFaultCharacterString( openingTag BACnetOpeningTag , listOfFaultValues BACnetFaultParameterFaultCharacterStringListOfFaultValues , closingTag BACnetClosingTag , peekedTagHeader BACnetTagHeader ) *_BACnetFaultParameterFaultCharacterString { _result := &_BACnetFaultParameterFaultCharacterString{ - OpeningTag: openingTag, - ListOfFaultValues: listOfFaultValues, - ClosingTag: closingTag, - _BACnetFaultParameter: NewBACnetFaultParameter(peekedTagHeader), + OpeningTag: openingTag, + ListOfFaultValues: listOfFaultValues, + ClosingTag: closingTag, + _BACnetFaultParameter: NewBACnetFaultParameter(peekedTagHeader), } _result._BACnetFaultParameter._BACnetFaultParameterChildRequirements = _result return _result @@ -109,7 +112,7 @@ func NewBACnetFaultParameterFaultCharacterString(openingTag BACnetOpeningTag, li // Deprecated: use the interface for direct cast func CastBACnetFaultParameterFaultCharacterString(structType interface{}) BACnetFaultParameterFaultCharacterString { - if casted, ok := structType.(BACnetFaultParameterFaultCharacterString); ok { + if casted, ok := structType.(BACnetFaultParameterFaultCharacterString); ok { return casted } if casted, ok := structType.(*BACnetFaultParameterFaultCharacterString); ok { @@ -137,6 +140,7 @@ func (m *_BACnetFaultParameterFaultCharacterString) GetLengthInBits(ctx context. return lengthInBits } + func (m *_BACnetFaultParameterFaultCharacterString) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -158,7 +162,7 @@ func BACnetFaultParameterFaultCharacterStringParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1))) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetFaultParameterFaultCharacterString") } @@ -171,7 +175,7 @@ func BACnetFaultParameterFaultCharacterStringParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("listOfFaultValues"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for listOfFaultValues") } - _listOfFaultValues, _listOfFaultValuesErr := BACnetFaultParameterFaultCharacterStringListOfFaultValuesParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_listOfFaultValues, _listOfFaultValuesErr := BACnetFaultParameterFaultCharacterStringListOfFaultValuesParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _listOfFaultValuesErr != nil { return nil, errors.Wrap(_listOfFaultValuesErr, "Error parsing 'listOfFaultValues' field of BACnetFaultParameterFaultCharacterString") } @@ -184,7 +188,7 @@ func BACnetFaultParameterFaultCharacterStringParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1))) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetFaultParameterFaultCharacterString") } @@ -199,10 +203,11 @@ func BACnetFaultParameterFaultCharacterStringParseWithBuffer(ctx context.Context // Create a partially initialized instance _child := &_BACnetFaultParameterFaultCharacterString{ - _BACnetFaultParameter: &_BACnetFaultParameter{}, - OpeningTag: openingTag, - ListOfFaultValues: listOfFaultValues, - ClosingTag: closingTag, + _BACnetFaultParameter: &_BACnetFaultParameter{ + }, + OpeningTag: openingTag, + ListOfFaultValues: listOfFaultValues, + ClosingTag: closingTag, } _child._BACnetFaultParameter._BACnetFaultParameterChildRequirements = _child return _child, nil @@ -224,41 +229,41 @@ func (m *_BACnetFaultParameterFaultCharacterString) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetFaultParameterFaultCharacterString") } - // Simple Field (openingTag) - if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for openingTag") - } - _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) - if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for openingTag") - } - if _openingTagErr != nil { - return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") - } + // Simple Field (openingTag) + if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for openingTag") + } + _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) + if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for openingTag") + } + if _openingTagErr != nil { + return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") + } - // Simple Field (listOfFaultValues) - if pushErr := writeBuffer.PushContext("listOfFaultValues"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for listOfFaultValues") - } - _listOfFaultValuesErr := writeBuffer.WriteSerializable(ctx, m.GetListOfFaultValues()) - if popErr := writeBuffer.PopContext("listOfFaultValues"); popErr != nil { - return errors.Wrap(popErr, "Error popping for listOfFaultValues") - } - if _listOfFaultValuesErr != nil { - return errors.Wrap(_listOfFaultValuesErr, "Error serializing 'listOfFaultValues' field") - } + // Simple Field (listOfFaultValues) + if pushErr := writeBuffer.PushContext("listOfFaultValues"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for listOfFaultValues") + } + _listOfFaultValuesErr := writeBuffer.WriteSerializable(ctx, m.GetListOfFaultValues()) + if popErr := writeBuffer.PopContext("listOfFaultValues"); popErr != nil { + return errors.Wrap(popErr, "Error popping for listOfFaultValues") + } + if _listOfFaultValuesErr != nil { + return errors.Wrap(_listOfFaultValuesErr, "Error serializing 'listOfFaultValues' field") + } - // Simple Field (closingTag) - if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for closingTag") - } - _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) - if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for closingTag") - } - if _closingTagErr != nil { - return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") - } + // Simple Field (closingTag) + if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for closingTag") + } + _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) + if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for closingTag") + } + if _closingTagErr != nil { + return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") + } if popErr := writeBuffer.PopContext("BACnetFaultParameterFaultCharacterString"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetFaultParameterFaultCharacterString") @@ -268,6 +273,7 @@ func (m *_BACnetFaultParameterFaultCharacterString) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetFaultParameterFaultCharacterString) isBACnetFaultParameterFaultCharacterString() bool { return true } @@ -282,3 +288,6 @@ func (m *_BACnetFaultParameterFaultCharacterString) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultCharacterStringListOfFaultValues.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultCharacterStringListOfFaultValues.go index 66816a1e7ea..a3b730b94f8 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultCharacterStringListOfFaultValues.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultCharacterStringListOfFaultValues.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetFaultParameterFaultCharacterStringListOfFaultValues is the corresponding interface of BACnetFaultParameterFaultCharacterStringListOfFaultValues type BACnetFaultParameterFaultCharacterStringListOfFaultValues interface { @@ -49,14 +51,15 @@ type BACnetFaultParameterFaultCharacterStringListOfFaultValuesExactly interface // _BACnetFaultParameterFaultCharacterStringListOfFaultValues is the data-structure of this message type _BACnetFaultParameterFaultCharacterStringListOfFaultValues struct { - OpeningTag BACnetOpeningTag - ListOfFaultValues []BACnetApplicationTagCharacterString - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + ListOfFaultValues []BACnetApplicationTagCharacterString + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -79,14 +82,15 @@ func (m *_BACnetFaultParameterFaultCharacterStringListOfFaultValues) GetClosingT /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetFaultParameterFaultCharacterStringListOfFaultValues factory function for _BACnetFaultParameterFaultCharacterStringListOfFaultValues -func NewBACnetFaultParameterFaultCharacterStringListOfFaultValues(openingTag BACnetOpeningTag, listOfFaultValues []BACnetApplicationTagCharacterString, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetFaultParameterFaultCharacterStringListOfFaultValues { - return &_BACnetFaultParameterFaultCharacterStringListOfFaultValues{OpeningTag: openingTag, ListOfFaultValues: listOfFaultValues, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetFaultParameterFaultCharacterStringListOfFaultValues( openingTag BACnetOpeningTag , listOfFaultValues []BACnetApplicationTagCharacterString , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetFaultParameterFaultCharacterStringListOfFaultValues { +return &_BACnetFaultParameterFaultCharacterStringListOfFaultValues{ OpeningTag: openingTag , ListOfFaultValues: listOfFaultValues , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetFaultParameterFaultCharacterStringListOfFaultValues(structType interface{}) BACnetFaultParameterFaultCharacterStringListOfFaultValues { - if casted, ok := structType.(BACnetFaultParameterFaultCharacterStringListOfFaultValues); ok { + if casted, ok := structType.(BACnetFaultParameterFaultCharacterStringListOfFaultValues); ok { return casted } if casted, ok := structType.(*BACnetFaultParameterFaultCharacterStringListOfFaultValues); ok { @@ -118,6 +122,7 @@ func (m *_BACnetFaultParameterFaultCharacterStringListOfFaultValues) GetLengthIn return lengthInBits } + func (m *_BACnetFaultParameterFaultCharacterStringListOfFaultValues) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +144,7 @@ func BACnetFaultParameterFaultCharacterStringListOfFaultValuesParseWithBuffer(ct if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetFaultParameterFaultCharacterStringListOfFaultValues") } @@ -155,8 +160,8 @@ func BACnetFaultParameterFaultCharacterStringListOfFaultValuesParseWithBuffer(ct // Terminated array var listOfFaultValues []BACnetApplicationTagCharacterString { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'listOfFaultValues' field of BACnetFaultParameterFaultCharacterStringListOfFaultValues") } @@ -171,7 +176,7 @@ func BACnetFaultParameterFaultCharacterStringListOfFaultValuesParseWithBuffer(ct if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetFaultParameterFaultCharacterStringListOfFaultValues") } @@ -186,11 +191,11 @@ func BACnetFaultParameterFaultCharacterStringListOfFaultValuesParseWithBuffer(ct // Create the instance return &_BACnetFaultParameterFaultCharacterStringListOfFaultValues{ - TagNumber: tagNumber, - OpeningTag: openingTag, - ListOfFaultValues: listOfFaultValues, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + ListOfFaultValues: listOfFaultValues, + ClosingTag: closingTag, + }, nil } func (m *_BACnetFaultParameterFaultCharacterStringListOfFaultValues) Serialize() ([]byte, error) { @@ -204,7 +209,7 @@ func (m *_BACnetFaultParameterFaultCharacterStringListOfFaultValues) Serialize() func (m *_BACnetFaultParameterFaultCharacterStringListOfFaultValues) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetFaultParameterFaultCharacterStringListOfFaultValues"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetFaultParameterFaultCharacterStringListOfFaultValues"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetFaultParameterFaultCharacterStringListOfFaultValues") } @@ -255,13 +260,13 @@ func (m *_BACnetFaultParameterFaultCharacterStringListOfFaultValues) SerializeWi return nil } + //// // Arguments Getter func (m *_BACnetFaultParameterFaultCharacterStringListOfFaultValues) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -279,3 +284,6 @@ func (m *_BACnetFaultParameterFaultCharacterStringListOfFaultValues) String() st } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtended.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtended.go index 6fdbcc6cbd8..fd9f73a8c2a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtended.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtended.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetFaultParameterFaultExtended is the corresponding interface of BACnetFaultParameterFaultExtended type BACnetFaultParameterFaultExtended interface { @@ -54,13 +56,15 @@ type BACnetFaultParameterFaultExtendedExactly interface { // _BACnetFaultParameterFaultExtended is the data-structure of this message type _BACnetFaultParameterFaultExtended struct { *_BACnetFaultParameter - OpeningTag BACnetOpeningTag - VendorId BACnetVendorIdTagged - ExtendedFaultType BACnetContextTagUnsignedInteger - Parameters BACnetFaultParameterFaultExtendedParameters - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + VendorId BACnetVendorIdTagged + ExtendedFaultType BACnetContextTagUnsignedInteger + Parameters BACnetFaultParameterFaultExtendedParameters + ClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -71,14 +75,12 @@ type _BACnetFaultParameterFaultExtended struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetFaultParameterFaultExtended) InitializeParent(parent BACnetFaultParameter, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetFaultParameterFaultExtended) InitializeParent(parent BACnetFaultParameter , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetFaultParameterFaultExtended) GetParent() BACnetFaultParameter { +func (m *_BACnetFaultParameterFaultExtended) GetParent() BACnetFaultParameter { return m._BACnetFaultParameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -109,15 +111,16 @@ func (m *_BACnetFaultParameterFaultExtended) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetFaultParameterFaultExtended factory function for _BACnetFaultParameterFaultExtended -func NewBACnetFaultParameterFaultExtended(openingTag BACnetOpeningTag, vendorId BACnetVendorIdTagged, extendedFaultType BACnetContextTagUnsignedInteger, parameters BACnetFaultParameterFaultExtendedParameters, closingTag BACnetClosingTag, peekedTagHeader BACnetTagHeader) *_BACnetFaultParameterFaultExtended { +func NewBACnetFaultParameterFaultExtended( openingTag BACnetOpeningTag , vendorId BACnetVendorIdTagged , extendedFaultType BACnetContextTagUnsignedInteger , parameters BACnetFaultParameterFaultExtendedParameters , closingTag BACnetClosingTag , peekedTagHeader BACnetTagHeader ) *_BACnetFaultParameterFaultExtended { _result := &_BACnetFaultParameterFaultExtended{ - OpeningTag: openingTag, - VendorId: vendorId, - ExtendedFaultType: extendedFaultType, - Parameters: parameters, - ClosingTag: closingTag, - _BACnetFaultParameter: NewBACnetFaultParameter(peekedTagHeader), + OpeningTag: openingTag, + VendorId: vendorId, + ExtendedFaultType: extendedFaultType, + Parameters: parameters, + ClosingTag: closingTag, + _BACnetFaultParameter: NewBACnetFaultParameter(peekedTagHeader), } _result._BACnetFaultParameter._BACnetFaultParameterChildRequirements = _result return _result @@ -125,7 +128,7 @@ func NewBACnetFaultParameterFaultExtended(openingTag BACnetOpeningTag, vendorId // Deprecated: use the interface for direct cast func CastBACnetFaultParameterFaultExtended(structType interface{}) BACnetFaultParameterFaultExtended { - if casted, ok := structType.(BACnetFaultParameterFaultExtended); ok { + if casted, ok := structType.(BACnetFaultParameterFaultExtended); ok { return casted } if casted, ok := structType.(*BACnetFaultParameterFaultExtended); ok { @@ -159,6 +162,7 @@ func (m *_BACnetFaultParameterFaultExtended) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetFaultParameterFaultExtended) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -180,7 +184,7 @@ func BACnetFaultParameterFaultExtendedParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2))) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetFaultParameterFaultExtended") } @@ -193,7 +197,7 @@ func BACnetFaultParameterFaultExtendedParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("vendorId"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for vendorId") } - _vendorId, _vendorIdErr := BACnetVendorIdTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_vendorId, _vendorIdErr := BACnetVendorIdTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _vendorIdErr != nil { return nil, errors.Wrap(_vendorIdErr, "Error parsing 'vendorId' field of BACnetFaultParameterFaultExtended") } @@ -206,7 +210,7 @@ func BACnetFaultParameterFaultExtendedParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("extendedFaultType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for extendedFaultType") } - _extendedFaultType, _extendedFaultTypeErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_extendedFaultType, _extendedFaultTypeErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _extendedFaultTypeErr != nil { return nil, errors.Wrap(_extendedFaultTypeErr, "Error parsing 'extendedFaultType' field of BACnetFaultParameterFaultExtended") } @@ -219,7 +223,7 @@ func BACnetFaultParameterFaultExtendedParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("parameters"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for parameters") } - _parameters, _parametersErr := BACnetFaultParameterFaultExtendedParametersParseWithBuffer(ctx, readBuffer, uint8(uint8(2))) +_parameters, _parametersErr := BACnetFaultParameterFaultExtendedParametersParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) ) if _parametersErr != nil { return nil, errors.Wrap(_parametersErr, "Error parsing 'parameters' field of BACnetFaultParameterFaultExtended") } @@ -232,7 +236,7 @@ func BACnetFaultParameterFaultExtendedParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2))) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetFaultParameterFaultExtended") } @@ -247,12 +251,13 @@ func BACnetFaultParameterFaultExtendedParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetFaultParameterFaultExtended{ - _BACnetFaultParameter: &_BACnetFaultParameter{}, - OpeningTag: openingTag, - VendorId: vendorId, - ExtendedFaultType: extendedFaultType, - Parameters: parameters, - ClosingTag: closingTag, + _BACnetFaultParameter: &_BACnetFaultParameter{ + }, + OpeningTag: openingTag, + VendorId: vendorId, + ExtendedFaultType: extendedFaultType, + Parameters: parameters, + ClosingTag: closingTag, } _child._BACnetFaultParameter._BACnetFaultParameterChildRequirements = _child return _child, nil @@ -274,65 +279,65 @@ func (m *_BACnetFaultParameterFaultExtended) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetFaultParameterFaultExtended") } - // Simple Field (openingTag) - if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for openingTag") - } - _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) - if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for openingTag") - } - if _openingTagErr != nil { - return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") - } + // Simple Field (openingTag) + if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for openingTag") + } + _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) + if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for openingTag") + } + if _openingTagErr != nil { + return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") + } - // Simple Field (vendorId) - if pushErr := writeBuffer.PushContext("vendorId"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for vendorId") - } - _vendorIdErr := writeBuffer.WriteSerializable(ctx, m.GetVendorId()) - if popErr := writeBuffer.PopContext("vendorId"); popErr != nil { - return errors.Wrap(popErr, "Error popping for vendorId") - } - if _vendorIdErr != nil { - return errors.Wrap(_vendorIdErr, "Error serializing 'vendorId' field") - } + // Simple Field (vendorId) + if pushErr := writeBuffer.PushContext("vendorId"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for vendorId") + } + _vendorIdErr := writeBuffer.WriteSerializable(ctx, m.GetVendorId()) + if popErr := writeBuffer.PopContext("vendorId"); popErr != nil { + return errors.Wrap(popErr, "Error popping for vendorId") + } + if _vendorIdErr != nil { + return errors.Wrap(_vendorIdErr, "Error serializing 'vendorId' field") + } - // Simple Field (extendedFaultType) - if pushErr := writeBuffer.PushContext("extendedFaultType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for extendedFaultType") - } - _extendedFaultTypeErr := writeBuffer.WriteSerializable(ctx, m.GetExtendedFaultType()) - if popErr := writeBuffer.PopContext("extendedFaultType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for extendedFaultType") - } - if _extendedFaultTypeErr != nil { - return errors.Wrap(_extendedFaultTypeErr, "Error serializing 'extendedFaultType' field") - } + // Simple Field (extendedFaultType) + if pushErr := writeBuffer.PushContext("extendedFaultType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for extendedFaultType") + } + _extendedFaultTypeErr := writeBuffer.WriteSerializable(ctx, m.GetExtendedFaultType()) + if popErr := writeBuffer.PopContext("extendedFaultType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for extendedFaultType") + } + if _extendedFaultTypeErr != nil { + return errors.Wrap(_extendedFaultTypeErr, "Error serializing 'extendedFaultType' field") + } - // Simple Field (parameters) - if pushErr := writeBuffer.PushContext("parameters"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for parameters") - } - _parametersErr := writeBuffer.WriteSerializable(ctx, m.GetParameters()) - if popErr := writeBuffer.PopContext("parameters"); popErr != nil { - return errors.Wrap(popErr, "Error popping for parameters") - } - if _parametersErr != nil { - return errors.Wrap(_parametersErr, "Error serializing 'parameters' field") - } + // Simple Field (parameters) + if pushErr := writeBuffer.PushContext("parameters"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for parameters") + } + _parametersErr := writeBuffer.WriteSerializable(ctx, m.GetParameters()) + if popErr := writeBuffer.PopContext("parameters"); popErr != nil { + return errors.Wrap(popErr, "Error popping for parameters") + } + if _parametersErr != nil { + return errors.Wrap(_parametersErr, "Error serializing 'parameters' field") + } - // Simple Field (closingTag) - if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for closingTag") - } - _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) - if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for closingTag") - } - if _closingTagErr != nil { - return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") - } + // Simple Field (closingTag) + if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for closingTag") + } + _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) + if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for closingTag") + } + if _closingTagErr != nil { + return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") + } if popErr := writeBuffer.PopContext("BACnetFaultParameterFaultExtended"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetFaultParameterFaultExtended") @@ -342,6 +347,7 @@ func (m *_BACnetFaultParameterFaultExtended) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetFaultParameterFaultExtended) isBACnetFaultParameterFaultExtended() bool { return true } @@ -356,3 +362,6 @@ func (m *_BACnetFaultParameterFaultExtended) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParameters.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParameters.go index 7f0b40bb41a..42aa15558c6 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParameters.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParameters.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetFaultParameterFaultExtendedParameters is the corresponding interface of BACnetFaultParameterFaultExtendedParameters type BACnetFaultParameterFaultExtendedParameters interface { @@ -49,14 +51,15 @@ type BACnetFaultParameterFaultExtendedParametersExactly interface { // _BACnetFaultParameterFaultExtendedParameters is the data-structure of this message type _BACnetFaultParameterFaultExtendedParameters struct { - OpeningTag BACnetOpeningTag - Parameters []BACnetFaultParameterFaultExtendedParametersEntry - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + Parameters []BACnetFaultParameterFaultExtendedParametersEntry + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -79,14 +82,15 @@ func (m *_BACnetFaultParameterFaultExtendedParameters) GetClosingTag() BACnetClo /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetFaultParameterFaultExtendedParameters factory function for _BACnetFaultParameterFaultExtendedParameters -func NewBACnetFaultParameterFaultExtendedParameters(openingTag BACnetOpeningTag, parameters []BACnetFaultParameterFaultExtendedParametersEntry, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetFaultParameterFaultExtendedParameters { - return &_BACnetFaultParameterFaultExtendedParameters{OpeningTag: openingTag, Parameters: parameters, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetFaultParameterFaultExtendedParameters( openingTag BACnetOpeningTag , parameters []BACnetFaultParameterFaultExtendedParametersEntry , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetFaultParameterFaultExtendedParameters { +return &_BACnetFaultParameterFaultExtendedParameters{ OpeningTag: openingTag , Parameters: parameters , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetFaultParameterFaultExtendedParameters(structType interface{}) BACnetFaultParameterFaultExtendedParameters { - if casted, ok := structType.(BACnetFaultParameterFaultExtendedParameters); ok { + if casted, ok := structType.(BACnetFaultParameterFaultExtendedParameters); ok { return casted } if casted, ok := structType.(*BACnetFaultParameterFaultExtendedParameters); ok { @@ -118,6 +122,7 @@ func (m *_BACnetFaultParameterFaultExtendedParameters) GetLengthInBits(ctx conte return lengthInBits } + func (m *_BACnetFaultParameterFaultExtendedParameters) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +144,7 @@ func BACnetFaultParameterFaultExtendedParametersParseWithBuffer(ctx context.Cont if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetFaultParameterFaultExtendedParameters") } @@ -155,8 +160,8 @@ func BACnetFaultParameterFaultExtendedParametersParseWithBuffer(ctx context.Cont // Terminated array var parameters []BACnetFaultParameterFaultExtendedParametersEntry { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetFaultParameterFaultExtendedParametersEntryParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetFaultParameterFaultExtendedParametersEntryParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'parameters' field of BACnetFaultParameterFaultExtendedParameters") } @@ -171,7 +176,7 @@ func BACnetFaultParameterFaultExtendedParametersParseWithBuffer(ctx context.Cont if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetFaultParameterFaultExtendedParameters") } @@ -186,11 +191,11 @@ func BACnetFaultParameterFaultExtendedParametersParseWithBuffer(ctx context.Cont // Create the instance return &_BACnetFaultParameterFaultExtendedParameters{ - TagNumber: tagNumber, - OpeningTag: openingTag, - Parameters: parameters, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + Parameters: parameters, + ClosingTag: closingTag, + }, nil } func (m *_BACnetFaultParameterFaultExtendedParameters) Serialize() ([]byte, error) { @@ -204,7 +209,7 @@ func (m *_BACnetFaultParameterFaultExtendedParameters) Serialize() ([]byte, erro func (m *_BACnetFaultParameterFaultExtendedParameters) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetFaultParameterFaultExtendedParameters"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetFaultParameterFaultExtendedParameters"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetFaultParameterFaultExtendedParameters") } @@ -255,13 +260,13 @@ func (m *_BACnetFaultParameterFaultExtendedParameters) SerializeWithWriteBuffer( return nil } + //// // Arguments Getter func (m *_BACnetFaultParameterFaultExtendedParameters) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -279,3 +284,6 @@ func (m *_BACnetFaultParameterFaultExtendedParameters) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntry.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntry.go index 5e261b82045..2e6e0b60532 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntry.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntry.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetFaultParameterFaultExtendedParametersEntry is the corresponding interface of BACnetFaultParameterFaultExtendedParametersEntry type BACnetFaultParameterFaultExtendedParametersEntry interface { @@ -49,7 +51,7 @@ type BACnetFaultParameterFaultExtendedParametersEntryExactly interface { // _BACnetFaultParameterFaultExtendedParametersEntry is the data-structure of this message type _BACnetFaultParameterFaultExtendedParametersEntry struct { _BACnetFaultParameterFaultExtendedParametersEntryChildRequirements - PeekedTagHeader BACnetTagHeader + PeekedTagHeader BACnetTagHeader } type _BACnetFaultParameterFaultExtendedParametersEntryChildRequirements interface { @@ -57,6 +59,7 @@ type _BACnetFaultParameterFaultExtendedParametersEntryChildRequirements interfac GetLengthInBits(ctx context.Context) uint16 } + type BACnetFaultParameterFaultExtendedParametersEntryParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetFaultParameterFaultExtendedParametersEntry, serializeChildFunction func() error) error GetTypeName() string @@ -64,13 +67,12 @@ type BACnetFaultParameterFaultExtendedParametersEntryParent interface { type BACnetFaultParameterFaultExtendedParametersEntryChild interface { utils.Serializable - InitializeParent(parent BACnetFaultParameterFaultExtendedParametersEntry, peekedTagHeader BACnetTagHeader) +InitializeParent(parent BACnetFaultParameterFaultExtendedParametersEntry , peekedTagHeader BACnetTagHeader ) GetParent() *BACnetFaultParameterFaultExtendedParametersEntry GetTypeName() string BACnetFaultParameterFaultExtendedParametersEntry } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -106,14 +108,15 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntry) GetPeekedIsContextTa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetFaultParameterFaultExtendedParametersEntry factory function for _BACnetFaultParameterFaultExtendedParametersEntry -func NewBACnetFaultParameterFaultExtendedParametersEntry(peekedTagHeader BACnetTagHeader) *_BACnetFaultParameterFaultExtendedParametersEntry { - return &_BACnetFaultParameterFaultExtendedParametersEntry{PeekedTagHeader: peekedTagHeader} +func NewBACnetFaultParameterFaultExtendedParametersEntry( peekedTagHeader BACnetTagHeader ) *_BACnetFaultParameterFaultExtendedParametersEntry { +return &_BACnetFaultParameterFaultExtendedParametersEntry{ PeekedTagHeader: peekedTagHeader } } // Deprecated: use the interface for direct cast func CastBACnetFaultParameterFaultExtendedParametersEntry(structType interface{}) BACnetFaultParameterFaultExtendedParametersEntry { - if casted, ok := structType.(BACnetFaultParameterFaultExtendedParametersEntry); ok { + if casted, ok := structType.(BACnetFaultParameterFaultExtendedParametersEntry); ok { return casted } if casted, ok := structType.(*BACnetFaultParameterFaultExtendedParametersEntry); ok { @@ -126,6 +129,7 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntry) GetTypeName() string return "BACnetFaultParameterFaultExtendedParametersEntry" } + func (m *_BACnetFaultParameterFaultExtendedParametersEntry) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -153,13 +157,13 @@ func BACnetFaultParameterFaultExtendedParametersEntryParseWithBuffer(ctx context currentPos := positionAware.GetPos() _ = currentPos - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Virtual field _peekedTagNumber := peekedTagHeader.GetActualTagNumber() @@ -172,48 +176,48 @@ func BACnetFaultParameterFaultExtendedParametersEntryParseWithBuffer(ctx context _ = peekedIsContextTag // Validation - if !(bool((!(peekedIsContextTag))) || bool((bool(bool(peekedIsContextTag) && bool(bool((peekedTagHeader.GetLengthValueType()) != (0x6)))) && bool(bool((peekedTagHeader.GetLengthValueType()) != (0x7)))))) { + if (!(bool((!(peekedIsContextTag))) || bool((bool(bool(peekedIsContextTag) && bool(bool((peekedTagHeader.GetLengthValueType()) != (0x6)))) && bool(bool((peekedTagHeader.GetLengthValueType()) != (0x7))))))) { return nil, errors.WithStack(utils.ParseValidationError{"unexpected opening or closing tag"}) } // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetFaultParameterFaultExtendedParametersEntryChildSerializeRequirement interface { BACnetFaultParameterFaultExtendedParametersEntry - InitializeParent(BACnetFaultParameterFaultExtendedParametersEntry, BACnetTagHeader) + InitializeParent(BACnetFaultParameterFaultExtendedParametersEntry, BACnetTagHeader) GetParent() BACnetFaultParameterFaultExtendedParametersEntry } var _childTemp interface{} var _child BACnetFaultParameterFaultExtendedParametersEntryChildSerializeRequirement var typeSwitchError error switch { - case peekedTagNumber == 0x0 && peekedIsContextTag == bool(false): // BACnetFaultParameterFaultExtendedParametersEntryNull - _childTemp, typeSwitchError = BACnetFaultParameterFaultExtendedParametersEntryNullParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == 0x4 && peekedIsContextTag == bool(false): // BACnetFaultParameterFaultExtendedParametersEntryReal - _childTemp, typeSwitchError = BACnetFaultParameterFaultExtendedParametersEntryRealParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == 0x2 && peekedIsContextTag == bool(false): // BACnetFaultParameterFaultExtendedParametersEntryUnsigned - _childTemp, typeSwitchError = BACnetFaultParameterFaultExtendedParametersEntryUnsignedParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == 0x1 && peekedIsContextTag == bool(false): // BACnetFaultParameterFaultExtendedParametersEntryBoolean - _childTemp, typeSwitchError = BACnetFaultParameterFaultExtendedParametersEntryBooleanParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == 0x3 && peekedIsContextTag == bool(false): // BACnetFaultParameterFaultExtendedParametersEntryInteger - _childTemp, typeSwitchError = BACnetFaultParameterFaultExtendedParametersEntryIntegerParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == 0x5 && peekedIsContextTag == bool(false): // BACnetFaultParameterFaultExtendedParametersEntryDouble - _childTemp, typeSwitchError = BACnetFaultParameterFaultExtendedParametersEntryDoubleParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == 0x6 && peekedIsContextTag == bool(false): // BACnetFaultParameterFaultExtendedParametersEntryOctetString - _childTemp, typeSwitchError = BACnetFaultParameterFaultExtendedParametersEntryOctetStringParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == 0x7 && peekedIsContextTag == bool(false): // BACnetFaultParameterFaultExtendedParametersEntryCharacterString - _childTemp, typeSwitchError = BACnetFaultParameterFaultExtendedParametersEntryCharacterStringParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == 0x8 && peekedIsContextTag == bool(false): // BACnetFaultParameterFaultExtendedParametersEntryBitString - _childTemp, typeSwitchError = BACnetFaultParameterFaultExtendedParametersEntryBitStringParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == 0x9 && peekedIsContextTag == bool(false): // BACnetFaultParameterFaultExtendedParametersEntryEnumerated - _childTemp, typeSwitchError = BACnetFaultParameterFaultExtendedParametersEntryEnumeratedParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == 0xA && peekedIsContextTag == bool(false): // BACnetFaultParameterFaultExtendedParametersEntryDate - _childTemp, typeSwitchError = BACnetFaultParameterFaultExtendedParametersEntryDateParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == 0xB && peekedIsContextTag == bool(false): // BACnetFaultParameterFaultExtendedParametersEntryTime - _childTemp, typeSwitchError = BACnetFaultParameterFaultExtendedParametersEntryTimeParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == 0xC && peekedIsContextTag == bool(false): // BACnetFaultParameterFaultExtendedParametersEntryObjectidentifier - _childTemp, typeSwitchError = BACnetFaultParameterFaultExtendedParametersEntryObjectidentifierParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(0) && peekedIsContextTag == bool(true): // BACnetFaultParameterFaultExtendedParametersEntryReference - _childTemp, typeSwitchError = BACnetFaultParameterFaultExtendedParametersEntryReferenceParseWithBuffer(ctx, readBuffer) +case peekedTagNumber == 0x0 && peekedIsContextTag == bool(false) : // BACnetFaultParameterFaultExtendedParametersEntryNull + _childTemp, typeSwitchError = BACnetFaultParameterFaultExtendedParametersEntryNullParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == 0x4 && peekedIsContextTag == bool(false) : // BACnetFaultParameterFaultExtendedParametersEntryReal + _childTemp, typeSwitchError = BACnetFaultParameterFaultExtendedParametersEntryRealParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == 0x2 && peekedIsContextTag == bool(false) : // BACnetFaultParameterFaultExtendedParametersEntryUnsigned + _childTemp, typeSwitchError = BACnetFaultParameterFaultExtendedParametersEntryUnsignedParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == 0x1 && peekedIsContextTag == bool(false) : // BACnetFaultParameterFaultExtendedParametersEntryBoolean + _childTemp, typeSwitchError = BACnetFaultParameterFaultExtendedParametersEntryBooleanParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == 0x3 && peekedIsContextTag == bool(false) : // BACnetFaultParameterFaultExtendedParametersEntryInteger + _childTemp, typeSwitchError = BACnetFaultParameterFaultExtendedParametersEntryIntegerParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == 0x5 && peekedIsContextTag == bool(false) : // BACnetFaultParameterFaultExtendedParametersEntryDouble + _childTemp, typeSwitchError = BACnetFaultParameterFaultExtendedParametersEntryDoubleParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == 0x6 && peekedIsContextTag == bool(false) : // BACnetFaultParameterFaultExtendedParametersEntryOctetString + _childTemp, typeSwitchError = BACnetFaultParameterFaultExtendedParametersEntryOctetStringParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == 0x7 && peekedIsContextTag == bool(false) : // BACnetFaultParameterFaultExtendedParametersEntryCharacterString + _childTemp, typeSwitchError = BACnetFaultParameterFaultExtendedParametersEntryCharacterStringParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == 0x8 && peekedIsContextTag == bool(false) : // BACnetFaultParameterFaultExtendedParametersEntryBitString + _childTemp, typeSwitchError = BACnetFaultParameterFaultExtendedParametersEntryBitStringParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == 0x9 && peekedIsContextTag == bool(false) : // BACnetFaultParameterFaultExtendedParametersEntryEnumerated + _childTemp, typeSwitchError = BACnetFaultParameterFaultExtendedParametersEntryEnumeratedParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == 0xA && peekedIsContextTag == bool(false) : // BACnetFaultParameterFaultExtendedParametersEntryDate + _childTemp, typeSwitchError = BACnetFaultParameterFaultExtendedParametersEntryDateParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == 0xB && peekedIsContextTag == bool(false) : // BACnetFaultParameterFaultExtendedParametersEntryTime + _childTemp, typeSwitchError = BACnetFaultParameterFaultExtendedParametersEntryTimeParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == 0xC && peekedIsContextTag == bool(false) : // BACnetFaultParameterFaultExtendedParametersEntryObjectidentifier + _childTemp, typeSwitchError = BACnetFaultParameterFaultExtendedParametersEntryObjectidentifierParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(0) && peekedIsContextTag == bool(true) : // BACnetFaultParameterFaultExtendedParametersEntryReference + _childTemp, typeSwitchError = BACnetFaultParameterFaultExtendedParametersEntryReferenceParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedTagNumber=%v, peekedIsContextTag=%v]", peekedTagNumber, peekedIsContextTag) } @@ -227,7 +231,7 @@ func BACnetFaultParameterFaultExtendedParametersEntryParseWithBuffer(ctx context } // Finish initializing - _child.InitializeParent(_child, peekedTagHeader) +_child.InitializeParent(_child , peekedTagHeader ) return _child, nil } @@ -237,7 +241,7 @@ func (pm *_BACnetFaultParameterFaultExtendedParametersEntry) SerializeParent(ctx _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetFaultParameterFaultExtendedParametersEntry"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetFaultParameterFaultExtendedParametersEntry"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetFaultParameterFaultExtendedParametersEntry") } // Virtual field @@ -260,6 +264,7 @@ func (pm *_BACnetFaultParameterFaultExtendedParametersEntry) SerializeParent(ctx return nil } + func (m *_BACnetFaultParameterFaultExtendedParametersEntry) isBACnetFaultParameterFaultExtendedParametersEntry() bool { return true } @@ -274,3 +279,6 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntry) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryBitString.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryBitString.go index 262dea7ab74..109b65d7868 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryBitString.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryBitString.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetFaultParameterFaultExtendedParametersEntryBitString is the corresponding interface of BACnetFaultParameterFaultExtendedParametersEntryBitString type BACnetFaultParameterFaultExtendedParametersEntryBitString interface { @@ -46,9 +48,11 @@ type BACnetFaultParameterFaultExtendedParametersEntryBitStringExactly interface // _BACnetFaultParameterFaultExtendedParametersEntryBitString is the data-structure of this message type _BACnetFaultParameterFaultExtendedParametersEntryBitString struct { *_BACnetFaultParameterFaultExtendedParametersEntry - BitStringValue BACnetApplicationTagBitString + BitStringValue BACnetApplicationTagBitString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetFaultParameterFaultExtendedParametersEntryBitString struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetFaultParameterFaultExtendedParametersEntryBitString) InitializeParent(parent BACnetFaultParameterFaultExtendedParametersEntry, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetFaultParameterFaultExtendedParametersEntryBitString) InitializeParent(parent BACnetFaultParameterFaultExtendedParametersEntry , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetFaultParameterFaultExtendedParametersEntryBitString) GetParent() BACnetFaultParameterFaultExtendedParametersEntry { +func (m *_BACnetFaultParameterFaultExtendedParametersEntryBitString) GetParent() BACnetFaultParameterFaultExtendedParametersEntry { return m._BACnetFaultParameterFaultExtendedParametersEntry } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryBitString) GetBitStrin /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetFaultParameterFaultExtendedParametersEntryBitString factory function for _BACnetFaultParameterFaultExtendedParametersEntryBitString -func NewBACnetFaultParameterFaultExtendedParametersEntryBitString(bitStringValue BACnetApplicationTagBitString, peekedTagHeader BACnetTagHeader) *_BACnetFaultParameterFaultExtendedParametersEntryBitString { +func NewBACnetFaultParameterFaultExtendedParametersEntryBitString( bitStringValue BACnetApplicationTagBitString , peekedTagHeader BACnetTagHeader ) *_BACnetFaultParameterFaultExtendedParametersEntryBitString { _result := &_BACnetFaultParameterFaultExtendedParametersEntryBitString{ BitStringValue: bitStringValue, - _BACnetFaultParameterFaultExtendedParametersEntry: NewBACnetFaultParameterFaultExtendedParametersEntry(peekedTagHeader), + _BACnetFaultParameterFaultExtendedParametersEntry: NewBACnetFaultParameterFaultExtendedParametersEntry(peekedTagHeader), } _result._BACnetFaultParameterFaultExtendedParametersEntry._BACnetFaultParameterFaultExtendedParametersEntryChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetFaultParameterFaultExtendedParametersEntryBitString(bitStringValue // Deprecated: use the interface for direct cast func CastBACnetFaultParameterFaultExtendedParametersEntryBitString(structType interface{}) BACnetFaultParameterFaultExtendedParametersEntryBitString { - if casted, ok := structType.(BACnetFaultParameterFaultExtendedParametersEntryBitString); ok { + if casted, ok := structType.(BACnetFaultParameterFaultExtendedParametersEntryBitString); ok { return casted } if casted, ok := structType.(*BACnetFaultParameterFaultExtendedParametersEntryBitString); ok { @@ -115,6 +118,7 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryBitString) GetLengthIn return lengthInBits } + func (m *_BACnetFaultParameterFaultExtendedParametersEntryBitString) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetFaultParameterFaultExtendedParametersEntryBitStringParseWithBuffer(ct if pullErr := readBuffer.PullContext("bitStringValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for bitStringValue") } - _bitStringValue, _bitStringValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_bitStringValue, _bitStringValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _bitStringValueErr != nil { return nil, errors.Wrap(_bitStringValueErr, "Error parsing 'bitStringValue' field of BACnetFaultParameterFaultExtendedParametersEntryBitString") } @@ -151,7 +155,8 @@ func BACnetFaultParameterFaultExtendedParametersEntryBitStringParseWithBuffer(ct // Create a partially initialized instance _child := &_BACnetFaultParameterFaultExtendedParametersEntryBitString{ - _BACnetFaultParameterFaultExtendedParametersEntry: &_BACnetFaultParameterFaultExtendedParametersEntry{}, + _BACnetFaultParameterFaultExtendedParametersEntry: &_BACnetFaultParameterFaultExtendedParametersEntry{ + }, BitStringValue: bitStringValue, } _child._BACnetFaultParameterFaultExtendedParametersEntry._BACnetFaultParameterFaultExtendedParametersEntryChildRequirements = _child @@ -174,17 +179,17 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryBitString) SerializeWi return errors.Wrap(pushErr, "Error pushing for BACnetFaultParameterFaultExtendedParametersEntryBitString") } - // Simple Field (bitStringValue) - if pushErr := writeBuffer.PushContext("bitStringValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for bitStringValue") - } - _bitStringValueErr := writeBuffer.WriteSerializable(ctx, m.GetBitStringValue()) - if popErr := writeBuffer.PopContext("bitStringValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for bitStringValue") - } - if _bitStringValueErr != nil { - return errors.Wrap(_bitStringValueErr, "Error serializing 'bitStringValue' field") - } + // Simple Field (bitStringValue) + if pushErr := writeBuffer.PushContext("bitStringValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for bitStringValue") + } + _bitStringValueErr := writeBuffer.WriteSerializable(ctx, m.GetBitStringValue()) + if popErr := writeBuffer.PopContext("bitStringValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for bitStringValue") + } + if _bitStringValueErr != nil { + return errors.Wrap(_bitStringValueErr, "Error serializing 'bitStringValue' field") + } if popErr := writeBuffer.PopContext("BACnetFaultParameterFaultExtendedParametersEntryBitString"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetFaultParameterFaultExtendedParametersEntryBitString") @@ -194,6 +199,7 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryBitString) SerializeWi return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetFaultParameterFaultExtendedParametersEntryBitString) isBACnetFaultParameterFaultExtendedParametersEntryBitString() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryBitString) String() st } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryBoolean.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryBoolean.go index 6bcf4460ad3..bdc782b7a28 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryBoolean.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryBoolean.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetFaultParameterFaultExtendedParametersEntryBoolean is the corresponding interface of BACnetFaultParameterFaultExtendedParametersEntryBoolean type BACnetFaultParameterFaultExtendedParametersEntryBoolean interface { @@ -46,9 +48,11 @@ type BACnetFaultParameterFaultExtendedParametersEntryBooleanExactly interface { // _BACnetFaultParameterFaultExtendedParametersEntryBoolean is the data-structure of this message type _BACnetFaultParameterFaultExtendedParametersEntryBoolean struct { *_BACnetFaultParameterFaultExtendedParametersEntry - BooleanValue BACnetApplicationTagBoolean + BooleanValue BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetFaultParameterFaultExtendedParametersEntryBoolean struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetFaultParameterFaultExtendedParametersEntryBoolean) InitializeParent(parent BACnetFaultParameterFaultExtendedParametersEntry, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetFaultParameterFaultExtendedParametersEntryBoolean) InitializeParent(parent BACnetFaultParameterFaultExtendedParametersEntry , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetFaultParameterFaultExtendedParametersEntryBoolean) GetParent() BACnetFaultParameterFaultExtendedParametersEntry { +func (m *_BACnetFaultParameterFaultExtendedParametersEntryBoolean) GetParent() BACnetFaultParameterFaultExtendedParametersEntry { return m._BACnetFaultParameterFaultExtendedParametersEntry } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryBoolean) GetBooleanVal /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetFaultParameterFaultExtendedParametersEntryBoolean factory function for _BACnetFaultParameterFaultExtendedParametersEntryBoolean -func NewBACnetFaultParameterFaultExtendedParametersEntryBoolean(booleanValue BACnetApplicationTagBoolean, peekedTagHeader BACnetTagHeader) *_BACnetFaultParameterFaultExtendedParametersEntryBoolean { +func NewBACnetFaultParameterFaultExtendedParametersEntryBoolean( booleanValue BACnetApplicationTagBoolean , peekedTagHeader BACnetTagHeader ) *_BACnetFaultParameterFaultExtendedParametersEntryBoolean { _result := &_BACnetFaultParameterFaultExtendedParametersEntryBoolean{ BooleanValue: booleanValue, - _BACnetFaultParameterFaultExtendedParametersEntry: NewBACnetFaultParameterFaultExtendedParametersEntry(peekedTagHeader), + _BACnetFaultParameterFaultExtendedParametersEntry: NewBACnetFaultParameterFaultExtendedParametersEntry(peekedTagHeader), } _result._BACnetFaultParameterFaultExtendedParametersEntry._BACnetFaultParameterFaultExtendedParametersEntryChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetFaultParameterFaultExtendedParametersEntryBoolean(booleanValue BAC // Deprecated: use the interface for direct cast func CastBACnetFaultParameterFaultExtendedParametersEntryBoolean(structType interface{}) BACnetFaultParameterFaultExtendedParametersEntryBoolean { - if casted, ok := structType.(BACnetFaultParameterFaultExtendedParametersEntryBoolean); ok { + if casted, ok := structType.(BACnetFaultParameterFaultExtendedParametersEntryBoolean); ok { return casted } if casted, ok := structType.(*BACnetFaultParameterFaultExtendedParametersEntryBoolean); ok { @@ -115,6 +118,7 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryBoolean) GetLengthInBi return lengthInBits } + func (m *_BACnetFaultParameterFaultExtendedParametersEntryBoolean) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetFaultParameterFaultExtendedParametersEntryBooleanParseWithBuffer(ctx if pullErr := readBuffer.PullContext("booleanValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for booleanValue") } - _booleanValue, _booleanValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_booleanValue, _booleanValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _booleanValueErr != nil { return nil, errors.Wrap(_booleanValueErr, "Error parsing 'booleanValue' field of BACnetFaultParameterFaultExtendedParametersEntryBoolean") } @@ -151,7 +155,8 @@ func BACnetFaultParameterFaultExtendedParametersEntryBooleanParseWithBuffer(ctx // Create a partially initialized instance _child := &_BACnetFaultParameterFaultExtendedParametersEntryBoolean{ - _BACnetFaultParameterFaultExtendedParametersEntry: &_BACnetFaultParameterFaultExtendedParametersEntry{}, + _BACnetFaultParameterFaultExtendedParametersEntry: &_BACnetFaultParameterFaultExtendedParametersEntry{ + }, BooleanValue: booleanValue, } _child._BACnetFaultParameterFaultExtendedParametersEntry._BACnetFaultParameterFaultExtendedParametersEntryChildRequirements = _child @@ -174,17 +179,17 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryBoolean) SerializeWith return errors.Wrap(pushErr, "Error pushing for BACnetFaultParameterFaultExtendedParametersEntryBoolean") } - // Simple Field (booleanValue) - if pushErr := writeBuffer.PushContext("booleanValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for booleanValue") - } - _booleanValueErr := writeBuffer.WriteSerializable(ctx, m.GetBooleanValue()) - if popErr := writeBuffer.PopContext("booleanValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for booleanValue") - } - if _booleanValueErr != nil { - return errors.Wrap(_booleanValueErr, "Error serializing 'booleanValue' field") - } + // Simple Field (booleanValue) + if pushErr := writeBuffer.PushContext("booleanValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for booleanValue") + } + _booleanValueErr := writeBuffer.WriteSerializable(ctx, m.GetBooleanValue()) + if popErr := writeBuffer.PopContext("booleanValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for booleanValue") + } + if _booleanValueErr != nil { + return errors.Wrap(_booleanValueErr, "Error serializing 'booleanValue' field") + } if popErr := writeBuffer.PopContext("BACnetFaultParameterFaultExtendedParametersEntryBoolean"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetFaultParameterFaultExtendedParametersEntryBoolean") @@ -194,6 +199,7 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryBoolean) SerializeWith return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetFaultParameterFaultExtendedParametersEntryBoolean) isBACnetFaultParameterFaultExtendedParametersEntryBoolean() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryBoolean) String() stri } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryCharacterString.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryCharacterString.go index 616297652c2..b564a0acc82 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryCharacterString.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryCharacterString.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetFaultParameterFaultExtendedParametersEntryCharacterString is the corresponding interface of BACnetFaultParameterFaultExtendedParametersEntryCharacterString type BACnetFaultParameterFaultExtendedParametersEntryCharacterString interface { @@ -46,9 +48,11 @@ type BACnetFaultParameterFaultExtendedParametersEntryCharacterStringExactly inte // _BACnetFaultParameterFaultExtendedParametersEntryCharacterString is the data-structure of this message type _BACnetFaultParameterFaultExtendedParametersEntryCharacterString struct { *_BACnetFaultParameterFaultExtendedParametersEntry - CharacterStringValue BACnetApplicationTagCharacterString + CharacterStringValue BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetFaultParameterFaultExtendedParametersEntryCharacterString struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetFaultParameterFaultExtendedParametersEntryCharacterString) InitializeParent(parent BACnetFaultParameterFaultExtendedParametersEntry, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetFaultParameterFaultExtendedParametersEntryCharacterString) InitializeParent(parent BACnetFaultParameterFaultExtendedParametersEntry , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetFaultParameterFaultExtendedParametersEntryCharacterString) GetParent() BACnetFaultParameterFaultExtendedParametersEntry { +func (m *_BACnetFaultParameterFaultExtendedParametersEntryCharacterString) GetParent() BACnetFaultParameterFaultExtendedParametersEntry { return m._BACnetFaultParameterFaultExtendedParametersEntry } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryCharacterString) GetCh /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetFaultParameterFaultExtendedParametersEntryCharacterString factory function for _BACnetFaultParameterFaultExtendedParametersEntryCharacterString -func NewBACnetFaultParameterFaultExtendedParametersEntryCharacterString(characterStringValue BACnetApplicationTagCharacterString, peekedTagHeader BACnetTagHeader) *_BACnetFaultParameterFaultExtendedParametersEntryCharacterString { +func NewBACnetFaultParameterFaultExtendedParametersEntryCharacterString( characterStringValue BACnetApplicationTagCharacterString , peekedTagHeader BACnetTagHeader ) *_BACnetFaultParameterFaultExtendedParametersEntryCharacterString { _result := &_BACnetFaultParameterFaultExtendedParametersEntryCharacterString{ - CharacterStringValue: characterStringValue, - _BACnetFaultParameterFaultExtendedParametersEntry: NewBACnetFaultParameterFaultExtendedParametersEntry(peekedTagHeader), + CharacterStringValue: characterStringValue, + _BACnetFaultParameterFaultExtendedParametersEntry: NewBACnetFaultParameterFaultExtendedParametersEntry(peekedTagHeader), } _result._BACnetFaultParameterFaultExtendedParametersEntry._BACnetFaultParameterFaultExtendedParametersEntryChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetFaultParameterFaultExtendedParametersEntryCharacterString(characte // Deprecated: use the interface for direct cast func CastBACnetFaultParameterFaultExtendedParametersEntryCharacterString(structType interface{}) BACnetFaultParameterFaultExtendedParametersEntryCharacterString { - if casted, ok := structType.(BACnetFaultParameterFaultExtendedParametersEntryCharacterString); ok { + if casted, ok := structType.(BACnetFaultParameterFaultExtendedParametersEntryCharacterString); ok { return casted } if casted, ok := structType.(*BACnetFaultParameterFaultExtendedParametersEntryCharacterString); ok { @@ -115,6 +118,7 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryCharacterString) GetLe return lengthInBits } + func (m *_BACnetFaultParameterFaultExtendedParametersEntryCharacterString) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetFaultParameterFaultExtendedParametersEntryCharacterStringParseWithBuf if pullErr := readBuffer.PullContext("characterStringValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for characterStringValue") } - _characterStringValue, _characterStringValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_characterStringValue, _characterStringValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _characterStringValueErr != nil { return nil, errors.Wrap(_characterStringValueErr, "Error parsing 'characterStringValue' field of BACnetFaultParameterFaultExtendedParametersEntryCharacterString") } @@ -151,8 +155,9 @@ func BACnetFaultParameterFaultExtendedParametersEntryCharacterStringParseWithBuf // Create a partially initialized instance _child := &_BACnetFaultParameterFaultExtendedParametersEntryCharacterString{ - _BACnetFaultParameterFaultExtendedParametersEntry: &_BACnetFaultParameterFaultExtendedParametersEntry{}, - CharacterStringValue: characterStringValue, + _BACnetFaultParameterFaultExtendedParametersEntry: &_BACnetFaultParameterFaultExtendedParametersEntry{ + }, + CharacterStringValue: characterStringValue, } _child._BACnetFaultParameterFaultExtendedParametersEntry._BACnetFaultParameterFaultExtendedParametersEntryChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryCharacterString) Seria return errors.Wrap(pushErr, "Error pushing for BACnetFaultParameterFaultExtendedParametersEntryCharacterString") } - // Simple Field (characterStringValue) - if pushErr := writeBuffer.PushContext("characterStringValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for characterStringValue") - } - _characterStringValueErr := writeBuffer.WriteSerializable(ctx, m.GetCharacterStringValue()) - if popErr := writeBuffer.PopContext("characterStringValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for characterStringValue") - } - if _characterStringValueErr != nil { - return errors.Wrap(_characterStringValueErr, "Error serializing 'characterStringValue' field") - } + // Simple Field (characterStringValue) + if pushErr := writeBuffer.PushContext("characterStringValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for characterStringValue") + } + _characterStringValueErr := writeBuffer.WriteSerializable(ctx, m.GetCharacterStringValue()) + if popErr := writeBuffer.PopContext("characterStringValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for characterStringValue") + } + if _characterStringValueErr != nil { + return errors.Wrap(_characterStringValueErr, "Error serializing 'characterStringValue' field") + } if popErr := writeBuffer.PopContext("BACnetFaultParameterFaultExtendedParametersEntryCharacterString"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetFaultParameterFaultExtendedParametersEntryCharacterString") @@ -194,6 +199,7 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryCharacterString) Seria return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetFaultParameterFaultExtendedParametersEntryCharacterString) isBACnetFaultParameterFaultExtendedParametersEntryCharacterString() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryCharacterString) Strin } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryDate.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryDate.go index 88f98873c66..ee785688211 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryDate.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryDate.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetFaultParameterFaultExtendedParametersEntryDate is the corresponding interface of BACnetFaultParameterFaultExtendedParametersEntryDate type BACnetFaultParameterFaultExtendedParametersEntryDate interface { @@ -46,9 +48,11 @@ type BACnetFaultParameterFaultExtendedParametersEntryDateExactly interface { // _BACnetFaultParameterFaultExtendedParametersEntryDate is the data-structure of this message type _BACnetFaultParameterFaultExtendedParametersEntryDate struct { *_BACnetFaultParameterFaultExtendedParametersEntry - DateValue BACnetApplicationTagDate + DateValue BACnetApplicationTagDate } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetFaultParameterFaultExtendedParametersEntryDate struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetFaultParameterFaultExtendedParametersEntryDate) InitializeParent(parent BACnetFaultParameterFaultExtendedParametersEntry, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetFaultParameterFaultExtendedParametersEntryDate) InitializeParent(parent BACnetFaultParameterFaultExtendedParametersEntry , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetFaultParameterFaultExtendedParametersEntryDate) GetParent() BACnetFaultParameterFaultExtendedParametersEntry { +func (m *_BACnetFaultParameterFaultExtendedParametersEntryDate) GetParent() BACnetFaultParameterFaultExtendedParametersEntry { return m._BACnetFaultParameterFaultExtendedParametersEntry } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryDate) GetDateValue() B /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetFaultParameterFaultExtendedParametersEntryDate factory function for _BACnetFaultParameterFaultExtendedParametersEntryDate -func NewBACnetFaultParameterFaultExtendedParametersEntryDate(dateValue BACnetApplicationTagDate, peekedTagHeader BACnetTagHeader) *_BACnetFaultParameterFaultExtendedParametersEntryDate { +func NewBACnetFaultParameterFaultExtendedParametersEntryDate( dateValue BACnetApplicationTagDate , peekedTagHeader BACnetTagHeader ) *_BACnetFaultParameterFaultExtendedParametersEntryDate { _result := &_BACnetFaultParameterFaultExtendedParametersEntryDate{ DateValue: dateValue, - _BACnetFaultParameterFaultExtendedParametersEntry: NewBACnetFaultParameterFaultExtendedParametersEntry(peekedTagHeader), + _BACnetFaultParameterFaultExtendedParametersEntry: NewBACnetFaultParameterFaultExtendedParametersEntry(peekedTagHeader), } _result._BACnetFaultParameterFaultExtendedParametersEntry._BACnetFaultParameterFaultExtendedParametersEntryChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetFaultParameterFaultExtendedParametersEntryDate(dateValue BACnetApp // Deprecated: use the interface for direct cast func CastBACnetFaultParameterFaultExtendedParametersEntryDate(structType interface{}) BACnetFaultParameterFaultExtendedParametersEntryDate { - if casted, ok := structType.(BACnetFaultParameterFaultExtendedParametersEntryDate); ok { + if casted, ok := structType.(BACnetFaultParameterFaultExtendedParametersEntryDate); ok { return casted } if casted, ok := structType.(*BACnetFaultParameterFaultExtendedParametersEntryDate); ok { @@ -115,6 +118,7 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryDate) GetLengthInBits( return lengthInBits } + func (m *_BACnetFaultParameterFaultExtendedParametersEntryDate) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetFaultParameterFaultExtendedParametersEntryDateParseWithBuffer(ctx con if pullErr := readBuffer.PullContext("dateValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for dateValue") } - _dateValue, _dateValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_dateValue, _dateValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _dateValueErr != nil { return nil, errors.Wrap(_dateValueErr, "Error parsing 'dateValue' field of BACnetFaultParameterFaultExtendedParametersEntryDate") } @@ -151,7 +155,8 @@ func BACnetFaultParameterFaultExtendedParametersEntryDateParseWithBuffer(ctx con // Create a partially initialized instance _child := &_BACnetFaultParameterFaultExtendedParametersEntryDate{ - _BACnetFaultParameterFaultExtendedParametersEntry: &_BACnetFaultParameterFaultExtendedParametersEntry{}, + _BACnetFaultParameterFaultExtendedParametersEntry: &_BACnetFaultParameterFaultExtendedParametersEntry{ + }, DateValue: dateValue, } _child._BACnetFaultParameterFaultExtendedParametersEntry._BACnetFaultParameterFaultExtendedParametersEntryChildRequirements = _child @@ -174,17 +179,17 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryDate) SerializeWithWri return errors.Wrap(pushErr, "Error pushing for BACnetFaultParameterFaultExtendedParametersEntryDate") } - // Simple Field (dateValue) - if pushErr := writeBuffer.PushContext("dateValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for dateValue") - } - _dateValueErr := writeBuffer.WriteSerializable(ctx, m.GetDateValue()) - if popErr := writeBuffer.PopContext("dateValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for dateValue") - } - if _dateValueErr != nil { - return errors.Wrap(_dateValueErr, "Error serializing 'dateValue' field") - } + // Simple Field (dateValue) + if pushErr := writeBuffer.PushContext("dateValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for dateValue") + } + _dateValueErr := writeBuffer.WriteSerializable(ctx, m.GetDateValue()) + if popErr := writeBuffer.PopContext("dateValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for dateValue") + } + if _dateValueErr != nil { + return errors.Wrap(_dateValueErr, "Error serializing 'dateValue' field") + } if popErr := writeBuffer.PopContext("BACnetFaultParameterFaultExtendedParametersEntryDate"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetFaultParameterFaultExtendedParametersEntryDate") @@ -194,6 +199,7 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryDate) SerializeWithWri return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetFaultParameterFaultExtendedParametersEntryDate) isBACnetFaultParameterFaultExtendedParametersEntryDate() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryDate) String() string } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryDouble.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryDouble.go index 733f54f82ca..872ee419b32 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryDouble.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryDouble.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetFaultParameterFaultExtendedParametersEntryDouble is the corresponding interface of BACnetFaultParameterFaultExtendedParametersEntryDouble type BACnetFaultParameterFaultExtendedParametersEntryDouble interface { @@ -46,9 +48,11 @@ type BACnetFaultParameterFaultExtendedParametersEntryDoubleExactly interface { // _BACnetFaultParameterFaultExtendedParametersEntryDouble is the data-structure of this message type _BACnetFaultParameterFaultExtendedParametersEntryDouble struct { *_BACnetFaultParameterFaultExtendedParametersEntry - DoubleValue BACnetApplicationTagDouble + DoubleValue BACnetApplicationTagDouble } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetFaultParameterFaultExtendedParametersEntryDouble struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetFaultParameterFaultExtendedParametersEntryDouble) InitializeParent(parent BACnetFaultParameterFaultExtendedParametersEntry, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetFaultParameterFaultExtendedParametersEntryDouble) InitializeParent(parent BACnetFaultParameterFaultExtendedParametersEntry , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetFaultParameterFaultExtendedParametersEntryDouble) GetParent() BACnetFaultParameterFaultExtendedParametersEntry { +func (m *_BACnetFaultParameterFaultExtendedParametersEntryDouble) GetParent() BACnetFaultParameterFaultExtendedParametersEntry { return m._BACnetFaultParameterFaultExtendedParametersEntry } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryDouble) GetDoubleValue /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetFaultParameterFaultExtendedParametersEntryDouble factory function for _BACnetFaultParameterFaultExtendedParametersEntryDouble -func NewBACnetFaultParameterFaultExtendedParametersEntryDouble(doubleValue BACnetApplicationTagDouble, peekedTagHeader BACnetTagHeader) *_BACnetFaultParameterFaultExtendedParametersEntryDouble { +func NewBACnetFaultParameterFaultExtendedParametersEntryDouble( doubleValue BACnetApplicationTagDouble , peekedTagHeader BACnetTagHeader ) *_BACnetFaultParameterFaultExtendedParametersEntryDouble { _result := &_BACnetFaultParameterFaultExtendedParametersEntryDouble{ DoubleValue: doubleValue, - _BACnetFaultParameterFaultExtendedParametersEntry: NewBACnetFaultParameterFaultExtendedParametersEntry(peekedTagHeader), + _BACnetFaultParameterFaultExtendedParametersEntry: NewBACnetFaultParameterFaultExtendedParametersEntry(peekedTagHeader), } _result._BACnetFaultParameterFaultExtendedParametersEntry._BACnetFaultParameterFaultExtendedParametersEntryChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetFaultParameterFaultExtendedParametersEntryDouble(doubleValue BACne // Deprecated: use the interface for direct cast func CastBACnetFaultParameterFaultExtendedParametersEntryDouble(structType interface{}) BACnetFaultParameterFaultExtendedParametersEntryDouble { - if casted, ok := structType.(BACnetFaultParameterFaultExtendedParametersEntryDouble); ok { + if casted, ok := structType.(BACnetFaultParameterFaultExtendedParametersEntryDouble); ok { return casted } if casted, ok := structType.(*BACnetFaultParameterFaultExtendedParametersEntryDouble); ok { @@ -115,6 +118,7 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryDouble) GetLengthInBit return lengthInBits } + func (m *_BACnetFaultParameterFaultExtendedParametersEntryDouble) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetFaultParameterFaultExtendedParametersEntryDoubleParseWithBuffer(ctx c if pullErr := readBuffer.PullContext("doubleValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for doubleValue") } - _doubleValue, _doubleValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_doubleValue, _doubleValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _doubleValueErr != nil { return nil, errors.Wrap(_doubleValueErr, "Error parsing 'doubleValue' field of BACnetFaultParameterFaultExtendedParametersEntryDouble") } @@ -151,7 +155,8 @@ func BACnetFaultParameterFaultExtendedParametersEntryDoubleParseWithBuffer(ctx c // Create a partially initialized instance _child := &_BACnetFaultParameterFaultExtendedParametersEntryDouble{ - _BACnetFaultParameterFaultExtendedParametersEntry: &_BACnetFaultParameterFaultExtendedParametersEntry{}, + _BACnetFaultParameterFaultExtendedParametersEntry: &_BACnetFaultParameterFaultExtendedParametersEntry{ + }, DoubleValue: doubleValue, } _child._BACnetFaultParameterFaultExtendedParametersEntry._BACnetFaultParameterFaultExtendedParametersEntryChildRequirements = _child @@ -174,17 +179,17 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryDouble) SerializeWithW return errors.Wrap(pushErr, "Error pushing for BACnetFaultParameterFaultExtendedParametersEntryDouble") } - // Simple Field (doubleValue) - if pushErr := writeBuffer.PushContext("doubleValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for doubleValue") - } - _doubleValueErr := writeBuffer.WriteSerializable(ctx, m.GetDoubleValue()) - if popErr := writeBuffer.PopContext("doubleValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for doubleValue") - } - if _doubleValueErr != nil { - return errors.Wrap(_doubleValueErr, "Error serializing 'doubleValue' field") - } + // Simple Field (doubleValue) + if pushErr := writeBuffer.PushContext("doubleValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for doubleValue") + } + _doubleValueErr := writeBuffer.WriteSerializable(ctx, m.GetDoubleValue()) + if popErr := writeBuffer.PopContext("doubleValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for doubleValue") + } + if _doubleValueErr != nil { + return errors.Wrap(_doubleValueErr, "Error serializing 'doubleValue' field") + } if popErr := writeBuffer.PopContext("BACnetFaultParameterFaultExtendedParametersEntryDouble"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetFaultParameterFaultExtendedParametersEntryDouble") @@ -194,6 +199,7 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryDouble) SerializeWithW return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetFaultParameterFaultExtendedParametersEntryDouble) isBACnetFaultParameterFaultExtendedParametersEntryDouble() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryDouble) String() strin } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryEnumerated.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryEnumerated.go index 7db4adf2cec..34a4371df5d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryEnumerated.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryEnumerated.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetFaultParameterFaultExtendedParametersEntryEnumerated is the corresponding interface of BACnetFaultParameterFaultExtendedParametersEntryEnumerated type BACnetFaultParameterFaultExtendedParametersEntryEnumerated interface { @@ -46,9 +48,11 @@ type BACnetFaultParameterFaultExtendedParametersEntryEnumeratedExactly interface // _BACnetFaultParameterFaultExtendedParametersEntryEnumerated is the data-structure of this message type _BACnetFaultParameterFaultExtendedParametersEntryEnumerated struct { *_BACnetFaultParameterFaultExtendedParametersEntry - EnumeratedValue BACnetApplicationTagEnumerated + EnumeratedValue BACnetApplicationTagEnumerated } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetFaultParameterFaultExtendedParametersEntryEnumerated struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetFaultParameterFaultExtendedParametersEntryEnumerated) InitializeParent(parent BACnetFaultParameterFaultExtendedParametersEntry, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetFaultParameterFaultExtendedParametersEntryEnumerated) InitializeParent(parent BACnetFaultParameterFaultExtendedParametersEntry , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetFaultParameterFaultExtendedParametersEntryEnumerated) GetParent() BACnetFaultParameterFaultExtendedParametersEntry { +func (m *_BACnetFaultParameterFaultExtendedParametersEntryEnumerated) GetParent() BACnetFaultParameterFaultExtendedParametersEntry { return m._BACnetFaultParameterFaultExtendedParametersEntry } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryEnumerated) GetEnumera /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetFaultParameterFaultExtendedParametersEntryEnumerated factory function for _BACnetFaultParameterFaultExtendedParametersEntryEnumerated -func NewBACnetFaultParameterFaultExtendedParametersEntryEnumerated(enumeratedValue BACnetApplicationTagEnumerated, peekedTagHeader BACnetTagHeader) *_BACnetFaultParameterFaultExtendedParametersEntryEnumerated { +func NewBACnetFaultParameterFaultExtendedParametersEntryEnumerated( enumeratedValue BACnetApplicationTagEnumerated , peekedTagHeader BACnetTagHeader ) *_BACnetFaultParameterFaultExtendedParametersEntryEnumerated { _result := &_BACnetFaultParameterFaultExtendedParametersEntryEnumerated{ EnumeratedValue: enumeratedValue, - _BACnetFaultParameterFaultExtendedParametersEntry: NewBACnetFaultParameterFaultExtendedParametersEntry(peekedTagHeader), + _BACnetFaultParameterFaultExtendedParametersEntry: NewBACnetFaultParameterFaultExtendedParametersEntry(peekedTagHeader), } _result._BACnetFaultParameterFaultExtendedParametersEntry._BACnetFaultParameterFaultExtendedParametersEntryChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetFaultParameterFaultExtendedParametersEntryEnumerated(enumeratedVal // Deprecated: use the interface for direct cast func CastBACnetFaultParameterFaultExtendedParametersEntryEnumerated(structType interface{}) BACnetFaultParameterFaultExtendedParametersEntryEnumerated { - if casted, ok := structType.(BACnetFaultParameterFaultExtendedParametersEntryEnumerated); ok { + if casted, ok := structType.(BACnetFaultParameterFaultExtendedParametersEntryEnumerated); ok { return casted } if casted, ok := structType.(*BACnetFaultParameterFaultExtendedParametersEntryEnumerated); ok { @@ -115,6 +118,7 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryEnumerated) GetLengthI return lengthInBits } + func (m *_BACnetFaultParameterFaultExtendedParametersEntryEnumerated) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetFaultParameterFaultExtendedParametersEntryEnumeratedParseWithBuffer(c if pullErr := readBuffer.PullContext("enumeratedValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for enumeratedValue") } - _enumeratedValue, _enumeratedValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_enumeratedValue, _enumeratedValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _enumeratedValueErr != nil { return nil, errors.Wrap(_enumeratedValueErr, "Error parsing 'enumeratedValue' field of BACnetFaultParameterFaultExtendedParametersEntryEnumerated") } @@ -151,7 +155,8 @@ func BACnetFaultParameterFaultExtendedParametersEntryEnumeratedParseWithBuffer(c // Create a partially initialized instance _child := &_BACnetFaultParameterFaultExtendedParametersEntryEnumerated{ - _BACnetFaultParameterFaultExtendedParametersEntry: &_BACnetFaultParameterFaultExtendedParametersEntry{}, + _BACnetFaultParameterFaultExtendedParametersEntry: &_BACnetFaultParameterFaultExtendedParametersEntry{ + }, EnumeratedValue: enumeratedValue, } _child._BACnetFaultParameterFaultExtendedParametersEntry._BACnetFaultParameterFaultExtendedParametersEntryChildRequirements = _child @@ -174,17 +179,17 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryEnumerated) SerializeW return errors.Wrap(pushErr, "Error pushing for BACnetFaultParameterFaultExtendedParametersEntryEnumerated") } - // Simple Field (enumeratedValue) - if pushErr := writeBuffer.PushContext("enumeratedValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for enumeratedValue") - } - _enumeratedValueErr := writeBuffer.WriteSerializable(ctx, m.GetEnumeratedValue()) - if popErr := writeBuffer.PopContext("enumeratedValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for enumeratedValue") - } - if _enumeratedValueErr != nil { - return errors.Wrap(_enumeratedValueErr, "Error serializing 'enumeratedValue' field") - } + // Simple Field (enumeratedValue) + if pushErr := writeBuffer.PushContext("enumeratedValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for enumeratedValue") + } + _enumeratedValueErr := writeBuffer.WriteSerializable(ctx, m.GetEnumeratedValue()) + if popErr := writeBuffer.PopContext("enumeratedValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for enumeratedValue") + } + if _enumeratedValueErr != nil { + return errors.Wrap(_enumeratedValueErr, "Error serializing 'enumeratedValue' field") + } if popErr := writeBuffer.PopContext("BACnetFaultParameterFaultExtendedParametersEntryEnumerated"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetFaultParameterFaultExtendedParametersEntryEnumerated") @@ -194,6 +199,7 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryEnumerated) SerializeW return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetFaultParameterFaultExtendedParametersEntryEnumerated) isBACnetFaultParameterFaultExtendedParametersEntryEnumerated() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryEnumerated) String() s } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryInteger.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryInteger.go index 73650483694..3c364c75c13 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryInteger.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryInteger.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetFaultParameterFaultExtendedParametersEntryInteger is the corresponding interface of BACnetFaultParameterFaultExtendedParametersEntryInteger type BACnetFaultParameterFaultExtendedParametersEntryInteger interface { @@ -46,9 +48,11 @@ type BACnetFaultParameterFaultExtendedParametersEntryIntegerExactly interface { // _BACnetFaultParameterFaultExtendedParametersEntryInteger is the data-structure of this message type _BACnetFaultParameterFaultExtendedParametersEntryInteger struct { *_BACnetFaultParameterFaultExtendedParametersEntry - IntegerValue BACnetApplicationTagSignedInteger + IntegerValue BACnetApplicationTagSignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetFaultParameterFaultExtendedParametersEntryInteger struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetFaultParameterFaultExtendedParametersEntryInteger) InitializeParent(parent BACnetFaultParameterFaultExtendedParametersEntry, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetFaultParameterFaultExtendedParametersEntryInteger) InitializeParent(parent BACnetFaultParameterFaultExtendedParametersEntry , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetFaultParameterFaultExtendedParametersEntryInteger) GetParent() BACnetFaultParameterFaultExtendedParametersEntry { +func (m *_BACnetFaultParameterFaultExtendedParametersEntryInteger) GetParent() BACnetFaultParameterFaultExtendedParametersEntry { return m._BACnetFaultParameterFaultExtendedParametersEntry } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryInteger) GetIntegerVal /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetFaultParameterFaultExtendedParametersEntryInteger factory function for _BACnetFaultParameterFaultExtendedParametersEntryInteger -func NewBACnetFaultParameterFaultExtendedParametersEntryInteger(integerValue BACnetApplicationTagSignedInteger, peekedTagHeader BACnetTagHeader) *_BACnetFaultParameterFaultExtendedParametersEntryInteger { +func NewBACnetFaultParameterFaultExtendedParametersEntryInteger( integerValue BACnetApplicationTagSignedInteger , peekedTagHeader BACnetTagHeader ) *_BACnetFaultParameterFaultExtendedParametersEntryInteger { _result := &_BACnetFaultParameterFaultExtendedParametersEntryInteger{ IntegerValue: integerValue, - _BACnetFaultParameterFaultExtendedParametersEntry: NewBACnetFaultParameterFaultExtendedParametersEntry(peekedTagHeader), + _BACnetFaultParameterFaultExtendedParametersEntry: NewBACnetFaultParameterFaultExtendedParametersEntry(peekedTagHeader), } _result._BACnetFaultParameterFaultExtendedParametersEntry._BACnetFaultParameterFaultExtendedParametersEntryChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetFaultParameterFaultExtendedParametersEntryInteger(integerValue BAC // Deprecated: use the interface for direct cast func CastBACnetFaultParameterFaultExtendedParametersEntryInteger(structType interface{}) BACnetFaultParameterFaultExtendedParametersEntryInteger { - if casted, ok := structType.(BACnetFaultParameterFaultExtendedParametersEntryInteger); ok { + if casted, ok := structType.(BACnetFaultParameterFaultExtendedParametersEntryInteger); ok { return casted } if casted, ok := structType.(*BACnetFaultParameterFaultExtendedParametersEntryInteger); ok { @@ -115,6 +118,7 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryInteger) GetLengthInBi return lengthInBits } + func (m *_BACnetFaultParameterFaultExtendedParametersEntryInteger) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetFaultParameterFaultExtendedParametersEntryIntegerParseWithBuffer(ctx if pullErr := readBuffer.PullContext("integerValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for integerValue") } - _integerValue, _integerValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_integerValue, _integerValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _integerValueErr != nil { return nil, errors.Wrap(_integerValueErr, "Error parsing 'integerValue' field of BACnetFaultParameterFaultExtendedParametersEntryInteger") } @@ -151,7 +155,8 @@ func BACnetFaultParameterFaultExtendedParametersEntryIntegerParseWithBuffer(ctx // Create a partially initialized instance _child := &_BACnetFaultParameterFaultExtendedParametersEntryInteger{ - _BACnetFaultParameterFaultExtendedParametersEntry: &_BACnetFaultParameterFaultExtendedParametersEntry{}, + _BACnetFaultParameterFaultExtendedParametersEntry: &_BACnetFaultParameterFaultExtendedParametersEntry{ + }, IntegerValue: integerValue, } _child._BACnetFaultParameterFaultExtendedParametersEntry._BACnetFaultParameterFaultExtendedParametersEntryChildRequirements = _child @@ -174,17 +179,17 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryInteger) SerializeWith return errors.Wrap(pushErr, "Error pushing for BACnetFaultParameterFaultExtendedParametersEntryInteger") } - // Simple Field (integerValue) - if pushErr := writeBuffer.PushContext("integerValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for integerValue") - } - _integerValueErr := writeBuffer.WriteSerializable(ctx, m.GetIntegerValue()) - if popErr := writeBuffer.PopContext("integerValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for integerValue") - } - if _integerValueErr != nil { - return errors.Wrap(_integerValueErr, "Error serializing 'integerValue' field") - } + // Simple Field (integerValue) + if pushErr := writeBuffer.PushContext("integerValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for integerValue") + } + _integerValueErr := writeBuffer.WriteSerializable(ctx, m.GetIntegerValue()) + if popErr := writeBuffer.PopContext("integerValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for integerValue") + } + if _integerValueErr != nil { + return errors.Wrap(_integerValueErr, "Error serializing 'integerValue' field") + } if popErr := writeBuffer.PopContext("BACnetFaultParameterFaultExtendedParametersEntryInteger"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetFaultParameterFaultExtendedParametersEntryInteger") @@ -194,6 +199,7 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryInteger) SerializeWith return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetFaultParameterFaultExtendedParametersEntryInteger) isBACnetFaultParameterFaultExtendedParametersEntryInteger() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryInteger) String() stri } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryNull.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryNull.go index 01b5b8561f2..0fd5f6bbeae 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryNull.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryNull.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetFaultParameterFaultExtendedParametersEntryNull is the corresponding interface of BACnetFaultParameterFaultExtendedParametersEntryNull type BACnetFaultParameterFaultExtendedParametersEntryNull interface { @@ -46,9 +48,11 @@ type BACnetFaultParameterFaultExtendedParametersEntryNullExactly interface { // _BACnetFaultParameterFaultExtendedParametersEntryNull is the data-structure of this message type _BACnetFaultParameterFaultExtendedParametersEntryNull struct { *_BACnetFaultParameterFaultExtendedParametersEntry - NullValue BACnetApplicationTagNull + NullValue BACnetApplicationTagNull } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetFaultParameterFaultExtendedParametersEntryNull struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetFaultParameterFaultExtendedParametersEntryNull) InitializeParent(parent BACnetFaultParameterFaultExtendedParametersEntry, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetFaultParameterFaultExtendedParametersEntryNull) InitializeParent(parent BACnetFaultParameterFaultExtendedParametersEntry , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetFaultParameterFaultExtendedParametersEntryNull) GetParent() BACnetFaultParameterFaultExtendedParametersEntry { +func (m *_BACnetFaultParameterFaultExtendedParametersEntryNull) GetParent() BACnetFaultParameterFaultExtendedParametersEntry { return m._BACnetFaultParameterFaultExtendedParametersEntry } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryNull) GetNullValue() B /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetFaultParameterFaultExtendedParametersEntryNull factory function for _BACnetFaultParameterFaultExtendedParametersEntryNull -func NewBACnetFaultParameterFaultExtendedParametersEntryNull(nullValue BACnetApplicationTagNull, peekedTagHeader BACnetTagHeader) *_BACnetFaultParameterFaultExtendedParametersEntryNull { +func NewBACnetFaultParameterFaultExtendedParametersEntryNull( nullValue BACnetApplicationTagNull , peekedTagHeader BACnetTagHeader ) *_BACnetFaultParameterFaultExtendedParametersEntryNull { _result := &_BACnetFaultParameterFaultExtendedParametersEntryNull{ NullValue: nullValue, - _BACnetFaultParameterFaultExtendedParametersEntry: NewBACnetFaultParameterFaultExtendedParametersEntry(peekedTagHeader), + _BACnetFaultParameterFaultExtendedParametersEntry: NewBACnetFaultParameterFaultExtendedParametersEntry(peekedTagHeader), } _result._BACnetFaultParameterFaultExtendedParametersEntry._BACnetFaultParameterFaultExtendedParametersEntryChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetFaultParameterFaultExtendedParametersEntryNull(nullValue BACnetApp // Deprecated: use the interface for direct cast func CastBACnetFaultParameterFaultExtendedParametersEntryNull(structType interface{}) BACnetFaultParameterFaultExtendedParametersEntryNull { - if casted, ok := structType.(BACnetFaultParameterFaultExtendedParametersEntryNull); ok { + if casted, ok := structType.(BACnetFaultParameterFaultExtendedParametersEntryNull); ok { return casted } if casted, ok := structType.(*BACnetFaultParameterFaultExtendedParametersEntryNull); ok { @@ -115,6 +118,7 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryNull) GetLengthInBits( return lengthInBits } + func (m *_BACnetFaultParameterFaultExtendedParametersEntryNull) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetFaultParameterFaultExtendedParametersEntryNullParseWithBuffer(ctx con if pullErr := readBuffer.PullContext("nullValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for nullValue") } - _nullValue, _nullValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_nullValue, _nullValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _nullValueErr != nil { return nil, errors.Wrap(_nullValueErr, "Error parsing 'nullValue' field of BACnetFaultParameterFaultExtendedParametersEntryNull") } @@ -151,7 +155,8 @@ func BACnetFaultParameterFaultExtendedParametersEntryNullParseWithBuffer(ctx con // Create a partially initialized instance _child := &_BACnetFaultParameterFaultExtendedParametersEntryNull{ - _BACnetFaultParameterFaultExtendedParametersEntry: &_BACnetFaultParameterFaultExtendedParametersEntry{}, + _BACnetFaultParameterFaultExtendedParametersEntry: &_BACnetFaultParameterFaultExtendedParametersEntry{ + }, NullValue: nullValue, } _child._BACnetFaultParameterFaultExtendedParametersEntry._BACnetFaultParameterFaultExtendedParametersEntryChildRequirements = _child @@ -174,17 +179,17 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryNull) SerializeWithWri return errors.Wrap(pushErr, "Error pushing for BACnetFaultParameterFaultExtendedParametersEntryNull") } - // Simple Field (nullValue) - if pushErr := writeBuffer.PushContext("nullValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for nullValue") - } - _nullValueErr := writeBuffer.WriteSerializable(ctx, m.GetNullValue()) - if popErr := writeBuffer.PopContext("nullValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for nullValue") - } - if _nullValueErr != nil { - return errors.Wrap(_nullValueErr, "Error serializing 'nullValue' field") - } + // Simple Field (nullValue) + if pushErr := writeBuffer.PushContext("nullValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for nullValue") + } + _nullValueErr := writeBuffer.WriteSerializable(ctx, m.GetNullValue()) + if popErr := writeBuffer.PopContext("nullValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for nullValue") + } + if _nullValueErr != nil { + return errors.Wrap(_nullValueErr, "Error serializing 'nullValue' field") + } if popErr := writeBuffer.PopContext("BACnetFaultParameterFaultExtendedParametersEntryNull"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetFaultParameterFaultExtendedParametersEntryNull") @@ -194,6 +199,7 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryNull) SerializeWithWri return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetFaultParameterFaultExtendedParametersEntryNull) isBACnetFaultParameterFaultExtendedParametersEntryNull() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryNull) String() string } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryObjectidentifier.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryObjectidentifier.go index 7f95e8ff947..a4f60f6b293 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryObjectidentifier.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryObjectidentifier.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetFaultParameterFaultExtendedParametersEntryObjectidentifier is the corresponding interface of BACnetFaultParameterFaultExtendedParametersEntryObjectidentifier type BACnetFaultParameterFaultExtendedParametersEntryObjectidentifier interface { @@ -46,9 +48,11 @@ type BACnetFaultParameterFaultExtendedParametersEntryObjectidentifierExactly int // _BACnetFaultParameterFaultExtendedParametersEntryObjectidentifier is the data-structure of this message type _BACnetFaultParameterFaultExtendedParametersEntryObjectidentifier struct { *_BACnetFaultParameterFaultExtendedParametersEntry - ObjectidentifierValue BACnetApplicationTagObjectIdentifier + ObjectidentifierValue BACnetApplicationTagObjectIdentifier } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetFaultParameterFaultExtendedParametersEntryObjectidentifier struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetFaultParameterFaultExtendedParametersEntryObjectidentifier) InitializeParent(parent BACnetFaultParameterFaultExtendedParametersEntry, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetFaultParameterFaultExtendedParametersEntryObjectidentifier) InitializeParent(parent BACnetFaultParameterFaultExtendedParametersEntry , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetFaultParameterFaultExtendedParametersEntryObjectidentifier) GetParent() BACnetFaultParameterFaultExtendedParametersEntry { +func (m *_BACnetFaultParameterFaultExtendedParametersEntryObjectidentifier) GetParent() BACnetFaultParameterFaultExtendedParametersEntry { return m._BACnetFaultParameterFaultExtendedParametersEntry } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryObjectidentifier) GetO /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetFaultParameterFaultExtendedParametersEntryObjectidentifier factory function for _BACnetFaultParameterFaultExtendedParametersEntryObjectidentifier -func NewBACnetFaultParameterFaultExtendedParametersEntryObjectidentifier(objectidentifierValue BACnetApplicationTagObjectIdentifier, peekedTagHeader BACnetTagHeader) *_BACnetFaultParameterFaultExtendedParametersEntryObjectidentifier { +func NewBACnetFaultParameterFaultExtendedParametersEntryObjectidentifier( objectidentifierValue BACnetApplicationTagObjectIdentifier , peekedTagHeader BACnetTagHeader ) *_BACnetFaultParameterFaultExtendedParametersEntryObjectidentifier { _result := &_BACnetFaultParameterFaultExtendedParametersEntryObjectidentifier{ - ObjectidentifierValue: objectidentifierValue, - _BACnetFaultParameterFaultExtendedParametersEntry: NewBACnetFaultParameterFaultExtendedParametersEntry(peekedTagHeader), + ObjectidentifierValue: objectidentifierValue, + _BACnetFaultParameterFaultExtendedParametersEntry: NewBACnetFaultParameterFaultExtendedParametersEntry(peekedTagHeader), } _result._BACnetFaultParameterFaultExtendedParametersEntry._BACnetFaultParameterFaultExtendedParametersEntryChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetFaultParameterFaultExtendedParametersEntryObjectidentifier(objecti // Deprecated: use the interface for direct cast func CastBACnetFaultParameterFaultExtendedParametersEntryObjectidentifier(structType interface{}) BACnetFaultParameterFaultExtendedParametersEntryObjectidentifier { - if casted, ok := structType.(BACnetFaultParameterFaultExtendedParametersEntryObjectidentifier); ok { + if casted, ok := structType.(BACnetFaultParameterFaultExtendedParametersEntryObjectidentifier); ok { return casted } if casted, ok := structType.(*BACnetFaultParameterFaultExtendedParametersEntryObjectidentifier); ok { @@ -115,6 +118,7 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryObjectidentifier) GetL return lengthInBits } + func (m *_BACnetFaultParameterFaultExtendedParametersEntryObjectidentifier) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetFaultParameterFaultExtendedParametersEntryObjectidentifierParseWithBu if pullErr := readBuffer.PullContext("objectidentifierValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for objectidentifierValue") } - _objectidentifierValue, _objectidentifierValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_objectidentifierValue, _objectidentifierValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _objectidentifierValueErr != nil { return nil, errors.Wrap(_objectidentifierValueErr, "Error parsing 'objectidentifierValue' field of BACnetFaultParameterFaultExtendedParametersEntryObjectidentifier") } @@ -151,8 +155,9 @@ func BACnetFaultParameterFaultExtendedParametersEntryObjectidentifierParseWithBu // Create a partially initialized instance _child := &_BACnetFaultParameterFaultExtendedParametersEntryObjectidentifier{ - _BACnetFaultParameterFaultExtendedParametersEntry: &_BACnetFaultParameterFaultExtendedParametersEntry{}, - ObjectidentifierValue: objectidentifierValue, + _BACnetFaultParameterFaultExtendedParametersEntry: &_BACnetFaultParameterFaultExtendedParametersEntry{ + }, + ObjectidentifierValue: objectidentifierValue, } _child._BACnetFaultParameterFaultExtendedParametersEntry._BACnetFaultParameterFaultExtendedParametersEntryChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryObjectidentifier) Seri return errors.Wrap(pushErr, "Error pushing for BACnetFaultParameterFaultExtendedParametersEntryObjectidentifier") } - // Simple Field (objectidentifierValue) - if pushErr := writeBuffer.PushContext("objectidentifierValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for objectidentifierValue") - } - _objectidentifierValueErr := writeBuffer.WriteSerializable(ctx, m.GetObjectidentifierValue()) - if popErr := writeBuffer.PopContext("objectidentifierValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for objectidentifierValue") - } - if _objectidentifierValueErr != nil { - return errors.Wrap(_objectidentifierValueErr, "Error serializing 'objectidentifierValue' field") - } + // Simple Field (objectidentifierValue) + if pushErr := writeBuffer.PushContext("objectidentifierValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for objectidentifierValue") + } + _objectidentifierValueErr := writeBuffer.WriteSerializable(ctx, m.GetObjectidentifierValue()) + if popErr := writeBuffer.PopContext("objectidentifierValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for objectidentifierValue") + } + if _objectidentifierValueErr != nil { + return errors.Wrap(_objectidentifierValueErr, "Error serializing 'objectidentifierValue' field") + } if popErr := writeBuffer.PopContext("BACnetFaultParameterFaultExtendedParametersEntryObjectidentifier"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetFaultParameterFaultExtendedParametersEntryObjectidentifier") @@ -194,6 +199,7 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryObjectidentifier) Seri return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetFaultParameterFaultExtendedParametersEntryObjectidentifier) isBACnetFaultParameterFaultExtendedParametersEntryObjectidentifier() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryObjectidentifier) Stri } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryOctetString.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryOctetString.go index cea87e5fe4c..0b1cdb01ffd 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryOctetString.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryOctetString.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetFaultParameterFaultExtendedParametersEntryOctetString is the corresponding interface of BACnetFaultParameterFaultExtendedParametersEntryOctetString type BACnetFaultParameterFaultExtendedParametersEntryOctetString interface { @@ -46,9 +48,11 @@ type BACnetFaultParameterFaultExtendedParametersEntryOctetStringExactly interfac // _BACnetFaultParameterFaultExtendedParametersEntryOctetString is the data-structure of this message type _BACnetFaultParameterFaultExtendedParametersEntryOctetString struct { *_BACnetFaultParameterFaultExtendedParametersEntry - OctetStringValue BACnetApplicationTagOctetString + OctetStringValue BACnetApplicationTagOctetString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetFaultParameterFaultExtendedParametersEntryOctetString struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetFaultParameterFaultExtendedParametersEntryOctetString) InitializeParent(parent BACnetFaultParameterFaultExtendedParametersEntry, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetFaultParameterFaultExtendedParametersEntryOctetString) InitializeParent(parent BACnetFaultParameterFaultExtendedParametersEntry , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetFaultParameterFaultExtendedParametersEntryOctetString) GetParent() BACnetFaultParameterFaultExtendedParametersEntry { +func (m *_BACnetFaultParameterFaultExtendedParametersEntryOctetString) GetParent() BACnetFaultParameterFaultExtendedParametersEntry { return m._BACnetFaultParameterFaultExtendedParametersEntry } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryOctetString) GetOctetS /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetFaultParameterFaultExtendedParametersEntryOctetString factory function for _BACnetFaultParameterFaultExtendedParametersEntryOctetString -func NewBACnetFaultParameterFaultExtendedParametersEntryOctetString(octetStringValue BACnetApplicationTagOctetString, peekedTagHeader BACnetTagHeader) *_BACnetFaultParameterFaultExtendedParametersEntryOctetString { +func NewBACnetFaultParameterFaultExtendedParametersEntryOctetString( octetStringValue BACnetApplicationTagOctetString , peekedTagHeader BACnetTagHeader ) *_BACnetFaultParameterFaultExtendedParametersEntryOctetString { _result := &_BACnetFaultParameterFaultExtendedParametersEntryOctetString{ OctetStringValue: octetStringValue, - _BACnetFaultParameterFaultExtendedParametersEntry: NewBACnetFaultParameterFaultExtendedParametersEntry(peekedTagHeader), + _BACnetFaultParameterFaultExtendedParametersEntry: NewBACnetFaultParameterFaultExtendedParametersEntry(peekedTagHeader), } _result._BACnetFaultParameterFaultExtendedParametersEntry._BACnetFaultParameterFaultExtendedParametersEntryChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetFaultParameterFaultExtendedParametersEntryOctetString(octetStringV // Deprecated: use the interface for direct cast func CastBACnetFaultParameterFaultExtendedParametersEntryOctetString(structType interface{}) BACnetFaultParameterFaultExtendedParametersEntryOctetString { - if casted, ok := structType.(BACnetFaultParameterFaultExtendedParametersEntryOctetString); ok { + if casted, ok := structType.(BACnetFaultParameterFaultExtendedParametersEntryOctetString); ok { return casted } if casted, ok := structType.(*BACnetFaultParameterFaultExtendedParametersEntryOctetString); ok { @@ -115,6 +118,7 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryOctetString) GetLength return lengthInBits } + func (m *_BACnetFaultParameterFaultExtendedParametersEntryOctetString) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetFaultParameterFaultExtendedParametersEntryOctetStringParseWithBuffer( if pullErr := readBuffer.PullContext("octetStringValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for octetStringValue") } - _octetStringValue, _octetStringValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_octetStringValue, _octetStringValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _octetStringValueErr != nil { return nil, errors.Wrap(_octetStringValueErr, "Error parsing 'octetStringValue' field of BACnetFaultParameterFaultExtendedParametersEntryOctetString") } @@ -151,7 +155,8 @@ func BACnetFaultParameterFaultExtendedParametersEntryOctetStringParseWithBuffer( // Create a partially initialized instance _child := &_BACnetFaultParameterFaultExtendedParametersEntryOctetString{ - _BACnetFaultParameterFaultExtendedParametersEntry: &_BACnetFaultParameterFaultExtendedParametersEntry{}, + _BACnetFaultParameterFaultExtendedParametersEntry: &_BACnetFaultParameterFaultExtendedParametersEntry{ + }, OctetStringValue: octetStringValue, } _child._BACnetFaultParameterFaultExtendedParametersEntry._BACnetFaultParameterFaultExtendedParametersEntryChildRequirements = _child @@ -174,17 +179,17 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryOctetString) Serialize return errors.Wrap(pushErr, "Error pushing for BACnetFaultParameterFaultExtendedParametersEntryOctetString") } - // Simple Field (octetStringValue) - if pushErr := writeBuffer.PushContext("octetStringValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for octetStringValue") - } - _octetStringValueErr := writeBuffer.WriteSerializable(ctx, m.GetOctetStringValue()) - if popErr := writeBuffer.PopContext("octetStringValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for octetStringValue") - } - if _octetStringValueErr != nil { - return errors.Wrap(_octetStringValueErr, "Error serializing 'octetStringValue' field") - } + // Simple Field (octetStringValue) + if pushErr := writeBuffer.PushContext("octetStringValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for octetStringValue") + } + _octetStringValueErr := writeBuffer.WriteSerializable(ctx, m.GetOctetStringValue()) + if popErr := writeBuffer.PopContext("octetStringValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for octetStringValue") + } + if _octetStringValueErr != nil { + return errors.Wrap(_octetStringValueErr, "Error serializing 'octetStringValue' field") + } if popErr := writeBuffer.PopContext("BACnetFaultParameterFaultExtendedParametersEntryOctetString"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetFaultParameterFaultExtendedParametersEntryOctetString") @@ -194,6 +199,7 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryOctetString) Serialize return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetFaultParameterFaultExtendedParametersEntryOctetString) isBACnetFaultParameterFaultExtendedParametersEntryOctetString() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryOctetString) String() } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryReal.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryReal.go index 61520f31595..f77ad114925 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryReal.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryReal.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetFaultParameterFaultExtendedParametersEntryReal is the corresponding interface of BACnetFaultParameterFaultExtendedParametersEntryReal type BACnetFaultParameterFaultExtendedParametersEntryReal interface { @@ -46,9 +48,11 @@ type BACnetFaultParameterFaultExtendedParametersEntryRealExactly interface { // _BACnetFaultParameterFaultExtendedParametersEntryReal is the data-structure of this message type _BACnetFaultParameterFaultExtendedParametersEntryReal struct { *_BACnetFaultParameterFaultExtendedParametersEntry - RealValue BACnetApplicationTagReal + RealValue BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetFaultParameterFaultExtendedParametersEntryReal struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetFaultParameterFaultExtendedParametersEntryReal) InitializeParent(parent BACnetFaultParameterFaultExtendedParametersEntry, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetFaultParameterFaultExtendedParametersEntryReal) InitializeParent(parent BACnetFaultParameterFaultExtendedParametersEntry , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetFaultParameterFaultExtendedParametersEntryReal) GetParent() BACnetFaultParameterFaultExtendedParametersEntry { +func (m *_BACnetFaultParameterFaultExtendedParametersEntryReal) GetParent() BACnetFaultParameterFaultExtendedParametersEntry { return m._BACnetFaultParameterFaultExtendedParametersEntry } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryReal) GetRealValue() B /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetFaultParameterFaultExtendedParametersEntryReal factory function for _BACnetFaultParameterFaultExtendedParametersEntryReal -func NewBACnetFaultParameterFaultExtendedParametersEntryReal(realValue BACnetApplicationTagReal, peekedTagHeader BACnetTagHeader) *_BACnetFaultParameterFaultExtendedParametersEntryReal { +func NewBACnetFaultParameterFaultExtendedParametersEntryReal( realValue BACnetApplicationTagReal , peekedTagHeader BACnetTagHeader ) *_BACnetFaultParameterFaultExtendedParametersEntryReal { _result := &_BACnetFaultParameterFaultExtendedParametersEntryReal{ RealValue: realValue, - _BACnetFaultParameterFaultExtendedParametersEntry: NewBACnetFaultParameterFaultExtendedParametersEntry(peekedTagHeader), + _BACnetFaultParameterFaultExtendedParametersEntry: NewBACnetFaultParameterFaultExtendedParametersEntry(peekedTagHeader), } _result._BACnetFaultParameterFaultExtendedParametersEntry._BACnetFaultParameterFaultExtendedParametersEntryChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetFaultParameterFaultExtendedParametersEntryReal(realValue BACnetApp // Deprecated: use the interface for direct cast func CastBACnetFaultParameterFaultExtendedParametersEntryReal(structType interface{}) BACnetFaultParameterFaultExtendedParametersEntryReal { - if casted, ok := structType.(BACnetFaultParameterFaultExtendedParametersEntryReal); ok { + if casted, ok := structType.(BACnetFaultParameterFaultExtendedParametersEntryReal); ok { return casted } if casted, ok := structType.(*BACnetFaultParameterFaultExtendedParametersEntryReal); ok { @@ -115,6 +118,7 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryReal) GetLengthInBits( return lengthInBits } + func (m *_BACnetFaultParameterFaultExtendedParametersEntryReal) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetFaultParameterFaultExtendedParametersEntryRealParseWithBuffer(ctx con if pullErr := readBuffer.PullContext("realValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for realValue") } - _realValue, _realValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_realValue, _realValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _realValueErr != nil { return nil, errors.Wrap(_realValueErr, "Error parsing 'realValue' field of BACnetFaultParameterFaultExtendedParametersEntryReal") } @@ -151,7 +155,8 @@ func BACnetFaultParameterFaultExtendedParametersEntryRealParseWithBuffer(ctx con // Create a partially initialized instance _child := &_BACnetFaultParameterFaultExtendedParametersEntryReal{ - _BACnetFaultParameterFaultExtendedParametersEntry: &_BACnetFaultParameterFaultExtendedParametersEntry{}, + _BACnetFaultParameterFaultExtendedParametersEntry: &_BACnetFaultParameterFaultExtendedParametersEntry{ + }, RealValue: realValue, } _child._BACnetFaultParameterFaultExtendedParametersEntry._BACnetFaultParameterFaultExtendedParametersEntryChildRequirements = _child @@ -174,17 +179,17 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryReal) SerializeWithWri return errors.Wrap(pushErr, "Error pushing for BACnetFaultParameterFaultExtendedParametersEntryReal") } - // Simple Field (realValue) - if pushErr := writeBuffer.PushContext("realValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for realValue") - } - _realValueErr := writeBuffer.WriteSerializable(ctx, m.GetRealValue()) - if popErr := writeBuffer.PopContext("realValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for realValue") - } - if _realValueErr != nil { - return errors.Wrap(_realValueErr, "Error serializing 'realValue' field") - } + // Simple Field (realValue) + if pushErr := writeBuffer.PushContext("realValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for realValue") + } + _realValueErr := writeBuffer.WriteSerializable(ctx, m.GetRealValue()) + if popErr := writeBuffer.PopContext("realValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for realValue") + } + if _realValueErr != nil { + return errors.Wrap(_realValueErr, "Error serializing 'realValue' field") + } if popErr := writeBuffer.PopContext("BACnetFaultParameterFaultExtendedParametersEntryReal"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetFaultParameterFaultExtendedParametersEntryReal") @@ -194,6 +199,7 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryReal) SerializeWithWri return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetFaultParameterFaultExtendedParametersEntryReal) isBACnetFaultParameterFaultExtendedParametersEntryReal() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryReal) String() string } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryReference.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryReference.go index b5ee832efa6..3b1bef9081d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryReference.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryReference.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetFaultParameterFaultExtendedParametersEntryReference is the corresponding interface of BACnetFaultParameterFaultExtendedParametersEntryReference type BACnetFaultParameterFaultExtendedParametersEntryReference interface { @@ -46,9 +48,11 @@ type BACnetFaultParameterFaultExtendedParametersEntryReferenceExactly interface // _BACnetFaultParameterFaultExtendedParametersEntryReference is the data-structure of this message type _BACnetFaultParameterFaultExtendedParametersEntryReference struct { *_BACnetFaultParameterFaultExtendedParametersEntry - Reference BACnetDeviceObjectPropertyReferenceEnclosed + Reference BACnetDeviceObjectPropertyReferenceEnclosed } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetFaultParameterFaultExtendedParametersEntryReference struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetFaultParameterFaultExtendedParametersEntryReference) InitializeParent(parent BACnetFaultParameterFaultExtendedParametersEntry, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetFaultParameterFaultExtendedParametersEntryReference) InitializeParent(parent BACnetFaultParameterFaultExtendedParametersEntry , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetFaultParameterFaultExtendedParametersEntryReference) GetParent() BACnetFaultParameterFaultExtendedParametersEntry { +func (m *_BACnetFaultParameterFaultExtendedParametersEntryReference) GetParent() BACnetFaultParameterFaultExtendedParametersEntry { return m._BACnetFaultParameterFaultExtendedParametersEntry } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryReference) GetReferenc /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetFaultParameterFaultExtendedParametersEntryReference factory function for _BACnetFaultParameterFaultExtendedParametersEntryReference -func NewBACnetFaultParameterFaultExtendedParametersEntryReference(reference BACnetDeviceObjectPropertyReferenceEnclosed, peekedTagHeader BACnetTagHeader) *_BACnetFaultParameterFaultExtendedParametersEntryReference { +func NewBACnetFaultParameterFaultExtendedParametersEntryReference( reference BACnetDeviceObjectPropertyReferenceEnclosed , peekedTagHeader BACnetTagHeader ) *_BACnetFaultParameterFaultExtendedParametersEntryReference { _result := &_BACnetFaultParameterFaultExtendedParametersEntryReference{ Reference: reference, - _BACnetFaultParameterFaultExtendedParametersEntry: NewBACnetFaultParameterFaultExtendedParametersEntry(peekedTagHeader), + _BACnetFaultParameterFaultExtendedParametersEntry: NewBACnetFaultParameterFaultExtendedParametersEntry(peekedTagHeader), } _result._BACnetFaultParameterFaultExtendedParametersEntry._BACnetFaultParameterFaultExtendedParametersEntryChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetFaultParameterFaultExtendedParametersEntryReference(reference BACn // Deprecated: use the interface for direct cast func CastBACnetFaultParameterFaultExtendedParametersEntryReference(structType interface{}) BACnetFaultParameterFaultExtendedParametersEntryReference { - if casted, ok := structType.(BACnetFaultParameterFaultExtendedParametersEntryReference); ok { + if casted, ok := structType.(BACnetFaultParameterFaultExtendedParametersEntryReference); ok { return casted } if casted, ok := structType.(*BACnetFaultParameterFaultExtendedParametersEntryReference); ok { @@ -115,6 +118,7 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryReference) GetLengthIn return lengthInBits } + func (m *_BACnetFaultParameterFaultExtendedParametersEntryReference) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetFaultParameterFaultExtendedParametersEntryReferenceParseWithBuffer(ct if pullErr := readBuffer.PullContext("reference"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for reference") } - _reference, _referenceErr := BACnetDeviceObjectPropertyReferenceEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_reference, _referenceErr := BACnetDeviceObjectPropertyReferenceEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _referenceErr != nil { return nil, errors.Wrap(_referenceErr, "Error parsing 'reference' field of BACnetFaultParameterFaultExtendedParametersEntryReference") } @@ -151,7 +155,8 @@ func BACnetFaultParameterFaultExtendedParametersEntryReferenceParseWithBuffer(ct // Create a partially initialized instance _child := &_BACnetFaultParameterFaultExtendedParametersEntryReference{ - _BACnetFaultParameterFaultExtendedParametersEntry: &_BACnetFaultParameterFaultExtendedParametersEntry{}, + _BACnetFaultParameterFaultExtendedParametersEntry: &_BACnetFaultParameterFaultExtendedParametersEntry{ + }, Reference: reference, } _child._BACnetFaultParameterFaultExtendedParametersEntry._BACnetFaultParameterFaultExtendedParametersEntryChildRequirements = _child @@ -174,17 +179,17 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryReference) SerializeWi return errors.Wrap(pushErr, "Error pushing for BACnetFaultParameterFaultExtendedParametersEntryReference") } - // Simple Field (reference) - if pushErr := writeBuffer.PushContext("reference"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for reference") - } - _referenceErr := writeBuffer.WriteSerializable(ctx, m.GetReference()) - if popErr := writeBuffer.PopContext("reference"); popErr != nil { - return errors.Wrap(popErr, "Error popping for reference") - } - if _referenceErr != nil { - return errors.Wrap(_referenceErr, "Error serializing 'reference' field") - } + // Simple Field (reference) + if pushErr := writeBuffer.PushContext("reference"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for reference") + } + _referenceErr := writeBuffer.WriteSerializable(ctx, m.GetReference()) + if popErr := writeBuffer.PopContext("reference"); popErr != nil { + return errors.Wrap(popErr, "Error popping for reference") + } + if _referenceErr != nil { + return errors.Wrap(_referenceErr, "Error serializing 'reference' field") + } if popErr := writeBuffer.PopContext("BACnetFaultParameterFaultExtendedParametersEntryReference"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetFaultParameterFaultExtendedParametersEntryReference") @@ -194,6 +199,7 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryReference) SerializeWi return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetFaultParameterFaultExtendedParametersEntryReference) isBACnetFaultParameterFaultExtendedParametersEntryReference() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryReference) String() st } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryTime.go index 1fb73670ae5..fc479feeb84 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetFaultParameterFaultExtendedParametersEntryTime is the corresponding interface of BACnetFaultParameterFaultExtendedParametersEntryTime type BACnetFaultParameterFaultExtendedParametersEntryTime interface { @@ -46,9 +48,11 @@ type BACnetFaultParameterFaultExtendedParametersEntryTimeExactly interface { // _BACnetFaultParameterFaultExtendedParametersEntryTime is the data-structure of this message type _BACnetFaultParameterFaultExtendedParametersEntryTime struct { *_BACnetFaultParameterFaultExtendedParametersEntry - TimeValue BACnetApplicationTagTime + TimeValue BACnetApplicationTagTime } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetFaultParameterFaultExtendedParametersEntryTime struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetFaultParameterFaultExtendedParametersEntryTime) InitializeParent(parent BACnetFaultParameterFaultExtendedParametersEntry, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetFaultParameterFaultExtendedParametersEntryTime) InitializeParent(parent BACnetFaultParameterFaultExtendedParametersEntry , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetFaultParameterFaultExtendedParametersEntryTime) GetParent() BACnetFaultParameterFaultExtendedParametersEntry { +func (m *_BACnetFaultParameterFaultExtendedParametersEntryTime) GetParent() BACnetFaultParameterFaultExtendedParametersEntry { return m._BACnetFaultParameterFaultExtendedParametersEntry } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryTime) GetTimeValue() B /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetFaultParameterFaultExtendedParametersEntryTime factory function for _BACnetFaultParameterFaultExtendedParametersEntryTime -func NewBACnetFaultParameterFaultExtendedParametersEntryTime(timeValue BACnetApplicationTagTime, peekedTagHeader BACnetTagHeader) *_BACnetFaultParameterFaultExtendedParametersEntryTime { +func NewBACnetFaultParameterFaultExtendedParametersEntryTime( timeValue BACnetApplicationTagTime , peekedTagHeader BACnetTagHeader ) *_BACnetFaultParameterFaultExtendedParametersEntryTime { _result := &_BACnetFaultParameterFaultExtendedParametersEntryTime{ TimeValue: timeValue, - _BACnetFaultParameterFaultExtendedParametersEntry: NewBACnetFaultParameterFaultExtendedParametersEntry(peekedTagHeader), + _BACnetFaultParameterFaultExtendedParametersEntry: NewBACnetFaultParameterFaultExtendedParametersEntry(peekedTagHeader), } _result._BACnetFaultParameterFaultExtendedParametersEntry._BACnetFaultParameterFaultExtendedParametersEntryChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetFaultParameterFaultExtendedParametersEntryTime(timeValue BACnetApp // Deprecated: use the interface for direct cast func CastBACnetFaultParameterFaultExtendedParametersEntryTime(structType interface{}) BACnetFaultParameterFaultExtendedParametersEntryTime { - if casted, ok := structType.(BACnetFaultParameterFaultExtendedParametersEntryTime); ok { + if casted, ok := structType.(BACnetFaultParameterFaultExtendedParametersEntryTime); ok { return casted } if casted, ok := structType.(*BACnetFaultParameterFaultExtendedParametersEntryTime); ok { @@ -115,6 +118,7 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryTime) GetLengthInBits( return lengthInBits } + func (m *_BACnetFaultParameterFaultExtendedParametersEntryTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetFaultParameterFaultExtendedParametersEntryTimeParseWithBuffer(ctx con if pullErr := readBuffer.PullContext("timeValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeValue") } - _timeValue, _timeValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_timeValue, _timeValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _timeValueErr != nil { return nil, errors.Wrap(_timeValueErr, "Error parsing 'timeValue' field of BACnetFaultParameterFaultExtendedParametersEntryTime") } @@ -151,7 +155,8 @@ func BACnetFaultParameterFaultExtendedParametersEntryTimeParseWithBuffer(ctx con // Create a partially initialized instance _child := &_BACnetFaultParameterFaultExtendedParametersEntryTime{ - _BACnetFaultParameterFaultExtendedParametersEntry: &_BACnetFaultParameterFaultExtendedParametersEntry{}, + _BACnetFaultParameterFaultExtendedParametersEntry: &_BACnetFaultParameterFaultExtendedParametersEntry{ + }, TimeValue: timeValue, } _child._BACnetFaultParameterFaultExtendedParametersEntry._BACnetFaultParameterFaultExtendedParametersEntryChildRequirements = _child @@ -174,17 +179,17 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryTime) SerializeWithWri return errors.Wrap(pushErr, "Error pushing for BACnetFaultParameterFaultExtendedParametersEntryTime") } - // Simple Field (timeValue) - if pushErr := writeBuffer.PushContext("timeValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timeValue") - } - _timeValueErr := writeBuffer.WriteSerializable(ctx, m.GetTimeValue()) - if popErr := writeBuffer.PopContext("timeValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timeValue") - } - if _timeValueErr != nil { - return errors.Wrap(_timeValueErr, "Error serializing 'timeValue' field") - } + // Simple Field (timeValue) + if pushErr := writeBuffer.PushContext("timeValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timeValue") + } + _timeValueErr := writeBuffer.WriteSerializable(ctx, m.GetTimeValue()) + if popErr := writeBuffer.PopContext("timeValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timeValue") + } + if _timeValueErr != nil { + return errors.Wrap(_timeValueErr, "Error serializing 'timeValue' field") + } if popErr := writeBuffer.PopContext("BACnetFaultParameterFaultExtendedParametersEntryTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetFaultParameterFaultExtendedParametersEntryTime") @@ -194,6 +199,7 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryTime) SerializeWithWri return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetFaultParameterFaultExtendedParametersEntryTime) isBACnetFaultParameterFaultExtendedParametersEntryTime() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryTime) String() string } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryUnsigned.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryUnsigned.go index 5c52ec71d94..c6cfa60bb9e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryUnsigned.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultExtendedParametersEntryUnsigned.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetFaultParameterFaultExtendedParametersEntryUnsigned is the corresponding interface of BACnetFaultParameterFaultExtendedParametersEntryUnsigned type BACnetFaultParameterFaultExtendedParametersEntryUnsigned interface { @@ -46,9 +48,11 @@ type BACnetFaultParameterFaultExtendedParametersEntryUnsignedExactly interface { // _BACnetFaultParameterFaultExtendedParametersEntryUnsigned is the data-structure of this message type _BACnetFaultParameterFaultExtendedParametersEntryUnsigned struct { *_BACnetFaultParameterFaultExtendedParametersEntry - UnsignedValue BACnetApplicationTagUnsignedInteger + UnsignedValue BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetFaultParameterFaultExtendedParametersEntryUnsigned struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetFaultParameterFaultExtendedParametersEntryUnsigned) InitializeParent(parent BACnetFaultParameterFaultExtendedParametersEntry, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetFaultParameterFaultExtendedParametersEntryUnsigned) InitializeParent(parent BACnetFaultParameterFaultExtendedParametersEntry , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetFaultParameterFaultExtendedParametersEntryUnsigned) GetParent() BACnetFaultParameterFaultExtendedParametersEntry { +func (m *_BACnetFaultParameterFaultExtendedParametersEntryUnsigned) GetParent() BACnetFaultParameterFaultExtendedParametersEntry { return m._BACnetFaultParameterFaultExtendedParametersEntry } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryUnsigned) GetUnsignedV /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetFaultParameterFaultExtendedParametersEntryUnsigned factory function for _BACnetFaultParameterFaultExtendedParametersEntryUnsigned -func NewBACnetFaultParameterFaultExtendedParametersEntryUnsigned(unsignedValue BACnetApplicationTagUnsignedInteger, peekedTagHeader BACnetTagHeader) *_BACnetFaultParameterFaultExtendedParametersEntryUnsigned { +func NewBACnetFaultParameterFaultExtendedParametersEntryUnsigned( unsignedValue BACnetApplicationTagUnsignedInteger , peekedTagHeader BACnetTagHeader ) *_BACnetFaultParameterFaultExtendedParametersEntryUnsigned { _result := &_BACnetFaultParameterFaultExtendedParametersEntryUnsigned{ UnsignedValue: unsignedValue, - _BACnetFaultParameterFaultExtendedParametersEntry: NewBACnetFaultParameterFaultExtendedParametersEntry(peekedTagHeader), + _BACnetFaultParameterFaultExtendedParametersEntry: NewBACnetFaultParameterFaultExtendedParametersEntry(peekedTagHeader), } _result._BACnetFaultParameterFaultExtendedParametersEntry._BACnetFaultParameterFaultExtendedParametersEntryChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetFaultParameterFaultExtendedParametersEntryUnsigned(unsignedValue B // Deprecated: use the interface for direct cast func CastBACnetFaultParameterFaultExtendedParametersEntryUnsigned(structType interface{}) BACnetFaultParameterFaultExtendedParametersEntryUnsigned { - if casted, ok := structType.(BACnetFaultParameterFaultExtendedParametersEntryUnsigned); ok { + if casted, ok := structType.(BACnetFaultParameterFaultExtendedParametersEntryUnsigned); ok { return casted } if casted, ok := structType.(*BACnetFaultParameterFaultExtendedParametersEntryUnsigned); ok { @@ -115,6 +118,7 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryUnsigned) GetLengthInB return lengthInBits } + func (m *_BACnetFaultParameterFaultExtendedParametersEntryUnsigned) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetFaultParameterFaultExtendedParametersEntryUnsignedParseWithBuffer(ctx if pullErr := readBuffer.PullContext("unsignedValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for unsignedValue") } - _unsignedValue, _unsignedValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_unsignedValue, _unsignedValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _unsignedValueErr != nil { return nil, errors.Wrap(_unsignedValueErr, "Error parsing 'unsignedValue' field of BACnetFaultParameterFaultExtendedParametersEntryUnsigned") } @@ -151,7 +155,8 @@ func BACnetFaultParameterFaultExtendedParametersEntryUnsignedParseWithBuffer(ctx // Create a partially initialized instance _child := &_BACnetFaultParameterFaultExtendedParametersEntryUnsigned{ - _BACnetFaultParameterFaultExtendedParametersEntry: &_BACnetFaultParameterFaultExtendedParametersEntry{}, + _BACnetFaultParameterFaultExtendedParametersEntry: &_BACnetFaultParameterFaultExtendedParametersEntry{ + }, UnsignedValue: unsignedValue, } _child._BACnetFaultParameterFaultExtendedParametersEntry._BACnetFaultParameterFaultExtendedParametersEntryChildRequirements = _child @@ -174,17 +179,17 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryUnsigned) SerializeWit return errors.Wrap(pushErr, "Error pushing for BACnetFaultParameterFaultExtendedParametersEntryUnsigned") } - // Simple Field (unsignedValue) - if pushErr := writeBuffer.PushContext("unsignedValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for unsignedValue") - } - _unsignedValueErr := writeBuffer.WriteSerializable(ctx, m.GetUnsignedValue()) - if popErr := writeBuffer.PopContext("unsignedValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for unsignedValue") - } - if _unsignedValueErr != nil { - return errors.Wrap(_unsignedValueErr, "Error serializing 'unsignedValue' field") - } + // Simple Field (unsignedValue) + if pushErr := writeBuffer.PushContext("unsignedValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for unsignedValue") + } + _unsignedValueErr := writeBuffer.WriteSerializable(ctx, m.GetUnsignedValue()) + if popErr := writeBuffer.PopContext("unsignedValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for unsignedValue") + } + if _unsignedValueErr != nil { + return errors.Wrap(_unsignedValueErr, "Error serializing 'unsignedValue' field") + } if popErr := writeBuffer.PopContext("BACnetFaultParameterFaultExtendedParametersEntryUnsigned"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetFaultParameterFaultExtendedParametersEntryUnsigned") @@ -194,6 +199,7 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryUnsigned) SerializeWit return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetFaultParameterFaultExtendedParametersEntryUnsigned) isBACnetFaultParameterFaultExtendedParametersEntryUnsigned() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetFaultParameterFaultExtendedParametersEntryUnsigned) String() str } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultLifeSafety.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultLifeSafety.go index 667b42e105e..a89c4db3fb6 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultLifeSafety.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultLifeSafety.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetFaultParameterFaultLifeSafety is the corresponding interface of BACnetFaultParameterFaultLifeSafety type BACnetFaultParameterFaultLifeSafety interface { @@ -52,12 +54,14 @@ type BACnetFaultParameterFaultLifeSafetyExactly interface { // _BACnetFaultParameterFaultLifeSafety is the data-structure of this message type _BACnetFaultParameterFaultLifeSafety struct { *_BACnetFaultParameter - OpeningTag BACnetOpeningTag - ListOfFaultValues BACnetFaultParameterFaultLifeSafetyListOfFaultValues - ModePropertyReference BACnetDeviceObjectPropertyReferenceEnclosed - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + ListOfFaultValues BACnetFaultParameterFaultLifeSafetyListOfFaultValues + ModePropertyReference BACnetDeviceObjectPropertyReferenceEnclosed + ClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -68,14 +72,12 @@ type _BACnetFaultParameterFaultLifeSafety struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetFaultParameterFaultLifeSafety) InitializeParent(parent BACnetFaultParameter, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetFaultParameterFaultLifeSafety) InitializeParent(parent BACnetFaultParameter , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetFaultParameterFaultLifeSafety) GetParent() BACnetFaultParameter { +func (m *_BACnetFaultParameterFaultLifeSafety) GetParent() BACnetFaultParameter { return m._BACnetFaultParameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -102,14 +104,15 @@ func (m *_BACnetFaultParameterFaultLifeSafety) GetClosingTag() BACnetClosingTag /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetFaultParameterFaultLifeSafety factory function for _BACnetFaultParameterFaultLifeSafety -func NewBACnetFaultParameterFaultLifeSafety(openingTag BACnetOpeningTag, listOfFaultValues BACnetFaultParameterFaultLifeSafetyListOfFaultValues, modePropertyReference BACnetDeviceObjectPropertyReferenceEnclosed, closingTag BACnetClosingTag, peekedTagHeader BACnetTagHeader) *_BACnetFaultParameterFaultLifeSafety { +func NewBACnetFaultParameterFaultLifeSafety( openingTag BACnetOpeningTag , listOfFaultValues BACnetFaultParameterFaultLifeSafetyListOfFaultValues , modePropertyReference BACnetDeviceObjectPropertyReferenceEnclosed , closingTag BACnetClosingTag , peekedTagHeader BACnetTagHeader ) *_BACnetFaultParameterFaultLifeSafety { _result := &_BACnetFaultParameterFaultLifeSafety{ - OpeningTag: openingTag, - ListOfFaultValues: listOfFaultValues, + OpeningTag: openingTag, + ListOfFaultValues: listOfFaultValues, ModePropertyReference: modePropertyReference, - ClosingTag: closingTag, - _BACnetFaultParameter: NewBACnetFaultParameter(peekedTagHeader), + ClosingTag: closingTag, + _BACnetFaultParameter: NewBACnetFaultParameter(peekedTagHeader), } _result._BACnetFaultParameter._BACnetFaultParameterChildRequirements = _result return _result @@ -117,7 +120,7 @@ func NewBACnetFaultParameterFaultLifeSafety(openingTag BACnetOpeningTag, listOfF // Deprecated: use the interface for direct cast func CastBACnetFaultParameterFaultLifeSafety(structType interface{}) BACnetFaultParameterFaultLifeSafety { - if casted, ok := structType.(BACnetFaultParameterFaultLifeSafety); ok { + if casted, ok := structType.(BACnetFaultParameterFaultLifeSafety); ok { return casted } if casted, ok := structType.(*BACnetFaultParameterFaultLifeSafety); ok { @@ -148,6 +151,7 @@ func (m *_BACnetFaultParameterFaultLifeSafety) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetFaultParameterFaultLifeSafety) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -169,7 +173,7 @@ func BACnetFaultParameterFaultLifeSafetyParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(uint8(3))) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( uint8(3) ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetFaultParameterFaultLifeSafety") } @@ -182,7 +186,7 @@ func BACnetFaultParameterFaultLifeSafetyParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("listOfFaultValues"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for listOfFaultValues") } - _listOfFaultValues, _listOfFaultValuesErr := BACnetFaultParameterFaultLifeSafetyListOfFaultValuesParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_listOfFaultValues, _listOfFaultValuesErr := BACnetFaultParameterFaultLifeSafetyListOfFaultValuesParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _listOfFaultValuesErr != nil { return nil, errors.Wrap(_listOfFaultValuesErr, "Error parsing 'listOfFaultValues' field of BACnetFaultParameterFaultLifeSafety") } @@ -195,7 +199,7 @@ func BACnetFaultParameterFaultLifeSafetyParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("modePropertyReference"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for modePropertyReference") } - _modePropertyReference, _modePropertyReferenceErr := BACnetDeviceObjectPropertyReferenceEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(1))) +_modePropertyReference, _modePropertyReferenceErr := BACnetDeviceObjectPropertyReferenceEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) ) if _modePropertyReferenceErr != nil { return nil, errors.Wrap(_modePropertyReferenceErr, "Error parsing 'modePropertyReference' field of BACnetFaultParameterFaultLifeSafety") } @@ -208,7 +212,7 @@ func BACnetFaultParameterFaultLifeSafetyParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(uint8(3))) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( uint8(3) ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetFaultParameterFaultLifeSafety") } @@ -223,11 +227,12 @@ func BACnetFaultParameterFaultLifeSafetyParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetFaultParameterFaultLifeSafety{ - _BACnetFaultParameter: &_BACnetFaultParameter{}, - OpeningTag: openingTag, - ListOfFaultValues: listOfFaultValues, + _BACnetFaultParameter: &_BACnetFaultParameter{ + }, + OpeningTag: openingTag, + ListOfFaultValues: listOfFaultValues, ModePropertyReference: modePropertyReference, - ClosingTag: closingTag, + ClosingTag: closingTag, } _child._BACnetFaultParameter._BACnetFaultParameterChildRequirements = _child return _child, nil @@ -249,53 +254,53 @@ func (m *_BACnetFaultParameterFaultLifeSafety) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetFaultParameterFaultLifeSafety") } - // Simple Field (openingTag) - if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for openingTag") - } - _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) - if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for openingTag") - } - if _openingTagErr != nil { - return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") - } + // Simple Field (openingTag) + if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for openingTag") + } + _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) + if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for openingTag") + } + if _openingTagErr != nil { + return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") + } - // Simple Field (listOfFaultValues) - if pushErr := writeBuffer.PushContext("listOfFaultValues"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for listOfFaultValues") - } - _listOfFaultValuesErr := writeBuffer.WriteSerializable(ctx, m.GetListOfFaultValues()) - if popErr := writeBuffer.PopContext("listOfFaultValues"); popErr != nil { - return errors.Wrap(popErr, "Error popping for listOfFaultValues") - } - if _listOfFaultValuesErr != nil { - return errors.Wrap(_listOfFaultValuesErr, "Error serializing 'listOfFaultValues' field") - } + // Simple Field (listOfFaultValues) + if pushErr := writeBuffer.PushContext("listOfFaultValues"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for listOfFaultValues") + } + _listOfFaultValuesErr := writeBuffer.WriteSerializable(ctx, m.GetListOfFaultValues()) + if popErr := writeBuffer.PopContext("listOfFaultValues"); popErr != nil { + return errors.Wrap(popErr, "Error popping for listOfFaultValues") + } + if _listOfFaultValuesErr != nil { + return errors.Wrap(_listOfFaultValuesErr, "Error serializing 'listOfFaultValues' field") + } - // Simple Field (modePropertyReference) - if pushErr := writeBuffer.PushContext("modePropertyReference"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for modePropertyReference") - } - _modePropertyReferenceErr := writeBuffer.WriteSerializable(ctx, m.GetModePropertyReference()) - if popErr := writeBuffer.PopContext("modePropertyReference"); popErr != nil { - return errors.Wrap(popErr, "Error popping for modePropertyReference") - } - if _modePropertyReferenceErr != nil { - return errors.Wrap(_modePropertyReferenceErr, "Error serializing 'modePropertyReference' field") - } + // Simple Field (modePropertyReference) + if pushErr := writeBuffer.PushContext("modePropertyReference"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for modePropertyReference") + } + _modePropertyReferenceErr := writeBuffer.WriteSerializable(ctx, m.GetModePropertyReference()) + if popErr := writeBuffer.PopContext("modePropertyReference"); popErr != nil { + return errors.Wrap(popErr, "Error popping for modePropertyReference") + } + if _modePropertyReferenceErr != nil { + return errors.Wrap(_modePropertyReferenceErr, "Error serializing 'modePropertyReference' field") + } - // Simple Field (closingTag) - if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for closingTag") - } - _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) - if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for closingTag") - } - if _closingTagErr != nil { - return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") - } + // Simple Field (closingTag) + if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for closingTag") + } + _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) + if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for closingTag") + } + if _closingTagErr != nil { + return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") + } if popErr := writeBuffer.PopContext("BACnetFaultParameterFaultLifeSafety"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetFaultParameterFaultLifeSafety") @@ -305,6 +310,7 @@ func (m *_BACnetFaultParameterFaultLifeSafety) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetFaultParameterFaultLifeSafety) isBACnetFaultParameterFaultLifeSafety() bool { return true } @@ -319,3 +325,6 @@ func (m *_BACnetFaultParameterFaultLifeSafety) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultLifeSafetyListOfFaultValues.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultLifeSafetyListOfFaultValues.go index 461e5235547..4c3433bacf6 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultLifeSafetyListOfFaultValues.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultLifeSafetyListOfFaultValues.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetFaultParameterFaultLifeSafetyListOfFaultValues is the corresponding interface of BACnetFaultParameterFaultLifeSafetyListOfFaultValues type BACnetFaultParameterFaultLifeSafetyListOfFaultValues interface { @@ -49,14 +51,15 @@ type BACnetFaultParameterFaultLifeSafetyListOfFaultValuesExactly interface { // _BACnetFaultParameterFaultLifeSafetyListOfFaultValues is the data-structure of this message type _BACnetFaultParameterFaultLifeSafetyListOfFaultValues struct { - OpeningTag BACnetOpeningTag - ListIfFaultValues []BACnetLifeSafetyStateTagged - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + ListIfFaultValues []BACnetLifeSafetyStateTagged + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -79,14 +82,15 @@ func (m *_BACnetFaultParameterFaultLifeSafetyListOfFaultValues) GetClosingTag() /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetFaultParameterFaultLifeSafetyListOfFaultValues factory function for _BACnetFaultParameterFaultLifeSafetyListOfFaultValues -func NewBACnetFaultParameterFaultLifeSafetyListOfFaultValues(openingTag BACnetOpeningTag, listIfFaultValues []BACnetLifeSafetyStateTagged, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetFaultParameterFaultLifeSafetyListOfFaultValues { - return &_BACnetFaultParameterFaultLifeSafetyListOfFaultValues{OpeningTag: openingTag, ListIfFaultValues: listIfFaultValues, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetFaultParameterFaultLifeSafetyListOfFaultValues( openingTag BACnetOpeningTag , listIfFaultValues []BACnetLifeSafetyStateTagged , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetFaultParameterFaultLifeSafetyListOfFaultValues { +return &_BACnetFaultParameterFaultLifeSafetyListOfFaultValues{ OpeningTag: openingTag , ListIfFaultValues: listIfFaultValues , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetFaultParameterFaultLifeSafetyListOfFaultValues(structType interface{}) BACnetFaultParameterFaultLifeSafetyListOfFaultValues { - if casted, ok := structType.(BACnetFaultParameterFaultLifeSafetyListOfFaultValues); ok { + if casted, ok := structType.(BACnetFaultParameterFaultLifeSafetyListOfFaultValues); ok { return casted } if casted, ok := structType.(*BACnetFaultParameterFaultLifeSafetyListOfFaultValues); ok { @@ -118,6 +122,7 @@ func (m *_BACnetFaultParameterFaultLifeSafetyListOfFaultValues) GetLengthInBits( return lengthInBits } + func (m *_BACnetFaultParameterFaultLifeSafetyListOfFaultValues) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +144,7 @@ func BACnetFaultParameterFaultLifeSafetyListOfFaultValuesParseWithBuffer(ctx con if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetFaultParameterFaultLifeSafetyListOfFaultValues") } @@ -155,8 +160,8 @@ func BACnetFaultParameterFaultLifeSafetyListOfFaultValuesParseWithBuffer(ctx con // Terminated array var listIfFaultValues []BACnetLifeSafetyStateTagged { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetLifeSafetyStateTaggedParseWithBuffer(ctx, readBuffer, uint8(0), TagClass_APPLICATION_TAGS) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetLifeSafetyStateTaggedParseWithBuffer(ctx, readBuffer , uint8(0) , TagClass_APPLICATION_TAGS ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'listIfFaultValues' field of BACnetFaultParameterFaultLifeSafetyListOfFaultValues") } @@ -171,7 +176,7 @@ func BACnetFaultParameterFaultLifeSafetyListOfFaultValuesParseWithBuffer(ctx con if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetFaultParameterFaultLifeSafetyListOfFaultValues") } @@ -186,11 +191,11 @@ func BACnetFaultParameterFaultLifeSafetyListOfFaultValuesParseWithBuffer(ctx con // Create the instance return &_BACnetFaultParameterFaultLifeSafetyListOfFaultValues{ - TagNumber: tagNumber, - OpeningTag: openingTag, - ListIfFaultValues: listIfFaultValues, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + ListIfFaultValues: listIfFaultValues, + ClosingTag: closingTag, + }, nil } func (m *_BACnetFaultParameterFaultLifeSafetyListOfFaultValues) Serialize() ([]byte, error) { @@ -204,7 +209,7 @@ func (m *_BACnetFaultParameterFaultLifeSafetyListOfFaultValues) Serialize() ([]b func (m *_BACnetFaultParameterFaultLifeSafetyListOfFaultValues) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetFaultParameterFaultLifeSafetyListOfFaultValues"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetFaultParameterFaultLifeSafetyListOfFaultValues"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetFaultParameterFaultLifeSafetyListOfFaultValues") } @@ -255,13 +260,13 @@ func (m *_BACnetFaultParameterFaultLifeSafetyListOfFaultValues) SerializeWithWri return nil } + //// // Arguments Getter func (m *_BACnetFaultParameterFaultLifeSafetyListOfFaultValues) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -279,3 +284,6 @@ func (m *_BACnetFaultParameterFaultLifeSafetyListOfFaultValues) String() string } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultListed.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultListed.go index 1f90da585ea..111deb5c0ab 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultListed.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultListed.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetFaultParameterFaultListed is the corresponding interface of BACnetFaultParameterFaultListed type BACnetFaultParameterFaultListed interface { @@ -50,11 +52,13 @@ type BACnetFaultParameterFaultListedExactly interface { // _BACnetFaultParameterFaultListed is the data-structure of this message type _BACnetFaultParameterFaultListed struct { *_BACnetFaultParameter - OpeningTag BACnetOpeningTag - FaultListReference BACnetDeviceObjectPropertyReferenceEnclosed - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + FaultListReference BACnetDeviceObjectPropertyReferenceEnclosed + ClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -65,14 +69,12 @@ type _BACnetFaultParameterFaultListed struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetFaultParameterFaultListed) InitializeParent(parent BACnetFaultParameter, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetFaultParameterFaultListed) InitializeParent(parent BACnetFaultParameter , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetFaultParameterFaultListed) GetParent() BACnetFaultParameter { +func (m *_BACnetFaultParameterFaultListed) GetParent() BACnetFaultParameter { return m._BACnetFaultParameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -95,13 +97,14 @@ func (m *_BACnetFaultParameterFaultListed) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetFaultParameterFaultListed factory function for _BACnetFaultParameterFaultListed -func NewBACnetFaultParameterFaultListed(openingTag BACnetOpeningTag, faultListReference BACnetDeviceObjectPropertyReferenceEnclosed, closingTag BACnetClosingTag, peekedTagHeader BACnetTagHeader) *_BACnetFaultParameterFaultListed { +func NewBACnetFaultParameterFaultListed( openingTag BACnetOpeningTag , faultListReference BACnetDeviceObjectPropertyReferenceEnclosed , closingTag BACnetClosingTag , peekedTagHeader BACnetTagHeader ) *_BACnetFaultParameterFaultListed { _result := &_BACnetFaultParameterFaultListed{ - OpeningTag: openingTag, - FaultListReference: faultListReference, - ClosingTag: closingTag, - _BACnetFaultParameter: NewBACnetFaultParameter(peekedTagHeader), + OpeningTag: openingTag, + FaultListReference: faultListReference, + ClosingTag: closingTag, + _BACnetFaultParameter: NewBACnetFaultParameter(peekedTagHeader), } _result._BACnetFaultParameter._BACnetFaultParameterChildRequirements = _result return _result @@ -109,7 +112,7 @@ func NewBACnetFaultParameterFaultListed(openingTag BACnetOpeningTag, faultListRe // Deprecated: use the interface for direct cast func CastBACnetFaultParameterFaultListed(structType interface{}) BACnetFaultParameterFaultListed { - if casted, ok := structType.(BACnetFaultParameterFaultListed); ok { + if casted, ok := structType.(BACnetFaultParameterFaultListed); ok { return casted } if casted, ok := structType.(*BACnetFaultParameterFaultListed); ok { @@ -137,6 +140,7 @@ func (m *_BACnetFaultParameterFaultListed) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetFaultParameterFaultListed) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -158,7 +162,7 @@ func BACnetFaultParameterFaultListedParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(uint8(7))) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( uint8(7) ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetFaultParameterFaultListed") } @@ -171,7 +175,7 @@ func BACnetFaultParameterFaultListedParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("faultListReference"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for faultListReference") } - _faultListReference, _faultListReferenceErr := BACnetDeviceObjectPropertyReferenceEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_faultListReference, _faultListReferenceErr := BACnetDeviceObjectPropertyReferenceEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _faultListReferenceErr != nil { return nil, errors.Wrap(_faultListReferenceErr, "Error parsing 'faultListReference' field of BACnetFaultParameterFaultListed") } @@ -184,7 +188,7 @@ func BACnetFaultParameterFaultListedParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(uint8(7))) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( uint8(7) ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetFaultParameterFaultListed") } @@ -199,10 +203,11 @@ func BACnetFaultParameterFaultListedParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetFaultParameterFaultListed{ - _BACnetFaultParameter: &_BACnetFaultParameter{}, - OpeningTag: openingTag, - FaultListReference: faultListReference, - ClosingTag: closingTag, + _BACnetFaultParameter: &_BACnetFaultParameter{ + }, + OpeningTag: openingTag, + FaultListReference: faultListReference, + ClosingTag: closingTag, } _child._BACnetFaultParameter._BACnetFaultParameterChildRequirements = _child return _child, nil @@ -224,41 +229,41 @@ func (m *_BACnetFaultParameterFaultListed) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetFaultParameterFaultListed") } - // Simple Field (openingTag) - if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for openingTag") - } - _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) - if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for openingTag") - } - if _openingTagErr != nil { - return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") - } + // Simple Field (openingTag) + if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for openingTag") + } + _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) + if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for openingTag") + } + if _openingTagErr != nil { + return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") + } - // Simple Field (faultListReference) - if pushErr := writeBuffer.PushContext("faultListReference"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for faultListReference") - } - _faultListReferenceErr := writeBuffer.WriteSerializable(ctx, m.GetFaultListReference()) - if popErr := writeBuffer.PopContext("faultListReference"); popErr != nil { - return errors.Wrap(popErr, "Error popping for faultListReference") - } - if _faultListReferenceErr != nil { - return errors.Wrap(_faultListReferenceErr, "Error serializing 'faultListReference' field") - } + // Simple Field (faultListReference) + if pushErr := writeBuffer.PushContext("faultListReference"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for faultListReference") + } + _faultListReferenceErr := writeBuffer.WriteSerializable(ctx, m.GetFaultListReference()) + if popErr := writeBuffer.PopContext("faultListReference"); popErr != nil { + return errors.Wrap(popErr, "Error popping for faultListReference") + } + if _faultListReferenceErr != nil { + return errors.Wrap(_faultListReferenceErr, "Error serializing 'faultListReference' field") + } - // Simple Field (closingTag) - if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for closingTag") - } - _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) - if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for closingTag") - } - if _closingTagErr != nil { - return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") - } + // Simple Field (closingTag) + if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for closingTag") + } + _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) + if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for closingTag") + } + if _closingTagErr != nil { + return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") + } if popErr := writeBuffer.PopContext("BACnetFaultParameterFaultListed"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetFaultParameterFaultListed") @@ -268,6 +273,7 @@ func (m *_BACnetFaultParameterFaultListed) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetFaultParameterFaultListed) isBACnetFaultParameterFaultListed() bool { return true } @@ -282,3 +288,6 @@ func (m *_BACnetFaultParameterFaultListed) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRange.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRange.go index b03d135e705..0999e64b741 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRange.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRange.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetFaultParameterFaultOutOfRange is the corresponding interface of BACnetFaultParameterFaultOutOfRange type BACnetFaultParameterFaultOutOfRange interface { @@ -52,12 +54,14 @@ type BACnetFaultParameterFaultOutOfRangeExactly interface { // _BACnetFaultParameterFaultOutOfRange is the data-structure of this message type _BACnetFaultParameterFaultOutOfRange struct { *_BACnetFaultParameter - OpeningTag BACnetOpeningTag - MinNormalValue BACnetFaultParameterFaultOutOfRangeMinNormalValue - MaxNormalValue BACnetFaultParameterFaultOutOfRangeMaxNormalValue - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + MinNormalValue BACnetFaultParameterFaultOutOfRangeMinNormalValue + MaxNormalValue BACnetFaultParameterFaultOutOfRangeMaxNormalValue + ClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -68,14 +72,12 @@ type _BACnetFaultParameterFaultOutOfRange struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetFaultParameterFaultOutOfRange) InitializeParent(parent BACnetFaultParameter, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetFaultParameterFaultOutOfRange) InitializeParent(parent BACnetFaultParameter , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetFaultParameterFaultOutOfRange) GetParent() BACnetFaultParameter { +func (m *_BACnetFaultParameterFaultOutOfRange) GetParent() BACnetFaultParameter { return m._BACnetFaultParameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -102,14 +104,15 @@ func (m *_BACnetFaultParameterFaultOutOfRange) GetClosingTag() BACnetClosingTag /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetFaultParameterFaultOutOfRange factory function for _BACnetFaultParameterFaultOutOfRange -func NewBACnetFaultParameterFaultOutOfRange(openingTag BACnetOpeningTag, minNormalValue BACnetFaultParameterFaultOutOfRangeMinNormalValue, maxNormalValue BACnetFaultParameterFaultOutOfRangeMaxNormalValue, closingTag BACnetClosingTag, peekedTagHeader BACnetTagHeader) *_BACnetFaultParameterFaultOutOfRange { +func NewBACnetFaultParameterFaultOutOfRange( openingTag BACnetOpeningTag , minNormalValue BACnetFaultParameterFaultOutOfRangeMinNormalValue , maxNormalValue BACnetFaultParameterFaultOutOfRangeMaxNormalValue , closingTag BACnetClosingTag , peekedTagHeader BACnetTagHeader ) *_BACnetFaultParameterFaultOutOfRange { _result := &_BACnetFaultParameterFaultOutOfRange{ - OpeningTag: openingTag, - MinNormalValue: minNormalValue, - MaxNormalValue: maxNormalValue, - ClosingTag: closingTag, - _BACnetFaultParameter: NewBACnetFaultParameter(peekedTagHeader), + OpeningTag: openingTag, + MinNormalValue: minNormalValue, + MaxNormalValue: maxNormalValue, + ClosingTag: closingTag, + _BACnetFaultParameter: NewBACnetFaultParameter(peekedTagHeader), } _result._BACnetFaultParameter._BACnetFaultParameterChildRequirements = _result return _result @@ -117,7 +120,7 @@ func NewBACnetFaultParameterFaultOutOfRange(openingTag BACnetOpeningTag, minNorm // Deprecated: use the interface for direct cast func CastBACnetFaultParameterFaultOutOfRange(structType interface{}) BACnetFaultParameterFaultOutOfRange { - if casted, ok := structType.(BACnetFaultParameterFaultOutOfRange); ok { + if casted, ok := structType.(BACnetFaultParameterFaultOutOfRange); ok { return casted } if casted, ok := structType.(*BACnetFaultParameterFaultOutOfRange); ok { @@ -148,6 +151,7 @@ func (m *_BACnetFaultParameterFaultOutOfRange) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetFaultParameterFaultOutOfRange) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -169,7 +173,7 @@ func BACnetFaultParameterFaultOutOfRangeParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(uint8(6))) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( uint8(6) ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetFaultParameterFaultOutOfRange") } @@ -182,7 +186,7 @@ func BACnetFaultParameterFaultOutOfRangeParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("minNormalValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for minNormalValue") } - _minNormalValue, _minNormalValueErr := BACnetFaultParameterFaultOutOfRangeMinNormalValueParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_minNormalValue, _minNormalValueErr := BACnetFaultParameterFaultOutOfRangeMinNormalValueParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _minNormalValueErr != nil { return nil, errors.Wrap(_minNormalValueErr, "Error parsing 'minNormalValue' field of BACnetFaultParameterFaultOutOfRange") } @@ -195,7 +199,7 @@ func BACnetFaultParameterFaultOutOfRangeParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("maxNormalValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for maxNormalValue") } - _maxNormalValue, _maxNormalValueErr := BACnetFaultParameterFaultOutOfRangeMaxNormalValueParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_maxNormalValue, _maxNormalValueErr := BACnetFaultParameterFaultOutOfRangeMaxNormalValueParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _maxNormalValueErr != nil { return nil, errors.Wrap(_maxNormalValueErr, "Error parsing 'maxNormalValue' field of BACnetFaultParameterFaultOutOfRange") } @@ -208,7 +212,7 @@ func BACnetFaultParameterFaultOutOfRangeParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(uint8(6))) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( uint8(6) ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetFaultParameterFaultOutOfRange") } @@ -223,11 +227,12 @@ func BACnetFaultParameterFaultOutOfRangeParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetFaultParameterFaultOutOfRange{ - _BACnetFaultParameter: &_BACnetFaultParameter{}, - OpeningTag: openingTag, - MinNormalValue: minNormalValue, - MaxNormalValue: maxNormalValue, - ClosingTag: closingTag, + _BACnetFaultParameter: &_BACnetFaultParameter{ + }, + OpeningTag: openingTag, + MinNormalValue: minNormalValue, + MaxNormalValue: maxNormalValue, + ClosingTag: closingTag, } _child._BACnetFaultParameter._BACnetFaultParameterChildRequirements = _child return _child, nil @@ -249,53 +254,53 @@ func (m *_BACnetFaultParameterFaultOutOfRange) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetFaultParameterFaultOutOfRange") } - // Simple Field (openingTag) - if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for openingTag") - } - _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) - if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for openingTag") - } - if _openingTagErr != nil { - return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") - } + // Simple Field (openingTag) + if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for openingTag") + } + _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) + if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for openingTag") + } + if _openingTagErr != nil { + return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") + } - // Simple Field (minNormalValue) - if pushErr := writeBuffer.PushContext("minNormalValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for minNormalValue") - } - _minNormalValueErr := writeBuffer.WriteSerializable(ctx, m.GetMinNormalValue()) - if popErr := writeBuffer.PopContext("minNormalValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for minNormalValue") - } - if _minNormalValueErr != nil { - return errors.Wrap(_minNormalValueErr, "Error serializing 'minNormalValue' field") - } + // Simple Field (minNormalValue) + if pushErr := writeBuffer.PushContext("minNormalValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for minNormalValue") + } + _minNormalValueErr := writeBuffer.WriteSerializable(ctx, m.GetMinNormalValue()) + if popErr := writeBuffer.PopContext("minNormalValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for minNormalValue") + } + if _minNormalValueErr != nil { + return errors.Wrap(_minNormalValueErr, "Error serializing 'minNormalValue' field") + } - // Simple Field (maxNormalValue) - if pushErr := writeBuffer.PushContext("maxNormalValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for maxNormalValue") - } - _maxNormalValueErr := writeBuffer.WriteSerializable(ctx, m.GetMaxNormalValue()) - if popErr := writeBuffer.PopContext("maxNormalValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for maxNormalValue") - } - if _maxNormalValueErr != nil { - return errors.Wrap(_maxNormalValueErr, "Error serializing 'maxNormalValue' field") - } + // Simple Field (maxNormalValue) + if pushErr := writeBuffer.PushContext("maxNormalValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for maxNormalValue") + } + _maxNormalValueErr := writeBuffer.WriteSerializable(ctx, m.GetMaxNormalValue()) + if popErr := writeBuffer.PopContext("maxNormalValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for maxNormalValue") + } + if _maxNormalValueErr != nil { + return errors.Wrap(_maxNormalValueErr, "Error serializing 'maxNormalValue' field") + } - // Simple Field (closingTag) - if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for closingTag") - } - _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) - if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for closingTag") - } - if _closingTagErr != nil { - return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") - } + // Simple Field (closingTag) + if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for closingTag") + } + _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) + if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for closingTag") + } + if _closingTagErr != nil { + return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") + } if popErr := writeBuffer.PopContext("BACnetFaultParameterFaultOutOfRange"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetFaultParameterFaultOutOfRange") @@ -305,6 +310,7 @@ func (m *_BACnetFaultParameterFaultOutOfRange) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetFaultParameterFaultOutOfRange) isBACnetFaultParameterFaultOutOfRange() bool { return true } @@ -319,3 +325,6 @@ func (m *_BACnetFaultParameterFaultOutOfRange) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRangeMaxNormalValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRangeMaxNormalValue.go index 399c9b0fdd2..29f9d9a898f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRangeMaxNormalValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRangeMaxNormalValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetFaultParameterFaultOutOfRangeMaxNormalValue is the corresponding interface of BACnetFaultParameterFaultOutOfRangeMaxNormalValue type BACnetFaultParameterFaultOutOfRangeMaxNormalValue interface { @@ -51,9 +53,9 @@ type BACnetFaultParameterFaultOutOfRangeMaxNormalValueExactly interface { // _BACnetFaultParameterFaultOutOfRangeMaxNormalValue is the data-structure of this message type _BACnetFaultParameterFaultOutOfRangeMaxNormalValue struct { _BACnetFaultParameterFaultOutOfRangeMaxNormalValueChildRequirements - OpeningTag BACnetOpeningTag - PeekedTagHeader BACnetTagHeader - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + PeekedTagHeader BACnetTagHeader + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 @@ -64,6 +66,7 @@ type _BACnetFaultParameterFaultOutOfRangeMaxNormalValueChildRequirements interfa GetLengthInBits(ctx context.Context) uint16 } + type BACnetFaultParameterFaultOutOfRangeMaxNormalValueParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetFaultParameterFaultOutOfRangeMaxNormalValue, serializeChildFunction func() error) error GetTypeName() string @@ -71,13 +74,12 @@ type BACnetFaultParameterFaultOutOfRangeMaxNormalValueParent interface { type BACnetFaultParameterFaultOutOfRangeMaxNormalValueChild interface { utils.Serializable - InitializeParent(parent BACnetFaultParameterFaultOutOfRangeMaxNormalValue, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) +InitializeParent(parent BACnetFaultParameterFaultOutOfRangeMaxNormalValue , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) GetParent() *BACnetFaultParameterFaultOutOfRangeMaxNormalValue GetTypeName() string BACnetFaultParameterFaultOutOfRangeMaxNormalValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -115,14 +117,15 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValue) GetPeekedTagNumber( /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetFaultParameterFaultOutOfRangeMaxNormalValue factory function for _BACnetFaultParameterFaultOutOfRangeMaxNormalValue -func NewBACnetFaultParameterFaultOutOfRangeMaxNormalValue(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetFaultParameterFaultOutOfRangeMaxNormalValue { - return &_BACnetFaultParameterFaultOutOfRangeMaxNormalValue{OpeningTag: openingTag, PeekedTagHeader: peekedTagHeader, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetFaultParameterFaultOutOfRangeMaxNormalValue( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetFaultParameterFaultOutOfRangeMaxNormalValue { +return &_BACnetFaultParameterFaultOutOfRangeMaxNormalValue{ OpeningTag: openingTag , PeekedTagHeader: peekedTagHeader , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetFaultParameterFaultOutOfRangeMaxNormalValue(structType interface{}) BACnetFaultParameterFaultOutOfRangeMaxNormalValue { - if casted, ok := structType.(BACnetFaultParameterFaultOutOfRangeMaxNormalValue); ok { + if casted, ok := structType.(BACnetFaultParameterFaultOutOfRangeMaxNormalValue); ok { return casted } if casted, ok := structType.(*BACnetFaultParameterFaultOutOfRangeMaxNormalValue); ok { @@ -135,6 +138,7 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValue) GetTypeName() strin return "BACnetFaultParameterFaultOutOfRangeMaxNormalValue" } + func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValue) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -170,7 +174,7 @@ func BACnetFaultParameterFaultOutOfRangeMaxNormalValueParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetFaultParameterFaultOutOfRangeMaxNormalValue") } @@ -179,13 +183,13 @@ func BACnetFaultParameterFaultOutOfRangeMaxNormalValueParseWithBuffer(ctx contex return nil, errors.Wrap(closeErr, "Error closing for openingTag") } - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Virtual field _peekedTagNumber := peekedTagHeader.GetActualTagNumber() @@ -193,27 +197,27 @@ func BACnetFaultParameterFaultOutOfRangeMaxNormalValueParseWithBuffer(ctx contex _ = peekedTagNumber // Validation - if !(bool((peekedTagHeader.GetTagClass()) == (TagClass_APPLICATION_TAGS))) { + if (!(bool((peekedTagHeader.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) { return nil, errors.WithStack(utils.ParseValidationError{"only application tags allowed"}) } // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetFaultParameterFaultOutOfRangeMaxNormalValueChildSerializeRequirement interface { BACnetFaultParameterFaultOutOfRangeMaxNormalValue - InitializeParent(BACnetFaultParameterFaultOutOfRangeMaxNormalValue, BACnetOpeningTag, BACnetTagHeader, BACnetClosingTag) + InitializeParent(BACnetFaultParameterFaultOutOfRangeMaxNormalValue, BACnetOpeningTag, BACnetTagHeader, BACnetClosingTag) GetParent() BACnetFaultParameterFaultOutOfRangeMaxNormalValue } var _childTemp interface{} var _child BACnetFaultParameterFaultOutOfRangeMaxNormalValueChildSerializeRequirement var typeSwitchError error switch { - case peekedTagNumber == 0x4: // BACnetFaultParameterFaultOutOfRangeMaxNormalValueReal +case peekedTagNumber == 0x4 : // BACnetFaultParameterFaultOutOfRangeMaxNormalValueReal _childTemp, typeSwitchError = BACnetFaultParameterFaultOutOfRangeMaxNormalValueRealParseWithBuffer(ctx, readBuffer, tagNumber) - case peekedTagNumber == 0x2: // BACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned +case peekedTagNumber == 0x2 : // BACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned _childTemp, typeSwitchError = BACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsignedParseWithBuffer(ctx, readBuffer, tagNumber) - case peekedTagNumber == 0x5: // BACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble +case peekedTagNumber == 0x5 : // BACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble _childTemp, typeSwitchError = BACnetFaultParameterFaultOutOfRangeMaxNormalValueDoubleParseWithBuffer(ctx, readBuffer, tagNumber) - case peekedTagNumber == 0x3: // BACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger +case peekedTagNumber == 0x3 : // BACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger _childTemp, typeSwitchError = BACnetFaultParameterFaultOutOfRangeMaxNormalValueIntegerParseWithBuffer(ctx, readBuffer, tagNumber) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedTagNumber=%v]", peekedTagNumber) @@ -227,7 +231,7 @@ func BACnetFaultParameterFaultOutOfRangeMaxNormalValueParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetFaultParameterFaultOutOfRangeMaxNormalValue") } @@ -241,7 +245,7 @@ func BACnetFaultParameterFaultOutOfRangeMaxNormalValueParseWithBuffer(ctx contex } // Finish initializing - _child.InitializeParent(_child, openingTag, peekedTagHeader, closingTag) +_child.InitializeParent(_child , openingTag , peekedTagHeader , closingTag ) return _child, nil } @@ -251,7 +255,7 @@ func (pm *_BACnetFaultParameterFaultOutOfRangeMaxNormalValue) SerializeParent(ct _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetFaultParameterFaultOutOfRangeMaxNormalValue"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetFaultParameterFaultOutOfRangeMaxNormalValue"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetFaultParameterFaultOutOfRangeMaxNormalValue") } @@ -294,13 +298,13 @@ func (pm *_BACnetFaultParameterFaultOutOfRangeMaxNormalValue) SerializeParent(ct return nil } + //// // Arguments Getter func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValue) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -318,3 +322,6 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble.go index 93aebb8070b..b33868da62f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble is the corresponding interface of BACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble type BACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble interface { @@ -46,9 +48,11 @@ type BACnetFaultParameterFaultOutOfRangeMaxNormalValueDoubleExactly interface { // _BACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble is the data-structure of this message type _BACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble struct { *_BACnetFaultParameterFaultOutOfRangeMaxNormalValue - DoubleValue BACnetApplicationTagDouble + DoubleValue BACnetApplicationTagDouble } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,16 +63,14 @@ type _BACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble) InitializeParent(parent BACnetFaultParameterFaultOutOfRangeMaxNormalValue, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble) InitializeParent(parent BACnetFaultParameterFaultOutOfRangeMaxNormalValue , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble) GetParent() BACnetFaultParameterFaultOutOfRangeMaxNormalValue { +func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble) GetParent() BACnetFaultParameterFaultOutOfRangeMaxNormalValue { return m._BACnetFaultParameterFaultOutOfRangeMaxNormalValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble) GetDoubleValu /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble factory function for _BACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble -func NewBACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble(doubleValue BACnetApplicationTagDouble, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble { +func NewBACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble( doubleValue BACnetApplicationTagDouble , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble { _result := &_BACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble{ DoubleValue: doubleValue, - _BACnetFaultParameterFaultOutOfRangeMaxNormalValue: NewBACnetFaultParameterFaultOutOfRangeMaxNormalValue(openingTag, peekedTagHeader, closingTag, tagNumber), + _BACnetFaultParameterFaultOutOfRangeMaxNormalValue: NewBACnetFaultParameterFaultOutOfRangeMaxNormalValue(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetFaultParameterFaultOutOfRangeMaxNormalValue._BACnetFaultParameterFaultOutOfRangeMaxNormalValueChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble(doubleValue BACn // Deprecated: use the interface for direct cast func CastBACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble(structType interface{}) BACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble { - if casted, ok := structType.(BACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble); ok { + if casted, ok := structType.(BACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble); ok { return casted } if casted, ok := structType.(*BACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble); ok { @@ -117,6 +120,7 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble) GetLengthInBi return lengthInBits } + func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetFaultParameterFaultOutOfRangeMaxNormalValueDoubleParseWithBuffer(ctx if pullErr := readBuffer.PullContext("doubleValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for doubleValue") } - _doubleValue, _doubleValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_doubleValue, _doubleValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _doubleValueErr != nil { return nil, errors.Wrap(_doubleValueErr, "Error parsing 'doubleValue' field of BACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble") } @@ -178,17 +182,17 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble) SerializeWith return errors.Wrap(pushErr, "Error pushing for BACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble") } - // Simple Field (doubleValue) - if pushErr := writeBuffer.PushContext("doubleValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for doubleValue") - } - _doubleValueErr := writeBuffer.WriteSerializable(ctx, m.GetDoubleValue()) - if popErr := writeBuffer.PopContext("doubleValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for doubleValue") - } - if _doubleValueErr != nil { - return errors.Wrap(_doubleValueErr, "Error serializing 'doubleValue' field") - } + // Simple Field (doubleValue) + if pushErr := writeBuffer.PushContext("doubleValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for doubleValue") + } + _doubleValueErr := writeBuffer.WriteSerializable(ctx, m.GetDoubleValue()) + if popErr := writeBuffer.PopContext("doubleValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for doubleValue") + } + if _doubleValueErr != nil { + return errors.Wrap(_doubleValueErr, "Error serializing 'doubleValue' field") + } if popErr := writeBuffer.PopContext("BACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble") @@ -198,6 +202,7 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble) SerializeWith return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble) isBACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueDouble) String() stri } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger.go index bc50003b8d6..ca19c998b1b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger is the corresponding interface of BACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger type BACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger interface { @@ -46,9 +48,11 @@ type BACnetFaultParameterFaultOutOfRangeMaxNormalValueIntegerExactly interface { // _BACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger is the data-structure of this message type _BACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger struct { *_BACnetFaultParameterFaultOutOfRangeMaxNormalValue - IntegerValue BACnetApplicationTagSignedInteger + IntegerValue BACnetApplicationTagSignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,16 +63,14 @@ type _BACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger) InitializeParent(parent BACnetFaultParameterFaultOutOfRangeMaxNormalValue, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger) InitializeParent(parent BACnetFaultParameterFaultOutOfRangeMaxNormalValue , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger) GetParent() BACnetFaultParameterFaultOutOfRangeMaxNormalValue { +func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger) GetParent() BACnetFaultParameterFaultOutOfRangeMaxNormalValue { return m._BACnetFaultParameterFaultOutOfRangeMaxNormalValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger) GetIntegerVa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger factory function for _BACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger -func NewBACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger(integerValue BACnetApplicationTagSignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger { +func NewBACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger( integerValue BACnetApplicationTagSignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger { _result := &_BACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger{ IntegerValue: integerValue, - _BACnetFaultParameterFaultOutOfRangeMaxNormalValue: NewBACnetFaultParameterFaultOutOfRangeMaxNormalValue(openingTag, peekedTagHeader, closingTag, tagNumber), + _BACnetFaultParameterFaultOutOfRangeMaxNormalValue: NewBACnetFaultParameterFaultOutOfRangeMaxNormalValue(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetFaultParameterFaultOutOfRangeMaxNormalValue._BACnetFaultParameterFaultOutOfRangeMaxNormalValueChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger(integerValue BA // Deprecated: use the interface for direct cast func CastBACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger(structType interface{}) BACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger { - if casted, ok := structType.(BACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger); ok { + if casted, ok := structType.(BACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger); ok { return casted } if casted, ok := structType.(*BACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger); ok { @@ -117,6 +120,7 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger) GetLengthInB return lengthInBits } + func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetFaultParameterFaultOutOfRangeMaxNormalValueIntegerParseWithBuffer(ctx if pullErr := readBuffer.PullContext("integerValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for integerValue") } - _integerValue, _integerValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_integerValue, _integerValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _integerValueErr != nil { return nil, errors.Wrap(_integerValueErr, "Error parsing 'integerValue' field of BACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger") } @@ -178,17 +182,17 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger) SerializeWit return errors.Wrap(pushErr, "Error pushing for BACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger") } - // Simple Field (integerValue) - if pushErr := writeBuffer.PushContext("integerValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for integerValue") - } - _integerValueErr := writeBuffer.WriteSerializable(ctx, m.GetIntegerValue()) - if popErr := writeBuffer.PopContext("integerValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for integerValue") - } - if _integerValueErr != nil { - return errors.Wrap(_integerValueErr, "Error serializing 'integerValue' field") - } + // Simple Field (integerValue) + if pushErr := writeBuffer.PushContext("integerValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for integerValue") + } + _integerValueErr := writeBuffer.WriteSerializable(ctx, m.GetIntegerValue()) + if popErr := writeBuffer.PopContext("integerValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for integerValue") + } + if _integerValueErr != nil { + return errors.Wrap(_integerValueErr, "Error serializing 'integerValue' field") + } if popErr := writeBuffer.PopContext("BACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger") @@ -198,6 +202,7 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger) SerializeWit return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger) isBACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueInteger) String() str } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRangeMaxNormalValueReal.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRangeMaxNormalValueReal.go index f9add89b92b..ddfb75003d5 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRangeMaxNormalValueReal.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRangeMaxNormalValueReal.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetFaultParameterFaultOutOfRangeMaxNormalValueReal is the corresponding interface of BACnetFaultParameterFaultOutOfRangeMaxNormalValueReal type BACnetFaultParameterFaultOutOfRangeMaxNormalValueReal interface { @@ -46,9 +48,11 @@ type BACnetFaultParameterFaultOutOfRangeMaxNormalValueRealExactly interface { // _BACnetFaultParameterFaultOutOfRangeMaxNormalValueReal is the data-structure of this message type _BACnetFaultParameterFaultOutOfRangeMaxNormalValueReal struct { *_BACnetFaultParameterFaultOutOfRangeMaxNormalValue - RealValue BACnetApplicationTagReal + RealValue BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,16 +63,14 @@ type _BACnetFaultParameterFaultOutOfRangeMaxNormalValueReal struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueReal) InitializeParent(parent BACnetFaultParameterFaultOutOfRangeMaxNormalValue, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueReal) InitializeParent(parent BACnetFaultParameterFaultOutOfRangeMaxNormalValue , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueReal) GetParent() BACnetFaultParameterFaultOutOfRangeMaxNormalValue { +func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueReal) GetParent() BACnetFaultParameterFaultOutOfRangeMaxNormalValue { return m._BACnetFaultParameterFaultOutOfRangeMaxNormalValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueReal) GetRealValue() /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetFaultParameterFaultOutOfRangeMaxNormalValueReal factory function for _BACnetFaultParameterFaultOutOfRangeMaxNormalValueReal -func NewBACnetFaultParameterFaultOutOfRangeMaxNormalValueReal(realValue BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueReal { +func NewBACnetFaultParameterFaultOutOfRangeMaxNormalValueReal( realValue BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueReal { _result := &_BACnetFaultParameterFaultOutOfRangeMaxNormalValueReal{ RealValue: realValue, - _BACnetFaultParameterFaultOutOfRangeMaxNormalValue: NewBACnetFaultParameterFaultOutOfRangeMaxNormalValue(openingTag, peekedTagHeader, closingTag, tagNumber), + _BACnetFaultParameterFaultOutOfRangeMaxNormalValue: NewBACnetFaultParameterFaultOutOfRangeMaxNormalValue(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetFaultParameterFaultOutOfRangeMaxNormalValue._BACnetFaultParameterFaultOutOfRangeMaxNormalValueChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetFaultParameterFaultOutOfRangeMaxNormalValueReal(realValue BACnetAp // Deprecated: use the interface for direct cast func CastBACnetFaultParameterFaultOutOfRangeMaxNormalValueReal(structType interface{}) BACnetFaultParameterFaultOutOfRangeMaxNormalValueReal { - if casted, ok := structType.(BACnetFaultParameterFaultOutOfRangeMaxNormalValueReal); ok { + if casted, ok := structType.(BACnetFaultParameterFaultOutOfRangeMaxNormalValueReal); ok { return casted } if casted, ok := structType.(*BACnetFaultParameterFaultOutOfRangeMaxNormalValueReal); ok { @@ -117,6 +120,7 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueReal) GetLengthInBits return lengthInBits } + func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueReal) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetFaultParameterFaultOutOfRangeMaxNormalValueRealParseWithBuffer(ctx co if pullErr := readBuffer.PullContext("realValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for realValue") } - _realValue, _realValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_realValue, _realValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _realValueErr != nil { return nil, errors.Wrap(_realValueErr, "Error parsing 'realValue' field of BACnetFaultParameterFaultOutOfRangeMaxNormalValueReal") } @@ -178,17 +182,17 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueReal) SerializeWithWr return errors.Wrap(pushErr, "Error pushing for BACnetFaultParameterFaultOutOfRangeMaxNormalValueReal") } - // Simple Field (realValue) - if pushErr := writeBuffer.PushContext("realValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for realValue") - } - _realValueErr := writeBuffer.WriteSerializable(ctx, m.GetRealValue()) - if popErr := writeBuffer.PopContext("realValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for realValue") - } - if _realValueErr != nil { - return errors.Wrap(_realValueErr, "Error serializing 'realValue' field") - } + // Simple Field (realValue) + if pushErr := writeBuffer.PushContext("realValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for realValue") + } + _realValueErr := writeBuffer.WriteSerializable(ctx, m.GetRealValue()) + if popErr := writeBuffer.PopContext("realValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for realValue") + } + if _realValueErr != nil { + return errors.Wrap(_realValueErr, "Error serializing 'realValue' field") + } if popErr := writeBuffer.PopContext("BACnetFaultParameterFaultOutOfRangeMaxNormalValueReal"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetFaultParameterFaultOutOfRangeMaxNormalValueReal") @@ -198,6 +202,7 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueReal) SerializeWithWr return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueReal) isBACnetFaultParameterFaultOutOfRangeMaxNormalValueReal() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueReal) String() string } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned.go index f103642a635..9aa1e5f1e9a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned is the corresponding interface of BACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned type BACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned interface { @@ -46,9 +48,11 @@ type BACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsignedExactly interface // _BACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned is the data-structure of this message type _BACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned struct { *_BACnetFaultParameterFaultOutOfRangeMaxNormalValue - UnsignedValue BACnetApplicationTagUnsignedInteger + UnsignedValue BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,16 +63,14 @@ type _BACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned) InitializeParent(parent BACnetFaultParameterFaultOutOfRangeMaxNormalValue, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned) InitializeParent(parent BACnetFaultParameterFaultOutOfRangeMaxNormalValue , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned) GetParent() BACnetFaultParameterFaultOutOfRangeMaxNormalValue { +func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned) GetParent() BACnetFaultParameterFaultOutOfRangeMaxNormalValue { return m._BACnetFaultParameterFaultOutOfRangeMaxNormalValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned) GetUnsigned /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned factory function for _BACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned -func NewBACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned(unsignedValue BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned { +func NewBACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned( unsignedValue BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned { _result := &_BACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned{ UnsignedValue: unsignedValue, - _BACnetFaultParameterFaultOutOfRangeMaxNormalValue: NewBACnetFaultParameterFaultOutOfRangeMaxNormalValue(openingTag, peekedTagHeader, closingTag, tagNumber), + _BACnetFaultParameterFaultOutOfRangeMaxNormalValue: NewBACnetFaultParameterFaultOutOfRangeMaxNormalValue(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetFaultParameterFaultOutOfRangeMaxNormalValue._BACnetFaultParameterFaultOutOfRangeMaxNormalValueChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned(unsignedValue // Deprecated: use the interface for direct cast func CastBACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned(structType interface{}) BACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned { - if casted, ok := structType.(BACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned); ok { + if casted, ok := structType.(BACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned); ok { return casted } if casted, ok := structType.(*BACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned); ok { @@ -117,6 +120,7 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned) GetLengthIn return lengthInBits } + func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsignedParseWithBuffer(ct if pullErr := readBuffer.PullContext("unsignedValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for unsignedValue") } - _unsignedValue, _unsignedValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_unsignedValue, _unsignedValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _unsignedValueErr != nil { return nil, errors.Wrap(_unsignedValueErr, "Error parsing 'unsignedValue' field of BACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned") } @@ -178,17 +182,17 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned) SerializeWi return errors.Wrap(pushErr, "Error pushing for BACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned") } - // Simple Field (unsignedValue) - if pushErr := writeBuffer.PushContext("unsignedValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for unsignedValue") - } - _unsignedValueErr := writeBuffer.WriteSerializable(ctx, m.GetUnsignedValue()) - if popErr := writeBuffer.PopContext("unsignedValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for unsignedValue") - } - if _unsignedValueErr != nil { - return errors.Wrap(_unsignedValueErr, "Error serializing 'unsignedValue' field") - } + // Simple Field (unsignedValue) + if pushErr := writeBuffer.PushContext("unsignedValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for unsignedValue") + } + _unsignedValueErr := writeBuffer.WriteSerializable(ctx, m.GetUnsignedValue()) + if popErr := writeBuffer.PopContext("unsignedValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for unsignedValue") + } + if _unsignedValueErr != nil { + return errors.Wrap(_unsignedValueErr, "Error serializing 'unsignedValue' field") + } if popErr := writeBuffer.PopContext("BACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned") @@ -198,6 +202,7 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned) SerializeWi return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned) isBACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMaxNormalValueUnsigned) String() st } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRangeMinNormalValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRangeMinNormalValue.go index d50cdc8979f..dfb3fc16bea 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRangeMinNormalValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRangeMinNormalValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetFaultParameterFaultOutOfRangeMinNormalValue is the corresponding interface of BACnetFaultParameterFaultOutOfRangeMinNormalValue type BACnetFaultParameterFaultOutOfRangeMinNormalValue interface { @@ -51,9 +53,9 @@ type BACnetFaultParameterFaultOutOfRangeMinNormalValueExactly interface { // _BACnetFaultParameterFaultOutOfRangeMinNormalValue is the data-structure of this message type _BACnetFaultParameterFaultOutOfRangeMinNormalValue struct { _BACnetFaultParameterFaultOutOfRangeMinNormalValueChildRequirements - OpeningTag BACnetOpeningTag - PeekedTagHeader BACnetTagHeader - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + PeekedTagHeader BACnetTagHeader + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 @@ -64,6 +66,7 @@ type _BACnetFaultParameterFaultOutOfRangeMinNormalValueChildRequirements interfa GetLengthInBits(ctx context.Context) uint16 } + type BACnetFaultParameterFaultOutOfRangeMinNormalValueParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetFaultParameterFaultOutOfRangeMinNormalValue, serializeChildFunction func() error) error GetTypeName() string @@ -71,13 +74,12 @@ type BACnetFaultParameterFaultOutOfRangeMinNormalValueParent interface { type BACnetFaultParameterFaultOutOfRangeMinNormalValueChild interface { utils.Serializable - InitializeParent(parent BACnetFaultParameterFaultOutOfRangeMinNormalValue, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) +InitializeParent(parent BACnetFaultParameterFaultOutOfRangeMinNormalValue , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) GetParent() *BACnetFaultParameterFaultOutOfRangeMinNormalValue GetTypeName() string BACnetFaultParameterFaultOutOfRangeMinNormalValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -115,14 +117,15 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValue) GetPeekedTagNumber( /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetFaultParameterFaultOutOfRangeMinNormalValue factory function for _BACnetFaultParameterFaultOutOfRangeMinNormalValue -func NewBACnetFaultParameterFaultOutOfRangeMinNormalValue(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetFaultParameterFaultOutOfRangeMinNormalValue { - return &_BACnetFaultParameterFaultOutOfRangeMinNormalValue{OpeningTag: openingTag, PeekedTagHeader: peekedTagHeader, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetFaultParameterFaultOutOfRangeMinNormalValue( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetFaultParameterFaultOutOfRangeMinNormalValue { +return &_BACnetFaultParameterFaultOutOfRangeMinNormalValue{ OpeningTag: openingTag , PeekedTagHeader: peekedTagHeader , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetFaultParameterFaultOutOfRangeMinNormalValue(structType interface{}) BACnetFaultParameterFaultOutOfRangeMinNormalValue { - if casted, ok := structType.(BACnetFaultParameterFaultOutOfRangeMinNormalValue); ok { + if casted, ok := structType.(BACnetFaultParameterFaultOutOfRangeMinNormalValue); ok { return casted } if casted, ok := structType.(*BACnetFaultParameterFaultOutOfRangeMinNormalValue); ok { @@ -135,6 +138,7 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValue) GetTypeName() strin return "BACnetFaultParameterFaultOutOfRangeMinNormalValue" } + func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValue) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -170,7 +174,7 @@ func BACnetFaultParameterFaultOutOfRangeMinNormalValueParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetFaultParameterFaultOutOfRangeMinNormalValue") } @@ -179,13 +183,13 @@ func BACnetFaultParameterFaultOutOfRangeMinNormalValueParseWithBuffer(ctx contex return nil, errors.Wrap(closeErr, "Error closing for openingTag") } - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Virtual field _peekedTagNumber := peekedTagHeader.GetActualTagNumber() @@ -193,27 +197,27 @@ func BACnetFaultParameterFaultOutOfRangeMinNormalValueParseWithBuffer(ctx contex _ = peekedTagNumber // Validation - if !(bool((peekedTagHeader.GetTagClass()) == (TagClass_APPLICATION_TAGS))) { + if (!(bool((peekedTagHeader.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) { return nil, errors.WithStack(utils.ParseValidationError{"only application tags allowed"}) } // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetFaultParameterFaultOutOfRangeMinNormalValueChildSerializeRequirement interface { BACnetFaultParameterFaultOutOfRangeMinNormalValue - InitializeParent(BACnetFaultParameterFaultOutOfRangeMinNormalValue, BACnetOpeningTag, BACnetTagHeader, BACnetClosingTag) + InitializeParent(BACnetFaultParameterFaultOutOfRangeMinNormalValue, BACnetOpeningTag, BACnetTagHeader, BACnetClosingTag) GetParent() BACnetFaultParameterFaultOutOfRangeMinNormalValue } var _childTemp interface{} var _child BACnetFaultParameterFaultOutOfRangeMinNormalValueChildSerializeRequirement var typeSwitchError error switch { - case peekedTagNumber == 0x4: // BACnetFaultParameterFaultOutOfRangeMinNormalValueReal +case peekedTagNumber == 0x4 : // BACnetFaultParameterFaultOutOfRangeMinNormalValueReal _childTemp, typeSwitchError = BACnetFaultParameterFaultOutOfRangeMinNormalValueRealParseWithBuffer(ctx, readBuffer, tagNumber) - case peekedTagNumber == 0x2: // BACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned +case peekedTagNumber == 0x2 : // BACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned _childTemp, typeSwitchError = BACnetFaultParameterFaultOutOfRangeMinNormalValueUnsignedParseWithBuffer(ctx, readBuffer, tagNumber) - case peekedTagNumber == 0x5: // BACnetFaultParameterFaultOutOfRangeMinNormalValueDouble +case peekedTagNumber == 0x5 : // BACnetFaultParameterFaultOutOfRangeMinNormalValueDouble _childTemp, typeSwitchError = BACnetFaultParameterFaultOutOfRangeMinNormalValueDoubleParseWithBuffer(ctx, readBuffer, tagNumber) - case peekedTagNumber == 0x3: // BACnetFaultParameterFaultOutOfRangeMinNormalValueInteger +case peekedTagNumber == 0x3 : // BACnetFaultParameterFaultOutOfRangeMinNormalValueInteger _childTemp, typeSwitchError = BACnetFaultParameterFaultOutOfRangeMinNormalValueIntegerParseWithBuffer(ctx, readBuffer, tagNumber) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedTagNumber=%v]", peekedTagNumber) @@ -227,7 +231,7 @@ func BACnetFaultParameterFaultOutOfRangeMinNormalValueParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetFaultParameterFaultOutOfRangeMinNormalValue") } @@ -241,7 +245,7 @@ func BACnetFaultParameterFaultOutOfRangeMinNormalValueParseWithBuffer(ctx contex } // Finish initializing - _child.InitializeParent(_child, openingTag, peekedTagHeader, closingTag) +_child.InitializeParent(_child , openingTag , peekedTagHeader , closingTag ) return _child, nil } @@ -251,7 +255,7 @@ func (pm *_BACnetFaultParameterFaultOutOfRangeMinNormalValue) SerializeParent(ct _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetFaultParameterFaultOutOfRangeMinNormalValue"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetFaultParameterFaultOutOfRangeMinNormalValue"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetFaultParameterFaultOutOfRangeMinNormalValue") } @@ -294,13 +298,13 @@ func (pm *_BACnetFaultParameterFaultOutOfRangeMinNormalValue) SerializeParent(ct return nil } + //// // Arguments Getter func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValue) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -318,3 +322,6 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRangeMinNormalValueDouble.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRangeMinNormalValueDouble.go index 3e0b5db3073..6448bd2495b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRangeMinNormalValueDouble.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRangeMinNormalValueDouble.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetFaultParameterFaultOutOfRangeMinNormalValueDouble is the corresponding interface of BACnetFaultParameterFaultOutOfRangeMinNormalValueDouble type BACnetFaultParameterFaultOutOfRangeMinNormalValueDouble interface { @@ -46,9 +48,11 @@ type BACnetFaultParameterFaultOutOfRangeMinNormalValueDoubleExactly interface { // _BACnetFaultParameterFaultOutOfRangeMinNormalValueDouble is the data-structure of this message type _BACnetFaultParameterFaultOutOfRangeMinNormalValueDouble struct { *_BACnetFaultParameterFaultOutOfRangeMinNormalValue - DoubleValue BACnetApplicationTagDouble + DoubleValue BACnetApplicationTagDouble } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,16 +63,14 @@ type _BACnetFaultParameterFaultOutOfRangeMinNormalValueDouble struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueDouble) InitializeParent(parent BACnetFaultParameterFaultOutOfRangeMinNormalValue, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueDouble) InitializeParent(parent BACnetFaultParameterFaultOutOfRangeMinNormalValue , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueDouble) GetParent() BACnetFaultParameterFaultOutOfRangeMinNormalValue { +func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueDouble) GetParent() BACnetFaultParameterFaultOutOfRangeMinNormalValue { return m._BACnetFaultParameterFaultOutOfRangeMinNormalValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueDouble) GetDoubleValu /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetFaultParameterFaultOutOfRangeMinNormalValueDouble factory function for _BACnetFaultParameterFaultOutOfRangeMinNormalValueDouble -func NewBACnetFaultParameterFaultOutOfRangeMinNormalValueDouble(doubleValue BACnetApplicationTagDouble, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetFaultParameterFaultOutOfRangeMinNormalValueDouble { +func NewBACnetFaultParameterFaultOutOfRangeMinNormalValueDouble( doubleValue BACnetApplicationTagDouble , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetFaultParameterFaultOutOfRangeMinNormalValueDouble { _result := &_BACnetFaultParameterFaultOutOfRangeMinNormalValueDouble{ DoubleValue: doubleValue, - _BACnetFaultParameterFaultOutOfRangeMinNormalValue: NewBACnetFaultParameterFaultOutOfRangeMinNormalValue(openingTag, peekedTagHeader, closingTag, tagNumber), + _BACnetFaultParameterFaultOutOfRangeMinNormalValue: NewBACnetFaultParameterFaultOutOfRangeMinNormalValue(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetFaultParameterFaultOutOfRangeMinNormalValue._BACnetFaultParameterFaultOutOfRangeMinNormalValueChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetFaultParameterFaultOutOfRangeMinNormalValueDouble(doubleValue BACn // Deprecated: use the interface for direct cast func CastBACnetFaultParameterFaultOutOfRangeMinNormalValueDouble(structType interface{}) BACnetFaultParameterFaultOutOfRangeMinNormalValueDouble { - if casted, ok := structType.(BACnetFaultParameterFaultOutOfRangeMinNormalValueDouble); ok { + if casted, ok := structType.(BACnetFaultParameterFaultOutOfRangeMinNormalValueDouble); ok { return casted } if casted, ok := structType.(*BACnetFaultParameterFaultOutOfRangeMinNormalValueDouble); ok { @@ -117,6 +120,7 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueDouble) GetLengthInBi return lengthInBits } + func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueDouble) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetFaultParameterFaultOutOfRangeMinNormalValueDoubleParseWithBuffer(ctx if pullErr := readBuffer.PullContext("doubleValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for doubleValue") } - _doubleValue, _doubleValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_doubleValue, _doubleValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _doubleValueErr != nil { return nil, errors.Wrap(_doubleValueErr, "Error parsing 'doubleValue' field of BACnetFaultParameterFaultOutOfRangeMinNormalValueDouble") } @@ -178,17 +182,17 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueDouble) SerializeWith return errors.Wrap(pushErr, "Error pushing for BACnetFaultParameterFaultOutOfRangeMinNormalValueDouble") } - // Simple Field (doubleValue) - if pushErr := writeBuffer.PushContext("doubleValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for doubleValue") - } - _doubleValueErr := writeBuffer.WriteSerializable(ctx, m.GetDoubleValue()) - if popErr := writeBuffer.PopContext("doubleValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for doubleValue") - } - if _doubleValueErr != nil { - return errors.Wrap(_doubleValueErr, "Error serializing 'doubleValue' field") - } + // Simple Field (doubleValue) + if pushErr := writeBuffer.PushContext("doubleValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for doubleValue") + } + _doubleValueErr := writeBuffer.WriteSerializable(ctx, m.GetDoubleValue()) + if popErr := writeBuffer.PopContext("doubleValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for doubleValue") + } + if _doubleValueErr != nil { + return errors.Wrap(_doubleValueErr, "Error serializing 'doubleValue' field") + } if popErr := writeBuffer.PopContext("BACnetFaultParameterFaultOutOfRangeMinNormalValueDouble"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetFaultParameterFaultOutOfRangeMinNormalValueDouble") @@ -198,6 +202,7 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueDouble) SerializeWith return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueDouble) isBACnetFaultParameterFaultOutOfRangeMinNormalValueDouble() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueDouble) String() stri } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRangeMinNormalValueInteger.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRangeMinNormalValueInteger.go index f6466a0b409..6b2179646f9 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRangeMinNormalValueInteger.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRangeMinNormalValueInteger.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetFaultParameterFaultOutOfRangeMinNormalValueInteger is the corresponding interface of BACnetFaultParameterFaultOutOfRangeMinNormalValueInteger type BACnetFaultParameterFaultOutOfRangeMinNormalValueInteger interface { @@ -46,9 +48,11 @@ type BACnetFaultParameterFaultOutOfRangeMinNormalValueIntegerExactly interface { // _BACnetFaultParameterFaultOutOfRangeMinNormalValueInteger is the data-structure of this message type _BACnetFaultParameterFaultOutOfRangeMinNormalValueInteger struct { *_BACnetFaultParameterFaultOutOfRangeMinNormalValue - IntegerValue BACnetApplicationTagSignedInteger + IntegerValue BACnetApplicationTagSignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,16 +63,14 @@ type _BACnetFaultParameterFaultOutOfRangeMinNormalValueInteger struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueInteger) InitializeParent(parent BACnetFaultParameterFaultOutOfRangeMinNormalValue, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueInteger) InitializeParent(parent BACnetFaultParameterFaultOutOfRangeMinNormalValue , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueInteger) GetParent() BACnetFaultParameterFaultOutOfRangeMinNormalValue { +func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueInteger) GetParent() BACnetFaultParameterFaultOutOfRangeMinNormalValue { return m._BACnetFaultParameterFaultOutOfRangeMinNormalValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueInteger) GetIntegerVa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetFaultParameterFaultOutOfRangeMinNormalValueInteger factory function for _BACnetFaultParameterFaultOutOfRangeMinNormalValueInteger -func NewBACnetFaultParameterFaultOutOfRangeMinNormalValueInteger(integerValue BACnetApplicationTagSignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetFaultParameterFaultOutOfRangeMinNormalValueInteger { +func NewBACnetFaultParameterFaultOutOfRangeMinNormalValueInteger( integerValue BACnetApplicationTagSignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetFaultParameterFaultOutOfRangeMinNormalValueInteger { _result := &_BACnetFaultParameterFaultOutOfRangeMinNormalValueInteger{ IntegerValue: integerValue, - _BACnetFaultParameterFaultOutOfRangeMinNormalValue: NewBACnetFaultParameterFaultOutOfRangeMinNormalValue(openingTag, peekedTagHeader, closingTag, tagNumber), + _BACnetFaultParameterFaultOutOfRangeMinNormalValue: NewBACnetFaultParameterFaultOutOfRangeMinNormalValue(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetFaultParameterFaultOutOfRangeMinNormalValue._BACnetFaultParameterFaultOutOfRangeMinNormalValueChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetFaultParameterFaultOutOfRangeMinNormalValueInteger(integerValue BA // Deprecated: use the interface for direct cast func CastBACnetFaultParameterFaultOutOfRangeMinNormalValueInteger(structType interface{}) BACnetFaultParameterFaultOutOfRangeMinNormalValueInteger { - if casted, ok := structType.(BACnetFaultParameterFaultOutOfRangeMinNormalValueInteger); ok { + if casted, ok := structType.(BACnetFaultParameterFaultOutOfRangeMinNormalValueInteger); ok { return casted } if casted, ok := structType.(*BACnetFaultParameterFaultOutOfRangeMinNormalValueInteger); ok { @@ -117,6 +120,7 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueInteger) GetLengthInB return lengthInBits } + func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueInteger) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetFaultParameterFaultOutOfRangeMinNormalValueIntegerParseWithBuffer(ctx if pullErr := readBuffer.PullContext("integerValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for integerValue") } - _integerValue, _integerValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_integerValue, _integerValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _integerValueErr != nil { return nil, errors.Wrap(_integerValueErr, "Error parsing 'integerValue' field of BACnetFaultParameterFaultOutOfRangeMinNormalValueInteger") } @@ -178,17 +182,17 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueInteger) SerializeWit return errors.Wrap(pushErr, "Error pushing for BACnetFaultParameterFaultOutOfRangeMinNormalValueInteger") } - // Simple Field (integerValue) - if pushErr := writeBuffer.PushContext("integerValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for integerValue") - } - _integerValueErr := writeBuffer.WriteSerializable(ctx, m.GetIntegerValue()) - if popErr := writeBuffer.PopContext("integerValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for integerValue") - } - if _integerValueErr != nil { - return errors.Wrap(_integerValueErr, "Error serializing 'integerValue' field") - } + // Simple Field (integerValue) + if pushErr := writeBuffer.PushContext("integerValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for integerValue") + } + _integerValueErr := writeBuffer.WriteSerializable(ctx, m.GetIntegerValue()) + if popErr := writeBuffer.PopContext("integerValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for integerValue") + } + if _integerValueErr != nil { + return errors.Wrap(_integerValueErr, "Error serializing 'integerValue' field") + } if popErr := writeBuffer.PopContext("BACnetFaultParameterFaultOutOfRangeMinNormalValueInteger"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetFaultParameterFaultOutOfRangeMinNormalValueInteger") @@ -198,6 +202,7 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueInteger) SerializeWit return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueInteger) isBACnetFaultParameterFaultOutOfRangeMinNormalValueInteger() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueInteger) String() str } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRangeMinNormalValueReal.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRangeMinNormalValueReal.go index 378a9df614b..0e113261759 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRangeMinNormalValueReal.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRangeMinNormalValueReal.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetFaultParameterFaultOutOfRangeMinNormalValueReal is the corresponding interface of BACnetFaultParameterFaultOutOfRangeMinNormalValueReal type BACnetFaultParameterFaultOutOfRangeMinNormalValueReal interface { @@ -46,9 +48,11 @@ type BACnetFaultParameterFaultOutOfRangeMinNormalValueRealExactly interface { // _BACnetFaultParameterFaultOutOfRangeMinNormalValueReal is the data-structure of this message type _BACnetFaultParameterFaultOutOfRangeMinNormalValueReal struct { *_BACnetFaultParameterFaultOutOfRangeMinNormalValue - RealValue BACnetApplicationTagReal + RealValue BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,16 +63,14 @@ type _BACnetFaultParameterFaultOutOfRangeMinNormalValueReal struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueReal) InitializeParent(parent BACnetFaultParameterFaultOutOfRangeMinNormalValue, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueReal) InitializeParent(parent BACnetFaultParameterFaultOutOfRangeMinNormalValue , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueReal) GetParent() BACnetFaultParameterFaultOutOfRangeMinNormalValue { +func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueReal) GetParent() BACnetFaultParameterFaultOutOfRangeMinNormalValue { return m._BACnetFaultParameterFaultOutOfRangeMinNormalValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueReal) GetRealValue() /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetFaultParameterFaultOutOfRangeMinNormalValueReal factory function for _BACnetFaultParameterFaultOutOfRangeMinNormalValueReal -func NewBACnetFaultParameterFaultOutOfRangeMinNormalValueReal(realValue BACnetApplicationTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetFaultParameterFaultOutOfRangeMinNormalValueReal { +func NewBACnetFaultParameterFaultOutOfRangeMinNormalValueReal( realValue BACnetApplicationTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetFaultParameterFaultOutOfRangeMinNormalValueReal { _result := &_BACnetFaultParameterFaultOutOfRangeMinNormalValueReal{ RealValue: realValue, - _BACnetFaultParameterFaultOutOfRangeMinNormalValue: NewBACnetFaultParameterFaultOutOfRangeMinNormalValue(openingTag, peekedTagHeader, closingTag, tagNumber), + _BACnetFaultParameterFaultOutOfRangeMinNormalValue: NewBACnetFaultParameterFaultOutOfRangeMinNormalValue(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetFaultParameterFaultOutOfRangeMinNormalValue._BACnetFaultParameterFaultOutOfRangeMinNormalValueChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetFaultParameterFaultOutOfRangeMinNormalValueReal(realValue BACnetAp // Deprecated: use the interface for direct cast func CastBACnetFaultParameterFaultOutOfRangeMinNormalValueReal(structType interface{}) BACnetFaultParameterFaultOutOfRangeMinNormalValueReal { - if casted, ok := structType.(BACnetFaultParameterFaultOutOfRangeMinNormalValueReal); ok { + if casted, ok := structType.(BACnetFaultParameterFaultOutOfRangeMinNormalValueReal); ok { return casted } if casted, ok := structType.(*BACnetFaultParameterFaultOutOfRangeMinNormalValueReal); ok { @@ -117,6 +120,7 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueReal) GetLengthInBits return lengthInBits } + func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueReal) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetFaultParameterFaultOutOfRangeMinNormalValueRealParseWithBuffer(ctx co if pullErr := readBuffer.PullContext("realValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for realValue") } - _realValue, _realValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_realValue, _realValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _realValueErr != nil { return nil, errors.Wrap(_realValueErr, "Error parsing 'realValue' field of BACnetFaultParameterFaultOutOfRangeMinNormalValueReal") } @@ -178,17 +182,17 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueReal) SerializeWithWr return errors.Wrap(pushErr, "Error pushing for BACnetFaultParameterFaultOutOfRangeMinNormalValueReal") } - // Simple Field (realValue) - if pushErr := writeBuffer.PushContext("realValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for realValue") - } - _realValueErr := writeBuffer.WriteSerializable(ctx, m.GetRealValue()) - if popErr := writeBuffer.PopContext("realValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for realValue") - } - if _realValueErr != nil { - return errors.Wrap(_realValueErr, "Error serializing 'realValue' field") - } + // Simple Field (realValue) + if pushErr := writeBuffer.PushContext("realValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for realValue") + } + _realValueErr := writeBuffer.WriteSerializable(ctx, m.GetRealValue()) + if popErr := writeBuffer.PopContext("realValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for realValue") + } + if _realValueErr != nil { + return errors.Wrap(_realValueErr, "Error serializing 'realValue' field") + } if popErr := writeBuffer.PopContext("BACnetFaultParameterFaultOutOfRangeMinNormalValueReal"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetFaultParameterFaultOutOfRangeMinNormalValueReal") @@ -198,6 +202,7 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueReal) SerializeWithWr return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueReal) isBACnetFaultParameterFaultOutOfRangeMinNormalValueReal() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueReal) String() string } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned.go index d04abc0c7d8..2856b0ba29f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned is the corresponding interface of BACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned type BACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned interface { @@ -46,9 +48,11 @@ type BACnetFaultParameterFaultOutOfRangeMinNormalValueUnsignedExactly interface // _BACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned is the data-structure of this message type _BACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned struct { *_BACnetFaultParameterFaultOutOfRangeMinNormalValue - UnsignedValue BACnetApplicationTagUnsignedInteger + UnsignedValue BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,16 +63,14 @@ type _BACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned) InitializeParent(parent BACnetFaultParameterFaultOutOfRangeMinNormalValue, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned) InitializeParent(parent BACnetFaultParameterFaultOutOfRangeMinNormalValue , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned) GetParent() BACnetFaultParameterFaultOutOfRangeMinNormalValue { +func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned) GetParent() BACnetFaultParameterFaultOutOfRangeMinNormalValue { return m._BACnetFaultParameterFaultOutOfRangeMinNormalValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned) GetUnsigned /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned factory function for _BACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned -func NewBACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned(unsignedValue BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned { +func NewBACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned( unsignedValue BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned { _result := &_BACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned{ UnsignedValue: unsignedValue, - _BACnetFaultParameterFaultOutOfRangeMinNormalValue: NewBACnetFaultParameterFaultOutOfRangeMinNormalValue(openingTag, peekedTagHeader, closingTag, tagNumber), + _BACnetFaultParameterFaultOutOfRangeMinNormalValue: NewBACnetFaultParameterFaultOutOfRangeMinNormalValue(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetFaultParameterFaultOutOfRangeMinNormalValue._BACnetFaultParameterFaultOutOfRangeMinNormalValueChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned(unsignedValue // Deprecated: use the interface for direct cast func CastBACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned(structType interface{}) BACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned { - if casted, ok := structType.(BACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned); ok { + if casted, ok := structType.(BACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned); ok { return casted } if casted, ok := structType.(*BACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned); ok { @@ -117,6 +120,7 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned) GetLengthIn return lengthInBits } + func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetFaultParameterFaultOutOfRangeMinNormalValueUnsignedParseWithBuffer(ct if pullErr := readBuffer.PullContext("unsignedValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for unsignedValue") } - _unsignedValue, _unsignedValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_unsignedValue, _unsignedValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _unsignedValueErr != nil { return nil, errors.Wrap(_unsignedValueErr, "Error parsing 'unsignedValue' field of BACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned") } @@ -178,17 +182,17 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned) SerializeWi return errors.Wrap(pushErr, "Error pushing for BACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned") } - // Simple Field (unsignedValue) - if pushErr := writeBuffer.PushContext("unsignedValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for unsignedValue") - } - _unsignedValueErr := writeBuffer.WriteSerializable(ctx, m.GetUnsignedValue()) - if popErr := writeBuffer.PopContext("unsignedValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for unsignedValue") - } - if _unsignedValueErr != nil { - return errors.Wrap(_unsignedValueErr, "Error serializing 'unsignedValue' field") - } + // Simple Field (unsignedValue) + if pushErr := writeBuffer.PushContext("unsignedValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for unsignedValue") + } + _unsignedValueErr := writeBuffer.WriteSerializable(ctx, m.GetUnsignedValue()) + if popErr := writeBuffer.PopContext("unsignedValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for unsignedValue") + } + if _unsignedValueErr != nil { + return errors.Wrap(_unsignedValueErr, "Error serializing 'unsignedValue' field") + } if popErr := writeBuffer.PopContext("BACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned") @@ -198,6 +202,7 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned) SerializeWi return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned) isBACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetFaultParameterFaultOutOfRangeMinNormalValueUnsigned) String() st } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultState.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultState.go index 78e602235e9..ed3492d1ac1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultState.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultState.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetFaultParameterFaultState is the corresponding interface of BACnetFaultParameterFaultState type BACnetFaultParameterFaultState interface { @@ -50,11 +52,13 @@ type BACnetFaultParameterFaultStateExactly interface { // _BACnetFaultParameterFaultState is the data-structure of this message type _BACnetFaultParameterFaultState struct { *_BACnetFaultParameter - OpeningTag BACnetOpeningTag - ListOfFaultValues BACnetFaultParameterFaultStateListOfFaultValues - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + ListOfFaultValues BACnetFaultParameterFaultStateListOfFaultValues + ClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -65,14 +69,12 @@ type _BACnetFaultParameterFaultState struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetFaultParameterFaultState) InitializeParent(parent BACnetFaultParameter, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetFaultParameterFaultState) InitializeParent(parent BACnetFaultParameter , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetFaultParameterFaultState) GetParent() BACnetFaultParameter { +func (m *_BACnetFaultParameterFaultState) GetParent() BACnetFaultParameter { return m._BACnetFaultParameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -95,13 +97,14 @@ func (m *_BACnetFaultParameterFaultState) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetFaultParameterFaultState factory function for _BACnetFaultParameterFaultState -func NewBACnetFaultParameterFaultState(openingTag BACnetOpeningTag, listOfFaultValues BACnetFaultParameterFaultStateListOfFaultValues, closingTag BACnetClosingTag, peekedTagHeader BACnetTagHeader) *_BACnetFaultParameterFaultState { +func NewBACnetFaultParameterFaultState( openingTag BACnetOpeningTag , listOfFaultValues BACnetFaultParameterFaultStateListOfFaultValues , closingTag BACnetClosingTag , peekedTagHeader BACnetTagHeader ) *_BACnetFaultParameterFaultState { _result := &_BACnetFaultParameterFaultState{ - OpeningTag: openingTag, - ListOfFaultValues: listOfFaultValues, - ClosingTag: closingTag, - _BACnetFaultParameter: NewBACnetFaultParameter(peekedTagHeader), + OpeningTag: openingTag, + ListOfFaultValues: listOfFaultValues, + ClosingTag: closingTag, + _BACnetFaultParameter: NewBACnetFaultParameter(peekedTagHeader), } _result._BACnetFaultParameter._BACnetFaultParameterChildRequirements = _result return _result @@ -109,7 +112,7 @@ func NewBACnetFaultParameterFaultState(openingTag BACnetOpeningTag, listOfFaultV // Deprecated: use the interface for direct cast func CastBACnetFaultParameterFaultState(structType interface{}) BACnetFaultParameterFaultState { - if casted, ok := structType.(BACnetFaultParameterFaultState); ok { + if casted, ok := structType.(BACnetFaultParameterFaultState); ok { return casted } if casted, ok := structType.(*BACnetFaultParameterFaultState); ok { @@ -137,6 +140,7 @@ func (m *_BACnetFaultParameterFaultState) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetFaultParameterFaultState) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -158,7 +162,7 @@ func BACnetFaultParameterFaultStateParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(uint8(4))) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( uint8(4) ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetFaultParameterFaultState") } @@ -171,7 +175,7 @@ func BACnetFaultParameterFaultStateParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("listOfFaultValues"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for listOfFaultValues") } - _listOfFaultValues, _listOfFaultValuesErr := BACnetFaultParameterFaultStateListOfFaultValuesParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_listOfFaultValues, _listOfFaultValuesErr := BACnetFaultParameterFaultStateListOfFaultValuesParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _listOfFaultValuesErr != nil { return nil, errors.Wrap(_listOfFaultValuesErr, "Error parsing 'listOfFaultValues' field of BACnetFaultParameterFaultState") } @@ -184,7 +188,7 @@ func BACnetFaultParameterFaultStateParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(uint8(4))) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( uint8(4) ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetFaultParameterFaultState") } @@ -199,10 +203,11 @@ func BACnetFaultParameterFaultStateParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_BACnetFaultParameterFaultState{ - _BACnetFaultParameter: &_BACnetFaultParameter{}, - OpeningTag: openingTag, - ListOfFaultValues: listOfFaultValues, - ClosingTag: closingTag, + _BACnetFaultParameter: &_BACnetFaultParameter{ + }, + OpeningTag: openingTag, + ListOfFaultValues: listOfFaultValues, + ClosingTag: closingTag, } _child._BACnetFaultParameter._BACnetFaultParameterChildRequirements = _child return _child, nil @@ -224,41 +229,41 @@ func (m *_BACnetFaultParameterFaultState) SerializeWithWriteBuffer(ctx context.C return errors.Wrap(pushErr, "Error pushing for BACnetFaultParameterFaultState") } - // Simple Field (openingTag) - if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for openingTag") - } - _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) - if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for openingTag") - } - if _openingTagErr != nil { - return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") - } + // Simple Field (openingTag) + if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for openingTag") + } + _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) + if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for openingTag") + } + if _openingTagErr != nil { + return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") + } - // Simple Field (listOfFaultValues) - if pushErr := writeBuffer.PushContext("listOfFaultValues"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for listOfFaultValues") - } - _listOfFaultValuesErr := writeBuffer.WriteSerializable(ctx, m.GetListOfFaultValues()) - if popErr := writeBuffer.PopContext("listOfFaultValues"); popErr != nil { - return errors.Wrap(popErr, "Error popping for listOfFaultValues") - } - if _listOfFaultValuesErr != nil { - return errors.Wrap(_listOfFaultValuesErr, "Error serializing 'listOfFaultValues' field") - } + // Simple Field (listOfFaultValues) + if pushErr := writeBuffer.PushContext("listOfFaultValues"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for listOfFaultValues") + } + _listOfFaultValuesErr := writeBuffer.WriteSerializable(ctx, m.GetListOfFaultValues()) + if popErr := writeBuffer.PopContext("listOfFaultValues"); popErr != nil { + return errors.Wrap(popErr, "Error popping for listOfFaultValues") + } + if _listOfFaultValuesErr != nil { + return errors.Wrap(_listOfFaultValuesErr, "Error serializing 'listOfFaultValues' field") + } - // Simple Field (closingTag) - if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for closingTag") - } - _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) - if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for closingTag") - } - if _closingTagErr != nil { - return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") - } + // Simple Field (closingTag) + if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for closingTag") + } + _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) + if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for closingTag") + } + if _closingTagErr != nil { + return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") + } if popErr := writeBuffer.PopContext("BACnetFaultParameterFaultState"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetFaultParameterFaultState") @@ -268,6 +273,7 @@ func (m *_BACnetFaultParameterFaultState) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetFaultParameterFaultState) isBACnetFaultParameterFaultState() bool { return true } @@ -282,3 +288,6 @@ func (m *_BACnetFaultParameterFaultState) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultStateListOfFaultValues.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultStateListOfFaultValues.go index 70238b1eabf..6edbee920c4 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultStateListOfFaultValues.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultStateListOfFaultValues.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetFaultParameterFaultStateListOfFaultValues is the corresponding interface of BACnetFaultParameterFaultStateListOfFaultValues type BACnetFaultParameterFaultStateListOfFaultValues interface { @@ -49,14 +51,15 @@ type BACnetFaultParameterFaultStateListOfFaultValuesExactly interface { // _BACnetFaultParameterFaultStateListOfFaultValues is the data-structure of this message type _BACnetFaultParameterFaultStateListOfFaultValues struct { - OpeningTag BACnetOpeningTag - ListIfFaultValues []BACnetPropertyStates - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + ListIfFaultValues []BACnetPropertyStates + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -79,14 +82,15 @@ func (m *_BACnetFaultParameterFaultStateListOfFaultValues) GetClosingTag() BACne /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetFaultParameterFaultStateListOfFaultValues factory function for _BACnetFaultParameterFaultStateListOfFaultValues -func NewBACnetFaultParameterFaultStateListOfFaultValues(openingTag BACnetOpeningTag, listIfFaultValues []BACnetPropertyStates, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetFaultParameterFaultStateListOfFaultValues { - return &_BACnetFaultParameterFaultStateListOfFaultValues{OpeningTag: openingTag, ListIfFaultValues: listIfFaultValues, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetFaultParameterFaultStateListOfFaultValues( openingTag BACnetOpeningTag , listIfFaultValues []BACnetPropertyStates , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetFaultParameterFaultStateListOfFaultValues { +return &_BACnetFaultParameterFaultStateListOfFaultValues{ OpeningTag: openingTag , ListIfFaultValues: listIfFaultValues , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetFaultParameterFaultStateListOfFaultValues(structType interface{}) BACnetFaultParameterFaultStateListOfFaultValues { - if casted, ok := structType.(BACnetFaultParameterFaultStateListOfFaultValues); ok { + if casted, ok := structType.(BACnetFaultParameterFaultStateListOfFaultValues); ok { return casted } if casted, ok := structType.(*BACnetFaultParameterFaultStateListOfFaultValues); ok { @@ -118,6 +122,7 @@ func (m *_BACnetFaultParameterFaultStateListOfFaultValues) GetLengthInBits(ctx c return lengthInBits } + func (m *_BACnetFaultParameterFaultStateListOfFaultValues) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +144,7 @@ func BACnetFaultParameterFaultStateListOfFaultValuesParseWithBuffer(ctx context. if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetFaultParameterFaultStateListOfFaultValues") } @@ -155,8 +160,8 @@ func BACnetFaultParameterFaultStateListOfFaultValuesParseWithBuffer(ctx context. // Terminated array var listIfFaultValues []BACnetPropertyStates { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetPropertyStatesParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetPropertyStatesParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'listIfFaultValues' field of BACnetFaultParameterFaultStateListOfFaultValues") } @@ -171,7 +176,7 @@ func BACnetFaultParameterFaultStateListOfFaultValuesParseWithBuffer(ctx context. if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetFaultParameterFaultStateListOfFaultValues") } @@ -186,11 +191,11 @@ func BACnetFaultParameterFaultStateListOfFaultValuesParseWithBuffer(ctx context. // Create the instance return &_BACnetFaultParameterFaultStateListOfFaultValues{ - TagNumber: tagNumber, - OpeningTag: openingTag, - ListIfFaultValues: listIfFaultValues, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + ListIfFaultValues: listIfFaultValues, + ClosingTag: closingTag, + }, nil } func (m *_BACnetFaultParameterFaultStateListOfFaultValues) Serialize() ([]byte, error) { @@ -204,7 +209,7 @@ func (m *_BACnetFaultParameterFaultStateListOfFaultValues) Serialize() ([]byte, func (m *_BACnetFaultParameterFaultStateListOfFaultValues) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetFaultParameterFaultStateListOfFaultValues"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetFaultParameterFaultStateListOfFaultValues"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetFaultParameterFaultStateListOfFaultValues") } @@ -255,13 +260,13 @@ func (m *_BACnetFaultParameterFaultStateListOfFaultValues) SerializeWithWriteBuf return nil } + //// // Arguments Getter func (m *_BACnetFaultParameterFaultStateListOfFaultValues) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -279,3 +284,6 @@ func (m *_BACnetFaultParameterFaultStateListOfFaultValues) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultStatusFlags.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultStatusFlags.go index 3fe5dd1ecd4..537dd591638 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultStatusFlags.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterFaultStatusFlags.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetFaultParameterFaultStatusFlags is the corresponding interface of BACnetFaultParameterFaultStatusFlags type BACnetFaultParameterFaultStatusFlags interface { @@ -50,11 +52,13 @@ type BACnetFaultParameterFaultStatusFlagsExactly interface { // _BACnetFaultParameterFaultStatusFlags is the data-structure of this message type _BACnetFaultParameterFaultStatusFlags struct { *_BACnetFaultParameter - OpeningTag BACnetOpeningTag - StatusFlagsReference BACnetDeviceObjectPropertyReferenceEnclosed - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + StatusFlagsReference BACnetDeviceObjectPropertyReferenceEnclosed + ClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -65,14 +69,12 @@ type _BACnetFaultParameterFaultStatusFlags struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetFaultParameterFaultStatusFlags) InitializeParent(parent BACnetFaultParameter, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetFaultParameterFaultStatusFlags) InitializeParent(parent BACnetFaultParameter , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetFaultParameterFaultStatusFlags) GetParent() BACnetFaultParameter { +func (m *_BACnetFaultParameterFaultStatusFlags) GetParent() BACnetFaultParameter { return m._BACnetFaultParameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -95,13 +97,14 @@ func (m *_BACnetFaultParameterFaultStatusFlags) GetClosingTag() BACnetClosingTag /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetFaultParameterFaultStatusFlags factory function for _BACnetFaultParameterFaultStatusFlags -func NewBACnetFaultParameterFaultStatusFlags(openingTag BACnetOpeningTag, statusFlagsReference BACnetDeviceObjectPropertyReferenceEnclosed, closingTag BACnetClosingTag, peekedTagHeader BACnetTagHeader) *_BACnetFaultParameterFaultStatusFlags { +func NewBACnetFaultParameterFaultStatusFlags( openingTag BACnetOpeningTag , statusFlagsReference BACnetDeviceObjectPropertyReferenceEnclosed , closingTag BACnetClosingTag , peekedTagHeader BACnetTagHeader ) *_BACnetFaultParameterFaultStatusFlags { _result := &_BACnetFaultParameterFaultStatusFlags{ - OpeningTag: openingTag, - StatusFlagsReference: statusFlagsReference, - ClosingTag: closingTag, - _BACnetFaultParameter: NewBACnetFaultParameter(peekedTagHeader), + OpeningTag: openingTag, + StatusFlagsReference: statusFlagsReference, + ClosingTag: closingTag, + _BACnetFaultParameter: NewBACnetFaultParameter(peekedTagHeader), } _result._BACnetFaultParameter._BACnetFaultParameterChildRequirements = _result return _result @@ -109,7 +112,7 @@ func NewBACnetFaultParameterFaultStatusFlags(openingTag BACnetOpeningTag, status // Deprecated: use the interface for direct cast func CastBACnetFaultParameterFaultStatusFlags(structType interface{}) BACnetFaultParameterFaultStatusFlags { - if casted, ok := structType.(BACnetFaultParameterFaultStatusFlags); ok { + if casted, ok := structType.(BACnetFaultParameterFaultStatusFlags); ok { return casted } if casted, ok := structType.(*BACnetFaultParameterFaultStatusFlags); ok { @@ -137,6 +140,7 @@ func (m *_BACnetFaultParameterFaultStatusFlags) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetFaultParameterFaultStatusFlags) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -158,7 +162,7 @@ func BACnetFaultParameterFaultStatusFlagsParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(uint8(5))) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( uint8(5) ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetFaultParameterFaultStatusFlags") } @@ -171,7 +175,7 @@ func BACnetFaultParameterFaultStatusFlagsParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("statusFlagsReference"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for statusFlagsReference") } - _statusFlagsReference, _statusFlagsReferenceErr := BACnetDeviceObjectPropertyReferenceEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(1))) +_statusFlagsReference, _statusFlagsReferenceErr := BACnetDeviceObjectPropertyReferenceEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) ) if _statusFlagsReferenceErr != nil { return nil, errors.Wrap(_statusFlagsReferenceErr, "Error parsing 'statusFlagsReference' field of BACnetFaultParameterFaultStatusFlags") } @@ -184,7 +188,7 @@ func BACnetFaultParameterFaultStatusFlagsParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(uint8(5))) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( uint8(5) ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetFaultParameterFaultStatusFlags") } @@ -199,10 +203,11 @@ func BACnetFaultParameterFaultStatusFlagsParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetFaultParameterFaultStatusFlags{ - _BACnetFaultParameter: &_BACnetFaultParameter{}, - OpeningTag: openingTag, - StatusFlagsReference: statusFlagsReference, - ClosingTag: closingTag, + _BACnetFaultParameter: &_BACnetFaultParameter{ + }, + OpeningTag: openingTag, + StatusFlagsReference: statusFlagsReference, + ClosingTag: closingTag, } _child._BACnetFaultParameter._BACnetFaultParameterChildRequirements = _child return _child, nil @@ -224,41 +229,41 @@ func (m *_BACnetFaultParameterFaultStatusFlags) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetFaultParameterFaultStatusFlags") } - // Simple Field (openingTag) - if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for openingTag") - } - _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) - if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for openingTag") - } - if _openingTagErr != nil { - return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") - } + // Simple Field (openingTag) + if pushErr := writeBuffer.PushContext("openingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for openingTag") + } + _openingTagErr := writeBuffer.WriteSerializable(ctx, m.GetOpeningTag()) + if popErr := writeBuffer.PopContext("openingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for openingTag") + } + if _openingTagErr != nil { + return errors.Wrap(_openingTagErr, "Error serializing 'openingTag' field") + } - // Simple Field (statusFlagsReference) - if pushErr := writeBuffer.PushContext("statusFlagsReference"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for statusFlagsReference") - } - _statusFlagsReferenceErr := writeBuffer.WriteSerializable(ctx, m.GetStatusFlagsReference()) - if popErr := writeBuffer.PopContext("statusFlagsReference"); popErr != nil { - return errors.Wrap(popErr, "Error popping for statusFlagsReference") - } - if _statusFlagsReferenceErr != nil { - return errors.Wrap(_statusFlagsReferenceErr, "Error serializing 'statusFlagsReference' field") - } + // Simple Field (statusFlagsReference) + if pushErr := writeBuffer.PushContext("statusFlagsReference"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for statusFlagsReference") + } + _statusFlagsReferenceErr := writeBuffer.WriteSerializable(ctx, m.GetStatusFlagsReference()) + if popErr := writeBuffer.PopContext("statusFlagsReference"); popErr != nil { + return errors.Wrap(popErr, "Error popping for statusFlagsReference") + } + if _statusFlagsReferenceErr != nil { + return errors.Wrap(_statusFlagsReferenceErr, "Error serializing 'statusFlagsReference' field") + } - // Simple Field (closingTag) - if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for closingTag") - } - _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) - if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for closingTag") - } - if _closingTagErr != nil { - return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") - } + // Simple Field (closingTag) + if pushErr := writeBuffer.PushContext("closingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for closingTag") + } + _closingTagErr := writeBuffer.WriteSerializable(ctx, m.GetClosingTag()) + if popErr := writeBuffer.PopContext("closingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for closingTag") + } + if _closingTagErr != nil { + return errors.Wrap(_closingTagErr, "Error serializing 'closingTag' field") + } if popErr := writeBuffer.PopContext("BACnetFaultParameterFaultStatusFlags"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetFaultParameterFaultStatusFlags") @@ -268,6 +273,7 @@ func (m *_BACnetFaultParameterFaultStatusFlags) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetFaultParameterFaultStatusFlags) isBACnetFaultParameterFaultStatusFlags() bool { return true } @@ -282,3 +288,6 @@ func (m *_BACnetFaultParameterFaultStatusFlags) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterNone.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterNone.go index 6e6b55c2dcf..c4d3737071a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterNone.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultParameterNone.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetFaultParameterNone is the corresponding interface of BACnetFaultParameterNone type BACnetFaultParameterNone interface { @@ -46,9 +48,11 @@ type BACnetFaultParameterNoneExactly interface { // _BACnetFaultParameterNone is the data-structure of this message type _BACnetFaultParameterNone struct { *_BACnetFaultParameter - None BACnetContextTagNull + None BACnetContextTagNull } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetFaultParameterNone struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetFaultParameterNone) InitializeParent(parent BACnetFaultParameter, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetFaultParameterNone) InitializeParent(parent BACnetFaultParameter , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetFaultParameterNone) GetParent() BACnetFaultParameter { +func (m *_BACnetFaultParameterNone) GetParent() BACnetFaultParameter { return m._BACnetFaultParameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetFaultParameterNone) GetNone() BACnetContextTagNull { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetFaultParameterNone factory function for _BACnetFaultParameterNone -func NewBACnetFaultParameterNone(none BACnetContextTagNull, peekedTagHeader BACnetTagHeader) *_BACnetFaultParameterNone { +func NewBACnetFaultParameterNone( none BACnetContextTagNull , peekedTagHeader BACnetTagHeader ) *_BACnetFaultParameterNone { _result := &_BACnetFaultParameterNone{ - None: none, - _BACnetFaultParameter: NewBACnetFaultParameter(peekedTagHeader), + None: none, + _BACnetFaultParameter: NewBACnetFaultParameter(peekedTagHeader), } _result._BACnetFaultParameter._BACnetFaultParameterChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetFaultParameterNone(none BACnetContextTagNull, peekedTagHeader BACn // Deprecated: use the interface for direct cast func CastBACnetFaultParameterNone(structType interface{}) BACnetFaultParameterNone { - if casted, ok := structType.(BACnetFaultParameterNone); ok { + if casted, ok := structType.(BACnetFaultParameterNone); ok { return casted } if casted, ok := structType.(*BACnetFaultParameterNone); ok { @@ -115,6 +118,7 @@ func (m *_BACnetFaultParameterNone) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_BACnetFaultParameterNone) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetFaultParameterNoneParseWithBuffer(ctx context.Context, readBuffer uti if pullErr := readBuffer.PullContext("none"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for none") } - _none, _noneErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_NULL)) +_none, _noneErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_NULL ) ) if _noneErr != nil { return nil, errors.Wrap(_noneErr, "Error parsing 'none' field of BACnetFaultParameterNone") } @@ -151,8 +155,9 @@ func BACnetFaultParameterNoneParseWithBuffer(ctx context.Context, readBuffer uti // Create a partially initialized instance _child := &_BACnetFaultParameterNone{ - _BACnetFaultParameter: &_BACnetFaultParameter{}, - None: none, + _BACnetFaultParameter: &_BACnetFaultParameter{ + }, + None: none, } _child._BACnetFaultParameter._BACnetFaultParameterChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetFaultParameterNone) SerializeWithWriteBuffer(ctx context.Context return errors.Wrap(pushErr, "Error pushing for BACnetFaultParameterNone") } - // Simple Field (none) - if pushErr := writeBuffer.PushContext("none"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for none") - } - _noneErr := writeBuffer.WriteSerializable(ctx, m.GetNone()) - if popErr := writeBuffer.PopContext("none"); popErr != nil { - return errors.Wrap(popErr, "Error popping for none") - } - if _noneErr != nil { - return errors.Wrap(_noneErr, "Error serializing 'none' field") - } + // Simple Field (none) + if pushErr := writeBuffer.PushContext("none"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for none") + } + _noneErr := writeBuffer.WriteSerializable(ctx, m.GetNone()) + if popErr := writeBuffer.PopContext("none"); popErr != nil { + return errors.Wrap(popErr, "Error popping for none") + } + if _noneErr != nil { + return errors.Wrap(_noneErr, "Error serializing 'none' field") + } if popErr := writeBuffer.PopContext("BACnetFaultParameterNone"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetFaultParameterNone") @@ -194,6 +199,7 @@ func (m *_BACnetFaultParameterNone) SerializeWithWriteBuffer(ctx context.Context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetFaultParameterNone) isBACnetFaultParameterNone() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetFaultParameterNone) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultType.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultType.go index 6c59c9983f7..4cefbfc9dc1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultType.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultType.go @@ -34,22 +34,22 @@ type IBACnetFaultType interface { utils.Serializable } -const ( - BACnetFaultType_NONE BACnetFaultType = 0 +const( + BACnetFaultType_NONE BACnetFaultType = 0 BACnetFaultType_FAULT_CHARACTERSTRING BACnetFaultType = 1 - BACnetFaultType_FAULT_EXTENDED BACnetFaultType = 2 - BACnetFaultType_FAULT_LIFE_SAFETY BACnetFaultType = 3 - BACnetFaultType_FAULT_STATE BACnetFaultType = 4 - BACnetFaultType_FAULT_STATUS_FLAGS BACnetFaultType = 5 - BACnetFaultType_FAULT_OUT_OF_RANGE BACnetFaultType = 6 - BACnetFaultType_FAULT_LISTED BACnetFaultType = 7 + BACnetFaultType_FAULT_EXTENDED BACnetFaultType = 2 + BACnetFaultType_FAULT_LIFE_SAFETY BACnetFaultType = 3 + BACnetFaultType_FAULT_STATE BACnetFaultType = 4 + BACnetFaultType_FAULT_STATUS_FLAGS BACnetFaultType = 5 + BACnetFaultType_FAULT_OUT_OF_RANGE BACnetFaultType = 6 + BACnetFaultType_FAULT_LISTED BACnetFaultType = 7 ) var BACnetFaultTypeValues []BACnetFaultType func init() { _ = errors.New - BACnetFaultTypeValues = []BACnetFaultType{ + BACnetFaultTypeValues = []BACnetFaultType { BACnetFaultType_NONE, BACnetFaultType_FAULT_CHARACTERSTRING, BACnetFaultType_FAULT_EXTENDED, @@ -63,22 +63,22 @@ func init() { func BACnetFaultTypeByValue(value uint8) (enum BACnetFaultType, ok bool) { switch value { - case 0: - return BACnetFaultType_NONE, true - case 1: - return BACnetFaultType_FAULT_CHARACTERSTRING, true - case 2: - return BACnetFaultType_FAULT_EXTENDED, true - case 3: - return BACnetFaultType_FAULT_LIFE_SAFETY, true - case 4: - return BACnetFaultType_FAULT_STATE, true - case 5: - return BACnetFaultType_FAULT_STATUS_FLAGS, true - case 6: - return BACnetFaultType_FAULT_OUT_OF_RANGE, true - case 7: - return BACnetFaultType_FAULT_LISTED, true + case 0: + return BACnetFaultType_NONE, true + case 1: + return BACnetFaultType_FAULT_CHARACTERSTRING, true + case 2: + return BACnetFaultType_FAULT_EXTENDED, true + case 3: + return BACnetFaultType_FAULT_LIFE_SAFETY, true + case 4: + return BACnetFaultType_FAULT_STATE, true + case 5: + return BACnetFaultType_FAULT_STATUS_FLAGS, true + case 6: + return BACnetFaultType_FAULT_OUT_OF_RANGE, true + case 7: + return BACnetFaultType_FAULT_LISTED, true } return 0, false } @@ -105,13 +105,13 @@ func BACnetFaultTypeByName(value string) (enum BACnetFaultType, ok bool) { return 0, false } -func BACnetFaultTypeKnows(value uint8) bool { +func BACnetFaultTypeKnows(value uint8) bool { for _, typeValue := range BACnetFaultTypeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetFaultType(structType interface{}) BACnetFaultType { @@ -187,3 +187,4 @@ func (e BACnetFaultType) PLC4XEnumName() string { func (e BACnetFaultType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultTypeTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultTypeTagged.go index d45a90e5145..5eb13afcaf6 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultTypeTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFaultTypeTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetFaultTypeTagged is the corresponding interface of BACnetFaultTypeTagged type BACnetFaultTypeTagged interface { @@ -46,14 +48,15 @@ type BACnetFaultTypeTaggedExactly interface { // _BACnetFaultTypeTagged is the data-structure of this message type _BACnetFaultTypeTagged struct { - Header BACnetTagHeader - Value BACnetFaultType + Header BACnetTagHeader + Value BACnetFaultType // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_BACnetFaultTypeTagged) GetValue() BACnetFaultType { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetFaultTypeTagged factory function for _BACnetFaultTypeTagged -func NewBACnetFaultTypeTagged(header BACnetTagHeader, value BACnetFaultType, tagNumber uint8, tagClass TagClass) *_BACnetFaultTypeTagged { - return &_BACnetFaultTypeTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetFaultTypeTagged( header BACnetTagHeader , value BACnetFaultType , tagNumber uint8 , tagClass TagClass ) *_BACnetFaultTypeTagged { +return &_BACnetFaultTypeTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetFaultTypeTagged(structType interface{}) BACnetFaultTypeTagged { - if casted, ok := structType.(BACnetFaultTypeTagged); ok { + if casted, ok := structType.(BACnetFaultTypeTagged); ok { return casted } if casted, ok := structType.(*BACnetFaultTypeTagged); ok { @@ -104,6 +108,7 @@ func (m *_BACnetFaultTypeTagged) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetFaultTypeTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func BACnetFaultTypeTaggedParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetFaultTypeTagged") } @@ -135,12 +140,12 @@ func BACnetFaultTypeTaggedParseWithBuffer(ctx context.Context, readBuffer utils. } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func BACnetFaultTypeTaggedParseWithBuffer(ctx context.Context, readBuffer utils. } var value BACnetFaultType if _value != nil { - value = _value.(BACnetFaultType) + value = _value.(BACnetFaultType) } if closeErr := readBuffer.CloseContext("BACnetFaultTypeTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func BACnetFaultTypeTaggedParseWithBuffer(ctx context.Context, readBuffer utils. // Create the instance return &_BACnetFaultTypeTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_BACnetFaultTypeTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_BACnetFaultTypeTagged) Serialize() ([]byte, error) { func (m *_BACnetFaultTypeTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetFaultTypeTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetFaultTypeTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetFaultTypeTagged") } @@ -206,6 +211,7 @@ func (m *_BACnetFaultTypeTagged) SerializeWithWriteBuffer(ctx context.Context, w return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_BACnetFaultTypeTagged) GetTagNumber() uint8 { func (m *_BACnetFaultTypeTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_BACnetFaultTypeTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFileAccessMethod.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFileAccessMethod.go index a6a612b48ca..a945f85395f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFileAccessMethod.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFileAccessMethod.go @@ -34,7 +34,7 @@ type IBACnetFileAccessMethod interface { utils.Serializable } -const ( +const( BACnetFileAccessMethod_RECORD_ACCESS BACnetFileAccessMethod = 0 BACnetFileAccessMethod_STREAM_ACCESS BACnetFileAccessMethod = 1 ) @@ -43,7 +43,7 @@ var BACnetFileAccessMethodValues []BACnetFileAccessMethod func init() { _ = errors.New - BACnetFileAccessMethodValues = []BACnetFileAccessMethod{ + BACnetFileAccessMethodValues = []BACnetFileAccessMethod { BACnetFileAccessMethod_RECORD_ACCESS, BACnetFileAccessMethod_STREAM_ACCESS, } @@ -51,10 +51,10 @@ func init() { func BACnetFileAccessMethodByValue(value uint8) (enum BACnetFileAccessMethod, ok bool) { switch value { - case 0: - return BACnetFileAccessMethod_RECORD_ACCESS, true - case 1: - return BACnetFileAccessMethod_STREAM_ACCESS, true + case 0: + return BACnetFileAccessMethod_RECORD_ACCESS, true + case 1: + return BACnetFileAccessMethod_STREAM_ACCESS, true } return 0, false } @@ -69,13 +69,13 @@ func BACnetFileAccessMethodByName(value string) (enum BACnetFileAccessMethod, ok return 0, false } -func BACnetFileAccessMethodKnows(value uint8) bool { +func BACnetFileAccessMethodKnows(value uint8) bool { for _, typeValue := range BACnetFileAccessMethodValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetFileAccessMethod(structType interface{}) BACnetFileAccessMethod { @@ -139,3 +139,4 @@ func (e BACnetFileAccessMethod) PLC4XEnumName() string { func (e BACnetFileAccessMethod) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetFileAccessMethodTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetFileAccessMethodTagged.go index 4ade762df8f..b82b437fb3a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetFileAccessMethodTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetFileAccessMethodTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetFileAccessMethodTagged is the corresponding interface of BACnetFileAccessMethodTagged type BACnetFileAccessMethodTagged interface { @@ -46,14 +48,15 @@ type BACnetFileAccessMethodTaggedExactly interface { // _BACnetFileAccessMethodTagged is the data-structure of this message type _BACnetFileAccessMethodTagged struct { - Header BACnetTagHeader - Value BACnetFileAccessMethod + Header BACnetTagHeader + Value BACnetFileAccessMethod // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_BACnetFileAccessMethodTagged) GetValue() BACnetFileAccessMethod { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetFileAccessMethodTagged factory function for _BACnetFileAccessMethodTagged -func NewBACnetFileAccessMethodTagged(header BACnetTagHeader, value BACnetFileAccessMethod, tagNumber uint8, tagClass TagClass) *_BACnetFileAccessMethodTagged { - return &_BACnetFileAccessMethodTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetFileAccessMethodTagged( header BACnetTagHeader , value BACnetFileAccessMethod , tagNumber uint8 , tagClass TagClass ) *_BACnetFileAccessMethodTagged { +return &_BACnetFileAccessMethodTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetFileAccessMethodTagged(structType interface{}) BACnetFileAccessMethodTagged { - if casted, ok := structType.(BACnetFileAccessMethodTagged); ok { + if casted, ok := structType.(BACnetFileAccessMethodTagged); ok { return casted } if casted, ok := structType.(*BACnetFileAccessMethodTagged); ok { @@ -104,6 +108,7 @@ func (m *_BACnetFileAccessMethodTagged) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_BACnetFileAccessMethodTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func BACnetFileAccessMethodTaggedParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetFileAccessMethodTagged") } @@ -135,12 +140,12 @@ func BACnetFileAccessMethodTaggedParseWithBuffer(ctx context.Context, readBuffer } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func BACnetFileAccessMethodTaggedParseWithBuffer(ctx context.Context, readBuffer } var value BACnetFileAccessMethod if _value != nil { - value = _value.(BACnetFileAccessMethod) + value = _value.(BACnetFileAccessMethod) } if closeErr := readBuffer.CloseContext("BACnetFileAccessMethodTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func BACnetFileAccessMethodTaggedParseWithBuffer(ctx context.Context, readBuffer // Create the instance return &_BACnetFileAccessMethodTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_BACnetFileAccessMethodTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_BACnetFileAccessMethodTagged) Serialize() ([]byte, error) { func (m *_BACnetFileAccessMethodTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetFileAccessMethodTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetFileAccessMethodTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetFileAccessMethodTagged") } @@ -206,6 +211,7 @@ func (m *_BACnetFileAccessMethodTagged) SerializeWithWriteBuffer(ctx context.Con return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_BACnetFileAccessMethodTagged) GetTagNumber() uint8 { func (m *_BACnetFileAccessMethodTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_BACnetFileAccessMethodTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetGroupChannelValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetGroupChannelValue.go index 7b2a97cfffb..fa8de0c571a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetGroupChannelValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetGroupChannelValue.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetGroupChannelValue is the corresponding interface of BACnetGroupChannelValue type BACnetGroupChannelValue interface { @@ -49,11 +51,12 @@ type BACnetGroupChannelValueExactly interface { // _BACnetGroupChannelValue is the data-structure of this message type _BACnetGroupChannelValue struct { - Channel BACnetContextTagUnsignedInteger - OverridingPriority BACnetContextTagUnsignedInteger - Value BACnetChannelValue + Channel BACnetContextTagUnsignedInteger + OverridingPriority BACnetContextTagUnsignedInteger + Value BACnetChannelValue } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -76,14 +79,15 @@ func (m *_BACnetGroupChannelValue) GetValue() BACnetChannelValue { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetGroupChannelValue factory function for _BACnetGroupChannelValue -func NewBACnetGroupChannelValue(channel BACnetContextTagUnsignedInteger, overridingPriority BACnetContextTagUnsignedInteger, value BACnetChannelValue) *_BACnetGroupChannelValue { - return &_BACnetGroupChannelValue{Channel: channel, OverridingPriority: overridingPriority, Value: value} +func NewBACnetGroupChannelValue( channel BACnetContextTagUnsignedInteger , overridingPriority BACnetContextTagUnsignedInteger , value BACnetChannelValue ) *_BACnetGroupChannelValue { +return &_BACnetGroupChannelValue{ Channel: channel , OverridingPriority: overridingPriority , Value: value } } // Deprecated: use the interface for direct cast func CastBACnetGroupChannelValue(structType interface{}) BACnetGroupChannelValue { - if casted, ok := structType.(BACnetGroupChannelValue); ok { + if casted, ok := structType.(BACnetGroupChannelValue); ok { return casted } if casted, ok := structType.(*BACnetGroupChannelValue); ok { @@ -113,6 +117,7 @@ func (m *_BACnetGroupChannelValue) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetGroupChannelValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -134,7 +139,7 @@ func BACnetGroupChannelValueParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("channel"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for channel") } - _channel, _channelErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_channel, _channelErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _channelErr != nil { return nil, errors.Wrap(_channelErr, "Error parsing 'channel' field of BACnetGroupChannelValue") } @@ -145,12 +150,12 @@ func BACnetGroupChannelValueParseWithBuffer(ctx context.Context, readBuffer util // Optional Field (overridingPriority) (Can be skipped, if a given expression evaluates to false) var overridingPriority BACnetContextTagUnsignedInteger = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("overridingPriority"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for overridingPriority") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(1), BACnetDataType_UNSIGNED_INTEGER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(1) , BACnetDataType_UNSIGNED_INTEGER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -169,7 +174,7 @@ func BACnetGroupChannelValueParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("value"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for value") } - _value, _valueErr := BACnetChannelValueParseWithBuffer(ctx, readBuffer) +_value, _valueErr := BACnetChannelValueParseWithBuffer(ctx, readBuffer) if _valueErr != nil { return nil, errors.Wrap(_valueErr, "Error parsing 'value' field of BACnetGroupChannelValue") } @@ -184,10 +189,10 @@ func BACnetGroupChannelValueParseWithBuffer(ctx context.Context, readBuffer util // Create the instance return &_BACnetGroupChannelValue{ - Channel: channel, - OverridingPriority: overridingPriority, - Value: value, - }, nil + Channel: channel, + OverridingPriority: overridingPriority, + Value: value, + }, nil } func (m *_BACnetGroupChannelValue) Serialize() ([]byte, error) { @@ -201,7 +206,7 @@ func (m *_BACnetGroupChannelValue) Serialize() ([]byte, error) { func (m *_BACnetGroupChannelValue) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetGroupChannelValue"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetGroupChannelValue"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetGroupChannelValue") } @@ -251,6 +256,7 @@ func (m *_BACnetGroupChannelValue) SerializeWithWriteBuffer(ctx context.Context, return nil } + func (m *_BACnetGroupChannelValue) isBACnetGroupChannelValue() bool { return true } @@ -265,3 +271,6 @@ func (m *_BACnetGroupChannelValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetGroupChannelValueList.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetGroupChannelValueList.go index 5983efffc5f..c3fa4aefe46 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetGroupChannelValueList.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetGroupChannelValueList.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetGroupChannelValueList is the corresponding interface of BACnetGroupChannelValueList type BACnetGroupChannelValueList interface { @@ -49,14 +51,15 @@ type BACnetGroupChannelValueListExactly interface { // _BACnetGroupChannelValueList is the data-structure of this message type _BACnetGroupChannelValueList struct { - OpeningTag BACnetOpeningTag - ListOfEventSummaries []BACnetEventSummary - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + ListOfEventSummaries []BACnetEventSummary + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -79,14 +82,15 @@ func (m *_BACnetGroupChannelValueList) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetGroupChannelValueList factory function for _BACnetGroupChannelValueList -func NewBACnetGroupChannelValueList(openingTag BACnetOpeningTag, listOfEventSummaries []BACnetEventSummary, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetGroupChannelValueList { - return &_BACnetGroupChannelValueList{OpeningTag: openingTag, ListOfEventSummaries: listOfEventSummaries, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetGroupChannelValueList( openingTag BACnetOpeningTag , listOfEventSummaries []BACnetEventSummary , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetGroupChannelValueList { +return &_BACnetGroupChannelValueList{ OpeningTag: openingTag , ListOfEventSummaries: listOfEventSummaries , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetGroupChannelValueList(structType interface{}) BACnetGroupChannelValueList { - if casted, ok := structType.(BACnetGroupChannelValueList); ok { + if casted, ok := structType.(BACnetGroupChannelValueList); ok { return casted } if casted, ok := structType.(*BACnetGroupChannelValueList); ok { @@ -118,6 +122,7 @@ func (m *_BACnetGroupChannelValueList) GetLengthInBits(ctx context.Context) uint return lengthInBits } + func (m *_BACnetGroupChannelValueList) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +144,7 @@ func BACnetGroupChannelValueListParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetGroupChannelValueList") } @@ -155,8 +160,8 @@ func BACnetGroupChannelValueListParseWithBuffer(ctx context.Context, readBuffer // Terminated array var listOfEventSummaries []BACnetEventSummary { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetEventSummaryParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetEventSummaryParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'listOfEventSummaries' field of BACnetGroupChannelValueList") } @@ -171,7 +176,7 @@ func BACnetGroupChannelValueListParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetGroupChannelValueList") } @@ -186,11 +191,11 @@ func BACnetGroupChannelValueListParseWithBuffer(ctx context.Context, readBuffer // Create the instance return &_BACnetGroupChannelValueList{ - TagNumber: tagNumber, - OpeningTag: openingTag, - ListOfEventSummaries: listOfEventSummaries, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + ListOfEventSummaries: listOfEventSummaries, + ClosingTag: closingTag, + }, nil } func (m *_BACnetGroupChannelValueList) Serialize() ([]byte, error) { @@ -204,7 +209,7 @@ func (m *_BACnetGroupChannelValueList) Serialize() ([]byte, error) { func (m *_BACnetGroupChannelValueList) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetGroupChannelValueList"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetGroupChannelValueList"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetGroupChannelValueList") } @@ -255,13 +260,13 @@ func (m *_BACnetGroupChannelValueList) SerializeWithWriteBuffer(ctx context.Cont return nil } + //// // Arguments Getter func (m *_BACnetGroupChannelValueList) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -279,3 +284,6 @@ func (m *_BACnetGroupChannelValueList) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetHostAddress.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetHostAddress.go index a062a15975a..c8cf8349c86 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetHostAddress.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetHostAddress.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetHostAddress is the corresponding interface of BACnetHostAddress type BACnetHostAddress interface { @@ -47,7 +49,7 @@ type BACnetHostAddressExactly interface { // _BACnetHostAddress is the data-structure of this message type _BACnetHostAddress struct { _BACnetHostAddressChildRequirements - PeekedTagHeader BACnetTagHeader + PeekedTagHeader BACnetTagHeader } type _BACnetHostAddressChildRequirements interface { @@ -55,6 +57,7 @@ type _BACnetHostAddressChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type BACnetHostAddressParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetHostAddress, serializeChildFunction func() error) error GetTypeName() string @@ -62,13 +65,12 @@ type BACnetHostAddressParent interface { type BACnetHostAddressChild interface { utils.Serializable - InitializeParent(parent BACnetHostAddress, peekedTagHeader BACnetTagHeader) +InitializeParent(parent BACnetHostAddress , peekedTagHeader BACnetTagHeader ) GetParent() *BACnetHostAddress GetTypeName() string BACnetHostAddress } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,14 +100,15 @@ func (m *_BACnetHostAddress) GetPeekedTagNumber() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetHostAddress factory function for _BACnetHostAddress -func NewBACnetHostAddress(peekedTagHeader BACnetTagHeader) *_BACnetHostAddress { - return &_BACnetHostAddress{PeekedTagHeader: peekedTagHeader} +func NewBACnetHostAddress( peekedTagHeader BACnetTagHeader ) *_BACnetHostAddress { +return &_BACnetHostAddress{ PeekedTagHeader: peekedTagHeader } } // Deprecated: use the interface for direct cast func CastBACnetHostAddress(structType interface{}) BACnetHostAddress { - if casted, ok := structType.(BACnetHostAddress); ok { + if casted, ok := structType.(BACnetHostAddress); ok { return casted } if casted, ok := structType.(*BACnetHostAddress); ok { @@ -118,6 +121,7 @@ func (m *_BACnetHostAddress) GetTypeName() string { return "BACnetHostAddress" } + func (m *_BACnetHostAddress) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -143,13 +147,13 @@ func BACnetHostAddressParseWithBuffer(ctx context.Context, readBuffer utils.Read currentPos := positionAware.GetPos() _ = currentPos - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Virtual field _peekedTagNumber := peekedTagHeader.GetActualTagNumber() @@ -159,19 +163,19 @@ func BACnetHostAddressParseWithBuffer(ctx context.Context, readBuffer utils.Read // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetHostAddressChildSerializeRequirement interface { BACnetHostAddress - InitializeParent(BACnetHostAddress, BACnetTagHeader) + InitializeParent(BACnetHostAddress, BACnetTagHeader) GetParent() BACnetHostAddress } var _childTemp interface{} var _child BACnetHostAddressChildSerializeRequirement var typeSwitchError error switch { - case peekedTagNumber == uint8(0): // BACnetHostAddressNull - _childTemp, typeSwitchError = BACnetHostAddressNullParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(1): // BACnetHostAddressIpAddress - _childTemp, typeSwitchError = BACnetHostAddressIpAddressParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(2): // BACnetHostAddressName - _childTemp, typeSwitchError = BACnetHostAddressNameParseWithBuffer(ctx, readBuffer) +case peekedTagNumber == uint8(0) : // BACnetHostAddressNull + _childTemp, typeSwitchError = BACnetHostAddressNullParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(1) : // BACnetHostAddressIpAddress + _childTemp, typeSwitchError = BACnetHostAddressIpAddressParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(2) : // BACnetHostAddressName + _childTemp, typeSwitchError = BACnetHostAddressNameParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedTagNumber=%v]", peekedTagNumber) } @@ -185,7 +189,7 @@ func BACnetHostAddressParseWithBuffer(ctx context.Context, readBuffer utils.Read } // Finish initializing - _child.InitializeParent(_child, peekedTagHeader) +_child.InitializeParent(_child , peekedTagHeader ) return _child, nil } @@ -195,7 +199,7 @@ func (pm *_BACnetHostAddress) SerializeParent(ctx context.Context, writeBuffer u _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetHostAddress"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetHostAddress"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetHostAddress") } // Virtual field @@ -214,6 +218,7 @@ func (pm *_BACnetHostAddress) SerializeParent(ctx context.Context, writeBuffer u return nil } + func (m *_BACnetHostAddress) isBACnetHostAddress() bool { return true } @@ -228,3 +233,6 @@ func (m *_BACnetHostAddress) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetHostAddressEnclosed.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetHostAddressEnclosed.go index bb70e2f2a9d..e6b596e8e55 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetHostAddressEnclosed.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetHostAddressEnclosed.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetHostAddressEnclosed is the corresponding interface of BACnetHostAddressEnclosed type BACnetHostAddressEnclosed interface { @@ -48,14 +50,15 @@ type BACnetHostAddressEnclosedExactly interface { // _BACnetHostAddressEnclosed is the data-structure of this message type _BACnetHostAddressEnclosed struct { - OpeningTag BACnetOpeningTag - HostAddress BACnetHostAddress - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + HostAddress BACnetHostAddress + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -78,14 +81,15 @@ func (m *_BACnetHostAddressEnclosed) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetHostAddressEnclosed factory function for _BACnetHostAddressEnclosed -func NewBACnetHostAddressEnclosed(openingTag BACnetOpeningTag, hostAddress BACnetHostAddress, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetHostAddressEnclosed { - return &_BACnetHostAddressEnclosed{OpeningTag: openingTag, HostAddress: hostAddress, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetHostAddressEnclosed( openingTag BACnetOpeningTag , hostAddress BACnetHostAddress , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetHostAddressEnclosed { +return &_BACnetHostAddressEnclosed{ OpeningTag: openingTag , HostAddress: hostAddress , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetHostAddressEnclosed(structType interface{}) BACnetHostAddressEnclosed { - if casted, ok := structType.(BACnetHostAddressEnclosed); ok { + if casted, ok := structType.(BACnetHostAddressEnclosed); ok { return casted } if casted, ok := structType.(*BACnetHostAddressEnclosed); ok { @@ -113,6 +117,7 @@ func (m *_BACnetHostAddressEnclosed) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_BACnetHostAddressEnclosed) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -134,7 +139,7 @@ func BACnetHostAddressEnclosedParseWithBuffer(ctx context.Context, readBuffer ut if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetHostAddressEnclosed") } @@ -147,7 +152,7 @@ func BACnetHostAddressEnclosedParseWithBuffer(ctx context.Context, readBuffer ut if pullErr := readBuffer.PullContext("hostAddress"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for hostAddress") } - _hostAddress, _hostAddressErr := BACnetHostAddressParseWithBuffer(ctx, readBuffer) +_hostAddress, _hostAddressErr := BACnetHostAddressParseWithBuffer(ctx, readBuffer) if _hostAddressErr != nil { return nil, errors.Wrap(_hostAddressErr, "Error parsing 'hostAddress' field of BACnetHostAddressEnclosed") } @@ -160,7 +165,7 @@ func BACnetHostAddressEnclosedParseWithBuffer(ctx context.Context, readBuffer ut if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetHostAddressEnclosed") } @@ -175,11 +180,11 @@ func BACnetHostAddressEnclosedParseWithBuffer(ctx context.Context, readBuffer ut // Create the instance return &_BACnetHostAddressEnclosed{ - TagNumber: tagNumber, - OpeningTag: openingTag, - HostAddress: hostAddress, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + HostAddress: hostAddress, + ClosingTag: closingTag, + }, nil } func (m *_BACnetHostAddressEnclosed) Serialize() ([]byte, error) { @@ -193,7 +198,7 @@ func (m *_BACnetHostAddressEnclosed) Serialize() ([]byte, error) { func (m *_BACnetHostAddressEnclosed) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetHostAddressEnclosed"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetHostAddressEnclosed"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetHostAddressEnclosed") } @@ -239,13 +244,13 @@ func (m *_BACnetHostAddressEnclosed) SerializeWithWriteBuffer(ctx context.Contex return nil } + //// // Arguments Getter func (m *_BACnetHostAddressEnclosed) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -263,3 +268,6 @@ func (m *_BACnetHostAddressEnclosed) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetHostAddressIpAddress.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetHostAddressIpAddress.go index 8a41acc6b3c..18864096474 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetHostAddressIpAddress.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetHostAddressIpAddress.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetHostAddressIpAddress is the corresponding interface of BACnetHostAddressIpAddress type BACnetHostAddressIpAddress interface { @@ -46,9 +48,11 @@ type BACnetHostAddressIpAddressExactly interface { // _BACnetHostAddressIpAddress is the data-structure of this message type _BACnetHostAddressIpAddress struct { *_BACnetHostAddress - IpAddress BACnetContextTagOctetString + IpAddress BACnetContextTagOctetString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetHostAddressIpAddress struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetHostAddressIpAddress) InitializeParent(parent BACnetHostAddress, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetHostAddressIpAddress) InitializeParent(parent BACnetHostAddress , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetHostAddressIpAddress) GetParent() BACnetHostAddress { +func (m *_BACnetHostAddressIpAddress) GetParent() BACnetHostAddress { return m._BACnetHostAddress } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetHostAddressIpAddress) GetIpAddress() BACnetContextTagOctetString /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetHostAddressIpAddress factory function for _BACnetHostAddressIpAddress -func NewBACnetHostAddressIpAddress(ipAddress BACnetContextTagOctetString, peekedTagHeader BACnetTagHeader) *_BACnetHostAddressIpAddress { +func NewBACnetHostAddressIpAddress( ipAddress BACnetContextTagOctetString , peekedTagHeader BACnetTagHeader ) *_BACnetHostAddressIpAddress { _result := &_BACnetHostAddressIpAddress{ - IpAddress: ipAddress, - _BACnetHostAddress: NewBACnetHostAddress(peekedTagHeader), + IpAddress: ipAddress, + _BACnetHostAddress: NewBACnetHostAddress(peekedTagHeader), } _result._BACnetHostAddress._BACnetHostAddressChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetHostAddressIpAddress(ipAddress BACnetContextTagOctetString, peeked // Deprecated: use the interface for direct cast func CastBACnetHostAddressIpAddress(structType interface{}) BACnetHostAddressIpAddress { - if casted, ok := structType.(BACnetHostAddressIpAddress); ok { + if casted, ok := structType.(BACnetHostAddressIpAddress); ok { return casted } if casted, ok := structType.(*BACnetHostAddressIpAddress); ok { @@ -115,6 +118,7 @@ func (m *_BACnetHostAddressIpAddress) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_BACnetHostAddressIpAddress) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetHostAddressIpAddressParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("ipAddress"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for ipAddress") } - _ipAddress, _ipAddressErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_OCTET_STRING)) +_ipAddress, _ipAddressErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_OCTET_STRING ) ) if _ipAddressErr != nil { return nil, errors.Wrap(_ipAddressErr, "Error parsing 'ipAddress' field of BACnetHostAddressIpAddress") } @@ -151,8 +155,9 @@ func BACnetHostAddressIpAddressParseWithBuffer(ctx context.Context, readBuffer u // Create a partially initialized instance _child := &_BACnetHostAddressIpAddress{ - _BACnetHostAddress: &_BACnetHostAddress{}, - IpAddress: ipAddress, + _BACnetHostAddress: &_BACnetHostAddress{ + }, + IpAddress: ipAddress, } _child._BACnetHostAddress._BACnetHostAddressChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetHostAddressIpAddress) SerializeWithWriteBuffer(ctx context.Conte return errors.Wrap(pushErr, "Error pushing for BACnetHostAddressIpAddress") } - // Simple Field (ipAddress) - if pushErr := writeBuffer.PushContext("ipAddress"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for ipAddress") - } - _ipAddressErr := writeBuffer.WriteSerializable(ctx, m.GetIpAddress()) - if popErr := writeBuffer.PopContext("ipAddress"); popErr != nil { - return errors.Wrap(popErr, "Error popping for ipAddress") - } - if _ipAddressErr != nil { - return errors.Wrap(_ipAddressErr, "Error serializing 'ipAddress' field") - } + // Simple Field (ipAddress) + if pushErr := writeBuffer.PushContext("ipAddress"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for ipAddress") + } + _ipAddressErr := writeBuffer.WriteSerializable(ctx, m.GetIpAddress()) + if popErr := writeBuffer.PopContext("ipAddress"); popErr != nil { + return errors.Wrap(popErr, "Error popping for ipAddress") + } + if _ipAddressErr != nil { + return errors.Wrap(_ipAddressErr, "Error serializing 'ipAddress' field") + } if popErr := writeBuffer.PopContext("BACnetHostAddressIpAddress"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetHostAddressIpAddress") @@ -194,6 +199,7 @@ func (m *_BACnetHostAddressIpAddress) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetHostAddressIpAddress) isBACnetHostAddressIpAddress() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetHostAddressIpAddress) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetHostAddressName.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetHostAddressName.go index 968d2ed6d6e..caf4e49a2fd 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetHostAddressName.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetHostAddressName.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetHostAddressName is the corresponding interface of BACnetHostAddressName type BACnetHostAddressName interface { @@ -46,9 +48,11 @@ type BACnetHostAddressNameExactly interface { // _BACnetHostAddressName is the data-structure of this message type _BACnetHostAddressName struct { *_BACnetHostAddress - Name BACnetContextTagCharacterString + Name BACnetContextTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetHostAddressName struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetHostAddressName) InitializeParent(parent BACnetHostAddress, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetHostAddressName) InitializeParent(parent BACnetHostAddress , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetHostAddressName) GetParent() BACnetHostAddress { +func (m *_BACnetHostAddressName) GetParent() BACnetHostAddress { return m._BACnetHostAddress } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetHostAddressName) GetName() BACnetContextTagCharacterString { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetHostAddressName factory function for _BACnetHostAddressName -func NewBACnetHostAddressName(name BACnetContextTagCharacterString, peekedTagHeader BACnetTagHeader) *_BACnetHostAddressName { +func NewBACnetHostAddressName( name BACnetContextTagCharacterString , peekedTagHeader BACnetTagHeader ) *_BACnetHostAddressName { _result := &_BACnetHostAddressName{ - Name: name, - _BACnetHostAddress: NewBACnetHostAddress(peekedTagHeader), + Name: name, + _BACnetHostAddress: NewBACnetHostAddress(peekedTagHeader), } _result._BACnetHostAddress._BACnetHostAddressChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetHostAddressName(name BACnetContextTagCharacterString, peekedTagHea // Deprecated: use the interface for direct cast func CastBACnetHostAddressName(structType interface{}) BACnetHostAddressName { - if casted, ok := structType.(BACnetHostAddressName); ok { + if casted, ok := structType.(BACnetHostAddressName); ok { return casted } if casted, ok := structType.(*BACnetHostAddressName); ok { @@ -115,6 +118,7 @@ func (m *_BACnetHostAddressName) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetHostAddressName) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetHostAddressNameParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("name"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for name") } - _name, _nameErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), BACnetDataType(BACnetDataType_CHARACTER_STRING)) +_name, _nameErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , BACnetDataType( BACnetDataType_CHARACTER_STRING ) ) if _nameErr != nil { return nil, errors.Wrap(_nameErr, "Error parsing 'name' field of BACnetHostAddressName") } @@ -151,8 +155,9 @@ func BACnetHostAddressNameParseWithBuffer(ctx context.Context, readBuffer utils. // Create a partially initialized instance _child := &_BACnetHostAddressName{ - _BACnetHostAddress: &_BACnetHostAddress{}, - Name: name, + _BACnetHostAddress: &_BACnetHostAddress{ + }, + Name: name, } _child._BACnetHostAddress._BACnetHostAddressChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetHostAddressName) SerializeWithWriteBuffer(ctx context.Context, w return errors.Wrap(pushErr, "Error pushing for BACnetHostAddressName") } - // Simple Field (name) - if pushErr := writeBuffer.PushContext("name"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for name") - } - _nameErr := writeBuffer.WriteSerializable(ctx, m.GetName()) - if popErr := writeBuffer.PopContext("name"); popErr != nil { - return errors.Wrap(popErr, "Error popping for name") - } - if _nameErr != nil { - return errors.Wrap(_nameErr, "Error serializing 'name' field") - } + // Simple Field (name) + if pushErr := writeBuffer.PushContext("name"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for name") + } + _nameErr := writeBuffer.WriteSerializable(ctx, m.GetName()) + if popErr := writeBuffer.PopContext("name"); popErr != nil { + return errors.Wrap(popErr, "Error popping for name") + } + if _nameErr != nil { + return errors.Wrap(_nameErr, "Error serializing 'name' field") + } if popErr := writeBuffer.PopContext("BACnetHostAddressName"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetHostAddressName") @@ -194,6 +199,7 @@ func (m *_BACnetHostAddressName) SerializeWithWriteBuffer(ctx context.Context, w return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetHostAddressName) isBACnetHostAddressName() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetHostAddressName) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetHostAddressNull.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetHostAddressNull.go index 5bede581c7a..959d8262e69 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetHostAddressNull.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetHostAddressNull.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetHostAddressNull is the corresponding interface of BACnetHostAddressNull type BACnetHostAddressNull interface { @@ -46,9 +48,11 @@ type BACnetHostAddressNullExactly interface { // _BACnetHostAddressNull is the data-structure of this message type _BACnetHostAddressNull struct { *_BACnetHostAddress - None BACnetContextTagNull + None BACnetContextTagNull } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetHostAddressNull struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetHostAddressNull) InitializeParent(parent BACnetHostAddress, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetHostAddressNull) InitializeParent(parent BACnetHostAddress , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetHostAddressNull) GetParent() BACnetHostAddress { +func (m *_BACnetHostAddressNull) GetParent() BACnetHostAddress { return m._BACnetHostAddress } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetHostAddressNull) GetNone() BACnetContextTagNull { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetHostAddressNull factory function for _BACnetHostAddressNull -func NewBACnetHostAddressNull(none BACnetContextTagNull, peekedTagHeader BACnetTagHeader) *_BACnetHostAddressNull { +func NewBACnetHostAddressNull( none BACnetContextTagNull , peekedTagHeader BACnetTagHeader ) *_BACnetHostAddressNull { _result := &_BACnetHostAddressNull{ - None: none, - _BACnetHostAddress: NewBACnetHostAddress(peekedTagHeader), + None: none, + _BACnetHostAddress: NewBACnetHostAddress(peekedTagHeader), } _result._BACnetHostAddress._BACnetHostAddressChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetHostAddressNull(none BACnetContextTagNull, peekedTagHeader BACnetT // Deprecated: use the interface for direct cast func CastBACnetHostAddressNull(structType interface{}) BACnetHostAddressNull { - if casted, ok := structType.(BACnetHostAddressNull); ok { + if casted, ok := structType.(BACnetHostAddressNull); ok { return casted } if casted, ok := structType.(*BACnetHostAddressNull); ok { @@ -115,6 +118,7 @@ func (m *_BACnetHostAddressNull) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetHostAddressNull) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetHostAddressNullParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("none"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for none") } - _none, _noneErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_NULL)) +_none, _noneErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_NULL ) ) if _noneErr != nil { return nil, errors.Wrap(_noneErr, "Error parsing 'none' field of BACnetHostAddressNull") } @@ -151,8 +155,9 @@ func BACnetHostAddressNullParseWithBuffer(ctx context.Context, readBuffer utils. // Create a partially initialized instance _child := &_BACnetHostAddressNull{ - _BACnetHostAddress: &_BACnetHostAddress{}, - None: none, + _BACnetHostAddress: &_BACnetHostAddress{ + }, + None: none, } _child._BACnetHostAddress._BACnetHostAddressChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetHostAddressNull) SerializeWithWriteBuffer(ctx context.Context, w return errors.Wrap(pushErr, "Error pushing for BACnetHostAddressNull") } - // Simple Field (none) - if pushErr := writeBuffer.PushContext("none"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for none") - } - _noneErr := writeBuffer.WriteSerializable(ctx, m.GetNone()) - if popErr := writeBuffer.PopContext("none"); popErr != nil { - return errors.Wrap(popErr, "Error popping for none") - } - if _noneErr != nil { - return errors.Wrap(_noneErr, "Error serializing 'none' field") - } + // Simple Field (none) + if pushErr := writeBuffer.PushContext("none"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for none") + } + _noneErr := writeBuffer.WriteSerializable(ctx, m.GetNone()) + if popErr := writeBuffer.PopContext("none"); popErr != nil { + return errors.Wrap(popErr, "Error popping for none") + } + if _noneErr != nil { + return errors.Wrap(_noneErr, "Error serializing 'none' field") + } if popErr := writeBuffer.PopContext("BACnetHostAddressNull"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetHostAddressNull") @@ -194,6 +199,7 @@ func (m *_BACnetHostAddressNull) SerializeWithWriteBuffer(ctx context.Context, w return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetHostAddressNull) isBACnetHostAddressNull() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetHostAddressNull) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetHostNPort.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetHostNPort.go index cb4fe378397..ceeedb7a2ed 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetHostNPort.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetHostNPort.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetHostNPort is the corresponding interface of BACnetHostNPort type BACnetHostNPort interface { @@ -46,10 +48,11 @@ type BACnetHostNPortExactly interface { // _BACnetHostNPort is the data-structure of this message type _BACnetHostNPort struct { - Host BACnetHostAddressEnclosed - Port BACnetContextTagUnsignedInteger + Host BACnetHostAddressEnclosed + Port BACnetContextTagUnsignedInteger } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -68,14 +71,15 @@ func (m *_BACnetHostNPort) GetPort() BACnetContextTagUnsignedInteger { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetHostNPort factory function for _BACnetHostNPort -func NewBACnetHostNPort(host BACnetHostAddressEnclosed, port BACnetContextTagUnsignedInteger) *_BACnetHostNPort { - return &_BACnetHostNPort{Host: host, Port: port} +func NewBACnetHostNPort( host BACnetHostAddressEnclosed , port BACnetContextTagUnsignedInteger ) *_BACnetHostNPort { +return &_BACnetHostNPort{ Host: host , Port: port } } // Deprecated: use the interface for direct cast func CastBACnetHostNPort(structType interface{}) BACnetHostNPort { - if casted, ok := structType.(BACnetHostNPort); ok { + if casted, ok := structType.(BACnetHostNPort); ok { return casted } if casted, ok := structType.(*BACnetHostNPort); ok { @@ -100,6 +104,7 @@ func (m *_BACnetHostNPort) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetHostNPort) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -121,7 +126,7 @@ func BACnetHostNPortParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu if pullErr := readBuffer.PullContext("host"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for host") } - _host, _hostErr := BACnetHostAddressEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_host, _hostErr := BACnetHostAddressEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _hostErr != nil { return nil, errors.Wrap(_hostErr, "Error parsing 'host' field of BACnetHostNPort") } @@ -134,7 +139,7 @@ func BACnetHostNPortParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu if pullErr := readBuffer.PullContext("port"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for port") } - _port, _portErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_port, _portErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _portErr != nil { return nil, errors.Wrap(_portErr, "Error parsing 'port' field of BACnetHostNPort") } @@ -149,9 +154,9 @@ func BACnetHostNPortParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu // Create the instance return &_BACnetHostNPort{ - Host: host, - Port: port, - }, nil + Host: host, + Port: port, + }, nil } func (m *_BACnetHostNPort) Serialize() ([]byte, error) { @@ -165,7 +170,7 @@ func (m *_BACnetHostNPort) Serialize() ([]byte, error) { func (m *_BACnetHostNPort) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetHostNPort"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetHostNPort"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetHostNPort") } @@ -199,6 +204,7 @@ func (m *_BACnetHostNPort) SerializeWithWriteBuffer(ctx context.Context, writeBu return nil } + func (m *_BACnetHostNPort) isBACnetHostNPort() bool { return true } @@ -213,3 +219,6 @@ func (m *_BACnetHostNPort) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetHostNPortEnclosed.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetHostNPortEnclosed.go index 941be27e6f9..d9babf78223 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetHostNPortEnclosed.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetHostNPortEnclosed.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetHostNPortEnclosed is the corresponding interface of BACnetHostNPortEnclosed type BACnetHostNPortEnclosed interface { @@ -48,14 +50,15 @@ type BACnetHostNPortEnclosedExactly interface { // _BACnetHostNPortEnclosed is the data-structure of this message type _BACnetHostNPortEnclosed struct { - OpeningTag BACnetOpeningTag - BacnetHostNPort BACnetHostNPort - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + BacnetHostNPort BACnetHostNPort + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -78,14 +81,15 @@ func (m *_BACnetHostNPortEnclosed) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetHostNPortEnclosed factory function for _BACnetHostNPortEnclosed -func NewBACnetHostNPortEnclosed(openingTag BACnetOpeningTag, bacnetHostNPort BACnetHostNPort, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetHostNPortEnclosed { - return &_BACnetHostNPortEnclosed{OpeningTag: openingTag, BacnetHostNPort: bacnetHostNPort, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetHostNPortEnclosed( openingTag BACnetOpeningTag , bacnetHostNPort BACnetHostNPort , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetHostNPortEnclosed { +return &_BACnetHostNPortEnclosed{ OpeningTag: openingTag , BacnetHostNPort: bacnetHostNPort , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetHostNPortEnclosed(structType interface{}) BACnetHostNPortEnclosed { - if casted, ok := structType.(BACnetHostNPortEnclosed); ok { + if casted, ok := structType.(BACnetHostNPortEnclosed); ok { return casted } if casted, ok := structType.(*BACnetHostNPortEnclosed); ok { @@ -113,6 +117,7 @@ func (m *_BACnetHostNPortEnclosed) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetHostNPortEnclosed) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -134,7 +139,7 @@ func BACnetHostNPortEnclosedParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetHostNPortEnclosed") } @@ -147,7 +152,7 @@ func BACnetHostNPortEnclosedParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("bacnetHostNPort"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for bacnetHostNPort") } - _bacnetHostNPort, _bacnetHostNPortErr := BACnetHostNPortParseWithBuffer(ctx, readBuffer) +_bacnetHostNPort, _bacnetHostNPortErr := BACnetHostNPortParseWithBuffer(ctx, readBuffer) if _bacnetHostNPortErr != nil { return nil, errors.Wrap(_bacnetHostNPortErr, "Error parsing 'bacnetHostNPort' field of BACnetHostNPortEnclosed") } @@ -160,7 +165,7 @@ func BACnetHostNPortEnclosedParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetHostNPortEnclosed") } @@ -175,11 +180,11 @@ func BACnetHostNPortEnclosedParseWithBuffer(ctx context.Context, readBuffer util // Create the instance return &_BACnetHostNPortEnclosed{ - TagNumber: tagNumber, - OpeningTag: openingTag, - BacnetHostNPort: bacnetHostNPort, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + BacnetHostNPort: bacnetHostNPort, + ClosingTag: closingTag, + }, nil } func (m *_BACnetHostNPortEnclosed) Serialize() ([]byte, error) { @@ -193,7 +198,7 @@ func (m *_BACnetHostNPortEnclosed) Serialize() ([]byte, error) { func (m *_BACnetHostNPortEnclosed) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetHostNPortEnclosed"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetHostNPortEnclosed"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetHostNPortEnclosed") } @@ -239,13 +244,13 @@ func (m *_BACnetHostNPortEnclosed) SerializeWithWriteBuffer(ctx context.Context, return nil } + //// // Arguments Getter func (m *_BACnetHostNPortEnclosed) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -263,3 +268,6 @@ func (m *_BACnetHostNPortEnclosed) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetIPMode.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetIPMode.go index 4eb189b18db..ae3b44c3746 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetIPMode.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetIPMode.go @@ -34,17 +34,17 @@ type IBACnetIPMode interface { utils.Serializable } -const ( - BACnetIPMode_NORMAL BACnetIPMode = 0 +const( + BACnetIPMode_NORMAL BACnetIPMode = 0 BACnetIPMode_FOREIGN BACnetIPMode = 1 - BACnetIPMode_BBMD BACnetIPMode = 2 + BACnetIPMode_BBMD BACnetIPMode = 2 ) var BACnetIPModeValues []BACnetIPMode func init() { _ = errors.New - BACnetIPModeValues = []BACnetIPMode{ + BACnetIPModeValues = []BACnetIPMode { BACnetIPMode_NORMAL, BACnetIPMode_FOREIGN, BACnetIPMode_BBMD, @@ -53,12 +53,12 @@ func init() { func BACnetIPModeByValue(value uint8) (enum BACnetIPMode, ok bool) { switch value { - case 0: - return BACnetIPMode_NORMAL, true - case 1: - return BACnetIPMode_FOREIGN, true - case 2: - return BACnetIPMode_BBMD, true + case 0: + return BACnetIPMode_NORMAL, true + case 1: + return BACnetIPMode_FOREIGN, true + case 2: + return BACnetIPMode_BBMD, true } return 0, false } @@ -75,13 +75,13 @@ func BACnetIPModeByName(value string) (enum BACnetIPMode, ok bool) { return 0, false } -func BACnetIPModeKnows(value uint8) bool { +func BACnetIPModeKnows(value uint8) bool { for _, typeValue := range BACnetIPModeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetIPMode(structType interface{}) BACnetIPMode { @@ -147,3 +147,4 @@ func (e BACnetIPMode) PLC4XEnumName() string { func (e BACnetIPMode) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetIPModeTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetIPModeTagged.go index fe7f2c6b835..3d09e72d727 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetIPModeTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetIPModeTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetIPModeTagged is the corresponding interface of BACnetIPModeTagged type BACnetIPModeTagged interface { @@ -46,14 +48,15 @@ type BACnetIPModeTaggedExactly interface { // _BACnetIPModeTagged is the data-structure of this message type _BACnetIPModeTagged struct { - Header BACnetTagHeader - Value BACnetIPMode + Header BACnetTagHeader + Value BACnetIPMode // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_BACnetIPModeTagged) GetValue() BACnetIPMode { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetIPModeTagged factory function for _BACnetIPModeTagged -func NewBACnetIPModeTagged(header BACnetTagHeader, value BACnetIPMode, tagNumber uint8, tagClass TagClass) *_BACnetIPModeTagged { - return &_BACnetIPModeTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetIPModeTagged( header BACnetTagHeader , value BACnetIPMode , tagNumber uint8 , tagClass TagClass ) *_BACnetIPModeTagged { +return &_BACnetIPModeTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetIPModeTagged(structType interface{}) BACnetIPModeTagged { - if casted, ok := structType.(BACnetIPModeTagged); ok { + if casted, ok := structType.(BACnetIPModeTagged); ok { return casted } if casted, ok := structType.(*BACnetIPModeTagged); ok { @@ -104,6 +108,7 @@ func (m *_BACnetIPModeTagged) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetIPModeTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func BACnetIPModeTaggedParseWithBuffer(ctx context.Context, readBuffer utils.Rea if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetIPModeTagged") } @@ -135,12 +140,12 @@ func BACnetIPModeTaggedParseWithBuffer(ctx context.Context, readBuffer utils.Rea } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func BACnetIPModeTaggedParseWithBuffer(ctx context.Context, readBuffer utils.Rea } var value BACnetIPMode if _value != nil { - value = _value.(BACnetIPMode) + value = _value.(BACnetIPMode) } if closeErr := readBuffer.CloseContext("BACnetIPModeTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func BACnetIPModeTaggedParseWithBuffer(ctx context.Context, readBuffer utils.Rea // Create the instance return &_BACnetIPModeTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_BACnetIPModeTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_BACnetIPModeTagged) Serialize() ([]byte, error) { func (m *_BACnetIPModeTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetIPModeTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetIPModeTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetIPModeTagged") } @@ -206,6 +211,7 @@ func (m *_BACnetIPModeTagged) SerializeWithWriteBuffer(ctx context.Context, writ return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_BACnetIPModeTagged) GetTagNumber() uint8 { func (m *_BACnetIPModeTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_BACnetIPModeTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetKeyIdentifier.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetKeyIdentifier.go index 841b54c7612..5191ec6e9cb 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetKeyIdentifier.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetKeyIdentifier.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetKeyIdentifier is the corresponding interface of BACnetKeyIdentifier type BACnetKeyIdentifier interface { @@ -46,10 +48,11 @@ type BACnetKeyIdentifierExactly interface { // _BACnetKeyIdentifier is the data-structure of this message type _BACnetKeyIdentifier struct { - Algorithm BACnetContextTagUnsignedInteger - KeyId BACnetContextTagUnsignedInteger + Algorithm BACnetContextTagUnsignedInteger + KeyId BACnetContextTagUnsignedInteger } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -68,14 +71,15 @@ func (m *_BACnetKeyIdentifier) GetKeyId() BACnetContextTagUnsignedInteger { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetKeyIdentifier factory function for _BACnetKeyIdentifier -func NewBACnetKeyIdentifier(algorithm BACnetContextTagUnsignedInteger, keyId BACnetContextTagUnsignedInteger) *_BACnetKeyIdentifier { - return &_BACnetKeyIdentifier{Algorithm: algorithm, KeyId: keyId} +func NewBACnetKeyIdentifier( algorithm BACnetContextTagUnsignedInteger , keyId BACnetContextTagUnsignedInteger ) *_BACnetKeyIdentifier { +return &_BACnetKeyIdentifier{ Algorithm: algorithm , KeyId: keyId } } // Deprecated: use the interface for direct cast func CastBACnetKeyIdentifier(structType interface{}) BACnetKeyIdentifier { - if casted, ok := structType.(BACnetKeyIdentifier); ok { + if casted, ok := structType.(BACnetKeyIdentifier); ok { return casted } if casted, ok := structType.(*BACnetKeyIdentifier); ok { @@ -100,6 +104,7 @@ func (m *_BACnetKeyIdentifier) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetKeyIdentifier) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -121,7 +126,7 @@ func BACnetKeyIdentifierParseWithBuffer(ctx context.Context, readBuffer utils.Re if pullErr := readBuffer.PullContext("algorithm"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for algorithm") } - _algorithm, _algorithmErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_algorithm, _algorithmErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _algorithmErr != nil { return nil, errors.Wrap(_algorithmErr, "Error parsing 'algorithm' field of BACnetKeyIdentifier") } @@ -134,7 +139,7 @@ func BACnetKeyIdentifierParseWithBuffer(ctx context.Context, readBuffer utils.Re if pullErr := readBuffer.PullContext("keyId"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for keyId") } - _keyId, _keyIdErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_keyId, _keyIdErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _keyIdErr != nil { return nil, errors.Wrap(_keyIdErr, "Error parsing 'keyId' field of BACnetKeyIdentifier") } @@ -149,9 +154,9 @@ func BACnetKeyIdentifierParseWithBuffer(ctx context.Context, readBuffer utils.Re // Create the instance return &_BACnetKeyIdentifier{ - Algorithm: algorithm, - KeyId: keyId, - }, nil + Algorithm: algorithm, + KeyId: keyId, + }, nil } func (m *_BACnetKeyIdentifier) Serialize() ([]byte, error) { @@ -165,7 +170,7 @@ func (m *_BACnetKeyIdentifier) Serialize() ([]byte, error) { func (m *_BACnetKeyIdentifier) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetKeyIdentifier"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetKeyIdentifier"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetKeyIdentifier") } @@ -199,6 +204,7 @@ func (m *_BACnetKeyIdentifier) SerializeWithWriteBuffer(ctx context.Context, wri return nil } + func (m *_BACnetKeyIdentifier) isBACnetKeyIdentifier() bool { return true } @@ -213,3 +219,6 @@ func (m *_BACnetKeyIdentifier) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLandingCallStatus.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLandingCallStatus.go index 7a63eafab30..91d39e47e94 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLandingCallStatus.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLandingCallStatus.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLandingCallStatus is the corresponding interface of BACnetLandingCallStatus type BACnetLandingCallStatus interface { @@ -49,11 +51,12 @@ type BACnetLandingCallStatusExactly interface { // _BACnetLandingCallStatus is the data-structure of this message type _BACnetLandingCallStatus struct { - FloorNumber BACnetContextTagUnsignedInteger - Command BACnetLandingCallStatusCommand - FloorText BACnetContextTagCharacterString + FloorNumber BACnetContextTagUnsignedInteger + Command BACnetLandingCallStatusCommand + FloorText BACnetContextTagCharacterString } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -76,14 +79,15 @@ func (m *_BACnetLandingCallStatus) GetFloorText() BACnetContextTagCharacterStrin /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLandingCallStatus factory function for _BACnetLandingCallStatus -func NewBACnetLandingCallStatus(floorNumber BACnetContextTagUnsignedInteger, command BACnetLandingCallStatusCommand, floorText BACnetContextTagCharacterString) *_BACnetLandingCallStatus { - return &_BACnetLandingCallStatus{FloorNumber: floorNumber, Command: command, FloorText: floorText} +func NewBACnetLandingCallStatus( floorNumber BACnetContextTagUnsignedInteger , command BACnetLandingCallStatusCommand , floorText BACnetContextTagCharacterString ) *_BACnetLandingCallStatus { +return &_BACnetLandingCallStatus{ FloorNumber: floorNumber , Command: command , FloorText: floorText } } // Deprecated: use the interface for direct cast func CastBACnetLandingCallStatus(structType interface{}) BACnetLandingCallStatus { - if casted, ok := structType.(BACnetLandingCallStatus); ok { + if casted, ok := structType.(BACnetLandingCallStatus); ok { return casted } if casted, ok := structType.(*BACnetLandingCallStatus); ok { @@ -113,6 +117,7 @@ func (m *_BACnetLandingCallStatus) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetLandingCallStatus) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -134,7 +139,7 @@ func BACnetLandingCallStatusParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("floorNumber"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for floorNumber") } - _floorNumber, _floorNumberErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_floorNumber, _floorNumberErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _floorNumberErr != nil { return nil, errors.Wrap(_floorNumberErr, "Error parsing 'floorNumber' field of BACnetLandingCallStatus") } @@ -147,7 +152,7 @@ func BACnetLandingCallStatusParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("command"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for command") } - _command, _commandErr := BACnetLandingCallStatusCommandParseWithBuffer(ctx, readBuffer) +_command, _commandErr := BACnetLandingCallStatusCommandParseWithBuffer(ctx, readBuffer) if _commandErr != nil { return nil, errors.Wrap(_commandErr, "Error parsing 'command' field of BACnetLandingCallStatus") } @@ -158,12 +163,12 @@ func BACnetLandingCallStatusParseWithBuffer(ctx context.Context, readBuffer util // Optional Field (floorText) (Can be skipped, if a given expression evaluates to false) var floorText BACnetContextTagCharacterString = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("floorText"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for floorText") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(3), BACnetDataType_CHARACTER_STRING) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(3) , BACnetDataType_CHARACTER_STRING ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -184,10 +189,10 @@ func BACnetLandingCallStatusParseWithBuffer(ctx context.Context, readBuffer util // Create the instance return &_BACnetLandingCallStatus{ - FloorNumber: floorNumber, - Command: command, - FloorText: floorText, - }, nil + FloorNumber: floorNumber, + Command: command, + FloorText: floorText, + }, nil } func (m *_BACnetLandingCallStatus) Serialize() ([]byte, error) { @@ -201,7 +206,7 @@ func (m *_BACnetLandingCallStatus) Serialize() ([]byte, error) { func (m *_BACnetLandingCallStatus) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetLandingCallStatus"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetLandingCallStatus"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetLandingCallStatus") } @@ -251,6 +256,7 @@ func (m *_BACnetLandingCallStatus) SerializeWithWriteBuffer(ctx context.Context, return nil } + func (m *_BACnetLandingCallStatus) isBACnetLandingCallStatus() bool { return true } @@ -265,3 +271,6 @@ func (m *_BACnetLandingCallStatus) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLandingCallStatusCommand.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLandingCallStatusCommand.go index 7ef3f5db3d9..f0e35a40534 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLandingCallStatusCommand.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLandingCallStatusCommand.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLandingCallStatusCommand is the corresponding interface of BACnetLandingCallStatusCommand type BACnetLandingCallStatusCommand interface { @@ -47,7 +49,7 @@ type BACnetLandingCallStatusCommandExactly interface { // _BACnetLandingCallStatusCommand is the data-structure of this message type _BACnetLandingCallStatusCommand struct { _BACnetLandingCallStatusCommandChildRequirements - PeekedTagHeader BACnetTagHeader + PeekedTagHeader BACnetTagHeader } type _BACnetLandingCallStatusCommandChildRequirements interface { @@ -55,6 +57,7 @@ type _BACnetLandingCallStatusCommandChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type BACnetLandingCallStatusCommandParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetLandingCallStatusCommand, serializeChildFunction func() error) error GetTypeName() string @@ -62,13 +65,12 @@ type BACnetLandingCallStatusCommandParent interface { type BACnetLandingCallStatusCommandChild interface { utils.Serializable - InitializeParent(parent BACnetLandingCallStatusCommand, peekedTagHeader BACnetTagHeader) +InitializeParent(parent BACnetLandingCallStatusCommand , peekedTagHeader BACnetTagHeader ) GetParent() *BACnetLandingCallStatusCommand GetTypeName() string BACnetLandingCallStatusCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,14 +100,15 @@ func (m *_BACnetLandingCallStatusCommand) GetPeekedTagNumber() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLandingCallStatusCommand factory function for _BACnetLandingCallStatusCommand -func NewBACnetLandingCallStatusCommand(peekedTagHeader BACnetTagHeader) *_BACnetLandingCallStatusCommand { - return &_BACnetLandingCallStatusCommand{PeekedTagHeader: peekedTagHeader} +func NewBACnetLandingCallStatusCommand( peekedTagHeader BACnetTagHeader ) *_BACnetLandingCallStatusCommand { +return &_BACnetLandingCallStatusCommand{ PeekedTagHeader: peekedTagHeader } } // Deprecated: use the interface for direct cast func CastBACnetLandingCallStatusCommand(structType interface{}) BACnetLandingCallStatusCommand { - if casted, ok := structType.(BACnetLandingCallStatusCommand); ok { + if casted, ok := structType.(BACnetLandingCallStatusCommand); ok { return casted } if casted, ok := structType.(*BACnetLandingCallStatusCommand); ok { @@ -118,6 +121,7 @@ func (m *_BACnetLandingCallStatusCommand) GetTypeName() string { return "BACnetLandingCallStatusCommand" } + func (m *_BACnetLandingCallStatusCommand) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -143,13 +147,13 @@ func BACnetLandingCallStatusCommandParseWithBuffer(ctx context.Context, readBuff currentPos := positionAware.GetPos() _ = currentPos - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Virtual field _peekedTagNumber := peekedTagHeader.GetActualTagNumber() @@ -159,17 +163,17 @@ func BACnetLandingCallStatusCommandParseWithBuffer(ctx context.Context, readBuff // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetLandingCallStatusCommandChildSerializeRequirement interface { BACnetLandingCallStatusCommand - InitializeParent(BACnetLandingCallStatusCommand, BACnetTagHeader) + InitializeParent(BACnetLandingCallStatusCommand, BACnetTagHeader) GetParent() BACnetLandingCallStatusCommand } var _childTemp interface{} var _child BACnetLandingCallStatusCommandChildSerializeRequirement var typeSwitchError error switch { - case peekedTagNumber == uint8(1): // BACnetLandingCallStatusCommandDirection - _childTemp, typeSwitchError = BACnetLandingCallStatusCommandDirectionParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(2): // BACnetLandingCallStatusCommandDestination - _childTemp, typeSwitchError = BACnetLandingCallStatusCommandDestinationParseWithBuffer(ctx, readBuffer) +case peekedTagNumber == uint8(1) : // BACnetLandingCallStatusCommandDirection + _childTemp, typeSwitchError = BACnetLandingCallStatusCommandDirectionParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(2) : // BACnetLandingCallStatusCommandDestination + _childTemp, typeSwitchError = BACnetLandingCallStatusCommandDestinationParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedTagNumber=%v]", peekedTagNumber) } @@ -183,7 +187,7 @@ func BACnetLandingCallStatusCommandParseWithBuffer(ctx context.Context, readBuff } // Finish initializing - _child.InitializeParent(_child, peekedTagHeader) +_child.InitializeParent(_child , peekedTagHeader ) return _child, nil } @@ -193,7 +197,7 @@ func (pm *_BACnetLandingCallStatusCommand) SerializeParent(ctx context.Context, _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetLandingCallStatusCommand"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetLandingCallStatusCommand"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetLandingCallStatusCommand") } // Virtual field @@ -212,6 +216,7 @@ func (pm *_BACnetLandingCallStatusCommand) SerializeParent(ctx context.Context, return nil } + func (m *_BACnetLandingCallStatusCommand) isBACnetLandingCallStatusCommand() bool { return true } @@ -226,3 +231,6 @@ func (m *_BACnetLandingCallStatusCommand) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLandingCallStatusCommandDestination.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLandingCallStatusCommandDestination.go index b7f777e95e4..0645f0042e7 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLandingCallStatusCommandDestination.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLandingCallStatusCommandDestination.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLandingCallStatusCommandDestination is the corresponding interface of BACnetLandingCallStatusCommandDestination type BACnetLandingCallStatusCommandDestination interface { @@ -46,9 +48,11 @@ type BACnetLandingCallStatusCommandDestinationExactly interface { // _BACnetLandingCallStatusCommandDestination is the data-structure of this message type _BACnetLandingCallStatusCommandDestination struct { *_BACnetLandingCallStatusCommand - Destination BACnetContextTagUnsignedInteger + Destination BACnetContextTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetLandingCallStatusCommandDestination struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetLandingCallStatusCommandDestination) InitializeParent(parent BACnetLandingCallStatusCommand, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetLandingCallStatusCommandDestination) InitializeParent(parent BACnetLandingCallStatusCommand , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetLandingCallStatusCommandDestination) GetParent() BACnetLandingCallStatusCommand { +func (m *_BACnetLandingCallStatusCommandDestination) GetParent() BACnetLandingCallStatusCommand { return m._BACnetLandingCallStatusCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetLandingCallStatusCommandDestination) GetDestination() BACnetCont /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLandingCallStatusCommandDestination factory function for _BACnetLandingCallStatusCommandDestination -func NewBACnetLandingCallStatusCommandDestination(destination BACnetContextTagUnsignedInteger, peekedTagHeader BACnetTagHeader) *_BACnetLandingCallStatusCommandDestination { +func NewBACnetLandingCallStatusCommandDestination( destination BACnetContextTagUnsignedInteger , peekedTagHeader BACnetTagHeader ) *_BACnetLandingCallStatusCommandDestination { _result := &_BACnetLandingCallStatusCommandDestination{ - Destination: destination, - _BACnetLandingCallStatusCommand: NewBACnetLandingCallStatusCommand(peekedTagHeader), + Destination: destination, + _BACnetLandingCallStatusCommand: NewBACnetLandingCallStatusCommand(peekedTagHeader), } _result._BACnetLandingCallStatusCommand._BACnetLandingCallStatusCommandChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetLandingCallStatusCommandDestination(destination BACnetContextTagUn // Deprecated: use the interface for direct cast func CastBACnetLandingCallStatusCommandDestination(structType interface{}) BACnetLandingCallStatusCommandDestination { - if casted, ok := structType.(BACnetLandingCallStatusCommandDestination); ok { + if casted, ok := structType.(BACnetLandingCallStatusCommandDestination); ok { return casted } if casted, ok := structType.(*BACnetLandingCallStatusCommandDestination); ok { @@ -115,6 +118,7 @@ func (m *_BACnetLandingCallStatusCommandDestination) GetLengthInBits(ctx context return lengthInBits } + func (m *_BACnetLandingCallStatusCommandDestination) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetLandingCallStatusCommandDestinationParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("destination"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for destination") } - _destination, _destinationErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_destination, _destinationErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _destinationErr != nil { return nil, errors.Wrap(_destinationErr, "Error parsing 'destination' field of BACnetLandingCallStatusCommandDestination") } @@ -151,8 +155,9 @@ func BACnetLandingCallStatusCommandDestinationParseWithBuffer(ctx context.Contex // Create a partially initialized instance _child := &_BACnetLandingCallStatusCommandDestination{ - _BACnetLandingCallStatusCommand: &_BACnetLandingCallStatusCommand{}, - Destination: destination, + _BACnetLandingCallStatusCommand: &_BACnetLandingCallStatusCommand{ + }, + Destination: destination, } _child._BACnetLandingCallStatusCommand._BACnetLandingCallStatusCommandChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetLandingCallStatusCommandDestination) SerializeWithWriteBuffer(ct return errors.Wrap(pushErr, "Error pushing for BACnetLandingCallStatusCommandDestination") } - // Simple Field (destination) - if pushErr := writeBuffer.PushContext("destination"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for destination") - } - _destinationErr := writeBuffer.WriteSerializable(ctx, m.GetDestination()) - if popErr := writeBuffer.PopContext("destination"); popErr != nil { - return errors.Wrap(popErr, "Error popping for destination") - } - if _destinationErr != nil { - return errors.Wrap(_destinationErr, "Error serializing 'destination' field") - } + // Simple Field (destination) + if pushErr := writeBuffer.PushContext("destination"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for destination") + } + _destinationErr := writeBuffer.WriteSerializable(ctx, m.GetDestination()) + if popErr := writeBuffer.PopContext("destination"); popErr != nil { + return errors.Wrap(popErr, "Error popping for destination") + } + if _destinationErr != nil { + return errors.Wrap(_destinationErr, "Error serializing 'destination' field") + } if popErr := writeBuffer.PopContext("BACnetLandingCallStatusCommandDestination"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetLandingCallStatusCommandDestination") @@ -194,6 +199,7 @@ func (m *_BACnetLandingCallStatusCommandDestination) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetLandingCallStatusCommandDestination) isBACnetLandingCallStatusCommandDestination() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetLandingCallStatusCommandDestination) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLandingCallStatusCommandDirection.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLandingCallStatusCommandDirection.go index c4b8aecb999..03ab1246fa4 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLandingCallStatusCommandDirection.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLandingCallStatusCommandDirection.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLandingCallStatusCommandDirection is the corresponding interface of BACnetLandingCallStatusCommandDirection type BACnetLandingCallStatusCommandDirection interface { @@ -46,9 +48,11 @@ type BACnetLandingCallStatusCommandDirectionExactly interface { // _BACnetLandingCallStatusCommandDirection is the data-structure of this message type _BACnetLandingCallStatusCommandDirection struct { *_BACnetLandingCallStatusCommand - Direction BACnetLiftCarDirectionTagged + Direction BACnetLiftCarDirectionTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetLandingCallStatusCommandDirection struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetLandingCallStatusCommandDirection) InitializeParent(parent BACnetLandingCallStatusCommand, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetLandingCallStatusCommandDirection) InitializeParent(parent BACnetLandingCallStatusCommand , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetLandingCallStatusCommandDirection) GetParent() BACnetLandingCallStatusCommand { +func (m *_BACnetLandingCallStatusCommandDirection) GetParent() BACnetLandingCallStatusCommand { return m._BACnetLandingCallStatusCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetLandingCallStatusCommandDirection) GetDirection() BACnetLiftCarD /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLandingCallStatusCommandDirection factory function for _BACnetLandingCallStatusCommandDirection -func NewBACnetLandingCallStatusCommandDirection(direction BACnetLiftCarDirectionTagged, peekedTagHeader BACnetTagHeader) *_BACnetLandingCallStatusCommandDirection { +func NewBACnetLandingCallStatusCommandDirection( direction BACnetLiftCarDirectionTagged , peekedTagHeader BACnetTagHeader ) *_BACnetLandingCallStatusCommandDirection { _result := &_BACnetLandingCallStatusCommandDirection{ - Direction: direction, - _BACnetLandingCallStatusCommand: NewBACnetLandingCallStatusCommand(peekedTagHeader), + Direction: direction, + _BACnetLandingCallStatusCommand: NewBACnetLandingCallStatusCommand(peekedTagHeader), } _result._BACnetLandingCallStatusCommand._BACnetLandingCallStatusCommandChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetLandingCallStatusCommandDirection(direction BACnetLiftCarDirection // Deprecated: use the interface for direct cast func CastBACnetLandingCallStatusCommandDirection(structType interface{}) BACnetLandingCallStatusCommandDirection { - if casted, ok := structType.(BACnetLandingCallStatusCommandDirection); ok { + if casted, ok := structType.(BACnetLandingCallStatusCommandDirection); ok { return casted } if casted, ok := structType.(*BACnetLandingCallStatusCommandDirection); ok { @@ -115,6 +118,7 @@ func (m *_BACnetLandingCallStatusCommandDirection) GetLengthInBits(ctx context.C return lengthInBits } + func (m *_BACnetLandingCallStatusCommandDirection) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetLandingCallStatusCommandDirectionParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("direction"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for direction") } - _direction, _directionErr := BACnetLiftCarDirectionTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_direction, _directionErr := BACnetLiftCarDirectionTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _directionErr != nil { return nil, errors.Wrap(_directionErr, "Error parsing 'direction' field of BACnetLandingCallStatusCommandDirection") } @@ -151,8 +155,9 @@ func BACnetLandingCallStatusCommandDirectionParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetLandingCallStatusCommandDirection{ - _BACnetLandingCallStatusCommand: &_BACnetLandingCallStatusCommand{}, - Direction: direction, + _BACnetLandingCallStatusCommand: &_BACnetLandingCallStatusCommand{ + }, + Direction: direction, } _child._BACnetLandingCallStatusCommand._BACnetLandingCallStatusCommandChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetLandingCallStatusCommandDirection) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetLandingCallStatusCommandDirection") } - // Simple Field (direction) - if pushErr := writeBuffer.PushContext("direction"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for direction") - } - _directionErr := writeBuffer.WriteSerializable(ctx, m.GetDirection()) - if popErr := writeBuffer.PopContext("direction"); popErr != nil { - return errors.Wrap(popErr, "Error popping for direction") - } - if _directionErr != nil { - return errors.Wrap(_directionErr, "Error serializing 'direction' field") - } + // Simple Field (direction) + if pushErr := writeBuffer.PushContext("direction"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for direction") + } + _directionErr := writeBuffer.WriteSerializable(ctx, m.GetDirection()) + if popErr := writeBuffer.PopContext("direction"); popErr != nil { + return errors.Wrap(popErr, "Error popping for direction") + } + if _directionErr != nil { + return errors.Wrap(_directionErr, "Error serializing 'direction' field") + } if popErr := writeBuffer.PopContext("BACnetLandingCallStatusCommandDirection"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetLandingCallStatusCommandDirection") @@ -194,6 +199,7 @@ func (m *_BACnetLandingCallStatusCommandDirection) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetLandingCallStatusCommandDirection) isBACnetLandingCallStatusCommandDirection() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetLandingCallStatusCommandDirection) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLandingDoorStatus.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLandingDoorStatus.go index 75ada12c19b..17f2b040af1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLandingDoorStatus.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLandingDoorStatus.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLandingDoorStatus is the corresponding interface of BACnetLandingDoorStatus type BACnetLandingDoorStatus interface { @@ -44,9 +46,10 @@ type BACnetLandingDoorStatusExactly interface { // _BACnetLandingDoorStatus is the data-structure of this message type _BACnetLandingDoorStatus struct { - LandingDoors BACnetLandingDoorStatusLandingDoorsList + LandingDoors BACnetLandingDoorStatusLandingDoorsList } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -61,14 +64,15 @@ func (m *_BACnetLandingDoorStatus) GetLandingDoors() BACnetLandingDoorStatusLand /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLandingDoorStatus factory function for _BACnetLandingDoorStatus -func NewBACnetLandingDoorStatus(landingDoors BACnetLandingDoorStatusLandingDoorsList) *_BACnetLandingDoorStatus { - return &_BACnetLandingDoorStatus{LandingDoors: landingDoors} +func NewBACnetLandingDoorStatus( landingDoors BACnetLandingDoorStatusLandingDoorsList ) *_BACnetLandingDoorStatus { +return &_BACnetLandingDoorStatus{ LandingDoors: landingDoors } } // Deprecated: use the interface for direct cast func CastBACnetLandingDoorStatus(structType interface{}) BACnetLandingDoorStatus { - if casted, ok := structType.(BACnetLandingDoorStatus); ok { + if casted, ok := structType.(BACnetLandingDoorStatus); ok { return casted } if casted, ok := structType.(*BACnetLandingDoorStatus); ok { @@ -90,6 +94,7 @@ func (m *_BACnetLandingDoorStatus) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetLandingDoorStatus) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -111,7 +116,7 @@ func BACnetLandingDoorStatusParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("landingDoors"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for landingDoors") } - _landingDoors, _landingDoorsErr := BACnetLandingDoorStatusLandingDoorsListParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_landingDoors, _landingDoorsErr := BACnetLandingDoorStatusLandingDoorsListParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _landingDoorsErr != nil { return nil, errors.Wrap(_landingDoorsErr, "Error parsing 'landingDoors' field of BACnetLandingDoorStatus") } @@ -126,8 +131,8 @@ func BACnetLandingDoorStatusParseWithBuffer(ctx context.Context, readBuffer util // Create the instance return &_BACnetLandingDoorStatus{ - LandingDoors: landingDoors, - }, nil + LandingDoors: landingDoors, + }, nil } func (m *_BACnetLandingDoorStatus) Serialize() ([]byte, error) { @@ -141,7 +146,7 @@ func (m *_BACnetLandingDoorStatus) Serialize() ([]byte, error) { func (m *_BACnetLandingDoorStatus) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetLandingDoorStatus"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetLandingDoorStatus"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetLandingDoorStatus") } @@ -163,6 +168,7 @@ func (m *_BACnetLandingDoorStatus) SerializeWithWriteBuffer(ctx context.Context, return nil } + func (m *_BACnetLandingDoorStatus) isBACnetLandingDoorStatus() bool { return true } @@ -177,3 +183,6 @@ func (m *_BACnetLandingDoorStatus) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLandingDoorStatusLandingDoorsList.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLandingDoorStatusLandingDoorsList.go index 4c255f384e3..38ecbc41249 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLandingDoorStatusLandingDoorsList.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLandingDoorStatusLandingDoorsList.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLandingDoorStatusLandingDoorsList is the corresponding interface of BACnetLandingDoorStatusLandingDoorsList type BACnetLandingDoorStatusLandingDoorsList interface { @@ -49,14 +51,15 @@ type BACnetLandingDoorStatusLandingDoorsListExactly interface { // _BACnetLandingDoorStatusLandingDoorsList is the data-structure of this message type _BACnetLandingDoorStatusLandingDoorsList struct { - OpeningTag BACnetOpeningTag - LandingDoors []BACnetLandingDoorStatusLandingDoorsListEntry - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + LandingDoors []BACnetLandingDoorStatusLandingDoorsListEntry + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -79,14 +82,15 @@ func (m *_BACnetLandingDoorStatusLandingDoorsList) GetClosingTag() BACnetClosing /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLandingDoorStatusLandingDoorsList factory function for _BACnetLandingDoorStatusLandingDoorsList -func NewBACnetLandingDoorStatusLandingDoorsList(openingTag BACnetOpeningTag, landingDoors []BACnetLandingDoorStatusLandingDoorsListEntry, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetLandingDoorStatusLandingDoorsList { - return &_BACnetLandingDoorStatusLandingDoorsList{OpeningTag: openingTag, LandingDoors: landingDoors, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetLandingDoorStatusLandingDoorsList( openingTag BACnetOpeningTag , landingDoors []BACnetLandingDoorStatusLandingDoorsListEntry , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetLandingDoorStatusLandingDoorsList { +return &_BACnetLandingDoorStatusLandingDoorsList{ OpeningTag: openingTag , LandingDoors: landingDoors , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetLandingDoorStatusLandingDoorsList(structType interface{}) BACnetLandingDoorStatusLandingDoorsList { - if casted, ok := structType.(BACnetLandingDoorStatusLandingDoorsList); ok { + if casted, ok := structType.(BACnetLandingDoorStatusLandingDoorsList); ok { return casted } if casted, ok := structType.(*BACnetLandingDoorStatusLandingDoorsList); ok { @@ -118,6 +122,7 @@ func (m *_BACnetLandingDoorStatusLandingDoorsList) GetLengthInBits(ctx context.C return lengthInBits } + func (m *_BACnetLandingDoorStatusLandingDoorsList) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +144,7 @@ func BACnetLandingDoorStatusLandingDoorsListParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetLandingDoorStatusLandingDoorsList") } @@ -155,8 +160,8 @@ func BACnetLandingDoorStatusLandingDoorsListParseWithBuffer(ctx context.Context, // Terminated array var landingDoors []BACnetLandingDoorStatusLandingDoorsListEntry { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetLandingDoorStatusLandingDoorsListEntryParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetLandingDoorStatusLandingDoorsListEntryParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'landingDoors' field of BACnetLandingDoorStatusLandingDoorsList") } @@ -171,7 +176,7 @@ func BACnetLandingDoorStatusLandingDoorsListParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetLandingDoorStatusLandingDoorsList") } @@ -186,11 +191,11 @@ func BACnetLandingDoorStatusLandingDoorsListParseWithBuffer(ctx context.Context, // Create the instance return &_BACnetLandingDoorStatusLandingDoorsList{ - TagNumber: tagNumber, - OpeningTag: openingTag, - LandingDoors: landingDoors, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + LandingDoors: landingDoors, + ClosingTag: closingTag, + }, nil } func (m *_BACnetLandingDoorStatusLandingDoorsList) Serialize() ([]byte, error) { @@ -204,7 +209,7 @@ func (m *_BACnetLandingDoorStatusLandingDoorsList) Serialize() ([]byte, error) { func (m *_BACnetLandingDoorStatusLandingDoorsList) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetLandingDoorStatusLandingDoorsList"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetLandingDoorStatusLandingDoorsList"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetLandingDoorStatusLandingDoorsList") } @@ -255,13 +260,13 @@ func (m *_BACnetLandingDoorStatusLandingDoorsList) SerializeWithWriteBuffer(ctx return nil } + //// // Arguments Getter func (m *_BACnetLandingDoorStatusLandingDoorsList) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -279,3 +284,6 @@ func (m *_BACnetLandingDoorStatusLandingDoorsList) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLandingDoorStatusLandingDoorsListEntry.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLandingDoorStatusLandingDoorsListEntry.go index 8e01918e9bf..cafbedf6d84 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLandingDoorStatusLandingDoorsListEntry.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLandingDoorStatusLandingDoorsListEntry.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLandingDoorStatusLandingDoorsListEntry is the corresponding interface of BACnetLandingDoorStatusLandingDoorsListEntry type BACnetLandingDoorStatusLandingDoorsListEntry interface { @@ -46,10 +48,11 @@ type BACnetLandingDoorStatusLandingDoorsListEntryExactly interface { // _BACnetLandingDoorStatusLandingDoorsListEntry is the data-structure of this message type _BACnetLandingDoorStatusLandingDoorsListEntry struct { - FloorNumber BACnetContextTagUnsignedInteger - DoorStatus BACnetDoorStatusTagged + FloorNumber BACnetContextTagUnsignedInteger + DoorStatus BACnetDoorStatusTagged } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -68,14 +71,15 @@ func (m *_BACnetLandingDoorStatusLandingDoorsListEntry) GetDoorStatus() BACnetDo /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLandingDoorStatusLandingDoorsListEntry factory function for _BACnetLandingDoorStatusLandingDoorsListEntry -func NewBACnetLandingDoorStatusLandingDoorsListEntry(floorNumber BACnetContextTagUnsignedInteger, doorStatus BACnetDoorStatusTagged) *_BACnetLandingDoorStatusLandingDoorsListEntry { - return &_BACnetLandingDoorStatusLandingDoorsListEntry{FloorNumber: floorNumber, DoorStatus: doorStatus} +func NewBACnetLandingDoorStatusLandingDoorsListEntry( floorNumber BACnetContextTagUnsignedInteger , doorStatus BACnetDoorStatusTagged ) *_BACnetLandingDoorStatusLandingDoorsListEntry { +return &_BACnetLandingDoorStatusLandingDoorsListEntry{ FloorNumber: floorNumber , DoorStatus: doorStatus } } // Deprecated: use the interface for direct cast func CastBACnetLandingDoorStatusLandingDoorsListEntry(structType interface{}) BACnetLandingDoorStatusLandingDoorsListEntry { - if casted, ok := structType.(BACnetLandingDoorStatusLandingDoorsListEntry); ok { + if casted, ok := structType.(BACnetLandingDoorStatusLandingDoorsListEntry); ok { return casted } if casted, ok := structType.(*BACnetLandingDoorStatusLandingDoorsListEntry); ok { @@ -100,6 +104,7 @@ func (m *_BACnetLandingDoorStatusLandingDoorsListEntry) GetLengthInBits(ctx cont return lengthInBits } + func (m *_BACnetLandingDoorStatusLandingDoorsListEntry) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -121,7 +126,7 @@ func BACnetLandingDoorStatusLandingDoorsListEntryParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("floorNumber"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for floorNumber") } - _floorNumber, _floorNumberErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_floorNumber, _floorNumberErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _floorNumberErr != nil { return nil, errors.Wrap(_floorNumberErr, "Error parsing 'floorNumber' field of BACnetLandingDoorStatusLandingDoorsListEntry") } @@ -134,7 +139,7 @@ func BACnetLandingDoorStatusLandingDoorsListEntryParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("doorStatus"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for doorStatus") } - _doorStatus, _doorStatusErr := BACnetDoorStatusTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_doorStatus, _doorStatusErr := BACnetDoorStatusTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _doorStatusErr != nil { return nil, errors.Wrap(_doorStatusErr, "Error parsing 'doorStatus' field of BACnetLandingDoorStatusLandingDoorsListEntry") } @@ -149,9 +154,9 @@ func BACnetLandingDoorStatusLandingDoorsListEntryParseWithBuffer(ctx context.Con // Create the instance return &_BACnetLandingDoorStatusLandingDoorsListEntry{ - FloorNumber: floorNumber, - DoorStatus: doorStatus, - }, nil + FloorNumber: floorNumber, + DoorStatus: doorStatus, + }, nil } func (m *_BACnetLandingDoorStatusLandingDoorsListEntry) Serialize() ([]byte, error) { @@ -165,7 +170,7 @@ func (m *_BACnetLandingDoorStatusLandingDoorsListEntry) Serialize() ([]byte, err func (m *_BACnetLandingDoorStatusLandingDoorsListEntry) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetLandingDoorStatusLandingDoorsListEntry"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetLandingDoorStatusLandingDoorsListEntry"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetLandingDoorStatusLandingDoorsListEntry") } @@ -199,6 +204,7 @@ func (m *_BACnetLandingDoorStatusLandingDoorsListEntry) SerializeWithWriteBuffer return nil } + func (m *_BACnetLandingDoorStatusLandingDoorsListEntry) isBACnetLandingDoorStatusLandingDoorsListEntry() bool { return true } @@ -213,3 +219,6 @@ func (m *_BACnetLandingDoorStatusLandingDoorsListEntry) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLifeSafetyMode.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLifeSafetyMode.go index 87be0859d8c..942a2c37c5d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLifeSafetyMode.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLifeSafetyMode.go @@ -34,30 +34,30 @@ type IBACnetLifeSafetyMode interface { utils.Serializable } -const ( - BACnetLifeSafetyMode_OFF BACnetLifeSafetyMode = 0 - BACnetLifeSafetyMode_ON BACnetLifeSafetyMode = 1 - BACnetLifeSafetyMode_TEST BACnetLifeSafetyMode = 2 - BACnetLifeSafetyMode_MANNED BACnetLifeSafetyMode = 3 - BACnetLifeSafetyMode_UNMANNED BACnetLifeSafetyMode = 4 - BACnetLifeSafetyMode_ARMED BACnetLifeSafetyMode = 5 - BACnetLifeSafetyMode_DISARMED BACnetLifeSafetyMode = 6 - BACnetLifeSafetyMode_PREARMED BACnetLifeSafetyMode = 7 - BACnetLifeSafetyMode_SLOW BACnetLifeSafetyMode = 8 - BACnetLifeSafetyMode_FAST BACnetLifeSafetyMode = 9 - BACnetLifeSafetyMode_DISCONNECTED BACnetLifeSafetyMode = 10 - BACnetLifeSafetyMode_ENABLED BACnetLifeSafetyMode = 11 - BACnetLifeSafetyMode_DISABLED BACnetLifeSafetyMode = 12 +const( + BACnetLifeSafetyMode_OFF BACnetLifeSafetyMode = 0 + BACnetLifeSafetyMode_ON BACnetLifeSafetyMode = 1 + BACnetLifeSafetyMode_TEST BACnetLifeSafetyMode = 2 + BACnetLifeSafetyMode_MANNED BACnetLifeSafetyMode = 3 + BACnetLifeSafetyMode_UNMANNED BACnetLifeSafetyMode = 4 + BACnetLifeSafetyMode_ARMED BACnetLifeSafetyMode = 5 + BACnetLifeSafetyMode_DISARMED BACnetLifeSafetyMode = 6 + BACnetLifeSafetyMode_PREARMED BACnetLifeSafetyMode = 7 + BACnetLifeSafetyMode_SLOW BACnetLifeSafetyMode = 8 + BACnetLifeSafetyMode_FAST BACnetLifeSafetyMode = 9 + BACnetLifeSafetyMode_DISCONNECTED BACnetLifeSafetyMode = 10 + BACnetLifeSafetyMode_ENABLED BACnetLifeSafetyMode = 11 + BACnetLifeSafetyMode_DISABLED BACnetLifeSafetyMode = 12 BACnetLifeSafetyMode_AUTOMATIC_RELEASE_DISABLED BACnetLifeSafetyMode = 13 - BACnetLifeSafetyMode_DEFAULT BACnetLifeSafetyMode = 14 - BACnetLifeSafetyMode_VENDOR_PROPRIETARY_VALUE BACnetLifeSafetyMode = 0xFFFF + BACnetLifeSafetyMode_DEFAULT BACnetLifeSafetyMode = 14 + BACnetLifeSafetyMode_VENDOR_PROPRIETARY_VALUE BACnetLifeSafetyMode = 0XFFFF ) var BACnetLifeSafetyModeValues []BACnetLifeSafetyMode func init() { _ = errors.New - BACnetLifeSafetyModeValues = []BACnetLifeSafetyMode{ + BACnetLifeSafetyModeValues = []BACnetLifeSafetyMode { BACnetLifeSafetyMode_OFF, BACnetLifeSafetyMode_ON, BACnetLifeSafetyMode_TEST, @@ -79,38 +79,38 @@ func init() { func BACnetLifeSafetyModeByValue(value uint16) (enum BACnetLifeSafetyMode, ok bool) { switch value { - case 0: - return BACnetLifeSafetyMode_OFF, true - case 0xFFFF: - return BACnetLifeSafetyMode_VENDOR_PROPRIETARY_VALUE, true - case 1: - return BACnetLifeSafetyMode_ON, true - case 10: - return BACnetLifeSafetyMode_DISCONNECTED, true - case 11: - return BACnetLifeSafetyMode_ENABLED, true - case 12: - return BACnetLifeSafetyMode_DISABLED, true - case 13: - return BACnetLifeSafetyMode_AUTOMATIC_RELEASE_DISABLED, true - case 14: - return BACnetLifeSafetyMode_DEFAULT, true - case 2: - return BACnetLifeSafetyMode_TEST, true - case 3: - return BACnetLifeSafetyMode_MANNED, true - case 4: - return BACnetLifeSafetyMode_UNMANNED, true - case 5: - return BACnetLifeSafetyMode_ARMED, true - case 6: - return BACnetLifeSafetyMode_DISARMED, true - case 7: - return BACnetLifeSafetyMode_PREARMED, true - case 8: - return BACnetLifeSafetyMode_SLOW, true - case 9: - return BACnetLifeSafetyMode_FAST, true + case 0: + return BACnetLifeSafetyMode_OFF, true + case 0XFFFF: + return BACnetLifeSafetyMode_VENDOR_PROPRIETARY_VALUE, true + case 1: + return BACnetLifeSafetyMode_ON, true + case 10: + return BACnetLifeSafetyMode_DISCONNECTED, true + case 11: + return BACnetLifeSafetyMode_ENABLED, true + case 12: + return BACnetLifeSafetyMode_DISABLED, true + case 13: + return BACnetLifeSafetyMode_AUTOMATIC_RELEASE_DISABLED, true + case 14: + return BACnetLifeSafetyMode_DEFAULT, true + case 2: + return BACnetLifeSafetyMode_TEST, true + case 3: + return BACnetLifeSafetyMode_MANNED, true + case 4: + return BACnetLifeSafetyMode_UNMANNED, true + case 5: + return BACnetLifeSafetyMode_ARMED, true + case 6: + return BACnetLifeSafetyMode_DISARMED, true + case 7: + return BACnetLifeSafetyMode_PREARMED, true + case 8: + return BACnetLifeSafetyMode_SLOW, true + case 9: + return BACnetLifeSafetyMode_FAST, true } return 0, false } @@ -153,13 +153,13 @@ func BACnetLifeSafetyModeByName(value string) (enum BACnetLifeSafetyMode, ok boo return 0, false } -func BACnetLifeSafetyModeKnows(value uint16) bool { +func BACnetLifeSafetyModeKnows(value uint16) bool { for _, typeValue := range BACnetLifeSafetyModeValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastBACnetLifeSafetyMode(structType interface{}) BACnetLifeSafetyMode { @@ -251,3 +251,4 @@ func (e BACnetLifeSafetyMode) PLC4XEnumName() string { func (e BACnetLifeSafetyMode) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLifeSafetyModeTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLifeSafetyModeTagged.go index b1712cdea8e..ad6f77143a3 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLifeSafetyModeTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLifeSafetyModeTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLifeSafetyModeTagged is the corresponding interface of BACnetLifeSafetyModeTagged type BACnetLifeSafetyModeTagged interface { @@ -50,15 +52,16 @@ type BACnetLifeSafetyModeTaggedExactly interface { // _BACnetLifeSafetyModeTagged is the data-structure of this message type _BACnetLifeSafetyModeTagged struct { - Header BACnetTagHeader - Value BACnetLifeSafetyMode - ProprietaryValue uint32 + Header BACnetTagHeader + Value BACnetLifeSafetyMode + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_BACnetLifeSafetyModeTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLifeSafetyModeTagged factory function for _BACnetLifeSafetyModeTagged -func NewBACnetLifeSafetyModeTagged(header BACnetTagHeader, value BACnetLifeSafetyMode, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_BACnetLifeSafetyModeTagged { - return &_BACnetLifeSafetyModeTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetLifeSafetyModeTagged( header BACnetTagHeader , value BACnetLifeSafetyMode , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_BACnetLifeSafetyModeTagged { +return &_BACnetLifeSafetyModeTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetLifeSafetyModeTagged(structType interface{}) BACnetLifeSafetyModeTagged { - if casted, ok := structType.(BACnetLifeSafetyModeTagged); ok { + if casted, ok := structType.(BACnetLifeSafetyModeTagged); ok { return casted } if casted, ok := structType.(*BACnetLifeSafetyModeTagged); ok { @@ -123,16 +127,17 @@ func (m *_BACnetLifeSafetyModeTagged) GetLengthInBits(ctx context.Context) uint1 lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetLifeSafetyModeTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetLifeSafetyModeTaggedParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetLifeSafetyModeTagged") } @@ -164,12 +169,12 @@ func BACnetLifeSafetyModeTaggedParseWithBuffer(ctx context.Context, readBuffer u } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func BACnetLifeSafetyModeTaggedParseWithBuffer(ctx context.Context, readBuffer u } var value BACnetLifeSafetyMode if _value != nil { - value = _value.(BACnetLifeSafetyMode) + value = _value.(BACnetLifeSafetyMode) } // Virtual field @@ -195,7 +200,7 @@ func BACnetLifeSafetyModeTaggedParseWithBuffer(ctx context.Context, readBuffer u } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetLifeSafetyModeTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func BACnetLifeSafetyModeTaggedParseWithBuffer(ctx context.Context, readBuffer u // Create the instance return &_BACnetLifeSafetyModeTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetLifeSafetyModeTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_BACnetLifeSafetyModeTagged) Serialize() ([]byte, error) { func (m *_BACnetLifeSafetyModeTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetLifeSafetyModeTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetLifeSafetyModeTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetLifeSafetyModeTagged") } @@ -261,6 +266,7 @@ func (m *_BACnetLifeSafetyModeTagged) SerializeWithWriteBuffer(ctx context.Conte return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_BACnetLifeSafetyModeTagged) GetTagNumber() uint8 { func (m *_BACnetLifeSafetyModeTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_BACnetLifeSafetyModeTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLifeSafetyOperation.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLifeSafetyOperation.go index b4d7db32e05..316380de979 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLifeSafetyOperation.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLifeSafetyOperation.go @@ -34,25 +34,25 @@ type IBACnetLifeSafetyOperation interface { utils.Serializable } -const ( - BACnetLifeSafetyOperation_NONE BACnetLifeSafetyOperation = 0 - BACnetLifeSafetyOperation_SILENCE BACnetLifeSafetyOperation = 1 - BACnetLifeSafetyOperation_SILENCE_AUDIBLE BACnetLifeSafetyOperation = 2 - BACnetLifeSafetyOperation_SILENCE_VISUAL BACnetLifeSafetyOperation = 3 - BACnetLifeSafetyOperation_RESET BACnetLifeSafetyOperation = 4 - BACnetLifeSafetyOperation_RESET_ALARM BACnetLifeSafetyOperation = 5 - BACnetLifeSafetyOperation_RESET_FAULT BACnetLifeSafetyOperation = 6 - BACnetLifeSafetyOperation_UNSILENCE BACnetLifeSafetyOperation = 7 - BACnetLifeSafetyOperation_UNSILENCE_AUDIBLE BACnetLifeSafetyOperation = 8 - BACnetLifeSafetyOperation_UNSILENCE_VISUAL BACnetLifeSafetyOperation = 9 - BACnetLifeSafetyOperation_VENDOR_PROPRIETARY_VALUE BACnetLifeSafetyOperation = 0xFFFF +const( + BACnetLifeSafetyOperation_NONE BACnetLifeSafetyOperation = 0 + BACnetLifeSafetyOperation_SILENCE BACnetLifeSafetyOperation = 1 + BACnetLifeSafetyOperation_SILENCE_AUDIBLE BACnetLifeSafetyOperation = 2 + BACnetLifeSafetyOperation_SILENCE_VISUAL BACnetLifeSafetyOperation = 3 + BACnetLifeSafetyOperation_RESET BACnetLifeSafetyOperation = 4 + BACnetLifeSafetyOperation_RESET_ALARM BACnetLifeSafetyOperation = 5 + BACnetLifeSafetyOperation_RESET_FAULT BACnetLifeSafetyOperation = 6 + BACnetLifeSafetyOperation_UNSILENCE BACnetLifeSafetyOperation = 7 + BACnetLifeSafetyOperation_UNSILENCE_AUDIBLE BACnetLifeSafetyOperation = 8 + BACnetLifeSafetyOperation_UNSILENCE_VISUAL BACnetLifeSafetyOperation = 9 + BACnetLifeSafetyOperation_VENDOR_PROPRIETARY_VALUE BACnetLifeSafetyOperation = 0XFFFF ) var BACnetLifeSafetyOperationValues []BACnetLifeSafetyOperation func init() { _ = errors.New - BACnetLifeSafetyOperationValues = []BACnetLifeSafetyOperation{ + BACnetLifeSafetyOperationValues = []BACnetLifeSafetyOperation { BACnetLifeSafetyOperation_NONE, BACnetLifeSafetyOperation_SILENCE, BACnetLifeSafetyOperation_SILENCE_AUDIBLE, @@ -69,28 +69,28 @@ func init() { func BACnetLifeSafetyOperationByValue(value uint16) (enum BACnetLifeSafetyOperation, ok bool) { switch value { - case 0: - return BACnetLifeSafetyOperation_NONE, true - case 0xFFFF: - return BACnetLifeSafetyOperation_VENDOR_PROPRIETARY_VALUE, true - case 1: - return BACnetLifeSafetyOperation_SILENCE, true - case 2: - return BACnetLifeSafetyOperation_SILENCE_AUDIBLE, true - case 3: - return BACnetLifeSafetyOperation_SILENCE_VISUAL, true - case 4: - return BACnetLifeSafetyOperation_RESET, true - case 5: - return BACnetLifeSafetyOperation_RESET_ALARM, true - case 6: - return BACnetLifeSafetyOperation_RESET_FAULT, true - case 7: - return BACnetLifeSafetyOperation_UNSILENCE, true - case 8: - return BACnetLifeSafetyOperation_UNSILENCE_AUDIBLE, true - case 9: - return BACnetLifeSafetyOperation_UNSILENCE_VISUAL, true + case 0: + return BACnetLifeSafetyOperation_NONE, true + case 0XFFFF: + return BACnetLifeSafetyOperation_VENDOR_PROPRIETARY_VALUE, true + case 1: + return BACnetLifeSafetyOperation_SILENCE, true + case 2: + return BACnetLifeSafetyOperation_SILENCE_AUDIBLE, true + case 3: + return BACnetLifeSafetyOperation_SILENCE_VISUAL, true + case 4: + return BACnetLifeSafetyOperation_RESET, true + case 5: + return BACnetLifeSafetyOperation_RESET_ALARM, true + case 6: + return BACnetLifeSafetyOperation_RESET_FAULT, true + case 7: + return BACnetLifeSafetyOperation_UNSILENCE, true + case 8: + return BACnetLifeSafetyOperation_UNSILENCE_AUDIBLE, true + case 9: + return BACnetLifeSafetyOperation_UNSILENCE_VISUAL, true } return 0, false } @@ -123,13 +123,13 @@ func BACnetLifeSafetyOperationByName(value string) (enum BACnetLifeSafetyOperati return 0, false } -func BACnetLifeSafetyOperationKnows(value uint16) bool { +func BACnetLifeSafetyOperationKnows(value uint16) bool { for _, typeValue := range BACnetLifeSafetyOperationValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastBACnetLifeSafetyOperation(structType interface{}) BACnetLifeSafetyOperation { @@ -211,3 +211,4 @@ func (e BACnetLifeSafetyOperation) PLC4XEnumName() string { func (e BACnetLifeSafetyOperation) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLifeSafetyOperationTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLifeSafetyOperationTagged.go index 376c2ae9981..c1223987d01 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLifeSafetyOperationTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLifeSafetyOperationTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLifeSafetyOperationTagged is the corresponding interface of BACnetLifeSafetyOperationTagged type BACnetLifeSafetyOperationTagged interface { @@ -50,15 +52,16 @@ type BACnetLifeSafetyOperationTaggedExactly interface { // _BACnetLifeSafetyOperationTagged is the data-structure of this message type _BACnetLifeSafetyOperationTagged struct { - Header BACnetTagHeader - Value BACnetLifeSafetyOperation - ProprietaryValue uint32 + Header BACnetTagHeader + Value BACnetLifeSafetyOperation + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_BACnetLifeSafetyOperationTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLifeSafetyOperationTagged factory function for _BACnetLifeSafetyOperationTagged -func NewBACnetLifeSafetyOperationTagged(header BACnetTagHeader, value BACnetLifeSafetyOperation, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_BACnetLifeSafetyOperationTagged { - return &_BACnetLifeSafetyOperationTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetLifeSafetyOperationTagged( header BACnetTagHeader , value BACnetLifeSafetyOperation , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_BACnetLifeSafetyOperationTagged { +return &_BACnetLifeSafetyOperationTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetLifeSafetyOperationTagged(structType interface{}) BACnetLifeSafetyOperationTagged { - if casted, ok := structType.(BACnetLifeSafetyOperationTagged); ok { + if casted, ok := structType.(BACnetLifeSafetyOperationTagged); ok { return casted } if casted, ok := structType.(*BACnetLifeSafetyOperationTagged); ok { @@ -123,16 +127,17 @@ func (m *_BACnetLifeSafetyOperationTagged) GetLengthInBits(ctx context.Context) lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetLifeSafetyOperationTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetLifeSafetyOperationTaggedParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetLifeSafetyOperationTagged") } @@ -164,12 +169,12 @@ func BACnetLifeSafetyOperationTaggedParseWithBuffer(ctx context.Context, readBuf } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func BACnetLifeSafetyOperationTaggedParseWithBuffer(ctx context.Context, readBuf } var value BACnetLifeSafetyOperation if _value != nil { - value = _value.(BACnetLifeSafetyOperation) + value = _value.(BACnetLifeSafetyOperation) } // Virtual field @@ -195,7 +200,7 @@ func BACnetLifeSafetyOperationTaggedParseWithBuffer(ctx context.Context, readBuf } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetLifeSafetyOperationTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func BACnetLifeSafetyOperationTaggedParseWithBuffer(ctx context.Context, readBuf // Create the instance return &_BACnetLifeSafetyOperationTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetLifeSafetyOperationTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_BACnetLifeSafetyOperationTagged) Serialize() ([]byte, error) { func (m *_BACnetLifeSafetyOperationTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetLifeSafetyOperationTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetLifeSafetyOperationTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetLifeSafetyOperationTagged") } @@ -261,6 +266,7 @@ func (m *_BACnetLifeSafetyOperationTagged) SerializeWithWriteBuffer(ctx context. return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_BACnetLifeSafetyOperationTagged) GetTagNumber() uint8 { func (m *_BACnetLifeSafetyOperationTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_BACnetLifeSafetyOperationTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLifeSafetyState.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLifeSafetyState.go index c9ad565571a..582a38dcc49 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLifeSafetyState.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLifeSafetyState.go @@ -34,39 +34,39 @@ type IBACnetLifeSafetyState interface { utils.Serializable } -const ( - BACnetLifeSafetyState_QUIET BACnetLifeSafetyState = 0 - BACnetLifeSafetyState_PRE_ALARM BACnetLifeSafetyState = 1 - BACnetLifeSafetyState_ALARM BACnetLifeSafetyState = 2 - BACnetLifeSafetyState_FAULT BACnetLifeSafetyState = 3 - BACnetLifeSafetyState_FAULT_PRE_ALARM BACnetLifeSafetyState = 4 - BACnetLifeSafetyState_FAULT_ALARM BACnetLifeSafetyState = 5 - BACnetLifeSafetyState_NOT_READY BACnetLifeSafetyState = 6 - BACnetLifeSafetyState_ACTIVE BACnetLifeSafetyState = 7 - BACnetLifeSafetyState_TAMPER BACnetLifeSafetyState = 8 - BACnetLifeSafetyState_TEST_ALARM BACnetLifeSafetyState = 9 - BACnetLifeSafetyState_TEST_ACTIVE BACnetLifeSafetyState = 10 - BACnetLifeSafetyState_TEST_FAULT BACnetLifeSafetyState = 11 - BACnetLifeSafetyState_TEST_FAULT_ALARM BACnetLifeSafetyState = 12 - BACnetLifeSafetyState_HOLDUP BACnetLifeSafetyState = 13 - BACnetLifeSafetyState_DURESS BACnetLifeSafetyState = 14 - BACnetLifeSafetyState_TAMPER_ALARM BACnetLifeSafetyState = 15 - BACnetLifeSafetyState_ABNORMAL BACnetLifeSafetyState = 16 - BACnetLifeSafetyState_EMERGENCY_POWER BACnetLifeSafetyState = 17 - BACnetLifeSafetyState_DELAYED BACnetLifeSafetyState = 18 - BACnetLifeSafetyState_BLOCKED BACnetLifeSafetyState = 19 - BACnetLifeSafetyState_LOCAL_ALARM BACnetLifeSafetyState = 20 - BACnetLifeSafetyState_GENERAL_ALARM BACnetLifeSafetyState = 21 - BACnetLifeSafetyState_SUPERVISORY BACnetLifeSafetyState = 22 - BACnetLifeSafetyState_TEST_SUPERVISORY BACnetLifeSafetyState = 23 - BACnetLifeSafetyState_VENDOR_PROPRIETARY_VALUE BACnetLifeSafetyState = 0xFFFF +const( + BACnetLifeSafetyState_QUIET BACnetLifeSafetyState = 0 + BACnetLifeSafetyState_PRE_ALARM BACnetLifeSafetyState = 1 + BACnetLifeSafetyState_ALARM BACnetLifeSafetyState = 2 + BACnetLifeSafetyState_FAULT BACnetLifeSafetyState = 3 + BACnetLifeSafetyState_FAULT_PRE_ALARM BACnetLifeSafetyState = 4 + BACnetLifeSafetyState_FAULT_ALARM BACnetLifeSafetyState = 5 + BACnetLifeSafetyState_NOT_READY BACnetLifeSafetyState = 6 + BACnetLifeSafetyState_ACTIVE BACnetLifeSafetyState = 7 + BACnetLifeSafetyState_TAMPER BACnetLifeSafetyState = 8 + BACnetLifeSafetyState_TEST_ALARM BACnetLifeSafetyState = 9 + BACnetLifeSafetyState_TEST_ACTIVE BACnetLifeSafetyState = 10 + BACnetLifeSafetyState_TEST_FAULT BACnetLifeSafetyState = 11 + BACnetLifeSafetyState_TEST_FAULT_ALARM BACnetLifeSafetyState = 12 + BACnetLifeSafetyState_HOLDUP BACnetLifeSafetyState = 13 + BACnetLifeSafetyState_DURESS BACnetLifeSafetyState = 14 + BACnetLifeSafetyState_TAMPER_ALARM BACnetLifeSafetyState = 15 + BACnetLifeSafetyState_ABNORMAL BACnetLifeSafetyState = 16 + BACnetLifeSafetyState_EMERGENCY_POWER BACnetLifeSafetyState = 17 + BACnetLifeSafetyState_DELAYED BACnetLifeSafetyState = 18 + BACnetLifeSafetyState_BLOCKED BACnetLifeSafetyState = 19 + BACnetLifeSafetyState_LOCAL_ALARM BACnetLifeSafetyState = 20 + BACnetLifeSafetyState_GENERAL_ALARM BACnetLifeSafetyState = 21 + BACnetLifeSafetyState_SUPERVISORY BACnetLifeSafetyState = 22 + BACnetLifeSafetyState_TEST_SUPERVISORY BACnetLifeSafetyState = 23 + BACnetLifeSafetyState_VENDOR_PROPRIETARY_VALUE BACnetLifeSafetyState = 0XFFFF ) var BACnetLifeSafetyStateValues []BACnetLifeSafetyState func init() { _ = errors.New - BACnetLifeSafetyStateValues = []BACnetLifeSafetyState{ + BACnetLifeSafetyStateValues = []BACnetLifeSafetyState { BACnetLifeSafetyState_QUIET, BACnetLifeSafetyState_PRE_ALARM, BACnetLifeSafetyState_ALARM, @@ -97,56 +97,56 @@ func init() { func BACnetLifeSafetyStateByValue(value uint16) (enum BACnetLifeSafetyState, ok bool) { switch value { - case 0: - return BACnetLifeSafetyState_QUIET, true - case 0xFFFF: - return BACnetLifeSafetyState_VENDOR_PROPRIETARY_VALUE, true - case 1: - return BACnetLifeSafetyState_PRE_ALARM, true - case 10: - return BACnetLifeSafetyState_TEST_ACTIVE, true - case 11: - return BACnetLifeSafetyState_TEST_FAULT, true - case 12: - return BACnetLifeSafetyState_TEST_FAULT_ALARM, true - case 13: - return BACnetLifeSafetyState_HOLDUP, true - case 14: - return BACnetLifeSafetyState_DURESS, true - case 15: - return BACnetLifeSafetyState_TAMPER_ALARM, true - case 16: - return BACnetLifeSafetyState_ABNORMAL, true - case 17: - return BACnetLifeSafetyState_EMERGENCY_POWER, true - case 18: - return BACnetLifeSafetyState_DELAYED, true - case 19: - return BACnetLifeSafetyState_BLOCKED, true - case 2: - return BACnetLifeSafetyState_ALARM, true - case 20: - return BACnetLifeSafetyState_LOCAL_ALARM, true - case 21: - return BACnetLifeSafetyState_GENERAL_ALARM, true - case 22: - return BACnetLifeSafetyState_SUPERVISORY, true - case 23: - return BACnetLifeSafetyState_TEST_SUPERVISORY, true - case 3: - return BACnetLifeSafetyState_FAULT, true - case 4: - return BACnetLifeSafetyState_FAULT_PRE_ALARM, true - case 5: - return BACnetLifeSafetyState_FAULT_ALARM, true - case 6: - return BACnetLifeSafetyState_NOT_READY, true - case 7: - return BACnetLifeSafetyState_ACTIVE, true - case 8: - return BACnetLifeSafetyState_TAMPER, true - case 9: - return BACnetLifeSafetyState_TEST_ALARM, true + case 0: + return BACnetLifeSafetyState_QUIET, true + case 0XFFFF: + return BACnetLifeSafetyState_VENDOR_PROPRIETARY_VALUE, true + case 1: + return BACnetLifeSafetyState_PRE_ALARM, true + case 10: + return BACnetLifeSafetyState_TEST_ACTIVE, true + case 11: + return BACnetLifeSafetyState_TEST_FAULT, true + case 12: + return BACnetLifeSafetyState_TEST_FAULT_ALARM, true + case 13: + return BACnetLifeSafetyState_HOLDUP, true + case 14: + return BACnetLifeSafetyState_DURESS, true + case 15: + return BACnetLifeSafetyState_TAMPER_ALARM, true + case 16: + return BACnetLifeSafetyState_ABNORMAL, true + case 17: + return BACnetLifeSafetyState_EMERGENCY_POWER, true + case 18: + return BACnetLifeSafetyState_DELAYED, true + case 19: + return BACnetLifeSafetyState_BLOCKED, true + case 2: + return BACnetLifeSafetyState_ALARM, true + case 20: + return BACnetLifeSafetyState_LOCAL_ALARM, true + case 21: + return BACnetLifeSafetyState_GENERAL_ALARM, true + case 22: + return BACnetLifeSafetyState_SUPERVISORY, true + case 23: + return BACnetLifeSafetyState_TEST_SUPERVISORY, true + case 3: + return BACnetLifeSafetyState_FAULT, true + case 4: + return BACnetLifeSafetyState_FAULT_PRE_ALARM, true + case 5: + return BACnetLifeSafetyState_FAULT_ALARM, true + case 6: + return BACnetLifeSafetyState_NOT_READY, true + case 7: + return BACnetLifeSafetyState_ACTIVE, true + case 8: + return BACnetLifeSafetyState_TAMPER, true + case 9: + return BACnetLifeSafetyState_TEST_ALARM, true } return 0, false } @@ -207,13 +207,13 @@ func BACnetLifeSafetyStateByName(value string) (enum BACnetLifeSafetyState, ok b return 0, false } -func BACnetLifeSafetyStateKnows(value uint16) bool { +func BACnetLifeSafetyStateKnows(value uint16) bool { for _, typeValue := range BACnetLifeSafetyStateValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastBACnetLifeSafetyState(structType interface{}) BACnetLifeSafetyState { @@ -323,3 +323,4 @@ func (e BACnetLifeSafetyState) PLC4XEnumName() string { func (e BACnetLifeSafetyState) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLifeSafetyStateTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLifeSafetyStateTagged.go index fe9ecec8130..8640825441f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLifeSafetyStateTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLifeSafetyStateTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLifeSafetyStateTagged is the corresponding interface of BACnetLifeSafetyStateTagged type BACnetLifeSafetyStateTagged interface { @@ -50,15 +52,16 @@ type BACnetLifeSafetyStateTaggedExactly interface { // _BACnetLifeSafetyStateTagged is the data-structure of this message type _BACnetLifeSafetyStateTagged struct { - Header BACnetTagHeader - Value BACnetLifeSafetyState - ProprietaryValue uint32 + Header BACnetTagHeader + Value BACnetLifeSafetyState + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_BACnetLifeSafetyStateTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLifeSafetyStateTagged factory function for _BACnetLifeSafetyStateTagged -func NewBACnetLifeSafetyStateTagged(header BACnetTagHeader, value BACnetLifeSafetyState, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_BACnetLifeSafetyStateTagged { - return &_BACnetLifeSafetyStateTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetLifeSafetyStateTagged( header BACnetTagHeader , value BACnetLifeSafetyState , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_BACnetLifeSafetyStateTagged { +return &_BACnetLifeSafetyStateTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetLifeSafetyStateTagged(structType interface{}) BACnetLifeSafetyStateTagged { - if casted, ok := structType.(BACnetLifeSafetyStateTagged); ok { + if casted, ok := structType.(BACnetLifeSafetyStateTagged); ok { return casted } if casted, ok := structType.(*BACnetLifeSafetyStateTagged); ok { @@ -123,16 +127,17 @@ func (m *_BACnetLifeSafetyStateTagged) GetLengthInBits(ctx context.Context) uint lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetLifeSafetyStateTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetLifeSafetyStateTaggedParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetLifeSafetyStateTagged") } @@ -164,12 +169,12 @@ func BACnetLifeSafetyStateTaggedParseWithBuffer(ctx context.Context, readBuffer } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func BACnetLifeSafetyStateTaggedParseWithBuffer(ctx context.Context, readBuffer } var value BACnetLifeSafetyState if _value != nil { - value = _value.(BACnetLifeSafetyState) + value = _value.(BACnetLifeSafetyState) } // Virtual field @@ -195,7 +200,7 @@ func BACnetLifeSafetyStateTaggedParseWithBuffer(ctx context.Context, readBuffer } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetLifeSafetyStateTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func BACnetLifeSafetyStateTaggedParseWithBuffer(ctx context.Context, readBuffer // Create the instance return &_BACnetLifeSafetyStateTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetLifeSafetyStateTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_BACnetLifeSafetyStateTagged) Serialize() ([]byte, error) { func (m *_BACnetLifeSafetyStateTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetLifeSafetyStateTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetLifeSafetyStateTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetLifeSafetyStateTagged") } @@ -261,6 +266,7 @@ func (m *_BACnetLifeSafetyStateTagged) SerializeWithWriteBuffer(ctx context.Cont return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_BACnetLifeSafetyStateTagged) GetTagNumber() uint8 { func (m *_BACnetLifeSafetyStateTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_BACnetLifeSafetyStateTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftCarCallList.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftCarCallList.go index 1218432aef2..f2531fa4897 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftCarCallList.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftCarCallList.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLiftCarCallList is the corresponding interface of BACnetLiftCarCallList type BACnetLiftCarCallList interface { @@ -44,9 +46,10 @@ type BACnetLiftCarCallListExactly interface { // _BACnetLiftCarCallList is the data-structure of this message type _BACnetLiftCarCallList struct { - FloorNumbers BACnetLiftCarCallListFloorList + FloorNumbers BACnetLiftCarCallListFloorList } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -61,14 +64,15 @@ func (m *_BACnetLiftCarCallList) GetFloorNumbers() BACnetLiftCarCallListFloorLis /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLiftCarCallList factory function for _BACnetLiftCarCallList -func NewBACnetLiftCarCallList(floorNumbers BACnetLiftCarCallListFloorList) *_BACnetLiftCarCallList { - return &_BACnetLiftCarCallList{FloorNumbers: floorNumbers} +func NewBACnetLiftCarCallList( floorNumbers BACnetLiftCarCallListFloorList ) *_BACnetLiftCarCallList { +return &_BACnetLiftCarCallList{ FloorNumbers: floorNumbers } } // Deprecated: use the interface for direct cast func CastBACnetLiftCarCallList(structType interface{}) BACnetLiftCarCallList { - if casted, ok := structType.(BACnetLiftCarCallList); ok { + if casted, ok := structType.(BACnetLiftCarCallList); ok { return casted } if casted, ok := structType.(*BACnetLiftCarCallList); ok { @@ -90,6 +94,7 @@ func (m *_BACnetLiftCarCallList) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetLiftCarCallList) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -111,7 +116,7 @@ func BACnetLiftCarCallListParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("floorNumbers"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for floorNumbers") } - _floorNumbers, _floorNumbersErr := BACnetLiftCarCallListFloorListParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_floorNumbers, _floorNumbersErr := BACnetLiftCarCallListFloorListParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _floorNumbersErr != nil { return nil, errors.Wrap(_floorNumbersErr, "Error parsing 'floorNumbers' field of BACnetLiftCarCallList") } @@ -126,8 +131,8 @@ func BACnetLiftCarCallListParseWithBuffer(ctx context.Context, readBuffer utils. // Create the instance return &_BACnetLiftCarCallList{ - FloorNumbers: floorNumbers, - }, nil + FloorNumbers: floorNumbers, + }, nil } func (m *_BACnetLiftCarCallList) Serialize() ([]byte, error) { @@ -141,7 +146,7 @@ func (m *_BACnetLiftCarCallList) Serialize() ([]byte, error) { func (m *_BACnetLiftCarCallList) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetLiftCarCallList"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetLiftCarCallList"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetLiftCarCallList") } @@ -163,6 +168,7 @@ func (m *_BACnetLiftCarCallList) SerializeWithWriteBuffer(ctx context.Context, w return nil } + func (m *_BACnetLiftCarCallList) isBACnetLiftCarCallList() bool { return true } @@ -177,3 +183,6 @@ func (m *_BACnetLiftCarCallList) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftCarCallListFloorList.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftCarCallListFloorList.go index 92678415b1f..d6592f5dcdf 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftCarCallListFloorList.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftCarCallListFloorList.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLiftCarCallListFloorList is the corresponding interface of BACnetLiftCarCallListFloorList type BACnetLiftCarCallListFloorList interface { @@ -49,14 +51,15 @@ type BACnetLiftCarCallListFloorListExactly interface { // _BACnetLiftCarCallListFloorList is the data-structure of this message type _BACnetLiftCarCallListFloorList struct { - OpeningTag BACnetOpeningTag - FloorNumbers []BACnetApplicationTagUnsignedInteger - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + FloorNumbers []BACnetApplicationTagUnsignedInteger + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -79,14 +82,15 @@ func (m *_BACnetLiftCarCallListFloorList) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLiftCarCallListFloorList factory function for _BACnetLiftCarCallListFloorList -func NewBACnetLiftCarCallListFloorList(openingTag BACnetOpeningTag, floorNumbers []BACnetApplicationTagUnsignedInteger, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetLiftCarCallListFloorList { - return &_BACnetLiftCarCallListFloorList{OpeningTag: openingTag, FloorNumbers: floorNumbers, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetLiftCarCallListFloorList( openingTag BACnetOpeningTag , floorNumbers []BACnetApplicationTagUnsignedInteger , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetLiftCarCallListFloorList { +return &_BACnetLiftCarCallListFloorList{ OpeningTag: openingTag , FloorNumbers: floorNumbers , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetLiftCarCallListFloorList(structType interface{}) BACnetLiftCarCallListFloorList { - if casted, ok := structType.(BACnetLiftCarCallListFloorList); ok { + if casted, ok := structType.(BACnetLiftCarCallListFloorList); ok { return casted } if casted, ok := structType.(*BACnetLiftCarCallListFloorList); ok { @@ -118,6 +122,7 @@ func (m *_BACnetLiftCarCallListFloorList) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetLiftCarCallListFloorList) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +144,7 @@ func BACnetLiftCarCallListFloorListParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetLiftCarCallListFloorList") } @@ -155,8 +160,8 @@ func BACnetLiftCarCallListFloorListParseWithBuffer(ctx context.Context, readBuff // Terminated array var floorNumbers []BACnetApplicationTagUnsignedInteger { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'floorNumbers' field of BACnetLiftCarCallListFloorList") } @@ -171,7 +176,7 @@ func BACnetLiftCarCallListFloorListParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetLiftCarCallListFloorList") } @@ -186,11 +191,11 @@ func BACnetLiftCarCallListFloorListParseWithBuffer(ctx context.Context, readBuff // Create the instance return &_BACnetLiftCarCallListFloorList{ - TagNumber: tagNumber, - OpeningTag: openingTag, - FloorNumbers: floorNumbers, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + FloorNumbers: floorNumbers, + ClosingTag: closingTag, + }, nil } func (m *_BACnetLiftCarCallListFloorList) Serialize() ([]byte, error) { @@ -204,7 +209,7 @@ func (m *_BACnetLiftCarCallListFloorList) Serialize() ([]byte, error) { func (m *_BACnetLiftCarCallListFloorList) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetLiftCarCallListFloorList"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetLiftCarCallListFloorList"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetLiftCarCallListFloorList") } @@ -255,13 +260,13 @@ func (m *_BACnetLiftCarCallListFloorList) SerializeWithWriteBuffer(ctx context.C return nil } + //// // Arguments Getter func (m *_BACnetLiftCarCallListFloorList) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -279,3 +284,6 @@ func (m *_BACnetLiftCarCallListFloorList) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftCarDirection.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftCarDirection.go index 14458844970..db374352aab 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftCarDirection.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftCarDirection.go @@ -34,21 +34,21 @@ type IBACnetLiftCarDirection interface { utils.Serializable } -const ( - BACnetLiftCarDirection_UNKNOWN BACnetLiftCarDirection = 0 - BACnetLiftCarDirection_NONE BACnetLiftCarDirection = 1 - BACnetLiftCarDirection_STOPPED BACnetLiftCarDirection = 2 - BACnetLiftCarDirection_UP BACnetLiftCarDirection = 3 - BACnetLiftCarDirection_DOWN BACnetLiftCarDirection = 4 - BACnetLiftCarDirection_UP_AND_DOWN BACnetLiftCarDirection = 5 - BACnetLiftCarDirection_VENDOR_PROPRIETARY_VALUE BACnetLiftCarDirection = 0xFFFF +const( + BACnetLiftCarDirection_UNKNOWN BACnetLiftCarDirection = 0 + BACnetLiftCarDirection_NONE BACnetLiftCarDirection = 1 + BACnetLiftCarDirection_STOPPED BACnetLiftCarDirection = 2 + BACnetLiftCarDirection_UP BACnetLiftCarDirection = 3 + BACnetLiftCarDirection_DOWN BACnetLiftCarDirection = 4 + BACnetLiftCarDirection_UP_AND_DOWN BACnetLiftCarDirection = 5 + BACnetLiftCarDirection_VENDOR_PROPRIETARY_VALUE BACnetLiftCarDirection = 0XFFFF ) var BACnetLiftCarDirectionValues []BACnetLiftCarDirection func init() { _ = errors.New - BACnetLiftCarDirectionValues = []BACnetLiftCarDirection{ + BACnetLiftCarDirectionValues = []BACnetLiftCarDirection { BACnetLiftCarDirection_UNKNOWN, BACnetLiftCarDirection_NONE, BACnetLiftCarDirection_STOPPED, @@ -61,20 +61,20 @@ func init() { func BACnetLiftCarDirectionByValue(value uint16) (enum BACnetLiftCarDirection, ok bool) { switch value { - case 0: - return BACnetLiftCarDirection_UNKNOWN, true - case 0xFFFF: - return BACnetLiftCarDirection_VENDOR_PROPRIETARY_VALUE, true - case 1: - return BACnetLiftCarDirection_NONE, true - case 2: - return BACnetLiftCarDirection_STOPPED, true - case 3: - return BACnetLiftCarDirection_UP, true - case 4: - return BACnetLiftCarDirection_DOWN, true - case 5: - return BACnetLiftCarDirection_UP_AND_DOWN, true + case 0: + return BACnetLiftCarDirection_UNKNOWN, true + case 0XFFFF: + return BACnetLiftCarDirection_VENDOR_PROPRIETARY_VALUE, true + case 1: + return BACnetLiftCarDirection_NONE, true + case 2: + return BACnetLiftCarDirection_STOPPED, true + case 3: + return BACnetLiftCarDirection_UP, true + case 4: + return BACnetLiftCarDirection_DOWN, true + case 5: + return BACnetLiftCarDirection_UP_AND_DOWN, true } return 0, false } @@ -99,13 +99,13 @@ func BACnetLiftCarDirectionByName(value string) (enum BACnetLiftCarDirection, ok return 0, false } -func BACnetLiftCarDirectionKnows(value uint16) bool { +func BACnetLiftCarDirectionKnows(value uint16) bool { for _, typeValue := range BACnetLiftCarDirectionValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastBACnetLiftCarDirection(structType interface{}) BACnetLiftCarDirection { @@ -179,3 +179,4 @@ func (e BACnetLiftCarDirection) PLC4XEnumName() string { func (e BACnetLiftCarDirection) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftCarDirectionTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftCarDirectionTagged.go index 5485d36cda1..ad38bcfe238 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftCarDirectionTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftCarDirectionTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLiftCarDirectionTagged is the corresponding interface of BACnetLiftCarDirectionTagged type BACnetLiftCarDirectionTagged interface { @@ -50,15 +52,16 @@ type BACnetLiftCarDirectionTaggedExactly interface { // _BACnetLiftCarDirectionTagged is the data-structure of this message type _BACnetLiftCarDirectionTagged struct { - Header BACnetTagHeader - Value BACnetLiftCarDirection - ProprietaryValue uint32 + Header BACnetTagHeader + Value BACnetLiftCarDirection + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_BACnetLiftCarDirectionTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLiftCarDirectionTagged factory function for _BACnetLiftCarDirectionTagged -func NewBACnetLiftCarDirectionTagged(header BACnetTagHeader, value BACnetLiftCarDirection, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_BACnetLiftCarDirectionTagged { - return &_BACnetLiftCarDirectionTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetLiftCarDirectionTagged( header BACnetTagHeader , value BACnetLiftCarDirection , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_BACnetLiftCarDirectionTagged { +return &_BACnetLiftCarDirectionTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetLiftCarDirectionTagged(structType interface{}) BACnetLiftCarDirectionTagged { - if casted, ok := structType.(BACnetLiftCarDirectionTagged); ok { + if casted, ok := structType.(BACnetLiftCarDirectionTagged); ok { return casted } if casted, ok := structType.(*BACnetLiftCarDirectionTagged); ok { @@ -123,16 +127,17 @@ func (m *_BACnetLiftCarDirectionTagged) GetLengthInBits(ctx context.Context) uin lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetLiftCarDirectionTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetLiftCarDirectionTaggedParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetLiftCarDirectionTagged") } @@ -164,12 +169,12 @@ func BACnetLiftCarDirectionTaggedParseWithBuffer(ctx context.Context, readBuffer } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func BACnetLiftCarDirectionTaggedParseWithBuffer(ctx context.Context, readBuffer } var value BACnetLiftCarDirection if _value != nil { - value = _value.(BACnetLiftCarDirection) + value = _value.(BACnetLiftCarDirection) } // Virtual field @@ -195,7 +200,7 @@ func BACnetLiftCarDirectionTaggedParseWithBuffer(ctx context.Context, readBuffer } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetLiftCarDirectionTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func BACnetLiftCarDirectionTaggedParseWithBuffer(ctx context.Context, readBuffer // Create the instance return &_BACnetLiftCarDirectionTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetLiftCarDirectionTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_BACnetLiftCarDirectionTagged) Serialize() ([]byte, error) { func (m *_BACnetLiftCarDirectionTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetLiftCarDirectionTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetLiftCarDirectionTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetLiftCarDirectionTagged") } @@ -261,6 +266,7 @@ func (m *_BACnetLiftCarDirectionTagged) SerializeWithWriteBuffer(ctx context.Con return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_BACnetLiftCarDirectionTagged) GetTagNumber() uint8 { func (m *_BACnetLiftCarDirectionTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_BACnetLiftCarDirectionTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftCarDoorCommand.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftCarDoorCommand.go index 672a9ae473b..756a45cf031 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftCarDoorCommand.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftCarDoorCommand.go @@ -34,9 +34,9 @@ type IBACnetLiftCarDoorCommand interface { utils.Serializable } -const ( - BACnetLiftCarDoorCommand_NONE BACnetLiftCarDoorCommand = 0 - BACnetLiftCarDoorCommand_OPEN BACnetLiftCarDoorCommand = 1 +const( + BACnetLiftCarDoorCommand_NONE BACnetLiftCarDoorCommand = 0 + BACnetLiftCarDoorCommand_OPEN BACnetLiftCarDoorCommand = 1 BACnetLiftCarDoorCommand_CLOSE BACnetLiftCarDoorCommand = 2 ) @@ -44,7 +44,7 @@ var BACnetLiftCarDoorCommandValues []BACnetLiftCarDoorCommand func init() { _ = errors.New - BACnetLiftCarDoorCommandValues = []BACnetLiftCarDoorCommand{ + BACnetLiftCarDoorCommandValues = []BACnetLiftCarDoorCommand { BACnetLiftCarDoorCommand_NONE, BACnetLiftCarDoorCommand_OPEN, BACnetLiftCarDoorCommand_CLOSE, @@ -53,12 +53,12 @@ func init() { func BACnetLiftCarDoorCommandByValue(value uint8) (enum BACnetLiftCarDoorCommand, ok bool) { switch value { - case 0: - return BACnetLiftCarDoorCommand_NONE, true - case 1: - return BACnetLiftCarDoorCommand_OPEN, true - case 2: - return BACnetLiftCarDoorCommand_CLOSE, true + case 0: + return BACnetLiftCarDoorCommand_NONE, true + case 1: + return BACnetLiftCarDoorCommand_OPEN, true + case 2: + return BACnetLiftCarDoorCommand_CLOSE, true } return 0, false } @@ -75,13 +75,13 @@ func BACnetLiftCarDoorCommandByName(value string) (enum BACnetLiftCarDoorCommand return 0, false } -func BACnetLiftCarDoorCommandKnows(value uint8) bool { +func BACnetLiftCarDoorCommandKnows(value uint8) bool { for _, typeValue := range BACnetLiftCarDoorCommandValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetLiftCarDoorCommand(structType interface{}) BACnetLiftCarDoorCommand { @@ -147,3 +147,4 @@ func (e BACnetLiftCarDoorCommand) PLC4XEnumName() string { func (e BACnetLiftCarDoorCommand) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftCarDoorCommandTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftCarDoorCommandTagged.go index 105e237dda3..5a03544e9fb 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftCarDoorCommandTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftCarDoorCommandTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLiftCarDoorCommandTagged is the corresponding interface of BACnetLiftCarDoorCommandTagged type BACnetLiftCarDoorCommandTagged interface { @@ -46,14 +48,15 @@ type BACnetLiftCarDoorCommandTaggedExactly interface { // _BACnetLiftCarDoorCommandTagged is the data-structure of this message type _BACnetLiftCarDoorCommandTagged struct { - Header BACnetTagHeader - Value BACnetLiftCarDoorCommand + Header BACnetTagHeader + Value BACnetLiftCarDoorCommand // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_BACnetLiftCarDoorCommandTagged) GetValue() BACnetLiftCarDoorCommand { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLiftCarDoorCommandTagged factory function for _BACnetLiftCarDoorCommandTagged -func NewBACnetLiftCarDoorCommandTagged(header BACnetTagHeader, value BACnetLiftCarDoorCommand, tagNumber uint8, tagClass TagClass) *_BACnetLiftCarDoorCommandTagged { - return &_BACnetLiftCarDoorCommandTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetLiftCarDoorCommandTagged( header BACnetTagHeader , value BACnetLiftCarDoorCommand , tagNumber uint8 , tagClass TagClass ) *_BACnetLiftCarDoorCommandTagged { +return &_BACnetLiftCarDoorCommandTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetLiftCarDoorCommandTagged(structType interface{}) BACnetLiftCarDoorCommandTagged { - if casted, ok := structType.(BACnetLiftCarDoorCommandTagged); ok { + if casted, ok := structType.(BACnetLiftCarDoorCommandTagged); ok { return casted } if casted, ok := structType.(*BACnetLiftCarDoorCommandTagged); ok { @@ -104,6 +108,7 @@ func (m *_BACnetLiftCarDoorCommandTagged) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetLiftCarDoorCommandTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func BACnetLiftCarDoorCommandTaggedParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetLiftCarDoorCommandTagged") } @@ -135,12 +140,12 @@ func BACnetLiftCarDoorCommandTaggedParseWithBuffer(ctx context.Context, readBuff } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func BACnetLiftCarDoorCommandTaggedParseWithBuffer(ctx context.Context, readBuff } var value BACnetLiftCarDoorCommand if _value != nil { - value = _value.(BACnetLiftCarDoorCommand) + value = _value.(BACnetLiftCarDoorCommand) } if closeErr := readBuffer.CloseContext("BACnetLiftCarDoorCommandTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func BACnetLiftCarDoorCommandTaggedParseWithBuffer(ctx context.Context, readBuff // Create the instance return &_BACnetLiftCarDoorCommandTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_BACnetLiftCarDoorCommandTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_BACnetLiftCarDoorCommandTagged) Serialize() ([]byte, error) { func (m *_BACnetLiftCarDoorCommandTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetLiftCarDoorCommandTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetLiftCarDoorCommandTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetLiftCarDoorCommandTagged") } @@ -206,6 +211,7 @@ func (m *_BACnetLiftCarDoorCommandTagged) SerializeWithWriteBuffer(ctx context.C return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_BACnetLiftCarDoorCommandTagged) GetTagNumber() uint8 { func (m *_BACnetLiftCarDoorCommandTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_BACnetLiftCarDoorCommandTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftCarDriveStatus.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftCarDriveStatus.go index 22847fd8096..f33b5d15e8b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftCarDriveStatus.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftCarDriveStatus.go @@ -34,25 +34,25 @@ type IBACnetLiftCarDriveStatus interface { utils.Serializable } -const ( - BACnetLiftCarDriveStatus_UNKNOWN BACnetLiftCarDriveStatus = 0 - BACnetLiftCarDriveStatus_STATIONARY BACnetLiftCarDriveStatus = 1 - BACnetLiftCarDriveStatus_BRAKING BACnetLiftCarDriveStatus = 2 - BACnetLiftCarDriveStatus_ACCELERATE BACnetLiftCarDriveStatus = 3 - BACnetLiftCarDriveStatus_DECELERATE BACnetLiftCarDriveStatus = 4 - BACnetLiftCarDriveStatus_RATED_SPEED BACnetLiftCarDriveStatus = 5 - BACnetLiftCarDriveStatus_SINGLE_FLOOR_JUMP BACnetLiftCarDriveStatus = 6 - BACnetLiftCarDriveStatus_TWO_FLOOR_JUMP BACnetLiftCarDriveStatus = 7 - BACnetLiftCarDriveStatus_THREE_FLOOR_JUMP BACnetLiftCarDriveStatus = 8 - BACnetLiftCarDriveStatus_MULTI_FLOOR_JUMP BACnetLiftCarDriveStatus = 9 - BACnetLiftCarDriveStatus_VENDOR_PROPRIETARY_VALUE BACnetLiftCarDriveStatus = 0xFFFF +const( + BACnetLiftCarDriveStatus_UNKNOWN BACnetLiftCarDriveStatus = 0 + BACnetLiftCarDriveStatus_STATIONARY BACnetLiftCarDriveStatus = 1 + BACnetLiftCarDriveStatus_BRAKING BACnetLiftCarDriveStatus = 2 + BACnetLiftCarDriveStatus_ACCELERATE BACnetLiftCarDriveStatus = 3 + BACnetLiftCarDriveStatus_DECELERATE BACnetLiftCarDriveStatus = 4 + BACnetLiftCarDriveStatus_RATED_SPEED BACnetLiftCarDriveStatus = 5 + BACnetLiftCarDriveStatus_SINGLE_FLOOR_JUMP BACnetLiftCarDriveStatus = 6 + BACnetLiftCarDriveStatus_TWO_FLOOR_JUMP BACnetLiftCarDriveStatus = 7 + BACnetLiftCarDriveStatus_THREE_FLOOR_JUMP BACnetLiftCarDriveStatus = 8 + BACnetLiftCarDriveStatus_MULTI_FLOOR_JUMP BACnetLiftCarDriveStatus = 9 + BACnetLiftCarDriveStatus_VENDOR_PROPRIETARY_VALUE BACnetLiftCarDriveStatus = 0XFFFF ) var BACnetLiftCarDriveStatusValues []BACnetLiftCarDriveStatus func init() { _ = errors.New - BACnetLiftCarDriveStatusValues = []BACnetLiftCarDriveStatus{ + BACnetLiftCarDriveStatusValues = []BACnetLiftCarDriveStatus { BACnetLiftCarDriveStatus_UNKNOWN, BACnetLiftCarDriveStatus_STATIONARY, BACnetLiftCarDriveStatus_BRAKING, @@ -69,28 +69,28 @@ func init() { func BACnetLiftCarDriveStatusByValue(value uint16) (enum BACnetLiftCarDriveStatus, ok bool) { switch value { - case 0: - return BACnetLiftCarDriveStatus_UNKNOWN, true - case 0xFFFF: - return BACnetLiftCarDriveStatus_VENDOR_PROPRIETARY_VALUE, true - case 1: - return BACnetLiftCarDriveStatus_STATIONARY, true - case 2: - return BACnetLiftCarDriveStatus_BRAKING, true - case 3: - return BACnetLiftCarDriveStatus_ACCELERATE, true - case 4: - return BACnetLiftCarDriveStatus_DECELERATE, true - case 5: - return BACnetLiftCarDriveStatus_RATED_SPEED, true - case 6: - return BACnetLiftCarDriveStatus_SINGLE_FLOOR_JUMP, true - case 7: - return BACnetLiftCarDriveStatus_TWO_FLOOR_JUMP, true - case 8: - return BACnetLiftCarDriveStatus_THREE_FLOOR_JUMP, true - case 9: - return BACnetLiftCarDriveStatus_MULTI_FLOOR_JUMP, true + case 0: + return BACnetLiftCarDriveStatus_UNKNOWN, true + case 0XFFFF: + return BACnetLiftCarDriveStatus_VENDOR_PROPRIETARY_VALUE, true + case 1: + return BACnetLiftCarDriveStatus_STATIONARY, true + case 2: + return BACnetLiftCarDriveStatus_BRAKING, true + case 3: + return BACnetLiftCarDriveStatus_ACCELERATE, true + case 4: + return BACnetLiftCarDriveStatus_DECELERATE, true + case 5: + return BACnetLiftCarDriveStatus_RATED_SPEED, true + case 6: + return BACnetLiftCarDriveStatus_SINGLE_FLOOR_JUMP, true + case 7: + return BACnetLiftCarDriveStatus_TWO_FLOOR_JUMP, true + case 8: + return BACnetLiftCarDriveStatus_THREE_FLOOR_JUMP, true + case 9: + return BACnetLiftCarDriveStatus_MULTI_FLOOR_JUMP, true } return 0, false } @@ -123,13 +123,13 @@ func BACnetLiftCarDriveStatusByName(value string) (enum BACnetLiftCarDriveStatus return 0, false } -func BACnetLiftCarDriveStatusKnows(value uint16) bool { +func BACnetLiftCarDriveStatusKnows(value uint16) bool { for _, typeValue := range BACnetLiftCarDriveStatusValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastBACnetLiftCarDriveStatus(structType interface{}) BACnetLiftCarDriveStatus { @@ -211,3 +211,4 @@ func (e BACnetLiftCarDriveStatus) PLC4XEnumName() string { func (e BACnetLiftCarDriveStatus) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftCarDriveStatusTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftCarDriveStatusTagged.go index c74db8001c9..7feff0edaf9 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftCarDriveStatusTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftCarDriveStatusTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLiftCarDriveStatusTagged is the corresponding interface of BACnetLiftCarDriveStatusTagged type BACnetLiftCarDriveStatusTagged interface { @@ -50,15 +52,16 @@ type BACnetLiftCarDriveStatusTaggedExactly interface { // _BACnetLiftCarDriveStatusTagged is the data-structure of this message type _BACnetLiftCarDriveStatusTagged struct { - Header BACnetTagHeader - Value BACnetLiftCarDriveStatus - ProprietaryValue uint32 + Header BACnetTagHeader + Value BACnetLiftCarDriveStatus + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_BACnetLiftCarDriveStatusTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLiftCarDriveStatusTagged factory function for _BACnetLiftCarDriveStatusTagged -func NewBACnetLiftCarDriveStatusTagged(header BACnetTagHeader, value BACnetLiftCarDriveStatus, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_BACnetLiftCarDriveStatusTagged { - return &_BACnetLiftCarDriveStatusTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetLiftCarDriveStatusTagged( header BACnetTagHeader , value BACnetLiftCarDriveStatus , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_BACnetLiftCarDriveStatusTagged { +return &_BACnetLiftCarDriveStatusTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetLiftCarDriveStatusTagged(structType interface{}) BACnetLiftCarDriveStatusTagged { - if casted, ok := structType.(BACnetLiftCarDriveStatusTagged); ok { + if casted, ok := structType.(BACnetLiftCarDriveStatusTagged); ok { return casted } if casted, ok := structType.(*BACnetLiftCarDriveStatusTagged); ok { @@ -123,16 +127,17 @@ func (m *_BACnetLiftCarDriveStatusTagged) GetLengthInBits(ctx context.Context) u lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetLiftCarDriveStatusTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetLiftCarDriveStatusTaggedParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetLiftCarDriveStatusTagged") } @@ -164,12 +169,12 @@ func BACnetLiftCarDriveStatusTaggedParseWithBuffer(ctx context.Context, readBuff } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func BACnetLiftCarDriveStatusTaggedParseWithBuffer(ctx context.Context, readBuff } var value BACnetLiftCarDriveStatus if _value != nil { - value = _value.(BACnetLiftCarDriveStatus) + value = _value.(BACnetLiftCarDriveStatus) } // Virtual field @@ -195,7 +200,7 @@ func BACnetLiftCarDriveStatusTaggedParseWithBuffer(ctx context.Context, readBuff } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetLiftCarDriveStatusTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func BACnetLiftCarDriveStatusTaggedParseWithBuffer(ctx context.Context, readBuff // Create the instance return &_BACnetLiftCarDriveStatusTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetLiftCarDriveStatusTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_BACnetLiftCarDriveStatusTagged) Serialize() ([]byte, error) { func (m *_BACnetLiftCarDriveStatusTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetLiftCarDriveStatusTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetLiftCarDriveStatusTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetLiftCarDriveStatusTagged") } @@ -261,6 +266,7 @@ func (m *_BACnetLiftCarDriveStatusTagged) SerializeWithWriteBuffer(ctx context.C return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_BACnetLiftCarDriveStatusTagged) GetTagNumber() uint8 { func (m *_BACnetLiftCarDriveStatusTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_BACnetLiftCarDriveStatusTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftCarMode.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftCarMode.go index 813237bca7b..80ddf9630cd 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftCarMode.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftCarMode.go @@ -34,29 +34,29 @@ type IBACnetLiftCarMode interface { utils.Serializable } -const ( - BACnetLiftCarMode_UNKNOWN BACnetLiftCarMode = 0 - BACnetLiftCarMode_NORMAL BACnetLiftCarMode = 1 - BACnetLiftCarMode_VIP BACnetLiftCarMode = 2 - BACnetLiftCarMode_HOMING BACnetLiftCarMode = 3 - BACnetLiftCarMode_PARKING BACnetLiftCarMode = 4 - BACnetLiftCarMode_ATTENDANT_CONTROL BACnetLiftCarMode = 5 - BACnetLiftCarMode_FIREFIGHTER_CONTROL BACnetLiftCarMode = 6 - BACnetLiftCarMode_EMERGENCY_POWER BACnetLiftCarMode = 7 - BACnetLiftCarMode_INSPECTION BACnetLiftCarMode = 8 - BACnetLiftCarMode_CABINET_RECALL BACnetLiftCarMode = 9 - BACnetLiftCarMode_EARTHQUAKE_OPERATION BACnetLiftCarMode = 10 - BACnetLiftCarMode_FIRE_OPERATION BACnetLiftCarMode = 11 - BACnetLiftCarMode_OUT_OF_SERVICE BACnetLiftCarMode = 12 - BACnetLiftCarMode_OCCUPANT_EVACUATION BACnetLiftCarMode = 13 - BACnetLiftCarMode_VENDOR_PROPRIETARY_VALUE BACnetLiftCarMode = 0xFFFF +const( + BACnetLiftCarMode_UNKNOWN BACnetLiftCarMode = 0 + BACnetLiftCarMode_NORMAL BACnetLiftCarMode = 1 + BACnetLiftCarMode_VIP BACnetLiftCarMode = 2 + BACnetLiftCarMode_HOMING BACnetLiftCarMode = 3 + BACnetLiftCarMode_PARKING BACnetLiftCarMode = 4 + BACnetLiftCarMode_ATTENDANT_CONTROL BACnetLiftCarMode = 5 + BACnetLiftCarMode_FIREFIGHTER_CONTROL BACnetLiftCarMode = 6 + BACnetLiftCarMode_EMERGENCY_POWER BACnetLiftCarMode = 7 + BACnetLiftCarMode_INSPECTION BACnetLiftCarMode = 8 + BACnetLiftCarMode_CABINET_RECALL BACnetLiftCarMode = 9 + BACnetLiftCarMode_EARTHQUAKE_OPERATION BACnetLiftCarMode = 10 + BACnetLiftCarMode_FIRE_OPERATION BACnetLiftCarMode = 11 + BACnetLiftCarMode_OUT_OF_SERVICE BACnetLiftCarMode = 12 + BACnetLiftCarMode_OCCUPANT_EVACUATION BACnetLiftCarMode = 13 + BACnetLiftCarMode_VENDOR_PROPRIETARY_VALUE BACnetLiftCarMode = 0XFFFF ) var BACnetLiftCarModeValues []BACnetLiftCarMode func init() { _ = errors.New - BACnetLiftCarModeValues = []BACnetLiftCarMode{ + BACnetLiftCarModeValues = []BACnetLiftCarMode { BACnetLiftCarMode_UNKNOWN, BACnetLiftCarMode_NORMAL, BACnetLiftCarMode_VIP, @@ -77,36 +77,36 @@ func init() { func BACnetLiftCarModeByValue(value uint16) (enum BACnetLiftCarMode, ok bool) { switch value { - case 0: - return BACnetLiftCarMode_UNKNOWN, true - case 0xFFFF: - return BACnetLiftCarMode_VENDOR_PROPRIETARY_VALUE, true - case 1: - return BACnetLiftCarMode_NORMAL, true - case 10: - return BACnetLiftCarMode_EARTHQUAKE_OPERATION, true - case 11: - return BACnetLiftCarMode_FIRE_OPERATION, true - case 12: - return BACnetLiftCarMode_OUT_OF_SERVICE, true - case 13: - return BACnetLiftCarMode_OCCUPANT_EVACUATION, true - case 2: - return BACnetLiftCarMode_VIP, true - case 3: - return BACnetLiftCarMode_HOMING, true - case 4: - return BACnetLiftCarMode_PARKING, true - case 5: - return BACnetLiftCarMode_ATTENDANT_CONTROL, true - case 6: - return BACnetLiftCarMode_FIREFIGHTER_CONTROL, true - case 7: - return BACnetLiftCarMode_EMERGENCY_POWER, true - case 8: - return BACnetLiftCarMode_INSPECTION, true - case 9: - return BACnetLiftCarMode_CABINET_RECALL, true + case 0: + return BACnetLiftCarMode_UNKNOWN, true + case 0XFFFF: + return BACnetLiftCarMode_VENDOR_PROPRIETARY_VALUE, true + case 1: + return BACnetLiftCarMode_NORMAL, true + case 10: + return BACnetLiftCarMode_EARTHQUAKE_OPERATION, true + case 11: + return BACnetLiftCarMode_FIRE_OPERATION, true + case 12: + return BACnetLiftCarMode_OUT_OF_SERVICE, true + case 13: + return BACnetLiftCarMode_OCCUPANT_EVACUATION, true + case 2: + return BACnetLiftCarMode_VIP, true + case 3: + return BACnetLiftCarMode_HOMING, true + case 4: + return BACnetLiftCarMode_PARKING, true + case 5: + return BACnetLiftCarMode_ATTENDANT_CONTROL, true + case 6: + return BACnetLiftCarMode_FIREFIGHTER_CONTROL, true + case 7: + return BACnetLiftCarMode_EMERGENCY_POWER, true + case 8: + return BACnetLiftCarMode_INSPECTION, true + case 9: + return BACnetLiftCarMode_CABINET_RECALL, true } return 0, false } @@ -147,13 +147,13 @@ func BACnetLiftCarModeByName(value string) (enum BACnetLiftCarMode, ok bool) { return 0, false } -func BACnetLiftCarModeKnows(value uint16) bool { +func BACnetLiftCarModeKnows(value uint16) bool { for _, typeValue := range BACnetLiftCarModeValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastBACnetLiftCarMode(structType interface{}) BACnetLiftCarMode { @@ -243,3 +243,4 @@ func (e BACnetLiftCarMode) PLC4XEnumName() string { func (e BACnetLiftCarMode) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftCarModeTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftCarModeTagged.go index cbb302a2414..dfb361810ca 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftCarModeTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftCarModeTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLiftCarModeTagged is the corresponding interface of BACnetLiftCarModeTagged type BACnetLiftCarModeTagged interface { @@ -50,15 +52,16 @@ type BACnetLiftCarModeTaggedExactly interface { // _BACnetLiftCarModeTagged is the data-structure of this message type _BACnetLiftCarModeTagged struct { - Header BACnetTagHeader - Value BACnetLiftCarMode - ProprietaryValue uint32 + Header BACnetTagHeader + Value BACnetLiftCarMode + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_BACnetLiftCarModeTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLiftCarModeTagged factory function for _BACnetLiftCarModeTagged -func NewBACnetLiftCarModeTagged(header BACnetTagHeader, value BACnetLiftCarMode, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_BACnetLiftCarModeTagged { - return &_BACnetLiftCarModeTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetLiftCarModeTagged( header BACnetTagHeader , value BACnetLiftCarMode , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_BACnetLiftCarModeTagged { +return &_BACnetLiftCarModeTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetLiftCarModeTagged(structType interface{}) BACnetLiftCarModeTagged { - if casted, ok := structType.(BACnetLiftCarModeTagged); ok { + if casted, ok := structType.(BACnetLiftCarModeTagged); ok { return casted } if casted, ok := structType.(*BACnetLiftCarModeTagged); ok { @@ -123,16 +127,17 @@ func (m *_BACnetLiftCarModeTagged) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetLiftCarModeTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetLiftCarModeTaggedParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetLiftCarModeTagged") } @@ -164,12 +169,12 @@ func BACnetLiftCarModeTaggedParseWithBuffer(ctx context.Context, readBuffer util } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func BACnetLiftCarModeTaggedParseWithBuffer(ctx context.Context, readBuffer util } var value BACnetLiftCarMode if _value != nil { - value = _value.(BACnetLiftCarMode) + value = _value.(BACnetLiftCarMode) } // Virtual field @@ -195,7 +200,7 @@ func BACnetLiftCarModeTaggedParseWithBuffer(ctx context.Context, readBuffer util } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetLiftCarModeTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func BACnetLiftCarModeTaggedParseWithBuffer(ctx context.Context, readBuffer util // Create the instance return &_BACnetLiftCarModeTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetLiftCarModeTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_BACnetLiftCarModeTagged) Serialize() ([]byte, error) { func (m *_BACnetLiftCarModeTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetLiftCarModeTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetLiftCarModeTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetLiftCarModeTagged") } @@ -261,6 +266,7 @@ func (m *_BACnetLiftCarModeTagged) SerializeWithWriteBuffer(ctx context.Context, return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_BACnetLiftCarModeTagged) GetTagNumber() uint8 { func (m *_BACnetLiftCarModeTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_BACnetLiftCarModeTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftFault.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftFault.go index 5d1d27f3cf7..3c281224c77 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftFault.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftFault.go @@ -34,32 +34,32 @@ type IBACnetLiftFault interface { utils.Serializable } -const ( - BACnetLiftFault_CONTROLLER_FAULT BACnetLiftFault = 0 - BACnetLiftFault_DRIVE_AND_MOTOR_FAULT BACnetLiftFault = 1 - BACnetLiftFault_GOVERNOR_AND_SAFETY_GEAR_FAULT BACnetLiftFault = 2 - BACnetLiftFault_LIFT_SHAFT_DEVICE_FAULT BACnetLiftFault = 3 - BACnetLiftFault_POWER_SUPPLY_FAULT BACnetLiftFault = 4 - BACnetLiftFault_SAFETY_INTERLOCK_FAULT BACnetLiftFault = 5 - BACnetLiftFault_DOOR_CLOSING_FAULT BACnetLiftFault = 6 - BACnetLiftFault_DOOR_OPENING_FAULT BACnetLiftFault = 7 +const( + BACnetLiftFault_CONTROLLER_FAULT BACnetLiftFault = 0 + BACnetLiftFault_DRIVE_AND_MOTOR_FAULT BACnetLiftFault = 1 + BACnetLiftFault_GOVERNOR_AND_SAFETY_GEAR_FAULT BACnetLiftFault = 2 + BACnetLiftFault_LIFT_SHAFT_DEVICE_FAULT BACnetLiftFault = 3 + BACnetLiftFault_POWER_SUPPLY_FAULT BACnetLiftFault = 4 + BACnetLiftFault_SAFETY_INTERLOCK_FAULT BACnetLiftFault = 5 + BACnetLiftFault_DOOR_CLOSING_FAULT BACnetLiftFault = 6 + BACnetLiftFault_DOOR_OPENING_FAULT BACnetLiftFault = 7 BACnetLiftFault_CAR_STOPPED_OUTSIDE_LANDING_ZONE BACnetLiftFault = 8 - BACnetLiftFault_CALL_BUTTON_STUCK BACnetLiftFault = 9 - BACnetLiftFault_START_FAILURE BACnetLiftFault = 10 - BACnetLiftFault_CONTROLLER_SUPPLY_FAULT BACnetLiftFault = 11 - BACnetLiftFault_SELF_TEST_FAILURE BACnetLiftFault = 12 - BACnetLiftFault_RUNTIME_LIMIT_EXCEEDED BACnetLiftFault = 13 - BACnetLiftFault_POSITION_LOST BACnetLiftFault = 14 - BACnetLiftFault_DRIVE_TEMPERATURE_EXCEEDED BACnetLiftFault = 15 - BACnetLiftFault_LOAD_MEASUREMENT_FAULT BACnetLiftFault = 16 - BACnetLiftFault_VENDOR_PROPRIETARY_VALUE BACnetLiftFault = 0xFFFF + BACnetLiftFault_CALL_BUTTON_STUCK BACnetLiftFault = 9 + BACnetLiftFault_START_FAILURE BACnetLiftFault = 10 + BACnetLiftFault_CONTROLLER_SUPPLY_FAULT BACnetLiftFault = 11 + BACnetLiftFault_SELF_TEST_FAILURE BACnetLiftFault = 12 + BACnetLiftFault_RUNTIME_LIMIT_EXCEEDED BACnetLiftFault = 13 + BACnetLiftFault_POSITION_LOST BACnetLiftFault = 14 + BACnetLiftFault_DRIVE_TEMPERATURE_EXCEEDED BACnetLiftFault = 15 + BACnetLiftFault_LOAD_MEASUREMENT_FAULT BACnetLiftFault = 16 + BACnetLiftFault_VENDOR_PROPRIETARY_VALUE BACnetLiftFault = 0XFFFF ) var BACnetLiftFaultValues []BACnetLiftFault func init() { _ = errors.New - BACnetLiftFaultValues = []BACnetLiftFault{ + BACnetLiftFaultValues = []BACnetLiftFault { BACnetLiftFault_CONTROLLER_FAULT, BACnetLiftFault_DRIVE_AND_MOTOR_FAULT, BACnetLiftFault_GOVERNOR_AND_SAFETY_GEAR_FAULT, @@ -83,42 +83,42 @@ func init() { func BACnetLiftFaultByValue(value uint16) (enum BACnetLiftFault, ok bool) { switch value { - case 0: - return BACnetLiftFault_CONTROLLER_FAULT, true - case 0xFFFF: - return BACnetLiftFault_VENDOR_PROPRIETARY_VALUE, true - case 1: - return BACnetLiftFault_DRIVE_AND_MOTOR_FAULT, true - case 10: - return BACnetLiftFault_START_FAILURE, true - case 11: - return BACnetLiftFault_CONTROLLER_SUPPLY_FAULT, true - case 12: - return BACnetLiftFault_SELF_TEST_FAILURE, true - case 13: - return BACnetLiftFault_RUNTIME_LIMIT_EXCEEDED, true - case 14: - return BACnetLiftFault_POSITION_LOST, true - case 15: - return BACnetLiftFault_DRIVE_TEMPERATURE_EXCEEDED, true - case 16: - return BACnetLiftFault_LOAD_MEASUREMENT_FAULT, true - case 2: - return BACnetLiftFault_GOVERNOR_AND_SAFETY_GEAR_FAULT, true - case 3: - return BACnetLiftFault_LIFT_SHAFT_DEVICE_FAULT, true - case 4: - return BACnetLiftFault_POWER_SUPPLY_FAULT, true - case 5: - return BACnetLiftFault_SAFETY_INTERLOCK_FAULT, true - case 6: - return BACnetLiftFault_DOOR_CLOSING_FAULT, true - case 7: - return BACnetLiftFault_DOOR_OPENING_FAULT, true - case 8: - return BACnetLiftFault_CAR_STOPPED_OUTSIDE_LANDING_ZONE, true - case 9: - return BACnetLiftFault_CALL_BUTTON_STUCK, true + case 0: + return BACnetLiftFault_CONTROLLER_FAULT, true + case 0XFFFF: + return BACnetLiftFault_VENDOR_PROPRIETARY_VALUE, true + case 1: + return BACnetLiftFault_DRIVE_AND_MOTOR_FAULT, true + case 10: + return BACnetLiftFault_START_FAILURE, true + case 11: + return BACnetLiftFault_CONTROLLER_SUPPLY_FAULT, true + case 12: + return BACnetLiftFault_SELF_TEST_FAILURE, true + case 13: + return BACnetLiftFault_RUNTIME_LIMIT_EXCEEDED, true + case 14: + return BACnetLiftFault_POSITION_LOST, true + case 15: + return BACnetLiftFault_DRIVE_TEMPERATURE_EXCEEDED, true + case 16: + return BACnetLiftFault_LOAD_MEASUREMENT_FAULT, true + case 2: + return BACnetLiftFault_GOVERNOR_AND_SAFETY_GEAR_FAULT, true + case 3: + return BACnetLiftFault_LIFT_SHAFT_DEVICE_FAULT, true + case 4: + return BACnetLiftFault_POWER_SUPPLY_FAULT, true + case 5: + return BACnetLiftFault_SAFETY_INTERLOCK_FAULT, true + case 6: + return BACnetLiftFault_DOOR_CLOSING_FAULT, true + case 7: + return BACnetLiftFault_DOOR_OPENING_FAULT, true + case 8: + return BACnetLiftFault_CAR_STOPPED_OUTSIDE_LANDING_ZONE, true + case 9: + return BACnetLiftFault_CALL_BUTTON_STUCK, true } return 0, false } @@ -165,13 +165,13 @@ func BACnetLiftFaultByName(value string) (enum BACnetLiftFault, ok bool) { return 0, false } -func BACnetLiftFaultKnows(value uint16) bool { +func BACnetLiftFaultKnows(value uint16) bool { for _, typeValue := range BACnetLiftFaultValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastBACnetLiftFault(structType interface{}) BACnetLiftFault { @@ -267,3 +267,4 @@ func (e BACnetLiftFault) PLC4XEnumName() string { func (e BACnetLiftFault) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftFaultTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftFaultTagged.go index 7e43d619b21..a11bd1561a8 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftFaultTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftFaultTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLiftFaultTagged is the corresponding interface of BACnetLiftFaultTagged type BACnetLiftFaultTagged interface { @@ -50,15 +52,16 @@ type BACnetLiftFaultTaggedExactly interface { // _BACnetLiftFaultTagged is the data-structure of this message type _BACnetLiftFaultTagged struct { - Header BACnetTagHeader - Value BACnetLiftFault - ProprietaryValue uint32 + Header BACnetTagHeader + Value BACnetLiftFault + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_BACnetLiftFaultTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLiftFaultTagged factory function for _BACnetLiftFaultTagged -func NewBACnetLiftFaultTagged(header BACnetTagHeader, value BACnetLiftFault, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_BACnetLiftFaultTagged { - return &_BACnetLiftFaultTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetLiftFaultTagged( header BACnetTagHeader , value BACnetLiftFault , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_BACnetLiftFaultTagged { +return &_BACnetLiftFaultTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetLiftFaultTagged(structType interface{}) BACnetLiftFaultTagged { - if casted, ok := structType.(BACnetLiftFaultTagged); ok { + if casted, ok := structType.(BACnetLiftFaultTagged); ok { return casted } if casted, ok := structType.(*BACnetLiftFaultTagged); ok { @@ -123,16 +127,17 @@ func (m *_BACnetLiftFaultTagged) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetLiftFaultTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetLiftFaultTaggedParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetLiftFaultTagged") } @@ -164,12 +169,12 @@ func BACnetLiftFaultTaggedParseWithBuffer(ctx context.Context, readBuffer utils. } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func BACnetLiftFaultTaggedParseWithBuffer(ctx context.Context, readBuffer utils. } var value BACnetLiftFault if _value != nil { - value = _value.(BACnetLiftFault) + value = _value.(BACnetLiftFault) } // Virtual field @@ -195,7 +200,7 @@ func BACnetLiftFaultTaggedParseWithBuffer(ctx context.Context, readBuffer utils. } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetLiftFaultTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func BACnetLiftFaultTaggedParseWithBuffer(ctx context.Context, readBuffer utils. // Create the instance return &_BACnetLiftFaultTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetLiftFaultTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_BACnetLiftFaultTagged) Serialize() ([]byte, error) { func (m *_BACnetLiftFaultTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetLiftFaultTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetLiftFaultTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetLiftFaultTagged") } @@ -261,6 +266,7 @@ func (m *_BACnetLiftFaultTagged) SerializeWithWriteBuffer(ctx context.Context, w return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_BACnetLiftFaultTagged) GetTagNumber() uint8 { func (m *_BACnetLiftFaultTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_BACnetLiftFaultTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftGroupMode.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftGroupMode.go index cd40c952bae..a07c92fb70c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftGroupMode.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftGroupMode.go @@ -34,21 +34,21 @@ type IBACnetLiftGroupMode interface { utils.Serializable } -const ( - BACnetLiftGroupMode_UNKNOWN BACnetLiftGroupMode = 0 - BACnetLiftGroupMode_NORMAL BACnetLiftGroupMode = 1 - BACnetLiftGroupMode_DOWN_PEAK BACnetLiftGroupMode = 2 - BACnetLiftGroupMode_TWO_WAY BACnetLiftGroupMode = 3 - BACnetLiftGroupMode_FOUR_WAY BACnetLiftGroupMode = 4 +const( + BACnetLiftGroupMode_UNKNOWN BACnetLiftGroupMode = 0 + BACnetLiftGroupMode_NORMAL BACnetLiftGroupMode = 1 + BACnetLiftGroupMode_DOWN_PEAK BACnetLiftGroupMode = 2 + BACnetLiftGroupMode_TWO_WAY BACnetLiftGroupMode = 3 + BACnetLiftGroupMode_FOUR_WAY BACnetLiftGroupMode = 4 BACnetLiftGroupMode_EMERGENCY_POWER BACnetLiftGroupMode = 5 - BACnetLiftGroupMode_UP_PEAK BACnetLiftGroupMode = 6 + BACnetLiftGroupMode_UP_PEAK BACnetLiftGroupMode = 6 ) var BACnetLiftGroupModeValues []BACnetLiftGroupMode func init() { _ = errors.New - BACnetLiftGroupModeValues = []BACnetLiftGroupMode{ + BACnetLiftGroupModeValues = []BACnetLiftGroupMode { BACnetLiftGroupMode_UNKNOWN, BACnetLiftGroupMode_NORMAL, BACnetLiftGroupMode_DOWN_PEAK, @@ -61,20 +61,20 @@ func init() { func BACnetLiftGroupModeByValue(value uint8) (enum BACnetLiftGroupMode, ok bool) { switch value { - case 0: - return BACnetLiftGroupMode_UNKNOWN, true - case 1: - return BACnetLiftGroupMode_NORMAL, true - case 2: - return BACnetLiftGroupMode_DOWN_PEAK, true - case 3: - return BACnetLiftGroupMode_TWO_WAY, true - case 4: - return BACnetLiftGroupMode_FOUR_WAY, true - case 5: - return BACnetLiftGroupMode_EMERGENCY_POWER, true - case 6: - return BACnetLiftGroupMode_UP_PEAK, true + case 0: + return BACnetLiftGroupMode_UNKNOWN, true + case 1: + return BACnetLiftGroupMode_NORMAL, true + case 2: + return BACnetLiftGroupMode_DOWN_PEAK, true + case 3: + return BACnetLiftGroupMode_TWO_WAY, true + case 4: + return BACnetLiftGroupMode_FOUR_WAY, true + case 5: + return BACnetLiftGroupMode_EMERGENCY_POWER, true + case 6: + return BACnetLiftGroupMode_UP_PEAK, true } return 0, false } @@ -99,13 +99,13 @@ func BACnetLiftGroupModeByName(value string) (enum BACnetLiftGroupMode, ok bool) return 0, false } -func BACnetLiftGroupModeKnows(value uint8) bool { +func BACnetLiftGroupModeKnows(value uint8) bool { for _, typeValue := range BACnetLiftGroupModeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetLiftGroupMode(structType interface{}) BACnetLiftGroupMode { @@ -179,3 +179,4 @@ func (e BACnetLiftGroupMode) PLC4XEnumName() string { func (e BACnetLiftGroupMode) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftGroupModeTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftGroupModeTagged.go index 579b85241aa..0dcb8368955 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftGroupModeTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLiftGroupModeTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLiftGroupModeTagged is the corresponding interface of BACnetLiftGroupModeTagged type BACnetLiftGroupModeTagged interface { @@ -46,14 +48,15 @@ type BACnetLiftGroupModeTaggedExactly interface { // _BACnetLiftGroupModeTagged is the data-structure of this message type _BACnetLiftGroupModeTagged struct { - Header BACnetTagHeader - Value BACnetLiftGroupMode + Header BACnetTagHeader + Value BACnetLiftGroupMode // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_BACnetLiftGroupModeTagged) GetValue() BACnetLiftGroupMode { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLiftGroupModeTagged factory function for _BACnetLiftGroupModeTagged -func NewBACnetLiftGroupModeTagged(header BACnetTagHeader, value BACnetLiftGroupMode, tagNumber uint8, tagClass TagClass) *_BACnetLiftGroupModeTagged { - return &_BACnetLiftGroupModeTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetLiftGroupModeTagged( header BACnetTagHeader , value BACnetLiftGroupMode , tagNumber uint8 , tagClass TagClass ) *_BACnetLiftGroupModeTagged { +return &_BACnetLiftGroupModeTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetLiftGroupModeTagged(structType interface{}) BACnetLiftGroupModeTagged { - if casted, ok := structType.(BACnetLiftGroupModeTagged); ok { + if casted, ok := structType.(BACnetLiftGroupModeTagged); ok { return casted } if casted, ok := structType.(*BACnetLiftGroupModeTagged); ok { @@ -104,6 +108,7 @@ func (m *_BACnetLiftGroupModeTagged) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_BACnetLiftGroupModeTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func BACnetLiftGroupModeTaggedParseWithBuffer(ctx context.Context, readBuffer ut if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetLiftGroupModeTagged") } @@ -135,12 +140,12 @@ func BACnetLiftGroupModeTaggedParseWithBuffer(ctx context.Context, readBuffer ut } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func BACnetLiftGroupModeTaggedParseWithBuffer(ctx context.Context, readBuffer ut } var value BACnetLiftGroupMode if _value != nil { - value = _value.(BACnetLiftGroupMode) + value = _value.(BACnetLiftGroupMode) } if closeErr := readBuffer.CloseContext("BACnetLiftGroupModeTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func BACnetLiftGroupModeTaggedParseWithBuffer(ctx context.Context, readBuffer ut // Create the instance return &_BACnetLiftGroupModeTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_BACnetLiftGroupModeTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_BACnetLiftGroupModeTagged) Serialize() ([]byte, error) { func (m *_BACnetLiftGroupModeTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetLiftGroupModeTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetLiftGroupModeTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetLiftGroupModeTagged") } @@ -206,6 +211,7 @@ func (m *_BACnetLiftGroupModeTagged) SerializeWithWriteBuffer(ctx context.Contex return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_BACnetLiftGroupModeTagged) GetTagNumber() uint8 { func (m *_BACnetLiftGroupModeTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_BACnetLiftGroupModeTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLightingCommand.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLightingCommand.go index 98ad2c31568..c4c6eb4879d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLightingCommand.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLightingCommand.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLightingCommand is the corresponding interface of BACnetLightingCommand type BACnetLightingCommand interface { @@ -55,14 +57,15 @@ type BACnetLightingCommandExactly interface { // _BACnetLightingCommand is the data-structure of this message type _BACnetLightingCommand struct { - LightningOperation BACnetLightingOperationTagged - TargetLevel BACnetContextTagReal - RampRate BACnetContextTagReal - StepIncrement BACnetContextTagReal - FadeTime BACnetContextTagUnsignedInteger - Priority BACnetContextTagUnsignedInteger + LightningOperation BACnetLightingOperationTagged + TargetLevel BACnetContextTagReal + RampRate BACnetContextTagReal + StepIncrement BACnetContextTagReal + FadeTime BACnetContextTagUnsignedInteger + Priority BACnetContextTagUnsignedInteger } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -97,14 +100,15 @@ func (m *_BACnetLightingCommand) GetPriority() BACnetContextTagUnsignedInteger { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLightingCommand factory function for _BACnetLightingCommand -func NewBACnetLightingCommand(lightningOperation BACnetLightingOperationTagged, targetLevel BACnetContextTagReal, rampRate BACnetContextTagReal, stepIncrement BACnetContextTagReal, fadeTime BACnetContextTagUnsignedInteger, priority BACnetContextTagUnsignedInteger) *_BACnetLightingCommand { - return &_BACnetLightingCommand{LightningOperation: lightningOperation, TargetLevel: targetLevel, RampRate: rampRate, StepIncrement: stepIncrement, FadeTime: fadeTime, Priority: priority} +func NewBACnetLightingCommand( lightningOperation BACnetLightingOperationTagged , targetLevel BACnetContextTagReal , rampRate BACnetContextTagReal , stepIncrement BACnetContextTagReal , fadeTime BACnetContextTagUnsignedInteger , priority BACnetContextTagUnsignedInteger ) *_BACnetLightingCommand { +return &_BACnetLightingCommand{ LightningOperation: lightningOperation , TargetLevel: targetLevel , RampRate: rampRate , StepIncrement: stepIncrement , FadeTime: fadeTime , Priority: priority } } // Deprecated: use the interface for direct cast func CastBACnetLightingCommand(structType interface{}) BACnetLightingCommand { - if casted, ok := structType.(BACnetLightingCommand); ok { + if casted, ok := structType.(BACnetLightingCommand); ok { return casted } if casted, ok := structType.(*BACnetLightingCommand); ok { @@ -151,6 +155,7 @@ func (m *_BACnetLightingCommand) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetLightingCommand) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -172,7 +177,7 @@ func BACnetLightingCommandParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("lightningOperation"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lightningOperation") } - _lightningOperation, _lightningOperationErr := BACnetLightingOperationTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_lightningOperation, _lightningOperationErr := BACnetLightingOperationTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _lightningOperationErr != nil { return nil, errors.Wrap(_lightningOperationErr, "Error parsing 'lightningOperation' field of BACnetLightingCommand") } @@ -183,12 +188,12 @@ func BACnetLightingCommandParseWithBuffer(ctx context.Context, readBuffer utils. // Optional Field (targetLevel) (Can be skipped, if a given expression evaluates to false) var targetLevel BACnetContextTagReal = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("targetLevel"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for targetLevel") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(1), BACnetDataType_REAL) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(1) , BACnetDataType_REAL ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -205,12 +210,12 @@ func BACnetLightingCommandParseWithBuffer(ctx context.Context, readBuffer utils. // Optional Field (rampRate) (Can be skipped, if a given expression evaluates to false) var rampRate BACnetContextTagReal = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("rampRate"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for rampRate") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(2), BACnetDataType_REAL) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(2) , BACnetDataType_REAL ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -227,12 +232,12 @@ func BACnetLightingCommandParseWithBuffer(ctx context.Context, readBuffer utils. // Optional Field (stepIncrement) (Can be skipped, if a given expression evaluates to false) var stepIncrement BACnetContextTagReal = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("stepIncrement"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for stepIncrement") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(3), BACnetDataType_REAL) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(3) , BACnetDataType_REAL ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -249,12 +254,12 @@ func BACnetLightingCommandParseWithBuffer(ctx context.Context, readBuffer utils. // Optional Field (fadeTime) (Can be skipped, if a given expression evaluates to false) var fadeTime BACnetContextTagUnsignedInteger = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("fadeTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for fadeTime") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(4), BACnetDataType_UNSIGNED_INTEGER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(4) , BACnetDataType_UNSIGNED_INTEGER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -271,12 +276,12 @@ func BACnetLightingCommandParseWithBuffer(ctx context.Context, readBuffer utils. // Optional Field (priority) (Can be skipped, if a given expression evaluates to false) var priority BACnetContextTagUnsignedInteger = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("priority"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for priority") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(5), BACnetDataType_UNSIGNED_INTEGER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(5) , BACnetDataType_UNSIGNED_INTEGER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -297,13 +302,13 @@ func BACnetLightingCommandParseWithBuffer(ctx context.Context, readBuffer utils. // Create the instance return &_BACnetLightingCommand{ - LightningOperation: lightningOperation, - TargetLevel: targetLevel, - RampRate: rampRate, - StepIncrement: stepIncrement, - FadeTime: fadeTime, - Priority: priority, - }, nil + LightningOperation: lightningOperation, + TargetLevel: targetLevel, + RampRate: rampRate, + StepIncrement: stepIncrement, + FadeTime: fadeTime, + Priority: priority, + }, nil } func (m *_BACnetLightingCommand) Serialize() ([]byte, error) { @@ -317,7 +322,7 @@ func (m *_BACnetLightingCommand) Serialize() ([]byte, error) { func (m *_BACnetLightingCommand) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetLightingCommand"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetLightingCommand"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetLightingCommand") } @@ -419,6 +424,7 @@ func (m *_BACnetLightingCommand) SerializeWithWriteBuffer(ctx context.Context, w return nil } + func (m *_BACnetLightingCommand) isBACnetLightingCommand() bool { return true } @@ -433,3 +439,6 @@ func (m *_BACnetLightingCommand) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLightingCommandEnclosed.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLightingCommandEnclosed.go index 48e3e40b51a..3df4eb70b8c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLightingCommandEnclosed.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLightingCommandEnclosed.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLightingCommandEnclosed is the corresponding interface of BACnetLightingCommandEnclosed type BACnetLightingCommandEnclosed interface { @@ -48,14 +50,15 @@ type BACnetLightingCommandEnclosedExactly interface { // _BACnetLightingCommandEnclosed is the data-structure of this message type _BACnetLightingCommandEnclosed struct { - OpeningTag BACnetOpeningTag - LightingCommand BACnetLightingCommand - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + LightingCommand BACnetLightingCommand + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -78,14 +81,15 @@ func (m *_BACnetLightingCommandEnclosed) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLightingCommandEnclosed factory function for _BACnetLightingCommandEnclosed -func NewBACnetLightingCommandEnclosed(openingTag BACnetOpeningTag, lightingCommand BACnetLightingCommand, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetLightingCommandEnclosed { - return &_BACnetLightingCommandEnclosed{OpeningTag: openingTag, LightingCommand: lightingCommand, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetLightingCommandEnclosed( openingTag BACnetOpeningTag , lightingCommand BACnetLightingCommand , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetLightingCommandEnclosed { +return &_BACnetLightingCommandEnclosed{ OpeningTag: openingTag , LightingCommand: lightingCommand , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetLightingCommandEnclosed(structType interface{}) BACnetLightingCommandEnclosed { - if casted, ok := structType.(BACnetLightingCommandEnclosed); ok { + if casted, ok := structType.(BACnetLightingCommandEnclosed); ok { return casted } if casted, ok := structType.(*BACnetLightingCommandEnclosed); ok { @@ -113,6 +117,7 @@ func (m *_BACnetLightingCommandEnclosed) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetLightingCommandEnclosed) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -134,7 +139,7 @@ func BACnetLightingCommandEnclosedParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetLightingCommandEnclosed") } @@ -147,7 +152,7 @@ func BACnetLightingCommandEnclosedParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("lightingCommand"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lightingCommand") } - _lightingCommand, _lightingCommandErr := BACnetLightingCommandParseWithBuffer(ctx, readBuffer) +_lightingCommand, _lightingCommandErr := BACnetLightingCommandParseWithBuffer(ctx, readBuffer) if _lightingCommandErr != nil { return nil, errors.Wrap(_lightingCommandErr, "Error parsing 'lightingCommand' field of BACnetLightingCommandEnclosed") } @@ -160,7 +165,7 @@ func BACnetLightingCommandEnclosedParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetLightingCommandEnclosed") } @@ -175,11 +180,11 @@ func BACnetLightingCommandEnclosedParseWithBuffer(ctx context.Context, readBuffe // Create the instance return &_BACnetLightingCommandEnclosed{ - TagNumber: tagNumber, - OpeningTag: openingTag, - LightingCommand: lightingCommand, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + LightingCommand: lightingCommand, + ClosingTag: closingTag, + }, nil } func (m *_BACnetLightingCommandEnclosed) Serialize() ([]byte, error) { @@ -193,7 +198,7 @@ func (m *_BACnetLightingCommandEnclosed) Serialize() ([]byte, error) { func (m *_BACnetLightingCommandEnclosed) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetLightingCommandEnclosed"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetLightingCommandEnclosed"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetLightingCommandEnclosed") } @@ -239,13 +244,13 @@ func (m *_BACnetLightingCommandEnclosed) SerializeWithWriteBuffer(ctx context.Co return nil } + //// // Arguments Getter func (m *_BACnetLightingCommandEnclosed) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -263,3 +268,6 @@ func (m *_BACnetLightingCommandEnclosed) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLightingInProgress.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLightingInProgress.go index 3de10d067cb..51987a55602 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLightingInProgress.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLightingInProgress.go @@ -34,19 +34,19 @@ type IBACnetLightingInProgress interface { utils.Serializable } -const ( - BACnetLightingInProgress_IDLE BACnetLightingInProgress = 0 - BACnetLightingInProgress_FADE_ACTIVE BACnetLightingInProgress = 1 - BACnetLightingInProgress_RAMP_ACTIVE BACnetLightingInProgress = 2 +const( + BACnetLightingInProgress_IDLE BACnetLightingInProgress = 0 + BACnetLightingInProgress_FADE_ACTIVE BACnetLightingInProgress = 1 + BACnetLightingInProgress_RAMP_ACTIVE BACnetLightingInProgress = 2 BACnetLightingInProgress_NOT_CONTROLLED BACnetLightingInProgress = 3 - BACnetLightingInProgress_OTHER BACnetLightingInProgress = 4 + BACnetLightingInProgress_OTHER BACnetLightingInProgress = 4 ) var BACnetLightingInProgressValues []BACnetLightingInProgress func init() { _ = errors.New - BACnetLightingInProgressValues = []BACnetLightingInProgress{ + BACnetLightingInProgressValues = []BACnetLightingInProgress { BACnetLightingInProgress_IDLE, BACnetLightingInProgress_FADE_ACTIVE, BACnetLightingInProgress_RAMP_ACTIVE, @@ -57,16 +57,16 @@ func init() { func BACnetLightingInProgressByValue(value uint8) (enum BACnetLightingInProgress, ok bool) { switch value { - case 0: - return BACnetLightingInProgress_IDLE, true - case 1: - return BACnetLightingInProgress_FADE_ACTIVE, true - case 2: - return BACnetLightingInProgress_RAMP_ACTIVE, true - case 3: - return BACnetLightingInProgress_NOT_CONTROLLED, true - case 4: - return BACnetLightingInProgress_OTHER, true + case 0: + return BACnetLightingInProgress_IDLE, true + case 1: + return BACnetLightingInProgress_FADE_ACTIVE, true + case 2: + return BACnetLightingInProgress_RAMP_ACTIVE, true + case 3: + return BACnetLightingInProgress_NOT_CONTROLLED, true + case 4: + return BACnetLightingInProgress_OTHER, true } return 0, false } @@ -87,13 +87,13 @@ func BACnetLightingInProgressByName(value string) (enum BACnetLightingInProgress return 0, false } -func BACnetLightingInProgressKnows(value uint8) bool { +func BACnetLightingInProgressKnows(value uint8) bool { for _, typeValue := range BACnetLightingInProgressValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetLightingInProgress(structType interface{}) BACnetLightingInProgress { @@ -163,3 +163,4 @@ func (e BACnetLightingInProgress) PLC4XEnumName() string { func (e BACnetLightingInProgress) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLightingInProgressTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLightingInProgressTagged.go index 01d64e008ff..887b622a97a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLightingInProgressTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLightingInProgressTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLightingInProgressTagged is the corresponding interface of BACnetLightingInProgressTagged type BACnetLightingInProgressTagged interface { @@ -46,14 +48,15 @@ type BACnetLightingInProgressTaggedExactly interface { // _BACnetLightingInProgressTagged is the data-structure of this message type _BACnetLightingInProgressTagged struct { - Header BACnetTagHeader - Value BACnetLightingInProgress + Header BACnetTagHeader + Value BACnetLightingInProgress // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_BACnetLightingInProgressTagged) GetValue() BACnetLightingInProgress { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLightingInProgressTagged factory function for _BACnetLightingInProgressTagged -func NewBACnetLightingInProgressTagged(header BACnetTagHeader, value BACnetLightingInProgress, tagNumber uint8, tagClass TagClass) *_BACnetLightingInProgressTagged { - return &_BACnetLightingInProgressTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetLightingInProgressTagged( header BACnetTagHeader , value BACnetLightingInProgress , tagNumber uint8 , tagClass TagClass ) *_BACnetLightingInProgressTagged { +return &_BACnetLightingInProgressTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetLightingInProgressTagged(structType interface{}) BACnetLightingInProgressTagged { - if casted, ok := structType.(BACnetLightingInProgressTagged); ok { + if casted, ok := structType.(BACnetLightingInProgressTagged); ok { return casted } if casted, ok := structType.(*BACnetLightingInProgressTagged); ok { @@ -104,6 +108,7 @@ func (m *_BACnetLightingInProgressTagged) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetLightingInProgressTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func BACnetLightingInProgressTaggedParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetLightingInProgressTagged") } @@ -135,12 +140,12 @@ func BACnetLightingInProgressTaggedParseWithBuffer(ctx context.Context, readBuff } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func BACnetLightingInProgressTaggedParseWithBuffer(ctx context.Context, readBuff } var value BACnetLightingInProgress if _value != nil { - value = _value.(BACnetLightingInProgress) + value = _value.(BACnetLightingInProgress) } if closeErr := readBuffer.CloseContext("BACnetLightingInProgressTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func BACnetLightingInProgressTaggedParseWithBuffer(ctx context.Context, readBuff // Create the instance return &_BACnetLightingInProgressTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_BACnetLightingInProgressTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_BACnetLightingInProgressTagged) Serialize() ([]byte, error) { func (m *_BACnetLightingInProgressTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetLightingInProgressTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetLightingInProgressTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetLightingInProgressTagged") } @@ -206,6 +211,7 @@ func (m *_BACnetLightingInProgressTagged) SerializeWithWriteBuffer(ctx context.C return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_BACnetLightingInProgressTagged) GetTagNumber() uint8 { func (m *_BACnetLightingInProgressTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_BACnetLightingInProgressTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLightingOperation.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLightingOperation.go index 31fb026d8f5..7c56dbcda24 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLightingOperation.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLightingOperation.go @@ -34,26 +34,26 @@ type IBACnetLightingOperation interface { utils.Serializable } -const ( - BACnetLightingOperation_NONE BACnetLightingOperation = 0 - BACnetLightingOperation_FADE_TO BACnetLightingOperation = 1 - BACnetLightingOperation_RAMP_TO BACnetLightingOperation = 2 - BACnetLightingOperation_STEP_UP BACnetLightingOperation = 3 - BACnetLightingOperation_STEP_DOWN BACnetLightingOperation = 4 - BACnetLightingOperation_STEP_ON BACnetLightingOperation = 5 - BACnetLightingOperation_STEP_OFF BACnetLightingOperation = 6 - BACnetLightingOperation_WARN BACnetLightingOperation = 7 - BACnetLightingOperation_WARN_OFF BACnetLightingOperation = 8 - BACnetLightingOperation_WARN_RELINQUISH BACnetLightingOperation = 9 - BACnetLightingOperation_STOP BACnetLightingOperation = 10 - BACnetLightingOperation_VENDOR_PROPRIETARY_VALUE BACnetLightingOperation = 0xFFFF +const( + BACnetLightingOperation_NONE BACnetLightingOperation = 0 + BACnetLightingOperation_FADE_TO BACnetLightingOperation = 1 + BACnetLightingOperation_RAMP_TO BACnetLightingOperation = 2 + BACnetLightingOperation_STEP_UP BACnetLightingOperation = 3 + BACnetLightingOperation_STEP_DOWN BACnetLightingOperation = 4 + BACnetLightingOperation_STEP_ON BACnetLightingOperation = 5 + BACnetLightingOperation_STEP_OFF BACnetLightingOperation = 6 + BACnetLightingOperation_WARN BACnetLightingOperation = 7 + BACnetLightingOperation_WARN_OFF BACnetLightingOperation = 8 + BACnetLightingOperation_WARN_RELINQUISH BACnetLightingOperation = 9 + BACnetLightingOperation_STOP BACnetLightingOperation = 10 + BACnetLightingOperation_VENDOR_PROPRIETARY_VALUE BACnetLightingOperation = 0XFFFF ) var BACnetLightingOperationValues []BACnetLightingOperation func init() { _ = errors.New - BACnetLightingOperationValues = []BACnetLightingOperation{ + BACnetLightingOperationValues = []BACnetLightingOperation { BACnetLightingOperation_NONE, BACnetLightingOperation_FADE_TO, BACnetLightingOperation_RAMP_TO, @@ -71,30 +71,30 @@ func init() { func BACnetLightingOperationByValue(value uint16) (enum BACnetLightingOperation, ok bool) { switch value { - case 0: - return BACnetLightingOperation_NONE, true - case 0xFFFF: - return BACnetLightingOperation_VENDOR_PROPRIETARY_VALUE, true - case 1: - return BACnetLightingOperation_FADE_TO, true - case 10: - return BACnetLightingOperation_STOP, true - case 2: - return BACnetLightingOperation_RAMP_TO, true - case 3: - return BACnetLightingOperation_STEP_UP, true - case 4: - return BACnetLightingOperation_STEP_DOWN, true - case 5: - return BACnetLightingOperation_STEP_ON, true - case 6: - return BACnetLightingOperation_STEP_OFF, true - case 7: - return BACnetLightingOperation_WARN, true - case 8: - return BACnetLightingOperation_WARN_OFF, true - case 9: - return BACnetLightingOperation_WARN_RELINQUISH, true + case 0: + return BACnetLightingOperation_NONE, true + case 0XFFFF: + return BACnetLightingOperation_VENDOR_PROPRIETARY_VALUE, true + case 1: + return BACnetLightingOperation_FADE_TO, true + case 10: + return BACnetLightingOperation_STOP, true + case 2: + return BACnetLightingOperation_RAMP_TO, true + case 3: + return BACnetLightingOperation_STEP_UP, true + case 4: + return BACnetLightingOperation_STEP_DOWN, true + case 5: + return BACnetLightingOperation_STEP_ON, true + case 6: + return BACnetLightingOperation_STEP_OFF, true + case 7: + return BACnetLightingOperation_WARN, true + case 8: + return BACnetLightingOperation_WARN_OFF, true + case 9: + return BACnetLightingOperation_WARN_RELINQUISH, true } return 0, false } @@ -129,13 +129,13 @@ func BACnetLightingOperationByName(value string) (enum BACnetLightingOperation, return 0, false } -func BACnetLightingOperationKnows(value uint16) bool { +func BACnetLightingOperationKnows(value uint16) bool { for _, typeValue := range BACnetLightingOperationValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastBACnetLightingOperation(structType interface{}) BACnetLightingOperation { @@ -219,3 +219,4 @@ func (e BACnetLightingOperation) PLC4XEnumName() string { func (e BACnetLightingOperation) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLightingOperationTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLightingOperationTagged.go index c303a37b957..de4179c8645 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLightingOperationTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLightingOperationTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLightingOperationTagged is the corresponding interface of BACnetLightingOperationTagged type BACnetLightingOperationTagged interface { @@ -50,15 +52,16 @@ type BACnetLightingOperationTaggedExactly interface { // _BACnetLightingOperationTagged is the data-structure of this message type _BACnetLightingOperationTagged struct { - Header BACnetTagHeader - Value BACnetLightingOperation - ProprietaryValue uint32 + Header BACnetTagHeader + Value BACnetLightingOperation + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_BACnetLightingOperationTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLightingOperationTagged factory function for _BACnetLightingOperationTagged -func NewBACnetLightingOperationTagged(header BACnetTagHeader, value BACnetLightingOperation, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_BACnetLightingOperationTagged { - return &_BACnetLightingOperationTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetLightingOperationTagged( header BACnetTagHeader , value BACnetLightingOperation , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_BACnetLightingOperationTagged { +return &_BACnetLightingOperationTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetLightingOperationTagged(structType interface{}) BACnetLightingOperationTagged { - if casted, ok := structType.(BACnetLightingOperationTagged); ok { + if casted, ok := structType.(BACnetLightingOperationTagged); ok { return casted } if casted, ok := structType.(*BACnetLightingOperationTagged); ok { @@ -123,16 +127,17 @@ func (m *_BACnetLightingOperationTagged) GetLengthInBits(ctx context.Context) ui lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetLightingOperationTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetLightingOperationTaggedParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetLightingOperationTagged") } @@ -164,12 +169,12 @@ func BACnetLightingOperationTaggedParseWithBuffer(ctx context.Context, readBuffe } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func BACnetLightingOperationTaggedParseWithBuffer(ctx context.Context, readBuffe } var value BACnetLightingOperation if _value != nil { - value = _value.(BACnetLightingOperation) + value = _value.(BACnetLightingOperation) } // Virtual field @@ -195,7 +200,7 @@ func BACnetLightingOperationTaggedParseWithBuffer(ctx context.Context, readBuffe } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetLightingOperationTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func BACnetLightingOperationTaggedParseWithBuffer(ctx context.Context, readBuffe // Create the instance return &_BACnetLightingOperationTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetLightingOperationTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_BACnetLightingOperationTagged) Serialize() ([]byte, error) { func (m *_BACnetLightingOperationTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetLightingOperationTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetLightingOperationTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetLightingOperationTagged") } @@ -261,6 +266,7 @@ func (m *_BACnetLightingOperationTagged) SerializeWithWriteBuffer(ctx context.Co return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_BACnetLightingOperationTagged) GetTagNumber() uint8 { func (m *_BACnetLightingOperationTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_BACnetLightingOperationTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLightingTransition.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLightingTransition.go index f326245eea0..7239115bdf7 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLightingTransition.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLightingTransition.go @@ -34,18 +34,18 @@ type IBACnetLightingTransition interface { utils.Serializable } -const ( - BACnetLightingTransition_NONE BACnetLightingTransition = 0 - BACnetLightingTransition_FADE BACnetLightingTransition = 1 - BACnetLightingTransition_RAMP BACnetLightingTransition = 2 - BACnetLightingTransition_VENDOR_PROPRIETARY_VALUE BACnetLightingTransition = 0xFF +const( + BACnetLightingTransition_NONE BACnetLightingTransition = 0 + BACnetLightingTransition_FADE BACnetLightingTransition = 1 + BACnetLightingTransition_RAMP BACnetLightingTransition = 2 + BACnetLightingTransition_VENDOR_PROPRIETARY_VALUE BACnetLightingTransition = 0XFF ) var BACnetLightingTransitionValues []BACnetLightingTransition func init() { _ = errors.New - BACnetLightingTransitionValues = []BACnetLightingTransition{ + BACnetLightingTransitionValues = []BACnetLightingTransition { BACnetLightingTransition_NONE, BACnetLightingTransition_FADE, BACnetLightingTransition_RAMP, @@ -55,14 +55,14 @@ func init() { func BACnetLightingTransitionByValue(value uint8) (enum BACnetLightingTransition, ok bool) { switch value { - case 0: - return BACnetLightingTransition_NONE, true - case 0xFF: - return BACnetLightingTransition_VENDOR_PROPRIETARY_VALUE, true - case 1: - return BACnetLightingTransition_FADE, true - case 2: - return BACnetLightingTransition_RAMP, true + case 0: + return BACnetLightingTransition_NONE, true + case 0XFF: + return BACnetLightingTransition_VENDOR_PROPRIETARY_VALUE, true + case 1: + return BACnetLightingTransition_FADE, true + case 2: + return BACnetLightingTransition_RAMP, true } return 0, false } @@ -81,13 +81,13 @@ func BACnetLightingTransitionByName(value string) (enum BACnetLightingTransition return 0, false } -func BACnetLightingTransitionKnows(value uint8) bool { +func BACnetLightingTransitionKnows(value uint8) bool { for _, typeValue := range BACnetLightingTransitionValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetLightingTransition(structType interface{}) BACnetLightingTransition { @@ -155,3 +155,4 @@ func (e BACnetLightingTransition) PLC4XEnumName() string { func (e BACnetLightingTransition) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLightingTransitionTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLightingTransitionTagged.go index 10cb5bc9578..f5d913ab1e2 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLightingTransitionTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLightingTransitionTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLightingTransitionTagged is the corresponding interface of BACnetLightingTransitionTagged type BACnetLightingTransitionTagged interface { @@ -50,15 +52,16 @@ type BACnetLightingTransitionTaggedExactly interface { // _BACnetLightingTransitionTagged is the data-structure of this message type _BACnetLightingTransitionTagged struct { - Header BACnetTagHeader - Value BACnetLightingTransition - ProprietaryValue uint32 + Header BACnetTagHeader + Value BACnetLightingTransition + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_BACnetLightingTransitionTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLightingTransitionTagged factory function for _BACnetLightingTransitionTagged -func NewBACnetLightingTransitionTagged(header BACnetTagHeader, value BACnetLightingTransition, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_BACnetLightingTransitionTagged { - return &_BACnetLightingTransitionTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetLightingTransitionTagged( header BACnetTagHeader , value BACnetLightingTransition , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_BACnetLightingTransitionTagged { +return &_BACnetLightingTransitionTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetLightingTransitionTagged(structType interface{}) BACnetLightingTransitionTagged { - if casted, ok := structType.(BACnetLightingTransitionTagged); ok { + if casted, ok := structType.(BACnetLightingTransitionTagged); ok { return casted } if casted, ok := structType.(*BACnetLightingTransitionTagged); ok { @@ -123,16 +127,17 @@ func (m *_BACnetLightingTransitionTagged) GetLengthInBits(ctx context.Context) u lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetLightingTransitionTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetLightingTransitionTaggedParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetLightingTransitionTagged") } @@ -164,12 +169,12 @@ func BACnetLightingTransitionTaggedParseWithBuffer(ctx context.Context, readBuff } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func BACnetLightingTransitionTaggedParseWithBuffer(ctx context.Context, readBuff } var value BACnetLightingTransition if _value != nil { - value = _value.(BACnetLightingTransition) + value = _value.(BACnetLightingTransition) } // Virtual field @@ -195,7 +200,7 @@ func BACnetLightingTransitionTaggedParseWithBuffer(ctx context.Context, readBuff } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetLightingTransitionTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func BACnetLightingTransitionTaggedParseWithBuffer(ctx context.Context, readBuff // Create the instance return &_BACnetLightingTransitionTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetLightingTransitionTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_BACnetLightingTransitionTagged) Serialize() ([]byte, error) { func (m *_BACnetLightingTransitionTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetLightingTransitionTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetLightingTransitionTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetLightingTransitionTagged") } @@ -261,6 +266,7 @@ func (m *_BACnetLightingTransitionTagged) SerializeWithWriteBuffer(ctx context.C return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_BACnetLightingTransitionTagged) GetTagNumber() uint8 { func (m *_BACnetLightingTransitionTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_BACnetLightingTransitionTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLimitEnable.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLimitEnable.go index 3e184fdcb54..424deba84dc 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLimitEnable.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLimitEnable.go @@ -34,8 +34,8 @@ type IBACnetLimitEnable interface { utils.Serializable } -const ( - BACnetLimitEnable_LOW_LIMIT_ENABLE BACnetLimitEnable = 0 +const( + BACnetLimitEnable_LOW_LIMIT_ENABLE BACnetLimitEnable = 0 BACnetLimitEnable_HIGH_LIMIT_ENABLE BACnetLimitEnable = 1 ) @@ -43,7 +43,7 @@ var BACnetLimitEnableValues []BACnetLimitEnable func init() { _ = errors.New - BACnetLimitEnableValues = []BACnetLimitEnable{ + BACnetLimitEnableValues = []BACnetLimitEnable { BACnetLimitEnable_LOW_LIMIT_ENABLE, BACnetLimitEnable_HIGH_LIMIT_ENABLE, } @@ -51,10 +51,10 @@ func init() { func BACnetLimitEnableByValue(value uint8) (enum BACnetLimitEnable, ok bool) { switch value { - case 0: - return BACnetLimitEnable_LOW_LIMIT_ENABLE, true - case 1: - return BACnetLimitEnable_HIGH_LIMIT_ENABLE, true + case 0: + return BACnetLimitEnable_LOW_LIMIT_ENABLE, true + case 1: + return BACnetLimitEnable_HIGH_LIMIT_ENABLE, true } return 0, false } @@ -69,13 +69,13 @@ func BACnetLimitEnableByName(value string) (enum BACnetLimitEnable, ok bool) { return 0, false } -func BACnetLimitEnableKnows(value uint8) bool { +func BACnetLimitEnableKnows(value uint8) bool { for _, typeValue := range BACnetLimitEnableValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetLimitEnable(structType interface{}) BACnetLimitEnable { @@ -139,3 +139,4 @@ func (e BACnetLimitEnable) PLC4XEnumName() string { func (e BACnetLimitEnable) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLimitEnableTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLimitEnableTagged.go index fcdc62d9934..294d29a27a9 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLimitEnableTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLimitEnableTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLimitEnableTagged is the corresponding interface of BACnetLimitEnableTagged type BACnetLimitEnableTagged interface { @@ -50,14 +52,15 @@ type BACnetLimitEnableTaggedExactly interface { // _BACnetLimitEnableTagged is the data-structure of this message type _BACnetLimitEnableTagged struct { - Header BACnetTagHeader - Payload BACnetTagPayloadBitString + Header BACnetTagHeader + Payload BACnetTagPayloadBitString // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,13 +86,13 @@ func (m *_BACnetLimitEnableTagged) GetPayload() BACnetTagPayloadBitString { func (m *_BACnetLimitEnableTagged) GetLowLimitEnable() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (0))), func() interface{} { return bool(m.GetPayload().GetData()[0]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((0)))), func() interface{} {return bool(m.GetPayload().GetData()[0])}, func() interface{} {return bool(bool(false))}).(bool)) } func (m *_BACnetLimitEnableTagged) GetHighLimitEnable() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (1))), func() interface{} { return bool(m.GetPayload().GetData()[1]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((1)))), func() interface{} {return bool(m.GetPayload().GetData()[1])}, func() interface{} {return bool(bool(false))}).(bool)) } /////////////////////// @@ -97,14 +100,15 @@ func (m *_BACnetLimitEnableTagged) GetHighLimitEnable() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLimitEnableTagged factory function for _BACnetLimitEnableTagged -func NewBACnetLimitEnableTagged(header BACnetTagHeader, payload BACnetTagPayloadBitString, tagNumber uint8, tagClass TagClass) *_BACnetLimitEnableTagged { - return &_BACnetLimitEnableTagged{Header: header, Payload: payload, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetLimitEnableTagged( header BACnetTagHeader , payload BACnetTagPayloadBitString , tagNumber uint8 , tagClass TagClass ) *_BACnetLimitEnableTagged { +return &_BACnetLimitEnableTagged{ Header: header , Payload: payload , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetLimitEnableTagged(structType interface{}) BACnetLimitEnableTagged { - if casted, ok := structType.(BACnetLimitEnableTagged); ok { + if casted, ok := structType.(BACnetLimitEnableTagged); ok { return casted } if casted, ok := structType.(*BACnetLimitEnableTagged); ok { @@ -133,6 +137,7 @@ func (m *_BACnetLimitEnableTagged) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetLimitEnableTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetLimitEnableTaggedParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetLimitEnableTagged") } @@ -164,12 +169,12 @@ func BACnetLimitEnableTaggedParseWithBuffer(ctx context.Context, readBuffer util } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -177,7 +182,7 @@ func BACnetLimitEnableTaggedParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("payload"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for payload") } - _payload, _payloadErr := BACnetTagPayloadBitStringParseWithBuffer(ctx, readBuffer, uint32(header.GetActualLength())) +_payload, _payloadErr := BACnetTagPayloadBitStringParseWithBuffer(ctx, readBuffer , uint32( header.GetActualLength() ) ) if _payloadErr != nil { return nil, errors.Wrap(_payloadErr, "Error parsing 'payload' field of BACnetLimitEnableTagged") } @@ -187,12 +192,12 @@ func BACnetLimitEnableTaggedParseWithBuffer(ctx context.Context, readBuffer util } // Virtual field - _lowLimitEnable := utils.InlineIf((bool((len(payload.GetData())) > (0))), func() interface{} { return bool(payload.GetData()[0]) }, func() interface{} { return bool(bool(false)) }).(bool) + _lowLimitEnable := utils.InlineIf((bool(((len(payload.GetData()))) > ((0)))), func() interface{} {return bool(payload.GetData()[0])}, func() interface{} {return bool(bool(false))}).(bool) lowLimitEnable := bool(_lowLimitEnable) _ = lowLimitEnable // Virtual field - _highLimitEnable := utils.InlineIf((bool((len(payload.GetData())) > (1))), func() interface{} { return bool(payload.GetData()[1]) }, func() interface{} { return bool(bool(false)) }).(bool) + _highLimitEnable := utils.InlineIf((bool(((len(payload.GetData()))) > ((1)))), func() interface{} {return bool(payload.GetData()[1])}, func() interface{} {return bool(bool(false))}).(bool) highLimitEnable := bool(_highLimitEnable) _ = highLimitEnable @@ -202,11 +207,11 @@ func BACnetLimitEnableTaggedParseWithBuffer(ctx context.Context, readBuffer util // Create the instance return &_BACnetLimitEnableTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Payload: payload, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Payload: payload, + }, nil } func (m *_BACnetLimitEnableTagged) Serialize() ([]byte, error) { @@ -220,7 +225,7 @@ func (m *_BACnetLimitEnableTagged) Serialize() ([]byte, error) { func (m *_BACnetLimitEnableTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetLimitEnableTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetLimitEnableTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetLimitEnableTagged") } @@ -262,6 +267,7 @@ func (m *_BACnetLimitEnableTagged) SerializeWithWriteBuffer(ctx context.Context, return nil } + //// // Arguments Getter @@ -271,7 +277,6 @@ func (m *_BACnetLimitEnableTagged) GetTagNumber() uint8 { func (m *_BACnetLimitEnableTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -289,3 +294,6 @@ func (m *_BACnetLimitEnableTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLockStatus.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLockStatus.go index 12a55b6016a..a590142a7c8 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLockStatus.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLockStatus.go @@ -34,19 +34,19 @@ type IBACnetLockStatus interface { utils.Serializable } -const ( - BACnetLockStatus_LOCKED BACnetLockStatus = 0 - BACnetLockStatus_UNLOCKED BACnetLockStatus = 1 +const( + BACnetLockStatus_LOCKED BACnetLockStatus = 0 + BACnetLockStatus_UNLOCKED BACnetLockStatus = 1 BACnetLockStatus_LOCK_FAULT BACnetLockStatus = 2 - BACnetLockStatus_UNUSED BACnetLockStatus = 3 - BACnetLockStatus_UNKNOWN BACnetLockStatus = 4 + BACnetLockStatus_UNUSED BACnetLockStatus = 3 + BACnetLockStatus_UNKNOWN BACnetLockStatus = 4 ) var BACnetLockStatusValues []BACnetLockStatus func init() { _ = errors.New - BACnetLockStatusValues = []BACnetLockStatus{ + BACnetLockStatusValues = []BACnetLockStatus { BACnetLockStatus_LOCKED, BACnetLockStatus_UNLOCKED, BACnetLockStatus_LOCK_FAULT, @@ -57,16 +57,16 @@ func init() { func BACnetLockStatusByValue(value uint8) (enum BACnetLockStatus, ok bool) { switch value { - case 0: - return BACnetLockStatus_LOCKED, true - case 1: - return BACnetLockStatus_UNLOCKED, true - case 2: - return BACnetLockStatus_LOCK_FAULT, true - case 3: - return BACnetLockStatus_UNUSED, true - case 4: - return BACnetLockStatus_UNKNOWN, true + case 0: + return BACnetLockStatus_LOCKED, true + case 1: + return BACnetLockStatus_UNLOCKED, true + case 2: + return BACnetLockStatus_LOCK_FAULT, true + case 3: + return BACnetLockStatus_UNUSED, true + case 4: + return BACnetLockStatus_UNKNOWN, true } return 0, false } @@ -87,13 +87,13 @@ func BACnetLockStatusByName(value string) (enum BACnetLockStatus, ok bool) { return 0, false } -func BACnetLockStatusKnows(value uint8) bool { +func BACnetLockStatusKnows(value uint8) bool { for _, typeValue := range BACnetLockStatusValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetLockStatus(structType interface{}) BACnetLockStatus { @@ -163,3 +163,4 @@ func (e BACnetLockStatus) PLC4XEnumName() string { func (e BACnetLockStatus) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLockStatusTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLockStatusTagged.go index 0ce2873eec6..f899f20cd66 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLockStatusTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLockStatusTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLockStatusTagged is the corresponding interface of BACnetLockStatusTagged type BACnetLockStatusTagged interface { @@ -46,14 +48,15 @@ type BACnetLockStatusTaggedExactly interface { // _BACnetLockStatusTagged is the data-structure of this message type _BACnetLockStatusTagged struct { - Header BACnetTagHeader - Value BACnetLockStatus + Header BACnetTagHeader + Value BACnetLockStatus // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_BACnetLockStatusTagged) GetValue() BACnetLockStatus { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLockStatusTagged factory function for _BACnetLockStatusTagged -func NewBACnetLockStatusTagged(header BACnetTagHeader, value BACnetLockStatus, tagNumber uint8, tagClass TagClass) *_BACnetLockStatusTagged { - return &_BACnetLockStatusTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetLockStatusTagged( header BACnetTagHeader , value BACnetLockStatus , tagNumber uint8 , tagClass TagClass ) *_BACnetLockStatusTagged { +return &_BACnetLockStatusTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetLockStatusTagged(structType interface{}) BACnetLockStatusTagged { - if casted, ok := structType.(BACnetLockStatusTagged); ok { + if casted, ok := structType.(BACnetLockStatusTagged); ok { return casted } if casted, ok := structType.(*BACnetLockStatusTagged); ok { @@ -104,6 +108,7 @@ func (m *_BACnetLockStatusTagged) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetLockStatusTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func BACnetLockStatusTaggedParseWithBuffer(ctx context.Context, readBuffer utils if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetLockStatusTagged") } @@ -135,12 +140,12 @@ func BACnetLockStatusTaggedParseWithBuffer(ctx context.Context, readBuffer utils } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func BACnetLockStatusTaggedParseWithBuffer(ctx context.Context, readBuffer utils } var value BACnetLockStatus if _value != nil { - value = _value.(BACnetLockStatus) + value = _value.(BACnetLockStatus) } if closeErr := readBuffer.CloseContext("BACnetLockStatusTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func BACnetLockStatusTaggedParseWithBuffer(ctx context.Context, readBuffer utils // Create the instance return &_BACnetLockStatusTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_BACnetLockStatusTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_BACnetLockStatusTagged) Serialize() ([]byte, error) { func (m *_BACnetLockStatusTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetLockStatusTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetLockStatusTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetLockStatusTagged") } @@ -206,6 +211,7 @@ func (m *_BACnetLockStatusTagged) SerializeWithWriteBuffer(ctx context.Context, return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_BACnetLockStatusTagged) GetTagNumber() uint8 { func (m *_BACnetLockStatusTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_BACnetLockStatusTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogData.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogData.go index b1053625eba..99ecfb632c8 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogData.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogData.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLogData is the corresponding interface of BACnetLogData type BACnetLogData interface { @@ -51,9 +53,9 @@ type BACnetLogDataExactly interface { // _BACnetLogData is the data-structure of this message type _BACnetLogData struct { _BACnetLogDataChildRequirements - OpeningTag BACnetOpeningTag - PeekedTagHeader BACnetTagHeader - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + PeekedTagHeader BACnetTagHeader + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 @@ -64,6 +66,7 @@ type _BACnetLogDataChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type BACnetLogDataParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetLogData, serializeChildFunction func() error) error GetTypeName() string @@ -71,13 +74,12 @@ type BACnetLogDataParent interface { type BACnetLogDataChild interface { utils.Serializable - InitializeParent(parent BACnetLogData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) +InitializeParent(parent BACnetLogData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) GetParent() *BACnetLogData GetTypeName() string BACnetLogData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -115,14 +117,15 @@ func (m *_BACnetLogData) GetPeekedTagNumber() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLogData factory function for _BACnetLogData -func NewBACnetLogData(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetLogData { - return &_BACnetLogData{OpeningTag: openingTag, PeekedTagHeader: peekedTagHeader, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetLogData( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetLogData { +return &_BACnetLogData{ OpeningTag: openingTag , PeekedTagHeader: peekedTagHeader , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetLogData(structType interface{}) BACnetLogData { - if casted, ok := structType.(BACnetLogData); ok { + if casted, ok := structType.(BACnetLogData); ok { return casted } if casted, ok := structType.(*BACnetLogData); ok { @@ -135,6 +138,7 @@ func (m *_BACnetLogData) GetTypeName() string { return "BACnetLogData" } + func (m *_BACnetLogData) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -170,7 +174,7 @@ func BACnetLogDataParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetLogData") } @@ -179,13 +183,13 @@ func BACnetLogDataParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff return nil, errors.Wrap(closeErr, "Error closing for openingTag") } - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Virtual field _peekedTagNumber := peekedTagHeader.GetActualTagNumber() @@ -195,18 +199,18 @@ func BACnetLogDataParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetLogDataChildSerializeRequirement interface { BACnetLogData - InitializeParent(BACnetLogData, BACnetOpeningTag, BACnetTagHeader, BACnetClosingTag) + InitializeParent(BACnetLogData, BACnetOpeningTag, BACnetTagHeader, BACnetClosingTag) GetParent() BACnetLogData } var _childTemp interface{} var _child BACnetLogDataChildSerializeRequirement var typeSwitchError error switch { - case peekedTagNumber == uint8(0): // BACnetLogDataLogStatus +case peekedTagNumber == uint8(0) : // BACnetLogDataLogStatus _childTemp, typeSwitchError = BACnetLogDataLogStatusParseWithBuffer(ctx, readBuffer, tagNumber) - case peekedTagNumber == uint8(1): // BACnetLogDataLogData +case peekedTagNumber == uint8(1) : // BACnetLogDataLogData _childTemp, typeSwitchError = BACnetLogDataLogDataParseWithBuffer(ctx, readBuffer, tagNumber) - case peekedTagNumber == uint8(2): // BACnetLogDataLogDataTimeChange +case peekedTagNumber == uint8(2) : // BACnetLogDataLogDataTimeChange _childTemp, typeSwitchError = BACnetLogDataLogDataTimeChangeParseWithBuffer(ctx, readBuffer, tagNumber) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedTagNumber=%v]", peekedTagNumber) @@ -220,7 +224,7 @@ func BACnetLogDataParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetLogData") } @@ -234,7 +238,7 @@ func BACnetLogDataParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff } // Finish initializing - _child.InitializeParent(_child, openingTag, peekedTagHeader, closingTag) +_child.InitializeParent(_child , openingTag , peekedTagHeader , closingTag ) return _child, nil } @@ -244,7 +248,7 @@ func (pm *_BACnetLogData) SerializeParent(ctx context.Context, writeBuffer utils _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetLogData"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetLogData"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetLogData") } @@ -287,13 +291,13 @@ func (pm *_BACnetLogData) SerializeParent(ctx context.Context, writeBuffer utils return nil } + //// // Arguments Getter func (m *_BACnetLogData) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -311,3 +315,6 @@ func (m *_BACnetLogData) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogData.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogData.go index 98cb3a3e180..b263f26a386 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogData.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogData.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLogDataLogData is the corresponding interface of BACnetLogDataLogData type BACnetLogDataLogData interface { @@ -51,11 +53,13 @@ type BACnetLogDataLogDataExactly interface { // _BACnetLogDataLogData is the data-structure of this message type _BACnetLogDataLogData struct { *_BACnetLogData - InnerOpeningTag BACnetOpeningTag - LogData []BACnetLogDataLogDataEntry - InnerClosingTag BACnetClosingTag + InnerOpeningTag BACnetOpeningTag + LogData []BACnetLogDataLogDataEntry + InnerClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -66,16 +70,14 @@ type _BACnetLogDataLogData struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetLogDataLogData) InitializeParent(parent BACnetLogData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetLogDataLogData) InitializeParent(parent BACnetLogData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetLogDataLogData) GetParent() BACnetLogData { +func (m *_BACnetLogDataLogData) GetParent() BACnetLogData { return m._BACnetLogData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,13 +100,14 @@ func (m *_BACnetLogDataLogData) GetInnerClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLogDataLogData factory function for _BACnetLogDataLogData -func NewBACnetLogDataLogData(innerOpeningTag BACnetOpeningTag, logData []BACnetLogDataLogDataEntry, innerClosingTag BACnetClosingTag, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetLogDataLogData { +func NewBACnetLogDataLogData( innerOpeningTag BACnetOpeningTag , logData []BACnetLogDataLogDataEntry , innerClosingTag BACnetClosingTag , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetLogDataLogData { _result := &_BACnetLogDataLogData{ InnerOpeningTag: innerOpeningTag, - LogData: logData, + LogData: logData, InnerClosingTag: innerClosingTag, - _BACnetLogData: NewBACnetLogData(openingTag, peekedTagHeader, closingTag, tagNumber), + _BACnetLogData: NewBACnetLogData(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetLogData._BACnetLogDataChildRequirements = _result return _result @@ -112,7 +115,7 @@ func NewBACnetLogDataLogData(innerOpeningTag BACnetOpeningTag, logData []BACnetL // Deprecated: use the interface for direct cast func CastBACnetLogDataLogData(structType interface{}) BACnetLogDataLogData { - if casted, ok := structType.(BACnetLogDataLogData); ok { + if casted, ok := structType.(BACnetLogDataLogData); ok { return casted } if casted, ok := structType.(*BACnetLogDataLogData); ok { @@ -144,6 +147,7 @@ func (m *_BACnetLogDataLogData) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetLogDataLogData) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +169,7 @@ func BACnetLogDataLogDataParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("innerOpeningTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerOpeningTag") } - _innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1))) +_innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) ) if _innerOpeningTagErr != nil { return nil, errors.Wrap(_innerOpeningTagErr, "Error parsing 'innerOpeningTag' field of BACnetLogDataLogData") } @@ -181,8 +185,8 @@ func BACnetLogDataLogDataParseWithBuffer(ctx context.Context, readBuffer utils.R // Terminated array var logData []BACnetLogDataLogDataEntry { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, 1)) { - _item, _err := BACnetLogDataLogDataEntryParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, 1)); { +_item, _err := BACnetLogDataLogDataEntryParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'logData' field of BACnetLogDataLogData") } @@ -197,7 +201,7 @@ func BACnetLogDataLogDataParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("innerClosingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerClosingTag") } - _innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1))) +_innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) ) if _innerClosingTagErr != nil { return nil, errors.Wrap(_innerClosingTagErr, "Error parsing 'innerClosingTag' field of BACnetLogDataLogData") } @@ -216,7 +220,7 @@ func BACnetLogDataLogDataParseWithBuffer(ctx context.Context, readBuffer utils.R TagNumber: tagNumber, }, InnerOpeningTag: innerOpeningTag, - LogData: logData, + LogData: logData, InnerClosingTag: innerClosingTag, } _child._BACnetLogData._BACnetLogDataChildRequirements = _child @@ -239,46 +243,46 @@ func (m *_BACnetLogDataLogData) SerializeWithWriteBuffer(ctx context.Context, wr return errors.Wrap(pushErr, "Error pushing for BACnetLogDataLogData") } - // Simple Field (innerOpeningTag) - if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") - } - _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) - if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerOpeningTag") - } - if _innerOpeningTagErr != nil { - return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") - } + // Simple Field (innerOpeningTag) + if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") + } + _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) + if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerOpeningTag") + } + if _innerOpeningTagErr != nil { + return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") + } - // Array Field (logData) - if pushErr := writeBuffer.PushContext("logData", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for logData") - } - for _curItem, _element := range m.GetLogData() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetLogData()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'logData' field") - } - } - if popErr := writeBuffer.PopContext("logData", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for logData") + // Array Field (logData) + if pushErr := writeBuffer.PushContext("logData", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for logData") + } + for _curItem, _element := range m.GetLogData() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetLogData()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'logData' field") } + } + if popErr := writeBuffer.PopContext("logData", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for logData") + } - // Simple Field (innerClosingTag) - if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerClosingTag") - } - _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) - if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerClosingTag") - } - if _innerClosingTagErr != nil { - return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") - } + // Simple Field (innerClosingTag) + if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerClosingTag") + } + _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) + if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerClosingTag") + } + if _innerClosingTagErr != nil { + return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") + } if popErr := writeBuffer.PopContext("BACnetLogDataLogData"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetLogDataLogData") @@ -288,6 +292,7 @@ func (m *_BACnetLogDataLogData) SerializeWithWriteBuffer(ctx context.Context, wr return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetLogDataLogData) isBACnetLogDataLogData() bool { return true } @@ -302,3 +307,6 @@ func (m *_BACnetLogDataLogData) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataEntry.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataEntry.go index 047932e47b1..5d1b2bbf10e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataEntry.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataEntry.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLogDataLogDataEntry is the corresponding interface of BACnetLogDataLogDataEntry type BACnetLogDataLogDataEntry interface { @@ -47,7 +49,7 @@ type BACnetLogDataLogDataEntryExactly interface { // _BACnetLogDataLogDataEntry is the data-structure of this message type _BACnetLogDataLogDataEntry struct { _BACnetLogDataLogDataEntryChildRequirements - PeekedTagHeader BACnetTagHeader + PeekedTagHeader BACnetTagHeader } type _BACnetLogDataLogDataEntryChildRequirements interface { @@ -55,6 +57,7 @@ type _BACnetLogDataLogDataEntryChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type BACnetLogDataLogDataEntryParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetLogDataLogDataEntry, serializeChildFunction func() error) error GetTypeName() string @@ -62,13 +65,12 @@ type BACnetLogDataLogDataEntryParent interface { type BACnetLogDataLogDataEntryChild interface { utils.Serializable - InitializeParent(parent BACnetLogDataLogDataEntry, peekedTagHeader BACnetTagHeader) +InitializeParent(parent BACnetLogDataLogDataEntry , peekedTagHeader BACnetTagHeader ) GetParent() *BACnetLogDataLogDataEntry GetTypeName() string BACnetLogDataLogDataEntry } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,14 +100,15 @@ func (m *_BACnetLogDataLogDataEntry) GetPeekedTagNumber() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLogDataLogDataEntry factory function for _BACnetLogDataLogDataEntry -func NewBACnetLogDataLogDataEntry(peekedTagHeader BACnetTagHeader) *_BACnetLogDataLogDataEntry { - return &_BACnetLogDataLogDataEntry{PeekedTagHeader: peekedTagHeader} +func NewBACnetLogDataLogDataEntry( peekedTagHeader BACnetTagHeader ) *_BACnetLogDataLogDataEntry { +return &_BACnetLogDataLogDataEntry{ PeekedTagHeader: peekedTagHeader } } // Deprecated: use the interface for direct cast func CastBACnetLogDataLogDataEntry(structType interface{}) BACnetLogDataLogDataEntry { - if casted, ok := structType.(BACnetLogDataLogDataEntry); ok { + if casted, ok := structType.(BACnetLogDataLogDataEntry); ok { return casted } if casted, ok := structType.(*BACnetLogDataLogDataEntry); ok { @@ -118,6 +121,7 @@ func (m *_BACnetLogDataLogDataEntry) GetTypeName() string { return "BACnetLogDataLogDataEntry" } + func (m *_BACnetLogDataLogDataEntry) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -143,13 +147,13 @@ func BACnetLogDataLogDataEntryParseWithBuffer(ctx context.Context, readBuffer ut currentPos := positionAware.GetPos() _ = currentPos - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Virtual field _peekedTagNumber := peekedTagHeader.GetActualTagNumber() @@ -159,31 +163,31 @@ func BACnetLogDataLogDataEntryParseWithBuffer(ctx context.Context, readBuffer ut // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetLogDataLogDataEntryChildSerializeRequirement interface { BACnetLogDataLogDataEntry - InitializeParent(BACnetLogDataLogDataEntry, BACnetTagHeader) + InitializeParent(BACnetLogDataLogDataEntry, BACnetTagHeader) GetParent() BACnetLogDataLogDataEntry } var _childTemp interface{} var _child BACnetLogDataLogDataEntryChildSerializeRequirement var typeSwitchError error switch { - case peekedTagNumber == uint8(0): // BACnetLogDataLogDataEntryBooleanValue - _childTemp, typeSwitchError = BACnetLogDataLogDataEntryBooleanValueParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(1): // BACnetLogDataLogDataEntryRealValue - _childTemp, typeSwitchError = BACnetLogDataLogDataEntryRealValueParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(2): // BACnetLogDataLogDataEntryEnumeratedValue - _childTemp, typeSwitchError = BACnetLogDataLogDataEntryEnumeratedValueParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(3): // BACnetLogDataLogDataEntryUnsignedValue - _childTemp, typeSwitchError = BACnetLogDataLogDataEntryUnsignedValueParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(4): // BACnetLogDataLogDataEntryIntegerValue - _childTemp, typeSwitchError = BACnetLogDataLogDataEntryIntegerValueParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(5): // BACnetLogDataLogDataEntryBitStringValue - _childTemp, typeSwitchError = BACnetLogDataLogDataEntryBitStringValueParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(6): // BACnetLogDataLogDataEntryNullValue - _childTemp, typeSwitchError = BACnetLogDataLogDataEntryNullValueParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(7): // BACnetLogDataLogDataEntryFailure - _childTemp, typeSwitchError = BACnetLogDataLogDataEntryFailureParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(8): // BACnetLogDataLogDataEntryAnyValue - _childTemp, typeSwitchError = BACnetLogDataLogDataEntryAnyValueParseWithBuffer(ctx, readBuffer) +case peekedTagNumber == uint8(0) : // BACnetLogDataLogDataEntryBooleanValue + _childTemp, typeSwitchError = BACnetLogDataLogDataEntryBooleanValueParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(1) : // BACnetLogDataLogDataEntryRealValue + _childTemp, typeSwitchError = BACnetLogDataLogDataEntryRealValueParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(2) : // BACnetLogDataLogDataEntryEnumeratedValue + _childTemp, typeSwitchError = BACnetLogDataLogDataEntryEnumeratedValueParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(3) : // BACnetLogDataLogDataEntryUnsignedValue + _childTemp, typeSwitchError = BACnetLogDataLogDataEntryUnsignedValueParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(4) : // BACnetLogDataLogDataEntryIntegerValue + _childTemp, typeSwitchError = BACnetLogDataLogDataEntryIntegerValueParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(5) : // BACnetLogDataLogDataEntryBitStringValue + _childTemp, typeSwitchError = BACnetLogDataLogDataEntryBitStringValueParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(6) : // BACnetLogDataLogDataEntryNullValue + _childTemp, typeSwitchError = BACnetLogDataLogDataEntryNullValueParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(7) : // BACnetLogDataLogDataEntryFailure + _childTemp, typeSwitchError = BACnetLogDataLogDataEntryFailureParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(8) : // BACnetLogDataLogDataEntryAnyValue + _childTemp, typeSwitchError = BACnetLogDataLogDataEntryAnyValueParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedTagNumber=%v]", peekedTagNumber) } @@ -197,7 +201,7 @@ func BACnetLogDataLogDataEntryParseWithBuffer(ctx context.Context, readBuffer ut } // Finish initializing - _child.InitializeParent(_child, peekedTagHeader) +_child.InitializeParent(_child , peekedTagHeader ) return _child, nil } @@ -207,7 +211,7 @@ func (pm *_BACnetLogDataLogDataEntry) SerializeParent(ctx context.Context, write _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetLogDataLogDataEntry"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetLogDataLogDataEntry"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetLogDataLogDataEntry") } // Virtual field @@ -226,6 +230,7 @@ func (pm *_BACnetLogDataLogDataEntry) SerializeParent(ctx context.Context, write return nil } + func (m *_BACnetLogDataLogDataEntry) isBACnetLogDataLogDataEntry() bool { return true } @@ -240,3 +245,6 @@ func (m *_BACnetLogDataLogDataEntry) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataEntryAnyValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataEntryAnyValue.go index c2177aa573b..ee7bf887234 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataEntryAnyValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataEntryAnyValue.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLogDataLogDataEntryAnyValue is the corresponding interface of BACnetLogDataLogDataEntryAnyValue type BACnetLogDataLogDataEntryAnyValue interface { @@ -47,9 +49,11 @@ type BACnetLogDataLogDataEntryAnyValueExactly interface { // _BACnetLogDataLogDataEntryAnyValue is the data-structure of this message type _BACnetLogDataLogDataEntryAnyValue struct { *_BACnetLogDataLogDataEntry - AnyValue BACnetConstructedData + AnyValue BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -60,14 +64,12 @@ type _BACnetLogDataLogDataEntryAnyValue struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetLogDataLogDataEntryAnyValue) InitializeParent(parent BACnetLogDataLogDataEntry, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetLogDataLogDataEntryAnyValue) InitializeParent(parent BACnetLogDataLogDataEntry , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetLogDataLogDataEntryAnyValue) GetParent() BACnetLogDataLogDataEntry { +func (m *_BACnetLogDataLogDataEntryAnyValue) GetParent() BACnetLogDataLogDataEntry { return m._BACnetLogDataLogDataEntry } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -82,11 +84,12 @@ func (m *_BACnetLogDataLogDataEntryAnyValue) GetAnyValue() BACnetConstructedData /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLogDataLogDataEntryAnyValue factory function for _BACnetLogDataLogDataEntryAnyValue -func NewBACnetLogDataLogDataEntryAnyValue(anyValue BACnetConstructedData, peekedTagHeader BACnetTagHeader) *_BACnetLogDataLogDataEntryAnyValue { +func NewBACnetLogDataLogDataEntryAnyValue( anyValue BACnetConstructedData , peekedTagHeader BACnetTagHeader ) *_BACnetLogDataLogDataEntryAnyValue { _result := &_BACnetLogDataLogDataEntryAnyValue{ - AnyValue: anyValue, - _BACnetLogDataLogDataEntry: NewBACnetLogDataLogDataEntry(peekedTagHeader), + AnyValue: anyValue, + _BACnetLogDataLogDataEntry: NewBACnetLogDataLogDataEntry(peekedTagHeader), } _result._BACnetLogDataLogDataEntry._BACnetLogDataLogDataEntryChildRequirements = _result return _result @@ -94,7 +97,7 @@ func NewBACnetLogDataLogDataEntryAnyValue(anyValue BACnetConstructedData, peeked // Deprecated: use the interface for direct cast func CastBACnetLogDataLogDataEntryAnyValue(structType interface{}) BACnetLogDataLogDataEntryAnyValue { - if casted, ok := structType.(BACnetLogDataLogDataEntryAnyValue); ok { + if casted, ok := structType.(BACnetLogDataLogDataEntryAnyValue); ok { return casted } if casted, ok := structType.(*BACnetLogDataLogDataEntryAnyValue); ok { @@ -118,6 +121,7 @@ func (m *_BACnetLogDataLogDataEntryAnyValue) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetLogDataLogDataEntryAnyValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -137,12 +141,12 @@ func BACnetLogDataLogDataEntryAnyValueParseWithBuffer(ctx context.Context, readB // Optional Field (anyValue) (Can be skipped, if a given expression evaluates to false) var anyValue BACnetConstructedData = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("anyValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for anyValue") } - _val, _err := BACnetConstructedDataParseWithBuffer(ctx, readBuffer, uint8(8), BACnetObjectType_VENDOR_PROPRIETARY_VALUE, BACnetPropertyIdentifier_VENDOR_PROPRIETARY_VALUE, nil) +_val, _err := BACnetConstructedDataParseWithBuffer(ctx, readBuffer , uint8(8) , BACnetObjectType_VENDOR_PROPRIETARY_VALUE , BACnetPropertyIdentifier_VENDOR_PROPRIETARY_VALUE , nil ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -163,8 +167,9 @@ func BACnetLogDataLogDataEntryAnyValueParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetLogDataLogDataEntryAnyValue{ - _BACnetLogDataLogDataEntry: &_BACnetLogDataLogDataEntry{}, - AnyValue: anyValue, + _BACnetLogDataLogDataEntry: &_BACnetLogDataLogDataEntry{ + }, + AnyValue: anyValue, } _child._BACnetLogDataLogDataEntry._BACnetLogDataLogDataEntryChildRequirements = _child return _child, nil @@ -186,21 +191,21 @@ func (m *_BACnetLogDataLogDataEntryAnyValue) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetLogDataLogDataEntryAnyValue") } - // Optional Field (anyValue) (Can be skipped, if the value is null) - var anyValue BACnetConstructedData = nil - if m.GetAnyValue() != nil { - if pushErr := writeBuffer.PushContext("anyValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for anyValue") - } - anyValue = m.GetAnyValue() - _anyValueErr := writeBuffer.WriteSerializable(ctx, anyValue) - if popErr := writeBuffer.PopContext("anyValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for anyValue") - } - if _anyValueErr != nil { - return errors.Wrap(_anyValueErr, "Error serializing 'anyValue' field") - } + // Optional Field (anyValue) (Can be skipped, if the value is null) + var anyValue BACnetConstructedData = nil + if m.GetAnyValue() != nil { + if pushErr := writeBuffer.PushContext("anyValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for anyValue") + } + anyValue = m.GetAnyValue() + _anyValueErr := writeBuffer.WriteSerializable(ctx, anyValue) + if popErr := writeBuffer.PopContext("anyValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for anyValue") } + if _anyValueErr != nil { + return errors.Wrap(_anyValueErr, "Error serializing 'anyValue' field") + } + } if popErr := writeBuffer.PopContext("BACnetLogDataLogDataEntryAnyValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetLogDataLogDataEntryAnyValue") @@ -210,6 +215,7 @@ func (m *_BACnetLogDataLogDataEntryAnyValue) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetLogDataLogDataEntryAnyValue) isBACnetLogDataLogDataEntryAnyValue() bool { return true } @@ -224,3 +230,6 @@ func (m *_BACnetLogDataLogDataEntryAnyValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataEntryBitStringValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataEntryBitStringValue.go index 558adf50ab2..f6e4c2f14bf 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataEntryBitStringValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataEntryBitStringValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLogDataLogDataEntryBitStringValue is the corresponding interface of BACnetLogDataLogDataEntryBitStringValue type BACnetLogDataLogDataEntryBitStringValue interface { @@ -46,9 +48,11 @@ type BACnetLogDataLogDataEntryBitStringValueExactly interface { // _BACnetLogDataLogDataEntryBitStringValue is the data-structure of this message type _BACnetLogDataLogDataEntryBitStringValue struct { *_BACnetLogDataLogDataEntry - BitStringValue BACnetContextTagBitString + BitStringValue BACnetContextTagBitString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetLogDataLogDataEntryBitStringValue struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetLogDataLogDataEntryBitStringValue) InitializeParent(parent BACnetLogDataLogDataEntry, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetLogDataLogDataEntryBitStringValue) InitializeParent(parent BACnetLogDataLogDataEntry , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetLogDataLogDataEntryBitStringValue) GetParent() BACnetLogDataLogDataEntry { +func (m *_BACnetLogDataLogDataEntryBitStringValue) GetParent() BACnetLogDataLogDataEntry { return m._BACnetLogDataLogDataEntry } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetLogDataLogDataEntryBitStringValue) GetBitStringValue() BACnetCon /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLogDataLogDataEntryBitStringValue factory function for _BACnetLogDataLogDataEntryBitStringValue -func NewBACnetLogDataLogDataEntryBitStringValue(bitStringValue BACnetContextTagBitString, peekedTagHeader BACnetTagHeader) *_BACnetLogDataLogDataEntryBitStringValue { +func NewBACnetLogDataLogDataEntryBitStringValue( bitStringValue BACnetContextTagBitString , peekedTagHeader BACnetTagHeader ) *_BACnetLogDataLogDataEntryBitStringValue { _result := &_BACnetLogDataLogDataEntryBitStringValue{ - BitStringValue: bitStringValue, - _BACnetLogDataLogDataEntry: NewBACnetLogDataLogDataEntry(peekedTagHeader), + BitStringValue: bitStringValue, + _BACnetLogDataLogDataEntry: NewBACnetLogDataLogDataEntry(peekedTagHeader), } _result._BACnetLogDataLogDataEntry._BACnetLogDataLogDataEntryChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetLogDataLogDataEntryBitStringValue(bitStringValue BACnetContextTagB // Deprecated: use the interface for direct cast func CastBACnetLogDataLogDataEntryBitStringValue(structType interface{}) BACnetLogDataLogDataEntryBitStringValue { - if casted, ok := structType.(BACnetLogDataLogDataEntryBitStringValue); ok { + if casted, ok := structType.(BACnetLogDataLogDataEntryBitStringValue); ok { return casted } if casted, ok := structType.(*BACnetLogDataLogDataEntryBitStringValue); ok { @@ -115,6 +118,7 @@ func (m *_BACnetLogDataLogDataEntryBitStringValue) GetLengthInBits(ctx context.C return lengthInBits } + func (m *_BACnetLogDataLogDataEntryBitStringValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetLogDataLogDataEntryBitStringValueParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("bitStringValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for bitStringValue") } - _bitStringValue, _bitStringValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(5)), BACnetDataType(BACnetDataType_BIT_STRING)) +_bitStringValue, _bitStringValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(5) ) , BACnetDataType( BACnetDataType_BIT_STRING ) ) if _bitStringValueErr != nil { return nil, errors.Wrap(_bitStringValueErr, "Error parsing 'bitStringValue' field of BACnetLogDataLogDataEntryBitStringValue") } @@ -151,8 +155,9 @@ func BACnetLogDataLogDataEntryBitStringValueParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetLogDataLogDataEntryBitStringValue{ - _BACnetLogDataLogDataEntry: &_BACnetLogDataLogDataEntry{}, - BitStringValue: bitStringValue, + _BACnetLogDataLogDataEntry: &_BACnetLogDataLogDataEntry{ + }, + BitStringValue: bitStringValue, } _child._BACnetLogDataLogDataEntry._BACnetLogDataLogDataEntryChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetLogDataLogDataEntryBitStringValue) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetLogDataLogDataEntryBitStringValue") } - // Simple Field (bitStringValue) - if pushErr := writeBuffer.PushContext("bitStringValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for bitStringValue") - } - _bitStringValueErr := writeBuffer.WriteSerializable(ctx, m.GetBitStringValue()) - if popErr := writeBuffer.PopContext("bitStringValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for bitStringValue") - } - if _bitStringValueErr != nil { - return errors.Wrap(_bitStringValueErr, "Error serializing 'bitStringValue' field") - } + // Simple Field (bitStringValue) + if pushErr := writeBuffer.PushContext("bitStringValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for bitStringValue") + } + _bitStringValueErr := writeBuffer.WriteSerializable(ctx, m.GetBitStringValue()) + if popErr := writeBuffer.PopContext("bitStringValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for bitStringValue") + } + if _bitStringValueErr != nil { + return errors.Wrap(_bitStringValueErr, "Error serializing 'bitStringValue' field") + } if popErr := writeBuffer.PopContext("BACnetLogDataLogDataEntryBitStringValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetLogDataLogDataEntryBitStringValue") @@ -194,6 +199,7 @@ func (m *_BACnetLogDataLogDataEntryBitStringValue) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetLogDataLogDataEntryBitStringValue) isBACnetLogDataLogDataEntryBitStringValue() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetLogDataLogDataEntryBitStringValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataEntryBooleanValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataEntryBooleanValue.go index 4d9b7f192fa..d543b9987d9 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataEntryBooleanValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataEntryBooleanValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLogDataLogDataEntryBooleanValue is the corresponding interface of BACnetLogDataLogDataEntryBooleanValue type BACnetLogDataLogDataEntryBooleanValue interface { @@ -46,9 +48,11 @@ type BACnetLogDataLogDataEntryBooleanValueExactly interface { // _BACnetLogDataLogDataEntryBooleanValue is the data-structure of this message type _BACnetLogDataLogDataEntryBooleanValue struct { *_BACnetLogDataLogDataEntry - BooleanValue BACnetContextTagBoolean + BooleanValue BACnetContextTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetLogDataLogDataEntryBooleanValue struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetLogDataLogDataEntryBooleanValue) InitializeParent(parent BACnetLogDataLogDataEntry, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetLogDataLogDataEntryBooleanValue) InitializeParent(parent BACnetLogDataLogDataEntry , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetLogDataLogDataEntryBooleanValue) GetParent() BACnetLogDataLogDataEntry { +func (m *_BACnetLogDataLogDataEntryBooleanValue) GetParent() BACnetLogDataLogDataEntry { return m._BACnetLogDataLogDataEntry } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetLogDataLogDataEntryBooleanValue) GetBooleanValue() BACnetContext /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLogDataLogDataEntryBooleanValue factory function for _BACnetLogDataLogDataEntryBooleanValue -func NewBACnetLogDataLogDataEntryBooleanValue(booleanValue BACnetContextTagBoolean, peekedTagHeader BACnetTagHeader) *_BACnetLogDataLogDataEntryBooleanValue { +func NewBACnetLogDataLogDataEntryBooleanValue( booleanValue BACnetContextTagBoolean , peekedTagHeader BACnetTagHeader ) *_BACnetLogDataLogDataEntryBooleanValue { _result := &_BACnetLogDataLogDataEntryBooleanValue{ - BooleanValue: booleanValue, - _BACnetLogDataLogDataEntry: NewBACnetLogDataLogDataEntry(peekedTagHeader), + BooleanValue: booleanValue, + _BACnetLogDataLogDataEntry: NewBACnetLogDataLogDataEntry(peekedTagHeader), } _result._BACnetLogDataLogDataEntry._BACnetLogDataLogDataEntryChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetLogDataLogDataEntryBooleanValue(booleanValue BACnetContextTagBoole // Deprecated: use the interface for direct cast func CastBACnetLogDataLogDataEntryBooleanValue(structType interface{}) BACnetLogDataLogDataEntryBooleanValue { - if casted, ok := structType.(BACnetLogDataLogDataEntryBooleanValue); ok { + if casted, ok := structType.(BACnetLogDataLogDataEntryBooleanValue); ok { return casted } if casted, ok := structType.(*BACnetLogDataLogDataEntryBooleanValue); ok { @@ -115,6 +118,7 @@ func (m *_BACnetLogDataLogDataEntryBooleanValue) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetLogDataLogDataEntryBooleanValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetLogDataLogDataEntryBooleanValueParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("booleanValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for booleanValue") } - _booleanValue, _booleanValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_BOOLEAN)) +_booleanValue, _booleanValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_BOOLEAN ) ) if _booleanValueErr != nil { return nil, errors.Wrap(_booleanValueErr, "Error parsing 'booleanValue' field of BACnetLogDataLogDataEntryBooleanValue") } @@ -151,8 +155,9 @@ func BACnetLogDataLogDataEntryBooleanValueParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_BACnetLogDataLogDataEntryBooleanValue{ - _BACnetLogDataLogDataEntry: &_BACnetLogDataLogDataEntry{}, - BooleanValue: booleanValue, + _BACnetLogDataLogDataEntry: &_BACnetLogDataLogDataEntry{ + }, + BooleanValue: booleanValue, } _child._BACnetLogDataLogDataEntry._BACnetLogDataLogDataEntryChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetLogDataLogDataEntryBooleanValue) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for BACnetLogDataLogDataEntryBooleanValue") } - // Simple Field (booleanValue) - if pushErr := writeBuffer.PushContext("booleanValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for booleanValue") - } - _booleanValueErr := writeBuffer.WriteSerializable(ctx, m.GetBooleanValue()) - if popErr := writeBuffer.PopContext("booleanValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for booleanValue") - } - if _booleanValueErr != nil { - return errors.Wrap(_booleanValueErr, "Error serializing 'booleanValue' field") - } + // Simple Field (booleanValue) + if pushErr := writeBuffer.PushContext("booleanValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for booleanValue") + } + _booleanValueErr := writeBuffer.WriteSerializable(ctx, m.GetBooleanValue()) + if popErr := writeBuffer.PopContext("booleanValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for booleanValue") + } + if _booleanValueErr != nil { + return errors.Wrap(_booleanValueErr, "Error serializing 'booleanValue' field") + } if popErr := writeBuffer.PopContext("BACnetLogDataLogDataEntryBooleanValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetLogDataLogDataEntryBooleanValue") @@ -194,6 +199,7 @@ func (m *_BACnetLogDataLogDataEntryBooleanValue) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetLogDataLogDataEntryBooleanValue) isBACnetLogDataLogDataEntryBooleanValue() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetLogDataLogDataEntryBooleanValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataEntryEnumeratedValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataEntryEnumeratedValue.go index 1e29efc3d93..9f0d65321f5 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataEntryEnumeratedValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataEntryEnumeratedValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLogDataLogDataEntryEnumeratedValue is the corresponding interface of BACnetLogDataLogDataEntryEnumeratedValue type BACnetLogDataLogDataEntryEnumeratedValue interface { @@ -46,9 +48,11 @@ type BACnetLogDataLogDataEntryEnumeratedValueExactly interface { // _BACnetLogDataLogDataEntryEnumeratedValue is the data-structure of this message type _BACnetLogDataLogDataEntryEnumeratedValue struct { *_BACnetLogDataLogDataEntry - EnumeratedValue BACnetContextTagEnumerated + EnumeratedValue BACnetContextTagEnumerated } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetLogDataLogDataEntryEnumeratedValue struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetLogDataLogDataEntryEnumeratedValue) InitializeParent(parent BACnetLogDataLogDataEntry, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetLogDataLogDataEntryEnumeratedValue) InitializeParent(parent BACnetLogDataLogDataEntry , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetLogDataLogDataEntryEnumeratedValue) GetParent() BACnetLogDataLogDataEntry { +func (m *_BACnetLogDataLogDataEntryEnumeratedValue) GetParent() BACnetLogDataLogDataEntry { return m._BACnetLogDataLogDataEntry } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetLogDataLogDataEntryEnumeratedValue) GetEnumeratedValue() BACnetC /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLogDataLogDataEntryEnumeratedValue factory function for _BACnetLogDataLogDataEntryEnumeratedValue -func NewBACnetLogDataLogDataEntryEnumeratedValue(enumeratedValue BACnetContextTagEnumerated, peekedTagHeader BACnetTagHeader) *_BACnetLogDataLogDataEntryEnumeratedValue { +func NewBACnetLogDataLogDataEntryEnumeratedValue( enumeratedValue BACnetContextTagEnumerated , peekedTagHeader BACnetTagHeader ) *_BACnetLogDataLogDataEntryEnumeratedValue { _result := &_BACnetLogDataLogDataEntryEnumeratedValue{ - EnumeratedValue: enumeratedValue, - _BACnetLogDataLogDataEntry: NewBACnetLogDataLogDataEntry(peekedTagHeader), + EnumeratedValue: enumeratedValue, + _BACnetLogDataLogDataEntry: NewBACnetLogDataLogDataEntry(peekedTagHeader), } _result._BACnetLogDataLogDataEntry._BACnetLogDataLogDataEntryChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetLogDataLogDataEntryEnumeratedValue(enumeratedValue BACnetContextTa // Deprecated: use the interface for direct cast func CastBACnetLogDataLogDataEntryEnumeratedValue(structType interface{}) BACnetLogDataLogDataEntryEnumeratedValue { - if casted, ok := structType.(BACnetLogDataLogDataEntryEnumeratedValue); ok { + if casted, ok := structType.(BACnetLogDataLogDataEntryEnumeratedValue); ok { return casted } if casted, ok := structType.(*BACnetLogDataLogDataEntryEnumeratedValue); ok { @@ -115,6 +118,7 @@ func (m *_BACnetLogDataLogDataEntryEnumeratedValue) GetLengthInBits(ctx context. return lengthInBits } + func (m *_BACnetLogDataLogDataEntryEnumeratedValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetLogDataLogDataEntryEnumeratedValueParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("enumeratedValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for enumeratedValue") } - _enumeratedValue, _enumeratedValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), BACnetDataType(BACnetDataType_ENUMERATED)) +_enumeratedValue, _enumeratedValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , BACnetDataType( BACnetDataType_ENUMERATED ) ) if _enumeratedValueErr != nil { return nil, errors.Wrap(_enumeratedValueErr, "Error parsing 'enumeratedValue' field of BACnetLogDataLogDataEntryEnumeratedValue") } @@ -151,8 +155,9 @@ func BACnetLogDataLogDataEntryEnumeratedValueParseWithBuffer(ctx context.Context // Create a partially initialized instance _child := &_BACnetLogDataLogDataEntryEnumeratedValue{ - _BACnetLogDataLogDataEntry: &_BACnetLogDataLogDataEntry{}, - EnumeratedValue: enumeratedValue, + _BACnetLogDataLogDataEntry: &_BACnetLogDataLogDataEntry{ + }, + EnumeratedValue: enumeratedValue, } _child._BACnetLogDataLogDataEntry._BACnetLogDataLogDataEntryChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetLogDataLogDataEntryEnumeratedValue) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetLogDataLogDataEntryEnumeratedValue") } - // Simple Field (enumeratedValue) - if pushErr := writeBuffer.PushContext("enumeratedValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for enumeratedValue") - } - _enumeratedValueErr := writeBuffer.WriteSerializable(ctx, m.GetEnumeratedValue()) - if popErr := writeBuffer.PopContext("enumeratedValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for enumeratedValue") - } - if _enumeratedValueErr != nil { - return errors.Wrap(_enumeratedValueErr, "Error serializing 'enumeratedValue' field") - } + // Simple Field (enumeratedValue) + if pushErr := writeBuffer.PushContext("enumeratedValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for enumeratedValue") + } + _enumeratedValueErr := writeBuffer.WriteSerializable(ctx, m.GetEnumeratedValue()) + if popErr := writeBuffer.PopContext("enumeratedValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for enumeratedValue") + } + if _enumeratedValueErr != nil { + return errors.Wrap(_enumeratedValueErr, "Error serializing 'enumeratedValue' field") + } if popErr := writeBuffer.PopContext("BACnetLogDataLogDataEntryEnumeratedValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetLogDataLogDataEntryEnumeratedValue") @@ -194,6 +199,7 @@ func (m *_BACnetLogDataLogDataEntryEnumeratedValue) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetLogDataLogDataEntryEnumeratedValue) isBACnetLogDataLogDataEntryEnumeratedValue() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetLogDataLogDataEntryEnumeratedValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataEntryFailure.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataEntryFailure.go index 5af80f9a731..205ae7bb643 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataEntryFailure.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataEntryFailure.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLogDataLogDataEntryFailure is the corresponding interface of BACnetLogDataLogDataEntryFailure type BACnetLogDataLogDataEntryFailure interface { @@ -46,9 +48,11 @@ type BACnetLogDataLogDataEntryFailureExactly interface { // _BACnetLogDataLogDataEntryFailure is the data-structure of this message type _BACnetLogDataLogDataEntryFailure struct { *_BACnetLogDataLogDataEntry - Failure ErrorEnclosed + Failure ErrorEnclosed } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetLogDataLogDataEntryFailure struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetLogDataLogDataEntryFailure) InitializeParent(parent BACnetLogDataLogDataEntry, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetLogDataLogDataEntryFailure) InitializeParent(parent BACnetLogDataLogDataEntry , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetLogDataLogDataEntryFailure) GetParent() BACnetLogDataLogDataEntry { +func (m *_BACnetLogDataLogDataEntryFailure) GetParent() BACnetLogDataLogDataEntry { return m._BACnetLogDataLogDataEntry } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetLogDataLogDataEntryFailure) GetFailure() ErrorEnclosed { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLogDataLogDataEntryFailure factory function for _BACnetLogDataLogDataEntryFailure -func NewBACnetLogDataLogDataEntryFailure(failure ErrorEnclosed, peekedTagHeader BACnetTagHeader) *_BACnetLogDataLogDataEntryFailure { +func NewBACnetLogDataLogDataEntryFailure( failure ErrorEnclosed , peekedTagHeader BACnetTagHeader ) *_BACnetLogDataLogDataEntryFailure { _result := &_BACnetLogDataLogDataEntryFailure{ - Failure: failure, - _BACnetLogDataLogDataEntry: NewBACnetLogDataLogDataEntry(peekedTagHeader), + Failure: failure, + _BACnetLogDataLogDataEntry: NewBACnetLogDataLogDataEntry(peekedTagHeader), } _result._BACnetLogDataLogDataEntry._BACnetLogDataLogDataEntryChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetLogDataLogDataEntryFailure(failure ErrorEnclosed, peekedTagHeader // Deprecated: use the interface for direct cast func CastBACnetLogDataLogDataEntryFailure(structType interface{}) BACnetLogDataLogDataEntryFailure { - if casted, ok := structType.(BACnetLogDataLogDataEntryFailure); ok { + if casted, ok := structType.(BACnetLogDataLogDataEntryFailure); ok { return casted } if casted, ok := structType.(*BACnetLogDataLogDataEntryFailure); ok { @@ -115,6 +118,7 @@ func (m *_BACnetLogDataLogDataEntryFailure) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetLogDataLogDataEntryFailure) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetLogDataLogDataEntryFailureParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("failure"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for failure") } - _failure, _failureErr := ErrorEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(7))) +_failure, _failureErr := ErrorEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(7) ) ) if _failureErr != nil { return nil, errors.Wrap(_failureErr, "Error parsing 'failure' field of BACnetLogDataLogDataEntryFailure") } @@ -151,8 +155,9 @@ func BACnetLogDataLogDataEntryFailureParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetLogDataLogDataEntryFailure{ - _BACnetLogDataLogDataEntry: &_BACnetLogDataLogDataEntry{}, - Failure: failure, + _BACnetLogDataLogDataEntry: &_BACnetLogDataLogDataEntry{ + }, + Failure: failure, } _child._BACnetLogDataLogDataEntry._BACnetLogDataLogDataEntryChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetLogDataLogDataEntryFailure) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for BACnetLogDataLogDataEntryFailure") } - // Simple Field (failure) - if pushErr := writeBuffer.PushContext("failure"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for failure") - } - _failureErr := writeBuffer.WriteSerializable(ctx, m.GetFailure()) - if popErr := writeBuffer.PopContext("failure"); popErr != nil { - return errors.Wrap(popErr, "Error popping for failure") - } - if _failureErr != nil { - return errors.Wrap(_failureErr, "Error serializing 'failure' field") - } + // Simple Field (failure) + if pushErr := writeBuffer.PushContext("failure"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for failure") + } + _failureErr := writeBuffer.WriteSerializable(ctx, m.GetFailure()) + if popErr := writeBuffer.PopContext("failure"); popErr != nil { + return errors.Wrap(popErr, "Error popping for failure") + } + if _failureErr != nil { + return errors.Wrap(_failureErr, "Error serializing 'failure' field") + } if popErr := writeBuffer.PopContext("BACnetLogDataLogDataEntryFailure"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetLogDataLogDataEntryFailure") @@ -194,6 +199,7 @@ func (m *_BACnetLogDataLogDataEntryFailure) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetLogDataLogDataEntryFailure) isBACnetLogDataLogDataEntryFailure() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetLogDataLogDataEntryFailure) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataEntryIntegerValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataEntryIntegerValue.go index bc9c32bf727..5004f25deea 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataEntryIntegerValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataEntryIntegerValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLogDataLogDataEntryIntegerValue is the corresponding interface of BACnetLogDataLogDataEntryIntegerValue type BACnetLogDataLogDataEntryIntegerValue interface { @@ -46,9 +48,11 @@ type BACnetLogDataLogDataEntryIntegerValueExactly interface { // _BACnetLogDataLogDataEntryIntegerValue is the data-structure of this message type _BACnetLogDataLogDataEntryIntegerValue struct { *_BACnetLogDataLogDataEntry - IntegerValue BACnetContextTagSignedInteger + IntegerValue BACnetContextTagSignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetLogDataLogDataEntryIntegerValue struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetLogDataLogDataEntryIntegerValue) InitializeParent(parent BACnetLogDataLogDataEntry, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetLogDataLogDataEntryIntegerValue) InitializeParent(parent BACnetLogDataLogDataEntry , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetLogDataLogDataEntryIntegerValue) GetParent() BACnetLogDataLogDataEntry { +func (m *_BACnetLogDataLogDataEntryIntegerValue) GetParent() BACnetLogDataLogDataEntry { return m._BACnetLogDataLogDataEntry } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetLogDataLogDataEntryIntegerValue) GetIntegerValue() BACnetContext /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLogDataLogDataEntryIntegerValue factory function for _BACnetLogDataLogDataEntryIntegerValue -func NewBACnetLogDataLogDataEntryIntegerValue(integerValue BACnetContextTagSignedInteger, peekedTagHeader BACnetTagHeader) *_BACnetLogDataLogDataEntryIntegerValue { +func NewBACnetLogDataLogDataEntryIntegerValue( integerValue BACnetContextTagSignedInteger , peekedTagHeader BACnetTagHeader ) *_BACnetLogDataLogDataEntryIntegerValue { _result := &_BACnetLogDataLogDataEntryIntegerValue{ - IntegerValue: integerValue, - _BACnetLogDataLogDataEntry: NewBACnetLogDataLogDataEntry(peekedTagHeader), + IntegerValue: integerValue, + _BACnetLogDataLogDataEntry: NewBACnetLogDataLogDataEntry(peekedTagHeader), } _result._BACnetLogDataLogDataEntry._BACnetLogDataLogDataEntryChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetLogDataLogDataEntryIntegerValue(integerValue BACnetContextTagSigne // Deprecated: use the interface for direct cast func CastBACnetLogDataLogDataEntryIntegerValue(structType interface{}) BACnetLogDataLogDataEntryIntegerValue { - if casted, ok := structType.(BACnetLogDataLogDataEntryIntegerValue); ok { + if casted, ok := structType.(BACnetLogDataLogDataEntryIntegerValue); ok { return casted } if casted, ok := structType.(*BACnetLogDataLogDataEntryIntegerValue); ok { @@ -115,6 +118,7 @@ func (m *_BACnetLogDataLogDataEntryIntegerValue) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetLogDataLogDataEntryIntegerValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetLogDataLogDataEntryIntegerValueParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("integerValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for integerValue") } - _integerValue, _integerValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(4)), BACnetDataType(BACnetDataType_SIGNED_INTEGER)) +_integerValue, _integerValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(4) ) , BACnetDataType( BACnetDataType_SIGNED_INTEGER ) ) if _integerValueErr != nil { return nil, errors.Wrap(_integerValueErr, "Error parsing 'integerValue' field of BACnetLogDataLogDataEntryIntegerValue") } @@ -151,8 +155,9 @@ func BACnetLogDataLogDataEntryIntegerValueParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_BACnetLogDataLogDataEntryIntegerValue{ - _BACnetLogDataLogDataEntry: &_BACnetLogDataLogDataEntry{}, - IntegerValue: integerValue, + _BACnetLogDataLogDataEntry: &_BACnetLogDataLogDataEntry{ + }, + IntegerValue: integerValue, } _child._BACnetLogDataLogDataEntry._BACnetLogDataLogDataEntryChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetLogDataLogDataEntryIntegerValue) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for BACnetLogDataLogDataEntryIntegerValue") } - // Simple Field (integerValue) - if pushErr := writeBuffer.PushContext("integerValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for integerValue") - } - _integerValueErr := writeBuffer.WriteSerializable(ctx, m.GetIntegerValue()) - if popErr := writeBuffer.PopContext("integerValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for integerValue") - } - if _integerValueErr != nil { - return errors.Wrap(_integerValueErr, "Error serializing 'integerValue' field") - } + // Simple Field (integerValue) + if pushErr := writeBuffer.PushContext("integerValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for integerValue") + } + _integerValueErr := writeBuffer.WriteSerializable(ctx, m.GetIntegerValue()) + if popErr := writeBuffer.PopContext("integerValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for integerValue") + } + if _integerValueErr != nil { + return errors.Wrap(_integerValueErr, "Error serializing 'integerValue' field") + } if popErr := writeBuffer.PopContext("BACnetLogDataLogDataEntryIntegerValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetLogDataLogDataEntryIntegerValue") @@ -194,6 +199,7 @@ func (m *_BACnetLogDataLogDataEntryIntegerValue) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetLogDataLogDataEntryIntegerValue) isBACnetLogDataLogDataEntryIntegerValue() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetLogDataLogDataEntryIntegerValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataEntryNullValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataEntryNullValue.go index 3636ec16067..5601f28f928 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataEntryNullValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataEntryNullValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLogDataLogDataEntryNullValue is the corresponding interface of BACnetLogDataLogDataEntryNullValue type BACnetLogDataLogDataEntryNullValue interface { @@ -46,9 +48,11 @@ type BACnetLogDataLogDataEntryNullValueExactly interface { // _BACnetLogDataLogDataEntryNullValue is the data-structure of this message type _BACnetLogDataLogDataEntryNullValue struct { *_BACnetLogDataLogDataEntry - NullValue BACnetContextTagNull + NullValue BACnetContextTagNull } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetLogDataLogDataEntryNullValue struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetLogDataLogDataEntryNullValue) InitializeParent(parent BACnetLogDataLogDataEntry, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetLogDataLogDataEntryNullValue) InitializeParent(parent BACnetLogDataLogDataEntry , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetLogDataLogDataEntryNullValue) GetParent() BACnetLogDataLogDataEntry { +func (m *_BACnetLogDataLogDataEntryNullValue) GetParent() BACnetLogDataLogDataEntry { return m._BACnetLogDataLogDataEntry } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetLogDataLogDataEntryNullValue) GetNullValue() BACnetContextTagNul /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLogDataLogDataEntryNullValue factory function for _BACnetLogDataLogDataEntryNullValue -func NewBACnetLogDataLogDataEntryNullValue(nullValue BACnetContextTagNull, peekedTagHeader BACnetTagHeader) *_BACnetLogDataLogDataEntryNullValue { +func NewBACnetLogDataLogDataEntryNullValue( nullValue BACnetContextTagNull , peekedTagHeader BACnetTagHeader ) *_BACnetLogDataLogDataEntryNullValue { _result := &_BACnetLogDataLogDataEntryNullValue{ - NullValue: nullValue, - _BACnetLogDataLogDataEntry: NewBACnetLogDataLogDataEntry(peekedTagHeader), + NullValue: nullValue, + _BACnetLogDataLogDataEntry: NewBACnetLogDataLogDataEntry(peekedTagHeader), } _result._BACnetLogDataLogDataEntry._BACnetLogDataLogDataEntryChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetLogDataLogDataEntryNullValue(nullValue BACnetContextTagNull, peeke // Deprecated: use the interface for direct cast func CastBACnetLogDataLogDataEntryNullValue(structType interface{}) BACnetLogDataLogDataEntryNullValue { - if casted, ok := structType.(BACnetLogDataLogDataEntryNullValue); ok { + if casted, ok := structType.(BACnetLogDataLogDataEntryNullValue); ok { return casted } if casted, ok := structType.(*BACnetLogDataLogDataEntryNullValue); ok { @@ -115,6 +118,7 @@ func (m *_BACnetLogDataLogDataEntryNullValue) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetLogDataLogDataEntryNullValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetLogDataLogDataEntryNullValueParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("nullValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for nullValue") } - _nullValue, _nullValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(6)), BACnetDataType(BACnetDataType_NULL)) +_nullValue, _nullValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(6) ) , BACnetDataType( BACnetDataType_NULL ) ) if _nullValueErr != nil { return nil, errors.Wrap(_nullValueErr, "Error parsing 'nullValue' field of BACnetLogDataLogDataEntryNullValue") } @@ -151,8 +155,9 @@ func BACnetLogDataLogDataEntryNullValueParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetLogDataLogDataEntryNullValue{ - _BACnetLogDataLogDataEntry: &_BACnetLogDataLogDataEntry{}, - NullValue: nullValue, + _BACnetLogDataLogDataEntry: &_BACnetLogDataLogDataEntry{ + }, + NullValue: nullValue, } _child._BACnetLogDataLogDataEntry._BACnetLogDataLogDataEntryChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetLogDataLogDataEntryNullValue) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetLogDataLogDataEntryNullValue") } - // Simple Field (nullValue) - if pushErr := writeBuffer.PushContext("nullValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for nullValue") - } - _nullValueErr := writeBuffer.WriteSerializable(ctx, m.GetNullValue()) - if popErr := writeBuffer.PopContext("nullValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for nullValue") - } - if _nullValueErr != nil { - return errors.Wrap(_nullValueErr, "Error serializing 'nullValue' field") - } + // Simple Field (nullValue) + if pushErr := writeBuffer.PushContext("nullValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for nullValue") + } + _nullValueErr := writeBuffer.WriteSerializable(ctx, m.GetNullValue()) + if popErr := writeBuffer.PopContext("nullValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for nullValue") + } + if _nullValueErr != nil { + return errors.Wrap(_nullValueErr, "Error serializing 'nullValue' field") + } if popErr := writeBuffer.PopContext("BACnetLogDataLogDataEntryNullValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetLogDataLogDataEntryNullValue") @@ -194,6 +199,7 @@ func (m *_BACnetLogDataLogDataEntryNullValue) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetLogDataLogDataEntryNullValue) isBACnetLogDataLogDataEntryNullValue() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetLogDataLogDataEntryNullValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataEntryRealValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataEntryRealValue.go index af281a5dbe2..d8602935a1e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataEntryRealValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataEntryRealValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLogDataLogDataEntryRealValue is the corresponding interface of BACnetLogDataLogDataEntryRealValue type BACnetLogDataLogDataEntryRealValue interface { @@ -46,9 +48,11 @@ type BACnetLogDataLogDataEntryRealValueExactly interface { // _BACnetLogDataLogDataEntryRealValue is the data-structure of this message type _BACnetLogDataLogDataEntryRealValue struct { *_BACnetLogDataLogDataEntry - RealValue BACnetContextTagReal + RealValue BACnetContextTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetLogDataLogDataEntryRealValue struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetLogDataLogDataEntryRealValue) InitializeParent(parent BACnetLogDataLogDataEntry, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetLogDataLogDataEntryRealValue) InitializeParent(parent BACnetLogDataLogDataEntry , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetLogDataLogDataEntryRealValue) GetParent() BACnetLogDataLogDataEntry { +func (m *_BACnetLogDataLogDataEntryRealValue) GetParent() BACnetLogDataLogDataEntry { return m._BACnetLogDataLogDataEntry } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetLogDataLogDataEntryRealValue) GetRealValue() BACnetContextTagRea /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLogDataLogDataEntryRealValue factory function for _BACnetLogDataLogDataEntryRealValue -func NewBACnetLogDataLogDataEntryRealValue(realValue BACnetContextTagReal, peekedTagHeader BACnetTagHeader) *_BACnetLogDataLogDataEntryRealValue { +func NewBACnetLogDataLogDataEntryRealValue( realValue BACnetContextTagReal , peekedTagHeader BACnetTagHeader ) *_BACnetLogDataLogDataEntryRealValue { _result := &_BACnetLogDataLogDataEntryRealValue{ - RealValue: realValue, - _BACnetLogDataLogDataEntry: NewBACnetLogDataLogDataEntry(peekedTagHeader), + RealValue: realValue, + _BACnetLogDataLogDataEntry: NewBACnetLogDataLogDataEntry(peekedTagHeader), } _result._BACnetLogDataLogDataEntry._BACnetLogDataLogDataEntryChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetLogDataLogDataEntryRealValue(realValue BACnetContextTagReal, peeke // Deprecated: use the interface for direct cast func CastBACnetLogDataLogDataEntryRealValue(structType interface{}) BACnetLogDataLogDataEntryRealValue { - if casted, ok := structType.(BACnetLogDataLogDataEntryRealValue); ok { + if casted, ok := structType.(BACnetLogDataLogDataEntryRealValue); ok { return casted } if casted, ok := structType.(*BACnetLogDataLogDataEntryRealValue); ok { @@ -115,6 +118,7 @@ func (m *_BACnetLogDataLogDataEntryRealValue) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetLogDataLogDataEntryRealValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetLogDataLogDataEntryRealValueParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("realValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for realValue") } - _realValue, _realValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_REAL)) +_realValue, _realValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_REAL ) ) if _realValueErr != nil { return nil, errors.Wrap(_realValueErr, "Error parsing 'realValue' field of BACnetLogDataLogDataEntryRealValue") } @@ -151,8 +155,9 @@ func BACnetLogDataLogDataEntryRealValueParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetLogDataLogDataEntryRealValue{ - _BACnetLogDataLogDataEntry: &_BACnetLogDataLogDataEntry{}, - RealValue: realValue, + _BACnetLogDataLogDataEntry: &_BACnetLogDataLogDataEntry{ + }, + RealValue: realValue, } _child._BACnetLogDataLogDataEntry._BACnetLogDataLogDataEntryChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetLogDataLogDataEntryRealValue) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetLogDataLogDataEntryRealValue") } - // Simple Field (realValue) - if pushErr := writeBuffer.PushContext("realValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for realValue") - } - _realValueErr := writeBuffer.WriteSerializable(ctx, m.GetRealValue()) - if popErr := writeBuffer.PopContext("realValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for realValue") - } - if _realValueErr != nil { - return errors.Wrap(_realValueErr, "Error serializing 'realValue' field") - } + // Simple Field (realValue) + if pushErr := writeBuffer.PushContext("realValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for realValue") + } + _realValueErr := writeBuffer.WriteSerializable(ctx, m.GetRealValue()) + if popErr := writeBuffer.PopContext("realValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for realValue") + } + if _realValueErr != nil { + return errors.Wrap(_realValueErr, "Error serializing 'realValue' field") + } if popErr := writeBuffer.PopContext("BACnetLogDataLogDataEntryRealValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetLogDataLogDataEntryRealValue") @@ -194,6 +199,7 @@ func (m *_BACnetLogDataLogDataEntryRealValue) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetLogDataLogDataEntryRealValue) isBACnetLogDataLogDataEntryRealValue() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetLogDataLogDataEntryRealValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataEntryUnsignedValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataEntryUnsignedValue.go index 19450ddebda..844ea4aec8a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataEntryUnsignedValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataEntryUnsignedValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLogDataLogDataEntryUnsignedValue is the corresponding interface of BACnetLogDataLogDataEntryUnsignedValue type BACnetLogDataLogDataEntryUnsignedValue interface { @@ -46,9 +48,11 @@ type BACnetLogDataLogDataEntryUnsignedValueExactly interface { // _BACnetLogDataLogDataEntryUnsignedValue is the data-structure of this message type _BACnetLogDataLogDataEntryUnsignedValue struct { *_BACnetLogDataLogDataEntry - UnsignedValue BACnetContextTagUnsignedInteger + UnsignedValue BACnetContextTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetLogDataLogDataEntryUnsignedValue struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetLogDataLogDataEntryUnsignedValue) InitializeParent(parent BACnetLogDataLogDataEntry, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetLogDataLogDataEntryUnsignedValue) InitializeParent(parent BACnetLogDataLogDataEntry , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetLogDataLogDataEntryUnsignedValue) GetParent() BACnetLogDataLogDataEntry { +func (m *_BACnetLogDataLogDataEntryUnsignedValue) GetParent() BACnetLogDataLogDataEntry { return m._BACnetLogDataLogDataEntry } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetLogDataLogDataEntryUnsignedValue) GetUnsignedValue() BACnetConte /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLogDataLogDataEntryUnsignedValue factory function for _BACnetLogDataLogDataEntryUnsignedValue -func NewBACnetLogDataLogDataEntryUnsignedValue(unsignedValue BACnetContextTagUnsignedInteger, peekedTagHeader BACnetTagHeader) *_BACnetLogDataLogDataEntryUnsignedValue { +func NewBACnetLogDataLogDataEntryUnsignedValue( unsignedValue BACnetContextTagUnsignedInteger , peekedTagHeader BACnetTagHeader ) *_BACnetLogDataLogDataEntryUnsignedValue { _result := &_BACnetLogDataLogDataEntryUnsignedValue{ - UnsignedValue: unsignedValue, - _BACnetLogDataLogDataEntry: NewBACnetLogDataLogDataEntry(peekedTagHeader), + UnsignedValue: unsignedValue, + _BACnetLogDataLogDataEntry: NewBACnetLogDataLogDataEntry(peekedTagHeader), } _result._BACnetLogDataLogDataEntry._BACnetLogDataLogDataEntryChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetLogDataLogDataEntryUnsignedValue(unsignedValue BACnetContextTagUns // Deprecated: use the interface for direct cast func CastBACnetLogDataLogDataEntryUnsignedValue(structType interface{}) BACnetLogDataLogDataEntryUnsignedValue { - if casted, ok := structType.(BACnetLogDataLogDataEntryUnsignedValue); ok { + if casted, ok := structType.(BACnetLogDataLogDataEntryUnsignedValue); ok { return casted } if casted, ok := structType.(*BACnetLogDataLogDataEntryUnsignedValue); ok { @@ -115,6 +118,7 @@ func (m *_BACnetLogDataLogDataEntryUnsignedValue) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetLogDataLogDataEntryUnsignedValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetLogDataLogDataEntryUnsignedValueParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("unsignedValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for unsignedValue") } - _unsignedValue, _unsignedValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(3)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_unsignedValue, _unsignedValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(3) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _unsignedValueErr != nil { return nil, errors.Wrap(_unsignedValueErr, "Error parsing 'unsignedValue' field of BACnetLogDataLogDataEntryUnsignedValue") } @@ -151,8 +155,9 @@ func BACnetLogDataLogDataEntryUnsignedValueParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetLogDataLogDataEntryUnsignedValue{ - _BACnetLogDataLogDataEntry: &_BACnetLogDataLogDataEntry{}, - UnsignedValue: unsignedValue, + _BACnetLogDataLogDataEntry: &_BACnetLogDataLogDataEntry{ + }, + UnsignedValue: unsignedValue, } _child._BACnetLogDataLogDataEntry._BACnetLogDataLogDataEntryChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetLogDataLogDataEntryUnsignedValue) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetLogDataLogDataEntryUnsignedValue") } - // Simple Field (unsignedValue) - if pushErr := writeBuffer.PushContext("unsignedValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for unsignedValue") - } - _unsignedValueErr := writeBuffer.WriteSerializable(ctx, m.GetUnsignedValue()) - if popErr := writeBuffer.PopContext("unsignedValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for unsignedValue") - } - if _unsignedValueErr != nil { - return errors.Wrap(_unsignedValueErr, "Error serializing 'unsignedValue' field") - } + // Simple Field (unsignedValue) + if pushErr := writeBuffer.PushContext("unsignedValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for unsignedValue") + } + _unsignedValueErr := writeBuffer.WriteSerializable(ctx, m.GetUnsignedValue()) + if popErr := writeBuffer.PopContext("unsignedValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for unsignedValue") + } + if _unsignedValueErr != nil { + return errors.Wrap(_unsignedValueErr, "Error serializing 'unsignedValue' field") + } if popErr := writeBuffer.PopContext("BACnetLogDataLogDataEntryUnsignedValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetLogDataLogDataEntryUnsignedValue") @@ -194,6 +199,7 @@ func (m *_BACnetLogDataLogDataEntryUnsignedValue) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetLogDataLogDataEntryUnsignedValue) isBACnetLogDataLogDataEntryUnsignedValue() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetLogDataLogDataEntryUnsignedValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataTimeChange.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataTimeChange.go index 7f0be150bb4..159853d2b18 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataTimeChange.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogDataTimeChange.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLogDataLogDataTimeChange is the corresponding interface of BACnetLogDataLogDataTimeChange type BACnetLogDataLogDataTimeChange interface { @@ -46,9 +48,11 @@ type BACnetLogDataLogDataTimeChangeExactly interface { // _BACnetLogDataLogDataTimeChange is the data-structure of this message type _BACnetLogDataLogDataTimeChange struct { *_BACnetLogData - TimeChange BACnetContextTagReal + TimeChange BACnetContextTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,16 +63,14 @@ type _BACnetLogDataLogDataTimeChange struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetLogDataLogDataTimeChange) InitializeParent(parent BACnetLogData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetLogDataLogDataTimeChange) InitializeParent(parent BACnetLogData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetLogDataLogDataTimeChange) GetParent() BACnetLogData { +func (m *_BACnetLogDataLogDataTimeChange) GetParent() BACnetLogData { return m._BACnetLogData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetLogDataLogDataTimeChange) GetTimeChange() BACnetContextTagReal { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLogDataLogDataTimeChange factory function for _BACnetLogDataLogDataTimeChange -func NewBACnetLogDataLogDataTimeChange(timeChange BACnetContextTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetLogDataLogDataTimeChange { +func NewBACnetLogDataLogDataTimeChange( timeChange BACnetContextTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetLogDataLogDataTimeChange { _result := &_BACnetLogDataLogDataTimeChange{ - TimeChange: timeChange, - _BACnetLogData: NewBACnetLogData(openingTag, peekedTagHeader, closingTag, tagNumber), + TimeChange: timeChange, + _BACnetLogData: NewBACnetLogData(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetLogData._BACnetLogDataChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetLogDataLogDataTimeChange(timeChange BACnetContextTagReal, openingT // Deprecated: use the interface for direct cast func CastBACnetLogDataLogDataTimeChange(structType interface{}) BACnetLogDataLogDataTimeChange { - if casted, ok := structType.(BACnetLogDataLogDataTimeChange); ok { + if casted, ok := structType.(BACnetLogDataLogDataTimeChange); ok { return casted } if casted, ok := structType.(*BACnetLogDataLogDataTimeChange); ok { @@ -117,6 +120,7 @@ func (m *_BACnetLogDataLogDataTimeChange) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetLogDataLogDataTimeChange) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetLogDataLogDataTimeChangeParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("timeChange"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeChange") } - _timeChange, _timeChangeErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), BACnetDataType(BACnetDataType_REAL)) +_timeChange, _timeChangeErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , BACnetDataType( BACnetDataType_REAL ) ) if _timeChangeErr != nil { return nil, errors.Wrap(_timeChangeErr, "Error parsing 'timeChange' field of BACnetLogDataLogDataTimeChange") } @@ -178,17 +182,17 @@ func (m *_BACnetLogDataLogDataTimeChange) SerializeWithWriteBuffer(ctx context.C return errors.Wrap(pushErr, "Error pushing for BACnetLogDataLogDataTimeChange") } - // Simple Field (timeChange) - if pushErr := writeBuffer.PushContext("timeChange"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timeChange") - } - _timeChangeErr := writeBuffer.WriteSerializable(ctx, m.GetTimeChange()) - if popErr := writeBuffer.PopContext("timeChange"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timeChange") - } - if _timeChangeErr != nil { - return errors.Wrap(_timeChangeErr, "Error serializing 'timeChange' field") - } + // Simple Field (timeChange) + if pushErr := writeBuffer.PushContext("timeChange"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timeChange") + } + _timeChangeErr := writeBuffer.WriteSerializable(ctx, m.GetTimeChange()) + if popErr := writeBuffer.PopContext("timeChange"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timeChange") + } + if _timeChangeErr != nil { + return errors.Wrap(_timeChangeErr, "Error serializing 'timeChange' field") + } if popErr := writeBuffer.PopContext("BACnetLogDataLogDataTimeChange"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetLogDataLogDataTimeChange") @@ -198,6 +202,7 @@ func (m *_BACnetLogDataLogDataTimeChange) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetLogDataLogDataTimeChange) isBACnetLogDataLogDataTimeChange() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetLogDataLogDataTimeChange) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogStatus.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogStatus.go index 37edf0dff68..5e87eef2094 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogStatus.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogDataLogStatus.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLogDataLogStatus is the corresponding interface of BACnetLogDataLogStatus type BACnetLogDataLogStatus interface { @@ -46,9 +48,11 @@ type BACnetLogDataLogStatusExactly interface { // _BACnetLogDataLogStatus is the data-structure of this message type _BACnetLogDataLogStatus struct { *_BACnetLogData - LogStatus BACnetLogStatusTagged + LogStatus BACnetLogStatusTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,16 +63,14 @@ type _BACnetLogDataLogStatus struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetLogDataLogStatus) InitializeParent(parent BACnetLogData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetLogDataLogStatus) InitializeParent(parent BACnetLogData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetLogDataLogStatus) GetParent() BACnetLogData { +func (m *_BACnetLogDataLogStatus) GetParent() BACnetLogData { return m._BACnetLogData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetLogDataLogStatus) GetLogStatus() BACnetLogStatusTagged { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLogDataLogStatus factory function for _BACnetLogDataLogStatus -func NewBACnetLogDataLogStatus(logStatus BACnetLogStatusTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetLogDataLogStatus { +func NewBACnetLogDataLogStatus( logStatus BACnetLogStatusTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetLogDataLogStatus { _result := &_BACnetLogDataLogStatus{ - LogStatus: logStatus, - _BACnetLogData: NewBACnetLogData(openingTag, peekedTagHeader, closingTag, tagNumber), + LogStatus: logStatus, + _BACnetLogData: NewBACnetLogData(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetLogData._BACnetLogDataChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetLogDataLogStatus(logStatus BACnetLogStatusTagged, openingTag BACne // Deprecated: use the interface for direct cast func CastBACnetLogDataLogStatus(structType interface{}) BACnetLogDataLogStatus { - if casted, ok := structType.(BACnetLogDataLogStatus); ok { + if casted, ok := structType.(BACnetLogDataLogStatus); ok { return casted } if casted, ok := structType.(*BACnetLogDataLogStatus); ok { @@ -117,6 +120,7 @@ func (m *_BACnetLogDataLogStatus) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetLogDataLogStatus) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetLogDataLogStatusParseWithBuffer(ctx context.Context, readBuffer utils if pullErr := readBuffer.PullContext("logStatus"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for logStatus") } - _logStatus, _logStatusErr := BACnetLogStatusTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_logStatus, _logStatusErr := BACnetLogStatusTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _logStatusErr != nil { return nil, errors.Wrap(_logStatusErr, "Error parsing 'logStatus' field of BACnetLogDataLogStatus") } @@ -178,17 +182,17 @@ func (m *_BACnetLogDataLogStatus) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for BACnetLogDataLogStatus") } - // Simple Field (logStatus) - if pushErr := writeBuffer.PushContext("logStatus"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for logStatus") - } - _logStatusErr := writeBuffer.WriteSerializable(ctx, m.GetLogStatus()) - if popErr := writeBuffer.PopContext("logStatus"); popErr != nil { - return errors.Wrap(popErr, "Error popping for logStatus") - } - if _logStatusErr != nil { - return errors.Wrap(_logStatusErr, "Error serializing 'logStatus' field") - } + // Simple Field (logStatus) + if pushErr := writeBuffer.PushContext("logStatus"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for logStatus") + } + _logStatusErr := writeBuffer.WriteSerializable(ctx, m.GetLogStatus()) + if popErr := writeBuffer.PopContext("logStatus"); popErr != nil { + return errors.Wrap(popErr, "Error popping for logStatus") + } + if _logStatusErr != nil { + return errors.Wrap(_logStatusErr, "Error serializing 'logStatus' field") + } if popErr := writeBuffer.PopContext("BACnetLogDataLogStatus"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetLogDataLogStatus") @@ -198,6 +202,7 @@ func (m *_BACnetLogDataLogStatus) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetLogDataLogStatus) isBACnetLogDataLogStatus() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetLogDataLogStatus) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogMultipleRecord.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogMultipleRecord.go index 8f2a48e7917..8bd900b5008 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogMultipleRecord.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogMultipleRecord.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLogMultipleRecord is the corresponding interface of BACnetLogMultipleRecord type BACnetLogMultipleRecord interface { @@ -46,10 +48,11 @@ type BACnetLogMultipleRecordExactly interface { // _BACnetLogMultipleRecord is the data-structure of this message type _BACnetLogMultipleRecord struct { - Timestamp BACnetDateTimeEnclosed - LogData BACnetLogData + Timestamp BACnetDateTimeEnclosed + LogData BACnetLogData } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -68,14 +71,15 @@ func (m *_BACnetLogMultipleRecord) GetLogData() BACnetLogData { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLogMultipleRecord factory function for _BACnetLogMultipleRecord -func NewBACnetLogMultipleRecord(timestamp BACnetDateTimeEnclosed, logData BACnetLogData) *_BACnetLogMultipleRecord { - return &_BACnetLogMultipleRecord{Timestamp: timestamp, LogData: logData} +func NewBACnetLogMultipleRecord( timestamp BACnetDateTimeEnclosed , logData BACnetLogData ) *_BACnetLogMultipleRecord { +return &_BACnetLogMultipleRecord{ Timestamp: timestamp , LogData: logData } } // Deprecated: use the interface for direct cast func CastBACnetLogMultipleRecord(structType interface{}) BACnetLogMultipleRecord { - if casted, ok := structType.(BACnetLogMultipleRecord); ok { + if casted, ok := structType.(BACnetLogMultipleRecord); ok { return casted } if casted, ok := structType.(*BACnetLogMultipleRecord); ok { @@ -100,6 +104,7 @@ func (m *_BACnetLogMultipleRecord) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetLogMultipleRecord) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -121,7 +126,7 @@ func BACnetLogMultipleRecordParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("timestamp"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timestamp") } - _timestamp, _timestampErr := BACnetDateTimeEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_timestamp, _timestampErr := BACnetDateTimeEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _timestampErr != nil { return nil, errors.Wrap(_timestampErr, "Error parsing 'timestamp' field of BACnetLogMultipleRecord") } @@ -134,7 +139,7 @@ func BACnetLogMultipleRecordParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("logData"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for logData") } - _logData, _logDataErr := BACnetLogDataParseWithBuffer(ctx, readBuffer, uint8(uint8(1))) +_logData, _logDataErr := BACnetLogDataParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) ) if _logDataErr != nil { return nil, errors.Wrap(_logDataErr, "Error parsing 'logData' field of BACnetLogMultipleRecord") } @@ -149,9 +154,9 @@ func BACnetLogMultipleRecordParseWithBuffer(ctx context.Context, readBuffer util // Create the instance return &_BACnetLogMultipleRecord{ - Timestamp: timestamp, - LogData: logData, - }, nil + Timestamp: timestamp, + LogData: logData, + }, nil } func (m *_BACnetLogMultipleRecord) Serialize() ([]byte, error) { @@ -165,7 +170,7 @@ func (m *_BACnetLogMultipleRecord) Serialize() ([]byte, error) { func (m *_BACnetLogMultipleRecord) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetLogMultipleRecord"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetLogMultipleRecord"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetLogMultipleRecord") } @@ -199,6 +204,7 @@ func (m *_BACnetLogMultipleRecord) SerializeWithWriteBuffer(ctx context.Context, return nil } + func (m *_BACnetLogMultipleRecord) isBACnetLogMultipleRecord() bool { return true } @@ -213,3 +219,6 @@ func (m *_BACnetLogMultipleRecord) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecord.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecord.go index 68bcc34c608..6dffdb77202 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecord.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecord.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLogRecord is the corresponding interface of BACnetLogRecord type BACnetLogRecord interface { @@ -49,11 +51,12 @@ type BACnetLogRecordExactly interface { // _BACnetLogRecord is the data-structure of this message type _BACnetLogRecord struct { - Timestamp BACnetDateTimeEnclosed - LogDatum BACnetLogRecordLogDatum - StatusFlags BACnetStatusFlagsTagged + Timestamp BACnetDateTimeEnclosed + LogDatum BACnetLogRecordLogDatum + StatusFlags BACnetStatusFlagsTagged } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -76,14 +79,15 @@ func (m *_BACnetLogRecord) GetStatusFlags() BACnetStatusFlagsTagged { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLogRecord factory function for _BACnetLogRecord -func NewBACnetLogRecord(timestamp BACnetDateTimeEnclosed, logDatum BACnetLogRecordLogDatum, statusFlags BACnetStatusFlagsTagged) *_BACnetLogRecord { - return &_BACnetLogRecord{Timestamp: timestamp, LogDatum: logDatum, StatusFlags: statusFlags} +func NewBACnetLogRecord( timestamp BACnetDateTimeEnclosed , logDatum BACnetLogRecordLogDatum , statusFlags BACnetStatusFlagsTagged ) *_BACnetLogRecord { +return &_BACnetLogRecord{ Timestamp: timestamp , LogDatum: logDatum , StatusFlags: statusFlags } } // Deprecated: use the interface for direct cast func CastBACnetLogRecord(structType interface{}) BACnetLogRecord { - if casted, ok := structType.(BACnetLogRecord); ok { + if casted, ok := structType.(BACnetLogRecord); ok { return casted } if casted, ok := structType.(*BACnetLogRecord); ok { @@ -113,6 +117,7 @@ func (m *_BACnetLogRecord) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetLogRecord) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -134,7 +139,7 @@ func BACnetLogRecordParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu if pullErr := readBuffer.PullContext("timestamp"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timestamp") } - _timestamp, _timestampErr := BACnetDateTimeEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_timestamp, _timestampErr := BACnetDateTimeEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _timestampErr != nil { return nil, errors.Wrap(_timestampErr, "Error parsing 'timestamp' field of BACnetLogRecord") } @@ -147,7 +152,7 @@ func BACnetLogRecordParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu if pullErr := readBuffer.PullContext("logDatum"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for logDatum") } - _logDatum, _logDatumErr := BACnetLogRecordLogDatumParseWithBuffer(ctx, readBuffer, uint8(uint8(1))) +_logDatum, _logDatumErr := BACnetLogRecordLogDatumParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) ) if _logDatumErr != nil { return nil, errors.Wrap(_logDatumErr, "Error parsing 'logDatum' field of BACnetLogRecord") } @@ -158,12 +163,12 @@ func BACnetLogRecordParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu // Optional Field (statusFlags) (Can be skipped, if a given expression evaluates to false) var statusFlags BACnetStatusFlagsTagged = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("statusFlags"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for statusFlags") } - _val, _err := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer, uint8(2), TagClass_CONTEXT_SPECIFIC_TAGS) +_val, _err := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer , uint8(2) , TagClass_CONTEXT_SPECIFIC_TAGS ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -184,10 +189,10 @@ func BACnetLogRecordParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu // Create the instance return &_BACnetLogRecord{ - Timestamp: timestamp, - LogDatum: logDatum, - StatusFlags: statusFlags, - }, nil + Timestamp: timestamp, + LogDatum: logDatum, + StatusFlags: statusFlags, + }, nil } func (m *_BACnetLogRecord) Serialize() ([]byte, error) { @@ -201,7 +206,7 @@ func (m *_BACnetLogRecord) Serialize() ([]byte, error) { func (m *_BACnetLogRecord) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetLogRecord"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetLogRecord"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetLogRecord") } @@ -251,6 +256,7 @@ func (m *_BACnetLogRecord) SerializeWithWriteBuffer(ctx context.Context, writeBu return nil } + func (m *_BACnetLogRecord) isBACnetLogRecord() bool { return true } @@ -265,3 +271,6 @@ func (m *_BACnetLogRecord) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatum.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatum.go index 5be81f96989..b49ff8a77b6 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatum.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatum.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLogRecordLogDatum is the corresponding interface of BACnetLogRecordLogDatum type BACnetLogRecordLogDatum interface { @@ -51,9 +53,9 @@ type BACnetLogRecordLogDatumExactly interface { // _BACnetLogRecordLogDatum is the data-structure of this message type _BACnetLogRecordLogDatum struct { _BACnetLogRecordLogDatumChildRequirements - OpeningTag BACnetOpeningTag - PeekedTagHeader BACnetTagHeader - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + PeekedTagHeader BACnetTagHeader + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 @@ -64,6 +66,7 @@ type _BACnetLogRecordLogDatumChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type BACnetLogRecordLogDatumParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetLogRecordLogDatum, serializeChildFunction func() error) error GetTypeName() string @@ -71,13 +74,12 @@ type BACnetLogRecordLogDatumParent interface { type BACnetLogRecordLogDatumChild interface { utils.Serializable - InitializeParent(parent BACnetLogRecordLogDatum, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) +InitializeParent(parent BACnetLogRecordLogDatum , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) GetParent() *BACnetLogRecordLogDatum GetTypeName() string BACnetLogRecordLogDatum } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -115,14 +117,15 @@ func (m *_BACnetLogRecordLogDatum) GetPeekedTagNumber() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLogRecordLogDatum factory function for _BACnetLogRecordLogDatum -func NewBACnetLogRecordLogDatum(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetLogRecordLogDatum { - return &_BACnetLogRecordLogDatum{OpeningTag: openingTag, PeekedTagHeader: peekedTagHeader, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetLogRecordLogDatum( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetLogRecordLogDatum { +return &_BACnetLogRecordLogDatum{ OpeningTag: openingTag , PeekedTagHeader: peekedTagHeader , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetLogRecordLogDatum(structType interface{}) BACnetLogRecordLogDatum { - if casted, ok := structType.(BACnetLogRecordLogDatum); ok { + if casted, ok := structType.(BACnetLogRecordLogDatum); ok { return casted } if casted, ok := structType.(*BACnetLogRecordLogDatum); ok { @@ -135,6 +138,7 @@ func (m *_BACnetLogRecordLogDatum) GetTypeName() string { return "BACnetLogRecordLogDatum" } + func (m *_BACnetLogRecordLogDatum) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -170,7 +174,7 @@ func BACnetLogRecordLogDatumParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetLogRecordLogDatum") } @@ -179,13 +183,13 @@ func BACnetLogRecordLogDatumParseWithBuffer(ctx context.Context, readBuffer util return nil, errors.Wrap(closeErr, "Error closing for openingTag") } - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Virtual field _peekedTagNumber := peekedTagHeader.GetActualTagNumber() @@ -195,34 +199,34 @@ func BACnetLogRecordLogDatumParseWithBuffer(ctx context.Context, readBuffer util // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetLogRecordLogDatumChildSerializeRequirement interface { BACnetLogRecordLogDatum - InitializeParent(BACnetLogRecordLogDatum, BACnetOpeningTag, BACnetTagHeader, BACnetClosingTag) + InitializeParent(BACnetLogRecordLogDatum, BACnetOpeningTag, BACnetTagHeader, BACnetClosingTag) GetParent() BACnetLogRecordLogDatum } var _childTemp interface{} var _child BACnetLogRecordLogDatumChildSerializeRequirement var typeSwitchError error switch { - case peekedTagNumber == uint8(0): // BACnetLogRecordLogDatumLogStatus +case peekedTagNumber == uint8(0) : // BACnetLogRecordLogDatumLogStatus _childTemp, typeSwitchError = BACnetLogRecordLogDatumLogStatusParseWithBuffer(ctx, readBuffer, tagNumber) - case peekedTagNumber == uint8(1): // BACnetLogRecordLogDatumBooleanValue +case peekedTagNumber == uint8(1) : // BACnetLogRecordLogDatumBooleanValue _childTemp, typeSwitchError = BACnetLogRecordLogDatumBooleanValueParseWithBuffer(ctx, readBuffer, tagNumber) - case peekedTagNumber == uint8(2): // BACnetLogRecordLogDatumRealValue +case peekedTagNumber == uint8(2) : // BACnetLogRecordLogDatumRealValue _childTemp, typeSwitchError = BACnetLogRecordLogDatumRealValueParseWithBuffer(ctx, readBuffer, tagNumber) - case peekedTagNumber == uint8(3): // BACnetLogRecordLogDatumEnumeratedValue +case peekedTagNumber == uint8(3) : // BACnetLogRecordLogDatumEnumeratedValue _childTemp, typeSwitchError = BACnetLogRecordLogDatumEnumeratedValueParseWithBuffer(ctx, readBuffer, tagNumber) - case peekedTagNumber == uint8(4): // BACnetLogRecordLogDatumUnsignedValue +case peekedTagNumber == uint8(4) : // BACnetLogRecordLogDatumUnsignedValue _childTemp, typeSwitchError = BACnetLogRecordLogDatumUnsignedValueParseWithBuffer(ctx, readBuffer, tagNumber) - case peekedTagNumber == uint8(5): // BACnetLogRecordLogDatumIntegerValue +case peekedTagNumber == uint8(5) : // BACnetLogRecordLogDatumIntegerValue _childTemp, typeSwitchError = BACnetLogRecordLogDatumIntegerValueParseWithBuffer(ctx, readBuffer, tagNumber) - case peekedTagNumber == uint8(6): // BACnetLogRecordLogDatumBitStringValue +case peekedTagNumber == uint8(6) : // BACnetLogRecordLogDatumBitStringValue _childTemp, typeSwitchError = BACnetLogRecordLogDatumBitStringValueParseWithBuffer(ctx, readBuffer, tagNumber) - case peekedTagNumber == uint8(7): // BACnetLogRecordLogDatumNullValue +case peekedTagNumber == uint8(7) : // BACnetLogRecordLogDatumNullValue _childTemp, typeSwitchError = BACnetLogRecordLogDatumNullValueParseWithBuffer(ctx, readBuffer, tagNumber) - case peekedTagNumber == uint8(8): // BACnetLogRecordLogDatumFailure +case peekedTagNumber == uint8(8) : // BACnetLogRecordLogDatumFailure _childTemp, typeSwitchError = BACnetLogRecordLogDatumFailureParseWithBuffer(ctx, readBuffer, tagNumber) - case peekedTagNumber == uint8(9): // BACnetLogRecordLogDatumTimeChange +case peekedTagNumber == uint8(9) : // BACnetLogRecordLogDatumTimeChange _childTemp, typeSwitchError = BACnetLogRecordLogDatumTimeChangeParseWithBuffer(ctx, readBuffer, tagNumber) - case peekedTagNumber == uint8(10): // BACnetLogRecordLogDatumAnyValue +case peekedTagNumber == uint8(10) : // BACnetLogRecordLogDatumAnyValue _childTemp, typeSwitchError = BACnetLogRecordLogDatumAnyValueParseWithBuffer(ctx, readBuffer, tagNumber) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedTagNumber=%v]", peekedTagNumber) @@ -236,7 +240,7 @@ func BACnetLogRecordLogDatumParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetLogRecordLogDatum") } @@ -250,7 +254,7 @@ func BACnetLogRecordLogDatumParseWithBuffer(ctx context.Context, readBuffer util } // Finish initializing - _child.InitializeParent(_child, openingTag, peekedTagHeader, closingTag) +_child.InitializeParent(_child , openingTag , peekedTagHeader , closingTag ) return _child, nil } @@ -260,7 +264,7 @@ func (pm *_BACnetLogRecordLogDatum) SerializeParent(ctx context.Context, writeBu _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetLogRecordLogDatum"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetLogRecordLogDatum"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetLogRecordLogDatum") } @@ -303,13 +307,13 @@ func (pm *_BACnetLogRecordLogDatum) SerializeParent(ctx context.Context, writeBu return nil } + //// // Arguments Getter func (m *_BACnetLogRecordLogDatum) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -327,3 +331,6 @@ func (m *_BACnetLogRecordLogDatum) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumAnyValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumAnyValue.go index 862014395ff..9ca0d185d3c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumAnyValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumAnyValue.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLogRecordLogDatumAnyValue is the corresponding interface of BACnetLogRecordLogDatumAnyValue type BACnetLogRecordLogDatumAnyValue interface { @@ -47,9 +49,11 @@ type BACnetLogRecordLogDatumAnyValueExactly interface { // _BACnetLogRecordLogDatumAnyValue is the data-structure of this message type _BACnetLogRecordLogDatumAnyValue struct { *_BACnetLogRecordLogDatum - AnyValue BACnetConstructedData + AnyValue BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -60,16 +64,14 @@ type _BACnetLogRecordLogDatumAnyValue struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetLogRecordLogDatumAnyValue) InitializeParent(parent BACnetLogRecordLogDatum, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetLogRecordLogDatumAnyValue) InitializeParent(parent BACnetLogRecordLogDatum , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetLogRecordLogDatumAnyValue) GetParent() BACnetLogRecordLogDatum { +func (m *_BACnetLogRecordLogDatumAnyValue) GetParent() BACnetLogRecordLogDatum { return m._BACnetLogRecordLogDatum } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -84,11 +86,12 @@ func (m *_BACnetLogRecordLogDatumAnyValue) GetAnyValue() BACnetConstructedData { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLogRecordLogDatumAnyValue factory function for _BACnetLogRecordLogDatumAnyValue -func NewBACnetLogRecordLogDatumAnyValue(anyValue BACnetConstructedData, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetLogRecordLogDatumAnyValue { +func NewBACnetLogRecordLogDatumAnyValue( anyValue BACnetConstructedData , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetLogRecordLogDatumAnyValue { _result := &_BACnetLogRecordLogDatumAnyValue{ - AnyValue: anyValue, - _BACnetLogRecordLogDatum: NewBACnetLogRecordLogDatum(openingTag, peekedTagHeader, closingTag, tagNumber), + AnyValue: anyValue, + _BACnetLogRecordLogDatum: NewBACnetLogRecordLogDatum(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetLogRecordLogDatum._BACnetLogRecordLogDatumChildRequirements = _result return _result @@ -96,7 +99,7 @@ func NewBACnetLogRecordLogDatumAnyValue(anyValue BACnetConstructedData, openingT // Deprecated: use the interface for direct cast func CastBACnetLogRecordLogDatumAnyValue(structType interface{}) BACnetLogRecordLogDatumAnyValue { - if casted, ok := structType.(BACnetLogRecordLogDatumAnyValue); ok { + if casted, ok := structType.(BACnetLogRecordLogDatumAnyValue); ok { return casted } if casted, ok := structType.(*BACnetLogRecordLogDatumAnyValue); ok { @@ -120,6 +123,7 @@ func (m *_BACnetLogRecordLogDatumAnyValue) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetLogRecordLogDatumAnyValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,12 +143,12 @@ func BACnetLogRecordLogDatumAnyValueParseWithBuffer(ctx context.Context, readBuf // Optional Field (anyValue) (Can be skipped, if a given expression evaluates to false) var anyValue BACnetConstructedData = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("anyValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for anyValue") } - _val, _err := BACnetConstructedDataParseWithBuffer(ctx, readBuffer, uint8(10), BACnetObjectType_VENDOR_PROPRIETARY_VALUE, BACnetPropertyIdentifier_VENDOR_PROPRIETARY_VALUE, nil) +_val, _err := BACnetConstructedDataParseWithBuffer(ctx, readBuffer , uint8(10) , BACnetObjectType_VENDOR_PROPRIETARY_VALUE , BACnetPropertyIdentifier_VENDOR_PROPRIETARY_VALUE , nil ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -190,21 +194,21 @@ func (m *_BACnetLogRecordLogDatumAnyValue) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetLogRecordLogDatumAnyValue") } - // Optional Field (anyValue) (Can be skipped, if the value is null) - var anyValue BACnetConstructedData = nil - if m.GetAnyValue() != nil { - if pushErr := writeBuffer.PushContext("anyValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for anyValue") - } - anyValue = m.GetAnyValue() - _anyValueErr := writeBuffer.WriteSerializable(ctx, anyValue) - if popErr := writeBuffer.PopContext("anyValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for anyValue") - } - if _anyValueErr != nil { - return errors.Wrap(_anyValueErr, "Error serializing 'anyValue' field") - } + // Optional Field (anyValue) (Can be skipped, if the value is null) + var anyValue BACnetConstructedData = nil + if m.GetAnyValue() != nil { + if pushErr := writeBuffer.PushContext("anyValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for anyValue") + } + anyValue = m.GetAnyValue() + _anyValueErr := writeBuffer.WriteSerializable(ctx, anyValue) + if popErr := writeBuffer.PopContext("anyValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for anyValue") } + if _anyValueErr != nil { + return errors.Wrap(_anyValueErr, "Error serializing 'anyValue' field") + } + } if popErr := writeBuffer.PopContext("BACnetLogRecordLogDatumAnyValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetLogRecordLogDatumAnyValue") @@ -214,6 +218,7 @@ func (m *_BACnetLogRecordLogDatumAnyValue) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetLogRecordLogDatumAnyValue) isBACnetLogRecordLogDatumAnyValue() bool { return true } @@ -228,3 +233,6 @@ func (m *_BACnetLogRecordLogDatumAnyValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumBitStringValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumBitStringValue.go index 9e663a7517f..2d821cb0286 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumBitStringValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumBitStringValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLogRecordLogDatumBitStringValue is the corresponding interface of BACnetLogRecordLogDatumBitStringValue type BACnetLogRecordLogDatumBitStringValue interface { @@ -46,9 +48,11 @@ type BACnetLogRecordLogDatumBitStringValueExactly interface { // _BACnetLogRecordLogDatumBitStringValue is the data-structure of this message type _BACnetLogRecordLogDatumBitStringValue struct { *_BACnetLogRecordLogDatum - BitStringValue BACnetContextTagBitString + BitStringValue BACnetContextTagBitString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,16 +63,14 @@ type _BACnetLogRecordLogDatumBitStringValue struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetLogRecordLogDatumBitStringValue) InitializeParent(parent BACnetLogRecordLogDatum, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetLogRecordLogDatumBitStringValue) InitializeParent(parent BACnetLogRecordLogDatum , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetLogRecordLogDatumBitStringValue) GetParent() BACnetLogRecordLogDatum { +func (m *_BACnetLogRecordLogDatumBitStringValue) GetParent() BACnetLogRecordLogDatum { return m._BACnetLogRecordLogDatum } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetLogRecordLogDatumBitStringValue) GetBitStringValue() BACnetConte /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLogRecordLogDatumBitStringValue factory function for _BACnetLogRecordLogDatumBitStringValue -func NewBACnetLogRecordLogDatumBitStringValue(bitStringValue BACnetContextTagBitString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetLogRecordLogDatumBitStringValue { +func NewBACnetLogRecordLogDatumBitStringValue( bitStringValue BACnetContextTagBitString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetLogRecordLogDatumBitStringValue { _result := &_BACnetLogRecordLogDatumBitStringValue{ - BitStringValue: bitStringValue, - _BACnetLogRecordLogDatum: NewBACnetLogRecordLogDatum(openingTag, peekedTagHeader, closingTag, tagNumber), + BitStringValue: bitStringValue, + _BACnetLogRecordLogDatum: NewBACnetLogRecordLogDatum(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetLogRecordLogDatum._BACnetLogRecordLogDatumChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetLogRecordLogDatumBitStringValue(bitStringValue BACnetContextTagBit // Deprecated: use the interface for direct cast func CastBACnetLogRecordLogDatumBitStringValue(structType interface{}) BACnetLogRecordLogDatumBitStringValue { - if casted, ok := structType.(BACnetLogRecordLogDatumBitStringValue); ok { + if casted, ok := structType.(BACnetLogRecordLogDatumBitStringValue); ok { return casted } if casted, ok := structType.(*BACnetLogRecordLogDatumBitStringValue); ok { @@ -117,6 +120,7 @@ func (m *_BACnetLogRecordLogDatumBitStringValue) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetLogRecordLogDatumBitStringValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetLogRecordLogDatumBitStringValueParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("bitStringValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for bitStringValue") } - _bitStringValue, _bitStringValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(6)), BACnetDataType(BACnetDataType_BIT_STRING)) +_bitStringValue, _bitStringValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(6) ) , BACnetDataType( BACnetDataType_BIT_STRING ) ) if _bitStringValueErr != nil { return nil, errors.Wrap(_bitStringValueErr, "Error parsing 'bitStringValue' field of BACnetLogRecordLogDatumBitStringValue") } @@ -178,17 +182,17 @@ func (m *_BACnetLogRecordLogDatumBitStringValue) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for BACnetLogRecordLogDatumBitStringValue") } - // Simple Field (bitStringValue) - if pushErr := writeBuffer.PushContext("bitStringValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for bitStringValue") - } - _bitStringValueErr := writeBuffer.WriteSerializable(ctx, m.GetBitStringValue()) - if popErr := writeBuffer.PopContext("bitStringValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for bitStringValue") - } - if _bitStringValueErr != nil { - return errors.Wrap(_bitStringValueErr, "Error serializing 'bitStringValue' field") - } + // Simple Field (bitStringValue) + if pushErr := writeBuffer.PushContext("bitStringValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for bitStringValue") + } + _bitStringValueErr := writeBuffer.WriteSerializable(ctx, m.GetBitStringValue()) + if popErr := writeBuffer.PopContext("bitStringValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for bitStringValue") + } + if _bitStringValueErr != nil { + return errors.Wrap(_bitStringValueErr, "Error serializing 'bitStringValue' field") + } if popErr := writeBuffer.PopContext("BACnetLogRecordLogDatumBitStringValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetLogRecordLogDatumBitStringValue") @@ -198,6 +202,7 @@ func (m *_BACnetLogRecordLogDatumBitStringValue) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetLogRecordLogDatumBitStringValue) isBACnetLogRecordLogDatumBitStringValue() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetLogRecordLogDatumBitStringValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumBooleanValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumBooleanValue.go index 33c4267b891..b53b3549b02 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumBooleanValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumBooleanValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLogRecordLogDatumBooleanValue is the corresponding interface of BACnetLogRecordLogDatumBooleanValue type BACnetLogRecordLogDatumBooleanValue interface { @@ -46,9 +48,11 @@ type BACnetLogRecordLogDatumBooleanValueExactly interface { // _BACnetLogRecordLogDatumBooleanValue is the data-structure of this message type _BACnetLogRecordLogDatumBooleanValue struct { *_BACnetLogRecordLogDatum - BooleanValue BACnetContextTagBoolean + BooleanValue BACnetContextTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,16 +63,14 @@ type _BACnetLogRecordLogDatumBooleanValue struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetLogRecordLogDatumBooleanValue) InitializeParent(parent BACnetLogRecordLogDatum, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetLogRecordLogDatumBooleanValue) InitializeParent(parent BACnetLogRecordLogDatum , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetLogRecordLogDatumBooleanValue) GetParent() BACnetLogRecordLogDatum { +func (m *_BACnetLogRecordLogDatumBooleanValue) GetParent() BACnetLogRecordLogDatum { return m._BACnetLogRecordLogDatum } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetLogRecordLogDatumBooleanValue) GetBooleanValue() BACnetContextTa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLogRecordLogDatumBooleanValue factory function for _BACnetLogRecordLogDatumBooleanValue -func NewBACnetLogRecordLogDatumBooleanValue(booleanValue BACnetContextTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetLogRecordLogDatumBooleanValue { +func NewBACnetLogRecordLogDatumBooleanValue( booleanValue BACnetContextTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetLogRecordLogDatumBooleanValue { _result := &_BACnetLogRecordLogDatumBooleanValue{ - BooleanValue: booleanValue, - _BACnetLogRecordLogDatum: NewBACnetLogRecordLogDatum(openingTag, peekedTagHeader, closingTag, tagNumber), + BooleanValue: booleanValue, + _BACnetLogRecordLogDatum: NewBACnetLogRecordLogDatum(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetLogRecordLogDatum._BACnetLogRecordLogDatumChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetLogRecordLogDatumBooleanValue(booleanValue BACnetContextTagBoolean // Deprecated: use the interface for direct cast func CastBACnetLogRecordLogDatumBooleanValue(structType interface{}) BACnetLogRecordLogDatumBooleanValue { - if casted, ok := structType.(BACnetLogRecordLogDatumBooleanValue); ok { + if casted, ok := structType.(BACnetLogRecordLogDatumBooleanValue); ok { return casted } if casted, ok := structType.(*BACnetLogRecordLogDatumBooleanValue); ok { @@ -117,6 +120,7 @@ func (m *_BACnetLogRecordLogDatumBooleanValue) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetLogRecordLogDatumBooleanValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetLogRecordLogDatumBooleanValueParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("booleanValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for booleanValue") } - _booleanValue, _booleanValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_BOOLEAN)) +_booleanValue, _booleanValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_BOOLEAN ) ) if _booleanValueErr != nil { return nil, errors.Wrap(_booleanValueErr, "Error parsing 'booleanValue' field of BACnetLogRecordLogDatumBooleanValue") } @@ -178,17 +182,17 @@ func (m *_BACnetLogRecordLogDatumBooleanValue) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetLogRecordLogDatumBooleanValue") } - // Simple Field (booleanValue) - if pushErr := writeBuffer.PushContext("booleanValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for booleanValue") - } - _booleanValueErr := writeBuffer.WriteSerializable(ctx, m.GetBooleanValue()) - if popErr := writeBuffer.PopContext("booleanValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for booleanValue") - } - if _booleanValueErr != nil { - return errors.Wrap(_booleanValueErr, "Error serializing 'booleanValue' field") - } + // Simple Field (booleanValue) + if pushErr := writeBuffer.PushContext("booleanValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for booleanValue") + } + _booleanValueErr := writeBuffer.WriteSerializable(ctx, m.GetBooleanValue()) + if popErr := writeBuffer.PopContext("booleanValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for booleanValue") + } + if _booleanValueErr != nil { + return errors.Wrap(_booleanValueErr, "Error serializing 'booleanValue' field") + } if popErr := writeBuffer.PopContext("BACnetLogRecordLogDatumBooleanValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetLogRecordLogDatumBooleanValue") @@ -198,6 +202,7 @@ func (m *_BACnetLogRecordLogDatumBooleanValue) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetLogRecordLogDatumBooleanValue) isBACnetLogRecordLogDatumBooleanValue() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetLogRecordLogDatumBooleanValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumEnumeratedValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumEnumeratedValue.go index 6f5d8d83f7d..f74ad4cbb54 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumEnumeratedValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumEnumeratedValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLogRecordLogDatumEnumeratedValue is the corresponding interface of BACnetLogRecordLogDatumEnumeratedValue type BACnetLogRecordLogDatumEnumeratedValue interface { @@ -46,9 +48,11 @@ type BACnetLogRecordLogDatumEnumeratedValueExactly interface { // _BACnetLogRecordLogDatumEnumeratedValue is the data-structure of this message type _BACnetLogRecordLogDatumEnumeratedValue struct { *_BACnetLogRecordLogDatum - EnumeratedValue BACnetContextTagEnumerated + EnumeratedValue BACnetContextTagEnumerated } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,16 +63,14 @@ type _BACnetLogRecordLogDatumEnumeratedValue struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetLogRecordLogDatumEnumeratedValue) InitializeParent(parent BACnetLogRecordLogDatum, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetLogRecordLogDatumEnumeratedValue) InitializeParent(parent BACnetLogRecordLogDatum , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetLogRecordLogDatumEnumeratedValue) GetParent() BACnetLogRecordLogDatum { +func (m *_BACnetLogRecordLogDatumEnumeratedValue) GetParent() BACnetLogRecordLogDatum { return m._BACnetLogRecordLogDatum } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetLogRecordLogDatumEnumeratedValue) GetEnumeratedValue() BACnetCon /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLogRecordLogDatumEnumeratedValue factory function for _BACnetLogRecordLogDatumEnumeratedValue -func NewBACnetLogRecordLogDatumEnumeratedValue(enumeratedValue BACnetContextTagEnumerated, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetLogRecordLogDatumEnumeratedValue { +func NewBACnetLogRecordLogDatumEnumeratedValue( enumeratedValue BACnetContextTagEnumerated , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetLogRecordLogDatumEnumeratedValue { _result := &_BACnetLogRecordLogDatumEnumeratedValue{ - EnumeratedValue: enumeratedValue, - _BACnetLogRecordLogDatum: NewBACnetLogRecordLogDatum(openingTag, peekedTagHeader, closingTag, tagNumber), + EnumeratedValue: enumeratedValue, + _BACnetLogRecordLogDatum: NewBACnetLogRecordLogDatum(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetLogRecordLogDatum._BACnetLogRecordLogDatumChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetLogRecordLogDatumEnumeratedValue(enumeratedValue BACnetContextTagE // Deprecated: use the interface for direct cast func CastBACnetLogRecordLogDatumEnumeratedValue(structType interface{}) BACnetLogRecordLogDatumEnumeratedValue { - if casted, ok := structType.(BACnetLogRecordLogDatumEnumeratedValue); ok { + if casted, ok := structType.(BACnetLogRecordLogDatumEnumeratedValue); ok { return casted } if casted, ok := structType.(*BACnetLogRecordLogDatumEnumeratedValue); ok { @@ -117,6 +120,7 @@ func (m *_BACnetLogRecordLogDatumEnumeratedValue) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetLogRecordLogDatumEnumeratedValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetLogRecordLogDatumEnumeratedValueParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("enumeratedValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for enumeratedValue") } - _enumeratedValue, _enumeratedValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(3)), BACnetDataType(BACnetDataType_ENUMERATED)) +_enumeratedValue, _enumeratedValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(3) ) , BACnetDataType( BACnetDataType_ENUMERATED ) ) if _enumeratedValueErr != nil { return nil, errors.Wrap(_enumeratedValueErr, "Error parsing 'enumeratedValue' field of BACnetLogRecordLogDatumEnumeratedValue") } @@ -178,17 +182,17 @@ func (m *_BACnetLogRecordLogDatumEnumeratedValue) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetLogRecordLogDatumEnumeratedValue") } - // Simple Field (enumeratedValue) - if pushErr := writeBuffer.PushContext("enumeratedValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for enumeratedValue") - } - _enumeratedValueErr := writeBuffer.WriteSerializable(ctx, m.GetEnumeratedValue()) - if popErr := writeBuffer.PopContext("enumeratedValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for enumeratedValue") - } - if _enumeratedValueErr != nil { - return errors.Wrap(_enumeratedValueErr, "Error serializing 'enumeratedValue' field") - } + // Simple Field (enumeratedValue) + if pushErr := writeBuffer.PushContext("enumeratedValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for enumeratedValue") + } + _enumeratedValueErr := writeBuffer.WriteSerializable(ctx, m.GetEnumeratedValue()) + if popErr := writeBuffer.PopContext("enumeratedValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for enumeratedValue") + } + if _enumeratedValueErr != nil { + return errors.Wrap(_enumeratedValueErr, "Error serializing 'enumeratedValue' field") + } if popErr := writeBuffer.PopContext("BACnetLogRecordLogDatumEnumeratedValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetLogRecordLogDatumEnumeratedValue") @@ -198,6 +202,7 @@ func (m *_BACnetLogRecordLogDatumEnumeratedValue) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetLogRecordLogDatumEnumeratedValue) isBACnetLogRecordLogDatumEnumeratedValue() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetLogRecordLogDatumEnumeratedValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumFailure.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumFailure.go index 17af8c7439a..8f2e0e48776 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumFailure.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumFailure.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLogRecordLogDatumFailure is the corresponding interface of BACnetLogRecordLogDatumFailure type BACnetLogRecordLogDatumFailure interface { @@ -46,9 +48,11 @@ type BACnetLogRecordLogDatumFailureExactly interface { // _BACnetLogRecordLogDatumFailure is the data-structure of this message type _BACnetLogRecordLogDatumFailure struct { *_BACnetLogRecordLogDatum - Failure ErrorEnclosed + Failure ErrorEnclosed } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,16 +63,14 @@ type _BACnetLogRecordLogDatumFailure struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetLogRecordLogDatumFailure) InitializeParent(parent BACnetLogRecordLogDatum, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetLogRecordLogDatumFailure) InitializeParent(parent BACnetLogRecordLogDatum , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetLogRecordLogDatumFailure) GetParent() BACnetLogRecordLogDatum { +func (m *_BACnetLogRecordLogDatumFailure) GetParent() BACnetLogRecordLogDatum { return m._BACnetLogRecordLogDatum } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetLogRecordLogDatumFailure) GetFailure() ErrorEnclosed { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLogRecordLogDatumFailure factory function for _BACnetLogRecordLogDatumFailure -func NewBACnetLogRecordLogDatumFailure(failure ErrorEnclosed, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetLogRecordLogDatumFailure { +func NewBACnetLogRecordLogDatumFailure( failure ErrorEnclosed , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetLogRecordLogDatumFailure { _result := &_BACnetLogRecordLogDatumFailure{ - Failure: failure, - _BACnetLogRecordLogDatum: NewBACnetLogRecordLogDatum(openingTag, peekedTagHeader, closingTag, tagNumber), + Failure: failure, + _BACnetLogRecordLogDatum: NewBACnetLogRecordLogDatum(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetLogRecordLogDatum._BACnetLogRecordLogDatumChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetLogRecordLogDatumFailure(failure ErrorEnclosed, openingTag BACnetO // Deprecated: use the interface for direct cast func CastBACnetLogRecordLogDatumFailure(structType interface{}) BACnetLogRecordLogDatumFailure { - if casted, ok := structType.(BACnetLogRecordLogDatumFailure); ok { + if casted, ok := structType.(BACnetLogRecordLogDatumFailure); ok { return casted } if casted, ok := structType.(*BACnetLogRecordLogDatumFailure); ok { @@ -117,6 +120,7 @@ func (m *_BACnetLogRecordLogDatumFailure) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetLogRecordLogDatumFailure) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetLogRecordLogDatumFailureParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("failure"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for failure") } - _failure, _failureErr := ErrorEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(8))) +_failure, _failureErr := ErrorEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(8) ) ) if _failureErr != nil { return nil, errors.Wrap(_failureErr, "Error parsing 'failure' field of BACnetLogRecordLogDatumFailure") } @@ -178,17 +182,17 @@ func (m *_BACnetLogRecordLogDatumFailure) SerializeWithWriteBuffer(ctx context.C return errors.Wrap(pushErr, "Error pushing for BACnetLogRecordLogDatumFailure") } - // Simple Field (failure) - if pushErr := writeBuffer.PushContext("failure"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for failure") - } - _failureErr := writeBuffer.WriteSerializable(ctx, m.GetFailure()) - if popErr := writeBuffer.PopContext("failure"); popErr != nil { - return errors.Wrap(popErr, "Error popping for failure") - } - if _failureErr != nil { - return errors.Wrap(_failureErr, "Error serializing 'failure' field") - } + // Simple Field (failure) + if pushErr := writeBuffer.PushContext("failure"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for failure") + } + _failureErr := writeBuffer.WriteSerializable(ctx, m.GetFailure()) + if popErr := writeBuffer.PopContext("failure"); popErr != nil { + return errors.Wrap(popErr, "Error popping for failure") + } + if _failureErr != nil { + return errors.Wrap(_failureErr, "Error serializing 'failure' field") + } if popErr := writeBuffer.PopContext("BACnetLogRecordLogDatumFailure"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetLogRecordLogDatumFailure") @@ -198,6 +202,7 @@ func (m *_BACnetLogRecordLogDatumFailure) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetLogRecordLogDatumFailure) isBACnetLogRecordLogDatumFailure() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetLogRecordLogDatumFailure) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumIntegerValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumIntegerValue.go index 1a396bbf212..00d6c8b04c3 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumIntegerValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumIntegerValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLogRecordLogDatumIntegerValue is the corresponding interface of BACnetLogRecordLogDatumIntegerValue type BACnetLogRecordLogDatumIntegerValue interface { @@ -46,9 +48,11 @@ type BACnetLogRecordLogDatumIntegerValueExactly interface { // _BACnetLogRecordLogDatumIntegerValue is the data-structure of this message type _BACnetLogRecordLogDatumIntegerValue struct { *_BACnetLogRecordLogDatum - IntegerValue BACnetContextTagSignedInteger + IntegerValue BACnetContextTagSignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,16 +63,14 @@ type _BACnetLogRecordLogDatumIntegerValue struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetLogRecordLogDatumIntegerValue) InitializeParent(parent BACnetLogRecordLogDatum, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetLogRecordLogDatumIntegerValue) InitializeParent(parent BACnetLogRecordLogDatum , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetLogRecordLogDatumIntegerValue) GetParent() BACnetLogRecordLogDatum { +func (m *_BACnetLogRecordLogDatumIntegerValue) GetParent() BACnetLogRecordLogDatum { return m._BACnetLogRecordLogDatum } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetLogRecordLogDatumIntegerValue) GetIntegerValue() BACnetContextTa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLogRecordLogDatumIntegerValue factory function for _BACnetLogRecordLogDatumIntegerValue -func NewBACnetLogRecordLogDatumIntegerValue(integerValue BACnetContextTagSignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetLogRecordLogDatumIntegerValue { +func NewBACnetLogRecordLogDatumIntegerValue( integerValue BACnetContextTagSignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetLogRecordLogDatumIntegerValue { _result := &_BACnetLogRecordLogDatumIntegerValue{ - IntegerValue: integerValue, - _BACnetLogRecordLogDatum: NewBACnetLogRecordLogDatum(openingTag, peekedTagHeader, closingTag, tagNumber), + IntegerValue: integerValue, + _BACnetLogRecordLogDatum: NewBACnetLogRecordLogDatum(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetLogRecordLogDatum._BACnetLogRecordLogDatumChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetLogRecordLogDatumIntegerValue(integerValue BACnetContextTagSignedI // Deprecated: use the interface for direct cast func CastBACnetLogRecordLogDatumIntegerValue(structType interface{}) BACnetLogRecordLogDatumIntegerValue { - if casted, ok := structType.(BACnetLogRecordLogDatumIntegerValue); ok { + if casted, ok := structType.(BACnetLogRecordLogDatumIntegerValue); ok { return casted } if casted, ok := structType.(*BACnetLogRecordLogDatumIntegerValue); ok { @@ -117,6 +120,7 @@ func (m *_BACnetLogRecordLogDatumIntegerValue) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetLogRecordLogDatumIntegerValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetLogRecordLogDatumIntegerValueParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("integerValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for integerValue") } - _integerValue, _integerValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(5)), BACnetDataType(BACnetDataType_SIGNED_INTEGER)) +_integerValue, _integerValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(5) ) , BACnetDataType( BACnetDataType_SIGNED_INTEGER ) ) if _integerValueErr != nil { return nil, errors.Wrap(_integerValueErr, "Error parsing 'integerValue' field of BACnetLogRecordLogDatumIntegerValue") } @@ -178,17 +182,17 @@ func (m *_BACnetLogRecordLogDatumIntegerValue) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetLogRecordLogDatumIntegerValue") } - // Simple Field (integerValue) - if pushErr := writeBuffer.PushContext("integerValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for integerValue") - } - _integerValueErr := writeBuffer.WriteSerializable(ctx, m.GetIntegerValue()) - if popErr := writeBuffer.PopContext("integerValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for integerValue") - } - if _integerValueErr != nil { - return errors.Wrap(_integerValueErr, "Error serializing 'integerValue' field") - } + // Simple Field (integerValue) + if pushErr := writeBuffer.PushContext("integerValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for integerValue") + } + _integerValueErr := writeBuffer.WriteSerializable(ctx, m.GetIntegerValue()) + if popErr := writeBuffer.PopContext("integerValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for integerValue") + } + if _integerValueErr != nil { + return errors.Wrap(_integerValueErr, "Error serializing 'integerValue' field") + } if popErr := writeBuffer.PopContext("BACnetLogRecordLogDatumIntegerValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetLogRecordLogDatumIntegerValue") @@ -198,6 +202,7 @@ func (m *_BACnetLogRecordLogDatumIntegerValue) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetLogRecordLogDatumIntegerValue) isBACnetLogRecordLogDatumIntegerValue() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetLogRecordLogDatumIntegerValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumLogStatus.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumLogStatus.go index 992d62dbfa4..b2fae7d0a41 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumLogStatus.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumLogStatus.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLogRecordLogDatumLogStatus is the corresponding interface of BACnetLogRecordLogDatumLogStatus type BACnetLogRecordLogDatumLogStatus interface { @@ -46,9 +48,11 @@ type BACnetLogRecordLogDatumLogStatusExactly interface { // _BACnetLogRecordLogDatumLogStatus is the data-structure of this message type _BACnetLogRecordLogDatumLogStatus struct { *_BACnetLogRecordLogDatum - LogStatus BACnetLogStatusTagged + LogStatus BACnetLogStatusTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,16 +63,14 @@ type _BACnetLogRecordLogDatumLogStatus struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetLogRecordLogDatumLogStatus) InitializeParent(parent BACnetLogRecordLogDatum, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetLogRecordLogDatumLogStatus) InitializeParent(parent BACnetLogRecordLogDatum , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetLogRecordLogDatumLogStatus) GetParent() BACnetLogRecordLogDatum { +func (m *_BACnetLogRecordLogDatumLogStatus) GetParent() BACnetLogRecordLogDatum { return m._BACnetLogRecordLogDatum } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetLogRecordLogDatumLogStatus) GetLogStatus() BACnetLogStatusTagged /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLogRecordLogDatumLogStatus factory function for _BACnetLogRecordLogDatumLogStatus -func NewBACnetLogRecordLogDatumLogStatus(logStatus BACnetLogStatusTagged, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetLogRecordLogDatumLogStatus { +func NewBACnetLogRecordLogDatumLogStatus( logStatus BACnetLogStatusTagged , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetLogRecordLogDatumLogStatus { _result := &_BACnetLogRecordLogDatumLogStatus{ - LogStatus: logStatus, - _BACnetLogRecordLogDatum: NewBACnetLogRecordLogDatum(openingTag, peekedTagHeader, closingTag, tagNumber), + LogStatus: logStatus, + _BACnetLogRecordLogDatum: NewBACnetLogRecordLogDatum(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetLogRecordLogDatum._BACnetLogRecordLogDatumChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetLogRecordLogDatumLogStatus(logStatus BACnetLogStatusTagged, openin // Deprecated: use the interface for direct cast func CastBACnetLogRecordLogDatumLogStatus(structType interface{}) BACnetLogRecordLogDatumLogStatus { - if casted, ok := structType.(BACnetLogRecordLogDatumLogStatus); ok { + if casted, ok := structType.(BACnetLogRecordLogDatumLogStatus); ok { return casted } if casted, ok := structType.(*BACnetLogRecordLogDatumLogStatus); ok { @@ -117,6 +120,7 @@ func (m *_BACnetLogRecordLogDatumLogStatus) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetLogRecordLogDatumLogStatus) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetLogRecordLogDatumLogStatusParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("logStatus"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for logStatus") } - _logStatus, _logStatusErr := BACnetLogStatusTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_logStatus, _logStatusErr := BACnetLogStatusTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _logStatusErr != nil { return nil, errors.Wrap(_logStatusErr, "Error parsing 'logStatus' field of BACnetLogRecordLogDatumLogStatus") } @@ -178,17 +182,17 @@ func (m *_BACnetLogRecordLogDatumLogStatus) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for BACnetLogRecordLogDatumLogStatus") } - // Simple Field (logStatus) - if pushErr := writeBuffer.PushContext("logStatus"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for logStatus") - } - _logStatusErr := writeBuffer.WriteSerializable(ctx, m.GetLogStatus()) - if popErr := writeBuffer.PopContext("logStatus"); popErr != nil { - return errors.Wrap(popErr, "Error popping for logStatus") - } - if _logStatusErr != nil { - return errors.Wrap(_logStatusErr, "Error serializing 'logStatus' field") - } + // Simple Field (logStatus) + if pushErr := writeBuffer.PushContext("logStatus"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for logStatus") + } + _logStatusErr := writeBuffer.WriteSerializable(ctx, m.GetLogStatus()) + if popErr := writeBuffer.PopContext("logStatus"); popErr != nil { + return errors.Wrap(popErr, "Error popping for logStatus") + } + if _logStatusErr != nil { + return errors.Wrap(_logStatusErr, "Error serializing 'logStatus' field") + } if popErr := writeBuffer.PopContext("BACnetLogRecordLogDatumLogStatus"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetLogRecordLogDatumLogStatus") @@ -198,6 +202,7 @@ func (m *_BACnetLogRecordLogDatumLogStatus) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetLogRecordLogDatumLogStatus) isBACnetLogRecordLogDatumLogStatus() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetLogRecordLogDatumLogStatus) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumNullValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumNullValue.go index 470f7aee46c..ae6fc25b052 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumNullValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumNullValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLogRecordLogDatumNullValue is the corresponding interface of BACnetLogRecordLogDatumNullValue type BACnetLogRecordLogDatumNullValue interface { @@ -46,9 +48,11 @@ type BACnetLogRecordLogDatumNullValueExactly interface { // _BACnetLogRecordLogDatumNullValue is the data-structure of this message type _BACnetLogRecordLogDatumNullValue struct { *_BACnetLogRecordLogDatum - NullValue BACnetContextTagNull + NullValue BACnetContextTagNull } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,16 +63,14 @@ type _BACnetLogRecordLogDatumNullValue struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetLogRecordLogDatumNullValue) InitializeParent(parent BACnetLogRecordLogDatum, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetLogRecordLogDatumNullValue) InitializeParent(parent BACnetLogRecordLogDatum , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetLogRecordLogDatumNullValue) GetParent() BACnetLogRecordLogDatum { +func (m *_BACnetLogRecordLogDatumNullValue) GetParent() BACnetLogRecordLogDatum { return m._BACnetLogRecordLogDatum } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetLogRecordLogDatumNullValue) GetNullValue() BACnetContextTagNull /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLogRecordLogDatumNullValue factory function for _BACnetLogRecordLogDatumNullValue -func NewBACnetLogRecordLogDatumNullValue(nullValue BACnetContextTagNull, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetLogRecordLogDatumNullValue { +func NewBACnetLogRecordLogDatumNullValue( nullValue BACnetContextTagNull , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetLogRecordLogDatumNullValue { _result := &_BACnetLogRecordLogDatumNullValue{ - NullValue: nullValue, - _BACnetLogRecordLogDatum: NewBACnetLogRecordLogDatum(openingTag, peekedTagHeader, closingTag, tagNumber), + NullValue: nullValue, + _BACnetLogRecordLogDatum: NewBACnetLogRecordLogDatum(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetLogRecordLogDatum._BACnetLogRecordLogDatumChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetLogRecordLogDatumNullValue(nullValue BACnetContextTagNull, opening // Deprecated: use the interface for direct cast func CastBACnetLogRecordLogDatumNullValue(structType interface{}) BACnetLogRecordLogDatumNullValue { - if casted, ok := structType.(BACnetLogRecordLogDatumNullValue); ok { + if casted, ok := structType.(BACnetLogRecordLogDatumNullValue); ok { return casted } if casted, ok := structType.(*BACnetLogRecordLogDatumNullValue); ok { @@ -117,6 +120,7 @@ func (m *_BACnetLogRecordLogDatumNullValue) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetLogRecordLogDatumNullValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetLogRecordLogDatumNullValueParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("nullValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for nullValue") } - _nullValue, _nullValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(7)), BACnetDataType(BACnetDataType_NULL)) +_nullValue, _nullValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(7) ) , BACnetDataType( BACnetDataType_NULL ) ) if _nullValueErr != nil { return nil, errors.Wrap(_nullValueErr, "Error parsing 'nullValue' field of BACnetLogRecordLogDatumNullValue") } @@ -178,17 +182,17 @@ func (m *_BACnetLogRecordLogDatumNullValue) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for BACnetLogRecordLogDatumNullValue") } - // Simple Field (nullValue) - if pushErr := writeBuffer.PushContext("nullValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for nullValue") - } - _nullValueErr := writeBuffer.WriteSerializable(ctx, m.GetNullValue()) - if popErr := writeBuffer.PopContext("nullValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for nullValue") - } - if _nullValueErr != nil { - return errors.Wrap(_nullValueErr, "Error serializing 'nullValue' field") - } + // Simple Field (nullValue) + if pushErr := writeBuffer.PushContext("nullValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for nullValue") + } + _nullValueErr := writeBuffer.WriteSerializable(ctx, m.GetNullValue()) + if popErr := writeBuffer.PopContext("nullValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for nullValue") + } + if _nullValueErr != nil { + return errors.Wrap(_nullValueErr, "Error serializing 'nullValue' field") + } if popErr := writeBuffer.PopContext("BACnetLogRecordLogDatumNullValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetLogRecordLogDatumNullValue") @@ -198,6 +202,7 @@ func (m *_BACnetLogRecordLogDatumNullValue) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetLogRecordLogDatumNullValue) isBACnetLogRecordLogDatumNullValue() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetLogRecordLogDatumNullValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumRealValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumRealValue.go index a205e94ae55..9ea8463b51f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumRealValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumRealValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLogRecordLogDatumRealValue is the corresponding interface of BACnetLogRecordLogDatumRealValue type BACnetLogRecordLogDatumRealValue interface { @@ -46,9 +48,11 @@ type BACnetLogRecordLogDatumRealValueExactly interface { // _BACnetLogRecordLogDatumRealValue is the data-structure of this message type _BACnetLogRecordLogDatumRealValue struct { *_BACnetLogRecordLogDatum - RealValue BACnetContextTagReal + RealValue BACnetContextTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,16 +63,14 @@ type _BACnetLogRecordLogDatumRealValue struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetLogRecordLogDatumRealValue) InitializeParent(parent BACnetLogRecordLogDatum, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetLogRecordLogDatumRealValue) InitializeParent(parent BACnetLogRecordLogDatum , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetLogRecordLogDatumRealValue) GetParent() BACnetLogRecordLogDatum { +func (m *_BACnetLogRecordLogDatumRealValue) GetParent() BACnetLogRecordLogDatum { return m._BACnetLogRecordLogDatum } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetLogRecordLogDatumRealValue) GetRealValue() BACnetContextTagReal /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLogRecordLogDatumRealValue factory function for _BACnetLogRecordLogDatumRealValue -func NewBACnetLogRecordLogDatumRealValue(realValue BACnetContextTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetLogRecordLogDatumRealValue { +func NewBACnetLogRecordLogDatumRealValue( realValue BACnetContextTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetLogRecordLogDatumRealValue { _result := &_BACnetLogRecordLogDatumRealValue{ - RealValue: realValue, - _BACnetLogRecordLogDatum: NewBACnetLogRecordLogDatum(openingTag, peekedTagHeader, closingTag, tagNumber), + RealValue: realValue, + _BACnetLogRecordLogDatum: NewBACnetLogRecordLogDatum(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetLogRecordLogDatum._BACnetLogRecordLogDatumChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetLogRecordLogDatumRealValue(realValue BACnetContextTagReal, opening // Deprecated: use the interface for direct cast func CastBACnetLogRecordLogDatumRealValue(structType interface{}) BACnetLogRecordLogDatumRealValue { - if casted, ok := structType.(BACnetLogRecordLogDatumRealValue); ok { + if casted, ok := structType.(BACnetLogRecordLogDatumRealValue); ok { return casted } if casted, ok := structType.(*BACnetLogRecordLogDatumRealValue); ok { @@ -117,6 +120,7 @@ func (m *_BACnetLogRecordLogDatumRealValue) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetLogRecordLogDatumRealValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetLogRecordLogDatumRealValueParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("realValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for realValue") } - _realValue, _realValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), BACnetDataType(BACnetDataType_REAL)) +_realValue, _realValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , BACnetDataType( BACnetDataType_REAL ) ) if _realValueErr != nil { return nil, errors.Wrap(_realValueErr, "Error parsing 'realValue' field of BACnetLogRecordLogDatumRealValue") } @@ -178,17 +182,17 @@ func (m *_BACnetLogRecordLogDatumRealValue) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for BACnetLogRecordLogDatumRealValue") } - // Simple Field (realValue) - if pushErr := writeBuffer.PushContext("realValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for realValue") - } - _realValueErr := writeBuffer.WriteSerializable(ctx, m.GetRealValue()) - if popErr := writeBuffer.PopContext("realValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for realValue") - } - if _realValueErr != nil { - return errors.Wrap(_realValueErr, "Error serializing 'realValue' field") - } + // Simple Field (realValue) + if pushErr := writeBuffer.PushContext("realValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for realValue") + } + _realValueErr := writeBuffer.WriteSerializable(ctx, m.GetRealValue()) + if popErr := writeBuffer.PopContext("realValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for realValue") + } + if _realValueErr != nil { + return errors.Wrap(_realValueErr, "Error serializing 'realValue' field") + } if popErr := writeBuffer.PopContext("BACnetLogRecordLogDatumRealValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetLogRecordLogDatumRealValue") @@ -198,6 +202,7 @@ func (m *_BACnetLogRecordLogDatumRealValue) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetLogRecordLogDatumRealValue) isBACnetLogRecordLogDatumRealValue() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetLogRecordLogDatumRealValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumTimeChange.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumTimeChange.go index 8776651d8e0..7c9261d15ef 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumTimeChange.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumTimeChange.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLogRecordLogDatumTimeChange is the corresponding interface of BACnetLogRecordLogDatumTimeChange type BACnetLogRecordLogDatumTimeChange interface { @@ -46,9 +48,11 @@ type BACnetLogRecordLogDatumTimeChangeExactly interface { // _BACnetLogRecordLogDatumTimeChange is the data-structure of this message type _BACnetLogRecordLogDatumTimeChange struct { *_BACnetLogRecordLogDatum - TimeChange BACnetContextTagReal + TimeChange BACnetContextTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,16 +63,14 @@ type _BACnetLogRecordLogDatumTimeChange struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetLogRecordLogDatumTimeChange) InitializeParent(parent BACnetLogRecordLogDatum, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetLogRecordLogDatumTimeChange) InitializeParent(parent BACnetLogRecordLogDatum , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetLogRecordLogDatumTimeChange) GetParent() BACnetLogRecordLogDatum { +func (m *_BACnetLogRecordLogDatumTimeChange) GetParent() BACnetLogRecordLogDatum { return m._BACnetLogRecordLogDatum } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetLogRecordLogDatumTimeChange) GetTimeChange() BACnetContextTagRea /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLogRecordLogDatumTimeChange factory function for _BACnetLogRecordLogDatumTimeChange -func NewBACnetLogRecordLogDatumTimeChange(timeChange BACnetContextTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetLogRecordLogDatumTimeChange { +func NewBACnetLogRecordLogDatumTimeChange( timeChange BACnetContextTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetLogRecordLogDatumTimeChange { _result := &_BACnetLogRecordLogDatumTimeChange{ - TimeChange: timeChange, - _BACnetLogRecordLogDatum: NewBACnetLogRecordLogDatum(openingTag, peekedTagHeader, closingTag, tagNumber), + TimeChange: timeChange, + _BACnetLogRecordLogDatum: NewBACnetLogRecordLogDatum(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetLogRecordLogDatum._BACnetLogRecordLogDatumChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetLogRecordLogDatumTimeChange(timeChange BACnetContextTagReal, openi // Deprecated: use the interface for direct cast func CastBACnetLogRecordLogDatumTimeChange(structType interface{}) BACnetLogRecordLogDatumTimeChange { - if casted, ok := structType.(BACnetLogRecordLogDatumTimeChange); ok { + if casted, ok := structType.(BACnetLogRecordLogDatumTimeChange); ok { return casted } if casted, ok := structType.(*BACnetLogRecordLogDatumTimeChange); ok { @@ -117,6 +120,7 @@ func (m *_BACnetLogRecordLogDatumTimeChange) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetLogRecordLogDatumTimeChange) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetLogRecordLogDatumTimeChangeParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("timeChange"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeChange") } - _timeChange, _timeChangeErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(9)), BACnetDataType(BACnetDataType_REAL)) +_timeChange, _timeChangeErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(9) ) , BACnetDataType( BACnetDataType_REAL ) ) if _timeChangeErr != nil { return nil, errors.Wrap(_timeChangeErr, "Error parsing 'timeChange' field of BACnetLogRecordLogDatumTimeChange") } @@ -178,17 +182,17 @@ func (m *_BACnetLogRecordLogDatumTimeChange) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetLogRecordLogDatumTimeChange") } - // Simple Field (timeChange) - if pushErr := writeBuffer.PushContext("timeChange"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timeChange") - } - _timeChangeErr := writeBuffer.WriteSerializable(ctx, m.GetTimeChange()) - if popErr := writeBuffer.PopContext("timeChange"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timeChange") - } - if _timeChangeErr != nil { - return errors.Wrap(_timeChangeErr, "Error serializing 'timeChange' field") - } + // Simple Field (timeChange) + if pushErr := writeBuffer.PushContext("timeChange"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timeChange") + } + _timeChangeErr := writeBuffer.WriteSerializable(ctx, m.GetTimeChange()) + if popErr := writeBuffer.PopContext("timeChange"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timeChange") + } + if _timeChangeErr != nil { + return errors.Wrap(_timeChangeErr, "Error serializing 'timeChange' field") + } if popErr := writeBuffer.PopContext("BACnetLogRecordLogDatumTimeChange"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetLogRecordLogDatumTimeChange") @@ -198,6 +202,7 @@ func (m *_BACnetLogRecordLogDatumTimeChange) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetLogRecordLogDatumTimeChange) isBACnetLogRecordLogDatumTimeChange() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetLogRecordLogDatumTimeChange) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumUnsignedValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumUnsignedValue.go index 26fde5429a0..b7c5db5ab40 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumUnsignedValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogRecordLogDatumUnsignedValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLogRecordLogDatumUnsignedValue is the corresponding interface of BACnetLogRecordLogDatumUnsignedValue type BACnetLogRecordLogDatumUnsignedValue interface { @@ -46,9 +48,11 @@ type BACnetLogRecordLogDatumUnsignedValueExactly interface { // _BACnetLogRecordLogDatumUnsignedValue is the data-structure of this message type _BACnetLogRecordLogDatumUnsignedValue struct { *_BACnetLogRecordLogDatum - UnsignedValue BACnetContextTagUnsignedInteger + UnsignedValue BACnetContextTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,16 +63,14 @@ type _BACnetLogRecordLogDatumUnsignedValue struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetLogRecordLogDatumUnsignedValue) InitializeParent(parent BACnetLogRecordLogDatum, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetLogRecordLogDatumUnsignedValue) InitializeParent(parent BACnetLogRecordLogDatum , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetLogRecordLogDatumUnsignedValue) GetParent() BACnetLogRecordLogDatum { +func (m *_BACnetLogRecordLogDatumUnsignedValue) GetParent() BACnetLogRecordLogDatum { return m._BACnetLogRecordLogDatum } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetLogRecordLogDatumUnsignedValue) GetUnsignedValue() BACnetContext /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLogRecordLogDatumUnsignedValue factory function for _BACnetLogRecordLogDatumUnsignedValue -func NewBACnetLogRecordLogDatumUnsignedValue(unsignedValue BACnetContextTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetLogRecordLogDatumUnsignedValue { +func NewBACnetLogRecordLogDatumUnsignedValue( unsignedValue BACnetContextTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetLogRecordLogDatumUnsignedValue { _result := &_BACnetLogRecordLogDatumUnsignedValue{ - UnsignedValue: unsignedValue, - _BACnetLogRecordLogDatum: NewBACnetLogRecordLogDatum(openingTag, peekedTagHeader, closingTag, tagNumber), + UnsignedValue: unsignedValue, + _BACnetLogRecordLogDatum: NewBACnetLogRecordLogDatum(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetLogRecordLogDatum._BACnetLogRecordLogDatumChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetLogRecordLogDatumUnsignedValue(unsignedValue BACnetContextTagUnsig // Deprecated: use the interface for direct cast func CastBACnetLogRecordLogDatumUnsignedValue(structType interface{}) BACnetLogRecordLogDatumUnsignedValue { - if casted, ok := structType.(BACnetLogRecordLogDatumUnsignedValue); ok { + if casted, ok := structType.(BACnetLogRecordLogDatumUnsignedValue); ok { return casted } if casted, ok := structType.(*BACnetLogRecordLogDatumUnsignedValue); ok { @@ -117,6 +120,7 @@ func (m *_BACnetLogRecordLogDatumUnsignedValue) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetLogRecordLogDatumUnsignedValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetLogRecordLogDatumUnsignedValueParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("unsignedValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for unsignedValue") } - _unsignedValue, _unsignedValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(4)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_unsignedValue, _unsignedValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(4) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _unsignedValueErr != nil { return nil, errors.Wrap(_unsignedValueErr, "Error parsing 'unsignedValue' field of BACnetLogRecordLogDatumUnsignedValue") } @@ -178,17 +182,17 @@ func (m *_BACnetLogRecordLogDatumUnsignedValue) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetLogRecordLogDatumUnsignedValue") } - // Simple Field (unsignedValue) - if pushErr := writeBuffer.PushContext("unsignedValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for unsignedValue") - } - _unsignedValueErr := writeBuffer.WriteSerializable(ctx, m.GetUnsignedValue()) - if popErr := writeBuffer.PopContext("unsignedValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for unsignedValue") - } - if _unsignedValueErr != nil { - return errors.Wrap(_unsignedValueErr, "Error serializing 'unsignedValue' field") - } + // Simple Field (unsignedValue) + if pushErr := writeBuffer.PushContext("unsignedValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for unsignedValue") + } + _unsignedValueErr := writeBuffer.WriteSerializable(ctx, m.GetUnsignedValue()) + if popErr := writeBuffer.PopContext("unsignedValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for unsignedValue") + } + if _unsignedValueErr != nil { + return errors.Wrap(_unsignedValueErr, "Error serializing 'unsignedValue' field") + } if popErr := writeBuffer.PopContext("BACnetLogRecordLogDatumUnsignedValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetLogRecordLogDatumUnsignedValue") @@ -198,6 +202,7 @@ func (m *_BACnetLogRecordLogDatumUnsignedValue) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetLogRecordLogDatumUnsignedValue) isBACnetLogRecordLogDatumUnsignedValue() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetLogRecordLogDatumUnsignedValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogStatus.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogStatus.go index f5b0e235235..6b167a072c4 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogStatus.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogStatus.go @@ -34,9 +34,9 @@ type IBACnetLogStatus interface { utils.Serializable } -const ( - BACnetLogStatus_LOG_DISABLED BACnetLogStatus = 0 - BACnetLogStatus_BUFFER_PURGED BACnetLogStatus = 1 +const( + BACnetLogStatus_LOG_DISABLED BACnetLogStatus = 0 + BACnetLogStatus_BUFFER_PURGED BACnetLogStatus = 1 BACnetLogStatus_LOG_INTERRUPTED BACnetLogStatus = 2 ) @@ -44,7 +44,7 @@ var BACnetLogStatusValues []BACnetLogStatus func init() { _ = errors.New - BACnetLogStatusValues = []BACnetLogStatus{ + BACnetLogStatusValues = []BACnetLogStatus { BACnetLogStatus_LOG_DISABLED, BACnetLogStatus_BUFFER_PURGED, BACnetLogStatus_LOG_INTERRUPTED, @@ -53,12 +53,12 @@ func init() { func BACnetLogStatusByValue(value uint8) (enum BACnetLogStatus, ok bool) { switch value { - case 0: - return BACnetLogStatus_LOG_DISABLED, true - case 1: - return BACnetLogStatus_BUFFER_PURGED, true - case 2: - return BACnetLogStatus_LOG_INTERRUPTED, true + case 0: + return BACnetLogStatus_LOG_DISABLED, true + case 1: + return BACnetLogStatus_BUFFER_PURGED, true + case 2: + return BACnetLogStatus_LOG_INTERRUPTED, true } return 0, false } @@ -75,13 +75,13 @@ func BACnetLogStatusByName(value string) (enum BACnetLogStatus, ok bool) { return 0, false } -func BACnetLogStatusKnows(value uint8) bool { +func BACnetLogStatusKnows(value uint8) bool { for _, typeValue := range BACnetLogStatusValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetLogStatus(structType interface{}) BACnetLogStatus { @@ -147,3 +147,4 @@ func (e BACnetLogStatus) PLC4XEnumName() string { func (e BACnetLogStatus) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogStatusTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogStatusTagged.go index 725caeff8ef..3e0deb319d7 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogStatusTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogStatusTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLogStatusTagged is the corresponding interface of BACnetLogStatusTagged type BACnetLogStatusTagged interface { @@ -52,14 +54,15 @@ type BACnetLogStatusTaggedExactly interface { // _BACnetLogStatusTagged is the data-structure of this message type _BACnetLogStatusTagged struct { - Header BACnetTagHeader - Payload BACnetTagPayloadBitString + Header BACnetTagHeader + Payload BACnetTagPayloadBitString // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -85,19 +88,19 @@ func (m *_BACnetLogStatusTagged) GetPayload() BACnetTagPayloadBitString { func (m *_BACnetLogStatusTagged) GetLogDisabled() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (0))), func() interface{} { return bool(m.GetPayload().GetData()[0]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((0)))), func() interface{} {return bool(m.GetPayload().GetData()[0])}, func() interface{} {return bool(bool(false))}).(bool)) } func (m *_BACnetLogStatusTagged) GetBufferPurged() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (1))), func() interface{} { return bool(m.GetPayload().GetData()[1]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((1)))), func() interface{} {return bool(m.GetPayload().GetData()[1])}, func() interface{} {return bool(bool(false))}).(bool)) } func (m *_BACnetLogStatusTagged) GetLogInterrupted() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (2))), func() interface{} { return bool(m.GetPayload().GetData()[2]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((2)))), func() interface{} {return bool(m.GetPayload().GetData()[2])}, func() interface{} {return bool(bool(false))}).(bool)) } /////////////////////// @@ -105,14 +108,15 @@ func (m *_BACnetLogStatusTagged) GetLogInterrupted() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLogStatusTagged factory function for _BACnetLogStatusTagged -func NewBACnetLogStatusTagged(header BACnetTagHeader, payload BACnetTagPayloadBitString, tagNumber uint8, tagClass TagClass) *_BACnetLogStatusTagged { - return &_BACnetLogStatusTagged{Header: header, Payload: payload, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetLogStatusTagged( header BACnetTagHeader , payload BACnetTagPayloadBitString , tagNumber uint8 , tagClass TagClass ) *_BACnetLogStatusTagged { +return &_BACnetLogStatusTagged{ Header: header , Payload: payload , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetLogStatusTagged(structType interface{}) BACnetLogStatusTagged { - if casted, ok := structType.(BACnetLogStatusTagged); ok { + if casted, ok := structType.(BACnetLogStatusTagged); ok { return casted } if casted, ok := structType.(*BACnetLogStatusTagged); ok { @@ -143,6 +147,7 @@ func (m *_BACnetLogStatusTagged) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetLogStatusTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -164,7 +169,7 @@ func BACnetLogStatusTaggedParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetLogStatusTagged") } @@ -174,12 +179,12 @@ func BACnetLogStatusTaggedParseWithBuffer(ctx context.Context, readBuffer utils. } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -187,7 +192,7 @@ func BACnetLogStatusTaggedParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("payload"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for payload") } - _payload, _payloadErr := BACnetTagPayloadBitStringParseWithBuffer(ctx, readBuffer, uint32(header.GetActualLength())) +_payload, _payloadErr := BACnetTagPayloadBitStringParseWithBuffer(ctx, readBuffer , uint32( header.GetActualLength() ) ) if _payloadErr != nil { return nil, errors.Wrap(_payloadErr, "Error parsing 'payload' field of BACnetLogStatusTagged") } @@ -197,17 +202,17 @@ func BACnetLogStatusTaggedParseWithBuffer(ctx context.Context, readBuffer utils. } // Virtual field - _logDisabled := utils.InlineIf((bool((len(payload.GetData())) > (0))), func() interface{} { return bool(payload.GetData()[0]) }, func() interface{} { return bool(bool(false)) }).(bool) + _logDisabled := utils.InlineIf((bool(((len(payload.GetData()))) > ((0)))), func() interface{} {return bool(payload.GetData()[0])}, func() interface{} {return bool(bool(false))}).(bool) logDisabled := bool(_logDisabled) _ = logDisabled // Virtual field - _bufferPurged := utils.InlineIf((bool((len(payload.GetData())) > (1))), func() interface{} { return bool(payload.GetData()[1]) }, func() interface{} { return bool(bool(false)) }).(bool) + _bufferPurged := utils.InlineIf((bool(((len(payload.GetData()))) > ((1)))), func() interface{} {return bool(payload.GetData()[1])}, func() interface{} {return bool(bool(false))}).(bool) bufferPurged := bool(_bufferPurged) _ = bufferPurged // Virtual field - _logInterrupted := utils.InlineIf((bool((len(payload.GetData())) > (2))), func() interface{} { return bool(payload.GetData()[2]) }, func() interface{} { return bool(bool(false)) }).(bool) + _logInterrupted := utils.InlineIf((bool(((len(payload.GetData()))) > ((2)))), func() interface{} {return bool(payload.GetData()[2])}, func() interface{} {return bool(bool(false))}).(bool) logInterrupted := bool(_logInterrupted) _ = logInterrupted @@ -217,11 +222,11 @@ func BACnetLogStatusTaggedParseWithBuffer(ctx context.Context, readBuffer utils. // Create the instance return &_BACnetLogStatusTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Payload: payload, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Payload: payload, + }, nil } func (m *_BACnetLogStatusTagged) Serialize() ([]byte, error) { @@ -235,7 +240,7 @@ func (m *_BACnetLogStatusTagged) Serialize() ([]byte, error) { func (m *_BACnetLogStatusTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetLogStatusTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetLogStatusTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetLogStatusTagged") } @@ -281,6 +286,7 @@ func (m *_BACnetLogStatusTagged) SerializeWithWriteBuffer(ctx context.Context, w return nil } + //// // Arguments Getter @@ -290,7 +296,6 @@ func (m *_BACnetLogStatusTagged) GetTagNumber() uint8 { func (m *_BACnetLogStatusTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -308,3 +313,6 @@ func (m *_BACnetLogStatusTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLoggingType.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLoggingType.go index daf54a7dafa..9afdd676786 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLoggingType.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLoggingType.go @@ -34,18 +34,18 @@ type IBACnetLoggingType interface { utils.Serializable } -const ( - BACnetLoggingType_POLLED BACnetLoggingType = 0 - BACnetLoggingType_COV BACnetLoggingType = 1 - BACnetLoggingType_TRIGGERED BACnetLoggingType = 2 - BACnetLoggingType_VENDOR_PROPRIETARY_VALUE BACnetLoggingType = 0xFF +const( + BACnetLoggingType_POLLED BACnetLoggingType = 0 + BACnetLoggingType_COV BACnetLoggingType = 1 + BACnetLoggingType_TRIGGERED BACnetLoggingType = 2 + BACnetLoggingType_VENDOR_PROPRIETARY_VALUE BACnetLoggingType = 0XFF ) var BACnetLoggingTypeValues []BACnetLoggingType func init() { _ = errors.New - BACnetLoggingTypeValues = []BACnetLoggingType{ + BACnetLoggingTypeValues = []BACnetLoggingType { BACnetLoggingType_POLLED, BACnetLoggingType_COV, BACnetLoggingType_TRIGGERED, @@ -55,14 +55,14 @@ func init() { func BACnetLoggingTypeByValue(value uint8) (enum BACnetLoggingType, ok bool) { switch value { - case 0: - return BACnetLoggingType_POLLED, true - case 0xFF: - return BACnetLoggingType_VENDOR_PROPRIETARY_VALUE, true - case 1: - return BACnetLoggingType_COV, true - case 2: - return BACnetLoggingType_TRIGGERED, true + case 0: + return BACnetLoggingType_POLLED, true + case 0XFF: + return BACnetLoggingType_VENDOR_PROPRIETARY_VALUE, true + case 1: + return BACnetLoggingType_COV, true + case 2: + return BACnetLoggingType_TRIGGERED, true } return 0, false } @@ -81,13 +81,13 @@ func BACnetLoggingTypeByName(value string) (enum BACnetLoggingType, ok bool) { return 0, false } -func BACnetLoggingTypeKnows(value uint8) bool { +func BACnetLoggingTypeKnows(value uint8) bool { for _, typeValue := range BACnetLoggingTypeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetLoggingType(structType interface{}) BACnetLoggingType { @@ -155,3 +155,4 @@ func (e BACnetLoggingType) PLC4XEnumName() string { func (e BACnetLoggingType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLoggingTypeTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLoggingTypeTagged.go index 8982386826b..06505ebcc1c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetLoggingTypeTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLoggingTypeTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetLoggingTypeTagged is the corresponding interface of BACnetLoggingTypeTagged type BACnetLoggingTypeTagged interface { @@ -50,15 +52,16 @@ type BACnetLoggingTypeTaggedExactly interface { // _BACnetLoggingTypeTagged is the data-structure of this message type _BACnetLoggingTypeTagged struct { - Header BACnetTagHeader - Value BACnetLoggingType - ProprietaryValue uint32 + Header BACnetTagHeader + Value BACnetLoggingType + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_BACnetLoggingTypeTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetLoggingTypeTagged factory function for _BACnetLoggingTypeTagged -func NewBACnetLoggingTypeTagged(header BACnetTagHeader, value BACnetLoggingType, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_BACnetLoggingTypeTagged { - return &_BACnetLoggingTypeTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetLoggingTypeTagged( header BACnetTagHeader , value BACnetLoggingType , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_BACnetLoggingTypeTagged { +return &_BACnetLoggingTypeTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetLoggingTypeTagged(structType interface{}) BACnetLoggingTypeTagged { - if casted, ok := structType.(BACnetLoggingTypeTagged); ok { + if casted, ok := structType.(BACnetLoggingTypeTagged); ok { return casted } if casted, ok := structType.(*BACnetLoggingTypeTagged); ok { @@ -123,16 +127,17 @@ func (m *_BACnetLoggingTypeTagged) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetLoggingTypeTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetLoggingTypeTaggedParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetLoggingTypeTagged") } @@ -164,12 +169,12 @@ func BACnetLoggingTypeTaggedParseWithBuffer(ctx context.Context, readBuffer util } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func BACnetLoggingTypeTaggedParseWithBuffer(ctx context.Context, readBuffer util } var value BACnetLoggingType if _value != nil { - value = _value.(BACnetLoggingType) + value = _value.(BACnetLoggingType) } // Virtual field @@ -195,7 +200,7 @@ func BACnetLoggingTypeTaggedParseWithBuffer(ctx context.Context, readBuffer util } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetLoggingTypeTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func BACnetLoggingTypeTaggedParseWithBuffer(ctx context.Context, readBuffer util // Create the instance return &_BACnetLoggingTypeTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetLoggingTypeTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_BACnetLoggingTypeTagged) Serialize() ([]byte, error) { func (m *_BACnetLoggingTypeTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetLoggingTypeTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetLoggingTypeTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetLoggingTypeTagged") } @@ -261,6 +266,7 @@ func (m *_BACnetLoggingTypeTagged) SerializeWithWriteBuffer(ctx context.Context, return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_BACnetLoggingTypeTagged) GetTagNumber() uint8 { func (m *_BACnetLoggingTypeTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_BACnetLoggingTypeTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetMaintenance.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetMaintenance.go index d29105bb60a..98fd8d2816b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetMaintenance.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetMaintenance.go @@ -34,19 +34,19 @@ type IBACnetMaintenance interface { utils.Serializable } -const ( - BACnetMaintenance_NONE BACnetMaintenance = 0 - BACnetMaintenance_PERIODIC_TEST BACnetMaintenance = 1 +const( + BACnetMaintenance_NONE BACnetMaintenance = 0 + BACnetMaintenance_PERIODIC_TEST BACnetMaintenance = 1 BACnetMaintenance_NEED_SERVICE_OPERATIONAL BACnetMaintenance = 2 BACnetMaintenance_NEED_SERVICE_INOPERATIVE BACnetMaintenance = 3 - BACnetMaintenance_VENDOR_PROPRIETARY_VALUE BACnetMaintenance = 0xFF + BACnetMaintenance_VENDOR_PROPRIETARY_VALUE BACnetMaintenance = 0XFF ) var BACnetMaintenanceValues []BACnetMaintenance func init() { _ = errors.New - BACnetMaintenanceValues = []BACnetMaintenance{ + BACnetMaintenanceValues = []BACnetMaintenance { BACnetMaintenance_NONE, BACnetMaintenance_PERIODIC_TEST, BACnetMaintenance_NEED_SERVICE_OPERATIONAL, @@ -57,16 +57,16 @@ func init() { func BACnetMaintenanceByValue(value uint8) (enum BACnetMaintenance, ok bool) { switch value { - case 0: - return BACnetMaintenance_NONE, true - case 0xFF: - return BACnetMaintenance_VENDOR_PROPRIETARY_VALUE, true - case 1: - return BACnetMaintenance_PERIODIC_TEST, true - case 2: - return BACnetMaintenance_NEED_SERVICE_OPERATIONAL, true - case 3: - return BACnetMaintenance_NEED_SERVICE_INOPERATIVE, true + case 0: + return BACnetMaintenance_NONE, true + case 0XFF: + return BACnetMaintenance_VENDOR_PROPRIETARY_VALUE, true + case 1: + return BACnetMaintenance_PERIODIC_TEST, true + case 2: + return BACnetMaintenance_NEED_SERVICE_OPERATIONAL, true + case 3: + return BACnetMaintenance_NEED_SERVICE_INOPERATIVE, true } return 0, false } @@ -87,13 +87,13 @@ func BACnetMaintenanceByName(value string) (enum BACnetMaintenance, ok bool) { return 0, false } -func BACnetMaintenanceKnows(value uint8) bool { +func BACnetMaintenanceKnows(value uint8) bool { for _, typeValue := range BACnetMaintenanceValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetMaintenance(structType interface{}) BACnetMaintenance { @@ -163,3 +163,4 @@ func (e BACnetMaintenance) PLC4XEnumName() string { func (e BACnetMaintenance) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetMaintenanceTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetMaintenanceTagged.go index 059a1e02289..1025544f802 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetMaintenanceTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetMaintenanceTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetMaintenanceTagged is the corresponding interface of BACnetMaintenanceTagged type BACnetMaintenanceTagged interface { @@ -50,15 +52,16 @@ type BACnetMaintenanceTaggedExactly interface { // _BACnetMaintenanceTagged is the data-structure of this message type _BACnetMaintenanceTagged struct { - Header BACnetTagHeader - Value BACnetMaintenance - ProprietaryValue uint32 + Header BACnetTagHeader + Value BACnetMaintenance + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_BACnetMaintenanceTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetMaintenanceTagged factory function for _BACnetMaintenanceTagged -func NewBACnetMaintenanceTagged(header BACnetTagHeader, value BACnetMaintenance, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_BACnetMaintenanceTagged { - return &_BACnetMaintenanceTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetMaintenanceTagged( header BACnetTagHeader , value BACnetMaintenance , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_BACnetMaintenanceTagged { +return &_BACnetMaintenanceTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetMaintenanceTagged(structType interface{}) BACnetMaintenanceTagged { - if casted, ok := structType.(BACnetMaintenanceTagged); ok { + if casted, ok := structType.(BACnetMaintenanceTagged); ok { return casted } if casted, ok := structType.(*BACnetMaintenanceTagged); ok { @@ -123,16 +127,17 @@ func (m *_BACnetMaintenanceTagged) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetMaintenanceTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetMaintenanceTaggedParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetMaintenanceTagged") } @@ -164,12 +169,12 @@ func BACnetMaintenanceTaggedParseWithBuffer(ctx context.Context, readBuffer util } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func BACnetMaintenanceTaggedParseWithBuffer(ctx context.Context, readBuffer util } var value BACnetMaintenance if _value != nil { - value = _value.(BACnetMaintenance) + value = _value.(BACnetMaintenance) } // Virtual field @@ -195,7 +200,7 @@ func BACnetMaintenanceTaggedParseWithBuffer(ctx context.Context, readBuffer util } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetMaintenanceTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func BACnetMaintenanceTaggedParseWithBuffer(ctx context.Context, readBuffer util // Create the instance return &_BACnetMaintenanceTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetMaintenanceTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_BACnetMaintenanceTagged) Serialize() ([]byte, error) { func (m *_BACnetMaintenanceTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetMaintenanceTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetMaintenanceTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetMaintenanceTagged") } @@ -261,6 +266,7 @@ func (m *_BACnetMaintenanceTagged) SerializeWithWriteBuffer(ctx context.Context, return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_BACnetMaintenanceTagged) GetTagNumber() uint8 { func (m *_BACnetMaintenanceTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_BACnetMaintenanceTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNameValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNameValue.go index 89260bc23ed..5789b1371c3 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNameValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNameValue.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNameValue is the corresponding interface of BACnetNameValue type BACnetNameValue interface { @@ -47,10 +49,11 @@ type BACnetNameValueExactly interface { // _BACnetNameValue is the data-structure of this message type _BACnetNameValue struct { - Name BACnetContextTagCharacterString - Value BACnetConstructedData + Name BACnetContextTagCharacterString + Value BACnetConstructedData } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -69,14 +72,15 @@ func (m *_BACnetNameValue) GetValue() BACnetConstructedData { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNameValue factory function for _BACnetNameValue -func NewBACnetNameValue(name BACnetContextTagCharacterString, value BACnetConstructedData) *_BACnetNameValue { - return &_BACnetNameValue{Name: name, Value: value} +func NewBACnetNameValue( name BACnetContextTagCharacterString , value BACnetConstructedData ) *_BACnetNameValue { +return &_BACnetNameValue{ Name: name , Value: value } } // Deprecated: use the interface for direct cast func CastBACnetNameValue(structType interface{}) BACnetNameValue { - if casted, ok := structType.(BACnetNameValue); ok { + if casted, ok := structType.(BACnetNameValue); ok { return casted } if casted, ok := structType.(*BACnetNameValue); ok { @@ -103,6 +107,7 @@ func (m *_BACnetNameValue) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetNameValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -124,7 +129,7 @@ func BACnetNameValueParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu if pullErr := readBuffer.PullContext("name"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for name") } - _name, _nameErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_CHARACTER_STRING)) +_name, _nameErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_CHARACTER_STRING ) ) if _nameErr != nil { return nil, errors.Wrap(_nameErr, "Error parsing 'name' field of BACnetNameValue") } @@ -135,12 +140,12 @@ func BACnetNameValueParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu // Optional Field (value) (Can be skipped, if a given expression evaluates to false) var value BACnetConstructedData = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("value"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for value") } - _val, _err := BACnetConstructedDataParseWithBuffer(ctx, readBuffer, uint8(1), BACnetObjectType_VENDOR_PROPRIETARY_VALUE, BACnetPropertyIdentifier_VENDOR_PROPRIETARY_VALUE, nil) +_val, _err := BACnetConstructedDataParseWithBuffer(ctx, readBuffer , uint8(1) , BACnetObjectType_VENDOR_PROPRIETARY_VALUE , BACnetPropertyIdentifier_VENDOR_PROPRIETARY_VALUE , nil ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -161,9 +166,9 @@ func BACnetNameValueParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu // Create the instance return &_BACnetNameValue{ - Name: name, - Value: value, - }, nil + Name: name, + Value: value, + }, nil } func (m *_BACnetNameValue) Serialize() ([]byte, error) { @@ -177,7 +182,7 @@ func (m *_BACnetNameValue) Serialize() ([]byte, error) { func (m *_BACnetNameValue) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetNameValue"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetNameValue"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetNameValue") } @@ -215,6 +220,7 @@ func (m *_BACnetNameValue) SerializeWithWriteBuffer(ctx context.Context, writeBu return nil } + func (m *_BACnetNameValue) isBACnetNameValue() bool { return true } @@ -229,3 +235,6 @@ func (m *_BACnetNameValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNameValueCollection.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNameValueCollection.go index 2028115d3d7..69c81e43256 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNameValueCollection.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNameValueCollection.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNameValueCollection is the corresponding interface of BACnetNameValueCollection type BACnetNameValueCollection interface { @@ -49,14 +51,15 @@ type BACnetNameValueCollectionExactly interface { // _BACnetNameValueCollection is the data-structure of this message type _BACnetNameValueCollection struct { - OpeningTag BACnetOpeningTag - Members []BACnetNameValue - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + Members []BACnetNameValue + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -79,14 +82,15 @@ func (m *_BACnetNameValueCollection) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNameValueCollection factory function for _BACnetNameValueCollection -func NewBACnetNameValueCollection(openingTag BACnetOpeningTag, members []BACnetNameValue, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetNameValueCollection { - return &_BACnetNameValueCollection{OpeningTag: openingTag, Members: members, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetNameValueCollection( openingTag BACnetOpeningTag , members []BACnetNameValue , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetNameValueCollection { +return &_BACnetNameValueCollection{ OpeningTag: openingTag , Members: members , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetNameValueCollection(structType interface{}) BACnetNameValueCollection { - if casted, ok := structType.(BACnetNameValueCollection); ok { + if casted, ok := structType.(BACnetNameValueCollection); ok { return casted } if casted, ok := structType.(*BACnetNameValueCollection); ok { @@ -118,6 +122,7 @@ func (m *_BACnetNameValueCollection) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_BACnetNameValueCollection) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +144,7 @@ func BACnetNameValueCollectionParseWithBuffer(ctx context.Context, readBuffer ut if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetNameValueCollection") } @@ -155,8 +160,8 @@ func BACnetNameValueCollectionParseWithBuffer(ctx context.Context, readBuffer ut // Terminated array var members []BACnetNameValue { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetNameValueParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetNameValueParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'members' field of BACnetNameValueCollection") } @@ -171,7 +176,7 @@ func BACnetNameValueCollectionParseWithBuffer(ctx context.Context, readBuffer ut if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetNameValueCollection") } @@ -186,11 +191,11 @@ func BACnetNameValueCollectionParseWithBuffer(ctx context.Context, readBuffer ut // Create the instance return &_BACnetNameValueCollection{ - TagNumber: tagNumber, - OpeningTag: openingTag, - Members: members, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + Members: members, + ClosingTag: closingTag, + }, nil } func (m *_BACnetNameValueCollection) Serialize() ([]byte, error) { @@ -204,7 +209,7 @@ func (m *_BACnetNameValueCollection) Serialize() ([]byte, error) { func (m *_BACnetNameValueCollection) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetNameValueCollection"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetNameValueCollection"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetNameValueCollection") } @@ -255,13 +260,13 @@ func (m *_BACnetNameValueCollection) SerializeWithWriteBuffer(ctx context.Contex return nil } + //// // Arguments Getter func (m *_BACnetNameValueCollection) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -279,3 +284,6 @@ func (m *_BACnetNameValueCollection) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNetworkNumberQuality.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNetworkNumberQuality.go index 084e3910e8a..0aa7b15ce7e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNetworkNumberQuality.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNetworkNumberQuality.go @@ -34,18 +34,18 @@ type IBACnetNetworkNumberQuality interface { utils.Serializable } -const ( - BACnetNetworkNumberQuality_UNKNOWN BACnetNetworkNumberQuality = 0 - BACnetNetworkNumberQuality_LEARNED BACnetNetworkNumberQuality = 1 +const( + BACnetNetworkNumberQuality_UNKNOWN BACnetNetworkNumberQuality = 0 + BACnetNetworkNumberQuality_LEARNED BACnetNetworkNumberQuality = 1 BACnetNetworkNumberQuality_LEARNED_CONFIGURED BACnetNetworkNumberQuality = 2 - BACnetNetworkNumberQuality_CONFIGURED BACnetNetworkNumberQuality = 3 + BACnetNetworkNumberQuality_CONFIGURED BACnetNetworkNumberQuality = 3 ) var BACnetNetworkNumberQualityValues []BACnetNetworkNumberQuality func init() { _ = errors.New - BACnetNetworkNumberQualityValues = []BACnetNetworkNumberQuality{ + BACnetNetworkNumberQualityValues = []BACnetNetworkNumberQuality { BACnetNetworkNumberQuality_UNKNOWN, BACnetNetworkNumberQuality_LEARNED, BACnetNetworkNumberQuality_LEARNED_CONFIGURED, @@ -55,14 +55,14 @@ func init() { func BACnetNetworkNumberQualityByValue(value uint8) (enum BACnetNetworkNumberQuality, ok bool) { switch value { - case 0: - return BACnetNetworkNumberQuality_UNKNOWN, true - case 1: - return BACnetNetworkNumberQuality_LEARNED, true - case 2: - return BACnetNetworkNumberQuality_LEARNED_CONFIGURED, true - case 3: - return BACnetNetworkNumberQuality_CONFIGURED, true + case 0: + return BACnetNetworkNumberQuality_UNKNOWN, true + case 1: + return BACnetNetworkNumberQuality_LEARNED, true + case 2: + return BACnetNetworkNumberQuality_LEARNED_CONFIGURED, true + case 3: + return BACnetNetworkNumberQuality_CONFIGURED, true } return 0, false } @@ -81,13 +81,13 @@ func BACnetNetworkNumberQualityByName(value string) (enum BACnetNetworkNumberQua return 0, false } -func BACnetNetworkNumberQualityKnows(value uint8) bool { +func BACnetNetworkNumberQualityKnows(value uint8) bool { for _, typeValue := range BACnetNetworkNumberQualityValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetNetworkNumberQuality(structType interface{}) BACnetNetworkNumberQuality { @@ -155,3 +155,4 @@ func (e BACnetNetworkNumberQuality) PLC4XEnumName() string { func (e BACnetNetworkNumberQuality) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNetworkNumberQualityTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNetworkNumberQualityTagged.go index 53168a5c6a6..ebc84f4cc93 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNetworkNumberQualityTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNetworkNumberQualityTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNetworkNumberQualityTagged is the corresponding interface of BACnetNetworkNumberQualityTagged type BACnetNetworkNumberQualityTagged interface { @@ -46,14 +48,15 @@ type BACnetNetworkNumberQualityTaggedExactly interface { // _BACnetNetworkNumberQualityTagged is the data-structure of this message type _BACnetNetworkNumberQualityTagged struct { - Header BACnetTagHeader - Value BACnetNetworkNumberQuality + Header BACnetTagHeader + Value BACnetNetworkNumberQuality // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_BACnetNetworkNumberQualityTagged) GetValue() BACnetNetworkNumberQualit /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNetworkNumberQualityTagged factory function for _BACnetNetworkNumberQualityTagged -func NewBACnetNetworkNumberQualityTagged(header BACnetTagHeader, value BACnetNetworkNumberQuality, tagNumber uint8, tagClass TagClass) *_BACnetNetworkNumberQualityTagged { - return &_BACnetNetworkNumberQualityTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetNetworkNumberQualityTagged( header BACnetTagHeader , value BACnetNetworkNumberQuality , tagNumber uint8 , tagClass TagClass ) *_BACnetNetworkNumberQualityTagged { +return &_BACnetNetworkNumberQualityTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetNetworkNumberQualityTagged(structType interface{}) BACnetNetworkNumberQualityTagged { - if casted, ok := structType.(BACnetNetworkNumberQualityTagged); ok { + if casted, ok := structType.(BACnetNetworkNumberQualityTagged); ok { return casted } if casted, ok := structType.(*BACnetNetworkNumberQualityTagged); ok { @@ -104,6 +108,7 @@ func (m *_BACnetNetworkNumberQualityTagged) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetNetworkNumberQualityTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func BACnetNetworkNumberQualityTaggedParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetNetworkNumberQualityTagged") } @@ -135,12 +140,12 @@ func BACnetNetworkNumberQualityTaggedParseWithBuffer(ctx context.Context, readBu } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func BACnetNetworkNumberQualityTaggedParseWithBuffer(ctx context.Context, readBu } var value BACnetNetworkNumberQuality if _value != nil { - value = _value.(BACnetNetworkNumberQuality) + value = _value.(BACnetNetworkNumberQuality) } if closeErr := readBuffer.CloseContext("BACnetNetworkNumberQualityTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func BACnetNetworkNumberQualityTaggedParseWithBuffer(ctx context.Context, readBu // Create the instance return &_BACnetNetworkNumberQualityTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_BACnetNetworkNumberQualityTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_BACnetNetworkNumberQualityTagged) Serialize() ([]byte, error) { func (m *_BACnetNetworkNumberQualityTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetNetworkNumberQualityTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetNetworkNumberQualityTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetNetworkNumberQualityTagged") } @@ -206,6 +211,7 @@ func (m *_BACnetNetworkNumberQualityTagged) SerializeWithWriteBuffer(ctx context return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_BACnetNetworkNumberQualityTagged) GetTagNumber() uint8 { func (m *_BACnetNetworkNumberQualityTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_BACnetNetworkNumberQualityTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNetworkPortCommand.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNetworkPortCommand.go index 20e2028b5d2..019837da07a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNetworkPortCommand.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNetworkPortCommand.go @@ -34,23 +34,23 @@ type IBACnetNetworkPortCommand interface { utils.Serializable } -const ( - BACnetNetworkPortCommand_IDLE BACnetNetworkPortCommand = 0 - BACnetNetworkPortCommand_DISCARD_CHANGES BACnetNetworkPortCommand = 1 - BACnetNetworkPortCommand_RENEW_FD_REGISTRATION BACnetNetworkPortCommand = 2 - BACnetNetworkPortCommand_RESTART_SLAVE_DISCOVERY BACnetNetworkPortCommand = 3 - BACnetNetworkPortCommand_RENEW_DHCP BACnetNetworkPortCommand = 4 - BACnetNetworkPortCommand_RESTART_AUTONEGOTIATION BACnetNetworkPortCommand = 5 - BACnetNetworkPortCommand_DISCONNECT BACnetNetworkPortCommand = 6 - BACnetNetworkPortCommand_RESTART_PORT BACnetNetworkPortCommand = 7 - BACnetNetworkPortCommand_VENDOR_PROPRIETARY_VALUE BACnetNetworkPortCommand = 0xFF +const( + BACnetNetworkPortCommand_IDLE BACnetNetworkPortCommand = 0 + BACnetNetworkPortCommand_DISCARD_CHANGES BACnetNetworkPortCommand = 1 + BACnetNetworkPortCommand_RENEW_FD_REGISTRATION BACnetNetworkPortCommand = 2 + BACnetNetworkPortCommand_RESTART_SLAVE_DISCOVERY BACnetNetworkPortCommand = 3 + BACnetNetworkPortCommand_RENEW_DHCP BACnetNetworkPortCommand = 4 + BACnetNetworkPortCommand_RESTART_AUTONEGOTIATION BACnetNetworkPortCommand = 5 + BACnetNetworkPortCommand_DISCONNECT BACnetNetworkPortCommand = 6 + BACnetNetworkPortCommand_RESTART_PORT BACnetNetworkPortCommand = 7 + BACnetNetworkPortCommand_VENDOR_PROPRIETARY_VALUE BACnetNetworkPortCommand = 0XFF ) var BACnetNetworkPortCommandValues []BACnetNetworkPortCommand func init() { _ = errors.New - BACnetNetworkPortCommandValues = []BACnetNetworkPortCommand{ + BACnetNetworkPortCommandValues = []BACnetNetworkPortCommand { BACnetNetworkPortCommand_IDLE, BACnetNetworkPortCommand_DISCARD_CHANGES, BACnetNetworkPortCommand_RENEW_FD_REGISTRATION, @@ -65,24 +65,24 @@ func init() { func BACnetNetworkPortCommandByValue(value uint8) (enum BACnetNetworkPortCommand, ok bool) { switch value { - case 0: - return BACnetNetworkPortCommand_IDLE, true - case 0xFF: - return BACnetNetworkPortCommand_VENDOR_PROPRIETARY_VALUE, true - case 1: - return BACnetNetworkPortCommand_DISCARD_CHANGES, true - case 2: - return BACnetNetworkPortCommand_RENEW_FD_REGISTRATION, true - case 3: - return BACnetNetworkPortCommand_RESTART_SLAVE_DISCOVERY, true - case 4: - return BACnetNetworkPortCommand_RENEW_DHCP, true - case 5: - return BACnetNetworkPortCommand_RESTART_AUTONEGOTIATION, true - case 6: - return BACnetNetworkPortCommand_DISCONNECT, true - case 7: - return BACnetNetworkPortCommand_RESTART_PORT, true + case 0: + return BACnetNetworkPortCommand_IDLE, true + case 0XFF: + return BACnetNetworkPortCommand_VENDOR_PROPRIETARY_VALUE, true + case 1: + return BACnetNetworkPortCommand_DISCARD_CHANGES, true + case 2: + return BACnetNetworkPortCommand_RENEW_FD_REGISTRATION, true + case 3: + return BACnetNetworkPortCommand_RESTART_SLAVE_DISCOVERY, true + case 4: + return BACnetNetworkPortCommand_RENEW_DHCP, true + case 5: + return BACnetNetworkPortCommand_RESTART_AUTONEGOTIATION, true + case 6: + return BACnetNetworkPortCommand_DISCONNECT, true + case 7: + return BACnetNetworkPortCommand_RESTART_PORT, true } return 0, false } @@ -111,13 +111,13 @@ func BACnetNetworkPortCommandByName(value string) (enum BACnetNetworkPortCommand return 0, false } -func BACnetNetworkPortCommandKnows(value uint8) bool { +func BACnetNetworkPortCommandKnows(value uint8) bool { for _, typeValue := range BACnetNetworkPortCommandValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetNetworkPortCommand(structType interface{}) BACnetNetworkPortCommand { @@ -195,3 +195,4 @@ func (e BACnetNetworkPortCommand) PLC4XEnumName() string { func (e BACnetNetworkPortCommand) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNetworkPortCommandTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNetworkPortCommandTagged.go index 7c97aaefd57..1388cd54e8d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNetworkPortCommandTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNetworkPortCommandTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNetworkPortCommandTagged is the corresponding interface of BACnetNetworkPortCommandTagged type BACnetNetworkPortCommandTagged interface { @@ -50,15 +52,16 @@ type BACnetNetworkPortCommandTaggedExactly interface { // _BACnetNetworkPortCommandTagged is the data-structure of this message type _BACnetNetworkPortCommandTagged struct { - Header BACnetTagHeader - Value BACnetNetworkPortCommand - ProprietaryValue uint32 + Header BACnetTagHeader + Value BACnetNetworkPortCommand + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_BACnetNetworkPortCommandTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNetworkPortCommandTagged factory function for _BACnetNetworkPortCommandTagged -func NewBACnetNetworkPortCommandTagged(header BACnetTagHeader, value BACnetNetworkPortCommand, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_BACnetNetworkPortCommandTagged { - return &_BACnetNetworkPortCommandTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetNetworkPortCommandTagged( header BACnetTagHeader , value BACnetNetworkPortCommand , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_BACnetNetworkPortCommandTagged { +return &_BACnetNetworkPortCommandTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetNetworkPortCommandTagged(structType interface{}) BACnetNetworkPortCommandTagged { - if casted, ok := structType.(BACnetNetworkPortCommandTagged); ok { + if casted, ok := structType.(BACnetNetworkPortCommandTagged); ok { return casted } if casted, ok := structType.(*BACnetNetworkPortCommandTagged); ok { @@ -123,16 +127,17 @@ func (m *_BACnetNetworkPortCommandTagged) GetLengthInBits(ctx context.Context) u lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetNetworkPortCommandTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetNetworkPortCommandTaggedParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetNetworkPortCommandTagged") } @@ -164,12 +169,12 @@ func BACnetNetworkPortCommandTaggedParseWithBuffer(ctx context.Context, readBuff } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func BACnetNetworkPortCommandTaggedParseWithBuffer(ctx context.Context, readBuff } var value BACnetNetworkPortCommand if _value != nil { - value = _value.(BACnetNetworkPortCommand) + value = _value.(BACnetNetworkPortCommand) } // Virtual field @@ -195,7 +200,7 @@ func BACnetNetworkPortCommandTaggedParseWithBuffer(ctx context.Context, readBuff } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetNetworkPortCommandTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func BACnetNetworkPortCommandTaggedParseWithBuffer(ctx context.Context, readBuff // Create the instance return &_BACnetNetworkPortCommandTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetNetworkPortCommandTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_BACnetNetworkPortCommandTagged) Serialize() ([]byte, error) { func (m *_BACnetNetworkPortCommandTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetNetworkPortCommandTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetNetworkPortCommandTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetNetworkPortCommandTagged") } @@ -261,6 +266,7 @@ func (m *_BACnetNetworkPortCommandTagged) SerializeWithWriteBuffer(ctx context.C return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_BACnetNetworkPortCommandTagged) GetTagNumber() uint8 { func (m *_BACnetNetworkPortCommandTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_BACnetNetworkPortCommandTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNetworkSecurityPolicy.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNetworkSecurityPolicy.go index efa0864e62d..cdac28454fd 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNetworkSecurityPolicy.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNetworkSecurityPolicy.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNetworkSecurityPolicy is the corresponding interface of BACnetNetworkSecurityPolicy type BACnetNetworkSecurityPolicy interface { @@ -46,10 +48,11 @@ type BACnetNetworkSecurityPolicyExactly interface { // _BACnetNetworkSecurityPolicy is the data-structure of this message type _BACnetNetworkSecurityPolicy struct { - PortId BACnetContextTagUnsignedInteger - SecurityLevel BACnetSecurityPolicyTagged + PortId BACnetContextTagUnsignedInteger + SecurityLevel BACnetSecurityPolicyTagged } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -68,14 +71,15 @@ func (m *_BACnetNetworkSecurityPolicy) GetSecurityLevel() BACnetSecurityPolicyTa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNetworkSecurityPolicy factory function for _BACnetNetworkSecurityPolicy -func NewBACnetNetworkSecurityPolicy(portId BACnetContextTagUnsignedInteger, securityLevel BACnetSecurityPolicyTagged) *_BACnetNetworkSecurityPolicy { - return &_BACnetNetworkSecurityPolicy{PortId: portId, SecurityLevel: securityLevel} +func NewBACnetNetworkSecurityPolicy( portId BACnetContextTagUnsignedInteger , securityLevel BACnetSecurityPolicyTagged ) *_BACnetNetworkSecurityPolicy { +return &_BACnetNetworkSecurityPolicy{ PortId: portId , SecurityLevel: securityLevel } } // Deprecated: use the interface for direct cast func CastBACnetNetworkSecurityPolicy(structType interface{}) BACnetNetworkSecurityPolicy { - if casted, ok := structType.(BACnetNetworkSecurityPolicy); ok { + if casted, ok := structType.(BACnetNetworkSecurityPolicy); ok { return casted } if casted, ok := structType.(*BACnetNetworkSecurityPolicy); ok { @@ -100,6 +104,7 @@ func (m *_BACnetNetworkSecurityPolicy) GetLengthInBits(ctx context.Context) uint return lengthInBits } + func (m *_BACnetNetworkSecurityPolicy) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -121,7 +126,7 @@ func BACnetNetworkSecurityPolicyParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("portId"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for portId") } - _portId, _portIdErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_portId, _portIdErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _portIdErr != nil { return nil, errors.Wrap(_portIdErr, "Error parsing 'portId' field of BACnetNetworkSecurityPolicy") } @@ -134,7 +139,7 @@ func BACnetNetworkSecurityPolicyParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("securityLevel"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for securityLevel") } - _securityLevel, _securityLevelErr := BACnetSecurityPolicyTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_securityLevel, _securityLevelErr := BACnetSecurityPolicyTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _securityLevelErr != nil { return nil, errors.Wrap(_securityLevelErr, "Error parsing 'securityLevel' field of BACnetNetworkSecurityPolicy") } @@ -149,9 +154,9 @@ func BACnetNetworkSecurityPolicyParseWithBuffer(ctx context.Context, readBuffer // Create the instance return &_BACnetNetworkSecurityPolicy{ - PortId: portId, - SecurityLevel: securityLevel, - }, nil + PortId: portId, + SecurityLevel: securityLevel, + }, nil } func (m *_BACnetNetworkSecurityPolicy) Serialize() ([]byte, error) { @@ -165,7 +170,7 @@ func (m *_BACnetNetworkSecurityPolicy) Serialize() ([]byte, error) { func (m *_BACnetNetworkSecurityPolicy) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetNetworkSecurityPolicy"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetNetworkSecurityPolicy"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetNetworkSecurityPolicy") } @@ -199,6 +204,7 @@ func (m *_BACnetNetworkSecurityPolicy) SerializeWithWriteBuffer(ctx context.Cont return nil } + func (m *_BACnetNetworkSecurityPolicy) isBACnetNetworkSecurityPolicy() bool { return true } @@ -213,3 +219,6 @@ func (m *_BACnetNetworkSecurityPolicy) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNetworkType.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNetworkType.go index 64fdfc95cfe..d26b26e3b68 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNetworkType.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNetworkType.go @@ -34,26 +34,26 @@ type IBACnetNetworkType interface { utils.Serializable } -const ( - BACnetNetworkType_ETHERNET BACnetNetworkType = 0x0 - BACnetNetworkType_ARCNET BACnetNetworkType = 0x1 - BACnetNetworkType_MSTP BACnetNetworkType = 0x2 - BACnetNetworkType_PTP BACnetNetworkType = 0x3 - BACnetNetworkType_LONTALK BACnetNetworkType = 0x4 - BACnetNetworkType_IPV4 BACnetNetworkType = 0x5 - BACnetNetworkType_ZIGBEE BACnetNetworkType = 0x6 - BACnetNetworkType_VIRTUAL BACnetNetworkType = 0x7 - BACnetNetworkType_REMOVED_NON_BACNET BACnetNetworkType = 0x8 - BACnetNetworkType_IPV6 BACnetNetworkType = 0x9 - BACnetNetworkType_SERIAL BACnetNetworkType = 0xA - BACnetNetworkType_VENDOR_PROPRIETARY_VALUE BACnetNetworkType = 0xFF +const( + BACnetNetworkType_ETHERNET BACnetNetworkType = 0x0 + BACnetNetworkType_ARCNET BACnetNetworkType = 0x1 + BACnetNetworkType_MSTP BACnetNetworkType = 0x2 + BACnetNetworkType_PTP BACnetNetworkType = 0x3 + BACnetNetworkType_LONTALK BACnetNetworkType = 0x4 + BACnetNetworkType_IPV4 BACnetNetworkType = 0x5 + BACnetNetworkType_ZIGBEE BACnetNetworkType = 0x6 + BACnetNetworkType_VIRTUAL BACnetNetworkType = 0x7 + BACnetNetworkType_REMOVED_NON_BACNET BACnetNetworkType = 0x8 + BACnetNetworkType_IPV6 BACnetNetworkType = 0x9 + BACnetNetworkType_SERIAL BACnetNetworkType = 0xA + BACnetNetworkType_VENDOR_PROPRIETARY_VALUE BACnetNetworkType = 0XFF ) var BACnetNetworkTypeValues []BACnetNetworkType func init() { _ = errors.New - BACnetNetworkTypeValues = []BACnetNetworkType{ + BACnetNetworkTypeValues = []BACnetNetworkType { BACnetNetworkType_ETHERNET, BACnetNetworkType_ARCNET, BACnetNetworkType_MSTP, @@ -71,30 +71,30 @@ func init() { func BACnetNetworkTypeByValue(value uint8) (enum BACnetNetworkType, ok bool) { switch value { - case 0xFF: - return BACnetNetworkType_VENDOR_PROPRIETARY_VALUE, true - case 0x0: - return BACnetNetworkType_ETHERNET, true - case 0x1: - return BACnetNetworkType_ARCNET, true - case 0x2: - return BACnetNetworkType_MSTP, true - case 0x3: - return BACnetNetworkType_PTP, true - case 0x4: - return BACnetNetworkType_LONTALK, true - case 0x5: - return BACnetNetworkType_IPV4, true - case 0x6: - return BACnetNetworkType_ZIGBEE, true - case 0x7: - return BACnetNetworkType_VIRTUAL, true - case 0x8: - return BACnetNetworkType_REMOVED_NON_BACNET, true - case 0x9: - return BACnetNetworkType_IPV6, true - case 0xA: - return BACnetNetworkType_SERIAL, true + case 0XFF: + return BACnetNetworkType_VENDOR_PROPRIETARY_VALUE, true + case 0x0: + return BACnetNetworkType_ETHERNET, true + case 0x1: + return BACnetNetworkType_ARCNET, true + case 0x2: + return BACnetNetworkType_MSTP, true + case 0x3: + return BACnetNetworkType_PTP, true + case 0x4: + return BACnetNetworkType_LONTALK, true + case 0x5: + return BACnetNetworkType_IPV4, true + case 0x6: + return BACnetNetworkType_ZIGBEE, true + case 0x7: + return BACnetNetworkType_VIRTUAL, true + case 0x8: + return BACnetNetworkType_REMOVED_NON_BACNET, true + case 0x9: + return BACnetNetworkType_IPV6, true + case 0xA: + return BACnetNetworkType_SERIAL, true } return 0, false } @@ -129,13 +129,13 @@ func BACnetNetworkTypeByName(value string) (enum BACnetNetworkType, ok bool) { return 0, false } -func BACnetNetworkTypeKnows(value uint8) bool { +func BACnetNetworkTypeKnows(value uint8) bool { for _, typeValue := range BACnetNetworkTypeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetNetworkType(structType interface{}) BACnetNetworkType { @@ -219,3 +219,4 @@ func (e BACnetNetworkType) PLC4XEnumName() string { func (e BACnetNetworkType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNetworkTypeTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNetworkTypeTagged.go index ad0ebbfe361..161174368c7 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNetworkTypeTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNetworkTypeTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNetworkTypeTagged is the corresponding interface of BACnetNetworkTypeTagged type BACnetNetworkTypeTagged interface { @@ -50,15 +52,16 @@ type BACnetNetworkTypeTaggedExactly interface { // _BACnetNetworkTypeTagged is the data-structure of this message type _BACnetNetworkTypeTagged struct { - Header BACnetTagHeader - Value BACnetNetworkType - ProprietaryValue uint32 + Header BACnetTagHeader + Value BACnetNetworkType + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_BACnetNetworkTypeTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNetworkTypeTagged factory function for _BACnetNetworkTypeTagged -func NewBACnetNetworkTypeTagged(header BACnetTagHeader, value BACnetNetworkType, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_BACnetNetworkTypeTagged { - return &_BACnetNetworkTypeTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetNetworkTypeTagged( header BACnetTagHeader , value BACnetNetworkType , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_BACnetNetworkTypeTagged { +return &_BACnetNetworkTypeTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetNetworkTypeTagged(structType interface{}) BACnetNetworkTypeTagged { - if casted, ok := structType.(BACnetNetworkTypeTagged); ok { + if casted, ok := structType.(BACnetNetworkTypeTagged); ok { return casted } if casted, ok := structType.(*BACnetNetworkTypeTagged); ok { @@ -123,16 +127,17 @@ func (m *_BACnetNetworkTypeTagged) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetNetworkTypeTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetNetworkTypeTaggedParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetNetworkTypeTagged") } @@ -164,12 +169,12 @@ func BACnetNetworkTypeTaggedParseWithBuffer(ctx context.Context, readBuffer util } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func BACnetNetworkTypeTaggedParseWithBuffer(ctx context.Context, readBuffer util } var value BACnetNetworkType if _value != nil { - value = _value.(BACnetNetworkType) + value = _value.(BACnetNetworkType) } // Virtual field @@ -195,7 +200,7 @@ func BACnetNetworkTypeTaggedParseWithBuffer(ctx context.Context, readBuffer util } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetNetworkTypeTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func BACnetNetworkTypeTaggedParseWithBuffer(ctx context.Context, readBuffer util // Create the instance return &_BACnetNetworkTypeTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetNetworkTypeTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_BACnetNetworkTypeTagged) Serialize() ([]byte, error) { func (m *_BACnetNetworkTypeTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetNetworkTypeTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetNetworkTypeTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetNetworkTypeTagged") } @@ -261,6 +266,7 @@ func (m *_BACnetNetworkTypeTagged) SerializeWithWriteBuffer(ctx context.Context, return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_BACnetNetworkTypeTagged) GetTagNumber() uint8 { func (m *_BACnetNetworkTypeTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_BACnetNetworkTypeTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNodeType.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNodeType.go index a5ffea738f6..af860400929 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNodeType.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNodeType.go @@ -34,36 +34,36 @@ type IBACnetNodeType interface { utils.Serializable } -const ( - BACnetNodeType_UNKNOWN BACnetNodeType = 0x00 - BACnetNodeType_SYSTEM BACnetNodeType = 0x01 - BACnetNodeType_NETWORK BACnetNodeType = 0x02 - BACnetNodeType_DEVICE BACnetNodeType = 0x03 +const( + BACnetNodeType_UNKNOWN BACnetNodeType = 0x00 + BACnetNodeType_SYSTEM BACnetNodeType = 0x01 + BACnetNodeType_NETWORK BACnetNodeType = 0x02 + BACnetNodeType_DEVICE BACnetNodeType = 0x03 BACnetNodeType_ORGANIZATIONAL BACnetNodeType = 0x04 - BACnetNodeType_AREA BACnetNodeType = 0x05 - BACnetNodeType_EQUIPMENT BACnetNodeType = 0x06 - BACnetNodeType_POINT BACnetNodeType = 0x07 - BACnetNodeType_COLLECTION BACnetNodeType = 0x08 - BACnetNodeType_PROPERTY BACnetNodeType = 0x09 - BACnetNodeType_FUNCTIONAL BACnetNodeType = 0x0A - BACnetNodeType_OTHER BACnetNodeType = 0x0B - BACnetNodeType_SUBSYSTEM BACnetNodeType = 0x0C - BACnetNodeType_BUILDING BACnetNodeType = 0x0D - BACnetNodeType_FLOOR BACnetNodeType = 0x0E - BACnetNodeType_SECTION BACnetNodeType = 0x0F - BACnetNodeType_MODULE BACnetNodeType = 0x10 - BACnetNodeType_TREE BACnetNodeType = 0x11 - BACnetNodeType_MEMBER BACnetNodeType = 0x12 - BACnetNodeType_PROTOCOL BACnetNodeType = 0x13 - BACnetNodeType_ROOM BACnetNodeType = 0x14 - BACnetNodeType_ZONE BACnetNodeType = 0x15 + BACnetNodeType_AREA BACnetNodeType = 0x05 + BACnetNodeType_EQUIPMENT BACnetNodeType = 0x06 + BACnetNodeType_POINT BACnetNodeType = 0x07 + BACnetNodeType_COLLECTION BACnetNodeType = 0x08 + BACnetNodeType_PROPERTY BACnetNodeType = 0x09 + BACnetNodeType_FUNCTIONAL BACnetNodeType = 0x0A + BACnetNodeType_OTHER BACnetNodeType = 0x0B + BACnetNodeType_SUBSYSTEM BACnetNodeType = 0x0C + BACnetNodeType_BUILDING BACnetNodeType = 0x0D + BACnetNodeType_FLOOR BACnetNodeType = 0x0E + BACnetNodeType_SECTION BACnetNodeType = 0x0F + BACnetNodeType_MODULE BACnetNodeType = 0x10 + BACnetNodeType_TREE BACnetNodeType = 0x11 + BACnetNodeType_MEMBER BACnetNodeType = 0x12 + BACnetNodeType_PROTOCOL BACnetNodeType = 0x13 + BACnetNodeType_ROOM BACnetNodeType = 0x14 + BACnetNodeType_ZONE BACnetNodeType = 0x15 ) var BACnetNodeTypeValues []BACnetNodeType func init() { _ = errors.New - BACnetNodeTypeValues = []BACnetNodeType{ + BACnetNodeTypeValues = []BACnetNodeType { BACnetNodeType_UNKNOWN, BACnetNodeType_SYSTEM, BACnetNodeType_NETWORK, @@ -91,50 +91,50 @@ func init() { func BACnetNodeTypeByValue(value uint8) (enum BACnetNodeType, ok bool) { switch value { - case 0x00: - return BACnetNodeType_UNKNOWN, true - case 0x01: - return BACnetNodeType_SYSTEM, true - case 0x02: - return BACnetNodeType_NETWORK, true - case 0x03: - return BACnetNodeType_DEVICE, true - case 0x04: - return BACnetNodeType_ORGANIZATIONAL, true - case 0x05: - return BACnetNodeType_AREA, true - case 0x06: - return BACnetNodeType_EQUIPMENT, true - case 0x07: - return BACnetNodeType_POINT, true - case 0x08: - return BACnetNodeType_COLLECTION, true - case 0x09: - return BACnetNodeType_PROPERTY, true - case 0x0A: - return BACnetNodeType_FUNCTIONAL, true - case 0x0B: - return BACnetNodeType_OTHER, true - case 0x0C: - return BACnetNodeType_SUBSYSTEM, true - case 0x0D: - return BACnetNodeType_BUILDING, true - case 0x0E: - return BACnetNodeType_FLOOR, true - case 0x0F: - return BACnetNodeType_SECTION, true - case 0x10: - return BACnetNodeType_MODULE, true - case 0x11: - return BACnetNodeType_TREE, true - case 0x12: - return BACnetNodeType_MEMBER, true - case 0x13: - return BACnetNodeType_PROTOCOL, true - case 0x14: - return BACnetNodeType_ROOM, true - case 0x15: - return BACnetNodeType_ZONE, true + case 0x00: + return BACnetNodeType_UNKNOWN, true + case 0x01: + return BACnetNodeType_SYSTEM, true + case 0x02: + return BACnetNodeType_NETWORK, true + case 0x03: + return BACnetNodeType_DEVICE, true + case 0x04: + return BACnetNodeType_ORGANIZATIONAL, true + case 0x05: + return BACnetNodeType_AREA, true + case 0x06: + return BACnetNodeType_EQUIPMENT, true + case 0x07: + return BACnetNodeType_POINT, true + case 0x08: + return BACnetNodeType_COLLECTION, true + case 0x09: + return BACnetNodeType_PROPERTY, true + case 0x0A: + return BACnetNodeType_FUNCTIONAL, true + case 0x0B: + return BACnetNodeType_OTHER, true + case 0x0C: + return BACnetNodeType_SUBSYSTEM, true + case 0x0D: + return BACnetNodeType_BUILDING, true + case 0x0E: + return BACnetNodeType_FLOOR, true + case 0x0F: + return BACnetNodeType_SECTION, true + case 0x10: + return BACnetNodeType_MODULE, true + case 0x11: + return BACnetNodeType_TREE, true + case 0x12: + return BACnetNodeType_MEMBER, true + case 0x13: + return BACnetNodeType_PROTOCOL, true + case 0x14: + return BACnetNodeType_ROOM, true + case 0x15: + return BACnetNodeType_ZONE, true } return 0, false } @@ -189,13 +189,13 @@ func BACnetNodeTypeByName(value string) (enum BACnetNodeType, ok bool) { return 0, false } -func BACnetNodeTypeKnows(value uint8) bool { +func BACnetNodeTypeKnows(value uint8) bool { for _, typeValue := range BACnetNodeTypeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetNodeType(structType interface{}) BACnetNodeType { @@ -299,3 +299,4 @@ func (e BACnetNodeType) PLC4XEnumName() string { func (e BACnetNodeType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNodeTypeTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNodeTypeTagged.go index e86c1a55cf2..4bb5ea616c4 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNodeTypeTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNodeTypeTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNodeTypeTagged is the corresponding interface of BACnetNodeTypeTagged type BACnetNodeTypeTagged interface { @@ -46,14 +48,15 @@ type BACnetNodeTypeTaggedExactly interface { // _BACnetNodeTypeTagged is the data-structure of this message type _BACnetNodeTypeTagged struct { - Header BACnetTagHeader - Value BACnetNodeType + Header BACnetTagHeader + Value BACnetNodeType // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_BACnetNodeTypeTagged) GetValue() BACnetNodeType { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNodeTypeTagged factory function for _BACnetNodeTypeTagged -func NewBACnetNodeTypeTagged(header BACnetTagHeader, value BACnetNodeType, tagNumber uint8, tagClass TagClass) *_BACnetNodeTypeTagged { - return &_BACnetNodeTypeTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetNodeTypeTagged( header BACnetTagHeader , value BACnetNodeType , tagNumber uint8 , tagClass TagClass ) *_BACnetNodeTypeTagged { +return &_BACnetNodeTypeTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetNodeTypeTagged(structType interface{}) BACnetNodeTypeTagged { - if casted, ok := structType.(BACnetNodeTypeTagged); ok { + if casted, ok := structType.(BACnetNodeTypeTagged); ok { return casted } if casted, ok := structType.(*BACnetNodeTypeTagged); ok { @@ -104,6 +108,7 @@ func (m *_BACnetNodeTypeTagged) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetNodeTypeTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func BACnetNodeTypeTaggedParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetNodeTypeTagged") } @@ -135,12 +140,12 @@ func BACnetNodeTypeTaggedParseWithBuffer(ctx context.Context, readBuffer utils.R } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func BACnetNodeTypeTaggedParseWithBuffer(ctx context.Context, readBuffer utils.R } var value BACnetNodeType if _value != nil { - value = _value.(BACnetNodeType) + value = _value.(BACnetNodeType) } if closeErr := readBuffer.CloseContext("BACnetNodeTypeTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func BACnetNodeTypeTaggedParseWithBuffer(ctx context.Context, readBuffer utils.R // Create the instance return &_BACnetNodeTypeTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_BACnetNodeTypeTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_BACnetNodeTypeTagged) Serialize() ([]byte, error) { func (m *_BACnetNodeTypeTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetNodeTypeTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetNodeTypeTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetNodeTypeTagged") } @@ -206,6 +211,7 @@ func (m *_BACnetNodeTypeTagged) SerializeWithWriteBuffer(ctx context.Context, wr return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_BACnetNodeTypeTagged) GetTagNumber() uint8 { func (m *_BACnetNodeTypeTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_BACnetNodeTypeTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParameters.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParameters.go index 27fbb6733c3..933dc040909 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParameters.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParameters.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNotificationParameters is the corresponding interface of BACnetNotificationParameters type BACnetNotificationParameters interface { @@ -51,12 +53,12 @@ type BACnetNotificationParametersExactly interface { // _BACnetNotificationParameters is the data-structure of this message type _BACnetNotificationParameters struct { _BACnetNotificationParametersChildRequirements - OpeningTag BACnetOpeningTag - PeekedTagHeader BACnetTagHeader - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + PeekedTagHeader BACnetTagHeader + ClosingTag BACnetClosingTag // Arguments. - TagNumber uint8 + TagNumber uint8 ObjectTypeArgument BACnetObjectType } @@ -65,6 +67,7 @@ type _BACnetNotificationParametersChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type BACnetNotificationParametersParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetNotificationParameters, serializeChildFunction func() error) error GetTypeName() string @@ -72,13 +75,12 @@ type BACnetNotificationParametersParent interface { type BACnetNotificationParametersChild interface { utils.Serializable - InitializeParent(parent BACnetNotificationParameters, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) +InitializeParent(parent BACnetNotificationParameters , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) GetParent() *BACnetNotificationParameters GetTypeName() string BACnetNotificationParameters } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -116,14 +118,15 @@ func (m *_BACnetNotificationParameters) GetPeekedTagNumber() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNotificationParameters factory function for _BACnetNotificationParameters -func NewBACnetNotificationParameters(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, objectTypeArgument BACnetObjectType) *_BACnetNotificationParameters { - return &_BACnetNotificationParameters{OpeningTag: openingTag, PeekedTagHeader: peekedTagHeader, ClosingTag: closingTag, TagNumber: tagNumber, ObjectTypeArgument: objectTypeArgument} +func NewBACnetNotificationParameters( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , objectTypeArgument BACnetObjectType ) *_BACnetNotificationParameters { +return &_BACnetNotificationParameters{ OpeningTag: openingTag , PeekedTagHeader: peekedTagHeader , ClosingTag: closingTag , TagNumber: tagNumber , ObjectTypeArgument: objectTypeArgument } } // Deprecated: use the interface for direct cast func CastBACnetNotificationParameters(structType interface{}) BACnetNotificationParameters { - if casted, ok := structType.(BACnetNotificationParameters); ok { + if casted, ok := structType.(BACnetNotificationParameters); ok { return casted } if casted, ok := structType.(*BACnetNotificationParameters); ok { @@ -136,6 +139,7 @@ func (m *_BACnetNotificationParameters) GetTypeName() string { return "BACnetNotificationParameters" } + func (m *_BACnetNotificationParameters) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -171,7 +175,7 @@ func BACnetNotificationParametersParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetNotificationParameters") } @@ -180,13 +184,13 @@ func BACnetNotificationParametersParseWithBuffer(ctx context.Context, readBuffer return nil, errors.Wrap(closeErr, "Error closing for openingTag") } - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Virtual field _peekedTagNumber := peekedTagHeader.GetActualTagNumber() @@ -196,52 +200,52 @@ func BACnetNotificationParametersParseWithBuffer(ctx context.Context, readBuffer // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetNotificationParametersChildSerializeRequirement interface { BACnetNotificationParameters - InitializeParent(BACnetNotificationParameters, BACnetOpeningTag, BACnetTagHeader, BACnetClosingTag) + InitializeParent(BACnetNotificationParameters, BACnetOpeningTag, BACnetTagHeader, BACnetClosingTag) GetParent() BACnetNotificationParameters } var _childTemp interface{} var _child BACnetNotificationParametersChildSerializeRequirement var typeSwitchError error switch { - case peekedTagNumber == uint8(0): // BACnetNotificationParametersChangeOfBitString +case peekedTagNumber == uint8(0) : // BACnetNotificationParametersChangeOfBitString _childTemp, typeSwitchError = BACnetNotificationParametersChangeOfBitStringParseWithBuffer(ctx, readBuffer, peekedTagNumber, tagNumber, objectTypeArgument) - case peekedTagNumber == uint8(1): // BACnetNotificationParametersChangeOfState +case peekedTagNumber == uint8(1) : // BACnetNotificationParametersChangeOfState _childTemp, typeSwitchError = BACnetNotificationParametersChangeOfStateParseWithBuffer(ctx, readBuffer, peekedTagNumber, tagNumber, objectTypeArgument) - case peekedTagNumber == uint8(2): // BACnetNotificationParametersChangeOfValue +case peekedTagNumber == uint8(2) : // BACnetNotificationParametersChangeOfValue _childTemp, typeSwitchError = BACnetNotificationParametersChangeOfValueParseWithBuffer(ctx, readBuffer, peekedTagNumber, tagNumber, objectTypeArgument) - case peekedTagNumber == uint8(3): // BACnetNotificationParametersCommandFailure +case peekedTagNumber == uint8(3) : // BACnetNotificationParametersCommandFailure _childTemp, typeSwitchError = BACnetNotificationParametersCommandFailureParseWithBuffer(ctx, readBuffer, peekedTagNumber, tagNumber, objectTypeArgument) - case peekedTagNumber == uint8(4): // BACnetNotificationParametersFloatingLimit +case peekedTagNumber == uint8(4) : // BACnetNotificationParametersFloatingLimit _childTemp, typeSwitchError = BACnetNotificationParametersFloatingLimitParseWithBuffer(ctx, readBuffer, peekedTagNumber, tagNumber, objectTypeArgument) - case peekedTagNumber == uint8(5): // BACnetNotificationParametersOutOfRange +case peekedTagNumber == uint8(5) : // BACnetNotificationParametersOutOfRange _childTemp, typeSwitchError = BACnetNotificationParametersOutOfRangeParseWithBuffer(ctx, readBuffer, peekedTagNumber, tagNumber, objectTypeArgument) - case peekedTagNumber == uint8(6): // BACnetNotificationParametersComplexEventType +case peekedTagNumber == uint8(6) : // BACnetNotificationParametersComplexEventType _childTemp, typeSwitchError = BACnetNotificationParametersComplexEventTypeParseWithBuffer(ctx, readBuffer, peekedTagNumber, tagNumber, objectTypeArgument) - case peekedTagNumber == uint8(8): // BACnetNotificationParametersChangeOfLifeSafety +case peekedTagNumber == uint8(8) : // BACnetNotificationParametersChangeOfLifeSafety _childTemp, typeSwitchError = BACnetNotificationParametersChangeOfLifeSafetyParseWithBuffer(ctx, readBuffer, peekedTagNumber, tagNumber, objectTypeArgument) - case peekedTagNumber == uint8(9): // BACnetNotificationParametersExtended +case peekedTagNumber == uint8(9) : // BACnetNotificationParametersExtended _childTemp, typeSwitchError = BACnetNotificationParametersExtendedParseWithBuffer(ctx, readBuffer, peekedTagNumber, tagNumber, objectTypeArgument) - case peekedTagNumber == uint8(10): // BACnetNotificationParametersBufferReady +case peekedTagNumber == uint8(10) : // BACnetNotificationParametersBufferReady _childTemp, typeSwitchError = BACnetNotificationParametersBufferReadyParseWithBuffer(ctx, readBuffer, peekedTagNumber, tagNumber, objectTypeArgument) - case peekedTagNumber == uint8(11): // BACnetNotificationParametersUnsignedRange +case peekedTagNumber == uint8(11) : // BACnetNotificationParametersUnsignedRange _childTemp, typeSwitchError = BACnetNotificationParametersUnsignedRangeParseWithBuffer(ctx, readBuffer, peekedTagNumber, tagNumber, objectTypeArgument) - case peekedTagNumber == uint8(13): // BACnetNotificationParametersAccessEvent +case peekedTagNumber == uint8(13) : // BACnetNotificationParametersAccessEvent _childTemp, typeSwitchError = BACnetNotificationParametersAccessEventParseWithBuffer(ctx, readBuffer, peekedTagNumber, tagNumber, objectTypeArgument) - case peekedTagNumber == uint8(14): // BACnetNotificationParametersDoubleOutOfRange +case peekedTagNumber == uint8(14) : // BACnetNotificationParametersDoubleOutOfRange _childTemp, typeSwitchError = BACnetNotificationParametersDoubleOutOfRangeParseWithBuffer(ctx, readBuffer, peekedTagNumber, tagNumber, objectTypeArgument) - case peekedTagNumber == uint8(15): // BACnetNotificationParametersSignedOutOfRange +case peekedTagNumber == uint8(15) : // BACnetNotificationParametersSignedOutOfRange _childTemp, typeSwitchError = BACnetNotificationParametersSignedOutOfRangeParseWithBuffer(ctx, readBuffer, peekedTagNumber, tagNumber, objectTypeArgument) - case peekedTagNumber == uint8(16): // BACnetNotificationParametersUnsignedOutOfRange +case peekedTagNumber == uint8(16) : // BACnetNotificationParametersUnsignedOutOfRange _childTemp, typeSwitchError = BACnetNotificationParametersUnsignedOutOfRangeParseWithBuffer(ctx, readBuffer, peekedTagNumber, tagNumber, objectTypeArgument) - case peekedTagNumber == uint8(17): // BACnetNotificationParametersChangeOfCharacterString +case peekedTagNumber == uint8(17) : // BACnetNotificationParametersChangeOfCharacterString _childTemp, typeSwitchError = BACnetNotificationParametersChangeOfCharacterStringParseWithBuffer(ctx, readBuffer, peekedTagNumber, tagNumber, objectTypeArgument) - case peekedTagNumber == uint8(18): // BACnetNotificationParametersChangeOfStatusFlags +case peekedTagNumber == uint8(18) : // BACnetNotificationParametersChangeOfStatusFlags _childTemp, typeSwitchError = BACnetNotificationParametersChangeOfStatusFlagsParseWithBuffer(ctx, readBuffer, peekedTagNumber, tagNumber, objectTypeArgument) - case peekedTagNumber == uint8(19): // BACnetNotificationParametersChangeOfReliability +case peekedTagNumber == uint8(19) : // BACnetNotificationParametersChangeOfReliability _childTemp, typeSwitchError = BACnetNotificationParametersChangeOfReliabilityParseWithBuffer(ctx, readBuffer, peekedTagNumber, tagNumber, objectTypeArgument) - case peekedTagNumber == uint8(21): // BACnetNotificationParametersChangeOfDiscreteValue +case peekedTagNumber == uint8(21) : // BACnetNotificationParametersChangeOfDiscreteValue _childTemp, typeSwitchError = BACnetNotificationParametersChangeOfDiscreteValueParseWithBuffer(ctx, readBuffer, peekedTagNumber, tagNumber, objectTypeArgument) - case peekedTagNumber == uint8(22): // BACnetNotificationParametersChangeOfTimer +case peekedTagNumber == uint8(22) : // BACnetNotificationParametersChangeOfTimer _childTemp, typeSwitchError = BACnetNotificationParametersChangeOfTimerParseWithBuffer(ctx, readBuffer, peekedTagNumber, tagNumber, objectTypeArgument) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedTagNumber=%v]", peekedTagNumber) @@ -255,7 +259,7 @@ func BACnetNotificationParametersParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetNotificationParameters") } @@ -269,7 +273,7 @@ func BACnetNotificationParametersParseWithBuffer(ctx context.Context, readBuffer } // Finish initializing - _child.InitializeParent(_child, openingTag, peekedTagHeader, closingTag) +_child.InitializeParent(_child , openingTag , peekedTagHeader , closingTag ) return _child, nil } @@ -279,7 +283,7 @@ func (pm *_BACnetNotificationParameters) SerializeParent(ctx context.Context, wr _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetNotificationParameters"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetNotificationParameters"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetNotificationParameters") } @@ -322,6 +326,7 @@ func (pm *_BACnetNotificationParameters) SerializeParent(ctx context.Context, wr return nil } + //// // Arguments Getter @@ -331,7 +336,6 @@ func (m *_BACnetNotificationParameters) GetTagNumber() uint8 { func (m *_BACnetNotificationParameters) GetObjectTypeArgument() BACnetObjectType { return m.ObjectTypeArgument } - // //// @@ -349,3 +353,6 @@ func (m *_BACnetNotificationParameters) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersAccessEvent.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersAccessEvent.go index d1c7991733b..5f90b5b964b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersAccessEvent.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersAccessEvent.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNotificationParametersAccessEvent is the corresponding interface of BACnetNotificationParametersAccessEvent type BACnetNotificationParametersAccessEvent interface { @@ -61,16 +63,18 @@ type BACnetNotificationParametersAccessEventExactly interface { // _BACnetNotificationParametersAccessEvent is the data-structure of this message type _BACnetNotificationParametersAccessEvent struct { *_BACnetNotificationParameters - InnerOpeningTag BACnetOpeningTag - AccessEvent BACnetAccessEventTagged - StatusFlags BACnetStatusFlagsTagged - AccessEventTag BACnetContextTagUnsignedInteger - AccessEventTime BACnetTimeStampEnclosed - AccessCredential BACnetDeviceObjectReferenceEnclosed - AuthenticationFactor BACnetAuthenticationFactorTypeTagged - InnerClosingTag BACnetClosingTag + InnerOpeningTag BACnetOpeningTag + AccessEvent BACnetAccessEventTagged + StatusFlags BACnetStatusFlagsTagged + AccessEventTag BACnetContextTagUnsignedInteger + AccessEventTime BACnetTimeStampEnclosed + AccessCredential BACnetDeviceObjectReferenceEnclosed + AuthenticationFactor BACnetAuthenticationFactorTypeTagged + InnerClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -81,16 +85,14 @@ type _BACnetNotificationParametersAccessEvent struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetNotificationParametersAccessEvent) InitializeParent(parent BACnetNotificationParameters, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetNotificationParametersAccessEvent) InitializeParent(parent BACnetNotificationParameters , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetNotificationParametersAccessEvent) GetParent() BACnetNotificationParameters { +func (m *_BACnetNotificationParametersAccessEvent) GetParent() BACnetNotificationParameters { return m._BACnetNotificationParameters } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -133,18 +135,19 @@ func (m *_BACnetNotificationParametersAccessEvent) GetInnerClosingTag() BACnetCl /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNotificationParametersAccessEvent factory function for _BACnetNotificationParametersAccessEvent -func NewBACnetNotificationParametersAccessEvent(innerOpeningTag BACnetOpeningTag, accessEvent BACnetAccessEventTagged, statusFlags BACnetStatusFlagsTagged, accessEventTag BACnetContextTagUnsignedInteger, accessEventTime BACnetTimeStampEnclosed, accessCredential BACnetDeviceObjectReferenceEnclosed, authenticationFactor BACnetAuthenticationFactorTypeTagged, innerClosingTag BACnetClosingTag, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, objectTypeArgument BACnetObjectType) *_BACnetNotificationParametersAccessEvent { +func NewBACnetNotificationParametersAccessEvent( innerOpeningTag BACnetOpeningTag , accessEvent BACnetAccessEventTagged , statusFlags BACnetStatusFlagsTagged , accessEventTag BACnetContextTagUnsignedInteger , accessEventTime BACnetTimeStampEnclosed , accessCredential BACnetDeviceObjectReferenceEnclosed , authenticationFactor BACnetAuthenticationFactorTypeTagged , innerClosingTag BACnetClosingTag , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , objectTypeArgument BACnetObjectType ) *_BACnetNotificationParametersAccessEvent { _result := &_BACnetNotificationParametersAccessEvent{ - InnerOpeningTag: innerOpeningTag, - AccessEvent: accessEvent, - StatusFlags: statusFlags, - AccessEventTag: accessEventTag, - AccessEventTime: accessEventTime, - AccessCredential: accessCredential, - AuthenticationFactor: authenticationFactor, - InnerClosingTag: innerClosingTag, - _BACnetNotificationParameters: NewBACnetNotificationParameters(openingTag, peekedTagHeader, closingTag, tagNumber, objectTypeArgument), + InnerOpeningTag: innerOpeningTag, + AccessEvent: accessEvent, + StatusFlags: statusFlags, + AccessEventTag: accessEventTag, + AccessEventTime: accessEventTime, + AccessCredential: accessCredential, + AuthenticationFactor: authenticationFactor, + InnerClosingTag: innerClosingTag, + _BACnetNotificationParameters: NewBACnetNotificationParameters(openingTag, peekedTagHeader, closingTag, tagNumber, objectTypeArgument), } _result._BACnetNotificationParameters._BACnetNotificationParametersChildRequirements = _result return _result @@ -152,7 +155,7 @@ func NewBACnetNotificationParametersAccessEvent(innerOpeningTag BACnetOpeningTag // Deprecated: use the interface for direct cast func CastBACnetNotificationParametersAccessEvent(structType interface{}) BACnetNotificationParametersAccessEvent { - if casted, ok := structType.(BACnetNotificationParametersAccessEvent); ok { + if casted, ok := structType.(BACnetNotificationParametersAccessEvent); ok { return casted } if casted, ok := structType.(*BACnetNotificationParametersAccessEvent); ok { @@ -197,6 +200,7 @@ func (m *_BACnetNotificationParametersAccessEvent) GetLengthInBits(ctx context.C return lengthInBits } + func (m *_BACnetNotificationParametersAccessEvent) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -218,7 +222,7 @@ func BACnetNotificationParametersAccessEventParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("innerOpeningTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerOpeningTag") } - _innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber)) +_innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) ) if _innerOpeningTagErr != nil { return nil, errors.Wrap(_innerOpeningTagErr, "Error parsing 'innerOpeningTag' field of BACnetNotificationParametersAccessEvent") } @@ -231,7 +235,7 @@ func BACnetNotificationParametersAccessEventParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("accessEvent"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for accessEvent") } - _accessEvent, _accessEventErr := BACnetAccessEventTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_accessEvent, _accessEventErr := BACnetAccessEventTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _accessEventErr != nil { return nil, errors.Wrap(_accessEventErr, "Error parsing 'accessEvent' field of BACnetNotificationParametersAccessEvent") } @@ -244,7 +248,7 @@ func BACnetNotificationParametersAccessEventParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("statusFlags"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for statusFlags") } - _statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _statusFlagsErr != nil { return nil, errors.Wrap(_statusFlagsErr, "Error parsing 'statusFlags' field of BACnetNotificationParametersAccessEvent") } @@ -257,7 +261,7 @@ func BACnetNotificationParametersAccessEventParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("accessEventTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for accessEventTag") } - _accessEventTag, _accessEventTagErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_accessEventTag, _accessEventTagErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _accessEventTagErr != nil { return nil, errors.Wrap(_accessEventTagErr, "Error parsing 'accessEventTag' field of BACnetNotificationParametersAccessEvent") } @@ -270,7 +274,7 @@ func BACnetNotificationParametersAccessEventParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("accessEventTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for accessEventTime") } - _accessEventTime, _accessEventTimeErr := BACnetTimeStampEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(3))) +_accessEventTime, _accessEventTimeErr := BACnetTimeStampEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(3) ) ) if _accessEventTimeErr != nil { return nil, errors.Wrap(_accessEventTimeErr, "Error parsing 'accessEventTime' field of BACnetNotificationParametersAccessEvent") } @@ -283,7 +287,7 @@ func BACnetNotificationParametersAccessEventParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("accessCredential"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for accessCredential") } - _accessCredential, _accessCredentialErr := BACnetDeviceObjectReferenceEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(4))) +_accessCredential, _accessCredentialErr := BACnetDeviceObjectReferenceEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(4) ) ) if _accessCredentialErr != nil { return nil, errors.Wrap(_accessCredentialErr, "Error parsing 'accessCredential' field of BACnetNotificationParametersAccessEvent") } @@ -294,12 +298,12 @@ func BACnetNotificationParametersAccessEventParseWithBuffer(ctx context.Context, // Optional Field (authenticationFactor) (Can be skipped, if a given expression evaluates to false) var authenticationFactor BACnetAuthenticationFactorTypeTagged = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("authenticationFactor"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for authenticationFactor") } - _val, _err := BACnetAuthenticationFactorTypeTaggedParseWithBuffer(ctx, readBuffer, uint8(5), TagClass_CONTEXT_SPECIFIC_TAGS) +_val, _err := BACnetAuthenticationFactorTypeTaggedParseWithBuffer(ctx, readBuffer , uint8(5) , TagClass_CONTEXT_SPECIFIC_TAGS ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -318,7 +322,7 @@ func BACnetNotificationParametersAccessEventParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("innerClosingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerClosingTag") } - _innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber)) +_innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) ) if _innerClosingTagErr != nil { return nil, errors.Wrap(_innerClosingTagErr, "Error parsing 'innerClosingTag' field of BACnetNotificationParametersAccessEvent") } @@ -334,17 +338,17 @@ func BACnetNotificationParametersAccessEventParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetNotificationParametersAccessEvent{ _BACnetNotificationParameters: &_BACnetNotificationParameters{ - TagNumber: tagNumber, + TagNumber: tagNumber, ObjectTypeArgument: objectTypeArgument, }, - InnerOpeningTag: innerOpeningTag, - AccessEvent: accessEvent, - StatusFlags: statusFlags, - AccessEventTag: accessEventTag, - AccessEventTime: accessEventTime, - AccessCredential: accessCredential, + InnerOpeningTag: innerOpeningTag, + AccessEvent: accessEvent, + StatusFlags: statusFlags, + AccessEventTag: accessEventTag, + AccessEventTime: accessEventTime, + AccessCredential: accessCredential, AuthenticationFactor: authenticationFactor, - InnerClosingTag: innerClosingTag, + InnerClosingTag: innerClosingTag, } _child._BACnetNotificationParameters._BACnetNotificationParametersChildRequirements = _child return _child, nil @@ -366,105 +370,105 @@ func (m *_BACnetNotificationParametersAccessEvent) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetNotificationParametersAccessEvent") } - // Simple Field (innerOpeningTag) - if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") - } - _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) - if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerOpeningTag") - } - if _innerOpeningTagErr != nil { - return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") - } - - // Simple Field (accessEvent) - if pushErr := writeBuffer.PushContext("accessEvent"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for accessEvent") - } - _accessEventErr := writeBuffer.WriteSerializable(ctx, m.GetAccessEvent()) - if popErr := writeBuffer.PopContext("accessEvent"); popErr != nil { - return errors.Wrap(popErr, "Error popping for accessEvent") - } - if _accessEventErr != nil { - return errors.Wrap(_accessEventErr, "Error serializing 'accessEvent' field") - } + // Simple Field (innerOpeningTag) + if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") + } + _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) + if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerOpeningTag") + } + if _innerOpeningTagErr != nil { + return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") + } - // Simple Field (statusFlags) - if pushErr := writeBuffer.PushContext("statusFlags"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for statusFlags") - } - _statusFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetStatusFlags()) - if popErr := writeBuffer.PopContext("statusFlags"); popErr != nil { - return errors.Wrap(popErr, "Error popping for statusFlags") - } - if _statusFlagsErr != nil { - return errors.Wrap(_statusFlagsErr, "Error serializing 'statusFlags' field") - } + // Simple Field (accessEvent) + if pushErr := writeBuffer.PushContext("accessEvent"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for accessEvent") + } + _accessEventErr := writeBuffer.WriteSerializable(ctx, m.GetAccessEvent()) + if popErr := writeBuffer.PopContext("accessEvent"); popErr != nil { + return errors.Wrap(popErr, "Error popping for accessEvent") + } + if _accessEventErr != nil { + return errors.Wrap(_accessEventErr, "Error serializing 'accessEvent' field") + } - // Simple Field (accessEventTag) - if pushErr := writeBuffer.PushContext("accessEventTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for accessEventTag") - } - _accessEventTagErr := writeBuffer.WriteSerializable(ctx, m.GetAccessEventTag()) - if popErr := writeBuffer.PopContext("accessEventTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for accessEventTag") - } - if _accessEventTagErr != nil { - return errors.Wrap(_accessEventTagErr, "Error serializing 'accessEventTag' field") - } + // Simple Field (statusFlags) + if pushErr := writeBuffer.PushContext("statusFlags"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for statusFlags") + } + _statusFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetStatusFlags()) + if popErr := writeBuffer.PopContext("statusFlags"); popErr != nil { + return errors.Wrap(popErr, "Error popping for statusFlags") + } + if _statusFlagsErr != nil { + return errors.Wrap(_statusFlagsErr, "Error serializing 'statusFlags' field") + } - // Simple Field (accessEventTime) - if pushErr := writeBuffer.PushContext("accessEventTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for accessEventTime") - } - _accessEventTimeErr := writeBuffer.WriteSerializable(ctx, m.GetAccessEventTime()) - if popErr := writeBuffer.PopContext("accessEventTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for accessEventTime") - } - if _accessEventTimeErr != nil { - return errors.Wrap(_accessEventTimeErr, "Error serializing 'accessEventTime' field") - } + // Simple Field (accessEventTag) + if pushErr := writeBuffer.PushContext("accessEventTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for accessEventTag") + } + _accessEventTagErr := writeBuffer.WriteSerializable(ctx, m.GetAccessEventTag()) + if popErr := writeBuffer.PopContext("accessEventTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for accessEventTag") + } + if _accessEventTagErr != nil { + return errors.Wrap(_accessEventTagErr, "Error serializing 'accessEventTag' field") + } - // Simple Field (accessCredential) - if pushErr := writeBuffer.PushContext("accessCredential"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for accessCredential") - } - _accessCredentialErr := writeBuffer.WriteSerializable(ctx, m.GetAccessCredential()) - if popErr := writeBuffer.PopContext("accessCredential"); popErr != nil { - return errors.Wrap(popErr, "Error popping for accessCredential") - } - if _accessCredentialErr != nil { - return errors.Wrap(_accessCredentialErr, "Error serializing 'accessCredential' field") - } + // Simple Field (accessEventTime) + if pushErr := writeBuffer.PushContext("accessEventTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for accessEventTime") + } + _accessEventTimeErr := writeBuffer.WriteSerializable(ctx, m.GetAccessEventTime()) + if popErr := writeBuffer.PopContext("accessEventTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for accessEventTime") + } + if _accessEventTimeErr != nil { + return errors.Wrap(_accessEventTimeErr, "Error serializing 'accessEventTime' field") + } - // Optional Field (authenticationFactor) (Can be skipped, if the value is null) - var authenticationFactor BACnetAuthenticationFactorTypeTagged = nil - if m.GetAuthenticationFactor() != nil { - if pushErr := writeBuffer.PushContext("authenticationFactor"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for authenticationFactor") - } - authenticationFactor = m.GetAuthenticationFactor() - _authenticationFactorErr := writeBuffer.WriteSerializable(ctx, authenticationFactor) - if popErr := writeBuffer.PopContext("authenticationFactor"); popErr != nil { - return errors.Wrap(popErr, "Error popping for authenticationFactor") - } - if _authenticationFactorErr != nil { - return errors.Wrap(_authenticationFactorErr, "Error serializing 'authenticationFactor' field") - } - } + // Simple Field (accessCredential) + if pushErr := writeBuffer.PushContext("accessCredential"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for accessCredential") + } + _accessCredentialErr := writeBuffer.WriteSerializable(ctx, m.GetAccessCredential()) + if popErr := writeBuffer.PopContext("accessCredential"); popErr != nil { + return errors.Wrap(popErr, "Error popping for accessCredential") + } + if _accessCredentialErr != nil { + return errors.Wrap(_accessCredentialErr, "Error serializing 'accessCredential' field") + } - // Simple Field (innerClosingTag) - if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerClosingTag") + // Optional Field (authenticationFactor) (Can be skipped, if the value is null) + var authenticationFactor BACnetAuthenticationFactorTypeTagged = nil + if m.GetAuthenticationFactor() != nil { + if pushErr := writeBuffer.PushContext("authenticationFactor"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for authenticationFactor") } - _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) - if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerClosingTag") + authenticationFactor = m.GetAuthenticationFactor() + _authenticationFactorErr := writeBuffer.WriteSerializable(ctx, authenticationFactor) + if popErr := writeBuffer.PopContext("authenticationFactor"); popErr != nil { + return errors.Wrap(popErr, "Error popping for authenticationFactor") } - if _innerClosingTagErr != nil { - return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") + if _authenticationFactorErr != nil { + return errors.Wrap(_authenticationFactorErr, "Error serializing 'authenticationFactor' field") } + } + + // Simple Field (innerClosingTag) + if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerClosingTag") + } + _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) + if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerClosingTag") + } + if _innerClosingTagErr != nil { + return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") + } if popErr := writeBuffer.PopContext("BACnetNotificationParametersAccessEvent"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetNotificationParametersAccessEvent") @@ -474,6 +478,7 @@ func (m *_BACnetNotificationParametersAccessEvent) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetNotificationParametersAccessEvent) isBACnetNotificationParametersAccessEvent() bool { return true } @@ -488,3 +493,6 @@ func (m *_BACnetNotificationParametersAccessEvent) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersBufferReady.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersBufferReady.go index a0a4ebf14e9..e2f6d715bb8 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersBufferReady.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersBufferReady.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNotificationParametersBufferReady is the corresponding interface of BACnetNotificationParametersBufferReady type BACnetNotificationParametersBufferReady interface { @@ -54,13 +56,15 @@ type BACnetNotificationParametersBufferReadyExactly interface { // _BACnetNotificationParametersBufferReady is the data-structure of this message type _BACnetNotificationParametersBufferReady struct { *_BACnetNotificationParameters - InnerOpeningTag BACnetOpeningTag - BufferProperty BACnetDeviceObjectPropertyReferenceEnclosed - PreviousNotification BACnetContextTagUnsignedInteger - CurrentNotification BACnetContextTagUnsignedInteger - InnerClosingTag BACnetClosingTag + InnerOpeningTag BACnetOpeningTag + BufferProperty BACnetDeviceObjectPropertyReferenceEnclosed + PreviousNotification BACnetContextTagUnsignedInteger + CurrentNotification BACnetContextTagUnsignedInteger + InnerClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -71,16 +75,14 @@ type _BACnetNotificationParametersBufferReady struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetNotificationParametersBufferReady) InitializeParent(parent BACnetNotificationParameters, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetNotificationParametersBufferReady) InitializeParent(parent BACnetNotificationParameters , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetNotificationParametersBufferReady) GetParent() BACnetNotificationParameters { +func (m *_BACnetNotificationParametersBufferReady) GetParent() BACnetNotificationParameters { return m._BACnetNotificationParameters } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -111,15 +113,16 @@ func (m *_BACnetNotificationParametersBufferReady) GetInnerClosingTag() BACnetCl /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNotificationParametersBufferReady factory function for _BACnetNotificationParametersBufferReady -func NewBACnetNotificationParametersBufferReady(innerOpeningTag BACnetOpeningTag, bufferProperty BACnetDeviceObjectPropertyReferenceEnclosed, previousNotification BACnetContextTagUnsignedInteger, currentNotification BACnetContextTagUnsignedInteger, innerClosingTag BACnetClosingTag, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, objectTypeArgument BACnetObjectType) *_BACnetNotificationParametersBufferReady { +func NewBACnetNotificationParametersBufferReady( innerOpeningTag BACnetOpeningTag , bufferProperty BACnetDeviceObjectPropertyReferenceEnclosed , previousNotification BACnetContextTagUnsignedInteger , currentNotification BACnetContextTagUnsignedInteger , innerClosingTag BACnetClosingTag , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , objectTypeArgument BACnetObjectType ) *_BACnetNotificationParametersBufferReady { _result := &_BACnetNotificationParametersBufferReady{ - InnerOpeningTag: innerOpeningTag, - BufferProperty: bufferProperty, - PreviousNotification: previousNotification, - CurrentNotification: currentNotification, - InnerClosingTag: innerClosingTag, - _BACnetNotificationParameters: NewBACnetNotificationParameters(openingTag, peekedTagHeader, closingTag, tagNumber, objectTypeArgument), + InnerOpeningTag: innerOpeningTag, + BufferProperty: bufferProperty, + PreviousNotification: previousNotification, + CurrentNotification: currentNotification, + InnerClosingTag: innerClosingTag, + _BACnetNotificationParameters: NewBACnetNotificationParameters(openingTag, peekedTagHeader, closingTag, tagNumber, objectTypeArgument), } _result._BACnetNotificationParameters._BACnetNotificationParametersChildRequirements = _result return _result @@ -127,7 +130,7 @@ func NewBACnetNotificationParametersBufferReady(innerOpeningTag BACnetOpeningTag // Deprecated: use the interface for direct cast func CastBACnetNotificationParametersBufferReady(structType interface{}) BACnetNotificationParametersBufferReady { - if casted, ok := structType.(BACnetNotificationParametersBufferReady); ok { + if casted, ok := structType.(BACnetNotificationParametersBufferReady); ok { return casted } if casted, ok := structType.(*BACnetNotificationParametersBufferReady); ok { @@ -161,6 +164,7 @@ func (m *_BACnetNotificationParametersBufferReady) GetLengthInBits(ctx context.C return lengthInBits } + func (m *_BACnetNotificationParametersBufferReady) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -182,7 +186,7 @@ func BACnetNotificationParametersBufferReadyParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("innerOpeningTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerOpeningTag") } - _innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber)) +_innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) ) if _innerOpeningTagErr != nil { return nil, errors.Wrap(_innerOpeningTagErr, "Error parsing 'innerOpeningTag' field of BACnetNotificationParametersBufferReady") } @@ -195,7 +199,7 @@ func BACnetNotificationParametersBufferReadyParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("bufferProperty"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for bufferProperty") } - _bufferProperty, _bufferPropertyErr := BACnetDeviceObjectPropertyReferenceEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_bufferProperty, _bufferPropertyErr := BACnetDeviceObjectPropertyReferenceEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _bufferPropertyErr != nil { return nil, errors.Wrap(_bufferPropertyErr, "Error parsing 'bufferProperty' field of BACnetNotificationParametersBufferReady") } @@ -208,7 +212,7 @@ func BACnetNotificationParametersBufferReadyParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("previousNotification"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for previousNotification") } - _previousNotification, _previousNotificationErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_previousNotification, _previousNotificationErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _previousNotificationErr != nil { return nil, errors.Wrap(_previousNotificationErr, "Error parsing 'previousNotification' field of BACnetNotificationParametersBufferReady") } @@ -221,7 +225,7 @@ func BACnetNotificationParametersBufferReadyParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("currentNotification"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for currentNotification") } - _currentNotification, _currentNotificationErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_currentNotification, _currentNotificationErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _currentNotificationErr != nil { return nil, errors.Wrap(_currentNotificationErr, "Error parsing 'currentNotification' field of BACnetNotificationParametersBufferReady") } @@ -234,7 +238,7 @@ func BACnetNotificationParametersBufferReadyParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("innerClosingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerClosingTag") } - _innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber)) +_innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) ) if _innerClosingTagErr != nil { return nil, errors.Wrap(_innerClosingTagErr, "Error parsing 'innerClosingTag' field of BACnetNotificationParametersBufferReady") } @@ -250,14 +254,14 @@ func BACnetNotificationParametersBufferReadyParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetNotificationParametersBufferReady{ _BACnetNotificationParameters: &_BACnetNotificationParameters{ - TagNumber: tagNumber, + TagNumber: tagNumber, ObjectTypeArgument: objectTypeArgument, }, - InnerOpeningTag: innerOpeningTag, - BufferProperty: bufferProperty, + InnerOpeningTag: innerOpeningTag, + BufferProperty: bufferProperty, PreviousNotification: previousNotification, - CurrentNotification: currentNotification, - InnerClosingTag: innerClosingTag, + CurrentNotification: currentNotification, + InnerClosingTag: innerClosingTag, } _child._BACnetNotificationParameters._BACnetNotificationParametersChildRequirements = _child return _child, nil @@ -279,65 +283,65 @@ func (m *_BACnetNotificationParametersBufferReady) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetNotificationParametersBufferReady") } - // Simple Field (innerOpeningTag) - if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") - } - _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) - if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerOpeningTag") - } - if _innerOpeningTagErr != nil { - return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") - } + // Simple Field (innerOpeningTag) + if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") + } + _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) + if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerOpeningTag") + } + if _innerOpeningTagErr != nil { + return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") + } - // Simple Field (bufferProperty) - if pushErr := writeBuffer.PushContext("bufferProperty"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for bufferProperty") - } - _bufferPropertyErr := writeBuffer.WriteSerializable(ctx, m.GetBufferProperty()) - if popErr := writeBuffer.PopContext("bufferProperty"); popErr != nil { - return errors.Wrap(popErr, "Error popping for bufferProperty") - } - if _bufferPropertyErr != nil { - return errors.Wrap(_bufferPropertyErr, "Error serializing 'bufferProperty' field") - } + // Simple Field (bufferProperty) + if pushErr := writeBuffer.PushContext("bufferProperty"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for bufferProperty") + } + _bufferPropertyErr := writeBuffer.WriteSerializable(ctx, m.GetBufferProperty()) + if popErr := writeBuffer.PopContext("bufferProperty"); popErr != nil { + return errors.Wrap(popErr, "Error popping for bufferProperty") + } + if _bufferPropertyErr != nil { + return errors.Wrap(_bufferPropertyErr, "Error serializing 'bufferProperty' field") + } - // Simple Field (previousNotification) - if pushErr := writeBuffer.PushContext("previousNotification"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for previousNotification") - } - _previousNotificationErr := writeBuffer.WriteSerializable(ctx, m.GetPreviousNotification()) - if popErr := writeBuffer.PopContext("previousNotification"); popErr != nil { - return errors.Wrap(popErr, "Error popping for previousNotification") - } - if _previousNotificationErr != nil { - return errors.Wrap(_previousNotificationErr, "Error serializing 'previousNotification' field") - } + // Simple Field (previousNotification) + if pushErr := writeBuffer.PushContext("previousNotification"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for previousNotification") + } + _previousNotificationErr := writeBuffer.WriteSerializable(ctx, m.GetPreviousNotification()) + if popErr := writeBuffer.PopContext("previousNotification"); popErr != nil { + return errors.Wrap(popErr, "Error popping for previousNotification") + } + if _previousNotificationErr != nil { + return errors.Wrap(_previousNotificationErr, "Error serializing 'previousNotification' field") + } - // Simple Field (currentNotification) - if pushErr := writeBuffer.PushContext("currentNotification"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for currentNotification") - } - _currentNotificationErr := writeBuffer.WriteSerializable(ctx, m.GetCurrentNotification()) - if popErr := writeBuffer.PopContext("currentNotification"); popErr != nil { - return errors.Wrap(popErr, "Error popping for currentNotification") - } - if _currentNotificationErr != nil { - return errors.Wrap(_currentNotificationErr, "Error serializing 'currentNotification' field") - } + // Simple Field (currentNotification) + if pushErr := writeBuffer.PushContext("currentNotification"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for currentNotification") + } + _currentNotificationErr := writeBuffer.WriteSerializable(ctx, m.GetCurrentNotification()) + if popErr := writeBuffer.PopContext("currentNotification"); popErr != nil { + return errors.Wrap(popErr, "Error popping for currentNotification") + } + if _currentNotificationErr != nil { + return errors.Wrap(_currentNotificationErr, "Error serializing 'currentNotification' field") + } - // Simple Field (innerClosingTag) - if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerClosingTag") - } - _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) - if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerClosingTag") - } - if _innerClosingTagErr != nil { - return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") - } + // Simple Field (innerClosingTag) + if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerClosingTag") + } + _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) + if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerClosingTag") + } + if _innerClosingTagErr != nil { + return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") + } if popErr := writeBuffer.PopContext("BACnetNotificationParametersBufferReady"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetNotificationParametersBufferReady") @@ -347,6 +351,7 @@ func (m *_BACnetNotificationParametersBufferReady) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetNotificationParametersBufferReady) isBACnetNotificationParametersBufferReady() bool { return true } @@ -361,3 +366,6 @@ func (m *_BACnetNotificationParametersBufferReady) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfBitString.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfBitString.go index 8f6ebc1da54..330e9b5c946 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfBitString.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfBitString.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNotificationParametersChangeOfBitString is the corresponding interface of BACnetNotificationParametersChangeOfBitString type BACnetNotificationParametersChangeOfBitString interface { @@ -52,12 +54,14 @@ type BACnetNotificationParametersChangeOfBitStringExactly interface { // _BACnetNotificationParametersChangeOfBitString is the data-structure of this message type _BACnetNotificationParametersChangeOfBitString struct { *_BACnetNotificationParameters - InnerOpeningTag BACnetOpeningTag - ChangeOfBitString BACnetContextTagBitString - StatusFlags BACnetStatusFlagsTagged - InnerClosingTag BACnetClosingTag + InnerOpeningTag BACnetOpeningTag + ChangeOfBitString BACnetContextTagBitString + StatusFlags BACnetStatusFlagsTagged + InnerClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -68,16 +72,14 @@ type _BACnetNotificationParametersChangeOfBitString struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetNotificationParametersChangeOfBitString) InitializeParent(parent BACnetNotificationParameters, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetNotificationParametersChangeOfBitString) InitializeParent(parent BACnetNotificationParameters , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetNotificationParametersChangeOfBitString) GetParent() BACnetNotificationParameters { +func (m *_BACnetNotificationParametersChangeOfBitString) GetParent() BACnetNotificationParameters { return m._BACnetNotificationParameters } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -104,14 +106,15 @@ func (m *_BACnetNotificationParametersChangeOfBitString) GetInnerClosingTag() BA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNotificationParametersChangeOfBitString factory function for _BACnetNotificationParametersChangeOfBitString -func NewBACnetNotificationParametersChangeOfBitString(innerOpeningTag BACnetOpeningTag, changeOfBitString BACnetContextTagBitString, statusFlags BACnetStatusFlagsTagged, innerClosingTag BACnetClosingTag, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, objectTypeArgument BACnetObjectType) *_BACnetNotificationParametersChangeOfBitString { +func NewBACnetNotificationParametersChangeOfBitString( innerOpeningTag BACnetOpeningTag , changeOfBitString BACnetContextTagBitString , statusFlags BACnetStatusFlagsTagged , innerClosingTag BACnetClosingTag , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , objectTypeArgument BACnetObjectType ) *_BACnetNotificationParametersChangeOfBitString { _result := &_BACnetNotificationParametersChangeOfBitString{ - InnerOpeningTag: innerOpeningTag, - ChangeOfBitString: changeOfBitString, - StatusFlags: statusFlags, - InnerClosingTag: innerClosingTag, - _BACnetNotificationParameters: NewBACnetNotificationParameters(openingTag, peekedTagHeader, closingTag, tagNumber, objectTypeArgument), + InnerOpeningTag: innerOpeningTag, + ChangeOfBitString: changeOfBitString, + StatusFlags: statusFlags, + InnerClosingTag: innerClosingTag, + _BACnetNotificationParameters: NewBACnetNotificationParameters(openingTag, peekedTagHeader, closingTag, tagNumber, objectTypeArgument), } _result._BACnetNotificationParameters._BACnetNotificationParametersChildRequirements = _result return _result @@ -119,7 +122,7 @@ func NewBACnetNotificationParametersChangeOfBitString(innerOpeningTag BACnetOpen // Deprecated: use the interface for direct cast func CastBACnetNotificationParametersChangeOfBitString(structType interface{}) BACnetNotificationParametersChangeOfBitString { - if casted, ok := structType.(BACnetNotificationParametersChangeOfBitString); ok { + if casted, ok := structType.(BACnetNotificationParametersChangeOfBitString); ok { return casted } if casted, ok := structType.(*BACnetNotificationParametersChangeOfBitString); ok { @@ -150,6 +153,7 @@ func (m *_BACnetNotificationParametersChangeOfBitString) GetLengthInBits(ctx con return lengthInBits } + func (m *_BACnetNotificationParametersChangeOfBitString) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -171,7 +175,7 @@ func BACnetNotificationParametersChangeOfBitStringParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("innerOpeningTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerOpeningTag") } - _innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber)) +_innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) ) if _innerOpeningTagErr != nil { return nil, errors.Wrap(_innerOpeningTagErr, "Error parsing 'innerOpeningTag' field of BACnetNotificationParametersChangeOfBitString") } @@ -184,7 +188,7 @@ func BACnetNotificationParametersChangeOfBitStringParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("changeOfBitString"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for changeOfBitString") } - _changeOfBitString, _changeOfBitStringErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_BIT_STRING)) +_changeOfBitString, _changeOfBitStringErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_BIT_STRING ) ) if _changeOfBitStringErr != nil { return nil, errors.Wrap(_changeOfBitStringErr, "Error parsing 'changeOfBitString' field of BACnetNotificationParametersChangeOfBitString") } @@ -197,7 +201,7 @@ func BACnetNotificationParametersChangeOfBitStringParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("statusFlags"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for statusFlags") } - _statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _statusFlagsErr != nil { return nil, errors.Wrap(_statusFlagsErr, "Error parsing 'statusFlags' field of BACnetNotificationParametersChangeOfBitString") } @@ -210,7 +214,7 @@ func BACnetNotificationParametersChangeOfBitStringParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("innerClosingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerClosingTag") } - _innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber)) +_innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) ) if _innerClosingTagErr != nil { return nil, errors.Wrap(_innerClosingTagErr, "Error parsing 'innerClosingTag' field of BACnetNotificationParametersChangeOfBitString") } @@ -226,13 +230,13 @@ func BACnetNotificationParametersChangeOfBitStringParseWithBuffer(ctx context.Co // Create a partially initialized instance _child := &_BACnetNotificationParametersChangeOfBitString{ _BACnetNotificationParameters: &_BACnetNotificationParameters{ - TagNumber: tagNumber, + TagNumber: tagNumber, ObjectTypeArgument: objectTypeArgument, }, - InnerOpeningTag: innerOpeningTag, + InnerOpeningTag: innerOpeningTag, ChangeOfBitString: changeOfBitString, - StatusFlags: statusFlags, - InnerClosingTag: innerClosingTag, + StatusFlags: statusFlags, + InnerClosingTag: innerClosingTag, } _child._BACnetNotificationParameters._BACnetNotificationParametersChildRequirements = _child return _child, nil @@ -254,53 +258,53 @@ func (m *_BACnetNotificationParametersChangeOfBitString) SerializeWithWriteBuffe return errors.Wrap(pushErr, "Error pushing for BACnetNotificationParametersChangeOfBitString") } - // Simple Field (innerOpeningTag) - if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") - } - _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) - if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerOpeningTag") - } - if _innerOpeningTagErr != nil { - return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") - } + // Simple Field (innerOpeningTag) + if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") + } + _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) + if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerOpeningTag") + } + if _innerOpeningTagErr != nil { + return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") + } - // Simple Field (changeOfBitString) - if pushErr := writeBuffer.PushContext("changeOfBitString"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for changeOfBitString") - } - _changeOfBitStringErr := writeBuffer.WriteSerializable(ctx, m.GetChangeOfBitString()) - if popErr := writeBuffer.PopContext("changeOfBitString"); popErr != nil { - return errors.Wrap(popErr, "Error popping for changeOfBitString") - } - if _changeOfBitStringErr != nil { - return errors.Wrap(_changeOfBitStringErr, "Error serializing 'changeOfBitString' field") - } + // Simple Field (changeOfBitString) + if pushErr := writeBuffer.PushContext("changeOfBitString"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for changeOfBitString") + } + _changeOfBitStringErr := writeBuffer.WriteSerializable(ctx, m.GetChangeOfBitString()) + if popErr := writeBuffer.PopContext("changeOfBitString"); popErr != nil { + return errors.Wrap(popErr, "Error popping for changeOfBitString") + } + if _changeOfBitStringErr != nil { + return errors.Wrap(_changeOfBitStringErr, "Error serializing 'changeOfBitString' field") + } - // Simple Field (statusFlags) - if pushErr := writeBuffer.PushContext("statusFlags"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for statusFlags") - } - _statusFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetStatusFlags()) - if popErr := writeBuffer.PopContext("statusFlags"); popErr != nil { - return errors.Wrap(popErr, "Error popping for statusFlags") - } - if _statusFlagsErr != nil { - return errors.Wrap(_statusFlagsErr, "Error serializing 'statusFlags' field") - } + // Simple Field (statusFlags) + if pushErr := writeBuffer.PushContext("statusFlags"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for statusFlags") + } + _statusFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetStatusFlags()) + if popErr := writeBuffer.PopContext("statusFlags"); popErr != nil { + return errors.Wrap(popErr, "Error popping for statusFlags") + } + if _statusFlagsErr != nil { + return errors.Wrap(_statusFlagsErr, "Error serializing 'statusFlags' field") + } - // Simple Field (innerClosingTag) - if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerClosingTag") - } - _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) - if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerClosingTag") - } - if _innerClosingTagErr != nil { - return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") - } + // Simple Field (innerClosingTag) + if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerClosingTag") + } + _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) + if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerClosingTag") + } + if _innerClosingTagErr != nil { + return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") + } if popErr := writeBuffer.PopContext("BACnetNotificationParametersChangeOfBitString"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetNotificationParametersChangeOfBitString") @@ -310,6 +314,7 @@ func (m *_BACnetNotificationParametersChangeOfBitString) SerializeWithWriteBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetNotificationParametersChangeOfBitString) isBACnetNotificationParametersChangeOfBitString() bool { return true } @@ -324,3 +329,6 @@ func (m *_BACnetNotificationParametersChangeOfBitString) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfCharacterString.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfCharacterString.go index 09cdb0e1983..02ed7aea7d6 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfCharacterString.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfCharacterString.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNotificationParametersChangeOfCharacterString is the corresponding interface of BACnetNotificationParametersChangeOfCharacterString type BACnetNotificationParametersChangeOfCharacterString interface { @@ -54,13 +56,15 @@ type BACnetNotificationParametersChangeOfCharacterStringExactly interface { // _BACnetNotificationParametersChangeOfCharacterString is the data-structure of this message type _BACnetNotificationParametersChangeOfCharacterString struct { *_BACnetNotificationParameters - InnerOpeningTag BACnetOpeningTag - ChangedValue BACnetContextTagCharacterString - StatusFlags BACnetStatusFlagsTagged - AlarmValue BACnetContextTagCharacterString - InnerClosingTag BACnetClosingTag + InnerOpeningTag BACnetOpeningTag + ChangedValue BACnetContextTagCharacterString + StatusFlags BACnetStatusFlagsTagged + AlarmValue BACnetContextTagCharacterString + InnerClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -71,16 +75,14 @@ type _BACnetNotificationParametersChangeOfCharacterString struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetNotificationParametersChangeOfCharacterString) InitializeParent(parent BACnetNotificationParameters, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetNotificationParametersChangeOfCharacterString) InitializeParent(parent BACnetNotificationParameters , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetNotificationParametersChangeOfCharacterString) GetParent() BACnetNotificationParameters { +func (m *_BACnetNotificationParametersChangeOfCharacterString) GetParent() BACnetNotificationParameters { return m._BACnetNotificationParameters } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -111,15 +113,16 @@ func (m *_BACnetNotificationParametersChangeOfCharacterString) GetInnerClosingTa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNotificationParametersChangeOfCharacterString factory function for _BACnetNotificationParametersChangeOfCharacterString -func NewBACnetNotificationParametersChangeOfCharacterString(innerOpeningTag BACnetOpeningTag, changedValue BACnetContextTagCharacterString, statusFlags BACnetStatusFlagsTagged, alarmValue BACnetContextTagCharacterString, innerClosingTag BACnetClosingTag, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, objectTypeArgument BACnetObjectType) *_BACnetNotificationParametersChangeOfCharacterString { +func NewBACnetNotificationParametersChangeOfCharacterString( innerOpeningTag BACnetOpeningTag , changedValue BACnetContextTagCharacterString , statusFlags BACnetStatusFlagsTagged , alarmValue BACnetContextTagCharacterString , innerClosingTag BACnetClosingTag , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , objectTypeArgument BACnetObjectType ) *_BACnetNotificationParametersChangeOfCharacterString { _result := &_BACnetNotificationParametersChangeOfCharacterString{ - InnerOpeningTag: innerOpeningTag, - ChangedValue: changedValue, - StatusFlags: statusFlags, - AlarmValue: alarmValue, - InnerClosingTag: innerClosingTag, - _BACnetNotificationParameters: NewBACnetNotificationParameters(openingTag, peekedTagHeader, closingTag, tagNumber, objectTypeArgument), + InnerOpeningTag: innerOpeningTag, + ChangedValue: changedValue, + StatusFlags: statusFlags, + AlarmValue: alarmValue, + InnerClosingTag: innerClosingTag, + _BACnetNotificationParameters: NewBACnetNotificationParameters(openingTag, peekedTagHeader, closingTag, tagNumber, objectTypeArgument), } _result._BACnetNotificationParameters._BACnetNotificationParametersChildRequirements = _result return _result @@ -127,7 +130,7 @@ func NewBACnetNotificationParametersChangeOfCharacterString(innerOpeningTag BACn // Deprecated: use the interface for direct cast func CastBACnetNotificationParametersChangeOfCharacterString(structType interface{}) BACnetNotificationParametersChangeOfCharacterString { - if casted, ok := structType.(BACnetNotificationParametersChangeOfCharacterString); ok { + if casted, ok := structType.(BACnetNotificationParametersChangeOfCharacterString); ok { return casted } if casted, ok := structType.(*BACnetNotificationParametersChangeOfCharacterString); ok { @@ -161,6 +164,7 @@ func (m *_BACnetNotificationParametersChangeOfCharacterString) GetLengthInBits(c return lengthInBits } + func (m *_BACnetNotificationParametersChangeOfCharacterString) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -182,7 +186,7 @@ func BACnetNotificationParametersChangeOfCharacterStringParseWithBuffer(ctx cont if pullErr := readBuffer.PullContext("innerOpeningTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerOpeningTag") } - _innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber)) +_innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) ) if _innerOpeningTagErr != nil { return nil, errors.Wrap(_innerOpeningTagErr, "Error parsing 'innerOpeningTag' field of BACnetNotificationParametersChangeOfCharacterString") } @@ -195,7 +199,7 @@ func BACnetNotificationParametersChangeOfCharacterStringParseWithBuffer(ctx cont if pullErr := readBuffer.PullContext("changedValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for changedValue") } - _changedValue, _changedValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_CHARACTER_STRING)) +_changedValue, _changedValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_CHARACTER_STRING ) ) if _changedValueErr != nil { return nil, errors.Wrap(_changedValueErr, "Error parsing 'changedValue' field of BACnetNotificationParametersChangeOfCharacterString") } @@ -208,7 +212,7 @@ func BACnetNotificationParametersChangeOfCharacterStringParseWithBuffer(ctx cont if pullErr := readBuffer.PullContext("statusFlags"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for statusFlags") } - _statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _statusFlagsErr != nil { return nil, errors.Wrap(_statusFlagsErr, "Error parsing 'statusFlags' field of BACnetNotificationParametersChangeOfCharacterString") } @@ -221,7 +225,7 @@ func BACnetNotificationParametersChangeOfCharacterStringParseWithBuffer(ctx cont if pullErr := readBuffer.PullContext("alarmValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for alarmValue") } - _alarmValue, _alarmValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), BACnetDataType(BACnetDataType_CHARACTER_STRING)) +_alarmValue, _alarmValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , BACnetDataType( BACnetDataType_CHARACTER_STRING ) ) if _alarmValueErr != nil { return nil, errors.Wrap(_alarmValueErr, "Error parsing 'alarmValue' field of BACnetNotificationParametersChangeOfCharacterString") } @@ -234,7 +238,7 @@ func BACnetNotificationParametersChangeOfCharacterStringParseWithBuffer(ctx cont if pullErr := readBuffer.PullContext("innerClosingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerClosingTag") } - _innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber)) +_innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) ) if _innerClosingTagErr != nil { return nil, errors.Wrap(_innerClosingTagErr, "Error parsing 'innerClosingTag' field of BACnetNotificationParametersChangeOfCharacterString") } @@ -250,13 +254,13 @@ func BACnetNotificationParametersChangeOfCharacterStringParseWithBuffer(ctx cont // Create a partially initialized instance _child := &_BACnetNotificationParametersChangeOfCharacterString{ _BACnetNotificationParameters: &_BACnetNotificationParameters{ - TagNumber: tagNumber, + TagNumber: tagNumber, ObjectTypeArgument: objectTypeArgument, }, InnerOpeningTag: innerOpeningTag, - ChangedValue: changedValue, - StatusFlags: statusFlags, - AlarmValue: alarmValue, + ChangedValue: changedValue, + StatusFlags: statusFlags, + AlarmValue: alarmValue, InnerClosingTag: innerClosingTag, } _child._BACnetNotificationParameters._BACnetNotificationParametersChildRequirements = _child @@ -279,65 +283,65 @@ func (m *_BACnetNotificationParametersChangeOfCharacterString) SerializeWithWrit return errors.Wrap(pushErr, "Error pushing for BACnetNotificationParametersChangeOfCharacterString") } - // Simple Field (innerOpeningTag) - if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") - } - _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) - if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerOpeningTag") - } - if _innerOpeningTagErr != nil { - return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") - } + // Simple Field (innerOpeningTag) + if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") + } + _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) + if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerOpeningTag") + } + if _innerOpeningTagErr != nil { + return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") + } - // Simple Field (changedValue) - if pushErr := writeBuffer.PushContext("changedValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for changedValue") - } - _changedValueErr := writeBuffer.WriteSerializable(ctx, m.GetChangedValue()) - if popErr := writeBuffer.PopContext("changedValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for changedValue") - } - if _changedValueErr != nil { - return errors.Wrap(_changedValueErr, "Error serializing 'changedValue' field") - } + // Simple Field (changedValue) + if pushErr := writeBuffer.PushContext("changedValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for changedValue") + } + _changedValueErr := writeBuffer.WriteSerializable(ctx, m.GetChangedValue()) + if popErr := writeBuffer.PopContext("changedValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for changedValue") + } + if _changedValueErr != nil { + return errors.Wrap(_changedValueErr, "Error serializing 'changedValue' field") + } - // Simple Field (statusFlags) - if pushErr := writeBuffer.PushContext("statusFlags"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for statusFlags") - } - _statusFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetStatusFlags()) - if popErr := writeBuffer.PopContext("statusFlags"); popErr != nil { - return errors.Wrap(popErr, "Error popping for statusFlags") - } - if _statusFlagsErr != nil { - return errors.Wrap(_statusFlagsErr, "Error serializing 'statusFlags' field") - } + // Simple Field (statusFlags) + if pushErr := writeBuffer.PushContext("statusFlags"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for statusFlags") + } + _statusFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetStatusFlags()) + if popErr := writeBuffer.PopContext("statusFlags"); popErr != nil { + return errors.Wrap(popErr, "Error popping for statusFlags") + } + if _statusFlagsErr != nil { + return errors.Wrap(_statusFlagsErr, "Error serializing 'statusFlags' field") + } - // Simple Field (alarmValue) - if pushErr := writeBuffer.PushContext("alarmValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for alarmValue") - } - _alarmValueErr := writeBuffer.WriteSerializable(ctx, m.GetAlarmValue()) - if popErr := writeBuffer.PopContext("alarmValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for alarmValue") - } - if _alarmValueErr != nil { - return errors.Wrap(_alarmValueErr, "Error serializing 'alarmValue' field") - } + // Simple Field (alarmValue) + if pushErr := writeBuffer.PushContext("alarmValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for alarmValue") + } + _alarmValueErr := writeBuffer.WriteSerializable(ctx, m.GetAlarmValue()) + if popErr := writeBuffer.PopContext("alarmValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for alarmValue") + } + if _alarmValueErr != nil { + return errors.Wrap(_alarmValueErr, "Error serializing 'alarmValue' field") + } - // Simple Field (innerClosingTag) - if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerClosingTag") - } - _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) - if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerClosingTag") - } - if _innerClosingTagErr != nil { - return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") - } + // Simple Field (innerClosingTag) + if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerClosingTag") + } + _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) + if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerClosingTag") + } + if _innerClosingTagErr != nil { + return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") + } if popErr := writeBuffer.PopContext("BACnetNotificationParametersChangeOfCharacterString"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetNotificationParametersChangeOfCharacterString") @@ -347,6 +351,7 @@ func (m *_BACnetNotificationParametersChangeOfCharacterString) SerializeWithWrit return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetNotificationParametersChangeOfCharacterString) isBACnetNotificationParametersChangeOfCharacterString() bool { return true } @@ -361,3 +366,6 @@ func (m *_BACnetNotificationParametersChangeOfCharacterString) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValue.go index 27614fcb81f..553afd27e4d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNotificationParametersChangeOfDiscreteValue is the corresponding interface of BACnetNotificationParametersChangeOfDiscreteValue type BACnetNotificationParametersChangeOfDiscreteValue interface { @@ -52,12 +54,14 @@ type BACnetNotificationParametersChangeOfDiscreteValueExactly interface { // _BACnetNotificationParametersChangeOfDiscreteValue is the data-structure of this message type _BACnetNotificationParametersChangeOfDiscreteValue struct { *_BACnetNotificationParameters - InnerOpeningTag BACnetOpeningTag - NewValue BACnetNotificationParametersChangeOfDiscreteValueNewValue - StatusFlags BACnetStatusFlagsTagged - InnerClosingTag BACnetClosingTag + InnerOpeningTag BACnetOpeningTag + NewValue BACnetNotificationParametersChangeOfDiscreteValueNewValue + StatusFlags BACnetStatusFlagsTagged + InnerClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -68,16 +72,14 @@ type _BACnetNotificationParametersChangeOfDiscreteValue struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetNotificationParametersChangeOfDiscreteValue) InitializeParent(parent BACnetNotificationParameters, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetNotificationParametersChangeOfDiscreteValue) InitializeParent(parent BACnetNotificationParameters , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetNotificationParametersChangeOfDiscreteValue) GetParent() BACnetNotificationParameters { +func (m *_BACnetNotificationParametersChangeOfDiscreteValue) GetParent() BACnetNotificationParameters { return m._BACnetNotificationParameters } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -104,14 +106,15 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValue) GetInnerClosingTag( /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNotificationParametersChangeOfDiscreteValue factory function for _BACnetNotificationParametersChangeOfDiscreteValue -func NewBACnetNotificationParametersChangeOfDiscreteValue(innerOpeningTag BACnetOpeningTag, newValue BACnetNotificationParametersChangeOfDiscreteValueNewValue, statusFlags BACnetStatusFlagsTagged, innerClosingTag BACnetClosingTag, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, objectTypeArgument BACnetObjectType) *_BACnetNotificationParametersChangeOfDiscreteValue { +func NewBACnetNotificationParametersChangeOfDiscreteValue( innerOpeningTag BACnetOpeningTag , newValue BACnetNotificationParametersChangeOfDiscreteValueNewValue , statusFlags BACnetStatusFlagsTagged , innerClosingTag BACnetClosingTag , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , objectTypeArgument BACnetObjectType ) *_BACnetNotificationParametersChangeOfDiscreteValue { _result := &_BACnetNotificationParametersChangeOfDiscreteValue{ - InnerOpeningTag: innerOpeningTag, - NewValue: newValue, - StatusFlags: statusFlags, - InnerClosingTag: innerClosingTag, - _BACnetNotificationParameters: NewBACnetNotificationParameters(openingTag, peekedTagHeader, closingTag, tagNumber, objectTypeArgument), + InnerOpeningTag: innerOpeningTag, + NewValue: newValue, + StatusFlags: statusFlags, + InnerClosingTag: innerClosingTag, + _BACnetNotificationParameters: NewBACnetNotificationParameters(openingTag, peekedTagHeader, closingTag, tagNumber, objectTypeArgument), } _result._BACnetNotificationParameters._BACnetNotificationParametersChildRequirements = _result return _result @@ -119,7 +122,7 @@ func NewBACnetNotificationParametersChangeOfDiscreteValue(innerOpeningTag BACnet // Deprecated: use the interface for direct cast func CastBACnetNotificationParametersChangeOfDiscreteValue(structType interface{}) BACnetNotificationParametersChangeOfDiscreteValue { - if casted, ok := structType.(BACnetNotificationParametersChangeOfDiscreteValue); ok { + if casted, ok := structType.(BACnetNotificationParametersChangeOfDiscreteValue); ok { return casted } if casted, ok := structType.(*BACnetNotificationParametersChangeOfDiscreteValue); ok { @@ -150,6 +153,7 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValue) GetLengthInBits(ctx return lengthInBits } + func (m *_BACnetNotificationParametersChangeOfDiscreteValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -171,7 +175,7 @@ func BACnetNotificationParametersChangeOfDiscreteValueParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("innerOpeningTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerOpeningTag") } - _innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber)) +_innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) ) if _innerOpeningTagErr != nil { return nil, errors.Wrap(_innerOpeningTagErr, "Error parsing 'innerOpeningTag' field of BACnetNotificationParametersChangeOfDiscreteValue") } @@ -184,7 +188,7 @@ func BACnetNotificationParametersChangeOfDiscreteValueParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("newValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for newValue") } - _newValue, _newValueErr := BACnetNotificationParametersChangeOfDiscreteValueNewValueParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_newValue, _newValueErr := BACnetNotificationParametersChangeOfDiscreteValueNewValueParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _newValueErr != nil { return nil, errors.Wrap(_newValueErr, "Error parsing 'newValue' field of BACnetNotificationParametersChangeOfDiscreteValue") } @@ -197,7 +201,7 @@ func BACnetNotificationParametersChangeOfDiscreteValueParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("statusFlags"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for statusFlags") } - _statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _statusFlagsErr != nil { return nil, errors.Wrap(_statusFlagsErr, "Error parsing 'statusFlags' field of BACnetNotificationParametersChangeOfDiscreteValue") } @@ -210,7 +214,7 @@ func BACnetNotificationParametersChangeOfDiscreteValueParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("innerClosingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerClosingTag") } - _innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber)) +_innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) ) if _innerClosingTagErr != nil { return nil, errors.Wrap(_innerClosingTagErr, "Error parsing 'innerClosingTag' field of BACnetNotificationParametersChangeOfDiscreteValue") } @@ -226,12 +230,12 @@ func BACnetNotificationParametersChangeOfDiscreteValueParseWithBuffer(ctx contex // Create a partially initialized instance _child := &_BACnetNotificationParametersChangeOfDiscreteValue{ _BACnetNotificationParameters: &_BACnetNotificationParameters{ - TagNumber: tagNumber, + TagNumber: tagNumber, ObjectTypeArgument: objectTypeArgument, }, InnerOpeningTag: innerOpeningTag, - NewValue: newValue, - StatusFlags: statusFlags, + NewValue: newValue, + StatusFlags: statusFlags, InnerClosingTag: innerClosingTag, } _child._BACnetNotificationParameters._BACnetNotificationParametersChildRequirements = _child @@ -254,53 +258,53 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValue) SerializeWithWriteB return errors.Wrap(pushErr, "Error pushing for BACnetNotificationParametersChangeOfDiscreteValue") } - // Simple Field (innerOpeningTag) - if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") - } - _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) - if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerOpeningTag") - } - if _innerOpeningTagErr != nil { - return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") - } + // Simple Field (innerOpeningTag) + if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") + } + _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) + if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerOpeningTag") + } + if _innerOpeningTagErr != nil { + return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") + } - // Simple Field (newValue) - if pushErr := writeBuffer.PushContext("newValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for newValue") - } - _newValueErr := writeBuffer.WriteSerializable(ctx, m.GetNewValue()) - if popErr := writeBuffer.PopContext("newValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for newValue") - } - if _newValueErr != nil { - return errors.Wrap(_newValueErr, "Error serializing 'newValue' field") - } + // Simple Field (newValue) + if pushErr := writeBuffer.PushContext("newValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for newValue") + } + _newValueErr := writeBuffer.WriteSerializable(ctx, m.GetNewValue()) + if popErr := writeBuffer.PopContext("newValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for newValue") + } + if _newValueErr != nil { + return errors.Wrap(_newValueErr, "Error serializing 'newValue' field") + } - // Simple Field (statusFlags) - if pushErr := writeBuffer.PushContext("statusFlags"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for statusFlags") - } - _statusFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetStatusFlags()) - if popErr := writeBuffer.PopContext("statusFlags"); popErr != nil { - return errors.Wrap(popErr, "Error popping for statusFlags") - } - if _statusFlagsErr != nil { - return errors.Wrap(_statusFlagsErr, "Error serializing 'statusFlags' field") - } + // Simple Field (statusFlags) + if pushErr := writeBuffer.PushContext("statusFlags"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for statusFlags") + } + _statusFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetStatusFlags()) + if popErr := writeBuffer.PopContext("statusFlags"); popErr != nil { + return errors.Wrap(popErr, "Error popping for statusFlags") + } + if _statusFlagsErr != nil { + return errors.Wrap(_statusFlagsErr, "Error serializing 'statusFlags' field") + } - // Simple Field (innerClosingTag) - if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerClosingTag") - } - _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) - if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerClosingTag") - } - if _innerClosingTagErr != nil { - return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") - } + // Simple Field (innerClosingTag) + if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerClosingTag") + } + _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) + if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerClosingTag") + } + if _innerClosingTagErr != nil { + return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") + } if popErr := writeBuffer.PopContext("BACnetNotificationParametersChangeOfDiscreteValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetNotificationParametersChangeOfDiscreteValue") @@ -310,6 +314,7 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValue) SerializeWithWriteB return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetNotificationParametersChangeOfDiscreteValue) isBACnetNotificationParametersChangeOfDiscreteValue() bool { return true } @@ -324,3 +329,6 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValue.go index 792dc7e65bc..fe081bffecd 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNotificationParametersChangeOfDiscreteValueNewValue is the corresponding interface of BACnetNotificationParametersChangeOfDiscreteValueNewValue type BACnetNotificationParametersChangeOfDiscreteValueNewValue interface { @@ -53,9 +55,9 @@ type BACnetNotificationParametersChangeOfDiscreteValueNewValueExactly interface // _BACnetNotificationParametersChangeOfDiscreteValueNewValue is the data-structure of this message type _BACnetNotificationParametersChangeOfDiscreteValueNewValue struct { _BACnetNotificationParametersChangeOfDiscreteValueNewValueChildRequirements - OpeningTag BACnetOpeningTag - PeekedTagHeader BACnetTagHeader - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + PeekedTagHeader BACnetTagHeader + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 @@ -66,6 +68,7 @@ type _BACnetNotificationParametersChangeOfDiscreteValueNewValueChildRequirements GetLengthInBits(ctx context.Context) uint16 } + type BACnetNotificationParametersChangeOfDiscreteValueNewValueParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetNotificationParametersChangeOfDiscreteValueNewValue, serializeChildFunction func() error) error GetTypeName() string @@ -73,13 +76,12 @@ type BACnetNotificationParametersChangeOfDiscreteValueNewValueParent interface { type BACnetNotificationParametersChangeOfDiscreteValueNewValueChild interface { utils.Serializable - InitializeParent(parent BACnetNotificationParametersChangeOfDiscreteValueNewValue, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) +InitializeParent(parent BACnetNotificationParametersChangeOfDiscreteValueNewValue , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) GetParent() *BACnetNotificationParametersChangeOfDiscreteValueNewValue GetTypeName() string BACnetNotificationParametersChangeOfDiscreteValueNewValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -123,14 +125,15 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValue) GetPeekedIs /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNotificationParametersChangeOfDiscreteValueNewValue factory function for _BACnetNotificationParametersChangeOfDiscreteValueNewValue -func NewBACnetNotificationParametersChangeOfDiscreteValueNewValue(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetNotificationParametersChangeOfDiscreteValueNewValue { - return &_BACnetNotificationParametersChangeOfDiscreteValueNewValue{OpeningTag: openingTag, PeekedTagHeader: peekedTagHeader, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetNotificationParametersChangeOfDiscreteValueNewValue( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetNotificationParametersChangeOfDiscreteValueNewValue { +return &_BACnetNotificationParametersChangeOfDiscreteValueNewValue{ OpeningTag: openingTag , PeekedTagHeader: peekedTagHeader , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetNotificationParametersChangeOfDiscreteValueNewValue(structType interface{}) BACnetNotificationParametersChangeOfDiscreteValueNewValue { - if casted, ok := structType.(BACnetNotificationParametersChangeOfDiscreteValueNewValue); ok { + if casted, ok := structType.(BACnetNotificationParametersChangeOfDiscreteValueNewValue); ok { return casted } if casted, ok := structType.(*BACnetNotificationParametersChangeOfDiscreteValueNewValue); ok { @@ -143,6 +146,7 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValue) GetTypeName return "BACnetNotificationParametersChangeOfDiscreteValueNewValue" } + func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValue) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -180,7 +184,7 @@ func BACnetNotificationParametersChangeOfDiscreteValueNewValueParseWithBuffer(ct if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetNotificationParametersChangeOfDiscreteValueNewValue") } @@ -189,13 +193,13 @@ func BACnetNotificationParametersChangeOfDiscreteValueNewValueParseWithBuffer(ct return nil, errors.Wrap(closeErr, "Error closing for openingTag") } - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Virtual field _peekedTagNumber := peekedTagHeader.GetActualTagNumber() @@ -208,39 +212,39 @@ func BACnetNotificationParametersChangeOfDiscreteValueNewValueParseWithBuffer(ct _ = peekedIsContextTag // Validation - if !(bool((!(peekedIsContextTag))) || bool((bool(bool(peekedIsContextTag) && bool(bool((peekedTagHeader.GetLengthValueType()) != (0x6)))) && bool(bool((peekedTagHeader.GetLengthValueType()) != (0x7)))))) { + if (!(bool((!(peekedIsContextTag))) || bool((bool(bool(peekedIsContextTag) && bool(bool((peekedTagHeader.GetLengthValueType()) != (0x6)))) && bool(bool((peekedTagHeader.GetLengthValueType()) != (0x7))))))) { return nil, errors.WithStack(utils.ParseValidationError{"unexpected opening or closing tag"}) } // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetNotificationParametersChangeOfDiscreteValueNewValueChildSerializeRequirement interface { BACnetNotificationParametersChangeOfDiscreteValueNewValue - InitializeParent(BACnetNotificationParametersChangeOfDiscreteValueNewValue, BACnetOpeningTag, BACnetTagHeader, BACnetClosingTag) + InitializeParent(BACnetNotificationParametersChangeOfDiscreteValueNewValue, BACnetOpeningTag, BACnetTagHeader, BACnetClosingTag) GetParent() BACnetNotificationParametersChangeOfDiscreteValueNewValue } var _childTemp interface{} var _child BACnetNotificationParametersChangeOfDiscreteValueNewValueChildSerializeRequirement var typeSwitchError error switch { - case peekedTagNumber == 0x1 && peekedIsContextTag == bool(false): // BACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean +case peekedTagNumber == 0x1 && peekedIsContextTag == bool(false) : // BACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean _childTemp, typeSwitchError = BACnetNotificationParametersChangeOfDiscreteValueNewValueBooleanParseWithBuffer(ctx, readBuffer, tagNumber) - case peekedTagNumber == 0x2 && peekedIsContextTag == bool(false): // BACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned +case peekedTagNumber == 0x2 && peekedIsContextTag == bool(false) : // BACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned _childTemp, typeSwitchError = BACnetNotificationParametersChangeOfDiscreteValueNewValueUnsignedParseWithBuffer(ctx, readBuffer, tagNumber) - case peekedTagNumber == 0x3 && peekedIsContextTag == bool(false): // BACnetNotificationParametersChangeOfDiscreteValueNewValueInteger +case peekedTagNumber == 0x3 && peekedIsContextTag == bool(false) : // BACnetNotificationParametersChangeOfDiscreteValueNewValueInteger _childTemp, typeSwitchError = BACnetNotificationParametersChangeOfDiscreteValueNewValueIntegerParseWithBuffer(ctx, readBuffer, tagNumber) - case peekedTagNumber == 0x9 && peekedIsContextTag == bool(false): // BACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated +case peekedTagNumber == 0x9 && peekedIsContextTag == bool(false) : // BACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated _childTemp, typeSwitchError = BACnetNotificationParametersChangeOfDiscreteValueNewValueEnumeratedParseWithBuffer(ctx, readBuffer, tagNumber) - case peekedTagNumber == 0x7 && peekedIsContextTag == bool(false): // BACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterString +case peekedTagNumber == 0x7 && peekedIsContextTag == bool(false) : // BACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterString _childTemp, typeSwitchError = BACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterStringParseWithBuffer(ctx, readBuffer, tagNumber) - case peekedTagNumber == 0x6 && peekedIsContextTag == bool(false): // BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString +case peekedTagNumber == 0x6 && peekedIsContextTag == bool(false) : // BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString _childTemp, typeSwitchError = BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetStringParseWithBuffer(ctx, readBuffer, tagNumber) - case peekedTagNumber == 0xA && peekedIsContextTag == bool(false): // BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate +case peekedTagNumber == 0xA && peekedIsContextTag == bool(false) : // BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate _childTemp, typeSwitchError = BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDateParseWithBuffer(ctx, readBuffer, tagNumber) - case peekedTagNumber == 0xB && peekedIsContextTag == bool(false): // BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime +case peekedTagNumber == 0xB && peekedIsContextTag == bool(false) : // BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime _childTemp, typeSwitchError = BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTimeParseWithBuffer(ctx, readBuffer, tagNumber) - case peekedTagNumber == 0xC && peekedIsContextTag == bool(false): // BACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentifier +case peekedTagNumber == 0xC && peekedIsContextTag == bool(false) : // BACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentifier _childTemp, typeSwitchError = BACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentifierParseWithBuffer(ctx, readBuffer, tagNumber) - case peekedTagNumber == uint8(0) && peekedIsContextTag == bool(true): // BACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime +case peekedTagNumber == uint8(0) && peekedIsContextTag == bool(true) : // BACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime _childTemp, typeSwitchError = BACnetNotificationParametersChangeOfDiscreteValueNewValueDatetimeParseWithBuffer(ctx, readBuffer, tagNumber) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedTagNumber=%v, peekedIsContextTag=%v]", peekedTagNumber, peekedIsContextTag) @@ -254,7 +258,7 @@ func BACnetNotificationParametersChangeOfDiscreteValueNewValueParseWithBuffer(ct if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetNotificationParametersChangeOfDiscreteValueNewValue") } @@ -268,7 +272,7 @@ func BACnetNotificationParametersChangeOfDiscreteValueNewValueParseWithBuffer(ct } // Finish initializing - _child.InitializeParent(_child, openingTag, peekedTagHeader, closingTag) +_child.InitializeParent(_child , openingTag , peekedTagHeader , closingTag ) return _child, nil } @@ -278,7 +282,7 @@ func (pm *_BACnetNotificationParametersChangeOfDiscreteValueNewValue) SerializeP _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetNotificationParametersChangeOfDiscreteValueNewValue"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetNotificationParametersChangeOfDiscreteValueNewValue"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetNotificationParametersChangeOfDiscreteValueNewValue") } @@ -325,13 +329,13 @@ func (pm *_BACnetNotificationParametersChangeOfDiscreteValueNewValue) SerializeP return nil } + //// // Arguments Getter func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValue) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -349,3 +353,6 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValue) String() st } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean.go index 99a77073036..689740f5992 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean is the corresponding interface of BACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean type BACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean interface { @@ -46,9 +48,11 @@ type BACnetNotificationParametersChangeOfDiscreteValueNewValueBooleanExactly int // _BACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean is the data-structure of this message type _BACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean struct { *_BACnetNotificationParametersChangeOfDiscreteValueNewValue - BooleanValue BACnetApplicationTagBoolean + BooleanValue BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,16 +63,14 @@ type _BACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean) InitializeParent(parent BACnetNotificationParametersChangeOfDiscreteValueNewValue, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean) InitializeParent(parent BACnetNotificationParametersChangeOfDiscreteValueNewValue , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean) GetParent() BACnetNotificationParametersChangeOfDiscreteValueNewValue { +func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean) GetParent() BACnetNotificationParametersChangeOfDiscreteValueNewValue { return m._BACnetNotificationParametersChangeOfDiscreteValueNewValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean) GetB /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean factory function for _BACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean -func NewBACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean(booleanValue BACnetApplicationTagBoolean, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean { +func NewBACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean( booleanValue BACnetApplicationTagBoolean , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean { _result := &_BACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean{ BooleanValue: booleanValue, - _BACnetNotificationParametersChangeOfDiscreteValueNewValue: NewBACnetNotificationParametersChangeOfDiscreteValueNewValue(openingTag, peekedTagHeader, closingTag, tagNumber), + _BACnetNotificationParametersChangeOfDiscreteValueNewValue: NewBACnetNotificationParametersChangeOfDiscreteValueNewValue(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetNotificationParametersChangeOfDiscreteValueNewValue._BACnetNotificationParametersChangeOfDiscreteValueNewValueChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean(boolean // Deprecated: use the interface for direct cast func CastBACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean(structType interface{}) BACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean { - if casted, ok := structType.(BACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean); ok { + if casted, ok := structType.(BACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean); ok { return casted } if casted, ok := structType.(*BACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean); ok { @@ -117,6 +120,7 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean) GetL return lengthInBits } + func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetNotificationParametersChangeOfDiscreteValueNewValueBooleanParseWithBu if pullErr := readBuffer.PullContext("booleanValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for booleanValue") } - _booleanValue, _booleanValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_booleanValue, _booleanValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _booleanValueErr != nil { return nil, errors.Wrap(_booleanValueErr, "Error parsing 'booleanValue' field of BACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean") } @@ -178,17 +182,17 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean) Seri return errors.Wrap(pushErr, "Error pushing for BACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean") } - // Simple Field (booleanValue) - if pushErr := writeBuffer.PushContext("booleanValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for booleanValue") - } - _booleanValueErr := writeBuffer.WriteSerializable(ctx, m.GetBooleanValue()) - if popErr := writeBuffer.PopContext("booleanValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for booleanValue") - } - if _booleanValueErr != nil { - return errors.Wrap(_booleanValueErr, "Error serializing 'booleanValue' field") - } + // Simple Field (booleanValue) + if pushErr := writeBuffer.PushContext("booleanValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for booleanValue") + } + _booleanValueErr := writeBuffer.WriteSerializable(ctx, m.GetBooleanValue()) + if popErr := writeBuffer.PopContext("booleanValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for booleanValue") + } + if _booleanValueErr != nil { + return errors.Wrap(_booleanValueErr, "Error serializing 'booleanValue' field") + } if popErr := writeBuffer.PopContext("BACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean") @@ -198,6 +202,7 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean) Seri return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean) isBACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueBoolean) Stri } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterString.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterString.go index 8abf308d9c8..b7dca8eaf59 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterString.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterString.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterString is the corresponding interface of BACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterString type BACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterString interface { @@ -46,9 +48,11 @@ type BACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterStringExa // _BACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterString is the data-structure of this message type _BACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterString struct { *_BACnetNotificationParametersChangeOfDiscreteValueNewValue - CharacterStringValue BACnetApplicationTagCharacterString + CharacterStringValue BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,16 +63,14 @@ type _BACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterString s /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterString) InitializeParent(parent BACnetNotificationParametersChangeOfDiscreteValueNewValue, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterString) InitializeParent(parent BACnetNotificationParametersChangeOfDiscreteValueNewValue , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterString) GetParent() BACnetNotificationParametersChangeOfDiscreteValueNewValue { +func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterString) GetParent() BACnetNotificationParametersChangeOfDiscreteValueNewValue { return m._BACnetNotificationParametersChangeOfDiscreteValueNewValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterStri /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterString factory function for _BACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterString -func NewBACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterString(characterStringValue BACnetApplicationTagCharacterString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterString { +func NewBACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterString( characterStringValue BACnetApplicationTagCharacterString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterString { _result := &_BACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterString{ CharacterStringValue: characterStringValue, - _BACnetNotificationParametersChangeOfDiscreteValueNewValue: NewBACnetNotificationParametersChangeOfDiscreteValueNewValue(openingTag, peekedTagHeader, closingTag, tagNumber), + _BACnetNotificationParametersChangeOfDiscreteValueNewValue: NewBACnetNotificationParametersChangeOfDiscreteValueNewValue(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetNotificationParametersChangeOfDiscreteValueNewValue._BACnetNotificationParametersChangeOfDiscreteValueNewValueChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterString // Deprecated: use the interface for direct cast func CastBACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterString(structType interface{}) BACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterString { - if casted, ok := structType.(BACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterString); ok { + if casted, ok := structType.(BACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterString); ok { return casted } if casted, ok := structType.(*BACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterString); ok { @@ -117,6 +120,7 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterStri return lengthInBits } + func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterString) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterStringPar if pullErr := readBuffer.PullContext("characterStringValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for characterStringValue") } - _characterStringValue, _characterStringValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_characterStringValue, _characterStringValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _characterStringValueErr != nil { return nil, errors.Wrap(_characterStringValueErr, "Error parsing 'characterStringValue' field of BACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterString") } @@ -178,17 +182,17 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterStri return errors.Wrap(pushErr, "Error pushing for BACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterString") } - // Simple Field (characterStringValue) - if pushErr := writeBuffer.PushContext("characterStringValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for characterStringValue") - } - _characterStringValueErr := writeBuffer.WriteSerializable(ctx, m.GetCharacterStringValue()) - if popErr := writeBuffer.PopContext("characterStringValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for characterStringValue") - } - if _characterStringValueErr != nil { - return errors.Wrap(_characterStringValueErr, "Error serializing 'characterStringValue' field") - } + // Simple Field (characterStringValue) + if pushErr := writeBuffer.PushContext("characterStringValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for characterStringValue") + } + _characterStringValueErr := writeBuffer.WriteSerializable(ctx, m.GetCharacterStringValue()) + if popErr := writeBuffer.PopContext("characterStringValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for characterStringValue") + } + if _characterStringValueErr != nil { + return errors.Wrap(_characterStringValueErr, "Error serializing 'characterStringValue' field") + } if popErr := writeBuffer.PopContext("BACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterString"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterString") @@ -198,6 +202,7 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterStri return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterString) isBACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterString() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueCharacterStri } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime.go index dc094cd55b6..f86b92e1048 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime is the corresponding interface of BACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime type BACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime interface { @@ -46,9 +48,11 @@ type BACnetNotificationParametersChangeOfDiscreteValueNewValueDatetimeExactly in // _BACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime is the data-structure of this message type _BACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime struct { *_BACnetNotificationParametersChangeOfDiscreteValueNewValue - DateTimeValue BACnetDateTimeEnclosed + DateTimeValue BACnetDateTimeEnclosed } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,16 +63,14 @@ type _BACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime) InitializeParent(parent BACnetNotificationParametersChangeOfDiscreteValueNewValue, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime) InitializeParent(parent BACnetNotificationParametersChangeOfDiscreteValueNewValue , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime) GetParent() BACnetNotificationParametersChangeOfDiscreteValueNewValue { +func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime) GetParent() BACnetNotificationParametersChangeOfDiscreteValueNewValue { return m._BACnetNotificationParametersChangeOfDiscreteValueNewValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime) Get /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime factory function for _BACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime -func NewBACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime(dateTimeValue BACnetDateTimeEnclosed, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime { +func NewBACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime( dateTimeValue BACnetDateTimeEnclosed , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime { _result := &_BACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime{ DateTimeValue: dateTimeValue, - _BACnetNotificationParametersChangeOfDiscreteValueNewValue: NewBACnetNotificationParametersChangeOfDiscreteValueNewValue(openingTag, peekedTagHeader, closingTag, tagNumber), + _BACnetNotificationParametersChangeOfDiscreteValueNewValue: NewBACnetNotificationParametersChangeOfDiscreteValueNewValue(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetNotificationParametersChangeOfDiscreteValueNewValue._BACnetNotificationParametersChangeOfDiscreteValueNewValueChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime(dateTi // Deprecated: use the interface for direct cast func CastBACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime(structType interface{}) BACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime { - if casted, ok := structType.(BACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime); ok { + if casted, ok := structType.(BACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime); ok { return casted } if casted, ok := structType.(*BACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime); ok { @@ -117,6 +120,7 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime) Get return lengthInBits } + func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetNotificationParametersChangeOfDiscreteValueNewValueDatetimeParseWithB if pullErr := readBuffer.PullContext("dateTimeValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for dateTimeValue") } - _dateTimeValue, _dateTimeValueErr := BACnetDateTimeEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_dateTimeValue, _dateTimeValueErr := BACnetDateTimeEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _dateTimeValueErr != nil { return nil, errors.Wrap(_dateTimeValueErr, "Error parsing 'dateTimeValue' field of BACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime") } @@ -178,17 +182,17 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime) Ser return errors.Wrap(pushErr, "Error pushing for BACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime") } - // Simple Field (dateTimeValue) - if pushErr := writeBuffer.PushContext("dateTimeValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for dateTimeValue") - } - _dateTimeValueErr := writeBuffer.WriteSerializable(ctx, m.GetDateTimeValue()) - if popErr := writeBuffer.PopContext("dateTimeValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for dateTimeValue") - } - if _dateTimeValueErr != nil { - return errors.Wrap(_dateTimeValueErr, "Error serializing 'dateTimeValue' field") - } + // Simple Field (dateTimeValue) + if pushErr := writeBuffer.PushContext("dateTimeValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for dateTimeValue") + } + _dateTimeValueErr := writeBuffer.WriteSerializable(ctx, m.GetDateTimeValue()) + if popErr := writeBuffer.PopContext("dateTimeValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for dateTimeValue") + } + if _dateTimeValueErr != nil { + return errors.Wrap(_dateTimeValueErr, "Error serializing 'dateTimeValue' field") + } if popErr := writeBuffer.PopContext("BACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime") @@ -198,6 +202,7 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime) Ser return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime) isBACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueDatetime) Str } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated.go index 5de417d5fe3..56099267527 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated is the corresponding interface of BACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated type BACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated interface { @@ -46,9 +48,11 @@ type BACnetNotificationParametersChangeOfDiscreteValueNewValueEnumeratedExactly // _BACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated is the data-structure of this message type _BACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated struct { *_BACnetNotificationParametersChangeOfDiscreteValueNewValue - EnumeratedValue BACnetApplicationTagEnumerated + EnumeratedValue BACnetApplicationTagEnumerated } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,16 +63,14 @@ type _BACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated struct /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated) InitializeParent(parent BACnetNotificationParametersChangeOfDiscreteValueNewValue, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated) InitializeParent(parent BACnetNotificationParametersChangeOfDiscreteValueNewValue , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated) GetParent() BACnetNotificationParametersChangeOfDiscreteValueNewValue { +func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated) GetParent() BACnetNotificationParametersChangeOfDiscreteValueNewValue { return m._BACnetNotificationParametersChangeOfDiscreteValueNewValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated) G /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated factory function for _BACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated -func NewBACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated(enumeratedValue BACnetApplicationTagEnumerated, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated { +func NewBACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated( enumeratedValue BACnetApplicationTagEnumerated , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated { _result := &_BACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated{ EnumeratedValue: enumeratedValue, - _BACnetNotificationParametersChangeOfDiscreteValueNewValue: NewBACnetNotificationParametersChangeOfDiscreteValueNewValue(openingTag, peekedTagHeader, closingTag, tagNumber), + _BACnetNotificationParametersChangeOfDiscreteValueNewValue: NewBACnetNotificationParametersChangeOfDiscreteValueNewValue(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetNotificationParametersChangeOfDiscreteValueNewValue._BACnetNotificationParametersChangeOfDiscreteValueNewValueChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated(enum // Deprecated: use the interface for direct cast func CastBACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated(structType interface{}) BACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated { - if casted, ok := structType.(BACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated); ok { + if casted, ok := structType.(BACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated); ok { return casted } if casted, ok := structType.(*BACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated); ok { @@ -117,6 +120,7 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated) G return lengthInBits } + func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetNotificationParametersChangeOfDiscreteValueNewValueEnumeratedParseWit if pullErr := readBuffer.PullContext("enumeratedValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for enumeratedValue") } - _enumeratedValue, _enumeratedValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_enumeratedValue, _enumeratedValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _enumeratedValueErr != nil { return nil, errors.Wrap(_enumeratedValueErr, "Error parsing 'enumeratedValue' field of BACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated") } @@ -178,17 +182,17 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated) S return errors.Wrap(pushErr, "Error pushing for BACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated") } - // Simple Field (enumeratedValue) - if pushErr := writeBuffer.PushContext("enumeratedValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for enumeratedValue") - } - _enumeratedValueErr := writeBuffer.WriteSerializable(ctx, m.GetEnumeratedValue()) - if popErr := writeBuffer.PopContext("enumeratedValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for enumeratedValue") - } - if _enumeratedValueErr != nil { - return errors.Wrap(_enumeratedValueErr, "Error serializing 'enumeratedValue' field") - } + // Simple Field (enumeratedValue) + if pushErr := writeBuffer.PushContext("enumeratedValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for enumeratedValue") + } + _enumeratedValueErr := writeBuffer.WriteSerializable(ctx, m.GetEnumeratedValue()) + if popErr := writeBuffer.PopContext("enumeratedValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for enumeratedValue") + } + if _enumeratedValueErr != nil { + return errors.Wrap(_enumeratedValueErr, "Error serializing 'enumeratedValue' field") + } if popErr := writeBuffer.PopContext("BACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated") @@ -198,6 +202,7 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated) S return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated) isBACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueEnumerated) S } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValueInteger.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValueInteger.go index 9ca03c99049..b663b3ebc20 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValueInteger.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValueInteger.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNotificationParametersChangeOfDiscreteValueNewValueInteger is the corresponding interface of BACnetNotificationParametersChangeOfDiscreteValueNewValueInteger type BACnetNotificationParametersChangeOfDiscreteValueNewValueInteger interface { @@ -46,9 +48,11 @@ type BACnetNotificationParametersChangeOfDiscreteValueNewValueIntegerExactly int // _BACnetNotificationParametersChangeOfDiscreteValueNewValueInteger is the data-structure of this message type _BACnetNotificationParametersChangeOfDiscreteValueNewValueInteger struct { *_BACnetNotificationParametersChangeOfDiscreteValueNewValue - IntegerValue BACnetApplicationTagSignedInteger + IntegerValue BACnetApplicationTagSignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,16 +63,14 @@ type _BACnetNotificationParametersChangeOfDiscreteValueNewValueInteger struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueInteger) InitializeParent(parent BACnetNotificationParametersChangeOfDiscreteValueNewValue, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueInteger) InitializeParent(parent BACnetNotificationParametersChangeOfDiscreteValueNewValue , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueInteger) GetParent() BACnetNotificationParametersChangeOfDiscreteValueNewValue { +func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueInteger) GetParent() BACnetNotificationParametersChangeOfDiscreteValueNewValue { return m._BACnetNotificationParametersChangeOfDiscreteValueNewValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueInteger) GetI /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNotificationParametersChangeOfDiscreteValueNewValueInteger factory function for _BACnetNotificationParametersChangeOfDiscreteValueNewValueInteger -func NewBACnetNotificationParametersChangeOfDiscreteValueNewValueInteger(integerValue BACnetApplicationTagSignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetNotificationParametersChangeOfDiscreteValueNewValueInteger { +func NewBACnetNotificationParametersChangeOfDiscreteValueNewValueInteger( integerValue BACnetApplicationTagSignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetNotificationParametersChangeOfDiscreteValueNewValueInteger { _result := &_BACnetNotificationParametersChangeOfDiscreteValueNewValueInteger{ IntegerValue: integerValue, - _BACnetNotificationParametersChangeOfDiscreteValueNewValue: NewBACnetNotificationParametersChangeOfDiscreteValueNewValue(openingTag, peekedTagHeader, closingTag, tagNumber), + _BACnetNotificationParametersChangeOfDiscreteValueNewValue: NewBACnetNotificationParametersChangeOfDiscreteValueNewValue(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetNotificationParametersChangeOfDiscreteValueNewValue._BACnetNotificationParametersChangeOfDiscreteValueNewValueChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetNotificationParametersChangeOfDiscreteValueNewValueInteger(integer // Deprecated: use the interface for direct cast func CastBACnetNotificationParametersChangeOfDiscreteValueNewValueInteger(structType interface{}) BACnetNotificationParametersChangeOfDiscreteValueNewValueInteger { - if casted, ok := structType.(BACnetNotificationParametersChangeOfDiscreteValueNewValueInteger); ok { + if casted, ok := structType.(BACnetNotificationParametersChangeOfDiscreteValueNewValueInteger); ok { return casted } if casted, ok := structType.(*BACnetNotificationParametersChangeOfDiscreteValueNewValueInteger); ok { @@ -117,6 +120,7 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueInteger) GetL return lengthInBits } + func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueInteger) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetNotificationParametersChangeOfDiscreteValueNewValueIntegerParseWithBu if pullErr := readBuffer.PullContext("integerValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for integerValue") } - _integerValue, _integerValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_integerValue, _integerValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _integerValueErr != nil { return nil, errors.Wrap(_integerValueErr, "Error parsing 'integerValue' field of BACnetNotificationParametersChangeOfDiscreteValueNewValueInteger") } @@ -178,17 +182,17 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueInteger) Seri return errors.Wrap(pushErr, "Error pushing for BACnetNotificationParametersChangeOfDiscreteValueNewValueInteger") } - // Simple Field (integerValue) - if pushErr := writeBuffer.PushContext("integerValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for integerValue") - } - _integerValueErr := writeBuffer.WriteSerializable(ctx, m.GetIntegerValue()) - if popErr := writeBuffer.PopContext("integerValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for integerValue") - } - if _integerValueErr != nil { - return errors.Wrap(_integerValueErr, "Error serializing 'integerValue' field") - } + // Simple Field (integerValue) + if pushErr := writeBuffer.PushContext("integerValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for integerValue") + } + _integerValueErr := writeBuffer.WriteSerializable(ctx, m.GetIntegerValue()) + if popErr := writeBuffer.PopContext("integerValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for integerValue") + } + if _integerValueErr != nil { + return errors.Wrap(_integerValueErr, "Error serializing 'integerValue' field") + } if popErr := writeBuffer.PopContext("BACnetNotificationParametersChangeOfDiscreteValueNewValueInteger"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetNotificationParametersChangeOfDiscreteValueNewValueInteger") @@ -198,6 +202,7 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueInteger) Seri return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueInteger) isBACnetNotificationParametersChangeOfDiscreteValueNewValueInteger() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueInteger) Stri } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentifier.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentifier.go index 606578500d8..e387c3b59ff 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentifier.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentifier.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentifier is the corresponding interface of BACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentifier type BACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentifier interface { @@ -46,9 +48,11 @@ type BACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentifierEx // _BACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentifier is the data-structure of this message type _BACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentifier struct { *_BACnetNotificationParametersChangeOfDiscreteValueNewValue - ObjectidentifierValue BACnetApplicationTagObjectIdentifier + ObjectidentifierValue BACnetApplicationTagObjectIdentifier } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,16 +63,14 @@ type _BACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentifier /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentifier) InitializeParent(parent BACnetNotificationParametersChangeOfDiscreteValueNewValue, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentifier) InitializeParent(parent BACnetNotificationParametersChangeOfDiscreteValueNewValue , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentifier) GetParent() BACnetNotificationParametersChangeOfDiscreteValueNewValue { +func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentifier) GetParent() BACnetNotificationParametersChangeOfDiscreteValueNewValue { return m._BACnetNotificationParametersChangeOfDiscreteValueNewValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentif /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentifier factory function for _BACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentifier -func NewBACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentifier(objectidentifierValue BACnetApplicationTagObjectIdentifier, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentifier { +func NewBACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentifier( objectidentifierValue BACnetApplicationTagObjectIdentifier , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentifier { _result := &_BACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentifier{ ObjectidentifierValue: objectidentifierValue, - _BACnetNotificationParametersChangeOfDiscreteValueNewValue: NewBACnetNotificationParametersChangeOfDiscreteValueNewValue(openingTag, peekedTagHeader, closingTag, tagNumber), + _BACnetNotificationParametersChangeOfDiscreteValueNewValue: NewBACnetNotificationParametersChangeOfDiscreteValueNewValue(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetNotificationParametersChangeOfDiscreteValueNewValue._BACnetNotificationParametersChangeOfDiscreteValueNewValueChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentifie // Deprecated: use the interface for direct cast func CastBACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentifier(structType interface{}) BACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentifier { - if casted, ok := structType.(BACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentifier); ok { + if casted, ok := structType.(BACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentifier); ok { return casted } if casted, ok := structType.(*BACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentifier); ok { @@ -117,6 +120,7 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentif return lengthInBits } + func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentifier) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentifierPa if pullErr := readBuffer.PullContext("objectidentifierValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for objectidentifierValue") } - _objectidentifierValue, _objectidentifierValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_objectidentifierValue, _objectidentifierValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _objectidentifierValueErr != nil { return nil, errors.Wrap(_objectidentifierValueErr, "Error parsing 'objectidentifierValue' field of BACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentifier") } @@ -178,17 +182,17 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentif return errors.Wrap(pushErr, "Error pushing for BACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentifier") } - // Simple Field (objectidentifierValue) - if pushErr := writeBuffer.PushContext("objectidentifierValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for objectidentifierValue") - } - _objectidentifierValueErr := writeBuffer.WriteSerializable(ctx, m.GetObjectidentifierValue()) - if popErr := writeBuffer.PopContext("objectidentifierValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for objectidentifierValue") - } - if _objectidentifierValueErr != nil { - return errors.Wrap(_objectidentifierValueErr, "Error serializing 'objectidentifierValue' field") - } + // Simple Field (objectidentifierValue) + if pushErr := writeBuffer.PushContext("objectidentifierValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for objectidentifierValue") + } + _objectidentifierValueErr := writeBuffer.WriteSerializable(ctx, m.GetObjectidentifierValue()) + if popErr := writeBuffer.PopContext("objectidentifierValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for objectidentifierValue") + } + if _objectidentifierValueErr != nil { + return errors.Wrap(_objectidentifierValueErr, "Error serializing 'objectidentifierValue' field") + } if popErr := writeBuffer.PopContext("BACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentifier"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentifier") @@ -198,6 +202,7 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentif return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentifier) isBACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentifier() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueObjectidentif } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate.go index c0f37b5e41a..37b3fe23da9 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate is the corresponding interface of BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate type BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate interface { @@ -46,9 +48,11 @@ type BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDateExactly i // _BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate is the data-structure of this message type _BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate struct { *_BACnetNotificationParametersChangeOfDiscreteValueNewValue - DateValue BACnetApplicationTagDate + DateValue BACnetApplicationTagDate } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,16 +63,14 @@ type _BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate struct /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate) InitializeParent(parent BACnetNotificationParametersChangeOfDiscreteValueNewValue, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate) InitializeParent(parent BACnetNotificationParametersChangeOfDiscreteValueNewValue , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate) GetParent() BACnetNotificationParametersChangeOfDiscreteValueNewValue { +func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate) GetParent() BACnetNotificationParametersChangeOfDiscreteValueNewValue { return m._BACnetNotificationParametersChangeOfDiscreteValueNewValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate) Ge /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate factory function for _BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate -func NewBACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate(dateValue BACnetApplicationTagDate, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate { +func NewBACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate( dateValue BACnetApplicationTagDate , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate { _result := &_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate{ DateValue: dateValue, - _BACnetNotificationParametersChangeOfDiscreteValueNewValue: NewBACnetNotificationParametersChangeOfDiscreteValueNewValue(openingTag, peekedTagHeader, closingTag, tagNumber), + _BACnetNotificationParametersChangeOfDiscreteValueNewValue: NewBACnetNotificationParametersChangeOfDiscreteValueNewValue(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetNotificationParametersChangeOfDiscreteValueNewValue._BACnetNotificationParametersChangeOfDiscreteValueNewValueChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate(dateV // Deprecated: use the interface for direct cast func CastBACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate(structType interface{}) BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate { - if casted, ok := structType.(BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate); ok { + if casted, ok := structType.(BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate); ok { return casted } if casted, ok := structType.(*BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate); ok { @@ -117,6 +120,7 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate) Ge return lengthInBits } + func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDateParseWith if pullErr := readBuffer.PullContext("dateValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for dateValue") } - _dateValue, _dateValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_dateValue, _dateValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _dateValueErr != nil { return nil, errors.Wrap(_dateValueErr, "Error parsing 'dateValue' field of BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate") } @@ -178,17 +182,17 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate) Se return errors.Wrap(pushErr, "Error pushing for BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate") } - // Simple Field (dateValue) - if pushErr := writeBuffer.PushContext("dateValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for dateValue") - } - _dateValueErr := writeBuffer.WriteSerializable(ctx, m.GetDateValue()) - if popErr := writeBuffer.PopContext("dateValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for dateValue") - } - if _dateValueErr != nil { - return errors.Wrap(_dateValueErr, "Error serializing 'dateValue' field") - } + // Simple Field (dateValue) + if pushErr := writeBuffer.PushContext("dateValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for dateValue") + } + _dateValueErr := writeBuffer.WriteSerializable(ctx, m.GetDateValue()) + if popErr := writeBuffer.PopContext("dateValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for dateValue") + } + if _dateValueErr != nil { + return errors.Wrap(_dateValueErr, "Error serializing 'dateValue' field") + } if popErr := writeBuffer.PopContext("BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate") @@ -198,6 +202,7 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate) Se return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate) isBACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetDate) St } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString.go index afe270dfd5a..8c3b38d99c4 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString is the corresponding interface of BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString type BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString interface { @@ -46,9 +48,11 @@ type BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetStringExactly // _BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString is the data-structure of this message type _BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString struct { *_BACnetNotificationParametersChangeOfDiscreteValueNewValue - OctetStringValue BACnetApplicationTagOctetString + OctetStringValue BACnetApplicationTagOctetString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,16 +63,14 @@ type _BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString struc /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString) InitializeParent(parent BACnetNotificationParametersChangeOfDiscreteValueNewValue, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString) InitializeParent(parent BACnetNotificationParametersChangeOfDiscreteValueNewValue , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString) GetParent() BACnetNotificationParametersChangeOfDiscreteValueNewValue { +func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString) GetParent() BACnetNotificationParametersChangeOfDiscreteValueNewValue { return m._BACnetNotificationParametersChangeOfDiscreteValueNewValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString) /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString factory function for _BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString -func NewBACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString(octetStringValue BACnetApplicationTagOctetString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString { +func NewBACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString( octetStringValue BACnetApplicationTagOctetString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString { _result := &_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString{ OctetStringValue: octetStringValue, - _BACnetNotificationParametersChangeOfDiscreteValueNewValue: NewBACnetNotificationParametersChangeOfDiscreteValueNewValue(openingTag, peekedTagHeader, closingTag, tagNumber), + _BACnetNotificationParametersChangeOfDiscreteValueNewValue: NewBACnetNotificationParametersChangeOfDiscreteValueNewValue(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetNotificationParametersChangeOfDiscreteValueNewValue._BACnetNotificationParametersChangeOfDiscreteValueNewValueChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString(oct // Deprecated: use the interface for direct cast func CastBACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString(structType interface{}) BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString { - if casted, ok := structType.(BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString); ok { + if casted, ok := structType.(BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString); ok { return casted } if casted, ok := structType.(*BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString); ok { @@ -117,6 +120,7 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString) return lengthInBits } + func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetStringParseWi if pullErr := readBuffer.PullContext("octetStringValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for octetStringValue") } - _octetStringValue, _octetStringValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_octetStringValue, _octetStringValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _octetStringValueErr != nil { return nil, errors.Wrap(_octetStringValueErr, "Error parsing 'octetStringValue' field of BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString") } @@ -178,17 +182,17 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString) return errors.Wrap(pushErr, "Error pushing for BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString") } - // Simple Field (octetStringValue) - if pushErr := writeBuffer.PushContext("octetStringValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for octetStringValue") - } - _octetStringValueErr := writeBuffer.WriteSerializable(ctx, m.GetOctetStringValue()) - if popErr := writeBuffer.PopContext("octetStringValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for octetStringValue") - } - if _octetStringValueErr != nil { - return errors.Wrap(_octetStringValueErr, "Error serializing 'octetStringValue' field") - } + // Simple Field (octetStringValue) + if pushErr := writeBuffer.PushContext("octetStringValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for octetStringValue") + } + _octetStringValueErr := writeBuffer.WriteSerializable(ctx, m.GetOctetStringValue()) + if popErr := writeBuffer.PopContext("octetStringValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for octetStringValue") + } + if _octetStringValueErr != nil { + return errors.Wrap(_octetStringValueErr, "Error serializing 'octetStringValue' field") + } if popErr := writeBuffer.PopContext("BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString") @@ -198,6 +202,7 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString) return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString) isBACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetString) } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime.go index 27ed66a3097..299683ca53a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime is the corresponding interface of BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime type BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime interface { @@ -46,9 +48,11 @@ type BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTimeExactly i // _BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime is the data-structure of this message type _BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime struct { *_BACnetNotificationParametersChangeOfDiscreteValueNewValue - TimeValue BACnetApplicationTagTime + TimeValue BACnetApplicationTagTime } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,16 +63,14 @@ type _BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime struct /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime) InitializeParent(parent BACnetNotificationParametersChangeOfDiscreteValueNewValue, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime) InitializeParent(parent BACnetNotificationParametersChangeOfDiscreteValueNewValue , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime) GetParent() BACnetNotificationParametersChangeOfDiscreteValueNewValue { +func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime) GetParent() BACnetNotificationParametersChangeOfDiscreteValueNewValue { return m._BACnetNotificationParametersChangeOfDiscreteValueNewValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime) Ge /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime factory function for _BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime -func NewBACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime(timeValue BACnetApplicationTagTime, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime { +func NewBACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime( timeValue BACnetApplicationTagTime , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime { _result := &_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime{ TimeValue: timeValue, - _BACnetNotificationParametersChangeOfDiscreteValueNewValue: NewBACnetNotificationParametersChangeOfDiscreteValueNewValue(openingTag, peekedTagHeader, closingTag, tagNumber), + _BACnetNotificationParametersChangeOfDiscreteValueNewValue: NewBACnetNotificationParametersChangeOfDiscreteValueNewValue(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetNotificationParametersChangeOfDiscreteValueNewValue._BACnetNotificationParametersChangeOfDiscreteValueNewValueChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime(timeV // Deprecated: use the interface for direct cast func CastBACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime(structType interface{}) BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime { - if casted, ok := structType.(BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime); ok { + if casted, ok := structType.(BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime); ok { return casted } if casted, ok := structType.(*BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime); ok { @@ -117,6 +120,7 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime) Ge return lengthInBits } + func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTimeParseWith if pullErr := readBuffer.PullContext("timeValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeValue") } - _timeValue, _timeValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_timeValue, _timeValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _timeValueErr != nil { return nil, errors.Wrap(_timeValueErr, "Error parsing 'timeValue' field of BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime") } @@ -178,17 +182,17 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime) Se return errors.Wrap(pushErr, "Error pushing for BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime") } - // Simple Field (timeValue) - if pushErr := writeBuffer.PushContext("timeValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timeValue") - } - _timeValueErr := writeBuffer.WriteSerializable(ctx, m.GetTimeValue()) - if popErr := writeBuffer.PopContext("timeValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timeValue") - } - if _timeValueErr != nil { - return errors.Wrap(_timeValueErr, "Error serializing 'timeValue' field") - } + // Simple Field (timeValue) + if pushErr := writeBuffer.PushContext("timeValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timeValue") + } + _timeValueErr := writeBuffer.WriteSerializable(ctx, m.GetTimeValue()) + if popErr := writeBuffer.PopContext("timeValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timeValue") + } + if _timeValueErr != nil { + return errors.Wrap(_timeValueErr, "Error serializing 'timeValue' field") + } if popErr := writeBuffer.PopContext("BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime") @@ -198,6 +202,7 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime) Se return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime) isBACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueOctetTime) St } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned.go index 4d46fe294d6..c87dc5c992a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned is the corresponding interface of BACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned type BACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned interface { @@ -46,9 +48,11 @@ type BACnetNotificationParametersChangeOfDiscreteValueNewValueUnsignedExactly in // _BACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned is the data-structure of this message type _BACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned struct { *_BACnetNotificationParametersChangeOfDiscreteValueNewValue - UnsignedValue BACnetApplicationTagUnsignedInteger + UnsignedValue BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,16 +63,14 @@ type _BACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned) InitializeParent(parent BACnetNotificationParametersChangeOfDiscreteValueNewValue, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned) InitializeParent(parent BACnetNotificationParametersChangeOfDiscreteValueNewValue , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned) GetParent() BACnetNotificationParametersChangeOfDiscreteValueNewValue { +func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned) GetParent() BACnetNotificationParametersChangeOfDiscreteValueNewValue { return m._BACnetNotificationParametersChangeOfDiscreteValueNewValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned) Get /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned factory function for _BACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned -func NewBACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned(unsignedValue BACnetApplicationTagUnsignedInteger, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned { +func NewBACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned( unsignedValue BACnetApplicationTagUnsignedInteger , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned { _result := &_BACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned{ UnsignedValue: unsignedValue, - _BACnetNotificationParametersChangeOfDiscreteValueNewValue: NewBACnetNotificationParametersChangeOfDiscreteValueNewValue(openingTag, peekedTagHeader, closingTag, tagNumber), + _BACnetNotificationParametersChangeOfDiscreteValueNewValue: NewBACnetNotificationParametersChangeOfDiscreteValueNewValue(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetNotificationParametersChangeOfDiscreteValueNewValue._BACnetNotificationParametersChangeOfDiscreteValueNewValueChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned(unsign // Deprecated: use the interface for direct cast func CastBACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned(structType interface{}) BACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned { - if casted, ok := structType.(BACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned); ok { + if casted, ok := structType.(BACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned); ok { return casted } if casted, ok := structType.(*BACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned); ok { @@ -117,6 +120,7 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned) Get return lengthInBits } + func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetNotificationParametersChangeOfDiscreteValueNewValueUnsignedParseWithB if pullErr := readBuffer.PullContext("unsignedValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for unsignedValue") } - _unsignedValue, _unsignedValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_unsignedValue, _unsignedValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _unsignedValueErr != nil { return nil, errors.Wrap(_unsignedValueErr, "Error parsing 'unsignedValue' field of BACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned") } @@ -178,17 +182,17 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned) Ser return errors.Wrap(pushErr, "Error pushing for BACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned") } - // Simple Field (unsignedValue) - if pushErr := writeBuffer.PushContext("unsignedValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for unsignedValue") - } - _unsignedValueErr := writeBuffer.WriteSerializable(ctx, m.GetUnsignedValue()) - if popErr := writeBuffer.PopContext("unsignedValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for unsignedValue") - } - if _unsignedValueErr != nil { - return errors.Wrap(_unsignedValueErr, "Error serializing 'unsignedValue' field") - } + // Simple Field (unsignedValue) + if pushErr := writeBuffer.PushContext("unsignedValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for unsignedValue") + } + _unsignedValueErr := writeBuffer.WriteSerializable(ctx, m.GetUnsignedValue()) + if popErr := writeBuffer.PopContext("unsignedValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for unsignedValue") + } + if _unsignedValueErr != nil { + return errors.Wrap(_unsignedValueErr, "Error serializing 'unsignedValue' field") + } if popErr := writeBuffer.PopContext("BACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned") @@ -198,6 +202,7 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned) Ser return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned) isBACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetNotificationParametersChangeOfDiscreteValueNewValueUnsigned) Str } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfLifeSafety.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfLifeSafety.go index 0e74447ebf2..6f7ec5417f3 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfLifeSafety.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfLifeSafety.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNotificationParametersChangeOfLifeSafety is the corresponding interface of BACnetNotificationParametersChangeOfLifeSafety type BACnetNotificationParametersChangeOfLifeSafety interface { @@ -56,14 +58,16 @@ type BACnetNotificationParametersChangeOfLifeSafetyExactly interface { // _BACnetNotificationParametersChangeOfLifeSafety is the data-structure of this message type _BACnetNotificationParametersChangeOfLifeSafety struct { *_BACnetNotificationParameters - InnerOpeningTag BACnetOpeningTag - NewState BACnetLifeSafetyStateTagged - NewMode BACnetLifeSafetyModeTagged - StatusFlags BACnetStatusFlagsTagged - OperationExpected BACnetLifeSafetyOperationTagged - InnerClosingTag BACnetClosingTag + InnerOpeningTag BACnetOpeningTag + NewState BACnetLifeSafetyStateTagged + NewMode BACnetLifeSafetyModeTagged + StatusFlags BACnetStatusFlagsTagged + OperationExpected BACnetLifeSafetyOperationTagged + InnerClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -74,16 +78,14 @@ type _BACnetNotificationParametersChangeOfLifeSafety struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetNotificationParametersChangeOfLifeSafety) InitializeParent(parent BACnetNotificationParameters, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetNotificationParametersChangeOfLifeSafety) InitializeParent(parent BACnetNotificationParameters , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetNotificationParametersChangeOfLifeSafety) GetParent() BACnetNotificationParameters { +func (m *_BACnetNotificationParametersChangeOfLifeSafety) GetParent() BACnetNotificationParameters { return m._BACnetNotificationParameters } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -118,16 +120,17 @@ func (m *_BACnetNotificationParametersChangeOfLifeSafety) GetInnerClosingTag() B /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNotificationParametersChangeOfLifeSafety factory function for _BACnetNotificationParametersChangeOfLifeSafety -func NewBACnetNotificationParametersChangeOfLifeSafety(innerOpeningTag BACnetOpeningTag, newState BACnetLifeSafetyStateTagged, newMode BACnetLifeSafetyModeTagged, statusFlags BACnetStatusFlagsTagged, operationExpected BACnetLifeSafetyOperationTagged, innerClosingTag BACnetClosingTag, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, objectTypeArgument BACnetObjectType) *_BACnetNotificationParametersChangeOfLifeSafety { +func NewBACnetNotificationParametersChangeOfLifeSafety( innerOpeningTag BACnetOpeningTag , newState BACnetLifeSafetyStateTagged , newMode BACnetLifeSafetyModeTagged , statusFlags BACnetStatusFlagsTagged , operationExpected BACnetLifeSafetyOperationTagged , innerClosingTag BACnetClosingTag , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , objectTypeArgument BACnetObjectType ) *_BACnetNotificationParametersChangeOfLifeSafety { _result := &_BACnetNotificationParametersChangeOfLifeSafety{ - InnerOpeningTag: innerOpeningTag, - NewState: newState, - NewMode: newMode, - StatusFlags: statusFlags, - OperationExpected: operationExpected, - InnerClosingTag: innerClosingTag, - _BACnetNotificationParameters: NewBACnetNotificationParameters(openingTag, peekedTagHeader, closingTag, tagNumber, objectTypeArgument), + InnerOpeningTag: innerOpeningTag, + NewState: newState, + NewMode: newMode, + StatusFlags: statusFlags, + OperationExpected: operationExpected, + InnerClosingTag: innerClosingTag, + _BACnetNotificationParameters: NewBACnetNotificationParameters(openingTag, peekedTagHeader, closingTag, tagNumber, objectTypeArgument), } _result._BACnetNotificationParameters._BACnetNotificationParametersChildRequirements = _result return _result @@ -135,7 +138,7 @@ func NewBACnetNotificationParametersChangeOfLifeSafety(innerOpeningTag BACnetOpe // Deprecated: use the interface for direct cast func CastBACnetNotificationParametersChangeOfLifeSafety(structType interface{}) BACnetNotificationParametersChangeOfLifeSafety { - if casted, ok := structType.(BACnetNotificationParametersChangeOfLifeSafety); ok { + if casted, ok := structType.(BACnetNotificationParametersChangeOfLifeSafety); ok { return casted } if casted, ok := structType.(*BACnetNotificationParametersChangeOfLifeSafety); ok { @@ -172,6 +175,7 @@ func (m *_BACnetNotificationParametersChangeOfLifeSafety) GetLengthInBits(ctx co return lengthInBits } + func (m *_BACnetNotificationParametersChangeOfLifeSafety) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -193,7 +197,7 @@ func BACnetNotificationParametersChangeOfLifeSafetyParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("innerOpeningTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerOpeningTag") } - _innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber)) +_innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) ) if _innerOpeningTagErr != nil { return nil, errors.Wrap(_innerOpeningTagErr, "Error parsing 'innerOpeningTag' field of BACnetNotificationParametersChangeOfLifeSafety") } @@ -206,7 +210,7 @@ func BACnetNotificationParametersChangeOfLifeSafetyParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("newState"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for newState") } - _newState, _newStateErr := BACnetLifeSafetyStateTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_newState, _newStateErr := BACnetLifeSafetyStateTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _newStateErr != nil { return nil, errors.Wrap(_newStateErr, "Error parsing 'newState' field of BACnetNotificationParametersChangeOfLifeSafety") } @@ -219,7 +223,7 @@ func BACnetNotificationParametersChangeOfLifeSafetyParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("newMode"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for newMode") } - _newMode, _newModeErr := BACnetLifeSafetyModeTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_newMode, _newModeErr := BACnetLifeSafetyModeTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _newModeErr != nil { return nil, errors.Wrap(_newModeErr, "Error parsing 'newMode' field of BACnetNotificationParametersChangeOfLifeSafety") } @@ -232,7 +236,7 @@ func BACnetNotificationParametersChangeOfLifeSafetyParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("statusFlags"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for statusFlags") } - _statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _statusFlagsErr != nil { return nil, errors.Wrap(_statusFlagsErr, "Error parsing 'statusFlags' field of BACnetNotificationParametersChangeOfLifeSafety") } @@ -245,7 +249,7 @@ func BACnetNotificationParametersChangeOfLifeSafetyParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("operationExpected"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for operationExpected") } - _operationExpected, _operationExpectedErr := BACnetLifeSafetyOperationTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(3)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_operationExpected, _operationExpectedErr := BACnetLifeSafetyOperationTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(3) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _operationExpectedErr != nil { return nil, errors.Wrap(_operationExpectedErr, "Error parsing 'operationExpected' field of BACnetNotificationParametersChangeOfLifeSafety") } @@ -258,7 +262,7 @@ func BACnetNotificationParametersChangeOfLifeSafetyParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("innerClosingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerClosingTag") } - _innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber)) +_innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) ) if _innerClosingTagErr != nil { return nil, errors.Wrap(_innerClosingTagErr, "Error parsing 'innerClosingTag' field of BACnetNotificationParametersChangeOfLifeSafety") } @@ -274,15 +278,15 @@ func BACnetNotificationParametersChangeOfLifeSafetyParseWithBuffer(ctx context.C // Create a partially initialized instance _child := &_BACnetNotificationParametersChangeOfLifeSafety{ _BACnetNotificationParameters: &_BACnetNotificationParameters{ - TagNumber: tagNumber, + TagNumber: tagNumber, ObjectTypeArgument: objectTypeArgument, }, - InnerOpeningTag: innerOpeningTag, - NewState: newState, - NewMode: newMode, - StatusFlags: statusFlags, + InnerOpeningTag: innerOpeningTag, + NewState: newState, + NewMode: newMode, + StatusFlags: statusFlags, OperationExpected: operationExpected, - InnerClosingTag: innerClosingTag, + InnerClosingTag: innerClosingTag, } _child._BACnetNotificationParameters._BACnetNotificationParametersChildRequirements = _child return _child, nil @@ -304,77 +308,77 @@ func (m *_BACnetNotificationParametersChangeOfLifeSafety) SerializeWithWriteBuff return errors.Wrap(pushErr, "Error pushing for BACnetNotificationParametersChangeOfLifeSafety") } - // Simple Field (innerOpeningTag) - if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") - } - _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) - if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerOpeningTag") - } - if _innerOpeningTagErr != nil { - return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") - } + // Simple Field (innerOpeningTag) + if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") + } + _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) + if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerOpeningTag") + } + if _innerOpeningTagErr != nil { + return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") + } - // Simple Field (newState) - if pushErr := writeBuffer.PushContext("newState"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for newState") - } - _newStateErr := writeBuffer.WriteSerializable(ctx, m.GetNewState()) - if popErr := writeBuffer.PopContext("newState"); popErr != nil { - return errors.Wrap(popErr, "Error popping for newState") - } - if _newStateErr != nil { - return errors.Wrap(_newStateErr, "Error serializing 'newState' field") - } + // Simple Field (newState) + if pushErr := writeBuffer.PushContext("newState"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for newState") + } + _newStateErr := writeBuffer.WriteSerializable(ctx, m.GetNewState()) + if popErr := writeBuffer.PopContext("newState"); popErr != nil { + return errors.Wrap(popErr, "Error popping for newState") + } + if _newStateErr != nil { + return errors.Wrap(_newStateErr, "Error serializing 'newState' field") + } - // Simple Field (newMode) - if pushErr := writeBuffer.PushContext("newMode"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for newMode") - } - _newModeErr := writeBuffer.WriteSerializable(ctx, m.GetNewMode()) - if popErr := writeBuffer.PopContext("newMode"); popErr != nil { - return errors.Wrap(popErr, "Error popping for newMode") - } - if _newModeErr != nil { - return errors.Wrap(_newModeErr, "Error serializing 'newMode' field") - } + // Simple Field (newMode) + if pushErr := writeBuffer.PushContext("newMode"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for newMode") + } + _newModeErr := writeBuffer.WriteSerializable(ctx, m.GetNewMode()) + if popErr := writeBuffer.PopContext("newMode"); popErr != nil { + return errors.Wrap(popErr, "Error popping for newMode") + } + if _newModeErr != nil { + return errors.Wrap(_newModeErr, "Error serializing 'newMode' field") + } - // Simple Field (statusFlags) - if pushErr := writeBuffer.PushContext("statusFlags"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for statusFlags") - } - _statusFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetStatusFlags()) - if popErr := writeBuffer.PopContext("statusFlags"); popErr != nil { - return errors.Wrap(popErr, "Error popping for statusFlags") - } - if _statusFlagsErr != nil { - return errors.Wrap(_statusFlagsErr, "Error serializing 'statusFlags' field") - } + // Simple Field (statusFlags) + if pushErr := writeBuffer.PushContext("statusFlags"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for statusFlags") + } + _statusFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetStatusFlags()) + if popErr := writeBuffer.PopContext("statusFlags"); popErr != nil { + return errors.Wrap(popErr, "Error popping for statusFlags") + } + if _statusFlagsErr != nil { + return errors.Wrap(_statusFlagsErr, "Error serializing 'statusFlags' field") + } - // Simple Field (operationExpected) - if pushErr := writeBuffer.PushContext("operationExpected"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for operationExpected") - } - _operationExpectedErr := writeBuffer.WriteSerializable(ctx, m.GetOperationExpected()) - if popErr := writeBuffer.PopContext("operationExpected"); popErr != nil { - return errors.Wrap(popErr, "Error popping for operationExpected") - } - if _operationExpectedErr != nil { - return errors.Wrap(_operationExpectedErr, "Error serializing 'operationExpected' field") - } + // Simple Field (operationExpected) + if pushErr := writeBuffer.PushContext("operationExpected"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for operationExpected") + } + _operationExpectedErr := writeBuffer.WriteSerializable(ctx, m.GetOperationExpected()) + if popErr := writeBuffer.PopContext("operationExpected"); popErr != nil { + return errors.Wrap(popErr, "Error popping for operationExpected") + } + if _operationExpectedErr != nil { + return errors.Wrap(_operationExpectedErr, "Error serializing 'operationExpected' field") + } - // Simple Field (innerClosingTag) - if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerClosingTag") - } - _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) - if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerClosingTag") - } - if _innerClosingTagErr != nil { - return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") - } + // Simple Field (innerClosingTag) + if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerClosingTag") + } + _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) + if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerClosingTag") + } + if _innerClosingTagErr != nil { + return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") + } if popErr := writeBuffer.PopContext("BACnetNotificationParametersChangeOfLifeSafety"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetNotificationParametersChangeOfLifeSafety") @@ -384,6 +388,7 @@ func (m *_BACnetNotificationParametersChangeOfLifeSafety) SerializeWithWriteBuff return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetNotificationParametersChangeOfLifeSafety) isBACnetNotificationParametersChangeOfLifeSafety() bool { return true } @@ -398,3 +403,6 @@ func (m *_BACnetNotificationParametersChangeOfLifeSafety) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfReliability.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfReliability.go index bcbd57ca753..75541548552 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfReliability.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfReliability.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNotificationParametersChangeOfReliability is the corresponding interface of BACnetNotificationParametersChangeOfReliability type BACnetNotificationParametersChangeOfReliability interface { @@ -54,13 +56,15 @@ type BACnetNotificationParametersChangeOfReliabilityExactly interface { // _BACnetNotificationParametersChangeOfReliability is the data-structure of this message type _BACnetNotificationParametersChangeOfReliability struct { *_BACnetNotificationParameters - InnerOpeningTag BACnetOpeningTag - Reliability BACnetReliabilityTagged - StatusFlags BACnetStatusFlagsTagged - PropertyValues BACnetPropertyValues - InnerClosingTag BACnetClosingTag + InnerOpeningTag BACnetOpeningTag + Reliability BACnetReliabilityTagged + StatusFlags BACnetStatusFlagsTagged + PropertyValues BACnetPropertyValues + InnerClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -71,16 +75,14 @@ type _BACnetNotificationParametersChangeOfReliability struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetNotificationParametersChangeOfReliability) InitializeParent(parent BACnetNotificationParameters, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetNotificationParametersChangeOfReliability) InitializeParent(parent BACnetNotificationParameters , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetNotificationParametersChangeOfReliability) GetParent() BACnetNotificationParameters { +func (m *_BACnetNotificationParametersChangeOfReliability) GetParent() BACnetNotificationParameters { return m._BACnetNotificationParameters } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -111,15 +113,16 @@ func (m *_BACnetNotificationParametersChangeOfReliability) GetInnerClosingTag() /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNotificationParametersChangeOfReliability factory function for _BACnetNotificationParametersChangeOfReliability -func NewBACnetNotificationParametersChangeOfReliability(innerOpeningTag BACnetOpeningTag, reliability BACnetReliabilityTagged, statusFlags BACnetStatusFlagsTagged, propertyValues BACnetPropertyValues, innerClosingTag BACnetClosingTag, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, objectTypeArgument BACnetObjectType) *_BACnetNotificationParametersChangeOfReliability { +func NewBACnetNotificationParametersChangeOfReliability( innerOpeningTag BACnetOpeningTag , reliability BACnetReliabilityTagged , statusFlags BACnetStatusFlagsTagged , propertyValues BACnetPropertyValues , innerClosingTag BACnetClosingTag , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , objectTypeArgument BACnetObjectType ) *_BACnetNotificationParametersChangeOfReliability { _result := &_BACnetNotificationParametersChangeOfReliability{ - InnerOpeningTag: innerOpeningTag, - Reliability: reliability, - StatusFlags: statusFlags, - PropertyValues: propertyValues, - InnerClosingTag: innerClosingTag, - _BACnetNotificationParameters: NewBACnetNotificationParameters(openingTag, peekedTagHeader, closingTag, tagNumber, objectTypeArgument), + InnerOpeningTag: innerOpeningTag, + Reliability: reliability, + StatusFlags: statusFlags, + PropertyValues: propertyValues, + InnerClosingTag: innerClosingTag, + _BACnetNotificationParameters: NewBACnetNotificationParameters(openingTag, peekedTagHeader, closingTag, tagNumber, objectTypeArgument), } _result._BACnetNotificationParameters._BACnetNotificationParametersChildRequirements = _result return _result @@ -127,7 +130,7 @@ func NewBACnetNotificationParametersChangeOfReliability(innerOpeningTag BACnetOp // Deprecated: use the interface for direct cast func CastBACnetNotificationParametersChangeOfReliability(structType interface{}) BACnetNotificationParametersChangeOfReliability { - if casted, ok := structType.(BACnetNotificationParametersChangeOfReliability); ok { + if casted, ok := structType.(BACnetNotificationParametersChangeOfReliability); ok { return casted } if casted, ok := structType.(*BACnetNotificationParametersChangeOfReliability); ok { @@ -161,6 +164,7 @@ func (m *_BACnetNotificationParametersChangeOfReliability) GetLengthInBits(ctx c return lengthInBits } + func (m *_BACnetNotificationParametersChangeOfReliability) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -182,7 +186,7 @@ func BACnetNotificationParametersChangeOfReliabilityParseWithBuffer(ctx context. if pullErr := readBuffer.PullContext("innerOpeningTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerOpeningTag") } - _innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber)) +_innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) ) if _innerOpeningTagErr != nil { return nil, errors.Wrap(_innerOpeningTagErr, "Error parsing 'innerOpeningTag' field of BACnetNotificationParametersChangeOfReliability") } @@ -195,7 +199,7 @@ func BACnetNotificationParametersChangeOfReliabilityParseWithBuffer(ctx context. if pullErr := readBuffer.PullContext("reliability"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for reliability") } - _reliability, _reliabilityErr := BACnetReliabilityTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_reliability, _reliabilityErr := BACnetReliabilityTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _reliabilityErr != nil { return nil, errors.Wrap(_reliabilityErr, "Error parsing 'reliability' field of BACnetNotificationParametersChangeOfReliability") } @@ -208,7 +212,7 @@ func BACnetNotificationParametersChangeOfReliabilityParseWithBuffer(ctx context. if pullErr := readBuffer.PullContext("statusFlags"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for statusFlags") } - _statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _statusFlagsErr != nil { return nil, errors.Wrap(_statusFlagsErr, "Error parsing 'statusFlags' field of BACnetNotificationParametersChangeOfReliability") } @@ -221,7 +225,7 @@ func BACnetNotificationParametersChangeOfReliabilityParseWithBuffer(ctx context. if pullErr := readBuffer.PullContext("propertyValues"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for propertyValues") } - _propertyValues, _propertyValuesErr := BACnetPropertyValuesParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), BACnetObjectType(objectTypeArgument)) +_propertyValues, _propertyValuesErr := BACnetPropertyValuesParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , BACnetObjectType( objectTypeArgument ) ) if _propertyValuesErr != nil { return nil, errors.Wrap(_propertyValuesErr, "Error parsing 'propertyValues' field of BACnetNotificationParametersChangeOfReliability") } @@ -234,7 +238,7 @@ func BACnetNotificationParametersChangeOfReliabilityParseWithBuffer(ctx context. if pullErr := readBuffer.PullContext("innerClosingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerClosingTag") } - _innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber)) +_innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) ) if _innerClosingTagErr != nil { return nil, errors.Wrap(_innerClosingTagErr, "Error parsing 'innerClosingTag' field of BACnetNotificationParametersChangeOfReliability") } @@ -250,13 +254,13 @@ func BACnetNotificationParametersChangeOfReliabilityParseWithBuffer(ctx context. // Create a partially initialized instance _child := &_BACnetNotificationParametersChangeOfReliability{ _BACnetNotificationParameters: &_BACnetNotificationParameters{ - TagNumber: tagNumber, + TagNumber: tagNumber, ObjectTypeArgument: objectTypeArgument, }, InnerOpeningTag: innerOpeningTag, - Reliability: reliability, - StatusFlags: statusFlags, - PropertyValues: propertyValues, + Reliability: reliability, + StatusFlags: statusFlags, + PropertyValues: propertyValues, InnerClosingTag: innerClosingTag, } _child._BACnetNotificationParameters._BACnetNotificationParametersChildRequirements = _child @@ -279,65 +283,65 @@ func (m *_BACnetNotificationParametersChangeOfReliability) SerializeWithWriteBuf return errors.Wrap(pushErr, "Error pushing for BACnetNotificationParametersChangeOfReliability") } - // Simple Field (innerOpeningTag) - if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") - } - _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) - if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerOpeningTag") - } - if _innerOpeningTagErr != nil { - return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") - } + // Simple Field (innerOpeningTag) + if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") + } + _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) + if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerOpeningTag") + } + if _innerOpeningTagErr != nil { + return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") + } - // Simple Field (reliability) - if pushErr := writeBuffer.PushContext("reliability"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for reliability") - } - _reliabilityErr := writeBuffer.WriteSerializable(ctx, m.GetReliability()) - if popErr := writeBuffer.PopContext("reliability"); popErr != nil { - return errors.Wrap(popErr, "Error popping for reliability") - } - if _reliabilityErr != nil { - return errors.Wrap(_reliabilityErr, "Error serializing 'reliability' field") - } + // Simple Field (reliability) + if pushErr := writeBuffer.PushContext("reliability"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for reliability") + } + _reliabilityErr := writeBuffer.WriteSerializable(ctx, m.GetReliability()) + if popErr := writeBuffer.PopContext("reliability"); popErr != nil { + return errors.Wrap(popErr, "Error popping for reliability") + } + if _reliabilityErr != nil { + return errors.Wrap(_reliabilityErr, "Error serializing 'reliability' field") + } - // Simple Field (statusFlags) - if pushErr := writeBuffer.PushContext("statusFlags"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for statusFlags") - } - _statusFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetStatusFlags()) - if popErr := writeBuffer.PopContext("statusFlags"); popErr != nil { - return errors.Wrap(popErr, "Error popping for statusFlags") - } - if _statusFlagsErr != nil { - return errors.Wrap(_statusFlagsErr, "Error serializing 'statusFlags' field") - } + // Simple Field (statusFlags) + if pushErr := writeBuffer.PushContext("statusFlags"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for statusFlags") + } + _statusFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetStatusFlags()) + if popErr := writeBuffer.PopContext("statusFlags"); popErr != nil { + return errors.Wrap(popErr, "Error popping for statusFlags") + } + if _statusFlagsErr != nil { + return errors.Wrap(_statusFlagsErr, "Error serializing 'statusFlags' field") + } - // Simple Field (propertyValues) - if pushErr := writeBuffer.PushContext("propertyValues"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for propertyValues") - } - _propertyValuesErr := writeBuffer.WriteSerializable(ctx, m.GetPropertyValues()) - if popErr := writeBuffer.PopContext("propertyValues"); popErr != nil { - return errors.Wrap(popErr, "Error popping for propertyValues") - } - if _propertyValuesErr != nil { - return errors.Wrap(_propertyValuesErr, "Error serializing 'propertyValues' field") - } + // Simple Field (propertyValues) + if pushErr := writeBuffer.PushContext("propertyValues"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for propertyValues") + } + _propertyValuesErr := writeBuffer.WriteSerializable(ctx, m.GetPropertyValues()) + if popErr := writeBuffer.PopContext("propertyValues"); popErr != nil { + return errors.Wrap(popErr, "Error popping for propertyValues") + } + if _propertyValuesErr != nil { + return errors.Wrap(_propertyValuesErr, "Error serializing 'propertyValues' field") + } - // Simple Field (innerClosingTag) - if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerClosingTag") - } - _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) - if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerClosingTag") - } - if _innerClosingTagErr != nil { - return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") - } + // Simple Field (innerClosingTag) + if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerClosingTag") + } + _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) + if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerClosingTag") + } + if _innerClosingTagErr != nil { + return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") + } if popErr := writeBuffer.PopContext("BACnetNotificationParametersChangeOfReliability"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetNotificationParametersChangeOfReliability") @@ -347,6 +351,7 @@ func (m *_BACnetNotificationParametersChangeOfReliability) SerializeWithWriteBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetNotificationParametersChangeOfReliability) isBACnetNotificationParametersChangeOfReliability() bool { return true } @@ -361,3 +366,6 @@ func (m *_BACnetNotificationParametersChangeOfReliability) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfState.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfState.go index c8891e3fa49..aee2d0afa39 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfState.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfState.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNotificationParametersChangeOfState is the corresponding interface of BACnetNotificationParametersChangeOfState type BACnetNotificationParametersChangeOfState interface { @@ -52,12 +54,14 @@ type BACnetNotificationParametersChangeOfStateExactly interface { // _BACnetNotificationParametersChangeOfState is the data-structure of this message type _BACnetNotificationParametersChangeOfState struct { *_BACnetNotificationParameters - InnerOpeningTag BACnetOpeningTag - ChangeOfState BACnetPropertyStatesEnclosed - StatusFlags BACnetStatusFlagsTagged - InnerClosingTag BACnetClosingTag + InnerOpeningTag BACnetOpeningTag + ChangeOfState BACnetPropertyStatesEnclosed + StatusFlags BACnetStatusFlagsTagged + InnerClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -68,16 +72,14 @@ type _BACnetNotificationParametersChangeOfState struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetNotificationParametersChangeOfState) InitializeParent(parent BACnetNotificationParameters, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetNotificationParametersChangeOfState) InitializeParent(parent BACnetNotificationParameters , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetNotificationParametersChangeOfState) GetParent() BACnetNotificationParameters { +func (m *_BACnetNotificationParametersChangeOfState) GetParent() BACnetNotificationParameters { return m._BACnetNotificationParameters } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -104,14 +106,15 @@ func (m *_BACnetNotificationParametersChangeOfState) GetInnerClosingTag() BACnet /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNotificationParametersChangeOfState factory function for _BACnetNotificationParametersChangeOfState -func NewBACnetNotificationParametersChangeOfState(innerOpeningTag BACnetOpeningTag, changeOfState BACnetPropertyStatesEnclosed, statusFlags BACnetStatusFlagsTagged, innerClosingTag BACnetClosingTag, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, objectTypeArgument BACnetObjectType) *_BACnetNotificationParametersChangeOfState { +func NewBACnetNotificationParametersChangeOfState( innerOpeningTag BACnetOpeningTag , changeOfState BACnetPropertyStatesEnclosed , statusFlags BACnetStatusFlagsTagged , innerClosingTag BACnetClosingTag , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , objectTypeArgument BACnetObjectType ) *_BACnetNotificationParametersChangeOfState { _result := &_BACnetNotificationParametersChangeOfState{ - InnerOpeningTag: innerOpeningTag, - ChangeOfState: changeOfState, - StatusFlags: statusFlags, - InnerClosingTag: innerClosingTag, - _BACnetNotificationParameters: NewBACnetNotificationParameters(openingTag, peekedTagHeader, closingTag, tagNumber, objectTypeArgument), + InnerOpeningTag: innerOpeningTag, + ChangeOfState: changeOfState, + StatusFlags: statusFlags, + InnerClosingTag: innerClosingTag, + _BACnetNotificationParameters: NewBACnetNotificationParameters(openingTag, peekedTagHeader, closingTag, tagNumber, objectTypeArgument), } _result._BACnetNotificationParameters._BACnetNotificationParametersChildRequirements = _result return _result @@ -119,7 +122,7 @@ func NewBACnetNotificationParametersChangeOfState(innerOpeningTag BACnetOpeningT // Deprecated: use the interface for direct cast func CastBACnetNotificationParametersChangeOfState(structType interface{}) BACnetNotificationParametersChangeOfState { - if casted, ok := structType.(BACnetNotificationParametersChangeOfState); ok { + if casted, ok := structType.(BACnetNotificationParametersChangeOfState); ok { return casted } if casted, ok := structType.(*BACnetNotificationParametersChangeOfState); ok { @@ -150,6 +153,7 @@ func (m *_BACnetNotificationParametersChangeOfState) GetLengthInBits(ctx context return lengthInBits } + func (m *_BACnetNotificationParametersChangeOfState) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -171,7 +175,7 @@ func BACnetNotificationParametersChangeOfStateParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("innerOpeningTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerOpeningTag") } - _innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber)) +_innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) ) if _innerOpeningTagErr != nil { return nil, errors.Wrap(_innerOpeningTagErr, "Error parsing 'innerOpeningTag' field of BACnetNotificationParametersChangeOfState") } @@ -184,7 +188,7 @@ func BACnetNotificationParametersChangeOfStateParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("changeOfState"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for changeOfState") } - _changeOfState, _changeOfStateErr := BACnetPropertyStatesEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_changeOfState, _changeOfStateErr := BACnetPropertyStatesEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _changeOfStateErr != nil { return nil, errors.Wrap(_changeOfStateErr, "Error parsing 'changeOfState' field of BACnetNotificationParametersChangeOfState") } @@ -197,7 +201,7 @@ func BACnetNotificationParametersChangeOfStateParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("statusFlags"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for statusFlags") } - _statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _statusFlagsErr != nil { return nil, errors.Wrap(_statusFlagsErr, "Error parsing 'statusFlags' field of BACnetNotificationParametersChangeOfState") } @@ -210,7 +214,7 @@ func BACnetNotificationParametersChangeOfStateParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("innerClosingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerClosingTag") } - _innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber)) +_innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) ) if _innerClosingTagErr != nil { return nil, errors.Wrap(_innerClosingTagErr, "Error parsing 'innerClosingTag' field of BACnetNotificationParametersChangeOfState") } @@ -226,12 +230,12 @@ func BACnetNotificationParametersChangeOfStateParseWithBuffer(ctx context.Contex // Create a partially initialized instance _child := &_BACnetNotificationParametersChangeOfState{ _BACnetNotificationParameters: &_BACnetNotificationParameters{ - TagNumber: tagNumber, + TagNumber: tagNumber, ObjectTypeArgument: objectTypeArgument, }, InnerOpeningTag: innerOpeningTag, - ChangeOfState: changeOfState, - StatusFlags: statusFlags, + ChangeOfState: changeOfState, + StatusFlags: statusFlags, InnerClosingTag: innerClosingTag, } _child._BACnetNotificationParameters._BACnetNotificationParametersChildRequirements = _child @@ -254,53 +258,53 @@ func (m *_BACnetNotificationParametersChangeOfState) SerializeWithWriteBuffer(ct return errors.Wrap(pushErr, "Error pushing for BACnetNotificationParametersChangeOfState") } - // Simple Field (innerOpeningTag) - if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") - } - _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) - if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerOpeningTag") - } - if _innerOpeningTagErr != nil { - return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") - } + // Simple Field (innerOpeningTag) + if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") + } + _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) + if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerOpeningTag") + } + if _innerOpeningTagErr != nil { + return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") + } - // Simple Field (changeOfState) - if pushErr := writeBuffer.PushContext("changeOfState"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for changeOfState") - } - _changeOfStateErr := writeBuffer.WriteSerializable(ctx, m.GetChangeOfState()) - if popErr := writeBuffer.PopContext("changeOfState"); popErr != nil { - return errors.Wrap(popErr, "Error popping for changeOfState") - } - if _changeOfStateErr != nil { - return errors.Wrap(_changeOfStateErr, "Error serializing 'changeOfState' field") - } + // Simple Field (changeOfState) + if pushErr := writeBuffer.PushContext("changeOfState"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for changeOfState") + } + _changeOfStateErr := writeBuffer.WriteSerializable(ctx, m.GetChangeOfState()) + if popErr := writeBuffer.PopContext("changeOfState"); popErr != nil { + return errors.Wrap(popErr, "Error popping for changeOfState") + } + if _changeOfStateErr != nil { + return errors.Wrap(_changeOfStateErr, "Error serializing 'changeOfState' field") + } - // Simple Field (statusFlags) - if pushErr := writeBuffer.PushContext("statusFlags"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for statusFlags") - } - _statusFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetStatusFlags()) - if popErr := writeBuffer.PopContext("statusFlags"); popErr != nil { - return errors.Wrap(popErr, "Error popping for statusFlags") - } - if _statusFlagsErr != nil { - return errors.Wrap(_statusFlagsErr, "Error serializing 'statusFlags' field") - } + // Simple Field (statusFlags) + if pushErr := writeBuffer.PushContext("statusFlags"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for statusFlags") + } + _statusFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetStatusFlags()) + if popErr := writeBuffer.PopContext("statusFlags"); popErr != nil { + return errors.Wrap(popErr, "Error popping for statusFlags") + } + if _statusFlagsErr != nil { + return errors.Wrap(_statusFlagsErr, "Error serializing 'statusFlags' field") + } - // Simple Field (innerClosingTag) - if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerClosingTag") - } - _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) - if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerClosingTag") - } - if _innerClosingTagErr != nil { - return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") - } + // Simple Field (innerClosingTag) + if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerClosingTag") + } + _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) + if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerClosingTag") + } + if _innerClosingTagErr != nil { + return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") + } if popErr := writeBuffer.PopContext("BACnetNotificationParametersChangeOfState"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetNotificationParametersChangeOfState") @@ -310,6 +314,7 @@ func (m *_BACnetNotificationParametersChangeOfState) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetNotificationParametersChangeOfState) isBACnetNotificationParametersChangeOfState() bool { return true } @@ -324,3 +329,6 @@ func (m *_BACnetNotificationParametersChangeOfState) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfStatusFlags.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfStatusFlags.go index ad9ca9b92e6..430ffe51e2b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfStatusFlags.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfStatusFlags.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNotificationParametersChangeOfStatusFlags is the corresponding interface of BACnetNotificationParametersChangeOfStatusFlags type BACnetNotificationParametersChangeOfStatusFlags interface { @@ -52,12 +54,14 @@ type BACnetNotificationParametersChangeOfStatusFlagsExactly interface { // _BACnetNotificationParametersChangeOfStatusFlags is the data-structure of this message type _BACnetNotificationParametersChangeOfStatusFlags struct { *_BACnetNotificationParameters - InnerOpeningTag BACnetOpeningTag - PresentValue BACnetConstructedData - ReferencedFlags BACnetStatusFlagsTagged - InnerClosingTag BACnetClosingTag + InnerOpeningTag BACnetOpeningTag + PresentValue BACnetConstructedData + ReferencedFlags BACnetStatusFlagsTagged + InnerClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -68,16 +72,14 @@ type _BACnetNotificationParametersChangeOfStatusFlags struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetNotificationParametersChangeOfStatusFlags) InitializeParent(parent BACnetNotificationParameters, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetNotificationParametersChangeOfStatusFlags) InitializeParent(parent BACnetNotificationParameters , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetNotificationParametersChangeOfStatusFlags) GetParent() BACnetNotificationParameters { +func (m *_BACnetNotificationParametersChangeOfStatusFlags) GetParent() BACnetNotificationParameters { return m._BACnetNotificationParameters } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -104,14 +106,15 @@ func (m *_BACnetNotificationParametersChangeOfStatusFlags) GetInnerClosingTag() /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNotificationParametersChangeOfStatusFlags factory function for _BACnetNotificationParametersChangeOfStatusFlags -func NewBACnetNotificationParametersChangeOfStatusFlags(innerOpeningTag BACnetOpeningTag, presentValue BACnetConstructedData, referencedFlags BACnetStatusFlagsTagged, innerClosingTag BACnetClosingTag, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, objectTypeArgument BACnetObjectType) *_BACnetNotificationParametersChangeOfStatusFlags { +func NewBACnetNotificationParametersChangeOfStatusFlags( innerOpeningTag BACnetOpeningTag , presentValue BACnetConstructedData , referencedFlags BACnetStatusFlagsTagged , innerClosingTag BACnetClosingTag , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , objectTypeArgument BACnetObjectType ) *_BACnetNotificationParametersChangeOfStatusFlags { _result := &_BACnetNotificationParametersChangeOfStatusFlags{ - InnerOpeningTag: innerOpeningTag, - PresentValue: presentValue, - ReferencedFlags: referencedFlags, - InnerClosingTag: innerClosingTag, - _BACnetNotificationParameters: NewBACnetNotificationParameters(openingTag, peekedTagHeader, closingTag, tagNumber, objectTypeArgument), + InnerOpeningTag: innerOpeningTag, + PresentValue: presentValue, + ReferencedFlags: referencedFlags, + InnerClosingTag: innerClosingTag, + _BACnetNotificationParameters: NewBACnetNotificationParameters(openingTag, peekedTagHeader, closingTag, tagNumber, objectTypeArgument), } _result._BACnetNotificationParameters._BACnetNotificationParametersChildRequirements = _result return _result @@ -119,7 +122,7 @@ func NewBACnetNotificationParametersChangeOfStatusFlags(innerOpeningTag BACnetOp // Deprecated: use the interface for direct cast func CastBACnetNotificationParametersChangeOfStatusFlags(structType interface{}) BACnetNotificationParametersChangeOfStatusFlags { - if casted, ok := structType.(BACnetNotificationParametersChangeOfStatusFlags); ok { + if casted, ok := structType.(BACnetNotificationParametersChangeOfStatusFlags); ok { return casted } if casted, ok := structType.(*BACnetNotificationParametersChangeOfStatusFlags); ok { @@ -150,6 +153,7 @@ func (m *_BACnetNotificationParametersChangeOfStatusFlags) GetLengthInBits(ctx c return lengthInBits } + func (m *_BACnetNotificationParametersChangeOfStatusFlags) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -171,7 +175,7 @@ func BACnetNotificationParametersChangeOfStatusFlagsParseWithBuffer(ctx context. if pullErr := readBuffer.PullContext("innerOpeningTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerOpeningTag") } - _innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber)) +_innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) ) if _innerOpeningTagErr != nil { return nil, errors.Wrap(_innerOpeningTagErr, "Error parsing 'innerOpeningTag' field of BACnetNotificationParametersChangeOfStatusFlags") } @@ -184,7 +188,7 @@ func BACnetNotificationParametersChangeOfStatusFlagsParseWithBuffer(ctx context. if pullErr := readBuffer.PullContext("presentValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for presentValue") } - _presentValue, _presentValueErr := BACnetConstructedDataParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetObjectType(objectTypeArgument), BACnetPropertyIdentifier(BACnetPropertyIdentifier_VENDOR_PROPRIETARY_VALUE), nil) +_presentValue, _presentValueErr := BACnetConstructedDataParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetObjectType( objectTypeArgument ) , BACnetPropertyIdentifier( BACnetPropertyIdentifier_VENDOR_PROPRIETARY_VALUE ) , nil ) if _presentValueErr != nil { return nil, errors.Wrap(_presentValueErr, "Error parsing 'presentValue' field of BACnetNotificationParametersChangeOfStatusFlags") } @@ -197,7 +201,7 @@ func BACnetNotificationParametersChangeOfStatusFlagsParseWithBuffer(ctx context. if pullErr := readBuffer.PullContext("referencedFlags"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for referencedFlags") } - _referencedFlags, _referencedFlagsErr := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_referencedFlags, _referencedFlagsErr := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _referencedFlagsErr != nil { return nil, errors.Wrap(_referencedFlagsErr, "Error parsing 'referencedFlags' field of BACnetNotificationParametersChangeOfStatusFlags") } @@ -210,7 +214,7 @@ func BACnetNotificationParametersChangeOfStatusFlagsParseWithBuffer(ctx context. if pullErr := readBuffer.PullContext("innerClosingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerClosingTag") } - _innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber)) +_innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) ) if _innerClosingTagErr != nil { return nil, errors.Wrap(_innerClosingTagErr, "Error parsing 'innerClosingTag' field of BACnetNotificationParametersChangeOfStatusFlags") } @@ -226,11 +230,11 @@ func BACnetNotificationParametersChangeOfStatusFlagsParseWithBuffer(ctx context. // Create a partially initialized instance _child := &_BACnetNotificationParametersChangeOfStatusFlags{ _BACnetNotificationParameters: &_BACnetNotificationParameters{ - TagNumber: tagNumber, + TagNumber: tagNumber, ObjectTypeArgument: objectTypeArgument, }, InnerOpeningTag: innerOpeningTag, - PresentValue: presentValue, + PresentValue: presentValue, ReferencedFlags: referencedFlags, InnerClosingTag: innerClosingTag, } @@ -254,53 +258,53 @@ func (m *_BACnetNotificationParametersChangeOfStatusFlags) SerializeWithWriteBuf return errors.Wrap(pushErr, "Error pushing for BACnetNotificationParametersChangeOfStatusFlags") } - // Simple Field (innerOpeningTag) - if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") - } - _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) - if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerOpeningTag") - } - if _innerOpeningTagErr != nil { - return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") - } + // Simple Field (innerOpeningTag) + if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") + } + _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) + if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerOpeningTag") + } + if _innerOpeningTagErr != nil { + return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") + } - // Simple Field (presentValue) - if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for presentValue") - } - _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) - if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for presentValue") - } - if _presentValueErr != nil { - return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") - } + // Simple Field (presentValue) + if pushErr := writeBuffer.PushContext("presentValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for presentValue") + } + _presentValueErr := writeBuffer.WriteSerializable(ctx, m.GetPresentValue()) + if popErr := writeBuffer.PopContext("presentValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for presentValue") + } + if _presentValueErr != nil { + return errors.Wrap(_presentValueErr, "Error serializing 'presentValue' field") + } - // Simple Field (referencedFlags) - if pushErr := writeBuffer.PushContext("referencedFlags"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for referencedFlags") - } - _referencedFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetReferencedFlags()) - if popErr := writeBuffer.PopContext("referencedFlags"); popErr != nil { - return errors.Wrap(popErr, "Error popping for referencedFlags") - } - if _referencedFlagsErr != nil { - return errors.Wrap(_referencedFlagsErr, "Error serializing 'referencedFlags' field") - } + // Simple Field (referencedFlags) + if pushErr := writeBuffer.PushContext("referencedFlags"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for referencedFlags") + } + _referencedFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetReferencedFlags()) + if popErr := writeBuffer.PopContext("referencedFlags"); popErr != nil { + return errors.Wrap(popErr, "Error popping for referencedFlags") + } + if _referencedFlagsErr != nil { + return errors.Wrap(_referencedFlagsErr, "Error serializing 'referencedFlags' field") + } - // Simple Field (innerClosingTag) - if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerClosingTag") - } - _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) - if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerClosingTag") - } - if _innerClosingTagErr != nil { - return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") - } + // Simple Field (innerClosingTag) + if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerClosingTag") + } + _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) + if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerClosingTag") + } + if _innerClosingTagErr != nil { + return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") + } if popErr := writeBuffer.PopContext("BACnetNotificationParametersChangeOfStatusFlags"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetNotificationParametersChangeOfStatusFlags") @@ -310,6 +314,7 @@ func (m *_BACnetNotificationParametersChangeOfStatusFlags) SerializeWithWriteBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetNotificationParametersChangeOfStatusFlags) isBACnetNotificationParametersChangeOfStatusFlags() bool { return true } @@ -324,3 +329,6 @@ func (m *_BACnetNotificationParametersChangeOfStatusFlags) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfTimer.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfTimer.go index 6c08c9e2925..54b64f313ce 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfTimer.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfTimer.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNotificationParametersChangeOfTimer is the corresponding interface of BACnetNotificationParametersChangeOfTimer type BACnetNotificationParametersChangeOfTimer interface { @@ -61,16 +63,18 @@ type BACnetNotificationParametersChangeOfTimerExactly interface { // _BACnetNotificationParametersChangeOfTimer is the data-structure of this message type _BACnetNotificationParametersChangeOfTimer struct { *_BACnetNotificationParameters - InnerOpeningTag BACnetOpeningTag - NewValue BACnetTimerStateTagged - StatusFlags BACnetStatusFlagsTagged - UpdateTime BACnetDateTimeEnclosed - LastStateChange BACnetTimerTransitionTagged - InitialTimeout BACnetContextTagUnsignedInteger - ExpirationTime BACnetDateTimeEnclosed - InnerClosingTag BACnetClosingTag + InnerOpeningTag BACnetOpeningTag + NewValue BACnetTimerStateTagged + StatusFlags BACnetStatusFlagsTagged + UpdateTime BACnetDateTimeEnclosed + LastStateChange BACnetTimerTransitionTagged + InitialTimeout BACnetContextTagUnsignedInteger + ExpirationTime BACnetDateTimeEnclosed + InnerClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -81,16 +85,14 @@ type _BACnetNotificationParametersChangeOfTimer struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetNotificationParametersChangeOfTimer) InitializeParent(parent BACnetNotificationParameters, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetNotificationParametersChangeOfTimer) InitializeParent(parent BACnetNotificationParameters , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetNotificationParametersChangeOfTimer) GetParent() BACnetNotificationParameters { +func (m *_BACnetNotificationParametersChangeOfTimer) GetParent() BACnetNotificationParameters { return m._BACnetNotificationParameters } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -133,18 +135,19 @@ func (m *_BACnetNotificationParametersChangeOfTimer) GetInnerClosingTag() BACnet /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNotificationParametersChangeOfTimer factory function for _BACnetNotificationParametersChangeOfTimer -func NewBACnetNotificationParametersChangeOfTimer(innerOpeningTag BACnetOpeningTag, newValue BACnetTimerStateTagged, statusFlags BACnetStatusFlagsTagged, updateTime BACnetDateTimeEnclosed, lastStateChange BACnetTimerTransitionTagged, initialTimeout BACnetContextTagUnsignedInteger, expirationTime BACnetDateTimeEnclosed, innerClosingTag BACnetClosingTag, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, objectTypeArgument BACnetObjectType) *_BACnetNotificationParametersChangeOfTimer { +func NewBACnetNotificationParametersChangeOfTimer( innerOpeningTag BACnetOpeningTag , newValue BACnetTimerStateTagged , statusFlags BACnetStatusFlagsTagged , updateTime BACnetDateTimeEnclosed , lastStateChange BACnetTimerTransitionTagged , initialTimeout BACnetContextTagUnsignedInteger , expirationTime BACnetDateTimeEnclosed , innerClosingTag BACnetClosingTag , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , objectTypeArgument BACnetObjectType ) *_BACnetNotificationParametersChangeOfTimer { _result := &_BACnetNotificationParametersChangeOfTimer{ - InnerOpeningTag: innerOpeningTag, - NewValue: newValue, - StatusFlags: statusFlags, - UpdateTime: updateTime, - LastStateChange: lastStateChange, - InitialTimeout: initialTimeout, - ExpirationTime: expirationTime, - InnerClosingTag: innerClosingTag, - _BACnetNotificationParameters: NewBACnetNotificationParameters(openingTag, peekedTagHeader, closingTag, tagNumber, objectTypeArgument), + InnerOpeningTag: innerOpeningTag, + NewValue: newValue, + StatusFlags: statusFlags, + UpdateTime: updateTime, + LastStateChange: lastStateChange, + InitialTimeout: initialTimeout, + ExpirationTime: expirationTime, + InnerClosingTag: innerClosingTag, + _BACnetNotificationParameters: NewBACnetNotificationParameters(openingTag, peekedTagHeader, closingTag, tagNumber, objectTypeArgument), } _result._BACnetNotificationParameters._BACnetNotificationParametersChildRequirements = _result return _result @@ -152,7 +155,7 @@ func NewBACnetNotificationParametersChangeOfTimer(innerOpeningTag BACnetOpeningT // Deprecated: use the interface for direct cast func CastBACnetNotificationParametersChangeOfTimer(structType interface{}) BACnetNotificationParametersChangeOfTimer { - if casted, ok := structType.(BACnetNotificationParametersChangeOfTimer); ok { + if casted, ok := structType.(BACnetNotificationParametersChangeOfTimer); ok { return casted } if casted, ok := structType.(*BACnetNotificationParametersChangeOfTimer); ok { @@ -201,6 +204,7 @@ func (m *_BACnetNotificationParametersChangeOfTimer) GetLengthInBits(ctx context return lengthInBits } + func (m *_BACnetNotificationParametersChangeOfTimer) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -222,7 +226,7 @@ func BACnetNotificationParametersChangeOfTimerParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("innerOpeningTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerOpeningTag") } - _innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber)) +_innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) ) if _innerOpeningTagErr != nil { return nil, errors.Wrap(_innerOpeningTagErr, "Error parsing 'innerOpeningTag' field of BACnetNotificationParametersChangeOfTimer") } @@ -235,7 +239,7 @@ func BACnetNotificationParametersChangeOfTimerParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("newValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for newValue") } - _newValue, _newValueErr := BACnetTimerStateTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_newValue, _newValueErr := BACnetTimerStateTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _newValueErr != nil { return nil, errors.Wrap(_newValueErr, "Error parsing 'newValue' field of BACnetNotificationParametersChangeOfTimer") } @@ -248,7 +252,7 @@ func BACnetNotificationParametersChangeOfTimerParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("statusFlags"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for statusFlags") } - _statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _statusFlagsErr != nil { return nil, errors.Wrap(_statusFlagsErr, "Error parsing 'statusFlags' field of BACnetNotificationParametersChangeOfTimer") } @@ -261,7 +265,7 @@ func BACnetNotificationParametersChangeOfTimerParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("updateTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for updateTime") } - _updateTime, _updateTimeErr := BACnetDateTimeEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(2))) +_updateTime, _updateTimeErr := BACnetDateTimeEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) ) if _updateTimeErr != nil { return nil, errors.Wrap(_updateTimeErr, "Error parsing 'updateTime' field of BACnetNotificationParametersChangeOfTimer") } @@ -272,12 +276,12 @@ func BACnetNotificationParametersChangeOfTimerParseWithBuffer(ctx context.Contex // Optional Field (lastStateChange) (Can be skipped, if a given expression evaluates to false) var lastStateChange BACnetTimerTransitionTagged = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("lastStateChange"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lastStateChange") } - _val, _err := BACnetTimerTransitionTaggedParseWithBuffer(ctx, readBuffer, uint8(3), TagClass_CONTEXT_SPECIFIC_TAGS) +_val, _err := BACnetTimerTransitionTaggedParseWithBuffer(ctx, readBuffer , uint8(3) , TagClass_CONTEXT_SPECIFIC_TAGS ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -294,12 +298,12 @@ func BACnetNotificationParametersChangeOfTimerParseWithBuffer(ctx context.Contex // Optional Field (initialTimeout) (Can be skipped, if a given expression evaluates to false) var initialTimeout BACnetContextTagUnsignedInteger = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("initialTimeout"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for initialTimeout") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(4), BACnetDataType_UNSIGNED_INTEGER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(4) , BACnetDataType_UNSIGNED_INTEGER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -316,12 +320,12 @@ func BACnetNotificationParametersChangeOfTimerParseWithBuffer(ctx context.Contex // Optional Field (expirationTime) (Can be skipped, if a given expression evaluates to false) var expirationTime BACnetDateTimeEnclosed = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("expirationTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for expirationTime") } - _val, _err := BACnetDateTimeEnclosedParseWithBuffer(ctx, readBuffer, uint8(5)) +_val, _err := BACnetDateTimeEnclosedParseWithBuffer(ctx, readBuffer , uint8(5) ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -340,7 +344,7 @@ func BACnetNotificationParametersChangeOfTimerParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("innerClosingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerClosingTag") } - _innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber)) +_innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) ) if _innerClosingTagErr != nil { return nil, errors.Wrap(_innerClosingTagErr, "Error parsing 'innerClosingTag' field of BACnetNotificationParametersChangeOfTimer") } @@ -356,16 +360,16 @@ func BACnetNotificationParametersChangeOfTimerParseWithBuffer(ctx context.Contex // Create a partially initialized instance _child := &_BACnetNotificationParametersChangeOfTimer{ _BACnetNotificationParameters: &_BACnetNotificationParameters{ - TagNumber: tagNumber, + TagNumber: tagNumber, ObjectTypeArgument: objectTypeArgument, }, InnerOpeningTag: innerOpeningTag, - NewValue: newValue, - StatusFlags: statusFlags, - UpdateTime: updateTime, + NewValue: newValue, + StatusFlags: statusFlags, + UpdateTime: updateTime, LastStateChange: lastStateChange, - InitialTimeout: initialTimeout, - ExpirationTime: expirationTime, + InitialTimeout: initialTimeout, + ExpirationTime: expirationTime, InnerClosingTag: innerClosingTag, } _child._BACnetNotificationParameters._BACnetNotificationParametersChildRequirements = _child @@ -388,113 +392,113 @@ func (m *_BACnetNotificationParametersChangeOfTimer) SerializeWithWriteBuffer(ct return errors.Wrap(pushErr, "Error pushing for BACnetNotificationParametersChangeOfTimer") } - // Simple Field (innerOpeningTag) - if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") - } - _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) - if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerOpeningTag") - } - if _innerOpeningTagErr != nil { - return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") - } + // Simple Field (innerOpeningTag) + if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") + } + _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) + if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerOpeningTag") + } + if _innerOpeningTagErr != nil { + return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") + } - // Simple Field (newValue) - if pushErr := writeBuffer.PushContext("newValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for newValue") - } - _newValueErr := writeBuffer.WriteSerializable(ctx, m.GetNewValue()) - if popErr := writeBuffer.PopContext("newValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for newValue") - } - if _newValueErr != nil { - return errors.Wrap(_newValueErr, "Error serializing 'newValue' field") - } + // Simple Field (newValue) + if pushErr := writeBuffer.PushContext("newValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for newValue") + } + _newValueErr := writeBuffer.WriteSerializable(ctx, m.GetNewValue()) + if popErr := writeBuffer.PopContext("newValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for newValue") + } + if _newValueErr != nil { + return errors.Wrap(_newValueErr, "Error serializing 'newValue' field") + } - // Simple Field (statusFlags) - if pushErr := writeBuffer.PushContext("statusFlags"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for statusFlags") - } - _statusFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetStatusFlags()) - if popErr := writeBuffer.PopContext("statusFlags"); popErr != nil { - return errors.Wrap(popErr, "Error popping for statusFlags") - } - if _statusFlagsErr != nil { - return errors.Wrap(_statusFlagsErr, "Error serializing 'statusFlags' field") - } + // Simple Field (statusFlags) + if pushErr := writeBuffer.PushContext("statusFlags"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for statusFlags") + } + _statusFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetStatusFlags()) + if popErr := writeBuffer.PopContext("statusFlags"); popErr != nil { + return errors.Wrap(popErr, "Error popping for statusFlags") + } + if _statusFlagsErr != nil { + return errors.Wrap(_statusFlagsErr, "Error serializing 'statusFlags' field") + } - // Simple Field (updateTime) - if pushErr := writeBuffer.PushContext("updateTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for updateTime") + // Simple Field (updateTime) + if pushErr := writeBuffer.PushContext("updateTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for updateTime") + } + _updateTimeErr := writeBuffer.WriteSerializable(ctx, m.GetUpdateTime()) + if popErr := writeBuffer.PopContext("updateTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for updateTime") + } + if _updateTimeErr != nil { + return errors.Wrap(_updateTimeErr, "Error serializing 'updateTime' field") + } + + // Optional Field (lastStateChange) (Can be skipped, if the value is null) + var lastStateChange BACnetTimerTransitionTagged = nil + if m.GetLastStateChange() != nil { + if pushErr := writeBuffer.PushContext("lastStateChange"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lastStateChange") } - _updateTimeErr := writeBuffer.WriteSerializable(ctx, m.GetUpdateTime()) - if popErr := writeBuffer.PopContext("updateTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for updateTime") + lastStateChange = m.GetLastStateChange() + _lastStateChangeErr := writeBuffer.WriteSerializable(ctx, lastStateChange) + if popErr := writeBuffer.PopContext("lastStateChange"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lastStateChange") } - if _updateTimeErr != nil { - return errors.Wrap(_updateTimeErr, "Error serializing 'updateTime' field") + if _lastStateChangeErr != nil { + return errors.Wrap(_lastStateChangeErr, "Error serializing 'lastStateChange' field") } + } - // Optional Field (lastStateChange) (Can be skipped, if the value is null) - var lastStateChange BACnetTimerTransitionTagged = nil - if m.GetLastStateChange() != nil { - if pushErr := writeBuffer.PushContext("lastStateChange"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lastStateChange") - } - lastStateChange = m.GetLastStateChange() - _lastStateChangeErr := writeBuffer.WriteSerializable(ctx, lastStateChange) - if popErr := writeBuffer.PopContext("lastStateChange"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lastStateChange") - } - if _lastStateChangeErr != nil { - return errors.Wrap(_lastStateChangeErr, "Error serializing 'lastStateChange' field") - } + // Optional Field (initialTimeout) (Can be skipped, if the value is null) + var initialTimeout BACnetContextTagUnsignedInteger = nil + if m.GetInitialTimeout() != nil { + if pushErr := writeBuffer.PushContext("initialTimeout"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for initialTimeout") } - - // Optional Field (initialTimeout) (Can be skipped, if the value is null) - var initialTimeout BACnetContextTagUnsignedInteger = nil - if m.GetInitialTimeout() != nil { - if pushErr := writeBuffer.PushContext("initialTimeout"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for initialTimeout") - } - initialTimeout = m.GetInitialTimeout() - _initialTimeoutErr := writeBuffer.WriteSerializable(ctx, initialTimeout) - if popErr := writeBuffer.PopContext("initialTimeout"); popErr != nil { - return errors.Wrap(popErr, "Error popping for initialTimeout") - } - if _initialTimeoutErr != nil { - return errors.Wrap(_initialTimeoutErr, "Error serializing 'initialTimeout' field") - } + initialTimeout = m.GetInitialTimeout() + _initialTimeoutErr := writeBuffer.WriteSerializable(ctx, initialTimeout) + if popErr := writeBuffer.PopContext("initialTimeout"); popErr != nil { + return errors.Wrap(popErr, "Error popping for initialTimeout") } - - // Optional Field (expirationTime) (Can be skipped, if the value is null) - var expirationTime BACnetDateTimeEnclosed = nil - if m.GetExpirationTime() != nil { - if pushErr := writeBuffer.PushContext("expirationTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for expirationTime") - } - expirationTime = m.GetExpirationTime() - _expirationTimeErr := writeBuffer.WriteSerializable(ctx, expirationTime) - if popErr := writeBuffer.PopContext("expirationTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for expirationTime") - } - if _expirationTimeErr != nil { - return errors.Wrap(_expirationTimeErr, "Error serializing 'expirationTime' field") - } + if _initialTimeoutErr != nil { + return errors.Wrap(_initialTimeoutErr, "Error serializing 'initialTimeout' field") } + } - // Simple Field (innerClosingTag) - if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerClosingTag") + // Optional Field (expirationTime) (Can be skipped, if the value is null) + var expirationTime BACnetDateTimeEnclosed = nil + if m.GetExpirationTime() != nil { + if pushErr := writeBuffer.PushContext("expirationTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for expirationTime") } - _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) - if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerClosingTag") + expirationTime = m.GetExpirationTime() + _expirationTimeErr := writeBuffer.WriteSerializable(ctx, expirationTime) + if popErr := writeBuffer.PopContext("expirationTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for expirationTime") } - if _innerClosingTagErr != nil { - return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") + if _expirationTimeErr != nil { + return errors.Wrap(_expirationTimeErr, "Error serializing 'expirationTime' field") } + } + + // Simple Field (innerClosingTag) + if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerClosingTag") + } + _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) + if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerClosingTag") + } + if _innerClosingTagErr != nil { + return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") + } if popErr := writeBuffer.PopContext("BACnetNotificationParametersChangeOfTimer"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetNotificationParametersChangeOfTimer") @@ -504,6 +508,7 @@ func (m *_BACnetNotificationParametersChangeOfTimer) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetNotificationParametersChangeOfTimer) isBACnetNotificationParametersChangeOfTimer() bool { return true } @@ -518,3 +523,6 @@ func (m *_BACnetNotificationParametersChangeOfTimer) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfValue.go index b64c9a7d4bd..fc02f26374a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNotificationParametersChangeOfValue is the corresponding interface of BACnetNotificationParametersChangeOfValue type BACnetNotificationParametersChangeOfValue interface { @@ -52,12 +54,14 @@ type BACnetNotificationParametersChangeOfValueExactly interface { // _BACnetNotificationParametersChangeOfValue is the data-structure of this message type _BACnetNotificationParametersChangeOfValue struct { *_BACnetNotificationParameters - InnerOpeningTag BACnetOpeningTag - NewValue BACnetNotificationParametersChangeOfValueNewValue - StatusFlags BACnetStatusFlagsTagged - InnerClosingTag BACnetClosingTag + InnerOpeningTag BACnetOpeningTag + NewValue BACnetNotificationParametersChangeOfValueNewValue + StatusFlags BACnetStatusFlagsTagged + InnerClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -68,16 +72,14 @@ type _BACnetNotificationParametersChangeOfValue struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetNotificationParametersChangeOfValue) InitializeParent(parent BACnetNotificationParameters, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetNotificationParametersChangeOfValue) InitializeParent(parent BACnetNotificationParameters , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetNotificationParametersChangeOfValue) GetParent() BACnetNotificationParameters { +func (m *_BACnetNotificationParametersChangeOfValue) GetParent() BACnetNotificationParameters { return m._BACnetNotificationParameters } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -104,14 +106,15 @@ func (m *_BACnetNotificationParametersChangeOfValue) GetInnerClosingTag() BACnet /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNotificationParametersChangeOfValue factory function for _BACnetNotificationParametersChangeOfValue -func NewBACnetNotificationParametersChangeOfValue(innerOpeningTag BACnetOpeningTag, newValue BACnetNotificationParametersChangeOfValueNewValue, statusFlags BACnetStatusFlagsTagged, innerClosingTag BACnetClosingTag, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, objectTypeArgument BACnetObjectType) *_BACnetNotificationParametersChangeOfValue { +func NewBACnetNotificationParametersChangeOfValue( innerOpeningTag BACnetOpeningTag , newValue BACnetNotificationParametersChangeOfValueNewValue , statusFlags BACnetStatusFlagsTagged , innerClosingTag BACnetClosingTag , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , objectTypeArgument BACnetObjectType ) *_BACnetNotificationParametersChangeOfValue { _result := &_BACnetNotificationParametersChangeOfValue{ - InnerOpeningTag: innerOpeningTag, - NewValue: newValue, - StatusFlags: statusFlags, - InnerClosingTag: innerClosingTag, - _BACnetNotificationParameters: NewBACnetNotificationParameters(openingTag, peekedTagHeader, closingTag, tagNumber, objectTypeArgument), + InnerOpeningTag: innerOpeningTag, + NewValue: newValue, + StatusFlags: statusFlags, + InnerClosingTag: innerClosingTag, + _BACnetNotificationParameters: NewBACnetNotificationParameters(openingTag, peekedTagHeader, closingTag, tagNumber, objectTypeArgument), } _result._BACnetNotificationParameters._BACnetNotificationParametersChildRequirements = _result return _result @@ -119,7 +122,7 @@ func NewBACnetNotificationParametersChangeOfValue(innerOpeningTag BACnetOpeningT // Deprecated: use the interface for direct cast func CastBACnetNotificationParametersChangeOfValue(structType interface{}) BACnetNotificationParametersChangeOfValue { - if casted, ok := structType.(BACnetNotificationParametersChangeOfValue); ok { + if casted, ok := structType.(BACnetNotificationParametersChangeOfValue); ok { return casted } if casted, ok := structType.(*BACnetNotificationParametersChangeOfValue); ok { @@ -150,6 +153,7 @@ func (m *_BACnetNotificationParametersChangeOfValue) GetLengthInBits(ctx context return lengthInBits } + func (m *_BACnetNotificationParametersChangeOfValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -171,7 +175,7 @@ func BACnetNotificationParametersChangeOfValueParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("innerOpeningTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerOpeningTag") } - _innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber)) +_innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) ) if _innerOpeningTagErr != nil { return nil, errors.Wrap(_innerOpeningTagErr, "Error parsing 'innerOpeningTag' field of BACnetNotificationParametersChangeOfValue") } @@ -184,7 +188,7 @@ func BACnetNotificationParametersChangeOfValueParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("newValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for newValue") } - _newValue, _newValueErr := BACnetNotificationParametersChangeOfValueNewValueParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_newValue, _newValueErr := BACnetNotificationParametersChangeOfValueNewValueParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _newValueErr != nil { return nil, errors.Wrap(_newValueErr, "Error parsing 'newValue' field of BACnetNotificationParametersChangeOfValue") } @@ -197,7 +201,7 @@ func BACnetNotificationParametersChangeOfValueParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("statusFlags"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for statusFlags") } - _statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _statusFlagsErr != nil { return nil, errors.Wrap(_statusFlagsErr, "Error parsing 'statusFlags' field of BACnetNotificationParametersChangeOfValue") } @@ -210,7 +214,7 @@ func BACnetNotificationParametersChangeOfValueParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("innerClosingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerClosingTag") } - _innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber)) +_innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) ) if _innerClosingTagErr != nil { return nil, errors.Wrap(_innerClosingTagErr, "Error parsing 'innerClosingTag' field of BACnetNotificationParametersChangeOfValue") } @@ -226,12 +230,12 @@ func BACnetNotificationParametersChangeOfValueParseWithBuffer(ctx context.Contex // Create a partially initialized instance _child := &_BACnetNotificationParametersChangeOfValue{ _BACnetNotificationParameters: &_BACnetNotificationParameters{ - TagNumber: tagNumber, + TagNumber: tagNumber, ObjectTypeArgument: objectTypeArgument, }, InnerOpeningTag: innerOpeningTag, - NewValue: newValue, - StatusFlags: statusFlags, + NewValue: newValue, + StatusFlags: statusFlags, InnerClosingTag: innerClosingTag, } _child._BACnetNotificationParameters._BACnetNotificationParametersChildRequirements = _child @@ -254,53 +258,53 @@ func (m *_BACnetNotificationParametersChangeOfValue) SerializeWithWriteBuffer(ct return errors.Wrap(pushErr, "Error pushing for BACnetNotificationParametersChangeOfValue") } - // Simple Field (innerOpeningTag) - if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") - } - _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) - if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerOpeningTag") - } - if _innerOpeningTagErr != nil { - return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") - } + // Simple Field (innerOpeningTag) + if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") + } + _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) + if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerOpeningTag") + } + if _innerOpeningTagErr != nil { + return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") + } - // Simple Field (newValue) - if pushErr := writeBuffer.PushContext("newValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for newValue") - } - _newValueErr := writeBuffer.WriteSerializable(ctx, m.GetNewValue()) - if popErr := writeBuffer.PopContext("newValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for newValue") - } - if _newValueErr != nil { - return errors.Wrap(_newValueErr, "Error serializing 'newValue' field") - } + // Simple Field (newValue) + if pushErr := writeBuffer.PushContext("newValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for newValue") + } + _newValueErr := writeBuffer.WriteSerializable(ctx, m.GetNewValue()) + if popErr := writeBuffer.PopContext("newValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for newValue") + } + if _newValueErr != nil { + return errors.Wrap(_newValueErr, "Error serializing 'newValue' field") + } - // Simple Field (statusFlags) - if pushErr := writeBuffer.PushContext("statusFlags"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for statusFlags") - } - _statusFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetStatusFlags()) - if popErr := writeBuffer.PopContext("statusFlags"); popErr != nil { - return errors.Wrap(popErr, "Error popping for statusFlags") - } - if _statusFlagsErr != nil { - return errors.Wrap(_statusFlagsErr, "Error serializing 'statusFlags' field") - } + // Simple Field (statusFlags) + if pushErr := writeBuffer.PushContext("statusFlags"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for statusFlags") + } + _statusFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetStatusFlags()) + if popErr := writeBuffer.PopContext("statusFlags"); popErr != nil { + return errors.Wrap(popErr, "Error popping for statusFlags") + } + if _statusFlagsErr != nil { + return errors.Wrap(_statusFlagsErr, "Error serializing 'statusFlags' field") + } - // Simple Field (innerClosingTag) - if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerClosingTag") - } - _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) - if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerClosingTag") - } - if _innerClosingTagErr != nil { - return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") - } + // Simple Field (innerClosingTag) + if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerClosingTag") + } + _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) + if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerClosingTag") + } + if _innerClosingTagErr != nil { + return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") + } if popErr := writeBuffer.PopContext("BACnetNotificationParametersChangeOfValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetNotificationParametersChangeOfValue") @@ -310,6 +314,7 @@ func (m *_BACnetNotificationParametersChangeOfValue) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetNotificationParametersChangeOfValue) isBACnetNotificationParametersChangeOfValue() bool { return true } @@ -324,3 +329,6 @@ func (m *_BACnetNotificationParametersChangeOfValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfValueNewValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfValueNewValue.go index 31925df9602..d3dabff1a5c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfValueNewValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfValueNewValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNotificationParametersChangeOfValueNewValue is the corresponding interface of BACnetNotificationParametersChangeOfValueNewValue type BACnetNotificationParametersChangeOfValueNewValue interface { @@ -51,9 +53,9 @@ type BACnetNotificationParametersChangeOfValueNewValueExactly interface { // _BACnetNotificationParametersChangeOfValueNewValue is the data-structure of this message type _BACnetNotificationParametersChangeOfValueNewValue struct { _BACnetNotificationParametersChangeOfValueNewValueChildRequirements - OpeningTag BACnetOpeningTag - PeekedTagHeader BACnetTagHeader - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + PeekedTagHeader BACnetTagHeader + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 @@ -64,6 +66,7 @@ type _BACnetNotificationParametersChangeOfValueNewValueChildRequirements interfa GetLengthInBits(ctx context.Context) uint16 } + type BACnetNotificationParametersChangeOfValueNewValueParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetNotificationParametersChangeOfValueNewValue, serializeChildFunction func() error) error GetTypeName() string @@ -71,13 +74,12 @@ type BACnetNotificationParametersChangeOfValueNewValueParent interface { type BACnetNotificationParametersChangeOfValueNewValueChild interface { utils.Serializable - InitializeParent(parent BACnetNotificationParametersChangeOfValueNewValue, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) +InitializeParent(parent BACnetNotificationParametersChangeOfValueNewValue , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) GetParent() *BACnetNotificationParametersChangeOfValueNewValue GetTypeName() string BACnetNotificationParametersChangeOfValueNewValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -115,14 +117,15 @@ func (m *_BACnetNotificationParametersChangeOfValueNewValue) GetPeekedTagNumber( /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNotificationParametersChangeOfValueNewValue factory function for _BACnetNotificationParametersChangeOfValueNewValue -func NewBACnetNotificationParametersChangeOfValueNewValue(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetNotificationParametersChangeOfValueNewValue { - return &_BACnetNotificationParametersChangeOfValueNewValue{OpeningTag: openingTag, PeekedTagHeader: peekedTagHeader, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetNotificationParametersChangeOfValueNewValue( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetNotificationParametersChangeOfValueNewValue { +return &_BACnetNotificationParametersChangeOfValueNewValue{ OpeningTag: openingTag , PeekedTagHeader: peekedTagHeader , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetNotificationParametersChangeOfValueNewValue(structType interface{}) BACnetNotificationParametersChangeOfValueNewValue { - if casted, ok := structType.(BACnetNotificationParametersChangeOfValueNewValue); ok { + if casted, ok := structType.(BACnetNotificationParametersChangeOfValueNewValue); ok { return casted } if casted, ok := structType.(*BACnetNotificationParametersChangeOfValueNewValue); ok { @@ -135,6 +138,7 @@ func (m *_BACnetNotificationParametersChangeOfValueNewValue) GetTypeName() strin return "BACnetNotificationParametersChangeOfValueNewValue" } + func (m *_BACnetNotificationParametersChangeOfValueNewValue) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -170,7 +174,7 @@ func BACnetNotificationParametersChangeOfValueNewValueParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetNotificationParametersChangeOfValueNewValue") } @@ -179,13 +183,13 @@ func BACnetNotificationParametersChangeOfValueNewValueParseWithBuffer(ctx contex return nil, errors.Wrap(closeErr, "Error closing for openingTag") } - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Virtual field _peekedTagNumber := peekedTagHeader.GetActualTagNumber() @@ -195,16 +199,16 @@ func BACnetNotificationParametersChangeOfValueNewValueParseWithBuffer(ctx contex // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetNotificationParametersChangeOfValueNewValueChildSerializeRequirement interface { BACnetNotificationParametersChangeOfValueNewValue - InitializeParent(BACnetNotificationParametersChangeOfValueNewValue, BACnetOpeningTag, BACnetTagHeader, BACnetClosingTag) + InitializeParent(BACnetNotificationParametersChangeOfValueNewValue, BACnetOpeningTag, BACnetTagHeader, BACnetClosingTag) GetParent() BACnetNotificationParametersChangeOfValueNewValue } var _childTemp interface{} var _child BACnetNotificationParametersChangeOfValueNewValueChildSerializeRequirement var typeSwitchError error switch { - case peekedTagNumber == uint8(0): // BACnetNotificationParametersChangeOfValueNewValueChangedBits +case peekedTagNumber == uint8(0) : // BACnetNotificationParametersChangeOfValueNewValueChangedBits _childTemp, typeSwitchError = BACnetNotificationParametersChangeOfValueNewValueChangedBitsParseWithBuffer(ctx, readBuffer, peekedTagNumber, tagNumber) - case peekedTagNumber == uint8(1): // BACnetNotificationParametersChangeOfValueNewValueChangedValue +case peekedTagNumber == uint8(1) : // BACnetNotificationParametersChangeOfValueNewValueChangedValue _childTemp, typeSwitchError = BACnetNotificationParametersChangeOfValueNewValueChangedValueParseWithBuffer(ctx, readBuffer, peekedTagNumber, tagNumber) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedTagNumber=%v]", peekedTagNumber) @@ -218,7 +222,7 @@ func BACnetNotificationParametersChangeOfValueNewValueParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetNotificationParametersChangeOfValueNewValue") } @@ -232,7 +236,7 @@ func BACnetNotificationParametersChangeOfValueNewValueParseWithBuffer(ctx contex } // Finish initializing - _child.InitializeParent(_child, openingTag, peekedTagHeader, closingTag) +_child.InitializeParent(_child , openingTag , peekedTagHeader , closingTag ) return _child, nil } @@ -242,7 +246,7 @@ func (pm *_BACnetNotificationParametersChangeOfValueNewValue) SerializeParent(ct _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetNotificationParametersChangeOfValueNewValue"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetNotificationParametersChangeOfValueNewValue"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetNotificationParametersChangeOfValueNewValue") } @@ -285,13 +289,13 @@ func (pm *_BACnetNotificationParametersChangeOfValueNewValue) SerializeParent(ct return nil } + //// // Arguments Getter func (m *_BACnetNotificationParametersChangeOfValueNewValue) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -309,3 +313,6 @@ func (m *_BACnetNotificationParametersChangeOfValueNewValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfValueNewValueChangedBits.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfValueNewValueChangedBits.go index 74080357197..0fe8a9f88a2 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfValueNewValueChangedBits.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfValueNewValueChangedBits.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNotificationParametersChangeOfValueNewValueChangedBits is the corresponding interface of BACnetNotificationParametersChangeOfValueNewValueChangedBits type BACnetNotificationParametersChangeOfValueNewValueChangedBits interface { @@ -46,9 +48,11 @@ type BACnetNotificationParametersChangeOfValueNewValueChangedBitsExactly interfa // _BACnetNotificationParametersChangeOfValueNewValueChangedBits is the data-structure of this message type _BACnetNotificationParametersChangeOfValueNewValueChangedBits struct { *_BACnetNotificationParametersChangeOfValueNewValue - ChangedBits BACnetContextTagBitString + ChangedBits BACnetContextTagBitString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,16 +63,14 @@ type _BACnetNotificationParametersChangeOfValueNewValueChangedBits struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetNotificationParametersChangeOfValueNewValueChangedBits) InitializeParent(parent BACnetNotificationParametersChangeOfValueNewValue, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetNotificationParametersChangeOfValueNewValueChangedBits) InitializeParent(parent BACnetNotificationParametersChangeOfValueNewValue , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetNotificationParametersChangeOfValueNewValueChangedBits) GetParent() BACnetNotificationParametersChangeOfValueNewValue { +func (m *_BACnetNotificationParametersChangeOfValueNewValueChangedBits) GetParent() BACnetNotificationParametersChangeOfValueNewValue { return m._BACnetNotificationParametersChangeOfValueNewValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetNotificationParametersChangeOfValueNewValueChangedBits) GetChang /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNotificationParametersChangeOfValueNewValueChangedBits factory function for _BACnetNotificationParametersChangeOfValueNewValueChangedBits -func NewBACnetNotificationParametersChangeOfValueNewValueChangedBits(changedBits BACnetContextTagBitString, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetNotificationParametersChangeOfValueNewValueChangedBits { +func NewBACnetNotificationParametersChangeOfValueNewValueChangedBits( changedBits BACnetContextTagBitString , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetNotificationParametersChangeOfValueNewValueChangedBits { _result := &_BACnetNotificationParametersChangeOfValueNewValueChangedBits{ ChangedBits: changedBits, - _BACnetNotificationParametersChangeOfValueNewValue: NewBACnetNotificationParametersChangeOfValueNewValue(openingTag, peekedTagHeader, closingTag, tagNumber), + _BACnetNotificationParametersChangeOfValueNewValue: NewBACnetNotificationParametersChangeOfValueNewValue(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetNotificationParametersChangeOfValueNewValue._BACnetNotificationParametersChangeOfValueNewValueChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetNotificationParametersChangeOfValueNewValueChangedBits(changedBits // Deprecated: use the interface for direct cast func CastBACnetNotificationParametersChangeOfValueNewValueChangedBits(structType interface{}) BACnetNotificationParametersChangeOfValueNewValueChangedBits { - if casted, ok := structType.(BACnetNotificationParametersChangeOfValueNewValueChangedBits); ok { + if casted, ok := structType.(BACnetNotificationParametersChangeOfValueNewValueChangedBits); ok { return casted } if casted, ok := structType.(*BACnetNotificationParametersChangeOfValueNewValueChangedBits); ok { @@ -117,6 +120,7 @@ func (m *_BACnetNotificationParametersChangeOfValueNewValueChangedBits) GetLengt return lengthInBits } + func (m *_BACnetNotificationParametersChangeOfValueNewValueChangedBits) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetNotificationParametersChangeOfValueNewValueChangedBitsParseWithBuffer if pullErr := readBuffer.PullContext("changedBits"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for changedBits") } - _changedBits, _changedBitsErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_BIT_STRING)) +_changedBits, _changedBitsErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_BIT_STRING ) ) if _changedBitsErr != nil { return nil, errors.Wrap(_changedBitsErr, "Error parsing 'changedBits' field of BACnetNotificationParametersChangeOfValueNewValueChangedBits") } @@ -178,17 +182,17 @@ func (m *_BACnetNotificationParametersChangeOfValueNewValueChangedBits) Serializ return errors.Wrap(pushErr, "Error pushing for BACnetNotificationParametersChangeOfValueNewValueChangedBits") } - // Simple Field (changedBits) - if pushErr := writeBuffer.PushContext("changedBits"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for changedBits") - } - _changedBitsErr := writeBuffer.WriteSerializable(ctx, m.GetChangedBits()) - if popErr := writeBuffer.PopContext("changedBits"); popErr != nil { - return errors.Wrap(popErr, "Error popping for changedBits") - } - if _changedBitsErr != nil { - return errors.Wrap(_changedBitsErr, "Error serializing 'changedBits' field") - } + // Simple Field (changedBits) + if pushErr := writeBuffer.PushContext("changedBits"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for changedBits") + } + _changedBitsErr := writeBuffer.WriteSerializable(ctx, m.GetChangedBits()) + if popErr := writeBuffer.PopContext("changedBits"); popErr != nil { + return errors.Wrap(popErr, "Error popping for changedBits") + } + if _changedBitsErr != nil { + return errors.Wrap(_changedBitsErr, "Error serializing 'changedBits' field") + } if popErr := writeBuffer.PopContext("BACnetNotificationParametersChangeOfValueNewValueChangedBits"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetNotificationParametersChangeOfValueNewValueChangedBits") @@ -198,6 +202,7 @@ func (m *_BACnetNotificationParametersChangeOfValueNewValueChangedBits) Serializ return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetNotificationParametersChangeOfValueNewValueChangedBits) isBACnetNotificationParametersChangeOfValueNewValueChangedBits() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetNotificationParametersChangeOfValueNewValueChangedBits) String() } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfValueNewValueChangedValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfValueNewValueChangedValue.go index 020085ed8c9..a5c42bb6d17 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfValueNewValueChangedValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfValueNewValueChangedValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNotificationParametersChangeOfValueNewValueChangedValue is the corresponding interface of BACnetNotificationParametersChangeOfValueNewValueChangedValue type BACnetNotificationParametersChangeOfValueNewValueChangedValue interface { @@ -46,9 +48,11 @@ type BACnetNotificationParametersChangeOfValueNewValueChangedValueExactly interf // _BACnetNotificationParametersChangeOfValueNewValueChangedValue is the data-structure of this message type _BACnetNotificationParametersChangeOfValueNewValueChangedValue struct { *_BACnetNotificationParametersChangeOfValueNewValue - ChangedValue BACnetContextTagReal + ChangedValue BACnetContextTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,16 +63,14 @@ type _BACnetNotificationParametersChangeOfValueNewValueChangedValue struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetNotificationParametersChangeOfValueNewValueChangedValue) InitializeParent(parent BACnetNotificationParametersChangeOfValueNewValue, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetNotificationParametersChangeOfValueNewValueChangedValue) InitializeParent(parent BACnetNotificationParametersChangeOfValueNewValue , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetNotificationParametersChangeOfValueNewValueChangedValue) GetParent() BACnetNotificationParametersChangeOfValueNewValue { +func (m *_BACnetNotificationParametersChangeOfValueNewValueChangedValue) GetParent() BACnetNotificationParametersChangeOfValueNewValue { return m._BACnetNotificationParametersChangeOfValueNewValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetNotificationParametersChangeOfValueNewValueChangedValue) GetChan /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNotificationParametersChangeOfValueNewValueChangedValue factory function for _BACnetNotificationParametersChangeOfValueNewValueChangedValue -func NewBACnetNotificationParametersChangeOfValueNewValueChangedValue(changedValue BACnetContextTagReal, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetNotificationParametersChangeOfValueNewValueChangedValue { +func NewBACnetNotificationParametersChangeOfValueNewValueChangedValue( changedValue BACnetContextTagReal , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetNotificationParametersChangeOfValueNewValueChangedValue { _result := &_BACnetNotificationParametersChangeOfValueNewValueChangedValue{ ChangedValue: changedValue, - _BACnetNotificationParametersChangeOfValueNewValue: NewBACnetNotificationParametersChangeOfValueNewValue(openingTag, peekedTagHeader, closingTag, tagNumber), + _BACnetNotificationParametersChangeOfValueNewValue: NewBACnetNotificationParametersChangeOfValueNewValue(openingTag, peekedTagHeader, closingTag, tagNumber), } _result._BACnetNotificationParametersChangeOfValueNewValue._BACnetNotificationParametersChangeOfValueNewValueChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetNotificationParametersChangeOfValueNewValueChangedValue(changedVal // Deprecated: use the interface for direct cast func CastBACnetNotificationParametersChangeOfValueNewValueChangedValue(structType interface{}) BACnetNotificationParametersChangeOfValueNewValueChangedValue { - if casted, ok := structType.(BACnetNotificationParametersChangeOfValueNewValueChangedValue); ok { + if casted, ok := structType.(BACnetNotificationParametersChangeOfValueNewValueChangedValue); ok { return casted } if casted, ok := structType.(*BACnetNotificationParametersChangeOfValueNewValueChangedValue); ok { @@ -117,6 +120,7 @@ func (m *_BACnetNotificationParametersChangeOfValueNewValueChangedValue) GetLeng return lengthInBits } + func (m *_BACnetNotificationParametersChangeOfValueNewValueChangedValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetNotificationParametersChangeOfValueNewValueChangedValueParseWithBuffe if pullErr := readBuffer.PullContext("changedValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for changedValue") } - _changedValue, _changedValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_REAL)) +_changedValue, _changedValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_REAL ) ) if _changedValueErr != nil { return nil, errors.Wrap(_changedValueErr, "Error parsing 'changedValue' field of BACnetNotificationParametersChangeOfValueNewValueChangedValue") } @@ -178,17 +182,17 @@ func (m *_BACnetNotificationParametersChangeOfValueNewValueChangedValue) Seriali return errors.Wrap(pushErr, "Error pushing for BACnetNotificationParametersChangeOfValueNewValueChangedValue") } - // Simple Field (changedValue) - if pushErr := writeBuffer.PushContext("changedValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for changedValue") - } - _changedValueErr := writeBuffer.WriteSerializable(ctx, m.GetChangedValue()) - if popErr := writeBuffer.PopContext("changedValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for changedValue") - } - if _changedValueErr != nil { - return errors.Wrap(_changedValueErr, "Error serializing 'changedValue' field") - } + // Simple Field (changedValue) + if pushErr := writeBuffer.PushContext("changedValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for changedValue") + } + _changedValueErr := writeBuffer.WriteSerializable(ctx, m.GetChangedValue()) + if popErr := writeBuffer.PopContext("changedValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for changedValue") + } + if _changedValueErr != nil { + return errors.Wrap(_changedValueErr, "Error serializing 'changedValue' field") + } if popErr := writeBuffer.PopContext("BACnetNotificationParametersChangeOfValueNewValueChangedValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetNotificationParametersChangeOfValueNewValueChangedValue") @@ -198,6 +202,7 @@ func (m *_BACnetNotificationParametersChangeOfValueNewValueChangedValue) Seriali return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetNotificationParametersChangeOfValueNewValueChangedValue) isBACnetNotificationParametersChangeOfValueNewValueChangedValue() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetNotificationParametersChangeOfValueNewValueChangedValue) String( } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersCommandFailure.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersCommandFailure.go index a3d02561fac..380c3a3973c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersCommandFailure.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersCommandFailure.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNotificationParametersCommandFailure is the corresponding interface of BACnetNotificationParametersCommandFailure type BACnetNotificationParametersCommandFailure interface { @@ -54,13 +56,15 @@ type BACnetNotificationParametersCommandFailureExactly interface { // _BACnetNotificationParametersCommandFailure is the data-structure of this message type _BACnetNotificationParametersCommandFailure struct { *_BACnetNotificationParameters - InnerOpeningTag BACnetOpeningTag - CommandValue BACnetConstructedData - StatusFlags BACnetStatusFlagsTagged - FeedbackValue BACnetConstructedData - InnerClosingTag BACnetClosingTag + InnerOpeningTag BACnetOpeningTag + CommandValue BACnetConstructedData + StatusFlags BACnetStatusFlagsTagged + FeedbackValue BACnetConstructedData + InnerClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -71,16 +75,14 @@ type _BACnetNotificationParametersCommandFailure struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetNotificationParametersCommandFailure) InitializeParent(parent BACnetNotificationParameters, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetNotificationParametersCommandFailure) InitializeParent(parent BACnetNotificationParameters , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetNotificationParametersCommandFailure) GetParent() BACnetNotificationParameters { +func (m *_BACnetNotificationParametersCommandFailure) GetParent() BACnetNotificationParameters { return m._BACnetNotificationParameters } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -111,15 +113,16 @@ func (m *_BACnetNotificationParametersCommandFailure) GetInnerClosingTag() BACne /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNotificationParametersCommandFailure factory function for _BACnetNotificationParametersCommandFailure -func NewBACnetNotificationParametersCommandFailure(innerOpeningTag BACnetOpeningTag, commandValue BACnetConstructedData, statusFlags BACnetStatusFlagsTagged, feedbackValue BACnetConstructedData, innerClosingTag BACnetClosingTag, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, objectTypeArgument BACnetObjectType) *_BACnetNotificationParametersCommandFailure { +func NewBACnetNotificationParametersCommandFailure( innerOpeningTag BACnetOpeningTag , commandValue BACnetConstructedData , statusFlags BACnetStatusFlagsTagged , feedbackValue BACnetConstructedData , innerClosingTag BACnetClosingTag , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , objectTypeArgument BACnetObjectType ) *_BACnetNotificationParametersCommandFailure { _result := &_BACnetNotificationParametersCommandFailure{ - InnerOpeningTag: innerOpeningTag, - CommandValue: commandValue, - StatusFlags: statusFlags, - FeedbackValue: feedbackValue, - InnerClosingTag: innerClosingTag, - _BACnetNotificationParameters: NewBACnetNotificationParameters(openingTag, peekedTagHeader, closingTag, tagNumber, objectTypeArgument), + InnerOpeningTag: innerOpeningTag, + CommandValue: commandValue, + StatusFlags: statusFlags, + FeedbackValue: feedbackValue, + InnerClosingTag: innerClosingTag, + _BACnetNotificationParameters: NewBACnetNotificationParameters(openingTag, peekedTagHeader, closingTag, tagNumber, objectTypeArgument), } _result._BACnetNotificationParameters._BACnetNotificationParametersChildRequirements = _result return _result @@ -127,7 +130,7 @@ func NewBACnetNotificationParametersCommandFailure(innerOpeningTag BACnetOpening // Deprecated: use the interface for direct cast func CastBACnetNotificationParametersCommandFailure(structType interface{}) BACnetNotificationParametersCommandFailure { - if casted, ok := structType.(BACnetNotificationParametersCommandFailure); ok { + if casted, ok := structType.(BACnetNotificationParametersCommandFailure); ok { return casted } if casted, ok := structType.(*BACnetNotificationParametersCommandFailure); ok { @@ -161,6 +164,7 @@ func (m *_BACnetNotificationParametersCommandFailure) GetLengthInBits(ctx contex return lengthInBits } + func (m *_BACnetNotificationParametersCommandFailure) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -182,7 +186,7 @@ func BACnetNotificationParametersCommandFailureParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("innerOpeningTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerOpeningTag") } - _innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber)) +_innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) ) if _innerOpeningTagErr != nil { return nil, errors.Wrap(_innerOpeningTagErr, "Error parsing 'innerOpeningTag' field of BACnetNotificationParametersCommandFailure") } @@ -195,7 +199,7 @@ func BACnetNotificationParametersCommandFailureParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("commandValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for commandValue") } - _commandValue, _commandValueErr := BACnetConstructedDataParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetObjectType(objectTypeArgument), BACnetPropertyIdentifier(BACnetPropertyIdentifier_VENDOR_PROPRIETARY_VALUE), nil) +_commandValue, _commandValueErr := BACnetConstructedDataParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetObjectType( objectTypeArgument ) , BACnetPropertyIdentifier( BACnetPropertyIdentifier_VENDOR_PROPRIETARY_VALUE ) , nil ) if _commandValueErr != nil { return nil, errors.Wrap(_commandValueErr, "Error parsing 'commandValue' field of BACnetNotificationParametersCommandFailure") } @@ -208,7 +212,7 @@ func BACnetNotificationParametersCommandFailureParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("statusFlags"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for statusFlags") } - _statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _statusFlagsErr != nil { return nil, errors.Wrap(_statusFlagsErr, "Error parsing 'statusFlags' field of BACnetNotificationParametersCommandFailure") } @@ -221,7 +225,7 @@ func BACnetNotificationParametersCommandFailureParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("feedbackValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for feedbackValue") } - _feedbackValue, _feedbackValueErr := BACnetConstructedDataParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), BACnetObjectType(objectTypeArgument), BACnetPropertyIdentifier(BACnetPropertyIdentifier_VENDOR_PROPRIETARY_VALUE), nil) +_feedbackValue, _feedbackValueErr := BACnetConstructedDataParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , BACnetObjectType( objectTypeArgument ) , BACnetPropertyIdentifier( BACnetPropertyIdentifier_VENDOR_PROPRIETARY_VALUE ) , nil ) if _feedbackValueErr != nil { return nil, errors.Wrap(_feedbackValueErr, "Error parsing 'feedbackValue' field of BACnetNotificationParametersCommandFailure") } @@ -234,7 +238,7 @@ func BACnetNotificationParametersCommandFailureParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("innerClosingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerClosingTag") } - _innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber)) +_innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) ) if _innerClosingTagErr != nil { return nil, errors.Wrap(_innerClosingTagErr, "Error parsing 'innerClosingTag' field of BACnetNotificationParametersCommandFailure") } @@ -250,13 +254,13 @@ func BACnetNotificationParametersCommandFailureParseWithBuffer(ctx context.Conte // Create a partially initialized instance _child := &_BACnetNotificationParametersCommandFailure{ _BACnetNotificationParameters: &_BACnetNotificationParameters{ - TagNumber: tagNumber, + TagNumber: tagNumber, ObjectTypeArgument: objectTypeArgument, }, InnerOpeningTag: innerOpeningTag, - CommandValue: commandValue, - StatusFlags: statusFlags, - FeedbackValue: feedbackValue, + CommandValue: commandValue, + StatusFlags: statusFlags, + FeedbackValue: feedbackValue, InnerClosingTag: innerClosingTag, } _child._BACnetNotificationParameters._BACnetNotificationParametersChildRequirements = _child @@ -279,65 +283,65 @@ func (m *_BACnetNotificationParametersCommandFailure) SerializeWithWriteBuffer(c return errors.Wrap(pushErr, "Error pushing for BACnetNotificationParametersCommandFailure") } - // Simple Field (innerOpeningTag) - if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") - } - _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) - if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerOpeningTag") - } - if _innerOpeningTagErr != nil { - return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") - } + // Simple Field (innerOpeningTag) + if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") + } + _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) + if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerOpeningTag") + } + if _innerOpeningTagErr != nil { + return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") + } - // Simple Field (commandValue) - if pushErr := writeBuffer.PushContext("commandValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for commandValue") - } - _commandValueErr := writeBuffer.WriteSerializable(ctx, m.GetCommandValue()) - if popErr := writeBuffer.PopContext("commandValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for commandValue") - } - if _commandValueErr != nil { - return errors.Wrap(_commandValueErr, "Error serializing 'commandValue' field") - } + // Simple Field (commandValue) + if pushErr := writeBuffer.PushContext("commandValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for commandValue") + } + _commandValueErr := writeBuffer.WriteSerializable(ctx, m.GetCommandValue()) + if popErr := writeBuffer.PopContext("commandValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for commandValue") + } + if _commandValueErr != nil { + return errors.Wrap(_commandValueErr, "Error serializing 'commandValue' field") + } - // Simple Field (statusFlags) - if pushErr := writeBuffer.PushContext("statusFlags"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for statusFlags") - } - _statusFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetStatusFlags()) - if popErr := writeBuffer.PopContext("statusFlags"); popErr != nil { - return errors.Wrap(popErr, "Error popping for statusFlags") - } - if _statusFlagsErr != nil { - return errors.Wrap(_statusFlagsErr, "Error serializing 'statusFlags' field") - } + // Simple Field (statusFlags) + if pushErr := writeBuffer.PushContext("statusFlags"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for statusFlags") + } + _statusFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetStatusFlags()) + if popErr := writeBuffer.PopContext("statusFlags"); popErr != nil { + return errors.Wrap(popErr, "Error popping for statusFlags") + } + if _statusFlagsErr != nil { + return errors.Wrap(_statusFlagsErr, "Error serializing 'statusFlags' field") + } - // Simple Field (feedbackValue) - if pushErr := writeBuffer.PushContext("feedbackValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for feedbackValue") - } - _feedbackValueErr := writeBuffer.WriteSerializable(ctx, m.GetFeedbackValue()) - if popErr := writeBuffer.PopContext("feedbackValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for feedbackValue") - } - if _feedbackValueErr != nil { - return errors.Wrap(_feedbackValueErr, "Error serializing 'feedbackValue' field") - } + // Simple Field (feedbackValue) + if pushErr := writeBuffer.PushContext("feedbackValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for feedbackValue") + } + _feedbackValueErr := writeBuffer.WriteSerializable(ctx, m.GetFeedbackValue()) + if popErr := writeBuffer.PopContext("feedbackValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for feedbackValue") + } + if _feedbackValueErr != nil { + return errors.Wrap(_feedbackValueErr, "Error serializing 'feedbackValue' field") + } - // Simple Field (innerClosingTag) - if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerClosingTag") - } - _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) - if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerClosingTag") - } - if _innerClosingTagErr != nil { - return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") - } + // Simple Field (innerClosingTag) + if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerClosingTag") + } + _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) + if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerClosingTag") + } + if _innerClosingTagErr != nil { + return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") + } if popErr := writeBuffer.PopContext("BACnetNotificationParametersCommandFailure"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetNotificationParametersCommandFailure") @@ -347,6 +351,7 @@ func (m *_BACnetNotificationParametersCommandFailure) SerializeWithWriteBuffer(c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetNotificationParametersCommandFailure) isBACnetNotificationParametersCommandFailure() bool { return true } @@ -361,3 +366,6 @@ func (m *_BACnetNotificationParametersCommandFailure) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersComplexEventType.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersComplexEventType.go index 137e568fb4e..6e93fa0a056 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersComplexEventType.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersComplexEventType.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNotificationParametersComplexEventType is the corresponding interface of BACnetNotificationParametersComplexEventType type BACnetNotificationParametersComplexEventType interface { @@ -46,9 +48,11 @@ type BACnetNotificationParametersComplexEventTypeExactly interface { // _BACnetNotificationParametersComplexEventType is the data-structure of this message type _BACnetNotificationParametersComplexEventType struct { *_BACnetNotificationParameters - ListOfValues BACnetPropertyValues + ListOfValues BACnetPropertyValues } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,16 +63,14 @@ type _BACnetNotificationParametersComplexEventType struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetNotificationParametersComplexEventType) InitializeParent(parent BACnetNotificationParameters, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetNotificationParametersComplexEventType) InitializeParent(parent BACnetNotificationParameters , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetNotificationParametersComplexEventType) GetParent() BACnetNotificationParameters { +func (m *_BACnetNotificationParametersComplexEventType) GetParent() BACnetNotificationParameters { return m._BACnetNotificationParameters } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetNotificationParametersComplexEventType) GetListOfValues() BACnet /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNotificationParametersComplexEventType factory function for _BACnetNotificationParametersComplexEventType -func NewBACnetNotificationParametersComplexEventType(listOfValues BACnetPropertyValues, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, objectTypeArgument BACnetObjectType) *_BACnetNotificationParametersComplexEventType { +func NewBACnetNotificationParametersComplexEventType( listOfValues BACnetPropertyValues , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , objectTypeArgument BACnetObjectType ) *_BACnetNotificationParametersComplexEventType { _result := &_BACnetNotificationParametersComplexEventType{ - ListOfValues: listOfValues, - _BACnetNotificationParameters: NewBACnetNotificationParameters(openingTag, peekedTagHeader, closingTag, tagNumber, objectTypeArgument), + ListOfValues: listOfValues, + _BACnetNotificationParameters: NewBACnetNotificationParameters(openingTag, peekedTagHeader, closingTag, tagNumber, objectTypeArgument), } _result._BACnetNotificationParameters._BACnetNotificationParametersChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetNotificationParametersComplexEventType(listOfValues BACnetProperty // Deprecated: use the interface for direct cast func CastBACnetNotificationParametersComplexEventType(structType interface{}) BACnetNotificationParametersComplexEventType { - if casted, ok := structType.(BACnetNotificationParametersComplexEventType); ok { + if casted, ok := structType.(BACnetNotificationParametersComplexEventType); ok { return casted } if casted, ok := structType.(*BACnetNotificationParametersComplexEventType); ok { @@ -117,6 +120,7 @@ func (m *_BACnetNotificationParametersComplexEventType) GetLengthInBits(ctx cont return lengthInBits } + func (m *_BACnetNotificationParametersComplexEventType) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetNotificationParametersComplexEventTypeParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("listOfValues"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for listOfValues") } - _listOfValues, _listOfValuesErr := BACnetPropertyValuesParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), BACnetObjectType(objectTypeArgument)) +_listOfValues, _listOfValuesErr := BACnetPropertyValuesParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , BACnetObjectType( objectTypeArgument ) ) if _listOfValuesErr != nil { return nil, errors.Wrap(_listOfValuesErr, "Error parsing 'listOfValues' field of BACnetNotificationParametersComplexEventType") } @@ -154,7 +158,7 @@ func BACnetNotificationParametersComplexEventTypeParseWithBuffer(ctx context.Con // Create a partially initialized instance _child := &_BACnetNotificationParametersComplexEventType{ _BACnetNotificationParameters: &_BACnetNotificationParameters{ - TagNumber: tagNumber, + TagNumber: tagNumber, ObjectTypeArgument: objectTypeArgument, }, ListOfValues: listOfValues, @@ -179,17 +183,17 @@ func (m *_BACnetNotificationParametersComplexEventType) SerializeWithWriteBuffer return errors.Wrap(pushErr, "Error pushing for BACnetNotificationParametersComplexEventType") } - // Simple Field (listOfValues) - if pushErr := writeBuffer.PushContext("listOfValues"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for listOfValues") - } - _listOfValuesErr := writeBuffer.WriteSerializable(ctx, m.GetListOfValues()) - if popErr := writeBuffer.PopContext("listOfValues"); popErr != nil { - return errors.Wrap(popErr, "Error popping for listOfValues") - } - if _listOfValuesErr != nil { - return errors.Wrap(_listOfValuesErr, "Error serializing 'listOfValues' field") - } + // Simple Field (listOfValues) + if pushErr := writeBuffer.PushContext("listOfValues"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for listOfValues") + } + _listOfValuesErr := writeBuffer.WriteSerializable(ctx, m.GetListOfValues()) + if popErr := writeBuffer.PopContext("listOfValues"); popErr != nil { + return errors.Wrap(popErr, "Error popping for listOfValues") + } + if _listOfValuesErr != nil { + return errors.Wrap(_listOfValuesErr, "Error serializing 'listOfValues' field") + } if popErr := writeBuffer.PopContext("BACnetNotificationParametersComplexEventType"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetNotificationParametersComplexEventType") @@ -199,6 +203,7 @@ func (m *_BACnetNotificationParametersComplexEventType) SerializeWithWriteBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetNotificationParametersComplexEventType) isBACnetNotificationParametersComplexEventType() bool { return true } @@ -213,3 +218,6 @@ func (m *_BACnetNotificationParametersComplexEventType) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersDoubleOutOfRange.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersDoubleOutOfRange.go index a59c2ea995f..fe77305ad4d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersDoubleOutOfRange.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersDoubleOutOfRange.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNotificationParametersDoubleOutOfRange is the corresponding interface of BACnetNotificationParametersDoubleOutOfRange type BACnetNotificationParametersDoubleOutOfRange interface { @@ -56,14 +58,16 @@ type BACnetNotificationParametersDoubleOutOfRangeExactly interface { // _BACnetNotificationParametersDoubleOutOfRange is the data-structure of this message type _BACnetNotificationParametersDoubleOutOfRange struct { *_BACnetNotificationParameters - InnerOpeningTag BACnetOpeningTag - ExceedingValue BACnetContextTagDouble - StatusFlags BACnetStatusFlagsTagged - Deadband BACnetContextTagDouble - ExceededLimit BACnetContextTagDouble - InnerClosingTag BACnetClosingTag + InnerOpeningTag BACnetOpeningTag + ExceedingValue BACnetContextTagDouble + StatusFlags BACnetStatusFlagsTagged + Deadband BACnetContextTagDouble + ExceededLimit BACnetContextTagDouble + InnerClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -74,16 +78,14 @@ type _BACnetNotificationParametersDoubleOutOfRange struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetNotificationParametersDoubleOutOfRange) InitializeParent(parent BACnetNotificationParameters, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetNotificationParametersDoubleOutOfRange) InitializeParent(parent BACnetNotificationParameters , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetNotificationParametersDoubleOutOfRange) GetParent() BACnetNotificationParameters { +func (m *_BACnetNotificationParametersDoubleOutOfRange) GetParent() BACnetNotificationParameters { return m._BACnetNotificationParameters } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -118,16 +120,17 @@ func (m *_BACnetNotificationParametersDoubleOutOfRange) GetInnerClosingTag() BAC /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNotificationParametersDoubleOutOfRange factory function for _BACnetNotificationParametersDoubleOutOfRange -func NewBACnetNotificationParametersDoubleOutOfRange(innerOpeningTag BACnetOpeningTag, exceedingValue BACnetContextTagDouble, statusFlags BACnetStatusFlagsTagged, deadband BACnetContextTagDouble, exceededLimit BACnetContextTagDouble, innerClosingTag BACnetClosingTag, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, objectTypeArgument BACnetObjectType) *_BACnetNotificationParametersDoubleOutOfRange { +func NewBACnetNotificationParametersDoubleOutOfRange( innerOpeningTag BACnetOpeningTag , exceedingValue BACnetContextTagDouble , statusFlags BACnetStatusFlagsTagged , deadband BACnetContextTagDouble , exceededLimit BACnetContextTagDouble , innerClosingTag BACnetClosingTag , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , objectTypeArgument BACnetObjectType ) *_BACnetNotificationParametersDoubleOutOfRange { _result := &_BACnetNotificationParametersDoubleOutOfRange{ - InnerOpeningTag: innerOpeningTag, - ExceedingValue: exceedingValue, - StatusFlags: statusFlags, - Deadband: deadband, - ExceededLimit: exceededLimit, - InnerClosingTag: innerClosingTag, - _BACnetNotificationParameters: NewBACnetNotificationParameters(openingTag, peekedTagHeader, closingTag, tagNumber, objectTypeArgument), + InnerOpeningTag: innerOpeningTag, + ExceedingValue: exceedingValue, + StatusFlags: statusFlags, + Deadband: deadband, + ExceededLimit: exceededLimit, + InnerClosingTag: innerClosingTag, + _BACnetNotificationParameters: NewBACnetNotificationParameters(openingTag, peekedTagHeader, closingTag, tagNumber, objectTypeArgument), } _result._BACnetNotificationParameters._BACnetNotificationParametersChildRequirements = _result return _result @@ -135,7 +138,7 @@ func NewBACnetNotificationParametersDoubleOutOfRange(innerOpeningTag BACnetOpeni // Deprecated: use the interface for direct cast func CastBACnetNotificationParametersDoubleOutOfRange(structType interface{}) BACnetNotificationParametersDoubleOutOfRange { - if casted, ok := structType.(BACnetNotificationParametersDoubleOutOfRange); ok { + if casted, ok := structType.(BACnetNotificationParametersDoubleOutOfRange); ok { return casted } if casted, ok := structType.(*BACnetNotificationParametersDoubleOutOfRange); ok { @@ -172,6 +175,7 @@ func (m *_BACnetNotificationParametersDoubleOutOfRange) GetLengthInBits(ctx cont return lengthInBits } + func (m *_BACnetNotificationParametersDoubleOutOfRange) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -193,7 +197,7 @@ func BACnetNotificationParametersDoubleOutOfRangeParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("innerOpeningTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerOpeningTag") } - _innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber)) +_innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) ) if _innerOpeningTagErr != nil { return nil, errors.Wrap(_innerOpeningTagErr, "Error parsing 'innerOpeningTag' field of BACnetNotificationParametersDoubleOutOfRange") } @@ -206,7 +210,7 @@ func BACnetNotificationParametersDoubleOutOfRangeParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("exceedingValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for exceedingValue") } - _exceedingValue, _exceedingValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_DOUBLE)) +_exceedingValue, _exceedingValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_DOUBLE ) ) if _exceedingValueErr != nil { return nil, errors.Wrap(_exceedingValueErr, "Error parsing 'exceedingValue' field of BACnetNotificationParametersDoubleOutOfRange") } @@ -219,7 +223,7 @@ func BACnetNotificationParametersDoubleOutOfRangeParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("statusFlags"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for statusFlags") } - _statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _statusFlagsErr != nil { return nil, errors.Wrap(_statusFlagsErr, "Error parsing 'statusFlags' field of BACnetNotificationParametersDoubleOutOfRange") } @@ -232,7 +236,7 @@ func BACnetNotificationParametersDoubleOutOfRangeParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("deadband"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for deadband") } - _deadband, _deadbandErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), BACnetDataType(BACnetDataType_DOUBLE)) +_deadband, _deadbandErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , BACnetDataType( BACnetDataType_DOUBLE ) ) if _deadbandErr != nil { return nil, errors.Wrap(_deadbandErr, "Error parsing 'deadband' field of BACnetNotificationParametersDoubleOutOfRange") } @@ -245,7 +249,7 @@ func BACnetNotificationParametersDoubleOutOfRangeParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("exceededLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for exceededLimit") } - _exceededLimit, _exceededLimitErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(3)), BACnetDataType(BACnetDataType_DOUBLE)) +_exceededLimit, _exceededLimitErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(3) ) , BACnetDataType( BACnetDataType_DOUBLE ) ) if _exceededLimitErr != nil { return nil, errors.Wrap(_exceededLimitErr, "Error parsing 'exceededLimit' field of BACnetNotificationParametersDoubleOutOfRange") } @@ -258,7 +262,7 @@ func BACnetNotificationParametersDoubleOutOfRangeParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("innerClosingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerClosingTag") } - _innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber)) +_innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) ) if _innerClosingTagErr != nil { return nil, errors.Wrap(_innerClosingTagErr, "Error parsing 'innerClosingTag' field of BACnetNotificationParametersDoubleOutOfRange") } @@ -274,14 +278,14 @@ func BACnetNotificationParametersDoubleOutOfRangeParseWithBuffer(ctx context.Con // Create a partially initialized instance _child := &_BACnetNotificationParametersDoubleOutOfRange{ _BACnetNotificationParameters: &_BACnetNotificationParameters{ - TagNumber: tagNumber, + TagNumber: tagNumber, ObjectTypeArgument: objectTypeArgument, }, InnerOpeningTag: innerOpeningTag, - ExceedingValue: exceedingValue, - StatusFlags: statusFlags, - Deadband: deadband, - ExceededLimit: exceededLimit, + ExceedingValue: exceedingValue, + StatusFlags: statusFlags, + Deadband: deadband, + ExceededLimit: exceededLimit, InnerClosingTag: innerClosingTag, } _child._BACnetNotificationParameters._BACnetNotificationParametersChildRequirements = _child @@ -304,77 +308,77 @@ func (m *_BACnetNotificationParametersDoubleOutOfRange) SerializeWithWriteBuffer return errors.Wrap(pushErr, "Error pushing for BACnetNotificationParametersDoubleOutOfRange") } - // Simple Field (innerOpeningTag) - if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") - } - _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) - if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerOpeningTag") - } - if _innerOpeningTagErr != nil { - return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") - } + // Simple Field (innerOpeningTag) + if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") + } + _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) + if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerOpeningTag") + } + if _innerOpeningTagErr != nil { + return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") + } - // Simple Field (exceedingValue) - if pushErr := writeBuffer.PushContext("exceedingValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for exceedingValue") - } - _exceedingValueErr := writeBuffer.WriteSerializable(ctx, m.GetExceedingValue()) - if popErr := writeBuffer.PopContext("exceedingValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for exceedingValue") - } - if _exceedingValueErr != nil { - return errors.Wrap(_exceedingValueErr, "Error serializing 'exceedingValue' field") - } + // Simple Field (exceedingValue) + if pushErr := writeBuffer.PushContext("exceedingValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for exceedingValue") + } + _exceedingValueErr := writeBuffer.WriteSerializable(ctx, m.GetExceedingValue()) + if popErr := writeBuffer.PopContext("exceedingValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for exceedingValue") + } + if _exceedingValueErr != nil { + return errors.Wrap(_exceedingValueErr, "Error serializing 'exceedingValue' field") + } - // Simple Field (statusFlags) - if pushErr := writeBuffer.PushContext("statusFlags"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for statusFlags") - } - _statusFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetStatusFlags()) - if popErr := writeBuffer.PopContext("statusFlags"); popErr != nil { - return errors.Wrap(popErr, "Error popping for statusFlags") - } - if _statusFlagsErr != nil { - return errors.Wrap(_statusFlagsErr, "Error serializing 'statusFlags' field") - } + // Simple Field (statusFlags) + if pushErr := writeBuffer.PushContext("statusFlags"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for statusFlags") + } + _statusFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetStatusFlags()) + if popErr := writeBuffer.PopContext("statusFlags"); popErr != nil { + return errors.Wrap(popErr, "Error popping for statusFlags") + } + if _statusFlagsErr != nil { + return errors.Wrap(_statusFlagsErr, "Error serializing 'statusFlags' field") + } - // Simple Field (deadband) - if pushErr := writeBuffer.PushContext("deadband"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for deadband") - } - _deadbandErr := writeBuffer.WriteSerializable(ctx, m.GetDeadband()) - if popErr := writeBuffer.PopContext("deadband"); popErr != nil { - return errors.Wrap(popErr, "Error popping for deadband") - } - if _deadbandErr != nil { - return errors.Wrap(_deadbandErr, "Error serializing 'deadband' field") - } + // Simple Field (deadband) + if pushErr := writeBuffer.PushContext("deadband"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for deadband") + } + _deadbandErr := writeBuffer.WriteSerializable(ctx, m.GetDeadband()) + if popErr := writeBuffer.PopContext("deadband"); popErr != nil { + return errors.Wrap(popErr, "Error popping for deadband") + } + if _deadbandErr != nil { + return errors.Wrap(_deadbandErr, "Error serializing 'deadband' field") + } - // Simple Field (exceededLimit) - if pushErr := writeBuffer.PushContext("exceededLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for exceededLimit") - } - _exceededLimitErr := writeBuffer.WriteSerializable(ctx, m.GetExceededLimit()) - if popErr := writeBuffer.PopContext("exceededLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for exceededLimit") - } - if _exceededLimitErr != nil { - return errors.Wrap(_exceededLimitErr, "Error serializing 'exceededLimit' field") - } + // Simple Field (exceededLimit) + if pushErr := writeBuffer.PushContext("exceededLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for exceededLimit") + } + _exceededLimitErr := writeBuffer.WriteSerializable(ctx, m.GetExceededLimit()) + if popErr := writeBuffer.PopContext("exceededLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for exceededLimit") + } + if _exceededLimitErr != nil { + return errors.Wrap(_exceededLimitErr, "Error serializing 'exceededLimit' field") + } - // Simple Field (innerClosingTag) - if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerClosingTag") - } - _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) - if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerClosingTag") - } - if _innerClosingTagErr != nil { - return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") - } + // Simple Field (innerClosingTag) + if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerClosingTag") + } + _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) + if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerClosingTag") + } + if _innerClosingTagErr != nil { + return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") + } if popErr := writeBuffer.PopContext("BACnetNotificationParametersDoubleOutOfRange"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetNotificationParametersDoubleOutOfRange") @@ -384,6 +388,7 @@ func (m *_BACnetNotificationParametersDoubleOutOfRange) SerializeWithWriteBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetNotificationParametersDoubleOutOfRange) isBACnetNotificationParametersDoubleOutOfRange() bool { return true } @@ -398,3 +403,6 @@ func (m *_BACnetNotificationParametersDoubleOutOfRange) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersExtended.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersExtended.go index 04eec3626b9..fc620d494de 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersExtended.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersExtended.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNotificationParametersExtended is the corresponding interface of BACnetNotificationParametersExtended type BACnetNotificationParametersExtended interface { @@ -54,13 +56,15 @@ type BACnetNotificationParametersExtendedExactly interface { // _BACnetNotificationParametersExtended is the data-structure of this message type _BACnetNotificationParametersExtended struct { *_BACnetNotificationParameters - InnerOpeningTag BACnetOpeningTag - VendorId BACnetVendorIdTagged - ExtendedEventType BACnetContextTagUnsignedInteger - Parameters BACnetNotificationParametersExtendedParameters - InnerClosingTag BACnetClosingTag + InnerOpeningTag BACnetOpeningTag + VendorId BACnetVendorIdTagged + ExtendedEventType BACnetContextTagUnsignedInteger + Parameters BACnetNotificationParametersExtendedParameters + InnerClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -71,16 +75,14 @@ type _BACnetNotificationParametersExtended struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetNotificationParametersExtended) InitializeParent(parent BACnetNotificationParameters, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetNotificationParametersExtended) InitializeParent(parent BACnetNotificationParameters , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetNotificationParametersExtended) GetParent() BACnetNotificationParameters { +func (m *_BACnetNotificationParametersExtended) GetParent() BACnetNotificationParameters { return m._BACnetNotificationParameters } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -111,15 +113,16 @@ func (m *_BACnetNotificationParametersExtended) GetInnerClosingTag() BACnetClosi /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNotificationParametersExtended factory function for _BACnetNotificationParametersExtended -func NewBACnetNotificationParametersExtended(innerOpeningTag BACnetOpeningTag, vendorId BACnetVendorIdTagged, extendedEventType BACnetContextTagUnsignedInteger, parameters BACnetNotificationParametersExtendedParameters, innerClosingTag BACnetClosingTag, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, objectTypeArgument BACnetObjectType) *_BACnetNotificationParametersExtended { +func NewBACnetNotificationParametersExtended( innerOpeningTag BACnetOpeningTag , vendorId BACnetVendorIdTagged , extendedEventType BACnetContextTagUnsignedInteger , parameters BACnetNotificationParametersExtendedParameters , innerClosingTag BACnetClosingTag , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , objectTypeArgument BACnetObjectType ) *_BACnetNotificationParametersExtended { _result := &_BACnetNotificationParametersExtended{ - InnerOpeningTag: innerOpeningTag, - VendorId: vendorId, - ExtendedEventType: extendedEventType, - Parameters: parameters, - InnerClosingTag: innerClosingTag, - _BACnetNotificationParameters: NewBACnetNotificationParameters(openingTag, peekedTagHeader, closingTag, tagNumber, objectTypeArgument), + InnerOpeningTag: innerOpeningTag, + VendorId: vendorId, + ExtendedEventType: extendedEventType, + Parameters: parameters, + InnerClosingTag: innerClosingTag, + _BACnetNotificationParameters: NewBACnetNotificationParameters(openingTag, peekedTagHeader, closingTag, tagNumber, objectTypeArgument), } _result._BACnetNotificationParameters._BACnetNotificationParametersChildRequirements = _result return _result @@ -127,7 +130,7 @@ func NewBACnetNotificationParametersExtended(innerOpeningTag BACnetOpeningTag, v // Deprecated: use the interface for direct cast func CastBACnetNotificationParametersExtended(structType interface{}) BACnetNotificationParametersExtended { - if casted, ok := structType.(BACnetNotificationParametersExtended); ok { + if casted, ok := structType.(BACnetNotificationParametersExtended); ok { return casted } if casted, ok := structType.(*BACnetNotificationParametersExtended); ok { @@ -161,6 +164,7 @@ func (m *_BACnetNotificationParametersExtended) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetNotificationParametersExtended) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -182,7 +186,7 @@ func BACnetNotificationParametersExtendedParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("innerOpeningTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerOpeningTag") } - _innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber)) +_innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) ) if _innerOpeningTagErr != nil { return nil, errors.Wrap(_innerOpeningTagErr, "Error parsing 'innerOpeningTag' field of BACnetNotificationParametersExtended") } @@ -195,7 +199,7 @@ func BACnetNotificationParametersExtendedParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("vendorId"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for vendorId") } - _vendorId, _vendorIdErr := BACnetVendorIdTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_vendorId, _vendorIdErr := BACnetVendorIdTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _vendorIdErr != nil { return nil, errors.Wrap(_vendorIdErr, "Error parsing 'vendorId' field of BACnetNotificationParametersExtended") } @@ -208,7 +212,7 @@ func BACnetNotificationParametersExtendedParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("extendedEventType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for extendedEventType") } - _extendedEventType, _extendedEventTypeErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_extendedEventType, _extendedEventTypeErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _extendedEventTypeErr != nil { return nil, errors.Wrap(_extendedEventTypeErr, "Error parsing 'extendedEventType' field of BACnetNotificationParametersExtended") } @@ -221,7 +225,7 @@ func BACnetNotificationParametersExtendedParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("parameters"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for parameters") } - _parameters, _parametersErr := BACnetNotificationParametersExtendedParametersParseWithBuffer(ctx, readBuffer, uint8(uint8(2))) +_parameters, _parametersErr := BACnetNotificationParametersExtendedParametersParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) ) if _parametersErr != nil { return nil, errors.Wrap(_parametersErr, "Error parsing 'parameters' field of BACnetNotificationParametersExtended") } @@ -234,7 +238,7 @@ func BACnetNotificationParametersExtendedParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("innerClosingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerClosingTag") } - _innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber)) +_innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) ) if _innerClosingTagErr != nil { return nil, errors.Wrap(_innerClosingTagErr, "Error parsing 'innerClosingTag' field of BACnetNotificationParametersExtended") } @@ -250,14 +254,14 @@ func BACnetNotificationParametersExtendedParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetNotificationParametersExtended{ _BACnetNotificationParameters: &_BACnetNotificationParameters{ - TagNumber: tagNumber, + TagNumber: tagNumber, ObjectTypeArgument: objectTypeArgument, }, - InnerOpeningTag: innerOpeningTag, - VendorId: vendorId, + InnerOpeningTag: innerOpeningTag, + VendorId: vendorId, ExtendedEventType: extendedEventType, - Parameters: parameters, - InnerClosingTag: innerClosingTag, + Parameters: parameters, + InnerClosingTag: innerClosingTag, } _child._BACnetNotificationParameters._BACnetNotificationParametersChildRequirements = _child return _child, nil @@ -279,65 +283,65 @@ func (m *_BACnetNotificationParametersExtended) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetNotificationParametersExtended") } - // Simple Field (innerOpeningTag) - if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") - } - _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) - if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerOpeningTag") - } - if _innerOpeningTagErr != nil { - return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") - } + // Simple Field (innerOpeningTag) + if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") + } + _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) + if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerOpeningTag") + } + if _innerOpeningTagErr != nil { + return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") + } - // Simple Field (vendorId) - if pushErr := writeBuffer.PushContext("vendorId"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for vendorId") - } - _vendorIdErr := writeBuffer.WriteSerializable(ctx, m.GetVendorId()) - if popErr := writeBuffer.PopContext("vendorId"); popErr != nil { - return errors.Wrap(popErr, "Error popping for vendorId") - } - if _vendorIdErr != nil { - return errors.Wrap(_vendorIdErr, "Error serializing 'vendorId' field") - } + // Simple Field (vendorId) + if pushErr := writeBuffer.PushContext("vendorId"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for vendorId") + } + _vendorIdErr := writeBuffer.WriteSerializable(ctx, m.GetVendorId()) + if popErr := writeBuffer.PopContext("vendorId"); popErr != nil { + return errors.Wrap(popErr, "Error popping for vendorId") + } + if _vendorIdErr != nil { + return errors.Wrap(_vendorIdErr, "Error serializing 'vendorId' field") + } - // Simple Field (extendedEventType) - if pushErr := writeBuffer.PushContext("extendedEventType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for extendedEventType") - } - _extendedEventTypeErr := writeBuffer.WriteSerializable(ctx, m.GetExtendedEventType()) - if popErr := writeBuffer.PopContext("extendedEventType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for extendedEventType") - } - if _extendedEventTypeErr != nil { - return errors.Wrap(_extendedEventTypeErr, "Error serializing 'extendedEventType' field") - } + // Simple Field (extendedEventType) + if pushErr := writeBuffer.PushContext("extendedEventType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for extendedEventType") + } + _extendedEventTypeErr := writeBuffer.WriteSerializable(ctx, m.GetExtendedEventType()) + if popErr := writeBuffer.PopContext("extendedEventType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for extendedEventType") + } + if _extendedEventTypeErr != nil { + return errors.Wrap(_extendedEventTypeErr, "Error serializing 'extendedEventType' field") + } - // Simple Field (parameters) - if pushErr := writeBuffer.PushContext("parameters"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for parameters") - } - _parametersErr := writeBuffer.WriteSerializable(ctx, m.GetParameters()) - if popErr := writeBuffer.PopContext("parameters"); popErr != nil { - return errors.Wrap(popErr, "Error popping for parameters") - } - if _parametersErr != nil { - return errors.Wrap(_parametersErr, "Error serializing 'parameters' field") - } + // Simple Field (parameters) + if pushErr := writeBuffer.PushContext("parameters"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for parameters") + } + _parametersErr := writeBuffer.WriteSerializable(ctx, m.GetParameters()) + if popErr := writeBuffer.PopContext("parameters"); popErr != nil { + return errors.Wrap(popErr, "Error popping for parameters") + } + if _parametersErr != nil { + return errors.Wrap(_parametersErr, "Error serializing 'parameters' field") + } - // Simple Field (innerClosingTag) - if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerClosingTag") - } - _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) - if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerClosingTag") - } - if _innerClosingTagErr != nil { - return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") - } + // Simple Field (innerClosingTag) + if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerClosingTag") + } + _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) + if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerClosingTag") + } + if _innerClosingTagErr != nil { + return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") + } if popErr := writeBuffer.PopContext("BACnetNotificationParametersExtended"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetNotificationParametersExtended") @@ -347,6 +351,7 @@ func (m *_BACnetNotificationParametersExtended) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetNotificationParametersExtended) isBACnetNotificationParametersExtended() bool { return true } @@ -361,3 +366,6 @@ func (m *_BACnetNotificationParametersExtended) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersExtendedParameters.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersExtendedParameters.go index 328b9654e7f..da23f90d32c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersExtendedParameters.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersExtendedParameters.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNotificationParametersExtendedParameters is the corresponding interface of BACnetNotificationParametersExtendedParameters type BACnetNotificationParametersExtendedParameters interface { @@ -83,28 +85,29 @@ type BACnetNotificationParametersExtendedParametersExactly interface { // _BACnetNotificationParametersExtendedParameters is the data-structure of this message type _BACnetNotificationParametersExtendedParameters struct { - OpeningTag BACnetOpeningTag - PeekedTagHeader BACnetTagHeader - NullValue BACnetApplicationTagNull - RealValue BACnetApplicationTagReal - UnsignedValue BACnetApplicationTagUnsignedInteger - BooleanValue BACnetApplicationTagBoolean - IntegerValue BACnetApplicationTagSignedInteger - DoubleValue BACnetApplicationTagDouble - OctetStringValue BACnetApplicationTagOctetString - CharacterStringValue BACnetApplicationTagCharacterString - BitStringValue BACnetApplicationTagBitString - EnumeratedValue BACnetApplicationTagEnumerated - DateValue BACnetApplicationTagDate - TimeValue BACnetApplicationTagTime - ObjectIdentifier BACnetApplicationTagObjectIdentifier - Reference BACnetDeviceObjectPropertyReferenceEnclosed - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + PeekedTagHeader BACnetTagHeader + NullValue BACnetApplicationTagNull + RealValue BACnetApplicationTagReal + UnsignedValue BACnetApplicationTagUnsignedInteger + BooleanValue BACnetApplicationTagBoolean + IntegerValue BACnetApplicationTagSignedInteger + DoubleValue BACnetApplicationTagDouble + OctetStringValue BACnetApplicationTagOctetString + CharacterStringValue BACnetApplicationTagCharacterString + BitStringValue BACnetApplicationTagBitString + EnumeratedValue BACnetApplicationTagEnumerated + DateValue BACnetApplicationTagDate + TimeValue BACnetApplicationTagTime + ObjectIdentifier BACnetApplicationTagObjectIdentifier + Reference BACnetDeviceObjectPropertyReferenceEnclosed + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -294,14 +297,15 @@ func (m *_BACnetNotificationParametersExtendedParameters) GetIsClosingTag() bool /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNotificationParametersExtendedParameters factory function for _BACnetNotificationParametersExtendedParameters -func NewBACnetNotificationParametersExtendedParameters(openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, nullValue BACnetApplicationTagNull, realValue BACnetApplicationTagReal, unsignedValue BACnetApplicationTagUnsignedInteger, booleanValue BACnetApplicationTagBoolean, integerValue BACnetApplicationTagSignedInteger, doubleValue BACnetApplicationTagDouble, octetStringValue BACnetApplicationTagOctetString, characterStringValue BACnetApplicationTagCharacterString, bitStringValue BACnetApplicationTagBitString, enumeratedValue BACnetApplicationTagEnumerated, dateValue BACnetApplicationTagDate, timeValue BACnetApplicationTagTime, objectIdentifier BACnetApplicationTagObjectIdentifier, reference BACnetDeviceObjectPropertyReferenceEnclosed, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetNotificationParametersExtendedParameters { - return &_BACnetNotificationParametersExtendedParameters{OpeningTag: openingTag, PeekedTagHeader: peekedTagHeader, NullValue: nullValue, RealValue: realValue, UnsignedValue: unsignedValue, BooleanValue: booleanValue, IntegerValue: integerValue, DoubleValue: doubleValue, OctetStringValue: octetStringValue, CharacterStringValue: characterStringValue, BitStringValue: bitStringValue, EnumeratedValue: enumeratedValue, DateValue: dateValue, TimeValue: timeValue, ObjectIdentifier: objectIdentifier, Reference: reference, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetNotificationParametersExtendedParameters( openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , nullValue BACnetApplicationTagNull , realValue BACnetApplicationTagReal , unsignedValue BACnetApplicationTagUnsignedInteger , booleanValue BACnetApplicationTagBoolean , integerValue BACnetApplicationTagSignedInteger , doubleValue BACnetApplicationTagDouble , octetStringValue BACnetApplicationTagOctetString , characterStringValue BACnetApplicationTagCharacterString , bitStringValue BACnetApplicationTagBitString , enumeratedValue BACnetApplicationTagEnumerated , dateValue BACnetApplicationTagDate , timeValue BACnetApplicationTagTime , objectIdentifier BACnetApplicationTagObjectIdentifier , reference BACnetDeviceObjectPropertyReferenceEnclosed , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetNotificationParametersExtendedParameters { +return &_BACnetNotificationParametersExtendedParameters{ OpeningTag: openingTag , PeekedTagHeader: peekedTagHeader , NullValue: nullValue , RealValue: realValue , UnsignedValue: unsignedValue , BooleanValue: booleanValue , IntegerValue: integerValue , DoubleValue: doubleValue , OctetStringValue: octetStringValue , CharacterStringValue: characterStringValue , BitStringValue: bitStringValue , EnumeratedValue: enumeratedValue , DateValue: dateValue , TimeValue: timeValue , ObjectIdentifier: objectIdentifier , Reference: reference , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetNotificationParametersExtendedParameters(structType interface{}) BACnetNotificationParametersExtendedParameters { - if casted, ok := structType.(BACnetNotificationParametersExtendedParameters); ok { + if casted, ok := structType.(BACnetNotificationParametersExtendedParameters); ok { return casted } if casted, ok := structType.(*BACnetNotificationParametersExtendedParameters); ok { @@ -402,6 +406,7 @@ func (m *_BACnetNotificationParametersExtendedParameters) GetLengthInBits(ctx co return lengthInBits } + func (m *_BACnetNotificationParametersExtendedParameters) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -423,7 +428,7 @@ func BACnetNotificationParametersExtendedParametersParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetNotificationParametersExtendedParameters") } @@ -432,13 +437,13 @@ func BACnetNotificationParametersExtendedParametersParseWithBuffer(ctx context.C return nil, errors.Wrap(closeErr, "Error closing for openingTag") } - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Virtual field _peekedTagNumber := peekedTagHeader.GetActualTagNumber() @@ -462,7 +467,7 @@ func BACnetNotificationParametersExtendedParametersParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("nullValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for nullValue") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -484,7 +489,7 @@ func BACnetNotificationParametersExtendedParametersParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("realValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for realValue") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -506,7 +511,7 @@ func BACnetNotificationParametersExtendedParametersParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("unsignedValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for unsignedValue") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -528,7 +533,7 @@ func BACnetNotificationParametersExtendedParametersParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("booleanValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for booleanValue") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -550,7 +555,7 @@ func BACnetNotificationParametersExtendedParametersParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("integerValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for integerValue") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -572,7 +577,7 @@ func BACnetNotificationParametersExtendedParametersParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("doubleValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for doubleValue") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -594,7 +599,7 @@ func BACnetNotificationParametersExtendedParametersParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("octetStringValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for octetStringValue") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -616,7 +621,7 @@ func BACnetNotificationParametersExtendedParametersParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("characterStringValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for characterStringValue") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -638,7 +643,7 @@ func BACnetNotificationParametersExtendedParametersParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("bitStringValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for bitStringValue") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -660,7 +665,7 @@ func BACnetNotificationParametersExtendedParametersParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("enumeratedValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for enumeratedValue") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -682,7 +687,7 @@ func BACnetNotificationParametersExtendedParametersParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("dateValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for dateValue") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -704,7 +709,7 @@ func BACnetNotificationParametersExtendedParametersParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("timeValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeValue") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -726,7 +731,7 @@ func BACnetNotificationParametersExtendedParametersParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("objectIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for objectIdentifier") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -748,7 +753,7 @@ func BACnetNotificationParametersExtendedParametersParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("reference"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for reference") } - _val, _err := BACnetDeviceObjectPropertyReferenceEnclosedParseWithBuffer(ctx, readBuffer, uint8(0)) +_val, _err := BACnetDeviceObjectPropertyReferenceEnclosedParseWithBuffer(ctx, readBuffer , uint8(0) ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -767,7 +772,7 @@ func BACnetNotificationParametersExtendedParametersParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetNotificationParametersExtendedParameters") } @@ -782,25 +787,25 @@ func BACnetNotificationParametersExtendedParametersParseWithBuffer(ctx context.C // Create the instance return &_BACnetNotificationParametersExtendedParameters{ - TagNumber: tagNumber, - OpeningTag: openingTag, - PeekedTagHeader: peekedTagHeader, - NullValue: nullValue, - RealValue: realValue, - UnsignedValue: unsignedValue, - BooleanValue: booleanValue, - IntegerValue: integerValue, - DoubleValue: doubleValue, - OctetStringValue: octetStringValue, - CharacterStringValue: characterStringValue, - BitStringValue: bitStringValue, - EnumeratedValue: enumeratedValue, - DateValue: dateValue, - TimeValue: timeValue, - ObjectIdentifier: objectIdentifier, - Reference: reference, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + PeekedTagHeader: peekedTagHeader, + NullValue: nullValue, + RealValue: realValue, + UnsignedValue: unsignedValue, + BooleanValue: booleanValue, + IntegerValue: integerValue, + DoubleValue: doubleValue, + OctetStringValue: octetStringValue, + CharacterStringValue: characterStringValue, + BitStringValue: bitStringValue, + EnumeratedValue: enumeratedValue, + DateValue: dateValue, + TimeValue: timeValue, + ObjectIdentifier: objectIdentifier, + Reference: reference, + ClosingTag: closingTag, + }, nil } func (m *_BACnetNotificationParametersExtendedParameters) Serialize() ([]byte, error) { @@ -814,7 +819,7 @@ func (m *_BACnetNotificationParametersExtendedParameters) Serialize() ([]byte, e func (m *_BACnetNotificationParametersExtendedParameters) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetNotificationParametersExtendedParameters"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetNotificationParametersExtendedParameters"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetNotificationParametersExtendedParameters") } @@ -1084,13 +1089,13 @@ func (m *_BACnetNotificationParametersExtendedParameters) SerializeWithWriteBuff return nil } + //// // Arguments Getter func (m *_BACnetNotificationParametersExtendedParameters) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -1108,3 +1113,6 @@ func (m *_BACnetNotificationParametersExtendedParameters) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersFloatingLimit.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersFloatingLimit.go index dd19b0b6870..e5f33f0bd2c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersFloatingLimit.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersFloatingLimit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNotificationParametersFloatingLimit is the corresponding interface of BACnetNotificationParametersFloatingLimit type BACnetNotificationParametersFloatingLimit interface { @@ -56,14 +58,16 @@ type BACnetNotificationParametersFloatingLimitExactly interface { // _BACnetNotificationParametersFloatingLimit is the data-structure of this message type _BACnetNotificationParametersFloatingLimit struct { *_BACnetNotificationParameters - InnerOpeningTag BACnetOpeningTag - ReferenceValue BACnetContextTagReal - StatusFlags BACnetStatusFlagsTagged - SetPointValue BACnetContextTagReal - ErrorLimit BACnetContextTagReal - InnerClosingTag BACnetClosingTag + InnerOpeningTag BACnetOpeningTag + ReferenceValue BACnetContextTagReal + StatusFlags BACnetStatusFlagsTagged + SetPointValue BACnetContextTagReal + ErrorLimit BACnetContextTagReal + InnerClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -74,16 +78,14 @@ type _BACnetNotificationParametersFloatingLimit struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetNotificationParametersFloatingLimit) InitializeParent(parent BACnetNotificationParameters, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetNotificationParametersFloatingLimit) InitializeParent(parent BACnetNotificationParameters , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetNotificationParametersFloatingLimit) GetParent() BACnetNotificationParameters { +func (m *_BACnetNotificationParametersFloatingLimit) GetParent() BACnetNotificationParameters { return m._BACnetNotificationParameters } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -118,16 +120,17 @@ func (m *_BACnetNotificationParametersFloatingLimit) GetInnerClosingTag() BACnet /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNotificationParametersFloatingLimit factory function for _BACnetNotificationParametersFloatingLimit -func NewBACnetNotificationParametersFloatingLimit(innerOpeningTag BACnetOpeningTag, referenceValue BACnetContextTagReal, statusFlags BACnetStatusFlagsTagged, setPointValue BACnetContextTagReal, errorLimit BACnetContextTagReal, innerClosingTag BACnetClosingTag, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, objectTypeArgument BACnetObjectType) *_BACnetNotificationParametersFloatingLimit { +func NewBACnetNotificationParametersFloatingLimit( innerOpeningTag BACnetOpeningTag , referenceValue BACnetContextTagReal , statusFlags BACnetStatusFlagsTagged , setPointValue BACnetContextTagReal , errorLimit BACnetContextTagReal , innerClosingTag BACnetClosingTag , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , objectTypeArgument BACnetObjectType ) *_BACnetNotificationParametersFloatingLimit { _result := &_BACnetNotificationParametersFloatingLimit{ - InnerOpeningTag: innerOpeningTag, - ReferenceValue: referenceValue, - StatusFlags: statusFlags, - SetPointValue: setPointValue, - ErrorLimit: errorLimit, - InnerClosingTag: innerClosingTag, - _BACnetNotificationParameters: NewBACnetNotificationParameters(openingTag, peekedTagHeader, closingTag, tagNumber, objectTypeArgument), + InnerOpeningTag: innerOpeningTag, + ReferenceValue: referenceValue, + StatusFlags: statusFlags, + SetPointValue: setPointValue, + ErrorLimit: errorLimit, + InnerClosingTag: innerClosingTag, + _BACnetNotificationParameters: NewBACnetNotificationParameters(openingTag, peekedTagHeader, closingTag, tagNumber, objectTypeArgument), } _result._BACnetNotificationParameters._BACnetNotificationParametersChildRequirements = _result return _result @@ -135,7 +138,7 @@ func NewBACnetNotificationParametersFloatingLimit(innerOpeningTag BACnetOpeningT // Deprecated: use the interface for direct cast func CastBACnetNotificationParametersFloatingLimit(structType interface{}) BACnetNotificationParametersFloatingLimit { - if casted, ok := structType.(BACnetNotificationParametersFloatingLimit); ok { + if casted, ok := structType.(BACnetNotificationParametersFloatingLimit); ok { return casted } if casted, ok := structType.(*BACnetNotificationParametersFloatingLimit); ok { @@ -172,6 +175,7 @@ func (m *_BACnetNotificationParametersFloatingLimit) GetLengthInBits(ctx context return lengthInBits } + func (m *_BACnetNotificationParametersFloatingLimit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -193,7 +197,7 @@ func BACnetNotificationParametersFloatingLimitParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("innerOpeningTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerOpeningTag") } - _innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber)) +_innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) ) if _innerOpeningTagErr != nil { return nil, errors.Wrap(_innerOpeningTagErr, "Error parsing 'innerOpeningTag' field of BACnetNotificationParametersFloatingLimit") } @@ -206,7 +210,7 @@ func BACnetNotificationParametersFloatingLimitParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("referenceValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for referenceValue") } - _referenceValue, _referenceValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_REAL)) +_referenceValue, _referenceValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_REAL ) ) if _referenceValueErr != nil { return nil, errors.Wrap(_referenceValueErr, "Error parsing 'referenceValue' field of BACnetNotificationParametersFloatingLimit") } @@ -219,7 +223,7 @@ func BACnetNotificationParametersFloatingLimitParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("statusFlags"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for statusFlags") } - _statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _statusFlagsErr != nil { return nil, errors.Wrap(_statusFlagsErr, "Error parsing 'statusFlags' field of BACnetNotificationParametersFloatingLimit") } @@ -232,7 +236,7 @@ func BACnetNotificationParametersFloatingLimitParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("setPointValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for setPointValue") } - _setPointValue, _setPointValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), BACnetDataType(BACnetDataType_REAL)) +_setPointValue, _setPointValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , BACnetDataType( BACnetDataType_REAL ) ) if _setPointValueErr != nil { return nil, errors.Wrap(_setPointValueErr, "Error parsing 'setPointValue' field of BACnetNotificationParametersFloatingLimit") } @@ -245,7 +249,7 @@ func BACnetNotificationParametersFloatingLimitParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("errorLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for errorLimit") } - _errorLimit, _errorLimitErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(3)), BACnetDataType(BACnetDataType_REAL)) +_errorLimit, _errorLimitErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(3) ) , BACnetDataType( BACnetDataType_REAL ) ) if _errorLimitErr != nil { return nil, errors.Wrap(_errorLimitErr, "Error parsing 'errorLimit' field of BACnetNotificationParametersFloatingLimit") } @@ -258,7 +262,7 @@ func BACnetNotificationParametersFloatingLimitParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("innerClosingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerClosingTag") } - _innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber)) +_innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) ) if _innerClosingTagErr != nil { return nil, errors.Wrap(_innerClosingTagErr, "Error parsing 'innerClosingTag' field of BACnetNotificationParametersFloatingLimit") } @@ -274,14 +278,14 @@ func BACnetNotificationParametersFloatingLimitParseWithBuffer(ctx context.Contex // Create a partially initialized instance _child := &_BACnetNotificationParametersFloatingLimit{ _BACnetNotificationParameters: &_BACnetNotificationParameters{ - TagNumber: tagNumber, + TagNumber: tagNumber, ObjectTypeArgument: objectTypeArgument, }, InnerOpeningTag: innerOpeningTag, - ReferenceValue: referenceValue, - StatusFlags: statusFlags, - SetPointValue: setPointValue, - ErrorLimit: errorLimit, + ReferenceValue: referenceValue, + StatusFlags: statusFlags, + SetPointValue: setPointValue, + ErrorLimit: errorLimit, InnerClosingTag: innerClosingTag, } _child._BACnetNotificationParameters._BACnetNotificationParametersChildRequirements = _child @@ -304,77 +308,77 @@ func (m *_BACnetNotificationParametersFloatingLimit) SerializeWithWriteBuffer(ct return errors.Wrap(pushErr, "Error pushing for BACnetNotificationParametersFloatingLimit") } - // Simple Field (innerOpeningTag) - if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") - } - _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) - if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerOpeningTag") - } - if _innerOpeningTagErr != nil { - return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") - } + // Simple Field (innerOpeningTag) + if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") + } + _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) + if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerOpeningTag") + } + if _innerOpeningTagErr != nil { + return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") + } - // Simple Field (referenceValue) - if pushErr := writeBuffer.PushContext("referenceValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for referenceValue") - } - _referenceValueErr := writeBuffer.WriteSerializable(ctx, m.GetReferenceValue()) - if popErr := writeBuffer.PopContext("referenceValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for referenceValue") - } - if _referenceValueErr != nil { - return errors.Wrap(_referenceValueErr, "Error serializing 'referenceValue' field") - } + // Simple Field (referenceValue) + if pushErr := writeBuffer.PushContext("referenceValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for referenceValue") + } + _referenceValueErr := writeBuffer.WriteSerializable(ctx, m.GetReferenceValue()) + if popErr := writeBuffer.PopContext("referenceValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for referenceValue") + } + if _referenceValueErr != nil { + return errors.Wrap(_referenceValueErr, "Error serializing 'referenceValue' field") + } - // Simple Field (statusFlags) - if pushErr := writeBuffer.PushContext("statusFlags"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for statusFlags") - } - _statusFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetStatusFlags()) - if popErr := writeBuffer.PopContext("statusFlags"); popErr != nil { - return errors.Wrap(popErr, "Error popping for statusFlags") - } - if _statusFlagsErr != nil { - return errors.Wrap(_statusFlagsErr, "Error serializing 'statusFlags' field") - } + // Simple Field (statusFlags) + if pushErr := writeBuffer.PushContext("statusFlags"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for statusFlags") + } + _statusFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetStatusFlags()) + if popErr := writeBuffer.PopContext("statusFlags"); popErr != nil { + return errors.Wrap(popErr, "Error popping for statusFlags") + } + if _statusFlagsErr != nil { + return errors.Wrap(_statusFlagsErr, "Error serializing 'statusFlags' field") + } - // Simple Field (setPointValue) - if pushErr := writeBuffer.PushContext("setPointValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for setPointValue") - } - _setPointValueErr := writeBuffer.WriteSerializable(ctx, m.GetSetPointValue()) - if popErr := writeBuffer.PopContext("setPointValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for setPointValue") - } - if _setPointValueErr != nil { - return errors.Wrap(_setPointValueErr, "Error serializing 'setPointValue' field") - } + // Simple Field (setPointValue) + if pushErr := writeBuffer.PushContext("setPointValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for setPointValue") + } + _setPointValueErr := writeBuffer.WriteSerializable(ctx, m.GetSetPointValue()) + if popErr := writeBuffer.PopContext("setPointValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for setPointValue") + } + if _setPointValueErr != nil { + return errors.Wrap(_setPointValueErr, "Error serializing 'setPointValue' field") + } - // Simple Field (errorLimit) - if pushErr := writeBuffer.PushContext("errorLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for errorLimit") - } - _errorLimitErr := writeBuffer.WriteSerializable(ctx, m.GetErrorLimit()) - if popErr := writeBuffer.PopContext("errorLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for errorLimit") - } - if _errorLimitErr != nil { - return errors.Wrap(_errorLimitErr, "Error serializing 'errorLimit' field") - } + // Simple Field (errorLimit) + if pushErr := writeBuffer.PushContext("errorLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for errorLimit") + } + _errorLimitErr := writeBuffer.WriteSerializable(ctx, m.GetErrorLimit()) + if popErr := writeBuffer.PopContext("errorLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for errorLimit") + } + if _errorLimitErr != nil { + return errors.Wrap(_errorLimitErr, "Error serializing 'errorLimit' field") + } - // Simple Field (innerClosingTag) - if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerClosingTag") - } - _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) - if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerClosingTag") - } - if _innerClosingTagErr != nil { - return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") - } + // Simple Field (innerClosingTag) + if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerClosingTag") + } + _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) + if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerClosingTag") + } + if _innerClosingTagErr != nil { + return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") + } if popErr := writeBuffer.PopContext("BACnetNotificationParametersFloatingLimit"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetNotificationParametersFloatingLimit") @@ -384,6 +388,7 @@ func (m *_BACnetNotificationParametersFloatingLimit) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetNotificationParametersFloatingLimit) isBACnetNotificationParametersFloatingLimit() bool { return true } @@ -398,3 +403,6 @@ func (m *_BACnetNotificationParametersFloatingLimit) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersOutOfRange.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersOutOfRange.go index 03d1f56b76b..203b3ce4e0d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersOutOfRange.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersOutOfRange.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNotificationParametersOutOfRange is the corresponding interface of BACnetNotificationParametersOutOfRange type BACnetNotificationParametersOutOfRange interface { @@ -56,14 +58,16 @@ type BACnetNotificationParametersOutOfRangeExactly interface { // _BACnetNotificationParametersOutOfRange is the data-structure of this message type _BACnetNotificationParametersOutOfRange struct { *_BACnetNotificationParameters - InnerOpeningTag BACnetOpeningTag - ExceedingValue BACnetContextTagReal - StatusFlags BACnetStatusFlagsTagged - Deadband BACnetContextTagReal - ExceededLimit BACnetContextTagReal - InnerClosingTag BACnetClosingTag + InnerOpeningTag BACnetOpeningTag + ExceedingValue BACnetContextTagReal + StatusFlags BACnetStatusFlagsTagged + Deadband BACnetContextTagReal + ExceededLimit BACnetContextTagReal + InnerClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -74,16 +78,14 @@ type _BACnetNotificationParametersOutOfRange struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetNotificationParametersOutOfRange) InitializeParent(parent BACnetNotificationParameters, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetNotificationParametersOutOfRange) InitializeParent(parent BACnetNotificationParameters , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetNotificationParametersOutOfRange) GetParent() BACnetNotificationParameters { +func (m *_BACnetNotificationParametersOutOfRange) GetParent() BACnetNotificationParameters { return m._BACnetNotificationParameters } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -118,16 +120,17 @@ func (m *_BACnetNotificationParametersOutOfRange) GetInnerClosingTag() BACnetClo /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNotificationParametersOutOfRange factory function for _BACnetNotificationParametersOutOfRange -func NewBACnetNotificationParametersOutOfRange(innerOpeningTag BACnetOpeningTag, exceedingValue BACnetContextTagReal, statusFlags BACnetStatusFlagsTagged, deadband BACnetContextTagReal, exceededLimit BACnetContextTagReal, innerClosingTag BACnetClosingTag, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, objectTypeArgument BACnetObjectType) *_BACnetNotificationParametersOutOfRange { +func NewBACnetNotificationParametersOutOfRange( innerOpeningTag BACnetOpeningTag , exceedingValue BACnetContextTagReal , statusFlags BACnetStatusFlagsTagged , deadband BACnetContextTagReal , exceededLimit BACnetContextTagReal , innerClosingTag BACnetClosingTag , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , objectTypeArgument BACnetObjectType ) *_BACnetNotificationParametersOutOfRange { _result := &_BACnetNotificationParametersOutOfRange{ - InnerOpeningTag: innerOpeningTag, - ExceedingValue: exceedingValue, - StatusFlags: statusFlags, - Deadband: deadband, - ExceededLimit: exceededLimit, - InnerClosingTag: innerClosingTag, - _BACnetNotificationParameters: NewBACnetNotificationParameters(openingTag, peekedTagHeader, closingTag, tagNumber, objectTypeArgument), + InnerOpeningTag: innerOpeningTag, + ExceedingValue: exceedingValue, + StatusFlags: statusFlags, + Deadband: deadband, + ExceededLimit: exceededLimit, + InnerClosingTag: innerClosingTag, + _BACnetNotificationParameters: NewBACnetNotificationParameters(openingTag, peekedTagHeader, closingTag, tagNumber, objectTypeArgument), } _result._BACnetNotificationParameters._BACnetNotificationParametersChildRequirements = _result return _result @@ -135,7 +138,7 @@ func NewBACnetNotificationParametersOutOfRange(innerOpeningTag BACnetOpeningTag, // Deprecated: use the interface for direct cast func CastBACnetNotificationParametersOutOfRange(structType interface{}) BACnetNotificationParametersOutOfRange { - if casted, ok := structType.(BACnetNotificationParametersOutOfRange); ok { + if casted, ok := structType.(BACnetNotificationParametersOutOfRange); ok { return casted } if casted, ok := structType.(*BACnetNotificationParametersOutOfRange); ok { @@ -172,6 +175,7 @@ func (m *_BACnetNotificationParametersOutOfRange) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetNotificationParametersOutOfRange) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -193,7 +197,7 @@ func BACnetNotificationParametersOutOfRangeParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("innerOpeningTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerOpeningTag") } - _innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber)) +_innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) ) if _innerOpeningTagErr != nil { return nil, errors.Wrap(_innerOpeningTagErr, "Error parsing 'innerOpeningTag' field of BACnetNotificationParametersOutOfRange") } @@ -206,7 +210,7 @@ func BACnetNotificationParametersOutOfRangeParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("exceedingValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for exceedingValue") } - _exceedingValue, _exceedingValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_REAL)) +_exceedingValue, _exceedingValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_REAL ) ) if _exceedingValueErr != nil { return nil, errors.Wrap(_exceedingValueErr, "Error parsing 'exceedingValue' field of BACnetNotificationParametersOutOfRange") } @@ -219,7 +223,7 @@ func BACnetNotificationParametersOutOfRangeParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("statusFlags"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for statusFlags") } - _statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _statusFlagsErr != nil { return nil, errors.Wrap(_statusFlagsErr, "Error parsing 'statusFlags' field of BACnetNotificationParametersOutOfRange") } @@ -232,7 +236,7 @@ func BACnetNotificationParametersOutOfRangeParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("deadband"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for deadband") } - _deadband, _deadbandErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), BACnetDataType(BACnetDataType_REAL)) +_deadband, _deadbandErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , BACnetDataType( BACnetDataType_REAL ) ) if _deadbandErr != nil { return nil, errors.Wrap(_deadbandErr, "Error parsing 'deadband' field of BACnetNotificationParametersOutOfRange") } @@ -245,7 +249,7 @@ func BACnetNotificationParametersOutOfRangeParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("exceededLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for exceededLimit") } - _exceededLimit, _exceededLimitErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(3)), BACnetDataType(BACnetDataType_REAL)) +_exceededLimit, _exceededLimitErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(3) ) , BACnetDataType( BACnetDataType_REAL ) ) if _exceededLimitErr != nil { return nil, errors.Wrap(_exceededLimitErr, "Error parsing 'exceededLimit' field of BACnetNotificationParametersOutOfRange") } @@ -258,7 +262,7 @@ func BACnetNotificationParametersOutOfRangeParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("innerClosingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerClosingTag") } - _innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber)) +_innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) ) if _innerClosingTagErr != nil { return nil, errors.Wrap(_innerClosingTagErr, "Error parsing 'innerClosingTag' field of BACnetNotificationParametersOutOfRange") } @@ -274,14 +278,14 @@ func BACnetNotificationParametersOutOfRangeParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetNotificationParametersOutOfRange{ _BACnetNotificationParameters: &_BACnetNotificationParameters{ - TagNumber: tagNumber, + TagNumber: tagNumber, ObjectTypeArgument: objectTypeArgument, }, InnerOpeningTag: innerOpeningTag, - ExceedingValue: exceedingValue, - StatusFlags: statusFlags, - Deadband: deadband, - ExceededLimit: exceededLimit, + ExceedingValue: exceedingValue, + StatusFlags: statusFlags, + Deadband: deadband, + ExceededLimit: exceededLimit, InnerClosingTag: innerClosingTag, } _child._BACnetNotificationParameters._BACnetNotificationParametersChildRequirements = _child @@ -304,77 +308,77 @@ func (m *_BACnetNotificationParametersOutOfRange) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetNotificationParametersOutOfRange") } - // Simple Field (innerOpeningTag) - if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") - } - _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) - if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerOpeningTag") - } - if _innerOpeningTagErr != nil { - return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") - } + // Simple Field (innerOpeningTag) + if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") + } + _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) + if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerOpeningTag") + } + if _innerOpeningTagErr != nil { + return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") + } - // Simple Field (exceedingValue) - if pushErr := writeBuffer.PushContext("exceedingValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for exceedingValue") - } - _exceedingValueErr := writeBuffer.WriteSerializable(ctx, m.GetExceedingValue()) - if popErr := writeBuffer.PopContext("exceedingValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for exceedingValue") - } - if _exceedingValueErr != nil { - return errors.Wrap(_exceedingValueErr, "Error serializing 'exceedingValue' field") - } + // Simple Field (exceedingValue) + if pushErr := writeBuffer.PushContext("exceedingValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for exceedingValue") + } + _exceedingValueErr := writeBuffer.WriteSerializable(ctx, m.GetExceedingValue()) + if popErr := writeBuffer.PopContext("exceedingValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for exceedingValue") + } + if _exceedingValueErr != nil { + return errors.Wrap(_exceedingValueErr, "Error serializing 'exceedingValue' field") + } - // Simple Field (statusFlags) - if pushErr := writeBuffer.PushContext("statusFlags"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for statusFlags") - } - _statusFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetStatusFlags()) - if popErr := writeBuffer.PopContext("statusFlags"); popErr != nil { - return errors.Wrap(popErr, "Error popping for statusFlags") - } - if _statusFlagsErr != nil { - return errors.Wrap(_statusFlagsErr, "Error serializing 'statusFlags' field") - } + // Simple Field (statusFlags) + if pushErr := writeBuffer.PushContext("statusFlags"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for statusFlags") + } + _statusFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetStatusFlags()) + if popErr := writeBuffer.PopContext("statusFlags"); popErr != nil { + return errors.Wrap(popErr, "Error popping for statusFlags") + } + if _statusFlagsErr != nil { + return errors.Wrap(_statusFlagsErr, "Error serializing 'statusFlags' field") + } - // Simple Field (deadband) - if pushErr := writeBuffer.PushContext("deadband"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for deadband") - } - _deadbandErr := writeBuffer.WriteSerializable(ctx, m.GetDeadband()) - if popErr := writeBuffer.PopContext("deadband"); popErr != nil { - return errors.Wrap(popErr, "Error popping for deadband") - } - if _deadbandErr != nil { - return errors.Wrap(_deadbandErr, "Error serializing 'deadband' field") - } + // Simple Field (deadband) + if pushErr := writeBuffer.PushContext("deadband"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for deadband") + } + _deadbandErr := writeBuffer.WriteSerializable(ctx, m.GetDeadband()) + if popErr := writeBuffer.PopContext("deadband"); popErr != nil { + return errors.Wrap(popErr, "Error popping for deadband") + } + if _deadbandErr != nil { + return errors.Wrap(_deadbandErr, "Error serializing 'deadband' field") + } - // Simple Field (exceededLimit) - if pushErr := writeBuffer.PushContext("exceededLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for exceededLimit") - } - _exceededLimitErr := writeBuffer.WriteSerializable(ctx, m.GetExceededLimit()) - if popErr := writeBuffer.PopContext("exceededLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for exceededLimit") - } - if _exceededLimitErr != nil { - return errors.Wrap(_exceededLimitErr, "Error serializing 'exceededLimit' field") - } + // Simple Field (exceededLimit) + if pushErr := writeBuffer.PushContext("exceededLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for exceededLimit") + } + _exceededLimitErr := writeBuffer.WriteSerializable(ctx, m.GetExceededLimit()) + if popErr := writeBuffer.PopContext("exceededLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for exceededLimit") + } + if _exceededLimitErr != nil { + return errors.Wrap(_exceededLimitErr, "Error serializing 'exceededLimit' field") + } - // Simple Field (innerClosingTag) - if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerClosingTag") - } - _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) - if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerClosingTag") - } - if _innerClosingTagErr != nil { - return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") - } + // Simple Field (innerClosingTag) + if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerClosingTag") + } + _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) + if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerClosingTag") + } + if _innerClosingTagErr != nil { + return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") + } if popErr := writeBuffer.PopContext("BACnetNotificationParametersOutOfRange"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetNotificationParametersOutOfRange") @@ -384,6 +388,7 @@ func (m *_BACnetNotificationParametersOutOfRange) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetNotificationParametersOutOfRange) isBACnetNotificationParametersOutOfRange() bool { return true } @@ -398,3 +403,6 @@ func (m *_BACnetNotificationParametersOutOfRange) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersSignedOutOfRange.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersSignedOutOfRange.go index ca869bb9d53..f43faae8052 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersSignedOutOfRange.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersSignedOutOfRange.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNotificationParametersSignedOutOfRange is the corresponding interface of BACnetNotificationParametersSignedOutOfRange type BACnetNotificationParametersSignedOutOfRange interface { @@ -56,14 +58,16 @@ type BACnetNotificationParametersSignedOutOfRangeExactly interface { // _BACnetNotificationParametersSignedOutOfRange is the data-structure of this message type _BACnetNotificationParametersSignedOutOfRange struct { *_BACnetNotificationParameters - InnerOpeningTag BACnetOpeningTag - ExceedingValue BACnetContextTagSignedInteger - StatusFlags BACnetStatusFlagsTagged - Deadband BACnetContextTagUnsignedInteger - ExceededLimit BACnetContextTagSignedInteger - InnerClosingTag BACnetClosingTag + InnerOpeningTag BACnetOpeningTag + ExceedingValue BACnetContextTagSignedInteger + StatusFlags BACnetStatusFlagsTagged + Deadband BACnetContextTagUnsignedInteger + ExceededLimit BACnetContextTagSignedInteger + InnerClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -74,16 +78,14 @@ type _BACnetNotificationParametersSignedOutOfRange struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetNotificationParametersSignedOutOfRange) InitializeParent(parent BACnetNotificationParameters, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetNotificationParametersSignedOutOfRange) InitializeParent(parent BACnetNotificationParameters , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetNotificationParametersSignedOutOfRange) GetParent() BACnetNotificationParameters { +func (m *_BACnetNotificationParametersSignedOutOfRange) GetParent() BACnetNotificationParameters { return m._BACnetNotificationParameters } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -118,16 +120,17 @@ func (m *_BACnetNotificationParametersSignedOutOfRange) GetInnerClosingTag() BAC /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNotificationParametersSignedOutOfRange factory function for _BACnetNotificationParametersSignedOutOfRange -func NewBACnetNotificationParametersSignedOutOfRange(innerOpeningTag BACnetOpeningTag, exceedingValue BACnetContextTagSignedInteger, statusFlags BACnetStatusFlagsTagged, deadband BACnetContextTagUnsignedInteger, exceededLimit BACnetContextTagSignedInteger, innerClosingTag BACnetClosingTag, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, objectTypeArgument BACnetObjectType) *_BACnetNotificationParametersSignedOutOfRange { +func NewBACnetNotificationParametersSignedOutOfRange( innerOpeningTag BACnetOpeningTag , exceedingValue BACnetContextTagSignedInteger , statusFlags BACnetStatusFlagsTagged , deadband BACnetContextTagUnsignedInteger , exceededLimit BACnetContextTagSignedInteger , innerClosingTag BACnetClosingTag , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , objectTypeArgument BACnetObjectType ) *_BACnetNotificationParametersSignedOutOfRange { _result := &_BACnetNotificationParametersSignedOutOfRange{ - InnerOpeningTag: innerOpeningTag, - ExceedingValue: exceedingValue, - StatusFlags: statusFlags, - Deadband: deadband, - ExceededLimit: exceededLimit, - InnerClosingTag: innerClosingTag, - _BACnetNotificationParameters: NewBACnetNotificationParameters(openingTag, peekedTagHeader, closingTag, tagNumber, objectTypeArgument), + InnerOpeningTag: innerOpeningTag, + ExceedingValue: exceedingValue, + StatusFlags: statusFlags, + Deadband: deadband, + ExceededLimit: exceededLimit, + InnerClosingTag: innerClosingTag, + _BACnetNotificationParameters: NewBACnetNotificationParameters(openingTag, peekedTagHeader, closingTag, tagNumber, objectTypeArgument), } _result._BACnetNotificationParameters._BACnetNotificationParametersChildRequirements = _result return _result @@ -135,7 +138,7 @@ func NewBACnetNotificationParametersSignedOutOfRange(innerOpeningTag BACnetOpeni // Deprecated: use the interface for direct cast func CastBACnetNotificationParametersSignedOutOfRange(structType interface{}) BACnetNotificationParametersSignedOutOfRange { - if casted, ok := structType.(BACnetNotificationParametersSignedOutOfRange); ok { + if casted, ok := structType.(BACnetNotificationParametersSignedOutOfRange); ok { return casted } if casted, ok := structType.(*BACnetNotificationParametersSignedOutOfRange); ok { @@ -172,6 +175,7 @@ func (m *_BACnetNotificationParametersSignedOutOfRange) GetLengthInBits(ctx cont return lengthInBits } + func (m *_BACnetNotificationParametersSignedOutOfRange) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -193,7 +197,7 @@ func BACnetNotificationParametersSignedOutOfRangeParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("innerOpeningTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerOpeningTag") } - _innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber)) +_innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) ) if _innerOpeningTagErr != nil { return nil, errors.Wrap(_innerOpeningTagErr, "Error parsing 'innerOpeningTag' field of BACnetNotificationParametersSignedOutOfRange") } @@ -206,7 +210,7 @@ func BACnetNotificationParametersSignedOutOfRangeParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("exceedingValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for exceedingValue") } - _exceedingValue, _exceedingValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_SIGNED_INTEGER)) +_exceedingValue, _exceedingValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_SIGNED_INTEGER ) ) if _exceedingValueErr != nil { return nil, errors.Wrap(_exceedingValueErr, "Error parsing 'exceedingValue' field of BACnetNotificationParametersSignedOutOfRange") } @@ -219,7 +223,7 @@ func BACnetNotificationParametersSignedOutOfRangeParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("statusFlags"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for statusFlags") } - _statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _statusFlagsErr != nil { return nil, errors.Wrap(_statusFlagsErr, "Error parsing 'statusFlags' field of BACnetNotificationParametersSignedOutOfRange") } @@ -232,7 +236,7 @@ func BACnetNotificationParametersSignedOutOfRangeParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("deadband"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for deadband") } - _deadband, _deadbandErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_deadband, _deadbandErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _deadbandErr != nil { return nil, errors.Wrap(_deadbandErr, "Error parsing 'deadband' field of BACnetNotificationParametersSignedOutOfRange") } @@ -245,7 +249,7 @@ func BACnetNotificationParametersSignedOutOfRangeParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("exceededLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for exceededLimit") } - _exceededLimit, _exceededLimitErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(3)), BACnetDataType(BACnetDataType_SIGNED_INTEGER)) +_exceededLimit, _exceededLimitErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(3) ) , BACnetDataType( BACnetDataType_SIGNED_INTEGER ) ) if _exceededLimitErr != nil { return nil, errors.Wrap(_exceededLimitErr, "Error parsing 'exceededLimit' field of BACnetNotificationParametersSignedOutOfRange") } @@ -258,7 +262,7 @@ func BACnetNotificationParametersSignedOutOfRangeParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("innerClosingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerClosingTag") } - _innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber)) +_innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) ) if _innerClosingTagErr != nil { return nil, errors.Wrap(_innerClosingTagErr, "Error parsing 'innerClosingTag' field of BACnetNotificationParametersSignedOutOfRange") } @@ -274,14 +278,14 @@ func BACnetNotificationParametersSignedOutOfRangeParseWithBuffer(ctx context.Con // Create a partially initialized instance _child := &_BACnetNotificationParametersSignedOutOfRange{ _BACnetNotificationParameters: &_BACnetNotificationParameters{ - TagNumber: tagNumber, + TagNumber: tagNumber, ObjectTypeArgument: objectTypeArgument, }, InnerOpeningTag: innerOpeningTag, - ExceedingValue: exceedingValue, - StatusFlags: statusFlags, - Deadband: deadband, - ExceededLimit: exceededLimit, + ExceedingValue: exceedingValue, + StatusFlags: statusFlags, + Deadband: deadband, + ExceededLimit: exceededLimit, InnerClosingTag: innerClosingTag, } _child._BACnetNotificationParameters._BACnetNotificationParametersChildRequirements = _child @@ -304,77 +308,77 @@ func (m *_BACnetNotificationParametersSignedOutOfRange) SerializeWithWriteBuffer return errors.Wrap(pushErr, "Error pushing for BACnetNotificationParametersSignedOutOfRange") } - // Simple Field (innerOpeningTag) - if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") - } - _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) - if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerOpeningTag") - } - if _innerOpeningTagErr != nil { - return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") - } + // Simple Field (innerOpeningTag) + if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") + } + _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) + if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerOpeningTag") + } + if _innerOpeningTagErr != nil { + return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") + } - // Simple Field (exceedingValue) - if pushErr := writeBuffer.PushContext("exceedingValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for exceedingValue") - } - _exceedingValueErr := writeBuffer.WriteSerializable(ctx, m.GetExceedingValue()) - if popErr := writeBuffer.PopContext("exceedingValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for exceedingValue") - } - if _exceedingValueErr != nil { - return errors.Wrap(_exceedingValueErr, "Error serializing 'exceedingValue' field") - } + // Simple Field (exceedingValue) + if pushErr := writeBuffer.PushContext("exceedingValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for exceedingValue") + } + _exceedingValueErr := writeBuffer.WriteSerializable(ctx, m.GetExceedingValue()) + if popErr := writeBuffer.PopContext("exceedingValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for exceedingValue") + } + if _exceedingValueErr != nil { + return errors.Wrap(_exceedingValueErr, "Error serializing 'exceedingValue' field") + } - // Simple Field (statusFlags) - if pushErr := writeBuffer.PushContext("statusFlags"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for statusFlags") - } - _statusFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetStatusFlags()) - if popErr := writeBuffer.PopContext("statusFlags"); popErr != nil { - return errors.Wrap(popErr, "Error popping for statusFlags") - } - if _statusFlagsErr != nil { - return errors.Wrap(_statusFlagsErr, "Error serializing 'statusFlags' field") - } + // Simple Field (statusFlags) + if pushErr := writeBuffer.PushContext("statusFlags"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for statusFlags") + } + _statusFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetStatusFlags()) + if popErr := writeBuffer.PopContext("statusFlags"); popErr != nil { + return errors.Wrap(popErr, "Error popping for statusFlags") + } + if _statusFlagsErr != nil { + return errors.Wrap(_statusFlagsErr, "Error serializing 'statusFlags' field") + } - // Simple Field (deadband) - if pushErr := writeBuffer.PushContext("deadband"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for deadband") - } - _deadbandErr := writeBuffer.WriteSerializable(ctx, m.GetDeadband()) - if popErr := writeBuffer.PopContext("deadband"); popErr != nil { - return errors.Wrap(popErr, "Error popping for deadband") - } - if _deadbandErr != nil { - return errors.Wrap(_deadbandErr, "Error serializing 'deadband' field") - } + // Simple Field (deadband) + if pushErr := writeBuffer.PushContext("deadband"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for deadband") + } + _deadbandErr := writeBuffer.WriteSerializable(ctx, m.GetDeadband()) + if popErr := writeBuffer.PopContext("deadband"); popErr != nil { + return errors.Wrap(popErr, "Error popping for deadband") + } + if _deadbandErr != nil { + return errors.Wrap(_deadbandErr, "Error serializing 'deadband' field") + } - // Simple Field (exceededLimit) - if pushErr := writeBuffer.PushContext("exceededLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for exceededLimit") - } - _exceededLimitErr := writeBuffer.WriteSerializable(ctx, m.GetExceededLimit()) - if popErr := writeBuffer.PopContext("exceededLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for exceededLimit") - } - if _exceededLimitErr != nil { - return errors.Wrap(_exceededLimitErr, "Error serializing 'exceededLimit' field") - } + // Simple Field (exceededLimit) + if pushErr := writeBuffer.PushContext("exceededLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for exceededLimit") + } + _exceededLimitErr := writeBuffer.WriteSerializable(ctx, m.GetExceededLimit()) + if popErr := writeBuffer.PopContext("exceededLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for exceededLimit") + } + if _exceededLimitErr != nil { + return errors.Wrap(_exceededLimitErr, "Error serializing 'exceededLimit' field") + } - // Simple Field (innerClosingTag) - if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerClosingTag") - } - _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) - if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerClosingTag") - } - if _innerClosingTagErr != nil { - return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") - } + // Simple Field (innerClosingTag) + if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerClosingTag") + } + _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) + if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerClosingTag") + } + if _innerClosingTagErr != nil { + return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") + } if popErr := writeBuffer.PopContext("BACnetNotificationParametersSignedOutOfRange"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetNotificationParametersSignedOutOfRange") @@ -384,6 +388,7 @@ func (m *_BACnetNotificationParametersSignedOutOfRange) SerializeWithWriteBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetNotificationParametersSignedOutOfRange) isBACnetNotificationParametersSignedOutOfRange() bool { return true } @@ -398,3 +403,6 @@ func (m *_BACnetNotificationParametersSignedOutOfRange) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersUnsignedOutOfRange.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersUnsignedOutOfRange.go index 374591bc0f2..2468131701a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersUnsignedOutOfRange.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersUnsignedOutOfRange.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNotificationParametersUnsignedOutOfRange is the corresponding interface of BACnetNotificationParametersUnsignedOutOfRange type BACnetNotificationParametersUnsignedOutOfRange interface { @@ -56,14 +58,16 @@ type BACnetNotificationParametersUnsignedOutOfRangeExactly interface { // _BACnetNotificationParametersUnsignedOutOfRange is the data-structure of this message type _BACnetNotificationParametersUnsignedOutOfRange struct { *_BACnetNotificationParameters - InnerOpeningTag BACnetOpeningTag - ExceedingValue BACnetContextTagUnsignedInteger - StatusFlags BACnetStatusFlagsTagged - Deadband BACnetContextTagUnsignedInteger - ExceededLimit BACnetContextTagUnsignedInteger - InnerClosingTag BACnetClosingTag + InnerOpeningTag BACnetOpeningTag + ExceedingValue BACnetContextTagUnsignedInteger + StatusFlags BACnetStatusFlagsTagged + Deadband BACnetContextTagUnsignedInteger + ExceededLimit BACnetContextTagUnsignedInteger + InnerClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -74,16 +78,14 @@ type _BACnetNotificationParametersUnsignedOutOfRange struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetNotificationParametersUnsignedOutOfRange) InitializeParent(parent BACnetNotificationParameters, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetNotificationParametersUnsignedOutOfRange) InitializeParent(parent BACnetNotificationParameters , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetNotificationParametersUnsignedOutOfRange) GetParent() BACnetNotificationParameters { +func (m *_BACnetNotificationParametersUnsignedOutOfRange) GetParent() BACnetNotificationParameters { return m._BACnetNotificationParameters } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -118,16 +120,17 @@ func (m *_BACnetNotificationParametersUnsignedOutOfRange) GetInnerClosingTag() B /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNotificationParametersUnsignedOutOfRange factory function for _BACnetNotificationParametersUnsignedOutOfRange -func NewBACnetNotificationParametersUnsignedOutOfRange(innerOpeningTag BACnetOpeningTag, exceedingValue BACnetContextTagUnsignedInteger, statusFlags BACnetStatusFlagsTagged, deadband BACnetContextTagUnsignedInteger, exceededLimit BACnetContextTagUnsignedInteger, innerClosingTag BACnetClosingTag, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, objectTypeArgument BACnetObjectType) *_BACnetNotificationParametersUnsignedOutOfRange { +func NewBACnetNotificationParametersUnsignedOutOfRange( innerOpeningTag BACnetOpeningTag , exceedingValue BACnetContextTagUnsignedInteger , statusFlags BACnetStatusFlagsTagged , deadband BACnetContextTagUnsignedInteger , exceededLimit BACnetContextTagUnsignedInteger , innerClosingTag BACnetClosingTag , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , objectTypeArgument BACnetObjectType ) *_BACnetNotificationParametersUnsignedOutOfRange { _result := &_BACnetNotificationParametersUnsignedOutOfRange{ - InnerOpeningTag: innerOpeningTag, - ExceedingValue: exceedingValue, - StatusFlags: statusFlags, - Deadband: deadband, - ExceededLimit: exceededLimit, - InnerClosingTag: innerClosingTag, - _BACnetNotificationParameters: NewBACnetNotificationParameters(openingTag, peekedTagHeader, closingTag, tagNumber, objectTypeArgument), + InnerOpeningTag: innerOpeningTag, + ExceedingValue: exceedingValue, + StatusFlags: statusFlags, + Deadband: deadband, + ExceededLimit: exceededLimit, + InnerClosingTag: innerClosingTag, + _BACnetNotificationParameters: NewBACnetNotificationParameters(openingTag, peekedTagHeader, closingTag, tagNumber, objectTypeArgument), } _result._BACnetNotificationParameters._BACnetNotificationParametersChildRequirements = _result return _result @@ -135,7 +138,7 @@ func NewBACnetNotificationParametersUnsignedOutOfRange(innerOpeningTag BACnetOpe // Deprecated: use the interface for direct cast func CastBACnetNotificationParametersUnsignedOutOfRange(structType interface{}) BACnetNotificationParametersUnsignedOutOfRange { - if casted, ok := structType.(BACnetNotificationParametersUnsignedOutOfRange); ok { + if casted, ok := structType.(BACnetNotificationParametersUnsignedOutOfRange); ok { return casted } if casted, ok := structType.(*BACnetNotificationParametersUnsignedOutOfRange); ok { @@ -172,6 +175,7 @@ func (m *_BACnetNotificationParametersUnsignedOutOfRange) GetLengthInBits(ctx co return lengthInBits } + func (m *_BACnetNotificationParametersUnsignedOutOfRange) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -193,7 +197,7 @@ func BACnetNotificationParametersUnsignedOutOfRangeParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("innerOpeningTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerOpeningTag") } - _innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber)) +_innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) ) if _innerOpeningTagErr != nil { return nil, errors.Wrap(_innerOpeningTagErr, "Error parsing 'innerOpeningTag' field of BACnetNotificationParametersUnsignedOutOfRange") } @@ -206,7 +210,7 @@ func BACnetNotificationParametersUnsignedOutOfRangeParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("exceedingValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for exceedingValue") } - _exceedingValue, _exceedingValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_exceedingValue, _exceedingValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _exceedingValueErr != nil { return nil, errors.Wrap(_exceedingValueErr, "Error parsing 'exceedingValue' field of BACnetNotificationParametersUnsignedOutOfRange") } @@ -219,7 +223,7 @@ func BACnetNotificationParametersUnsignedOutOfRangeParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("statusFlags"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for statusFlags") } - _statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _statusFlagsErr != nil { return nil, errors.Wrap(_statusFlagsErr, "Error parsing 'statusFlags' field of BACnetNotificationParametersUnsignedOutOfRange") } @@ -232,7 +236,7 @@ func BACnetNotificationParametersUnsignedOutOfRangeParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("deadband"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for deadband") } - _deadband, _deadbandErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_deadband, _deadbandErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _deadbandErr != nil { return nil, errors.Wrap(_deadbandErr, "Error parsing 'deadband' field of BACnetNotificationParametersUnsignedOutOfRange") } @@ -245,7 +249,7 @@ func BACnetNotificationParametersUnsignedOutOfRangeParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("exceededLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for exceededLimit") } - _exceededLimit, _exceededLimitErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(3)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_exceededLimit, _exceededLimitErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(3) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _exceededLimitErr != nil { return nil, errors.Wrap(_exceededLimitErr, "Error parsing 'exceededLimit' field of BACnetNotificationParametersUnsignedOutOfRange") } @@ -258,7 +262,7 @@ func BACnetNotificationParametersUnsignedOutOfRangeParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("innerClosingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerClosingTag") } - _innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber)) +_innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) ) if _innerClosingTagErr != nil { return nil, errors.Wrap(_innerClosingTagErr, "Error parsing 'innerClosingTag' field of BACnetNotificationParametersUnsignedOutOfRange") } @@ -274,14 +278,14 @@ func BACnetNotificationParametersUnsignedOutOfRangeParseWithBuffer(ctx context.C // Create a partially initialized instance _child := &_BACnetNotificationParametersUnsignedOutOfRange{ _BACnetNotificationParameters: &_BACnetNotificationParameters{ - TagNumber: tagNumber, + TagNumber: tagNumber, ObjectTypeArgument: objectTypeArgument, }, InnerOpeningTag: innerOpeningTag, - ExceedingValue: exceedingValue, - StatusFlags: statusFlags, - Deadband: deadband, - ExceededLimit: exceededLimit, + ExceedingValue: exceedingValue, + StatusFlags: statusFlags, + Deadband: deadband, + ExceededLimit: exceededLimit, InnerClosingTag: innerClosingTag, } _child._BACnetNotificationParameters._BACnetNotificationParametersChildRequirements = _child @@ -304,77 +308,77 @@ func (m *_BACnetNotificationParametersUnsignedOutOfRange) SerializeWithWriteBuff return errors.Wrap(pushErr, "Error pushing for BACnetNotificationParametersUnsignedOutOfRange") } - // Simple Field (innerOpeningTag) - if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") - } - _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) - if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerOpeningTag") - } - if _innerOpeningTagErr != nil { - return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") - } + // Simple Field (innerOpeningTag) + if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") + } + _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) + if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerOpeningTag") + } + if _innerOpeningTagErr != nil { + return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") + } - // Simple Field (exceedingValue) - if pushErr := writeBuffer.PushContext("exceedingValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for exceedingValue") - } - _exceedingValueErr := writeBuffer.WriteSerializable(ctx, m.GetExceedingValue()) - if popErr := writeBuffer.PopContext("exceedingValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for exceedingValue") - } - if _exceedingValueErr != nil { - return errors.Wrap(_exceedingValueErr, "Error serializing 'exceedingValue' field") - } + // Simple Field (exceedingValue) + if pushErr := writeBuffer.PushContext("exceedingValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for exceedingValue") + } + _exceedingValueErr := writeBuffer.WriteSerializable(ctx, m.GetExceedingValue()) + if popErr := writeBuffer.PopContext("exceedingValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for exceedingValue") + } + if _exceedingValueErr != nil { + return errors.Wrap(_exceedingValueErr, "Error serializing 'exceedingValue' field") + } - // Simple Field (statusFlags) - if pushErr := writeBuffer.PushContext("statusFlags"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for statusFlags") - } - _statusFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetStatusFlags()) - if popErr := writeBuffer.PopContext("statusFlags"); popErr != nil { - return errors.Wrap(popErr, "Error popping for statusFlags") - } - if _statusFlagsErr != nil { - return errors.Wrap(_statusFlagsErr, "Error serializing 'statusFlags' field") - } + // Simple Field (statusFlags) + if pushErr := writeBuffer.PushContext("statusFlags"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for statusFlags") + } + _statusFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetStatusFlags()) + if popErr := writeBuffer.PopContext("statusFlags"); popErr != nil { + return errors.Wrap(popErr, "Error popping for statusFlags") + } + if _statusFlagsErr != nil { + return errors.Wrap(_statusFlagsErr, "Error serializing 'statusFlags' field") + } - // Simple Field (deadband) - if pushErr := writeBuffer.PushContext("deadband"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for deadband") - } - _deadbandErr := writeBuffer.WriteSerializable(ctx, m.GetDeadband()) - if popErr := writeBuffer.PopContext("deadband"); popErr != nil { - return errors.Wrap(popErr, "Error popping for deadband") - } - if _deadbandErr != nil { - return errors.Wrap(_deadbandErr, "Error serializing 'deadband' field") - } + // Simple Field (deadband) + if pushErr := writeBuffer.PushContext("deadband"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for deadband") + } + _deadbandErr := writeBuffer.WriteSerializable(ctx, m.GetDeadband()) + if popErr := writeBuffer.PopContext("deadband"); popErr != nil { + return errors.Wrap(popErr, "Error popping for deadband") + } + if _deadbandErr != nil { + return errors.Wrap(_deadbandErr, "Error serializing 'deadband' field") + } - // Simple Field (exceededLimit) - if pushErr := writeBuffer.PushContext("exceededLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for exceededLimit") - } - _exceededLimitErr := writeBuffer.WriteSerializable(ctx, m.GetExceededLimit()) - if popErr := writeBuffer.PopContext("exceededLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for exceededLimit") - } - if _exceededLimitErr != nil { - return errors.Wrap(_exceededLimitErr, "Error serializing 'exceededLimit' field") - } + // Simple Field (exceededLimit) + if pushErr := writeBuffer.PushContext("exceededLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for exceededLimit") + } + _exceededLimitErr := writeBuffer.WriteSerializable(ctx, m.GetExceededLimit()) + if popErr := writeBuffer.PopContext("exceededLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for exceededLimit") + } + if _exceededLimitErr != nil { + return errors.Wrap(_exceededLimitErr, "Error serializing 'exceededLimit' field") + } - // Simple Field (innerClosingTag) - if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerClosingTag") - } - _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) - if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerClosingTag") - } - if _innerClosingTagErr != nil { - return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") - } + // Simple Field (innerClosingTag) + if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerClosingTag") + } + _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) + if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerClosingTag") + } + if _innerClosingTagErr != nil { + return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") + } if popErr := writeBuffer.PopContext("BACnetNotificationParametersUnsignedOutOfRange"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetNotificationParametersUnsignedOutOfRange") @@ -384,6 +388,7 @@ func (m *_BACnetNotificationParametersUnsignedOutOfRange) SerializeWithWriteBuff return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetNotificationParametersUnsignedOutOfRange) isBACnetNotificationParametersUnsignedOutOfRange() bool { return true } @@ -398,3 +403,6 @@ func (m *_BACnetNotificationParametersUnsignedOutOfRange) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersUnsignedRange.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersUnsignedRange.go index cb9f7f56460..6c6f3bebf68 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersUnsignedRange.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersUnsignedRange.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNotificationParametersUnsignedRange is the corresponding interface of BACnetNotificationParametersUnsignedRange type BACnetNotificationParametersUnsignedRange interface { @@ -54,13 +56,15 @@ type BACnetNotificationParametersUnsignedRangeExactly interface { // _BACnetNotificationParametersUnsignedRange is the data-structure of this message type _BACnetNotificationParametersUnsignedRange struct { *_BACnetNotificationParameters - InnerOpeningTag BACnetOpeningTag - SequenceNumber BACnetContextTagUnsignedInteger - StatusFlags BACnetStatusFlagsTagged - ExceededLimit BACnetContextTagUnsignedInteger - InnerClosingTag BACnetClosingTag + InnerOpeningTag BACnetOpeningTag + SequenceNumber BACnetContextTagUnsignedInteger + StatusFlags BACnetStatusFlagsTagged + ExceededLimit BACnetContextTagUnsignedInteger + InnerClosingTag BACnetClosingTag } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -71,16 +75,14 @@ type _BACnetNotificationParametersUnsignedRange struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetNotificationParametersUnsignedRange) InitializeParent(parent BACnetNotificationParameters, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag) { - m.OpeningTag = openingTag +func (m *_BACnetNotificationParametersUnsignedRange) InitializeParent(parent BACnetNotificationParameters , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag ) { m.OpeningTag = openingTag m.PeekedTagHeader = peekedTagHeader m.ClosingTag = closingTag } -func (m *_BACnetNotificationParametersUnsignedRange) GetParent() BACnetNotificationParameters { +func (m *_BACnetNotificationParametersUnsignedRange) GetParent() BACnetNotificationParameters { return m._BACnetNotificationParameters } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -111,15 +113,16 @@ func (m *_BACnetNotificationParametersUnsignedRange) GetInnerClosingTag() BACnet /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNotificationParametersUnsignedRange factory function for _BACnetNotificationParametersUnsignedRange -func NewBACnetNotificationParametersUnsignedRange(innerOpeningTag BACnetOpeningTag, sequenceNumber BACnetContextTagUnsignedInteger, statusFlags BACnetStatusFlagsTagged, exceededLimit BACnetContextTagUnsignedInteger, innerClosingTag BACnetClosingTag, openingTag BACnetOpeningTag, peekedTagHeader BACnetTagHeader, closingTag BACnetClosingTag, tagNumber uint8, objectTypeArgument BACnetObjectType) *_BACnetNotificationParametersUnsignedRange { +func NewBACnetNotificationParametersUnsignedRange( innerOpeningTag BACnetOpeningTag , sequenceNumber BACnetContextTagUnsignedInteger , statusFlags BACnetStatusFlagsTagged , exceededLimit BACnetContextTagUnsignedInteger , innerClosingTag BACnetClosingTag , openingTag BACnetOpeningTag , peekedTagHeader BACnetTagHeader , closingTag BACnetClosingTag , tagNumber uint8 , objectTypeArgument BACnetObjectType ) *_BACnetNotificationParametersUnsignedRange { _result := &_BACnetNotificationParametersUnsignedRange{ - InnerOpeningTag: innerOpeningTag, - SequenceNumber: sequenceNumber, - StatusFlags: statusFlags, - ExceededLimit: exceededLimit, - InnerClosingTag: innerClosingTag, - _BACnetNotificationParameters: NewBACnetNotificationParameters(openingTag, peekedTagHeader, closingTag, tagNumber, objectTypeArgument), + InnerOpeningTag: innerOpeningTag, + SequenceNumber: sequenceNumber, + StatusFlags: statusFlags, + ExceededLimit: exceededLimit, + InnerClosingTag: innerClosingTag, + _BACnetNotificationParameters: NewBACnetNotificationParameters(openingTag, peekedTagHeader, closingTag, tagNumber, objectTypeArgument), } _result._BACnetNotificationParameters._BACnetNotificationParametersChildRequirements = _result return _result @@ -127,7 +130,7 @@ func NewBACnetNotificationParametersUnsignedRange(innerOpeningTag BACnetOpeningT // Deprecated: use the interface for direct cast func CastBACnetNotificationParametersUnsignedRange(structType interface{}) BACnetNotificationParametersUnsignedRange { - if casted, ok := structType.(BACnetNotificationParametersUnsignedRange); ok { + if casted, ok := structType.(BACnetNotificationParametersUnsignedRange); ok { return casted } if casted, ok := structType.(*BACnetNotificationParametersUnsignedRange); ok { @@ -161,6 +164,7 @@ func (m *_BACnetNotificationParametersUnsignedRange) GetLengthInBits(ctx context return lengthInBits } + func (m *_BACnetNotificationParametersUnsignedRange) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -182,7 +186,7 @@ func BACnetNotificationParametersUnsignedRangeParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("innerOpeningTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerOpeningTag") } - _innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber)) +_innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) ) if _innerOpeningTagErr != nil { return nil, errors.Wrap(_innerOpeningTagErr, "Error parsing 'innerOpeningTag' field of BACnetNotificationParametersUnsignedRange") } @@ -195,7 +199,7 @@ func BACnetNotificationParametersUnsignedRangeParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("sequenceNumber"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for sequenceNumber") } - _sequenceNumber, _sequenceNumberErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_sequenceNumber, _sequenceNumberErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _sequenceNumberErr != nil { return nil, errors.Wrap(_sequenceNumberErr, "Error parsing 'sequenceNumber' field of BACnetNotificationParametersUnsignedRange") } @@ -208,7 +212,7 @@ func BACnetNotificationParametersUnsignedRangeParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("statusFlags"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for statusFlags") } - _statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _statusFlagsErr != nil { return nil, errors.Wrap(_statusFlagsErr, "Error parsing 'statusFlags' field of BACnetNotificationParametersUnsignedRange") } @@ -221,7 +225,7 @@ func BACnetNotificationParametersUnsignedRangeParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("exceededLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for exceededLimit") } - _exceededLimit, _exceededLimitErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_exceededLimit, _exceededLimitErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _exceededLimitErr != nil { return nil, errors.Wrap(_exceededLimitErr, "Error parsing 'exceededLimit' field of BACnetNotificationParametersUnsignedRange") } @@ -234,7 +238,7 @@ func BACnetNotificationParametersUnsignedRangeParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("innerClosingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerClosingTag") } - _innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber)) +_innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) ) if _innerClosingTagErr != nil { return nil, errors.Wrap(_innerClosingTagErr, "Error parsing 'innerClosingTag' field of BACnetNotificationParametersUnsignedRange") } @@ -250,13 +254,13 @@ func BACnetNotificationParametersUnsignedRangeParseWithBuffer(ctx context.Contex // Create a partially initialized instance _child := &_BACnetNotificationParametersUnsignedRange{ _BACnetNotificationParameters: &_BACnetNotificationParameters{ - TagNumber: tagNumber, + TagNumber: tagNumber, ObjectTypeArgument: objectTypeArgument, }, InnerOpeningTag: innerOpeningTag, - SequenceNumber: sequenceNumber, - StatusFlags: statusFlags, - ExceededLimit: exceededLimit, + SequenceNumber: sequenceNumber, + StatusFlags: statusFlags, + ExceededLimit: exceededLimit, InnerClosingTag: innerClosingTag, } _child._BACnetNotificationParameters._BACnetNotificationParametersChildRequirements = _child @@ -279,65 +283,65 @@ func (m *_BACnetNotificationParametersUnsignedRange) SerializeWithWriteBuffer(ct return errors.Wrap(pushErr, "Error pushing for BACnetNotificationParametersUnsignedRange") } - // Simple Field (innerOpeningTag) - if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") - } - _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) - if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerOpeningTag") - } - if _innerOpeningTagErr != nil { - return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") - } + // Simple Field (innerOpeningTag) + if pushErr := writeBuffer.PushContext("innerOpeningTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerOpeningTag") + } + _innerOpeningTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerOpeningTag()) + if popErr := writeBuffer.PopContext("innerOpeningTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerOpeningTag") + } + if _innerOpeningTagErr != nil { + return errors.Wrap(_innerOpeningTagErr, "Error serializing 'innerOpeningTag' field") + } - // Simple Field (sequenceNumber) - if pushErr := writeBuffer.PushContext("sequenceNumber"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for sequenceNumber") - } - _sequenceNumberErr := writeBuffer.WriteSerializable(ctx, m.GetSequenceNumber()) - if popErr := writeBuffer.PopContext("sequenceNumber"); popErr != nil { - return errors.Wrap(popErr, "Error popping for sequenceNumber") - } - if _sequenceNumberErr != nil { - return errors.Wrap(_sequenceNumberErr, "Error serializing 'sequenceNumber' field") - } + // Simple Field (sequenceNumber) + if pushErr := writeBuffer.PushContext("sequenceNumber"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for sequenceNumber") + } + _sequenceNumberErr := writeBuffer.WriteSerializable(ctx, m.GetSequenceNumber()) + if popErr := writeBuffer.PopContext("sequenceNumber"); popErr != nil { + return errors.Wrap(popErr, "Error popping for sequenceNumber") + } + if _sequenceNumberErr != nil { + return errors.Wrap(_sequenceNumberErr, "Error serializing 'sequenceNumber' field") + } - // Simple Field (statusFlags) - if pushErr := writeBuffer.PushContext("statusFlags"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for statusFlags") - } - _statusFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetStatusFlags()) - if popErr := writeBuffer.PopContext("statusFlags"); popErr != nil { - return errors.Wrap(popErr, "Error popping for statusFlags") - } - if _statusFlagsErr != nil { - return errors.Wrap(_statusFlagsErr, "Error serializing 'statusFlags' field") - } + // Simple Field (statusFlags) + if pushErr := writeBuffer.PushContext("statusFlags"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for statusFlags") + } + _statusFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetStatusFlags()) + if popErr := writeBuffer.PopContext("statusFlags"); popErr != nil { + return errors.Wrap(popErr, "Error popping for statusFlags") + } + if _statusFlagsErr != nil { + return errors.Wrap(_statusFlagsErr, "Error serializing 'statusFlags' field") + } - // Simple Field (exceededLimit) - if pushErr := writeBuffer.PushContext("exceededLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for exceededLimit") - } - _exceededLimitErr := writeBuffer.WriteSerializable(ctx, m.GetExceededLimit()) - if popErr := writeBuffer.PopContext("exceededLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for exceededLimit") - } - if _exceededLimitErr != nil { - return errors.Wrap(_exceededLimitErr, "Error serializing 'exceededLimit' field") - } + // Simple Field (exceededLimit) + if pushErr := writeBuffer.PushContext("exceededLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for exceededLimit") + } + _exceededLimitErr := writeBuffer.WriteSerializable(ctx, m.GetExceededLimit()) + if popErr := writeBuffer.PopContext("exceededLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for exceededLimit") + } + if _exceededLimitErr != nil { + return errors.Wrap(_exceededLimitErr, "Error serializing 'exceededLimit' field") + } - // Simple Field (innerClosingTag) - if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for innerClosingTag") - } - _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) - if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for innerClosingTag") - } - if _innerClosingTagErr != nil { - return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") - } + // Simple Field (innerClosingTag) + if pushErr := writeBuffer.PushContext("innerClosingTag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for innerClosingTag") + } + _innerClosingTagErr := writeBuffer.WriteSerializable(ctx, m.GetInnerClosingTag()) + if popErr := writeBuffer.PopContext("innerClosingTag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for innerClosingTag") + } + if _innerClosingTagErr != nil { + return errors.Wrap(_innerClosingTagErr, "Error serializing 'innerClosingTag' field") + } if popErr := writeBuffer.PopContext("BACnetNotificationParametersUnsignedRange"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetNotificationParametersUnsignedRange") @@ -347,6 +351,7 @@ func (m *_BACnetNotificationParametersUnsignedRange) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetNotificationParametersUnsignedRange) isBACnetNotificationParametersUnsignedRange() bool { return true } @@ -361,3 +366,6 @@ func (m *_BACnetNotificationParametersUnsignedRange) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotifyType.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotifyType.go index 364e3146563..a4b14d8e80f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotifyType.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotifyType.go @@ -34,9 +34,9 @@ type IBACnetNotifyType interface { utils.Serializable } -const ( - BACnetNotifyType_ALARM BACnetNotifyType = 0x0 - BACnetNotifyType_EVENT BACnetNotifyType = 0x1 +const( + BACnetNotifyType_ALARM BACnetNotifyType = 0x0 + BACnetNotifyType_EVENT BACnetNotifyType = 0x1 BACnetNotifyType_ACK_NOTIFICATION BACnetNotifyType = 0x2 ) @@ -44,7 +44,7 @@ var BACnetNotifyTypeValues []BACnetNotifyType func init() { _ = errors.New - BACnetNotifyTypeValues = []BACnetNotifyType{ + BACnetNotifyTypeValues = []BACnetNotifyType { BACnetNotifyType_ALARM, BACnetNotifyType_EVENT, BACnetNotifyType_ACK_NOTIFICATION, @@ -53,12 +53,12 @@ func init() { func BACnetNotifyTypeByValue(value uint8) (enum BACnetNotifyType, ok bool) { switch value { - case 0x0: - return BACnetNotifyType_ALARM, true - case 0x1: - return BACnetNotifyType_EVENT, true - case 0x2: - return BACnetNotifyType_ACK_NOTIFICATION, true + case 0x0: + return BACnetNotifyType_ALARM, true + case 0x1: + return BACnetNotifyType_EVENT, true + case 0x2: + return BACnetNotifyType_ACK_NOTIFICATION, true } return 0, false } @@ -75,13 +75,13 @@ func BACnetNotifyTypeByName(value string) (enum BACnetNotifyType, ok bool) { return 0, false } -func BACnetNotifyTypeKnows(value uint8) bool { +func BACnetNotifyTypeKnows(value uint8) bool { for _, typeValue := range BACnetNotifyTypeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetNotifyType(structType interface{}) BACnetNotifyType { @@ -147,3 +147,4 @@ func (e BACnetNotifyType) PLC4XEnumName() string { func (e BACnetNotifyType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotifyTypeTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotifyTypeTagged.go index 24d08d1036c..64bcc6b0244 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotifyTypeTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotifyTypeTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetNotifyTypeTagged is the corresponding interface of BACnetNotifyTypeTagged type BACnetNotifyTypeTagged interface { @@ -46,14 +48,15 @@ type BACnetNotifyTypeTaggedExactly interface { // _BACnetNotifyTypeTagged is the data-structure of this message type _BACnetNotifyTypeTagged struct { - Header BACnetTagHeader - Value BACnetNotifyType + Header BACnetTagHeader + Value BACnetNotifyType // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_BACnetNotifyTypeTagged) GetValue() BACnetNotifyType { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetNotifyTypeTagged factory function for _BACnetNotifyTypeTagged -func NewBACnetNotifyTypeTagged(header BACnetTagHeader, value BACnetNotifyType, tagNumber uint8, tagClass TagClass) *_BACnetNotifyTypeTagged { - return &_BACnetNotifyTypeTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetNotifyTypeTagged( header BACnetTagHeader , value BACnetNotifyType , tagNumber uint8 , tagClass TagClass ) *_BACnetNotifyTypeTagged { +return &_BACnetNotifyTypeTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetNotifyTypeTagged(structType interface{}) BACnetNotifyTypeTagged { - if casted, ok := structType.(BACnetNotifyTypeTagged); ok { + if casted, ok := structType.(BACnetNotifyTypeTagged); ok { return casted } if casted, ok := structType.(*BACnetNotifyTypeTagged); ok { @@ -104,6 +108,7 @@ func (m *_BACnetNotifyTypeTagged) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetNotifyTypeTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func BACnetNotifyTypeTaggedParseWithBuffer(ctx context.Context, readBuffer utils if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetNotifyTypeTagged") } @@ -135,12 +140,12 @@ func BACnetNotifyTypeTaggedParseWithBuffer(ctx context.Context, readBuffer utils } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func BACnetNotifyTypeTaggedParseWithBuffer(ctx context.Context, readBuffer utils } var value BACnetNotifyType if _value != nil { - value = _value.(BACnetNotifyType) + value = _value.(BACnetNotifyType) } if closeErr := readBuffer.CloseContext("BACnetNotifyTypeTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func BACnetNotifyTypeTaggedParseWithBuffer(ctx context.Context, readBuffer utils // Create the instance return &_BACnetNotifyTypeTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_BACnetNotifyTypeTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_BACnetNotifyTypeTagged) Serialize() ([]byte, error) { func (m *_BACnetNotifyTypeTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetNotifyTypeTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetNotifyTypeTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetNotifyTypeTagged") } @@ -206,6 +211,7 @@ func (m *_BACnetNotifyTypeTagged) SerializeWithWriteBuffer(ctx context.Context, return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_BACnetNotifyTypeTagged) GetTagNumber() uint8 { func (m *_BACnetNotifyTypeTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_BACnetNotifyTypeTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetObjectPropertyReference.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetObjectPropertyReference.go index a6663031e22..039d4e19423 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetObjectPropertyReference.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetObjectPropertyReference.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetObjectPropertyReference is the corresponding interface of BACnetObjectPropertyReference type BACnetObjectPropertyReference interface { @@ -49,11 +51,12 @@ type BACnetObjectPropertyReferenceExactly interface { // _BACnetObjectPropertyReference is the data-structure of this message type _BACnetObjectPropertyReference struct { - ObjectIdentifier BACnetContextTagObjectIdentifier - PropertyIdentifier BACnetPropertyIdentifierTagged - ArrayIndex BACnetContextTagUnsignedInteger + ObjectIdentifier BACnetContextTagObjectIdentifier + PropertyIdentifier BACnetPropertyIdentifierTagged + ArrayIndex BACnetContextTagUnsignedInteger } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -76,14 +79,15 @@ func (m *_BACnetObjectPropertyReference) GetArrayIndex() BACnetContextTagUnsigne /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetObjectPropertyReference factory function for _BACnetObjectPropertyReference -func NewBACnetObjectPropertyReference(objectIdentifier BACnetContextTagObjectIdentifier, propertyIdentifier BACnetPropertyIdentifierTagged, arrayIndex BACnetContextTagUnsignedInteger) *_BACnetObjectPropertyReference { - return &_BACnetObjectPropertyReference{ObjectIdentifier: objectIdentifier, PropertyIdentifier: propertyIdentifier, ArrayIndex: arrayIndex} +func NewBACnetObjectPropertyReference( objectIdentifier BACnetContextTagObjectIdentifier , propertyIdentifier BACnetPropertyIdentifierTagged , arrayIndex BACnetContextTagUnsignedInteger ) *_BACnetObjectPropertyReference { +return &_BACnetObjectPropertyReference{ ObjectIdentifier: objectIdentifier , PropertyIdentifier: propertyIdentifier , ArrayIndex: arrayIndex } } // Deprecated: use the interface for direct cast func CastBACnetObjectPropertyReference(structType interface{}) BACnetObjectPropertyReference { - if casted, ok := structType.(BACnetObjectPropertyReference); ok { + if casted, ok := structType.(BACnetObjectPropertyReference); ok { return casted } if casted, ok := structType.(*BACnetObjectPropertyReference); ok { @@ -113,6 +117,7 @@ func (m *_BACnetObjectPropertyReference) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetObjectPropertyReference) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -134,7 +139,7 @@ func BACnetObjectPropertyReferenceParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("objectIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for objectIdentifier") } - _objectIdentifier, _objectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER)) +_objectIdentifier, _objectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_BACNET_OBJECT_IDENTIFIER ) ) if _objectIdentifierErr != nil { return nil, errors.Wrap(_objectIdentifierErr, "Error parsing 'objectIdentifier' field of BACnetObjectPropertyReference") } @@ -147,7 +152,7 @@ func BACnetObjectPropertyReferenceParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("propertyIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for propertyIdentifier") } - _propertyIdentifier, _propertyIdentifierErr := BACnetPropertyIdentifierTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_propertyIdentifier, _propertyIdentifierErr := BACnetPropertyIdentifierTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _propertyIdentifierErr != nil { return nil, errors.Wrap(_propertyIdentifierErr, "Error parsing 'propertyIdentifier' field of BACnetObjectPropertyReference") } @@ -158,12 +163,12 @@ func BACnetObjectPropertyReferenceParseWithBuffer(ctx context.Context, readBuffe // Optional Field (arrayIndex) (Can be skipped, if a given expression evaluates to false) var arrayIndex BACnetContextTagUnsignedInteger = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("arrayIndex"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for arrayIndex") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(2), BACnetDataType_UNSIGNED_INTEGER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(2) , BACnetDataType_UNSIGNED_INTEGER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -184,10 +189,10 @@ func BACnetObjectPropertyReferenceParseWithBuffer(ctx context.Context, readBuffe // Create the instance return &_BACnetObjectPropertyReference{ - ObjectIdentifier: objectIdentifier, - PropertyIdentifier: propertyIdentifier, - ArrayIndex: arrayIndex, - }, nil + ObjectIdentifier: objectIdentifier, + PropertyIdentifier: propertyIdentifier, + ArrayIndex: arrayIndex, + }, nil } func (m *_BACnetObjectPropertyReference) Serialize() ([]byte, error) { @@ -201,7 +206,7 @@ func (m *_BACnetObjectPropertyReference) Serialize() ([]byte, error) { func (m *_BACnetObjectPropertyReference) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetObjectPropertyReference"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetObjectPropertyReference"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetObjectPropertyReference") } @@ -251,6 +256,7 @@ func (m *_BACnetObjectPropertyReference) SerializeWithWriteBuffer(ctx context.Co return nil } + func (m *_BACnetObjectPropertyReference) isBACnetObjectPropertyReference() bool { return true } @@ -265,3 +271,6 @@ func (m *_BACnetObjectPropertyReference) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetObjectPropertyReferenceEnclosed.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetObjectPropertyReferenceEnclosed.go index 1f7b590fc1e..6b16f39fc8c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetObjectPropertyReferenceEnclosed.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetObjectPropertyReferenceEnclosed.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetObjectPropertyReferenceEnclosed is the corresponding interface of BACnetObjectPropertyReferenceEnclosed type BACnetObjectPropertyReferenceEnclosed interface { @@ -48,14 +50,15 @@ type BACnetObjectPropertyReferenceEnclosedExactly interface { // _BACnetObjectPropertyReferenceEnclosed is the data-structure of this message type _BACnetObjectPropertyReferenceEnclosed struct { - OpeningTag BACnetOpeningTag - ObjectPropertyReference BACnetObjectPropertyReference - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + ObjectPropertyReference BACnetObjectPropertyReference + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -78,14 +81,15 @@ func (m *_BACnetObjectPropertyReferenceEnclosed) GetClosingTag() BACnetClosingTa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetObjectPropertyReferenceEnclosed factory function for _BACnetObjectPropertyReferenceEnclosed -func NewBACnetObjectPropertyReferenceEnclosed(openingTag BACnetOpeningTag, objectPropertyReference BACnetObjectPropertyReference, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetObjectPropertyReferenceEnclosed { - return &_BACnetObjectPropertyReferenceEnclosed{OpeningTag: openingTag, ObjectPropertyReference: objectPropertyReference, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetObjectPropertyReferenceEnclosed( openingTag BACnetOpeningTag , objectPropertyReference BACnetObjectPropertyReference , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetObjectPropertyReferenceEnclosed { +return &_BACnetObjectPropertyReferenceEnclosed{ OpeningTag: openingTag , ObjectPropertyReference: objectPropertyReference , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetObjectPropertyReferenceEnclosed(structType interface{}) BACnetObjectPropertyReferenceEnclosed { - if casted, ok := structType.(BACnetObjectPropertyReferenceEnclosed); ok { + if casted, ok := structType.(BACnetObjectPropertyReferenceEnclosed); ok { return casted } if casted, ok := structType.(*BACnetObjectPropertyReferenceEnclosed); ok { @@ -113,6 +117,7 @@ func (m *_BACnetObjectPropertyReferenceEnclosed) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetObjectPropertyReferenceEnclosed) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -134,7 +139,7 @@ func BACnetObjectPropertyReferenceEnclosedParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetObjectPropertyReferenceEnclosed") } @@ -147,7 +152,7 @@ func BACnetObjectPropertyReferenceEnclosedParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("objectPropertyReference"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for objectPropertyReference") } - _objectPropertyReference, _objectPropertyReferenceErr := BACnetObjectPropertyReferenceParseWithBuffer(ctx, readBuffer) +_objectPropertyReference, _objectPropertyReferenceErr := BACnetObjectPropertyReferenceParseWithBuffer(ctx, readBuffer) if _objectPropertyReferenceErr != nil { return nil, errors.Wrap(_objectPropertyReferenceErr, "Error parsing 'objectPropertyReference' field of BACnetObjectPropertyReferenceEnclosed") } @@ -160,7 +165,7 @@ func BACnetObjectPropertyReferenceEnclosedParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetObjectPropertyReferenceEnclosed") } @@ -175,11 +180,11 @@ func BACnetObjectPropertyReferenceEnclosedParseWithBuffer(ctx context.Context, r // Create the instance return &_BACnetObjectPropertyReferenceEnclosed{ - TagNumber: tagNumber, - OpeningTag: openingTag, - ObjectPropertyReference: objectPropertyReference, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + ObjectPropertyReference: objectPropertyReference, + ClosingTag: closingTag, + }, nil } func (m *_BACnetObjectPropertyReferenceEnclosed) Serialize() ([]byte, error) { @@ -193,7 +198,7 @@ func (m *_BACnetObjectPropertyReferenceEnclosed) Serialize() ([]byte, error) { func (m *_BACnetObjectPropertyReferenceEnclosed) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetObjectPropertyReferenceEnclosed"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetObjectPropertyReferenceEnclosed"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetObjectPropertyReferenceEnclosed") } @@ -239,13 +244,13 @@ func (m *_BACnetObjectPropertyReferenceEnclosed) SerializeWithWriteBuffer(ctx co return nil } + //// // Arguments Getter func (m *_BACnetObjectPropertyReferenceEnclosed) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -263,3 +268,6 @@ func (m *_BACnetObjectPropertyReferenceEnclosed) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetObjectType.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetObjectType.go index 2aaa59a7d73..373f001fe2e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetObjectType.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetObjectType.go @@ -34,67 +34,67 @@ type IBACnetObjectType interface { utils.Serializable } -const ( - BACnetObjectType_ACCESS_CREDENTIAL BACnetObjectType = 32 - BACnetObjectType_ACCESS_DOOR BACnetObjectType = 30 - BACnetObjectType_ACCESS_POINT BACnetObjectType = 33 - BACnetObjectType_ACCESS_RIGHTS BACnetObjectType = 34 - BACnetObjectType_ACCESS_USER BACnetObjectType = 35 - BACnetObjectType_ACCESS_ZONE BACnetObjectType = 36 - BACnetObjectType_ACCUMULATOR BACnetObjectType = 23 - BACnetObjectType_ALERT_ENROLLMENT BACnetObjectType = 52 - BACnetObjectType_ANALOG_INPUT BACnetObjectType = 0 - BACnetObjectType_ANALOG_OUTPUT BACnetObjectType = 1 - BACnetObjectType_ANALOG_VALUE BACnetObjectType = 2 - BACnetObjectType_AVERAGING BACnetObjectType = 18 - BACnetObjectType_BINARY_INPUT BACnetObjectType = 3 - BACnetObjectType_BINARY_LIGHTING_OUTPUT BACnetObjectType = 55 - BACnetObjectType_BINARY_OUTPUT BACnetObjectType = 4 - BACnetObjectType_BINARY_VALUE BACnetObjectType = 5 - BACnetObjectType_BITSTRING_VALUE BACnetObjectType = 39 - BACnetObjectType_CALENDAR BACnetObjectType = 6 - BACnetObjectType_CHANNEL BACnetObjectType = 53 - BACnetObjectType_CHARACTERSTRING_VALUE BACnetObjectType = 40 - BACnetObjectType_COMMAND BACnetObjectType = 7 - BACnetObjectType_CREDENTIAL_DATA_INPUT BACnetObjectType = 37 - BACnetObjectType_DATEPATTERN_VALUE BACnetObjectType = 41 - BACnetObjectType_DATE_VALUE BACnetObjectType = 42 - BACnetObjectType_DATETIMEPATTERN_VALUE BACnetObjectType = 43 - BACnetObjectType_DATETIME_VALUE BACnetObjectType = 44 - BACnetObjectType_DEVICE BACnetObjectType = 8 - BACnetObjectType_ELEVATOR_GROUP BACnetObjectType = 57 - BACnetObjectType_ESCALATOR BACnetObjectType = 58 - BACnetObjectType_EVENT_ENROLLMENT BACnetObjectType = 9 - BACnetObjectType_EVENT_LOG BACnetObjectType = 25 - BACnetObjectType_FILE BACnetObjectType = 10 - BACnetObjectType_GLOBAL_GROUP BACnetObjectType = 26 - BACnetObjectType_GROUP BACnetObjectType = 11 - BACnetObjectType_INTEGER_VALUE BACnetObjectType = 45 - BACnetObjectType_LARGE_ANALOG_VALUE BACnetObjectType = 46 - BACnetObjectType_LIFE_SAFETY_POINT BACnetObjectType = 21 - BACnetObjectType_LIFE_SAFETY_ZONE BACnetObjectType = 22 - BACnetObjectType_LIFT BACnetObjectType = 59 - BACnetObjectType_LIGHTING_OUTPUT BACnetObjectType = 54 - BACnetObjectType_LOAD_CONTROL BACnetObjectType = 28 - BACnetObjectType_LOOP BACnetObjectType = 12 - BACnetObjectType_MULTI_STATE_INPUT BACnetObjectType = 13 - BACnetObjectType_MULTI_STATE_OUTPUT BACnetObjectType = 14 - BACnetObjectType_MULTI_STATE_VALUE BACnetObjectType = 19 - BACnetObjectType_NETWORK_PORT BACnetObjectType = 56 - BACnetObjectType_NETWORK_SECURITY BACnetObjectType = 38 - BACnetObjectType_NOTIFICATION_CLASS BACnetObjectType = 15 - BACnetObjectType_NOTIFICATION_FORWARDER BACnetObjectType = 51 - BACnetObjectType_OCTETSTRING_VALUE BACnetObjectType = 47 - BACnetObjectType_POSITIVE_INTEGER_VALUE BACnetObjectType = 48 - BACnetObjectType_PROGRAM BACnetObjectType = 16 - BACnetObjectType_PULSE_CONVERTER BACnetObjectType = 24 - BACnetObjectType_SCHEDULE BACnetObjectType = 17 - BACnetObjectType_STRUCTURED_VIEW BACnetObjectType = 29 - BACnetObjectType_TIMEPATTERN_VALUE BACnetObjectType = 49 - BACnetObjectType_TIME_VALUE BACnetObjectType = 50 - BACnetObjectType_TIMER BACnetObjectType = 31 - BACnetObjectType_TREND_LOG BACnetObjectType = 20 - BACnetObjectType_TREND_LOG_MULTIPLE BACnetObjectType = 27 +const( + BACnetObjectType_ACCESS_CREDENTIAL BACnetObjectType = 32 + BACnetObjectType_ACCESS_DOOR BACnetObjectType = 30 + BACnetObjectType_ACCESS_POINT BACnetObjectType = 33 + BACnetObjectType_ACCESS_RIGHTS BACnetObjectType = 34 + BACnetObjectType_ACCESS_USER BACnetObjectType = 35 + BACnetObjectType_ACCESS_ZONE BACnetObjectType = 36 + BACnetObjectType_ACCUMULATOR BACnetObjectType = 23 + BACnetObjectType_ALERT_ENROLLMENT BACnetObjectType = 52 + BACnetObjectType_ANALOG_INPUT BACnetObjectType = 0 + BACnetObjectType_ANALOG_OUTPUT BACnetObjectType = 1 + BACnetObjectType_ANALOG_VALUE BACnetObjectType = 2 + BACnetObjectType_AVERAGING BACnetObjectType = 18 + BACnetObjectType_BINARY_INPUT BACnetObjectType = 3 + BACnetObjectType_BINARY_LIGHTING_OUTPUT BACnetObjectType = 55 + BACnetObjectType_BINARY_OUTPUT BACnetObjectType = 4 + BACnetObjectType_BINARY_VALUE BACnetObjectType = 5 + BACnetObjectType_BITSTRING_VALUE BACnetObjectType = 39 + BACnetObjectType_CALENDAR BACnetObjectType = 6 + BACnetObjectType_CHANNEL BACnetObjectType = 53 + BACnetObjectType_CHARACTERSTRING_VALUE BACnetObjectType = 40 + BACnetObjectType_COMMAND BACnetObjectType = 7 + BACnetObjectType_CREDENTIAL_DATA_INPUT BACnetObjectType = 37 + BACnetObjectType_DATEPATTERN_VALUE BACnetObjectType = 41 + BACnetObjectType_DATE_VALUE BACnetObjectType = 42 + BACnetObjectType_DATETIMEPATTERN_VALUE BACnetObjectType = 43 + BACnetObjectType_DATETIME_VALUE BACnetObjectType = 44 + BACnetObjectType_DEVICE BACnetObjectType = 8 + BACnetObjectType_ELEVATOR_GROUP BACnetObjectType = 57 + BACnetObjectType_ESCALATOR BACnetObjectType = 58 + BACnetObjectType_EVENT_ENROLLMENT BACnetObjectType = 9 + BACnetObjectType_EVENT_LOG BACnetObjectType = 25 + BACnetObjectType_FILE BACnetObjectType = 10 + BACnetObjectType_GLOBAL_GROUP BACnetObjectType = 26 + BACnetObjectType_GROUP BACnetObjectType = 11 + BACnetObjectType_INTEGER_VALUE BACnetObjectType = 45 + BACnetObjectType_LARGE_ANALOG_VALUE BACnetObjectType = 46 + BACnetObjectType_LIFE_SAFETY_POINT BACnetObjectType = 21 + BACnetObjectType_LIFE_SAFETY_ZONE BACnetObjectType = 22 + BACnetObjectType_LIFT BACnetObjectType = 59 + BACnetObjectType_LIGHTING_OUTPUT BACnetObjectType = 54 + BACnetObjectType_LOAD_CONTROL BACnetObjectType = 28 + BACnetObjectType_LOOP BACnetObjectType = 12 + BACnetObjectType_MULTI_STATE_INPUT BACnetObjectType = 13 + BACnetObjectType_MULTI_STATE_OUTPUT BACnetObjectType = 14 + BACnetObjectType_MULTI_STATE_VALUE BACnetObjectType = 19 + BACnetObjectType_NETWORK_PORT BACnetObjectType = 56 + BACnetObjectType_NETWORK_SECURITY BACnetObjectType = 38 + BACnetObjectType_NOTIFICATION_CLASS BACnetObjectType = 15 + BACnetObjectType_NOTIFICATION_FORWARDER BACnetObjectType = 51 + BACnetObjectType_OCTETSTRING_VALUE BACnetObjectType = 47 + BACnetObjectType_POSITIVE_INTEGER_VALUE BACnetObjectType = 48 + BACnetObjectType_PROGRAM BACnetObjectType = 16 + BACnetObjectType_PULSE_CONVERTER BACnetObjectType = 24 + BACnetObjectType_SCHEDULE BACnetObjectType = 17 + BACnetObjectType_STRUCTURED_VIEW BACnetObjectType = 29 + BACnetObjectType_TIMEPATTERN_VALUE BACnetObjectType = 49 + BACnetObjectType_TIME_VALUE BACnetObjectType = 50 + BACnetObjectType_TIMER BACnetObjectType = 31 + BACnetObjectType_TREND_LOG BACnetObjectType = 20 + BACnetObjectType_TREND_LOG_MULTIPLE BACnetObjectType = 27 BACnetObjectType_VENDOR_PROPRIETARY_VALUE BACnetObjectType = 0x3FF ) @@ -102,7 +102,7 @@ var BACnetObjectTypeValues []BACnetObjectType func init() { _ = errors.New - BACnetObjectTypeValues = []BACnetObjectType{ + BACnetObjectTypeValues = []BACnetObjectType { BACnetObjectType_ACCESS_CREDENTIAL, BACnetObjectType_ACCESS_DOOR, BACnetObjectType_ACCESS_POINT, @@ -169,128 +169,128 @@ func init() { func BACnetObjectTypeByValue(value uint16) (enum BACnetObjectType, ok bool) { switch value { - case 0: - return BACnetObjectType_ANALOG_INPUT, true - case 0x3FF: - return BACnetObjectType_VENDOR_PROPRIETARY_VALUE, true - case 1: - return BACnetObjectType_ANALOG_OUTPUT, true - case 10: - return BACnetObjectType_FILE, true - case 11: - return BACnetObjectType_GROUP, true - case 12: - return BACnetObjectType_LOOP, true - case 13: - return BACnetObjectType_MULTI_STATE_INPUT, true - case 14: - return BACnetObjectType_MULTI_STATE_OUTPUT, true - case 15: - return BACnetObjectType_NOTIFICATION_CLASS, true - case 16: - return BACnetObjectType_PROGRAM, true - case 17: - return BACnetObjectType_SCHEDULE, true - case 18: - return BACnetObjectType_AVERAGING, true - case 19: - return BACnetObjectType_MULTI_STATE_VALUE, true - case 2: - return BACnetObjectType_ANALOG_VALUE, true - case 20: - return BACnetObjectType_TREND_LOG, true - case 21: - return BACnetObjectType_LIFE_SAFETY_POINT, true - case 22: - return BACnetObjectType_LIFE_SAFETY_ZONE, true - case 23: - return BACnetObjectType_ACCUMULATOR, true - case 24: - return BACnetObjectType_PULSE_CONVERTER, true - case 25: - return BACnetObjectType_EVENT_LOG, true - case 26: - return BACnetObjectType_GLOBAL_GROUP, true - case 27: - return BACnetObjectType_TREND_LOG_MULTIPLE, true - case 28: - return BACnetObjectType_LOAD_CONTROL, true - case 29: - return BACnetObjectType_STRUCTURED_VIEW, true - case 3: - return BACnetObjectType_BINARY_INPUT, true - case 30: - return BACnetObjectType_ACCESS_DOOR, true - case 31: - return BACnetObjectType_TIMER, true - case 32: - return BACnetObjectType_ACCESS_CREDENTIAL, true - case 33: - return BACnetObjectType_ACCESS_POINT, true - case 34: - return BACnetObjectType_ACCESS_RIGHTS, true - case 35: - return BACnetObjectType_ACCESS_USER, true - case 36: - return BACnetObjectType_ACCESS_ZONE, true - case 37: - return BACnetObjectType_CREDENTIAL_DATA_INPUT, true - case 38: - return BACnetObjectType_NETWORK_SECURITY, true - case 39: - return BACnetObjectType_BITSTRING_VALUE, true - case 4: - return BACnetObjectType_BINARY_OUTPUT, true - case 40: - return BACnetObjectType_CHARACTERSTRING_VALUE, true - case 41: - return BACnetObjectType_DATEPATTERN_VALUE, true - case 42: - return BACnetObjectType_DATE_VALUE, true - case 43: - return BACnetObjectType_DATETIMEPATTERN_VALUE, true - case 44: - return BACnetObjectType_DATETIME_VALUE, true - case 45: - return BACnetObjectType_INTEGER_VALUE, true - case 46: - return BACnetObjectType_LARGE_ANALOG_VALUE, true - case 47: - return BACnetObjectType_OCTETSTRING_VALUE, true - case 48: - return BACnetObjectType_POSITIVE_INTEGER_VALUE, true - case 49: - return BACnetObjectType_TIMEPATTERN_VALUE, true - case 5: - return BACnetObjectType_BINARY_VALUE, true - case 50: - return BACnetObjectType_TIME_VALUE, true - case 51: - return BACnetObjectType_NOTIFICATION_FORWARDER, true - case 52: - return BACnetObjectType_ALERT_ENROLLMENT, true - case 53: - return BACnetObjectType_CHANNEL, true - case 54: - return BACnetObjectType_LIGHTING_OUTPUT, true - case 55: - return BACnetObjectType_BINARY_LIGHTING_OUTPUT, true - case 56: - return BACnetObjectType_NETWORK_PORT, true - case 57: - return BACnetObjectType_ELEVATOR_GROUP, true - case 58: - return BACnetObjectType_ESCALATOR, true - case 59: - return BACnetObjectType_LIFT, true - case 6: - return BACnetObjectType_CALENDAR, true - case 7: - return BACnetObjectType_COMMAND, true - case 8: - return BACnetObjectType_DEVICE, true - case 9: - return BACnetObjectType_EVENT_ENROLLMENT, true + case 0: + return BACnetObjectType_ANALOG_INPUT, true + case 0x3FF: + return BACnetObjectType_VENDOR_PROPRIETARY_VALUE, true + case 1: + return BACnetObjectType_ANALOG_OUTPUT, true + case 10: + return BACnetObjectType_FILE, true + case 11: + return BACnetObjectType_GROUP, true + case 12: + return BACnetObjectType_LOOP, true + case 13: + return BACnetObjectType_MULTI_STATE_INPUT, true + case 14: + return BACnetObjectType_MULTI_STATE_OUTPUT, true + case 15: + return BACnetObjectType_NOTIFICATION_CLASS, true + case 16: + return BACnetObjectType_PROGRAM, true + case 17: + return BACnetObjectType_SCHEDULE, true + case 18: + return BACnetObjectType_AVERAGING, true + case 19: + return BACnetObjectType_MULTI_STATE_VALUE, true + case 2: + return BACnetObjectType_ANALOG_VALUE, true + case 20: + return BACnetObjectType_TREND_LOG, true + case 21: + return BACnetObjectType_LIFE_SAFETY_POINT, true + case 22: + return BACnetObjectType_LIFE_SAFETY_ZONE, true + case 23: + return BACnetObjectType_ACCUMULATOR, true + case 24: + return BACnetObjectType_PULSE_CONVERTER, true + case 25: + return BACnetObjectType_EVENT_LOG, true + case 26: + return BACnetObjectType_GLOBAL_GROUP, true + case 27: + return BACnetObjectType_TREND_LOG_MULTIPLE, true + case 28: + return BACnetObjectType_LOAD_CONTROL, true + case 29: + return BACnetObjectType_STRUCTURED_VIEW, true + case 3: + return BACnetObjectType_BINARY_INPUT, true + case 30: + return BACnetObjectType_ACCESS_DOOR, true + case 31: + return BACnetObjectType_TIMER, true + case 32: + return BACnetObjectType_ACCESS_CREDENTIAL, true + case 33: + return BACnetObjectType_ACCESS_POINT, true + case 34: + return BACnetObjectType_ACCESS_RIGHTS, true + case 35: + return BACnetObjectType_ACCESS_USER, true + case 36: + return BACnetObjectType_ACCESS_ZONE, true + case 37: + return BACnetObjectType_CREDENTIAL_DATA_INPUT, true + case 38: + return BACnetObjectType_NETWORK_SECURITY, true + case 39: + return BACnetObjectType_BITSTRING_VALUE, true + case 4: + return BACnetObjectType_BINARY_OUTPUT, true + case 40: + return BACnetObjectType_CHARACTERSTRING_VALUE, true + case 41: + return BACnetObjectType_DATEPATTERN_VALUE, true + case 42: + return BACnetObjectType_DATE_VALUE, true + case 43: + return BACnetObjectType_DATETIMEPATTERN_VALUE, true + case 44: + return BACnetObjectType_DATETIME_VALUE, true + case 45: + return BACnetObjectType_INTEGER_VALUE, true + case 46: + return BACnetObjectType_LARGE_ANALOG_VALUE, true + case 47: + return BACnetObjectType_OCTETSTRING_VALUE, true + case 48: + return BACnetObjectType_POSITIVE_INTEGER_VALUE, true + case 49: + return BACnetObjectType_TIMEPATTERN_VALUE, true + case 5: + return BACnetObjectType_BINARY_VALUE, true + case 50: + return BACnetObjectType_TIME_VALUE, true + case 51: + return BACnetObjectType_NOTIFICATION_FORWARDER, true + case 52: + return BACnetObjectType_ALERT_ENROLLMENT, true + case 53: + return BACnetObjectType_CHANNEL, true + case 54: + return BACnetObjectType_LIGHTING_OUTPUT, true + case 55: + return BACnetObjectType_BINARY_LIGHTING_OUTPUT, true + case 56: + return BACnetObjectType_NETWORK_PORT, true + case 57: + return BACnetObjectType_ELEVATOR_GROUP, true + case 58: + return BACnetObjectType_ESCALATOR, true + case 59: + return BACnetObjectType_LIFT, true + case 6: + return BACnetObjectType_CALENDAR, true + case 7: + return BACnetObjectType_COMMAND, true + case 8: + return BACnetObjectType_DEVICE, true + case 9: + return BACnetObjectType_EVENT_ENROLLMENT, true } return 0, false } @@ -423,13 +423,13 @@ func BACnetObjectTypeByName(value string) (enum BACnetObjectType, ok bool) { return 0, false } -func BACnetObjectTypeKnows(value uint16) bool { +func BACnetObjectTypeKnows(value uint16) bool { for _, typeValue := range BACnetObjectTypeValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastBACnetObjectType(structType interface{}) BACnetObjectType { @@ -611,3 +611,4 @@ func (e BACnetObjectType) PLC4XEnumName() string { func (e BACnetObjectType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetObjectTypeTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetObjectTypeTagged.go index bb18c181b76..df50c04138e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetObjectTypeTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetObjectTypeTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetObjectTypeTagged is the corresponding interface of BACnetObjectTypeTagged type BACnetObjectTypeTagged interface { @@ -50,15 +52,16 @@ type BACnetObjectTypeTaggedExactly interface { // _BACnetObjectTypeTagged is the data-structure of this message type _BACnetObjectTypeTagged struct { - Header BACnetTagHeader - Value BACnetObjectType - ProprietaryValue uint32 + Header BACnetTagHeader + Value BACnetObjectType + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_BACnetObjectTypeTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetObjectTypeTagged factory function for _BACnetObjectTypeTagged -func NewBACnetObjectTypeTagged(header BACnetTagHeader, value BACnetObjectType, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_BACnetObjectTypeTagged { - return &_BACnetObjectTypeTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetObjectTypeTagged( header BACnetTagHeader , value BACnetObjectType , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_BACnetObjectTypeTagged { +return &_BACnetObjectTypeTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetObjectTypeTagged(structType interface{}) BACnetObjectTypeTagged { - if casted, ok := structType.(BACnetObjectTypeTagged); ok { + if casted, ok := structType.(BACnetObjectTypeTagged); ok { return casted } if casted, ok := structType.(*BACnetObjectTypeTagged); ok { @@ -123,16 +127,17 @@ func (m *_BACnetObjectTypeTagged) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetObjectTypeTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetObjectTypeTaggedParseWithBuffer(ctx context.Context, readBuffer utils if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetObjectTypeTagged") } @@ -164,12 +169,12 @@ func BACnetObjectTypeTaggedParseWithBuffer(ctx context.Context, readBuffer utils } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func BACnetObjectTypeTaggedParseWithBuffer(ctx context.Context, readBuffer utils } var value BACnetObjectType if _value != nil { - value = _value.(BACnetObjectType) + value = _value.(BACnetObjectType) } // Virtual field @@ -195,7 +200,7 @@ func BACnetObjectTypeTaggedParseWithBuffer(ctx context.Context, readBuffer utils } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetObjectTypeTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func BACnetObjectTypeTaggedParseWithBuffer(ctx context.Context, readBuffer utils // Create the instance return &_BACnetObjectTypeTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetObjectTypeTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_BACnetObjectTypeTagged) Serialize() ([]byte, error) { func (m *_BACnetObjectTypeTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetObjectTypeTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetObjectTypeTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetObjectTypeTagged") } @@ -261,6 +266,7 @@ func (m *_BACnetObjectTypeTagged) SerializeWithWriteBuffer(ctx context.Context, return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_BACnetObjectTypeTagged) GetTagNumber() uint8 { func (m *_BACnetObjectTypeTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_BACnetObjectTypeTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetObjectTypesSupported.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetObjectTypesSupported.go index 092e0db4235..b426d3d0d0f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetObjectTypesSupported.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetObjectTypesSupported.go @@ -34,74 +34,74 @@ type IBACnetObjectTypesSupported interface { utils.Serializable } -const ( - BACnetObjectTypesSupported_ANALOG_INPUT BACnetObjectTypesSupported = 0 - BACnetObjectTypesSupported_ANALOG_OUTPUT BACnetObjectTypesSupported = 1 - BACnetObjectTypesSupported_ANALOG_VALUE BACnetObjectTypesSupported = 2 - BACnetObjectTypesSupported_BINARY_INPUT BACnetObjectTypesSupported = 3 - BACnetObjectTypesSupported_BINARY_OUTPUT BACnetObjectTypesSupported = 4 - BACnetObjectTypesSupported_BINARY_VALUE BACnetObjectTypesSupported = 5 - BACnetObjectTypesSupported_CALENDAR BACnetObjectTypesSupported = 6 - BACnetObjectTypesSupported_COMMAND BACnetObjectTypesSupported = 7 - BACnetObjectTypesSupported_DEVICE BACnetObjectTypesSupported = 8 - BACnetObjectTypesSupported_EVENT_ENROLLMENT BACnetObjectTypesSupported = 9 - BACnetObjectTypesSupported_FILE BACnetObjectTypesSupported = 10 - BACnetObjectTypesSupported_GROUP BACnetObjectTypesSupported = 11 - BACnetObjectTypesSupported_LOOP BACnetObjectTypesSupported = 12 - BACnetObjectTypesSupported_MULTI_STATE_INPUT BACnetObjectTypesSupported = 13 - BACnetObjectTypesSupported_MULTI_STATE_OUTPUT BACnetObjectTypesSupported = 14 - BACnetObjectTypesSupported_NOTIFICATION_CLASS BACnetObjectTypesSupported = 15 - BACnetObjectTypesSupported_PROGRAM BACnetObjectTypesSupported = 16 - BACnetObjectTypesSupported_SCHEDULE BACnetObjectTypesSupported = 17 - BACnetObjectTypesSupported_AVERAGING BACnetObjectTypesSupported = 18 - BACnetObjectTypesSupported_MULTI_STATE_VALUE BACnetObjectTypesSupported = 19 - BACnetObjectTypesSupported_TREND_LOG BACnetObjectTypesSupported = 20 - BACnetObjectTypesSupported_LIFE_SAFETY_POINT BACnetObjectTypesSupported = 21 - BACnetObjectTypesSupported_LIFE_SAFETY_ZONE BACnetObjectTypesSupported = 22 - BACnetObjectTypesSupported_ACCUMULATOR BACnetObjectTypesSupported = 23 - BACnetObjectTypesSupported_PULSE_CONVERTER BACnetObjectTypesSupported = 24 - BACnetObjectTypesSupported_EVENT_LOG BACnetObjectTypesSupported = 25 - BACnetObjectTypesSupported_GLOBAL_GROUP BACnetObjectTypesSupported = 26 - BACnetObjectTypesSupported_TREND_LOG_MULTIPLE BACnetObjectTypesSupported = 27 - BACnetObjectTypesSupported_LOAD_CONTROL BACnetObjectTypesSupported = 28 - BACnetObjectTypesSupported_STRUCTURED_VIEW BACnetObjectTypesSupported = 29 - BACnetObjectTypesSupported_ACCESS_DOOR BACnetObjectTypesSupported = 30 - BACnetObjectTypesSupported_TIMER BACnetObjectTypesSupported = 31 - BACnetObjectTypesSupported_ACCESS_CREDENTIAL BACnetObjectTypesSupported = 32 - BACnetObjectTypesSupported_ACCESS_POINT BACnetObjectTypesSupported = 33 - BACnetObjectTypesSupported_ACCESS_RIGHTS BACnetObjectTypesSupported = 34 - BACnetObjectTypesSupported_ACCESS_USER BACnetObjectTypesSupported = 35 - BACnetObjectTypesSupported_ACCESS_ZONE BACnetObjectTypesSupported = 36 - BACnetObjectTypesSupported_CREDENTIAL_DATA_INPUT BACnetObjectTypesSupported = 37 - BACnetObjectTypesSupported_NETWORK_SECURITY BACnetObjectTypesSupported = 38 - BACnetObjectTypesSupported_BITSTRING_VALUE BACnetObjectTypesSupported = 39 - BACnetObjectTypesSupported_CHARACTERSTRING_VALUE BACnetObjectTypesSupported = 40 - BACnetObjectTypesSupported_DATEPATTERN_VALUE BACnetObjectTypesSupported = 41 - BACnetObjectTypesSupported_DATE_VALUE BACnetObjectTypesSupported = 42 - BACnetObjectTypesSupported_DATETIMEPATTERN_VALUE BACnetObjectTypesSupported = 43 - BACnetObjectTypesSupported_DATETIME_VALUE BACnetObjectTypesSupported = 44 - BACnetObjectTypesSupported_INTEGER_VALUE BACnetObjectTypesSupported = 45 - BACnetObjectTypesSupported_LARGE_ANALOG_VALUE BACnetObjectTypesSupported = 46 - BACnetObjectTypesSupported_OCTETSTRING_VALUE BACnetObjectTypesSupported = 47 +const( + BACnetObjectTypesSupported_ANALOG_INPUT BACnetObjectTypesSupported = 0 + BACnetObjectTypesSupported_ANALOG_OUTPUT BACnetObjectTypesSupported = 1 + BACnetObjectTypesSupported_ANALOG_VALUE BACnetObjectTypesSupported = 2 + BACnetObjectTypesSupported_BINARY_INPUT BACnetObjectTypesSupported = 3 + BACnetObjectTypesSupported_BINARY_OUTPUT BACnetObjectTypesSupported = 4 + BACnetObjectTypesSupported_BINARY_VALUE BACnetObjectTypesSupported = 5 + BACnetObjectTypesSupported_CALENDAR BACnetObjectTypesSupported = 6 + BACnetObjectTypesSupported_COMMAND BACnetObjectTypesSupported = 7 + BACnetObjectTypesSupported_DEVICE BACnetObjectTypesSupported = 8 + BACnetObjectTypesSupported_EVENT_ENROLLMENT BACnetObjectTypesSupported = 9 + BACnetObjectTypesSupported_FILE BACnetObjectTypesSupported = 10 + BACnetObjectTypesSupported_GROUP BACnetObjectTypesSupported = 11 + BACnetObjectTypesSupported_LOOP BACnetObjectTypesSupported = 12 + BACnetObjectTypesSupported_MULTI_STATE_INPUT BACnetObjectTypesSupported = 13 + BACnetObjectTypesSupported_MULTI_STATE_OUTPUT BACnetObjectTypesSupported = 14 + BACnetObjectTypesSupported_NOTIFICATION_CLASS BACnetObjectTypesSupported = 15 + BACnetObjectTypesSupported_PROGRAM BACnetObjectTypesSupported = 16 + BACnetObjectTypesSupported_SCHEDULE BACnetObjectTypesSupported = 17 + BACnetObjectTypesSupported_AVERAGING BACnetObjectTypesSupported = 18 + BACnetObjectTypesSupported_MULTI_STATE_VALUE BACnetObjectTypesSupported = 19 + BACnetObjectTypesSupported_TREND_LOG BACnetObjectTypesSupported = 20 + BACnetObjectTypesSupported_LIFE_SAFETY_POINT BACnetObjectTypesSupported = 21 + BACnetObjectTypesSupported_LIFE_SAFETY_ZONE BACnetObjectTypesSupported = 22 + BACnetObjectTypesSupported_ACCUMULATOR BACnetObjectTypesSupported = 23 + BACnetObjectTypesSupported_PULSE_CONVERTER BACnetObjectTypesSupported = 24 + BACnetObjectTypesSupported_EVENT_LOG BACnetObjectTypesSupported = 25 + BACnetObjectTypesSupported_GLOBAL_GROUP BACnetObjectTypesSupported = 26 + BACnetObjectTypesSupported_TREND_LOG_MULTIPLE BACnetObjectTypesSupported = 27 + BACnetObjectTypesSupported_LOAD_CONTROL BACnetObjectTypesSupported = 28 + BACnetObjectTypesSupported_STRUCTURED_VIEW BACnetObjectTypesSupported = 29 + BACnetObjectTypesSupported_ACCESS_DOOR BACnetObjectTypesSupported = 30 + BACnetObjectTypesSupported_TIMER BACnetObjectTypesSupported = 31 + BACnetObjectTypesSupported_ACCESS_CREDENTIAL BACnetObjectTypesSupported = 32 + BACnetObjectTypesSupported_ACCESS_POINT BACnetObjectTypesSupported = 33 + BACnetObjectTypesSupported_ACCESS_RIGHTS BACnetObjectTypesSupported = 34 + BACnetObjectTypesSupported_ACCESS_USER BACnetObjectTypesSupported = 35 + BACnetObjectTypesSupported_ACCESS_ZONE BACnetObjectTypesSupported = 36 + BACnetObjectTypesSupported_CREDENTIAL_DATA_INPUT BACnetObjectTypesSupported = 37 + BACnetObjectTypesSupported_NETWORK_SECURITY BACnetObjectTypesSupported = 38 + BACnetObjectTypesSupported_BITSTRING_VALUE BACnetObjectTypesSupported = 39 + BACnetObjectTypesSupported_CHARACTERSTRING_VALUE BACnetObjectTypesSupported = 40 + BACnetObjectTypesSupported_DATEPATTERN_VALUE BACnetObjectTypesSupported = 41 + BACnetObjectTypesSupported_DATE_VALUE BACnetObjectTypesSupported = 42 + BACnetObjectTypesSupported_DATETIMEPATTERN_VALUE BACnetObjectTypesSupported = 43 + BACnetObjectTypesSupported_DATETIME_VALUE BACnetObjectTypesSupported = 44 + BACnetObjectTypesSupported_INTEGER_VALUE BACnetObjectTypesSupported = 45 + BACnetObjectTypesSupported_LARGE_ANALOG_VALUE BACnetObjectTypesSupported = 46 + BACnetObjectTypesSupported_OCTETSTRING_VALUE BACnetObjectTypesSupported = 47 BACnetObjectTypesSupported_POSITIVE_INTEGER_VALUE BACnetObjectTypesSupported = 48 - BACnetObjectTypesSupported_TIMEPATTERN_VALUE BACnetObjectTypesSupported = 49 - BACnetObjectTypesSupported_TIME_VALUE BACnetObjectTypesSupported = 50 + BACnetObjectTypesSupported_TIMEPATTERN_VALUE BACnetObjectTypesSupported = 49 + BACnetObjectTypesSupported_TIME_VALUE BACnetObjectTypesSupported = 50 BACnetObjectTypesSupported_NOTIFICATION_FORWARDER BACnetObjectTypesSupported = 51 - BACnetObjectTypesSupported_ALERT_ENROLLMENT BACnetObjectTypesSupported = 52 - BACnetObjectTypesSupported_CHANNEL BACnetObjectTypesSupported = 53 - BACnetObjectTypesSupported_LIGHTING_OUTPUT BACnetObjectTypesSupported = 54 + BACnetObjectTypesSupported_ALERT_ENROLLMENT BACnetObjectTypesSupported = 52 + BACnetObjectTypesSupported_CHANNEL BACnetObjectTypesSupported = 53 + BACnetObjectTypesSupported_LIGHTING_OUTPUT BACnetObjectTypesSupported = 54 BACnetObjectTypesSupported_BINARY_LIGHTING_OUTPUT BACnetObjectTypesSupported = 55 - BACnetObjectTypesSupported_NETWORK_PORT BACnetObjectTypesSupported = 56 - BACnetObjectTypesSupported_ELEVATOR_GROUP BACnetObjectTypesSupported = 57 - BACnetObjectTypesSupported_ESCALATOR BACnetObjectTypesSupported = 58 - BACnetObjectTypesSupported_LIFT BACnetObjectTypesSupported = 59 + BACnetObjectTypesSupported_NETWORK_PORT BACnetObjectTypesSupported = 56 + BACnetObjectTypesSupported_ELEVATOR_GROUP BACnetObjectTypesSupported = 57 + BACnetObjectTypesSupported_ESCALATOR BACnetObjectTypesSupported = 58 + BACnetObjectTypesSupported_LIFT BACnetObjectTypesSupported = 59 ) var BACnetObjectTypesSupportedValues []BACnetObjectTypesSupported func init() { _ = errors.New - BACnetObjectTypesSupportedValues = []BACnetObjectTypesSupported{ + BACnetObjectTypesSupportedValues = []BACnetObjectTypesSupported { BACnetObjectTypesSupported_ANALOG_INPUT, BACnetObjectTypesSupported_ANALOG_OUTPUT, BACnetObjectTypesSupported_ANALOG_VALUE, @@ -167,126 +167,126 @@ func init() { func BACnetObjectTypesSupportedByValue(value uint8) (enum BACnetObjectTypesSupported, ok bool) { switch value { - case 0: - return BACnetObjectTypesSupported_ANALOG_INPUT, true - case 1: - return BACnetObjectTypesSupported_ANALOG_OUTPUT, true - case 10: - return BACnetObjectTypesSupported_FILE, true - case 11: - return BACnetObjectTypesSupported_GROUP, true - case 12: - return BACnetObjectTypesSupported_LOOP, true - case 13: - return BACnetObjectTypesSupported_MULTI_STATE_INPUT, true - case 14: - return BACnetObjectTypesSupported_MULTI_STATE_OUTPUT, true - case 15: - return BACnetObjectTypesSupported_NOTIFICATION_CLASS, true - case 16: - return BACnetObjectTypesSupported_PROGRAM, true - case 17: - return BACnetObjectTypesSupported_SCHEDULE, true - case 18: - return BACnetObjectTypesSupported_AVERAGING, true - case 19: - return BACnetObjectTypesSupported_MULTI_STATE_VALUE, true - case 2: - return BACnetObjectTypesSupported_ANALOG_VALUE, true - case 20: - return BACnetObjectTypesSupported_TREND_LOG, true - case 21: - return BACnetObjectTypesSupported_LIFE_SAFETY_POINT, true - case 22: - return BACnetObjectTypesSupported_LIFE_SAFETY_ZONE, true - case 23: - return BACnetObjectTypesSupported_ACCUMULATOR, true - case 24: - return BACnetObjectTypesSupported_PULSE_CONVERTER, true - case 25: - return BACnetObjectTypesSupported_EVENT_LOG, true - case 26: - return BACnetObjectTypesSupported_GLOBAL_GROUP, true - case 27: - return BACnetObjectTypesSupported_TREND_LOG_MULTIPLE, true - case 28: - return BACnetObjectTypesSupported_LOAD_CONTROL, true - case 29: - return BACnetObjectTypesSupported_STRUCTURED_VIEW, true - case 3: - return BACnetObjectTypesSupported_BINARY_INPUT, true - case 30: - return BACnetObjectTypesSupported_ACCESS_DOOR, true - case 31: - return BACnetObjectTypesSupported_TIMER, true - case 32: - return BACnetObjectTypesSupported_ACCESS_CREDENTIAL, true - case 33: - return BACnetObjectTypesSupported_ACCESS_POINT, true - case 34: - return BACnetObjectTypesSupported_ACCESS_RIGHTS, true - case 35: - return BACnetObjectTypesSupported_ACCESS_USER, true - case 36: - return BACnetObjectTypesSupported_ACCESS_ZONE, true - case 37: - return BACnetObjectTypesSupported_CREDENTIAL_DATA_INPUT, true - case 38: - return BACnetObjectTypesSupported_NETWORK_SECURITY, true - case 39: - return BACnetObjectTypesSupported_BITSTRING_VALUE, true - case 4: - return BACnetObjectTypesSupported_BINARY_OUTPUT, true - case 40: - return BACnetObjectTypesSupported_CHARACTERSTRING_VALUE, true - case 41: - return BACnetObjectTypesSupported_DATEPATTERN_VALUE, true - case 42: - return BACnetObjectTypesSupported_DATE_VALUE, true - case 43: - return BACnetObjectTypesSupported_DATETIMEPATTERN_VALUE, true - case 44: - return BACnetObjectTypesSupported_DATETIME_VALUE, true - case 45: - return BACnetObjectTypesSupported_INTEGER_VALUE, true - case 46: - return BACnetObjectTypesSupported_LARGE_ANALOG_VALUE, true - case 47: - return BACnetObjectTypesSupported_OCTETSTRING_VALUE, true - case 48: - return BACnetObjectTypesSupported_POSITIVE_INTEGER_VALUE, true - case 49: - return BACnetObjectTypesSupported_TIMEPATTERN_VALUE, true - case 5: - return BACnetObjectTypesSupported_BINARY_VALUE, true - case 50: - return BACnetObjectTypesSupported_TIME_VALUE, true - case 51: - return BACnetObjectTypesSupported_NOTIFICATION_FORWARDER, true - case 52: - return BACnetObjectTypesSupported_ALERT_ENROLLMENT, true - case 53: - return BACnetObjectTypesSupported_CHANNEL, true - case 54: - return BACnetObjectTypesSupported_LIGHTING_OUTPUT, true - case 55: - return BACnetObjectTypesSupported_BINARY_LIGHTING_OUTPUT, true - case 56: - return BACnetObjectTypesSupported_NETWORK_PORT, true - case 57: - return BACnetObjectTypesSupported_ELEVATOR_GROUP, true - case 58: - return BACnetObjectTypesSupported_ESCALATOR, true - case 59: - return BACnetObjectTypesSupported_LIFT, true - case 6: - return BACnetObjectTypesSupported_CALENDAR, true - case 7: - return BACnetObjectTypesSupported_COMMAND, true - case 8: - return BACnetObjectTypesSupported_DEVICE, true - case 9: - return BACnetObjectTypesSupported_EVENT_ENROLLMENT, true + case 0: + return BACnetObjectTypesSupported_ANALOG_INPUT, true + case 1: + return BACnetObjectTypesSupported_ANALOG_OUTPUT, true + case 10: + return BACnetObjectTypesSupported_FILE, true + case 11: + return BACnetObjectTypesSupported_GROUP, true + case 12: + return BACnetObjectTypesSupported_LOOP, true + case 13: + return BACnetObjectTypesSupported_MULTI_STATE_INPUT, true + case 14: + return BACnetObjectTypesSupported_MULTI_STATE_OUTPUT, true + case 15: + return BACnetObjectTypesSupported_NOTIFICATION_CLASS, true + case 16: + return BACnetObjectTypesSupported_PROGRAM, true + case 17: + return BACnetObjectTypesSupported_SCHEDULE, true + case 18: + return BACnetObjectTypesSupported_AVERAGING, true + case 19: + return BACnetObjectTypesSupported_MULTI_STATE_VALUE, true + case 2: + return BACnetObjectTypesSupported_ANALOG_VALUE, true + case 20: + return BACnetObjectTypesSupported_TREND_LOG, true + case 21: + return BACnetObjectTypesSupported_LIFE_SAFETY_POINT, true + case 22: + return BACnetObjectTypesSupported_LIFE_SAFETY_ZONE, true + case 23: + return BACnetObjectTypesSupported_ACCUMULATOR, true + case 24: + return BACnetObjectTypesSupported_PULSE_CONVERTER, true + case 25: + return BACnetObjectTypesSupported_EVENT_LOG, true + case 26: + return BACnetObjectTypesSupported_GLOBAL_GROUP, true + case 27: + return BACnetObjectTypesSupported_TREND_LOG_MULTIPLE, true + case 28: + return BACnetObjectTypesSupported_LOAD_CONTROL, true + case 29: + return BACnetObjectTypesSupported_STRUCTURED_VIEW, true + case 3: + return BACnetObjectTypesSupported_BINARY_INPUT, true + case 30: + return BACnetObjectTypesSupported_ACCESS_DOOR, true + case 31: + return BACnetObjectTypesSupported_TIMER, true + case 32: + return BACnetObjectTypesSupported_ACCESS_CREDENTIAL, true + case 33: + return BACnetObjectTypesSupported_ACCESS_POINT, true + case 34: + return BACnetObjectTypesSupported_ACCESS_RIGHTS, true + case 35: + return BACnetObjectTypesSupported_ACCESS_USER, true + case 36: + return BACnetObjectTypesSupported_ACCESS_ZONE, true + case 37: + return BACnetObjectTypesSupported_CREDENTIAL_DATA_INPUT, true + case 38: + return BACnetObjectTypesSupported_NETWORK_SECURITY, true + case 39: + return BACnetObjectTypesSupported_BITSTRING_VALUE, true + case 4: + return BACnetObjectTypesSupported_BINARY_OUTPUT, true + case 40: + return BACnetObjectTypesSupported_CHARACTERSTRING_VALUE, true + case 41: + return BACnetObjectTypesSupported_DATEPATTERN_VALUE, true + case 42: + return BACnetObjectTypesSupported_DATE_VALUE, true + case 43: + return BACnetObjectTypesSupported_DATETIMEPATTERN_VALUE, true + case 44: + return BACnetObjectTypesSupported_DATETIME_VALUE, true + case 45: + return BACnetObjectTypesSupported_INTEGER_VALUE, true + case 46: + return BACnetObjectTypesSupported_LARGE_ANALOG_VALUE, true + case 47: + return BACnetObjectTypesSupported_OCTETSTRING_VALUE, true + case 48: + return BACnetObjectTypesSupported_POSITIVE_INTEGER_VALUE, true + case 49: + return BACnetObjectTypesSupported_TIMEPATTERN_VALUE, true + case 5: + return BACnetObjectTypesSupported_BINARY_VALUE, true + case 50: + return BACnetObjectTypesSupported_TIME_VALUE, true + case 51: + return BACnetObjectTypesSupported_NOTIFICATION_FORWARDER, true + case 52: + return BACnetObjectTypesSupported_ALERT_ENROLLMENT, true + case 53: + return BACnetObjectTypesSupported_CHANNEL, true + case 54: + return BACnetObjectTypesSupported_LIGHTING_OUTPUT, true + case 55: + return BACnetObjectTypesSupported_BINARY_LIGHTING_OUTPUT, true + case 56: + return BACnetObjectTypesSupported_NETWORK_PORT, true + case 57: + return BACnetObjectTypesSupported_ELEVATOR_GROUP, true + case 58: + return BACnetObjectTypesSupported_ESCALATOR, true + case 59: + return BACnetObjectTypesSupported_LIFT, true + case 6: + return BACnetObjectTypesSupported_CALENDAR, true + case 7: + return BACnetObjectTypesSupported_COMMAND, true + case 8: + return BACnetObjectTypesSupported_DEVICE, true + case 9: + return BACnetObjectTypesSupported_EVENT_ENROLLMENT, true } return 0, false } @@ -417,13 +417,13 @@ func BACnetObjectTypesSupportedByName(value string) (enum BACnetObjectTypesSuppo return 0, false } -func BACnetObjectTypesSupportedKnows(value uint8) bool { +func BACnetObjectTypesSupportedKnows(value uint8) bool { for _, typeValue := range BACnetObjectTypesSupportedValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetObjectTypesSupported(structType interface{}) BACnetObjectTypesSupported { @@ -603,3 +603,4 @@ func (e BACnetObjectTypesSupported) PLC4XEnumName() string { func (e BACnetObjectTypesSupported) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetObjectTypesSupportedTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetObjectTypesSupportedTagged.go index 0ef05795619..ac81e26d0c1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetObjectTypesSupportedTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetObjectTypesSupportedTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetObjectTypesSupportedTagged is the corresponding interface of BACnetObjectTypesSupportedTagged type BACnetObjectTypesSupportedTagged interface { @@ -66,14 +68,15 @@ type BACnetObjectTypesSupportedTaggedExactly interface { // _BACnetObjectTypesSupportedTagged is the data-structure of this message type _BACnetObjectTypesSupportedTagged struct { - Header BACnetTagHeader - Payload BACnetTagPayloadBitString + Header BACnetTagHeader + Payload BACnetTagPayloadBitString // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -99,61 +102,61 @@ func (m *_BACnetObjectTypesSupportedTagged) GetPayload() BACnetTagPayloadBitStri func (m *_BACnetObjectTypesSupportedTagged) GetTimeValue() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (0))), func() interface{} { return bool(m.GetPayload().GetData()[0]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((0)))), func() interface{} {return bool(m.GetPayload().GetData()[0])}, func() interface{} {return bool(bool(false))}).(bool)) } func (m *_BACnetObjectTypesSupportedTagged) GetNotificationForwarder() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (1))), func() interface{} { return bool(m.GetPayload().GetData()[1]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((1)))), func() interface{} {return bool(m.GetPayload().GetData()[1])}, func() interface{} {return bool(bool(false))}).(bool)) } func (m *_BACnetObjectTypesSupportedTagged) GetAlertEnrollment() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (2))), func() interface{} { return bool(m.GetPayload().GetData()[2]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((2)))), func() interface{} {return bool(m.GetPayload().GetData()[2])}, func() interface{} {return bool(bool(false))}).(bool)) } func (m *_BACnetObjectTypesSupportedTagged) GetChannel() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (3))), func() interface{} { return bool(m.GetPayload().GetData()[3]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((3)))), func() interface{} {return bool(m.GetPayload().GetData()[3])}, func() interface{} {return bool(bool(false))}).(bool)) } func (m *_BACnetObjectTypesSupportedTagged) GetLightingOutput() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (4))), func() interface{} { return bool(m.GetPayload().GetData()[4]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((4)))), func() interface{} {return bool(m.GetPayload().GetData()[4])}, func() interface{} {return bool(bool(false))}).(bool)) } func (m *_BACnetObjectTypesSupportedTagged) GetBinaryLightingOutput() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (5))), func() interface{} { return bool(m.GetPayload().GetData()[5]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((5)))), func() interface{} {return bool(m.GetPayload().GetData()[5])}, func() interface{} {return bool(bool(false))}).(bool)) } func (m *_BACnetObjectTypesSupportedTagged) GetNetworkPort() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (6))), func() interface{} { return bool(m.GetPayload().GetData()[6]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((6)))), func() interface{} {return bool(m.GetPayload().GetData()[6])}, func() interface{} {return bool(bool(false))}).(bool)) } func (m *_BACnetObjectTypesSupportedTagged) GetElevatorGroup() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (7))), func() interface{} { return bool(m.GetPayload().GetData()[7]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((7)))), func() interface{} {return bool(m.GetPayload().GetData()[7])}, func() interface{} {return bool(bool(false))}).(bool)) } func (m *_BACnetObjectTypesSupportedTagged) GetEscalator() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (8))), func() interface{} { return bool(m.GetPayload().GetData()[8]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((8)))), func() interface{} {return bool(m.GetPayload().GetData()[8])}, func() interface{} {return bool(bool(false))}).(bool)) } func (m *_BACnetObjectTypesSupportedTagged) GetLift() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (9))), func() interface{} { return bool(m.GetPayload().GetData()[9]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((9)))), func() interface{} {return bool(m.GetPayload().GetData()[9])}, func() interface{} {return bool(bool(false))}).(bool)) } /////////////////////// @@ -161,14 +164,15 @@ func (m *_BACnetObjectTypesSupportedTagged) GetLift() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetObjectTypesSupportedTagged factory function for _BACnetObjectTypesSupportedTagged -func NewBACnetObjectTypesSupportedTagged(header BACnetTagHeader, payload BACnetTagPayloadBitString, tagNumber uint8, tagClass TagClass) *_BACnetObjectTypesSupportedTagged { - return &_BACnetObjectTypesSupportedTagged{Header: header, Payload: payload, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetObjectTypesSupportedTagged( header BACnetTagHeader , payload BACnetTagPayloadBitString , tagNumber uint8 , tagClass TagClass ) *_BACnetObjectTypesSupportedTagged { +return &_BACnetObjectTypesSupportedTagged{ Header: header , Payload: payload , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetObjectTypesSupportedTagged(structType interface{}) BACnetObjectTypesSupportedTagged { - if casted, ok := structType.(BACnetObjectTypesSupportedTagged); ok { + if casted, ok := structType.(BACnetObjectTypesSupportedTagged); ok { return casted } if casted, ok := structType.(*BACnetObjectTypesSupportedTagged); ok { @@ -213,6 +217,7 @@ func (m *_BACnetObjectTypesSupportedTagged) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetObjectTypesSupportedTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -234,7 +239,7 @@ func BACnetObjectTypesSupportedTaggedParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetObjectTypesSupportedTagged") } @@ -244,12 +249,12 @@ func BACnetObjectTypesSupportedTaggedParseWithBuffer(ctx context.Context, readBu } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -257,7 +262,7 @@ func BACnetObjectTypesSupportedTaggedParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("payload"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for payload") } - _payload, _payloadErr := BACnetTagPayloadBitStringParseWithBuffer(ctx, readBuffer, uint32(header.GetActualLength())) +_payload, _payloadErr := BACnetTagPayloadBitStringParseWithBuffer(ctx, readBuffer , uint32( header.GetActualLength() ) ) if _payloadErr != nil { return nil, errors.Wrap(_payloadErr, "Error parsing 'payload' field of BACnetObjectTypesSupportedTagged") } @@ -267,52 +272,52 @@ func BACnetObjectTypesSupportedTaggedParseWithBuffer(ctx context.Context, readBu } // Virtual field - _timeValue := utils.InlineIf((bool((len(payload.GetData())) > (0))), func() interface{} { return bool(payload.GetData()[0]) }, func() interface{} { return bool(bool(false)) }).(bool) + _timeValue := utils.InlineIf((bool(((len(payload.GetData()))) > ((0)))), func() interface{} {return bool(payload.GetData()[0])}, func() interface{} {return bool(bool(false))}).(bool) timeValue := bool(_timeValue) _ = timeValue // Virtual field - _notificationForwarder := utils.InlineIf((bool((len(payload.GetData())) > (1))), func() interface{} { return bool(payload.GetData()[1]) }, func() interface{} { return bool(bool(false)) }).(bool) + _notificationForwarder := utils.InlineIf((bool(((len(payload.GetData()))) > ((1)))), func() interface{} {return bool(payload.GetData()[1])}, func() interface{} {return bool(bool(false))}).(bool) notificationForwarder := bool(_notificationForwarder) _ = notificationForwarder // Virtual field - _alertEnrollment := utils.InlineIf((bool((len(payload.GetData())) > (2))), func() interface{} { return bool(payload.GetData()[2]) }, func() interface{} { return bool(bool(false)) }).(bool) + _alertEnrollment := utils.InlineIf((bool(((len(payload.GetData()))) > ((2)))), func() interface{} {return bool(payload.GetData()[2])}, func() interface{} {return bool(bool(false))}).(bool) alertEnrollment := bool(_alertEnrollment) _ = alertEnrollment // Virtual field - _channel := utils.InlineIf((bool((len(payload.GetData())) > (3))), func() interface{} { return bool(payload.GetData()[3]) }, func() interface{} { return bool(bool(false)) }).(bool) + _channel := utils.InlineIf((bool(((len(payload.GetData()))) > ((3)))), func() interface{} {return bool(payload.GetData()[3])}, func() interface{} {return bool(bool(false))}).(bool) channel := bool(_channel) _ = channel // Virtual field - _lightingOutput := utils.InlineIf((bool((len(payload.GetData())) > (4))), func() interface{} { return bool(payload.GetData()[4]) }, func() interface{} { return bool(bool(false)) }).(bool) + _lightingOutput := utils.InlineIf((bool(((len(payload.GetData()))) > ((4)))), func() interface{} {return bool(payload.GetData()[4])}, func() interface{} {return bool(bool(false))}).(bool) lightingOutput := bool(_lightingOutput) _ = lightingOutput // Virtual field - _binaryLightingOutput := utils.InlineIf((bool((len(payload.GetData())) > (5))), func() interface{} { return bool(payload.GetData()[5]) }, func() interface{} { return bool(bool(false)) }).(bool) + _binaryLightingOutput := utils.InlineIf((bool(((len(payload.GetData()))) > ((5)))), func() interface{} {return bool(payload.GetData()[5])}, func() interface{} {return bool(bool(false))}).(bool) binaryLightingOutput := bool(_binaryLightingOutput) _ = binaryLightingOutput // Virtual field - _networkPort := utils.InlineIf((bool((len(payload.GetData())) > (6))), func() interface{} { return bool(payload.GetData()[6]) }, func() interface{} { return bool(bool(false)) }).(bool) + _networkPort := utils.InlineIf((bool(((len(payload.GetData()))) > ((6)))), func() interface{} {return bool(payload.GetData()[6])}, func() interface{} {return bool(bool(false))}).(bool) networkPort := bool(_networkPort) _ = networkPort // Virtual field - _elevatorGroup := utils.InlineIf((bool((len(payload.GetData())) > (7))), func() interface{} { return bool(payload.GetData()[7]) }, func() interface{} { return bool(bool(false)) }).(bool) + _elevatorGroup := utils.InlineIf((bool(((len(payload.GetData()))) > ((7)))), func() interface{} {return bool(payload.GetData()[7])}, func() interface{} {return bool(bool(false))}).(bool) elevatorGroup := bool(_elevatorGroup) _ = elevatorGroup // Virtual field - _escalator := utils.InlineIf((bool((len(payload.GetData())) > (8))), func() interface{} { return bool(payload.GetData()[8]) }, func() interface{} { return bool(bool(false)) }).(bool) + _escalator := utils.InlineIf((bool(((len(payload.GetData()))) > ((8)))), func() interface{} {return bool(payload.GetData()[8])}, func() interface{} {return bool(bool(false))}).(bool) escalator := bool(_escalator) _ = escalator // Virtual field - _lift := utils.InlineIf((bool((len(payload.GetData())) > (9))), func() interface{} { return bool(payload.GetData()[9]) }, func() interface{} { return bool(bool(false)) }).(bool) + _lift := utils.InlineIf((bool(((len(payload.GetData()))) > ((9)))), func() interface{} {return bool(payload.GetData()[9])}, func() interface{} {return bool(bool(false))}).(bool) lift := bool(_lift) _ = lift @@ -322,11 +327,11 @@ func BACnetObjectTypesSupportedTaggedParseWithBuffer(ctx context.Context, readBu // Create the instance return &_BACnetObjectTypesSupportedTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Payload: payload, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Payload: payload, + }, nil } func (m *_BACnetObjectTypesSupportedTagged) Serialize() ([]byte, error) { @@ -340,7 +345,7 @@ func (m *_BACnetObjectTypesSupportedTagged) Serialize() ([]byte, error) { func (m *_BACnetObjectTypesSupportedTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetObjectTypesSupportedTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetObjectTypesSupportedTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetObjectTypesSupportedTagged") } @@ -414,6 +419,7 @@ func (m *_BACnetObjectTypesSupportedTagged) SerializeWithWriteBuffer(ctx context return nil } + //// // Arguments Getter @@ -423,7 +429,6 @@ func (m *_BACnetObjectTypesSupportedTagged) GetTagNumber() uint8 { func (m *_BACnetObjectTypesSupportedTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -441,3 +446,6 @@ func (m *_BACnetObjectTypesSupportedTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetOpeningTag.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetOpeningTag.go index 71dfc9fcc89..3ffcfd406c2 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetOpeningTag.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetOpeningTag.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetOpeningTag is the corresponding interface of BACnetOpeningTag type BACnetOpeningTag interface { @@ -44,12 +46,13 @@ type BACnetOpeningTagExactly interface { // _BACnetOpeningTag is the data-structure of this message type _BACnetOpeningTag struct { - Header BACnetTagHeader + Header BACnetTagHeader // Arguments. TagNumberArgument uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -64,14 +67,15 @@ func (m *_BACnetOpeningTag) GetHeader() BACnetTagHeader { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetOpeningTag factory function for _BACnetOpeningTag -func NewBACnetOpeningTag(header BACnetTagHeader, tagNumberArgument uint8) *_BACnetOpeningTag { - return &_BACnetOpeningTag{Header: header, TagNumberArgument: tagNumberArgument} +func NewBACnetOpeningTag( header BACnetTagHeader , tagNumberArgument uint8 ) *_BACnetOpeningTag { +return &_BACnetOpeningTag{ Header: header , TagNumberArgument: tagNumberArgument } } // Deprecated: use the interface for direct cast func CastBACnetOpeningTag(structType interface{}) BACnetOpeningTag { - if casted, ok := structType.(BACnetOpeningTag); ok { + if casted, ok := structType.(BACnetOpeningTag); ok { return casted } if casted, ok := structType.(*BACnetOpeningTag); ok { @@ -93,6 +97,7 @@ func (m *_BACnetOpeningTag) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetOpeningTag) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -114,7 +119,7 @@ func BACnetOpeningTagParseWithBuffer(ctx context.Context, readBuffer utils.ReadB if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetOpeningTag") } @@ -124,17 +129,17 @@ func BACnetOpeningTagParseWithBuffer(ctx context.Context, readBuffer utils.ReadB } // Validation - if !(bool((header.GetActualTagNumber()) == (tagNumberArgument))) { + if (!(bool((header.GetActualTagNumber()) == (tagNumberArgument)))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } // Validation - if !(bool((header.GetTagClass()) == (TagClass_CONTEXT_SPECIFIC_TAGS))) { + if (!(bool((header.GetTagClass()) == (TagClass_CONTEXT_SPECIFIC_TAGS)))) { return nil, errors.WithStack(utils.ParseValidationError{"should be a context tag"}) } // Validation - if !(bool((header.GetLengthValueType()) == (6))) { + if (!(bool((header.GetLengthValueType()) == ((6))))) { return nil, errors.WithStack(utils.ParseValidationError{"opening tag should have a value of 6"}) } @@ -144,9 +149,9 @@ func BACnetOpeningTagParseWithBuffer(ctx context.Context, readBuffer utils.ReadB // Create the instance return &_BACnetOpeningTag{ - TagNumberArgument: tagNumberArgument, - Header: header, - }, nil + TagNumberArgument: tagNumberArgument, + Header: header, + }, nil } func (m *_BACnetOpeningTag) Serialize() ([]byte, error) { @@ -160,7 +165,7 @@ func (m *_BACnetOpeningTag) Serialize() ([]byte, error) { func (m *_BACnetOpeningTag) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetOpeningTag"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetOpeningTag"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetOpeningTag") } @@ -182,13 +187,13 @@ func (m *_BACnetOpeningTag) SerializeWithWriteBuffer(ctx context.Context, writeB return nil } + //// // Arguments Getter func (m *_BACnetOpeningTag) GetTagNumberArgument() uint8 { return m.TagNumberArgument } - // //// @@ -206,3 +211,6 @@ func (m *_BACnetOpeningTag) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalBinaryPV.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalBinaryPV.go index 5f5aeb88d46..667533b7d2d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalBinaryPV.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalBinaryPV.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetOptionalBinaryPV is the corresponding interface of BACnetOptionalBinaryPV type BACnetOptionalBinaryPV interface { @@ -47,7 +49,7 @@ type BACnetOptionalBinaryPVExactly interface { // _BACnetOptionalBinaryPV is the data-structure of this message type _BACnetOptionalBinaryPV struct { _BACnetOptionalBinaryPVChildRequirements - PeekedTagHeader BACnetTagHeader + PeekedTagHeader BACnetTagHeader } type _BACnetOptionalBinaryPVChildRequirements interface { @@ -55,6 +57,7 @@ type _BACnetOptionalBinaryPVChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type BACnetOptionalBinaryPVParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetOptionalBinaryPV, serializeChildFunction func() error) error GetTypeName() string @@ -62,13 +65,12 @@ type BACnetOptionalBinaryPVParent interface { type BACnetOptionalBinaryPVChild interface { utils.Serializable - InitializeParent(parent BACnetOptionalBinaryPV, peekedTagHeader BACnetTagHeader) +InitializeParent(parent BACnetOptionalBinaryPV , peekedTagHeader BACnetTagHeader ) GetParent() *BACnetOptionalBinaryPV GetTypeName() string BACnetOptionalBinaryPV } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,14 +100,15 @@ func (m *_BACnetOptionalBinaryPV) GetPeekedTagNumber() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetOptionalBinaryPV factory function for _BACnetOptionalBinaryPV -func NewBACnetOptionalBinaryPV(peekedTagHeader BACnetTagHeader) *_BACnetOptionalBinaryPV { - return &_BACnetOptionalBinaryPV{PeekedTagHeader: peekedTagHeader} +func NewBACnetOptionalBinaryPV( peekedTagHeader BACnetTagHeader ) *_BACnetOptionalBinaryPV { +return &_BACnetOptionalBinaryPV{ PeekedTagHeader: peekedTagHeader } } // Deprecated: use the interface for direct cast func CastBACnetOptionalBinaryPV(structType interface{}) BACnetOptionalBinaryPV { - if casted, ok := structType.(BACnetOptionalBinaryPV); ok { + if casted, ok := structType.(BACnetOptionalBinaryPV); ok { return casted } if casted, ok := structType.(*BACnetOptionalBinaryPV); ok { @@ -118,6 +121,7 @@ func (m *_BACnetOptionalBinaryPV) GetTypeName() string { return "BACnetOptionalBinaryPV" } + func (m *_BACnetOptionalBinaryPV) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -143,13 +147,13 @@ func BACnetOptionalBinaryPVParseWithBuffer(ctx context.Context, readBuffer utils currentPos := positionAware.GetPos() _ = currentPos - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Virtual field _peekedTagNumber := peekedTagHeader.GetActualTagNumber() @@ -159,17 +163,17 @@ func BACnetOptionalBinaryPVParseWithBuffer(ctx context.Context, readBuffer utils // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetOptionalBinaryPVChildSerializeRequirement interface { BACnetOptionalBinaryPV - InitializeParent(BACnetOptionalBinaryPV, BACnetTagHeader) + InitializeParent(BACnetOptionalBinaryPV, BACnetTagHeader) GetParent() BACnetOptionalBinaryPV } var _childTemp interface{} var _child BACnetOptionalBinaryPVChildSerializeRequirement var typeSwitchError error switch { - case peekedTagNumber == uint8(0): // BACnetOptionalBinaryPVNull - _childTemp, typeSwitchError = BACnetOptionalBinaryPVNullParseWithBuffer(ctx, readBuffer) - case 0 == 0: // BACnetOptionalBinaryPVValue - _childTemp, typeSwitchError = BACnetOptionalBinaryPVValueParseWithBuffer(ctx, readBuffer) +case peekedTagNumber == uint8(0) : // BACnetOptionalBinaryPVNull + _childTemp, typeSwitchError = BACnetOptionalBinaryPVNullParseWithBuffer(ctx, readBuffer, ) +case 0==0 : // BACnetOptionalBinaryPVValue + _childTemp, typeSwitchError = BACnetOptionalBinaryPVValueParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedTagNumber=%v]", peekedTagNumber) } @@ -183,7 +187,7 @@ func BACnetOptionalBinaryPVParseWithBuffer(ctx context.Context, readBuffer utils } // Finish initializing - _child.InitializeParent(_child, peekedTagHeader) +_child.InitializeParent(_child , peekedTagHeader ) return _child, nil } @@ -193,7 +197,7 @@ func (pm *_BACnetOptionalBinaryPV) SerializeParent(ctx context.Context, writeBuf _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetOptionalBinaryPV"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetOptionalBinaryPV"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetOptionalBinaryPV") } // Virtual field @@ -212,6 +216,7 @@ func (pm *_BACnetOptionalBinaryPV) SerializeParent(ctx context.Context, writeBuf return nil } + func (m *_BACnetOptionalBinaryPV) isBACnetOptionalBinaryPV() bool { return true } @@ -226,3 +231,6 @@ func (m *_BACnetOptionalBinaryPV) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalBinaryPVNull.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalBinaryPVNull.go index 6a1e92fc5f8..5b4eb0c7c88 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalBinaryPVNull.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalBinaryPVNull.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetOptionalBinaryPVNull is the corresponding interface of BACnetOptionalBinaryPVNull type BACnetOptionalBinaryPVNull interface { @@ -46,9 +48,11 @@ type BACnetOptionalBinaryPVNullExactly interface { // _BACnetOptionalBinaryPVNull is the data-structure of this message type _BACnetOptionalBinaryPVNull struct { *_BACnetOptionalBinaryPV - NullValue BACnetApplicationTagNull + NullValue BACnetApplicationTagNull } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetOptionalBinaryPVNull struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetOptionalBinaryPVNull) InitializeParent(parent BACnetOptionalBinaryPV, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetOptionalBinaryPVNull) InitializeParent(parent BACnetOptionalBinaryPV , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetOptionalBinaryPVNull) GetParent() BACnetOptionalBinaryPV { +func (m *_BACnetOptionalBinaryPVNull) GetParent() BACnetOptionalBinaryPV { return m._BACnetOptionalBinaryPV } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetOptionalBinaryPVNull) GetNullValue() BACnetApplicationTagNull { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetOptionalBinaryPVNull factory function for _BACnetOptionalBinaryPVNull -func NewBACnetOptionalBinaryPVNull(nullValue BACnetApplicationTagNull, peekedTagHeader BACnetTagHeader) *_BACnetOptionalBinaryPVNull { +func NewBACnetOptionalBinaryPVNull( nullValue BACnetApplicationTagNull , peekedTagHeader BACnetTagHeader ) *_BACnetOptionalBinaryPVNull { _result := &_BACnetOptionalBinaryPVNull{ - NullValue: nullValue, - _BACnetOptionalBinaryPV: NewBACnetOptionalBinaryPV(peekedTagHeader), + NullValue: nullValue, + _BACnetOptionalBinaryPV: NewBACnetOptionalBinaryPV(peekedTagHeader), } _result._BACnetOptionalBinaryPV._BACnetOptionalBinaryPVChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetOptionalBinaryPVNull(nullValue BACnetApplicationTagNull, peekedTag // Deprecated: use the interface for direct cast func CastBACnetOptionalBinaryPVNull(structType interface{}) BACnetOptionalBinaryPVNull { - if casted, ok := structType.(BACnetOptionalBinaryPVNull); ok { + if casted, ok := structType.(BACnetOptionalBinaryPVNull); ok { return casted } if casted, ok := structType.(*BACnetOptionalBinaryPVNull); ok { @@ -115,6 +118,7 @@ func (m *_BACnetOptionalBinaryPVNull) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_BACnetOptionalBinaryPVNull) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetOptionalBinaryPVNullParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("nullValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for nullValue") } - _nullValue, _nullValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_nullValue, _nullValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _nullValueErr != nil { return nil, errors.Wrap(_nullValueErr, "Error parsing 'nullValue' field of BACnetOptionalBinaryPVNull") } @@ -151,8 +155,9 @@ func BACnetOptionalBinaryPVNullParseWithBuffer(ctx context.Context, readBuffer u // Create a partially initialized instance _child := &_BACnetOptionalBinaryPVNull{ - _BACnetOptionalBinaryPV: &_BACnetOptionalBinaryPV{}, - NullValue: nullValue, + _BACnetOptionalBinaryPV: &_BACnetOptionalBinaryPV{ + }, + NullValue: nullValue, } _child._BACnetOptionalBinaryPV._BACnetOptionalBinaryPVChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetOptionalBinaryPVNull) SerializeWithWriteBuffer(ctx context.Conte return errors.Wrap(pushErr, "Error pushing for BACnetOptionalBinaryPVNull") } - // Simple Field (nullValue) - if pushErr := writeBuffer.PushContext("nullValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for nullValue") - } - _nullValueErr := writeBuffer.WriteSerializable(ctx, m.GetNullValue()) - if popErr := writeBuffer.PopContext("nullValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for nullValue") - } - if _nullValueErr != nil { - return errors.Wrap(_nullValueErr, "Error serializing 'nullValue' field") - } + // Simple Field (nullValue) + if pushErr := writeBuffer.PushContext("nullValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for nullValue") + } + _nullValueErr := writeBuffer.WriteSerializable(ctx, m.GetNullValue()) + if popErr := writeBuffer.PopContext("nullValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for nullValue") + } + if _nullValueErr != nil { + return errors.Wrap(_nullValueErr, "Error serializing 'nullValue' field") + } if popErr := writeBuffer.PopContext("BACnetOptionalBinaryPVNull"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetOptionalBinaryPVNull") @@ -194,6 +199,7 @@ func (m *_BACnetOptionalBinaryPVNull) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetOptionalBinaryPVNull) isBACnetOptionalBinaryPVNull() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetOptionalBinaryPVNull) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalBinaryPVValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalBinaryPVValue.go index bc63ff19874..87bc47cd536 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalBinaryPVValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalBinaryPVValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetOptionalBinaryPVValue is the corresponding interface of BACnetOptionalBinaryPVValue type BACnetOptionalBinaryPVValue interface { @@ -46,9 +48,11 @@ type BACnetOptionalBinaryPVValueExactly interface { // _BACnetOptionalBinaryPVValue is the data-structure of this message type _BACnetOptionalBinaryPVValue struct { *_BACnetOptionalBinaryPV - BinaryPv BACnetBinaryPVTagged + BinaryPv BACnetBinaryPVTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetOptionalBinaryPVValue struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetOptionalBinaryPVValue) InitializeParent(parent BACnetOptionalBinaryPV, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetOptionalBinaryPVValue) InitializeParent(parent BACnetOptionalBinaryPV , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetOptionalBinaryPVValue) GetParent() BACnetOptionalBinaryPV { +func (m *_BACnetOptionalBinaryPVValue) GetParent() BACnetOptionalBinaryPV { return m._BACnetOptionalBinaryPV } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetOptionalBinaryPVValue) GetBinaryPv() BACnetBinaryPVTagged { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetOptionalBinaryPVValue factory function for _BACnetOptionalBinaryPVValue -func NewBACnetOptionalBinaryPVValue(binaryPv BACnetBinaryPVTagged, peekedTagHeader BACnetTagHeader) *_BACnetOptionalBinaryPVValue { +func NewBACnetOptionalBinaryPVValue( binaryPv BACnetBinaryPVTagged , peekedTagHeader BACnetTagHeader ) *_BACnetOptionalBinaryPVValue { _result := &_BACnetOptionalBinaryPVValue{ - BinaryPv: binaryPv, - _BACnetOptionalBinaryPV: NewBACnetOptionalBinaryPV(peekedTagHeader), + BinaryPv: binaryPv, + _BACnetOptionalBinaryPV: NewBACnetOptionalBinaryPV(peekedTagHeader), } _result._BACnetOptionalBinaryPV._BACnetOptionalBinaryPVChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetOptionalBinaryPVValue(binaryPv BACnetBinaryPVTagged, peekedTagHead // Deprecated: use the interface for direct cast func CastBACnetOptionalBinaryPVValue(structType interface{}) BACnetOptionalBinaryPVValue { - if casted, ok := structType.(BACnetOptionalBinaryPVValue); ok { + if casted, ok := structType.(BACnetOptionalBinaryPVValue); ok { return casted } if casted, ok := structType.(*BACnetOptionalBinaryPVValue); ok { @@ -115,6 +118,7 @@ func (m *_BACnetOptionalBinaryPVValue) GetLengthInBits(ctx context.Context) uint return lengthInBits } + func (m *_BACnetOptionalBinaryPVValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetOptionalBinaryPVValueParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("binaryPv"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for binaryPv") } - _binaryPv, _binaryPvErr := BACnetBinaryPVTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_binaryPv, _binaryPvErr := BACnetBinaryPVTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _binaryPvErr != nil { return nil, errors.Wrap(_binaryPvErr, "Error parsing 'binaryPv' field of BACnetOptionalBinaryPVValue") } @@ -151,8 +155,9 @@ func BACnetOptionalBinaryPVValueParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_BACnetOptionalBinaryPVValue{ - _BACnetOptionalBinaryPV: &_BACnetOptionalBinaryPV{}, - BinaryPv: binaryPv, + _BACnetOptionalBinaryPV: &_BACnetOptionalBinaryPV{ + }, + BinaryPv: binaryPv, } _child._BACnetOptionalBinaryPV._BACnetOptionalBinaryPVChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetOptionalBinaryPVValue) SerializeWithWriteBuffer(ctx context.Cont return errors.Wrap(pushErr, "Error pushing for BACnetOptionalBinaryPVValue") } - // Simple Field (binaryPv) - if pushErr := writeBuffer.PushContext("binaryPv"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for binaryPv") - } - _binaryPvErr := writeBuffer.WriteSerializable(ctx, m.GetBinaryPv()) - if popErr := writeBuffer.PopContext("binaryPv"); popErr != nil { - return errors.Wrap(popErr, "Error popping for binaryPv") - } - if _binaryPvErr != nil { - return errors.Wrap(_binaryPvErr, "Error serializing 'binaryPv' field") - } + // Simple Field (binaryPv) + if pushErr := writeBuffer.PushContext("binaryPv"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for binaryPv") + } + _binaryPvErr := writeBuffer.WriteSerializable(ctx, m.GetBinaryPv()) + if popErr := writeBuffer.PopContext("binaryPv"); popErr != nil { + return errors.Wrap(popErr, "Error popping for binaryPv") + } + if _binaryPvErr != nil { + return errors.Wrap(_binaryPvErr, "Error serializing 'binaryPv' field") + } if popErr := writeBuffer.PopContext("BACnetOptionalBinaryPVValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetOptionalBinaryPVValue") @@ -194,6 +199,7 @@ func (m *_BACnetOptionalBinaryPVValue) SerializeWithWriteBuffer(ctx context.Cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetOptionalBinaryPVValue) isBACnetOptionalBinaryPVValue() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetOptionalBinaryPVValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalCharacterString.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalCharacterString.go index d39cfe8558b..def7d240f2b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalCharacterString.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalCharacterString.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetOptionalCharacterString is the corresponding interface of BACnetOptionalCharacterString type BACnetOptionalCharacterString interface { @@ -47,7 +49,7 @@ type BACnetOptionalCharacterStringExactly interface { // _BACnetOptionalCharacterString is the data-structure of this message type _BACnetOptionalCharacterString struct { _BACnetOptionalCharacterStringChildRequirements - PeekedTagHeader BACnetTagHeader + PeekedTagHeader BACnetTagHeader } type _BACnetOptionalCharacterStringChildRequirements interface { @@ -55,6 +57,7 @@ type _BACnetOptionalCharacterStringChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type BACnetOptionalCharacterStringParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetOptionalCharacterString, serializeChildFunction func() error) error GetTypeName() string @@ -62,13 +65,12 @@ type BACnetOptionalCharacterStringParent interface { type BACnetOptionalCharacterStringChild interface { utils.Serializable - InitializeParent(parent BACnetOptionalCharacterString, peekedTagHeader BACnetTagHeader) +InitializeParent(parent BACnetOptionalCharacterString , peekedTagHeader BACnetTagHeader ) GetParent() *BACnetOptionalCharacterString GetTypeName() string BACnetOptionalCharacterString } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,14 +100,15 @@ func (m *_BACnetOptionalCharacterString) GetPeekedTagNumber() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetOptionalCharacterString factory function for _BACnetOptionalCharacterString -func NewBACnetOptionalCharacterString(peekedTagHeader BACnetTagHeader) *_BACnetOptionalCharacterString { - return &_BACnetOptionalCharacterString{PeekedTagHeader: peekedTagHeader} +func NewBACnetOptionalCharacterString( peekedTagHeader BACnetTagHeader ) *_BACnetOptionalCharacterString { +return &_BACnetOptionalCharacterString{ PeekedTagHeader: peekedTagHeader } } // Deprecated: use the interface for direct cast func CastBACnetOptionalCharacterString(structType interface{}) BACnetOptionalCharacterString { - if casted, ok := structType.(BACnetOptionalCharacterString); ok { + if casted, ok := structType.(BACnetOptionalCharacterString); ok { return casted } if casted, ok := structType.(*BACnetOptionalCharacterString); ok { @@ -118,6 +121,7 @@ func (m *_BACnetOptionalCharacterString) GetTypeName() string { return "BACnetOptionalCharacterString" } + func (m *_BACnetOptionalCharacterString) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -143,13 +147,13 @@ func BACnetOptionalCharacterStringParseWithBuffer(ctx context.Context, readBuffe currentPos := positionAware.GetPos() _ = currentPos - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Virtual field _peekedTagNumber := peekedTagHeader.GetActualTagNumber() @@ -159,17 +163,17 @@ func BACnetOptionalCharacterStringParseWithBuffer(ctx context.Context, readBuffe // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetOptionalCharacterStringChildSerializeRequirement interface { BACnetOptionalCharacterString - InitializeParent(BACnetOptionalCharacterString, BACnetTagHeader) + InitializeParent(BACnetOptionalCharacterString, BACnetTagHeader) GetParent() BACnetOptionalCharacterString } var _childTemp interface{} var _child BACnetOptionalCharacterStringChildSerializeRequirement var typeSwitchError error switch { - case peekedTagNumber == uint8(0): // BACnetOptionalCharacterStringNull - _childTemp, typeSwitchError = BACnetOptionalCharacterStringNullParseWithBuffer(ctx, readBuffer) - case 0 == 0: // BACnetOptionalCharacterStringValue - _childTemp, typeSwitchError = BACnetOptionalCharacterStringValueParseWithBuffer(ctx, readBuffer) +case peekedTagNumber == uint8(0) : // BACnetOptionalCharacterStringNull + _childTemp, typeSwitchError = BACnetOptionalCharacterStringNullParseWithBuffer(ctx, readBuffer, ) +case 0==0 : // BACnetOptionalCharacterStringValue + _childTemp, typeSwitchError = BACnetOptionalCharacterStringValueParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedTagNumber=%v]", peekedTagNumber) } @@ -183,7 +187,7 @@ func BACnetOptionalCharacterStringParseWithBuffer(ctx context.Context, readBuffe } // Finish initializing - _child.InitializeParent(_child, peekedTagHeader) +_child.InitializeParent(_child , peekedTagHeader ) return _child, nil } @@ -193,7 +197,7 @@ func (pm *_BACnetOptionalCharacterString) SerializeParent(ctx context.Context, w _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetOptionalCharacterString"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetOptionalCharacterString"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetOptionalCharacterString") } // Virtual field @@ -212,6 +216,7 @@ func (pm *_BACnetOptionalCharacterString) SerializeParent(ctx context.Context, w return nil } + func (m *_BACnetOptionalCharacterString) isBACnetOptionalCharacterString() bool { return true } @@ -226,3 +231,6 @@ func (m *_BACnetOptionalCharacterString) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalCharacterStringNull.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalCharacterStringNull.go index 5013f88d176..dffada4466f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalCharacterStringNull.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalCharacterStringNull.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetOptionalCharacterStringNull is the corresponding interface of BACnetOptionalCharacterStringNull type BACnetOptionalCharacterStringNull interface { @@ -46,9 +48,11 @@ type BACnetOptionalCharacterStringNullExactly interface { // _BACnetOptionalCharacterStringNull is the data-structure of this message type _BACnetOptionalCharacterStringNull struct { *_BACnetOptionalCharacterString - NullValue BACnetApplicationTagNull + NullValue BACnetApplicationTagNull } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetOptionalCharacterStringNull struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetOptionalCharacterStringNull) InitializeParent(parent BACnetOptionalCharacterString, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetOptionalCharacterStringNull) InitializeParent(parent BACnetOptionalCharacterString , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetOptionalCharacterStringNull) GetParent() BACnetOptionalCharacterString { +func (m *_BACnetOptionalCharacterStringNull) GetParent() BACnetOptionalCharacterString { return m._BACnetOptionalCharacterString } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetOptionalCharacterStringNull) GetNullValue() BACnetApplicationTag /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetOptionalCharacterStringNull factory function for _BACnetOptionalCharacterStringNull -func NewBACnetOptionalCharacterStringNull(nullValue BACnetApplicationTagNull, peekedTagHeader BACnetTagHeader) *_BACnetOptionalCharacterStringNull { +func NewBACnetOptionalCharacterStringNull( nullValue BACnetApplicationTagNull , peekedTagHeader BACnetTagHeader ) *_BACnetOptionalCharacterStringNull { _result := &_BACnetOptionalCharacterStringNull{ - NullValue: nullValue, - _BACnetOptionalCharacterString: NewBACnetOptionalCharacterString(peekedTagHeader), + NullValue: nullValue, + _BACnetOptionalCharacterString: NewBACnetOptionalCharacterString(peekedTagHeader), } _result._BACnetOptionalCharacterString._BACnetOptionalCharacterStringChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetOptionalCharacterStringNull(nullValue BACnetApplicationTagNull, pe // Deprecated: use the interface for direct cast func CastBACnetOptionalCharacterStringNull(structType interface{}) BACnetOptionalCharacterStringNull { - if casted, ok := structType.(BACnetOptionalCharacterStringNull); ok { + if casted, ok := structType.(BACnetOptionalCharacterStringNull); ok { return casted } if casted, ok := structType.(*BACnetOptionalCharacterStringNull); ok { @@ -115,6 +118,7 @@ func (m *_BACnetOptionalCharacterStringNull) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetOptionalCharacterStringNull) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetOptionalCharacterStringNullParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("nullValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for nullValue") } - _nullValue, _nullValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_nullValue, _nullValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _nullValueErr != nil { return nil, errors.Wrap(_nullValueErr, "Error parsing 'nullValue' field of BACnetOptionalCharacterStringNull") } @@ -151,8 +155,9 @@ func BACnetOptionalCharacterStringNullParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetOptionalCharacterStringNull{ - _BACnetOptionalCharacterString: &_BACnetOptionalCharacterString{}, - NullValue: nullValue, + _BACnetOptionalCharacterString: &_BACnetOptionalCharacterString{ + }, + NullValue: nullValue, } _child._BACnetOptionalCharacterString._BACnetOptionalCharacterStringChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetOptionalCharacterStringNull) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetOptionalCharacterStringNull") } - // Simple Field (nullValue) - if pushErr := writeBuffer.PushContext("nullValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for nullValue") - } - _nullValueErr := writeBuffer.WriteSerializable(ctx, m.GetNullValue()) - if popErr := writeBuffer.PopContext("nullValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for nullValue") - } - if _nullValueErr != nil { - return errors.Wrap(_nullValueErr, "Error serializing 'nullValue' field") - } + // Simple Field (nullValue) + if pushErr := writeBuffer.PushContext("nullValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for nullValue") + } + _nullValueErr := writeBuffer.WriteSerializable(ctx, m.GetNullValue()) + if popErr := writeBuffer.PopContext("nullValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for nullValue") + } + if _nullValueErr != nil { + return errors.Wrap(_nullValueErr, "Error serializing 'nullValue' field") + } if popErr := writeBuffer.PopContext("BACnetOptionalCharacterStringNull"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetOptionalCharacterStringNull") @@ -194,6 +199,7 @@ func (m *_BACnetOptionalCharacterStringNull) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetOptionalCharacterStringNull) isBACnetOptionalCharacterStringNull() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetOptionalCharacterStringNull) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalCharacterStringValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalCharacterStringValue.go index f5c8c45964d..8db1f8d11a6 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalCharacterStringValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalCharacterStringValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetOptionalCharacterStringValue is the corresponding interface of BACnetOptionalCharacterStringValue type BACnetOptionalCharacterStringValue interface { @@ -46,9 +48,11 @@ type BACnetOptionalCharacterStringValueExactly interface { // _BACnetOptionalCharacterStringValue is the data-structure of this message type _BACnetOptionalCharacterStringValue struct { *_BACnetOptionalCharacterString - Characterstring BACnetApplicationTagCharacterString + Characterstring BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetOptionalCharacterStringValue struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetOptionalCharacterStringValue) InitializeParent(parent BACnetOptionalCharacterString, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetOptionalCharacterStringValue) InitializeParent(parent BACnetOptionalCharacterString , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetOptionalCharacterStringValue) GetParent() BACnetOptionalCharacterString { +func (m *_BACnetOptionalCharacterStringValue) GetParent() BACnetOptionalCharacterString { return m._BACnetOptionalCharacterString } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetOptionalCharacterStringValue) GetCharacterstring() BACnetApplica /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetOptionalCharacterStringValue factory function for _BACnetOptionalCharacterStringValue -func NewBACnetOptionalCharacterStringValue(characterstring BACnetApplicationTagCharacterString, peekedTagHeader BACnetTagHeader) *_BACnetOptionalCharacterStringValue { +func NewBACnetOptionalCharacterStringValue( characterstring BACnetApplicationTagCharacterString , peekedTagHeader BACnetTagHeader ) *_BACnetOptionalCharacterStringValue { _result := &_BACnetOptionalCharacterStringValue{ - Characterstring: characterstring, - _BACnetOptionalCharacterString: NewBACnetOptionalCharacterString(peekedTagHeader), + Characterstring: characterstring, + _BACnetOptionalCharacterString: NewBACnetOptionalCharacterString(peekedTagHeader), } _result._BACnetOptionalCharacterString._BACnetOptionalCharacterStringChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetOptionalCharacterStringValue(characterstring BACnetApplicationTagC // Deprecated: use the interface for direct cast func CastBACnetOptionalCharacterStringValue(structType interface{}) BACnetOptionalCharacterStringValue { - if casted, ok := structType.(BACnetOptionalCharacterStringValue); ok { + if casted, ok := structType.(BACnetOptionalCharacterStringValue); ok { return casted } if casted, ok := structType.(*BACnetOptionalCharacterStringValue); ok { @@ -115,6 +118,7 @@ func (m *_BACnetOptionalCharacterStringValue) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetOptionalCharacterStringValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetOptionalCharacterStringValueParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("characterstring"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for characterstring") } - _characterstring, _characterstringErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_characterstring, _characterstringErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _characterstringErr != nil { return nil, errors.Wrap(_characterstringErr, "Error parsing 'characterstring' field of BACnetOptionalCharacterStringValue") } @@ -151,8 +155,9 @@ func BACnetOptionalCharacterStringValueParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetOptionalCharacterStringValue{ - _BACnetOptionalCharacterString: &_BACnetOptionalCharacterString{}, - Characterstring: characterstring, + _BACnetOptionalCharacterString: &_BACnetOptionalCharacterString{ + }, + Characterstring: characterstring, } _child._BACnetOptionalCharacterString._BACnetOptionalCharacterStringChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetOptionalCharacterStringValue) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetOptionalCharacterStringValue") } - // Simple Field (characterstring) - if pushErr := writeBuffer.PushContext("characterstring"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for characterstring") - } - _characterstringErr := writeBuffer.WriteSerializable(ctx, m.GetCharacterstring()) - if popErr := writeBuffer.PopContext("characterstring"); popErr != nil { - return errors.Wrap(popErr, "Error popping for characterstring") - } - if _characterstringErr != nil { - return errors.Wrap(_characterstringErr, "Error serializing 'characterstring' field") - } + // Simple Field (characterstring) + if pushErr := writeBuffer.PushContext("characterstring"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for characterstring") + } + _characterstringErr := writeBuffer.WriteSerializable(ctx, m.GetCharacterstring()) + if popErr := writeBuffer.PopContext("characterstring"); popErr != nil { + return errors.Wrap(popErr, "Error popping for characterstring") + } + if _characterstringErr != nil { + return errors.Wrap(_characterstringErr, "Error serializing 'characterstring' field") + } if popErr := writeBuffer.PopContext("BACnetOptionalCharacterStringValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetOptionalCharacterStringValue") @@ -194,6 +199,7 @@ func (m *_BACnetOptionalCharacterStringValue) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetOptionalCharacterStringValue) isBACnetOptionalCharacterStringValue() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetOptionalCharacterStringValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalREAL.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalREAL.go index 50d59fb1107..d811ac58429 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalREAL.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalREAL.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetOptionalREAL is the corresponding interface of BACnetOptionalREAL type BACnetOptionalREAL interface { @@ -47,7 +49,7 @@ type BACnetOptionalREALExactly interface { // _BACnetOptionalREAL is the data-structure of this message type _BACnetOptionalREAL struct { _BACnetOptionalREALChildRequirements - PeekedTagHeader BACnetTagHeader + PeekedTagHeader BACnetTagHeader } type _BACnetOptionalREALChildRequirements interface { @@ -55,6 +57,7 @@ type _BACnetOptionalREALChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type BACnetOptionalREALParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetOptionalREAL, serializeChildFunction func() error) error GetTypeName() string @@ -62,13 +65,12 @@ type BACnetOptionalREALParent interface { type BACnetOptionalREALChild interface { utils.Serializable - InitializeParent(parent BACnetOptionalREAL, peekedTagHeader BACnetTagHeader) +InitializeParent(parent BACnetOptionalREAL , peekedTagHeader BACnetTagHeader ) GetParent() *BACnetOptionalREAL GetTypeName() string BACnetOptionalREAL } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,14 +100,15 @@ func (m *_BACnetOptionalREAL) GetPeekedTagNumber() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetOptionalREAL factory function for _BACnetOptionalREAL -func NewBACnetOptionalREAL(peekedTagHeader BACnetTagHeader) *_BACnetOptionalREAL { - return &_BACnetOptionalREAL{PeekedTagHeader: peekedTagHeader} +func NewBACnetOptionalREAL( peekedTagHeader BACnetTagHeader ) *_BACnetOptionalREAL { +return &_BACnetOptionalREAL{ PeekedTagHeader: peekedTagHeader } } // Deprecated: use the interface for direct cast func CastBACnetOptionalREAL(structType interface{}) BACnetOptionalREAL { - if casted, ok := structType.(BACnetOptionalREAL); ok { + if casted, ok := structType.(BACnetOptionalREAL); ok { return casted } if casted, ok := structType.(*BACnetOptionalREAL); ok { @@ -118,6 +121,7 @@ func (m *_BACnetOptionalREAL) GetTypeName() string { return "BACnetOptionalREAL" } + func (m *_BACnetOptionalREAL) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -143,13 +147,13 @@ func BACnetOptionalREALParseWithBuffer(ctx context.Context, readBuffer utils.Rea currentPos := positionAware.GetPos() _ = currentPos - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Virtual field _peekedTagNumber := peekedTagHeader.GetActualTagNumber() @@ -159,17 +163,17 @@ func BACnetOptionalREALParseWithBuffer(ctx context.Context, readBuffer utils.Rea // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetOptionalREALChildSerializeRequirement interface { BACnetOptionalREAL - InitializeParent(BACnetOptionalREAL, BACnetTagHeader) + InitializeParent(BACnetOptionalREAL, BACnetTagHeader) GetParent() BACnetOptionalREAL } var _childTemp interface{} var _child BACnetOptionalREALChildSerializeRequirement var typeSwitchError error switch { - case peekedTagNumber == uint8(0): // BACnetOptionalREALNull - _childTemp, typeSwitchError = BACnetOptionalREALNullParseWithBuffer(ctx, readBuffer) - case 0 == 0: // BACnetOptionalREALValue - _childTemp, typeSwitchError = BACnetOptionalREALValueParseWithBuffer(ctx, readBuffer) +case peekedTagNumber == uint8(0) : // BACnetOptionalREALNull + _childTemp, typeSwitchError = BACnetOptionalREALNullParseWithBuffer(ctx, readBuffer, ) +case 0==0 : // BACnetOptionalREALValue + _childTemp, typeSwitchError = BACnetOptionalREALValueParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedTagNumber=%v]", peekedTagNumber) } @@ -183,7 +187,7 @@ func BACnetOptionalREALParseWithBuffer(ctx context.Context, readBuffer utils.Rea } // Finish initializing - _child.InitializeParent(_child, peekedTagHeader) +_child.InitializeParent(_child , peekedTagHeader ) return _child, nil } @@ -193,7 +197,7 @@ func (pm *_BACnetOptionalREAL) SerializeParent(ctx context.Context, writeBuffer _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetOptionalREAL"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetOptionalREAL"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetOptionalREAL") } // Virtual field @@ -212,6 +216,7 @@ func (pm *_BACnetOptionalREAL) SerializeParent(ctx context.Context, writeBuffer return nil } + func (m *_BACnetOptionalREAL) isBACnetOptionalREAL() bool { return true } @@ -226,3 +231,6 @@ func (m *_BACnetOptionalREAL) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalREALNull.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalREALNull.go index f5a4eff206b..601703bb781 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalREALNull.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalREALNull.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetOptionalREALNull is the corresponding interface of BACnetOptionalREALNull type BACnetOptionalREALNull interface { @@ -46,9 +48,11 @@ type BACnetOptionalREALNullExactly interface { // _BACnetOptionalREALNull is the data-structure of this message type _BACnetOptionalREALNull struct { *_BACnetOptionalREAL - NullValue BACnetApplicationTagNull + NullValue BACnetApplicationTagNull } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetOptionalREALNull struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetOptionalREALNull) InitializeParent(parent BACnetOptionalREAL, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetOptionalREALNull) InitializeParent(parent BACnetOptionalREAL , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetOptionalREALNull) GetParent() BACnetOptionalREAL { +func (m *_BACnetOptionalREALNull) GetParent() BACnetOptionalREAL { return m._BACnetOptionalREAL } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetOptionalREALNull) GetNullValue() BACnetApplicationTagNull { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetOptionalREALNull factory function for _BACnetOptionalREALNull -func NewBACnetOptionalREALNull(nullValue BACnetApplicationTagNull, peekedTagHeader BACnetTagHeader) *_BACnetOptionalREALNull { +func NewBACnetOptionalREALNull( nullValue BACnetApplicationTagNull , peekedTagHeader BACnetTagHeader ) *_BACnetOptionalREALNull { _result := &_BACnetOptionalREALNull{ - NullValue: nullValue, - _BACnetOptionalREAL: NewBACnetOptionalREAL(peekedTagHeader), + NullValue: nullValue, + _BACnetOptionalREAL: NewBACnetOptionalREAL(peekedTagHeader), } _result._BACnetOptionalREAL._BACnetOptionalREALChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetOptionalREALNull(nullValue BACnetApplicationTagNull, peekedTagHead // Deprecated: use the interface for direct cast func CastBACnetOptionalREALNull(structType interface{}) BACnetOptionalREALNull { - if casted, ok := structType.(BACnetOptionalREALNull); ok { + if casted, ok := structType.(BACnetOptionalREALNull); ok { return casted } if casted, ok := structType.(*BACnetOptionalREALNull); ok { @@ -115,6 +118,7 @@ func (m *_BACnetOptionalREALNull) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetOptionalREALNull) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetOptionalREALNullParseWithBuffer(ctx context.Context, readBuffer utils if pullErr := readBuffer.PullContext("nullValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for nullValue") } - _nullValue, _nullValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_nullValue, _nullValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _nullValueErr != nil { return nil, errors.Wrap(_nullValueErr, "Error parsing 'nullValue' field of BACnetOptionalREALNull") } @@ -151,8 +155,9 @@ func BACnetOptionalREALNullParseWithBuffer(ctx context.Context, readBuffer utils // Create a partially initialized instance _child := &_BACnetOptionalREALNull{ - _BACnetOptionalREAL: &_BACnetOptionalREAL{}, - NullValue: nullValue, + _BACnetOptionalREAL: &_BACnetOptionalREAL{ + }, + NullValue: nullValue, } _child._BACnetOptionalREAL._BACnetOptionalREALChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetOptionalREALNull) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for BACnetOptionalREALNull") } - // Simple Field (nullValue) - if pushErr := writeBuffer.PushContext("nullValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for nullValue") - } - _nullValueErr := writeBuffer.WriteSerializable(ctx, m.GetNullValue()) - if popErr := writeBuffer.PopContext("nullValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for nullValue") - } - if _nullValueErr != nil { - return errors.Wrap(_nullValueErr, "Error serializing 'nullValue' field") - } + // Simple Field (nullValue) + if pushErr := writeBuffer.PushContext("nullValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for nullValue") + } + _nullValueErr := writeBuffer.WriteSerializable(ctx, m.GetNullValue()) + if popErr := writeBuffer.PopContext("nullValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for nullValue") + } + if _nullValueErr != nil { + return errors.Wrap(_nullValueErr, "Error serializing 'nullValue' field") + } if popErr := writeBuffer.PopContext("BACnetOptionalREALNull"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetOptionalREALNull") @@ -194,6 +199,7 @@ func (m *_BACnetOptionalREALNull) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetOptionalREALNull) isBACnetOptionalREALNull() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetOptionalREALNull) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalREALValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalREALValue.go index 540320a6bcb..2b6700de844 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalREALValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalREALValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetOptionalREALValue is the corresponding interface of BACnetOptionalREALValue type BACnetOptionalREALValue interface { @@ -46,9 +48,11 @@ type BACnetOptionalREALValueExactly interface { // _BACnetOptionalREALValue is the data-structure of this message type _BACnetOptionalREALValue struct { *_BACnetOptionalREAL - RealValue BACnetApplicationTagReal + RealValue BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetOptionalREALValue struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetOptionalREALValue) InitializeParent(parent BACnetOptionalREAL, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetOptionalREALValue) InitializeParent(parent BACnetOptionalREAL , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetOptionalREALValue) GetParent() BACnetOptionalREAL { +func (m *_BACnetOptionalREALValue) GetParent() BACnetOptionalREAL { return m._BACnetOptionalREAL } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetOptionalREALValue) GetRealValue() BACnetApplicationTagReal { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetOptionalREALValue factory function for _BACnetOptionalREALValue -func NewBACnetOptionalREALValue(realValue BACnetApplicationTagReal, peekedTagHeader BACnetTagHeader) *_BACnetOptionalREALValue { +func NewBACnetOptionalREALValue( realValue BACnetApplicationTagReal , peekedTagHeader BACnetTagHeader ) *_BACnetOptionalREALValue { _result := &_BACnetOptionalREALValue{ - RealValue: realValue, - _BACnetOptionalREAL: NewBACnetOptionalREAL(peekedTagHeader), + RealValue: realValue, + _BACnetOptionalREAL: NewBACnetOptionalREAL(peekedTagHeader), } _result._BACnetOptionalREAL._BACnetOptionalREALChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetOptionalREALValue(realValue BACnetApplicationTagReal, peekedTagHea // Deprecated: use the interface for direct cast func CastBACnetOptionalREALValue(structType interface{}) BACnetOptionalREALValue { - if casted, ok := structType.(BACnetOptionalREALValue); ok { + if casted, ok := structType.(BACnetOptionalREALValue); ok { return casted } if casted, ok := structType.(*BACnetOptionalREALValue); ok { @@ -115,6 +118,7 @@ func (m *_BACnetOptionalREALValue) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetOptionalREALValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetOptionalREALValueParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("realValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for realValue") } - _realValue, _realValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_realValue, _realValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _realValueErr != nil { return nil, errors.Wrap(_realValueErr, "Error parsing 'realValue' field of BACnetOptionalREALValue") } @@ -151,8 +155,9 @@ func BACnetOptionalREALValueParseWithBuffer(ctx context.Context, readBuffer util // Create a partially initialized instance _child := &_BACnetOptionalREALValue{ - _BACnetOptionalREAL: &_BACnetOptionalREAL{}, - RealValue: realValue, + _BACnetOptionalREAL: &_BACnetOptionalREAL{ + }, + RealValue: realValue, } _child._BACnetOptionalREAL._BACnetOptionalREALChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetOptionalREALValue) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for BACnetOptionalREALValue") } - // Simple Field (realValue) - if pushErr := writeBuffer.PushContext("realValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for realValue") - } - _realValueErr := writeBuffer.WriteSerializable(ctx, m.GetRealValue()) - if popErr := writeBuffer.PopContext("realValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for realValue") - } - if _realValueErr != nil { - return errors.Wrap(_realValueErr, "Error serializing 'realValue' field") - } + // Simple Field (realValue) + if pushErr := writeBuffer.PushContext("realValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for realValue") + } + _realValueErr := writeBuffer.WriteSerializable(ctx, m.GetRealValue()) + if popErr := writeBuffer.PopContext("realValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for realValue") + } + if _realValueErr != nil { + return errors.Wrap(_realValueErr, "Error serializing 'realValue' field") + } if popErr := writeBuffer.PopContext("BACnetOptionalREALValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetOptionalREALValue") @@ -194,6 +199,7 @@ func (m *_BACnetOptionalREALValue) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetOptionalREALValue) isBACnetOptionalREALValue() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetOptionalREALValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalUnsigned.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalUnsigned.go index a76794f8733..bd6453c4a89 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalUnsigned.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalUnsigned.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetOptionalUnsigned is the corresponding interface of BACnetOptionalUnsigned type BACnetOptionalUnsigned interface { @@ -47,7 +49,7 @@ type BACnetOptionalUnsignedExactly interface { // _BACnetOptionalUnsigned is the data-structure of this message type _BACnetOptionalUnsigned struct { _BACnetOptionalUnsignedChildRequirements - PeekedTagHeader BACnetTagHeader + PeekedTagHeader BACnetTagHeader } type _BACnetOptionalUnsignedChildRequirements interface { @@ -55,6 +57,7 @@ type _BACnetOptionalUnsignedChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type BACnetOptionalUnsignedParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetOptionalUnsigned, serializeChildFunction func() error) error GetTypeName() string @@ -62,13 +65,12 @@ type BACnetOptionalUnsignedParent interface { type BACnetOptionalUnsignedChild interface { utils.Serializable - InitializeParent(parent BACnetOptionalUnsigned, peekedTagHeader BACnetTagHeader) +InitializeParent(parent BACnetOptionalUnsigned , peekedTagHeader BACnetTagHeader ) GetParent() *BACnetOptionalUnsigned GetTypeName() string BACnetOptionalUnsigned } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,14 +100,15 @@ func (m *_BACnetOptionalUnsigned) GetPeekedTagNumber() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetOptionalUnsigned factory function for _BACnetOptionalUnsigned -func NewBACnetOptionalUnsigned(peekedTagHeader BACnetTagHeader) *_BACnetOptionalUnsigned { - return &_BACnetOptionalUnsigned{PeekedTagHeader: peekedTagHeader} +func NewBACnetOptionalUnsigned( peekedTagHeader BACnetTagHeader ) *_BACnetOptionalUnsigned { +return &_BACnetOptionalUnsigned{ PeekedTagHeader: peekedTagHeader } } // Deprecated: use the interface for direct cast func CastBACnetOptionalUnsigned(structType interface{}) BACnetOptionalUnsigned { - if casted, ok := structType.(BACnetOptionalUnsigned); ok { + if casted, ok := structType.(BACnetOptionalUnsigned); ok { return casted } if casted, ok := structType.(*BACnetOptionalUnsigned); ok { @@ -118,6 +121,7 @@ func (m *_BACnetOptionalUnsigned) GetTypeName() string { return "BACnetOptionalUnsigned" } + func (m *_BACnetOptionalUnsigned) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -143,13 +147,13 @@ func BACnetOptionalUnsignedParseWithBuffer(ctx context.Context, readBuffer utils currentPos := positionAware.GetPos() _ = currentPos - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Virtual field _peekedTagNumber := peekedTagHeader.GetActualTagNumber() @@ -159,17 +163,17 @@ func BACnetOptionalUnsignedParseWithBuffer(ctx context.Context, readBuffer utils // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetOptionalUnsignedChildSerializeRequirement interface { BACnetOptionalUnsigned - InitializeParent(BACnetOptionalUnsigned, BACnetTagHeader) + InitializeParent(BACnetOptionalUnsigned, BACnetTagHeader) GetParent() BACnetOptionalUnsigned } var _childTemp interface{} var _child BACnetOptionalUnsignedChildSerializeRequirement var typeSwitchError error switch { - case peekedTagNumber == uint8(0): // BACnetOptionalUnsignedNull - _childTemp, typeSwitchError = BACnetOptionalUnsignedNullParseWithBuffer(ctx, readBuffer) - case 0 == 0: // BACnetOptionalUnsignedValue - _childTemp, typeSwitchError = BACnetOptionalUnsignedValueParseWithBuffer(ctx, readBuffer) +case peekedTagNumber == uint8(0) : // BACnetOptionalUnsignedNull + _childTemp, typeSwitchError = BACnetOptionalUnsignedNullParseWithBuffer(ctx, readBuffer, ) +case 0==0 : // BACnetOptionalUnsignedValue + _childTemp, typeSwitchError = BACnetOptionalUnsignedValueParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedTagNumber=%v]", peekedTagNumber) } @@ -183,7 +187,7 @@ func BACnetOptionalUnsignedParseWithBuffer(ctx context.Context, readBuffer utils } // Finish initializing - _child.InitializeParent(_child, peekedTagHeader) +_child.InitializeParent(_child , peekedTagHeader ) return _child, nil } @@ -193,7 +197,7 @@ func (pm *_BACnetOptionalUnsigned) SerializeParent(ctx context.Context, writeBuf _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetOptionalUnsigned"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetOptionalUnsigned"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetOptionalUnsigned") } // Virtual field @@ -212,6 +216,7 @@ func (pm *_BACnetOptionalUnsigned) SerializeParent(ctx context.Context, writeBuf return nil } + func (m *_BACnetOptionalUnsigned) isBACnetOptionalUnsigned() bool { return true } @@ -226,3 +231,6 @@ func (m *_BACnetOptionalUnsigned) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalUnsignedNull.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalUnsignedNull.go index cc675022eeb..25bc32ee66b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalUnsignedNull.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalUnsignedNull.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetOptionalUnsignedNull is the corresponding interface of BACnetOptionalUnsignedNull type BACnetOptionalUnsignedNull interface { @@ -46,9 +48,11 @@ type BACnetOptionalUnsignedNullExactly interface { // _BACnetOptionalUnsignedNull is the data-structure of this message type _BACnetOptionalUnsignedNull struct { *_BACnetOptionalUnsigned - NullValue BACnetApplicationTagNull + NullValue BACnetApplicationTagNull } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetOptionalUnsignedNull struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetOptionalUnsignedNull) InitializeParent(parent BACnetOptionalUnsigned, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetOptionalUnsignedNull) InitializeParent(parent BACnetOptionalUnsigned , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetOptionalUnsignedNull) GetParent() BACnetOptionalUnsigned { +func (m *_BACnetOptionalUnsignedNull) GetParent() BACnetOptionalUnsigned { return m._BACnetOptionalUnsigned } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetOptionalUnsignedNull) GetNullValue() BACnetApplicationTagNull { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetOptionalUnsignedNull factory function for _BACnetOptionalUnsignedNull -func NewBACnetOptionalUnsignedNull(nullValue BACnetApplicationTagNull, peekedTagHeader BACnetTagHeader) *_BACnetOptionalUnsignedNull { +func NewBACnetOptionalUnsignedNull( nullValue BACnetApplicationTagNull , peekedTagHeader BACnetTagHeader ) *_BACnetOptionalUnsignedNull { _result := &_BACnetOptionalUnsignedNull{ - NullValue: nullValue, - _BACnetOptionalUnsigned: NewBACnetOptionalUnsigned(peekedTagHeader), + NullValue: nullValue, + _BACnetOptionalUnsigned: NewBACnetOptionalUnsigned(peekedTagHeader), } _result._BACnetOptionalUnsigned._BACnetOptionalUnsignedChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetOptionalUnsignedNull(nullValue BACnetApplicationTagNull, peekedTag // Deprecated: use the interface for direct cast func CastBACnetOptionalUnsignedNull(structType interface{}) BACnetOptionalUnsignedNull { - if casted, ok := structType.(BACnetOptionalUnsignedNull); ok { + if casted, ok := structType.(BACnetOptionalUnsignedNull); ok { return casted } if casted, ok := structType.(*BACnetOptionalUnsignedNull); ok { @@ -115,6 +118,7 @@ func (m *_BACnetOptionalUnsignedNull) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_BACnetOptionalUnsignedNull) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetOptionalUnsignedNullParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("nullValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for nullValue") } - _nullValue, _nullValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_nullValue, _nullValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _nullValueErr != nil { return nil, errors.Wrap(_nullValueErr, "Error parsing 'nullValue' field of BACnetOptionalUnsignedNull") } @@ -151,8 +155,9 @@ func BACnetOptionalUnsignedNullParseWithBuffer(ctx context.Context, readBuffer u // Create a partially initialized instance _child := &_BACnetOptionalUnsignedNull{ - _BACnetOptionalUnsigned: &_BACnetOptionalUnsigned{}, - NullValue: nullValue, + _BACnetOptionalUnsigned: &_BACnetOptionalUnsigned{ + }, + NullValue: nullValue, } _child._BACnetOptionalUnsigned._BACnetOptionalUnsignedChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetOptionalUnsignedNull) SerializeWithWriteBuffer(ctx context.Conte return errors.Wrap(pushErr, "Error pushing for BACnetOptionalUnsignedNull") } - // Simple Field (nullValue) - if pushErr := writeBuffer.PushContext("nullValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for nullValue") - } - _nullValueErr := writeBuffer.WriteSerializable(ctx, m.GetNullValue()) - if popErr := writeBuffer.PopContext("nullValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for nullValue") - } - if _nullValueErr != nil { - return errors.Wrap(_nullValueErr, "Error serializing 'nullValue' field") - } + // Simple Field (nullValue) + if pushErr := writeBuffer.PushContext("nullValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for nullValue") + } + _nullValueErr := writeBuffer.WriteSerializable(ctx, m.GetNullValue()) + if popErr := writeBuffer.PopContext("nullValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for nullValue") + } + if _nullValueErr != nil { + return errors.Wrap(_nullValueErr, "Error serializing 'nullValue' field") + } if popErr := writeBuffer.PopContext("BACnetOptionalUnsignedNull"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetOptionalUnsignedNull") @@ -194,6 +199,7 @@ func (m *_BACnetOptionalUnsignedNull) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetOptionalUnsignedNull) isBACnetOptionalUnsignedNull() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetOptionalUnsignedNull) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalUnsignedValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalUnsignedValue.go index 5c29c5e063a..e42ee74f3c1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalUnsignedValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetOptionalUnsignedValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetOptionalUnsignedValue is the corresponding interface of BACnetOptionalUnsignedValue type BACnetOptionalUnsignedValue interface { @@ -46,9 +48,11 @@ type BACnetOptionalUnsignedValueExactly interface { // _BACnetOptionalUnsignedValue is the data-structure of this message type _BACnetOptionalUnsignedValue struct { *_BACnetOptionalUnsigned - UnsignedValue BACnetApplicationTagUnsignedInteger + UnsignedValue BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetOptionalUnsignedValue struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetOptionalUnsignedValue) InitializeParent(parent BACnetOptionalUnsigned, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetOptionalUnsignedValue) InitializeParent(parent BACnetOptionalUnsigned , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetOptionalUnsignedValue) GetParent() BACnetOptionalUnsigned { +func (m *_BACnetOptionalUnsignedValue) GetParent() BACnetOptionalUnsigned { return m._BACnetOptionalUnsigned } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetOptionalUnsignedValue) GetUnsignedValue() BACnetApplicationTagUn /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetOptionalUnsignedValue factory function for _BACnetOptionalUnsignedValue -func NewBACnetOptionalUnsignedValue(unsignedValue BACnetApplicationTagUnsignedInteger, peekedTagHeader BACnetTagHeader) *_BACnetOptionalUnsignedValue { +func NewBACnetOptionalUnsignedValue( unsignedValue BACnetApplicationTagUnsignedInteger , peekedTagHeader BACnetTagHeader ) *_BACnetOptionalUnsignedValue { _result := &_BACnetOptionalUnsignedValue{ - UnsignedValue: unsignedValue, - _BACnetOptionalUnsigned: NewBACnetOptionalUnsigned(peekedTagHeader), + UnsignedValue: unsignedValue, + _BACnetOptionalUnsigned: NewBACnetOptionalUnsigned(peekedTagHeader), } _result._BACnetOptionalUnsigned._BACnetOptionalUnsignedChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetOptionalUnsignedValue(unsignedValue BACnetApplicationTagUnsignedIn // Deprecated: use the interface for direct cast func CastBACnetOptionalUnsignedValue(structType interface{}) BACnetOptionalUnsignedValue { - if casted, ok := structType.(BACnetOptionalUnsignedValue); ok { + if casted, ok := structType.(BACnetOptionalUnsignedValue); ok { return casted } if casted, ok := structType.(*BACnetOptionalUnsignedValue); ok { @@ -115,6 +118,7 @@ func (m *_BACnetOptionalUnsignedValue) GetLengthInBits(ctx context.Context) uint return lengthInBits } + func (m *_BACnetOptionalUnsignedValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetOptionalUnsignedValueParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("unsignedValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for unsignedValue") } - _unsignedValue, _unsignedValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_unsignedValue, _unsignedValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _unsignedValueErr != nil { return nil, errors.Wrap(_unsignedValueErr, "Error parsing 'unsignedValue' field of BACnetOptionalUnsignedValue") } @@ -151,8 +155,9 @@ func BACnetOptionalUnsignedValueParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_BACnetOptionalUnsignedValue{ - _BACnetOptionalUnsigned: &_BACnetOptionalUnsigned{}, - UnsignedValue: unsignedValue, + _BACnetOptionalUnsigned: &_BACnetOptionalUnsigned{ + }, + UnsignedValue: unsignedValue, } _child._BACnetOptionalUnsigned._BACnetOptionalUnsignedChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetOptionalUnsignedValue) SerializeWithWriteBuffer(ctx context.Cont return errors.Wrap(pushErr, "Error pushing for BACnetOptionalUnsignedValue") } - // Simple Field (unsignedValue) - if pushErr := writeBuffer.PushContext("unsignedValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for unsignedValue") - } - _unsignedValueErr := writeBuffer.WriteSerializable(ctx, m.GetUnsignedValue()) - if popErr := writeBuffer.PopContext("unsignedValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for unsignedValue") - } - if _unsignedValueErr != nil { - return errors.Wrap(_unsignedValueErr, "Error serializing 'unsignedValue' field") - } + // Simple Field (unsignedValue) + if pushErr := writeBuffer.PushContext("unsignedValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for unsignedValue") + } + _unsignedValueErr := writeBuffer.WriteSerializable(ctx, m.GetUnsignedValue()) + if popErr := writeBuffer.PopContext("unsignedValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for unsignedValue") + } + if _unsignedValueErr != nil { + return errors.Wrap(_unsignedValueErr, "Error serializing 'unsignedValue' field") + } if popErr := writeBuffer.PopContext("BACnetOptionalUnsignedValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetOptionalUnsignedValue") @@ -194,6 +199,7 @@ func (m *_BACnetOptionalUnsignedValue) SerializeWithWriteBuffer(ctx context.Cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetOptionalUnsignedValue) isBACnetOptionalUnsignedValue() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetOptionalUnsignedValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPolarity.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPolarity.go index 1dbcf9d0ab8..4d23f1607ab 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPolarity.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPolarity.go @@ -34,8 +34,8 @@ type IBACnetPolarity interface { utils.Serializable } -const ( - BACnetPolarity_NORMAL BACnetPolarity = 0 +const( + BACnetPolarity_NORMAL BACnetPolarity = 0 BACnetPolarity_REVERSE BACnetPolarity = 1 ) @@ -43,7 +43,7 @@ var BACnetPolarityValues []BACnetPolarity func init() { _ = errors.New - BACnetPolarityValues = []BACnetPolarity{ + BACnetPolarityValues = []BACnetPolarity { BACnetPolarity_NORMAL, BACnetPolarity_REVERSE, } @@ -51,10 +51,10 @@ func init() { func BACnetPolarityByValue(value uint8) (enum BACnetPolarity, ok bool) { switch value { - case 0: - return BACnetPolarity_NORMAL, true - case 1: - return BACnetPolarity_REVERSE, true + case 0: + return BACnetPolarity_NORMAL, true + case 1: + return BACnetPolarity_REVERSE, true } return 0, false } @@ -69,13 +69,13 @@ func BACnetPolarityByName(value string) (enum BACnetPolarity, ok bool) { return 0, false } -func BACnetPolarityKnows(value uint8) bool { +func BACnetPolarityKnows(value uint8) bool { for _, typeValue := range BACnetPolarityValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetPolarity(structType interface{}) BACnetPolarity { @@ -139,3 +139,4 @@ func (e BACnetPolarity) PLC4XEnumName() string { func (e BACnetPolarity) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPolarityTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPolarityTagged.go index 11981d832c3..0b2c839a8b8 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPolarityTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPolarityTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPolarityTagged is the corresponding interface of BACnetPolarityTagged type BACnetPolarityTagged interface { @@ -46,14 +48,15 @@ type BACnetPolarityTaggedExactly interface { // _BACnetPolarityTagged is the data-structure of this message type _BACnetPolarityTagged struct { - Header BACnetTagHeader - Value BACnetPolarity + Header BACnetTagHeader + Value BACnetPolarity // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_BACnetPolarityTagged) GetValue() BACnetPolarity { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPolarityTagged factory function for _BACnetPolarityTagged -func NewBACnetPolarityTagged(header BACnetTagHeader, value BACnetPolarity, tagNumber uint8, tagClass TagClass) *_BACnetPolarityTagged { - return &_BACnetPolarityTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetPolarityTagged( header BACnetTagHeader , value BACnetPolarity , tagNumber uint8 , tagClass TagClass ) *_BACnetPolarityTagged { +return &_BACnetPolarityTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetPolarityTagged(structType interface{}) BACnetPolarityTagged { - if casted, ok := structType.(BACnetPolarityTagged); ok { + if casted, ok := structType.(BACnetPolarityTagged); ok { return casted } if casted, ok := structType.(*BACnetPolarityTagged); ok { @@ -104,6 +108,7 @@ func (m *_BACnetPolarityTagged) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetPolarityTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func BACnetPolarityTaggedParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetPolarityTagged") } @@ -135,12 +140,12 @@ func BACnetPolarityTaggedParseWithBuffer(ctx context.Context, readBuffer utils.R } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func BACnetPolarityTaggedParseWithBuffer(ctx context.Context, readBuffer utils.R } var value BACnetPolarity if _value != nil { - value = _value.(BACnetPolarity) + value = _value.(BACnetPolarity) } if closeErr := readBuffer.CloseContext("BACnetPolarityTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func BACnetPolarityTaggedParseWithBuffer(ctx context.Context, readBuffer utils.R // Create the instance return &_BACnetPolarityTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_BACnetPolarityTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_BACnetPolarityTagged) Serialize() ([]byte, error) { func (m *_BACnetPolarityTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetPolarityTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetPolarityTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetPolarityTagged") } @@ -206,6 +211,7 @@ func (m *_BACnetPolarityTagged) SerializeWithWriteBuffer(ctx context.Context, wr return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_BACnetPolarityTagged) GetTagNumber() uint8 { func (m *_BACnetPolarityTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_BACnetPolarityTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPortPermission.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPortPermission.go index 3a3743caad7..19f7472dd4c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPortPermission.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPortPermission.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPortPermission is the corresponding interface of BACnetPortPermission type BACnetPortPermission interface { @@ -47,10 +49,11 @@ type BACnetPortPermissionExactly interface { // _BACnetPortPermission is the data-structure of this message type _BACnetPortPermission struct { - Port BACnetContextTagUnsignedInteger - Enable BACnetContextTagBoolean + Port BACnetContextTagUnsignedInteger + Enable BACnetContextTagBoolean } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -69,14 +72,15 @@ func (m *_BACnetPortPermission) GetEnable() BACnetContextTagBoolean { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPortPermission factory function for _BACnetPortPermission -func NewBACnetPortPermission(port BACnetContextTagUnsignedInteger, enable BACnetContextTagBoolean) *_BACnetPortPermission { - return &_BACnetPortPermission{Port: port, Enable: enable} +func NewBACnetPortPermission( port BACnetContextTagUnsignedInteger , enable BACnetContextTagBoolean ) *_BACnetPortPermission { +return &_BACnetPortPermission{ Port: port , Enable: enable } } // Deprecated: use the interface for direct cast func CastBACnetPortPermission(structType interface{}) BACnetPortPermission { - if casted, ok := structType.(BACnetPortPermission); ok { + if casted, ok := structType.(BACnetPortPermission); ok { return casted } if casted, ok := structType.(*BACnetPortPermission); ok { @@ -103,6 +107,7 @@ func (m *_BACnetPortPermission) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetPortPermission) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -124,7 +129,7 @@ func BACnetPortPermissionParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("port"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for port") } - _port, _portErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_port, _portErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _portErr != nil { return nil, errors.Wrap(_portErr, "Error parsing 'port' field of BACnetPortPermission") } @@ -135,12 +140,12 @@ func BACnetPortPermissionParseWithBuffer(ctx context.Context, readBuffer utils.R // Optional Field (enable) (Can be skipped, if a given expression evaluates to false) var enable BACnetContextTagBoolean = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("enable"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for enable") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(1), BACnetDataType_BOOLEAN) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(1) , BACnetDataType_BOOLEAN ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -161,9 +166,9 @@ func BACnetPortPermissionParseWithBuffer(ctx context.Context, readBuffer utils.R // Create the instance return &_BACnetPortPermission{ - Port: port, - Enable: enable, - }, nil + Port: port, + Enable: enable, + }, nil } func (m *_BACnetPortPermission) Serialize() ([]byte, error) { @@ -177,7 +182,7 @@ func (m *_BACnetPortPermission) Serialize() ([]byte, error) { func (m *_BACnetPortPermission) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetPortPermission"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetPortPermission"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetPortPermission") } @@ -215,6 +220,7 @@ func (m *_BACnetPortPermission) SerializeWithWriteBuffer(ctx context.Context, wr return nil } + func (m *_BACnetPortPermission) isBACnetPortPermission() bool { return true } @@ -229,3 +235,6 @@ func (m *_BACnetPortPermission) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPrescale.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPrescale.go index 5ab1ae013eb..2d5d7870764 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPrescale.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPrescale.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPrescale is the corresponding interface of BACnetPrescale type BACnetPrescale interface { @@ -46,10 +48,11 @@ type BACnetPrescaleExactly interface { // _BACnetPrescale is the data-structure of this message type _BACnetPrescale struct { - Multiplier BACnetContextTagUnsignedInteger - ModuloDivide BACnetContextTagUnsignedInteger + Multiplier BACnetContextTagUnsignedInteger + ModuloDivide BACnetContextTagUnsignedInteger } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -68,14 +71,15 @@ func (m *_BACnetPrescale) GetModuloDivide() BACnetContextTagUnsignedInteger { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPrescale factory function for _BACnetPrescale -func NewBACnetPrescale(multiplier BACnetContextTagUnsignedInteger, moduloDivide BACnetContextTagUnsignedInteger) *_BACnetPrescale { - return &_BACnetPrescale{Multiplier: multiplier, ModuloDivide: moduloDivide} +func NewBACnetPrescale( multiplier BACnetContextTagUnsignedInteger , moduloDivide BACnetContextTagUnsignedInteger ) *_BACnetPrescale { +return &_BACnetPrescale{ Multiplier: multiplier , ModuloDivide: moduloDivide } } // Deprecated: use the interface for direct cast func CastBACnetPrescale(structType interface{}) BACnetPrescale { - if casted, ok := structType.(BACnetPrescale); ok { + if casted, ok := structType.(BACnetPrescale); ok { return casted } if casted, ok := structType.(*BACnetPrescale); ok { @@ -100,6 +104,7 @@ func (m *_BACnetPrescale) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetPrescale) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -121,7 +126,7 @@ func BACnetPrescaleParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf if pullErr := readBuffer.PullContext("multiplier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for multiplier") } - _multiplier, _multiplierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_multiplier, _multiplierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _multiplierErr != nil { return nil, errors.Wrap(_multiplierErr, "Error parsing 'multiplier' field of BACnetPrescale") } @@ -134,7 +139,7 @@ func BACnetPrescaleParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf if pullErr := readBuffer.PullContext("moduloDivide"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for moduloDivide") } - _moduloDivide, _moduloDivideErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_moduloDivide, _moduloDivideErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _moduloDivideErr != nil { return nil, errors.Wrap(_moduloDivideErr, "Error parsing 'moduloDivide' field of BACnetPrescale") } @@ -149,9 +154,9 @@ func BACnetPrescaleParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf // Create the instance return &_BACnetPrescale{ - Multiplier: multiplier, - ModuloDivide: moduloDivide, - }, nil + Multiplier: multiplier, + ModuloDivide: moduloDivide, + }, nil } func (m *_BACnetPrescale) Serialize() ([]byte, error) { @@ -165,7 +170,7 @@ func (m *_BACnetPrescale) Serialize() ([]byte, error) { func (m *_BACnetPrescale) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetPrescale"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetPrescale"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetPrescale") } @@ -199,6 +204,7 @@ func (m *_BACnetPrescale) SerializeWithWriteBuffer(ctx context.Context, writeBuf return nil } + func (m *_BACnetPrescale) isBACnetPrescale() bool { return true } @@ -213,3 +219,6 @@ func (m *_BACnetPrescale) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityArray.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityArray.go index ca3e3cc7106..072a051f023 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityArray.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityArray.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPriorityArray is the corresponding interface of BACnetPriorityArray type BACnetPriorityArray interface { @@ -86,15 +88,16 @@ type BACnetPriorityArrayExactly interface { // _BACnetPriorityArray is the data-structure of this message type _BACnetPriorityArray struct { - NumberOfDataElements BACnetApplicationTagUnsignedInteger - Data []BACnetPriorityValue + NumberOfDataElements BACnetApplicationTagUnsignedInteger + Data []BACnetPriorityValue // Arguments. ObjectTypeArgument BACnetObjectType - TagNumber uint8 + TagNumber uint8 ArrayIndexArgument BACnetTagPayloadUnsignedInteger } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -130,7 +133,7 @@ func (m *_BACnetPriorityArray) GetPriorityValue01() BACnetPriorityValue { _ = ctx numberOfDataElements := m.NumberOfDataElements _ = numberOfDataElements - return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool((len(m.GetData())) > (0)), func() interface{} { return CastBACnetPriorityValue(m.GetData()[0]) }, func() interface{} { return CastBACnetPriorityValue(nil) }))) + return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool(((len(m.GetData()))) > ((0))), func() interface{} {return CastBACnetPriorityValue(m.GetData()[0])}, func() interface{} {return CastBACnetPriorityValue(nil)}))) } func (m *_BACnetPriorityArray) GetPriorityValue02() BACnetPriorityValue { @@ -138,7 +141,7 @@ func (m *_BACnetPriorityArray) GetPriorityValue02() BACnetPriorityValue { _ = ctx numberOfDataElements := m.NumberOfDataElements _ = numberOfDataElements - return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool((len(m.GetData())) > (1)), func() interface{} { return CastBACnetPriorityValue(m.GetData()[1]) }, func() interface{} { return CastBACnetPriorityValue(nil) }))) + return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool(((len(m.GetData()))) > ((1))), func() interface{} {return CastBACnetPriorityValue(m.GetData()[1])}, func() interface{} {return CastBACnetPriorityValue(nil)}))) } func (m *_BACnetPriorityArray) GetPriorityValue03() BACnetPriorityValue { @@ -146,7 +149,7 @@ func (m *_BACnetPriorityArray) GetPriorityValue03() BACnetPriorityValue { _ = ctx numberOfDataElements := m.NumberOfDataElements _ = numberOfDataElements - return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool((len(m.GetData())) > (2)), func() interface{} { return CastBACnetPriorityValue(m.GetData()[2]) }, func() interface{} { return CastBACnetPriorityValue(nil) }))) + return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool(((len(m.GetData()))) > ((2))), func() interface{} {return CastBACnetPriorityValue(m.GetData()[2])}, func() interface{} {return CastBACnetPriorityValue(nil)}))) } func (m *_BACnetPriorityArray) GetPriorityValue04() BACnetPriorityValue { @@ -154,7 +157,7 @@ func (m *_BACnetPriorityArray) GetPriorityValue04() BACnetPriorityValue { _ = ctx numberOfDataElements := m.NumberOfDataElements _ = numberOfDataElements - return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool((len(m.GetData())) > (3)), func() interface{} { return CastBACnetPriorityValue(m.GetData()[3]) }, func() interface{} { return CastBACnetPriorityValue(nil) }))) + return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool(((len(m.GetData()))) > ((3))), func() interface{} {return CastBACnetPriorityValue(m.GetData()[3])}, func() interface{} {return CastBACnetPriorityValue(nil)}))) } func (m *_BACnetPriorityArray) GetPriorityValue05() BACnetPriorityValue { @@ -162,7 +165,7 @@ func (m *_BACnetPriorityArray) GetPriorityValue05() BACnetPriorityValue { _ = ctx numberOfDataElements := m.NumberOfDataElements _ = numberOfDataElements - return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool((len(m.GetData())) > (4)), func() interface{} { return CastBACnetPriorityValue(m.GetData()[4]) }, func() interface{} { return CastBACnetPriorityValue(nil) }))) + return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool(((len(m.GetData()))) > ((4))), func() interface{} {return CastBACnetPriorityValue(m.GetData()[4])}, func() interface{} {return CastBACnetPriorityValue(nil)}))) } func (m *_BACnetPriorityArray) GetPriorityValue06() BACnetPriorityValue { @@ -170,7 +173,7 @@ func (m *_BACnetPriorityArray) GetPriorityValue06() BACnetPriorityValue { _ = ctx numberOfDataElements := m.NumberOfDataElements _ = numberOfDataElements - return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool((len(m.GetData())) > (5)), func() interface{} { return CastBACnetPriorityValue(m.GetData()[5]) }, func() interface{} { return CastBACnetPriorityValue(nil) }))) + return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool(((len(m.GetData()))) > ((5))), func() interface{} {return CastBACnetPriorityValue(m.GetData()[5])}, func() interface{} {return CastBACnetPriorityValue(nil)}))) } func (m *_BACnetPriorityArray) GetPriorityValue07() BACnetPriorityValue { @@ -178,7 +181,7 @@ func (m *_BACnetPriorityArray) GetPriorityValue07() BACnetPriorityValue { _ = ctx numberOfDataElements := m.NumberOfDataElements _ = numberOfDataElements - return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool((len(m.GetData())) > (6)), func() interface{} { return CastBACnetPriorityValue(m.GetData()[6]) }, func() interface{} { return CastBACnetPriorityValue(nil) }))) + return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool(((len(m.GetData()))) > ((6))), func() interface{} {return CastBACnetPriorityValue(m.GetData()[6])}, func() interface{} {return CastBACnetPriorityValue(nil)}))) } func (m *_BACnetPriorityArray) GetPriorityValue08() BACnetPriorityValue { @@ -186,7 +189,7 @@ func (m *_BACnetPriorityArray) GetPriorityValue08() BACnetPriorityValue { _ = ctx numberOfDataElements := m.NumberOfDataElements _ = numberOfDataElements - return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool((len(m.GetData())) > (7)), func() interface{} { return CastBACnetPriorityValue(m.GetData()[7]) }, func() interface{} { return CastBACnetPriorityValue(nil) }))) + return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool(((len(m.GetData()))) > ((7))), func() interface{} {return CastBACnetPriorityValue(m.GetData()[7])}, func() interface{} {return CastBACnetPriorityValue(nil)}))) } func (m *_BACnetPriorityArray) GetPriorityValue09() BACnetPriorityValue { @@ -194,7 +197,7 @@ func (m *_BACnetPriorityArray) GetPriorityValue09() BACnetPriorityValue { _ = ctx numberOfDataElements := m.NumberOfDataElements _ = numberOfDataElements - return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool((len(m.GetData())) > (8)), func() interface{} { return CastBACnetPriorityValue(m.GetData()[8]) }, func() interface{} { return CastBACnetPriorityValue(nil) }))) + return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool(((len(m.GetData()))) > ((8))), func() interface{} {return CastBACnetPriorityValue(m.GetData()[8])}, func() interface{} {return CastBACnetPriorityValue(nil)}))) } func (m *_BACnetPriorityArray) GetPriorityValue10() BACnetPriorityValue { @@ -202,7 +205,7 @@ func (m *_BACnetPriorityArray) GetPriorityValue10() BACnetPriorityValue { _ = ctx numberOfDataElements := m.NumberOfDataElements _ = numberOfDataElements - return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool((len(m.GetData())) > (9)), func() interface{} { return CastBACnetPriorityValue(m.GetData()[9]) }, func() interface{} { return CastBACnetPriorityValue(nil) }))) + return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool(((len(m.GetData()))) > ((9))), func() interface{} {return CastBACnetPriorityValue(m.GetData()[9])}, func() interface{} {return CastBACnetPriorityValue(nil)}))) } func (m *_BACnetPriorityArray) GetPriorityValue11() BACnetPriorityValue { @@ -210,7 +213,7 @@ func (m *_BACnetPriorityArray) GetPriorityValue11() BACnetPriorityValue { _ = ctx numberOfDataElements := m.NumberOfDataElements _ = numberOfDataElements - return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool((len(m.GetData())) > (10)), func() interface{} { return CastBACnetPriorityValue(m.GetData()[10]) }, func() interface{} { return CastBACnetPriorityValue(nil) }))) + return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool(((len(m.GetData()))) > ((10))), func() interface{} {return CastBACnetPriorityValue(m.GetData()[10])}, func() interface{} {return CastBACnetPriorityValue(nil)}))) } func (m *_BACnetPriorityArray) GetPriorityValue12() BACnetPriorityValue { @@ -218,7 +221,7 @@ func (m *_BACnetPriorityArray) GetPriorityValue12() BACnetPriorityValue { _ = ctx numberOfDataElements := m.NumberOfDataElements _ = numberOfDataElements - return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool((len(m.GetData())) > (11)), func() interface{} { return CastBACnetPriorityValue(m.GetData()[11]) }, func() interface{} { return CastBACnetPriorityValue(nil) }))) + return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool(((len(m.GetData()))) > ((11))), func() interface{} {return CastBACnetPriorityValue(m.GetData()[11])}, func() interface{} {return CastBACnetPriorityValue(nil)}))) } func (m *_BACnetPriorityArray) GetPriorityValue13() BACnetPriorityValue { @@ -226,7 +229,7 @@ func (m *_BACnetPriorityArray) GetPriorityValue13() BACnetPriorityValue { _ = ctx numberOfDataElements := m.NumberOfDataElements _ = numberOfDataElements - return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool((len(m.GetData())) > (12)), func() interface{} { return CastBACnetPriorityValue(m.GetData()[12]) }, func() interface{} { return CastBACnetPriorityValue(nil) }))) + return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool(((len(m.GetData()))) > ((12))), func() interface{} {return CastBACnetPriorityValue(m.GetData()[12])}, func() interface{} {return CastBACnetPriorityValue(nil)}))) } func (m *_BACnetPriorityArray) GetPriorityValue14() BACnetPriorityValue { @@ -234,7 +237,7 @@ func (m *_BACnetPriorityArray) GetPriorityValue14() BACnetPriorityValue { _ = ctx numberOfDataElements := m.NumberOfDataElements _ = numberOfDataElements - return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool((len(m.GetData())) > (13)), func() interface{} { return CastBACnetPriorityValue(m.GetData()[13]) }, func() interface{} { return CastBACnetPriorityValue(nil) }))) + return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool(((len(m.GetData()))) > ((13))), func() interface{} {return CastBACnetPriorityValue(m.GetData()[13])}, func() interface{} {return CastBACnetPriorityValue(nil)}))) } func (m *_BACnetPriorityArray) GetPriorityValue15() BACnetPriorityValue { @@ -242,7 +245,7 @@ func (m *_BACnetPriorityArray) GetPriorityValue15() BACnetPriorityValue { _ = ctx numberOfDataElements := m.NumberOfDataElements _ = numberOfDataElements - return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool((len(m.GetData())) > (14)), func() interface{} { return CastBACnetPriorityValue(m.GetData()[14]) }, func() interface{} { return CastBACnetPriorityValue(nil) }))) + return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool(((len(m.GetData()))) > ((14))), func() interface{} {return CastBACnetPriorityValue(m.GetData()[14])}, func() interface{} {return CastBACnetPriorityValue(nil)}))) } func (m *_BACnetPriorityArray) GetPriorityValue16() BACnetPriorityValue { @@ -250,7 +253,7 @@ func (m *_BACnetPriorityArray) GetPriorityValue16() BACnetPriorityValue { _ = ctx numberOfDataElements := m.NumberOfDataElements _ = numberOfDataElements - return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool((len(m.GetData())) > (15)), func() interface{} { return CastBACnetPriorityValue(m.GetData()[15]) }, func() interface{} { return CastBACnetPriorityValue(nil) }))) + return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool(((len(m.GetData()))) > ((15))), func() interface{} {return CastBACnetPriorityValue(m.GetData()[15])}, func() interface{} {return CastBACnetPriorityValue(nil)}))) } func (m *_BACnetPriorityArray) GetIsIndexedAccess() bool { @@ -258,7 +261,7 @@ func (m *_BACnetPriorityArray) GetIsIndexedAccess() bool { _ = ctx numberOfDataElements := m.NumberOfDataElements _ = numberOfDataElements - return bool(bool((len(m.GetData())) == (1))) + return bool(bool(((len(m.GetData()))) == ((1)))) } func (m *_BACnetPriorityArray) GetIndexEntry() BACnetPriorityValue { @@ -274,14 +277,15 @@ func (m *_BACnetPriorityArray) GetIndexEntry() BACnetPriorityValue { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPriorityArray factory function for _BACnetPriorityArray -func NewBACnetPriorityArray(numberOfDataElements BACnetApplicationTagUnsignedInteger, data []BACnetPriorityValue, objectTypeArgument BACnetObjectType, tagNumber uint8, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetPriorityArray { - return &_BACnetPriorityArray{NumberOfDataElements: numberOfDataElements, Data: data, ObjectTypeArgument: objectTypeArgument, TagNumber: tagNumber, ArrayIndexArgument: arrayIndexArgument} +func NewBACnetPriorityArray( numberOfDataElements BACnetApplicationTagUnsignedInteger , data []BACnetPriorityValue , objectTypeArgument BACnetObjectType , tagNumber uint8 , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetPriorityArray { +return &_BACnetPriorityArray{ NumberOfDataElements: numberOfDataElements , Data: data , ObjectTypeArgument: objectTypeArgument , TagNumber: tagNumber , ArrayIndexArgument: arrayIndexArgument } } // Deprecated: use the interface for direct cast func CastBACnetPriorityArray(structType interface{}) BACnetPriorityArray { - if casted, ok := structType.(BACnetPriorityArray); ok { + if casted, ok := structType.(BACnetPriorityArray); ok { return casted } if casted, ok := structType.(*BACnetPriorityArray); ok { @@ -350,6 +354,7 @@ func (m *_BACnetPriorityArray) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetPriorityArray) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -379,7 +384,7 @@ func BACnetPriorityArrayParseWithBuffer(ctx context.Context, readBuffer utils.Re if pullErr := readBuffer.PullContext("numberOfDataElements"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for numberOfDataElements") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -401,8 +406,8 @@ func BACnetPriorityArrayParseWithBuffer(ctx context.Context, readBuffer utils.Re // Terminated array var data []BACnetPriorityValue { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetPriorityValueParseWithBuffer(ctx, readBuffer, objectTypeArgument) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetPriorityValueParseWithBuffer(ctx, readBuffer , objectTypeArgument ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'data' field of BACnetPriorityArray") } @@ -414,92 +419,92 @@ func BACnetPriorityArrayParseWithBuffer(ctx context.Context, readBuffer utils.Re } // Virtual field - _priorityValue01 := CastBACnetPriorityValue(utils.InlineIf(bool((len(data)) > (0)), func() interface{} { return CastBACnetPriorityValue(data[0]) }, func() interface{} { return CastBACnetPriorityValue(nil) })) + _priorityValue01 := CastBACnetPriorityValue(utils.InlineIf(bool(((len(data))) > ((0))), func() interface{} {return CastBACnetPriorityValue(data[0])}, func() interface{} {return CastBACnetPriorityValue(nil)})) priorityValue01 := _priorityValue01 _ = priorityValue01 // Virtual field - _priorityValue02 := CastBACnetPriorityValue(utils.InlineIf(bool((len(data)) > (1)), func() interface{} { return CastBACnetPriorityValue(data[1]) }, func() interface{} { return CastBACnetPriorityValue(nil) })) + _priorityValue02 := CastBACnetPriorityValue(utils.InlineIf(bool(((len(data))) > ((1))), func() interface{} {return CastBACnetPriorityValue(data[1])}, func() interface{} {return CastBACnetPriorityValue(nil)})) priorityValue02 := _priorityValue02 _ = priorityValue02 // Virtual field - _priorityValue03 := CastBACnetPriorityValue(utils.InlineIf(bool((len(data)) > (2)), func() interface{} { return CastBACnetPriorityValue(data[2]) }, func() interface{} { return CastBACnetPriorityValue(nil) })) + _priorityValue03 := CastBACnetPriorityValue(utils.InlineIf(bool(((len(data))) > ((2))), func() interface{} {return CastBACnetPriorityValue(data[2])}, func() interface{} {return CastBACnetPriorityValue(nil)})) priorityValue03 := _priorityValue03 _ = priorityValue03 // Virtual field - _priorityValue04 := CastBACnetPriorityValue(utils.InlineIf(bool((len(data)) > (3)), func() interface{} { return CastBACnetPriorityValue(data[3]) }, func() interface{} { return CastBACnetPriorityValue(nil) })) + _priorityValue04 := CastBACnetPriorityValue(utils.InlineIf(bool(((len(data))) > ((3))), func() interface{} {return CastBACnetPriorityValue(data[3])}, func() interface{} {return CastBACnetPriorityValue(nil)})) priorityValue04 := _priorityValue04 _ = priorityValue04 // Virtual field - _priorityValue05 := CastBACnetPriorityValue(utils.InlineIf(bool((len(data)) > (4)), func() interface{} { return CastBACnetPriorityValue(data[4]) }, func() interface{} { return CastBACnetPriorityValue(nil) })) + _priorityValue05 := CastBACnetPriorityValue(utils.InlineIf(bool(((len(data))) > ((4))), func() interface{} {return CastBACnetPriorityValue(data[4])}, func() interface{} {return CastBACnetPriorityValue(nil)})) priorityValue05 := _priorityValue05 _ = priorityValue05 // Virtual field - _priorityValue06 := CastBACnetPriorityValue(utils.InlineIf(bool((len(data)) > (5)), func() interface{} { return CastBACnetPriorityValue(data[5]) }, func() interface{} { return CastBACnetPriorityValue(nil) })) + _priorityValue06 := CastBACnetPriorityValue(utils.InlineIf(bool(((len(data))) > ((5))), func() interface{} {return CastBACnetPriorityValue(data[5])}, func() interface{} {return CastBACnetPriorityValue(nil)})) priorityValue06 := _priorityValue06 _ = priorityValue06 // Virtual field - _priorityValue07 := CastBACnetPriorityValue(utils.InlineIf(bool((len(data)) > (6)), func() interface{} { return CastBACnetPriorityValue(data[6]) }, func() interface{} { return CastBACnetPriorityValue(nil) })) + _priorityValue07 := CastBACnetPriorityValue(utils.InlineIf(bool(((len(data))) > ((6))), func() interface{} {return CastBACnetPriorityValue(data[6])}, func() interface{} {return CastBACnetPriorityValue(nil)})) priorityValue07 := _priorityValue07 _ = priorityValue07 // Virtual field - _priorityValue08 := CastBACnetPriorityValue(utils.InlineIf(bool((len(data)) > (7)), func() interface{} { return CastBACnetPriorityValue(data[7]) }, func() interface{} { return CastBACnetPriorityValue(nil) })) + _priorityValue08 := CastBACnetPriorityValue(utils.InlineIf(bool(((len(data))) > ((7))), func() interface{} {return CastBACnetPriorityValue(data[7])}, func() interface{} {return CastBACnetPriorityValue(nil)})) priorityValue08 := _priorityValue08 _ = priorityValue08 // Virtual field - _priorityValue09 := CastBACnetPriorityValue(utils.InlineIf(bool((len(data)) > (8)), func() interface{} { return CastBACnetPriorityValue(data[8]) }, func() interface{} { return CastBACnetPriorityValue(nil) })) + _priorityValue09 := CastBACnetPriorityValue(utils.InlineIf(bool(((len(data))) > ((8))), func() interface{} {return CastBACnetPriorityValue(data[8])}, func() interface{} {return CastBACnetPriorityValue(nil)})) priorityValue09 := _priorityValue09 _ = priorityValue09 // Virtual field - _priorityValue10 := CastBACnetPriorityValue(utils.InlineIf(bool((len(data)) > (9)), func() interface{} { return CastBACnetPriorityValue(data[9]) }, func() interface{} { return CastBACnetPriorityValue(nil) })) + _priorityValue10 := CastBACnetPriorityValue(utils.InlineIf(bool(((len(data))) > ((9))), func() interface{} {return CastBACnetPriorityValue(data[9])}, func() interface{} {return CastBACnetPriorityValue(nil)})) priorityValue10 := _priorityValue10 _ = priorityValue10 // Virtual field - _priorityValue11 := CastBACnetPriorityValue(utils.InlineIf(bool((len(data)) > (10)), func() interface{} { return CastBACnetPriorityValue(data[10]) }, func() interface{} { return CastBACnetPriorityValue(nil) })) + _priorityValue11 := CastBACnetPriorityValue(utils.InlineIf(bool(((len(data))) > ((10))), func() interface{} {return CastBACnetPriorityValue(data[10])}, func() interface{} {return CastBACnetPriorityValue(nil)})) priorityValue11 := _priorityValue11 _ = priorityValue11 // Virtual field - _priorityValue12 := CastBACnetPriorityValue(utils.InlineIf(bool((len(data)) > (11)), func() interface{} { return CastBACnetPriorityValue(data[11]) }, func() interface{} { return CastBACnetPriorityValue(nil) })) + _priorityValue12 := CastBACnetPriorityValue(utils.InlineIf(bool(((len(data))) > ((11))), func() interface{} {return CastBACnetPriorityValue(data[11])}, func() interface{} {return CastBACnetPriorityValue(nil)})) priorityValue12 := _priorityValue12 _ = priorityValue12 // Virtual field - _priorityValue13 := CastBACnetPriorityValue(utils.InlineIf(bool((len(data)) > (12)), func() interface{} { return CastBACnetPriorityValue(data[12]) }, func() interface{} { return CastBACnetPriorityValue(nil) })) + _priorityValue13 := CastBACnetPriorityValue(utils.InlineIf(bool(((len(data))) > ((12))), func() interface{} {return CastBACnetPriorityValue(data[12])}, func() interface{} {return CastBACnetPriorityValue(nil)})) priorityValue13 := _priorityValue13 _ = priorityValue13 // Virtual field - _priorityValue14 := CastBACnetPriorityValue(utils.InlineIf(bool((len(data)) > (13)), func() interface{} { return CastBACnetPriorityValue(data[13]) }, func() interface{} { return CastBACnetPriorityValue(nil) })) + _priorityValue14 := CastBACnetPriorityValue(utils.InlineIf(bool(((len(data))) > ((13))), func() interface{} {return CastBACnetPriorityValue(data[13])}, func() interface{} {return CastBACnetPriorityValue(nil)})) priorityValue14 := _priorityValue14 _ = priorityValue14 // Virtual field - _priorityValue15 := CastBACnetPriorityValue(utils.InlineIf(bool((len(data)) > (14)), func() interface{} { return CastBACnetPriorityValue(data[14]) }, func() interface{} { return CastBACnetPriorityValue(nil) })) + _priorityValue15 := CastBACnetPriorityValue(utils.InlineIf(bool(((len(data))) > ((14))), func() interface{} {return CastBACnetPriorityValue(data[14])}, func() interface{} {return CastBACnetPriorityValue(nil)})) priorityValue15 := _priorityValue15 _ = priorityValue15 // Virtual field - _priorityValue16 := CastBACnetPriorityValue(utils.InlineIf(bool((len(data)) > (15)), func() interface{} { return CastBACnetPriorityValue(data[15]) }, func() interface{} { return CastBACnetPriorityValue(nil) })) + _priorityValue16 := CastBACnetPriorityValue(utils.InlineIf(bool(((len(data))) > ((15))), func() interface{} {return CastBACnetPriorityValue(data[15])}, func() interface{} {return CastBACnetPriorityValue(nil)})) priorityValue16 := _priorityValue16 _ = priorityValue16 // Validation - if !(bool(bool((arrayIndexArgument) != (nil))) || bool(bool((len(data)) == (16)))) { + if (!(bool(bool((arrayIndexArgument) != (nil))) || bool(bool(((len(data))) == ((16)))))) { return nil, errors.WithStack(utils.ParseValidationError{"Either indexed access or lenght 16 expected"}) } // Virtual field - _isIndexedAccess := bool((len(data)) == (1)) + _isIndexedAccess := bool(((len(data))) == ((1))) isIndexedAccess := bool(_isIndexedAccess) _ = isIndexedAccess @@ -514,12 +519,12 @@ func BACnetPriorityArrayParseWithBuffer(ctx context.Context, readBuffer utils.Re // Create the instance return &_BACnetPriorityArray{ - ObjectTypeArgument: objectTypeArgument, - TagNumber: tagNumber, - ArrayIndexArgument: arrayIndexArgument, - NumberOfDataElements: numberOfDataElements, - Data: data, - }, nil + ObjectTypeArgument: objectTypeArgument, + TagNumber: tagNumber, + ArrayIndexArgument: arrayIndexArgument, + NumberOfDataElements: numberOfDataElements, + Data: data, + }, nil } func (m *_BACnetPriorityArray) Serialize() ([]byte, error) { @@ -533,7 +538,7 @@ func (m *_BACnetPriorityArray) Serialize() ([]byte, error) { func (m *_BACnetPriorityArray) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetPriorityArray"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetPriorityArray"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetPriorityArray") } // Virtual field @@ -652,6 +657,7 @@ func (m *_BACnetPriorityArray) SerializeWithWriteBuffer(ctx context.Context, wri return nil } + //// // Arguments Getter @@ -664,7 +670,6 @@ func (m *_BACnetPriorityArray) GetTagNumber() uint8 { func (m *_BACnetPriorityArray) GetArrayIndexArgument() BACnetTagPayloadUnsignedInteger { return m.ArrayIndexArgument } - // //// @@ -682,3 +687,6 @@ func (m *_BACnetPriorityArray) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValue.go index 887c5e859a6..4700537ce3e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPriorityValue is the corresponding interface of BACnetPriorityValue type BACnetPriorityValue interface { @@ -49,7 +51,7 @@ type BACnetPriorityValueExactly interface { // _BACnetPriorityValue is the data-structure of this message type _BACnetPriorityValue struct { _BACnetPriorityValueChildRequirements - PeekedTagHeader BACnetTagHeader + PeekedTagHeader BACnetTagHeader // Arguments. ObjectTypeArgument BACnetObjectType @@ -60,6 +62,7 @@ type _BACnetPriorityValueChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type BACnetPriorityValueParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetPriorityValue, serializeChildFunction func() error) error GetTypeName() string @@ -67,13 +70,12 @@ type BACnetPriorityValueParent interface { type BACnetPriorityValueChild interface { utils.Serializable - InitializeParent(parent BACnetPriorityValue, peekedTagHeader BACnetTagHeader) +InitializeParent(parent BACnetPriorityValue , peekedTagHeader BACnetTagHeader ) GetParent() *BACnetPriorityValue GetTypeName() string BACnetPriorityValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -109,14 +111,15 @@ func (m *_BACnetPriorityValue) GetPeekedIsContextTag() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPriorityValue factory function for _BACnetPriorityValue -func NewBACnetPriorityValue(peekedTagHeader BACnetTagHeader, objectTypeArgument BACnetObjectType) *_BACnetPriorityValue { - return &_BACnetPriorityValue{PeekedTagHeader: peekedTagHeader, ObjectTypeArgument: objectTypeArgument} +func NewBACnetPriorityValue( peekedTagHeader BACnetTagHeader , objectTypeArgument BACnetObjectType ) *_BACnetPriorityValue { +return &_BACnetPriorityValue{ PeekedTagHeader: peekedTagHeader , ObjectTypeArgument: objectTypeArgument } } // Deprecated: use the interface for direct cast func CastBACnetPriorityValue(structType interface{}) BACnetPriorityValue { - if casted, ok := structType.(BACnetPriorityValue); ok { + if casted, ok := structType.(BACnetPriorityValue); ok { return casted } if casted, ok := structType.(*BACnetPriorityValue); ok { @@ -129,6 +132,7 @@ func (m *_BACnetPriorityValue) GetTypeName() string { return "BACnetPriorityValue" } + func (m *_BACnetPriorityValue) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -156,13 +160,13 @@ func BACnetPriorityValueParseWithBuffer(ctx context.Context, readBuffer utils.Re currentPos := positionAware.GetPos() _ = currentPos - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Virtual field _peekedTagNumber := peekedTagHeader.GetActualTagNumber() @@ -175,49 +179,49 @@ func BACnetPriorityValueParseWithBuffer(ctx context.Context, readBuffer utils.Re _ = peekedIsContextTag // Validation - if !(bool((!(peekedIsContextTag))) || bool((bool(bool(peekedIsContextTag) && bool(bool((peekedTagHeader.GetLengthValueType()) != (0x6)))) && bool(bool((peekedTagHeader.GetLengthValueType()) != (0x7)))))) { + if (!(bool((!(peekedIsContextTag))) || bool((bool(bool(peekedIsContextTag) && bool(bool((peekedTagHeader.GetLengthValueType()) != (0x6)))) && bool(bool((peekedTagHeader.GetLengthValueType()) != (0x7))))))) { return nil, errors.WithStack(utils.ParseValidationError{"unexpected opening or closing tag"}) } // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetPriorityValueChildSerializeRequirement interface { BACnetPriorityValue - InitializeParent(BACnetPriorityValue, BACnetTagHeader) + InitializeParent(BACnetPriorityValue, BACnetTagHeader) GetParent() BACnetPriorityValue } var _childTemp interface{} var _child BACnetPriorityValueChildSerializeRequirement var typeSwitchError error switch { - case peekedTagNumber == 0x0 && peekedIsContextTag == bool(false): // BACnetPriorityValueNull +case peekedTagNumber == 0x0 && peekedIsContextTag == bool(false) : // BACnetPriorityValueNull _childTemp, typeSwitchError = BACnetPriorityValueNullParseWithBuffer(ctx, readBuffer, objectTypeArgument) - case peekedTagNumber == 0x4 && peekedIsContextTag == bool(false): // BACnetPriorityValueReal +case peekedTagNumber == 0x4 && peekedIsContextTag == bool(false) : // BACnetPriorityValueReal _childTemp, typeSwitchError = BACnetPriorityValueRealParseWithBuffer(ctx, readBuffer, objectTypeArgument) - case peekedTagNumber == 0x9 && peekedIsContextTag == bool(false): // BACnetPriorityValueEnumerated +case peekedTagNumber == 0x9 && peekedIsContextTag == bool(false) : // BACnetPriorityValueEnumerated _childTemp, typeSwitchError = BACnetPriorityValueEnumeratedParseWithBuffer(ctx, readBuffer, objectTypeArgument) - case peekedTagNumber == 0x2 && peekedIsContextTag == bool(false): // BACnetPriorityValueUnsigned +case peekedTagNumber == 0x2 && peekedIsContextTag == bool(false) : // BACnetPriorityValueUnsigned _childTemp, typeSwitchError = BACnetPriorityValueUnsignedParseWithBuffer(ctx, readBuffer, objectTypeArgument) - case peekedTagNumber == 0x1 && peekedIsContextTag == bool(false): // BACnetPriorityValueBoolean +case peekedTagNumber == 0x1 && peekedIsContextTag == bool(false) : // BACnetPriorityValueBoolean _childTemp, typeSwitchError = BACnetPriorityValueBooleanParseWithBuffer(ctx, readBuffer, objectTypeArgument) - case peekedTagNumber == 0x3 && peekedIsContextTag == bool(false): // BACnetPriorityValueInteger +case peekedTagNumber == 0x3 && peekedIsContextTag == bool(false) : // BACnetPriorityValueInteger _childTemp, typeSwitchError = BACnetPriorityValueIntegerParseWithBuffer(ctx, readBuffer, objectTypeArgument) - case peekedTagNumber == 0x5 && peekedIsContextTag == bool(false): // BACnetPriorityValueDouble +case peekedTagNumber == 0x5 && peekedIsContextTag == bool(false) : // BACnetPriorityValueDouble _childTemp, typeSwitchError = BACnetPriorityValueDoubleParseWithBuffer(ctx, readBuffer, objectTypeArgument) - case peekedTagNumber == 0xB && peekedIsContextTag == bool(false): // BACnetPriorityValueTime +case peekedTagNumber == 0xB && peekedIsContextTag == bool(false) : // BACnetPriorityValueTime _childTemp, typeSwitchError = BACnetPriorityValueTimeParseWithBuffer(ctx, readBuffer, objectTypeArgument) - case peekedTagNumber == 0x7 && peekedIsContextTag == bool(false): // BACnetPriorityValueCharacterString +case peekedTagNumber == 0x7 && peekedIsContextTag == bool(false) : // BACnetPriorityValueCharacterString _childTemp, typeSwitchError = BACnetPriorityValueCharacterStringParseWithBuffer(ctx, readBuffer, objectTypeArgument) - case peekedTagNumber == 0x6 && peekedIsContextTag == bool(false): // BACnetPriorityValueOctetString +case peekedTagNumber == 0x6 && peekedIsContextTag == bool(false) : // BACnetPriorityValueOctetString _childTemp, typeSwitchError = BACnetPriorityValueOctetStringParseWithBuffer(ctx, readBuffer, objectTypeArgument) - case peekedTagNumber == 0x8 && peekedIsContextTag == bool(false): // BACnetPriorityValueBitString +case peekedTagNumber == 0x8 && peekedIsContextTag == bool(false) : // BACnetPriorityValueBitString _childTemp, typeSwitchError = BACnetPriorityValueBitStringParseWithBuffer(ctx, readBuffer, objectTypeArgument) - case peekedTagNumber == 0xA && peekedIsContextTag == bool(false): // BACnetPriorityValueDate +case peekedTagNumber == 0xA && peekedIsContextTag == bool(false) : // BACnetPriorityValueDate _childTemp, typeSwitchError = BACnetPriorityValueDateParseWithBuffer(ctx, readBuffer, objectTypeArgument) - case peekedTagNumber == 0xC && peekedIsContextTag == bool(false): // BACnetPriorityValueObjectidentifier +case peekedTagNumber == 0xC && peekedIsContextTag == bool(false) : // BACnetPriorityValueObjectidentifier _childTemp, typeSwitchError = BACnetPriorityValueObjectidentifierParseWithBuffer(ctx, readBuffer, objectTypeArgument) - case peekedTagNumber == uint8(0) && peekedIsContextTag == bool(true): // BACnetPriorityValueConstructedValue +case peekedTagNumber == uint8(0) && peekedIsContextTag == bool(true) : // BACnetPriorityValueConstructedValue _childTemp, typeSwitchError = BACnetPriorityValueConstructedValueParseWithBuffer(ctx, readBuffer, objectTypeArgument) - case peekedTagNumber == uint8(1) && peekedIsContextTag == bool(true): // BACnetPriorityValueDateTime +case peekedTagNumber == uint8(1) && peekedIsContextTag == bool(true) : // BACnetPriorityValueDateTime _childTemp, typeSwitchError = BACnetPriorityValueDateTimeParseWithBuffer(ctx, readBuffer, objectTypeArgument) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedTagNumber=%v, peekedIsContextTag=%v]", peekedTagNumber, peekedIsContextTag) @@ -232,7 +236,7 @@ func BACnetPriorityValueParseWithBuffer(ctx context.Context, readBuffer utils.Re } // Finish initializing - _child.InitializeParent(_child, peekedTagHeader) +_child.InitializeParent(_child , peekedTagHeader ) return _child, nil } @@ -242,7 +246,7 @@ func (pm *_BACnetPriorityValue) SerializeParent(ctx context.Context, writeBuffer _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetPriorityValue"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetPriorityValue"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetPriorityValue") } // Virtual field @@ -265,13 +269,13 @@ func (pm *_BACnetPriorityValue) SerializeParent(ctx context.Context, writeBuffer return nil } + //// // Arguments Getter func (m *_BACnetPriorityValue) GetObjectTypeArgument() BACnetObjectType { return m.ObjectTypeArgument } - // //// @@ -289,3 +293,6 @@ func (m *_BACnetPriorityValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueBitString.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueBitString.go index c916399b1e6..c6d0281999a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueBitString.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueBitString.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPriorityValueBitString is the corresponding interface of BACnetPriorityValueBitString type BACnetPriorityValueBitString interface { @@ -46,9 +48,11 @@ type BACnetPriorityValueBitStringExactly interface { // _BACnetPriorityValueBitString is the data-structure of this message type _BACnetPriorityValueBitString struct { *_BACnetPriorityValue - BitStringValue BACnetApplicationTagBitString + BitStringValue BACnetApplicationTagBitString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPriorityValueBitString struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPriorityValueBitString) InitializeParent(parent BACnetPriorityValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPriorityValueBitString) InitializeParent(parent BACnetPriorityValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPriorityValueBitString) GetParent() BACnetPriorityValue { +func (m *_BACnetPriorityValueBitString) GetParent() BACnetPriorityValue { return m._BACnetPriorityValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPriorityValueBitString) GetBitStringValue() BACnetApplicationTag /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPriorityValueBitString factory function for _BACnetPriorityValueBitString -func NewBACnetPriorityValueBitString(bitStringValue BACnetApplicationTagBitString, peekedTagHeader BACnetTagHeader, objectTypeArgument BACnetObjectType) *_BACnetPriorityValueBitString { +func NewBACnetPriorityValueBitString( bitStringValue BACnetApplicationTagBitString , peekedTagHeader BACnetTagHeader , objectTypeArgument BACnetObjectType ) *_BACnetPriorityValueBitString { _result := &_BACnetPriorityValueBitString{ - BitStringValue: bitStringValue, - _BACnetPriorityValue: NewBACnetPriorityValue(peekedTagHeader, objectTypeArgument), + BitStringValue: bitStringValue, + _BACnetPriorityValue: NewBACnetPriorityValue(peekedTagHeader, objectTypeArgument), } _result._BACnetPriorityValue._BACnetPriorityValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPriorityValueBitString(bitStringValue BACnetApplicationTagBitStrin // Deprecated: use the interface for direct cast func CastBACnetPriorityValueBitString(structType interface{}) BACnetPriorityValueBitString { - if casted, ok := structType.(BACnetPriorityValueBitString); ok { + if casted, ok := structType.(BACnetPriorityValueBitString); ok { return casted } if casted, ok := structType.(*BACnetPriorityValueBitString); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPriorityValueBitString) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_BACnetPriorityValueBitString) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPriorityValueBitStringParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("bitStringValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for bitStringValue") } - _bitStringValue, _bitStringValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_bitStringValue, _bitStringValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _bitStringValueErr != nil { return nil, errors.Wrap(_bitStringValueErr, "Error parsing 'bitStringValue' field of BACnetPriorityValueBitString") } @@ -176,17 +180,17 @@ func (m *_BACnetPriorityValueBitString) SerializeWithWriteBuffer(ctx context.Con return errors.Wrap(pushErr, "Error pushing for BACnetPriorityValueBitString") } - // Simple Field (bitStringValue) - if pushErr := writeBuffer.PushContext("bitStringValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for bitStringValue") - } - _bitStringValueErr := writeBuffer.WriteSerializable(ctx, m.GetBitStringValue()) - if popErr := writeBuffer.PopContext("bitStringValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for bitStringValue") - } - if _bitStringValueErr != nil { - return errors.Wrap(_bitStringValueErr, "Error serializing 'bitStringValue' field") - } + // Simple Field (bitStringValue) + if pushErr := writeBuffer.PushContext("bitStringValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for bitStringValue") + } + _bitStringValueErr := writeBuffer.WriteSerializable(ctx, m.GetBitStringValue()) + if popErr := writeBuffer.PopContext("bitStringValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for bitStringValue") + } + if _bitStringValueErr != nil { + return errors.Wrap(_bitStringValueErr, "Error serializing 'bitStringValue' field") + } if popErr := writeBuffer.PopContext("BACnetPriorityValueBitString"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPriorityValueBitString") @@ -196,6 +200,7 @@ func (m *_BACnetPriorityValueBitString) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPriorityValueBitString) isBACnetPriorityValueBitString() bool { return true } @@ -210,3 +215,6 @@ func (m *_BACnetPriorityValueBitString) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueBoolean.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueBoolean.go index 06307de12a3..979646c8586 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueBoolean.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueBoolean.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPriorityValueBoolean is the corresponding interface of BACnetPriorityValueBoolean type BACnetPriorityValueBoolean interface { @@ -46,9 +48,11 @@ type BACnetPriorityValueBooleanExactly interface { // _BACnetPriorityValueBoolean is the data-structure of this message type _BACnetPriorityValueBoolean struct { *_BACnetPriorityValue - BooleanValue BACnetApplicationTagBoolean + BooleanValue BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPriorityValueBoolean struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPriorityValueBoolean) InitializeParent(parent BACnetPriorityValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPriorityValueBoolean) InitializeParent(parent BACnetPriorityValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPriorityValueBoolean) GetParent() BACnetPriorityValue { +func (m *_BACnetPriorityValueBoolean) GetParent() BACnetPriorityValue { return m._BACnetPriorityValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPriorityValueBoolean) GetBooleanValue() BACnetApplicationTagBool /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPriorityValueBoolean factory function for _BACnetPriorityValueBoolean -func NewBACnetPriorityValueBoolean(booleanValue BACnetApplicationTagBoolean, peekedTagHeader BACnetTagHeader, objectTypeArgument BACnetObjectType) *_BACnetPriorityValueBoolean { +func NewBACnetPriorityValueBoolean( booleanValue BACnetApplicationTagBoolean , peekedTagHeader BACnetTagHeader , objectTypeArgument BACnetObjectType ) *_BACnetPriorityValueBoolean { _result := &_BACnetPriorityValueBoolean{ - BooleanValue: booleanValue, - _BACnetPriorityValue: NewBACnetPriorityValue(peekedTagHeader, objectTypeArgument), + BooleanValue: booleanValue, + _BACnetPriorityValue: NewBACnetPriorityValue(peekedTagHeader, objectTypeArgument), } _result._BACnetPriorityValue._BACnetPriorityValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPriorityValueBoolean(booleanValue BACnetApplicationTagBoolean, pee // Deprecated: use the interface for direct cast func CastBACnetPriorityValueBoolean(structType interface{}) BACnetPriorityValueBoolean { - if casted, ok := structType.(BACnetPriorityValueBoolean); ok { + if casted, ok := structType.(BACnetPriorityValueBoolean); ok { return casted } if casted, ok := structType.(*BACnetPriorityValueBoolean); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPriorityValueBoolean) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_BACnetPriorityValueBoolean) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPriorityValueBooleanParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("booleanValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for booleanValue") } - _booleanValue, _booleanValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_booleanValue, _booleanValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _booleanValueErr != nil { return nil, errors.Wrap(_booleanValueErr, "Error parsing 'booleanValue' field of BACnetPriorityValueBoolean") } @@ -176,17 +180,17 @@ func (m *_BACnetPriorityValueBoolean) SerializeWithWriteBuffer(ctx context.Conte return errors.Wrap(pushErr, "Error pushing for BACnetPriorityValueBoolean") } - // Simple Field (booleanValue) - if pushErr := writeBuffer.PushContext("booleanValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for booleanValue") - } - _booleanValueErr := writeBuffer.WriteSerializable(ctx, m.GetBooleanValue()) - if popErr := writeBuffer.PopContext("booleanValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for booleanValue") - } - if _booleanValueErr != nil { - return errors.Wrap(_booleanValueErr, "Error serializing 'booleanValue' field") - } + // Simple Field (booleanValue) + if pushErr := writeBuffer.PushContext("booleanValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for booleanValue") + } + _booleanValueErr := writeBuffer.WriteSerializable(ctx, m.GetBooleanValue()) + if popErr := writeBuffer.PopContext("booleanValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for booleanValue") + } + if _booleanValueErr != nil { + return errors.Wrap(_booleanValueErr, "Error serializing 'booleanValue' field") + } if popErr := writeBuffer.PopContext("BACnetPriorityValueBoolean"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPriorityValueBoolean") @@ -196,6 +200,7 @@ func (m *_BACnetPriorityValueBoolean) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPriorityValueBoolean) isBACnetPriorityValueBoolean() bool { return true } @@ -210,3 +215,6 @@ func (m *_BACnetPriorityValueBoolean) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueCharacterString.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueCharacterString.go index 2336bdde6ec..de35bdfd2b6 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueCharacterString.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueCharacterString.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPriorityValueCharacterString is the corresponding interface of BACnetPriorityValueCharacterString type BACnetPriorityValueCharacterString interface { @@ -46,9 +48,11 @@ type BACnetPriorityValueCharacterStringExactly interface { // _BACnetPriorityValueCharacterString is the data-structure of this message type _BACnetPriorityValueCharacterString struct { *_BACnetPriorityValue - CharacterStringValue BACnetApplicationTagCharacterString + CharacterStringValue BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPriorityValueCharacterString struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPriorityValueCharacterString) InitializeParent(parent BACnetPriorityValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPriorityValueCharacterString) InitializeParent(parent BACnetPriorityValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPriorityValueCharacterString) GetParent() BACnetPriorityValue { +func (m *_BACnetPriorityValueCharacterString) GetParent() BACnetPriorityValue { return m._BACnetPriorityValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPriorityValueCharacterString) GetCharacterStringValue() BACnetAp /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPriorityValueCharacterString factory function for _BACnetPriorityValueCharacterString -func NewBACnetPriorityValueCharacterString(characterStringValue BACnetApplicationTagCharacterString, peekedTagHeader BACnetTagHeader, objectTypeArgument BACnetObjectType) *_BACnetPriorityValueCharacterString { +func NewBACnetPriorityValueCharacterString( characterStringValue BACnetApplicationTagCharacterString , peekedTagHeader BACnetTagHeader , objectTypeArgument BACnetObjectType ) *_BACnetPriorityValueCharacterString { _result := &_BACnetPriorityValueCharacterString{ CharacterStringValue: characterStringValue, - _BACnetPriorityValue: NewBACnetPriorityValue(peekedTagHeader, objectTypeArgument), + _BACnetPriorityValue: NewBACnetPriorityValue(peekedTagHeader, objectTypeArgument), } _result._BACnetPriorityValue._BACnetPriorityValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPriorityValueCharacterString(characterStringValue BACnetApplicatio // Deprecated: use the interface for direct cast func CastBACnetPriorityValueCharacterString(structType interface{}) BACnetPriorityValueCharacterString { - if casted, ok := structType.(BACnetPriorityValueCharacterString); ok { + if casted, ok := structType.(BACnetPriorityValueCharacterString); ok { return casted } if casted, ok := structType.(*BACnetPriorityValueCharacterString); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPriorityValueCharacterString) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetPriorityValueCharacterString) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPriorityValueCharacterStringParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("characterStringValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for characterStringValue") } - _characterStringValue, _characterStringValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_characterStringValue, _characterStringValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _characterStringValueErr != nil { return nil, errors.Wrap(_characterStringValueErr, "Error parsing 'characterStringValue' field of BACnetPriorityValueCharacterString") } @@ -176,17 +180,17 @@ func (m *_BACnetPriorityValueCharacterString) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetPriorityValueCharacterString") } - // Simple Field (characterStringValue) - if pushErr := writeBuffer.PushContext("characterStringValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for characterStringValue") - } - _characterStringValueErr := writeBuffer.WriteSerializable(ctx, m.GetCharacterStringValue()) - if popErr := writeBuffer.PopContext("characterStringValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for characterStringValue") - } - if _characterStringValueErr != nil { - return errors.Wrap(_characterStringValueErr, "Error serializing 'characterStringValue' field") - } + // Simple Field (characterStringValue) + if pushErr := writeBuffer.PushContext("characterStringValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for characterStringValue") + } + _characterStringValueErr := writeBuffer.WriteSerializable(ctx, m.GetCharacterStringValue()) + if popErr := writeBuffer.PopContext("characterStringValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for characterStringValue") + } + if _characterStringValueErr != nil { + return errors.Wrap(_characterStringValueErr, "Error serializing 'characterStringValue' field") + } if popErr := writeBuffer.PopContext("BACnetPriorityValueCharacterString"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPriorityValueCharacterString") @@ -196,6 +200,7 @@ func (m *_BACnetPriorityValueCharacterString) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPriorityValueCharacterString) isBACnetPriorityValueCharacterString() bool { return true } @@ -210,3 +215,6 @@ func (m *_BACnetPriorityValueCharacterString) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueConstructedValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueConstructedValue.go index feebd471f0b..675daae6967 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueConstructedValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueConstructedValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPriorityValueConstructedValue is the corresponding interface of BACnetPriorityValueConstructedValue type BACnetPriorityValueConstructedValue interface { @@ -46,9 +48,11 @@ type BACnetPriorityValueConstructedValueExactly interface { // _BACnetPriorityValueConstructedValue is the data-structure of this message type _BACnetPriorityValueConstructedValue struct { *_BACnetPriorityValue - ConstructedValue BACnetConstructedData + ConstructedValue BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPriorityValueConstructedValue struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPriorityValueConstructedValue) InitializeParent(parent BACnetPriorityValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPriorityValueConstructedValue) InitializeParent(parent BACnetPriorityValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPriorityValueConstructedValue) GetParent() BACnetPriorityValue { +func (m *_BACnetPriorityValueConstructedValue) GetParent() BACnetPriorityValue { return m._BACnetPriorityValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPriorityValueConstructedValue) GetConstructedValue() BACnetConst /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPriorityValueConstructedValue factory function for _BACnetPriorityValueConstructedValue -func NewBACnetPriorityValueConstructedValue(constructedValue BACnetConstructedData, peekedTagHeader BACnetTagHeader, objectTypeArgument BACnetObjectType) *_BACnetPriorityValueConstructedValue { +func NewBACnetPriorityValueConstructedValue( constructedValue BACnetConstructedData , peekedTagHeader BACnetTagHeader , objectTypeArgument BACnetObjectType ) *_BACnetPriorityValueConstructedValue { _result := &_BACnetPriorityValueConstructedValue{ - ConstructedValue: constructedValue, - _BACnetPriorityValue: NewBACnetPriorityValue(peekedTagHeader, objectTypeArgument), + ConstructedValue: constructedValue, + _BACnetPriorityValue: NewBACnetPriorityValue(peekedTagHeader, objectTypeArgument), } _result._BACnetPriorityValue._BACnetPriorityValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPriorityValueConstructedValue(constructedValue BACnetConstructedDa // Deprecated: use the interface for direct cast func CastBACnetPriorityValueConstructedValue(structType interface{}) BACnetPriorityValueConstructedValue { - if casted, ok := structType.(BACnetPriorityValueConstructedValue); ok { + if casted, ok := structType.(BACnetPriorityValueConstructedValue); ok { return casted } if casted, ok := structType.(*BACnetPriorityValueConstructedValue); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPriorityValueConstructedValue) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetPriorityValueConstructedValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPriorityValueConstructedValueParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("constructedValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for constructedValue") } - _constructedValue, _constructedValueErr := BACnetConstructedDataParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetObjectType(objectTypeArgument), BACnetPropertyIdentifier(BACnetPropertyIdentifier_VENDOR_PROPRIETARY_VALUE), nil) +_constructedValue, _constructedValueErr := BACnetConstructedDataParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetObjectType( objectTypeArgument ) , BACnetPropertyIdentifier( BACnetPropertyIdentifier_VENDOR_PROPRIETARY_VALUE ) , nil ) if _constructedValueErr != nil { return nil, errors.Wrap(_constructedValueErr, "Error parsing 'constructedValue' field of BACnetPriorityValueConstructedValue") } @@ -176,17 +180,17 @@ func (m *_BACnetPriorityValueConstructedValue) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetPriorityValueConstructedValue") } - // Simple Field (constructedValue) - if pushErr := writeBuffer.PushContext("constructedValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for constructedValue") - } - _constructedValueErr := writeBuffer.WriteSerializable(ctx, m.GetConstructedValue()) - if popErr := writeBuffer.PopContext("constructedValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for constructedValue") - } - if _constructedValueErr != nil { - return errors.Wrap(_constructedValueErr, "Error serializing 'constructedValue' field") - } + // Simple Field (constructedValue) + if pushErr := writeBuffer.PushContext("constructedValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for constructedValue") + } + _constructedValueErr := writeBuffer.WriteSerializable(ctx, m.GetConstructedValue()) + if popErr := writeBuffer.PopContext("constructedValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for constructedValue") + } + if _constructedValueErr != nil { + return errors.Wrap(_constructedValueErr, "Error serializing 'constructedValue' field") + } if popErr := writeBuffer.PopContext("BACnetPriorityValueConstructedValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPriorityValueConstructedValue") @@ -196,6 +200,7 @@ func (m *_BACnetPriorityValueConstructedValue) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPriorityValueConstructedValue) isBACnetPriorityValueConstructedValue() bool { return true } @@ -210,3 +215,6 @@ func (m *_BACnetPriorityValueConstructedValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueDate.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueDate.go index b7085b36fcf..9c092c78053 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueDate.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueDate.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPriorityValueDate is the corresponding interface of BACnetPriorityValueDate type BACnetPriorityValueDate interface { @@ -46,9 +48,11 @@ type BACnetPriorityValueDateExactly interface { // _BACnetPriorityValueDate is the data-structure of this message type _BACnetPriorityValueDate struct { *_BACnetPriorityValue - DateValue BACnetApplicationTagDate + DateValue BACnetApplicationTagDate } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPriorityValueDate struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPriorityValueDate) InitializeParent(parent BACnetPriorityValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPriorityValueDate) InitializeParent(parent BACnetPriorityValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPriorityValueDate) GetParent() BACnetPriorityValue { +func (m *_BACnetPriorityValueDate) GetParent() BACnetPriorityValue { return m._BACnetPriorityValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPriorityValueDate) GetDateValue() BACnetApplicationTagDate { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPriorityValueDate factory function for _BACnetPriorityValueDate -func NewBACnetPriorityValueDate(dateValue BACnetApplicationTagDate, peekedTagHeader BACnetTagHeader, objectTypeArgument BACnetObjectType) *_BACnetPriorityValueDate { +func NewBACnetPriorityValueDate( dateValue BACnetApplicationTagDate , peekedTagHeader BACnetTagHeader , objectTypeArgument BACnetObjectType ) *_BACnetPriorityValueDate { _result := &_BACnetPriorityValueDate{ - DateValue: dateValue, - _BACnetPriorityValue: NewBACnetPriorityValue(peekedTagHeader, objectTypeArgument), + DateValue: dateValue, + _BACnetPriorityValue: NewBACnetPriorityValue(peekedTagHeader, objectTypeArgument), } _result._BACnetPriorityValue._BACnetPriorityValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPriorityValueDate(dateValue BACnetApplicationTagDate, peekedTagHea // Deprecated: use the interface for direct cast func CastBACnetPriorityValueDate(structType interface{}) BACnetPriorityValueDate { - if casted, ok := structType.(BACnetPriorityValueDate); ok { + if casted, ok := structType.(BACnetPriorityValueDate); ok { return casted } if casted, ok := structType.(*BACnetPriorityValueDate); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPriorityValueDate) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetPriorityValueDate) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPriorityValueDateParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("dateValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for dateValue") } - _dateValue, _dateValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_dateValue, _dateValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _dateValueErr != nil { return nil, errors.Wrap(_dateValueErr, "Error parsing 'dateValue' field of BACnetPriorityValueDate") } @@ -176,17 +180,17 @@ func (m *_BACnetPriorityValueDate) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for BACnetPriorityValueDate") } - // Simple Field (dateValue) - if pushErr := writeBuffer.PushContext("dateValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for dateValue") - } - _dateValueErr := writeBuffer.WriteSerializable(ctx, m.GetDateValue()) - if popErr := writeBuffer.PopContext("dateValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for dateValue") - } - if _dateValueErr != nil { - return errors.Wrap(_dateValueErr, "Error serializing 'dateValue' field") - } + // Simple Field (dateValue) + if pushErr := writeBuffer.PushContext("dateValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for dateValue") + } + _dateValueErr := writeBuffer.WriteSerializable(ctx, m.GetDateValue()) + if popErr := writeBuffer.PopContext("dateValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for dateValue") + } + if _dateValueErr != nil { + return errors.Wrap(_dateValueErr, "Error serializing 'dateValue' field") + } if popErr := writeBuffer.PopContext("BACnetPriorityValueDate"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPriorityValueDate") @@ -196,6 +200,7 @@ func (m *_BACnetPriorityValueDate) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPriorityValueDate) isBACnetPriorityValueDate() bool { return true } @@ -210,3 +215,6 @@ func (m *_BACnetPriorityValueDate) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueDateTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueDateTime.go index e721f789e4b..06bf9446f05 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueDateTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueDateTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPriorityValueDateTime is the corresponding interface of BACnetPriorityValueDateTime type BACnetPriorityValueDateTime interface { @@ -46,9 +48,11 @@ type BACnetPriorityValueDateTimeExactly interface { // _BACnetPriorityValueDateTime is the data-structure of this message type _BACnetPriorityValueDateTime struct { *_BACnetPriorityValue - DateTimeValue BACnetDateTimeEnclosed + DateTimeValue BACnetDateTimeEnclosed } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPriorityValueDateTime struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPriorityValueDateTime) InitializeParent(parent BACnetPriorityValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPriorityValueDateTime) InitializeParent(parent BACnetPriorityValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPriorityValueDateTime) GetParent() BACnetPriorityValue { +func (m *_BACnetPriorityValueDateTime) GetParent() BACnetPriorityValue { return m._BACnetPriorityValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPriorityValueDateTime) GetDateTimeValue() BACnetDateTimeEnclosed /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPriorityValueDateTime factory function for _BACnetPriorityValueDateTime -func NewBACnetPriorityValueDateTime(dateTimeValue BACnetDateTimeEnclosed, peekedTagHeader BACnetTagHeader, objectTypeArgument BACnetObjectType) *_BACnetPriorityValueDateTime { +func NewBACnetPriorityValueDateTime( dateTimeValue BACnetDateTimeEnclosed , peekedTagHeader BACnetTagHeader , objectTypeArgument BACnetObjectType ) *_BACnetPriorityValueDateTime { _result := &_BACnetPriorityValueDateTime{ - DateTimeValue: dateTimeValue, - _BACnetPriorityValue: NewBACnetPriorityValue(peekedTagHeader, objectTypeArgument), + DateTimeValue: dateTimeValue, + _BACnetPriorityValue: NewBACnetPriorityValue(peekedTagHeader, objectTypeArgument), } _result._BACnetPriorityValue._BACnetPriorityValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPriorityValueDateTime(dateTimeValue BACnetDateTimeEnclosed, peeked // Deprecated: use the interface for direct cast func CastBACnetPriorityValueDateTime(structType interface{}) BACnetPriorityValueDateTime { - if casted, ok := structType.(BACnetPriorityValueDateTime); ok { + if casted, ok := structType.(BACnetPriorityValueDateTime); ok { return casted } if casted, ok := structType.(*BACnetPriorityValueDateTime); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPriorityValueDateTime) GetLengthInBits(ctx context.Context) uint return lengthInBits } + func (m *_BACnetPriorityValueDateTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPriorityValueDateTimeParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("dateTimeValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for dateTimeValue") } - _dateTimeValue, _dateTimeValueErr := BACnetDateTimeEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(1))) +_dateTimeValue, _dateTimeValueErr := BACnetDateTimeEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) ) if _dateTimeValueErr != nil { return nil, errors.Wrap(_dateTimeValueErr, "Error parsing 'dateTimeValue' field of BACnetPriorityValueDateTime") } @@ -176,17 +180,17 @@ func (m *_BACnetPriorityValueDateTime) SerializeWithWriteBuffer(ctx context.Cont return errors.Wrap(pushErr, "Error pushing for BACnetPriorityValueDateTime") } - // Simple Field (dateTimeValue) - if pushErr := writeBuffer.PushContext("dateTimeValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for dateTimeValue") - } - _dateTimeValueErr := writeBuffer.WriteSerializable(ctx, m.GetDateTimeValue()) - if popErr := writeBuffer.PopContext("dateTimeValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for dateTimeValue") - } - if _dateTimeValueErr != nil { - return errors.Wrap(_dateTimeValueErr, "Error serializing 'dateTimeValue' field") - } + // Simple Field (dateTimeValue) + if pushErr := writeBuffer.PushContext("dateTimeValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for dateTimeValue") + } + _dateTimeValueErr := writeBuffer.WriteSerializable(ctx, m.GetDateTimeValue()) + if popErr := writeBuffer.PopContext("dateTimeValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for dateTimeValue") + } + if _dateTimeValueErr != nil { + return errors.Wrap(_dateTimeValueErr, "Error serializing 'dateTimeValue' field") + } if popErr := writeBuffer.PopContext("BACnetPriorityValueDateTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPriorityValueDateTime") @@ -196,6 +200,7 @@ func (m *_BACnetPriorityValueDateTime) SerializeWithWriteBuffer(ctx context.Cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPriorityValueDateTime) isBACnetPriorityValueDateTime() bool { return true } @@ -210,3 +215,6 @@ func (m *_BACnetPriorityValueDateTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueDouble.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueDouble.go index 739c524a370..0639ca0bf59 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueDouble.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueDouble.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPriorityValueDouble is the corresponding interface of BACnetPriorityValueDouble type BACnetPriorityValueDouble interface { @@ -46,9 +48,11 @@ type BACnetPriorityValueDoubleExactly interface { // _BACnetPriorityValueDouble is the data-structure of this message type _BACnetPriorityValueDouble struct { *_BACnetPriorityValue - DoubleValue BACnetApplicationTagDouble + DoubleValue BACnetApplicationTagDouble } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPriorityValueDouble struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPriorityValueDouble) InitializeParent(parent BACnetPriorityValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPriorityValueDouble) InitializeParent(parent BACnetPriorityValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPriorityValueDouble) GetParent() BACnetPriorityValue { +func (m *_BACnetPriorityValueDouble) GetParent() BACnetPriorityValue { return m._BACnetPriorityValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPriorityValueDouble) GetDoubleValue() BACnetApplicationTagDouble /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPriorityValueDouble factory function for _BACnetPriorityValueDouble -func NewBACnetPriorityValueDouble(doubleValue BACnetApplicationTagDouble, peekedTagHeader BACnetTagHeader, objectTypeArgument BACnetObjectType) *_BACnetPriorityValueDouble { +func NewBACnetPriorityValueDouble( doubleValue BACnetApplicationTagDouble , peekedTagHeader BACnetTagHeader , objectTypeArgument BACnetObjectType ) *_BACnetPriorityValueDouble { _result := &_BACnetPriorityValueDouble{ - DoubleValue: doubleValue, - _BACnetPriorityValue: NewBACnetPriorityValue(peekedTagHeader, objectTypeArgument), + DoubleValue: doubleValue, + _BACnetPriorityValue: NewBACnetPriorityValue(peekedTagHeader, objectTypeArgument), } _result._BACnetPriorityValue._BACnetPriorityValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPriorityValueDouble(doubleValue BACnetApplicationTagDouble, peeked // Deprecated: use the interface for direct cast func CastBACnetPriorityValueDouble(structType interface{}) BACnetPriorityValueDouble { - if casted, ok := structType.(BACnetPriorityValueDouble); ok { + if casted, ok := structType.(BACnetPriorityValueDouble); ok { return casted } if casted, ok := structType.(*BACnetPriorityValueDouble); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPriorityValueDouble) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_BACnetPriorityValueDouble) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPriorityValueDoubleParseWithBuffer(ctx context.Context, readBuffer ut if pullErr := readBuffer.PullContext("doubleValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for doubleValue") } - _doubleValue, _doubleValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_doubleValue, _doubleValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _doubleValueErr != nil { return nil, errors.Wrap(_doubleValueErr, "Error parsing 'doubleValue' field of BACnetPriorityValueDouble") } @@ -176,17 +180,17 @@ func (m *_BACnetPriorityValueDouble) SerializeWithWriteBuffer(ctx context.Contex return errors.Wrap(pushErr, "Error pushing for BACnetPriorityValueDouble") } - // Simple Field (doubleValue) - if pushErr := writeBuffer.PushContext("doubleValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for doubleValue") - } - _doubleValueErr := writeBuffer.WriteSerializable(ctx, m.GetDoubleValue()) - if popErr := writeBuffer.PopContext("doubleValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for doubleValue") - } - if _doubleValueErr != nil { - return errors.Wrap(_doubleValueErr, "Error serializing 'doubleValue' field") - } + // Simple Field (doubleValue) + if pushErr := writeBuffer.PushContext("doubleValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for doubleValue") + } + _doubleValueErr := writeBuffer.WriteSerializable(ctx, m.GetDoubleValue()) + if popErr := writeBuffer.PopContext("doubleValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for doubleValue") + } + if _doubleValueErr != nil { + return errors.Wrap(_doubleValueErr, "Error serializing 'doubleValue' field") + } if popErr := writeBuffer.PopContext("BACnetPriorityValueDouble"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPriorityValueDouble") @@ -196,6 +200,7 @@ func (m *_BACnetPriorityValueDouble) SerializeWithWriteBuffer(ctx context.Contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPriorityValueDouble) isBACnetPriorityValueDouble() bool { return true } @@ -210,3 +215,6 @@ func (m *_BACnetPriorityValueDouble) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueEnumerated.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueEnumerated.go index 17bc090ed38..2c217f2d4b4 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueEnumerated.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueEnumerated.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPriorityValueEnumerated is the corresponding interface of BACnetPriorityValueEnumerated type BACnetPriorityValueEnumerated interface { @@ -46,9 +48,11 @@ type BACnetPriorityValueEnumeratedExactly interface { // _BACnetPriorityValueEnumerated is the data-structure of this message type _BACnetPriorityValueEnumerated struct { *_BACnetPriorityValue - EnumeratedValue BACnetApplicationTagEnumerated + EnumeratedValue BACnetApplicationTagEnumerated } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPriorityValueEnumerated struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPriorityValueEnumerated) InitializeParent(parent BACnetPriorityValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPriorityValueEnumerated) InitializeParent(parent BACnetPriorityValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPriorityValueEnumerated) GetParent() BACnetPriorityValue { +func (m *_BACnetPriorityValueEnumerated) GetParent() BACnetPriorityValue { return m._BACnetPriorityValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPriorityValueEnumerated) GetEnumeratedValue() BACnetApplicationT /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPriorityValueEnumerated factory function for _BACnetPriorityValueEnumerated -func NewBACnetPriorityValueEnumerated(enumeratedValue BACnetApplicationTagEnumerated, peekedTagHeader BACnetTagHeader, objectTypeArgument BACnetObjectType) *_BACnetPriorityValueEnumerated { +func NewBACnetPriorityValueEnumerated( enumeratedValue BACnetApplicationTagEnumerated , peekedTagHeader BACnetTagHeader , objectTypeArgument BACnetObjectType ) *_BACnetPriorityValueEnumerated { _result := &_BACnetPriorityValueEnumerated{ - EnumeratedValue: enumeratedValue, - _BACnetPriorityValue: NewBACnetPriorityValue(peekedTagHeader, objectTypeArgument), + EnumeratedValue: enumeratedValue, + _BACnetPriorityValue: NewBACnetPriorityValue(peekedTagHeader, objectTypeArgument), } _result._BACnetPriorityValue._BACnetPriorityValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPriorityValueEnumerated(enumeratedValue BACnetApplicationTagEnumer // Deprecated: use the interface for direct cast func CastBACnetPriorityValueEnumerated(structType interface{}) BACnetPriorityValueEnumerated { - if casted, ok := structType.(BACnetPriorityValueEnumerated); ok { + if casted, ok := structType.(BACnetPriorityValueEnumerated); ok { return casted } if casted, ok := structType.(*BACnetPriorityValueEnumerated); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPriorityValueEnumerated) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetPriorityValueEnumerated) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPriorityValueEnumeratedParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("enumeratedValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for enumeratedValue") } - _enumeratedValue, _enumeratedValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_enumeratedValue, _enumeratedValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _enumeratedValueErr != nil { return nil, errors.Wrap(_enumeratedValueErr, "Error parsing 'enumeratedValue' field of BACnetPriorityValueEnumerated") } @@ -176,17 +180,17 @@ func (m *_BACnetPriorityValueEnumerated) SerializeWithWriteBuffer(ctx context.Co return errors.Wrap(pushErr, "Error pushing for BACnetPriorityValueEnumerated") } - // Simple Field (enumeratedValue) - if pushErr := writeBuffer.PushContext("enumeratedValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for enumeratedValue") - } - _enumeratedValueErr := writeBuffer.WriteSerializable(ctx, m.GetEnumeratedValue()) - if popErr := writeBuffer.PopContext("enumeratedValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for enumeratedValue") - } - if _enumeratedValueErr != nil { - return errors.Wrap(_enumeratedValueErr, "Error serializing 'enumeratedValue' field") - } + // Simple Field (enumeratedValue) + if pushErr := writeBuffer.PushContext("enumeratedValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for enumeratedValue") + } + _enumeratedValueErr := writeBuffer.WriteSerializable(ctx, m.GetEnumeratedValue()) + if popErr := writeBuffer.PopContext("enumeratedValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for enumeratedValue") + } + if _enumeratedValueErr != nil { + return errors.Wrap(_enumeratedValueErr, "Error serializing 'enumeratedValue' field") + } if popErr := writeBuffer.PopContext("BACnetPriorityValueEnumerated"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPriorityValueEnumerated") @@ -196,6 +200,7 @@ func (m *_BACnetPriorityValueEnumerated) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPriorityValueEnumerated) isBACnetPriorityValueEnumerated() bool { return true } @@ -210,3 +215,6 @@ func (m *_BACnetPriorityValueEnumerated) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueInteger.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueInteger.go index 782a882ec14..65bacd5dfb8 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueInteger.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueInteger.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPriorityValueInteger is the corresponding interface of BACnetPriorityValueInteger type BACnetPriorityValueInteger interface { @@ -46,9 +48,11 @@ type BACnetPriorityValueIntegerExactly interface { // _BACnetPriorityValueInteger is the data-structure of this message type _BACnetPriorityValueInteger struct { *_BACnetPriorityValue - IntegerValue BACnetApplicationTagSignedInteger + IntegerValue BACnetApplicationTagSignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPriorityValueInteger struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPriorityValueInteger) InitializeParent(parent BACnetPriorityValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPriorityValueInteger) InitializeParent(parent BACnetPriorityValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPriorityValueInteger) GetParent() BACnetPriorityValue { +func (m *_BACnetPriorityValueInteger) GetParent() BACnetPriorityValue { return m._BACnetPriorityValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPriorityValueInteger) GetIntegerValue() BACnetApplicationTagSign /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPriorityValueInteger factory function for _BACnetPriorityValueInteger -func NewBACnetPriorityValueInteger(integerValue BACnetApplicationTagSignedInteger, peekedTagHeader BACnetTagHeader, objectTypeArgument BACnetObjectType) *_BACnetPriorityValueInteger { +func NewBACnetPriorityValueInteger( integerValue BACnetApplicationTagSignedInteger , peekedTagHeader BACnetTagHeader , objectTypeArgument BACnetObjectType ) *_BACnetPriorityValueInteger { _result := &_BACnetPriorityValueInteger{ - IntegerValue: integerValue, - _BACnetPriorityValue: NewBACnetPriorityValue(peekedTagHeader, objectTypeArgument), + IntegerValue: integerValue, + _BACnetPriorityValue: NewBACnetPriorityValue(peekedTagHeader, objectTypeArgument), } _result._BACnetPriorityValue._BACnetPriorityValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPriorityValueInteger(integerValue BACnetApplicationTagSignedIntege // Deprecated: use the interface for direct cast func CastBACnetPriorityValueInteger(structType interface{}) BACnetPriorityValueInteger { - if casted, ok := structType.(BACnetPriorityValueInteger); ok { + if casted, ok := structType.(BACnetPriorityValueInteger); ok { return casted } if casted, ok := structType.(*BACnetPriorityValueInteger); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPriorityValueInteger) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_BACnetPriorityValueInteger) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPriorityValueIntegerParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("integerValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for integerValue") } - _integerValue, _integerValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_integerValue, _integerValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _integerValueErr != nil { return nil, errors.Wrap(_integerValueErr, "Error parsing 'integerValue' field of BACnetPriorityValueInteger") } @@ -176,17 +180,17 @@ func (m *_BACnetPriorityValueInteger) SerializeWithWriteBuffer(ctx context.Conte return errors.Wrap(pushErr, "Error pushing for BACnetPriorityValueInteger") } - // Simple Field (integerValue) - if pushErr := writeBuffer.PushContext("integerValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for integerValue") - } - _integerValueErr := writeBuffer.WriteSerializable(ctx, m.GetIntegerValue()) - if popErr := writeBuffer.PopContext("integerValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for integerValue") - } - if _integerValueErr != nil { - return errors.Wrap(_integerValueErr, "Error serializing 'integerValue' field") - } + // Simple Field (integerValue) + if pushErr := writeBuffer.PushContext("integerValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for integerValue") + } + _integerValueErr := writeBuffer.WriteSerializable(ctx, m.GetIntegerValue()) + if popErr := writeBuffer.PopContext("integerValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for integerValue") + } + if _integerValueErr != nil { + return errors.Wrap(_integerValueErr, "Error serializing 'integerValue' field") + } if popErr := writeBuffer.PopContext("BACnetPriorityValueInteger"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPriorityValueInteger") @@ -196,6 +200,7 @@ func (m *_BACnetPriorityValueInteger) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPriorityValueInteger) isBACnetPriorityValueInteger() bool { return true } @@ -210,3 +215,6 @@ func (m *_BACnetPriorityValueInteger) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueNull.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueNull.go index 7424e05c238..962da5f35b6 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueNull.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueNull.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPriorityValueNull is the corresponding interface of BACnetPriorityValueNull type BACnetPriorityValueNull interface { @@ -46,9 +48,11 @@ type BACnetPriorityValueNullExactly interface { // _BACnetPriorityValueNull is the data-structure of this message type _BACnetPriorityValueNull struct { *_BACnetPriorityValue - NullValue BACnetApplicationTagNull + NullValue BACnetApplicationTagNull } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPriorityValueNull struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPriorityValueNull) InitializeParent(parent BACnetPriorityValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPriorityValueNull) InitializeParent(parent BACnetPriorityValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPriorityValueNull) GetParent() BACnetPriorityValue { +func (m *_BACnetPriorityValueNull) GetParent() BACnetPriorityValue { return m._BACnetPriorityValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPriorityValueNull) GetNullValue() BACnetApplicationTagNull { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPriorityValueNull factory function for _BACnetPriorityValueNull -func NewBACnetPriorityValueNull(nullValue BACnetApplicationTagNull, peekedTagHeader BACnetTagHeader, objectTypeArgument BACnetObjectType) *_BACnetPriorityValueNull { +func NewBACnetPriorityValueNull( nullValue BACnetApplicationTagNull , peekedTagHeader BACnetTagHeader , objectTypeArgument BACnetObjectType ) *_BACnetPriorityValueNull { _result := &_BACnetPriorityValueNull{ - NullValue: nullValue, - _BACnetPriorityValue: NewBACnetPriorityValue(peekedTagHeader, objectTypeArgument), + NullValue: nullValue, + _BACnetPriorityValue: NewBACnetPriorityValue(peekedTagHeader, objectTypeArgument), } _result._BACnetPriorityValue._BACnetPriorityValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPriorityValueNull(nullValue BACnetApplicationTagNull, peekedTagHea // Deprecated: use the interface for direct cast func CastBACnetPriorityValueNull(structType interface{}) BACnetPriorityValueNull { - if casted, ok := structType.(BACnetPriorityValueNull); ok { + if casted, ok := structType.(BACnetPriorityValueNull); ok { return casted } if casted, ok := structType.(*BACnetPriorityValueNull); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPriorityValueNull) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetPriorityValueNull) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPriorityValueNullParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("nullValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for nullValue") } - _nullValue, _nullValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_nullValue, _nullValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _nullValueErr != nil { return nil, errors.Wrap(_nullValueErr, "Error parsing 'nullValue' field of BACnetPriorityValueNull") } @@ -176,17 +180,17 @@ func (m *_BACnetPriorityValueNull) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for BACnetPriorityValueNull") } - // Simple Field (nullValue) - if pushErr := writeBuffer.PushContext("nullValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for nullValue") - } - _nullValueErr := writeBuffer.WriteSerializable(ctx, m.GetNullValue()) - if popErr := writeBuffer.PopContext("nullValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for nullValue") - } - if _nullValueErr != nil { - return errors.Wrap(_nullValueErr, "Error serializing 'nullValue' field") - } + // Simple Field (nullValue) + if pushErr := writeBuffer.PushContext("nullValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for nullValue") + } + _nullValueErr := writeBuffer.WriteSerializable(ctx, m.GetNullValue()) + if popErr := writeBuffer.PopContext("nullValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for nullValue") + } + if _nullValueErr != nil { + return errors.Wrap(_nullValueErr, "Error serializing 'nullValue' field") + } if popErr := writeBuffer.PopContext("BACnetPriorityValueNull"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPriorityValueNull") @@ -196,6 +200,7 @@ func (m *_BACnetPriorityValueNull) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPriorityValueNull) isBACnetPriorityValueNull() bool { return true } @@ -210,3 +215,6 @@ func (m *_BACnetPriorityValueNull) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueObjectidentifier.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueObjectidentifier.go index 262020a81cf..4a1288cadfa 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueObjectidentifier.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueObjectidentifier.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPriorityValueObjectidentifier is the corresponding interface of BACnetPriorityValueObjectidentifier type BACnetPriorityValueObjectidentifier interface { @@ -46,9 +48,11 @@ type BACnetPriorityValueObjectidentifierExactly interface { // _BACnetPriorityValueObjectidentifier is the data-structure of this message type _BACnetPriorityValueObjectidentifier struct { *_BACnetPriorityValue - ObjectidentifierValue BACnetApplicationTagObjectIdentifier + ObjectidentifierValue BACnetApplicationTagObjectIdentifier } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPriorityValueObjectidentifier struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPriorityValueObjectidentifier) InitializeParent(parent BACnetPriorityValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPriorityValueObjectidentifier) InitializeParent(parent BACnetPriorityValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPriorityValueObjectidentifier) GetParent() BACnetPriorityValue { +func (m *_BACnetPriorityValueObjectidentifier) GetParent() BACnetPriorityValue { return m._BACnetPriorityValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPriorityValueObjectidentifier) GetObjectidentifierValue() BACnet /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPriorityValueObjectidentifier factory function for _BACnetPriorityValueObjectidentifier -func NewBACnetPriorityValueObjectidentifier(objectidentifierValue BACnetApplicationTagObjectIdentifier, peekedTagHeader BACnetTagHeader, objectTypeArgument BACnetObjectType) *_BACnetPriorityValueObjectidentifier { +func NewBACnetPriorityValueObjectidentifier( objectidentifierValue BACnetApplicationTagObjectIdentifier , peekedTagHeader BACnetTagHeader , objectTypeArgument BACnetObjectType ) *_BACnetPriorityValueObjectidentifier { _result := &_BACnetPriorityValueObjectidentifier{ ObjectidentifierValue: objectidentifierValue, - _BACnetPriorityValue: NewBACnetPriorityValue(peekedTagHeader, objectTypeArgument), + _BACnetPriorityValue: NewBACnetPriorityValue(peekedTagHeader, objectTypeArgument), } _result._BACnetPriorityValue._BACnetPriorityValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPriorityValueObjectidentifier(objectidentifierValue BACnetApplicat // Deprecated: use the interface for direct cast func CastBACnetPriorityValueObjectidentifier(structType interface{}) BACnetPriorityValueObjectidentifier { - if casted, ok := structType.(BACnetPriorityValueObjectidentifier); ok { + if casted, ok := structType.(BACnetPriorityValueObjectidentifier); ok { return casted } if casted, ok := structType.(*BACnetPriorityValueObjectidentifier); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPriorityValueObjectidentifier) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetPriorityValueObjectidentifier) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPriorityValueObjectidentifierParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("objectidentifierValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for objectidentifierValue") } - _objectidentifierValue, _objectidentifierValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_objectidentifierValue, _objectidentifierValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _objectidentifierValueErr != nil { return nil, errors.Wrap(_objectidentifierValueErr, "Error parsing 'objectidentifierValue' field of BACnetPriorityValueObjectidentifier") } @@ -176,17 +180,17 @@ func (m *_BACnetPriorityValueObjectidentifier) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetPriorityValueObjectidentifier") } - // Simple Field (objectidentifierValue) - if pushErr := writeBuffer.PushContext("objectidentifierValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for objectidentifierValue") - } - _objectidentifierValueErr := writeBuffer.WriteSerializable(ctx, m.GetObjectidentifierValue()) - if popErr := writeBuffer.PopContext("objectidentifierValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for objectidentifierValue") - } - if _objectidentifierValueErr != nil { - return errors.Wrap(_objectidentifierValueErr, "Error serializing 'objectidentifierValue' field") - } + // Simple Field (objectidentifierValue) + if pushErr := writeBuffer.PushContext("objectidentifierValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for objectidentifierValue") + } + _objectidentifierValueErr := writeBuffer.WriteSerializable(ctx, m.GetObjectidentifierValue()) + if popErr := writeBuffer.PopContext("objectidentifierValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for objectidentifierValue") + } + if _objectidentifierValueErr != nil { + return errors.Wrap(_objectidentifierValueErr, "Error serializing 'objectidentifierValue' field") + } if popErr := writeBuffer.PopContext("BACnetPriorityValueObjectidentifier"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPriorityValueObjectidentifier") @@ -196,6 +200,7 @@ func (m *_BACnetPriorityValueObjectidentifier) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPriorityValueObjectidentifier) isBACnetPriorityValueObjectidentifier() bool { return true } @@ -210,3 +215,6 @@ func (m *_BACnetPriorityValueObjectidentifier) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueOctetString.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueOctetString.go index f5f74603146..1169e2e1929 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueOctetString.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueOctetString.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPriorityValueOctetString is the corresponding interface of BACnetPriorityValueOctetString type BACnetPriorityValueOctetString interface { @@ -46,9 +48,11 @@ type BACnetPriorityValueOctetStringExactly interface { // _BACnetPriorityValueOctetString is the data-structure of this message type _BACnetPriorityValueOctetString struct { *_BACnetPriorityValue - OctetStringValue BACnetApplicationTagOctetString + OctetStringValue BACnetApplicationTagOctetString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPriorityValueOctetString struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPriorityValueOctetString) InitializeParent(parent BACnetPriorityValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPriorityValueOctetString) InitializeParent(parent BACnetPriorityValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPriorityValueOctetString) GetParent() BACnetPriorityValue { +func (m *_BACnetPriorityValueOctetString) GetParent() BACnetPriorityValue { return m._BACnetPriorityValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPriorityValueOctetString) GetOctetStringValue() BACnetApplicatio /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPriorityValueOctetString factory function for _BACnetPriorityValueOctetString -func NewBACnetPriorityValueOctetString(octetStringValue BACnetApplicationTagOctetString, peekedTagHeader BACnetTagHeader, objectTypeArgument BACnetObjectType) *_BACnetPriorityValueOctetString { +func NewBACnetPriorityValueOctetString( octetStringValue BACnetApplicationTagOctetString , peekedTagHeader BACnetTagHeader , objectTypeArgument BACnetObjectType ) *_BACnetPriorityValueOctetString { _result := &_BACnetPriorityValueOctetString{ - OctetStringValue: octetStringValue, - _BACnetPriorityValue: NewBACnetPriorityValue(peekedTagHeader, objectTypeArgument), + OctetStringValue: octetStringValue, + _BACnetPriorityValue: NewBACnetPriorityValue(peekedTagHeader, objectTypeArgument), } _result._BACnetPriorityValue._BACnetPriorityValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPriorityValueOctetString(octetStringValue BACnetApplicationTagOcte // Deprecated: use the interface for direct cast func CastBACnetPriorityValueOctetString(structType interface{}) BACnetPriorityValueOctetString { - if casted, ok := structType.(BACnetPriorityValueOctetString); ok { + if casted, ok := structType.(BACnetPriorityValueOctetString); ok { return casted } if casted, ok := structType.(*BACnetPriorityValueOctetString); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPriorityValueOctetString) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetPriorityValueOctetString) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPriorityValueOctetStringParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("octetStringValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for octetStringValue") } - _octetStringValue, _octetStringValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_octetStringValue, _octetStringValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _octetStringValueErr != nil { return nil, errors.Wrap(_octetStringValueErr, "Error parsing 'octetStringValue' field of BACnetPriorityValueOctetString") } @@ -176,17 +180,17 @@ func (m *_BACnetPriorityValueOctetString) SerializeWithWriteBuffer(ctx context.C return errors.Wrap(pushErr, "Error pushing for BACnetPriorityValueOctetString") } - // Simple Field (octetStringValue) - if pushErr := writeBuffer.PushContext("octetStringValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for octetStringValue") - } - _octetStringValueErr := writeBuffer.WriteSerializable(ctx, m.GetOctetStringValue()) - if popErr := writeBuffer.PopContext("octetStringValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for octetStringValue") - } - if _octetStringValueErr != nil { - return errors.Wrap(_octetStringValueErr, "Error serializing 'octetStringValue' field") - } + // Simple Field (octetStringValue) + if pushErr := writeBuffer.PushContext("octetStringValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for octetStringValue") + } + _octetStringValueErr := writeBuffer.WriteSerializable(ctx, m.GetOctetStringValue()) + if popErr := writeBuffer.PopContext("octetStringValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for octetStringValue") + } + if _octetStringValueErr != nil { + return errors.Wrap(_octetStringValueErr, "Error serializing 'octetStringValue' field") + } if popErr := writeBuffer.PopContext("BACnetPriorityValueOctetString"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPriorityValueOctetString") @@ -196,6 +200,7 @@ func (m *_BACnetPriorityValueOctetString) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPriorityValueOctetString) isBACnetPriorityValueOctetString() bool { return true } @@ -210,3 +215,6 @@ func (m *_BACnetPriorityValueOctetString) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueReal.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueReal.go index 4c038ed32e7..4a2edd9ad16 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueReal.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueReal.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPriorityValueReal is the corresponding interface of BACnetPriorityValueReal type BACnetPriorityValueReal interface { @@ -46,9 +48,11 @@ type BACnetPriorityValueRealExactly interface { // _BACnetPriorityValueReal is the data-structure of this message type _BACnetPriorityValueReal struct { *_BACnetPriorityValue - RealValue BACnetApplicationTagReal + RealValue BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPriorityValueReal struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPriorityValueReal) InitializeParent(parent BACnetPriorityValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPriorityValueReal) InitializeParent(parent BACnetPriorityValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPriorityValueReal) GetParent() BACnetPriorityValue { +func (m *_BACnetPriorityValueReal) GetParent() BACnetPriorityValue { return m._BACnetPriorityValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPriorityValueReal) GetRealValue() BACnetApplicationTagReal { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPriorityValueReal factory function for _BACnetPriorityValueReal -func NewBACnetPriorityValueReal(realValue BACnetApplicationTagReal, peekedTagHeader BACnetTagHeader, objectTypeArgument BACnetObjectType) *_BACnetPriorityValueReal { +func NewBACnetPriorityValueReal( realValue BACnetApplicationTagReal , peekedTagHeader BACnetTagHeader , objectTypeArgument BACnetObjectType ) *_BACnetPriorityValueReal { _result := &_BACnetPriorityValueReal{ - RealValue: realValue, - _BACnetPriorityValue: NewBACnetPriorityValue(peekedTagHeader, objectTypeArgument), + RealValue: realValue, + _BACnetPriorityValue: NewBACnetPriorityValue(peekedTagHeader, objectTypeArgument), } _result._BACnetPriorityValue._BACnetPriorityValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPriorityValueReal(realValue BACnetApplicationTagReal, peekedTagHea // Deprecated: use the interface for direct cast func CastBACnetPriorityValueReal(structType interface{}) BACnetPriorityValueReal { - if casted, ok := structType.(BACnetPriorityValueReal); ok { + if casted, ok := structType.(BACnetPriorityValueReal); ok { return casted } if casted, ok := structType.(*BACnetPriorityValueReal); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPriorityValueReal) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetPriorityValueReal) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPriorityValueRealParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("realValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for realValue") } - _realValue, _realValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_realValue, _realValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _realValueErr != nil { return nil, errors.Wrap(_realValueErr, "Error parsing 'realValue' field of BACnetPriorityValueReal") } @@ -176,17 +180,17 @@ func (m *_BACnetPriorityValueReal) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for BACnetPriorityValueReal") } - // Simple Field (realValue) - if pushErr := writeBuffer.PushContext("realValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for realValue") - } - _realValueErr := writeBuffer.WriteSerializable(ctx, m.GetRealValue()) - if popErr := writeBuffer.PopContext("realValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for realValue") - } - if _realValueErr != nil { - return errors.Wrap(_realValueErr, "Error serializing 'realValue' field") - } + // Simple Field (realValue) + if pushErr := writeBuffer.PushContext("realValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for realValue") + } + _realValueErr := writeBuffer.WriteSerializable(ctx, m.GetRealValue()) + if popErr := writeBuffer.PopContext("realValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for realValue") + } + if _realValueErr != nil { + return errors.Wrap(_realValueErr, "Error serializing 'realValue' field") + } if popErr := writeBuffer.PopContext("BACnetPriorityValueReal"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPriorityValueReal") @@ -196,6 +200,7 @@ func (m *_BACnetPriorityValueReal) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPriorityValueReal) isBACnetPriorityValueReal() bool { return true } @@ -210,3 +215,6 @@ func (m *_BACnetPriorityValueReal) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueTime.go index f1b33cc3df7..252129069e3 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPriorityValueTime is the corresponding interface of BACnetPriorityValueTime type BACnetPriorityValueTime interface { @@ -46,9 +48,11 @@ type BACnetPriorityValueTimeExactly interface { // _BACnetPriorityValueTime is the data-structure of this message type _BACnetPriorityValueTime struct { *_BACnetPriorityValue - TimeValue BACnetApplicationTagTime + TimeValue BACnetApplicationTagTime } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPriorityValueTime struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPriorityValueTime) InitializeParent(parent BACnetPriorityValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPriorityValueTime) InitializeParent(parent BACnetPriorityValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPriorityValueTime) GetParent() BACnetPriorityValue { +func (m *_BACnetPriorityValueTime) GetParent() BACnetPriorityValue { return m._BACnetPriorityValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPriorityValueTime) GetTimeValue() BACnetApplicationTagTime { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPriorityValueTime factory function for _BACnetPriorityValueTime -func NewBACnetPriorityValueTime(timeValue BACnetApplicationTagTime, peekedTagHeader BACnetTagHeader, objectTypeArgument BACnetObjectType) *_BACnetPriorityValueTime { +func NewBACnetPriorityValueTime( timeValue BACnetApplicationTagTime , peekedTagHeader BACnetTagHeader , objectTypeArgument BACnetObjectType ) *_BACnetPriorityValueTime { _result := &_BACnetPriorityValueTime{ - TimeValue: timeValue, - _BACnetPriorityValue: NewBACnetPriorityValue(peekedTagHeader, objectTypeArgument), + TimeValue: timeValue, + _BACnetPriorityValue: NewBACnetPriorityValue(peekedTagHeader, objectTypeArgument), } _result._BACnetPriorityValue._BACnetPriorityValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPriorityValueTime(timeValue BACnetApplicationTagTime, peekedTagHea // Deprecated: use the interface for direct cast func CastBACnetPriorityValueTime(structType interface{}) BACnetPriorityValueTime { - if casted, ok := structType.(BACnetPriorityValueTime); ok { + if casted, ok := structType.(BACnetPriorityValueTime); ok { return casted } if casted, ok := structType.(*BACnetPriorityValueTime); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPriorityValueTime) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetPriorityValueTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPriorityValueTimeParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("timeValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeValue") } - _timeValue, _timeValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_timeValue, _timeValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _timeValueErr != nil { return nil, errors.Wrap(_timeValueErr, "Error parsing 'timeValue' field of BACnetPriorityValueTime") } @@ -176,17 +180,17 @@ func (m *_BACnetPriorityValueTime) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for BACnetPriorityValueTime") } - // Simple Field (timeValue) - if pushErr := writeBuffer.PushContext("timeValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timeValue") - } - _timeValueErr := writeBuffer.WriteSerializable(ctx, m.GetTimeValue()) - if popErr := writeBuffer.PopContext("timeValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timeValue") - } - if _timeValueErr != nil { - return errors.Wrap(_timeValueErr, "Error serializing 'timeValue' field") - } + // Simple Field (timeValue) + if pushErr := writeBuffer.PushContext("timeValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timeValue") + } + _timeValueErr := writeBuffer.WriteSerializable(ctx, m.GetTimeValue()) + if popErr := writeBuffer.PopContext("timeValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timeValue") + } + if _timeValueErr != nil { + return errors.Wrap(_timeValueErr, "Error serializing 'timeValue' field") + } if popErr := writeBuffer.PopContext("BACnetPriorityValueTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPriorityValueTime") @@ -196,6 +200,7 @@ func (m *_BACnetPriorityValueTime) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPriorityValueTime) isBACnetPriorityValueTime() bool { return true } @@ -210,3 +215,6 @@ func (m *_BACnetPriorityValueTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueUnsigned.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueUnsigned.go index 47f64fd3203..905f4631280 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueUnsigned.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityValueUnsigned.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPriorityValueUnsigned is the corresponding interface of BACnetPriorityValueUnsigned type BACnetPriorityValueUnsigned interface { @@ -46,9 +48,11 @@ type BACnetPriorityValueUnsignedExactly interface { // _BACnetPriorityValueUnsigned is the data-structure of this message type _BACnetPriorityValueUnsigned struct { *_BACnetPriorityValue - UnsignedValue BACnetApplicationTagUnsignedInteger + UnsignedValue BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPriorityValueUnsigned struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPriorityValueUnsigned) InitializeParent(parent BACnetPriorityValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPriorityValueUnsigned) InitializeParent(parent BACnetPriorityValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPriorityValueUnsigned) GetParent() BACnetPriorityValue { +func (m *_BACnetPriorityValueUnsigned) GetParent() BACnetPriorityValue { return m._BACnetPriorityValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPriorityValueUnsigned) GetUnsignedValue() BACnetApplicationTagUn /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPriorityValueUnsigned factory function for _BACnetPriorityValueUnsigned -func NewBACnetPriorityValueUnsigned(unsignedValue BACnetApplicationTagUnsignedInteger, peekedTagHeader BACnetTagHeader, objectTypeArgument BACnetObjectType) *_BACnetPriorityValueUnsigned { +func NewBACnetPriorityValueUnsigned( unsignedValue BACnetApplicationTagUnsignedInteger , peekedTagHeader BACnetTagHeader , objectTypeArgument BACnetObjectType ) *_BACnetPriorityValueUnsigned { _result := &_BACnetPriorityValueUnsigned{ - UnsignedValue: unsignedValue, - _BACnetPriorityValue: NewBACnetPriorityValue(peekedTagHeader, objectTypeArgument), + UnsignedValue: unsignedValue, + _BACnetPriorityValue: NewBACnetPriorityValue(peekedTagHeader, objectTypeArgument), } _result._BACnetPriorityValue._BACnetPriorityValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPriorityValueUnsigned(unsignedValue BACnetApplicationTagUnsignedIn // Deprecated: use the interface for direct cast func CastBACnetPriorityValueUnsigned(structType interface{}) BACnetPriorityValueUnsigned { - if casted, ok := structType.(BACnetPriorityValueUnsigned); ok { + if casted, ok := structType.(BACnetPriorityValueUnsigned); ok { return casted } if casted, ok := structType.(*BACnetPriorityValueUnsigned); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPriorityValueUnsigned) GetLengthInBits(ctx context.Context) uint return lengthInBits } + func (m *_BACnetPriorityValueUnsigned) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPriorityValueUnsignedParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("unsignedValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for unsignedValue") } - _unsignedValue, _unsignedValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_unsignedValue, _unsignedValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _unsignedValueErr != nil { return nil, errors.Wrap(_unsignedValueErr, "Error parsing 'unsignedValue' field of BACnetPriorityValueUnsigned") } @@ -176,17 +180,17 @@ func (m *_BACnetPriorityValueUnsigned) SerializeWithWriteBuffer(ctx context.Cont return errors.Wrap(pushErr, "Error pushing for BACnetPriorityValueUnsigned") } - // Simple Field (unsignedValue) - if pushErr := writeBuffer.PushContext("unsignedValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for unsignedValue") - } - _unsignedValueErr := writeBuffer.WriteSerializable(ctx, m.GetUnsignedValue()) - if popErr := writeBuffer.PopContext("unsignedValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for unsignedValue") - } - if _unsignedValueErr != nil { - return errors.Wrap(_unsignedValueErr, "Error serializing 'unsignedValue' field") - } + // Simple Field (unsignedValue) + if pushErr := writeBuffer.PushContext("unsignedValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for unsignedValue") + } + _unsignedValueErr := writeBuffer.WriteSerializable(ctx, m.GetUnsignedValue()) + if popErr := writeBuffer.PopContext("unsignedValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for unsignedValue") + } + if _unsignedValueErr != nil { + return errors.Wrap(_unsignedValueErr, "Error serializing 'unsignedValue' field") + } if popErr := writeBuffer.PopContext("BACnetPriorityValueUnsigned"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPriorityValueUnsigned") @@ -196,6 +200,7 @@ func (m *_BACnetPriorityValueUnsigned) SerializeWithWriteBuffer(ctx context.Cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPriorityValueUnsigned) isBACnetPriorityValueUnsigned() bool { return true } @@ -210,3 +215,6 @@ func (m *_BACnetPriorityValueUnsigned) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetProcessIdSelection.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetProcessIdSelection.go index dc979bb84f9..a81ad808514 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetProcessIdSelection.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetProcessIdSelection.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetProcessIdSelection is the corresponding interface of BACnetProcessIdSelection type BACnetProcessIdSelection interface { @@ -47,7 +49,7 @@ type BACnetProcessIdSelectionExactly interface { // _BACnetProcessIdSelection is the data-structure of this message type _BACnetProcessIdSelection struct { _BACnetProcessIdSelectionChildRequirements - PeekedTagHeader BACnetTagHeader + PeekedTagHeader BACnetTagHeader } type _BACnetProcessIdSelectionChildRequirements interface { @@ -55,6 +57,7 @@ type _BACnetProcessIdSelectionChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type BACnetProcessIdSelectionParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetProcessIdSelection, serializeChildFunction func() error) error GetTypeName() string @@ -62,13 +65,12 @@ type BACnetProcessIdSelectionParent interface { type BACnetProcessIdSelectionChild interface { utils.Serializable - InitializeParent(parent BACnetProcessIdSelection, peekedTagHeader BACnetTagHeader) +InitializeParent(parent BACnetProcessIdSelection , peekedTagHeader BACnetTagHeader ) GetParent() *BACnetProcessIdSelection GetTypeName() string BACnetProcessIdSelection } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,14 +100,15 @@ func (m *_BACnetProcessIdSelection) GetPeekedTagNumber() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetProcessIdSelection factory function for _BACnetProcessIdSelection -func NewBACnetProcessIdSelection(peekedTagHeader BACnetTagHeader) *_BACnetProcessIdSelection { - return &_BACnetProcessIdSelection{PeekedTagHeader: peekedTagHeader} +func NewBACnetProcessIdSelection( peekedTagHeader BACnetTagHeader ) *_BACnetProcessIdSelection { +return &_BACnetProcessIdSelection{ PeekedTagHeader: peekedTagHeader } } // Deprecated: use the interface for direct cast func CastBACnetProcessIdSelection(structType interface{}) BACnetProcessIdSelection { - if casted, ok := structType.(BACnetProcessIdSelection); ok { + if casted, ok := structType.(BACnetProcessIdSelection); ok { return casted } if casted, ok := structType.(*BACnetProcessIdSelection); ok { @@ -118,6 +121,7 @@ func (m *_BACnetProcessIdSelection) GetTypeName() string { return "BACnetProcessIdSelection" } + func (m *_BACnetProcessIdSelection) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -143,13 +147,13 @@ func BACnetProcessIdSelectionParseWithBuffer(ctx context.Context, readBuffer uti currentPos := positionAware.GetPos() _ = currentPos - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Virtual field _peekedTagNumber := peekedTagHeader.GetActualTagNumber() @@ -159,17 +163,17 @@ func BACnetProcessIdSelectionParseWithBuffer(ctx context.Context, readBuffer uti // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetProcessIdSelectionChildSerializeRequirement interface { BACnetProcessIdSelection - InitializeParent(BACnetProcessIdSelection, BACnetTagHeader) + InitializeParent(BACnetProcessIdSelection, BACnetTagHeader) GetParent() BACnetProcessIdSelection } var _childTemp interface{} var _child BACnetProcessIdSelectionChildSerializeRequirement var typeSwitchError error switch { - case peekedTagNumber == uint8(0): // BACnetProcessIdSelectionNull - _childTemp, typeSwitchError = BACnetProcessIdSelectionNullParseWithBuffer(ctx, readBuffer) - case 0 == 0: // BACnetProcessIdSelectionValue - _childTemp, typeSwitchError = BACnetProcessIdSelectionValueParseWithBuffer(ctx, readBuffer) +case peekedTagNumber == uint8(0) : // BACnetProcessIdSelectionNull + _childTemp, typeSwitchError = BACnetProcessIdSelectionNullParseWithBuffer(ctx, readBuffer, ) +case 0==0 : // BACnetProcessIdSelectionValue + _childTemp, typeSwitchError = BACnetProcessIdSelectionValueParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedTagNumber=%v]", peekedTagNumber) } @@ -183,7 +187,7 @@ func BACnetProcessIdSelectionParseWithBuffer(ctx context.Context, readBuffer uti } // Finish initializing - _child.InitializeParent(_child, peekedTagHeader) +_child.InitializeParent(_child , peekedTagHeader ) return _child, nil } @@ -193,7 +197,7 @@ func (pm *_BACnetProcessIdSelection) SerializeParent(ctx context.Context, writeB _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetProcessIdSelection"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetProcessIdSelection"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetProcessIdSelection") } // Virtual field @@ -212,6 +216,7 @@ func (pm *_BACnetProcessIdSelection) SerializeParent(ctx context.Context, writeB return nil } + func (m *_BACnetProcessIdSelection) isBACnetProcessIdSelection() bool { return true } @@ -226,3 +231,6 @@ func (m *_BACnetProcessIdSelection) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetProcessIdSelectionNull.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetProcessIdSelectionNull.go index 195e6a04bad..0177da9ebef 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetProcessIdSelectionNull.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetProcessIdSelectionNull.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetProcessIdSelectionNull is the corresponding interface of BACnetProcessIdSelectionNull type BACnetProcessIdSelectionNull interface { @@ -46,9 +48,11 @@ type BACnetProcessIdSelectionNullExactly interface { // _BACnetProcessIdSelectionNull is the data-structure of this message type _BACnetProcessIdSelectionNull struct { *_BACnetProcessIdSelection - NullValue BACnetApplicationTagNull + NullValue BACnetApplicationTagNull } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetProcessIdSelectionNull struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetProcessIdSelectionNull) InitializeParent(parent BACnetProcessIdSelection, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetProcessIdSelectionNull) InitializeParent(parent BACnetProcessIdSelection , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetProcessIdSelectionNull) GetParent() BACnetProcessIdSelection { +func (m *_BACnetProcessIdSelectionNull) GetParent() BACnetProcessIdSelection { return m._BACnetProcessIdSelection } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetProcessIdSelectionNull) GetNullValue() BACnetApplicationTagNull /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetProcessIdSelectionNull factory function for _BACnetProcessIdSelectionNull -func NewBACnetProcessIdSelectionNull(nullValue BACnetApplicationTagNull, peekedTagHeader BACnetTagHeader) *_BACnetProcessIdSelectionNull { +func NewBACnetProcessIdSelectionNull( nullValue BACnetApplicationTagNull , peekedTagHeader BACnetTagHeader ) *_BACnetProcessIdSelectionNull { _result := &_BACnetProcessIdSelectionNull{ - NullValue: nullValue, - _BACnetProcessIdSelection: NewBACnetProcessIdSelection(peekedTagHeader), + NullValue: nullValue, + _BACnetProcessIdSelection: NewBACnetProcessIdSelection(peekedTagHeader), } _result._BACnetProcessIdSelection._BACnetProcessIdSelectionChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetProcessIdSelectionNull(nullValue BACnetApplicationTagNull, peekedT // Deprecated: use the interface for direct cast func CastBACnetProcessIdSelectionNull(structType interface{}) BACnetProcessIdSelectionNull { - if casted, ok := structType.(BACnetProcessIdSelectionNull); ok { + if casted, ok := structType.(BACnetProcessIdSelectionNull); ok { return casted } if casted, ok := structType.(*BACnetProcessIdSelectionNull); ok { @@ -115,6 +118,7 @@ func (m *_BACnetProcessIdSelectionNull) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_BACnetProcessIdSelectionNull) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetProcessIdSelectionNullParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("nullValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for nullValue") } - _nullValue, _nullValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_nullValue, _nullValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _nullValueErr != nil { return nil, errors.Wrap(_nullValueErr, "Error parsing 'nullValue' field of BACnetProcessIdSelectionNull") } @@ -151,8 +155,9 @@ func BACnetProcessIdSelectionNullParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_BACnetProcessIdSelectionNull{ - _BACnetProcessIdSelection: &_BACnetProcessIdSelection{}, - NullValue: nullValue, + _BACnetProcessIdSelection: &_BACnetProcessIdSelection{ + }, + NullValue: nullValue, } _child._BACnetProcessIdSelection._BACnetProcessIdSelectionChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetProcessIdSelectionNull) SerializeWithWriteBuffer(ctx context.Con return errors.Wrap(pushErr, "Error pushing for BACnetProcessIdSelectionNull") } - // Simple Field (nullValue) - if pushErr := writeBuffer.PushContext("nullValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for nullValue") - } - _nullValueErr := writeBuffer.WriteSerializable(ctx, m.GetNullValue()) - if popErr := writeBuffer.PopContext("nullValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for nullValue") - } - if _nullValueErr != nil { - return errors.Wrap(_nullValueErr, "Error serializing 'nullValue' field") - } + // Simple Field (nullValue) + if pushErr := writeBuffer.PushContext("nullValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for nullValue") + } + _nullValueErr := writeBuffer.WriteSerializable(ctx, m.GetNullValue()) + if popErr := writeBuffer.PopContext("nullValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for nullValue") + } + if _nullValueErr != nil { + return errors.Wrap(_nullValueErr, "Error serializing 'nullValue' field") + } if popErr := writeBuffer.PopContext("BACnetProcessIdSelectionNull"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetProcessIdSelectionNull") @@ -194,6 +199,7 @@ func (m *_BACnetProcessIdSelectionNull) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetProcessIdSelectionNull) isBACnetProcessIdSelectionNull() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetProcessIdSelectionNull) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetProcessIdSelectionValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetProcessIdSelectionValue.go index 6dc9f9b2119..868e9419a34 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetProcessIdSelectionValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetProcessIdSelectionValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetProcessIdSelectionValue is the corresponding interface of BACnetProcessIdSelectionValue type BACnetProcessIdSelectionValue interface { @@ -46,9 +48,11 @@ type BACnetProcessIdSelectionValueExactly interface { // _BACnetProcessIdSelectionValue is the data-structure of this message type _BACnetProcessIdSelectionValue struct { *_BACnetProcessIdSelection - ProcessIdentifier BACnetApplicationTagUnsignedInteger + ProcessIdentifier BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetProcessIdSelectionValue struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetProcessIdSelectionValue) InitializeParent(parent BACnetProcessIdSelection, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetProcessIdSelectionValue) InitializeParent(parent BACnetProcessIdSelection , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetProcessIdSelectionValue) GetParent() BACnetProcessIdSelection { +func (m *_BACnetProcessIdSelectionValue) GetParent() BACnetProcessIdSelection { return m._BACnetProcessIdSelection } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetProcessIdSelectionValue) GetProcessIdentifier() BACnetApplicatio /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetProcessIdSelectionValue factory function for _BACnetProcessIdSelectionValue -func NewBACnetProcessIdSelectionValue(processIdentifier BACnetApplicationTagUnsignedInteger, peekedTagHeader BACnetTagHeader) *_BACnetProcessIdSelectionValue { +func NewBACnetProcessIdSelectionValue( processIdentifier BACnetApplicationTagUnsignedInteger , peekedTagHeader BACnetTagHeader ) *_BACnetProcessIdSelectionValue { _result := &_BACnetProcessIdSelectionValue{ - ProcessIdentifier: processIdentifier, - _BACnetProcessIdSelection: NewBACnetProcessIdSelection(peekedTagHeader), + ProcessIdentifier: processIdentifier, + _BACnetProcessIdSelection: NewBACnetProcessIdSelection(peekedTagHeader), } _result._BACnetProcessIdSelection._BACnetProcessIdSelectionChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetProcessIdSelectionValue(processIdentifier BACnetApplicationTagUnsi // Deprecated: use the interface for direct cast func CastBACnetProcessIdSelectionValue(structType interface{}) BACnetProcessIdSelectionValue { - if casted, ok := structType.(BACnetProcessIdSelectionValue); ok { + if casted, ok := structType.(BACnetProcessIdSelectionValue); ok { return casted } if casted, ok := structType.(*BACnetProcessIdSelectionValue); ok { @@ -115,6 +118,7 @@ func (m *_BACnetProcessIdSelectionValue) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetProcessIdSelectionValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetProcessIdSelectionValueParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("processIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for processIdentifier") } - _processIdentifier, _processIdentifierErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_processIdentifier, _processIdentifierErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _processIdentifierErr != nil { return nil, errors.Wrap(_processIdentifierErr, "Error parsing 'processIdentifier' field of BACnetProcessIdSelectionValue") } @@ -151,8 +155,9 @@ func BACnetProcessIdSelectionValueParseWithBuffer(ctx context.Context, readBuffe // Create a partially initialized instance _child := &_BACnetProcessIdSelectionValue{ - _BACnetProcessIdSelection: &_BACnetProcessIdSelection{}, - ProcessIdentifier: processIdentifier, + _BACnetProcessIdSelection: &_BACnetProcessIdSelection{ + }, + ProcessIdentifier: processIdentifier, } _child._BACnetProcessIdSelection._BACnetProcessIdSelectionChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetProcessIdSelectionValue) SerializeWithWriteBuffer(ctx context.Co return errors.Wrap(pushErr, "Error pushing for BACnetProcessIdSelectionValue") } - // Simple Field (processIdentifier) - if pushErr := writeBuffer.PushContext("processIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for processIdentifier") - } - _processIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetProcessIdentifier()) - if popErr := writeBuffer.PopContext("processIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for processIdentifier") - } - if _processIdentifierErr != nil { - return errors.Wrap(_processIdentifierErr, "Error serializing 'processIdentifier' field") - } + // Simple Field (processIdentifier) + if pushErr := writeBuffer.PushContext("processIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for processIdentifier") + } + _processIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetProcessIdentifier()) + if popErr := writeBuffer.PopContext("processIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for processIdentifier") + } + if _processIdentifierErr != nil { + return errors.Wrap(_processIdentifierErr, "Error serializing 'processIdentifier' field") + } if popErr := writeBuffer.PopContext("BACnetProcessIdSelectionValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetProcessIdSelectionValue") @@ -194,6 +199,7 @@ func (m *_BACnetProcessIdSelectionValue) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetProcessIdSelectionValue) isBACnetProcessIdSelectionValue() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetProcessIdSelectionValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetProgramError.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetProgramError.go index 8e92ae6689c..97e9b86dff0 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetProgramError.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetProgramError.go @@ -34,20 +34,20 @@ type IBACnetProgramError interface { utils.Serializable } -const ( - BACnetProgramError_NORMAL BACnetProgramError = 0 - BACnetProgramError_LOAD_FAILED BACnetProgramError = 1 - BACnetProgramError_INTERNAL BACnetProgramError = 2 - BACnetProgramError_PROGRAM BACnetProgramError = 3 - BACnetProgramError_OTHER BACnetProgramError = 4 - BACnetProgramError_VENDOR_PROPRIETARY_VALUE BACnetProgramError = 0xFFFF +const( + BACnetProgramError_NORMAL BACnetProgramError = 0 + BACnetProgramError_LOAD_FAILED BACnetProgramError = 1 + BACnetProgramError_INTERNAL BACnetProgramError = 2 + BACnetProgramError_PROGRAM BACnetProgramError = 3 + BACnetProgramError_OTHER BACnetProgramError = 4 + BACnetProgramError_VENDOR_PROPRIETARY_VALUE BACnetProgramError = 0XFFFF ) var BACnetProgramErrorValues []BACnetProgramError func init() { _ = errors.New - BACnetProgramErrorValues = []BACnetProgramError{ + BACnetProgramErrorValues = []BACnetProgramError { BACnetProgramError_NORMAL, BACnetProgramError_LOAD_FAILED, BACnetProgramError_INTERNAL, @@ -59,18 +59,18 @@ func init() { func BACnetProgramErrorByValue(value uint16) (enum BACnetProgramError, ok bool) { switch value { - case 0: - return BACnetProgramError_NORMAL, true - case 0xFFFF: - return BACnetProgramError_VENDOR_PROPRIETARY_VALUE, true - case 1: - return BACnetProgramError_LOAD_FAILED, true - case 2: - return BACnetProgramError_INTERNAL, true - case 3: - return BACnetProgramError_PROGRAM, true - case 4: - return BACnetProgramError_OTHER, true + case 0: + return BACnetProgramError_NORMAL, true + case 0XFFFF: + return BACnetProgramError_VENDOR_PROPRIETARY_VALUE, true + case 1: + return BACnetProgramError_LOAD_FAILED, true + case 2: + return BACnetProgramError_INTERNAL, true + case 3: + return BACnetProgramError_PROGRAM, true + case 4: + return BACnetProgramError_OTHER, true } return 0, false } @@ -93,13 +93,13 @@ func BACnetProgramErrorByName(value string) (enum BACnetProgramError, ok bool) { return 0, false } -func BACnetProgramErrorKnows(value uint16) bool { +func BACnetProgramErrorKnows(value uint16) bool { for _, typeValue := range BACnetProgramErrorValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastBACnetProgramError(structType interface{}) BACnetProgramError { @@ -171,3 +171,4 @@ func (e BACnetProgramError) PLC4XEnumName() string { func (e BACnetProgramError) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetProgramErrorTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetProgramErrorTagged.go index b785b55361e..93d41c10e9c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetProgramErrorTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetProgramErrorTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetProgramErrorTagged is the corresponding interface of BACnetProgramErrorTagged type BACnetProgramErrorTagged interface { @@ -50,15 +52,16 @@ type BACnetProgramErrorTaggedExactly interface { // _BACnetProgramErrorTagged is the data-structure of this message type _BACnetProgramErrorTagged struct { - Header BACnetTagHeader - Value BACnetProgramError - ProprietaryValue uint32 + Header BACnetTagHeader + Value BACnetProgramError + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_BACnetProgramErrorTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetProgramErrorTagged factory function for _BACnetProgramErrorTagged -func NewBACnetProgramErrorTagged(header BACnetTagHeader, value BACnetProgramError, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_BACnetProgramErrorTagged { - return &_BACnetProgramErrorTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetProgramErrorTagged( header BACnetTagHeader , value BACnetProgramError , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_BACnetProgramErrorTagged { +return &_BACnetProgramErrorTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetProgramErrorTagged(structType interface{}) BACnetProgramErrorTagged { - if casted, ok := structType.(BACnetProgramErrorTagged); ok { + if casted, ok := structType.(BACnetProgramErrorTagged); ok { return casted } if casted, ok := structType.(*BACnetProgramErrorTagged); ok { @@ -123,16 +127,17 @@ func (m *_BACnetProgramErrorTagged) GetLengthInBits(ctx context.Context) uint16 lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetProgramErrorTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetProgramErrorTaggedParseWithBuffer(ctx context.Context, readBuffer uti if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetProgramErrorTagged") } @@ -164,12 +169,12 @@ func BACnetProgramErrorTaggedParseWithBuffer(ctx context.Context, readBuffer uti } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func BACnetProgramErrorTaggedParseWithBuffer(ctx context.Context, readBuffer uti } var value BACnetProgramError if _value != nil { - value = _value.(BACnetProgramError) + value = _value.(BACnetProgramError) } // Virtual field @@ -195,7 +200,7 @@ func BACnetProgramErrorTaggedParseWithBuffer(ctx context.Context, readBuffer uti } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetProgramErrorTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func BACnetProgramErrorTaggedParseWithBuffer(ctx context.Context, readBuffer uti // Create the instance return &_BACnetProgramErrorTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetProgramErrorTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_BACnetProgramErrorTagged) Serialize() ([]byte, error) { func (m *_BACnetProgramErrorTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetProgramErrorTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetProgramErrorTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetProgramErrorTagged") } @@ -261,6 +266,7 @@ func (m *_BACnetProgramErrorTagged) SerializeWithWriteBuffer(ctx context.Context return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_BACnetProgramErrorTagged) GetTagNumber() uint8 { func (m *_BACnetProgramErrorTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_BACnetProgramErrorTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetProgramRequest.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetProgramRequest.go index e74391a9f58..b9bf0814b6d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetProgramRequest.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetProgramRequest.go @@ -34,20 +34,20 @@ type IBACnetProgramRequest interface { utils.Serializable } -const ( - BACnetProgramRequest_READY BACnetProgramRequest = 0 - BACnetProgramRequest_LOAD BACnetProgramRequest = 1 - BACnetProgramRequest_RUN BACnetProgramRequest = 2 - BACnetProgramRequest_HALT BACnetProgramRequest = 3 +const( + BACnetProgramRequest_READY BACnetProgramRequest = 0 + BACnetProgramRequest_LOAD BACnetProgramRequest = 1 + BACnetProgramRequest_RUN BACnetProgramRequest = 2 + BACnetProgramRequest_HALT BACnetProgramRequest = 3 BACnetProgramRequest_RESTART BACnetProgramRequest = 4 - BACnetProgramRequest_UNLOAD BACnetProgramRequest = 5 + BACnetProgramRequest_UNLOAD BACnetProgramRequest = 5 ) var BACnetProgramRequestValues []BACnetProgramRequest func init() { _ = errors.New - BACnetProgramRequestValues = []BACnetProgramRequest{ + BACnetProgramRequestValues = []BACnetProgramRequest { BACnetProgramRequest_READY, BACnetProgramRequest_LOAD, BACnetProgramRequest_RUN, @@ -59,18 +59,18 @@ func init() { func BACnetProgramRequestByValue(value uint8) (enum BACnetProgramRequest, ok bool) { switch value { - case 0: - return BACnetProgramRequest_READY, true - case 1: - return BACnetProgramRequest_LOAD, true - case 2: - return BACnetProgramRequest_RUN, true - case 3: - return BACnetProgramRequest_HALT, true - case 4: - return BACnetProgramRequest_RESTART, true - case 5: - return BACnetProgramRequest_UNLOAD, true + case 0: + return BACnetProgramRequest_READY, true + case 1: + return BACnetProgramRequest_LOAD, true + case 2: + return BACnetProgramRequest_RUN, true + case 3: + return BACnetProgramRequest_HALT, true + case 4: + return BACnetProgramRequest_RESTART, true + case 5: + return BACnetProgramRequest_UNLOAD, true } return 0, false } @@ -93,13 +93,13 @@ func BACnetProgramRequestByName(value string) (enum BACnetProgramRequest, ok boo return 0, false } -func BACnetProgramRequestKnows(value uint8) bool { +func BACnetProgramRequestKnows(value uint8) bool { for _, typeValue := range BACnetProgramRequestValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetProgramRequest(structType interface{}) BACnetProgramRequest { @@ -171,3 +171,4 @@ func (e BACnetProgramRequest) PLC4XEnumName() string { func (e BACnetProgramRequest) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetProgramRequestTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetProgramRequestTagged.go index 484393d500e..e87150bb481 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetProgramRequestTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetProgramRequestTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetProgramRequestTagged is the corresponding interface of BACnetProgramRequestTagged type BACnetProgramRequestTagged interface { @@ -46,14 +48,15 @@ type BACnetProgramRequestTaggedExactly interface { // _BACnetProgramRequestTagged is the data-structure of this message type _BACnetProgramRequestTagged struct { - Header BACnetTagHeader - Value BACnetProgramRequest + Header BACnetTagHeader + Value BACnetProgramRequest // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_BACnetProgramRequestTagged) GetValue() BACnetProgramRequest { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetProgramRequestTagged factory function for _BACnetProgramRequestTagged -func NewBACnetProgramRequestTagged(header BACnetTagHeader, value BACnetProgramRequest, tagNumber uint8, tagClass TagClass) *_BACnetProgramRequestTagged { - return &_BACnetProgramRequestTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetProgramRequestTagged( header BACnetTagHeader , value BACnetProgramRequest , tagNumber uint8 , tagClass TagClass ) *_BACnetProgramRequestTagged { +return &_BACnetProgramRequestTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetProgramRequestTagged(structType interface{}) BACnetProgramRequestTagged { - if casted, ok := structType.(BACnetProgramRequestTagged); ok { + if casted, ok := structType.(BACnetProgramRequestTagged); ok { return casted } if casted, ok := structType.(*BACnetProgramRequestTagged); ok { @@ -104,6 +108,7 @@ func (m *_BACnetProgramRequestTagged) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_BACnetProgramRequestTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func BACnetProgramRequestTaggedParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetProgramRequestTagged") } @@ -135,12 +140,12 @@ func BACnetProgramRequestTaggedParseWithBuffer(ctx context.Context, readBuffer u } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func BACnetProgramRequestTaggedParseWithBuffer(ctx context.Context, readBuffer u } var value BACnetProgramRequest if _value != nil { - value = _value.(BACnetProgramRequest) + value = _value.(BACnetProgramRequest) } if closeErr := readBuffer.CloseContext("BACnetProgramRequestTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func BACnetProgramRequestTaggedParseWithBuffer(ctx context.Context, readBuffer u // Create the instance return &_BACnetProgramRequestTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_BACnetProgramRequestTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_BACnetProgramRequestTagged) Serialize() ([]byte, error) { func (m *_BACnetProgramRequestTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetProgramRequestTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetProgramRequestTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetProgramRequestTagged") } @@ -206,6 +211,7 @@ func (m *_BACnetProgramRequestTagged) SerializeWithWriteBuffer(ctx context.Conte return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_BACnetProgramRequestTagged) GetTagNumber() uint8 { func (m *_BACnetProgramRequestTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_BACnetProgramRequestTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetProgramState.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetProgramState.go index 3828ce86e9a..2316db2378f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetProgramState.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetProgramState.go @@ -34,12 +34,12 @@ type IBACnetProgramState interface { utils.Serializable } -const ( - BACnetProgramState_IDLE BACnetProgramState = 0 - BACnetProgramState_LOADING BACnetProgramState = 1 - BACnetProgramState_RUNNING BACnetProgramState = 2 - BACnetProgramState_WAITING BACnetProgramState = 3 - BACnetProgramState_HALTED BACnetProgramState = 4 +const( + BACnetProgramState_IDLE BACnetProgramState = 0 + BACnetProgramState_LOADING BACnetProgramState = 1 + BACnetProgramState_RUNNING BACnetProgramState = 2 + BACnetProgramState_WAITING BACnetProgramState = 3 + BACnetProgramState_HALTED BACnetProgramState = 4 BACnetProgramState_UNLOADING BACnetProgramState = 5 ) @@ -47,7 +47,7 @@ var BACnetProgramStateValues []BACnetProgramState func init() { _ = errors.New - BACnetProgramStateValues = []BACnetProgramState{ + BACnetProgramStateValues = []BACnetProgramState { BACnetProgramState_IDLE, BACnetProgramState_LOADING, BACnetProgramState_RUNNING, @@ -59,18 +59,18 @@ func init() { func BACnetProgramStateByValue(value uint8) (enum BACnetProgramState, ok bool) { switch value { - case 0: - return BACnetProgramState_IDLE, true - case 1: - return BACnetProgramState_LOADING, true - case 2: - return BACnetProgramState_RUNNING, true - case 3: - return BACnetProgramState_WAITING, true - case 4: - return BACnetProgramState_HALTED, true - case 5: - return BACnetProgramState_UNLOADING, true + case 0: + return BACnetProgramState_IDLE, true + case 1: + return BACnetProgramState_LOADING, true + case 2: + return BACnetProgramState_RUNNING, true + case 3: + return BACnetProgramState_WAITING, true + case 4: + return BACnetProgramState_HALTED, true + case 5: + return BACnetProgramState_UNLOADING, true } return 0, false } @@ -93,13 +93,13 @@ func BACnetProgramStateByName(value string) (enum BACnetProgramState, ok bool) { return 0, false } -func BACnetProgramStateKnows(value uint8) bool { +func BACnetProgramStateKnows(value uint8) bool { for _, typeValue := range BACnetProgramStateValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetProgramState(structType interface{}) BACnetProgramState { @@ -171,3 +171,4 @@ func (e BACnetProgramState) PLC4XEnumName() string { func (e BACnetProgramState) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetProgramStateTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetProgramStateTagged.go index c2ac07ab453..355a8e28164 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetProgramStateTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetProgramStateTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetProgramStateTagged is the corresponding interface of BACnetProgramStateTagged type BACnetProgramStateTagged interface { @@ -46,14 +48,15 @@ type BACnetProgramStateTaggedExactly interface { // _BACnetProgramStateTagged is the data-structure of this message type _BACnetProgramStateTagged struct { - Header BACnetTagHeader - Value BACnetProgramState + Header BACnetTagHeader + Value BACnetProgramState // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_BACnetProgramStateTagged) GetValue() BACnetProgramState { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetProgramStateTagged factory function for _BACnetProgramStateTagged -func NewBACnetProgramStateTagged(header BACnetTagHeader, value BACnetProgramState, tagNumber uint8, tagClass TagClass) *_BACnetProgramStateTagged { - return &_BACnetProgramStateTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetProgramStateTagged( header BACnetTagHeader , value BACnetProgramState , tagNumber uint8 , tagClass TagClass ) *_BACnetProgramStateTagged { +return &_BACnetProgramStateTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetProgramStateTagged(structType interface{}) BACnetProgramStateTagged { - if casted, ok := structType.(BACnetProgramStateTagged); ok { + if casted, ok := structType.(BACnetProgramStateTagged); ok { return casted } if casted, ok := structType.(*BACnetProgramStateTagged); ok { @@ -104,6 +108,7 @@ func (m *_BACnetProgramStateTagged) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_BACnetProgramStateTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func BACnetProgramStateTaggedParseWithBuffer(ctx context.Context, readBuffer uti if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetProgramStateTagged") } @@ -135,12 +140,12 @@ func BACnetProgramStateTaggedParseWithBuffer(ctx context.Context, readBuffer uti } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func BACnetProgramStateTaggedParseWithBuffer(ctx context.Context, readBuffer uti } var value BACnetProgramState if _value != nil { - value = _value.(BACnetProgramState) + value = _value.(BACnetProgramState) } if closeErr := readBuffer.CloseContext("BACnetProgramStateTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func BACnetProgramStateTaggedParseWithBuffer(ctx context.Context, readBuffer uti // Create the instance return &_BACnetProgramStateTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_BACnetProgramStateTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_BACnetProgramStateTagged) Serialize() ([]byte, error) { func (m *_BACnetProgramStateTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetProgramStateTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetProgramStateTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetProgramStateTagged") } @@ -206,6 +211,7 @@ func (m *_BACnetProgramStateTagged) SerializeWithWriteBuffer(ctx context.Context return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_BACnetProgramStateTagged) GetTagNumber() uint8 { func (m *_BACnetProgramStateTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_BACnetProgramStateTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyAccessResult.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyAccessResult.go index aa710779ff3..efcaebc03f2 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyAccessResult.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyAccessResult.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyAccessResult is the corresponding interface of BACnetPropertyAccessResult type BACnetPropertyAccessResult interface { @@ -53,13 +55,14 @@ type BACnetPropertyAccessResultExactly interface { // _BACnetPropertyAccessResult is the data-structure of this message type _BACnetPropertyAccessResult struct { - ObjectIdentifier BACnetContextTagObjectIdentifier - PropertyIdentifier BACnetPropertyIdentifierTagged - PropertyArrayIndex BACnetContextTagUnsignedInteger - DeviceIdentifier BACnetContextTagObjectIdentifier - AccessResult BACnetPropertyAccessResultAccessResult + ObjectIdentifier BACnetContextTagObjectIdentifier + PropertyIdentifier BACnetPropertyIdentifierTagged + PropertyArrayIndex BACnetContextTagUnsignedInteger + DeviceIdentifier BACnetContextTagObjectIdentifier + AccessResult BACnetPropertyAccessResultAccessResult } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,14 +93,15 @@ func (m *_BACnetPropertyAccessResult) GetAccessResult() BACnetPropertyAccessResu /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyAccessResult factory function for _BACnetPropertyAccessResult -func NewBACnetPropertyAccessResult(objectIdentifier BACnetContextTagObjectIdentifier, propertyIdentifier BACnetPropertyIdentifierTagged, propertyArrayIndex BACnetContextTagUnsignedInteger, deviceIdentifier BACnetContextTagObjectIdentifier, accessResult BACnetPropertyAccessResultAccessResult) *_BACnetPropertyAccessResult { - return &_BACnetPropertyAccessResult{ObjectIdentifier: objectIdentifier, PropertyIdentifier: propertyIdentifier, PropertyArrayIndex: propertyArrayIndex, DeviceIdentifier: deviceIdentifier, AccessResult: accessResult} +func NewBACnetPropertyAccessResult( objectIdentifier BACnetContextTagObjectIdentifier , propertyIdentifier BACnetPropertyIdentifierTagged , propertyArrayIndex BACnetContextTagUnsignedInteger , deviceIdentifier BACnetContextTagObjectIdentifier , accessResult BACnetPropertyAccessResultAccessResult ) *_BACnetPropertyAccessResult { +return &_BACnetPropertyAccessResult{ ObjectIdentifier: objectIdentifier , PropertyIdentifier: propertyIdentifier , PropertyArrayIndex: propertyArrayIndex , DeviceIdentifier: deviceIdentifier , AccessResult: accessResult } } // Deprecated: use the interface for direct cast func CastBACnetPropertyAccessResult(structType interface{}) BACnetPropertyAccessResult { - if casted, ok := structType.(BACnetPropertyAccessResult); ok { + if casted, ok := structType.(BACnetPropertyAccessResult); ok { return casted } if casted, ok := structType.(*BACnetPropertyAccessResult); ok { @@ -135,6 +139,7 @@ func (m *_BACnetPropertyAccessResult) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_BACnetPropertyAccessResult) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -156,7 +161,7 @@ func BACnetPropertyAccessResultParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("objectIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for objectIdentifier") } - _objectIdentifier, _objectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER)) +_objectIdentifier, _objectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_BACNET_OBJECT_IDENTIFIER ) ) if _objectIdentifierErr != nil { return nil, errors.Wrap(_objectIdentifierErr, "Error parsing 'objectIdentifier' field of BACnetPropertyAccessResult") } @@ -169,7 +174,7 @@ func BACnetPropertyAccessResultParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("propertyIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for propertyIdentifier") } - _propertyIdentifier, _propertyIdentifierErr := BACnetPropertyIdentifierTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_propertyIdentifier, _propertyIdentifierErr := BACnetPropertyIdentifierTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _propertyIdentifierErr != nil { return nil, errors.Wrap(_propertyIdentifierErr, "Error parsing 'propertyIdentifier' field of BACnetPropertyAccessResult") } @@ -180,12 +185,12 @@ func BACnetPropertyAccessResultParseWithBuffer(ctx context.Context, readBuffer u // Optional Field (propertyArrayIndex) (Can be skipped, if a given expression evaluates to false) var propertyArrayIndex BACnetContextTagUnsignedInteger = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("propertyArrayIndex"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for propertyArrayIndex") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(2), BACnetDataType_UNSIGNED_INTEGER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(2) , BACnetDataType_UNSIGNED_INTEGER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -202,12 +207,12 @@ func BACnetPropertyAccessResultParseWithBuffer(ctx context.Context, readBuffer u // Optional Field (deviceIdentifier) (Can be skipped, if a given expression evaluates to false) var deviceIdentifier BACnetContextTagObjectIdentifier = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("deviceIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for deviceIdentifier") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(3), BACnetDataType_BACNET_OBJECT_IDENTIFIER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(3) , BACnetDataType_BACNET_OBJECT_IDENTIFIER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -226,7 +231,7 @@ func BACnetPropertyAccessResultParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("accessResult"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for accessResult") } - _accessResult, _accessResultErr := BACnetPropertyAccessResultAccessResultParseWithBuffer(ctx, readBuffer, BACnetObjectType(objectIdentifier.GetObjectType()), BACnetPropertyIdentifier(propertyIdentifier.GetValue()), (CastBACnetTagPayloadUnsignedInteger(utils.InlineIf(bool((propertyArrayIndex) != (nil)), func() interface{} { return CastBACnetTagPayloadUnsignedInteger((propertyArrayIndex).GetPayload()) }, func() interface{} { return CastBACnetTagPayloadUnsignedInteger(nil) })))) +_accessResult, _accessResultErr := BACnetPropertyAccessResultAccessResultParseWithBuffer(ctx, readBuffer , BACnetObjectType( objectIdentifier.GetObjectType() ) , BACnetPropertyIdentifier( propertyIdentifier.GetValue() ) , (CastBACnetTagPayloadUnsignedInteger(utils.InlineIf(bool(((propertyArrayIndex)) != (nil)), func() interface{} {return CastBACnetTagPayloadUnsignedInteger((propertyArrayIndex).GetPayload())}, func() interface{} {return CastBACnetTagPayloadUnsignedInteger(nil)}))) ) if _accessResultErr != nil { return nil, errors.Wrap(_accessResultErr, "Error parsing 'accessResult' field of BACnetPropertyAccessResult") } @@ -241,12 +246,12 @@ func BACnetPropertyAccessResultParseWithBuffer(ctx context.Context, readBuffer u // Create the instance return &_BACnetPropertyAccessResult{ - ObjectIdentifier: objectIdentifier, - PropertyIdentifier: propertyIdentifier, - PropertyArrayIndex: propertyArrayIndex, - DeviceIdentifier: deviceIdentifier, - AccessResult: accessResult, - }, nil + ObjectIdentifier: objectIdentifier, + PropertyIdentifier: propertyIdentifier, + PropertyArrayIndex: propertyArrayIndex, + DeviceIdentifier: deviceIdentifier, + AccessResult: accessResult, + }, nil } func (m *_BACnetPropertyAccessResult) Serialize() ([]byte, error) { @@ -260,7 +265,7 @@ func (m *_BACnetPropertyAccessResult) Serialize() ([]byte, error) { func (m *_BACnetPropertyAccessResult) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetPropertyAccessResult"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetPropertyAccessResult"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetPropertyAccessResult") } @@ -338,6 +343,7 @@ func (m *_BACnetPropertyAccessResult) SerializeWithWriteBuffer(ctx context.Conte return nil } + func (m *_BACnetPropertyAccessResult) isBACnetPropertyAccessResult() bool { return true } @@ -352,3 +358,6 @@ func (m *_BACnetPropertyAccessResult) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyAccessResultAccessResult.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyAccessResultAccessResult.go index bb9793307d7..eb89ba2df79 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyAccessResultAccessResult.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyAccessResultAccessResult.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyAccessResultAccessResult is the corresponding interface of BACnetPropertyAccessResultAccessResult type BACnetPropertyAccessResultAccessResult interface { @@ -47,10 +49,10 @@ type BACnetPropertyAccessResultAccessResultExactly interface { // _BACnetPropertyAccessResultAccessResult is the data-structure of this message type _BACnetPropertyAccessResultAccessResult struct { _BACnetPropertyAccessResultAccessResultChildRequirements - PeekedTagHeader BACnetTagHeader + PeekedTagHeader BACnetTagHeader // Arguments. - ObjectTypeArgument BACnetObjectType + ObjectTypeArgument BACnetObjectType PropertyIdentifierArgument BACnetPropertyIdentifier PropertyArrayIndexArgument BACnetTagPayloadUnsignedInteger } @@ -60,6 +62,7 @@ type _BACnetPropertyAccessResultAccessResultChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type BACnetPropertyAccessResultAccessResultParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetPropertyAccessResultAccessResult, serializeChildFunction func() error) error GetTypeName() string @@ -67,13 +70,12 @@ type BACnetPropertyAccessResultAccessResultParent interface { type BACnetPropertyAccessResultAccessResultChild interface { utils.Serializable - InitializeParent(parent BACnetPropertyAccessResultAccessResult, peekedTagHeader BACnetTagHeader) +InitializeParent(parent BACnetPropertyAccessResultAccessResult , peekedTagHeader BACnetTagHeader ) GetParent() *BACnetPropertyAccessResultAccessResult GetTypeName() string BACnetPropertyAccessResultAccessResult } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -103,14 +105,15 @@ func (m *_BACnetPropertyAccessResultAccessResult) GetPeekedTagNumber() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyAccessResultAccessResult factory function for _BACnetPropertyAccessResultAccessResult -func NewBACnetPropertyAccessResultAccessResult(peekedTagHeader BACnetTagHeader, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier, propertyArrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetPropertyAccessResultAccessResult { - return &_BACnetPropertyAccessResultAccessResult{PeekedTagHeader: peekedTagHeader, ObjectTypeArgument: objectTypeArgument, PropertyIdentifierArgument: propertyIdentifierArgument, PropertyArrayIndexArgument: propertyArrayIndexArgument} +func NewBACnetPropertyAccessResultAccessResult( peekedTagHeader BACnetTagHeader , objectTypeArgument BACnetObjectType , propertyIdentifierArgument BACnetPropertyIdentifier , propertyArrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetPropertyAccessResultAccessResult { +return &_BACnetPropertyAccessResultAccessResult{ PeekedTagHeader: peekedTagHeader , ObjectTypeArgument: objectTypeArgument , PropertyIdentifierArgument: propertyIdentifierArgument , PropertyArrayIndexArgument: propertyArrayIndexArgument } } // Deprecated: use the interface for direct cast func CastBACnetPropertyAccessResultAccessResult(structType interface{}) BACnetPropertyAccessResultAccessResult { - if casted, ok := structType.(BACnetPropertyAccessResultAccessResult); ok { + if casted, ok := structType.(BACnetPropertyAccessResultAccessResult); ok { return casted } if casted, ok := structType.(*BACnetPropertyAccessResultAccessResult); ok { @@ -123,6 +126,7 @@ func (m *_BACnetPropertyAccessResultAccessResult) GetTypeName() string { return "BACnetPropertyAccessResultAccessResult" } + func (m *_BACnetPropertyAccessResultAccessResult) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -148,13 +152,13 @@ func BACnetPropertyAccessResultAccessResultParseWithBuffer(ctx context.Context, currentPos := positionAware.GetPos() _ = currentPos - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Virtual field _peekedTagNumber := peekedTagHeader.GetActualTagNumber() @@ -164,16 +168,16 @@ func BACnetPropertyAccessResultAccessResultParseWithBuffer(ctx context.Context, // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetPropertyAccessResultAccessResultChildSerializeRequirement interface { BACnetPropertyAccessResultAccessResult - InitializeParent(BACnetPropertyAccessResultAccessResult, BACnetTagHeader) + InitializeParent(BACnetPropertyAccessResultAccessResult, BACnetTagHeader) GetParent() BACnetPropertyAccessResultAccessResult } var _childTemp interface{} var _child BACnetPropertyAccessResultAccessResultChildSerializeRequirement var typeSwitchError error switch { - case peekedTagNumber == uint8(4): // BACnetPropertyAccessResultAccessResultPropertyValue +case peekedTagNumber == uint8(4) : // BACnetPropertyAccessResultAccessResultPropertyValue _childTemp, typeSwitchError = BACnetPropertyAccessResultAccessResultPropertyValueParseWithBuffer(ctx, readBuffer, objectTypeArgument, propertyIdentifierArgument, propertyArrayIndexArgument) - case peekedTagNumber == uint8(5): // BACnetPropertyAccessResultAccessResultPropertyAccessError +case peekedTagNumber == uint8(5) : // BACnetPropertyAccessResultAccessResultPropertyAccessError _childTemp, typeSwitchError = BACnetPropertyAccessResultAccessResultPropertyAccessErrorParseWithBuffer(ctx, readBuffer, objectTypeArgument, propertyIdentifierArgument, propertyArrayIndexArgument) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedTagNumber=%v]", peekedTagNumber) @@ -188,7 +192,7 @@ func BACnetPropertyAccessResultAccessResultParseWithBuffer(ctx context.Context, } // Finish initializing - _child.InitializeParent(_child, peekedTagHeader) +_child.InitializeParent(_child , peekedTagHeader ) return _child, nil } @@ -198,7 +202,7 @@ func (pm *_BACnetPropertyAccessResultAccessResult) SerializeParent(ctx context.C _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetPropertyAccessResultAccessResult"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetPropertyAccessResultAccessResult"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetPropertyAccessResultAccessResult") } // Virtual field @@ -217,6 +221,7 @@ func (pm *_BACnetPropertyAccessResultAccessResult) SerializeParent(ctx context.C return nil } + //// // Arguments Getter @@ -229,7 +234,6 @@ func (m *_BACnetPropertyAccessResultAccessResult) GetPropertyIdentifierArgument( func (m *_BACnetPropertyAccessResultAccessResult) GetPropertyArrayIndexArgument() BACnetTagPayloadUnsignedInteger { return m.PropertyArrayIndexArgument } - // //// @@ -247,3 +251,6 @@ func (m *_BACnetPropertyAccessResultAccessResult) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyAccessResultAccessResultPropertyAccessError.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyAccessResultAccessResultPropertyAccessError.go index 2d639346800..0948244cdc8 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyAccessResultAccessResultPropertyAccessError.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyAccessResultAccessResultPropertyAccessError.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyAccessResultAccessResultPropertyAccessError is the corresponding interface of BACnetPropertyAccessResultAccessResultPropertyAccessError type BACnetPropertyAccessResultAccessResultPropertyAccessError interface { @@ -46,9 +48,11 @@ type BACnetPropertyAccessResultAccessResultPropertyAccessErrorExactly interface // _BACnetPropertyAccessResultAccessResultPropertyAccessError is the data-structure of this message type _BACnetPropertyAccessResultAccessResultPropertyAccessError struct { *_BACnetPropertyAccessResultAccessResult - PropertyAccessError ErrorEnclosed + PropertyAccessError ErrorEnclosed } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyAccessResultAccessResultPropertyAccessError struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyAccessResultAccessResultPropertyAccessError) InitializeParent(parent BACnetPropertyAccessResultAccessResult, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyAccessResultAccessResultPropertyAccessError) InitializeParent(parent BACnetPropertyAccessResultAccessResult , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyAccessResultAccessResultPropertyAccessError) GetParent() BACnetPropertyAccessResultAccessResult { +func (m *_BACnetPropertyAccessResultAccessResultPropertyAccessError) GetParent() BACnetPropertyAccessResultAccessResult { return m._BACnetPropertyAccessResultAccessResult } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyAccessResultAccessResultPropertyAccessError) GetProperty /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyAccessResultAccessResultPropertyAccessError factory function for _BACnetPropertyAccessResultAccessResultPropertyAccessError -func NewBACnetPropertyAccessResultAccessResultPropertyAccessError(propertyAccessError ErrorEnclosed, peekedTagHeader BACnetTagHeader, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier, propertyArrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetPropertyAccessResultAccessResultPropertyAccessError { +func NewBACnetPropertyAccessResultAccessResultPropertyAccessError( propertyAccessError ErrorEnclosed , peekedTagHeader BACnetTagHeader , objectTypeArgument BACnetObjectType , propertyIdentifierArgument BACnetPropertyIdentifier , propertyArrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetPropertyAccessResultAccessResultPropertyAccessError { _result := &_BACnetPropertyAccessResultAccessResultPropertyAccessError{ - PropertyAccessError: propertyAccessError, - _BACnetPropertyAccessResultAccessResult: NewBACnetPropertyAccessResultAccessResult(peekedTagHeader, objectTypeArgument, propertyIdentifierArgument, propertyArrayIndexArgument), + PropertyAccessError: propertyAccessError, + _BACnetPropertyAccessResultAccessResult: NewBACnetPropertyAccessResultAccessResult(peekedTagHeader, objectTypeArgument, propertyIdentifierArgument, propertyArrayIndexArgument), } _result._BACnetPropertyAccessResultAccessResult._BACnetPropertyAccessResultAccessResultChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyAccessResultAccessResultPropertyAccessError(propertyAccess // Deprecated: use the interface for direct cast func CastBACnetPropertyAccessResultAccessResultPropertyAccessError(structType interface{}) BACnetPropertyAccessResultAccessResultPropertyAccessError { - if casted, ok := structType.(BACnetPropertyAccessResultAccessResultPropertyAccessError); ok { + if casted, ok := structType.(BACnetPropertyAccessResultAccessResultPropertyAccessError); ok { return casted } if casted, ok := structType.(*BACnetPropertyAccessResultAccessResultPropertyAccessError); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyAccessResultAccessResultPropertyAccessError) GetLengthIn return lengthInBits } + func (m *_BACnetPropertyAccessResultAccessResultPropertyAccessError) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyAccessResultAccessResultPropertyAccessErrorParseWithBuffer(ct if pullErr := readBuffer.PullContext("propertyAccessError"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for propertyAccessError") } - _propertyAccessError, _propertyAccessErrorErr := ErrorEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(5))) +_propertyAccessError, _propertyAccessErrorErr := ErrorEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(5) ) ) if _propertyAccessErrorErr != nil { return nil, errors.Wrap(_propertyAccessErrorErr, "Error parsing 'propertyAccessError' field of BACnetPropertyAccessResultAccessResultPropertyAccessError") } @@ -152,7 +156,7 @@ func BACnetPropertyAccessResultAccessResultPropertyAccessErrorParseWithBuffer(ct // Create a partially initialized instance _child := &_BACnetPropertyAccessResultAccessResultPropertyAccessError{ _BACnetPropertyAccessResultAccessResult: &_BACnetPropertyAccessResultAccessResult{ - ObjectTypeArgument: objectTypeArgument, + ObjectTypeArgument: objectTypeArgument, PropertyIdentifierArgument: propertyIdentifierArgument, PropertyArrayIndexArgument: propertyArrayIndexArgument, }, @@ -178,17 +182,17 @@ func (m *_BACnetPropertyAccessResultAccessResultPropertyAccessError) SerializeWi return errors.Wrap(pushErr, "Error pushing for BACnetPropertyAccessResultAccessResultPropertyAccessError") } - // Simple Field (propertyAccessError) - if pushErr := writeBuffer.PushContext("propertyAccessError"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for propertyAccessError") - } - _propertyAccessErrorErr := writeBuffer.WriteSerializable(ctx, m.GetPropertyAccessError()) - if popErr := writeBuffer.PopContext("propertyAccessError"); popErr != nil { - return errors.Wrap(popErr, "Error popping for propertyAccessError") - } - if _propertyAccessErrorErr != nil { - return errors.Wrap(_propertyAccessErrorErr, "Error serializing 'propertyAccessError' field") - } + // Simple Field (propertyAccessError) + if pushErr := writeBuffer.PushContext("propertyAccessError"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for propertyAccessError") + } + _propertyAccessErrorErr := writeBuffer.WriteSerializable(ctx, m.GetPropertyAccessError()) + if popErr := writeBuffer.PopContext("propertyAccessError"); popErr != nil { + return errors.Wrap(popErr, "Error popping for propertyAccessError") + } + if _propertyAccessErrorErr != nil { + return errors.Wrap(_propertyAccessErrorErr, "Error serializing 'propertyAccessError' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyAccessResultAccessResultPropertyAccessError"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyAccessResultAccessResultPropertyAccessError") @@ -198,6 +202,7 @@ func (m *_BACnetPropertyAccessResultAccessResultPropertyAccessError) SerializeWi return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyAccessResultAccessResultPropertyAccessError) isBACnetPropertyAccessResultAccessResultPropertyAccessError() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetPropertyAccessResultAccessResultPropertyAccessError) String() st } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyAccessResultAccessResultPropertyValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyAccessResultAccessResultPropertyValue.go index 1e4a993ded4..78d8828b1d5 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyAccessResultAccessResultPropertyValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyAccessResultAccessResultPropertyValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyAccessResultAccessResultPropertyValue is the corresponding interface of BACnetPropertyAccessResultAccessResultPropertyValue type BACnetPropertyAccessResultAccessResultPropertyValue interface { @@ -46,9 +48,11 @@ type BACnetPropertyAccessResultAccessResultPropertyValueExactly interface { // _BACnetPropertyAccessResultAccessResultPropertyValue is the data-structure of this message type _BACnetPropertyAccessResultAccessResultPropertyValue struct { *_BACnetPropertyAccessResultAccessResult - PropertyValue BACnetConstructedData + PropertyValue BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyAccessResultAccessResultPropertyValue struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyAccessResultAccessResultPropertyValue) InitializeParent(parent BACnetPropertyAccessResultAccessResult, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyAccessResultAccessResultPropertyValue) InitializeParent(parent BACnetPropertyAccessResultAccessResult , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyAccessResultAccessResultPropertyValue) GetParent() BACnetPropertyAccessResultAccessResult { +func (m *_BACnetPropertyAccessResultAccessResultPropertyValue) GetParent() BACnetPropertyAccessResultAccessResult { return m._BACnetPropertyAccessResultAccessResult } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyAccessResultAccessResultPropertyValue) GetPropertyValue( /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyAccessResultAccessResultPropertyValue factory function for _BACnetPropertyAccessResultAccessResultPropertyValue -func NewBACnetPropertyAccessResultAccessResultPropertyValue(propertyValue BACnetConstructedData, peekedTagHeader BACnetTagHeader, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier, propertyArrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetPropertyAccessResultAccessResultPropertyValue { +func NewBACnetPropertyAccessResultAccessResultPropertyValue( propertyValue BACnetConstructedData , peekedTagHeader BACnetTagHeader , objectTypeArgument BACnetObjectType , propertyIdentifierArgument BACnetPropertyIdentifier , propertyArrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetPropertyAccessResultAccessResultPropertyValue { _result := &_BACnetPropertyAccessResultAccessResultPropertyValue{ - PropertyValue: propertyValue, - _BACnetPropertyAccessResultAccessResult: NewBACnetPropertyAccessResultAccessResult(peekedTagHeader, objectTypeArgument, propertyIdentifierArgument, propertyArrayIndexArgument), + PropertyValue: propertyValue, + _BACnetPropertyAccessResultAccessResult: NewBACnetPropertyAccessResultAccessResult(peekedTagHeader, objectTypeArgument, propertyIdentifierArgument, propertyArrayIndexArgument), } _result._BACnetPropertyAccessResultAccessResult._BACnetPropertyAccessResultAccessResultChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyAccessResultAccessResultPropertyValue(propertyValue BACnet // Deprecated: use the interface for direct cast func CastBACnetPropertyAccessResultAccessResultPropertyValue(structType interface{}) BACnetPropertyAccessResultAccessResultPropertyValue { - if casted, ok := structType.(BACnetPropertyAccessResultAccessResultPropertyValue); ok { + if casted, ok := structType.(BACnetPropertyAccessResultAccessResultPropertyValue); ok { return casted } if casted, ok := structType.(*BACnetPropertyAccessResultAccessResultPropertyValue); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyAccessResultAccessResultPropertyValue) GetLengthInBits(c return lengthInBits } + func (m *_BACnetPropertyAccessResultAccessResultPropertyValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyAccessResultAccessResultPropertyValueParseWithBuffer(ctx cont if pullErr := readBuffer.PullContext("propertyValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for propertyValue") } - _propertyValue, _propertyValueErr := BACnetConstructedDataParseWithBuffer(ctx, readBuffer, uint8(uint8(4)), BACnetObjectType(objectTypeArgument), BACnetPropertyIdentifier(propertyIdentifierArgument), propertyArrayIndexArgument) +_propertyValue, _propertyValueErr := BACnetConstructedDataParseWithBuffer(ctx, readBuffer , uint8( uint8(4) ) , BACnetObjectType( objectTypeArgument ) , BACnetPropertyIdentifier( propertyIdentifierArgument ) , propertyArrayIndexArgument ) if _propertyValueErr != nil { return nil, errors.Wrap(_propertyValueErr, "Error parsing 'propertyValue' field of BACnetPropertyAccessResultAccessResultPropertyValue") } @@ -152,7 +156,7 @@ func BACnetPropertyAccessResultAccessResultPropertyValueParseWithBuffer(ctx cont // Create a partially initialized instance _child := &_BACnetPropertyAccessResultAccessResultPropertyValue{ _BACnetPropertyAccessResultAccessResult: &_BACnetPropertyAccessResultAccessResult{ - ObjectTypeArgument: objectTypeArgument, + ObjectTypeArgument: objectTypeArgument, PropertyIdentifierArgument: propertyIdentifierArgument, PropertyArrayIndexArgument: propertyArrayIndexArgument, }, @@ -178,17 +182,17 @@ func (m *_BACnetPropertyAccessResultAccessResultPropertyValue) SerializeWithWrit return errors.Wrap(pushErr, "Error pushing for BACnetPropertyAccessResultAccessResultPropertyValue") } - // Simple Field (propertyValue) - if pushErr := writeBuffer.PushContext("propertyValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for propertyValue") - } - _propertyValueErr := writeBuffer.WriteSerializable(ctx, m.GetPropertyValue()) - if popErr := writeBuffer.PopContext("propertyValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for propertyValue") - } - if _propertyValueErr != nil { - return errors.Wrap(_propertyValueErr, "Error serializing 'propertyValue' field") - } + // Simple Field (propertyValue) + if pushErr := writeBuffer.PushContext("propertyValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for propertyValue") + } + _propertyValueErr := writeBuffer.WriteSerializable(ctx, m.GetPropertyValue()) + if popErr := writeBuffer.PopContext("propertyValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for propertyValue") + } + if _propertyValueErr != nil { + return errors.Wrap(_propertyValueErr, "Error serializing 'propertyValue' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyAccessResultAccessResultPropertyValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyAccessResultAccessResultPropertyValue") @@ -198,6 +202,7 @@ func (m *_BACnetPropertyAccessResultAccessResultPropertyValue) SerializeWithWrit return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyAccessResultAccessResultPropertyValue) isBACnetPropertyAccessResultAccessResultPropertyValue() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetPropertyAccessResultAccessResultPropertyValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyIdentifier.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyIdentifier.go index b02e9295a39..2ab0f354272 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyIdentifier.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyIdentifier.go @@ -34,472 +34,472 @@ type IBACnetPropertyIdentifier interface { utils.Serializable } -const ( - BACnetPropertyIdentifier_ABSENTEE_LIMIT BACnetPropertyIdentifier = 244 - BACnetPropertyIdentifier_ACCEPTED_MODES BACnetPropertyIdentifier = 175 - BACnetPropertyIdentifier_ACCESS_ALARM_EVENTS BACnetPropertyIdentifier = 245 - BACnetPropertyIdentifier_ACCESS_DOORS BACnetPropertyIdentifier = 246 - BACnetPropertyIdentifier_ACCESS_EVENT BACnetPropertyIdentifier = 247 - BACnetPropertyIdentifier_ACCESS_EVENT_AUTHENTICATION_FACTOR BACnetPropertyIdentifier = 248 - BACnetPropertyIdentifier_ACCESS_EVENT_CREDENTIAL BACnetPropertyIdentifier = 249 - BACnetPropertyIdentifier_ACCESS_EVENT_TAG BACnetPropertyIdentifier = 322 - BACnetPropertyIdentifier_ACCESS_EVENT_TIME BACnetPropertyIdentifier = 250 - BACnetPropertyIdentifier_ACCESS_TRANSACTION_EVENTS BACnetPropertyIdentifier = 251 - BACnetPropertyIdentifier_ACCOMPANIMENT BACnetPropertyIdentifier = 252 - BACnetPropertyIdentifier_ACCOMPANIMENT_TIME BACnetPropertyIdentifier = 253 - BACnetPropertyIdentifier_ACK_REQUIRED BACnetPropertyIdentifier = 1 - BACnetPropertyIdentifier_ACKED_TRANSITIONS BACnetPropertyIdentifier = 0 - BACnetPropertyIdentifier_ACTION BACnetPropertyIdentifier = 2 - BACnetPropertyIdentifier_ACTION_TEXT BACnetPropertyIdentifier = 3 - BACnetPropertyIdentifier_ACTIVATION_TIME BACnetPropertyIdentifier = 254 - BACnetPropertyIdentifier_ACTIVE_AUTHENTICATION_POLICY BACnetPropertyIdentifier = 255 - BACnetPropertyIdentifier_ACTIVE_COV_MULTIPLE_SUBSCRIPTIONS BACnetPropertyIdentifier = 481 - BACnetPropertyIdentifier_ACTIVE_COV_SUBSCRIPTIONS BACnetPropertyIdentifier = 152 - BACnetPropertyIdentifier_ACTIVE_TEXT BACnetPropertyIdentifier = 4 - BACnetPropertyIdentifier_ACTIVE_VT_SESSIONS BACnetPropertyIdentifier = 5 - BACnetPropertyIdentifier_ACTUAL_SHED_LEVEL BACnetPropertyIdentifier = 212 - BACnetPropertyIdentifier_ADJUST_VALUE BACnetPropertyIdentifier = 176 - BACnetPropertyIdentifier_ALARM_VALUE BACnetPropertyIdentifier = 6 - BACnetPropertyIdentifier_ALARM_VALUES BACnetPropertyIdentifier = 7 - BACnetPropertyIdentifier_ALIGN_INTERVALS BACnetPropertyIdentifier = 193 - BACnetPropertyIdentifier_ALL BACnetPropertyIdentifier = 8 - BACnetPropertyIdentifier_ALL_WRITES_SUCCESSFUL BACnetPropertyIdentifier = 9 - BACnetPropertyIdentifier_ALLOW_GROUP_DELAY_INHIBIT BACnetPropertyIdentifier = 365 - BACnetPropertyIdentifier_APDU_LENGTH BACnetPropertyIdentifier = 399 - BACnetPropertyIdentifier_APDU_SEGMENT_TIMEOUT BACnetPropertyIdentifier = 10 - BACnetPropertyIdentifier_APDU_TIMEOUT BACnetPropertyIdentifier = 11 - BACnetPropertyIdentifier_APPLICATION_SOFTWARE_VERSION BACnetPropertyIdentifier = 12 - BACnetPropertyIdentifier_ARCHIVE BACnetPropertyIdentifier = 13 - BACnetPropertyIdentifier_ASSIGNED_ACCESS_RIGHTS BACnetPropertyIdentifier = 256 - BACnetPropertyIdentifier_ASSIGNED_LANDING_CALLS BACnetPropertyIdentifier = 447 - BACnetPropertyIdentifier_ATTEMPTED_SAMPLES BACnetPropertyIdentifier = 124 - BACnetPropertyIdentifier_AUTHENTICATION_FACTORS BACnetPropertyIdentifier = 257 - BACnetPropertyIdentifier_AUTHENTICATION_POLICY_LIST BACnetPropertyIdentifier = 258 - BACnetPropertyIdentifier_AUTHENTICATION_POLICY_NAMES BACnetPropertyIdentifier = 259 - BACnetPropertyIdentifier_AUTHENTICATION_STATUS BACnetPropertyIdentifier = 260 - BACnetPropertyIdentifier_AUTHORIZATION_EXEMPTIONS BACnetPropertyIdentifier = 364 - BACnetPropertyIdentifier_AUTHORIZATION_MODE BACnetPropertyIdentifier = 261 - BACnetPropertyIdentifier_AUTO_SLAVE_DISCOVERY BACnetPropertyIdentifier = 169 - BACnetPropertyIdentifier_AVERAGE_VALUE BACnetPropertyIdentifier = 125 - BACnetPropertyIdentifier_BACKUP_AND_RESTORE_STATE BACnetPropertyIdentifier = 338 - BACnetPropertyIdentifier_BACKUP_FAILURE_TIMEOUT BACnetPropertyIdentifier = 153 - BACnetPropertyIdentifier_BACKUP_PREPARATION_TIME BACnetPropertyIdentifier = 339 - BACnetPropertyIdentifier_BACNET_IP_GLOBAL_ADDRESS BACnetPropertyIdentifier = 407 - BACnetPropertyIdentifier_BACNET_IP_MODE BACnetPropertyIdentifier = 408 - BACnetPropertyIdentifier_BACNET_IP_MULTICAST_ADDRESS BACnetPropertyIdentifier = 409 - BACnetPropertyIdentifier_BACNET_IP_NAT_TRAVERSAL BACnetPropertyIdentifier = 410 - BACnetPropertyIdentifier_BACNET_IP_UDP_PORT BACnetPropertyIdentifier = 412 - BACnetPropertyIdentifier_BACNET_IPV6_MODE BACnetPropertyIdentifier = 435 - BACnetPropertyIdentifier_BACNET_IPV6_UDP_PORT BACnetPropertyIdentifier = 438 - BACnetPropertyIdentifier_BACNET_IPV6_MULTICAST_ADDRESS BACnetPropertyIdentifier = 440 - BACnetPropertyIdentifier_BASE_DEVICE_SECURITY_POLICY BACnetPropertyIdentifier = 327 - BACnetPropertyIdentifier_BBMD_ACCEPT_FD_REGISTRATIONS BACnetPropertyIdentifier = 413 - BACnetPropertyIdentifier_BBMD_BROADCAST_DISTRIBUTION_TABLE BACnetPropertyIdentifier = 414 - BACnetPropertyIdentifier_BBMD_FOREIGN_DEVICE_TABLE BACnetPropertyIdentifier = 415 - BACnetPropertyIdentifier_BELONGS_TO BACnetPropertyIdentifier = 262 - BACnetPropertyIdentifier_BIAS BACnetPropertyIdentifier = 14 - BACnetPropertyIdentifier_BIT_MASK BACnetPropertyIdentifier = 342 - BACnetPropertyIdentifier_BIT_TEXT BACnetPropertyIdentifier = 343 - BACnetPropertyIdentifier_BLINK_WARN_ENABLE BACnetPropertyIdentifier = 373 - BACnetPropertyIdentifier_BUFFER_SIZE BACnetPropertyIdentifier = 126 - BACnetPropertyIdentifier_CAR_ASSIGNED_DIRECTION BACnetPropertyIdentifier = 448 - BACnetPropertyIdentifier_CAR_DOOR_COMMAND BACnetPropertyIdentifier = 449 - BACnetPropertyIdentifier_CAR_DOOR_STATUS BACnetPropertyIdentifier = 450 - BACnetPropertyIdentifier_CAR_DOOR_TEXT BACnetPropertyIdentifier = 451 - BACnetPropertyIdentifier_CAR_DOOR_ZONE BACnetPropertyIdentifier = 452 - BACnetPropertyIdentifier_CAR_DRIVE_STATUS BACnetPropertyIdentifier = 453 - BACnetPropertyIdentifier_CAR_LOAD BACnetPropertyIdentifier = 454 - BACnetPropertyIdentifier_CAR_LOAD_UNITS BACnetPropertyIdentifier = 455 - BACnetPropertyIdentifier_CAR_MODE BACnetPropertyIdentifier = 456 - BACnetPropertyIdentifier_CAR_MOVING_DIRECTION BACnetPropertyIdentifier = 457 - BACnetPropertyIdentifier_CAR_POSITION BACnetPropertyIdentifier = 458 - BACnetPropertyIdentifier_CHANGE_OF_STATE_COUNT BACnetPropertyIdentifier = 15 - BACnetPropertyIdentifier_CHANGE_OF_STATE_TIME BACnetPropertyIdentifier = 16 - BACnetPropertyIdentifier_CHANGES_PENDING BACnetPropertyIdentifier = 416 - BACnetPropertyIdentifier_CHANNEL_NUMBER BACnetPropertyIdentifier = 366 - BACnetPropertyIdentifier_CLIENT_COV_INCREMENT BACnetPropertyIdentifier = 127 - BACnetPropertyIdentifier_COMMAND BACnetPropertyIdentifier = 417 - BACnetPropertyIdentifier_COMMAND_TIME_ARRAY BACnetPropertyIdentifier = 430 - BACnetPropertyIdentifier_CONFIGURATION_FILES BACnetPropertyIdentifier = 154 - BACnetPropertyIdentifier_CONTROL_GROUPS BACnetPropertyIdentifier = 367 - BACnetPropertyIdentifier_CONTROLLED_VARIABLE_REFERENCE BACnetPropertyIdentifier = 19 - BACnetPropertyIdentifier_CONTROLLED_VARIABLE_UNITS BACnetPropertyIdentifier = 20 - BACnetPropertyIdentifier_CONTROLLED_VARIABLE_VALUE BACnetPropertyIdentifier = 21 - BACnetPropertyIdentifier_COUNT BACnetPropertyIdentifier = 177 - BACnetPropertyIdentifier_COUNT_BEFORE_CHANGE BACnetPropertyIdentifier = 178 - BACnetPropertyIdentifier_COUNT_CHANGE_TIME BACnetPropertyIdentifier = 179 - BACnetPropertyIdentifier_COV_INCREMENT BACnetPropertyIdentifier = 22 - BACnetPropertyIdentifier_COV_PERIOD BACnetPropertyIdentifier = 180 - BACnetPropertyIdentifier_COV_RESUBSCRIPTION_INTERVAL BACnetPropertyIdentifier = 128 - BACnetPropertyIdentifier_COVU_PERIOD BACnetPropertyIdentifier = 349 - BACnetPropertyIdentifier_COVU_RECIPIENTS BACnetPropertyIdentifier = 350 - BACnetPropertyIdentifier_CREDENTIAL_DISABLE BACnetPropertyIdentifier = 263 - BACnetPropertyIdentifier_CREDENTIAL_STATUS BACnetPropertyIdentifier = 264 - BACnetPropertyIdentifier_CREDENTIALS BACnetPropertyIdentifier = 265 - BACnetPropertyIdentifier_CREDENTIALS_IN_ZONE BACnetPropertyIdentifier = 266 - BACnetPropertyIdentifier_CURRENT_COMMAND_PRIORITY BACnetPropertyIdentifier = 431 - BACnetPropertyIdentifier_DATABASE_REVISION BACnetPropertyIdentifier = 155 - BACnetPropertyIdentifier_DATE_LIST BACnetPropertyIdentifier = 23 - BACnetPropertyIdentifier_DAYLIGHT_SAVINGS_STATUS BACnetPropertyIdentifier = 24 - BACnetPropertyIdentifier_DAYS_REMAINING BACnetPropertyIdentifier = 267 - BACnetPropertyIdentifier_DEADBAND BACnetPropertyIdentifier = 25 - BACnetPropertyIdentifier_DEFAULT_FADE_TIME BACnetPropertyIdentifier = 374 - BACnetPropertyIdentifier_DEFAULT_RAMP_RATE BACnetPropertyIdentifier = 375 - BACnetPropertyIdentifier_DEFAULT_STEP_INCREMENT BACnetPropertyIdentifier = 376 - BACnetPropertyIdentifier_DEFAULT_SUBORDINATE_RELATIONSHIP BACnetPropertyIdentifier = 490 - BACnetPropertyIdentifier_DEFAULT_TIMEOUT BACnetPropertyIdentifier = 393 - BACnetPropertyIdentifier_DEPLOYED_PROFILE_LOCATION BACnetPropertyIdentifier = 484 - BACnetPropertyIdentifier_DERIVATIVE_CONSTANT BACnetPropertyIdentifier = 26 - BACnetPropertyIdentifier_DERIVATIVE_CONSTANT_UNITS BACnetPropertyIdentifier = 27 - BACnetPropertyIdentifier_DESCRIPTION BACnetPropertyIdentifier = 28 - BACnetPropertyIdentifier_DESCRIPTION_OF_HALT BACnetPropertyIdentifier = 29 - BACnetPropertyIdentifier_DEVICE_ADDRESS_BINDING BACnetPropertyIdentifier = 30 - BACnetPropertyIdentifier_DEVICE_TYPE BACnetPropertyIdentifier = 31 - BACnetPropertyIdentifier_DIRECT_READING BACnetPropertyIdentifier = 156 - BACnetPropertyIdentifier_DISTRIBUTION_KEY_REVISION BACnetPropertyIdentifier = 328 - BACnetPropertyIdentifier_DO_NOT_HIDE BACnetPropertyIdentifier = 329 - BACnetPropertyIdentifier_DOOR_ALARM_STATE BACnetPropertyIdentifier = 226 - BACnetPropertyIdentifier_DOOR_EXTENDED_PULSE_TIME BACnetPropertyIdentifier = 227 - BACnetPropertyIdentifier_DOOR_MEMBERS BACnetPropertyIdentifier = 228 - BACnetPropertyIdentifier_DOOR_OPEN_TOO_LONG_TIME BACnetPropertyIdentifier = 229 - BACnetPropertyIdentifier_DOOR_PULSE_TIME BACnetPropertyIdentifier = 230 - BACnetPropertyIdentifier_DOOR_STATUS BACnetPropertyIdentifier = 231 - BACnetPropertyIdentifier_DOOR_UNLOCK_DELAY_TIME BACnetPropertyIdentifier = 232 - BACnetPropertyIdentifier_DUTY_WINDOW BACnetPropertyIdentifier = 213 - BACnetPropertyIdentifier_EFFECTIVE_PERIOD BACnetPropertyIdentifier = 32 - BACnetPropertyIdentifier_EGRESS_ACTIVE BACnetPropertyIdentifier = 386 - BACnetPropertyIdentifier_EGRESS_TIME BACnetPropertyIdentifier = 377 - BACnetPropertyIdentifier_ELAPSED_ACTIVE_TIME BACnetPropertyIdentifier = 33 - BACnetPropertyIdentifier_ELEVATOR_GROUP BACnetPropertyIdentifier = 459 - BACnetPropertyIdentifier_ENABLE BACnetPropertyIdentifier = 133 - BACnetPropertyIdentifier_ENERGY_METER BACnetPropertyIdentifier = 460 - BACnetPropertyIdentifier_ENERGY_METER_REF BACnetPropertyIdentifier = 461 - BACnetPropertyIdentifier_ENTRY_POINTS BACnetPropertyIdentifier = 268 - BACnetPropertyIdentifier_ERROR_LIMIT BACnetPropertyIdentifier = 34 - BACnetPropertyIdentifier_ESCALATOR_MODE BACnetPropertyIdentifier = 462 - BACnetPropertyIdentifier_EVENT_ALGORITHM_INHIBIT BACnetPropertyIdentifier = 354 - BACnetPropertyIdentifier_EVENT_ALGORITHM_INHIBIT_REF BACnetPropertyIdentifier = 355 - BACnetPropertyIdentifier_EVENT_DETECTION_ENABLE BACnetPropertyIdentifier = 353 - BACnetPropertyIdentifier_EVENT_ENABLE BACnetPropertyIdentifier = 35 - BACnetPropertyIdentifier_EVENT_MESSAGE_TEXTS BACnetPropertyIdentifier = 351 - BACnetPropertyIdentifier_EVENT_MESSAGE_TEXTS_CONFIG BACnetPropertyIdentifier = 352 - BACnetPropertyIdentifier_EVENT_PARAMETERS BACnetPropertyIdentifier = 83 - BACnetPropertyIdentifier_EVENT_STATE BACnetPropertyIdentifier = 36 - BACnetPropertyIdentifier_EVENT_TIME_STAMPS BACnetPropertyIdentifier = 130 - BACnetPropertyIdentifier_EVENT_TYPE BACnetPropertyIdentifier = 37 - BACnetPropertyIdentifier_EXCEPTION_SCHEDULE BACnetPropertyIdentifier = 38 - BACnetPropertyIdentifier_EXECUTION_DELAY BACnetPropertyIdentifier = 368 - BACnetPropertyIdentifier_EXIT_POINTS BACnetPropertyIdentifier = 269 - BACnetPropertyIdentifier_EXPECTED_SHED_LEVEL BACnetPropertyIdentifier = 214 - BACnetPropertyIdentifier_EXPIRATION_TIME BACnetPropertyIdentifier = 270 - BACnetPropertyIdentifier_EXTENDED_TIME_ENABLE BACnetPropertyIdentifier = 271 - BACnetPropertyIdentifier_FAILED_ATTEMPT_EVENTS BACnetPropertyIdentifier = 272 - BACnetPropertyIdentifier_FAILED_ATTEMPTS BACnetPropertyIdentifier = 273 - BACnetPropertyIdentifier_FAILED_ATTEMPTS_TIME BACnetPropertyIdentifier = 274 - BACnetPropertyIdentifier_FAULT_HIGH_LIMIT BACnetPropertyIdentifier = 388 - BACnetPropertyIdentifier_FAULT_LOW_LIMIT BACnetPropertyIdentifier = 389 - BACnetPropertyIdentifier_FAULT_PARAMETERS BACnetPropertyIdentifier = 358 - BACnetPropertyIdentifier_FAULT_SIGNALS BACnetPropertyIdentifier = 463 - BACnetPropertyIdentifier_FAULT_TYPE BACnetPropertyIdentifier = 359 - BACnetPropertyIdentifier_FAULT_VALUES BACnetPropertyIdentifier = 39 - BACnetPropertyIdentifier_FD_BBMD_ADDRESS BACnetPropertyIdentifier = 418 - BACnetPropertyIdentifier_FD_SUBSCRIPTION_LIFETIME BACnetPropertyIdentifier = 419 - BACnetPropertyIdentifier_FEEDBACK_VALUE BACnetPropertyIdentifier = 40 - BACnetPropertyIdentifier_FILE_ACCESS_METHOD BACnetPropertyIdentifier = 41 - BACnetPropertyIdentifier_FILE_SIZE BACnetPropertyIdentifier = 42 - BACnetPropertyIdentifier_FILE_TYPE BACnetPropertyIdentifier = 43 - BACnetPropertyIdentifier_FIRMWARE_REVISION BACnetPropertyIdentifier = 44 - BACnetPropertyIdentifier_FLOOR_TEXT BACnetPropertyIdentifier = 464 - BACnetPropertyIdentifier_FULL_DUTY_BASELINE BACnetPropertyIdentifier = 215 - BACnetPropertyIdentifier_GLOBAL_IDENTIFIER BACnetPropertyIdentifier = 323 - BACnetPropertyIdentifier_GROUP_ID BACnetPropertyIdentifier = 465 - BACnetPropertyIdentifier_GROUP_MEMBER_NAMES BACnetPropertyIdentifier = 346 - BACnetPropertyIdentifier_GROUP_MEMBERS BACnetPropertyIdentifier = 345 - BACnetPropertyIdentifier_GROUP_MODE BACnetPropertyIdentifier = 467 - BACnetPropertyIdentifier_HIGH_LIMIT BACnetPropertyIdentifier = 45 - BACnetPropertyIdentifier_HIGHER_DECK BACnetPropertyIdentifier = 468 - BACnetPropertyIdentifier_IN_PROCESS BACnetPropertyIdentifier = 47 - BACnetPropertyIdentifier_IN_PROGRESS BACnetPropertyIdentifier = 378 - BACnetPropertyIdentifier_INACTIVE_TEXT BACnetPropertyIdentifier = 46 - BACnetPropertyIdentifier_INITIAL_TIMEOUT BACnetPropertyIdentifier = 394 - BACnetPropertyIdentifier_INPUT_REFERENCE BACnetPropertyIdentifier = 181 - BACnetPropertyIdentifier_INSTALLATION_ID BACnetPropertyIdentifier = 469 - BACnetPropertyIdentifier_INSTANCE_OF BACnetPropertyIdentifier = 48 - BACnetPropertyIdentifier_INSTANTANEOUS_POWER BACnetPropertyIdentifier = 379 - BACnetPropertyIdentifier_INTEGRAL_CONSTANT BACnetPropertyIdentifier = 49 - BACnetPropertyIdentifier_INTEGRAL_CONSTANT_UNITS BACnetPropertyIdentifier = 50 - BACnetPropertyIdentifier_INTERFACE_VALUE BACnetPropertyIdentifier = 387 - BACnetPropertyIdentifier_INTERVAL_OFFSET BACnetPropertyIdentifier = 195 - BACnetPropertyIdentifier_IP_ADDRESS BACnetPropertyIdentifier = 400 - BACnetPropertyIdentifier_IP_DEFAULT_GATEWAY BACnetPropertyIdentifier = 401 - BACnetPropertyIdentifier_IP_DHCP_ENABLE BACnetPropertyIdentifier = 402 - BACnetPropertyIdentifier_IP_DHCP_LEASE_TIME BACnetPropertyIdentifier = 403 - BACnetPropertyIdentifier_IP_DHCP_LEASE_TIME_REMAINING BACnetPropertyIdentifier = 404 - BACnetPropertyIdentifier_IP_DHCP_SERVER BACnetPropertyIdentifier = 405 - BACnetPropertyIdentifier_IP_DNS_SERVER BACnetPropertyIdentifier = 406 - BACnetPropertyIdentifier_IP_SUBNET_MASK BACnetPropertyIdentifier = 411 - BACnetPropertyIdentifier_IPV6_ADDRESS BACnetPropertyIdentifier = 436 - BACnetPropertyIdentifier_IPV6_AUTO_ADDRESSING_ENABLE BACnetPropertyIdentifier = 442 - BACnetPropertyIdentifier_IPV6_DEFAULT_GATEWAY BACnetPropertyIdentifier = 439 - BACnetPropertyIdentifier_IPV6_DHCP_LEASE_TIME BACnetPropertyIdentifier = 443 - BACnetPropertyIdentifier_IPV6_DHCP_LEASE_TIME_REMAINING BACnetPropertyIdentifier = 444 - BACnetPropertyIdentifier_IPV6_DHCP_SERVER BACnetPropertyIdentifier = 445 - BACnetPropertyIdentifier_IPV6_DNS_SERVER BACnetPropertyIdentifier = 441 - BACnetPropertyIdentifier_IPV6_PREFIX_LENGTH BACnetPropertyIdentifier = 437 - BACnetPropertyIdentifier_IPV6_ZONE_INDEX BACnetPropertyIdentifier = 446 - BACnetPropertyIdentifier_IS_UTC BACnetPropertyIdentifier = 344 - BACnetPropertyIdentifier_KEY_SETS BACnetPropertyIdentifier = 330 - BACnetPropertyIdentifier_LANDING_CALL_CONTROL BACnetPropertyIdentifier = 471 - BACnetPropertyIdentifier_LANDING_CALLS BACnetPropertyIdentifier = 470 - BACnetPropertyIdentifier_LANDING_DOOR_STATUS BACnetPropertyIdentifier = 472 - BACnetPropertyIdentifier_LAST_ACCESS_EVENT BACnetPropertyIdentifier = 275 - BACnetPropertyIdentifier_LAST_ACCESS_POINT BACnetPropertyIdentifier = 276 - BACnetPropertyIdentifier_LAST_COMMAND_TIME BACnetPropertyIdentifier = 432 - BACnetPropertyIdentifier_LAST_CREDENTIAL_ADDED BACnetPropertyIdentifier = 277 - BACnetPropertyIdentifier_LAST_CREDENTIAL_ADDED_TIME BACnetPropertyIdentifier = 278 - BACnetPropertyIdentifier_LAST_CREDENTIAL_REMOVED BACnetPropertyIdentifier = 279 - BACnetPropertyIdentifier_LAST_CREDENTIAL_REMOVED_TIME BACnetPropertyIdentifier = 280 - BACnetPropertyIdentifier_LAST_KEY_SERVER BACnetPropertyIdentifier = 331 - BACnetPropertyIdentifier_LAST_NOTIFY_RECORD BACnetPropertyIdentifier = 173 - BACnetPropertyIdentifier_LAST_PRIORITY BACnetPropertyIdentifier = 369 - BACnetPropertyIdentifier_LAST_RESTART_REASON BACnetPropertyIdentifier = 196 - BACnetPropertyIdentifier_LAST_RESTORE_TIME BACnetPropertyIdentifier = 157 - BACnetPropertyIdentifier_LAST_STATE_CHANGE BACnetPropertyIdentifier = 395 - BACnetPropertyIdentifier_LAST_USE_TIME BACnetPropertyIdentifier = 281 - BACnetPropertyIdentifier_LIFE_SAFETY_ALARM_VALUES BACnetPropertyIdentifier = 166 - BACnetPropertyIdentifier_LIGHTING_COMMAND BACnetPropertyIdentifier = 380 - BACnetPropertyIdentifier_LIGHTING_COMMAND_DEFAULT_PRIORITY BACnetPropertyIdentifier = 381 - BACnetPropertyIdentifier_LIMIT_ENABLE BACnetPropertyIdentifier = 52 - BACnetPropertyIdentifier_LIMIT_MONITORING_INTERVAL BACnetPropertyIdentifier = 182 - BACnetPropertyIdentifier_LINK_SPEED BACnetPropertyIdentifier = 420 - BACnetPropertyIdentifier_LINK_SPEED_AUTONEGOTIATE BACnetPropertyIdentifier = 422 - BACnetPropertyIdentifier_LINK_SPEEDS BACnetPropertyIdentifier = 421 - BACnetPropertyIdentifier_LIST_OF_GROUP_MEMBERS BACnetPropertyIdentifier = 53 - BACnetPropertyIdentifier_LIST_OF_OBJECT_PROPERTY_REFERENCES BACnetPropertyIdentifier = 54 - BACnetPropertyIdentifier_LOCAL_DATE BACnetPropertyIdentifier = 56 - BACnetPropertyIdentifier_LOCAL_FORWARDING_ONLY BACnetPropertyIdentifier = 360 - BACnetPropertyIdentifier_LOCAL_TIME BACnetPropertyIdentifier = 57 - BACnetPropertyIdentifier_LOCATION BACnetPropertyIdentifier = 58 - BACnetPropertyIdentifier_LOCK_STATUS BACnetPropertyIdentifier = 233 - BACnetPropertyIdentifier_LOCKOUT BACnetPropertyIdentifier = 282 - BACnetPropertyIdentifier_LOCKOUT_RELINQUISH_TIME BACnetPropertyIdentifier = 283 - BACnetPropertyIdentifier_LOG_BUFFER BACnetPropertyIdentifier = 131 - BACnetPropertyIdentifier_LOG_DEVICE_OBJECT_PROPERTY BACnetPropertyIdentifier = 132 - BACnetPropertyIdentifier_LOG_INTERVAL BACnetPropertyIdentifier = 134 - BACnetPropertyIdentifier_LOGGING_OBJECT BACnetPropertyIdentifier = 183 - BACnetPropertyIdentifier_LOGGING_RECORD BACnetPropertyIdentifier = 184 - BACnetPropertyIdentifier_LOGGING_TYPE BACnetPropertyIdentifier = 197 - BACnetPropertyIdentifier_LOW_DIFF_LIMIT BACnetPropertyIdentifier = 390 - BACnetPropertyIdentifier_LOW_LIMIT BACnetPropertyIdentifier = 59 - BACnetPropertyIdentifier_LOWER_DECK BACnetPropertyIdentifier = 473 - BACnetPropertyIdentifier_MAC_ADDRESS BACnetPropertyIdentifier = 423 - BACnetPropertyIdentifier_MACHINE_ROOM_ID BACnetPropertyIdentifier = 474 - BACnetPropertyIdentifier_MAINTENANCE_REQUIRED BACnetPropertyIdentifier = 158 - BACnetPropertyIdentifier_MAKING_CAR_CALL BACnetPropertyIdentifier = 475 - BACnetPropertyIdentifier_MANIPULATED_VARIABLE_REFERENCE BACnetPropertyIdentifier = 60 - BACnetPropertyIdentifier_MANUAL_SLAVE_ADDRESS_BINDING BACnetPropertyIdentifier = 170 - BACnetPropertyIdentifier_MASKED_ALARM_VALUES BACnetPropertyIdentifier = 234 - BACnetPropertyIdentifier_MAX_ACTUAL_VALUE BACnetPropertyIdentifier = 382 - BACnetPropertyIdentifier_MAX_APDU_LENGTH_ACCEPTED BACnetPropertyIdentifier = 62 - BACnetPropertyIdentifier_MAX_FAILED_ATTEMPTS BACnetPropertyIdentifier = 285 - BACnetPropertyIdentifier_MAX_INFO_FRAMES BACnetPropertyIdentifier = 63 - BACnetPropertyIdentifier_MAX_MASTER BACnetPropertyIdentifier = 64 - BACnetPropertyIdentifier_MAX_PRES_VALUE BACnetPropertyIdentifier = 65 - BACnetPropertyIdentifier_MAX_SEGMENTS_ACCEPTED BACnetPropertyIdentifier = 167 - BACnetPropertyIdentifier_MAXIMUM_OUTPUT BACnetPropertyIdentifier = 61 - BACnetPropertyIdentifier_MAXIMUM_VALUE BACnetPropertyIdentifier = 135 - BACnetPropertyIdentifier_MAXIMUM_VALUE_TIMESTAMP BACnetPropertyIdentifier = 149 - BACnetPropertyIdentifier_MEMBER_OF BACnetPropertyIdentifier = 159 - BACnetPropertyIdentifier_MEMBER_STATUS_FLAGS BACnetPropertyIdentifier = 347 - BACnetPropertyIdentifier_MEMBERS BACnetPropertyIdentifier = 286 - BACnetPropertyIdentifier_MIN_ACTUAL_VALUE BACnetPropertyIdentifier = 383 - BACnetPropertyIdentifier_MIN_PRES_VALUE BACnetPropertyIdentifier = 69 - BACnetPropertyIdentifier_MINIMUM_OFF_TIME BACnetPropertyIdentifier = 66 - BACnetPropertyIdentifier_MINIMUM_ON_TIME BACnetPropertyIdentifier = 67 - BACnetPropertyIdentifier_MINIMUM_OUTPUT BACnetPropertyIdentifier = 68 - BACnetPropertyIdentifier_MINIMUM_VALUE BACnetPropertyIdentifier = 136 - BACnetPropertyIdentifier_MINIMUM_VALUE_TIMESTAMP BACnetPropertyIdentifier = 150 - BACnetPropertyIdentifier_MODE BACnetPropertyIdentifier = 160 - BACnetPropertyIdentifier_MODEL_NAME BACnetPropertyIdentifier = 70 - BACnetPropertyIdentifier_MODIFICATION_DATE BACnetPropertyIdentifier = 71 - BACnetPropertyIdentifier_MUSTER_POINT BACnetPropertyIdentifier = 287 - BACnetPropertyIdentifier_NEGATIVE_ACCESS_RULES BACnetPropertyIdentifier = 288 - BACnetPropertyIdentifier_NETWORK_ACCESS_SECURITY_POLICIES BACnetPropertyIdentifier = 332 - BACnetPropertyIdentifier_NETWORK_INTERFACE_NAME BACnetPropertyIdentifier = 424 - BACnetPropertyIdentifier_NETWORK_NUMBER BACnetPropertyIdentifier = 425 - BACnetPropertyIdentifier_NETWORK_NUMBER_QUALITY BACnetPropertyIdentifier = 426 - BACnetPropertyIdentifier_NETWORK_TYPE BACnetPropertyIdentifier = 427 - BACnetPropertyIdentifier_NEXT_STOPPING_FLOOR BACnetPropertyIdentifier = 476 - BACnetPropertyIdentifier_NODE_SUBTYPE BACnetPropertyIdentifier = 207 - BACnetPropertyIdentifier_NODE_TYPE BACnetPropertyIdentifier = 208 - BACnetPropertyIdentifier_NOTIFICATION_CLASS BACnetPropertyIdentifier = 17 - BACnetPropertyIdentifier_NOTIFICATION_THRESHOLD BACnetPropertyIdentifier = 137 - BACnetPropertyIdentifier_NOTIFY_TYPE BACnetPropertyIdentifier = 72 - BACnetPropertyIdentifier_NUMBER_OF_APDU_RETRIES BACnetPropertyIdentifier = 73 - BACnetPropertyIdentifier_NUMBER_OF_AUTHENTICATION_POLICIES BACnetPropertyIdentifier = 289 - BACnetPropertyIdentifier_NUMBER_OF_STATES BACnetPropertyIdentifier = 74 - BACnetPropertyIdentifier_OBJECT_IDENTIFIER BACnetPropertyIdentifier = 75 - BACnetPropertyIdentifier_OBJECT_LIST BACnetPropertyIdentifier = 76 - BACnetPropertyIdentifier_OBJECT_NAME BACnetPropertyIdentifier = 77 - BACnetPropertyIdentifier_OBJECT_PROPERTY_REFERENCE BACnetPropertyIdentifier = 78 - BACnetPropertyIdentifier_OBJECT_TYPE BACnetPropertyIdentifier = 79 - BACnetPropertyIdentifier_OCCUPANCY_COUNT BACnetPropertyIdentifier = 290 - BACnetPropertyIdentifier_OCCUPANCY_COUNT_ADJUST BACnetPropertyIdentifier = 291 - BACnetPropertyIdentifier_OCCUPANCY_COUNT_ENABLE BACnetPropertyIdentifier = 292 - BACnetPropertyIdentifier_OCCUPANCY_LOWER_LIMIT BACnetPropertyIdentifier = 294 - BACnetPropertyIdentifier_OCCUPANCY_LOWER_LIMIT_ENFORCED BACnetPropertyIdentifier = 295 - BACnetPropertyIdentifier_OCCUPANCY_STATE BACnetPropertyIdentifier = 296 - BACnetPropertyIdentifier_OCCUPANCY_UPPER_LIMIT BACnetPropertyIdentifier = 297 - BACnetPropertyIdentifier_OCCUPANCY_UPPER_LIMIT_ENFORCED BACnetPropertyIdentifier = 298 - BACnetPropertyIdentifier_OPERATION_DIRECTION BACnetPropertyIdentifier = 477 - BACnetPropertyIdentifier_OPERATION_EXPECTED BACnetPropertyIdentifier = 161 - BACnetPropertyIdentifier_OPTIONAL BACnetPropertyIdentifier = 80 - BACnetPropertyIdentifier_OUT_OF_SERVICE BACnetPropertyIdentifier = 81 - BACnetPropertyIdentifier_OUTPUT_UNITS BACnetPropertyIdentifier = 82 - BACnetPropertyIdentifier_PACKET_REORDER_TIME BACnetPropertyIdentifier = 333 - BACnetPropertyIdentifier_PASSBACK_MODE BACnetPropertyIdentifier = 300 - BACnetPropertyIdentifier_PASSBACK_TIMEOUT BACnetPropertyIdentifier = 301 - BACnetPropertyIdentifier_PASSENGER_ALARM BACnetPropertyIdentifier = 478 - BACnetPropertyIdentifier_POLARITY BACnetPropertyIdentifier = 84 - BACnetPropertyIdentifier_PORT_FILTER BACnetPropertyIdentifier = 363 - BACnetPropertyIdentifier_POSITIVE_ACCESS_RULES BACnetPropertyIdentifier = 302 - BACnetPropertyIdentifier_POWER BACnetPropertyIdentifier = 384 - BACnetPropertyIdentifier_POWER_MODE BACnetPropertyIdentifier = 479 - BACnetPropertyIdentifier_PRESCALE BACnetPropertyIdentifier = 185 - BACnetPropertyIdentifier_PRESENT_VALUE BACnetPropertyIdentifier = 85 - BACnetPropertyIdentifier_PRIORITY BACnetPropertyIdentifier = 86 - BACnetPropertyIdentifier_PRIORITY_ARRAY BACnetPropertyIdentifier = 87 - BACnetPropertyIdentifier_PRIORITY_FOR_WRITING BACnetPropertyIdentifier = 88 - BACnetPropertyIdentifier_PROCESS_IDENTIFIER BACnetPropertyIdentifier = 89 - BACnetPropertyIdentifier_PROCESS_IDENTIFIER_FILTER BACnetPropertyIdentifier = 361 - BACnetPropertyIdentifier_PROFILE_LOCATION BACnetPropertyIdentifier = 485 - BACnetPropertyIdentifier_PROFILE_NAME BACnetPropertyIdentifier = 168 - BACnetPropertyIdentifier_PROGRAM_CHANGE BACnetPropertyIdentifier = 90 - BACnetPropertyIdentifier_PROGRAM_LOCATION BACnetPropertyIdentifier = 91 - BACnetPropertyIdentifier_PROGRAM_STATE BACnetPropertyIdentifier = 92 - BACnetPropertyIdentifier_PROPERTY_LIST BACnetPropertyIdentifier = 371 - BACnetPropertyIdentifier_PROPORTIONAL_CONSTANT BACnetPropertyIdentifier = 93 - BACnetPropertyIdentifier_PROPORTIONAL_CONSTANT_UNITS BACnetPropertyIdentifier = 94 - BACnetPropertyIdentifier_PROTOCOL_LEVEL BACnetPropertyIdentifier = 482 - BACnetPropertyIdentifier_PROTOCOL_CONFORMANCE_CLASS BACnetPropertyIdentifier = 95 - BACnetPropertyIdentifier_PROTOCOL_OBJECT_TYPES_SUPPORTED BACnetPropertyIdentifier = 96 - BACnetPropertyIdentifier_PROTOCOL_REVISION BACnetPropertyIdentifier = 139 - BACnetPropertyIdentifier_PROTOCOL_SERVICES_SUPPORTED BACnetPropertyIdentifier = 97 - BACnetPropertyIdentifier_PROTOCOL_VERSION BACnetPropertyIdentifier = 98 - BACnetPropertyIdentifier_PULSE_RATE BACnetPropertyIdentifier = 186 - BACnetPropertyIdentifier_READ_ONLY BACnetPropertyIdentifier = 99 - BACnetPropertyIdentifier_REASON_FOR_DISABLE BACnetPropertyIdentifier = 303 - BACnetPropertyIdentifier_REASON_FOR_HALT BACnetPropertyIdentifier = 100 - BACnetPropertyIdentifier_RECIPIENT_LIST BACnetPropertyIdentifier = 102 - BACnetPropertyIdentifier_RECORD_COUNT BACnetPropertyIdentifier = 141 - BACnetPropertyIdentifier_RECORDS_SINCE_NOTIFICATION BACnetPropertyIdentifier = 140 - BACnetPropertyIdentifier_REFERENCE_PORT BACnetPropertyIdentifier = 483 - BACnetPropertyIdentifier_REGISTERED_CAR_CALL BACnetPropertyIdentifier = 480 - BACnetPropertyIdentifier_RELIABILITY BACnetPropertyIdentifier = 103 - BACnetPropertyIdentifier_RELIABILITY_EVALUATION_INHIBIT BACnetPropertyIdentifier = 357 - BACnetPropertyIdentifier_RELINQUISH_DEFAULT BACnetPropertyIdentifier = 104 - BACnetPropertyIdentifier_REPRESENTS BACnetPropertyIdentifier = 491 - BACnetPropertyIdentifier_REQUESTED_SHED_LEVEL BACnetPropertyIdentifier = 218 - BACnetPropertyIdentifier_REQUESTED_UPDATE_INTERVAL BACnetPropertyIdentifier = 348 - BACnetPropertyIdentifier_REQUIRED BACnetPropertyIdentifier = 105 - BACnetPropertyIdentifier_RESOLUTION BACnetPropertyIdentifier = 106 - BACnetPropertyIdentifier_RESTART_NOTIFICATION_RECIPIENTS BACnetPropertyIdentifier = 202 - BACnetPropertyIdentifier_RESTORE_COMPLETION_TIME BACnetPropertyIdentifier = 340 - BACnetPropertyIdentifier_RESTORE_PREPARATION_TIME BACnetPropertyIdentifier = 341 - BACnetPropertyIdentifier_ROUTING_TABLE BACnetPropertyIdentifier = 428 - BACnetPropertyIdentifier_SCALE BACnetPropertyIdentifier = 187 - BACnetPropertyIdentifier_SCALE_FACTOR BACnetPropertyIdentifier = 188 - BACnetPropertyIdentifier_SCHEDULE_DEFAULT BACnetPropertyIdentifier = 174 - BACnetPropertyIdentifier_SECURED_STATUS BACnetPropertyIdentifier = 235 - BACnetPropertyIdentifier_SECURITY_PDU_TIMEOUT BACnetPropertyIdentifier = 334 - BACnetPropertyIdentifier_SECURITY_TIME_WINDOW BACnetPropertyIdentifier = 335 - BACnetPropertyIdentifier_SEGMENTATION_SUPPORTED BACnetPropertyIdentifier = 107 - BACnetPropertyIdentifier_SERIAL_NUMBER BACnetPropertyIdentifier = 372 - BACnetPropertyIdentifier_SETPOINT BACnetPropertyIdentifier = 108 - BACnetPropertyIdentifier_SETPOINT_REFERENCE BACnetPropertyIdentifier = 109 - BACnetPropertyIdentifier_SETTING BACnetPropertyIdentifier = 162 - BACnetPropertyIdentifier_SHED_DURATION BACnetPropertyIdentifier = 219 - BACnetPropertyIdentifier_SHED_LEVEL_DESCRIPTIONS BACnetPropertyIdentifier = 220 - BACnetPropertyIdentifier_SHED_LEVELS BACnetPropertyIdentifier = 221 - BACnetPropertyIdentifier_SILENCED BACnetPropertyIdentifier = 163 - BACnetPropertyIdentifier_SLAVE_ADDRESS_BINDING BACnetPropertyIdentifier = 171 - BACnetPropertyIdentifier_SLAVE_PROXY_ENABLE BACnetPropertyIdentifier = 172 - BACnetPropertyIdentifier_START_TIME BACnetPropertyIdentifier = 142 - BACnetPropertyIdentifier_STATE_CHANGE_VALUES BACnetPropertyIdentifier = 396 - BACnetPropertyIdentifier_STATE_DESCRIPTION BACnetPropertyIdentifier = 222 - BACnetPropertyIdentifier_STATE_TEXT BACnetPropertyIdentifier = 110 - BACnetPropertyIdentifier_STATUS_FLAGS BACnetPropertyIdentifier = 111 - BACnetPropertyIdentifier_STOP_TIME BACnetPropertyIdentifier = 143 - BACnetPropertyIdentifier_STOP_WHEN_FULL BACnetPropertyIdentifier = 144 - BACnetPropertyIdentifier_STRIKE_COUNT BACnetPropertyIdentifier = 391 - BACnetPropertyIdentifier_STRUCTURED_OBJECT_LIST BACnetPropertyIdentifier = 209 - BACnetPropertyIdentifier_SUBORDINATE_ANNOTATIONS BACnetPropertyIdentifier = 210 - BACnetPropertyIdentifier_SUBORDINATE_LIST BACnetPropertyIdentifier = 211 - BACnetPropertyIdentifier_SUBORDINATE_NODE_TYPES BACnetPropertyIdentifier = 487 - BACnetPropertyIdentifier_SUBORDINATE_RELATIONSHIPS BACnetPropertyIdentifier = 489 - BACnetPropertyIdentifier_SUBORDINATE_TAGS BACnetPropertyIdentifier = 488 - BACnetPropertyIdentifier_SUBSCRIBED_RECIPIENTS BACnetPropertyIdentifier = 362 - BACnetPropertyIdentifier_SUPPORTED_FORMAT_CLASSES BACnetPropertyIdentifier = 305 - BACnetPropertyIdentifier_SUPPORTED_FORMATS BACnetPropertyIdentifier = 304 - BACnetPropertyIdentifier_SUPPORTED_SECURITY_ALGORITHMS BACnetPropertyIdentifier = 336 - BACnetPropertyIdentifier_SYSTEM_STATUS BACnetPropertyIdentifier = 112 - BACnetPropertyIdentifier_TAGS BACnetPropertyIdentifier = 486 - BACnetPropertyIdentifier_THREAT_AUTHORITY BACnetPropertyIdentifier = 306 - BACnetPropertyIdentifier_THREAT_LEVEL BACnetPropertyIdentifier = 307 - BACnetPropertyIdentifier_TIME_DELAY BACnetPropertyIdentifier = 113 - BACnetPropertyIdentifier_TIME_DELAY_NORMAL BACnetPropertyIdentifier = 356 - BACnetPropertyIdentifier_TIME_OF_ACTIVE_TIME_RESET BACnetPropertyIdentifier = 114 - BACnetPropertyIdentifier_TIME_OF_DEVICE_RESTART BACnetPropertyIdentifier = 203 - BACnetPropertyIdentifier_TIME_OF_STATE_COUNT_RESET BACnetPropertyIdentifier = 115 - BACnetPropertyIdentifier_TIME_OF_STRIKE_COUNT_RESET BACnetPropertyIdentifier = 392 - BACnetPropertyIdentifier_TIME_SYNCHRONIZATION_INTERVAL BACnetPropertyIdentifier = 204 - BACnetPropertyIdentifier_TIME_SYNCHRONIZATION_RECIPIENTS BACnetPropertyIdentifier = 116 - BACnetPropertyIdentifier_TIMER_RUNNING BACnetPropertyIdentifier = 397 - BACnetPropertyIdentifier_TIMER_STATE BACnetPropertyIdentifier = 398 - BACnetPropertyIdentifier_TOTAL_RECORD_COUNT BACnetPropertyIdentifier = 145 - BACnetPropertyIdentifier_TRACE_FLAG BACnetPropertyIdentifier = 308 - BACnetPropertyIdentifier_TRACKING_VALUE BACnetPropertyIdentifier = 164 - BACnetPropertyIdentifier_TRANSACTION_NOTIFICATION_CLASS BACnetPropertyIdentifier = 309 - BACnetPropertyIdentifier_TRANSITION BACnetPropertyIdentifier = 385 - BACnetPropertyIdentifier_TRIGGER BACnetPropertyIdentifier = 205 - BACnetPropertyIdentifier_UNITS BACnetPropertyIdentifier = 117 - BACnetPropertyIdentifier_UPDATE_INTERVAL BACnetPropertyIdentifier = 118 - BACnetPropertyIdentifier_UPDATE_KEY_SET_TIMEOUT BACnetPropertyIdentifier = 337 - BACnetPropertyIdentifier_UPDATE_TIME BACnetPropertyIdentifier = 189 - BACnetPropertyIdentifier_USER_EXTERNAL_IDENTIFIER BACnetPropertyIdentifier = 310 - BACnetPropertyIdentifier_USER_INFORMATION_REFERENCE BACnetPropertyIdentifier = 311 - BACnetPropertyIdentifier_USER_NAME BACnetPropertyIdentifier = 317 - BACnetPropertyIdentifier_USER_TYPE BACnetPropertyIdentifier = 318 - BACnetPropertyIdentifier_USES_REMAINING BACnetPropertyIdentifier = 319 - BACnetPropertyIdentifier_UTC_OFFSET BACnetPropertyIdentifier = 119 +const( + BACnetPropertyIdentifier_ABSENTEE_LIMIT BACnetPropertyIdentifier = 244 + BACnetPropertyIdentifier_ACCEPTED_MODES BACnetPropertyIdentifier = 175 + BACnetPropertyIdentifier_ACCESS_ALARM_EVENTS BACnetPropertyIdentifier = 245 + BACnetPropertyIdentifier_ACCESS_DOORS BACnetPropertyIdentifier = 246 + BACnetPropertyIdentifier_ACCESS_EVENT BACnetPropertyIdentifier = 247 + BACnetPropertyIdentifier_ACCESS_EVENT_AUTHENTICATION_FACTOR BACnetPropertyIdentifier = 248 + BACnetPropertyIdentifier_ACCESS_EVENT_CREDENTIAL BACnetPropertyIdentifier = 249 + BACnetPropertyIdentifier_ACCESS_EVENT_TAG BACnetPropertyIdentifier = 322 + BACnetPropertyIdentifier_ACCESS_EVENT_TIME BACnetPropertyIdentifier = 250 + BACnetPropertyIdentifier_ACCESS_TRANSACTION_EVENTS BACnetPropertyIdentifier = 251 + BACnetPropertyIdentifier_ACCOMPANIMENT BACnetPropertyIdentifier = 252 + BACnetPropertyIdentifier_ACCOMPANIMENT_TIME BACnetPropertyIdentifier = 253 + BACnetPropertyIdentifier_ACK_REQUIRED BACnetPropertyIdentifier = 1 + BACnetPropertyIdentifier_ACKED_TRANSITIONS BACnetPropertyIdentifier = 0 + BACnetPropertyIdentifier_ACTION BACnetPropertyIdentifier = 2 + BACnetPropertyIdentifier_ACTION_TEXT BACnetPropertyIdentifier = 3 + BACnetPropertyIdentifier_ACTIVATION_TIME BACnetPropertyIdentifier = 254 + BACnetPropertyIdentifier_ACTIVE_AUTHENTICATION_POLICY BACnetPropertyIdentifier = 255 + BACnetPropertyIdentifier_ACTIVE_COV_MULTIPLE_SUBSCRIPTIONS BACnetPropertyIdentifier = 481 + BACnetPropertyIdentifier_ACTIVE_COV_SUBSCRIPTIONS BACnetPropertyIdentifier = 152 + BACnetPropertyIdentifier_ACTIVE_TEXT BACnetPropertyIdentifier = 4 + BACnetPropertyIdentifier_ACTIVE_VT_SESSIONS BACnetPropertyIdentifier = 5 + BACnetPropertyIdentifier_ACTUAL_SHED_LEVEL BACnetPropertyIdentifier = 212 + BACnetPropertyIdentifier_ADJUST_VALUE BACnetPropertyIdentifier = 176 + BACnetPropertyIdentifier_ALARM_VALUE BACnetPropertyIdentifier = 6 + BACnetPropertyIdentifier_ALARM_VALUES BACnetPropertyIdentifier = 7 + BACnetPropertyIdentifier_ALIGN_INTERVALS BACnetPropertyIdentifier = 193 + BACnetPropertyIdentifier_ALL BACnetPropertyIdentifier = 8 + BACnetPropertyIdentifier_ALL_WRITES_SUCCESSFUL BACnetPropertyIdentifier = 9 + BACnetPropertyIdentifier_ALLOW_GROUP_DELAY_INHIBIT BACnetPropertyIdentifier = 365 + BACnetPropertyIdentifier_APDU_LENGTH BACnetPropertyIdentifier = 399 + BACnetPropertyIdentifier_APDU_SEGMENT_TIMEOUT BACnetPropertyIdentifier = 10 + BACnetPropertyIdentifier_APDU_TIMEOUT BACnetPropertyIdentifier = 11 + BACnetPropertyIdentifier_APPLICATION_SOFTWARE_VERSION BACnetPropertyIdentifier = 12 + BACnetPropertyIdentifier_ARCHIVE BACnetPropertyIdentifier = 13 + BACnetPropertyIdentifier_ASSIGNED_ACCESS_RIGHTS BACnetPropertyIdentifier = 256 + BACnetPropertyIdentifier_ASSIGNED_LANDING_CALLS BACnetPropertyIdentifier = 447 + BACnetPropertyIdentifier_ATTEMPTED_SAMPLES BACnetPropertyIdentifier = 124 + BACnetPropertyIdentifier_AUTHENTICATION_FACTORS BACnetPropertyIdentifier = 257 + BACnetPropertyIdentifier_AUTHENTICATION_POLICY_LIST BACnetPropertyIdentifier = 258 + BACnetPropertyIdentifier_AUTHENTICATION_POLICY_NAMES BACnetPropertyIdentifier = 259 + BACnetPropertyIdentifier_AUTHENTICATION_STATUS BACnetPropertyIdentifier = 260 + BACnetPropertyIdentifier_AUTHORIZATION_EXEMPTIONS BACnetPropertyIdentifier = 364 + BACnetPropertyIdentifier_AUTHORIZATION_MODE BACnetPropertyIdentifier = 261 + BACnetPropertyIdentifier_AUTO_SLAVE_DISCOVERY BACnetPropertyIdentifier = 169 + BACnetPropertyIdentifier_AVERAGE_VALUE BACnetPropertyIdentifier = 125 + BACnetPropertyIdentifier_BACKUP_AND_RESTORE_STATE BACnetPropertyIdentifier = 338 + BACnetPropertyIdentifier_BACKUP_FAILURE_TIMEOUT BACnetPropertyIdentifier = 153 + BACnetPropertyIdentifier_BACKUP_PREPARATION_TIME BACnetPropertyIdentifier = 339 + BACnetPropertyIdentifier_BACNET_IP_GLOBAL_ADDRESS BACnetPropertyIdentifier = 407 + BACnetPropertyIdentifier_BACNET_IP_MODE BACnetPropertyIdentifier = 408 + BACnetPropertyIdentifier_BACNET_IP_MULTICAST_ADDRESS BACnetPropertyIdentifier = 409 + BACnetPropertyIdentifier_BACNET_IP_NAT_TRAVERSAL BACnetPropertyIdentifier = 410 + BACnetPropertyIdentifier_BACNET_IP_UDP_PORT BACnetPropertyIdentifier = 412 + BACnetPropertyIdentifier_BACNET_IPV6_MODE BACnetPropertyIdentifier = 435 + BACnetPropertyIdentifier_BACNET_IPV6_UDP_PORT BACnetPropertyIdentifier = 438 + BACnetPropertyIdentifier_BACNET_IPV6_MULTICAST_ADDRESS BACnetPropertyIdentifier = 440 + BACnetPropertyIdentifier_BASE_DEVICE_SECURITY_POLICY BACnetPropertyIdentifier = 327 + BACnetPropertyIdentifier_BBMD_ACCEPT_FD_REGISTRATIONS BACnetPropertyIdentifier = 413 + BACnetPropertyIdentifier_BBMD_BROADCAST_DISTRIBUTION_TABLE BACnetPropertyIdentifier = 414 + BACnetPropertyIdentifier_BBMD_FOREIGN_DEVICE_TABLE BACnetPropertyIdentifier = 415 + BACnetPropertyIdentifier_BELONGS_TO BACnetPropertyIdentifier = 262 + BACnetPropertyIdentifier_BIAS BACnetPropertyIdentifier = 14 + BACnetPropertyIdentifier_BIT_MASK BACnetPropertyIdentifier = 342 + BACnetPropertyIdentifier_BIT_TEXT BACnetPropertyIdentifier = 343 + BACnetPropertyIdentifier_BLINK_WARN_ENABLE BACnetPropertyIdentifier = 373 + BACnetPropertyIdentifier_BUFFER_SIZE BACnetPropertyIdentifier = 126 + BACnetPropertyIdentifier_CAR_ASSIGNED_DIRECTION BACnetPropertyIdentifier = 448 + BACnetPropertyIdentifier_CAR_DOOR_COMMAND BACnetPropertyIdentifier = 449 + BACnetPropertyIdentifier_CAR_DOOR_STATUS BACnetPropertyIdentifier = 450 + BACnetPropertyIdentifier_CAR_DOOR_TEXT BACnetPropertyIdentifier = 451 + BACnetPropertyIdentifier_CAR_DOOR_ZONE BACnetPropertyIdentifier = 452 + BACnetPropertyIdentifier_CAR_DRIVE_STATUS BACnetPropertyIdentifier = 453 + BACnetPropertyIdentifier_CAR_LOAD BACnetPropertyIdentifier = 454 + BACnetPropertyIdentifier_CAR_LOAD_UNITS BACnetPropertyIdentifier = 455 + BACnetPropertyIdentifier_CAR_MODE BACnetPropertyIdentifier = 456 + BACnetPropertyIdentifier_CAR_MOVING_DIRECTION BACnetPropertyIdentifier = 457 + BACnetPropertyIdentifier_CAR_POSITION BACnetPropertyIdentifier = 458 + BACnetPropertyIdentifier_CHANGE_OF_STATE_COUNT BACnetPropertyIdentifier = 15 + BACnetPropertyIdentifier_CHANGE_OF_STATE_TIME BACnetPropertyIdentifier = 16 + BACnetPropertyIdentifier_CHANGES_PENDING BACnetPropertyIdentifier = 416 + BACnetPropertyIdentifier_CHANNEL_NUMBER BACnetPropertyIdentifier = 366 + BACnetPropertyIdentifier_CLIENT_COV_INCREMENT BACnetPropertyIdentifier = 127 + BACnetPropertyIdentifier_COMMAND BACnetPropertyIdentifier = 417 + BACnetPropertyIdentifier_COMMAND_TIME_ARRAY BACnetPropertyIdentifier = 430 + BACnetPropertyIdentifier_CONFIGURATION_FILES BACnetPropertyIdentifier = 154 + BACnetPropertyIdentifier_CONTROL_GROUPS BACnetPropertyIdentifier = 367 + BACnetPropertyIdentifier_CONTROLLED_VARIABLE_REFERENCE BACnetPropertyIdentifier = 19 + BACnetPropertyIdentifier_CONTROLLED_VARIABLE_UNITS BACnetPropertyIdentifier = 20 + BACnetPropertyIdentifier_CONTROLLED_VARIABLE_VALUE BACnetPropertyIdentifier = 21 + BACnetPropertyIdentifier_COUNT BACnetPropertyIdentifier = 177 + BACnetPropertyIdentifier_COUNT_BEFORE_CHANGE BACnetPropertyIdentifier = 178 + BACnetPropertyIdentifier_COUNT_CHANGE_TIME BACnetPropertyIdentifier = 179 + BACnetPropertyIdentifier_COV_INCREMENT BACnetPropertyIdentifier = 22 + BACnetPropertyIdentifier_COV_PERIOD BACnetPropertyIdentifier = 180 + BACnetPropertyIdentifier_COV_RESUBSCRIPTION_INTERVAL BACnetPropertyIdentifier = 128 + BACnetPropertyIdentifier_COVU_PERIOD BACnetPropertyIdentifier = 349 + BACnetPropertyIdentifier_COVU_RECIPIENTS BACnetPropertyIdentifier = 350 + BACnetPropertyIdentifier_CREDENTIAL_DISABLE BACnetPropertyIdentifier = 263 + BACnetPropertyIdentifier_CREDENTIAL_STATUS BACnetPropertyIdentifier = 264 + BACnetPropertyIdentifier_CREDENTIALS BACnetPropertyIdentifier = 265 + BACnetPropertyIdentifier_CREDENTIALS_IN_ZONE BACnetPropertyIdentifier = 266 + BACnetPropertyIdentifier_CURRENT_COMMAND_PRIORITY BACnetPropertyIdentifier = 431 + BACnetPropertyIdentifier_DATABASE_REVISION BACnetPropertyIdentifier = 155 + BACnetPropertyIdentifier_DATE_LIST BACnetPropertyIdentifier = 23 + BACnetPropertyIdentifier_DAYLIGHT_SAVINGS_STATUS BACnetPropertyIdentifier = 24 + BACnetPropertyIdentifier_DAYS_REMAINING BACnetPropertyIdentifier = 267 + BACnetPropertyIdentifier_DEADBAND BACnetPropertyIdentifier = 25 + BACnetPropertyIdentifier_DEFAULT_FADE_TIME BACnetPropertyIdentifier = 374 + BACnetPropertyIdentifier_DEFAULT_RAMP_RATE BACnetPropertyIdentifier = 375 + BACnetPropertyIdentifier_DEFAULT_STEP_INCREMENT BACnetPropertyIdentifier = 376 + BACnetPropertyIdentifier_DEFAULT_SUBORDINATE_RELATIONSHIP BACnetPropertyIdentifier = 490 + BACnetPropertyIdentifier_DEFAULT_TIMEOUT BACnetPropertyIdentifier = 393 + BACnetPropertyIdentifier_DEPLOYED_PROFILE_LOCATION BACnetPropertyIdentifier = 484 + BACnetPropertyIdentifier_DERIVATIVE_CONSTANT BACnetPropertyIdentifier = 26 + BACnetPropertyIdentifier_DERIVATIVE_CONSTANT_UNITS BACnetPropertyIdentifier = 27 + BACnetPropertyIdentifier_DESCRIPTION BACnetPropertyIdentifier = 28 + BACnetPropertyIdentifier_DESCRIPTION_OF_HALT BACnetPropertyIdentifier = 29 + BACnetPropertyIdentifier_DEVICE_ADDRESS_BINDING BACnetPropertyIdentifier = 30 + BACnetPropertyIdentifier_DEVICE_TYPE BACnetPropertyIdentifier = 31 + BACnetPropertyIdentifier_DIRECT_READING BACnetPropertyIdentifier = 156 + BACnetPropertyIdentifier_DISTRIBUTION_KEY_REVISION BACnetPropertyIdentifier = 328 + BACnetPropertyIdentifier_DO_NOT_HIDE BACnetPropertyIdentifier = 329 + BACnetPropertyIdentifier_DOOR_ALARM_STATE BACnetPropertyIdentifier = 226 + BACnetPropertyIdentifier_DOOR_EXTENDED_PULSE_TIME BACnetPropertyIdentifier = 227 + BACnetPropertyIdentifier_DOOR_MEMBERS BACnetPropertyIdentifier = 228 + BACnetPropertyIdentifier_DOOR_OPEN_TOO_LONG_TIME BACnetPropertyIdentifier = 229 + BACnetPropertyIdentifier_DOOR_PULSE_TIME BACnetPropertyIdentifier = 230 + BACnetPropertyIdentifier_DOOR_STATUS BACnetPropertyIdentifier = 231 + BACnetPropertyIdentifier_DOOR_UNLOCK_DELAY_TIME BACnetPropertyIdentifier = 232 + BACnetPropertyIdentifier_DUTY_WINDOW BACnetPropertyIdentifier = 213 + BACnetPropertyIdentifier_EFFECTIVE_PERIOD BACnetPropertyIdentifier = 32 + BACnetPropertyIdentifier_EGRESS_ACTIVE BACnetPropertyIdentifier = 386 + BACnetPropertyIdentifier_EGRESS_TIME BACnetPropertyIdentifier = 377 + BACnetPropertyIdentifier_ELAPSED_ACTIVE_TIME BACnetPropertyIdentifier = 33 + BACnetPropertyIdentifier_ELEVATOR_GROUP BACnetPropertyIdentifier = 459 + BACnetPropertyIdentifier_ENABLE BACnetPropertyIdentifier = 133 + BACnetPropertyIdentifier_ENERGY_METER BACnetPropertyIdentifier = 460 + BACnetPropertyIdentifier_ENERGY_METER_REF BACnetPropertyIdentifier = 461 + BACnetPropertyIdentifier_ENTRY_POINTS BACnetPropertyIdentifier = 268 + BACnetPropertyIdentifier_ERROR_LIMIT BACnetPropertyIdentifier = 34 + BACnetPropertyIdentifier_ESCALATOR_MODE BACnetPropertyIdentifier = 462 + BACnetPropertyIdentifier_EVENT_ALGORITHM_INHIBIT BACnetPropertyIdentifier = 354 + BACnetPropertyIdentifier_EVENT_ALGORITHM_INHIBIT_REF BACnetPropertyIdentifier = 355 + BACnetPropertyIdentifier_EVENT_DETECTION_ENABLE BACnetPropertyIdentifier = 353 + BACnetPropertyIdentifier_EVENT_ENABLE BACnetPropertyIdentifier = 35 + BACnetPropertyIdentifier_EVENT_MESSAGE_TEXTS BACnetPropertyIdentifier = 351 + BACnetPropertyIdentifier_EVENT_MESSAGE_TEXTS_CONFIG BACnetPropertyIdentifier = 352 + BACnetPropertyIdentifier_EVENT_PARAMETERS BACnetPropertyIdentifier = 83 + BACnetPropertyIdentifier_EVENT_STATE BACnetPropertyIdentifier = 36 + BACnetPropertyIdentifier_EVENT_TIME_STAMPS BACnetPropertyIdentifier = 130 + BACnetPropertyIdentifier_EVENT_TYPE BACnetPropertyIdentifier = 37 + BACnetPropertyIdentifier_EXCEPTION_SCHEDULE BACnetPropertyIdentifier = 38 + BACnetPropertyIdentifier_EXECUTION_DELAY BACnetPropertyIdentifier = 368 + BACnetPropertyIdentifier_EXIT_POINTS BACnetPropertyIdentifier = 269 + BACnetPropertyIdentifier_EXPECTED_SHED_LEVEL BACnetPropertyIdentifier = 214 + BACnetPropertyIdentifier_EXPIRATION_TIME BACnetPropertyIdentifier = 270 + BACnetPropertyIdentifier_EXTENDED_TIME_ENABLE BACnetPropertyIdentifier = 271 + BACnetPropertyIdentifier_FAILED_ATTEMPT_EVENTS BACnetPropertyIdentifier = 272 + BACnetPropertyIdentifier_FAILED_ATTEMPTS BACnetPropertyIdentifier = 273 + BACnetPropertyIdentifier_FAILED_ATTEMPTS_TIME BACnetPropertyIdentifier = 274 + BACnetPropertyIdentifier_FAULT_HIGH_LIMIT BACnetPropertyIdentifier = 388 + BACnetPropertyIdentifier_FAULT_LOW_LIMIT BACnetPropertyIdentifier = 389 + BACnetPropertyIdentifier_FAULT_PARAMETERS BACnetPropertyIdentifier = 358 + BACnetPropertyIdentifier_FAULT_SIGNALS BACnetPropertyIdentifier = 463 + BACnetPropertyIdentifier_FAULT_TYPE BACnetPropertyIdentifier = 359 + BACnetPropertyIdentifier_FAULT_VALUES BACnetPropertyIdentifier = 39 + BACnetPropertyIdentifier_FD_BBMD_ADDRESS BACnetPropertyIdentifier = 418 + BACnetPropertyIdentifier_FD_SUBSCRIPTION_LIFETIME BACnetPropertyIdentifier = 419 + BACnetPropertyIdentifier_FEEDBACK_VALUE BACnetPropertyIdentifier = 40 + BACnetPropertyIdentifier_FILE_ACCESS_METHOD BACnetPropertyIdentifier = 41 + BACnetPropertyIdentifier_FILE_SIZE BACnetPropertyIdentifier = 42 + BACnetPropertyIdentifier_FILE_TYPE BACnetPropertyIdentifier = 43 + BACnetPropertyIdentifier_FIRMWARE_REVISION BACnetPropertyIdentifier = 44 + BACnetPropertyIdentifier_FLOOR_TEXT BACnetPropertyIdentifier = 464 + BACnetPropertyIdentifier_FULL_DUTY_BASELINE BACnetPropertyIdentifier = 215 + BACnetPropertyIdentifier_GLOBAL_IDENTIFIER BACnetPropertyIdentifier = 323 + BACnetPropertyIdentifier_GROUP_ID BACnetPropertyIdentifier = 465 + BACnetPropertyIdentifier_GROUP_MEMBER_NAMES BACnetPropertyIdentifier = 346 + BACnetPropertyIdentifier_GROUP_MEMBERS BACnetPropertyIdentifier = 345 + BACnetPropertyIdentifier_GROUP_MODE BACnetPropertyIdentifier = 467 + BACnetPropertyIdentifier_HIGH_LIMIT BACnetPropertyIdentifier = 45 + BACnetPropertyIdentifier_HIGHER_DECK BACnetPropertyIdentifier = 468 + BACnetPropertyIdentifier_IN_PROCESS BACnetPropertyIdentifier = 47 + BACnetPropertyIdentifier_IN_PROGRESS BACnetPropertyIdentifier = 378 + BACnetPropertyIdentifier_INACTIVE_TEXT BACnetPropertyIdentifier = 46 + BACnetPropertyIdentifier_INITIAL_TIMEOUT BACnetPropertyIdentifier = 394 + BACnetPropertyIdentifier_INPUT_REFERENCE BACnetPropertyIdentifier = 181 + BACnetPropertyIdentifier_INSTALLATION_ID BACnetPropertyIdentifier = 469 + BACnetPropertyIdentifier_INSTANCE_OF BACnetPropertyIdentifier = 48 + BACnetPropertyIdentifier_INSTANTANEOUS_POWER BACnetPropertyIdentifier = 379 + BACnetPropertyIdentifier_INTEGRAL_CONSTANT BACnetPropertyIdentifier = 49 + BACnetPropertyIdentifier_INTEGRAL_CONSTANT_UNITS BACnetPropertyIdentifier = 50 + BACnetPropertyIdentifier_INTERFACE_VALUE BACnetPropertyIdentifier = 387 + BACnetPropertyIdentifier_INTERVAL_OFFSET BACnetPropertyIdentifier = 195 + BACnetPropertyIdentifier_IP_ADDRESS BACnetPropertyIdentifier = 400 + BACnetPropertyIdentifier_IP_DEFAULT_GATEWAY BACnetPropertyIdentifier = 401 + BACnetPropertyIdentifier_IP_DHCP_ENABLE BACnetPropertyIdentifier = 402 + BACnetPropertyIdentifier_IP_DHCP_LEASE_TIME BACnetPropertyIdentifier = 403 + BACnetPropertyIdentifier_IP_DHCP_LEASE_TIME_REMAINING BACnetPropertyIdentifier = 404 + BACnetPropertyIdentifier_IP_DHCP_SERVER BACnetPropertyIdentifier = 405 + BACnetPropertyIdentifier_IP_DNS_SERVER BACnetPropertyIdentifier = 406 + BACnetPropertyIdentifier_IP_SUBNET_MASK BACnetPropertyIdentifier = 411 + BACnetPropertyIdentifier_IPV6_ADDRESS BACnetPropertyIdentifier = 436 + BACnetPropertyIdentifier_IPV6_AUTO_ADDRESSING_ENABLE BACnetPropertyIdentifier = 442 + BACnetPropertyIdentifier_IPV6_DEFAULT_GATEWAY BACnetPropertyIdentifier = 439 + BACnetPropertyIdentifier_IPV6_DHCP_LEASE_TIME BACnetPropertyIdentifier = 443 + BACnetPropertyIdentifier_IPV6_DHCP_LEASE_TIME_REMAINING BACnetPropertyIdentifier = 444 + BACnetPropertyIdentifier_IPV6_DHCP_SERVER BACnetPropertyIdentifier = 445 + BACnetPropertyIdentifier_IPV6_DNS_SERVER BACnetPropertyIdentifier = 441 + BACnetPropertyIdentifier_IPV6_PREFIX_LENGTH BACnetPropertyIdentifier = 437 + BACnetPropertyIdentifier_IPV6_ZONE_INDEX BACnetPropertyIdentifier = 446 + BACnetPropertyIdentifier_IS_UTC BACnetPropertyIdentifier = 344 + BACnetPropertyIdentifier_KEY_SETS BACnetPropertyIdentifier = 330 + BACnetPropertyIdentifier_LANDING_CALL_CONTROL BACnetPropertyIdentifier = 471 + BACnetPropertyIdentifier_LANDING_CALLS BACnetPropertyIdentifier = 470 + BACnetPropertyIdentifier_LANDING_DOOR_STATUS BACnetPropertyIdentifier = 472 + BACnetPropertyIdentifier_LAST_ACCESS_EVENT BACnetPropertyIdentifier = 275 + BACnetPropertyIdentifier_LAST_ACCESS_POINT BACnetPropertyIdentifier = 276 + BACnetPropertyIdentifier_LAST_COMMAND_TIME BACnetPropertyIdentifier = 432 + BACnetPropertyIdentifier_LAST_CREDENTIAL_ADDED BACnetPropertyIdentifier = 277 + BACnetPropertyIdentifier_LAST_CREDENTIAL_ADDED_TIME BACnetPropertyIdentifier = 278 + BACnetPropertyIdentifier_LAST_CREDENTIAL_REMOVED BACnetPropertyIdentifier = 279 + BACnetPropertyIdentifier_LAST_CREDENTIAL_REMOVED_TIME BACnetPropertyIdentifier = 280 + BACnetPropertyIdentifier_LAST_KEY_SERVER BACnetPropertyIdentifier = 331 + BACnetPropertyIdentifier_LAST_NOTIFY_RECORD BACnetPropertyIdentifier = 173 + BACnetPropertyIdentifier_LAST_PRIORITY BACnetPropertyIdentifier = 369 + BACnetPropertyIdentifier_LAST_RESTART_REASON BACnetPropertyIdentifier = 196 + BACnetPropertyIdentifier_LAST_RESTORE_TIME BACnetPropertyIdentifier = 157 + BACnetPropertyIdentifier_LAST_STATE_CHANGE BACnetPropertyIdentifier = 395 + BACnetPropertyIdentifier_LAST_USE_TIME BACnetPropertyIdentifier = 281 + BACnetPropertyIdentifier_LIFE_SAFETY_ALARM_VALUES BACnetPropertyIdentifier = 166 + BACnetPropertyIdentifier_LIGHTING_COMMAND BACnetPropertyIdentifier = 380 + BACnetPropertyIdentifier_LIGHTING_COMMAND_DEFAULT_PRIORITY BACnetPropertyIdentifier = 381 + BACnetPropertyIdentifier_LIMIT_ENABLE BACnetPropertyIdentifier = 52 + BACnetPropertyIdentifier_LIMIT_MONITORING_INTERVAL BACnetPropertyIdentifier = 182 + BACnetPropertyIdentifier_LINK_SPEED BACnetPropertyIdentifier = 420 + BACnetPropertyIdentifier_LINK_SPEED_AUTONEGOTIATE BACnetPropertyIdentifier = 422 + BACnetPropertyIdentifier_LINK_SPEEDS BACnetPropertyIdentifier = 421 + BACnetPropertyIdentifier_LIST_OF_GROUP_MEMBERS BACnetPropertyIdentifier = 53 + BACnetPropertyIdentifier_LIST_OF_OBJECT_PROPERTY_REFERENCES BACnetPropertyIdentifier = 54 + BACnetPropertyIdentifier_LOCAL_DATE BACnetPropertyIdentifier = 56 + BACnetPropertyIdentifier_LOCAL_FORWARDING_ONLY BACnetPropertyIdentifier = 360 + BACnetPropertyIdentifier_LOCAL_TIME BACnetPropertyIdentifier = 57 + BACnetPropertyIdentifier_LOCATION BACnetPropertyIdentifier = 58 + BACnetPropertyIdentifier_LOCK_STATUS BACnetPropertyIdentifier = 233 + BACnetPropertyIdentifier_LOCKOUT BACnetPropertyIdentifier = 282 + BACnetPropertyIdentifier_LOCKOUT_RELINQUISH_TIME BACnetPropertyIdentifier = 283 + BACnetPropertyIdentifier_LOG_BUFFER BACnetPropertyIdentifier = 131 + BACnetPropertyIdentifier_LOG_DEVICE_OBJECT_PROPERTY BACnetPropertyIdentifier = 132 + BACnetPropertyIdentifier_LOG_INTERVAL BACnetPropertyIdentifier = 134 + BACnetPropertyIdentifier_LOGGING_OBJECT BACnetPropertyIdentifier = 183 + BACnetPropertyIdentifier_LOGGING_RECORD BACnetPropertyIdentifier = 184 + BACnetPropertyIdentifier_LOGGING_TYPE BACnetPropertyIdentifier = 197 + BACnetPropertyIdentifier_LOW_DIFF_LIMIT BACnetPropertyIdentifier = 390 + BACnetPropertyIdentifier_LOW_LIMIT BACnetPropertyIdentifier = 59 + BACnetPropertyIdentifier_LOWER_DECK BACnetPropertyIdentifier = 473 + BACnetPropertyIdentifier_MAC_ADDRESS BACnetPropertyIdentifier = 423 + BACnetPropertyIdentifier_MACHINE_ROOM_ID BACnetPropertyIdentifier = 474 + BACnetPropertyIdentifier_MAINTENANCE_REQUIRED BACnetPropertyIdentifier = 158 + BACnetPropertyIdentifier_MAKING_CAR_CALL BACnetPropertyIdentifier = 475 + BACnetPropertyIdentifier_MANIPULATED_VARIABLE_REFERENCE BACnetPropertyIdentifier = 60 + BACnetPropertyIdentifier_MANUAL_SLAVE_ADDRESS_BINDING BACnetPropertyIdentifier = 170 + BACnetPropertyIdentifier_MASKED_ALARM_VALUES BACnetPropertyIdentifier = 234 + BACnetPropertyIdentifier_MAX_ACTUAL_VALUE BACnetPropertyIdentifier = 382 + BACnetPropertyIdentifier_MAX_APDU_LENGTH_ACCEPTED BACnetPropertyIdentifier = 62 + BACnetPropertyIdentifier_MAX_FAILED_ATTEMPTS BACnetPropertyIdentifier = 285 + BACnetPropertyIdentifier_MAX_INFO_FRAMES BACnetPropertyIdentifier = 63 + BACnetPropertyIdentifier_MAX_MASTER BACnetPropertyIdentifier = 64 + BACnetPropertyIdentifier_MAX_PRES_VALUE BACnetPropertyIdentifier = 65 + BACnetPropertyIdentifier_MAX_SEGMENTS_ACCEPTED BACnetPropertyIdentifier = 167 + BACnetPropertyIdentifier_MAXIMUM_OUTPUT BACnetPropertyIdentifier = 61 + BACnetPropertyIdentifier_MAXIMUM_VALUE BACnetPropertyIdentifier = 135 + BACnetPropertyIdentifier_MAXIMUM_VALUE_TIMESTAMP BACnetPropertyIdentifier = 149 + BACnetPropertyIdentifier_MEMBER_OF BACnetPropertyIdentifier = 159 + BACnetPropertyIdentifier_MEMBER_STATUS_FLAGS BACnetPropertyIdentifier = 347 + BACnetPropertyIdentifier_MEMBERS BACnetPropertyIdentifier = 286 + BACnetPropertyIdentifier_MIN_ACTUAL_VALUE BACnetPropertyIdentifier = 383 + BACnetPropertyIdentifier_MIN_PRES_VALUE BACnetPropertyIdentifier = 69 + BACnetPropertyIdentifier_MINIMUM_OFF_TIME BACnetPropertyIdentifier = 66 + BACnetPropertyIdentifier_MINIMUM_ON_TIME BACnetPropertyIdentifier = 67 + BACnetPropertyIdentifier_MINIMUM_OUTPUT BACnetPropertyIdentifier = 68 + BACnetPropertyIdentifier_MINIMUM_VALUE BACnetPropertyIdentifier = 136 + BACnetPropertyIdentifier_MINIMUM_VALUE_TIMESTAMP BACnetPropertyIdentifier = 150 + BACnetPropertyIdentifier_MODE BACnetPropertyIdentifier = 160 + BACnetPropertyIdentifier_MODEL_NAME BACnetPropertyIdentifier = 70 + BACnetPropertyIdentifier_MODIFICATION_DATE BACnetPropertyIdentifier = 71 + BACnetPropertyIdentifier_MUSTER_POINT BACnetPropertyIdentifier = 287 + BACnetPropertyIdentifier_NEGATIVE_ACCESS_RULES BACnetPropertyIdentifier = 288 + BACnetPropertyIdentifier_NETWORK_ACCESS_SECURITY_POLICIES BACnetPropertyIdentifier = 332 + BACnetPropertyIdentifier_NETWORK_INTERFACE_NAME BACnetPropertyIdentifier = 424 + BACnetPropertyIdentifier_NETWORK_NUMBER BACnetPropertyIdentifier = 425 + BACnetPropertyIdentifier_NETWORK_NUMBER_QUALITY BACnetPropertyIdentifier = 426 + BACnetPropertyIdentifier_NETWORK_TYPE BACnetPropertyIdentifier = 427 + BACnetPropertyIdentifier_NEXT_STOPPING_FLOOR BACnetPropertyIdentifier = 476 + BACnetPropertyIdentifier_NODE_SUBTYPE BACnetPropertyIdentifier = 207 + BACnetPropertyIdentifier_NODE_TYPE BACnetPropertyIdentifier = 208 + BACnetPropertyIdentifier_NOTIFICATION_CLASS BACnetPropertyIdentifier = 17 + BACnetPropertyIdentifier_NOTIFICATION_THRESHOLD BACnetPropertyIdentifier = 137 + BACnetPropertyIdentifier_NOTIFY_TYPE BACnetPropertyIdentifier = 72 + BACnetPropertyIdentifier_NUMBER_OF_APDU_RETRIES BACnetPropertyIdentifier = 73 + BACnetPropertyIdentifier_NUMBER_OF_AUTHENTICATION_POLICIES BACnetPropertyIdentifier = 289 + BACnetPropertyIdentifier_NUMBER_OF_STATES BACnetPropertyIdentifier = 74 + BACnetPropertyIdentifier_OBJECT_IDENTIFIER BACnetPropertyIdentifier = 75 + BACnetPropertyIdentifier_OBJECT_LIST BACnetPropertyIdentifier = 76 + BACnetPropertyIdentifier_OBJECT_NAME BACnetPropertyIdentifier = 77 + BACnetPropertyIdentifier_OBJECT_PROPERTY_REFERENCE BACnetPropertyIdentifier = 78 + BACnetPropertyIdentifier_OBJECT_TYPE BACnetPropertyIdentifier = 79 + BACnetPropertyIdentifier_OCCUPANCY_COUNT BACnetPropertyIdentifier = 290 + BACnetPropertyIdentifier_OCCUPANCY_COUNT_ADJUST BACnetPropertyIdentifier = 291 + BACnetPropertyIdentifier_OCCUPANCY_COUNT_ENABLE BACnetPropertyIdentifier = 292 + BACnetPropertyIdentifier_OCCUPANCY_LOWER_LIMIT BACnetPropertyIdentifier = 294 + BACnetPropertyIdentifier_OCCUPANCY_LOWER_LIMIT_ENFORCED BACnetPropertyIdentifier = 295 + BACnetPropertyIdentifier_OCCUPANCY_STATE BACnetPropertyIdentifier = 296 + BACnetPropertyIdentifier_OCCUPANCY_UPPER_LIMIT BACnetPropertyIdentifier = 297 + BACnetPropertyIdentifier_OCCUPANCY_UPPER_LIMIT_ENFORCED BACnetPropertyIdentifier = 298 + BACnetPropertyIdentifier_OPERATION_DIRECTION BACnetPropertyIdentifier = 477 + BACnetPropertyIdentifier_OPERATION_EXPECTED BACnetPropertyIdentifier = 161 + BACnetPropertyIdentifier_OPTIONAL BACnetPropertyIdentifier = 80 + BACnetPropertyIdentifier_OUT_OF_SERVICE BACnetPropertyIdentifier = 81 + BACnetPropertyIdentifier_OUTPUT_UNITS BACnetPropertyIdentifier = 82 + BACnetPropertyIdentifier_PACKET_REORDER_TIME BACnetPropertyIdentifier = 333 + BACnetPropertyIdentifier_PASSBACK_MODE BACnetPropertyIdentifier = 300 + BACnetPropertyIdentifier_PASSBACK_TIMEOUT BACnetPropertyIdentifier = 301 + BACnetPropertyIdentifier_PASSENGER_ALARM BACnetPropertyIdentifier = 478 + BACnetPropertyIdentifier_POLARITY BACnetPropertyIdentifier = 84 + BACnetPropertyIdentifier_PORT_FILTER BACnetPropertyIdentifier = 363 + BACnetPropertyIdentifier_POSITIVE_ACCESS_RULES BACnetPropertyIdentifier = 302 + BACnetPropertyIdentifier_POWER BACnetPropertyIdentifier = 384 + BACnetPropertyIdentifier_POWER_MODE BACnetPropertyIdentifier = 479 + BACnetPropertyIdentifier_PRESCALE BACnetPropertyIdentifier = 185 + BACnetPropertyIdentifier_PRESENT_VALUE BACnetPropertyIdentifier = 85 + BACnetPropertyIdentifier_PRIORITY BACnetPropertyIdentifier = 86 + BACnetPropertyIdentifier_PRIORITY_ARRAY BACnetPropertyIdentifier = 87 + BACnetPropertyIdentifier_PRIORITY_FOR_WRITING BACnetPropertyIdentifier = 88 + BACnetPropertyIdentifier_PROCESS_IDENTIFIER BACnetPropertyIdentifier = 89 + BACnetPropertyIdentifier_PROCESS_IDENTIFIER_FILTER BACnetPropertyIdentifier = 361 + BACnetPropertyIdentifier_PROFILE_LOCATION BACnetPropertyIdentifier = 485 + BACnetPropertyIdentifier_PROFILE_NAME BACnetPropertyIdentifier = 168 + BACnetPropertyIdentifier_PROGRAM_CHANGE BACnetPropertyIdentifier = 90 + BACnetPropertyIdentifier_PROGRAM_LOCATION BACnetPropertyIdentifier = 91 + BACnetPropertyIdentifier_PROGRAM_STATE BACnetPropertyIdentifier = 92 + BACnetPropertyIdentifier_PROPERTY_LIST BACnetPropertyIdentifier = 371 + BACnetPropertyIdentifier_PROPORTIONAL_CONSTANT BACnetPropertyIdentifier = 93 + BACnetPropertyIdentifier_PROPORTIONAL_CONSTANT_UNITS BACnetPropertyIdentifier = 94 + BACnetPropertyIdentifier_PROTOCOL_LEVEL BACnetPropertyIdentifier = 482 + BACnetPropertyIdentifier_PROTOCOL_CONFORMANCE_CLASS BACnetPropertyIdentifier = 95 + BACnetPropertyIdentifier_PROTOCOL_OBJECT_TYPES_SUPPORTED BACnetPropertyIdentifier = 96 + BACnetPropertyIdentifier_PROTOCOL_REVISION BACnetPropertyIdentifier = 139 + BACnetPropertyIdentifier_PROTOCOL_SERVICES_SUPPORTED BACnetPropertyIdentifier = 97 + BACnetPropertyIdentifier_PROTOCOL_VERSION BACnetPropertyIdentifier = 98 + BACnetPropertyIdentifier_PULSE_RATE BACnetPropertyIdentifier = 186 + BACnetPropertyIdentifier_READ_ONLY BACnetPropertyIdentifier = 99 + BACnetPropertyIdentifier_REASON_FOR_DISABLE BACnetPropertyIdentifier = 303 + BACnetPropertyIdentifier_REASON_FOR_HALT BACnetPropertyIdentifier = 100 + BACnetPropertyIdentifier_RECIPIENT_LIST BACnetPropertyIdentifier = 102 + BACnetPropertyIdentifier_RECORD_COUNT BACnetPropertyIdentifier = 141 + BACnetPropertyIdentifier_RECORDS_SINCE_NOTIFICATION BACnetPropertyIdentifier = 140 + BACnetPropertyIdentifier_REFERENCE_PORT BACnetPropertyIdentifier = 483 + BACnetPropertyIdentifier_REGISTERED_CAR_CALL BACnetPropertyIdentifier = 480 + BACnetPropertyIdentifier_RELIABILITY BACnetPropertyIdentifier = 103 + BACnetPropertyIdentifier_RELIABILITY_EVALUATION_INHIBIT BACnetPropertyIdentifier = 357 + BACnetPropertyIdentifier_RELINQUISH_DEFAULT BACnetPropertyIdentifier = 104 + BACnetPropertyIdentifier_REPRESENTS BACnetPropertyIdentifier = 491 + BACnetPropertyIdentifier_REQUESTED_SHED_LEVEL BACnetPropertyIdentifier = 218 + BACnetPropertyIdentifier_REQUESTED_UPDATE_INTERVAL BACnetPropertyIdentifier = 348 + BACnetPropertyIdentifier_REQUIRED BACnetPropertyIdentifier = 105 + BACnetPropertyIdentifier_RESOLUTION BACnetPropertyIdentifier = 106 + BACnetPropertyIdentifier_RESTART_NOTIFICATION_RECIPIENTS BACnetPropertyIdentifier = 202 + BACnetPropertyIdentifier_RESTORE_COMPLETION_TIME BACnetPropertyIdentifier = 340 + BACnetPropertyIdentifier_RESTORE_PREPARATION_TIME BACnetPropertyIdentifier = 341 + BACnetPropertyIdentifier_ROUTING_TABLE BACnetPropertyIdentifier = 428 + BACnetPropertyIdentifier_SCALE BACnetPropertyIdentifier = 187 + BACnetPropertyIdentifier_SCALE_FACTOR BACnetPropertyIdentifier = 188 + BACnetPropertyIdentifier_SCHEDULE_DEFAULT BACnetPropertyIdentifier = 174 + BACnetPropertyIdentifier_SECURED_STATUS BACnetPropertyIdentifier = 235 + BACnetPropertyIdentifier_SECURITY_PDU_TIMEOUT BACnetPropertyIdentifier = 334 + BACnetPropertyIdentifier_SECURITY_TIME_WINDOW BACnetPropertyIdentifier = 335 + BACnetPropertyIdentifier_SEGMENTATION_SUPPORTED BACnetPropertyIdentifier = 107 + BACnetPropertyIdentifier_SERIAL_NUMBER BACnetPropertyIdentifier = 372 + BACnetPropertyIdentifier_SETPOINT BACnetPropertyIdentifier = 108 + BACnetPropertyIdentifier_SETPOINT_REFERENCE BACnetPropertyIdentifier = 109 + BACnetPropertyIdentifier_SETTING BACnetPropertyIdentifier = 162 + BACnetPropertyIdentifier_SHED_DURATION BACnetPropertyIdentifier = 219 + BACnetPropertyIdentifier_SHED_LEVEL_DESCRIPTIONS BACnetPropertyIdentifier = 220 + BACnetPropertyIdentifier_SHED_LEVELS BACnetPropertyIdentifier = 221 + BACnetPropertyIdentifier_SILENCED BACnetPropertyIdentifier = 163 + BACnetPropertyIdentifier_SLAVE_ADDRESS_BINDING BACnetPropertyIdentifier = 171 + BACnetPropertyIdentifier_SLAVE_PROXY_ENABLE BACnetPropertyIdentifier = 172 + BACnetPropertyIdentifier_START_TIME BACnetPropertyIdentifier = 142 + BACnetPropertyIdentifier_STATE_CHANGE_VALUES BACnetPropertyIdentifier = 396 + BACnetPropertyIdentifier_STATE_DESCRIPTION BACnetPropertyIdentifier = 222 + BACnetPropertyIdentifier_STATE_TEXT BACnetPropertyIdentifier = 110 + BACnetPropertyIdentifier_STATUS_FLAGS BACnetPropertyIdentifier = 111 + BACnetPropertyIdentifier_STOP_TIME BACnetPropertyIdentifier = 143 + BACnetPropertyIdentifier_STOP_WHEN_FULL BACnetPropertyIdentifier = 144 + BACnetPropertyIdentifier_STRIKE_COUNT BACnetPropertyIdentifier = 391 + BACnetPropertyIdentifier_STRUCTURED_OBJECT_LIST BACnetPropertyIdentifier = 209 + BACnetPropertyIdentifier_SUBORDINATE_ANNOTATIONS BACnetPropertyIdentifier = 210 + BACnetPropertyIdentifier_SUBORDINATE_LIST BACnetPropertyIdentifier = 211 + BACnetPropertyIdentifier_SUBORDINATE_NODE_TYPES BACnetPropertyIdentifier = 487 + BACnetPropertyIdentifier_SUBORDINATE_RELATIONSHIPS BACnetPropertyIdentifier = 489 + BACnetPropertyIdentifier_SUBORDINATE_TAGS BACnetPropertyIdentifier = 488 + BACnetPropertyIdentifier_SUBSCRIBED_RECIPIENTS BACnetPropertyIdentifier = 362 + BACnetPropertyIdentifier_SUPPORTED_FORMAT_CLASSES BACnetPropertyIdentifier = 305 + BACnetPropertyIdentifier_SUPPORTED_FORMATS BACnetPropertyIdentifier = 304 + BACnetPropertyIdentifier_SUPPORTED_SECURITY_ALGORITHMS BACnetPropertyIdentifier = 336 + BACnetPropertyIdentifier_SYSTEM_STATUS BACnetPropertyIdentifier = 112 + BACnetPropertyIdentifier_TAGS BACnetPropertyIdentifier = 486 + BACnetPropertyIdentifier_THREAT_AUTHORITY BACnetPropertyIdentifier = 306 + BACnetPropertyIdentifier_THREAT_LEVEL BACnetPropertyIdentifier = 307 + BACnetPropertyIdentifier_TIME_DELAY BACnetPropertyIdentifier = 113 + BACnetPropertyIdentifier_TIME_DELAY_NORMAL BACnetPropertyIdentifier = 356 + BACnetPropertyIdentifier_TIME_OF_ACTIVE_TIME_RESET BACnetPropertyIdentifier = 114 + BACnetPropertyIdentifier_TIME_OF_DEVICE_RESTART BACnetPropertyIdentifier = 203 + BACnetPropertyIdentifier_TIME_OF_STATE_COUNT_RESET BACnetPropertyIdentifier = 115 + BACnetPropertyIdentifier_TIME_OF_STRIKE_COUNT_RESET BACnetPropertyIdentifier = 392 + BACnetPropertyIdentifier_TIME_SYNCHRONIZATION_INTERVAL BACnetPropertyIdentifier = 204 + BACnetPropertyIdentifier_TIME_SYNCHRONIZATION_RECIPIENTS BACnetPropertyIdentifier = 116 + BACnetPropertyIdentifier_TIMER_RUNNING BACnetPropertyIdentifier = 397 + BACnetPropertyIdentifier_TIMER_STATE BACnetPropertyIdentifier = 398 + BACnetPropertyIdentifier_TOTAL_RECORD_COUNT BACnetPropertyIdentifier = 145 + BACnetPropertyIdentifier_TRACE_FLAG BACnetPropertyIdentifier = 308 + BACnetPropertyIdentifier_TRACKING_VALUE BACnetPropertyIdentifier = 164 + BACnetPropertyIdentifier_TRANSACTION_NOTIFICATION_CLASS BACnetPropertyIdentifier = 309 + BACnetPropertyIdentifier_TRANSITION BACnetPropertyIdentifier = 385 + BACnetPropertyIdentifier_TRIGGER BACnetPropertyIdentifier = 205 + BACnetPropertyIdentifier_UNITS BACnetPropertyIdentifier = 117 + BACnetPropertyIdentifier_UPDATE_INTERVAL BACnetPropertyIdentifier = 118 + BACnetPropertyIdentifier_UPDATE_KEY_SET_TIMEOUT BACnetPropertyIdentifier = 337 + BACnetPropertyIdentifier_UPDATE_TIME BACnetPropertyIdentifier = 189 + BACnetPropertyIdentifier_USER_EXTERNAL_IDENTIFIER BACnetPropertyIdentifier = 310 + BACnetPropertyIdentifier_USER_INFORMATION_REFERENCE BACnetPropertyIdentifier = 311 + BACnetPropertyIdentifier_USER_NAME BACnetPropertyIdentifier = 317 + BACnetPropertyIdentifier_USER_TYPE BACnetPropertyIdentifier = 318 + BACnetPropertyIdentifier_USES_REMAINING BACnetPropertyIdentifier = 319 + BACnetPropertyIdentifier_UTC_OFFSET BACnetPropertyIdentifier = 119 BACnetPropertyIdentifier_UTC_TIME_SYNCHRONIZATION_RECIPIENTS BACnetPropertyIdentifier = 206 - BACnetPropertyIdentifier_VALID_SAMPLES BACnetPropertyIdentifier = 146 - BACnetPropertyIdentifier_VALUE_BEFORE_CHANGE BACnetPropertyIdentifier = 190 - BACnetPropertyIdentifier_VALUE_CHANGE_TIME BACnetPropertyIdentifier = 192 - BACnetPropertyIdentifier_VALUE_SET BACnetPropertyIdentifier = 191 - BACnetPropertyIdentifier_VALUE_SOURCE BACnetPropertyIdentifier = 433 - BACnetPropertyIdentifier_VALUE_SOURCE_ARRAY BACnetPropertyIdentifier = 434 - BACnetPropertyIdentifier_VARIANCE_VALUE BACnetPropertyIdentifier = 151 - BACnetPropertyIdentifier_VENDOR_IDENTIFIER BACnetPropertyIdentifier = 120 - BACnetPropertyIdentifier_VENDOR_NAME BACnetPropertyIdentifier = 121 - BACnetPropertyIdentifier_VERIFICATION_TIME BACnetPropertyIdentifier = 326 - BACnetPropertyIdentifier_VIRTUAL_MAC_ADDRESS_TABLE BACnetPropertyIdentifier = 429 - BACnetPropertyIdentifier_VT_CLASSES_SUPPORTED BACnetPropertyIdentifier = 122 - BACnetPropertyIdentifier_WEEKLY_SCHEDULE BACnetPropertyIdentifier = 123 - BACnetPropertyIdentifier_WINDOW_INTERVAL BACnetPropertyIdentifier = 147 - BACnetPropertyIdentifier_WINDOW_SAMPLES BACnetPropertyIdentifier = 148 - BACnetPropertyIdentifier_WRITE_STATUS BACnetPropertyIdentifier = 370 - BACnetPropertyIdentifier_ZONE_FROM BACnetPropertyIdentifier = 320 - BACnetPropertyIdentifier_ZONE_MEMBERS BACnetPropertyIdentifier = 165 - BACnetPropertyIdentifier_ZONE_TO BACnetPropertyIdentifier = 321 - BACnetPropertyIdentifier_VENDOR_PROPRIETARY_VALUE BACnetPropertyIdentifier = 9999 + BACnetPropertyIdentifier_VALID_SAMPLES BACnetPropertyIdentifier = 146 + BACnetPropertyIdentifier_VALUE_BEFORE_CHANGE BACnetPropertyIdentifier = 190 + BACnetPropertyIdentifier_VALUE_CHANGE_TIME BACnetPropertyIdentifier = 192 + BACnetPropertyIdentifier_VALUE_SET BACnetPropertyIdentifier = 191 + BACnetPropertyIdentifier_VALUE_SOURCE BACnetPropertyIdentifier = 433 + BACnetPropertyIdentifier_VALUE_SOURCE_ARRAY BACnetPropertyIdentifier = 434 + BACnetPropertyIdentifier_VARIANCE_VALUE BACnetPropertyIdentifier = 151 + BACnetPropertyIdentifier_VENDOR_IDENTIFIER BACnetPropertyIdentifier = 120 + BACnetPropertyIdentifier_VENDOR_NAME BACnetPropertyIdentifier = 121 + BACnetPropertyIdentifier_VERIFICATION_TIME BACnetPropertyIdentifier = 326 + BACnetPropertyIdentifier_VIRTUAL_MAC_ADDRESS_TABLE BACnetPropertyIdentifier = 429 + BACnetPropertyIdentifier_VT_CLASSES_SUPPORTED BACnetPropertyIdentifier = 122 + BACnetPropertyIdentifier_WEEKLY_SCHEDULE BACnetPropertyIdentifier = 123 + BACnetPropertyIdentifier_WINDOW_INTERVAL BACnetPropertyIdentifier = 147 + BACnetPropertyIdentifier_WINDOW_SAMPLES BACnetPropertyIdentifier = 148 + BACnetPropertyIdentifier_WRITE_STATUS BACnetPropertyIdentifier = 370 + BACnetPropertyIdentifier_ZONE_FROM BACnetPropertyIdentifier = 320 + BACnetPropertyIdentifier_ZONE_MEMBERS BACnetPropertyIdentifier = 165 + BACnetPropertyIdentifier_ZONE_TO BACnetPropertyIdentifier = 321 + BACnetPropertyIdentifier_VENDOR_PROPRIETARY_VALUE BACnetPropertyIdentifier = 9999 ) var BACnetPropertyIdentifierValues []BACnetPropertyIdentifier func init() { _ = errors.New - BACnetPropertyIdentifierValues = []BACnetPropertyIdentifier{ + BACnetPropertyIdentifierValues = []BACnetPropertyIdentifier { BACnetPropertyIdentifier_ABSENTEE_LIMIT, BACnetPropertyIdentifier_ACCEPTED_MODES, BACnetPropertyIdentifier_ACCESS_ALARM_EVENTS, @@ -963,922 +963,922 @@ func init() { func BACnetPropertyIdentifierByValue(value uint32) (enum BACnetPropertyIdentifier, ok bool) { switch value { - case 0: - return BACnetPropertyIdentifier_ACKED_TRANSITIONS, true - case 1: - return BACnetPropertyIdentifier_ACK_REQUIRED, true - case 10: - return BACnetPropertyIdentifier_APDU_SEGMENT_TIMEOUT, true - case 100: - return BACnetPropertyIdentifier_REASON_FOR_HALT, true - case 102: - return BACnetPropertyIdentifier_RECIPIENT_LIST, true - case 103: - return BACnetPropertyIdentifier_RELIABILITY, true - case 104: - return BACnetPropertyIdentifier_RELINQUISH_DEFAULT, true - case 105: - return BACnetPropertyIdentifier_REQUIRED, true - case 106: - return BACnetPropertyIdentifier_RESOLUTION, true - case 107: - return BACnetPropertyIdentifier_SEGMENTATION_SUPPORTED, true - case 108: - return BACnetPropertyIdentifier_SETPOINT, true - case 109: - return BACnetPropertyIdentifier_SETPOINT_REFERENCE, true - case 11: - return BACnetPropertyIdentifier_APDU_TIMEOUT, true - case 110: - return BACnetPropertyIdentifier_STATE_TEXT, true - case 111: - return BACnetPropertyIdentifier_STATUS_FLAGS, true - case 112: - return BACnetPropertyIdentifier_SYSTEM_STATUS, true - case 113: - return BACnetPropertyIdentifier_TIME_DELAY, true - case 114: - return BACnetPropertyIdentifier_TIME_OF_ACTIVE_TIME_RESET, true - case 115: - return BACnetPropertyIdentifier_TIME_OF_STATE_COUNT_RESET, true - case 116: - return BACnetPropertyIdentifier_TIME_SYNCHRONIZATION_RECIPIENTS, true - case 117: - return BACnetPropertyIdentifier_UNITS, true - case 118: - return BACnetPropertyIdentifier_UPDATE_INTERVAL, true - case 119: - return BACnetPropertyIdentifier_UTC_OFFSET, true - case 12: - return BACnetPropertyIdentifier_APPLICATION_SOFTWARE_VERSION, true - case 120: - return BACnetPropertyIdentifier_VENDOR_IDENTIFIER, true - case 121: - return BACnetPropertyIdentifier_VENDOR_NAME, true - case 122: - return BACnetPropertyIdentifier_VT_CLASSES_SUPPORTED, true - case 123: - return BACnetPropertyIdentifier_WEEKLY_SCHEDULE, true - case 124: - return BACnetPropertyIdentifier_ATTEMPTED_SAMPLES, true - case 125: - return BACnetPropertyIdentifier_AVERAGE_VALUE, true - case 126: - return BACnetPropertyIdentifier_BUFFER_SIZE, true - case 127: - return BACnetPropertyIdentifier_CLIENT_COV_INCREMENT, true - case 128: - return BACnetPropertyIdentifier_COV_RESUBSCRIPTION_INTERVAL, true - case 13: - return BACnetPropertyIdentifier_ARCHIVE, true - case 130: - return BACnetPropertyIdentifier_EVENT_TIME_STAMPS, true - case 131: - return BACnetPropertyIdentifier_LOG_BUFFER, true - case 132: - return BACnetPropertyIdentifier_LOG_DEVICE_OBJECT_PROPERTY, true - case 133: - return BACnetPropertyIdentifier_ENABLE, true - case 134: - return BACnetPropertyIdentifier_LOG_INTERVAL, true - case 135: - return BACnetPropertyIdentifier_MAXIMUM_VALUE, true - case 136: - return BACnetPropertyIdentifier_MINIMUM_VALUE, true - case 137: - return BACnetPropertyIdentifier_NOTIFICATION_THRESHOLD, true - case 139: - return BACnetPropertyIdentifier_PROTOCOL_REVISION, true - case 14: - return BACnetPropertyIdentifier_BIAS, true - case 140: - return BACnetPropertyIdentifier_RECORDS_SINCE_NOTIFICATION, true - case 141: - return BACnetPropertyIdentifier_RECORD_COUNT, true - case 142: - return BACnetPropertyIdentifier_START_TIME, true - case 143: - return BACnetPropertyIdentifier_STOP_TIME, true - case 144: - return BACnetPropertyIdentifier_STOP_WHEN_FULL, true - case 145: - return BACnetPropertyIdentifier_TOTAL_RECORD_COUNT, true - case 146: - return BACnetPropertyIdentifier_VALID_SAMPLES, true - case 147: - return BACnetPropertyIdentifier_WINDOW_INTERVAL, true - case 148: - return BACnetPropertyIdentifier_WINDOW_SAMPLES, true - case 149: - return BACnetPropertyIdentifier_MAXIMUM_VALUE_TIMESTAMP, true - case 15: - return BACnetPropertyIdentifier_CHANGE_OF_STATE_COUNT, true - case 150: - return BACnetPropertyIdentifier_MINIMUM_VALUE_TIMESTAMP, true - case 151: - return BACnetPropertyIdentifier_VARIANCE_VALUE, true - case 152: - return BACnetPropertyIdentifier_ACTIVE_COV_SUBSCRIPTIONS, true - case 153: - return BACnetPropertyIdentifier_BACKUP_FAILURE_TIMEOUT, true - case 154: - return BACnetPropertyIdentifier_CONFIGURATION_FILES, true - case 155: - return BACnetPropertyIdentifier_DATABASE_REVISION, true - case 156: - return BACnetPropertyIdentifier_DIRECT_READING, true - case 157: - return BACnetPropertyIdentifier_LAST_RESTORE_TIME, true - case 158: - return BACnetPropertyIdentifier_MAINTENANCE_REQUIRED, true - case 159: - return BACnetPropertyIdentifier_MEMBER_OF, true - case 16: - return BACnetPropertyIdentifier_CHANGE_OF_STATE_TIME, true - case 160: - return BACnetPropertyIdentifier_MODE, true - case 161: - return BACnetPropertyIdentifier_OPERATION_EXPECTED, true - case 162: - return BACnetPropertyIdentifier_SETTING, true - case 163: - return BACnetPropertyIdentifier_SILENCED, true - case 164: - return BACnetPropertyIdentifier_TRACKING_VALUE, true - case 165: - return BACnetPropertyIdentifier_ZONE_MEMBERS, true - case 166: - return BACnetPropertyIdentifier_LIFE_SAFETY_ALARM_VALUES, true - case 167: - return BACnetPropertyIdentifier_MAX_SEGMENTS_ACCEPTED, true - case 168: - return BACnetPropertyIdentifier_PROFILE_NAME, true - case 169: - return BACnetPropertyIdentifier_AUTO_SLAVE_DISCOVERY, true - case 17: - return BACnetPropertyIdentifier_NOTIFICATION_CLASS, true - case 170: - return BACnetPropertyIdentifier_MANUAL_SLAVE_ADDRESS_BINDING, true - case 171: - return BACnetPropertyIdentifier_SLAVE_ADDRESS_BINDING, true - case 172: - return BACnetPropertyIdentifier_SLAVE_PROXY_ENABLE, true - case 173: - return BACnetPropertyIdentifier_LAST_NOTIFY_RECORD, true - case 174: - return BACnetPropertyIdentifier_SCHEDULE_DEFAULT, true - case 175: - return BACnetPropertyIdentifier_ACCEPTED_MODES, true - case 176: - return BACnetPropertyIdentifier_ADJUST_VALUE, true - case 177: - return BACnetPropertyIdentifier_COUNT, true - case 178: - return BACnetPropertyIdentifier_COUNT_BEFORE_CHANGE, true - case 179: - return BACnetPropertyIdentifier_COUNT_CHANGE_TIME, true - case 180: - return BACnetPropertyIdentifier_COV_PERIOD, true - case 181: - return BACnetPropertyIdentifier_INPUT_REFERENCE, true - case 182: - return BACnetPropertyIdentifier_LIMIT_MONITORING_INTERVAL, true - case 183: - return BACnetPropertyIdentifier_LOGGING_OBJECT, true - case 184: - return BACnetPropertyIdentifier_LOGGING_RECORD, true - case 185: - return BACnetPropertyIdentifier_PRESCALE, true - case 186: - return BACnetPropertyIdentifier_PULSE_RATE, true - case 187: - return BACnetPropertyIdentifier_SCALE, true - case 188: - return BACnetPropertyIdentifier_SCALE_FACTOR, true - case 189: - return BACnetPropertyIdentifier_UPDATE_TIME, true - case 19: - return BACnetPropertyIdentifier_CONTROLLED_VARIABLE_REFERENCE, true - case 190: - return BACnetPropertyIdentifier_VALUE_BEFORE_CHANGE, true - case 191: - return BACnetPropertyIdentifier_VALUE_SET, true - case 192: - return BACnetPropertyIdentifier_VALUE_CHANGE_TIME, true - case 193: - return BACnetPropertyIdentifier_ALIGN_INTERVALS, true - case 195: - return BACnetPropertyIdentifier_INTERVAL_OFFSET, true - case 196: - return BACnetPropertyIdentifier_LAST_RESTART_REASON, true - case 197: - return BACnetPropertyIdentifier_LOGGING_TYPE, true - case 2: - return BACnetPropertyIdentifier_ACTION, true - case 20: - return BACnetPropertyIdentifier_CONTROLLED_VARIABLE_UNITS, true - case 202: - return BACnetPropertyIdentifier_RESTART_NOTIFICATION_RECIPIENTS, true - case 203: - return BACnetPropertyIdentifier_TIME_OF_DEVICE_RESTART, true - case 204: - return BACnetPropertyIdentifier_TIME_SYNCHRONIZATION_INTERVAL, true - case 205: - return BACnetPropertyIdentifier_TRIGGER, true - case 206: - return BACnetPropertyIdentifier_UTC_TIME_SYNCHRONIZATION_RECIPIENTS, true - case 207: - return BACnetPropertyIdentifier_NODE_SUBTYPE, true - case 208: - return BACnetPropertyIdentifier_NODE_TYPE, true - case 209: - return BACnetPropertyIdentifier_STRUCTURED_OBJECT_LIST, true - case 21: - return BACnetPropertyIdentifier_CONTROLLED_VARIABLE_VALUE, true - case 210: - return BACnetPropertyIdentifier_SUBORDINATE_ANNOTATIONS, true - case 211: - return BACnetPropertyIdentifier_SUBORDINATE_LIST, true - case 212: - return BACnetPropertyIdentifier_ACTUAL_SHED_LEVEL, true - case 213: - return BACnetPropertyIdentifier_DUTY_WINDOW, true - case 214: - return BACnetPropertyIdentifier_EXPECTED_SHED_LEVEL, true - case 215: - return BACnetPropertyIdentifier_FULL_DUTY_BASELINE, true - case 218: - return BACnetPropertyIdentifier_REQUESTED_SHED_LEVEL, true - case 219: - return BACnetPropertyIdentifier_SHED_DURATION, true - case 22: - return BACnetPropertyIdentifier_COV_INCREMENT, true - case 220: - return BACnetPropertyIdentifier_SHED_LEVEL_DESCRIPTIONS, true - case 221: - return BACnetPropertyIdentifier_SHED_LEVELS, true - case 222: - return BACnetPropertyIdentifier_STATE_DESCRIPTION, true - case 226: - return BACnetPropertyIdentifier_DOOR_ALARM_STATE, true - case 227: - return BACnetPropertyIdentifier_DOOR_EXTENDED_PULSE_TIME, true - case 228: - return BACnetPropertyIdentifier_DOOR_MEMBERS, true - case 229: - return BACnetPropertyIdentifier_DOOR_OPEN_TOO_LONG_TIME, true - case 23: - return BACnetPropertyIdentifier_DATE_LIST, true - case 230: - return BACnetPropertyIdentifier_DOOR_PULSE_TIME, true - case 231: - return BACnetPropertyIdentifier_DOOR_STATUS, true - case 232: - return BACnetPropertyIdentifier_DOOR_UNLOCK_DELAY_TIME, true - case 233: - return BACnetPropertyIdentifier_LOCK_STATUS, true - case 234: - return BACnetPropertyIdentifier_MASKED_ALARM_VALUES, true - case 235: - return BACnetPropertyIdentifier_SECURED_STATUS, true - case 24: - return BACnetPropertyIdentifier_DAYLIGHT_SAVINGS_STATUS, true - case 244: - return BACnetPropertyIdentifier_ABSENTEE_LIMIT, true - case 245: - return BACnetPropertyIdentifier_ACCESS_ALARM_EVENTS, true - case 246: - return BACnetPropertyIdentifier_ACCESS_DOORS, true - case 247: - return BACnetPropertyIdentifier_ACCESS_EVENT, true - case 248: - return BACnetPropertyIdentifier_ACCESS_EVENT_AUTHENTICATION_FACTOR, true - case 249: - return BACnetPropertyIdentifier_ACCESS_EVENT_CREDENTIAL, true - case 25: - return BACnetPropertyIdentifier_DEADBAND, true - case 250: - return BACnetPropertyIdentifier_ACCESS_EVENT_TIME, true - case 251: - return BACnetPropertyIdentifier_ACCESS_TRANSACTION_EVENTS, true - case 252: - return BACnetPropertyIdentifier_ACCOMPANIMENT, true - case 253: - return BACnetPropertyIdentifier_ACCOMPANIMENT_TIME, true - case 254: - return BACnetPropertyIdentifier_ACTIVATION_TIME, true - case 255: - return BACnetPropertyIdentifier_ACTIVE_AUTHENTICATION_POLICY, true - case 256: - return BACnetPropertyIdentifier_ASSIGNED_ACCESS_RIGHTS, true - case 257: - return BACnetPropertyIdentifier_AUTHENTICATION_FACTORS, true - case 258: - return BACnetPropertyIdentifier_AUTHENTICATION_POLICY_LIST, true - case 259: - return BACnetPropertyIdentifier_AUTHENTICATION_POLICY_NAMES, true - case 26: - return BACnetPropertyIdentifier_DERIVATIVE_CONSTANT, true - case 260: - return BACnetPropertyIdentifier_AUTHENTICATION_STATUS, true - case 261: - return BACnetPropertyIdentifier_AUTHORIZATION_MODE, true - case 262: - return BACnetPropertyIdentifier_BELONGS_TO, true - case 263: - return BACnetPropertyIdentifier_CREDENTIAL_DISABLE, true - case 264: - return BACnetPropertyIdentifier_CREDENTIAL_STATUS, true - case 265: - return BACnetPropertyIdentifier_CREDENTIALS, true - case 266: - return BACnetPropertyIdentifier_CREDENTIALS_IN_ZONE, true - case 267: - return BACnetPropertyIdentifier_DAYS_REMAINING, true - case 268: - return BACnetPropertyIdentifier_ENTRY_POINTS, true - case 269: - return BACnetPropertyIdentifier_EXIT_POINTS, true - case 27: - return BACnetPropertyIdentifier_DERIVATIVE_CONSTANT_UNITS, true - case 270: - return BACnetPropertyIdentifier_EXPIRATION_TIME, true - case 271: - return BACnetPropertyIdentifier_EXTENDED_TIME_ENABLE, true - case 272: - return BACnetPropertyIdentifier_FAILED_ATTEMPT_EVENTS, true - case 273: - return BACnetPropertyIdentifier_FAILED_ATTEMPTS, true - case 274: - return BACnetPropertyIdentifier_FAILED_ATTEMPTS_TIME, true - case 275: - return BACnetPropertyIdentifier_LAST_ACCESS_EVENT, true - case 276: - return BACnetPropertyIdentifier_LAST_ACCESS_POINT, true - case 277: - return BACnetPropertyIdentifier_LAST_CREDENTIAL_ADDED, true - case 278: - return BACnetPropertyIdentifier_LAST_CREDENTIAL_ADDED_TIME, true - case 279: - return BACnetPropertyIdentifier_LAST_CREDENTIAL_REMOVED, true - case 28: - return BACnetPropertyIdentifier_DESCRIPTION, true - case 280: - return BACnetPropertyIdentifier_LAST_CREDENTIAL_REMOVED_TIME, true - case 281: - return BACnetPropertyIdentifier_LAST_USE_TIME, true - case 282: - return BACnetPropertyIdentifier_LOCKOUT, true - case 283: - return BACnetPropertyIdentifier_LOCKOUT_RELINQUISH_TIME, true - case 285: - return BACnetPropertyIdentifier_MAX_FAILED_ATTEMPTS, true - case 286: - return BACnetPropertyIdentifier_MEMBERS, true - case 287: - return BACnetPropertyIdentifier_MUSTER_POINT, true - case 288: - return BACnetPropertyIdentifier_NEGATIVE_ACCESS_RULES, true - case 289: - return BACnetPropertyIdentifier_NUMBER_OF_AUTHENTICATION_POLICIES, true - case 29: - return BACnetPropertyIdentifier_DESCRIPTION_OF_HALT, true - case 290: - return BACnetPropertyIdentifier_OCCUPANCY_COUNT, true - case 291: - return BACnetPropertyIdentifier_OCCUPANCY_COUNT_ADJUST, true - case 292: - return BACnetPropertyIdentifier_OCCUPANCY_COUNT_ENABLE, true - case 294: - return BACnetPropertyIdentifier_OCCUPANCY_LOWER_LIMIT, true - case 295: - return BACnetPropertyIdentifier_OCCUPANCY_LOWER_LIMIT_ENFORCED, true - case 296: - return BACnetPropertyIdentifier_OCCUPANCY_STATE, true - case 297: - return BACnetPropertyIdentifier_OCCUPANCY_UPPER_LIMIT, true - case 298: - return BACnetPropertyIdentifier_OCCUPANCY_UPPER_LIMIT_ENFORCED, true - case 3: - return BACnetPropertyIdentifier_ACTION_TEXT, true - case 30: - return BACnetPropertyIdentifier_DEVICE_ADDRESS_BINDING, true - case 300: - return BACnetPropertyIdentifier_PASSBACK_MODE, true - case 301: - return BACnetPropertyIdentifier_PASSBACK_TIMEOUT, true - case 302: - return BACnetPropertyIdentifier_POSITIVE_ACCESS_RULES, true - case 303: - return BACnetPropertyIdentifier_REASON_FOR_DISABLE, true - case 304: - return BACnetPropertyIdentifier_SUPPORTED_FORMATS, true - case 305: - return BACnetPropertyIdentifier_SUPPORTED_FORMAT_CLASSES, true - case 306: - return BACnetPropertyIdentifier_THREAT_AUTHORITY, true - case 307: - return BACnetPropertyIdentifier_THREAT_LEVEL, true - case 308: - return BACnetPropertyIdentifier_TRACE_FLAG, true - case 309: - return BACnetPropertyIdentifier_TRANSACTION_NOTIFICATION_CLASS, true - case 31: - return BACnetPropertyIdentifier_DEVICE_TYPE, true - case 310: - return BACnetPropertyIdentifier_USER_EXTERNAL_IDENTIFIER, true - case 311: - return BACnetPropertyIdentifier_USER_INFORMATION_REFERENCE, true - case 317: - return BACnetPropertyIdentifier_USER_NAME, true - case 318: - return BACnetPropertyIdentifier_USER_TYPE, true - case 319: - return BACnetPropertyIdentifier_USES_REMAINING, true - case 32: - return BACnetPropertyIdentifier_EFFECTIVE_PERIOD, true - case 320: - return BACnetPropertyIdentifier_ZONE_FROM, true - case 321: - return BACnetPropertyIdentifier_ZONE_TO, true - case 322: - return BACnetPropertyIdentifier_ACCESS_EVENT_TAG, true - case 323: - return BACnetPropertyIdentifier_GLOBAL_IDENTIFIER, true - case 326: - return BACnetPropertyIdentifier_VERIFICATION_TIME, true - case 327: - return BACnetPropertyIdentifier_BASE_DEVICE_SECURITY_POLICY, true - case 328: - return BACnetPropertyIdentifier_DISTRIBUTION_KEY_REVISION, true - case 329: - return BACnetPropertyIdentifier_DO_NOT_HIDE, true - case 33: - return BACnetPropertyIdentifier_ELAPSED_ACTIVE_TIME, true - case 330: - return BACnetPropertyIdentifier_KEY_SETS, true - case 331: - return BACnetPropertyIdentifier_LAST_KEY_SERVER, true - case 332: - return BACnetPropertyIdentifier_NETWORK_ACCESS_SECURITY_POLICIES, true - case 333: - return BACnetPropertyIdentifier_PACKET_REORDER_TIME, true - case 334: - return BACnetPropertyIdentifier_SECURITY_PDU_TIMEOUT, true - case 335: - return BACnetPropertyIdentifier_SECURITY_TIME_WINDOW, true - case 336: - return BACnetPropertyIdentifier_SUPPORTED_SECURITY_ALGORITHMS, true - case 337: - return BACnetPropertyIdentifier_UPDATE_KEY_SET_TIMEOUT, true - case 338: - return BACnetPropertyIdentifier_BACKUP_AND_RESTORE_STATE, true - case 339: - return BACnetPropertyIdentifier_BACKUP_PREPARATION_TIME, true - case 34: - return BACnetPropertyIdentifier_ERROR_LIMIT, true - case 340: - return BACnetPropertyIdentifier_RESTORE_COMPLETION_TIME, true - case 341: - return BACnetPropertyIdentifier_RESTORE_PREPARATION_TIME, true - case 342: - return BACnetPropertyIdentifier_BIT_MASK, true - case 343: - return BACnetPropertyIdentifier_BIT_TEXT, true - case 344: - return BACnetPropertyIdentifier_IS_UTC, true - case 345: - return BACnetPropertyIdentifier_GROUP_MEMBERS, true - case 346: - return BACnetPropertyIdentifier_GROUP_MEMBER_NAMES, true - case 347: - return BACnetPropertyIdentifier_MEMBER_STATUS_FLAGS, true - case 348: - return BACnetPropertyIdentifier_REQUESTED_UPDATE_INTERVAL, true - case 349: - return BACnetPropertyIdentifier_COVU_PERIOD, true - case 35: - return BACnetPropertyIdentifier_EVENT_ENABLE, true - case 350: - return BACnetPropertyIdentifier_COVU_RECIPIENTS, true - case 351: - return BACnetPropertyIdentifier_EVENT_MESSAGE_TEXTS, true - case 352: - return BACnetPropertyIdentifier_EVENT_MESSAGE_TEXTS_CONFIG, true - case 353: - return BACnetPropertyIdentifier_EVENT_DETECTION_ENABLE, true - case 354: - return BACnetPropertyIdentifier_EVENT_ALGORITHM_INHIBIT, true - case 355: - return BACnetPropertyIdentifier_EVENT_ALGORITHM_INHIBIT_REF, true - case 356: - return BACnetPropertyIdentifier_TIME_DELAY_NORMAL, true - case 357: - return BACnetPropertyIdentifier_RELIABILITY_EVALUATION_INHIBIT, true - case 358: - return BACnetPropertyIdentifier_FAULT_PARAMETERS, true - case 359: - return BACnetPropertyIdentifier_FAULT_TYPE, true - case 36: - return BACnetPropertyIdentifier_EVENT_STATE, true - case 360: - return BACnetPropertyIdentifier_LOCAL_FORWARDING_ONLY, true - case 361: - return BACnetPropertyIdentifier_PROCESS_IDENTIFIER_FILTER, true - case 362: - return BACnetPropertyIdentifier_SUBSCRIBED_RECIPIENTS, true - case 363: - return BACnetPropertyIdentifier_PORT_FILTER, true - case 364: - return BACnetPropertyIdentifier_AUTHORIZATION_EXEMPTIONS, true - case 365: - return BACnetPropertyIdentifier_ALLOW_GROUP_DELAY_INHIBIT, true - case 366: - return BACnetPropertyIdentifier_CHANNEL_NUMBER, true - case 367: - return BACnetPropertyIdentifier_CONTROL_GROUPS, true - case 368: - return BACnetPropertyIdentifier_EXECUTION_DELAY, true - case 369: - return BACnetPropertyIdentifier_LAST_PRIORITY, true - case 37: - return BACnetPropertyIdentifier_EVENT_TYPE, true - case 370: - return BACnetPropertyIdentifier_WRITE_STATUS, true - case 371: - return BACnetPropertyIdentifier_PROPERTY_LIST, true - case 372: - return BACnetPropertyIdentifier_SERIAL_NUMBER, true - case 373: - return BACnetPropertyIdentifier_BLINK_WARN_ENABLE, true - case 374: - return BACnetPropertyIdentifier_DEFAULT_FADE_TIME, true - case 375: - return BACnetPropertyIdentifier_DEFAULT_RAMP_RATE, true - case 376: - return BACnetPropertyIdentifier_DEFAULT_STEP_INCREMENT, true - case 377: - return BACnetPropertyIdentifier_EGRESS_TIME, true - case 378: - return BACnetPropertyIdentifier_IN_PROGRESS, true - case 379: - return BACnetPropertyIdentifier_INSTANTANEOUS_POWER, true - case 38: - return BACnetPropertyIdentifier_EXCEPTION_SCHEDULE, true - case 380: - return BACnetPropertyIdentifier_LIGHTING_COMMAND, true - case 381: - return BACnetPropertyIdentifier_LIGHTING_COMMAND_DEFAULT_PRIORITY, true - case 382: - return BACnetPropertyIdentifier_MAX_ACTUAL_VALUE, true - case 383: - return BACnetPropertyIdentifier_MIN_ACTUAL_VALUE, true - case 384: - return BACnetPropertyIdentifier_POWER, true - case 385: - return BACnetPropertyIdentifier_TRANSITION, true - case 386: - return BACnetPropertyIdentifier_EGRESS_ACTIVE, true - case 387: - return BACnetPropertyIdentifier_INTERFACE_VALUE, true - case 388: - return BACnetPropertyIdentifier_FAULT_HIGH_LIMIT, true - case 389: - return BACnetPropertyIdentifier_FAULT_LOW_LIMIT, true - case 39: - return BACnetPropertyIdentifier_FAULT_VALUES, true - case 390: - return BACnetPropertyIdentifier_LOW_DIFF_LIMIT, true - case 391: - return BACnetPropertyIdentifier_STRIKE_COUNT, true - case 392: - return BACnetPropertyIdentifier_TIME_OF_STRIKE_COUNT_RESET, true - case 393: - return BACnetPropertyIdentifier_DEFAULT_TIMEOUT, true - case 394: - return BACnetPropertyIdentifier_INITIAL_TIMEOUT, true - case 395: - return BACnetPropertyIdentifier_LAST_STATE_CHANGE, true - case 396: - return BACnetPropertyIdentifier_STATE_CHANGE_VALUES, true - case 397: - return BACnetPropertyIdentifier_TIMER_RUNNING, true - case 398: - return BACnetPropertyIdentifier_TIMER_STATE, true - case 399: - return BACnetPropertyIdentifier_APDU_LENGTH, true - case 4: - return BACnetPropertyIdentifier_ACTIVE_TEXT, true - case 40: - return BACnetPropertyIdentifier_FEEDBACK_VALUE, true - case 400: - return BACnetPropertyIdentifier_IP_ADDRESS, true - case 401: - return BACnetPropertyIdentifier_IP_DEFAULT_GATEWAY, true - case 402: - return BACnetPropertyIdentifier_IP_DHCP_ENABLE, true - case 403: - return BACnetPropertyIdentifier_IP_DHCP_LEASE_TIME, true - case 404: - return BACnetPropertyIdentifier_IP_DHCP_LEASE_TIME_REMAINING, true - case 405: - return BACnetPropertyIdentifier_IP_DHCP_SERVER, true - case 406: - return BACnetPropertyIdentifier_IP_DNS_SERVER, true - case 407: - return BACnetPropertyIdentifier_BACNET_IP_GLOBAL_ADDRESS, true - case 408: - return BACnetPropertyIdentifier_BACNET_IP_MODE, true - case 409: - return BACnetPropertyIdentifier_BACNET_IP_MULTICAST_ADDRESS, true - case 41: - return BACnetPropertyIdentifier_FILE_ACCESS_METHOD, true - case 410: - return BACnetPropertyIdentifier_BACNET_IP_NAT_TRAVERSAL, true - case 411: - return BACnetPropertyIdentifier_IP_SUBNET_MASK, true - case 412: - return BACnetPropertyIdentifier_BACNET_IP_UDP_PORT, true - case 413: - return BACnetPropertyIdentifier_BBMD_ACCEPT_FD_REGISTRATIONS, true - case 414: - return BACnetPropertyIdentifier_BBMD_BROADCAST_DISTRIBUTION_TABLE, true - case 415: - return BACnetPropertyIdentifier_BBMD_FOREIGN_DEVICE_TABLE, true - case 416: - return BACnetPropertyIdentifier_CHANGES_PENDING, true - case 417: - return BACnetPropertyIdentifier_COMMAND, true - case 418: - return BACnetPropertyIdentifier_FD_BBMD_ADDRESS, true - case 419: - return BACnetPropertyIdentifier_FD_SUBSCRIPTION_LIFETIME, true - case 42: - return BACnetPropertyIdentifier_FILE_SIZE, true - case 420: - return BACnetPropertyIdentifier_LINK_SPEED, true - case 421: - return BACnetPropertyIdentifier_LINK_SPEEDS, true - case 422: - return BACnetPropertyIdentifier_LINK_SPEED_AUTONEGOTIATE, true - case 423: - return BACnetPropertyIdentifier_MAC_ADDRESS, true - case 424: - return BACnetPropertyIdentifier_NETWORK_INTERFACE_NAME, true - case 425: - return BACnetPropertyIdentifier_NETWORK_NUMBER, true - case 426: - return BACnetPropertyIdentifier_NETWORK_NUMBER_QUALITY, true - case 427: - return BACnetPropertyIdentifier_NETWORK_TYPE, true - case 428: - return BACnetPropertyIdentifier_ROUTING_TABLE, true - case 429: - return BACnetPropertyIdentifier_VIRTUAL_MAC_ADDRESS_TABLE, true - case 43: - return BACnetPropertyIdentifier_FILE_TYPE, true - case 430: - return BACnetPropertyIdentifier_COMMAND_TIME_ARRAY, true - case 431: - return BACnetPropertyIdentifier_CURRENT_COMMAND_PRIORITY, true - case 432: - return BACnetPropertyIdentifier_LAST_COMMAND_TIME, true - case 433: - return BACnetPropertyIdentifier_VALUE_SOURCE, true - case 434: - return BACnetPropertyIdentifier_VALUE_SOURCE_ARRAY, true - case 435: - return BACnetPropertyIdentifier_BACNET_IPV6_MODE, true - case 436: - return BACnetPropertyIdentifier_IPV6_ADDRESS, true - case 437: - return BACnetPropertyIdentifier_IPV6_PREFIX_LENGTH, true - case 438: - return BACnetPropertyIdentifier_BACNET_IPV6_UDP_PORT, true - case 439: - return BACnetPropertyIdentifier_IPV6_DEFAULT_GATEWAY, true - case 44: - return BACnetPropertyIdentifier_FIRMWARE_REVISION, true - case 440: - return BACnetPropertyIdentifier_BACNET_IPV6_MULTICAST_ADDRESS, true - case 441: - return BACnetPropertyIdentifier_IPV6_DNS_SERVER, true - case 442: - return BACnetPropertyIdentifier_IPV6_AUTO_ADDRESSING_ENABLE, true - case 443: - return BACnetPropertyIdentifier_IPV6_DHCP_LEASE_TIME, true - case 444: - return BACnetPropertyIdentifier_IPV6_DHCP_LEASE_TIME_REMAINING, true - case 445: - return BACnetPropertyIdentifier_IPV6_DHCP_SERVER, true - case 446: - return BACnetPropertyIdentifier_IPV6_ZONE_INDEX, true - case 447: - return BACnetPropertyIdentifier_ASSIGNED_LANDING_CALLS, true - case 448: - return BACnetPropertyIdentifier_CAR_ASSIGNED_DIRECTION, true - case 449: - return BACnetPropertyIdentifier_CAR_DOOR_COMMAND, true - case 45: - return BACnetPropertyIdentifier_HIGH_LIMIT, true - case 450: - return BACnetPropertyIdentifier_CAR_DOOR_STATUS, true - case 451: - return BACnetPropertyIdentifier_CAR_DOOR_TEXT, true - case 452: - return BACnetPropertyIdentifier_CAR_DOOR_ZONE, true - case 453: - return BACnetPropertyIdentifier_CAR_DRIVE_STATUS, true - case 454: - return BACnetPropertyIdentifier_CAR_LOAD, true - case 455: - return BACnetPropertyIdentifier_CAR_LOAD_UNITS, true - case 456: - return BACnetPropertyIdentifier_CAR_MODE, true - case 457: - return BACnetPropertyIdentifier_CAR_MOVING_DIRECTION, true - case 458: - return BACnetPropertyIdentifier_CAR_POSITION, true - case 459: - return BACnetPropertyIdentifier_ELEVATOR_GROUP, true - case 46: - return BACnetPropertyIdentifier_INACTIVE_TEXT, true - case 460: - return BACnetPropertyIdentifier_ENERGY_METER, true - case 461: - return BACnetPropertyIdentifier_ENERGY_METER_REF, true - case 462: - return BACnetPropertyIdentifier_ESCALATOR_MODE, true - case 463: - return BACnetPropertyIdentifier_FAULT_SIGNALS, true - case 464: - return BACnetPropertyIdentifier_FLOOR_TEXT, true - case 465: - return BACnetPropertyIdentifier_GROUP_ID, true - case 467: - return BACnetPropertyIdentifier_GROUP_MODE, true - case 468: - return BACnetPropertyIdentifier_HIGHER_DECK, true - case 469: - return BACnetPropertyIdentifier_INSTALLATION_ID, true - case 47: - return BACnetPropertyIdentifier_IN_PROCESS, true - case 470: - return BACnetPropertyIdentifier_LANDING_CALLS, true - case 471: - return BACnetPropertyIdentifier_LANDING_CALL_CONTROL, true - case 472: - return BACnetPropertyIdentifier_LANDING_DOOR_STATUS, true - case 473: - return BACnetPropertyIdentifier_LOWER_DECK, true - case 474: - return BACnetPropertyIdentifier_MACHINE_ROOM_ID, true - case 475: - return BACnetPropertyIdentifier_MAKING_CAR_CALL, true - case 476: - return BACnetPropertyIdentifier_NEXT_STOPPING_FLOOR, true - case 477: - return BACnetPropertyIdentifier_OPERATION_DIRECTION, true - case 478: - return BACnetPropertyIdentifier_PASSENGER_ALARM, true - case 479: - return BACnetPropertyIdentifier_POWER_MODE, true - case 48: - return BACnetPropertyIdentifier_INSTANCE_OF, true - case 480: - return BACnetPropertyIdentifier_REGISTERED_CAR_CALL, true - case 481: - return BACnetPropertyIdentifier_ACTIVE_COV_MULTIPLE_SUBSCRIPTIONS, true - case 482: - return BACnetPropertyIdentifier_PROTOCOL_LEVEL, true - case 483: - return BACnetPropertyIdentifier_REFERENCE_PORT, true - case 484: - return BACnetPropertyIdentifier_DEPLOYED_PROFILE_LOCATION, true - case 485: - return BACnetPropertyIdentifier_PROFILE_LOCATION, true - case 486: - return BACnetPropertyIdentifier_TAGS, true - case 487: - return BACnetPropertyIdentifier_SUBORDINATE_NODE_TYPES, true - case 488: - return BACnetPropertyIdentifier_SUBORDINATE_TAGS, true - case 489: - return BACnetPropertyIdentifier_SUBORDINATE_RELATIONSHIPS, true - case 49: - return BACnetPropertyIdentifier_INTEGRAL_CONSTANT, true - case 490: - return BACnetPropertyIdentifier_DEFAULT_SUBORDINATE_RELATIONSHIP, true - case 491: - return BACnetPropertyIdentifier_REPRESENTS, true - case 5: - return BACnetPropertyIdentifier_ACTIVE_VT_SESSIONS, true - case 50: - return BACnetPropertyIdentifier_INTEGRAL_CONSTANT_UNITS, true - case 52: - return BACnetPropertyIdentifier_LIMIT_ENABLE, true - case 53: - return BACnetPropertyIdentifier_LIST_OF_GROUP_MEMBERS, true - case 54: - return BACnetPropertyIdentifier_LIST_OF_OBJECT_PROPERTY_REFERENCES, true - case 56: - return BACnetPropertyIdentifier_LOCAL_DATE, true - case 57: - return BACnetPropertyIdentifier_LOCAL_TIME, true - case 58: - return BACnetPropertyIdentifier_LOCATION, true - case 59: - return BACnetPropertyIdentifier_LOW_LIMIT, true - case 6: - return BACnetPropertyIdentifier_ALARM_VALUE, true - case 60: - return BACnetPropertyIdentifier_MANIPULATED_VARIABLE_REFERENCE, true - case 61: - return BACnetPropertyIdentifier_MAXIMUM_OUTPUT, true - case 62: - return BACnetPropertyIdentifier_MAX_APDU_LENGTH_ACCEPTED, true - case 63: - return BACnetPropertyIdentifier_MAX_INFO_FRAMES, true - case 64: - return BACnetPropertyIdentifier_MAX_MASTER, true - case 65: - return BACnetPropertyIdentifier_MAX_PRES_VALUE, true - case 66: - return BACnetPropertyIdentifier_MINIMUM_OFF_TIME, true - case 67: - return BACnetPropertyIdentifier_MINIMUM_ON_TIME, true - case 68: - return BACnetPropertyIdentifier_MINIMUM_OUTPUT, true - case 69: - return BACnetPropertyIdentifier_MIN_PRES_VALUE, true - case 7: - return BACnetPropertyIdentifier_ALARM_VALUES, true - case 70: - return BACnetPropertyIdentifier_MODEL_NAME, true - case 71: - return BACnetPropertyIdentifier_MODIFICATION_DATE, true - case 72: - return BACnetPropertyIdentifier_NOTIFY_TYPE, true - case 73: - return BACnetPropertyIdentifier_NUMBER_OF_APDU_RETRIES, true - case 74: - return BACnetPropertyIdentifier_NUMBER_OF_STATES, true - case 75: - return BACnetPropertyIdentifier_OBJECT_IDENTIFIER, true - case 76: - return BACnetPropertyIdentifier_OBJECT_LIST, true - case 77: - return BACnetPropertyIdentifier_OBJECT_NAME, true - case 78: - return BACnetPropertyIdentifier_OBJECT_PROPERTY_REFERENCE, true - case 79: - return BACnetPropertyIdentifier_OBJECT_TYPE, true - case 8: - return BACnetPropertyIdentifier_ALL, true - case 80: - return BACnetPropertyIdentifier_OPTIONAL, true - case 81: - return BACnetPropertyIdentifier_OUT_OF_SERVICE, true - case 82: - return BACnetPropertyIdentifier_OUTPUT_UNITS, true - case 83: - return BACnetPropertyIdentifier_EVENT_PARAMETERS, true - case 84: - return BACnetPropertyIdentifier_POLARITY, true - case 85: - return BACnetPropertyIdentifier_PRESENT_VALUE, true - case 86: - return BACnetPropertyIdentifier_PRIORITY, true - case 87: - return BACnetPropertyIdentifier_PRIORITY_ARRAY, true - case 88: - return BACnetPropertyIdentifier_PRIORITY_FOR_WRITING, true - case 89: - return BACnetPropertyIdentifier_PROCESS_IDENTIFIER, true - case 9: - return BACnetPropertyIdentifier_ALL_WRITES_SUCCESSFUL, true - case 90: - return BACnetPropertyIdentifier_PROGRAM_CHANGE, true - case 91: - return BACnetPropertyIdentifier_PROGRAM_LOCATION, true - case 92: - return BACnetPropertyIdentifier_PROGRAM_STATE, true - case 93: - return BACnetPropertyIdentifier_PROPORTIONAL_CONSTANT, true - case 94: - return BACnetPropertyIdentifier_PROPORTIONAL_CONSTANT_UNITS, true - case 95: - return BACnetPropertyIdentifier_PROTOCOL_CONFORMANCE_CLASS, true - case 96: - return BACnetPropertyIdentifier_PROTOCOL_OBJECT_TYPES_SUPPORTED, true - case 97: - return BACnetPropertyIdentifier_PROTOCOL_SERVICES_SUPPORTED, true - case 98: - return BACnetPropertyIdentifier_PROTOCOL_VERSION, true - case 99: - return BACnetPropertyIdentifier_READ_ONLY, true - case 9999: - return BACnetPropertyIdentifier_VENDOR_PROPRIETARY_VALUE, true + case 0: + return BACnetPropertyIdentifier_ACKED_TRANSITIONS, true + case 1: + return BACnetPropertyIdentifier_ACK_REQUIRED, true + case 10: + return BACnetPropertyIdentifier_APDU_SEGMENT_TIMEOUT, true + case 100: + return BACnetPropertyIdentifier_REASON_FOR_HALT, true + case 102: + return BACnetPropertyIdentifier_RECIPIENT_LIST, true + case 103: + return BACnetPropertyIdentifier_RELIABILITY, true + case 104: + return BACnetPropertyIdentifier_RELINQUISH_DEFAULT, true + case 105: + return BACnetPropertyIdentifier_REQUIRED, true + case 106: + return BACnetPropertyIdentifier_RESOLUTION, true + case 107: + return BACnetPropertyIdentifier_SEGMENTATION_SUPPORTED, true + case 108: + return BACnetPropertyIdentifier_SETPOINT, true + case 109: + return BACnetPropertyIdentifier_SETPOINT_REFERENCE, true + case 11: + return BACnetPropertyIdentifier_APDU_TIMEOUT, true + case 110: + return BACnetPropertyIdentifier_STATE_TEXT, true + case 111: + return BACnetPropertyIdentifier_STATUS_FLAGS, true + case 112: + return BACnetPropertyIdentifier_SYSTEM_STATUS, true + case 113: + return BACnetPropertyIdentifier_TIME_DELAY, true + case 114: + return BACnetPropertyIdentifier_TIME_OF_ACTIVE_TIME_RESET, true + case 115: + return BACnetPropertyIdentifier_TIME_OF_STATE_COUNT_RESET, true + case 116: + return BACnetPropertyIdentifier_TIME_SYNCHRONIZATION_RECIPIENTS, true + case 117: + return BACnetPropertyIdentifier_UNITS, true + case 118: + return BACnetPropertyIdentifier_UPDATE_INTERVAL, true + case 119: + return BACnetPropertyIdentifier_UTC_OFFSET, true + case 12: + return BACnetPropertyIdentifier_APPLICATION_SOFTWARE_VERSION, true + case 120: + return BACnetPropertyIdentifier_VENDOR_IDENTIFIER, true + case 121: + return BACnetPropertyIdentifier_VENDOR_NAME, true + case 122: + return BACnetPropertyIdentifier_VT_CLASSES_SUPPORTED, true + case 123: + return BACnetPropertyIdentifier_WEEKLY_SCHEDULE, true + case 124: + return BACnetPropertyIdentifier_ATTEMPTED_SAMPLES, true + case 125: + return BACnetPropertyIdentifier_AVERAGE_VALUE, true + case 126: + return BACnetPropertyIdentifier_BUFFER_SIZE, true + case 127: + return BACnetPropertyIdentifier_CLIENT_COV_INCREMENT, true + case 128: + return BACnetPropertyIdentifier_COV_RESUBSCRIPTION_INTERVAL, true + case 13: + return BACnetPropertyIdentifier_ARCHIVE, true + case 130: + return BACnetPropertyIdentifier_EVENT_TIME_STAMPS, true + case 131: + return BACnetPropertyIdentifier_LOG_BUFFER, true + case 132: + return BACnetPropertyIdentifier_LOG_DEVICE_OBJECT_PROPERTY, true + case 133: + return BACnetPropertyIdentifier_ENABLE, true + case 134: + return BACnetPropertyIdentifier_LOG_INTERVAL, true + case 135: + return BACnetPropertyIdentifier_MAXIMUM_VALUE, true + case 136: + return BACnetPropertyIdentifier_MINIMUM_VALUE, true + case 137: + return BACnetPropertyIdentifier_NOTIFICATION_THRESHOLD, true + case 139: + return BACnetPropertyIdentifier_PROTOCOL_REVISION, true + case 14: + return BACnetPropertyIdentifier_BIAS, true + case 140: + return BACnetPropertyIdentifier_RECORDS_SINCE_NOTIFICATION, true + case 141: + return BACnetPropertyIdentifier_RECORD_COUNT, true + case 142: + return BACnetPropertyIdentifier_START_TIME, true + case 143: + return BACnetPropertyIdentifier_STOP_TIME, true + case 144: + return BACnetPropertyIdentifier_STOP_WHEN_FULL, true + case 145: + return BACnetPropertyIdentifier_TOTAL_RECORD_COUNT, true + case 146: + return BACnetPropertyIdentifier_VALID_SAMPLES, true + case 147: + return BACnetPropertyIdentifier_WINDOW_INTERVAL, true + case 148: + return BACnetPropertyIdentifier_WINDOW_SAMPLES, true + case 149: + return BACnetPropertyIdentifier_MAXIMUM_VALUE_TIMESTAMP, true + case 15: + return BACnetPropertyIdentifier_CHANGE_OF_STATE_COUNT, true + case 150: + return BACnetPropertyIdentifier_MINIMUM_VALUE_TIMESTAMP, true + case 151: + return BACnetPropertyIdentifier_VARIANCE_VALUE, true + case 152: + return BACnetPropertyIdentifier_ACTIVE_COV_SUBSCRIPTIONS, true + case 153: + return BACnetPropertyIdentifier_BACKUP_FAILURE_TIMEOUT, true + case 154: + return BACnetPropertyIdentifier_CONFIGURATION_FILES, true + case 155: + return BACnetPropertyIdentifier_DATABASE_REVISION, true + case 156: + return BACnetPropertyIdentifier_DIRECT_READING, true + case 157: + return BACnetPropertyIdentifier_LAST_RESTORE_TIME, true + case 158: + return BACnetPropertyIdentifier_MAINTENANCE_REQUIRED, true + case 159: + return BACnetPropertyIdentifier_MEMBER_OF, true + case 16: + return BACnetPropertyIdentifier_CHANGE_OF_STATE_TIME, true + case 160: + return BACnetPropertyIdentifier_MODE, true + case 161: + return BACnetPropertyIdentifier_OPERATION_EXPECTED, true + case 162: + return BACnetPropertyIdentifier_SETTING, true + case 163: + return BACnetPropertyIdentifier_SILENCED, true + case 164: + return BACnetPropertyIdentifier_TRACKING_VALUE, true + case 165: + return BACnetPropertyIdentifier_ZONE_MEMBERS, true + case 166: + return BACnetPropertyIdentifier_LIFE_SAFETY_ALARM_VALUES, true + case 167: + return BACnetPropertyIdentifier_MAX_SEGMENTS_ACCEPTED, true + case 168: + return BACnetPropertyIdentifier_PROFILE_NAME, true + case 169: + return BACnetPropertyIdentifier_AUTO_SLAVE_DISCOVERY, true + case 17: + return BACnetPropertyIdentifier_NOTIFICATION_CLASS, true + case 170: + return BACnetPropertyIdentifier_MANUAL_SLAVE_ADDRESS_BINDING, true + case 171: + return BACnetPropertyIdentifier_SLAVE_ADDRESS_BINDING, true + case 172: + return BACnetPropertyIdentifier_SLAVE_PROXY_ENABLE, true + case 173: + return BACnetPropertyIdentifier_LAST_NOTIFY_RECORD, true + case 174: + return BACnetPropertyIdentifier_SCHEDULE_DEFAULT, true + case 175: + return BACnetPropertyIdentifier_ACCEPTED_MODES, true + case 176: + return BACnetPropertyIdentifier_ADJUST_VALUE, true + case 177: + return BACnetPropertyIdentifier_COUNT, true + case 178: + return BACnetPropertyIdentifier_COUNT_BEFORE_CHANGE, true + case 179: + return BACnetPropertyIdentifier_COUNT_CHANGE_TIME, true + case 180: + return BACnetPropertyIdentifier_COV_PERIOD, true + case 181: + return BACnetPropertyIdentifier_INPUT_REFERENCE, true + case 182: + return BACnetPropertyIdentifier_LIMIT_MONITORING_INTERVAL, true + case 183: + return BACnetPropertyIdentifier_LOGGING_OBJECT, true + case 184: + return BACnetPropertyIdentifier_LOGGING_RECORD, true + case 185: + return BACnetPropertyIdentifier_PRESCALE, true + case 186: + return BACnetPropertyIdentifier_PULSE_RATE, true + case 187: + return BACnetPropertyIdentifier_SCALE, true + case 188: + return BACnetPropertyIdentifier_SCALE_FACTOR, true + case 189: + return BACnetPropertyIdentifier_UPDATE_TIME, true + case 19: + return BACnetPropertyIdentifier_CONTROLLED_VARIABLE_REFERENCE, true + case 190: + return BACnetPropertyIdentifier_VALUE_BEFORE_CHANGE, true + case 191: + return BACnetPropertyIdentifier_VALUE_SET, true + case 192: + return BACnetPropertyIdentifier_VALUE_CHANGE_TIME, true + case 193: + return BACnetPropertyIdentifier_ALIGN_INTERVALS, true + case 195: + return BACnetPropertyIdentifier_INTERVAL_OFFSET, true + case 196: + return BACnetPropertyIdentifier_LAST_RESTART_REASON, true + case 197: + return BACnetPropertyIdentifier_LOGGING_TYPE, true + case 2: + return BACnetPropertyIdentifier_ACTION, true + case 20: + return BACnetPropertyIdentifier_CONTROLLED_VARIABLE_UNITS, true + case 202: + return BACnetPropertyIdentifier_RESTART_NOTIFICATION_RECIPIENTS, true + case 203: + return BACnetPropertyIdentifier_TIME_OF_DEVICE_RESTART, true + case 204: + return BACnetPropertyIdentifier_TIME_SYNCHRONIZATION_INTERVAL, true + case 205: + return BACnetPropertyIdentifier_TRIGGER, true + case 206: + return BACnetPropertyIdentifier_UTC_TIME_SYNCHRONIZATION_RECIPIENTS, true + case 207: + return BACnetPropertyIdentifier_NODE_SUBTYPE, true + case 208: + return BACnetPropertyIdentifier_NODE_TYPE, true + case 209: + return BACnetPropertyIdentifier_STRUCTURED_OBJECT_LIST, true + case 21: + return BACnetPropertyIdentifier_CONTROLLED_VARIABLE_VALUE, true + case 210: + return BACnetPropertyIdentifier_SUBORDINATE_ANNOTATIONS, true + case 211: + return BACnetPropertyIdentifier_SUBORDINATE_LIST, true + case 212: + return BACnetPropertyIdentifier_ACTUAL_SHED_LEVEL, true + case 213: + return BACnetPropertyIdentifier_DUTY_WINDOW, true + case 214: + return BACnetPropertyIdentifier_EXPECTED_SHED_LEVEL, true + case 215: + return BACnetPropertyIdentifier_FULL_DUTY_BASELINE, true + case 218: + return BACnetPropertyIdentifier_REQUESTED_SHED_LEVEL, true + case 219: + return BACnetPropertyIdentifier_SHED_DURATION, true + case 22: + return BACnetPropertyIdentifier_COV_INCREMENT, true + case 220: + return BACnetPropertyIdentifier_SHED_LEVEL_DESCRIPTIONS, true + case 221: + return BACnetPropertyIdentifier_SHED_LEVELS, true + case 222: + return BACnetPropertyIdentifier_STATE_DESCRIPTION, true + case 226: + return BACnetPropertyIdentifier_DOOR_ALARM_STATE, true + case 227: + return BACnetPropertyIdentifier_DOOR_EXTENDED_PULSE_TIME, true + case 228: + return BACnetPropertyIdentifier_DOOR_MEMBERS, true + case 229: + return BACnetPropertyIdentifier_DOOR_OPEN_TOO_LONG_TIME, true + case 23: + return BACnetPropertyIdentifier_DATE_LIST, true + case 230: + return BACnetPropertyIdentifier_DOOR_PULSE_TIME, true + case 231: + return BACnetPropertyIdentifier_DOOR_STATUS, true + case 232: + return BACnetPropertyIdentifier_DOOR_UNLOCK_DELAY_TIME, true + case 233: + return BACnetPropertyIdentifier_LOCK_STATUS, true + case 234: + return BACnetPropertyIdentifier_MASKED_ALARM_VALUES, true + case 235: + return BACnetPropertyIdentifier_SECURED_STATUS, true + case 24: + return BACnetPropertyIdentifier_DAYLIGHT_SAVINGS_STATUS, true + case 244: + return BACnetPropertyIdentifier_ABSENTEE_LIMIT, true + case 245: + return BACnetPropertyIdentifier_ACCESS_ALARM_EVENTS, true + case 246: + return BACnetPropertyIdentifier_ACCESS_DOORS, true + case 247: + return BACnetPropertyIdentifier_ACCESS_EVENT, true + case 248: + return BACnetPropertyIdentifier_ACCESS_EVENT_AUTHENTICATION_FACTOR, true + case 249: + return BACnetPropertyIdentifier_ACCESS_EVENT_CREDENTIAL, true + case 25: + return BACnetPropertyIdentifier_DEADBAND, true + case 250: + return BACnetPropertyIdentifier_ACCESS_EVENT_TIME, true + case 251: + return BACnetPropertyIdentifier_ACCESS_TRANSACTION_EVENTS, true + case 252: + return BACnetPropertyIdentifier_ACCOMPANIMENT, true + case 253: + return BACnetPropertyIdentifier_ACCOMPANIMENT_TIME, true + case 254: + return BACnetPropertyIdentifier_ACTIVATION_TIME, true + case 255: + return BACnetPropertyIdentifier_ACTIVE_AUTHENTICATION_POLICY, true + case 256: + return BACnetPropertyIdentifier_ASSIGNED_ACCESS_RIGHTS, true + case 257: + return BACnetPropertyIdentifier_AUTHENTICATION_FACTORS, true + case 258: + return BACnetPropertyIdentifier_AUTHENTICATION_POLICY_LIST, true + case 259: + return BACnetPropertyIdentifier_AUTHENTICATION_POLICY_NAMES, true + case 26: + return BACnetPropertyIdentifier_DERIVATIVE_CONSTANT, true + case 260: + return BACnetPropertyIdentifier_AUTHENTICATION_STATUS, true + case 261: + return BACnetPropertyIdentifier_AUTHORIZATION_MODE, true + case 262: + return BACnetPropertyIdentifier_BELONGS_TO, true + case 263: + return BACnetPropertyIdentifier_CREDENTIAL_DISABLE, true + case 264: + return BACnetPropertyIdentifier_CREDENTIAL_STATUS, true + case 265: + return BACnetPropertyIdentifier_CREDENTIALS, true + case 266: + return BACnetPropertyIdentifier_CREDENTIALS_IN_ZONE, true + case 267: + return BACnetPropertyIdentifier_DAYS_REMAINING, true + case 268: + return BACnetPropertyIdentifier_ENTRY_POINTS, true + case 269: + return BACnetPropertyIdentifier_EXIT_POINTS, true + case 27: + return BACnetPropertyIdentifier_DERIVATIVE_CONSTANT_UNITS, true + case 270: + return BACnetPropertyIdentifier_EXPIRATION_TIME, true + case 271: + return BACnetPropertyIdentifier_EXTENDED_TIME_ENABLE, true + case 272: + return BACnetPropertyIdentifier_FAILED_ATTEMPT_EVENTS, true + case 273: + return BACnetPropertyIdentifier_FAILED_ATTEMPTS, true + case 274: + return BACnetPropertyIdentifier_FAILED_ATTEMPTS_TIME, true + case 275: + return BACnetPropertyIdentifier_LAST_ACCESS_EVENT, true + case 276: + return BACnetPropertyIdentifier_LAST_ACCESS_POINT, true + case 277: + return BACnetPropertyIdentifier_LAST_CREDENTIAL_ADDED, true + case 278: + return BACnetPropertyIdentifier_LAST_CREDENTIAL_ADDED_TIME, true + case 279: + return BACnetPropertyIdentifier_LAST_CREDENTIAL_REMOVED, true + case 28: + return BACnetPropertyIdentifier_DESCRIPTION, true + case 280: + return BACnetPropertyIdentifier_LAST_CREDENTIAL_REMOVED_TIME, true + case 281: + return BACnetPropertyIdentifier_LAST_USE_TIME, true + case 282: + return BACnetPropertyIdentifier_LOCKOUT, true + case 283: + return BACnetPropertyIdentifier_LOCKOUT_RELINQUISH_TIME, true + case 285: + return BACnetPropertyIdentifier_MAX_FAILED_ATTEMPTS, true + case 286: + return BACnetPropertyIdentifier_MEMBERS, true + case 287: + return BACnetPropertyIdentifier_MUSTER_POINT, true + case 288: + return BACnetPropertyIdentifier_NEGATIVE_ACCESS_RULES, true + case 289: + return BACnetPropertyIdentifier_NUMBER_OF_AUTHENTICATION_POLICIES, true + case 29: + return BACnetPropertyIdentifier_DESCRIPTION_OF_HALT, true + case 290: + return BACnetPropertyIdentifier_OCCUPANCY_COUNT, true + case 291: + return BACnetPropertyIdentifier_OCCUPANCY_COUNT_ADJUST, true + case 292: + return BACnetPropertyIdentifier_OCCUPANCY_COUNT_ENABLE, true + case 294: + return BACnetPropertyIdentifier_OCCUPANCY_LOWER_LIMIT, true + case 295: + return BACnetPropertyIdentifier_OCCUPANCY_LOWER_LIMIT_ENFORCED, true + case 296: + return BACnetPropertyIdentifier_OCCUPANCY_STATE, true + case 297: + return BACnetPropertyIdentifier_OCCUPANCY_UPPER_LIMIT, true + case 298: + return BACnetPropertyIdentifier_OCCUPANCY_UPPER_LIMIT_ENFORCED, true + case 3: + return BACnetPropertyIdentifier_ACTION_TEXT, true + case 30: + return BACnetPropertyIdentifier_DEVICE_ADDRESS_BINDING, true + case 300: + return BACnetPropertyIdentifier_PASSBACK_MODE, true + case 301: + return BACnetPropertyIdentifier_PASSBACK_TIMEOUT, true + case 302: + return BACnetPropertyIdentifier_POSITIVE_ACCESS_RULES, true + case 303: + return BACnetPropertyIdentifier_REASON_FOR_DISABLE, true + case 304: + return BACnetPropertyIdentifier_SUPPORTED_FORMATS, true + case 305: + return BACnetPropertyIdentifier_SUPPORTED_FORMAT_CLASSES, true + case 306: + return BACnetPropertyIdentifier_THREAT_AUTHORITY, true + case 307: + return BACnetPropertyIdentifier_THREAT_LEVEL, true + case 308: + return BACnetPropertyIdentifier_TRACE_FLAG, true + case 309: + return BACnetPropertyIdentifier_TRANSACTION_NOTIFICATION_CLASS, true + case 31: + return BACnetPropertyIdentifier_DEVICE_TYPE, true + case 310: + return BACnetPropertyIdentifier_USER_EXTERNAL_IDENTIFIER, true + case 311: + return BACnetPropertyIdentifier_USER_INFORMATION_REFERENCE, true + case 317: + return BACnetPropertyIdentifier_USER_NAME, true + case 318: + return BACnetPropertyIdentifier_USER_TYPE, true + case 319: + return BACnetPropertyIdentifier_USES_REMAINING, true + case 32: + return BACnetPropertyIdentifier_EFFECTIVE_PERIOD, true + case 320: + return BACnetPropertyIdentifier_ZONE_FROM, true + case 321: + return BACnetPropertyIdentifier_ZONE_TO, true + case 322: + return BACnetPropertyIdentifier_ACCESS_EVENT_TAG, true + case 323: + return BACnetPropertyIdentifier_GLOBAL_IDENTIFIER, true + case 326: + return BACnetPropertyIdentifier_VERIFICATION_TIME, true + case 327: + return BACnetPropertyIdentifier_BASE_DEVICE_SECURITY_POLICY, true + case 328: + return BACnetPropertyIdentifier_DISTRIBUTION_KEY_REVISION, true + case 329: + return BACnetPropertyIdentifier_DO_NOT_HIDE, true + case 33: + return BACnetPropertyIdentifier_ELAPSED_ACTIVE_TIME, true + case 330: + return BACnetPropertyIdentifier_KEY_SETS, true + case 331: + return BACnetPropertyIdentifier_LAST_KEY_SERVER, true + case 332: + return BACnetPropertyIdentifier_NETWORK_ACCESS_SECURITY_POLICIES, true + case 333: + return BACnetPropertyIdentifier_PACKET_REORDER_TIME, true + case 334: + return BACnetPropertyIdentifier_SECURITY_PDU_TIMEOUT, true + case 335: + return BACnetPropertyIdentifier_SECURITY_TIME_WINDOW, true + case 336: + return BACnetPropertyIdentifier_SUPPORTED_SECURITY_ALGORITHMS, true + case 337: + return BACnetPropertyIdentifier_UPDATE_KEY_SET_TIMEOUT, true + case 338: + return BACnetPropertyIdentifier_BACKUP_AND_RESTORE_STATE, true + case 339: + return BACnetPropertyIdentifier_BACKUP_PREPARATION_TIME, true + case 34: + return BACnetPropertyIdentifier_ERROR_LIMIT, true + case 340: + return BACnetPropertyIdentifier_RESTORE_COMPLETION_TIME, true + case 341: + return BACnetPropertyIdentifier_RESTORE_PREPARATION_TIME, true + case 342: + return BACnetPropertyIdentifier_BIT_MASK, true + case 343: + return BACnetPropertyIdentifier_BIT_TEXT, true + case 344: + return BACnetPropertyIdentifier_IS_UTC, true + case 345: + return BACnetPropertyIdentifier_GROUP_MEMBERS, true + case 346: + return BACnetPropertyIdentifier_GROUP_MEMBER_NAMES, true + case 347: + return BACnetPropertyIdentifier_MEMBER_STATUS_FLAGS, true + case 348: + return BACnetPropertyIdentifier_REQUESTED_UPDATE_INTERVAL, true + case 349: + return BACnetPropertyIdentifier_COVU_PERIOD, true + case 35: + return BACnetPropertyIdentifier_EVENT_ENABLE, true + case 350: + return BACnetPropertyIdentifier_COVU_RECIPIENTS, true + case 351: + return BACnetPropertyIdentifier_EVENT_MESSAGE_TEXTS, true + case 352: + return BACnetPropertyIdentifier_EVENT_MESSAGE_TEXTS_CONFIG, true + case 353: + return BACnetPropertyIdentifier_EVENT_DETECTION_ENABLE, true + case 354: + return BACnetPropertyIdentifier_EVENT_ALGORITHM_INHIBIT, true + case 355: + return BACnetPropertyIdentifier_EVENT_ALGORITHM_INHIBIT_REF, true + case 356: + return BACnetPropertyIdentifier_TIME_DELAY_NORMAL, true + case 357: + return BACnetPropertyIdentifier_RELIABILITY_EVALUATION_INHIBIT, true + case 358: + return BACnetPropertyIdentifier_FAULT_PARAMETERS, true + case 359: + return BACnetPropertyIdentifier_FAULT_TYPE, true + case 36: + return BACnetPropertyIdentifier_EVENT_STATE, true + case 360: + return BACnetPropertyIdentifier_LOCAL_FORWARDING_ONLY, true + case 361: + return BACnetPropertyIdentifier_PROCESS_IDENTIFIER_FILTER, true + case 362: + return BACnetPropertyIdentifier_SUBSCRIBED_RECIPIENTS, true + case 363: + return BACnetPropertyIdentifier_PORT_FILTER, true + case 364: + return BACnetPropertyIdentifier_AUTHORIZATION_EXEMPTIONS, true + case 365: + return BACnetPropertyIdentifier_ALLOW_GROUP_DELAY_INHIBIT, true + case 366: + return BACnetPropertyIdentifier_CHANNEL_NUMBER, true + case 367: + return BACnetPropertyIdentifier_CONTROL_GROUPS, true + case 368: + return BACnetPropertyIdentifier_EXECUTION_DELAY, true + case 369: + return BACnetPropertyIdentifier_LAST_PRIORITY, true + case 37: + return BACnetPropertyIdentifier_EVENT_TYPE, true + case 370: + return BACnetPropertyIdentifier_WRITE_STATUS, true + case 371: + return BACnetPropertyIdentifier_PROPERTY_LIST, true + case 372: + return BACnetPropertyIdentifier_SERIAL_NUMBER, true + case 373: + return BACnetPropertyIdentifier_BLINK_WARN_ENABLE, true + case 374: + return BACnetPropertyIdentifier_DEFAULT_FADE_TIME, true + case 375: + return BACnetPropertyIdentifier_DEFAULT_RAMP_RATE, true + case 376: + return BACnetPropertyIdentifier_DEFAULT_STEP_INCREMENT, true + case 377: + return BACnetPropertyIdentifier_EGRESS_TIME, true + case 378: + return BACnetPropertyIdentifier_IN_PROGRESS, true + case 379: + return BACnetPropertyIdentifier_INSTANTANEOUS_POWER, true + case 38: + return BACnetPropertyIdentifier_EXCEPTION_SCHEDULE, true + case 380: + return BACnetPropertyIdentifier_LIGHTING_COMMAND, true + case 381: + return BACnetPropertyIdentifier_LIGHTING_COMMAND_DEFAULT_PRIORITY, true + case 382: + return BACnetPropertyIdentifier_MAX_ACTUAL_VALUE, true + case 383: + return BACnetPropertyIdentifier_MIN_ACTUAL_VALUE, true + case 384: + return BACnetPropertyIdentifier_POWER, true + case 385: + return BACnetPropertyIdentifier_TRANSITION, true + case 386: + return BACnetPropertyIdentifier_EGRESS_ACTIVE, true + case 387: + return BACnetPropertyIdentifier_INTERFACE_VALUE, true + case 388: + return BACnetPropertyIdentifier_FAULT_HIGH_LIMIT, true + case 389: + return BACnetPropertyIdentifier_FAULT_LOW_LIMIT, true + case 39: + return BACnetPropertyIdentifier_FAULT_VALUES, true + case 390: + return BACnetPropertyIdentifier_LOW_DIFF_LIMIT, true + case 391: + return BACnetPropertyIdentifier_STRIKE_COUNT, true + case 392: + return BACnetPropertyIdentifier_TIME_OF_STRIKE_COUNT_RESET, true + case 393: + return BACnetPropertyIdentifier_DEFAULT_TIMEOUT, true + case 394: + return BACnetPropertyIdentifier_INITIAL_TIMEOUT, true + case 395: + return BACnetPropertyIdentifier_LAST_STATE_CHANGE, true + case 396: + return BACnetPropertyIdentifier_STATE_CHANGE_VALUES, true + case 397: + return BACnetPropertyIdentifier_TIMER_RUNNING, true + case 398: + return BACnetPropertyIdentifier_TIMER_STATE, true + case 399: + return BACnetPropertyIdentifier_APDU_LENGTH, true + case 4: + return BACnetPropertyIdentifier_ACTIVE_TEXT, true + case 40: + return BACnetPropertyIdentifier_FEEDBACK_VALUE, true + case 400: + return BACnetPropertyIdentifier_IP_ADDRESS, true + case 401: + return BACnetPropertyIdentifier_IP_DEFAULT_GATEWAY, true + case 402: + return BACnetPropertyIdentifier_IP_DHCP_ENABLE, true + case 403: + return BACnetPropertyIdentifier_IP_DHCP_LEASE_TIME, true + case 404: + return BACnetPropertyIdentifier_IP_DHCP_LEASE_TIME_REMAINING, true + case 405: + return BACnetPropertyIdentifier_IP_DHCP_SERVER, true + case 406: + return BACnetPropertyIdentifier_IP_DNS_SERVER, true + case 407: + return BACnetPropertyIdentifier_BACNET_IP_GLOBAL_ADDRESS, true + case 408: + return BACnetPropertyIdentifier_BACNET_IP_MODE, true + case 409: + return BACnetPropertyIdentifier_BACNET_IP_MULTICAST_ADDRESS, true + case 41: + return BACnetPropertyIdentifier_FILE_ACCESS_METHOD, true + case 410: + return BACnetPropertyIdentifier_BACNET_IP_NAT_TRAVERSAL, true + case 411: + return BACnetPropertyIdentifier_IP_SUBNET_MASK, true + case 412: + return BACnetPropertyIdentifier_BACNET_IP_UDP_PORT, true + case 413: + return BACnetPropertyIdentifier_BBMD_ACCEPT_FD_REGISTRATIONS, true + case 414: + return BACnetPropertyIdentifier_BBMD_BROADCAST_DISTRIBUTION_TABLE, true + case 415: + return BACnetPropertyIdentifier_BBMD_FOREIGN_DEVICE_TABLE, true + case 416: + return BACnetPropertyIdentifier_CHANGES_PENDING, true + case 417: + return BACnetPropertyIdentifier_COMMAND, true + case 418: + return BACnetPropertyIdentifier_FD_BBMD_ADDRESS, true + case 419: + return BACnetPropertyIdentifier_FD_SUBSCRIPTION_LIFETIME, true + case 42: + return BACnetPropertyIdentifier_FILE_SIZE, true + case 420: + return BACnetPropertyIdentifier_LINK_SPEED, true + case 421: + return BACnetPropertyIdentifier_LINK_SPEEDS, true + case 422: + return BACnetPropertyIdentifier_LINK_SPEED_AUTONEGOTIATE, true + case 423: + return BACnetPropertyIdentifier_MAC_ADDRESS, true + case 424: + return BACnetPropertyIdentifier_NETWORK_INTERFACE_NAME, true + case 425: + return BACnetPropertyIdentifier_NETWORK_NUMBER, true + case 426: + return BACnetPropertyIdentifier_NETWORK_NUMBER_QUALITY, true + case 427: + return BACnetPropertyIdentifier_NETWORK_TYPE, true + case 428: + return BACnetPropertyIdentifier_ROUTING_TABLE, true + case 429: + return BACnetPropertyIdentifier_VIRTUAL_MAC_ADDRESS_TABLE, true + case 43: + return BACnetPropertyIdentifier_FILE_TYPE, true + case 430: + return BACnetPropertyIdentifier_COMMAND_TIME_ARRAY, true + case 431: + return BACnetPropertyIdentifier_CURRENT_COMMAND_PRIORITY, true + case 432: + return BACnetPropertyIdentifier_LAST_COMMAND_TIME, true + case 433: + return BACnetPropertyIdentifier_VALUE_SOURCE, true + case 434: + return BACnetPropertyIdentifier_VALUE_SOURCE_ARRAY, true + case 435: + return BACnetPropertyIdentifier_BACNET_IPV6_MODE, true + case 436: + return BACnetPropertyIdentifier_IPV6_ADDRESS, true + case 437: + return BACnetPropertyIdentifier_IPV6_PREFIX_LENGTH, true + case 438: + return BACnetPropertyIdentifier_BACNET_IPV6_UDP_PORT, true + case 439: + return BACnetPropertyIdentifier_IPV6_DEFAULT_GATEWAY, true + case 44: + return BACnetPropertyIdentifier_FIRMWARE_REVISION, true + case 440: + return BACnetPropertyIdentifier_BACNET_IPV6_MULTICAST_ADDRESS, true + case 441: + return BACnetPropertyIdentifier_IPV6_DNS_SERVER, true + case 442: + return BACnetPropertyIdentifier_IPV6_AUTO_ADDRESSING_ENABLE, true + case 443: + return BACnetPropertyIdentifier_IPV6_DHCP_LEASE_TIME, true + case 444: + return BACnetPropertyIdentifier_IPV6_DHCP_LEASE_TIME_REMAINING, true + case 445: + return BACnetPropertyIdentifier_IPV6_DHCP_SERVER, true + case 446: + return BACnetPropertyIdentifier_IPV6_ZONE_INDEX, true + case 447: + return BACnetPropertyIdentifier_ASSIGNED_LANDING_CALLS, true + case 448: + return BACnetPropertyIdentifier_CAR_ASSIGNED_DIRECTION, true + case 449: + return BACnetPropertyIdentifier_CAR_DOOR_COMMAND, true + case 45: + return BACnetPropertyIdentifier_HIGH_LIMIT, true + case 450: + return BACnetPropertyIdentifier_CAR_DOOR_STATUS, true + case 451: + return BACnetPropertyIdentifier_CAR_DOOR_TEXT, true + case 452: + return BACnetPropertyIdentifier_CAR_DOOR_ZONE, true + case 453: + return BACnetPropertyIdentifier_CAR_DRIVE_STATUS, true + case 454: + return BACnetPropertyIdentifier_CAR_LOAD, true + case 455: + return BACnetPropertyIdentifier_CAR_LOAD_UNITS, true + case 456: + return BACnetPropertyIdentifier_CAR_MODE, true + case 457: + return BACnetPropertyIdentifier_CAR_MOVING_DIRECTION, true + case 458: + return BACnetPropertyIdentifier_CAR_POSITION, true + case 459: + return BACnetPropertyIdentifier_ELEVATOR_GROUP, true + case 46: + return BACnetPropertyIdentifier_INACTIVE_TEXT, true + case 460: + return BACnetPropertyIdentifier_ENERGY_METER, true + case 461: + return BACnetPropertyIdentifier_ENERGY_METER_REF, true + case 462: + return BACnetPropertyIdentifier_ESCALATOR_MODE, true + case 463: + return BACnetPropertyIdentifier_FAULT_SIGNALS, true + case 464: + return BACnetPropertyIdentifier_FLOOR_TEXT, true + case 465: + return BACnetPropertyIdentifier_GROUP_ID, true + case 467: + return BACnetPropertyIdentifier_GROUP_MODE, true + case 468: + return BACnetPropertyIdentifier_HIGHER_DECK, true + case 469: + return BACnetPropertyIdentifier_INSTALLATION_ID, true + case 47: + return BACnetPropertyIdentifier_IN_PROCESS, true + case 470: + return BACnetPropertyIdentifier_LANDING_CALLS, true + case 471: + return BACnetPropertyIdentifier_LANDING_CALL_CONTROL, true + case 472: + return BACnetPropertyIdentifier_LANDING_DOOR_STATUS, true + case 473: + return BACnetPropertyIdentifier_LOWER_DECK, true + case 474: + return BACnetPropertyIdentifier_MACHINE_ROOM_ID, true + case 475: + return BACnetPropertyIdentifier_MAKING_CAR_CALL, true + case 476: + return BACnetPropertyIdentifier_NEXT_STOPPING_FLOOR, true + case 477: + return BACnetPropertyIdentifier_OPERATION_DIRECTION, true + case 478: + return BACnetPropertyIdentifier_PASSENGER_ALARM, true + case 479: + return BACnetPropertyIdentifier_POWER_MODE, true + case 48: + return BACnetPropertyIdentifier_INSTANCE_OF, true + case 480: + return BACnetPropertyIdentifier_REGISTERED_CAR_CALL, true + case 481: + return BACnetPropertyIdentifier_ACTIVE_COV_MULTIPLE_SUBSCRIPTIONS, true + case 482: + return BACnetPropertyIdentifier_PROTOCOL_LEVEL, true + case 483: + return BACnetPropertyIdentifier_REFERENCE_PORT, true + case 484: + return BACnetPropertyIdentifier_DEPLOYED_PROFILE_LOCATION, true + case 485: + return BACnetPropertyIdentifier_PROFILE_LOCATION, true + case 486: + return BACnetPropertyIdentifier_TAGS, true + case 487: + return BACnetPropertyIdentifier_SUBORDINATE_NODE_TYPES, true + case 488: + return BACnetPropertyIdentifier_SUBORDINATE_TAGS, true + case 489: + return BACnetPropertyIdentifier_SUBORDINATE_RELATIONSHIPS, true + case 49: + return BACnetPropertyIdentifier_INTEGRAL_CONSTANT, true + case 490: + return BACnetPropertyIdentifier_DEFAULT_SUBORDINATE_RELATIONSHIP, true + case 491: + return BACnetPropertyIdentifier_REPRESENTS, true + case 5: + return BACnetPropertyIdentifier_ACTIVE_VT_SESSIONS, true + case 50: + return BACnetPropertyIdentifier_INTEGRAL_CONSTANT_UNITS, true + case 52: + return BACnetPropertyIdentifier_LIMIT_ENABLE, true + case 53: + return BACnetPropertyIdentifier_LIST_OF_GROUP_MEMBERS, true + case 54: + return BACnetPropertyIdentifier_LIST_OF_OBJECT_PROPERTY_REFERENCES, true + case 56: + return BACnetPropertyIdentifier_LOCAL_DATE, true + case 57: + return BACnetPropertyIdentifier_LOCAL_TIME, true + case 58: + return BACnetPropertyIdentifier_LOCATION, true + case 59: + return BACnetPropertyIdentifier_LOW_LIMIT, true + case 6: + return BACnetPropertyIdentifier_ALARM_VALUE, true + case 60: + return BACnetPropertyIdentifier_MANIPULATED_VARIABLE_REFERENCE, true + case 61: + return BACnetPropertyIdentifier_MAXIMUM_OUTPUT, true + case 62: + return BACnetPropertyIdentifier_MAX_APDU_LENGTH_ACCEPTED, true + case 63: + return BACnetPropertyIdentifier_MAX_INFO_FRAMES, true + case 64: + return BACnetPropertyIdentifier_MAX_MASTER, true + case 65: + return BACnetPropertyIdentifier_MAX_PRES_VALUE, true + case 66: + return BACnetPropertyIdentifier_MINIMUM_OFF_TIME, true + case 67: + return BACnetPropertyIdentifier_MINIMUM_ON_TIME, true + case 68: + return BACnetPropertyIdentifier_MINIMUM_OUTPUT, true + case 69: + return BACnetPropertyIdentifier_MIN_PRES_VALUE, true + case 7: + return BACnetPropertyIdentifier_ALARM_VALUES, true + case 70: + return BACnetPropertyIdentifier_MODEL_NAME, true + case 71: + return BACnetPropertyIdentifier_MODIFICATION_DATE, true + case 72: + return BACnetPropertyIdentifier_NOTIFY_TYPE, true + case 73: + return BACnetPropertyIdentifier_NUMBER_OF_APDU_RETRIES, true + case 74: + return BACnetPropertyIdentifier_NUMBER_OF_STATES, true + case 75: + return BACnetPropertyIdentifier_OBJECT_IDENTIFIER, true + case 76: + return BACnetPropertyIdentifier_OBJECT_LIST, true + case 77: + return BACnetPropertyIdentifier_OBJECT_NAME, true + case 78: + return BACnetPropertyIdentifier_OBJECT_PROPERTY_REFERENCE, true + case 79: + return BACnetPropertyIdentifier_OBJECT_TYPE, true + case 8: + return BACnetPropertyIdentifier_ALL, true + case 80: + return BACnetPropertyIdentifier_OPTIONAL, true + case 81: + return BACnetPropertyIdentifier_OUT_OF_SERVICE, true + case 82: + return BACnetPropertyIdentifier_OUTPUT_UNITS, true + case 83: + return BACnetPropertyIdentifier_EVENT_PARAMETERS, true + case 84: + return BACnetPropertyIdentifier_POLARITY, true + case 85: + return BACnetPropertyIdentifier_PRESENT_VALUE, true + case 86: + return BACnetPropertyIdentifier_PRIORITY, true + case 87: + return BACnetPropertyIdentifier_PRIORITY_ARRAY, true + case 88: + return BACnetPropertyIdentifier_PRIORITY_FOR_WRITING, true + case 89: + return BACnetPropertyIdentifier_PROCESS_IDENTIFIER, true + case 9: + return BACnetPropertyIdentifier_ALL_WRITES_SUCCESSFUL, true + case 90: + return BACnetPropertyIdentifier_PROGRAM_CHANGE, true + case 91: + return BACnetPropertyIdentifier_PROGRAM_LOCATION, true + case 92: + return BACnetPropertyIdentifier_PROGRAM_STATE, true + case 93: + return BACnetPropertyIdentifier_PROPORTIONAL_CONSTANT, true + case 94: + return BACnetPropertyIdentifier_PROPORTIONAL_CONSTANT_UNITS, true + case 95: + return BACnetPropertyIdentifier_PROTOCOL_CONFORMANCE_CLASS, true + case 96: + return BACnetPropertyIdentifier_PROTOCOL_OBJECT_TYPES_SUPPORTED, true + case 97: + return BACnetPropertyIdentifier_PROTOCOL_SERVICES_SUPPORTED, true + case 98: + return BACnetPropertyIdentifier_PROTOCOL_VERSION, true + case 99: + return BACnetPropertyIdentifier_READ_ONLY, true + case 9999: + return BACnetPropertyIdentifier_VENDOR_PROPRIETARY_VALUE, true } return 0, false } @@ -2805,13 +2805,13 @@ func BACnetPropertyIdentifierByName(value string) (enum BACnetPropertyIdentifier return 0, false } -func BACnetPropertyIdentifierKnows(value uint32) bool { +func BACnetPropertyIdentifierKnows(value uint32) bool { for _, typeValue := range BACnetPropertyIdentifierValues { if uint32(typeValue) == value { return true } } - return false + return false; } func CastBACnetPropertyIdentifier(structType interface{}) BACnetPropertyIdentifier { @@ -3787,3 +3787,4 @@ func (e BACnetPropertyIdentifier) PLC4XEnumName() string { func (e BACnetPropertyIdentifier) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyIdentifierTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyIdentifierTagged.go index ca98e6be0e3..7c93499e61e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyIdentifierTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyIdentifierTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyIdentifierTagged is the corresponding interface of BACnetPropertyIdentifierTagged type BACnetPropertyIdentifierTagged interface { @@ -50,15 +52,16 @@ type BACnetPropertyIdentifierTaggedExactly interface { // _BACnetPropertyIdentifierTagged is the data-structure of this message type _BACnetPropertyIdentifierTagged struct { - Header BACnetTagHeader - Value BACnetPropertyIdentifier - ProprietaryValue uint32 + Header BACnetTagHeader + Value BACnetPropertyIdentifier + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_BACnetPropertyIdentifierTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyIdentifierTagged factory function for _BACnetPropertyIdentifierTagged -func NewBACnetPropertyIdentifierTagged(header BACnetTagHeader, value BACnetPropertyIdentifier, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_BACnetPropertyIdentifierTagged { - return &_BACnetPropertyIdentifierTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetPropertyIdentifierTagged( header BACnetTagHeader , value BACnetPropertyIdentifier , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_BACnetPropertyIdentifierTagged { +return &_BACnetPropertyIdentifierTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetPropertyIdentifierTagged(structType interface{}) BACnetPropertyIdentifierTagged { - if casted, ok := structType.(BACnetPropertyIdentifierTagged); ok { + if casted, ok := structType.(BACnetPropertyIdentifierTagged); ok { return casted } if casted, ok := structType.(*BACnetPropertyIdentifierTagged); ok { @@ -123,16 +127,17 @@ func (m *_BACnetPropertyIdentifierTagged) GetLengthInBits(ctx context.Context) u lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetPropertyIdentifierTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetPropertyIdentifierTaggedParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetPropertyIdentifierTagged") } @@ -164,12 +169,12 @@ func BACnetPropertyIdentifierTaggedParseWithBuffer(ctx context.Context, readBuff } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func BACnetPropertyIdentifierTaggedParseWithBuffer(ctx context.Context, readBuff } var value BACnetPropertyIdentifier if _value != nil { - value = _value.(BACnetPropertyIdentifier) + value = _value.(BACnetPropertyIdentifier) } // Virtual field @@ -195,7 +200,7 @@ func BACnetPropertyIdentifierTaggedParseWithBuffer(ctx context.Context, readBuff } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetPropertyIdentifierTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func BACnetPropertyIdentifierTaggedParseWithBuffer(ctx context.Context, readBuff // Create the instance return &_BACnetPropertyIdentifierTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetPropertyIdentifierTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_BACnetPropertyIdentifierTagged) Serialize() ([]byte, error) { func (m *_BACnetPropertyIdentifierTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetPropertyIdentifierTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetPropertyIdentifierTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetPropertyIdentifierTagged") } @@ -261,6 +266,7 @@ func (m *_BACnetPropertyIdentifierTagged) SerializeWithWriteBuffer(ctx context.C return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_BACnetPropertyIdentifierTagged) GetTagNumber() uint8 { func (m *_BACnetPropertyIdentifierTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_BACnetPropertyIdentifierTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyReference.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyReference.go index e4c76ca8662..51827fee800 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyReference.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyReference.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyReference is the corresponding interface of BACnetPropertyReference type BACnetPropertyReference interface { @@ -47,10 +49,11 @@ type BACnetPropertyReferenceExactly interface { // _BACnetPropertyReference is the data-structure of this message type _BACnetPropertyReference struct { - PropertyIdentifier BACnetPropertyIdentifierTagged - ArrayIndex BACnetContextTagUnsignedInteger + PropertyIdentifier BACnetPropertyIdentifierTagged + ArrayIndex BACnetContextTagUnsignedInteger } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -69,14 +72,15 @@ func (m *_BACnetPropertyReference) GetArrayIndex() BACnetContextTagUnsignedInteg /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyReference factory function for _BACnetPropertyReference -func NewBACnetPropertyReference(propertyIdentifier BACnetPropertyIdentifierTagged, arrayIndex BACnetContextTagUnsignedInteger) *_BACnetPropertyReference { - return &_BACnetPropertyReference{PropertyIdentifier: propertyIdentifier, ArrayIndex: arrayIndex} +func NewBACnetPropertyReference( propertyIdentifier BACnetPropertyIdentifierTagged , arrayIndex BACnetContextTagUnsignedInteger ) *_BACnetPropertyReference { +return &_BACnetPropertyReference{ PropertyIdentifier: propertyIdentifier , ArrayIndex: arrayIndex } } // Deprecated: use the interface for direct cast func CastBACnetPropertyReference(structType interface{}) BACnetPropertyReference { - if casted, ok := structType.(BACnetPropertyReference); ok { + if casted, ok := structType.(BACnetPropertyReference); ok { return casted } if casted, ok := structType.(*BACnetPropertyReference); ok { @@ -103,6 +107,7 @@ func (m *_BACnetPropertyReference) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetPropertyReference) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -124,7 +129,7 @@ func BACnetPropertyReferenceParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("propertyIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for propertyIdentifier") } - _propertyIdentifier, _propertyIdentifierErr := BACnetPropertyIdentifierTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_propertyIdentifier, _propertyIdentifierErr := BACnetPropertyIdentifierTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _propertyIdentifierErr != nil { return nil, errors.Wrap(_propertyIdentifierErr, "Error parsing 'propertyIdentifier' field of BACnetPropertyReference") } @@ -135,12 +140,12 @@ func BACnetPropertyReferenceParseWithBuffer(ctx context.Context, readBuffer util // Optional Field (arrayIndex) (Can be skipped, if a given expression evaluates to false) var arrayIndex BACnetContextTagUnsignedInteger = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("arrayIndex"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for arrayIndex") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(1), BACnetDataType_UNSIGNED_INTEGER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(1) , BACnetDataType_UNSIGNED_INTEGER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -161,9 +166,9 @@ func BACnetPropertyReferenceParseWithBuffer(ctx context.Context, readBuffer util // Create the instance return &_BACnetPropertyReference{ - PropertyIdentifier: propertyIdentifier, - ArrayIndex: arrayIndex, - }, nil + PropertyIdentifier: propertyIdentifier, + ArrayIndex: arrayIndex, + }, nil } func (m *_BACnetPropertyReference) Serialize() ([]byte, error) { @@ -177,7 +182,7 @@ func (m *_BACnetPropertyReference) Serialize() ([]byte, error) { func (m *_BACnetPropertyReference) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetPropertyReference"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetPropertyReference"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetPropertyReference") } @@ -215,6 +220,7 @@ func (m *_BACnetPropertyReference) SerializeWithWriteBuffer(ctx context.Context, return nil } + func (m *_BACnetPropertyReference) isBACnetPropertyReference() bool { return true } @@ -229,3 +235,6 @@ func (m *_BACnetPropertyReference) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyReferenceEnclosed.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyReferenceEnclosed.go index 8073979a813..3d6308a4488 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyReferenceEnclosed.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyReferenceEnclosed.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyReferenceEnclosed is the corresponding interface of BACnetPropertyReferenceEnclosed type BACnetPropertyReferenceEnclosed interface { @@ -48,14 +50,15 @@ type BACnetPropertyReferenceEnclosedExactly interface { // _BACnetPropertyReferenceEnclosed is the data-structure of this message type _BACnetPropertyReferenceEnclosed struct { - OpeningTag BACnetOpeningTag - Reference BACnetPropertyReference - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + Reference BACnetPropertyReference + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -78,14 +81,15 @@ func (m *_BACnetPropertyReferenceEnclosed) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyReferenceEnclosed factory function for _BACnetPropertyReferenceEnclosed -func NewBACnetPropertyReferenceEnclosed(openingTag BACnetOpeningTag, reference BACnetPropertyReference, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetPropertyReferenceEnclosed { - return &_BACnetPropertyReferenceEnclosed{OpeningTag: openingTag, Reference: reference, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetPropertyReferenceEnclosed( openingTag BACnetOpeningTag , reference BACnetPropertyReference , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetPropertyReferenceEnclosed { +return &_BACnetPropertyReferenceEnclosed{ OpeningTag: openingTag , Reference: reference , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetPropertyReferenceEnclosed(structType interface{}) BACnetPropertyReferenceEnclosed { - if casted, ok := structType.(BACnetPropertyReferenceEnclosed); ok { + if casted, ok := structType.(BACnetPropertyReferenceEnclosed); ok { return casted } if casted, ok := structType.(*BACnetPropertyReferenceEnclosed); ok { @@ -113,6 +117,7 @@ func (m *_BACnetPropertyReferenceEnclosed) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetPropertyReferenceEnclosed) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -134,7 +139,7 @@ func BACnetPropertyReferenceEnclosedParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetPropertyReferenceEnclosed") } @@ -147,7 +152,7 @@ func BACnetPropertyReferenceEnclosedParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("reference"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for reference") } - _reference, _referenceErr := BACnetPropertyReferenceParseWithBuffer(ctx, readBuffer) +_reference, _referenceErr := BACnetPropertyReferenceParseWithBuffer(ctx, readBuffer) if _referenceErr != nil { return nil, errors.Wrap(_referenceErr, "Error parsing 'reference' field of BACnetPropertyReferenceEnclosed") } @@ -160,7 +165,7 @@ func BACnetPropertyReferenceEnclosedParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetPropertyReferenceEnclosed") } @@ -175,11 +180,11 @@ func BACnetPropertyReferenceEnclosedParseWithBuffer(ctx context.Context, readBuf // Create the instance return &_BACnetPropertyReferenceEnclosed{ - TagNumber: tagNumber, - OpeningTag: openingTag, - Reference: reference, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + Reference: reference, + ClosingTag: closingTag, + }, nil } func (m *_BACnetPropertyReferenceEnclosed) Serialize() ([]byte, error) { @@ -193,7 +198,7 @@ func (m *_BACnetPropertyReferenceEnclosed) Serialize() ([]byte, error) { func (m *_BACnetPropertyReferenceEnclosed) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetPropertyReferenceEnclosed"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetPropertyReferenceEnclosed"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetPropertyReferenceEnclosed") } @@ -239,13 +244,13 @@ func (m *_BACnetPropertyReferenceEnclosed) SerializeWithWriteBuffer(ctx context. return nil } + //// // Arguments Getter func (m *_BACnetPropertyReferenceEnclosed) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -263,3 +268,6 @@ func (m *_BACnetPropertyReferenceEnclosed) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStateActionUnknown.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStateActionUnknown.go index 468bca6a6c1..fba8da20b2b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStateActionUnknown.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStateActionUnknown.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStateActionUnknown is the corresponding interface of BACnetPropertyStateActionUnknown type BACnetPropertyStateActionUnknown interface { @@ -46,9 +48,11 @@ type BACnetPropertyStateActionUnknownExactly interface { // _BACnetPropertyStateActionUnknown is the data-structure of this message type _BACnetPropertyStateActionUnknown struct { *_BACnetPropertyStates - UnknownValue BACnetContextTagUnknown + UnknownValue BACnetContextTagUnknown } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStateActionUnknown struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStateActionUnknown) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStateActionUnknown) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStateActionUnknown) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStateActionUnknown) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStateActionUnknown) GetUnknownValue() BACnetContextTagUn /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStateActionUnknown factory function for _BACnetPropertyStateActionUnknown -func NewBACnetPropertyStateActionUnknown(unknownValue BACnetContextTagUnknown, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStateActionUnknown { +func NewBACnetPropertyStateActionUnknown( unknownValue BACnetContextTagUnknown , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStateActionUnknown { _result := &_BACnetPropertyStateActionUnknown{ - UnknownValue: unknownValue, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + UnknownValue: unknownValue, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStateActionUnknown(unknownValue BACnetContextTagUnknown, p // Deprecated: use the interface for direct cast func CastBACnetPropertyStateActionUnknown(structType interface{}) BACnetPropertyStateActionUnknown { - if casted, ok := structType.(BACnetPropertyStateActionUnknown); ok { + if casted, ok := structType.(BACnetPropertyStateActionUnknown); ok { return casted } if casted, ok := structType.(*BACnetPropertyStateActionUnknown); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStateActionUnknown) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetPropertyStateActionUnknown) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStateActionUnknownParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("unknownValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for unknownValue") } - _unknownValue, _unknownValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), BACnetDataType(BACnetDataType_UNKNOWN)) +_unknownValue, _unknownValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , BACnetDataType( BACnetDataType_UNKNOWN ) ) if _unknownValueErr != nil { return nil, errors.Wrap(_unknownValueErr, "Error parsing 'unknownValue' field of BACnetPropertyStateActionUnknown") } @@ -151,8 +155,9 @@ func BACnetPropertyStateActionUnknownParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetPropertyStateActionUnknown{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - UnknownValue: unknownValue, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + UnknownValue: unknownValue, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStateActionUnknown) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStateActionUnknown") } - // Simple Field (unknownValue) - if pushErr := writeBuffer.PushContext("unknownValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for unknownValue") - } - _unknownValueErr := writeBuffer.WriteSerializable(ctx, m.GetUnknownValue()) - if popErr := writeBuffer.PopContext("unknownValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for unknownValue") - } - if _unknownValueErr != nil { - return errors.Wrap(_unknownValueErr, "Error serializing 'unknownValue' field") - } + // Simple Field (unknownValue) + if pushErr := writeBuffer.PushContext("unknownValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for unknownValue") + } + _unknownValueErr := writeBuffer.WriteSerializable(ctx, m.GetUnknownValue()) + if popErr := writeBuffer.PopContext("unknownValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for unknownValue") + } + if _unknownValueErr != nil { + return errors.Wrap(_unknownValueErr, "Error serializing 'unknownValue' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStateActionUnknown"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStateActionUnknown") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStateActionUnknown) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStateActionUnknown) isBACnetPropertyStateActionUnknown() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStateActionUnknown) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStates.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStates.go index b53a7eaf627..13a6253bed3 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStates.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStates.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStates is the corresponding interface of BACnetPropertyStates type BACnetPropertyStates interface { @@ -47,7 +49,7 @@ type BACnetPropertyStatesExactly interface { // _BACnetPropertyStates is the data-structure of this message type _BACnetPropertyStates struct { _BACnetPropertyStatesChildRequirements - PeekedTagHeader BACnetTagHeader + PeekedTagHeader BACnetTagHeader } type _BACnetPropertyStatesChildRequirements interface { @@ -55,6 +57,7 @@ type _BACnetPropertyStatesChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type BACnetPropertyStatesParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetPropertyStates, serializeChildFunction func() error) error GetTypeName() string @@ -62,13 +65,12 @@ type BACnetPropertyStatesParent interface { type BACnetPropertyStatesChild interface { utils.Serializable - InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) +InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) GetParent() *BACnetPropertyStates GetTypeName() string BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,14 +100,15 @@ func (m *_BACnetPropertyStates) GetPeekedTagNumber() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStates factory function for _BACnetPropertyStates -func NewBACnetPropertyStates(peekedTagHeader BACnetTagHeader) *_BACnetPropertyStates { - return &_BACnetPropertyStates{PeekedTagHeader: peekedTagHeader} +func NewBACnetPropertyStates( peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStates { +return &_BACnetPropertyStates{ PeekedTagHeader: peekedTagHeader } } // Deprecated: use the interface for direct cast func CastBACnetPropertyStates(structType interface{}) BACnetPropertyStates { - if casted, ok := structType.(BACnetPropertyStates); ok { + if casted, ok := structType.(BACnetPropertyStates); ok { return casted } if casted, ok := structType.(*BACnetPropertyStates); ok { @@ -118,6 +121,7 @@ func (m *_BACnetPropertyStates) GetTypeName() string { return "BACnetPropertyStates" } + func (m *_BACnetPropertyStates) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -143,13 +147,13 @@ func BACnetPropertyStatesParseWithBuffer(ctx context.Context, readBuffer utils.R currentPos := positionAware.GetPos() _ = currentPos - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Virtual field _peekedTagNumber := peekedTagHeader.GetActualTagNumber() @@ -159,130 +163,130 @@ func BACnetPropertyStatesParseWithBuffer(ctx context.Context, readBuffer utils.R // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetPropertyStatesChildSerializeRequirement interface { BACnetPropertyStates - InitializeParent(BACnetPropertyStates, BACnetTagHeader) + InitializeParent(BACnetPropertyStates, BACnetTagHeader) GetParent() BACnetPropertyStates } var _childTemp interface{} var _child BACnetPropertyStatesChildSerializeRequirement var typeSwitchError error switch { - case peekedTagNumber == uint8(0): // BACnetPropertyStatesBoolean +case peekedTagNumber == uint8(0) : // BACnetPropertyStatesBoolean _childTemp, typeSwitchError = BACnetPropertyStatesBooleanParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(1): // BACnetPropertyStatesBinaryValue +case peekedTagNumber == uint8(1) : // BACnetPropertyStatesBinaryValue _childTemp, typeSwitchError = BACnetPropertyStatesBinaryValueParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(2): // BACnetPropertyStatesEventType +case peekedTagNumber == uint8(2) : // BACnetPropertyStatesEventType _childTemp, typeSwitchError = BACnetPropertyStatesEventTypeParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(3): // BACnetPropertyStatesPolarity +case peekedTagNumber == uint8(3) : // BACnetPropertyStatesPolarity _childTemp, typeSwitchError = BACnetPropertyStatesPolarityParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(4): // BACnetPropertyStatesProgramChange +case peekedTagNumber == uint8(4) : // BACnetPropertyStatesProgramChange _childTemp, typeSwitchError = BACnetPropertyStatesProgramChangeParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(5): // BACnetPropertyStatesProgramChange +case peekedTagNumber == uint8(5) : // BACnetPropertyStatesProgramChange _childTemp, typeSwitchError = BACnetPropertyStatesProgramChangeParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(6): // BACnetPropertyStatesReasonForHalt +case peekedTagNumber == uint8(6) : // BACnetPropertyStatesReasonForHalt _childTemp, typeSwitchError = BACnetPropertyStatesReasonForHaltParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(7): // BACnetPropertyStatesReliability +case peekedTagNumber == uint8(7) : // BACnetPropertyStatesReliability _childTemp, typeSwitchError = BACnetPropertyStatesReliabilityParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(8): // BACnetPropertyStatesState +case peekedTagNumber == uint8(8) : // BACnetPropertyStatesState _childTemp, typeSwitchError = BACnetPropertyStatesStateParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(9): // BACnetPropertyStatesSystemStatus +case peekedTagNumber == uint8(9) : // BACnetPropertyStatesSystemStatus _childTemp, typeSwitchError = BACnetPropertyStatesSystemStatusParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(10): // BACnetPropertyStatesUnits +case peekedTagNumber == uint8(10) : // BACnetPropertyStatesUnits _childTemp, typeSwitchError = BACnetPropertyStatesUnitsParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(11): // BACnetPropertyStatesExtendedValue +case peekedTagNumber == uint8(11) : // BACnetPropertyStatesExtendedValue _childTemp, typeSwitchError = BACnetPropertyStatesExtendedValueParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(12): // BACnetPropertyStatesLifeSafetyMode +case peekedTagNumber == uint8(12) : // BACnetPropertyStatesLifeSafetyMode _childTemp, typeSwitchError = BACnetPropertyStatesLifeSafetyModeParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(13): // BACnetPropertyStatesLifeSafetyState +case peekedTagNumber == uint8(13) : // BACnetPropertyStatesLifeSafetyState _childTemp, typeSwitchError = BACnetPropertyStatesLifeSafetyStateParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(14): // BACnetPropertyStatesRestartReason +case peekedTagNumber == uint8(14) : // BACnetPropertyStatesRestartReason _childTemp, typeSwitchError = BACnetPropertyStatesRestartReasonParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(15): // BACnetPropertyStatesDoorAlarmState +case peekedTagNumber == uint8(15) : // BACnetPropertyStatesDoorAlarmState _childTemp, typeSwitchError = BACnetPropertyStatesDoorAlarmStateParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(16): // BACnetPropertyStatesAction +case peekedTagNumber == uint8(16) : // BACnetPropertyStatesAction _childTemp, typeSwitchError = BACnetPropertyStatesActionParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(17): // BACnetPropertyStatesDoorSecuredStatus +case peekedTagNumber == uint8(17) : // BACnetPropertyStatesDoorSecuredStatus _childTemp, typeSwitchError = BACnetPropertyStatesDoorSecuredStatusParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(18): // BACnetPropertyStatesDoorStatus +case peekedTagNumber == uint8(18) : // BACnetPropertyStatesDoorStatus _childTemp, typeSwitchError = BACnetPropertyStatesDoorStatusParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(19): // BACnetPropertyStatesDoorValue +case peekedTagNumber == uint8(19) : // BACnetPropertyStatesDoorValue _childTemp, typeSwitchError = BACnetPropertyStatesDoorValueParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(20): // BACnetPropertyStatesFileAccessMethod +case peekedTagNumber == uint8(20) : // BACnetPropertyStatesFileAccessMethod _childTemp, typeSwitchError = BACnetPropertyStatesFileAccessMethodParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(21): // BACnetPropertyStatesLockStatus +case peekedTagNumber == uint8(21) : // BACnetPropertyStatesLockStatus _childTemp, typeSwitchError = BACnetPropertyStatesLockStatusParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(22): // BACnetPropertyStatesLifeSafetyOperations +case peekedTagNumber == uint8(22) : // BACnetPropertyStatesLifeSafetyOperations _childTemp, typeSwitchError = BACnetPropertyStatesLifeSafetyOperationsParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(23): // BACnetPropertyStatesMaintenance +case peekedTagNumber == uint8(23) : // BACnetPropertyStatesMaintenance _childTemp, typeSwitchError = BACnetPropertyStatesMaintenanceParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(24): // BACnetPropertyStatesNodeType +case peekedTagNumber == uint8(24) : // BACnetPropertyStatesNodeType _childTemp, typeSwitchError = BACnetPropertyStatesNodeTypeParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(25): // BACnetPropertyStatesNotifyType +case peekedTagNumber == uint8(25) : // BACnetPropertyStatesNotifyType _childTemp, typeSwitchError = BACnetPropertyStatesNotifyTypeParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(26): // BACnetPropertyStatesSecurityLevel +case peekedTagNumber == uint8(26) : // BACnetPropertyStatesSecurityLevel _childTemp, typeSwitchError = BACnetPropertyStatesSecurityLevelParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(27): // BACnetPropertyStatesShedState +case peekedTagNumber == uint8(27) : // BACnetPropertyStatesShedState _childTemp, typeSwitchError = BACnetPropertyStatesShedStateParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(28): // BACnetPropertyStatesSilencedState +case peekedTagNumber == uint8(28) : // BACnetPropertyStatesSilencedState _childTemp, typeSwitchError = BACnetPropertyStatesSilencedStateParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(30): // BACnetPropertyStatesAccessEvent +case peekedTagNumber == uint8(30) : // BACnetPropertyStatesAccessEvent _childTemp, typeSwitchError = BACnetPropertyStatesAccessEventParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(31): // BACnetPropertyStatesZoneOccupanyState +case peekedTagNumber == uint8(31) : // BACnetPropertyStatesZoneOccupanyState _childTemp, typeSwitchError = BACnetPropertyStatesZoneOccupanyStateParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(32): // BACnetPropertyStatesAccessCredentialDisableReason +case peekedTagNumber == uint8(32) : // BACnetPropertyStatesAccessCredentialDisableReason _childTemp, typeSwitchError = BACnetPropertyStatesAccessCredentialDisableReasonParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(33): // BACnetPropertyStatesAccessCredentialDisable +case peekedTagNumber == uint8(33) : // BACnetPropertyStatesAccessCredentialDisable _childTemp, typeSwitchError = BACnetPropertyStatesAccessCredentialDisableParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(34): // BACnetPropertyStatesAuthenticationStatus +case peekedTagNumber == uint8(34) : // BACnetPropertyStatesAuthenticationStatus _childTemp, typeSwitchError = BACnetPropertyStatesAuthenticationStatusParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(36): // BACnetPropertyStatesBackupState +case peekedTagNumber == uint8(36) : // BACnetPropertyStatesBackupState _childTemp, typeSwitchError = BACnetPropertyStatesBackupStateParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(37): // BACnetPropertyStatesWriteStatus +case peekedTagNumber == uint8(37) : // BACnetPropertyStatesWriteStatus _childTemp, typeSwitchError = BACnetPropertyStatesWriteStatusParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(38): // BACnetPropertyStatesLightningInProgress +case peekedTagNumber == uint8(38) : // BACnetPropertyStatesLightningInProgress _childTemp, typeSwitchError = BACnetPropertyStatesLightningInProgressParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(39): // BACnetPropertyStatesLightningOperation +case peekedTagNumber == uint8(39) : // BACnetPropertyStatesLightningOperation _childTemp, typeSwitchError = BACnetPropertyStatesLightningOperationParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(40): // BACnetPropertyStatesLightningTransition +case peekedTagNumber == uint8(40) : // BACnetPropertyStatesLightningTransition _childTemp, typeSwitchError = BACnetPropertyStatesLightningTransitionParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(41): // BACnetPropertyStatesIntegerValue +case peekedTagNumber == uint8(41) : // BACnetPropertyStatesIntegerValue _childTemp, typeSwitchError = BACnetPropertyStatesIntegerValueParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(42): // BACnetPropertyStatesBinaryLightningValue +case peekedTagNumber == uint8(42) : // BACnetPropertyStatesBinaryLightningValue _childTemp, typeSwitchError = BACnetPropertyStatesBinaryLightningValueParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(43): // BACnetPropertyStatesTimerState +case peekedTagNumber == uint8(43) : // BACnetPropertyStatesTimerState _childTemp, typeSwitchError = BACnetPropertyStatesTimerStateParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(44): // BACnetPropertyStatesTimerTransition +case peekedTagNumber == uint8(44) : // BACnetPropertyStatesTimerTransition _childTemp, typeSwitchError = BACnetPropertyStatesTimerTransitionParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(45): // BACnetPropertyStatesBacnetIpMode +case peekedTagNumber == uint8(45) : // BACnetPropertyStatesBacnetIpMode _childTemp, typeSwitchError = BACnetPropertyStatesBacnetIpModeParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(46): // BACnetPropertyStatesNetworkPortCommand +case peekedTagNumber == uint8(46) : // BACnetPropertyStatesNetworkPortCommand _childTemp, typeSwitchError = BACnetPropertyStatesNetworkPortCommandParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(47): // BACnetPropertyStatesNetworkType +case peekedTagNumber == uint8(47) : // BACnetPropertyStatesNetworkType _childTemp, typeSwitchError = BACnetPropertyStatesNetworkTypeParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(48): // BACnetPropertyStatesNetworkNumberQuality +case peekedTagNumber == uint8(48) : // BACnetPropertyStatesNetworkNumberQuality _childTemp, typeSwitchError = BACnetPropertyStatesNetworkNumberQualityParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(49): // BACnetPropertyStatesEscalatorOperationDirection +case peekedTagNumber == uint8(49) : // BACnetPropertyStatesEscalatorOperationDirection _childTemp, typeSwitchError = BACnetPropertyStatesEscalatorOperationDirectionParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(50): // BACnetPropertyStatesEscalatorFault +case peekedTagNumber == uint8(50) : // BACnetPropertyStatesEscalatorFault _childTemp, typeSwitchError = BACnetPropertyStatesEscalatorFaultParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(51): // BACnetPropertyStatesEscalatorMode +case peekedTagNumber == uint8(51) : // BACnetPropertyStatesEscalatorMode _childTemp, typeSwitchError = BACnetPropertyStatesEscalatorModeParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(52): // BACnetPropertyStatesLiftCarDirection +case peekedTagNumber == uint8(52) : // BACnetPropertyStatesLiftCarDirection _childTemp, typeSwitchError = BACnetPropertyStatesLiftCarDirectionParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(53): // BACnetPropertyStatesLiftCarDoorCommand +case peekedTagNumber == uint8(53) : // BACnetPropertyStatesLiftCarDoorCommand _childTemp, typeSwitchError = BACnetPropertyStatesLiftCarDoorCommandParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(54): // BACnetPropertyStatesLiftCarDriveStatus +case peekedTagNumber == uint8(54) : // BACnetPropertyStatesLiftCarDriveStatus _childTemp, typeSwitchError = BACnetPropertyStatesLiftCarDriveStatusParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(55): // BACnetPropertyStatesLiftCarMode +case peekedTagNumber == uint8(55) : // BACnetPropertyStatesLiftCarMode _childTemp, typeSwitchError = BACnetPropertyStatesLiftCarModeParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(56): // BACnetPropertyStatesLiftGroupMode +case peekedTagNumber == uint8(56) : // BACnetPropertyStatesLiftGroupMode _childTemp, typeSwitchError = BACnetPropertyStatesLiftGroupModeParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(57): // BACnetPropertyStatesLiftFault +case peekedTagNumber == uint8(57) : // BACnetPropertyStatesLiftFault _childTemp, typeSwitchError = BACnetPropertyStatesLiftFaultParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(58): // BACnetPropertyStatesProtocolLevel +case peekedTagNumber == uint8(58) : // BACnetPropertyStatesProtocolLevel _childTemp, typeSwitchError = BACnetPropertyStatesProtocolLevelParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case peekedTagNumber == uint8(63): // BACnetPropertyStatesExtendedValue +case peekedTagNumber == uint8(63) : // BACnetPropertyStatesExtendedValue _childTemp, typeSwitchError = BACnetPropertyStatesExtendedValueParseWithBuffer(ctx, readBuffer, peekedTagNumber) - case true: // BACnetPropertyStateActionUnknown +case true : // BACnetPropertyStateActionUnknown _childTemp, typeSwitchError = BACnetPropertyStateActionUnknownParseWithBuffer(ctx, readBuffer, peekedTagNumber) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedTagNumber=%v]", peekedTagNumber) @@ -297,7 +301,7 @@ func BACnetPropertyStatesParseWithBuffer(ctx context.Context, readBuffer utils.R } // Finish initializing - _child.InitializeParent(_child, peekedTagHeader) +_child.InitializeParent(_child , peekedTagHeader ) return _child, nil } @@ -307,7 +311,7 @@ func (pm *_BACnetPropertyStates) SerializeParent(ctx context.Context, writeBuffe _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetPropertyStates"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetPropertyStates"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStates") } // Virtual field @@ -326,6 +330,7 @@ func (pm *_BACnetPropertyStates) SerializeParent(ctx context.Context, writeBuffe return nil } + func (m *_BACnetPropertyStates) isBACnetPropertyStates() bool { return true } @@ -340,3 +345,6 @@ func (m *_BACnetPropertyStates) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesAccessCredentialDisable.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesAccessCredentialDisable.go index cbec5a1c7ca..55f1a583277 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesAccessCredentialDisable.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesAccessCredentialDisable.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesAccessCredentialDisable is the corresponding interface of BACnetPropertyStatesAccessCredentialDisable type BACnetPropertyStatesAccessCredentialDisable interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesAccessCredentialDisableExactly interface { // _BACnetPropertyStatesAccessCredentialDisable is the data-structure of this message type _BACnetPropertyStatesAccessCredentialDisable struct { *_BACnetPropertyStates - AccessCredentialDisable BACnetAccessCredentialDisableTagged + AccessCredentialDisable BACnetAccessCredentialDisableTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesAccessCredentialDisable struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesAccessCredentialDisable) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesAccessCredentialDisable) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesAccessCredentialDisable) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesAccessCredentialDisable) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesAccessCredentialDisable) GetAccessCredentialDisabl /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesAccessCredentialDisable factory function for _BACnetPropertyStatesAccessCredentialDisable -func NewBACnetPropertyStatesAccessCredentialDisable(accessCredentialDisable BACnetAccessCredentialDisableTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesAccessCredentialDisable { +func NewBACnetPropertyStatesAccessCredentialDisable( accessCredentialDisable BACnetAccessCredentialDisableTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesAccessCredentialDisable { _result := &_BACnetPropertyStatesAccessCredentialDisable{ AccessCredentialDisable: accessCredentialDisable, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesAccessCredentialDisable(accessCredentialDisable BACn // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesAccessCredentialDisable(structType interface{}) BACnetPropertyStatesAccessCredentialDisable { - if casted, ok := structType.(BACnetPropertyStatesAccessCredentialDisable); ok { + if casted, ok := structType.(BACnetPropertyStatesAccessCredentialDisable); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesAccessCredentialDisable); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesAccessCredentialDisable) GetLengthInBits(ctx conte return lengthInBits } + func (m *_BACnetPropertyStatesAccessCredentialDisable) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesAccessCredentialDisableParseWithBuffer(ctx context.Cont if pullErr := readBuffer.PullContext("accessCredentialDisable"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for accessCredentialDisable") } - _accessCredentialDisable, _accessCredentialDisableErr := BACnetAccessCredentialDisableTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_accessCredentialDisable, _accessCredentialDisableErr := BACnetAccessCredentialDisableTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _accessCredentialDisableErr != nil { return nil, errors.Wrap(_accessCredentialDisableErr, "Error parsing 'accessCredentialDisable' field of BACnetPropertyStatesAccessCredentialDisable") } @@ -151,7 +155,8 @@ func BACnetPropertyStatesAccessCredentialDisableParseWithBuffer(ctx context.Cont // Create a partially initialized instance _child := &_BACnetPropertyStatesAccessCredentialDisable{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, AccessCredentialDisable: accessCredentialDisable, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesAccessCredentialDisable) SerializeWithWriteBuffer( return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesAccessCredentialDisable") } - // Simple Field (accessCredentialDisable) - if pushErr := writeBuffer.PushContext("accessCredentialDisable"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for accessCredentialDisable") - } - _accessCredentialDisableErr := writeBuffer.WriteSerializable(ctx, m.GetAccessCredentialDisable()) - if popErr := writeBuffer.PopContext("accessCredentialDisable"); popErr != nil { - return errors.Wrap(popErr, "Error popping for accessCredentialDisable") - } - if _accessCredentialDisableErr != nil { - return errors.Wrap(_accessCredentialDisableErr, "Error serializing 'accessCredentialDisable' field") - } + // Simple Field (accessCredentialDisable) + if pushErr := writeBuffer.PushContext("accessCredentialDisable"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for accessCredentialDisable") + } + _accessCredentialDisableErr := writeBuffer.WriteSerializable(ctx, m.GetAccessCredentialDisable()) + if popErr := writeBuffer.PopContext("accessCredentialDisable"); popErr != nil { + return errors.Wrap(popErr, "Error popping for accessCredentialDisable") + } + if _accessCredentialDisableErr != nil { + return errors.Wrap(_accessCredentialDisableErr, "Error serializing 'accessCredentialDisable' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesAccessCredentialDisable"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesAccessCredentialDisable") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesAccessCredentialDisable) SerializeWithWriteBuffer( return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesAccessCredentialDisable) isBACnetPropertyStatesAccessCredentialDisable() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesAccessCredentialDisable) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesAccessCredentialDisableReason.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesAccessCredentialDisableReason.go index 677c766ae1d..5f99d6a0595 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesAccessCredentialDisableReason.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesAccessCredentialDisableReason.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesAccessCredentialDisableReason is the corresponding interface of BACnetPropertyStatesAccessCredentialDisableReason type BACnetPropertyStatesAccessCredentialDisableReason interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesAccessCredentialDisableReasonExactly interface { // _BACnetPropertyStatesAccessCredentialDisableReason is the data-structure of this message type _BACnetPropertyStatesAccessCredentialDisableReason struct { *_BACnetPropertyStates - AccessCredentialDisableReason BACnetAccessCredentialDisableReasonTagged + AccessCredentialDisableReason BACnetAccessCredentialDisableReasonTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesAccessCredentialDisableReason struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesAccessCredentialDisableReason) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesAccessCredentialDisableReason) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesAccessCredentialDisableReason) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesAccessCredentialDisableReason) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesAccessCredentialDisableReason) GetAccessCredential /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesAccessCredentialDisableReason factory function for _BACnetPropertyStatesAccessCredentialDisableReason -func NewBACnetPropertyStatesAccessCredentialDisableReason(accessCredentialDisableReason BACnetAccessCredentialDisableReasonTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesAccessCredentialDisableReason { +func NewBACnetPropertyStatesAccessCredentialDisableReason( accessCredentialDisableReason BACnetAccessCredentialDisableReasonTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesAccessCredentialDisableReason { _result := &_BACnetPropertyStatesAccessCredentialDisableReason{ AccessCredentialDisableReason: accessCredentialDisableReason, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesAccessCredentialDisableReason(accessCredentialDisabl // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesAccessCredentialDisableReason(structType interface{}) BACnetPropertyStatesAccessCredentialDisableReason { - if casted, ok := structType.(BACnetPropertyStatesAccessCredentialDisableReason); ok { + if casted, ok := structType.(BACnetPropertyStatesAccessCredentialDisableReason); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesAccessCredentialDisableReason); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesAccessCredentialDisableReason) GetLengthInBits(ctx return lengthInBits } + func (m *_BACnetPropertyStatesAccessCredentialDisableReason) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesAccessCredentialDisableReasonParseWithBuffer(ctx contex if pullErr := readBuffer.PullContext("accessCredentialDisableReason"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for accessCredentialDisableReason") } - _accessCredentialDisableReason, _accessCredentialDisableReasonErr := BACnetAccessCredentialDisableReasonTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_accessCredentialDisableReason, _accessCredentialDisableReasonErr := BACnetAccessCredentialDisableReasonTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _accessCredentialDisableReasonErr != nil { return nil, errors.Wrap(_accessCredentialDisableReasonErr, "Error parsing 'accessCredentialDisableReason' field of BACnetPropertyStatesAccessCredentialDisableReason") } @@ -151,7 +155,8 @@ func BACnetPropertyStatesAccessCredentialDisableReasonParseWithBuffer(ctx contex // Create a partially initialized instance _child := &_BACnetPropertyStatesAccessCredentialDisableReason{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, AccessCredentialDisableReason: accessCredentialDisableReason, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesAccessCredentialDisableReason) SerializeWithWriteB return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesAccessCredentialDisableReason") } - // Simple Field (accessCredentialDisableReason) - if pushErr := writeBuffer.PushContext("accessCredentialDisableReason"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for accessCredentialDisableReason") - } - _accessCredentialDisableReasonErr := writeBuffer.WriteSerializable(ctx, m.GetAccessCredentialDisableReason()) - if popErr := writeBuffer.PopContext("accessCredentialDisableReason"); popErr != nil { - return errors.Wrap(popErr, "Error popping for accessCredentialDisableReason") - } - if _accessCredentialDisableReasonErr != nil { - return errors.Wrap(_accessCredentialDisableReasonErr, "Error serializing 'accessCredentialDisableReason' field") - } + // Simple Field (accessCredentialDisableReason) + if pushErr := writeBuffer.PushContext("accessCredentialDisableReason"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for accessCredentialDisableReason") + } + _accessCredentialDisableReasonErr := writeBuffer.WriteSerializable(ctx, m.GetAccessCredentialDisableReason()) + if popErr := writeBuffer.PopContext("accessCredentialDisableReason"); popErr != nil { + return errors.Wrap(popErr, "Error popping for accessCredentialDisableReason") + } + if _accessCredentialDisableReasonErr != nil { + return errors.Wrap(_accessCredentialDisableReasonErr, "Error serializing 'accessCredentialDisableReason' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesAccessCredentialDisableReason"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesAccessCredentialDisableReason") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesAccessCredentialDisableReason) SerializeWithWriteB return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesAccessCredentialDisableReason) isBACnetPropertyStatesAccessCredentialDisableReason() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesAccessCredentialDisableReason) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesAccessEvent.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesAccessEvent.go index eefaf73465e..97d880f22f7 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesAccessEvent.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesAccessEvent.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesAccessEvent is the corresponding interface of BACnetPropertyStatesAccessEvent type BACnetPropertyStatesAccessEvent interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesAccessEventExactly interface { // _BACnetPropertyStatesAccessEvent is the data-structure of this message type _BACnetPropertyStatesAccessEvent struct { *_BACnetPropertyStates - AccessEvent BACnetAccessEventTagged + AccessEvent BACnetAccessEventTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesAccessEvent struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesAccessEvent) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesAccessEvent) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesAccessEvent) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesAccessEvent) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesAccessEvent) GetAccessEvent() BACnetAccessEventTag /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesAccessEvent factory function for _BACnetPropertyStatesAccessEvent -func NewBACnetPropertyStatesAccessEvent(accessEvent BACnetAccessEventTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesAccessEvent { +func NewBACnetPropertyStatesAccessEvent( accessEvent BACnetAccessEventTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesAccessEvent { _result := &_BACnetPropertyStatesAccessEvent{ - AccessEvent: accessEvent, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + AccessEvent: accessEvent, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesAccessEvent(accessEvent BACnetAccessEventTagged, pee // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesAccessEvent(structType interface{}) BACnetPropertyStatesAccessEvent { - if casted, ok := structType.(BACnetPropertyStatesAccessEvent); ok { + if casted, ok := structType.(BACnetPropertyStatesAccessEvent); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesAccessEvent); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesAccessEvent) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetPropertyStatesAccessEvent) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesAccessEventParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("accessEvent"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for accessEvent") } - _accessEvent, _accessEventErr := BACnetAccessEventTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_accessEvent, _accessEventErr := BACnetAccessEventTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _accessEventErr != nil { return nil, errors.Wrap(_accessEventErr, "Error parsing 'accessEvent' field of BACnetPropertyStatesAccessEvent") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesAccessEventParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetPropertyStatesAccessEvent{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - AccessEvent: accessEvent, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + AccessEvent: accessEvent, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesAccessEvent) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesAccessEvent") } - // Simple Field (accessEvent) - if pushErr := writeBuffer.PushContext("accessEvent"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for accessEvent") - } - _accessEventErr := writeBuffer.WriteSerializable(ctx, m.GetAccessEvent()) - if popErr := writeBuffer.PopContext("accessEvent"); popErr != nil { - return errors.Wrap(popErr, "Error popping for accessEvent") - } - if _accessEventErr != nil { - return errors.Wrap(_accessEventErr, "Error serializing 'accessEvent' field") - } + // Simple Field (accessEvent) + if pushErr := writeBuffer.PushContext("accessEvent"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for accessEvent") + } + _accessEventErr := writeBuffer.WriteSerializable(ctx, m.GetAccessEvent()) + if popErr := writeBuffer.PopContext("accessEvent"); popErr != nil { + return errors.Wrap(popErr, "Error popping for accessEvent") + } + if _accessEventErr != nil { + return errors.Wrap(_accessEventErr, "Error serializing 'accessEvent' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesAccessEvent"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesAccessEvent") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesAccessEvent) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesAccessEvent) isBACnetPropertyStatesAccessEvent() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesAccessEvent) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesAction.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesAction.go index 925946c2730..64551921f41 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesAction.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesAction.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesAction is the corresponding interface of BACnetPropertyStatesAction type BACnetPropertyStatesAction interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesActionExactly interface { // _BACnetPropertyStatesAction is the data-structure of this message type _BACnetPropertyStatesAction struct { *_BACnetPropertyStates - Action BACnetActionTagged + Action BACnetActionTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesAction struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesAction) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesAction) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesAction) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesAction) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesAction) GetAction() BACnetActionTagged { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesAction factory function for _BACnetPropertyStatesAction -func NewBACnetPropertyStatesAction(action BACnetActionTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesAction { +func NewBACnetPropertyStatesAction( action BACnetActionTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesAction { _result := &_BACnetPropertyStatesAction{ - Action: action, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + Action: action, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesAction(action BACnetActionTagged, peekedTagHeader BA // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesAction(structType interface{}) BACnetPropertyStatesAction { - if casted, ok := structType.(BACnetPropertyStatesAction); ok { + if casted, ok := structType.(BACnetPropertyStatesAction); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesAction); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesAction) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_BACnetPropertyStatesAction) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesActionParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("action"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for action") } - _action, _actionErr := BACnetActionTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_action, _actionErr := BACnetActionTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _actionErr != nil { return nil, errors.Wrap(_actionErr, "Error parsing 'action' field of BACnetPropertyStatesAction") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesActionParseWithBuffer(ctx context.Context, readBuffer u // Create a partially initialized instance _child := &_BACnetPropertyStatesAction{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - Action: action, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + Action: action, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesAction) SerializeWithWriteBuffer(ctx context.Conte return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesAction") } - // Simple Field (action) - if pushErr := writeBuffer.PushContext("action"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for action") - } - _actionErr := writeBuffer.WriteSerializable(ctx, m.GetAction()) - if popErr := writeBuffer.PopContext("action"); popErr != nil { - return errors.Wrap(popErr, "Error popping for action") - } - if _actionErr != nil { - return errors.Wrap(_actionErr, "Error serializing 'action' field") - } + // Simple Field (action) + if pushErr := writeBuffer.PushContext("action"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for action") + } + _actionErr := writeBuffer.WriteSerializable(ctx, m.GetAction()) + if popErr := writeBuffer.PopContext("action"); popErr != nil { + return errors.Wrap(popErr, "Error popping for action") + } + if _actionErr != nil { + return errors.Wrap(_actionErr, "Error serializing 'action' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesAction"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesAction") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesAction) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesAction) isBACnetPropertyStatesAction() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesAction) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesAuthenticationStatus.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesAuthenticationStatus.go index bea918d7584..22dcb423e04 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesAuthenticationStatus.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesAuthenticationStatus.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesAuthenticationStatus is the corresponding interface of BACnetPropertyStatesAuthenticationStatus type BACnetPropertyStatesAuthenticationStatus interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesAuthenticationStatusExactly interface { // _BACnetPropertyStatesAuthenticationStatus is the data-structure of this message type _BACnetPropertyStatesAuthenticationStatus struct { *_BACnetPropertyStates - AuthenticationStatus BACnetAuthenticationStatusTagged + AuthenticationStatus BACnetAuthenticationStatusTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesAuthenticationStatus struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesAuthenticationStatus) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesAuthenticationStatus) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesAuthenticationStatus) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesAuthenticationStatus) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesAuthenticationStatus) GetAuthenticationStatus() BA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesAuthenticationStatus factory function for _BACnetPropertyStatesAuthenticationStatus -func NewBACnetPropertyStatesAuthenticationStatus(authenticationStatus BACnetAuthenticationStatusTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesAuthenticationStatus { +func NewBACnetPropertyStatesAuthenticationStatus( authenticationStatus BACnetAuthenticationStatusTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesAuthenticationStatus { _result := &_BACnetPropertyStatesAuthenticationStatus{ - AuthenticationStatus: authenticationStatus, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + AuthenticationStatus: authenticationStatus, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesAuthenticationStatus(authenticationStatus BACnetAuth // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesAuthenticationStatus(structType interface{}) BACnetPropertyStatesAuthenticationStatus { - if casted, ok := structType.(BACnetPropertyStatesAuthenticationStatus); ok { + if casted, ok := structType.(BACnetPropertyStatesAuthenticationStatus); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesAuthenticationStatus); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesAuthenticationStatus) GetLengthInBits(ctx context. return lengthInBits } + func (m *_BACnetPropertyStatesAuthenticationStatus) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesAuthenticationStatusParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("authenticationStatus"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for authenticationStatus") } - _authenticationStatus, _authenticationStatusErr := BACnetAuthenticationStatusTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_authenticationStatus, _authenticationStatusErr := BACnetAuthenticationStatusTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _authenticationStatusErr != nil { return nil, errors.Wrap(_authenticationStatusErr, "Error parsing 'authenticationStatus' field of BACnetPropertyStatesAuthenticationStatus") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesAuthenticationStatusParseWithBuffer(ctx context.Context // Create a partially initialized instance _child := &_BACnetPropertyStatesAuthenticationStatus{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - AuthenticationStatus: authenticationStatus, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + AuthenticationStatus: authenticationStatus, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesAuthenticationStatus) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesAuthenticationStatus") } - // Simple Field (authenticationStatus) - if pushErr := writeBuffer.PushContext("authenticationStatus"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for authenticationStatus") - } - _authenticationStatusErr := writeBuffer.WriteSerializable(ctx, m.GetAuthenticationStatus()) - if popErr := writeBuffer.PopContext("authenticationStatus"); popErr != nil { - return errors.Wrap(popErr, "Error popping for authenticationStatus") - } - if _authenticationStatusErr != nil { - return errors.Wrap(_authenticationStatusErr, "Error serializing 'authenticationStatus' field") - } + // Simple Field (authenticationStatus) + if pushErr := writeBuffer.PushContext("authenticationStatus"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for authenticationStatus") + } + _authenticationStatusErr := writeBuffer.WriteSerializable(ctx, m.GetAuthenticationStatus()) + if popErr := writeBuffer.PopContext("authenticationStatus"); popErr != nil { + return errors.Wrap(popErr, "Error popping for authenticationStatus") + } + if _authenticationStatusErr != nil { + return errors.Wrap(_authenticationStatusErr, "Error serializing 'authenticationStatus' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesAuthenticationStatus"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesAuthenticationStatus") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesAuthenticationStatus) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesAuthenticationStatus) isBACnetPropertyStatesAuthenticationStatus() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesAuthenticationStatus) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesBackupState.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesBackupState.go index cd4a17873fe..db721ed726d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesBackupState.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesBackupState.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesBackupState is the corresponding interface of BACnetPropertyStatesBackupState type BACnetPropertyStatesBackupState interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesBackupStateExactly interface { // _BACnetPropertyStatesBackupState is the data-structure of this message type _BACnetPropertyStatesBackupState struct { *_BACnetPropertyStates - BackupState BACnetBackupStateTagged + BackupState BACnetBackupStateTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesBackupState struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesBackupState) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesBackupState) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesBackupState) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesBackupState) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesBackupState) GetBackupState() BACnetBackupStateTag /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesBackupState factory function for _BACnetPropertyStatesBackupState -func NewBACnetPropertyStatesBackupState(backupState BACnetBackupStateTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesBackupState { +func NewBACnetPropertyStatesBackupState( backupState BACnetBackupStateTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesBackupState { _result := &_BACnetPropertyStatesBackupState{ - BackupState: backupState, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + BackupState: backupState, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesBackupState(backupState BACnetBackupStateTagged, pee // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesBackupState(structType interface{}) BACnetPropertyStatesBackupState { - if casted, ok := structType.(BACnetPropertyStatesBackupState); ok { + if casted, ok := structType.(BACnetPropertyStatesBackupState); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesBackupState); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesBackupState) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetPropertyStatesBackupState) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesBackupStateParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("backupState"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for backupState") } - _backupState, _backupStateErr := BACnetBackupStateTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_backupState, _backupStateErr := BACnetBackupStateTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _backupStateErr != nil { return nil, errors.Wrap(_backupStateErr, "Error parsing 'backupState' field of BACnetPropertyStatesBackupState") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesBackupStateParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetPropertyStatesBackupState{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - BackupState: backupState, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + BackupState: backupState, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesBackupState) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesBackupState") } - // Simple Field (backupState) - if pushErr := writeBuffer.PushContext("backupState"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for backupState") - } - _backupStateErr := writeBuffer.WriteSerializable(ctx, m.GetBackupState()) - if popErr := writeBuffer.PopContext("backupState"); popErr != nil { - return errors.Wrap(popErr, "Error popping for backupState") - } - if _backupStateErr != nil { - return errors.Wrap(_backupStateErr, "Error serializing 'backupState' field") - } + // Simple Field (backupState) + if pushErr := writeBuffer.PushContext("backupState"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for backupState") + } + _backupStateErr := writeBuffer.WriteSerializable(ctx, m.GetBackupState()) + if popErr := writeBuffer.PopContext("backupState"); popErr != nil { + return errors.Wrap(popErr, "Error popping for backupState") + } + if _backupStateErr != nil { + return errors.Wrap(_backupStateErr, "Error serializing 'backupState' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesBackupState"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesBackupState") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesBackupState) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesBackupState) isBACnetPropertyStatesBackupState() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesBackupState) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesBacnetIpMode.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesBacnetIpMode.go index 872eb6272c1..9024d40b080 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesBacnetIpMode.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesBacnetIpMode.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesBacnetIpMode is the corresponding interface of BACnetPropertyStatesBacnetIpMode type BACnetPropertyStatesBacnetIpMode interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesBacnetIpModeExactly interface { // _BACnetPropertyStatesBacnetIpMode is the data-structure of this message type _BACnetPropertyStatesBacnetIpMode struct { *_BACnetPropertyStates - BacnetIpMode BACnetIPModeTagged + BacnetIpMode BACnetIPModeTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesBacnetIpMode struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesBacnetIpMode) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesBacnetIpMode) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesBacnetIpMode) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesBacnetIpMode) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesBacnetIpMode) GetBacnetIpMode() BACnetIPModeTagged /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesBacnetIpMode factory function for _BACnetPropertyStatesBacnetIpMode -func NewBACnetPropertyStatesBacnetIpMode(bacnetIpMode BACnetIPModeTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesBacnetIpMode { +func NewBACnetPropertyStatesBacnetIpMode( bacnetIpMode BACnetIPModeTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesBacnetIpMode { _result := &_BACnetPropertyStatesBacnetIpMode{ - BacnetIpMode: bacnetIpMode, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + BacnetIpMode: bacnetIpMode, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesBacnetIpMode(bacnetIpMode BACnetIPModeTagged, peeked // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesBacnetIpMode(structType interface{}) BACnetPropertyStatesBacnetIpMode { - if casted, ok := structType.(BACnetPropertyStatesBacnetIpMode); ok { + if casted, ok := structType.(BACnetPropertyStatesBacnetIpMode); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesBacnetIpMode); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesBacnetIpMode) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetPropertyStatesBacnetIpMode) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesBacnetIpModeParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("bacnetIpMode"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for bacnetIpMode") } - _bacnetIpMode, _bacnetIpModeErr := BACnetIPModeTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_bacnetIpMode, _bacnetIpModeErr := BACnetIPModeTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _bacnetIpModeErr != nil { return nil, errors.Wrap(_bacnetIpModeErr, "Error parsing 'bacnetIpMode' field of BACnetPropertyStatesBacnetIpMode") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesBacnetIpModeParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetPropertyStatesBacnetIpMode{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - BacnetIpMode: bacnetIpMode, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + BacnetIpMode: bacnetIpMode, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesBacnetIpMode) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesBacnetIpMode") } - // Simple Field (bacnetIpMode) - if pushErr := writeBuffer.PushContext("bacnetIpMode"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for bacnetIpMode") - } - _bacnetIpModeErr := writeBuffer.WriteSerializable(ctx, m.GetBacnetIpMode()) - if popErr := writeBuffer.PopContext("bacnetIpMode"); popErr != nil { - return errors.Wrap(popErr, "Error popping for bacnetIpMode") - } - if _bacnetIpModeErr != nil { - return errors.Wrap(_bacnetIpModeErr, "Error serializing 'bacnetIpMode' field") - } + // Simple Field (bacnetIpMode) + if pushErr := writeBuffer.PushContext("bacnetIpMode"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for bacnetIpMode") + } + _bacnetIpModeErr := writeBuffer.WriteSerializable(ctx, m.GetBacnetIpMode()) + if popErr := writeBuffer.PopContext("bacnetIpMode"); popErr != nil { + return errors.Wrap(popErr, "Error popping for bacnetIpMode") + } + if _bacnetIpModeErr != nil { + return errors.Wrap(_bacnetIpModeErr, "Error serializing 'bacnetIpMode' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesBacnetIpMode"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesBacnetIpMode") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesBacnetIpMode) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesBacnetIpMode) isBACnetPropertyStatesBacnetIpMode() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesBacnetIpMode) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesBinaryLightningValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesBinaryLightningValue.go index f54b8725d72..c41d23bc1e8 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesBinaryLightningValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesBinaryLightningValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesBinaryLightningValue is the corresponding interface of BACnetPropertyStatesBinaryLightningValue type BACnetPropertyStatesBinaryLightningValue interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesBinaryLightningValueExactly interface { // _BACnetPropertyStatesBinaryLightningValue is the data-structure of this message type _BACnetPropertyStatesBinaryLightningValue struct { *_BACnetPropertyStates - BinaryLightningValue BACnetBinaryLightingPVTagged + BinaryLightningValue BACnetBinaryLightingPVTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesBinaryLightningValue struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesBinaryLightningValue) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesBinaryLightningValue) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesBinaryLightningValue) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesBinaryLightningValue) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesBinaryLightningValue) GetBinaryLightningValue() BA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesBinaryLightningValue factory function for _BACnetPropertyStatesBinaryLightningValue -func NewBACnetPropertyStatesBinaryLightningValue(binaryLightningValue BACnetBinaryLightingPVTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesBinaryLightningValue { +func NewBACnetPropertyStatesBinaryLightningValue( binaryLightningValue BACnetBinaryLightingPVTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesBinaryLightningValue { _result := &_BACnetPropertyStatesBinaryLightningValue{ - BinaryLightningValue: binaryLightningValue, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + BinaryLightningValue: binaryLightningValue, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesBinaryLightningValue(binaryLightningValue BACnetBina // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesBinaryLightningValue(structType interface{}) BACnetPropertyStatesBinaryLightningValue { - if casted, ok := structType.(BACnetPropertyStatesBinaryLightningValue); ok { + if casted, ok := structType.(BACnetPropertyStatesBinaryLightningValue); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesBinaryLightningValue); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesBinaryLightningValue) GetLengthInBits(ctx context. return lengthInBits } + func (m *_BACnetPropertyStatesBinaryLightningValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesBinaryLightningValueParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("binaryLightningValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for binaryLightningValue") } - _binaryLightningValue, _binaryLightningValueErr := BACnetBinaryLightingPVTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_binaryLightningValue, _binaryLightningValueErr := BACnetBinaryLightingPVTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _binaryLightningValueErr != nil { return nil, errors.Wrap(_binaryLightningValueErr, "Error parsing 'binaryLightningValue' field of BACnetPropertyStatesBinaryLightningValue") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesBinaryLightningValueParseWithBuffer(ctx context.Context // Create a partially initialized instance _child := &_BACnetPropertyStatesBinaryLightningValue{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - BinaryLightningValue: binaryLightningValue, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + BinaryLightningValue: binaryLightningValue, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesBinaryLightningValue) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesBinaryLightningValue") } - // Simple Field (binaryLightningValue) - if pushErr := writeBuffer.PushContext("binaryLightningValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for binaryLightningValue") - } - _binaryLightningValueErr := writeBuffer.WriteSerializable(ctx, m.GetBinaryLightningValue()) - if popErr := writeBuffer.PopContext("binaryLightningValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for binaryLightningValue") - } - if _binaryLightningValueErr != nil { - return errors.Wrap(_binaryLightningValueErr, "Error serializing 'binaryLightningValue' field") - } + // Simple Field (binaryLightningValue) + if pushErr := writeBuffer.PushContext("binaryLightningValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for binaryLightningValue") + } + _binaryLightningValueErr := writeBuffer.WriteSerializable(ctx, m.GetBinaryLightningValue()) + if popErr := writeBuffer.PopContext("binaryLightningValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for binaryLightningValue") + } + if _binaryLightningValueErr != nil { + return errors.Wrap(_binaryLightningValueErr, "Error serializing 'binaryLightningValue' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesBinaryLightningValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesBinaryLightningValue") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesBinaryLightningValue) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesBinaryLightningValue) isBACnetPropertyStatesBinaryLightningValue() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesBinaryLightningValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesBinaryValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesBinaryValue.go index c903836cd12..62ddd8abdd9 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesBinaryValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesBinaryValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesBinaryValue is the corresponding interface of BACnetPropertyStatesBinaryValue type BACnetPropertyStatesBinaryValue interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesBinaryValueExactly interface { // _BACnetPropertyStatesBinaryValue is the data-structure of this message type _BACnetPropertyStatesBinaryValue struct { *_BACnetPropertyStates - BinaryValue BACnetBinaryPVTagged + BinaryValue BACnetBinaryPVTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesBinaryValue struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesBinaryValue) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesBinaryValue) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesBinaryValue) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesBinaryValue) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesBinaryValue) GetBinaryValue() BACnetBinaryPVTagged /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesBinaryValue factory function for _BACnetPropertyStatesBinaryValue -func NewBACnetPropertyStatesBinaryValue(binaryValue BACnetBinaryPVTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesBinaryValue { +func NewBACnetPropertyStatesBinaryValue( binaryValue BACnetBinaryPVTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesBinaryValue { _result := &_BACnetPropertyStatesBinaryValue{ - BinaryValue: binaryValue, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + BinaryValue: binaryValue, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesBinaryValue(binaryValue BACnetBinaryPVTagged, peeked // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesBinaryValue(structType interface{}) BACnetPropertyStatesBinaryValue { - if casted, ok := structType.(BACnetPropertyStatesBinaryValue); ok { + if casted, ok := structType.(BACnetPropertyStatesBinaryValue); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesBinaryValue); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesBinaryValue) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetPropertyStatesBinaryValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesBinaryValueParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("binaryValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for binaryValue") } - _binaryValue, _binaryValueErr := BACnetBinaryPVTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_binaryValue, _binaryValueErr := BACnetBinaryPVTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _binaryValueErr != nil { return nil, errors.Wrap(_binaryValueErr, "Error parsing 'binaryValue' field of BACnetPropertyStatesBinaryValue") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesBinaryValueParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetPropertyStatesBinaryValue{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - BinaryValue: binaryValue, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + BinaryValue: binaryValue, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesBinaryValue) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesBinaryValue") } - // Simple Field (binaryValue) - if pushErr := writeBuffer.PushContext("binaryValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for binaryValue") - } - _binaryValueErr := writeBuffer.WriteSerializable(ctx, m.GetBinaryValue()) - if popErr := writeBuffer.PopContext("binaryValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for binaryValue") - } - if _binaryValueErr != nil { - return errors.Wrap(_binaryValueErr, "Error serializing 'binaryValue' field") - } + // Simple Field (binaryValue) + if pushErr := writeBuffer.PushContext("binaryValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for binaryValue") + } + _binaryValueErr := writeBuffer.WriteSerializable(ctx, m.GetBinaryValue()) + if popErr := writeBuffer.PopContext("binaryValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for binaryValue") + } + if _binaryValueErr != nil { + return errors.Wrap(_binaryValueErr, "Error serializing 'binaryValue' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesBinaryValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesBinaryValue") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesBinaryValue) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesBinaryValue) isBACnetPropertyStatesBinaryValue() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesBinaryValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesBoolean.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesBoolean.go index cd93a69f99e..23b846354c1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesBoolean.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesBoolean.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesBoolean is the corresponding interface of BACnetPropertyStatesBoolean type BACnetPropertyStatesBoolean interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesBooleanExactly interface { // _BACnetPropertyStatesBoolean is the data-structure of this message type _BACnetPropertyStatesBoolean struct { *_BACnetPropertyStates - BooleanValue BACnetContextTagBoolean + BooleanValue BACnetContextTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesBoolean struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesBoolean) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesBoolean) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesBoolean) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesBoolean) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesBoolean) GetBooleanValue() BACnetContextTagBoolean /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesBoolean factory function for _BACnetPropertyStatesBoolean -func NewBACnetPropertyStatesBoolean(booleanValue BACnetContextTagBoolean, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesBoolean { +func NewBACnetPropertyStatesBoolean( booleanValue BACnetContextTagBoolean , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesBoolean { _result := &_BACnetPropertyStatesBoolean{ - BooleanValue: booleanValue, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + BooleanValue: booleanValue, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesBoolean(booleanValue BACnetContextTagBoolean, peeked // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesBoolean(structType interface{}) BACnetPropertyStatesBoolean { - if casted, ok := structType.(BACnetPropertyStatesBoolean); ok { + if casted, ok := structType.(BACnetPropertyStatesBoolean); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesBoolean); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesBoolean) GetLengthInBits(ctx context.Context) uint return lengthInBits } + func (m *_BACnetPropertyStatesBoolean) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesBooleanParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("booleanValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for booleanValue") } - _booleanValue, _booleanValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), BACnetDataType(BACnetDataType_BOOLEAN)) +_booleanValue, _booleanValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , BACnetDataType( BACnetDataType_BOOLEAN ) ) if _booleanValueErr != nil { return nil, errors.Wrap(_booleanValueErr, "Error parsing 'booleanValue' field of BACnetPropertyStatesBoolean") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesBooleanParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_BACnetPropertyStatesBoolean{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - BooleanValue: booleanValue, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + BooleanValue: booleanValue, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesBoolean) SerializeWithWriteBuffer(ctx context.Cont return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesBoolean") } - // Simple Field (booleanValue) - if pushErr := writeBuffer.PushContext("booleanValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for booleanValue") - } - _booleanValueErr := writeBuffer.WriteSerializable(ctx, m.GetBooleanValue()) - if popErr := writeBuffer.PopContext("booleanValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for booleanValue") - } - if _booleanValueErr != nil { - return errors.Wrap(_booleanValueErr, "Error serializing 'booleanValue' field") - } + // Simple Field (booleanValue) + if pushErr := writeBuffer.PushContext("booleanValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for booleanValue") + } + _booleanValueErr := writeBuffer.WriteSerializable(ctx, m.GetBooleanValue()) + if popErr := writeBuffer.PopContext("booleanValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for booleanValue") + } + if _booleanValueErr != nil { + return errors.Wrap(_booleanValueErr, "Error serializing 'booleanValue' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesBoolean"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesBoolean") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesBoolean) SerializeWithWriteBuffer(ctx context.Cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesBoolean) isBACnetPropertyStatesBoolean() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesBoolean) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesDoorAlarmState.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesDoorAlarmState.go index 4453aca64fb..84db96d5930 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesDoorAlarmState.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesDoorAlarmState.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesDoorAlarmState is the corresponding interface of BACnetPropertyStatesDoorAlarmState type BACnetPropertyStatesDoorAlarmState interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesDoorAlarmStateExactly interface { // _BACnetPropertyStatesDoorAlarmState is the data-structure of this message type _BACnetPropertyStatesDoorAlarmState struct { *_BACnetPropertyStates - DoorAlarmState BACnetDoorAlarmStateTagged + DoorAlarmState BACnetDoorAlarmStateTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesDoorAlarmState struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesDoorAlarmState) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesDoorAlarmState) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesDoorAlarmState) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesDoorAlarmState) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesDoorAlarmState) GetDoorAlarmState() BACnetDoorAlar /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesDoorAlarmState factory function for _BACnetPropertyStatesDoorAlarmState -func NewBACnetPropertyStatesDoorAlarmState(doorAlarmState BACnetDoorAlarmStateTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesDoorAlarmState { +func NewBACnetPropertyStatesDoorAlarmState( doorAlarmState BACnetDoorAlarmStateTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesDoorAlarmState { _result := &_BACnetPropertyStatesDoorAlarmState{ - DoorAlarmState: doorAlarmState, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + DoorAlarmState: doorAlarmState, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesDoorAlarmState(doorAlarmState BACnetDoorAlarmStateTa // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesDoorAlarmState(structType interface{}) BACnetPropertyStatesDoorAlarmState { - if casted, ok := structType.(BACnetPropertyStatesDoorAlarmState); ok { + if casted, ok := structType.(BACnetPropertyStatesDoorAlarmState); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesDoorAlarmState); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesDoorAlarmState) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetPropertyStatesDoorAlarmState) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesDoorAlarmStateParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("doorAlarmState"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for doorAlarmState") } - _doorAlarmState, _doorAlarmStateErr := BACnetDoorAlarmStateTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_doorAlarmState, _doorAlarmStateErr := BACnetDoorAlarmStateTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _doorAlarmStateErr != nil { return nil, errors.Wrap(_doorAlarmStateErr, "Error parsing 'doorAlarmState' field of BACnetPropertyStatesDoorAlarmState") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesDoorAlarmStateParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetPropertyStatesDoorAlarmState{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - DoorAlarmState: doorAlarmState, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + DoorAlarmState: doorAlarmState, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesDoorAlarmState) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesDoorAlarmState") } - // Simple Field (doorAlarmState) - if pushErr := writeBuffer.PushContext("doorAlarmState"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for doorAlarmState") - } - _doorAlarmStateErr := writeBuffer.WriteSerializable(ctx, m.GetDoorAlarmState()) - if popErr := writeBuffer.PopContext("doorAlarmState"); popErr != nil { - return errors.Wrap(popErr, "Error popping for doorAlarmState") - } - if _doorAlarmStateErr != nil { - return errors.Wrap(_doorAlarmStateErr, "Error serializing 'doorAlarmState' field") - } + // Simple Field (doorAlarmState) + if pushErr := writeBuffer.PushContext("doorAlarmState"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for doorAlarmState") + } + _doorAlarmStateErr := writeBuffer.WriteSerializable(ctx, m.GetDoorAlarmState()) + if popErr := writeBuffer.PopContext("doorAlarmState"); popErr != nil { + return errors.Wrap(popErr, "Error popping for doorAlarmState") + } + if _doorAlarmStateErr != nil { + return errors.Wrap(_doorAlarmStateErr, "Error serializing 'doorAlarmState' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesDoorAlarmState"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesDoorAlarmState") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesDoorAlarmState) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesDoorAlarmState) isBACnetPropertyStatesDoorAlarmState() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesDoorAlarmState) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesDoorSecuredStatus.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesDoorSecuredStatus.go index 616de0ff389..7e56c21c9b3 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesDoorSecuredStatus.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesDoorSecuredStatus.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesDoorSecuredStatus is the corresponding interface of BACnetPropertyStatesDoorSecuredStatus type BACnetPropertyStatesDoorSecuredStatus interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesDoorSecuredStatusExactly interface { // _BACnetPropertyStatesDoorSecuredStatus is the data-structure of this message type _BACnetPropertyStatesDoorSecuredStatus struct { *_BACnetPropertyStates - DoorSecuredStatus BACnetDoorSecuredStatusTagged + DoorSecuredStatus BACnetDoorSecuredStatusTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesDoorSecuredStatus struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesDoorSecuredStatus) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesDoorSecuredStatus) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesDoorSecuredStatus) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesDoorSecuredStatus) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesDoorSecuredStatus) GetDoorSecuredStatus() BACnetDo /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesDoorSecuredStatus factory function for _BACnetPropertyStatesDoorSecuredStatus -func NewBACnetPropertyStatesDoorSecuredStatus(doorSecuredStatus BACnetDoorSecuredStatusTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesDoorSecuredStatus { +func NewBACnetPropertyStatesDoorSecuredStatus( doorSecuredStatus BACnetDoorSecuredStatusTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesDoorSecuredStatus { _result := &_BACnetPropertyStatesDoorSecuredStatus{ - DoorSecuredStatus: doorSecuredStatus, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + DoorSecuredStatus: doorSecuredStatus, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesDoorSecuredStatus(doorSecuredStatus BACnetDoorSecure // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesDoorSecuredStatus(structType interface{}) BACnetPropertyStatesDoorSecuredStatus { - if casted, ok := structType.(BACnetPropertyStatesDoorSecuredStatus); ok { + if casted, ok := structType.(BACnetPropertyStatesDoorSecuredStatus); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesDoorSecuredStatus); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesDoorSecuredStatus) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetPropertyStatesDoorSecuredStatus) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesDoorSecuredStatusParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("doorSecuredStatus"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for doorSecuredStatus") } - _doorSecuredStatus, _doorSecuredStatusErr := BACnetDoorSecuredStatusTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_doorSecuredStatus, _doorSecuredStatusErr := BACnetDoorSecuredStatusTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _doorSecuredStatusErr != nil { return nil, errors.Wrap(_doorSecuredStatusErr, "Error parsing 'doorSecuredStatus' field of BACnetPropertyStatesDoorSecuredStatus") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesDoorSecuredStatusParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_BACnetPropertyStatesDoorSecuredStatus{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - DoorSecuredStatus: doorSecuredStatus, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + DoorSecuredStatus: doorSecuredStatus, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesDoorSecuredStatus) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesDoorSecuredStatus") } - // Simple Field (doorSecuredStatus) - if pushErr := writeBuffer.PushContext("doorSecuredStatus"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for doorSecuredStatus") - } - _doorSecuredStatusErr := writeBuffer.WriteSerializable(ctx, m.GetDoorSecuredStatus()) - if popErr := writeBuffer.PopContext("doorSecuredStatus"); popErr != nil { - return errors.Wrap(popErr, "Error popping for doorSecuredStatus") - } - if _doorSecuredStatusErr != nil { - return errors.Wrap(_doorSecuredStatusErr, "Error serializing 'doorSecuredStatus' field") - } + // Simple Field (doorSecuredStatus) + if pushErr := writeBuffer.PushContext("doorSecuredStatus"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for doorSecuredStatus") + } + _doorSecuredStatusErr := writeBuffer.WriteSerializable(ctx, m.GetDoorSecuredStatus()) + if popErr := writeBuffer.PopContext("doorSecuredStatus"); popErr != nil { + return errors.Wrap(popErr, "Error popping for doorSecuredStatus") + } + if _doorSecuredStatusErr != nil { + return errors.Wrap(_doorSecuredStatusErr, "Error serializing 'doorSecuredStatus' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesDoorSecuredStatus"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesDoorSecuredStatus") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesDoorSecuredStatus) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesDoorSecuredStatus) isBACnetPropertyStatesDoorSecuredStatus() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesDoorSecuredStatus) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesDoorStatus.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesDoorStatus.go index 0a1f6fabd3b..ca7be4a58b5 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesDoorStatus.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesDoorStatus.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesDoorStatus is the corresponding interface of BACnetPropertyStatesDoorStatus type BACnetPropertyStatesDoorStatus interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesDoorStatusExactly interface { // _BACnetPropertyStatesDoorStatus is the data-structure of this message type _BACnetPropertyStatesDoorStatus struct { *_BACnetPropertyStates - DoorStatus BACnetDoorStatusTagged + DoorStatus BACnetDoorStatusTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesDoorStatus struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesDoorStatus) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesDoorStatus) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesDoorStatus) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesDoorStatus) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesDoorStatus) GetDoorStatus() BACnetDoorStatusTagged /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesDoorStatus factory function for _BACnetPropertyStatesDoorStatus -func NewBACnetPropertyStatesDoorStatus(doorStatus BACnetDoorStatusTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesDoorStatus { +func NewBACnetPropertyStatesDoorStatus( doorStatus BACnetDoorStatusTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesDoorStatus { _result := &_BACnetPropertyStatesDoorStatus{ - DoorStatus: doorStatus, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + DoorStatus: doorStatus, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesDoorStatus(doorStatus BACnetDoorStatusTagged, peeked // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesDoorStatus(structType interface{}) BACnetPropertyStatesDoorStatus { - if casted, ok := structType.(BACnetPropertyStatesDoorStatus); ok { + if casted, ok := structType.(BACnetPropertyStatesDoorStatus); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesDoorStatus); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesDoorStatus) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetPropertyStatesDoorStatus) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesDoorStatusParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("doorStatus"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for doorStatus") } - _doorStatus, _doorStatusErr := BACnetDoorStatusTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_doorStatus, _doorStatusErr := BACnetDoorStatusTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _doorStatusErr != nil { return nil, errors.Wrap(_doorStatusErr, "Error parsing 'doorStatus' field of BACnetPropertyStatesDoorStatus") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesDoorStatusParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_BACnetPropertyStatesDoorStatus{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - DoorStatus: doorStatus, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + DoorStatus: doorStatus, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesDoorStatus) SerializeWithWriteBuffer(ctx context.C return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesDoorStatus") } - // Simple Field (doorStatus) - if pushErr := writeBuffer.PushContext("doorStatus"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for doorStatus") - } - _doorStatusErr := writeBuffer.WriteSerializable(ctx, m.GetDoorStatus()) - if popErr := writeBuffer.PopContext("doorStatus"); popErr != nil { - return errors.Wrap(popErr, "Error popping for doorStatus") - } - if _doorStatusErr != nil { - return errors.Wrap(_doorStatusErr, "Error serializing 'doorStatus' field") - } + // Simple Field (doorStatus) + if pushErr := writeBuffer.PushContext("doorStatus"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for doorStatus") + } + _doorStatusErr := writeBuffer.WriteSerializable(ctx, m.GetDoorStatus()) + if popErr := writeBuffer.PopContext("doorStatus"); popErr != nil { + return errors.Wrap(popErr, "Error popping for doorStatus") + } + if _doorStatusErr != nil { + return errors.Wrap(_doorStatusErr, "Error serializing 'doorStatus' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesDoorStatus"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesDoorStatus") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesDoorStatus) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesDoorStatus) isBACnetPropertyStatesDoorStatus() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesDoorStatus) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesDoorValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesDoorValue.go index 3f6d61ed68b..4cc5d6bab63 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesDoorValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesDoorValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesDoorValue is the corresponding interface of BACnetPropertyStatesDoorValue type BACnetPropertyStatesDoorValue interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesDoorValueExactly interface { // _BACnetPropertyStatesDoorValue is the data-structure of this message type _BACnetPropertyStatesDoorValue struct { *_BACnetPropertyStates - DoorValue BACnetDoorValueTagged + DoorValue BACnetDoorValueTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesDoorValue struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesDoorValue) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesDoorValue) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesDoorValue) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesDoorValue) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesDoorValue) GetDoorValue() BACnetDoorValueTagged { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesDoorValue factory function for _BACnetPropertyStatesDoorValue -func NewBACnetPropertyStatesDoorValue(doorValue BACnetDoorValueTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesDoorValue { +func NewBACnetPropertyStatesDoorValue( doorValue BACnetDoorValueTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesDoorValue { _result := &_BACnetPropertyStatesDoorValue{ - DoorValue: doorValue, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + DoorValue: doorValue, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesDoorValue(doorValue BACnetDoorValueTagged, peekedTag // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesDoorValue(structType interface{}) BACnetPropertyStatesDoorValue { - if casted, ok := structType.(BACnetPropertyStatesDoorValue); ok { + if casted, ok := structType.(BACnetPropertyStatesDoorValue); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesDoorValue); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesDoorValue) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetPropertyStatesDoorValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesDoorValueParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("doorValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for doorValue") } - _doorValue, _doorValueErr := BACnetDoorValueTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_doorValue, _doorValueErr := BACnetDoorValueTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _doorValueErr != nil { return nil, errors.Wrap(_doorValueErr, "Error parsing 'doorValue' field of BACnetPropertyStatesDoorValue") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesDoorValueParseWithBuffer(ctx context.Context, readBuffe // Create a partially initialized instance _child := &_BACnetPropertyStatesDoorValue{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - DoorValue: doorValue, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + DoorValue: doorValue, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesDoorValue) SerializeWithWriteBuffer(ctx context.Co return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesDoorValue") } - // Simple Field (doorValue) - if pushErr := writeBuffer.PushContext("doorValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for doorValue") - } - _doorValueErr := writeBuffer.WriteSerializable(ctx, m.GetDoorValue()) - if popErr := writeBuffer.PopContext("doorValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for doorValue") - } - if _doorValueErr != nil { - return errors.Wrap(_doorValueErr, "Error serializing 'doorValue' field") - } + // Simple Field (doorValue) + if pushErr := writeBuffer.PushContext("doorValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for doorValue") + } + _doorValueErr := writeBuffer.WriteSerializable(ctx, m.GetDoorValue()) + if popErr := writeBuffer.PopContext("doorValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for doorValue") + } + if _doorValueErr != nil { + return errors.Wrap(_doorValueErr, "Error serializing 'doorValue' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesDoorValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesDoorValue") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesDoorValue) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesDoorValue) isBACnetPropertyStatesDoorValue() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesDoorValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesEnclosed.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesEnclosed.go index e55754b0cec..2fe7c261740 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesEnclosed.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesEnclosed.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesEnclosed is the corresponding interface of BACnetPropertyStatesEnclosed type BACnetPropertyStatesEnclosed interface { @@ -48,14 +50,15 @@ type BACnetPropertyStatesEnclosedExactly interface { // _BACnetPropertyStatesEnclosed is the data-structure of this message type _BACnetPropertyStatesEnclosed struct { - OpeningTag BACnetOpeningTag - PropertyState BACnetPropertyStates - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + PropertyState BACnetPropertyStates + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -78,14 +81,15 @@ func (m *_BACnetPropertyStatesEnclosed) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesEnclosed factory function for _BACnetPropertyStatesEnclosed -func NewBACnetPropertyStatesEnclosed(openingTag BACnetOpeningTag, propertyState BACnetPropertyStates, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetPropertyStatesEnclosed { - return &_BACnetPropertyStatesEnclosed{OpeningTag: openingTag, PropertyState: propertyState, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetPropertyStatesEnclosed( openingTag BACnetOpeningTag , propertyState BACnetPropertyStates , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetPropertyStatesEnclosed { +return &_BACnetPropertyStatesEnclosed{ OpeningTag: openingTag , PropertyState: propertyState , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesEnclosed(structType interface{}) BACnetPropertyStatesEnclosed { - if casted, ok := structType.(BACnetPropertyStatesEnclosed); ok { + if casted, ok := structType.(BACnetPropertyStatesEnclosed); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesEnclosed); ok { @@ -113,6 +117,7 @@ func (m *_BACnetPropertyStatesEnclosed) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_BACnetPropertyStatesEnclosed) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -134,7 +139,7 @@ func BACnetPropertyStatesEnclosedParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetPropertyStatesEnclosed") } @@ -147,7 +152,7 @@ func BACnetPropertyStatesEnclosedParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("propertyState"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for propertyState") } - _propertyState, _propertyStateErr := BACnetPropertyStatesParseWithBuffer(ctx, readBuffer) +_propertyState, _propertyStateErr := BACnetPropertyStatesParseWithBuffer(ctx, readBuffer) if _propertyStateErr != nil { return nil, errors.Wrap(_propertyStateErr, "Error parsing 'propertyState' field of BACnetPropertyStatesEnclosed") } @@ -160,7 +165,7 @@ func BACnetPropertyStatesEnclosedParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetPropertyStatesEnclosed") } @@ -175,11 +180,11 @@ func BACnetPropertyStatesEnclosedParseWithBuffer(ctx context.Context, readBuffer // Create the instance return &_BACnetPropertyStatesEnclosed{ - TagNumber: tagNumber, - OpeningTag: openingTag, - PropertyState: propertyState, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + PropertyState: propertyState, + ClosingTag: closingTag, + }, nil } func (m *_BACnetPropertyStatesEnclosed) Serialize() ([]byte, error) { @@ -193,7 +198,7 @@ func (m *_BACnetPropertyStatesEnclosed) Serialize() ([]byte, error) { func (m *_BACnetPropertyStatesEnclosed) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetPropertyStatesEnclosed"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetPropertyStatesEnclosed"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesEnclosed") } @@ -239,13 +244,13 @@ func (m *_BACnetPropertyStatesEnclosed) SerializeWithWriteBuffer(ctx context.Con return nil } + //// // Arguments Getter func (m *_BACnetPropertyStatesEnclosed) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -263,3 +268,6 @@ func (m *_BACnetPropertyStatesEnclosed) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesEscalatorFault.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesEscalatorFault.go index 2b8a9d4b53d..89c1da7a55d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesEscalatorFault.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesEscalatorFault.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesEscalatorFault is the corresponding interface of BACnetPropertyStatesEscalatorFault type BACnetPropertyStatesEscalatorFault interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesEscalatorFaultExactly interface { // _BACnetPropertyStatesEscalatorFault is the data-structure of this message type _BACnetPropertyStatesEscalatorFault struct { *_BACnetPropertyStates - EscalatorFault BACnetEscalatorFaultTagged + EscalatorFault BACnetEscalatorFaultTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesEscalatorFault struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesEscalatorFault) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesEscalatorFault) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesEscalatorFault) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesEscalatorFault) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesEscalatorFault) GetEscalatorFault() BACnetEscalato /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesEscalatorFault factory function for _BACnetPropertyStatesEscalatorFault -func NewBACnetPropertyStatesEscalatorFault(escalatorFault BACnetEscalatorFaultTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesEscalatorFault { +func NewBACnetPropertyStatesEscalatorFault( escalatorFault BACnetEscalatorFaultTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesEscalatorFault { _result := &_BACnetPropertyStatesEscalatorFault{ - EscalatorFault: escalatorFault, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + EscalatorFault: escalatorFault, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesEscalatorFault(escalatorFault BACnetEscalatorFaultTa // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesEscalatorFault(structType interface{}) BACnetPropertyStatesEscalatorFault { - if casted, ok := structType.(BACnetPropertyStatesEscalatorFault); ok { + if casted, ok := structType.(BACnetPropertyStatesEscalatorFault); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesEscalatorFault); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesEscalatorFault) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetPropertyStatesEscalatorFault) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesEscalatorFaultParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("escalatorFault"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for escalatorFault") } - _escalatorFault, _escalatorFaultErr := BACnetEscalatorFaultTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_escalatorFault, _escalatorFaultErr := BACnetEscalatorFaultTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _escalatorFaultErr != nil { return nil, errors.Wrap(_escalatorFaultErr, "Error parsing 'escalatorFault' field of BACnetPropertyStatesEscalatorFault") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesEscalatorFaultParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetPropertyStatesEscalatorFault{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - EscalatorFault: escalatorFault, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + EscalatorFault: escalatorFault, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesEscalatorFault) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesEscalatorFault") } - // Simple Field (escalatorFault) - if pushErr := writeBuffer.PushContext("escalatorFault"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for escalatorFault") - } - _escalatorFaultErr := writeBuffer.WriteSerializable(ctx, m.GetEscalatorFault()) - if popErr := writeBuffer.PopContext("escalatorFault"); popErr != nil { - return errors.Wrap(popErr, "Error popping for escalatorFault") - } - if _escalatorFaultErr != nil { - return errors.Wrap(_escalatorFaultErr, "Error serializing 'escalatorFault' field") - } + // Simple Field (escalatorFault) + if pushErr := writeBuffer.PushContext("escalatorFault"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for escalatorFault") + } + _escalatorFaultErr := writeBuffer.WriteSerializable(ctx, m.GetEscalatorFault()) + if popErr := writeBuffer.PopContext("escalatorFault"); popErr != nil { + return errors.Wrap(popErr, "Error popping for escalatorFault") + } + if _escalatorFaultErr != nil { + return errors.Wrap(_escalatorFaultErr, "Error serializing 'escalatorFault' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesEscalatorFault"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesEscalatorFault") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesEscalatorFault) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesEscalatorFault) isBACnetPropertyStatesEscalatorFault() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesEscalatorFault) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesEscalatorMode.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesEscalatorMode.go index 6875dc8c14a..d1b441760d7 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesEscalatorMode.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesEscalatorMode.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesEscalatorMode is the corresponding interface of BACnetPropertyStatesEscalatorMode type BACnetPropertyStatesEscalatorMode interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesEscalatorModeExactly interface { // _BACnetPropertyStatesEscalatorMode is the data-structure of this message type _BACnetPropertyStatesEscalatorMode struct { *_BACnetPropertyStates - EscalatorMode BACnetEscalatorModeTagged + EscalatorMode BACnetEscalatorModeTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesEscalatorMode struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesEscalatorMode) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesEscalatorMode) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesEscalatorMode) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesEscalatorMode) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesEscalatorMode) GetEscalatorMode() BACnetEscalatorM /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesEscalatorMode factory function for _BACnetPropertyStatesEscalatorMode -func NewBACnetPropertyStatesEscalatorMode(escalatorMode BACnetEscalatorModeTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesEscalatorMode { +func NewBACnetPropertyStatesEscalatorMode( escalatorMode BACnetEscalatorModeTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesEscalatorMode { _result := &_BACnetPropertyStatesEscalatorMode{ - EscalatorMode: escalatorMode, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + EscalatorMode: escalatorMode, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesEscalatorMode(escalatorMode BACnetEscalatorModeTagge // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesEscalatorMode(structType interface{}) BACnetPropertyStatesEscalatorMode { - if casted, ok := structType.(BACnetPropertyStatesEscalatorMode); ok { + if casted, ok := structType.(BACnetPropertyStatesEscalatorMode); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesEscalatorMode); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesEscalatorMode) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetPropertyStatesEscalatorMode) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesEscalatorModeParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("escalatorMode"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for escalatorMode") } - _escalatorMode, _escalatorModeErr := BACnetEscalatorModeTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_escalatorMode, _escalatorModeErr := BACnetEscalatorModeTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _escalatorModeErr != nil { return nil, errors.Wrap(_escalatorModeErr, "Error parsing 'escalatorMode' field of BACnetPropertyStatesEscalatorMode") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesEscalatorModeParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetPropertyStatesEscalatorMode{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - EscalatorMode: escalatorMode, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + EscalatorMode: escalatorMode, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesEscalatorMode) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesEscalatorMode") } - // Simple Field (escalatorMode) - if pushErr := writeBuffer.PushContext("escalatorMode"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for escalatorMode") - } - _escalatorModeErr := writeBuffer.WriteSerializable(ctx, m.GetEscalatorMode()) - if popErr := writeBuffer.PopContext("escalatorMode"); popErr != nil { - return errors.Wrap(popErr, "Error popping for escalatorMode") - } - if _escalatorModeErr != nil { - return errors.Wrap(_escalatorModeErr, "Error serializing 'escalatorMode' field") - } + // Simple Field (escalatorMode) + if pushErr := writeBuffer.PushContext("escalatorMode"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for escalatorMode") + } + _escalatorModeErr := writeBuffer.WriteSerializable(ctx, m.GetEscalatorMode()) + if popErr := writeBuffer.PopContext("escalatorMode"); popErr != nil { + return errors.Wrap(popErr, "Error popping for escalatorMode") + } + if _escalatorModeErr != nil { + return errors.Wrap(_escalatorModeErr, "Error serializing 'escalatorMode' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesEscalatorMode"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesEscalatorMode") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesEscalatorMode) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesEscalatorMode) isBACnetPropertyStatesEscalatorMode() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesEscalatorMode) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesEscalatorOperationDirection.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesEscalatorOperationDirection.go index 8886fa6b11d..73fff99321d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesEscalatorOperationDirection.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesEscalatorOperationDirection.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesEscalatorOperationDirection is the corresponding interface of BACnetPropertyStatesEscalatorOperationDirection type BACnetPropertyStatesEscalatorOperationDirection interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesEscalatorOperationDirectionExactly interface { // _BACnetPropertyStatesEscalatorOperationDirection is the data-structure of this message type _BACnetPropertyStatesEscalatorOperationDirection struct { *_BACnetPropertyStates - EscalatorOperationDirection BACnetEscalatorOperationDirectionTagged + EscalatorOperationDirection BACnetEscalatorOperationDirectionTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesEscalatorOperationDirection struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesEscalatorOperationDirection) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesEscalatorOperationDirection) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesEscalatorOperationDirection) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesEscalatorOperationDirection) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesEscalatorOperationDirection) GetEscalatorOperation /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesEscalatorOperationDirection factory function for _BACnetPropertyStatesEscalatorOperationDirection -func NewBACnetPropertyStatesEscalatorOperationDirection(escalatorOperationDirection BACnetEscalatorOperationDirectionTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesEscalatorOperationDirection { +func NewBACnetPropertyStatesEscalatorOperationDirection( escalatorOperationDirection BACnetEscalatorOperationDirectionTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesEscalatorOperationDirection { _result := &_BACnetPropertyStatesEscalatorOperationDirection{ EscalatorOperationDirection: escalatorOperationDirection, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesEscalatorOperationDirection(escalatorOperationDirect // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesEscalatorOperationDirection(structType interface{}) BACnetPropertyStatesEscalatorOperationDirection { - if casted, ok := structType.(BACnetPropertyStatesEscalatorOperationDirection); ok { + if casted, ok := structType.(BACnetPropertyStatesEscalatorOperationDirection); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesEscalatorOperationDirection); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesEscalatorOperationDirection) GetLengthInBits(ctx c return lengthInBits } + func (m *_BACnetPropertyStatesEscalatorOperationDirection) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesEscalatorOperationDirectionParseWithBuffer(ctx context. if pullErr := readBuffer.PullContext("escalatorOperationDirection"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for escalatorOperationDirection") } - _escalatorOperationDirection, _escalatorOperationDirectionErr := BACnetEscalatorOperationDirectionTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_escalatorOperationDirection, _escalatorOperationDirectionErr := BACnetEscalatorOperationDirectionTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _escalatorOperationDirectionErr != nil { return nil, errors.Wrap(_escalatorOperationDirectionErr, "Error parsing 'escalatorOperationDirection' field of BACnetPropertyStatesEscalatorOperationDirection") } @@ -151,7 +155,8 @@ func BACnetPropertyStatesEscalatorOperationDirectionParseWithBuffer(ctx context. // Create a partially initialized instance _child := &_BACnetPropertyStatesEscalatorOperationDirection{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, EscalatorOperationDirection: escalatorOperationDirection, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesEscalatorOperationDirection) SerializeWithWriteBuf return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesEscalatorOperationDirection") } - // Simple Field (escalatorOperationDirection) - if pushErr := writeBuffer.PushContext("escalatorOperationDirection"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for escalatorOperationDirection") - } - _escalatorOperationDirectionErr := writeBuffer.WriteSerializable(ctx, m.GetEscalatorOperationDirection()) - if popErr := writeBuffer.PopContext("escalatorOperationDirection"); popErr != nil { - return errors.Wrap(popErr, "Error popping for escalatorOperationDirection") - } - if _escalatorOperationDirectionErr != nil { - return errors.Wrap(_escalatorOperationDirectionErr, "Error serializing 'escalatorOperationDirection' field") - } + // Simple Field (escalatorOperationDirection) + if pushErr := writeBuffer.PushContext("escalatorOperationDirection"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for escalatorOperationDirection") + } + _escalatorOperationDirectionErr := writeBuffer.WriteSerializable(ctx, m.GetEscalatorOperationDirection()) + if popErr := writeBuffer.PopContext("escalatorOperationDirection"); popErr != nil { + return errors.Wrap(popErr, "Error popping for escalatorOperationDirection") + } + if _escalatorOperationDirectionErr != nil { + return errors.Wrap(_escalatorOperationDirectionErr, "Error serializing 'escalatorOperationDirection' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesEscalatorOperationDirection"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesEscalatorOperationDirection") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesEscalatorOperationDirection) SerializeWithWriteBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesEscalatorOperationDirection) isBACnetPropertyStatesEscalatorOperationDirection() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesEscalatorOperationDirection) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesEventType.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesEventType.go index 914c6820887..2974a875841 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesEventType.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesEventType.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesEventType is the corresponding interface of BACnetPropertyStatesEventType type BACnetPropertyStatesEventType interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesEventTypeExactly interface { // _BACnetPropertyStatesEventType is the data-structure of this message type _BACnetPropertyStatesEventType struct { *_BACnetPropertyStates - EventType BACnetEventTypeTagged + EventType BACnetEventTypeTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesEventType struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesEventType) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesEventType) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesEventType) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesEventType) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesEventType) GetEventType() BACnetEventTypeTagged { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesEventType factory function for _BACnetPropertyStatesEventType -func NewBACnetPropertyStatesEventType(eventType BACnetEventTypeTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesEventType { +func NewBACnetPropertyStatesEventType( eventType BACnetEventTypeTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesEventType { _result := &_BACnetPropertyStatesEventType{ - EventType: eventType, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + EventType: eventType, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesEventType(eventType BACnetEventTypeTagged, peekedTag // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesEventType(structType interface{}) BACnetPropertyStatesEventType { - if casted, ok := structType.(BACnetPropertyStatesEventType); ok { + if casted, ok := structType.(BACnetPropertyStatesEventType); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesEventType); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesEventType) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetPropertyStatesEventType) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesEventTypeParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("eventType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for eventType") } - _eventType, _eventTypeErr := BACnetEventTypeTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_eventType, _eventTypeErr := BACnetEventTypeTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _eventTypeErr != nil { return nil, errors.Wrap(_eventTypeErr, "Error parsing 'eventType' field of BACnetPropertyStatesEventType") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesEventTypeParseWithBuffer(ctx context.Context, readBuffe // Create a partially initialized instance _child := &_BACnetPropertyStatesEventType{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - EventType: eventType, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + EventType: eventType, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesEventType) SerializeWithWriteBuffer(ctx context.Co return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesEventType") } - // Simple Field (eventType) - if pushErr := writeBuffer.PushContext("eventType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for eventType") - } - _eventTypeErr := writeBuffer.WriteSerializable(ctx, m.GetEventType()) - if popErr := writeBuffer.PopContext("eventType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for eventType") - } - if _eventTypeErr != nil { - return errors.Wrap(_eventTypeErr, "Error serializing 'eventType' field") - } + // Simple Field (eventType) + if pushErr := writeBuffer.PushContext("eventType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for eventType") + } + _eventTypeErr := writeBuffer.WriteSerializable(ctx, m.GetEventType()) + if popErr := writeBuffer.PopContext("eventType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for eventType") + } + if _eventTypeErr != nil { + return errors.Wrap(_eventTypeErr, "Error serializing 'eventType' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesEventType"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesEventType") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesEventType) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesEventType) isBACnetPropertyStatesEventType() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesEventType) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesExtendedValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesExtendedValue.go index 9245d05809c..747d6856864 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesExtendedValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesExtendedValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesExtendedValue is the corresponding interface of BACnetPropertyStatesExtendedValue type BACnetPropertyStatesExtendedValue interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesExtendedValueExactly interface { // _BACnetPropertyStatesExtendedValue is the data-structure of this message type _BACnetPropertyStatesExtendedValue struct { *_BACnetPropertyStates - ExtendedValue BACnetContextTagUnsignedInteger + ExtendedValue BACnetContextTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesExtendedValue struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesExtendedValue) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesExtendedValue) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesExtendedValue) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesExtendedValue) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesExtendedValue) GetExtendedValue() BACnetContextTag /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesExtendedValue factory function for _BACnetPropertyStatesExtendedValue -func NewBACnetPropertyStatesExtendedValue(extendedValue BACnetContextTagUnsignedInteger, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesExtendedValue { +func NewBACnetPropertyStatesExtendedValue( extendedValue BACnetContextTagUnsignedInteger , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesExtendedValue { _result := &_BACnetPropertyStatesExtendedValue{ - ExtendedValue: extendedValue, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + ExtendedValue: extendedValue, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesExtendedValue(extendedValue BACnetContextTagUnsigned // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesExtendedValue(structType interface{}) BACnetPropertyStatesExtendedValue { - if casted, ok := structType.(BACnetPropertyStatesExtendedValue); ok { + if casted, ok := structType.(BACnetPropertyStatesExtendedValue); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesExtendedValue); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesExtendedValue) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetPropertyStatesExtendedValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesExtendedValueParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("extendedValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for extendedValue") } - _extendedValue, _extendedValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_extendedValue, _extendedValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _extendedValueErr != nil { return nil, errors.Wrap(_extendedValueErr, "Error parsing 'extendedValue' field of BACnetPropertyStatesExtendedValue") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesExtendedValueParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetPropertyStatesExtendedValue{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - ExtendedValue: extendedValue, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + ExtendedValue: extendedValue, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesExtendedValue) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesExtendedValue") } - // Simple Field (extendedValue) - if pushErr := writeBuffer.PushContext("extendedValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for extendedValue") - } - _extendedValueErr := writeBuffer.WriteSerializable(ctx, m.GetExtendedValue()) - if popErr := writeBuffer.PopContext("extendedValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for extendedValue") - } - if _extendedValueErr != nil { - return errors.Wrap(_extendedValueErr, "Error serializing 'extendedValue' field") - } + // Simple Field (extendedValue) + if pushErr := writeBuffer.PushContext("extendedValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for extendedValue") + } + _extendedValueErr := writeBuffer.WriteSerializable(ctx, m.GetExtendedValue()) + if popErr := writeBuffer.PopContext("extendedValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for extendedValue") + } + if _extendedValueErr != nil { + return errors.Wrap(_extendedValueErr, "Error serializing 'extendedValue' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesExtendedValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesExtendedValue") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesExtendedValue) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesExtendedValue) isBACnetPropertyStatesExtendedValue() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesExtendedValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesFileAccessMethod.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesFileAccessMethod.go index fc4f97dfcb0..998bcaed62b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesFileAccessMethod.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesFileAccessMethod.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesFileAccessMethod is the corresponding interface of BACnetPropertyStatesFileAccessMethod type BACnetPropertyStatesFileAccessMethod interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesFileAccessMethodExactly interface { // _BACnetPropertyStatesFileAccessMethod is the data-structure of this message type _BACnetPropertyStatesFileAccessMethod struct { *_BACnetPropertyStates - FileAccessMethod BACnetFileAccessMethodTagged + FileAccessMethod BACnetFileAccessMethodTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesFileAccessMethod struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesFileAccessMethod) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesFileAccessMethod) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesFileAccessMethod) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesFileAccessMethod) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesFileAccessMethod) GetFileAccessMethod() BACnetFile /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesFileAccessMethod factory function for _BACnetPropertyStatesFileAccessMethod -func NewBACnetPropertyStatesFileAccessMethod(fileAccessMethod BACnetFileAccessMethodTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesFileAccessMethod { +func NewBACnetPropertyStatesFileAccessMethod( fileAccessMethod BACnetFileAccessMethodTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesFileAccessMethod { _result := &_BACnetPropertyStatesFileAccessMethod{ - FileAccessMethod: fileAccessMethod, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + FileAccessMethod: fileAccessMethod, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesFileAccessMethod(fileAccessMethod BACnetFileAccessMe // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesFileAccessMethod(structType interface{}) BACnetPropertyStatesFileAccessMethod { - if casted, ok := structType.(BACnetPropertyStatesFileAccessMethod); ok { + if casted, ok := structType.(BACnetPropertyStatesFileAccessMethod); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesFileAccessMethod); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesFileAccessMethod) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetPropertyStatesFileAccessMethod) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesFileAccessMethodParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("fileAccessMethod"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for fileAccessMethod") } - _fileAccessMethod, _fileAccessMethodErr := BACnetFileAccessMethodTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_fileAccessMethod, _fileAccessMethodErr := BACnetFileAccessMethodTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _fileAccessMethodErr != nil { return nil, errors.Wrap(_fileAccessMethodErr, "Error parsing 'fileAccessMethod' field of BACnetPropertyStatesFileAccessMethod") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesFileAccessMethodParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetPropertyStatesFileAccessMethod{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - FileAccessMethod: fileAccessMethod, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + FileAccessMethod: fileAccessMethod, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesFileAccessMethod) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesFileAccessMethod") } - // Simple Field (fileAccessMethod) - if pushErr := writeBuffer.PushContext("fileAccessMethod"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for fileAccessMethod") - } - _fileAccessMethodErr := writeBuffer.WriteSerializable(ctx, m.GetFileAccessMethod()) - if popErr := writeBuffer.PopContext("fileAccessMethod"); popErr != nil { - return errors.Wrap(popErr, "Error popping for fileAccessMethod") - } - if _fileAccessMethodErr != nil { - return errors.Wrap(_fileAccessMethodErr, "Error serializing 'fileAccessMethod' field") - } + // Simple Field (fileAccessMethod) + if pushErr := writeBuffer.PushContext("fileAccessMethod"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for fileAccessMethod") + } + _fileAccessMethodErr := writeBuffer.WriteSerializable(ctx, m.GetFileAccessMethod()) + if popErr := writeBuffer.PopContext("fileAccessMethod"); popErr != nil { + return errors.Wrap(popErr, "Error popping for fileAccessMethod") + } + if _fileAccessMethodErr != nil { + return errors.Wrap(_fileAccessMethodErr, "Error serializing 'fileAccessMethod' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesFileAccessMethod"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesFileAccessMethod") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesFileAccessMethod) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesFileAccessMethod) isBACnetPropertyStatesFileAccessMethod() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesFileAccessMethod) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesIntegerValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesIntegerValue.go index 5f927f6a642..9500645c1be 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesIntegerValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesIntegerValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesIntegerValue is the corresponding interface of BACnetPropertyStatesIntegerValue type BACnetPropertyStatesIntegerValue interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesIntegerValueExactly interface { // _BACnetPropertyStatesIntegerValue is the data-structure of this message type _BACnetPropertyStatesIntegerValue struct { *_BACnetPropertyStates - IntegerValue BACnetContextTagSignedInteger + IntegerValue BACnetContextTagSignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesIntegerValue struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesIntegerValue) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesIntegerValue) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesIntegerValue) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesIntegerValue) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesIntegerValue) GetIntegerValue() BACnetContextTagSi /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesIntegerValue factory function for _BACnetPropertyStatesIntegerValue -func NewBACnetPropertyStatesIntegerValue(integerValue BACnetContextTagSignedInteger, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesIntegerValue { +func NewBACnetPropertyStatesIntegerValue( integerValue BACnetContextTagSignedInteger , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesIntegerValue { _result := &_BACnetPropertyStatesIntegerValue{ - IntegerValue: integerValue, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + IntegerValue: integerValue, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesIntegerValue(integerValue BACnetContextTagSignedInte // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesIntegerValue(structType interface{}) BACnetPropertyStatesIntegerValue { - if casted, ok := structType.(BACnetPropertyStatesIntegerValue); ok { + if casted, ok := structType.(BACnetPropertyStatesIntegerValue); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesIntegerValue); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesIntegerValue) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetPropertyStatesIntegerValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesIntegerValueParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("integerValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for integerValue") } - _integerValue, _integerValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), BACnetDataType(BACnetDataType_SIGNED_INTEGER)) +_integerValue, _integerValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , BACnetDataType( BACnetDataType_SIGNED_INTEGER ) ) if _integerValueErr != nil { return nil, errors.Wrap(_integerValueErr, "Error parsing 'integerValue' field of BACnetPropertyStatesIntegerValue") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesIntegerValueParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetPropertyStatesIntegerValue{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - IntegerValue: integerValue, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + IntegerValue: integerValue, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesIntegerValue) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesIntegerValue") } - // Simple Field (integerValue) - if pushErr := writeBuffer.PushContext("integerValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for integerValue") - } - _integerValueErr := writeBuffer.WriteSerializable(ctx, m.GetIntegerValue()) - if popErr := writeBuffer.PopContext("integerValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for integerValue") - } - if _integerValueErr != nil { - return errors.Wrap(_integerValueErr, "Error serializing 'integerValue' field") - } + // Simple Field (integerValue) + if pushErr := writeBuffer.PushContext("integerValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for integerValue") + } + _integerValueErr := writeBuffer.WriteSerializable(ctx, m.GetIntegerValue()) + if popErr := writeBuffer.PopContext("integerValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for integerValue") + } + if _integerValueErr != nil { + return errors.Wrap(_integerValueErr, "Error serializing 'integerValue' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesIntegerValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesIntegerValue") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesIntegerValue) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesIntegerValue) isBACnetPropertyStatesIntegerValue() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesIntegerValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLifeSafetyMode.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLifeSafetyMode.go index 29f8c262de0..e2cd5a5328b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLifeSafetyMode.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLifeSafetyMode.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesLifeSafetyMode is the corresponding interface of BACnetPropertyStatesLifeSafetyMode type BACnetPropertyStatesLifeSafetyMode interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesLifeSafetyModeExactly interface { // _BACnetPropertyStatesLifeSafetyMode is the data-structure of this message type _BACnetPropertyStatesLifeSafetyMode struct { *_BACnetPropertyStates - LifeSafetyMode BACnetLifeSafetyModeTagged + LifeSafetyMode BACnetLifeSafetyModeTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesLifeSafetyMode struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesLifeSafetyMode) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesLifeSafetyMode) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesLifeSafetyMode) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesLifeSafetyMode) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesLifeSafetyMode) GetLifeSafetyMode() BACnetLifeSafe /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesLifeSafetyMode factory function for _BACnetPropertyStatesLifeSafetyMode -func NewBACnetPropertyStatesLifeSafetyMode(lifeSafetyMode BACnetLifeSafetyModeTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesLifeSafetyMode { +func NewBACnetPropertyStatesLifeSafetyMode( lifeSafetyMode BACnetLifeSafetyModeTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesLifeSafetyMode { _result := &_BACnetPropertyStatesLifeSafetyMode{ - LifeSafetyMode: lifeSafetyMode, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + LifeSafetyMode: lifeSafetyMode, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesLifeSafetyMode(lifeSafetyMode BACnetLifeSafetyModeTa // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesLifeSafetyMode(structType interface{}) BACnetPropertyStatesLifeSafetyMode { - if casted, ok := structType.(BACnetPropertyStatesLifeSafetyMode); ok { + if casted, ok := structType.(BACnetPropertyStatesLifeSafetyMode); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesLifeSafetyMode); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesLifeSafetyMode) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetPropertyStatesLifeSafetyMode) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesLifeSafetyModeParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("lifeSafetyMode"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lifeSafetyMode") } - _lifeSafetyMode, _lifeSafetyModeErr := BACnetLifeSafetyModeTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_lifeSafetyMode, _lifeSafetyModeErr := BACnetLifeSafetyModeTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _lifeSafetyModeErr != nil { return nil, errors.Wrap(_lifeSafetyModeErr, "Error parsing 'lifeSafetyMode' field of BACnetPropertyStatesLifeSafetyMode") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesLifeSafetyModeParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BACnetPropertyStatesLifeSafetyMode{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - LifeSafetyMode: lifeSafetyMode, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + LifeSafetyMode: lifeSafetyMode, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesLifeSafetyMode) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesLifeSafetyMode") } - // Simple Field (lifeSafetyMode) - if pushErr := writeBuffer.PushContext("lifeSafetyMode"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lifeSafetyMode") - } - _lifeSafetyModeErr := writeBuffer.WriteSerializable(ctx, m.GetLifeSafetyMode()) - if popErr := writeBuffer.PopContext("lifeSafetyMode"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lifeSafetyMode") - } - if _lifeSafetyModeErr != nil { - return errors.Wrap(_lifeSafetyModeErr, "Error serializing 'lifeSafetyMode' field") - } + // Simple Field (lifeSafetyMode) + if pushErr := writeBuffer.PushContext("lifeSafetyMode"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lifeSafetyMode") + } + _lifeSafetyModeErr := writeBuffer.WriteSerializable(ctx, m.GetLifeSafetyMode()) + if popErr := writeBuffer.PopContext("lifeSafetyMode"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lifeSafetyMode") + } + if _lifeSafetyModeErr != nil { + return errors.Wrap(_lifeSafetyModeErr, "Error serializing 'lifeSafetyMode' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesLifeSafetyMode"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesLifeSafetyMode") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesLifeSafetyMode) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesLifeSafetyMode) isBACnetPropertyStatesLifeSafetyMode() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesLifeSafetyMode) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLifeSafetyOperations.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLifeSafetyOperations.go index 36c74e66dcd..20ec8b73d46 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLifeSafetyOperations.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLifeSafetyOperations.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesLifeSafetyOperations is the corresponding interface of BACnetPropertyStatesLifeSafetyOperations type BACnetPropertyStatesLifeSafetyOperations interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesLifeSafetyOperationsExactly interface { // _BACnetPropertyStatesLifeSafetyOperations is the data-structure of this message type _BACnetPropertyStatesLifeSafetyOperations struct { *_BACnetPropertyStates - LifeSafetyOperations BACnetLifeSafetyOperationTagged + LifeSafetyOperations BACnetLifeSafetyOperationTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesLifeSafetyOperations struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesLifeSafetyOperations) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesLifeSafetyOperations) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesLifeSafetyOperations) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesLifeSafetyOperations) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesLifeSafetyOperations) GetLifeSafetyOperations() BA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesLifeSafetyOperations factory function for _BACnetPropertyStatesLifeSafetyOperations -func NewBACnetPropertyStatesLifeSafetyOperations(lifeSafetyOperations BACnetLifeSafetyOperationTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesLifeSafetyOperations { +func NewBACnetPropertyStatesLifeSafetyOperations( lifeSafetyOperations BACnetLifeSafetyOperationTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesLifeSafetyOperations { _result := &_BACnetPropertyStatesLifeSafetyOperations{ - LifeSafetyOperations: lifeSafetyOperations, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + LifeSafetyOperations: lifeSafetyOperations, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesLifeSafetyOperations(lifeSafetyOperations BACnetLife // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesLifeSafetyOperations(structType interface{}) BACnetPropertyStatesLifeSafetyOperations { - if casted, ok := structType.(BACnetPropertyStatesLifeSafetyOperations); ok { + if casted, ok := structType.(BACnetPropertyStatesLifeSafetyOperations); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesLifeSafetyOperations); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesLifeSafetyOperations) GetLengthInBits(ctx context. return lengthInBits } + func (m *_BACnetPropertyStatesLifeSafetyOperations) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesLifeSafetyOperationsParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("lifeSafetyOperations"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lifeSafetyOperations") } - _lifeSafetyOperations, _lifeSafetyOperationsErr := BACnetLifeSafetyOperationTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_lifeSafetyOperations, _lifeSafetyOperationsErr := BACnetLifeSafetyOperationTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _lifeSafetyOperationsErr != nil { return nil, errors.Wrap(_lifeSafetyOperationsErr, "Error parsing 'lifeSafetyOperations' field of BACnetPropertyStatesLifeSafetyOperations") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesLifeSafetyOperationsParseWithBuffer(ctx context.Context // Create a partially initialized instance _child := &_BACnetPropertyStatesLifeSafetyOperations{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - LifeSafetyOperations: lifeSafetyOperations, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + LifeSafetyOperations: lifeSafetyOperations, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesLifeSafetyOperations) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesLifeSafetyOperations") } - // Simple Field (lifeSafetyOperations) - if pushErr := writeBuffer.PushContext("lifeSafetyOperations"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lifeSafetyOperations") - } - _lifeSafetyOperationsErr := writeBuffer.WriteSerializable(ctx, m.GetLifeSafetyOperations()) - if popErr := writeBuffer.PopContext("lifeSafetyOperations"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lifeSafetyOperations") - } - if _lifeSafetyOperationsErr != nil { - return errors.Wrap(_lifeSafetyOperationsErr, "Error serializing 'lifeSafetyOperations' field") - } + // Simple Field (lifeSafetyOperations) + if pushErr := writeBuffer.PushContext("lifeSafetyOperations"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lifeSafetyOperations") + } + _lifeSafetyOperationsErr := writeBuffer.WriteSerializable(ctx, m.GetLifeSafetyOperations()) + if popErr := writeBuffer.PopContext("lifeSafetyOperations"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lifeSafetyOperations") + } + if _lifeSafetyOperationsErr != nil { + return errors.Wrap(_lifeSafetyOperationsErr, "Error serializing 'lifeSafetyOperations' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesLifeSafetyOperations"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesLifeSafetyOperations") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesLifeSafetyOperations) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesLifeSafetyOperations) isBACnetPropertyStatesLifeSafetyOperations() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesLifeSafetyOperations) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLifeSafetyState.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLifeSafetyState.go index bd9d4f0c333..eb53e99d91b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLifeSafetyState.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLifeSafetyState.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesLifeSafetyState is the corresponding interface of BACnetPropertyStatesLifeSafetyState type BACnetPropertyStatesLifeSafetyState interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesLifeSafetyStateExactly interface { // _BACnetPropertyStatesLifeSafetyState is the data-structure of this message type _BACnetPropertyStatesLifeSafetyState struct { *_BACnetPropertyStates - LifeSafetyState BACnetLifeSafetyStateTagged + LifeSafetyState BACnetLifeSafetyStateTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesLifeSafetyState struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesLifeSafetyState) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesLifeSafetyState) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesLifeSafetyState) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesLifeSafetyState) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesLifeSafetyState) GetLifeSafetyState() BACnetLifeSa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesLifeSafetyState factory function for _BACnetPropertyStatesLifeSafetyState -func NewBACnetPropertyStatesLifeSafetyState(lifeSafetyState BACnetLifeSafetyStateTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesLifeSafetyState { +func NewBACnetPropertyStatesLifeSafetyState( lifeSafetyState BACnetLifeSafetyStateTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesLifeSafetyState { _result := &_BACnetPropertyStatesLifeSafetyState{ - LifeSafetyState: lifeSafetyState, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + LifeSafetyState: lifeSafetyState, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesLifeSafetyState(lifeSafetyState BACnetLifeSafetyStat // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesLifeSafetyState(structType interface{}) BACnetPropertyStatesLifeSafetyState { - if casted, ok := structType.(BACnetPropertyStatesLifeSafetyState); ok { + if casted, ok := structType.(BACnetPropertyStatesLifeSafetyState); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesLifeSafetyState); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesLifeSafetyState) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetPropertyStatesLifeSafetyState) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesLifeSafetyStateParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("lifeSafetyState"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lifeSafetyState") } - _lifeSafetyState, _lifeSafetyStateErr := BACnetLifeSafetyStateTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_lifeSafetyState, _lifeSafetyStateErr := BACnetLifeSafetyStateTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _lifeSafetyStateErr != nil { return nil, errors.Wrap(_lifeSafetyStateErr, "Error parsing 'lifeSafetyState' field of BACnetPropertyStatesLifeSafetyState") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesLifeSafetyStateParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetPropertyStatesLifeSafetyState{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - LifeSafetyState: lifeSafetyState, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + LifeSafetyState: lifeSafetyState, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesLifeSafetyState) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesLifeSafetyState") } - // Simple Field (lifeSafetyState) - if pushErr := writeBuffer.PushContext("lifeSafetyState"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lifeSafetyState") - } - _lifeSafetyStateErr := writeBuffer.WriteSerializable(ctx, m.GetLifeSafetyState()) - if popErr := writeBuffer.PopContext("lifeSafetyState"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lifeSafetyState") - } - if _lifeSafetyStateErr != nil { - return errors.Wrap(_lifeSafetyStateErr, "Error serializing 'lifeSafetyState' field") - } + // Simple Field (lifeSafetyState) + if pushErr := writeBuffer.PushContext("lifeSafetyState"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lifeSafetyState") + } + _lifeSafetyStateErr := writeBuffer.WriteSerializable(ctx, m.GetLifeSafetyState()) + if popErr := writeBuffer.PopContext("lifeSafetyState"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lifeSafetyState") + } + if _lifeSafetyStateErr != nil { + return errors.Wrap(_lifeSafetyStateErr, "Error serializing 'lifeSafetyState' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesLifeSafetyState"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesLifeSafetyState") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesLifeSafetyState) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesLifeSafetyState) isBACnetPropertyStatesLifeSafetyState() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesLifeSafetyState) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLiftCarDirection.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLiftCarDirection.go index f1dc41af321..77c6b938c01 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLiftCarDirection.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLiftCarDirection.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesLiftCarDirection is the corresponding interface of BACnetPropertyStatesLiftCarDirection type BACnetPropertyStatesLiftCarDirection interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesLiftCarDirectionExactly interface { // _BACnetPropertyStatesLiftCarDirection is the data-structure of this message type _BACnetPropertyStatesLiftCarDirection struct { *_BACnetPropertyStates - LiftCarDirection BACnetLiftCarDirectionTagged + LiftCarDirection BACnetLiftCarDirectionTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesLiftCarDirection struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesLiftCarDirection) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesLiftCarDirection) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesLiftCarDirection) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesLiftCarDirection) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesLiftCarDirection) GetLiftCarDirection() BACnetLift /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesLiftCarDirection factory function for _BACnetPropertyStatesLiftCarDirection -func NewBACnetPropertyStatesLiftCarDirection(liftCarDirection BACnetLiftCarDirectionTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesLiftCarDirection { +func NewBACnetPropertyStatesLiftCarDirection( liftCarDirection BACnetLiftCarDirectionTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesLiftCarDirection { _result := &_BACnetPropertyStatesLiftCarDirection{ - LiftCarDirection: liftCarDirection, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + LiftCarDirection: liftCarDirection, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesLiftCarDirection(liftCarDirection BACnetLiftCarDirec // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesLiftCarDirection(structType interface{}) BACnetPropertyStatesLiftCarDirection { - if casted, ok := structType.(BACnetPropertyStatesLiftCarDirection); ok { + if casted, ok := structType.(BACnetPropertyStatesLiftCarDirection); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesLiftCarDirection); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesLiftCarDirection) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetPropertyStatesLiftCarDirection) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesLiftCarDirectionParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("liftCarDirection"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for liftCarDirection") } - _liftCarDirection, _liftCarDirectionErr := BACnetLiftCarDirectionTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_liftCarDirection, _liftCarDirectionErr := BACnetLiftCarDirectionTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _liftCarDirectionErr != nil { return nil, errors.Wrap(_liftCarDirectionErr, "Error parsing 'liftCarDirection' field of BACnetPropertyStatesLiftCarDirection") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesLiftCarDirectionParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetPropertyStatesLiftCarDirection{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - LiftCarDirection: liftCarDirection, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + LiftCarDirection: liftCarDirection, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesLiftCarDirection) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesLiftCarDirection") } - // Simple Field (liftCarDirection) - if pushErr := writeBuffer.PushContext("liftCarDirection"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for liftCarDirection") - } - _liftCarDirectionErr := writeBuffer.WriteSerializable(ctx, m.GetLiftCarDirection()) - if popErr := writeBuffer.PopContext("liftCarDirection"); popErr != nil { - return errors.Wrap(popErr, "Error popping for liftCarDirection") - } - if _liftCarDirectionErr != nil { - return errors.Wrap(_liftCarDirectionErr, "Error serializing 'liftCarDirection' field") - } + // Simple Field (liftCarDirection) + if pushErr := writeBuffer.PushContext("liftCarDirection"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for liftCarDirection") + } + _liftCarDirectionErr := writeBuffer.WriteSerializable(ctx, m.GetLiftCarDirection()) + if popErr := writeBuffer.PopContext("liftCarDirection"); popErr != nil { + return errors.Wrap(popErr, "Error popping for liftCarDirection") + } + if _liftCarDirectionErr != nil { + return errors.Wrap(_liftCarDirectionErr, "Error serializing 'liftCarDirection' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesLiftCarDirection"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesLiftCarDirection") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesLiftCarDirection) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesLiftCarDirection) isBACnetPropertyStatesLiftCarDirection() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesLiftCarDirection) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLiftCarDoorCommand.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLiftCarDoorCommand.go index 8df758e8551..d82e27dfbb3 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLiftCarDoorCommand.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLiftCarDoorCommand.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesLiftCarDoorCommand is the corresponding interface of BACnetPropertyStatesLiftCarDoorCommand type BACnetPropertyStatesLiftCarDoorCommand interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesLiftCarDoorCommandExactly interface { // _BACnetPropertyStatesLiftCarDoorCommand is the data-structure of this message type _BACnetPropertyStatesLiftCarDoorCommand struct { *_BACnetPropertyStates - LiftCarDoorCommand BACnetLiftCarDoorCommandTagged + LiftCarDoorCommand BACnetLiftCarDoorCommandTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesLiftCarDoorCommand struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesLiftCarDoorCommand) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesLiftCarDoorCommand) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesLiftCarDoorCommand) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesLiftCarDoorCommand) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesLiftCarDoorCommand) GetLiftCarDoorCommand() BACnet /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesLiftCarDoorCommand factory function for _BACnetPropertyStatesLiftCarDoorCommand -func NewBACnetPropertyStatesLiftCarDoorCommand(liftCarDoorCommand BACnetLiftCarDoorCommandTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesLiftCarDoorCommand { +func NewBACnetPropertyStatesLiftCarDoorCommand( liftCarDoorCommand BACnetLiftCarDoorCommandTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesLiftCarDoorCommand { _result := &_BACnetPropertyStatesLiftCarDoorCommand{ - LiftCarDoorCommand: liftCarDoorCommand, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + LiftCarDoorCommand: liftCarDoorCommand, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesLiftCarDoorCommand(liftCarDoorCommand BACnetLiftCarD // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesLiftCarDoorCommand(structType interface{}) BACnetPropertyStatesLiftCarDoorCommand { - if casted, ok := structType.(BACnetPropertyStatesLiftCarDoorCommand); ok { + if casted, ok := structType.(BACnetPropertyStatesLiftCarDoorCommand); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesLiftCarDoorCommand); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesLiftCarDoorCommand) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetPropertyStatesLiftCarDoorCommand) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesLiftCarDoorCommandParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("liftCarDoorCommand"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for liftCarDoorCommand") } - _liftCarDoorCommand, _liftCarDoorCommandErr := BACnetLiftCarDoorCommandTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_liftCarDoorCommand, _liftCarDoorCommandErr := BACnetLiftCarDoorCommandTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _liftCarDoorCommandErr != nil { return nil, errors.Wrap(_liftCarDoorCommandErr, "Error parsing 'liftCarDoorCommand' field of BACnetPropertyStatesLiftCarDoorCommand") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesLiftCarDoorCommandParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetPropertyStatesLiftCarDoorCommand{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - LiftCarDoorCommand: liftCarDoorCommand, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + LiftCarDoorCommand: liftCarDoorCommand, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesLiftCarDoorCommand) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesLiftCarDoorCommand") } - // Simple Field (liftCarDoorCommand) - if pushErr := writeBuffer.PushContext("liftCarDoorCommand"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for liftCarDoorCommand") - } - _liftCarDoorCommandErr := writeBuffer.WriteSerializable(ctx, m.GetLiftCarDoorCommand()) - if popErr := writeBuffer.PopContext("liftCarDoorCommand"); popErr != nil { - return errors.Wrap(popErr, "Error popping for liftCarDoorCommand") - } - if _liftCarDoorCommandErr != nil { - return errors.Wrap(_liftCarDoorCommandErr, "Error serializing 'liftCarDoorCommand' field") - } + // Simple Field (liftCarDoorCommand) + if pushErr := writeBuffer.PushContext("liftCarDoorCommand"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for liftCarDoorCommand") + } + _liftCarDoorCommandErr := writeBuffer.WriteSerializable(ctx, m.GetLiftCarDoorCommand()) + if popErr := writeBuffer.PopContext("liftCarDoorCommand"); popErr != nil { + return errors.Wrap(popErr, "Error popping for liftCarDoorCommand") + } + if _liftCarDoorCommandErr != nil { + return errors.Wrap(_liftCarDoorCommandErr, "Error serializing 'liftCarDoorCommand' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesLiftCarDoorCommand"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesLiftCarDoorCommand") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesLiftCarDoorCommand) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesLiftCarDoorCommand) isBACnetPropertyStatesLiftCarDoorCommand() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesLiftCarDoorCommand) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLiftCarDriveStatus.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLiftCarDriveStatus.go index bcc226d54b4..a7ac271776b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLiftCarDriveStatus.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLiftCarDriveStatus.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesLiftCarDriveStatus is the corresponding interface of BACnetPropertyStatesLiftCarDriveStatus type BACnetPropertyStatesLiftCarDriveStatus interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesLiftCarDriveStatusExactly interface { // _BACnetPropertyStatesLiftCarDriveStatus is the data-structure of this message type _BACnetPropertyStatesLiftCarDriveStatus struct { *_BACnetPropertyStates - LiftCarDriveStatus BACnetLiftCarDriveStatusTagged + LiftCarDriveStatus BACnetLiftCarDriveStatusTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesLiftCarDriveStatus struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesLiftCarDriveStatus) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesLiftCarDriveStatus) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesLiftCarDriveStatus) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesLiftCarDriveStatus) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesLiftCarDriveStatus) GetLiftCarDriveStatus() BACnet /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesLiftCarDriveStatus factory function for _BACnetPropertyStatesLiftCarDriveStatus -func NewBACnetPropertyStatesLiftCarDriveStatus(liftCarDriveStatus BACnetLiftCarDriveStatusTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesLiftCarDriveStatus { +func NewBACnetPropertyStatesLiftCarDriveStatus( liftCarDriveStatus BACnetLiftCarDriveStatusTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesLiftCarDriveStatus { _result := &_BACnetPropertyStatesLiftCarDriveStatus{ - LiftCarDriveStatus: liftCarDriveStatus, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + LiftCarDriveStatus: liftCarDriveStatus, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesLiftCarDriveStatus(liftCarDriveStatus BACnetLiftCarD // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesLiftCarDriveStatus(structType interface{}) BACnetPropertyStatesLiftCarDriveStatus { - if casted, ok := structType.(BACnetPropertyStatesLiftCarDriveStatus); ok { + if casted, ok := structType.(BACnetPropertyStatesLiftCarDriveStatus); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesLiftCarDriveStatus); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesLiftCarDriveStatus) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetPropertyStatesLiftCarDriveStatus) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesLiftCarDriveStatusParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("liftCarDriveStatus"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for liftCarDriveStatus") } - _liftCarDriveStatus, _liftCarDriveStatusErr := BACnetLiftCarDriveStatusTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_liftCarDriveStatus, _liftCarDriveStatusErr := BACnetLiftCarDriveStatusTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _liftCarDriveStatusErr != nil { return nil, errors.Wrap(_liftCarDriveStatusErr, "Error parsing 'liftCarDriveStatus' field of BACnetPropertyStatesLiftCarDriveStatus") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesLiftCarDriveStatusParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetPropertyStatesLiftCarDriveStatus{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - LiftCarDriveStatus: liftCarDriveStatus, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + LiftCarDriveStatus: liftCarDriveStatus, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesLiftCarDriveStatus) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesLiftCarDriveStatus") } - // Simple Field (liftCarDriveStatus) - if pushErr := writeBuffer.PushContext("liftCarDriveStatus"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for liftCarDriveStatus") - } - _liftCarDriveStatusErr := writeBuffer.WriteSerializable(ctx, m.GetLiftCarDriveStatus()) - if popErr := writeBuffer.PopContext("liftCarDriveStatus"); popErr != nil { - return errors.Wrap(popErr, "Error popping for liftCarDriveStatus") - } - if _liftCarDriveStatusErr != nil { - return errors.Wrap(_liftCarDriveStatusErr, "Error serializing 'liftCarDriveStatus' field") - } + // Simple Field (liftCarDriveStatus) + if pushErr := writeBuffer.PushContext("liftCarDriveStatus"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for liftCarDriveStatus") + } + _liftCarDriveStatusErr := writeBuffer.WriteSerializable(ctx, m.GetLiftCarDriveStatus()) + if popErr := writeBuffer.PopContext("liftCarDriveStatus"); popErr != nil { + return errors.Wrap(popErr, "Error popping for liftCarDriveStatus") + } + if _liftCarDriveStatusErr != nil { + return errors.Wrap(_liftCarDriveStatusErr, "Error serializing 'liftCarDriveStatus' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesLiftCarDriveStatus"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesLiftCarDriveStatus") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesLiftCarDriveStatus) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesLiftCarDriveStatus) isBACnetPropertyStatesLiftCarDriveStatus() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesLiftCarDriveStatus) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLiftCarMode.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLiftCarMode.go index b593a5584a4..171eafae930 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLiftCarMode.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLiftCarMode.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesLiftCarMode is the corresponding interface of BACnetPropertyStatesLiftCarMode type BACnetPropertyStatesLiftCarMode interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesLiftCarModeExactly interface { // _BACnetPropertyStatesLiftCarMode is the data-structure of this message type _BACnetPropertyStatesLiftCarMode struct { *_BACnetPropertyStates - LiftCarMode BACnetLiftCarModeTagged + LiftCarMode BACnetLiftCarModeTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesLiftCarMode struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesLiftCarMode) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesLiftCarMode) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesLiftCarMode) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesLiftCarMode) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesLiftCarMode) GetLiftCarMode() BACnetLiftCarModeTag /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesLiftCarMode factory function for _BACnetPropertyStatesLiftCarMode -func NewBACnetPropertyStatesLiftCarMode(liftCarMode BACnetLiftCarModeTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesLiftCarMode { +func NewBACnetPropertyStatesLiftCarMode( liftCarMode BACnetLiftCarModeTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesLiftCarMode { _result := &_BACnetPropertyStatesLiftCarMode{ - LiftCarMode: liftCarMode, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + LiftCarMode: liftCarMode, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesLiftCarMode(liftCarMode BACnetLiftCarModeTagged, pee // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesLiftCarMode(structType interface{}) BACnetPropertyStatesLiftCarMode { - if casted, ok := structType.(BACnetPropertyStatesLiftCarMode); ok { + if casted, ok := structType.(BACnetPropertyStatesLiftCarMode); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesLiftCarMode); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesLiftCarMode) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetPropertyStatesLiftCarMode) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesLiftCarModeParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("liftCarMode"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for liftCarMode") } - _liftCarMode, _liftCarModeErr := BACnetLiftCarModeTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_liftCarMode, _liftCarModeErr := BACnetLiftCarModeTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _liftCarModeErr != nil { return nil, errors.Wrap(_liftCarModeErr, "Error parsing 'liftCarMode' field of BACnetPropertyStatesLiftCarMode") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesLiftCarModeParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetPropertyStatesLiftCarMode{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - LiftCarMode: liftCarMode, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + LiftCarMode: liftCarMode, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesLiftCarMode) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesLiftCarMode") } - // Simple Field (liftCarMode) - if pushErr := writeBuffer.PushContext("liftCarMode"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for liftCarMode") - } - _liftCarModeErr := writeBuffer.WriteSerializable(ctx, m.GetLiftCarMode()) - if popErr := writeBuffer.PopContext("liftCarMode"); popErr != nil { - return errors.Wrap(popErr, "Error popping for liftCarMode") - } - if _liftCarModeErr != nil { - return errors.Wrap(_liftCarModeErr, "Error serializing 'liftCarMode' field") - } + // Simple Field (liftCarMode) + if pushErr := writeBuffer.PushContext("liftCarMode"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for liftCarMode") + } + _liftCarModeErr := writeBuffer.WriteSerializable(ctx, m.GetLiftCarMode()) + if popErr := writeBuffer.PopContext("liftCarMode"); popErr != nil { + return errors.Wrap(popErr, "Error popping for liftCarMode") + } + if _liftCarModeErr != nil { + return errors.Wrap(_liftCarModeErr, "Error serializing 'liftCarMode' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesLiftCarMode"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesLiftCarMode") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesLiftCarMode) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesLiftCarMode) isBACnetPropertyStatesLiftCarMode() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesLiftCarMode) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLiftFault.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLiftFault.go index ce8d473c758..f0218235bb9 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLiftFault.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLiftFault.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesLiftFault is the corresponding interface of BACnetPropertyStatesLiftFault type BACnetPropertyStatesLiftFault interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesLiftFaultExactly interface { // _BACnetPropertyStatesLiftFault is the data-structure of this message type _BACnetPropertyStatesLiftFault struct { *_BACnetPropertyStates - LiftFault BACnetLiftFaultTagged + LiftFault BACnetLiftFaultTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesLiftFault struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesLiftFault) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesLiftFault) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesLiftFault) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesLiftFault) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesLiftFault) GetLiftFault() BACnetLiftFaultTagged { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesLiftFault factory function for _BACnetPropertyStatesLiftFault -func NewBACnetPropertyStatesLiftFault(liftFault BACnetLiftFaultTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesLiftFault { +func NewBACnetPropertyStatesLiftFault( liftFault BACnetLiftFaultTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesLiftFault { _result := &_BACnetPropertyStatesLiftFault{ - LiftFault: liftFault, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + LiftFault: liftFault, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesLiftFault(liftFault BACnetLiftFaultTagged, peekedTag // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesLiftFault(structType interface{}) BACnetPropertyStatesLiftFault { - if casted, ok := structType.(BACnetPropertyStatesLiftFault); ok { + if casted, ok := structType.(BACnetPropertyStatesLiftFault); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesLiftFault); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesLiftFault) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetPropertyStatesLiftFault) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesLiftFaultParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("liftFault"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for liftFault") } - _liftFault, _liftFaultErr := BACnetLiftFaultTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_liftFault, _liftFaultErr := BACnetLiftFaultTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _liftFaultErr != nil { return nil, errors.Wrap(_liftFaultErr, "Error parsing 'liftFault' field of BACnetPropertyStatesLiftFault") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesLiftFaultParseWithBuffer(ctx context.Context, readBuffe // Create a partially initialized instance _child := &_BACnetPropertyStatesLiftFault{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - LiftFault: liftFault, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + LiftFault: liftFault, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesLiftFault) SerializeWithWriteBuffer(ctx context.Co return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesLiftFault") } - // Simple Field (liftFault) - if pushErr := writeBuffer.PushContext("liftFault"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for liftFault") - } - _liftFaultErr := writeBuffer.WriteSerializable(ctx, m.GetLiftFault()) - if popErr := writeBuffer.PopContext("liftFault"); popErr != nil { - return errors.Wrap(popErr, "Error popping for liftFault") - } - if _liftFaultErr != nil { - return errors.Wrap(_liftFaultErr, "Error serializing 'liftFault' field") - } + // Simple Field (liftFault) + if pushErr := writeBuffer.PushContext("liftFault"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for liftFault") + } + _liftFaultErr := writeBuffer.WriteSerializable(ctx, m.GetLiftFault()) + if popErr := writeBuffer.PopContext("liftFault"); popErr != nil { + return errors.Wrap(popErr, "Error popping for liftFault") + } + if _liftFaultErr != nil { + return errors.Wrap(_liftFaultErr, "Error serializing 'liftFault' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesLiftFault"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesLiftFault") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesLiftFault) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesLiftFault) isBACnetPropertyStatesLiftFault() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesLiftFault) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLiftGroupMode.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLiftGroupMode.go index 3ed0dff37b9..e825664a74f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLiftGroupMode.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLiftGroupMode.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesLiftGroupMode is the corresponding interface of BACnetPropertyStatesLiftGroupMode type BACnetPropertyStatesLiftGroupMode interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesLiftGroupModeExactly interface { // _BACnetPropertyStatesLiftGroupMode is the data-structure of this message type _BACnetPropertyStatesLiftGroupMode struct { *_BACnetPropertyStates - LiftGroupMode BACnetLiftGroupModeTagged + LiftGroupMode BACnetLiftGroupModeTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesLiftGroupMode struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesLiftGroupMode) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesLiftGroupMode) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesLiftGroupMode) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesLiftGroupMode) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesLiftGroupMode) GetLiftGroupMode() BACnetLiftGroupM /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesLiftGroupMode factory function for _BACnetPropertyStatesLiftGroupMode -func NewBACnetPropertyStatesLiftGroupMode(liftGroupMode BACnetLiftGroupModeTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesLiftGroupMode { +func NewBACnetPropertyStatesLiftGroupMode( liftGroupMode BACnetLiftGroupModeTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesLiftGroupMode { _result := &_BACnetPropertyStatesLiftGroupMode{ - LiftGroupMode: liftGroupMode, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + LiftGroupMode: liftGroupMode, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesLiftGroupMode(liftGroupMode BACnetLiftGroupModeTagge // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesLiftGroupMode(structType interface{}) BACnetPropertyStatesLiftGroupMode { - if casted, ok := structType.(BACnetPropertyStatesLiftGroupMode); ok { + if casted, ok := structType.(BACnetPropertyStatesLiftGroupMode); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesLiftGroupMode); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesLiftGroupMode) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetPropertyStatesLiftGroupMode) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesLiftGroupModeParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("liftGroupMode"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for liftGroupMode") } - _liftGroupMode, _liftGroupModeErr := BACnetLiftGroupModeTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_liftGroupMode, _liftGroupModeErr := BACnetLiftGroupModeTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _liftGroupModeErr != nil { return nil, errors.Wrap(_liftGroupModeErr, "Error parsing 'liftGroupMode' field of BACnetPropertyStatesLiftGroupMode") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesLiftGroupModeParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetPropertyStatesLiftGroupMode{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - LiftGroupMode: liftGroupMode, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + LiftGroupMode: liftGroupMode, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesLiftGroupMode) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesLiftGroupMode") } - // Simple Field (liftGroupMode) - if pushErr := writeBuffer.PushContext("liftGroupMode"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for liftGroupMode") - } - _liftGroupModeErr := writeBuffer.WriteSerializable(ctx, m.GetLiftGroupMode()) - if popErr := writeBuffer.PopContext("liftGroupMode"); popErr != nil { - return errors.Wrap(popErr, "Error popping for liftGroupMode") - } - if _liftGroupModeErr != nil { - return errors.Wrap(_liftGroupModeErr, "Error serializing 'liftGroupMode' field") - } + // Simple Field (liftGroupMode) + if pushErr := writeBuffer.PushContext("liftGroupMode"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for liftGroupMode") + } + _liftGroupModeErr := writeBuffer.WriteSerializable(ctx, m.GetLiftGroupMode()) + if popErr := writeBuffer.PopContext("liftGroupMode"); popErr != nil { + return errors.Wrap(popErr, "Error popping for liftGroupMode") + } + if _liftGroupModeErr != nil { + return errors.Wrap(_liftGroupModeErr, "Error serializing 'liftGroupMode' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesLiftGroupMode"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesLiftGroupMode") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesLiftGroupMode) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesLiftGroupMode) isBACnetPropertyStatesLiftGroupMode() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesLiftGroupMode) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLightningInProgress.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLightningInProgress.go index e7c453bfe3c..92de85c0fef 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLightningInProgress.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLightningInProgress.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesLightningInProgress is the corresponding interface of BACnetPropertyStatesLightningInProgress type BACnetPropertyStatesLightningInProgress interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesLightningInProgressExactly interface { // _BACnetPropertyStatesLightningInProgress is the data-structure of this message type _BACnetPropertyStatesLightningInProgress struct { *_BACnetPropertyStates - LightningInProgress BACnetLightingInProgressTagged + LightningInProgress BACnetLightingInProgressTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesLightningInProgress struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesLightningInProgress) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesLightningInProgress) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesLightningInProgress) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesLightningInProgress) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesLightningInProgress) GetLightningInProgress() BACn /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesLightningInProgress factory function for _BACnetPropertyStatesLightningInProgress -func NewBACnetPropertyStatesLightningInProgress(lightningInProgress BACnetLightingInProgressTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesLightningInProgress { +func NewBACnetPropertyStatesLightningInProgress( lightningInProgress BACnetLightingInProgressTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesLightningInProgress { _result := &_BACnetPropertyStatesLightningInProgress{ - LightningInProgress: lightningInProgress, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + LightningInProgress: lightningInProgress, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesLightningInProgress(lightningInProgress BACnetLighti // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesLightningInProgress(structType interface{}) BACnetPropertyStatesLightningInProgress { - if casted, ok := structType.(BACnetPropertyStatesLightningInProgress); ok { + if casted, ok := structType.(BACnetPropertyStatesLightningInProgress); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesLightningInProgress); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesLightningInProgress) GetLengthInBits(ctx context.C return lengthInBits } + func (m *_BACnetPropertyStatesLightningInProgress) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesLightningInProgressParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("lightningInProgress"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lightningInProgress") } - _lightningInProgress, _lightningInProgressErr := BACnetLightingInProgressTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_lightningInProgress, _lightningInProgressErr := BACnetLightingInProgressTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _lightningInProgressErr != nil { return nil, errors.Wrap(_lightningInProgressErr, "Error parsing 'lightningInProgress' field of BACnetPropertyStatesLightningInProgress") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesLightningInProgressParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetPropertyStatesLightningInProgress{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - LightningInProgress: lightningInProgress, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + LightningInProgress: lightningInProgress, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesLightningInProgress) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesLightningInProgress") } - // Simple Field (lightningInProgress) - if pushErr := writeBuffer.PushContext("lightningInProgress"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lightningInProgress") - } - _lightningInProgressErr := writeBuffer.WriteSerializable(ctx, m.GetLightningInProgress()) - if popErr := writeBuffer.PopContext("lightningInProgress"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lightningInProgress") - } - if _lightningInProgressErr != nil { - return errors.Wrap(_lightningInProgressErr, "Error serializing 'lightningInProgress' field") - } + // Simple Field (lightningInProgress) + if pushErr := writeBuffer.PushContext("lightningInProgress"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lightningInProgress") + } + _lightningInProgressErr := writeBuffer.WriteSerializable(ctx, m.GetLightningInProgress()) + if popErr := writeBuffer.PopContext("lightningInProgress"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lightningInProgress") + } + if _lightningInProgressErr != nil { + return errors.Wrap(_lightningInProgressErr, "Error serializing 'lightningInProgress' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesLightningInProgress"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesLightningInProgress") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesLightningInProgress) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesLightningInProgress) isBACnetPropertyStatesLightningInProgress() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesLightningInProgress) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLightningOperation.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLightningOperation.go index cddceef78ed..4265097e02b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLightningOperation.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLightningOperation.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesLightningOperation is the corresponding interface of BACnetPropertyStatesLightningOperation type BACnetPropertyStatesLightningOperation interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesLightningOperationExactly interface { // _BACnetPropertyStatesLightningOperation is the data-structure of this message type _BACnetPropertyStatesLightningOperation struct { *_BACnetPropertyStates - LightningOperation BACnetLightingOperationTagged + LightningOperation BACnetLightingOperationTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesLightningOperation struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesLightningOperation) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesLightningOperation) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesLightningOperation) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesLightningOperation) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesLightningOperation) GetLightningOperation() BACnet /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesLightningOperation factory function for _BACnetPropertyStatesLightningOperation -func NewBACnetPropertyStatesLightningOperation(lightningOperation BACnetLightingOperationTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesLightningOperation { +func NewBACnetPropertyStatesLightningOperation( lightningOperation BACnetLightingOperationTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesLightningOperation { _result := &_BACnetPropertyStatesLightningOperation{ - LightningOperation: lightningOperation, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + LightningOperation: lightningOperation, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesLightningOperation(lightningOperation BACnetLighting // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesLightningOperation(structType interface{}) BACnetPropertyStatesLightningOperation { - if casted, ok := structType.(BACnetPropertyStatesLightningOperation); ok { + if casted, ok := structType.(BACnetPropertyStatesLightningOperation); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesLightningOperation); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesLightningOperation) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetPropertyStatesLightningOperation) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesLightningOperationParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("lightningOperation"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lightningOperation") } - _lightningOperation, _lightningOperationErr := BACnetLightingOperationTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_lightningOperation, _lightningOperationErr := BACnetLightingOperationTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _lightningOperationErr != nil { return nil, errors.Wrap(_lightningOperationErr, "Error parsing 'lightningOperation' field of BACnetPropertyStatesLightningOperation") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesLightningOperationParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetPropertyStatesLightningOperation{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - LightningOperation: lightningOperation, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + LightningOperation: lightningOperation, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesLightningOperation) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesLightningOperation") } - // Simple Field (lightningOperation) - if pushErr := writeBuffer.PushContext("lightningOperation"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lightningOperation") - } - _lightningOperationErr := writeBuffer.WriteSerializable(ctx, m.GetLightningOperation()) - if popErr := writeBuffer.PopContext("lightningOperation"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lightningOperation") - } - if _lightningOperationErr != nil { - return errors.Wrap(_lightningOperationErr, "Error serializing 'lightningOperation' field") - } + // Simple Field (lightningOperation) + if pushErr := writeBuffer.PushContext("lightningOperation"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lightningOperation") + } + _lightningOperationErr := writeBuffer.WriteSerializable(ctx, m.GetLightningOperation()) + if popErr := writeBuffer.PopContext("lightningOperation"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lightningOperation") + } + if _lightningOperationErr != nil { + return errors.Wrap(_lightningOperationErr, "Error serializing 'lightningOperation' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesLightningOperation"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesLightningOperation") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesLightningOperation) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesLightningOperation) isBACnetPropertyStatesLightningOperation() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesLightningOperation) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLightningTransition.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLightningTransition.go index 1da9bacd389..2475e001963 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLightningTransition.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLightningTransition.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesLightningTransition is the corresponding interface of BACnetPropertyStatesLightningTransition type BACnetPropertyStatesLightningTransition interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesLightningTransitionExactly interface { // _BACnetPropertyStatesLightningTransition is the data-structure of this message type _BACnetPropertyStatesLightningTransition struct { *_BACnetPropertyStates - LightningTransition BACnetLightingTransitionTagged + LightningTransition BACnetLightingTransitionTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesLightningTransition struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesLightningTransition) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesLightningTransition) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesLightningTransition) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesLightningTransition) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesLightningTransition) GetLightningTransition() BACn /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesLightningTransition factory function for _BACnetPropertyStatesLightningTransition -func NewBACnetPropertyStatesLightningTransition(lightningTransition BACnetLightingTransitionTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesLightningTransition { +func NewBACnetPropertyStatesLightningTransition( lightningTransition BACnetLightingTransitionTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesLightningTransition { _result := &_BACnetPropertyStatesLightningTransition{ - LightningTransition: lightningTransition, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + LightningTransition: lightningTransition, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesLightningTransition(lightningTransition BACnetLighti // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesLightningTransition(structType interface{}) BACnetPropertyStatesLightningTransition { - if casted, ok := structType.(BACnetPropertyStatesLightningTransition); ok { + if casted, ok := structType.(BACnetPropertyStatesLightningTransition); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesLightningTransition); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesLightningTransition) GetLengthInBits(ctx context.C return lengthInBits } + func (m *_BACnetPropertyStatesLightningTransition) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesLightningTransitionParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("lightningTransition"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lightningTransition") } - _lightningTransition, _lightningTransitionErr := BACnetLightingTransitionTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_lightningTransition, _lightningTransitionErr := BACnetLightingTransitionTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _lightningTransitionErr != nil { return nil, errors.Wrap(_lightningTransitionErr, "Error parsing 'lightningTransition' field of BACnetPropertyStatesLightningTransition") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesLightningTransitionParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetPropertyStatesLightningTransition{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - LightningTransition: lightningTransition, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + LightningTransition: lightningTransition, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesLightningTransition) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesLightningTransition") } - // Simple Field (lightningTransition) - if pushErr := writeBuffer.PushContext("lightningTransition"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lightningTransition") - } - _lightningTransitionErr := writeBuffer.WriteSerializable(ctx, m.GetLightningTransition()) - if popErr := writeBuffer.PopContext("lightningTransition"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lightningTransition") - } - if _lightningTransitionErr != nil { - return errors.Wrap(_lightningTransitionErr, "Error serializing 'lightningTransition' field") - } + // Simple Field (lightningTransition) + if pushErr := writeBuffer.PushContext("lightningTransition"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lightningTransition") + } + _lightningTransitionErr := writeBuffer.WriteSerializable(ctx, m.GetLightningTransition()) + if popErr := writeBuffer.PopContext("lightningTransition"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lightningTransition") + } + if _lightningTransitionErr != nil { + return errors.Wrap(_lightningTransitionErr, "Error serializing 'lightningTransition' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesLightningTransition"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesLightningTransition") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesLightningTransition) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesLightningTransition) isBACnetPropertyStatesLightningTransition() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesLightningTransition) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLockStatus.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLockStatus.go index 52defac6389..d08f180c6e6 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLockStatus.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesLockStatus.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesLockStatus is the corresponding interface of BACnetPropertyStatesLockStatus type BACnetPropertyStatesLockStatus interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesLockStatusExactly interface { // _BACnetPropertyStatesLockStatus is the data-structure of this message type _BACnetPropertyStatesLockStatus struct { *_BACnetPropertyStates - LockStatus BACnetLockStatusTagged + LockStatus BACnetLockStatusTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesLockStatus struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesLockStatus) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesLockStatus) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesLockStatus) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesLockStatus) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesLockStatus) GetLockStatus() BACnetLockStatusTagged /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesLockStatus factory function for _BACnetPropertyStatesLockStatus -func NewBACnetPropertyStatesLockStatus(lockStatus BACnetLockStatusTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesLockStatus { +func NewBACnetPropertyStatesLockStatus( lockStatus BACnetLockStatusTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesLockStatus { _result := &_BACnetPropertyStatesLockStatus{ - LockStatus: lockStatus, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + LockStatus: lockStatus, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesLockStatus(lockStatus BACnetLockStatusTagged, peeked // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesLockStatus(structType interface{}) BACnetPropertyStatesLockStatus { - if casted, ok := structType.(BACnetPropertyStatesLockStatus); ok { + if casted, ok := structType.(BACnetPropertyStatesLockStatus); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesLockStatus); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesLockStatus) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetPropertyStatesLockStatus) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesLockStatusParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("lockStatus"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lockStatus") } - _lockStatus, _lockStatusErr := BACnetLockStatusTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_lockStatus, _lockStatusErr := BACnetLockStatusTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _lockStatusErr != nil { return nil, errors.Wrap(_lockStatusErr, "Error parsing 'lockStatus' field of BACnetPropertyStatesLockStatus") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesLockStatusParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_BACnetPropertyStatesLockStatus{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - LockStatus: lockStatus, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + LockStatus: lockStatus, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesLockStatus) SerializeWithWriteBuffer(ctx context.C return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesLockStatus") } - // Simple Field (lockStatus) - if pushErr := writeBuffer.PushContext("lockStatus"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lockStatus") - } - _lockStatusErr := writeBuffer.WriteSerializable(ctx, m.GetLockStatus()) - if popErr := writeBuffer.PopContext("lockStatus"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lockStatus") - } - if _lockStatusErr != nil { - return errors.Wrap(_lockStatusErr, "Error serializing 'lockStatus' field") - } + // Simple Field (lockStatus) + if pushErr := writeBuffer.PushContext("lockStatus"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lockStatus") + } + _lockStatusErr := writeBuffer.WriteSerializable(ctx, m.GetLockStatus()) + if popErr := writeBuffer.PopContext("lockStatus"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lockStatus") + } + if _lockStatusErr != nil { + return errors.Wrap(_lockStatusErr, "Error serializing 'lockStatus' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesLockStatus"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesLockStatus") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesLockStatus) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesLockStatus) isBACnetPropertyStatesLockStatus() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesLockStatus) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesMaintenance.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesMaintenance.go index 5d7dc8700b6..d96fb2570ca 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesMaintenance.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesMaintenance.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesMaintenance is the corresponding interface of BACnetPropertyStatesMaintenance type BACnetPropertyStatesMaintenance interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesMaintenanceExactly interface { // _BACnetPropertyStatesMaintenance is the data-structure of this message type _BACnetPropertyStatesMaintenance struct { *_BACnetPropertyStates - Maintenance BACnetMaintenanceTagged + Maintenance BACnetMaintenanceTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesMaintenance struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesMaintenance) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesMaintenance) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesMaintenance) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesMaintenance) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesMaintenance) GetMaintenance() BACnetMaintenanceTag /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesMaintenance factory function for _BACnetPropertyStatesMaintenance -func NewBACnetPropertyStatesMaintenance(maintenance BACnetMaintenanceTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesMaintenance { +func NewBACnetPropertyStatesMaintenance( maintenance BACnetMaintenanceTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesMaintenance { _result := &_BACnetPropertyStatesMaintenance{ - Maintenance: maintenance, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + Maintenance: maintenance, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesMaintenance(maintenance BACnetMaintenanceTagged, pee // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesMaintenance(structType interface{}) BACnetPropertyStatesMaintenance { - if casted, ok := structType.(BACnetPropertyStatesMaintenance); ok { + if casted, ok := structType.(BACnetPropertyStatesMaintenance); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesMaintenance); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesMaintenance) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetPropertyStatesMaintenance) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesMaintenanceParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("maintenance"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for maintenance") } - _maintenance, _maintenanceErr := BACnetMaintenanceTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_maintenance, _maintenanceErr := BACnetMaintenanceTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _maintenanceErr != nil { return nil, errors.Wrap(_maintenanceErr, "Error parsing 'maintenance' field of BACnetPropertyStatesMaintenance") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesMaintenanceParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetPropertyStatesMaintenance{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - Maintenance: maintenance, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + Maintenance: maintenance, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesMaintenance) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesMaintenance") } - // Simple Field (maintenance) - if pushErr := writeBuffer.PushContext("maintenance"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for maintenance") - } - _maintenanceErr := writeBuffer.WriteSerializable(ctx, m.GetMaintenance()) - if popErr := writeBuffer.PopContext("maintenance"); popErr != nil { - return errors.Wrap(popErr, "Error popping for maintenance") - } - if _maintenanceErr != nil { - return errors.Wrap(_maintenanceErr, "Error serializing 'maintenance' field") - } + // Simple Field (maintenance) + if pushErr := writeBuffer.PushContext("maintenance"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for maintenance") + } + _maintenanceErr := writeBuffer.WriteSerializable(ctx, m.GetMaintenance()) + if popErr := writeBuffer.PopContext("maintenance"); popErr != nil { + return errors.Wrap(popErr, "Error popping for maintenance") + } + if _maintenanceErr != nil { + return errors.Wrap(_maintenanceErr, "Error serializing 'maintenance' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesMaintenance"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesMaintenance") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesMaintenance) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesMaintenance) isBACnetPropertyStatesMaintenance() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesMaintenance) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesNetworkNumberQuality.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesNetworkNumberQuality.go index d3cad1a04f4..b658bec99a4 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesNetworkNumberQuality.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesNetworkNumberQuality.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesNetworkNumberQuality is the corresponding interface of BACnetPropertyStatesNetworkNumberQuality type BACnetPropertyStatesNetworkNumberQuality interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesNetworkNumberQualityExactly interface { // _BACnetPropertyStatesNetworkNumberQuality is the data-structure of this message type _BACnetPropertyStatesNetworkNumberQuality struct { *_BACnetPropertyStates - NetworkNumberQuality BACnetNetworkNumberQualityTagged + NetworkNumberQuality BACnetNetworkNumberQualityTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesNetworkNumberQuality struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesNetworkNumberQuality) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesNetworkNumberQuality) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesNetworkNumberQuality) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesNetworkNumberQuality) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesNetworkNumberQuality) GetNetworkNumberQuality() BA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesNetworkNumberQuality factory function for _BACnetPropertyStatesNetworkNumberQuality -func NewBACnetPropertyStatesNetworkNumberQuality(networkNumberQuality BACnetNetworkNumberQualityTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesNetworkNumberQuality { +func NewBACnetPropertyStatesNetworkNumberQuality( networkNumberQuality BACnetNetworkNumberQualityTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesNetworkNumberQuality { _result := &_BACnetPropertyStatesNetworkNumberQuality{ - NetworkNumberQuality: networkNumberQuality, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + NetworkNumberQuality: networkNumberQuality, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesNetworkNumberQuality(networkNumberQuality BACnetNetw // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesNetworkNumberQuality(structType interface{}) BACnetPropertyStatesNetworkNumberQuality { - if casted, ok := structType.(BACnetPropertyStatesNetworkNumberQuality); ok { + if casted, ok := structType.(BACnetPropertyStatesNetworkNumberQuality); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesNetworkNumberQuality); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesNetworkNumberQuality) GetLengthInBits(ctx context. return lengthInBits } + func (m *_BACnetPropertyStatesNetworkNumberQuality) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesNetworkNumberQualityParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("networkNumberQuality"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for networkNumberQuality") } - _networkNumberQuality, _networkNumberQualityErr := BACnetNetworkNumberQualityTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_networkNumberQuality, _networkNumberQualityErr := BACnetNetworkNumberQualityTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _networkNumberQualityErr != nil { return nil, errors.Wrap(_networkNumberQualityErr, "Error parsing 'networkNumberQuality' field of BACnetPropertyStatesNetworkNumberQuality") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesNetworkNumberQualityParseWithBuffer(ctx context.Context // Create a partially initialized instance _child := &_BACnetPropertyStatesNetworkNumberQuality{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - NetworkNumberQuality: networkNumberQuality, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + NetworkNumberQuality: networkNumberQuality, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesNetworkNumberQuality) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesNetworkNumberQuality") } - // Simple Field (networkNumberQuality) - if pushErr := writeBuffer.PushContext("networkNumberQuality"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for networkNumberQuality") - } - _networkNumberQualityErr := writeBuffer.WriteSerializable(ctx, m.GetNetworkNumberQuality()) - if popErr := writeBuffer.PopContext("networkNumberQuality"); popErr != nil { - return errors.Wrap(popErr, "Error popping for networkNumberQuality") - } - if _networkNumberQualityErr != nil { - return errors.Wrap(_networkNumberQualityErr, "Error serializing 'networkNumberQuality' field") - } + // Simple Field (networkNumberQuality) + if pushErr := writeBuffer.PushContext("networkNumberQuality"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for networkNumberQuality") + } + _networkNumberQualityErr := writeBuffer.WriteSerializable(ctx, m.GetNetworkNumberQuality()) + if popErr := writeBuffer.PopContext("networkNumberQuality"); popErr != nil { + return errors.Wrap(popErr, "Error popping for networkNumberQuality") + } + if _networkNumberQualityErr != nil { + return errors.Wrap(_networkNumberQualityErr, "Error serializing 'networkNumberQuality' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesNetworkNumberQuality"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesNetworkNumberQuality") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesNetworkNumberQuality) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesNetworkNumberQuality) isBACnetPropertyStatesNetworkNumberQuality() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesNetworkNumberQuality) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesNetworkPortCommand.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesNetworkPortCommand.go index 5feda563be3..4efc4ffb700 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesNetworkPortCommand.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesNetworkPortCommand.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesNetworkPortCommand is the corresponding interface of BACnetPropertyStatesNetworkPortCommand type BACnetPropertyStatesNetworkPortCommand interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesNetworkPortCommandExactly interface { // _BACnetPropertyStatesNetworkPortCommand is the data-structure of this message type _BACnetPropertyStatesNetworkPortCommand struct { *_BACnetPropertyStates - NetworkPortCommand BACnetNetworkPortCommandTagged + NetworkPortCommand BACnetNetworkPortCommandTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesNetworkPortCommand struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesNetworkPortCommand) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesNetworkPortCommand) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesNetworkPortCommand) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesNetworkPortCommand) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesNetworkPortCommand) GetNetworkPortCommand() BACnet /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesNetworkPortCommand factory function for _BACnetPropertyStatesNetworkPortCommand -func NewBACnetPropertyStatesNetworkPortCommand(networkPortCommand BACnetNetworkPortCommandTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesNetworkPortCommand { +func NewBACnetPropertyStatesNetworkPortCommand( networkPortCommand BACnetNetworkPortCommandTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesNetworkPortCommand { _result := &_BACnetPropertyStatesNetworkPortCommand{ - NetworkPortCommand: networkPortCommand, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + NetworkPortCommand: networkPortCommand, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesNetworkPortCommand(networkPortCommand BACnetNetworkP // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesNetworkPortCommand(structType interface{}) BACnetPropertyStatesNetworkPortCommand { - if casted, ok := structType.(BACnetPropertyStatesNetworkPortCommand); ok { + if casted, ok := structType.(BACnetPropertyStatesNetworkPortCommand); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesNetworkPortCommand); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesNetworkPortCommand) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetPropertyStatesNetworkPortCommand) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesNetworkPortCommandParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("networkPortCommand"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for networkPortCommand") } - _networkPortCommand, _networkPortCommandErr := BACnetNetworkPortCommandTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_networkPortCommand, _networkPortCommandErr := BACnetNetworkPortCommandTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _networkPortCommandErr != nil { return nil, errors.Wrap(_networkPortCommandErr, "Error parsing 'networkPortCommand' field of BACnetPropertyStatesNetworkPortCommand") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesNetworkPortCommandParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_BACnetPropertyStatesNetworkPortCommand{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - NetworkPortCommand: networkPortCommand, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + NetworkPortCommand: networkPortCommand, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesNetworkPortCommand) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesNetworkPortCommand") } - // Simple Field (networkPortCommand) - if pushErr := writeBuffer.PushContext("networkPortCommand"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for networkPortCommand") - } - _networkPortCommandErr := writeBuffer.WriteSerializable(ctx, m.GetNetworkPortCommand()) - if popErr := writeBuffer.PopContext("networkPortCommand"); popErr != nil { - return errors.Wrap(popErr, "Error popping for networkPortCommand") - } - if _networkPortCommandErr != nil { - return errors.Wrap(_networkPortCommandErr, "Error serializing 'networkPortCommand' field") - } + // Simple Field (networkPortCommand) + if pushErr := writeBuffer.PushContext("networkPortCommand"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for networkPortCommand") + } + _networkPortCommandErr := writeBuffer.WriteSerializable(ctx, m.GetNetworkPortCommand()) + if popErr := writeBuffer.PopContext("networkPortCommand"); popErr != nil { + return errors.Wrap(popErr, "Error popping for networkPortCommand") + } + if _networkPortCommandErr != nil { + return errors.Wrap(_networkPortCommandErr, "Error serializing 'networkPortCommand' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesNetworkPortCommand"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesNetworkPortCommand") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesNetworkPortCommand) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesNetworkPortCommand) isBACnetPropertyStatesNetworkPortCommand() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesNetworkPortCommand) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesNetworkType.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesNetworkType.go index 96e0f897241..1f6a1122308 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesNetworkType.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesNetworkType.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesNetworkType is the corresponding interface of BACnetPropertyStatesNetworkType type BACnetPropertyStatesNetworkType interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesNetworkTypeExactly interface { // _BACnetPropertyStatesNetworkType is the data-structure of this message type _BACnetPropertyStatesNetworkType struct { *_BACnetPropertyStates - NetworkType BACnetNetworkTypeTagged + NetworkType BACnetNetworkTypeTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesNetworkType struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesNetworkType) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesNetworkType) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesNetworkType) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesNetworkType) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesNetworkType) GetNetworkType() BACnetNetworkTypeTag /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesNetworkType factory function for _BACnetPropertyStatesNetworkType -func NewBACnetPropertyStatesNetworkType(networkType BACnetNetworkTypeTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesNetworkType { +func NewBACnetPropertyStatesNetworkType( networkType BACnetNetworkTypeTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesNetworkType { _result := &_BACnetPropertyStatesNetworkType{ - NetworkType: networkType, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + NetworkType: networkType, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesNetworkType(networkType BACnetNetworkTypeTagged, pee // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesNetworkType(structType interface{}) BACnetPropertyStatesNetworkType { - if casted, ok := structType.(BACnetPropertyStatesNetworkType); ok { + if casted, ok := structType.(BACnetPropertyStatesNetworkType); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesNetworkType); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesNetworkType) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetPropertyStatesNetworkType) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesNetworkTypeParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("networkType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for networkType") } - _networkType, _networkTypeErr := BACnetNetworkTypeTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_networkType, _networkTypeErr := BACnetNetworkTypeTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _networkTypeErr != nil { return nil, errors.Wrap(_networkTypeErr, "Error parsing 'networkType' field of BACnetPropertyStatesNetworkType") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesNetworkTypeParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetPropertyStatesNetworkType{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - NetworkType: networkType, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + NetworkType: networkType, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesNetworkType) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesNetworkType") } - // Simple Field (networkType) - if pushErr := writeBuffer.PushContext("networkType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for networkType") - } - _networkTypeErr := writeBuffer.WriteSerializable(ctx, m.GetNetworkType()) - if popErr := writeBuffer.PopContext("networkType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for networkType") - } - if _networkTypeErr != nil { - return errors.Wrap(_networkTypeErr, "Error serializing 'networkType' field") - } + // Simple Field (networkType) + if pushErr := writeBuffer.PushContext("networkType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for networkType") + } + _networkTypeErr := writeBuffer.WriteSerializable(ctx, m.GetNetworkType()) + if popErr := writeBuffer.PopContext("networkType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for networkType") + } + if _networkTypeErr != nil { + return errors.Wrap(_networkTypeErr, "Error serializing 'networkType' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesNetworkType"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesNetworkType") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesNetworkType) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesNetworkType) isBACnetPropertyStatesNetworkType() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesNetworkType) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesNodeType.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesNodeType.go index f7f7aced866..57f11f85c4f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesNodeType.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesNodeType.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesNodeType is the corresponding interface of BACnetPropertyStatesNodeType type BACnetPropertyStatesNodeType interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesNodeTypeExactly interface { // _BACnetPropertyStatesNodeType is the data-structure of this message type _BACnetPropertyStatesNodeType struct { *_BACnetPropertyStates - NodeType BACnetNodeTypeTagged + NodeType BACnetNodeTypeTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesNodeType struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesNodeType) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesNodeType) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesNodeType) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesNodeType) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesNodeType) GetNodeType() BACnetNodeTypeTagged { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesNodeType factory function for _BACnetPropertyStatesNodeType -func NewBACnetPropertyStatesNodeType(nodeType BACnetNodeTypeTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesNodeType { +func NewBACnetPropertyStatesNodeType( nodeType BACnetNodeTypeTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesNodeType { _result := &_BACnetPropertyStatesNodeType{ - NodeType: nodeType, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + NodeType: nodeType, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesNodeType(nodeType BACnetNodeTypeTagged, peekedTagHea // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesNodeType(structType interface{}) BACnetPropertyStatesNodeType { - if casted, ok := structType.(BACnetPropertyStatesNodeType); ok { + if casted, ok := structType.(BACnetPropertyStatesNodeType); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesNodeType); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesNodeType) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_BACnetPropertyStatesNodeType) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesNodeTypeParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("nodeType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for nodeType") } - _nodeType, _nodeTypeErr := BACnetNodeTypeTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_nodeType, _nodeTypeErr := BACnetNodeTypeTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _nodeTypeErr != nil { return nil, errors.Wrap(_nodeTypeErr, "Error parsing 'nodeType' field of BACnetPropertyStatesNodeType") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesNodeTypeParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_BACnetPropertyStatesNodeType{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - NodeType: nodeType, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + NodeType: nodeType, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesNodeType) SerializeWithWriteBuffer(ctx context.Con return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesNodeType") } - // Simple Field (nodeType) - if pushErr := writeBuffer.PushContext("nodeType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for nodeType") - } - _nodeTypeErr := writeBuffer.WriteSerializable(ctx, m.GetNodeType()) - if popErr := writeBuffer.PopContext("nodeType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for nodeType") - } - if _nodeTypeErr != nil { - return errors.Wrap(_nodeTypeErr, "Error serializing 'nodeType' field") - } + // Simple Field (nodeType) + if pushErr := writeBuffer.PushContext("nodeType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for nodeType") + } + _nodeTypeErr := writeBuffer.WriteSerializable(ctx, m.GetNodeType()) + if popErr := writeBuffer.PopContext("nodeType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for nodeType") + } + if _nodeTypeErr != nil { + return errors.Wrap(_nodeTypeErr, "Error serializing 'nodeType' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesNodeType"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesNodeType") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesNodeType) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesNodeType) isBACnetPropertyStatesNodeType() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesNodeType) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesNotifyType.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesNotifyType.go index 0eb2d52282c..bec29d4f3d1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesNotifyType.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesNotifyType.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesNotifyType is the corresponding interface of BACnetPropertyStatesNotifyType type BACnetPropertyStatesNotifyType interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesNotifyTypeExactly interface { // _BACnetPropertyStatesNotifyType is the data-structure of this message type _BACnetPropertyStatesNotifyType struct { *_BACnetPropertyStates - NotifyType BACnetNotifyTypeTagged + NotifyType BACnetNotifyTypeTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesNotifyType struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesNotifyType) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesNotifyType) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesNotifyType) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesNotifyType) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesNotifyType) GetNotifyType() BACnetNotifyTypeTagged /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesNotifyType factory function for _BACnetPropertyStatesNotifyType -func NewBACnetPropertyStatesNotifyType(notifyType BACnetNotifyTypeTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesNotifyType { +func NewBACnetPropertyStatesNotifyType( notifyType BACnetNotifyTypeTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesNotifyType { _result := &_BACnetPropertyStatesNotifyType{ - NotifyType: notifyType, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + NotifyType: notifyType, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesNotifyType(notifyType BACnetNotifyTypeTagged, peeked // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesNotifyType(structType interface{}) BACnetPropertyStatesNotifyType { - if casted, ok := structType.(BACnetPropertyStatesNotifyType); ok { + if casted, ok := structType.(BACnetPropertyStatesNotifyType); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesNotifyType); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesNotifyType) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetPropertyStatesNotifyType) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesNotifyTypeParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("notifyType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for notifyType") } - _notifyType, _notifyTypeErr := BACnetNotifyTypeTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_notifyType, _notifyTypeErr := BACnetNotifyTypeTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _notifyTypeErr != nil { return nil, errors.Wrap(_notifyTypeErr, "Error parsing 'notifyType' field of BACnetPropertyStatesNotifyType") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesNotifyTypeParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_BACnetPropertyStatesNotifyType{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - NotifyType: notifyType, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + NotifyType: notifyType, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesNotifyType) SerializeWithWriteBuffer(ctx context.C return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesNotifyType") } - // Simple Field (notifyType) - if pushErr := writeBuffer.PushContext("notifyType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for notifyType") - } - _notifyTypeErr := writeBuffer.WriteSerializable(ctx, m.GetNotifyType()) - if popErr := writeBuffer.PopContext("notifyType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for notifyType") - } - if _notifyTypeErr != nil { - return errors.Wrap(_notifyTypeErr, "Error serializing 'notifyType' field") - } + // Simple Field (notifyType) + if pushErr := writeBuffer.PushContext("notifyType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for notifyType") + } + _notifyTypeErr := writeBuffer.WriteSerializable(ctx, m.GetNotifyType()) + if popErr := writeBuffer.PopContext("notifyType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for notifyType") + } + if _notifyTypeErr != nil { + return errors.Wrap(_notifyTypeErr, "Error serializing 'notifyType' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesNotifyType"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesNotifyType") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesNotifyType) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesNotifyType) isBACnetPropertyStatesNotifyType() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesNotifyType) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesPolarity.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesPolarity.go index b23aa2c8b2e..2409a24afc0 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesPolarity.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesPolarity.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesPolarity is the corresponding interface of BACnetPropertyStatesPolarity type BACnetPropertyStatesPolarity interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesPolarityExactly interface { // _BACnetPropertyStatesPolarity is the data-structure of this message type _BACnetPropertyStatesPolarity struct { *_BACnetPropertyStates - Polarity BACnetPolarityTagged + Polarity BACnetPolarityTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesPolarity struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesPolarity) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesPolarity) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesPolarity) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesPolarity) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesPolarity) GetPolarity() BACnetPolarityTagged { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesPolarity factory function for _BACnetPropertyStatesPolarity -func NewBACnetPropertyStatesPolarity(polarity BACnetPolarityTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesPolarity { +func NewBACnetPropertyStatesPolarity( polarity BACnetPolarityTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesPolarity { _result := &_BACnetPropertyStatesPolarity{ - Polarity: polarity, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + Polarity: polarity, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesPolarity(polarity BACnetPolarityTagged, peekedTagHea // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesPolarity(structType interface{}) BACnetPropertyStatesPolarity { - if casted, ok := structType.(BACnetPropertyStatesPolarity); ok { + if casted, ok := structType.(BACnetPropertyStatesPolarity); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesPolarity); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesPolarity) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_BACnetPropertyStatesPolarity) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesPolarityParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("polarity"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for polarity") } - _polarity, _polarityErr := BACnetPolarityTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_polarity, _polarityErr := BACnetPolarityTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _polarityErr != nil { return nil, errors.Wrap(_polarityErr, "Error parsing 'polarity' field of BACnetPropertyStatesPolarity") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesPolarityParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_BACnetPropertyStatesPolarity{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - Polarity: polarity, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + Polarity: polarity, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesPolarity) SerializeWithWriteBuffer(ctx context.Con return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesPolarity") } - // Simple Field (polarity) - if pushErr := writeBuffer.PushContext("polarity"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for polarity") - } - _polarityErr := writeBuffer.WriteSerializable(ctx, m.GetPolarity()) - if popErr := writeBuffer.PopContext("polarity"); popErr != nil { - return errors.Wrap(popErr, "Error popping for polarity") - } - if _polarityErr != nil { - return errors.Wrap(_polarityErr, "Error serializing 'polarity' field") - } + // Simple Field (polarity) + if pushErr := writeBuffer.PushContext("polarity"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for polarity") + } + _polarityErr := writeBuffer.WriteSerializable(ctx, m.GetPolarity()) + if popErr := writeBuffer.PopContext("polarity"); popErr != nil { + return errors.Wrap(popErr, "Error popping for polarity") + } + if _polarityErr != nil { + return errors.Wrap(_polarityErr, "Error serializing 'polarity' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesPolarity"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesPolarity") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesPolarity) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesPolarity) isBACnetPropertyStatesPolarity() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesPolarity) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesProgramChange.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesProgramChange.go index 31b32ae0ad6..66540cd98ad 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesProgramChange.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesProgramChange.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesProgramChange is the corresponding interface of BACnetPropertyStatesProgramChange type BACnetPropertyStatesProgramChange interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesProgramChangeExactly interface { // _BACnetPropertyStatesProgramChange is the data-structure of this message type _BACnetPropertyStatesProgramChange struct { *_BACnetPropertyStates - ProgramState BACnetProgramStateTagged + ProgramState BACnetProgramStateTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesProgramChange struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesProgramChange) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesProgramChange) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesProgramChange) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesProgramChange) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesProgramChange) GetProgramState() BACnetProgramStat /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesProgramChange factory function for _BACnetPropertyStatesProgramChange -func NewBACnetPropertyStatesProgramChange(programState BACnetProgramStateTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesProgramChange { +func NewBACnetPropertyStatesProgramChange( programState BACnetProgramStateTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesProgramChange { _result := &_BACnetPropertyStatesProgramChange{ - ProgramState: programState, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + ProgramState: programState, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesProgramChange(programState BACnetProgramStateTagged, // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesProgramChange(structType interface{}) BACnetPropertyStatesProgramChange { - if casted, ok := structType.(BACnetPropertyStatesProgramChange); ok { + if casted, ok := structType.(BACnetPropertyStatesProgramChange); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesProgramChange); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesProgramChange) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetPropertyStatesProgramChange) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesProgramChangeParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("programState"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for programState") } - _programState, _programStateErr := BACnetProgramStateTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_programState, _programStateErr := BACnetProgramStateTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _programStateErr != nil { return nil, errors.Wrap(_programStateErr, "Error parsing 'programState' field of BACnetPropertyStatesProgramChange") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesProgramChangeParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetPropertyStatesProgramChange{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - ProgramState: programState, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + ProgramState: programState, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesProgramChange) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesProgramChange") } - // Simple Field (programState) - if pushErr := writeBuffer.PushContext("programState"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for programState") - } - _programStateErr := writeBuffer.WriteSerializable(ctx, m.GetProgramState()) - if popErr := writeBuffer.PopContext("programState"); popErr != nil { - return errors.Wrap(popErr, "Error popping for programState") - } - if _programStateErr != nil { - return errors.Wrap(_programStateErr, "Error serializing 'programState' field") - } + // Simple Field (programState) + if pushErr := writeBuffer.PushContext("programState"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for programState") + } + _programStateErr := writeBuffer.WriteSerializable(ctx, m.GetProgramState()) + if popErr := writeBuffer.PopContext("programState"); popErr != nil { + return errors.Wrap(popErr, "Error popping for programState") + } + if _programStateErr != nil { + return errors.Wrap(_programStateErr, "Error serializing 'programState' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesProgramChange"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesProgramChange") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesProgramChange) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesProgramChange) isBACnetPropertyStatesProgramChange() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesProgramChange) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesProtocolLevel.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesProtocolLevel.go index f3896539855..7448969ef2a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesProtocolLevel.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesProtocolLevel.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesProtocolLevel is the corresponding interface of BACnetPropertyStatesProtocolLevel type BACnetPropertyStatesProtocolLevel interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesProtocolLevelExactly interface { // _BACnetPropertyStatesProtocolLevel is the data-structure of this message type _BACnetPropertyStatesProtocolLevel struct { *_BACnetPropertyStates - ProtocolLevel BACnetProtocolLevelTagged + ProtocolLevel BACnetProtocolLevelTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesProtocolLevel struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesProtocolLevel) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesProtocolLevel) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesProtocolLevel) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesProtocolLevel) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesProtocolLevel) GetProtocolLevel() BACnetProtocolLe /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesProtocolLevel factory function for _BACnetPropertyStatesProtocolLevel -func NewBACnetPropertyStatesProtocolLevel(protocolLevel BACnetProtocolLevelTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesProtocolLevel { +func NewBACnetPropertyStatesProtocolLevel( protocolLevel BACnetProtocolLevelTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesProtocolLevel { _result := &_BACnetPropertyStatesProtocolLevel{ - ProtocolLevel: protocolLevel, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + ProtocolLevel: protocolLevel, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesProtocolLevel(protocolLevel BACnetProtocolLevelTagge // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesProtocolLevel(structType interface{}) BACnetPropertyStatesProtocolLevel { - if casted, ok := structType.(BACnetPropertyStatesProtocolLevel); ok { + if casted, ok := structType.(BACnetPropertyStatesProtocolLevel); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesProtocolLevel); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesProtocolLevel) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetPropertyStatesProtocolLevel) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesProtocolLevelParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("protocolLevel"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for protocolLevel") } - _protocolLevel, _protocolLevelErr := BACnetProtocolLevelTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_protocolLevel, _protocolLevelErr := BACnetProtocolLevelTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _protocolLevelErr != nil { return nil, errors.Wrap(_protocolLevelErr, "Error parsing 'protocolLevel' field of BACnetPropertyStatesProtocolLevel") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesProtocolLevelParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetPropertyStatesProtocolLevel{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - ProtocolLevel: protocolLevel, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + ProtocolLevel: protocolLevel, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesProtocolLevel) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesProtocolLevel") } - // Simple Field (protocolLevel) - if pushErr := writeBuffer.PushContext("protocolLevel"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for protocolLevel") - } - _protocolLevelErr := writeBuffer.WriteSerializable(ctx, m.GetProtocolLevel()) - if popErr := writeBuffer.PopContext("protocolLevel"); popErr != nil { - return errors.Wrap(popErr, "Error popping for protocolLevel") - } - if _protocolLevelErr != nil { - return errors.Wrap(_protocolLevelErr, "Error serializing 'protocolLevel' field") - } + // Simple Field (protocolLevel) + if pushErr := writeBuffer.PushContext("protocolLevel"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for protocolLevel") + } + _protocolLevelErr := writeBuffer.WriteSerializable(ctx, m.GetProtocolLevel()) + if popErr := writeBuffer.PopContext("protocolLevel"); popErr != nil { + return errors.Wrap(popErr, "Error popping for protocolLevel") + } + if _protocolLevelErr != nil { + return errors.Wrap(_protocolLevelErr, "Error serializing 'protocolLevel' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesProtocolLevel"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesProtocolLevel") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesProtocolLevel) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesProtocolLevel) isBACnetPropertyStatesProtocolLevel() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesProtocolLevel) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesReasonForHalt.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesReasonForHalt.go index db1481ff613..7e6f34c4c74 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesReasonForHalt.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesReasonForHalt.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesReasonForHalt is the corresponding interface of BACnetPropertyStatesReasonForHalt type BACnetPropertyStatesReasonForHalt interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesReasonForHaltExactly interface { // _BACnetPropertyStatesReasonForHalt is the data-structure of this message type _BACnetPropertyStatesReasonForHalt struct { *_BACnetPropertyStates - ReasonForHalt BACnetProgramErrorTagged + ReasonForHalt BACnetProgramErrorTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesReasonForHalt struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesReasonForHalt) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesReasonForHalt) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesReasonForHalt) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesReasonForHalt) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesReasonForHalt) GetReasonForHalt() BACnetProgramErr /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesReasonForHalt factory function for _BACnetPropertyStatesReasonForHalt -func NewBACnetPropertyStatesReasonForHalt(reasonForHalt BACnetProgramErrorTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesReasonForHalt { +func NewBACnetPropertyStatesReasonForHalt( reasonForHalt BACnetProgramErrorTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesReasonForHalt { _result := &_BACnetPropertyStatesReasonForHalt{ - ReasonForHalt: reasonForHalt, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + ReasonForHalt: reasonForHalt, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesReasonForHalt(reasonForHalt BACnetProgramErrorTagged // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesReasonForHalt(structType interface{}) BACnetPropertyStatesReasonForHalt { - if casted, ok := structType.(BACnetPropertyStatesReasonForHalt); ok { + if casted, ok := structType.(BACnetPropertyStatesReasonForHalt); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesReasonForHalt); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesReasonForHalt) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetPropertyStatesReasonForHalt) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesReasonForHaltParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("reasonForHalt"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for reasonForHalt") } - _reasonForHalt, _reasonForHaltErr := BACnetProgramErrorTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_reasonForHalt, _reasonForHaltErr := BACnetProgramErrorTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _reasonForHaltErr != nil { return nil, errors.Wrap(_reasonForHaltErr, "Error parsing 'reasonForHalt' field of BACnetPropertyStatesReasonForHalt") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesReasonForHaltParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetPropertyStatesReasonForHalt{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - ReasonForHalt: reasonForHalt, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + ReasonForHalt: reasonForHalt, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesReasonForHalt) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesReasonForHalt") } - // Simple Field (reasonForHalt) - if pushErr := writeBuffer.PushContext("reasonForHalt"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for reasonForHalt") - } - _reasonForHaltErr := writeBuffer.WriteSerializable(ctx, m.GetReasonForHalt()) - if popErr := writeBuffer.PopContext("reasonForHalt"); popErr != nil { - return errors.Wrap(popErr, "Error popping for reasonForHalt") - } - if _reasonForHaltErr != nil { - return errors.Wrap(_reasonForHaltErr, "Error serializing 'reasonForHalt' field") - } + // Simple Field (reasonForHalt) + if pushErr := writeBuffer.PushContext("reasonForHalt"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for reasonForHalt") + } + _reasonForHaltErr := writeBuffer.WriteSerializable(ctx, m.GetReasonForHalt()) + if popErr := writeBuffer.PopContext("reasonForHalt"); popErr != nil { + return errors.Wrap(popErr, "Error popping for reasonForHalt") + } + if _reasonForHaltErr != nil { + return errors.Wrap(_reasonForHaltErr, "Error serializing 'reasonForHalt' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesReasonForHalt"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesReasonForHalt") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesReasonForHalt) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesReasonForHalt) isBACnetPropertyStatesReasonForHalt() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesReasonForHalt) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesReliability.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesReliability.go index 06169700124..047da0c5afb 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesReliability.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesReliability.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesReliability is the corresponding interface of BACnetPropertyStatesReliability type BACnetPropertyStatesReliability interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesReliabilityExactly interface { // _BACnetPropertyStatesReliability is the data-structure of this message type _BACnetPropertyStatesReliability struct { *_BACnetPropertyStates - Reliability BACnetReliabilityTagged + Reliability BACnetReliabilityTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesReliability struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesReliability) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesReliability) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesReliability) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesReliability) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesReliability) GetReliability() BACnetReliabilityTag /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesReliability factory function for _BACnetPropertyStatesReliability -func NewBACnetPropertyStatesReliability(reliability BACnetReliabilityTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesReliability { +func NewBACnetPropertyStatesReliability( reliability BACnetReliabilityTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesReliability { _result := &_BACnetPropertyStatesReliability{ - Reliability: reliability, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + Reliability: reliability, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesReliability(reliability BACnetReliabilityTagged, pee // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesReliability(structType interface{}) BACnetPropertyStatesReliability { - if casted, ok := structType.(BACnetPropertyStatesReliability); ok { + if casted, ok := structType.(BACnetPropertyStatesReliability); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesReliability); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesReliability) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetPropertyStatesReliability) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesReliabilityParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("reliability"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for reliability") } - _reliability, _reliabilityErr := BACnetReliabilityTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_reliability, _reliabilityErr := BACnetReliabilityTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _reliabilityErr != nil { return nil, errors.Wrap(_reliabilityErr, "Error parsing 'reliability' field of BACnetPropertyStatesReliability") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesReliabilityParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetPropertyStatesReliability{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - Reliability: reliability, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + Reliability: reliability, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesReliability) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesReliability") } - // Simple Field (reliability) - if pushErr := writeBuffer.PushContext("reliability"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for reliability") - } - _reliabilityErr := writeBuffer.WriteSerializable(ctx, m.GetReliability()) - if popErr := writeBuffer.PopContext("reliability"); popErr != nil { - return errors.Wrap(popErr, "Error popping for reliability") - } - if _reliabilityErr != nil { - return errors.Wrap(_reliabilityErr, "Error serializing 'reliability' field") - } + // Simple Field (reliability) + if pushErr := writeBuffer.PushContext("reliability"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for reliability") + } + _reliabilityErr := writeBuffer.WriteSerializable(ctx, m.GetReliability()) + if popErr := writeBuffer.PopContext("reliability"); popErr != nil { + return errors.Wrap(popErr, "Error popping for reliability") + } + if _reliabilityErr != nil { + return errors.Wrap(_reliabilityErr, "Error serializing 'reliability' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesReliability"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesReliability") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesReliability) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesReliability) isBACnetPropertyStatesReliability() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesReliability) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesRestartReason.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesRestartReason.go index 589bb8484df..fc57d14984b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesRestartReason.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesRestartReason.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesRestartReason is the corresponding interface of BACnetPropertyStatesRestartReason type BACnetPropertyStatesRestartReason interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesRestartReasonExactly interface { // _BACnetPropertyStatesRestartReason is the data-structure of this message type _BACnetPropertyStatesRestartReason struct { *_BACnetPropertyStates - RestartReason BACnetRestartReasonTagged + RestartReason BACnetRestartReasonTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesRestartReason struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesRestartReason) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesRestartReason) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesRestartReason) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesRestartReason) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesRestartReason) GetRestartReason() BACnetRestartRea /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesRestartReason factory function for _BACnetPropertyStatesRestartReason -func NewBACnetPropertyStatesRestartReason(restartReason BACnetRestartReasonTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesRestartReason { +func NewBACnetPropertyStatesRestartReason( restartReason BACnetRestartReasonTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesRestartReason { _result := &_BACnetPropertyStatesRestartReason{ - RestartReason: restartReason, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + RestartReason: restartReason, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesRestartReason(restartReason BACnetRestartReasonTagge // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesRestartReason(structType interface{}) BACnetPropertyStatesRestartReason { - if casted, ok := structType.(BACnetPropertyStatesRestartReason); ok { + if casted, ok := structType.(BACnetPropertyStatesRestartReason); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesRestartReason); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesRestartReason) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetPropertyStatesRestartReason) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesRestartReasonParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("restartReason"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for restartReason") } - _restartReason, _restartReasonErr := BACnetRestartReasonTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_restartReason, _restartReasonErr := BACnetRestartReasonTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _restartReasonErr != nil { return nil, errors.Wrap(_restartReasonErr, "Error parsing 'restartReason' field of BACnetPropertyStatesRestartReason") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesRestartReasonParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetPropertyStatesRestartReason{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - RestartReason: restartReason, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + RestartReason: restartReason, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesRestartReason) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesRestartReason") } - // Simple Field (restartReason) - if pushErr := writeBuffer.PushContext("restartReason"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for restartReason") - } - _restartReasonErr := writeBuffer.WriteSerializable(ctx, m.GetRestartReason()) - if popErr := writeBuffer.PopContext("restartReason"); popErr != nil { - return errors.Wrap(popErr, "Error popping for restartReason") - } - if _restartReasonErr != nil { - return errors.Wrap(_restartReasonErr, "Error serializing 'restartReason' field") - } + // Simple Field (restartReason) + if pushErr := writeBuffer.PushContext("restartReason"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for restartReason") + } + _restartReasonErr := writeBuffer.WriteSerializable(ctx, m.GetRestartReason()) + if popErr := writeBuffer.PopContext("restartReason"); popErr != nil { + return errors.Wrap(popErr, "Error popping for restartReason") + } + if _restartReasonErr != nil { + return errors.Wrap(_restartReasonErr, "Error serializing 'restartReason' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesRestartReason"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesRestartReason") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesRestartReason) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesRestartReason) isBACnetPropertyStatesRestartReason() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesRestartReason) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesSecurityLevel.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesSecurityLevel.go index 57cf36cf208..4444f9592e7 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesSecurityLevel.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesSecurityLevel.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesSecurityLevel is the corresponding interface of BACnetPropertyStatesSecurityLevel type BACnetPropertyStatesSecurityLevel interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesSecurityLevelExactly interface { // _BACnetPropertyStatesSecurityLevel is the data-structure of this message type _BACnetPropertyStatesSecurityLevel struct { *_BACnetPropertyStates - SecurityLevel BACnetSecurityLevelTagged + SecurityLevel BACnetSecurityLevelTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesSecurityLevel struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesSecurityLevel) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesSecurityLevel) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesSecurityLevel) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesSecurityLevel) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesSecurityLevel) GetSecurityLevel() BACnetSecurityLe /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesSecurityLevel factory function for _BACnetPropertyStatesSecurityLevel -func NewBACnetPropertyStatesSecurityLevel(securityLevel BACnetSecurityLevelTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesSecurityLevel { +func NewBACnetPropertyStatesSecurityLevel( securityLevel BACnetSecurityLevelTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesSecurityLevel { _result := &_BACnetPropertyStatesSecurityLevel{ - SecurityLevel: securityLevel, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + SecurityLevel: securityLevel, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesSecurityLevel(securityLevel BACnetSecurityLevelTagge // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesSecurityLevel(structType interface{}) BACnetPropertyStatesSecurityLevel { - if casted, ok := structType.(BACnetPropertyStatesSecurityLevel); ok { + if casted, ok := structType.(BACnetPropertyStatesSecurityLevel); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesSecurityLevel); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesSecurityLevel) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetPropertyStatesSecurityLevel) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesSecurityLevelParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("securityLevel"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for securityLevel") } - _securityLevel, _securityLevelErr := BACnetSecurityLevelTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_securityLevel, _securityLevelErr := BACnetSecurityLevelTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _securityLevelErr != nil { return nil, errors.Wrap(_securityLevelErr, "Error parsing 'securityLevel' field of BACnetPropertyStatesSecurityLevel") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesSecurityLevelParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetPropertyStatesSecurityLevel{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - SecurityLevel: securityLevel, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + SecurityLevel: securityLevel, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesSecurityLevel) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesSecurityLevel") } - // Simple Field (securityLevel) - if pushErr := writeBuffer.PushContext("securityLevel"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for securityLevel") - } - _securityLevelErr := writeBuffer.WriteSerializable(ctx, m.GetSecurityLevel()) - if popErr := writeBuffer.PopContext("securityLevel"); popErr != nil { - return errors.Wrap(popErr, "Error popping for securityLevel") - } - if _securityLevelErr != nil { - return errors.Wrap(_securityLevelErr, "Error serializing 'securityLevel' field") - } + // Simple Field (securityLevel) + if pushErr := writeBuffer.PushContext("securityLevel"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for securityLevel") + } + _securityLevelErr := writeBuffer.WriteSerializable(ctx, m.GetSecurityLevel()) + if popErr := writeBuffer.PopContext("securityLevel"); popErr != nil { + return errors.Wrap(popErr, "Error popping for securityLevel") + } + if _securityLevelErr != nil { + return errors.Wrap(_securityLevelErr, "Error serializing 'securityLevel' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesSecurityLevel"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesSecurityLevel") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesSecurityLevel) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesSecurityLevel) isBACnetPropertyStatesSecurityLevel() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesSecurityLevel) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesShedState.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesShedState.go index acd30460e13..df3e4851e70 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesShedState.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesShedState.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesShedState is the corresponding interface of BACnetPropertyStatesShedState type BACnetPropertyStatesShedState interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesShedStateExactly interface { // _BACnetPropertyStatesShedState is the data-structure of this message type _BACnetPropertyStatesShedState struct { *_BACnetPropertyStates - ShedState BACnetShedStateTagged + ShedState BACnetShedStateTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesShedState struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesShedState) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesShedState) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesShedState) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesShedState) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesShedState) GetShedState() BACnetShedStateTagged { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesShedState factory function for _BACnetPropertyStatesShedState -func NewBACnetPropertyStatesShedState(shedState BACnetShedStateTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesShedState { +func NewBACnetPropertyStatesShedState( shedState BACnetShedStateTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesShedState { _result := &_BACnetPropertyStatesShedState{ - ShedState: shedState, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + ShedState: shedState, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesShedState(shedState BACnetShedStateTagged, peekedTag // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesShedState(structType interface{}) BACnetPropertyStatesShedState { - if casted, ok := structType.(BACnetPropertyStatesShedState); ok { + if casted, ok := structType.(BACnetPropertyStatesShedState); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesShedState); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesShedState) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetPropertyStatesShedState) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesShedStateParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("shedState"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for shedState") } - _shedState, _shedStateErr := BACnetShedStateTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_shedState, _shedStateErr := BACnetShedStateTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _shedStateErr != nil { return nil, errors.Wrap(_shedStateErr, "Error parsing 'shedState' field of BACnetPropertyStatesShedState") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesShedStateParseWithBuffer(ctx context.Context, readBuffe // Create a partially initialized instance _child := &_BACnetPropertyStatesShedState{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - ShedState: shedState, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + ShedState: shedState, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesShedState) SerializeWithWriteBuffer(ctx context.Co return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesShedState") } - // Simple Field (shedState) - if pushErr := writeBuffer.PushContext("shedState"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for shedState") - } - _shedStateErr := writeBuffer.WriteSerializable(ctx, m.GetShedState()) - if popErr := writeBuffer.PopContext("shedState"); popErr != nil { - return errors.Wrap(popErr, "Error popping for shedState") - } - if _shedStateErr != nil { - return errors.Wrap(_shedStateErr, "Error serializing 'shedState' field") - } + // Simple Field (shedState) + if pushErr := writeBuffer.PushContext("shedState"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for shedState") + } + _shedStateErr := writeBuffer.WriteSerializable(ctx, m.GetShedState()) + if popErr := writeBuffer.PopContext("shedState"); popErr != nil { + return errors.Wrap(popErr, "Error popping for shedState") + } + if _shedStateErr != nil { + return errors.Wrap(_shedStateErr, "Error serializing 'shedState' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesShedState"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesShedState") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesShedState) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesShedState) isBACnetPropertyStatesShedState() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesShedState) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesSilencedState.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesSilencedState.go index 6635647cb3f..d1755c4a748 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesSilencedState.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesSilencedState.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesSilencedState is the corresponding interface of BACnetPropertyStatesSilencedState type BACnetPropertyStatesSilencedState interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesSilencedStateExactly interface { // _BACnetPropertyStatesSilencedState is the data-structure of this message type _BACnetPropertyStatesSilencedState struct { *_BACnetPropertyStates - SilencedState BACnetSilencedStateTagged + SilencedState BACnetSilencedStateTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesSilencedState struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesSilencedState) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesSilencedState) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesSilencedState) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesSilencedState) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesSilencedState) GetSilencedState() BACnetSilencedSt /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesSilencedState factory function for _BACnetPropertyStatesSilencedState -func NewBACnetPropertyStatesSilencedState(silencedState BACnetSilencedStateTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesSilencedState { +func NewBACnetPropertyStatesSilencedState( silencedState BACnetSilencedStateTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesSilencedState { _result := &_BACnetPropertyStatesSilencedState{ - SilencedState: silencedState, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + SilencedState: silencedState, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesSilencedState(silencedState BACnetSilencedStateTagge // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesSilencedState(structType interface{}) BACnetPropertyStatesSilencedState { - if casted, ok := structType.(BACnetPropertyStatesSilencedState); ok { + if casted, ok := structType.(BACnetPropertyStatesSilencedState); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesSilencedState); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesSilencedState) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetPropertyStatesSilencedState) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesSilencedStateParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("silencedState"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for silencedState") } - _silencedState, _silencedStateErr := BACnetSilencedStateTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_silencedState, _silencedStateErr := BACnetSilencedStateTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _silencedStateErr != nil { return nil, errors.Wrap(_silencedStateErr, "Error parsing 'silencedState' field of BACnetPropertyStatesSilencedState") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesSilencedStateParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BACnetPropertyStatesSilencedState{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - SilencedState: silencedState, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + SilencedState: silencedState, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesSilencedState) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesSilencedState") } - // Simple Field (silencedState) - if pushErr := writeBuffer.PushContext("silencedState"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for silencedState") - } - _silencedStateErr := writeBuffer.WriteSerializable(ctx, m.GetSilencedState()) - if popErr := writeBuffer.PopContext("silencedState"); popErr != nil { - return errors.Wrap(popErr, "Error popping for silencedState") - } - if _silencedStateErr != nil { - return errors.Wrap(_silencedStateErr, "Error serializing 'silencedState' field") - } + // Simple Field (silencedState) + if pushErr := writeBuffer.PushContext("silencedState"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for silencedState") + } + _silencedStateErr := writeBuffer.WriteSerializable(ctx, m.GetSilencedState()) + if popErr := writeBuffer.PopContext("silencedState"); popErr != nil { + return errors.Wrap(popErr, "Error popping for silencedState") + } + if _silencedStateErr != nil { + return errors.Wrap(_silencedStateErr, "Error serializing 'silencedState' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesSilencedState"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesSilencedState") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesSilencedState) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesSilencedState) isBACnetPropertyStatesSilencedState() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesSilencedState) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesState.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesState.go index d609e46a379..cec7db83fe7 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesState.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesState.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesState is the corresponding interface of BACnetPropertyStatesState type BACnetPropertyStatesState interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesStateExactly interface { // _BACnetPropertyStatesState is the data-structure of this message type _BACnetPropertyStatesState struct { *_BACnetPropertyStates - State BACnetEventStateTagged + State BACnetEventStateTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesState struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesState) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesState) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesState) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesState) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesState) GetState() BACnetEventStateTagged { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesState factory function for _BACnetPropertyStatesState -func NewBACnetPropertyStatesState(state BACnetEventStateTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesState { +func NewBACnetPropertyStatesState( state BACnetEventStateTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesState { _result := &_BACnetPropertyStatesState{ - State: state, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + State: state, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesState(state BACnetEventStateTagged, peekedTagHeader // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesState(structType interface{}) BACnetPropertyStatesState { - if casted, ok := structType.(BACnetPropertyStatesState); ok { + if casted, ok := structType.(BACnetPropertyStatesState); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesState); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesState) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_BACnetPropertyStatesState) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesStateParseWithBuffer(ctx context.Context, readBuffer ut if pullErr := readBuffer.PullContext("state"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for state") } - _state, _stateErr := BACnetEventStateTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_state, _stateErr := BACnetEventStateTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _stateErr != nil { return nil, errors.Wrap(_stateErr, "Error parsing 'state' field of BACnetPropertyStatesState") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesStateParseWithBuffer(ctx context.Context, readBuffer ut // Create a partially initialized instance _child := &_BACnetPropertyStatesState{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - State: state, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + State: state, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesState) SerializeWithWriteBuffer(ctx context.Contex return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesState") } - // Simple Field (state) - if pushErr := writeBuffer.PushContext("state"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for state") - } - _stateErr := writeBuffer.WriteSerializable(ctx, m.GetState()) - if popErr := writeBuffer.PopContext("state"); popErr != nil { - return errors.Wrap(popErr, "Error popping for state") - } - if _stateErr != nil { - return errors.Wrap(_stateErr, "Error serializing 'state' field") - } + // Simple Field (state) + if pushErr := writeBuffer.PushContext("state"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for state") + } + _stateErr := writeBuffer.WriteSerializable(ctx, m.GetState()) + if popErr := writeBuffer.PopContext("state"); popErr != nil { + return errors.Wrap(popErr, "Error popping for state") + } + if _stateErr != nil { + return errors.Wrap(_stateErr, "Error serializing 'state' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesState"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesState") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesState) SerializeWithWriteBuffer(ctx context.Contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesState) isBACnetPropertyStatesState() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesState) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesSystemStatus.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesSystemStatus.go index 01f34741ee7..c82deca43cd 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesSystemStatus.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesSystemStatus.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesSystemStatus is the corresponding interface of BACnetPropertyStatesSystemStatus type BACnetPropertyStatesSystemStatus interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesSystemStatusExactly interface { // _BACnetPropertyStatesSystemStatus is the data-structure of this message type _BACnetPropertyStatesSystemStatus struct { *_BACnetPropertyStates - SystemStatus BACnetDeviceStatusTagged + SystemStatus BACnetDeviceStatusTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesSystemStatus struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesSystemStatus) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesSystemStatus) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesSystemStatus) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesSystemStatus) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesSystemStatus) GetSystemStatus() BACnetDeviceStatus /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesSystemStatus factory function for _BACnetPropertyStatesSystemStatus -func NewBACnetPropertyStatesSystemStatus(systemStatus BACnetDeviceStatusTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesSystemStatus { +func NewBACnetPropertyStatesSystemStatus( systemStatus BACnetDeviceStatusTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesSystemStatus { _result := &_BACnetPropertyStatesSystemStatus{ - SystemStatus: systemStatus, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + SystemStatus: systemStatus, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesSystemStatus(systemStatus BACnetDeviceStatusTagged, // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesSystemStatus(structType interface{}) BACnetPropertyStatesSystemStatus { - if casted, ok := structType.(BACnetPropertyStatesSystemStatus); ok { + if casted, ok := structType.(BACnetPropertyStatesSystemStatus); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesSystemStatus); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesSystemStatus) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetPropertyStatesSystemStatus) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesSystemStatusParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("systemStatus"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for systemStatus") } - _systemStatus, _systemStatusErr := BACnetDeviceStatusTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_systemStatus, _systemStatusErr := BACnetDeviceStatusTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _systemStatusErr != nil { return nil, errors.Wrap(_systemStatusErr, "Error parsing 'systemStatus' field of BACnetPropertyStatesSystemStatus") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesSystemStatusParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BACnetPropertyStatesSystemStatus{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - SystemStatus: systemStatus, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + SystemStatus: systemStatus, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesSystemStatus) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesSystemStatus") } - // Simple Field (systemStatus) - if pushErr := writeBuffer.PushContext("systemStatus"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for systemStatus") - } - _systemStatusErr := writeBuffer.WriteSerializable(ctx, m.GetSystemStatus()) - if popErr := writeBuffer.PopContext("systemStatus"); popErr != nil { - return errors.Wrap(popErr, "Error popping for systemStatus") - } - if _systemStatusErr != nil { - return errors.Wrap(_systemStatusErr, "Error serializing 'systemStatus' field") - } + // Simple Field (systemStatus) + if pushErr := writeBuffer.PushContext("systemStatus"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for systemStatus") + } + _systemStatusErr := writeBuffer.WriteSerializable(ctx, m.GetSystemStatus()) + if popErr := writeBuffer.PopContext("systemStatus"); popErr != nil { + return errors.Wrap(popErr, "Error popping for systemStatus") + } + if _systemStatusErr != nil { + return errors.Wrap(_systemStatusErr, "Error serializing 'systemStatus' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesSystemStatus"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesSystemStatus") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesSystemStatus) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesSystemStatus) isBACnetPropertyStatesSystemStatus() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesSystemStatus) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesTimerState.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesTimerState.go index e983c0c5893..3e05004cb48 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesTimerState.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesTimerState.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesTimerState is the corresponding interface of BACnetPropertyStatesTimerState type BACnetPropertyStatesTimerState interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesTimerStateExactly interface { // _BACnetPropertyStatesTimerState is the data-structure of this message type _BACnetPropertyStatesTimerState struct { *_BACnetPropertyStates - TimerState BACnetTimerStateTagged + TimerState BACnetTimerStateTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesTimerState struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesTimerState) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesTimerState) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesTimerState) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesTimerState) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesTimerState) GetTimerState() BACnetTimerStateTagged /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesTimerState factory function for _BACnetPropertyStatesTimerState -func NewBACnetPropertyStatesTimerState(timerState BACnetTimerStateTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesTimerState { +func NewBACnetPropertyStatesTimerState( timerState BACnetTimerStateTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesTimerState { _result := &_BACnetPropertyStatesTimerState{ - TimerState: timerState, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + TimerState: timerState, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesTimerState(timerState BACnetTimerStateTagged, peeked // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesTimerState(structType interface{}) BACnetPropertyStatesTimerState { - if casted, ok := structType.(BACnetPropertyStatesTimerState); ok { + if casted, ok := structType.(BACnetPropertyStatesTimerState); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesTimerState); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesTimerState) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetPropertyStatesTimerState) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesTimerStateParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("timerState"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timerState") } - _timerState, _timerStateErr := BACnetTimerStateTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_timerState, _timerStateErr := BACnetTimerStateTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _timerStateErr != nil { return nil, errors.Wrap(_timerStateErr, "Error parsing 'timerState' field of BACnetPropertyStatesTimerState") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesTimerStateParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_BACnetPropertyStatesTimerState{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - TimerState: timerState, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + TimerState: timerState, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesTimerState) SerializeWithWriteBuffer(ctx context.C return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesTimerState") } - // Simple Field (timerState) - if pushErr := writeBuffer.PushContext("timerState"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timerState") - } - _timerStateErr := writeBuffer.WriteSerializable(ctx, m.GetTimerState()) - if popErr := writeBuffer.PopContext("timerState"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timerState") - } - if _timerStateErr != nil { - return errors.Wrap(_timerStateErr, "Error serializing 'timerState' field") - } + // Simple Field (timerState) + if pushErr := writeBuffer.PushContext("timerState"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timerState") + } + _timerStateErr := writeBuffer.WriteSerializable(ctx, m.GetTimerState()) + if popErr := writeBuffer.PopContext("timerState"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timerState") + } + if _timerStateErr != nil { + return errors.Wrap(_timerStateErr, "Error serializing 'timerState' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesTimerState"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesTimerState") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesTimerState) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesTimerState) isBACnetPropertyStatesTimerState() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesTimerState) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesTimerTransition.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesTimerTransition.go index d4423ddd2e7..597c323de58 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesTimerTransition.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesTimerTransition.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesTimerTransition is the corresponding interface of BACnetPropertyStatesTimerTransition type BACnetPropertyStatesTimerTransition interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesTimerTransitionExactly interface { // _BACnetPropertyStatesTimerTransition is the data-structure of this message type _BACnetPropertyStatesTimerTransition struct { *_BACnetPropertyStates - TimerTransition BACnetTimerTransitionTagged + TimerTransition BACnetTimerTransitionTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesTimerTransition struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesTimerTransition) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesTimerTransition) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesTimerTransition) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesTimerTransition) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesTimerTransition) GetTimerTransition() BACnetTimerT /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesTimerTransition factory function for _BACnetPropertyStatesTimerTransition -func NewBACnetPropertyStatesTimerTransition(timerTransition BACnetTimerTransitionTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesTimerTransition { +func NewBACnetPropertyStatesTimerTransition( timerTransition BACnetTimerTransitionTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesTimerTransition { _result := &_BACnetPropertyStatesTimerTransition{ - TimerTransition: timerTransition, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + TimerTransition: timerTransition, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesTimerTransition(timerTransition BACnetTimerTransitio // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesTimerTransition(structType interface{}) BACnetPropertyStatesTimerTransition { - if casted, ok := structType.(BACnetPropertyStatesTimerTransition); ok { + if casted, ok := structType.(BACnetPropertyStatesTimerTransition); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesTimerTransition); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesTimerTransition) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetPropertyStatesTimerTransition) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesTimerTransitionParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("timerTransition"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timerTransition") } - _timerTransition, _timerTransitionErr := BACnetTimerTransitionTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_timerTransition, _timerTransitionErr := BACnetTimerTransitionTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _timerTransitionErr != nil { return nil, errors.Wrap(_timerTransitionErr, "Error parsing 'timerTransition' field of BACnetPropertyStatesTimerTransition") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesTimerTransitionParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BACnetPropertyStatesTimerTransition{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - TimerTransition: timerTransition, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + TimerTransition: timerTransition, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesTimerTransition) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesTimerTransition") } - // Simple Field (timerTransition) - if pushErr := writeBuffer.PushContext("timerTransition"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timerTransition") - } - _timerTransitionErr := writeBuffer.WriteSerializable(ctx, m.GetTimerTransition()) - if popErr := writeBuffer.PopContext("timerTransition"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timerTransition") - } - if _timerTransitionErr != nil { - return errors.Wrap(_timerTransitionErr, "Error serializing 'timerTransition' field") - } + // Simple Field (timerTransition) + if pushErr := writeBuffer.PushContext("timerTransition"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timerTransition") + } + _timerTransitionErr := writeBuffer.WriteSerializable(ctx, m.GetTimerTransition()) + if popErr := writeBuffer.PopContext("timerTransition"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timerTransition") + } + if _timerTransitionErr != nil { + return errors.Wrap(_timerTransitionErr, "Error serializing 'timerTransition' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesTimerTransition"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesTimerTransition") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesTimerTransition) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesTimerTransition) isBACnetPropertyStatesTimerTransition() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesTimerTransition) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesUnits.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesUnits.go index e6143cc95a5..ac7cc103454 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesUnits.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesUnits.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesUnits is the corresponding interface of BACnetPropertyStatesUnits type BACnetPropertyStatesUnits interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesUnitsExactly interface { // _BACnetPropertyStatesUnits is the data-structure of this message type _BACnetPropertyStatesUnits struct { *_BACnetPropertyStates - Units BACnetEngineeringUnitsTagged + Units BACnetEngineeringUnitsTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesUnits struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesUnits) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesUnits) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesUnits) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesUnits) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesUnits) GetUnits() BACnetEngineeringUnitsTagged { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesUnits factory function for _BACnetPropertyStatesUnits -func NewBACnetPropertyStatesUnits(units BACnetEngineeringUnitsTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesUnits { +func NewBACnetPropertyStatesUnits( units BACnetEngineeringUnitsTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesUnits { _result := &_BACnetPropertyStatesUnits{ - Units: units, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + Units: units, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesUnits(units BACnetEngineeringUnitsTagged, peekedTagH // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesUnits(structType interface{}) BACnetPropertyStatesUnits { - if casted, ok := structType.(BACnetPropertyStatesUnits); ok { + if casted, ok := structType.(BACnetPropertyStatesUnits); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesUnits); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesUnits) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_BACnetPropertyStatesUnits) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesUnitsParseWithBuffer(ctx context.Context, readBuffer ut if pullErr := readBuffer.PullContext("units"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for units") } - _units, _unitsErr := BACnetEngineeringUnitsTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_units, _unitsErr := BACnetEngineeringUnitsTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _unitsErr != nil { return nil, errors.Wrap(_unitsErr, "Error parsing 'units' field of BACnetPropertyStatesUnits") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesUnitsParseWithBuffer(ctx context.Context, readBuffer ut // Create a partially initialized instance _child := &_BACnetPropertyStatesUnits{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - Units: units, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + Units: units, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesUnits) SerializeWithWriteBuffer(ctx context.Contex return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesUnits") } - // Simple Field (units) - if pushErr := writeBuffer.PushContext("units"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for units") - } - _unitsErr := writeBuffer.WriteSerializable(ctx, m.GetUnits()) - if popErr := writeBuffer.PopContext("units"); popErr != nil { - return errors.Wrap(popErr, "Error popping for units") - } - if _unitsErr != nil { - return errors.Wrap(_unitsErr, "Error serializing 'units' field") - } + // Simple Field (units) + if pushErr := writeBuffer.PushContext("units"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for units") + } + _unitsErr := writeBuffer.WriteSerializable(ctx, m.GetUnits()) + if popErr := writeBuffer.PopContext("units"); popErr != nil { + return errors.Wrap(popErr, "Error popping for units") + } + if _unitsErr != nil { + return errors.Wrap(_unitsErr, "Error serializing 'units' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesUnits"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesUnits") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesUnits) SerializeWithWriteBuffer(ctx context.Contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesUnits) isBACnetPropertyStatesUnits() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesUnits) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesWriteStatus.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesWriteStatus.go index f96191e611c..117ec1adf65 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesWriteStatus.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesWriteStatus.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesWriteStatus is the corresponding interface of BACnetPropertyStatesWriteStatus type BACnetPropertyStatesWriteStatus interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesWriteStatusExactly interface { // _BACnetPropertyStatesWriteStatus is the data-structure of this message type _BACnetPropertyStatesWriteStatus struct { *_BACnetPropertyStates - WriteStatus BACnetWriteStatusTagged + WriteStatus BACnetWriteStatusTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesWriteStatus struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesWriteStatus) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesWriteStatus) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesWriteStatus) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesWriteStatus) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesWriteStatus) GetWriteStatus() BACnetWriteStatusTag /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesWriteStatus factory function for _BACnetPropertyStatesWriteStatus -func NewBACnetPropertyStatesWriteStatus(writeStatus BACnetWriteStatusTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesWriteStatus { +func NewBACnetPropertyStatesWriteStatus( writeStatus BACnetWriteStatusTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesWriteStatus { _result := &_BACnetPropertyStatesWriteStatus{ - WriteStatus: writeStatus, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + WriteStatus: writeStatus, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesWriteStatus(writeStatus BACnetWriteStatusTagged, pee // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesWriteStatus(structType interface{}) BACnetPropertyStatesWriteStatus { - if casted, ok := structType.(BACnetPropertyStatesWriteStatus); ok { + if casted, ok := structType.(BACnetPropertyStatesWriteStatus); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesWriteStatus); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesWriteStatus) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetPropertyStatesWriteStatus) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesWriteStatusParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("writeStatus"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for writeStatus") } - _writeStatus, _writeStatusErr := BACnetWriteStatusTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_writeStatus, _writeStatusErr := BACnetWriteStatusTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _writeStatusErr != nil { return nil, errors.Wrap(_writeStatusErr, "Error parsing 'writeStatus' field of BACnetPropertyStatesWriteStatus") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesWriteStatusParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_BACnetPropertyStatesWriteStatus{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - WriteStatus: writeStatus, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + WriteStatus: writeStatus, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesWriteStatus) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesWriteStatus") } - // Simple Field (writeStatus) - if pushErr := writeBuffer.PushContext("writeStatus"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for writeStatus") - } - _writeStatusErr := writeBuffer.WriteSerializable(ctx, m.GetWriteStatus()) - if popErr := writeBuffer.PopContext("writeStatus"); popErr != nil { - return errors.Wrap(popErr, "Error popping for writeStatus") - } - if _writeStatusErr != nil { - return errors.Wrap(_writeStatusErr, "Error serializing 'writeStatus' field") - } + // Simple Field (writeStatus) + if pushErr := writeBuffer.PushContext("writeStatus"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for writeStatus") + } + _writeStatusErr := writeBuffer.WriteSerializable(ctx, m.GetWriteStatus()) + if popErr := writeBuffer.PopContext("writeStatus"); popErr != nil { + return errors.Wrap(popErr, "Error popping for writeStatus") + } + if _writeStatusErr != nil { + return errors.Wrap(_writeStatusErr, "Error serializing 'writeStatus' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesWriteStatus"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesWriteStatus") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesWriteStatus) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesWriteStatus) isBACnetPropertyStatesWriteStatus() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesWriteStatus) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesZoneOccupanyState.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesZoneOccupanyState.go index 80ca6ee02d1..87f1da166bc 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesZoneOccupanyState.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyStatesZoneOccupanyState.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyStatesZoneOccupanyState is the corresponding interface of BACnetPropertyStatesZoneOccupanyState type BACnetPropertyStatesZoneOccupanyState interface { @@ -46,9 +48,11 @@ type BACnetPropertyStatesZoneOccupanyStateExactly interface { // _BACnetPropertyStatesZoneOccupanyState is the data-structure of this message type _BACnetPropertyStatesZoneOccupanyState struct { *_BACnetPropertyStates - ZoneOccupanyState BACnetAccessZoneOccupancyStateTagged + ZoneOccupanyState BACnetAccessZoneOccupancyStateTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetPropertyStatesZoneOccupanyState struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetPropertyStatesZoneOccupanyState) InitializeParent(parent BACnetPropertyStates, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetPropertyStatesZoneOccupanyState) InitializeParent(parent BACnetPropertyStates , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetPropertyStatesZoneOccupanyState) GetParent() BACnetPropertyStates { +func (m *_BACnetPropertyStatesZoneOccupanyState) GetParent() BACnetPropertyStates { return m._BACnetPropertyStates } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetPropertyStatesZoneOccupanyState) GetZoneOccupanyState() BACnetAc /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyStatesZoneOccupanyState factory function for _BACnetPropertyStatesZoneOccupanyState -func NewBACnetPropertyStatesZoneOccupanyState(zoneOccupanyState BACnetAccessZoneOccupancyStateTagged, peekedTagHeader BACnetTagHeader) *_BACnetPropertyStatesZoneOccupanyState { +func NewBACnetPropertyStatesZoneOccupanyState( zoneOccupanyState BACnetAccessZoneOccupancyStateTagged , peekedTagHeader BACnetTagHeader ) *_BACnetPropertyStatesZoneOccupanyState { _result := &_BACnetPropertyStatesZoneOccupanyState{ - ZoneOccupanyState: zoneOccupanyState, - _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), + ZoneOccupanyState: zoneOccupanyState, + _BACnetPropertyStates: NewBACnetPropertyStates(peekedTagHeader), } _result._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetPropertyStatesZoneOccupanyState(zoneOccupanyState BACnetAccessZone // Deprecated: use the interface for direct cast func CastBACnetPropertyStatesZoneOccupanyState(structType interface{}) BACnetPropertyStatesZoneOccupanyState { - if casted, ok := structType.(BACnetPropertyStatesZoneOccupanyState); ok { + if casted, ok := structType.(BACnetPropertyStatesZoneOccupanyState); ok { return casted } if casted, ok := structType.(*BACnetPropertyStatesZoneOccupanyState); ok { @@ -115,6 +118,7 @@ func (m *_BACnetPropertyStatesZoneOccupanyState) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetPropertyStatesZoneOccupanyState) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetPropertyStatesZoneOccupanyStateParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("zoneOccupanyState"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for zoneOccupanyState") } - _zoneOccupanyState, _zoneOccupanyStateErr := BACnetAccessZoneOccupancyStateTaggedParseWithBuffer(ctx, readBuffer, uint8(peekedTagNumber), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_zoneOccupanyState, _zoneOccupanyStateErr := BACnetAccessZoneOccupancyStateTaggedParseWithBuffer(ctx, readBuffer , uint8( peekedTagNumber ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _zoneOccupanyStateErr != nil { return nil, errors.Wrap(_zoneOccupanyStateErr, "Error parsing 'zoneOccupanyState' field of BACnetPropertyStatesZoneOccupanyState") } @@ -151,8 +155,9 @@ func BACnetPropertyStatesZoneOccupanyStateParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_BACnetPropertyStatesZoneOccupanyState{ - _BACnetPropertyStates: &_BACnetPropertyStates{}, - ZoneOccupanyState: zoneOccupanyState, + _BACnetPropertyStates: &_BACnetPropertyStates{ + }, + ZoneOccupanyState: zoneOccupanyState, } _child._BACnetPropertyStates._BACnetPropertyStatesChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetPropertyStatesZoneOccupanyState) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for BACnetPropertyStatesZoneOccupanyState") } - // Simple Field (zoneOccupanyState) - if pushErr := writeBuffer.PushContext("zoneOccupanyState"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for zoneOccupanyState") - } - _zoneOccupanyStateErr := writeBuffer.WriteSerializable(ctx, m.GetZoneOccupanyState()) - if popErr := writeBuffer.PopContext("zoneOccupanyState"); popErr != nil { - return errors.Wrap(popErr, "Error popping for zoneOccupanyState") - } - if _zoneOccupanyStateErr != nil { - return errors.Wrap(_zoneOccupanyStateErr, "Error serializing 'zoneOccupanyState' field") - } + // Simple Field (zoneOccupanyState) + if pushErr := writeBuffer.PushContext("zoneOccupanyState"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for zoneOccupanyState") + } + _zoneOccupanyStateErr := writeBuffer.WriteSerializable(ctx, m.GetZoneOccupanyState()) + if popErr := writeBuffer.PopContext("zoneOccupanyState"); popErr != nil { + return errors.Wrap(popErr, "Error popping for zoneOccupanyState") + } + if _zoneOccupanyStateErr != nil { + return errors.Wrap(_zoneOccupanyStateErr, "Error serializing 'zoneOccupanyState' field") + } if popErr := writeBuffer.PopContext("BACnetPropertyStatesZoneOccupanyState"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetPropertyStatesZoneOccupanyState") @@ -194,6 +199,7 @@ func (m *_BACnetPropertyStatesZoneOccupanyState) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetPropertyStatesZoneOccupanyState) isBACnetPropertyStatesZoneOccupanyState() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetPropertyStatesZoneOccupanyState) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyValue.go index 09340734b68..f7d08e6ff0f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyValue.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyValue is the corresponding interface of BACnetPropertyValue type BACnetPropertyValue interface { @@ -51,15 +53,16 @@ type BACnetPropertyValueExactly interface { // _BACnetPropertyValue is the data-structure of this message type _BACnetPropertyValue struct { - PropertyIdentifier BACnetPropertyIdentifierTagged - PropertyArrayIndex BACnetContextTagUnsignedInteger - PropertyValue BACnetConstructedDataElement - Priority BACnetContextTagUnsignedInteger + PropertyIdentifier BACnetPropertyIdentifierTagged + PropertyArrayIndex BACnetContextTagUnsignedInteger + PropertyValue BACnetConstructedDataElement + Priority BACnetContextTagUnsignedInteger // Arguments. ObjectTypeArgument BACnetObjectType } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -86,14 +89,15 @@ func (m *_BACnetPropertyValue) GetPriority() BACnetContextTagUnsignedInteger { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyValue factory function for _BACnetPropertyValue -func NewBACnetPropertyValue(propertyIdentifier BACnetPropertyIdentifierTagged, propertyArrayIndex BACnetContextTagUnsignedInteger, propertyValue BACnetConstructedDataElement, priority BACnetContextTagUnsignedInteger, objectTypeArgument BACnetObjectType) *_BACnetPropertyValue { - return &_BACnetPropertyValue{PropertyIdentifier: propertyIdentifier, PropertyArrayIndex: propertyArrayIndex, PropertyValue: propertyValue, Priority: priority, ObjectTypeArgument: objectTypeArgument} +func NewBACnetPropertyValue( propertyIdentifier BACnetPropertyIdentifierTagged , propertyArrayIndex BACnetContextTagUnsignedInteger , propertyValue BACnetConstructedDataElement , priority BACnetContextTagUnsignedInteger , objectTypeArgument BACnetObjectType ) *_BACnetPropertyValue { +return &_BACnetPropertyValue{ PropertyIdentifier: propertyIdentifier , PropertyArrayIndex: propertyArrayIndex , PropertyValue: propertyValue , Priority: priority , ObjectTypeArgument: objectTypeArgument } } // Deprecated: use the interface for direct cast func CastBACnetPropertyValue(structType interface{}) BACnetPropertyValue { - if casted, ok := structType.(BACnetPropertyValue); ok { + if casted, ok := structType.(BACnetPropertyValue); ok { return casted } if casted, ok := structType.(*BACnetPropertyValue); ok { @@ -130,6 +134,7 @@ func (m *_BACnetPropertyValue) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetPropertyValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,7 +156,7 @@ func BACnetPropertyValueParseWithBuffer(ctx context.Context, readBuffer utils.Re if pullErr := readBuffer.PullContext("propertyIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for propertyIdentifier") } - _propertyIdentifier, _propertyIdentifierErr := BACnetPropertyIdentifierTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_propertyIdentifier, _propertyIdentifierErr := BACnetPropertyIdentifierTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _propertyIdentifierErr != nil { return nil, errors.Wrap(_propertyIdentifierErr, "Error parsing 'propertyIdentifier' field of BACnetPropertyValue") } @@ -162,12 +167,12 @@ func BACnetPropertyValueParseWithBuffer(ctx context.Context, readBuffer utils.Re // Optional Field (propertyArrayIndex) (Can be skipped, if a given expression evaluates to false) var propertyArrayIndex BACnetContextTagUnsignedInteger = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("propertyArrayIndex"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for propertyArrayIndex") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(1), BACnetDataType_UNSIGNED_INTEGER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(1) , BACnetDataType_UNSIGNED_INTEGER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -184,12 +189,12 @@ func BACnetPropertyValueParseWithBuffer(ctx context.Context, readBuffer utils.Re // Optional Field (propertyValue) (Can be skipped, if a given expression evaluates to false) var propertyValue BACnetConstructedDataElement = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("propertyValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for propertyValue") } - _val, _err := BACnetConstructedDataElementParseWithBuffer(ctx, readBuffer, objectTypeArgument, propertyIdentifier.GetValue(), (CastBACnetTagPayloadUnsignedInteger(utils.InlineIf(bool((propertyArrayIndex) != (nil)), func() interface{} { return CastBACnetTagPayloadUnsignedInteger((propertyArrayIndex).GetPayload()) }, func() interface{} { return CastBACnetTagPayloadUnsignedInteger(nil) })))) +_val, _err := BACnetConstructedDataElementParseWithBuffer(ctx, readBuffer , objectTypeArgument , propertyIdentifier.GetValue() , (CastBACnetTagPayloadUnsignedInteger(utils.InlineIf(bool(((propertyArrayIndex)) != (nil)), func() interface{} {return CastBACnetTagPayloadUnsignedInteger((propertyArrayIndex).GetPayload())}, func() interface{} {return CastBACnetTagPayloadUnsignedInteger(nil)}))) ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -206,12 +211,12 @@ func BACnetPropertyValueParseWithBuffer(ctx context.Context, readBuffer utils.Re // Optional Field (priority) (Can be skipped, if a given expression evaluates to false) var priority BACnetContextTagUnsignedInteger = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("priority"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for priority") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(3), BACnetDataType_UNSIGNED_INTEGER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(3) , BACnetDataType_UNSIGNED_INTEGER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -232,12 +237,12 @@ func BACnetPropertyValueParseWithBuffer(ctx context.Context, readBuffer utils.Re // Create the instance return &_BACnetPropertyValue{ - ObjectTypeArgument: objectTypeArgument, - PropertyIdentifier: propertyIdentifier, - PropertyArrayIndex: propertyArrayIndex, - PropertyValue: propertyValue, - Priority: priority, - }, nil + ObjectTypeArgument: objectTypeArgument, + PropertyIdentifier: propertyIdentifier, + PropertyArrayIndex: propertyArrayIndex, + PropertyValue: propertyValue, + Priority: priority, + }, nil } func (m *_BACnetPropertyValue) Serialize() ([]byte, error) { @@ -251,7 +256,7 @@ func (m *_BACnetPropertyValue) Serialize() ([]byte, error) { func (m *_BACnetPropertyValue) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetPropertyValue"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetPropertyValue"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetPropertyValue") } @@ -321,13 +326,13 @@ func (m *_BACnetPropertyValue) SerializeWithWriteBuffer(ctx context.Context, wri return nil } + //// // Arguments Getter func (m *_BACnetPropertyValue) GetObjectTypeArgument() BACnetObjectType { return m.ObjectTypeArgument } - // //// @@ -345,3 +350,6 @@ func (m *_BACnetPropertyValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyValues.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyValues.go index 8acd8314bb5..b3ffaee0d0f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyValues.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyValues.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyValues is the corresponding interface of BACnetPropertyValues type BACnetPropertyValues interface { @@ -49,15 +51,16 @@ type BACnetPropertyValuesExactly interface { // _BACnetPropertyValues is the data-structure of this message type _BACnetPropertyValues struct { - InnerOpeningTag BACnetOpeningTag - Data []BACnetPropertyValue - InnerClosingTag BACnetClosingTag + InnerOpeningTag BACnetOpeningTag + Data []BACnetPropertyValue + InnerClosingTag BACnetClosingTag // Arguments. - TagNumber uint8 + TagNumber uint8 ObjectTypeArgument BACnetObjectType } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -80,14 +83,15 @@ func (m *_BACnetPropertyValues) GetInnerClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyValues factory function for _BACnetPropertyValues -func NewBACnetPropertyValues(innerOpeningTag BACnetOpeningTag, data []BACnetPropertyValue, innerClosingTag BACnetClosingTag, tagNumber uint8, objectTypeArgument BACnetObjectType) *_BACnetPropertyValues { - return &_BACnetPropertyValues{InnerOpeningTag: innerOpeningTag, Data: data, InnerClosingTag: innerClosingTag, TagNumber: tagNumber, ObjectTypeArgument: objectTypeArgument} +func NewBACnetPropertyValues( innerOpeningTag BACnetOpeningTag , data []BACnetPropertyValue , innerClosingTag BACnetClosingTag , tagNumber uint8 , objectTypeArgument BACnetObjectType ) *_BACnetPropertyValues { +return &_BACnetPropertyValues{ InnerOpeningTag: innerOpeningTag , Data: data , InnerClosingTag: innerClosingTag , TagNumber: tagNumber , ObjectTypeArgument: objectTypeArgument } } // Deprecated: use the interface for direct cast func CastBACnetPropertyValues(structType interface{}) BACnetPropertyValues { - if casted, ok := structType.(BACnetPropertyValues); ok { + if casted, ok := structType.(BACnetPropertyValues); ok { return casted } if casted, ok := structType.(*BACnetPropertyValues); ok { @@ -119,6 +123,7 @@ func (m *_BACnetPropertyValues) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetPropertyValues) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -140,7 +145,7 @@ func BACnetPropertyValuesParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("innerOpeningTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerOpeningTag") } - _innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_innerOpeningTag, _innerOpeningTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _innerOpeningTagErr != nil { return nil, errors.Wrap(_innerOpeningTagErr, "Error parsing 'innerOpeningTag' field of BACnetPropertyValues") } @@ -156,8 +161,8 @@ func BACnetPropertyValuesParseWithBuffer(ctx context.Context, readBuffer utils.R // Terminated array var data []BACnetPropertyValue { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetPropertyValueParseWithBuffer(ctx, readBuffer, objectTypeArgument) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetPropertyValueParseWithBuffer(ctx, readBuffer , objectTypeArgument ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'data' field of BACnetPropertyValues") } @@ -172,7 +177,7 @@ func BACnetPropertyValuesParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("innerClosingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for innerClosingTag") } - _innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_innerClosingTag, _innerClosingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _innerClosingTagErr != nil { return nil, errors.Wrap(_innerClosingTagErr, "Error parsing 'innerClosingTag' field of BACnetPropertyValues") } @@ -187,12 +192,12 @@ func BACnetPropertyValuesParseWithBuffer(ctx context.Context, readBuffer utils.R // Create the instance return &_BACnetPropertyValues{ - TagNumber: tagNumber, - ObjectTypeArgument: objectTypeArgument, - InnerOpeningTag: innerOpeningTag, - Data: data, - InnerClosingTag: innerClosingTag, - }, nil + TagNumber: tagNumber, + ObjectTypeArgument: objectTypeArgument, + InnerOpeningTag: innerOpeningTag, + Data: data, + InnerClosingTag: innerClosingTag, + }, nil } func (m *_BACnetPropertyValues) Serialize() ([]byte, error) { @@ -206,7 +211,7 @@ func (m *_BACnetPropertyValues) Serialize() ([]byte, error) { func (m *_BACnetPropertyValues) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetPropertyValues"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetPropertyValues"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetPropertyValues") } @@ -257,6 +262,7 @@ func (m *_BACnetPropertyValues) SerializeWithWriteBuffer(ctx context.Context, wr return nil } + //// // Arguments Getter @@ -266,7 +272,6 @@ func (m *_BACnetPropertyValues) GetTagNumber() uint8 { func (m *_BACnetPropertyValues) GetObjectTypeArgument() BACnetObjectType { return m.ObjectTypeArgument } - // //// @@ -284,3 +289,6 @@ func (m *_BACnetPropertyValues) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyWriteDefinition.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyWriteDefinition.go index 79693958afa..99f02417352 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyWriteDefinition.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPropertyWriteDefinition.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetPropertyWriteDefinition is the corresponding interface of BACnetPropertyWriteDefinition type BACnetPropertyWriteDefinition interface { @@ -51,15 +53,16 @@ type BACnetPropertyWriteDefinitionExactly interface { // _BACnetPropertyWriteDefinition is the data-structure of this message type _BACnetPropertyWriteDefinition struct { - PropertyIdentifier BACnetPropertyIdentifierTagged - ArrayIndex BACnetContextTagUnsignedInteger - PropertyValue BACnetConstructedData - Priority BACnetContextTagUnsignedInteger + PropertyIdentifier BACnetPropertyIdentifierTagged + ArrayIndex BACnetContextTagUnsignedInteger + PropertyValue BACnetConstructedData + Priority BACnetContextTagUnsignedInteger // Arguments. ObjectTypeArgument BACnetObjectType } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -86,14 +89,15 @@ func (m *_BACnetPropertyWriteDefinition) GetPriority() BACnetContextTagUnsignedI /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetPropertyWriteDefinition factory function for _BACnetPropertyWriteDefinition -func NewBACnetPropertyWriteDefinition(propertyIdentifier BACnetPropertyIdentifierTagged, arrayIndex BACnetContextTagUnsignedInteger, propertyValue BACnetConstructedData, priority BACnetContextTagUnsignedInteger, objectTypeArgument BACnetObjectType) *_BACnetPropertyWriteDefinition { - return &_BACnetPropertyWriteDefinition{PropertyIdentifier: propertyIdentifier, ArrayIndex: arrayIndex, PropertyValue: propertyValue, Priority: priority, ObjectTypeArgument: objectTypeArgument} +func NewBACnetPropertyWriteDefinition( propertyIdentifier BACnetPropertyIdentifierTagged , arrayIndex BACnetContextTagUnsignedInteger , propertyValue BACnetConstructedData , priority BACnetContextTagUnsignedInteger , objectTypeArgument BACnetObjectType ) *_BACnetPropertyWriteDefinition { +return &_BACnetPropertyWriteDefinition{ PropertyIdentifier: propertyIdentifier , ArrayIndex: arrayIndex , PropertyValue: propertyValue , Priority: priority , ObjectTypeArgument: objectTypeArgument } } // Deprecated: use the interface for direct cast func CastBACnetPropertyWriteDefinition(structType interface{}) BACnetPropertyWriteDefinition { - if casted, ok := structType.(BACnetPropertyWriteDefinition); ok { + if casted, ok := structType.(BACnetPropertyWriteDefinition); ok { return casted } if casted, ok := structType.(*BACnetPropertyWriteDefinition); ok { @@ -130,6 +134,7 @@ func (m *_BACnetPropertyWriteDefinition) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetPropertyWriteDefinition) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,7 +156,7 @@ func BACnetPropertyWriteDefinitionParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("propertyIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for propertyIdentifier") } - _propertyIdentifier, _propertyIdentifierErr := BACnetPropertyIdentifierTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_propertyIdentifier, _propertyIdentifierErr := BACnetPropertyIdentifierTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _propertyIdentifierErr != nil { return nil, errors.Wrap(_propertyIdentifierErr, "Error parsing 'propertyIdentifier' field of BACnetPropertyWriteDefinition") } @@ -162,12 +167,12 @@ func BACnetPropertyWriteDefinitionParseWithBuffer(ctx context.Context, readBuffe // Optional Field (arrayIndex) (Can be skipped, if a given expression evaluates to false) var arrayIndex BACnetContextTagUnsignedInteger = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("arrayIndex"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for arrayIndex") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(1), BACnetDataType_UNSIGNED_INTEGER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(1) , BACnetDataType_UNSIGNED_INTEGER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -184,12 +189,12 @@ func BACnetPropertyWriteDefinitionParseWithBuffer(ctx context.Context, readBuffe // Optional Field (propertyValue) (Can be skipped, if a given expression evaluates to false) var propertyValue BACnetConstructedData = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("propertyValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for propertyValue") } - _val, _err := BACnetConstructedDataParseWithBuffer(ctx, readBuffer, uint8(2), objectTypeArgument, propertyIdentifier.GetValue(), (CastBACnetTagPayloadUnsignedInteger(utils.InlineIf(bool((arrayIndex) != (nil)), func() interface{} { return CastBACnetTagPayloadUnsignedInteger((arrayIndex).GetPayload()) }, func() interface{} { return CastBACnetTagPayloadUnsignedInteger(nil) })))) +_val, _err := BACnetConstructedDataParseWithBuffer(ctx, readBuffer , uint8(2) , objectTypeArgument , propertyIdentifier.GetValue() , (CastBACnetTagPayloadUnsignedInteger(utils.InlineIf(bool(((arrayIndex)) != (nil)), func() interface{} {return CastBACnetTagPayloadUnsignedInteger((arrayIndex).GetPayload())}, func() interface{} {return CastBACnetTagPayloadUnsignedInteger(nil)}))) ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -206,12 +211,12 @@ func BACnetPropertyWriteDefinitionParseWithBuffer(ctx context.Context, readBuffe // Optional Field (priority) (Can be skipped, if a given expression evaluates to false) var priority BACnetContextTagUnsignedInteger = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("priority"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for priority") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(3), BACnetDataType_UNSIGNED_INTEGER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(3) , BACnetDataType_UNSIGNED_INTEGER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -232,12 +237,12 @@ func BACnetPropertyWriteDefinitionParseWithBuffer(ctx context.Context, readBuffe // Create the instance return &_BACnetPropertyWriteDefinition{ - ObjectTypeArgument: objectTypeArgument, - PropertyIdentifier: propertyIdentifier, - ArrayIndex: arrayIndex, - PropertyValue: propertyValue, - Priority: priority, - }, nil + ObjectTypeArgument: objectTypeArgument, + PropertyIdentifier: propertyIdentifier, + ArrayIndex: arrayIndex, + PropertyValue: propertyValue, + Priority: priority, + }, nil } func (m *_BACnetPropertyWriteDefinition) Serialize() ([]byte, error) { @@ -251,7 +256,7 @@ func (m *_BACnetPropertyWriteDefinition) Serialize() ([]byte, error) { func (m *_BACnetPropertyWriteDefinition) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetPropertyWriteDefinition"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetPropertyWriteDefinition"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetPropertyWriteDefinition") } @@ -321,13 +326,13 @@ func (m *_BACnetPropertyWriteDefinition) SerializeWithWriteBuffer(ctx context.Co return nil } + //// // Arguments Getter func (m *_BACnetPropertyWriteDefinition) GetObjectTypeArgument() BACnetObjectType { return m.ObjectTypeArgument } - // //// @@ -345,3 +350,6 @@ func (m *_BACnetPropertyWriteDefinition) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetProtocolLevel.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetProtocolLevel.go index d398d24fcd7..d63c646aa82 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetProtocolLevel.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetProtocolLevel.go @@ -34,10 +34,10 @@ type IBACnetProtocolLevel interface { utils.Serializable } -const ( - BACnetProtocolLevel_PHYSICAL BACnetProtocolLevel = 0 - BACnetProtocolLevel_PROTOCOL BACnetProtocolLevel = 1 - BACnetProtocolLevel_BACNET_APPLICATION BACnetProtocolLevel = 2 +const( + BACnetProtocolLevel_PHYSICAL BACnetProtocolLevel = 0 + BACnetProtocolLevel_PROTOCOL BACnetProtocolLevel = 1 + BACnetProtocolLevel_BACNET_APPLICATION BACnetProtocolLevel = 2 BACnetProtocolLevel_NON_BACNET_APPLICATION BACnetProtocolLevel = 3 ) @@ -45,7 +45,7 @@ var BACnetProtocolLevelValues []BACnetProtocolLevel func init() { _ = errors.New - BACnetProtocolLevelValues = []BACnetProtocolLevel{ + BACnetProtocolLevelValues = []BACnetProtocolLevel { BACnetProtocolLevel_PHYSICAL, BACnetProtocolLevel_PROTOCOL, BACnetProtocolLevel_BACNET_APPLICATION, @@ -55,14 +55,14 @@ func init() { func BACnetProtocolLevelByValue(value uint8) (enum BACnetProtocolLevel, ok bool) { switch value { - case 0: - return BACnetProtocolLevel_PHYSICAL, true - case 1: - return BACnetProtocolLevel_PROTOCOL, true - case 2: - return BACnetProtocolLevel_BACNET_APPLICATION, true - case 3: - return BACnetProtocolLevel_NON_BACNET_APPLICATION, true + case 0: + return BACnetProtocolLevel_PHYSICAL, true + case 1: + return BACnetProtocolLevel_PROTOCOL, true + case 2: + return BACnetProtocolLevel_BACNET_APPLICATION, true + case 3: + return BACnetProtocolLevel_NON_BACNET_APPLICATION, true } return 0, false } @@ -81,13 +81,13 @@ func BACnetProtocolLevelByName(value string) (enum BACnetProtocolLevel, ok bool) return 0, false } -func BACnetProtocolLevelKnows(value uint8) bool { +func BACnetProtocolLevelKnows(value uint8) bool { for _, typeValue := range BACnetProtocolLevelValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetProtocolLevel(structType interface{}) BACnetProtocolLevel { @@ -155,3 +155,4 @@ func (e BACnetProtocolLevel) PLC4XEnumName() string { func (e BACnetProtocolLevel) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetProtocolLevelTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetProtocolLevelTagged.go index 60bff6f92f6..71ecfbf3608 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetProtocolLevelTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetProtocolLevelTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetProtocolLevelTagged is the corresponding interface of BACnetProtocolLevelTagged type BACnetProtocolLevelTagged interface { @@ -46,14 +48,15 @@ type BACnetProtocolLevelTaggedExactly interface { // _BACnetProtocolLevelTagged is the data-structure of this message type _BACnetProtocolLevelTagged struct { - Header BACnetTagHeader - Value BACnetProtocolLevel + Header BACnetTagHeader + Value BACnetProtocolLevel // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_BACnetProtocolLevelTagged) GetValue() BACnetProtocolLevel { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetProtocolLevelTagged factory function for _BACnetProtocolLevelTagged -func NewBACnetProtocolLevelTagged(header BACnetTagHeader, value BACnetProtocolLevel, tagNumber uint8, tagClass TagClass) *_BACnetProtocolLevelTagged { - return &_BACnetProtocolLevelTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetProtocolLevelTagged( header BACnetTagHeader , value BACnetProtocolLevel , tagNumber uint8 , tagClass TagClass ) *_BACnetProtocolLevelTagged { +return &_BACnetProtocolLevelTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetProtocolLevelTagged(structType interface{}) BACnetProtocolLevelTagged { - if casted, ok := structType.(BACnetProtocolLevelTagged); ok { + if casted, ok := structType.(BACnetProtocolLevelTagged); ok { return casted } if casted, ok := structType.(*BACnetProtocolLevelTagged); ok { @@ -104,6 +108,7 @@ func (m *_BACnetProtocolLevelTagged) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_BACnetProtocolLevelTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func BACnetProtocolLevelTaggedParseWithBuffer(ctx context.Context, readBuffer ut if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetProtocolLevelTagged") } @@ -135,12 +140,12 @@ func BACnetProtocolLevelTaggedParseWithBuffer(ctx context.Context, readBuffer ut } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func BACnetProtocolLevelTaggedParseWithBuffer(ctx context.Context, readBuffer ut } var value BACnetProtocolLevel if _value != nil { - value = _value.(BACnetProtocolLevel) + value = _value.(BACnetProtocolLevel) } if closeErr := readBuffer.CloseContext("BACnetProtocolLevelTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func BACnetProtocolLevelTaggedParseWithBuffer(ctx context.Context, readBuffer ut // Create the instance return &_BACnetProtocolLevelTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_BACnetProtocolLevelTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_BACnetProtocolLevelTagged) Serialize() ([]byte, error) { func (m *_BACnetProtocolLevelTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetProtocolLevelTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetProtocolLevelTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetProtocolLevelTagged") } @@ -206,6 +211,7 @@ func (m *_BACnetProtocolLevelTagged) SerializeWithWriteBuffer(ctx context.Contex return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_BACnetProtocolLevelTagged) GetTagNumber() uint8 { func (m *_BACnetProtocolLevelTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_BACnetProtocolLevelTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetReadAccessProperty.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetReadAccessProperty.go index 71c65a6c7b3..cee382ed6a9 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetReadAccessProperty.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetReadAccessProperty.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetReadAccessProperty is the corresponding interface of BACnetReadAccessProperty type BACnetReadAccessProperty interface { @@ -49,14 +51,15 @@ type BACnetReadAccessPropertyExactly interface { // _BACnetReadAccessProperty is the data-structure of this message type _BACnetReadAccessProperty struct { - PropertyIdentifier BACnetPropertyIdentifierTagged - ArrayIndex BACnetContextTagUnsignedInteger - ReadResult BACnetReadAccessPropertyReadResult + PropertyIdentifier BACnetPropertyIdentifierTagged + ArrayIndex BACnetContextTagUnsignedInteger + ReadResult BACnetReadAccessPropertyReadResult // Arguments. ObjectTypeArgument BACnetObjectType } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -79,14 +82,15 @@ func (m *_BACnetReadAccessProperty) GetReadResult() BACnetReadAccessPropertyRead /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetReadAccessProperty factory function for _BACnetReadAccessProperty -func NewBACnetReadAccessProperty(propertyIdentifier BACnetPropertyIdentifierTagged, arrayIndex BACnetContextTagUnsignedInteger, readResult BACnetReadAccessPropertyReadResult, objectTypeArgument BACnetObjectType) *_BACnetReadAccessProperty { - return &_BACnetReadAccessProperty{PropertyIdentifier: propertyIdentifier, ArrayIndex: arrayIndex, ReadResult: readResult, ObjectTypeArgument: objectTypeArgument} +func NewBACnetReadAccessProperty( propertyIdentifier BACnetPropertyIdentifierTagged , arrayIndex BACnetContextTagUnsignedInteger , readResult BACnetReadAccessPropertyReadResult , objectTypeArgument BACnetObjectType ) *_BACnetReadAccessProperty { +return &_BACnetReadAccessProperty{ PropertyIdentifier: propertyIdentifier , ArrayIndex: arrayIndex , ReadResult: readResult , ObjectTypeArgument: objectTypeArgument } } // Deprecated: use the interface for direct cast func CastBACnetReadAccessProperty(structType interface{}) BACnetReadAccessProperty { - if casted, ok := structType.(BACnetReadAccessProperty); ok { + if casted, ok := structType.(BACnetReadAccessProperty); ok { return casted } if casted, ok := structType.(*BACnetReadAccessProperty); ok { @@ -118,6 +122,7 @@ func (m *_BACnetReadAccessProperty) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_BACnetReadAccessProperty) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +144,7 @@ func BACnetReadAccessPropertyParseWithBuffer(ctx context.Context, readBuffer uti if pullErr := readBuffer.PullContext("propertyIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for propertyIdentifier") } - _propertyIdentifier, _propertyIdentifierErr := BACnetPropertyIdentifierTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_propertyIdentifier, _propertyIdentifierErr := BACnetPropertyIdentifierTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _propertyIdentifierErr != nil { return nil, errors.Wrap(_propertyIdentifierErr, "Error parsing 'propertyIdentifier' field of BACnetReadAccessProperty") } @@ -150,12 +155,12 @@ func BACnetReadAccessPropertyParseWithBuffer(ctx context.Context, readBuffer uti // Optional Field (arrayIndex) (Can be skipped, if a given expression evaluates to false) var arrayIndex BACnetContextTagUnsignedInteger = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("arrayIndex"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for arrayIndex") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(3), BACnetDataType_UNSIGNED_INTEGER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(3) , BACnetDataType_UNSIGNED_INTEGER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -172,12 +177,12 @@ func BACnetReadAccessPropertyParseWithBuffer(ctx context.Context, readBuffer uti // Optional Field (readResult) (Can be skipped, if a given expression evaluates to false) var readResult BACnetReadAccessPropertyReadResult = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("readResult"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for readResult") } - _val, _err := BACnetReadAccessPropertyReadResultParseWithBuffer(ctx, readBuffer, objectTypeArgument, propertyIdentifier.GetValue(), (CastBACnetTagPayloadUnsignedInteger(utils.InlineIf(bool((arrayIndex) != (nil)), func() interface{} { return CastBACnetTagPayloadUnsignedInteger((arrayIndex).GetPayload()) }, func() interface{} { return CastBACnetTagPayloadUnsignedInteger(nil) })))) +_val, _err := BACnetReadAccessPropertyReadResultParseWithBuffer(ctx, readBuffer , objectTypeArgument , propertyIdentifier.GetValue() , (CastBACnetTagPayloadUnsignedInteger(utils.InlineIf(bool(((arrayIndex)) != (nil)), func() interface{} {return CastBACnetTagPayloadUnsignedInteger((arrayIndex).GetPayload())}, func() interface{} {return CastBACnetTagPayloadUnsignedInteger(nil)}))) ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -198,11 +203,11 @@ func BACnetReadAccessPropertyParseWithBuffer(ctx context.Context, readBuffer uti // Create the instance return &_BACnetReadAccessProperty{ - ObjectTypeArgument: objectTypeArgument, - PropertyIdentifier: propertyIdentifier, - ArrayIndex: arrayIndex, - ReadResult: readResult, - }, nil + ObjectTypeArgument: objectTypeArgument, + PropertyIdentifier: propertyIdentifier, + ArrayIndex: arrayIndex, + ReadResult: readResult, + }, nil } func (m *_BACnetReadAccessProperty) Serialize() ([]byte, error) { @@ -216,7 +221,7 @@ func (m *_BACnetReadAccessProperty) Serialize() ([]byte, error) { func (m *_BACnetReadAccessProperty) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetReadAccessProperty"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetReadAccessProperty"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetReadAccessProperty") } @@ -270,13 +275,13 @@ func (m *_BACnetReadAccessProperty) SerializeWithWriteBuffer(ctx context.Context return nil } + //// // Arguments Getter func (m *_BACnetReadAccessProperty) GetObjectTypeArgument() BACnetObjectType { return m.ObjectTypeArgument } - // //// @@ -294,3 +299,6 @@ func (m *_BACnetReadAccessProperty) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetReadAccessPropertyReadResult.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetReadAccessPropertyReadResult.go index fde0df9d155..601d19d4914 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetReadAccessPropertyReadResult.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetReadAccessPropertyReadResult.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetReadAccessPropertyReadResult is the corresponding interface of BACnetReadAccessPropertyReadResult type BACnetReadAccessPropertyReadResult interface { @@ -51,16 +53,17 @@ type BACnetReadAccessPropertyReadResultExactly interface { // _BACnetReadAccessPropertyReadResult is the data-structure of this message type _BACnetReadAccessPropertyReadResult struct { - PeekedTagHeader BACnetTagHeader - PropertyValue BACnetConstructedData - PropertyAccessError ErrorEnclosed + PeekedTagHeader BACnetTagHeader + PropertyValue BACnetConstructedData + PropertyAccessError ErrorEnclosed // Arguments. - ObjectTypeArgument BACnetObjectType + ObjectTypeArgument BACnetObjectType PropertyIdentifierArgument BACnetPropertyIdentifier - ArrayIndexArgument BACnetTagPayloadUnsignedInteger + ArrayIndexArgument BACnetTagPayloadUnsignedInteger } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -102,14 +105,15 @@ func (m *_BACnetReadAccessPropertyReadResult) GetPeekedTagNumber() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetReadAccessPropertyReadResult factory function for _BACnetReadAccessPropertyReadResult -func NewBACnetReadAccessPropertyReadResult(peekedTagHeader BACnetTagHeader, propertyValue BACnetConstructedData, propertyAccessError ErrorEnclosed, objectTypeArgument BACnetObjectType, propertyIdentifierArgument BACnetPropertyIdentifier, arrayIndexArgument BACnetTagPayloadUnsignedInteger) *_BACnetReadAccessPropertyReadResult { - return &_BACnetReadAccessPropertyReadResult{PeekedTagHeader: peekedTagHeader, PropertyValue: propertyValue, PropertyAccessError: propertyAccessError, ObjectTypeArgument: objectTypeArgument, PropertyIdentifierArgument: propertyIdentifierArgument, ArrayIndexArgument: arrayIndexArgument} +func NewBACnetReadAccessPropertyReadResult( peekedTagHeader BACnetTagHeader , propertyValue BACnetConstructedData , propertyAccessError ErrorEnclosed , objectTypeArgument BACnetObjectType , propertyIdentifierArgument BACnetPropertyIdentifier , arrayIndexArgument BACnetTagPayloadUnsignedInteger ) *_BACnetReadAccessPropertyReadResult { +return &_BACnetReadAccessPropertyReadResult{ PeekedTagHeader: peekedTagHeader , PropertyValue: propertyValue , PropertyAccessError: propertyAccessError , ObjectTypeArgument: objectTypeArgument , PropertyIdentifierArgument: propertyIdentifierArgument , ArrayIndexArgument: arrayIndexArgument } } // Deprecated: use the interface for direct cast func CastBACnetReadAccessPropertyReadResult(structType interface{}) BACnetReadAccessPropertyReadResult { - if casted, ok := structType.(BACnetReadAccessPropertyReadResult); ok { + if casted, ok := structType.(BACnetReadAccessPropertyReadResult); ok { return casted } if casted, ok := structType.(*BACnetReadAccessPropertyReadResult); ok { @@ -140,6 +144,7 @@ func (m *_BACnetReadAccessPropertyReadResult) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetReadAccessPropertyReadResult) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -157,13 +162,13 @@ func BACnetReadAccessPropertyReadResultParseWithBuffer(ctx context.Context, read currentPos := positionAware.GetPos() _ = currentPos - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Virtual field _peekedTagNumber := peekedTagHeader.GetActualTagNumber() @@ -172,12 +177,12 @@ func BACnetReadAccessPropertyReadResultParseWithBuffer(ctx context.Context, read // Optional Field (propertyValue) (Can be skipped, if a given expression evaluates to false) var propertyValue BACnetConstructedData = nil - if bool((peekedTagNumber) == (4)) { + if bool((peekedTagNumber) == ((4))) { currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("propertyValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for propertyValue") } - _val, _err := BACnetConstructedDataParseWithBuffer(ctx, readBuffer, uint8(4), objectTypeArgument, propertyIdentifierArgument, arrayIndexArgument) +_val, _err := BACnetConstructedDataParseWithBuffer(ctx, readBuffer , uint8(4) , objectTypeArgument , propertyIdentifierArgument , arrayIndexArgument ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -193,18 +198,18 @@ func BACnetReadAccessPropertyReadResultParseWithBuffer(ctx context.Context, read } // Validation - if !(bool((bool(bool((peekedTagNumber) == (4))) && bool(bool((propertyValue) != (nil))))) || bool(bool((peekedTagNumber) != (4)))) { + if (!(bool((bool(bool((peekedTagNumber) == ((4)))) && bool(bool(((propertyValue)) != (nil))))) || bool(bool((peekedTagNumber) != ((4)))))) { return nil, errors.WithStack(utils.ParseValidationError{"failure parsing field 4"}) } // Optional Field (propertyAccessError) (Can be skipped, if a given expression evaluates to false) var propertyAccessError ErrorEnclosed = nil - if bool((peekedTagNumber) == (5)) { + if bool((peekedTagNumber) == ((5))) { currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("propertyAccessError"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for propertyAccessError") } - _val, _err := ErrorEnclosedParseWithBuffer(ctx, readBuffer, uint8(5)) +_val, _err := ErrorEnclosedParseWithBuffer(ctx, readBuffer , uint8(5) ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -220,12 +225,12 @@ func BACnetReadAccessPropertyReadResultParseWithBuffer(ctx context.Context, read } // Validation - if !(bool((bool(bool((peekedTagNumber) == (5))) && bool(bool((propertyAccessError) != (nil))))) || bool(bool((peekedTagNumber) != (5)))) { + if (!(bool((bool(bool((peekedTagNumber) == ((5)))) && bool(bool(((propertyAccessError)) != (nil))))) || bool(bool((peekedTagNumber) != ((5)))))) { return nil, errors.WithStack(utils.ParseValidationError{"failure parsing field 5"}) } // Validation - if !(bool(bool((peekedTagNumber) == (4))) || bool(bool((peekedTagNumber) == (5)))) { + if (!(bool(bool((peekedTagNumber) == ((4)))) || bool(bool((peekedTagNumber) == ((5)))))) { return nil, errors.WithStack(utils.ParseAssertError{"should be either 4 or 5"}) } @@ -235,13 +240,13 @@ func BACnetReadAccessPropertyReadResultParseWithBuffer(ctx context.Context, read // Create the instance return &_BACnetReadAccessPropertyReadResult{ - ObjectTypeArgument: objectTypeArgument, - PropertyIdentifierArgument: propertyIdentifierArgument, - ArrayIndexArgument: arrayIndexArgument, - PeekedTagHeader: peekedTagHeader, - PropertyValue: propertyValue, - PropertyAccessError: propertyAccessError, - }, nil + ObjectTypeArgument: objectTypeArgument, + PropertyIdentifierArgument: propertyIdentifierArgument, + ArrayIndexArgument: arrayIndexArgument, + PeekedTagHeader: peekedTagHeader, + PropertyValue: propertyValue, + PropertyAccessError: propertyAccessError, + }, nil } func (m *_BACnetReadAccessPropertyReadResult) Serialize() ([]byte, error) { @@ -255,7 +260,7 @@ func (m *_BACnetReadAccessPropertyReadResult) Serialize() ([]byte, error) { func (m *_BACnetReadAccessPropertyReadResult) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetReadAccessPropertyReadResult"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetReadAccessPropertyReadResult"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetReadAccessPropertyReadResult") } // Virtual field @@ -301,6 +306,7 @@ func (m *_BACnetReadAccessPropertyReadResult) SerializeWithWriteBuffer(ctx conte return nil } + //// // Arguments Getter @@ -313,7 +319,6 @@ func (m *_BACnetReadAccessPropertyReadResult) GetPropertyIdentifierArgument() BA func (m *_BACnetReadAccessPropertyReadResult) GetArrayIndexArgument() BACnetTagPayloadUnsignedInteger { return m.ArrayIndexArgument } - // //// @@ -331,3 +336,6 @@ func (m *_BACnetReadAccessPropertyReadResult) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetReadAccessResult.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetReadAccessResult.go index b5b20fbc938..5a8a0668ca1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetReadAccessResult.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetReadAccessResult.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetReadAccessResult is the corresponding interface of BACnetReadAccessResult type BACnetReadAccessResult interface { @@ -47,10 +49,11 @@ type BACnetReadAccessResultExactly interface { // _BACnetReadAccessResult is the data-structure of this message type _BACnetReadAccessResult struct { - ObjectIdentifier BACnetContextTagObjectIdentifier - ListOfResults BACnetReadAccessResultListOfResults + ObjectIdentifier BACnetContextTagObjectIdentifier + ListOfResults BACnetReadAccessResultListOfResults } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -69,14 +72,15 @@ func (m *_BACnetReadAccessResult) GetListOfResults() BACnetReadAccessResultListO /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetReadAccessResult factory function for _BACnetReadAccessResult -func NewBACnetReadAccessResult(objectIdentifier BACnetContextTagObjectIdentifier, listOfResults BACnetReadAccessResultListOfResults) *_BACnetReadAccessResult { - return &_BACnetReadAccessResult{ObjectIdentifier: objectIdentifier, ListOfResults: listOfResults} +func NewBACnetReadAccessResult( objectIdentifier BACnetContextTagObjectIdentifier , listOfResults BACnetReadAccessResultListOfResults ) *_BACnetReadAccessResult { +return &_BACnetReadAccessResult{ ObjectIdentifier: objectIdentifier , ListOfResults: listOfResults } } // Deprecated: use the interface for direct cast func CastBACnetReadAccessResult(structType interface{}) BACnetReadAccessResult { - if casted, ok := structType.(BACnetReadAccessResult); ok { + if casted, ok := structType.(BACnetReadAccessResult); ok { return casted } if casted, ok := structType.(*BACnetReadAccessResult); ok { @@ -103,6 +107,7 @@ func (m *_BACnetReadAccessResult) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetReadAccessResult) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -124,7 +129,7 @@ func BACnetReadAccessResultParseWithBuffer(ctx context.Context, readBuffer utils if pullErr := readBuffer.PullContext("objectIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for objectIdentifier") } - _objectIdentifier, _objectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER)) +_objectIdentifier, _objectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_BACNET_OBJECT_IDENTIFIER ) ) if _objectIdentifierErr != nil { return nil, errors.Wrap(_objectIdentifierErr, "Error parsing 'objectIdentifier' field of BACnetReadAccessResult") } @@ -135,12 +140,12 @@ func BACnetReadAccessResultParseWithBuffer(ctx context.Context, readBuffer utils // Optional Field (listOfResults) (Can be skipped, if a given expression evaluates to false) var listOfResults BACnetReadAccessResultListOfResults = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("listOfResults"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for listOfResults") } - _val, _err := BACnetReadAccessResultListOfResultsParseWithBuffer(ctx, readBuffer, uint8(1), objectIdentifier.GetObjectType()) +_val, _err := BACnetReadAccessResultListOfResultsParseWithBuffer(ctx, readBuffer , uint8(1) , objectIdentifier.GetObjectType() ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -161,9 +166,9 @@ func BACnetReadAccessResultParseWithBuffer(ctx context.Context, readBuffer utils // Create the instance return &_BACnetReadAccessResult{ - ObjectIdentifier: objectIdentifier, - ListOfResults: listOfResults, - }, nil + ObjectIdentifier: objectIdentifier, + ListOfResults: listOfResults, + }, nil } func (m *_BACnetReadAccessResult) Serialize() ([]byte, error) { @@ -177,7 +182,7 @@ func (m *_BACnetReadAccessResult) Serialize() ([]byte, error) { func (m *_BACnetReadAccessResult) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetReadAccessResult"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetReadAccessResult"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetReadAccessResult") } @@ -215,6 +220,7 @@ func (m *_BACnetReadAccessResult) SerializeWithWriteBuffer(ctx context.Context, return nil } + func (m *_BACnetReadAccessResult) isBACnetReadAccessResult() bool { return true } @@ -229,3 +235,6 @@ func (m *_BACnetReadAccessResult) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetReadAccessResultListOfResults.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetReadAccessResultListOfResults.go index e75f1d0613f..f4196c7b5cb 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetReadAccessResultListOfResults.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetReadAccessResultListOfResults.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetReadAccessResultListOfResults is the corresponding interface of BACnetReadAccessResultListOfResults type BACnetReadAccessResultListOfResults interface { @@ -49,15 +51,16 @@ type BACnetReadAccessResultListOfResultsExactly interface { // _BACnetReadAccessResultListOfResults is the data-structure of this message type _BACnetReadAccessResultListOfResults struct { - OpeningTag BACnetOpeningTag - ListOfReadAccessProperty []BACnetReadAccessProperty - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + ListOfReadAccessProperty []BACnetReadAccessProperty + ClosingTag BACnetClosingTag // Arguments. - TagNumber uint8 + TagNumber uint8 ObjectTypeArgument BACnetObjectType } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -80,14 +83,15 @@ func (m *_BACnetReadAccessResultListOfResults) GetClosingTag() BACnetClosingTag /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetReadAccessResultListOfResults factory function for _BACnetReadAccessResultListOfResults -func NewBACnetReadAccessResultListOfResults(openingTag BACnetOpeningTag, listOfReadAccessProperty []BACnetReadAccessProperty, closingTag BACnetClosingTag, tagNumber uint8, objectTypeArgument BACnetObjectType) *_BACnetReadAccessResultListOfResults { - return &_BACnetReadAccessResultListOfResults{OpeningTag: openingTag, ListOfReadAccessProperty: listOfReadAccessProperty, ClosingTag: closingTag, TagNumber: tagNumber, ObjectTypeArgument: objectTypeArgument} +func NewBACnetReadAccessResultListOfResults( openingTag BACnetOpeningTag , listOfReadAccessProperty []BACnetReadAccessProperty , closingTag BACnetClosingTag , tagNumber uint8 , objectTypeArgument BACnetObjectType ) *_BACnetReadAccessResultListOfResults { +return &_BACnetReadAccessResultListOfResults{ OpeningTag: openingTag , ListOfReadAccessProperty: listOfReadAccessProperty , ClosingTag: closingTag , TagNumber: tagNumber , ObjectTypeArgument: objectTypeArgument } } // Deprecated: use the interface for direct cast func CastBACnetReadAccessResultListOfResults(structType interface{}) BACnetReadAccessResultListOfResults { - if casted, ok := structType.(BACnetReadAccessResultListOfResults); ok { + if casted, ok := structType.(BACnetReadAccessResultListOfResults); ok { return casted } if casted, ok := structType.(*BACnetReadAccessResultListOfResults); ok { @@ -119,6 +123,7 @@ func (m *_BACnetReadAccessResultListOfResults) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetReadAccessResultListOfResults) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -140,7 +145,7 @@ func BACnetReadAccessResultListOfResultsParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetReadAccessResultListOfResults") } @@ -156,8 +161,8 @@ func BACnetReadAccessResultListOfResultsParseWithBuffer(ctx context.Context, rea // Terminated array var listOfReadAccessProperty []BACnetReadAccessProperty { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetReadAccessPropertyParseWithBuffer(ctx, readBuffer, objectTypeArgument) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetReadAccessPropertyParseWithBuffer(ctx, readBuffer , objectTypeArgument ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'listOfReadAccessProperty' field of BACnetReadAccessResultListOfResults") } @@ -172,7 +177,7 @@ func BACnetReadAccessResultListOfResultsParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetReadAccessResultListOfResults") } @@ -187,12 +192,12 @@ func BACnetReadAccessResultListOfResultsParseWithBuffer(ctx context.Context, rea // Create the instance return &_BACnetReadAccessResultListOfResults{ - TagNumber: tagNumber, - ObjectTypeArgument: objectTypeArgument, - OpeningTag: openingTag, - ListOfReadAccessProperty: listOfReadAccessProperty, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + ObjectTypeArgument: objectTypeArgument, + OpeningTag: openingTag, + ListOfReadAccessProperty: listOfReadAccessProperty, + ClosingTag: closingTag, + }, nil } func (m *_BACnetReadAccessResultListOfResults) Serialize() ([]byte, error) { @@ -206,7 +211,7 @@ func (m *_BACnetReadAccessResultListOfResults) Serialize() ([]byte, error) { func (m *_BACnetReadAccessResultListOfResults) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetReadAccessResultListOfResults"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetReadAccessResultListOfResults"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetReadAccessResultListOfResults") } @@ -257,6 +262,7 @@ func (m *_BACnetReadAccessResultListOfResults) SerializeWithWriteBuffer(ctx cont return nil } + //// // Arguments Getter @@ -266,7 +272,6 @@ func (m *_BACnetReadAccessResultListOfResults) GetTagNumber() uint8 { func (m *_BACnetReadAccessResultListOfResults) GetObjectTypeArgument() BACnetObjectType { return m.ObjectTypeArgument } - // //// @@ -284,3 +289,6 @@ func (m *_BACnetReadAccessResultListOfResults) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetReadAccessSpecification.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetReadAccessSpecification.go index d72da4e0db4..a85f36b82c8 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetReadAccessSpecification.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetReadAccessSpecification.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetReadAccessSpecification is the corresponding interface of BACnetReadAccessSpecification type BACnetReadAccessSpecification interface { @@ -51,12 +53,13 @@ type BACnetReadAccessSpecificationExactly interface { // _BACnetReadAccessSpecification is the data-structure of this message type _BACnetReadAccessSpecification struct { - ObjectIdentifier BACnetContextTagObjectIdentifier - OpeningTag BACnetOpeningTag - ListOfPropertyReferences []BACnetPropertyReference - ClosingTag BACnetClosingTag + ObjectIdentifier BACnetContextTagObjectIdentifier + OpeningTag BACnetOpeningTag + ListOfPropertyReferences []BACnetPropertyReference + ClosingTag BACnetClosingTag } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,14 +86,15 @@ func (m *_BACnetReadAccessSpecification) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetReadAccessSpecification factory function for _BACnetReadAccessSpecification -func NewBACnetReadAccessSpecification(objectIdentifier BACnetContextTagObjectIdentifier, openingTag BACnetOpeningTag, listOfPropertyReferences []BACnetPropertyReference, closingTag BACnetClosingTag) *_BACnetReadAccessSpecification { - return &_BACnetReadAccessSpecification{ObjectIdentifier: objectIdentifier, OpeningTag: openingTag, ListOfPropertyReferences: listOfPropertyReferences, ClosingTag: closingTag} +func NewBACnetReadAccessSpecification( objectIdentifier BACnetContextTagObjectIdentifier , openingTag BACnetOpeningTag , listOfPropertyReferences []BACnetPropertyReference , closingTag BACnetClosingTag ) *_BACnetReadAccessSpecification { +return &_BACnetReadAccessSpecification{ ObjectIdentifier: objectIdentifier , OpeningTag: openingTag , ListOfPropertyReferences: listOfPropertyReferences , ClosingTag: closingTag } } // Deprecated: use the interface for direct cast func CastBACnetReadAccessSpecification(structType interface{}) BACnetReadAccessSpecification { - if casted, ok := structType.(BACnetReadAccessSpecification); ok { + if casted, ok := structType.(BACnetReadAccessSpecification); ok { return casted } if casted, ok := structType.(*BACnetReadAccessSpecification); ok { @@ -125,6 +129,7 @@ func (m *_BACnetReadAccessSpecification) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetReadAccessSpecification) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -146,7 +151,7 @@ func BACnetReadAccessSpecificationParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("objectIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for objectIdentifier") } - _objectIdentifier, _objectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER)) +_objectIdentifier, _objectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_BACNET_OBJECT_IDENTIFIER ) ) if _objectIdentifierErr != nil { return nil, errors.Wrap(_objectIdentifierErr, "Error parsing 'objectIdentifier' field of BACnetReadAccessSpecification") } @@ -159,7 +164,7 @@ func BACnetReadAccessSpecificationParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1))) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetReadAccessSpecification") } @@ -175,8 +180,8 @@ func BACnetReadAccessSpecificationParseWithBuffer(ctx context.Context, readBuffe // Terminated array var listOfPropertyReferences []BACnetPropertyReference { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, 1)) { - _item, _err := BACnetPropertyReferenceParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, 1)); { +_item, _err := BACnetPropertyReferenceParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'listOfPropertyReferences' field of BACnetReadAccessSpecification") } @@ -191,7 +196,7 @@ func BACnetReadAccessSpecificationParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1))) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetReadAccessSpecification") } @@ -206,11 +211,11 @@ func BACnetReadAccessSpecificationParseWithBuffer(ctx context.Context, readBuffe // Create the instance return &_BACnetReadAccessSpecification{ - ObjectIdentifier: objectIdentifier, - OpeningTag: openingTag, - ListOfPropertyReferences: listOfPropertyReferences, - ClosingTag: closingTag, - }, nil + ObjectIdentifier: objectIdentifier, + OpeningTag: openingTag, + ListOfPropertyReferences: listOfPropertyReferences, + ClosingTag: closingTag, + }, nil } func (m *_BACnetReadAccessSpecification) Serialize() ([]byte, error) { @@ -224,7 +229,7 @@ func (m *_BACnetReadAccessSpecification) Serialize() ([]byte, error) { func (m *_BACnetReadAccessSpecification) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetReadAccessSpecification"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetReadAccessSpecification"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetReadAccessSpecification") } @@ -287,6 +292,7 @@ func (m *_BACnetReadAccessSpecification) SerializeWithWriteBuffer(ctx context.Co return nil } + func (m *_BACnetReadAccessSpecification) isBACnetReadAccessSpecification() bool { return true } @@ -301,3 +307,6 @@ func (m *_BACnetReadAccessSpecification) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetRecipient.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetRecipient.go index 1fe0d1b831f..507bd0143bb 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetRecipient.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetRecipient.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetRecipient is the corresponding interface of BACnetRecipient type BACnetRecipient interface { @@ -47,7 +49,7 @@ type BACnetRecipientExactly interface { // _BACnetRecipient is the data-structure of this message type _BACnetRecipient struct { _BACnetRecipientChildRequirements - PeekedTagHeader BACnetTagHeader + PeekedTagHeader BACnetTagHeader } type _BACnetRecipientChildRequirements interface { @@ -55,6 +57,7 @@ type _BACnetRecipientChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type BACnetRecipientParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetRecipient, serializeChildFunction func() error) error GetTypeName() string @@ -62,13 +65,12 @@ type BACnetRecipientParent interface { type BACnetRecipientChild interface { utils.Serializable - InitializeParent(parent BACnetRecipient, peekedTagHeader BACnetTagHeader) +InitializeParent(parent BACnetRecipient , peekedTagHeader BACnetTagHeader ) GetParent() *BACnetRecipient GetTypeName() string BACnetRecipient } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,14 +100,15 @@ func (m *_BACnetRecipient) GetPeekedTagNumber() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetRecipient factory function for _BACnetRecipient -func NewBACnetRecipient(peekedTagHeader BACnetTagHeader) *_BACnetRecipient { - return &_BACnetRecipient{PeekedTagHeader: peekedTagHeader} +func NewBACnetRecipient( peekedTagHeader BACnetTagHeader ) *_BACnetRecipient { +return &_BACnetRecipient{ PeekedTagHeader: peekedTagHeader } } // Deprecated: use the interface for direct cast func CastBACnetRecipient(structType interface{}) BACnetRecipient { - if casted, ok := structType.(BACnetRecipient); ok { + if casted, ok := structType.(BACnetRecipient); ok { return casted } if casted, ok := structType.(*BACnetRecipient); ok { @@ -118,6 +121,7 @@ func (m *_BACnetRecipient) GetTypeName() string { return "BACnetRecipient" } + func (m *_BACnetRecipient) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -143,13 +147,13 @@ func BACnetRecipientParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu currentPos := positionAware.GetPos() _ = currentPos - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Virtual field _peekedTagNumber := peekedTagHeader.GetActualTagNumber() @@ -159,17 +163,17 @@ func BACnetRecipientParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetRecipientChildSerializeRequirement interface { BACnetRecipient - InitializeParent(BACnetRecipient, BACnetTagHeader) + InitializeParent(BACnetRecipient, BACnetTagHeader) GetParent() BACnetRecipient } var _childTemp interface{} var _child BACnetRecipientChildSerializeRequirement var typeSwitchError error switch { - case peekedTagNumber == uint8(0): // BACnetRecipientDevice - _childTemp, typeSwitchError = BACnetRecipientDeviceParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(1): // BACnetRecipientAddress - _childTemp, typeSwitchError = BACnetRecipientAddressParseWithBuffer(ctx, readBuffer) +case peekedTagNumber == uint8(0) : // BACnetRecipientDevice + _childTemp, typeSwitchError = BACnetRecipientDeviceParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(1) : // BACnetRecipientAddress + _childTemp, typeSwitchError = BACnetRecipientAddressParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedTagNumber=%v]", peekedTagNumber) } @@ -183,7 +187,7 @@ func BACnetRecipientParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu } // Finish initializing - _child.InitializeParent(_child, peekedTagHeader) +_child.InitializeParent(_child , peekedTagHeader ) return _child, nil } @@ -193,7 +197,7 @@ func (pm *_BACnetRecipient) SerializeParent(ctx context.Context, writeBuffer uti _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetRecipient"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetRecipient"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetRecipient") } // Virtual field @@ -212,6 +216,7 @@ func (pm *_BACnetRecipient) SerializeParent(ctx context.Context, writeBuffer uti return nil } + func (m *_BACnetRecipient) isBACnetRecipient() bool { return true } @@ -226,3 +231,6 @@ func (m *_BACnetRecipient) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetRecipientAddress.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetRecipientAddress.go index 4f1d7b27c51..c85ef53773c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetRecipientAddress.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetRecipientAddress.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetRecipientAddress is the corresponding interface of BACnetRecipientAddress type BACnetRecipientAddress interface { @@ -46,9 +48,11 @@ type BACnetRecipientAddressExactly interface { // _BACnetRecipientAddress is the data-structure of this message type _BACnetRecipientAddress struct { *_BACnetRecipient - AddressValue BACnetAddressEnclosed + AddressValue BACnetAddressEnclosed } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetRecipientAddress struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetRecipientAddress) InitializeParent(parent BACnetRecipient, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetRecipientAddress) InitializeParent(parent BACnetRecipient , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetRecipientAddress) GetParent() BACnetRecipient { +func (m *_BACnetRecipientAddress) GetParent() BACnetRecipient { return m._BACnetRecipient } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetRecipientAddress) GetAddressValue() BACnetAddressEnclosed { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetRecipientAddress factory function for _BACnetRecipientAddress -func NewBACnetRecipientAddress(addressValue BACnetAddressEnclosed, peekedTagHeader BACnetTagHeader) *_BACnetRecipientAddress { +func NewBACnetRecipientAddress( addressValue BACnetAddressEnclosed , peekedTagHeader BACnetTagHeader ) *_BACnetRecipientAddress { _result := &_BACnetRecipientAddress{ - AddressValue: addressValue, - _BACnetRecipient: NewBACnetRecipient(peekedTagHeader), + AddressValue: addressValue, + _BACnetRecipient: NewBACnetRecipient(peekedTagHeader), } _result._BACnetRecipient._BACnetRecipientChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetRecipientAddress(addressValue BACnetAddressEnclosed, peekedTagHead // Deprecated: use the interface for direct cast func CastBACnetRecipientAddress(structType interface{}) BACnetRecipientAddress { - if casted, ok := structType.(BACnetRecipientAddress); ok { + if casted, ok := structType.(BACnetRecipientAddress); ok { return casted } if casted, ok := structType.(*BACnetRecipientAddress); ok { @@ -115,6 +118,7 @@ func (m *_BACnetRecipientAddress) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetRecipientAddress) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetRecipientAddressParseWithBuffer(ctx context.Context, readBuffer utils if pullErr := readBuffer.PullContext("addressValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for addressValue") } - _addressValue, _addressValueErr := BACnetAddressEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(1))) +_addressValue, _addressValueErr := BACnetAddressEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) ) if _addressValueErr != nil { return nil, errors.Wrap(_addressValueErr, "Error parsing 'addressValue' field of BACnetRecipientAddress") } @@ -151,8 +155,9 @@ func BACnetRecipientAddressParseWithBuffer(ctx context.Context, readBuffer utils // Create a partially initialized instance _child := &_BACnetRecipientAddress{ - _BACnetRecipient: &_BACnetRecipient{}, - AddressValue: addressValue, + _BACnetRecipient: &_BACnetRecipient{ + }, + AddressValue: addressValue, } _child._BACnetRecipient._BACnetRecipientChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetRecipientAddress) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for BACnetRecipientAddress") } - // Simple Field (addressValue) - if pushErr := writeBuffer.PushContext("addressValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for addressValue") - } - _addressValueErr := writeBuffer.WriteSerializable(ctx, m.GetAddressValue()) - if popErr := writeBuffer.PopContext("addressValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for addressValue") - } - if _addressValueErr != nil { - return errors.Wrap(_addressValueErr, "Error serializing 'addressValue' field") - } + // Simple Field (addressValue) + if pushErr := writeBuffer.PushContext("addressValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for addressValue") + } + _addressValueErr := writeBuffer.WriteSerializable(ctx, m.GetAddressValue()) + if popErr := writeBuffer.PopContext("addressValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for addressValue") + } + if _addressValueErr != nil { + return errors.Wrap(_addressValueErr, "Error serializing 'addressValue' field") + } if popErr := writeBuffer.PopContext("BACnetRecipientAddress"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetRecipientAddress") @@ -194,6 +199,7 @@ func (m *_BACnetRecipientAddress) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetRecipientAddress) isBACnetRecipientAddress() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetRecipientAddress) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetRecipientDevice.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetRecipientDevice.go index 3eb44f39875..58f9b202c87 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetRecipientDevice.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetRecipientDevice.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetRecipientDevice is the corresponding interface of BACnetRecipientDevice type BACnetRecipientDevice interface { @@ -46,9 +48,11 @@ type BACnetRecipientDeviceExactly interface { // _BACnetRecipientDevice is the data-structure of this message type _BACnetRecipientDevice struct { *_BACnetRecipient - DeviceValue BACnetContextTagObjectIdentifier + DeviceValue BACnetContextTagObjectIdentifier } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetRecipientDevice struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetRecipientDevice) InitializeParent(parent BACnetRecipient, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetRecipientDevice) InitializeParent(parent BACnetRecipient , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetRecipientDevice) GetParent() BACnetRecipient { +func (m *_BACnetRecipientDevice) GetParent() BACnetRecipient { return m._BACnetRecipient } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetRecipientDevice) GetDeviceValue() BACnetContextTagObjectIdentifi /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetRecipientDevice factory function for _BACnetRecipientDevice -func NewBACnetRecipientDevice(deviceValue BACnetContextTagObjectIdentifier, peekedTagHeader BACnetTagHeader) *_BACnetRecipientDevice { +func NewBACnetRecipientDevice( deviceValue BACnetContextTagObjectIdentifier , peekedTagHeader BACnetTagHeader ) *_BACnetRecipientDevice { _result := &_BACnetRecipientDevice{ - DeviceValue: deviceValue, - _BACnetRecipient: NewBACnetRecipient(peekedTagHeader), + DeviceValue: deviceValue, + _BACnetRecipient: NewBACnetRecipient(peekedTagHeader), } _result._BACnetRecipient._BACnetRecipientChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetRecipientDevice(deviceValue BACnetContextTagObjectIdentifier, peek // Deprecated: use the interface for direct cast func CastBACnetRecipientDevice(structType interface{}) BACnetRecipientDevice { - if casted, ok := structType.(BACnetRecipientDevice); ok { + if casted, ok := structType.(BACnetRecipientDevice); ok { return casted } if casted, ok := structType.(*BACnetRecipientDevice); ok { @@ -115,6 +118,7 @@ func (m *_BACnetRecipientDevice) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetRecipientDevice) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetRecipientDeviceParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("deviceValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for deviceValue") } - _deviceValue, _deviceValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER)) +_deviceValue, _deviceValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_BACNET_OBJECT_IDENTIFIER ) ) if _deviceValueErr != nil { return nil, errors.Wrap(_deviceValueErr, "Error parsing 'deviceValue' field of BACnetRecipientDevice") } @@ -151,8 +155,9 @@ func BACnetRecipientDeviceParseWithBuffer(ctx context.Context, readBuffer utils. // Create a partially initialized instance _child := &_BACnetRecipientDevice{ - _BACnetRecipient: &_BACnetRecipient{}, - DeviceValue: deviceValue, + _BACnetRecipient: &_BACnetRecipient{ + }, + DeviceValue: deviceValue, } _child._BACnetRecipient._BACnetRecipientChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetRecipientDevice) SerializeWithWriteBuffer(ctx context.Context, w return errors.Wrap(pushErr, "Error pushing for BACnetRecipientDevice") } - // Simple Field (deviceValue) - if pushErr := writeBuffer.PushContext("deviceValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for deviceValue") - } - _deviceValueErr := writeBuffer.WriteSerializable(ctx, m.GetDeviceValue()) - if popErr := writeBuffer.PopContext("deviceValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for deviceValue") - } - if _deviceValueErr != nil { - return errors.Wrap(_deviceValueErr, "Error serializing 'deviceValue' field") - } + // Simple Field (deviceValue) + if pushErr := writeBuffer.PushContext("deviceValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for deviceValue") + } + _deviceValueErr := writeBuffer.WriteSerializable(ctx, m.GetDeviceValue()) + if popErr := writeBuffer.PopContext("deviceValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for deviceValue") + } + if _deviceValueErr != nil { + return errors.Wrap(_deviceValueErr, "Error serializing 'deviceValue' field") + } if popErr := writeBuffer.PopContext("BACnetRecipientDevice"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetRecipientDevice") @@ -194,6 +199,7 @@ func (m *_BACnetRecipientDevice) SerializeWithWriteBuffer(ctx context.Context, w return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetRecipientDevice) isBACnetRecipientDevice() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetRecipientDevice) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetRecipientEnclosed.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetRecipientEnclosed.go index 8274eee6214..73270eb86ad 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetRecipientEnclosed.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetRecipientEnclosed.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetRecipientEnclosed is the corresponding interface of BACnetRecipientEnclosed type BACnetRecipientEnclosed interface { @@ -48,14 +50,15 @@ type BACnetRecipientEnclosedExactly interface { // _BACnetRecipientEnclosed is the data-structure of this message type _BACnetRecipientEnclosed struct { - OpeningTag BACnetOpeningTag - Recipient BACnetRecipient - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + Recipient BACnetRecipient + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -78,14 +81,15 @@ func (m *_BACnetRecipientEnclosed) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetRecipientEnclosed factory function for _BACnetRecipientEnclosed -func NewBACnetRecipientEnclosed(openingTag BACnetOpeningTag, recipient BACnetRecipient, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetRecipientEnclosed { - return &_BACnetRecipientEnclosed{OpeningTag: openingTag, Recipient: recipient, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetRecipientEnclosed( openingTag BACnetOpeningTag , recipient BACnetRecipient , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetRecipientEnclosed { +return &_BACnetRecipientEnclosed{ OpeningTag: openingTag , Recipient: recipient , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetRecipientEnclosed(structType interface{}) BACnetRecipientEnclosed { - if casted, ok := structType.(BACnetRecipientEnclosed); ok { + if casted, ok := structType.(BACnetRecipientEnclosed); ok { return casted } if casted, ok := structType.(*BACnetRecipientEnclosed); ok { @@ -113,6 +117,7 @@ func (m *_BACnetRecipientEnclosed) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetRecipientEnclosed) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -134,7 +139,7 @@ func BACnetRecipientEnclosedParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetRecipientEnclosed") } @@ -147,7 +152,7 @@ func BACnetRecipientEnclosedParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("recipient"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for recipient") } - _recipient, _recipientErr := BACnetRecipientParseWithBuffer(ctx, readBuffer) +_recipient, _recipientErr := BACnetRecipientParseWithBuffer(ctx, readBuffer) if _recipientErr != nil { return nil, errors.Wrap(_recipientErr, "Error parsing 'recipient' field of BACnetRecipientEnclosed") } @@ -160,7 +165,7 @@ func BACnetRecipientEnclosedParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetRecipientEnclosed") } @@ -175,11 +180,11 @@ func BACnetRecipientEnclosedParseWithBuffer(ctx context.Context, readBuffer util // Create the instance return &_BACnetRecipientEnclosed{ - TagNumber: tagNumber, - OpeningTag: openingTag, - Recipient: recipient, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + Recipient: recipient, + ClosingTag: closingTag, + }, nil } func (m *_BACnetRecipientEnclosed) Serialize() ([]byte, error) { @@ -193,7 +198,7 @@ func (m *_BACnetRecipientEnclosed) Serialize() ([]byte, error) { func (m *_BACnetRecipientEnclosed) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetRecipientEnclosed"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetRecipientEnclosed"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetRecipientEnclosed") } @@ -239,13 +244,13 @@ func (m *_BACnetRecipientEnclosed) SerializeWithWriteBuffer(ctx context.Context, return nil } + //// // Arguments Getter func (m *_BACnetRecipientEnclosed) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -263,3 +268,6 @@ func (m *_BACnetRecipientEnclosed) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetRecipientProcess.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetRecipientProcess.go index c73b491277a..18427c2b628 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetRecipientProcess.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetRecipientProcess.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetRecipientProcess is the corresponding interface of BACnetRecipientProcess type BACnetRecipientProcess interface { @@ -47,10 +49,11 @@ type BACnetRecipientProcessExactly interface { // _BACnetRecipientProcess is the data-structure of this message type _BACnetRecipientProcess struct { - Recipient BACnetRecipientEnclosed - ProcessIdentifier BACnetContextTagUnsignedInteger + Recipient BACnetRecipientEnclosed + ProcessIdentifier BACnetContextTagUnsignedInteger } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -69,14 +72,15 @@ func (m *_BACnetRecipientProcess) GetProcessIdentifier() BACnetContextTagUnsigne /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetRecipientProcess factory function for _BACnetRecipientProcess -func NewBACnetRecipientProcess(recipient BACnetRecipientEnclosed, processIdentifier BACnetContextTagUnsignedInteger) *_BACnetRecipientProcess { - return &_BACnetRecipientProcess{Recipient: recipient, ProcessIdentifier: processIdentifier} +func NewBACnetRecipientProcess( recipient BACnetRecipientEnclosed , processIdentifier BACnetContextTagUnsignedInteger ) *_BACnetRecipientProcess { +return &_BACnetRecipientProcess{ Recipient: recipient , ProcessIdentifier: processIdentifier } } // Deprecated: use the interface for direct cast func CastBACnetRecipientProcess(structType interface{}) BACnetRecipientProcess { - if casted, ok := structType.(BACnetRecipientProcess); ok { + if casted, ok := structType.(BACnetRecipientProcess); ok { return casted } if casted, ok := structType.(*BACnetRecipientProcess); ok { @@ -103,6 +107,7 @@ func (m *_BACnetRecipientProcess) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetRecipientProcess) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -124,7 +129,7 @@ func BACnetRecipientProcessParseWithBuffer(ctx context.Context, readBuffer utils if pullErr := readBuffer.PullContext("recipient"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for recipient") } - _recipient, _recipientErr := BACnetRecipientEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_recipient, _recipientErr := BACnetRecipientEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _recipientErr != nil { return nil, errors.Wrap(_recipientErr, "Error parsing 'recipient' field of BACnetRecipientProcess") } @@ -135,12 +140,12 @@ func BACnetRecipientProcessParseWithBuffer(ctx context.Context, readBuffer utils // Optional Field (processIdentifier) (Can be skipped, if a given expression evaluates to false) var processIdentifier BACnetContextTagUnsignedInteger = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("processIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for processIdentifier") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(1), BACnetDataType_UNSIGNED_INTEGER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(1) , BACnetDataType_UNSIGNED_INTEGER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -161,9 +166,9 @@ func BACnetRecipientProcessParseWithBuffer(ctx context.Context, readBuffer utils // Create the instance return &_BACnetRecipientProcess{ - Recipient: recipient, - ProcessIdentifier: processIdentifier, - }, nil + Recipient: recipient, + ProcessIdentifier: processIdentifier, + }, nil } func (m *_BACnetRecipientProcess) Serialize() ([]byte, error) { @@ -177,7 +182,7 @@ func (m *_BACnetRecipientProcess) Serialize() ([]byte, error) { func (m *_BACnetRecipientProcess) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetRecipientProcess"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetRecipientProcess"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetRecipientProcess") } @@ -215,6 +220,7 @@ func (m *_BACnetRecipientProcess) SerializeWithWriteBuffer(ctx context.Context, return nil } + func (m *_BACnetRecipientProcess) isBACnetRecipientProcess() bool { return true } @@ -229,3 +235,6 @@ func (m *_BACnetRecipientProcess) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetRecipientProcessEnclosed.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetRecipientProcessEnclosed.go index 6d9c3b9ea32..0eb58b830e1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetRecipientProcessEnclosed.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetRecipientProcessEnclosed.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetRecipientProcessEnclosed is the corresponding interface of BACnetRecipientProcessEnclosed type BACnetRecipientProcessEnclosed interface { @@ -48,14 +50,15 @@ type BACnetRecipientProcessEnclosedExactly interface { // _BACnetRecipientProcessEnclosed is the data-structure of this message type _BACnetRecipientProcessEnclosed struct { - OpeningTag BACnetOpeningTag - RecipientProcess BACnetRecipientProcess - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + RecipientProcess BACnetRecipientProcess + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -78,14 +81,15 @@ func (m *_BACnetRecipientProcessEnclosed) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetRecipientProcessEnclosed factory function for _BACnetRecipientProcessEnclosed -func NewBACnetRecipientProcessEnclosed(openingTag BACnetOpeningTag, recipientProcess BACnetRecipientProcess, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetRecipientProcessEnclosed { - return &_BACnetRecipientProcessEnclosed{OpeningTag: openingTag, RecipientProcess: recipientProcess, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetRecipientProcessEnclosed( openingTag BACnetOpeningTag , recipientProcess BACnetRecipientProcess , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetRecipientProcessEnclosed { +return &_BACnetRecipientProcessEnclosed{ OpeningTag: openingTag , RecipientProcess: recipientProcess , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetRecipientProcessEnclosed(structType interface{}) BACnetRecipientProcessEnclosed { - if casted, ok := structType.(BACnetRecipientProcessEnclosed); ok { + if casted, ok := structType.(BACnetRecipientProcessEnclosed); ok { return casted } if casted, ok := structType.(*BACnetRecipientProcessEnclosed); ok { @@ -113,6 +117,7 @@ func (m *_BACnetRecipientProcessEnclosed) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetRecipientProcessEnclosed) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -134,7 +139,7 @@ func BACnetRecipientProcessEnclosedParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetRecipientProcessEnclosed") } @@ -147,7 +152,7 @@ func BACnetRecipientProcessEnclosedParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("recipientProcess"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for recipientProcess") } - _recipientProcess, _recipientProcessErr := BACnetRecipientProcessParseWithBuffer(ctx, readBuffer) +_recipientProcess, _recipientProcessErr := BACnetRecipientProcessParseWithBuffer(ctx, readBuffer) if _recipientProcessErr != nil { return nil, errors.Wrap(_recipientProcessErr, "Error parsing 'recipientProcess' field of BACnetRecipientProcessEnclosed") } @@ -160,7 +165,7 @@ func BACnetRecipientProcessEnclosedParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetRecipientProcessEnclosed") } @@ -175,11 +180,11 @@ func BACnetRecipientProcessEnclosedParseWithBuffer(ctx context.Context, readBuff // Create the instance return &_BACnetRecipientProcessEnclosed{ - TagNumber: tagNumber, - OpeningTag: openingTag, - RecipientProcess: recipientProcess, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + RecipientProcess: recipientProcess, + ClosingTag: closingTag, + }, nil } func (m *_BACnetRecipientProcessEnclosed) Serialize() ([]byte, error) { @@ -193,7 +198,7 @@ func (m *_BACnetRecipientProcessEnclosed) Serialize() ([]byte, error) { func (m *_BACnetRecipientProcessEnclosed) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetRecipientProcessEnclosed"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetRecipientProcessEnclosed"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetRecipientProcessEnclosed") } @@ -239,13 +244,13 @@ func (m *_BACnetRecipientProcessEnclosed) SerializeWithWriteBuffer(ctx context.C return nil } + //// // Arguments Getter func (m *_BACnetRecipientProcessEnclosed) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -263,3 +268,6 @@ func (m *_BACnetRecipientProcessEnclosed) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetRejectReason.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetRejectReason.go index 8f94b412190..33955b099cb 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetRejectReason.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetRejectReason.go @@ -34,25 +34,25 @@ type IBACnetRejectReason interface { utils.Serializable } -const ( - BACnetRejectReason_OTHER BACnetRejectReason = 0x0 - BACnetRejectReason_BUFFER_OVERFLOW BACnetRejectReason = 0x1 - BACnetRejectReason_INCONSISTENT_PARAMETERS BACnetRejectReason = 0x2 +const( + BACnetRejectReason_OTHER BACnetRejectReason = 0x0 + BACnetRejectReason_BUFFER_OVERFLOW BACnetRejectReason = 0x1 + BACnetRejectReason_INCONSISTENT_PARAMETERS BACnetRejectReason = 0x2 BACnetRejectReason_INVALID_PARAMETER_DATA_TYPE BACnetRejectReason = 0x3 - BACnetRejectReason_INVALID_TAG BACnetRejectReason = 0x4 - BACnetRejectReason_MISSING_REQUIRED_PARAMETER BACnetRejectReason = 0x5 - BACnetRejectReason_PARAMETER_OUT_OF_RANGE BACnetRejectReason = 0x6 - BACnetRejectReason_TOO_MANY_ARGUMENTS BACnetRejectReason = 0x7 - BACnetRejectReason_UNDEFINED_ENUMERATION BACnetRejectReason = 0x8 - BACnetRejectReason_UNRECOGNIZED_SERVICE BACnetRejectReason = 0x9 - BACnetRejectReason_VENDOR_PROPRIETARY_VALUE BACnetRejectReason = 0xFF + BACnetRejectReason_INVALID_TAG BACnetRejectReason = 0x4 + BACnetRejectReason_MISSING_REQUIRED_PARAMETER BACnetRejectReason = 0x5 + BACnetRejectReason_PARAMETER_OUT_OF_RANGE BACnetRejectReason = 0x6 + BACnetRejectReason_TOO_MANY_ARGUMENTS BACnetRejectReason = 0x7 + BACnetRejectReason_UNDEFINED_ENUMERATION BACnetRejectReason = 0x8 + BACnetRejectReason_UNRECOGNIZED_SERVICE BACnetRejectReason = 0x9 + BACnetRejectReason_VENDOR_PROPRIETARY_VALUE BACnetRejectReason = 0xFF ) var BACnetRejectReasonValues []BACnetRejectReason func init() { _ = errors.New - BACnetRejectReasonValues = []BACnetRejectReason{ + BACnetRejectReasonValues = []BACnetRejectReason { BACnetRejectReason_OTHER, BACnetRejectReason_BUFFER_OVERFLOW, BACnetRejectReason_INCONSISTENT_PARAMETERS, @@ -69,28 +69,28 @@ func init() { func BACnetRejectReasonByValue(value uint8) (enum BACnetRejectReason, ok bool) { switch value { - case 0x0: - return BACnetRejectReason_OTHER, true - case 0x1: - return BACnetRejectReason_BUFFER_OVERFLOW, true - case 0x2: - return BACnetRejectReason_INCONSISTENT_PARAMETERS, true - case 0x3: - return BACnetRejectReason_INVALID_PARAMETER_DATA_TYPE, true - case 0x4: - return BACnetRejectReason_INVALID_TAG, true - case 0x5: - return BACnetRejectReason_MISSING_REQUIRED_PARAMETER, true - case 0x6: - return BACnetRejectReason_PARAMETER_OUT_OF_RANGE, true - case 0x7: - return BACnetRejectReason_TOO_MANY_ARGUMENTS, true - case 0x8: - return BACnetRejectReason_UNDEFINED_ENUMERATION, true - case 0x9: - return BACnetRejectReason_UNRECOGNIZED_SERVICE, true - case 0xFF: - return BACnetRejectReason_VENDOR_PROPRIETARY_VALUE, true + case 0x0: + return BACnetRejectReason_OTHER, true + case 0x1: + return BACnetRejectReason_BUFFER_OVERFLOW, true + case 0x2: + return BACnetRejectReason_INCONSISTENT_PARAMETERS, true + case 0x3: + return BACnetRejectReason_INVALID_PARAMETER_DATA_TYPE, true + case 0x4: + return BACnetRejectReason_INVALID_TAG, true + case 0x5: + return BACnetRejectReason_MISSING_REQUIRED_PARAMETER, true + case 0x6: + return BACnetRejectReason_PARAMETER_OUT_OF_RANGE, true + case 0x7: + return BACnetRejectReason_TOO_MANY_ARGUMENTS, true + case 0x8: + return BACnetRejectReason_UNDEFINED_ENUMERATION, true + case 0x9: + return BACnetRejectReason_UNRECOGNIZED_SERVICE, true + case 0xFF: + return BACnetRejectReason_VENDOR_PROPRIETARY_VALUE, true } return 0, false } @@ -123,13 +123,13 @@ func BACnetRejectReasonByName(value string) (enum BACnetRejectReason, ok bool) { return 0, false } -func BACnetRejectReasonKnows(value uint8) bool { +func BACnetRejectReasonKnows(value uint8) bool { for _, typeValue := range BACnetRejectReasonValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetRejectReason(structType interface{}) BACnetRejectReason { @@ -211,3 +211,4 @@ func (e BACnetRejectReason) PLC4XEnumName() string { func (e BACnetRejectReason) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetRejectReasonTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetRejectReasonTagged.go index 4ab7f2ae353..370f937992b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetRejectReasonTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetRejectReasonTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetRejectReasonTagged is the corresponding interface of BACnetRejectReasonTagged type BACnetRejectReasonTagged interface { @@ -48,13 +50,14 @@ type BACnetRejectReasonTaggedExactly interface { // _BACnetRejectReasonTagged is the data-structure of this message type _BACnetRejectReasonTagged struct { - Value BACnetRejectReason - ProprietaryValue uint32 + Value BACnetRejectReason + ProprietaryValue uint32 // Arguments. ActualLength uint32 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -88,14 +91,15 @@ func (m *_BACnetRejectReasonTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetRejectReasonTagged factory function for _BACnetRejectReasonTagged -func NewBACnetRejectReasonTagged(value BACnetRejectReason, proprietaryValue uint32, actualLength uint32) *_BACnetRejectReasonTagged { - return &_BACnetRejectReasonTagged{Value: value, ProprietaryValue: proprietaryValue, ActualLength: actualLength} +func NewBACnetRejectReasonTagged( value BACnetRejectReason , proprietaryValue uint32 , actualLength uint32 ) *_BACnetRejectReasonTagged { +return &_BACnetRejectReasonTagged{ Value: value , ProprietaryValue: proprietaryValue , ActualLength: actualLength } } // Deprecated: use the interface for direct cast func CastBACnetRejectReasonTagged(structType interface{}) BACnetRejectReasonTagged { - if casted, ok := structType.(BACnetRejectReasonTagged); ok { + if casted, ok := structType.(BACnetRejectReasonTagged); ok { return casted } if casted, ok := structType.(*BACnetRejectReasonTagged); ok { @@ -112,16 +116,17 @@ func (m *_BACnetRejectReasonTagged) GetLengthInBits(ctx context.Context) uint16 lengthInBits := uint16(0) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.ActualLength) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.ActualLength) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.ActualLength) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.ActualLength) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetRejectReasonTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -146,7 +151,7 @@ func BACnetRejectReasonTaggedParseWithBuffer(ctx context.Context, readBuffer uti } var value BACnetRejectReason if _value != nil { - value = _value.(BACnetRejectReason) + value = _value.(BACnetRejectReason) } // Virtual field @@ -161,7 +166,7 @@ func BACnetRejectReasonTaggedParseWithBuffer(ctx context.Context, readBuffer uti } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetRejectReasonTagged"); closeErr != nil { @@ -170,10 +175,10 @@ func BACnetRejectReasonTaggedParseWithBuffer(ctx context.Context, readBuffer uti // Create the instance return &_BACnetRejectReasonTagged{ - ActualLength: actualLength, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + ActualLength: actualLength, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetRejectReasonTagged) Serialize() ([]byte, error) { @@ -187,7 +192,7 @@ func (m *_BACnetRejectReasonTagged) Serialize() ([]byte, error) { func (m *_BACnetRejectReasonTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetRejectReasonTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetRejectReasonTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetRejectReasonTagged") } @@ -213,13 +218,13 @@ func (m *_BACnetRejectReasonTagged) SerializeWithWriteBuffer(ctx context.Context return nil } + //// // Arguments Getter func (m *_BACnetRejectReasonTagged) GetActualLength() uint32 { return m.ActualLength } - // //// @@ -237,3 +242,6 @@ func (m *_BACnetRejectReasonTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetRelationship.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetRelationship.go index 9a427ca1442..22933d1847b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetRelationship.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetRelationship.go @@ -34,45 +34,45 @@ type IBACnetRelationship interface { utils.Serializable } -const ( - BACnetRelationship_UNKNOWN BACnetRelationship = 0 - BACnetRelationship_DEFAULT BACnetRelationship = 1 - BACnetRelationship_CONTAINS BACnetRelationship = 2 - BACnetRelationship_CONTAINED_BY BACnetRelationship = 3 - BACnetRelationship_USES BACnetRelationship = 4 - BACnetRelationship_USED_BY BACnetRelationship = 5 - BACnetRelationship_COMMANDS BACnetRelationship = 6 - BACnetRelationship_COMMANDED_BY BACnetRelationship = 7 - BACnetRelationship_ADJUSTS BACnetRelationship = 8 - BACnetRelationship_ADJUSTED_BY BACnetRelationship = 9 - BACnetRelationship_INGRESS BACnetRelationship = 10 - BACnetRelationship_EGRESS BACnetRelationship = 11 - BACnetRelationship_SUPPLIES_AIR BACnetRelationship = 12 - BACnetRelationship_RECEIVES_AIR BACnetRelationship = 13 - BACnetRelationship_SUPPLIES_HOT_AIR BACnetRelationship = 14 - BACnetRelationship_RECEIVES_HOT_AIR BACnetRelationship = 15 - BACnetRelationship_SUPPLIES_COOL_AIR BACnetRelationship = 16 - BACnetRelationship_RECEIVES_COOL_AIR BACnetRelationship = 17 - BACnetRelationship_SUPPLIES_POWER BACnetRelationship = 18 - BACnetRelationship_RECEIVES_POWER BACnetRelationship = 19 - BACnetRelationship_SUPPLIES_GAS BACnetRelationship = 20 - BACnetRelationship_RECEIVES_GAS BACnetRelationship = 21 - BACnetRelationship_SUPPLIES_WATER BACnetRelationship = 22 - BACnetRelationship_RECEIVES_WATER BACnetRelationship = 23 - BACnetRelationship_SUPPLIES_HOT_WATER BACnetRelationship = 24 - BACnetRelationship_RECEIVES_HOT_WATER BACnetRelationship = 25 - BACnetRelationship_SUPPLIES_COOL_WATER BACnetRelationship = 26 - BACnetRelationship_RECEIVES_COOL_WATER BACnetRelationship = 27 - BACnetRelationship_SUPPLIES_STEAM BACnetRelationship = 28 - BACnetRelationship_RECEIVES_STEAM BACnetRelationship = 29 - BACnetRelationship_VENDOR_PROPRIETARY_VALUE BACnetRelationship = 0xFFFF +const( + BACnetRelationship_UNKNOWN BACnetRelationship = 0 + BACnetRelationship_DEFAULT BACnetRelationship = 1 + BACnetRelationship_CONTAINS BACnetRelationship = 2 + BACnetRelationship_CONTAINED_BY BACnetRelationship = 3 + BACnetRelationship_USES BACnetRelationship = 4 + BACnetRelationship_USED_BY BACnetRelationship = 5 + BACnetRelationship_COMMANDS BACnetRelationship = 6 + BACnetRelationship_COMMANDED_BY BACnetRelationship = 7 + BACnetRelationship_ADJUSTS BACnetRelationship = 8 + BACnetRelationship_ADJUSTED_BY BACnetRelationship = 9 + BACnetRelationship_INGRESS BACnetRelationship = 10 + BACnetRelationship_EGRESS BACnetRelationship = 11 + BACnetRelationship_SUPPLIES_AIR BACnetRelationship = 12 + BACnetRelationship_RECEIVES_AIR BACnetRelationship = 13 + BACnetRelationship_SUPPLIES_HOT_AIR BACnetRelationship = 14 + BACnetRelationship_RECEIVES_HOT_AIR BACnetRelationship = 15 + BACnetRelationship_SUPPLIES_COOL_AIR BACnetRelationship = 16 + BACnetRelationship_RECEIVES_COOL_AIR BACnetRelationship = 17 + BACnetRelationship_SUPPLIES_POWER BACnetRelationship = 18 + BACnetRelationship_RECEIVES_POWER BACnetRelationship = 19 + BACnetRelationship_SUPPLIES_GAS BACnetRelationship = 20 + BACnetRelationship_RECEIVES_GAS BACnetRelationship = 21 + BACnetRelationship_SUPPLIES_WATER BACnetRelationship = 22 + BACnetRelationship_RECEIVES_WATER BACnetRelationship = 23 + BACnetRelationship_SUPPLIES_HOT_WATER BACnetRelationship = 24 + BACnetRelationship_RECEIVES_HOT_WATER BACnetRelationship = 25 + BACnetRelationship_SUPPLIES_COOL_WATER BACnetRelationship = 26 + BACnetRelationship_RECEIVES_COOL_WATER BACnetRelationship = 27 + BACnetRelationship_SUPPLIES_STEAM BACnetRelationship = 28 + BACnetRelationship_RECEIVES_STEAM BACnetRelationship = 29 + BACnetRelationship_VENDOR_PROPRIETARY_VALUE BACnetRelationship = 0XFFFF ) var BACnetRelationshipValues []BACnetRelationship func init() { _ = errors.New - BACnetRelationshipValues = []BACnetRelationship{ + BACnetRelationshipValues = []BACnetRelationship { BACnetRelationship_UNKNOWN, BACnetRelationship_DEFAULT, BACnetRelationship_CONTAINS, @@ -109,68 +109,68 @@ func init() { func BACnetRelationshipByValue(value uint16) (enum BACnetRelationship, ok bool) { switch value { - case 0: - return BACnetRelationship_UNKNOWN, true - case 0xFFFF: - return BACnetRelationship_VENDOR_PROPRIETARY_VALUE, true - case 1: - return BACnetRelationship_DEFAULT, true - case 10: - return BACnetRelationship_INGRESS, true - case 11: - return BACnetRelationship_EGRESS, true - case 12: - return BACnetRelationship_SUPPLIES_AIR, true - case 13: - return BACnetRelationship_RECEIVES_AIR, true - case 14: - return BACnetRelationship_SUPPLIES_HOT_AIR, true - case 15: - return BACnetRelationship_RECEIVES_HOT_AIR, true - case 16: - return BACnetRelationship_SUPPLIES_COOL_AIR, true - case 17: - return BACnetRelationship_RECEIVES_COOL_AIR, true - case 18: - return BACnetRelationship_SUPPLIES_POWER, true - case 19: - return BACnetRelationship_RECEIVES_POWER, true - case 2: - return BACnetRelationship_CONTAINS, true - case 20: - return BACnetRelationship_SUPPLIES_GAS, true - case 21: - return BACnetRelationship_RECEIVES_GAS, true - case 22: - return BACnetRelationship_SUPPLIES_WATER, true - case 23: - return BACnetRelationship_RECEIVES_WATER, true - case 24: - return BACnetRelationship_SUPPLIES_HOT_WATER, true - case 25: - return BACnetRelationship_RECEIVES_HOT_WATER, true - case 26: - return BACnetRelationship_SUPPLIES_COOL_WATER, true - case 27: - return BACnetRelationship_RECEIVES_COOL_WATER, true - case 28: - return BACnetRelationship_SUPPLIES_STEAM, true - case 29: - return BACnetRelationship_RECEIVES_STEAM, true - case 3: - return BACnetRelationship_CONTAINED_BY, true - case 4: - return BACnetRelationship_USES, true - case 5: - return BACnetRelationship_USED_BY, true - case 6: - return BACnetRelationship_COMMANDS, true - case 7: - return BACnetRelationship_COMMANDED_BY, true - case 8: - return BACnetRelationship_ADJUSTS, true - case 9: - return BACnetRelationship_ADJUSTED_BY, true + case 0: + return BACnetRelationship_UNKNOWN, true + case 0XFFFF: + return BACnetRelationship_VENDOR_PROPRIETARY_VALUE, true + case 1: + return BACnetRelationship_DEFAULT, true + case 10: + return BACnetRelationship_INGRESS, true + case 11: + return BACnetRelationship_EGRESS, true + case 12: + return BACnetRelationship_SUPPLIES_AIR, true + case 13: + return BACnetRelationship_RECEIVES_AIR, true + case 14: + return BACnetRelationship_SUPPLIES_HOT_AIR, true + case 15: + return BACnetRelationship_RECEIVES_HOT_AIR, true + case 16: + return BACnetRelationship_SUPPLIES_COOL_AIR, true + case 17: + return BACnetRelationship_RECEIVES_COOL_AIR, true + case 18: + return BACnetRelationship_SUPPLIES_POWER, true + case 19: + return BACnetRelationship_RECEIVES_POWER, true + case 2: + return BACnetRelationship_CONTAINS, true + case 20: + return BACnetRelationship_SUPPLIES_GAS, true + case 21: + return BACnetRelationship_RECEIVES_GAS, true + case 22: + return BACnetRelationship_SUPPLIES_WATER, true + case 23: + return BACnetRelationship_RECEIVES_WATER, true + case 24: + return BACnetRelationship_SUPPLIES_HOT_WATER, true + case 25: + return BACnetRelationship_RECEIVES_HOT_WATER, true + case 26: + return BACnetRelationship_SUPPLIES_COOL_WATER, true + case 27: + return BACnetRelationship_RECEIVES_COOL_WATER, true + case 28: + return BACnetRelationship_SUPPLIES_STEAM, true + case 29: + return BACnetRelationship_RECEIVES_STEAM, true + case 3: + return BACnetRelationship_CONTAINED_BY, true + case 4: + return BACnetRelationship_USES, true + case 5: + return BACnetRelationship_USED_BY, true + case 6: + return BACnetRelationship_COMMANDS, true + case 7: + return BACnetRelationship_COMMANDED_BY, true + case 8: + return BACnetRelationship_ADJUSTS, true + case 9: + return BACnetRelationship_ADJUSTED_BY, true } return 0, false } @@ -243,13 +243,13 @@ func BACnetRelationshipByName(value string) (enum BACnetRelationship, ok bool) { return 0, false } -func BACnetRelationshipKnows(value uint16) bool { +func BACnetRelationshipKnows(value uint16) bool { for _, typeValue := range BACnetRelationshipValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastBACnetRelationship(structType interface{}) BACnetRelationship { @@ -371,3 +371,4 @@ func (e BACnetRelationship) PLC4XEnumName() string { func (e BACnetRelationship) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetRelationshipTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetRelationshipTagged.go index 7987b4c4002..91635fc0130 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetRelationshipTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetRelationshipTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetRelationshipTagged is the corresponding interface of BACnetRelationshipTagged type BACnetRelationshipTagged interface { @@ -50,15 +52,16 @@ type BACnetRelationshipTaggedExactly interface { // _BACnetRelationshipTagged is the data-structure of this message type _BACnetRelationshipTagged struct { - Header BACnetTagHeader - Value BACnetRelationship - ProprietaryValue uint32 + Header BACnetTagHeader + Value BACnetRelationship + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_BACnetRelationshipTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetRelationshipTagged factory function for _BACnetRelationshipTagged -func NewBACnetRelationshipTagged(header BACnetTagHeader, value BACnetRelationship, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_BACnetRelationshipTagged { - return &_BACnetRelationshipTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetRelationshipTagged( header BACnetTagHeader , value BACnetRelationship , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_BACnetRelationshipTagged { +return &_BACnetRelationshipTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetRelationshipTagged(structType interface{}) BACnetRelationshipTagged { - if casted, ok := structType.(BACnetRelationshipTagged); ok { + if casted, ok := structType.(BACnetRelationshipTagged); ok { return casted } if casted, ok := structType.(*BACnetRelationshipTagged); ok { @@ -123,16 +127,17 @@ func (m *_BACnetRelationshipTagged) GetLengthInBits(ctx context.Context) uint16 lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetRelationshipTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetRelationshipTaggedParseWithBuffer(ctx context.Context, readBuffer uti if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetRelationshipTagged") } @@ -164,12 +169,12 @@ func BACnetRelationshipTaggedParseWithBuffer(ctx context.Context, readBuffer uti } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func BACnetRelationshipTaggedParseWithBuffer(ctx context.Context, readBuffer uti } var value BACnetRelationship if _value != nil { - value = _value.(BACnetRelationship) + value = _value.(BACnetRelationship) } // Virtual field @@ -195,7 +200,7 @@ func BACnetRelationshipTaggedParseWithBuffer(ctx context.Context, readBuffer uti } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetRelationshipTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func BACnetRelationshipTaggedParseWithBuffer(ctx context.Context, readBuffer uti // Create the instance return &_BACnetRelationshipTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetRelationshipTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_BACnetRelationshipTagged) Serialize() ([]byte, error) { func (m *_BACnetRelationshipTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetRelationshipTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetRelationshipTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetRelationshipTagged") } @@ -261,6 +266,7 @@ func (m *_BACnetRelationshipTagged) SerializeWithWriteBuffer(ctx context.Context return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_BACnetRelationshipTagged) GetTagNumber() uint8 { func (m *_BACnetRelationshipTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_BACnetRelationshipTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetReliability.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetReliability.go index 1b26e5ef2c5..e2f6dc3f0bc 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetReliability.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetReliability.go @@ -34,39 +34,39 @@ type IBACnetReliability interface { utils.Serializable } -const ( - BACnetReliability_NO_FAULT_DETECTED BACnetReliability = 0 - BACnetReliability_NO_SENSOR BACnetReliability = 1 - BACnetReliability_OVER_RANGE BACnetReliability = 2 - BACnetReliability_UNDER_RANGE BACnetReliability = 3 - BACnetReliability_OPEN_LOOP BACnetReliability = 4 - BACnetReliability_SHORTED_LOOP BACnetReliability = 5 - BACnetReliability_NO_OUTPUT BACnetReliability = 6 - BACnetReliability_UNRELIABLE_OTHER BACnetReliability = 7 - BACnetReliability_PROCESS_ERROR BACnetReliability = 8 - BACnetReliability_MULTI_STATE_FAULT BACnetReliability = 9 - BACnetReliability_CONFIGURATION_ERROR BACnetReliability = 10 - BACnetReliability_COMMUNICATION_FAILURE BACnetReliability = 12 - BACnetReliability_MEMBER_FAULT BACnetReliability = 13 - BACnetReliability_MONITORED_OBJECT_FAULT BACnetReliability = 14 - BACnetReliability_TRIPPED BACnetReliability = 15 - BACnetReliability_LAMP_FAILURE BACnetReliability = 16 - BACnetReliability_ACTIVATION_FAILURE BACnetReliability = 17 - BACnetReliability_RENEW_DHCP_FAILURE BACnetReliability = 18 - BACnetReliability_RENEW_FD_REGISTRATION_FAILURE BACnetReliability = 19 +const( + BACnetReliability_NO_FAULT_DETECTED BACnetReliability = 0 + BACnetReliability_NO_SENSOR BACnetReliability = 1 + BACnetReliability_OVER_RANGE BACnetReliability = 2 + BACnetReliability_UNDER_RANGE BACnetReliability = 3 + BACnetReliability_OPEN_LOOP BACnetReliability = 4 + BACnetReliability_SHORTED_LOOP BACnetReliability = 5 + BACnetReliability_NO_OUTPUT BACnetReliability = 6 + BACnetReliability_UNRELIABLE_OTHER BACnetReliability = 7 + BACnetReliability_PROCESS_ERROR BACnetReliability = 8 + BACnetReliability_MULTI_STATE_FAULT BACnetReliability = 9 + BACnetReliability_CONFIGURATION_ERROR BACnetReliability = 10 + BACnetReliability_COMMUNICATION_FAILURE BACnetReliability = 12 + BACnetReliability_MEMBER_FAULT BACnetReliability = 13 + BACnetReliability_MONITORED_OBJECT_FAULT BACnetReliability = 14 + BACnetReliability_TRIPPED BACnetReliability = 15 + BACnetReliability_LAMP_FAILURE BACnetReliability = 16 + BACnetReliability_ACTIVATION_FAILURE BACnetReliability = 17 + BACnetReliability_RENEW_DHCP_FAILURE BACnetReliability = 18 + BACnetReliability_RENEW_FD_REGISTRATION_FAILURE BACnetReliability = 19 BACnetReliability_RESTART_AUTO_NEGOTIATION_FAILURE BACnetReliability = 20 - BACnetReliability_RESTART_FAILURE BACnetReliability = 21 - BACnetReliability_PROPRIETARY_COMMAND_FAILURE BACnetReliability = 22 - BACnetReliability_FAULTS_LISTED BACnetReliability = 23 - BACnetReliability_REFERENCED_OBJECT_FAULT BACnetReliability = 24 - BACnetReliability_VENDOR_PROPRIETARY_VALUE BACnetReliability = 0xFFFF + BACnetReliability_RESTART_FAILURE BACnetReliability = 21 + BACnetReliability_PROPRIETARY_COMMAND_FAILURE BACnetReliability = 22 + BACnetReliability_FAULTS_LISTED BACnetReliability = 23 + BACnetReliability_REFERENCED_OBJECT_FAULT BACnetReliability = 24 + BACnetReliability_VENDOR_PROPRIETARY_VALUE BACnetReliability = 0XFFFF ) var BACnetReliabilityValues []BACnetReliability func init() { _ = errors.New - BACnetReliabilityValues = []BACnetReliability{ + BACnetReliabilityValues = []BACnetReliability { BACnetReliability_NO_FAULT_DETECTED, BACnetReliability_NO_SENSOR, BACnetReliability_OVER_RANGE, @@ -97,56 +97,56 @@ func init() { func BACnetReliabilityByValue(value uint16) (enum BACnetReliability, ok bool) { switch value { - case 0: - return BACnetReliability_NO_FAULT_DETECTED, true - case 0xFFFF: - return BACnetReliability_VENDOR_PROPRIETARY_VALUE, true - case 1: - return BACnetReliability_NO_SENSOR, true - case 10: - return BACnetReliability_CONFIGURATION_ERROR, true - case 12: - return BACnetReliability_COMMUNICATION_FAILURE, true - case 13: - return BACnetReliability_MEMBER_FAULT, true - case 14: - return BACnetReliability_MONITORED_OBJECT_FAULT, true - case 15: - return BACnetReliability_TRIPPED, true - case 16: - return BACnetReliability_LAMP_FAILURE, true - case 17: - return BACnetReliability_ACTIVATION_FAILURE, true - case 18: - return BACnetReliability_RENEW_DHCP_FAILURE, true - case 19: - return BACnetReliability_RENEW_FD_REGISTRATION_FAILURE, true - case 2: - return BACnetReliability_OVER_RANGE, true - case 20: - return BACnetReliability_RESTART_AUTO_NEGOTIATION_FAILURE, true - case 21: - return BACnetReliability_RESTART_FAILURE, true - case 22: - return BACnetReliability_PROPRIETARY_COMMAND_FAILURE, true - case 23: - return BACnetReliability_FAULTS_LISTED, true - case 24: - return BACnetReliability_REFERENCED_OBJECT_FAULT, true - case 3: - return BACnetReliability_UNDER_RANGE, true - case 4: - return BACnetReliability_OPEN_LOOP, true - case 5: - return BACnetReliability_SHORTED_LOOP, true - case 6: - return BACnetReliability_NO_OUTPUT, true - case 7: - return BACnetReliability_UNRELIABLE_OTHER, true - case 8: - return BACnetReliability_PROCESS_ERROR, true - case 9: - return BACnetReliability_MULTI_STATE_FAULT, true + case 0: + return BACnetReliability_NO_FAULT_DETECTED, true + case 0XFFFF: + return BACnetReliability_VENDOR_PROPRIETARY_VALUE, true + case 1: + return BACnetReliability_NO_SENSOR, true + case 10: + return BACnetReliability_CONFIGURATION_ERROR, true + case 12: + return BACnetReliability_COMMUNICATION_FAILURE, true + case 13: + return BACnetReliability_MEMBER_FAULT, true + case 14: + return BACnetReliability_MONITORED_OBJECT_FAULT, true + case 15: + return BACnetReliability_TRIPPED, true + case 16: + return BACnetReliability_LAMP_FAILURE, true + case 17: + return BACnetReliability_ACTIVATION_FAILURE, true + case 18: + return BACnetReliability_RENEW_DHCP_FAILURE, true + case 19: + return BACnetReliability_RENEW_FD_REGISTRATION_FAILURE, true + case 2: + return BACnetReliability_OVER_RANGE, true + case 20: + return BACnetReliability_RESTART_AUTO_NEGOTIATION_FAILURE, true + case 21: + return BACnetReliability_RESTART_FAILURE, true + case 22: + return BACnetReliability_PROPRIETARY_COMMAND_FAILURE, true + case 23: + return BACnetReliability_FAULTS_LISTED, true + case 24: + return BACnetReliability_REFERENCED_OBJECT_FAULT, true + case 3: + return BACnetReliability_UNDER_RANGE, true + case 4: + return BACnetReliability_OPEN_LOOP, true + case 5: + return BACnetReliability_SHORTED_LOOP, true + case 6: + return BACnetReliability_NO_OUTPUT, true + case 7: + return BACnetReliability_UNRELIABLE_OTHER, true + case 8: + return BACnetReliability_PROCESS_ERROR, true + case 9: + return BACnetReliability_MULTI_STATE_FAULT, true } return 0, false } @@ -207,13 +207,13 @@ func BACnetReliabilityByName(value string) (enum BACnetReliability, ok bool) { return 0, false } -func BACnetReliabilityKnows(value uint16) bool { +func BACnetReliabilityKnows(value uint16) bool { for _, typeValue := range BACnetReliabilityValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastBACnetReliability(structType interface{}) BACnetReliability { @@ -323,3 +323,4 @@ func (e BACnetReliability) PLC4XEnumName() string { func (e BACnetReliability) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetReliabilityTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetReliabilityTagged.go index d6a8815f212..a3d11d876cc 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetReliabilityTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetReliabilityTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetReliabilityTagged is the corresponding interface of BACnetReliabilityTagged type BACnetReliabilityTagged interface { @@ -50,15 +52,16 @@ type BACnetReliabilityTaggedExactly interface { // _BACnetReliabilityTagged is the data-structure of this message type _BACnetReliabilityTagged struct { - Header BACnetTagHeader - Value BACnetReliability - ProprietaryValue uint32 + Header BACnetTagHeader + Value BACnetReliability + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_BACnetReliabilityTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetReliabilityTagged factory function for _BACnetReliabilityTagged -func NewBACnetReliabilityTagged(header BACnetTagHeader, value BACnetReliability, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_BACnetReliabilityTagged { - return &_BACnetReliabilityTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetReliabilityTagged( header BACnetTagHeader , value BACnetReliability , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_BACnetReliabilityTagged { +return &_BACnetReliabilityTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetReliabilityTagged(structType interface{}) BACnetReliabilityTagged { - if casted, ok := structType.(BACnetReliabilityTagged); ok { + if casted, ok := structType.(BACnetReliabilityTagged); ok { return casted } if casted, ok := structType.(*BACnetReliabilityTagged); ok { @@ -123,16 +127,17 @@ func (m *_BACnetReliabilityTagged) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetReliabilityTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetReliabilityTaggedParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetReliabilityTagged") } @@ -164,12 +169,12 @@ func BACnetReliabilityTaggedParseWithBuffer(ctx context.Context, readBuffer util } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func BACnetReliabilityTaggedParseWithBuffer(ctx context.Context, readBuffer util } var value BACnetReliability if _value != nil { - value = _value.(BACnetReliability) + value = _value.(BACnetReliability) } // Virtual field @@ -195,7 +200,7 @@ func BACnetReliabilityTaggedParseWithBuffer(ctx context.Context, readBuffer util } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetReliabilityTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func BACnetReliabilityTaggedParseWithBuffer(ctx context.Context, readBuffer util // Create the instance return &_BACnetReliabilityTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetReliabilityTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_BACnetReliabilityTagged) Serialize() ([]byte, error) { func (m *_BACnetReliabilityTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetReliabilityTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetReliabilityTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetReliabilityTagged") } @@ -261,6 +266,7 @@ func (m *_BACnetReliabilityTagged) SerializeWithWriteBuffer(ctx context.Context, return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_BACnetReliabilityTagged) GetTagNumber() uint8 { func (m *_BACnetReliabilityTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_BACnetReliabilityTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetRestartReason.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetRestartReason.go index a3753d91ea6..90e4a3e8719 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetRestartReason.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetRestartReason.go @@ -34,24 +34,24 @@ type IBACnetRestartReason interface { utils.Serializable } -const ( - BACnetRestartReason_UNKNOWN BACnetRestartReason = 0 - BACnetRestartReason_COLDSTART BACnetRestartReason = 1 - BACnetRestartReason_WARMSTART BACnetRestartReason = 2 - BACnetRestartReason_DETECTED_POWER_LOST BACnetRestartReason = 3 - BACnetRestartReason_DETECTED_POWERED_OFF BACnetRestartReason = 4 - BACnetRestartReason_HARDWARE_WATCHDOG BACnetRestartReason = 5 - BACnetRestartReason_SOFTWARE_WATCHDOG BACnetRestartReason = 6 - BACnetRestartReason_SUSPENDED BACnetRestartReason = 7 - BACnetRestartReason_ACTIVATE_CHANGES BACnetRestartReason = 8 - BACnetRestartReason_VENDOR_PROPRIETARY_VALUE BACnetRestartReason = 0xFF +const( + BACnetRestartReason_UNKNOWN BACnetRestartReason = 0 + BACnetRestartReason_COLDSTART BACnetRestartReason = 1 + BACnetRestartReason_WARMSTART BACnetRestartReason = 2 + BACnetRestartReason_DETECTED_POWER_LOST BACnetRestartReason = 3 + BACnetRestartReason_DETECTED_POWERED_OFF BACnetRestartReason = 4 + BACnetRestartReason_HARDWARE_WATCHDOG BACnetRestartReason = 5 + BACnetRestartReason_SOFTWARE_WATCHDOG BACnetRestartReason = 6 + BACnetRestartReason_SUSPENDED BACnetRestartReason = 7 + BACnetRestartReason_ACTIVATE_CHANGES BACnetRestartReason = 8 + BACnetRestartReason_VENDOR_PROPRIETARY_VALUE BACnetRestartReason = 0XFF ) var BACnetRestartReasonValues []BACnetRestartReason func init() { _ = errors.New - BACnetRestartReasonValues = []BACnetRestartReason{ + BACnetRestartReasonValues = []BACnetRestartReason { BACnetRestartReason_UNKNOWN, BACnetRestartReason_COLDSTART, BACnetRestartReason_WARMSTART, @@ -67,26 +67,26 @@ func init() { func BACnetRestartReasonByValue(value uint8) (enum BACnetRestartReason, ok bool) { switch value { - case 0: - return BACnetRestartReason_UNKNOWN, true - case 0xFF: - return BACnetRestartReason_VENDOR_PROPRIETARY_VALUE, true - case 1: - return BACnetRestartReason_COLDSTART, true - case 2: - return BACnetRestartReason_WARMSTART, true - case 3: - return BACnetRestartReason_DETECTED_POWER_LOST, true - case 4: - return BACnetRestartReason_DETECTED_POWERED_OFF, true - case 5: - return BACnetRestartReason_HARDWARE_WATCHDOG, true - case 6: - return BACnetRestartReason_SOFTWARE_WATCHDOG, true - case 7: - return BACnetRestartReason_SUSPENDED, true - case 8: - return BACnetRestartReason_ACTIVATE_CHANGES, true + case 0: + return BACnetRestartReason_UNKNOWN, true + case 0XFF: + return BACnetRestartReason_VENDOR_PROPRIETARY_VALUE, true + case 1: + return BACnetRestartReason_COLDSTART, true + case 2: + return BACnetRestartReason_WARMSTART, true + case 3: + return BACnetRestartReason_DETECTED_POWER_LOST, true + case 4: + return BACnetRestartReason_DETECTED_POWERED_OFF, true + case 5: + return BACnetRestartReason_HARDWARE_WATCHDOG, true + case 6: + return BACnetRestartReason_SOFTWARE_WATCHDOG, true + case 7: + return BACnetRestartReason_SUSPENDED, true + case 8: + return BACnetRestartReason_ACTIVATE_CHANGES, true } return 0, false } @@ -117,13 +117,13 @@ func BACnetRestartReasonByName(value string) (enum BACnetRestartReason, ok bool) return 0, false } -func BACnetRestartReasonKnows(value uint8) bool { +func BACnetRestartReasonKnows(value uint8) bool { for _, typeValue := range BACnetRestartReasonValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetRestartReason(structType interface{}) BACnetRestartReason { @@ -203,3 +203,4 @@ func (e BACnetRestartReason) PLC4XEnumName() string { func (e BACnetRestartReason) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetRestartReasonTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetRestartReasonTagged.go index e02b37e27cc..cbe8f4e6651 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetRestartReasonTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetRestartReasonTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetRestartReasonTagged is the corresponding interface of BACnetRestartReasonTagged type BACnetRestartReasonTagged interface { @@ -50,15 +52,16 @@ type BACnetRestartReasonTaggedExactly interface { // _BACnetRestartReasonTagged is the data-structure of this message type _BACnetRestartReasonTagged struct { - Header BACnetTagHeader - Value BACnetRestartReason - ProprietaryValue uint32 + Header BACnetTagHeader + Value BACnetRestartReason + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_BACnetRestartReasonTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetRestartReasonTagged factory function for _BACnetRestartReasonTagged -func NewBACnetRestartReasonTagged(header BACnetTagHeader, value BACnetRestartReason, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_BACnetRestartReasonTagged { - return &_BACnetRestartReasonTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetRestartReasonTagged( header BACnetTagHeader , value BACnetRestartReason , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_BACnetRestartReasonTagged { +return &_BACnetRestartReasonTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetRestartReasonTagged(structType interface{}) BACnetRestartReasonTagged { - if casted, ok := structType.(BACnetRestartReasonTagged); ok { + if casted, ok := structType.(BACnetRestartReasonTagged); ok { return casted } if casted, ok := structType.(*BACnetRestartReasonTagged); ok { @@ -123,16 +127,17 @@ func (m *_BACnetRestartReasonTagged) GetLengthInBits(ctx context.Context) uint16 lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetRestartReasonTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetRestartReasonTaggedParseWithBuffer(ctx context.Context, readBuffer ut if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetRestartReasonTagged") } @@ -164,12 +169,12 @@ func BACnetRestartReasonTaggedParseWithBuffer(ctx context.Context, readBuffer ut } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func BACnetRestartReasonTaggedParseWithBuffer(ctx context.Context, readBuffer ut } var value BACnetRestartReason if _value != nil { - value = _value.(BACnetRestartReason) + value = _value.(BACnetRestartReason) } // Virtual field @@ -195,7 +200,7 @@ func BACnetRestartReasonTaggedParseWithBuffer(ctx context.Context, readBuffer ut } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetRestartReasonTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func BACnetRestartReasonTaggedParseWithBuffer(ctx context.Context, readBuffer ut // Create the instance return &_BACnetRestartReasonTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetRestartReasonTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_BACnetRestartReasonTagged) Serialize() ([]byte, error) { func (m *_BACnetRestartReasonTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetRestartReasonTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetRestartReasonTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetRestartReasonTagged") } @@ -261,6 +266,7 @@ func (m *_BACnetRestartReasonTagged) SerializeWithWriteBuffer(ctx context.Contex return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_BACnetRestartReasonTagged) GetTagNumber() uint8 { func (m *_BACnetRestartReasonTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_BACnetRestartReasonTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetResultFlags.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetResultFlags.go index 3b9b2b24d21..10c235cc65c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetResultFlags.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetResultFlags.go @@ -34,9 +34,9 @@ type IBACnetResultFlags interface { utils.Serializable } -const ( +const( BACnetResultFlags_FIRST_ITEM BACnetResultFlags = 0 - BACnetResultFlags_LAST_ITEM BACnetResultFlags = 1 + BACnetResultFlags_LAST_ITEM BACnetResultFlags = 1 BACnetResultFlags_MORE_ITEMS BACnetResultFlags = 2 ) @@ -44,7 +44,7 @@ var BACnetResultFlagsValues []BACnetResultFlags func init() { _ = errors.New - BACnetResultFlagsValues = []BACnetResultFlags{ + BACnetResultFlagsValues = []BACnetResultFlags { BACnetResultFlags_FIRST_ITEM, BACnetResultFlags_LAST_ITEM, BACnetResultFlags_MORE_ITEMS, @@ -53,12 +53,12 @@ func init() { func BACnetResultFlagsByValue(value uint8) (enum BACnetResultFlags, ok bool) { switch value { - case 0: - return BACnetResultFlags_FIRST_ITEM, true - case 1: - return BACnetResultFlags_LAST_ITEM, true - case 2: - return BACnetResultFlags_MORE_ITEMS, true + case 0: + return BACnetResultFlags_FIRST_ITEM, true + case 1: + return BACnetResultFlags_LAST_ITEM, true + case 2: + return BACnetResultFlags_MORE_ITEMS, true } return 0, false } @@ -75,13 +75,13 @@ func BACnetResultFlagsByName(value string) (enum BACnetResultFlags, ok bool) { return 0, false } -func BACnetResultFlagsKnows(value uint8) bool { +func BACnetResultFlagsKnows(value uint8) bool { for _, typeValue := range BACnetResultFlagsValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetResultFlags(structType interface{}) BACnetResultFlags { @@ -147,3 +147,4 @@ func (e BACnetResultFlags) PLC4XEnumName() string { func (e BACnetResultFlags) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetResultFlagsTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetResultFlagsTagged.go index 07c3df9ecda..885a031b4b2 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetResultFlagsTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetResultFlagsTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetResultFlagsTagged is the corresponding interface of BACnetResultFlagsTagged type BACnetResultFlagsTagged interface { @@ -52,14 +54,15 @@ type BACnetResultFlagsTaggedExactly interface { // _BACnetResultFlagsTagged is the data-structure of this message type _BACnetResultFlagsTagged struct { - Header BACnetTagHeader - Payload BACnetTagPayloadBitString + Header BACnetTagHeader + Payload BACnetTagPayloadBitString // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -85,19 +88,19 @@ func (m *_BACnetResultFlagsTagged) GetPayload() BACnetTagPayloadBitString { func (m *_BACnetResultFlagsTagged) GetFirstItem() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (0))), func() interface{} { return bool(m.GetPayload().GetData()[0]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((0)))), func() interface{} {return bool(m.GetPayload().GetData()[0])}, func() interface{} {return bool(bool(false))}).(bool)) } func (m *_BACnetResultFlagsTagged) GetLastItem() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (1))), func() interface{} { return bool(m.GetPayload().GetData()[1]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((1)))), func() interface{} {return bool(m.GetPayload().GetData()[1])}, func() interface{} {return bool(bool(false))}).(bool)) } func (m *_BACnetResultFlagsTagged) GetMoreItems() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (2))), func() interface{} { return bool(m.GetPayload().GetData()[2]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((2)))), func() interface{} {return bool(m.GetPayload().GetData()[2])}, func() interface{} {return bool(bool(false))}).(bool)) } /////////////////////// @@ -105,14 +108,15 @@ func (m *_BACnetResultFlagsTagged) GetMoreItems() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetResultFlagsTagged factory function for _BACnetResultFlagsTagged -func NewBACnetResultFlagsTagged(header BACnetTagHeader, payload BACnetTagPayloadBitString, tagNumber uint8, tagClass TagClass) *_BACnetResultFlagsTagged { - return &_BACnetResultFlagsTagged{Header: header, Payload: payload, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetResultFlagsTagged( header BACnetTagHeader , payload BACnetTagPayloadBitString , tagNumber uint8 , tagClass TagClass ) *_BACnetResultFlagsTagged { +return &_BACnetResultFlagsTagged{ Header: header , Payload: payload , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetResultFlagsTagged(structType interface{}) BACnetResultFlagsTagged { - if casted, ok := structType.(BACnetResultFlagsTagged); ok { + if casted, ok := structType.(BACnetResultFlagsTagged); ok { return casted } if casted, ok := structType.(*BACnetResultFlagsTagged); ok { @@ -143,6 +147,7 @@ func (m *_BACnetResultFlagsTagged) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetResultFlagsTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -164,7 +169,7 @@ func BACnetResultFlagsTaggedParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetResultFlagsTagged") } @@ -174,12 +179,12 @@ func BACnetResultFlagsTaggedParseWithBuffer(ctx context.Context, readBuffer util } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -187,7 +192,7 @@ func BACnetResultFlagsTaggedParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("payload"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for payload") } - _payload, _payloadErr := BACnetTagPayloadBitStringParseWithBuffer(ctx, readBuffer, uint32(header.GetActualLength())) +_payload, _payloadErr := BACnetTagPayloadBitStringParseWithBuffer(ctx, readBuffer , uint32( header.GetActualLength() ) ) if _payloadErr != nil { return nil, errors.Wrap(_payloadErr, "Error parsing 'payload' field of BACnetResultFlagsTagged") } @@ -197,17 +202,17 @@ func BACnetResultFlagsTaggedParseWithBuffer(ctx context.Context, readBuffer util } // Virtual field - _firstItem := utils.InlineIf((bool((len(payload.GetData())) > (0))), func() interface{} { return bool(payload.GetData()[0]) }, func() interface{} { return bool(bool(false)) }).(bool) + _firstItem := utils.InlineIf((bool(((len(payload.GetData()))) > ((0)))), func() interface{} {return bool(payload.GetData()[0])}, func() interface{} {return bool(bool(false))}).(bool) firstItem := bool(_firstItem) _ = firstItem // Virtual field - _lastItem := utils.InlineIf((bool((len(payload.GetData())) > (1))), func() interface{} { return bool(payload.GetData()[1]) }, func() interface{} { return bool(bool(false)) }).(bool) + _lastItem := utils.InlineIf((bool(((len(payload.GetData()))) > ((1)))), func() interface{} {return bool(payload.GetData()[1])}, func() interface{} {return bool(bool(false))}).(bool) lastItem := bool(_lastItem) _ = lastItem // Virtual field - _moreItems := utils.InlineIf((bool((len(payload.GetData())) > (2))), func() interface{} { return bool(payload.GetData()[2]) }, func() interface{} { return bool(bool(false)) }).(bool) + _moreItems := utils.InlineIf((bool(((len(payload.GetData()))) > ((2)))), func() interface{} {return bool(payload.GetData()[2])}, func() interface{} {return bool(bool(false))}).(bool) moreItems := bool(_moreItems) _ = moreItems @@ -217,11 +222,11 @@ func BACnetResultFlagsTaggedParseWithBuffer(ctx context.Context, readBuffer util // Create the instance return &_BACnetResultFlagsTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Payload: payload, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Payload: payload, + }, nil } func (m *_BACnetResultFlagsTagged) Serialize() ([]byte, error) { @@ -235,7 +240,7 @@ func (m *_BACnetResultFlagsTagged) Serialize() ([]byte, error) { func (m *_BACnetResultFlagsTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetResultFlagsTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetResultFlagsTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetResultFlagsTagged") } @@ -281,6 +286,7 @@ func (m *_BACnetResultFlagsTagged) SerializeWithWriteBuffer(ctx context.Context, return nil } + //// // Arguments Getter @@ -290,7 +296,6 @@ func (m *_BACnetResultFlagsTagged) GetTagNumber() uint8 { func (m *_BACnetResultFlagsTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -308,3 +313,6 @@ func (m *_BACnetResultFlagsTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetRouterEntry.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetRouterEntry.go index fe78a6869f7..5373f837e70 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetRouterEntry.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetRouterEntry.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetRouterEntry is the corresponding interface of BACnetRouterEntry type BACnetRouterEntry interface { @@ -51,12 +53,13 @@ type BACnetRouterEntryExactly interface { // _BACnetRouterEntry is the data-structure of this message type _BACnetRouterEntry struct { - NetworkNumber BACnetContextTagUnsignedInteger - MacAddress BACnetContextTagOctetString - Status BACnetRouterEntryStatusTagged - PerformanceIndex BACnetContextTagOctetString + NetworkNumber BACnetContextTagUnsignedInteger + MacAddress BACnetContextTagOctetString + Status BACnetRouterEntryStatusTagged + PerformanceIndex BACnetContextTagOctetString } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,14 +86,15 @@ func (m *_BACnetRouterEntry) GetPerformanceIndex() BACnetContextTagOctetString { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetRouterEntry factory function for _BACnetRouterEntry -func NewBACnetRouterEntry(networkNumber BACnetContextTagUnsignedInteger, macAddress BACnetContextTagOctetString, status BACnetRouterEntryStatusTagged, performanceIndex BACnetContextTagOctetString) *_BACnetRouterEntry { - return &_BACnetRouterEntry{NetworkNumber: networkNumber, MacAddress: macAddress, Status: status, PerformanceIndex: performanceIndex} +func NewBACnetRouterEntry( networkNumber BACnetContextTagUnsignedInteger , macAddress BACnetContextTagOctetString , status BACnetRouterEntryStatusTagged , performanceIndex BACnetContextTagOctetString ) *_BACnetRouterEntry { +return &_BACnetRouterEntry{ NetworkNumber: networkNumber , MacAddress: macAddress , Status: status , PerformanceIndex: performanceIndex } } // Deprecated: use the interface for direct cast func CastBACnetRouterEntry(structType interface{}) BACnetRouterEntry { - if casted, ok := structType.(BACnetRouterEntry); ok { + if casted, ok := structType.(BACnetRouterEntry); ok { return casted } if casted, ok := structType.(*BACnetRouterEntry); ok { @@ -123,6 +127,7 @@ func (m *_BACnetRouterEntry) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetRouterEntry) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -144,7 +149,7 @@ func BACnetRouterEntryParseWithBuffer(ctx context.Context, readBuffer utils.Read if pullErr := readBuffer.PullContext("networkNumber"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for networkNumber") } - _networkNumber, _networkNumberErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_networkNumber, _networkNumberErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _networkNumberErr != nil { return nil, errors.Wrap(_networkNumberErr, "Error parsing 'networkNumber' field of BACnetRouterEntry") } @@ -157,7 +162,7 @@ func BACnetRouterEntryParseWithBuffer(ctx context.Context, readBuffer utils.Read if pullErr := readBuffer.PullContext("macAddress"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for macAddress") } - _macAddress, _macAddressErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_OCTET_STRING)) +_macAddress, _macAddressErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_OCTET_STRING ) ) if _macAddressErr != nil { return nil, errors.Wrap(_macAddressErr, "Error parsing 'macAddress' field of BACnetRouterEntry") } @@ -170,7 +175,7 @@ func BACnetRouterEntryParseWithBuffer(ctx context.Context, readBuffer utils.Read if pullErr := readBuffer.PullContext("status"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for status") } - _status, _statusErr := BACnetRouterEntryStatusTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_status, _statusErr := BACnetRouterEntryStatusTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _statusErr != nil { return nil, errors.Wrap(_statusErr, "Error parsing 'status' field of BACnetRouterEntry") } @@ -181,12 +186,12 @@ func BACnetRouterEntryParseWithBuffer(ctx context.Context, readBuffer utils.Read // Optional Field (performanceIndex) (Can be skipped, if a given expression evaluates to false) var performanceIndex BACnetContextTagOctetString = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("performanceIndex"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for performanceIndex") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(3), BACnetDataType_OCTET_STRING) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(3) , BACnetDataType_OCTET_STRING ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -207,11 +212,11 @@ func BACnetRouterEntryParseWithBuffer(ctx context.Context, readBuffer utils.Read // Create the instance return &_BACnetRouterEntry{ - NetworkNumber: networkNumber, - MacAddress: macAddress, - Status: status, - PerformanceIndex: performanceIndex, - }, nil + NetworkNumber: networkNumber, + MacAddress: macAddress, + Status: status, + PerformanceIndex: performanceIndex, + }, nil } func (m *_BACnetRouterEntry) Serialize() ([]byte, error) { @@ -225,7 +230,7 @@ func (m *_BACnetRouterEntry) Serialize() ([]byte, error) { func (m *_BACnetRouterEntry) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetRouterEntry"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetRouterEntry"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetRouterEntry") } @@ -287,6 +292,7 @@ func (m *_BACnetRouterEntry) SerializeWithWriteBuffer(ctx context.Context, write return nil } + func (m *_BACnetRouterEntry) isBACnetRouterEntry() bool { return true } @@ -301,3 +307,6 @@ func (m *_BACnetRouterEntry) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetRouterEntryStatus.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetRouterEntryStatus.go index 89dfb938a69..6dc0c41dd27 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetRouterEntryStatus.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetRouterEntryStatus.go @@ -34,9 +34,9 @@ type IBACnetRouterEntryStatus interface { utils.Serializable } -const ( - BACnetRouterEntryStatus_AVAILABLE BACnetRouterEntryStatus = 0 - BACnetRouterEntryStatus_BUSY BACnetRouterEntryStatus = 1 +const( + BACnetRouterEntryStatus_AVAILABLE BACnetRouterEntryStatus = 0 + BACnetRouterEntryStatus_BUSY BACnetRouterEntryStatus = 1 BACnetRouterEntryStatus_DISCONNECTED BACnetRouterEntryStatus = 2 ) @@ -44,7 +44,7 @@ var BACnetRouterEntryStatusValues []BACnetRouterEntryStatus func init() { _ = errors.New - BACnetRouterEntryStatusValues = []BACnetRouterEntryStatus{ + BACnetRouterEntryStatusValues = []BACnetRouterEntryStatus { BACnetRouterEntryStatus_AVAILABLE, BACnetRouterEntryStatus_BUSY, BACnetRouterEntryStatus_DISCONNECTED, @@ -53,12 +53,12 @@ func init() { func BACnetRouterEntryStatusByValue(value uint8) (enum BACnetRouterEntryStatus, ok bool) { switch value { - case 0: - return BACnetRouterEntryStatus_AVAILABLE, true - case 1: - return BACnetRouterEntryStatus_BUSY, true - case 2: - return BACnetRouterEntryStatus_DISCONNECTED, true + case 0: + return BACnetRouterEntryStatus_AVAILABLE, true + case 1: + return BACnetRouterEntryStatus_BUSY, true + case 2: + return BACnetRouterEntryStatus_DISCONNECTED, true } return 0, false } @@ -75,13 +75,13 @@ func BACnetRouterEntryStatusByName(value string) (enum BACnetRouterEntryStatus, return 0, false } -func BACnetRouterEntryStatusKnows(value uint8) bool { +func BACnetRouterEntryStatusKnows(value uint8) bool { for _, typeValue := range BACnetRouterEntryStatusValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetRouterEntryStatus(structType interface{}) BACnetRouterEntryStatus { @@ -147,3 +147,4 @@ func (e BACnetRouterEntryStatus) PLC4XEnumName() string { func (e BACnetRouterEntryStatus) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetRouterEntryStatusTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetRouterEntryStatusTagged.go index 9df71fb46a5..b37a943b32f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetRouterEntryStatusTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetRouterEntryStatusTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetRouterEntryStatusTagged is the corresponding interface of BACnetRouterEntryStatusTagged type BACnetRouterEntryStatusTagged interface { @@ -46,14 +48,15 @@ type BACnetRouterEntryStatusTaggedExactly interface { // _BACnetRouterEntryStatusTagged is the data-structure of this message type _BACnetRouterEntryStatusTagged struct { - Header BACnetTagHeader - Value BACnetRouterEntryStatus + Header BACnetTagHeader + Value BACnetRouterEntryStatus // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_BACnetRouterEntryStatusTagged) GetValue() BACnetRouterEntryStatus { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetRouterEntryStatusTagged factory function for _BACnetRouterEntryStatusTagged -func NewBACnetRouterEntryStatusTagged(header BACnetTagHeader, value BACnetRouterEntryStatus, tagNumber uint8, tagClass TagClass) *_BACnetRouterEntryStatusTagged { - return &_BACnetRouterEntryStatusTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetRouterEntryStatusTagged( header BACnetTagHeader , value BACnetRouterEntryStatus , tagNumber uint8 , tagClass TagClass ) *_BACnetRouterEntryStatusTagged { +return &_BACnetRouterEntryStatusTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetRouterEntryStatusTagged(structType interface{}) BACnetRouterEntryStatusTagged { - if casted, ok := structType.(BACnetRouterEntryStatusTagged); ok { + if casted, ok := structType.(BACnetRouterEntryStatusTagged); ok { return casted } if casted, ok := structType.(*BACnetRouterEntryStatusTagged); ok { @@ -104,6 +108,7 @@ func (m *_BACnetRouterEntryStatusTagged) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetRouterEntryStatusTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func BACnetRouterEntryStatusTaggedParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetRouterEntryStatusTagged") } @@ -135,12 +140,12 @@ func BACnetRouterEntryStatusTaggedParseWithBuffer(ctx context.Context, readBuffe } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func BACnetRouterEntryStatusTaggedParseWithBuffer(ctx context.Context, readBuffe } var value BACnetRouterEntryStatus if _value != nil { - value = _value.(BACnetRouterEntryStatus) + value = _value.(BACnetRouterEntryStatus) } if closeErr := readBuffer.CloseContext("BACnetRouterEntryStatusTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func BACnetRouterEntryStatusTaggedParseWithBuffer(ctx context.Context, readBuffe // Create the instance return &_BACnetRouterEntryStatusTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_BACnetRouterEntryStatusTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_BACnetRouterEntryStatusTagged) Serialize() ([]byte, error) { func (m *_BACnetRouterEntryStatusTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetRouterEntryStatusTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetRouterEntryStatusTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetRouterEntryStatusTagged") } @@ -206,6 +211,7 @@ func (m *_BACnetRouterEntryStatusTagged) SerializeWithWriteBuffer(ctx context.Co return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_BACnetRouterEntryStatusTagged) GetTagNumber() uint8 { func (m *_BACnetRouterEntryStatusTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_BACnetRouterEntryStatusTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetScale.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetScale.go index ecaecaac797..9b344a63cd0 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetScale.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetScale.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetScale is the corresponding interface of BACnetScale type BACnetScale interface { @@ -47,7 +49,7 @@ type BACnetScaleExactly interface { // _BACnetScale is the data-structure of this message type _BACnetScale struct { _BACnetScaleChildRequirements - PeekedTagHeader BACnetTagHeader + PeekedTagHeader BACnetTagHeader } type _BACnetScaleChildRequirements interface { @@ -55,6 +57,7 @@ type _BACnetScaleChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type BACnetScaleParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetScale, serializeChildFunction func() error) error GetTypeName() string @@ -62,13 +65,12 @@ type BACnetScaleParent interface { type BACnetScaleChild interface { utils.Serializable - InitializeParent(parent BACnetScale, peekedTagHeader BACnetTagHeader) +InitializeParent(parent BACnetScale , peekedTagHeader BACnetTagHeader ) GetParent() *BACnetScale GetTypeName() string BACnetScale } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,14 +100,15 @@ func (m *_BACnetScale) GetPeekedTagNumber() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetScale factory function for _BACnetScale -func NewBACnetScale(peekedTagHeader BACnetTagHeader) *_BACnetScale { - return &_BACnetScale{PeekedTagHeader: peekedTagHeader} +func NewBACnetScale( peekedTagHeader BACnetTagHeader ) *_BACnetScale { +return &_BACnetScale{ PeekedTagHeader: peekedTagHeader } } // Deprecated: use the interface for direct cast func CastBACnetScale(structType interface{}) BACnetScale { - if casted, ok := structType.(BACnetScale); ok { + if casted, ok := structType.(BACnetScale); ok { return casted } if casted, ok := structType.(*BACnetScale); ok { @@ -118,6 +121,7 @@ func (m *_BACnetScale) GetTypeName() string { return "BACnetScale" } + func (m *_BACnetScale) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -143,13 +147,13 @@ func BACnetScaleParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer currentPos := positionAware.GetPos() _ = currentPos - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Virtual field _peekedTagNumber := peekedTagHeader.GetActualTagNumber() @@ -159,17 +163,17 @@ func BACnetScaleParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetScaleChildSerializeRequirement interface { BACnetScale - InitializeParent(BACnetScale, BACnetTagHeader) + InitializeParent(BACnetScale, BACnetTagHeader) GetParent() BACnetScale } var _childTemp interface{} var _child BACnetScaleChildSerializeRequirement var typeSwitchError error switch { - case peekedTagNumber == uint8(0): // BACnetScaleFloatScale - _childTemp, typeSwitchError = BACnetScaleFloatScaleParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(1): // BACnetScaleIntegerScale - _childTemp, typeSwitchError = BACnetScaleIntegerScaleParseWithBuffer(ctx, readBuffer) +case peekedTagNumber == uint8(0) : // BACnetScaleFloatScale + _childTemp, typeSwitchError = BACnetScaleFloatScaleParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(1) : // BACnetScaleIntegerScale + _childTemp, typeSwitchError = BACnetScaleIntegerScaleParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedTagNumber=%v]", peekedTagNumber) } @@ -183,7 +187,7 @@ func BACnetScaleParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer } // Finish initializing - _child.InitializeParent(_child, peekedTagHeader) +_child.InitializeParent(_child , peekedTagHeader ) return _child, nil } @@ -193,7 +197,7 @@ func (pm *_BACnetScale) SerializeParent(ctx context.Context, writeBuffer utils.W _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetScale"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetScale"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetScale") } // Virtual field @@ -212,6 +216,7 @@ func (pm *_BACnetScale) SerializeParent(ctx context.Context, writeBuffer utils.W return nil } + func (m *_BACnetScale) isBACnetScale() bool { return true } @@ -226,3 +231,6 @@ func (m *_BACnetScale) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetScaleFloatScale.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetScaleFloatScale.go index fd8ab02d8d8..03765cb2bb6 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetScaleFloatScale.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetScaleFloatScale.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetScaleFloatScale is the corresponding interface of BACnetScaleFloatScale type BACnetScaleFloatScale interface { @@ -46,9 +48,11 @@ type BACnetScaleFloatScaleExactly interface { // _BACnetScaleFloatScale is the data-structure of this message type _BACnetScaleFloatScale struct { *_BACnetScale - FloatScale BACnetContextTagReal + FloatScale BACnetContextTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetScaleFloatScale struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetScaleFloatScale) InitializeParent(parent BACnetScale, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetScaleFloatScale) InitializeParent(parent BACnetScale , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetScaleFloatScale) GetParent() BACnetScale { +func (m *_BACnetScaleFloatScale) GetParent() BACnetScale { return m._BACnetScale } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetScaleFloatScale) GetFloatScale() BACnetContextTagReal { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetScaleFloatScale factory function for _BACnetScaleFloatScale -func NewBACnetScaleFloatScale(floatScale BACnetContextTagReal, peekedTagHeader BACnetTagHeader) *_BACnetScaleFloatScale { +func NewBACnetScaleFloatScale( floatScale BACnetContextTagReal , peekedTagHeader BACnetTagHeader ) *_BACnetScaleFloatScale { _result := &_BACnetScaleFloatScale{ - FloatScale: floatScale, - _BACnetScale: NewBACnetScale(peekedTagHeader), + FloatScale: floatScale, + _BACnetScale: NewBACnetScale(peekedTagHeader), } _result._BACnetScale._BACnetScaleChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetScaleFloatScale(floatScale BACnetContextTagReal, peekedTagHeader B // Deprecated: use the interface for direct cast func CastBACnetScaleFloatScale(structType interface{}) BACnetScaleFloatScale { - if casted, ok := structType.(BACnetScaleFloatScale); ok { + if casted, ok := structType.(BACnetScaleFloatScale); ok { return casted } if casted, ok := structType.(*BACnetScaleFloatScale); ok { @@ -115,6 +118,7 @@ func (m *_BACnetScaleFloatScale) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetScaleFloatScale) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetScaleFloatScaleParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("floatScale"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for floatScale") } - _floatScale, _floatScaleErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_REAL)) +_floatScale, _floatScaleErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_REAL ) ) if _floatScaleErr != nil { return nil, errors.Wrap(_floatScaleErr, "Error parsing 'floatScale' field of BACnetScaleFloatScale") } @@ -151,8 +155,9 @@ func BACnetScaleFloatScaleParseWithBuffer(ctx context.Context, readBuffer utils. // Create a partially initialized instance _child := &_BACnetScaleFloatScale{ - _BACnetScale: &_BACnetScale{}, - FloatScale: floatScale, + _BACnetScale: &_BACnetScale{ + }, + FloatScale: floatScale, } _child._BACnetScale._BACnetScaleChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetScaleFloatScale) SerializeWithWriteBuffer(ctx context.Context, w return errors.Wrap(pushErr, "Error pushing for BACnetScaleFloatScale") } - // Simple Field (floatScale) - if pushErr := writeBuffer.PushContext("floatScale"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for floatScale") - } - _floatScaleErr := writeBuffer.WriteSerializable(ctx, m.GetFloatScale()) - if popErr := writeBuffer.PopContext("floatScale"); popErr != nil { - return errors.Wrap(popErr, "Error popping for floatScale") - } - if _floatScaleErr != nil { - return errors.Wrap(_floatScaleErr, "Error serializing 'floatScale' field") - } + // Simple Field (floatScale) + if pushErr := writeBuffer.PushContext("floatScale"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for floatScale") + } + _floatScaleErr := writeBuffer.WriteSerializable(ctx, m.GetFloatScale()) + if popErr := writeBuffer.PopContext("floatScale"); popErr != nil { + return errors.Wrap(popErr, "Error popping for floatScale") + } + if _floatScaleErr != nil { + return errors.Wrap(_floatScaleErr, "Error serializing 'floatScale' field") + } if popErr := writeBuffer.PopContext("BACnetScaleFloatScale"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetScaleFloatScale") @@ -194,6 +199,7 @@ func (m *_BACnetScaleFloatScale) SerializeWithWriteBuffer(ctx context.Context, w return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetScaleFloatScale) isBACnetScaleFloatScale() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetScaleFloatScale) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetScaleIntegerScale.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetScaleIntegerScale.go index f1ae7f2ba19..b34cbc42c32 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetScaleIntegerScale.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetScaleIntegerScale.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetScaleIntegerScale is the corresponding interface of BACnetScaleIntegerScale type BACnetScaleIntegerScale interface { @@ -46,9 +48,11 @@ type BACnetScaleIntegerScaleExactly interface { // _BACnetScaleIntegerScale is the data-structure of this message type _BACnetScaleIntegerScale struct { *_BACnetScale - IntegerScale BACnetContextTagSignedInteger + IntegerScale BACnetContextTagSignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetScaleIntegerScale struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetScaleIntegerScale) InitializeParent(parent BACnetScale, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetScaleIntegerScale) InitializeParent(parent BACnetScale , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetScaleIntegerScale) GetParent() BACnetScale { +func (m *_BACnetScaleIntegerScale) GetParent() BACnetScale { return m._BACnetScale } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetScaleIntegerScale) GetIntegerScale() BACnetContextTagSignedInteg /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetScaleIntegerScale factory function for _BACnetScaleIntegerScale -func NewBACnetScaleIntegerScale(integerScale BACnetContextTagSignedInteger, peekedTagHeader BACnetTagHeader) *_BACnetScaleIntegerScale { +func NewBACnetScaleIntegerScale( integerScale BACnetContextTagSignedInteger , peekedTagHeader BACnetTagHeader ) *_BACnetScaleIntegerScale { _result := &_BACnetScaleIntegerScale{ IntegerScale: integerScale, - _BACnetScale: NewBACnetScale(peekedTagHeader), + _BACnetScale: NewBACnetScale(peekedTagHeader), } _result._BACnetScale._BACnetScaleChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetScaleIntegerScale(integerScale BACnetContextTagSignedInteger, peek // Deprecated: use the interface for direct cast func CastBACnetScaleIntegerScale(structType interface{}) BACnetScaleIntegerScale { - if casted, ok := structType.(BACnetScaleIntegerScale); ok { + if casted, ok := structType.(BACnetScaleIntegerScale); ok { return casted } if casted, ok := structType.(*BACnetScaleIntegerScale); ok { @@ -115,6 +118,7 @@ func (m *_BACnetScaleIntegerScale) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetScaleIntegerScale) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetScaleIntegerScaleParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("integerScale"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for integerScale") } - _integerScale, _integerScaleErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_SIGNED_INTEGER)) +_integerScale, _integerScaleErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_SIGNED_INTEGER ) ) if _integerScaleErr != nil { return nil, errors.Wrap(_integerScaleErr, "Error parsing 'integerScale' field of BACnetScaleIntegerScale") } @@ -151,7 +155,8 @@ func BACnetScaleIntegerScaleParseWithBuffer(ctx context.Context, readBuffer util // Create a partially initialized instance _child := &_BACnetScaleIntegerScale{ - _BACnetScale: &_BACnetScale{}, + _BACnetScale: &_BACnetScale{ + }, IntegerScale: integerScale, } _child._BACnetScale._BACnetScaleChildRequirements = _child @@ -174,17 +179,17 @@ func (m *_BACnetScaleIntegerScale) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for BACnetScaleIntegerScale") } - // Simple Field (integerScale) - if pushErr := writeBuffer.PushContext("integerScale"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for integerScale") - } - _integerScaleErr := writeBuffer.WriteSerializable(ctx, m.GetIntegerScale()) - if popErr := writeBuffer.PopContext("integerScale"); popErr != nil { - return errors.Wrap(popErr, "Error popping for integerScale") - } - if _integerScaleErr != nil { - return errors.Wrap(_integerScaleErr, "Error serializing 'integerScale' field") - } + // Simple Field (integerScale) + if pushErr := writeBuffer.PushContext("integerScale"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for integerScale") + } + _integerScaleErr := writeBuffer.WriteSerializable(ctx, m.GetIntegerScale()) + if popErr := writeBuffer.PopContext("integerScale"); popErr != nil { + return errors.Wrap(popErr, "Error popping for integerScale") + } + if _integerScaleErr != nil { + return errors.Wrap(_integerScaleErr, "Error serializing 'integerScale' field") + } if popErr := writeBuffer.PopContext("BACnetScaleIntegerScale"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetScaleIntegerScale") @@ -194,6 +199,7 @@ func (m *_BACnetScaleIntegerScale) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetScaleIntegerScale) isBACnetScaleIntegerScale() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetScaleIntegerScale) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetSecurityKeySet.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetSecurityKeySet.go index e7e7dd99962..88d1c1bfe87 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetSecurityKeySet.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetSecurityKeySet.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetSecurityKeySet is the corresponding interface of BACnetSecurityKeySet type BACnetSecurityKeySet interface { @@ -50,12 +52,13 @@ type BACnetSecurityKeySetExactly interface { // _BACnetSecurityKeySet is the data-structure of this message type _BACnetSecurityKeySet struct { - KeyRevision BACnetContextTagUnsignedInteger - ActivationTime BACnetDateTimeEnclosed - ExpirationTime BACnetDateTimeEnclosed - KeyIds BACnetSecurityKeySetKeyIds + KeyRevision BACnetContextTagUnsignedInteger + ActivationTime BACnetDateTimeEnclosed + ExpirationTime BACnetDateTimeEnclosed + KeyIds BACnetSecurityKeySetKeyIds } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -82,14 +85,15 @@ func (m *_BACnetSecurityKeySet) GetKeyIds() BACnetSecurityKeySetKeyIds { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetSecurityKeySet factory function for _BACnetSecurityKeySet -func NewBACnetSecurityKeySet(keyRevision BACnetContextTagUnsignedInteger, activationTime BACnetDateTimeEnclosed, expirationTime BACnetDateTimeEnclosed, keyIds BACnetSecurityKeySetKeyIds) *_BACnetSecurityKeySet { - return &_BACnetSecurityKeySet{KeyRevision: keyRevision, ActivationTime: activationTime, ExpirationTime: expirationTime, KeyIds: keyIds} +func NewBACnetSecurityKeySet( keyRevision BACnetContextTagUnsignedInteger , activationTime BACnetDateTimeEnclosed , expirationTime BACnetDateTimeEnclosed , keyIds BACnetSecurityKeySetKeyIds ) *_BACnetSecurityKeySet { +return &_BACnetSecurityKeySet{ KeyRevision: keyRevision , ActivationTime: activationTime , ExpirationTime: expirationTime , KeyIds: keyIds } } // Deprecated: use the interface for direct cast func CastBACnetSecurityKeySet(structType interface{}) BACnetSecurityKeySet { - if casted, ok := structType.(BACnetSecurityKeySet); ok { + if casted, ok := structType.(BACnetSecurityKeySet); ok { return casted } if casted, ok := structType.(*BACnetSecurityKeySet); ok { @@ -120,6 +124,7 @@ func (m *_BACnetSecurityKeySet) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetSecurityKeySet) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -141,7 +146,7 @@ func BACnetSecurityKeySetParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("keyRevision"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for keyRevision") } - _keyRevision, _keyRevisionErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_keyRevision, _keyRevisionErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _keyRevisionErr != nil { return nil, errors.Wrap(_keyRevisionErr, "Error parsing 'keyRevision' field of BACnetSecurityKeySet") } @@ -154,7 +159,7 @@ func BACnetSecurityKeySetParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("activationTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for activationTime") } - _activationTime, _activationTimeErr := BACnetDateTimeEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(1))) +_activationTime, _activationTimeErr := BACnetDateTimeEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) ) if _activationTimeErr != nil { return nil, errors.Wrap(_activationTimeErr, "Error parsing 'activationTime' field of BACnetSecurityKeySet") } @@ -167,7 +172,7 @@ func BACnetSecurityKeySetParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("expirationTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for expirationTime") } - _expirationTime, _expirationTimeErr := BACnetDateTimeEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(2))) +_expirationTime, _expirationTimeErr := BACnetDateTimeEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) ) if _expirationTimeErr != nil { return nil, errors.Wrap(_expirationTimeErr, "Error parsing 'expirationTime' field of BACnetSecurityKeySet") } @@ -180,7 +185,7 @@ func BACnetSecurityKeySetParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("keyIds"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for keyIds") } - _keyIds, _keyIdsErr := BACnetSecurityKeySetKeyIdsParseWithBuffer(ctx, readBuffer, uint8(uint8(3))) +_keyIds, _keyIdsErr := BACnetSecurityKeySetKeyIdsParseWithBuffer(ctx, readBuffer , uint8( uint8(3) ) ) if _keyIdsErr != nil { return nil, errors.Wrap(_keyIdsErr, "Error parsing 'keyIds' field of BACnetSecurityKeySet") } @@ -195,11 +200,11 @@ func BACnetSecurityKeySetParseWithBuffer(ctx context.Context, readBuffer utils.R // Create the instance return &_BACnetSecurityKeySet{ - KeyRevision: keyRevision, - ActivationTime: activationTime, - ExpirationTime: expirationTime, - KeyIds: keyIds, - }, nil + KeyRevision: keyRevision, + ActivationTime: activationTime, + ExpirationTime: expirationTime, + KeyIds: keyIds, + }, nil } func (m *_BACnetSecurityKeySet) Serialize() ([]byte, error) { @@ -213,7 +218,7 @@ func (m *_BACnetSecurityKeySet) Serialize() ([]byte, error) { func (m *_BACnetSecurityKeySet) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetSecurityKeySet"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetSecurityKeySet"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetSecurityKeySet") } @@ -271,6 +276,7 @@ func (m *_BACnetSecurityKeySet) SerializeWithWriteBuffer(ctx context.Context, wr return nil } + func (m *_BACnetSecurityKeySet) isBACnetSecurityKeySet() bool { return true } @@ -285,3 +291,6 @@ func (m *_BACnetSecurityKeySet) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetSecurityKeySetKeyIds.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetSecurityKeySetKeyIds.go index 539d6e2466e..f807c5eca7b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetSecurityKeySetKeyIds.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetSecurityKeySetKeyIds.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetSecurityKeySetKeyIds is the corresponding interface of BACnetSecurityKeySetKeyIds type BACnetSecurityKeySetKeyIds interface { @@ -49,14 +51,15 @@ type BACnetSecurityKeySetKeyIdsExactly interface { // _BACnetSecurityKeySetKeyIds is the data-structure of this message type _BACnetSecurityKeySetKeyIds struct { - OpeningTag BACnetOpeningTag - KeyIds []BACnetKeyIdentifier - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + KeyIds []BACnetKeyIdentifier + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -79,14 +82,15 @@ func (m *_BACnetSecurityKeySetKeyIds) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetSecurityKeySetKeyIds factory function for _BACnetSecurityKeySetKeyIds -func NewBACnetSecurityKeySetKeyIds(openingTag BACnetOpeningTag, keyIds []BACnetKeyIdentifier, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetSecurityKeySetKeyIds { - return &_BACnetSecurityKeySetKeyIds{OpeningTag: openingTag, KeyIds: keyIds, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetSecurityKeySetKeyIds( openingTag BACnetOpeningTag , keyIds []BACnetKeyIdentifier , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetSecurityKeySetKeyIds { +return &_BACnetSecurityKeySetKeyIds{ OpeningTag: openingTag , KeyIds: keyIds , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetSecurityKeySetKeyIds(structType interface{}) BACnetSecurityKeySetKeyIds { - if casted, ok := structType.(BACnetSecurityKeySetKeyIds); ok { + if casted, ok := structType.(BACnetSecurityKeySetKeyIds); ok { return casted } if casted, ok := structType.(*BACnetSecurityKeySetKeyIds); ok { @@ -118,6 +122,7 @@ func (m *_BACnetSecurityKeySetKeyIds) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_BACnetSecurityKeySetKeyIds) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +144,7 @@ func BACnetSecurityKeySetKeyIdsParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetSecurityKeySetKeyIds") } @@ -155,8 +160,8 @@ func BACnetSecurityKeySetKeyIdsParseWithBuffer(ctx context.Context, readBuffer u // Terminated array var keyIds []BACnetKeyIdentifier { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetKeyIdentifierParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetKeyIdentifierParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'keyIds' field of BACnetSecurityKeySetKeyIds") } @@ -171,7 +176,7 @@ func BACnetSecurityKeySetKeyIdsParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetSecurityKeySetKeyIds") } @@ -186,11 +191,11 @@ func BACnetSecurityKeySetKeyIdsParseWithBuffer(ctx context.Context, readBuffer u // Create the instance return &_BACnetSecurityKeySetKeyIds{ - TagNumber: tagNumber, - OpeningTag: openingTag, - KeyIds: keyIds, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + KeyIds: keyIds, + ClosingTag: closingTag, + }, nil } func (m *_BACnetSecurityKeySetKeyIds) Serialize() ([]byte, error) { @@ -204,7 +209,7 @@ func (m *_BACnetSecurityKeySetKeyIds) Serialize() ([]byte, error) { func (m *_BACnetSecurityKeySetKeyIds) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetSecurityKeySetKeyIds"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetSecurityKeySetKeyIds"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetSecurityKeySetKeyIds") } @@ -255,13 +260,13 @@ func (m *_BACnetSecurityKeySetKeyIds) SerializeWithWriteBuffer(ctx context.Conte return nil } + //// // Arguments Getter func (m *_BACnetSecurityKeySetKeyIds) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -279,3 +284,6 @@ func (m *_BACnetSecurityKeySetKeyIds) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetSecurityLevel.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetSecurityLevel.go index 21b03779c0a..b8456126e6b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetSecurityLevel.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetSecurityLevel.go @@ -34,12 +34,12 @@ type IBACnetSecurityLevel interface { utils.Serializable } -const ( - BACnetSecurityLevel_INCAPABLE BACnetSecurityLevel = 0 - BACnetSecurityLevel_PLAIN BACnetSecurityLevel = 1 - BACnetSecurityLevel_SIGNED BACnetSecurityLevel = 2 - BACnetSecurityLevel_ENCRYPTED BACnetSecurityLevel = 3 - BACnetSecurityLevel_SIGNED_END_TO_END BACnetSecurityLevel = 4 +const( + BACnetSecurityLevel_INCAPABLE BACnetSecurityLevel = 0 + BACnetSecurityLevel_PLAIN BACnetSecurityLevel = 1 + BACnetSecurityLevel_SIGNED BACnetSecurityLevel = 2 + BACnetSecurityLevel_ENCRYPTED BACnetSecurityLevel = 3 + BACnetSecurityLevel_SIGNED_END_TO_END BACnetSecurityLevel = 4 BACnetSecurityLevel_ENCRYPTED_END_TO_END BACnetSecurityLevel = 5 ) @@ -47,7 +47,7 @@ var BACnetSecurityLevelValues []BACnetSecurityLevel func init() { _ = errors.New - BACnetSecurityLevelValues = []BACnetSecurityLevel{ + BACnetSecurityLevelValues = []BACnetSecurityLevel { BACnetSecurityLevel_INCAPABLE, BACnetSecurityLevel_PLAIN, BACnetSecurityLevel_SIGNED, @@ -59,18 +59,18 @@ func init() { func BACnetSecurityLevelByValue(value uint8) (enum BACnetSecurityLevel, ok bool) { switch value { - case 0: - return BACnetSecurityLevel_INCAPABLE, true - case 1: - return BACnetSecurityLevel_PLAIN, true - case 2: - return BACnetSecurityLevel_SIGNED, true - case 3: - return BACnetSecurityLevel_ENCRYPTED, true - case 4: - return BACnetSecurityLevel_SIGNED_END_TO_END, true - case 5: - return BACnetSecurityLevel_ENCRYPTED_END_TO_END, true + case 0: + return BACnetSecurityLevel_INCAPABLE, true + case 1: + return BACnetSecurityLevel_PLAIN, true + case 2: + return BACnetSecurityLevel_SIGNED, true + case 3: + return BACnetSecurityLevel_ENCRYPTED, true + case 4: + return BACnetSecurityLevel_SIGNED_END_TO_END, true + case 5: + return BACnetSecurityLevel_ENCRYPTED_END_TO_END, true } return 0, false } @@ -93,13 +93,13 @@ func BACnetSecurityLevelByName(value string) (enum BACnetSecurityLevel, ok bool) return 0, false } -func BACnetSecurityLevelKnows(value uint8) bool { +func BACnetSecurityLevelKnows(value uint8) bool { for _, typeValue := range BACnetSecurityLevelValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetSecurityLevel(structType interface{}) BACnetSecurityLevel { @@ -171,3 +171,4 @@ func (e BACnetSecurityLevel) PLC4XEnumName() string { func (e BACnetSecurityLevel) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetSecurityLevelTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetSecurityLevelTagged.go index fc3e5b0b6e7..73b8e5c21e7 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetSecurityLevelTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetSecurityLevelTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetSecurityLevelTagged is the corresponding interface of BACnetSecurityLevelTagged type BACnetSecurityLevelTagged interface { @@ -46,14 +48,15 @@ type BACnetSecurityLevelTaggedExactly interface { // _BACnetSecurityLevelTagged is the data-structure of this message type _BACnetSecurityLevelTagged struct { - Header BACnetTagHeader - Value BACnetSecurityLevel + Header BACnetTagHeader + Value BACnetSecurityLevel // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_BACnetSecurityLevelTagged) GetValue() BACnetSecurityLevel { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetSecurityLevelTagged factory function for _BACnetSecurityLevelTagged -func NewBACnetSecurityLevelTagged(header BACnetTagHeader, value BACnetSecurityLevel, tagNumber uint8, tagClass TagClass) *_BACnetSecurityLevelTagged { - return &_BACnetSecurityLevelTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetSecurityLevelTagged( header BACnetTagHeader , value BACnetSecurityLevel , tagNumber uint8 , tagClass TagClass ) *_BACnetSecurityLevelTagged { +return &_BACnetSecurityLevelTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetSecurityLevelTagged(structType interface{}) BACnetSecurityLevelTagged { - if casted, ok := structType.(BACnetSecurityLevelTagged); ok { + if casted, ok := structType.(BACnetSecurityLevelTagged); ok { return casted } if casted, ok := structType.(*BACnetSecurityLevelTagged); ok { @@ -104,6 +108,7 @@ func (m *_BACnetSecurityLevelTagged) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_BACnetSecurityLevelTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func BACnetSecurityLevelTaggedParseWithBuffer(ctx context.Context, readBuffer ut if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetSecurityLevelTagged") } @@ -135,12 +140,12 @@ func BACnetSecurityLevelTaggedParseWithBuffer(ctx context.Context, readBuffer ut } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func BACnetSecurityLevelTaggedParseWithBuffer(ctx context.Context, readBuffer ut } var value BACnetSecurityLevel if _value != nil { - value = _value.(BACnetSecurityLevel) + value = _value.(BACnetSecurityLevel) } if closeErr := readBuffer.CloseContext("BACnetSecurityLevelTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func BACnetSecurityLevelTaggedParseWithBuffer(ctx context.Context, readBuffer ut // Create the instance return &_BACnetSecurityLevelTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_BACnetSecurityLevelTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_BACnetSecurityLevelTagged) Serialize() ([]byte, error) { func (m *_BACnetSecurityLevelTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetSecurityLevelTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetSecurityLevelTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetSecurityLevelTagged") } @@ -206,6 +211,7 @@ func (m *_BACnetSecurityLevelTagged) SerializeWithWriteBuffer(ctx context.Contex return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_BACnetSecurityLevelTagged) GetTagNumber() uint8 { func (m *_BACnetSecurityLevelTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_BACnetSecurityLevelTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetSecurityPolicy.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetSecurityPolicy.go index 8e72eb8e746..442142487d1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetSecurityPolicy.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetSecurityPolicy.go @@ -34,10 +34,10 @@ type IBACnetSecurityPolicy interface { utils.Serializable } -const ( +const( BACnetSecurityPolicy_PLAIN_NON_TRUSTED BACnetSecurityPolicy = 0 - BACnetSecurityPolicy_PLAIN_TRUSTED BACnetSecurityPolicy = 1 - BACnetSecurityPolicy_SIGNED_TRUSTED BACnetSecurityPolicy = 2 + BACnetSecurityPolicy_PLAIN_TRUSTED BACnetSecurityPolicy = 1 + BACnetSecurityPolicy_SIGNED_TRUSTED BACnetSecurityPolicy = 2 BACnetSecurityPolicy_ENCRYPTED_TRUSTED BACnetSecurityPolicy = 3 ) @@ -45,7 +45,7 @@ var BACnetSecurityPolicyValues []BACnetSecurityPolicy func init() { _ = errors.New - BACnetSecurityPolicyValues = []BACnetSecurityPolicy{ + BACnetSecurityPolicyValues = []BACnetSecurityPolicy { BACnetSecurityPolicy_PLAIN_NON_TRUSTED, BACnetSecurityPolicy_PLAIN_TRUSTED, BACnetSecurityPolicy_SIGNED_TRUSTED, @@ -55,14 +55,14 @@ func init() { func BACnetSecurityPolicyByValue(value uint8) (enum BACnetSecurityPolicy, ok bool) { switch value { - case 0: - return BACnetSecurityPolicy_PLAIN_NON_TRUSTED, true - case 1: - return BACnetSecurityPolicy_PLAIN_TRUSTED, true - case 2: - return BACnetSecurityPolicy_SIGNED_TRUSTED, true - case 3: - return BACnetSecurityPolicy_ENCRYPTED_TRUSTED, true + case 0: + return BACnetSecurityPolicy_PLAIN_NON_TRUSTED, true + case 1: + return BACnetSecurityPolicy_PLAIN_TRUSTED, true + case 2: + return BACnetSecurityPolicy_SIGNED_TRUSTED, true + case 3: + return BACnetSecurityPolicy_ENCRYPTED_TRUSTED, true } return 0, false } @@ -81,13 +81,13 @@ func BACnetSecurityPolicyByName(value string) (enum BACnetSecurityPolicy, ok boo return 0, false } -func BACnetSecurityPolicyKnows(value uint8) bool { +func BACnetSecurityPolicyKnows(value uint8) bool { for _, typeValue := range BACnetSecurityPolicyValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetSecurityPolicy(structType interface{}) BACnetSecurityPolicy { @@ -155,3 +155,4 @@ func (e BACnetSecurityPolicy) PLC4XEnumName() string { func (e BACnetSecurityPolicy) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetSecurityPolicyTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetSecurityPolicyTagged.go index c41a5cfe567..ae0ed3df08b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetSecurityPolicyTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetSecurityPolicyTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetSecurityPolicyTagged is the corresponding interface of BACnetSecurityPolicyTagged type BACnetSecurityPolicyTagged interface { @@ -46,14 +48,15 @@ type BACnetSecurityPolicyTaggedExactly interface { // _BACnetSecurityPolicyTagged is the data-structure of this message type _BACnetSecurityPolicyTagged struct { - Header BACnetTagHeader - Value BACnetSecurityPolicy + Header BACnetTagHeader + Value BACnetSecurityPolicy // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_BACnetSecurityPolicyTagged) GetValue() BACnetSecurityPolicy { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetSecurityPolicyTagged factory function for _BACnetSecurityPolicyTagged -func NewBACnetSecurityPolicyTagged(header BACnetTagHeader, value BACnetSecurityPolicy, tagNumber uint8, tagClass TagClass) *_BACnetSecurityPolicyTagged { - return &_BACnetSecurityPolicyTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetSecurityPolicyTagged( header BACnetTagHeader , value BACnetSecurityPolicy , tagNumber uint8 , tagClass TagClass ) *_BACnetSecurityPolicyTagged { +return &_BACnetSecurityPolicyTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetSecurityPolicyTagged(structType interface{}) BACnetSecurityPolicyTagged { - if casted, ok := structType.(BACnetSecurityPolicyTagged); ok { + if casted, ok := structType.(BACnetSecurityPolicyTagged); ok { return casted } if casted, ok := structType.(*BACnetSecurityPolicyTagged); ok { @@ -104,6 +108,7 @@ func (m *_BACnetSecurityPolicyTagged) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_BACnetSecurityPolicyTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func BACnetSecurityPolicyTaggedParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetSecurityPolicyTagged") } @@ -135,12 +140,12 @@ func BACnetSecurityPolicyTaggedParseWithBuffer(ctx context.Context, readBuffer u } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func BACnetSecurityPolicyTaggedParseWithBuffer(ctx context.Context, readBuffer u } var value BACnetSecurityPolicy if _value != nil { - value = _value.(BACnetSecurityPolicy) + value = _value.(BACnetSecurityPolicy) } if closeErr := readBuffer.CloseContext("BACnetSecurityPolicyTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func BACnetSecurityPolicyTaggedParseWithBuffer(ctx context.Context, readBuffer u // Create the instance return &_BACnetSecurityPolicyTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_BACnetSecurityPolicyTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_BACnetSecurityPolicyTagged) Serialize() ([]byte, error) { func (m *_BACnetSecurityPolicyTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetSecurityPolicyTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetSecurityPolicyTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetSecurityPolicyTagged") } @@ -206,6 +211,7 @@ func (m *_BACnetSecurityPolicyTagged) SerializeWithWriteBuffer(ctx context.Conte return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_BACnetSecurityPolicyTagged) GetTagNumber() uint8 { func (m *_BACnetSecurityPolicyTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_BACnetSecurityPolicyTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetSegmentation.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetSegmentation.go index caa3df90432..9ef65e16ed8 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetSegmentation.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetSegmentation.go @@ -34,18 +34,18 @@ type IBACnetSegmentation interface { utils.Serializable } -const ( - BACnetSegmentation_SEGMENTED_BOTH BACnetSegmentation = 0 +const( + BACnetSegmentation_SEGMENTED_BOTH BACnetSegmentation = 0 BACnetSegmentation_SEGMENTED_TRANSMIT BACnetSegmentation = 1 - BACnetSegmentation_SEGMENTED_RECEIVE BACnetSegmentation = 2 - BACnetSegmentation_NO_SEGMENTATION BACnetSegmentation = 3 + BACnetSegmentation_SEGMENTED_RECEIVE BACnetSegmentation = 2 + BACnetSegmentation_NO_SEGMENTATION BACnetSegmentation = 3 ) var BACnetSegmentationValues []BACnetSegmentation func init() { _ = errors.New - BACnetSegmentationValues = []BACnetSegmentation{ + BACnetSegmentationValues = []BACnetSegmentation { BACnetSegmentation_SEGMENTED_BOTH, BACnetSegmentation_SEGMENTED_TRANSMIT, BACnetSegmentation_SEGMENTED_RECEIVE, @@ -55,14 +55,14 @@ func init() { func BACnetSegmentationByValue(value uint8) (enum BACnetSegmentation, ok bool) { switch value { - case 0: - return BACnetSegmentation_SEGMENTED_BOTH, true - case 1: - return BACnetSegmentation_SEGMENTED_TRANSMIT, true - case 2: - return BACnetSegmentation_SEGMENTED_RECEIVE, true - case 3: - return BACnetSegmentation_NO_SEGMENTATION, true + case 0: + return BACnetSegmentation_SEGMENTED_BOTH, true + case 1: + return BACnetSegmentation_SEGMENTED_TRANSMIT, true + case 2: + return BACnetSegmentation_SEGMENTED_RECEIVE, true + case 3: + return BACnetSegmentation_NO_SEGMENTATION, true } return 0, false } @@ -81,13 +81,13 @@ func BACnetSegmentationByName(value string) (enum BACnetSegmentation, ok bool) { return 0, false } -func BACnetSegmentationKnows(value uint8) bool { +func BACnetSegmentationKnows(value uint8) bool { for _, typeValue := range BACnetSegmentationValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetSegmentation(structType interface{}) BACnetSegmentation { @@ -155,3 +155,4 @@ func (e BACnetSegmentation) PLC4XEnumName() string { func (e BACnetSegmentation) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetSegmentationTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetSegmentationTagged.go index 728f2594b8f..a8f6409893f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetSegmentationTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetSegmentationTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetSegmentationTagged is the corresponding interface of BACnetSegmentationTagged type BACnetSegmentationTagged interface { @@ -46,14 +48,15 @@ type BACnetSegmentationTaggedExactly interface { // _BACnetSegmentationTagged is the data-structure of this message type _BACnetSegmentationTagged struct { - Header BACnetTagHeader - Value BACnetSegmentation + Header BACnetTagHeader + Value BACnetSegmentation // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_BACnetSegmentationTagged) GetValue() BACnetSegmentation { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetSegmentationTagged factory function for _BACnetSegmentationTagged -func NewBACnetSegmentationTagged(header BACnetTagHeader, value BACnetSegmentation, tagNumber uint8, tagClass TagClass) *_BACnetSegmentationTagged { - return &_BACnetSegmentationTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetSegmentationTagged( header BACnetTagHeader , value BACnetSegmentation , tagNumber uint8 , tagClass TagClass ) *_BACnetSegmentationTagged { +return &_BACnetSegmentationTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetSegmentationTagged(structType interface{}) BACnetSegmentationTagged { - if casted, ok := structType.(BACnetSegmentationTagged); ok { + if casted, ok := structType.(BACnetSegmentationTagged); ok { return casted } if casted, ok := structType.(*BACnetSegmentationTagged); ok { @@ -104,6 +108,7 @@ func (m *_BACnetSegmentationTagged) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_BACnetSegmentationTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func BACnetSegmentationTaggedParseWithBuffer(ctx context.Context, readBuffer uti if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetSegmentationTagged") } @@ -135,12 +140,12 @@ func BACnetSegmentationTaggedParseWithBuffer(ctx context.Context, readBuffer uti } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func BACnetSegmentationTaggedParseWithBuffer(ctx context.Context, readBuffer uti } var value BACnetSegmentation if _value != nil { - value = _value.(BACnetSegmentation) + value = _value.(BACnetSegmentation) } if closeErr := readBuffer.CloseContext("BACnetSegmentationTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func BACnetSegmentationTaggedParseWithBuffer(ctx context.Context, readBuffer uti // Create the instance return &_BACnetSegmentationTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_BACnetSegmentationTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_BACnetSegmentationTagged) Serialize() ([]byte, error) { func (m *_BACnetSegmentationTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetSegmentationTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetSegmentationTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetSegmentationTagged") } @@ -206,6 +211,7 @@ func (m *_BACnetSegmentationTagged) SerializeWithWriteBuffer(ctx context.Context return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_BACnetSegmentationTagged) GetTagNumber() uint8 { func (m *_BACnetSegmentationTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_BACnetSegmentationTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAck.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAck.go index ba529ae34da..a307fee2d7f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAck.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAck.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetServiceAck is the corresponding interface of BACnetServiceAck type BACnetServiceAck interface { @@ -58,6 +60,7 @@ type _BACnetServiceAckChildRequirements interface { GetServiceChoice() BACnetConfirmedServiceChoice } + type BACnetServiceAckParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetServiceAck, serializeChildFunction func() error) error GetTypeName() string @@ -65,13 +68,12 @@ type BACnetServiceAckParent interface { type BACnetServiceAckChild interface { utils.Serializable - InitializeParent(parent BACnetServiceAck) +InitializeParent(parent BACnetServiceAck ) GetParent() *BACnetServiceAck GetTypeName() string BACnetServiceAck } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for virtual fields. @@ -80,7 +82,7 @@ type BACnetServiceAckChild interface { func (m *_BACnetServiceAck) GetServiceAckPayloadLength() uint32 { ctx := context.Background() _ = ctx - return uint32(utils.InlineIf((bool((m.ServiceAckLength) > (0))), func() interface{} { return uint32((uint32(m.ServiceAckLength) - uint32(uint32(1)))) }, func() interface{} { return uint32(uint32(0)) }).(uint32)) + return uint32(utils.InlineIf((bool((m.ServiceAckLength) > ((0)))), func() interface{} {return uint32((uint32(m.ServiceAckLength) - uint32(uint32(1))))}, func() interface{} {return uint32(uint32(0))}).(uint32)) } /////////////////////// @@ -88,14 +90,15 @@ func (m *_BACnetServiceAck) GetServiceAckPayloadLength() uint32 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetServiceAck factory function for _BACnetServiceAck -func NewBACnetServiceAck(serviceAckLength uint32) *_BACnetServiceAck { - return &_BACnetServiceAck{ServiceAckLength: serviceAckLength} +func NewBACnetServiceAck( serviceAckLength uint32 ) *_BACnetServiceAck { +return &_BACnetServiceAck{ ServiceAckLength: serviceAckLength } } // Deprecated: use the interface for direct cast func CastBACnetServiceAck(structType interface{}) BACnetServiceAck { - if casted, ok := structType.(BACnetServiceAck); ok { + if casted, ok := structType.(BACnetServiceAck); ok { return casted } if casted, ok := structType.(*BACnetServiceAck); ok { @@ -108,10 +111,11 @@ func (m *_BACnetServiceAck) GetTypeName() string { return "BACnetServiceAck" } + func (m *_BACnetServiceAck) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Discriminator Field (serviceChoice) - lengthInBits += 8 + lengthInBits += 8; // A virtual field doesn't have any in- or output. @@ -149,49 +153,49 @@ func BACnetServiceAckParseWithBuffer(ctx context.Context, readBuffer utils.ReadB } // Virtual field - _serviceAckPayloadLength := utils.InlineIf((bool((serviceAckLength) > (0))), func() interface{} { return uint32((uint32(serviceAckLength) - uint32(uint32(1)))) }, func() interface{} { return uint32(uint32(0)) }).(uint32) + _serviceAckPayloadLength := utils.InlineIf((bool((serviceAckLength) > ((0)))), func() interface{} {return uint32((uint32(serviceAckLength) - uint32(uint32(1))))}, func() interface{} {return uint32(uint32(0))}).(uint32) serviceAckPayloadLength := uint32(_serviceAckPayloadLength) _ = serviceAckPayloadLength // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetServiceAckChildSerializeRequirement interface { BACnetServiceAck - InitializeParent(BACnetServiceAck) + InitializeParent(BACnetServiceAck ) GetParent() BACnetServiceAck } var _childTemp interface{} var _child BACnetServiceAckChildSerializeRequirement var typeSwitchError error switch { - case serviceChoice == BACnetConfirmedServiceChoice_GET_ALARM_SUMMARY: // BACnetServiceAckGetAlarmSummary +case serviceChoice == BACnetConfirmedServiceChoice_GET_ALARM_SUMMARY : // BACnetServiceAckGetAlarmSummary _childTemp, typeSwitchError = BACnetServiceAckGetAlarmSummaryParseWithBuffer(ctx, readBuffer, serviceAckLength) - case serviceChoice == BACnetConfirmedServiceChoice_GET_ENROLLMENT_SUMMARY: // BACnetServiceAckGetEnrollmentSummary +case serviceChoice == BACnetConfirmedServiceChoice_GET_ENROLLMENT_SUMMARY : // BACnetServiceAckGetEnrollmentSummary _childTemp, typeSwitchError = BACnetServiceAckGetEnrollmentSummaryParseWithBuffer(ctx, readBuffer, serviceAckLength) - case serviceChoice == BACnetConfirmedServiceChoice_GET_EVENT_INFORMATION: // BACnetServiceAckGetEventInformation +case serviceChoice == BACnetConfirmedServiceChoice_GET_EVENT_INFORMATION : // BACnetServiceAckGetEventInformation _childTemp, typeSwitchError = BACnetServiceAckGetEventInformationParseWithBuffer(ctx, readBuffer, serviceAckLength) - case serviceChoice == BACnetConfirmedServiceChoice_ATOMIC_READ_FILE: // BACnetServiceAckAtomicReadFile +case serviceChoice == BACnetConfirmedServiceChoice_ATOMIC_READ_FILE : // BACnetServiceAckAtomicReadFile _childTemp, typeSwitchError = BACnetServiceAckAtomicReadFileParseWithBuffer(ctx, readBuffer, serviceAckLength) - case serviceChoice == BACnetConfirmedServiceChoice_ATOMIC_WRITE_FILE: // BACnetServiceAckAtomicWriteFile +case serviceChoice == BACnetConfirmedServiceChoice_ATOMIC_WRITE_FILE : // BACnetServiceAckAtomicWriteFile _childTemp, typeSwitchError = BACnetServiceAckAtomicWriteFileParseWithBuffer(ctx, readBuffer, serviceAckLength) - case serviceChoice == BACnetConfirmedServiceChoice_CREATE_OBJECT: // BACnetServiceAckCreateObject +case serviceChoice == BACnetConfirmedServiceChoice_CREATE_OBJECT : // BACnetServiceAckCreateObject _childTemp, typeSwitchError = BACnetServiceAckCreateObjectParseWithBuffer(ctx, readBuffer, serviceAckLength) - case serviceChoice == BACnetConfirmedServiceChoice_READ_PROPERTY: // BACnetServiceAckReadProperty +case serviceChoice == BACnetConfirmedServiceChoice_READ_PROPERTY : // BACnetServiceAckReadProperty _childTemp, typeSwitchError = BACnetServiceAckReadPropertyParseWithBuffer(ctx, readBuffer, serviceAckLength) - case serviceChoice == BACnetConfirmedServiceChoice_READ_PROPERTY_MULTIPLE: // BACnetServiceAckReadPropertyMultiple +case serviceChoice == BACnetConfirmedServiceChoice_READ_PROPERTY_MULTIPLE : // BACnetServiceAckReadPropertyMultiple _childTemp, typeSwitchError = BACnetServiceAckReadPropertyMultipleParseWithBuffer(ctx, readBuffer, serviceAckPayloadLength, serviceAckLength) - case serviceChoice == BACnetConfirmedServiceChoice_READ_RANGE: // BACnetServiceAckReadRange +case serviceChoice == BACnetConfirmedServiceChoice_READ_RANGE : // BACnetServiceAckReadRange _childTemp, typeSwitchError = BACnetServiceAckReadRangeParseWithBuffer(ctx, readBuffer, serviceAckLength) - case serviceChoice == BACnetConfirmedServiceChoice_CONFIRMED_PRIVATE_TRANSFER: // BACnetServiceAckConfirmedPrivateTransfer +case serviceChoice == BACnetConfirmedServiceChoice_CONFIRMED_PRIVATE_TRANSFER : // BACnetServiceAckConfirmedPrivateTransfer _childTemp, typeSwitchError = BACnetServiceAckConfirmedPrivateTransferParseWithBuffer(ctx, readBuffer, serviceAckLength) - case serviceChoice == BACnetConfirmedServiceChoice_VT_OPEN: // BACnetServiceAckVTOpen +case serviceChoice == BACnetConfirmedServiceChoice_VT_OPEN : // BACnetServiceAckVTOpen _childTemp, typeSwitchError = BACnetServiceAckVTOpenParseWithBuffer(ctx, readBuffer, serviceAckLength) - case serviceChoice == BACnetConfirmedServiceChoice_VT_DATA: // BACnetServiceAckVTData +case serviceChoice == BACnetConfirmedServiceChoice_VT_DATA : // BACnetServiceAckVTData _childTemp, typeSwitchError = BACnetServiceAckVTDataParseWithBuffer(ctx, readBuffer, serviceAckLength) - case serviceChoice == BACnetConfirmedServiceChoice_AUTHENTICATE: // BACnetServiceAckAuthenticate +case serviceChoice == BACnetConfirmedServiceChoice_AUTHENTICATE : // BACnetServiceAckAuthenticate _childTemp, typeSwitchError = BACnetServiceAckAuthenticateParseWithBuffer(ctx, readBuffer, serviceAckPayloadLength, serviceAckLength) - case serviceChoice == BACnetConfirmedServiceChoice_REQUEST_KEY: // BACnetServiceAckRequestKey +case serviceChoice == BACnetConfirmedServiceChoice_REQUEST_KEY : // BACnetServiceAckRequestKey _childTemp, typeSwitchError = BACnetServiceAckRequestKeyParseWithBuffer(ctx, readBuffer, serviceAckPayloadLength, serviceAckLength) - case serviceChoice == BACnetConfirmedServiceChoice_READ_PROPERTY_CONDITIONAL: // BACnetServiceAckReadPropertyConditional +case serviceChoice == BACnetConfirmedServiceChoice_READ_PROPERTY_CONDITIONAL : // BACnetServiceAckReadPropertyConditional _childTemp, typeSwitchError = BACnetServiceAckReadPropertyConditionalParseWithBuffer(ctx, readBuffer, serviceAckPayloadLength, serviceAckLength) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [serviceChoice=%v]", serviceChoice) @@ -206,7 +210,7 @@ func BACnetServiceAckParseWithBuffer(ctx context.Context, readBuffer utils.ReadB } // Finish initializing - _child.InitializeParent(_child) +_child.InitializeParent(_child ) return _child, nil } @@ -216,7 +220,7 @@ func (pm *_BACnetServiceAck) SerializeParent(ctx context.Context, writeBuffer ut _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetServiceAck"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetServiceAck"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetServiceAck") } @@ -249,13 +253,13 @@ func (pm *_BACnetServiceAck) SerializeParent(ctx context.Context, writeBuffer ut return nil } + //// // Arguments Getter func (m *_BACnetServiceAck) GetServiceAckLength() uint32 { return m.ServiceAckLength } - // //// @@ -273,3 +277,6 @@ func (m *_BACnetServiceAck) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckAtomicReadFile.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckAtomicReadFile.go index 01b357d6a56..b713108aebf 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckAtomicReadFile.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckAtomicReadFile.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetServiceAckAtomicReadFile is the corresponding interface of BACnetServiceAckAtomicReadFile type BACnetServiceAckAtomicReadFile interface { @@ -48,30 +50,30 @@ type BACnetServiceAckAtomicReadFileExactly interface { // _BACnetServiceAckAtomicReadFile is the data-structure of this message type _BACnetServiceAckAtomicReadFile struct { *_BACnetServiceAck - EndOfFile BACnetApplicationTagBoolean - AccessMethod BACnetServiceAckAtomicReadFileStreamOrRecord + EndOfFile BACnetApplicationTagBoolean + AccessMethod BACnetServiceAckAtomicReadFileStreamOrRecord } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetServiceAckAtomicReadFile) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_ATOMIC_READ_FILE -} +func (m *_BACnetServiceAckAtomicReadFile) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_ATOMIC_READ_FILE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetServiceAckAtomicReadFile) InitializeParent(parent BACnetServiceAck) {} +func (m *_BACnetServiceAckAtomicReadFile) InitializeParent(parent BACnetServiceAck ) {} -func (m *_BACnetServiceAckAtomicReadFile) GetParent() BACnetServiceAck { +func (m *_BACnetServiceAckAtomicReadFile) GetParent() BACnetServiceAck { return m._BACnetServiceAck } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_BACnetServiceAckAtomicReadFile) GetAccessMethod() BACnetServiceAckAtom /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetServiceAckAtomicReadFile factory function for _BACnetServiceAckAtomicReadFile -func NewBACnetServiceAckAtomicReadFile(endOfFile BACnetApplicationTagBoolean, accessMethod BACnetServiceAckAtomicReadFileStreamOrRecord, serviceAckLength uint32) *_BACnetServiceAckAtomicReadFile { +func NewBACnetServiceAckAtomicReadFile( endOfFile BACnetApplicationTagBoolean , accessMethod BACnetServiceAckAtomicReadFileStreamOrRecord , serviceAckLength uint32 ) *_BACnetServiceAckAtomicReadFile { _result := &_BACnetServiceAckAtomicReadFile{ - EndOfFile: endOfFile, - AccessMethod: accessMethod, - _BACnetServiceAck: NewBACnetServiceAck(serviceAckLength), + EndOfFile: endOfFile, + AccessMethod: accessMethod, + _BACnetServiceAck: NewBACnetServiceAck(serviceAckLength), } _result._BACnetServiceAck._BACnetServiceAckChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewBACnetServiceAckAtomicReadFile(endOfFile BACnetApplicationTagBoolean, ac // Deprecated: use the interface for direct cast func CastBACnetServiceAckAtomicReadFile(structType interface{}) BACnetServiceAckAtomicReadFile { - if casted, ok := structType.(BACnetServiceAckAtomicReadFile); ok { + if casted, ok := structType.(BACnetServiceAckAtomicReadFile); ok { return casted } if casted, ok := structType.(*BACnetServiceAckAtomicReadFile); ok { @@ -128,6 +131,7 @@ func (m *_BACnetServiceAckAtomicReadFile) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetServiceAckAtomicReadFile) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -149,7 +153,7 @@ func BACnetServiceAckAtomicReadFileParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("endOfFile"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for endOfFile") } - _endOfFile, _endOfFileErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_endOfFile, _endOfFileErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _endOfFileErr != nil { return nil, errors.Wrap(_endOfFileErr, "Error parsing 'endOfFile' field of BACnetServiceAckAtomicReadFile") } @@ -162,7 +166,7 @@ func BACnetServiceAckAtomicReadFileParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("accessMethod"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for accessMethod") } - _accessMethod, _accessMethodErr := BACnetServiceAckAtomicReadFileStreamOrRecordParseWithBuffer(ctx, readBuffer) +_accessMethod, _accessMethodErr := BACnetServiceAckAtomicReadFileStreamOrRecordParseWithBuffer(ctx, readBuffer) if _accessMethodErr != nil { return nil, errors.Wrap(_accessMethodErr, "Error parsing 'accessMethod' field of BACnetServiceAckAtomicReadFile") } @@ -180,7 +184,7 @@ func BACnetServiceAckAtomicReadFileParseWithBuffer(ctx context.Context, readBuff _BACnetServiceAck: &_BACnetServiceAck{ ServiceAckLength: serviceAckLength, }, - EndOfFile: endOfFile, + EndOfFile: endOfFile, AccessMethod: accessMethod, } _child._BACnetServiceAck._BACnetServiceAckChildRequirements = _child @@ -203,29 +207,29 @@ func (m *_BACnetServiceAckAtomicReadFile) SerializeWithWriteBuffer(ctx context.C return errors.Wrap(pushErr, "Error pushing for BACnetServiceAckAtomicReadFile") } - // Simple Field (endOfFile) - if pushErr := writeBuffer.PushContext("endOfFile"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for endOfFile") - } - _endOfFileErr := writeBuffer.WriteSerializable(ctx, m.GetEndOfFile()) - if popErr := writeBuffer.PopContext("endOfFile"); popErr != nil { - return errors.Wrap(popErr, "Error popping for endOfFile") - } - if _endOfFileErr != nil { - return errors.Wrap(_endOfFileErr, "Error serializing 'endOfFile' field") - } + // Simple Field (endOfFile) + if pushErr := writeBuffer.PushContext("endOfFile"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for endOfFile") + } + _endOfFileErr := writeBuffer.WriteSerializable(ctx, m.GetEndOfFile()) + if popErr := writeBuffer.PopContext("endOfFile"); popErr != nil { + return errors.Wrap(popErr, "Error popping for endOfFile") + } + if _endOfFileErr != nil { + return errors.Wrap(_endOfFileErr, "Error serializing 'endOfFile' field") + } - // Simple Field (accessMethod) - if pushErr := writeBuffer.PushContext("accessMethod"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for accessMethod") - } - _accessMethodErr := writeBuffer.WriteSerializable(ctx, m.GetAccessMethod()) - if popErr := writeBuffer.PopContext("accessMethod"); popErr != nil { - return errors.Wrap(popErr, "Error popping for accessMethod") - } - if _accessMethodErr != nil { - return errors.Wrap(_accessMethodErr, "Error serializing 'accessMethod' field") - } + // Simple Field (accessMethod) + if pushErr := writeBuffer.PushContext("accessMethod"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for accessMethod") + } + _accessMethodErr := writeBuffer.WriteSerializable(ctx, m.GetAccessMethod()) + if popErr := writeBuffer.PopContext("accessMethod"); popErr != nil { + return errors.Wrap(popErr, "Error popping for accessMethod") + } + if _accessMethodErr != nil { + return errors.Wrap(_accessMethodErr, "Error serializing 'accessMethod' field") + } if popErr := writeBuffer.PopContext("BACnetServiceAckAtomicReadFile"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetServiceAckAtomicReadFile") @@ -235,6 +239,7 @@ func (m *_BACnetServiceAckAtomicReadFile) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetServiceAckAtomicReadFile) isBACnetServiceAckAtomicReadFile() bool { return true } @@ -249,3 +254,6 @@ func (m *_BACnetServiceAckAtomicReadFile) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckAtomicReadFileRecord.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckAtomicReadFileRecord.go index 528554beedf..eec19d14f3c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckAtomicReadFileRecord.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckAtomicReadFileRecord.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetServiceAckAtomicReadFileRecord is the corresponding interface of BACnetServiceAckAtomicReadFileRecord type BACnetServiceAckAtomicReadFileRecord interface { @@ -51,11 +53,13 @@ type BACnetServiceAckAtomicReadFileRecordExactly interface { // _BACnetServiceAckAtomicReadFileRecord is the data-structure of this message type _BACnetServiceAckAtomicReadFileRecord struct { *_BACnetServiceAckAtomicReadFileStreamOrRecord - FileStartRecord BACnetApplicationTagSignedInteger - ReturnedRecordCount BACnetApplicationTagUnsignedInteger - FileRecordData []BACnetApplicationTagOctetString + FileStartRecord BACnetApplicationTagSignedInteger + ReturnedRecordCount BACnetApplicationTagUnsignedInteger + FileRecordData []BACnetApplicationTagOctetString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -66,16 +70,14 @@ type _BACnetServiceAckAtomicReadFileRecord struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetServiceAckAtomicReadFileRecord) InitializeParent(parent BACnetServiceAckAtomicReadFileStreamOrRecord, peekedTagHeader BACnetTagHeader, openingTag BACnetOpeningTag, closingTag BACnetClosingTag) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetServiceAckAtomicReadFileRecord) InitializeParent(parent BACnetServiceAckAtomicReadFileStreamOrRecord , peekedTagHeader BACnetTagHeader , openingTag BACnetOpeningTag , closingTag BACnetClosingTag ) { m.PeekedTagHeader = peekedTagHeader m.OpeningTag = openingTag m.ClosingTag = closingTag } -func (m *_BACnetServiceAckAtomicReadFileRecord) GetParent() BACnetServiceAckAtomicReadFileStreamOrRecord { +func (m *_BACnetServiceAckAtomicReadFileRecord) GetParent() BACnetServiceAckAtomicReadFileStreamOrRecord { return m._BACnetServiceAckAtomicReadFileStreamOrRecord } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,13 +100,14 @@ func (m *_BACnetServiceAckAtomicReadFileRecord) GetFileRecordData() []BACnetAppl /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetServiceAckAtomicReadFileRecord factory function for _BACnetServiceAckAtomicReadFileRecord -func NewBACnetServiceAckAtomicReadFileRecord(fileStartRecord BACnetApplicationTagSignedInteger, returnedRecordCount BACnetApplicationTagUnsignedInteger, fileRecordData []BACnetApplicationTagOctetString, peekedTagHeader BACnetTagHeader, openingTag BACnetOpeningTag, closingTag BACnetClosingTag) *_BACnetServiceAckAtomicReadFileRecord { +func NewBACnetServiceAckAtomicReadFileRecord( fileStartRecord BACnetApplicationTagSignedInteger , returnedRecordCount BACnetApplicationTagUnsignedInteger , fileRecordData []BACnetApplicationTagOctetString , peekedTagHeader BACnetTagHeader , openingTag BACnetOpeningTag , closingTag BACnetClosingTag ) *_BACnetServiceAckAtomicReadFileRecord { _result := &_BACnetServiceAckAtomicReadFileRecord{ - FileStartRecord: fileStartRecord, + FileStartRecord: fileStartRecord, ReturnedRecordCount: returnedRecordCount, - FileRecordData: fileRecordData, - _BACnetServiceAckAtomicReadFileStreamOrRecord: NewBACnetServiceAckAtomicReadFileStreamOrRecord(peekedTagHeader, openingTag, closingTag), + FileRecordData: fileRecordData, + _BACnetServiceAckAtomicReadFileStreamOrRecord: NewBACnetServiceAckAtomicReadFileStreamOrRecord(peekedTagHeader, openingTag, closingTag), } _result._BACnetServiceAckAtomicReadFileStreamOrRecord._BACnetServiceAckAtomicReadFileStreamOrRecordChildRequirements = _result return _result @@ -112,7 +115,7 @@ func NewBACnetServiceAckAtomicReadFileRecord(fileStartRecord BACnetApplicationTa // Deprecated: use the interface for direct cast func CastBACnetServiceAckAtomicReadFileRecord(structType interface{}) BACnetServiceAckAtomicReadFileRecord { - if casted, ok := structType.(BACnetServiceAckAtomicReadFileRecord); ok { + if casted, ok := structType.(BACnetServiceAckAtomicReadFileRecord); ok { return casted } if casted, ok := structType.(*BACnetServiceAckAtomicReadFileRecord); ok { @@ -140,13 +143,14 @@ func (m *_BACnetServiceAckAtomicReadFileRecord) GetLengthInBits(ctx context.Cont arrayCtx := spiContext.CreateArrayContext(ctx, len(m.FileRecordData), _curItem) _ = arrayCtx _ = _curItem - lengthInBits += element.(interface{ GetLengthInBits(context.Context) uint16 }).GetLengthInBits(arrayCtx) + lengthInBits += element.(interface{GetLengthInBits(context.Context) uint16}).GetLengthInBits(arrayCtx) } } return lengthInBits } + func (m *_BACnetServiceAckAtomicReadFileRecord) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -168,7 +172,7 @@ func BACnetServiceAckAtomicReadFileRecordParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("fileStartRecord"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for fileStartRecord") } - _fileStartRecord, _fileStartRecordErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_fileStartRecord, _fileStartRecordErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _fileStartRecordErr != nil { return nil, errors.Wrap(_fileStartRecordErr, "Error parsing 'fileStartRecord' field of BACnetServiceAckAtomicReadFileRecord") } @@ -181,7 +185,7 @@ func BACnetServiceAckAtomicReadFileRecordParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("returnedRecordCount"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for returnedRecordCount") } - _returnedRecordCount, _returnedRecordCountErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_returnedRecordCount, _returnedRecordCountErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _returnedRecordCountErr != nil { return nil, errors.Wrap(_returnedRecordCountErr, "Error parsing 'returnedRecordCount' field of BACnetServiceAckAtomicReadFileRecord") } @@ -206,7 +210,7 @@ func BACnetServiceAckAtomicReadFileRecordParseWithBuffer(ctx context.Context, re arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := BACnetApplicationTagParseWithBuffer(arrayCtx, readBuffer) +_item, _err := BACnetApplicationTagParseWithBuffer(arrayCtx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'fileRecordData' field of BACnetServiceAckAtomicReadFileRecord") } @@ -223,10 +227,11 @@ func BACnetServiceAckAtomicReadFileRecordParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetServiceAckAtomicReadFileRecord{ - _BACnetServiceAckAtomicReadFileStreamOrRecord: &_BACnetServiceAckAtomicReadFileStreamOrRecord{}, - FileStartRecord: fileStartRecord, + _BACnetServiceAckAtomicReadFileStreamOrRecord: &_BACnetServiceAckAtomicReadFileStreamOrRecord{ + }, + FileStartRecord: fileStartRecord, ReturnedRecordCount: returnedRecordCount, - FileRecordData: fileRecordData, + FileRecordData: fileRecordData, } _child._BACnetServiceAckAtomicReadFileStreamOrRecord._BACnetServiceAckAtomicReadFileStreamOrRecordChildRequirements = _child return _child, nil @@ -248,46 +253,46 @@ func (m *_BACnetServiceAckAtomicReadFileRecord) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetServiceAckAtomicReadFileRecord") } - // Simple Field (fileStartRecord) - if pushErr := writeBuffer.PushContext("fileStartRecord"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for fileStartRecord") - } - _fileStartRecordErr := writeBuffer.WriteSerializable(ctx, m.GetFileStartRecord()) - if popErr := writeBuffer.PopContext("fileStartRecord"); popErr != nil { - return errors.Wrap(popErr, "Error popping for fileStartRecord") - } - if _fileStartRecordErr != nil { - return errors.Wrap(_fileStartRecordErr, "Error serializing 'fileStartRecord' field") - } + // Simple Field (fileStartRecord) + if pushErr := writeBuffer.PushContext("fileStartRecord"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for fileStartRecord") + } + _fileStartRecordErr := writeBuffer.WriteSerializable(ctx, m.GetFileStartRecord()) + if popErr := writeBuffer.PopContext("fileStartRecord"); popErr != nil { + return errors.Wrap(popErr, "Error popping for fileStartRecord") + } + if _fileStartRecordErr != nil { + return errors.Wrap(_fileStartRecordErr, "Error serializing 'fileStartRecord' field") + } - // Simple Field (returnedRecordCount) - if pushErr := writeBuffer.PushContext("returnedRecordCount"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for returnedRecordCount") - } - _returnedRecordCountErr := writeBuffer.WriteSerializable(ctx, m.GetReturnedRecordCount()) - if popErr := writeBuffer.PopContext("returnedRecordCount"); popErr != nil { - return errors.Wrap(popErr, "Error popping for returnedRecordCount") - } - if _returnedRecordCountErr != nil { - return errors.Wrap(_returnedRecordCountErr, "Error serializing 'returnedRecordCount' field") - } + // Simple Field (returnedRecordCount) + if pushErr := writeBuffer.PushContext("returnedRecordCount"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for returnedRecordCount") + } + _returnedRecordCountErr := writeBuffer.WriteSerializable(ctx, m.GetReturnedRecordCount()) + if popErr := writeBuffer.PopContext("returnedRecordCount"); popErr != nil { + return errors.Wrap(popErr, "Error popping for returnedRecordCount") + } + if _returnedRecordCountErr != nil { + return errors.Wrap(_returnedRecordCountErr, "Error serializing 'returnedRecordCount' field") + } - // Array Field (fileRecordData) - if pushErr := writeBuffer.PushContext("fileRecordData", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for fileRecordData") - } - for _curItem, _element := range m.GetFileRecordData() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetFileRecordData()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'fileRecordData' field") - } - } - if popErr := writeBuffer.PopContext("fileRecordData", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for fileRecordData") + // Array Field (fileRecordData) + if pushErr := writeBuffer.PushContext("fileRecordData", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for fileRecordData") + } + for _curItem, _element := range m.GetFileRecordData() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetFileRecordData()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'fileRecordData' field") } + } + if popErr := writeBuffer.PopContext("fileRecordData", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for fileRecordData") + } if popErr := writeBuffer.PopContext("BACnetServiceAckAtomicReadFileRecord"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetServiceAckAtomicReadFileRecord") @@ -297,6 +302,7 @@ func (m *_BACnetServiceAckAtomicReadFileRecord) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetServiceAckAtomicReadFileRecord) isBACnetServiceAckAtomicReadFileRecord() bool { return true } @@ -311,3 +317,6 @@ func (m *_BACnetServiceAckAtomicReadFileRecord) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckAtomicReadFileStream.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckAtomicReadFileStream.go index 41ad216b171..9eccd7a7de1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckAtomicReadFileStream.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckAtomicReadFileStream.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetServiceAckAtomicReadFileStream is the corresponding interface of BACnetServiceAckAtomicReadFileStream type BACnetServiceAckAtomicReadFileStream interface { @@ -48,10 +50,12 @@ type BACnetServiceAckAtomicReadFileStreamExactly interface { // _BACnetServiceAckAtomicReadFileStream is the data-structure of this message type _BACnetServiceAckAtomicReadFileStream struct { *_BACnetServiceAckAtomicReadFileStreamOrRecord - FileStartPosition BACnetApplicationTagSignedInteger - FileData BACnetApplicationTagOctetString + FileStartPosition BACnetApplicationTagSignedInteger + FileData BACnetApplicationTagOctetString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -62,16 +66,14 @@ type _BACnetServiceAckAtomicReadFileStream struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetServiceAckAtomicReadFileStream) InitializeParent(parent BACnetServiceAckAtomicReadFileStreamOrRecord, peekedTagHeader BACnetTagHeader, openingTag BACnetOpeningTag, closingTag BACnetClosingTag) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetServiceAckAtomicReadFileStream) InitializeParent(parent BACnetServiceAckAtomicReadFileStreamOrRecord , peekedTagHeader BACnetTagHeader , openingTag BACnetOpeningTag , closingTag BACnetClosingTag ) { m.PeekedTagHeader = peekedTagHeader m.OpeningTag = openingTag m.ClosingTag = closingTag } -func (m *_BACnetServiceAckAtomicReadFileStream) GetParent() BACnetServiceAckAtomicReadFileStreamOrRecord { +func (m *_BACnetServiceAckAtomicReadFileStream) GetParent() BACnetServiceAckAtomicReadFileStreamOrRecord { return m._BACnetServiceAckAtomicReadFileStreamOrRecord } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_BACnetServiceAckAtomicReadFileStream) GetFileData() BACnetApplicationT /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetServiceAckAtomicReadFileStream factory function for _BACnetServiceAckAtomicReadFileStream -func NewBACnetServiceAckAtomicReadFileStream(fileStartPosition BACnetApplicationTagSignedInteger, fileData BACnetApplicationTagOctetString, peekedTagHeader BACnetTagHeader, openingTag BACnetOpeningTag, closingTag BACnetClosingTag) *_BACnetServiceAckAtomicReadFileStream { +func NewBACnetServiceAckAtomicReadFileStream( fileStartPosition BACnetApplicationTagSignedInteger , fileData BACnetApplicationTagOctetString , peekedTagHeader BACnetTagHeader , openingTag BACnetOpeningTag , closingTag BACnetClosingTag ) *_BACnetServiceAckAtomicReadFileStream { _result := &_BACnetServiceAckAtomicReadFileStream{ FileStartPosition: fileStartPosition, - FileData: fileData, - _BACnetServiceAckAtomicReadFileStreamOrRecord: NewBACnetServiceAckAtomicReadFileStreamOrRecord(peekedTagHeader, openingTag, closingTag), + FileData: fileData, + _BACnetServiceAckAtomicReadFileStreamOrRecord: NewBACnetServiceAckAtomicReadFileStreamOrRecord(peekedTagHeader, openingTag, closingTag), } _result._BACnetServiceAckAtomicReadFileStreamOrRecord._BACnetServiceAckAtomicReadFileStreamOrRecordChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewBACnetServiceAckAtomicReadFileStream(fileStartPosition BACnetApplication // Deprecated: use the interface for direct cast func CastBACnetServiceAckAtomicReadFileStream(structType interface{}) BACnetServiceAckAtomicReadFileStream { - if casted, ok := structType.(BACnetServiceAckAtomicReadFileStream); ok { + if casted, ok := structType.(BACnetServiceAckAtomicReadFileStream); ok { return casted } if casted, ok := structType.(*BACnetServiceAckAtomicReadFileStream); ok { @@ -128,6 +131,7 @@ func (m *_BACnetServiceAckAtomicReadFileStream) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetServiceAckAtomicReadFileStream) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -149,7 +153,7 @@ func BACnetServiceAckAtomicReadFileStreamParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("fileStartPosition"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for fileStartPosition") } - _fileStartPosition, _fileStartPositionErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_fileStartPosition, _fileStartPositionErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _fileStartPositionErr != nil { return nil, errors.Wrap(_fileStartPositionErr, "Error parsing 'fileStartPosition' field of BACnetServiceAckAtomicReadFileStream") } @@ -162,7 +166,7 @@ func BACnetServiceAckAtomicReadFileStreamParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("fileData"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for fileData") } - _fileData, _fileDataErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_fileData, _fileDataErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _fileDataErr != nil { return nil, errors.Wrap(_fileDataErr, "Error parsing 'fileData' field of BACnetServiceAckAtomicReadFileStream") } @@ -177,9 +181,10 @@ func BACnetServiceAckAtomicReadFileStreamParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_BACnetServiceAckAtomicReadFileStream{ - _BACnetServiceAckAtomicReadFileStreamOrRecord: &_BACnetServiceAckAtomicReadFileStreamOrRecord{}, + _BACnetServiceAckAtomicReadFileStreamOrRecord: &_BACnetServiceAckAtomicReadFileStreamOrRecord{ + }, FileStartPosition: fileStartPosition, - FileData: fileData, + FileData: fileData, } _child._BACnetServiceAckAtomicReadFileStreamOrRecord._BACnetServiceAckAtomicReadFileStreamOrRecordChildRequirements = _child return _child, nil @@ -201,29 +206,29 @@ func (m *_BACnetServiceAckAtomicReadFileStream) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetServiceAckAtomicReadFileStream") } - // Simple Field (fileStartPosition) - if pushErr := writeBuffer.PushContext("fileStartPosition"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for fileStartPosition") - } - _fileStartPositionErr := writeBuffer.WriteSerializable(ctx, m.GetFileStartPosition()) - if popErr := writeBuffer.PopContext("fileStartPosition"); popErr != nil { - return errors.Wrap(popErr, "Error popping for fileStartPosition") - } - if _fileStartPositionErr != nil { - return errors.Wrap(_fileStartPositionErr, "Error serializing 'fileStartPosition' field") - } + // Simple Field (fileStartPosition) + if pushErr := writeBuffer.PushContext("fileStartPosition"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for fileStartPosition") + } + _fileStartPositionErr := writeBuffer.WriteSerializable(ctx, m.GetFileStartPosition()) + if popErr := writeBuffer.PopContext("fileStartPosition"); popErr != nil { + return errors.Wrap(popErr, "Error popping for fileStartPosition") + } + if _fileStartPositionErr != nil { + return errors.Wrap(_fileStartPositionErr, "Error serializing 'fileStartPosition' field") + } - // Simple Field (fileData) - if pushErr := writeBuffer.PushContext("fileData"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for fileData") - } - _fileDataErr := writeBuffer.WriteSerializable(ctx, m.GetFileData()) - if popErr := writeBuffer.PopContext("fileData"); popErr != nil { - return errors.Wrap(popErr, "Error popping for fileData") - } - if _fileDataErr != nil { - return errors.Wrap(_fileDataErr, "Error serializing 'fileData' field") - } + // Simple Field (fileData) + if pushErr := writeBuffer.PushContext("fileData"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for fileData") + } + _fileDataErr := writeBuffer.WriteSerializable(ctx, m.GetFileData()) + if popErr := writeBuffer.PopContext("fileData"); popErr != nil { + return errors.Wrap(popErr, "Error popping for fileData") + } + if _fileDataErr != nil { + return errors.Wrap(_fileDataErr, "Error serializing 'fileData' field") + } if popErr := writeBuffer.PopContext("BACnetServiceAckAtomicReadFileStream"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetServiceAckAtomicReadFileStream") @@ -233,6 +238,7 @@ func (m *_BACnetServiceAckAtomicReadFileStream) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetServiceAckAtomicReadFileStream) isBACnetServiceAckAtomicReadFileStream() bool { return true } @@ -247,3 +253,6 @@ func (m *_BACnetServiceAckAtomicReadFileStream) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckAtomicReadFileStreamOrRecord.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckAtomicReadFileStreamOrRecord.go index ad5bc6e4a0b..af8ed1931ef 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckAtomicReadFileStreamOrRecord.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckAtomicReadFileStreamOrRecord.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetServiceAckAtomicReadFileStreamOrRecord is the corresponding interface of BACnetServiceAckAtomicReadFileStreamOrRecord type BACnetServiceAckAtomicReadFileStreamOrRecord interface { @@ -51,9 +53,9 @@ type BACnetServiceAckAtomicReadFileStreamOrRecordExactly interface { // _BACnetServiceAckAtomicReadFileStreamOrRecord is the data-structure of this message type _BACnetServiceAckAtomicReadFileStreamOrRecord struct { _BACnetServiceAckAtomicReadFileStreamOrRecordChildRequirements - PeekedTagHeader BACnetTagHeader - OpeningTag BACnetOpeningTag - ClosingTag BACnetClosingTag + PeekedTagHeader BACnetTagHeader + OpeningTag BACnetOpeningTag + ClosingTag BACnetClosingTag } type _BACnetServiceAckAtomicReadFileStreamOrRecordChildRequirements interface { @@ -61,6 +63,7 @@ type _BACnetServiceAckAtomicReadFileStreamOrRecordChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type BACnetServiceAckAtomicReadFileStreamOrRecordParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetServiceAckAtomicReadFileStreamOrRecord, serializeChildFunction func() error) error GetTypeName() string @@ -68,13 +71,12 @@ type BACnetServiceAckAtomicReadFileStreamOrRecordParent interface { type BACnetServiceAckAtomicReadFileStreamOrRecordChild interface { utils.Serializable - InitializeParent(parent BACnetServiceAckAtomicReadFileStreamOrRecord, peekedTagHeader BACnetTagHeader, openingTag BACnetOpeningTag, closingTag BACnetClosingTag) +InitializeParent(parent BACnetServiceAckAtomicReadFileStreamOrRecord , peekedTagHeader BACnetTagHeader , openingTag BACnetOpeningTag , closingTag BACnetClosingTag ) GetParent() *BACnetServiceAckAtomicReadFileStreamOrRecord GetTypeName() string BACnetServiceAckAtomicReadFileStreamOrRecord } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -112,14 +114,15 @@ func (m *_BACnetServiceAckAtomicReadFileStreamOrRecord) GetPeekedTagNumber() uin /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetServiceAckAtomicReadFileStreamOrRecord factory function for _BACnetServiceAckAtomicReadFileStreamOrRecord -func NewBACnetServiceAckAtomicReadFileStreamOrRecord(peekedTagHeader BACnetTagHeader, openingTag BACnetOpeningTag, closingTag BACnetClosingTag) *_BACnetServiceAckAtomicReadFileStreamOrRecord { - return &_BACnetServiceAckAtomicReadFileStreamOrRecord{PeekedTagHeader: peekedTagHeader, OpeningTag: openingTag, ClosingTag: closingTag} +func NewBACnetServiceAckAtomicReadFileStreamOrRecord( peekedTagHeader BACnetTagHeader , openingTag BACnetOpeningTag , closingTag BACnetClosingTag ) *_BACnetServiceAckAtomicReadFileStreamOrRecord { +return &_BACnetServiceAckAtomicReadFileStreamOrRecord{ PeekedTagHeader: peekedTagHeader , OpeningTag: openingTag , ClosingTag: closingTag } } // Deprecated: use the interface for direct cast func CastBACnetServiceAckAtomicReadFileStreamOrRecord(structType interface{}) BACnetServiceAckAtomicReadFileStreamOrRecord { - if casted, ok := structType.(BACnetServiceAckAtomicReadFileStreamOrRecord); ok { + if casted, ok := structType.(BACnetServiceAckAtomicReadFileStreamOrRecord); ok { return casted } if casted, ok := structType.(*BACnetServiceAckAtomicReadFileStreamOrRecord); ok { @@ -132,6 +135,7 @@ func (m *_BACnetServiceAckAtomicReadFileStreamOrRecord) GetTypeName() string { return "BACnetServiceAckAtomicReadFileStreamOrRecord" } + func (m *_BACnetServiceAckAtomicReadFileStreamOrRecord) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -163,19 +167,19 @@ func BACnetServiceAckAtomicReadFileStreamOrRecordParseWithBuffer(ctx context.Con currentPos := positionAware.GetPos() _ = currentPos - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Simple Field (openingTag) if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagHeader.GetActualTagNumber())) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagHeader.GetActualTagNumber() ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetServiceAckAtomicReadFileStreamOrRecord") } @@ -192,17 +196,17 @@ func BACnetServiceAckAtomicReadFileStreamOrRecordParseWithBuffer(ctx context.Con // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetServiceAckAtomicReadFileStreamOrRecordChildSerializeRequirement interface { BACnetServiceAckAtomicReadFileStreamOrRecord - InitializeParent(BACnetServiceAckAtomicReadFileStreamOrRecord, BACnetTagHeader, BACnetOpeningTag, BACnetClosingTag) + InitializeParent(BACnetServiceAckAtomicReadFileStreamOrRecord, BACnetTagHeader, BACnetOpeningTag, BACnetClosingTag) GetParent() BACnetServiceAckAtomicReadFileStreamOrRecord } var _childTemp interface{} var _child BACnetServiceAckAtomicReadFileStreamOrRecordChildSerializeRequirement var typeSwitchError error switch { - case peekedTagNumber == 0x0: // BACnetServiceAckAtomicReadFileStream - _childTemp, typeSwitchError = BACnetServiceAckAtomicReadFileStreamParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == 0x1: // BACnetServiceAckAtomicReadFileRecord - _childTemp, typeSwitchError = BACnetServiceAckAtomicReadFileRecordParseWithBuffer(ctx, readBuffer) +case peekedTagNumber == 0x0 : // BACnetServiceAckAtomicReadFileStream + _childTemp, typeSwitchError = BACnetServiceAckAtomicReadFileStreamParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == 0x1 : // BACnetServiceAckAtomicReadFileRecord + _childTemp, typeSwitchError = BACnetServiceAckAtomicReadFileRecordParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedTagNumber=%v]", peekedTagNumber) } @@ -215,7 +219,7 @@ func BACnetServiceAckAtomicReadFileStreamOrRecordParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(peekedTagHeader.GetActualTagNumber())) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( peekedTagHeader.GetActualTagNumber() ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetServiceAckAtomicReadFileStreamOrRecord") } @@ -229,7 +233,7 @@ func BACnetServiceAckAtomicReadFileStreamOrRecordParseWithBuffer(ctx context.Con } // Finish initializing - _child.InitializeParent(_child, peekedTagHeader, openingTag, closingTag) +_child.InitializeParent(_child , peekedTagHeader , openingTag , closingTag ) return _child, nil } @@ -239,7 +243,7 @@ func (pm *_BACnetServiceAckAtomicReadFileStreamOrRecord) SerializeParent(ctx con _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetServiceAckAtomicReadFileStreamOrRecord"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetServiceAckAtomicReadFileStreamOrRecord"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetServiceAckAtomicReadFileStreamOrRecord") } @@ -282,6 +286,7 @@ func (pm *_BACnetServiceAckAtomicReadFileStreamOrRecord) SerializeParent(ctx con return nil } + func (m *_BACnetServiceAckAtomicReadFileStreamOrRecord) isBACnetServiceAckAtomicReadFileStreamOrRecord() bool { return true } @@ -296,3 +301,6 @@ func (m *_BACnetServiceAckAtomicReadFileStreamOrRecord) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckAtomicWriteFile.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckAtomicWriteFile.go index a6d0851e64a..bd365134d9d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckAtomicWriteFile.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckAtomicWriteFile.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetServiceAckAtomicWriteFile is the corresponding interface of BACnetServiceAckAtomicWriteFile type BACnetServiceAckAtomicWriteFile interface { @@ -46,29 +48,29 @@ type BACnetServiceAckAtomicWriteFileExactly interface { // _BACnetServiceAckAtomicWriteFile is the data-structure of this message type _BACnetServiceAckAtomicWriteFile struct { *_BACnetServiceAck - FileStartPosition BACnetContextTagSignedInteger + FileStartPosition BACnetContextTagSignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetServiceAckAtomicWriteFile) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_ATOMIC_WRITE_FILE -} +func (m *_BACnetServiceAckAtomicWriteFile) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_ATOMIC_WRITE_FILE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetServiceAckAtomicWriteFile) InitializeParent(parent BACnetServiceAck) {} +func (m *_BACnetServiceAckAtomicWriteFile) InitializeParent(parent BACnetServiceAck ) {} -func (m *_BACnetServiceAckAtomicWriteFile) GetParent() BACnetServiceAck { +func (m *_BACnetServiceAckAtomicWriteFile) GetParent() BACnetServiceAck { return m._BACnetServiceAck } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetServiceAckAtomicWriteFile) GetFileStartPosition() BACnetContextT /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetServiceAckAtomicWriteFile factory function for _BACnetServiceAckAtomicWriteFile -func NewBACnetServiceAckAtomicWriteFile(fileStartPosition BACnetContextTagSignedInteger, serviceAckLength uint32) *_BACnetServiceAckAtomicWriteFile { +func NewBACnetServiceAckAtomicWriteFile( fileStartPosition BACnetContextTagSignedInteger , serviceAckLength uint32 ) *_BACnetServiceAckAtomicWriteFile { _result := &_BACnetServiceAckAtomicWriteFile{ FileStartPosition: fileStartPosition, - _BACnetServiceAck: NewBACnetServiceAck(serviceAckLength), + _BACnetServiceAck: NewBACnetServiceAck(serviceAckLength), } _result._BACnetServiceAck._BACnetServiceAckChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetServiceAckAtomicWriteFile(fileStartPosition BACnetContextTagSigned // Deprecated: use the interface for direct cast func CastBACnetServiceAckAtomicWriteFile(structType interface{}) BACnetServiceAckAtomicWriteFile { - if casted, ok := structType.(BACnetServiceAckAtomicWriteFile); ok { + if casted, ok := structType.(BACnetServiceAckAtomicWriteFile); ok { return casted } if casted, ok := structType.(*BACnetServiceAckAtomicWriteFile); ok { @@ -117,6 +120,7 @@ func (m *_BACnetServiceAckAtomicWriteFile) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetServiceAckAtomicWriteFile) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetServiceAckAtomicWriteFileParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("fileStartPosition"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for fileStartPosition") } - _fileStartPosition, _fileStartPositionErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_SIGNED_INTEGER)) +_fileStartPosition, _fileStartPositionErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_SIGNED_INTEGER ) ) if _fileStartPositionErr != nil { return nil, errors.Wrap(_fileStartPositionErr, "Error parsing 'fileStartPosition' field of BACnetServiceAckAtomicWriteFile") } @@ -178,17 +182,17 @@ func (m *_BACnetServiceAckAtomicWriteFile) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetServiceAckAtomicWriteFile") } - // Simple Field (fileStartPosition) - if pushErr := writeBuffer.PushContext("fileStartPosition"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for fileStartPosition") - } - _fileStartPositionErr := writeBuffer.WriteSerializable(ctx, m.GetFileStartPosition()) - if popErr := writeBuffer.PopContext("fileStartPosition"); popErr != nil { - return errors.Wrap(popErr, "Error popping for fileStartPosition") - } - if _fileStartPositionErr != nil { - return errors.Wrap(_fileStartPositionErr, "Error serializing 'fileStartPosition' field") - } + // Simple Field (fileStartPosition) + if pushErr := writeBuffer.PushContext("fileStartPosition"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for fileStartPosition") + } + _fileStartPositionErr := writeBuffer.WriteSerializable(ctx, m.GetFileStartPosition()) + if popErr := writeBuffer.PopContext("fileStartPosition"); popErr != nil { + return errors.Wrap(popErr, "Error popping for fileStartPosition") + } + if _fileStartPositionErr != nil { + return errors.Wrap(_fileStartPositionErr, "Error serializing 'fileStartPosition' field") + } if popErr := writeBuffer.PopContext("BACnetServiceAckAtomicWriteFile"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetServiceAckAtomicWriteFile") @@ -198,6 +202,7 @@ func (m *_BACnetServiceAckAtomicWriteFile) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetServiceAckAtomicWriteFile) isBACnetServiceAckAtomicWriteFile() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetServiceAckAtomicWriteFile) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckAuthenticate.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckAuthenticate.go index c316a820d4d..c96d4cbc58f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckAuthenticate.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckAuthenticate.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetServiceAckAuthenticate is the corresponding interface of BACnetServiceAckAuthenticate type BACnetServiceAckAuthenticate interface { @@ -46,32 +48,32 @@ type BACnetServiceAckAuthenticateExactly interface { // _BACnetServiceAckAuthenticate is the data-structure of this message type _BACnetServiceAckAuthenticate struct { *_BACnetServiceAck - BytesOfRemovedService []byte + BytesOfRemovedService []byte // Arguments. ServiceAckPayloadLength uint32 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetServiceAckAuthenticate) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_AUTHENTICATE -} +func (m *_BACnetServiceAckAuthenticate) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_AUTHENTICATE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetServiceAckAuthenticate) InitializeParent(parent BACnetServiceAck) {} +func (m *_BACnetServiceAckAuthenticate) InitializeParent(parent BACnetServiceAck ) {} -func (m *_BACnetServiceAckAuthenticate) GetParent() BACnetServiceAck { +func (m *_BACnetServiceAckAuthenticate) GetParent() BACnetServiceAck { return m._BACnetServiceAck } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -86,11 +88,12 @@ func (m *_BACnetServiceAckAuthenticate) GetBytesOfRemovedService() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetServiceAckAuthenticate factory function for _BACnetServiceAckAuthenticate -func NewBACnetServiceAckAuthenticate(bytesOfRemovedService []byte, serviceAckPayloadLength uint32, serviceAckLength uint32) *_BACnetServiceAckAuthenticate { +func NewBACnetServiceAckAuthenticate( bytesOfRemovedService []byte , serviceAckPayloadLength uint32 , serviceAckLength uint32 ) *_BACnetServiceAckAuthenticate { _result := &_BACnetServiceAckAuthenticate{ BytesOfRemovedService: bytesOfRemovedService, - _BACnetServiceAck: NewBACnetServiceAck(serviceAckLength), + _BACnetServiceAck: NewBACnetServiceAck(serviceAckLength), } _result._BACnetServiceAck._BACnetServiceAckChildRequirements = _result return _result @@ -98,7 +101,7 @@ func NewBACnetServiceAckAuthenticate(bytesOfRemovedService []byte, serviceAckPay // Deprecated: use the interface for direct cast func CastBACnetServiceAckAuthenticate(structType interface{}) BACnetServiceAckAuthenticate { - if casted, ok := structType.(BACnetServiceAckAuthenticate); ok { + if casted, ok := structType.(BACnetServiceAckAuthenticate); ok { return casted } if casted, ok := structType.(*BACnetServiceAckAuthenticate); ok { @@ -122,6 +125,7 @@ func (m *_BACnetServiceAckAuthenticate) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_BACnetServiceAckAuthenticate) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -176,11 +180,11 @@ func (m *_BACnetServiceAckAuthenticate) SerializeWithWriteBuffer(ctx context.Con return errors.Wrap(pushErr, "Error pushing for BACnetServiceAckAuthenticate") } - // Array Field (bytesOfRemovedService) - // Byte Array field (bytesOfRemovedService) - if err := writeBuffer.WriteByteArray("bytesOfRemovedService", m.GetBytesOfRemovedService()); err != nil { - return errors.Wrap(err, "Error serializing 'bytesOfRemovedService' field") - } + // Array Field (bytesOfRemovedService) + // Byte Array field (bytesOfRemovedService) + if err := writeBuffer.WriteByteArray("bytesOfRemovedService", m.GetBytesOfRemovedService()); err != nil { + return errors.Wrap(err, "Error serializing 'bytesOfRemovedService' field") + } if popErr := writeBuffer.PopContext("BACnetServiceAckAuthenticate"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetServiceAckAuthenticate") @@ -190,13 +194,13 @@ func (m *_BACnetServiceAckAuthenticate) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + //// // Arguments Getter func (m *_BACnetServiceAckAuthenticate) GetServiceAckPayloadLength() uint32 { return m.ServiceAckPayloadLength } - // //// @@ -214,3 +218,6 @@ func (m *_BACnetServiceAckAuthenticate) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckConfirmedPrivateTransfer.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckConfirmedPrivateTransfer.go index 02e1d7075dc..c3078c61ab4 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckConfirmedPrivateTransfer.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckConfirmedPrivateTransfer.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetServiceAckConfirmedPrivateTransfer is the corresponding interface of BACnetServiceAckConfirmedPrivateTransfer type BACnetServiceAckConfirmedPrivateTransfer interface { @@ -51,31 +53,31 @@ type BACnetServiceAckConfirmedPrivateTransferExactly interface { // _BACnetServiceAckConfirmedPrivateTransfer is the data-structure of this message type _BACnetServiceAckConfirmedPrivateTransfer struct { *_BACnetServiceAck - VendorId BACnetVendorIdTagged - ServiceNumber BACnetContextTagUnsignedInteger - ResultBlock BACnetConstructedData + VendorId BACnetVendorIdTagged + ServiceNumber BACnetContextTagUnsignedInteger + ResultBlock BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetServiceAckConfirmedPrivateTransfer) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_CONFIRMED_PRIVATE_TRANSFER -} +func (m *_BACnetServiceAckConfirmedPrivateTransfer) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_CONFIRMED_PRIVATE_TRANSFER} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetServiceAckConfirmedPrivateTransfer) InitializeParent(parent BACnetServiceAck) {} +func (m *_BACnetServiceAckConfirmedPrivateTransfer) InitializeParent(parent BACnetServiceAck ) {} -func (m *_BACnetServiceAckConfirmedPrivateTransfer) GetParent() BACnetServiceAck { +func (m *_BACnetServiceAckConfirmedPrivateTransfer) GetParent() BACnetServiceAck { return m._BACnetServiceAck } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,13 +100,14 @@ func (m *_BACnetServiceAckConfirmedPrivateTransfer) GetResultBlock() BACnetConst /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetServiceAckConfirmedPrivateTransfer factory function for _BACnetServiceAckConfirmedPrivateTransfer -func NewBACnetServiceAckConfirmedPrivateTransfer(vendorId BACnetVendorIdTagged, serviceNumber BACnetContextTagUnsignedInteger, resultBlock BACnetConstructedData, serviceAckLength uint32) *_BACnetServiceAckConfirmedPrivateTransfer { +func NewBACnetServiceAckConfirmedPrivateTransfer( vendorId BACnetVendorIdTagged , serviceNumber BACnetContextTagUnsignedInteger , resultBlock BACnetConstructedData , serviceAckLength uint32 ) *_BACnetServiceAckConfirmedPrivateTransfer { _result := &_BACnetServiceAckConfirmedPrivateTransfer{ - VendorId: vendorId, - ServiceNumber: serviceNumber, - ResultBlock: resultBlock, - _BACnetServiceAck: NewBACnetServiceAck(serviceAckLength), + VendorId: vendorId, + ServiceNumber: serviceNumber, + ResultBlock: resultBlock, + _BACnetServiceAck: NewBACnetServiceAck(serviceAckLength), } _result._BACnetServiceAck._BACnetServiceAckChildRequirements = _result return _result @@ -112,7 +115,7 @@ func NewBACnetServiceAckConfirmedPrivateTransfer(vendorId BACnetVendorIdTagged, // Deprecated: use the interface for direct cast func CastBACnetServiceAckConfirmedPrivateTransfer(structType interface{}) BACnetServiceAckConfirmedPrivateTransfer { - if casted, ok := structType.(BACnetServiceAckConfirmedPrivateTransfer); ok { + if casted, ok := structType.(BACnetServiceAckConfirmedPrivateTransfer); ok { return casted } if casted, ok := structType.(*BACnetServiceAckConfirmedPrivateTransfer); ok { @@ -142,6 +145,7 @@ func (m *_BACnetServiceAckConfirmedPrivateTransfer) GetLengthInBits(ctx context. return lengthInBits } + func (m *_BACnetServiceAckConfirmedPrivateTransfer) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -163,7 +167,7 @@ func BACnetServiceAckConfirmedPrivateTransferParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("vendorId"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for vendorId") } - _vendorId, _vendorIdErr := BACnetVendorIdTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_vendorId, _vendorIdErr := BACnetVendorIdTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _vendorIdErr != nil { return nil, errors.Wrap(_vendorIdErr, "Error parsing 'vendorId' field of BACnetServiceAckConfirmedPrivateTransfer") } @@ -176,7 +180,7 @@ func BACnetServiceAckConfirmedPrivateTransferParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("serviceNumber"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for serviceNumber") } - _serviceNumber, _serviceNumberErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_serviceNumber, _serviceNumberErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _serviceNumberErr != nil { return nil, errors.Wrap(_serviceNumberErr, "Error parsing 'serviceNumber' field of BACnetServiceAckConfirmedPrivateTransfer") } @@ -187,12 +191,12 @@ func BACnetServiceAckConfirmedPrivateTransferParseWithBuffer(ctx context.Context // Optional Field (resultBlock) (Can be skipped, if a given expression evaluates to false) var resultBlock BACnetConstructedData = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("resultBlock"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for resultBlock") } - _val, _err := BACnetConstructedDataParseWithBuffer(ctx, readBuffer, uint8(2), BACnetObjectType_VENDOR_PROPRIETARY_VALUE, BACnetPropertyIdentifier_VENDOR_PROPRIETARY_VALUE, nil) +_val, _err := BACnetConstructedDataParseWithBuffer(ctx, readBuffer , uint8(2) , BACnetObjectType_VENDOR_PROPRIETARY_VALUE , BACnetPropertyIdentifier_VENDOR_PROPRIETARY_VALUE , nil ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -216,9 +220,9 @@ func BACnetServiceAckConfirmedPrivateTransferParseWithBuffer(ctx context.Context _BACnetServiceAck: &_BACnetServiceAck{ ServiceAckLength: serviceAckLength, }, - VendorId: vendorId, + VendorId: vendorId, ServiceNumber: serviceNumber, - ResultBlock: resultBlock, + ResultBlock: resultBlock, } _child._BACnetServiceAck._BACnetServiceAckChildRequirements = _child return _child, nil @@ -240,45 +244,45 @@ func (m *_BACnetServiceAckConfirmedPrivateTransfer) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetServiceAckConfirmedPrivateTransfer") } - // Simple Field (vendorId) - if pushErr := writeBuffer.PushContext("vendorId"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for vendorId") - } - _vendorIdErr := writeBuffer.WriteSerializable(ctx, m.GetVendorId()) - if popErr := writeBuffer.PopContext("vendorId"); popErr != nil { - return errors.Wrap(popErr, "Error popping for vendorId") - } - if _vendorIdErr != nil { - return errors.Wrap(_vendorIdErr, "Error serializing 'vendorId' field") - } + // Simple Field (vendorId) + if pushErr := writeBuffer.PushContext("vendorId"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for vendorId") + } + _vendorIdErr := writeBuffer.WriteSerializable(ctx, m.GetVendorId()) + if popErr := writeBuffer.PopContext("vendorId"); popErr != nil { + return errors.Wrap(popErr, "Error popping for vendorId") + } + if _vendorIdErr != nil { + return errors.Wrap(_vendorIdErr, "Error serializing 'vendorId' field") + } - // Simple Field (serviceNumber) - if pushErr := writeBuffer.PushContext("serviceNumber"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for serviceNumber") + // Simple Field (serviceNumber) + if pushErr := writeBuffer.PushContext("serviceNumber"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for serviceNumber") + } + _serviceNumberErr := writeBuffer.WriteSerializable(ctx, m.GetServiceNumber()) + if popErr := writeBuffer.PopContext("serviceNumber"); popErr != nil { + return errors.Wrap(popErr, "Error popping for serviceNumber") + } + if _serviceNumberErr != nil { + return errors.Wrap(_serviceNumberErr, "Error serializing 'serviceNumber' field") + } + + // Optional Field (resultBlock) (Can be skipped, if the value is null) + var resultBlock BACnetConstructedData = nil + if m.GetResultBlock() != nil { + if pushErr := writeBuffer.PushContext("resultBlock"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for resultBlock") } - _serviceNumberErr := writeBuffer.WriteSerializable(ctx, m.GetServiceNumber()) - if popErr := writeBuffer.PopContext("serviceNumber"); popErr != nil { - return errors.Wrap(popErr, "Error popping for serviceNumber") + resultBlock = m.GetResultBlock() + _resultBlockErr := writeBuffer.WriteSerializable(ctx, resultBlock) + if popErr := writeBuffer.PopContext("resultBlock"); popErr != nil { + return errors.Wrap(popErr, "Error popping for resultBlock") } - if _serviceNumberErr != nil { - return errors.Wrap(_serviceNumberErr, "Error serializing 'serviceNumber' field") - } - - // Optional Field (resultBlock) (Can be skipped, if the value is null) - var resultBlock BACnetConstructedData = nil - if m.GetResultBlock() != nil { - if pushErr := writeBuffer.PushContext("resultBlock"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for resultBlock") - } - resultBlock = m.GetResultBlock() - _resultBlockErr := writeBuffer.WriteSerializable(ctx, resultBlock) - if popErr := writeBuffer.PopContext("resultBlock"); popErr != nil { - return errors.Wrap(popErr, "Error popping for resultBlock") - } - if _resultBlockErr != nil { - return errors.Wrap(_resultBlockErr, "Error serializing 'resultBlock' field") - } + if _resultBlockErr != nil { + return errors.Wrap(_resultBlockErr, "Error serializing 'resultBlock' field") } + } if popErr := writeBuffer.PopContext("BACnetServiceAckConfirmedPrivateTransfer"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetServiceAckConfirmedPrivateTransfer") @@ -288,6 +292,7 @@ func (m *_BACnetServiceAckConfirmedPrivateTransfer) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetServiceAckConfirmedPrivateTransfer) isBACnetServiceAckConfirmedPrivateTransfer() bool { return true } @@ -302,3 +307,6 @@ func (m *_BACnetServiceAckConfirmedPrivateTransfer) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckCreateObject.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckCreateObject.go index 5fa1a67b96a..4ed33fc5e09 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckCreateObject.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckCreateObject.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetServiceAckCreateObject is the corresponding interface of BACnetServiceAckCreateObject type BACnetServiceAckCreateObject interface { @@ -46,29 +48,29 @@ type BACnetServiceAckCreateObjectExactly interface { // _BACnetServiceAckCreateObject is the data-structure of this message type _BACnetServiceAckCreateObject struct { *_BACnetServiceAck - ObjectIdentifier BACnetApplicationTagObjectIdentifier + ObjectIdentifier BACnetApplicationTagObjectIdentifier } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetServiceAckCreateObject) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_CREATE_OBJECT -} +func (m *_BACnetServiceAckCreateObject) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_CREATE_OBJECT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetServiceAckCreateObject) InitializeParent(parent BACnetServiceAck) {} +func (m *_BACnetServiceAckCreateObject) InitializeParent(parent BACnetServiceAck ) {} -func (m *_BACnetServiceAckCreateObject) GetParent() BACnetServiceAck { +func (m *_BACnetServiceAckCreateObject) GetParent() BACnetServiceAck { return m._BACnetServiceAck } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetServiceAckCreateObject) GetObjectIdentifier() BACnetApplicationT /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetServiceAckCreateObject factory function for _BACnetServiceAckCreateObject -func NewBACnetServiceAckCreateObject(objectIdentifier BACnetApplicationTagObjectIdentifier, serviceAckLength uint32) *_BACnetServiceAckCreateObject { +func NewBACnetServiceAckCreateObject( objectIdentifier BACnetApplicationTagObjectIdentifier , serviceAckLength uint32 ) *_BACnetServiceAckCreateObject { _result := &_BACnetServiceAckCreateObject{ - ObjectIdentifier: objectIdentifier, - _BACnetServiceAck: NewBACnetServiceAck(serviceAckLength), + ObjectIdentifier: objectIdentifier, + _BACnetServiceAck: NewBACnetServiceAck(serviceAckLength), } _result._BACnetServiceAck._BACnetServiceAckChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetServiceAckCreateObject(objectIdentifier BACnetApplicationTagObject // Deprecated: use the interface for direct cast func CastBACnetServiceAckCreateObject(structType interface{}) BACnetServiceAckCreateObject { - if casted, ok := structType.(BACnetServiceAckCreateObject); ok { + if casted, ok := structType.(BACnetServiceAckCreateObject); ok { return casted } if casted, ok := structType.(*BACnetServiceAckCreateObject); ok { @@ -117,6 +120,7 @@ func (m *_BACnetServiceAckCreateObject) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_BACnetServiceAckCreateObject) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetServiceAckCreateObjectParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("objectIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for objectIdentifier") } - _objectIdentifier, _objectIdentifierErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_objectIdentifier, _objectIdentifierErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _objectIdentifierErr != nil { return nil, errors.Wrap(_objectIdentifierErr, "Error parsing 'objectIdentifier' field of BACnetServiceAckCreateObject") } @@ -178,17 +182,17 @@ func (m *_BACnetServiceAckCreateObject) SerializeWithWriteBuffer(ctx context.Con return errors.Wrap(pushErr, "Error pushing for BACnetServiceAckCreateObject") } - // Simple Field (objectIdentifier) - if pushErr := writeBuffer.PushContext("objectIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for objectIdentifier") - } - _objectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetObjectIdentifier()) - if popErr := writeBuffer.PopContext("objectIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for objectIdentifier") - } - if _objectIdentifierErr != nil { - return errors.Wrap(_objectIdentifierErr, "Error serializing 'objectIdentifier' field") - } + // Simple Field (objectIdentifier) + if pushErr := writeBuffer.PushContext("objectIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for objectIdentifier") + } + _objectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetObjectIdentifier()) + if popErr := writeBuffer.PopContext("objectIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for objectIdentifier") + } + if _objectIdentifierErr != nil { + return errors.Wrap(_objectIdentifierErr, "Error serializing 'objectIdentifier' field") + } if popErr := writeBuffer.PopContext("BACnetServiceAckCreateObject"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetServiceAckCreateObject") @@ -198,6 +202,7 @@ func (m *_BACnetServiceAckCreateObject) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetServiceAckCreateObject) isBACnetServiceAckCreateObject() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetServiceAckCreateObject) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckGetAlarmSummary.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckGetAlarmSummary.go index 3d766741dac..6120052436e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckGetAlarmSummary.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckGetAlarmSummary.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetServiceAckGetAlarmSummary is the corresponding interface of BACnetServiceAckGetAlarmSummary type BACnetServiceAckGetAlarmSummary interface { @@ -50,31 +52,31 @@ type BACnetServiceAckGetAlarmSummaryExactly interface { // _BACnetServiceAckGetAlarmSummary is the data-structure of this message type _BACnetServiceAckGetAlarmSummary struct { *_BACnetServiceAck - ObjectIdentifier BACnetApplicationTagObjectIdentifier - EventState BACnetEventStateTagged - AcknowledgedTransitions BACnetEventTransitionBitsTagged + ObjectIdentifier BACnetApplicationTagObjectIdentifier + EventState BACnetEventStateTagged + AcknowledgedTransitions BACnetEventTransitionBitsTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetServiceAckGetAlarmSummary) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_GET_ALARM_SUMMARY -} +func (m *_BACnetServiceAckGetAlarmSummary) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_GET_ALARM_SUMMARY} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetServiceAckGetAlarmSummary) InitializeParent(parent BACnetServiceAck) {} +func (m *_BACnetServiceAckGetAlarmSummary) InitializeParent(parent BACnetServiceAck ) {} -func (m *_BACnetServiceAckGetAlarmSummary) GetParent() BACnetServiceAck { +func (m *_BACnetServiceAckGetAlarmSummary) GetParent() BACnetServiceAck { return m._BACnetServiceAck } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -97,13 +99,14 @@ func (m *_BACnetServiceAckGetAlarmSummary) GetAcknowledgedTransitions() BACnetEv /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetServiceAckGetAlarmSummary factory function for _BACnetServiceAckGetAlarmSummary -func NewBACnetServiceAckGetAlarmSummary(objectIdentifier BACnetApplicationTagObjectIdentifier, eventState BACnetEventStateTagged, acknowledgedTransitions BACnetEventTransitionBitsTagged, serviceAckLength uint32) *_BACnetServiceAckGetAlarmSummary { +func NewBACnetServiceAckGetAlarmSummary( objectIdentifier BACnetApplicationTagObjectIdentifier , eventState BACnetEventStateTagged , acknowledgedTransitions BACnetEventTransitionBitsTagged , serviceAckLength uint32 ) *_BACnetServiceAckGetAlarmSummary { _result := &_BACnetServiceAckGetAlarmSummary{ - ObjectIdentifier: objectIdentifier, - EventState: eventState, + ObjectIdentifier: objectIdentifier, + EventState: eventState, AcknowledgedTransitions: acknowledgedTransitions, - _BACnetServiceAck: NewBACnetServiceAck(serviceAckLength), + _BACnetServiceAck: NewBACnetServiceAck(serviceAckLength), } _result._BACnetServiceAck._BACnetServiceAckChildRequirements = _result return _result @@ -111,7 +114,7 @@ func NewBACnetServiceAckGetAlarmSummary(objectIdentifier BACnetApplicationTagObj // Deprecated: use the interface for direct cast func CastBACnetServiceAckGetAlarmSummary(structType interface{}) BACnetServiceAckGetAlarmSummary { - if casted, ok := structType.(BACnetServiceAckGetAlarmSummary); ok { + if casted, ok := structType.(BACnetServiceAckGetAlarmSummary); ok { return casted } if casted, ok := structType.(*BACnetServiceAckGetAlarmSummary); ok { @@ -139,6 +142,7 @@ func (m *_BACnetServiceAckGetAlarmSummary) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetServiceAckGetAlarmSummary) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -160,7 +164,7 @@ func BACnetServiceAckGetAlarmSummaryParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("objectIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for objectIdentifier") } - _objectIdentifier, _objectIdentifierErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_objectIdentifier, _objectIdentifierErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _objectIdentifierErr != nil { return nil, errors.Wrap(_objectIdentifierErr, "Error parsing 'objectIdentifier' field of BACnetServiceAckGetAlarmSummary") } @@ -173,7 +177,7 @@ func BACnetServiceAckGetAlarmSummaryParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("eventState"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for eventState") } - _eventState, _eventStateErr := BACnetEventStateTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_eventState, _eventStateErr := BACnetEventStateTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _eventStateErr != nil { return nil, errors.Wrap(_eventStateErr, "Error parsing 'eventState' field of BACnetServiceAckGetAlarmSummary") } @@ -186,7 +190,7 @@ func BACnetServiceAckGetAlarmSummaryParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("acknowledgedTransitions"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for acknowledgedTransitions") } - _acknowledgedTransitions, _acknowledgedTransitionsErr := BACnetEventTransitionBitsTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_acknowledgedTransitions, _acknowledgedTransitionsErr := BACnetEventTransitionBitsTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _acknowledgedTransitionsErr != nil { return nil, errors.Wrap(_acknowledgedTransitionsErr, "Error parsing 'acknowledgedTransitions' field of BACnetServiceAckGetAlarmSummary") } @@ -204,8 +208,8 @@ func BACnetServiceAckGetAlarmSummaryParseWithBuffer(ctx context.Context, readBuf _BACnetServiceAck: &_BACnetServiceAck{ ServiceAckLength: serviceAckLength, }, - ObjectIdentifier: objectIdentifier, - EventState: eventState, + ObjectIdentifier: objectIdentifier, + EventState: eventState, AcknowledgedTransitions: acknowledgedTransitions, } _child._BACnetServiceAck._BACnetServiceAckChildRequirements = _child @@ -228,41 +232,41 @@ func (m *_BACnetServiceAckGetAlarmSummary) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetServiceAckGetAlarmSummary") } - // Simple Field (objectIdentifier) - if pushErr := writeBuffer.PushContext("objectIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for objectIdentifier") - } - _objectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetObjectIdentifier()) - if popErr := writeBuffer.PopContext("objectIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for objectIdentifier") - } - if _objectIdentifierErr != nil { - return errors.Wrap(_objectIdentifierErr, "Error serializing 'objectIdentifier' field") - } + // Simple Field (objectIdentifier) + if pushErr := writeBuffer.PushContext("objectIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for objectIdentifier") + } + _objectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetObjectIdentifier()) + if popErr := writeBuffer.PopContext("objectIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for objectIdentifier") + } + if _objectIdentifierErr != nil { + return errors.Wrap(_objectIdentifierErr, "Error serializing 'objectIdentifier' field") + } - // Simple Field (eventState) - if pushErr := writeBuffer.PushContext("eventState"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for eventState") - } - _eventStateErr := writeBuffer.WriteSerializable(ctx, m.GetEventState()) - if popErr := writeBuffer.PopContext("eventState"); popErr != nil { - return errors.Wrap(popErr, "Error popping for eventState") - } - if _eventStateErr != nil { - return errors.Wrap(_eventStateErr, "Error serializing 'eventState' field") - } + // Simple Field (eventState) + if pushErr := writeBuffer.PushContext("eventState"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for eventState") + } + _eventStateErr := writeBuffer.WriteSerializable(ctx, m.GetEventState()) + if popErr := writeBuffer.PopContext("eventState"); popErr != nil { + return errors.Wrap(popErr, "Error popping for eventState") + } + if _eventStateErr != nil { + return errors.Wrap(_eventStateErr, "Error serializing 'eventState' field") + } - // Simple Field (acknowledgedTransitions) - if pushErr := writeBuffer.PushContext("acknowledgedTransitions"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for acknowledgedTransitions") - } - _acknowledgedTransitionsErr := writeBuffer.WriteSerializable(ctx, m.GetAcknowledgedTransitions()) - if popErr := writeBuffer.PopContext("acknowledgedTransitions"); popErr != nil { - return errors.Wrap(popErr, "Error popping for acknowledgedTransitions") - } - if _acknowledgedTransitionsErr != nil { - return errors.Wrap(_acknowledgedTransitionsErr, "Error serializing 'acknowledgedTransitions' field") - } + // Simple Field (acknowledgedTransitions) + if pushErr := writeBuffer.PushContext("acknowledgedTransitions"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for acknowledgedTransitions") + } + _acknowledgedTransitionsErr := writeBuffer.WriteSerializable(ctx, m.GetAcknowledgedTransitions()) + if popErr := writeBuffer.PopContext("acknowledgedTransitions"); popErr != nil { + return errors.Wrap(popErr, "Error popping for acknowledgedTransitions") + } + if _acknowledgedTransitionsErr != nil { + return errors.Wrap(_acknowledgedTransitionsErr, "Error serializing 'acknowledgedTransitions' field") + } if popErr := writeBuffer.PopContext("BACnetServiceAckGetAlarmSummary"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetServiceAckGetAlarmSummary") @@ -272,6 +276,7 @@ func (m *_BACnetServiceAckGetAlarmSummary) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetServiceAckGetAlarmSummary) isBACnetServiceAckGetAlarmSummary() bool { return true } @@ -286,3 +291,6 @@ func (m *_BACnetServiceAckGetAlarmSummary) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckGetEnrollmentSummary.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckGetEnrollmentSummary.go index 24146c04d63..f67513fabfb 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckGetEnrollmentSummary.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckGetEnrollmentSummary.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetServiceAckGetEnrollmentSummary is the corresponding interface of BACnetServiceAckGetEnrollmentSummary type BACnetServiceAckGetEnrollmentSummary interface { @@ -55,33 +57,33 @@ type BACnetServiceAckGetEnrollmentSummaryExactly interface { // _BACnetServiceAckGetEnrollmentSummary is the data-structure of this message type _BACnetServiceAckGetEnrollmentSummary struct { *_BACnetServiceAck - ObjectIdentifier BACnetApplicationTagObjectIdentifier - EventType BACnetEventTypeTagged - EventState BACnetEventStateTagged - Priority BACnetApplicationTagUnsignedInteger - NotificationClass BACnetApplicationTagUnsignedInteger + ObjectIdentifier BACnetApplicationTagObjectIdentifier + EventType BACnetEventTypeTagged + EventState BACnetEventStateTagged + Priority BACnetApplicationTagUnsignedInteger + NotificationClass BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetServiceAckGetEnrollmentSummary) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_GET_ENROLLMENT_SUMMARY -} +func (m *_BACnetServiceAckGetEnrollmentSummary) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_GET_ENROLLMENT_SUMMARY} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetServiceAckGetEnrollmentSummary) InitializeParent(parent BACnetServiceAck) {} +func (m *_BACnetServiceAckGetEnrollmentSummary) InitializeParent(parent BACnetServiceAck ) {} -func (m *_BACnetServiceAckGetEnrollmentSummary) GetParent() BACnetServiceAck { +func (m *_BACnetServiceAckGetEnrollmentSummary) GetParent() BACnetServiceAck { return m._BACnetServiceAck } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -112,15 +114,16 @@ func (m *_BACnetServiceAckGetEnrollmentSummary) GetNotificationClass() BACnetApp /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetServiceAckGetEnrollmentSummary factory function for _BACnetServiceAckGetEnrollmentSummary -func NewBACnetServiceAckGetEnrollmentSummary(objectIdentifier BACnetApplicationTagObjectIdentifier, eventType BACnetEventTypeTagged, eventState BACnetEventStateTagged, priority BACnetApplicationTagUnsignedInteger, notificationClass BACnetApplicationTagUnsignedInteger, serviceAckLength uint32) *_BACnetServiceAckGetEnrollmentSummary { +func NewBACnetServiceAckGetEnrollmentSummary( objectIdentifier BACnetApplicationTagObjectIdentifier , eventType BACnetEventTypeTagged , eventState BACnetEventStateTagged , priority BACnetApplicationTagUnsignedInteger , notificationClass BACnetApplicationTagUnsignedInteger , serviceAckLength uint32 ) *_BACnetServiceAckGetEnrollmentSummary { _result := &_BACnetServiceAckGetEnrollmentSummary{ - ObjectIdentifier: objectIdentifier, - EventType: eventType, - EventState: eventState, - Priority: priority, + ObjectIdentifier: objectIdentifier, + EventType: eventType, + EventState: eventState, + Priority: priority, NotificationClass: notificationClass, - _BACnetServiceAck: NewBACnetServiceAck(serviceAckLength), + _BACnetServiceAck: NewBACnetServiceAck(serviceAckLength), } _result._BACnetServiceAck._BACnetServiceAckChildRequirements = _result return _result @@ -128,7 +131,7 @@ func NewBACnetServiceAckGetEnrollmentSummary(objectIdentifier BACnetApplicationT // Deprecated: use the interface for direct cast func CastBACnetServiceAckGetEnrollmentSummary(structType interface{}) BACnetServiceAckGetEnrollmentSummary { - if casted, ok := structType.(BACnetServiceAckGetEnrollmentSummary); ok { + if casted, ok := structType.(BACnetServiceAckGetEnrollmentSummary); ok { return casted } if casted, ok := structType.(*BACnetServiceAckGetEnrollmentSummary); ok { @@ -164,6 +167,7 @@ func (m *_BACnetServiceAckGetEnrollmentSummary) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetServiceAckGetEnrollmentSummary) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -185,7 +189,7 @@ func BACnetServiceAckGetEnrollmentSummaryParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("objectIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for objectIdentifier") } - _objectIdentifier, _objectIdentifierErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_objectIdentifier, _objectIdentifierErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _objectIdentifierErr != nil { return nil, errors.Wrap(_objectIdentifierErr, "Error parsing 'objectIdentifier' field of BACnetServiceAckGetEnrollmentSummary") } @@ -198,7 +202,7 @@ func BACnetServiceAckGetEnrollmentSummaryParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("eventType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for eventType") } - _eventType, _eventTypeErr := BACnetEventTypeTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_eventType, _eventTypeErr := BACnetEventTypeTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _eventTypeErr != nil { return nil, errors.Wrap(_eventTypeErr, "Error parsing 'eventType' field of BACnetServiceAckGetEnrollmentSummary") } @@ -211,7 +215,7 @@ func BACnetServiceAckGetEnrollmentSummaryParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("eventState"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for eventState") } - _eventState, _eventStateErr := BACnetEventStateTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_eventState, _eventStateErr := BACnetEventStateTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _eventStateErr != nil { return nil, errors.Wrap(_eventStateErr, "Error parsing 'eventState' field of BACnetServiceAckGetEnrollmentSummary") } @@ -224,7 +228,7 @@ func BACnetServiceAckGetEnrollmentSummaryParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("priority"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for priority") } - _priority, _priorityErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_priority, _priorityErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _priorityErr != nil { return nil, errors.Wrap(_priorityErr, "Error parsing 'priority' field of BACnetServiceAckGetEnrollmentSummary") } @@ -235,12 +239,12 @@ func BACnetServiceAckGetEnrollmentSummaryParseWithBuffer(ctx context.Context, re // Optional Field (notificationClass) (Can be skipped, if a given expression evaluates to false) var notificationClass BACnetApplicationTagUnsignedInteger = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("notificationClass"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for notificationClass") } - _val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_val, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -264,10 +268,10 @@ func BACnetServiceAckGetEnrollmentSummaryParseWithBuffer(ctx context.Context, re _BACnetServiceAck: &_BACnetServiceAck{ ServiceAckLength: serviceAckLength, }, - ObjectIdentifier: objectIdentifier, - EventType: eventType, - EventState: eventState, - Priority: priority, + ObjectIdentifier: objectIdentifier, + EventType: eventType, + EventState: eventState, + Priority: priority, NotificationClass: notificationClass, } _child._BACnetServiceAck._BACnetServiceAckChildRequirements = _child @@ -290,69 +294,69 @@ func (m *_BACnetServiceAckGetEnrollmentSummary) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetServiceAckGetEnrollmentSummary") } - // Simple Field (objectIdentifier) - if pushErr := writeBuffer.PushContext("objectIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for objectIdentifier") - } - _objectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetObjectIdentifier()) - if popErr := writeBuffer.PopContext("objectIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for objectIdentifier") - } - if _objectIdentifierErr != nil { - return errors.Wrap(_objectIdentifierErr, "Error serializing 'objectIdentifier' field") - } + // Simple Field (objectIdentifier) + if pushErr := writeBuffer.PushContext("objectIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for objectIdentifier") + } + _objectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetObjectIdentifier()) + if popErr := writeBuffer.PopContext("objectIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for objectIdentifier") + } + if _objectIdentifierErr != nil { + return errors.Wrap(_objectIdentifierErr, "Error serializing 'objectIdentifier' field") + } - // Simple Field (eventType) - if pushErr := writeBuffer.PushContext("eventType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for eventType") - } - _eventTypeErr := writeBuffer.WriteSerializable(ctx, m.GetEventType()) - if popErr := writeBuffer.PopContext("eventType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for eventType") - } - if _eventTypeErr != nil { - return errors.Wrap(_eventTypeErr, "Error serializing 'eventType' field") - } + // Simple Field (eventType) + if pushErr := writeBuffer.PushContext("eventType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for eventType") + } + _eventTypeErr := writeBuffer.WriteSerializable(ctx, m.GetEventType()) + if popErr := writeBuffer.PopContext("eventType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for eventType") + } + if _eventTypeErr != nil { + return errors.Wrap(_eventTypeErr, "Error serializing 'eventType' field") + } - // Simple Field (eventState) - if pushErr := writeBuffer.PushContext("eventState"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for eventState") - } - _eventStateErr := writeBuffer.WriteSerializable(ctx, m.GetEventState()) - if popErr := writeBuffer.PopContext("eventState"); popErr != nil { - return errors.Wrap(popErr, "Error popping for eventState") - } - if _eventStateErr != nil { - return errors.Wrap(_eventStateErr, "Error serializing 'eventState' field") - } + // Simple Field (eventState) + if pushErr := writeBuffer.PushContext("eventState"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for eventState") + } + _eventStateErr := writeBuffer.WriteSerializable(ctx, m.GetEventState()) + if popErr := writeBuffer.PopContext("eventState"); popErr != nil { + return errors.Wrap(popErr, "Error popping for eventState") + } + if _eventStateErr != nil { + return errors.Wrap(_eventStateErr, "Error serializing 'eventState' field") + } - // Simple Field (priority) - if pushErr := writeBuffer.PushContext("priority"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for priority") - } - _priorityErr := writeBuffer.WriteSerializable(ctx, m.GetPriority()) - if popErr := writeBuffer.PopContext("priority"); popErr != nil { - return errors.Wrap(popErr, "Error popping for priority") + // Simple Field (priority) + if pushErr := writeBuffer.PushContext("priority"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for priority") + } + _priorityErr := writeBuffer.WriteSerializable(ctx, m.GetPriority()) + if popErr := writeBuffer.PopContext("priority"); popErr != nil { + return errors.Wrap(popErr, "Error popping for priority") + } + if _priorityErr != nil { + return errors.Wrap(_priorityErr, "Error serializing 'priority' field") + } + + // Optional Field (notificationClass) (Can be skipped, if the value is null) + var notificationClass BACnetApplicationTagUnsignedInteger = nil + if m.GetNotificationClass() != nil { + if pushErr := writeBuffer.PushContext("notificationClass"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for notificationClass") } - if _priorityErr != nil { - return errors.Wrap(_priorityErr, "Error serializing 'priority' field") + notificationClass = m.GetNotificationClass() + _notificationClassErr := writeBuffer.WriteSerializable(ctx, notificationClass) + if popErr := writeBuffer.PopContext("notificationClass"); popErr != nil { + return errors.Wrap(popErr, "Error popping for notificationClass") } - - // Optional Field (notificationClass) (Can be skipped, if the value is null) - var notificationClass BACnetApplicationTagUnsignedInteger = nil - if m.GetNotificationClass() != nil { - if pushErr := writeBuffer.PushContext("notificationClass"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for notificationClass") - } - notificationClass = m.GetNotificationClass() - _notificationClassErr := writeBuffer.WriteSerializable(ctx, notificationClass) - if popErr := writeBuffer.PopContext("notificationClass"); popErr != nil { - return errors.Wrap(popErr, "Error popping for notificationClass") - } - if _notificationClassErr != nil { - return errors.Wrap(_notificationClassErr, "Error serializing 'notificationClass' field") - } + if _notificationClassErr != nil { + return errors.Wrap(_notificationClassErr, "Error serializing 'notificationClass' field") } + } if popErr := writeBuffer.PopContext("BACnetServiceAckGetEnrollmentSummary"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetServiceAckGetEnrollmentSummary") @@ -362,6 +366,7 @@ func (m *_BACnetServiceAckGetEnrollmentSummary) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetServiceAckGetEnrollmentSummary) isBACnetServiceAckGetEnrollmentSummary() bool { return true } @@ -376,3 +381,6 @@ func (m *_BACnetServiceAckGetEnrollmentSummary) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckGetEventInformation.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckGetEventInformation.go index c7377909556..ccf400db594 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckGetEventInformation.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckGetEventInformation.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetServiceAckGetEventInformation is the corresponding interface of BACnetServiceAckGetEventInformation type BACnetServiceAckGetEventInformation interface { @@ -48,30 +50,30 @@ type BACnetServiceAckGetEventInformationExactly interface { // _BACnetServiceAckGetEventInformation is the data-structure of this message type _BACnetServiceAckGetEventInformation struct { *_BACnetServiceAck - ListOfEventSummaries BACnetEventSummariesList - MoreEvents BACnetContextTagBoolean + ListOfEventSummaries BACnetEventSummariesList + MoreEvents BACnetContextTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetServiceAckGetEventInformation) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_GET_EVENT_INFORMATION -} +func (m *_BACnetServiceAckGetEventInformation) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_GET_EVENT_INFORMATION} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetServiceAckGetEventInformation) InitializeParent(parent BACnetServiceAck) {} +func (m *_BACnetServiceAckGetEventInformation) InitializeParent(parent BACnetServiceAck ) {} -func (m *_BACnetServiceAckGetEventInformation) GetParent() BACnetServiceAck { +func (m *_BACnetServiceAckGetEventInformation) GetParent() BACnetServiceAck { return m._BACnetServiceAck } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_BACnetServiceAckGetEventInformation) GetMoreEvents() BACnetContextTagB /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetServiceAckGetEventInformation factory function for _BACnetServiceAckGetEventInformation -func NewBACnetServiceAckGetEventInformation(listOfEventSummaries BACnetEventSummariesList, moreEvents BACnetContextTagBoolean, serviceAckLength uint32) *_BACnetServiceAckGetEventInformation { +func NewBACnetServiceAckGetEventInformation( listOfEventSummaries BACnetEventSummariesList , moreEvents BACnetContextTagBoolean , serviceAckLength uint32 ) *_BACnetServiceAckGetEventInformation { _result := &_BACnetServiceAckGetEventInformation{ ListOfEventSummaries: listOfEventSummaries, - MoreEvents: moreEvents, - _BACnetServiceAck: NewBACnetServiceAck(serviceAckLength), + MoreEvents: moreEvents, + _BACnetServiceAck: NewBACnetServiceAck(serviceAckLength), } _result._BACnetServiceAck._BACnetServiceAckChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewBACnetServiceAckGetEventInformation(listOfEventSummaries BACnetEventSumm // Deprecated: use the interface for direct cast func CastBACnetServiceAckGetEventInformation(structType interface{}) BACnetServiceAckGetEventInformation { - if casted, ok := structType.(BACnetServiceAckGetEventInformation); ok { + if casted, ok := structType.(BACnetServiceAckGetEventInformation); ok { return casted } if casted, ok := structType.(*BACnetServiceAckGetEventInformation); ok { @@ -128,6 +131,7 @@ func (m *_BACnetServiceAckGetEventInformation) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetServiceAckGetEventInformation) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -149,7 +153,7 @@ func BACnetServiceAckGetEventInformationParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("listOfEventSummaries"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for listOfEventSummaries") } - _listOfEventSummaries, _listOfEventSummariesErr := BACnetEventSummariesListParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_listOfEventSummaries, _listOfEventSummariesErr := BACnetEventSummariesListParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _listOfEventSummariesErr != nil { return nil, errors.Wrap(_listOfEventSummariesErr, "Error parsing 'listOfEventSummaries' field of BACnetServiceAckGetEventInformation") } @@ -162,7 +166,7 @@ func BACnetServiceAckGetEventInformationParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("moreEvents"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for moreEvents") } - _moreEvents, _moreEventsErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_BOOLEAN)) +_moreEvents, _moreEventsErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_BOOLEAN ) ) if _moreEventsErr != nil { return nil, errors.Wrap(_moreEventsErr, "Error parsing 'moreEvents' field of BACnetServiceAckGetEventInformation") } @@ -181,7 +185,7 @@ func BACnetServiceAckGetEventInformationParseWithBuffer(ctx context.Context, rea ServiceAckLength: serviceAckLength, }, ListOfEventSummaries: listOfEventSummaries, - MoreEvents: moreEvents, + MoreEvents: moreEvents, } _child._BACnetServiceAck._BACnetServiceAckChildRequirements = _child return _child, nil @@ -203,29 +207,29 @@ func (m *_BACnetServiceAckGetEventInformation) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetServiceAckGetEventInformation") } - // Simple Field (listOfEventSummaries) - if pushErr := writeBuffer.PushContext("listOfEventSummaries"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for listOfEventSummaries") - } - _listOfEventSummariesErr := writeBuffer.WriteSerializable(ctx, m.GetListOfEventSummaries()) - if popErr := writeBuffer.PopContext("listOfEventSummaries"); popErr != nil { - return errors.Wrap(popErr, "Error popping for listOfEventSummaries") - } - if _listOfEventSummariesErr != nil { - return errors.Wrap(_listOfEventSummariesErr, "Error serializing 'listOfEventSummaries' field") - } + // Simple Field (listOfEventSummaries) + if pushErr := writeBuffer.PushContext("listOfEventSummaries"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for listOfEventSummaries") + } + _listOfEventSummariesErr := writeBuffer.WriteSerializable(ctx, m.GetListOfEventSummaries()) + if popErr := writeBuffer.PopContext("listOfEventSummaries"); popErr != nil { + return errors.Wrap(popErr, "Error popping for listOfEventSummaries") + } + if _listOfEventSummariesErr != nil { + return errors.Wrap(_listOfEventSummariesErr, "Error serializing 'listOfEventSummaries' field") + } - // Simple Field (moreEvents) - if pushErr := writeBuffer.PushContext("moreEvents"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for moreEvents") - } - _moreEventsErr := writeBuffer.WriteSerializable(ctx, m.GetMoreEvents()) - if popErr := writeBuffer.PopContext("moreEvents"); popErr != nil { - return errors.Wrap(popErr, "Error popping for moreEvents") - } - if _moreEventsErr != nil { - return errors.Wrap(_moreEventsErr, "Error serializing 'moreEvents' field") - } + // Simple Field (moreEvents) + if pushErr := writeBuffer.PushContext("moreEvents"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for moreEvents") + } + _moreEventsErr := writeBuffer.WriteSerializable(ctx, m.GetMoreEvents()) + if popErr := writeBuffer.PopContext("moreEvents"); popErr != nil { + return errors.Wrap(popErr, "Error popping for moreEvents") + } + if _moreEventsErr != nil { + return errors.Wrap(_moreEventsErr, "Error serializing 'moreEvents' field") + } if popErr := writeBuffer.PopContext("BACnetServiceAckGetEventInformation"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetServiceAckGetEventInformation") @@ -235,6 +239,7 @@ func (m *_BACnetServiceAckGetEventInformation) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetServiceAckGetEventInformation) isBACnetServiceAckGetEventInformation() bool { return true } @@ -249,3 +254,6 @@ func (m *_BACnetServiceAckGetEventInformation) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckReadProperty.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckReadProperty.go index 910ce59f732..97b58bdf801 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckReadProperty.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckReadProperty.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetServiceAckReadProperty is the corresponding interface of BACnetServiceAckReadProperty type BACnetServiceAckReadProperty interface { @@ -53,32 +55,32 @@ type BACnetServiceAckReadPropertyExactly interface { // _BACnetServiceAckReadProperty is the data-structure of this message type _BACnetServiceAckReadProperty struct { *_BACnetServiceAck - ObjectIdentifier BACnetContextTagObjectIdentifier - PropertyIdentifier BACnetPropertyIdentifierTagged - ArrayIndex BACnetContextTagUnsignedInteger - Values BACnetConstructedData + ObjectIdentifier BACnetContextTagObjectIdentifier + PropertyIdentifier BACnetPropertyIdentifierTagged + ArrayIndex BACnetContextTagUnsignedInteger + Values BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetServiceAckReadProperty) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_READ_PROPERTY -} +func (m *_BACnetServiceAckReadProperty) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_READ_PROPERTY} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetServiceAckReadProperty) InitializeParent(parent BACnetServiceAck) {} +func (m *_BACnetServiceAckReadProperty) InitializeParent(parent BACnetServiceAck ) {} -func (m *_BACnetServiceAckReadProperty) GetParent() BACnetServiceAck { +func (m *_BACnetServiceAckReadProperty) GetParent() BACnetServiceAck { return m._BACnetServiceAck } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -105,14 +107,15 @@ func (m *_BACnetServiceAckReadProperty) GetValues() BACnetConstructedData { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetServiceAckReadProperty factory function for _BACnetServiceAckReadProperty -func NewBACnetServiceAckReadProperty(objectIdentifier BACnetContextTagObjectIdentifier, propertyIdentifier BACnetPropertyIdentifierTagged, arrayIndex BACnetContextTagUnsignedInteger, values BACnetConstructedData, serviceAckLength uint32) *_BACnetServiceAckReadProperty { +func NewBACnetServiceAckReadProperty( objectIdentifier BACnetContextTagObjectIdentifier , propertyIdentifier BACnetPropertyIdentifierTagged , arrayIndex BACnetContextTagUnsignedInteger , values BACnetConstructedData , serviceAckLength uint32 ) *_BACnetServiceAckReadProperty { _result := &_BACnetServiceAckReadProperty{ - ObjectIdentifier: objectIdentifier, + ObjectIdentifier: objectIdentifier, PropertyIdentifier: propertyIdentifier, - ArrayIndex: arrayIndex, - Values: values, - _BACnetServiceAck: NewBACnetServiceAck(serviceAckLength), + ArrayIndex: arrayIndex, + Values: values, + _BACnetServiceAck: NewBACnetServiceAck(serviceAckLength), } _result._BACnetServiceAck._BACnetServiceAckChildRequirements = _result return _result @@ -120,7 +123,7 @@ func NewBACnetServiceAckReadProperty(objectIdentifier BACnetContextTagObjectIden // Deprecated: use the interface for direct cast func CastBACnetServiceAckReadProperty(structType interface{}) BACnetServiceAckReadProperty { - if casted, ok := structType.(BACnetServiceAckReadProperty); ok { + if casted, ok := structType.(BACnetServiceAckReadProperty); ok { return casted } if casted, ok := structType.(*BACnetServiceAckReadProperty); ok { @@ -155,6 +158,7 @@ func (m *_BACnetServiceAckReadProperty) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_BACnetServiceAckReadProperty) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -176,7 +180,7 @@ func BACnetServiceAckReadPropertyParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("objectIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for objectIdentifier") } - _objectIdentifier, _objectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER)) +_objectIdentifier, _objectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_BACNET_OBJECT_IDENTIFIER ) ) if _objectIdentifierErr != nil { return nil, errors.Wrap(_objectIdentifierErr, "Error parsing 'objectIdentifier' field of BACnetServiceAckReadProperty") } @@ -189,7 +193,7 @@ func BACnetServiceAckReadPropertyParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("propertyIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for propertyIdentifier") } - _propertyIdentifier, _propertyIdentifierErr := BACnetPropertyIdentifierTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_propertyIdentifier, _propertyIdentifierErr := BACnetPropertyIdentifierTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _propertyIdentifierErr != nil { return nil, errors.Wrap(_propertyIdentifierErr, "Error parsing 'propertyIdentifier' field of BACnetServiceAckReadProperty") } @@ -200,12 +204,12 @@ func BACnetServiceAckReadPropertyParseWithBuffer(ctx context.Context, readBuffer // Optional Field (arrayIndex) (Can be skipped, if a given expression evaluates to false) var arrayIndex BACnetContextTagUnsignedInteger = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("arrayIndex"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for arrayIndex") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(2), BACnetDataType_UNSIGNED_INTEGER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(2) , BACnetDataType_UNSIGNED_INTEGER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -222,12 +226,12 @@ func BACnetServiceAckReadPropertyParseWithBuffer(ctx context.Context, readBuffer // Optional Field (values) (Can be skipped, if a given expression evaluates to false) var values BACnetConstructedData = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("values"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for values") } - _val, _err := BACnetConstructedDataParseWithBuffer(ctx, readBuffer, uint8(3), objectIdentifier.GetObjectType(), propertyIdentifier.GetValue(), (CastBACnetTagPayloadUnsignedInteger(utils.InlineIf(bool((arrayIndex) != (nil)), func() interface{} { return CastBACnetTagPayloadUnsignedInteger((arrayIndex).GetPayload()) }, func() interface{} { return CastBACnetTagPayloadUnsignedInteger(nil) })))) +_val, _err := BACnetConstructedDataParseWithBuffer(ctx, readBuffer , uint8(3) , objectIdentifier.GetObjectType() , propertyIdentifier.GetValue() , (CastBACnetTagPayloadUnsignedInteger(utils.InlineIf(bool(((arrayIndex)) != (nil)), func() interface{} {return CastBACnetTagPayloadUnsignedInteger((arrayIndex).GetPayload())}, func() interface{} {return CastBACnetTagPayloadUnsignedInteger(nil)}))) ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -251,10 +255,10 @@ func BACnetServiceAckReadPropertyParseWithBuffer(ctx context.Context, readBuffer _BACnetServiceAck: &_BACnetServiceAck{ ServiceAckLength: serviceAckLength, }, - ObjectIdentifier: objectIdentifier, + ObjectIdentifier: objectIdentifier, PropertyIdentifier: propertyIdentifier, - ArrayIndex: arrayIndex, - Values: values, + ArrayIndex: arrayIndex, + Values: values, } _child._BACnetServiceAck._BACnetServiceAckChildRequirements = _child return _child, nil @@ -276,61 +280,61 @@ func (m *_BACnetServiceAckReadProperty) SerializeWithWriteBuffer(ctx context.Con return errors.Wrap(pushErr, "Error pushing for BACnetServiceAckReadProperty") } - // Simple Field (objectIdentifier) - if pushErr := writeBuffer.PushContext("objectIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for objectIdentifier") - } - _objectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetObjectIdentifier()) - if popErr := writeBuffer.PopContext("objectIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for objectIdentifier") - } - if _objectIdentifierErr != nil { - return errors.Wrap(_objectIdentifierErr, "Error serializing 'objectIdentifier' field") - } + // Simple Field (objectIdentifier) + if pushErr := writeBuffer.PushContext("objectIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for objectIdentifier") + } + _objectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetObjectIdentifier()) + if popErr := writeBuffer.PopContext("objectIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for objectIdentifier") + } + if _objectIdentifierErr != nil { + return errors.Wrap(_objectIdentifierErr, "Error serializing 'objectIdentifier' field") + } + + // Simple Field (propertyIdentifier) + if pushErr := writeBuffer.PushContext("propertyIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for propertyIdentifier") + } + _propertyIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetPropertyIdentifier()) + if popErr := writeBuffer.PopContext("propertyIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for propertyIdentifier") + } + if _propertyIdentifierErr != nil { + return errors.Wrap(_propertyIdentifierErr, "Error serializing 'propertyIdentifier' field") + } - // Simple Field (propertyIdentifier) - if pushErr := writeBuffer.PushContext("propertyIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for propertyIdentifier") + // Optional Field (arrayIndex) (Can be skipped, if the value is null) + var arrayIndex BACnetContextTagUnsignedInteger = nil + if m.GetArrayIndex() != nil { + if pushErr := writeBuffer.PushContext("arrayIndex"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for arrayIndex") } - _propertyIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetPropertyIdentifier()) - if popErr := writeBuffer.PopContext("propertyIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for propertyIdentifier") + arrayIndex = m.GetArrayIndex() + _arrayIndexErr := writeBuffer.WriteSerializable(ctx, arrayIndex) + if popErr := writeBuffer.PopContext("arrayIndex"); popErr != nil { + return errors.Wrap(popErr, "Error popping for arrayIndex") } - if _propertyIdentifierErr != nil { - return errors.Wrap(_propertyIdentifierErr, "Error serializing 'propertyIdentifier' field") + if _arrayIndexErr != nil { + return errors.Wrap(_arrayIndexErr, "Error serializing 'arrayIndex' field") } + } - // Optional Field (arrayIndex) (Can be skipped, if the value is null) - var arrayIndex BACnetContextTagUnsignedInteger = nil - if m.GetArrayIndex() != nil { - if pushErr := writeBuffer.PushContext("arrayIndex"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for arrayIndex") - } - arrayIndex = m.GetArrayIndex() - _arrayIndexErr := writeBuffer.WriteSerializable(ctx, arrayIndex) - if popErr := writeBuffer.PopContext("arrayIndex"); popErr != nil { - return errors.Wrap(popErr, "Error popping for arrayIndex") - } - if _arrayIndexErr != nil { - return errors.Wrap(_arrayIndexErr, "Error serializing 'arrayIndex' field") - } + // Optional Field (values) (Can be skipped, if the value is null) + var values BACnetConstructedData = nil + if m.GetValues() != nil { + if pushErr := writeBuffer.PushContext("values"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for values") } - - // Optional Field (values) (Can be skipped, if the value is null) - var values BACnetConstructedData = nil - if m.GetValues() != nil { - if pushErr := writeBuffer.PushContext("values"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for values") - } - values = m.GetValues() - _valuesErr := writeBuffer.WriteSerializable(ctx, values) - if popErr := writeBuffer.PopContext("values"); popErr != nil { - return errors.Wrap(popErr, "Error popping for values") - } - if _valuesErr != nil { - return errors.Wrap(_valuesErr, "Error serializing 'values' field") - } + values = m.GetValues() + _valuesErr := writeBuffer.WriteSerializable(ctx, values) + if popErr := writeBuffer.PopContext("values"); popErr != nil { + return errors.Wrap(popErr, "Error popping for values") } + if _valuesErr != nil { + return errors.Wrap(_valuesErr, "Error serializing 'values' field") + } + } if popErr := writeBuffer.PopContext("BACnetServiceAckReadProperty"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetServiceAckReadProperty") @@ -340,6 +344,7 @@ func (m *_BACnetServiceAckReadProperty) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetServiceAckReadProperty) isBACnetServiceAckReadProperty() bool { return true } @@ -354,3 +359,6 @@ func (m *_BACnetServiceAckReadProperty) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckReadPropertyConditional.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckReadPropertyConditional.go index 7584ed7458d..b615e34df48 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckReadPropertyConditional.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckReadPropertyConditional.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetServiceAckReadPropertyConditional is the corresponding interface of BACnetServiceAckReadPropertyConditional type BACnetServiceAckReadPropertyConditional interface { @@ -46,32 +48,32 @@ type BACnetServiceAckReadPropertyConditionalExactly interface { // _BACnetServiceAckReadPropertyConditional is the data-structure of this message type _BACnetServiceAckReadPropertyConditional struct { *_BACnetServiceAck - BytesOfRemovedService []byte + BytesOfRemovedService []byte // Arguments. ServiceAckPayloadLength uint32 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetServiceAckReadPropertyConditional) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_READ_PROPERTY_CONDITIONAL -} +func (m *_BACnetServiceAckReadPropertyConditional) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_READ_PROPERTY_CONDITIONAL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetServiceAckReadPropertyConditional) InitializeParent(parent BACnetServiceAck) {} +func (m *_BACnetServiceAckReadPropertyConditional) InitializeParent(parent BACnetServiceAck ) {} -func (m *_BACnetServiceAckReadPropertyConditional) GetParent() BACnetServiceAck { +func (m *_BACnetServiceAckReadPropertyConditional) GetParent() BACnetServiceAck { return m._BACnetServiceAck } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -86,11 +88,12 @@ func (m *_BACnetServiceAckReadPropertyConditional) GetBytesOfRemovedService() [] /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetServiceAckReadPropertyConditional factory function for _BACnetServiceAckReadPropertyConditional -func NewBACnetServiceAckReadPropertyConditional(bytesOfRemovedService []byte, serviceAckPayloadLength uint32, serviceAckLength uint32) *_BACnetServiceAckReadPropertyConditional { +func NewBACnetServiceAckReadPropertyConditional( bytesOfRemovedService []byte , serviceAckPayloadLength uint32 , serviceAckLength uint32 ) *_BACnetServiceAckReadPropertyConditional { _result := &_BACnetServiceAckReadPropertyConditional{ BytesOfRemovedService: bytesOfRemovedService, - _BACnetServiceAck: NewBACnetServiceAck(serviceAckLength), + _BACnetServiceAck: NewBACnetServiceAck(serviceAckLength), } _result._BACnetServiceAck._BACnetServiceAckChildRequirements = _result return _result @@ -98,7 +101,7 @@ func NewBACnetServiceAckReadPropertyConditional(bytesOfRemovedService []byte, se // Deprecated: use the interface for direct cast func CastBACnetServiceAckReadPropertyConditional(structType interface{}) BACnetServiceAckReadPropertyConditional { - if casted, ok := structType.(BACnetServiceAckReadPropertyConditional); ok { + if casted, ok := structType.(BACnetServiceAckReadPropertyConditional); ok { return casted } if casted, ok := structType.(*BACnetServiceAckReadPropertyConditional); ok { @@ -122,6 +125,7 @@ func (m *_BACnetServiceAckReadPropertyConditional) GetLengthInBits(ctx context.C return lengthInBits } + func (m *_BACnetServiceAckReadPropertyConditional) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -176,11 +180,11 @@ func (m *_BACnetServiceAckReadPropertyConditional) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for BACnetServiceAckReadPropertyConditional") } - // Array Field (bytesOfRemovedService) - // Byte Array field (bytesOfRemovedService) - if err := writeBuffer.WriteByteArray("bytesOfRemovedService", m.GetBytesOfRemovedService()); err != nil { - return errors.Wrap(err, "Error serializing 'bytesOfRemovedService' field") - } + // Array Field (bytesOfRemovedService) + // Byte Array field (bytesOfRemovedService) + if err := writeBuffer.WriteByteArray("bytesOfRemovedService", m.GetBytesOfRemovedService()); err != nil { + return errors.Wrap(err, "Error serializing 'bytesOfRemovedService' field") + } if popErr := writeBuffer.PopContext("BACnetServiceAckReadPropertyConditional"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetServiceAckReadPropertyConditional") @@ -190,13 +194,13 @@ func (m *_BACnetServiceAckReadPropertyConditional) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + //// // Arguments Getter func (m *_BACnetServiceAckReadPropertyConditional) GetServiceAckPayloadLength() uint32 { return m.ServiceAckPayloadLength } - // //// @@ -214,3 +218,6 @@ func (m *_BACnetServiceAckReadPropertyConditional) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckReadPropertyMultiple.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckReadPropertyMultiple.go index fbdf69ab57b..e32bb34f870 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckReadPropertyMultiple.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckReadPropertyMultiple.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetServiceAckReadPropertyMultiple is the corresponding interface of BACnetServiceAckReadPropertyMultiple type BACnetServiceAckReadPropertyMultiple interface { @@ -47,32 +49,32 @@ type BACnetServiceAckReadPropertyMultipleExactly interface { // _BACnetServiceAckReadPropertyMultiple is the data-structure of this message type _BACnetServiceAckReadPropertyMultiple struct { *_BACnetServiceAck - Data []BACnetReadAccessResult + Data []BACnetReadAccessResult // Arguments. ServiceAckPayloadLength uint32 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetServiceAckReadPropertyMultiple) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_READ_PROPERTY_MULTIPLE -} +func (m *_BACnetServiceAckReadPropertyMultiple) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_READ_PROPERTY_MULTIPLE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetServiceAckReadPropertyMultiple) InitializeParent(parent BACnetServiceAck) {} +func (m *_BACnetServiceAckReadPropertyMultiple) InitializeParent(parent BACnetServiceAck ) {} -func (m *_BACnetServiceAckReadPropertyMultiple) GetParent() BACnetServiceAck { +func (m *_BACnetServiceAckReadPropertyMultiple) GetParent() BACnetServiceAck { return m._BACnetServiceAck } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -87,11 +89,12 @@ func (m *_BACnetServiceAckReadPropertyMultiple) GetData() []BACnetReadAccessResu /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetServiceAckReadPropertyMultiple factory function for _BACnetServiceAckReadPropertyMultiple -func NewBACnetServiceAckReadPropertyMultiple(data []BACnetReadAccessResult, serviceAckPayloadLength uint32, serviceAckLength uint32) *_BACnetServiceAckReadPropertyMultiple { +func NewBACnetServiceAckReadPropertyMultiple( data []BACnetReadAccessResult , serviceAckPayloadLength uint32 , serviceAckLength uint32 ) *_BACnetServiceAckReadPropertyMultiple { _result := &_BACnetServiceAckReadPropertyMultiple{ - Data: data, - _BACnetServiceAck: NewBACnetServiceAck(serviceAckLength), + Data: data, + _BACnetServiceAck: NewBACnetServiceAck(serviceAckLength), } _result._BACnetServiceAck._BACnetServiceAckChildRequirements = _result return _result @@ -99,7 +102,7 @@ func NewBACnetServiceAckReadPropertyMultiple(data []BACnetReadAccessResult, serv // Deprecated: use the interface for direct cast func CastBACnetServiceAckReadPropertyMultiple(structType interface{}) BACnetServiceAckReadPropertyMultiple { - if casted, ok := structType.(BACnetServiceAckReadPropertyMultiple); ok { + if casted, ok := structType.(BACnetServiceAckReadPropertyMultiple); ok { return casted } if casted, ok := structType.(*BACnetServiceAckReadPropertyMultiple); ok { @@ -125,6 +128,7 @@ func (m *_BACnetServiceAckReadPropertyMultiple) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetServiceAckReadPropertyMultiple) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,8 +155,8 @@ func BACnetServiceAckReadPropertyMultipleParseWithBuffer(ctx context.Context, re { _dataLength := serviceAckPayloadLength _dataEndPos := positionAware.GetPos() + uint16(_dataLength) - for positionAware.GetPos() < _dataEndPos { - _item, _err := BACnetReadAccessResultParseWithBuffer(ctx, readBuffer) + for ;positionAware.GetPos() < _dataEndPos; { +_item, _err := BACnetReadAccessResultParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'data' field of BACnetServiceAckReadPropertyMultiple") } @@ -194,22 +198,22 @@ func (m *_BACnetServiceAckReadPropertyMultiple) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetServiceAckReadPropertyMultiple") } - // Array Field (data) - if pushErr := writeBuffer.PushContext("data", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for data") - } - for _curItem, _element := range m.GetData() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetData()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'data' field") - } - } - if popErr := writeBuffer.PopContext("data", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for data") + // Array Field (data) + if pushErr := writeBuffer.PushContext("data", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for data") + } + for _curItem, _element := range m.GetData() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetData()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'data' field") } + } + if popErr := writeBuffer.PopContext("data", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for data") + } if popErr := writeBuffer.PopContext("BACnetServiceAckReadPropertyMultiple"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetServiceAckReadPropertyMultiple") @@ -219,13 +223,13 @@ func (m *_BACnetServiceAckReadPropertyMultiple) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + //// // Arguments Getter func (m *_BACnetServiceAckReadPropertyMultiple) GetServiceAckPayloadLength() uint32 { return m.ServiceAckPayloadLength } - // //// @@ -243,3 +247,6 @@ func (m *_BACnetServiceAckReadPropertyMultiple) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckReadRange.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckReadRange.go index e988637a3c9..2639bea5473 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckReadRange.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckReadRange.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetServiceAckReadRange is the corresponding interface of BACnetServiceAckReadRange type BACnetServiceAckReadRange interface { @@ -59,35 +61,35 @@ type BACnetServiceAckReadRangeExactly interface { // _BACnetServiceAckReadRange is the data-structure of this message type _BACnetServiceAckReadRange struct { *_BACnetServiceAck - ObjectIdentifier BACnetContextTagObjectIdentifier - PropertyIdentifier BACnetPropertyIdentifierTagged - PropertyArrayIndex BACnetContextTagUnsignedInteger - ResultFlags BACnetResultFlagsTagged - ItemCount BACnetContextTagUnsignedInteger - ItemData BACnetConstructedData - FirstSequenceNumber BACnetContextTagUnsignedInteger + ObjectIdentifier BACnetContextTagObjectIdentifier + PropertyIdentifier BACnetPropertyIdentifierTagged + PropertyArrayIndex BACnetContextTagUnsignedInteger + ResultFlags BACnetResultFlagsTagged + ItemCount BACnetContextTagUnsignedInteger + ItemData BACnetConstructedData + FirstSequenceNumber BACnetContextTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetServiceAckReadRange) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_READ_RANGE -} +func (m *_BACnetServiceAckReadRange) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_READ_RANGE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetServiceAckReadRange) InitializeParent(parent BACnetServiceAck) {} +func (m *_BACnetServiceAckReadRange) InitializeParent(parent BACnetServiceAck ) {} -func (m *_BACnetServiceAckReadRange) GetParent() BACnetServiceAck { +func (m *_BACnetServiceAckReadRange) GetParent() BACnetServiceAck { return m._BACnetServiceAck } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -126,17 +128,18 @@ func (m *_BACnetServiceAckReadRange) GetFirstSequenceNumber() BACnetContextTagUn /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetServiceAckReadRange factory function for _BACnetServiceAckReadRange -func NewBACnetServiceAckReadRange(objectIdentifier BACnetContextTagObjectIdentifier, propertyIdentifier BACnetPropertyIdentifierTagged, propertyArrayIndex BACnetContextTagUnsignedInteger, resultFlags BACnetResultFlagsTagged, itemCount BACnetContextTagUnsignedInteger, itemData BACnetConstructedData, firstSequenceNumber BACnetContextTagUnsignedInteger, serviceAckLength uint32) *_BACnetServiceAckReadRange { +func NewBACnetServiceAckReadRange( objectIdentifier BACnetContextTagObjectIdentifier , propertyIdentifier BACnetPropertyIdentifierTagged , propertyArrayIndex BACnetContextTagUnsignedInteger , resultFlags BACnetResultFlagsTagged , itemCount BACnetContextTagUnsignedInteger , itemData BACnetConstructedData , firstSequenceNumber BACnetContextTagUnsignedInteger , serviceAckLength uint32 ) *_BACnetServiceAckReadRange { _result := &_BACnetServiceAckReadRange{ - ObjectIdentifier: objectIdentifier, - PropertyIdentifier: propertyIdentifier, - PropertyArrayIndex: propertyArrayIndex, - ResultFlags: resultFlags, - ItemCount: itemCount, - ItemData: itemData, + ObjectIdentifier: objectIdentifier, + PropertyIdentifier: propertyIdentifier, + PropertyArrayIndex: propertyArrayIndex, + ResultFlags: resultFlags, + ItemCount: itemCount, + ItemData: itemData, FirstSequenceNumber: firstSequenceNumber, - _BACnetServiceAck: NewBACnetServiceAck(serviceAckLength), + _BACnetServiceAck: NewBACnetServiceAck(serviceAckLength), } _result._BACnetServiceAck._BACnetServiceAckChildRequirements = _result return _result @@ -144,7 +147,7 @@ func NewBACnetServiceAckReadRange(objectIdentifier BACnetContextTagObjectIdentif // Deprecated: use the interface for direct cast func CastBACnetServiceAckReadRange(structType interface{}) BACnetServiceAckReadRange { - if casted, ok := structType.(BACnetServiceAckReadRange); ok { + if casted, ok := structType.(BACnetServiceAckReadRange); ok { return casted } if casted, ok := structType.(*BACnetServiceAckReadRange); ok { @@ -190,6 +193,7 @@ func (m *_BACnetServiceAckReadRange) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_BACnetServiceAckReadRange) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -211,7 +215,7 @@ func BACnetServiceAckReadRangeParseWithBuffer(ctx context.Context, readBuffer ut if pullErr := readBuffer.PullContext("objectIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for objectIdentifier") } - _objectIdentifier, _objectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER)) +_objectIdentifier, _objectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_BACNET_OBJECT_IDENTIFIER ) ) if _objectIdentifierErr != nil { return nil, errors.Wrap(_objectIdentifierErr, "Error parsing 'objectIdentifier' field of BACnetServiceAckReadRange") } @@ -224,7 +228,7 @@ func BACnetServiceAckReadRangeParseWithBuffer(ctx context.Context, readBuffer ut if pullErr := readBuffer.PullContext("propertyIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for propertyIdentifier") } - _propertyIdentifier, _propertyIdentifierErr := BACnetPropertyIdentifierTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_propertyIdentifier, _propertyIdentifierErr := BACnetPropertyIdentifierTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _propertyIdentifierErr != nil { return nil, errors.Wrap(_propertyIdentifierErr, "Error parsing 'propertyIdentifier' field of BACnetServiceAckReadRange") } @@ -235,12 +239,12 @@ func BACnetServiceAckReadRangeParseWithBuffer(ctx context.Context, readBuffer ut // Optional Field (propertyArrayIndex) (Can be skipped, if a given expression evaluates to false) var propertyArrayIndex BACnetContextTagUnsignedInteger = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("propertyArrayIndex"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for propertyArrayIndex") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(2), BACnetDataType_UNSIGNED_INTEGER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(2) , BACnetDataType_UNSIGNED_INTEGER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -259,7 +263,7 @@ func BACnetServiceAckReadRangeParseWithBuffer(ctx context.Context, readBuffer ut if pullErr := readBuffer.PullContext("resultFlags"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for resultFlags") } - _resultFlags, _resultFlagsErr := BACnetResultFlagsTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(3)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_resultFlags, _resultFlagsErr := BACnetResultFlagsTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(3) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _resultFlagsErr != nil { return nil, errors.Wrap(_resultFlagsErr, "Error parsing 'resultFlags' field of BACnetServiceAckReadRange") } @@ -272,7 +276,7 @@ func BACnetServiceAckReadRangeParseWithBuffer(ctx context.Context, readBuffer ut if pullErr := readBuffer.PullContext("itemCount"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for itemCount") } - _itemCount, _itemCountErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(4)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_itemCount, _itemCountErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(4) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _itemCountErr != nil { return nil, errors.Wrap(_itemCountErr, "Error parsing 'itemCount' field of BACnetServiceAckReadRange") } @@ -283,12 +287,12 @@ func BACnetServiceAckReadRangeParseWithBuffer(ctx context.Context, readBuffer ut // Optional Field (itemData) (Can be skipped, if a given expression evaluates to false) var itemData BACnetConstructedData = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("itemData"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for itemData") } - _val, _err := BACnetConstructedDataParseWithBuffer(ctx, readBuffer, uint8(5), objectIdentifier.GetObjectType(), propertyIdentifier.GetValue(), (CastBACnetTagPayloadUnsignedInteger(utils.InlineIf(bool((propertyArrayIndex) != (nil)), func() interface{} { return CastBACnetTagPayloadUnsignedInteger((propertyArrayIndex).GetPayload()) }, func() interface{} { return CastBACnetTagPayloadUnsignedInteger(nil) })))) +_val, _err := BACnetConstructedDataParseWithBuffer(ctx, readBuffer , uint8(5) , objectIdentifier.GetObjectType() , propertyIdentifier.GetValue() , (CastBACnetTagPayloadUnsignedInteger(utils.InlineIf(bool(((propertyArrayIndex)) != (nil)), func() interface{} {return CastBACnetTagPayloadUnsignedInteger((propertyArrayIndex).GetPayload())}, func() interface{} {return CastBACnetTagPayloadUnsignedInteger(nil)}))) ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -305,12 +309,12 @@ func BACnetServiceAckReadRangeParseWithBuffer(ctx context.Context, readBuffer ut // Optional Field (firstSequenceNumber) (Can be skipped, if a given expression evaluates to false) var firstSequenceNumber BACnetContextTagUnsignedInteger = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("firstSequenceNumber"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for firstSequenceNumber") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(6), BACnetDataType_UNSIGNED_INTEGER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(6) , BACnetDataType_UNSIGNED_INTEGER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -334,12 +338,12 @@ func BACnetServiceAckReadRangeParseWithBuffer(ctx context.Context, readBuffer ut _BACnetServiceAck: &_BACnetServiceAck{ ServiceAckLength: serviceAckLength, }, - ObjectIdentifier: objectIdentifier, - PropertyIdentifier: propertyIdentifier, - PropertyArrayIndex: propertyArrayIndex, - ResultFlags: resultFlags, - ItemCount: itemCount, - ItemData: itemData, + ObjectIdentifier: objectIdentifier, + PropertyIdentifier: propertyIdentifier, + PropertyArrayIndex: propertyArrayIndex, + ResultFlags: resultFlags, + ItemCount: itemCount, + ItemData: itemData, FirstSequenceNumber: firstSequenceNumber, } _child._BACnetServiceAck._BACnetServiceAckChildRequirements = _child @@ -362,101 +366,101 @@ func (m *_BACnetServiceAckReadRange) SerializeWithWriteBuffer(ctx context.Contex return errors.Wrap(pushErr, "Error pushing for BACnetServiceAckReadRange") } - // Simple Field (objectIdentifier) - if pushErr := writeBuffer.PushContext("objectIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for objectIdentifier") - } - _objectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetObjectIdentifier()) - if popErr := writeBuffer.PopContext("objectIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for objectIdentifier") - } - if _objectIdentifierErr != nil { - return errors.Wrap(_objectIdentifierErr, "Error serializing 'objectIdentifier' field") - } + // Simple Field (objectIdentifier) + if pushErr := writeBuffer.PushContext("objectIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for objectIdentifier") + } + _objectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetObjectIdentifier()) + if popErr := writeBuffer.PopContext("objectIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for objectIdentifier") + } + if _objectIdentifierErr != nil { + return errors.Wrap(_objectIdentifierErr, "Error serializing 'objectIdentifier' field") + } + + // Simple Field (propertyIdentifier) + if pushErr := writeBuffer.PushContext("propertyIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for propertyIdentifier") + } + _propertyIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetPropertyIdentifier()) + if popErr := writeBuffer.PopContext("propertyIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for propertyIdentifier") + } + if _propertyIdentifierErr != nil { + return errors.Wrap(_propertyIdentifierErr, "Error serializing 'propertyIdentifier' field") + } - // Simple Field (propertyIdentifier) - if pushErr := writeBuffer.PushContext("propertyIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for propertyIdentifier") + // Optional Field (propertyArrayIndex) (Can be skipped, if the value is null) + var propertyArrayIndex BACnetContextTagUnsignedInteger = nil + if m.GetPropertyArrayIndex() != nil { + if pushErr := writeBuffer.PushContext("propertyArrayIndex"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for propertyArrayIndex") } - _propertyIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetPropertyIdentifier()) - if popErr := writeBuffer.PopContext("propertyIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for propertyIdentifier") + propertyArrayIndex = m.GetPropertyArrayIndex() + _propertyArrayIndexErr := writeBuffer.WriteSerializable(ctx, propertyArrayIndex) + if popErr := writeBuffer.PopContext("propertyArrayIndex"); popErr != nil { + return errors.Wrap(popErr, "Error popping for propertyArrayIndex") } - if _propertyIdentifierErr != nil { - return errors.Wrap(_propertyIdentifierErr, "Error serializing 'propertyIdentifier' field") + if _propertyArrayIndexErr != nil { + return errors.Wrap(_propertyArrayIndexErr, "Error serializing 'propertyArrayIndex' field") } + } - // Optional Field (propertyArrayIndex) (Can be skipped, if the value is null) - var propertyArrayIndex BACnetContextTagUnsignedInteger = nil - if m.GetPropertyArrayIndex() != nil { - if pushErr := writeBuffer.PushContext("propertyArrayIndex"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for propertyArrayIndex") - } - propertyArrayIndex = m.GetPropertyArrayIndex() - _propertyArrayIndexErr := writeBuffer.WriteSerializable(ctx, propertyArrayIndex) - if popErr := writeBuffer.PopContext("propertyArrayIndex"); popErr != nil { - return errors.Wrap(popErr, "Error popping for propertyArrayIndex") - } - if _propertyArrayIndexErr != nil { - return errors.Wrap(_propertyArrayIndexErr, "Error serializing 'propertyArrayIndex' field") - } - } + // Simple Field (resultFlags) + if pushErr := writeBuffer.PushContext("resultFlags"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for resultFlags") + } + _resultFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetResultFlags()) + if popErr := writeBuffer.PopContext("resultFlags"); popErr != nil { + return errors.Wrap(popErr, "Error popping for resultFlags") + } + if _resultFlagsErr != nil { + return errors.Wrap(_resultFlagsErr, "Error serializing 'resultFlags' field") + } - // Simple Field (resultFlags) - if pushErr := writeBuffer.PushContext("resultFlags"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for resultFlags") - } - _resultFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetResultFlags()) - if popErr := writeBuffer.PopContext("resultFlags"); popErr != nil { - return errors.Wrap(popErr, "Error popping for resultFlags") - } - if _resultFlagsErr != nil { - return errors.Wrap(_resultFlagsErr, "Error serializing 'resultFlags' field") - } + // Simple Field (itemCount) + if pushErr := writeBuffer.PushContext("itemCount"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for itemCount") + } + _itemCountErr := writeBuffer.WriteSerializable(ctx, m.GetItemCount()) + if popErr := writeBuffer.PopContext("itemCount"); popErr != nil { + return errors.Wrap(popErr, "Error popping for itemCount") + } + if _itemCountErr != nil { + return errors.Wrap(_itemCountErr, "Error serializing 'itemCount' field") + } - // Simple Field (itemCount) - if pushErr := writeBuffer.PushContext("itemCount"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for itemCount") + // Optional Field (itemData) (Can be skipped, if the value is null) + var itemData BACnetConstructedData = nil + if m.GetItemData() != nil { + if pushErr := writeBuffer.PushContext("itemData"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for itemData") } - _itemCountErr := writeBuffer.WriteSerializable(ctx, m.GetItemCount()) - if popErr := writeBuffer.PopContext("itemCount"); popErr != nil { - return errors.Wrap(popErr, "Error popping for itemCount") + itemData = m.GetItemData() + _itemDataErr := writeBuffer.WriteSerializable(ctx, itemData) + if popErr := writeBuffer.PopContext("itemData"); popErr != nil { + return errors.Wrap(popErr, "Error popping for itemData") } - if _itemCountErr != nil { - return errors.Wrap(_itemCountErr, "Error serializing 'itemCount' field") + if _itemDataErr != nil { + return errors.Wrap(_itemDataErr, "Error serializing 'itemData' field") } + } - // Optional Field (itemData) (Can be skipped, if the value is null) - var itemData BACnetConstructedData = nil - if m.GetItemData() != nil { - if pushErr := writeBuffer.PushContext("itemData"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for itemData") - } - itemData = m.GetItemData() - _itemDataErr := writeBuffer.WriteSerializable(ctx, itemData) - if popErr := writeBuffer.PopContext("itemData"); popErr != nil { - return errors.Wrap(popErr, "Error popping for itemData") - } - if _itemDataErr != nil { - return errors.Wrap(_itemDataErr, "Error serializing 'itemData' field") - } + // Optional Field (firstSequenceNumber) (Can be skipped, if the value is null) + var firstSequenceNumber BACnetContextTagUnsignedInteger = nil + if m.GetFirstSequenceNumber() != nil { + if pushErr := writeBuffer.PushContext("firstSequenceNumber"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for firstSequenceNumber") } - - // Optional Field (firstSequenceNumber) (Can be skipped, if the value is null) - var firstSequenceNumber BACnetContextTagUnsignedInteger = nil - if m.GetFirstSequenceNumber() != nil { - if pushErr := writeBuffer.PushContext("firstSequenceNumber"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for firstSequenceNumber") - } - firstSequenceNumber = m.GetFirstSequenceNumber() - _firstSequenceNumberErr := writeBuffer.WriteSerializable(ctx, firstSequenceNumber) - if popErr := writeBuffer.PopContext("firstSequenceNumber"); popErr != nil { - return errors.Wrap(popErr, "Error popping for firstSequenceNumber") - } - if _firstSequenceNumberErr != nil { - return errors.Wrap(_firstSequenceNumberErr, "Error serializing 'firstSequenceNumber' field") - } + firstSequenceNumber = m.GetFirstSequenceNumber() + _firstSequenceNumberErr := writeBuffer.WriteSerializable(ctx, firstSequenceNumber) + if popErr := writeBuffer.PopContext("firstSequenceNumber"); popErr != nil { + return errors.Wrap(popErr, "Error popping for firstSequenceNumber") + } + if _firstSequenceNumberErr != nil { + return errors.Wrap(_firstSequenceNumberErr, "Error serializing 'firstSequenceNumber' field") } + } if popErr := writeBuffer.PopContext("BACnetServiceAckReadRange"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetServiceAckReadRange") @@ -466,6 +470,7 @@ func (m *_BACnetServiceAckReadRange) SerializeWithWriteBuffer(ctx context.Contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetServiceAckReadRange) isBACnetServiceAckReadRange() bool { return true } @@ -480,3 +485,6 @@ func (m *_BACnetServiceAckReadRange) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckRequestKey.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckRequestKey.go index 941e832cba6..5c49da612ce 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckRequestKey.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckRequestKey.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetServiceAckRequestKey is the corresponding interface of BACnetServiceAckRequestKey type BACnetServiceAckRequestKey interface { @@ -46,32 +48,32 @@ type BACnetServiceAckRequestKeyExactly interface { // _BACnetServiceAckRequestKey is the data-structure of this message type _BACnetServiceAckRequestKey struct { *_BACnetServiceAck - BytesOfRemovedService []byte + BytesOfRemovedService []byte // Arguments. ServiceAckPayloadLength uint32 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetServiceAckRequestKey) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_REQUEST_KEY -} +func (m *_BACnetServiceAckRequestKey) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_REQUEST_KEY} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetServiceAckRequestKey) InitializeParent(parent BACnetServiceAck) {} +func (m *_BACnetServiceAckRequestKey) InitializeParent(parent BACnetServiceAck ) {} -func (m *_BACnetServiceAckRequestKey) GetParent() BACnetServiceAck { +func (m *_BACnetServiceAckRequestKey) GetParent() BACnetServiceAck { return m._BACnetServiceAck } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -86,11 +88,12 @@ func (m *_BACnetServiceAckRequestKey) GetBytesOfRemovedService() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetServiceAckRequestKey factory function for _BACnetServiceAckRequestKey -func NewBACnetServiceAckRequestKey(bytesOfRemovedService []byte, serviceAckPayloadLength uint32, serviceAckLength uint32) *_BACnetServiceAckRequestKey { +func NewBACnetServiceAckRequestKey( bytesOfRemovedService []byte , serviceAckPayloadLength uint32 , serviceAckLength uint32 ) *_BACnetServiceAckRequestKey { _result := &_BACnetServiceAckRequestKey{ BytesOfRemovedService: bytesOfRemovedService, - _BACnetServiceAck: NewBACnetServiceAck(serviceAckLength), + _BACnetServiceAck: NewBACnetServiceAck(serviceAckLength), } _result._BACnetServiceAck._BACnetServiceAckChildRequirements = _result return _result @@ -98,7 +101,7 @@ func NewBACnetServiceAckRequestKey(bytesOfRemovedService []byte, serviceAckPaylo // Deprecated: use the interface for direct cast func CastBACnetServiceAckRequestKey(structType interface{}) BACnetServiceAckRequestKey { - if casted, ok := structType.(BACnetServiceAckRequestKey); ok { + if casted, ok := structType.(BACnetServiceAckRequestKey); ok { return casted } if casted, ok := structType.(*BACnetServiceAckRequestKey); ok { @@ -122,6 +125,7 @@ func (m *_BACnetServiceAckRequestKey) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_BACnetServiceAckRequestKey) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -176,11 +180,11 @@ func (m *_BACnetServiceAckRequestKey) SerializeWithWriteBuffer(ctx context.Conte return errors.Wrap(pushErr, "Error pushing for BACnetServiceAckRequestKey") } - // Array Field (bytesOfRemovedService) - // Byte Array field (bytesOfRemovedService) - if err := writeBuffer.WriteByteArray("bytesOfRemovedService", m.GetBytesOfRemovedService()); err != nil { - return errors.Wrap(err, "Error serializing 'bytesOfRemovedService' field") - } + // Array Field (bytesOfRemovedService) + // Byte Array field (bytesOfRemovedService) + if err := writeBuffer.WriteByteArray("bytesOfRemovedService", m.GetBytesOfRemovedService()); err != nil { + return errors.Wrap(err, "Error serializing 'bytesOfRemovedService' field") + } if popErr := writeBuffer.PopContext("BACnetServiceAckRequestKey"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetServiceAckRequestKey") @@ -190,13 +194,13 @@ func (m *_BACnetServiceAckRequestKey) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + //// // Arguments Getter func (m *_BACnetServiceAckRequestKey) GetServiceAckPayloadLength() uint32 { return m.ServiceAckPayloadLength } - // //// @@ -214,3 +218,6 @@ func (m *_BACnetServiceAckRequestKey) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckVTData.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckVTData.go index 5196393cb56..59804bf0840 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckVTData.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckVTData.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetServiceAckVTData is the corresponding interface of BACnetServiceAckVTData type BACnetServiceAckVTData interface { @@ -50,31 +52,31 @@ type BACnetServiceAckVTDataExactly interface { // _BACnetServiceAckVTData is the data-structure of this message type _BACnetServiceAckVTData struct { *_BACnetServiceAck - VtSessionIdentifier BACnetApplicationTagUnsignedInteger - VtNewData BACnetApplicationTagOctetString - VtDataFlag BACnetApplicationTagUnsignedInteger + VtSessionIdentifier BACnetApplicationTagUnsignedInteger + VtNewData BACnetApplicationTagOctetString + VtDataFlag BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetServiceAckVTData) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_VT_DATA -} +func (m *_BACnetServiceAckVTData) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_VT_DATA} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetServiceAckVTData) InitializeParent(parent BACnetServiceAck) {} +func (m *_BACnetServiceAckVTData) InitializeParent(parent BACnetServiceAck ) {} -func (m *_BACnetServiceAckVTData) GetParent() BACnetServiceAck { +func (m *_BACnetServiceAckVTData) GetParent() BACnetServiceAck { return m._BACnetServiceAck } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -97,13 +99,14 @@ func (m *_BACnetServiceAckVTData) GetVtDataFlag() BACnetApplicationTagUnsignedIn /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetServiceAckVTData factory function for _BACnetServiceAckVTData -func NewBACnetServiceAckVTData(vtSessionIdentifier BACnetApplicationTagUnsignedInteger, vtNewData BACnetApplicationTagOctetString, vtDataFlag BACnetApplicationTagUnsignedInteger, serviceAckLength uint32) *_BACnetServiceAckVTData { +func NewBACnetServiceAckVTData( vtSessionIdentifier BACnetApplicationTagUnsignedInteger , vtNewData BACnetApplicationTagOctetString , vtDataFlag BACnetApplicationTagUnsignedInteger , serviceAckLength uint32 ) *_BACnetServiceAckVTData { _result := &_BACnetServiceAckVTData{ VtSessionIdentifier: vtSessionIdentifier, - VtNewData: vtNewData, - VtDataFlag: vtDataFlag, - _BACnetServiceAck: NewBACnetServiceAck(serviceAckLength), + VtNewData: vtNewData, + VtDataFlag: vtDataFlag, + _BACnetServiceAck: NewBACnetServiceAck(serviceAckLength), } _result._BACnetServiceAck._BACnetServiceAckChildRequirements = _result return _result @@ -111,7 +114,7 @@ func NewBACnetServiceAckVTData(vtSessionIdentifier BACnetApplicationTagUnsignedI // Deprecated: use the interface for direct cast func CastBACnetServiceAckVTData(structType interface{}) BACnetServiceAckVTData { - if casted, ok := structType.(BACnetServiceAckVTData); ok { + if casted, ok := structType.(BACnetServiceAckVTData); ok { return casted } if casted, ok := structType.(*BACnetServiceAckVTData); ok { @@ -139,6 +142,7 @@ func (m *_BACnetServiceAckVTData) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetServiceAckVTData) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -160,7 +164,7 @@ func BACnetServiceAckVTDataParseWithBuffer(ctx context.Context, readBuffer utils if pullErr := readBuffer.PullContext("vtSessionIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for vtSessionIdentifier") } - _vtSessionIdentifier, _vtSessionIdentifierErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_vtSessionIdentifier, _vtSessionIdentifierErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _vtSessionIdentifierErr != nil { return nil, errors.Wrap(_vtSessionIdentifierErr, "Error parsing 'vtSessionIdentifier' field of BACnetServiceAckVTData") } @@ -173,7 +177,7 @@ func BACnetServiceAckVTDataParseWithBuffer(ctx context.Context, readBuffer utils if pullErr := readBuffer.PullContext("vtNewData"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for vtNewData") } - _vtNewData, _vtNewDataErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_vtNewData, _vtNewDataErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _vtNewDataErr != nil { return nil, errors.Wrap(_vtNewDataErr, "Error parsing 'vtNewData' field of BACnetServiceAckVTData") } @@ -186,7 +190,7 @@ func BACnetServiceAckVTDataParseWithBuffer(ctx context.Context, readBuffer utils if pullErr := readBuffer.PullContext("vtDataFlag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for vtDataFlag") } - _vtDataFlag, _vtDataFlagErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_vtDataFlag, _vtDataFlagErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _vtDataFlagErr != nil { return nil, errors.Wrap(_vtDataFlagErr, "Error parsing 'vtDataFlag' field of BACnetServiceAckVTData") } @@ -205,8 +209,8 @@ func BACnetServiceAckVTDataParseWithBuffer(ctx context.Context, readBuffer utils ServiceAckLength: serviceAckLength, }, VtSessionIdentifier: vtSessionIdentifier, - VtNewData: vtNewData, - VtDataFlag: vtDataFlag, + VtNewData: vtNewData, + VtDataFlag: vtDataFlag, } _child._BACnetServiceAck._BACnetServiceAckChildRequirements = _child return _child, nil @@ -228,41 +232,41 @@ func (m *_BACnetServiceAckVTData) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for BACnetServiceAckVTData") } - // Simple Field (vtSessionIdentifier) - if pushErr := writeBuffer.PushContext("vtSessionIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for vtSessionIdentifier") - } - _vtSessionIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetVtSessionIdentifier()) - if popErr := writeBuffer.PopContext("vtSessionIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for vtSessionIdentifier") - } - if _vtSessionIdentifierErr != nil { - return errors.Wrap(_vtSessionIdentifierErr, "Error serializing 'vtSessionIdentifier' field") - } + // Simple Field (vtSessionIdentifier) + if pushErr := writeBuffer.PushContext("vtSessionIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for vtSessionIdentifier") + } + _vtSessionIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetVtSessionIdentifier()) + if popErr := writeBuffer.PopContext("vtSessionIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for vtSessionIdentifier") + } + if _vtSessionIdentifierErr != nil { + return errors.Wrap(_vtSessionIdentifierErr, "Error serializing 'vtSessionIdentifier' field") + } - // Simple Field (vtNewData) - if pushErr := writeBuffer.PushContext("vtNewData"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for vtNewData") - } - _vtNewDataErr := writeBuffer.WriteSerializable(ctx, m.GetVtNewData()) - if popErr := writeBuffer.PopContext("vtNewData"); popErr != nil { - return errors.Wrap(popErr, "Error popping for vtNewData") - } - if _vtNewDataErr != nil { - return errors.Wrap(_vtNewDataErr, "Error serializing 'vtNewData' field") - } + // Simple Field (vtNewData) + if pushErr := writeBuffer.PushContext("vtNewData"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for vtNewData") + } + _vtNewDataErr := writeBuffer.WriteSerializable(ctx, m.GetVtNewData()) + if popErr := writeBuffer.PopContext("vtNewData"); popErr != nil { + return errors.Wrap(popErr, "Error popping for vtNewData") + } + if _vtNewDataErr != nil { + return errors.Wrap(_vtNewDataErr, "Error serializing 'vtNewData' field") + } - // Simple Field (vtDataFlag) - if pushErr := writeBuffer.PushContext("vtDataFlag"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for vtDataFlag") - } - _vtDataFlagErr := writeBuffer.WriteSerializable(ctx, m.GetVtDataFlag()) - if popErr := writeBuffer.PopContext("vtDataFlag"); popErr != nil { - return errors.Wrap(popErr, "Error popping for vtDataFlag") - } - if _vtDataFlagErr != nil { - return errors.Wrap(_vtDataFlagErr, "Error serializing 'vtDataFlag' field") - } + // Simple Field (vtDataFlag) + if pushErr := writeBuffer.PushContext("vtDataFlag"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for vtDataFlag") + } + _vtDataFlagErr := writeBuffer.WriteSerializable(ctx, m.GetVtDataFlag()) + if popErr := writeBuffer.PopContext("vtDataFlag"); popErr != nil { + return errors.Wrap(popErr, "Error popping for vtDataFlag") + } + if _vtDataFlagErr != nil { + return errors.Wrap(_vtDataFlagErr, "Error serializing 'vtDataFlag' field") + } if popErr := writeBuffer.PopContext("BACnetServiceAckVTData"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetServiceAckVTData") @@ -272,6 +276,7 @@ func (m *_BACnetServiceAckVTData) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetServiceAckVTData) isBACnetServiceAckVTData() bool { return true } @@ -286,3 +291,6 @@ func (m *_BACnetServiceAckVTData) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckVTOpen.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckVTOpen.go index b21e1067b32..154112fa604 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckVTOpen.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckVTOpen.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetServiceAckVTOpen is the corresponding interface of BACnetServiceAckVTOpen type BACnetServiceAckVTOpen interface { @@ -46,29 +48,29 @@ type BACnetServiceAckVTOpenExactly interface { // _BACnetServiceAckVTOpen is the data-structure of this message type _BACnetServiceAckVTOpen struct { *_BACnetServiceAck - RemoteVtSessionIdentifier BACnetApplicationTagUnsignedInteger + RemoteVtSessionIdentifier BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetServiceAckVTOpen) GetServiceChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_VT_OPEN -} +func (m *_BACnetServiceAckVTOpen) GetServiceChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_VT_OPEN} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetServiceAckVTOpen) InitializeParent(parent BACnetServiceAck) {} +func (m *_BACnetServiceAckVTOpen) InitializeParent(parent BACnetServiceAck ) {} -func (m *_BACnetServiceAckVTOpen) GetParent() BACnetServiceAck { +func (m *_BACnetServiceAckVTOpen) GetParent() BACnetServiceAck { return m._BACnetServiceAck } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_BACnetServiceAckVTOpen) GetRemoteVtSessionIdentifier() BACnetApplicati /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetServiceAckVTOpen factory function for _BACnetServiceAckVTOpen -func NewBACnetServiceAckVTOpen(remoteVtSessionIdentifier BACnetApplicationTagUnsignedInteger, serviceAckLength uint32) *_BACnetServiceAckVTOpen { +func NewBACnetServiceAckVTOpen( remoteVtSessionIdentifier BACnetApplicationTagUnsignedInteger , serviceAckLength uint32 ) *_BACnetServiceAckVTOpen { _result := &_BACnetServiceAckVTOpen{ RemoteVtSessionIdentifier: remoteVtSessionIdentifier, - _BACnetServiceAck: NewBACnetServiceAck(serviceAckLength), + _BACnetServiceAck: NewBACnetServiceAck(serviceAckLength), } _result._BACnetServiceAck._BACnetServiceAckChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewBACnetServiceAckVTOpen(remoteVtSessionIdentifier BACnetApplicationTagUns // Deprecated: use the interface for direct cast func CastBACnetServiceAckVTOpen(structType interface{}) BACnetServiceAckVTOpen { - if casted, ok := structType.(BACnetServiceAckVTOpen); ok { + if casted, ok := structType.(BACnetServiceAckVTOpen); ok { return casted } if casted, ok := structType.(*BACnetServiceAckVTOpen); ok { @@ -117,6 +120,7 @@ func (m *_BACnetServiceAckVTOpen) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetServiceAckVTOpen) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func BACnetServiceAckVTOpenParseWithBuffer(ctx context.Context, readBuffer utils if pullErr := readBuffer.PullContext("remoteVtSessionIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for remoteVtSessionIdentifier") } - _remoteVtSessionIdentifier, _remoteVtSessionIdentifierErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_remoteVtSessionIdentifier, _remoteVtSessionIdentifierErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _remoteVtSessionIdentifierErr != nil { return nil, errors.Wrap(_remoteVtSessionIdentifierErr, "Error parsing 'remoteVtSessionIdentifier' field of BACnetServiceAckVTOpen") } @@ -178,17 +182,17 @@ func (m *_BACnetServiceAckVTOpen) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for BACnetServiceAckVTOpen") } - // Simple Field (remoteVtSessionIdentifier) - if pushErr := writeBuffer.PushContext("remoteVtSessionIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for remoteVtSessionIdentifier") - } - _remoteVtSessionIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetRemoteVtSessionIdentifier()) - if popErr := writeBuffer.PopContext("remoteVtSessionIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for remoteVtSessionIdentifier") - } - if _remoteVtSessionIdentifierErr != nil { - return errors.Wrap(_remoteVtSessionIdentifierErr, "Error serializing 'remoteVtSessionIdentifier' field") - } + // Simple Field (remoteVtSessionIdentifier) + if pushErr := writeBuffer.PushContext("remoteVtSessionIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for remoteVtSessionIdentifier") + } + _remoteVtSessionIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetRemoteVtSessionIdentifier()) + if popErr := writeBuffer.PopContext("remoteVtSessionIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for remoteVtSessionIdentifier") + } + if _remoteVtSessionIdentifierErr != nil { + return errors.Wrap(_remoteVtSessionIdentifierErr, "Error serializing 'remoteVtSessionIdentifier' field") + } if popErr := writeBuffer.PopContext("BACnetServiceAckVTOpen"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetServiceAckVTOpen") @@ -198,6 +202,7 @@ func (m *_BACnetServiceAckVTOpen) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetServiceAckVTOpen) isBACnetServiceAckVTOpen() bool { return true } @@ -212,3 +217,6 @@ func (m *_BACnetServiceAckVTOpen) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServicesSupported.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServicesSupported.go index 13cdc870b0b..0428534bc9f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServicesSupported.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetServicesSupported.go @@ -34,47 +34,47 @@ type IBACnetServicesSupported interface { utils.Serializable } -const ( - BACnetServicesSupported_ACKNOWLEDGE_ALARM BACnetServicesSupported = 0 - BACnetServicesSupported_CONFIRMED_COV_NOTIFICATION BACnetServicesSupported = 1 - BACnetServicesSupported_CONFIRMED_EVENT_NOTIFICATION BACnetServicesSupported = 2 - BACnetServicesSupported_GET_ALARM_SUMMARY BACnetServicesSupported = 3 - BACnetServicesSupported_GET_ENROLLMENT_SUMMARY BACnetServicesSupported = 4 - BACnetServicesSupported_SUBSCRIBE_COV BACnetServicesSupported = 5 - BACnetServicesSupported_ATOMIC_READ_FILE BACnetServicesSupported = 6 - BACnetServicesSupported_ATOMIC_WRITE_FILE BACnetServicesSupported = 7 - BACnetServicesSupported_ADD_LIST_ELEMENT BACnetServicesSupported = 8 - BACnetServicesSupported_REMOVE_LIST_ELEMENT BACnetServicesSupported = 9 - BACnetServicesSupported_CREATE_OBJECT BACnetServicesSupported = 10 - BACnetServicesSupported_DELETE_OBJECT BACnetServicesSupported = 11 - BACnetServicesSupported_READ_PROPERTY BACnetServicesSupported = 12 - BACnetServicesSupported_READ_PROPERTY_MULTIPLE BACnetServicesSupported = 14 - BACnetServicesSupported_WRITE_PROPERTY BACnetServicesSupported = 15 - BACnetServicesSupported_WRITE_PROPERTY_MULTIPLE BACnetServicesSupported = 16 - BACnetServicesSupported_DEVICE_COMMUNICATION_CONTROL BACnetServicesSupported = 17 - BACnetServicesSupported_CONFIRMED_PRIVATE_TRANSFER BACnetServicesSupported = 18 - BACnetServicesSupported_CONFIRMED_TEXT_MESSAGE BACnetServicesSupported = 19 - BACnetServicesSupported_REINITIALIZE_DEVICE BACnetServicesSupported = 20 - BACnetServicesSupported_VT_OPEN BACnetServicesSupported = 21 - BACnetServicesSupported_VT_CLOSE BACnetServicesSupported = 22 - BACnetServicesSupported_VT_DATA BACnetServicesSupported = 23 - BACnetServicesSupported_I_AM BACnetServicesSupported = 26 - BACnetServicesSupported_I_HAVE BACnetServicesSupported = 27 - BACnetServicesSupported_UNCONFIRMED_COV_NOTIFICATION BACnetServicesSupported = 28 - BACnetServicesSupported_UNCONFIRMED_EVENT_NOTIFICATION BACnetServicesSupported = 29 - BACnetServicesSupported_UNCONFIRMED_PRIVATE_TRANSFER BACnetServicesSupported = 30 - BACnetServicesSupported_UNCONFIRMED_TEXT_MESSAGE BACnetServicesSupported = 31 - BACnetServicesSupported_TIME_SYNCHRONIZATION BACnetServicesSupported = 32 - BACnetServicesSupported_WHO_HAS BACnetServicesSupported = 33 - BACnetServicesSupported_WHO_IS BACnetServicesSupported = 34 - BACnetServicesSupported_READ_RANGE BACnetServicesSupported = 35 - BACnetServicesSupported_UTC_TIME_SYNCHRONIZATION BACnetServicesSupported = 36 - BACnetServicesSupported_LIFE_SAFETY_OPERATION BACnetServicesSupported = 37 - BACnetServicesSupported_SUBSCRIBE_COV_PROPERTY BACnetServicesSupported = 38 - BACnetServicesSupported_GET_EVENT_INFORMATION BACnetServicesSupported = 39 - BACnetServicesSupported_WRITE_GROUP BACnetServicesSupported = 40 - BACnetServicesSupported_SUBSCRIBE_COV_PROPERTY_MULTIPLE BACnetServicesSupported = 41 - BACnetServicesSupported_CONFIRMED_COV_NOTIFICATION_MULTIPLE BACnetServicesSupported = 42 +const( + BACnetServicesSupported_ACKNOWLEDGE_ALARM BACnetServicesSupported = 0 + BACnetServicesSupported_CONFIRMED_COV_NOTIFICATION BACnetServicesSupported = 1 + BACnetServicesSupported_CONFIRMED_EVENT_NOTIFICATION BACnetServicesSupported = 2 + BACnetServicesSupported_GET_ALARM_SUMMARY BACnetServicesSupported = 3 + BACnetServicesSupported_GET_ENROLLMENT_SUMMARY BACnetServicesSupported = 4 + BACnetServicesSupported_SUBSCRIBE_COV BACnetServicesSupported = 5 + BACnetServicesSupported_ATOMIC_READ_FILE BACnetServicesSupported = 6 + BACnetServicesSupported_ATOMIC_WRITE_FILE BACnetServicesSupported = 7 + BACnetServicesSupported_ADD_LIST_ELEMENT BACnetServicesSupported = 8 + BACnetServicesSupported_REMOVE_LIST_ELEMENT BACnetServicesSupported = 9 + BACnetServicesSupported_CREATE_OBJECT BACnetServicesSupported = 10 + BACnetServicesSupported_DELETE_OBJECT BACnetServicesSupported = 11 + BACnetServicesSupported_READ_PROPERTY BACnetServicesSupported = 12 + BACnetServicesSupported_READ_PROPERTY_MULTIPLE BACnetServicesSupported = 14 + BACnetServicesSupported_WRITE_PROPERTY BACnetServicesSupported = 15 + BACnetServicesSupported_WRITE_PROPERTY_MULTIPLE BACnetServicesSupported = 16 + BACnetServicesSupported_DEVICE_COMMUNICATION_CONTROL BACnetServicesSupported = 17 + BACnetServicesSupported_CONFIRMED_PRIVATE_TRANSFER BACnetServicesSupported = 18 + BACnetServicesSupported_CONFIRMED_TEXT_MESSAGE BACnetServicesSupported = 19 + BACnetServicesSupported_REINITIALIZE_DEVICE BACnetServicesSupported = 20 + BACnetServicesSupported_VT_OPEN BACnetServicesSupported = 21 + BACnetServicesSupported_VT_CLOSE BACnetServicesSupported = 22 + BACnetServicesSupported_VT_DATA BACnetServicesSupported = 23 + BACnetServicesSupported_I_AM BACnetServicesSupported = 26 + BACnetServicesSupported_I_HAVE BACnetServicesSupported = 27 + BACnetServicesSupported_UNCONFIRMED_COV_NOTIFICATION BACnetServicesSupported = 28 + BACnetServicesSupported_UNCONFIRMED_EVENT_NOTIFICATION BACnetServicesSupported = 29 + BACnetServicesSupported_UNCONFIRMED_PRIVATE_TRANSFER BACnetServicesSupported = 30 + BACnetServicesSupported_UNCONFIRMED_TEXT_MESSAGE BACnetServicesSupported = 31 + BACnetServicesSupported_TIME_SYNCHRONIZATION BACnetServicesSupported = 32 + BACnetServicesSupported_WHO_HAS BACnetServicesSupported = 33 + BACnetServicesSupported_WHO_IS BACnetServicesSupported = 34 + BACnetServicesSupported_READ_RANGE BACnetServicesSupported = 35 + BACnetServicesSupported_UTC_TIME_SYNCHRONIZATION BACnetServicesSupported = 36 + BACnetServicesSupported_LIFE_SAFETY_OPERATION BACnetServicesSupported = 37 + BACnetServicesSupported_SUBSCRIBE_COV_PROPERTY BACnetServicesSupported = 38 + BACnetServicesSupported_GET_EVENT_INFORMATION BACnetServicesSupported = 39 + BACnetServicesSupported_WRITE_GROUP BACnetServicesSupported = 40 + BACnetServicesSupported_SUBSCRIBE_COV_PROPERTY_MULTIPLE BACnetServicesSupported = 41 + BACnetServicesSupported_CONFIRMED_COV_NOTIFICATION_MULTIPLE BACnetServicesSupported = 42 BACnetServicesSupported_UNCONFIRMED_COV_NOTIFICATION_MULTIPLE BACnetServicesSupported = 43 ) @@ -82,7 +82,7 @@ var BACnetServicesSupportedValues []BACnetServicesSupported func init() { _ = errors.New - BACnetServicesSupportedValues = []BACnetServicesSupported{ + BACnetServicesSupportedValues = []BACnetServicesSupported { BACnetServicesSupported_ACKNOWLEDGE_ALARM, BACnetServicesSupported_CONFIRMED_COV_NOTIFICATION, BACnetServicesSupported_CONFIRMED_EVENT_NOTIFICATION, @@ -129,88 +129,88 @@ func init() { func BACnetServicesSupportedByValue(value uint8) (enum BACnetServicesSupported, ok bool) { switch value { - case 0: - return BACnetServicesSupported_ACKNOWLEDGE_ALARM, true - case 1: - return BACnetServicesSupported_CONFIRMED_COV_NOTIFICATION, true - case 10: - return BACnetServicesSupported_CREATE_OBJECT, true - case 11: - return BACnetServicesSupported_DELETE_OBJECT, true - case 12: - return BACnetServicesSupported_READ_PROPERTY, true - case 14: - return BACnetServicesSupported_READ_PROPERTY_MULTIPLE, true - case 15: - return BACnetServicesSupported_WRITE_PROPERTY, true - case 16: - return BACnetServicesSupported_WRITE_PROPERTY_MULTIPLE, true - case 17: - return BACnetServicesSupported_DEVICE_COMMUNICATION_CONTROL, true - case 18: - return BACnetServicesSupported_CONFIRMED_PRIVATE_TRANSFER, true - case 19: - return BACnetServicesSupported_CONFIRMED_TEXT_MESSAGE, true - case 2: - return BACnetServicesSupported_CONFIRMED_EVENT_NOTIFICATION, true - case 20: - return BACnetServicesSupported_REINITIALIZE_DEVICE, true - case 21: - return BACnetServicesSupported_VT_OPEN, true - case 22: - return BACnetServicesSupported_VT_CLOSE, true - case 23: - return BACnetServicesSupported_VT_DATA, true - case 26: - return BACnetServicesSupported_I_AM, true - case 27: - return BACnetServicesSupported_I_HAVE, true - case 28: - return BACnetServicesSupported_UNCONFIRMED_COV_NOTIFICATION, true - case 29: - return BACnetServicesSupported_UNCONFIRMED_EVENT_NOTIFICATION, true - case 3: - return BACnetServicesSupported_GET_ALARM_SUMMARY, true - case 30: - return BACnetServicesSupported_UNCONFIRMED_PRIVATE_TRANSFER, true - case 31: - return BACnetServicesSupported_UNCONFIRMED_TEXT_MESSAGE, true - case 32: - return BACnetServicesSupported_TIME_SYNCHRONIZATION, true - case 33: - return BACnetServicesSupported_WHO_HAS, true - case 34: - return BACnetServicesSupported_WHO_IS, true - case 35: - return BACnetServicesSupported_READ_RANGE, true - case 36: - return BACnetServicesSupported_UTC_TIME_SYNCHRONIZATION, true - case 37: - return BACnetServicesSupported_LIFE_SAFETY_OPERATION, true - case 38: - return BACnetServicesSupported_SUBSCRIBE_COV_PROPERTY, true - case 39: - return BACnetServicesSupported_GET_EVENT_INFORMATION, true - case 4: - return BACnetServicesSupported_GET_ENROLLMENT_SUMMARY, true - case 40: - return BACnetServicesSupported_WRITE_GROUP, true - case 41: - return BACnetServicesSupported_SUBSCRIBE_COV_PROPERTY_MULTIPLE, true - case 42: - return BACnetServicesSupported_CONFIRMED_COV_NOTIFICATION_MULTIPLE, true - case 43: - return BACnetServicesSupported_UNCONFIRMED_COV_NOTIFICATION_MULTIPLE, true - case 5: - return BACnetServicesSupported_SUBSCRIBE_COV, true - case 6: - return BACnetServicesSupported_ATOMIC_READ_FILE, true - case 7: - return BACnetServicesSupported_ATOMIC_WRITE_FILE, true - case 8: - return BACnetServicesSupported_ADD_LIST_ELEMENT, true - case 9: - return BACnetServicesSupported_REMOVE_LIST_ELEMENT, true + case 0: + return BACnetServicesSupported_ACKNOWLEDGE_ALARM, true + case 1: + return BACnetServicesSupported_CONFIRMED_COV_NOTIFICATION, true + case 10: + return BACnetServicesSupported_CREATE_OBJECT, true + case 11: + return BACnetServicesSupported_DELETE_OBJECT, true + case 12: + return BACnetServicesSupported_READ_PROPERTY, true + case 14: + return BACnetServicesSupported_READ_PROPERTY_MULTIPLE, true + case 15: + return BACnetServicesSupported_WRITE_PROPERTY, true + case 16: + return BACnetServicesSupported_WRITE_PROPERTY_MULTIPLE, true + case 17: + return BACnetServicesSupported_DEVICE_COMMUNICATION_CONTROL, true + case 18: + return BACnetServicesSupported_CONFIRMED_PRIVATE_TRANSFER, true + case 19: + return BACnetServicesSupported_CONFIRMED_TEXT_MESSAGE, true + case 2: + return BACnetServicesSupported_CONFIRMED_EVENT_NOTIFICATION, true + case 20: + return BACnetServicesSupported_REINITIALIZE_DEVICE, true + case 21: + return BACnetServicesSupported_VT_OPEN, true + case 22: + return BACnetServicesSupported_VT_CLOSE, true + case 23: + return BACnetServicesSupported_VT_DATA, true + case 26: + return BACnetServicesSupported_I_AM, true + case 27: + return BACnetServicesSupported_I_HAVE, true + case 28: + return BACnetServicesSupported_UNCONFIRMED_COV_NOTIFICATION, true + case 29: + return BACnetServicesSupported_UNCONFIRMED_EVENT_NOTIFICATION, true + case 3: + return BACnetServicesSupported_GET_ALARM_SUMMARY, true + case 30: + return BACnetServicesSupported_UNCONFIRMED_PRIVATE_TRANSFER, true + case 31: + return BACnetServicesSupported_UNCONFIRMED_TEXT_MESSAGE, true + case 32: + return BACnetServicesSupported_TIME_SYNCHRONIZATION, true + case 33: + return BACnetServicesSupported_WHO_HAS, true + case 34: + return BACnetServicesSupported_WHO_IS, true + case 35: + return BACnetServicesSupported_READ_RANGE, true + case 36: + return BACnetServicesSupported_UTC_TIME_SYNCHRONIZATION, true + case 37: + return BACnetServicesSupported_LIFE_SAFETY_OPERATION, true + case 38: + return BACnetServicesSupported_SUBSCRIBE_COV_PROPERTY, true + case 39: + return BACnetServicesSupported_GET_EVENT_INFORMATION, true + case 4: + return BACnetServicesSupported_GET_ENROLLMENT_SUMMARY, true + case 40: + return BACnetServicesSupported_WRITE_GROUP, true + case 41: + return BACnetServicesSupported_SUBSCRIBE_COV_PROPERTY_MULTIPLE, true + case 42: + return BACnetServicesSupported_CONFIRMED_COV_NOTIFICATION_MULTIPLE, true + case 43: + return BACnetServicesSupported_UNCONFIRMED_COV_NOTIFICATION_MULTIPLE, true + case 5: + return BACnetServicesSupported_SUBSCRIBE_COV, true + case 6: + return BACnetServicesSupported_ATOMIC_READ_FILE, true + case 7: + return BACnetServicesSupported_ATOMIC_WRITE_FILE, true + case 8: + return BACnetServicesSupported_ADD_LIST_ELEMENT, true + case 9: + return BACnetServicesSupported_REMOVE_LIST_ELEMENT, true } return 0, false } @@ -303,13 +303,13 @@ func BACnetServicesSupportedByName(value string) (enum BACnetServicesSupported, return 0, false } -func BACnetServicesSupportedKnows(value uint8) bool { +func BACnetServicesSupportedKnows(value uint8) bool { for _, typeValue := range BACnetServicesSupportedValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetServicesSupported(structType interface{}) BACnetServicesSupported { @@ -451,3 +451,4 @@ func (e BACnetServicesSupported) PLC4XEnumName() string { func (e BACnetServicesSupported) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServicesSupportedTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServicesSupportedTagged.go index 8b3e736c0ba..be22fb0669f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServicesSupportedTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetServicesSupportedTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetServicesSupportedTagged is the corresponding interface of BACnetServicesSupportedTagged type BACnetServicesSupportedTagged interface { @@ -66,14 +68,15 @@ type BACnetServicesSupportedTaggedExactly interface { // _BACnetServicesSupportedTagged is the data-structure of this message type _BACnetServicesSupportedTagged struct { - Header BACnetTagHeader - Payload BACnetTagPayloadBitString + Header BACnetTagHeader + Payload BACnetTagPayloadBitString // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -99,61 +102,61 @@ func (m *_BACnetServicesSupportedTagged) GetPayload() BACnetTagPayloadBitString func (m *_BACnetServicesSupportedTagged) GetWriteGroup() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (0))), func() interface{} { return bool(m.GetPayload().GetData()[0]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((0)))), func() interface{} {return bool(m.GetPayload().GetData()[0])}, func() interface{} {return bool(bool(false))}).(bool)) } func (m *_BACnetServicesSupportedTagged) GetSubscribeCovPropertyMultiple() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (1))), func() interface{} { return bool(m.GetPayload().GetData()[1]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((1)))), func() interface{} {return bool(m.GetPayload().GetData()[1])}, func() interface{} {return bool(bool(false))}).(bool)) } func (m *_BACnetServicesSupportedTagged) GetConfirmedCovNotificationMultiple() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (2))), func() interface{} { return bool(m.GetPayload().GetData()[2]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((2)))), func() interface{} {return bool(m.GetPayload().GetData()[2])}, func() interface{} {return bool(bool(false))}).(bool)) } func (m *_BACnetServicesSupportedTagged) GetUnconfirmedCovNotificationMultiple() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (3))), func() interface{} { return bool(m.GetPayload().GetData()[3]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((3)))), func() interface{} {return bool(m.GetPayload().GetData()[3])}, func() interface{} {return bool(bool(false))}).(bool)) } func (m *_BACnetServicesSupportedTagged) GetWhoIs() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (4))), func() interface{} { return bool(m.GetPayload().GetData()[4]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((4)))), func() interface{} {return bool(m.GetPayload().GetData()[4])}, func() interface{} {return bool(bool(false))}).(bool)) } func (m *_BACnetServicesSupportedTagged) GetReadRange() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (5))), func() interface{} { return bool(m.GetPayload().GetData()[5]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((5)))), func() interface{} {return bool(m.GetPayload().GetData()[5])}, func() interface{} {return bool(bool(false))}).(bool)) } func (m *_BACnetServicesSupportedTagged) GetUtcTimeSynchronization() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (6))), func() interface{} { return bool(m.GetPayload().GetData()[6]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((6)))), func() interface{} {return bool(m.GetPayload().GetData()[6])}, func() interface{} {return bool(bool(false))}).(bool)) } func (m *_BACnetServicesSupportedTagged) GetLifeSafetyOperation() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (7))), func() interface{} { return bool(m.GetPayload().GetData()[7]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((7)))), func() interface{} {return bool(m.GetPayload().GetData()[7])}, func() interface{} {return bool(bool(false))}).(bool)) } func (m *_BACnetServicesSupportedTagged) GetSubscribeCovProperty() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (8))), func() interface{} { return bool(m.GetPayload().GetData()[8]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((8)))), func() interface{} {return bool(m.GetPayload().GetData()[8])}, func() interface{} {return bool(bool(false))}).(bool)) } func (m *_BACnetServicesSupportedTagged) GetGetEventInformation() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (9))), func() interface{} { return bool(m.GetPayload().GetData()[9]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((9)))), func() interface{} {return bool(m.GetPayload().GetData()[9])}, func() interface{} {return bool(bool(false))}).(bool)) } /////////////////////// @@ -161,14 +164,15 @@ func (m *_BACnetServicesSupportedTagged) GetGetEventInformation() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetServicesSupportedTagged factory function for _BACnetServicesSupportedTagged -func NewBACnetServicesSupportedTagged(header BACnetTagHeader, payload BACnetTagPayloadBitString, tagNumber uint8, tagClass TagClass) *_BACnetServicesSupportedTagged { - return &_BACnetServicesSupportedTagged{Header: header, Payload: payload, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetServicesSupportedTagged( header BACnetTagHeader , payload BACnetTagPayloadBitString , tagNumber uint8 , tagClass TagClass ) *_BACnetServicesSupportedTagged { +return &_BACnetServicesSupportedTagged{ Header: header , Payload: payload , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetServicesSupportedTagged(structType interface{}) BACnetServicesSupportedTagged { - if casted, ok := structType.(BACnetServicesSupportedTagged); ok { + if casted, ok := structType.(BACnetServicesSupportedTagged); ok { return casted } if casted, ok := structType.(*BACnetServicesSupportedTagged); ok { @@ -213,6 +217,7 @@ func (m *_BACnetServicesSupportedTagged) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetServicesSupportedTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -234,7 +239,7 @@ func BACnetServicesSupportedTaggedParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetServicesSupportedTagged") } @@ -244,12 +249,12 @@ func BACnetServicesSupportedTaggedParseWithBuffer(ctx context.Context, readBuffe } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -257,7 +262,7 @@ func BACnetServicesSupportedTaggedParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("payload"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for payload") } - _payload, _payloadErr := BACnetTagPayloadBitStringParseWithBuffer(ctx, readBuffer, uint32(header.GetActualLength())) +_payload, _payloadErr := BACnetTagPayloadBitStringParseWithBuffer(ctx, readBuffer , uint32( header.GetActualLength() ) ) if _payloadErr != nil { return nil, errors.Wrap(_payloadErr, "Error parsing 'payload' field of BACnetServicesSupportedTagged") } @@ -267,52 +272,52 @@ func BACnetServicesSupportedTaggedParseWithBuffer(ctx context.Context, readBuffe } // Virtual field - _writeGroup := utils.InlineIf((bool((len(payload.GetData())) > (0))), func() interface{} { return bool(payload.GetData()[0]) }, func() interface{} { return bool(bool(false)) }).(bool) + _writeGroup := utils.InlineIf((bool(((len(payload.GetData()))) > ((0)))), func() interface{} {return bool(payload.GetData()[0])}, func() interface{} {return bool(bool(false))}).(bool) writeGroup := bool(_writeGroup) _ = writeGroup // Virtual field - _subscribeCovPropertyMultiple := utils.InlineIf((bool((len(payload.GetData())) > (1))), func() interface{} { return bool(payload.GetData()[1]) }, func() interface{} { return bool(bool(false)) }).(bool) + _subscribeCovPropertyMultiple := utils.InlineIf((bool(((len(payload.GetData()))) > ((1)))), func() interface{} {return bool(payload.GetData()[1])}, func() interface{} {return bool(bool(false))}).(bool) subscribeCovPropertyMultiple := bool(_subscribeCovPropertyMultiple) _ = subscribeCovPropertyMultiple // Virtual field - _confirmedCovNotificationMultiple := utils.InlineIf((bool((len(payload.GetData())) > (2))), func() interface{} { return bool(payload.GetData()[2]) }, func() interface{} { return bool(bool(false)) }).(bool) + _confirmedCovNotificationMultiple := utils.InlineIf((bool(((len(payload.GetData()))) > ((2)))), func() interface{} {return bool(payload.GetData()[2])}, func() interface{} {return bool(bool(false))}).(bool) confirmedCovNotificationMultiple := bool(_confirmedCovNotificationMultiple) _ = confirmedCovNotificationMultiple // Virtual field - _unconfirmedCovNotificationMultiple := utils.InlineIf((bool((len(payload.GetData())) > (3))), func() interface{} { return bool(payload.GetData()[3]) }, func() interface{} { return bool(bool(false)) }).(bool) + _unconfirmedCovNotificationMultiple := utils.InlineIf((bool(((len(payload.GetData()))) > ((3)))), func() interface{} {return bool(payload.GetData()[3])}, func() interface{} {return bool(bool(false))}).(bool) unconfirmedCovNotificationMultiple := bool(_unconfirmedCovNotificationMultiple) _ = unconfirmedCovNotificationMultiple // Virtual field - _whoIs := utils.InlineIf((bool((len(payload.GetData())) > (4))), func() interface{} { return bool(payload.GetData()[4]) }, func() interface{} { return bool(bool(false)) }).(bool) + _whoIs := utils.InlineIf((bool(((len(payload.GetData()))) > ((4)))), func() interface{} {return bool(payload.GetData()[4])}, func() interface{} {return bool(bool(false))}).(bool) whoIs := bool(_whoIs) _ = whoIs // Virtual field - _readRange := utils.InlineIf((bool((len(payload.GetData())) > (5))), func() interface{} { return bool(payload.GetData()[5]) }, func() interface{} { return bool(bool(false)) }).(bool) + _readRange := utils.InlineIf((bool(((len(payload.GetData()))) > ((5)))), func() interface{} {return bool(payload.GetData()[5])}, func() interface{} {return bool(bool(false))}).(bool) readRange := bool(_readRange) _ = readRange // Virtual field - _utcTimeSynchronization := utils.InlineIf((bool((len(payload.GetData())) > (6))), func() interface{} { return bool(payload.GetData()[6]) }, func() interface{} { return bool(bool(false)) }).(bool) + _utcTimeSynchronization := utils.InlineIf((bool(((len(payload.GetData()))) > ((6)))), func() interface{} {return bool(payload.GetData()[6])}, func() interface{} {return bool(bool(false))}).(bool) utcTimeSynchronization := bool(_utcTimeSynchronization) _ = utcTimeSynchronization // Virtual field - _lifeSafetyOperation := utils.InlineIf((bool((len(payload.GetData())) > (7))), func() interface{} { return bool(payload.GetData()[7]) }, func() interface{} { return bool(bool(false)) }).(bool) + _lifeSafetyOperation := utils.InlineIf((bool(((len(payload.GetData()))) > ((7)))), func() interface{} {return bool(payload.GetData()[7])}, func() interface{} {return bool(bool(false))}).(bool) lifeSafetyOperation := bool(_lifeSafetyOperation) _ = lifeSafetyOperation // Virtual field - _subscribeCovProperty := utils.InlineIf((bool((len(payload.GetData())) > (8))), func() interface{} { return bool(payload.GetData()[8]) }, func() interface{} { return bool(bool(false)) }).(bool) + _subscribeCovProperty := utils.InlineIf((bool(((len(payload.GetData()))) > ((8)))), func() interface{} {return bool(payload.GetData()[8])}, func() interface{} {return bool(bool(false))}).(bool) subscribeCovProperty := bool(_subscribeCovProperty) _ = subscribeCovProperty // Virtual field - _getEventInformation := utils.InlineIf((bool((len(payload.GetData())) > (9))), func() interface{} { return bool(payload.GetData()[9]) }, func() interface{} { return bool(bool(false)) }).(bool) + _getEventInformation := utils.InlineIf((bool(((len(payload.GetData()))) > ((9)))), func() interface{} {return bool(payload.GetData()[9])}, func() interface{} {return bool(bool(false))}).(bool) getEventInformation := bool(_getEventInformation) _ = getEventInformation @@ -322,11 +327,11 @@ func BACnetServicesSupportedTaggedParseWithBuffer(ctx context.Context, readBuffe // Create the instance return &_BACnetServicesSupportedTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Payload: payload, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Payload: payload, + }, nil } func (m *_BACnetServicesSupportedTagged) Serialize() ([]byte, error) { @@ -340,7 +345,7 @@ func (m *_BACnetServicesSupportedTagged) Serialize() ([]byte, error) { func (m *_BACnetServicesSupportedTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetServicesSupportedTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetServicesSupportedTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetServicesSupportedTagged") } @@ -414,6 +419,7 @@ func (m *_BACnetServicesSupportedTagged) SerializeWithWriteBuffer(ctx context.Co return nil } + //// // Arguments Getter @@ -423,7 +429,6 @@ func (m *_BACnetServicesSupportedTagged) GetTagNumber() uint8 { func (m *_BACnetServicesSupportedTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -441,3 +446,6 @@ func (m *_BACnetServicesSupportedTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetSetpointReference.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetSetpointReference.go index 218b0652d04..ce098a53173 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetSetpointReference.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetSetpointReference.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetSetpointReference is the corresponding interface of BACnetSetpointReference type BACnetSetpointReference interface { @@ -45,9 +47,10 @@ type BACnetSetpointReferenceExactly interface { // _BACnetSetpointReference is the data-structure of this message type _BACnetSetpointReference struct { - SetPointReference BACnetObjectPropertyReferenceEnclosed + SetPointReference BACnetObjectPropertyReferenceEnclosed } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -62,14 +65,15 @@ func (m *_BACnetSetpointReference) GetSetPointReference() BACnetObjectPropertyRe /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetSetpointReference factory function for _BACnetSetpointReference -func NewBACnetSetpointReference(setPointReference BACnetObjectPropertyReferenceEnclosed) *_BACnetSetpointReference { - return &_BACnetSetpointReference{SetPointReference: setPointReference} +func NewBACnetSetpointReference( setPointReference BACnetObjectPropertyReferenceEnclosed ) *_BACnetSetpointReference { +return &_BACnetSetpointReference{ SetPointReference: setPointReference } } // Deprecated: use the interface for direct cast func CastBACnetSetpointReference(structType interface{}) BACnetSetpointReference { - if casted, ok := structType.(BACnetSetpointReference); ok { + if casted, ok := structType.(BACnetSetpointReference); ok { return casted } if casted, ok := structType.(*BACnetSetpointReference); ok { @@ -93,6 +97,7 @@ func (m *_BACnetSetpointReference) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetSetpointReference) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -112,12 +117,12 @@ func BACnetSetpointReferenceParseWithBuffer(ctx context.Context, readBuffer util // Optional Field (setPointReference) (Can be skipped, if a given expression evaluates to false) var setPointReference BACnetObjectPropertyReferenceEnclosed = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("setPointReference"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for setPointReference") } - _val, _err := BACnetObjectPropertyReferenceEnclosedParseWithBuffer(ctx, readBuffer, uint8(0)) +_val, _err := BACnetObjectPropertyReferenceEnclosedParseWithBuffer(ctx, readBuffer , uint8(0) ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -138,8 +143,8 @@ func BACnetSetpointReferenceParseWithBuffer(ctx context.Context, readBuffer util // Create the instance return &_BACnetSetpointReference{ - SetPointReference: setPointReference, - }, nil + SetPointReference: setPointReference, + }, nil } func (m *_BACnetSetpointReference) Serialize() ([]byte, error) { @@ -153,7 +158,7 @@ func (m *_BACnetSetpointReference) Serialize() ([]byte, error) { func (m *_BACnetSetpointReference) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetSetpointReference"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetSetpointReference"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetSetpointReference") } @@ -179,6 +184,7 @@ func (m *_BACnetSetpointReference) SerializeWithWriteBuffer(ctx context.Context, return nil } + func (m *_BACnetSetpointReference) isBACnetSetpointReference() bool { return true } @@ -193,3 +199,6 @@ func (m *_BACnetSetpointReference) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetShedLevel.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetShedLevel.go index 11a26fb4c75..c696593727d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetShedLevel.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetShedLevel.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetShedLevel is the corresponding interface of BACnetShedLevel type BACnetShedLevel interface { @@ -47,7 +49,7 @@ type BACnetShedLevelExactly interface { // _BACnetShedLevel is the data-structure of this message type _BACnetShedLevel struct { _BACnetShedLevelChildRequirements - PeekedTagHeader BACnetTagHeader + PeekedTagHeader BACnetTagHeader } type _BACnetShedLevelChildRequirements interface { @@ -55,6 +57,7 @@ type _BACnetShedLevelChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type BACnetShedLevelParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetShedLevel, serializeChildFunction func() error) error GetTypeName() string @@ -62,13 +65,12 @@ type BACnetShedLevelParent interface { type BACnetShedLevelChild interface { utils.Serializable - InitializeParent(parent BACnetShedLevel, peekedTagHeader BACnetTagHeader) +InitializeParent(parent BACnetShedLevel , peekedTagHeader BACnetTagHeader ) GetParent() *BACnetShedLevel GetTypeName() string BACnetShedLevel } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,14 +100,15 @@ func (m *_BACnetShedLevel) GetPeekedTagNumber() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetShedLevel factory function for _BACnetShedLevel -func NewBACnetShedLevel(peekedTagHeader BACnetTagHeader) *_BACnetShedLevel { - return &_BACnetShedLevel{PeekedTagHeader: peekedTagHeader} +func NewBACnetShedLevel( peekedTagHeader BACnetTagHeader ) *_BACnetShedLevel { +return &_BACnetShedLevel{ PeekedTagHeader: peekedTagHeader } } // Deprecated: use the interface for direct cast func CastBACnetShedLevel(structType interface{}) BACnetShedLevel { - if casted, ok := structType.(BACnetShedLevel); ok { + if casted, ok := structType.(BACnetShedLevel); ok { return casted } if casted, ok := structType.(*BACnetShedLevel); ok { @@ -118,6 +121,7 @@ func (m *_BACnetShedLevel) GetTypeName() string { return "BACnetShedLevel" } + func (m *_BACnetShedLevel) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -143,13 +147,13 @@ func BACnetShedLevelParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu currentPos := positionAware.GetPos() _ = currentPos - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Virtual field _peekedTagNumber := peekedTagHeader.GetActualTagNumber() @@ -159,19 +163,19 @@ func BACnetShedLevelParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetShedLevelChildSerializeRequirement interface { BACnetShedLevel - InitializeParent(BACnetShedLevel, BACnetTagHeader) + InitializeParent(BACnetShedLevel, BACnetTagHeader) GetParent() BACnetShedLevel } var _childTemp interface{} var _child BACnetShedLevelChildSerializeRequirement var typeSwitchError error switch { - case peekedTagNumber == uint8(0): // BACnetShedLevelPercent - _childTemp, typeSwitchError = BACnetShedLevelPercentParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(1): // BACnetShedLevelLevel - _childTemp, typeSwitchError = BACnetShedLevelLevelParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(2): // BACnetShedLevelAmount - _childTemp, typeSwitchError = BACnetShedLevelAmountParseWithBuffer(ctx, readBuffer) +case peekedTagNumber == uint8(0) : // BACnetShedLevelPercent + _childTemp, typeSwitchError = BACnetShedLevelPercentParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(1) : // BACnetShedLevelLevel + _childTemp, typeSwitchError = BACnetShedLevelLevelParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(2) : // BACnetShedLevelAmount + _childTemp, typeSwitchError = BACnetShedLevelAmountParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedTagNumber=%v]", peekedTagNumber) } @@ -185,7 +189,7 @@ func BACnetShedLevelParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu } // Finish initializing - _child.InitializeParent(_child, peekedTagHeader) +_child.InitializeParent(_child , peekedTagHeader ) return _child, nil } @@ -195,7 +199,7 @@ func (pm *_BACnetShedLevel) SerializeParent(ctx context.Context, writeBuffer uti _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetShedLevel"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetShedLevel"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetShedLevel") } // Virtual field @@ -214,6 +218,7 @@ func (pm *_BACnetShedLevel) SerializeParent(ctx context.Context, writeBuffer uti return nil } + func (m *_BACnetShedLevel) isBACnetShedLevel() bool { return true } @@ -228,3 +233,6 @@ func (m *_BACnetShedLevel) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetShedLevelAmount.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetShedLevelAmount.go index 9f5c1173dd2..bf5e611992a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetShedLevelAmount.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetShedLevelAmount.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetShedLevelAmount is the corresponding interface of BACnetShedLevelAmount type BACnetShedLevelAmount interface { @@ -46,9 +48,11 @@ type BACnetShedLevelAmountExactly interface { // _BACnetShedLevelAmount is the data-structure of this message type _BACnetShedLevelAmount struct { *_BACnetShedLevel - Amount BACnetContextTagReal + Amount BACnetContextTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetShedLevelAmount struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetShedLevelAmount) InitializeParent(parent BACnetShedLevel, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetShedLevelAmount) InitializeParent(parent BACnetShedLevel , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetShedLevelAmount) GetParent() BACnetShedLevel { +func (m *_BACnetShedLevelAmount) GetParent() BACnetShedLevel { return m._BACnetShedLevel } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetShedLevelAmount) GetAmount() BACnetContextTagReal { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetShedLevelAmount factory function for _BACnetShedLevelAmount -func NewBACnetShedLevelAmount(amount BACnetContextTagReal, peekedTagHeader BACnetTagHeader) *_BACnetShedLevelAmount { +func NewBACnetShedLevelAmount( amount BACnetContextTagReal , peekedTagHeader BACnetTagHeader ) *_BACnetShedLevelAmount { _result := &_BACnetShedLevelAmount{ - Amount: amount, - _BACnetShedLevel: NewBACnetShedLevel(peekedTagHeader), + Amount: amount, + _BACnetShedLevel: NewBACnetShedLevel(peekedTagHeader), } _result._BACnetShedLevel._BACnetShedLevelChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetShedLevelAmount(amount BACnetContextTagReal, peekedTagHeader BACne // Deprecated: use the interface for direct cast func CastBACnetShedLevelAmount(structType interface{}) BACnetShedLevelAmount { - if casted, ok := structType.(BACnetShedLevelAmount); ok { + if casted, ok := structType.(BACnetShedLevelAmount); ok { return casted } if casted, ok := structType.(*BACnetShedLevelAmount); ok { @@ -115,6 +118,7 @@ func (m *_BACnetShedLevelAmount) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetShedLevelAmount) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetShedLevelAmountParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("amount"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for amount") } - _amount, _amountErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), BACnetDataType(BACnetDataType_REAL)) +_amount, _amountErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , BACnetDataType( BACnetDataType_REAL ) ) if _amountErr != nil { return nil, errors.Wrap(_amountErr, "Error parsing 'amount' field of BACnetShedLevelAmount") } @@ -151,8 +155,9 @@ func BACnetShedLevelAmountParseWithBuffer(ctx context.Context, readBuffer utils. // Create a partially initialized instance _child := &_BACnetShedLevelAmount{ - _BACnetShedLevel: &_BACnetShedLevel{}, - Amount: amount, + _BACnetShedLevel: &_BACnetShedLevel{ + }, + Amount: amount, } _child._BACnetShedLevel._BACnetShedLevelChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetShedLevelAmount) SerializeWithWriteBuffer(ctx context.Context, w return errors.Wrap(pushErr, "Error pushing for BACnetShedLevelAmount") } - // Simple Field (amount) - if pushErr := writeBuffer.PushContext("amount"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for amount") - } - _amountErr := writeBuffer.WriteSerializable(ctx, m.GetAmount()) - if popErr := writeBuffer.PopContext("amount"); popErr != nil { - return errors.Wrap(popErr, "Error popping for amount") - } - if _amountErr != nil { - return errors.Wrap(_amountErr, "Error serializing 'amount' field") - } + // Simple Field (amount) + if pushErr := writeBuffer.PushContext("amount"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for amount") + } + _amountErr := writeBuffer.WriteSerializable(ctx, m.GetAmount()) + if popErr := writeBuffer.PopContext("amount"); popErr != nil { + return errors.Wrap(popErr, "Error popping for amount") + } + if _amountErr != nil { + return errors.Wrap(_amountErr, "Error serializing 'amount' field") + } if popErr := writeBuffer.PopContext("BACnetShedLevelAmount"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetShedLevelAmount") @@ -194,6 +199,7 @@ func (m *_BACnetShedLevelAmount) SerializeWithWriteBuffer(ctx context.Context, w return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetShedLevelAmount) isBACnetShedLevelAmount() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetShedLevelAmount) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetShedLevelLevel.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetShedLevelLevel.go index 850f695baf3..15a0f113218 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetShedLevelLevel.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetShedLevelLevel.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetShedLevelLevel is the corresponding interface of BACnetShedLevelLevel type BACnetShedLevelLevel interface { @@ -46,9 +48,11 @@ type BACnetShedLevelLevelExactly interface { // _BACnetShedLevelLevel is the data-structure of this message type _BACnetShedLevelLevel struct { *_BACnetShedLevel - Level BACnetContextTagUnsignedInteger + Level BACnetContextTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetShedLevelLevel struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetShedLevelLevel) InitializeParent(parent BACnetShedLevel, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetShedLevelLevel) InitializeParent(parent BACnetShedLevel , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetShedLevelLevel) GetParent() BACnetShedLevel { +func (m *_BACnetShedLevelLevel) GetParent() BACnetShedLevel { return m._BACnetShedLevel } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetShedLevelLevel) GetLevel() BACnetContextTagUnsignedInteger { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetShedLevelLevel factory function for _BACnetShedLevelLevel -func NewBACnetShedLevelLevel(level BACnetContextTagUnsignedInteger, peekedTagHeader BACnetTagHeader) *_BACnetShedLevelLevel { +func NewBACnetShedLevelLevel( level BACnetContextTagUnsignedInteger , peekedTagHeader BACnetTagHeader ) *_BACnetShedLevelLevel { _result := &_BACnetShedLevelLevel{ - Level: level, - _BACnetShedLevel: NewBACnetShedLevel(peekedTagHeader), + Level: level, + _BACnetShedLevel: NewBACnetShedLevel(peekedTagHeader), } _result._BACnetShedLevel._BACnetShedLevelChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetShedLevelLevel(level BACnetContextTagUnsignedInteger, peekedTagHea // Deprecated: use the interface for direct cast func CastBACnetShedLevelLevel(structType interface{}) BACnetShedLevelLevel { - if casted, ok := structType.(BACnetShedLevelLevel); ok { + if casted, ok := structType.(BACnetShedLevelLevel); ok { return casted } if casted, ok := structType.(*BACnetShedLevelLevel); ok { @@ -115,6 +118,7 @@ func (m *_BACnetShedLevelLevel) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetShedLevelLevel) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetShedLevelLevelParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("level"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for level") } - _level, _levelErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_level, _levelErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _levelErr != nil { return nil, errors.Wrap(_levelErr, "Error parsing 'level' field of BACnetShedLevelLevel") } @@ -151,8 +155,9 @@ func BACnetShedLevelLevelParseWithBuffer(ctx context.Context, readBuffer utils.R // Create a partially initialized instance _child := &_BACnetShedLevelLevel{ - _BACnetShedLevel: &_BACnetShedLevel{}, - Level: level, + _BACnetShedLevel: &_BACnetShedLevel{ + }, + Level: level, } _child._BACnetShedLevel._BACnetShedLevelChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetShedLevelLevel) SerializeWithWriteBuffer(ctx context.Context, wr return errors.Wrap(pushErr, "Error pushing for BACnetShedLevelLevel") } - // Simple Field (level) - if pushErr := writeBuffer.PushContext("level"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for level") - } - _levelErr := writeBuffer.WriteSerializable(ctx, m.GetLevel()) - if popErr := writeBuffer.PopContext("level"); popErr != nil { - return errors.Wrap(popErr, "Error popping for level") - } - if _levelErr != nil { - return errors.Wrap(_levelErr, "Error serializing 'level' field") - } + // Simple Field (level) + if pushErr := writeBuffer.PushContext("level"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for level") + } + _levelErr := writeBuffer.WriteSerializable(ctx, m.GetLevel()) + if popErr := writeBuffer.PopContext("level"); popErr != nil { + return errors.Wrap(popErr, "Error popping for level") + } + if _levelErr != nil { + return errors.Wrap(_levelErr, "Error serializing 'level' field") + } if popErr := writeBuffer.PopContext("BACnetShedLevelLevel"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetShedLevelLevel") @@ -194,6 +199,7 @@ func (m *_BACnetShedLevelLevel) SerializeWithWriteBuffer(ctx context.Context, wr return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetShedLevelLevel) isBACnetShedLevelLevel() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetShedLevelLevel) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetShedLevelPercent.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetShedLevelPercent.go index 1e51d5739c8..ad3e1df25ab 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetShedLevelPercent.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetShedLevelPercent.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetShedLevelPercent is the corresponding interface of BACnetShedLevelPercent type BACnetShedLevelPercent interface { @@ -46,9 +48,11 @@ type BACnetShedLevelPercentExactly interface { // _BACnetShedLevelPercent is the data-structure of this message type _BACnetShedLevelPercent struct { *_BACnetShedLevel - Percent BACnetContextTagUnsignedInteger + Percent BACnetContextTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetShedLevelPercent struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetShedLevelPercent) InitializeParent(parent BACnetShedLevel, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetShedLevelPercent) InitializeParent(parent BACnetShedLevel , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetShedLevelPercent) GetParent() BACnetShedLevel { +func (m *_BACnetShedLevelPercent) GetParent() BACnetShedLevel { return m._BACnetShedLevel } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetShedLevelPercent) GetPercent() BACnetContextTagUnsignedInteger { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetShedLevelPercent factory function for _BACnetShedLevelPercent -func NewBACnetShedLevelPercent(percent BACnetContextTagUnsignedInteger, peekedTagHeader BACnetTagHeader) *_BACnetShedLevelPercent { +func NewBACnetShedLevelPercent( percent BACnetContextTagUnsignedInteger , peekedTagHeader BACnetTagHeader ) *_BACnetShedLevelPercent { _result := &_BACnetShedLevelPercent{ - Percent: percent, - _BACnetShedLevel: NewBACnetShedLevel(peekedTagHeader), + Percent: percent, + _BACnetShedLevel: NewBACnetShedLevel(peekedTagHeader), } _result._BACnetShedLevel._BACnetShedLevelChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetShedLevelPercent(percent BACnetContextTagUnsignedInteger, peekedTa // Deprecated: use the interface for direct cast func CastBACnetShedLevelPercent(structType interface{}) BACnetShedLevelPercent { - if casted, ok := structType.(BACnetShedLevelPercent); ok { + if casted, ok := structType.(BACnetShedLevelPercent); ok { return casted } if casted, ok := structType.(*BACnetShedLevelPercent); ok { @@ -115,6 +118,7 @@ func (m *_BACnetShedLevelPercent) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetShedLevelPercent) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetShedLevelPercentParseWithBuffer(ctx context.Context, readBuffer utils if pullErr := readBuffer.PullContext("percent"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for percent") } - _percent, _percentErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_percent, _percentErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _percentErr != nil { return nil, errors.Wrap(_percentErr, "Error parsing 'percent' field of BACnetShedLevelPercent") } @@ -151,8 +155,9 @@ func BACnetShedLevelPercentParseWithBuffer(ctx context.Context, readBuffer utils // Create a partially initialized instance _child := &_BACnetShedLevelPercent{ - _BACnetShedLevel: &_BACnetShedLevel{}, - Percent: percent, + _BACnetShedLevel: &_BACnetShedLevel{ + }, + Percent: percent, } _child._BACnetShedLevel._BACnetShedLevelChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetShedLevelPercent) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for BACnetShedLevelPercent") } - // Simple Field (percent) - if pushErr := writeBuffer.PushContext("percent"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for percent") - } - _percentErr := writeBuffer.WriteSerializable(ctx, m.GetPercent()) - if popErr := writeBuffer.PopContext("percent"); popErr != nil { - return errors.Wrap(popErr, "Error popping for percent") - } - if _percentErr != nil { - return errors.Wrap(_percentErr, "Error serializing 'percent' field") - } + // Simple Field (percent) + if pushErr := writeBuffer.PushContext("percent"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for percent") + } + _percentErr := writeBuffer.WriteSerializable(ctx, m.GetPercent()) + if popErr := writeBuffer.PopContext("percent"); popErr != nil { + return errors.Wrap(popErr, "Error popping for percent") + } + if _percentErr != nil { + return errors.Wrap(_percentErr, "Error serializing 'percent' field") + } if popErr := writeBuffer.PopContext("BACnetShedLevelPercent"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetShedLevelPercent") @@ -194,6 +199,7 @@ func (m *_BACnetShedLevelPercent) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetShedLevelPercent) isBACnetShedLevelPercent() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetShedLevelPercent) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetShedState.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetShedState.go index 98bb31b87da..431ecf1ae0a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetShedState.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetShedState.go @@ -34,18 +34,18 @@ type IBACnetShedState interface { utils.Serializable } -const ( - BACnetShedState_SHED_INACTIVE BACnetShedState = 0 +const( + BACnetShedState_SHED_INACTIVE BACnetShedState = 0 BACnetShedState_SHED_REQUEST_PENDING BACnetShedState = 1 - BACnetShedState_SHED_COMPLIANT BACnetShedState = 2 - BACnetShedState_SHED_NON_COMPLIANT BACnetShedState = 3 + BACnetShedState_SHED_COMPLIANT BACnetShedState = 2 + BACnetShedState_SHED_NON_COMPLIANT BACnetShedState = 3 ) var BACnetShedStateValues []BACnetShedState func init() { _ = errors.New - BACnetShedStateValues = []BACnetShedState{ + BACnetShedStateValues = []BACnetShedState { BACnetShedState_SHED_INACTIVE, BACnetShedState_SHED_REQUEST_PENDING, BACnetShedState_SHED_COMPLIANT, @@ -55,14 +55,14 @@ func init() { func BACnetShedStateByValue(value uint8) (enum BACnetShedState, ok bool) { switch value { - case 0: - return BACnetShedState_SHED_INACTIVE, true - case 1: - return BACnetShedState_SHED_REQUEST_PENDING, true - case 2: - return BACnetShedState_SHED_COMPLIANT, true - case 3: - return BACnetShedState_SHED_NON_COMPLIANT, true + case 0: + return BACnetShedState_SHED_INACTIVE, true + case 1: + return BACnetShedState_SHED_REQUEST_PENDING, true + case 2: + return BACnetShedState_SHED_COMPLIANT, true + case 3: + return BACnetShedState_SHED_NON_COMPLIANT, true } return 0, false } @@ -81,13 +81,13 @@ func BACnetShedStateByName(value string) (enum BACnetShedState, ok bool) { return 0, false } -func BACnetShedStateKnows(value uint8) bool { +func BACnetShedStateKnows(value uint8) bool { for _, typeValue := range BACnetShedStateValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetShedState(structType interface{}) BACnetShedState { @@ -155,3 +155,4 @@ func (e BACnetShedState) PLC4XEnumName() string { func (e BACnetShedState) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetShedStateTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetShedStateTagged.go index 7f89f430ca6..8f0b7bceeb2 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetShedStateTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetShedStateTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetShedStateTagged is the corresponding interface of BACnetShedStateTagged type BACnetShedStateTagged interface { @@ -46,14 +48,15 @@ type BACnetShedStateTaggedExactly interface { // _BACnetShedStateTagged is the data-structure of this message type _BACnetShedStateTagged struct { - Header BACnetTagHeader - Value BACnetShedState + Header BACnetTagHeader + Value BACnetShedState // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_BACnetShedStateTagged) GetValue() BACnetShedState { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetShedStateTagged factory function for _BACnetShedStateTagged -func NewBACnetShedStateTagged(header BACnetTagHeader, value BACnetShedState, tagNumber uint8, tagClass TagClass) *_BACnetShedStateTagged { - return &_BACnetShedStateTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetShedStateTagged( header BACnetTagHeader , value BACnetShedState , tagNumber uint8 , tagClass TagClass ) *_BACnetShedStateTagged { +return &_BACnetShedStateTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetShedStateTagged(structType interface{}) BACnetShedStateTagged { - if casted, ok := structType.(BACnetShedStateTagged); ok { + if casted, ok := structType.(BACnetShedStateTagged); ok { return casted } if casted, ok := structType.(*BACnetShedStateTagged); ok { @@ -104,6 +108,7 @@ func (m *_BACnetShedStateTagged) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetShedStateTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func BACnetShedStateTaggedParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetShedStateTagged") } @@ -135,12 +140,12 @@ func BACnetShedStateTaggedParseWithBuffer(ctx context.Context, readBuffer utils. } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func BACnetShedStateTaggedParseWithBuffer(ctx context.Context, readBuffer utils. } var value BACnetShedState if _value != nil { - value = _value.(BACnetShedState) + value = _value.(BACnetShedState) } if closeErr := readBuffer.CloseContext("BACnetShedStateTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func BACnetShedStateTaggedParseWithBuffer(ctx context.Context, readBuffer utils. // Create the instance return &_BACnetShedStateTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_BACnetShedStateTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_BACnetShedStateTagged) Serialize() ([]byte, error) { func (m *_BACnetShedStateTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetShedStateTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetShedStateTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetShedStateTagged") } @@ -206,6 +211,7 @@ func (m *_BACnetShedStateTagged) SerializeWithWriteBuffer(ctx context.Context, w return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_BACnetShedStateTagged) GetTagNumber() uint8 { func (m *_BACnetShedStateTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_BACnetShedStateTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetSilencedState.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetSilencedState.go index 9d027f3a3a4..b8962f9e4c8 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetSilencedState.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetSilencedState.go @@ -34,19 +34,19 @@ type IBACnetSilencedState interface { utils.Serializable } -const ( - BACnetSilencedState_UNSILENCED BACnetSilencedState = 0 - BACnetSilencedState_AUDIBLE_SILENCED BACnetSilencedState = 1 - BACnetSilencedState_VISIBLE_SILENCED BACnetSilencedState = 2 - BACnetSilencedState_ALL_SILENCED BACnetSilencedState = 3 - BACnetSilencedState_VENDOR_PROPRIETARY_VALUE BACnetSilencedState = 0xFFFF +const( + BACnetSilencedState_UNSILENCED BACnetSilencedState = 0 + BACnetSilencedState_AUDIBLE_SILENCED BACnetSilencedState = 1 + BACnetSilencedState_VISIBLE_SILENCED BACnetSilencedState = 2 + BACnetSilencedState_ALL_SILENCED BACnetSilencedState = 3 + BACnetSilencedState_VENDOR_PROPRIETARY_VALUE BACnetSilencedState = 0XFFFF ) var BACnetSilencedStateValues []BACnetSilencedState func init() { _ = errors.New - BACnetSilencedStateValues = []BACnetSilencedState{ + BACnetSilencedStateValues = []BACnetSilencedState { BACnetSilencedState_UNSILENCED, BACnetSilencedState_AUDIBLE_SILENCED, BACnetSilencedState_VISIBLE_SILENCED, @@ -57,16 +57,16 @@ func init() { func BACnetSilencedStateByValue(value uint16) (enum BACnetSilencedState, ok bool) { switch value { - case 0: - return BACnetSilencedState_UNSILENCED, true - case 0xFFFF: - return BACnetSilencedState_VENDOR_PROPRIETARY_VALUE, true - case 1: - return BACnetSilencedState_AUDIBLE_SILENCED, true - case 2: - return BACnetSilencedState_VISIBLE_SILENCED, true - case 3: - return BACnetSilencedState_ALL_SILENCED, true + case 0: + return BACnetSilencedState_UNSILENCED, true + case 0XFFFF: + return BACnetSilencedState_VENDOR_PROPRIETARY_VALUE, true + case 1: + return BACnetSilencedState_AUDIBLE_SILENCED, true + case 2: + return BACnetSilencedState_VISIBLE_SILENCED, true + case 3: + return BACnetSilencedState_ALL_SILENCED, true } return 0, false } @@ -87,13 +87,13 @@ func BACnetSilencedStateByName(value string) (enum BACnetSilencedState, ok bool) return 0, false } -func BACnetSilencedStateKnows(value uint16) bool { +func BACnetSilencedStateKnows(value uint16) bool { for _, typeValue := range BACnetSilencedStateValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastBACnetSilencedState(structType interface{}) BACnetSilencedState { @@ -163,3 +163,4 @@ func (e BACnetSilencedState) PLC4XEnumName() string { func (e BACnetSilencedState) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetSilencedStateTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetSilencedStateTagged.go index 35cf7edba6d..349c8d63643 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetSilencedStateTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetSilencedStateTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetSilencedStateTagged is the corresponding interface of BACnetSilencedStateTagged type BACnetSilencedStateTagged interface { @@ -50,15 +52,16 @@ type BACnetSilencedStateTaggedExactly interface { // _BACnetSilencedStateTagged is the data-structure of this message type _BACnetSilencedStateTagged struct { - Header BACnetTagHeader - Value BACnetSilencedState - ProprietaryValue uint32 + Header BACnetTagHeader + Value BACnetSilencedState + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_BACnetSilencedStateTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetSilencedStateTagged factory function for _BACnetSilencedStateTagged -func NewBACnetSilencedStateTagged(header BACnetTagHeader, value BACnetSilencedState, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_BACnetSilencedStateTagged { - return &_BACnetSilencedStateTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetSilencedStateTagged( header BACnetTagHeader , value BACnetSilencedState , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_BACnetSilencedStateTagged { +return &_BACnetSilencedStateTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetSilencedStateTagged(structType interface{}) BACnetSilencedStateTagged { - if casted, ok := structType.(BACnetSilencedStateTagged); ok { + if casted, ok := structType.(BACnetSilencedStateTagged); ok { return casted } if casted, ok := structType.(*BACnetSilencedStateTagged); ok { @@ -123,16 +127,17 @@ func (m *_BACnetSilencedStateTagged) GetLengthInBits(ctx context.Context) uint16 lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetSilencedStateTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetSilencedStateTaggedParseWithBuffer(ctx context.Context, readBuffer ut if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetSilencedStateTagged") } @@ -164,12 +169,12 @@ func BACnetSilencedStateTaggedParseWithBuffer(ctx context.Context, readBuffer ut } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func BACnetSilencedStateTaggedParseWithBuffer(ctx context.Context, readBuffer ut } var value BACnetSilencedState if _value != nil { - value = _value.(BACnetSilencedState) + value = _value.(BACnetSilencedState) } // Virtual field @@ -195,7 +200,7 @@ func BACnetSilencedStateTaggedParseWithBuffer(ctx context.Context, readBuffer ut } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetSilencedStateTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func BACnetSilencedStateTaggedParseWithBuffer(ctx context.Context, readBuffer ut // Create the instance return &_BACnetSilencedStateTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetSilencedStateTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_BACnetSilencedStateTagged) Serialize() ([]byte, error) { func (m *_BACnetSilencedStateTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetSilencedStateTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetSilencedStateTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetSilencedStateTagged") } @@ -261,6 +266,7 @@ func (m *_BACnetSilencedStateTagged) SerializeWithWriteBuffer(ctx context.Contex return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_BACnetSilencedStateTagged) GetTagNumber() uint8 { func (m *_BACnetSilencedStateTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_BACnetSilencedStateTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetSpecialEvent.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetSpecialEvent.go index dd8b2002689..07361790742 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetSpecialEvent.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetSpecialEvent.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetSpecialEvent is the corresponding interface of BACnetSpecialEvent type BACnetSpecialEvent interface { @@ -48,11 +50,12 @@ type BACnetSpecialEventExactly interface { // _BACnetSpecialEvent is the data-structure of this message type _BACnetSpecialEvent struct { - Period BACnetSpecialEventPeriod - ListOfTimeValues BACnetSpecialEventListOfTimeValues - EventPriority BACnetContextTagUnsignedInteger + Period BACnetSpecialEventPeriod + ListOfTimeValues BACnetSpecialEventListOfTimeValues + EventPriority BACnetContextTagUnsignedInteger } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -75,14 +78,15 @@ func (m *_BACnetSpecialEvent) GetEventPriority() BACnetContextTagUnsignedInteger /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetSpecialEvent factory function for _BACnetSpecialEvent -func NewBACnetSpecialEvent(period BACnetSpecialEventPeriod, listOfTimeValues BACnetSpecialEventListOfTimeValues, eventPriority BACnetContextTagUnsignedInteger) *_BACnetSpecialEvent { - return &_BACnetSpecialEvent{Period: period, ListOfTimeValues: listOfTimeValues, EventPriority: eventPriority} +func NewBACnetSpecialEvent( period BACnetSpecialEventPeriod , listOfTimeValues BACnetSpecialEventListOfTimeValues , eventPriority BACnetContextTagUnsignedInteger ) *_BACnetSpecialEvent { +return &_BACnetSpecialEvent{ Period: period , ListOfTimeValues: listOfTimeValues , EventPriority: eventPriority } } // Deprecated: use the interface for direct cast func CastBACnetSpecialEvent(structType interface{}) BACnetSpecialEvent { - if casted, ok := structType.(BACnetSpecialEvent); ok { + if casted, ok := structType.(BACnetSpecialEvent); ok { return casted } if casted, ok := structType.(*BACnetSpecialEvent); ok { @@ -110,6 +114,7 @@ func (m *_BACnetSpecialEvent) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetSpecialEvent) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -131,7 +136,7 @@ func BACnetSpecialEventParseWithBuffer(ctx context.Context, readBuffer utils.Rea if pullErr := readBuffer.PullContext("period"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for period") } - _period, _periodErr := BACnetSpecialEventPeriodParseWithBuffer(ctx, readBuffer) +_period, _periodErr := BACnetSpecialEventPeriodParseWithBuffer(ctx, readBuffer) if _periodErr != nil { return nil, errors.Wrap(_periodErr, "Error parsing 'period' field of BACnetSpecialEvent") } @@ -144,7 +149,7 @@ func BACnetSpecialEventParseWithBuffer(ctx context.Context, readBuffer utils.Rea if pullErr := readBuffer.PullContext("listOfTimeValues"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for listOfTimeValues") } - _listOfTimeValues, _listOfTimeValuesErr := BACnetSpecialEventListOfTimeValuesParseWithBuffer(ctx, readBuffer, uint8(uint8(2))) +_listOfTimeValues, _listOfTimeValuesErr := BACnetSpecialEventListOfTimeValuesParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) ) if _listOfTimeValuesErr != nil { return nil, errors.Wrap(_listOfTimeValuesErr, "Error parsing 'listOfTimeValues' field of BACnetSpecialEvent") } @@ -157,7 +162,7 @@ func BACnetSpecialEventParseWithBuffer(ctx context.Context, readBuffer utils.Rea if pullErr := readBuffer.PullContext("eventPriority"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for eventPriority") } - _eventPriority, _eventPriorityErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(3)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_eventPriority, _eventPriorityErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(3) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _eventPriorityErr != nil { return nil, errors.Wrap(_eventPriorityErr, "Error parsing 'eventPriority' field of BACnetSpecialEvent") } @@ -172,10 +177,10 @@ func BACnetSpecialEventParseWithBuffer(ctx context.Context, readBuffer utils.Rea // Create the instance return &_BACnetSpecialEvent{ - Period: period, - ListOfTimeValues: listOfTimeValues, - EventPriority: eventPriority, - }, nil + Period: period, + ListOfTimeValues: listOfTimeValues, + EventPriority: eventPriority, + }, nil } func (m *_BACnetSpecialEvent) Serialize() ([]byte, error) { @@ -189,7 +194,7 @@ func (m *_BACnetSpecialEvent) Serialize() ([]byte, error) { func (m *_BACnetSpecialEvent) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetSpecialEvent"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetSpecialEvent"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetSpecialEvent") } @@ -235,6 +240,7 @@ func (m *_BACnetSpecialEvent) SerializeWithWriteBuffer(ctx context.Context, writ return nil } + func (m *_BACnetSpecialEvent) isBACnetSpecialEvent() bool { return true } @@ -249,3 +255,6 @@ func (m *_BACnetSpecialEvent) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetSpecialEventListOfTimeValues.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetSpecialEventListOfTimeValues.go index c423d21f57d..34f616815b3 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetSpecialEventListOfTimeValues.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetSpecialEventListOfTimeValues.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetSpecialEventListOfTimeValues is the corresponding interface of BACnetSpecialEventListOfTimeValues type BACnetSpecialEventListOfTimeValues interface { @@ -49,14 +51,15 @@ type BACnetSpecialEventListOfTimeValuesExactly interface { // _BACnetSpecialEventListOfTimeValues is the data-structure of this message type _BACnetSpecialEventListOfTimeValues struct { - OpeningTag BACnetOpeningTag - ListOfTimeValues []BACnetTimeValue - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + ListOfTimeValues []BACnetTimeValue + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -79,14 +82,15 @@ func (m *_BACnetSpecialEventListOfTimeValues) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetSpecialEventListOfTimeValues factory function for _BACnetSpecialEventListOfTimeValues -func NewBACnetSpecialEventListOfTimeValues(openingTag BACnetOpeningTag, listOfTimeValues []BACnetTimeValue, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetSpecialEventListOfTimeValues { - return &_BACnetSpecialEventListOfTimeValues{OpeningTag: openingTag, ListOfTimeValues: listOfTimeValues, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetSpecialEventListOfTimeValues( openingTag BACnetOpeningTag , listOfTimeValues []BACnetTimeValue , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetSpecialEventListOfTimeValues { +return &_BACnetSpecialEventListOfTimeValues{ OpeningTag: openingTag , ListOfTimeValues: listOfTimeValues , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetSpecialEventListOfTimeValues(structType interface{}) BACnetSpecialEventListOfTimeValues { - if casted, ok := structType.(BACnetSpecialEventListOfTimeValues); ok { + if casted, ok := structType.(BACnetSpecialEventListOfTimeValues); ok { return casted } if casted, ok := structType.(*BACnetSpecialEventListOfTimeValues); ok { @@ -118,6 +122,7 @@ func (m *_BACnetSpecialEventListOfTimeValues) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetSpecialEventListOfTimeValues) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +144,7 @@ func BACnetSpecialEventListOfTimeValuesParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetSpecialEventListOfTimeValues") } @@ -155,8 +160,8 @@ func BACnetSpecialEventListOfTimeValuesParseWithBuffer(ctx context.Context, read // Terminated array var listOfTimeValues []BACnetTimeValue { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetTimeValueParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetTimeValueParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'listOfTimeValues' field of BACnetSpecialEventListOfTimeValues") } @@ -171,7 +176,7 @@ func BACnetSpecialEventListOfTimeValuesParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetSpecialEventListOfTimeValues") } @@ -186,11 +191,11 @@ func BACnetSpecialEventListOfTimeValuesParseWithBuffer(ctx context.Context, read // Create the instance return &_BACnetSpecialEventListOfTimeValues{ - TagNumber: tagNumber, - OpeningTag: openingTag, - ListOfTimeValues: listOfTimeValues, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + ListOfTimeValues: listOfTimeValues, + ClosingTag: closingTag, + }, nil } func (m *_BACnetSpecialEventListOfTimeValues) Serialize() ([]byte, error) { @@ -204,7 +209,7 @@ func (m *_BACnetSpecialEventListOfTimeValues) Serialize() ([]byte, error) { func (m *_BACnetSpecialEventListOfTimeValues) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetSpecialEventListOfTimeValues"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetSpecialEventListOfTimeValues"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetSpecialEventListOfTimeValues") } @@ -255,13 +260,13 @@ func (m *_BACnetSpecialEventListOfTimeValues) SerializeWithWriteBuffer(ctx conte return nil } + //// // Arguments Getter func (m *_BACnetSpecialEventListOfTimeValues) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -279,3 +284,6 @@ func (m *_BACnetSpecialEventListOfTimeValues) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetSpecialEventPeriod.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetSpecialEventPeriod.go index 03dfcb9dec9..abf3fa99529 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetSpecialEventPeriod.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetSpecialEventPeriod.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetSpecialEventPeriod is the corresponding interface of BACnetSpecialEventPeriod type BACnetSpecialEventPeriod interface { @@ -47,7 +49,7 @@ type BACnetSpecialEventPeriodExactly interface { // _BACnetSpecialEventPeriod is the data-structure of this message type _BACnetSpecialEventPeriod struct { _BACnetSpecialEventPeriodChildRequirements - PeekedTagHeader BACnetTagHeader + PeekedTagHeader BACnetTagHeader } type _BACnetSpecialEventPeriodChildRequirements interface { @@ -55,6 +57,7 @@ type _BACnetSpecialEventPeriodChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type BACnetSpecialEventPeriodParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetSpecialEventPeriod, serializeChildFunction func() error) error GetTypeName() string @@ -62,13 +65,12 @@ type BACnetSpecialEventPeriodParent interface { type BACnetSpecialEventPeriodChild interface { utils.Serializable - InitializeParent(parent BACnetSpecialEventPeriod, peekedTagHeader BACnetTagHeader) +InitializeParent(parent BACnetSpecialEventPeriod , peekedTagHeader BACnetTagHeader ) GetParent() *BACnetSpecialEventPeriod GetTypeName() string BACnetSpecialEventPeriod } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,14 +100,15 @@ func (m *_BACnetSpecialEventPeriod) GetPeekedTagNumber() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetSpecialEventPeriod factory function for _BACnetSpecialEventPeriod -func NewBACnetSpecialEventPeriod(peekedTagHeader BACnetTagHeader) *_BACnetSpecialEventPeriod { - return &_BACnetSpecialEventPeriod{PeekedTagHeader: peekedTagHeader} +func NewBACnetSpecialEventPeriod( peekedTagHeader BACnetTagHeader ) *_BACnetSpecialEventPeriod { +return &_BACnetSpecialEventPeriod{ PeekedTagHeader: peekedTagHeader } } // Deprecated: use the interface for direct cast func CastBACnetSpecialEventPeriod(structType interface{}) BACnetSpecialEventPeriod { - if casted, ok := structType.(BACnetSpecialEventPeriod); ok { + if casted, ok := structType.(BACnetSpecialEventPeriod); ok { return casted } if casted, ok := structType.(*BACnetSpecialEventPeriod); ok { @@ -118,6 +121,7 @@ func (m *_BACnetSpecialEventPeriod) GetTypeName() string { return "BACnetSpecialEventPeriod" } + func (m *_BACnetSpecialEventPeriod) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -143,13 +147,13 @@ func BACnetSpecialEventPeriodParseWithBuffer(ctx context.Context, readBuffer uti currentPos := positionAware.GetPos() _ = currentPos - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Virtual field _peekedTagNumber := peekedTagHeader.GetActualTagNumber() @@ -157,24 +161,24 @@ func BACnetSpecialEventPeriodParseWithBuffer(ctx context.Context, readBuffer uti _ = peekedTagNumber // Validation - if !(bool((peekedTagHeader.GetTagClass()) == (TagClass_CONTEXT_SPECIFIC_TAGS))) { + if (!(bool((peekedTagHeader.GetTagClass()) == (TagClass_CONTEXT_SPECIFIC_TAGS)))) { return nil, errors.WithStack(utils.ParseValidationError{"Validation failed"}) } // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetSpecialEventPeriodChildSerializeRequirement interface { BACnetSpecialEventPeriod - InitializeParent(BACnetSpecialEventPeriod, BACnetTagHeader) + InitializeParent(BACnetSpecialEventPeriod, BACnetTagHeader) GetParent() BACnetSpecialEventPeriod } var _childTemp interface{} var _child BACnetSpecialEventPeriodChildSerializeRequirement var typeSwitchError error switch { - case peekedTagNumber == uint8(0): // BACnetSpecialEventPeriodCalendarEntry - _childTemp, typeSwitchError = BACnetSpecialEventPeriodCalendarEntryParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(1): // BACnetSpecialEventPeriodCalendarReference - _childTemp, typeSwitchError = BACnetSpecialEventPeriodCalendarReferenceParseWithBuffer(ctx, readBuffer) +case peekedTagNumber == uint8(0) : // BACnetSpecialEventPeriodCalendarEntry + _childTemp, typeSwitchError = BACnetSpecialEventPeriodCalendarEntryParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(1) : // BACnetSpecialEventPeriodCalendarReference + _childTemp, typeSwitchError = BACnetSpecialEventPeriodCalendarReferenceParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedTagNumber=%v]", peekedTagNumber) } @@ -188,7 +192,7 @@ func BACnetSpecialEventPeriodParseWithBuffer(ctx context.Context, readBuffer uti } // Finish initializing - _child.InitializeParent(_child, peekedTagHeader) +_child.InitializeParent(_child , peekedTagHeader ) return _child, nil } @@ -198,7 +202,7 @@ func (pm *_BACnetSpecialEventPeriod) SerializeParent(ctx context.Context, writeB _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetSpecialEventPeriod"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetSpecialEventPeriod"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetSpecialEventPeriod") } // Virtual field @@ -217,6 +221,7 @@ func (pm *_BACnetSpecialEventPeriod) SerializeParent(ctx context.Context, writeB return nil } + func (m *_BACnetSpecialEventPeriod) isBACnetSpecialEventPeriod() bool { return true } @@ -231,3 +236,6 @@ func (m *_BACnetSpecialEventPeriod) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetSpecialEventPeriodCalendarEntry.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetSpecialEventPeriodCalendarEntry.go index eb3537a2a99..97fd434afc3 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetSpecialEventPeriodCalendarEntry.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetSpecialEventPeriodCalendarEntry.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetSpecialEventPeriodCalendarEntry is the corresponding interface of BACnetSpecialEventPeriodCalendarEntry type BACnetSpecialEventPeriodCalendarEntry interface { @@ -46,9 +48,11 @@ type BACnetSpecialEventPeriodCalendarEntryExactly interface { // _BACnetSpecialEventPeriodCalendarEntry is the data-structure of this message type _BACnetSpecialEventPeriodCalendarEntry struct { *_BACnetSpecialEventPeriod - CalendarEntry BACnetCalendarEntryEnclosed + CalendarEntry BACnetCalendarEntryEnclosed } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetSpecialEventPeriodCalendarEntry struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetSpecialEventPeriodCalendarEntry) InitializeParent(parent BACnetSpecialEventPeriod, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetSpecialEventPeriodCalendarEntry) InitializeParent(parent BACnetSpecialEventPeriod , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetSpecialEventPeriodCalendarEntry) GetParent() BACnetSpecialEventPeriod { +func (m *_BACnetSpecialEventPeriodCalendarEntry) GetParent() BACnetSpecialEventPeriod { return m._BACnetSpecialEventPeriod } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetSpecialEventPeriodCalendarEntry) GetCalendarEntry() BACnetCalend /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetSpecialEventPeriodCalendarEntry factory function for _BACnetSpecialEventPeriodCalendarEntry -func NewBACnetSpecialEventPeriodCalendarEntry(calendarEntry BACnetCalendarEntryEnclosed, peekedTagHeader BACnetTagHeader) *_BACnetSpecialEventPeriodCalendarEntry { +func NewBACnetSpecialEventPeriodCalendarEntry( calendarEntry BACnetCalendarEntryEnclosed , peekedTagHeader BACnetTagHeader ) *_BACnetSpecialEventPeriodCalendarEntry { _result := &_BACnetSpecialEventPeriodCalendarEntry{ - CalendarEntry: calendarEntry, - _BACnetSpecialEventPeriod: NewBACnetSpecialEventPeriod(peekedTagHeader), + CalendarEntry: calendarEntry, + _BACnetSpecialEventPeriod: NewBACnetSpecialEventPeriod(peekedTagHeader), } _result._BACnetSpecialEventPeriod._BACnetSpecialEventPeriodChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetSpecialEventPeriodCalendarEntry(calendarEntry BACnetCalendarEntryE // Deprecated: use the interface for direct cast func CastBACnetSpecialEventPeriodCalendarEntry(structType interface{}) BACnetSpecialEventPeriodCalendarEntry { - if casted, ok := structType.(BACnetSpecialEventPeriodCalendarEntry); ok { + if casted, ok := structType.(BACnetSpecialEventPeriodCalendarEntry); ok { return casted } if casted, ok := structType.(*BACnetSpecialEventPeriodCalendarEntry); ok { @@ -115,6 +118,7 @@ func (m *_BACnetSpecialEventPeriodCalendarEntry) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetSpecialEventPeriodCalendarEntry) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetSpecialEventPeriodCalendarEntryParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("calendarEntry"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for calendarEntry") } - _calendarEntry, _calendarEntryErr := BACnetCalendarEntryEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_calendarEntry, _calendarEntryErr := BACnetCalendarEntryEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _calendarEntryErr != nil { return nil, errors.Wrap(_calendarEntryErr, "Error parsing 'calendarEntry' field of BACnetSpecialEventPeriodCalendarEntry") } @@ -151,8 +155,9 @@ func BACnetSpecialEventPeriodCalendarEntryParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_BACnetSpecialEventPeriodCalendarEntry{ - _BACnetSpecialEventPeriod: &_BACnetSpecialEventPeriod{}, - CalendarEntry: calendarEntry, + _BACnetSpecialEventPeriod: &_BACnetSpecialEventPeriod{ + }, + CalendarEntry: calendarEntry, } _child._BACnetSpecialEventPeriod._BACnetSpecialEventPeriodChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetSpecialEventPeriodCalendarEntry) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for BACnetSpecialEventPeriodCalendarEntry") } - // Simple Field (calendarEntry) - if pushErr := writeBuffer.PushContext("calendarEntry"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for calendarEntry") - } - _calendarEntryErr := writeBuffer.WriteSerializable(ctx, m.GetCalendarEntry()) - if popErr := writeBuffer.PopContext("calendarEntry"); popErr != nil { - return errors.Wrap(popErr, "Error popping for calendarEntry") - } - if _calendarEntryErr != nil { - return errors.Wrap(_calendarEntryErr, "Error serializing 'calendarEntry' field") - } + // Simple Field (calendarEntry) + if pushErr := writeBuffer.PushContext("calendarEntry"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for calendarEntry") + } + _calendarEntryErr := writeBuffer.WriteSerializable(ctx, m.GetCalendarEntry()) + if popErr := writeBuffer.PopContext("calendarEntry"); popErr != nil { + return errors.Wrap(popErr, "Error popping for calendarEntry") + } + if _calendarEntryErr != nil { + return errors.Wrap(_calendarEntryErr, "Error serializing 'calendarEntry' field") + } if popErr := writeBuffer.PopContext("BACnetSpecialEventPeriodCalendarEntry"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetSpecialEventPeriodCalendarEntry") @@ -194,6 +199,7 @@ func (m *_BACnetSpecialEventPeriodCalendarEntry) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetSpecialEventPeriodCalendarEntry) isBACnetSpecialEventPeriodCalendarEntry() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetSpecialEventPeriodCalendarEntry) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetSpecialEventPeriodCalendarReference.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetSpecialEventPeriodCalendarReference.go index d680405096a..e67cb10e41c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetSpecialEventPeriodCalendarReference.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetSpecialEventPeriodCalendarReference.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetSpecialEventPeriodCalendarReference is the corresponding interface of BACnetSpecialEventPeriodCalendarReference type BACnetSpecialEventPeriodCalendarReference interface { @@ -46,9 +48,11 @@ type BACnetSpecialEventPeriodCalendarReferenceExactly interface { // _BACnetSpecialEventPeriodCalendarReference is the data-structure of this message type _BACnetSpecialEventPeriodCalendarReference struct { *_BACnetSpecialEventPeriod - CalendarReference BACnetContextTagObjectIdentifier + CalendarReference BACnetContextTagObjectIdentifier } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetSpecialEventPeriodCalendarReference struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetSpecialEventPeriodCalendarReference) InitializeParent(parent BACnetSpecialEventPeriod, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetSpecialEventPeriodCalendarReference) InitializeParent(parent BACnetSpecialEventPeriod , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetSpecialEventPeriodCalendarReference) GetParent() BACnetSpecialEventPeriod { +func (m *_BACnetSpecialEventPeriodCalendarReference) GetParent() BACnetSpecialEventPeriod { return m._BACnetSpecialEventPeriod } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetSpecialEventPeriodCalendarReference) GetCalendarReference() BACn /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetSpecialEventPeriodCalendarReference factory function for _BACnetSpecialEventPeriodCalendarReference -func NewBACnetSpecialEventPeriodCalendarReference(calendarReference BACnetContextTagObjectIdentifier, peekedTagHeader BACnetTagHeader) *_BACnetSpecialEventPeriodCalendarReference { +func NewBACnetSpecialEventPeriodCalendarReference( calendarReference BACnetContextTagObjectIdentifier , peekedTagHeader BACnetTagHeader ) *_BACnetSpecialEventPeriodCalendarReference { _result := &_BACnetSpecialEventPeriodCalendarReference{ - CalendarReference: calendarReference, - _BACnetSpecialEventPeriod: NewBACnetSpecialEventPeriod(peekedTagHeader), + CalendarReference: calendarReference, + _BACnetSpecialEventPeriod: NewBACnetSpecialEventPeriod(peekedTagHeader), } _result._BACnetSpecialEventPeriod._BACnetSpecialEventPeriodChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetSpecialEventPeriodCalendarReference(calendarReference BACnetContex // Deprecated: use the interface for direct cast func CastBACnetSpecialEventPeriodCalendarReference(structType interface{}) BACnetSpecialEventPeriodCalendarReference { - if casted, ok := structType.(BACnetSpecialEventPeriodCalendarReference); ok { + if casted, ok := structType.(BACnetSpecialEventPeriodCalendarReference); ok { return casted } if casted, ok := structType.(*BACnetSpecialEventPeriodCalendarReference); ok { @@ -115,6 +118,7 @@ func (m *_BACnetSpecialEventPeriodCalendarReference) GetLengthInBits(ctx context return lengthInBits } + func (m *_BACnetSpecialEventPeriodCalendarReference) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetSpecialEventPeriodCalendarReferenceParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("calendarReference"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for calendarReference") } - _calendarReference, _calendarReferenceErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER)) +_calendarReference, _calendarReferenceErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_BACNET_OBJECT_IDENTIFIER ) ) if _calendarReferenceErr != nil { return nil, errors.Wrap(_calendarReferenceErr, "Error parsing 'calendarReference' field of BACnetSpecialEventPeriodCalendarReference") } @@ -151,8 +155,9 @@ func BACnetSpecialEventPeriodCalendarReferenceParseWithBuffer(ctx context.Contex // Create a partially initialized instance _child := &_BACnetSpecialEventPeriodCalendarReference{ - _BACnetSpecialEventPeriod: &_BACnetSpecialEventPeriod{}, - CalendarReference: calendarReference, + _BACnetSpecialEventPeriod: &_BACnetSpecialEventPeriod{ + }, + CalendarReference: calendarReference, } _child._BACnetSpecialEventPeriod._BACnetSpecialEventPeriodChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetSpecialEventPeriodCalendarReference) SerializeWithWriteBuffer(ct return errors.Wrap(pushErr, "Error pushing for BACnetSpecialEventPeriodCalendarReference") } - // Simple Field (calendarReference) - if pushErr := writeBuffer.PushContext("calendarReference"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for calendarReference") - } - _calendarReferenceErr := writeBuffer.WriteSerializable(ctx, m.GetCalendarReference()) - if popErr := writeBuffer.PopContext("calendarReference"); popErr != nil { - return errors.Wrap(popErr, "Error popping for calendarReference") - } - if _calendarReferenceErr != nil { - return errors.Wrap(_calendarReferenceErr, "Error serializing 'calendarReference' field") - } + // Simple Field (calendarReference) + if pushErr := writeBuffer.PushContext("calendarReference"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for calendarReference") + } + _calendarReferenceErr := writeBuffer.WriteSerializable(ctx, m.GetCalendarReference()) + if popErr := writeBuffer.PopContext("calendarReference"); popErr != nil { + return errors.Wrap(popErr, "Error popping for calendarReference") + } + if _calendarReferenceErr != nil { + return errors.Wrap(_calendarReferenceErr, "Error serializing 'calendarReference' field") + } if popErr := writeBuffer.PopContext("BACnetSpecialEventPeriodCalendarReference"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetSpecialEventPeriodCalendarReference") @@ -194,6 +199,7 @@ func (m *_BACnetSpecialEventPeriodCalendarReference) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetSpecialEventPeriodCalendarReference) isBACnetSpecialEventPeriodCalendarReference() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetSpecialEventPeriodCalendarReference) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetStatusFlags.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetStatusFlags.go index a8930a417b7..be8531a35d0 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetStatusFlags.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetStatusFlags.go @@ -34,10 +34,10 @@ type IBACnetStatusFlags interface { utils.Serializable } -const ( - BACnetStatusFlags_IN_ALARM BACnetStatusFlags = 0 - BACnetStatusFlags_FAULT BACnetStatusFlags = 1 - BACnetStatusFlags_OVERRIDDEN BACnetStatusFlags = 2 +const( + BACnetStatusFlags_IN_ALARM BACnetStatusFlags = 0 + BACnetStatusFlags_FAULT BACnetStatusFlags = 1 + BACnetStatusFlags_OVERRIDDEN BACnetStatusFlags = 2 BACnetStatusFlags_OUT_OF_SERVICE BACnetStatusFlags = 3 ) @@ -45,7 +45,7 @@ var BACnetStatusFlagsValues []BACnetStatusFlags func init() { _ = errors.New - BACnetStatusFlagsValues = []BACnetStatusFlags{ + BACnetStatusFlagsValues = []BACnetStatusFlags { BACnetStatusFlags_IN_ALARM, BACnetStatusFlags_FAULT, BACnetStatusFlags_OVERRIDDEN, @@ -55,14 +55,14 @@ func init() { func BACnetStatusFlagsByValue(value uint8) (enum BACnetStatusFlags, ok bool) { switch value { - case 0: - return BACnetStatusFlags_IN_ALARM, true - case 1: - return BACnetStatusFlags_FAULT, true - case 2: - return BACnetStatusFlags_OVERRIDDEN, true - case 3: - return BACnetStatusFlags_OUT_OF_SERVICE, true + case 0: + return BACnetStatusFlags_IN_ALARM, true + case 1: + return BACnetStatusFlags_FAULT, true + case 2: + return BACnetStatusFlags_OVERRIDDEN, true + case 3: + return BACnetStatusFlags_OUT_OF_SERVICE, true } return 0, false } @@ -81,13 +81,13 @@ func BACnetStatusFlagsByName(value string) (enum BACnetStatusFlags, ok bool) { return 0, false } -func BACnetStatusFlagsKnows(value uint8) bool { +func BACnetStatusFlagsKnows(value uint8) bool { for _, typeValue := range BACnetStatusFlagsValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetStatusFlags(structType interface{}) BACnetStatusFlags { @@ -155,3 +155,4 @@ func (e BACnetStatusFlags) PLC4XEnumName() string { func (e BACnetStatusFlags) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetStatusFlagsTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetStatusFlagsTagged.go index 63a5e9bb23c..a00811e294a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetStatusFlagsTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetStatusFlagsTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetStatusFlagsTagged is the corresponding interface of BACnetStatusFlagsTagged type BACnetStatusFlagsTagged interface { @@ -54,14 +56,15 @@ type BACnetStatusFlagsTaggedExactly interface { // _BACnetStatusFlagsTagged is the data-structure of this message type _BACnetStatusFlagsTagged struct { - Header BACnetTagHeader - Payload BACnetTagPayloadBitString + Header BACnetTagHeader + Payload BACnetTagPayloadBitString // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -87,25 +90,25 @@ func (m *_BACnetStatusFlagsTagged) GetPayload() BACnetTagPayloadBitString { func (m *_BACnetStatusFlagsTagged) GetInAlarm() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (0))), func() interface{} { return bool(m.GetPayload().GetData()[0]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((0)))), func() interface{} {return bool(m.GetPayload().GetData()[0])}, func() interface{} {return bool(bool(false))}).(bool)) } func (m *_BACnetStatusFlagsTagged) GetFault() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (1))), func() interface{} { return bool(m.GetPayload().GetData()[1]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((1)))), func() interface{} {return bool(m.GetPayload().GetData()[1])}, func() interface{} {return bool(bool(false))}).(bool)) } func (m *_BACnetStatusFlagsTagged) GetOverridden() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (2))), func() interface{} { return bool(m.GetPayload().GetData()[2]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((2)))), func() interface{} {return bool(m.GetPayload().GetData()[2])}, func() interface{} {return bool(bool(false))}).(bool)) } func (m *_BACnetStatusFlagsTagged) GetOutOfService() bool { ctx := context.Background() _ = ctx - return bool(utils.InlineIf((bool((len(m.GetPayload().GetData())) > (3))), func() interface{} { return bool(m.GetPayload().GetData()[3]) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf((bool(((len(m.GetPayload().GetData()))) > ((3)))), func() interface{} {return bool(m.GetPayload().GetData()[3])}, func() interface{} {return bool(bool(false))}).(bool)) } /////////////////////// @@ -113,14 +116,15 @@ func (m *_BACnetStatusFlagsTagged) GetOutOfService() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetStatusFlagsTagged factory function for _BACnetStatusFlagsTagged -func NewBACnetStatusFlagsTagged(header BACnetTagHeader, payload BACnetTagPayloadBitString, tagNumber uint8, tagClass TagClass) *_BACnetStatusFlagsTagged { - return &_BACnetStatusFlagsTagged{Header: header, Payload: payload, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetStatusFlagsTagged( header BACnetTagHeader , payload BACnetTagPayloadBitString , tagNumber uint8 , tagClass TagClass ) *_BACnetStatusFlagsTagged { +return &_BACnetStatusFlagsTagged{ Header: header , Payload: payload , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetStatusFlagsTagged(structType interface{}) BACnetStatusFlagsTagged { - if casted, ok := structType.(BACnetStatusFlagsTagged); ok { + if casted, ok := structType.(BACnetStatusFlagsTagged); ok { return casted } if casted, ok := structType.(*BACnetStatusFlagsTagged); ok { @@ -153,6 +157,7 @@ func (m *_BACnetStatusFlagsTagged) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetStatusFlagsTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -174,7 +179,7 @@ func BACnetStatusFlagsTaggedParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetStatusFlagsTagged") } @@ -184,12 +189,12 @@ func BACnetStatusFlagsTaggedParseWithBuffer(ctx context.Context, readBuffer util } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -197,7 +202,7 @@ func BACnetStatusFlagsTaggedParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("payload"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for payload") } - _payload, _payloadErr := BACnetTagPayloadBitStringParseWithBuffer(ctx, readBuffer, uint32(header.GetActualLength())) +_payload, _payloadErr := BACnetTagPayloadBitStringParseWithBuffer(ctx, readBuffer , uint32( header.GetActualLength() ) ) if _payloadErr != nil { return nil, errors.Wrap(_payloadErr, "Error parsing 'payload' field of BACnetStatusFlagsTagged") } @@ -207,22 +212,22 @@ func BACnetStatusFlagsTaggedParseWithBuffer(ctx context.Context, readBuffer util } // Virtual field - _inAlarm := utils.InlineIf((bool((len(payload.GetData())) > (0))), func() interface{} { return bool(payload.GetData()[0]) }, func() interface{} { return bool(bool(false)) }).(bool) + _inAlarm := utils.InlineIf((bool(((len(payload.GetData()))) > ((0)))), func() interface{} {return bool(payload.GetData()[0])}, func() interface{} {return bool(bool(false))}).(bool) inAlarm := bool(_inAlarm) _ = inAlarm // Virtual field - _fault := utils.InlineIf((bool((len(payload.GetData())) > (1))), func() interface{} { return bool(payload.GetData()[1]) }, func() interface{} { return bool(bool(false)) }).(bool) + _fault := utils.InlineIf((bool(((len(payload.GetData()))) > ((1)))), func() interface{} {return bool(payload.GetData()[1])}, func() interface{} {return bool(bool(false))}).(bool) fault := bool(_fault) _ = fault // Virtual field - _overridden := utils.InlineIf((bool((len(payload.GetData())) > (2))), func() interface{} { return bool(payload.GetData()[2]) }, func() interface{} { return bool(bool(false)) }).(bool) + _overridden := utils.InlineIf((bool(((len(payload.GetData()))) > ((2)))), func() interface{} {return bool(payload.GetData()[2])}, func() interface{} {return bool(bool(false))}).(bool) overridden := bool(_overridden) _ = overridden // Virtual field - _outOfService := utils.InlineIf((bool((len(payload.GetData())) > (3))), func() interface{} { return bool(payload.GetData()[3]) }, func() interface{} { return bool(bool(false)) }).(bool) + _outOfService := utils.InlineIf((bool(((len(payload.GetData()))) > ((3)))), func() interface{} {return bool(payload.GetData()[3])}, func() interface{} {return bool(bool(false))}).(bool) outOfService := bool(_outOfService) _ = outOfService @@ -232,11 +237,11 @@ func BACnetStatusFlagsTaggedParseWithBuffer(ctx context.Context, readBuffer util // Create the instance return &_BACnetStatusFlagsTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Payload: payload, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Payload: payload, + }, nil } func (m *_BACnetStatusFlagsTagged) Serialize() ([]byte, error) { @@ -250,7 +255,7 @@ func (m *_BACnetStatusFlagsTagged) Serialize() ([]byte, error) { func (m *_BACnetStatusFlagsTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetStatusFlagsTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetStatusFlagsTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetStatusFlagsTagged") } @@ -300,6 +305,7 @@ func (m *_BACnetStatusFlagsTagged) SerializeWithWriteBuffer(ctx context.Context, return nil } + //// // Arguments Getter @@ -309,7 +315,6 @@ func (m *_BACnetStatusFlagsTagged) GetTagNumber() uint8 { func (m *_BACnetStatusFlagsTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -327,3 +332,6 @@ func (m *_BACnetStatusFlagsTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTagHeader.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTagHeader.go index 989fdce402e..dd3cc08cc56 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTagHeader.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTagHeader.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetTagHeader is the corresponding interface of BACnetTagHeader type BACnetTagHeader interface { @@ -66,15 +68,16 @@ type BACnetTagHeaderExactly interface { // _BACnetTagHeader is the data-structure of this message type _BACnetTagHeader struct { - TagNumber uint8 - TagClass TagClass - LengthValueType uint8 - ExtTagNumber *uint8 - ExtLength *uint8 - ExtExtLength *uint16 - ExtExtExtLength *uint32 + TagNumber uint8 + TagClass TagClass + LengthValueType uint8 + ExtTagNumber *uint8 + ExtLength *uint8 + ExtExtLength *uint16 + ExtExtExtLength *uint32 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -128,7 +131,7 @@ func (m *_BACnetTagHeader) GetActualTagNumber() uint8 { _ = extExtLength extExtExtLength := m.ExtExtExtLength _ = extExtExtLength - return uint8(utils.InlineIf(bool((m.GetTagNumber()) < (15)), func() interface{} { return uint8(m.GetTagNumber()) }, func() interface{} { return uint8((*m.GetExtTagNumber())) }).(uint8)) + return uint8(utils.InlineIf(bool((m.GetTagNumber()) < ((15))), func() interface{} {return uint8(m.GetTagNumber())}, func() interface{} {return uint8((*m.GetExtTagNumber()))}).(uint8)) } func (m *_BACnetTagHeader) GetIsBoolean() bool { @@ -142,7 +145,7 @@ func (m *_BACnetTagHeader) GetIsBoolean() bool { _ = extExtLength extExtExtLength := m.ExtExtExtLength _ = extExtExtLength - return bool(bool(bool((m.GetTagNumber()) == (1))) && bool(bool((m.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) + return bool(bool(bool((m.GetTagNumber()) == ((1)))) && bool(bool((m.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) } func (m *_BACnetTagHeader) GetIsConstructed() bool { @@ -156,7 +159,7 @@ func (m *_BACnetTagHeader) GetIsConstructed() bool { _ = extExtLength extExtExtLength := m.ExtExtExtLength _ = extExtExtLength - return bool(bool(bool((m.GetTagClass()) == (TagClass_CONTEXT_SPECIFIC_TAGS))) && bool(bool((m.GetLengthValueType()) == (6)))) + return bool(bool(bool((m.GetTagClass()) == (TagClass_CONTEXT_SPECIFIC_TAGS))) && bool(bool((m.GetLengthValueType()) == ((6))))) } func (m *_BACnetTagHeader) GetIsPrimitiveAndNotBoolean() bool { @@ -184,11 +187,7 @@ func (m *_BACnetTagHeader) GetActualLength() uint32 { _ = extExtLength extExtExtLength := m.ExtExtExtLength _ = extExtExtLength - return uint32(utils.InlineIf(bool(bool((m.GetLengthValueType()) == (5))) && bool(bool((*m.GetExtLength()) == (255))), func() interface{} { return uint32((*m.GetExtExtExtLength())) }, func() interface{} { - return uint32((utils.InlineIf(bool(bool((m.GetLengthValueType()) == (5))) && bool(bool((*m.GetExtLength()) == (254))), func() interface{} { return uint32((*m.GetExtExtLength())) }, func() interface{} { - return uint32((utils.InlineIf(bool((m.GetLengthValueType()) == (5)), func() interface{} { return uint32((*m.GetExtLength())) }, func() interface{} { return uint32(m.GetLengthValueType()) }).(uint32))) - }).(uint32))) - }).(uint32)) + return uint32(utils.InlineIf(bool(bool((m.GetLengthValueType()) == ((5)))) && bool(bool(((*m.GetExtLength())) == ((255)))), func() interface{} {return uint32((*m.GetExtExtExtLength()))}, func() interface{} {return uint32((utils.InlineIf(bool(bool((m.GetLengthValueType()) == ((5)))) && bool(bool(((*m.GetExtLength())) == ((254)))), func() interface{} {return uint32((*m.GetExtExtLength()))}, func() interface{} {return uint32((utils.InlineIf(bool((m.GetLengthValueType()) == ((5))), func() interface{} {return uint32((*m.GetExtLength()))}, func() interface{} {return uint32(m.GetLengthValueType())}).(uint32)))}).(uint32)))}).(uint32)) } /////////////////////// @@ -196,14 +195,15 @@ func (m *_BACnetTagHeader) GetActualLength() uint32 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetTagHeader factory function for _BACnetTagHeader -func NewBACnetTagHeader(tagNumber uint8, tagClass TagClass, lengthValueType uint8, extTagNumber *uint8, extLength *uint8, extExtLength *uint16, extExtExtLength *uint32) *_BACnetTagHeader { - return &_BACnetTagHeader{TagNumber: tagNumber, TagClass: tagClass, LengthValueType: lengthValueType, ExtTagNumber: extTagNumber, ExtLength: extLength, ExtExtLength: extExtLength, ExtExtExtLength: extExtExtLength} +func NewBACnetTagHeader( tagNumber uint8 , tagClass TagClass , lengthValueType uint8 , extTagNumber *uint8 , extLength *uint8 , extExtLength *uint16 , extExtExtLength *uint32 ) *_BACnetTagHeader { +return &_BACnetTagHeader{ TagNumber: tagNumber , TagClass: tagClass , LengthValueType: lengthValueType , ExtTagNumber: extTagNumber , ExtLength: extLength , ExtExtLength: extExtLength , ExtExtExtLength: extExtExtLength } } // Deprecated: use the interface for direct cast func CastBACnetTagHeader(structType interface{}) BACnetTagHeader { - if casted, ok := structType.(BACnetTagHeader); ok { + if casted, ok := structType.(BACnetTagHeader); ok { return casted } if casted, ok := structType.(*BACnetTagHeader); ok { @@ -220,13 +220,13 @@ func (m *_BACnetTagHeader) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (tagNumber) - lengthInBits += 4 + lengthInBits += 4; // Simple field (tagClass) lengthInBits += 1 // Simple field (lengthValueType) - lengthInBits += 3 + lengthInBits += 3; // Optional Field (extTagNumber) if m.ExtTagNumber != nil { @@ -261,6 +261,7 @@ func (m *_BACnetTagHeader) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetTagHeader) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -279,7 +280,7 @@ func BACnetTagHeaderParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu _ = currentPos // Simple Field (tagNumber) - _tagNumber, _tagNumberErr := readBuffer.ReadUint8("tagNumber", 4) +_tagNumber, _tagNumberErr := readBuffer.ReadUint8("tagNumber", 4) if _tagNumberErr != nil { return nil, errors.Wrap(_tagNumberErr, "Error parsing 'tagNumber' field of BACnetTagHeader") } @@ -289,7 +290,7 @@ func BACnetTagHeaderParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu if pullErr := readBuffer.PullContext("tagClass"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for tagClass") } - _tagClass, _tagClassErr := TagClassParseWithBuffer(ctx, readBuffer) +_tagClass, _tagClassErr := TagClassParseWithBuffer(ctx, readBuffer) if _tagClassErr != nil { return nil, errors.Wrap(_tagClassErr, "Error parsing 'tagClass' field of BACnetTagHeader") } @@ -299,7 +300,7 @@ func BACnetTagHeaderParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu } // Simple Field (lengthValueType) - _lengthValueType, _lengthValueTypeErr := readBuffer.ReadUint8("lengthValueType", 3) +_lengthValueType, _lengthValueTypeErr := readBuffer.ReadUint8("lengthValueType", 3) if _lengthValueTypeErr != nil { return nil, errors.Wrap(_lengthValueTypeErr, "Error parsing 'lengthValueType' field of BACnetTagHeader") } @@ -307,7 +308,7 @@ func BACnetTagHeaderParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu // Optional Field (extTagNumber) (Can be skipped, if a given expression evaluates to false) var extTagNumber *uint8 = nil - if bool((tagNumber) == (15)) { + if bool((tagNumber) == ((15))) { _val, _err := readBuffer.ReadUint8("extTagNumber", 8) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'extTagNumber' field of BACnetTagHeader") @@ -316,17 +317,17 @@ func BACnetTagHeaderParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu } // Virtual field - _actualTagNumber := utils.InlineIf(bool((tagNumber) < (15)), func() interface{} { return uint8(tagNumber) }, func() interface{} { return uint8((*extTagNumber)) }).(uint8) + _actualTagNumber := utils.InlineIf(bool((tagNumber) < ((15))), func() interface{} {return uint8(tagNumber)}, func() interface{} {return uint8((*extTagNumber))}).(uint8) actualTagNumber := uint8(_actualTagNumber) _ = actualTagNumber // Virtual field - _isBoolean := bool(bool((tagNumber) == (1))) && bool(bool((tagClass) == (TagClass_APPLICATION_TAGS))) + _isBoolean := bool(bool((tagNumber) == ((1)))) && bool(bool((tagClass) == (TagClass_APPLICATION_TAGS))) isBoolean := bool(_isBoolean) _ = isBoolean // Virtual field - _isConstructed := bool(bool((tagClass) == (TagClass_CONTEXT_SPECIFIC_TAGS))) && bool(bool((lengthValueType) == (6))) + _isConstructed := bool(bool((tagClass) == (TagClass_CONTEXT_SPECIFIC_TAGS))) && bool(bool((lengthValueType) == ((6)))) isConstructed := bool(_isConstructed) _ = isConstructed @@ -337,7 +338,7 @@ func BACnetTagHeaderParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu // Optional Field (extLength) (Can be skipped, if a given expression evaluates to false) var extLength *uint8 = nil - if bool(isPrimitiveAndNotBoolean) && bool(bool((lengthValueType) == (5))) { + if bool(isPrimitiveAndNotBoolean) && bool(bool((lengthValueType) == ((5)))) { _val, _err := readBuffer.ReadUint8("extLength", 8) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'extLength' field of BACnetTagHeader") @@ -347,7 +348,7 @@ func BACnetTagHeaderParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu // Optional Field (extExtLength) (Can be skipped, if a given expression evaluates to false) var extExtLength *uint16 = nil - if bool(bool(isPrimitiveAndNotBoolean) && bool(bool((lengthValueType) == (5)))) && bool(bool((*extLength) == (254))) { + if bool(bool(isPrimitiveAndNotBoolean) && bool(bool((lengthValueType) == ((5))))) && bool(bool(((*extLength)) == ((254)))) { _val, _err := readBuffer.ReadUint16("extExtLength", 16) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'extExtLength' field of BACnetTagHeader") @@ -357,7 +358,7 @@ func BACnetTagHeaderParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu // Optional Field (extExtExtLength) (Can be skipped, if a given expression evaluates to false) var extExtExtLength *uint32 = nil - if bool(bool(isPrimitiveAndNotBoolean) && bool(bool((lengthValueType) == (5)))) && bool(bool((*extLength) == (255))) { + if bool(bool(isPrimitiveAndNotBoolean) && bool(bool((lengthValueType) == ((5))))) && bool(bool(((*extLength)) == ((255)))) { _val, _err := readBuffer.ReadUint32("extExtExtLength", 32) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'extExtExtLength' field of BACnetTagHeader") @@ -366,11 +367,7 @@ func BACnetTagHeaderParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu } // Virtual field - _actualLength := utils.InlineIf(bool(bool((lengthValueType) == (5))) && bool(bool((*extLength) == (255))), func() interface{} { return uint32((*extExtExtLength)) }, func() interface{} { - return uint32((utils.InlineIf(bool(bool((lengthValueType) == (5))) && bool(bool((*extLength) == (254))), func() interface{} { return uint32((*extExtLength)) }, func() interface{} { - return uint32((utils.InlineIf(bool((lengthValueType) == (5)), func() interface{} { return uint32((*extLength)) }, func() interface{} { return uint32(lengthValueType) }).(uint32))) - }).(uint32))) - }).(uint32) + _actualLength := utils.InlineIf(bool(bool((lengthValueType) == ((5)))) && bool(bool(((*extLength)) == ((255)))), func() interface{} {return uint32((*extExtExtLength))}, func() interface{} {return uint32((utils.InlineIf(bool(bool((lengthValueType) == ((5)))) && bool(bool(((*extLength)) == ((254)))), func() interface{} {return uint32((*extExtLength))}, func() interface{} {return uint32((utils.InlineIf(bool((lengthValueType) == ((5))), func() interface{} {return uint32((*extLength))}, func() interface{} {return uint32(lengthValueType)}).(uint32)))}).(uint32)))}).(uint32) actualLength := uint32(_actualLength) _ = actualLength @@ -380,14 +377,14 @@ func BACnetTagHeaderParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu // Create the instance return &_BACnetTagHeader{ - TagNumber: tagNumber, - TagClass: tagClass, - LengthValueType: lengthValueType, - ExtTagNumber: extTagNumber, - ExtLength: extLength, - ExtExtLength: extExtLength, - ExtExtExtLength: extExtExtLength, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + LengthValueType: lengthValueType, + ExtTagNumber: extTagNumber, + ExtLength: extLength, + ExtExtLength: extExtLength, + ExtExtExtLength: extExtExtLength, + }, nil } func (m *_BACnetTagHeader) Serialize() ([]byte, error) { @@ -401,7 +398,7 @@ func (m *_BACnetTagHeader) Serialize() ([]byte, error) { func (m *_BACnetTagHeader) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetTagHeader"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetTagHeader"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetTagHeader") } @@ -497,6 +494,7 @@ func (m *_BACnetTagHeader) SerializeWithWriteBuffer(ctx context.Context, writeBu return nil } + func (m *_BACnetTagHeader) isBACnetTagHeader() bool { return true } @@ -511,3 +509,6 @@ func (m *_BACnetTagHeader) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadBitString.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadBitString.go index e300f67cbf3..6fa758816a1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadBitString.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadBitString.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetTagPayloadBitString is the corresponding interface of BACnetTagPayloadBitString type BACnetTagPayloadBitString interface { @@ -49,14 +51,15 @@ type BACnetTagPayloadBitStringExactly interface { // _BACnetTagPayloadBitString is the data-structure of this message type _BACnetTagPayloadBitString struct { - UnusedBits uint8 - Data []bool - Unused []bool + UnusedBits uint8 + Data []bool + Unused []bool // Arguments. ActualLength uint32 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -79,14 +82,15 @@ func (m *_BACnetTagPayloadBitString) GetUnused() []bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetTagPayloadBitString factory function for _BACnetTagPayloadBitString -func NewBACnetTagPayloadBitString(unusedBits uint8, data []bool, unused []bool, actualLength uint32) *_BACnetTagPayloadBitString { - return &_BACnetTagPayloadBitString{UnusedBits: unusedBits, Data: data, Unused: unused, ActualLength: actualLength} +func NewBACnetTagPayloadBitString( unusedBits uint8 , data []bool , unused []bool , actualLength uint32 ) *_BACnetTagPayloadBitString { +return &_BACnetTagPayloadBitString{ UnusedBits: unusedBits , Data: data , Unused: unused , ActualLength: actualLength } } // Deprecated: use the interface for direct cast func CastBACnetTagPayloadBitString(structType interface{}) BACnetTagPayloadBitString { - if casted, ok := structType.(BACnetTagPayloadBitString); ok { + if casted, ok := structType.(BACnetTagPayloadBitString); ok { return casted } if casted, ok := structType.(*BACnetTagPayloadBitString); ok { @@ -103,7 +107,7 @@ func (m *_BACnetTagPayloadBitString) GetLengthInBits(ctx context.Context) uint16 lengthInBits := uint16(0) // Simple field (unusedBits) - lengthInBits += 8 + lengthInBits += 8; // Array field if len(m.Data) > 0 { @@ -118,6 +122,7 @@ func (m *_BACnetTagPayloadBitString) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_BACnetTagPayloadBitString) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +141,7 @@ func BACnetTagPayloadBitStringParseWithBuffer(ctx context.Context, readBuffer ut _ = currentPos // Simple Field (unusedBits) - _unusedBits, _unusedBitsErr := readBuffer.ReadUint8("unusedBits", 8) +_unusedBits, _unusedBitsErr := readBuffer.ReadUint8("unusedBits", 8) if _unusedBitsErr != nil { return nil, errors.Wrap(_unusedBitsErr, "Error parsing 'unusedBits' field of BACnetTagPayloadBitString") } @@ -147,7 +152,7 @@ func BACnetTagPayloadBitStringParseWithBuffer(ctx context.Context, readBuffer ut return nil, errors.Wrap(pullErr, "Error pulling for data") } // Count array - data := make([]bool, uint16((uint16((uint16(actualLength)-uint16(uint16(1))))*uint16(uint16(8))))-uint16(unusedBits)) + data := make([]bool, uint16((uint16((uint16(actualLength) - uint16(uint16(1)))) * uint16(uint16(8)))) - uint16(unusedBits)) // This happens when the size is set conditional to 0 if len(data) == 0 { data = nil @@ -158,7 +163,7 @@ func BACnetTagPayloadBitStringParseWithBuffer(ctx context.Context, readBuffer ut arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := readBuffer.ReadBit("") +_item, _err := readBuffer.ReadBit("") if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'data' field of BACnetTagPayloadBitString") } @@ -185,7 +190,7 @@ func BACnetTagPayloadBitStringParseWithBuffer(ctx context.Context, readBuffer ut arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := readBuffer.ReadBit("") +_item, _err := readBuffer.ReadBit("") if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'unused' field of BACnetTagPayloadBitString") } @@ -202,11 +207,11 @@ func BACnetTagPayloadBitStringParseWithBuffer(ctx context.Context, readBuffer ut // Create the instance return &_BACnetTagPayloadBitString{ - ActualLength: actualLength, - UnusedBits: unusedBits, - Data: data, - Unused: unused, - }, nil + ActualLength: actualLength, + UnusedBits: unusedBits, + Data: data, + Unused: unused, + }, nil } func (m *_BACnetTagPayloadBitString) Serialize() ([]byte, error) { @@ -220,7 +225,7 @@ func (m *_BACnetTagPayloadBitString) Serialize() ([]byte, error) { func (m *_BACnetTagPayloadBitString) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetTagPayloadBitString"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetTagPayloadBitString"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetTagPayloadBitString") } @@ -267,13 +272,13 @@ func (m *_BACnetTagPayloadBitString) SerializeWithWriteBuffer(ctx context.Contex return nil } + //// // Arguments Getter func (m *_BACnetTagPayloadBitString) GetActualLength() uint32 { return m.ActualLength } - // //// @@ -291,3 +296,6 @@ func (m *_BACnetTagPayloadBitString) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadBoolean.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadBoolean.go index d832b8a1ac9..fe2d29ff9d9 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadBoolean.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadBoolean.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetTagPayloadBoolean is the corresponding interface of BACnetTagPayloadBoolean type BACnetTagPayloadBoolean interface { @@ -53,6 +55,7 @@ type _BACnetTagPayloadBoolean struct { ActualLength uint32 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for virtual fields. @@ -61,7 +64,7 @@ type _BACnetTagPayloadBoolean struct { func (m *_BACnetTagPayloadBoolean) GetValue() bool { ctx := context.Background() _ = ctx - return bool(bool((m.ActualLength) == (1))) + return bool(bool((m.ActualLength) == ((1)))) } func (m *_BACnetTagPayloadBoolean) GetIsTrue() bool { @@ -81,14 +84,15 @@ func (m *_BACnetTagPayloadBoolean) GetIsFalse() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetTagPayloadBoolean factory function for _BACnetTagPayloadBoolean -func NewBACnetTagPayloadBoolean(actualLength uint32) *_BACnetTagPayloadBoolean { - return &_BACnetTagPayloadBoolean{ActualLength: actualLength} +func NewBACnetTagPayloadBoolean( actualLength uint32 ) *_BACnetTagPayloadBoolean { +return &_BACnetTagPayloadBoolean{ ActualLength: actualLength } } // Deprecated: use the interface for direct cast func CastBACnetTagPayloadBoolean(structType interface{}) BACnetTagPayloadBoolean { - if casted, ok := structType.(BACnetTagPayloadBoolean); ok { + if casted, ok := structType.(BACnetTagPayloadBoolean); ok { return casted } if casted, ok := structType.(*BACnetTagPayloadBoolean); ok { @@ -113,6 +117,7 @@ func (m *_BACnetTagPayloadBoolean) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetTagPayloadBoolean) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -131,7 +136,7 @@ func BACnetTagPayloadBooleanParseWithBuffer(ctx context.Context, readBuffer util _ = currentPos // Virtual field - _value := bool((actualLength) == (1)) + _value := bool((actualLength) == ((1))) value := bool(_value) _ = value @@ -151,8 +156,8 @@ func BACnetTagPayloadBooleanParseWithBuffer(ctx context.Context, readBuffer util // Create the instance return &_BACnetTagPayloadBoolean{ - ActualLength: actualLength, - }, nil + ActualLength: actualLength, + }, nil } func (m *_BACnetTagPayloadBoolean) Serialize() ([]byte, error) { @@ -166,7 +171,7 @@ func (m *_BACnetTagPayloadBoolean) Serialize() ([]byte, error) { func (m *_BACnetTagPayloadBoolean) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetTagPayloadBoolean"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetTagPayloadBoolean"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetTagPayloadBoolean") } // Virtual field @@ -188,13 +193,13 @@ func (m *_BACnetTagPayloadBoolean) SerializeWithWriteBuffer(ctx context.Context, return nil } + //// // Arguments Getter func (m *_BACnetTagPayloadBoolean) GetActualLength() uint32 { return m.ActualLength } - // //// @@ -212,3 +217,6 @@ func (m *_BACnetTagPayloadBoolean) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadCharacterString.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadCharacterString.go index 30c516102d3..5c74cb728d3 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadCharacterString.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadCharacterString.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetTagPayloadCharacterString is the corresponding interface of BACnetTagPayloadCharacterString type BACnetTagPayloadCharacterString interface { @@ -48,13 +50,14 @@ type BACnetTagPayloadCharacterStringExactly interface { // _BACnetTagPayloadCharacterString is the data-structure of this message type _BACnetTagPayloadCharacterString struct { - Encoding BACnetCharacterEncoding - Value string + Encoding BACnetCharacterEncoding + Value string // Arguments. ActualLength uint32 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -80,7 +83,7 @@ func (m *_BACnetTagPayloadCharacterString) GetValue() string { func (m *_BACnetTagPayloadCharacterString) GetActualLengthInBit() uint16 { ctx := context.Background() _ = ctx - return uint16(uint16(uint16(m.ActualLength)*uint16(uint16(8))) - uint16(uint16(8))) + return uint16(uint16(uint16(m.ActualLength) * uint16(uint16(8))) - uint16(uint16(8))) } /////////////////////// @@ -88,14 +91,15 @@ func (m *_BACnetTagPayloadCharacterString) GetActualLengthInBit() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetTagPayloadCharacterString factory function for _BACnetTagPayloadCharacterString -func NewBACnetTagPayloadCharacterString(encoding BACnetCharacterEncoding, value string, actualLength uint32) *_BACnetTagPayloadCharacterString { - return &_BACnetTagPayloadCharacterString{Encoding: encoding, Value: value, ActualLength: actualLength} +func NewBACnetTagPayloadCharacterString( encoding BACnetCharacterEncoding , value string , actualLength uint32 ) *_BACnetTagPayloadCharacterString { +return &_BACnetTagPayloadCharacterString{ Encoding: encoding , Value: value , ActualLength: actualLength } } // Deprecated: use the interface for direct cast func CastBACnetTagPayloadCharacterString(structType interface{}) BACnetTagPayloadCharacterString { - if casted, ok := structType.(BACnetTagPayloadCharacterString); ok { + if casted, ok := structType.(BACnetTagPayloadCharacterString); ok { return casted } if casted, ok := structType.(*BACnetTagPayloadCharacterString); ok { @@ -122,6 +126,7 @@ func (m *_BACnetTagPayloadCharacterString) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetTagPayloadCharacterString) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -143,7 +148,7 @@ func BACnetTagPayloadCharacterStringParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("encoding"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for encoding") } - _encoding, _encodingErr := BACnetCharacterEncodingParseWithBuffer(ctx, readBuffer) +_encoding, _encodingErr := BACnetCharacterEncodingParseWithBuffer(ctx, readBuffer) if _encodingErr != nil { return nil, errors.Wrap(_encodingErr, "Error parsing 'encoding' field of BACnetTagPayloadCharacterString") } @@ -153,12 +158,12 @@ func BACnetTagPayloadCharacterStringParseWithBuffer(ctx context.Context, readBuf } // Virtual field - _actualLengthInBit := uint16(uint16(actualLength)*uint16(uint16(8))) - uint16(uint16(8)) + _actualLengthInBit := uint16(uint16(actualLength) * uint16(uint16(8))) - uint16(uint16(8)) actualLengthInBit := uint16(_actualLengthInBit) _ = actualLengthInBit // Simple Field (value) - _value, _valueErr := readBuffer.ReadString("value", uint32(actualLengthInBit), "UTF-8") +_value, _valueErr := readBuffer.ReadString("value", uint32(actualLengthInBit), "UTF-8") if _valueErr != nil { return nil, errors.Wrap(_valueErr, "Error parsing 'value' field of BACnetTagPayloadCharacterString") } @@ -170,10 +175,10 @@ func BACnetTagPayloadCharacterStringParseWithBuffer(ctx context.Context, readBuf // Create the instance return &_BACnetTagPayloadCharacterString{ - ActualLength: actualLength, - Encoding: encoding, - Value: value, - }, nil + ActualLength: actualLength, + Encoding: encoding, + Value: value, + }, nil } func (m *_BACnetTagPayloadCharacterString) Serialize() ([]byte, error) { @@ -187,7 +192,7 @@ func (m *_BACnetTagPayloadCharacterString) Serialize() ([]byte, error) { func (m *_BACnetTagPayloadCharacterString) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetTagPayloadCharacterString"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetTagPayloadCharacterString"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetTagPayloadCharacterString") } @@ -220,13 +225,13 @@ func (m *_BACnetTagPayloadCharacterString) SerializeWithWriteBuffer(ctx context. return nil } + //// // Arguments Getter func (m *_BACnetTagPayloadCharacterString) GetActualLength() uint32 { return m.ActualLength } - // //// @@ -244,3 +249,6 @@ func (m *_BACnetTagPayloadCharacterString) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadDate.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadDate.go index c6afd91fc7f..ed11fc1525a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadDate.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadDate.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetTagPayloadDate is the corresponding interface of BACnetTagPayloadDate type BACnetTagPayloadDate interface { @@ -72,12 +74,13 @@ type BACnetTagPayloadDateExactly interface { // _BACnetTagPayloadDate is the data-structure of this message type _BACnetTagPayloadDate struct { - YearMinus1900 uint8 - Month uint8 - DayOfMonth uint8 - DayOfWeek uint8 + YearMinus1900 uint8 + Month uint8 + DayOfMonth uint8 + DayOfWeek uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -135,13 +138,13 @@ func (m *_BACnetTagPayloadDate) GetMonthIsWildcard() bool { func (m *_BACnetTagPayloadDate) GetOddMonthWildcard() bool { ctx := context.Background() _ = ctx - return bool(bool((m.GetMonth()) == (13))) + return bool(bool((m.GetMonth()) == ((13)))) } func (m *_BACnetTagPayloadDate) GetEvenMonthWildcard() bool { ctx := context.Background() _ = ctx - return bool(bool((m.GetMonth()) == (14))) + return bool(bool((m.GetMonth()) == ((14)))) } func (m *_BACnetTagPayloadDate) GetDayOfMonthIsWildcard() bool { @@ -153,19 +156,19 @@ func (m *_BACnetTagPayloadDate) GetDayOfMonthIsWildcard() bool { func (m *_BACnetTagPayloadDate) GetLastDayOfMonthWildcard() bool { ctx := context.Background() _ = ctx - return bool(bool((m.GetDayOfMonth()) == (32))) + return bool(bool((m.GetDayOfMonth()) == ((32)))) } func (m *_BACnetTagPayloadDate) GetOddDayOfMonthWildcard() bool { ctx := context.Background() _ = ctx - return bool(bool((m.GetDayOfMonth()) == (33))) + return bool(bool((m.GetDayOfMonth()) == ((33)))) } func (m *_BACnetTagPayloadDate) GetEvenDayOfMonthWildcard() bool { ctx := context.Background() _ = ctx - return bool(bool((m.GetDayOfMonth()) == (34))) + return bool(bool((m.GetDayOfMonth()) == ((34)))) } func (m *_BACnetTagPayloadDate) GetDayOfWeekIsWildcard() bool { @@ -179,14 +182,15 @@ func (m *_BACnetTagPayloadDate) GetDayOfWeekIsWildcard() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetTagPayloadDate factory function for _BACnetTagPayloadDate -func NewBACnetTagPayloadDate(yearMinus1900 uint8, month uint8, dayOfMonth uint8, dayOfWeek uint8) *_BACnetTagPayloadDate { - return &_BACnetTagPayloadDate{YearMinus1900: yearMinus1900, Month: month, DayOfMonth: dayOfMonth, DayOfWeek: dayOfWeek} +func NewBACnetTagPayloadDate( yearMinus1900 uint8 , month uint8 , dayOfMonth uint8 , dayOfWeek uint8 ) *_BACnetTagPayloadDate { +return &_BACnetTagPayloadDate{ YearMinus1900: yearMinus1900 , Month: month , DayOfMonth: dayOfMonth , DayOfWeek: dayOfWeek } } // Deprecated: use the interface for direct cast func CastBACnetTagPayloadDate(structType interface{}) BACnetTagPayloadDate { - if casted, ok := structType.(BACnetTagPayloadDate); ok { + if casted, ok := structType.(BACnetTagPayloadDate); ok { return casted } if casted, ok := structType.(*BACnetTagPayloadDate); ok { @@ -205,14 +209,14 @@ func (m *_BACnetTagPayloadDate) GetLengthInBits(ctx context.Context) uint16 { // A virtual field doesn't have any in- or output. // Simple field (yearMinus1900) - lengthInBits += 8 + lengthInBits += 8; // A virtual field doesn't have any in- or output. // A virtual field doesn't have any in- or output. // Simple field (month) - lengthInBits += 8 + lengthInBits += 8; // A virtual field doesn't have any in- or output. @@ -221,7 +225,7 @@ func (m *_BACnetTagPayloadDate) GetLengthInBits(ctx context.Context) uint16 { // A virtual field doesn't have any in- or output. // Simple field (dayOfMonth) - lengthInBits += 8 + lengthInBits += 8; // A virtual field doesn't have any in- or output. @@ -232,13 +236,14 @@ func (m *_BACnetTagPayloadDate) GetLengthInBits(ctx context.Context) uint16 { // A virtual field doesn't have any in- or output. // Simple field (dayOfWeek) - lengthInBits += 8 + lengthInBits += 8; // A virtual field doesn't have any in- or output. return lengthInBits } + func (m *_BACnetTagPayloadDate) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -262,7 +267,7 @@ func BACnetTagPayloadDateParseWithBuffer(ctx context.Context, readBuffer utils.R _ = wildcard // Simple Field (yearMinus1900) - _yearMinus1900, _yearMinus1900Err := readBuffer.ReadUint8("yearMinus1900", 8) +_yearMinus1900, _yearMinus1900Err := readBuffer.ReadUint8("yearMinus1900", 8) if _yearMinus1900Err != nil { return nil, errors.Wrap(_yearMinus1900Err, "Error parsing 'yearMinus1900' field of BACnetTagPayloadDate") } @@ -279,7 +284,7 @@ func BACnetTagPayloadDateParseWithBuffer(ctx context.Context, readBuffer utils.R _ = year // Simple Field (month) - _month, _monthErr := readBuffer.ReadUint8("month", 8) +_month, _monthErr := readBuffer.ReadUint8("month", 8) if _monthErr != nil { return nil, errors.Wrap(_monthErr, "Error parsing 'month' field of BACnetTagPayloadDate") } @@ -291,17 +296,17 @@ func BACnetTagPayloadDateParseWithBuffer(ctx context.Context, readBuffer utils.R _ = monthIsWildcard // Virtual field - _oddMonthWildcard := bool((month) == (13)) + _oddMonthWildcard := bool((month) == ((13))) oddMonthWildcard := bool(_oddMonthWildcard) _ = oddMonthWildcard // Virtual field - _evenMonthWildcard := bool((month) == (14)) + _evenMonthWildcard := bool((month) == ((14))) evenMonthWildcard := bool(_evenMonthWildcard) _ = evenMonthWildcard // Simple Field (dayOfMonth) - _dayOfMonth, _dayOfMonthErr := readBuffer.ReadUint8("dayOfMonth", 8) +_dayOfMonth, _dayOfMonthErr := readBuffer.ReadUint8("dayOfMonth", 8) if _dayOfMonthErr != nil { return nil, errors.Wrap(_dayOfMonthErr, "Error parsing 'dayOfMonth' field of BACnetTagPayloadDate") } @@ -313,22 +318,22 @@ func BACnetTagPayloadDateParseWithBuffer(ctx context.Context, readBuffer utils.R _ = dayOfMonthIsWildcard // Virtual field - _lastDayOfMonthWildcard := bool((dayOfMonth) == (32)) + _lastDayOfMonthWildcard := bool((dayOfMonth) == ((32))) lastDayOfMonthWildcard := bool(_lastDayOfMonthWildcard) _ = lastDayOfMonthWildcard // Virtual field - _oddDayOfMonthWildcard := bool((dayOfMonth) == (33)) + _oddDayOfMonthWildcard := bool((dayOfMonth) == ((33))) oddDayOfMonthWildcard := bool(_oddDayOfMonthWildcard) _ = oddDayOfMonthWildcard // Virtual field - _evenDayOfMonthWildcard := bool((dayOfMonth) == (34)) + _evenDayOfMonthWildcard := bool((dayOfMonth) == ((34))) evenDayOfMonthWildcard := bool(_evenDayOfMonthWildcard) _ = evenDayOfMonthWildcard // Simple Field (dayOfWeek) - _dayOfWeek, _dayOfWeekErr := readBuffer.ReadUint8("dayOfWeek", 8) +_dayOfWeek, _dayOfWeekErr := readBuffer.ReadUint8("dayOfWeek", 8) if _dayOfWeekErr != nil { return nil, errors.Wrap(_dayOfWeekErr, "Error parsing 'dayOfWeek' field of BACnetTagPayloadDate") } @@ -345,11 +350,11 @@ func BACnetTagPayloadDateParseWithBuffer(ctx context.Context, readBuffer utils.R // Create the instance return &_BACnetTagPayloadDate{ - YearMinus1900: yearMinus1900, - Month: month, - DayOfMonth: dayOfMonth, - DayOfWeek: dayOfWeek, - }, nil + YearMinus1900: yearMinus1900, + Month: month, + DayOfMonth: dayOfMonth, + DayOfWeek: dayOfWeek, + }, nil } func (m *_BACnetTagPayloadDate) Serialize() ([]byte, error) { @@ -363,7 +368,7 @@ func (m *_BACnetTagPayloadDate) Serialize() ([]byte, error) { func (m *_BACnetTagPayloadDate) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetTagPayloadDate"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetTagPayloadDate"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetTagPayloadDate") } // Virtual field @@ -445,6 +450,7 @@ func (m *_BACnetTagPayloadDate) SerializeWithWriteBuffer(ctx context.Context, wr return nil } + func (m *_BACnetTagPayloadDate) isBACnetTagPayloadDate() bool { return true } @@ -459,3 +465,6 @@ func (m *_BACnetTagPayloadDate) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadDouble.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadDouble.go index d84840287f7..1d899273ba0 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadDouble.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadDouble.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetTagPayloadDouble is the corresponding interface of BACnetTagPayloadDouble type BACnetTagPayloadDouble interface { @@ -44,9 +46,10 @@ type BACnetTagPayloadDoubleExactly interface { // _BACnetTagPayloadDouble is the data-structure of this message type _BACnetTagPayloadDouble struct { - Value float64 + Value float64 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -61,14 +64,15 @@ func (m *_BACnetTagPayloadDouble) GetValue() float64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetTagPayloadDouble factory function for _BACnetTagPayloadDouble -func NewBACnetTagPayloadDouble(value float64) *_BACnetTagPayloadDouble { - return &_BACnetTagPayloadDouble{Value: value} +func NewBACnetTagPayloadDouble( value float64 ) *_BACnetTagPayloadDouble { +return &_BACnetTagPayloadDouble{ Value: value } } // Deprecated: use the interface for direct cast func CastBACnetTagPayloadDouble(structType interface{}) BACnetTagPayloadDouble { - if casted, ok := structType.(BACnetTagPayloadDouble); ok { + if casted, ok := structType.(BACnetTagPayloadDouble); ok { return casted } if casted, ok := structType.(*BACnetTagPayloadDouble); ok { @@ -85,11 +89,12 @@ func (m *_BACnetTagPayloadDouble) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (value) - lengthInBits += 64 + lengthInBits += 64; return lengthInBits } + func (m *_BACnetTagPayloadDouble) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -108,7 +113,7 @@ func BACnetTagPayloadDoubleParseWithBuffer(ctx context.Context, readBuffer utils _ = currentPos // Simple Field (value) - _value, _valueErr := readBuffer.ReadFloat64("value", 64) +_value, _valueErr := readBuffer.ReadFloat64("value", 64) if _valueErr != nil { return nil, errors.Wrap(_valueErr, "Error parsing 'value' field of BACnetTagPayloadDouble") } @@ -120,8 +125,8 @@ func BACnetTagPayloadDoubleParseWithBuffer(ctx context.Context, readBuffer utils // Create the instance return &_BACnetTagPayloadDouble{ - Value: value, - }, nil + Value: value, + }, nil } func (m *_BACnetTagPayloadDouble) Serialize() ([]byte, error) { @@ -135,7 +140,7 @@ func (m *_BACnetTagPayloadDouble) Serialize() ([]byte, error) { func (m *_BACnetTagPayloadDouble) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetTagPayloadDouble"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetTagPayloadDouble"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetTagPayloadDouble") } @@ -152,6 +157,7 @@ func (m *_BACnetTagPayloadDouble) SerializeWithWriteBuffer(ctx context.Context, return nil } + func (m *_BACnetTagPayloadDouble) isBACnetTagPayloadDouble() bool { return true } @@ -166,3 +172,6 @@ func (m *_BACnetTagPayloadDouble) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadEnumerated.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadEnumerated.go index 8615e67a20a..c047640e65e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadEnumerated.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadEnumerated.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetTagPayloadEnumerated is the corresponding interface of BACnetTagPayloadEnumerated type BACnetTagPayloadEnumerated interface { @@ -46,12 +48,13 @@ type BACnetTagPayloadEnumeratedExactly interface { // _BACnetTagPayloadEnumerated is the data-structure of this message type _BACnetTagPayloadEnumerated struct { - Data []byte + Data []byte // Arguments. ActualLength uint32 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,14 +84,15 @@ func (m *_BACnetTagPayloadEnumerated) GetActualValue() uint32 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetTagPayloadEnumerated factory function for _BACnetTagPayloadEnumerated -func NewBACnetTagPayloadEnumerated(data []byte, actualLength uint32) *_BACnetTagPayloadEnumerated { - return &_BACnetTagPayloadEnumerated{Data: data, ActualLength: actualLength} +func NewBACnetTagPayloadEnumerated( data []byte , actualLength uint32 ) *_BACnetTagPayloadEnumerated { +return &_BACnetTagPayloadEnumerated{ Data: data , ActualLength: actualLength } } // Deprecated: use the interface for direct cast func CastBACnetTagPayloadEnumerated(structType interface{}) BACnetTagPayloadEnumerated { - if casted, ok := structType.(BACnetTagPayloadEnumerated); ok { + if casted, ok := structType.(BACnetTagPayloadEnumerated); ok { return casted } if casted, ok := structType.(*BACnetTagPayloadEnumerated); ok { @@ -114,6 +118,7 @@ func (m *_BACnetTagPayloadEnumerated) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_BACnetTagPayloadEnumerated) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -148,9 +153,9 @@ func BACnetTagPayloadEnumeratedParseWithBuffer(ctx context.Context, readBuffer u // Create the instance return &_BACnetTagPayloadEnumerated{ - ActualLength: actualLength, - Data: data, - }, nil + ActualLength: actualLength, + Data: data, + }, nil } func (m *_BACnetTagPayloadEnumerated) Serialize() ([]byte, error) { @@ -164,7 +169,7 @@ func (m *_BACnetTagPayloadEnumerated) Serialize() ([]byte, error) { func (m *_BACnetTagPayloadEnumerated) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetTagPayloadEnumerated"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetTagPayloadEnumerated"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetTagPayloadEnumerated") } @@ -184,13 +189,13 @@ func (m *_BACnetTagPayloadEnumerated) SerializeWithWriteBuffer(ctx context.Conte return nil } + //// // Arguments Getter func (m *_BACnetTagPayloadEnumerated) GetActualLength() uint32 { return m.ActualLength } - // //// @@ -208,3 +213,6 @@ func (m *_BACnetTagPayloadEnumerated) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadObjectIdentifier.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadObjectIdentifier.go index ccf06dd48f3..d135b414a72 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadObjectIdentifier.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadObjectIdentifier.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetTagPayloadObjectIdentifier is the corresponding interface of BACnetTagPayloadObjectIdentifier type BACnetTagPayloadObjectIdentifier interface { @@ -50,11 +52,12 @@ type BACnetTagPayloadObjectIdentifierExactly interface { // _BACnetTagPayloadObjectIdentifier is the data-structure of this message type _BACnetTagPayloadObjectIdentifier struct { - ObjectType BACnetObjectType - ProprietaryValue uint16 - InstanceNumber uint32 + ObjectType BACnetObjectType + ProprietaryValue uint16 + InstanceNumber uint32 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,14 +95,15 @@ func (m *_BACnetTagPayloadObjectIdentifier) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetTagPayloadObjectIdentifier factory function for _BACnetTagPayloadObjectIdentifier -func NewBACnetTagPayloadObjectIdentifier(objectType BACnetObjectType, proprietaryValue uint16, instanceNumber uint32) *_BACnetTagPayloadObjectIdentifier { - return &_BACnetTagPayloadObjectIdentifier{ObjectType: objectType, ProprietaryValue: proprietaryValue, InstanceNumber: instanceNumber} +func NewBACnetTagPayloadObjectIdentifier( objectType BACnetObjectType , proprietaryValue uint16 , instanceNumber uint32 ) *_BACnetTagPayloadObjectIdentifier { +return &_BACnetTagPayloadObjectIdentifier{ ObjectType: objectType , ProprietaryValue: proprietaryValue , InstanceNumber: instanceNumber } } // Deprecated: use the interface for direct cast func CastBACnetTagPayloadObjectIdentifier(structType interface{}) BACnetTagPayloadObjectIdentifier { - if casted, ok := structType.(BACnetTagPayloadObjectIdentifier); ok { + if casted, ok := structType.(BACnetTagPayloadObjectIdentifier); ok { return casted } if casted, ok := structType.(*BACnetTagPayloadObjectIdentifier); ok { @@ -124,11 +128,12 @@ func (m *_BACnetTagPayloadObjectIdentifier) GetLengthInBits(ctx context.Context) // A virtual field doesn't have any in- or output. // Simple field (instanceNumber) - lengthInBits += 22 + lengthInBits += 22; return lengthInBits } + func (m *_BACnetTagPayloadObjectIdentifier) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -153,7 +158,7 @@ func BACnetTagPayloadObjectIdentifierParseWithBuffer(ctx context.Context, readBu } var objectType BACnetObjectType if _objectType != nil { - objectType = _objectType.(BACnetObjectType) + objectType = _objectType.(BACnetObjectType) } // Manual Field (proprietaryValue) @@ -163,7 +168,7 @@ func BACnetTagPayloadObjectIdentifierParseWithBuffer(ctx context.Context, readBu } var proprietaryValue uint16 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint16) + proprietaryValue = _proprietaryValue.(uint16) } // Virtual field @@ -172,7 +177,7 @@ func BACnetTagPayloadObjectIdentifierParseWithBuffer(ctx context.Context, readBu _ = isProprietary // Simple Field (instanceNumber) - _instanceNumber, _instanceNumberErr := readBuffer.ReadUint32("instanceNumber", 22) +_instanceNumber, _instanceNumberErr := readBuffer.ReadUint32("instanceNumber", 22) if _instanceNumberErr != nil { return nil, errors.Wrap(_instanceNumberErr, "Error parsing 'instanceNumber' field of BACnetTagPayloadObjectIdentifier") } @@ -184,10 +189,10 @@ func BACnetTagPayloadObjectIdentifierParseWithBuffer(ctx context.Context, readBu // Create the instance return &_BACnetTagPayloadObjectIdentifier{ - ObjectType: objectType, - ProprietaryValue: proprietaryValue, - InstanceNumber: instanceNumber, - }, nil + ObjectType: objectType, + ProprietaryValue: proprietaryValue, + InstanceNumber: instanceNumber, + }, nil } func (m *_BACnetTagPayloadObjectIdentifier) Serialize() ([]byte, error) { @@ -201,7 +206,7 @@ func (m *_BACnetTagPayloadObjectIdentifier) Serialize() ([]byte, error) { func (m *_BACnetTagPayloadObjectIdentifier) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetTagPayloadObjectIdentifier"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetTagPayloadObjectIdentifier"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetTagPayloadObjectIdentifier") } @@ -234,6 +239,7 @@ func (m *_BACnetTagPayloadObjectIdentifier) SerializeWithWriteBuffer(ctx context return nil } + func (m *_BACnetTagPayloadObjectIdentifier) isBACnetTagPayloadObjectIdentifier() bool { return true } @@ -248,3 +254,6 @@ func (m *_BACnetTagPayloadObjectIdentifier) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadOctetString.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadOctetString.go index d6e51bad84d..50df7ffa66c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadOctetString.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadOctetString.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetTagPayloadOctetString is the corresponding interface of BACnetTagPayloadOctetString type BACnetTagPayloadOctetString interface { @@ -44,12 +46,13 @@ type BACnetTagPayloadOctetStringExactly interface { // _BACnetTagPayloadOctetString is the data-structure of this message type _BACnetTagPayloadOctetString struct { - Octets []byte + Octets []byte // Arguments. ActualLength uint32 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -64,14 +67,15 @@ func (m *_BACnetTagPayloadOctetString) GetOctets() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetTagPayloadOctetString factory function for _BACnetTagPayloadOctetString -func NewBACnetTagPayloadOctetString(octets []byte, actualLength uint32) *_BACnetTagPayloadOctetString { - return &_BACnetTagPayloadOctetString{Octets: octets, ActualLength: actualLength} +func NewBACnetTagPayloadOctetString( octets []byte , actualLength uint32 ) *_BACnetTagPayloadOctetString { +return &_BACnetTagPayloadOctetString{ Octets: octets , ActualLength: actualLength } } // Deprecated: use the interface for direct cast func CastBACnetTagPayloadOctetString(structType interface{}) BACnetTagPayloadOctetString { - if casted, ok := structType.(BACnetTagPayloadOctetString); ok { + if casted, ok := structType.(BACnetTagPayloadOctetString); ok { return casted } if casted, ok := structType.(*BACnetTagPayloadOctetString); ok { @@ -95,6 +99,7 @@ func (m *_BACnetTagPayloadOctetString) GetLengthInBits(ctx context.Context) uint return lengthInBits } + func (m *_BACnetTagPayloadOctetString) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -124,9 +129,9 @@ func BACnetTagPayloadOctetStringParseWithBuffer(ctx context.Context, readBuffer // Create the instance return &_BACnetTagPayloadOctetString{ - ActualLength: actualLength, - Octets: octets, - }, nil + ActualLength: actualLength, + Octets: octets, + }, nil } func (m *_BACnetTagPayloadOctetString) Serialize() ([]byte, error) { @@ -140,7 +145,7 @@ func (m *_BACnetTagPayloadOctetString) Serialize() ([]byte, error) { func (m *_BACnetTagPayloadOctetString) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetTagPayloadOctetString"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetTagPayloadOctetString"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetTagPayloadOctetString") } @@ -156,13 +161,13 @@ func (m *_BACnetTagPayloadOctetString) SerializeWithWriteBuffer(ctx context.Cont return nil } + //// // Arguments Getter func (m *_BACnetTagPayloadOctetString) GetActualLength() uint32 { return m.ActualLength } - // //// @@ -180,3 +185,6 @@ func (m *_BACnetTagPayloadOctetString) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadReal.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadReal.go index c25557c0924..502ad967eca 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadReal.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadReal.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetTagPayloadReal is the corresponding interface of BACnetTagPayloadReal type BACnetTagPayloadReal interface { @@ -44,9 +46,10 @@ type BACnetTagPayloadRealExactly interface { // _BACnetTagPayloadReal is the data-structure of this message type _BACnetTagPayloadReal struct { - Value float32 + Value float32 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -61,14 +64,15 @@ func (m *_BACnetTagPayloadReal) GetValue() float32 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetTagPayloadReal factory function for _BACnetTagPayloadReal -func NewBACnetTagPayloadReal(value float32) *_BACnetTagPayloadReal { - return &_BACnetTagPayloadReal{Value: value} +func NewBACnetTagPayloadReal( value float32 ) *_BACnetTagPayloadReal { +return &_BACnetTagPayloadReal{ Value: value } } // Deprecated: use the interface for direct cast func CastBACnetTagPayloadReal(structType interface{}) BACnetTagPayloadReal { - if casted, ok := structType.(BACnetTagPayloadReal); ok { + if casted, ok := structType.(BACnetTagPayloadReal); ok { return casted } if casted, ok := structType.(*BACnetTagPayloadReal); ok { @@ -85,11 +89,12 @@ func (m *_BACnetTagPayloadReal) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (value) - lengthInBits += 32 + lengthInBits += 32; return lengthInBits } + func (m *_BACnetTagPayloadReal) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -108,7 +113,7 @@ func BACnetTagPayloadRealParseWithBuffer(ctx context.Context, readBuffer utils.R _ = currentPos // Simple Field (value) - _value, _valueErr := readBuffer.ReadFloat32("value", 32) +_value, _valueErr := readBuffer.ReadFloat32("value", 32) if _valueErr != nil { return nil, errors.Wrap(_valueErr, "Error parsing 'value' field of BACnetTagPayloadReal") } @@ -120,8 +125,8 @@ func BACnetTagPayloadRealParseWithBuffer(ctx context.Context, readBuffer utils.R // Create the instance return &_BACnetTagPayloadReal{ - Value: value, - }, nil + Value: value, + }, nil } func (m *_BACnetTagPayloadReal) Serialize() ([]byte, error) { @@ -135,7 +140,7 @@ func (m *_BACnetTagPayloadReal) Serialize() ([]byte, error) { func (m *_BACnetTagPayloadReal) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetTagPayloadReal"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetTagPayloadReal"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetTagPayloadReal") } @@ -152,6 +157,7 @@ func (m *_BACnetTagPayloadReal) SerializeWithWriteBuffer(ctx context.Context, wr return nil } + func (m *_BACnetTagPayloadReal) isBACnetTagPayloadReal() bool { return true } @@ -166,3 +172,6 @@ func (m *_BACnetTagPayloadReal) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadSignedInteger.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadSignedInteger.go index b290c14e9d3..2f987c79aa6 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadSignedInteger.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadSignedInteger.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetTagPayloadSignedInteger is the corresponding interface of BACnetTagPayloadSignedInteger type BACnetTagPayloadSignedInteger interface { @@ -76,19 +78,20 @@ type BACnetTagPayloadSignedIntegerExactly interface { // _BACnetTagPayloadSignedInteger is the data-structure of this message type _BACnetTagPayloadSignedInteger struct { - ValueInt8 *int8 - ValueInt16 *int16 - ValueInt24 *int32 - ValueInt32 *int32 - ValueInt40 *int64 - ValueInt48 *int64 - ValueInt56 *int64 - ValueInt64 *int64 + ValueInt8 *int8 + ValueInt16 *int16 + ValueInt24 *int32 + ValueInt32 *int32 + ValueInt40 *int64 + ValueInt48 *int64 + ValueInt56 *int64 + ValueInt64 *int64 // Arguments. ActualLength uint32 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -154,7 +157,7 @@ func (m *_BACnetTagPayloadSignedInteger) GetIsInt8() bool { _ = valueInt56 valueInt64 := m.ValueInt64 _ = valueInt64 - return bool(bool((m.ActualLength) == (1))) + return bool(bool((m.ActualLength) == ((1)))) } func (m *_BACnetTagPayloadSignedInteger) GetIsInt16() bool { @@ -176,7 +179,7 @@ func (m *_BACnetTagPayloadSignedInteger) GetIsInt16() bool { _ = valueInt56 valueInt64 := m.ValueInt64 _ = valueInt64 - return bool(bool((m.ActualLength) == (2))) + return bool(bool((m.ActualLength) == ((2)))) } func (m *_BACnetTagPayloadSignedInteger) GetIsInt24() bool { @@ -198,7 +201,7 @@ func (m *_BACnetTagPayloadSignedInteger) GetIsInt24() bool { _ = valueInt56 valueInt64 := m.ValueInt64 _ = valueInt64 - return bool(bool((m.ActualLength) == (3))) + return bool(bool((m.ActualLength) == ((3)))) } func (m *_BACnetTagPayloadSignedInteger) GetIsInt32() bool { @@ -220,7 +223,7 @@ func (m *_BACnetTagPayloadSignedInteger) GetIsInt32() bool { _ = valueInt56 valueInt64 := m.ValueInt64 _ = valueInt64 - return bool(bool((m.ActualLength) == (4))) + return bool(bool((m.ActualLength) == ((4)))) } func (m *_BACnetTagPayloadSignedInteger) GetIsInt40() bool { @@ -242,7 +245,7 @@ func (m *_BACnetTagPayloadSignedInteger) GetIsInt40() bool { _ = valueInt56 valueInt64 := m.ValueInt64 _ = valueInt64 - return bool(bool((m.ActualLength) == (5))) + return bool(bool((m.ActualLength) == ((5)))) } func (m *_BACnetTagPayloadSignedInteger) GetIsInt48() bool { @@ -264,7 +267,7 @@ func (m *_BACnetTagPayloadSignedInteger) GetIsInt48() bool { _ = valueInt56 valueInt64 := m.ValueInt64 _ = valueInt64 - return bool(bool((m.ActualLength) == (6))) + return bool(bool((m.ActualLength) == ((6)))) } func (m *_BACnetTagPayloadSignedInteger) GetIsInt56() bool { @@ -286,7 +289,7 @@ func (m *_BACnetTagPayloadSignedInteger) GetIsInt56() bool { _ = valueInt56 valueInt64 := m.ValueInt64 _ = valueInt64 - return bool(bool((m.ActualLength) == (7))) + return bool(bool((m.ActualLength) == ((7)))) } func (m *_BACnetTagPayloadSignedInteger) GetIsInt64() bool { @@ -308,7 +311,7 @@ func (m *_BACnetTagPayloadSignedInteger) GetIsInt64() bool { _ = valueInt56 valueInt64 := m.ValueInt64 _ = valueInt64 - return bool(bool((m.ActualLength) == (8))) + return bool(bool((m.ActualLength) == ((8)))) } func (m *_BACnetTagPayloadSignedInteger) GetActualValue() uint64 { @@ -330,19 +333,7 @@ func (m *_BACnetTagPayloadSignedInteger) GetActualValue() uint64 { _ = valueInt56 valueInt64 := m.ValueInt64 _ = valueInt64 - return uint64(utils.InlineIf(m.GetIsInt8(), func() interface{} { return uint64((*m.GetValueInt8())) }, func() interface{} { - return uint64((utils.InlineIf(m.GetIsInt16(), func() interface{} { return uint64((*m.GetValueInt16())) }, func() interface{} { - return uint64((utils.InlineIf(m.GetIsInt24(), func() interface{} { return uint64((*m.GetValueInt24())) }, func() interface{} { - return uint64((utils.InlineIf(m.GetIsInt32(), func() interface{} { return uint64((*m.GetValueInt32())) }, func() interface{} { - return uint64((utils.InlineIf(m.GetIsInt40(), func() interface{} { return uint64((*m.GetValueInt40())) }, func() interface{} { - return uint64((utils.InlineIf(m.GetIsInt48(), func() interface{} { return uint64((*m.GetValueInt48())) }, func() interface{} { - return uint64((utils.InlineIf(m.GetIsInt56(), func() interface{} { return uint64((*m.GetValueInt56())) }, func() interface{} { return uint64((*m.GetValueInt64())) }).(uint64))) - }).(uint64))) - }).(uint64))) - }).(uint64))) - }).(uint64))) - }).(uint64))) - }).(uint64)) + return uint64(utils.InlineIf(m.GetIsInt8(), func() interface{} {return uint64((*m.GetValueInt8()))}, func() interface{} {return uint64((utils.InlineIf(m.GetIsInt16(), func() interface{} {return uint64((*m.GetValueInt16()))}, func() interface{} {return uint64((utils.InlineIf(m.GetIsInt24(), func() interface{} {return uint64((*m.GetValueInt24()))}, func() interface{} {return uint64((utils.InlineIf(m.GetIsInt32(), func() interface{} {return uint64((*m.GetValueInt32()))}, func() interface{} {return uint64((utils.InlineIf(m.GetIsInt40(), func() interface{} {return uint64((*m.GetValueInt40()))}, func() interface{} {return uint64((utils.InlineIf(m.GetIsInt48(), func() interface{} {return uint64((*m.GetValueInt48()))}, func() interface{} {return uint64((utils.InlineIf(m.GetIsInt56(), func() interface{} {return uint64((*m.GetValueInt56()))}, func() interface{} {return uint64((*m.GetValueInt64()))}).(uint64)))}).(uint64)))}).(uint64)))}).(uint64)))}).(uint64)))}).(uint64)))}).(uint64)) } /////////////////////// @@ -350,14 +341,15 @@ func (m *_BACnetTagPayloadSignedInteger) GetActualValue() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetTagPayloadSignedInteger factory function for _BACnetTagPayloadSignedInteger -func NewBACnetTagPayloadSignedInteger(valueInt8 *int8, valueInt16 *int16, valueInt24 *int32, valueInt32 *int32, valueInt40 *int64, valueInt48 *int64, valueInt56 *int64, valueInt64 *int64, actualLength uint32) *_BACnetTagPayloadSignedInteger { - return &_BACnetTagPayloadSignedInteger{ValueInt8: valueInt8, ValueInt16: valueInt16, ValueInt24: valueInt24, ValueInt32: valueInt32, ValueInt40: valueInt40, ValueInt48: valueInt48, ValueInt56: valueInt56, ValueInt64: valueInt64, ActualLength: actualLength} +func NewBACnetTagPayloadSignedInteger( valueInt8 *int8 , valueInt16 *int16 , valueInt24 *int32 , valueInt32 *int32 , valueInt40 *int64 , valueInt48 *int64 , valueInt56 *int64 , valueInt64 *int64 , actualLength uint32 ) *_BACnetTagPayloadSignedInteger { +return &_BACnetTagPayloadSignedInteger{ ValueInt8: valueInt8 , ValueInt16: valueInt16 , ValueInt24: valueInt24 , ValueInt32: valueInt32 , ValueInt40: valueInt40 , ValueInt48: valueInt48 , ValueInt56: valueInt56 , ValueInt64: valueInt64 , ActualLength: actualLength } } // Deprecated: use the interface for direct cast func CastBACnetTagPayloadSignedInteger(structType interface{}) BACnetTagPayloadSignedInteger { - if casted, ok := structType.(BACnetTagPayloadSignedInteger); ok { + if casted, ok := structType.(BACnetTagPayloadSignedInteger); ok { return casted } if casted, ok := structType.(*BACnetTagPayloadSignedInteger); ok { @@ -434,6 +426,7 @@ func (m *_BACnetTagPayloadSignedInteger) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BACnetTagPayloadSignedInteger) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -452,7 +445,7 @@ func BACnetTagPayloadSignedIntegerParseWithBuffer(ctx context.Context, readBuffe _ = currentPos // Virtual field - _isInt8 := bool((actualLength) == (1)) + _isInt8 := bool((actualLength) == ((1))) isInt8 := bool(_isInt8) _ = isInt8 @@ -467,7 +460,7 @@ func BACnetTagPayloadSignedIntegerParseWithBuffer(ctx context.Context, readBuffe } // Virtual field - _isInt16 := bool((actualLength) == (2)) + _isInt16 := bool((actualLength) == ((2))) isInt16 := bool(_isInt16) _ = isInt16 @@ -482,7 +475,7 @@ func BACnetTagPayloadSignedIntegerParseWithBuffer(ctx context.Context, readBuffe } // Virtual field - _isInt24 := bool((actualLength) == (3)) + _isInt24 := bool((actualLength) == ((3))) isInt24 := bool(_isInt24) _ = isInt24 @@ -497,7 +490,7 @@ func BACnetTagPayloadSignedIntegerParseWithBuffer(ctx context.Context, readBuffe } // Virtual field - _isInt32 := bool((actualLength) == (4)) + _isInt32 := bool((actualLength) == ((4))) isInt32 := bool(_isInt32) _ = isInt32 @@ -512,7 +505,7 @@ func BACnetTagPayloadSignedIntegerParseWithBuffer(ctx context.Context, readBuffe } // Virtual field - _isInt40 := bool((actualLength) == (5)) + _isInt40 := bool((actualLength) == ((5))) isInt40 := bool(_isInt40) _ = isInt40 @@ -527,7 +520,7 @@ func BACnetTagPayloadSignedIntegerParseWithBuffer(ctx context.Context, readBuffe } // Virtual field - _isInt48 := bool((actualLength) == (6)) + _isInt48 := bool((actualLength) == ((6))) isInt48 := bool(_isInt48) _ = isInt48 @@ -542,7 +535,7 @@ func BACnetTagPayloadSignedIntegerParseWithBuffer(ctx context.Context, readBuffe } // Virtual field - _isInt56 := bool((actualLength) == (7)) + _isInt56 := bool((actualLength) == ((7))) isInt56 := bool(_isInt56) _ = isInt56 @@ -557,7 +550,7 @@ func BACnetTagPayloadSignedIntegerParseWithBuffer(ctx context.Context, readBuffe } // Virtual field - _isInt64 := bool((actualLength) == (8)) + _isInt64 := bool((actualLength) == ((8))) isInt64 := bool(_isInt64) _ = isInt64 @@ -572,24 +565,12 @@ func BACnetTagPayloadSignedIntegerParseWithBuffer(ctx context.Context, readBuffe } // Validation - if !(bool(bool(bool(bool(bool(bool(bool(isInt8) || bool(isInt16)) || bool(isInt24)) || bool(isInt32)) || bool(isInt40)) || bool(isInt48)) || bool(isInt56)) || bool(isInt64)) { + if (!(bool(bool(bool(bool(bool(bool(bool(isInt8) || bool(isInt16)) || bool(isInt24)) || bool(isInt32)) || bool(isInt40)) || bool(isInt48)) || bool(isInt56)) || bool(isInt64))) { return nil, errors.WithStack(utils.ParseValidationError{"unmapped integer length"}) } // Virtual field - _actualValue := utils.InlineIf(isInt8, func() interface{} { return uint64((*valueInt8)) }, func() interface{} { - return uint64((utils.InlineIf(isInt16, func() interface{} { return uint64((*valueInt16)) }, func() interface{} { - return uint64((utils.InlineIf(isInt24, func() interface{} { return uint64((*valueInt24)) }, func() interface{} { - return uint64((utils.InlineIf(isInt32, func() interface{} { return uint64((*valueInt32)) }, func() interface{} { - return uint64((utils.InlineIf(isInt40, func() interface{} { return uint64((*valueInt40)) }, func() interface{} { - return uint64((utils.InlineIf(isInt48, func() interface{} { return uint64((*valueInt48)) }, func() interface{} { - return uint64((utils.InlineIf(isInt56, func() interface{} { return uint64((*valueInt56)) }, func() interface{} { return uint64((*valueInt64)) }).(uint64))) - }).(uint64))) - }).(uint64))) - }).(uint64))) - }).(uint64))) - }).(uint64))) - }).(uint64) + _actualValue := utils.InlineIf(isInt8, func() interface{} {return uint64((*valueInt8))}, func() interface{} {return uint64((utils.InlineIf(isInt16, func() interface{} {return uint64((*valueInt16))}, func() interface{} {return uint64((utils.InlineIf(isInt24, func() interface{} {return uint64((*valueInt24))}, func() interface{} {return uint64((utils.InlineIf(isInt32, func() interface{} {return uint64((*valueInt32))}, func() interface{} {return uint64((utils.InlineIf(isInt40, func() interface{} {return uint64((*valueInt40))}, func() interface{} {return uint64((utils.InlineIf(isInt48, func() interface{} {return uint64((*valueInt48))}, func() interface{} {return uint64((utils.InlineIf(isInt56, func() interface{} {return uint64((*valueInt56))}, func() interface{} {return uint64((*valueInt64))}).(uint64)))}).(uint64)))}).(uint64)))}).(uint64)))}).(uint64)))}).(uint64)))}).(uint64) actualValue := uint64(_actualValue) _ = actualValue @@ -599,16 +580,16 @@ func BACnetTagPayloadSignedIntegerParseWithBuffer(ctx context.Context, readBuffe // Create the instance return &_BACnetTagPayloadSignedInteger{ - ActualLength: actualLength, - ValueInt8: valueInt8, - ValueInt16: valueInt16, - ValueInt24: valueInt24, - ValueInt32: valueInt32, - ValueInt40: valueInt40, - ValueInt48: valueInt48, - ValueInt56: valueInt56, - ValueInt64: valueInt64, - }, nil + ActualLength: actualLength, + ValueInt8: valueInt8, + ValueInt16: valueInt16, + ValueInt24: valueInt24, + ValueInt32: valueInt32, + ValueInt40: valueInt40, + ValueInt48: valueInt48, + ValueInt56: valueInt56, + ValueInt64: valueInt64, + }, nil } func (m *_BACnetTagPayloadSignedInteger) Serialize() ([]byte, error) { @@ -622,7 +603,7 @@ func (m *_BACnetTagPayloadSignedInteger) Serialize() ([]byte, error) { func (m *_BACnetTagPayloadSignedInteger) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetTagPayloadSignedInteger"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetTagPayloadSignedInteger"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetTagPayloadSignedInteger") } // Virtual field @@ -748,13 +729,13 @@ func (m *_BACnetTagPayloadSignedInteger) SerializeWithWriteBuffer(ctx context.Co return nil } + //// // Arguments Getter func (m *_BACnetTagPayloadSignedInteger) GetActualLength() uint32 { return m.ActualLength } - // //// @@ -772,3 +753,6 @@ func (m *_BACnetTagPayloadSignedInteger) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadTime.go index fac9378c34b..2ae6b3f83a4 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetTagPayloadTime is the corresponding interface of BACnetTagPayloadTime type BACnetTagPayloadTime interface { @@ -60,12 +62,13 @@ type BACnetTagPayloadTimeExactly interface { // _BACnetTagPayloadTime is the data-structure of this message type _BACnetTagPayloadTime struct { - Hour uint8 - Minute uint8 - Second uint8 - Fractional uint8 + Hour uint8 + Minute uint8 + Second uint8 + Fractional uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -131,14 +134,15 @@ func (m *_BACnetTagPayloadTime) GetFractionalIsWildcard() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetTagPayloadTime factory function for _BACnetTagPayloadTime -func NewBACnetTagPayloadTime(hour uint8, minute uint8, second uint8, fractional uint8) *_BACnetTagPayloadTime { - return &_BACnetTagPayloadTime{Hour: hour, Minute: minute, Second: second, Fractional: fractional} +func NewBACnetTagPayloadTime( hour uint8 , minute uint8 , second uint8 , fractional uint8 ) *_BACnetTagPayloadTime { +return &_BACnetTagPayloadTime{ Hour: hour , Minute: minute , Second: second , Fractional: fractional } } // Deprecated: use the interface for direct cast func CastBACnetTagPayloadTime(structType interface{}) BACnetTagPayloadTime { - if casted, ok := structType.(BACnetTagPayloadTime); ok { + if casted, ok := structType.(BACnetTagPayloadTime); ok { return casted } if casted, ok := structType.(*BACnetTagPayloadTime); ok { @@ -157,28 +161,29 @@ func (m *_BACnetTagPayloadTime) GetLengthInBits(ctx context.Context) uint16 { // A virtual field doesn't have any in- or output. // Simple field (hour) - lengthInBits += 8 + lengthInBits += 8; // A virtual field doesn't have any in- or output. // Simple field (minute) - lengthInBits += 8 + lengthInBits += 8; // A virtual field doesn't have any in- or output. // Simple field (second) - lengthInBits += 8 + lengthInBits += 8; // A virtual field doesn't have any in- or output. // Simple field (fractional) - lengthInBits += 8 + lengthInBits += 8; // A virtual field doesn't have any in- or output. return lengthInBits } + func (m *_BACnetTagPayloadTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -202,7 +207,7 @@ func BACnetTagPayloadTimeParseWithBuffer(ctx context.Context, readBuffer utils.R _ = wildcard // Simple Field (hour) - _hour, _hourErr := readBuffer.ReadUint8("hour", 8) +_hour, _hourErr := readBuffer.ReadUint8("hour", 8) if _hourErr != nil { return nil, errors.Wrap(_hourErr, "Error parsing 'hour' field of BACnetTagPayloadTime") } @@ -214,7 +219,7 @@ func BACnetTagPayloadTimeParseWithBuffer(ctx context.Context, readBuffer utils.R _ = hourIsWildcard // Simple Field (minute) - _minute, _minuteErr := readBuffer.ReadUint8("minute", 8) +_minute, _minuteErr := readBuffer.ReadUint8("minute", 8) if _minuteErr != nil { return nil, errors.Wrap(_minuteErr, "Error parsing 'minute' field of BACnetTagPayloadTime") } @@ -226,7 +231,7 @@ func BACnetTagPayloadTimeParseWithBuffer(ctx context.Context, readBuffer utils.R _ = minuteIsWildcard // Simple Field (second) - _second, _secondErr := readBuffer.ReadUint8("second", 8) +_second, _secondErr := readBuffer.ReadUint8("second", 8) if _secondErr != nil { return nil, errors.Wrap(_secondErr, "Error parsing 'second' field of BACnetTagPayloadTime") } @@ -238,7 +243,7 @@ func BACnetTagPayloadTimeParseWithBuffer(ctx context.Context, readBuffer utils.R _ = secondIsWildcard // Simple Field (fractional) - _fractional, _fractionalErr := readBuffer.ReadUint8("fractional", 8) +_fractional, _fractionalErr := readBuffer.ReadUint8("fractional", 8) if _fractionalErr != nil { return nil, errors.Wrap(_fractionalErr, "Error parsing 'fractional' field of BACnetTagPayloadTime") } @@ -255,11 +260,11 @@ func BACnetTagPayloadTimeParseWithBuffer(ctx context.Context, readBuffer utils.R // Create the instance return &_BACnetTagPayloadTime{ - Hour: hour, - Minute: minute, - Second: second, - Fractional: fractional, - }, nil + Hour: hour, + Minute: minute, + Second: second, + Fractional: fractional, + }, nil } func (m *_BACnetTagPayloadTime) Serialize() ([]byte, error) { @@ -273,7 +278,7 @@ func (m *_BACnetTagPayloadTime) Serialize() ([]byte, error) { func (m *_BACnetTagPayloadTime) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetTagPayloadTime"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetTagPayloadTime"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetTagPayloadTime") } // Virtual field @@ -331,6 +336,7 @@ func (m *_BACnetTagPayloadTime) SerializeWithWriteBuffer(ctx context.Context, wr return nil } + func (m *_BACnetTagPayloadTime) isBACnetTagPayloadTime() bool { return true } @@ -345,3 +351,6 @@ func (m *_BACnetTagPayloadTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadUnsignedInteger.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadUnsignedInteger.go index 46dee5b92dc..affc8d00adf 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadUnsignedInteger.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTagPayloadUnsignedInteger.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetTagPayloadUnsignedInteger is the corresponding interface of BACnetTagPayloadUnsignedInteger type BACnetTagPayloadUnsignedInteger interface { @@ -76,19 +78,20 @@ type BACnetTagPayloadUnsignedIntegerExactly interface { // _BACnetTagPayloadUnsignedInteger is the data-structure of this message type _BACnetTagPayloadUnsignedInteger struct { - ValueUint8 *uint8 - ValueUint16 *uint16 - ValueUint24 *uint32 - ValueUint32 *uint32 - ValueUint40 *uint64 - ValueUint48 *uint64 - ValueUint56 *uint64 - ValueUint64 *uint64 + ValueUint8 *uint8 + ValueUint16 *uint16 + ValueUint24 *uint32 + ValueUint32 *uint32 + ValueUint40 *uint64 + ValueUint48 *uint64 + ValueUint56 *uint64 + ValueUint64 *uint64 // Arguments. ActualLength uint32 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -154,7 +157,7 @@ func (m *_BACnetTagPayloadUnsignedInteger) GetIsUint8() bool { _ = valueUint56 valueUint64 := m.ValueUint64 _ = valueUint64 - return bool(bool((m.ActualLength) == (1))) + return bool(bool((m.ActualLength) == ((1)))) } func (m *_BACnetTagPayloadUnsignedInteger) GetIsUint16() bool { @@ -176,7 +179,7 @@ func (m *_BACnetTagPayloadUnsignedInteger) GetIsUint16() bool { _ = valueUint56 valueUint64 := m.ValueUint64 _ = valueUint64 - return bool(bool((m.ActualLength) == (2))) + return bool(bool((m.ActualLength) == ((2)))) } func (m *_BACnetTagPayloadUnsignedInteger) GetIsUint24() bool { @@ -198,7 +201,7 @@ func (m *_BACnetTagPayloadUnsignedInteger) GetIsUint24() bool { _ = valueUint56 valueUint64 := m.ValueUint64 _ = valueUint64 - return bool(bool((m.ActualLength) == (3))) + return bool(bool((m.ActualLength) == ((3)))) } func (m *_BACnetTagPayloadUnsignedInteger) GetIsUint32() bool { @@ -220,7 +223,7 @@ func (m *_BACnetTagPayloadUnsignedInteger) GetIsUint32() bool { _ = valueUint56 valueUint64 := m.ValueUint64 _ = valueUint64 - return bool(bool((m.ActualLength) == (4))) + return bool(bool((m.ActualLength) == ((4)))) } func (m *_BACnetTagPayloadUnsignedInteger) GetIsUint40() bool { @@ -242,7 +245,7 @@ func (m *_BACnetTagPayloadUnsignedInteger) GetIsUint40() bool { _ = valueUint56 valueUint64 := m.ValueUint64 _ = valueUint64 - return bool(bool((m.ActualLength) == (5))) + return bool(bool((m.ActualLength) == ((5)))) } func (m *_BACnetTagPayloadUnsignedInteger) GetIsUint48() bool { @@ -264,7 +267,7 @@ func (m *_BACnetTagPayloadUnsignedInteger) GetIsUint48() bool { _ = valueUint56 valueUint64 := m.ValueUint64 _ = valueUint64 - return bool(bool((m.ActualLength) == (6))) + return bool(bool((m.ActualLength) == ((6)))) } func (m *_BACnetTagPayloadUnsignedInteger) GetIsUint56() bool { @@ -286,7 +289,7 @@ func (m *_BACnetTagPayloadUnsignedInteger) GetIsUint56() bool { _ = valueUint56 valueUint64 := m.ValueUint64 _ = valueUint64 - return bool(bool((m.ActualLength) == (7))) + return bool(bool((m.ActualLength) == ((7)))) } func (m *_BACnetTagPayloadUnsignedInteger) GetIsUint64() bool { @@ -308,7 +311,7 @@ func (m *_BACnetTagPayloadUnsignedInteger) GetIsUint64() bool { _ = valueUint56 valueUint64 := m.ValueUint64 _ = valueUint64 - return bool(bool((m.ActualLength) == (8))) + return bool(bool((m.ActualLength) == ((8)))) } func (m *_BACnetTagPayloadUnsignedInteger) GetActualValue() uint64 { @@ -330,19 +333,7 @@ func (m *_BACnetTagPayloadUnsignedInteger) GetActualValue() uint64 { _ = valueUint56 valueUint64 := m.ValueUint64 _ = valueUint64 - return uint64(utils.InlineIf(m.GetIsUint8(), func() interface{} { return uint64((*m.GetValueUint8())) }, func() interface{} { - return uint64((utils.InlineIf(m.GetIsUint16(), func() interface{} { return uint64((*m.GetValueUint16())) }, func() interface{} { - return uint64((utils.InlineIf(m.GetIsUint24(), func() interface{} { return uint64((*m.GetValueUint24())) }, func() interface{} { - return uint64((utils.InlineIf(m.GetIsUint32(), func() interface{} { return uint64((*m.GetValueUint32())) }, func() interface{} { - return uint64((utils.InlineIf(m.GetIsUint40(), func() interface{} { return uint64((*m.GetValueUint40())) }, func() interface{} { - return uint64((utils.InlineIf(m.GetIsUint48(), func() interface{} { return uint64((*m.GetValueUint48())) }, func() interface{} { - return uint64((utils.InlineIf(m.GetIsUint56(), func() interface{} { return uint64((*m.GetValueUint56())) }, func() interface{} { return uint64((*m.GetValueUint64())) }).(uint64))) - }).(uint64))) - }).(uint64))) - }).(uint64))) - }).(uint64))) - }).(uint64))) - }).(uint64)) + return uint64(utils.InlineIf(m.GetIsUint8(), func() interface{} {return uint64((*m.GetValueUint8()))}, func() interface{} {return uint64((utils.InlineIf(m.GetIsUint16(), func() interface{} {return uint64((*m.GetValueUint16()))}, func() interface{} {return uint64((utils.InlineIf(m.GetIsUint24(), func() interface{} {return uint64((*m.GetValueUint24()))}, func() interface{} {return uint64((utils.InlineIf(m.GetIsUint32(), func() interface{} {return uint64((*m.GetValueUint32()))}, func() interface{} {return uint64((utils.InlineIf(m.GetIsUint40(), func() interface{} {return uint64((*m.GetValueUint40()))}, func() interface{} {return uint64((utils.InlineIf(m.GetIsUint48(), func() interface{} {return uint64((*m.GetValueUint48()))}, func() interface{} {return uint64((utils.InlineIf(m.GetIsUint56(), func() interface{} {return uint64((*m.GetValueUint56()))}, func() interface{} {return uint64((*m.GetValueUint64()))}).(uint64)))}).(uint64)))}).(uint64)))}).(uint64)))}).(uint64)))}).(uint64)))}).(uint64)) } /////////////////////// @@ -350,14 +341,15 @@ func (m *_BACnetTagPayloadUnsignedInteger) GetActualValue() uint64 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetTagPayloadUnsignedInteger factory function for _BACnetTagPayloadUnsignedInteger -func NewBACnetTagPayloadUnsignedInteger(valueUint8 *uint8, valueUint16 *uint16, valueUint24 *uint32, valueUint32 *uint32, valueUint40 *uint64, valueUint48 *uint64, valueUint56 *uint64, valueUint64 *uint64, actualLength uint32) *_BACnetTagPayloadUnsignedInteger { - return &_BACnetTagPayloadUnsignedInteger{ValueUint8: valueUint8, ValueUint16: valueUint16, ValueUint24: valueUint24, ValueUint32: valueUint32, ValueUint40: valueUint40, ValueUint48: valueUint48, ValueUint56: valueUint56, ValueUint64: valueUint64, ActualLength: actualLength} +func NewBACnetTagPayloadUnsignedInteger( valueUint8 *uint8 , valueUint16 *uint16 , valueUint24 *uint32 , valueUint32 *uint32 , valueUint40 *uint64 , valueUint48 *uint64 , valueUint56 *uint64 , valueUint64 *uint64 , actualLength uint32 ) *_BACnetTagPayloadUnsignedInteger { +return &_BACnetTagPayloadUnsignedInteger{ ValueUint8: valueUint8 , ValueUint16: valueUint16 , ValueUint24: valueUint24 , ValueUint32: valueUint32 , ValueUint40: valueUint40 , ValueUint48: valueUint48 , ValueUint56: valueUint56 , ValueUint64: valueUint64 , ActualLength: actualLength } } // Deprecated: use the interface for direct cast func CastBACnetTagPayloadUnsignedInteger(structType interface{}) BACnetTagPayloadUnsignedInteger { - if casted, ok := structType.(BACnetTagPayloadUnsignedInteger); ok { + if casted, ok := structType.(BACnetTagPayloadUnsignedInteger); ok { return casted } if casted, ok := structType.(*BACnetTagPayloadUnsignedInteger); ok { @@ -434,6 +426,7 @@ func (m *_BACnetTagPayloadUnsignedInteger) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetTagPayloadUnsignedInteger) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -452,7 +445,7 @@ func BACnetTagPayloadUnsignedIntegerParseWithBuffer(ctx context.Context, readBuf _ = currentPos // Virtual field - _isUint8 := bool((actualLength) == (1)) + _isUint8 := bool((actualLength) == ((1))) isUint8 := bool(_isUint8) _ = isUint8 @@ -467,7 +460,7 @@ func BACnetTagPayloadUnsignedIntegerParseWithBuffer(ctx context.Context, readBuf } // Virtual field - _isUint16 := bool((actualLength) == (2)) + _isUint16 := bool((actualLength) == ((2))) isUint16 := bool(_isUint16) _ = isUint16 @@ -482,7 +475,7 @@ func BACnetTagPayloadUnsignedIntegerParseWithBuffer(ctx context.Context, readBuf } // Virtual field - _isUint24 := bool((actualLength) == (3)) + _isUint24 := bool((actualLength) == ((3))) isUint24 := bool(_isUint24) _ = isUint24 @@ -497,7 +490,7 @@ func BACnetTagPayloadUnsignedIntegerParseWithBuffer(ctx context.Context, readBuf } // Virtual field - _isUint32 := bool((actualLength) == (4)) + _isUint32 := bool((actualLength) == ((4))) isUint32 := bool(_isUint32) _ = isUint32 @@ -512,7 +505,7 @@ func BACnetTagPayloadUnsignedIntegerParseWithBuffer(ctx context.Context, readBuf } // Virtual field - _isUint40 := bool((actualLength) == (5)) + _isUint40 := bool((actualLength) == ((5))) isUint40 := bool(_isUint40) _ = isUint40 @@ -527,7 +520,7 @@ func BACnetTagPayloadUnsignedIntegerParseWithBuffer(ctx context.Context, readBuf } // Virtual field - _isUint48 := bool((actualLength) == (6)) + _isUint48 := bool((actualLength) == ((6))) isUint48 := bool(_isUint48) _ = isUint48 @@ -542,7 +535,7 @@ func BACnetTagPayloadUnsignedIntegerParseWithBuffer(ctx context.Context, readBuf } // Virtual field - _isUint56 := bool((actualLength) == (7)) + _isUint56 := bool((actualLength) == ((7))) isUint56 := bool(_isUint56) _ = isUint56 @@ -557,7 +550,7 @@ func BACnetTagPayloadUnsignedIntegerParseWithBuffer(ctx context.Context, readBuf } // Virtual field - _isUint64 := bool((actualLength) == (8)) + _isUint64 := bool((actualLength) == ((8))) isUint64 := bool(_isUint64) _ = isUint64 @@ -572,24 +565,12 @@ func BACnetTagPayloadUnsignedIntegerParseWithBuffer(ctx context.Context, readBuf } // Validation - if !(bool(bool(bool(bool(bool(bool(bool(isUint8) || bool(isUint16)) || bool(isUint24)) || bool(isUint32)) || bool(isUint40)) || bool(isUint48)) || bool(isUint56)) || bool(isUint64)) { + if (!(bool(bool(bool(bool(bool(bool(bool(isUint8) || bool(isUint16)) || bool(isUint24)) || bool(isUint32)) || bool(isUint40)) || bool(isUint48)) || bool(isUint56)) || bool(isUint64))) { return nil, errors.WithStack(utils.ParseValidationError{"unmapped integer length"}) } // Virtual field - _actualValue := utils.InlineIf(isUint8, func() interface{} { return uint64((*valueUint8)) }, func() interface{} { - return uint64((utils.InlineIf(isUint16, func() interface{} { return uint64((*valueUint16)) }, func() interface{} { - return uint64((utils.InlineIf(isUint24, func() interface{} { return uint64((*valueUint24)) }, func() interface{} { - return uint64((utils.InlineIf(isUint32, func() interface{} { return uint64((*valueUint32)) }, func() interface{} { - return uint64((utils.InlineIf(isUint40, func() interface{} { return uint64((*valueUint40)) }, func() interface{} { - return uint64((utils.InlineIf(isUint48, func() interface{} { return uint64((*valueUint48)) }, func() interface{} { - return uint64((utils.InlineIf(isUint56, func() interface{} { return uint64((*valueUint56)) }, func() interface{} { return uint64((*valueUint64)) }).(uint64))) - }).(uint64))) - }).(uint64))) - }).(uint64))) - }).(uint64))) - }).(uint64))) - }).(uint64) + _actualValue := utils.InlineIf(isUint8, func() interface{} {return uint64((*valueUint8))}, func() interface{} {return uint64((utils.InlineIf(isUint16, func() interface{} {return uint64((*valueUint16))}, func() interface{} {return uint64((utils.InlineIf(isUint24, func() interface{} {return uint64((*valueUint24))}, func() interface{} {return uint64((utils.InlineIf(isUint32, func() interface{} {return uint64((*valueUint32))}, func() interface{} {return uint64((utils.InlineIf(isUint40, func() interface{} {return uint64((*valueUint40))}, func() interface{} {return uint64((utils.InlineIf(isUint48, func() interface{} {return uint64((*valueUint48))}, func() interface{} {return uint64((utils.InlineIf(isUint56, func() interface{} {return uint64((*valueUint56))}, func() interface{} {return uint64((*valueUint64))}).(uint64)))}).(uint64)))}).(uint64)))}).(uint64)))}).(uint64)))}).(uint64)))}).(uint64) actualValue := uint64(_actualValue) _ = actualValue @@ -599,16 +580,16 @@ func BACnetTagPayloadUnsignedIntegerParseWithBuffer(ctx context.Context, readBuf // Create the instance return &_BACnetTagPayloadUnsignedInteger{ - ActualLength: actualLength, - ValueUint8: valueUint8, - ValueUint16: valueUint16, - ValueUint24: valueUint24, - ValueUint32: valueUint32, - ValueUint40: valueUint40, - ValueUint48: valueUint48, - ValueUint56: valueUint56, - ValueUint64: valueUint64, - }, nil + ActualLength: actualLength, + ValueUint8: valueUint8, + ValueUint16: valueUint16, + ValueUint24: valueUint24, + ValueUint32: valueUint32, + ValueUint40: valueUint40, + ValueUint48: valueUint48, + ValueUint56: valueUint56, + ValueUint64: valueUint64, + }, nil } func (m *_BACnetTagPayloadUnsignedInteger) Serialize() ([]byte, error) { @@ -622,7 +603,7 @@ func (m *_BACnetTagPayloadUnsignedInteger) Serialize() ([]byte, error) { func (m *_BACnetTagPayloadUnsignedInteger) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetTagPayloadUnsignedInteger"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetTagPayloadUnsignedInteger"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetTagPayloadUnsignedInteger") } // Virtual field @@ -748,13 +729,13 @@ func (m *_BACnetTagPayloadUnsignedInteger) SerializeWithWriteBuffer(ctx context. return nil } + //// // Arguments Getter func (m *_BACnetTagPayloadUnsignedInteger) GetActualLength() uint32 { return m.ActualLength } - // //// @@ -772,3 +753,6 @@ func (m *_BACnetTagPayloadUnsignedInteger) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimeStamp.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimeStamp.go index 0341899397f..7ede6f443e4 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimeStamp.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimeStamp.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetTimeStamp is the corresponding interface of BACnetTimeStamp type BACnetTimeStamp interface { @@ -47,7 +49,7 @@ type BACnetTimeStampExactly interface { // _BACnetTimeStamp is the data-structure of this message type _BACnetTimeStamp struct { _BACnetTimeStampChildRequirements - PeekedTagHeader BACnetTagHeader + PeekedTagHeader BACnetTagHeader } type _BACnetTimeStampChildRequirements interface { @@ -55,6 +57,7 @@ type _BACnetTimeStampChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type BACnetTimeStampParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetTimeStamp, serializeChildFunction func() error) error GetTypeName() string @@ -62,13 +65,12 @@ type BACnetTimeStampParent interface { type BACnetTimeStampChild interface { utils.Serializable - InitializeParent(parent BACnetTimeStamp, peekedTagHeader BACnetTagHeader) +InitializeParent(parent BACnetTimeStamp , peekedTagHeader BACnetTagHeader ) GetParent() *BACnetTimeStamp GetTypeName() string BACnetTimeStamp } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,14 +100,15 @@ func (m *_BACnetTimeStamp) GetPeekedTagNumber() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetTimeStamp factory function for _BACnetTimeStamp -func NewBACnetTimeStamp(peekedTagHeader BACnetTagHeader) *_BACnetTimeStamp { - return &_BACnetTimeStamp{PeekedTagHeader: peekedTagHeader} +func NewBACnetTimeStamp( peekedTagHeader BACnetTagHeader ) *_BACnetTimeStamp { +return &_BACnetTimeStamp{ PeekedTagHeader: peekedTagHeader } } // Deprecated: use the interface for direct cast func CastBACnetTimeStamp(structType interface{}) BACnetTimeStamp { - if casted, ok := structType.(BACnetTimeStamp); ok { + if casted, ok := structType.(BACnetTimeStamp); ok { return casted } if casted, ok := structType.(*BACnetTimeStamp); ok { @@ -118,6 +121,7 @@ func (m *_BACnetTimeStamp) GetTypeName() string { return "BACnetTimeStamp" } + func (m *_BACnetTimeStamp) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -143,13 +147,13 @@ func BACnetTimeStampParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu currentPos := positionAware.GetPos() _ = currentPos - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Virtual field _peekedTagNumber := peekedTagHeader.GetActualTagNumber() @@ -159,19 +163,19 @@ func BACnetTimeStampParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetTimeStampChildSerializeRequirement interface { BACnetTimeStamp - InitializeParent(BACnetTimeStamp, BACnetTagHeader) + InitializeParent(BACnetTimeStamp, BACnetTagHeader) GetParent() BACnetTimeStamp } var _childTemp interface{} var _child BACnetTimeStampChildSerializeRequirement var typeSwitchError error switch { - case peekedTagNumber == uint8(0): // BACnetTimeStampTime - _childTemp, typeSwitchError = BACnetTimeStampTimeParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(1): // BACnetTimeStampSequence - _childTemp, typeSwitchError = BACnetTimeStampSequenceParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(2): // BACnetTimeStampDateTime - _childTemp, typeSwitchError = BACnetTimeStampDateTimeParseWithBuffer(ctx, readBuffer) +case peekedTagNumber == uint8(0) : // BACnetTimeStampTime + _childTemp, typeSwitchError = BACnetTimeStampTimeParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(1) : // BACnetTimeStampSequence + _childTemp, typeSwitchError = BACnetTimeStampSequenceParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(2) : // BACnetTimeStampDateTime + _childTemp, typeSwitchError = BACnetTimeStampDateTimeParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedTagNumber=%v]", peekedTagNumber) } @@ -185,7 +189,7 @@ func BACnetTimeStampParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu } // Finish initializing - _child.InitializeParent(_child, peekedTagHeader) +_child.InitializeParent(_child , peekedTagHeader ) return _child, nil } @@ -195,7 +199,7 @@ func (pm *_BACnetTimeStamp) SerializeParent(ctx context.Context, writeBuffer uti _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetTimeStamp"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetTimeStamp"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetTimeStamp") } // Virtual field @@ -214,6 +218,7 @@ func (pm *_BACnetTimeStamp) SerializeParent(ctx context.Context, writeBuffer uti return nil } + func (m *_BACnetTimeStamp) isBACnetTimeStamp() bool { return true } @@ -228,3 +233,6 @@ func (m *_BACnetTimeStamp) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimeStampDateTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimeStampDateTime.go index b9598a3e96f..fd0538e2940 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimeStampDateTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimeStampDateTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetTimeStampDateTime is the corresponding interface of BACnetTimeStampDateTime type BACnetTimeStampDateTime interface { @@ -46,9 +48,11 @@ type BACnetTimeStampDateTimeExactly interface { // _BACnetTimeStampDateTime is the data-structure of this message type _BACnetTimeStampDateTime struct { *_BACnetTimeStamp - DateTimeValue BACnetDateTimeEnclosed + DateTimeValue BACnetDateTimeEnclosed } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetTimeStampDateTime struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetTimeStampDateTime) InitializeParent(parent BACnetTimeStamp, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetTimeStampDateTime) InitializeParent(parent BACnetTimeStamp , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetTimeStampDateTime) GetParent() BACnetTimeStamp { +func (m *_BACnetTimeStampDateTime) GetParent() BACnetTimeStamp { return m._BACnetTimeStamp } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetTimeStampDateTime) GetDateTimeValue() BACnetDateTimeEnclosed { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetTimeStampDateTime factory function for _BACnetTimeStampDateTime -func NewBACnetTimeStampDateTime(dateTimeValue BACnetDateTimeEnclosed, peekedTagHeader BACnetTagHeader) *_BACnetTimeStampDateTime { +func NewBACnetTimeStampDateTime( dateTimeValue BACnetDateTimeEnclosed , peekedTagHeader BACnetTagHeader ) *_BACnetTimeStampDateTime { _result := &_BACnetTimeStampDateTime{ - DateTimeValue: dateTimeValue, - _BACnetTimeStamp: NewBACnetTimeStamp(peekedTagHeader), + DateTimeValue: dateTimeValue, + _BACnetTimeStamp: NewBACnetTimeStamp(peekedTagHeader), } _result._BACnetTimeStamp._BACnetTimeStampChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetTimeStampDateTime(dateTimeValue BACnetDateTimeEnclosed, peekedTagH // Deprecated: use the interface for direct cast func CastBACnetTimeStampDateTime(structType interface{}) BACnetTimeStampDateTime { - if casted, ok := structType.(BACnetTimeStampDateTime); ok { + if casted, ok := structType.(BACnetTimeStampDateTime); ok { return casted } if casted, ok := structType.(*BACnetTimeStampDateTime); ok { @@ -115,6 +118,7 @@ func (m *_BACnetTimeStampDateTime) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetTimeStampDateTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetTimeStampDateTimeParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("dateTimeValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for dateTimeValue") } - _dateTimeValue, _dateTimeValueErr := BACnetDateTimeEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(2))) +_dateTimeValue, _dateTimeValueErr := BACnetDateTimeEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) ) if _dateTimeValueErr != nil { return nil, errors.Wrap(_dateTimeValueErr, "Error parsing 'dateTimeValue' field of BACnetTimeStampDateTime") } @@ -151,8 +155,9 @@ func BACnetTimeStampDateTimeParseWithBuffer(ctx context.Context, readBuffer util // Create a partially initialized instance _child := &_BACnetTimeStampDateTime{ - _BACnetTimeStamp: &_BACnetTimeStamp{}, - DateTimeValue: dateTimeValue, + _BACnetTimeStamp: &_BACnetTimeStamp{ + }, + DateTimeValue: dateTimeValue, } _child._BACnetTimeStamp._BACnetTimeStampChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetTimeStampDateTime) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for BACnetTimeStampDateTime") } - // Simple Field (dateTimeValue) - if pushErr := writeBuffer.PushContext("dateTimeValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for dateTimeValue") - } - _dateTimeValueErr := writeBuffer.WriteSerializable(ctx, m.GetDateTimeValue()) - if popErr := writeBuffer.PopContext("dateTimeValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for dateTimeValue") - } - if _dateTimeValueErr != nil { - return errors.Wrap(_dateTimeValueErr, "Error serializing 'dateTimeValue' field") - } + // Simple Field (dateTimeValue) + if pushErr := writeBuffer.PushContext("dateTimeValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for dateTimeValue") + } + _dateTimeValueErr := writeBuffer.WriteSerializable(ctx, m.GetDateTimeValue()) + if popErr := writeBuffer.PopContext("dateTimeValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for dateTimeValue") + } + if _dateTimeValueErr != nil { + return errors.Wrap(_dateTimeValueErr, "Error serializing 'dateTimeValue' field") + } if popErr := writeBuffer.PopContext("BACnetTimeStampDateTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetTimeStampDateTime") @@ -194,6 +199,7 @@ func (m *_BACnetTimeStampDateTime) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetTimeStampDateTime) isBACnetTimeStampDateTime() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetTimeStampDateTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimeStampEnclosed.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimeStampEnclosed.go index 2536fcc1a07..05b5785affc 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimeStampEnclosed.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimeStampEnclosed.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetTimeStampEnclosed is the corresponding interface of BACnetTimeStampEnclosed type BACnetTimeStampEnclosed interface { @@ -48,14 +50,15 @@ type BACnetTimeStampEnclosedExactly interface { // _BACnetTimeStampEnclosed is the data-structure of this message type _BACnetTimeStampEnclosed struct { - OpeningTag BACnetOpeningTag - Timestamp BACnetTimeStamp - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + Timestamp BACnetTimeStamp + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -78,14 +81,15 @@ func (m *_BACnetTimeStampEnclosed) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetTimeStampEnclosed factory function for _BACnetTimeStampEnclosed -func NewBACnetTimeStampEnclosed(openingTag BACnetOpeningTag, timestamp BACnetTimeStamp, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetTimeStampEnclosed { - return &_BACnetTimeStampEnclosed{OpeningTag: openingTag, Timestamp: timestamp, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetTimeStampEnclosed( openingTag BACnetOpeningTag , timestamp BACnetTimeStamp , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetTimeStampEnclosed { +return &_BACnetTimeStampEnclosed{ OpeningTag: openingTag , Timestamp: timestamp , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetTimeStampEnclosed(structType interface{}) BACnetTimeStampEnclosed { - if casted, ok := structType.(BACnetTimeStampEnclosed); ok { + if casted, ok := structType.(BACnetTimeStampEnclosed); ok { return casted } if casted, ok := structType.(*BACnetTimeStampEnclosed); ok { @@ -113,6 +117,7 @@ func (m *_BACnetTimeStampEnclosed) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetTimeStampEnclosed) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -134,7 +139,7 @@ func BACnetTimeStampEnclosedParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetTimeStampEnclosed") } @@ -147,7 +152,7 @@ func BACnetTimeStampEnclosedParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("timestamp"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timestamp") } - _timestamp, _timestampErr := BACnetTimeStampParseWithBuffer(ctx, readBuffer) +_timestamp, _timestampErr := BACnetTimeStampParseWithBuffer(ctx, readBuffer) if _timestampErr != nil { return nil, errors.Wrap(_timestampErr, "Error parsing 'timestamp' field of BACnetTimeStampEnclosed") } @@ -160,7 +165,7 @@ func BACnetTimeStampEnclosedParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetTimeStampEnclosed") } @@ -175,11 +180,11 @@ func BACnetTimeStampEnclosedParseWithBuffer(ctx context.Context, readBuffer util // Create the instance return &_BACnetTimeStampEnclosed{ - TagNumber: tagNumber, - OpeningTag: openingTag, - Timestamp: timestamp, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + Timestamp: timestamp, + ClosingTag: closingTag, + }, nil } func (m *_BACnetTimeStampEnclosed) Serialize() ([]byte, error) { @@ -193,7 +198,7 @@ func (m *_BACnetTimeStampEnclosed) Serialize() ([]byte, error) { func (m *_BACnetTimeStampEnclosed) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetTimeStampEnclosed"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetTimeStampEnclosed"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetTimeStampEnclosed") } @@ -239,13 +244,13 @@ func (m *_BACnetTimeStampEnclosed) SerializeWithWriteBuffer(ctx context.Context, return nil } + //// // Arguments Getter func (m *_BACnetTimeStampEnclosed) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -263,3 +268,6 @@ func (m *_BACnetTimeStampEnclosed) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimeStampSequence.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimeStampSequence.go index 75d889cc1a1..8ace7cb3866 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimeStampSequence.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimeStampSequence.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetTimeStampSequence is the corresponding interface of BACnetTimeStampSequence type BACnetTimeStampSequence interface { @@ -46,9 +48,11 @@ type BACnetTimeStampSequenceExactly interface { // _BACnetTimeStampSequence is the data-structure of this message type _BACnetTimeStampSequence struct { *_BACnetTimeStamp - SequenceNumber BACnetContextTagUnsignedInteger + SequenceNumber BACnetContextTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetTimeStampSequence struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetTimeStampSequence) InitializeParent(parent BACnetTimeStamp, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetTimeStampSequence) InitializeParent(parent BACnetTimeStamp , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetTimeStampSequence) GetParent() BACnetTimeStamp { +func (m *_BACnetTimeStampSequence) GetParent() BACnetTimeStamp { return m._BACnetTimeStamp } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetTimeStampSequence) GetSequenceNumber() BACnetContextTagUnsignedI /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetTimeStampSequence factory function for _BACnetTimeStampSequence -func NewBACnetTimeStampSequence(sequenceNumber BACnetContextTagUnsignedInteger, peekedTagHeader BACnetTagHeader) *_BACnetTimeStampSequence { +func NewBACnetTimeStampSequence( sequenceNumber BACnetContextTagUnsignedInteger , peekedTagHeader BACnetTagHeader ) *_BACnetTimeStampSequence { _result := &_BACnetTimeStampSequence{ - SequenceNumber: sequenceNumber, - _BACnetTimeStamp: NewBACnetTimeStamp(peekedTagHeader), + SequenceNumber: sequenceNumber, + _BACnetTimeStamp: NewBACnetTimeStamp(peekedTagHeader), } _result._BACnetTimeStamp._BACnetTimeStampChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetTimeStampSequence(sequenceNumber BACnetContextTagUnsignedInteger, // Deprecated: use the interface for direct cast func CastBACnetTimeStampSequence(structType interface{}) BACnetTimeStampSequence { - if casted, ok := structType.(BACnetTimeStampSequence); ok { + if casted, ok := structType.(BACnetTimeStampSequence); ok { return casted } if casted, ok := structType.(*BACnetTimeStampSequence); ok { @@ -115,6 +118,7 @@ func (m *_BACnetTimeStampSequence) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetTimeStampSequence) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetTimeStampSequenceParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("sequenceNumber"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for sequenceNumber") } - _sequenceNumber, _sequenceNumberErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_sequenceNumber, _sequenceNumberErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _sequenceNumberErr != nil { return nil, errors.Wrap(_sequenceNumberErr, "Error parsing 'sequenceNumber' field of BACnetTimeStampSequence") } @@ -151,8 +155,9 @@ func BACnetTimeStampSequenceParseWithBuffer(ctx context.Context, readBuffer util // Create a partially initialized instance _child := &_BACnetTimeStampSequence{ - _BACnetTimeStamp: &_BACnetTimeStamp{}, - SequenceNumber: sequenceNumber, + _BACnetTimeStamp: &_BACnetTimeStamp{ + }, + SequenceNumber: sequenceNumber, } _child._BACnetTimeStamp._BACnetTimeStampChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetTimeStampSequence) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for BACnetTimeStampSequence") } - // Simple Field (sequenceNumber) - if pushErr := writeBuffer.PushContext("sequenceNumber"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for sequenceNumber") - } - _sequenceNumberErr := writeBuffer.WriteSerializable(ctx, m.GetSequenceNumber()) - if popErr := writeBuffer.PopContext("sequenceNumber"); popErr != nil { - return errors.Wrap(popErr, "Error popping for sequenceNumber") - } - if _sequenceNumberErr != nil { - return errors.Wrap(_sequenceNumberErr, "Error serializing 'sequenceNumber' field") - } + // Simple Field (sequenceNumber) + if pushErr := writeBuffer.PushContext("sequenceNumber"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for sequenceNumber") + } + _sequenceNumberErr := writeBuffer.WriteSerializable(ctx, m.GetSequenceNumber()) + if popErr := writeBuffer.PopContext("sequenceNumber"); popErr != nil { + return errors.Wrap(popErr, "Error popping for sequenceNumber") + } + if _sequenceNumberErr != nil { + return errors.Wrap(_sequenceNumberErr, "Error serializing 'sequenceNumber' field") + } if popErr := writeBuffer.PopContext("BACnetTimeStampSequence"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetTimeStampSequence") @@ -194,6 +199,7 @@ func (m *_BACnetTimeStampSequence) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetTimeStampSequence) isBACnetTimeStampSequence() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetTimeStampSequence) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimeStampTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimeStampTime.go index 7bacf27a439..c4872934d07 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimeStampTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimeStampTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetTimeStampTime is the corresponding interface of BACnetTimeStampTime type BACnetTimeStampTime interface { @@ -46,9 +48,11 @@ type BACnetTimeStampTimeExactly interface { // _BACnetTimeStampTime is the data-structure of this message type _BACnetTimeStampTime struct { *_BACnetTimeStamp - TimeValue BACnetContextTagTime + TimeValue BACnetContextTagTime } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetTimeStampTime struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetTimeStampTime) InitializeParent(parent BACnetTimeStamp, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetTimeStampTime) InitializeParent(parent BACnetTimeStamp , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetTimeStampTime) GetParent() BACnetTimeStamp { +func (m *_BACnetTimeStampTime) GetParent() BACnetTimeStamp { return m._BACnetTimeStamp } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetTimeStampTime) GetTimeValue() BACnetContextTagTime { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetTimeStampTime factory function for _BACnetTimeStampTime -func NewBACnetTimeStampTime(timeValue BACnetContextTagTime, peekedTagHeader BACnetTagHeader) *_BACnetTimeStampTime { +func NewBACnetTimeStampTime( timeValue BACnetContextTagTime , peekedTagHeader BACnetTagHeader ) *_BACnetTimeStampTime { _result := &_BACnetTimeStampTime{ - TimeValue: timeValue, - _BACnetTimeStamp: NewBACnetTimeStamp(peekedTagHeader), + TimeValue: timeValue, + _BACnetTimeStamp: NewBACnetTimeStamp(peekedTagHeader), } _result._BACnetTimeStamp._BACnetTimeStampChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetTimeStampTime(timeValue BACnetContextTagTime, peekedTagHeader BACn // Deprecated: use the interface for direct cast func CastBACnetTimeStampTime(structType interface{}) BACnetTimeStampTime { - if casted, ok := structType.(BACnetTimeStampTime); ok { + if casted, ok := structType.(BACnetTimeStampTime); ok { return casted } if casted, ok := structType.(*BACnetTimeStampTime); ok { @@ -115,6 +118,7 @@ func (m *_BACnetTimeStampTime) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetTimeStampTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetTimeStampTimeParseWithBuffer(ctx context.Context, readBuffer utils.Re if pullErr := readBuffer.PullContext("timeValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeValue") } - _timeValue, _timeValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_TIME)) +_timeValue, _timeValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_TIME ) ) if _timeValueErr != nil { return nil, errors.Wrap(_timeValueErr, "Error parsing 'timeValue' field of BACnetTimeStampTime") } @@ -151,8 +155,9 @@ func BACnetTimeStampTimeParseWithBuffer(ctx context.Context, readBuffer utils.Re // Create a partially initialized instance _child := &_BACnetTimeStampTime{ - _BACnetTimeStamp: &_BACnetTimeStamp{}, - TimeValue: timeValue, + _BACnetTimeStamp: &_BACnetTimeStamp{ + }, + TimeValue: timeValue, } _child._BACnetTimeStamp._BACnetTimeStampChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetTimeStampTime) SerializeWithWriteBuffer(ctx context.Context, wri return errors.Wrap(pushErr, "Error pushing for BACnetTimeStampTime") } - // Simple Field (timeValue) - if pushErr := writeBuffer.PushContext("timeValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timeValue") - } - _timeValueErr := writeBuffer.WriteSerializable(ctx, m.GetTimeValue()) - if popErr := writeBuffer.PopContext("timeValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timeValue") - } - if _timeValueErr != nil { - return errors.Wrap(_timeValueErr, "Error serializing 'timeValue' field") - } + // Simple Field (timeValue) + if pushErr := writeBuffer.PushContext("timeValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timeValue") + } + _timeValueErr := writeBuffer.WriteSerializable(ctx, m.GetTimeValue()) + if popErr := writeBuffer.PopContext("timeValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timeValue") + } + if _timeValueErr != nil { + return errors.Wrap(_timeValueErr, "Error serializing 'timeValue' field") + } if popErr := writeBuffer.PopContext("BACnetTimeStampTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetTimeStampTime") @@ -194,6 +199,7 @@ func (m *_BACnetTimeStampTime) SerializeWithWriteBuffer(ctx context.Context, wri return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetTimeStampTime) isBACnetTimeStampTime() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetTimeStampTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimeStampsEnclosed.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimeStampsEnclosed.go index 02ca24fdb89..bc5f2961484 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimeStampsEnclosed.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimeStampsEnclosed.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetTimeStampsEnclosed is the corresponding interface of BACnetTimeStampsEnclosed type BACnetTimeStampsEnclosed interface { @@ -49,14 +51,15 @@ type BACnetTimeStampsEnclosedExactly interface { // _BACnetTimeStampsEnclosed is the data-structure of this message type _BACnetTimeStampsEnclosed struct { - OpeningTag BACnetOpeningTag - Timestamps []BACnetTimeStamp - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + Timestamps []BACnetTimeStamp + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -79,14 +82,15 @@ func (m *_BACnetTimeStampsEnclosed) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetTimeStampsEnclosed factory function for _BACnetTimeStampsEnclosed -func NewBACnetTimeStampsEnclosed(openingTag BACnetOpeningTag, timestamps []BACnetTimeStamp, closingTag BACnetClosingTag, tagNumber uint8) *_BACnetTimeStampsEnclosed { - return &_BACnetTimeStampsEnclosed{OpeningTag: openingTag, Timestamps: timestamps, ClosingTag: closingTag, TagNumber: tagNumber} +func NewBACnetTimeStampsEnclosed( openingTag BACnetOpeningTag , timestamps []BACnetTimeStamp , closingTag BACnetClosingTag , tagNumber uint8 ) *_BACnetTimeStampsEnclosed { +return &_BACnetTimeStampsEnclosed{ OpeningTag: openingTag , Timestamps: timestamps , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastBACnetTimeStampsEnclosed(structType interface{}) BACnetTimeStampsEnclosed { - if casted, ok := structType.(BACnetTimeStampsEnclosed); ok { + if casted, ok := structType.(BACnetTimeStampsEnclosed); ok { return casted } if casted, ok := structType.(*BACnetTimeStampsEnclosed); ok { @@ -118,6 +122,7 @@ func (m *_BACnetTimeStampsEnclosed) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_BACnetTimeStampsEnclosed) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +144,7 @@ func BACnetTimeStampsEnclosedParseWithBuffer(ctx context.Context, readBuffer uti if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetTimeStampsEnclosed") } @@ -155,8 +160,8 @@ func BACnetTimeStampsEnclosedParseWithBuffer(ctx context.Context, readBuffer uti // Terminated array var timestamps []BACnetTimeStamp { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := BACnetTimeStampParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := BACnetTimeStampParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'timestamps' field of BACnetTimeStampsEnclosed") } @@ -171,7 +176,7 @@ func BACnetTimeStampsEnclosedParseWithBuffer(ctx context.Context, readBuffer uti if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetTimeStampsEnclosed") } @@ -186,11 +191,11 @@ func BACnetTimeStampsEnclosedParseWithBuffer(ctx context.Context, readBuffer uti // Create the instance return &_BACnetTimeStampsEnclosed{ - TagNumber: tagNumber, - OpeningTag: openingTag, - Timestamps: timestamps, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + Timestamps: timestamps, + ClosingTag: closingTag, + }, nil } func (m *_BACnetTimeStampsEnclosed) Serialize() ([]byte, error) { @@ -204,7 +209,7 @@ func (m *_BACnetTimeStampsEnclosed) Serialize() ([]byte, error) { func (m *_BACnetTimeStampsEnclosed) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetTimeStampsEnclosed"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetTimeStampsEnclosed"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetTimeStampsEnclosed") } @@ -255,13 +260,13 @@ func (m *_BACnetTimeStampsEnclosed) SerializeWithWriteBuffer(ctx context.Context return nil } + //// // Arguments Getter func (m *_BACnetTimeStampsEnclosed) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -279,3 +284,6 @@ func (m *_BACnetTimeStampsEnclosed) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimeValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimeValue.go index fb3051397b5..efd68bec4f0 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimeValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimeValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetTimeValue is the corresponding interface of BACnetTimeValue type BACnetTimeValue interface { @@ -46,10 +48,11 @@ type BACnetTimeValueExactly interface { // _BACnetTimeValue is the data-structure of this message type _BACnetTimeValue struct { - TimeValue BACnetApplicationTagTime - Value BACnetConstructedDataElement + TimeValue BACnetApplicationTagTime + Value BACnetConstructedDataElement } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -68,14 +71,15 @@ func (m *_BACnetTimeValue) GetValue() BACnetConstructedDataElement { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetTimeValue factory function for _BACnetTimeValue -func NewBACnetTimeValue(timeValue BACnetApplicationTagTime, value BACnetConstructedDataElement) *_BACnetTimeValue { - return &_BACnetTimeValue{TimeValue: timeValue, Value: value} +func NewBACnetTimeValue( timeValue BACnetApplicationTagTime , value BACnetConstructedDataElement ) *_BACnetTimeValue { +return &_BACnetTimeValue{ TimeValue: timeValue , Value: value } } // Deprecated: use the interface for direct cast func CastBACnetTimeValue(structType interface{}) BACnetTimeValue { - if casted, ok := structType.(BACnetTimeValue); ok { + if casted, ok := structType.(BACnetTimeValue); ok { return casted } if casted, ok := structType.(*BACnetTimeValue); ok { @@ -100,6 +104,7 @@ func (m *_BACnetTimeValue) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetTimeValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -121,7 +126,7 @@ func BACnetTimeValueParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu if pullErr := readBuffer.PullContext("timeValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeValue") } - _timeValue, _timeValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_timeValue, _timeValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _timeValueErr != nil { return nil, errors.Wrap(_timeValueErr, "Error parsing 'timeValue' field of BACnetTimeValue") } @@ -134,7 +139,7 @@ func BACnetTimeValueParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu if pullErr := readBuffer.PullContext("value"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for value") } - _value, _valueErr := BACnetConstructedDataElementParseWithBuffer(ctx, readBuffer, BACnetObjectType(BACnetObjectType_VENDOR_PROPRIETARY_VALUE), BACnetPropertyIdentifier(BACnetPropertyIdentifier_VENDOR_PROPRIETARY_VALUE), nil) +_value, _valueErr := BACnetConstructedDataElementParseWithBuffer(ctx, readBuffer , BACnetObjectType( BACnetObjectType_VENDOR_PROPRIETARY_VALUE ) , BACnetPropertyIdentifier( BACnetPropertyIdentifier_VENDOR_PROPRIETARY_VALUE ) , nil ) if _valueErr != nil { return nil, errors.Wrap(_valueErr, "Error parsing 'value' field of BACnetTimeValue") } @@ -149,9 +154,9 @@ func BACnetTimeValueParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu // Create the instance return &_BACnetTimeValue{ - TimeValue: timeValue, - Value: value, - }, nil + TimeValue: timeValue, + Value: value, + }, nil } func (m *_BACnetTimeValue) Serialize() ([]byte, error) { @@ -165,7 +170,7 @@ func (m *_BACnetTimeValue) Serialize() ([]byte, error) { func (m *_BACnetTimeValue) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetTimeValue"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetTimeValue"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetTimeValue") } @@ -199,6 +204,7 @@ func (m *_BACnetTimeValue) SerializeWithWriteBuffer(ctx context.Context, writeBu return nil } + func (m *_BACnetTimeValue) isBACnetTimeValue() bool { return true } @@ -213,3 +219,6 @@ func (m *_BACnetTimeValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerState.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerState.go index b173aa739db..16251314c9e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerState.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerState.go @@ -34,8 +34,8 @@ type IBACnetTimerState interface { utils.Serializable } -const ( - BACnetTimerState_IDLE BACnetTimerState = 0 +const( + BACnetTimerState_IDLE BACnetTimerState = 0 BACnetTimerState_RUNNING BACnetTimerState = 1 BACnetTimerState_EXPIRED BACnetTimerState = 2 ) @@ -44,7 +44,7 @@ var BACnetTimerStateValues []BACnetTimerState func init() { _ = errors.New - BACnetTimerStateValues = []BACnetTimerState{ + BACnetTimerStateValues = []BACnetTimerState { BACnetTimerState_IDLE, BACnetTimerState_RUNNING, BACnetTimerState_EXPIRED, @@ -53,12 +53,12 @@ func init() { func BACnetTimerStateByValue(value uint8) (enum BACnetTimerState, ok bool) { switch value { - case 0: - return BACnetTimerState_IDLE, true - case 1: - return BACnetTimerState_RUNNING, true - case 2: - return BACnetTimerState_EXPIRED, true + case 0: + return BACnetTimerState_IDLE, true + case 1: + return BACnetTimerState_RUNNING, true + case 2: + return BACnetTimerState_EXPIRED, true } return 0, false } @@ -75,13 +75,13 @@ func BACnetTimerStateByName(value string) (enum BACnetTimerState, ok bool) { return 0, false } -func BACnetTimerStateKnows(value uint8) bool { +func BACnetTimerStateKnows(value uint8) bool { for _, typeValue := range BACnetTimerStateValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetTimerState(structType interface{}) BACnetTimerState { @@ -147,3 +147,4 @@ func (e BACnetTimerState) PLC4XEnumName() string { func (e BACnetTimerState) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValue.go index c969cabdca1..c864c727b76 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetTimerStateChangeValue is the corresponding interface of BACnetTimerStateChangeValue type BACnetTimerStateChangeValue interface { @@ -49,7 +51,7 @@ type BACnetTimerStateChangeValueExactly interface { // _BACnetTimerStateChangeValue is the data-structure of this message type _BACnetTimerStateChangeValue struct { _BACnetTimerStateChangeValueChildRequirements - PeekedTagHeader BACnetTagHeader + PeekedTagHeader BACnetTagHeader // Arguments. ObjectTypeArgument BACnetObjectType @@ -60,6 +62,7 @@ type _BACnetTimerStateChangeValueChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type BACnetTimerStateChangeValueParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetTimerStateChangeValue, serializeChildFunction func() error) error GetTypeName() string @@ -67,13 +70,12 @@ type BACnetTimerStateChangeValueParent interface { type BACnetTimerStateChangeValueChild interface { utils.Serializable - InitializeParent(parent BACnetTimerStateChangeValue, peekedTagHeader BACnetTagHeader) +InitializeParent(parent BACnetTimerStateChangeValue , peekedTagHeader BACnetTagHeader ) GetParent() *BACnetTimerStateChangeValue GetTypeName() string BACnetTimerStateChangeValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -109,14 +111,15 @@ func (m *_BACnetTimerStateChangeValue) GetPeekedIsContextTag() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetTimerStateChangeValue factory function for _BACnetTimerStateChangeValue -func NewBACnetTimerStateChangeValue(peekedTagHeader BACnetTagHeader, objectTypeArgument BACnetObjectType) *_BACnetTimerStateChangeValue { - return &_BACnetTimerStateChangeValue{PeekedTagHeader: peekedTagHeader, ObjectTypeArgument: objectTypeArgument} +func NewBACnetTimerStateChangeValue( peekedTagHeader BACnetTagHeader , objectTypeArgument BACnetObjectType ) *_BACnetTimerStateChangeValue { +return &_BACnetTimerStateChangeValue{ PeekedTagHeader: peekedTagHeader , ObjectTypeArgument: objectTypeArgument } } // Deprecated: use the interface for direct cast func CastBACnetTimerStateChangeValue(structType interface{}) BACnetTimerStateChangeValue { - if casted, ok := structType.(BACnetTimerStateChangeValue); ok { + if casted, ok := structType.(BACnetTimerStateChangeValue); ok { return casted } if casted, ok := structType.(*BACnetTimerStateChangeValue); ok { @@ -129,6 +132,7 @@ func (m *_BACnetTimerStateChangeValue) GetTypeName() string { return "BACnetTimerStateChangeValue" } + func (m *_BACnetTimerStateChangeValue) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -156,13 +160,13 @@ func BACnetTimerStateChangeValueParseWithBuffer(ctx context.Context, readBuffer currentPos := positionAware.GetPos() _ = currentPos - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Virtual field _peekedTagNumber := peekedTagHeader.GetActualTagNumber() @@ -175,53 +179,53 @@ func BACnetTimerStateChangeValueParseWithBuffer(ctx context.Context, readBuffer _ = peekedIsContextTag // Validation - if !(bool((!(peekedIsContextTag))) || bool((bool(bool(peekedIsContextTag) && bool(bool((peekedTagHeader.GetLengthValueType()) != (0x6)))) && bool(bool((peekedTagHeader.GetLengthValueType()) != (0x7)))))) { + if (!(bool((!(peekedIsContextTag))) || bool((bool(bool(peekedIsContextTag) && bool(bool((peekedTagHeader.GetLengthValueType()) != (0x6)))) && bool(bool((peekedTagHeader.GetLengthValueType()) != (0x7))))))) { return nil, errors.WithStack(utils.ParseValidationError{"unexpected opening or closing tag"}) } // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetTimerStateChangeValueChildSerializeRequirement interface { BACnetTimerStateChangeValue - InitializeParent(BACnetTimerStateChangeValue, BACnetTagHeader) + InitializeParent(BACnetTimerStateChangeValue, BACnetTagHeader) GetParent() BACnetTimerStateChangeValue } var _childTemp interface{} var _child BACnetTimerStateChangeValueChildSerializeRequirement var typeSwitchError error switch { - case peekedTagNumber == 0x0 && peekedIsContextTag == bool(false): // BACnetTimerStateChangeValueNull +case peekedTagNumber == 0x0 && peekedIsContextTag == bool(false) : // BACnetTimerStateChangeValueNull _childTemp, typeSwitchError = BACnetTimerStateChangeValueNullParseWithBuffer(ctx, readBuffer, objectTypeArgument) - case peekedTagNumber == 0x1 && peekedIsContextTag == bool(false): // BACnetTimerStateChangeValueBoolean +case peekedTagNumber == 0x1 && peekedIsContextTag == bool(false) : // BACnetTimerStateChangeValueBoolean _childTemp, typeSwitchError = BACnetTimerStateChangeValueBooleanParseWithBuffer(ctx, readBuffer, objectTypeArgument) - case peekedTagNumber == 0x2 && peekedIsContextTag == bool(false): // BACnetTimerStateChangeValueUnsigned +case peekedTagNumber == 0x2 && peekedIsContextTag == bool(false) : // BACnetTimerStateChangeValueUnsigned _childTemp, typeSwitchError = BACnetTimerStateChangeValueUnsignedParseWithBuffer(ctx, readBuffer, objectTypeArgument) - case peekedTagNumber == 0x3 && peekedIsContextTag == bool(false): // BACnetTimerStateChangeValueInteger +case peekedTagNumber == 0x3 && peekedIsContextTag == bool(false) : // BACnetTimerStateChangeValueInteger _childTemp, typeSwitchError = BACnetTimerStateChangeValueIntegerParseWithBuffer(ctx, readBuffer, objectTypeArgument) - case peekedTagNumber == 0x4 && peekedIsContextTag == bool(false): // BACnetTimerStateChangeValueReal +case peekedTagNumber == 0x4 && peekedIsContextTag == bool(false) : // BACnetTimerStateChangeValueReal _childTemp, typeSwitchError = BACnetTimerStateChangeValueRealParseWithBuffer(ctx, readBuffer, objectTypeArgument) - case peekedTagNumber == 0x5 && peekedIsContextTag == bool(false): // BACnetTimerStateChangeValueDouble +case peekedTagNumber == 0x5 && peekedIsContextTag == bool(false) : // BACnetTimerStateChangeValueDouble _childTemp, typeSwitchError = BACnetTimerStateChangeValueDoubleParseWithBuffer(ctx, readBuffer, objectTypeArgument) - case peekedTagNumber == 0x6 && peekedIsContextTag == bool(false): // BACnetTimerStateChangeValueOctetString +case peekedTagNumber == 0x6 && peekedIsContextTag == bool(false) : // BACnetTimerStateChangeValueOctetString _childTemp, typeSwitchError = BACnetTimerStateChangeValueOctetStringParseWithBuffer(ctx, readBuffer, objectTypeArgument) - case peekedTagNumber == 0x7 && peekedIsContextTag == bool(false): // BACnetTimerStateChangeValueCharacterString +case peekedTagNumber == 0x7 && peekedIsContextTag == bool(false) : // BACnetTimerStateChangeValueCharacterString _childTemp, typeSwitchError = BACnetTimerStateChangeValueCharacterStringParseWithBuffer(ctx, readBuffer, objectTypeArgument) - case peekedTagNumber == 0x8 && peekedIsContextTag == bool(false): // BACnetTimerStateChangeValueBitString +case peekedTagNumber == 0x8 && peekedIsContextTag == bool(false) : // BACnetTimerStateChangeValueBitString _childTemp, typeSwitchError = BACnetTimerStateChangeValueBitStringParseWithBuffer(ctx, readBuffer, objectTypeArgument) - case peekedTagNumber == 0x9 && peekedIsContextTag == bool(false): // BACnetTimerStateChangeValueEnumerated +case peekedTagNumber == 0x9 && peekedIsContextTag == bool(false) : // BACnetTimerStateChangeValueEnumerated _childTemp, typeSwitchError = BACnetTimerStateChangeValueEnumeratedParseWithBuffer(ctx, readBuffer, objectTypeArgument) - case peekedTagNumber == 0xA && peekedIsContextTag == bool(false): // BACnetTimerStateChangeValueDate +case peekedTagNumber == 0xA && peekedIsContextTag == bool(false) : // BACnetTimerStateChangeValueDate _childTemp, typeSwitchError = BACnetTimerStateChangeValueDateParseWithBuffer(ctx, readBuffer, objectTypeArgument) - case peekedTagNumber == 0xB && peekedIsContextTag == bool(false): // BACnetTimerStateChangeValueTime +case peekedTagNumber == 0xB && peekedIsContextTag == bool(false) : // BACnetTimerStateChangeValueTime _childTemp, typeSwitchError = BACnetTimerStateChangeValueTimeParseWithBuffer(ctx, readBuffer, objectTypeArgument) - case peekedTagNumber == 0xC && peekedIsContextTag == bool(false): // BACnetTimerStateChangeValueObjectidentifier +case peekedTagNumber == 0xC && peekedIsContextTag == bool(false) : // BACnetTimerStateChangeValueObjectidentifier _childTemp, typeSwitchError = BACnetTimerStateChangeValueObjectidentifierParseWithBuffer(ctx, readBuffer, objectTypeArgument) - case peekedTagNumber == uint8(0) && peekedIsContextTag == bool(true): // BACnetTimerStateChangeValueNoValue +case peekedTagNumber == uint8(0) && peekedIsContextTag == bool(true) : // BACnetTimerStateChangeValueNoValue _childTemp, typeSwitchError = BACnetTimerStateChangeValueNoValueParseWithBuffer(ctx, readBuffer, objectTypeArgument) - case peekedTagNumber == uint8(1) && peekedIsContextTag == bool(true): // BACnetTimerStateChangeValueConstructedValue +case peekedTagNumber == uint8(1) && peekedIsContextTag == bool(true) : // BACnetTimerStateChangeValueConstructedValue _childTemp, typeSwitchError = BACnetTimerStateChangeValueConstructedValueParseWithBuffer(ctx, readBuffer, objectTypeArgument) - case peekedTagNumber == uint8(2) && peekedIsContextTag == bool(true): // BACnetTimerStateChangeValueDateTime +case peekedTagNumber == uint8(2) && peekedIsContextTag == bool(true) : // BACnetTimerStateChangeValueDateTime _childTemp, typeSwitchError = BACnetTimerStateChangeValueDateTimeParseWithBuffer(ctx, readBuffer, objectTypeArgument) - case peekedTagNumber == uint8(3) && peekedIsContextTag == bool(true): // BACnetTimerStateChangeValueLightingCommand +case peekedTagNumber == uint8(3) && peekedIsContextTag == bool(true) : // BACnetTimerStateChangeValueLightingCommand _childTemp, typeSwitchError = BACnetTimerStateChangeValueLightingCommandParseWithBuffer(ctx, readBuffer, objectTypeArgument) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedTagNumber=%v, peekedIsContextTag=%v]", peekedTagNumber, peekedIsContextTag) @@ -236,7 +240,7 @@ func BACnetTimerStateChangeValueParseWithBuffer(ctx context.Context, readBuffer } // Finish initializing - _child.InitializeParent(_child, peekedTagHeader) +_child.InitializeParent(_child , peekedTagHeader ) return _child, nil } @@ -246,7 +250,7 @@ func (pm *_BACnetTimerStateChangeValue) SerializeParent(ctx context.Context, wri _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetTimerStateChangeValue"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetTimerStateChangeValue"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetTimerStateChangeValue") } // Virtual field @@ -269,13 +273,13 @@ func (pm *_BACnetTimerStateChangeValue) SerializeParent(ctx context.Context, wri return nil } + //// // Arguments Getter func (m *_BACnetTimerStateChangeValue) GetObjectTypeArgument() BACnetObjectType { return m.ObjectTypeArgument } - // //// @@ -293,3 +297,6 @@ func (m *_BACnetTimerStateChangeValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueBitString.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueBitString.go index 8efefe1b396..d17d9de49ed 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueBitString.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueBitString.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetTimerStateChangeValueBitString is the corresponding interface of BACnetTimerStateChangeValueBitString type BACnetTimerStateChangeValueBitString interface { @@ -46,9 +48,11 @@ type BACnetTimerStateChangeValueBitStringExactly interface { // _BACnetTimerStateChangeValueBitString is the data-structure of this message type _BACnetTimerStateChangeValueBitString struct { *_BACnetTimerStateChangeValue - BitStringValue BACnetApplicationTagBitString + BitStringValue BACnetApplicationTagBitString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetTimerStateChangeValueBitString struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetTimerStateChangeValueBitString) InitializeParent(parent BACnetTimerStateChangeValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetTimerStateChangeValueBitString) InitializeParent(parent BACnetTimerStateChangeValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetTimerStateChangeValueBitString) GetParent() BACnetTimerStateChangeValue { +func (m *_BACnetTimerStateChangeValueBitString) GetParent() BACnetTimerStateChangeValue { return m._BACnetTimerStateChangeValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetTimerStateChangeValueBitString) GetBitStringValue() BACnetApplic /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetTimerStateChangeValueBitString factory function for _BACnetTimerStateChangeValueBitString -func NewBACnetTimerStateChangeValueBitString(bitStringValue BACnetApplicationTagBitString, peekedTagHeader BACnetTagHeader, objectTypeArgument BACnetObjectType) *_BACnetTimerStateChangeValueBitString { +func NewBACnetTimerStateChangeValueBitString( bitStringValue BACnetApplicationTagBitString , peekedTagHeader BACnetTagHeader , objectTypeArgument BACnetObjectType ) *_BACnetTimerStateChangeValueBitString { _result := &_BACnetTimerStateChangeValueBitString{ - BitStringValue: bitStringValue, - _BACnetTimerStateChangeValue: NewBACnetTimerStateChangeValue(peekedTagHeader, objectTypeArgument), + BitStringValue: bitStringValue, + _BACnetTimerStateChangeValue: NewBACnetTimerStateChangeValue(peekedTagHeader, objectTypeArgument), } _result._BACnetTimerStateChangeValue._BACnetTimerStateChangeValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetTimerStateChangeValueBitString(bitStringValue BACnetApplicationTag // Deprecated: use the interface for direct cast func CastBACnetTimerStateChangeValueBitString(structType interface{}) BACnetTimerStateChangeValueBitString { - if casted, ok := structType.(BACnetTimerStateChangeValueBitString); ok { + if casted, ok := structType.(BACnetTimerStateChangeValueBitString); ok { return casted } if casted, ok := structType.(*BACnetTimerStateChangeValueBitString); ok { @@ -115,6 +118,7 @@ func (m *_BACnetTimerStateChangeValueBitString) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetTimerStateChangeValueBitString) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetTimerStateChangeValueBitStringParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("bitStringValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for bitStringValue") } - _bitStringValue, _bitStringValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_bitStringValue, _bitStringValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _bitStringValueErr != nil { return nil, errors.Wrap(_bitStringValueErr, "Error parsing 'bitStringValue' field of BACnetTimerStateChangeValueBitString") } @@ -176,17 +180,17 @@ func (m *_BACnetTimerStateChangeValueBitString) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetTimerStateChangeValueBitString") } - // Simple Field (bitStringValue) - if pushErr := writeBuffer.PushContext("bitStringValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for bitStringValue") - } - _bitStringValueErr := writeBuffer.WriteSerializable(ctx, m.GetBitStringValue()) - if popErr := writeBuffer.PopContext("bitStringValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for bitStringValue") - } - if _bitStringValueErr != nil { - return errors.Wrap(_bitStringValueErr, "Error serializing 'bitStringValue' field") - } + // Simple Field (bitStringValue) + if pushErr := writeBuffer.PushContext("bitStringValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for bitStringValue") + } + _bitStringValueErr := writeBuffer.WriteSerializable(ctx, m.GetBitStringValue()) + if popErr := writeBuffer.PopContext("bitStringValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for bitStringValue") + } + if _bitStringValueErr != nil { + return errors.Wrap(_bitStringValueErr, "Error serializing 'bitStringValue' field") + } if popErr := writeBuffer.PopContext("BACnetTimerStateChangeValueBitString"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetTimerStateChangeValueBitString") @@ -196,6 +200,7 @@ func (m *_BACnetTimerStateChangeValueBitString) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetTimerStateChangeValueBitString) isBACnetTimerStateChangeValueBitString() bool { return true } @@ -210,3 +215,6 @@ func (m *_BACnetTimerStateChangeValueBitString) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueBoolean.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueBoolean.go index 97da89d998b..5ec1a9a9fe1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueBoolean.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueBoolean.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetTimerStateChangeValueBoolean is the corresponding interface of BACnetTimerStateChangeValueBoolean type BACnetTimerStateChangeValueBoolean interface { @@ -46,9 +48,11 @@ type BACnetTimerStateChangeValueBooleanExactly interface { // _BACnetTimerStateChangeValueBoolean is the data-structure of this message type _BACnetTimerStateChangeValueBoolean struct { *_BACnetTimerStateChangeValue - BooleanValue BACnetApplicationTagBoolean + BooleanValue BACnetApplicationTagBoolean } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetTimerStateChangeValueBoolean struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetTimerStateChangeValueBoolean) InitializeParent(parent BACnetTimerStateChangeValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetTimerStateChangeValueBoolean) InitializeParent(parent BACnetTimerStateChangeValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetTimerStateChangeValueBoolean) GetParent() BACnetTimerStateChangeValue { +func (m *_BACnetTimerStateChangeValueBoolean) GetParent() BACnetTimerStateChangeValue { return m._BACnetTimerStateChangeValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetTimerStateChangeValueBoolean) GetBooleanValue() BACnetApplicatio /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetTimerStateChangeValueBoolean factory function for _BACnetTimerStateChangeValueBoolean -func NewBACnetTimerStateChangeValueBoolean(booleanValue BACnetApplicationTagBoolean, peekedTagHeader BACnetTagHeader, objectTypeArgument BACnetObjectType) *_BACnetTimerStateChangeValueBoolean { +func NewBACnetTimerStateChangeValueBoolean( booleanValue BACnetApplicationTagBoolean , peekedTagHeader BACnetTagHeader , objectTypeArgument BACnetObjectType ) *_BACnetTimerStateChangeValueBoolean { _result := &_BACnetTimerStateChangeValueBoolean{ - BooleanValue: booleanValue, - _BACnetTimerStateChangeValue: NewBACnetTimerStateChangeValue(peekedTagHeader, objectTypeArgument), + BooleanValue: booleanValue, + _BACnetTimerStateChangeValue: NewBACnetTimerStateChangeValue(peekedTagHeader, objectTypeArgument), } _result._BACnetTimerStateChangeValue._BACnetTimerStateChangeValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetTimerStateChangeValueBoolean(booleanValue BACnetApplicationTagBool // Deprecated: use the interface for direct cast func CastBACnetTimerStateChangeValueBoolean(structType interface{}) BACnetTimerStateChangeValueBoolean { - if casted, ok := structType.(BACnetTimerStateChangeValueBoolean); ok { + if casted, ok := structType.(BACnetTimerStateChangeValueBoolean); ok { return casted } if casted, ok := structType.(*BACnetTimerStateChangeValueBoolean); ok { @@ -115,6 +118,7 @@ func (m *_BACnetTimerStateChangeValueBoolean) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetTimerStateChangeValueBoolean) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetTimerStateChangeValueBooleanParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("booleanValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for booleanValue") } - _booleanValue, _booleanValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_booleanValue, _booleanValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _booleanValueErr != nil { return nil, errors.Wrap(_booleanValueErr, "Error parsing 'booleanValue' field of BACnetTimerStateChangeValueBoolean") } @@ -176,17 +180,17 @@ func (m *_BACnetTimerStateChangeValueBoolean) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetTimerStateChangeValueBoolean") } - // Simple Field (booleanValue) - if pushErr := writeBuffer.PushContext("booleanValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for booleanValue") - } - _booleanValueErr := writeBuffer.WriteSerializable(ctx, m.GetBooleanValue()) - if popErr := writeBuffer.PopContext("booleanValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for booleanValue") - } - if _booleanValueErr != nil { - return errors.Wrap(_booleanValueErr, "Error serializing 'booleanValue' field") - } + // Simple Field (booleanValue) + if pushErr := writeBuffer.PushContext("booleanValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for booleanValue") + } + _booleanValueErr := writeBuffer.WriteSerializable(ctx, m.GetBooleanValue()) + if popErr := writeBuffer.PopContext("booleanValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for booleanValue") + } + if _booleanValueErr != nil { + return errors.Wrap(_booleanValueErr, "Error serializing 'booleanValue' field") + } if popErr := writeBuffer.PopContext("BACnetTimerStateChangeValueBoolean"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetTimerStateChangeValueBoolean") @@ -196,6 +200,7 @@ func (m *_BACnetTimerStateChangeValueBoolean) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetTimerStateChangeValueBoolean) isBACnetTimerStateChangeValueBoolean() bool { return true } @@ -210,3 +215,6 @@ func (m *_BACnetTimerStateChangeValueBoolean) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueCharacterString.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueCharacterString.go index 838bdb789de..737b0f4e6c2 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueCharacterString.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueCharacterString.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetTimerStateChangeValueCharacterString is the corresponding interface of BACnetTimerStateChangeValueCharacterString type BACnetTimerStateChangeValueCharacterString interface { @@ -46,9 +48,11 @@ type BACnetTimerStateChangeValueCharacterStringExactly interface { // _BACnetTimerStateChangeValueCharacterString is the data-structure of this message type _BACnetTimerStateChangeValueCharacterString struct { *_BACnetTimerStateChangeValue - CharacterStringValue BACnetApplicationTagCharacterString + CharacterStringValue BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetTimerStateChangeValueCharacterString struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetTimerStateChangeValueCharacterString) InitializeParent(parent BACnetTimerStateChangeValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetTimerStateChangeValueCharacterString) InitializeParent(parent BACnetTimerStateChangeValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetTimerStateChangeValueCharacterString) GetParent() BACnetTimerStateChangeValue { +func (m *_BACnetTimerStateChangeValueCharacterString) GetParent() BACnetTimerStateChangeValue { return m._BACnetTimerStateChangeValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetTimerStateChangeValueCharacterString) GetCharacterStringValue() /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetTimerStateChangeValueCharacterString factory function for _BACnetTimerStateChangeValueCharacterString -func NewBACnetTimerStateChangeValueCharacterString(characterStringValue BACnetApplicationTagCharacterString, peekedTagHeader BACnetTagHeader, objectTypeArgument BACnetObjectType) *_BACnetTimerStateChangeValueCharacterString { +func NewBACnetTimerStateChangeValueCharacterString( characterStringValue BACnetApplicationTagCharacterString , peekedTagHeader BACnetTagHeader , objectTypeArgument BACnetObjectType ) *_BACnetTimerStateChangeValueCharacterString { _result := &_BACnetTimerStateChangeValueCharacterString{ - CharacterStringValue: characterStringValue, - _BACnetTimerStateChangeValue: NewBACnetTimerStateChangeValue(peekedTagHeader, objectTypeArgument), + CharacterStringValue: characterStringValue, + _BACnetTimerStateChangeValue: NewBACnetTimerStateChangeValue(peekedTagHeader, objectTypeArgument), } _result._BACnetTimerStateChangeValue._BACnetTimerStateChangeValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetTimerStateChangeValueCharacterString(characterStringValue BACnetAp // Deprecated: use the interface for direct cast func CastBACnetTimerStateChangeValueCharacterString(structType interface{}) BACnetTimerStateChangeValueCharacterString { - if casted, ok := structType.(BACnetTimerStateChangeValueCharacterString); ok { + if casted, ok := structType.(BACnetTimerStateChangeValueCharacterString); ok { return casted } if casted, ok := structType.(*BACnetTimerStateChangeValueCharacterString); ok { @@ -115,6 +118,7 @@ func (m *_BACnetTimerStateChangeValueCharacterString) GetLengthInBits(ctx contex return lengthInBits } + func (m *_BACnetTimerStateChangeValueCharacterString) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetTimerStateChangeValueCharacterStringParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("characterStringValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for characterStringValue") } - _characterStringValue, _characterStringValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_characterStringValue, _characterStringValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _characterStringValueErr != nil { return nil, errors.Wrap(_characterStringValueErr, "Error parsing 'characterStringValue' field of BACnetTimerStateChangeValueCharacterString") } @@ -176,17 +180,17 @@ func (m *_BACnetTimerStateChangeValueCharacterString) SerializeWithWriteBuffer(c return errors.Wrap(pushErr, "Error pushing for BACnetTimerStateChangeValueCharacterString") } - // Simple Field (characterStringValue) - if pushErr := writeBuffer.PushContext("characterStringValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for characterStringValue") - } - _characterStringValueErr := writeBuffer.WriteSerializable(ctx, m.GetCharacterStringValue()) - if popErr := writeBuffer.PopContext("characterStringValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for characterStringValue") - } - if _characterStringValueErr != nil { - return errors.Wrap(_characterStringValueErr, "Error serializing 'characterStringValue' field") - } + // Simple Field (characterStringValue) + if pushErr := writeBuffer.PushContext("characterStringValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for characterStringValue") + } + _characterStringValueErr := writeBuffer.WriteSerializable(ctx, m.GetCharacterStringValue()) + if popErr := writeBuffer.PopContext("characterStringValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for characterStringValue") + } + if _characterStringValueErr != nil { + return errors.Wrap(_characterStringValueErr, "Error serializing 'characterStringValue' field") + } if popErr := writeBuffer.PopContext("BACnetTimerStateChangeValueCharacterString"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetTimerStateChangeValueCharacterString") @@ -196,6 +200,7 @@ func (m *_BACnetTimerStateChangeValueCharacterString) SerializeWithWriteBuffer(c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetTimerStateChangeValueCharacterString) isBACnetTimerStateChangeValueCharacterString() bool { return true } @@ -210,3 +215,6 @@ func (m *_BACnetTimerStateChangeValueCharacterString) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueConstructedValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueConstructedValue.go index c999ec04044..ee815301e04 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueConstructedValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueConstructedValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetTimerStateChangeValueConstructedValue is the corresponding interface of BACnetTimerStateChangeValueConstructedValue type BACnetTimerStateChangeValueConstructedValue interface { @@ -46,9 +48,11 @@ type BACnetTimerStateChangeValueConstructedValueExactly interface { // _BACnetTimerStateChangeValueConstructedValue is the data-structure of this message type _BACnetTimerStateChangeValueConstructedValue struct { *_BACnetTimerStateChangeValue - ConstructedValue BACnetConstructedData + ConstructedValue BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetTimerStateChangeValueConstructedValue struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetTimerStateChangeValueConstructedValue) InitializeParent(parent BACnetTimerStateChangeValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetTimerStateChangeValueConstructedValue) InitializeParent(parent BACnetTimerStateChangeValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetTimerStateChangeValueConstructedValue) GetParent() BACnetTimerStateChangeValue { +func (m *_BACnetTimerStateChangeValueConstructedValue) GetParent() BACnetTimerStateChangeValue { return m._BACnetTimerStateChangeValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetTimerStateChangeValueConstructedValue) GetConstructedValue() BAC /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetTimerStateChangeValueConstructedValue factory function for _BACnetTimerStateChangeValueConstructedValue -func NewBACnetTimerStateChangeValueConstructedValue(constructedValue BACnetConstructedData, peekedTagHeader BACnetTagHeader, objectTypeArgument BACnetObjectType) *_BACnetTimerStateChangeValueConstructedValue { +func NewBACnetTimerStateChangeValueConstructedValue( constructedValue BACnetConstructedData , peekedTagHeader BACnetTagHeader , objectTypeArgument BACnetObjectType ) *_BACnetTimerStateChangeValueConstructedValue { _result := &_BACnetTimerStateChangeValueConstructedValue{ - ConstructedValue: constructedValue, - _BACnetTimerStateChangeValue: NewBACnetTimerStateChangeValue(peekedTagHeader, objectTypeArgument), + ConstructedValue: constructedValue, + _BACnetTimerStateChangeValue: NewBACnetTimerStateChangeValue(peekedTagHeader, objectTypeArgument), } _result._BACnetTimerStateChangeValue._BACnetTimerStateChangeValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetTimerStateChangeValueConstructedValue(constructedValue BACnetConst // Deprecated: use the interface for direct cast func CastBACnetTimerStateChangeValueConstructedValue(structType interface{}) BACnetTimerStateChangeValueConstructedValue { - if casted, ok := structType.(BACnetTimerStateChangeValueConstructedValue); ok { + if casted, ok := structType.(BACnetTimerStateChangeValueConstructedValue); ok { return casted } if casted, ok := structType.(*BACnetTimerStateChangeValueConstructedValue); ok { @@ -115,6 +118,7 @@ func (m *_BACnetTimerStateChangeValueConstructedValue) GetLengthInBits(ctx conte return lengthInBits } + func (m *_BACnetTimerStateChangeValueConstructedValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetTimerStateChangeValueConstructedValueParseWithBuffer(ctx context.Cont if pullErr := readBuffer.PullContext("constructedValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for constructedValue") } - _constructedValue, _constructedValueErr := BACnetConstructedDataParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetObjectType(objectTypeArgument), BACnetPropertyIdentifier(BACnetPropertyIdentifier_VENDOR_PROPRIETARY_VALUE), nil) +_constructedValue, _constructedValueErr := BACnetConstructedDataParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetObjectType( objectTypeArgument ) , BACnetPropertyIdentifier( BACnetPropertyIdentifier_VENDOR_PROPRIETARY_VALUE ) , nil ) if _constructedValueErr != nil { return nil, errors.Wrap(_constructedValueErr, "Error parsing 'constructedValue' field of BACnetTimerStateChangeValueConstructedValue") } @@ -176,17 +180,17 @@ func (m *_BACnetTimerStateChangeValueConstructedValue) SerializeWithWriteBuffer( return errors.Wrap(pushErr, "Error pushing for BACnetTimerStateChangeValueConstructedValue") } - // Simple Field (constructedValue) - if pushErr := writeBuffer.PushContext("constructedValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for constructedValue") - } - _constructedValueErr := writeBuffer.WriteSerializable(ctx, m.GetConstructedValue()) - if popErr := writeBuffer.PopContext("constructedValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for constructedValue") - } - if _constructedValueErr != nil { - return errors.Wrap(_constructedValueErr, "Error serializing 'constructedValue' field") - } + // Simple Field (constructedValue) + if pushErr := writeBuffer.PushContext("constructedValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for constructedValue") + } + _constructedValueErr := writeBuffer.WriteSerializable(ctx, m.GetConstructedValue()) + if popErr := writeBuffer.PopContext("constructedValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for constructedValue") + } + if _constructedValueErr != nil { + return errors.Wrap(_constructedValueErr, "Error serializing 'constructedValue' field") + } if popErr := writeBuffer.PopContext("BACnetTimerStateChangeValueConstructedValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetTimerStateChangeValueConstructedValue") @@ -196,6 +200,7 @@ func (m *_BACnetTimerStateChangeValueConstructedValue) SerializeWithWriteBuffer( return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetTimerStateChangeValueConstructedValue) isBACnetTimerStateChangeValueConstructedValue() bool { return true } @@ -210,3 +215,6 @@ func (m *_BACnetTimerStateChangeValueConstructedValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueDate.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueDate.go index 640588fa0a7..fabbb3536be 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueDate.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueDate.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetTimerStateChangeValueDate is the corresponding interface of BACnetTimerStateChangeValueDate type BACnetTimerStateChangeValueDate interface { @@ -46,9 +48,11 @@ type BACnetTimerStateChangeValueDateExactly interface { // _BACnetTimerStateChangeValueDate is the data-structure of this message type _BACnetTimerStateChangeValueDate struct { *_BACnetTimerStateChangeValue - DateValue BACnetApplicationTagDate + DateValue BACnetApplicationTagDate } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetTimerStateChangeValueDate struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetTimerStateChangeValueDate) InitializeParent(parent BACnetTimerStateChangeValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetTimerStateChangeValueDate) InitializeParent(parent BACnetTimerStateChangeValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetTimerStateChangeValueDate) GetParent() BACnetTimerStateChangeValue { +func (m *_BACnetTimerStateChangeValueDate) GetParent() BACnetTimerStateChangeValue { return m._BACnetTimerStateChangeValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetTimerStateChangeValueDate) GetDateValue() BACnetApplicationTagDa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetTimerStateChangeValueDate factory function for _BACnetTimerStateChangeValueDate -func NewBACnetTimerStateChangeValueDate(dateValue BACnetApplicationTagDate, peekedTagHeader BACnetTagHeader, objectTypeArgument BACnetObjectType) *_BACnetTimerStateChangeValueDate { +func NewBACnetTimerStateChangeValueDate( dateValue BACnetApplicationTagDate , peekedTagHeader BACnetTagHeader , objectTypeArgument BACnetObjectType ) *_BACnetTimerStateChangeValueDate { _result := &_BACnetTimerStateChangeValueDate{ - DateValue: dateValue, - _BACnetTimerStateChangeValue: NewBACnetTimerStateChangeValue(peekedTagHeader, objectTypeArgument), + DateValue: dateValue, + _BACnetTimerStateChangeValue: NewBACnetTimerStateChangeValue(peekedTagHeader, objectTypeArgument), } _result._BACnetTimerStateChangeValue._BACnetTimerStateChangeValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetTimerStateChangeValueDate(dateValue BACnetApplicationTagDate, peek // Deprecated: use the interface for direct cast func CastBACnetTimerStateChangeValueDate(structType interface{}) BACnetTimerStateChangeValueDate { - if casted, ok := structType.(BACnetTimerStateChangeValueDate); ok { + if casted, ok := structType.(BACnetTimerStateChangeValueDate); ok { return casted } if casted, ok := structType.(*BACnetTimerStateChangeValueDate); ok { @@ -115,6 +118,7 @@ func (m *_BACnetTimerStateChangeValueDate) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetTimerStateChangeValueDate) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetTimerStateChangeValueDateParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("dateValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for dateValue") } - _dateValue, _dateValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_dateValue, _dateValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _dateValueErr != nil { return nil, errors.Wrap(_dateValueErr, "Error parsing 'dateValue' field of BACnetTimerStateChangeValueDate") } @@ -176,17 +180,17 @@ func (m *_BACnetTimerStateChangeValueDate) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetTimerStateChangeValueDate") } - // Simple Field (dateValue) - if pushErr := writeBuffer.PushContext("dateValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for dateValue") - } - _dateValueErr := writeBuffer.WriteSerializable(ctx, m.GetDateValue()) - if popErr := writeBuffer.PopContext("dateValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for dateValue") - } - if _dateValueErr != nil { - return errors.Wrap(_dateValueErr, "Error serializing 'dateValue' field") - } + // Simple Field (dateValue) + if pushErr := writeBuffer.PushContext("dateValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for dateValue") + } + _dateValueErr := writeBuffer.WriteSerializable(ctx, m.GetDateValue()) + if popErr := writeBuffer.PopContext("dateValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for dateValue") + } + if _dateValueErr != nil { + return errors.Wrap(_dateValueErr, "Error serializing 'dateValue' field") + } if popErr := writeBuffer.PopContext("BACnetTimerStateChangeValueDate"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetTimerStateChangeValueDate") @@ -196,6 +200,7 @@ func (m *_BACnetTimerStateChangeValueDate) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetTimerStateChangeValueDate) isBACnetTimerStateChangeValueDate() bool { return true } @@ -210,3 +215,6 @@ func (m *_BACnetTimerStateChangeValueDate) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueDateTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueDateTime.go index e728dbd1ca0..0c6899f1c91 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueDateTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueDateTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetTimerStateChangeValueDateTime is the corresponding interface of BACnetTimerStateChangeValueDateTime type BACnetTimerStateChangeValueDateTime interface { @@ -46,9 +48,11 @@ type BACnetTimerStateChangeValueDateTimeExactly interface { // _BACnetTimerStateChangeValueDateTime is the data-structure of this message type _BACnetTimerStateChangeValueDateTime struct { *_BACnetTimerStateChangeValue - DateTimeValue BACnetDateTimeEnclosed + DateTimeValue BACnetDateTimeEnclosed } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetTimerStateChangeValueDateTime struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetTimerStateChangeValueDateTime) InitializeParent(parent BACnetTimerStateChangeValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetTimerStateChangeValueDateTime) InitializeParent(parent BACnetTimerStateChangeValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetTimerStateChangeValueDateTime) GetParent() BACnetTimerStateChangeValue { +func (m *_BACnetTimerStateChangeValueDateTime) GetParent() BACnetTimerStateChangeValue { return m._BACnetTimerStateChangeValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetTimerStateChangeValueDateTime) GetDateTimeValue() BACnetDateTime /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetTimerStateChangeValueDateTime factory function for _BACnetTimerStateChangeValueDateTime -func NewBACnetTimerStateChangeValueDateTime(dateTimeValue BACnetDateTimeEnclosed, peekedTagHeader BACnetTagHeader, objectTypeArgument BACnetObjectType) *_BACnetTimerStateChangeValueDateTime { +func NewBACnetTimerStateChangeValueDateTime( dateTimeValue BACnetDateTimeEnclosed , peekedTagHeader BACnetTagHeader , objectTypeArgument BACnetObjectType ) *_BACnetTimerStateChangeValueDateTime { _result := &_BACnetTimerStateChangeValueDateTime{ - DateTimeValue: dateTimeValue, - _BACnetTimerStateChangeValue: NewBACnetTimerStateChangeValue(peekedTagHeader, objectTypeArgument), + DateTimeValue: dateTimeValue, + _BACnetTimerStateChangeValue: NewBACnetTimerStateChangeValue(peekedTagHeader, objectTypeArgument), } _result._BACnetTimerStateChangeValue._BACnetTimerStateChangeValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetTimerStateChangeValueDateTime(dateTimeValue BACnetDateTimeEnclosed // Deprecated: use the interface for direct cast func CastBACnetTimerStateChangeValueDateTime(structType interface{}) BACnetTimerStateChangeValueDateTime { - if casted, ok := structType.(BACnetTimerStateChangeValueDateTime); ok { + if casted, ok := structType.(BACnetTimerStateChangeValueDateTime); ok { return casted } if casted, ok := structType.(*BACnetTimerStateChangeValueDateTime); ok { @@ -115,6 +118,7 @@ func (m *_BACnetTimerStateChangeValueDateTime) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetTimerStateChangeValueDateTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetTimerStateChangeValueDateTimeParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("dateTimeValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for dateTimeValue") } - _dateTimeValue, _dateTimeValueErr := BACnetDateTimeEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(2))) +_dateTimeValue, _dateTimeValueErr := BACnetDateTimeEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) ) if _dateTimeValueErr != nil { return nil, errors.Wrap(_dateTimeValueErr, "Error parsing 'dateTimeValue' field of BACnetTimerStateChangeValueDateTime") } @@ -176,17 +180,17 @@ func (m *_BACnetTimerStateChangeValueDateTime) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetTimerStateChangeValueDateTime") } - // Simple Field (dateTimeValue) - if pushErr := writeBuffer.PushContext("dateTimeValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for dateTimeValue") - } - _dateTimeValueErr := writeBuffer.WriteSerializable(ctx, m.GetDateTimeValue()) - if popErr := writeBuffer.PopContext("dateTimeValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for dateTimeValue") - } - if _dateTimeValueErr != nil { - return errors.Wrap(_dateTimeValueErr, "Error serializing 'dateTimeValue' field") - } + // Simple Field (dateTimeValue) + if pushErr := writeBuffer.PushContext("dateTimeValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for dateTimeValue") + } + _dateTimeValueErr := writeBuffer.WriteSerializable(ctx, m.GetDateTimeValue()) + if popErr := writeBuffer.PopContext("dateTimeValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for dateTimeValue") + } + if _dateTimeValueErr != nil { + return errors.Wrap(_dateTimeValueErr, "Error serializing 'dateTimeValue' field") + } if popErr := writeBuffer.PopContext("BACnetTimerStateChangeValueDateTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetTimerStateChangeValueDateTime") @@ -196,6 +200,7 @@ func (m *_BACnetTimerStateChangeValueDateTime) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetTimerStateChangeValueDateTime) isBACnetTimerStateChangeValueDateTime() bool { return true } @@ -210,3 +215,6 @@ func (m *_BACnetTimerStateChangeValueDateTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueDouble.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueDouble.go index 9ba8f6d8300..e6ce2d5e806 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueDouble.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueDouble.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetTimerStateChangeValueDouble is the corresponding interface of BACnetTimerStateChangeValueDouble type BACnetTimerStateChangeValueDouble interface { @@ -46,9 +48,11 @@ type BACnetTimerStateChangeValueDoubleExactly interface { // _BACnetTimerStateChangeValueDouble is the data-structure of this message type _BACnetTimerStateChangeValueDouble struct { *_BACnetTimerStateChangeValue - DoubleValue BACnetApplicationTagDouble + DoubleValue BACnetApplicationTagDouble } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetTimerStateChangeValueDouble struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetTimerStateChangeValueDouble) InitializeParent(parent BACnetTimerStateChangeValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetTimerStateChangeValueDouble) InitializeParent(parent BACnetTimerStateChangeValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetTimerStateChangeValueDouble) GetParent() BACnetTimerStateChangeValue { +func (m *_BACnetTimerStateChangeValueDouble) GetParent() BACnetTimerStateChangeValue { return m._BACnetTimerStateChangeValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetTimerStateChangeValueDouble) GetDoubleValue() BACnetApplicationT /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetTimerStateChangeValueDouble factory function for _BACnetTimerStateChangeValueDouble -func NewBACnetTimerStateChangeValueDouble(doubleValue BACnetApplicationTagDouble, peekedTagHeader BACnetTagHeader, objectTypeArgument BACnetObjectType) *_BACnetTimerStateChangeValueDouble { +func NewBACnetTimerStateChangeValueDouble( doubleValue BACnetApplicationTagDouble , peekedTagHeader BACnetTagHeader , objectTypeArgument BACnetObjectType ) *_BACnetTimerStateChangeValueDouble { _result := &_BACnetTimerStateChangeValueDouble{ - DoubleValue: doubleValue, - _BACnetTimerStateChangeValue: NewBACnetTimerStateChangeValue(peekedTagHeader, objectTypeArgument), + DoubleValue: doubleValue, + _BACnetTimerStateChangeValue: NewBACnetTimerStateChangeValue(peekedTagHeader, objectTypeArgument), } _result._BACnetTimerStateChangeValue._BACnetTimerStateChangeValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetTimerStateChangeValueDouble(doubleValue BACnetApplicationTagDouble // Deprecated: use the interface for direct cast func CastBACnetTimerStateChangeValueDouble(structType interface{}) BACnetTimerStateChangeValueDouble { - if casted, ok := structType.(BACnetTimerStateChangeValueDouble); ok { + if casted, ok := structType.(BACnetTimerStateChangeValueDouble); ok { return casted } if casted, ok := structType.(*BACnetTimerStateChangeValueDouble); ok { @@ -115,6 +118,7 @@ func (m *_BACnetTimerStateChangeValueDouble) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_BACnetTimerStateChangeValueDouble) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetTimerStateChangeValueDoubleParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("doubleValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for doubleValue") } - _doubleValue, _doubleValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_doubleValue, _doubleValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _doubleValueErr != nil { return nil, errors.Wrap(_doubleValueErr, "Error parsing 'doubleValue' field of BACnetTimerStateChangeValueDouble") } @@ -176,17 +180,17 @@ func (m *_BACnetTimerStateChangeValueDouble) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BACnetTimerStateChangeValueDouble") } - // Simple Field (doubleValue) - if pushErr := writeBuffer.PushContext("doubleValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for doubleValue") - } - _doubleValueErr := writeBuffer.WriteSerializable(ctx, m.GetDoubleValue()) - if popErr := writeBuffer.PopContext("doubleValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for doubleValue") - } - if _doubleValueErr != nil { - return errors.Wrap(_doubleValueErr, "Error serializing 'doubleValue' field") - } + // Simple Field (doubleValue) + if pushErr := writeBuffer.PushContext("doubleValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for doubleValue") + } + _doubleValueErr := writeBuffer.WriteSerializable(ctx, m.GetDoubleValue()) + if popErr := writeBuffer.PopContext("doubleValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for doubleValue") + } + if _doubleValueErr != nil { + return errors.Wrap(_doubleValueErr, "Error serializing 'doubleValue' field") + } if popErr := writeBuffer.PopContext("BACnetTimerStateChangeValueDouble"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetTimerStateChangeValueDouble") @@ -196,6 +200,7 @@ func (m *_BACnetTimerStateChangeValueDouble) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetTimerStateChangeValueDouble) isBACnetTimerStateChangeValueDouble() bool { return true } @@ -210,3 +215,6 @@ func (m *_BACnetTimerStateChangeValueDouble) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueEnumerated.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueEnumerated.go index 5e2aff29d92..ced6757b5e3 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueEnumerated.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueEnumerated.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetTimerStateChangeValueEnumerated is the corresponding interface of BACnetTimerStateChangeValueEnumerated type BACnetTimerStateChangeValueEnumerated interface { @@ -46,9 +48,11 @@ type BACnetTimerStateChangeValueEnumeratedExactly interface { // _BACnetTimerStateChangeValueEnumerated is the data-structure of this message type _BACnetTimerStateChangeValueEnumerated struct { *_BACnetTimerStateChangeValue - EnumeratedValue BACnetApplicationTagEnumerated + EnumeratedValue BACnetApplicationTagEnumerated } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetTimerStateChangeValueEnumerated struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetTimerStateChangeValueEnumerated) InitializeParent(parent BACnetTimerStateChangeValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetTimerStateChangeValueEnumerated) InitializeParent(parent BACnetTimerStateChangeValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetTimerStateChangeValueEnumerated) GetParent() BACnetTimerStateChangeValue { +func (m *_BACnetTimerStateChangeValueEnumerated) GetParent() BACnetTimerStateChangeValue { return m._BACnetTimerStateChangeValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetTimerStateChangeValueEnumerated) GetEnumeratedValue() BACnetAppl /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetTimerStateChangeValueEnumerated factory function for _BACnetTimerStateChangeValueEnumerated -func NewBACnetTimerStateChangeValueEnumerated(enumeratedValue BACnetApplicationTagEnumerated, peekedTagHeader BACnetTagHeader, objectTypeArgument BACnetObjectType) *_BACnetTimerStateChangeValueEnumerated { +func NewBACnetTimerStateChangeValueEnumerated( enumeratedValue BACnetApplicationTagEnumerated , peekedTagHeader BACnetTagHeader , objectTypeArgument BACnetObjectType ) *_BACnetTimerStateChangeValueEnumerated { _result := &_BACnetTimerStateChangeValueEnumerated{ - EnumeratedValue: enumeratedValue, - _BACnetTimerStateChangeValue: NewBACnetTimerStateChangeValue(peekedTagHeader, objectTypeArgument), + EnumeratedValue: enumeratedValue, + _BACnetTimerStateChangeValue: NewBACnetTimerStateChangeValue(peekedTagHeader, objectTypeArgument), } _result._BACnetTimerStateChangeValue._BACnetTimerStateChangeValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetTimerStateChangeValueEnumerated(enumeratedValue BACnetApplicationT // Deprecated: use the interface for direct cast func CastBACnetTimerStateChangeValueEnumerated(structType interface{}) BACnetTimerStateChangeValueEnumerated { - if casted, ok := structType.(BACnetTimerStateChangeValueEnumerated); ok { + if casted, ok := structType.(BACnetTimerStateChangeValueEnumerated); ok { return casted } if casted, ok := structType.(*BACnetTimerStateChangeValueEnumerated); ok { @@ -115,6 +118,7 @@ func (m *_BACnetTimerStateChangeValueEnumerated) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetTimerStateChangeValueEnumerated) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetTimerStateChangeValueEnumeratedParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("enumeratedValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for enumeratedValue") } - _enumeratedValue, _enumeratedValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_enumeratedValue, _enumeratedValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _enumeratedValueErr != nil { return nil, errors.Wrap(_enumeratedValueErr, "Error parsing 'enumeratedValue' field of BACnetTimerStateChangeValueEnumerated") } @@ -176,17 +180,17 @@ func (m *_BACnetTimerStateChangeValueEnumerated) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for BACnetTimerStateChangeValueEnumerated") } - // Simple Field (enumeratedValue) - if pushErr := writeBuffer.PushContext("enumeratedValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for enumeratedValue") - } - _enumeratedValueErr := writeBuffer.WriteSerializable(ctx, m.GetEnumeratedValue()) - if popErr := writeBuffer.PopContext("enumeratedValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for enumeratedValue") - } - if _enumeratedValueErr != nil { - return errors.Wrap(_enumeratedValueErr, "Error serializing 'enumeratedValue' field") - } + // Simple Field (enumeratedValue) + if pushErr := writeBuffer.PushContext("enumeratedValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for enumeratedValue") + } + _enumeratedValueErr := writeBuffer.WriteSerializable(ctx, m.GetEnumeratedValue()) + if popErr := writeBuffer.PopContext("enumeratedValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for enumeratedValue") + } + if _enumeratedValueErr != nil { + return errors.Wrap(_enumeratedValueErr, "Error serializing 'enumeratedValue' field") + } if popErr := writeBuffer.PopContext("BACnetTimerStateChangeValueEnumerated"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetTimerStateChangeValueEnumerated") @@ -196,6 +200,7 @@ func (m *_BACnetTimerStateChangeValueEnumerated) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetTimerStateChangeValueEnumerated) isBACnetTimerStateChangeValueEnumerated() bool { return true } @@ -210,3 +215,6 @@ func (m *_BACnetTimerStateChangeValueEnumerated) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueInteger.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueInteger.go index cfd9298e448..4e3b5956137 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueInteger.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueInteger.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetTimerStateChangeValueInteger is the corresponding interface of BACnetTimerStateChangeValueInteger type BACnetTimerStateChangeValueInteger interface { @@ -46,9 +48,11 @@ type BACnetTimerStateChangeValueIntegerExactly interface { // _BACnetTimerStateChangeValueInteger is the data-structure of this message type _BACnetTimerStateChangeValueInteger struct { *_BACnetTimerStateChangeValue - IntegerValue BACnetApplicationTagSignedInteger + IntegerValue BACnetApplicationTagSignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetTimerStateChangeValueInteger struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetTimerStateChangeValueInteger) InitializeParent(parent BACnetTimerStateChangeValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetTimerStateChangeValueInteger) InitializeParent(parent BACnetTimerStateChangeValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetTimerStateChangeValueInteger) GetParent() BACnetTimerStateChangeValue { +func (m *_BACnetTimerStateChangeValueInteger) GetParent() BACnetTimerStateChangeValue { return m._BACnetTimerStateChangeValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetTimerStateChangeValueInteger) GetIntegerValue() BACnetApplicatio /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetTimerStateChangeValueInteger factory function for _BACnetTimerStateChangeValueInteger -func NewBACnetTimerStateChangeValueInteger(integerValue BACnetApplicationTagSignedInteger, peekedTagHeader BACnetTagHeader, objectTypeArgument BACnetObjectType) *_BACnetTimerStateChangeValueInteger { +func NewBACnetTimerStateChangeValueInteger( integerValue BACnetApplicationTagSignedInteger , peekedTagHeader BACnetTagHeader , objectTypeArgument BACnetObjectType ) *_BACnetTimerStateChangeValueInteger { _result := &_BACnetTimerStateChangeValueInteger{ - IntegerValue: integerValue, - _BACnetTimerStateChangeValue: NewBACnetTimerStateChangeValue(peekedTagHeader, objectTypeArgument), + IntegerValue: integerValue, + _BACnetTimerStateChangeValue: NewBACnetTimerStateChangeValue(peekedTagHeader, objectTypeArgument), } _result._BACnetTimerStateChangeValue._BACnetTimerStateChangeValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetTimerStateChangeValueInteger(integerValue BACnetApplicationTagSign // Deprecated: use the interface for direct cast func CastBACnetTimerStateChangeValueInteger(structType interface{}) BACnetTimerStateChangeValueInteger { - if casted, ok := structType.(BACnetTimerStateChangeValueInteger); ok { + if casted, ok := structType.(BACnetTimerStateChangeValueInteger); ok { return casted } if casted, ok := structType.(*BACnetTimerStateChangeValueInteger); ok { @@ -115,6 +118,7 @@ func (m *_BACnetTimerStateChangeValueInteger) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetTimerStateChangeValueInteger) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetTimerStateChangeValueIntegerParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("integerValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for integerValue") } - _integerValue, _integerValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_integerValue, _integerValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _integerValueErr != nil { return nil, errors.Wrap(_integerValueErr, "Error parsing 'integerValue' field of BACnetTimerStateChangeValueInteger") } @@ -176,17 +180,17 @@ func (m *_BACnetTimerStateChangeValueInteger) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetTimerStateChangeValueInteger") } - // Simple Field (integerValue) - if pushErr := writeBuffer.PushContext("integerValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for integerValue") - } - _integerValueErr := writeBuffer.WriteSerializable(ctx, m.GetIntegerValue()) - if popErr := writeBuffer.PopContext("integerValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for integerValue") - } - if _integerValueErr != nil { - return errors.Wrap(_integerValueErr, "Error serializing 'integerValue' field") - } + // Simple Field (integerValue) + if pushErr := writeBuffer.PushContext("integerValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for integerValue") + } + _integerValueErr := writeBuffer.WriteSerializable(ctx, m.GetIntegerValue()) + if popErr := writeBuffer.PopContext("integerValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for integerValue") + } + if _integerValueErr != nil { + return errors.Wrap(_integerValueErr, "Error serializing 'integerValue' field") + } if popErr := writeBuffer.PopContext("BACnetTimerStateChangeValueInteger"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetTimerStateChangeValueInteger") @@ -196,6 +200,7 @@ func (m *_BACnetTimerStateChangeValueInteger) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetTimerStateChangeValueInteger) isBACnetTimerStateChangeValueInteger() bool { return true } @@ -210,3 +215,6 @@ func (m *_BACnetTimerStateChangeValueInteger) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueLightingCommand.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueLightingCommand.go index 3059ff988f0..49baf3ad37e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueLightingCommand.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueLightingCommand.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetTimerStateChangeValueLightingCommand is the corresponding interface of BACnetTimerStateChangeValueLightingCommand type BACnetTimerStateChangeValueLightingCommand interface { @@ -46,9 +48,11 @@ type BACnetTimerStateChangeValueLightingCommandExactly interface { // _BACnetTimerStateChangeValueLightingCommand is the data-structure of this message type _BACnetTimerStateChangeValueLightingCommand struct { *_BACnetTimerStateChangeValue - LigthingCommandValue BACnetLightingCommandEnclosed + LigthingCommandValue BACnetLightingCommandEnclosed } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetTimerStateChangeValueLightingCommand struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetTimerStateChangeValueLightingCommand) InitializeParent(parent BACnetTimerStateChangeValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetTimerStateChangeValueLightingCommand) InitializeParent(parent BACnetTimerStateChangeValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetTimerStateChangeValueLightingCommand) GetParent() BACnetTimerStateChangeValue { +func (m *_BACnetTimerStateChangeValueLightingCommand) GetParent() BACnetTimerStateChangeValue { return m._BACnetTimerStateChangeValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetTimerStateChangeValueLightingCommand) GetLigthingCommandValue() /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetTimerStateChangeValueLightingCommand factory function for _BACnetTimerStateChangeValueLightingCommand -func NewBACnetTimerStateChangeValueLightingCommand(ligthingCommandValue BACnetLightingCommandEnclosed, peekedTagHeader BACnetTagHeader, objectTypeArgument BACnetObjectType) *_BACnetTimerStateChangeValueLightingCommand { +func NewBACnetTimerStateChangeValueLightingCommand( ligthingCommandValue BACnetLightingCommandEnclosed , peekedTagHeader BACnetTagHeader , objectTypeArgument BACnetObjectType ) *_BACnetTimerStateChangeValueLightingCommand { _result := &_BACnetTimerStateChangeValueLightingCommand{ - LigthingCommandValue: ligthingCommandValue, - _BACnetTimerStateChangeValue: NewBACnetTimerStateChangeValue(peekedTagHeader, objectTypeArgument), + LigthingCommandValue: ligthingCommandValue, + _BACnetTimerStateChangeValue: NewBACnetTimerStateChangeValue(peekedTagHeader, objectTypeArgument), } _result._BACnetTimerStateChangeValue._BACnetTimerStateChangeValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetTimerStateChangeValueLightingCommand(ligthingCommandValue BACnetLi // Deprecated: use the interface for direct cast func CastBACnetTimerStateChangeValueLightingCommand(structType interface{}) BACnetTimerStateChangeValueLightingCommand { - if casted, ok := structType.(BACnetTimerStateChangeValueLightingCommand); ok { + if casted, ok := structType.(BACnetTimerStateChangeValueLightingCommand); ok { return casted } if casted, ok := structType.(*BACnetTimerStateChangeValueLightingCommand); ok { @@ -115,6 +118,7 @@ func (m *_BACnetTimerStateChangeValueLightingCommand) GetLengthInBits(ctx contex return lengthInBits } + func (m *_BACnetTimerStateChangeValueLightingCommand) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetTimerStateChangeValueLightingCommandParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("ligthingCommandValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for ligthingCommandValue") } - _ligthingCommandValue, _ligthingCommandValueErr := BACnetLightingCommandEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(3))) +_ligthingCommandValue, _ligthingCommandValueErr := BACnetLightingCommandEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(3) ) ) if _ligthingCommandValueErr != nil { return nil, errors.Wrap(_ligthingCommandValueErr, "Error parsing 'ligthingCommandValue' field of BACnetTimerStateChangeValueLightingCommand") } @@ -176,17 +180,17 @@ func (m *_BACnetTimerStateChangeValueLightingCommand) SerializeWithWriteBuffer(c return errors.Wrap(pushErr, "Error pushing for BACnetTimerStateChangeValueLightingCommand") } - // Simple Field (ligthingCommandValue) - if pushErr := writeBuffer.PushContext("ligthingCommandValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for ligthingCommandValue") - } - _ligthingCommandValueErr := writeBuffer.WriteSerializable(ctx, m.GetLigthingCommandValue()) - if popErr := writeBuffer.PopContext("ligthingCommandValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for ligthingCommandValue") - } - if _ligthingCommandValueErr != nil { - return errors.Wrap(_ligthingCommandValueErr, "Error serializing 'ligthingCommandValue' field") - } + // Simple Field (ligthingCommandValue) + if pushErr := writeBuffer.PushContext("ligthingCommandValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for ligthingCommandValue") + } + _ligthingCommandValueErr := writeBuffer.WriteSerializable(ctx, m.GetLigthingCommandValue()) + if popErr := writeBuffer.PopContext("ligthingCommandValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for ligthingCommandValue") + } + if _ligthingCommandValueErr != nil { + return errors.Wrap(_ligthingCommandValueErr, "Error serializing 'ligthingCommandValue' field") + } if popErr := writeBuffer.PopContext("BACnetTimerStateChangeValueLightingCommand"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetTimerStateChangeValueLightingCommand") @@ -196,6 +200,7 @@ func (m *_BACnetTimerStateChangeValueLightingCommand) SerializeWithWriteBuffer(c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetTimerStateChangeValueLightingCommand) isBACnetTimerStateChangeValueLightingCommand() bool { return true } @@ -210,3 +215,6 @@ func (m *_BACnetTimerStateChangeValueLightingCommand) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueNoValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueNoValue.go index 93b0b0fde80..ed9736a0f9f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueNoValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueNoValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetTimerStateChangeValueNoValue is the corresponding interface of BACnetTimerStateChangeValueNoValue type BACnetTimerStateChangeValueNoValue interface { @@ -46,9 +48,11 @@ type BACnetTimerStateChangeValueNoValueExactly interface { // _BACnetTimerStateChangeValueNoValue is the data-structure of this message type _BACnetTimerStateChangeValueNoValue struct { *_BACnetTimerStateChangeValue - NoValue BACnetContextTagNull + NoValue BACnetContextTagNull } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetTimerStateChangeValueNoValue struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetTimerStateChangeValueNoValue) InitializeParent(parent BACnetTimerStateChangeValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetTimerStateChangeValueNoValue) InitializeParent(parent BACnetTimerStateChangeValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetTimerStateChangeValueNoValue) GetParent() BACnetTimerStateChangeValue { +func (m *_BACnetTimerStateChangeValueNoValue) GetParent() BACnetTimerStateChangeValue { return m._BACnetTimerStateChangeValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetTimerStateChangeValueNoValue) GetNoValue() BACnetContextTagNull /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetTimerStateChangeValueNoValue factory function for _BACnetTimerStateChangeValueNoValue -func NewBACnetTimerStateChangeValueNoValue(noValue BACnetContextTagNull, peekedTagHeader BACnetTagHeader, objectTypeArgument BACnetObjectType) *_BACnetTimerStateChangeValueNoValue { +func NewBACnetTimerStateChangeValueNoValue( noValue BACnetContextTagNull , peekedTagHeader BACnetTagHeader , objectTypeArgument BACnetObjectType ) *_BACnetTimerStateChangeValueNoValue { _result := &_BACnetTimerStateChangeValueNoValue{ - NoValue: noValue, - _BACnetTimerStateChangeValue: NewBACnetTimerStateChangeValue(peekedTagHeader, objectTypeArgument), + NoValue: noValue, + _BACnetTimerStateChangeValue: NewBACnetTimerStateChangeValue(peekedTagHeader, objectTypeArgument), } _result._BACnetTimerStateChangeValue._BACnetTimerStateChangeValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetTimerStateChangeValueNoValue(noValue BACnetContextTagNull, peekedT // Deprecated: use the interface for direct cast func CastBACnetTimerStateChangeValueNoValue(structType interface{}) BACnetTimerStateChangeValueNoValue { - if casted, ok := structType.(BACnetTimerStateChangeValueNoValue); ok { + if casted, ok := structType.(BACnetTimerStateChangeValueNoValue); ok { return casted } if casted, ok := structType.(*BACnetTimerStateChangeValueNoValue); ok { @@ -115,6 +118,7 @@ func (m *_BACnetTimerStateChangeValueNoValue) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetTimerStateChangeValueNoValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetTimerStateChangeValueNoValueParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("noValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for noValue") } - _noValue, _noValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_NULL)) +_noValue, _noValueErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_NULL ) ) if _noValueErr != nil { return nil, errors.Wrap(_noValueErr, "Error parsing 'noValue' field of BACnetTimerStateChangeValueNoValue") } @@ -176,17 +180,17 @@ func (m *_BACnetTimerStateChangeValueNoValue) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetTimerStateChangeValueNoValue") } - // Simple Field (noValue) - if pushErr := writeBuffer.PushContext("noValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for noValue") - } - _noValueErr := writeBuffer.WriteSerializable(ctx, m.GetNoValue()) - if popErr := writeBuffer.PopContext("noValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for noValue") - } - if _noValueErr != nil { - return errors.Wrap(_noValueErr, "Error serializing 'noValue' field") - } + // Simple Field (noValue) + if pushErr := writeBuffer.PushContext("noValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for noValue") + } + _noValueErr := writeBuffer.WriteSerializable(ctx, m.GetNoValue()) + if popErr := writeBuffer.PopContext("noValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for noValue") + } + if _noValueErr != nil { + return errors.Wrap(_noValueErr, "Error serializing 'noValue' field") + } if popErr := writeBuffer.PopContext("BACnetTimerStateChangeValueNoValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetTimerStateChangeValueNoValue") @@ -196,6 +200,7 @@ func (m *_BACnetTimerStateChangeValueNoValue) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetTimerStateChangeValueNoValue) isBACnetTimerStateChangeValueNoValue() bool { return true } @@ -210,3 +215,6 @@ func (m *_BACnetTimerStateChangeValueNoValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueNull.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueNull.go index 6cc6f29934b..24907f322fb 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueNull.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueNull.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetTimerStateChangeValueNull is the corresponding interface of BACnetTimerStateChangeValueNull type BACnetTimerStateChangeValueNull interface { @@ -46,9 +48,11 @@ type BACnetTimerStateChangeValueNullExactly interface { // _BACnetTimerStateChangeValueNull is the data-structure of this message type _BACnetTimerStateChangeValueNull struct { *_BACnetTimerStateChangeValue - NullValue BACnetApplicationTagNull + NullValue BACnetApplicationTagNull } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetTimerStateChangeValueNull struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetTimerStateChangeValueNull) InitializeParent(parent BACnetTimerStateChangeValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetTimerStateChangeValueNull) InitializeParent(parent BACnetTimerStateChangeValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetTimerStateChangeValueNull) GetParent() BACnetTimerStateChangeValue { +func (m *_BACnetTimerStateChangeValueNull) GetParent() BACnetTimerStateChangeValue { return m._BACnetTimerStateChangeValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetTimerStateChangeValueNull) GetNullValue() BACnetApplicationTagNu /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetTimerStateChangeValueNull factory function for _BACnetTimerStateChangeValueNull -func NewBACnetTimerStateChangeValueNull(nullValue BACnetApplicationTagNull, peekedTagHeader BACnetTagHeader, objectTypeArgument BACnetObjectType) *_BACnetTimerStateChangeValueNull { +func NewBACnetTimerStateChangeValueNull( nullValue BACnetApplicationTagNull , peekedTagHeader BACnetTagHeader , objectTypeArgument BACnetObjectType ) *_BACnetTimerStateChangeValueNull { _result := &_BACnetTimerStateChangeValueNull{ - NullValue: nullValue, - _BACnetTimerStateChangeValue: NewBACnetTimerStateChangeValue(peekedTagHeader, objectTypeArgument), + NullValue: nullValue, + _BACnetTimerStateChangeValue: NewBACnetTimerStateChangeValue(peekedTagHeader, objectTypeArgument), } _result._BACnetTimerStateChangeValue._BACnetTimerStateChangeValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetTimerStateChangeValueNull(nullValue BACnetApplicationTagNull, peek // Deprecated: use the interface for direct cast func CastBACnetTimerStateChangeValueNull(structType interface{}) BACnetTimerStateChangeValueNull { - if casted, ok := structType.(BACnetTimerStateChangeValueNull); ok { + if casted, ok := structType.(BACnetTimerStateChangeValueNull); ok { return casted } if casted, ok := structType.(*BACnetTimerStateChangeValueNull); ok { @@ -115,6 +118,7 @@ func (m *_BACnetTimerStateChangeValueNull) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetTimerStateChangeValueNull) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetTimerStateChangeValueNullParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("nullValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for nullValue") } - _nullValue, _nullValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_nullValue, _nullValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _nullValueErr != nil { return nil, errors.Wrap(_nullValueErr, "Error parsing 'nullValue' field of BACnetTimerStateChangeValueNull") } @@ -176,17 +180,17 @@ func (m *_BACnetTimerStateChangeValueNull) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetTimerStateChangeValueNull") } - // Simple Field (nullValue) - if pushErr := writeBuffer.PushContext("nullValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for nullValue") - } - _nullValueErr := writeBuffer.WriteSerializable(ctx, m.GetNullValue()) - if popErr := writeBuffer.PopContext("nullValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for nullValue") - } - if _nullValueErr != nil { - return errors.Wrap(_nullValueErr, "Error serializing 'nullValue' field") - } + // Simple Field (nullValue) + if pushErr := writeBuffer.PushContext("nullValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for nullValue") + } + _nullValueErr := writeBuffer.WriteSerializable(ctx, m.GetNullValue()) + if popErr := writeBuffer.PopContext("nullValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for nullValue") + } + if _nullValueErr != nil { + return errors.Wrap(_nullValueErr, "Error serializing 'nullValue' field") + } if popErr := writeBuffer.PopContext("BACnetTimerStateChangeValueNull"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetTimerStateChangeValueNull") @@ -196,6 +200,7 @@ func (m *_BACnetTimerStateChangeValueNull) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetTimerStateChangeValueNull) isBACnetTimerStateChangeValueNull() bool { return true } @@ -210,3 +215,6 @@ func (m *_BACnetTimerStateChangeValueNull) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueObjectidentifier.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueObjectidentifier.go index f1bb716b5db..cd0e11dfe84 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueObjectidentifier.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueObjectidentifier.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetTimerStateChangeValueObjectidentifier is the corresponding interface of BACnetTimerStateChangeValueObjectidentifier type BACnetTimerStateChangeValueObjectidentifier interface { @@ -46,9 +48,11 @@ type BACnetTimerStateChangeValueObjectidentifierExactly interface { // _BACnetTimerStateChangeValueObjectidentifier is the data-structure of this message type _BACnetTimerStateChangeValueObjectidentifier struct { *_BACnetTimerStateChangeValue - ObjectidentifierValue BACnetApplicationTagObjectIdentifier + ObjectidentifierValue BACnetApplicationTagObjectIdentifier } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetTimerStateChangeValueObjectidentifier struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetTimerStateChangeValueObjectidentifier) InitializeParent(parent BACnetTimerStateChangeValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetTimerStateChangeValueObjectidentifier) InitializeParent(parent BACnetTimerStateChangeValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetTimerStateChangeValueObjectidentifier) GetParent() BACnetTimerStateChangeValue { +func (m *_BACnetTimerStateChangeValueObjectidentifier) GetParent() BACnetTimerStateChangeValue { return m._BACnetTimerStateChangeValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetTimerStateChangeValueObjectidentifier) GetObjectidentifierValue( /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetTimerStateChangeValueObjectidentifier factory function for _BACnetTimerStateChangeValueObjectidentifier -func NewBACnetTimerStateChangeValueObjectidentifier(objectidentifierValue BACnetApplicationTagObjectIdentifier, peekedTagHeader BACnetTagHeader, objectTypeArgument BACnetObjectType) *_BACnetTimerStateChangeValueObjectidentifier { +func NewBACnetTimerStateChangeValueObjectidentifier( objectidentifierValue BACnetApplicationTagObjectIdentifier , peekedTagHeader BACnetTagHeader , objectTypeArgument BACnetObjectType ) *_BACnetTimerStateChangeValueObjectidentifier { _result := &_BACnetTimerStateChangeValueObjectidentifier{ - ObjectidentifierValue: objectidentifierValue, - _BACnetTimerStateChangeValue: NewBACnetTimerStateChangeValue(peekedTagHeader, objectTypeArgument), + ObjectidentifierValue: objectidentifierValue, + _BACnetTimerStateChangeValue: NewBACnetTimerStateChangeValue(peekedTagHeader, objectTypeArgument), } _result._BACnetTimerStateChangeValue._BACnetTimerStateChangeValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetTimerStateChangeValueObjectidentifier(objectidentifierValue BACnet // Deprecated: use the interface for direct cast func CastBACnetTimerStateChangeValueObjectidentifier(structType interface{}) BACnetTimerStateChangeValueObjectidentifier { - if casted, ok := structType.(BACnetTimerStateChangeValueObjectidentifier); ok { + if casted, ok := structType.(BACnetTimerStateChangeValueObjectidentifier); ok { return casted } if casted, ok := structType.(*BACnetTimerStateChangeValueObjectidentifier); ok { @@ -115,6 +118,7 @@ func (m *_BACnetTimerStateChangeValueObjectidentifier) GetLengthInBits(ctx conte return lengthInBits } + func (m *_BACnetTimerStateChangeValueObjectidentifier) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetTimerStateChangeValueObjectidentifierParseWithBuffer(ctx context.Cont if pullErr := readBuffer.PullContext("objectidentifierValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for objectidentifierValue") } - _objectidentifierValue, _objectidentifierValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_objectidentifierValue, _objectidentifierValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _objectidentifierValueErr != nil { return nil, errors.Wrap(_objectidentifierValueErr, "Error parsing 'objectidentifierValue' field of BACnetTimerStateChangeValueObjectidentifier") } @@ -176,17 +180,17 @@ func (m *_BACnetTimerStateChangeValueObjectidentifier) SerializeWithWriteBuffer( return errors.Wrap(pushErr, "Error pushing for BACnetTimerStateChangeValueObjectidentifier") } - // Simple Field (objectidentifierValue) - if pushErr := writeBuffer.PushContext("objectidentifierValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for objectidentifierValue") - } - _objectidentifierValueErr := writeBuffer.WriteSerializable(ctx, m.GetObjectidentifierValue()) - if popErr := writeBuffer.PopContext("objectidentifierValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for objectidentifierValue") - } - if _objectidentifierValueErr != nil { - return errors.Wrap(_objectidentifierValueErr, "Error serializing 'objectidentifierValue' field") - } + // Simple Field (objectidentifierValue) + if pushErr := writeBuffer.PushContext("objectidentifierValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for objectidentifierValue") + } + _objectidentifierValueErr := writeBuffer.WriteSerializable(ctx, m.GetObjectidentifierValue()) + if popErr := writeBuffer.PopContext("objectidentifierValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for objectidentifierValue") + } + if _objectidentifierValueErr != nil { + return errors.Wrap(_objectidentifierValueErr, "Error serializing 'objectidentifierValue' field") + } if popErr := writeBuffer.PopContext("BACnetTimerStateChangeValueObjectidentifier"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetTimerStateChangeValueObjectidentifier") @@ -196,6 +200,7 @@ func (m *_BACnetTimerStateChangeValueObjectidentifier) SerializeWithWriteBuffer( return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetTimerStateChangeValueObjectidentifier) isBACnetTimerStateChangeValueObjectidentifier() bool { return true } @@ -210,3 +215,6 @@ func (m *_BACnetTimerStateChangeValueObjectidentifier) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueOctetString.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueOctetString.go index 9af9db1a92d..cb59041ae19 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueOctetString.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueOctetString.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetTimerStateChangeValueOctetString is the corresponding interface of BACnetTimerStateChangeValueOctetString type BACnetTimerStateChangeValueOctetString interface { @@ -46,9 +48,11 @@ type BACnetTimerStateChangeValueOctetStringExactly interface { // _BACnetTimerStateChangeValueOctetString is the data-structure of this message type _BACnetTimerStateChangeValueOctetString struct { *_BACnetTimerStateChangeValue - OctetStringValue BACnetApplicationTagOctetString + OctetStringValue BACnetApplicationTagOctetString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetTimerStateChangeValueOctetString struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetTimerStateChangeValueOctetString) InitializeParent(parent BACnetTimerStateChangeValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetTimerStateChangeValueOctetString) InitializeParent(parent BACnetTimerStateChangeValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetTimerStateChangeValueOctetString) GetParent() BACnetTimerStateChangeValue { +func (m *_BACnetTimerStateChangeValueOctetString) GetParent() BACnetTimerStateChangeValue { return m._BACnetTimerStateChangeValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetTimerStateChangeValueOctetString) GetOctetStringValue() BACnetAp /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetTimerStateChangeValueOctetString factory function for _BACnetTimerStateChangeValueOctetString -func NewBACnetTimerStateChangeValueOctetString(octetStringValue BACnetApplicationTagOctetString, peekedTagHeader BACnetTagHeader, objectTypeArgument BACnetObjectType) *_BACnetTimerStateChangeValueOctetString { +func NewBACnetTimerStateChangeValueOctetString( octetStringValue BACnetApplicationTagOctetString , peekedTagHeader BACnetTagHeader , objectTypeArgument BACnetObjectType ) *_BACnetTimerStateChangeValueOctetString { _result := &_BACnetTimerStateChangeValueOctetString{ - OctetStringValue: octetStringValue, - _BACnetTimerStateChangeValue: NewBACnetTimerStateChangeValue(peekedTagHeader, objectTypeArgument), + OctetStringValue: octetStringValue, + _BACnetTimerStateChangeValue: NewBACnetTimerStateChangeValue(peekedTagHeader, objectTypeArgument), } _result._BACnetTimerStateChangeValue._BACnetTimerStateChangeValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetTimerStateChangeValueOctetString(octetStringValue BACnetApplicatio // Deprecated: use the interface for direct cast func CastBACnetTimerStateChangeValueOctetString(structType interface{}) BACnetTimerStateChangeValueOctetString { - if casted, ok := structType.(BACnetTimerStateChangeValueOctetString); ok { + if casted, ok := structType.(BACnetTimerStateChangeValueOctetString); ok { return casted } if casted, ok := structType.(*BACnetTimerStateChangeValueOctetString); ok { @@ -115,6 +118,7 @@ func (m *_BACnetTimerStateChangeValueOctetString) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetTimerStateChangeValueOctetString) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetTimerStateChangeValueOctetStringParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("octetStringValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for octetStringValue") } - _octetStringValue, _octetStringValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_octetStringValue, _octetStringValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _octetStringValueErr != nil { return nil, errors.Wrap(_octetStringValueErr, "Error parsing 'octetStringValue' field of BACnetTimerStateChangeValueOctetString") } @@ -176,17 +180,17 @@ func (m *_BACnetTimerStateChangeValueOctetString) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetTimerStateChangeValueOctetString") } - // Simple Field (octetStringValue) - if pushErr := writeBuffer.PushContext("octetStringValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for octetStringValue") - } - _octetStringValueErr := writeBuffer.WriteSerializable(ctx, m.GetOctetStringValue()) - if popErr := writeBuffer.PopContext("octetStringValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for octetStringValue") - } - if _octetStringValueErr != nil { - return errors.Wrap(_octetStringValueErr, "Error serializing 'octetStringValue' field") - } + // Simple Field (octetStringValue) + if pushErr := writeBuffer.PushContext("octetStringValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for octetStringValue") + } + _octetStringValueErr := writeBuffer.WriteSerializable(ctx, m.GetOctetStringValue()) + if popErr := writeBuffer.PopContext("octetStringValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for octetStringValue") + } + if _octetStringValueErr != nil { + return errors.Wrap(_octetStringValueErr, "Error serializing 'octetStringValue' field") + } if popErr := writeBuffer.PopContext("BACnetTimerStateChangeValueOctetString"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetTimerStateChangeValueOctetString") @@ -196,6 +200,7 @@ func (m *_BACnetTimerStateChangeValueOctetString) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetTimerStateChangeValueOctetString) isBACnetTimerStateChangeValueOctetString() bool { return true } @@ -210,3 +215,6 @@ func (m *_BACnetTimerStateChangeValueOctetString) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueReal.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueReal.go index a4321aeddc2..4bedd671c88 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueReal.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueReal.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetTimerStateChangeValueReal is the corresponding interface of BACnetTimerStateChangeValueReal type BACnetTimerStateChangeValueReal interface { @@ -46,9 +48,11 @@ type BACnetTimerStateChangeValueRealExactly interface { // _BACnetTimerStateChangeValueReal is the data-structure of this message type _BACnetTimerStateChangeValueReal struct { *_BACnetTimerStateChangeValue - RealValue BACnetApplicationTagReal + RealValue BACnetApplicationTagReal } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetTimerStateChangeValueReal struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetTimerStateChangeValueReal) InitializeParent(parent BACnetTimerStateChangeValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetTimerStateChangeValueReal) InitializeParent(parent BACnetTimerStateChangeValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetTimerStateChangeValueReal) GetParent() BACnetTimerStateChangeValue { +func (m *_BACnetTimerStateChangeValueReal) GetParent() BACnetTimerStateChangeValue { return m._BACnetTimerStateChangeValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetTimerStateChangeValueReal) GetRealValue() BACnetApplicationTagRe /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetTimerStateChangeValueReal factory function for _BACnetTimerStateChangeValueReal -func NewBACnetTimerStateChangeValueReal(realValue BACnetApplicationTagReal, peekedTagHeader BACnetTagHeader, objectTypeArgument BACnetObjectType) *_BACnetTimerStateChangeValueReal { +func NewBACnetTimerStateChangeValueReal( realValue BACnetApplicationTagReal , peekedTagHeader BACnetTagHeader , objectTypeArgument BACnetObjectType ) *_BACnetTimerStateChangeValueReal { _result := &_BACnetTimerStateChangeValueReal{ - RealValue: realValue, - _BACnetTimerStateChangeValue: NewBACnetTimerStateChangeValue(peekedTagHeader, objectTypeArgument), + RealValue: realValue, + _BACnetTimerStateChangeValue: NewBACnetTimerStateChangeValue(peekedTagHeader, objectTypeArgument), } _result._BACnetTimerStateChangeValue._BACnetTimerStateChangeValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetTimerStateChangeValueReal(realValue BACnetApplicationTagReal, peek // Deprecated: use the interface for direct cast func CastBACnetTimerStateChangeValueReal(structType interface{}) BACnetTimerStateChangeValueReal { - if casted, ok := structType.(BACnetTimerStateChangeValueReal); ok { + if casted, ok := structType.(BACnetTimerStateChangeValueReal); ok { return casted } if casted, ok := structType.(*BACnetTimerStateChangeValueReal); ok { @@ -115,6 +118,7 @@ func (m *_BACnetTimerStateChangeValueReal) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetTimerStateChangeValueReal) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetTimerStateChangeValueRealParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("realValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for realValue") } - _realValue, _realValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_realValue, _realValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _realValueErr != nil { return nil, errors.Wrap(_realValueErr, "Error parsing 'realValue' field of BACnetTimerStateChangeValueReal") } @@ -176,17 +180,17 @@ func (m *_BACnetTimerStateChangeValueReal) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetTimerStateChangeValueReal") } - // Simple Field (realValue) - if pushErr := writeBuffer.PushContext("realValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for realValue") - } - _realValueErr := writeBuffer.WriteSerializable(ctx, m.GetRealValue()) - if popErr := writeBuffer.PopContext("realValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for realValue") - } - if _realValueErr != nil { - return errors.Wrap(_realValueErr, "Error serializing 'realValue' field") - } + // Simple Field (realValue) + if pushErr := writeBuffer.PushContext("realValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for realValue") + } + _realValueErr := writeBuffer.WriteSerializable(ctx, m.GetRealValue()) + if popErr := writeBuffer.PopContext("realValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for realValue") + } + if _realValueErr != nil { + return errors.Wrap(_realValueErr, "Error serializing 'realValue' field") + } if popErr := writeBuffer.PopContext("BACnetTimerStateChangeValueReal"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetTimerStateChangeValueReal") @@ -196,6 +200,7 @@ func (m *_BACnetTimerStateChangeValueReal) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetTimerStateChangeValueReal) isBACnetTimerStateChangeValueReal() bool { return true } @@ -210,3 +215,6 @@ func (m *_BACnetTimerStateChangeValueReal) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueTime.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueTime.go index d8cfe1ddae1..548947d784e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueTime.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetTimerStateChangeValueTime is the corresponding interface of BACnetTimerStateChangeValueTime type BACnetTimerStateChangeValueTime interface { @@ -46,9 +48,11 @@ type BACnetTimerStateChangeValueTimeExactly interface { // _BACnetTimerStateChangeValueTime is the data-structure of this message type _BACnetTimerStateChangeValueTime struct { *_BACnetTimerStateChangeValue - TimeValue BACnetApplicationTagTime + TimeValue BACnetApplicationTagTime } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetTimerStateChangeValueTime struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetTimerStateChangeValueTime) InitializeParent(parent BACnetTimerStateChangeValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetTimerStateChangeValueTime) InitializeParent(parent BACnetTimerStateChangeValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetTimerStateChangeValueTime) GetParent() BACnetTimerStateChangeValue { +func (m *_BACnetTimerStateChangeValueTime) GetParent() BACnetTimerStateChangeValue { return m._BACnetTimerStateChangeValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetTimerStateChangeValueTime) GetTimeValue() BACnetApplicationTagTi /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetTimerStateChangeValueTime factory function for _BACnetTimerStateChangeValueTime -func NewBACnetTimerStateChangeValueTime(timeValue BACnetApplicationTagTime, peekedTagHeader BACnetTagHeader, objectTypeArgument BACnetObjectType) *_BACnetTimerStateChangeValueTime { +func NewBACnetTimerStateChangeValueTime( timeValue BACnetApplicationTagTime , peekedTagHeader BACnetTagHeader , objectTypeArgument BACnetObjectType ) *_BACnetTimerStateChangeValueTime { _result := &_BACnetTimerStateChangeValueTime{ - TimeValue: timeValue, - _BACnetTimerStateChangeValue: NewBACnetTimerStateChangeValue(peekedTagHeader, objectTypeArgument), + TimeValue: timeValue, + _BACnetTimerStateChangeValue: NewBACnetTimerStateChangeValue(peekedTagHeader, objectTypeArgument), } _result._BACnetTimerStateChangeValue._BACnetTimerStateChangeValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetTimerStateChangeValueTime(timeValue BACnetApplicationTagTime, peek // Deprecated: use the interface for direct cast func CastBACnetTimerStateChangeValueTime(structType interface{}) BACnetTimerStateChangeValueTime { - if casted, ok := structType.(BACnetTimerStateChangeValueTime); ok { + if casted, ok := structType.(BACnetTimerStateChangeValueTime); ok { return casted } if casted, ok := structType.(*BACnetTimerStateChangeValueTime); ok { @@ -115,6 +118,7 @@ func (m *_BACnetTimerStateChangeValueTime) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BACnetTimerStateChangeValueTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetTimerStateChangeValueTimeParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("timeValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeValue") } - _timeValue, _timeValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_timeValue, _timeValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _timeValueErr != nil { return nil, errors.Wrap(_timeValueErr, "Error parsing 'timeValue' field of BACnetTimerStateChangeValueTime") } @@ -176,17 +180,17 @@ func (m *_BACnetTimerStateChangeValueTime) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for BACnetTimerStateChangeValueTime") } - // Simple Field (timeValue) - if pushErr := writeBuffer.PushContext("timeValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timeValue") - } - _timeValueErr := writeBuffer.WriteSerializable(ctx, m.GetTimeValue()) - if popErr := writeBuffer.PopContext("timeValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timeValue") - } - if _timeValueErr != nil { - return errors.Wrap(_timeValueErr, "Error serializing 'timeValue' field") - } + // Simple Field (timeValue) + if pushErr := writeBuffer.PushContext("timeValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timeValue") + } + _timeValueErr := writeBuffer.WriteSerializable(ctx, m.GetTimeValue()) + if popErr := writeBuffer.PopContext("timeValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timeValue") + } + if _timeValueErr != nil { + return errors.Wrap(_timeValueErr, "Error serializing 'timeValue' field") + } if popErr := writeBuffer.PopContext("BACnetTimerStateChangeValueTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetTimerStateChangeValueTime") @@ -196,6 +200,7 @@ func (m *_BACnetTimerStateChangeValueTime) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetTimerStateChangeValueTime) isBACnetTimerStateChangeValueTime() bool { return true } @@ -210,3 +215,6 @@ func (m *_BACnetTimerStateChangeValueTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueUnsigned.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueUnsigned.go index 1bc5b68b2a3..074a8537628 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueUnsigned.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateChangeValueUnsigned.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetTimerStateChangeValueUnsigned is the corresponding interface of BACnetTimerStateChangeValueUnsigned type BACnetTimerStateChangeValueUnsigned interface { @@ -46,9 +48,11 @@ type BACnetTimerStateChangeValueUnsignedExactly interface { // _BACnetTimerStateChangeValueUnsigned is the data-structure of this message type _BACnetTimerStateChangeValueUnsigned struct { *_BACnetTimerStateChangeValue - UnsignedValue BACnetApplicationTagUnsignedInteger + UnsignedValue BACnetApplicationTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetTimerStateChangeValueUnsigned struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetTimerStateChangeValueUnsigned) InitializeParent(parent BACnetTimerStateChangeValue, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetTimerStateChangeValueUnsigned) InitializeParent(parent BACnetTimerStateChangeValue , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetTimerStateChangeValueUnsigned) GetParent() BACnetTimerStateChangeValue { +func (m *_BACnetTimerStateChangeValueUnsigned) GetParent() BACnetTimerStateChangeValue { return m._BACnetTimerStateChangeValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetTimerStateChangeValueUnsigned) GetUnsignedValue() BACnetApplicat /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetTimerStateChangeValueUnsigned factory function for _BACnetTimerStateChangeValueUnsigned -func NewBACnetTimerStateChangeValueUnsigned(unsignedValue BACnetApplicationTagUnsignedInteger, peekedTagHeader BACnetTagHeader, objectTypeArgument BACnetObjectType) *_BACnetTimerStateChangeValueUnsigned { +func NewBACnetTimerStateChangeValueUnsigned( unsignedValue BACnetApplicationTagUnsignedInteger , peekedTagHeader BACnetTagHeader , objectTypeArgument BACnetObjectType ) *_BACnetTimerStateChangeValueUnsigned { _result := &_BACnetTimerStateChangeValueUnsigned{ - UnsignedValue: unsignedValue, - _BACnetTimerStateChangeValue: NewBACnetTimerStateChangeValue(peekedTagHeader, objectTypeArgument), + UnsignedValue: unsignedValue, + _BACnetTimerStateChangeValue: NewBACnetTimerStateChangeValue(peekedTagHeader, objectTypeArgument), } _result._BACnetTimerStateChangeValue._BACnetTimerStateChangeValueChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetTimerStateChangeValueUnsigned(unsignedValue BACnetApplicationTagUn // Deprecated: use the interface for direct cast func CastBACnetTimerStateChangeValueUnsigned(structType interface{}) BACnetTimerStateChangeValueUnsigned { - if casted, ok := structType.(BACnetTimerStateChangeValueUnsigned); ok { + if casted, ok := structType.(BACnetTimerStateChangeValueUnsigned); ok { return casted } if casted, ok := structType.(*BACnetTimerStateChangeValueUnsigned); ok { @@ -115,6 +118,7 @@ func (m *_BACnetTimerStateChangeValueUnsigned) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BACnetTimerStateChangeValueUnsigned) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetTimerStateChangeValueUnsignedParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("unsignedValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for unsignedValue") } - _unsignedValue, _unsignedValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_unsignedValue, _unsignedValueErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _unsignedValueErr != nil { return nil, errors.Wrap(_unsignedValueErr, "Error parsing 'unsignedValue' field of BACnetTimerStateChangeValueUnsigned") } @@ -176,17 +180,17 @@ func (m *_BACnetTimerStateChangeValueUnsigned) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BACnetTimerStateChangeValueUnsigned") } - // Simple Field (unsignedValue) - if pushErr := writeBuffer.PushContext("unsignedValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for unsignedValue") - } - _unsignedValueErr := writeBuffer.WriteSerializable(ctx, m.GetUnsignedValue()) - if popErr := writeBuffer.PopContext("unsignedValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for unsignedValue") - } - if _unsignedValueErr != nil { - return errors.Wrap(_unsignedValueErr, "Error serializing 'unsignedValue' field") - } + // Simple Field (unsignedValue) + if pushErr := writeBuffer.PushContext("unsignedValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for unsignedValue") + } + _unsignedValueErr := writeBuffer.WriteSerializable(ctx, m.GetUnsignedValue()) + if popErr := writeBuffer.PopContext("unsignedValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for unsignedValue") + } + if _unsignedValueErr != nil { + return errors.Wrap(_unsignedValueErr, "Error serializing 'unsignedValue' field") + } if popErr := writeBuffer.PopContext("BACnetTimerStateChangeValueUnsigned"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetTimerStateChangeValueUnsigned") @@ -196,6 +200,7 @@ func (m *_BACnetTimerStateChangeValueUnsigned) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetTimerStateChangeValueUnsigned) isBACnetTimerStateChangeValueUnsigned() bool { return true } @@ -210,3 +215,6 @@ func (m *_BACnetTimerStateChangeValueUnsigned) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateTagged.go index 1f22ea9ff8f..f1f0f5f9660 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerStateTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetTimerStateTagged is the corresponding interface of BACnetTimerStateTagged type BACnetTimerStateTagged interface { @@ -46,14 +48,15 @@ type BACnetTimerStateTaggedExactly interface { // _BACnetTimerStateTagged is the data-structure of this message type _BACnetTimerStateTagged struct { - Header BACnetTagHeader - Value BACnetTimerState + Header BACnetTagHeader + Value BACnetTimerState // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_BACnetTimerStateTagged) GetValue() BACnetTimerState { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetTimerStateTagged factory function for _BACnetTimerStateTagged -func NewBACnetTimerStateTagged(header BACnetTagHeader, value BACnetTimerState, tagNumber uint8, tagClass TagClass) *_BACnetTimerStateTagged { - return &_BACnetTimerStateTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetTimerStateTagged( header BACnetTagHeader , value BACnetTimerState , tagNumber uint8 , tagClass TagClass ) *_BACnetTimerStateTagged { +return &_BACnetTimerStateTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetTimerStateTagged(structType interface{}) BACnetTimerStateTagged { - if casted, ok := structType.(BACnetTimerStateTagged); ok { + if casted, ok := structType.(BACnetTimerStateTagged); ok { return casted } if casted, ok := structType.(*BACnetTimerStateTagged); ok { @@ -104,6 +108,7 @@ func (m *_BACnetTimerStateTagged) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetTimerStateTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func BACnetTimerStateTaggedParseWithBuffer(ctx context.Context, readBuffer utils if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetTimerStateTagged") } @@ -135,12 +140,12 @@ func BACnetTimerStateTaggedParseWithBuffer(ctx context.Context, readBuffer utils } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func BACnetTimerStateTaggedParseWithBuffer(ctx context.Context, readBuffer utils } var value BACnetTimerState if _value != nil { - value = _value.(BACnetTimerState) + value = _value.(BACnetTimerState) } if closeErr := readBuffer.CloseContext("BACnetTimerStateTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func BACnetTimerStateTaggedParseWithBuffer(ctx context.Context, readBuffer utils // Create the instance return &_BACnetTimerStateTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_BACnetTimerStateTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_BACnetTimerStateTagged) Serialize() ([]byte, error) { func (m *_BACnetTimerStateTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetTimerStateTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetTimerStateTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetTimerStateTagged") } @@ -206,6 +211,7 @@ func (m *_BACnetTimerStateTagged) SerializeWithWriteBuffer(ctx context.Context, return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_BACnetTimerStateTagged) GetTagNumber() uint8 { func (m *_BACnetTimerStateTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_BACnetTimerStateTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerTransition.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerTransition.go index efd9376889d..7b2893ee511 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerTransition.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerTransition.go @@ -34,14 +34,14 @@ type IBACnetTimerTransition interface { utils.Serializable } -const ( - BACnetTimerTransition_NONE BACnetTimerTransition = 0 - BACnetTimerTransition_IDLE_TO_RUNNING BACnetTimerTransition = 1 - BACnetTimerTransition_RUNNING_TO_IDLE BACnetTimerTransition = 2 +const( + BACnetTimerTransition_NONE BACnetTimerTransition = 0 + BACnetTimerTransition_IDLE_TO_RUNNING BACnetTimerTransition = 1 + BACnetTimerTransition_RUNNING_TO_IDLE BACnetTimerTransition = 2 BACnetTimerTransition_RUNNING_TO_RUNNING BACnetTimerTransition = 3 BACnetTimerTransition_RUNNING_TO_EXPIRED BACnetTimerTransition = 4 - BACnetTimerTransition_FORCED_TO_EXPIRED BACnetTimerTransition = 5 - BACnetTimerTransition_EXPIRED_TO_IDLE BACnetTimerTransition = 6 + BACnetTimerTransition_FORCED_TO_EXPIRED BACnetTimerTransition = 5 + BACnetTimerTransition_EXPIRED_TO_IDLE BACnetTimerTransition = 6 BACnetTimerTransition_EXPIRED_TO_RUNNING BACnetTimerTransition = 7 ) @@ -49,7 +49,7 @@ var BACnetTimerTransitionValues []BACnetTimerTransition func init() { _ = errors.New - BACnetTimerTransitionValues = []BACnetTimerTransition{ + BACnetTimerTransitionValues = []BACnetTimerTransition { BACnetTimerTransition_NONE, BACnetTimerTransition_IDLE_TO_RUNNING, BACnetTimerTransition_RUNNING_TO_IDLE, @@ -63,22 +63,22 @@ func init() { func BACnetTimerTransitionByValue(value uint8) (enum BACnetTimerTransition, ok bool) { switch value { - case 0: - return BACnetTimerTransition_NONE, true - case 1: - return BACnetTimerTransition_IDLE_TO_RUNNING, true - case 2: - return BACnetTimerTransition_RUNNING_TO_IDLE, true - case 3: - return BACnetTimerTransition_RUNNING_TO_RUNNING, true - case 4: - return BACnetTimerTransition_RUNNING_TO_EXPIRED, true - case 5: - return BACnetTimerTransition_FORCED_TO_EXPIRED, true - case 6: - return BACnetTimerTransition_EXPIRED_TO_IDLE, true - case 7: - return BACnetTimerTransition_EXPIRED_TO_RUNNING, true + case 0: + return BACnetTimerTransition_NONE, true + case 1: + return BACnetTimerTransition_IDLE_TO_RUNNING, true + case 2: + return BACnetTimerTransition_RUNNING_TO_IDLE, true + case 3: + return BACnetTimerTransition_RUNNING_TO_RUNNING, true + case 4: + return BACnetTimerTransition_RUNNING_TO_EXPIRED, true + case 5: + return BACnetTimerTransition_FORCED_TO_EXPIRED, true + case 6: + return BACnetTimerTransition_EXPIRED_TO_IDLE, true + case 7: + return BACnetTimerTransition_EXPIRED_TO_RUNNING, true } return 0, false } @@ -105,13 +105,13 @@ func BACnetTimerTransitionByName(value string) (enum BACnetTimerTransition, ok b return 0, false } -func BACnetTimerTransitionKnows(value uint8) bool { +func BACnetTimerTransitionKnows(value uint8) bool { for _, typeValue := range BACnetTimerTransitionValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetTimerTransition(structType interface{}) BACnetTimerTransition { @@ -187,3 +187,4 @@ func (e BACnetTimerTransition) PLC4XEnumName() string { func (e BACnetTimerTransition) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerTransitionTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerTransitionTagged.go index eaaa8ff3453..e9d437e4849 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerTransitionTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetTimerTransitionTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetTimerTransitionTagged is the corresponding interface of BACnetTimerTransitionTagged type BACnetTimerTransitionTagged interface { @@ -46,14 +48,15 @@ type BACnetTimerTransitionTaggedExactly interface { // _BACnetTimerTransitionTagged is the data-structure of this message type _BACnetTimerTransitionTagged struct { - Header BACnetTagHeader - Value BACnetTimerTransition + Header BACnetTagHeader + Value BACnetTimerTransition // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_BACnetTimerTransitionTagged) GetValue() BACnetTimerTransition { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetTimerTransitionTagged factory function for _BACnetTimerTransitionTagged -func NewBACnetTimerTransitionTagged(header BACnetTagHeader, value BACnetTimerTransition, tagNumber uint8, tagClass TagClass) *_BACnetTimerTransitionTagged { - return &_BACnetTimerTransitionTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetTimerTransitionTagged( header BACnetTagHeader , value BACnetTimerTransition , tagNumber uint8 , tagClass TagClass ) *_BACnetTimerTransitionTagged { +return &_BACnetTimerTransitionTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetTimerTransitionTagged(structType interface{}) BACnetTimerTransitionTagged { - if casted, ok := structType.(BACnetTimerTransitionTagged); ok { + if casted, ok := structType.(BACnetTimerTransitionTagged); ok { return casted } if casted, ok := structType.(*BACnetTimerTransitionTagged); ok { @@ -104,6 +108,7 @@ func (m *_BACnetTimerTransitionTagged) GetLengthInBits(ctx context.Context) uint return lengthInBits } + func (m *_BACnetTimerTransitionTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func BACnetTimerTransitionTaggedParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetTimerTransitionTagged") } @@ -135,12 +140,12 @@ func BACnetTimerTransitionTaggedParseWithBuffer(ctx context.Context, readBuffer } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func BACnetTimerTransitionTaggedParseWithBuffer(ctx context.Context, readBuffer } var value BACnetTimerTransition if _value != nil { - value = _value.(BACnetTimerTransition) + value = _value.(BACnetTimerTransition) } if closeErr := readBuffer.CloseContext("BACnetTimerTransitionTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func BACnetTimerTransitionTaggedParseWithBuffer(ctx context.Context, readBuffer // Create the instance return &_BACnetTimerTransitionTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_BACnetTimerTransitionTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_BACnetTimerTransitionTagged) Serialize() ([]byte, error) { func (m *_BACnetTimerTransitionTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetTimerTransitionTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetTimerTransitionTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetTimerTransitionTagged") } @@ -206,6 +211,7 @@ func (m *_BACnetTimerTransitionTagged) SerializeWithWriteBuffer(ctx context.Cont return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_BACnetTimerTransitionTagged) GetTagNumber() uint8 { func (m *_BACnetTimerTransitionTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_BACnetTimerTransitionTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceChoice.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceChoice.go index 67c2ac23a6c..342b885c36e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceChoice.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceChoice.go @@ -34,18 +34,18 @@ type IBACnetUnconfirmedServiceChoice interface { utils.Serializable } -const ( - BACnetUnconfirmedServiceChoice_I_AM BACnetUnconfirmedServiceChoice = 0x00 - BACnetUnconfirmedServiceChoice_I_HAVE BACnetUnconfirmedServiceChoice = 0x01 - BACnetUnconfirmedServiceChoice_UNCONFIRMED_COV_NOTIFICATION BACnetUnconfirmedServiceChoice = 0x02 - BACnetUnconfirmedServiceChoice_UNCONFIRMED_EVENT_NOTIFICATION BACnetUnconfirmedServiceChoice = 0x03 - BACnetUnconfirmedServiceChoice_UNCONFIRMED_PRIVATE_TRANSFER BACnetUnconfirmedServiceChoice = 0x04 - BACnetUnconfirmedServiceChoice_UNCONFIRMED_TEXT_MESSAGE BACnetUnconfirmedServiceChoice = 0x05 - BACnetUnconfirmedServiceChoice_TIME_SYNCHRONIZATION BACnetUnconfirmedServiceChoice = 0x06 - BACnetUnconfirmedServiceChoice_WHO_HAS BACnetUnconfirmedServiceChoice = 0x07 - BACnetUnconfirmedServiceChoice_WHO_IS BACnetUnconfirmedServiceChoice = 0x08 - BACnetUnconfirmedServiceChoice_UTC_TIME_SYNCHRONIZATION BACnetUnconfirmedServiceChoice = 0x09 - BACnetUnconfirmedServiceChoice_WRITE_GROUP BACnetUnconfirmedServiceChoice = 0x0A +const( + BACnetUnconfirmedServiceChoice_I_AM BACnetUnconfirmedServiceChoice = 0x00 + BACnetUnconfirmedServiceChoice_I_HAVE BACnetUnconfirmedServiceChoice = 0x01 + BACnetUnconfirmedServiceChoice_UNCONFIRMED_COV_NOTIFICATION BACnetUnconfirmedServiceChoice = 0x02 + BACnetUnconfirmedServiceChoice_UNCONFIRMED_EVENT_NOTIFICATION BACnetUnconfirmedServiceChoice = 0x03 + BACnetUnconfirmedServiceChoice_UNCONFIRMED_PRIVATE_TRANSFER BACnetUnconfirmedServiceChoice = 0x04 + BACnetUnconfirmedServiceChoice_UNCONFIRMED_TEXT_MESSAGE BACnetUnconfirmedServiceChoice = 0x05 + BACnetUnconfirmedServiceChoice_TIME_SYNCHRONIZATION BACnetUnconfirmedServiceChoice = 0x06 + BACnetUnconfirmedServiceChoice_WHO_HAS BACnetUnconfirmedServiceChoice = 0x07 + BACnetUnconfirmedServiceChoice_WHO_IS BACnetUnconfirmedServiceChoice = 0x08 + BACnetUnconfirmedServiceChoice_UTC_TIME_SYNCHRONIZATION BACnetUnconfirmedServiceChoice = 0x09 + BACnetUnconfirmedServiceChoice_WRITE_GROUP BACnetUnconfirmedServiceChoice = 0x0A BACnetUnconfirmedServiceChoice_UNCONFIRMED_COV_NOTIFICATION_MULTIPLE BACnetUnconfirmedServiceChoice = 0x0B ) @@ -53,7 +53,7 @@ var BACnetUnconfirmedServiceChoiceValues []BACnetUnconfirmedServiceChoice func init() { _ = errors.New - BACnetUnconfirmedServiceChoiceValues = []BACnetUnconfirmedServiceChoice{ + BACnetUnconfirmedServiceChoiceValues = []BACnetUnconfirmedServiceChoice { BACnetUnconfirmedServiceChoice_I_AM, BACnetUnconfirmedServiceChoice_I_HAVE, BACnetUnconfirmedServiceChoice_UNCONFIRMED_COV_NOTIFICATION, @@ -71,30 +71,30 @@ func init() { func BACnetUnconfirmedServiceChoiceByValue(value uint8) (enum BACnetUnconfirmedServiceChoice, ok bool) { switch value { - case 0x00: - return BACnetUnconfirmedServiceChoice_I_AM, true - case 0x01: - return BACnetUnconfirmedServiceChoice_I_HAVE, true - case 0x02: - return BACnetUnconfirmedServiceChoice_UNCONFIRMED_COV_NOTIFICATION, true - case 0x03: - return BACnetUnconfirmedServiceChoice_UNCONFIRMED_EVENT_NOTIFICATION, true - case 0x04: - return BACnetUnconfirmedServiceChoice_UNCONFIRMED_PRIVATE_TRANSFER, true - case 0x05: - return BACnetUnconfirmedServiceChoice_UNCONFIRMED_TEXT_MESSAGE, true - case 0x06: - return BACnetUnconfirmedServiceChoice_TIME_SYNCHRONIZATION, true - case 0x07: - return BACnetUnconfirmedServiceChoice_WHO_HAS, true - case 0x08: - return BACnetUnconfirmedServiceChoice_WHO_IS, true - case 0x09: - return BACnetUnconfirmedServiceChoice_UTC_TIME_SYNCHRONIZATION, true - case 0x0A: - return BACnetUnconfirmedServiceChoice_WRITE_GROUP, true - case 0x0B: - return BACnetUnconfirmedServiceChoice_UNCONFIRMED_COV_NOTIFICATION_MULTIPLE, true + case 0x00: + return BACnetUnconfirmedServiceChoice_I_AM, true + case 0x01: + return BACnetUnconfirmedServiceChoice_I_HAVE, true + case 0x02: + return BACnetUnconfirmedServiceChoice_UNCONFIRMED_COV_NOTIFICATION, true + case 0x03: + return BACnetUnconfirmedServiceChoice_UNCONFIRMED_EVENT_NOTIFICATION, true + case 0x04: + return BACnetUnconfirmedServiceChoice_UNCONFIRMED_PRIVATE_TRANSFER, true + case 0x05: + return BACnetUnconfirmedServiceChoice_UNCONFIRMED_TEXT_MESSAGE, true + case 0x06: + return BACnetUnconfirmedServiceChoice_TIME_SYNCHRONIZATION, true + case 0x07: + return BACnetUnconfirmedServiceChoice_WHO_HAS, true + case 0x08: + return BACnetUnconfirmedServiceChoice_WHO_IS, true + case 0x09: + return BACnetUnconfirmedServiceChoice_UTC_TIME_SYNCHRONIZATION, true + case 0x0A: + return BACnetUnconfirmedServiceChoice_WRITE_GROUP, true + case 0x0B: + return BACnetUnconfirmedServiceChoice_UNCONFIRMED_COV_NOTIFICATION_MULTIPLE, true } return 0, false } @@ -129,13 +129,13 @@ func BACnetUnconfirmedServiceChoiceByName(value string) (enum BACnetUnconfirmedS return 0, false } -func BACnetUnconfirmedServiceChoiceKnows(value uint8) bool { +func BACnetUnconfirmedServiceChoiceKnows(value uint8) bool { for _, typeValue := range BACnetUnconfirmedServiceChoiceValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetUnconfirmedServiceChoice(structType interface{}) BACnetUnconfirmedServiceChoice { @@ -219,3 +219,4 @@ func (e BACnetUnconfirmedServiceChoice) PLC4XEnumName() string { func (e BACnetUnconfirmedServiceChoice) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceChoiceTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceChoiceTagged.go index 9881afe6ab5..bbc8c2e6999 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceChoiceTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceChoiceTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetUnconfirmedServiceChoiceTagged is the corresponding interface of BACnetUnconfirmedServiceChoiceTagged type BACnetUnconfirmedServiceChoiceTagged interface { @@ -46,14 +48,15 @@ type BACnetUnconfirmedServiceChoiceTaggedExactly interface { // _BACnetUnconfirmedServiceChoiceTagged is the data-structure of this message type _BACnetUnconfirmedServiceChoiceTagged struct { - Header BACnetTagHeader - Value BACnetUnconfirmedServiceChoice + Header BACnetTagHeader + Value BACnetUnconfirmedServiceChoice // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_BACnetUnconfirmedServiceChoiceTagged) GetValue() BACnetUnconfirmedServ /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetUnconfirmedServiceChoiceTagged factory function for _BACnetUnconfirmedServiceChoiceTagged -func NewBACnetUnconfirmedServiceChoiceTagged(header BACnetTagHeader, value BACnetUnconfirmedServiceChoice, tagNumber uint8, tagClass TagClass) *_BACnetUnconfirmedServiceChoiceTagged { - return &_BACnetUnconfirmedServiceChoiceTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetUnconfirmedServiceChoiceTagged( header BACnetTagHeader , value BACnetUnconfirmedServiceChoice , tagNumber uint8 , tagClass TagClass ) *_BACnetUnconfirmedServiceChoiceTagged { +return &_BACnetUnconfirmedServiceChoiceTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetUnconfirmedServiceChoiceTagged(structType interface{}) BACnetUnconfirmedServiceChoiceTagged { - if casted, ok := structType.(BACnetUnconfirmedServiceChoiceTagged); ok { + if casted, ok := structType.(BACnetUnconfirmedServiceChoiceTagged); ok { return casted } if casted, ok := structType.(*BACnetUnconfirmedServiceChoiceTagged); ok { @@ -104,6 +108,7 @@ func (m *_BACnetUnconfirmedServiceChoiceTagged) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetUnconfirmedServiceChoiceTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func BACnetUnconfirmedServiceChoiceTaggedParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetUnconfirmedServiceChoiceTagged") } @@ -135,12 +140,12 @@ func BACnetUnconfirmedServiceChoiceTaggedParseWithBuffer(ctx context.Context, re } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func BACnetUnconfirmedServiceChoiceTaggedParseWithBuffer(ctx context.Context, re } var value BACnetUnconfirmedServiceChoice if _value != nil { - value = _value.(BACnetUnconfirmedServiceChoice) + value = _value.(BACnetUnconfirmedServiceChoice) } if closeErr := readBuffer.CloseContext("BACnetUnconfirmedServiceChoiceTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func BACnetUnconfirmedServiceChoiceTaggedParseWithBuffer(ctx context.Context, re // Create the instance return &_BACnetUnconfirmedServiceChoiceTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_BACnetUnconfirmedServiceChoiceTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_BACnetUnconfirmedServiceChoiceTagged) Serialize() ([]byte, error) { func (m *_BACnetUnconfirmedServiceChoiceTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetUnconfirmedServiceChoiceTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetUnconfirmedServiceChoiceTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetUnconfirmedServiceChoiceTagged") } @@ -206,6 +211,7 @@ func (m *_BACnetUnconfirmedServiceChoiceTagged) SerializeWithWriteBuffer(ctx con return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_BACnetUnconfirmedServiceChoiceTagged) GetTagNumber() uint8 { func (m *_BACnetUnconfirmedServiceChoiceTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_BACnetUnconfirmedServiceChoiceTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequest.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequest.go index 8c877bb15f4..40da3de9355 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequest.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetUnconfirmedServiceRequest is the corresponding interface of BACnetUnconfirmedServiceRequest type BACnetUnconfirmedServiceRequest interface { @@ -56,6 +58,7 @@ type _BACnetUnconfirmedServiceRequestChildRequirements interface { GetServiceChoice() BACnetUnconfirmedServiceChoice } + type BACnetUnconfirmedServiceRequestParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetUnconfirmedServiceRequest, serializeChildFunction func() error) error GetTypeName() string @@ -63,21 +66,22 @@ type BACnetUnconfirmedServiceRequestParent interface { type BACnetUnconfirmedServiceRequestChild interface { utils.Serializable - InitializeParent(parent BACnetUnconfirmedServiceRequest) +InitializeParent(parent BACnetUnconfirmedServiceRequest ) GetParent() *BACnetUnconfirmedServiceRequest GetTypeName() string BACnetUnconfirmedServiceRequest } + // NewBACnetUnconfirmedServiceRequest factory function for _BACnetUnconfirmedServiceRequest -func NewBACnetUnconfirmedServiceRequest(serviceRequestLength uint16) *_BACnetUnconfirmedServiceRequest { - return &_BACnetUnconfirmedServiceRequest{ServiceRequestLength: serviceRequestLength} +func NewBACnetUnconfirmedServiceRequest( serviceRequestLength uint16 ) *_BACnetUnconfirmedServiceRequest { +return &_BACnetUnconfirmedServiceRequest{ ServiceRequestLength: serviceRequestLength } } // Deprecated: use the interface for direct cast func CastBACnetUnconfirmedServiceRequest(structType interface{}) BACnetUnconfirmedServiceRequest { - if casted, ok := structType.(BACnetUnconfirmedServiceRequest); ok { + if casted, ok := structType.(BACnetUnconfirmedServiceRequest); ok { return casted } if casted, ok := structType.(*BACnetUnconfirmedServiceRequest); ok { @@ -90,10 +94,11 @@ func (m *_BACnetUnconfirmedServiceRequest) GetTypeName() string { return "BACnetUnconfirmedServiceRequest" } + func (m *_BACnetUnconfirmedServiceRequest) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Discriminator Field (serviceChoice) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } @@ -131,38 +136,38 @@ func BACnetUnconfirmedServiceRequestParseWithBuffer(ctx context.Context, readBuf // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetUnconfirmedServiceRequestChildSerializeRequirement interface { BACnetUnconfirmedServiceRequest - InitializeParent(BACnetUnconfirmedServiceRequest) + InitializeParent(BACnetUnconfirmedServiceRequest ) GetParent() BACnetUnconfirmedServiceRequest } var _childTemp interface{} var _child BACnetUnconfirmedServiceRequestChildSerializeRequirement var typeSwitchError error switch { - case serviceChoice == BACnetUnconfirmedServiceChoice_I_AM: // BACnetUnconfirmedServiceRequestIAm +case serviceChoice == BACnetUnconfirmedServiceChoice_I_AM : // BACnetUnconfirmedServiceRequestIAm _childTemp, typeSwitchError = BACnetUnconfirmedServiceRequestIAmParseWithBuffer(ctx, readBuffer, serviceRequestLength) - case serviceChoice == BACnetUnconfirmedServiceChoice_I_HAVE: // BACnetUnconfirmedServiceRequestIHave +case serviceChoice == BACnetUnconfirmedServiceChoice_I_HAVE : // BACnetUnconfirmedServiceRequestIHave _childTemp, typeSwitchError = BACnetUnconfirmedServiceRequestIHaveParseWithBuffer(ctx, readBuffer, serviceRequestLength) - case serviceChoice == BACnetUnconfirmedServiceChoice_UNCONFIRMED_COV_NOTIFICATION: // BACnetUnconfirmedServiceRequestUnconfirmedCOVNotification +case serviceChoice == BACnetUnconfirmedServiceChoice_UNCONFIRMED_COV_NOTIFICATION : // BACnetUnconfirmedServiceRequestUnconfirmedCOVNotification _childTemp, typeSwitchError = BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationParseWithBuffer(ctx, readBuffer, serviceRequestLength) - case serviceChoice == BACnetUnconfirmedServiceChoice_UNCONFIRMED_EVENT_NOTIFICATION: // BACnetUnconfirmedServiceRequestUnconfirmedEventNotification +case serviceChoice == BACnetUnconfirmedServiceChoice_UNCONFIRMED_EVENT_NOTIFICATION : // BACnetUnconfirmedServiceRequestUnconfirmedEventNotification _childTemp, typeSwitchError = BACnetUnconfirmedServiceRequestUnconfirmedEventNotificationParseWithBuffer(ctx, readBuffer, serviceRequestLength) - case serviceChoice == BACnetUnconfirmedServiceChoice_UNCONFIRMED_PRIVATE_TRANSFER: // BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer +case serviceChoice == BACnetUnconfirmedServiceChoice_UNCONFIRMED_PRIVATE_TRANSFER : // BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer _childTemp, typeSwitchError = BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransferParseWithBuffer(ctx, readBuffer, serviceRequestLength) - case serviceChoice == BACnetUnconfirmedServiceChoice_UNCONFIRMED_TEXT_MESSAGE: // BACnetUnconfirmedServiceRequestUnconfirmedTextMessage +case serviceChoice == BACnetUnconfirmedServiceChoice_UNCONFIRMED_TEXT_MESSAGE : // BACnetUnconfirmedServiceRequestUnconfirmedTextMessage _childTemp, typeSwitchError = BACnetUnconfirmedServiceRequestUnconfirmedTextMessageParseWithBuffer(ctx, readBuffer, serviceRequestLength) - case serviceChoice == BACnetUnconfirmedServiceChoice_TIME_SYNCHRONIZATION: // BACnetUnconfirmedServiceRequestTimeSynchronization +case serviceChoice == BACnetUnconfirmedServiceChoice_TIME_SYNCHRONIZATION : // BACnetUnconfirmedServiceRequestTimeSynchronization _childTemp, typeSwitchError = BACnetUnconfirmedServiceRequestTimeSynchronizationParseWithBuffer(ctx, readBuffer, serviceRequestLength) - case serviceChoice == BACnetUnconfirmedServiceChoice_WHO_HAS: // BACnetUnconfirmedServiceRequestWhoHas +case serviceChoice == BACnetUnconfirmedServiceChoice_WHO_HAS : // BACnetUnconfirmedServiceRequestWhoHas _childTemp, typeSwitchError = BACnetUnconfirmedServiceRequestWhoHasParseWithBuffer(ctx, readBuffer, serviceRequestLength) - case serviceChoice == BACnetUnconfirmedServiceChoice_WHO_IS: // BACnetUnconfirmedServiceRequestWhoIs +case serviceChoice == BACnetUnconfirmedServiceChoice_WHO_IS : // BACnetUnconfirmedServiceRequestWhoIs _childTemp, typeSwitchError = BACnetUnconfirmedServiceRequestWhoIsParseWithBuffer(ctx, readBuffer, serviceRequestLength) - case serviceChoice == BACnetUnconfirmedServiceChoice_UTC_TIME_SYNCHRONIZATION: // BACnetUnconfirmedServiceRequestUTCTimeSynchronization +case serviceChoice == BACnetUnconfirmedServiceChoice_UTC_TIME_SYNCHRONIZATION : // BACnetUnconfirmedServiceRequestUTCTimeSynchronization _childTemp, typeSwitchError = BACnetUnconfirmedServiceRequestUTCTimeSynchronizationParseWithBuffer(ctx, readBuffer, serviceRequestLength) - case serviceChoice == BACnetUnconfirmedServiceChoice_WRITE_GROUP: // BACnetUnconfirmedServiceRequestWriteGroup +case serviceChoice == BACnetUnconfirmedServiceChoice_WRITE_GROUP : // BACnetUnconfirmedServiceRequestWriteGroup _childTemp, typeSwitchError = BACnetUnconfirmedServiceRequestWriteGroupParseWithBuffer(ctx, readBuffer, serviceRequestLength) - case serviceChoice == BACnetUnconfirmedServiceChoice_UNCONFIRMED_COV_NOTIFICATION_MULTIPLE: // BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple +case serviceChoice == BACnetUnconfirmedServiceChoice_UNCONFIRMED_COV_NOTIFICATION_MULTIPLE : // BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple _childTemp, typeSwitchError = BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultipleParseWithBuffer(ctx, readBuffer, serviceRequestLength) - case 0 == 0: // BACnetUnconfirmedServiceRequestUnknown +case 0==0 : // BACnetUnconfirmedServiceRequestUnknown _childTemp, typeSwitchError = BACnetUnconfirmedServiceRequestUnknownParseWithBuffer(ctx, readBuffer, serviceRequestLength) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [serviceChoice=%v]", serviceChoice) @@ -177,7 +182,7 @@ func BACnetUnconfirmedServiceRequestParseWithBuffer(ctx context.Context, readBuf } // Finish initializing - _child.InitializeParent(_child) +_child.InitializeParent(_child ) return _child, nil } @@ -187,7 +192,7 @@ func (pm *_BACnetUnconfirmedServiceRequest) SerializeParent(ctx context.Context, _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetUnconfirmedServiceRequest"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetUnconfirmedServiceRequest"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetUnconfirmedServiceRequest") } @@ -216,13 +221,13 @@ func (pm *_BACnetUnconfirmedServiceRequest) SerializeParent(ctx context.Context, return nil } + //// // Arguments Getter func (m *_BACnetUnconfirmedServiceRequest) GetServiceRequestLength() uint16 { return m.ServiceRequestLength } - // //// @@ -240,3 +245,6 @@ func (m *_BACnetUnconfirmedServiceRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestIAm.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestIAm.go index 8dd8454b932..d96243a8676 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestIAm.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestIAm.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetUnconfirmedServiceRequestIAm is the corresponding interface of BACnetUnconfirmedServiceRequestIAm type BACnetUnconfirmedServiceRequestIAm interface { @@ -52,33 +54,32 @@ type BACnetUnconfirmedServiceRequestIAmExactly interface { // _BACnetUnconfirmedServiceRequestIAm is the data-structure of this message type _BACnetUnconfirmedServiceRequestIAm struct { *_BACnetUnconfirmedServiceRequest - DeviceIdentifier BACnetApplicationTagObjectIdentifier - MaximumApduLengthAcceptedLength BACnetApplicationTagUnsignedInteger - SegmentationSupported BACnetSegmentationTagged - VendorId BACnetVendorIdTagged + DeviceIdentifier BACnetApplicationTagObjectIdentifier + MaximumApduLengthAcceptedLength BACnetApplicationTagUnsignedInteger + SegmentationSupported BACnetSegmentationTagged + VendorId BACnetVendorIdTagged } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetUnconfirmedServiceRequestIAm) GetServiceChoice() BACnetUnconfirmedServiceChoice { - return BACnetUnconfirmedServiceChoice_I_AM -} +func (m *_BACnetUnconfirmedServiceRequestIAm) GetServiceChoice() BACnetUnconfirmedServiceChoice { +return BACnetUnconfirmedServiceChoice_I_AM} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetUnconfirmedServiceRequestIAm) InitializeParent(parent BACnetUnconfirmedServiceRequest) { -} +func (m *_BACnetUnconfirmedServiceRequestIAm) InitializeParent(parent BACnetUnconfirmedServiceRequest ) {} -func (m *_BACnetUnconfirmedServiceRequestIAm) GetParent() BACnetUnconfirmedServiceRequest { +func (m *_BACnetUnconfirmedServiceRequestIAm) GetParent() BACnetUnconfirmedServiceRequest { return m._BACnetUnconfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -105,14 +106,15 @@ func (m *_BACnetUnconfirmedServiceRequestIAm) GetVendorId() BACnetVendorIdTagged /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetUnconfirmedServiceRequestIAm factory function for _BACnetUnconfirmedServiceRequestIAm -func NewBACnetUnconfirmedServiceRequestIAm(deviceIdentifier BACnetApplicationTagObjectIdentifier, maximumApduLengthAcceptedLength BACnetApplicationTagUnsignedInteger, segmentationSupported BACnetSegmentationTagged, vendorId BACnetVendorIdTagged, serviceRequestLength uint16) *_BACnetUnconfirmedServiceRequestIAm { +func NewBACnetUnconfirmedServiceRequestIAm( deviceIdentifier BACnetApplicationTagObjectIdentifier , maximumApduLengthAcceptedLength BACnetApplicationTagUnsignedInteger , segmentationSupported BACnetSegmentationTagged , vendorId BACnetVendorIdTagged , serviceRequestLength uint16 ) *_BACnetUnconfirmedServiceRequestIAm { _result := &_BACnetUnconfirmedServiceRequestIAm{ - DeviceIdentifier: deviceIdentifier, - MaximumApduLengthAcceptedLength: maximumApduLengthAcceptedLength, - SegmentationSupported: segmentationSupported, - VendorId: vendorId, - _BACnetUnconfirmedServiceRequest: NewBACnetUnconfirmedServiceRequest(serviceRequestLength), + DeviceIdentifier: deviceIdentifier, + MaximumApduLengthAcceptedLength: maximumApduLengthAcceptedLength, + SegmentationSupported: segmentationSupported, + VendorId: vendorId, + _BACnetUnconfirmedServiceRequest: NewBACnetUnconfirmedServiceRequest(serviceRequestLength), } _result._BACnetUnconfirmedServiceRequest._BACnetUnconfirmedServiceRequestChildRequirements = _result return _result @@ -120,7 +122,7 @@ func NewBACnetUnconfirmedServiceRequestIAm(deviceIdentifier BACnetApplicationTag // Deprecated: use the interface for direct cast func CastBACnetUnconfirmedServiceRequestIAm(structType interface{}) BACnetUnconfirmedServiceRequestIAm { - if casted, ok := structType.(BACnetUnconfirmedServiceRequestIAm); ok { + if casted, ok := structType.(BACnetUnconfirmedServiceRequestIAm); ok { return casted } if casted, ok := structType.(*BACnetUnconfirmedServiceRequestIAm); ok { @@ -151,6 +153,7 @@ func (m *_BACnetUnconfirmedServiceRequestIAm) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BACnetUnconfirmedServiceRequestIAm) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -172,7 +175,7 @@ func BACnetUnconfirmedServiceRequestIAmParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("deviceIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for deviceIdentifier") } - _deviceIdentifier, _deviceIdentifierErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_deviceIdentifier, _deviceIdentifierErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _deviceIdentifierErr != nil { return nil, errors.Wrap(_deviceIdentifierErr, "Error parsing 'deviceIdentifier' field of BACnetUnconfirmedServiceRequestIAm") } @@ -185,7 +188,7 @@ func BACnetUnconfirmedServiceRequestIAmParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("maximumApduLengthAcceptedLength"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for maximumApduLengthAcceptedLength") } - _maximumApduLengthAcceptedLength, _maximumApduLengthAcceptedLengthErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_maximumApduLengthAcceptedLength, _maximumApduLengthAcceptedLengthErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _maximumApduLengthAcceptedLengthErr != nil { return nil, errors.Wrap(_maximumApduLengthAcceptedLengthErr, "Error parsing 'maximumApduLengthAcceptedLength' field of BACnetUnconfirmedServiceRequestIAm") } @@ -198,7 +201,7 @@ func BACnetUnconfirmedServiceRequestIAmParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("segmentationSupported"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for segmentationSupported") } - _segmentationSupported, _segmentationSupportedErr := BACnetSegmentationTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(9)), TagClass(TagClass_APPLICATION_TAGS)) +_segmentationSupported, _segmentationSupportedErr := BACnetSegmentationTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(9) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _segmentationSupportedErr != nil { return nil, errors.Wrap(_segmentationSupportedErr, "Error parsing 'segmentationSupported' field of BACnetUnconfirmedServiceRequestIAm") } @@ -211,7 +214,7 @@ func BACnetUnconfirmedServiceRequestIAmParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("vendorId"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for vendorId") } - _vendorId, _vendorIdErr := BACnetVendorIdTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), TagClass(TagClass_APPLICATION_TAGS)) +_vendorId, _vendorIdErr := BACnetVendorIdTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _vendorIdErr != nil { return nil, errors.Wrap(_vendorIdErr, "Error parsing 'vendorId' field of BACnetUnconfirmedServiceRequestIAm") } @@ -229,10 +232,10 @@ func BACnetUnconfirmedServiceRequestIAmParseWithBuffer(ctx context.Context, read _BACnetUnconfirmedServiceRequest: &_BACnetUnconfirmedServiceRequest{ ServiceRequestLength: serviceRequestLength, }, - DeviceIdentifier: deviceIdentifier, + DeviceIdentifier: deviceIdentifier, MaximumApduLengthAcceptedLength: maximumApduLengthAcceptedLength, - SegmentationSupported: segmentationSupported, - VendorId: vendorId, + SegmentationSupported: segmentationSupported, + VendorId: vendorId, } _child._BACnetUnconfirmedServiceRequest._BACnetUnconfirmedServiceRequestChildRequirements = _child return _child, nil @@ -254,53 +257,53 @@ func (m *_BACnetUnconfirmedServiceRequestIAm) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for BACnetUnconfirmedServiceRequestIAm") } - // Simple Field (deviceIdentifier) - if pushErr := writeBuffer.PushContext("deviceIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for deviceIdentifier") - } - _deviceIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetDeviceIdentifier()) - if popErr := writeBuffer.PopContext("deviceIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for deviceIdentifier") - } - if _deviceIdentifierErr != nil { - return errors.Wrap(_deviceIdentifierErr, "Error serializing 'deviceIdentifier' field") - } + // Simple Field (deviceIdentifier) + if pushErr := writeBuffer.PushContext("deviceIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for deviceIdentifier") + } + _deviceIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetDeviceIdentifier()) + if popErr := writeBuffer.PopContext("deviceIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for deviceIdentifier") + } + if _deviceIdentifierErr != nil { + return errors.Wrap(_deviceIdentifierErr, "Error serializing 'deviceIdentifier' field") + } - // Simple Field (maximumApduLengthAcceptedLength) - if pushErr := writeBuffer.PushContext("maximumApduLengthAcceptedLength"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for maximumApduLengthAcceptedLength") - } - _maximumApduLengthAcceptedLengthErr := writeBuffer.WriteSerializable(ctx, m.GetMaximumApduLengthAcceptedLength()) - if popErr := writeBuffer.PopContext("maximumApduLengthAcceptedLength"); popErr != nil { - return errors.Wrap(popErr, "Error popping for maximumApduLengthAcceptedLength") - } - if _maximumApduLengthAcceptedLengthErr != nil { - return errors.Wrap(_maximumApduLengthAcceptedLengthErr, "Error serializing 'maximumApduLengthAcceptedLength' field") - } + // Simple Field (maximumApduLengthAcceptedLength) + if pushErr := writeBuffer.PushContext("maximumApduLengthAcceptedLength"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for maximumApduLengthAcceptedLength") + } + _maximumApduLengthAcceptedLengthErr := writeBuffer.WriteSerializable(ctx, m.GetMaximumApduLengthAcceptedLength()) + if popErr := writeBuffer.PopContext("maximumApduLengthAcceptedLength"); popErr != nil { + return errors.Wrap(popErr, "Error popping for maximumApduLengthAcceptedLength") + } + if _maximumApduLengthAcceptedLengthErr != nil { + return errors.Wrap(_maximumApduLengthAcceptedLengthErr, "Error serializing 'maximumApduLengthAcceptedLength' field") + } - // Simple Field (segmentationSupported) - if pushErr := writeBuffer.PushContext("segmentationSupported"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for segmentationSupported") - } - _segmentationSupportedErr := writeBuffer.WriteSerializable(ctx, m.GetSegmentationSupported()) - if popErr := writeBuffer.PopContext("segmentationSupported"); popErr != nil { - return errors.Wrap(popErr, "Error popping for segmentationSupported") - } - if _segmentationSupportedErr != nil { - return errors.Wrap(_segmentationSupportedErr, "Error serializing 'segmentationSupported' field") - } + // Simple Field (segmentationSupported) + if pushErr := writeBuffer.PushContext("segmentationSupported"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for segmentationSupported") + } + _segmentationSupportedErr := writeBuffer.WriteSerializable(ctx, m.GetSegmentationSupported()) + if popErr := writeBuffer.PopContext("segmentationSupported"); popErr != nil { + return errors.Wrap(popErr, "Error popping for segmentationSupported") + } + if _segmentationSupportedErr != nil { + return errors.Wrap(_segmentationSupportedErr, "Error serializing 'segmentationSupported' field") + } - // Simple Field (vendorId) - if pushErr := writeBuffer.PushContext("vendorId"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for vendorId") - } - _vendorIdErr := writeBuffer.WriteSerializable(ctx, m.GetVendorId()) - if popErr := writeBuffer.PopContext("vendorId"); popErr != nil { - return errors.Wrap(popErr, "Error popping for vendorId") - } - if _vendorIdErr != nil { - return errors.Wrap(_vendorIdErr, "Error serializing 'vendorId' field") - } + // Simple Field (vendorId) + if pushErr := writeBuffer.PushContext("vendorId"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for vendorId") + } + _vendorIdErr := writeBuffer.WriteSerializable(ctx, m.GetVendorId()) + if popErr := writeBuffer.PopContext("vendorId"); popErr != nil { + return errors.Wrap(popErr, "Error popping for vendorId") + } + if _vendorIdErr != nil { + return errors.Wrap(_vendorIdErr, "Error serializing 'vendorId' field") + } if popErr := writeBuffer.PopContext("BACnetUnconfirmedServiceRequestIAm"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetUnconfirmedServiceRequestIAm") @@ -310,6 +313,7 @@ func (m *_BACnetUnconfirmedServiceRequestIAm) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetUnconfirmedServiceRequestIAm) isBACnetUnconfirmedServiceRequestIAm() bool { return true } @@ -324,3 +328,6 @@ func (m *_BACnetUnconfirmedServiceRequestIAm) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestIHave.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestIHave.go index 1658105af00..34470b6dce9 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestIHave.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestIHave.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetUnconfirmedServiceRequestIHave is the corresponding interface of BACnetUnconfirmedServiceRequestIHave type BACnetUnconfirmedServiceRequestIHave interface { @@ -50,32 +52,31 @@ type BACnetUnconfirmedServiceRequestIHaveExactly interface { // _BACnetUnconfirmedServiceRequestIHave is the data-structure of this message type _BACnetUnconfirmedServiceRequestIHave struct { *_BACnetUnconfirmedServiceRequest - DeviceIdentifier BACnetApplicationTagObjectIdentifier - ObjectIdentifier BACnetApplicationTagObjectIdentifier - ObjectName BACnetApplicationTagCharacterString + DeviceIdentifier BACnetApplicationTagObjectIdentifier + ObjectIdentifier BACnetApplicationTagObjectIdentifier + ObjectName BACnetApplicationTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetUnconfirmedServiceRequestIHave) GetServiceChoice() BACnetUnconfirmedServiceChoice { - return BACnetUnconfirmedServiceChoice_I_HAVE -} +func (m *_BACnetUnconfirmedServiceRequestIHave) GetServiceChoice() BACnetUnconfirmedServiceChoice { +return BACnetUnconfirmedServiceChoice_I_HAVE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetUnconfirmedServiceRequestIHave) InitializeParent(parent BACnetUnconfirmedServiceRequest) { -} +func (m *_BACnetUnconfirmedServiceRequestIHave) InitializeParent(parent BACnetUnconfirmedServiceRequest ) {} -func (m *_BACnetUnconfirmedServiceRequestIHave) GetParent() BACnetUnconfirmedServiceRequest { +func (m *_BACnetUnconfirmedServiceRequestIHave) GetParent() BACnetUnconfirmedServiceRequest { return m._BACnetUnconfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,13 +99,14 @@ func (m *_BACnetUnconfirmedServiceRequestIHave) GetObjectName() BACnetApplicatio /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetUnconfirmedServiceRequestIHave factory function for _BACnetUnconfirmedServiceRequestIHave -func NewBACnetUnconfirmedServiceRequestIHave(deviceIdentifier BACnetApplicationTagObjectIdentifier, objectIdentifier BACnetApplicationTagObjectIdentifier, objectName BACnetApplicationTagCharacterString, serviceRequestLength uint16) *_BACnetUnconfirmedServiceRequestIHave { +func NewBACnetUnconfirmedServiceRequestIHave( deviceIdentifier BACnetApplicationTagObjectIdentifier , objectIdentifier BACnetApplicationTagObjectIdentifier , objectName BACnetApplicationTagCharacterString , serviceRequestLength uint16 ) *_BACnetUnconfirmedServiceRequestIHave { _result := &_BACnetUnconfirmedServiceRequestIHave{ - DeviceIdentifier: deviceIdentifier, - ObjectIdentifier: objectIdentifier, - ObjectName: objectName, - _BACnetUnconfirmedServiceRequest: NewBACnetUnconfirmedServiceRequest(serviceRequestLength), + DeviceIdentifier: deviceIdentifier, + ObjectIdentifier: objectIdentifier, + ObjectName: objectName, + _BACnetUnconfirmedServiceRequest: NewBACnetUnconfirmedServiceRequest(serviceRequestLength), } _result._BACnetUnconfirmedServiceRequest._BACnetUnconfirmedServiceRequestChildRequirements = _result return _result @@ -112,7 +114,7 @@ func NewBACnetUnconfirmedServiceRequestIHave(deviceIdentifier BACnetApplicationT // Deprecated: use the interface for direct cast func CastBACnetUnconfirmedServiceRequestIHave(structType interface{}) BACnetUnconfirmedServiceRequestIHave { - if casted, ok := structType.(BACnetUnconfirmedServiceRequestIHave); ok { + if casted, ok := structType.(BACnetUnconfirmedServiceRequestIHave); ok { return casted } if casted, ok := structType.(*BACnetUnconfirmedServiceRequestIHave); ok { @@ -140,6 +142,7 @@ func (m *_BACnetUnconfirmedServiceRequestIHave) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetUnconfirmedServiceRequestIHave) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -161,7 +164,7 @@ func BACnetUnconfirmedServiceRequestIHaveParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("deviceIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for deviceIdentifier") } - _deviceIdentifier, _deviceIdentifierErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_deviceIdentifier, _deviceIdentifierErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _deviceIdentifierErr != nil { return nil, errors.Wrap(_deviceIdentifierErr, "Error parsing 'deviceIdentifier' field of BACnetUnconfirmedServiceRequestIHave") } @@ -174,7 +177,7 @@ func BACnetUnconfirmedServiceRequestIHaveParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("objectIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for objectIdentifier") } - _objectIdentifier, _objectIdentifierErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_objectIdentifier, _objectIdentifierErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _objectIdentifierErr != nil { return nil, errors.Wrap(_objectIdentifierErr, "Error parsing 'objectIdentifier' field of BACnetUnconfirmedServiceRequestIHave") } @@ -187,7 +190,7 @@ func BACnetUnconfirmedServiceRequestIHaveParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("objectName"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for objectName") } - _objectName, _objectNameErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_objectName, _objectNameErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _objectNameErr != nil { return nil, errors.Wrap(_objectNameErr, "Error parsing 'objectName' field of BACnetUnconfirmedServiceRequestIHave") } @@ -207,7 +210,7 @@ func BACnetUnconfirmedServiceRequestIHaveParseWithBuffer(ctx context.Context, re }, DeviceIdentifier: deviceIdentifier, ObjectIdentifier: objectIdentifier, - ObjectName: objectName, + ObjectName: objectName, } _child._BACnetUnconfirmedServiceRequest._BACnetUnconfirmedServiceRequestChildRequirements = _child return _child, nil @@ -229,41 +232,41 @@ func (m *_BACnetUnconfirmedServiceRequestIHave) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetUnconfirmedServiceRequestIHave") } - // Simple Field (deviceIdentifier) - if pushErr := writeBuffer.PushContext("deviceIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for deviceIdentifier") - } - _deviceIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetDeviceIdentifier()) - if popErr := writeBuffer.PopContext("deviceIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for deviceIdentifier") - } - if _deviceIdentifierErr != nil { - return errors.Wrap(_deviceIdentifierErr, "Error serializing 'deviceIdentifier' field") - } + // Simple Field (deviceIdentifier) + if pushErr := writeBuffer.PushContext("deviceIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for deviceIdentifier") + } + _deviceIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetDeviceIdentifier()) + if popErr := writeBuffer.PopContext("deviceIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for deviceIdentifier") + } + if _deviceIdentifierErr != nil { + return errors.Wrap(_deviceIdentifierErr, "Error serializing 'deviceIdentifier' field") + } - // Simple Field (objectIdentifier) - if pushErr := writeBuffer.PushContext("objectIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for objectIdentifier") - } - _objectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetObjectIdentifier()) - if popErr := writeBuffer.PopContext("objectIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for objectIdentifier") - } - if _objectIdentifierErr != nil { - return errors.Wrap(_objectIdentifierErr, "Error serializing 'objectIdentifier' field") - } + // Simple Field (objectIdentifier) + if pushErr := writeBuffer.PushContext("objectIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for objectIdentifier") + } + _objectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetObjectIdentifier()) + if popErr := writeBuffer.PopContext("objectIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for objectIdentifier") + } + if _objectIdentifierErr != nil { + return errors.Wrap(_objectIdentifierErr, "Error serializing 'objectIdentifier' field") + } - // Simple Field (objectName) - if pushErr := writeBuffer.PushContext("objectName"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for objectName") - } - _objectNameErr := writeBuffer.WriteSerializable(ctx, m.GetObjectName()) - if popErr := writeBuffer.PopContext("objectName"); popErr != nil { - return errors.Wrap(popErr, "Error popping for objectName") - } - if _objectNameErr != nil { - return errors.Wrap(_objectNameErr, "Error serializing 'objectName' field") - } + // Simple Field (objectName) + if pushErr := writeBuffer.PushContext("objectName"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for objectName") + } + _objectNameErr := writeBuffer.WriteSerializable(ctx, m.GetObjectName()) + if popErr := writeBuffer.PopContext("objectName"); popErr != nil { + return errors.Wrap(popErr, "Error popping for objectName") + } + if _objectNameErr != nil { + return errors.Wrap(_objectNameErr, "Error serializing 'objectName' field") + } if popErr := writeBuffer.PopContext("BACnetUnconfirmedServiceRequestIHave"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetUnconfirmedServiceRequestIHave") @@ -273,6 +276,7 @@ func (m *_BACnetUnconfirmedServiceRequestIHave) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetUnconfirmedServiceRequestIHave) isBACnetUnconfirmedServiceRequestIHave() bool { return true } @@ -287,3 +291,6 @@ func (m *_BACnetUnconfirmedServiceRequestIHave) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestTimeSynchronization.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestTimeSynchronization.go index 7d12daa22e0..02a8df0704c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestTimeSynchronization.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestTimeSynchronization.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetUnconfirmedServiceRequestTimeSynchronization is the corresponding interface of BACnetUnconfirmedServiceRequestTimeSynchronization type BACnetUnconfirmedServiceRequestTimeSynchronization interface { @@ -48,31 +50,30 @@ type BACnetUnconfirmedServiceRequestTimeSynchronizationExactly interface { // _BACnetUnconfirmedServiceRequestTimeSynchronization is the data-structure of this message type _BACnetUnconfirmedServiceRequestTimeSynchronization struct { *_BACnetUnconfirmedServiceRequest - SynchronizedDate BACnetApplicationTagDate - SynchronizedTime BACnetApplicationTagTime + SynchronizedDate BACnetApplicationTagDate + SynchronizedTime BACnetApplicationTagTime } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetUnconfirmedServiceRequestTimeSynchronization) GetServiceChoice() BACnetUnconfirmedServiceChoice { - return BACnetUnconfirmedServiceChoice_TIME_SYNCHRONIZATION -} +func (m *_BACnetUnconfirmedServiceRequestTimeSynchronization) GetServiceChoice() BACnetUnconfirmedServiceChoice { +return BACnetUnconfirmedServiceChoice_TIME_SYNCHRONIZATION} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetUnconfirmedServiceRequestTimeSynchronization) InitializeParent(parent BACnetUnconfirmedServiceRequest) { -} +func (m *_BACnetUnconfirmedServiceRequestTimeSynchronization) InitializeParent(parent BACnetUnconfirmedServiceRequest ) {} -func (m *_BACnetUnconfirmedServiceRequestTimeSynchronization) GetParent() BACnetUnconfirmedServiceRequest { +func (m *_BACnetUnconfirmedServiceRequestTimeSynchronization) GetParent() BACnetUnconfirmedServiceRequest { return m._BACnetUnconfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -91,12 +92,13 @@ func (m *_BACnetUnconfirmedServiceRequestTimeSynchronization) GetSynchronizedTim /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetUnconfirmedServiceRequestTimeSynchronization factory function for _BACnetUnconfirmedServiceRequestTimeSynchronization -func NewBACnetUnconfirmedServiceRequestTimeSynchronization(synchronizedDate BACnetApplicationTagDate, synchronizedTime BACnetApplicationTagTime, serviceRequestLength uint16) *_BACnetUnconfirmedServiceRequestTimeSynchronization { +func NewBACnetUnconfirmedServiceRequestTimeSynchronization( synchronizedDate BACnetApplicationTagDate , synchronizedTime BACnetApplicationTagTime , serviceRequestLength uint16 ) *_BACnetUnconfirmedServiceRequestTimeSynchronization { _result := &_BACnetUnconfirmedServiceRequestTimeSynchronization{ - SynchronizedDate: synchronizedDate, - SynchronizedTime: synchronizedTime, - _BACnetUnconfirmedServiceRequest: NewBACnetUnconfirmedServiceRequest(serviceRequestLength), + SynchronizedDate: synchronizedDate, + SynchronizedTime: synchronizedTime, + _BACnetUnconfirmedServiceRequest: NewBACnetUnconfirmedServiceRequest(serviceRequestLength), } _result._BACnetUnconfirmedServiceRequest._BACnetUnconfirmedServiceRequestChildRequirements = _result return _result @@ -104,7 +106,7 @@ func NewBACnetUnconfirmedServiceRequestTimeSynchronization(synchronizedDate BACn // Deprecated: use the interface for direct cast func CastBACnetUnconfirmedServiceRequestTimeSynchronization(structType interface{}) BACnetUnconfirmedServiceRequestTimeSynchronization { - if casted, ok := structType.(BACnetUnconfirmedServiceRequestTimeSynchronization); ok { + if casted, ok := structType.(BACnetUnconfirmedServiceRequestTimeSynchronization); ok { return casted } if casted, ok := structType.(*BACnetUnconfirmedServiceRequestTimeSynchronization); ok { @@ -129,6 +131,7 @@ func (m *_BACnetUnconfirmedServiceRequestTimeSynchronization) GetLengthInBits(ct return lengthInBits } + func (m *_BACnetUnconfirmedServiceRequestTimeSynchronization) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -150,7 +153,7 @@ func BACnetUnconfirmedServiceRequestTimeSynchronizationParseWithBuffer(ctx conte if pullErr := readBuffer.PullContext("synchronizedDate"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for synchronizedDate") } - _synchronizedDate, _synchronizedDateErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_synchronizedDate, _synchronizedDateErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _synchronizedDateErr != nil { return nil, errors.Wrap(_synchronizedDateErr, "Error parsing 'synchronizedDate' field of BACnetUnconfirmedServiceRequestTimeSynchronization") } @@ -163,7 +166,7 @@ func BACnetUnconfirmedServiceRequestTimeSynchronizationParseWithBuffer(ctx conte if pullErr := readBuffer.PullContext("synchronizedTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for synchronizedTime") } - _synchronizedTime, _synchronizedTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_synchronizedTime, _synchronizedTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _synchronizedTimeErr != nil { return nil, errors.Wrap(_synchronizedTimeErr, "Error parsing 'synchronizedTime' field of BACnetUnconfirmedServiceRequestTimeSynchronization") } @@ -204,29 +207,29 @@ func (m *_BACnetUnconfirmedServiceRequestTimeSynchronization) SerializeWithWrite return errors.Wrap(pushErr, "Error pushing for BACnetUnconfirmedServiceRequestTimeSynchronization") } - // Simple Field (synchronizedDate) - if pushErr := writeBuffer.PushContext("synchronizedDate"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for synchronizedDate") - } - _synchronizedDateErr := writeBuffer.WriteSerializable(ctx, m.GetSynchronizedDate()) - if popErr := writeBuffer.PopContext("synchronizedDate"); popErr != nil { - return errors.Wrap(popErr, "Error popping for synchronizedDate") - } - if _synchronizedDateErr != nil { - return errors.Wrap(_synchronizedDateErr, "Error serializing 'synchronizedDate' field") - } + // Simple Field (synchronizedDate) + if pushErr := writeBuffer.PushContext("synchronizedDate"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for synchronizedDate") + } + _synchronizedDateErr := writeBuffer.WriteSerializable(ctx, m.GetSynchronizedDate()) + if popErr := writeBuffer.PopContext("synchronizedDate"); popErr != nil { + return errors.Wrap(popErr, "Error popping for synchronizedDate") + } + if _synchronizedDateErr != nil { + return errors.Wrap(_synchronizedDateErr, "Error serializing 'synchronizedDate' field") + } - // Simple Field (synchronizedTime) - if pushErr := writeBuffer.PushContext("synchronizedTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for synchronizedTime") - } - _synchronizedTimeErr := writeBuffer.WriteSerializable(ctx, m.GetSynchronizedTime()) - if popErr := writeBuffer.PopContext("synchronizedTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for synchronizedTime") - } - if _synchronizedTimeErr != nil { - return errors.Wrap(_synchronizedTimeErr, "Error serializing 'synchronizedTime' field") - } + // Simple Field (synchronizedTime) + if pushErr := writeBuffer.PushContext("synchronizedTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for synchronizedTime") + } + _synchronizedTimeErr := writeBuffer.WriteSerializable(ctx, m.GetSynchronizedTime()) + if popErr := writeBuffer.PopContext("synchronizedTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for synchronizedTime") + } + if _synchronizedTimeErr != nil { + return errors.Wrap(_synchronizedTimeErr, "Error serializing 'synchronizedTime' field") + } if popErr := writeBuffer.PopContext("BACnetUnconfirmedServiceRequestTimeSynchronization"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetUnconfirmedServiceRequestTimeSynchronization") @@ -236,6 +239,7 @@ func (m *_BACnetUnconfirmedServiceRequestTimeSynchronization) SerializeWithWrite return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetUnconfirmedServiceRequestTimeSynchronization) isBACnetUnconfirmedServiceRequestTimeSynchronization() bool { return true } @@ -250,3 +254,6 @@ func (m *_BACnetUnconfirmedServiceRequestTimeSynchronization) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestUTCTimeSynchronization.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestUTCTimeSynchronization.go index a8282e17ae9..5fccd18615a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestUTCTimeSynchronization.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestUTCTimeSynchronization.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetUnconfirmedServiceRequestUTCTimeSynchronization is the corresponding interface of BACnetUnconfirmedServiceRequestUTCTimeSynchronization type BACnetUnconfirmedServiceRequestUTCTimeSynchronization interface { @@ -48,31 +50,30 @@ type BACnetUnconfirmedServiceRequestUTCTimeSynchronizationExactly interface { // _BACnetUnconfirmedServiceRequestUTCTimeSynchronization is the data-structure of this message type _BACnetUnconfirmedServiceRequestUTCTimeSynchronization struct { *_BACnetUnconfirmedServiceRequest - SynchronizedDate BACnetApplicationTagDate - SynchronizedTime BACnetApplicationTagTime + SynchronizedDate BACnetApplicationTagDate + SynchronizedTime BACnetApplicationTagTime } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetUnconfirmedServiceRequestUTCTimeSynchronization) GetServiceChoice() BACnetUnconfirmedServiceChoice { - return BACnetUnconfirmedServiceChoice_UTC_TIME_SYNCHRONIZATION -} +func (m *_BACnetUnconfirmedServiceRequestUTCTimeSynchronization) GetServiceChoice() BACnetUnconfirmedServiceChoice { +return BACnetUnconfirmedServiceChoice_UTC_TIME_SYNCHRONIZATION} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetUnconfirmedServiceRequestUTCTimeSynchronization) InitializeParent(parent BACnetUnconfirmedServiceRequest) { -} +func (m *_BACnetUnconfirmedServiceRequestUTCTimeSynchronization) InitializeParent(parent BACnetUnconfirmedServiceRequest ) {} -func (m *_BACnetUnconfirmedServiceRequestUTCTimeSynchronization) GetParent() BACnetUnconfirmedServiceRequest { +func (m *_BACnetUnconfirmedServiceRequestUTCTimeSynchronization) GetParent() BACnetUnconfirmedServiceRequest { return m._BACnetUnconfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -91,12 +92,13 @@ func (m *_BACnetUnconfirmedServiceRequestUTCTimeSynchronization) GetSynchronized /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetUnconfirmedServiceRequestUTCTimeSynchronization factory function for _BACnetUnconfirmedServiceRequestUTCTimeSynchronization -func NewBACnetUnconfirmedServiceRequestUTCTimeSynchronization(synchronizedDate BACnetApplicationTagDate, synchronizedTime BACnetApplicationTagTime, serviceRequestLength uint16) *_BACnetUnconfirmedServiceRequestUTCTimeSynchronization { +func NewBACnetUnconfirmedServiceRequestUTCTimeSynchronization( synchronizedDate BACnetApplicationTagDate , synchronizedTime BACnetApplicationTagTime , serviceRequestLength uint16 ) *_BACnetUnconfirmedServiceRequestUTCTimeSynchronization { _result := &_BACnetUnconfirmedServiceRequestUTCTimeSynchronization{ - SynchronizedDate: synchronizedDate, - SynchronizedTime: synchronizedTime, - _BACnetUnconfirmedServiceRequest: NewBACnetUnconfirmedServiceRequest(serviceRequestLength), + SynchronizedDate: synchronizedDate, + SynchronizedTime: synchronizedTime, + _BACnetUnconfirmedServiceRequest: NewBACnetUnconfirmedServiceRequest(serviceRequestLength), } _result._BACnetUnconfirmedServiceRequest._BACnetUnconfirmedServiceRequestChildRequirements = _result return _result @@ -104,7 +106,7 @@ func NewBACnetUnconfirmedServiceRequestUTCTimeSynchronization(synchronizedDate B // Deprecated: use the interface for direct cast func CastBACnetUnconfirmedServiceRequestUTCTimeSynchronization(structType interface{}) BACnetUnconfirmedServiceRequestUTCTimeSynchronization { - if casted, ok := structType.(BACnetUnconfirmedServiceRequestUTCTimeSynchronization); ok { + if casted, ok := structType.(BACnetUnconfirmedServiceRequestUTCTimeSynchronization); ok { return casted } if casted, ok := structType.(*BACnetUnconfirmedServiceRequestUTCTimeSynchronization); ok { @@ -129,6 +131,7 @@ func (m *_BACnetUnconfirmedServiceRequestUTCTimeSynchronization) GetLengthInBits return lengthInBits } + func (m *_BACnetUnconfirmedServiceRequestUTCTimeSynchronization) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -150,7 +153,7 @@ func BACnetUnconfirmedServiceRequestUTCTimeSynchronizationParseWithBuffer(ctx co if pullErr := readBuffer.PullContext("synchronizedDate"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for synchronizedDate") } - _synchronizedDate, _synchronizedDateErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_synchronizedDate, _synchronizedDateErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _synchronizedDateErr != nil { return nil, errors.Wrap(_synchronizedDateErr, "Error parsing 'synchronizedDate' field of BACnetUnconfirmedServiceRequestUTCTimeSynchronization") } @@ -163,7 +166,7 @@ func BACnetUnconfirmedServiceRequestUTCTimeSynchronizationParseWithBuffer(ctx co if pullErr := readBuffer.PullContext("synchronizedTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for synchronizedTime") } - _synchronizedTime, _synchronizedTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_synchronizedTime, _synchronizedTimeErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _synchronizedTimeErr != nil { return nil, errors.Wrap(_synchronizedTimeErr, "Error parsing 'synchronizedTime' field of BACnetUnconfirmedServiceRequestUTCTimeSynchronization") } @@ -204,29 +207,29 @@ func (m *_BACnetUnconfirmedServiceRequestUTCTimeSynchronization) SerializeWithWr return errors.Wrap(pushErr, "Error pushing for BACnetUnconfirmedServiceRequestUTCTimeSynchronization") } - // Simple Field (synchronizedDate) - if pushErr := writeBuffer.PushContext("synchronizedDate"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for synchronizedDate") - } - _synchronizedDateErr := writeBuffer.WriteSerializable(ctx, m.GetSynchronizedDate()) - if popErr := writeBuffer.PopContext("synchronizedDate"); popErr != nil { - return errors.Wrap(popErr, "Error popping for synchronizedDate") - } - if _synchronizedDateErr != nil { - return errors.Wrap(_synchronizedDateErr, "Error serializing 'synchronizedDate' field") - } + // Simple Field (synchronizedDate) + if pushErr := writeBuffer.PushContext("synchronizedDate"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for synchronizedDate") + } + _synchronizedDateErr := writeBuffer.WriteSerializable(ctx, m.GetSynchronizedDate()) + if popErr := writeBuffer.PopContext("synchronizedDate"); popErr != nil { + return errors.Wrap(popErr, "Error popping for synchronizedDate") + } + if _synchronizedDateErr != nil { + return errors.Wrap(_synchronizedDateErr, "Error serializing 'synchronizedDate' field") + } - // Simple Field (synchronizedTime) - if pushErr := writeBuffer.PushContext("synchronizedTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for synchronizedTime") - } - _synchronizedTimeErr := writeBuffer.WriteSerializable(ctx, m.GetSynchronizedTime()) - if popErr := writeBuffer.PopContext("synchronizedTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for synchronizedTime") - } - if _synchronizedTimeErr != nil { - return errors.Wrap(_synchronizedTimeErr, "Error serializing 'synchronizedTime' field") - } + // Simple Field (synchronizedTime) + if pushErr := writeBuffer.PushContext("synchronizedTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for synchronizedTime") + } + _synchronizedTimeErr := writeBuffer.WriteSerializable(ctx, m.GetSynchronizedTime()) + if popErr := writeBuffer.PopContext("synchronizedTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for synchronizedTime") + } + if _synchronizedTimeErr != nil { + return errors.Wrap(_synchronizedTimeErr, "Error serializing 'synchronizedTime' field") + } if popErr := writeBuffer.PopContext("BACnetUnconfirmedServiceRequestUTCTimeSynchronization"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetUnconfirmedServiceRequestUTCTimeSynchronization") @@ -236,6 +239,7 @@ func (m *_BACnetUnconfirmedServiceRequestUTCTimeSynchronization) SerializeWithWr return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetUnconfirmedServiceRequestUTCTimeSynchronization) isBACnetUnconfirmedServiceRequestUTCTimeSynchronization() bool { return true } @@ -250,3 +254,6 @@ func (m *_BACnetUnconfirmedServiceRequestUTCTimeSynchronization) String() string } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestUnconfirmedCOVNotification.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestUnconfirmedCOVNotification.go index 6a460daeeb9..ab0f267b36c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestUnconfirmedCOVNotification.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestUnconfirmedCOVNotification.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetUnconfirmedServiceRequestUnconfirmedCOVNotification is the corresponding interface of BACnetUnconfirmedServiceRequestUnconfirmedCOVNotification type BACnetUnconfirmedServiceRequestUnconfirmedCOVNotification interface { @@ -54,34 +56,33 @@ type BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationExactly interface // _BACnetUnconfirmedServiceRequestUnconfirmedCOVNotification is the data-structure of this message type _BACnetUnconfirmedServiceRequestUnconfirmedCOVNotification struct { *_BACnetUnconfirmedServiceRequest - SubscriberProcessIdentifier BACnetContextTagUnsignedInteger - InitiatingDeviceIdentifier BACnetContextTagObjectIdentifier - MonitoredObjectIdentifier BACnetContextTagObjectIdentifier - LifetimeInSeconds BACnetContextTagUnsignedInteger - ListOfValues BACnetPropertyValues + SubscriberProcessIdentifier BACnetContextTagUnsignedInteger + InitiatingDeviceIdentifier BACnetContextTagObjectIdentifier + MonitoredObjectIdentifier BACnetContextTagObjectIdentifier + LifetimeInSeconds BACnetContextTagUnsignedInteger + ListOfValues BACnetPropertyValues } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetUnconfirmedServiceRequestUnconfirmedCOVNotification) GetServiceChoice() BACnetUnconfirmedServiceChoice { - return BACnetUnconfirmedServiceChoice_UNCONFIRMED_COV_NOTIFICATION -} +func (m *_BACnetUnconfirmedServiceRequestUnconfirmedCOVNotification) GetServiceChoice() BACnetUnconfirmedServiceChoice { +return BACnetUnconfirmedServiceChoice_UNCONFIRMED_COV_NOTIFICATION} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetUnconfirmedServiceRequestUnconfirmedCOVNotification) InitializeParent(parent BACnetUnconfirmedServiceRequest) { -} +func (m *_BACnetUnconfirmedServiceRequestUnconfirmedCOVNotification) InitializeParent(parent BACnetUnconfirmedServiceRequest ) {} -func (m *_BACnetUnconfirmedServiceRequestUnconfirmedCOVNotification) GetParent() BACnetUnconfirmedServiceRequest { +func (m *_BACnetUnconfirmedServiceRequestUnconfirmedCOVNotification) GetParent() BACnetUnconfirmedServiceRequest { return m._BACnetUnconfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -112,15 +113,16 @@ func (m *_BACnetUnconfirmedServiceRequestUnconfirmedCOVNotification) GetListOfVa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetUnconfirmedServiceRequestUnconfirmedCOVNotification factory function for _BACnetUnconfirmedServiceRequestUnconfirmedCOVNotification -func NewBACnetUnconfirmedServiceRequestUnconfirmedCOVNotification(subscriberProcessIdentifier BACnetContextTagUnsignedInteger, initiatingDeviceIdentifier BACnetContextTagObjectIdentifier, monitoredObjectIdentifier BACnetContextTagObjectIdentifier, lifetimeInSeconds BACnetContextTagUnsignedInteger, listOfValues BACnetPropertyValues, serviceRequestLength uint16) *_BACnetUnconfirmedServiceRequestUnconfirmedCOVNotification { +func NewBACnetUnconfirmedServiceRequestUnconfirmedCOVNotification( subscriberProcessIdentifier BACnetContextTagUnsignedInteger , initiatingDeviceIdentifier BACnetContextTagObjectIdentifier , monitoredObjectIdentifier BACnetContextTagObjectIdentifier , lifetimeInSeconds BACnetContextTagUnsignedInteger , listOfValues BACnetPropertyValues , serviceRequestLength uint16 ) *_BACnetUnconfirmedServiceRequestUnconfirmedCOVNotification { _result := &_BACnetUnconfirmedServiceRequestUnconfirmedCOVNotification{ - SubscriberProcessIdentifier: subscriberProcessIdentifier, - InitiatingDeviceIdentifier: initiatingDeviceIdentifier, - MonitoredObjectIdentifier: monitoredObjectIdentifier, - LifetimeInSeconds: lifetimeInSeconds, - ListOfValues: listOfValues, - _BACnetUnconfirmedServiceRequest: NewBACnetUnconfirmedServiceRequest(serviceRequestLength), + SubscriberProcessIdentifier: subscriberProcessIdentifier, + InitiatingDeviceIdentifier: initiatingDeviceIdentifier, + MonitoredObjectIdentifier: monitoredObjectIdentifier, + LifetimeInSeconds: lifetimeInSeconds, + ListOfValues: listOfValues, + _BACnetUnconfirmedServiceRequest: NewBACnetUnconfirmedServiceRequest(serviceRequestLength), } _result._BACnetUnconfirmedServiceRequest._BACnetUnconfirmedServiceRequestChildRequirements = _result return _result @@ -128,7 +130,7 @@ func NewBACnetUnconfirmedServiceRequestUnconfirmedCOVNotification(subscriberProc // Deprecated: use the interface for direct cast func CastBACnetUnconfirmedServiceRequestUnconfirmedCOVNotification(structType interface{}) BACnetUnconfirmedServiceRequestUnconfirmedCOVNotification { - if casted, ok := structType.(BACnetUnconfirmedServiceRequestUnconfirmedCOVNotification); ok { + if casted, ok := structType.(BACnetUnconfirmedServiceRequestUnconfirmedCOVNotification); ok { return casted } if casted, ok := structType.(*BACnetUnconfirmedServiceRequestUnconfirmedCOVNotification); ok { @@ -162,6 +164,7 @@ func (m *_BACnetUnconfirmedServiceRequestUnconfirmedCOVNotification) GetLengthIn return lengthInBits } + func (m *_BACnetUnconfirmedServiceRequestUnconfirmedCOVNotification) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -183,7 +186,7 @@ func BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationParseWithBuffer(ct if pullErr := readBuffer.PullContext("subscriberProcessIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for subscriberProcessIdentifier") } - _subscriberProcessIdentifier, _subscriberProcessIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_subscriberProcessIdentifier, _subscriberProcessIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _subscriberProcessIdentifierErr != nil { return nil, errors.Wrap(_subscriberProcessIdentifierErr, "Error parsing 'subscriberProcessIdentifier' field of BACnetUnconfirmedServiceRequestUnconfirmedCOVNotification") } @@ -196,7 +199,7 @@ func BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationParseWithBuffer(ct if pullErr := readBuffer.PullContext("initiatingDeviceIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for initiatingDeviceIdentifier") } - _initiatingDeviceIdentifier, _initiatingDeviceIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER)) +_initiatingDeviceIdentifier, _initiatingDeviceIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_BACNET_OBJECT_IDENTIFIER ) ) if _initiatingDeviceIdentifierErr != nil { return nil, errors.Wrap(_initiatingDeviceIdentifierErr, "Error parsing 'initiatingDeviceIdentifier' field of BACnetUnconfirmedServiceRequestUnconfirmedCOVNotification") } @@ -209,7 +212,7 @@ func BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationParseWithBuffer(ct if pullErr := readBuffer.PullContext("monitoredObjectIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for monitoredObjectIdentifier") } - _monitoredObjectIdentifier, _monitoredObjectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER)) +_monitoredObjectIdentifier, _monitoredObjectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , BACnetDataType( BACnetDataType_BACNET_OBJECT_IDENTIFIER ) ) if _monitoredObjectIdentifierErr != nil { return nil, errors.Wrap(_monitoredObjectIdentifierErr, "Error parsing 'monitoredObjectIdentifier' field of BACnetUnconfirmedServiceRequestUnconfirmedCOVNotification") } @@ -222,7 +225,7 @@ func BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationParseWithBuffer(ct if pullErr := readBuffer.PullContext("lifetimeInSeconds"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lifetimeInSeconds") } - _lifetimeInSeconds, _lifetimeInSecondsErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(3)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_lifetimeInSeconds, _lifetimeInSecondsErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(3) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _lifetimeInSecondsErr != nil { return nil, errors.Wrap(_lifetimeInSecondsErr, "Error parsing 'lifetimeInSeconds' field of BACnetUnconfirmedServiceRequestUnconfirmedCOVNotification") } @@ -235,7 +238,7 @@ func BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationParseWithBuffer(ct if pullErr := readBuffer.PullContext("listOfValues"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for listOfValues") } - _listOfValues, _listOfValuesErr := BACnetPropertyValuesParseWithBuffer(ctx, readBuffer, uint8(uint8(4)), BACnetObjectType(monitoredObjectIdentifier.GetObjectType())) +_listOfValues, _listOfValuesErr := BACnetPropertyValuesParseWithBuffer(ctx, readBuffer , uint8( uint8(4) ) , BACnetObjectType( monitoredObjectIdentifier.GetObjectType() ) ) if _listOfValuesErr != nil { return nil, errors.Wrap(_listOfValuesErr, "Error parsing 'listOfValues' field of BACnetUnconfirmedServiceRequestUnconfirmedCOVNotification") } @@ -254,10 +257,10 @@ func BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationParseWithBuffer(ct ServiceRequestLength: serviceRequestLength, }, SubscriberProcessIdentifier: subscriberProcessIdentifier, - InitiatingDeviceIdentifier: initiatingDeviceIdentifier, - MonitoredObjectIdentifier: monitoredObjectIdentifier, - LifetimeInSeconds: lifetimeInSeconds, - ListOfValues: listOfValues, + InitiatingDeviceIdentifier: initiatingDeviceIdentifier, + MonitoredObjectIdentifier: monitoredObjectIdentifier, + LifetimeInSeconds: lifetimeInSeconds, + ListOfValues: listOfValues, } _child._BACnetUnconfirmedServiceRequest._BACnetUnconfirmedServiceRequestChildRequirements = _child return _child, nil @@ -279,65 +282,65 @@ func (m *_BACnetUnconfirmedServiceRequestUnconfirmedCOVNotification) SerializeWi return errors.Wrap(pushErr, "Error pushing for BACnetUnconfirmedServiceRequestUnconfirmedCOVNotification") } - // Simple Field (subscriberProcessIdentifier) - if pushErr := writeBuffer.PushContext("subscriberProcessIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for subscriberProcessIdentifier") - } - _subscriberProcessIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetSubscriberProcessIdentifier()) - if popErr := writeBuffer.PopContext("subscriberProcessIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for subscriberProcessIdentifier") - } - if _subscriberProcessIdentifierErr != nil { - return errors.Wrap(_subscriberProcessIdentifierErr, "Error serializing 'subscriberProcessIdentifier' field") - } + // Simple Field (subscriberProcessIdentifier) + if pushErr := writeBuffer.PushContext("subscriberProcessIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for subscriberProcessIdentifier") + } + _subscriberProcessIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetSubscriberProcessIdentifier()) + if popErr := writeBuffer.PopContext("subscriberProcessIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for subscriberProcessIdentifier") + } + if _subscriberProcessIdentifierErr != nil { + return errors.Wrap(_subscriberProcessIdentifierErr, "Error serializing 'subscriberProcessIdentifier' field") + } - // Simple Field (initiatingDeviceIdentifier) - if pushErr := writeBuffer.PushContext("initiatingDeviceIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for initiatingDeviceIdentifier") - } - _initiatingDeviceIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetInitiatingDeviceIdentifier()) - if popErr := writeBuffer.PopContext("initiatingDeviceIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for initiatingDeviceIdentifier") - } - if _initiatingDeviceIdentifierErr != nil { - return errors.Wrap(_initiatingDeviceIdentifierErr, "Error serializing 'initiatingDeviceIdentifier' field") - } + // Simple Field (initiatingDeviceIdentifier) + if pushErr := writeBuffer.PushContext("initiatingDeviceIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for initiatingDeviceIdentifier") + } + _initiatingDeviceIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetInitiatingDeviceIdentifier()) + if popErr := writeBuffer.PopContext("initiatingDeviceIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for initiatingDeviceIdentifier") + } + if _initiatingDeviceIdentifierErr != nil { + return errors.Wrap(_initiatingDeviceIdentifierErr, "Error serializing 'initiatingDeviceIdentifier' field") + } - // Simple Field (monitoredObjectIdentifier) - if pushErr := writeBuffer.PushContext("monitoredObjectIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for monitoredObjectIdentifier") - } - _monitoredObjectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetMonitoredObjectIdentifier()) - if popErr := writeBuffer.PopContext("monitoredObjectIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for monitoredObjectIdentifier") - } - if _monitoredObjectIdentifierErr != nil { - return errors.Wrap(_monitoredObjectIdentifierErr, "Error serializing 'monitoredObjectIdentifier' field") - } + // Simple Field (monitoredObjectIdentifier) + if pushErr := writeBuffer.PushContext("monitoredObjectIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for monitoredObjectIdentifier") + } + _monitoredObjectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetMonitoredObjectIdentifier()) + if popErr := writeBuffer.PopContext("monitoredObjectIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for monitoredObjectIdentifier") + } + if _monitoredObjectIdentifierErr != nil { + return errors.Wrap(_monitoredObjectIdentifierErr, "Error serializing 'monitoredObjectIdentifier' field") + } - // Simple Field (lifetimeInSeconds) - if pushErr := writeBuffer.PushContext("lifetimeInSeconds"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lifetimeInSeconds") - } - _lifetimeInSecondsErr := writeBuffer.WriteSerializable(ctx, m.GetLifetimeInSeconds()) - if popErr := writeBuffer.PopContext("lifetimeInSeconds"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lifetimeInSeconds") - } - if _lifetimeInSecondsErr != nil { - return errors.Wrap(_lifetimeInSecondsErr, "Error serializing 'lifetimeInSeconds' field") - } + // Simple Field (lifetimeInSeconds) + if pushErr := writeBuffer.PushContext("lifetimeInSeconds"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lifetimeInSeconds") + } + _lifetimeInSecondsErr := writeBuffer.WriteSerializable(ctx, m.GetLifetimeInSeconds()) + if popErr := writeBuffer.PopContext("lifetimeInSeconds"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lifetimeInSeconds") + } + if _lifetimeInSecondsErr != nil { + return errors.Wrap(_lifetimeInSecondsErr, "Error serializing 'lifetimeInSeconds' field") + } - // Simple Field (listOfValues) - if pushErr := writeBuffer.PushContext("listOfValues"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for listOfValues") - } - _listOfValuesErr := writeBuffer.WriteSerializable(ctx, m.GetListOfValues()) - if popErr := writeBuffer.PopContext("listOfValues"); popErr != nil { - return errors.Wrap(popErr, "Error popping for listOfValues") - } - if _listOfValuesErr != nil { - return errors.Wrap(_listOfValuesErr, "Error serializing 'listOfValues' field") - } + // Simple Field (listOfValues) + if pushErr := writeBuffer.PushContext("listOfValues"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for listOfValues") + } + _listOfValuesErr := writeBuffer.WriteSerializable(ctx, m.GetListOfValues()) + if popErr := writeBuffer.PopContext("listOfValues"); popErr != nil { + return errors.Wrap(popErr, "Error popping for listOfValues") + } + if _listOfValuesErr != nil { + return errors.Wrap(_listOfValuesErr, "Error serializing 'listOfValues' field") + } if popErr := writeBuffer.PopContext("BACnetUnconfirmedServiceRequestUnconfirmedCOVNotification"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetUnconfirmedServiceRequestUnconfirmedCOVNotification") @@ -347,6 +350,7 @@ func (m *_BACnetUnconfirmedServiceRequestUnconfirmedCOVNotification) SerializeWi return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetUnconfirmedServiceRequestUnconfirmedCOVNotification) isBACnetUnconfirmedServiceRequestUnconfirmedCOVNotification() bool { return true } @@ -361,3 +365,6 @@ func (m *_BACnetUnconfirmedServiceRequestUnconfirmedCOVNotification) String() st } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple.go index af4f102ab1a..b78c899a809 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple is the corresponding interface of BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple type BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple interface { @@ -55,34 +57,33 @@ type BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultipleExactly in // _BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple is the data-structure of this message type _BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple struct { *_BACnetUnconfirmedServiceRequest - SubscriberProcessIdentifier BACnetContextTagUnsignedInteger - InitiatingDeviceIdentifier BACnetContextTagObjectIdentifier - TimeRemaining BACnetContextTagUnsignedInteger - Timestamp BACnetTimeStampEnclosed - ListOfCovNotifications ListOfCovNotificationsList + SubscriberProcessIdentifier BACnetContextTagUnsignedInteger + InitiatingDeviceIdentifier BACnetContextTagObjectIdentifier + TimeRemaining BACnetContextTagUnsignedInteger + Timestamp BACnetTimeStampEnclosed + ListOfCovNotifications ListOfCovNotificationsList } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple) GetServiceChoice() BACnetUnconfirmedServiceChoice { - return BACnetUnconfirmedServiceChoice_UNCONFIRMED_COV_NOTIFICATION_MULTIPLE -} +func (m *_BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple) GetServiceChoice() BACnetUnconfirmedServiceChoice { +return BACnetUnconfirmedServiceChoice_UNCONFIRMED_COV_NOTIFICATION_MULTIPLE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple) InitializeParent(parent BACnetUnconfirmedServiceRequest) { -} +func (m *_BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple) InitializeParent(parent BACnetUnconfirmedServiceRequest ) {} -func (m *_BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple) GetParent() BACnetUnconfirmedServiceRequest { +func (m *_BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple) GetParent() BACnetUnconfirmedServiceRequest { return m._BACnetUnconfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -113,15 +114,16 @@ func (m *_BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple) Get /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple factory function for _BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple -func NewBACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple(subscriberProcessIdentifier BACnetContextTagUnsignedInteger, initiatingDeviceIdentifier BACnetContextTagObjectIdentifier, timeRemaining BACnetContextTagUnsignedInteger, timestamp BACnetTimeStampEnclosed, listOfCovNotifications ListOfCovNotificationsList, serviceRequestLength uint16) *_BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple { +func NewBACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple( subscriberProcessIdentifier BACnetContextTagUnsignedInteger , initiatingDeviceIdentifier BACnetContextTagObjectIdentifier , timeRemaining BACnetContextTagUnsignedInteger , timestamp BACnetTimeStampEnclosed , listOfCovNotifications ListOfCovNotificationsList , serviceRequestLength uint16 ) *_BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple { _result := &_BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple{ - SubscriberProcessIdentifier: subscriberProcessIdentifier, - InitiatingDeviceIdentifier: initiatingDeviceIdentifier, - TimeRemaining: timeRemaining, - Timestamp: timestamp, - ListOfCovNotifications: listOfCovNotifications, - _BACnetUnconfirmedServiceRequest: NewBACnetUnconfirmedServiceRequest(serviceRequestLength), + SubscriberProcessIdentifier: subscriberProcessIdentifier, + InitiatingDeviceIdentifier: initiatingDeviceIdentifier, + TimeRemaining: timeRemaining, + Timestamp: timestamp, + ListOfCovNotifications: listOfCovNotifications, + _BACnetUnconfirmedServiceRequest: NewBACnetUnconfirmedServiceRequest(serviceRequestLength), } _result._BACnetUnconfirmedServiceRequest._BACnetUnconfirmedServiceRequestChildRequirements = _result return _result @@ -129,7 +131,7 @@ func NewBACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple(subscr // Deprecated: use the interface for direct cast func CastBACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple(structType interface{}) BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple { - if casted, ok := structType.(BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple); ok { + if casted, ok := structType.(BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple); ok { return casted } if casted, ok := structType.(*BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple); ok { @@ -165,6 +167,7 @@ func (m *_BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple) Get return lengthInBits } + func (m *_BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -186,7 +189,7 @@ func BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultipleParseWithB if pullErr := readBuffer.PullContext("subscriberProcessIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for subscriberProcessIdentifier") } - _subscriberProcessIdentifier, _subscriberProcessIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_subscriberProcessIdentifier, _subscriberProcessIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _subscriberProcessIdentifierErr != nil { return nil, errors.Wrap(_subscriberProcessIdentifierErr, "Error parsing 'subscriberProcessIdentifier' field of BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple") } @@ -199,7 +202,7 @@ func BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultipleParseWithB if pullErr := readBuffer.PullContext("initiatingDeviceIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for initiatingDeviceIdentifier") } - _initiatingDeviceIdentifier, _initiatingDeviceIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER)) +_initiatingDeviceIdentifier, _initiatingDeviceIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_BACNET_OBJECT_IDENTIFIER ) ) if _initiatingDeviceIdentifierErr != nil { return nil, errors.Wrap(_initiatingDeviceIdentifierErr, "Error parsing 'initiatingDeviceIdentifier' field of BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple") } @@ -212,7 +215,7 @@ func BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultipleParseWithB if pullErr := readBuffer.PullContext("timeRemaining"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeRemaining") } - _timeRemaining, _timeRemainingErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_timeRemaining, _timeRemainingErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _timeRemainingErr != nil { return nil, errors.Wrap(_timeRemainingErr, "Error parsing 'timeRemaining' field of BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple") } @@ -223,12 +226,12 @@ func BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultipleParseWithB // Optional Field (timestamp) (Can be skipped, if a given expression evaluates to false) var timestamp BACnetTimeStampEnclosed = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("timestamp"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timestamp") } - _val, _err := BACnetTimeStampEnclosedParseWithBuffer(ctx, readBuffer, uint8(3)) +_val, _err := BACnetTimeStampEnclosedParseWithBuffer(ctx, readBuffer , uint8(3) ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -247,7 +250,7 @@ func BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultipleParseWithB if pullErr := readBuffer.PullContext("listOfCovNotifications"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for listOfCovNotifications") } - _listOfCovNotifications, _listOfCovNotificationsErr := ListOfCovNotificationsListParseWithBuffer(ctx, readBuffer, uint8(uint8(4))) +_listOfCovNotifications, _listOfCovNotificationsErr := ListOfCovNotificationsListParseWithBuffer(ctx, readBuffer , uint8( uint8(4) ) ) if _listOfCovNotificationsErr != nil { return nil, errors.Wrap(_listOfCovNotificationsErr, "Error parsing 'listOfCovNotifications' field of BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple") } @@ -266,10 +269,10 @@ func BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultipleParseWithB ServiceRequestLength: serviceRequestLength, }, SubscriberProcessIdentifier: subscriberProcessIdentifier, - InitiatingDeviceIdentifier: initiatingDeviceIdentifier, - TimeRemaining: timeRemaining, - Timestamp: timestamp, - ListOfCovNotifications: listOfCovNotifications, + InitiatingDeviceIdentifier: initiatingDeviceIdentifier, + TimeRemaining: timeRemaining, + Timestamp: timestamp, + ListOfCovNotifications: listOfCovNotifications, } _child._BACnetUnconfirmedServiceRequest._BACnetUnconfirmedServiceRequestChildRequirements = _child return _child, nil @@ -291,69 +294,69 @@ func (m *_BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple) Ser return errors.Wrap(pushErr, "Error pushing for BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple") } - // Simple Field (subscriberProcessIdentifier) - if pushErr := writeBuffer.PushContext("subscriberProcessIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for subscriberProcessIdentifier") - } - _subscriberProcessIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetSubscriberProcessIdentifier()) - if popErr := writeBuffer.PopContext("subscriberProcessIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for subscriberProcessIdentifier") - } - if _subscriberProcessIdentifierErr != nil { - return errors.Wrap(_subscriberProcessIdentifierErr, "Error serializing 'subscriberProcessIdentifier' field") - } - - // Simple Field (initiatingDeviceIdentifier) - if pushErr := writeBuffer.PushContext("initiatingDeviceIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for initiatingDeviceIdentifier") - } - _initiatingDeviceIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetInitiatingDeviceIdentifier()) - if popErr := writeBuffer.PopContext("initiatingDeviceIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for initiatingDeviceIdentifier") - } - if _initiatingDeviceIdentifierErr != nil { - return errors.Wrap(_initiatingDeviceIdentifierErr, "Error serializing 'initiatingDeviceIdentifier' field") - } + // Simple Field (subscriberProcessIdentifier) + if pushErr := writeBuffer.PushContext("subscriberProcessIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for subscriberProcessIdentifier") + } + _subscriberProcessIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetSubscriberProcessIdentifier()) + if popErr := writeBuffer.PopContext("subscriberProcessIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for subscriberProcessIdentifier") + } + if _subscriberProcessIdentifierErr != nil { + return errors.Wrap(_subscriberProcessIdentifierErr, "Error serializing 'subscriberProcessIdentifier' field") + } - // Simple Field (timeRemaining) - if pushErr := writeBuffer.PushContext("timeRemaining"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timeRemaining") - } - _timeRemainingErr := writeBuffer.WriteSerializable(ctx, m.GetTimeRemaining()) - if popErr := writeBuffer.PopContext("timeRemaining"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timeRemaining") - } - if _timeRemainingErr != nil { - return errors.Wrap(_timeRemainingErr, "Error serializing 'timeRemaining' field") - } + // Simple Field (initiatingDeviceIdentifier) + if pushErr := writeBuffer.PushContext("initiatingDeviceIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for initiatingDeviceIdentifier") + } + _initiatingDeviceIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetInitiatingDeviceIdentifier()) + if popErr := writeBuffer.PopContext("initiatingDeviceIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for initiatingDeviceIdentifier") + } + if _initiatingDeviceIdentifierErr != nil { + return errors.Wrap(_initiatingDeviceIdentifierErr, "Error serializing 'initiatingDeviceIdentifier' field") + } - // Optional Field (timestamp) (Can be skipped, if the value is null) - var timestamp BACnetTimeStampEnclosed = nil - if m.GetTimestamp() != nil { - if pushErr := writeBuffer.PushContext("timestamp"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timestamp") - } - timestamp = m.GetTimestamp() - _timestampErr := writeBuffer.WriteSerializable(ctx, timestamp) - if popErr := writeBuffer.PopContext("timestamp"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timestamp") - } - if _timestampErr != nil { - return errors.Wrap(_timestampErr, "Error serializing 'timestamp' field") - } - } + // Simple Field (timeRemaining) + if pushErr := writeBuffer.PushContext("timeRemaining"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timeRemaining") + } + _timeRemainingErr := writeBuffer.WriteSerializable(ctx, m.GetTimeRemaining()) + if popErr := writeBuffer.PopContext("timeRemaining"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timeRemaining") + } + if _timeRemainingErr != nil { + return errors.Wrap(_timeRemainingErr, "Error serializing 'timeRemaining' field") + } - // Simple Field (listOfCovNotifications) - if pushErr := writeBuffer.PushContext("listOfCovNotifications"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for listOfCovNotifications") + // Optional Field (timestamp) (Can be skipped, if the value is null) + var timestamp BACnetTimeStampEnclosed = nil + if m.GetTimestamp() != nil { + if pushErr := writeBuffer.PushContext("timestamp"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timestamp") } - _listOfCovNotificationsErr := writeBuffer.WriteSerializable(ctx, m.GetListOfCovNotifications()) - if popErr := writeBuffer.PopContext("listOfCovNotifications"); popErr != nil { - return errors.Wrap(popErr, "Error popping for listOfCovNotifications") + timestamp = m.GetTimestamp() + _timestampErr := writeBuffer.WriteSerializable(ctx, timestamp) + if popErr := writeBuffer.PopContext("timestamp"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timestamp") } - if _listOfCovNotificationsErr != nil { - return errors.Wrap(_listOfCovNotificationsErr, "Error serializing 'listOfCovNotifications' field") + if _timestampErr != nil { + return errors.Wrap(_timestampErr, "Error serializing 'timestamp' field") } + } + + // Simple Field (listOfCovNotifications) + if pushErr := writeBuffer.PushContext("listOfCovNotifications"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for listOfCovNotifications") + } + _listOfCovNotificationsErr := writeBuffer.WriteSerializable(ctx, m.GetListOfCovNotifications()) + if popErr := writeBuffer.PopContext("listOfCovNotifications"); popErr != nil { + return errors.Wrap(popErr, "Error popping for listOfCovNotifications") + } + if _listOfCovNotificationsErr != nil { + return errors.Wrap(_listOfCovNotificationsErr, "Error serializing 'listOfCovNotifications' field") + } if popErr := writeBuffer.PopContext("BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple") @@ -363,6 +366,7 @@ func (m *_BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple) Ser return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple) isBACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple() bool { return true } @@ -377,3 +381,6 @@ func (m *_BACnetUnconfirmedServiceRequestUnconfirmedCOVNotificationMultiple) Str } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestUnconfirmedEventNotification.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestUnconfirmedEventNotification.go index 278f9a5793f..4b120e1d161 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestUnconfirmedEventNotification.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestUnconfirmedEventNotification.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetUnconfirmedServiceRequestUnconfirmedEventNotification is the corresponding interface of BACnetUnconfirmedServiceRequestUnconfirmedEventNotification type BACnetUnconfirmedServiceRequestUnconfirmedEventNotification interface { @@ -71,42 +73,41 @@ type BACnetUnconfirmedServiceRequestUnconfirmedEventNotificationExactly interfac // _BACnetUnconfirmedServiceRequestUnconfirmedEventNotification is the data-structure of this message type _BACnetUnconfirmedServiceRequestUnconfirmedEventNotification struct { *_BACnetUnconfirmedServiceRequest - ProcessIdentifier BACnetContextTagUnsignedInteger - InitiatingDeviceIdentifier BACnetContextTagObjectIdentifier - EventObjectIdentifier BACnetContextTagObjectIdentifier - Timestamp BACnetTimeStampEnclosed - NotificationClass BACnetContextTagUnsignedInteger - Priority BACnetContextTagUnsignedInteger - EventType BACnetEventTypeTagged - MessageText BACnetContextTagCharacterString - NotifyType BACnetNotifyTypeTagged - AckRequired BACnetContextTagBoolean - FromState BACnetEventStateTagged - ToState BACnetEventStateTagged - EventValues BACnetNotificationParameters + ProcessIdentifier BACnetContextTagUnsignedInteger + InitiatingDeviceIdentifier BACnetContextTagObjectIdentifier + EventObjectIdentifier BACnetContextTagObjectIdentifier + Timestamp BACnetTimeStampEnclosed + NotificationClass BACnetContextTagUnsignedInteger + Priority BACnetContextTagUnsignedInteger + EventType BACnetEventTypeTagged + MessageText BACnetContextTagCharacterString + NotifyType BACnetNotifyTypeTagged + AckRequired BACnetContextTagBoolean + FromState BACnetEventStateTagged + ToState BACnetEventStateTagged + EventValues BACnetNotificationParameters } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetUnconfirmedServiceRequestUnconfirmedEventNotification) GetServiceChoice() BACnetUnconfirmedServiceChoice { - return BACnetUnconfirmedServiceChoice_UNCONFIRMED_EVENT_NOTIFICATION -} +func (m *_BACnetUnconfirmedServiceRequestUnconfirmedEventNotification) GetServiceChoice() BACnetUnconfirmedServiceChoice { +return BACnetUnconfirmedServiceChoice_UNCONFIRMED_EVENT_NOTIFICATION} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetUnconfirmedServiceRequestUnconfirmedEventNotification) InitializeParent(parent BACnetUnconfirmedServiceRequest) { -} +func (m *_BACnetUnconfirmedServiceRequestUnconfirmedEventNotification) InitializeParent(parent BACnetUnconfirmedServiceRequest ) {} -func (m *_BACnetUnconfirmedServiceRequestUnconfirmedEventNotification) GetParent() BACnetUnconfirmedServiceRequest { +func (m *_BACnetUnconfirmedServiceRequestUnconfirmedEventNotification) GetParent() BACnetUnconfirmedServiceRequest { return m._BACnetUnconfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -169,23 +170,24 @@ func (m *_BACnetUnconfirmedServiceRequestUnconfirmedEventNotification) GetEventV /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetUnconfirmedServiceRequestUnconfirmedEventNotification factory function for _BACnetUnconfirmedServiceRequestUnconfirmedEventNotification -func NewBACnetUnconfirmedServiceRequestUnconfirmedEventNotification(processIdentifier BACnetContextTagUnsignedInteger, initiatingDeviceIdentifier BACnetContextTagObjectIdentifier, eventObjectIdentifier BACnetContextTagObjectIdentifier, timestamp BACnetTimeStampEnclosed, notificationClass BACnetContextTagUnsignedInteger, priority BACnetContextTagUnsignedInteger, eventType BACnetEventTypeTagged, messageText BACnetContextTagCharacterString, notifyType BACnetNotifyTypeTagged, ackRequired BACnetContextTagBoolean, fromState BACnetEventStateTagged, toState BACnetEventStateTagged, eventValues BACnetNotificationParameters, serviceRequestLength uint16) *_BACnetUnconfirmedServiceRequestUnconfirmedEventNotification { +func NewBACnetUnconfirmedServiceRequestUnconfirmedEventNotification( processIdentifier BACnetContextTagUnsignedInteger , initiatingDeviceIdentifier BACnetContextTagObjectIdentifier , eventObjectIdentifier BACnetContextTagObjectIdentifier , timestamp BACnetTimeStampEnclosed , notificationClass BACnetContextTagUnsignedInteger , priority BACnetContextTagUnsignedInteger , eventType BACnetEventTypeTagged , messageText BACnetContextTagCharacterString , notifyType BACnetNotifyTypeTagged , ackRequired BACnetContextTagBoolean , fromState BACnetEventStateTagged , toState BACnetEventStateTagged , eventValues BACnetNotificationParameters , serviceRequestLength uint16 ) *_BACnetUnconfirmedServiceRequestUnconfirmedEventNotification { _result := &_BACnetUnconfirmedServiceRequestUnconfirmedEventNotification{ - ProcessIdentifier: processIdentifier, - InitiatingDeviceIdentifier: initiatingDeviceIdentifier, - EventObjectIdentifier: eventObjectIdentifier, - Timestamp: timestamp, - NotificationClass: notificationClass, - Priority: priority, - EventType: eventType, - MessageText: messageText, - NotifyType: notifyType, - AckRequired: ackRequired, - FromState: fromState, - ToState: toState, - EventValues: eventValues, - _BACnetUnconfirmedServiceRequest: NewBACnetUnconfirmedServiceRequest(serviceRequestLength), + ProcessIdentifier: processIdentifier, + InitiatingDeviceIdentifier: initiatingDeviceIdentifier, + EventObjectIdentifier: eventObjectIdentifier, + Timestamp: timestamp, + NotificationClass: notificationClass, + Priority: priority, + EventType: eventType, + MessageText: messageText, + NotifyType: notifyType, + AckRequired: ackRequired, + FromState: fromState, + ToState: toState, + EventValues: eventValues, + _BACnetUnconfirmedServiceRequest: NewBACnetUnconfirmedServiceRequest(serviceRequestLength), } _result._BACnetUnconfirmedServiceRequest._BACnetUnconfirmedServiceRequestChildRequirements = _result return _result @@ -193,7 +195,7 @@ func NewBACnetUnconfirmedServiceRequestUnconfirmedEventNotification(processIdent // Deprecated: use the interface for direct cast func CastBACnetUnconfirmedServiceRequestUnconfirmedEventNotification(structType interface{}) BACnetUnconfirmedServiceRequestUnconfirmedEventNotification { - if casted, ok := structType.(BACnetUnconfirmedServiceRequestUnconfirmedEventNotification); ok { + if casted, ok := structType.(BACnetUnconfirmedServiceRequestUnconfirmedEventNotification); ok { return casted } if casted, ok := structType.(*BACnetUnconfirmedServiceRequestUnconfirmedEventNotification); ok { @@ -259,6 +261,7 @@ func (m *_BACnetUnconfirmedServiceRequestUnconfirmedEventNotification) GetLength return lengthInBits } + func (m *_BACnetUnconfirmedServiceRequestUnconfirmedEventNotification) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -280,7 +283,7 @@ func BACnetUnconfirmedServiceRequestUnconfirmedEventNotificationParseWithBuffer( if pullErr := readBuffer.PullContext("processIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for processIdentifier") } - _processIdentifier, _processIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_processIdentifier, _processIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _processIdentifierErr != nil { return nil, errors.Wrap(_processIdentifierErr, "Error parsing 'processIdentifier' field of BACnetUnconfirmedServiceRequestUnconfirmedEventNotification") } @@ -293,7 +296,7 @@ func BACnetUnconfirmedServiceRequestUnconfirmedEventNotificationParseWithBuffer( if pullErr := readBuffer.PullContext("initiatingDeviceIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for initiatingDeviceIdentifier") } - _initiatingDeviceIdentifier, _initiatingDeviceIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER)) +_initiatingDeviceIdentifier, _initiatingDeviceIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_BACNET_OBJECT_IDENTIFIER ) ) if _initiatingDeviceIdentifierErr != nil { return nil, errors.Wrap(_initiatingDeviceIdentifierErr, "Error parsing 'initiatingDeviceIdentifier' field of BACnetUnconfirmedServiceRequestUnconfirmedEventNotification") } @@ -306,7 +309,7 @@ func BACnetUnconfirmedServiceRequestUnconfirmedEventNotificationParseWithBuffer( if pullErr := readBuffer.PullContext("eventObjectIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for eventObjectIdentifier") } - _eventObjectIdentifier, _eventObjectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER)) +_eventObjectIdentifier, _eventObjectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , BACnetDataType( BACnetDataType_BACNET_OBJECT_IDENTIFIER ) ) if _eventObjectIdentifierErr != nil { return nil, errors.Wrap(_eventObjectIdentifierErr, "Error parsing 'eventObjectIdentifier' field of BACnetUnconfirmedServiceRequestUnconfirmedEventNotification") } @@ -319,7 +322,7 @@ func BACnetUnconfirmedServiceRequestUnconfirmedEventNotificationParseWithBuffer( if pullErr := readBuffer.PullContext("timestamp"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timestamp") } - _timestamp, _timestampErr := BACnetTimeStampEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(3))) +_timestamp, _timestampErr := BACnetTimeStampEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(3) ) ) if _timestampErr != nil { return nil, errors.Wrap(_timestampErr, "Error parsing 'timestamp' field of BACnetUnconfirmedServiceRequestUnconfirmedEventNotification") } @@ -332,7 +335,7 @@ func BACnetUnconfirmedServiceRequestUnconfirmedEventNotificationParseWithBuffer( if pullErr := readBuffer.PullContext("notificationClass"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for notificationClass") } - _notificationClass, _notificationClassErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(4)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_notificationClass, _notificationClassErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(4) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _notificationClassErr != nil { return nil, errors.Wrap(_notificationClassErr, "Error parsing 'notificationClass' field of BACnetUnconfirmedServiceRequestUnconfirmedEventNotification") } @@ -345,7 +348,7 @@ func BACnetUnconfirmedServiceRequestUnconfirmedEventNotificationParseWithBuffer( if pullErr := readBuffer.PullContext("priority"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for priority") } - _priority, _priorityErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(5)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_priority, _priorityErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(5) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _priorityErr != nil { return nil, errors.Wrap(_priorityErr, "Error parsing 'priority' field of BACnetUnconfirmedServiceRequestUnconfirmedEventNotification") } @@ -358,7 +361,7 @@ func BACnetUnconfirmedServiceRequestUnconfirmedEventNotificationParseWithBuffer( if pullErr := readBuffer.PullContext("eventType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for eventType") } - _eventType, _eventTypeErr := BACnetEventTypeTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(6)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_eventType, _eventTypeErr := BACnetEventTypeTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(6) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _eventTypeErr != nil { return nil, errors.Wrap(_eventTypeErr, "Error parsing 'eventType' field of BACnetUnconfirmedServiceRequestUnconfirmedEventNotification") } @@ -369,12 +372,12 @@ func BACnetUnconfirmedServiceRequestUnconfirmedEventNotificationParseWithBuffer( // Optional Field (messageText) (Can be skipped, if a given expression evaluates to false) var messageText BACnetContextTagCharacterString = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("messageText"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for messageText") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(7), BACnetDataType_CHARACTER_STRING) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(7) , BACnetDataType_CHARACTER_STRING ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -393,7 +396,7 @@ func BACnetUnconfirmedServiceRequestUnconfirmedEventNotificationParseWithBuffer( if pullErr := readBuffer.PullContext("notifyType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for notifyType") } - _notifyType, _notifyTypeErr := BACnetNotifyTypeTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(8)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_notifyType, _notifyTypeErr := BACnetNotifyTypeTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(8) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _notifyTypeErr != nil { return nil, errors.Wrap(_notifyTypeErr, "Error parsing 'notifyType' field of BACnetUnconfirmedServiceRequestUnconfirmedEventNotification") } @@ -404,12 +407,12 @@ func BACnetUnconfirmedServiceRequestUnconfirmedEventNotificationParseWithBuffer( // Optional Field (ackRequired) (Can be skipped, if a given expression evaluates to false) var ackRequired BACnetContextTagBoolean = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("ackRequired"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for ackRequired") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(9), BACnetDataType_BOOLEAN) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(9) , BACnetDataType_BOOLEAN ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -426,12 +429,12 @@ func BACnetUnconfirmedServiceRequestUnconfirmedEventNotificationParseWithBuffer( // Optional Field (fromState) (Can be skipped, if a given expression evaluates to false) var fromState BACnetEventStateTagged = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("fromState"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for fromState") } - _val, _err := BACnetEventStateTaggedParseWithBuffer(ctx, readBuffer, uint8(10), TagClass_CONTEXT_SPECIFIC_TAGS) +_val, _err := BACnetEventStateTaggedParseWithBuffer(ctx, readBuffer , uint8(10) , TagClass_CONTEXT_SPECIFIC_TAGS ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -450,7 +453,7 @@ func BACnetUnconfirmedServiceRequestUnconfirmedEventNotificationParseWithBuffer( if pullErr := readBuffer.PullContext("toState"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for toState") } - _toState, _toStateErr := BACnetEventStateTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(11)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_toState, _toStateErr := BACnetEventStateTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(11) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _toStateErr != nil { return nil, errors.Wrap(_toStateErr, "Error parsing 'toState' field of BACnetUnconfirmedServiceRequestUnconfirmedEventNotification") } @@ -461,12 +464,12 @@ func BACnetUnconfirmedServiceRequestUnconfirmedEventNotificationParseWithBuffer( // Optional Field (eventValues) (Can be skipped, if a given expression evaluates to false) var eventValues BACnetNotificationParameters = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("eventValues"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for eventValues") } - _val, _err := BACnetNotificationParametersParseWithBuffer(ctx, readBuffer, uint8(12), eventObjectIdentifier.GetObjectType()) +_val, _err := BACnetNotificationParametersParseWithBuffer(ctx, readBuffer , uint8(12) , eventObjectIdentifier.GetObjectType() ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -490,19 +493,19 @@ func BACnetUnconfirmedServiceRequestUnconfirmedEventNotificationParseWithBuffer( _BACnetUnconfirmedServiceRequest: &_BACnetUnconfirmedServiceRequest{ ServiceRequestLength: serviceRequestLength, }, - ProcessIdentifier: processIdentifier, + ProcessIdentifier: processIdentifier, InitiatingDeviceIdentifier: initiatingDeviceIdentifier, - EventObjectIdentifier: eventObjectIdentifier, - Timestamp: timestamp, - NotificationClass: notificationClass, - Priority: priority, - EventType: eventType, - MessageText: messageText, - NotifyType: notifyType, - AckRequired: ackRequired, - FromState: fromState, - ToState: toState, - EventValues: eventValues, + EventObjectIdentifier: eventObjectIdentifier, + Timestamp: timestamp, + NotificationClass: notificationClass, + Priority: priority, + EventType: eventType, + MessageText: messageText, + NotifyType: notifyType, + AckRequired: ackRequired, + FromState: fromState, + ToState: toState, + EventValues: eventValues, } _child._BACnetUnconfirmedServiceRequest._BACnetUnconfirmedServiceRequestChildRequirements = _child return _child, nil @@ -524,177 +527,177 @@ func (m *_BACnetUnconfirmedServiceRequestUnconfirmedEventNotification) Serialize return errors.Wrap(pushErr, "Error pushing for BACnetUnconfirmedServiceRequestUnconfirmedEventNotification") } - // Simple Field (processIdentifier) - if pushErr := writeBuffer.PushContext("processIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for processIdentifier") - } - _processIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetProcessIdentifier()) - if popErr := writeBuffer.PopContext("processIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for processIdentifier") - } - if _processIdentifierErr != nil { - return errors.Wrap(_processIdentifierErr, "Error serializing 'processIdentifier' field") - } + // Simple Field (processIdentifier) + if pushErr := writeBuffer.PushContext("processIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for processIdentifier") + } + _processIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetProcessIdentifier()) + if popErr := writeBuffer.PopContext("processIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for processIdentifier") + } + if _processIdentifierErr != nil { + return errors.Wrap(_processIdentifierErr, "Error serializing 'processIdentifier' field") + } - // Simple Field (initiatingDeviceIdentifier) - if pushErr := writeBuffer.PushContext("initiatingDeviceIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for initiatingDeviceIdentifier") - } - _initiatingDeviceIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetInitiatingDeviceIdentifier()) - if popErr := writeBuffer.PopContext("initiatingDeviceIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for initiatingDeviceIdentifier") - } - if _initiatingDeviceIdentifierErr != nil { - return errors.Wrap(_initiatingDeviceIdentifierErr, "Error serializing 'initiatingDeviceIdentifier' field") - } + // Simple Field (initiatingDeviceIdentifier) + if pushErr := writeBuffer.PushContext("initiatingDeviceIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for initiatingDeviceIdentifier") + } + _initiatingDeviceIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetInitiatingDeviceIdentifier()) + if popErr := writeBuffer.PopContext("initiatingDeviceIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for initiatingDeviceIdentifier") + } + if _initiatingDeviceIdentifierErr != nil { + return errors.Wrap(_initiatingDeviceIdentifierErr, "Error serializing 'initiatingDeviceIdentifier' field") + } - // Simple Field (eventObjectIdentifier) - if pushErr := writeBuffer.PushContext("eventObjectIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for eventObjectIdentifier") - } - _eventObjectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetEventObjectIdentifier()) - if popErr := writeBuffer.PopContext("eventObjectIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for eventObjectIdentifier") - } - if _eventObjectIdentifierErr != nil { - return errors.Wrap(_eventObjectIdentifierErr, "Error serializing 'eventObjectIdentifier' field") - } + // Simple Field (eventObjectIdentifier) + if pushErr := writeBuffer.PushContext("eventObjectIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for eventObjectIdentifier") + } + _eventObjectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetEventObjectIdentifier()) + if popErr := writeBuffer.PopContext("eventObjectIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for eventObjectIdentifier") + } + if _eventObjectIdentifierErr != nil { + return errors.Wrap(_eventObjectIdentifierErr, "Error serializing 'eventObjectIdentifier' field") + } - // Simple Field (timestamp) - if pushErr := writeBuffer.PushContext("timestamp"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for timestamp") - } - _timestampErr := writeBuffer.WriteSerializable(ctx, m.GetTimestamp()) - if popErr := writeBuffer.PopContext("timestamp"); popErr != nil { - return errors.Wrap(popErr, "Error popping for timestamp") - } - if _timestampErr != nil { - return errors.Wrap(_timestampErr, "Error serializing 'timestamp' field") - } + // Simple Field (timestamp) + if pushErr := writeBuffer.PushContext("timestamp"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for timestamp") + } + _timestampErr := writeBuffer.WriteSerializable(ctx, m.GetTimestamp()) + if popErr := writeBuffer.PopContext("timestamp"); popErr != nil { + return errors.Wrap(popErr, "Error popping for timestamp") + } + if _timestampErr != nil { + return errors.Wrap(_timestampErr, "Error serializing 'timestamp' field") + } - // Simple Field (notificationClass) - if pushErr := writeBuffer.PushContext("notificationClass"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for notificationClass") - } - _notificationClassErr := writeBuffer.WriteSerializable(ctx, m.GetNotificationClass()) - if popErr := writeBuffer.PopContext("notificationClass"); popErr != nil { - return errors.Wrap(popErr, "Error popping for notificationClass") - } - if _notificationClassErr != nil { - return errors.Wrap(_notificationClassErr, "Error serializing 'notificationClass' field") - } + // Simple Field (notificationClass) + if pushErr := writeBuffer.PushContext("notificationClass"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for notificationClass") + } + _notificationClassErr := writeBuffer.WriteSerializable(ctx, m.GetNotificationClass()) + if popErr := writeBuffer.PopContext("notificationClass"); popErr != nil { + return errors.Wrap(popErr, "Error popping for notificationClass") + } + if _notificationClassErr != nil { + return errors.Wrap(_notificationClassErr, "Error serializing 'notificationClass' field") + } - // Simple Field (priority) - if pushErr := writeBuffer.PushContext("priority"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for priority") - } - _priorityErr := writeBuffer.WriteSerializable(ctx, m.GetPriority()) - if popErr := writeBuffer.PopContext("priority"); popErr != nil { - return errors.Wrap(popErr, "Error popping for priority") - } - if _priorityErr != nil { - return errors.Wrap(_priorityErr, "Error serializing 'priority' field") - } + // Simple Field (priority) + if pushErr := writeBuffer.PushContext("priority"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for priority") + } + _priorityErr := writeBuffer.WriteSerializable(ctx, m.GetPriority()) + if popErr := writeBuffer.PopContext("priority"); popErr != nil { + return errors.Wrap(popErr, "Error popping for priority") + } + if _priorityErr != nil { + return errors.Wrap(_priorityErr, "Error serializing 'priority' field") + } - // Simple Field (eventType) - if pushErr := writeBuffer.PushContext("eventType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for eventType") + // Simple Field (eventType) + if pushErr := writeBuffer.PushContext("eventType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for eventType") + } + _eventTypeErr := writeBuffer.WriteSerializable(ctx, m.GetEventType()) + if popErr := writeBuffer.PopContext("eventType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for eventType") + } + if _eventTypeErr != nil { + return errors.Wrap(_eventTypeErr, "Error serializing 'eventType' field") + } + + // Optional Field (messageText) (Can be skipped, if the value is null) + var messageText BACnetContextTagCharacterString = nil + if m.GetMessageText() != nil { + if pushErr := writeBuffer.PushContext("messageText"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for messageText") } - _eventTypeErr := writeBuffer.WriteSerializable(ctx, m.GetEventType()) - if popErr := writeBuffer.PopContext("eventType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for eventType") + messageText = m.GetMessageText() + _messageTextErr := writeBuffer.WriteSerializable(ctx, messageText) + if popErr := writeBuffer.PopContext("messageText"); popErr != nil { + return errors.Wrap(popErr, "Error popping for messageText") } - if _eventTypeErr != nil { - return errors.Wrap(_eventTypeErr, "Error serializing 'eventType' field") + if _messageTextErr != nil { + return errors.Wrap(_messageTextErr, "Error serializing 'messageText' field") } + } - // Optional Field (messageText) (Can be skipped, if the value is null) - var messageText BACnetContextTagCharacterString = nil - if m.GetMessageText() != nil { - if pushErr := writeBuffer.PushContext("messageText"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for messageText") - } - messageText = m.GetMessageText() - _messageTextErr := writeBuffer.WriteSerializable(ctx, messageText) - if popErr := writeBuffer.PopContext("messageText"); popErr != nil { - return errors.Wrap(popErr, "Error popping for messageText") - } - if _messageTextErr != nil { - return errors.Wrap(_messageTextErr, "Error serializing 'messageText' field") - } - } + // Simple Field (notifyType) + if pushErr := writeBuffer.PushContext("notifyType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for notifyType") + } + _notifyTypeErr := writeBuffer.WriteSerializable(ctx, m.GetNotifyType()) + if popErr := writeBuffer.PopContext("notifyType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for notifyType") + } + if _notifyTypeErr != nil { + return errors.Wrap(_notifyTypeErr, "Error serializing 'notifyType' field") + } - // Simple Field (notifyType) - if pushErr := writeBuffer.PushContext("notifyType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for notifyType") + // Optional Field (ackRequired) (Can be skipped, if the value is null) + var ackRequired BACnetContextTagBoolean = nil + if m.GetAckRequired() != nil { + if pushErr := writeBuffer.PushContext("ackRequired"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for ackRequired") } - _notifyTypeErr := writeBuffer.WriteSerializable(ctx, m.GetNotifyType()) - if popErr := writeBuffer.PopContext("notifyType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for notifyType") + ackRequired = m.GetAckRequired() + _ackRequiredErr := writeBuffer.WriteSerializable(ctx, ackRequired) + if popErr := writeBuffer.PopContext("ackRequired"); popErr != nil { + return errors.Wrap(popErr, "Error popping for ackRequired") } - if _notifyTypeErr != nil { - return errors.Wrap(_notifyTypeErr, "Error serializing 'notifyType' field") + if _ackRequiredErr != nil { + return errors.Wrap(_ackRequiredErr, "Error serializing 'ackRequired' field") } + } - // Optional Field (ackRequired) (Can be skipped, if the value is null) - var ackRequired BACnetContextTagBoolean = nil - if m.GetAckRequired() != nil { - if pushErr := writeBuffer.PushContext("ackRequired"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for ackRequired") - } - ackRequired = m.GetAckRequired() - _ackRequiredErr := writeBuffer.WriteSerializable(ctx, ackRequired) - if popErr := writeBuffer.PopContext("ackRequired"); popErr != nil { - return errors.Wrap(popErr, "Error popping for ackRequired") - } - if _ackRequiredErr != nil { - return errors.Wrap(_ackRequiredErr, "Error serializing 'ackRequired' field") - } + // Optional Field (fromState) (Can be skipped, if the value is null) + var fromState BACnetEventStateTagged = nil + if m.GetFromState() != nil { + if pushErr := writeBuffer.PushContext("fromState"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for fromState") } - - // Optional Field (fromState) (Can be skipped, if the value is null) - var fromState BACnetEventStateTagged = nil - if m.GetFromState() != nil { - if pushErr := writeBuffer.PushContext("fromState"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for fromState") - } - fromState = m.GetFromState() - _fromStateErr := writeBuffer.WriteSerializable(ctx, fromState) - if popErr := writeBuffer.PopContext("fromState"); popErr != nil { - return errors.Wrap(popErr, "Error popping for fromState") - } - if _fromStateErr != nil { - return errors.Wrap(_fromStateErr, "Error serializing 'fromState' field") - } + fromState = m.GetFromState() + _fromStateErr := writeBuffer.WriteSerializable(ctx, fromState) + if popErr := writeBuffer.PopContext("fromState"); popErr != nil { + return errors.Wrap(popErr, "Error popping for fromState") } - - // Simple Field (toState) - if pushErr := writeBuffer.PushContext("toState"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for toState") + if _fromStateErr != nil { + return errors.Wrap(_fromStateErr, "Error serializing 'fromState' field") } - _toStateErr := writeBuffer.WriteSerializable(ctx, m.GetToState()) - if popErr := writeBuffer.PopContext("toState"); popErr != nil { - return errors.Wrap(popErr, "Error popping for toState") + } + + // Simple Field (toState) + if pushErr := writeBuffer.PushContext("toState"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for toState") + } + _toStateErr := writeBuffer.WriteSerializable(ctx, m.GetToState()) + if popErr := writeBuffer.PopContext("toState"); popErr != nil { + return errors.Wrap(popErr, "Error popping for toState") + } + if _toStateErr != nil { + return errors.Wrap(_toStateErr, "Error serializing 'toState' field") + } + + // Optional Field (eventValues) (Can be skipped, if the value is null) + var eventValues BACnetNotificationParameters = nil + if m.GetEventValues() != nil { + if pushErr := writeBuffer.PushContext("eventValues"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for eventValues") } - if _toStateErr != nil { - return errors.Wrap(_toStateErr, "Error serializing 'toState' field") + eventValues = m.GetEventValues() + _eventValuesErr := writeBuffer.WriteSerializable(ctx, eventValues) + if popErr := writeBuffer.PopContext("eventValues"); popErr != nil { + return errors.Wrap(popErr, "Error popping for eventValues") } - - // Optional Field (eventValues) (Can be skipped, if the value is null) - var eventValues BACnetNotificationParameters = nil - if m.GetEventValues() != nil { - if pushErr := writeBuffer.PushContext("eventValues"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for eventValues") - } - eventValues = m.GetEventValues() - _eventValuesErr := writeBuffer.WriteSerializable(ctx, eventValues) - if popErr := writeBuffer.PopContext("eventValues"); popErr != nil { - return errors.Wrap(popErr, "Error popping for eventValues") - } - if _eventValuesErr != nil { - return errors.Wrap(_eventValuesErr, "Error serializing 'eventValues' field") - } + if _eventValuesErr != nil { + return errors.Wrap(_eventValuesErr, "Error serializing 'eventValues' field") } + } if popErr := writeBuffer.PopContext("BACnetUnconfirmedServiceRequestUnconfirmedEventNotification"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetUnconfirmedServiceRequestUnconfirmedEventNotification") @@ -704,6 +707,7 @@ func (m *_BACnetUnconfirmedServiceRequestUnconfirmedEventNotification) Serialize return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetUnconfirmedServiceRequestUnconfirmedEventNotification) isBACnetUnconfirmedServiceRequestUnconfirmedEventNotification() bool { return true } @@ -718,3 +722,6 @@ func (m *_BACnetUnconfirmedServiceRequestUnconfirmedEventNotification) String() } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer.go index d0502e7c074..353770f1877 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer is the corresponding interface of BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer type BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer interface { @@ -51,32 +53,31 @@ type BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransferExactly interface // _BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer is the data-structure of this message type _BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer struct { *_BACnetUnconfirmedServiceRequest - VendorId BACnetVendorIdTagged - ServiceNumber BACnetContextTagUnsignedInteger - ServiceParameters BACnetConstructedData + VendorId BACnetVendorIdTagged + ServiceNumber BACnetContextTagUnsignedInteger + ServiceParameters BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer) GetServiceChoice() BACnetUnconfirmedServiceChoice { - return BACnetUnconfirmedServiceChoice_UNCONFIRMED_PRIVATE_TRANSFER -} +func (m *_BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer) GetServiceChoice() BACnetUnconfirmedServiceChoice { +return BACnetUnconfirmedServiceChoice_UNCONFIRMED_PRIVATE_TRANSFER} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer) InitializeParent(parent BACnetUnconfirmedServiceRequest) { -} +func (m *_BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer) InitializeParent(parent BACnetUnconfirmedServiceRequest ) {} -func (m *_BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer) GetParent() BACnetUnconfirmedServiceRequest { +func (m *_BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer) GetParent() BACnetUnconfirmedServiceRequest { return m._BACnetUnconfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -99,13 +100,14 @@ func (m *_BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer) GetServiceP /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer factory function for _BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer -func NewBACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer(vendorId BACnetVendorIdTagged, serviceNumber BACnetContextTagUnsignedInteger, serviceParameters BACnetConstructedData, serviceRequestLength uint16) *_BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer { +func NewBACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer( vendorId BACnetVendorIdTagged , serviceNumber BACnetContextTagUnsignedInteger , serviceParameters BACnetConstructedData , serviceRequestLength uint16 ) *_BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer { _result := &_BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer{ - VendorId: vendorId, - ServiceNumber: serviceNumber, - ServiceParameters: serviceParameters, - _BACnetUnconfirmedServiceRequest: NewBACnetUnconfirmedServiceRequest(serviceRequestLength), + VendorId: vendorId, + ServiceNumber: serviceNumber, + ServiceParameters: serviceParameters, + _BACnetUnconfirmedServiceRequest: NewBACnetUnconfirmedServiceRequest(serviceRequestLength), } _result._BACnetUnconfirmedServiceRequest._BACnetUnconfirmedServiceRequestChildRequirements = _result return _result @@ -113,7 +115,7 @@ func NewBACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer(vendorId BACne // Deprecated: use the interface for direct cast func CastBACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer(structType interface{}) BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer { - if casted, ok := structType.(BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer); ok { + if casted, ok := structType.(BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer); ok { return casted } if casted, ok := structType.(*BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer); ok { @@ -143,6 +145,7 @@ func (m *_BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer) GetLengthIn return lengthInBits } + func (m *_BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -164,7 +167,7 @@ func BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransferParseWithBuffer(ct if pullErr := readBuffer.PullContext("vendorId"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for vendorId") } - _vendorId, _vendorIdErr := BACnetVendorIdTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_vendorId, _vendorIdErr := BACnetVendorIdTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _vendorIdErr != nil { return nil, errors.Wrap(_vendorIdErr, "Error parsing 'vendorId' field of BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer") } @@ -177,7 +180,7 @@ func BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransferParseWithBuffer(ct if pullErr := readBuffer.PullContext("serviceNumber"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for serviceNumber") } - _serviceNumber, _serviceNumberErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_serviceNumber, _serviceNumberErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _serviceNumberErr != nil { return nil, errors.Wrap(_serviceNumberErr, "Error parsing 'serviceNumber' field of BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer") } @@ -188,12 +191,12 @@ func BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransferParseWithBuffer(ct // Optional Field (serviceParameters) (Can be skipped, if a given expression evaluates to false) var serviceParameters BACnetConstructedData = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("serviceParameters"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for serviceParameters") } - _val, _err := BACnetConstructedDataParseWithBuffer(ctx, readBuffer, uint8(2), BACnetObjectType_VENDOR_PROPRIETARY_VALUE, BACnetPropertyIdentifier_VENDOR_PROPRIETARY_VALUE, nil) +_val, _err := BACnetConstructedDataParseWithBuffer(ctx, readBuffer , uint8(2) , BACnetObjectType_VENDOR_PROPRIETARY_VALUE , BACnetPropertyIdentifier_VENDOR_PROPRIETARY_VALUE , nil ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -217,8 +220,8 @@ func BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransferParseWithBuffer(ct _BACnetUnconfirmedServiceRequest: &_BACnetUnconfirmedServiceRequest{ ServiceRequestLength: serviceRequestLength, }, - VendorId: vendorId, - ServiceNumber: serviceNumber, + VendorId: vendorId, + ServiceNumber: serviceNumber, ServiceParameters: serviceParameters, } _child._BACnetUnconfirmedServiceRequest._BACnetUnconfirmedServiceRequestChildRequirements = _child @@ -241,45 +244,45 @@ func (m *_BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer) SerializeWi return errors.Wrap(pushErr, "Error pushing for BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer") } - // Simple Field (vendorId) - if pushErr := writeBuffer.PushContext("vendorId"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for vendorId") - } - _vendorIdErr := writeBuffer.WriteSerializable(ctx, m.GetVendorId()) - if popErr := writeBuffer.PopContext("vendorId"); popErr != nil { - return errors.Wrap(popErr, "Error popping for vendorId") - } - if _vendorIdErr != nil { - return errors.Wrap(_vendorIdErr, "Error serializing 'vendorId' field") - } + // Simple Field (vendorId) + if pushErr := writeBuffer.PushContext("vendorId"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for vendorId") + } + _vendorIdErr := writeBuffer.WriteSerializable(ctx, m.GetVendorId()) + if popErr := writeBuffer.PopContext("vendorId"); popErr != nil { + return errors.Wrap(popErr, "Error popping for vendorId") + } + if _vendorIdErr != nil { + return errors.Wrap(_vendorIdErr, "Error serializing 'vendorId' field") + } - // Simple Field (serviceNumber) - if pushErr := writeBuffer.PushContext("serviceNumber"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for serviceNumber") + // Simple Field (serviceNumber) + if pushErr := writeBuffer.PushContext("serviceNumber"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for serviceNumber") + } + _serviceNumberErr := writeBuffer.WriteSerializable(ctx, m.GetServiceNumber()) + if popErr := writeBuffer.PopContext("serviceNumber"); popErr != nil { + return errors.Wrap(popErr, "Error popping for serviceNumber") + } + if _serviceNumberErr != nil { + return errors.Wrap(_serviceNumberErr, "Error serializing 'serviceNumber' field") + } + + // Optional Field (serviceParameters) (Can be skipped, if the value is null) + var serviceParameters BACnetConstructedData = nil + if m.GetServiceParameters() != nil { + if pushErr := writeBuffer.PushContext("serviceParameters"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for serviceParameters") } - _serviceNumberErr := writeBuffer.WriteSerializable(ctx, m.GetServiceNumber()) - if popErr := writeBuffer.PopContext("serviceNumber"); popErr != nil { - return errors.Wrap(popErr, "Error popping for serviceNumber") + serviceParameters = m.GetServiceParameters() + _serviceParametersErr := writeBuffer.WriteSerializable(ctx, serviceParameters) + if popErr := writeBuffer.PopContext("serviceParameters"); popErr != nil { + return errors.Wrap(popErr, "Error popping for serviceParameters") } - if _serviceNumberErr != nil { - return errors.Wrap(_serviceNumberErr, "Error serializing 'serviceNumber' field") - } - - // Optional Field (serviceParameters) (Can be skipped, if the value is null) - var serviceParameters BACnetConstructedData = nil - if m.GetServiceParameters() != nil { - if pushErr := writeBuffer.PushContext("serviceParameters"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for serviceParameters") - } - serviceParameters = m.GetServiceParameters() - _serviceParametersErr := writeBuffer.WriteSerializable(ctx, serviceParameters) - if popErr := writeBuffer.PopContext("serviceParameters"); popErr != nil { - return errors.Wrap(popErr, "Error popping for serviceParameters") - } - if _serviceParametersErr != nil { - return errors.Wrap(_serviceParametersErr, "Error serializing 'serviceParameters' field") - } + if _serviceParametersErr != nil { + return errors.Wrap(_serviceParametersErr, "Error serializing 'serviceParameters' field") } + } if popErr := writeBuffer.PopContext("BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer") @@ -289,6 +292,7 @@ func (m *_BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer) SerializeWi return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer) isBACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer() bool { return true } @@ -303,3 +307,6 @@ func (m *_BACnetUnconfirmedServiceRequestUnconfirmedPrivateTransfer) String() st } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestUnconfirmedTextMessage.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestUnconfirmedTextMessage.go index 15bb0ee427e..e0cbae3fcaa 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestUnconfirmedTextMessage.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestUnconfirmedTextMessage.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetUnconfirmedServiceRequestUnconfirmedTextMessage is the corresponding interface of BACnetUnconfirmedServiceRequestUnconfirmedTextMessage type BACnetUnconfirmedServiceRequestUnconfirmedTextMessage interface { @@ -53,33 +55,32 @@ type BACnetUnconfirmedServiceRequestUnconfirmedTextMessageExactly interface { // _BACnetUnconfirmedServiceRequestUnconfirmedTextMessage is the data-structure of this message type _BACnetUnconfirmedServiceRequestUnconfirmedTextMessage struct { *_BACnetUnconfirmedServiceRequest - TextMessageSourceDevice BACnetContextTagObjectIdentifier - MessageClass BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass - MessagePriority BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged - Message BACnetContextTagCharacterString + TextMessageSourceDevice BACnetContextTagObjectIdentifier + MessageClass BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass + MessagePriority BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged + Message BACnetContextTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetUnconfirmedServiceRequestUnconfirmedTextMessage) GetServiceChoice() BACnetUnconfirmedServiceChoice { - return BACnetUnconfirmedServiceChoice_UNCONFIRMED_TEXT_MESSAGE -} +func (m *_BACnetUnconfirmedServiceRequestUnconfirmedTextMessage) GetServiceChoice() BACnetUnconfirmedServiceChoice { +return BACnetUnconfirmedServiceChoice_UNCONFIRMED_TEXT_MESSAGE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetUnconfirmedServiceRequestUnconfirmedTextMessage) InitializeParent(parent BACnetUnconfirmedServiceRequest) { -} +func (m *_BACnetUnconfirmedServiceRequestUnconfirmedTextMessage) InitializeParent(parent BACnetUnconfirmedServiceRequest ) {} -func (m *_BACnetUnconfirmedServiceRequestUnconfirmedTextMessage) GetParent() BACnetUnconfirmedServiceRequest { +func (m *_BACnetUnconfirmedServiceRequestUnconfirmedTextMessage) GetParent() BACnetUnconfirmedServiceRequest { return m._BACnetUnconfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -106,14 +107,15 @@ func (m *_BACnetUnconfirmedServiceRequestUnconfirmedTextMessage) GetMessage() BA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetUnconfirmedServiceRequestUnconfirmedTextMessage factory function for _BACnetUnconfirmedServiceRequestUnconfirmedTextMessage -func NewBACnetUnconfirmedServiceRequestUnconfirmedTextMessage(textMessageSourceDevice BACnetContextTagObjectIdentifier, messageClass BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass, messagePriority BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged, message BACnetContextTagCharacterString, serviceRequestLength uint16) *_BACnetUnconfirmedServiceRequestUnconfirmedTextMessage { +func NewBACnetUnconfirmedServiceRequestUnconfirmedTextMessage( textMessageSourceDevice BACnetContextTagObjectIdentifier , messageClass BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass , messagePriority BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTagged , message BACnetContextTagCharacterString , serviceRequestLength uint16 ) *_BACnetUnconfirmedServiceRequestUnconfirmedTextMessage { _result := &_BACnetUnconfirmedServiceRequestUnconfirmedTextMessage{ - TextMessageSourceDevice: textMessageSourceDevice, - MessageClass: messageClass, - MessagePriority: messagePriority, - Message: message, - _BACnetUnconfirmedServiceRequest: NewBACnetUnconfirmedServiceRequest(serviceRequestLength), + TextMessageSourceDevice: textMessageSourceDevice, + MessageClass: messageClass, + MessagePriority: messagePriority, + Message: message, + _BACnetUnconfirmedServiceRequest: NewBACnetUnconfirmedServiceRequest(serviceRequestLength), } _result._BACnetUnconfirmedServiceRequest._BACnetUnconfirmedServiceRequestChildRequirements = _result return _result @@ -121,7 +123,7 @@ func NewBACnetUnconfirmedServiceRequestUnconfirmedTextMessage(textMessageSourceD // Deprecated: use the interface for direct cast func CastBACnetUnconfirmedServiceRequestUnconfirmedTextMessage(structType interface{}) BACnetUnconfirmedServiceRequestUnconfirmedTextMessage { - if casted, ok := structType.(BACnetUnconfirmedServiceRequestUnconfirmedTextMessage); ok { + if casted, ok := structType.(BACnetUnconfirmedServiceRequestUnconfirmedTextMessage); ok { return casted } if casted, ok := structType.(*BACnetUnconfirmedServiceRequestUnconfirmedTextMessage); ok { @@ -154,6 +156,7 @@ func (m *_BACnetUnconfirmedServiceRequestUnconfirmedTextMessage) GetLengthInBits return lengthInBits } + func (m *_BACnetUnconfirmedServiceRequestUnconfirmedTextMessage) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -175,7 +178,7 @@ func BACnetUnconfirmedServiceRequestUnconfirmedTextMessageParseWithBuffer(ctx co if pullErr := readBuffer.PullContext("textMessageSourceDevice"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for textMessageSourceDevice") } - _textMessageSourceDevice, _textMessageSourceDeviceErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER)) +_textMessageSourceDevice, _textMessageSourceDeviceErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_BACNET_OBJECT_IDENTIFIER ) ) if _textMessageSourceDeviceErr != nil { return nil, errors.Wrap(_textMessageSourceDeviceErr, "Error parsing 'textMessageSourceDevice' field of BACnetUnconfirmedServiceRequestUnconfirmedTextMessage") } @@ -186,12 +189,12 @@ func BACnetUnconfirmedServiceRequestUnconfirmedTextMessageParseWithBuffer(ctx co // Optional Field (messageClass) (Can be skipped, if a given expression evaluates to false) var messageClass BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("messageClass"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for messageClass") } - _val, _err := BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassParseWithBuffer(ctx, readBuffer, uint8(1)) +_val, _err := BACnetConfirmedServiceRequestConfirmedTextMessageMessageClassParseWithBuffer(ctx, readBuffer , uint8(1) ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -210,7 +213,7 @@ func BACnetUnconfirmedServiceRequestUnconfirmedTextMessageParseWithBuffer(ctx co if pullErr := readBuffer.PullContext("messagePriority"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for messagePriority") } - _messagePriority, _messagePriorityErr := BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_messagePriority, _messagePriorityErr := BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _messagePriorityErr != nil { return nil, errors.Wrap(_messagePriorityErr, "Error parsing 'messagePriority' field of BACnetUnconfirmedServiceRequestUnconfirmedTextMessage") } @@ -223,7 +226,7 @@ func BACnetUnconfirmedServiceRequestUnconfirmedTextMessageParseWithBuffer(ctx co if pullErr := readBuffer.PullContext("message"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for message") } - _message, _messageErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(3)), BACnetDataType(BACnetDataType_CHARACTER_STRING)) +_message, _messageErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(3) ) , BACnetDataType( BACnetDataType_CHARACTER_STRING ) ) if _messageErr != nil { return nil, errors.Wrap(_messageErr, "Error parsing 'message' field of BACnetUnconfirmedServiceRequestUnconfirmedTextMessage") } @@ -242,9 +245,9 @@ func BACnetUnconfirmedServiceRequestUnconfirmedTextMessageParseWithBuffer(ctx co ServiceRequestLength: serviceRequestLength, }, TextMessageSourceDevice: textMessageSourceDevice, - MessageClass: messageClass, - MessagePriority: messagePriority, - Message: message, + MessageClass: messageClass, + MessagePriority: messagePriority, + Message: message, } _child._BACnetUnconfirmedServiceRequest._BACnetUnconfirmedServiceRequestChildRequirements = _child return _child, nil @@ -266,57 +269,57 @@ func (m *_BACnetUnconfirmedServiceRequestUnconfirmedTextMessage) SerializeWithWr return errors.Wrap(pushErr, "Error pushing for BACnetUnconfirmedServiceRequestUnconfirmedTextMessage") } - // Simple Field (textMessageSourceDevice) - if pushErr := writeBuffer.PushContext("textMessageSourceDevice"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for textMessageSourceDevice") - } - _textMessageSourceDeviceErr := writeBuffer.WriteSerializable(ctx, m.GetTextMessageSourceDevice()) - if popErr := writeBuffer.PopContext("textMessageSourceDevice"); popErr != nil { - return errors.Wrap(popErr, "Error popping for textMessageSourceDevice") - } - if _textMessageSourceDeviceErr != nil { - return errors.Wrap(_textMessageSourceDeviceErr, "Error serializing 'textMessageSourceDevice' field") - } - - // Optional Field (messageClass) (Can be skipped, if the value is null) - var messageClass BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass = nil - if m.GetMessageClass() != nil { - if pushErr := writeBuffer.PushContext("messageClass"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for messageClass") - } - messageClass = m.GetMessageClass() - _messageClassErr := writeBuffer.WriteSerializable(ctx, messageClass) - if popErr := writeBuffer.PopContext("messageClass"); popErr != nil { - return errors.Wrap(popErr, "Error popping for messageClass") - } - if _messageClassErr != nil { - return errors.Wrap(_messageClassErr, "Error serializing 'messageClass' field") - } - } + // Simple Field (textMessageSourceDevice) + if pushErr := writeBuffer.PushContext("textMessageSourceDevice"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for textMessageSourceDevice") + } + _textMessageSourceDeviceErr := writeBuffer.WriteSerializable(ctx, m.GetTextMessageSourceDevice()) + if popErr := writeBuffer.PopContext("textMessageSourceDevice"); popErr != nil { + return errors.Wrap(popErr, "Error popping for textMessageSourceDevice") + } + if _textMessageSourceDeviceErr != nil { + return errors.Wrap(_textMessageSourceDeviceErr, "Error serializing 'textMessageSourceDevice' field") + } - // Simple Field (messagePriority) - if pushErr := writeBuffer.PushContext("messagePriority"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for messagePriority") + // Optional Field (messageClass) (Can be skipped, if the value is null) + var messageClass BACnetConfirmedServiceRequestConfirmedTextMessageMessageClass = nil + if m.GetMessageClass() != nil { + if pushErr := writeBuffer.PushContext("messageClass"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for messageClass") } - _messagePriorityErr := writeBuffer.WriteSerializable(ctx, m.GetMessagePriority()) - if popErr := writeBuffer.PopContext("messagePriority"); popErr != nil { - return errors.Wrap(popErr, "Error popping for messagePriority") + messageClass = m.GetMessageClass() + _messageClassErr := writeBuffer.WriteSerializable(ctx, messageClass) + if popErr := writeBuffer.PopContext("messageClass"); popErr != nil { + return errors.Wrap(popErr, "Error popping for messageClass") } - if _messagePriorityErr != nil { - return errors.Wrap(_messagePriorityErr, "Error serializing 'messagePriority' field") + if _messageClassErr != nil { + return errors.Wrap(_messageClassErr, "Error serializing 'messageClass' field") } + } - // Simple Field (message) - if pushErr := writeBuffer.PushContext("message"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for message") - } - _messageErr := writeBuffer.WriteSerializable(ctx, m.GetMessage()) - if popErr := writeBuffer.PopContext("message"); popErr != nil { - return errors.Wrap(popErr, "Error popping for message") - } - if _messageErr != nil { - return errors.Wrap(_messageErr, "Error serializing 'message' field") - } + // Simple Field (messagePriority) + if pushErr := writeBuffer.PushContext("messagePriority"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for messagePriority") + } + _messagePriorityErr := writeBuffer.WriteSerializable(ctx, m.GetMessagePriority()) + if popErr := writeBuffer.PopContext("messagePriority"); popErr != nil { + return errors.Wrap(popErr, "Error popping for messagePriority") + } + if _messagePriorityErr != nil { + return errors.Wrap(_messagePriorityErr, "Error serializing 'messagePriority' field") + } + + // Simple Field (message) + if pushErr := writeBuffer.PushContext("message"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for message") + } + _messageErr := writeBuffer.WriteSerializable(ctx, m.GetMessage()) + if popErr := writeBuffer.PopContext("message"); popErr != nil { + return errors.Wrap(popErr, "Error popping for message") + } + if _messageErr != nil { + return errors.Wrap(_messageErr, "Error serializing 'message' field") + } if popErr := writeBuffer.PopContext("BACnetUnconfirmedServiceRequestUnconfirmedTextMessage"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetUnconfirmedServiceRequestUnconfirmedTextMessage") @@ -326,6 +329,7 @@ func (m *_BACnetUnconfirmedServiceRequestUnconfirmedTextMessage) SerializeWithWr return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetUnconfirmedServiceRequestUnconfirmedTextMessage) isBACnetUnconfirmedServiceRequestUnconfirmedTextMessage() bool { return true } @@ -340,3 +344,6 @@ func (m *_BACnetUnconfirmedServiceRequestUnconfirmedTextMessage) String() string } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestUnknown.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestUnknown.go index b35f8ef1585..91fdb1d05cb 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestUnknown.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestUnknown.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetUnconfirmedServiceRequestUnknown is the corresponding interface of BACnetUnconfirmedServiceRequestUnknown type BACnetUnconfirmedServiceRequestUnknown interface { @@ -46,30 +48,29 @@ type BACnetUnconfirmedServiceRequestUnknownExactly interface { // _BACnetUnconfirmedServiceRequestUnknown is the data-structure of this message type _BACnetUnconfirmedServiceRequestUnknown struct { *_BACnetUnconfirmedServiceRequest - UnknownBytes []byte + UnknownBytes []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetUnconfirmedServiceRequestUnknown) GetServiceChoice() BACnetUnconfirmedServiceChoice { - return 0 -} +func (m *_BACnetUnconfirmedServiceRequestUnknown) GetServiceChoice() BACnetUnconfirmedServiceChoice { +return 0} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetUnconfirmedServiceRequestUnknown) InitializeParent(parent BACnetUnconfirmedServiceRequest) { -} +func (m *_BACnetUnconfirmedServiceRequestUnknown) InitializeParent(parent BACnetUnconfirmedServiceRequest ) {} -func (m *_BACnetUnconfirmedServiceRequestUnknown) GetParent() BACnetUnconfirmedServiceRequest { +func (m *_BACnetUnconfirmedServiceRequestUnknown) GetParent() BACnetUnconfirmedServiceRequest { return m._BACnetUnconfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -84,11 +85,12 @@ func (m *_BACnetUnconfirmedServiceRequestUnknown) GetUnknownBytes() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetUnconfirmedServiceRequestUnknown factory function for _BACnetUnconfirmedServiceRequestUnknown -func NewBACnetUnconfirmedServiceRequestUnknown(unknownBytes []byte, serviceRequestLength uint16) *_BACnetUnconfirmedServiceRequestUnknown { +func NewBACnetUnconfirmedServiceRequestUnknown( unknownBytes []byte , serviceRequestLength uint16 ) *_BACnetUnconfirmedServiceRequestUnknown { _result := &_BACnetUnconfirmedServiceRequestUnknown{ - UnknownBytes: unknownBytes, - _BACnetUnconfirmedServiceRequest: NewBACnetUnconfirmedServiceRequest(serviceRequestLength), + UnknownBytes: unknownBytes, + _BACnetUnconfirmedServiceRequest: NewBACnetUnconfirmedServiceRequest(serviceRequestLength), } _result._BACnetUnconfirmedServiceRequest._BACnetUnconfirmedServiceRequestChildRequirements = _result return _result @@ -96,7 +98,7 @@ func NewBACnetUnconfirmedServiceRequestUnknown(unknownBytes []byte, serviceReque // Deprecated: use the interface for direct cast func CastBACnetUnconfirmedServiceRequestUnknown(structType interface{}) BACnetUnconfirmedServiceRequestUnknown { - if casted, ok := structType.(BACnetUnconfirmedServiceRequestUnknown); ok { + if casted, ok := structType.(BACnetUnconfirmedServiceRequestUnknown); ok { return casted } if casted, ok := structType.(*BACnetUnconfirmedServiceRequestUnknown); ok { @@ -120,6 +122,7 @@ func (m *_BACnetUnconfirmedServiceRequestUnknown) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_BACnetUnconfirmedServiceRequestUnknown) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -137,7 +140,7 @@ func BACnetUnconfirmedServiceRequestUnknownParseWithBuffer(ctx context.Context, currentPos := positionAware.GetPos() _ = currentPos // Byte Array field (unknownBytes) - numberOfBytesunknownBytes := int(utils.InlineIf((bool((serviceRequestLength) > (0))), func() interface{} { return uint16((uint16(serviceRequestLength) - uint16(uint16(1)))) }, func() interface{} { return uint16(uint16(0)) }).(uint16)) + numberOfBytesunknownBytes := int(utils.InlineIf((bool((serviceRequestLength) > ((0)))), func() interface{} {return uint16((uint16(serviceRequestLength) - uint16(uint16(1))))}, func() interface{} {return uint16(uint16(0))}).(uint16)) unknownBytes, _readArrayErr := readBuffer.ReadByteArray("unknownBytes", numberOfBytesunknownBytes) if _readArrayErr != nil { return nil, errors.Wrap(_readArrayErr, "Error parsing 'unknownBytes' field of BACnetUnconfirmedServiceRequestUnknown") @@ -174,11 +177,11 @@ func (m *_BACnetUnconfirmedServiceRequestUnknown) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for BACnetUnconfirmedServiceRequestUnknown") } - // Array Field (unknownBytes) - // Byte Array field (unknownBytes) - if err := writeBuffer.WriteByteArray("unknownBytes", m.GetUnknownBytes()); err != nil { - return errors.Wrap(err, "Error serializing 'unknownBytes' field") - } + // Array Field (unknownBytes) + // Byte Array field (unknownBytes) + if err := writeBuffer.WriteByteArray("unknownBytes", m.GetUnknownBytes()); err != nil { + return errors.Wrap(err, "Error serializing 'unknownBytes' field") + } if popErr := writeBuffer.PopContext("BACnetUnconfirmedServiceRequestUnknown"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetUnconfirmedServiceRequestUnknown") @@ -188,6 +191,7 @@ func (m *_BACnetUnconfirmedServiceRequestUnknown) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetUnconfirmedServiceRequestUnknown) isBACnetUnconfirmedServiceRequestUnknown() bool { return true } @@ -202,3 +206,6 @@ func (m *_BACnetUnconfirmedServiceRequestUnknown) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestWhoHas.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestWhoHas.go index 92fef3d3915..7bff8b03fe8 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestWhoHas.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestWhoHas.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetUnconfirmedServiceRequestWhoHas is the corresponding interface of BACnetUnconfirmedServiceRequestWhoHas type BACnetUnconfirmedServiceRequestWhoHas interface { @@ -51,32 +53,31 @@ type BACnetUnconfirmedServiceRequestWhoHasExactly interface { // _BACnetUnconfirmedServiceRequestWhoHas is the data-structure of this message type _BACnetUnconfirmedServiceRequestWhoHas struct { *_BACnetUnconfirmedServiceRequest - DeviceInstanceRangeLowLimit BACnetContextTagUnsignedInteger - DeviceInstanceRangeHighLimit BACnetContextTagUnsignedInteger - Object BACnetUnconfirmedServiceRequestWhoHasObject + DeviceInstanceRangeLowLimit BACnetContextTagUnsignedInteger + DeviceInstanceRangeHighLimit BACnetContextTagUnsignedInteger + Object BACnetUnconfirmedServiceRequestWhoHasObject } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetUnconfirmedServiceRequestWhoHas) GetServiceChoice() BACnetUnconfirmedServiceChoice { - return BACnetUnconfirmedServiceChoice_WHO_HAS -} +func (m *_BACnetUnconfirmedServiceRequestWhoHas) GetServiceChoice() BACnetUnconfirmedServiceChoice { +return BACnetUnconfirmedServiceChoice_WHO_HAS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetUnconfirmedServiceRequestWhoHas) InitializeParent(parent BACnetUnconfirmedServiceRequest) { -} +func (m *_BACnetUnconfirmedServiceRequestWhoHas) InitializeParent(parent BACnetUnconfirmedServiceRequest ) {} -func (m *_BACnetUnconfirmedServiceRequestWhoHas) GetParent() BACnetUnconfirmedServiceRequest { +func (m *_BACnetUnconfirmedServiceRequestWhoHas) GetParent() BACnetUnconfirmedServiceRequest { return m._BACnetUnconfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -99,13 +100,14 @@ func (m *_BACnetUnconfirmedServiceRequestWhoHas) GetObject() BACnetUnconfirmedSe /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetUnconfirmedServiceRequestWhoHas factory function for _BACnetUnconfirmedServiceRequestWhoHas -func NewBACnetUnconfirmedServiceRequestWhoHas(deviceInstanceRangeLowLimit BACnetContextTagUnsignedInteger, deviceInstanceRangeHighLimit BACnetContextTagUnsignedInteger, object BACnetUnconfirmedServiceRequestWhoHasObject, serviceRequestLength uint16) *_BACnetUnconfirmedServiceRequestWhoHas { +func NewBACnetUnconfirmedServiceRequestWhoHas( deviceInstanceRangeLowLimit BACnetContextTagUnsignedInteger , deviceInstanceRangeHighLimit BACnetContextTagUnsignedInteger , object BACnetUnconfirmedServiceRequestWhoHasObject , serviceRequestLength uint16 ) *_BACnetUnconfirmedServiceRequestWhoHas { _result := &_BACnetUnconfirmedServiceRequestWhoHas{ - DeviceInstanceRangeLowLimit: deviceInstanceRangeLowLimit, - DeviceInstanceRangeHighLimit: deviceInstanceRangeHighLimit, - Object: object, - _BACnetUnconfirmedServiceRequest: NewBACnetUnconfirmedServiceRequest(serviceRequestLength), + DeviceInstanceRangeLowLimit: deviceInstanceRangeLowLimit, + DeviceInstanceRangeHighLimit: deviceInstanceRangeHighLimit, + Object: object, + _BACnetUnconfirmedServiceRequest: NewBACnetUnconfirmedServiceRequest(serviceRequestLength), } _result._BACnetUnconfirmedServiceRequest._BACnetUnconfirmedServiceRequestChildRequirements = _result return _result @@ -113,7 +115,7 @@ func NewBACnetUnconfirmedServiceRequestWhoHas(deviceInstanceRangeLowLimit BACnet // Deprecated: use the interface for direct cast func CastBACnetUnconfirmedServiceRequestWhoHas(structType interface{}) BACnetUnconfirmedServiceRequestWhoHas { - if casted, ok := structType.(BACnetUnconfirmedServiceRequestWhoHas); ok { + if casted, ok := structType.(BACnetUnconfirmedServiceRequestWhoHas); ok { return casted } if casted, ok := structType.(*BACnetUnconfirmedServiceRequestWhoHas); ok { @@ -145,6 +147,7 @@ func (m *_BACnetUnconfirmedServiceRequestWhoHas) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BACnetUnconfirmedServiceRequestWhoHas) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -164,12 +167,12 @@ func BACnetUnconfirmedServiceRequestWhoHasParseWithBuffer(ctx context.Context, r // Optional Field (deviceInstanceRangeLowLimit) (Can be skipped, if a given expression evaluates to false) var deviceInstanceRangeLowLimit BACnetContextTagUnsignedInteger = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("deviceInstanceRangeLowLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for deviceInstanceRangeLowLimit") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(0), BACnetDataType_UNSIGNED_INTEGER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(0) , BACnetDataType_UNSIGNED_INTEGER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -186,12 +189,12 @@ func BACnetUnconfirmedServiceRequestWhoHasParseWithBuffer(ctx context.Context, r // Optional Field (deviceInstanceRangeHighLimit) (Can be skipped, if a given expression evaluates to false) var deviceInstanceRangeHighLimit BACnetContextTagUnsignedInteger = nil - if bool((deviceInstanceRangeLowLimit) != (nil)) { + if bool(((deviceInstanceRangeLowLimit)) != (nil)) { currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("deviceInstanceRangeHighLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for deviceInstanceRangeHighLimit") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(1), BACnetDataType_UNSIGNED_INTEGER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(1) , BACnetDataType_UNSIGNED_INTEGER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -210,7 +213,7 @@ func BACnetUnconfirmedServiceRequestWhoHasParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("object"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for object") } - _object, _objectErr := BACnetUnconfirmedServiceRequestWhoHasObjectParseWithBuffer(ctx, readBuffer) +_object, _objectErr := BACnetUnconfirmedServiceRequestWhoHasObjectParseWithBuffer(ctx, readBuffer) if _objectErr != nil { return nil, errors.Wrap(_objectErr, "Error parsing 'object' field of BACnetUnconfirmedServiceRequestWhoHas") } @@ -228,9 +231,9 @@ func BACnetUnconfirmedServiceRequestWhoHasParseWithBuffer(ctx context.Context, r _BACnetUnconfirmedServiceRequest: &_BACnetUnconfirmedServiceRequest{ ServiceRequestLength: serviceRequestLength, }, - DeviceInstanceRangeLowLimit: deviceInstanceRangeLowLimit, + DeviceInstanceRangeLowLimit: deviceInstanceRangeLowLimit, DeviceInstanceRangeHighLimit: deviceInstanceRangeHighLimit, - Object: object, + Object: object, } _child._BACnetUnconfirmedServiceRequest._BACnetUnconfirmedServiceRequestChildRequirements = _child return _child, nil @@ -252,49 +255,49 @@ func (m *_BACnetUnconfirmedServiceRequestWhoHas) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for BACnetUnconfirmedServiceRequestWhoHas") } - // Optional Field (deviceInstanceRangeLowLimit) (Can be skipped, if the value is null) - var deviceInstanceRangeLowLimit BACnetContextTagUnsignedInteger = nil - if m.GetDeviceInstanceRangeLowLimit() != nil { - if pushErr := writeBuffer.PushContext("deviceInstanceRangeLowLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for deviceInstanceRangeLowLimit") - } - deviceInstanceRangeLowLimit = m.GetDeviceInstanceRangeLowLimit() - _deviceInstanceRangeLowLimitErr := writeBuffer.WriteSerializable(ctx, deviceInstanceRangeLowLimit) - if popErr := writeBuffer.PopContext("deviceInstanceRangeLowLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for deviceInstanceRangeLowLimit") - } - if _deviceInstanceRangeLowLimitErr != nil { - return errors.Wrap(_deviceInstanceRangeLowLimitErr, "Error serializing 'deviceInstanceRangeLowLimit' field") - } + // Optional Field (deviceInstanceRangeLowLimit) (Can be skipped, if the value is null) + var deviceInstanceRangeLowLimit BACnetContextTagUnsignedInteger = nil + if m.GetDeviceInstanceRangeLowLimit() != nil { + if pushErr := writeBuffer.PushContext("deviceInstanceRangeLowLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for deviceInstanceRangeLowLimit") } - - // Optional Field (deviceInstanceRangeHighLimit) (Can be skipped, if the value is null) - var deviceInstanceRangeHighLimit BACnetContextTagUnsignedInteger = nil - if m.GetDeviceInstanceRangeHighLimit() != nil { - if pushErr := writeBuffer.PushContext("deviceInstanceRangeHighLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for deviceInstanceRangeHighLimit") - } - deviceInstanceRangeHighLimit = m.GetDeviceInstanceRangeHighLimit() - _deviceInstanceRangeHighLimitErr := writeBuffer.WriteSerializable(ctx, deviceInstanceRangeHighLimit) - if popErr := writeBuffer.PopContext("deviceInstanceRangeHighLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for deviceInstanceRangeHighLimit") - } - if _deviceInstanceRangeHighLimitErr != nil { - return errors.Wrap(_deviceInstanceRangeHighLimitErr, "Error serializing 'deviceInstanceRangeHighLimit' field") - } + deviceInstanceRangeLowLimit = m.GetDeviceInstanceRangeLowLimit() + _deviceInstanceRangeLowLimitErr := writeBuffer.WriteSerializable(ctx, deviceInstanceRangeLowLimit) + if popErr := writeBuffer.PopContext("deviceInstanceRangeLowLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for deviceInstanceRangeLowLimit") } + if _deviceInstanceRangeLowLimitErr != nil { + return errors.Wrap(_deviceInstanceRangeLowLimitErr, "Error serializing 'deviceInstanceRangeLowLimit' field") + } + } - // Simple Field (object) - if pushErr := writeBuffer.PushContext("object"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for object") + // Optional Field (deviceInstanceRangeHighLimit) (Can be skipped, if the value is null) + var deviceInstanceRangeHighLimit BACnetContextTagUnsignedInteger = nil + if m.GetDeviceInstanceRangeHighLimit() != nil { + if pushErr := writeBuffer.PushContext("deviceInstanceRangeHighLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for deviceInstanceRangeHighLimit") } - _objectErr := writeBuffer.WriteSerializable(ctx, m.GetObject()) - if popErr := writeBuffer.PopContext("object"); popErr != nil { - return errors.Wrap(popErr, "Error popping for object") + deviceInstanceRangeHighLimit = m.GetDeviceInstanceRangeHighLimit() + _deviceInstanceRangeHighLimitErr := writeBuffer.WriteSerializable(ctx, deviceInstanceRangeHighLimit) + if popErr := writeBuffer.PopContext("deviceInstanceRangeHighLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for deviceInstanceRangeHighLimit") } - if _objectErr != nil { - return errors.Wrap(_objectErr, "Error serializing 'object' field") + if _deviceInstanceRangeHighLimitErr != nil { + return errors.Wrap(_deviceInstanceRangeHighLimitErr, "Error serializing 'deviceInstanceRangeHighLimit' field") } + } + + // Simple Field (object) + if pushErr := writeBuffer.PushContext("object"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for object") + } + _objectErr := writeBuffer.WriteSerializable(ctx, m.GetObject()) + if popErr := writeBuffer.PopContext("object"); popErr != nil { + return errors.Wrap(popErr, "Error popping for object") + } + if _objectErr != nil { + return errors.Wrap(_objectErr, "Error serializing 'object' field") + } if popErr := writeBuffer.PopContext("BACnetUnconfirmedServiceRequestWhoHas"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetUnconfirmedServiceRequestWhoHas") @@ -304,6 +307,7 @@ func (m *_BACnetUnconfirmedServiceRequestWhoHas) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetUnconfirmedServiceRequestWhoHas) isBACnetUnconfirmedServiceRequestWhoHas() bool { return true } @@ -318,3 +322,6 @@ func (m *_BACnetUnconfirmedServiceRequestWhoHas) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestWhoHasObject.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestWhoHasObject.go index 0c02ae9bfe0..4d009f190e8 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestWhoHasObject.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestWhoHasObject.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetUnconfirmedServiceRequestWhoHasObject is the corresponding interface of BACnetUnconfirmedServiceRequestWhoHasObject type BACnetUnconfirmedServiceRequestWhoHasObject interface { @@ -47,7 +49,7 @@ type BACnetUnconfirmedServiceRequestWhoHasObjectExactly interface { // _BACnetUnconfirmedServiceRequestWhoHasObject is the data-structure of this message type _BACnetUnconfirmedServiceRequestWhoHasObject struct { _BACnetUnconfirmedServiceRequestWhoHasObjectChildRequirements - PeekedTagHeader BACnetTagHeader + PeekedTagHeader BACnetTagHeader } type _BACnetUnconfirmedServiceRequestWhoHasObjectChildRequirements interface { @@ -55,6 +57,7 @@ type _BACnetUnconfirmedServiceRequestWhoHasObjectChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type BACnetUnconfirmedServiceRequestWhoHasObjectParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetUnconfirmedServiceRequestWhoHasObject, serializeChildFunction func() error) error GetTypeName() string @@ -62,13 +65,12 @@ type BACnetUnconfirmedServiceRequestWhoHasObjectParent interface { type BACnetUnconfirmedServiceRequestWhoHasObjectChild interface { utils.Serializable - InitializeParent(parent BACnetUnconfirmedServiceRequestWhoHasObject, peekedTagHeader BACnetTagHeader) +InitializeParent(parent BACnetUnconfirmedServiceRequestWhoHasObject , peekedTagHeader BACnetTagHeader ) GetParent() *BACnetUnconfirmedServiceRequestWhoHasObject GetTypeName() string BACnetUnconfirmedServiceRequestWhoHasObject } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,14 +100,15 @@ func (m *_BACnetUnconfirmedServiceRequestWhoHasObject) GetPeekedTagNumber() uint /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetUnconfirmedServiceRequestWhoHasObject factory function for _BACnetUnconfirmedServiceRequestWhoHasObject -func NewBACnetUnconfirmedServiceRequestWhoHasObject(peekedTagHeader BACnetTagHeader) *_BACnetUnconfirmedServiceRequestWhoHasObject { - return &_BACnetUnconfirmedServiceRequestWhoHasObject{PeekedTagHeader: peekedTagHeader} +func NewBACnetUnconfirmedServiceRequestWhoHasObject( peekedTagHeader BACnetTagHeader ) *_BACnetUnconfirmedServiceRequestWhoHasObject { +return &_BACnetUnconfirmedServiceRequestWhoHasObject{ PeekedTagHeader: peekedTagHeader } } // Deprecated: use the interface for direct cast func CastBACnetUnconfirmedServiceRequestWhoHasObject(structType interface{}) BACnetUnconfirmedServiceRequestWhoHasObject { - if casted, ok := structType.(BACnetUnconfirmedServiceRequestWhoHasObject); ok { + if casted, ok := structType.(BACnetUnconfirmedServiceRequestWhoHasObject); ok { return casted } if casted, ok := structType.(*BACnetUnconfirmedServiceRequestWhoHasObject); ok { @@ -118,6 +121,7 @@ func (m *_BACnetUnconfirmedServiceRequestWhoHasObject) GetTypeName() string { return "BACnetUnconfirmedServiceRequestWhoHasObject" } + func (m *_BACnetUnconfirmedServiceRequestWhoHasObject) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -143,13 +147,13 @@ func BACnetUnconfirmedServiceRequestWhoHasObjectParseWithBuffer(ctx context.Cont currentPos := positionAware.GetPos() _ = currentPos - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Virtual field _peekedTagNumber := peekedTagHeader.GetActualTagNumber() @@ -159,17 +163,17 @@ func BACnetUnconfirmedServiceRequestWhoHasObjectParseWithBuffer(ctx context.Cont // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetUnconfirmedServiceRequestWhoHasObjectChildSerializeRequirement interface { BACnetUnconfirmedServiceRequestWhoHasObject - InitializeParent(BACnetUnconfirmedServiceRequestWhoHasObject, BACnetTagHeader) + InitializeParent(BACnetUnconfirmedServiceRequestWhoHasObject, BACnetTagHeader) GetParent() BACnetUnconfirmedServiceRequestWhoHasObject } var _childTemp interface{} var _child BACnetUnconfirmedServiceRequestWhoHasObjectChildSerializeRequirement var typeSwitchError error switch { - case peekedTagNumber == uint8(2): // BACnetUnconfirmedServiceRequestWhoHasObjectIdentifier - _childTemp, typeSwitchError = BACnetUnconfirmedServiceRequestWhoHasObjectIdentifierParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(3): // BACnetUnconfirmedServiceRequestWhoHasObjectName - _childTemp, typeSwitchError = BACnetUnconfirmedServiceRequestWhoHasObjectNameParseWithBuffer(ctx, readBuffer) +case peekedTagNumber == uint8(2) : // BACnetUnconfirmedServiceRequestWhoHasObjectIdentifier + _childTemp, typeSwitchError = BACnetUnconfirmedServiceRequestWhoHasObjectIdentifierParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(3) : // BACnetUnconfirmedServiceRequestWhoHasObjectName + _childTemp, typeSwitchError = BACnetUnconfirmedServiceRequestWhoHasObjectNameParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedTagNumber=%v]", peekedTagNumber) } @@ -183,7 +187,7 @@ func BACnetUnconfirmedServiceRequestWhoHasObjectParseWithBuffer(ctx context.Cont } // Finish initializing - _child.InitializeParent(_child, peekedTagHeader) +_child.InitializeParent(_child , peekedTagHeader ) return _child, nil } @@ -193,7 +197,7 @@ func (pm *_BACnetUnconfirmedServiceRequestWhoHasObject) SerializeParent(ctx cont _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetUnconfirmedServiceRequestWhoHasObject"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetUnconfirmedServiceRequestWhoHasObject"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetUnconfirmedServiceRequestWhoHasObject") } // Virtual field @@ -212,6 +216,7 @@ func (pm *_BACnetUnconfirmedServiceRequestWhoHasObject) SerializeParent(ctx cont return nil } + func (m *_BACnetUnconfirmedServiceRequestWhoHasObject) isBACnetUnconfirmedServiceRequestWhoHasObject() bool { return true } @@ -226,3 +231,6 @@ func (m *_BACnetUnconfirmedServiceRequestWhoHasObject) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestWhoHasObjectIdentifier.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestWhoHasObjectIdentifier.go index 7ec90c99f27..83545926849 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestWhoHasObjectIdentifier.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestWhoHasObjectIdentifier.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetUnconfirmedServiceRequestWhoHasObjectIdentifier is the corresponding interface of BACnetUnconfirmedServiceRequestWhoHasObjectIdentifier type BACnetUnconfirmedServiceRequestWhoHasObjectIdentifier interface { @@ -46,9 +48,11 @@ type BACnetUnconfirmedServiceRequestWhoHasObjectIdentifierExactly interface { // _BACnetUnconfirmedServiceRequestWhoHasObjectIdentifier is the data-structure of this message type _BACnetUnconfirmedServiceRequestWhoHasObjectIdentifier struct { *_BACnetUnconfirmedServiceRequestWhoHasObject - ObjectIdentifier BACnetContextTagObjectIdentifier + ObjectIdentifier BACnetContextTagObjectIdentifier } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetUnconfirmedServiceRequestWhoHasObjectIdentifier struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetUnconfirmedServiceRequestWhoHasObjectIdentifier) InitializeParent(parent BACnetUnconfirmedServiceRequestWhoHasObject, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetUnconfirmedServiceRequestWhoHasObjectIdentifier) InitializeParent(parent BACnetUnconfirmedServiceRequestWhoHasObject , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetUnconfirmedServiceRequestWhoHasObjectIdentifier) GetParent() BACnetUnconfirmedServiceRequestWhoHasObject { +func (m *_BACnetUnconfirmedServiceRequestWhoHasObjectIdentifier) GetParent() BACnetUnconfirmedServiceRequestWhoHasObject { return m._BACnetUnconfirmedServiceRequestWhoHasObject } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetUnconfirmedServiceRequestWhoHasObjectIdentifier) GetObjectIdenti /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetUnconfirmedServiceRequestWhoHasObjectIdentifier factory function for _BACnetUnconfirmedServiceRequestWhoHasObjectIdentifier -func NewBACnetUnconfirmedServiceRequestWhoHasObjectIdentifier(objectIdentifier BACnetContextTagObjectIdentifier, peekedTagHeader BACnetTagHeader) *_BACnetUnconfirmedServiceRequestWhoHasObjectIdentifier { +func NewBACnetUnconfirmedServiceRequestWhoHasObjectIdentifier( objectIdentifier BACnetContextTagObjectIdentifier , peekedTagHeader BACnetTagHeader ) *_BACnetUnconfirmedServiceRequestWhoHasObjectIdentifier { _result := &_BACnetUnconfirmedServiceRequestWhoHasObjectIdentifier{ ObjectIdentifier: objectIdentifier, - _BACnetUnconfirmedServiceRequestWhoHasObject: NewBACnetUnconfirmedServiceRequestWhoHasObject(peekedTagHeader), + _BACnetUnconfirmedServiceRequestWhoHasObject: NewBACnetUnconfirmedServiceRequestWhoHasObject(peekedTagHeader), } _result._BACnetUnconfirmedServiceRequestWhoHasObject._BACnetUnconfirmedServiceRequestWhoHasObjectChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetUnconfirmedServiceRequestWhoHasObjectIdentifier(objectIdentifier B // Deprecated: use the interface for direct cast func CastBACnetUnconfirmedServiceRequestWhoHasObjectIdentifier(structType interface{}) BACnetUnconfirmedServiceRequestWhoHasObjectIdentifier { - if casted, ok := structType.(BACnetUnconfirmedServiceRequestWhoHasObjectIdentifier); ok { + if casted, ok := structType.(BACnetUnconfirmedServiceRequestWhoHasObjectIdentifier); ok { return casted } if casted, ok := structType.(*BACnetUnconfirmedServiceRequestWhoHasObjectIdentifier); ok { @@ -115,6 +118,7 @@ func (m *_BACnetUnconfirmedServiceRequestWhoHasObjectIdentifier) GetLengthInBits return lengthInBits } + func (m *_BACnetUnconfirmedServiceRequestWhoHasObjectIdentifier) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetUnconfirmedServiceRequestWhoHasObjectIdentifierParseWithBuffer(ctx co if pullErr := readBuffer.PullContext("objectIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for objectIdentifier") } - _objectIdentifier, _objectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER)) +_objectIdentifier, _objectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , BACnetDataType( BACnetDataType_BACNET_OBJECT_IDENTIFIER ) ) if _objectIdentifierErr != nil { return nil, errors.Wrap(_objectIdentifierErr, "Error parsing 'objectIdentifier' field of BACnetUnconfirmedServiceRequestWhoHasObjectIdentifier") } @@ -151,7 +155,8 @@ func BACnetUnconfirmedServiceRequestWhoHasObjectIdentifierParseWithBuffer(ctx co // Create a partially initialized instance _child := &_BACnetUnconfirmedServiceRequestWhoHasObjectIdentifier{ - _BACnetUnconfirmedServiceRequestWhoHasObject: &_BACnetUnconfirmedServiceRequestWhoHasObject{}, + _BACnetUnconfirmedServiceRequestWhoHasObject: &_BACnetUnconfirmedServiceRequestWhoHasObject{ + }, ObjectIdentifier: objectIdentifier, } _child._BACnetUnconfirmedServiceRequestWhoHasObject._BACnetUnconfirmedServiceRequestWhoHasObjectChildRequirements = _child @@ -174,17 +179,17 @@ func (m *_BACnetUnconfirmedServiceRequestWhoHasObjectIdentifier) SerializeWithWr return errors.Wrap(pushErr, "Error pushing for BACnetUnconfirmedServiceRequestWhoHasObjectIdentifier") } - // Simple Field (objectIdentifier) - if pushErr := writeBuffer.PushContext("objectIdentifier"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for objectIdentifier") - } - _objectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetObjectIdentifier()) - if popErr := writeBuffer.PopContext("objectIdentifier"); popErr != nil { - return errors.Wrap(popErr, "Error popping for objectIdentifier") - } - if _objectIdentifierErr != nil { - return errors.Wrap(_objectIdentifierErr, "Error serializing 'objectIdentifier' field") - } + // Simple Field (objectIdentifier) + if pushErr := writeBuffer.PushContext("objectIdentifier"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for objectIdentifier") + } + _objectIdentifierErr := writeBuffer.WriteSerializable(ctx, m.GetObjectIdentifier()) + if popErr := writeBuffer.PopContext("objectIdentifier"); popErr != nil { + return errors.Wrap(popErr, "Error popping for objectIdentifier") + } + if _objectIdentifierErr != nil { + return errors.Wrap(_objectIdentifierErr, "Error serializing 'objectIdentifier' field") + } if popErr := writeBuffer.PopContext("BACnetUnconfirmedServiceRequestWhoHasObjectIdentifier"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetUnconfirmedServiceRequestWhoHasObjectIdentifier") @@ -194,6 +199,7 @@ func (m *_BACnetUnconfirmedServiceRequestWhoHasObjectIdentifier) SerializeWithWr return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetUnconfirmedServiceRequestWhoHasObjectIdentifier) isBACnetUnconfirmedServiceRequestWhoHasObjectIdentifier() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetUnconfirmedServiceRequestWhoHasObjectIdentifier) String() string } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestWhoHasObjectName.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestWhoHasObjectName.go index 4cf128d095d..0713a5ceb1a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestWhoHasObjectName.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestWhoHasObjectName.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetUnconfirmedServiceRequestWhoHasObjectName is the corresponding interface of BACnetUnconfirmedServiceRequestWhoHasObjectName type BACnetUnconfirmedServiceRequestWhoHasObjectName interface { @@ -46,9 +48,11 @@ type BACnetUnconfirmedServiceRequestWhoHasObjectNameExactly interface { // _BACnetUnconfirmedServiceRequestWhoHasObjectName is the data-structure of this message type _BACnetUnconfirmedServiceRequestWhoHasObjectName struct { *_BACnetUnconfirmedServiceRequestWhoHasObject - ObjectName BACnetContextTagCharacterString + ObjectName BACnetContextTagCharacterString } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetUnconfirmedServiceRequestWhoHasObjectName struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetUnconfirmedServiceRequestWhoHasObjectName) InitializeParent(parent BACnetUnconfirmedServiceRequestWhoHasObject, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetUnconfirmedServiceRequestWhoHasObjectName) InitializeParent(parent BACnetUnconfirmedServiceRequestWhoHasObject , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetUnconfirmedServiceRequestWhoHasObjectName) GetParent() BACnetUnconfirmedServiceRequestWhoHasObject { +func (m *_BACnetUnconfirmedServiceRequestWhoHasObjectName) GetParent() BACnetUnconfirmedServiceRequestWhoHasObject { return m._BACnetUnconfirmedServiceRequestWhoHasObject } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetUnconfirmedServiceRequestWhoHasObjectName) GetObjectName() BACne /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetUnconfirmedServiceRequestWhoHasObjectName factory function for _BACnetUnconfirmedServiceRequestWhoHasObjectName -func NewBACnetUnconfirmedServiceRequestWhoHasObjectName(objectName BACnetContextTagCharacterString, peekedTagHeader BACnetTagHeader) *_BACnetUnconfirmedServiceRequestWhoHasObjectName { +func NewBACnetUnconfirmedServiceRequestWhoHasObjectName( objectName BACnetContextTagCharacterString , peekedTagHeader BACnetTagHeader ) *_BACnetUnconfirmedServiceRequestWhoHasObjectName { _result := &_BACnetUnconfirmedServiceRequestWhoHasObjectName{ ObjectName: objectName, - _BACnetUnconfirmedServiceRequestWhoHasObject: NewBACnetUnconfirmedServiceRequestWhoHasObject(peekedTagHeader), + _BACnetUnconfirmedServiceRequestWhoHasObject: NewBACnetUnconfirmedServiceRequestWhoHasObject(peekedTagHeader), } _result._BACnetUnconfirmedServiceRequestWhoHasObject._BACnetUnconfirmedServiceRequestWhoHasObjectChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetUnconfirmedServiceRequestWhoHasObjectName(objectName BACnetContext // Deprecated: use the interface for direct cast func CastBACnetUnconfirmedServiceRequestWhoHasObjectName(structType interface{}) BACnetUnconfirmedServiceRequestWhoHasObjectName { - if casted, ok := structType.(BACnetUnconfirmedServiceRequestWhoHasObjectName); ok { + if casted, ok := structType.(BACnetUnconfirmedServiceRequestWhoHasObjectName); ok { return casted } if casted, ok := structType.(*BACnetUnconfirmedServiceRequestWhoHasObjectName); ok { @@ -115,6 +118,7 @@ func (m *_BACnetUnconfirmedServiceRequestWhoHasObjectName) GetLengthInBits(ctx c return lengthInBits } + func (m *_BACnetUnconfirmedServiceRequestWhoHasObjectName) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetUnconfirmedServiceRequestWhoHasObjectNameParseWithBuffer(ctx context. if pullErr := readBuffer.PullContext("objectName"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for objectName") } - _objectName, _objectNameErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(3)), BACnetDataType(BACnetDataType_CHARACTER_STRING)) +_objectName, _objectNameErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(3) ) , BACnetDataType( BACnetDataType_CHARACTER_STRING ) ) if _objectNameErr != nil { return nil, errors.Wrap(_objectNameErr, "Error parsing 'objectName' field of BACnetUnconfirmedServiceRequestWhoHasObjectName") } @@ -151,7 +155,8 @@ func BACnetUnconfirmedServiceRequestWhoHasObjectNameParseWithBuffer(ctx context. // Create a partially initialized instance _child := &_BACnetUnconfirmedServiceRequestWhoHasObjectName{ - _BACnetUnconfirmedServiceRequestWhoHasObject: &_BACnetUnconfirmedServiceRequestWhoHasObject{}, + _BACnetUnconfirmedServiceRequestWhoHasObject: &_BACnetUnconfirmedServiceRequestWhoHasObject{ + }, ObjectName: objectName, } _child._BACnetUnconfirmedServiceRequestWhoHasObject._BACnetUnconfirmedServiceRequestWhoHasObjectChildRequirements = _child @@ -174,17 +179,17 @@ func (m *_BACnetUnconfirmedServiceRequestWhoHasObjectName) SerializeWithWriteBuf return errors.Wrap(pushErr, "Error pushing for BACnetUnconfirmedServiceRequestWhoHasObjectName") } - // Simple Field (objectName) - if pushErr := writeBuffer.PushContext("objectName"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for objectName") - } - _objectNameErr := writeBuffer.WriteSerializable(ctx, m.GetObjectName()) - if popErr := writeBuffer.PopContext("objectName"); popErr != nil { - return errors.Wrap(popErr, "Error popping for objectName") - } - if _objectNameErr != nil { - return errors.Wrap(_objectNameErr, "Error serializing 'objectName' field") - } + // Simple Field (objectName) + if pushErr := writeBuffer.PushContext("objectName"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for objectName") + } + _objectNameErr := writeBuffer.WriteSerializable(ctx, m.GetObjectName()) + if popErr := writeBuffer.PopContext("objectName"); popErr != nil { + return errors.Wrap(popErr, "Error popping for objectName") + } + if _objectNameErr != nil { + return errors.Wrap(_objectNameErr, "Error serializing 'objectName' field") + } if popErr := writeBuffer.PopContext("BACnetUnconfirmedServiceRequestWhoHasObjectName"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetUnconfirmedServiceRequestWhoHasObjectName") @@ -194,6 +199,7 @@ func (m *_BACnetUnconfirmedServiceRequestWhoHasObjectName) SerializeWithWriteBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetUnconfirmedServiceRequestWhoHasObjectName) isBACnetUnconfirmedServiceRequestWhoHasObjectName() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetUnconfirmedServiceRequestWhoHasObjectName) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestWhoIs.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestWhoIs.go index bdabaedf8d0..9ceb08cdd8d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestWhoIs.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestWhoIs.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetUnconfirmedServiceRequestWhoIs is the corresponding interface of BACnetUnconfirmedServiceRequestWhoIs type BACnetUnconfirmedServiceRequestWhoIs interface { @@ -49,31 +51,30 @@ type BACnetUnconfirmedServiceRequestWhoIsExactly interface { // _BACnetUnconfirmedServiceRequestWhoIs is the data-structure of this message type _BACnetUnconfirmedServiceRequestWhoIs struct { *_BACnetUnconfirmedServiceRequest - DeviceInstanceRangeLowLimit BACnetContextTagUnsignedInteger - DeviceInstanceRangeHighLimit BACnetContextTagUnsignedInteger + DeviceInstanceRangeLowLimit BACnetContextTagUnsignedInteger + DeviceInstanceRangeHighLimit BACnetContextTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetUnconfirmedServiceRequestWhoIs) GetServiceChoice() BACnetUnconfirmedServiceChoice { - return BACnetUnconfirmedServiceChoice_WHO_IS -} +func (m *_BACnetUnconfirmedServiceRequestWhoIs) GetServiceChoice() BACnetUnconfirmedServiceChoice { +return BACnetUnconfirmedServiceChoice_WHO_IS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetUnconfirmedServiceRequestWhoIs) InitializeParent(parent BACnetUnconfirmedServiceRequest) { -} +func (m *_BACnetUnconfirmedServiceRequestWhoIs) InitializeParent(parent BACnetUnconfirmedServiceRequest ) {} -func (m *_BACnetUnconfirmedServiceRequestWhoIs) GetParent() BACnetUnconfirmedServiceRequest { +func (m *_BACnetUnconfirmedServiceRequestWhoIs) GetParent() BACnetUnconfirmedServiceRequest { return m._BACnetUnconfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,12 +93,13 @@ func (m *_BACnetUnconfirmedServiceRequestWhoIs) GetDeviceInstanceRangeHighLimit( /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetUnconfirmedServiceRequestWhoIs factory function for _BACnetUnconfirmedServiceRequestWhoIs -func NewBACnetUnconfirmedServiceRequestWhoIs(deviceInstanceRangeLowLimit BACnetContextTagUnsignedInteger, deviceInstanceRangeHighLimit BACnetContextTagUnsignedInteger, serviceRequestLength uint16) *_BACnetUnconfirmedServiceRequestWhoIs { +func NewBACnetUnconfirmedServiceRequestWhoIs( deviceInstanceRangeLowLimit BACnetContextTagUnsignedInteger , deviceInstanceRangeHighLimit BACnetContextTagUnsignedInteger , serviceRequestLength uint16 ) *_BACnetUnconfirmedServiceRequestWhoIs { _result := &_BACnetUnconfirmedServiceRequestWhoIs{ - DeviceInstanceRangeLowLimit: deviceInstanceRangeLowLimit, - DeviceInstanceRangeHighLimit: deviceInstanceRangeHighLimit, - _BACnetUnconfirmedServiceRequest: NewBACnetUnconfirmedServiceRequest(serviceRequestLength), + DeviceInstanceRangeLowLimit: deviceInstanceRangeLowLimit, + DeviceInstanceRangeHighLimit: deviceInstanceRangeHighLimit, + _BACnetUnconfirmedServiceRequest: NewBACnetUnconfirmedServiceRequest(serviceRequestLength), } _result._BACnetUnconfirmedServiceRequest._BACnetUnconfirmedServiceRequestChildRequirements = _result return _result @@ -105,7 +107,7 @@ func NewBACnetUnconfirmedServiceRequestWhoIs(deviceInstanceRangeLowLimit BACnetC // Deprecated: use the interface for direct cast func CastBACnetUnconfirmedServiceRequestWhoIs(structType interface{}) BACnetUnconfirmedServiceRequestWhoIs { - if casted, ok := structType.(BACnetUnconfirmedServiceRequestWhoIs); ok { + if casted, ok := structType.(BACnetUnconfirmedServiceRequestWhoIs); ok { return casted } if casted, ok := structType.(*BACnetUnconfirmedServiceRequestWhoIs); ok { @@ -134,6 +136,7 @@ func (m *_BACnetUnconfirmedServiceRequestWhoIs) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_BACnetUnconfirmedServiceRequestWhoIs) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -153,12 +156,12 @@ func BACnetUnconfirmedServiceRequestWhoIsParseWithBuffer(ctx context.Context, re // Optional Field (deviceInstanceRangeLowLimit) (Can be skipped, if a given expression evaluates to false) var deviceInstanceRangeLowLimit BACnetContextTagUnsignedInteger = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("deviceInstanceRangeLowLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for deviceInstanceRangeLowLimit") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(0), BACnetDataType_UNSIGNED_INTEGER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(0) , BACnetDataType_UNSIGNED_INTEGER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -175,12 +178,12 @@ func BACnetUnconfirmedServiceRequestWhoIsParseWithBuffer(ctx context.Context, re // Optional Field (deviceInstanceRangeHighLimit) (Can be skipped, if a given expression evaluates to false) var deviceInstanceRangeHighLimit BACnetContextTagUnsignedInteger = nil - if bool((deviceInstanceRangeLowLimit) != (nil)) { + if bool(((deviceInstanceRangeLowLimit)) != (nil)) { currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("deviceInstanceRangeHighLimit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for deviceInstanceRangeHighLimit") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(1), BACnetDataType_UNSIGNED_INTEGER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(1) , BACnetDataType_UNSIGNED_INTEGER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -204,7 +207,7 @@ func BACnetUnconfirmedServiceRequestWhoIsParseWithBuffer(ctx context.Context, re _BACnetUnconfirmedServiceRequest: &_BACnetUnconfirmedServiceRequest{ ServiceRequestLength: serviceRequestLength, }, - DeviceInstanceRangeLowLimit: deviceInstanceRangeLowLimit, + DeviceInstanceRangeLowLimit: deviceInstanceRangeLowLimit, DeviceInstanceRangeHighLimit: deviceInstanceRangeHighLimit, } _child._BACnetUnconfirmedServiceRequest._BACnetUnconfirmedServiceRequestChildRequirements = _child @@ -227,37 +230,37 @@ func (m *_BACnetUnconfirmedServiceRequestWhoIs) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for BACnetUnconfirmedServiceRequestWhoIs") } - // Optional Field (deviceInstanceRangeLowLimit) (Can be skipped, if the value is null) - var deviceInstanceRangeLowLimit BACnetContextTagUnsignedInteger = nil - if m.GetDeviceInstanceRangeLowLimit() != nil { - if pushErr := writeBuffer.PushContext("deviceInstanceRangeLowLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for deviceInstanceRangeLowLimit") - } - deviceInstanceRangeLowLimit = m.GetDeviceInstanceRangeLowLimit() - _deviceInstanceRangeLowLimitErr := writeBuffer.WriteSerializable(ctx, deviceInstanceRangeLowLimit) - if popErr := writeBuffer.PopContext("deviceInstanceRangeLowLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for deviceInstanceRangeLowLimit") - } - if _deviceInstanceRangeLowLimitErr != nil { - return errors.Wrap(_deviceInstanceRangeLowLimitErr, "Error serializing 'deviceInstanceRangeLowLimit' field") - } + // Optional Field (deviceInstanceRangeLowLimit) (Can be skipped, if the value is null) + var deviceInstanceRangeLowLimit BACnetContextTagUnsignedInteger = nil + if m.GetDeviceInstanceRangeLowLimit() != nil { + if pushErr := writeBuffer.PushContext("deviceInstanceRangeLowLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for deviceInstanceRangeLowLimit") } + deviceInstanceRangeLowLimit = m.GetDeviceInstanceRangeLowLimit() + _deviceInstanceRangeLowLimitErr := writeBuffer.WriteSerializable(ctx, deviceInstanceRangeLowLimit) + if popErr := writeBuffer.PopContext("deviceInstanceRangeLowLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for deviceInstanceRangeLowLimit") + } + if _deviceInstanceRangeLowLimitErr != nil { + return errors.Wrap(_deviceInstanceRangeLowLimitErr, "Error serializing 'deviceInstanceRangeLowLimit' field") + } + } - // Optional Field (deviceInstanceRangeHighLimit) (Can be skipped, if the value is null) - var deviceInstanceRangeHighLimit BACnetContextTagUnsignedInteger = nil - if m.GetDeviceInstanceRangeHighLimit() != nil { - if pushErr := writeBuffer.PushContext("deviceInstanceRangeHighLimit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for deviceInstanceRangeHighLimit") - } - deviceInstanceRangeHighLimit = m.GetDeviceInstanceRangeHighLimit() - _deviceInstanceRangeHighLimitErr := writeBuffer.WriteSerializable(ctx, deviceInstanceRangeHighLimit) - if popErr := writeBuffer.PopContext("deviceInstanceRangeHighLimit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for deviceInstanceRangeHighLimit") - } - if _deviceInstanceRangeHighLimitErr != nil { - return errors.Wrap(_deviceInstanceRangeHighLimitErr, "Error serializing 'deviceInstanceRangeHighLimit' field") - } + // Optional Field (deviceInstanceRangeHighLimit) (Can be skipped, if the value is null) + var deviceInstanceRangeHighLimit BACnetContextTagUnsignedInteger = nil + if m.GetDeviceInstanceRangeHighLimit() != nil { + if pushErr := writeBuffer.PushContext("deviceInstanceRangeHighLimit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for deviceInstanceRangeHighLimit") } + deviceInstanceRangeHighLimit = m.GetDeviceInstanceRangeHighLimit() + _deviceInstanceRangeHighLimitErr := writeBuffer.WriteSerializable(ctx, deviceInstanceRangeHighLimit) + if popErr := writeBuffer.PopContext("deviceInstanceRangeHighLimit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for deviceInstanceRangeHighLimit") + } + if _deviceInstanceRangeHighLimitErr != nil { + return errors.Wrap(_deviceInstanceRangeHighLimitErr, "Error serializing 'deviceInstanceRangeHighLimit' field") + } + } if popErr := writeBuffer.PopContext("BACnetUnconfirmedServiceRequestWhoIs"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetUnconfirmedServiceRequestWhoIs") @@ -267,6 +270,7 @@ func (m *_BACnetUnconfirmedServiceRequestWhoIs) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetUnconfirmedServiceRequestWhoIs) isBACnetUnconfirmedServiceRequestWhoIs() bool { return true } @@ -281,3 +285,6 @@ func (m *_BACnetUnconfirmedServiceRequestWhoIs) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestWriteGroup.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestWriteGroup.go index f78d0249095..1cffde019a2 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestWriteGroup.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetUnconfirmedServiceRequestWriteGroup.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetUnconfirmedServiceRequestWriteGroup is the corresponding interface of BACnetUnconfirmedServiceRequestWriteGroup type BACnetUnconfirmedServiceRequestWriteGroup interface { @@ -53,33 +55,32 @@ type BACnetUnconfirmedServiceRequestWriteGroupExactly interface { // _BACnetUnconfirmedServiceRequestWriteGroup is the data-structure of this message type _BACnetUnconfirmedServiceRequestWriteGroup struct { *_BACnetUnconfirmedServiceRequest - GroupNumber BACnetContextTagUnsignedInteger - WritePriority BACnetContextTagUnsignedInteger - ChangeList BACnetGroupChannelValueList - InhibitDelay BACnetContextTagUnsignedInteger + GroupNumber BACnetContextTagUnsignedInteger + WritePriority BACnetContextTagUnsignedInteger + ChangeList BACnetGroupChannelValueList + InhibitDelay BACnetContextTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BACnetUnconfirmedServiceRequestWriteGroup) GetServiceChoice() BACnetUnconfirmedServiceChoice { - return BACnetUnconfirmedServiceChoice_WRITE_GROUP -} +func (m *_BACnetUnconfirmedServiceRequestWriteGroup) GetServiceChoice() BACnetUnconfirmedServiceChoice { +return BACnetUnconfirmedServiceChoice_WRITE_GROUP} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetUnconfirmedServiceRequestWriteGroup) InitializeParent(parent BACnetUnconfirmedServiceRequest) { -} +func (m *_BACnetUnconfirmedServiceRequestWriteGroup) InitializeParent(parent BACnetUnconfirmedServiceRequest ) {} -func (m *_BACnetUnconfirmedServiceRequestWriteGroup) GetParent() BACnetUnconfirmedServiceRequest { +func (m *_BACnetUnconfirmedServiceRequestWriteGroup) GetParent() BACnetUnconfirmedServiceRequest { return m._BACnetUnconfirmedServiceRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -106,14 +107,15 @@ func (m *_BACnetUnconfirmedServiceRequestWriteGroup) GetInhibitDelay() BACnetCon /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetUnconfirmedServiceRequestWriteGroup factory function for _BACnetUnconfirmedServiceRequestWriteGroup -func NewBACnetUnconfirmedServiceRequestWriteGroup(groupNumber BACnetContextTagUnsignedInteger, writePriority BACnetContextTagUnsignedInteger, changeList BACnetGroupChannelValueList, inhibitDelay BACnetContextTagUnsignedInteger, serviceRequestLength uint16) *_BACnetUnconfirmedServiceRequestWriteGroup { +func NewBACnetUnconfirmedServiceRequestWriteGroup( groupNumber BACnetContextTagUnsignedInteger , writePriority BACnetContextTagUnsignedInteger , changeList BACnetGroupChannelValueList , inhibitDelay BACnetContextTagUnsignedInteger , serviceRequestLength uint16 ) *_BACnetUnconfirmedServiceRequestWriteGroup { _result := &_BACnetUnconfirmedServiceRequestWriteGroup{ - GroupNumber: groupNumber, - WritePriority: writePriority, - ChangeList: changeList, - InhibitDelay: inhibitDelay, - _BACnetUnconfirmedServiceRequest: NewBACnetUnconfirmedServiceRequest(serviceRequestLength), + GroupNumber: groupNumber, + WritePriority: writePriority, + ChangeList: changeList, + InhibitDelay: inhibitDelay, + _BACnetUnconfirmedServiceRequest: NewBACnetUnconfirmedServiceRequest(serviceRequestLength), } _result._BACnetUnconfirmedServiceRequest._BACnetUnconfirmedServiceRequestChildRequirements = _result return _result @@ -121,7 +123,7 @@ func NewBACnetUnconfirmedServiceRequestWriteGroup(groupNumber BACnetContextTagUn // Deprecated: use the interface for direct cast func CastBACnetUnconfirmedServiceRequestWriteGroup(structType interface{}) BACnetUnconfirmedServiceRequestWriteGroup { - if casted, ok := structType.(BACnetUnconfirmedServiceRequestWriteGroup); ok { + if casted, ok := structType.(BACnetUnconfirmedServiceRequestWriteGroup); ok { return casted } if casted, ok := structType.(*BACnetUnconfirmedServiceRequestWriteGroup); ok { @@ -154,6 +156,7 @@ func (m *_BACnetUnconfirmedServiceRequestWriteGroup) GetLengthInBits(ctx context return lengthInBits } + func (m *_BACnetUnconfirmedServiceRequestWriteGroup) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -175,7 +178,7 @@ func BACnetUnconfirmedServiceRequestWriteGroupParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("groupNumber"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for groupNumber") } - _groupNumber, _groupNumberErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_groupNumber, _groupNumberErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _groupNumberErr != nil { return nil, errors.Wrap(_groupNumberErr, "Error parsing 'groupNumber' field of BACnetUnconfirmedServiceRequestWriteGroup") } @@ -188,7 +191,7 @@ func BACnetUnconfirmedServiceRequestWriteGroupParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("writePriority"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for writePriority") } - _writePriority, _writePriorityErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_writePriority, _writePriorityErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _writePriorityErr != nil { return nil, errors.Wrap(_writePriorityErr, "Error parsing 'writePriority' field of BACnetUnconfirmedServiceRequestWriteGroup") } @@ -201,7 +204,7 @@ func BACnetUnconfirmedServiceRequestWriteGroupParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("changeList"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for changeList") } - _changeList, _changeListErr := BACnetGroupChannelValueListParseWithBuffer(ctx, readBuffer, uint8(uint8(2))) +_changeList, _changeListErr := BACnetGroupChannelValueListParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) ) if _changeListErr != nil { return nil, errors.Wrap(_changeListErr, "Error parsing 'changeList' field of BACnetUnconfirmedServiceRequestWriteGroup") } @@ -212,12 +215,12 @@ func BACnetUnconfirmedServiceRequestWriteGroupParseWithBuffer(ctx context.Contex // Optional Field (inhibitDelay) (Can be skipped, if a given expression evaluates to false) var inhibitDelay BACnetContextTagUnsignedInteger = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("inhibitDelay"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for inhibitDelay") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(3), BACnetDataType_UNSIGNED_INTEGER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(3) , BACnetDataType_UNSIGNED_INTEGER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -241,10 +244,10 @@ func BACnetUnconfirmedServiceRequestWriteGroupParseWithBuffer(ctx context.Contex _BACnetUnconfirmedServiceRequest: &_BACnetUnconfirmedServiceRequest{ ServiceRequestLength: serviceRequestLength, }, - GroupNumber: groupNumber, + GroupNumber: groupNumber, WritePriority: writePriority, - ChangeList: changeList, - InhibitDelay: inhibitDelay, + ChangeList: changeList, + InhibitDelay: inhibitDelay, } _child._BACnetUnconfirmedServiceRequest._BACnetUnconfirmedServiceRequestChildRequirements = _child return _child, nil @@ -266,57 +269,57 @@ func (m *_BACnetUnconfirmedServiceRequestWriteGroup) SerializeWithWriteBuffer(ct return errors.Wrap(pushErr, "Error pushing for BACnetUnconfirmedServiceRequestWriteGroup") } - // Simple Field (groupNumber) - if pushErr := writeBuffer.PushContext("groupNumber"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for groupNumber") - } - _groupNumberErr := writeBuffer.WriteSerializable(ctx, m.GetGroupNumber()) - if popErr := writeBuffer.PopContext("groupNumber"); popErr != nil { - return errors.Wrap(popErr, "Error popping for groupNumber") - } - if _groupNumberErr != nil { - return errors.Wrap(_groupNumberErr, "Error serializing 'groupNumber' field") - } + // Simple Field (groupNumber) + if pushErr := writeBuffer.PushContext("groupNumber"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for groupNumber") + } + _groupNumberErr := writeBuffer.WriteSerializable(ctx, m.GetGroupNumber()) + if popErr := writeBuffer.PopContext("groupNumber"); popErr != nil { + return errors.Wrap(popErr, "Error popping for groupNumber") + } + if _groupNumberErr != nil { + return errors.Wrap(_groupNumberErr, "Error serializing 'groupNumber' field") + } - // Simple Field (writePriority) - if pushErr := writeBuffer.PushContext("writePriority"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for writePriority") - } - _writePriorityErr := writeBuffer.WriteSerializable(ctx, m.GetWritePriority()) - if popErr := writeBuffer.PopContext("writePriority"); popErr != nil { - return errors.Wrap(popErr, "Error popping for writePriority") - } - if _writePriorityErr != nil { - return errors.Wrap(_writePriorityErr, "Error serializing 'writePriority' field") - } + // Simple Field (writePriority) + if pushErr := writeBuffer.PushContext("writePriority"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for writePriority") + } + _writePriorityErr := writeBuffer.WriteSerializable(ctx, m.GetWritePriority()) + if popErr := writeBuffer.PopContext("writePriority"); popErr != nil { + return errors.Wrap(popErr, "Error popping for writePriority") + } + if _writePriorityErr != nil { + return errors.Wrap(_writePriorityErr, "Error serializing 'writePriority' field") + } - // Simple Field (changeList) - if pushErr := writeBuffer.PushContext("changeList"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for changeList") - } - _changeListErr := writeBuffer.WriteSerializable(ctx, m.GetChangeList()) - if popErr := writeBuffer.PopContext("changeList"); popErr != nil { - return errors.Wrap(popErr, "Error popping for changeList") + // Simple Field (changeList) + if pushErr := writeBuffer.PushContext("changeList"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for changeList") + } + _changeListErr := writeBuffer.WriteSerializable(ctx, m.GetChangeList()) + if popErr := writeBuffer.PopContext("changeList"); popErr != nil { + return errors.Wrap(popErr, "Error popping for changeList") + } + if _changeListErr != nil { + return errors.Wrap(_changeListErr, "Error serializing 'changeList' field") + } + + // Optional Field (inhibitDelay) (Can be skipped, if the value is null) + var inhibitDelay BACnetContextTagUnsignedInteger = nil + if m.GetInhibitDelay() != nil { + if pushErr := writeBuffer.PushContext("inhibitDelay"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for inhibitDelay") } - if _changeListErr != nil { - return errors.Wrap(_changeListErr, "Error serializing 'changeList' field") + inhibitDelay = m.GetInhibitDelay() + _inhibitDelayErr := writeBuffer.WriteSerializable(ctx, inhibitDelay) + if popErr := writeBuffer.PopContext("inhibitDelay"); popErr != nil { + return errors.Wrap(popErr, "Error popping for inhibitDelay") } - - // Optional Field (inhibitDelay) (Can be skipped, if the value is null) - var inhibitDelay BACnetContextTagUnsignedInteger = nil - if m.GetInhibitDelay() != nil { - if pushErr := writeBuffer.PushContext("inhibitDelay"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for inhibitDelay") - } - inhibitDelay = m.GetInhibitDelay() - _inhibitDelayErr := writeBuffer.WriteSerializable(ctx, inhibitDelay) - if popErr := writeBuffer.PopContext("inhibitDelay"); popErr != nil { - return errors.Wrap(popErr, "Error popping for inhibitDelay") - } - if _inhibitDelayErr != nil { - return errors.Wrap(_inhibitDelayErr, "Error serializing 'inhibitDelay' field") - } + if _inhibitDelayErr != nil { + return errors.Wrap(_inhibitDelayErr, "Error serializing 'inhibitDelay' field") } + } if popErr := writeBuffer.PopContext("BACnetUnconfirmedServiceRequestWriteGroup"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetUnconfirmedServiceRequestWriteGroup") @@ -326,6 +329,7 @@ func (m *_BACnetUnconfirmedServiceRequestWriteGroup) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetUnconfirmedServiceRequestWriteGroup) isBACnetUnconfirmedServiceRequestWriteGroup() bool { return true } @@ -340,3 +344,6 @@ func (m *_BACnetUnconfirmedServiceRequestWriteGroup) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetVMACEntry.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetVMACEntry.go index f3615ed2b21..e39b4d4d5f0 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetVMACEntry.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetVMACEntry.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetVMACEntry is the corresponding interface of BACnetVMACEntry type BACnetVMACEntry interface { @@ -47,10 +49,11 @@ type BACnetVMACEntryExactly interface { // _BACnetVMACEntry is the data-structure of this message type _BACnetVMACEntry struct { - VirtualMacAddress BACnetContextTagOctetString - NativeMacAddress BACnetContextTagOctetString + VirtualMacAddress BACnetContextTagOctetString + NativeMacAddress BACnetContextTagOctetString } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -69,14 +72,15 @@ func (m *_BACnetVMACEntry) GetNativeMacAddress() BACnetContextTagOctetString { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetVMACEntry factory function for _BACnetVMACEntry -func NewBACnetVMACEntry(virtualMacAddress BACnetContextTagOctetString, nativeMacAddress BACnetContextTagOctetString) *_BACnetVMACEntry { - return &_BACnetVMACEntry{VirtualMacAddress: virtualMacAddress, NativeMacAddress: nativeMacAddress} +func NewBACnetVMACEntry( virtualMacAddress BACnetContextTagOctetString , nativeMacAddress BACnetContextTagOctetString ) *_BACnetVMACEntry { +return &_BACnetVMACEntry{ VirtualMacAddress: virtualMacAddress , NativeMacAddress: nativeMacAddress } } // Deprecated: use the interface for direct cast func CastBACnetVMACEntry(structType interface{}) BACnetVMACEntry { - if casted, ok := structType.(BACnetVMACEntry); ok { + if casted, ok := structType.(BACnetVMACEntry); ok { return casted } if casted, ok := structType.(*BACnetVMACEntry); ok { @@ -105,6 +109,7 @@ func (m *_BACnetVMACEntry) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetVMACEntry) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -124,12 +129,12 @@ func BACnetVMACEntryParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu // Optional Field (virtualMacAddress) (Can be skipped, if a given expression evaluates to false) var virtualMacAddress BACnetContextTagOctetString = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("virtualMacAddress"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for virtualMacAddress") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(0), BACnetDataType_OCTET_STRING) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(0) , BACnetDataType_OCTET_STRING ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -146,12 +151,12 @@ func BACnetVMACEntryParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu // Optional Field (nativeMacAddress) (Can be skipped, if a given expression evaluates to false) var nativeMacAddress BACnetContextTagOctetString = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("nativeMacAddress"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for nativeMacAddress") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(1), BACnetDataType_OCTET_STRING) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(1) , BACnetDataType_OCTET_STRING ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -172,9 +177,9 @@ func BACnetVMACEntryParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu // Create the instance return &_BACnetVMACEntry{ - VirtualMacAddress: virtualMacAddress, - NativeMacAddress: nativeMacAddress, - }, nil + VirtualMacAddress: virtualMacAddress, + NativeMacAddress: nativeMacAddress, + }, nil } func (m *_BACnetVMACEntry) Serialize() ([]byte, error) { @@ -188,7 +193,7 @@ func (m *_BACnetVMACEntry) Serialize() ([]byte, error) { func (m *_BACnetVMACEntry) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetVMACEntry"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetVMACEntry"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetVMACEntry") } @@ -230,6 +235,7 @@ func (m *_BACnetVMACEntry) SerializeWithWriteBuffer(ctx context.Context, writeBu return nil } + func (m *_BACnetVMACEntry) isBACnetVMACEntry() bool { return true } @@ -244,3 +250,6 @@ func (m *_BACnetVMACEntry) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetVTClass.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetVTClass.go index 5bca062bb88..c4e0e5e42b3 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetVTClass.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetVTClass.go @@ -34,22 +34,22 @@ type IBACnetVTClass interface { utils.Serializable } -const ( - BACnetVTClass_DEFAULT_TERMINAL BACnetVTClass = 0 - BACnetVTClass_ANSI_X3_64 BACnetVTClass = 1 - BACnetVTClass_DEC_VT52 BACnetVTClass = 2 - BACnetVTClass_DEC_VT100 BACnetVTClass = 3 - BACnetVTClass_DEC_VT220 BACnetVTClass = 4 - BACnetVTClass_HP_700_94 BACnetVTClass = 5 - BACnetVTClass_IBM_3130 BACnetVTClass = 6 - BACnetVTClass_VENDOR_PROPRIETARY_VALUE BACnetVTClass = 0xFFFF +const( + BACnetVTClass_DEFAULT_TERMINAL BACnetVTClass = 0 + BACnetVTClass_ANSI_X3_64 BACnetVTClass = 1 + BACnetVTClass_DEC_VT52 BACnetVTClass = 2 + BACnetVTClass_DEC_VT100 BACnetVTClass = 3 + BACnetVTClass_DEC_VT220 BACnetVTClass = 4 + BACnetVTClass_HP_700_94 BACnetVTClass = 5 + BACnetVTClass_IBM_3130 BACnetVTClass = 6 + BACnetVTClass_VENDOR_PROPRIETARY_VALUE BACnetVTClass = 0XFFFF ) var BACnetVTClassValues []BACnetVTClass func init() { _ = errors.New - BACnetVTClassValues = []BACnetVTClass{ + BACnetVTClassValues = []BACnetVTClass { BACnetVTClass_DEFAULT_TERMINAL, BACnetVTClass_ANSI_X3_64, BACnetVTClass_DEC_VT52, @@ -63,22 +63,22 @@ func init() { func BACnetVTClassByValue(value uint16) (enum BACnetVTClass, ok bool) { switch value { - case 0: - return BACnetVTClass_DEFAULT_TERMINAL, true - case 0xFFFF: - return BACnetVTClass_VENDOR_PROPRIETARY_VALUE, true - case 1: - return BACnetVTClass_ANSI_X3_64, true - case 2: - return BACnetVTClass_DEC_VT52, true - case 3: - return BACnetVTClass_DEC_VT100, true - case 4: - return BACnetVTClass_DEC_VT220, true - case 5: - return BACnetVTClass_HP_700_94, true - case 6: - return BACnetVTClass_IBM_3130, true + case 0: + return BACnetVTClass_DEFAULT_TERMINAL, true + case 0XFFFF: + return BACnetVTClass_VENDOR_PROPRIETARY_VALUE, true + case 1: + return BACnetVTClass_ANSI_X3_64, true + case 2: + return BACnetVTClass_DEC_VT52, true + case 3: + return BACnetVTClass_DEC_VT100, true + case 4: + return BACnetVTClass_DEC_VT220, true + case 5: + return BACnetVTClass_HP_700_94, true + case 6: + return BACnetVTClass_IBM_3130, true } return 0, false } @@ -105,13 +105,13 @@ func BACnetVTClassByName(value string) (enum BACnetVTClass, ok bool) { return 0, false } -func BACnetVTClassKnows(value uint16) bool { +func BACnetVTClassKnows(value uint16) bool { for _, typeValue := range BACnetVTClassValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastBACnetVTClass(structType interface{}) BACnetVTClass { @@ -187,3 +187,4 @@ func (e BACnetVTClass) PLC4XEnumName() string { func (e BACnetVTClass) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetVTClassTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetVTClassTagged.go index 42d7efff6a7..95faba8d1de 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetVTClassTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetVTClassTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetVTClassTagged is the corresponding interface of BACnetVTClassTagged type BACnetVTClassTagged interface { @@ -50,15 +52,16 @@ type BACnetVTClassTaggedExactly interface { // _BACnetVTClassTagged is the data-structure of this message type _BACnetVTClassTagged struct { - Header BACnetTagHeader - Value BACnetVTClass - ProprietaryValue uint32 + Header BACnetTagHeader + Value BACnetVTClass + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_BACnetVTClassTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetVTClassTagged factory function for _BACnetVTClassTagged -func NewBACnetVTClassTagged(header BACnetTagHeader, value BACnetVTClass, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_BACnetVTClassTagged { - return &_BACnetVTClassTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetVTClassTagged( header BACnetTagHeader , value BACnetVTClass , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_BACnetVTClassTagged { +return &_BACnetVTClassTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetVTClassTagged(structType interface{}) BACnetVTClassTagged { - if casted, ok := structType.(BACnetVTClassTagged); ok { + if casted, ok := structType.(BACnetVTClassTagged); ok { return casted } if casted, ok := structType.(*BACnetVTClassTagged); ok { @@ -123,16 +127,17 @@ func (m *_BACnetVTClassTagged) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetVTClassTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetVTClassTaggedParseWithBuffer(ctx context.Context, readBuffer utils.Re if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetVTClassTagged") } @@ -164,12 +169,12 @@ func BACnetVTClassTaggedParseWithBuffer(ctx context.Context, readBuffer utils.Re } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func BACnetVTClassTaggedParseWithBuffer(ctx context.Context, readBuffer utils.Re } var value BACnetVTClass if _value != nil { - value = _value.(BACnetVTClass) + value = _value.(BACnetVTClass) } // Virtual field @@ -195,7 +200,7 @@ func BACnetVTClassTaggedParseWithBuffer(ctx context.Context, readBuffer utils.Re } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("BACnetVTClassTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func BACnetVTClassTaggedParseWithBuffer(ctx context.Context, readBuffer utils.Re // Create the instance return &_BACnetVTClassTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_BACnetVTClassTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_BACnetVTClassTagged) Serialize() ([]byte, error) { func (m *_BACnetVTClassTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetVTClassTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetVTClassTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetVTClassTagged") } @@ -261,6 +266,7 @@ func (m *_BACnetVTClassTagged) SerializeWithWriteBuffer(ctx context.Context, wri return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_BACnetVTClassTagged) GetTagNumber() uint8 { func (m *_BACnetVTClassTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_BACnetVTClassTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetVTSession.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetVTSession.go index 93b972d26a4..9e48880d77d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetVTSession.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetVTSession.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetVTSession is the corresponding interface of BACnetVTSession type BACnetVTSession interface { @@ -48,11 +50,12 @@ type BACnetVTSessionExactly interface { // _BACnetVTSession is the data-structure of this message type _BACnetVTSession struct { - LocalVtSessionId BACnetApplicationTagUnsignedInteger - RemoveVtSessionId BACnetApplicationTagUnsignedInteger - RemoteVtAddress BACnetAddress + LocalVtSessionId BACnetApplicationTagUnsignedInteger + RemoveVtSessionId BACnetApplicationTagUnsignedInteger + RemoteVtAddress BACnetAddress } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -75,14 +78,15 @@ func (m *_BACnetVTSession) GetRemoteVtAddress() BACnetAddress { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetVTSession factory function for _BACnetVTSession -func NewBACnetVTSession(localVtSessionId BACnetApplicationTagUnsignedInteger, removeVtSessionId BACnetApplicationTagUnsignedInteger, remoteVtAddress BACnetAddress) *_BACnetVTSession { - return &_BACnetVTSession{LocalVtSessionId: localVtSessionId, RemoveVtSessionId: removeVtSessionId, RemoteVtAddress: remoteVtAddress} +func NewBACnetVTSession( localVtSessionId BACnetApplicationTagUnsignedInteger , removeVtSessionId BACnetApplicationTagUnsignedInteger , remoteVtAddress BACnetAddress ) *_BACnetVTSession { +return &_BACnetVTSession{ LocalVtSessionId: localVtSessionId , RemoveVtSessionId: removeVtSessionId , RemoteVtAddress: remoteVtAddress } } // Deprecated: use the interface for direct cast func CastBACnetVTSession(structType interface{}) BACnetVTSession { - if casted, ok := structType.(BACnetVTSession); ok { + if casted, ok := structType.(BACnetVTSession); ok { return casted } if casted, ok := structType.(*BACnetVTSession); ok { @@ -110,6 +114,7 @@ func (m *_BACnetVTSession) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetVTSession) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -131,7 +136,7 @@ func BACnetVTSessionParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu if pullErr := readBuffer.PullContext("localVtSessionId"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for localVtSessionId") } - _localVtSessionId, _localVtSessionIdErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_localVtSessionId, _localVtSessionIdErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _localVtSessionIdErr != nil { return nil, errors.Wrap(_localVtSessionIdErr, "Error parsing 'localVtSessionId' field of BACnetVTSession") } @@ -144,7 +149,7 @@ func BACnetVTSessionParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu if pullErr := readBuffer.PullContext("removeVtSessionId"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for removeVtSessionId") } - _removeVtSessionId, _removeVtSessionIdErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) +_removeVtSessionId, _removeVtSessionIdErr := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _removeVtSessionIdErr != nil { return nil, errors.Wrap(_removeVtSessionIdErr, "Error parsing 'removeVtSessionId' field of BACnetVTSession") } @@ -157,7 +162,7 @@ func BACnetVTSessionParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu if pullErr := readBuffer.PullContext("remoteVtAddress"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for remoteVtAddress") } - _remoteVtAddress, _remoteVtAddressErr := BACnetAddressParseWithBuffer(ctx, readBuffer) +_remoteVtAddress, _remoteVtAddressErr := BACnetAddressParseWithBuffer(ctx, readBuffer) if _remoteVtAddressErr != nil { return nil, errors.Wrap(_remoteVtAddressErr, "Error parsing 'remoteVtAddress' field of BACnetVTSession") } @@ -172,10 +177,10 @@ func BACnetVTSessionParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu // Create the instance return &_BACnetVTSession{ - LocalVtSessionId: localVtSessionId, - RemoveVtSessionId: removeVtSessionId, - RemoteVtAddress: remoteVtAddress, - }, nil + LocalVtSessionId: localVtSessionId, + RemoveVtSessionId: removeVtSessionId, + RemoteVtAddress: remoteVtAddress, + }, nil } func (m *_BACnetVTSession) Serialize() ([]byte, error) { @@ -189,7 +194,7 @@ func (m *_BACnetVTSession) Serialize() ([]byte, error) { func (m *_BACnetVTSession) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetVTSession"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetVTSession"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetVTSession") } @@ -235,6 +240,7 @@ func (m *_BACnetVTSession) SerializeWithWriteBuffer(ctx context.Context, writeBu return nil } + func (m *_BACnetVTSession) isBACnetVTSession() bool { return true } @@ -249,3 +255,6 @@ func (m *_BACnetVTSession) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetValueSource.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetValueSource.go index 9dd53e66870..fbabbeafe3e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetValueSource.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetValueSource.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetValueSource is the corresponding interface of BACnetValueSource type BACnetValueSource interface { @@ -47,7 +49,7 @@ type BACnetValueSourceExactly interface { // _BACnetValueSource is the data-structure of this message type _BACnetValueSource struct { _BACnetValueSourceChildRequirements - PeekedTagHeader BACnetTagHeader + PeekedTagHeader BACnetTagHeader } type _BACnetValueSourceChildRequirements interface { @@ -55,6 +57,7 @@ type _BACnetValueSourceChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type BACnetValueSourceParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BACnetValueSource, serializeChildFunction func() error) error GetTypeName() string @@ -62,13 +65,12 @@ type BACnetValueSourceParent interface { type BACnetValueSourceChild interface { utils.Serializable - InitializeParent(parent BACnetValueSource, peekedTagHeader BACnetTagHeader) +InitializeParent(parent BACnetValueSource , peekedTagHeader BACnetTagHeader ) GetParent() *BACnetValueSource GetTypeName() string BACnetValueSource } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,14 +100,15 @@ func (m *_BACnetValueSource) GetPeekedTagNumber() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetValueSource factory function for _BACnetValueSource -func NewBACnetValueSource(peekedTagHeader BACnetTagHeader) *_BACnetValueSource { - return &_BACnetValueSource{PeekedTagHeader: peekedTagHeader} +func NewBACnetValueSource( peekedTagHeader BACnetTagHeader ) *_BACnetValueSource { +return &_BACnetValueSource{ PeekedTagHeader: peekedTagHeader } } // Deprecated: use the interface for direct cast func CastBACnetValueSource(structType interface{}) BACnetValueSource { - if casted, ok := structType.(BACnetValueSource); ok { + if casted, ok := structType.(BACnetValueSource); ok { return casted } if casted, ok := structType.(*BACnetValueSource); ok { @@ -118,6 +121,7 @@ func (m *_BACnetValueSource) GetTypeName() string { return "BACnetValueSource" } + func (m *_BACnetValueSource) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -143,13 +147,13 @@ func BACnetValueSourceParseWithBuffer(ctx context.Context, readBuffer utils.Read currentPos := positionAware.GetPos() _ = currentPos - // Peek Field (peekedTagHeader) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") - } - peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) - readBuffer.Reset(currentPos) + // Peek Field (peekedTagHeader) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedTagHeader") + } +peekedTagHeader, _ := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) + readBuffer.Reset(currentPos) // Virtual field _peekedTagNumber := peekedTagHeader.GetActualTagNumber() @@ -159,19 +163,19 @@ func BACnetValueSourceParseWithBuffer(ctx context.Context, readBuffer utils.Read // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BACnetValueSourceChildSerializeRequirement interface { BACnetValueSource - InitializeParent(BACnetValueSource, BACnetTagHeader) + InitializeParent(BACnetValueSource, BACnetTagHeader) GetParent() BACnetValueSource } var _childTemp interface{} var _child BACnetValueSourceChildSerializeRequirement var typeSwitchError error switch { - case peekedTagNumber == uint8(0): // BACnetValueSourceNone - _childTemp, typeSwitchError = BACnetValueSourceNoneParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(1): // BACnetValueSourceObject - _childTemp, typeSwitchError = BACnetValueSourceObjectParseWithBuffer(ctx, readBuffer) - case peekedTagNumber == uint8(2): // BACnetValueSourceAddress - _childTemp, typeSwitchError = BACnetValueSourceAddressParseWithBuffer(ctx, readBuffer) +case peekedTagNumber == uint8(0) : // BACnetValueSourceNone + _childTemp, typeSwitchError = BACnetValueSourceNoneParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(1) : // BACnetValueSourceObject + _childTemp, typeSwitchError = BACnetValueSourceObjectParseWithBuffer(ctx, readBuffer, ) +case peekedTagNumber == uint8(2) : // BACnetValueSourceAddress + _childTemp, typeSwitchError = BACnetValueSourceAddressParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedTagNumber=%v]", peekedTagNumber) } @@ -185,7 +189,7 @@ func BACnetValueSourceParseWithBuffer(ctx context.Context, readBuffer utils.Read } // Finish initializing - _child.InitializeParent(_child, peekedTagHeader) +_child.InitializeParent(_child , peekedTagHeader ) return _child, nil } @@ -195,7 +199,7 @@ func (pm *_BACnetValueSource) SerializeParent(ctx context.Context, writeBuffer u _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetValueSource"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetValueSource"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetValueSource") } // Virtual field @@ -214,6 +218,7 @@ func (pm *_BACnetValueSource) SerializeParent(ctx context.Context, writeBuffer u return nil } + func (m *_BACnetValueSource) isBACnetValueSource() bool { return true } @@ -228,3 +233,6 @@ func (m *_BACnetValueSource) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetValueSourceAddress.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetValueSourceAddress.go index eb6d58e384a..c3dc8cb3205 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetValueSourceAddress.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetValueSourceAddress.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetValueSourceAddress is the corresponding interface of BACnetValueSourceAddress type BACnetValueSourceAddress interface { @@ -46,9 +48,11 @@ type BACnetValueSourceAddressExactly interface { // _BACnetValueSourceAddress is the data-structure of this message type _BACnetValueSourceAddress struct { *_BACnetValueSource - Address BACnetAddressEnclosed + Address BACnetAddressEnclosed } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetValueSourceAddress struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetValueSourceAddress) InitializeParent(parent BACnetValueSource, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetValueSourceAddress) InitializeParent(parent BACnetValueSource , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetValueSourceAddress) GetParent() BACnetValueSource { +func (m *_BACnetValueSourceAddress) GetParent() BACnetValueSource { return m._BACnetValueSource } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetValueSourceAddress) GetAddress() BACnetAddressEnclosed { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetValueSourceAddress factory function for _BACnetValueSourceAddress -func NewBACnetValueSourceAddress(address BACnetAddressEnclosed, peekedTagHeader BACnetTagHeader) *_BACnetValueSourceAddress { +func NewBACnetValueSourceAddress( address BACnetAddressEnclosed , peekedTagHeader BACnetTagHeader ) *_BACnetValueSourceAddress { _result := &_BACnetValueSourceAddress{ - Address: address, - _BACnetValueSource: NewBACnetValueSource(peekedTagHeader), + Address: address, + _BACnetValueSource: NewBACnetValueSource(peekedTagHeader), } _result._BACnetValueSource._BACnetValueSourceChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetValueSourceAddress(address BACnetAddressEnclosed, peekedTagHeader // Deprecated: use the interface for direct cast func CastBACnetValueSourceAddress(structType interface{}) BACnetValueSourceAddress { - if casted, ok := structType.(BACnetValueSourceAddress); ok { + if casted, ok := structType.(BACnetValueSourceAddress); ok { return casted } if casted, ok := structType.(*BACnetValueSourceAddress); ok { @@ -115,6 +118,7 @@ func (m *_BACnetValueSourceAddress) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_BACnetValueSourceAddress) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetValueSourceAddressParseWithBuffer(ctx context.Context, readBuffer uti if pullErr := readBuffer.PullContext("address"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for address") } - _address, _addressErr := BACnetAddressEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(2))) +_address, _addressErr := BACnetAddressEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) ) if _addressErr != nil { return nil, errors.Wrap(_addressErr, "Error parsing 'address' field of BACnetValueSourceAddress") } @@ -151,8 +155,9 @@ func BACnetValueSourceAddressParseWithBuffer(ctx context.Context, readBuffer uti // Create a partially initialized instance _child := &_BACnetValueSourceAddress{ - _BACnetValueSource: &_BACnetValueSource{}, - Address: address, + _BACnetValueSource: &_BACnetValueSource{ + }, + Address: address, } _child._BACnetValueSource._BACnetValueSourceChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetValueSourceAddress) SerializeWithWriteBuffer(ctx context.Context return errors.Wrap(pushErr, "Error pushing for BACnetValueSourceAddress") } - // Simple Field (address) - if pushErr := writeBuffer.PushContext("address"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for address") - } - _addressErr := writeBuffer.WriteSerializable(ctx, m.GetAddress()) - if popErr := writeBuffer.PopContext("address"); popErr != nil { - return errors.Wrap(popErr, "Error popping for address") - } - if _addressErr != nil { - return errors.Wrap(_addressErr, "Error serializing 'address' field") - } + // Simple Field (address) + if pushErr := writeBuffer.PushContext("address"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for address") + } + _addressErr := writeBuffer.WriteSerializable(ctx, m.GetAddress()) + if popErr := writeBuffer.PopContext("address"); popErr != nil { + return errors.Wrap(popErr, "Error popping for address") + } + if _addressErr != nil { + return errors.Wrap(_addressErr, "Error serializing 'address' field") + } if popErr := writeBuffer.PopContext("BACnetValueSourceAddress"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetValueSourceAddress") @@ -194,6 +199,7 @@ func (m *_BACnetValueSourceAddress) SerializeWithWriteBuffer(ctx context.Context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetValueSourceAddress) isBACnetValueSourceAddress() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetValueSourceAddress) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetValueSourceNone.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetValueSourceNone.go index 80e47df1d14..edacade86fe 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetValueSourceNone.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetValueSourceNone.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetValueSourceNone is the corresponding interface of BACnetValueSourceNone type BACnetValueSourceNone interface { @@ -46,9 +48,11 @@ type BACnetValueSourceNoneExactly interface { // _BACnetValueSourceNone is the data-structure of this message type _BACnetValueSourceNone struct { *_BACnetValueSource - None BACnetContextTagNull + None BACnetContextTagNull } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetValueSourceNone struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetValueSourceNone) InitializeParent(parent BACnetValueSource, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetValueSourceNone) InitializeParent(parent BACnetValueSource , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetValueSourceNone) GetParent() BACnetValueSource { +func (m *_BACnetValueSourceNone) GetParent() BACnetValueSource { return m._BACnetValueSource } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetValueSourceNone) GetNone() BACnetContextTagNull { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetValueSourceNone factory function for _BACnetValueSourceNone -func NewBACnetValueSourceNone(none BACnetContextTagNull, peekedTagHeader BACnetTagHeader) *_BACnetValueSourceNone { +func NewBACnetValueSourceNone( none BACnetContextTagNull , peekedTagHeader BACnetTagHeader ) *_BACnetValueSourceNone { _result := &_BACnetValueSourceNone{ - None: none, - _BACnetValueSource: NewBACnetValueSource(peekedTagHeader), + None: none, + _BACnetValueSource: NewBACnetValueSource(peekedTagHeader), } _result._BACnetValueSource._BACnetValueSourceChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetValueSourceNone(none BACnetContextTagNull, peekedTagHeader BACnetT // Deprecated: use the interface for direct cast func CastBACnetValueSourceNone(structType interface{}) BACnetValueSourceNone { - if casted, ok := structType.(BACnetValueSourceNone); ok { + if casted, ok := structType.(BACnetValueSourceNone); ok { return casted } if casted, ok := structType.(*BACnetValueSourceNone); ok { @@ -115,6 +118,7 @@ func (m *_BACnetValueSourceNone) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetValueSourceNone) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetValueSourceNoneParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("none"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for none") } - _none, _noneErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_NULL)) +_none, _noneErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_NULL ) ) if _noneErr != nil { return nil, errors.Wrap(_noneErr, "Error parsing 'none' field of BACnetValueSourceNone") } @@ -151,8 +155,9 @@ func BACnetValueSourceNoneParseWithBuffer(ctx context.Context, readBuffer utils. // Create a partially initialized instance _child := &_BACnetValueSourceNone{ - _BACnetValueSource: &_BACnetValueSource{}, - None: none, + _BACnetValueSource: &_BACnetValueSource{ + }, + None: none, } _child._BACnetValueSource._BACnetValueSourceChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetValueSourceNone) SerializeWithWriteBuffer(ctx context.Context, w return errors.Wrap(pushErr, "Error pushing for BACnetValueSourceNone") } - // Simple Field (none) - if pushErr := writeBuffer.PushContext("none"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for none") - } - _noneErr := writeBuffer.WriteSerializable(ctx, m.GetNone()) - if popErr := writeBuffer.PopContext("none"); popErr != nil { - return errors.Wrap(popErr, "Error popping for none") - } - if _noneErr != nil { - return errors.Wrap(_noneErr, "Error serializing 'none' field") - } + // Simple Field (none) + if pushErr := writeBuffer.PushContext("none"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for none") + } + _noneErr := writeBuffer.WriteSerializable(ctx, m.GetNone()) + if popErr := writeBuffer.PopContext("none"); popErr != nil { + return errors.Wrap(popErr, "Error popping for none") + } + if _noneErr != nil { + return errors.Wrap(_noneErr, "Error serializing 'none' field") + } if popErr := writeBuffer.PopContext("BACnetValueSourceNone"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetValueSourceNone") @@ -194,6 +199,7 @@ func (m *_BACnetValueSourceNone) SerializeWithWriteBuffer(ctx context.Context, w return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetValueSourceNone) isBACnetValueSourceNone() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetValueSourceNone) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetValueSourceObject.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetValueSourceObject.go index 4218500f072..d36f49e1cca 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetValueSourceObject.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetValueSourceObject.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetValueSourceObject is the corresponding interface of BACnetValueSourceObject type BACnetValueSourceObject interface { @@ -46,9 +48,11 @@ type BACnetValueSourceObjectExactly interface { // _BACnetValueSourceObject is the data-structure of this message type _BACnetValueSourceObject struct { *_BACnetValueSource - Object BACnetDeviceObjectReferenceEnclosed + Object BACnetDeviceObjectReferenceEnclosed } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _BACnetValueSourceObject struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BACnetValueSourceObject) InitializeParent(parent BACnetValueSource, peekedTagHeader BACnetTagHeader) { - m.PeekedTagHeader = peekedTagHeader +func (m *_BACnetValueSourceObject) InitializeParent(parent BACnetValueSource , peekedTagHeader BACnetTagHeader ) { m.PeekedTagHeader = peekedTagHeader } -func (m *_BACnetValueSourceObject) GetParent() BACnetValueSource { +func (m *_BACnetValueSourceObject) GetParent() BACnetValueSource { return m._BACnetValueSource } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_BACnetValueSourceObject) GetObject() BACnetDeviceObjectReferenceEnclos /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetValueSourceObject factory function for _BACnetValueSourceObject -func NewBACnetValueSourceObject(object BACnetDeviceObjectReferenceEnclosed, peekedTagHeader BACnetTagHeader) *_BACnetValueSourceObject { +func NewBACnetValueSourceObject( object BACnetDeviceObjectReferenceEnclosed , peekedTagHeader BACnetTagHeader ) *_BACnetValueSourceObject { _result := &_BACnetValueSourceObject{ - Object: object, - _BACnetValueSource: NewBACnetValueSource(peekedTagHeader), + Object: object, + _BACnetValueSource: NewBACnetValueSource(peekedTagHeader), } _result._BACnetValueSource._BACnetValueSourceChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewBACnetValueSourceObject(object BACnetDeviceObjectReferenceEnclosed, peek // Deprecated: use the interface for direct cast func CastBACnetValueSourceObject(structType interface{}) BACnetValueSourceObject { - if casted, ok := structType.(BACnetValueSourceObject); ok { + if casted, ok := structType.(BACnetValueSourceObject); ok { return casted } if casted, ok := structType.(*BACnetValueSourceObject); ok { @@ -115,6 +118,7 @@ func (m *_BACnetValueSourceObject) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetValueSourceObject) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BACnetValueSourceObjectParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("object"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for object") } - _object, _objectErr := BACnetDeviceObjectReferenceEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(1))) +_object, _objectErr := BACnetDeviceObjectReferenceEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) ) if _objectErr != nil { return nil, errors.Wrap(_objectErr, "Error parsing 'object' field of BACnetValueSourceObject") } @@ -151,8 +155,9 @@ func BACnetValueSourceObjectParseWithBuffer(ctx context.Context, readBuffer util // Create a partially initialized instance _child := &_BACnetValueSourceObject{ - _BACnetValueSource: &_BACnetValueSource{}, - Object: object, + _BACnetValueSource: &_BACnetValueSource{ + }, + Object: object, } _child._BACnetValueSource._BACnetValueSourceChildRequirements = _child return _child, nil @@ -174,17 +179,17 @@ func (m *_BACnetValueSourceObject) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for BACnetValueSourceObject") } - // Simple Field (object) - if pushErr := writeBuffer.PushContext("object"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for object") - } - _objectErr := writeBuffer.WriteSerializable(ctx, m.GetObject()) - if popErr := writeBuffer.PopContext("object"); popErr != nil { - return errors.Wrap(popErr, "Error popping for object") - } - if _objectErr != nil { - return errors.Wrap(_objectErr, "Error serializing 'object' field") - } + // Simple Field (object) + if pushErr := writeBuffer.PushContext("object"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for object") + } + _objectErr := writeBuffer.WriteSerializable(ctx, m.GetObject()) + if popErr := writeBuffer.PopContext("object"); popErr != nil { + return errors.Wrap(popErr, "Error popping for object") + } + if _objectErr != nil { + return errors.Wrap(_objectErr, "Error serializing 'object' field") + } if popErr := writeBuffer.PopContext("BACnetValueSourceObject"); popErr != nil { return errors.Wrap(popErr, "Error popping for BACnetValueSourceObject") @@ -194,6 +199,7 @@ func (m *_BACnetValueSourceObject) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BACnetValueSourceObject) isBACnetValueSourceObject() bool { return true } @@ -208,3 +214,6 @@ func (m *_BACnetValueSourceObject) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetVendorId.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetVendorId.go index 6d10136ee09..d1b881bd5cd 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetVendorId.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetVendorId.go @@ -36,1413 +36,1413 @@ type IBACnetVendorId interface { VendorName() string } -const ( - BACnetVendorId_ASHRAE BACnetVendorId = 0 - BACnetVendorId_NIST BACnetVendorId = 1 - BACnetVendorId_THE_TRANE_COMPANY BACnetVendorId = 2 - BACnetVendorId_MC_QUAY_INTERNATIONAL BACnetVendorId = 3 - BACnetVendorId_POLAR_SOFT BACnetVendorId = 4 - BACnetVendorId_JOHNSON_CONTROLS_INC BACnetVendorId = 5 - BACnetVendorId_ABB_FORMERLY_AMERICAN_AUTO_MATRIX BACnetVendorId = 6 - BACnetVendorId_SIEMENS_SCHWEIZAG_FORMERLY_LANDIS_STAEFA_DIVISION_EUROPE BACnetVendorId = 7 - BACnetVendorId_DELTA_CONTROLS BACnetVendorId = 8 - BACnetVendorId_SIEMENS_SCHWEIZAG BACnetVendorId = 9 - BACnetVendorId_SCHNEIDER_ELECTRIC BACnetVendorId = 10 - BACnetVendorId_TAC BACnetVendorId = 11 - BACnetVendorId_ORION_ANALYSIS_CORPORATION BACnetVendorId = 12 - BACnetVendorId_TELETROL_SYSTEMS_INC BACnetVendorId = 13 - BACnetVendorId_CIMETRICS_TECHNOLOGY BACnetVendorId = 14 - BACnetVendorId_CORNELL_UNIVERSITY BACnetVendorId = 15 - BACnetVendorId_UNITED_TECHNOLOGIES_CARRIER BACnetVendorId = 16 - BACnetVendorId_HONEYWELL_INC BACnetVendorId = 17 - BACnetVendorId_ALERTON_HONEYWELL BACnetVendorId = 18 - BACnetVendorId_TACAB BACnetVendorId = 19 - BACnetVendorId_HEWLETT_PACKARD_COMPANY BACnetVendorId = 20 - BACnetVendorId_DORSETTES_INC BACnetVendorId = 21 - BACnetVendorId_SIEMENS_SCHWEIZAG_FORMERLY_CERBERUSAG BACnetVendorId = 22 - BACnetVendorId_YORK_CONTROLS_GROUP BACnetVendorId = 23 - BACnetVendorId_AUTOMATED_LOGIC_CORPORATION BACnetVendorId = 24 - BACnetVendorId_CSI_CONTROL_SYSTEMS_INTERNATIONAL BACnetVendorId = 25 - BACnetVendorId_PHOENIX_CONTROLS_CORPORATION BACnetVendorId = 26 - BACnetVendorId_INNOVEX_TECHNOLOGIES_INC BACnetVendorId = 27 - BACnetVendorId_KMC_CONTROLS_INC BACnetVendorId = 28 - BACnetVendorId_XN_TECHNOLOGIES_INC BACnetVendorId = 29 - BACnetVendorId_HYUNDAI_INFORMATION_TECHNOLOGY_CO_LTD BACnetVendorId = 30 - BACnetVendorId_TOKIMEC_INC BACnetVendorId = 31 - BACnetVendorId_SIMPLEX BACnetVendorId = 32 - BACnetVendorId_NORTH_BUILDING_TECHNOLOGIES_LIMITED BACnetVendorId = 33 - BACnetVendorId_NOTIFIER BACnetVendorId = 34 - BACnetVendorId_RELIABLE_CONTROLS_CORPORATION BACnetVendorId = 35 - BACnetVendorId_TRIDIUM_INC BACnetVendorId = 36 - BACnetVendorId_MSA_SAFETY BACnetVendorId = 37 - BACnetVendorId_SILICON_ENERGY BACnetVendorId = 38 - BACnetVendorId_KIEBACK_PETER_GMBH_COKG BACnetVendorId = 39 - BACnetVendorId_ANACON_SYSTEMS_INC BACnetVendorId = 40 - BACnetVendorId_SYSTEMS_CONTROLS_INSTRUMENTSLLC BACnetVendorId = 41 - BACnetVendorId_ACUITY_BRANDS_LIGHTING_INC BACnetVendorId = 42 - BACnetVendorId_MICROPOWER_MANUFACTURING BACnetVendorId = 43 - BACnetVendorId_MATRIX_CONTROLS BACnetVendorId = 44 - BACnetVendorId_METALAIRE BACnetVendorId = 45 - BACnetVendorId_ESS_ENGINEERING BACnetVendorId = 46 - BACnetVendorId_SPHERE_SYSTEMS_PTY_LTD BACnetVendorId = 47 - BACnetVendorId_WALKER_TECHNOLOGIES_CORPORATION BACnetVendorId = 48 - BACnetVendorId_HI_SOLUTIONS_INC BACnetVendorId = 49 - BACnetVendorId_MBS_GMBH BACnetVendorId = 50 - BACnetVendorId_SAMSONAG BACnetVendorId = 51 - BACnetVendorId_BADGER_METER_INC BACnetVendorId = 52 - BACnetVendorId_DAIKIN_INDUSTRIES_LTD BACnetVendorId = 53 - BACnetVendorId_NARA_CONTROLS_INC BACnetVendorId = 54 - BACnetVendorId_MAMMOTH_INC BACnetVendorId = 55 - BACnetVendorId_LIEBERT_CORPORATION BACnetVendorId = 56 - BACnetVendorId_SEMCO_INCORPORATED BACnetVendorId = 57 - BACnetVendorId_AIR_MONITOR_CORPORATION BACnetVendorId = 58 - BACnetVendorId_TRIATEKLLC BACnetVendorId = 59 - BACnetVendorId_NEX_LIGHT BACnetVendorId = 60 - BACnetVendorId_MULTISTACK BACnetVendorId = 61 - BACnetVendorId_TSI_INCORPORATED BACnetVendorId = 62 - BACnetVendorId_WEATHER_RITE_INC BACnetVendorId = 63 - BACnetVendorId_DUNHAM_BUSH BACnetVendorId = 64 - BACnetVendorId_RELIANCE_ELECTRIC BACnetVendorId = 65 - BACnetVendorId_LCS_INC BACnetVendorId = 66 - BACnetVendorId_REGULATOR_AUSTRALIAPTY_LTD BACnetVendorId = 67 - BACnetVendorId_TOUCH_PLATE_LIGHTING_CONTROLS BACnetVendorId = 68 - BACnetVendorId_AMANN_GMBH BACnetVendorId = 69 - BACnetVendorId_RLE_TECHNOLOGIES BACnetVendorId = 70 - BACnetVendorId_CARDKEY_SYSTEMS BACnetVendorId = 71 - BACnetVendorId_SECOM_CO_LTD BACnetVendorId = 72 - BACnetVendorId_ABB_GEBUDETECHNIKAG_BEREICH_NET_SERV BACnetVendorId = 73 - BACnetVendorId_KNX_ASSOCIATIONCVBA BACnetVendorId = 74 - BACnetVendorId_INSTITUTEOF_ELECTRICAL_INSTALLATION_ENGINEERSOF_JAPANIEIEJ BACnetVendorId = 75 - BACnetVendorId_NOHMI_BOSAI_LTD BACnetVendorId = 76 - BACnetVendorId_CAREL_SPA BACnetVendorId = 77 - BACnetVendorId_UTC_FIRE_SECURITY_ESPAASL BACnetVendorId = 78 - BACnetVendorId_HOCHIKI_CORPORATION BACnetVendorId = 79 - BACnetVendorId_FR_SAUTERAG BACnetVendorId = 80 - BACnetVendorId_MATSUSHITA_ELECTRIC_WORKS_LTD BACnetVendorId = 81 - BACnetVendorId_MITSUBISHI_ELECTRIC_CORPORATION_INAZAWA_WORKS BACnetVendorId = 82 - BACnetVendorId_MITSUBISHI_HEAVY_INDUSTRIES_LTD BACnetVendorId = 83 - BACnetVendorId_XYLEM_INC BACnetVendorId = 84 - BACnetVendorId_YAMATAKE_BUILDING_SYSTEMS_CO_LTD BACnetVendorId = 85 - BACnetVendorId_THE_WATT_STOPPER_INC BACnetVendorId = 86 - BACnetVendorId_AICHI_TOKEI_DENKI_CO_LTD BACnetVendorId = 87 - BACnetVendorId_ACTIVATION_TECHNOLOGIESLLC BACnetVendorId = 88 - BACnetVendorId_SAIA_BURGESS_CONTROLS_LTD BACnetVendorId = 89 - BACnetVendorId_HITACHI_LTD BACnetVendorId = 90 - BACnetVendorId_NOVAR_CORP_TREND_CONTROL_SYSTEMS_LTD BACnetVendorId = 91 - BACnetVendorId_MITSUBISHI_ELECTRIC_LIGHTING_CORPORATION BACnetVendorId = 92 - BACnetVendorId_ARGUS_CONTROL_SYSTEMS_LTD BACnetVendorId = 93 - BACnetVendorId_KYUKI_CORPORATION BACnetVendorId = 94 - BACnetVendorId_RICHARDS_ZETA_BUILDING_INTELLIGENCE_INC BACnetVendorId = 95 - BACnetVendorId_SCIENTECHRD_INC BACnetVendorId = 96 - BACnetVendorId_VCI_CONTROLS_INC BACnetVendorId = 97 - BACnetVendorId_TOSHIBA_CORPORATION BACnetVendorId = 98 +const( + BACnetVendorId_ASHRAE BACnetVendorId = 0 + BACnetVendorId_NIST BACnetVendorId = 1 + BACnetVendorId_THE_TRANE_COMPANY BACnetVendorId = 2 + BACnetVendorId_MC_QUAY_INTERNATIONAL BACnetVendorId = 3 + BACnetVendorId_POLAR_SOFT BACnetVendorId = 4 + BACnetVendorId_JOHNSON_CONTROLS_INC BACnetVendorId = 5 + BACnetVendorId_ABB_FORMERLY_AMERICAN_AUTO_MATRIX BACnetVendorId = 6 + BACnetVendorId_SIEMENS_SCHWEIZAG_FORMERLY_LANDIS_STAEFA_DIVISION_EUROPE BACnetVendorId = 7 + BACnetVendorId_DELTA_CONTROLS BACnetVendorId = 8 + BACnetVendorId_SIEMENS_SCHWEIZAG BACnetVendorId = 9 + BACnetVendorId_SCHNEIDER_ELECTRIC BACnetVendorId = 10 + BACnetVendorId_TAC BACnetVendorId = 11 + BACnetVendorId_ORION_ANALYSIS_CORPORATION BACnetVendorId = 12 + BACnetVendorId_TELETROL_SYSTEMS_INC BACnetVendorId = 13 + BACnetVendorId_CIMETRICS_TECHNOLOGY BACnetVendorId = 14 + BACnetVendorId_CORNELL_UNIVERSITY BACnetVendorId = 15 + BACnetVendorId_UNITED_TECHNOLOGIES_CARRIER BACnetVendorId = 16 + BACnetVendorId_HONEYWELL_INC BACnetVendorId = 17 + BACnetVendorId_ALERTON_HONEYWELL BACnetVendorId = 18 + BACnetVendorId_TACAB BACnetVendorId = 19 + BACnetVendorId_HEWLETT_PACKARD_COMPANY BACnetVendorId = 20 + BACnetVendorId_DORSETTES_INC BACnetVendorId = 21 + BACnetVendorId_SIEMENS_SCHWEIZAG_FORMERLY_CERBERUSAG BACnetVendorId = 22 + BACnetVendorId_YORK_CONTROLS_GROUP BACnetVendorId = 23 + BACnetVendorId_AUTOMATED_LOGIC_CORPORATION BACnetVendorId = 24 + BACnetVendorId_CSI_CONTROL_SYSTEMS_INTERNATIONAL BACnetVendorId = 25 + BACnetVendorId_PHOENIX_CONTROLS_CORPORATION BACnetVendorId = 26 + BACnetVendorId_INNOVEX_TECHNOLOGIES_INC BACnetVendorId = 27 + BACnetVendorId_KMC_CONTROLS_INC BACnetVendorId = 28 + BACnetVendorId_XN_TECHNOLOGIES_INC BACnetVendorId = 29 + BACnetVendorId_HYUNDAI_INFORMATION_TECHNOLOGY_CO_LTD BACnetVendorId = 30 + BACnetVendorId_TOKIMEC_INC BACnetVendorId = 31 + BACnetVendorId_SIMPLEX BACnetVendorId = 32 + BACnetVendorId_NORTH_BUILDING_TECHNOLOGIES_LIMITED BACnetVendorId = 33 + BACnetVendorId_NOTIFIER BACnetVendorId = 34 + BACnetVendorId_RELIABLE_CONTROLS_CORPORATION BACnetVendorId = 35 + BACnetVendorId_TRIDIUM_INC BACnetVendorId = 36 + BACnetVendorId_MSA_SAFETY BACnetVendorId = 37 + BACnetVendorId_SILICON_ENERGY BACnetVendorId = 38 + BACnetVendorId_KIEBACK_PETER_GMBH_COKG BACnetVendorId = 39 + BACnetVendorId_ANACON_SYSTEMS_INC BACnetVendorId = 40 + BACnetVendorId_SYSTEMS_CONTROLS_INSTRUMENTSLLC BACnetVendorId = 41 + BACnetVendorId_ACUITY_BRANDS_LIGHTING_INC BACnetVendorId = 42 + BACnetVendorId_MICROPOWER_MANUFACTURING BACnetVendorId = 43 + BACnetVendorId_MATRIX_CONTROLS BACnetVendorId = 44 + BACnetVendorId_METALAIRE BACnetVendorId = 45 + BACnetVendorId_ESS_ENGINEERING BACnetVendorId = 46 + BACnetVendorId_SPHERE_SYSTEMS_PTY_LTD BACnetVendorId = 47 + BACnetVendorId_WALKER_TECHNOLOGIES_CORPORATION BACnetVendorId = 48 + BACnetVendorId_HI_SOLUTIONS_INC BACnetVendorId = 49 + BACnetVendorId_MBS_GMBH BACnetVendorId = 50 + BACnetVendorId_SAMSONAG BACnetVendorId = 51 + BACnetVendorId_BADGER_METER_INC BACnetVendorId = 52 + BACnetVendorId_DAIKIN_INDUSTRIES_LTD BACnetVendorId = 53 + BACnetVendorId_NARA_CONTROLS_INC BACnetVendorId = 54 + BACnetVendorId_MAMMOTH_INC BACnetVendorId = 55 + BACnetVendorId_LIEBERT_CORPORATION BACnetVendorId = 56 + BACnetVendorId_SEMCO_INCORPORATED BACnetVendorId = 57 + BACnetVendorId_AIR_MONITOR_CORPORATION BACnetVendorId = 58 + BACnetVendorId_TRIATEKLLC BACnetVendorId = 59 + BACnetVendorId_NEX_LIGHT BACnetVendorId = 60 + BACnetVendorId_MULTISTACK BACnetVendorId = 61 + BACnetVendorId_TSI_INCORPORATED BACnetVendorId = 62 + BACnetVendorId_WEATHER_RITE_INC BACnetVendorId = 63 + BACnetVendorId_DUNHAM_BUSH BACnetVendorId = 64 + BACnetVendorId_RELIANCE_ELECTRIC BACnetVendorId = 65 + BACnetVendorId_LCS_INC BACnetVendorId = 66 + BACnetVendorId_REGULATOR_AUSTRALIAPTY_LTD BACnetVendorId = 67 + BACnetVendorId_TOUCH_PLATE_LIGHTING_CONTROLS BACnetVendorId = 68 + BACnetVendorId_AMANN_GMBH BACnetVendorId = 69 + BACnetVendorId_RLE_TECHNOLOGIES BACnetVendorId = 70 + BACnetVendorId_CARDKEY_SYSTEMS BACnetVendorId = 71 + BACnetVendorId_SECOM_CO_LTD BACnetVendorId = 72 + BACnetVendorId_ABB_GEBUDETECHNIKAG_BEREICH_NET_SERV BACnetVendorId = 73 + BACnetVendorId_KNX_ASSOCIATIONCVBA BACnetVendorId = 74 + BACnetVendorId_INSTITUTEOF_ELECTRICAL_INSTALLATION_ENGINEERSOF_JAPANIEIEJ BACnetVendorId = 75 + BACnetVendorId_NOHMI_BOSAI_LTD BACnetVendorId = 76 + BACnetVendorId_CAREL_SPA BACnetVendorId = 77 + BACnetVendorId_UTC_FIRE_SECURITY_ESPAASL BACnetVendorId = 78 + BACnetVendorId_HOCHIKI_CORPORATION BACnetVendorId = 79 + BACnetVendorId_FR_SAUTERAG BACnetVendorId = 80 + BACnetVendorId_MATSUSHITA_ELECTRIC_WORKS_LTD BACnetVendorId = 81 + BACnetVendorId_MITSUBISHI_ELECTRIC_CORPORATION_INAZAWA_WORKS BACnetVendorId = 82 + BACnetVendorId_MITSUBISHI_HEAVY_INDUSTRIES_LTD BACnetVendorId = 83 + BACnetVendorId_XYLEM_INC BACnetVendorId = 84 + BACnetVendorId_YAMATAKE_BUILDING_SYSTEMS_CO_LTD BACnetVendorId = 85 + BACnetVendorId_THE_WATT_STOPPER_INC BACnetVendorId = 86 + BACnetVendorId_AICHI_TOKEI_DENKI_CO_LTD BACnetVendorId = 87 + BACnetVendorId_ACTIVATION_TECHNOLOGIESLLC BACnetVendorId = 88 + BACnetVendorId_SAIA_BURGESS_CONTROLS_LTD BACnetVendorId = 89 + BACnetVendorId_HITACHI_LTD BACnetVendorId = 90 + BACnetVendorId_NOVAR_CORP_TREND_CONTROL_SYSTEMS_LTD BACnetVendorId = 91 + BACnetVendorId_MITSUBISHI_ELECTRIC_LIGHTING_CORPORATION BACnetVendorId = 92 + BACnetVendorId_ARGUS_CONTROL_SYSTEMS_LTD BACnetVendorId = 93 + BACnetVendorId_KYUKI_CORPORATION BACnetVendorId = 94 + BACnetVendorId_RICHARDS_ZETA_BUILDING_INTELLIGENCE_INC BACnetVendorId = 95 + BACnetVendorId_SCIENTECHRD_INC BACnetVendorId = 96 + BACnetVendorId_VCI_CONTROLS_INC BACnetVendorId = 97 + BACnetVendorId_TOSHIBA_CORPORATION BACnetVendorId = 98 BACnetVendorId_MITSUBISHI_ELECTRIC_CORPORATION_AIR_CONDITIONING_REFRIGERATION_SYSTEMS_WORKS BACnetVendorId = 99 - BACnetVendorId_CUSTOM_MECHANICAL_EQUIPMENTLLC BACnetVendorId = 100 - BACnetVendorId_CLIMATE_MASTER BACnetVendorId = 101 - BACnetVendorId_ICP_PANEL_TEC_INC BACnetVendorId = 102 - BACnetVendorId_D_TEK_CONTROLS BACnetVendorId = 103 - BACnetVendorId_NEC_ENGINEERING_LTD BACnetVendorId = 104 - BACnetVendorId_PRIVABV BACnetVendorId = 105 - BACnetVendorId_MEIDENSHA_CORPORATION BACnetVendorId = 106 - BACnetVendorId_JCI_SYSTEMS_INTEGRATION_SERVICES BACnetVendorId = 107 - BACnetVendorId_FREEDOM_CORPORATION BACnetVendorId = 108 - BACnetVendorId_NEUBERGER_GEBUDEAUTOMATION_GMBH BACnetVendorId = 109 - BACnetVendorId_E_ZI_CONTROLS BACnetVendorId = 110 - BACnetVendorId_LEVITON_MANUFACTURING BACnetVendorId = 111 - BACnetVendorId_FUJITSU_LIMITED BACnetVendorId = 112 - BACnetVendorId_VERTIV_FORMERLY_EMERSON_NETWORK_POWER BACnetVendorId = 113 - BACnetVendorId_SA_ARMSTRONG_LTD BACnetVendorId = 114 - BACnetVendorId_VISONETAG BACnetVendorId = 115 - BACnetVendorId_MM_SYSTEMS_INC BACnetVendorId = 116 - BACnetVendorId_CUSTOM_SOFTWARE_ENGINEERING BACnetVendorId = 117 - BACnetVendorId_NITTAN_COMPANY_LIMITED BACnetVendorId = 118 - BACnetVendorId_ELUTIONS_INC_WIZCON_SYSTEMSSAS BACnetVendorId = 119 - BACnetVendorId_PACOM_SYSTEMS_PTY_LTD BACnetVendorId = 120 - BACnetVendorId_UNICO_INC BACnetVendorId = 121 - BACnetVendorId_EBTRON_INC BACnetVendorId = 122 - BACnetVendorId_SCADA_ENGINE BACnetVendorId = 123 - BACnetVendorId_LENZE_AMERICAS_FORMERLYAC_TECHNOLOGY_CORPORATION BACnetVendorId = 124 - BACnetVendorId_EAGLE_TECHNOLOGY BACnetVendorId = 125 - BACnetVendorId_DATA_AIRE_INC BACnetVendorId = 126 - BACnetVendorId_ABB_INC BACnetVendorId = 127 - BACnetVendorId_TRANSBIT_SPZOO BACnetVendorId = 128 - BACnetVendorId_TOSHIBA_CARRIER_CORPORATION BACnetVendorId = 129 - BACnetVendorId_SHENZHEN_JUNZHI_HI_TECH_CO_LTD BACnetVendorId = 130 - BACnetVendorId_TOKAI_SOFT BACnetVendorId = 131 - BACnetVendorId_BLUE_RIDGE_TECHNOLOGIES BACnetVendorId = 132 - BACnetVendorId_VERIS_INDUSTRIES BACnetVendorId = 133 - BACnetVendorId_CENTAURUS_PRIME BACnetVendorId = 134 - BACnetVendorId_SAND_NETWORK_SYSTEMS BACnetVendorId = 135 - BACnetVendorId_REGULVAR_INC BACnetVendorId = 136 - BACnetVendorId_AF_DTEK_DIVISIONOF_FASTEK_INTERNATIONAL_INC BACnetVendorId = 137 - BACnetVendorId_POWER_COLD_COMFORT_AIR_SOLUTIONS_INC BACnetVendorId = 138 - BACnetVendorId_I_CONTROLS BACnetVendorId = 139 - BACnetVendorId_VICONICS_ELECTRONICS_INC BACnetVendorId = 140 - BACnetVendorId_YASKAWA_AMERICA_INC BACnetVendorId = 141 - BACnetVendorId_DEO_SCONTROLSYSTEMS_GMBH BACnetVendorId = 142 - BACnetVendorId_DIGITALE_MESSUND_STEUERSYSTEMEAG BACnetVendorId = 143 - BACnetVendorId_FUJITSU_GENERAL_LIMITED BACnetVendorId = 144 - BACnetVendorId_PROJECT_ENGINEERING_SRL BACnetVendorId = 145 - BACnetVendorId_SANYO_ELECTRIC_CO_LTD BACnetVendorId = 146 - BACnetVendorId_INTEGRATED_INFORMATION_SYSTEMS_INC BACnetVendorId = 147 - BACnetVendorId_TEMCO_CONTROLS_LTD BACnetVendorId = 148 - BACnetVendorId_AIRTEK_INTERNATIONAL_INC BACnetVendorId = 149 - BACnetVendorId_ADVANTECH_CORPORATION BACnetVendorId = 150 - BACnetVendorId_TITAN_PRODUCTS_LTD BACnetVendorId = 151 - BACnetVendorId_REGEL_PARTNERS BACnetVendorId = 152 - BACnetVendorId_NATIONAL_ENVIRONMENTAL_PRODUCT BACnetVendorId = 153 - BACnetVendorId_UNITEC_CORPORATION BACnetVendorId = 154 - BACnetVendorId_KANDEN_ENGINEERING_COMPANY BACnetVendorId = 155 - BACnetVendorId_MESSNER_GEBUDETECHNIK_GMBH BACnetVendorId = 156 - BACnetVendorId_INTEGRATEDCH BACnetVendorId = 157 - BACnetVendorId_PRICE_INDUSTRIES BACnetVendorId = 158 - BACnetVendorId_SE_ELEKTRONIC_GMBH BACnetVendorId = 159 - BACnetVendorId_ROCKWELL_AUTOMATION BACnetVendorId = 160 - BACnetVendorId_ENFLEX_CORP BACnetVendorId = 161 - BACnetVendorId_ASI_CONTROLS BACnetVendorId = 162 - BACnetVendorId_SYS_MIK_GMBH_DRESDEN BACnetVendorId = 163 - BACnetVendorId_HSC_REGELUNGSTECHNIK_GMBH BACnetVendorId = 164 - BACnetVendorId_SMART_TEMP_AUSTRALIA_PTY_LTD BACnetVendorId = 165 - BACnetVendorId_COOPER_CONTROLS BACnetVendorId = 166 - BACnetVendorId_DUKSAN_MECASYS_CO_LTD BACnetVendorId = 167 - BACnetVendorId_FUJIIT_CO_LTD BACnetVendorId = 168 - BACnetVendorId_VACON_PLC BACnetVendorId = 169 - BACnetVendorId_LEADER_CONTROLS BACnetVendorId = 170 - BACnetVendorId_ABB_FORMERLY_CYLON_CONTROLS_LTD BACnetVendorId = 171 - BACnetVendorId_COMPAS BACnetVendorId = 172 - BACnetVendorId_MITSUBISHI_ELECTRIC_BUILDING_TECHNO_SERVICE_CO_LTD BACnetVendorId = 173 - BACnetVendorId_BUILDING_CONTROL_INTEGRATORS BACnetVendorId = 174 - BACnetVendorId_ITG_WORLDWIDEM_SDN_BHD BACnetVendorId = 175 - BACnetVendorId_LUTRON_ELECTRONICS_CO_INC BACnetVendorId = 176 - BACnetVendorId_COOPER_ATKINS_CORPORATION BACnetVendorId = 177 - BACnetVendorId_LOYTEC_ELECTRONICS_GMBH BACnetVendorId = 178 - BACnetVendorId_PRO_LON BACnetVendorId = 179 - BACnetVendorId_MEGA_CONTROLS_LIMITED BACnetVendorId = 180 - BACnetVendorId_MICRO_CONTROL_SYSTEMS_INC BACnetVendorId = 181 - BACnetVendorId_KIYON_INC BACnetVendorId = 182 - BACnetVendorId_DUST_NETWORKS BACnetVendorId = 183 - BACnetVendorId_ADVANCED_BUILDING_AUTOMATION_SYSTEMS BACnetVendorId = 184 - BACnetVendorId_HERMOSAG BACnetVendorId = 185 - BACnetVendorId_CEZIM BACnetVendorId = 186 - BACnetVendorId_SOFTING BACnetVendorId = 187 - BACnetVendorId_LYNXSPRING_INC BACnetVendorId = 188 - BACnetVendorId_SCHNEIDER_TOSHIBA_INVERTER_EUROPE BACnetVendorId = 189 - BACnetVendorId_DANFOSS_DRIVESAS BACnetVendorId = 190 - BACnetVendorId_EATON_CORPORATION BACnetVendorId = 191 - BACnetVendorId_MATYCASA BACnetVendorId = 192 - BACnetVendorId_BOTECHAB BACnetVendorId = 193 - BACnetVendorId_NOVEO_INC BACnetVendorId = 194 - BACnetVendorId_AMEV BACnetVendorId = 195 - BACnetVendorId_YOKOGAWA_ELECTRIC_CORPORATION BACnetVendorId = 196 - BACnetVendorId_BOSCH_BUILDING_AUTOMATION_GMBH BACnetVendorId = 197 - BACnetVendorId_EXACT_LOGIC BACnetVendorId = 198 - BACnetVendorId_MASS_ELECTRONICS_PTY_LTDDBA_INNOTECH_CONTROL_SYSTEMS_AUSTRALIA BACnetVendorId = 199 - BACnetVendorId_KANDENKO_CO_LTD BACnetVendorId = 200 - BACnetVendorId_DTF_DATEN_TECHNIK_FRIES BACnetVendorId = 201 - BACnetVendorId_KLIMASOFT_LTD BACnetVendorId = 202 - BACnetVendorId_TOSHIBA_SCHNEIDER_INVERTER_CORPORATION BACnetVendorId = 203 - BACnetVendorId_CONTROL_APPLICATIONS_LTD BACnetVendorId = 204 - BACnetVendorId_CIMONCO_LTD BACnetVendorId = 205 - BACnetVendorId_ONICON_INCORPORATED BACnetVendorId = 206 - BACnetVendorId_AUTOMATION_DISPLAYS_INC BACnetVendorId = 207 - BACnetVendorId_CONTROL_SOLUTIONS_INC BACnetVendorId = 208 - BACnetVendorId_REMSDAQ_LIMITED BACnetVendorId = 209 - BACnetVendorId_NTT_FACILITIES_INC BACnetVendorId = 210 - BACnetVendorId_VIPA_GMBH BACnetVendorId = 211 - BACnetVendorId_TSC1_ASSOCIATIONOF_JAPAN BACnetVendorId = 212 - BACnetVendorId_STRATO_AUTOMATION BACnetVendorId = 213 - BACnetVendorId_HRW_LIMITED BACnetVendorId = 214 - BACnetVendorId_LIGHTING_CONTROL_DESIGN_INC BACnetVendorId = 215 - BACnetVendorId_MERCY_ELECTRONICAND_ELECTRICAL_INDUSTRIES BACnetVendorId = 216 - BACnetVendorId_SAMSUNGSDS_CO_LTD BACnetVendorId = 217 - BACnetVendorId_IMPACT_FACILITY_SOLUTIONS_INC BACnetVendorId = 218 - BACnetVendorId_AIRCUITY BACnetVendorId = 219 - BACnetVendorId_CONTROL_TECHNIQUES_LTD BACnetVendorId = 220 - BACnetVendorId_OPEN_GENERAL_PTY_LTD BACnetVendorId = 221 - BACnetVendorId_WAGO_KONTAKTTECHNIK_GMBH_COKG BACnetVendorId = 222 - BACnetVendorId_CERUS_INDUSTRIAL BACnetVendorId = 223 - BACnetVendorId_CHLORIDE_POWER_PROTECTION_COMPANY BACnetVendorId = 224 - BACnetVendorId_COMPUTROLS_INC BACnetVendorId = 225 - BACnetVendorId_PHOENIX_CONTACT_GMBH_COKG BACnetVendorId = 226 - BACnetVendorId_GRUNDFOS_MANAGEMENTAS BACnetVendorId = 227 - BACnetVendorId_RIDDER_DRIVE_SYSTEMS BACnetVendorId = 228 - BACnetVendorId_SOFT_DEVICESDNBHD BACnetVendorId = 229 - BACnetVendorId_INTEGRATED_CONTROL_TECHNOLOGY_LIMITED BACnetVendorId = 230 - BACnetVendorId_AI_RXPERT_SYSTEMS_INC BACnetVendorId = 231 - BACnetVendorId_MICROTROL_LIMITED BACnetVendorId = 232 - BACnetVendorId_RED_LION_CONTROLS BACnetVendorId = 233 - BACnetVendorId_DIGITAL_ELECTRONICS_CORPORATION BACnetVendorId = 234 - BACnetVendorId_ENNOVATIS_GMBH BACnetVendorId = 235 - BACnetVendorId_SEROTONIN_SOFTWARE_TECHNOLOGIES_INC BACnetVendorId = 236 - BACnetVendorId_LS_INDUSTRIAL_SYSTEMS_CO_LTD BACnetVendorId = 237 - BACnetVendorId_SQUARED_COMPANY BACnetVendorId = 238 - BACnetVendorId_S_SQUARED_INNOVATIONS_INC BACnetVendorId = 239 - BACnetVendorId_ARICENT_LTD BACnetVendorId = 240 - BACnetVendorId_ETHER_METRICSLLC BACnetVendorId = 241 - BACnetVendorId_INDUSTRIAL_CONTROL_COMMUNICATIONS_INC BACnetVendorId = 242 - BACnetVendorId_PARAGON_CONTROLS_INC BACnetVendorId = 243 - BACnetVendorId_AO_SMITH_CORPORATION BACnetVendorId = 244 - BACnetVendorId_CONTEMPORARY_CONTROL_SYSTEMS_INC BACnetVendorId = 245 - BACnetVendorId_HMS_INDUSTRIAL_NETWORKSSLU BACnetVendorId = 246 - BACnetVendorId_INGENIEURGESELLSCHAFTN_HARTLEBMBH BACnetVendorId = 247 - BACnetVendorId_HEAT_TIMER_CORPORATION BACnetVendorId = 248 - BACnetVendorId_INGRASYS_TECHNOLOGY_INC BACnetVendorId = 249 - BACnetVendorId_COSTERM_BUILDING_AUTOMATION BACnetVendorId = 250 - BACnetVendorId_WILOSE BACnetVendorId = 251 - BACnetVendorId_EMBEDIA_TECHNOLOGIES_CORP BACnetVendorId = 252 - BACnetVendorId_TECHNILOG BACnetVendorId = 253 - BACnetVendorId_HR_CONTROLS_LTD_COKG BACnetVendorId = 254 - BACnetVendorId_LENNOX_INTERNATIONAL_INC BACnetVendorId = 255 - BACnetVendorId_RK_TEC_RAUCHKLAPPEN_STEUERUNGSSYSTEME_GMBH_COKG BACnetVendorId = 256 - BACnetVendorId_THERMOMAX_LTD BACnetVendorId = 257 - BACnetVendorId_ELCON_ELECTRONIC_CONTROL_LTD BACnetVendorId = 258 - BACnetVendorId_LARMIA_CONTROLAB BACnetVendorId = 259 - BACnetVendorId_BA_CNET_STACKAT_SOURCE_FORGE BACnetVendorId = 260 - BACnetVendorId_GS_SECURITY_SERVICESAS BACnetVendorId = 261 - BACnetVendorId_EXOR_INTERNATIONAL_SPA BACnetVendorId = 262 - BACnetVendorId_CRISTAL_CONTROLES BACnetVendorId = 263 - BACnetVendorId_REGINAB BACnetVendorId = 264 - BACnetVendorId_DIMENSION_SOFTWARE_INC BACnetVendorId = 265 - BACnetVendorId_SYNAP_SENSE_CORPORATION BACnetVendorId = 266 - BACnetVendorId_BEIJING_NANTREE_ELECTRONIC_CO_LTD BACnetVendorId = 267 - BACnetVendorId_CAMUS_HYDRONICS_LTD BACnetVendorId = 268 - BACnetVendorId_KAWASAKI_HEAVY_INDUSTRIES_LTD BACnetVendorId = 269 - BACnetVendorId_CRITICAL_ENVIRONMENT_TECHNOLOGIES BACnetVendorId = 270 - BACnetVendorId_ILSHINIBS_CO_LTD BACnetVendorId = 271 - BACnetVendorId_ELESTA_ENERGY_CONTROLAG BACnetVendorId = 272 - BACnetVendorId_KROPMAN_INSTALLATIETECHNIEK BACnetVendorId = 273 - BACnetVendorId_BALDOR_ELECTRIC_COMPANY BACnetVendorId = 274 - BACnetVendorId_ING_AMBH BACnetVendorId = 275 - BACnetVendorId_GE_CONSUMER_INDUSTRIAL BACnetVendorId = 276 - BACnetVendorId_FUNCTIONAL_DEVICES_INC BACnetVendorId = 277 - BACnetVendorId_STUDIOSC BACnetVendorId = 278 - BACnetVendorId_M_SYSTEM_CO_LTD BACnetVendorId = 279 - BACnetVendorId_YOKOTA_CO_LTD BACnetVendorId = 280 - BACnetVendorId_HITRANSE_TECHNOLOGY_COLTD BACnetVendorId = 281 - BACnetVendorId_VIGILENT_CORPORATION BACnetVendorId = 282 - BACnetVendorId_KELE_INC BACnetVendorId = 283 - BACnetVendorId_OPERA_ELECTRONICS_INC BACnetVendorId = 284 - BACnetVendorId_GENTEC BACnetVendorId = 285 - BACnetVendorId_EMBEDDED_SCIENCE_LABSLLC BACnetVendorId = 286 - BACnetVendorId_PARKER_HANNIFIN_CORPORATION BACnetVendorId = 287 - BACnetVendorId_MA_CAPS_INTERNATIONAL_LIMITED BACnetVendorId = 288 - BACnetVendorId_LINK_CORPORATION BACnetVendorId = 289 - BACnetVendorId_ROMUTEC_STEUERU_REGELSYSTEME_GMBH BACnetVendorId = 290 - BACnetVendorId_PRIBUSIN_INC BACnetVendorId = 291 - BACnetVendorId_ADVANTAGE_CONTROLS BACnetVendorId = 292 - BACnetVendorId_CRITICAL_ROOM_CONTROL BACnetVendorId = 293 - BACnetVendorId_LEGRAND BACnetVendorId = 294 - BACnetVendorId_TONGDY_CONTROL_TECHNOLOGY_CO_LTD BACnetVendorId = 295 - BACnetVendorId_ISSARO_INTEGRIERTE_SYSTEMTECHNIK BACnetVendorId = 296 - BACnetVendorId_PRO_DEV_INDUSTRIES BACnetVendorId = 297 - BACnetVendorId_DRISTEEM BACnetVendorId = 298 - BACnetVendorId_CREATIVE_ELECTRONIC_GMBH BACnetVendorId = 299 - BACnetVendorId_SWEGONAB BACnetVendorId = 300 - BACnetVendorId_FIRVEN_ASRO BACnetVendorId = 301 - BACnetVendorId_HITACHI_APPLIANCES_INC BACnetVendorId = 302 - BACnetVendorId_REAL_TIME_AUTOMATION_INC BACnetVendorId = 303 - BACnetVendorId_ITEC_HANKYU_HANSHIN_CO BACnetVendorId = 304 - BACnetVendorId_CYRUSEM_ENGINEERING_CO_LTD BACnetVendorId = 305 - BACnetVendorId_BADGER_METER BACnetVendorId = 306 - BACnetVendorId_CIRRASCALE_CORPORATION BACnetVendorId = 307 - BACnetVendorId_ELESTA_GMBH_BUILDING_AUTOMATION BACnetVendorId = 308 - BACnetVendorId_SECURITON BACnetVendorId = 309 - BACnetVendorId_O_SLSOFT_INC BACnetVendorId = 310 - BACnetVendorId_HANAZEDER_ELECTRONIC_GMBH BACnetVendorId = 311 - BACnetVendorId_HONEYWELL_SECURITY_DEUTSCHLAND_NOVAR_GMBH BACnetVendorId = 312 - BACnetVendorId_SIEMENS_INDUSTRY_INC BACnetVendorId = 313 - BACnetVendorId_ETM_PROFESSIONAL_CONTROL_GMBH BACnetVendorId = 314 - BACnetVendorId_MEITAVTEC_LTD BACnetVendorId = 315 - BACnetVendorId_JANITZA_ELECTRONICS_GMBH BACnetVendorId = 316 - BACnetVendorId_MKS_NORDHAUSEN BACnetVendorId = 317 - BACnetVendorId_DE_GIER_DRIVE_SYSTEMSBV BACnetVendorId = 318 - BACnetVendorId_CYPRESS_ENVIROSYSTEMS BACnetVendorId = 319 - BACnetVendorId_SMAR_TRONSRO BACnetVendorId = 320 - BACnetVendorId_VERARI_SYSTEMS_INC BACnetVendorId = 321 - BACnetVendorId_KW_ELECTRONIC_SERVICE_INC BACnetVendorId = 322 - BACnetVendorId_ALFASMART_ENERGY_MANAGEMENT BACnetVendorId = 323 - BACnetVendorId_TELKONET_INC BACnetVendorId = 324 - BACnetVendorId_SECURITON_GMBH BACnetVendorId = 325 - BACnetVendorId_CEMTREX_INC BACnetVendorId = 326 - BACnetVendorId_PERFORMANCE_TECHNOLOGIES_INC BACnetVendorId = 327 - BACnetVendorId_XTRALIS_AUST_PTY_LTD BACnetVendorId = 328 - BACnetVendorId_TROX_GMBH BACnetVendorId = 329 - BACnetVendorId_BEIJING_HYSINE_TECHNOLOGY_CO_LTD BACnetVendorId = 330 - BACnetVendorId_RCK_CONTROLS_INC BACnetVendorId = 331 - BACnetVendorId_DISTECH_CONTROLSSAS BACnetVendorId = 332 - BACnetVendorId_NOVAR_HONEYWELL BACnetVendorId = 333 - BACnetVendorId_THES_GROUP_INC BACnetVendorId = 334 - BACnetVendorId_SCHNEIDER_ELECTRIC1 BACnetVendorId = 335 - BACnetVendorId_LHA_SYSTEMS BACnetVendorId = 336 - BACnetVendorId_GH_MENGINEERING_GROUP_INC BACnetVendorId = 337 - BACnetVendorId_CLLIMALUXSA BACnetVendorId = 338 - BACnetVendorId_VAISALA_OYJ BACnetVendorId = 339 - BACnetVendorId_COMPLEX_BEIJING_TECHNOLOGY_COLTD BACnetVendorId = 340 - BACnetVendorId_SCAD_AMETRICS BACnetVendorId = 341 - BACnetVendorId_POWERPEGNSI_LIMITED BACnetVendorId = 342 - BACnetVendorId_BA_CNET_INTEROPERABILITY_TESTING_SERVICES_INC BACnetVendorId = 343 - BACnetVendorId_TECOAS BACnetVendorId = 344 - BACnetVendorId_PLEXUS_TECHNOLOGY_INC BACnetVendorId = 345 - BACnetVendorId_ENERGY_FOCUS_INC BACnetVendorId = 346 - BACnetVendorId_POWERSMITHS_INTERNATIONAL_CORP BACnetVendorId = 347 - BACnetVendorId_NICHIBEI_CO_LTD BACnetVendorId = 348 - BACnetVendorId_HKC_TECHNOLOGY_LTD BACnetVendorId = 349 - BACnetVendorId_OVATION_NETWORKS_INC BACnetVendorId = 350 - BACnetVendorId_SETRA_SYSTEMS BACnetVendorId = 351 - BACnetVendorId_AVG_AUTOMATION BACnetVendorId = 352 - BACnetVendorId_ZXC_LTD BACnetVendorId = 353 - BACnetVendorId_BYTE_SPHERE BACnetVendorId = 354 - BACnetVendorId_GENERITON_CO_LTD BACnetVendorId = 355 - BACnetVendorId_HOLTER_REGELARMATUREN_GMBH_COKG BACnetVendorId = 356 - BACnetVendorId_BEDFORD_INSTRUMENTSLLC BACnetVendorId = 357 - BACnetVendorId_STANDAIR_INC BACnetVendorId = 358 - BACnetVendorId_WEG_AUTOMATIONRD BACnetVendorId = 359 - BACnetVendorId_PROLON_CONTROL_SYSTEMS_APS BACnetVendorId = 360 - BACnetVendorId_INNEASOFT BACnetVendorId = 361 - BACnetVendorId_CONNEX_SOFT_GMBH BACnetVendorId = 362 - BACnetVendorId_CEAG_NOTLICHTSYSTEME_GMBH BACnetVendorId = 363 - BACnetVendorId_DISTECH_CONTROLS_INC BACnetVendorId = 364 - BACnetVendorId_INDUSTRIAL_TECHNOLOGY_RESEARCH_INSTITUTE BACnetVendorId = 365 - BACnetVendorId_ICONICS_INC BACnetVendorId = 366 - BACnetVendorId_IQ_CONTROLSSC BACnetVendorId = 367 - BACnetVendorId_OJ_ELECTRONICSAS BACnetVendorId = 368 - BACnetVendorId_ROLBIT_LTD BACnetVendorId = 369 - BACnetVendorId_SYNAPSYS_SOLUTIONS_LTD BACnetVendorId = 370 - BACnetVendorId_ACME_ENGINEERING_PROD_LTD BACnetVendorId = 371 - BACnetVendorId_ZENER_ELECTRIC_PTY_LTD BACnetVendorId = 372 - BACnetVendorId_SELECTRONIX_INC BACnetVendorId = 373 - BACnetVendorId_GORBET_BANERJEELLC BACnetVendorId = 374 - BACnetVendorId_IME BACnetVendorId = 375 - BACnetVendorId_STEPHENH_DAWSON_COMPUTER_SERVICE BACnetVendorId = 376 - BACnetVendorId_ACCUTROLLLC BACnetVendorId = 377 - BACnetVendorId_SCHNEIDER_ELEKTRONIK_GMBH BACnetVendorId = 378 - BACnetVendorId_ALPHA_INNO_TEC_GMBH BACnetVendorId = 379 - BACnetVendorId_ADM_MICRO_INC BACnetVendorId = 380 - BACnetVendorId_GREYSTONE_ENERGY_SYSTEMS_INC BACnetVendorId = 381 - BACnetVendorId_CAP_TECHNOLOGIE BACnetVendorId = 382 - BACnetVendorId_KE_RO_SYSTEMS BACnetVendorId = 383 - BACnetVendorId_DOMAT_CONTROL_SYSTEMSRO BACnetVendorId = 384 - BACnetVendorId_EFEKTRONICS_PTY_LTD BACnetVendorId = 385 - BACnetVendorId_HEKATRON_VERTRIEBS_GMBH BACnetVendorId = 386 - BACnetVendorId_SECURITONAG BACnetVendorId = 387 - BACnetVendorId_CARLO_GAVAZZI_CONTROLS_SPA BACnetVendorId = 388 - BACnetVendorId_CHIPKIN_AUTOMATION_SYSTEMS BACnetVendorId = 389 - BACnetVendorId_SAVANT_SYSTEMSLLC BACnetVendorId = 390 - BACnetVendorId_SIMMTRONIC_LIGHTING_CONTROLS BACnetVendorId = 391 - BACnetVendorId_ABELKO_INNOVATIONAB BACnetVendorId = 392 - BACnetVendorId_SERESCO_TECHNOLOGIES_INC BACnetVendorId = 393 - BACnetVendorId_IT_WATCHDOGS BACnetVendorId = 394 - BACnetVendorId_AUTOMATION_ASSIST_JAPAN_CORP BACnetVendorId = 395 - BACnetVendorId_THERMOKON_SENSORTECHNIK_GMBH BACnetVendorId = 396 - BACnetVendorId_E_GAUGE_SYSTEMSLLC BACnetVendorId = 397 - BACnetVendorId_QUANTUM_AUTOMATIONASIAPTE_LTD BACnetVendorId = 398 - BACnetVendorId_TOSHIBA_LIGHTING_TECHNOLOGY_CORP BACnetVendorId = 399 - BACnetVendorId_SPIN_ENGENHARIADE_AUTOMAO_LTDA BACnetVendorId = 400 - BACnetVendorId_LOGISTICS_SYSTEMS_SOFTWARE_SERVICES_INDIAPVT_LTD BACnetVendorId = 401 - BACnetVendorId_DELTA_CONTROLS_INTEGRATION_PRODUCTS BACnetVendorId = 402 - BACnetVendorId_FOCUS_MEDIA BACnetVendorId = 403 - BACnetVendorId_LUM_ENERGI_INC BACnetVendorId = 404 - BACnetVendorId_KARA_SYSTEMS BACnetVendorId = 405 - BACnetVendorId_RF_CODE_INC BACnetVendorId = 406 - BACnetVendorId_FATEK_AUTOMATION_CORP BACnetVendorId = 407 - BACnetVendorId_JANDA_SOFTWARE_COMPANYLLC BACnetVendorId = 408 - BACnetVendorId_OPEN_SYSTEM_SOLUTIONS_LIMITED BACnetVendorId = 409 - BACnetVendorId_INTELEC_SYSTEMSPTY_LTD BACnetVendorId = 410 - BACnetVendorId_ECOLODGIXLLC BACnetVendorId = 411 - BACnetVendorId_DOUGLAS_LIGHTING_CONTROLS BACnetVendorId = 412 - BACnetVendorId_IS_ATECH_GMBH BACnetVendorId = 413 - BACnetVendorId_AREAL BACnetVendorId = 414 - BACnetVendorId_BECKHOFF_AUTOMATION BACnetVendorId = 415 - BACnetVendorId_IPAS_GMBH BACnetVendorId = 416 - BACnetVendorId_KE_THERM_SOLUTIONS BACnetVendorId = 417 - BACnetVendorId_BASE_PRODUCTS BACnetVendorId = 418 - BACnetVendorId_DTL_CONTROLSLLC BACnetVendorId = 419 - BACnetVendorId_INNCOM_INTERNATIONAL_INC BACnetVendorId = 420 - BACnetVendorId_METZCONNECT_GMBH BACnetVendorId = 421 - BACnetVendorId_GREENTROL_AUTOMATION_INC BACnetVendorId = 422 - BACnetVendorId_BELIMO_AUTOMATIONAG BACnetVendorId = 423 - BACnetVendorId_SAMSUNG_HEAVY_INDUSTRIES_CO_LTD BACnetVendorId = 424 - BACnetVendorId_TRIACTA_POWER_TECHNOLOGIES_INC BACnetVendorId = 425 - BACnetVendorId_GLOBESTAR_SYSTEMS BACnetVendorId = 426 - BACnetVendorId_MLB_ADVANCED_MEDIALP BACnetVendorId = 427 - BACnetVendorId_SWG_STUCKMANN_WIRTSCHAFTLICHE_GEBUDESYSTEME_GMBH BACnetVendorId = 428 - BACnetVendorId_SENSOR_SWITCH BACnetVendorId = 429 - BACnetVendorId_MULTITEK_POWER_LIMITED BACnetVendorId = 430 - BACnetVendorId_AQUAMETROAG BACnetVendorId = 431 - BACnetVendorId_LG_ELECTRONICS_INC BACnetVendorId = 432 - BACnetVendorId_ELECTRONIC_THEATRE_CONTROLS_INC BACnetVendorId = 433 - BACnetVendorId_MITSUBISHI_ELECTRIC_CORPORATION_NAGOYA_WORKS BACnetVendorId = 434 - BACnetVendorId_DELTA_ELECTRONICS_INC BACnetVendorId = 435 - BACnetVendorId_ELMA_KURTALJ_LTD BACnetVendorId = 436 - BACnetVendorId_TYCO_FIRE_SECURITY_GMBH BACnetVendorId = 437 - BACnetVendorId_NEDAP_SECURITY_MANAGEMENT BACnetVendorId = 438 - BACnetVendorId_ESC_AUTOMATION_INC BACnetVendorId = 439 - BACnetVendorId_DSPYOU_LTD BACnetVendorId = 440 - BACnetVendorId_GE_SENSINGAND_INSPECTION_TECHNOLOGIES BACnetVendorId = 441 - BACnetVendorId_EMBEDDED_SYSTEMSSIA BACnetVendorId = 442 - BACnetVendorId_BEFEGA_GMBH BACnetVendorId = 443 - BACnetVendorId_BASELINE_INC BACnetVendorId = 444 - BACnetVendorId_KEY_ACT BACnetVendorId = 445 - BACnetVendorId_OEM_CTRL BACnetVendorId = 446 - BACnetVendorId_CLARKSON_CONTROLS_LIMITED BACnetVendorId = 447 - BACnetVendorId_ROGERWELL_CONTROL_SYSTEM_LIMITED BACnetVendorId = 448 - BACnetVendorId_SCL_ELEMENTS BACnetVendorId = 449 - BACnetVendorId_HITACHI_LTD1 BACnetVendorId = 450 - BACnetVendorId_NEWRON_SYSTEMSA BACnetVendorId = 451 - BACnetVendorId_BEVECO_GEBOUWAUTOMATISERINGBV BACnetVendorId = 452 - BACnetVendorId_STREAMSIDE_SOLUTIONS BACnetVendorId = 453 - BACnetVendorId_YELLOWSTONE_SOFT BACnetVendorId = 454 - BACnetVendorId_OZTECH_INTELLIGENT_SYSTEMS_PTY_LTD BACnetVendorId = 455 - BACnetVendorId_NOVELAN_GMBH BACnetVendorId = 456 - BACnetVendorId_FLEXIM_AMERICAS_CORPORATION BACnetVendorId = 457 - BACnetVendorId_ICPDAS_CO_LTD BACnetVendorId = 458 - BACnetVendorId_CARMA_INDUSTRIES_INC BACnetVendorId = 459 - BACnetVendorId_LOG_ONE_LTD BACnetVendorId = 460 - BACnetVendorId_TECO_ELECTRIC_MACHINERY_CO_LTD BACnetVendorId = 461 - BACnetVendorId_CONNECT_EX_INC BACnetVendorId = 462 - BACnetVendorId_TURBODDC_SDWEST BACnetVendorId = 463 - BACnetVendorId_QUATROSENSE_ENVIRONMENTAL_LTD BACnetVendorId = 464 - BACnetVendorId_FIFTH_LIGHT_TECHNOLOGY_LTD BACnetVendorId = 465 - BACnetVendorId_SCIENTIFIC_SOLUTIONS_LTD BACnetVendorId = 466 - BACnetVendorId_CONTROLLER_AREA_NETWORK_SOLUTIONSM_SDN_BHD BACnetVendorId = 467 - BACnetVendorId_RESOL_ELEKTRONISCHE_REGELUNGEN_GMBH BACnetVendorId = 468 - BACnetVendorId_RPBUSLLC BACnetVendorId = 469 - BACnetVendorId_BRS_SISTEMAS_ELETRONICOS BACnetVendorId = 470 - BACnetVendorId_WINDOW_MASTERAS BACnetVendorId = 471 - BACnetVendorId_SUNLUX_TECHNOLOGIES_LTD BACnetVendorId = 472 - BACnetVendorId_MEASURLOGIC BACnetVendorId = 473 - BACnetVendorId_FRIMAT_GMBH BACnetVendorId = 474 - BACnetVendorId_SPIRAX_SARCO BACnetVendorId = 475 - BACnetVendorId_LUXTRON BACnetVendorId = 476 - BACnetVendorId_RAYPAK_INC BACnetVendorId = 477 - BACnetVendorId_AIR_MONITOR_CORPORATION1 BACnetVendorId = 478 - BACnetVendorId_REGLER_OCH_WEBBTEKNIK_SVERIGEROWS BACnetVendorId = 479 - BACnetVendorId_INTELLIGENT_LIGHTING_CONTROLS_INC BACnetVendorId = 480 - BACnetVendorId_SANYO_ELECTRIC_INDUSTRY_CO_LTD BACnetVendorId = 481 - BACnetVendorId_E_MON_ENERGY_MONITORING_PRODUCTS BACnetVendorId = 482 - BACnetVendorId_DIGITAL_CONTROL_SYSTEMS BACnetVendorId = 483 - BACnetVendorId_ATI_AIRTEST_TECHNOLOGIES_INC BACnetVendorId = 484 - BACnetVendorId_SCSSA BACnetVendorId = 485 - BACnetVendorId_HMS_INDUSTRIAL_NETWORKSAB BACnetVendorId = 486 - BACnetVendorId_SHENZHEN_UNIVERSAL_INTELLISYS_CO_LTD BACnetVendorId = 487 - BACnetVendorId_EK_INTELLISYS_SDN_BHD BACnetVendorId = 488 - BACnetVendorId_SYS_COM BACnetVendorId = 489 - BACnetVendorId_FIRECOM_INC BACnetVendorId = 490 - BACnetVendorId_ESA_ELEKTROSCHALTANLAGEN_GRIMMA_GMBH BACnetVendorId = 491 - BACnetVendorId_KUMAHIRA_CO_LTD BACnetVendorId = 492 - BACnetVendorId_HOTRACO BACnetVendorId = 493 - BACnetVendorId_SABO_ELEKTRONIK_GMBH BACnetVendorId = 494 - BACnetVendorId_EQUIP_TRANS BACnetVendorId = 495 - BACnetVendorId_TEMPERATURE_CONTROL_SPECIALITIES_CO_INCTCS BACnetVendorId = 496 - BACnetVendorId_FLOW_CON_INTERNATIONALAS BACnetVendorId = 497 - BACnetVendorId_THYSSEN_KRUPP_ELEVATOR_AMERICAS BACnetVendorId = 498 - BACnetVendorId_ABATEMENT_TECHNOLOGIES BACnetVendorId = 499 - BACnetVendorId_CONTINENTAL_CONTROL_SYSTEMSLLC BACnetVendorId = 500 - BACnetVendorId_WISAG_AUTOMATISIERUNGSTECHNIK_GMBH_COKG BACnetVendorId = 501 - BACnetVendorId_EASYIO BACnetVendorId = 502 - BACnetVendorId_EAP_ELECTRIC_GMBH BACnetVendorId = 503 - BACnetVendorId_HARDMEIER BACnetVendorId = 504 - BACnetVendorId_MIRCOM_GROUPOF_COMPANIES BACnetVendorId = 505 - BACnetVendorId_QUEST_CONTROLS BACnetVendorId = 506 - BACnetVendorId_MESTEK_INC BACnetVendorId = 507 - BACnetVendorId_PULSE_ENERGY BACnetVendorId = 508 - BACnetVendorId_TACHIKAWA_CORPORATION BACnetVendorId = 509 - BACnetVendorId_UNIVERSITYOF_NEBRASKA_LINCOLN BACnetVendorId = 510 - BACnetVendorId_REDWOOD_SYSTEMS BACnetVendorId = 511 - BACnetVendorId_PAS_STEC_INDUSTRIE_ELEKTRONIK_GMBH BACnetVendorId = 512 - BACnetVendorId_NGEK_INC BACnetVendorId = 513 - BACnetVendorId_TMAC_TECHNOLOGIES BACnetVendorId = 514 - BACnetVendorId_JIREH_ENERGY_TECH_CO_LTD BACnetVendorId = 515 - BACnetVendorId_ENLIGHTED_INC BACnetVendorId = 516 - BACnetVendorId_EL_PIAST_SP_ZOO BACnetVendorId = 517 - BACnetVendorId_NETX_AUTOMATION_SOFTWARE_GMBH BACnetVendorId = 518 - BACnetVendorId_INVERTEK_DRIVES BACnetVendorId = 519 - BACnetVendorId_DEUTSCHMANN_AUTOMATION_GMBH_COKG BACnetVendorId = 520 - BACnetVendorId_EMU_ELECTRONICAG BACnetVendorId = 521 - BACnetVendorId_PHAEDRUS_LIMITED BACnetVendorId = 522 - BACnetVendorId_SIGMATEK_GMBH_COKG BACnetVendorId = 523 - BACnetVendorId_MARLIN_CONTROLS BACnetVendorId = 524 - BACnetVendorId_CIRCUTORSA BACnetVendorId = 525 - BACnetVendorId_UTC_FIRE_SECURITY BACnetVendorId = 526 - BACnetVendorId_DENT_INSTRUMENTS_INC BACnetVendorId = 527 - BACnetVendorId_FHP_MANUFACTURING_COMPANY_BOSCH_GROUP BACnetVendorId = 528 - BACnetVendorId_GE_INTELLIGENT_PLATFORMS BACnetVendorId = 529 - BACnetVendorId_INNER_RANGE_PTY_LTD BACnetVendorId = 530 - BACnetVendorId_GLAS_ENERGY_TECHNOLOGY BACnetVendorId = 531 - BACnetVendorId_MSR_ELECTRONIC_GMBH BACnetVendorId = 532 - BACnetVendorId_ENERGY_CONTROL_SYSTEMS_INC BACnetVendorId = 533 - BACnetVendorId_EMT_CONTROLS BACnetVendorId = 534 - BACnetVendorId_DAINTREE BACnetVendorId = 535 - BACnetVendorId_EUROIC_CDOO BACnetVendorId = 536 - BACnetVendorId_TE_CONNECTIVITY_ENERGY BACnetVendorId = 537 - BACnetVendorId_GEZE_GMBH BACnetVendorId = 538 - BACnetVendorId_NEC_CORPORATION BACnetVendorId = 539 - BACnetVendorId_HO_CHEUNG_INTERNATIONAL_COMPANY_LIMITED BACnetVendorId = 540 - BACnetVendorId_SHARP_MANUFACTURING_SYSTEMS_CORPORATION BACnetVendorId = 541 - BACnetVendorId_DOTCONTROL_SAS BACnetVendorId = 542 - BACnetVendorId_BEACON_MEDS BACnetVendorId = 543 - BACnetVendorId_MIDEA_COMMERCIAL_AIRCON BACnetVendorId = 544 - BACnetVendorId_WATT_MASTER_CONTROLS BACnetVendorId = 545 - BACnetVendorId_KAMSTRUPAS BACnetVendorId = 546 - BACnetVendorId_CA_COMPUTER_AUTOMATION_GMBH BACnetVendorId = 547 - BACnetVendorId_LAARS_HEATING_SYSTEMS_COMPANY BACnetVendorId = 548 - BACnetVendorId_HITACHI_SYSTEMS_LTD BACnetVendorId = 549 - BACnetVendorId_FUSHANAKE_ELECTRONIC_ENGINEERING_CO_LTD BACnetVendorId = 550 - BACnetVendorId_TOSHIBA_INTERNATIONAL_CORPORATION BACnetVendorId = 551 - BACnetVendorId_STARMAN_SYSTEMSLLC BACnetVendorId = 552 - BACnetVendorId_SAMSUNG_TECHWIN_CO_LTD BACnetVendorId = 553 - BACnetVendorId_ISAS_INTEGRATED_SWITCHGEARAND_SYSTEMSPL BACnetVendorId = 554 - BACnetVendorId_OBVIUS BACnetVendorId = 556 - BACnetVendorId_MAREK_GUZIK BACnetVendorId = 557 - BACnetVendorId_VORTEK_INSTRUMENTSLLC BACnetVendorId = 558 - BACnetVendorId_UNIVERSAL_LIGHTING_TECHNOLOGIES BACnetVendorId = 559 - BACnetVendorId_MYERS_POWER_PRODUCTS_INC BACnetVendorId = 560 - BACnetVendorId_VECTOR_CONTROLS_GMBH BACnetVendorId = 561 - BACnetVendorId_CRESTRON_ELECTRONICS_INC BACnetVendorId = 562 - BACnetVendorId_AE_CONTROLS_LIMITED BACnetVendorId = 563 - BACnetVendorId_PROJEKTOMONTAZAAD BACnetVendorId = 564 - BACnetVendorId_FREEAIRE_REFRIGERATION BACnetVendorId = 565 - BACnetVendorId_AQUA_COOLER_PTY_LIMITED BACnetVendorId = 566 - BACnetVendorId_BASIC_CONTROLS BACnetVendorId = 567 - BACnetVendorId_GE_MEASUREMENTAND_CONTROL_SOLUTIONS_ADVANCED_SENSORS BACnetVendorId = 568 - BACnetVendorId_EQUAL_NETWORKS BACnetVendorId = 569 - BACnetVendorId_MILLENNIAL_NET BACnetVendorId = 570 - BACnetVendorId_APLI_LTD BACnetVendorId = 571 - BACnetVendorId_ELECTRO_INDUSTRIES_GAUGE_TECH BACnetVendorId = 572 - BACnetVendorId_SANG_MYUNG_UNIVERSITY BACnetVendorId = 573 - BACnetVendorId_COPPERTREE_ANALYTICS_INC BACnetVendorId = 574 - BACnetVendorId_CORE_NETIX_GMBH BACnetVendorId = 575 - BACnetVendorId_ACUTHERM BACnetVendorId = 576 - BACnetVendorId_DR_RIEDEL_AUTOMATISIERUNGSTECHNIK_GMBH BACnetVendorId = 577 - BACnetVendorId_SHINA_SYSTEM_CO_LTD BACnetVendorId = 578 - BACnetVendorId_IQAPERTUS BACnetVendorId = 579 - BACnetVendorId_PSE_TECHNOLOGY BACnetVendorId = 580 - BACnetVendorId_BA_SYSTEMS BACnetVendorId = 581 - BACnetVendorId_BTICINO BACnetVendorId = 582 - BACnetVendorId_MONICO_INC BACnetVendorId = 583 - BACnetVendorId_I_CUE BACnetVendorId = 584 - BACnetVendorId_TEKMAR_CONTROL_SYSTEMS_LTD BACnetVendorId = 585 - BACnetVendorId_CONTROL_TECHNOLOGY_CORPORATION BACnetVendorId = 586 - BACnetVendorId_GFAE_GMBH BACnetVendorId = 587 - BACnetVendorId_BE_KA_SOFTWARE_GMBH BACnetVendorId = 588 - BACnetVendorId_ISOIL_INDUSTRIA_SPA BACnetVendorId = 589 - BACnetVendorId_HOME_SYSTEMS_CONSULTING_SPA BACnetVendorId = 590 - BACnetVendorId_SOCOMEC BACnetVendorId = 591 - BACnetVendorId_EVEREX_COMMUNICATIONS_INC BACnetVendorId = 592 - BACnetVendorId_CEIEC_ELECTRIC_TECHNOLOGY BACnetVendorId = 593 - BACnetVendorId_ATRILA_GMBH BACnetVendorId = 594 - BACnetVendorId_WING_TECHS BACnetVendorId = 595 - BACnetVendorId_SHENZHEN_MEK_INTELLISYS_PTE_LTD BACnetVendorId = 596 - BACnetVendorId_NESTFIELD_CO_LTD BACnetVendorId = 597 - BACnetVendorId_SWISSPHONE_TELECOMAG BACnetVendorId = 598 - BACnetVendorId_PNTECHJSC BACnetVendorId = 599 - BACnetVendorId_HORNERAPGLLC BACnetVendorId = 600 - BACnetVendorId_PVI_INDUSTRIESLLC BACnetVendorId = 601 - BACnetVendorId_ELACOMPIL BACnetVendorId = 602 - BACnetVendorId_PEGASUS_AUTOMATION_INTERNATIONALLLC BACnetVendorId = 603 - BACnetVendorId_WIGHT_ELECTRONIC_SERVICES_LTD BACnetVendorId = 604 - BACnetVendorId_MARCOM BACnetVendorId = 605 - BACnetVendorId_EXHAUSTOAS BACnetVendorId = 606 - BACnetVendorId_DWYER_INSTRUMENTS_INC BACnetVendorId = 607 - BACnetVendorId_LINK_GMBH BACnetVendorId = 608 - BACnetVendorId_OPPERMANN_REGELGERATE_GMBH BACnetVendorId = 609 - BACnetVendorId_NU_AIRE_INC BACnetVendorId = 610 - BACnetVendorId_NORTEC_HUMIDITY_INC BACnetVendorId = 611 - BACnetVendorId_BIGWOOD_SYSTEMS_INC BACnetVendorId = 612 - BACnetVendorId_ENBALA_POWER_NETWORKS BACnetVendorId = 613 - BACnetVendorId_INTER_ENERGY_CO_LTD BACnetVendorId = 614 - BACnetVendorId_ETC BACnetVendorId = 615 - BACnetVendorId_COMELECSARL BACnetVendorId = 616 - BACnetVendorId_PYTHIA_TECHNOLOGIES BACnetVendorId = 617 - BACnetVendorId_TREND_POINT_SYSTEMS_INC BACnetVendorId = 618 - BACnetVendorId_AWEX BACnetVendorId = 619 - BACnetVendorId_EUREVIA BACnetVendorId = 620 - BACnetVendorId_KONGSBERGELONAS BACnetVendorId = 621 - BACnetVendorId_FLAKT_WOODS BACnetVendorId = 622 - BACnetVendorId_EE_ELEKTRONIKGESMBH BACnetVendorId = 623 - BACnetVendorId_ARC_INFORMATIQUE BACnetVendorId = 624 - BACnetVendorId_SKIDATAAG BACnetVendorId = 625 - BACnetVendorId_WSW_SOLUTIONS BACnetVendorId = 626 - BACnetVendorId_TREFON_ELECTRONIC_GMBH BACnetVendorId = 627 - BACnetVendorId_DONGSEO_SYSTEM BACnetVendorId = 628 - BACnetVendorId_KANONTEC_INTELLIGENCE_TECHNOLOGY_CO_LTD BACnetVendorId = 629 - BACnetVendorId_EVCO_SPA BACnetVendorId = 630 - BACnetVendorId_ACCUENERGY_CANADA_INC BACnetVendorId = 631 - BACnetVendorId_SOFTDEL BACnetVendorId = 632 - BACnetVendorId_ORION_ENERGY_SYSTEMS_INC BACnetVendorId = 633 - BACnetVendorId_ROBOTICSWARE BACnetVendorId = 634 - BACnetVendorId_DOMIQ_SPZOO BACnetVendorId = 635 - BACnetVendorId_SOLIDYNE BACnetVendorId = 636 - BACnetVendorId_ELECSYS_CORPORATION BACnetVendorId = 637 - BACnetVendorId_CONDITIONAIRE_INTERNATIONAL_PTY_LIMITED BACnetVendorId = 638 - BACnetVendorId_QUEBEC_INC BACnetVendorId = 639 - BACnetVendorId_HOMERUN_HOLDINGS BACnetVendorId = 640 - BACnetVendorId_MURATA_AMERICAS BACnetVendorId = 641 - BACnetVendorId_COMPTEK BACnetVendorId = 642 - BACnetVendorId_WESTCO_SYSTEMS_INC BACnetVendorId = 643 - BACnetVendorId_ADVANCIS_SOFTWARE_SERVICES_GMBH BACnetVendorId = 644 - BACnetVendorId_INTERGRIDLLC BACnetVendorId = 645 - BACnetVendorId_MARKERR_CONTROLS_INC BACnetVendorId = 646 - BACnetVendorId_TOSHIBA_ELEVATORAND_BUILDING_SYSTEMS_CORPORATION BACnetVendorId = 647 - BACnetVendorId_SPECTRUM_CONTROLS_INC BACnetVendorId = 648 - BACnetVendorId_MKSERVICE BACnetVendorId = 649 - BACnetVendorId_FOX_THERMAL_INSTRUMENTS BACnetVendorId = 650 - BACnetVendorId_SYXTH_SENSE_LTD BACnetVendorId = 651 - BACnetVendorId_DUHA_SYSTEMSRO BACnetVendorId = 652 - BACnetVendorId_NIBE BACnetVendorId = 653 - BACnetVendorId_MELINK_CORPORATION BACnetVendorId = 654 - BACnetVendorId_FRITZ_HABER_INSTITUT BACnetVendorId = 655 - BACnetVendorId_MTU_ONSITE_ENERGY_GMBH_GAS_POWER_SYSTEMS BACnetVendorId = 656 - BACnetVendorId_OMEGA_ENGINEERING_INC BACnetVendorId = 657 - BACnetVendorId_AVELON BACnetVendorId = 658 - BACnetVendorId_YWIRE_TECHNOLOGIES_INC BACnetVendorId = 659 - BACnetVendorId_MR_ENGINEERING_CO_LTD BACnetVendorId = 660 - BACnetVendorId_LOCHINVARLLC BACnetVendorId = 661 - BACnetVendorId_SONTAY_LIMITED BACnetVendorId = 662 - BACnetVendorId_GRUPA_SLAWOMIR_CHELMINSKI BACnetVendorId = 663 - BACnetVendorId_ARCH_METER_CORPORATION BACnetVendorId = 664 - BACnetVendorId_SENVA_INC BACnetVendorId = 665 - BACnetVendorId_FM_TEC BACnetVendorId = 667 - BACnetVendorId_SYSTEMS_SPECIALISTS_INC BACnetVendorId = 668 - BACnetVendorId_SENSE_AIR BACnetVendorId = 669 - BACnetVendorId_AB_INDUSTRIE_TECHNIK_SRL BACnetVendorId = 670 - BACnetVendorId_CORTLAND_RESEARCHLLC BACnetVendorId = 671 - BACnetVendorId_MEDIA_VIEW BACnetVendorId = 672 - BACnetVendorId_VDA_ELETTRONICA BACnetVendorId = 673 - BACnetVendorId_CSS_INC BACnetVendorId = 674 - BACnetVendorId_TEK_AIR_SYSTEMS_INC BACnetVendorId = 675 - BACnetVendorId_ICDT BACnetVendorId = 676 - BACnetVendorId_THE_ARMSTRONG_MONITORING_CORPORATION BACnetVendorId = 677 - BACnetVendorId_DIXELL_SRL BACnetVendorId = 678 - BACnetVendorId_LEAD_SYSTEM_INC BACnetVendorId = 679 - BACnetVendorId_ISM_EURO_CENTERSA BACnetVendorId = 680 - BACnetVendorId_TDIS BACnetVendorId = 681 - BACnetVendorId_TRADEFIDES BACnetVendorId = 682 - BACnetVendorId_KNRR_GMBH_EMERSON_NETWORK_POWER BACnetVendorId = 683 - BACnetVendorId_RESOURCE_DATA_MANAGEMENT BACnetVendorId = 684 - BACnetVendorId_ABIES_TECHNOLOGY_INC BACnetVendorId = 685 - BACnetVendorId_UAB_KOMFOVENT BACnetVendorId = 686 - BACnetVendorId_MIRAE_ELECTRICAL_MFG_CO_LTD BACnetVendorId = 687 - BACnetVendorId_HUNTER_DOUGLAS_ARCHITECTURAL_PROJECTS_SCANDINAVIA_APS BACnetVendorId = 688 - BACnetVendorId_RUNPAQ_GROUP_CO_LTD BACnetVendorId = 689 - BACnetVendorId_UNICARDSA BACnetVendorId = 690 - BACnetVendorId_IE_TECHNOLOGIES BACnetVendorId = 691 - BACnetVendorId_RUSKIN_MANUFACTURING BACnetVendorId = 692 - BACnetVendorId_CALON_ASSOCIATES_LIMITED BACnetVendorId = 693 - BACnetVendorId_CONTEC_CO_LTD BACnetVendorId = 694 - BACnetVendorId_IT_GMBH BACnetVendorId = 695 - BACnetVendorId_AUTANI_CORPORATION BACnetVendorId = 696 - BACnetVendorId_CHRISTIAN_FORTIN BACnetVendorId = 697 - BACnetVendorId_HDL BACnetVendorId = 698 - BACnetVendorId_IPID_SPZOO_LIMITED BACnetVendorId = 699 - BACnetVendorId_FUJI_ELECTRIC_CO_LTD BACnetVendorId = 700 - BACnetVendorId_VIEW_INC BACnetVendorId = 701 - BACnetVendorId_SAMSUNGS1_CORPORATION BACnetVendorId = 702 - BACnetVendorId_NEW_LIFT BACnetVendorId = 703 - BACnetVendorId_VRT_SYSTEMS BACnetVendorId = 704 - BACnetVendorId_MOTION_CONTROL_ENGINEERING_INC BACnetVendorId = 705 - BACnetVendorId_WEISS_KLIMATECHNIK_GMBH BACnetVendorId = 706 - BACnetVendorId_ELKON BACnetVendorId = 707 - BACnetVendorId_ELIWELL_CONTROLS_SRL BACnetVendorId = 708 - BACnetVendorId_JAPAN_COMPUTER_TECHNOS_CORP BACnetVendorId = 709 - BACnetVendorId_RATIONAL_NETWORKEHF BACnetVendorId = 710 - BACnetVendorId_MAGNUM_ENERGY_SOLUTIONSLLC BACnetVendorId = 711 - BACnetVendorId_MEL_ROK BACnetVendorId = 712 - BACnetVendorId_VAE_GROUP BACnetVendorId = 713 - BACnetVendorId_LGCNS BACnetVendorId = 714 - BACnetVendorId_BERGHOF_AUTOMATIONSTECHNIK_GMBH BACnetVendorId = 715 - BACnetVendorId_QUARK_COMMUNICATIONS_INC BACnetVendorId = 716 - BACnetVendorId_SONTEX BACnetVendorId = 717 - BACnetVendorId_MIVUNEAG BACnetVendorId = 718 - BACnetVendorId_PANDUIT BACnetVendorId = 719 - BACnetVendorId_SMART_CONTROLSLLC BACnetVendorId = 720 - BACnetVendorId_COMPU_AIRE_INC BACnetVendorId = 721 - BACnetVendorId_SIERRA BACnetVendorId = 722 - BACnetVendorId_PROTO_SENSE_TECHNOLOGIES BACnetVendorId = 723 - BACnetVendorId_ELTRAC_TECHNOLOGIES_PVT_LTD BACnetVendorId = 724 - BACnetVendorId_BEKTAS_INVISIBLE_CONTROLS_GMBH BACnetVendorId = 725 - BACnetVendorId_ENTELEC BACnetVendorId = 726 - BACnetVendorId_INNEXIV BACnetVendorId = 727 - BACnetVendorId_COVENANT BACnetVendorId = 728 - BACnetVendorId_DAVITORAB BACnetVendorId = 729 - BACnetVendorId_TONG_FANG_TECHNOVATOR BACnetVendorId = 730 - BACnetVendorId_BUILDING_ROBOTICS_INC BACnetVendorId = 731 - BACnetVendorId_HSSMSRUG BACnetVendorId = 732 - BACnetVendorId_FRAM_TACKLLC BACnetVendorId = 733 - BACnetVendorId_BL_ACOUSTICS_LTD BACnetVendorId = 734 - BACnetVendorId_TRAXXON_ROCK_DRILLS_LTD BACnetVendorId = 735 - BACnetVendorId_FRANKE BACnetVendorId = 736 - BACnetVendorId_WURM_GMBH_CO BACnetVendorId = 737 - BACnetVendorId_ADDENERGIE BACnetVendorId = 738 - BACnetVendorId_MIRLE_AUTOMATION_CORPORATION BACnetVendorId = 739 - BACnetVendorId_IBIS_NETWORKS BACnetVendorId = 740 - BACnetVendorId_IDKART_ASRO BACnetVendorId = 741 - BACnetVendorId_ANAREN_INC BACnetVendorId = 742 - BACnetVendorId_SPAN_INCORPORATED BACnetVendorId = 743 - BACnetVendorId_BOSCH_THERMOTECHNOLOGY_CORP BACnetVendorId = 744 - BACnetVendorId_DRC_TECHNOLOGYSA BACnetVendorId = 745 - BACnetVendorId_SHANGHAI_ENERGY_BUILDING_TECHNOLOGY_CO_LTD BACnetVendorId = 746 - BACnetVendorId_FRAPORTAG BACnetVendorId = 747 - BACnetVendorId_FLOWGROUP BACnetVendorId = 748 - BACnetVendorId_SKYTRON_ENERGY_GMBH BACnetVendorId = 749 - BACnetVendorId_ALTEL_WICHA_GOLDA_SPJ BACnetVendorId = 750 - BACnetVendorId_DRUPAL BACnetVendorId = 751 - BACnetVendorId_AXIOMATIC_TECHNOLOGY_LTD BACnetVendorId = 752 - BACnetVendorId_BOHNKE_PARTNER BACnetVendorId = 753 - BACnetVendorId_FUNCTION1 BACnetVendorId = 754 - BACnetVendorId_OPTERGY_PTY_LTD BACnetVendorId = 755 - BACnetVendorId_LSI_VIRTICUS BACnetVendorId = 756 - BACnetVendorId_KONZEPTPARK_GMBH BACnetVendorId = 757 - BACnetVendorId_NX_LIGHTING_CONTROLS BACnetVendorId = 758 - BACnetVendorId_E_CURV_INC BACnetVendorId = 759 - BACnetVendorId_AGNOSYS_GMBH BACnetVendorId = 760 - BACnetVendorId_SHANGHAI_SUNFULL_AUTOMATION_COLTD BACnetVendorId = 761 - BACnetVendorId_KURZ_INSTRUMENTS_INC BACnetVendorId = 762 - BACnetVendorId_CIAS_ELETTRONICA_SRL BACnetVendorId = 763 - BACnetVendorId_MULTIAQUA_INC BACnetVendorId = 764 - BACnetVendorId_BLUE_BOX BACnetVendorId = 765 - BACnetVendorId_SENSIDYNE BACnetVendorId = 766 - BACnetVendorId_VIESSMANN_ELEKTRONIK_GMBH BACnetVendorId = 767 - BACnetVendorId_AD_FWEBCOMSRL BACnetVendorId = 768 - BACnetVendorId_GAYLORD_INDUSTRIES BACnetVendorId = 769 - BACnetVendorId_MAJUR_LTD BACnetVendorId = 770 - BACnetVendorId_SHANGHAI_HUILIN_TECHNOLOGY_CO_LTD BACnetVendorId = 771 - BACnetVendorId_EXOTRONIC BACnetVendorId = 772 - BACnetVendorId_SAFECONTRO_LSRO BACnetVendorId = 773 - BACnetVendorId_AMATIS BACnetVendorId = 774 - BACnetVendorId_UNIVERSAL_ELECTRIC_CORPORATION BACnetVendorId = 775 - BACnetVendorId_IBA_CNET BACnetVendorId = 776 - BACnetVendorId_SMARTRISE_ENGINEERING_INC BACnetVendorId = 778 - BACnetVendorId_MIRATRON_INC BACnetVendorId = 779 - BACnetVendorId_SMART_EDGE BACnetVendorId = 780 - BACnetVendorId_MITSUBISHI_ELECTRIC_AUSTRALIA_PTY_LTD BACnetVendorId = 781 - BACnetVendorId_TRIANGLE_RESEARCH_INTERNATIONAL_PTD_LTD BACnetVendorId = 782 - BACnetVendorId_PRODUAL_OY BACnetVendorId = 783 - BACnetVendorId_MILESTONE_SYSTEMSAS BACnetVendorId = 784 - BACnetVendorId_TRUSTBRIDGE BACnetVendorId = 785 - BACnetVendorId_FEEDBACK_SOLUTIONS BACnetVendorId = 786 - BACnetVendorId_IES BACnetVendorId = 787 - BACnetVendorId_ABB_POWER_PROTECTIONSA BACnetVendorId = 788 - BACnetVendorId_RIPTIDEIO BACnetVendorId = 789 - BACnetVendorId_MESSERSCHMITT_SYSTEMSAG BACnetVendorId = 790 - BACnetVendorId_DEZEM_ENERGY_CONTROLLING BACnetVendorId = 791 - BACnetVendorId_MECHO_SYSTEMS BACnetVendorId = 792 - BACnetVendorId_EVON_GMBH BACnetVendorId = 793 - BACnetVendorId_CS_LAB_GMBH BACnetVendorId = 794 - BACnetVendorId_N_0_ENTERPRISES_INC BACnetVendorId = 795 - BACnetVendorId_TOUCHE_CONTROLS BACnetVendorId = 796 - BACnetVendorId_ONTROL_TEKNIK_MALZEME_SANVE_TICAS BACnetVendorId = 797 - BACnetVendorId_UNI_CONTROL_SYSTEM_SP_ZOO BACnetVendorId = 798 - BACnetVendorId_WEIHAI_PLOUMETER_CO_LTD BACnetVendorId = 799 - BACnetVendorId_ELCOM_INTERNATIONAL_PVT_LTD BACnetVendorId = 800 - BACnetVendorId_SIGNIFY BACnetVendorId = 801 - BACnetVendorId_AUTOMATION_DIRECT BACnetVendorId = 802 - BACnetVendorId_PARAGON_ROBOTICS BACnetVendorId = 803 - BACnetVendorId_SMT_SYSTEM_MODULES_TECHNOLOGYAG BACnetVendorId = 804 - BACnetVendorId_RADIX_IOTLLC BACnetVendorId = 805 - BACnetVendorId_CMR_CONTROLS_LTD BACnetVendorId = 806 - BACnetVendorId_INNOVARI_INC BACnetVendorId = 807 - BACnetVendorId_ABB_CONTROL_PRODUCTS BACnetVendorId = 808 - BACnetVendorId_GESELLSCHAFTFUR_GEBUDEAUTOMATIONMBH BACnetVendorId = 809 - BACnetVendorId_RODI_SYSTEMS_CORP BACnetVendorId = 810 - BACnetVendorId_NEXTEK_POWER_SYSTEMS BACnetVendorId = 811 - BACnetVendorId_CREATIVE_LIGHTING BACnetVendorId = 812 - BACnetVendorId_WATER_FURNACE_INTERNATIONAL BACnetVendorId = 813 - BACnetVendorId_MERCURY_SECURITY BACnetVendorId = 814 - BACnetVendorId_HISENSE_SHANDONG_AIR_CONDITIONING_CO_LTD BACnetVendorId = 815 - BACnetVendorId_LAYERED_SOLUTIONS_INC BACnetVendorId = 816 - BACnetVendorId_LEEGOOD_AUTOMATIC_SYSTEM_INC BACnetVendorId = 817 - BACnetVendorId_SHANGHAI_RESTAR_TECHNOLOGY_CO_LTD BACnetVendorId = 818 - BACnetVendorId_REIMANN_INGENIEURBRO BACnetVendorId = 819 - BACnetVendorId_LYN_TEC BACnetVendorId = 820 - BACnetVendorId_HTP BACnetVendorId = 821 - BACnetVendorId_ELKOR_TECHNOLOGIES_INC BACnetVendorId = 822 - BACnetVendorId_BENTROL_PTY_LTD BACnetVendorId = 823 - BACnetVendorId_TEAM_CONTROL_OY BACnetVendorId = 824 - BACnetVendorId_NEXT_DEVICELLC BACnetVendorId = 825 - BACnetVendorId_ISMACONTROLLI_SPA BACnetVendorId = 826 - BACnetVendorId_KINGI_ELECTRONICS_CO_LTD BACnetVendorId = 827 - BACnetVendorId_SAMDAV BACnetVendorId = 828 - BACnetVendorId_NEXT_GEN_INDUSTRIES_PVT_LTD BACnetVendorId = 829 - BACnetVendorId_ENTICLLC BACnetVendorId = 830 - BACnetVendorId_ETAP BACnetVendorId = 831 - BACnetVendorId_MORALLE_ELECTRONICS_LIMITED BACnetVendorId = 832 - BACnetVendorId_LEICOMAG BACnetVendorId = 833 - BACnetVendorId_WATTS_REGULATOR_COMPANY BACnetVendorId = 834 - BACnetVendorId_SC_ORBTRONICSSRL BACnetVendorId = 835 - BACnetVendorId_GAUSSAN_TECHNOLOGIES BACnetVendorId = 836 - BACnetVendorId_WE_BFACTORY_GMBH BACnetVendorId = 837 - BACnetVendorId_OCEAN_CONTROLS BACnetVendorId = 838 - BACnetVendorId_MESSANA_AIR_RAY_CONDITIONINGSRL BACnetVendorId = 839 - BACnetVendorId_HANGZHOUBATOWN_TECHNOLOGY_CO_LTD BACnetVendorId = 840 - BACnetVendorId_REASONABLE_CONTROLS BACnetVendorId = 841 - BACnetVendorId_SERVISYS_INC BACnetVendorId = 842 - BACnetVendorId_HALSTRUPWALCHER_GMBH BACnetVendorId = 843 - BACnetVendorId_SWG_AUTOMATION_FUZHOU_LIMITED BACnetVendorId = 844 - BACnetVendorId_KSB_AKTIENGESELLSCHAFT BACnetVendorId = 845 - BACnetVendorId_HYBRYD_SPZOO BACnetVendorId = 846 - BACnetVendorId_HELVATRONAG BACnetVendorId = 847 - BACnetVendorId_ODERON_SPZOO BACnetVendorId = 848 - BACnetVendorId_MIKOLAB BACnetVendorId = 849 - BACnetVendorId_EXODRAFT BACnetVendorId = 850 - BACnetVendorId_HOCHHUTH_GMBH BACnetVendorId = 851 - BACnetVendorId_INTEGRATED_SYSTEM_TECHNOLOGIES_LTD BACnetVendorId = 852 - BACnetVendorId_SHANGHAI_CELLCONS_CONTROLS_CO_LTD BACnetVendorId = 853 - BACnetVendorId_EMME_CONTROLSLLC BACnetVendorId = 854 - BACnetVendorId_FIELD_DIAGNOSTIC_SERVICES_INC BACnetVendorId = 855 - BACnetVendorId_GES_TEKNIKAS BACnetVendorId = 856 - BACnetVendorId_GLOBAL_POWER_PRODUCTS_INC BACnetVendorId = 857 - BACnetVendorId_OPTIONNV BACnetVendorId = 858 - BACnetVendorId_BV_CONTROLAG BACnetVendorId = 859 - BACnetVendorId_SIGREN_ENGINEERINGAG BACnetVendorId = 860 - BACnetVendorId_SHANGHAI_JALTONE_TECHNOLOGY_CO_LTD BACnetVendorId = 861 - BACnetVendorId_MAX_LINE_SOLUTIONS_LTD BACnetVendorId = 862 - BACnetVendorId_KRON_INSTRUMENTOS_ELTRICOS_LTDA BACnetVendorId = 863 - BACnetVendorId_THERMO_MATRIX BACnetVendorId = 864 - BACnetVendorId_INFINITE_AUTOMATION_SYSTEMS_INC BACnetVendorId = 865 - BACnetVendorId_VANTAGE BACnetVendorId = 866 - BACnetVendorId_ELECON_MEASUREMENTS_PVT_LTD BACnetVendorId = 867 - BACnetVendorId_TBA BACnetVendorId = 868 - BACnetVendorId_CARNES_COMPANY BACnetVendorId = 869 - BACnetVendorId_HARMAN_PROFESSIONAL BACnetVendorId = 870 - BACnetVendorId_NENUTEC_ASIA_PACIFIC_PTE_LTD BACnetVendorId = 871 - BACnetVendorId_GIANV BACnetVendorId = 872 - BACnetVendorId_KEPWARE_TEHNOLOGIES BACnetVendorId = 873 - BACnetVendorId_TEMPERATURE_ELECTRONICS_LTD BACnetVendorId = 874 - BACnetVendorId_PACKET_POWER BACnetVendorId = 875 - BACnetVendorId_PROJECT_HAYSTACK_CORPORATION BACnetVendorId = 876 - BACnetVendorId_DEOS_CONTROLS_AMERICAS_INC BACnetVendorId = 877 - BACnetVendorId_SENSEWARE_INC BACnetVendorId = 878 - BACnetVendorId_MST_SYSTEMTECHNIKAG BACnetVendorId = 879 - BACnetVendorId_LONIX_LTD BACnetVendorId = 880 - BACnetVendorId_GOSSEN_METRAWATT_GMBH BACnetVendorId = 881 - BACnetVendorId_AVIOSYS_INTERNATIONAL_INC BACnetVendorId = 882 - BACnetVendorId_EFFICIENT_BUILDING_AUTOMATION_CORP BACnetVendorId = 883 - BACnetVendorId_ACCUTRON_INSTRUMENTS_INC BACnetVendorId = 884 - BACnetVendorId_VERMONT_ENERGY_CONTROL_SYSTEMSLLC BACnetVendorId = 885 - BACnetVendorId_DCC_DYNAMICS BACnetVendorId = 886 - BACnetVendorId_BEG_BRCK_ELECTRONIC_GMBH BACnetVendorId = 887 - BACnetVendorId_NGBS_HUNGARY_LTD BACnetVendorId = 889 - BACnetVendorId_ILLUM_TECHNOLOGYLLC BACnetVendorId = 890 - BACnetVendorId_DELTA_CONTROLS_GERMANY_LIMITED BACnetVendorId = 891 - BACnetVendorId_ST_SERVICE_TECHNIQUESA BACnetVendorId = 892 - BACnetVendorId_SIMPLE_SOFT BACnetVendorId = 893 - BACnetVendorId_ALTAIR_ENGINEERING BACnetVendorId = 894 - BACnetVendorId_EZEN_SOLUTION_INC BACnetVendorId = 895 - BACnetVendorId_FUJITEC_CO_LTD BACnetVendorId = 896 - BACnetVendorId_TERRALUX BACnetVendorId = 897 - BACnetVendorId_ANNICOM BACnetVendorId = 898 - BACnetVendorId_BIHL_WIEDEMANN_GMBH BACnetVendorId = 899 - BACnetVendorId_DRAPER_INC BACnetVendorId = 900 - BACnetVendorId_SCHCO_INTERNATIONALKG BACnetVendorId = 901 - BACnetVendorId_OTIS_ELEVATOR_COMPANY BACnetVendorId = 902 - BACnetVendorId_FIDELIX_OY BACnetVendorId = 903 - BACnetVendorId_RAM_GMBH_MESSUND_REGELTECHNIK BACnetVendorId = 904 - BACnetVendorId_WEMS BACnetVendorId = 905 - BACnetVendorId_RAVEL_ELECTRONICS_PVT_LTD BACnetVendorId = 906 - BACnetVendorId_OMNI_MAGNI BACnetVendorId = 907 - BACnetVendorId_ECHELON BACnetVendorId = 908 - BACnetVendorId_INTELLIMETER_CANADA_INC BACnetVendorId = 909 - BACnetVendorId_BITHOUSE_OY BACnetVendorId = 910 - BACnetVendorId_BUILD_PULSE BACnetVendorId = 912 - BACnetVendorId_SHENZHEN1000_BUILDING_AUTOMATION_CO_LTD BACnetVendorId = 913 - BACnetVendorId_AED_ENGINEERING_GMBH BACnetVendorId = 914 - BACnetVendorId_GNTNER_GMBH_COKG BACnetVendorId = 915 - BACnetVendorId_KN_XLOGIC BACnetVendorId = 916 - BACnetVendorId_CIM_ENVIRONMENTAL_GROUP BACnetVendorId = 917 - BACnetVendorId_FLOW_CONTROL BACnetVendorId = 918 - BACnetVendorId_LUMEN_CACHE_INC BACnetVendorId = 919 - BACnetVendorId_ECOSYSTEM BACnetVendorId = 920 - BACnetVendorId_POTTER_ELECTRIC_SIGNAL_COMPANYLLC BACnetVendorId = 921 - BACnetVendorId_TYCO_FIRE_SECURITY_SPA BACnetVendorId = 922 - BACnetVendorId_WATANABE_ELECTRIC_INDUSTRY_CO_LTD BACnetVendorId = 923 - BACnetVendorId_CAUSAM_ENERGY BACnetVendorId = 924 - BACnetVendorId_WTECAG BACnetVendorId = 925 - BACnetVendorId_IMI_HYDRONIC_ENGINEERING_INTERNATIONALSA BACnetVendorId = 926 - BACnetVendorId_ARIGO_SOFTWARE BACnetVendorId = 927 - BACnetVendorId_MSA_SAFETY1 BACnetVendorId = 928 - BACnetVendorId_SMART_SOLUCOES_LTDAMERCATO BACnetVendorId = 929 - BACnetVendorId_PIATRA_ENGINEERING BACnetVendorId = 930 - BACnetVendorId_ODIN_AUTOMATION_SYSTEMSLLC BACnetVendorId = 931 - BACnetVendorId_BELPARTSNV BACnetVendorId = 932 - BACnetVendorId_UABSALDA BACnetVendorId = 933 - BACnetVendorId_ALREIT_REGELTECHNIK_GMBH BACnetVendorId = 934 - BACnetVendorId_INGENIEURBROH_LERTES_GMBH_COKG BACnetVendorId = 935 - BACnetVendorId_BREATHING_BUILDINGS BACnetVendorId = 936 - BACnetVendorId_EWONSA BACnetVendorId = 937 - BACnetVendorId_CAV_UFF_GIACOMO_CIMBERIO_SPA BACnetVendorId = 938 - BACnetVendorId_PKE_ELECTRONICSAG BACnetVendorId = 939 - BACnetVendorId_ALLEN BACnetVendorId = 940 - BACnetVendorId_KASTLE_SYSTEMS BACnetVendorId = 941 - BACnetVendorId_LOGICAL_ELECTRO_MECHANICALEM_SYSTEMS_INC BACnetVendorId = 942 - BACnetVendorId_PP_KINETICS_INSTRUMENTSLLC BACnetVendorId = 943 - BACnetVendorId_CATHEXIS_TECHNOLOGIES BACnetVendorId = 944 - BACnetVendorId_SYLOPSP_ZOOSPK BACnetVendorId = 945 - BACnetVendorId_BRAUNS_CONTROL_GMBH BACnetVendorId = 946 - BACnetVendorId_OMRONSOCIALSOLUTIONSCOLTD BACnetVendorId = 947 - BACnetVendorId_WILDEBOER_BAUTEILE_GMBH BACnetVendorId = 948 - BACnetVendorId_SHANGHAI_BIENS_TECHNOLOGIES_LTD BACnetVendorId = 949 - BACnetVendorId_BEIJINGHZHY_TECHNOLOGY_CO_LTD BACnetVendorId = 950 - BACnetVendorId_BUILDING_CLOUDS BACnetVendorId = 951 + BACnetVendorId_CUSTOM_MECHANICAL_EQUIPMENTLLC BACnetVendorId = 100 + BACnetVendorId_CLIMATE_MASTER BACnetVendorId = 101 + BACnetVendorId_ICP_PANEL_TEC_INC BACnetVendorId = 102 + BACnetVendorId_D_TEK_CONTROLS BACnetVendorId = 103 + BACnetVendorId_NEC_ENGINEERING_LTD BACnetVendorId = 104 + BACnetVendorId_PRIVABV BACnetVendorId = 105 + BACnetVendorId_MEIDENSHA_CORPORATION BACnetVendorId = 106 + BACnetVendorId_JCI_SYSTEMS_INTEGRATION_SERVICES BACnetVendorId = 107 + BACnetVendorId_FREEDOM_CORPORATION BACnetVendorId = 108 + BACnetVendorId_NEUBERGER_GEBUDEAUTOMATION_GMBH BACnetVendorId = 109 + BACnetVendorId_E_ZI_CONTROLS BACnetVendorId = 110 + BACnetVendorId_LEVITON_MANUFACTURING BACnetVendorId = 111 + BACnetVendorId_FUJITSU_LIMITED BACnetVendorId = 112 + BACnetVendorId_VERTIV_FORMERLY_EMERSON_NETWORK_POWER BACnetVendorId = 113 + BACnetVendorId_SA_ARMSTRONG_LTD BACnetVendorId = 114 + BACnetVendorId_VISONETAG BACnetVendorId = 115 + BACnetVendorId_MM_SYSTEMS_INC BACnetVendorId = 116 + BACnetVendorId_CUSTOM_SOFTWARE_ENGINEERING BACnetVendorId = 117 + BACnetVendorId_NITTAN_COMPANY_LIMITED BACnetVendorId = 118 + BACnetVendorId_ELUTIONS_INC_WIZCON_SYSTEMSSAS BACnetVendorId = 119 + BACnetVendorId_PACOM_SYSTEMS_PTY_LTD BACnetVendorId = 120 + BACnetVendorId_UNICO_INC BACnetVendorId = 121 + BACnetVendorId_EBTRON_INC BACnetVendorId = 122 + BACnetVendorId_SCADA_ENGINE BACnetVendorId = 123 + BACnetVendorId_LENZE_AMERICAS_FORMERLYAC_TECHNOLOGY_CORPORATION BACnetVendorId = 124 + BACnetVendorId_EAGLE_TECHNOLOGY BACnetVendorId = 125 + BACnetVendorId_DATA_AIRE_INC BACnetVendorId = 126 + BACnetVendorId_ABB_INC BACnetVendorId = 127 + BACnetVendorId_TRANSBIT_SPZOO BACnetVendorId = 128 + BACnetVendorId_TOSHIBA_CARRIER_CORPORATION BACnetVendorId = 129 + BACnetVendorId_SHENZHEN_JUNZHI_HI_TECH_CO_LTD BACnetVendorId = 130 + BACnetVendorId_TOKAI_SOFT BACnetVendorId = 131 + BACnetVendorId_BLUE_RIDGE_TECHNOLOGIES BACnetVendorId = 132 + BACnetVendorId_VERIS_INDUSTRIES BACnetVendorId = 133 + BACnetVendorId_CENTAURUS_PRIME BACnetVendorId = 134 + BACnetVendorId_SAND_NETWORK_SYSTEMS BACnetVendorId = 135 + BACnetVendorId_REGULVAR_INC BACnetVendorId = 136 + BACnetVendorId_AF_DTEK_DIVISIONOF_FASTEK_INTERNATIONAL_INC BACnetVendorId = 137 + BACnetVendorId_POWER_COLD_COMFORT_AIR_SOLUTIONS_INC BACnetVendorId = 138 + BACnetVendorId_I_CONTROLS BACnetVendorId = 139 + BACnetVendorId_VICONICS_ELECTRONICS_INC BACnetVendorId = 140 + BACnetVendorId_YASKAWA_AMERICA_INC BACnetVendorId = 141 + BACnetVendorId_DEO_SCONTROLSYSTEMS_GMBH BACnetVendorId = 142 + BACnetVendorId_DIGITALE_MESSUND_STEUERSYSTEMEAG BACnetVendorId = 143 + BACnetVendorId_FUJITSU_GENERAL_LIMITED BACnetVendorId = 144 + BACnetVendorId_PROJECT_ENGINEERING_SRL BACnetVendorId = 145 + BACnetVendorId_SANYO_ELECTRIC_CO_LTD BACnetVendorId = 146 + BACnetVendorId_INTEGRATED_INFORMATION_SYSTEMS_INC BACnetVendorId = 147 + BACnetVendorId_TEMCO_CONTROLS_LTD BACnetVendorId = 148 + BACnetVendorId_AIRTEK_INTERNATIONAL_INC BACnetVendorId = 149 + BACnetVendorId_ADVANTECH_CORPORATION BACnetVendorId = 150 + BACnetVendorId_TITAN_PRODUCTS_LTD BACnetVendorId = 151 + BACnetVendorId_REGEL_PARTNERS BACnetVendorId = 152 + BACnetVendorId_NATIONAL_ENVIRONMENTAL_PRODUCT BACnetVendorId = 153 + BACnetVendorId_UNITEC_CORPORATION BACnetVendorId = 154 + BACnetVendorId_KANDEN_ENGINEERING_COMPANY BACnetVendorId = 155 + BACnetVendorId_MESSNER_GEBUDETECHNIK_GMBH BACnetVendorId = 156 + BACnetVendorId_INTEGRATEDCH BACnetVendorId = 157 + BACnetVendorId_PRICE_INDUSTRIES BACnetVendorId = 158 + BACnetVendorId_SE_ELEKTRONIC_GMBH BACnetVendorId = 159 + BACnetVendorId_ROCKWELL_AUTOMATION BACnetVendorId = 160 + BACnetVendorId_ENFLEX_CORP BACnetVendorId = 161 + BACnetVendorId_ASI_CONTROLS BACnetVendorId = 162 + BACnetVendorId_SYS_MIK_GMBH_DRESDEN BACnetVendorId = 163 + BACnetVendorId_HSC_REGELUNGSTECHNIK_GMBH BACnetVendorId = 164 + BACnetVendorId_SMART_TEMP_AUSTRALIA_PTY_LTD BACnetVendorId = 165 + BACnetVendorId_COOPER_CONTROLS BACnetVendorId = 166 + BACnetVendorId_DUKSAN_MECASYS_CO_LTD BACnetVendorId = 167 + BACnetVendorId_FUJIIT_CO_LTD BACnetVendorId = 168 + BACnetVendorId_VACON_PLC BACnetVendorId = 169 + BACnetVendorId_LEADER_CONTROLS BACnetVendorId = 170 + BACnetVendorId_ABB_FORMERLY_CYLON_CONTROLS_LTD BACnetVendorId = 171 + BACnetVendorId_COMPAS BACnetVendorId = 172 + BACnetVendorId_MITSUBISHI_ELECTRIC_BUILDING_TECHNO_SERVICE_CO_LTD BACnetVendorId = 173 + BACnetVendorId_BUILDING_CONTROL_INTEGRATORS BACnetVendorId = 174 + BACnetVendorId_ITG_WORLDWIDEM_SDN_BHD BACnetVendorId = 175 + BACnetVendorId_LUTRON_ELECTRONICS_CO_INC BACnetVendorId = 176 + BACnetVendorId_COOPER_ATKINS_CORPORATION BACnetVendorId = 177 + BACnetVendorId_LOYTEC_ELECTRONICS_GMBH BACnetVendorId = 178 + BACnetVendorId_PRO_LON BACnetVendorId = 179 + BACnetVendorId_MEGA_CONTROLS_LIMITED BACnetVendorId = 180 + BACnetVendorId_MICRO_CONTROL_SYSTEMS_INC BACnetVendorId = 181 + BACnetVendorId_KIYON_INC BACnetVendorId = 182 + BACnetVendorId_DUST_NETWORKS BACnetVendorId = 183 + BACnetVendorId_ADVANCED_BUILDING_AUTOMATION_SYSTEMS BACnetVendorId = 184 + BACnetVendorId_HERMOSAG BACnetVendorId = 185 + BACnetVendorId_CEZIM BACnetVendorId = 186 + BACnetVendorId_SOFTING BACnetVendorId = 187 + BACnetVendorId_LYNXSPRING_INC BACnetVendorId = 188 + BACnetVendorId_SCHNEIDER_TOSHIBA_INVERTER_EUROPE BACnetVendorId = 189 + BACnetVendorId_DANFOSS_DRIVESAS BACnetVendorId = 190 + BACnetVendorId_EATON_CORPORATION BACnetVendorId = 191 + BACnetVendorId_MATYCASA BACnetVendorId = 192 + BACnetVendorId_BOTECHAB BACnetVendorId = 193 + BACnetVendorId_NOVEO_INC BACnetVendorId = 194 + BACnetVendorId_AMEV BACnetVendorId = 195 + BACnetVendorId_YOKOGAWA_ELECTRIC_CORPORATION BACnetVendorId = 196 + BACnetVendorId_BOSCH_BUILDING_AUTOMATION_GMBH BACnetVendorId = 197 + BACnetVendorId_EXACT_LOGIC BACnetVendorId = 198 + BACnetVendorId_MASS_ELECTRONICS_PTY_LTDDBA_INNOTECH_CONTROL_SYSTEMS_AUSTRALIA BACnetVendorId = 199 + BACnetVendorId_KANDENKO_CO_LTD BACnetVendorId = 200 + BACnetVendorId_DTF_DATEN_TECHNIK_FRIES BACnetVendorId = 201 + BACnetVendorId_KLIMASOFT_LTD BACnetVendorId = 202 + BACnetVendorId_TOSHIBA_SCHNEIDER_INVERTER_CORPORATION BACnetVendorId = 203 + BACnetVendorId_CONTROL_APPLICATIONS_LTD BACnetVendorId = 204 + BACnetVendorId_CIMONCO_LTD BACnetVendorId = 205 + BACnetVendorId_ONICON_INCORPORATED BACnetVendorId = 206 + BACnetVendorId_AUTOMATION_DISPLAYS_INC BACnetVendorId = 207 + BACnetVendorId_CONTROL_SOLUTIONS_INC BACnetVendorId = 208 + BACnetVendorId_REMSDAQ_LIMITED BACnetVendorId = 209 + BACnetVendorId_NTT_FACILITIES_INC BACnetVendorId = 210 + BACnetVendorId_VIPA_GMBH BACnetVendorId = 211 + BACnetVendorId_TSC1_ASSOCIATIONOF_JAPAN BACnetVendorId = 212 + BACnetVendorId_STRATO_AUTOMATION BACnetVendorId = 213 + BACnetVendorId_HRW_LIMITED BACnetVendorId = 214 + BACnetVendorId_LIGHTING_CONTROL_DESIGN_INC BACnetVendorId = 215 + BACnetVendorId_MERCY_ELECTRONICAND_ELECTRICAL_INDUSTRIES BACnetVendorId = 216 + BACnetVendorId_SAMSUNGSDS_CO_LTD BACnetVendorId = 217 + BACnetVendorId_IMPACT_FACILITY_SOLUTIONS_INC BACnetVendorId = 218 + BACnetVendorId_AIRCUITY BACnetVendorId = 219 + BACnetVendorId_CONTROL_TECHNIQUES_LTD BACnetVendorId = 220 + BACnetVendorId_OPEN_GENERAL_PTY_LTD BACnetVendorId = 221 + BACnetVendorId_WAGO_KONTAKTTECHNIK_GMBH_COKG BACnetVendorId = 222 + BACnetVendorId_CERUS_INDUSTRIAL BACnetVendorId = 223 + BACnetVendorId_CHLORIDE_POWER_PROTECTION_COMPANY BACnetVendorId = 224 + BACnetVendorId_COMPUTROLS_INC BACnetVendorId = 225 + BACnetVendorId_PHOENIX_CONTACT_GMBH_COKG BACnetVendorId = 226 + BACnetVendorId_GRUNDFOS_MANAGEMENTAS BACnetVendorId = 227 + BACnetVendorId_RIDDER_DRIVE_SYSTEMS BACnetVendorId = 228 + BACnetVendorId_SOFT_DEVICESDNBHD BACnetVendorId = 229 + BACnetVendorId_INTEGRATED_CONTROL_TECHNOLOGY_LIMITED BACnetVendorId = 230 + BACnetVendorId_AI_RXPERT_SYSTEMS_INC BACnetVendorId = 231 + BACnetVendorId_MICROTROL_LIMITED BACnetVendorId = 232 + BACnetVendorId_RED_LION_CONTROLS BACnetVendorId = 233 + BACnetVendorId_DIGITAL_ELECTRONICS_CORPORATION BACnetVendorId = 234 + BACnetVendorId_ENNOVATIS_GMBH BACnetVendorId = 235 + BACnetVendorId_SEROTONIN_SOFTWARE_TECHNOLOGIES_INC BACnetVendorId = 236 + BACnetVendorId_LS_INDUSTRIAL_SYSTEMS_CO_LTD BACnetVendorId = 237 + BACnetVendorId_SQUARED_COMPANY BACnetVendorId = 238 + BACnetVendorId_S_SQUARED_INNOVATIONS_INC BACnetVendorId = 239 + BACnetVendorId_ARICENT_LTD BACnetVendorId = 240 + BACnetVendorId_ETHER_METRICSLLC BACnetVendorId = 241 + BACnetVendorId_INDUSTRIAL_CONTROL_COMMUNICATIONS_INC BACnetVendorId = 242 + BACnetVendorId_PARAGON_CONTROLS_INC BACnetVendorId = 243 + BACnetVendorId_AO_SMITH_CORPORATION BACnetVendorId = 244 + BACnetVendorId_CONTEMPORARY_CONTROL_SYSTEMS_INC BACnetVendorId = 245 + BACnetVendorId_HMS_INDUSTRIAL_NETWORKSSLU BACnetVendorId = 246 + BACnetVendorId_INGENIEURGESELLSCHAFTN_HARTLEBMBH BACnetVendorId = 247 + BACnetVendorId_HEAT_TIMER_CORPORATION BACnetVendorId = 248 + BACnetVendorId_INGRASYS_TECHNOLOGY_INC BACnetVendorId = 249 + BACnetVendorId_COSTERM_BUILDING_AUTOMATION BACnetVendorId = 250 + BACnetVendorId_WILOSE BACnetVendorId = 251 + BACnetVendorId_EMBEDIA_TECHNOLOGIES_CORP BACnetVendorId = 252 + BACnetVendorId_TECHNILOG BACnetVendorId = 253 + BACnetVendorId_HR_CONTROLS_LTD_COKG BACnetVendorId = 254 + BACnetVendorId_LENNOX_INTERNATIONAL_INC BACnetVendorId = 255 + BACnetVendorId_RK_TEC_RAUCHKLAPPEN_STEUERUNGSSYSTEME_GMBH_COKG BACnetVendorId = 256 + BACnetVendorId_THERMOMAX_LTD BACnetVendorId = 257 + BACnetVendorId_ELCON_ELECTRONIC_CONTROL_LTD BACnetVendorId = 258 + BACnetVendorId_LARMIA_CONTROLAB BACnetVendorId = 259 + BACnetVendorId_BA_CNET_STACKAT_SOURCE_FORGE BACnetVendorId = 260 + BACnetVendorId_GS_SECURITY_SERVICESAS BACnetVendorId = 261 + BACnetVendorId_EXOR_INTERNATIONAL_SPA BACnetVendorId = 262 + BACnetVendorId_CRISTAL_CONTROLES BACnetVendorId = 263 + BACnetVendorId_REGINAB BACnetVendorId = 264 + BACnetVendorId_DIMENSION_SOFTWARE_INC BACnetVendorId = 265 + BACnetVendorId_SYNAP_SENSE_CORPORATION BACnetVendorId = 266 + BACnetVendorId_BEIJING_NANTREE_ELECTRONIC_CO_LTD BACnetVendorId = 267 + BACnetVendorId_CAMUS_HYDRONICS_LTD BACnetVendorId = 268 + BACnetVendorId_KAWASAKI_HEAVY_INDUSTRIES_LTD BACnetVendorId = 269 + BACnetVendorId_CRITICAL_ENVIRONMENT_TECHNOLOGIES BACnetVendorId = 270 + BACnetVendorId_ILSHINIBS_CO_LTD BACnetVendorId = 271 + BACnetVendorId_ELESTA_ENERGY_CONTROLAG BACnetVendorId = 272 + BACnetVendorId_KROPMAN_INSTALLATIETECHNIEK BACnetVendorId = 273 + BACnetVendorId_BALDOR_ELECTRIC_COMPANY BACnetVendorId = 274 + BACnetVendorId_ING_AMBH BACnetVendorId = 275 + BACnetVendorId_GE_CONSUMER_INDUSTRIAL BACnetVendorId = 276 + BACnetVendorId_FUNCTIONAL_DEVICES_INC BACnetVendorId = 277 + BACnetVendorId_STUDIOSC BACnetVendorId = 278 + BACnetVendorId_M_SYSTEM_CO_LTD BACnetVendorId = 279 + BACnetVendorId_YOKOTA_CO_LTD BACnetVendorId = 280 + BACnetVendorId_HITRANSE_TECHNOLOGY_COLTD BACnetVendorId = 281 + BACnetVendorId_VIGILENT_CORPORATION BACnetVendorId = 282 + BACnetVendorId_KELE_INC BACnetVendorId = 283 + BACnetVendorId_OPERA_ELECTRONICS_INC BACnetVendorId = 284 + BACnetVendorId_GENTEC BACnetVendorId = 285 + BACnetVendorId_EMBEDDED_SCIENCE_LABSLLC BACnetVendorId = 286 + BACnetVendorId_PARKER_HANNIFIN_CORPORATION BACnetVendorId = 287 + BACnetVendorId_MA_CAPS_INTERNATIONAL_LIMITED BACnetVendorId = 288 + BACnetVendorId_LINK_CORPORATION BACnetVendorId = 289 + BACnetVendorId_ROMUTEC_STEUERU_REGELSYSTEME_GMBH BACnetVendorId = 290 + BACnetVendorId_PRIBUSIN_INC BACnetVendorId = 291 + BACnetVendorId_ADVANTAGE_CONTROLS BACnetVendorId = 292 + BACnetVendorId_CRITICAL_ROOM_CONTROL BACnetVendorId = 293 + BACnetVendorId_LEGRAND BACnetVendorId = 294 + BACnetVendorId_TONGDY_CONTROL_TECHNOLOGY_CO_LTD BACnetVendorId = 295 + BACnetVendorId_ISSARO_INTEGRIERTE_SYSTEMTECHNIK BACnetVendorId = 296 + BACnetVendorId_PRO_DEV_INDUSTRIES BACnetVendorId = 297 + BACnetVendorId_DRISTEEM BACnetVendorId = 298 + BACnetVendorId_CREATIVE_ELECTRONIC_GMBH BACnetVendorId = 299 + BACnetVendorId_SWEGONAB BACnetVendorId = 300 + BACnetVendorId_FIRVEN_ASRO BACnetVendorId = 301 + BACnetVendorId_HITACHI_APPLIANCES_INC BACnetVendorId = 302 + BACnetVendorId_REAL_TIME_AUTOMATION_INC BACnetVendorId = 303 + BACnetVendorId_ITEC_HANKYU_HANSHIN_CO BACnetVendorId = 304 + BACnetVendorId_CYRUSEM_ENGINEERING_CO_LTD BACnetVendorId = 305 + BACnetVendorId_BADGER_METER BACnetVendorId = 306 + BACnetVendorId_CIRRASCALE_CORPORATION BACnetVendorId = 307 + BACnetVendorId_ELESTA_GMBH_BUILDING_AUTOMATION BACnetVendorId = 308 + BACnetVendorId_SECURITON BACnetVendorId = 309 + BACnetVendorId_O_SLSOFT_INC BACnetVendorId = 310 + BACnetVendorId_HANAZEDER_ELECTRONIC_GMBH BACnetVendorId = 311 + BACnetVendorId_HONEYWELL_SECURITY_DEUTSCHLAND_NOVAR_GMBH BACnetVendorId = 312 + BACnetVendorId_SIEMENS_INDUSTRY_INC BACnetVendorId = 313 + BACnetVendorId_ETM_PROFESSIONAL_CONTROL_GMBH BACnetVendorId = 314 + BACnetVendorId_MEITAVTEC_LTD BACnetVendorId = 315 + BACnetVendorId_JANITZA_ELECTRONICS_GMBH BACnetVendorId = 316 + BACnetVendorId_MKS_NORDHAUSEN BACnetVendorId = 317 + BACnetVendorId_DE_GIER_DRIVE_SYSTEMSBV BACnetVendorId = 318 + BACnetVendorId_CYPRESS_ENVIROSYSTEMS BACnetVendorId = 319 + BACnetVendorId_SMAR_TRONSRO BACnetVendorId = 320 + BACnetVendorId_VERARI_SYSTEMS_INC BACnetVendorId = 321 + BACnetVendorId_KW_ELECTRONIC_SERVICE_INC BACnetVendorId = 322 + BACnetVendorId_ALFASMART_ENERGY_MANAGEMENT BACnetVendorId = 323 + BACnetVendorId_TELKONET_INC BACnetVendorId = 324 + BACnetVendorId_SECURITON_GMBH BACnetVendorId = 325 + BACnetVendorId_CEMTREX_INC BACnetVendorId = 326 + BACnetVendorId_PERFORMANCE_TECHNOLOGIES_INC BACnetVendorId = 327 + BACnetVendorId_XTRALIS_AUST_PTY_LTD BACnetVendorId = 328 + BACnetVendorId_TROX_GMBH BACnetVendorId = 329 + BACnetVendorId_BEIJING_HYSINE_TECHNOLOGY_CO_LTD BACnetVendorId = 330 + BACnetVendorId_RCK_CONTROLS_INC BACnetVendorId = 331 + BACnetVendorId_DISTECH_CONTROLSSAS BACnetVendorId = 332 + BACnetVendorId_NOVAR_HONEYWELL BACnetVendorId = 333 + BACnetVendorId_THES_GROUP_INC BACnetVendorId = 334 + BACnetVendorId_SCHNEIDER_ELECTRIC1 BACnetVendorId = 335 + BACnetVendorId_LHA_SYSTEMS BACnetVendorId = 336 + BACnetVendorId_GH_MENGINEERING_GROUP_INC BACnetVendorId = 337 + BACnetVendorId_CLLIMALUXSA BACnetVendorId = 338 + BACnetVendorId_VAISALA_OYJ BACnetVendorId = 339 + BACnetVendorId_COMPLEX_BEIJING_TECHNOLOGY_COLTD BACnetVendorId = 340 + BACnetVendorId_SCAD_AMETRICS BACnetVendorId = 341 + BACnetVendorId_POWERPEGNSI_LIMITED BACnetVendorId = 342 + BACnetVendorId_BA_CNET_INTEROPERABILITY_TESTING_SERVICES_INC BACnetVendorId = 343 + BACnetVendorId_TECOAS BACnetVendorId = 344 + BACnetVendorId_PLEXUS_TECHNOLOGY_INC BACnetVendorId = 345 + BACnetVendorId_ENERGY_FOCUS_INC BACnetVendorId = 346 + BACnetVendorId_POWERSMITHS_INTERNATIONAL_CORP BACnetVendorId = 347 + BACnetVendorId_NICHIBEI_CO_LTD BACnetVendorId = 348 + BACnetVendorId_HKC_TECHNOLOGY_LTD BACnetVendorId = 349 + BACnetVendorId_OVATION_NETWORKS_INC BACnetVendorId = 350 + BACnetVendorId_SETRA_SYSTEMS BACnetVendorId = 351 + BACnetVendorId_AVG_AUTOMATION BACnetVendorId = 352 + BACnetVendorId_ZXC_LTD BACnetVendorId = 353 + BACnetVendorId_BYTE_SPHERE BACnetVendorId = 354 + BACnetVendorId_GENERITON_CO_LTD BACnetVendorId = 355 + BACnetVendorId_HOLTER_REGELARMATUREN_GMBH_COKG BACnetVendorId = 356 + BACnetVendorId_BEDFORD_INSTRUMENTSLLC BACnetVendorId = 357 + BACnetVendorId_STANDAIR_INC BACnetVendorId = 358 + BACnetVendorId_WEG_AUTOMATIONRD BACnetVendorId = 359 + BACnetVendorId_PROLON_CONTROL_SYSTEMS_APS BACnetVendorId = 360 + BACnetVendorId_INNEASOFT BACnetVendorId = 361 + BACnetVendorId_CONNEX_SOFT_GMBH BACnetVendorId = 362 + BACnetVendorId_CEAG_NOTLICHTSYSTEME_GMBH BACnetVendorId = 363 + BACnetVendorId_DISTECH_CONTROLS_INC BACnetVendorId = 364 + BACnetVendorId_INDUSTRIAL_TECHNOLOGY_RESEARCH_INSTITUTE BACnetVendorId = 365 + BACnetVendorId_ICONICS_INC BACnetVendorId = 366 + BACnetVendorId_IQ_CONTROLSSC BACnetVendorId = 367 + BACnetVendorId_OJ_ELECTRONICSAS BACnetVendorId = 368 + BACnetVendorId_ROLBIT_LTD BACnetVendorId = 369 + BACnetVendorId_SYNAPSYS_SOLUTIONS_LTD BACnetVendorId = 370 + BACnetVendorId_ACME_ENGINEERING_PROD_LTD BACnetVendorId = 371 + BACnetVendorId_ZENER_ELECTRIC_PTY_LTD BACnetVendorId = 372 + BACnetVendorId_SELECTRONIX_INC BACnetVendorId = 373 + BACnetVendorId_GORBET_BANERJEELLC BACnetVendorId = 374 + BACnetVendorId_IME BACnetVendorId = 375 + BACnetVendorId_STEPHENH_DAWSON_COMPUTER_SERVICE BACnetVendorId = 376 + BACnetVendorId_ACCUTROLLLC BACnetVendorId = 377 + BACnetVendorId_SCHNEIDER_ELEKTRONIK_GMBH BACnetVendorId = 378 + BACnetVendorId_ALPHA_INNO_TEC_GMBH BACnetVendorId = 379 + BACnetVendorId_ADM_MICRO_INC BACnetVendorId = 380 + BACnetVendorId_GREYSTONE_ENERGY_SYSTEMS_INC BACnetVendorId = 381 + BACnetVendorId_CAP_TECHNOLOGIE BACnetVendorId = 382 + BACnetVendorId_KE_RO_SYSTEMS BACnetVendorId = 383 + BACnetVendorId_DOMAT_CONTROL_SYSTEMSRO BACnetVendorId = 384 + BACnetVendorId_EFEKTRONICS_PTY_LTD BACnetVendorId = 385 + BACnetVendorId_HEKATRON_VERTRIEBS_GMBH BACnetVendorId = 386 + BACnetVendorId_SECURITONAG BACnetVendorId = 387 + BACnetVendorId_CARLO_GAVAZZI_CONTROLS_SPA BACnetVendorId = 388 + BACnetVendorId_CHIPKIN_AUTOMATION_SYSTEMS BACnetVendorId = 389 + BACnetVendorId_SAVANT_SYSTEMSLLC BACnetVendorId = 390 + BACnetVendorId_SIMMTRONIC_LIGHTING_CONTROLS BACnetVendorId = 391 + BACnetVendorId_ABELKO_INNOVATIONAB BACnetVendorId = 392 + BACnetVendorId_SERESCO_TECHNOLOGIES_INC BACnetVendorId = 393 + BACnetVendorId_IT_WATCHDOGS BACnetVendorId = 394 + BACnetVendorId_AUTOMATION_ASSIST_JAPAN_CORP BACnetVendorId = 395 + BACnetVendorId_THERMOKON_SENSORTECHNIK_GMBH BACnetVendorId = 396 + BACnetVendorId_E_GAUGE_SYSTEMSLLC BACnetVendorId = 397 + BACnetVendorId_QUANTUM_AUTOMATIONASIAPTE_LTD BACnetVendorId = 398 + BACnetVendorId_TOSHIBA_LIGHTING_TECHNOLOGY_CORP BACnetVendorId = 399 + BACnetVendorId_SPIN_ENGENHARIADE_AUTOMAO_LTDA BACnetVendorId = 400 + BACnetVendorId_LOGISTICS_SYSTEMS_SOFTWARE_SERVICES_INDIAPVT_LTD BACnetVendorId = 401 + BACnetVendorId_DELTA_CONTROLS_INTEGRATION_PRODUCTS BACnetVendorId = 402 + BACnetVendorId_FOCUS_MEDIA BACnetVendorId = 403 + BACnetVendorId_LUM_ENERGI_INC BACnetVendorId = 404 + BACnetVendorId_KARA_SYSTEMS BACnetVendorId = 405 + BACnetVendorId_RF_CODE_INC BACnetVendorId = 406 + BACnetVendorId_FATEK_AUTOMATION_CORP BACnetVendorId = 407 + BACnetVendorId_JANDA_SOFTWARE_COMPANYLLC BACnetVendorId = 408 + BACnetVendorId_OPEN_SYSTEM_SOLUTIONS_LIMITED BACnetVendorId = 409 + BACnetVendorId_INTELEC_SYSTEMSPTY_LTD BACnetVendorId = 410 + BACnetVendorId_ECOLODGIXLLC BACnetVendorId = 411 + BACnetVendorId_DOUGLAS_LIGHTING_CONTROLS BACnetVendorId = 412 + BACnetVendorId_IS_ATECH_GMBH BACnetVendorId = 413 + BACnetVendorId_AREAL BACnetVendorId = 414 + BACnetVendorId_BECKHOFF_AUTOMATION BACnetVendorId = 415 + BACnetVendorId_IPAS_GMBH BACnetVendorId = 416 + BACnetVendorId_KE_THERM_SOLUTIONS BACnetVendorId = 417 + BACnetVendorId_BASE_PRODUCTS BACnetVendorId = 418 + BACnetVendorId_DTL_CONTROLSLLC BACnetVendorId = 419 + BACnetVendorId_INNCOM_INTERNATIONAL_INC BACnetVendorId = 420 + BACnetVendorId_METZCONNECT_GMBH BACnetVendorId = 421 + BACnetVendorId_GREENTROL_AUTOMATION_INC BACnetVendorId = 422 + BACnetVendorId_BELIMO_AUTOMATIONAG BACnetVendorId = 423 + BACnetVendorId_SAMSUNG_HEAVY_INDUSTRIES_CO_LTD BACnetVendorId = 424 + BACnetVendorId_TRIACTA_POWER_TECHNOLOGIES_INC BACnetVendorId = 425 + BACnetVendorId_GLOBESTAR_SYSTEMS BACnetVendorId = 426 + BACnetVendorId_MLB_ADVANCED_MEDIALP BACnetVendorId = 427 + BACnetVendorId_SWG_STUCKMANN_WIRTSCHAFTLICHE_GEBUDESYSTEME_GMBH BACnetVendorId = 428 + BACnetVendorId_SENSOR_SWITCH BACnetVendorId = 429 + BACnetVendorId_MULTITEK_POWER_LIMITED BACnetVendorId = 430 + BACnetVendorId_AQUAMETROAG BACnetVendorId = 431 + BACnetVendorId_LG_ELECTRONICS_INC BACnetVendorId = 432 + BACnetVendorId_ELECTRONIC_THEATRE_CONTROLS_INC BACnetVendorId = 433 + BACnetVendorId_MITSUBISHI_ELECTRIC_CORPORATION_NAGOYA_WORKS BACnetVendorId = 434 + BACnetVendorId_DELTA_ELECTRONICS_INC BACnetVendorId = 435 + BACnetVendorId_ELMA_KURTALJ_LTD BACnetVendorId = 436 + BACnetVendorId_TYCO_FIRE_SECURITY_GMBH BACnetVendorId = 437 + BACnetVendorId_NEDAP_SECURITY_MANAGEMENT BACnetVendorId = 438 + BACnetVendorId_ESC_AUTOMATION_INC BACnetVendorId = 439 + BACnetVendorId_DSPYOU_LTD BACnetVendorId = 440 + BACnetVendorId_GE_SENSINGAND_INSPECTION_TECHNOLOGIES BACnetVendorId = 441 + BACnetVendorId_EMBEDDED_SYSTEMSSIA BACnetVendorId = 442 + BACnetVendorId_BEFEGA_GMBH BACnetVendorId = 443 + BACnetVendorId_BASELINE_INC BACnetVendorId = 444 + BACnetVendorId_KEY_ACT BACnetVendorId = 445 + BACnetVendorId_OEM_CTRL BACnetVendorId = 446 + BACnetVendorId_CLARKSON_CONTROLS_LIMITED BACnetVendorId = 447 + BACnetVendorId_ROGERWELL_CONTROL_SYSTEM_LIMITED BACnetVendorId = 448 + BACnetVendorId_SCL_ELEMENTS BACnetVendorId = 449 + BACnetVendorId_HITACHI_LTD1 BACnetVendorId = 450 + BACnetVendorId_NEWRON_SYSTEMSA BACnetVendorId = 451 + BACnetVendorId_BEVECO_GEBOUWAUTOMATISERINGBV BACnetVendorId = 452 + BACnetVendorId_STREAMSIDE_SOLUTIONS BACnetVendorId = 453 + BACnetVendorId_YELLOWSTONE_SOFT BACnetVendorId = 454 + BACnetVendorId_OZTECH_INTELLIGENT_SYSTEMS_PTY_LTD BACnetVendorId = 455 + BACnetVendorId_NOVELAN_GMBH BACnetVendorId = 456 + BACnetVendorId_FLEXIM_AMERICAS_CORPORATION BACnetVendorId = 457 + BACnetVendorId_ICPDAS_CO_LTD BACnetVendorId = 458 + BACnetVendorId_CARMA_INDUSTRIES_INC BACnetVendorId = 459 + BACnetVendorId_LOG_ONE_LTD BACnetVendorId = 460 + BACnetVendorId_TECO_ELECTRIC_MACHINERY_CO_LTD BACnetVendorId = 461 + BACnetVendorId_CONNECT_EX_INC BACnetVendorId = 462 + BACnetVendorId_TURBODDC_SDWEST BACnetVendorId = 463 + BACnetVendorId_QUATROSENSE_ENVIRONMENTAL_LTD BACnetVendorId = 464 + BACnetVendorId_FIFTH_LIGHT_TECHNOLOGY_LTD BACnetVendorId = 465 + BACnetVendorId_SCIENTIFIC_SOLUTIONS_LTD BACnetVendorId = 466 + BACnetVendorId_CONTROLLER_AREA_NETWORK_SOLUTIONSM_SDN_BHD BACnetVendorId = 467 + BACnetVendorId_RESOL_ELEKTRONISCHE_REGELUNGEN_GMBH BACnetVendorId = 468 + BACnetVendorId_RPBUSLLC BACnetVendorId = 469 + BACnetVendorId_BRS_SISTEMAS_ELETRONICOS BACnetVendorId = 470 + BACnetVendorId_WINDOW_MASTERAS BACnetVendorId = 471 + BACnetVendorId_SUNLUX_TECHNOLOGIES_LTD BACnetVendorId = 472 + BACnetVendorId_MEASURLOGIC BACnetVendorId = 473 + BACnetVendorId_FRIMAT_GMBH BACnetVendorId = 474 + BACnetVendorId_SPIRAX_SARCO BACnetVendorId = 475 + BACnetVendorId_LUXTRON BACnetVendorId = 476 + BACnetVendorId_RAYPAK_INC BACnetVendorId = 477 + BACnetVendorId_AIR_MONITOR_CORPORATION1 BACnetVendorId = 478 + BACnetVendorId_REGLER_OCH_WEBBTEKNIK_SVERIGEROWS BACnetVendorId = 479 + BACnetVendorId_INTELLIGENT_LIGHTING_CONTROLS_INC BACnetVendorId = 480 + BACnetVendorId_SANYO_ELECTRIC_INDUSTRY_CO_LTD BACnetVendorId = 481 + BACnetVendorId_E_MON_ENERGY_MONITORING_PRODUCTS BACnetVendorId = 482 + BACnetVendorId_DIGITAL_CONTROL_SYSTEMS BACnetVendorId = 483 + BACnetVendorId_ATI_AIRTEST_TECHNOLOGIES_INC BACnetVendorId = 484 + BACnetVendorId_SCSSA BACnetVendorId = 485 + BACnetVendorId_HMS_INDUSTRIAL_NETWORKSAB BACnetVendorId = 486 + BACnetVendorId_SHENZHEN_UNIVERSAL_INTELLISYS_CO_LTD BACnetVendorId = 487 + BACnetVendorId_EK_INTELLISYS_SDN_BHD BACnetVendorId = 488 + BACnetVendorId_SYS_COM BACnetVendorId = 489 + BACnetVendorId_FIRECOM_INC BACnetVendorId = 490 + BACnetVendorId_ESA_ELEKTROSCHALTANLAGEN_GRIMMA_GMBH BACnetVendorId = 491 + BACnetVendorId_KUMAHIRA_CO_LTD BACnetVendorId = 492 + BACnetVendorId_HOTRACO BACnetVendorId = 493 + BACnetVendorId_SABO_ELEKTRONIK_GMBH BACnetVendorId = 494 + BACnetVendorId_EQUIP_TRANS BACnetVendorId = 495 + BACnetVendorId_TEMPERATURE_CONTROL_SPECIALITIES_CO_INCTCS BACnetVendorId = 496 + BACnetVendorId_FLOW_CON_INTERNATIONALAS BACnetVendorId = 497 + BACnetVendorId_THYSSEN_KRUPP_ELEVATOR_AMERICAS BACnetVendorId = 498 + BACnetVendorId_ABATEMENT_TECHNOLOGIES BACnetVendorId = 499 + BACnetVendorId_CONTINENTAL_CONTROL_SYSTEMSLLC BACnetVendorId = 500 + BACnetVendorId_WISAG_AUTOMATISIERUNGSTECHNIK_GMBH_COKG BACnetVendorId = 501 + BACnetVendorId_EASYIO BACnetVendorId = 502 + BACnetVendorId_EAP_ELECTRIC_GMBH BACnetVendorId = 503 + BACnetVendorId_HARDMEIER BACnetVendorId = 504 + BACnetVendorId_MIRCOM_GROUPOF_COMPANIES BACnetVendorId = 505 + BACnetVendorId_QUEST_CONTROLS BACnetVendorId = 506 + BACnetVendorId_MESTEK_INC BACnetVendorId = 507 + BACnetVendorId_PULSE_ENERGY BACnetVendorId = 508 + BACnetVendorId_TACHIKAWA_CORPORATION BACnetVendorId = 509 + BACnetVendorId_UNIVERSITYOF_NEBRASKA_LINCOLN BACnetVendorId = 510 + BACnetVendorId_REDWOOD_SYSTEMS BACnetVendorId = 511 + BACnetVendorId_PAS_STEC_INDUSTRIE_ELEKTRONIK_GMBH BACnetVendorId = 512 + BACnetVendorId_NGEK_INC BACnetVendorId = 513 + BACnetVendorId_TMAC_TECHNOLOGIES BACnetVendorId = 514 + BACnetVendorId_JIREH_ENERGY_TECH_CO_LTD BACnetVendorId = 515 + BACnetVendorId_ENLIGHTED_INC BACnetVendorId = 516 + BACnetVendorId_EL_PIAST_SP_ZOO BACnetVendorId = 517 + BACnetVendorId_NETX_AUTOMATION_SOFTWARE_GMBH BACnetVendorId = 518 + BACnetVendorId_INVERTEK_DRIVES BACnetVendorId = 519 + BACnetVendorId_DEUTSCHMANN_AUTOMATION_GMBH_COKG BACnetVendorId = 520 + BACnetVendorId_EMU_ELECTRONICAG BACnetVendorId = 521 + BACnetVendorId_PHAEDRUS_LIMITED BACnetVendorId = 522 + BACnetVendorId_SIGMATEK_GMBH_COKG BACnetVendorId = 523 + BACnetVendorId_MARLIN_CONTROLS BACnetVendorId = 524 + BACnetVendorId_CIRCUTORSA BACnetVendorId = 525 + BACnetVendorId_UTC_FIRE_SECURITY BACnetVendorId = 526 + BACnetVendorId_DENT_INSTRUMENTS_INC BACnetVendorId = 527 + BACnetVendorId_FHP_MANUFACTURING_COMPANY_BOSCH_GROUP BACnetVendorId = 528 + BACnetVendorId_GE_INTELLIGENT_PLATFORMS BACnetVendorId = 529 + BACnetVendorId_INNER_RANGE_PTY_LTD BACnetVendorId = 530 + BACnetVendorId_GLAS_ENERGY_TECHNOLOGY BACnetVendorId = 531 + BACnetVendorId_MSR_ELECTRONIC_GMBH BACnetVendorId = 532 + BACnetVendorId_ENERGY_CONTROL_SYSTEMS_INC BACnetVendorId = 533 + BACnetVendorId_EMT_CONTROLS BACnetVendorId = 534 + BACnetVendorId_DAINTREE BACnetVendorId = 535 + BACnetVendorId_EUROIC_CDOO BACnetVendorId = 536 + BACnetVendorId_TE_CONNECTIVITY_ENERGY BACnetVendorId = 537 + BACnetVendorId_GEZE_GMBH BACnetVendorId = 538 + BACnetVendorId_NEC_CORPORATION BACnetVendorId = 539 + BACnetVendorId_HO_CHEUNG_INTERNATIONAL_COMPANY_LIMITED BACnetVendorId = 540 + BACnetVendorId_SHARP_MANUFACTURING_SYSTEMS_CORPORATION BACnetVendorId = 541 + BACnetVendorId_DOTCONTROL_SAS BACnetVendorId = 542 + BACnetVendorId_BEACON_MEDS BACnetVendorId = 543 + BACnetVendorId_MIDEA_COMMERCIAL_AIRCON BACnetVendorId = 544 + BACnetVendorId_WATT_MASTER_CONTROLS BACnetVendorId = 545 + BACnetVendorId_KAMSTRUPAS BACnetVendorId = 546 + BACnetVendorId_CA_COMPUTER_AUTOMATION_GMBH BACnetVendorId = 547 + BACnetVendorId_LAARS_HEATING_SYSTEMS_COMPANY BACnetVendorId = 548 + BACnetVendorId_HITACHI_SYSTEMS_LTD BACnetVendorId = 549 + BACnetVendorId_FUSHANAKE_ELECTRONIC_ENGINEERING_CO_LTD BACnetVendorId = 550 + BACnetVendorId_TOSHIBA_INTERNATIONAL_CORPORATION BACnetVendorId = 551 + BACnetVendorId_STARMAN_SYSTEMSLLC BACnetVendorId = 552 + BACnetVendorId_SAMSUNG_TECHWIN_CO_LTD BACnetVendorId = 553 + BACnetVendorId_ISAS_INTEGRATED_SWITCHGEARAND_SYSTEMSPL BACnetVendorId = 554 + BACnetVendorId_OBVIUS BACnetVendorId = 556 + BACnetVendorId_MAREK_GUZIK BACnetVendorId = 557 + BACnetVendorId_VORTEK_INSTRUMENTSLLC BACnetVendorId = 558 + BACnetVendorId_UNIVERSAL_LIGHTING_TECHNOLOGIES BACnetVendorId = 559 + BACnetVendorId_MYERS_POWER_PRODUCTS_INC BACnetVendorId = 560 + BACnetVendorId_VECTOR_CONTROLS_GMBH BACnetVendorId = 561 + BACnetVendorId_CRESTRON_ELECTRONICS_INC BACnetVendorId = 562 + BACnetVendorId_AE_CONTROLS_LIMITED BACnetVendorId = 563 + BACnetVendorId_PROJEKTOMONTAZAAD BACnetVendorId = 564 + BACnetVendorId_FREEAIRE_REFRIGERATION BACnetVendorId = 565 + BACnetVendorId_AQUA_COOLER_PTY_LIMITED BACnetVendorId = 566 + BACnetVendorId_BASIC_CONTROLS BACnetVendorId = 567 + BACnetVendorId_GE_MEASUREMENTAND_CONTROL_SOLUTIONS_ADVANCED_SENSORS BACnetVendorId = 568 + BACnetVendorId_EQUAL_NETWORKS BACnetVendorId = 569 + BACnetVendorId_MILLENNIAL_NET BACnetVendorId = 570 + BACnetVendorId_APLI_LTD BACnetVendorId = 571 + BACnetVendorId_ELECTRO_INDUSTRIES_GAUGE_TECH BACnetVendorId = 572 + BACnetVendorId_SANG_MYUNG_UNIVERSITY BACnetVendorId = 573 + BACnetVendorId_COPPERTREE_ANALYTICS_INC BACnetVendorId = 574 + BACnetVendorId_CORE_NETIX_GMBH BACnetVendorId = 575 + BACnetVendorId_ACUTHERM BACnetVendorId = 576 + BACnetVendorId_DR_RIEDEL_AUTOMATISIERUNGSTECHNIK_GMBH BACnetVendorId = 577 + BACnetVendorId_SHINA_SYSTEM_CO_LTD BACnetVendorId = 578 + BACnetVendorId_IQAPERTUS BACnetVendorId = 579 + BACnetVendorId_PSE_TECHNOLOGY BACnetVendorId = 580 + BACnetVendorId_BA_SYSTEMS BACnetVendorId = 581 + BACnetVendorId_BTICINO BACnetVendorId = 582 + BACnetVendorId_MONICO_INC BACnetVendorId = 583 + BACnetVendorId_I_CUE BACnetVendorId = 584 + BACnetVendorId_TEKMAR_CONTROL_SYSTEMS_LTD BACnetVendorId = 585 + BACnetVendorId_CONTROL_TECHNOLOGY_CORPORATION BACnetVendorId = 586 + BACnetVendorId_GFAE_GMBH BACnetVendorId = 587 + BACnetVendorId_BE_KA_SOFTWARE_GMBH BACnetVendorId = 588 + BACnetVendorId_ISOIL_INDUSTRIA_SPA BACnetVendorId = 589 + BACnetVendorId_HOME_SYSTEMS_CONSULTING_SPA BACnetVendorId = 590 + BACnetVendorId_SOCOMEC BACnetVendorId = 591 + BACnetVendorId_EVEREX_COMMUNICATIONS_INC BACnetVendorId = 592 + BACnetVendorId_CEIEC_ELECTRIC_TECHNOLOGY BACnetVendorId = 593 + BACnetVendorId_ATRILA_GMBH BACnetVendorId = 594 + BACnetVendorId_WING_TECHS BACnetVendorId = 595 + BACnetVendorId_SHENZHEN_MEK_INTELLISYS_PTE_LTD BACnetVendorId = 596 + BACnetVendorId_NESTFIELD_CO_LTD BACnetVendorId = 597 + BACnetVendorId_SWISSPHONE_TELECOMAG BACnetVendorId = 598 + BACnetVendorId_PNTECHJSC BACnetVendorId = 599 + BACnetVendorId_HORNERAPGLLC BACnetVendorId = 600 + BACnetVendorId_PVI_INDUSTRIESLLC BACnetVendorId = 601 + BACnetVendorId_ELACOMPIL BACnetVendorId = 602 + BACnetVendorId_PEGASUS_AUTOMATION_INTERNATIONALLLC BACnetVendorId = 603 + BACnetVendorId_WIGHT_ELECTRONIC_SERVICES_LTD BACnetVendorId = 604 + BACnetVendorId_MARCOM BACnetVendorId = 605 + BACnetVendorId_EXHAUSTOAS BACnetVendorId = 606 + BACnetVendorId_DWYER_INSTRUMENTS_INC BACnetVendorId = 607 + BACnetVendorId_LINK_GMBH BACnetVendorId = 608 + BACnetVendorId_OPPERMANN_REGELGERATE_GMBH BACnetVendorId = 609 + BACnetVendorId_NU_AIRE_INC BACnetVendorId = 610 + BACnetVendorId_NORTEC_HUMIDITY_INC BACnetVendorId = 611 + BACnetVendorId_BIGWOOD_SYSTEMS_INC BACnetVendorId = 612 + BACnetVendorId_ENBALA_POWER_NETWORKS BACnetVendorId = 613 + BACnetVendorId_INTER_ENERGY_CO_LTD BACnetVendorId = 614 + BACnetVendorId_ETC BACnetVendorId = 615 + BACnetVendorId_COMELECSARL BACnetVendorId = 616 + BACnetVendorId_PYTHIA_TECHNOLOGIES BACnetVendorId = 617 + BACnetVendorId_TREND_POINT_SYSTEMS_INC BACnetVendorId = 618 + BACnetVendorId_AWEX BACnetVendorId = 619 + BACnetVendorId_EUREVIA BACnetVendorId = 620 + BACnetVendorId_KONGSBERGELONAS BACnetVendorId = 621 + BACnetVendorId_FLAKT_WOODS BACnetVendorId = 622 + BACnetVendorId_EE_ELEKTRONIKGESMBH BACnetVendorId = 623 + BACnetVendorId_ARC_INFORMATIQUE BACnetVendorId = 624 + BACnetVendorId_SKIDATAAG BACnetVendorId = 625 + BACnetVendorId_WSW_SOLUTIONS BACnetVendorId = 626 + BACnetVendorId_TREFON_ELECTRONIC_GMBH BACnetVendorId = 627 + BACnetVendorId_DONGSEO_SYSTEM BACnetVendorId = 628 + BACnetVendorId_KANONTEC_INTELLIGENCE_TECHNOLOGY_CO_LTD BACnetVendorId = 629 + BACnetVendorId_EVCO_SPA BACnetVendorId = 630 + BACnetVendorId_ACCUENERGY_CANADA_INC BACnetVendorId = 631 + BACnetVendorId_SOFTDEL BACnetVendorId = 632 + BACnetVendorId_ORION_ENERGY_SYSTEMS_INC BACnetVendorId = 633 + BACnetVendorId_ROBOTICSWARE BACnetVendorId = 634 + BACnetVendorId_DOMIQ_SPZOO BACnetVendorId = 635 + BACnetVendorId_SOLIDYNE BACnetVendorId = 636 + BACnetVendorId_ELECSYS_CORPORATION BACnetVendorId = 637 + BACnetVendorId_CONDITIONAIRE_INTERNATIONAL_PTY_LIMITED BACnetVendorId = 638 + BACnetVendorId_QUEBEC_INC BACnetVendorId = 639 + BACnetVendorId_HOMERUN_HOLDINGS BACnetVendorId = 640 + BACnetVendorId_MURATA_AMERICAS BACnetVendorId = 641 + BACnetVendorId_COMPTEK BACnetVendorId = 642 + BACnetVendorId_WESTCO_SYSTEMS_INC BACnetVendorId = 643 + BACnetVendorId_ADVANCIS_SOFTWARE_SERVICES_GMBH BACnetVendorId = 644 + BACnetVendorId_INTERGRIDLLC BACnetVendorId = 645 + BACnetVendorId_MARKERR_CONTROLS_INC BACnetVendorId = 646 + BACnetVendorId_TOSHIBA_ELEVATORAND_BUILDING_SYSTEMS_CORPORATION BACnetVendorId = 647 + BACnetVendorId_SPECTRUM_CONTROLS_INC BACnetVendorId = 648 + BACnetVendorId_MKSERVICE BACnetVendorId = 649 + BACnetVendorId_FOX_THERMAL_INSTRUMENTS BACnetVendorId = 650 + BACnetVendorId_SYXTH_SENSE_LTD BACnetVendorId = 651 + BACnetVendorId_DUHA_SYSTEMSRO BACnetVendorId = 652 + BACnetVendorId_NIBE BACnetVendorId = 653 + BACnetVendorId_MELINK_CORPORATION BACnetVendorId = 654 + BACnetVendorId_FRITZ_HABER_INSTITUT BACnetVendorId = 655 + BACnetVendorId_MTU_ONSITE_ENERGY_GMBH_GAS_POWER_SYSTEMS BACnetVendorId = 656 + BACnetVendorId_OMEGA_ENGINEERING_INC BACnetVendorId = 657 + BACnetVendorId_AVELON BACnetVendorId = 658 + BACnetVendorId_YWIRE_TECHNOLOGIES_INC BACnetVendorId = 659 + BACnetVendorId_MR_ENGINEERING_CO_LTD BACnetVendorId = 660 + BACnetVendorId_LOCHINVARLLC BACnetVendorId = 661 + BACnetVendorId_SONTAY_LIMITED BACnetVendorId = 662 + BACnetVendorId_GRUPA_SLAWOMIR_CHELMINSKI BACnetVendorId = 663 + BACnetVendorId_ARCH_METER_CORPORATION BACnetVendorId = 664 + BACnetVendorId_SENVA_INC BACnetVendorId = 665 + BACnetVendorId_FM_TEC BACnetVendorId = 667 + BACnetVendorId_SYSTEMS_SPECIALISTS_INC BACnetVendorId = 668 + BACnetVendorId_SENSE_AIR BACnetVendorId = 669 + BACnetVendorId_AB_INDUSTRIE_TECHNIK_SRL BACnetVendorId = 670 + BACnetVendorId_CORTLAND_RESEARCHLLC BACnetVendorId = 671 + BACnetVendorId_MEDIA_VIEW BACnetVendorId = 672 + BACnetVendorId_VDA_ELETTRONICA BACnetVendorId = 673 + BACnetVendorId_CSS_INC BACnetVendorId = 674 + BACnetVendorId_TEK_AIR_SYSTEMS_INC BACnetVendorId = 675 + BACnetVendorId_ICDT BACnetVendorId = 676 + BACnetVendorId_THE_ARMSTRONG_MONITORING_CORPORATION BACnetVendorId = 677 + BACnetVendorId_DIXELL_SRL BACnetVendorId = 678 + BACnetVendorId_LEAD_SYSTEM_INC BACnetVendorId = 679 + BACnetVendorId_ISM_EURO_CENTERSA BACnetVendorId = 680 + BACnetVendorId_TDIS BACnetVendorId = 681 + BACnetVendorId_TRADEFIDES BACnetVendorId = 682 + BACnetVendorId_KNRR_GMBH_EMERSON_NETWORK_POWER BACnetVendorId = 683 + BACnetVendorId_RESOURCE_DATA_MANAGEMENT BACnetVendorId = 684 + BACnetVendorId_ABIES_TECHNOLOGY_INC BACnetVendorId = 685 + BACnetVendorId_UAB_KOMFOVENT BACnetVendorId = 686 + BACnetVendorId_MIRAE_ELECTRICAL_MFG_CO_LTD BACnetVendorId = 687 + BACnetVendorId_HUNTER_DOUGLAS_ARCHITECTURAL_PROJECTS_SCANDINAVIA_APS BACnetVendorId = 688 + BACnetVendorId_RUNPAQ_GROUP_CO_LTD BACnetVendorId = 689 + BACnetVendorId_UNICARDSA BACnetVendorId = 690 + BACnetVendorId_IE_TECHNOLOGIES BACnetVendorId = 691 + BACnetVendorId_RUSKIN_MANUFACTURING BACnetVendorId = 692 + BACnetVendorId_CALON_ASSOCIATES_LIMITED BACnetVendorId = 693 + BACnetVendorId_CONTEC_CO_LTD BACnetVendorId = 694 + BACnetVendorId_IT_GMBH BACnetVendorId = 695 + BACnetVendorId_AUTANI_CORPORATION BACnetVendorId = 696 + BACnetVendorId_CHRISTIAN_FORTIN BACnetVendorId = 697 + BACnetVendorId_HDL BACnetVendorId = 698 + BACnetVendorId_IPID_SPZOO_LIMITED BACnetVendorId = 699 + BACnetVendorId_FUJI_ELECTRIC_CO_LTD BACnetVendorId = 700 + BACnetVendorId_VIEW_INC BACnetVendorId = 701 + BACnetVendorId_SAMSUNGS1_CORPORATION BACnetVendorId = 702 + BACnetVendorId_NEW_LIFT BACnetVendorId = 703 + BACnetVendorId_VRT_SYSTEMS BACnetVendorId = 704 + BACnetVendorId_MOTION_CONTROL_ENGINEERING_INC BACnetVendorId = 705 + BACnetVendorId_WEISS_KLIMATECHNIK_GMBH BACnetVendorId = 706 + BACnetVendorId_ELKON BACnetVendorId = 707 + BACnetVendorId_ELIWELL_CONTROLS_SRL BACnetVendorId = 708 + BACnetVendorId_JAPAN_COMPUTER_TECHNOS_CORP BACnetVendorId = 709 + BACnetVendorId_RATIONAL_NETWORKEHF BACnetVendorId = 710 + BACnetVendorId_MAGNUM_ENERGY_SOLUTIONSLLC BACnetVendorId = 711 + BACnetVendorId_MEL_ROK BACnetVendorId = 712 + BACnetVendorId_VAE_GROUP BACnetVendorId = 713 + BACnetVendorId_LGCNS BACnetVendorId = 714 + BACnetVendorId_BERGHOF_AUTOMATIONSTECHNIK_GMBH BACnetVendorId = 715 + BACnetVendorId_QUARK_COMMUNICATIONS_INC BACnetVendorId = 716 + BACnetVendorId_SONTEX BACnetVendorId = 717 + BACnetVendorId_MIVUNEAG BACnetVendorId = 718 + BACnetVendorId_PANDUIT BACnetVendorId = 719 + BACnetVendorId_SMART_CONTROLSLLC BACnetVendorId = 720 + BACnetVendorId_COMPU_AIRE_INC BACnetVendorId = 721 + BACnetVendorId_SIERRA BACnetVendorId = 722 + BACnetVendorId_PROTO_SENSE_TECHNOLOGIES BACnetVendorId = 723 + BACnetVendorId_ELTRAC_TECHNOLOGIES_PVT_LTD BACnetVendorId = 724 + BACnetVendorId_BEKTAS_INVISIBLE_CONTROLS_GMBH BACnetVendorId = 725 + BACnetVendorId_ENTELEC BACnetVendorId = 726 + BACnetVendorId_INNEXIV BACnetVendorId = 727 + BACnetVendorId_COVENANT BACnetVendorId = 728 + BACnetVendorId_DAVITORAB BACnetVendorId = 729 + BACnetVendorId_TONG_FANG_TECHNOVATOR BACnetVendorId = 730 + BACnetVendorId_BUILDING_ROBOTICS_INC BACnetVendorId = 731 + BACnetVendorId_HSSMSRUG BACnetVendorId = 732 + BACnetVendorId_FRAM_TACKLLC BACnetVendorId = 733 + BACnetVendorId_BL_ACOUSTICS_LTD BACnetVendorId = 734 + BACnetVendorId_TRAXXON_ROCK_DRILLS_LTD BACnetVendorId = 735 + BACnetVendorId_FRANKE BACnetVendorId = 736 + BACnetVendorId_WURM_GMBH_CO BACnetVendorId = 737 + BACnetVendorId_ADDENERGIE BACnetVendorId = 738 + BACnetVendorId_MIRLE_AUTOMATION_CORPORATION BACnetVendorId = 739 + BACnetVendorId_IBIS_NETWORKS BACnetVendorId = 740 + BACnetVendorId_IDKART_ASRO BACnetVendorId = 741 + BACnetVendorId_ANAREN_INC BACnetVendorId = 742 + BACnetVendorId_SPAN_INCORPORATED BACnetVendorId = 743 + BACnetVendorId_BOSCH_THERMOTECHNOLOGY_CORP BACnetVendorId = 744 + BACnetVendorId_DRC_TECHNOLOGYSA BACnetVendorId = 745 + BACnetVendorId_SHANGHAI_ENERGY_BUILDING_TECHNOLOGY_CO_LTD BACnetVendorId = 746 + BACnetVendorId_FRAPORTAG BACnetVendorId = 747 + BACnetVendorId_FLOWGROUP BACnetVendorId = 748 + BACnetVendorId_SKYTRON_ENERGY_GMBH BACnetVendorId = 749 + BACnetVendorId_ALTEL_WICHA_GOLDA_SPJ BACnetVendorId = 750 + BACnetVendorId_DRUPAL BACnetVendorId = 751 + BACnetVendorId_AXIOMATIC_TECHNOLOGY_LTD BACnetVendorId = 752 + BACnetVendorId_BOHNKE_PARTNER BACnetVendorId = 753 + BACnetVendorId_FUNCTION1 BACnetVendorId = 754 + BACnetVendorId_OPTERGY_PTY_LTD BACnetVendorId = 755 + BACnetVendorId_LSI_VIRTICUS BACnetVendorId = 756 + BACnetVendorId_KONZEPTPARK_GMBH BACnetVendorId = 757 + BACnetVendorId_NX_LIGHTING_CONTROLS BACnetVendorId = 758 + BACnetVendorId_E_CURV_INC BACnetVendorId = 759 + BACnetVendorId_AGNOSYS_GMBH BACnetVendorId = 760 + BACnetVendorId_SHANGHAI_SUNFULL_AUTOMATION_COLTD BACnetVendorId = 761 + BACnetVendorId_KURZ_INSTRUMENTS_INC BACnetVendorId = 762 + BACnetVendorId_CIAS_ELETTRONICA_SRL BACnetVendorId = 763 + BACnetVendorId_MULTIAQUA_INC BACnetVendorId = 764 + BACnetVendorId_BLUE_BOX BACnetVendorId = 765 + BACnetVendorId_SENSIDYNE BACnetVendorId = 766 + BACnetVendorId_VIESSMANN_ELEKTRONIK_GMBH BACnetVendorId = 767 + BACnetVendorId_AD_FWEBCOMSRL BACnetVendorId = 768 + BACnetVendorId_GAYLORD_INDUSTRIES BACnetVendorId = 769 + BACnetVendorId_MAJUR_LTD BACnetVendorId = 770 + BACnetVendorId_SHANGHAI_HUILIN_TECHNOLOGY_CO_LTD BACnetVendorId = 771 + BACnetVendorId_EXOTRONIC BACnetVendorId = 772 + BACnetVendorId_SAFECONTRO_LSRO BACnetVendorId = 773 + BACnetVendorId_AMATIS BACnetVendorId = 774 + BACnetVendorId_UNIVERSAL_ELECTRIC_CORPORATION BACnetVendorId = 775 + BACnetVendorId_IBA_CNET BACnetVendorId = 776 + BACnetVendorId_SMARTRISE_ENGINEERING_INC BACnetVendorId = 778 + BACnetVendorId_MIRATRON_INC BACnetVendorId = 779 + BACnetVendorId_SMART_EDGE BACnetVendorId = 780 + BACnetVendorId_MITSUBISHI_ELECTRIC_AUSTRALIA_PTY_LTD BACnetVendorId = 781 + BACnetVendorId_TRIANGLE_RESEARCH_INTERNATIONAL_PTD_LTD BACnetVendorId = 782 + BACnetVendorId_PRODUAL_OY BACnetVendorId = 783 + BACnetVendorId_MILESTONE_SYSTEMSAS BACnetVendorId = 784 + BACnetVendorId_TRUSTBRIDGE BACnetVendorId = 785 + BACnetVendorId_FEEDBACK_SOLUTIONS BACnetVendorId = 786 + BACnetVendorId_IES BACnetVendorId = 787 + BACnetVendorId_ABB_POWER_PROTECTIONSA BACnetVendorId = 788 + BACnetVendorId_RIPTIDEIO BACnetVendorId = 789 + BACnetVendorId_MESSERSCHMITT_SYSTEMSAG BACnetVendorId = 790 + BACnetVendorId_DEZEM_ENERGY_CONTROLLING BACnetVendorId = 791 + BACnetVendorId_MECHO_SYSTEMS BACnetVendorId = 792 + BACnetVendorId_EVON_GMBH BACnetVendorId = 793 + BACnetVendorId_CS_LAB_GMBH BACnetVendorId = 794 + BACnetVendorId_N_0_ENTERPRISES_INC BACnetVendorId = 795 + BACnetVendorId_TOUCHE_CONTROLS BACnetVendorId = 796 + BACnetVendorId_ONTROL_TEKNIK_MALZEME_SANVE_TICAS BACnetVendorId = 797 + BACnetVendorId_UNI_CONTROL_SYSTEM_SP_ZOO BACnetVendorId = 798 + BACnetVendorId_WEIHAI_PLOUMETER_CO_LTD BACnetVendorId = 799 + BACnetVendorId_ELCOM_INTERNATIONAL_PVT_LTD BACnetVendorId = 800 + BACnetVendorId_SIGNIFY BACnetVendorId = 801 + BACnetVendorId_AUTOMATION_DIRECT BACnetVendorId = 802 + BACnetVendorId_PARAGON_ROBOTICS BACnetVendorId = 803 + BACnetVendorId_SMT_SYSTEM_MODULES_TECHNOLOGYAG BACnetVendorId = 804 + BACnetVendorId_RADIX_IOTLLC BACnetVendorId = 805 + BACnetVendorId_CMR_CONTROLS_LTD BACnetVendorId = 806 + BACnetVendorId_INNOVARI_INC BACnetVendorId = 807 + BACnetVendorId_ABB_CONTROL_PRODUCTS BACnetVendorId = 808 + BACnetVendorId_GESELLSCHAFTFUR_GEBUDEAUTOMATIONMBH BACnetVendorId = 809 + BACnetVendorId_RODI_SYSTEMS_CORP BACnetVendorId = 810 + BACnetVendorId_NEXTEK_POWER_SYSTEMS BACnetVendorId = 811 + BACnetVendorId_CREATIVE_LIGHTING BACnetVendorId = 812 + BACnetVendorId_WATER_FURNACE_INTERNATIONAL BACnetVendorId = 813 + BACnetVendorId_MERCURY_SECURITY BACnetVendorId = 814 + BACnetVendorId_HISENSE_SHANDONG_AIR_CONDITIONING_CO_LTD BACnetVendorId = 815 + BACnetVendorId_LAYERED_SOLUTIONS_INC BACnetVendorId = 816 + BACnetVendorId_LEEGOOD_AUTOMATIC_SYSTEM_INC BACnetVendorId = 817 + BACnetVendorId_SHANGHAI_RESTAR_TECHNOLOGY_CO_LTD BACnetVendorId = 818 + BACnetVendorId_REIMANN_INGENIEURBRO BACnetVendorId = 819 + BACnetVendorId_LYN_TEC BACnetVendorId = 820 + BACnetVendorId_HTP BACnetVendorId = 821 + BACnetVendorId_ELKOR_TECHNOLOGIES_INC BACnetVendorId = 822 + BACnetVendorId_BENTROL_PTY_LTD BACnetVendorId = 823 + BACnetVendorId_TEAM_CONTROL_OY BACnetVendorId = 824 + BACnetVendorId_NEXT_DEVICELLC BACnetVendorId = 825 + BACnetVendorId_ISMACONTROLLI_SPA BACnetVendorId = 826 + BACnetVendorId_KINGI_ELECTRONICS_CO_LTD BACnetVendorId = 827 + BACnetVendorId_SAMDAV BACnetVendorId = 828 + BACnetVendorId_NEXT_GEN_INDUSTRIES_PVT_LTD BACnetVendorId = 829 + BACnetVendorId_ENTICLLC BACnetVendorId = 830 + BACnetVendorId_ETAP BACnetVendorId = 831 + BACnetVendorId_MORALLE_ELECTRONICS_LIMITED BACnetVendorId = 832 + BACnetVendorId_LEICOMAG BACnetVendorId = 833 + BACnetVendorId_WATTS_REGULATOR_COMPANY BACnetVendorId = 834 + BACnetVendorId_SC_ORBTRONICSSRL BACnetVendorId = 835 + BACnetVendorId_GAUSSAN_TECHNOLOGIES BACnetVendorId = 836 + BACnetVendorId_WE_BFACTORY_GMBH BACnetVendorId = 837 + BACnetVendorId_OCEAN_CONTROLS BACnetVendorId = 838 + BACnetVendorId_MESSANA_AIR_RAY_CONDITIONINGSRL BACnetVendorId = 839 + BACnetVendorId_HANGZHOUBATOWN_TECHNOLOGY_CO_LTD BACnetVendorId = 840 + BACnetVendorId_REASONABLE_CONTROLS BACnetVendorId = 841 + BACnetVendorId_SERVISYS_INC BACnetVendorId = 842 + BACnetVendorId_HALSTRUPWALCHER_GMBH BACnetVendorId = 843 + BACnetVendorId_SWG_AUTOMATION_FUZHOU_LIMITED BACnetVendorId = 844 + BACnetVendorId_KSB_AKTIENGESELLSCHAFT BACnetVendorId = 845 + BACnetVendorId_HYBRYD_SPZOO BACnetVendorId = 846 + BACnetVendorId_HELVATRONAG BACnetVendorId = 847 + BACnetVendorId_ODERON_SPZOO BACnetVendorId = 848 + BACnetVendorId_MIKOLAB BACnetVendorId = 849 + BACnetVendorId_EXODRAFT BACnetVendorId = 850 + BACnetVendorId_HOCHHUTH_GMBH BACnetVendorId = 851 + BACnetVendorId_INTEGRATED_SYSTEM_TECHNOLOGIES_LTD BACnetVendorId = 852 + BACnetVendorId_SHANGHAI_CELLCONS_CONTROLS_CO_LTD BACnetVendorId = 853 + BACnetVendorId_EMME_CONTROLSLLC BACnetVendorId = 854 + BACnetVendorId_FIELD_DIAGNOSTIC_SERVICES_INC BACnetVendorId = 855 + BACnetVendorId_GES_TEKNIKAS BACnetVendorId = 856 + BACnetVendorId_GLOBAL_POWER_PRODUCTS_INC BACnetVendorId = 857 + BACnetVendorId_OPTIONNV BACnetVendorId = 858 + BACnetVendorId_BV_CONTROLAG BACnetVendorId = 859 + BACnetVendorId_SIGREN_ENGINEERINGAG BACnetVendorId = 860 + BACnetVendorId_SHANGHAI_JALTONE_TECHNOLOGY_CO_LTD BACnetVendorId = 861 + BACnetVendorId_MAX_LINE_SOLUTIONS_LTD BACnetVendorId = 862 + BACnetVendorId_KRON_INSTRUMENTOS_ELTRICOS_LTDA BACnetVendorId = 863 + BACnetVendorId_THERMO_MATRIX BACnetVendorId = 864 + BACnetVendorId_INFINITE_AUTOMATION_SYSTEMS_INC BACnetVendorId = 865 + BACnetVendorId_VANTAGE BACnetVendorId = 866 + BACnetVendorId_ELECON_MEASUREMENTS_PVT_LTD BACnetVendorId = 867 + BACnetVendorId_TBA BACnetVendorId = 868 + BACnetVendorId_CARNES_COMPANY BACnetVendorId = 869 + BACnetVendorId_HARMAN_PROFESSIONAL BACnetVendorId = 870 + BACnetVendorId_NENUTEC_ASIA_PACIFIC_PTE_LTD BACnetVendorId = 871 + BACnetVendorId_GIANV BACnetVendorId = 872 + BACnetVendorId_KEPWARE_TEHNOLOGIES BACnetVendorId = 873 + BACnetVendorId_TEMPERATURE_ELECTRONICS_LTD BACnetVendorId = 874 + BACnetVendorId_PACKET_POWER BACnetVendorId = 875 + BACnetVendorId_PROJECT_HAYSTACK_CORPORATION BACnetVendorId = 876 + BACnetVendorId_DEOS_CONTROLS_AMERICAS_INC BACnetVendorId = 877 + BACnetVendorId_SENSEWARE_INC BACnetVendorId = 878 + BACnetVendorId_MST_SYSTEMTECHNIKAG BACnetVendorId = 879 + BACnetVendorId_LONIX_LTD BACnetVendorId = 880 + BACnetVendorId_GOSSEN_METRAWATT_GMBH BACnetVendorId = 881 + BACnetVendorId_AVIOSYS_INTERNATIONAL_INC BACnetVendorId = 882 + BACnetVendorId_EFFICIENT_BUILDING_AUTOMATION_CORP BACnetVendorId = 883 + BACnetVendorId_ACCUTRON_INSTRUMENTS_INC BACnetVendorId = 884 + BACnetVendorId_VERMONT_ENERGY_CONTROL_SYSTEMSLLC BACnetVendorId = 885 + BACnetVendorId_DCC_DYNAMICS BACnetVendorId = 886 + BACnetVendorId_BEG_BRCK_ELECTRONIC_GMBH BACnetVendorId = 887 + BACnetVendorId_NGBS_HUNGARY_LTD BACnetVendorId = 889 + BACnetVendorId_ILLUM_TECHNOLOGYLLC BACnetVendorId = 890 + BACnetVendorId_DELTA_CONTROLS_GERMANY_LIMITED BACnetVendorId = 891 + BACnetVendorId_ST_SERVICE_TECHNIQUESA BACnetVendorId = 892 + BACnetVendorId_SIMPLE_SOFT BACnetVendorId = 893 + BACnetVendorId_ALTAIR_ENGINEERING BACnetVendorId = 894 + BACnetVendorId_EZEN_SOLUTION_INC BACnetVendorId = 895 + BACnetVendorId_FUJITEC_CO_LTD BACnetVendorId = 896 + BACnetVendorId_TERRALUX BACnetVendorId = 897 + BACnetVendorId_ANNICOM BACnetVendorId = 898 + BACnetVendorId_BIHL_WIEDEMANN_GMBH BACnetVendorId = 899 + BACnetVendorId_DRAPER_INC BACnetVendorId = 900 + BACnetVendorId_SCHCO_INTERNATIONALKG BACnetVendorId = 901 + BACnetVendorId_OTIS_ELEVATOR_COMPANY BACnetVendorId = 902 + BACnetVendorId_FIDELIX_OY BACnetVendorId = 903 + BACnetVendorId_RAM_GMBH_MESSUND_REGELTECHNIK BACnetVendorId = 904 + BACnetVendorId_WEMS BACnetVendorId = 905 + BACnetVendorId_RAVEL_ELECTRONICS_PVT_LTD BACnetVendorId = 906 + BACnetVendorId_OMNI_MAGNI BACnetVendorId = 907 + BACnetVendorId_ECHELON BACnetVendorId = 908 + BACnetVendorId_INTELLIMETER_CANADA_INC BACnetVendorId = 909 + BACnetVendorId_BITHOUSE_OY BACnetVendorId = 910 + BACnetVendorId_BUILD_PULSE BACnetVendorId = 912 + BACnetVendorId_SHENZHEN1000_BUILDING_AUTOMATION_CO_LTD BACnetVendorId = 913 + BACnetVendorId_AED_ENGINEERING_GMBH BACnetVendorId = 914 + BACnetVendorId_GNTNER_GMBH_COKG BACnetVendorId = 915 + BACnetVendorId_KN_XLOGIC BACnetVendorId = 916 + BACnetVendorId_CIM_ENVIRONMENTAL_GROUP BACnetVendorId = 917 + BACnetVendorId_FLOW_CONTROL BACnetVendorId = 918 + BACnetVendorId_LUMEN_CACHE_INC BACnetVendorId = 919 + BACnetVendorId_ECOSYSTEM BACnetVendorId = 920 + BACnetVendorId_POTTER_ELECTRIC_SIGNAL_COMPANYLLC BACnetVendorId = 921 + BACnetVendorId_TYCO_FIRE_SECURITY_SPA BACnetVendorId = 922 + BACnetVendorId_WATANABE_ELECTRIC_INDUSTRY_CO_LTD BACnetVendorId = 923 + BACnetVendorId_CAUSAM_ENERGY BACnetVendorId = 924 + BACnetVendorId_WTECAG BACnetVendorId = 925 + BACnetVendorId_IMI_HYDRONIC_ENGINEERING_INTERNATIONALSA BACnetVendorId = 926 + BACnetVendorId_ARIGO_SOFTWARE BACnetVendorId = 927 + BACnetVendorId_MSA_SAFETY1 BACnetVendorId = 928 + BACnetVendorId_SMART_SOLUCOES_LTDAMERCATO BACnetVendorId = 929 + BACnetVendorId_PIATRA_ENGINEERING BACnetVendorId = 930 + BACnetVendorId_ODIN_AUTOMATION_SYSTEMSLLC BACnetVendorId = 931 + BACnetVendorId_BELPARTSNV BACnetVendorId = 932 + BACnetVendorId_UABSALDA BACnetVendorId = 933 + BACnetVendorId_ALREIT_REGELTECHNIK_GMBH BACnetVendorId = 934 + BACnetVendorId_INGENIEURBROH_LERTES_GMBH_COKG BACnetVendorId = 935 + BACnetVendorId_BREATHING_BUILDINGS BACnetVendorId = 936 + BACnetVendorId_EWONSA BACnetVendorId = 937 + BACnetVendorId_CAV_UFF_GIACOMO_CIMBERIO_SPA BACnetVendorId = 938 + BACnetVendorId_PKE_ELECTRONICSAG BACnetVendorId = 939 + BACnetVendorId_ALLEN BACnetVendorId = 940 + BACnetVendorId_KASTLE_SYSTEMS BACnetVendorId = 941 + BACnetVendorId_LOGICAL_ELECTRO_MECHANICALEM_SYSTEMS_INC BACnetVendorId = 942 + BACnetVendorId_PP_KINETICS_INSTRUMENTSLLC BACnetVendorId = 943 + BACnetVendorId_CATHEXIS_TECHNOLOGIES BACnetVendorId = 944 + BACnetVendorId_SYLOPSP_ZOOSPK BACnetVendorId = 945 + BACnetVendorId_BRAUNS_CONTROL_GMBH BACnetVendorId = 946 + BACnetVendorId_OMRONSOCIALSOLUTIONSCOLTD BACnetVendorId = 947 + BACnetVendorId_WILDEBOER_BAUTEILE_GMBH BACnetVendorId = 948 + BACnetVendorId_SHANGHAI_BIENS_TECHNOLOGIES_LTD BACnetVendorId = 949 + BACnetVendorId_BEIJINGHZHY_TECHNOLOGY_CO_LTD BACnetVendorId = 950 + BACnetVendorId_BUILDING_CLOUDS BACnetVendorId = 951 BACnetVendorId_THE_UNIVERSITYOF_SHEFFIELD_DEPARTMENTOF_ELECTRONICAND_ELECTRICAL_ENGINEERING BACnetVendorId = 952 - BACnetVendorId_FABTRONICS_AUSTRALIA_PTY_LTD BACnetVendorId = 953 - BACnetVendorId_SLAT BACnetVendorId = 954 - BACnetVendorId_SOFTWARE_MOTOR_CORPORATION BACnetVendorId = 955 - BACnetVendorId_ARMSTRONG_INTERNATIONAL_INC BACnetVendorId = 956 - BACnetVendorId_STERIL_AIRE_INC BACnetVendorId = 957 - BACnetVendorId_INFINIQUE BACnetVendorId = 958 - BACnetVendorId_ARCOM BACnetVendorId = 959 - BACnetVendorId_ARGO_PERFORMANCE_LTD BACnetVendorId = 960 - BACnetVendorId_DIALIGHT BACnetVendorId = 961 - BACnetVendorId_IDEAL_TECHNICAL_SOLUTIONS BACnetVendorId = 962 - BACnetVendorId_NEUROBATAG BACnetVendorId = 963 - BACnetVendorId_NEYER_SOFTWARE_CONSULTINGLLC BACnetVendorId = 964 - BACnetVendorId_SCADA_TECHNOLOGY_DEVELOPMENT_CO_LTD BACnetVendorId = 965 - BACnetVendorId_DEMAND_LOGIC_LIMITED BACnetVendorId = 966 - BACnetVendorId_GWA_GROUP_LIMITED BACnetVendorId = 967 - BACnetVendorId_OCCITALINE BACnetVendorId = 968 - BACnetVendorId_NAO_DIGITAL_CO_LTD BACnetVendorId = 969 - BACnetVendorId_SHENZHEN_CHANSLINK_NETWORK_TECHNOLOGY_CO_LTD BACnetVendorId = 970 - BACnetVendorId_SAMSUNG_ELECTRONICS_CO_LTD BACnetVendorId = 971 - BACnetVendorId_MESA_LABORATORIES_INC BACnetVendorId = 972 - BACnetVendorId_FISCHER BACnetVendorId = 973 - BACnetVendorId_OP_SYS_SOLUTIONS_LTD BACnetVendorId = 974 - BACnetVendorId_ADVANCED_DEVICES_LIMITED BACnetVendorId = 975 - BACnetVendorId_CONDAIR BACnetVendorId = 976 - BACnetVendorId_INELCOM_INGENIERIA_ELECTRONICA_COMERCIALSA BACnetVendorId = 977 - BACnetVendorId_GRID_POINT_INC BACnetVendorId = 978 - BACnetVendorId_ADF_TECHNOLOGIES_SDN_BHD BACnetVendorId = 979 - BACnetVendorId_EPM_INC BACnetVendorId = 980 - BACnetVendorId_LIGHTING_CONTROLS_LTD BACnetVendorId = 981 - BACnetVendorId_PERIX_CONTROLS_LTD BACnetVendorId = 982 - BACnetVendorId_AERCO_INTERNATIONAL_INC BACnetVendorId = 983 - BACnetVendorId_KONE_INC BACnetVendorId = 984 - BACnetVendorId_ZIEHL_ABEGGSE BACnetVendorId = 985 - BACnetVendorId_ROBOTSA BACnetVendorId = 986 - BACnetVendorId_OPTIGO_NETWORKS_INC BACnetVendorId = 987 - BACnetVendorId_OPENMOTICSBVBA BACnetVendorId = 988 - BACnetVendorId_METROPOLITAN_INDUSTRIES_INC BACnetVendorId = 989 - BACnetVendorId_HUAWEI_TECHNOLOGIES_CO_LTD BACnetVendorId = 990 - BACnetVendorId_DIGITAL_LUMENS_INC BACnetVendorId = 991 - BACnetVendorId_VANTI BACnetVendorId = 992 - BACnetVendorId_CREE_LIGHTING BACnetVendorId = 993 - BACnetVendorId_RICHMOND_HEIGHTSSDNBHD BACnetVendorId = 994 - BACnetVendorId_PAYNE_SPARKMAN_LIGHTING_MANGEMENT BACnetVendorId = 995 - BACnetVendorId_ASHCROFT BACnetVendorId = 996 - BACnetVendorId_JET_CONTROLS_CORP BACnetVendorId = 997 - BACnetVendorId_ZUMTOBEL_LIGHTING_GMBH BACnetVendorId = 998 - BACnetVendorId_EKON_GMBH BACnetVendorId = 1000 - BACnetVendorId_MOLEX BACnetVendorId = 1001 - BACnetVendorId_MACO_LIGHTING_PTY_LTD BACnetVendorId = 1002 - BACnetVendorId_AXECON_CORP BACnetVendorId = 1003 - BACnetVendorId_TENSORPLC BACnetVendorId = 1004 - BACnetVendorId_KASEMAN_ENVIRONMENTAL_CONTROL_EQUIPMENT_SHANGHAI_LIMITED BACnetVendorId = 1005 - BACnetVendorId_AB_AXIS_INDUSTRIES BACnetVendorId = 1006 - BACnetVendorId_NETIX_CONTROLS BACnetVendorId = 1007 - BACnetVendorId_ELDRIDGE_PRODUCTS_INC BACnetVendorId = 1008 - BACnetVendorId_MICRONICS BACnetVendorId = 1009 - BACnetVendorId_FORTECHO_SOLUTIONS_LTD BACnetVendorId = 1010 - BACnetVendorId_SELLERS_MANUFACTURING_COMPANY BACnetVendorId = 1011 - BACnetVendorId_RITE_HITE_DOORS_INC BACnetVendorId = 1012 - BACnetVendorId_VIOLET_DEFENSELLC BACnetVendorId = 1013 - BACnetVendorId_SIMNA BACnetVendorId = 1014 - BACnetVendorId_MULTINERGIE_BEST_INC BACnetVendorId = 1015 - BACnetVendorId_MEGA_SYSTEM_TECHNOLOGIES_INC BACnetVendorId = 1016 - BACnetVendorId_RHEEM BACnetVendorId = 1017 - BACnetVendorId_ING_PUNZENBERGERCOPADATA_GMBH BACnetVendorId = 1018 - BACnetVendorId_MEC_ELECTRONICS_GMBH BACnetVendorId = 1019 - BACnetVendorId_TACO_COMFORT_SOLUTIONS BACnetVendorId = 1020 - BACnetVendorId_ALEXANDER_MAIER_GMBH BACnetVendorId = 1021 - BACnetVendorId_ECORITHM_INC BACnetVendorId = 1022 - BACnetVendorId_ACCURRO_LTD BACnetVendorId = 1023 - BACnetVendorId_ROMTECK_AUSTRALIA_PTY_LTD BACnetVendorId = 1024 - BACnetVendorId_SPLASH_MONITORING_LIMITED BACnetVendorId = 1025 - BACnetVendorId_LIGHT_APPLICATION BACnetVendorId = 1026 - BACnetVendorId_LOGICAL_BUILDING_AUTOMATION BACnetVendorId = 1027 - BACnetVendorId_EXILIGHT_OY BACnetVendorId = 1028 - BACnetVendorId_HAGER_ELECTROSAS BACnetVendorId = 1029 - BACnetVendorId_KLIF_COLTD BACnetVendorId = 1030 - BACnetVendorId_HYGRO_MATIK BACnetVendorId = 1031 - BACnetVendorId_DANIEL_MOUSSEAU_PROGRAMMATION_ELECTRONIQUE BACnetVendorId = 1032 - BACnetVendorId_AERIONICS_INC BACnetVendorId = 1033 - BACnetVendorId_MS_ELECTRONIQUE_LTEE BACnetVendorId = 1034 - BACnetVendorId_AUTOMATION_COMPONENTS_INC BACnetVendorId = 1035 - BACnetVendorId_NIOBRARA_RESEARCH_DEVELOPMENT_CORPORATION BACnetVendorId = 1036 - BACnetVendorId_NETCOM_SICHERHEITSTECHNIK_GMBH BACnetVendorId = 1037 - BACnetVendorId_LUMELSA BACnetVendorId = 1038 - BACnetVendorId_GREAT_PLAINS_INDUSTRIES_INC BACnetVendorId = 1039 - BACnetVendorId_DOMOTICA_LABSSRL BACnetVendorId = 1040 - BACnetVendorId_ENERGY_CLOUD_INC BACnetVendorId = 1041 - BACnetVendorId_VOMATEC BACnetVendorId = 1042 - BACnetVendorId_DEMMA_COMPANIES BACnetVendorId = 1043 - BACnetVendorId_VALSENA BACnetVendorId = 1044 - BACnetVendorId_COMSYS_BRTSCHAG BACnetVendorId = 1045 - BACnetVendorId_B_GRID BACnetVendorId = 1046 - BACnetVendorId_MDJ_SOFTWARE_PTY_LTD BACnetVendorId = 1047 - BACnetVendorId_DIMONOFF_INC BACnetVendorId = 1048 - BACnetVendorId_EDOMO_SYSTEMS_GMBH BACnetVendorId = 1049 - BACnetVendorId_EFFEKTIVLLC BACnetVendorId = 1050 - BACnetVendorId_STEAMO_VAP BACnetVendorId = 1051 - BACnetVendorId_GRANDCENTRIX_GMBH BACnetVendorId = 1052 - BACnetVendorId_WEINTEK_LABS_INC BACnetVendorId = 1053 - BACnetVendorId_INTEFOX_GMBH BACnetVendorId = 1054 - BACnetVendorId_RADIUS_AUTOMATION_COMPANY BACnetVendorId = 1055 - BACnetVendorId_RINGDALE_INC BACnetVendorId = 1056 - BACnetVendorId_IWAKI_AMERICA BACnetVendorId = 1057 - BACnetVendorId_BRACTLET BACnetVendorId = 1058 - BACnetVendorId_STULZ_AIR_TECHNOLOGY_SYSTEMS_INC BACnetVendorId = 1059 - BACnetVendorId_CLIMATE_READY_ENGINEERING_PTY_LTD BACnetVendorId = 1060 - BACnetVendorId_GENEA_ENERGY_PARTNERS BACnetVendorId = 1061 - BACnetVendorId_IO_TALL_CHILE BACnetVendorId = 1062 - BACnetVendorId_IKS_CO_LTD BACnetVendorId = 1063 - BACnetVendorId_YODIWOAB BACnetVendorId = 1064 - BACnetVendorId_TITA_NELECTRONIC_GMBH BACnetVendorId = 1065 - BACnetVendorId_IDEC_CORPORATION BACnetVendorId = 1066 - BACnetVendorId_SIFRISL BACnetVendorId = 1067 - BACnetVendorId_THERMAL_GAS_SYSTEMS_INC BACnetVendorId = 1068 - BACnetVendorId_BUILDING_AUTOMATION_PRODUCTS_INC BACnetVendorId = 1069 - BACnetVendorId_ASSET_MAPPING BACnetVendorId = 1070 - BACnetVendorId_SMARTEH_COMPANY BACnetVendorId = 1071 - BACnetVendorId_DATAPOD_AUSTRALIA_PTY_LTD BACnetVendorId = 1072 - BACnetVendorId_BUILDINGS_ALIVE_PTY_LTD BACnetVendorId = 1073 - BACnetVendorId_DIGITAL_ELEKTRONIK BACnetVendorId = 1074 - BACnetVendorId_TALENT_AUTOMAOE_TECNOLOGIA_LTDA BACnetVendorId = 1075 - BACnetVendorId_NORPOSH_LIMITED BACnetVendorId = 1076 - BACnetVendorId_MERKUR_FUNKSYSTEMEAG BACnetVendorId = 1077 - BACnetVendorId_FASTERC_ZSPOL_SRO BACnetVendorId = 1078 - BACnetVendorId_ECO_ADAPT BACnetVendorId = 1079 - BACnetVendorId_ENERGOCENTRUM_PLUSSRO BACnetVendorId = 1080 - BACnetVendorId_AMBXUK_LTD BACnetVendorId = 1081 - BACnetVendorId_WESTERN_RESERVE_CONTROLS_INC BACnetVendorId = 1082 - BACnetVendorId_LAYER_ZERO_POWER_SYSTEMS_INC BACnetVendorId = 1083 - BACnetVendorId_CIC_JAN_HEBECSRO BACnetVendorId = 1084 - BACnetVendorId_SIGROVBV BACnetVendorId = 1085 - BACnetVendorId_ISYS_INTELLIGENT_SYSTEMS BACnetVendorId = 1086 - BACnetVendorId_GAS_DETECTION_AUSTRALIA_PTY_LTD BACnetVendorId = 1087 - BACnetVendorId_KINCO_AUTOMATION_SHANGHAI_LTD BACnetVendorId = 1088 - BACnetVendorId_LARS_ENERGYLLC BACnetVendorId = 1089 - BACnetVendorId_FLAMEFASTUK_LTD BACnetVendorId = 1090 - BACnetVendorId_ROYAL_SERVICE_AIR_CONDITIONING BACnetVendorId = 1091 - BACnetVendorId_AMPIO_SP_ZOO BACnetVendorId = 1092 - BACnetVendorId_INOVONICS_WIRELESS_CORPORATION BACnetVendorId = 1093 - BACnetVendorId_NVENT_THERMAL_MANAGEMENT BACnetVendorId = 1094 - BACnetVendorId_SINOWELL_CONTROL_SYSTEM_LTD BACnetVendorId = 1095 - BACnetVendorId_MOXA_INC BACnetVendorId = 1096 - BACnetVendorId_MATRIXI_CONTROLSDNBHD BACnetVendorId = 1097 - BACnetVendorId_PURPLE_SWIFT BACnetVendorId = 1098 - BACnetVendorId_OTIM_TECHNOLOGIES BACnetVendorId = 1099 - BACnetVendorId_FLOW_MATE_LIMITED BACnetVendorId = 1100 - BACnetVendorId_DEGREE_CONTROLS_INC BACnetVendorId = 1101 - BACnetVendorId_FEI_XING_SHANGHAI_SOFTWARE_TECHNOLOGIES_CO_LTD BACnetVendorId = 1102 - BACnetVendorId_BERG_GMBH BACnetVendorId = 1103 - BACnetVendorId_ARENZIT BACnetVendorId = 1104 - BACnetVendorId_EDELSTROM_ELECTRONIC_DEVICES_DESIGNINGLLC BACnetVendorId = 1105 - BACnetVendorId_DRIVE_CONNECTLLC BACnetVendorId = 1106 - BACnetVendorId_DEVELOP_NOW BACnetVendorId = 1107 - BACnetVendorId_POORT BACnetVendorId = 1108 - BACnetVendorId_VMEIL_INFORMATION_SHANGHAI_LTD BACnetVendorId = 1109 - BACnetVendorId_RAYLEIGH_INSTRUMENTS BACnetVendorId = 1110 - BACnetVendorId_CODESYS_DEVELOPMENT BACnetVendorId = 1112 - BACnetVendorId_SMARTWARE_TECHNOLOGIES_GROUPLLC BACnetVendorId = 1113 - BACnetVendorId_POLAR_BEAR_SOLUTIONS BACnetVendorId = 1114 - BACnetVendorId_CODRA BACnetVendorId = 1115 - BACnetVendorId_PHAROS_ARCHITECTURAL_CONTROLS_LTD BACnetVendorId = 1116 - BACnetVendorId_ENGI_NEAR_LTD BACnetVendorId = 1117 - BACnetVendorId_AD_HOC_ELECTRONICS BACnetVendorId = 1118 - BACnetVendorId_UNIFIED_MICROSYSTEMS BACnetVendorId = 1119 - BACnetVendorId_INDUSTRIEELEKTRONIK_BRANDENBURG_GMBH BACnetVendorId = 1120 - BACnetVendorId_HARTMANN_GMBH BACnetVendorId = 1121 - BACnetVendorId_PISCADA BACnetVendorId = 1122 - BACnetVendorId_KM_BSYSTEMSSRO BACnetVendorId = 1123 - BACnetVendorId_POWER_TECH_ENGINEERINGAS BACnetVendorId = 1124 - BACnetVendorId_TELEFONBAU_ARTHUR_SCHWABE_GMBH_COKG BACnetVendorId = 1125 - BACnetVendorId_WUXI_FISTWELOVE_TECHNOLOGY_CO_LTD BACnetVendorId = 1126 - BACnetVendorId_PRYSM BACnetVendorId = 1127 - BACnetVendorId_STEINEL_GMBH BACnetVendorId = 1128 - BACnetVendorId_GEORG_FISCHERJRGAG BACnetVendorId = 1129 - BACnetVendorId_MAKE_DEVELOPSL BACnetVendorId = 1130 - BACnetVendorId_MONNIT_CORPORATION BACnetVendorId = 1131 - BACnetVendorId_MIRROR_LIFE_CORPORATION BACnetVendorId = 1132 - BACnetVendorId_SECURE_METERS_LIMITED BACnetVendorId = 1133 - BACnetVendorId_PECO BACnetVendorId = 1134 - BACnetVendorId_CCTECH_INC BACnetVendorId = 1135 - BACnetVendorId_LIGHT_FI_LIMITED BACnetVendorId = 1136 - BACnetVendorId_NICE_SPA BACnetVendorId = 1137 - BACnetVendorId_FIBER_SEN_SYS_INC BACnetVendorId = 1138 - BACnetVendorId_BD_BUCHTAUND_DEGEORGI BACnetVendorId = 1139 - BACnetVendorId_VENTACITY_SYSTEMS_INC BACnetVendorId = 1140 - BACnetVendorId_HITACHI_JOHNSON_CONTROLS_AIR_CONDITIONING_INC BACnetVendorId = 1141 - BACnetVendorId_SAGE_METERING_INC BACnetVendorId = 1142 - BACnetVendorId_ANDEL_LIMITED BACnetVendorId = 1143 - BACnetVendorId_ECO_SMART_TECHNOLOGIES BACnetVendorId = 1144 - BACnetVendorId_SET BACnetVendorId = 1145 - BACnetVendorId_PROTEC_FIRE_DETECTION_SPAINSL BACnetVendorId = 1146 - BACnetVendorId_AGRAMERUG BACnetVendorId = 1147 - BACnetVendorId_ANYLINK_ELECTRONIC_GMBH BACnetVendorId = 1148 - BACnetVendorId_SCHINDLER_LTD BACnetVendorId = 1149 - BACnetVendorId_JIBREEL_ABDEEN_EST BACnetVendorId = 1150 - BACnetVendorId_FLUIDYNE_CONTROL_SYSTEMS_PVT_LTD BACnetVendorId = 1151 - BACnetVendorId_PRISM_SYSTEMS_INC BACnetVendorId = 1152 - BACnetVendorId_ENERTIV BACnetVendorId = 1153 - BACnetVendorId_MIRASOFT_GMBH_COKG BACnetVendorId = 1154 - BACnetVendorId_DUALTECHIT BACnetVendorId = 1155 - BACnetVendorId_COUNTLOGICLLC BACnetVendorId = 1156 - BACnetVendorId_KOHLER BACnetVendorId = 1157 - BACnetVendorId_CHEN_SEN_CONTROLS_CO_LTD BACnetVendorId = 1158 - BACnetVendorId_GREENHECK BACnetVendorId = 1159 - BACnetVendorId_INTWINE_CONNECTLLC BACnetVendorId = 1160 - BACnetVendorId_KARLBORGS_ELKONTROLL BACnetVendorId = 1161 - BACnetVendorId_DATAKOM BACnetVendorId = 1162 - BACnetVendorId_HOGA_CONTROLAS BACnetVendorId = 1163 - BACnetVendorId_COOL_AUTOMATION BACnetVendorId = 1164 - BACnetVendorId_INTER_SEARCH_CO_LTD BACnetVendorId = 1165 - BACnetVendorId_DABBEL_AUTOMATION_INTELLIGENCE_GMBH BACnetVendorId = 1166 - BACnetVendorId_GADGEON_ENGINEERING_SMARTNESS BACnetVendorId = 1167 - BACnetVendorId_COSTER_GROUP_SRL BACnetVendorId = 1168 - BACnetVendorId_WALTER_MLLERAG BACnetVendorId = 1169 - BACnetVendorId_FLUKE BACnetVendorId = 1170 - BACnetVendorId_QUINTEX_SYSTEMS_LTD BACnetVendorId = 1171 - BACnetVendorId_SENFFICIENTSDNBHD BACnetVendorId = 1172 - BACnetVendorId_NUBEIO_OPERATIONS_PTY_LTD BACnetVendorId = 1173 - BACnetVendorId_DAS_INTEGRATOR_PTE_LTD BACnetVendorId = 1174 - BACnetVendorId_CREVIS_CO_LTD BACnetVendorId = 1175 - BACnetVendorId_I_SQUAREDSOFTWAREINC BACnetVendorId = 1176 - BACnetVendorId_KTG_GMBH BACnetVendorId = 1177 - BACnetVendorId_POK_GROUP_OY BACnetVendorId = 1178 - BACnetVendorId_ADISCOM BACnetVendorId = 1179 - BACnetVendorId_INCUSENSE BACnetVendorId = 1180 - BACnetVendorId_F BACnetVendorId = 1181 - BACnetVendorId_ANORD_MARDIX_INC BACnetVendorId = 1182 - BACnetVendorId_HOSCH_GEBUDEAUTOMATION_NEUE_PRODUKTE_GMBH BACnetVendorId = 1183 - BACnetVendorId_BOSCHIO_GMBH BACnetVendorId = 1184 - BACnetVendorId_ROYAL_BOON_EDAM_INTERNATIONALBV BACnetVendorId = 1185 - BACnetVendorId_CLACK_CORPORATION BACnetVendorId = 1186 - BACnetVendorId_UNITEX_CONTROLSLLC BACnetVendorId = 1187 - BACnetVendorId_KTC_GTEBORGAB BACnetVendorId = 1188 - BACnetVendorId_INTERZONAB BACnetVendorId = 1189 - BACnetVendorId_ISDEINGSL BACnetVendorId = 1190 - BACnetVendorId_AB_MAUTOMATIONBUILDINGMESSAGING_GMBH BACnetVendorId = 1191 - BACnetVendorId_KENTEC_ELECTRONICS_LTD BACnetVendorId = 1192 - BACnetVendorId_EMERSON_COMMERCIALAND_RESIDENTIAL_SOLUTIONS BACnetVendorId = 1193 - BACnetVendorId_POWERSIDE BACnetVendorId = 1194 - BACnetVendorId_SMC_GROUP BACnetVendorId = 1195 - BACnetVendorId_EOS_WEATHER_INSTRUMENTS BACnetVendorId = 1196 - BACnetVendorId_ZONEX_SYSTEMS BACnetVendorId = 1197 - BACnetVendorId_GENEREX_SYSTEMS_COMPUTERVERTRIEBSGESELLSCHAFTMBH BACnetVendorId = 1198 - BACnetVendorId_ENERGY_WALLLLC BACnetVendorId = 1199 - BACnetVendorId_THERMOFIN BACnetVendorId = 1200 - BACnetVendorId_SDATAWAYSA BACnetVendorId = 1201 - BACnetVendorId_BIDDLE_AIR_SYSTEMS_LIMITED BACnetVendorId = 1202 - BACnetVendorId_KESSLER_ELLIS_PRODUCTS BACnetVendorId = 1203 - BACnetVendorId_THERMOSCREENS BACnetVendorId = 1204 - BACnetVendorId_MODIO BACnetVendorId = 1205 - BACnetVendorId_NEWRON_SOLUTIONS BACnetVendorId = 1206 - BACnetVendorId_UNITRONICS BACnetVendorId = 1207 - BACnetVendorId_TRILUX_GMBH_COKG BACnetVendorId = 1208 - BACnetVendorId_KOLLMORGEN_STEUERUNGSTECHNIK_GMBH BACnetVendorId = 1209 - BACnetVendorId_BOSCH_REXROTHAG BACnetVendorId = 1210 - BACnetVendorId_ALARKO_CARRIER BACnetVendorId = 1211 - BACnetVendorId_VERDIGRIS_TECHNOLOGIES BACnetVendorId = 1212 - BACnetVendorId_SHANGHAISIIC_LONGCHUANG_SMARTECH_SO_LTD BACnetVendorId = 1213 - BACnetVendorId_QUINDA_CO BACnetVendorId = 1214 - BACnetVendorId_GRUNERAG BACnetVendorId = 1215 - BACnetVendorId_BACMOVE BACnetVendorId = 1216 - BACnetVendorId_PSIDACAB BACnetVendorId = 1217 - BACnetVendorId_ISICON_CONTROL_AUTOMATION BACnetVendorId = 1218 - BACnetVendorId_BIG_ASS_FANS BACnetVendorId = 1219 - BACnetVendorId_DIN_DIETMAR_NOCKER_FACILITY_MANAGEMENT_GMBH BACnetVendorId = 1220 - BACnetVendorId_TELDIO BACnetVendorId = 1221 - BACnetVendorId_MIKROKLIM_ASRO BACnetVendorId = 1222 - BACnetVendorId_DENSITY BACnetVendorId = 1223 - BACnetVendorId_ICONAG_LEITTECHNIK_GMBH BACnetVendorId = 1224 - BACnetVendorId_AWAIR BACnetVendorId = 1225 - BACnetVendorId_TD_ENGINEERING_LTD BACnetVendorId = 1226 - BACnetVendorId_SISTEMAS_DIGITALES BACnetVendorId = 1227 - BACnetVendorId_LOXONE_ELECTRONICS_GMBH BACnetVendorId = 1228 - BACnetVendorId_ACTRON_AIR BACnetVendorId = 1229 - BACnetVendorId_INDUCTIVE_AUTOMATION BACnetVendorId = 1230 - BACnetVendorId_THOR_ENGINEERING_GMBH BACnetVendorId = 1231 - BACnetVendorId_BERNER_INTERNATIONALLLC BACnetVendorId = 1232 - BACnetVendorId_POTSDAM_SENSORSLLC BACnetVendorId = 1233 - BACnetVendorId_KOHLER_MIRA_LTD BACnetVendorId = 1234 - BACnetVendorId_TECOMON_GMBH BACnetVendorId = 1235 - BACnetVendorId_TWO_DIMENSIONAL_INSTRUMENTSLLC BACnetVendorId = 1236 - BACnetVendorId_LEFA_TECHNOLOGIES_PTE_LTD BACnetVendorId = 1237 - BACnetVendorId_EATONCEAG_NOTLICHTSYSTEME_GMBH BACnetVendorId = 1238 - BACnetVendorId_COMMBOX_TECNOLOGIA BACnetVendorId = 1239 - BACnetVendorId_IP_VIDEO_CORPORATION BACnetVendorId = 1240 - BACnetVendorId_BENDER_GMBH_COKG BACnetVendorId = 1241 - BACnetVendorId_RHYMEBUS_CORPORATION BACnetVendorId = 1242 - BACnetVendorId_AXON_SYSTEMS_LTD BACnetVendorId = 1243 - BACnetVendorId_ENGINEERED_AIR BACnetVendorId = 1244 - BACnetVendorId_ELIPSE_SOFTWARE_LTDA BACnetVendorId = 1245 - BACnetVendorId_SIMATIX_BUILDING_TECHNOLOGIES_PVT_LTD BACnetVendorId = 1246 - BACnetVendorId_WA_BENJAMIN_ELECTRIC_CO BACnetVendorId = 1247 - BACnetVendorId_TROX_AIR_CONDITIONING_COMPONENTS_SUZHOU_CO_LTD BACnetVendorId = 1248 - BACnetVendorId_SC_MEDICAL_PTY_LTD BACnetVendorId = 1249 - BACnetVendorId_ELCANICAS BACnetVendorId = 1250 - BACnetVendorId_OBEOAS BACnetVendorId = 1251 - BACnetVendorId_TAPA_INC BACnetVendorId = 1252 - BACnetVendorId_ASE_SMART_ENERGY_INC BACnetVendorId = 1253 - BACnetVendorId_PERFORMANCE_SERVICES_INC BACnetVendorId = 1254 - BACnetVendorId_VERIDIFY_SECURITY BACnetVendorId = 1255 - BACnetVendorId_CD_INNOVATIONLTD BACnetVendorId = 1256 - BACnetVendorId_BEN_PEOPLES_INDUSTRIESLLC BACnetVendorId = 1257 - BACnetVendorId_UNICOMM_SPZOO BACnetVendorId = 1258 - BACnetVendorId_THING_TECHNOLOGIES_GMBH BACnetVendorId = 1259 - BACnetVendorId_BEIJING_HAI_LIN_ENERGY_SAVING_TECHNOLOGY_INC BACnetVendorId = 1260 - BACnetVendorId_DIGITAL_REALTY BACnetVendorId = 1261 - BACnetVendorId_AGROWTEK_INC BACnetVendorId = 1262 - BACnetVendorId_DSP_INNOVATIONBV BACnetVendorId = 1263 - BACnetVendorId_STV_ELECTRONIC_GMBH BACnetVendorId = 1264 - BACnetVendorId_ELMEASURE_INDIA_PVT_LTD BACnetVendorId = 1265 - BACnetVendorId_PINESHORE_ENERGYLLC BACnetVendorId = 1266 - BACnetVendorId_BRASCH_ENVIRONMENTAL_TECHNOLOGIESLLC BACnetVendorId = 1267 - BACnetVendorId_LION_CONTROLS_COLTD BACnetVendorId = 1268 - BACnetVendorId_SINUX BACnetVendorId = 1269 - BACnetVendorId_AVNET_INC BACnetVendorId = 1270 - BACnetVendorId_SOMFY_ACTIVITESSA BACnetVendorId = 1271 - BACnetVendorId_AMICO BACnetVendorId = 1272 - BACnetVendorId_SAGE_GLASS BACnetVendorId = 1273 - BACnetVendorId_AU_VERTE BACnetVendorId = 1274 - BACnetVendorId_AGILE_CONNECTS_PVT_LTD BACnetVendorId = 1275 - BACnetVendorId_LOCIMATION_PTY_LTD BACnetVendorId = 1276 - BACnetVendorId_ENVIO_SYSTEMS_GMBH BACnetVendorId = 1277 - BACnetVendorId_VOYTECH_SYSTEMS_LIMITED BACnetVendorId = 1278 - BACnetVendorId_DAVIDSMEYERUND_PAUL_GMBH BACnetVendorId = 1279 - BACnetVendorId_LUSHER_ENGINEERING_SERVICES BACnetVendorId = 1280 - BACnetVendorId_CHNT_NANJING_TECHSEL_INTELLIGENT_COMPANYLTD BACnetVendorId = 1281 - BACnetVendorId_THREETRONICS_PTY_LTD BACnetVendorId = 1282 - BACnetVendorId_SKY_FOUNDRYLLC BACnetVendorId = 1283 - BACnetVendorId_HANIL_PRO_TECH BACnetVendorId = 1284 - BACnetVendorId_SENSORSCALL BACnetVendorId = 1285 - BACnetVendorId_SHANGHAI_JINGPU_INFORMATION_TECHNOLOGY_CO_LTD BACnetVendorId = 1286 - BACnetVendorId_LICHTMANUFAKTUR_BERLIN_GMBH BACnetVendorId = 1287 - BACnetVendorId_ECO_PARKING_TECHNOLOGIES BACnetVendorId = 1288 - BACnetVendorId_ENVISION_DIGITAL_INTERNATIONAL_PTE_LTD BACnetVendorId = 1289 - BACnetVendorId_ANTONY_DEVELOPPEMENT_ELECTRONIQUE BACnetVendorId = 1290 - BACnetVendorId_ISYSTEMS BACnetVendorId = 1291 - BACnetVendorId_THUREON_INTERNATIONAL_LIMITED BACnetVendorId = 1292 - BACnetVendorId_PULSAFEEDER BACnetVendorId = 1293 - BACnetVendorId_MEGA_CHIPS_CORPORATION BACnetVendorId = 1294 - BACnetVendorId_TES_CONTROLS BACnetVendorId = 1295 - BACnetVendorId_CERMATE BACnetVendorId = 1296 - BACnetVendorId_GRAND_VALLEY_STATE_UNIVERSITY BACnetVendorId = 1297 - BACnetVendorId_SYMCON_GMBH BACnetVendorId = 1298 - BACnetVendorId_THE_CHICAGO_FAUCET_COMPANY BACnetVendorId = 1299 - BACnetVendorId_GEBERITAG BACnetVendorId = 1300 - BACnetVendorId_REX_CONTROLS BACnetVendorId = 1301 - BACnetVendorId_IVMS_GMBH BACnetVendorId = 1302 - BACnetVendorId_MNPP_SATURN_LTD BACnetVendorId = 1303 - BACnetVendorId_REGAL_BELOIT BACnetVendorId = 1304 - BACnetVendorId_ACS_AIR_CONDITIONING_SOLUTIONS BACnetVendorId = 1305 - BACnetVendorId_GBX_TECHNOLOGYLLC BACnetVendorId = 1306 - BACnetVendorId_KAITERRA BACnetVendorId = 1307 - BACnetVendorId_THIN_KUANLOT_TECHNOLOGY_SHANGHAI_CO_LTD BACnetVendorId = 1308 - BACnetVendorId_HO_CO_STOBV BACnetVendorId = 1309 - BACnetVendorId_SHENZHENASAI_TECHNOLOGY_CO_LTD BACnetVendorId = 1310 - BACnetVendorId_RPS_SPA BACnetVendorId = 1311 - BACnetVendorId_ESMSOLUTIONS BACnetVendorId = 1312 - BACnetVendorId_IO_TECH_SYSTEMS_LIMITED BACnetVendorId = 1313 - BACnetVendorId_I_AUTO_LOGIC_CO_LTD BACnetVendorId = 1314 - BACnetVendorId_NEW_AGE_MICROLLC BACnetVendorId = 1315 - BACnetVendorId_GUARDIAN_GLASS BACnetVendorId = 1316 - BACnetVendorId_GUANGZHOU_ZHAOYU_INFORMATION_TECHNOLOGY BACnetVendorId = 1317 - BACnetVendorId_ACE_IOT_SOLUTIONSLLC BACnetVendorId = 1318 - BACnetVendorId_PORIS_ELECTRONICS_CO_LTD BACnetVendorId = 1319 - BACnetVendorId_TERMINUS_TECHNOLOGIES_GROUP BACnetVendorId = 1320 - BACnetVendorId_INTECH1_INC BACnetVendorId = 1321 - BACnetVendorId_ACCURATE_ELECTRONICS BACnetVendorId = 1322 - BACnetVendorId_FLUENCE_BIOENGINEERING BACnetVendorId = 1323 - BACnetVendorId_MUN_HEAN_SINGAPORE_PTE_LTD BACnetVendorId = 1324 - BACnetVendorId_KATRONICAG_COKG BACnetVendorId = 1325 - BACnetVendorId_SUZHOU_XIN_AO_INFORMATION_TECHNOLOGY_CO_LTD BACnetVendorId = 1326 - BACnetVendorId_LINKTEKK_TECHNOLOGYJSC BACnetVendorId = 1327 - BACnetVendorId_STIRLING_ULTRACOLD BACnetVendorId = 1328 - BACnetVendorId_UV_PARTNERS_INC BACnetVendorId = 1329 - BACnetVendorId_PRO_MINENT_GMBH BACnetVendorId = 1330 - BACnetVendorId_MULTI_TECH_SYSTEMS_INC BACnetVendorId = 1331 - BACnetVendorId_JUMO_GMBH_COKG BACnetVendorId = 1332 - BACnetVendorId_QINGDAO_HUARUI_TECHNOLOGY_CO_LTD BACnetVendorId = 1333 - BACnetVendorId_CAIRN_SYSTEMES BACnetVendorId = 1334 - BACnetVendorId_NEURO_LOGIC_RESEARCH_CORP BACnetVendorId = 1335 - BACnetVendorId_TRANSITION_TECHNOLOGIES_ADVANCED_SOLUTIONS_SPZOO BACnetVendorId = 1336 - BACnetVendorId_XXTERBV BACnetVendorId = 1337 - BACnetVendorId_PASSIVE_LOGIC BACnetVendorId = 1338 - BACnetVendorId_EN_SMART_CONTROLS BACnetVendorId = 1339 - BACnetVendorId_WATTS_HEATINGAND_HOT_WATER_SOLUTIONSDBA_LYNC BACnetVendorId = 1340 - BACnetVendorId_TROPOSPHAIRA_TECHNOLOGIESLLP BACnetVendorId = 1341 - BACnetVendorId_NETWORK_THERMOSTAT BACnetVendorId = 1342 - BACnetVendorId_TITANIUM_INTELLIGENT_SOLUTIONSLLC BACnetVendorId = 1343 - BACnetVendorId_NUMA_PRODUCTSLLC BACnetVendorId = 1344 - BACnetVendorId_WAREMA_RENKHOFFSE BACnetVendorId = 1345 - BACnetVendorId_FRESEAS BACnetVendorId = 1346 - BACnetVendorId_MAPPED BACnetVendorId = 1347 - BACnetVendorId_ELEKTRODESIG_NVENTILATORYSRO BACnetVendorId = 1348 - BACnetVendorId_AIR_CARE_AUTOMATION_INC BACnetVendorId = 1349 - BACnetVendorId_ANTRUM BACnetVendorId = 1350 - BACnetVendorId_BAO_LINH_CONNECT_TECHNOLOGY BACnetVendorId = 1351 - BACnetVendorId_VIRGINIA_CONTROLSLLC BACnetVendorId = 1352 - BACnetVendorId_DUOSYSSDNBHD BACnetVendorId = 1353 - BACnetVendorId_ONSENSAS BACnetVendorId = 1354 - BACnetVendorId_VAUGHN_THERMAL_CORPORATION BACnetVendorId = 1355 - BACnetVendorId_THERMOPLASTIC_ENGINEERING_LTDTPE BACnetVendorId = 1356 - BACnetVendorId_WIRTH_RESEARCH_LTD BACnetVendorId = 1357 - BACnetVendorId_SST_AUTOMATION BACnetVendorId = 1358 - BACnetVendorId_SHANGHAI_BENCOL_ELECTRONIC_TECHNOLOGY_CO_LTD BACnetVendorId = 1359 - BACnetVendorId_AIWAA_SYSTEMS_PRIVATE_LIMITED BACnetVendorId = 1360 - BACnetVendorId_ENLESS_WIRELESS BACnetVendorId = 1361 - BACnetVendorId_OZUNO_ENGINEERING_PTY_LTD BACnetVendorId = 1362 - BACnetVendorId_HUBBELL_THE_ELECTRIC_HEATER_COMPANY BACnetVendorId = 1363 - BACnetVendorId_INDUSTRIAL_TURNAROUND_CORPORATIONITAC BACnetVendorId = 1364 - BACnetVendorId_WADSWORTH_CONTROL_SYSTEMS BACnetVendorId = 1365 - BACnetVendorId_SERVICES_HILO_INC BACnetVendorId = 1366 - BACnetVendorId_IDM_ENERGIESYSTEME_GMBH BACnetVendorId = 1367 - BACnetVendorId_BE_NEXTBV BACnetVendorId = 1368 - BACnetVendorId_CLEAN_AIRAI_CORPORATION BACnetVendorId = 1369 - BACnetVendorId_REVOLUTION_MICROELECTRONICS_AMERICA_INC BACnetVendorId = 1370 - BACnetVendorId_ARENDARIT_SECURITY_GMBH BACnetVendorId = 1371 - BACnetVendorId_ZED_BEE_TECHNOLOGIES_PVT_LTD BACnetVendorId = 1372 - BACnetVendorId_WINMATE_TECHNOLOGY_SOLUTIONS_PVT_LTD BACnetVendorId = 1373 - BACnetVendorId_SENTICON_LTD BACnetVendorId = 1374 - BACnetVendorId_ROSSAKERAB BACnetVendorId = 1375 - BACnetVendorId_OPIT_SOLUTIONS_LTD BACnetVendorId = 1376 - BACnetVendorId_HOTOWELL_INTERNATIONAL_CO_LIMITED BACnetVendorId = 1377 - BACnetVendorId_INIM_ELECTRONICSSRL_UNIPERSONALE BACnetVendorId = 1378 - BACnetVendorId_AIRTHINGSASA BACnetVendorId = 1379 - BACnetVendorId_ANALOG_DEVICES_INC BACnetVendorId = 1380 - BACnetVendorId_AI_DIRECTIONSDMCC BACnetVendorId = 1381 - BACnetVendorId_PRIMA_ELECTRO_SPA BACnetVendorId = 1382 - BACnetVendorId_KLT_CONTROL_SYSTEM_LTD BACnetVendorId = 1383 - BACnetVendorId_EVOLUTION_CONTROLS_INC BACnetVendorId = 1384 - BACnetVendorId_BEVER_INNOVATIONS BACnetVendorId = 1385 - BACnetVendorId_PELICAN_WIRELESS_SYSTEMS BACnetVendorId = 1386 - BACnetVendorId_CONTROL_CONCEPTS_INC BACnetVendorId = 1387 - BACnetVendorId_AUGMATIC_TECHNOLOGIES_PVT_LTD BACnetVendorId = 1388 - BACnetVendorId_XIAMEN_MILESIGHTLOT_CO_LTD BACnetVendorId = 1389 - BACnetVendorId_TIANJIN_ANJIELOT_SCHIENCEAND_TECHNOLOGY_CO_LTD BACnetVendorId = 1390 - BACnetVendorId_GUANGZHOUS_ENERGY_ELECTRONICS_TECHNOLOGY_CO_LTD BACnetVendorId = 1391 - BACnetVendorId_AKVO_ATMOSPHERIC_WATER_SYSTEMS_PVT_LTD BACnetVendorId = 1392 - BACnetVendorId_EM_FIRST_CO_LTD BACnetVendorId = 1393 - BACnetVendorId_IION_SYSTEMS_APS BACnetVendorId = 1394 - BACnetVendorId_SAF_TEHNIKAJSC BACnetVendorId = 1396 - BACnetVendorId_KOMFORTIQ_INC BACnetVendorId = 1397 - BACnetVendorId_COOL_TERA_LIMITED BACnetVendorId = 1398 - BACnetVendorId_HADRON_SOLUTIONS_SRLS BACnetVendorId = 1399 - BACnetVendorId_BITPOOL BACnetVendorId = 1401 - BACnetVendorId_SONICULLC BACnetVendorId = 1402 - BACnetVendorId_RISHABH_INSTRUMENTS_LIMITED BACnetVendorId = 1403 - BACnetVendorId_THING_WAREHOUSELLC BACnetVendorId = 1404 - BACnetVendorId_INNOFRIENDS_GMBH BACnetVendorId = 1405 - BACnetVendorId_METRONICAKP_SPJ BACnetVendorId = 1406 - BACnetVendorId_UNKNOWN_VENDOR BACnetVendorId = 0xFFFF + BACnetVendorId_FABTRONICS_AUSTRALIA_PTY_LTD BACnetVendorId = 953 + BACnetVendorId_SLAT BACnetVendorId = 954 + BACnetVendorId_SOFTWARE_MOTOR_CORPORATION BACnetVendorId = 955 + BACnetVendorId_ARMSTRONG_INTERNATIONAL_INC BACnetVendorId = 956 + BACnetVendorId_STERIL_AIRE_INC BACnetVendorId = 957 + BACnetVendorId_INFINIQUE BACnetVendorId = 958 + BACnetVendorId_ARCOM BACnetVendorId = 959 + BACnetVendorId_ARGO_PERFORMANCE_LTD BACnetVendorId = 960 + BACnetVendorId_DIALIGHT BACnetVendorId = 961 + BACnetVendorId_IDEAL_TECHNICAL_SOLUTIONS BACnetVendorId = 962 + BACnetVendorId_NEUROBATAG BACnetVendorId = 963 + BACnetVendorId_NEYER_SOFTWARE_CONSULTINGLLC BACnetVendorId = 964 + BACnetVendorId_SCADA_TECHNOLOGY_DEVELOPMENT_CO_LTD BACnetVendorId = 965 + BACnetVendorId_DEMAND_LOGIC_LIMITED BACnetVendorId = 966 + BACnetVendorId_GWA_GROUP_LIMITED BACnetVendorId = 967 + BACnetVendorId_OCCITALINE BACnetVendorId = 968 + BACnetVendorId_NAO_DIGITAL_CO_LTD BACnetVendorId = 969 + BACnetVendorId_SHENZHEN_CHANSLINK_NETWORK_TECHNOLOGY_CO_LTD BACnetVendorId = 970 + BACnetVendorId_SAMSUNG_ELECTRONICS_CO_LTD BACnetVendorId = 971 + BACnetVendorId_MESA_LABORATORIES_INC BACnetVendorId = 972 + BACnetVendorId_FISCHER BACnetVendorId = 973 + BACnetVendorId_OP_SYS_SOLUTIONS_LTD BACnetVendorId = 974 + BACnetVendorId_ADVANCED_DEVICES_LIMITED BACnetVendorId = 975 + BACnetVendorId_CONDAIR BACnetVendorId = 976 + BACnetVendorId_INELCOM_INGENIERIA_ELECTRONICA_COMERCIALSA BACnetVendorId = 977 + BACnetVendorId_GRID_POINT_INC BACnetVendorId = 978 + BACnetVendorId_ADF_TECHNOLOGIES_SDN_BHD BACnetVendorId = 979 + BACnetVendorId_EPM_INC BACnetVendorId = 980 + BACnetVendorId_LIGHTING_CONTROLS_LTD BACnetVendorId = 981 + BACnetVendorId_PERIX_CONTROLS_LTD BACnetVendorId = 982 + BACnetVendorId_AERCO_INTERNATIONAL_INC BACnetVendorId = 983 + BACnetVendorId_KONE_INC BACnetVendorId = 984 + BACnetVendorId_ZIEHL_ABEGGSE BACnetVendorId = 985 + BACnetVendorId_ROBOTSA BACnetVendorId = 986 + BACnetVendorId_OPTIGO_NETWORKS_INC BACnetVendorId = 987 + BACnetVendorId_OPENMOTICSBVBA BACnetVendorId = 988 + BACnetVendorId_METROPOLITAN_INDUSTRIES_INC BACnetVendorId = 989 + BACnetVendorId_HUAWEI_TECHNOLOGIES_CO_LTD BACnetVendorId = 990 + BACnetVendorId_DIGITAL_LUMENS_INC BACnetVendorId = 991 + BACnetVendorId_VANTI BACnetVendorId = 992 + BACnetVendorId_CREE_LIGHTING BACnetVendorId = 993 + BACnetVendorId_RICHMOND_HEIGHTSSDNBHD BACnetVendorId = 994 + BACnetVendorId_PAYNE_SPARKMAN_LIGHTING_MANGEMENT BACnetVendorId = 995 + BACnetVendorId_ASHCROFT BACnetVendorId = 996 + BACnetVendorId_JET_CONTROLS_CORP BACnetVendorId = 997 + BACnetVendorId_ZUMTOBEL_LIGHTING_GMBH BACnetVendorId = 998 + BACnetVendorId_EKON_GMBH BACnetVendorId = 1000 + BACnetVendorId_MOLEX BACnetVendorId = 1001 + BACnetVendorId_MACO_LIGHTING_PTY_LTD BACnetVendorId = 1002 + BACnetVendorId_AXECON_CORP BACnetVendorId = 1003 + BACnetVendorId_TENSORPLC BACnetVendorId = 1004 + BACnetVendorId_KASEMAN_ENVIRONMENTAL_CONTROL_EQUIPMENT_SHANGHAI_LIMITED BACnetVendorId = 1005 + BACnetVendorId_AB_AXIS_INDUSTRIES BACnetVendorId = 1006 + BACnetVendorId_NETIX_CONTROLS BACnetVendorId = 1007 + BACnetVendorId_ELDRIDGE_PRODUCTS_INC BACnetVendorId = 1008 + BACnetVendorId_MICRONICS BACnetVendorId = 1009 + BACnetVendorId_FORTECHO_SOLUTIONS_LTD BACnetVendorId = 1010 + BACnetVendorId_SELLERS_MANUFACTURING_COMPANY BACnetVendorId = 1011 + BACnetVendorId_RITE_HITE_DOORS_INC BACnetVendorId = 1012 + BACnetVendorId_VIOLET_DEFENSELLC BACnetVendorId = 1013 + BACnetVendorId_SIMNA BACnetVendorId = 1014 + BACnetVendorId_MULTINERGIE_BEST_INC BACnetVendorId = 1015 + BACnetVendorId_MEGA_SYSTEM_TECHNOLOGIES_INC BACnetVendorId = 1016 + BACnetVendorId_RHEEM BACnetVendorId = 1017 + BACnetVendorId_ING_PUNZENBERGERCOPADATA_GMBH BACnetVendorId = 1018 + BACnetVendorId_MEC_ELECTRONICS_GMBH BACnetVendorId = 1019 + BACnetVendorId_TACO_COMFORT_SOLUTIONS BACnetVendorId = 1020 + BACnetVendorId_ALEXANDER_MAIER_GMBH BACnetVendorId = 1021 + BACnetVendorId_ECORITHM_INC BACnetVendorId = 1022 + BACnetVendorId_ACCURRO_LTD BACnetVendorId = 1023 + BACnetVendorId_ROMTECK_AUSTRALIA_PTY_LTD BACnetVendorId = 1024 + BACnetVendorId_SPLASH_MONITORING_LIMITED BACnetVendorId = 1025 + BACnetVendorId_LIGHT_APPLICATION BACnetVendorId = 1026 + BACnetVendorId_LOGICAL_BUILDING_AUTOMATION BACnetVendorId = 1027 + BACnetVendorId_EXILIGHT_OY BACnetVendorId = 1028 + BACnetVendorId_HAGER_ELECTROSAS BACnetVendorId = 1029 + BACnetVendorId_KLIF_COLTD BACnetVendorId = 1030 + BACnetVendorId_HYGRO_MATIK BACnetVendorId = 1031 + BACnetVendorId_DANIEL_MOUSSEAU_PROGRAMMATION_ELECTRONIQUE BACnetVendorId = 1032 + BACnetVendorId_AERIONICS_INC BACnetVendorId = 1033 + BACnetVendorId_MS_ELECTRONIQUE_LTEE BACnetVendorId = 1034 + BACnetVendorId_AUTOMATION_COMPONENTS_INC BACnetVendorId = 1035 + BACnetVendorId_NIOBRARA_RESEARCH_DEVELOPMENT_CORPORATION BACnetVendorId = 1036 + BACnetVendorId_NETCOM_SICHERHEITSTECHNIK_GMBH BACnetVendorId = 1037 + BACnetVendorId_LUMELSA BACnetVendorId = 1038 + BACnetVendorId_GREAT_PLAINS_INDUSTRIES_INC BACnetVendorId = 1039 + BACnetVendorId_DOMOTICA_LABSSRL BACnetVendorId = 1040 + BACnetVendorId_ENERGY_CLOUD_INC BACnetVendorId = 1041 + BACnetVendorId_VOMATEC BACnetVendorId = 1042 + BACnetVendorId_DEMMA_COMPANIES BACnetVendorId = 1043 + BACnetVendorId_VALSENA BACnetVendorId = 1044 + BACnetVendorId_COMSYS_BRTSCHAG BACnetVendorId = 1045 + BACnetVendorId_B_GRID BACnetVendorId = 1046 + BACnetVendorId_MDJ_SOFTWARE_PTY_LTD BACnetVendorId = 1047 + BACnetVendorId_DIMONOFF_INC BACnetVendorId = 1048 + BACnetVendorId_EDOMO_SYSTEMS_GMBH BACnetVendorId = 1049 + BACnetVendorId_EFFEKTIVLLC BACnetVendorId = 1050 + BACnetVendorId_STEAMO_VAP BACnetVendorId = 1051 + BACnetVendorId_GRANDCENTRIX_GMBH BACnetVendorId = 1052 + BACnetVendorId_WEINTEK_LABS_INC BACnetVendorId = 1053 + BACnetVendorId_INTEFOX_GMBH BACnetVendorId = 1054 + BACnetVendorId_RADIUS_AUTOMATION_COMPANY BACnetVendorId = 1055 + BACnetVendorId_RINGDALE_INC BACnetVendorId = 1056 + BACnetVendorId_IWAKI_AMERICA BACnetVendorId = 1057 + BACnetVendorId_BRACTLET BACnetVendorId = 1058 + BACnetVendorId_STULZ_AIR_TECHNOLOGY_SYSTEMS_INC BACnetVendorId = 1059 + BACnetVendorId_CLIMATE_READY_ENGINEERING_PTY_LTD BACnetVendorId = 1060 + BACnetVendorId_GENEA_ENERGY_PARTNERS BACnetVendorId = 1061 + BACnetVendorId_IO_TALL_CHILE BACnetVendorId = 1062 + BACnetVendorId_IKS_CO_LTD BACnetVendorId = 1063 + BACnetVendorId_YODIWOAB BACnetVendorId = 1064 + BACnetVendorId_TITA_NELECTRONIC_GMBH BACnetVendorId = 1065 + BACnetVendorId_IDEC_CORPORATION BACnetVendorId = 1066 + BACnetVendorId_SIFRISL BACnetVendorId = 1067 + BACnetVendorId_THERMAL_GAS_SYSTEMS_INC BACnetVendorId = 1068 + BACnetVendorId_BUILDING_AUTOMATION_PRODUCTS_INC BACnetVendorId = 1069 + BACnetVendorId_ASSET_MAPPING BACnetVendorId = 1070 + BACnetVendorId_SMARTEH_COMPANY BACnetVendorId = 1071 + BACnetVendorId_DATAPOD_AUSTRALIA_PTY_LTD BACnetVendorId = 1072 + BACnetVendorId_BUILDINGS_ALIVE_PTY_LTD BACnetVendorId = 1073 + BACnetVendorId_DIGITAL_ELEKTRONIK BACnetVendorId = 1074 + BACnetVendorId_TALENT_AUTOMAOE_TECNOLOGIA_LTDA BACnetVendorId = 1075 + BACnetVendorId_NORPOSH_LIMITED BACnetVendorId = 1076 + BACnetVendorId_MERKUR_FUNKSYSTEMEAG BACnetVendorId = 1077 + BACnetVendorId_FASTERC_ZSPOL_SRO BACnetVendorId = 1078 + BACnetVendorId_ECO_ADAPT BACnetVendorId = 1079 + BACnetVendorId_ENERGOCENTRUM_PLUSSRO BACnetVendorId = 1080 + BACnetVendorId_AMBXUK_LTD BACnetVendorId = 1081 + BACnetVendorId_WESTERN_RESERVE_CONTROLS_INC BACnetVendorId = 1082 + BACnetVendorId_LAYER_ZERO_POWER_SYSTEMS_INC BACnetVendorId = 1083 + BACnetVendorId_CIC_JAN_HEBECSRO BACnetVendorId = 1084 + BACnetVendorId_SIGROVBV BACnetVendorId = 1085 + BACnetVendorId_ISYS_INTELLIGENT_SYSTEMS BACnetVendorId = 1086 + BACnetVendorId_GAS_DETECTION_AUSTRALIA_PTY_LTD BACnetVendorId = 1087 + BACnetVendorId_KINCO_AUTOMATION_SHANGHAI_LTD BACnetVendorId = 1088 + BACnetVendorId_LARS_ENERGYLLC BACnetVendorId = 1089 + BACnetVendorId_FLAMEFASTUK_LTD BACnetVendorId = 1090 + BACnetVendorId_ROYAL_SERVICE_AIR_CONDITIONING BACnetVendorId = 1091 + BACnetVendorId_AMPIO_SP_ZOO BACnetVendorId = 1092 + BACnetVendorId_INOVONICS_WIRELESS_CORPORATION BACnetVendorId = 1093 + BACnetVendorId_NVENT_THERMAL_MANAGEMENT BACnetVendorId = 1094 + BACnetVendorId_SINOWELL_CONTROL_SYSTEM_LTD BACnetVendorId = 1095 + BACnetVendorId_MOXA_INC BACnetVendorId = 1096 + BACnetVendorId_MATRIXI_CONTROLSDNBHD BACnetVendorId = 1097 + BACnetVendorId_PURPLE_SWIFT BACnetVendorId = 1098 + BACnetVendorId_OTIM_TECHNOLOGIES BACnetVendorId = 1099 + BACnetVendorId_FLOW_MATE_LIMITED BACnetVendorId = 1100 + BACnetVendorId_DEGREE_CONTROLS_INC BACnetVendorId = 1101 + BACnetVendorId_FEI_XING_SHANGHAI_SOFTWARE_TECHNOLOGIES_CO_LTD BACnetVendorId = 1102 + BACnetVendorId_BERG_GMBH BACnetVendorId = 1103 + BACnetVendorId_ARENZIT BACnetVendorId = 1104 + BACnetVendorId_EDELSTROM_ELECTRONIC_DEVICES_DESIGNINGLLC BACnetVendorId = 1105 + BACnetVendorId_DRIVE_CONNECTLLC BACnetVendorId = 1106 + BACnetVendorId_DEVELOP_NOW BACnetVendorId = 1107 + BACnetVendorId_POORT BACnetVendorId = 1108 + BACnetVendorId_VMEIL_INFORMATION_SHANGHAI_LTD BACnetVendorId = 1109 + BACnetVendorId_RAYLEIGH_INSTRUMENTS BACnetVendorId = 1110 + BACnetVendorId_CODESYS_DEVELOPMENT BACnetVendorId = 1112 + BACnetVendorId_SMARTWARE_TECHNOLOGIES_GROUPLLC BACnetVendorId = 1113 + BACnetVendorId_POLAR_BEAR_SOLUTIONS BACnetVendorId = 1114 + BACnetVendorId_CODRA BACnetVendorId = 1115 + BACnetVendorId_PHAROS_ARCHITECTURAL_CONTROLS_LTD BACnetVendorId = 1116 + BACnetVendorId_ENGI_NEAR_LTD BACnetVendorId = 1117 + BACnetVendorId_AD_HOC_ELECTRONICS BACnetVendorId = 1118 + BACnetVendorId_UNIFIED_MICROSYSTEMS BACnetVendorId = 1119 + BACnetVendorId_INDUSTRIEELEKTRONIK_BRANDENBURG_GMBH BACnetVendorId = 1120 + BACnetVendorId_HARTMANN_GMBH BACnetVendorId = 1121 + BACnetVendorId_PISCADA BACnetVendorId = 1122 + BACnetVendorId_KM_BSYSTEMSSRO BACnetVendorId = 1123 + BACnetVendorId_POWER_TECH_ENGINEERINGAS BACnetVendorId = 1124 + BACnetVendorId_TELEFONBAU_ARTHUR_SCHWABE_GMBH_COKG BACnetVendorId = 1125 + BACnetVendorId_WUXI_FISTWELOVE_TECHNOLOGY_CO_LTD BACnetVendorId = 1126 + BACnetVendorId_PRYSM BACnetVendorId = 1127 + BACnetVendorId_STEINEL_GMBH BACnetVendorId = 1128 + BACnetVendorId_GEORG_FISCHERJRGAG BACnetVendorId = 1129 + BACnetVendorId_MAKE_DEVELOPSL BACnetVendorId = 1130 + BACnetVendorId_MONNIT_CORPORATION BACnetVendorId = 1131 + BACnetVendorId_MIRROR_LIFE_CORPORATION BACnetVendorId = 1132 + BACnetVendorId_SECURE_METERS_LIMITED BACnetVendorId = 1133 + BACnetVendorId_PECO BACnetVendorId = 1134 + BACnetVendorId_CCTECH_INC BACnetVendorId = 1135 + BACnetVendorId_LIGHT_FI_LIMITED BACnetVendorId = 1136 + BACnetVendorId_NICE_SPA BACnetVendorId = 1137 + BACnetVendorId_FIBER_SEN_SYS_INC BACnetVendorId = 1138 + BACnetVendorId_BD_BUCHTAUND_DEGEORGI BACnetVendorId = 1139 + BACnetVendorId_VENTACITY_SYSTEMS_INC BACnetVendorId = 1140 + BACnetVendorId_HITACHI_JOHNSON_CONTROLS_AIR_CONDITIONING_INC BACnetVendorId = 1141 + BACnetVendorId_SAGE_METERING_INC BACnetVendorId = 1142 + BACnetVendorId_ANDEL_LIMITED BACnetVendorId = 1143 + BACnetVendorId_ECO_SMART_TECHNOLOGIES BACnetVendorId = 1144 + BACnetVendorId_SET BACnetVendorId = 1145 + BACnetVendorId_PROTEC_FIRE_DETECTION_SPAINSL BACnetVendorId = 1146 + BACnetVendorId_AGRAMERUG BACnetVendorId = 1147 + BACnetVendorId_ANYLINK_ELECTRONIC_GMBH BACnetVendorId = 1148 + BACnetVendorId_SCHINDLER_LTD BACnetVendorId = 1149 + BACnetVendorId_JIBREEL_ABDEEN_EST BACnetVendorId = 1150 + BACnetVendorId_FLUIDYNE_CONTROL_SYSTEMS_PVT_LTD BACnetVendorId = 1151 + BACnetVendorId_PRISM_SYSTEMS_INC BACnetVendorId = 1152 + BACnetVendorId_ENERTIV BACnetVendorId = 1153 + BACnetVendorId_MIRASOFT_GMBH_COKG BACnetVendorId = 1154 + BACnetVendorId_DUALTECHIT BACnetVendorId = 1155 + BACnetVendorId_COUNTLOGICLLC BACnetVendorId = 1156 + BACnetVendorId_KOHLER BACnetVendorId = 1157 + BACnetVendorId_CHEN_SEN_CONTROLS_CO_LTD BACnetVendorId = 1158 + BACnetVendorId_GREENHECK BACnetVendorId = 1159 + BACnetVendorId_INTWINE_CONNECTLLC BACnetVendorId = 1160 + BACnetVendorId_KARLBORGS_ELKONTROLL BACnetVendorId = 1161 + BACnetVendorId_DATAKOM BACnetVendorId = 1162 + BACnetVendorId_HOGA_CONTROLAS BACnetVendorId = 1163 + BACnetVendorId_COOL_AUTOMATION BACnetVendorId = 1164 + BACnetVendorId_INTER_SEARCH_CO_LTD BACnetVendorId = 1165 + BACnetVendorId_DABBEL_AUTOMATION_INTELLIGENCE_GMBH BACnetVendorId = 1166 + BACnetVendorId_GADGEON_ENGINEERING_SMARTNESS BACnetVendorId = 1167 + BACnetVendorId_COSTER_GROUP_SRL BACnetVendorId = 1168 + BACnetVendorId_WALTER_MLLERAG BACnetVendorId = 1169 + BACnetVendorId_FLUKE BACnetVendorId = 1170 + BACnetVendorId_QUINTEX_SYSTEMS_LTD BACnetVendorId = 1171 + BACnetVendorId_SENFFICIENTSDNBHD BACnetVendorId = 1172 + BACnetVendorId_NUBEIO_OPERATIONS_PTY_LTD BACnetVendorId = 1173 + BACnetVendorId_DAS_INTEGRATOR_PTE_LTD BACnetVendorId = 1174 + BACnetVendorId_CREVIS_CO_LTD BACnetVendorId = 1175 + BACnetVendorId_I_SQUAREDSOFTWAREINC BACnetVendorId = 1176 + BACnetVendorId_KTG_GMBH BACnetVendorId = 1177 + BACnetVendorId_POK_GROUP_OY BACnetVendorId = 1178 + BACnetVendorId_ADISCOM BACnetVendorId = 1179 + BACnetVendorId_INCUSENSE BACnetVendorId = 1180 + BACnetVendorId_F BACnetVendorId = 1181 + BACnetVendorId_ANORD_MARDIX_INC BACnetVendorId = 1182 + BACnetVendorId_HOSCH_GEBUDEAUTOMATION_NEUE_PRODUKTE_GMBH BACnetVendorId = 1183 + BACnetVendorId_BOSCHIO_GMBH BACnetVendorId = 1184 + BACnetVendorId_ROYAL_BOON_EDAM_INTERNATIONALBV BACnetVendorId = 1185 + BACnetVendorId_CLACK_CORPORATION BACnetVendorId = 1186 + BACnetVendorId_UNITEX_CONTROLSLLC BACnetVendorId = 1187 + BACnetVendorId_KTC_GTEBORGAB BACnetVendorId = 1188 + BACnetVendorId_INTERZONAB BACnetVendorId = 1189 + BACnetVendorId_ISDEINGSL BACnetVendorId = 1190 + BACnetVendorId_AB_MAUTOMATIONBUILDINGMESSAGING_GMBH BACnetVendorId = 1191 + BACnetVendorId_KENTEC_ELECTRONICS_LTD BACnetVendorId = 1192 + BACnetVendorId_EMERSON_COMMERCIALAND_RESIDENTIAL_SOLUTIONS BACnetVendorId = 1193 + BACnetVendorId_POWERSIDE BACnetVendorId = 1194 + BACnetVendorId_SMC_GROUP BACnetVendorId = 1195 + BACnetVendorId_EOS_WEATHER_INSTRUMENTS BACnetVendorId = 1196 + BACnetVendorId_ZONEX_SYSTEMS BACnetVendorId = 1197 + BACnetVendorId_GENEREX_SYSTEMS_COMPUTERVERTRIEBSGESELLSCHAFTMBH BACnetVendorId = 1198 + BACnetVendorId_ENERGY_WALLLLC BACnetVendorId = 1199 + BACnetVendorId_THERMOFIN BACnetVendorId = 1200 + BACnetVendorId_SDATAWAYSA BACnetVendorId = 1201 + BACnetVendorId_BIDDLE_AIR_SYSTEMS_LIMITED BACnetVendorId = 1202 + BACnetVendorId_KESSLER_ELLIS_PRODUCTS BACnetVendorId = 1203 + BACnetVendorId_THERMOSCREENS BACnetVendorId = 1204 + BACnetVendorId_MODIO BACnetVendorId = 1205 + BACnetVendorId_NEWRON_SOLUTIONS BACnetVendorId = 1206 + BACnetVendorId_UNITRONICS BACnetVendorId = 1207 + BACnetVendorId_TRILUX_GMBH_COKG BACnetVendorId = 1208 + BACnetVendorId_KOLLMORGEN_STEUERUNGSTECHNIK_GMBH BACnetVendorId = 1209 + BACnetVendorId_BOSCH_REXROTHAG BACnetVendorId = 1210 + BACnetVendorId_ALARKO_CARRIER BACnetVendorId = 1211 + BACnetVendorId_VERDIGRIS_TECHNOLOGIES BACnetVendorId = 1212 + BACnetVendorId_SHANGHAISIIC_LONGCHUANG_SMARTECH_SO_LTD BACnetVendorId = 1213 + BACnetVendorId_QUINDA_CO BACnetVendorId = 1214 + BACnetVendorId_GRUNERAG BACnetVendorId = 1215 + BACnetVendorId_BACMOVE BACnetVendorId = 1216 + BACnetVendorId_PSIDACAB BACnetVendorId = 1217 + BACnetVendorId_ISICON_CONTROL_AUTOMATION BACnetVendorId = 1218 + BACnetVendorId_BIG_ASS_FANS BACnetVendorId = 1219 + BACnetVendorId_DIN_DIETMAR_NOCKER_FACILITY_MANAGEMENT_GMBH BACnetVendorId = 1220 + BACnetVendorId_TELDIO BACnetVendorId = 1221 + BACnetVendorId_MIKROKLIM_ASRO BACnetVendorId = 1222 + BACnetVendorId_DENSITY BACnetVendorId = 1223 + BACnetVendorId_ICONAG_LEITTECHNIK_GMBH BACnetVendorId = 1224 + BACnetVendorId_AWAIR BACnetVendorId = 1225 + BACnetVendorId_TD_ENGINEERING_LTD BACnetVendorId = 1226 + BACnetVendorId_SISTEMAS_DIGITALES BACnetVendorId = 1227 + BACnetVendorId_LOXONE_ELECTRONICS_GMBH BACnetVendorId = 1228 + BACnetVendorId_ACTRON_AIR BACnetVendorId = 1229 + BACnetVendorId_INDUCTIVE_AUTOMATION BACnetVendorId = 1230 + BACnetVendorId_THOR_ENGINEERING_GMBH BACnetVendorId = 1231 + BACnetVendorId_BERNER_INTERNATIONALLLC BACnetVendorId = 1232 + BACnetVendorId_POTSDAM_SENSORSLLC BACnetVendorId = 1233 + BACnetVendorId_KOHLER_MIRA_LTD BACnetVendorId = 1234 + BACnetVendorId_TECOMON_GMBH BACnetVendorId = 1235 + BACnetVendorId_TWO_DIMENSIONAL_INSTRUMENTSLLC BACnetVendorId = 1236 + BACnetVendorId_LEFA_TECHNOLOGIES_PTE_LTD BACnetVendorId = 1237 + BACnetVendorId_EATONCEAG_NOTLICHTSYSTEME_GMBH BACnetVendorId = 1238 + BACnetVendorId_COMMBOX_TECNOLOGIA BACnetVendorId = 1239 + BACnetVendorId_IP_VIDEO_CORPORATION BACnetVendorId = 1240 + BACnetVendorId_BENDER_GMBH_COKG BACnetVendorId = 1241 + BACnetVendorId_RHYMEBUS_CORPORATION BACnetVendorId = 1242 + BACnetVendorId_AXON_SYSTEMS_LTD BACnetVendorId = 1243 + BACnetVendorId_ENGINEERED_AIR BACnetVendorId = 1244 + BACnetVendorId_ELIPSE_SOFTWARE_LTDA BACnetVendorId = 1245 + BACnetVendorId_SIMATIX_BUILDING_TECHNOLOGIES_PVT_LTD BACnetVendorId = 1246 + BACnetVendorId_WA_BENJAMIN_ELECTRIC_CO BACnetVendorId = 1247 + BACnetVendorId_TROX_AIR_CONDITIONING_COMPONENTS_SUZHOU_CO_LTD BACnetVendorId = 1248 + BACnetVendorId_SC_MEDICAL_PTY_LTD BACnetVendorId = 1249 + BACnetVendorId_ELCANICAS BACnetVendorId = 1250 + BACnetVendorId_OBEOAS BACnetVendorId = 1251 + BACnetVendorId_TAPA_INC BACnetVendorId = 1252 + BACnetVendorId_ASE_SMART_ENERGY_INC BACnetVendorId = 1253 + BACnetVendorId_PERFORMANCE_SERVICES_INC BACnetVendorId = 1254 + BACnetVendorId_VERIDIFY_SECURITY BACnetVendorId = 1255 + BACnetVendorId_CD_INNOVATIONLTD BACnetVendorId = 1256 + BACnetVendorId_BEN_PEOPLES_INDUSTRIESLLC BACnetVendorId = 1257 + BACnetVendorId_UNICOMM_SPZOO BACnetVendorId = 1258 + BACnetVendorId_THING_TECHNOLOGIES_GMBH BACnetVendorId = 1259 + BACnetVendorId_BEIJING_HAI_LIN_ENERGY_SAVING_TECHNOLOGY_INC BACnetVendorId = 1260 + BACnetVendorId_DIGITAL_REALTY BACnetVendorId = 1261 + BACnetVendorId_AGROWTEK_INC BACnetVendorId = 1262 + BACnetVendorId_DSP_INNOVATIONBV BACnetVendorId = 1263 + BACnetVendorId_STV_ELECTRONIC_GMBH BACnetVendorId = 1264 + BACnetVendorId_ELMEASURE_INDIA_PVT_LTD BACnetVendorId = 1265 + BACnetVendorId_PINESHORE_ENERGYLLC BACnetVendorId = 1266 + BACnetVendorId_BRASCH_ENVIRONMENTAL_TECHNOLOGIESLLC BACnetVendorId = 1267 + BACnetVendorId_LION_CONTROLS_COLTD BACnetVendorId = 1268 + BACnetVendorId_SINUX BACnetVendorId = 1269 + BACnetVendorId_AVNET_INC BACnetVendorId = 1270 + BACnetVendorId_SOMFY_ACTIVITESSA BACnetVendorId = 1271 + BACnetVendorId_AMICO BACnetVendorId = 1272 + BACnetVendorId_SAGE_GLASS BACnetVendorId = 1273 + BACnetVendorId_AU_VERTE BACnetVendorId = 1274 + BACnetVendorId_AGILE_CONNECTS_PVT_LTD BACnetVendorId = 1275 + BACnetVendorId_LOCIMATION_PTY_LTD BACnetVendorId = 1276 + BACnetVendorId_ENVIO_SYSTEMS_GMBH BACnetVendorId = 1277 + BACnetVendorId_VOYTECH_SYSTEMS_LIMITED BACnetVendorId = 1278 + BACnetVendorId_DAVIDSMEYERUND_PAUL_GMBH BACnetVendorId = 1279 + BACnetVendorId_LUSHER_ENGINEERING_SERVICES BACnetVendorId = 1280 + BACnetVendorId_CHNT_NANJING_TECHSEL_INTELLIGENT_COMPANYLTD BACnetVendorId = 1281 + BACnetVendorId_THREETRONICS_PTY_LTD BACnetVendorId = 1282 + BACnetVendorId_SKY_FOUNDRYLLC BACnetVendorId = 1283 + BACnetVendorId_HANIL_PRO_TECH BACnetVendorId = 1284 + BACnetVendorId_SENSORSCALL BACnetVendorId = 1285 + BACnetVendorId_SHANGHAI_JINGPU_INFORMATION_TECHNOLOGY_CO_LTD BACnetVendorId = 1286 + BACnetVendorId_LICHTMANUFAKTUR_BERLIN_GMBH BACnetVendorId = 1287 + BACnetVendorId_ECO_PARKING_TECHNOLOGIES BACnetVendorId = 1288 + BACnetVendorId_ENVISION_DIGITAL_INTERNATIONAL_PTE_LTD BACnetVendorId = 1289 + BACnetVendorId_ANTONY_DEVELOPPEMENT_ELECTRONIQUE BACnetVendorId = 1290 + BACnetVendorId_ISYSTEMS BACnetVendorId = 1291 + BACnetVendorId_THUREON_INTERNATIONAL_LIMITED BACnetVendorId = 1292 + BACnetVendorId_PULSAFEEDER BACnetVendorId = 1293 + BACnetVendorId_MEGA_CHIPS_CORPORATION BACnetVendorId = 1294 + BACnetVendorId_TES_CONTROLS BACnetVendorId = 1295 + BACnetVendorId_CERMATE BACnetVendorId = 1296 + BACnetVendorId_GRAND_VALLEY_STATE_UNIVERSITY BACnetVendorId = 1297 + BACnetVendorId_SYMCON_GMBH BACnetVendorId = 1298 + BACnetVendorId_THE_CHICAGO_FAUCET_COMPANY BACnetVendorId = 1299 + BACnetVendorId_GEBERITAG BACnetVendorId = 1300 + BACnetVendorId_REX_CONTROLS BACnetVendorId = 1301 + BACnetVendorId_IVMS_GMBH BACnetVendorId = 1302 + BACnetVendorId_MNPP_SATURN_LTD BACnetVendorId = 1303 + BACnetVendorId_REGAL_BELOIT BACnetVendorId = 1304 + BACnetVendorId_ACS_AIR_CONDITIONING_SOLUTIONS BACnetVendorId = 1305 + BACnetVendorId_GBX_TECHNOLOGYLLC BACnetVendorId = 1306 + BACnetVendorId_KAITERRA BACnetVendorId = 1307 + BACnetVendorId_THIN_KUANLOT_TECHNOLOGY_SHANGHAI_CO_LTD BACnetVendorId = 1308 + BACnetVendorId_HO_CO_STOBV BACnetVendorId = 1309 + BACnetVendorId_SHENZHENASAI_TECHNOLOGY_CO_LTD BACnetVendorId = 1310 + BACnetVendorId_RPS_SPA BACnetVendorId = 1311 + BACnetVendorId_ESMSOLUTIONS BACnetVendorId = 1312 + BACnetVendorId_IO_TECH_SYSTEMS_LIMITED BACnetVendorId = 1313 + BACnetVendorId_I_AUTO_LOGIC_CO_LTD BACnetVendorId = 1314 + BACnetVendorId_NEW_AGE_MICROLLC BACnetVendorId = 1315 + BACnetVendorId_GUARDIAN_GLASS BACnetVendorId = 1316 + BACnetVendorId_GUANGZHOU_ZHAOYU_INFORMATION_TECHNOLOGY BACnetVendorId = 1317 + BACnetVendorId_ACE_IOT_SOLUTIONSLLC BACnetVendorId = 1318 + BACnetVendorId_PORIS_ELECTRONICS_CO_LTD BACnetVendorId = 1319 + BACnetVendorId_TERMINUS_TECHNOLOGIES_GROUP BACnetVendorId = 1320 + BACnetVendorId_INTECH1_INC BACnetVendorId = 1321 + BACnetVendorId_ACCURATE_ELECTRONICS BACnetVendorId = 1322 + BACnetVendorId_FLUENCE_BIOENGINEERING BACnetVendorId = 1323 + BACnetVendorId_MUN_HEAN_SINGAPORE_PTE_LTD BACnetVendorId = 1324 + BACnetVendorId_KATRONICAG_COKG BACnetVendorId = 1325 + BACnetVendorId_SUZHOU_XIN_AO_INFORMATION_TECHNOLOGY_CO_LTD BACnetVendorId = 1326 + BACnetVendorId_LINKTEKK_TECHNOLOGYJSC BACnetVendorId = 1327 + BACnetVendorId_STIRLING_ULTRACOLD BACnetVendorId = 1328 + BACnetVendorId_UV_PARTNERS_INC BACnetVendorId = 1329 + BACnetVendorId_PRO_MINENT_GMBH BACnetVendorId = 1330 + BACnetVendorId_MULTI_TECH_SYSTEMS_INC BACnetVendorId = 1331 + BACnetVendorId_JUMO_GMBH_COKG BACnetVendorId = 1332 + BACnetVendorId_QINGDAO_HUARUI_TECHNOLOGY_CO_LTD BACnetVendorId = 1333 + BACnetVendorId_CAIRN_SYSTEMES BACnetVendorId = 1334 + BACnetVendorId_NEURO_LOGIC_RESEARCH_CORP BACnetVendorId = 1335 + BACnetVendorId_TRANSITION_TECHNOLOGIES_ADVANCED_SOLUTIONS_SPZOO BACnetVendorId = 1336 + BACnetVendorId_XXTERBV BACnetVendorId = 1337 + BACnetVendorId_PASSIVE_LOGIC BACnetVendorId = 1338 + BACnetVendorId_EN_SMART_CONTROLS BACnetVendorId = 1339 + BACnetVendorId_WATTS_HEATINGAND_HOT_WATER_SOLUTIONSDBA_LYNC BACnetVendorId = 1340 + BACnetVendorId_TROPOSPHAIRA_TECHNOLOGIESLLP BACnetVendorId = 1341 + BACnetVendorId_NETWORK_THERMOSTAT BACnetVendorId = 1342 + BACnetVendorId_TITANIUM_INTELLIGENT_SOLUTIONSLLC BACnetVendorId = 1343 + BACnetVendorId_NUMA_PRODUCTSLLC BACnetVendorId = 1344 + BACnetVendorId_WAREMA_RENKHOFFSE BACnetVendorId = 1345 + BACnetVendorId_FRESEAS BACnetVendorId = 1346 + BACnetVendorId_MAPPED BACnetVendorId = 1347 + BACnetVendorId_ELEKTRODESIG_NVENTILATORYSRO BACnetVendorId = 1348 + BACnetVendorId_AIR_CARE_AUTOMATION_INC BACnetVendorId = 1349 + BACnetVendorId_ANTRUM BACnetVendorId = 1350 + BACnetVendorId_BAO_LINH_CONNECT_TECHNOLOGY BACnetVendorId = 1351 + BACnetVendorId_VIRGINIA_CONTROLSLLC BACnetVendorId = 1352 + BACnetVendorId_DUOSYSSDNBHD BACnetVendorId = 1353 + BACnetVendorId_ONSENSAS BACnetVendorId = 1354 + BACnetVendorId_VAUGHN_THERMAL_CORPORATION BACnetVendorId = 1355 + BACnetVendorId_THERMOPLASTIC_ENGINEERING_LTDTPE BACnetVendorId = 1356 + BACnetVendorId_WIRTH_RESEARCH_LTD BACnetVendorId = 1357 + BACnetVendorId_SST_AUTOMATION BACnetVendorId = 1358 + BACnetVendorId_SHANGHAI_BENCOL_ELECTRONIC_TECHNOLOGY_CO_LTD BACnetVendorId = 1359 + BACnetVendorId_AIWAA_SYSTEMS_PRIVATE_LIMITED BACnetVendorId = 1360 + BACnetVendorId_ENLESS_WIRELESS BACnetVendorId = 1361 + BACnetVendorId_OZUNO_ENGINEERING_PTY_LTD BACnetVendorId = 1362 + BACnetVendorId_HUBBELL_THE_ELECTRIC_HEATER_COMPANY BACnetVendorId = 1363 + BACnetVendorId_INDUSTRIAL_TURNAROUND_CORPORATIONITAC BACnetVendorId = 1364 + BACnetVendorId_WADSWORTH_CONTROL_SYSTEMS BACnetVendorId = 1365 + BACnetVendorId_SERVICES_HILO_INC BACnetVendorId = 1366 + BACnetVendorId_IDM_ENERGIESYSTEME_GMBH BACnetVendorId = 1367 + BACnetVendorId_BE_NEXTBV BACnetVendorId = 1368 + BACnetVendorId_CLEAN_AIRAI_CORPORATION BACnetVendorId = 1369 + BACnetVendorId_REVOLUTION_MICROELECTRONICS_AMERICA_INC BACnetVendorId = 1370 + BACnetVendorId_ARENDARIT_SECURITY_GMBH BACnetVendorId = 1371 + BACnetVendorId_ZED_BEE_TECHNOLOGIES_PVT_LTD BACnetVendorId = 1372 + BACnetVendorId_WINMATE_TECHNOLOGY_SOLUTIONS_PVT_LTD BACnetVendorId = 1373 + BACnetVendorId_SENTICON_LTD BACnetVendorId = 1374 + BACnetVendorId_ROSSAKERAB BACnetVendorId = 1375 + BACnetVendorId_OPIT_SOLUTIONS_LTD BACnetVendorId = 1376 + BACnetVendorId_HOTOWELL_INTERNATIONAL_CO_LIMITED BACnetVendorId = 1377 + BACnetVendorId_INIM_ELECTRONICSSRL_UNIPERSONALE BACnetVendorId = 1378 + BACnetVendorId_AIRTHINGSASA BACnetVendorId = 1379 + BACnetVendorId_ANALOG_DEVICES_INC BACnetVendorId = 1380 + BACnetVendorId_AI_DIRECTIONSDMCC BACnetVendorId = 1381 + BACnetVendorId_PRIMA_ELECTRO_SPA BACnetVendorId = 1382 + BACnetVendorId_KLT_CONTROL_SYSTEM_LTD BACnetVendorId = 1383 + BACnetVendorId_EVOLUTION_CONTROLS_INC BACnetVendorId = 1384 + BACnetVendorId_BEVER_INNOVATIONS BACnetVendorId = 1385 + BACnetVendorId_PELICAN_WIRELESS_SYSTEMS BACnetVendorId = 1386 + BACnetVendorId_CONTROL_CONCEPTS_INC BACnetVendorId = 1387 + BACnetVendorId_AUGMATIC_TECHNOLOGIES_PVT_LTD BACnetVendorId = 1388 + BACnetVendorId_XIAMEN_MILESIGHTLOT_CO_LTD BACnetVendorId = 1389 + BACnetVendorId_TIANJIN_ANJIELOT_SCHIENCEAND_TECHNOLOGY_CO_LTD BACnetVendorId = 1390 + BACnetVendorId_GUANGZHOUS_ENERGY_ELECTRONICS_TECHNOLOGY_CO_LTD BACnetVendorId = 1391 + BACnetVendorId_AKVO_ATMOSPHERIC_WATER_SYSTEMS_PVT_LTD BACnetVendorId = 1392 + BACnetVendorId_EM_FIRST_CO_LTD BACnetVendorId = 1393 + BACnetVendorId_IION_SYSTEMS_APS BACnetVendorId = 1394 + BACnetVendorId_SAF_TEHNIKAJSC BACnetVendorId = 1396 + BACnetVendorId_KOMFORTIQ_INC BACnetVendorId = 1397 + BACnetVendorId_COOL_TERA_LIMITED BACnetVendorId = 1398 + BACnetVendorId_HADRON_SOLUTIONS_SRLS BACnetVendorId = 1399 + BACnetVendorId_BITPOOL BACnetVendorId = 1401 + BACnetVendorId_SONICULLC BACnetVendorId = 1402 + BACnetVendorId_RISHABH_INSTRUMENTS_LIMITED BACnetVendorId = 1403 + BACnetVendorId_THING_WAREHOUSELLC BACnetVendorId = 1404 + BACnetVendorId_INNOFRIENDS_GMBH BACnetVendorId = 1405 + BACnetVendorId_METRONICAKP_SPJ BACnetVendorId = 1406 + BACnetVendorId_UNKNOWN_VENDOR BACnetVendorId = 0xFFFF ) var BACnetVendorIdValues []BACnetVendorId func init() { _ = errors.New - BACnetVendorIdValues = []BACnetVendorId{ + BACnetVendorIdValues = []BACnetVendorId { BACnetVendorId_ASHRAE, BACnetVendorId_NIST, BACnetVendorId_THE_TRANE_COMPANY, @@ -2845,5606 +2845,4207 @@ func init() { } } + func (e BACnetVendorId) VendorId() uint16 { - switch e { - case 0: - { /* '0' */ - return 0 + switch e { + case 0: { /* '0' */ + return 0 } - case 0xFFFF: - { /* '0xFFFF' */ - return 0xFFFF + case 0xFFFF: { /* '0xFFFF' */ + return 0xFFFF } - case 1: - { /* '1' */ - return 1 + case 1: { /* '1' */ + return 1 } - case 10: - { /* '10' */ - return 10 + case 10: { /* '10' */ + return 10 } - case 100: - { /* '100' */ - return 100 + case 100: { /* '100' */ + return 100 } - case 1000: - { /* '1000' */ - return 1000 + case 1000: { /* '1000' */ + return 1000 } - case 1001: - { /* '1001' */ - return 1001 + case 1001: { /* '1001' */ + return 1001 } - case 1002: - { /* '1002' */ - return 1002 + case 1002: { /* '1002' */ + return 1002 } - case 1003: - { /* '1003' */ - return 1003 + case 1003: { /* '1003' */ + return 1003 } - case 1004: - { /* '1004' */ - return 1004 + case 1004: { /* '1004' */ + return 1004 } - case 1005: - { /* '1005' */ - return 1005 + case 1005: { /* '1005' */ + return 1005 } - case 1006: - { /* '1006' */ - return 1006 + case 1006: { /* '1006' */ + return 1006 } - case 1007: - { /* '1007' */ - return 1007 + case 1007: { /* '1007' */ + return 1007 } - case 1008: - { /* '1008' */ - return 1008 + case 1008: { /* '1008' */ + return 1008 } - case 1009: - { /* '1009' */ - return 1009 + case 1009: { /* '1009' */ + return 1009 } - case 101: - { /* '101' */ - return 101 + case 101: { /* '101' */ + return 101 } - case 1010: - { /* '1010' */ - return 1010 + case 1010: { /* '1010' */ + return 1010 } - case 1011: - { /* '1011' */ - return 1011 + case 1011: { /* '1011' */ + return 1011 } - case 1012: - { /* '1012' */ - return 1012 + case 1012: { /* '1012' */ + return 1012 } - case 1013: - { /* '1013' */ - return 1013 + case 1013: { /* '1013' */ + return 1013 } - case 1014: - { /* '1014' */ - return 1014 + case 1014: { /* '1014' */ + return 1014 } - case 1015: - { /* '1015' */ - return 1015 + case 1015: { /* '1015' */ + return 1015 } - case 1016: - { /* '1016' */ - return 1016 + case 1016: { /* '1016' */ + return 1016 } - case 1017: - { /* '1017' */ - return 1017 + case 1017: { /* '1017' */ + return 1017 } - case 1018: - { /* '1018' */ - return 1018 + case 1018: { /* '1018' */ + return 1018 } - case 1019: - { /* '1019' */ - return 1019 + case 1019: { /* '1019' */ + return 1019 } - case 102: - { /* '102' */ - return 102 + case 102: { /* '102' */ + return 102 } - case 1020: - { /* '1020' */ - return 1020 + case 1020: { /* '1020' */ + return 1020 } - case 1021: - { /* '1021' */ - return 1021 + case 1021: { /* '1021' */ + return 1021 } - case 1022: - { /* '1022' */ - return 1022 + case 1022: { /* '1022' */ + return 1022 } - case 1023: - { /* '1023' */ - return 1023 + case 1023: { /* '1023' */ + return 1023 } - case 1024: - { /* '1024' */ - return 1024 + case 1024: { /* '1024' */ + return 1024 } - case 1025: - { /* '1025' */ - return 1025 + case 1025: { /* '1025' */ + return 1025 } - case 1026: - { /* '1026' */ - return 1026 + case 1026: { /* '1026' */ + return 1026 } - case 1027: - { /* '1027' */ - return 1027 + case 1027: { /* '1027' */ + return 1027 } - case 1028: - { /* '1028' */ - return 1028 + case 1028: { /* '1028' */ + return 1028 } - case 1029: - { /* '1029' */ - return 1029 + case 1029: { /* '1029' */ + return 1029 } - case 103: - { /* '103' */ - return 103 + case 103: { /* '103' */ + return 103 } - case 1030: - { /* '1030' */ - return 1030 + case 1030: { /* '1030' */ + return 1030 } - case 1031: - { /* '1031' */ - return 1031 + case 1031: { /* '1031' */ + return 1031 } - case 1032: - { /* '1032' */ - return 1032 + case 1032: { /* '1032' */ + return 1032 } - case 1033: - { /* '1033' */ - return 1033 + case 1033: { /* '1033' */ + return 1033 } - case 1034: - { /* '1034' */ - return 1034 + case 1034: { /* '1034' */ + return 1034 } - case 1035: - { /* '1035' */ - return 1035 + case 1035: { /* '1035' */ + return 1035 } - case 1036: - { /* '1036' */ - return 1036 + case 1036: { /* '1036' */ + return 1036 } - case 1037: - { /* '1037' */ - return 1037 + case 1037: { /* '1037' */ + return 1037 } - case 1038: - { /* '1038' */ - return 1038 + case 1038: { /* '1038' */ + return 1038 } - case 1039: - { /* '1039' */ - return 1039 + case 1039: { /* '1039' */ + return 1039 } - case 104: - { /* '104' */ - return 104 + case 104: { /* '104' */ + return 104 } - case 1040: - { /* '1040' */ - return 1040 + case 1040: { /* '1040' */ + return 1040 } - case 1041: - { /* '1041' */ - return 1041 + case 1041: { /* '1041' */ + return 1041 } - case 1042: - { /* '1042' */ - return 1042 + case 1042: { /* '1042' */ + return 1042 } - case 1043: - { /* '1043' */ - return 1043 + case 1043: { /* '1043' */ + return 1043 } - case 1044: - { /* '1044' */ - return 1044 + case 1044: { /* '1044' */ + return 1044 } - case 1045: - { /* '1045' */ - return 1045 + case 1045: { /* '1045' */ + return 1045 } - case 1046: - { /* '1046' */ - return 1046 + case 1046: { /* '1046' */ + return 1046 } - case 1047: - { /* '1047' */ - return 1047 + case 1047: { /* '1047' */ + return 1047 } - case 1048: - { /* '1048' */ - return 1048 + case 1048: { /* '1048' */ + return 1048 } - case 1049: - { /* '1049' */ - return 1049 + case 1049: { /* '1049' */ + return 1049 } - case 105: - { /* '105' */ - return 105 + case 105: { /* '105' */ + return 105 } - case 1050: - { /* '1050' */ - return 1050 + case 1050: { /* '1050' */ + return 1050 } - case 1051: - { /* '1051' */ - return 1051 + case 1051: { /* '1051' */ + return 1051 } - case 1052: - { /* '1052' */ - return 1052 + case 1052: { /* '1052' */ + return 1052 } - case 1053: - { /* '1053' */ - return 1053 + case 1053: { /* '1053' */ + return 1053 } - case 1054: - { /* '1054' */ - return 1054 + case 1054: { /* '1054' */ + return 1054 } - case 1055: - { /* '1055' */ - return 1055 + case 1055: { /* '1055' */ + return 1055 } - case 1056: - { /* '1056' */ - return 1056 + case 1056: { /* '1056' */ + return 1056 } - case 1057: - { /* '1057' */ - return 1057 + case 1057: { /* '1057' */ + return 1057 } - case 1058: - { /* '1058' */ - return 1058 + case 1058: { /* '1058' */ + return 1058 } - case 1059: - { /* '1059' */ - return 1059 + case 1059: { /* '1059' */ + return 1059 } - case 106: - { /* '106' */ - return 106 + case 106: { /* '106' */ + return 106 } - case 1060: - { /* '1060' */ - return 1060 + case 1060: { /* '1060' */ + return 1060 } - case 1061: - { /* '1061' */ - return 1061 + case 1061: { /* '1061' */ + return 1061 } - case 1062: - { /* '1062' */ - return 1062 + case 1062: { /* '1062' */ + return 1062 } - case 1063: - { /* '1063' */ - return 1063 + case 1063: { /* '1063' */ + return 1063 } - case 1064: - { /* '1064' */ - return 1064 + case 1064: { /* '1064' */ + return 1064 } - case 1065: - { /* '1065' */ - return 1065 + case 1065: { /* '1065' */ + return 1065 } - case 1066: - { /* '1066' */ - return 1066 + case 1066: { /* '1066' */ + return 1066 } - case 1067: - { /* '1067' */ - return 1067 + case 1067: { /* '1067' */ + return 1067 } - case 1068: - { /* '1068' */ - return 1068 + case 1068: { /* '1068' */ + return 1068 } - case 1069: - { /* '1069' */ - return 1069 + case 1069: { /* '1069' */ + return 1069 } - case 107: - { /* '107' */ - return 107 + case 107: { /* '107' */ + return 107 } - case 1070: - { /* '1070' */ - return 1070 + case 1070: { /* '1070' */ + return 1070 } - case 1071: - { /* '1071' */ - return 1071 + case 1071: { /* '1071' */ + return 1071 } - case 1072: - { /* '1072' */ - return 1072 + case 1072: { /* '1072' */ + return 1072 } - case 1073: - { /* '1073' */ - return 1073 + case 1073: { /* '1073' */ + return 1073 } - case 1074: - { /* '1074' */ - return 1074 + case 1074: { /* '1074' */ + return 1074 } - case 1075: - { /* '1075' */ - return 1075 + case 1075: { /* '1075' */ + return 1075 } - case 1076: - { /* '1076' */ - return 1076 + case 1076: { /* '1076' */ + return 1076 } - case 1077: - { /* '1077' */ - return 1077 + case 1077: { /* '1077' */ + return 1077 } - case 1078: - { /* '1078' */ - return 1078 + case 1078: { /* '1078' */ + return 1078 } - case 1079: - { /* '1079' */ - return 1079 + case 1079: { /* '1079' */ + return 1079 } - case 108: - { /* '108' */ - return 108 + case 108: { /* '108' */ + return 108 } - case 1080: - { /* '1080' */ - return 1080 + case 1080: { /* '1080' */ + return 1080 } - case 1081: - { /* '1081' */ - return 1081 + case 1081: { /* '1081' */ + return 1081 } - case 1082: - { /* '1082' */ - return 1082 + case 1082: { /* '1082' */ + return 1082 } - case 1083: - { /* '1083' */ - return 1083 + case 1083: { /* '1083' */ + return 1083 } - case 1084: - { /* '1084' */ - return 1084 + case 1084: { /* '1084' */ + return 1084 } - case 1085: - { /* '1085' */ - return 1085 + case 1085: { /* '1085' */ + return 1085 } - case 1086: - { /* '1086' */ - return 1086 + case 1086: { /* '1086' */ + return 1086 } - case 1087: - { /* '1087' */ - return 1087 + case 1087: { /* '1087' */ + return 1087 } - case 1088: - { /* '1088' */ - return 1088 + case 1088: { /* '1088' */ + return 1088 } - case 1089: - { /* '1089' */ - return 1089 + case 1089: { /* '1089' */ + return 1089 } - case 109: - { /* '109' */ - return 109 + case 109: { /* '109' */ + return 109 } - case 1090: - { /* '1090' */ - return 1090 + case 1090: { /* '1090' */ + return 1090 } - case 1091: - { /* '1091' */ - return 1091 + case 1091: { /* '1091' */ + return 1091 } - case 1092: - { /* '1092' */ - return 1092 + case 1092: { /* '1092' */ + return 1092 } - case 1093: - { /* '1093' */ - return 1093 + case 1093: { /* '1093' */ + return 1093 } - case 1094: - { /* '1094' */ - return 1094 + case 1094: { /* '1094' */ + return 1094 } - case 1095: - { /* '1095' */ - return 1095 + case 1095: { /* '1095' */ + return 1095 } - case 1096: - { /* '1096' */ - return 1096 + case 1096: { /* '1096' */ + return 1096 } - case 1097: - { /* '1097' */ - return 1097 + case 1097: { /* '1097' */ + return 1097 } - case 1098: - { /* '1098' */ - return 1098 + case 1098: { /* '1098' */ + return 1098 } - case 1099: - { /* '1099' */ - return 1099 + case 1099: { /* '1099' */ + return 1099 } - case 11: - { /* '11' */ - return 11 + case 11: { /* '11' */ + return 11 } - case 110: - { /* '110' */ - return 110 + case 110: { /* '110' */ + return 110 } - case 1100: - { /* '1100' */ - return 1100 + case 1100: { /* '1100' */ + return 1100 } - case 1101: - { /* '1101' */ - return 1101 + case 1101: { /* '1101' */ + return 1101 } - case 1102: - { /* '1102' */ - return 1102 + case 1102: { /* '1102' */ + return 1102 } - case 1103: - { /* '1103' */ - return 1103 + case 1103: { /* '1103' */ + return 1103 } - case 1104: - { /* '1104' */ - return 1104 + case 1104: { /* '1104' */ + return 1104 } - case 1105: - { /* '1105' */ - return 1105 + case 1105: { /* '1105' */ + return 1105 } - case 1106: - { /* '1106' */ - return 1106 + case 1106: { /* '1106' */ + return 1106 } - case 1107: - { /* '1107' */ - return 1107 + case 1107: { /* '1107' */ + return 1107 } - case 1108: - { /* '1108' */ - return 1108 + case 1108: { /* '1108' */ + return 1108 } - case 1109: - { /* '1109' */ - return 1109 + case 1109: { /* '1109' */ + return 1109 } - case 111: - { /* '111' */ - return 111 + case 111: { /* '111' */ + return 111 } - case 1110: - { /* '1110' */ - return 1110 + case 1110: { /* '1110' */ + return 1110 } - case 1112: - { /* '1112' */ - return 1112 + case 1112: { /* '1112' */ + return 1112 } - case 1113: - { /* '1113' */ - return 1113 + case 1113: { /* '1113' */ + return 1113 } - case 1114: - { /* '1114' */ - return 1114 + case 1114: { /* '1114' */ + return 1114 } - case 1115: - { /* '1115' */ - return 1115 + case 1115: { /* '1115' */ + return 1115 } - case 1116: - { /* '1116' */ - return 1116 + case 1116: { /* '1116' */ + return 1116 } - case 1117: - { /* '1117' */ - return 1117 + case 1117: { /* '1117' */ + return 1117 } - case 1118: - { /* '1118' */ - return 1118 + case 1118: { /* '1118' */ + return 1118 } - case 1119: - { /* '1119' */ - return 1119 + case 1119: { /* '1119' */ + return 1119 } - case 112: - { /* '112' */ - return 112 + case 112: { /* '112' */ + return 112 } - case 1120: - { /* '1120' */ - return 1120 + case 1120: { /* '1120' */ + return 1120 } - case 1121: - { /* '1121' */ - return 1121 + case 1121: { /* '1121' */ + return 1121 } - case 1122: - { /* '1122' */ - return 1122 + case 1122: { /* '1122' */ + return 1122 } - case 1123: - { /* '1123' */ - return 1123 + case 1123: { /* '1123' */ + return 1123 } - case 1124: - { /* '1124' */ - return 1124 + case 1124: { /* '1124' */ + return 1124 } - case 1125: - { /* '1125' */ - return 1125 + case 1125: { /* '1125' */ + return 1125 } - case 1126: - { /* '1126' */ - return 1126 + case 1126: { /* '1126' */ + return 1126 } - case 1127: - { /* '1127' */ - return 1127 + case 1127: { /* '1127' */ + return 1127 } - case 1128: - { /* '1128' */ - return 1128 + case 1128: { /* '1128' */ + return 1128 } - case 1129: - { /* '1129' */ - return 1129 + case 1129: { /* '1129' */ + return 1129 } - case 113: - { /* '113' */ - return 113 + case 113: { /* '113' */ + return 113 } - case 1130: - { /* '1130' */ - return 1130 + case 1130: { /* '1130' */ + return 1130 } - case 1131: - { /* '1131' */ - return 1131 + case 1131: { /* '1131' */ + return 1131 } - case 1132: - { /* '1132' */ - return 1132 + case 1132: { /* '1132' */ + return 1132 } - case 1133: - { /* '1133' */ - return 1133 + case 1133: { /* '1133' */ + return 1133 } - case 1134: - { /* '1134' */ - return 1134 + case 1134: { /* '1134' */ + return 1134 } - case 1135: - { /* '1135' */ - return 1135 + case 1135: { /* '1135' */ + return 1135 } - case 1136: - { /* '1136' */ - return 1136 + case 1136: { /* '1136' */ + return 1136 } - case 1137: - { /* '1137' */ - return 1137 + case 1137: { /* '1137' */ + return 1137 } - case 1138: - { /* '1138' */ - return 1138 + case 1138: { /* '1138' */ + return 1138 } - case 1139: - { /* '1139' */ - return 1139 + case 1139: { /* '1139' */ + return 1139 } - case 114: - { /* '114' */ - return 114 + case 114: { /* '114' */ + return 114 } - case 1140: - { /* '1140' */ - return 1140 + case 1140: { /* '1140' */ + return 1140 } - case 1141: - { /* '1141' */ - return 1141 + case 1141: { /* '1141' */ + return 1141 } - case 1142: - { /* '1142' */ - return 1142 + case 1142: { /* '1142' */ + return 1142 } - case 1143: - { /* '1143' */ - return 1143 + case 1143: { /* '1143' */ + return 1143 } - case 1144: - { /* '1144' */ - return 1144 + case 1144: { /* '1144' */ + return 1144 } - case 1145: - { /* '1145' */ - return 1145 + case 1145: { /* '1145' */ + return 1145 } - case 1146: - { /* '1146' */ - return 1146 + case 1146: { /* '1146' */ + return 1146 } - case 1147: - { /* '1147' */ - return 1147 + case 1147: { /* '1147' */ + return 1147 } - case 1148: - { /* '1148' */ - return 1148 + case 1148: { /* '1148' */ + return 1148 } - case 1149: - { /* '1149' */ - return 1149 + case 1149: { /* '1149' */ + return 1149 } - case 115: - { /* '115' */ - return 115 + case 115: { /* '115' */ + return 115 } - case 1150: - { /* '1150' */ - return 1150 + case 1150: { /* '1150' */ + return 1150 } - case 1151: - { /* '1151' */ - return 1151 + case 1151: { /* '1151' */ + return 1151 } - case 1152: - { /* '1152' */ - return 1152 + case 1152: { /* '1152' */ + return 1152 } - case 1153: - { /* '1153' */ - return 1153 + case 1153: { /* '1153' */ + return 1153 } - case 1154: - { /* '1154' */ - return 1154 + case 1154: { /* '1154' */ + return 1154 } - case 1155: - { /* '1155' */ - return 1155 + case 1155: { /* '1155' */ + return 1155 } - case 1156: - { /* '1156' */ - return 1156 + case 1156: { /* '1156' */ + return 1156 } - case 1157: - { /* '1157' */ - return 1157 + case 1157: { /* '1157' */ + return 1157 } - case 1158: - { /* '1158' */ - return 1158 + case 1158: { /* '1158' */ + return 1158 } - case 1159: - { /* '1159' */ - return 1159 + case 1159: { /* '1159' */ + return 1159 } - case 116: - { /* '116' */ - return 116 + case 116: { /* '116' */ + return 116 } - case 1160: - { /* '1160' */ - return 1160 + case 1160: { /* '1160' */ + return 1160 } - case 1161: - { /* '1161' */ - return 1161 + case 1161: { /* '1161' */ + return 1161 } - case 1162: - { /* '1162' */ - return 1162 + case 1162: { /* '1162' */ + return 1162 } - case 1163: - { /* '1163' */ - return 1163 + case 1163: { /* '1163' */ + return 1163 } - case 1164: - { /* '1164' */ - return 1164 + case 1164: { /* '1164' */ + return 1164 } - case 1165: - { /* '1165' */ - return 1165 + case 1165: { /* '1165' */ + return 1165 } - case 1166: - { /* '1166' */ - return 1166 + case 1166: { /* '1166' */ + return 1166 } - case 1167: - { /* '1167' */ - return 1167 + case 1167: { /* '1167' */ + return 1167 } - case 1168: - { /* '1168' */ - return 1168 + case 1168: { /* '1168' */ + return 1168 } - case 1169: - { /* '1169' */ - return 1169 + case 1169: { /* '1169' */ + return 1169 } - case 117: - { /* '117' */ - return 117 + case 117: { /* '117' */ + return 117 } - case 1170: - { /* '1170' */ - return 1170 + case 1170: { /* '1170' */ + return 1170 } - case 1171: - { /* '1171' */ - return 1171 + case 1171: { /* '1171' */ + return 1171 } - case 1172: - { /* '1172' */ - return 1172 + case 1172: { /* '1172' */ + return 1172 } - case 1173: - { /* '1173' */ - return 1173 + case 1173: { /* '1173' */ + return 1173 } - case 1174: - { /* '1174' */ - return 1174 + case 1174: { /* '1174' */ + return 1174 } - case 1175: - { /* '1175' */ - return 1175 + case 1175: { /* '1175' */ + return 1175 } - case 1176: - { /* '1176' */ - return 1176 + case 1176: { /* '1176' */ + return 1176 } - case 1177: - { /* '1177' */ - return 1177 + case 1177: { /* '1177' */ + return 1177 } - case 1178: - { /* '1178' */ - return 1178 + case 1178: { /* '1178' */ + return 1178 } - case 1179: - { /* '1179' */ - return 1179 + case 1179: { /* '1179' */ + return 1179 } - case 118: - { /* '118' */ - return 118 + case 118: { /* '118' */ + return 118 } - case 1180: - { /* '1180' */ - return 1180 + case 1180: { /* '1180' */ + return 1180 } - case 1181: - { /* '1181' */ - return 1181 + case 1181: { /* '1181' */ + return 1181 } - case 1182: - { /* '1182' */ - return 1182 + case 1182: { /* '1182' */ + return 1182 } - case 1183: - { /* '1183' */ - return 1183 + case 1183: { /* '1183' */ + return 1183 } - case 1184: - { /* '1184' */ - return 1184 + case 1184: { /* '1184' */ + return 1184 } - case 1185: - { /* '1185' */ - return 1185 + case 1185: { /* '1185' */ + return 1185 } - case 1186: - { /* '1186' */ - return 1186 + case 1186: { /* '1186' */ + return 1186 } - case 1187: - { /* '1187' */ - return 1187 + case 1187: { /* '1187' */ + return 1187 } - case 1188: - { /* '1188' */ - return 1188 + case 1188: { /* '1188' */ + return 1188 } - case 1189: - { /* '1189' */ - return 1189 + case 1189: { /* '1189' */ + return 1189 } - case 119: - { /* '119' */ - return 119 + case 119: { /* '119' */ + return 119 } - case 1190: - { /* '1190' */ - return 1190 + case 1190: { /* '1190' */ + return 1190 } - case 1191: - { /* '1191' */ - return 1191 + case 1191: { /* '1191' */ + return 1191 } - case 1192: - { /* '1192' */ - return 1192 + case 1192: { /* '1192' */ + return 1192 } - case 1193: - { /* '1193' */ - return 1193 + case 1193: { /* '1193' */ + return 1193 } - case 1194: - { /* '1194' */ - return 1194 + case 1194: { /* '1194' */ + return 1194 } - case 1195: - { /* '1195' */ - return 1195 + case 1195: { /* '1195' */ + return 1195 } - case 1196: - { /* '1196' */ - return 1196 + case 1196: { /* '1196' */ + return 1196 } - case 1197: - { /* '1197' */ - return 1197 + case 1197: { /* '1197' */ + return 1197 } - case 1198: - { /* '1198' */ - return 1198 + case 1198: { /* '1198' */ + return 1198 } - case 1199: - { /* '1199' */ - return 1199 + case 1199: { /* '1199' */ + return 1199 } - case 12: - { /* '12' */ - return 12 + case 12: { /* '12' */ + return 12 } - case 120: - { /* '120' */ - return 120 + case 120: { /* '120' */ + return 120 } - case 1200: - { /* '1200' */ - return 1200 + case 1200: { /* '1200' */ + return 1200 } - case 1201: - { /* '1201' */ - return 1201 + case 1201: { /* '1201' */ + return 1201 } - case 1202: - { /* '1202' */ - return 1202 + case 1202: { /* '1202' */ + return 1202 } - case 1203: - { /* '1203' */ - return 1203 + case 1203: { /* '1203' */ + return 1203 } - case 1204: - { /* '1204' */ - return 1204 + case 1204: { /* '1204' */ + return 1204 } - case 1205: - { /* '1205' */ - return 1205 + case 1205: { /* '1205' */ + return 1205 } - case 1206: - { /* '1206' */ - return 1206 + case 1206: { /* '1206' */ + return 1206 } - case 1207: - { /* '1207' */ - return 1207 + case 1207: { /* '1207' */ + return 1207 } - case 1208: - { /* '1208' */ - return 1208 + case 1208: { /* '1208' */ + return 1208 } - case 1209: - { /* '1209' */ - return 1209 + case 1209: { /* '1209' */ + return 1209 } - case 121: - { /* '121' */ - return 121 + case 121: { /* '121' */ + return 121 } - case 1210: - { /* '1210' */ - return 1210 + case 1210: { /* '1210' */ + return 1210 } - case 1211: - { /* '1211' */ - return 1211 + case 1211: { /* '1211' */ + return 1211 } - case 1212: - { /* '1212' */ - return 1212 + case 1212: { /* '1212' */ + return 1212 } - case 1213: - { /* '1213' */ - return 1213 + case 1213: { /* '1213' */ + return 1213 } - case 1214: - { /* '1214' */ - return 1214 + case 1214: { /* '1214' */ + return 1214 } - case 1215: - { /* '1215' */ - return 1215 + case 1215: { /* '1215' */ + return 1215 } - case 1216: - { /* '1216' */ - return 1216 + case 1216: { /* '1216' */ + return 1216 } - case 1217: - { /* '1217' */ - return 1217 + case 1217: { /* '1217' */ + return 1217 } - case 1218: - { /* '1218' */ - return 1218 + case 1218: { /* '1218' */ + return 1218 } - case 1219: - { /* '1219' */ - return 1219 + case 1219: { /* '1219' */ + return 1219 } - case 122: - { /* '122' */ - return 122 + case 122: { /* '122' */ + return 122 } - case 1220: - { /* '1220' */ - return 1220 + case 1220: { /* '1220' */ + return 1220 } - case 1221: - { /* '1221' */ - return 1221 + case 1221: { /* '1221' */ + return 1221 } - case 1222: - { /* '1222' */ - return 1222 + case 1222: { /* '1222' */ + return 1222 } - case 1223: - { /* '1223' */ - return 1223 + case 1223: { /* '1223' */ + return 1223 } - case 1224: - { /* '1224' */ - return 1224 + case 1224: { /* '1224' */ + return 1224 } - case 1225: - { /* '1225' */ - return 1225 + case 1225: { /* '1225' */ + return 1225 } - case 1226: - { /* '1226' */ - return 1226 + case 1226: { /* '1226' */ + return 1226 } - case 1227: - { /* '1227' */ - return 1227 + case 1227: { /* '1227' */ + return 1227 } - case 1228: - { /* '1228' */ - return 1228 + case 1228: { /* '1228' */ + return 1228 } - case 1229: - { /* '1229' */ - return 1229 + case 1229: { /* '1229' */ + return 1229 } - case 123: - { /* '123' */ - return 123 + case 123: { /* '123' */ + return 123 } - case 1230: - { /* '1230' */ - return 1230 + case 1230: { /* '1230' */ + return 1230 } - case 1231: - { /* '1231' */ - return 1231 + case 1231: { /* '1231' */ + return 1231 } - case 1232: - { /* '1232' */ - return 1232 + case 1232: { /* '1232' */ + return 1232 } - case 1233: - { /* '1233' */ - return 1233 + case 1233: { /* '1233' */ + return 1233 } - case 1234: - { /* '1234' */ - return 1234 + case 1234: { /* '1234' */ + return 1234 } - case 1235: - { /* '1235' */ - return 1235 + case 1235: { /* '1235' */ + return 1235 } - case 1236: - { /* '1236' */ - return 1236 + case 1236: { /* '1236' */ + return 1236 } - case 1237: - { /* '1237' */ - return 1237 + case 1237: { /* '1237' */ + return 1237 } - case 1238: - { /* '1238' */ - return 1238 + case 1238: { /* '1238' */ + return 1238 } - case 1239: - { /* '1239' */ - return 1239 + case 1239: { /* '1239' */ + return 1239 } - case 124: - { /* '124' */ - return 124 + case 124: { /* '124' */ + return 124 } - case 1240: - { /* '1240' */ - return 1240 + case 1240: { /* '1240' */ + return 1240 } - case 1241: - { /* '1241' */ - return 1241 + case 1241: { /* '1241' */ + return 1241 } - case 1242: - { /* '1242' */ - return 1242 + case 1242: { /* '1242' */ + return 1242 } - case 1243: - { /* '1243' */ - return 1243 + case 1243: { /* '1243' */ + return 1243 } - case 1244: - { /* '1244' */ - return 1244 + case 1244: { /* '1244' */ + return 1244 } - case 1245: - { /* '1245' */ - return 1245 + case 1245: { /* '1245' */ + return 1245 } - case 1246: - { /* '1246' */ - return 1246 + case 1246: { /* '1246' */ + return 1246 } - case 1247: - { /* '1247' */ - return 1247 + case 1247: { /* '1247' */ + return 1247 } - case 1248: - { /* '1248' */ - return 1248 + case 1248: { /* '1248' */ + return 1248 } - case 1249: - { /* '1249' */ - return 1249 + case 1249: { /* '1249' */ + return 1249 } - case 125: - { /* '125' */ - return 125 + case 125: { /* '125' */ + return 125 } - case 1250: - { /* '1250' */ - return 1250 + case 1250: { /* '1250' */ + return 1250 } - case 1251: - { /* '1251' */ - return 1251 + case 1251: { /* '1251' */ + return 1251 } - case 1252: - { /* '1252' */ - return 1252 + case 1252: { /* '1252' */ + return 1252 } - case 1253: - { /* '1253' */ - return 1253 + case 1253: { /* '1253' */ + return 1253 } - case 1254: - { /* '1254' */ - return 1254 + case 1254: { /* '1254' */ + return 1254 } - case 1255: - { /* '1255' */ - return 1255 + case 1255: { /* '1255' */ + return 1255 } - case 1256: - { /* '1256' */ - return 1256 + case 1256: { /* '1256' */ + return 1256 } - case 1257: - { /* '1257' */ - return 1257 + case 1257: { /* '1257' */ + return 1257 } - case 1258: - { /* '1258' */ - return 1258 + case 1258: { /* '1258' */ + return 1258 } - case 1259: - { /* '1259' */ - return 1259 + case 1259: { /* '1259' */ + return 1259 } - case 126: - { /* '126' */ - return 126 + case 126: { /* '126' */ + return 126 } - case 1260: - { /* '1260' */ - return 1260 + case 1260: { /* '1260' */ + return 1260 } - case 1261: - { /* '1261' */ - return 1261 + case 1261: { /* '1261' */ + return 1261 } - case 1262: - { /* '1262' */ - return 1262 + case 1262: { /* '1262' */ + return 1262 } - case 1263: - { /* '1263' */ - return 1263 + case 1263: { /* '1263' */ + return 1263 } - case 1264: - { /* '1264' */ - return 1264 + case 1264: { /* '1264' */ + return 1264 } - case 1265: - { /* '1265' */ - return 1265 + case 1265: { /* '1265' */ + return 1265 } - case 1266: - { /* '1266' */ - return 1266 + case 1266: { /* '1266' */ + return 1266 } - case 1267: - { /* '1267' */ - return 1267 + case 1267: { /* '1267' */ + return 1267 } - case 1268: - { /* '1268' */ - return 1268 + case 1268: { /* '1268' */ + return 1268 } - case 1269: - { /* '1269' */ - return 1269 + case 1269: { /* '1269' */ + return 1269 } - case 127: - { /* '127' */ - return 127 + case 127: { /* '127' */ + return 127 } - case 1270: - { /* '1270' */ - return 1270 + case 1270: { /* '1270' */ + return 1270 } - case 1271: - { /* '1271' */ - return 1271 + case 1271: { /* '1271' */ + return 1271 } - case 1272: - { /* '1272' */ - return 1272 + case 1272: { /* '1272' */ + return 1272 } - case 1273: - { /* '1273' */ - return 1273 + case 1273: { /* '1273' */ + return 1273 } - case 1274: - { /* '1274' */ - return 1274 + case 1274: { /* '1274' */ + return 1274 } - case 1275: - { /* '1275' */ - return 1275 + case 1275: { /* '1275' */ + return 1275 } - case 1276: - { /* '1276' */ - return 1276 + case 1276: { /* '1276' */ + return 1276 } - case 1277: - { /* '1277' */ - return 1277 + case 1277: { /* '1277' */ + return 1277 } - case 1278: - { /* '1278' */ - return 1278 + case 1278: { /* '1278' */ + return 1278 } - case 1279: - { /* '1279' */ - return 1279 + case 1279: { /* '1279' */ + return 1279 } - case 128: - { /* '128' */ - return 128 + case 128: { /* '128' */ + return 128 } - case 1280: - { /* '1280' */ - return 1280 + case 1280: { /* '1280' */ + return 1280 } - case 1281: - { /* '1281' */ - return 1281 + case 1281: { /* '1281' */ + return 1281 } - case 1282: - { /* '1282' */ - return 1282 + case 1282: { /* '1282' */ + return 1282 } - case 1283: - { /* '1283' */ - return 1283 + case 1283: { /* '1283' */ + return 1283 } - case 1284: - { /* '1284' */ - return 1284 + case 1284: { /* '1284' */ + return 1284 } - case 1285: - { /* '1285' */ - return 1285 + case 1285: { /* '1285' */ + return 1285 } - case 1286: - { /* '1286' */ - return 1286 + case 1286: { /* '1286' */ + return 1286 } - case 1287: - { /* '1287' */ - return 1287 + case 1287: { /* '1287' */ + return 1287 } - case 1288: - { /* '1288' */ - return 1288 + case 1288: { /* '1288' */ + return 1288 } - case 1289: - { /* '1289' */ - return 1289 + case 1289: { /* '1289' */ + return 1289 } - case 129: - { /* '129' */ - return 129 + case 129: { /* '129' */ + return 129 } - case 1290: - { /* '1290' */ - return 1290 + case 1290: { /* '1290' */ + return 1290 } - case 1291: - { /* '1291' */ - return 1291 + case 1291: { /* '1291' */ + return 1291 } - case 1292: - { /* '1292' */ - return 1292 + case 1292: { /* '1292' */ + return 1292 } - case 1293: - { /* '1293' */ - return 1293 + case 1293: { /* '1293' */ + return 1293 } - case 1294: - { /* '1294' */ - return 1294 + case 1294: { /* '1294' */ + return 1294 } - case 1295: - { /* '1295' */ - return 1295 + case 1295: { /* '1295' */ + return 1295 } - case 1296: - { /* '1296' */ - return 1296 + case 1296: { /* '1296' */ + return 1296 } - case 1297: - { /* '1297' */ - return 1297 + case 1297: { /* '1297' */ + return 1297 } - case 1298: - { /* '1298' */ - return 1298 + case 1298: { /* '1298' */ + return 1298 } - case 1299: - { /* '1299' */ - return 1299 + case 1299: { /* '1299' */ + return 1299 } - case 13: - { /* '13' */ - return 13 + case 13: { /* '13' */ + return 13 } - case 130: - { /* '130' */ - return 130 + case 130: { /* '130' */ + return 130 } - case 1300: - { /* '1300' */ - return 1300 + case 1300: { /* '1300' */ + return 1300 } - case 1301: - { /* '1301' */ - return 1301 + case 1301: { /* '1301' */ + return 1301 } - case 1302: - { /* '1302' */ - return 1302 + case 1302: { /* '1302' */ + return 1302 } - case 1303: - { /* '1303' */ - return 1303 + case 1303: { /* '1303' */ + return 1303 } - case 1304: - { /* '1304' */ - return 1304 + case 1304: { /* '1304' */ + return 1304 } - case 1305: - { /* '1305' */ - return 1305 + case 1305: { /* '1305' */ + return 1305 } - case 1306: - { /* '1306' */ - return 1306 + case 1306: { /* '1306' */ + return 1306 } - case 1307: - { /* '1307' */ - return 1307 + case 1307: { /* '1307' */ + return 1307 } - case 1308: - { /* '1308' */ - return 1308 + case 1308: { /* '1308' */ + return 1308 } - case 1309: - { /* '1309' */ - return 1309 + case 1309: { /* '1309' */ + return 1309 } - case 131: - { /* '131' */ - return 131 + case 131: { /* '131' */ + return 131 } - case 1310: - { /* '1310' */ - return 1310 + case 1310: { /* '1310' */ + return 1310 } - case 1311: - { /* '1311' */ - return 1311 + case 1311: { /* '1311' */ + return 1311 } - case 1312: - { /* '1312' */ - return 1312 + case 1312: { /* '1312' */ + return 1312 } - case 1313: - { /* '1313' */ - return 1313 + case 1313: { /* '1313' */ + return 1313 } - case 1314: - { /* '1314' */ - return 1314 + case 1314: { /* '1314' */ + return 1314 } - case 1315: - { /* '1315' */ - return 1315 + case 1315: { /* '1315' */ + return 1315 } - case 1316: - { /* '1316' */ - return 1316 + case 1316: { /* '1316' */ + return 1316 } - case 1317: - { /* '1317' */ - return 1317 + case 1317: { /* '1317' */ + return 1317 } - case 1318: - { /* '1318' */ - return 1318 + case 1318: { /* '1318' */ + return 1318 } - case 1319: - { /* '1319' */ - return 1319 + case 1319: { /* '1319' */ + return 1319 } - case 132: - { /* '132' */ - return 132 + case 132: { /* '132' */ + return 132 } - case 1320: - { /* '1320' */ - return 1320 + case 1320: { /* '1320' */ + return 1320 } - case 1321: - { /* '1321' */ - return 1321 + case 1321: { /* '1321' */ + return 1321 } - case 1322: - { /* '1322' */ - return 1322 + case 1322: { /* '1322' */ + return 1322 } - case 1323: - { /* '1323' */ - return 1323 + case 1323: { /* '1323' */ + return 1323 } - case 1324: - { /* '1324' */ - return 1324 + case 1324: { /* '1324' */ + return 1324 } - case 1325: - { /* '1325' */ - return 1325 + case 1325: { /* '1325' */ + return 1325 } - case 1326: - { /* '1326' */ - return 1326 + case 1326: { /* '1326' */ + return 1326 } - case 1327: - { /* '1327' */ - return 1327 + case 1327: { /* '1327' */ + return 1327 } - case 1328: - { /* '1328' */ - return 1328 + case 1328: { /* '1328' */ + return 1328 } - case 1329: - { /* '1329' */ - return 1329 + case 1329: { /* '1329' */ + return 1329 } - case 133: - { /* '133' */ - return 133 + case 133: { /* '133' */ + return 133 } - case 1330: - { /* '1330' */ - return 1330 + case 1330: { /* '1330' */ + return 1330 } - case 1331: - { /* '1331' */ - return 1331 + case 1331: { /* '1331' */ + return 1331 } - case 1332: - { /* '1332' */ - return 1332 + case 1332: { /* '1332' */ + return 1332 } - case 1333: - { /* '1333' */ - return 1333 + case 1333: { /* '1333' */ + return 1333 } - case 1334: - { /* '1334' */ - return 1334 + case 1334: { /* '1334' */ + return 1334 } - case 1335: - { /* '1335' */ - return 1335 + case 1335: { /* '1335' */ + return 1335 } - case 1336: - { /* '1336' */ - return 1336 + case 1336: { /* '1336' */ + return 1336 } - case 1337: - { /* '1337' */ - return 1337 + case 1337: { /* '1337' */ + return 1337 } - case 1338: - { /* '1338' */ - return 1338 + case 1338: { /* '1338' */ + return 1338 } - case 1339: - { /* '1339' */ - return 1339 + case 1339: { /* '1339' */ + return 1339 } - case 134: - { /* '134' */ - return 134 + case 134: { /* '134' */ + return 134 } - case 1340: - { /* '1340' */ - return 1340 + case 1340: { /* '1340' */ + return 1340 } - case 1341: - { /* '1341' */ - return 1341 + case 1341: { /* '1341' */ + return 1341 } - case 1342: - { /* '1342' */ - return 1342 + case 1342: { /* '1342' */ + return 1342 } - case 1343: - { /* '1343' */ - return 1343 + case 1343: { /* '1343' */ + return 1343 } - case 1344: - { /* '1344' */ - return 1344 + case 1344: { /* '1344' */ + return 1344 } - case 1345: - { /* '1345' */ - return 1345 + case 1345: { /* '1345' */ + return 1345 } - case 1346: - { /* '1346' */ - return 1346 + case 1346: { /* '1346' */ + return 1346 } - case 1347: - { /* '1347' */ - return 1347 + case 1347: { /* '1347' */ + return 1347 } - case 1348: - { /* '1348' */ - return 1348 + case 1348: { /* '1348' */ + return 1348 } - case 1349: - { /* '1349' */ - return 1349 + case 1349: { /* '1349' */ + return 1349 } - case 135: - { /* '135' */ - return 135 + case 135: { /* '135' */ + return 135 } - case 1350: - { /* '1350' */ - return 1350 + case 1350: { /* '1350' */ + return 1350 } - case 1351: - { /* '1351' */ - return 1351 + case 1351: { /* '1351' */ + return 1351 } - case 1352: - { /* '1352' */ - return 1352 + case 1352: { /* '1352' */ + return 1352 } - case 1353: - { /* '1353' */ - return 1353 + case 1353: { /* '1353' */ + return 1353 } - case 1354: - { /* '1354' */ - return 1354 + case 1354: { /* '1354' */ + return 1354 } - case 1355: - { /* '1355' */ - return 1355 + case 1355: { /* '1355' */ + return 1355 } - case 1356: - { /* '1356' */ - return 1356 + case 1356: { /* '1356' */ + return 1356 } - case 1357: - { /* '1357' */ - return 1357 + case 1357: { /* '1357' */ + return 1357 } - case 1358: - { /* '1358' */ - return 1358 + case 1358: { /* '1358' */ + return 1358 } - case 1359: - { /* '1359' */ - return 1359 + case 1359: { /* '1359' */ + return 1359 } - case 136: - { /* '136' */ - return 136 + case 136: { /* '136' */ + return 136 } - case 1360: - { /* '1360' */ - return 1360 + case 1360: { /* '1360' */ + return 1360 } - case 1361: - { /* '1361' */ - return 1361 + case 1361: { /* '1361' */ + return 1361 } - case 1362: - { /* '1362' */ - return 1362 + case 1362: { /* '1362' */ + return 1362 } - case 1363: - { /* '1363' */ - return 1363 + case 1363: { /* '1363' */ + return 1363 } - case 1364: - { /* '1364' */ - return 1364 + case 1364: { /* '1364' */ + return 1364 } - case 1365: - { /* '1365' */ - return 1365 + case 1365: { /* '1365' */ + return 1365 } - case 1366: - { /* '1366' */ - return 1366 + case 1366: { /* '1366' */ + return 1366 } - case 1367: - { /* '1367' */ - return 1367 + case 1367: { /* '1367' */ + return 1367 } - case 1368: - { /* '1368' */ - return 1368 + case 1368: { /* '1368' */ + return 1368 } - case 1369: - { /* '1369' */ - return 1369 + case 1369: { /* '1369' */ + return 1369 } - case 137: - { /* '137' */ - return 137 + case 137: { /* '137' */ + return 137 } - case 1370: - { /* '1370' */ - return 1370 + case 1370: { /* '1370' */ + return 1370 } - case 1371: - { /* '1371' */ - return 1371 + case 1371: { /* '1371' */ + return 1371 } - case 1372: - { /* '1372' */ - return 1372 + case 1372: { /* '1372' */ + return 1372 } - case 1373: - { /* '1373' */ - return 1373 + case 1373: { /* '1373' */ + return 1373 } - case 1374: - { /* '1374' */ - return 1374 + case 1374: { /* '1374' */ + return 1374 } - case 1375: - { /* '1375' */ - return 1375 + case 1375: { /* '1375' */ + return 1375 } - case 1376: - { /* '1376' */ - return 1376 + case 1376: { /* '1376' */ + return 1376 } - case 1377: - { /* '1377' */ - return 1377 + case 1377: { /* '1377' */ + return 1377 } - case 1378: - { /* '1378' */ - return 1378 + case 1378: { /* '1378' */ + return 1378 } - case 1379: - { /* '1379' */ - return 1379 + case 1379: { /* '1379' */ + return 1379 } - case 138: - { /* '138' */ - return 138 + case 138: { /* '138' */ + return 138 } - case 1380: - { /* '1380' */ - return 1380 + case 1380: { /* '1380' */ + return 1380 } - case 1381: - { /* '1381' */ - return 1381 + case 1381: { /* '1381' */ + return 1381 } - case 1382: - { /* '1382' */ - return 1382 + case 1382: { /* '1382' */ + return 1382 } - case 1383: - { /* '1383' */ - return 1383 + case 1383: { /* '1383' */ + return 1383 } - case 1384: - { /* '1384' */ - return 1384 + case 1384: { /* '1384' */ + return 1384 } - case 1385: - { /* '1385' */ - return 1385 + case 1385: { /* '1385' */ + return 1385 } - case 1386: - { /* '1386' */ - return 1386 + case 1386: { /* '1386' */ + return 1386 } - case 1387: - { /* '1387' */ - return 1387 + case 1387: { /* '1387' */ + return 1387 } - case 1388: - { /* '1388' */ - return 1388 + case 1388: { /* '1388' */ + return 1388 } - case 1389: - { /* '1389' */ - return 1389 + case 1389: { /* '1389' */ + return 1389 } - case 139: - { /* '139' */ - return 139 + case 139: { /* '139' */ + return 139 } - case 1390: - { /* '1390' */ - return 1390 + case 1390: { /* '1390' */ + return 1390 } - case 1391: - { /* '1391' */ - return 1391 + case 1391: { /* '1391' */ + return 1391 } - case 1392: - { /* '1392' */ - return 1392 + case 1392: { /* '1392' */ + return 1392 } - case 1393: - { /* '1393' */ - return 1393 + case 1393: { /* '1393' */ + return 1393 } - case 1394: - { /* '1394' */ - return 1394 + case 1394: { /* '1394' */ + return 1394 } - case 1396: - { /* '1396' */ - return 1396 + case 1396: { /* '1396' */ + return 1396 } - case 1397: - { /* '1397' */ - return 1397 + case 1397: { /* '1397' */ + return 1397 } - case 1398: - { /* '1398' */ - return 1398 + case 1398: { /* '1398' */ + return 1398 } - case 1399: - { /* '1399' */ - return 1399 + case 1399: { /* '1399' */ + return 1399 } - case 14: - { /* '14' */ - return 14 + case 14: { /* '14' */ + return 14 } - case 140: - { /* '140' */ - return 140 + case 140: { /* '140' */ + return 140 } - case 1401: - { /* '1401' */ - return 1401 + case 1401: { /* '1401' */ + return 1401 } - case 1402: - { /* '1402' */ - return 1402 + case 1402: { /* '1402' */ + return 1402 } - case 1403: - { /* '1403' */ - return 1403 + case 1403: { /* '1403' */ + return 1403 } - case 1404: - { /* '1404' */ - return 1404 + case 1404: { /* '1404' */ + return 1404 } - case 1405: - { /* '1405' */ - return 1405 + case 1405: { /* '1405' */ + return 1405 } - case 1406: - { /* '1406' */ - return 1406 + case 1406: { /* '1406' */ + return 1406 } - case 141: - { /* '141' */ - return 141 + case 141: { /* '141' */ + return 141 } - case 142: - { /* '142' */ - return 142 + case 142: { /* '142' */ + return 142 } - case 143: - { /* '143' */ - return 143 + case 143: { /* '143' */ + return 143 } - case 144: - { /* '144' */ - return 144 + case 144: { /* '144' */ + return 144 } - case 145: - { /* '145' */ - return 145 + case 145: { /* '145' */ + return 145 } - case 146: - { /* '146' */ - return 146 + case 146: { /* '146' */ + return 146 } - case 147: - { /* '147' */ - return 147 + case 147: { /* '147' */ + return 147 } - case 148: - { /* '148' */ - return 148 + case 148: { /* '148' */ + return 148 } - case 149: - { /* '149' */ - return 149 + case 149: { /* '149' */ + return 149 } - case 15: - { /* '15' */ - return 15 + case 15: { /* '15' */ + return 15 } - case 150: - { /* '150' */ - return 150 + case 150: { /* '150' */ + return 150 } - case 151: - { /* '151' */ - return 151 + case 151: { /* '151' */ + return 151 } - case 152: - { /* '152' */ - return 152 + case 152: { /* '152' */ + return 152 } - case 153: - { /* '153' */ - return 153 + case 153: { /* '153' */ + return 153 } - case 154: - { /* '154' */ - return 154 + case 154: { /* '154' */ + return 154 } - case 155: - { /* '155' */ - return 155 + case 155: { /* '155' */ + return 155 } - case 156: - { /* '156' */ - return 156 + case 156: { /* '156' */ + return 156 } - case 157: - { /* '157' */ - return 157 + case 157: { /* '157' */ + return 157 } - case 158: - { /* '158' */ - return 158 + case 158: { /* '158' */ + return 158 } - case 159: - { /* '159' */ - return 159 + case 159: { /* '159' */ + return 159 } - case 16: - { /* '16' */ - return 16 + case 16: { /* '16' */ + return 16 } - case 160: - { /* '160' */ - return 160 + case 160: { /* '160' */ + return 160 } - case 161: - { /* '161' */ - return 161 + case 161: { /* '161' */ + return 161 } - case 162: - { /* '162' */ - return 162 + case 162: { /* '162' */ + return 162 } - case 163: - { /* '163' */ - return 163 + case 163: { /* '163' */ + return 163 } - case 164: - { /* '164' */ - return 164 + case 164: { /* '164' */ + return 164 } - case 165: - { /* '165' */ - return 165 + case 165: { /* '165' */ + return 165 } - case 166: - { /* '166' */ - return 166 + case 166: { /* '166' */ + return 166 } - case 167: - { /* '167' */ - return 167 + case 167: { /* '167' */ + return 167 } - case 168: - { /* '168' */ - return 168 + case 168: { /* '168' */ + return 168 } - case 169: - { /* '169' */ - return 169 + case 169: { /* '169' */ + return 169 } - case 17: - { /* '17' */ - return 17 + case 17: { /* '17' */ + return 17 } - case 170: - { /* '170' */ - return 170 + case 170: { /* '170' */ + return 170 } - case 171: - { /* '171' */ - return 171 + case 171: { /* '171' */ + return 171 } - case 172: - { /* '172' */ - return 172 + case 172: { /* '172' */ + return 172 } - case 173: - { /* '173' */ - return 173 + case 173: { /* '173' */ + return 173 } - case 174: - { /* '174' */ - return 174 + case 174: { /* '174' */ + return 174 } - case 175: - { /* '175' */ - return 175 + case 175: { /* '175' */ + return 175 } - case 176: - { /* '176' */ - return 176 + case 176: { /* '176' */ + return 176 } - case 177: - { /* '177' */ - return 177 + case 177: { /* '177' */ + return 177 } - case 178: - { /* '178' */ - return 178 + case 178: { /* '178' */ + return 178 } - case 179: - { /* '179' */ - return 179 + case 179: { /* '179' */ + return 179 } - case 18: - { /* '18' */ - return 18 + case 18: { /* '18' */ + return 18 } - case 180: - { /* '180' */ - return 180 + case 180: { /* '180' */ + return 180 } - case 181: - { /* '181' */ - return 181 + case 181: { /* '181' */ + return 181 } - case 182: - { /* '182' */ - return 182 + case 182: { /* '182' */ + return 182 } - case 183: - { /* '183' */ - return 183 + case 183: { /* '183' */ + return 183 } - case 184: - { /* '184' */ - return 184 + case 184: { /* '184' */ + return 184 } - case 185: - { /* '185' */ - return 185 + case 185: { /* '185' */ + return 185 } - case 186: - { /* '186' */ - return 186 + case 186: { /* '186' */ + return 186 } - case 187: - { /* '187' */ - return 187 + case 187: { /* '187' */ + return 187 } - case 188: - { /* '188' */ - return 188 + case 188: { /* '188' */ + return 188 } - case 189: - { /* '189' */ - return 189 + case 189: { /* '189' */ + return 189 } - case 19: - { /* '19' */ - return 19 + case 19: { /* '19' */ + return 19 } - case 190: - { /* '190' */ - return 190 + case 190: { /* '190' */ + return 190 } - case 191: - { /* '191' */ - return 191 + case 191: { /* '191' */ + return 191 } - case 192: - { /* '192' */ - return 192 + case 192: { /* '192' */ + return 192 } - case 193: - { /* '193' */ - return 193 + case 193: { /* '193' */ + return 193 } - case 194: - { /* '194' */ - return 194 + case 194: { /* '194' */ + return 194 } - case 195: - { /* '195' */ - return 195 + case 195: { /* '195' */ + return 195 } - case 196: - { /* '196' */ - return 196 + case 196: { /* '196' */ + return 196 } - case 197: - { /* '197' */ - return 197 + case 197: { /* '197' */ + return 197 } - case 198: - { /* '198' */ - return 198 + case 198: { /* '198' */ + return 198 } - case 199: - { /* '199' */ - return 199 + case 199: { /* '199' */ + return 199 } - case 2: - { /* '2' */ - return 2 + case 2: { /* '2' */ + return 2 } - case 20: - { /* '20' */ - return 20 + case 20: { /* '20' */ + return 20 } - case 200: - { /* '200' */ - return 200 + case 200: { /* '200' */ + return 200 } - case 201: - { /* '201' */ - return 201 + case 201: { /* '201' */ + return 201 } - case 202: - { /* '202' */ - return 202 + case 202: { /* '202' */ + return 202 } - case 203: - { /* '203' */ - return 203 + case 203: { /* '203' */ + return 203 } - case 204: - { /* '204' */ - return 204 + case 204: { /* '204' */ + return 204 } - case 205: - { /* '205' */ - return 205 + case 205: { /* '205' */ + return 205 } - case 206: - { /* '206' */ - return 206 + case 206: { /* '206' */ + return 206 } - case 207: - { /* '207' */ - return 207 + case 207: { /* '207' */ + return 207 } - case 208: - { /* '208' */ - return 208 + case 208: { /* '208' */ + return 208 } - case 209: - { /* '209' */ - return 209 + case 209: { /* '209' */ + return 209 } - case 21: - { /* '21' */ - return 21 + case 21: { /* '21' */ + return 21 } - case 210: - { /* '210' */ - return 210 + case 210: { /* '210' */ + return 210 } - case 211: - { /* '211' */ - return 211 + case 211: { /* '211' */ + return 211 } - case 212: - { /* '212' */ - return 212 + case 212: { /* '212' */ + return 212 } - case 213: - { /* '213' */ - return 213 + case 213: { /* '213' */ + return 213 } - case 214: - { /* '214' */ - return 214 + case 214: { /* '214' */ + return 214 } - case 215: - { /* '215' */ - return 215 + case 215: { /* '215' */ + return 215 } - case 216: - { /* '216' */ - return 216 + case 216: { /* '216' */ + return 216 } - case 217: - { /* '217' */ - return 217 + case 217: { /* '217' */ + return 217 } - case 218: - { /* '218' */ - return 218 + case 218: { /* '218' */ + return 218 } - case 219: - { /* '219' */ - return 219 + case 219: { /* '219' */ + return 219 } - case 22: - { /* '22' */ - return 22 + case 22: { /* '22' */ + return 22 } - case 220: - { /* '220' */ - return 220 + case 220: { /* '220' */ + return 220 } - case 221: - { /* '221' */ - return 221 + case 221: { /* '221' */ + return 221 } - case 222: - { /* '222' */ - return 222 + case 222: { /* '222' */ + return 222 } - case 223: - { /* '223' */ - return 223 + case 223: { /* '223' */ + return 223 } - case 224: - { /* '224' */ - return 224 + case 224: { /* '224' */ + return 224 } - case 225: - { /* '225' */ - return 225 + case 225: { /* '225' */ + return 225 } - case 226: - { /* '226' */ - return 226 + case 226: { /* '226' */ + return 226 } - case 227: - { /* '227' */ - return 227 + case 227: { /* '227' */ + return 227 } - case 228: - { /* '228' */ - return 228 + case 228: { /* '228' */ + return 228 } - case 229: - { /* '229' */ - return 229 + case 229: { /* '229' */ + return 229 } - case 23: - { /* '23' */ - return 23 + case 23: { /* '23' */ + return 23 } - case 230: - { /* '230' */ - return 230 + case 230: { /* '230' */ + return 230 } - case 231: - { /* '231' */ - return 231 + case 231: { /* '231' */ + return 231 } - case 232: - { /* '232' */ - return 232 + case 232: { /* '232' */ + return 232 } - case 233: - { /* '233' */ - return 233 + case 233: { /* '233' */ + return 233 } - case 234: - { /* '234' */ - return 234 + case 234: { /* '234' */ + return 234 } - case 235: - { /* '235' */ - return 235 + case 235: { /* '235' */ + return 235 } - case 236: - { /* '236' */ - return 236 + case 236: { /* '236' */ + return 236 } - case 237: - { /* '237' */ - return 237 + case 237: { /* '237' */ + return 237 } - case 238: - { /* '238' */ - return 238 + case 238: { /* '238' */ + return 238 } - case 239: - { /* '239' */ - return 239 + case 239: { /* '239' */ + return 239 } - case 24: - { /* '24' */ - return 24 + case 24: { /* '24' */ + return 24 } - case 240: - { /* '240' */ - return 240 + case 240: { /* '240' */ + return 240 } - case 241: - { /* '241' */ - return 241 + case 241: { /* '241' */ + return 241 } - case 242: - { /* '242' */ - return 242 + case 242: { /* '242' */ + return 242 } - case 243: - { /* '243' */ - return 243 + case 243: { /* '243' */ + return 243 } - case 244: - { /* '244' */ - return 244 + case 244: { /* '244' */ + return 244 } - case 245: - { /* '245' */ - return 245 + case 245: { /* '245' */ + return 245 } - case 246: - { /* '246' */ - return 246 + case 246: { /* '246' */ + return 246 } - case 247: - { /* '247' */ - return 247 + case 247: { /* '247' */ + return 247 } - case 248: - { /* '248' */ - return 248 + case 248: { /* '248' */ + return 248 } - case 249: - { /* '249' */ - return 249 + case 249: { /* '249' */ + return 249 } - case 25: - { /* '25' */ - return 25 + case 25: { /* '25' */ + return 25 } - case 250: - { /* '250' */ - return 250 + case 250: { /* '250' */ + return 250 } - case 251: - { /* '251' */ - return 251 + case 251: { /* '251' */ + return 251 } - case 252: - { /* '252' */ - return 252 + case 252: { /* '252' */ + return 252 } - case 253: - { /* '253' */ - return 253 + case 253: { /* '253' */ + return 253 } - case 254: - { /* '254' */ - return 254 + case 254: { /* '254' */ + return 254 } - case 255: - { /* '255' */ - return 255 + case 255: { /* '255' */ + return 255 } - case 256: - { /* '256' */ - return 256 + case 256: { /* '256' */ + return 256 } - case 257: - { /* '257' */ - return 257 + case 257: { /* '257' */ + return 257 } - case 258: - { /* '258' */ - return 258 + case 258: { /* '258' */ + return 258 } - case 259: - { /* '259' */ - return 259 + case 259: { /* '259' */ + return 259 } - case 26: - { /* '26' */ - return 26 + case 26: { /* '26' */ + return 26 } - case 260: - { /* '260' */ - return 260 + case 260: { /* '260' */ + return 260 } - case 261: - { /* '261' */ - return 261 + case 261: { /* '261' */ + return 261 } - case 262: - { /* '262' */ - return 262 + case 262: { /* '262' */ + return 262 } - case 263: - { /* '263' */ - return 263 + case 263: { /* '263' */ + return 263 } - case 264: - { /* '264' */ - return 264 + case 264: { /* '264' */ + return 264 } - case 265: - { /* '265' */ - return 265 + case 265: { /* '265' */ + return 265 } - case 266: - { /* '266' */ - return 266 + case 266: { /* '266' */ + return 266 } - case 267: - { /* '267' */ - return 267 + case 267: { /* '267' */ + return 267 } - case 268: - { /* '268' */ - return 268 + case 268: { /* '268' */ + return 268 } - case 269: - { /* '269' */ - return 269 + case 269: { /* '269' */ + return 269 } - case 27: - { /* '27' */ - return 27 + case 27: { /* '27' */ + return 27 } - case 270: - { /* '270' */ - return 270 + case 270: { /* '270' */ + return 270 } - case 271: - { /* '271' */ - return 271 + case 271: { /* '271' */ + return 271 } - case 272: - { /* '272' */ - return 272 + case 272: { /* '272' */ + return 272 } - case 273: - { /* '273' */ - return 273 + case 273: { /* '273' */ + return 273 } - case 274: - { /* '274' */ - return 274 + case 274: { /* '274' */ + return 274 } - case 275: - { /* '275' */ - return 275 + case 275: { /* '275' */ + return 275 } - case 276: - { /* '276' */ - return 276 + case 276: { /* '276' */ + return 276 } - case 277: - { /* '277' */ - return 277 + case 277: { /* '277' */ + return 277 } - case 278: - { /* '278' */ - return 278 + case 278: { /* '278' */ + return 278 } - case 279: - { /* '279' */ - return 279 + case 279: { /* '279' */ + return 279 } - case 28: - { /* '28' */ - return 28 + case 28: { /* '28' */ + return 28 } - case 280: - { /* '280' */ - return 280 + case 280: { /* '280' */ + return 280 } - case 281: - { /* '281' */ - return 281 + case 281: { /* '281' */ + return 281 } - case 282: - { /* '282' */ - return 282 + case 282: { /* '282' */ + return 282 } - case 283: - { /* '283' */ - return 283 + case 283: { /* '283' */ + return 283 } - case 284: - { /* '284' */ - return 284 + case 284: { /* '284' */ + return 284 } - case 285: - { /* '285' */ - return 285 + case 285: { /* '285' */ + return 285 } - case 286: - { /* '286' */ - return 286 + case 286: { /* '286' */ + return 286 } - case 287: - { /* '287' */ - return 287 + case 287: { /* '287' */ + return 287 } - case 288: - { /* '288' */ - return 288 + case 288: { /* '288' */ + return 288 } - case 289: - { /* '289' */ - return 289 + case 289: { /* '289' */ + return 289 } - case 29: - { /* '29' */ - return 29 + case 29: { /* '29' */ + return 29 } - case 290: - { /* '290' */ - return 290 + case 290: { /* '290' */ + return 290 } - case 291: - { /* '291' */ - return 291 + case 291: { /* '291' */ + return 291 } - case 292: - { /* '292' */ - return 292 + case 292: { /* '292' */ + return 292 } - case 293: - { /* '293' */ - return 293 + case 293: { /* '293' */ + return 293 } - case 294: - { /* '294' */ - return 294 + case 294: { /* '294' */ + return 294 } - case 295: - { /* '295' */ - return 295 + case 295: { /* '295' */ + return 295 } - case 296: - { /* '296' */ - return 296 + case 296: { /* '296' */ + return 296 } - case 297: - { /* '297' */ - return 297 + case 297: { /* '297' */ + return 297 } - case 298: - { /* '298' */ - return 298 + case 298: { /* '298' */ + return 298 } - case 299: - { /* '299' */ - return 299 + case 299: { /* '299' */ + return 299 } - case 3: - { /* '3' */ - return 3 + case 3: { /* '3' */ + return 3 } - case 30: - { /* '30' */ - return 30 + case 30: { /* '30' */ + return 30 } - case 300: - { /* '300' */ - return 300 + case 300: { /* '300' */ + return 300 } - case 301: - { /* '301' */ - return 301 + case 301: { /* '301' */ + return 301 } - case 302: - { /* '302' */ - return 302 + case 302: { /* '302' */ + return 302 } - case 303: - { /* '303' */ - return 303 + case 303: { /* '303' */ + return 303 } - case 304: - { /* '304' */ - return 304 + case 304: { /* '304' */ + return 304 } - case 305: - { /* '305' */ - return 305 + case 305: { /* '305' */ + return 305 } - case 306: - { /* '306' */ - return 306 + case 306: { /* '306' */ + return 306 } - case 307: - { /* '307' */ - return 307 + case 307: { /* '307' */ + return 307 } - case 308: - { /* '308' */ - return 308 + case 308: { /* '308' */ + return 308 } - case 309: - { /* '309' */ - return 309 + case 309: { /* '309' */ + return 309 } - case 31: - { /* '31' */ - return 31 + case 31: { /* '31' */ + return 31 } - case 310: - { /* '310' */ - return 310 + case 310: { /* '310' */ + return 310 } - case 311: - { /* '311' */ - return 311 + case 311: { /* '311' */ + return 311 } - case 312: - { /* '312' */ - return 312 + case 312: { /* '312' */ + return 312 } - case 313: - { /* '313' */ - return 313 + case 313: { /* '313' */ + return 313 } - case 314: - { /* '314' */ - return 314 + case 314: { /* '314' */ + return 314 } - case 315: - { /* '315' */ - return 315 + case 315: { /* '315' */ + return 315 } - case 316: - { /* '316' */ - return 316 + case 316: { /* '316' */ + return 316 } - case 317: - { /* '317' */ - return 317 + case 317: { /* '317' */ + return 317 } - case 318: - { /* '318' */ - return 318 + case 318: { /* '318' */ + return 318 } - case 319: - { /* '319' */ - return 319 + case 319: { /* '319' */ + return 319 } - case 32: - { /* '32' */ - return 32 + case 32: { /* '32' */ + return 32 } - case 320: - { /* '320' */ - return 320 + case 320: { /* '320' */ + return 320 } - case 321: - { /* '321' */ - return 321 + case 321: { /* '321' */ + return 321 } - case 322: - { /* '322' */ - return 322 + case 322: { /* '322' */ + return 322 } - case 323: - { /* '323' */ - return 323 + case 323: { /* '323' */ + return 323 } - case 324: - { /* '324' */ - return 324 + case 324: { /* '324' */ + return 324 } - case 325: - { /* '325' */ - return 325 + case 325: { /* '325' */ + return 325 } - case 326: - { /* '326' */ - return 326 + case 326: { /* '326' */ + return 326 } - case 327: - { /* '327' */ - return 327 + case 327: { /* '327' */ + return 327 } - case 328: - { /* '328' */ - return 328 + case 328: { /* '328' */ + return 328 } - case 329: - { /* '329' */ - return 329 + case 329: { /* '329' */ + return 329 } - case 33: - { /* '33' */ - return 33 + case 33: { /* '33' */ + return 33 } - case 330: - { /* '330' */ - return 330 + case 330: { /* '330' */ + return 330 } - case 331: - { /* '331' */ - return 331 + case 331: { /* '331' */ + return 331 } - case 332: - { /* '332' */ - return 332 + case 332: { /* '332' */ + return 332 } - case 333: - { /* '333' */ - return 333 + case 333: { /* '333' */ + return 333 } - case 334: - { /* '334' */ - return 334 + case 334: { /* '334' */ + return 334 } - case 335: - { /* '335' */ - return 335 + case 335: { /* '335' */ + return 335 } - case 336: - { /* '336' */ - return 336 + case 336: { /* '336' */ + return 336 } - case 337: - { /* '337' */ - return 337 + case 337: { /* '337' */ + return 337 } - case 338: - { /* '338' */ - return 338 + case 338: { /* '338' */ + return 338 } - case 339: - { /* '339' */ - return 339 + case 339: { /* '339' */ + return 339 } - case 34: - { /* '34' */ - return 34 + case 34: { /* '34' */ + return 34 } - case 340: - { /* '340' */ - return 340 + case 340: { /* '340' */ + return 340 } - case 341: - { /* '341' */ - return 341 + case 341: { /* '341' */ + return 341 } - case 342: - { /* '342' */ - return 342 + case 342: { /* '342' */ + return 342 } - case 343: - { /* '343' */ - return 343 + case 343: { /* '343' */ + return 343 } - case 344: - { /* '344' */ - return 344 + case 344: { /* '344' */ + return 344 } - case 345: - { /* '345' */ - return 345 + case 345: { /* '345' */ + return 345 } - case 346: - { /* '346' */ - return 346 + case 346: { /* '346' */ + return 346 } - case 347: - { /* '347' */ - return 347 + case 347: { /* '347' */ + return 347 } - case 348: - { /* '348' */ - return 348 + case 348: { /* '348' */ + return 348 } - case 349: - { /* '349' */ - return 349 + case 349: { /* '349' */ + return 349 } - case 35: - { /* '35' */ - return 35 + case 35: { /* '35' */ + return 35 } - case 350: - { /* '350' */ - return 350 + case 350: { /* '350' */ + return 350 } - case 351: - { /* '351' */ - return 351 + case 351: { /* '351' */ + return 351 } - case 352: - { /* '352' */ - return 352 + case 352: { /* '352' */ + return 352 } - case 353: - { /* '353' */ - return 353 + case 353: { /* '353' */ + return 353 } - case 354: - { /* '354' */ - return 354 + case 354: { /* '354' */ + return 354 } - case 355: - { /* '355' */ - return 355 + case 355: { /* '355' */ + return 355 } - case 356: - { /* '356' */ - return 356 + case 356: { /* '356' */ + return 356 } - case 357: - { /* '357' */ - return 357 + case 357: { /* '357' */ + return 357 } - case 358: - { /* '358' */ - return 358 + case 358: { /* '358' */ + return 358 } - case 359: - { /* '359' */ - return 359 + case 359: { /* '359' */ + return 359 } - case 36: - { /* '36' */ - return 36 + case 36: { /* '36' */ + return 36 } - case 360: - { /* '360' */ - return 360 + case 360: { /* '360' */ + return 360 } - case 361: - { /* '361' */ - return 361 + case 361: { /* '361' */ + return 361 } - case 362: - { /* '362' */ - return 362 + case 362: { /* '362' */ + return 362 } - case 363: - { /* '363' */ - return 363 + case 363: { /* '363' */ + return 363 } - case 364: - { /* '364' */ - return 364 + case 364: { /* '364' */ + return 364 } - case 365: - { /* '365' */ - return 365 + case 365: { /* '365' */ + return 365 } - case 366: - { /* '366' */ - return 366 + case 366: { /* '366' */ + return 366 } - case 367: - { /* '367' */ - return 367 + case 367: { /* '367' */ + return 367 } - case 368: - { /* '368' */ - return 368 + case 368: { /* '368' */ + return 368 } - case 369: - { /* '369' */ - return 369 + case 369: { /* '369' */ + return 369 } - case 37: - { /* '37' */ - return 37 + case 37: { /* '37' */ + return 37 } - case 370: - { /* '370' */ - return 370 + case 370: { /* '370' */ + return 370 } - case 371: - { /* '371' */ - return 371 + case 371: { /* '371' */ + return 371 } - case 372: - { /* '372' */ - return 372 + case 372: { /* '372' */ + return 372 } - case 373: - { /* '373' */ - return 373 + case 373: { /* '373' */ + return 373 } - case 374: - { /* '374' */ - return 374 + case 374: { /* '374' */ + return 374 } - case 375: - { /* '375' */ - return 375 + case 375: { /* '375' */ + return 375 } - case 376: - { /* '376' */ - return 376 + case 376: { /* '376' */ + return 376 } - case 377: - { /* '377' */ - return 377 + case 377: { /* '377' */ + return 377 } - case 378: - { /* '378' */ - return 378 + case 378: { /* '378' */ + return 378 } - case 379: - { /* '379' */ - return 379 + case 379: { /* '379' */ + return 379 } - case 38: - { /* '38' */ - return 38 + case 38: { /* '38' */ + return 38 } - case 380: - { /* '380' */ - return 380 + case 380: { /* '380' */ + return 380 } - case 381: - { /* '381' */ - return 381 + case 381: { /* '381' */ + return 381 } - case 382: - { /* '382' */ - return 382 + case 382: { /* '382' */ + return 382 } - case 383: - { /* '383' */ - return 383 + case 383: { /* '383' */ + return 383 } - case 384: - { /* '384' */ - return 384 + case 384: { /* '384' */ + return 384 } - case 385: - { /* '385' */ - return 385 + case 385: { /* '385' */ + return 385 } - case 386: - { /* '386' */ - return 386 + case 386: { /* '386' */ + return 386 } - case 387: - { /* '387' */ - return 387 + case 387: { /* '387' */ + return 387 } - case 388: - { /* '388' */ - return 388 + case 388: { /* '388' */ + return 388 } - case 389: - { /* '389' */ - return 389 + case 389: { /* '389' */ + return 389 } - case 39: - { /* '39' */ - return 39 + case 39: { /* '39' */ + return 39 } - case 390: - { /* '390' */ - return 390 + case 390: { /* '390' */ + return 390 } - case 391: - { /* '391' */ - return 391 + case 391: { /* '391' */ + return 391 } - case 392: - { /* '392' */ - return 392 + case 392: { /* '392' */ + return 392 } - case 393: - { /* '393' */ - return 393 + case 393: { /* '393' */ + return 393 } - case 394: - { /* '394' */ - return 394 + case 394: { /* '394' */ + return 394 } - case 395: - { /* '395' */ - return 395 + case 395: { /* '395' */ + return 395 } - case 396: - { /* '396' */ - return 396 + case 396: { /* '396' */ + return 396 } - case 397: - { /* '397' */ - return 397 + case 397: { /* '397' */ + return 397 } - case 398: - { /* '398' */ - return 398 + case 398: { /* '398' */ + return 398 } - case 399: - { /* '399' */ - return 399 + case 399: { /* '399' */ + return 399 } - case 4: - { /* '4' */ - return 4 + case 4: { /* '4' */ + return 4 } - case 40: - { /* '40' */ - return 40 + case 40: { /* '40' */ + return 40 } - case 400: - { /* '400' */ - return 400 + case 400: { /* '400' */ + return 400 } - case 401: - { /* '401' */ - return 401 + case 401: { /* '401' */ + return 401 } - case 402: - { /* '402' */ - return 402 + case 402: { /* '402' */ + return 402 } - case 403: - { /* '403' */ - return 403 + case 403: { /* '403' */ + return 403 } - case 404: - { /* '404' */ - return 404 + case 404: { /* '404' */ + return 404 } - case 405: - { /* '405' */ - return 405 + case 405: { /* '405' */ + return 405 } - case 406: - { /* '406' */ - return 406 + case 406: { /* '406' */ + return 406 } - case 407: - { /* '407' */ - return 407 + case 407: { /* '407' */ + return 407 } - case 408: - { /* '408' */ - return 408 + case 408: { /* '408' */ + return 408 } - case 409: - { /* '409' */ - return 409 + case 409: { /* '409' */ + return 409 } - case 41: - { /* '41' */ - return 41 + case 41: { /* '41' */ + return 41 } - case 410: - { /* '410' */ - return 410 + case 410: { /* '410' */ + return 410 } - case 411: - { /* '411' */ - return 411 + case 411: { /* '411' */ + return 411 } - case 412: - { /* '412' */ - return 412 + case 412: { /* '412' */ + return 412 } - case 413: - { /* '413' */ - return 413 + case 413: { /* '413' */ + return 413 } - case 414: - { /* '414' */ - return 414 + case 414: { /* '414' */ + return 414 } - case 415: - { /* '415' */ - return 415 + case 415: { /* '415' */ + return 415 } - case 416: - { /* '416' */ - return 416 + case 416: { /* '416' */ + return 416 } - case 417: - { /* '417' */ - return 417 + case 417: { /* '417' */ + return 417 } - case 418: - { /* '418' */ - return 418 + case 418: { /* '418' */ + return 418 } - case 419: - { /* '419' */ - return 419 + case 419: { /* '419' */ + return 419 } - case 42: - { /* '42' */ - return 42 + case 42: { /* '42' */ + return 42 } - case 420: - { /* '420' */ - return 420 + case 420: { /* '420' */ + return 420 } - case 421: - { /* '421' */ - return 421 + case 421: { /* '421' */ + return 421 } - case 422: - { /* '422' */ - return 422 + case 422: { /* '422' */ + return 422 } - case 423: - { /* '423' */ - return 423 + case 423: { /* '423' */ + return 423 } - case 424: - { /* '424' */ - return 424 + case 424: { /* '424' */ + return 424 } - case 425: - { /* '425' */ - return 425 + case 425: { /* '425' */ + return 425 } - case 426: - { /* '426' */ - return 426 + case 426: { /* '426' */ + return 426 } - case 427: - { /* '427' */ - return 427 + case 427: { /* '427' */ + return 427 } - case 428: - { /* '428' */ - return 428 + case 428: { /* '428' */ + return 428 } - case 429: - { /* '429' */ - return 429 + case 429: { /* '429' */ + return 429 } - case 43: - { /* '43' */ - return 43 + case 43: { /* '43' */ + return 43 } - case 430: - { /* '430' */ - return 430 + case 430: { /* '430' */ + return 430 } - case 431: - { /* '431' */ - return 431 + case 431: { /* '431' */ + return 431 } - case 432: - { /* '432' */ - return 432 + case 432: { /* '432' */ + return 432 } - case 433: - { /* '433' */ - return 433 + case 433: { /* '433' */ + return 433 } - case 434: - { /* '434' */ - return 434 + case 434: { /* '434' */ + return 434 } - case 435: - { /* '435' */ - return 435 + case 435: { /* '435' */ + return 435 } - case 436: - { /* '436' */ - return 436 + case 436: { /* '436' */ + return 436 } - case 437: - { /* '437' */ - return 437 + case 437: { /* '437' */ + return 437 } - case 438: - { /* '438' */ - return 438 + case 438: { /* '438' */ + return 438 } - case 439: - { /* '439' */ - return 439 + case 439: { /* '439' */ + return 439 } - case 44: - { /* '44' */ - return 44 + case 44: { /* '44' */ + return 44 } - case 440: - { /* '440' */ - return 440 + case 440: { /* '440' */ + return 440 } - case 441: - { /* '441' */ - return 441 + case 441: { /* '441' */ + return 441 } - case 442: - { /* '442' */ - return 442 + case 442: { /* '442' */ + return 442 } - case 443: - { /* '443' */ - return 443 + case 443: { /* '443' */ + return 443 } - case 444: - { /* '444' */ - return 444 + case 444: { /* '444' */ + return 444 } - case 445: - { /* '445' */ - return 445 + case 445: { /* '445' */ + return 445 } - case 446: - { /* '446' */ - return 446 + case 446: { /* '446' */ + return 446 } - case 447: - { /* '447' */ - return 447 + case 447: { /* '447' */ + return 447 } - case 448: - { /* '448' */ - return 448 + case 448: { /* '448' */ + return 448 } - case 449: - { /* '449' */ - return 449 + case 449: { /* '449' */ + return 449 } - case 45: - { /* '45' */ - return 45 + case 45: { /* '45' */ + return 45 } - case 450: - { /* '450' */ - return 450 + case 450: { /* '450' */ + return 450 } - case 451: - { /* '451' */ - return 451 + case 451: { /* '451' */ + return 451 } - case 452: - { /* '452' */ - return 452 + case 452: { /* '452' */ + return 452 } - case 453: - { /* '453' */ - return 453 + case 453: { /* '453' */ + return 453 } - case 454: - { /* '454' */ - return 454 + case 454: { /* '454' */ + return 454 } - case 455: - { /* '455' */ - return 455 + case 455: { /* '455' */ + return 455 } - case 456: - { /* '456' */ - return 456 + case 456: { /* '456' */ + return 456 } - case 457: - { /* '457' */ - return 457 + case 457: { /* '457' */ + return 457 } - case 458: - { /* '458' */ - return 458 + case 458: { /* '458' */ + return 458 } - case 459: - { /* '459' */ - return 459 + case 459: { /* '459' */ + return 459 } - case 46: - { /* '46' */ - return 46 + case 46: { /* '46' */ + return 46 } - case 460: - { /* '460' */ - return 460 + case 460: { /* '460' */ + return 460 } - case 461: - { /* '461' */ - return 461 + case 461: { /* '461' */ + return 461 } - case 462: - { /* '462' */ - return 462 + case 462: { /* '462' */ + return 462 } - case 463: - { /* '463' */ - return 463 + case 463: { /* '463' */ + return 463 } - case 464: - { /* '464' */ - return 464 + case 464: { /* '464' */ + return 464 } - case 465: - { /* '465' */ - return 465 + case 465: { /* '465' */ + return 465 } - case 466: - { /* '466' */ - return 466 + case 466: { /* '466' */ + return 466 } - case 467: - { /* '467' */ - return 467 + case 467: { /* '467' */ + return 467 } - case 468: - { /* '468' */ - return 468 + case 468: { /* '468' */ + return 468 } - case 469: - { /* '469' */ - return 469 + case 469: { /* '469' */ + return 469 } - case 47: - { /* '47' */ - return 47 + case 47: { /* '47' */ + return 47 } - case 470: - { /* '470' */ - return 470 + case 470: { /* '470' */ + return 470 } - case 471: - { /* '471' */ - return 471 + case 471: { /* '471' */ + return 471 } - case 472: - { /* '472' */ - return 472 + case 472: { /* '472' */ + return 472 } - case 473: - { /* '473' */ - return 473 + case 473: { /* '473' */ + return 473 } - case 474: - { /* '474' */ - return 474 + case 474: { /* '474' */ + return 474 } - case 475: - { /* '475' */ - return 475 + case 475: { /* '475' */ + return 475 } - case 476: - { /* '476' */ - return 476 + case 476: { /* '476' */ + return 476 } - case 477: - { /* '477' */ - return 477 + case 477: { /* '477' */ + return 477 } - case 478: - { /* '478' */ - return 478 + case 478: { /* '478' */ + return 478 } - case 479: - { /* '479' */ - return 479 + case 479: { /* '479' */ + return 479 } - case 48: - { /* '48' */ - return 48 + case 48: { /* '48' */ + return 48 } - case 480: - { /* '480' */ - return 480 + case 480: { /* '480' */ + return 480 } - case 481: - { /* '481' */ - return 481 + case 481: { /* '481' */ + return 481 } - case 482: - { /* '482' */ - return 482 + case 482: { /* '482' */ + return 482 } - case 483: - { /* '483' */ - return 483 + case 483: { /* '483' */ + return 483 } - case 484: - { /* '484' */ - return 484 + case 484: { /* '484' */ + return 484 } - case 485: - { /* '485' */ - return 485 + case 485: { /* '485' */ + return 485 } - case 486: - { /* '486' */ - return 486 + case 486: { /* '486' */ + return 486 } - case 487: - { /* '487' */ - return 487 + case 487: { /* '487' */ + return 487 } - case 488: - { /* '488' */ - return 488 + case 488: { /* '488' */ + return 488 } - case 489: - { /* '489' */ - return 489 + case 489: { /* '489' */ + return 489 } - case 49: - { /* '49' */ - return 49 + case 49: { /* '49' */ + return 49 } - case 490: - { /* '490' */ - return 490 + case 490: { /* '490' */ + return 490 } - case 491: - { /* '491' */ - return 491 + case 491: { /* '491' */ + return 491 } - case 492: - { /* '492' */ - return 492 + case 492: { /* '492' */ + return 492 } - case 493: - { /* '493' */ - return 493 + case 493: { /* '493' */ + return 493 } - case 494: - { /* '494' */ - return 494 + case 494: { /* '494' */ + return 494 } - case 495: - { /* '495' */ - return 495 + case 495: { /* '495' */ + return 495 } - case 496: - { /* '496' */ - return 496 + case 496: { /* '496' */ + return 496 } - case 497: - { /* '497' */ - return 497 + case 497: { /* '497' */ + return 497 } - case 498: - { /* '498' */ - return 498 + case 498: { /* '498' */ + return 498 } - case 499: - { /* '499' */ - return 499 + case 499: { /* '499' */ + return 499 } - case 5: - { /* '5' */ - return 5 + case 5: { /* '5' */ + return 5 } - case 50: - { /* '50' */ - return 50 + case 50: { /* '50' */ + return 50 } - case 500: - { /* '500' */ - return 500 + case 500: { /* '500' */ + return 500 } - case 501: - { /* '501' */ - return 501 + case 501: { /* '501' */ + return 501 } - case 502: - { /* '502' */ - return 502 + case 502: { /* '502' */ + return 502 } - case 503: - { /* '503' */ - return 503 + case 503: { /* '503' */ + return 503 } - case 504: - { /* '504' */ - return 504 + case 504: { /* '504' */ + return 504 } - case 505: - { /* '505' */ - return 505 + case 505: { /* '505' */ + return 505 } - case 506: - { /* '506' */ - return 506 + case 506: { /* '506' */ + return 506 } - case 507: - { /* '507' */ - return 507 + case 507: { /* '507' */ + return 507 } - case 508: - { /* '508' */ - return 508 + case 508: { /* '508' */ + return 508 } - case 509: - { /* '509' */ - return 509 + case 509: { /* '509' */ + return 509 } - case 51: - { /* '51' */ - return 51 + case 51: { /* '51' */ + return 51 } - case 510: - { /* '510' */ - return 510 + case 510: { /* '510' */ + return 510 } - case 511: - { /* '511' */ - return 511 + case 511: { /* '511' */ + return 511 } - case 512: - { /* '512' */ - return 512 + case 512: { /* '512' */ + return 512 } - case 513: - { /* '513' */ - return 513 + case 513: { /* '513' */ + return 513 } - case 514: - { /* '514' */ - return 514 + case 514: { /* '514' */ + return 514 } - case 515: - { /* '515' */ - return 515 + case 515: { /* '515' */ + return 515 } - case 516: - { /* '516' */ - return 516 + case 516: { /* '516' */ + return 516 } - case 517: - { /* '517' */ - return 517 + case 517: { /* '517' */ + return 517 } - case 518: - { /* '518' */ - return 518 + case 518: { /* '518' */ + return 518 } - case 519: - { /* '519' */ - return 519 + case 519: { /* '519' */ + return 519 } - case 52: - { /* '52' */ - return 52 + case 52: { /* '52' */ + return 52 } - case 520: - { /* '520' */ - return 520 + case 520: { /* '520' */ + return 520 } - case 521: - { /* '521' */ - return 521 + case 521: { /* '521' */ + return 521 } - case 522: - { /* '522' */ - return 522 + case 522: { /* '522' */ + return 522 } - case 523: - { /* '523' */ - return 523 + case 523: { /* '523' */ + return 523 } - case 524: - { /* '524' */ - return 524 + case 524: { /* '524' */ + return 524 } - case 525: - { /* '525' */ - return 525 + case 525: { /* '525' */ + return 525 } - case 526: - { /* '526' */ - return 526 + case 526: { /* '526' */ + return 526 } - case 527: - { /* '527' */ - return 527 + case 527: { /* '527' */ + return 527 } - case 528: - { /* '528' */ - return 528 + case 528: { /* '528' */ + return 528 } - case 529: - { /* '529' */ - return 529 + case 529: { /* '529' */ + return 529 } - case 53: - { /* '53' */ - return 53 + case 53: { /* '53' */ + return 53 } - case 530: - { /* '530' */ - return 530 + case 530: { /* '530' */ + return 530 } - case 531: - { /* '531' */ - return 531 + case 531: { /* '531' */ + return 531 } - case 532: - { /* '532' */ - return 532 + case 532: { /* '532' */ + return 532 } - case 533: - { /* '533' */ - return 533 + case 533: { /* '533' */ + return 533 } - case 534: - { /* '534' */ - return 534 + case 534: { /* '534' */ + return 534 } - case 535: - { /* '535' */ - return 535 + case 535: { /* '535' */ + return 535 } - case 536: - { /* '536' */ - return 536 + case 536: { /* '536' */ + return 536 } - case 537: - { /* '537' */ - return 537 + case 537: { /* '537' */ + return 537 } - case 538: - { /* '538' */ - return 538 + case 538: { /* '538' */ + return 538 } - case 539: - { /* '539' */ - return 539 + case 539: { /* '539' */ + return 539 } - case 54: - { /* '54' */ - return 54 + case 54: { /* '54' */ + return 54 } - case 540: - { /* '540' */ - return 540 + case 540: { /* '540' */ + return 540 } - case 541: - { /* '541' */ - return 541 + case 541: { /* '541' */ + return 541 } - case 542: - { /* '542' */ - return 542 + case 542: { /* '542' */ + return 542 } - case 543: - { /* '543' */ - return 543 + case 543: { /* '543' */ + return 543 } - case 544: - { /* '544' */ - return 544 + case 544: { /* '544' */ + return 544 } - case 545: - { /* '545' */ - return 545 + case 545: { /* '545' */ + return 545 } - case 546: - { /* '546' */ - return 546 + case 546: { /* '546' */ + return 546 } - case 547: - { /* '547' */ - return 547 + case 547: { /* '547' */ + return 547 } - case 548: - { /* '548' */ - return 548 + case 548: { /* '548' */ + return 548 } - case 549: - { /* '549' */ - return 549 + case 549: { /* '549' */ + return 549 } - case 55: - { /* '55' */ - return 55 + case 55: { /* '55' */ + return 55 } - case 550: - { /* '550' */ - return 550 + case 550: { /* '550' */ + return 550 } - case 551: - { /* '551' */ - return 551 + case 551: { /* '551' */ + return 551 } - case 552: - { /* '552' */ - return 552 + case 552: { /* '552' */ + return 552 } - case 553: - { /* '553' */ - return 553 + case 553: { /* '553' */ + return 553 } - case 554: - { /* '554' */ - return 554 + case 554: { /* '554' */ + return 554 } - case 556: - { /* '556' */ - return 556 + case 556: { /* '556' */ + return 556 } - case 557: - { /* '557' */ - return 557 + case 557: { /* '557' */ + return 557 } - case 558: - { /* '558' */ - return 558 + case 558: { /* '558' */ + return 558 } - case 559: - { /* '559' */ - return 559 + case 559: { /* '559' */ + return 559 } - case 56: - { /* '56' */ - return 56 + case 56: { /* '56' */ + return 56 } - case 560: - { /* '560' */ - return 560 + case 560: { /* '560' */ + return 560 } - case 561: - { /* '561' */ - return 561 + case 561: { /* '561' */ + return 561 } - case 562: - { /* '562' */ - return 562 + case 562: { /* '562' */ + return 562 } - case 563: - { /* '563' */ - return 563 + case 563: { /* '563' */ + return 563 } - case 564: - { /* '564' */ - return 564 + case 564: { /* '564' */ + return 564 } - case 565: - { /* '565' */ - return 565 + case 565: { /* '565' */ + return 565 } - case 566: - { /* '566' */ - return 566 + case 566: { /* '566' */ + return 566 } - case 567: - { /* '567' */ - return 567 + case 567: { /* '567' */ + return 567 } - case 568: - { /* '568' */ - return 568 + case 568: { /* '568' */ + return 568 } - case 569: - { /* '569' */ - return 569 + case 569: { /* '569' */ + return 569 } - case 57: - { /* '57' */ - return 57 + case 57: { /* '57' */ + return 57 } - case 570: - { /* '570' */ - return 570 + case 570: { /* '570' */ + return 570 } - case 571: - { /* '571' */ - return 571 + case 571: { /* '571' */ + return 571 } - case 572: - { /* '572' */ - return 572 + case 572: { /* '572' */ + return 572 } - case 573: - { /* '573' */ - return 573 + case 573: { /* '573' */ + return 573 } - case 574: - { /* '574' */ - return 574 + case 574: { /* '574' */ + return 574 } - case 575: - { /* '575' */ - return 575 + case 575: { /* '575' */ + return 575 } - case 576: - { /* '576' */ - return 576 + case 576: { /* '576' */ + return 576 } - case 577: - { /* '577' */ - return 577 + case 577: { /* '577' */ + return 577 } - case 578: - { /* '578' */ - return 578 + case 578: { /* '578' */ + return 578 } - case 579: - { /* '579' */ - return 579 + case 579: { /* '579' */ + return 579 } - case 58: - { /* '58' */ - return 58 + case 58: { /* '58' */ + return 58 } - case 580: - { /* '580' */ - return 580 + case 580: { /* '580' */ + return 580 } - case 581: - { /* '581' */ - return 581 + case 581: { /* '581' */ + return 581 } - case 582: - { /* '582' */ - return 582 + case 582: { /* '582' */ + return 582 } - case 583: - { /* '583' */ - return 583 + case 583: { /* '583' */ + return 583 } - case 584: - { /* '584' */ - return 584 + case 584: { /* '584' */ + return 584 } - case 585: - { /* '585' */ - return 585 + case 585: { /* '585' */ + return 585 } - case 586: - { /* '586' */ - return 586 + case 586: { /* '586' */ + return 586 } - case 587: - { /* '587' */ - return 587 + case 587: { /* '587' */ + return 587 } - case 588: - { /* '588' */ - return 588 + case 588: { /* '588' */ + return 588 } - case 589: - { /* '589' */ - return 589 + case 589: { /* '589' */ + return 589 } - case 59: - { /* '59' */ - return 59 + case 59: { /* '59' */ + return 59 } - case 590: - { /* '590' */ - return 590 + case 590: { /* '590' */ + return 590 } - case 591: - { /* '591' */ - return 591 + case 591: { /* '591' */ + return 591 } - case 592: - { /* '592' */ - return 592 + case 592: { /* '592' */ + return 592 } - case 593: - { /* '593' */ - return 593 + case 593: { /* '593' */ + return 593 } - case 594: - { /* '594' */ - return 594 + case 594: { /* '594' */ + return 594 } - case 595: - { /* '595' */ - return 595 + case 595: { /* '595' */ + return 595 } - case 596: - { /* '596' */ - return 596 + case 596: { /* '596' */ + return 596 } - case 597: - { /* '597' */ - return 597 + case 597: { /* '597' */ + return 597 } - case 598: - { /* '598' */ - return 598 + case 598: { /* '598' */ + return 598 } - case 599: - { /* '599' */ - return 599 + case 599: { /* '599' */ + return 599 } - case 6: - { /* '6' */ - return 6 + case 6: { /* '6' */ + return 6 } - case 60: - { /* '60' */ - return 60 + case 60: { /* '60' */ + return 60 } - case 600: - { /* '600' */ - return 600 + case 600: { /* '600' */ + return 600 } - case 601: - { /* '601' */ - return 601 + case 601: { /* '601' */ + return 601 } - case 602: - { /* '602' */ - return 602 + case 602: { /* '602' */ + return 602 } - case 603: - { /* '603' */ - return 603 + case 603: { /* '603' */ + return 603 } - case 604: - { /* '604' */ - return 604 + case 604: { /* '604' */ + return 604 } - case 605: - { /* '605' */ - return 605 + case 605: { /* '605' */ + return 605 } - case 606: - { /* '606' */ - return 606 + case 606: { /* '606' */ + return 606 } - case 607: - { /* '607' */ - return 607 + case 607: { /* '607' */ + return 607 } - case 608: - { /* '608' */ - return 608 + case 608: { /* '608' */ + return 608 } - case 609: - { /* '609' */ - return 609 + case 609: { /* '609' */ + return 609 } - case 61: - { /* '61' */ - return 61 + case 61: { /* '61' */ + return 61 } - case 610: - { /* '610' */ - return 610 + case 610: { /* '610' */ + return 610 } - case 611: - { /* '611' */ - return 611 + case 611: { /* '611' */ + return 611 } - case 612: - { /* '612' */ - return 612 + case 612: { /* '612' */ + return 612 } - case 613: - { /* '613' */ - return 613 + case 613: { /* '613' */ + return 613 } - case 614: - { /* '614' */ - return 614 + case 614: { /* '614' */ + return 614 } - case 615: - { /* '615' */ - return 615 + case 615: { /* '615' */ + return 615 } - case 616: - { /* '616' */ - return 616 + case 616: { /* '616' */ + return 616 } - case 617: - { /* '617' */ - return 617 + case 617: { /* '617' */ + return 617 } - case 618: - { /* '618' */ - return 618 + case 618: { /* '618' */ + return 618 } - case 619: - { /* '619' */ - return 619 + case 619: { /* '619' */ + return 619 } - case 62: - { /* '62' */ - return 62 + case 62: { /* '62' */ + return 62 } - case 620: - { /* '620' */ - return 620 + case 620: { /* '620' */ + return 620 } - case 621: - { /* '621' */ - return 621 + case 621: { /* '621' */ + return 621 } - case 622: - { /* '622' */ - return 622 + case 622: { /* '622' */ + return 622 } - case 623: - { /* '623' */ - return 623 + case 623: { /* '623' */ + return 623 } - case 624: - { /* '624' */ - return 624 + case 624: { /* '624' */ + return 624 } - case 625: - { /* '625' */ - return 625 + case 625: { /* '625' */ + return 625 } - case 626: - { /* '626' */ - return 626 + case 626: { /* '626' */ + return 626 } - case 627: - { /* '627' */ - return 627 + case 627: { /* '627' */ + return 627 } - case 628: - { /* '628' */ - return 628 + case 628: { /* '628' */ + return 628 } - case 629: - { /* '629' */ - return 629 + case 629: { /* '629' */ + return 629 } - case 63: - { /* '63' */ - return 63 + case 63: { /* '63' */ + return 63 } - case 630: - { /* '630' */ - return 630 + case 630: { /* '630' */ + return 630 } - case 631: - { /* '631' */ - return 631 + case 631: { /* '631' */ + return 631 } - case 632: - { /* '632' */ - return 632 + case 632: { /* '632' */ + return 632 } - case 633: - { /* '633' */ - return 633 + case 633: { /* '633' */ + return 633 } - case 634: - { /* '634' */ - return 634 + case 634: { /* '634' */ + return 634 } - case 635: - { /* '635' */ - return 635 + case 635: { /* '635' */ + return 635 } - case 636: - { /* '636' */ - return 636 + case 636: { /* '636' */ + return 636 } - case 637: - { /* '637' */ - return 637 + case 637: { /* '637' */ + return 637 } - case 638: - { /* '638' */ - return 638 + case 638: { /* '638' */ + return 638 } - case 639: - { /* '639' */ - return 639 + case 639: { /* '639' */ + return 639 } - case 64: - { /* '64' */ - return 64 + case 64: { /* '64' */ + return 64 } - case 640: - { /* '640' */ - return 640 + case 640: { /* '640' */ + return 640 } - case 641: - { /* '641' */ - return 641 + case 641: { /* '641' */ + return 641 } - case 642: - { /* '642' */ - return 642 + case 642: { /* '642' */ + return 642 } - case 643: - { /* '643' */ - return 643 + case 643: { /* '643' */ + return 643 } - case 644: - { /* '644' */ - return 644 + case 644: { /* '644' */ + return 644 } - case 645: - { /* '645' */ - return 645 + case 645: { /* '645' */ + return 645 } - case 646: - { /* '646' */ - return 646 + case 646: { /* '646' */ + return 646 } - case 647: - { /* '647' */ - return 647 + case 647: { /* '647' */ + return 647 } - case 648: - { /* '648' */ - return 648 + case 648: { /* '648' */ + return 648 } - case 649: - { /* '649' */ - return 649 + case 649: { /* '649' */ + return 649 } - case 65: - { /* '65' */ - return 65 + case 65: { /* '65' */ + return 65 } - case 650: - { /* '650' */ - return 650 + case 650: { /* '650' */ + return 650 } - case 651: - { /* '651' */ - return 651 + case 651: { /* '651' */ + return 651 } - case 652: - { /* '652' */ - return 652 + case 652: { /* '652' */ + return 652 } - case 653: - { /* '653' */ - return 653 + case 653: { /* '653' */ + return 653 } - case 654: - { /* '654' */ - return 654 + case 654: { /* '654' */ + return 654 } - case 655: - { /* '655' */ - return 655 + case 655: { /* '655' */ + return 655 } - case 656: - { /* '656' */ - return 656 + case 656: { /* '656' */ + return 656 } - case 657: - { /* '657' */ - return 657 + case 657: { /* '657' */ + return 657 } - case 658: - { /* '658' */ - return 658 + case 658: { /* '658' */ + return 658 } - case 659: - { /* '659' */ - return 659 + case 659: { /* '659' */ + return 659 } - case 66: - { /* '66' */ - return 66 + case 66: { /* '66' */ + return 66 } - case 660: - { /* '660' */ - return 660 + case 660: { /* '660' */ + return 660 } - case 661: - { /* '661' */ - return 661 + case 661: { /* '661' */ + return 661 } - case 662: - { /* '662' */ - return 662 + case 662: { /* '662' */ + return 662 } - case 663: - { /* '663' */ - return 663 + case 663: { /* '663' */ + return 663 } - case 664: - { /* '664' */ - return 664 + case 664: { /* '664' */ + return 664 } - case 665: - { /* '665' */ - return 665 + case 665: { /* '665' */ + return 665 } - case 667: - { /* '667' */ - return 667 + case 667: { /* '667' */ + return 667 } - case 668: - { /* '668' */ - return 668 + case 668: { /* '668' */ + return 668 } - case 669: - { /* '669' */ - return 669 + case 669: { /* '669' */ + return 669 } - case 67: - { /* '67' */ - return 67 + case 67: { /* '67' */ + return 67 } - case 670: - { /* '670' */ - return 670 + case 670: { /* '670' */ + return 670 } - case 671: - { /* '671' */ - return 671 + case 671: { /* '671' */ + return 671 } - case 672: - { /* '672' */ - return 672 + case 672: { /* '672' */ + return 672 } - case 673: - { /* '673' */ - return 673 + case 673: { /* '673' */ + return 673 } - case 674: - { /* '674' */ - return 674 + case 674: { /* '674' */ + return 674 } - case 675: - { /* '675' */ - return 675 + case 675: { /* '675' */ + return 675 } - case 676: - { /* '676' */ - return 676 + case 676: { /* '676' */ + return 676 } - case 677: - { /* '677' */ - return 677 + case 677: { /* '677' */ + return 677 } - case 678: - { /* '678' */ - return 678 + case 678: { /* '678' */ + return 678 } - case 679: - { /* '679' */ - return 679 + case 679: { /* '679' */ + return 679 } - case 68: - { /* '68' */ - return 68 + case 68: { /* '68' */ + return 68 } - case 680: - { /* '680' */ - return 680 + case 680: { /* '680' */ + return 680 } - case 681: - { /* '681' */ - return 681 + case 681: { /* '681' */ + return 681 } - case 682: - { /* '682' */ - return 682 + case 682: { /* '682' */ + return 682 } - case 683: - { /* '683' */ - return 683 + case 683: { /* '683' */ + return 683 } - case 684: - { /* '684' */ - return 684 + case 684: { /* '684' */ + return 684 } - case 685: - { /* '685' */ - return 685 + case 685: { /* '685' */ + return 685 } - case 686: - { /* '686' */ - return 686 + case 686: { /* '686' */ + return 686 } - case 687: - { /* '687' */ - return 687 + case 687: { /* '687' */ + return 687 } - case 688: - { /* '688' */ - return 688 + case 688: { /* '688' */ + return 688 } - case 689: - { /* '689' */ - return 689 + case 689: { /* '689' */ + return 689 } - case 69: - { /* '69' */ - return 69 + case 69: { /* '69' */ + return 69 } - case 690: - { /* '690' */ - return 690 + case 690: { /* '690' */ + return 690 } - case 691: - { /* '691' */ - return 691 + case 691: { /* '691' */ + return 691 } - case 692: - { /* '692' */ - return 692 + case 692: { /* '692' */ + return 692 } - case 693: - { /* '693' */ - return 693 + case 693: { /* '693' */ + return 693 } - case 694: - { /* '694' */ - return 694 + case 694: { /* '694' */ + return 694 } - case 695: - { /* '695' */ - return 695 + case 695: { /* '695' */ + return 695 } - case 696: - { /* '696' */ - return 696 + case 696: { /* '696' */ + return 696 } - case 697: - { /* '697' */ - return 697 + case 697: { /* '697' */ + return 697 } - case 698: - { /* '698' */ - return 698 + case 698: { /* '698' */ + return 698 } - case 699: - { /* '699' */ - return 699 + case 699: { /* '699' */ + return 699 } - case 7: - { /* '7' */ - return 7 + case 7: { /* '7' */ + return 7 } - case 70: - { /* '70' */ - return 70 + case 70: { /* '70' */ + return 70 } - case 700: - { /* '700' */ - return 700 + case 700: { /* '700' */ + return 700 } - case 701: - { /* '701' */ - return 701 + case 701: { /* '701' */ + return 701 } - case 702: - { /* '702' */ - return 702 + case 702: { /* '702' */ + return 702 } - case 703: - { /* '703' */ - return 703 + case 703: { /* '703' */ + return 703 } - case 704: - { /* '704' */ - return 704 + case 704: { /* '704' */ + return 704 } - case 705: - { /* '705' */ - return 705 + case 705: { /* '705' */ + return 705 } - case 706: - { /* '706' */ - return 706 + case 706: { /* '706' */ + return 706 } - case 707: - { /* '707' */ - return 707 + case 707: { /* '707' */ + return 707 } - case 708: - { /* '708' */ - return 708 + case 708: { /* '708' */ + return 708 } - case 709: - { /* '709' */ - return 709 + case 709: { /* '709' */ + return 709 } - case 71: - { /* '71' */ - return 71 + case 71: { /* '71' */ + return 71 } - case 710: - { /* '710' */ - return 710 + case 710: { /* '710' */ + return 710 } - case 711: - { /* '711' */ - return 711 + case 711: { /* '711' */ + return 711 } - case 712: - { /* '712' */ - return 712 + case 712: { /* '712' */ + return 712 } - case 713: - { /* '713' */ - return 713 + case 713: { /* '713' */ + return 713 } - case 714: - { /* '714' */ - return 714 + case 714: { /* '714' */ + return 714 } - case 715: - { /* '715' */ - return 715 + case 715: { /* '715' */ + return 715 } - case 716: - { /* '716' */ - return 716 + case 716: { /* '716' */ + return 716 } - case 717: - { /* '717' */ - return 717 + case 717: { /* '717' */ + return 717 } - case 718: - { /* '718' */ - return 718 + case 718: { /* '718' */ + return 718 } - case 719: - { /* '719' */ - return 719 + case 719: { /* '719' */ + return 719 } - case 72: - { /* '72' */ - return 72 + case 72: { /* '72' */ + return 72 } - case 720: - { /* '720' */ - return 720 + case 720: { /* '720' */ + return 720 } - case 721: - { /* '721' */ - return 721 + case 721: { /* '721' */ + return 721 } - case 722: - { /* '722' */ - return 722 + case 722: { /* '722' */ + return 722 } - case 723: - { /* '723' */ - return 723 + case 723: { /* '723' */ + return 723 } - case 724: - { /* '724' */ - return 724 + case 724: { /* '724' */ + return 724 } - case 725: - { /* '725' */ - return 725 + case 725: { /* '725' */ + return 725 } - case 726: - { /* '726' */ - return 726 + case 726: { /* '726' */ + return 726 } - case 727: - { /* '727' */ - return 727 + case 727: { /* '727' */ + return 727 } - case 728: - { /* '728' */ - return 728 + case 728: { /* '728' */ + return 728 } - case 729: - { /* '729' */ - return 729 + case 729: { /* '729' */ + return 729 } - case 73: - { /* '73' */ - return 73 + case 73: { /* '73' */ + return 73 } - case 730: - { /* '730' */ - return 730 + case 730: { /* '730' */ + return 730 } - case 731: - { /* '731' */ - return 731 + case 731: { /* '731' */ + return 731 } - case 732: - { /* '732' */ - return 732 + case 732: { /* '732' */ + return 732 } - case 733: - { /* '733' */ - return 733 + case 733: { /* '733' */ + return 733 } - case 734: - { /* '734' */ - return 734 + case 734: { /* '734' */ + return 734 } - case 735: - { /* '735' */ - return 735 + case 735: { /* '735' */ + return 735 } - case 736: - { /* '736' */ - return 736 + case 736: { /* '736' */ + return 736 } - case 737: - { /* '737' */ - return 737 + case 737: { /* '737' */ + return 737 } - case 738: - { /* '738' */ - return 738 + case 738: { /* '738' */ + return 738 } - case 739: - { /* '739' */ - return 739 + case 739: { /* '739' */ + return 739 } - case 74: - { /* '74' */ - return 74 + case 74: { /* '74' */ + return 74 } - case 740: - { /* '740' */ - return 740 + case 740: { /* '740' */ + return 740 } - case 741: - { /* '741' */ - return 741 + case 741: { /* '741' */ + return 741 } - case 742: - { /* '742' */ - return 742 + case 742: { /* '742' */ + return 742 } - case 743: - { /* '743' */ - return 743 + case 743: { /* '743' */ + return 743 } - case 744: - { /* '744' */ - return 744 + case 744: { /* '744' */ + return 744 } - case 745: - { /* '745' */ - return 745 + case 745: { /* '745' */ + return 745 } - case 746: - { /* '746' */ - return 746 + case 746: { /* '746' */ + return 746 } - case 747: - { /* '747' */ - return 747 + case 747: { /* '747' */ + return 747 } - case 748: - { /* '748' */ - return 748 + case 748: { /* '748' */ + return 748 } - case 749: - { /* '749' */ - return 749 + case 749: { /* '749' */ + return 749 } - case 75: - { /* '75' */ - return 75 + case 75: { /* '75' */ + return 75 } - case 750: - { /* '750' */ - return 750 + case 750: { /* '750' */ + return 750 } - case 751: - { /* '751' */ - return 751 + case 751: { /* '751' */ + return 751 } - case 752: - { /* '752' */ - return 752 + case 752: { /* '752' */ + return 752 } - case 753: - { /* '753' */ - return 753 + case 753: { /* '753' */ + return 753 } - case 754: - { /* '754' */ - return 754 + case 754: { /* '754' */ + return 754 } - case 755: - { /* '755' */ - return 755 + case 755: { /* '755' */ + return 755 } - case 756: - { /* '756' */ - return 756 + case 756: { /* '756' */ + return 756 } - case 757: - { /* '757' */ - return 757 + case 757: { /* '757' */ + return 757 } - case 758: - { /* '758' */ - return 758 + case 758: { /* '758' */ + return 758 } - case 759: - { /* '759' */ - return 759 + case 759: { /* '759' */ + return 759 } - case 76: - { /* '76' */ - return 76 + case 76: { /* '76' */ + return 76 } - case 760: - { /* '760' */ - return 760 + case 760: { /* '760' */ + return 760 } - case 761: - { /* '761' */ - return 761 + case 761: { /* '761' */ + return 761 } - case 762: - { /* '762' */ - return 762 + case 762: { /* '762' */ + return 762 } - case 763: - { /* '763' */ - return 763 + case 763: { /* '763' */ + return 763 } - case 764: - { /* '764' */ - return 764 + case 764: { /* '764' */ + return 764 } - case 765: - { /* '765' */ - return 765 + case 765: { /* '765' */ + return 765 } - case 766: - { /* '766' */ - return 766 + case 766: { /* '766' */ + return 766 } - case 767: - { /* '767' */ - return 767 + case 767: { /* '767' */ + return 767 } - case 768: - { /* '768' */ - return 768 + case 768: { /* '768' */ + return 768 } - case 769: - { /* '769' */ - return 769 + case 769: { /* '769' */ + return 769 } - case 77: - { /* '77' */ - return 77 + case 77: { /* '77' */ + return 77 } - case 770: - { /* '770' */ - return 770 + case 770: { /* '770' */ + return 770 } - case 771: - { /* '771' */ - return 771 + case 771: { /* '771' */ + return 771 } - case 772: - { /* '772' */ - return 772 + case 772: { /* '772' */ + return 772 } - case 773: - { /* '773' */ - return 773 + case 773: { /* '773' */ + return 773 } - case 774: - { /* '774' */ - return 774 + case 774: { /* '774' */ + return 774 } - case 775: - { /* '775' */ - return 775 + case 775: { /* '775' */ + return 775 } - case 776: - { /* '776' */ - return 776 + case 776: { /* '776' */ + return 776 } - case 778: - { /* '778' */ - return 778 + case 778: { /* '778' */ + return 778 } - case 779: - { /* '779' */ - return 779 + case 779: { /* '779' */ + return 779 } - case 78: - { /* '78' */ - return 78 + case 78: { /* '78' */ + return 78 } - case 780: - { /* '780' */ - return 780 + case 780: { /* '780' */ + return 780 } - case 781: - { /* '781' */ - return 781 + case 781: { /* '781' */ + return 781 } - case 782: - { /* '782' */ - return 782 + case 782: { /* '782' */ + return 782 } - case 783: - { /* '783' */ - return 783 + case 783: { /* '783' */ + return 783 } - case 784: - { /* '784' */ - return 784 + case 784: { /* '784' */ + return 784 } - case 785: - { /* '785' */ - return 785 + case 785: { /* '785' */ + return 785 } - case 786: - { /* '786' */ - return 786 + case 786: { /* '786' */ + return 786 } - case 787: - { /* '787' */ - return 787 + case 787: { /* '787' */ + return 787 } - case 788: - { /* '788' */ - return 788 + case 788: { /* '788' */ + return 788 } - case 789: - { /* '789' */ - return 789 + case 789: { /* '789' */ + return 789 } - case 79: - { /* '79' */ - return 79 + case 79: { /* '79' */ + return 79 } - case 790: - { /* '790' */ - return 790 + case 790: { /* '790' */ + return 790 } - case 791: - { /* '791' */ - return 791 + case 791: { /* '791' */ + return 791 } - case 792: - { /* '792' */ - return 792 + case 792: { /* '792' */ + return 792 } - case 793: - { /* '793' */ - return 793 + case 793: { /* '793' */ + return 793 } - case 794: - { /* '794' */ - return 794 + case 794: { /* '794' */ + return 794 } - case 795: - { /* '795' */ - return 795 + case 795: { /* '795' */ + return 795 } - case 796: - { /* '796' */ - return 796 + case 796: { /* '796' */ + return 796 } - case 797: - { /* '797' */ - return 797 + case 797: { /* '797' */ + return 797 } - case 798: - { /* '798' */ - return 798 + case 798: { /* '798' */ + return 798 } - case 799: - { /* '799' */ - return 799 + case 799: { /* '799' */ + return 799 } - case 8: - { /* '8' */ - return 8 + case 8: { /* '8' */ + return 8 } - case 80: - { /* '80' */ - return 80 + case 80: { /* '80' */ + return 80 } - case 800: - { /* '800' */ - return 800 + case 800: { /* '800' */ + return 800 } - case 801: - { /* '801' */ - return 801 + case 801: { /* '801' */ + return 801 } - case 802: - { /* '802' */ - return 802 + case 802: { /* '802' */ + return 802 } - case 803: - { /* '803' */ - return 803 + case 803: { /* '803' */ + return 803 } - case 804: - { /* '804' */ - return 804 + case 804: { /* '804' */ + return 804 } - case 805: - { /* '805' */ - return 805 + case 805: { /* '805' */ + return 805 } - case 806: - { /* '806' */ - return 806 + case 806: { /* '806' */ + return 806 } - case 807: - { /* '807' */ - return 807 + case 807: { /* '807' */ + return 807 } - case 808: - { /* '808' */ - return 808 + case 808: { /* '808' */ + return 808 } - case 809: - { /* '809' */ - return 809 + case 809: { /* '809' */ + return 809 } - case 81: - { /* '81' */ - return 81 + case 81: { /* '81' */ + return 81 } - case 810: - { /* '810' */ - return 810 + case 810: { /* '810' */ + return 810 } - case 811: - { /* '811' */ - return 811 + case 811: { /* '811' */ + return 811 } - case 812: - { /* '812' */ - return 812 + case 812: { /* '812' */ + return 812 } - case 813: - { /* '813' */ - return 813 + case 813: { /* '813' */ + return 813 } - case 814: - { /* '814' */ - return 814 + case 814: { /* '814' */ + return 814 } - case 815: - { /* '815' */ - return 815 + case 815: { /* '815' */ + return 815 } - case 816: - { /* '816' */ - return 816 + case 816: { /* '816' */ + return 816 } - case 817: - { /* '817' */ - return 817 + case 817: { /* '817' */ + return 817 } - case 818: - { /* '818' */ - return 818 + case 818: { /* '818' */ + return 818 } - case 819: - { /* '819' */ - return 819 + case 819: { /* '819' */ + return 819 } - case 82: - { /* '82' */ - return 82 + case 82: { /* '82' */ + return 82 } - case 820: - { /* '820' */ - return 820 + case 820: { /* '820' */ + return 820 } - case 821: - { /* '821' */ - return 821 + case 821: { /* '821' */ + return 821 } - case 822: - { /* '822' */ - return 822 + case 822: { /* '822' */ + return 822 } - case 823: - { /* '823' */ - return 823 + case 823: { /* '823' */ + return 823 } - case 824: - { /* '824' */ - return 824 + case 824: { /* '824' */ + return 824 } - case 825: - { /* '825' */ - return 825 + case 825: { /* '825' */ + return 825 } - case 826: - { /* '826' */ - return 826 + case 826: { /* '826' */ + return 826 } - case 827: - { /* '827' */ - return 827 + case 827: { /* '827' */ + return 827 } - case 828: - { /* '828' */ - return 828 + case 828: { /* '828' */ + return 828 } - case 829: - { /* '829' */ - return 829 + case 829: { /* '829' */ + return 829 } - case 83: - { /* '83' */ - return 83 + case 83: { /* '83' */ + return 83 } - case 830: - { /* '830' */ - return 830 + case 830: { /* '830' */ + return 830 } - case 831: - { /* '831' */ - return 831 + case 831: { /* '831' */ + return 831 } - case 832: - { /* '832' */ - return 832 + case 832: { /* '832' */ + return 832 } - case 833: - { /* '833' */ - return 833 + case 833: { /* '833' */ + return 833 } - case 834: - { /* '834' */ - return 834 + case 834: { /* '834' */ + return 834 } - case 835: - { /* '835' */ - return 835 + case 835: { /* '835' */ + return 835 } - case 836: - { /* '836' */ - return 836 + case 836: { /* '836' */ + return 836 } - case 837: - { /* '837' */ - return 837 + case 837: { /* '837' */ + return 837 } - case 838: - { /* '838' */ - return 838 + case 838: { /* '838' */ + return 838 } - case 839: - { /* '839' */ - return 839 + case 839: { /* '839' */ + return 839 } - case 84: - { /* '84' */ - return 84 + case 84: { /* '84' */ + return 84 } - case 840: - { /* '840' */ - return 840 + case 840: { /* '840' */ + return 840 } - case 841: - { /* '841' */ - return 841 + case 841: { /* '841' */ + return 841 } - case 842: - { /* '842' */ - return 842 + case 842: { /* '842' */ + return 842 } - case 843: - { /* '843' */ - return 843 + case 843: { /* '843' */ + return 843 } - case 844: - { /* '844' */ - return 844 + case 844: { /* '844' */ + return 844 } - case 845: - { /* '845' */ - return 845 + case 845: { /* '845' */ + return 845 } - case 846: - { /* '846' */ - return 846 + case 846: { /* '846' */ + return 846 } - case 847: - { /* '847' */ - return 847 + case 847: { /* '847' */ + return 847 } - case 848: - { /* '848' */ - return 848 + case 848: { /* '848' */ + return 848 } - case 849: - { /* '849' */ - return 849 + case 849: { /* '849' */ + return 849 } - case 85: - { /* '85' */ - return 85 + case 85: { /* '85' */ + return 85 } - case 850: - { /* '850' */ - return 850 + case 850: { /* '850' */ + return 850 } - case 851: - { /* '851' */ - return 851 + case 851: { /* '851' */ + return 851 } - case 852: - { /* '852' */ - return 852 + case 852: { /* '852' */ + return 852 } - case 853: - { /* '853' */ - return 853 + case 853: { /* '853' */ + return 853 } - case 854: - { /* '854' */ - return 854 + case 854: { /* '854' */ + return 854 } - case 855: - { /* '855' */ - return 855 + case 855: { /* '855' */ + return 855 } - case 856: - { /* '856' */ - return 856 + case 856: { /* '856' */ + return 856 } - case 857: - { /* '857' */ - return 857 + case 857: { /* '857' */ + return 857 } - case 858: - { /* '858' */ - return 858 + case 858: { /* '858' */ + return 858 } - case 859: - { /* '859' */ - return 859 + case 859: { /* '859' */ + return 859 } - case 86: - { /* '86' */ - return 86 + case 86: { /* '86' */ + return 86 } - case 860: - { /* '860' */ - return 860 + case 860: { /* '860' */ + return 860 } - case 861: - { /* '861' */ - return 861 + case 861: { /* '861' */ + return 861 } - case 862: - { /* '862' */ - return 862 + case 862: { /* '862' */ + return 862 } - case 863: - { /* '863' */ - return 863 + case 863: { /* '863' */ + return 863 } - case 864: - { /* '864' */ - return 864 + case 864: { /* '864' */ + return 864 } - case 865: - { /* '865' */ - return 865 + case 865: { /* '865' */ + return 865 } - case 866: - { /* '866' */ - return 866 + case 866: { /* '866' */ + return 866 } - case 867: - { /* '867' */ - return 867 + case 867: { /* '867' */ + return 867 } - case 868: - { /* '868' */ - return 868 + case 868: { /* '868' */ + return 868 } - case 869: - { /* '869' */ - return 869 + case 869: { /* '869' */ + return 869 } - case 87: - { /* '87' */ - return 87 + case 87: { /* '87' */ + return 87 } - case 870: - { /* '870' */ - return 870 + case 870: { /* '870' */ + return 870 } - case 871: - { /* '871' */ - return 871 + case 871: { /* '871' */ + return 871 } - case 872: - { /* '872' */ - return 872 + case 872: { /* '872' */ + return 872 } - case 873: - { /* '873' */ - return 873 + case 873: { /* '873' */ + return 873 } - case 874: - { /* '874' */ - return 874 + case 874: { /* '874' */ + return 874 } - case 875: - { /* '875' */ - return 875 + case 875: { /* '875' */ + return 875 } - case 876: - { /* '876' */ - return 876 + case 876: { /* '876' */ + return 876 } - case 877: - { /* '877' */ - return 877 + case 877: { /* '877' */ + return 877 } - case 878: - { /* '878' */ - return 878 + case 878: { /* '878' */ + return 878 } - case 879: - { /* '879' */ - return 879 + case 879: { /* '879' */ + return 879 } - case 88: - { /* '88' */ - return 88 + case 88: { /* '88' */ + return 88 } - case 880: - { /* '880' */ - return 880 + case 880: { /* '880' */ + return 880 } - case 881: - { /* '881' */ - return 881 + case 881: { /* '881' */ + return 881 } - case 882: - { /* '882' */ - return 882 + case 882: { /* '882' */ + return 882 } - case 883: - { /* '883' */ - return 883 + case 883: { /* '883' */ + return 883 } - case 884: - { /* '884' */ - return 884 + case 884: { /* '884' */ + return 884 } - case 885: - { /* '885' */ - return 885 + case 885: { /* '885' */ + return 885 } - case 886: - { /* '886' */ - return 886 + case 886: { /* '886' */ + return 886 } - case 887: - { /* '887' */ - return 887 + case 887: { /* '887' */ + return 887 } - case 889: - { /* '889' */ - return 889 + case 889: { /* '889' */ + return 889 } - case 89: - { /* '89' */ - return 89 + case 89: { /* '89' */ + return 89 } - case 890: - { /* '890' */ - return 890 + case 890: { /* '890' */ + return 890 } - case 891: - { /* '891' */ - return 891 + case 891: { /* '891' */ + return 891 } - case 892: - { /* '892' */ - return 892 + case 892: { /* '892' */ + return 892 } - case 893: - { /* '893' */ - return 893 + case 893: { /* '893' */ + return 893 } - case 894: - { /* '894' */ - return 894 + case 894: { /* '894' */ + return 894 } - case 895: - { /* '895' */ - return 895 + case 895: { /* '895' */ + return 895 } - case 896: - { /* '896' */ - return 896 + case 896: { /* '896' */ + return 896 } - case 897: - { /* '897' */ - return 897 + case 897: { /* '897' */ + return 897 } - case 898: - { /* '898' */ - return 898 + case 898: { /* '898' */ + return 898 } - case 899: - { /* '899' */ - return 899 + case 899: { /* '899' */ + return 899 } - case 9: - { /* '9' */ - return 9 + case 9: { /* '9' */ + return 9 } - case 90: - { /* '90' */ - return 90 + case 90: { /* '90' */ + return 90 } - case 900: - { /* '900' */ - return 900 + case 900: { /* '900' */ + return 900 } - case 901: - { /* '901' */ - return 901 + case 901: { /* '901' */ + return 901 } - case 902: - { /* '902' */ - return 902 + case 902: { /* '902' */ + return 902 } - case 903: - { /* '903' */ - return 903 + case 903: { /* '903' */ + return 903 } - case 904: - { /* '904' */ - return 904 + case 904: { /* '904' */ + return 904 } - case 905: - { /* '905' */ - return 905 + case 905: { /* '905' */ + return 905 } - case 906: - { /* '906' */ - return 906 + case 906: { /* '906' */ + return 906 } - case 907: - { /* '907' */ - return 907 + case 907: { /* '907' */ + return 907 } - case 908: - { /* '908' */ - return 908 + case 908: { /* '908' */ + return 908 } - case 909: - { /* '909' */ - return 909 + case 909: { /* '909' */ + return 909 } - case 91: - { /* '91' */ - return 91 + case 91: { /* '91' */ + return 91 } - case 910: - { /* '910' */ - return 910 + case 910: { /* '910' */ + return 910 } - case 912: - { /* '912' */ - return 912 + case 912: { /* '912' */ + return 912 } - case 913: - { /* '913' */ - return 913 + case 913: { /* '913' */ + return 913 } - case 914: - { /* '914' */ - return 914 + case 914: { /* '914' */ + return 914 } - case 915: - { /* '915' */ - return 915 + case 915: { /* '915' */ + return 915 } - case 916: - { /* '916' */ - return 916 + case 916: { /* '916' */ + return 916 } - case 917: - { /* '917' */ - return 917 + case 917: { /* '917' */ + return 917 } - case 918: - { /* '918' */ - return 918 + case 918: { /* '918' */ + return 918 } - case 919: - { /* '919' */ - return 919 + case 919: { /* '919' */ + return 919 } - case 92: - { /* '92' */ - return 92 + case 92: { /* '92' */ + return 92 } - case 920: - { /* '920' */ - return 920 + case 920: { /* '920' */ + return 920 } - case 921: - { /* '921' */ - return 921 + case 921: { /* '921' */ + return 921 } - case 922: - { /* '922' */ - return 922 + case 922: { /* '922' */ + return 922 } - case 923: - { /* '923' */ - return 923 + case 923: { /* '923' */ + return 923 } - case 924: - { /* '924' */ - return 924 + case 924: { /* '924' */ + return 924 } - case 925: - { /* '925' */ - return 925 + case 925: { /* '925' */ + return 925 } - case 926: - { /* '926' */ - return 926 + case 926: { /* '926' */ + return 926 } - case 927: - { /* '927' */ - return 927 + case 927: { /* '927' */ + return 927 } - case 928: - { /* '928' */ - return 928 + case 928: { /* '928' */ + return 928 } - case 929: - { /* '929' */ - return 929 + case 929: { /* '929' */ + return 929 } - case 93: - { /* '93' */ - return 93 + case 93: { /* '93' */ + return 93 } - case 930: - { /* '930' */ - return 930 + case 930: { /* '930' */ + return 930 } - case 931: - { /* '931' */ - return 931 + case 931: { /* '931' */ + return 931 } - case 932: - { /* '932' */ - return 932 + case 932: { /* '932' */ + return 932 } - case 933: - { /* '933' */ - return 933 + case 933: { /* '933' */ + return 933 } - case 934: - { /* '934' */ - return 934 + case 934: { /* '934' */ + return 934 } - case 935: - { /* '935' */ - return 935 + case 935: { /* '935' */ + return 935 } - case 936: - { /* '936' */ - return 936 + case 936: { /* '936' */ + return 936 } - case 937: - { /* '937' */ - return 937 + case 937: { /* '937' */ + return 937 } - case 938: - { /* '938' */ - return 938 + case 938: { /* '938' */ + return 938 } - case 939: - { /* '939' */ - return 939 + case 939: { /* '939' */ + return 939 } - case 94: - { /* '94' */ - return 94 + case 94: { /* '94' */ + return 94 } - case 940: - { /* '940' */ - return 940 + case 940: { /* '940' */ + return 940 } - case 941: - { /* '941' */ - return 941 + case 941: { /* '941' */ + return 941 } - case 942: - { /* '942' */ - return 942 + case 942: { /* '942' */ + return 942 } - case 943: - { /* '943' */ - return 943 + case 943: { /* '943' */ + return 943 } - case 944: - { /* '944' */ - return 944 + case 944: { /* '944' */ + return 944 } - case 945: - { /* '945' */ - return 945 + case 945: { /* '945' */ + return 945 } - case 946: - { /* '946' */ - return 946 + case 946: { /* '946' */ + return 946 } - case 947: - { /* '947' */ - return 947 + case 947: { /* '947' */ + return 947 } - case 948: - { /* '948' */ - return 948 + case 948: { /* '948' */ + return 948 } - case 949: - { /* '949' */ - return 949 + case 949: { /* '949' */ + return 949 } - case 95: - { /* '95' */ - return 95 + case 95: { /* '95' */ + return 95 } - case 950: - { /* '950' */ - return 950 + case 950: { /* '950' */ + return 950 } - case 951: - { /* '951' */ - return 951 + case 951: { /* '951' */ + return 951 } - case 952: - { /* '952' */ - return 952 + case 952: { /* '952' */ + return 952 } - case 953: - { /* '953' */ - return 953 + case 953: { /* '953' */ + return 953 } - case 954: - { /* '954' */ - return 954 + case 954: { /* '954' */ + return 954 } - case 955: - { /* '955' */ - return 955 + case 955: { /* '955' */ + return 955 } - case 956: - { /* '956' */ - return 956 + case 956: { /* '956' */ + return 956 } - case 957: - { /* '957' */ - return 957 + case 957: { /* '957' */ + return 957 } - case 958: - { /* '958' */ - return 958 + case 958: { /* '958' */ + return 958 } - case 959: - { /* '959' */ - return 959 + case 959: { /* '959' */ + return 959 } - case 96: - { /* '96' */ - return 96 + case 96: { /* '96' */ + return 96 } - case 960: - { /* '960' */ - return 960 + case 960: { /* '960' */ + return 960 } - case 961: - { /* '961' */ - return 961 + case 961: { /* '961' */ + return 961 } - case 962: - { /* '962' */ - return 962 + case 962: { /* '962' */ + return 962 } - case 963: - { /* '963' */ - return 963 + case 963: { /* '963' */ + return 963 } - case 964: - { /* '964' */ - return 964 + case 964: { /* '964' */ + return 964 } - case 965: - { /* '965' */ - return 965 + case 965: { /* '965' */ + return 965 } - case 966: - { /* '966' */ - return 966 + case 966: { /* '966' */ + return 966 } - case 967: - { /* '967' */ - return 967 + case 967: { /* '967' */ + return 967 } - case 968: - { /* '968' */ - return 968 + case 968: { /* '968' */ + return 968 } - case 969: - { /* '969' */ - return 969 + case 969: { /* '969' */ + return 969 } - case 97: - { /* '97' */ - return 97 + case 97: { /* '97' */ + return 97 } - case 970: - { /* '970' */ - return 970 + case 970: { /* '970' */ + return 970 } - case 971: - { /* '971' */ - return 971 + case 971: { /* '971' */ + return 971 } - case 972: - { /* '972' */ - return 972 + case 972: { /* '972' */ + return 972 } - case 973: - { /* '973' */ - return 973 + case 973: { /* '973' */ + return 973 } - case 974: - { /* '974' */ - return 974 + case 974: { /* '974' */ + return 974 } - case 975: - { /* '975' */ - return 975 + case 975: { /* '975' */ + return 975 } - case 976: - { /* '976' */ - return 976 + case 976: { /* '976' */ + return 976 } - case 977: - { /* '977' */ - return 977 + case 977: { /* '977' */ + return 977 } - case 978: - { /* '978' */ - return 978 + case 978: { /* '978' */ + return 978 } - case 979: - { /* '979' */ - return 979 + case 979: { /* '979' */ + return 979 } - case 98: - { /* '98' */ - return 98 + case 98: { /* '98' */ + return 98 } - case 980: - { /* '980' */ - return 980 + case 980: { /* '980' */ + return 980 } - case 981: - { /* '981' */ - return 981 + case 981: { /* '981' */ + return 981 } - case 982: - { /* '982' */ - return 982 + case 982: { /* '982' */ + return 982 } - case 983: - { /* '983' */ - return 983 + case 983: { /* '983' */ + return 983 } - case 984: - { /* '984' */ - return 984 + case 984: { /* '984' */ + return 984 } - case 985: - { /* '985' */ - return 985 + case 985: { /* '985' */ + return 985 } - case 986: - { /* '986' */ - return 986 + case 986: { /* '986' */ + return 986 } - case 987: - { /* '987' */ - return 987 + case 987: { /* '987' */ + return 987 } - case 988: - { /* '988' */ - return 988 + case 988: { /* '988' */ + return 988 } - case 989: - { /* '989' */ - return 989 + case 989: { /* '989' */ + return 989 } - case 99: - { /* '99' */ - return 99 + case 99: { /* '99' */ + return 99 } - case 990: - { /* '990' */ - return 990 + case 990: { /* '990' */ + return 990 } - case 991: - { /* '991' */ - return 991 + case 991: { /* '991' */ + return 991 } - case 992: - { /* '992' */ - return 992 + case 992: { /* '992' */ + return 992 } - case 993: - { /* '993' */ - return 993 + case 993: { /* '993' */ + return 993 } - case 994: - { /* '994' */ - return 994 + case 994: { /* '994' */ + return 994 } - case 995: - { /* '995' */ - return 995 + case 995: { /* '995' */ + return 995 } - case 996: - { /* '996' */ - return 996 + case 996: { /* '996' */ + return 996 } - case 997: - { /* '997' */ - return 997 + case 997: { /* '997' */ + return 997 } - case 998: - { /* '998' */ - return 998 + case 998: { /* '998' */ + return 998 } - default: - { + default: { return 0 } } @@ -8460,8418 +7061,7018 @@ func BACnetVendorIdFirstEnumForFieldVendorId(value uint16) (BACnetVendorId, erro } func (e BACnetVendorId) VendorName() string { - switch e { - case 0: - { /* '0' */ - return "ASHRAE" - } - case 0xFFFF: - { /* '0xFFFF' */ - return "Unknown" - } - case 1: - { /* '1' */ - return "NIST" - } - case 10: - { /* '10' */ - return "Schneider Electric" - } - case 100: - { /* '100' */ - return "Custom Mechanical Equipment, LLC" - } - case 1000: - { /* '1000' */ - return "Ekon GmbH" - } - case 1001: - { /* '1001' */ - return "Molex" - } - case 1002: - { /* '1002' */ - return "Maco Lighting Pty Ltd." - } - case 1003: - { /* '1003' */ - return "Axecon Corp." - } - case 1004: - { /* '1004' */ - return "Tensor plc" - } - case 1005: - { /* '1005' */ - return "Kaseman Environmental Control Equipment (Shanghai) Limited" - } - case 1006: - { /* '1006' */ - return "AB Axis Industries" - } - case 1007: - { /* '1007' */ - return "Netix Controls" - } - case 1008: - { /* '1008' */ - return "Eldridge Products, Inc." - } - case 1009: - { /* '1009' */ - return "Micronics" - } - case 101: - { /* '101' */ - return "ClimateMaster" - } - case 1010: - { /* '1010' */ - return "Fortecho Solutions Ltd" - } - case 1011: - { /* '1011' */ - return "Sellers Manufacturing Company" - } - case 1012: - { /* '1012' */ - return "Rite-Hite Doors, Inc." - } - case 1013: - { /* '1013' */ - return "Violet Defense LLC" - } - case 1014: - { /* '1014' */ - return "Simna" - } - case 1015: - { /* '1015' */ - return "Multi-Énergie Best Inc." - } - case 1016: - { /* '1016' */ - return "Mega System Technologies, Inc." - } - case 1017: - { /* '1017' */ - return "Rheem" - } - case 1018: - { /* '1018' */ - return "Ing. Punzenberger COPA-DATA GmbH" - } - case 1019: - { /* '1019' */ - return "MEC Electronics GmbH" - } - case 102: - { /* '102' */ - return "ICP Panel-Tec, Inc." - } - case 1020: - { /* '1020' */ - return "Taco Comfort Solutions" - } - case 1021: - { /* '1021' */ - return "Alexander Maier GmbH" - } - case 1022: - { /* '1022' */ - return "Ecorithm, Inc." - } - case 1023: - { /* '1023' */ - return "Accurro Ltd" - } - case 1024: - { /* '1024' */ - return "ROMTECK Australia Pty Ltd" - } - case 1025: - { /* '1025' */ - return "Splash Monitoring Limited" - } - case 1026: - { /* '1026' */ - return "Light Application" - } - case 1027: - { /* '1027' */ - return "Logical Building Automation" - } - case 1028: - { /* '1028' */ - return "Exilight Oy" - } - case 1029: - { /* '1029' */ - return "Hager Electro SAS" - } - case 103: - { /* '103' */ - return "D-Tek Controls" - } - case 1030: - { /* '1030' */ - return "KLIF Co., LTD" - } - case 1031: - { /* '1031' */ - return "HygroMatik" - } - case 1032: - { /* '1032' */ - return "Daniel Mousseau Programmation & Electronique" - } - case 1033: - { /* '1033' */ - return "Aerionics Inc." - } - case 1034: - { /* '1034' */ - return "M2S Electronique Ltee" - } - case 1035: - { /* '1035' */ - return "Automation Components, Inc." - } - case 1036: - { /* '1036' */ - return "Niobrara Research & Development Corporation" - } - case 1037: - { /* '1037' */ - return "Netcom Sicherheitstechnik GmbH" - } - case 1038: - { /* '1038' */ - return "Lumel S.A." - } - case 1039: - { /* '1039' */ - return "Great Plains Industries, Inc." - } - case 104: - { /* '104' */ - return "NEC Engineering, Ltd." - } - case 1040: - { /* '1040' */ - return "Domotica Labs S.R.L" - } - case 1041: - { /* '1041' */ - return "Energy Cloud, Inc." - } - case 1042: - { /* '1042' */ - return "Vomatec" - } - case 1043: - { /* '1043' */ - return "Demma Companies" - } - case 1044: - { /* '1044' */ - return "Valsena" - } - case 1045: - { /* '1045' */ - return "Comsys Bärtsch AG" - } - case 1046: - { /* '1046' */ - return "bGrid" - } - case 1047: - { /* '1047' */ - return "MDJ Software Pty Ltd" - } - case 1048: - { /* '1048' */ - return "Dimonoff, Inc." - } - case 1049: - { /* '1049' */ - return "Edomo Systems, GmbH" - } - case 105: - { /* '105' */ - return "PRIVA BV" - } - case 1050: - { /* '1050' */ - return "Effektiv, LLC" - } - case 1051: - { /* '1051' */ - return "SteamOVap" - } - case 1052: - { /* '1052' */ - return "grandcentrix GmbH" - } - case 1053: - { /* '1053' */ - return "Weintek Labs, Inc." - } - case 1054: - { /* '1054' */ - return "Intefox GmbH" - } - case 1055: - { /* '1055' */ - return "Radius22 Automation Company" - } - case 1056: - { /* '1056' */ - return "Ringdale, Inc." - } - case 1057: - { /* '1057' */ - return "Iwaki America" - } - case 1058: - { /* '1058' */ - return "Bractlet" - } - case 1059: - { /* '1059' */ - return "STULZ Air Technology Systems, Inc." - } - case 106: - { /* '106' */ - return "Meidensha Corporation" - } - case 1060: - { /* '1060' */ - return "Climate Ready Engineering Pty Ltd" - } - case 1061: - { /* '1061' */ - return "Genea Energy Partners" - } - case 1062: - { /* '1062' */ - return "IoTall Chile" - } - case 1063: - { /* '1063' */ - return "IKS Co., Ltd." - } - case 1064: - { /* '1064' */ - return "Yodiwo AB" - } - case 1065: - { /* '1065' */ - return "TITAN electronic GmbH" - } - case 1066: - { /* '1066' */ - return "IDEC Corporation" - } - case 1067: - { /* '1067' */ - return "SIFRI SL" - } - case 1068: - { /* '1068' */ - return "Thermal Gas Systems Inc." - } - case 1069: - { /* '1069' */ - return "Building Automation Products, Inc." - } - case 107: - { /* '107' */ - return "JCI Systems Integration Services" - } - case 1070: - { /* '1070' */ - return "Asset Mapping" - } - case 1071: - { /* '1071' */ - return "Smarteh Company" - } - case 1072: - { /* '1072' */ - return "Datapod (Australia) Pty Ltd." - } - case 1073: - { /* '1073' */ - return "Buildings Alive Pty Ltd" - } - case 1074: - { /* '1074' */ - return "Digital Elektronik" - } - case 1075: - { /* '1075' */ - return "Talent Automação e Tecnologia Ltda" - } - case 1076: - { /* '1076' */ - return "Norposh Limited" - } - case 1077: - { /* '1077' */ - return "Merkur Funksysteme AG" - } - case 1078: - { /* '1078' */ - return "Faster CZ spol. S.r.o" - } - case 1079: - { /* '1079' */ - return "Eco-Adapt" - } - case 108: - { /* '108' */ - return "Freedom Corporation" - } - case 1080: - { /* '1080' */ - return "Energocentrum Plus, s.r.o" - } - case 1081: - { /* '1081' */ - return "amBX UK Ltd" - } - case 1082: - { /* '1082' */ - return "Western Reserve Controls, Inc." - } - case 1083: - { /* '1083' */ - return "LayerZero Power Systems, Inc." - } - case 1084: - { /* '1084' */ - return "CIC Jan Hřebec s.r.o." - } - case 1085: - { /* '1085' */ - return "Sigrov BV" - } - case 1086: - { /* '1086' */ - return "ISYS-Intelligent Systems" - } - case 1087: - { /* '1087' */ - return "Gas Detection (Australia) Pty Ltd" - } - case 1088: - { /* '1088' */ - return "Kinco Automation (Shanghai) Ltd." - } - case 1089: - { /* '1089' */ - return "Lars Energy, LLC" - } - case 109: - { /* '109' */ - return "Neuberger Gebäudeautomation GmbH" - } - case 1090: - { /* '1090' */ - return "Flamefast (UK) Ltd." - } - case 1091: - { /* '1091' */ - return "Royal Service Air Conditioning" - } - case 1092: - { /* '1092' */ - return "Ampio Sp. Z o.o." - } - case 1093: - { /* '1093' */ - return "Inovonics Wireless Corporation" - } - case 1094: - { /* '1094' */ - return "Nvent Thermal Management" - } - case 1095: - { /* '1095' */ - return "Sinowell Control System Ltd" - } - case 1096: - { /* '1096' */ - return "Moxa Inc." - } - case 1097: - { /* '1097' */ - return "Matrix iControl SDN BHD" - } - case 1098: - { /* '1098' */ - return "PurpleSwift" - } - case 1099: - { /* '1099' */ - return "OTIM Technologies" - } - case 11: - { /* '11' */ - return "TAC" - } - case 110: - { /* '110' */ - return "eZi Controls" - } - case 1100: - { /* '1100' */ - return "FlowMate Limited" - } - case 1101: - { /* '1101' */ - return "Degree Controls, Inc." - } - case 1102: - { /* '1102' */ - return "Fei Xing (Shanghai) Software Technologies Co., Ltd." - } - case 1103: - { /* '1103' */ - return "Berg GmbH" - } - case 1104: - { /* '1104' */ - return "ARENZ.IT" - } - case 1105: - { /* '1105' */ - return "Edelstrom Electronic Devices & Designing LLC" - } - case 1106: - { /* '1106' */ - return "Drive Connect, LLC" - } - case 1107: - { /* '1107' */ - return "DevelopNow" - } - case 1108: - { /* '1108' */ - return "Poort" + switch e { + case 0: { /* '0' */ + return "ASHRAE" } - case 1109: - { /* '1109' */ - return "VMEIL Information (Shanghai) Ltd" + case 0xFFFF: { /* '0xFFFF' */ + return "Unknown" } - case 111: - { /* '111' */ - return "Leviton Manufacturing" + case 1: { /* '1' */ + return "NIST" } - case 1110: - { /* '1110' */ - return "Rayleigh Instruments" + case 10: { /* '10' */ + return "Schneider Electric" } - case 1112: - { /* '1112' */ - return "CODESYS Development" + case 100: { /* '100' */ + return "Custom Mechanical Equipment, LLC" } - case 1113: - { /* '1113' */ - return "Smartware Technologies Group, LLC" + case 1000: { /* '1000' */ + return "Ekon GmbH" } - case 1114: - { /* '1114' */ - return "Polar Bear Solutions" + case 1001: { /* '1001' */ + return "Molex" } - case 1115: - { /* '1115' */ - return "Codra" + case 1002: { /* '1002' */ + return "Maco Lighting Pty Ltd." } - case 1116: - { /* '1116' */ - return "Pharos Architectural Controls Ltd" + case 1003: { /* '1003' */ + return "Axecon Corp." } - case 1117: - { /* '1117' */ - return "EngiNear Ltd." + case 1004: { /* '1004' */ + return "Tensor plc" } - case 1118: - { /* '1118' */ - return "Ad Hoc Electronics" + case 1005: { /* '1005' */ + return "Kaseman Environmental Control Equipment (Shanghai) Limited" } - case 1119: - { /* '1119' */ - return "Unified Microsystems" + case 1006: { /* '1006' */ + return "AB Axis Industries" } - case 112: - { /* '112' */ - return "Fujitsu Limited" + case 1007: { /* '1007' */ + return "Netix Controls" } - case 1120: - { /* '1120' */ - return "Industrieelektronik Brandenburg GmbH" + case 1008: { /* '1008' */ + return "Eldridge Products, Inc." } - case 1121: - { /* '1121' */ - return "Hartmann GmbH" + case 1009: { /* '1009' */ + return "Micronics" } - case 1122: - { /* '1122' */ - return "Piscada" + case 101: { /* '101' */ + return "ClimateMaster" } - case 1123: - { /* '1123' */ - return "KMB systems, s.r.o." + case 1010: { /* '1010' */ + return "Fortecho Solutions Ltd" } - case 1124: - { /* '1124' */ - return "PowerTech Engineering AS" + case 1011: { /* '1011' */ + return "Sellers Manufacturing Company" } - case 1125: - { /* '1125' */ - return "Telefonbau Arthur Schwabe GmbH & Co. KG" + case 1012: { /* '1012' */ + return "Rite-Hite Doors, Inc." } - case 1126: - { /* '1126' */ - return "Wuxi Fistwelove Technology Co., Ltd." + case 1013: { /* '1013' */ + return "Violet Defense LLC" } - case 1127: - { /* '1127' */ - return "Prysm" + case 1014: { /* '1014' */ + return "Simna" } - case 1128: - { /* '1128' */ - return "STEINEL GmbH" + case 1015: { /* '1015' */ + return "Multi-Énergie Best Inc." } - case 1129: - { /* '1129' */ - return "Georg Fischer JRG AG" + case 1016: { /* '1016' */ + return "Mega System Technologies, Inc." } - case 113: - { /* '113' */ - return "Vertiv (Formerly Emerson Network Power)" + case 1017: { /* '1017' */ + return "Rheem" } - case 1130: - { /* '1130' */ - return "Make Develop SL" + case 1018: { /* '1018' */ + return "Ing. Punzenberger COPA-DATA GmbH" } - case 1131: - { /* '1131' */ - return "Monnit Corporation" + case 1019: { /* '1019' */ + return "MEC Electronics GmbH" } - case 1132: - { /* '1132' */ - return "Mirror Life Corporation" + case 102: { /* '102' */ + return "ICP Panel-Tec, Inc." } - case 1133: - { /* '1133' */ - return "Secure Meters Limited" + case 1020: { /* '1020' */ + return "Taco Comfort Solutions" } - case 1134: - { /* '1134' */ - return "PECO" + case 1021: { /* '1021' */ + return "Alexander Maier GmbH" } - case 1135: - { /* '1135' */ - return ".CCTECH, Inc." + case 1022: { /* '1022' */ + return "Ecorithm, Inc." } - case 1136: - { /* '1136' */ - return "LightFi Limited" + case 1023: { /* '1023' */ + return "Accurro Ltd" } - case 1137: - { /* '1137' */ - return "Nice Spa" + case 1024: { /* '1024' */ + return "ROMTECK Australia Pty Ltd" } - case 1138: - { /* '1138' */ - return "Fiber SenSys, Inc." + case 1025: { /* '1025' */ + return "Splash Monitoring Limited" } - case 1139: - { /* '1139' */ - return "B&D Buchta und Degeorgi" + case 1026: { /* '1026' */ + return "Light Application" } - case 114: - { /* '114' */ - return "S. A. Armstrong, Ltd." + case 1027: { /* '1027' */ + return "Logical Building Automation" } - case 1140: - { /* '1140' */ - return "Ventacity Systems, Inc." + case 1028: { /* '1028' */ + return "Exilight Oy" } - case 1141: - { /* '1141' */ - return "Hitachi-Johnson Controls Air Conditioning, Inc." + case 1029: { /* '1029' */ + return "Hager Electro SAS" } - case 1142: - { /* '1142' */ - return "Sage Metering, Inc." + case 103: { /* '103' */ + return "D-Tek Controls" } - case 1143: - { /* '1143' */ - return "Andel Limited" + case 1030: { /* '1030' */ + return "KLIF Co., LTD" } - case 1144: - { /* '1144' */ - return "ECOSmart Technologies" + case 1031: { /* '1031' */ + return "HygroMatik" } - case 1145: - { /* '1145' */ - return "S.E.T." + case 1032: { /* '1032' */ + return "Daniel Mousseau Programmation & Electronique" } - case 1146: - { /* '1146' */ - return "Protec Fire Detection Spain SL" + case 1033: { /* '1033' */ + return "Aerionics Inc." } - case 1147: - { /* '1147' */ - return "AGRAMER UG" + case 1034: { /* '1034' */ + return "M2S Electronique Ltee" } - case 1148: - { /* '1148' */ - return "Anylink Electronic GmbH" + case 1035: { /* '1035' */ + return "Automation Components, Inc." } - case 1149: - { /* '1149' */ - return "Schindler, Ltd" + case 1036: { /* '1036' */ + return "Niobrara Research & Development Corporation" } - case 115: - { /* '115' */ - return "Visonet AG" + case 1037: { /* '1037' */ + return "Netcom Sicherheitstechnik GmbH" } - case 1150: - { /* '1150' */ - return "Jibreel Abdeen Est." + case 1038: { /* '1038' */ + return "Lumel S.A." } - case 1151: - { /* '1151' */ - return "Fluidyne Control Systems Pvt. Ltd" + case 1039: { /* '1039' */ + return "Great Plains Industries, Inc." } - case 1152: - { /* '1152' */ - return "Prism Systems, Inc." + case 104: { /* '104' */ + return "NEC Engineering, Ltd." } - case 1153: - { /* '1153' */ - return "Enertiv" + case 1040: { /* '1040' */ + return "Domotica Labs S.R.L" } - case 1154: - { /* '1154' */ - return "Mirasoft GmbH & Co. KG" + case 1041: { /* '1041' */ + return "Energy Cloud, Inc." } - case 1155: - { /* '1155' */ - return "DUALTECH IT" + case 1042: { /* '1042' */ + return "Vomatec" } - case 1156: - { /* '1156' */ - return "Countlogic, LLC" + case 1043: { /* '1043' */ + return "Demma Companies" } - case 1157: - { /* '1157' */ - return "Kohler" + case 1044: { /* '1044' */ + return "Valsena" } - case 1158: - { /* '1158' */ - return "Chen Sen Controls Co., Ltd." + case 1045: { /* '1045' */ + return "Comsys Bärtsch AG" } - case 1159: - { /* '1159' */ - return "Greenheck" + case 1046: { /* '1046' */ + return "bGrid" } - case 116: - { /* '116' */ - return "M&M Systems, Inc." + case 1047: { /* '1047' */ + return "MDJ Software Pty Ltd" } - case 1160: - { /* '1160' */ - return "Intwine Connect, LLC" + case 1048: { /* '1048' */ + return "Dimonoff, Inc." } - case 1161: - { /* '1161' */ - return "Karlborgs Elkontroll" + case 1049: { /* '1049' */ + return "Edomo Systems, GmbH" } - case 1162: - { /* '1162' */ - return "Datakom" + case 105: { /* '105' */ + return "PRIVA BV" } - case 1163: - { /* '1163' */ - return "Hoga Control AS" + case 1050: { /* '1050' */ + return "Effektiv, LLC" } - case 1164: - { /* '1164' */ - return "Cool Automation" + case 1051: { /* '1051' */ + return "SteamOVap" } - case 1165: - { /* '1165' */ - return "Inter Search Co., Ltd" + case 1052: { /* '1052' */ + return "grandcentrix GmbH" } - case 1166: - { /* '1166' */ - return "DABBEL-Automation Intelligence GmbH" + case 1053: { /* '1053' */ + return "Weintek Labs, Inc." } - case 1167: - { /* '1167' */ - return "Gadgeon Engineering Smartness" + case 1054: { /* '1054' */ + return "Intefox GmbH" } - case 1168: - { /* '1168' */ - return "Coster Group S.r.l." + case 1055: { /* '1055' */ + return "Radius22 Automation Company" } - case 1169: - { /* '1169' */ - return "Walter Müller AG" + case 1056: { /* '1056' */ + return "Ringdale, Inc." } - case 117: - { /* '117' */ - return "Custom Software Engineering" + case 1057: { /* '1057' */ + return "Iwaki America" } - case 1170: - { /* '1170' */ - return "Fluke" + case 1058: { /* '1058' */ + return "Bractlet" } - case 1171: - { /* '1171' */ - return "Quintex Systems Ltd" + case 1059: { /* '1059' */ + return "STULZ Air Technology Systems, Inc." } - case 1172: - { /* '1172' */ - return "Senfficient SDN BHD" + case 106: { /* '106' */ + return "Meidensha Corporation" } - case 1173: - { /* '1173' */ - return "Nube iO Operations Pty Ltd" + case 1060: { /* '1060' */ + return "Climate Ready Engineering Pty Ltd" } - case 1174: - { /* '1174' */ - return "DAS Integrator Pte Ltd" + case 1061: { /* '1061' */ + return "Genea Energy Partners" } - case 1175: - { /* '1175' */ - return "CREVIS Co., Ltd" + case 1062: { /* '1062' */ + return "IoTall Chile" } - case 1176: - { /* '1176' */ - return "iSquared software inc." + case 1063: { /* '1063' */ + return "IKS Co., Ltd." } - case 1177: - { /* '1177' */ - return "KTG GmbH" + case 1064: { /* '1064' */ + return "Yodiwo AB" } - case 1178: - { /* '1178' */ - return "POK Group Oy" + case 1065: { /* '1065' */ + return "TITAN electronic GmbH" } - case 1179: - { /* '1179' */ - return "Adiscom" + case 1066: { /* '1066' */ + return "IDEC Corporation" } - case 118: - { /* '118' */ - return "Nittan Company, Limited" + case 1067: { /* '1067' */ + return "SIFRI SL" } - case 1180: - { /* '1180' */ - return "Incusense" + case 1068: { /* '1068' */ + return "Thermal Gas Systems Inc." } - case 1181: - { /* '1181' */ - return "75F" + case 1069: { /* '1069' */ + return "Building Automation Products, Inc." } - case 1182: - { /* '1182' */ - return "Anord Mardix, Inc." + case 107: { /* '107' */ + return "JCI Systems Integration Services" } - case 1183: - { /* '1183' */ - return "HOSCH Gebäudeautomation Neue Produkte GmbH" + case 1070: { /* '1070' */ + return "Asset Mapping" } - case 1184: - { /* '1184' */ - return "Bosch.IO GmbH" + case 1071: { /* '1071' */ + return "Smarteh Company" } - case 1185: - { /* '1185' */ - return "Royal Boon Edam International B.V." + case 1072: { /* '1072' */ + return "Datapod (Australia) Pty Ltd." } - case 1186: - { /* '1186' */ - return "Clack Corporation" + case 1073: { /* '1073' */ + return "Buildings Alive Pty Ltd" } - case 1187: - { /* '1187' */ - return "Unitex Controls LLC" + case 1074: { /* '1074' */ + return "Digital Elektronik" } - case 1188: - { /* '1188' */ - return "KTC Göteborg AB" + case 1075: { /* '1075' */ + return "Talent Automação e Tecnologia Ltda" } - case 1189: - { /* '1189' */ - return "Interzon AB" + case 1076: { /* '1076' */ + return "Norposh Limited" } - case 119: - { /* '119' */ - return "Elutions Inc. (Wizcon Systems SAS)" + case 1077: { /* '1077' */ + return "Merkur Funksysteme AG" } - case 1190: - { /* '1190' */ - return "ISDE ING SL" + case 1078: { /* '1078' */ + return "Faster CZ spol. S.r.o" } - case 1191: - { /* '1191' */ - return "ABM automation building messaging GmbH" + case 1079: { /* '1079' */ + return "Eco-Adapt" } - case 1192: - { /* '1192' */ - return "Kentec Electronics Ltd" + case 108: { /* '108' */ + return "Freedom Corporation" } - case 1193: - { /* '1193' */ - return "Emerson Commercial and Residential Solutions" + case 1080: { /* '1080' */ + return "Energocentrum Plus, s.r.o" } - case 1194: - { /* '1194' */ - return "Powerside" + case 1081: { /* '1081' */ + return "amBX UK Ltd" } - case 1195: - { /* '1195' */ - return "SMC Group" + case 1082: { /* '1082' */ + return "Western Reserve Controls, Inc." } - case 1196: - { /* '1196' */ - return "EOS Weather Instruments" + case 1083: { /* '1083' */ + return "LayerZero Power Systems, Inc." } - case 1197: - { /* '1197' */ - return "Zonex Systems" + case 1084: { /* '1084' */ + return "CIC Jan Hřebec s.r.o." } - case 1198: - { /* '1198' */ - return "Generex Systems Computervertriebsgesellschaft mbH" + case 1085: { /* '1085' */ + return "Sigrov BV" } - case 1199: - { /* '1199' */ - return "Energy Wall LLC" + case 1086: { /* '1086' */ + return "ISYS-Intelligent Systems" } - case 12: - { /* '12' */ - return "Orion Analysis Corporation" + case 1087: { /* '1087' */ + return "Gas Detection (Australia) Pty Ltd" } - case 120: - { /* '120' */ - return "Pacom Systems Pty., Ltd." + case 1088: { /* '1088' */ + return "Kinco Automation (Shanghai) Ltd." } - case 1200: - { /* '1200' */ - return "Thermofin" + case 1089: { /* '1089' */ + return "Lars Energy, LLC" } - case 1201: - { /* '1201' */ - return "SDATAWAY SA" + case 109: { /* '109' */ + return "Neuberger Gebäudeautomation GmbH" } - case 1202: - { /* '1202' */ - return "Biddle Air Systems Limited" + case 1090: { /* '1090' */ + return "Flamefast (UK) Ltd." } - case 1203: - { /* '1203' */ - return "Kessler Ellis Products" + case 1091: { /* '1091' */ + return "Royal Service Air Conditioning" } - case 1204: - { /* '1204' */ - return "Thermoscreens" + case 1092: { /* '1092' */ + return "Ampio Sp. Z o.o." } - case 1205: - { /* '1205' */ - return "Modio" + case 1093: { /* '1093' */ + return "Inovonics Wireless Corporation" } - case 1206: - { /* '1206' */ - return "Newron Solutions" + case 1094: { /* '1094' */ + return "Nvent Thermal Management" } - case 1207: - { /* '1207' */ - return "Unitronics" + case 1095: { /* '1095' */ + return "Sinowell Control System Ltd" } - case 1208: - { /* '1208' */ - return "TRILUX GmbH & Co. KG" + case 1096: { /* '1096' */ + return "Moxa Inc." } - case 1209: - { /* '1209' */ - return "Kollmorgen Steuerungstechnik GmbH" + case 1097: { /* '1097' */ + return "Matrix iControl SDN BHD" } - case 121: - { /* '121' */ - return "Unico, Inc." + case 1098: { /* '1098' */ + return "PurpleSwift" } - case 1210: - { /* '1210' */ - return "Bosch Rexroth AG" + case 1099: { /* '1099' */ + return "OTIM Technologies" } - case 1211: - { /* '1211' */ - return "Alarko Carrier" + case 11: { /* '11' */ + return "TAC" } - case 1212: - { /* '1212' */ - return "Verdigris Technologies" + case 110: { /* '110' */ + return "eZi Controls" } - case 1213: - { /* '1213' */ - return "Shanghai SIIC-Longchuang Smartech So., Ltd." + case 1100: { /* '1100' */ + return "FlowMate Limited" } - case 1214: - { /* '1214' */ - return "Quinda Co." + case 1101: { /* '1101' */ + return "Degree Controls, Inc." } - case 1215: - { /* '1215' */ - return "GRUNER AG" + case 1102: { /* '1102' */ + return "Fei Xing (Shanghai) Software Technologies Co., Ltd." } - case 1216: - { /* '1216' */ - return "BACMOVE" + case 1103: { /* '1103' */ + return "Berg GmbH" } - case 1217: - { /* '1217' */ - return "PSIDAC AB" + case 1104: { /* '1104' */ + return "ARENZ.IT" } - case 1218: - { /* '1218' */ - return "ISICON-Control Automation" + case 1105: { /* '1105' */ + return "Edelstrom Electronic Devices & Designing LLC" } - case 1219: - { /* '1219' */ - return "Big Ass Fans" + case 1106: { /* '1106' */ + return "Drive Connect, LLC" } - case 122: - { /* '122' */ - return "Ebtron, Inc." + case 1107: { /* '1107' */ + return "DevelopNow" } - case 1220: - { /* '1220' */ - return "din – Dietmar Nocker Facility Management GmbH" + case 1108: { /* '1108' */ + return "Poort" } - case 1221: - { /* '1221' */ - return "Teldio" + case 1109: { /* '1109' */ + return "VMEIL Information (Shanghai) Ltd" } - case 1222: - { /* '1222' */ - return "MIKROKLIMA s.r.o." + case 111: { /* '111' */ + return "Leviton Manufacturing" } - case 1223: - { /* '1223' */ - return "Density" + case 1110: { /* '1110' */ + return "Rayleigh Instruments" } - case 1224: - { /* '1224' */ - return "ICONAG-Leittechnik GmbH" + case 1112: { /* '1112' */ + return "CODESYS Development" } - case 1225: - { /* '1225' */ - return "Awair" + case 1113: { /* '1113' */ + return "Smartware Technologies Group, LLC" } - case 1226: - { /* '1226' */ - return "T&D Engineering, Ltd" + case 1114: { /* '1114' */ + return "Polar Bear Solutions" } - case 1227: - { /* '1227' */ - return "Sistemas Digitales" + case 1115: { /* '1115' */ + return "Codra" } - case 1228: - { /* '1228' */ - return "Loxone Electronics GmbH" + case 1116: { /* '1116' */ + return "Pharos Architectural Controls Ltd" } - case 1229: - { /* '1229' */ - return "ActronAir" + case 1117: { /* '1117' */ + return "EngiNear Ltd." } - case 123: - { /* '123' */ - return "Scada Engine" + case 1118: { /* '1118' */ + return "Ad Hoc Electronics" } - case 1230: - { /* '1230' */ - return "Inductive Automation" + case 1119: { /* '1119' */ + return "Unified Microsystems" } - case 1231: - { /* '1231' */ - return "Thor Engineering GmbH" + case 112: { /* '112' */ + return "Fujitsu Limited" } - case 1232: - { /* '1232' */ - return "Berner International, LLC" + case 1120: { /* '1120' */ + return "Industrieelektronik Brandenburg GmbH" } - case 1233: - { /* '1233' */ - return "Potsdam Sensors LLC" + case 1121: { /* '1121' */ + return "Hartmann GmbH" } - case 1234: - { /* '1234' */ - return "Kohler Mira Ltd" + case 1122: { /* '1122' */ + return "Piscada" } - case 1235: - { /* '1235' */ - return "Tecomon GmbH" + case 1123: { /* '1123' */ + return "KMB systems, s.r.o." } - case 1236: - { /* '1236' */ - return "Two Dimensional Instruments, LLC" + case 1124: { /* '1124' */ + return "PowerTech Engineering AS" } - case 1237: - { /* '1237' */ - return "LEFA Technologies Pte. Ltd." + case 1125: { /* '1125' */ + return "Telefonbau Arthur Schwabe GmbH & Co. KG" } - case 1238: - { /* '1238' */ - return "EATON CEAG Notlichtsysteme GmbH" + case 1126: { /* '1126' */ + return "Wuxi Fistwelove Technology Co., Ltd." } - case 1239: - { /* '1239' */ - return "Commbox Tecnologia" + case 1127: { /* '1127' */ + return "Prysm" } - case 124: - { /* '124' */ - return "Lenze Americas (Formerly: AC Technology Corporation)" + case 1128: { /* '1128' */ + return "STEINEL GmbH" } - case 1240: - { /* '1240' */ - return "IPVideo Corporation" + case 1129: { /* '1129' */ + return "Georg Fischer JRG AG" } - case 1241: - { /* '1241' */ - return "Bender GmbH & Co. KG" + case 113: { /* '113' */ + return "Vertiv (Formerly Emerson Network Power)" } - case 1242: - { /* '1242' */ - return "Rhymebus Corporation" + case 1130: { /* '1130' */ + return "Make Develop SL" } - case 1243: - { /* '1243' */ - return "Axon Systems Ltd" + case 1131: { /* '1131' */ + return "Monnit Corporation" } - case 1244: - { /* '1244' */ - return "Engineered Air" + case 1132: { /* '1132' */ + return "Mirror Life Corporation" } - case 1245: - { /* '1245' */ - return "Elipse Software Ltda" + case 1133: { /* '1133' */ + return "Secure Meters Limited" } - case 1246: - { /* '1246' */ - return "Simatix Building Technologies Pvt. Ltd." + case 1134: { /* '1134' */ + return "PECO" } - case 1247: - { /* '1247' */ - return "W.A. Benjamin Electric Co." + case 1135: { /* '1135' */ + return ".CCTECH, Inc." } - case 1248: - { /* '1248' */ - return "TROX Air Conditioning Components (Suzhou) Co. Ltd." + case 1136: { /* '1136' */ + return "LightFi Limited" } - case 1249: - { /* '1249' */ - return "SC Medical Pty Ltd." + case 1137: { /* '1137' */ + return "Nice Spa" } - case 125: - { /* '125' */ - return "Eagle Technology" + case 1138: { /* '1138' */ + return "Fiber SenSys, Inc." } - case 1250: - { /* '1250' */ - return "Elcanic A/S" + case 1139: { /* '1139' */ + return "B&D Buchta und Degeorgi" } - case 1251: - { /* '1251' */ - return "Obeo AS" + case 114: { /* '114' */ + return "S. A. Armstrong, Ltd." } - case 1252: - { /* '1252' */ - return "Tapa, Inc." + case 1140: { /* '1140' */ + return "Ventacity Systems, Inc." } - case 1253: - { /* '1253' */ - return "ASE Smart Energy, Inc." + case 1141: { /* '1141' */ + return "Hitachi-Johnson Controls Air Conditioning, Inc." } - case 1254: - { /* '1254' */ - return "Performance Services, Inc." + case 1142: { /* '1142' */ + return "Sage Metering, Inc." } - case 1255: - { /* '1255' */ - return "Veridify Security" + case 1143: { /* '1143' */ + return "Andel Limited" } - case 1256: - { /* '1256' */ - return "CD Innovation LTD" + case 1144: { /* '1144' */ + return "ECOSmart Technologies" } - case 1257: - { /* '1257' */ - return "Ben Peoples Industries, LLC" + case 1145: { /* '1145' */ + return "S.E.T." } - case 1258: - { /* '1258' */ - return "UNICOMM Sp. z o.o" + case 1146: { /* '1146' */ + return "Protec Fire Detection Spain SL" } - case 1259: - { /* '1259' */ - return "Thing Technologies GmbH" + case 1147: { /* '1147' */ + return "AGRAMER UG" } - case 126: - { /* '126' */ - return "Data Aire, Inc." + case 1148: { /* '1148' */ + return "Anylink Electronic GmbH" } - case 1260: - { /* '1260' */ - return "Beijing HaiLin Energy Saving Technology, Inc." + case 1149: { /* '1149' */ + return "Schindler, Ltd" } - case 1261: - { /* '1261' */ - return "Digital Realty" + case 115: { /* '115' */ + return "Visonet AG" } - case 1262: - { /* '1262' */ - return "Agrowtek Inc." + case 1150: { /* '1150' */ + return "Jibreel Abdeen Est." } - case 1263: - { /* '1263' */ - return "DSP Innovation BV" + case 1151: { /* '1151' */ + return "Fluidyne Control Systems Pvt. Ltd" } - case 1264: - { /* '1264' */ - return "STV Electronic GmbH" + case 1152: { /* '1152' */ + return "Prism Systems, Inc." } - case 1265: - { /* '1265' */ - return "Elmeasure India Pvt Ltd." + case 1153: { /* '1153' */ + return "Enertiv" } - case 1266: - { /* '1266' */ - return "Pineshore Energy LLC" + case 1154: { /* '1154' */ + return "Mirasoft GmbH & Co. KG" } - case 1267: - { /* '1267' */ - return "Brasch Environmental Technologies, LLC" + case 1155: { /* '1155' */ + return "DUALTECH IT" } - case 1268: - { /* '1268' */ - return "Lion Controls Co., LTD" + case 1156: { /* '1156' */ + return "Countlogic, LLC" } - case 1269: - { /* '1269' */ - return "Sinux" + case 1157: { /* '1157' */ + return "Kohler" } - case 127: - { /* '127' */ - return "ABB, Inc." + case 1158: { /* '1158' */ + return "Chen Sen Controls Co., Ltd." } - case 1270: - { /* '1270' */ - return "Avnet Inc." + case 1159: { /* '1159' */ + return "Greenheck" } - case 1271: - { /* '1271' */ - return "Somfy Activites SA" + case 116: { /* '116' */ + return "M&M Systems, Inc." } - case 1272: - { /* '1272' */ - return "Amico" + case 1160: { /* '1160' */ + return "Intwine Connect, LLC" } - case 1273: - { /* '1273' */ - return "SageGlass" + case 1161: { /* '1161' */ + return "Karlborgs Elkontroll" } - case 1274: - { /* '1274' */ - return "AuVerte" + case 1162: { /* '1162' */ + return "Datakom" } - case 1275: - { /* '1275' */ - return "Agile Connects Pvt. Ltd." + case 1163: { /* '1163' */ + return "Hoga Control AS" } - case 1276: - { /* '1276' */ - return "Locimation Pty Ltd" + case 1164: { /* '1164' */ + return "Cool Automation" } - case 1277: - { /* '1277' */ - return "Envio Systems GmbH" + case 1165: { /* '1165' */ + return "Inter Search Co., Ltd" } - case 1278: - { /* '1278' */ - return "Voytech Systems Limited" + case 1166: { /* '1166' */ + return "DABBEL-Automation Intelligence GmbH" } - case 1279: - { /* '1279' */ - return "Davidsmeyer und Paul GmbH" + case 1167: { /* '1167' */ + return "Gadgeon Engineering Smartness" } - case 128: - { /* '128' */ - return "Transbit Sp. z o. o." + case 1168: { /* '1168' */ + return "Coster Group S.r.l." } - case 1280: - { /* '1280' */ - return "Lusher Engineering Services" + case 1169: { /* '1169' */ + return "Walter Müller AG" } - case 1281: - { /* '1281' */ - return "CHNT Nanjing Techsel Intelligent Company LTD" + case 117: { /* '117' */ + return "Custom Software Engineering" } - case 1282: - { /* '1282' */ - return "Threetronics Pty Ltd" + case 1170: { /* '1170' */ + return "Fluke" } - case 1283: - { /* '1283' */ - return "SkyFoundry, LLC" + case 1171: { /* '1171' */ + return "Quintex Systems Ltd" } - case 1284: - { /* '1284' */ - return "HanilProTech" + case 1172: { /* '1172' */ + return "Senfficient SDN BHD" } - case 1285: - { /* '1285' */ - return "Sensorscall" + case 1173: { /* '1173' */ + return "Nube iO Operations Pty Ltd" } - case 1286: - { /* '1286' */ - return "Shanghai Jingpu Information Technology, Co., Ltd." + case 1174: { /* '1174' */ + return "DAS Integrator Pte Ltd" } - case 1287: - { /* '1287' */ - return "Lichtmanufaktur Berlin GmbH" + case 1175: { /* '1175' */ + return "CREVIS Co., Ltd" } - case 1288: - { /* '1288' */ - return "Eco Parking Technologies" + case 1176: { /* '1176' */ + return "iSquared software inc." } - case 1289: - { /* '1289' */ - return "Envision Digital International Pte Ltd" + case 1177: { /* '1177' */ + return "KTG GmbH" } - case 129: - { /* '129' */ - return "Toshiba Carrier Corporation" + case 1178: { /* '1178' */ + return "POK Group Oy" } - case 1290: - { /* '1290' */ - return "Antony Developpement Electronique" + case 1179: { /* '1179' */ + return "Adiscom" } - case 1291: - { /* '1291' */ - return "i2systems" + case 118: { /* '118' */ + return "Nittan Company, Limited" } - case 1292: - { /* '1292' */ - return "Thureon International Limited" + case 1180: { /* '1180' */ + return "Incusense" } - case 1293: - { /* '1293' */ - return "Pulsafeeder" + case 1181: { /* '1181' */ + return "75F" } - case 1294: - { /* '1294' */ - return "MegaChips Corporation" + case 1182: { /* '1182' */ + return "Anord Mardix, Inc." } - case 1295: - { /* '1295' */ - return "TES Controls" + case 1183: { /* '1183' */ + return "HOSCH Gebäudeautomation Neue Produkte GmbH" } - case 1296: - { /* '1296' */ - return "Cermate" + case 1184: { /* '1184' */ + return "Bosch.IO GmbH" } - case 1297: - { /* '1297' */ - return "Grand Valley State University" + case 1185: { /* '1185' */ + return "Royal Boon Edam International B.V." } - case 1298: - { /* '1298' */ - return "Symcon Gmbh" + case 1186: { /* '1186' */ + return "Clack Corporation" } - case 1299: - { /* '1299' */ - return "The Chicago Faucet Company" + case 1187: { /* '1187' */ + return "Unitex Controls LLC" } - case 13: - { /* '13' */ - return "Teletrol Systems Inc." + case 1188: { /* '1188' */ + return "KTC Göteborg AB" } - case 130: - { /* '130' */ - return "Shenzhen Junzhi Hi-Tech Co., Ltd." + case 1189: { /* '1189' */ + return "Interzon AB" } - case 1300: - { /* '1300' */ - return "Geberit AG" + case 119: { /* '119' */ + return "Elutions Inc. (Wizcon Systems SAS)" } - case 1301: - { /* '1301' */ - return "Rex Controls" + case 1190: { /* '1190' */ + return "ISDE ING SL" } - case 1302: - { /* '1302' */ - return "IVMS GmbH" + case 1191: { /* '1191' */ + return "ABM automation building messaging GmbH" } - case 1303: - { /* '1303' */ - return "MNPP Saturn Ltd." + case 1192: { /* '1192' */ + return "Kentec Electronics Ltd" } - case 1304: - { /* '1304' */ - return "Regal Beloit" + case 1193: { /* '1193' */ + return "Emerson Commercial and Residential Solutions" } - case 1305: - { /* '1305' */ - return "ACS-Air Conditioning Solutions" + case 1194: { /* '1194' */ + return "Powerside" } - case 1306: - { /* '1306' */ - return "GBX Technology, LLC" + case 1195: { /* '1195' */ + return "SMC Group" } - case 1307: - { /* '1307' */ - return "Kaiterra" + case 1196: { /* '1196' */ + return "EOS Weather Instruments" } - case 1308: - { /* '1308' */ - return "ThinKuan loT Technology (Shanghai) Co., Ltd" + case 1197: { /* '1197' */ + return "Zonex Systems" } - case 1309: - { /* '1309' */ - return "HoCoSto B.V." + case 1198: { /* '1198' */ + return "Generex Systems Computervertriebsgesellschaft mbH" } - case 131: - { /* '131' */ - return "Tokai Soft" + case 1199: { /* '1199' */ + return "Energy Wall LLC" } - case 1310: - { /* '1310' */ - return "Shenzhen AS-AI Technology Co., Ltd." + case 12: { /* '12' */ + return "Orion Analysis Corporation" } - case 1311: - { /* '1311' */ - return "RPS S.p.a." + case 120: { /* '120' */ + return "Pacom Systems Pty., Ltd." } - case 1312: - { /* '1312' */ - return "Esmé solutions" + case 1200: { /* '1200' */ + return "Thermofin" } - case 1313: - { /* '1313' */ - return "IOTech Systems Limited" + case 1201: { /* '1201' */ + return "SDATAWAY SA" } - case 1314: - { /* '1314' */ - return "i-AutoLogic Co., Ltd." + case 1202: { /* '1202' */ + return "Biddle Air Systems Limited" } - case 1315: - { /* '1315' */ - return "New Age Micro, LLC" + case 1203: { /* '1203' */ + return "Kessler Ellis Products" } - case 1316: - { /* '1316' */ - return "Guardian Glass" + case 1204: { /* '1204' */ + return "Thermoscreens" } - case 1317: - { /* '1317' */ - return "Guangzhou Zhaoyu Information Technology" + case 1205: { /* '1205' */ + return "Modio" } - case 1318: - { /* '1318' */ - return "ACE IoT Solutions LLC" + case 1206: { /* '1206' */ + return "Newron Solutions" } - case 1319: - { /* '1319' */ - return "Poris Electronics Co., Ltd." + case 1207: { /* '1207' */ + return "Unitronics" } - case 132: - { /* '132' */ - return "Blue Ridge Technologies" + case 1208: { /* '1208' */ + return "TRILUX GmbH & Co. KG" } - case 1320: - { /* '1320' */ - return "Terminus Technologies Group" + case 1209: { /* '1209' */ + return "Kollmorgen Steuerungstechnik GmbH" } - case 1321: - { /* '1321' */ - return "Intech 21, Inc." + case 121: { /* '121' */ + return "Unico, Inc." } - case 1322: - { /* '1322' */ - return "Accurate Electronics" + case 1210: { /* '1210' */ + return "Bosch Rexroth AG" } - case 1323: - { /* '1323' */ - return "Fluence Bioengineering" + case 1211: { /* '1211' */ + return "Alarko Carrier" } - case 1324: - { /* '1324' */ - return "Mun Hean Singapore Pte Ltd" + case 1212: { /* '1212' */ + return "Verdigris Technologies" } - case 1325: - { /* '1325' */ - return "Katronic AG & Co. KG" + case 1213: { /* '1213' */ + return "Shanghai SIIC-Longchuang Smartech So., Ltd." } - case 1326: - { /* '1326' */ - return "Suzhou XinAo Information Technology Co. Ltd" + case 1214: { /* '1214' */ + return "Quinda Co." } - case 1327: - { /* '1327' */ - return "Linktekk Technology, JSC." + case 1215: { /* '1215' */ + return "GRUNER AG" } - case 1328: - { /* '1328' */ - return "Stirling Ultracold" + case 1216: { /* '1216' */ + return "BACMOVE" } - case 1329: - { /* '1329' */ - return "UV Partners, Inc." + case 1217: { /* '1217' */ + return "PSIDAC AB" } - case 133: - { /* '133' */ - return "Veris Industries" + case 1218: { /* '1218' */ + return "ISICON-Control Automation" } - case 1330: - { /* '1330' */ - return "ProMinent GmbH" + case 1219: { /* '1219' */ + return "Big Ass Fans" } - case 1331: - { /* '1331' */ - return "Multi-Tech Systems, Inc." + case 122: { /* '122' */ + return "Ebtron, Inc." } - case 1332: - { /* '1332' */ - return "JUMO GmbH & Co. KG" + case 1220: { /* '1220' */ + return "din – Dietmar Nocker Facility Management GmbH" } - case 1333: - { /* '1333' */ - return "Qingdao Huarui Technology Co. Ltd.," + case 1221: { /* '1221' */ + return "Teldio" } - case 1334: - { /* '1334' */ - return "Cairn Systemes" + case 1222: { /* '1222' */ + return "MIKROKLIMA s.r.o." } - case 1335: - { /* '1335' */ - return "NeuroLogic Research Corp." + case 1223: { /* '1223' */ + return "Density" } - case 1336: - { /* '1336' */ - return "Transition Technologies Advanced Solutions Sp. z o.o" + case 1224: { /* '1224' */ + return "ICONAG-Leittechnik GmbH" } - case 1337: - { /* '1337' */ - return "Xxter bv" + case 1225: { /* '1225' */ + return "Awair" } - case 1338: - { /* '1338' */ - return "PassiveLogic" + case 1226: { /* '1226' */ + return "T&D Engineering, Ltd" } - case 1339: - { /* '1339' */ - return "EnSmart Controls" + case 1227: { /* '1227' */ + return "Sistemas Digitales" } - case 134: - { /* '134' */ - return "Centaurus Prime" + case 1228: { /* '1228' */ + return "Loxone Electronics GmbH" } - case 1340: - { /* '1340' */ - return "Watts Heating and Hot Water Solutions, dba Lync" + case 1229: { /* '1229' */ + return "ActronAir" } - case 1341: - { /* '1341' */ - return "Troposphaira Technologies LLP" + case 123: { /* '123' */ + return "Scada Engine" } - case 1342: - { /* '1342' */ - return "Network Thermostat" + case 1230: { /* '1230' */ + return "Inductive Automation" } - case 1343: - { /* '1343' */ - return "Titanium Intelligent Solutions, LLC" + case 1231: { /* '1231' */ + return "Thor Engineering GmbH" } - case 1344: - { /* '1344' */ - return "Numa Products, LLC" + case 1232: { /* '1232' */ + return "Berner International, LLC" } - case 1345: - { /* '1345' */ - return "WAREMA Renkhoff SE" + case 1233: { /* '1233' */ + return "Potsdam Sensors LLC" } - case 1346: - { /* '1346' */ - return "Frese A/S" + case 1234: { /* '1234' */ + return "Kohler Mira Ltd" } - case 1347: - { /* '1347' */ - return "Mapped" + case 1235: { /* '1235' */ + return "Tecomon GmbH" } - case 1348: - { /* '1348' */ - return "ELEKTRODESIGN ventilatory s.r.o" + case 1236: { /* '1236' */ + return "Two Dimensional Instruments, LLC" } - case 1349: - { /* '1349' */ - return "AirCare Automation, Inc." + case 1237: { /* '1237' */ + return "LEFA Technologies Pte. Ltd." } - case 135: - { /* '135' */ - return "Sand Network Systems" + case 1238: { /* '1238' */ + return "EATON CEAG Notlichtsysteme GmbH" } - case 1350: - { /* '1350' */ - return "Antrum" + case 1239: { /* '1239' */ + return "Commbox Tecnologia" } - case 1351: - { /* '1351' */ - return "Bao Linh Connect Technology" + case 124: { /* '124' */ + return "Lenze Americas (Formerly: AC Technology Corporation)" } - case 1352: - { /* '1352' */ - return "Virginia Controls, LLC" + case 1240: { /* '1240' */ + return "IPVideo Corporation" } - case 1353: - { /* '1353' */ - return "Duosys SDN BHD" + case 1241: { /* '1241' */ + return "Bender GmbH & Co. KG" } - case 1354: - { /* '1354' */ - return "Onsen SAS" + case 1242: { /* '1242' */ + return "Rhymebus Corporation" } - case 1355: - { /* '1355' */ - return "Vaughn Thermal Corporation" + case 1243: { /* '1243' */ + return "Axon Systems Ltd" } - case 1356: - { /* '1356' */ - return "Thermoplastic Engineering Ltd (TPE)" + case 1244: { /* '1244' */ + return "Engineered Air" } - case 1357: - { /* '1357' */ - return "Wirth Research Ltd." + case 1245: { /* '1245' */ + return "Elipse Software Ltda" } - case 1358: - { /* '1358' */ - return "SST Automation" + case 1246: { /* '1246' */ + return "Simatix Building Technologies Pvt. Ltd." } - case 1359: - { /* '1359' */ - return "Shanghai Bencol Electronic Technology Co., Ltd" + case 1247: { /* '1247' */ + return "W.A. Benjamin Electric Co." } - case 136: - { /* '136' */ - return "Regulvar, Inc." + case 1248: { /* '1248' */ + return "TROX Air Conditioning Components (Suzhou) Co. Ltd." } - case 1360: - { /* '1360' */ - return "AIWAA Systems Private Limited" + case 1249: { /* '1249' */ + return "SC Medical Pty Ltd." } - case 1361: - { /* '1361' */ - return "Enless Wireless" + case 125: { /* '125' */ + return "Eagle Technology" } - case 1362: - { /* '1362' */ - return "Ozuno Engineering Pty Ltd" + case 1250: { /* '1250' */ + return "Elcanic A/S" } - case 1363: - { /* '1363' */ - return "Hubbell, The Electric Heater Company" + case 1251: { /* '1251' */ + return "Obeo AS" } - case 1364: - { /* '1364' */ - return "Industrial Turnaround Corporation (ITAC)" + case 1252: { /* '1252' */ + return "Tapa, Inc." } - case 1365: - { /* '1365' */ - return "Wadsworth Control Systems" + case 1253: { /* '1253' */ + return "ASE Smart Energy, Inc." } - case 1366: - { /* '1366' */ - return "Services Hilo Inc." + case 1254: { /* '1254' */ + return "Performance Services, Inc." } - case 1367: - { /* '1367' */ - return "iDM Energiesysteme GmbH" + case 1255: { /* '1255' */ + return "Veridify Security" } - case 1368: - { /* '1368' */ - return "BeNext B.V." + case 1256: { /* '1256' */ + return "CD Innovation LTD" } - case 1369: - { /* '1369' */ - return "CleanAir.ai Corporation" + case 1257: { /* '1257' */ + return "Ben Peoples Industries, LLC" } - case 137: - { /* '137' */ - return "AFDtek Division of Fastek International Inc." + case 1258: { /* '1258' */ + return "UNICOMM Sp. z o.o" } - case 1370: - { /* '1370' */ - return "Revolution Microelectronics (America) Inc." + case 1259: { /* '1259' */ + return "Thing Technologies GmbH" } - case 1371: - { /* '1371' */ - return "Arendar IT-Security GmbH" + case 126: { /* '126' */ + return "Data Aire, Inc." } - case 1372: - { /* '1372' */ - return "ZedBee Technologies Pvt Ltd" + case 1260: { /* '1260' */ + return "Beijing HaiLin Energy Saving Technology, Inc." } - case 1373: - { /* '1373' */ - return "Winmate Technology Solutions Pvt. Ltd." + case 1261: { /* '1261' */ + return "Digital Realty" } - case 1374: - { /* '1374' */ - return "Senticon Ltd." + case 1262: { /* '1262' */ + return "Agrowtek Inc." } - case 1375: - { /* '1375' */ - return "Rossaker AB" + case 1263: { /* '1263' */ + return "DSP Innovation BV" } - case 1376: - { /* '1376' */ - return "OPIT Solutions Ltd" + case 1264: { /* '1264' */ + return "STV Electronic GmbH" } - case 1377: - { /* '1377' */ - return "Hotowell International Co., Limited" + case 1265: { /* '1265' */ + return "Elmeasure India Pvt Ltd." } - case 1378: - { /* '1378' */ - return "Inim Electronics S.R.L. Unipersonale" + case 1266: { /* '1266' */ + return "Pineshore Energy LLC" } - case 1379: - { /* '1379' */ - return "Airthings ASA" + case 1267: { /* '1267' */ + return "Brasch Environmental Technologies, LLC" } - case 138: - { /* '138' */ - return "PowerCold Comfort Air Solutions, Inc." + case 1268: { /* '1268' */ + return "Lion Controls Co., LTD" } - case 1380: - { /* '1380' */ - return "Analog Devices, Inc." + case 1269: { /* '1269' */ + return "Sinux" } - case 1381: - { /* '1381' */ - return "AIDirections DMCC" + case 127: { /* '127' */ + return "ABB, Inc." } - case 1382: - { /* '1382' */ - return "Prima Electro S.p.A." + case 1270: { /* '1270' */ + return "Avnet Inc." } - case 1383: - { /* '1383' */ - return "KLT Control System Ltd." + case 1271: { /* '1271' */ + return "Somfy Activites SA" } - case 1384: - { /* '1384' */ - return "Evolution Controls Inc." + case 1272: { /* '1272' */ + return "Amico" } - case 1385: - { /* '1385' */ - return "Bever Innovations" + case 1273: { /* '1273' */ + return "SageGlass" } - case 1386: - { /* '1386' */ - return "Pelican Wireless Systems" + case 1274: { /* '1274' */ + return "AuVerte" } - case 1387: - { /* '1387' */ - return "Control Concepts Inc." + case 1275: { /* '1275' */ + return "Agile Connects Pvt. Ltd." } - case 1388: - { /* '1388' */ - return "Augmatic Technologies Pvt. Ltd." + case 1276: { /* '1276' */ + return "Locimation Pty Ltd" } - case 1389: - { /* '1389' */ - return "Xiamen Milesight loT Co., Ltd" + case 1277: { /* '1277' */ + return "Envio Systems GmbH" } - case 139: - { /* '139' */ - return "I Controls" + case 1278: { /* '1278' */ + return "Voytech Systems Limited" } - case 1390: - { /* '1390' */ - return "Tianjin Anjie loT Schience and Technology Co., Ltd" + case 1279: { /* '1279' */ + return "Davidsmeyer und Paul GmbH" } - case 1391: - { /* '1391' */ - return "Guangzhou S. Energy Electronics Technology Co. Ltd." + case 128: { /* '128' */ + return "Transbit Sp. z o. o." } - case 1392: - { /* '1392' */ - return "AKVO Atmospheric Water Systems Pvt. Ltd." + case 1280: { /* '1280' */ + return "Lusher Engineering Services" } - case 1393: - { /* '1393' */ - return "EmFirst Co. Ltd." + case 1281: { /* '1281' */ + return "CHNT Nanjing Techsel Intelligent Company LTD" } - case 1394: - { /* '1394' */ - return "Iion Systems ApS" + case 1282: { /* '1282' */ + return "Threetronics Pty Ltd" } - case 1396: - { /* '1396' */ - return "SAF Tehnika JSC" + case 1283: { /* '1283' */ + return "SkyFoundry, LLC" } - case 1397: - { /* '1397' */ - return "Komfort IQ, Inc." + case 1284: { /* '1284' */ + return "HanilProTech" } - case 1398: - { /* '1398' */ - return "CoolTera Limited" + case 1285: { /* '1285' */ + return "Sensorscall" } - case 1399: - { /* '1399' */ - return "Hadron Solutions S.r.l.s" + case 1286: { /* '1286' */ + return "Shanghai Jingpu Information Technology, Co., Ltd." } - case 14: - { /* '14' */ - return "Cimetrics Technology" + case 1287: { /* '1287' */ + return "Lichtmanufaktur Berlin GmbH" } - case 140: - { /* '140' */ - return "Viconics Electronics, Inc." + case 1288: { /* '1288' */ + return "Eco Parking Technologies" } - case 1401: - { /* '1401' */ - return "Bitpool" + case 1289: { /* '1289' */ + return "Envision Digital International Pte Ltd" } - case 1402: - { /* '1402' */ - return "Sonicu, LLC" + case 129: { /* '129' */ + return "Toshiba Carrier Corporation" } - case 1403: - { /* '1403' */ - return "Rishabh Instruments Limited" + case 1290: { /* '1290' */ + return "Antony Developpement Electronique" } - case 1404: - { /* '1404' */ - return "Thing Warehouse LLC" + case 1291: { /* '1291' */ + return "i2systems" } - case 1405: - { /* '1405' */ - return "Innofriends GmbH" + case 1292: { /* '1292' */ + return "Thureon International Limited" } - case 1406: - { /* '1406' */ - return "Metronic AKP Sp. J." + case 1293: { /* '1293' */ + return "Pulsafeeder" } - case 141: - { /* '141' */ - return "Yaskawa America, Inc." + case 1294: { /* '1294' */ + return "MegaChips Corporation" } - case 142: - { /* '142' */ - return "DEOS control systems GmbH" + case 1295: { /* '1295' */ + return "TES Controls" } - case 143: - { /* '143' */ - return "Digitale Mess- und Steuersysteme AG" + case 1296: { /* '1296' */ + return "Cermate" } - case 144: - { /* '144' */ - return "Fujitsu General Limited" + case 1297: { /* '1297' */ + return "Grand Valley State University" } - case 145: - { /* '145' */ - return "Project Engineering S.r.l." + case 1298: { /* '1298' */ + return "Symcon Gmbh" } - case 146: - { /* '146' */ - return "Sanyo Electric Co., Ltd." + case 1299: { /* '1299' */ + return "The Chicago Faucet Company" } - case 147: - { /* '147' */ - return "Integrated Information Systems, Inc." + case 13: { /* '13' */ + return "Teletrol Systems Inc." } - case 148: - { /* '148' */ - return "Temco Controls, Ltd." + case 130: { /* '130' */ + return "Shenzhen Junzhi Hi-Tech Co., Ltd." } - case 149: - { /* '149' */ - return "Airtek International Inc." + case 1300: { /* '1300' */ + return "Geberit AG" } - case 15: - { /* '15' */ - return "Cornell University" + case 1301: { /* '1301' */ + return "Rex Controls" } - case 150: - { /* '150' */ - return "Advantech Corporation" + case 1302: { /* '1302' */ + return "IVMS GmbH" } - case 151: - { /* '151' */ - return "Titan Products, Ltd." + case 1303: { /* '1303' */ + return "MNPP Saturn Ltd." } - case 152: - { /* '152' */ - return "Regel Partners" + case 1304: { /* '1304' */ + return "Regal Beloit" } - case 153: - { /* '153' */ - return "National Environmental Product" + case 1305: { /* '1305' */ + return "ACS-Air Conditioning Solutions" } - case 154: - { /* '154' */ - return "Unitec Corporation" + case 1306: { /* '1306' */ + return "GBX Technology, LLC" } - case 155: - { /* '155' */ - return "Kanden Engineering Company" + case 1307: { /* '1307' */ + return "Kaiterra" } - case 156: - { /* '156' */ - return "Messner Gebäudetechnik GmbH" + case 1308: { /* '1308' */ + return "ThinKuan loT Technology (Shanghai) Co., Ltd" } - case 157: - { /* '157' */ - return "Integrated.CH" + case 1309: { /* '1309' */ + return "HoCoSto B.V." } - case 158: - { /* '158' */ - return "Price Industries" + case 131: { /* '131' */ + return "Tokai Soft" } - case 159: - { /* '159' */ - return "SE-Elektronic GmbH" + case 1310: { /* '1310' */ + return "Shenzhen AS-AI Technology Co., Ltd." } - case 16: - { /* '16' */ - return "United Technologies Carrier" + case 1311: { /* '1311' */ + return "RPS S.p.a." } - case 160: - { /* '160' */ - return "Rockwell Automation" + case 1312: { /* '1312' */ + return "Esmé solutions" } - case 161: - { /* '161' */ - return "Enflex Corp." + case 1313: { /* '1313' */ + return "IOTech Systems Limited" } - case 162: - { /* '162' */ - return "ASI Controls" + case 1314: { /* '1314' */ + return "i-AutoLogic Co., Ltd." } - case 163: - { /* '163' */ - return "SysMik GmbH Dresden" + case 1315: { /* '1315' */ + return "New Age Micro, LLC" } - case 164: - { /* '164' */ - return "HSC Regelungstechnik GmbH" + case 1316: { /* '1316' */ + return "Guardian Glass" } - case 165: - { /* '165' */ - return "Smart Temp Australia Pty. Ltd." + case 1317: { /* '1317' */ + return "Guangzhou Zhaoyu Information Technology" } - case 166: - { /* '166' */ - return "Cooper Controls" + case 1318: { /* '1318' */ + return "ACE IoT Solutions LLC" } - case 167: - { /* '167' */ - return "Duksan Mecasys Co., Ltd." + case 1319: { /* '1319' */ + return "Poris Electronics Co., Ltd." } - case 168: - { /* '168' */ - return "Fuji IT Co., Ltd." + case 132: { /* '132' */ + return "Blue Ridge Technologies" } - case 169: - { /* '169' */ - return "Vacon Plc" + case 1320: { /* '1320' */ + return "Terminus Technologies Group" } - case 17: - { /* '17' */ - return "Honeywell Inc." + case 1321: { /* '1321' */ + return "Intech 21, Inc." } - case 170: - { /* '170' */ - return "Leader Controls" + case 1322: { /* '1322' */ + return "Accurate Electronics" } - case 171: - { /* '171' */ - return "ABB (Formerly Cylon Controls, Ltd)" + case 1323: { /* '1323' */ + return "Fluence Bioengineering" } - case 172: - { /* '172' */ - return "Compas" + case 1324: { /* '1324' */ + return "Mun Hean Singapore Pte Ltd" } - case 173: - { /* '173' */ - return "Mitsubishi Electric Building Techno-Service Co., Ltd." + case 1325: { /* '1325' */ + return "Katronic AG & Co. KG" } - case 174: - { /* '174' */ - return "Building Control Integrators" + case 1326: { /* '1326' */ + return "Suzhou XinAo Information Technology Co. Ltd" } - case 175: - { /* '175' */ - return "ITG Worldwide (M) Sdn Bhd" + case 1327: { /* '1327' */ + return "Linktekk Technology, JSC." } - case 176: - { /* '176' */ - return "Lutron Electronics Co., Inc." + case 1328: { /* '1328' */ + return "Stirling Ultracold" } - case 177: - { /* '177' */ - return "Cooper-Atkins Corporation" + case 1329: { /* '1329' */ + return "UV Partners, Inc." } - case 178: - { /* '178' */ - return "LOYTEC Electronics GmbH" + case 133: { /* '133' */ + return "Veris Industries" } - case 179: - { /* '179' */ - return "ProLon" + case 1330: { /* '1330' */ + return "ProMinent GmbH" } - case 18: - { /* '18' */ - return "Alerton / Honeywell" + case 1331: { /* '1331' */ + return "Multi-Tech Systems, Inc." } - case 180: - { /* '180' */ - return "Mega Controls Limited" + case 1332: { /* '1332' */ + return "JUMO GmbH & Co. KG" } - case 181: - { /* '181' */ - return "Micro Control Systems, Inc." + case 1333: { /* '1333' */ + return "Qingdao Huarui Technology Co. Ltd.," } - case 182: - { /* '182' */ - return "Kiyon, Inc." + case 1334: { /* '1334' */ + return "Cairn Systemes" } - case 183: - { /* '183' */ - return "Dust Networks" + case 1335: { /* '1335' */ + return "NeuroLogic Research Corp." } - case 184: - { /* '184' */ - return "Advanced Building Automation Systems" + case 1336: { /* '1336' */ + return "Transition Technologies Advanced Solutions Sp. z o.o" } - case 185: - { /* '185' */ - return "Hermos AG" + case 1337: { /* '1337' */ + return "Xxter bv" } - case 186: - { /* '186' */ - return "CEZIM" + case 1338: { /* '1338' */ + return "PassiveLogic" } - case 187: - { /* '187' */ - return "Softing" + case 1339: { /* '1339' */ + return "EnSmart Controls" } - case 188: - { /* '188' */ - return "Lynxspring, Inc." + case 134: { /* '134' */ + return "Centaurus Prime" } - case 189: - { /* '189' */ - return "Schneider Toshiba Inverter Europe" + case 1340: { /* '1340' */ + return "Watts Heating and Hot Water Solutions, dba Lync" } - case 19: - { /* '19' */ - return "TAC AB" + case 1341: { /* '1341' */ + return "Troposphaira Technologies LLP" } - case 190: - { /* '190' */ - return "Danfoss Drives A/S" + case 1342: { /* '1342' */ + return "Network Thermostat" } - case 191: - { /* '191' */ - return "Eaton Corporation" + case 1343: { /* '1343' */ + return "Titanium Intelligent Solutions, LLC" } - case 192: - { /* '192' */ - return "Matyca S.A." + case 1344: { /* '1344' */ + return "Numa Products, LLC" } - case 193: - { /* '193' */ - return "Botech AB" + case 1345: { /* '1345' */ + return "WAREMA Renkhoff SE" } - case 194: - { /* '194' */ - return "Noveo, Inc." + case 1346: { /* '1346' */ + return "Frese A/S" } - case 195: - { /* '195' */ - return "AMEV" + case 1347: { /* '1347' */ + return "Mapped" } - case 196: - { /* '196' */ - return "Yokogawa Electric Corporation" + case 1348: { /* '1348' */ + return "ELEKTRODESIGN ventilatory s.r.o" } - case 197: - { /* '197' */ - return "Bosch Building Automation GmbH" + case 1349: { /* '1349' */ + return "AirCare Automation, Inc." } - case 198: - { /* '198' */ - return "Exact Logic" + case 135: { /* '135' */ + return "Sand Network Systems" } - case 199: - { /* '199' */ - return "Mass Electronics Pty Ltd dba Innotech Control Systems Australia" + case 1350: { /* '1350' */ + return "Antrum" } - case 2: - { /* '2' */ - return "The Trane Company" + case 1351: { /* '1351' */ + return "Bao Linh Connect Technology" } - case 20: - { /* '20' */ - return "Hewlett-Packard Company" + case 1352: { /* '1352' */ + return "Virginia Controls, LLC" } - case 200: - { /* '200' */ - return "Kandenko Co., Ltd." + case 1353: { /* '1353' */ + return "Duosys SDN BHD" } - case 201: - { /* '201' */ - return "DTF, Daten-Technik Fries" + case 1354: { /* '1354' */ + return "Onsen SAS" } - case 202: - { /* '202' */ - return "Klimasoft, Ltd." + case 1355: { /* '1355' */ + return "Vaughn Thermal Corporation" } - case 203: - { /* '203' */ - return "Toshiba Schneider Inverter Corporation" + case 1356: { /* '1356' */ + return "Thermoplastic Engineering Ltd (TPE)" } - case 204: - { /* '204' */ - return "Control Applications, Ltd." + case 1357: { /* '1357' */ + return "Wirth Research Ltd." } - case 205: - { /* '205' */ - return "CIMON CO., Ltd." + case 1358: { /* '1358' */ + return "SST Automation" } - case 206: - { /* '206' */ - return "Onicon Incorporated" + case 1359: { /* '1359' */ + return "Shanghai Bencol Electronic Technology Co., Ltd" } - case 207: - { /* '207' */ - return "Automation Displays, Inc." + case 136: { /* '136' */ + return "Regulvar, Inc." } - case 208: - { /* '208' */ - return "Control Solutions, Inc." + case 1360: { /* '1360' */ + return "AIWAA Systems Private Limited" } - case 209: - { /* '209' */ - return "Remsdaq Limited" + case 1361: { /* '1361' */ + return "Enless Wireless" } - case 21: - { /* '21' */ - return "Dorsette’s Inc." + case 1362: { /* '1362' */ + return "Ozuno Engineering Pty Ltd" } - case 210: - { /* '210' */ - return "NTT Facilities, Inc." + case 1363: { /* '1363' */ + return "Hubbell, The Electric Heater Company" } - case 211: - { /* '211' */ - return "VIPA GmbH" + case 1364: { /* '1364' */ + return "Industrial Turnaround Corporation (ITAC)" } - case 212: - { /* '212' */ - return "TSC21 Association of Japan" + case 1365: { /* '1365' */ + return "Wadsworth Control Systems" } - case 213: - { /* '213' */ - return "Strato Automation" + case 1366: { /* '1366' */ + return "Services Hilo Inc." } - case 214: - { /* '214' */ - return "HRW Limited" + case 1367: { /* '1367' */ + return "iDM Energiesysteme GmbH" } - case 215: - { /* '215' */ - return "Lighting Control & Design, Inc." + case 1368: { /* '1368' */ + return "BeNext B.V." } - case 216: - { /* '216' */ - return "Mercy Electronic and Electrical Industries" + case 1369: { /* '1369' */ + return "CleanAir.ai Corporation" } - case 217: - { /* '217' */ - return "Samsung SDS Co., Ltd" + case 137: { /* '137' */ + return "AFDtek Division of Fastek International Inc." } - case 218: - { /* '218' */ - return "Impact Facility Solutions, Inc." + case 1370: { /* '1370' */ + return "Revolution Microelectronics (America) Inc." } - case 219: - { /* '219' */ - return "Aircuity" + case 1371: { /* '1371' */ + return "Arendar IT-Security GmbH" } - case 22: - { /* '22' */ - return "Siemens Schweiz AG (Formerly: Cerberus AG)" + case 1372: { /* '1372' */ + return "ZedBee Technologies Pvt Ltd" } - case 220: - { /* '220' */ - return "Control Techniques, Ltd." + case 1373: { /* '1373' */ + return "Winmate Technology Solutions Pvt. Ltd." } - case 221: - { /* '221' */ - return "OpenGeneral Pty., Ltd." + case 1374: { /* '1374' */ + return "Senticon Ltd." } - case 222: - { /* '222' */ - return "WAGO Kontakttechnik GmbH & Co. KG" + case 1375: { /* '1375' */ + return "Rossaker AB" } - case 223: - { /* '223' */ - return "Cerus Industrial" + case 1376: { /* '1376' */ + return "OPIT Solutions Ltd" } - case 224: - { /* '224' */ - return "Chloride Power Protection Company" + case 1377: { /* '1377' */ + return "Hotowell International Co., Limited" } - case 225: - { /* '225' */ - return "Computrols, Inc." + case 1378: { /* '1378' */ + return "Inim Electronics S.R.L. Unipersonale" } - case 226: - { /* '226' */ - return "Phoenix Contact GmbH & Co. KG" + case 1379: { /* '1379' */ + return "Airthings ASA" } - case 227: - { /* '227' */ - return "Grundfos Management A/S" + case 138: { /* '138' */ + return "PowerCold Comfort Air Solutions, Inc." } - case 228: - { /* '228' */ - return "Ridder Drive Systems" + case 1380: { /* '1380' */ + return "Analog Devices, Inc." } - case 229: - { /* '229' */ - return "Soft Device SDN BHD" + case 1381: { /* '1381' */ + return "AIDirections DMCC" } - case 23: - { /* '23' */ - return "York Controls Group" + case 1382: { /* '1382' */ + return "Prima Electro S.p.A." } - case 230: - { /* '230' */ - return "Integrated Control Technology Limited" + case 1383: { /* '1383' */ + return "KLT Control System Ltd." } - case 231: - { /* '231' */ - return "AIRxpert Systems, Inc." + case 1384: { /* '1384' */ + return "Evolution Controls Inc." } - case 232: - { /* '232' */ - return "Microtrol Limited" + case 1385: { /* '1385' */ + return "Bever Innovations" } - case 233: - { /* '233' */ - return "Red Lion Controls" + case 1386: { /* '1386' */ + return "Pelican Wireless Systems" } - case 234: - { /* '234' */ - return "Digital Electronics Corporation" + case 1387: { /* '1387' */ + return "Control Concepts Inc." } - case 235: - { /* '235' */ - return "Ennovatis GmbH" + case 1388: { /* '1388' */ + return "Augmatic Technologies Pvt. Ltd." } - case 236: - { /* '236' */ - return "Serotonin Software Technologies, Inc." + case 1389: { /* '1389' */ + return "Xiamen Milesight loT Co., Ltd" } - case 237: - { /* '237' */ - return "LS Industrial Systems Co., Ltd." + case 139: { /* '139' */ + return "I Controls" } - case 238: - { /* '238' */ - return "Square D Company" + case 1390: { /* '1390' */ + return "Tianjin Anjie loT Schience and Technology Co., Ltd" } - case 239: - { /* '239' */ - return "S Squared Innovations, Inc." + case 1391: { /* '1391' */ + return "Guangzhou S. Energy Electronics Technology Co. Ltd." } - case 24: - { /* '24' */ - return "Automated Logic Corporation" + case 1392: { /* '1392' */ + return "AKVO Atmospheric Water Systems Pvt. Ltd." } - case 240: - { /* '240' */ - return "Aricent Ltd." + case 1393: { /* '1393' */ + return "EmFirst Co. Ltd." } - case 241: - { /* '241' */ - return "EtherMetrics, LLC" + case 1394: { /* '1394' */ + return "Iion Systems ApS" } - case 242: - { /* '242' */ - return "Industrial Control Communications, Inc." + case 1396: { /* '1396' */ + return "SAF Tehnika JSC" } - case 243: - { /* '243' */ - return "Paragon Controls, Inc." + case 1397: { /* '1397' */ + return "Komfort IQ, Inc." } - case 244: - { /* '244' */ - return "A. O. Smith Corporation" + case 1398: { /* '1398' */ + return "CoolTera Limited" } - case 245: - { /* '245' */ - return "Contemporary Control Systems, Inc." + case 1399: { /* '1399' */ + return "Hadron Solutions S.r.l.s" } - case 246: - { /* '246' */ - return "HMS Industrial Networks SLU" + case 14: { /* '14' */ + return "Cimetrics Technology" } - case 247: - { /* '247' */ - return "Ingenieurgesellschaft N. Hartleb mbH" + case 140: { /* '140' */ + return "Viconics Electronics, Inc." } - case 248: - { /* '248' */ - return "Heat-Timer Corporation" + case 1401: { /* '1401' */ + return "Bitpool" } - case 249: - { /* '249' */ - return "Ingrasys Technology, Inc." + case 1402: { /* '1402' */ + return "Sonicu, LLC" } - case 25: - { /* '25' */ - return "CSI Control Systems International" + case 1403: { /* '1403' */ + return "Rishabh Instruments Limited" } - case 250: - { /* '250' */ - return "Costerm Building Automation" + case 1404: { /* '1404' */ + return "Thing Warehouse LLC" } - case 251: - { /* '251' */ - return "WILO SE" + case 1405: { /* '1405' */ + return "Innofriends GmbH" } - case 252: - { /* '252' */ - return "Embedia Technologies Corp." + case 1406: { /* '1406' */ + return "Metronic AKP Sp. J." } - case 253: - { /* '253' */ - return "Technilog" + case 141: { /* '141' */ + return "Yaskawa America, Inc." } - case 254: - { /* '254' */ - return "HR Controls Ltd. & Co. KG" + case 142: { /* '142' */ + return "DEOS control systems GmbH" } - case 255: - { /* '255' */ - return "Lennox International, Inc." + case 143: { /* '143' */ + return "Digitale Mess- und Steuersysteme AG" } - case 256: - { /* '256' */ - return "RK-Tec Rauchklappen-Steuerungssysteme GmbH & Co. KG" + case 144: { /* '144' */ + return "Fujitsu General Limited" } - case 257: - { /* '257' */ - return "Thermomax, Ltd." + case 145: { /* '145' */ + return "Project Engineering S.r.l." } - case 258: - { /* '258' */ - return "ELCON Electronic Control, Ltd." + case 146: { /* '146' */ + return "Sanyo Electric Co., Ltd." } - case 259: - { /* '259' */ - return "Larmia Control AB" + case 147: { /* '147' */ + return "Integrated Information Systems, Inc." } - case 26: - { /* '26' */ - return "Phoenix Controls Corporation" + case 148: { /* '148' */ + return "Temco Controls, Ltd." } - case 260: - { /* '260' */ - return "BACnet Stack at SourceForge" + case 149: { /* '149' */ + return "Airtek International Inc." } - case 261: - { /* '261' */ - return "G4S Security Services A/S" + case 15: { /* '15' */ + return "Cornell University" } - case 262: - { /* '262' */ - return "Exor International S.p.A." + case 150: { /* '150' */ + return "Advantech Corporation" } - case 263: - { /* '263' */ - return "Cristal Controles" + case 151: { /* '151' */ + return "Titan Products, Ltd." } - case 264: - { /* '264' */ - return "Regin AB" + case 152: { /* '152' */ + return "Regel Partners" } - case 265: - { /* '265' */ - return "Dimension Software, Inc." + case 153: { /* '153' */ + return "National Environmental Product" } - case 266: - { /* '266' */ - return "SynapSense Corporation" + case 154: { /* '154' */ + return "Unitec Corporation" } - case 267: - { /* '267' */ - return "Beijing Nantree Electronic Co., Ltd." + case 155: { /* '155' */ + return "Kanden Engineering Company" } - case 268: - { /* '268' */ - return "Camus Hydronics Ltd." + case 156: { /* '156' */ + return "Messner Gebäudetechnik GmbH" } - case 269: - { /* '269' */ - return "Kawasaki Heavy Industries, Ltd." + case 157: { /* '157' */ + return "Integrated.CH" } - case 27: - { /* '27' */ - return "Innovex Technologies, Inc." + case 158: { /* '158' */ + return "Price Industries" } - case 270: - { /* '270' */ - return "Critical Environment Technologies" + case 159: { /* '159' */ + return "SE-Elektronic GmbH" } - case 271: - { /* '271' */ - return "ILSHIN IBS Co., Ltd." + case 16: { /* '16' */ + return "United Technologies Carrier" } - case 272: - { /* '272' */ - return "ELESTA Energy Control AG" + case 160: { /* '160' */ + return "Rockwell Automation" } - case 273: - { /* '273' */ - return "KROPMAN Installatietechniek" + case 161: { /* '161' */ + return "Enflex Corp." } - case 274: - { /* '274' */ - return "Baldor Electric Company" + case 162: { /* '162' */ + return "ASI Controls" } - case 275: - { /* '275' */ - return "INGA mbH" + case 163: { /* '163' */ + return "SysMik GmbH Dresden" } - case 276: - { /* '276' */ - return "GE Consumer & Industrial" + case 164: { /* '164' */ + return "HSC Regelungstechnik GmbH" } - case 277: - { /* '277' */ - return "Functional Devices, Inc." + case 165: { /* '165' */ + return "Smart Temp Australia Pty. Ltd." } - case 278: - { /* '278' */ - return "StudioSC" + case 166: { /* '166' */ + return "Cooper Controls" } - case 279: - { /* '279' */ - return "M-System Co., Ltd." + case 167: { /* '167' */ + return "Duksan Mecasys Co., Ltd." } - case 28: - { /* '28' */ - return "KMC Controls, Inc." + case 168: { /* '168' */ + return "Fuji IT Co., Ltd." } - case 280: - { /* '280' */ - return "Yokota Co., Ltd." + case 169: { /* '169' */ + return "Vacon Plc" } - case 281: - { /* '281' */ - return "Hitranse Technology Co., LTD" + case 17: { /* '17' */ + return "Honeywell Inc." } - case 282: - { /* '282' */ - return "Vigilent Corporation" + case 170: { /* '170' */ + return "Leader Controls" } - case 283: - { /* '283' */ - return "Kele, Inc." + case 171: { /* '171' */ + return "ABB (Formerly Cylon Controls, Ltd)" } - case 284: - { /* '284' */ - return "Opera Electronics, Inc." + case 172: { /* '172' */ + return "Compas" } - case 285: - { /* '285' */ - return "Gentec" + case 173: { /* '173' */ + return "Mitsubishi Electric Building Techno-Service Co., Ltd." } - case 286: - { /* '286' */ - return "Embedded Science Labs, LLC" + case 174: { /* '174' */ + return "Building Control Integrators" } - case 287: - { /* '287' */ - return "Parker Hannifin Corporation" + case 175: { /* '175' */ + return "ITG Worldwide (M) Sdn Bhd" } - case 288: - { /* '288' */ - return "MaCaPS International Limited" + case 176: { /* '176' */ + return "Lutron Electronics Co., Inc." } - case 289: - { /* '289' */ - return "Link4 Corporation" + case 177: { /* '177' */ + return "Cooper-Atkins Corporation" } - case 29: - { /* '29' */ - return "Xn Technologies, Inc." + case 178: { /* '178' */ + return "LOYTEC Electronics GmbH" } - case 290: - { /* '290' */ - return "Romutec Steuer-u. Regelsysteme GmbH" + case 179: { /* '179' */ + return "ProLon" } - case 291: - { /* '291' */ - return "Pribusin, Inc." + case 18: { /* '18' */ + return "Alerton / Honeywell" } - case 292: - { /* '292' */ - return "Advantage Controls" + case 180: { /* '180' */ + return "Mega Controls Limited" } - case 293: - { /* '293' */ - return "Critical Room Control" + case 181: { /* '181' */ + return "Micro Control Systems, Inc." } - case 294: - { /* '294' */ - return "LEGRAND" + case 182: { /* '182' */ + return "Kiyon, Inc." } - case 295: - { /* '295' */ - return "Tongdy Control Technology Co., Ltd." + case 183: { /* '183' */ + return "Dust Networks" } - case 296: - { /* '296' */ - return "ISSARO Integrierte Systemtechnik" + case 184: { /* '184' */ + return "Advanced Building Automation Systems" } - case 297: - { /* '297' */ - return "Pro-Dev Industries" + case 185: { /* '185' */ + return "Hermos AG" } - case 298: - { /* '298' */ - return "DRI-STEEM" + case 186: { /* '186' */ + return "CEZIM" } - case 299: - { /* '299' */ - return "Creative Electronic GmbH" + case 187: { /* '187' */ + return "Softing" } - case 3: - { /* '3' */ - return "McQuay International" + case 188: { /* '188' */ + return "Lynxspring, Inc." } - case 30: - { /* '30' */ - return "Hyundai Information Technology Co., Ltd." + case 189: { /* '189' */ + return "Schneider Toshiba Inverter Europe" } - case 300: - { /* '300' */ - return "Swegon AB" + case 19: { /* '19' */ + return "TAC AB" } - case 301: - { /* '301' */ - return "FIRVENA s.r.o." + case 190: { /* '190' */ + return "Danfoss Drives A/S" } - case 302: - { /* '302' */ - return "Hitachi Appliances, Inc." + case 191: { /* '191' */ + return "Eaton Corporation" } - case 303: - { /* '303' */ - return "Real Time Automation, Inc." + case 192: { /* '192' */ + return "Matyca S.A." } - case 304: - { /* '304' */ - return "ITEC Hankyu-Hanshin Co." + case 193: { /* '193' */ + return "Botech AB" } - case 305: - { /* '305' */ - return "Cyrus E&M Engineering Co., Ltd." + case 194: { /* '194' */ + return "Noveo, Inc." } - case 306: - { /* '306' */ - return "Badger Meter" + case 195: { /* '195' */ + return "AMEV" } - case 307: - { /* '307' */ - return "Cirrascale Corporation" + case 196: { /* '196' */ + return "Yokogawa Electric Corporation" } - case 308: - { /* '308' */ - return "Elesta GmbH Building Automation" + case 197: { /* '197' */ + return "Bosch Building Automation GmbH" } - case 309: - { /* '309' */ - return "Securiton" + case 198: { /* '198' */ + return "Exact Logic" } - case 31: - { /* '31' */ - return "Tokimec Inc." + case 199: { /* '199' */ + return "Mass Electronics Pty Ltd dba Innotech Control Systems Australia" } - case 310: - { /* '310' */ - return "OSlsoft, Inc." + case 2: { /* '2' */ + return "The Trane Company" } - case 311: - { /* '311' */ - return "Hanazeder Electronic GmbH" + case 20: { /* '20' */ + return "Hewlett-Packard Company" } - case 312: - { /* '312' */ - return "Honeywell Security Deutschland, Novar GmbH" + case 200: { /* '200' */ + return "Kandenko Co., Ltd." } - case 313: - { /* '313' */ - return "Siemens Industry, Inc." + case 201: { /* '201' */ + return "DTF, Daten-Technik Fries" } - case 314: - { /* '314' */ - return "ETM Professional Control GmbH" + case 202: { /* '202' */ + return "Klimasoft, Ltd." } - case 315: - { /* '315' */ - return "Meitav-tec, Ltd." + case 203: { /* '203' */ + return "Toshiba Schneider Inverter Corporation" } - case 316: - { /* '316' */ - return "Janitza Electronics GmbH" + case 204: { /* '204' */ + return "Control Applications, Ltd." } - case 317: - { /* '317' */ - return "MKS Nordhausen" + case 205: { /* '205' */ + return "CIMON CO., Ltd." } - case 318: - { /* '318' */ - return "De Gier Drive Systems B.V." + case 206: { /* '206' */ + return "Onicon Incorporated" } - case 319: - { /* '319' */ - return "Cypress Envirosystems" + case 207: { /* '207' */ + return "Automation Displays, Inc." } - case 32: - { /* '32' */ - return "Simplex" + case 208: { /* '208' */ + return "Control Solutions, Inc." } - case 320: - { /* '320' */ - return "SMARTron s.r.o." + case 209: { /* '209' */ + return "Remsdaq Limited" } - case 321: - { /* '321' */ - return "Verari Systems, Inc." + case 21: { /* '21' */ + return "Dorsette’s Inc." } - case 322: - { /* '322' */ - return "K-W Electronic Service, Inc." + case 210: { /* '210' */ + return "NTT Facilities, Inc." } - case 323: - { /* '323' */ - return "ALFA-SMART Energy Management" + case 211: { /* '211' */ + return "VIPA GmbH" } - case 324: - { /* '324' */ - return "Telkonet, Inc." + case 212: { /* '212' */ + return "TSC21 Association of Japan" } - case 325: - { /* '325' */ - return "Securiton GmbH" + case 213: { /* '213' */ + return "Strato Automation" } - case 326: - { /* '326' */ - return "Cemtrex, Inc." + case 214: { /* '214' */ + return "HRW Limited" } - case 327: - { /* '327' */ - return "Performance Technologies, Inc." + case 215: { /* '215' */ + return "Lighting Control & Design, Inc." } - case 328: - { /* '328' */ - return "Xtralis (Aust) Pty Ltd" + case 216: { /* '216' */ + return "Mercy Electronic and Electrical Industries" } - case 329: - { /* '329' */ - return "TROX GmbH" + case 217: { /* '217' */ + return "Samsung SDS Co., Ltd" } - case 33: - { /* '33' */ - return "North Building Technologies Limited" + case 218: { /* '218' */ + return "Impact Facility Solutions, Inc." } - case 330: - { /* '330' */ - return "Beijing Hysine Technology Co., Ltd" + case 219: { /* '219' */ + return "Aircuity" } - case 331: - { /* '331' */ - return "RCK Controls, Inc." + case 22: { /* '22' */ + return "Siemens Schweiz AG (Formerly: Cerberus AG)" } - case 332: - { /* '332' */ - return "Distech Controls SAS" + case 220: { /* '220' */ + return "Control Techniques, Ltd." } - case 333: - { /* '333' */ - return "Novar/Honeywell" + case 221: { /* '221' */ + return "OpenGeneral Pty., Ltd." } - case 334: - { /* '334' */ - return "The S4 Group, Inc." + case 222: { /* '222' */ + return "WAGO Kontakttechnik GmbH & Co. KG" } - case 335: - { /* '335' */ - return "Schneider Electric" + case 223: { /* '223' */ + return "Cerus Industrial" } - case 336: - { /* '336' */ - return "LHA Systems" + case 224: { /* '224' */ + return "Chloride Power Protection Company" } - case 337: - { /* '337' */ - return "GHM engineering Group, Inc." + case 225: { /* '225' */ + return "Computrols, Inc." } - case 338: - { /* '338' */ - return "Cllimalux S.A." + case 226: { /* '226' */ + return "Phoenix Contact GmbH & Co. KG" } - case 339: - { /* '339' */ - return "VAISALA Oyj" + case 227: { /* '227' */ + return "Grundfos Management A/S" } - case 34: - { /* '34' */ - return "Notifier" + case 228: { /* '228' */ + return "Ridder Drive Systems" } - case 340: - { /* '340' */ - return "COMPLEX (Beijing) Technology, Co., LTD." + case 229: { /* '229' */ + return "Soft Device SDN BHD" } - case 341: - { /* '341' */ - return "SCADAmetrics" + case 23: { /* '23' */ + return "York Controls Group" } - case 342: - { /* '342' */ - return "POWERPEG NSI Limited" + case 230: { /* '230' */ + return "Integrated Control Technology Limited" } - case 343: - { /* '343' */ - return "BACnet Interoperability Testing Services, Inc." + case 231: { /* '231' */ + return "AIRxpert Systems, Inc." } - case 344: - { /* '344' */ - return "Teco a.s." + case 232: { /* '232' */ + return "Microtrol Limited" } - case 345: - { /* '345' */ - return "Plexus Technology, Inc." + case 233: { /* '233' */ + return "Red Lion Controls" } - case 346: - { /* '346' */ - return "Energy Focus, Inc." + case 234: { /* '234' */ + return "Digital Electronics Corporation" } - case 347: - { /* '347' */ - return "Powersmiths International Corp." + case 235: { /* '235' */ + return "Ennovatis GmbH" } - case 348: - { /* '348' */ - return "Nichibei Co., Ltd." + case 236: { /* '236' */ + return "Serotonin Software Technologies, Inc." } - case 349: - { /* '349' */ - return "HKC Technology Ltd." + case 237: { /* '237' */ + return "LS Industrial Systems Co., Ltd." } - case 35: - { /* '35' */ - return "Reliable Controls Corporation" + case 238: { /* '238' */ + return "Square D Company" } - case 350: - { /* '350' */ - return "Ovation Networks, Inc." + case 239: { /* '239' */ + return "S Squared Innovations, Inc." } - case 351: - { /* '351' */ - return "Setra Systems" + case 24: { /* '24' */ + return "Automated Logic Corporation" } - case 352: - { /* '352' */ - return "AVG Automation" + case 240: { /* '240' */ + return "Aricent Ltd." } - case 353: - { /* '353' */ - return "ZXC Ltd." + case 241: { /* '241' */ + return "EtherMetrics, LLC" } - case 354: - { /* '354' */ - return "Byte Sphere" + case 242: { /* '242' */ + return "Industrial Control Communications, Inc." } - case 355: - { /* '355' */ - return "Generiton Co., Ltd." + case 243: { /* '243' */ + return "Paragon Controls, Inc." } - case 356: - { /* '356' */ - return "Holter Regelarmaturen GmbH & Co. KG" + case 244: { /* '244' */ + return "A. O. Smith Corporation" } - case 357: - { /* '357' */ - return "Bedford Instruments, LLC" + case 245: { /* '245' */ + return "Contemporary Control Systems, Inc." } - case 358: - { /* '358' */ - return "Standair Inc." + case 246: { /* '246' */ + return "HMS Industrial Networks SLU" } - case 359: - { /* '359' */ - return "WEG Automation – R&D" + case 247: { /* '247' */ + return "Ingenieurgesellschaft N. Hartleb mbH" } - case 36: - { /* '36' */ - return "Tridium Inc." + case 248: { /* '248' */ + return "Heat-Timer Corporation" } - case 360: - { /* '360' */ - return "Prolon Control Systems ApS" + case 249: { /* '249' */ + return "Ingrasys Technology, Inc." } - case 361: - { /* '361' */ - return "Inneasoft" + case 25: { /* '25' */ + return "CSI Control Systems International" } - case 362: - { /* '362' */ - return "ConneXSoft GmbH" + case 250: { /* '250' */ + return "Costerm Building Automation" } - case 363: - { /* '363' */ - return "CEAG Notlichtsysteme GmbH" + case 251: { /* '251' */ + return "WILO SE" } - case 364: - { /* '364' */ - return "Distech Controls Inc." + case 252: { /* '252' */ + return "Embedia Technologies Corp." } - case 365: - { /* '365' */ - return "Industrial Technology Research Institute" + case 253: { /* '253' */ + return "Technilog" } - case 366: - { /* '366' */ - return "ICONICS, Inc." + case 254: { /* '254' */ + return "HR Controls Ltd. & Co. KG" } - case 367: - { /* '367' */ - return "IQ Controls s.c." + case 255: { /* '255' */ + return "Lennox International, Inc." } - case 368: - { /* '368' */ - return "OJ Electronics A/S" + case 256: { /* '256' */ + return "RK-Tec Rauchklappen-Steuerungssysteme GmbH & Co. KG" } - case 369: - { /* '369' */ - return "Rolbit Ltd." + case 257: { /* '257' */ + return "Thermomax, Ltd." } - case 37: - { /* '37' */ - return "MSA Safety" + case 258: { /* '258' */ + return "ELCON Electronic Control, Ltd." } - case 370: - { /* '370' */ - return "Synapsys Solutions Ltd." + case 259: { /* '259' */ + return "Larmia Control AB" } - case 371: - { /* '371' */ - return "ACME Engineering Prod. Ltd." + case 26: { /* '26' */ + return "Phoenix Controls Corporation" } - case 372: - { /* '372' */ - return "Zener Electric Pty, Ltd." + case 260: { /* '260' */ + return "BACnet Stack at SourceForge" } - case 373: - { /* '373' */ - return "Selectronix, Inc." + case 261: { /* '261' */ + return "G4S Security Services A/S" } - case 374: - { /* '374' */ - return "Gorbet & Banerjee, LLC." + case 262: { /* '262' */ + return "Exor International S.p.A." } - case 375: - { /* '375' */ - return "IME" + case 263: { /* '263' */ + return "Cristal Controles" } - case 376: - { /* '376' */ - return "Stephen H. Dawson Computer Service" + case 264: { /* '264' */ + return "Regin AB" } - case 377: - { /* '377' */ - return "Accutrol, LLC" + case 265: { /* '265' */ + return "Dimension Software, Inc." } - case 378: - { /* '378' */ - return "Schneider Elektronik GmbH" + case 266: { /* '266' */ + return "SynapSense Corporation" } - case 379: - { /* '379' */ - return "Alpha-Inno Tec GmbH" + case 267: { /* '267' */ + return "Beijing Nantree Electronic Co., Ltd." } - case 38: - { /* '38' */ - return "Silicon Energy" + case 268: { /* '268' */ + return "Camus Hydronics Ltd." } - case 380: - { /* '380' */ - return "ADMMicro, Inc." + case 269: { /* '269' */ + return "Kawasaki Heavy Industries, Ltd." } - case 381: - { /* '381' */ - return "Greystone Energy Systems, Inc." + case 27: { /* '27' */ + return "Innovex Technologies, Inc." } - case 382: - { /* '382' */ - return "CAP Technologie" + case 270: { /* '270' */ + return "Critical Environment Technologies" } - case 383: - { /* '383' */ - return "KeRo Systems" + case 271: { /* '271' */ + return "ILSHIN IBS Co., Ltd." } - case 384: - { /* '384' */ - return "Domat Control System s.r.o." + case 272: { /* '272' */ + return "ELESTA Energy Control AG" } - case 385: - { /* '385' */ - return "Efektronics Pty. Ltd." + case 273: { /* '273' */ + return "KROPMAN Installatietechniek" } - case 386: - { /* '386' */ - return "Hekatron Vertriebs GmbH" + case 274: { /* '274' */ + return "Baldor Electric Company" } - case 387: - { /* '387' */ - return "Securiton AG" + case 275: { /* '275' */ + return "INGA mbH" } - case 388: - { /* '388' */ - return "Carlo Gavazzi Controls SpA" + case 276: { /* '276' */ + return "GE Consumer & Industrial" } - case 389: - { /* '389' */ - return "Chipkin Automation Systems" + case 277: { /* '277' */ + return "Functional Devices, Inc." } - case 39: - { /* '39' */ - return "Kieback & Peter GmbH & Co KG" + case 278: { /* '278' */ + return "StudioSC" } - case 390: - { /* '390' */ - return "Savant Systems, LLC" + case 279: { /* '279' */ + return "M-System Co., Ltd." } - case 391: - { /* '391' */ - return "Simmtronic Lighting Controls" + case 28: { /* '28' */ + return "KMC Controls, Inc." } - case 392: - { /* '392' */ - return "Abelko Innovation AB" + case 280: { /* '280' */ + return "Yokota Co., Ltd." } - case 393: - { /* '393' */ - return "Seresco Technologies Inc." + case 281: { /* '281' */ + return "Hitranse Technology Co., LTD" } - case 394: - { /* '394' */ - return "IT Watchdogs" + case 282: { /* '282' */ + return "Vigilent Corporation" } - case 395: - { /* '395' */ - return "Automation Assist Japan Corp." + case 283: { /* '283' */ + return "Kele, Inc." } - case 396: - { /* '396' */ - return "Thermokon Sensortechnik GmbH" + case 284: { /* '284' */ + return "Opera Electronics, Inc." } - case 397: - { /* '397' */ - return "EGauge Systems, LLC" + case 285: { /* '285' */ + return "Gentec" } - case 398: - { /* '398' */ - return "Quantum Automation (ASIA) PTE, Ltd." + case 286: { /* '286' */ + return "Embedded Science Labs, LLC" } - case 399: - { /* '399' */ - return "Toshiba Lighting & Technology Corp." + case 287: { /* '287' */ + return "Parker Hannifin Corporation" } - case 4: - { /* '4' */ - return "PolarSoft" + case 288: { /* '288' */ + return "MaCaPS International Limited" } - case 40: - { /* '40' */ - return "Anacon Systems, Inc." + case 289: { /* '289' */ + return "Link4 Corporation" } - case 400: - { /* '400' */ - return "SPIN Engenharia de Automação Ltda." + case 29: { /* '29' */ + return "Xn Technologies, Inc." } - case 401: - { /* '401' */ - return "Logistics Systems & Software Services India PVT. Ltd." + case 290: { /* '290' */ + return "Romutec Steuer-u. Regelsysteme GmbH" } - case 402: - { /* '402' */ - return "Delta Controls Integration Products" + case 291: { /* '291' */ + return "Pribusin, Inc." } - case 403: - { /* '403' */ - return "Focus Media" + case 292: { /* '292' */ + return "Advantage Controls" } - case 404: - { /* '404' */ - return "LUMEnergi Inc." + case 293: { /* '293' */ + return "Critical Room Control" } - case 405: - { /* '405' */ - return "Kara Systems" + case 294: { /* '294' */ + return "LEGRAND" } - case 406: - { /* '406' */ - return "RF Code, Inc." + case 295: { /* '295' */ + return "Tongdy Control Technology Co., Ltd." } - case 407: - { /* '407' */ - return "Fatek Automation Corp." + case 296: { /* '296' */ + return "ISSARO Integrierte Systemtechnik" } - case 408: - { /* '408' */ - return "JANDA Software Company, LLC" + case 297: { /* '297' */ + return "Pro-Dev Industries" } - case 409: - { /* '409' */ - return "Open System Solutions Limited" + case 298: { /* '298' */ + return "DRI-STEEM" } - case 41: - { /* '41' */ - return "Systems Controls & Instruments, LLC" + case 299: { /* '299' */ + return "Creative Electronic GmbH" } - case 410: - { /* '410' */ - return "Intelec Systems PTY Ltd." + case 3: { /* '3' */ + return "McQuay International" } - case 411: - { /* '411' */ - return "Ecolodgix, LLC" + case 30: { /* '30' */ + return "Hyundai Information Technology Co., Ltd." } - case 412: - { /* '412' */ - return "Douglas Lighting Controls" + case 300: { /* '300' */ + return "Swegon AB" } - case 413: - { /* '413' */ - return "iSAtech GmbH" + case 301: { /* '301' */ + return "FIRVENA s.r.o." } - case 414: - { /* '414' */ - return "AREAL" + case 302: { /* '302' */ + return "Hitachi Appliances, Inc." } - case 415: - { /* '415' */ - return "Beckhoff Automation" + case 303: { /* '303' */ + return "Real Time Automation, Inc." } - case 416: - { /* '416' */ - return "IPAS GmbH" + case 304: { /* '304' */ + return "ITEC Hankyu-Hanshin Co." } - case 417: - { /* '417' */ - return "KE2 Therm Solutions" + case 305: { /* '305' */ + return "Cyrus E&M Engineering Co., Ltd." } - case 418: - { /* '418' */ - return "Base2Products" + case 306: { /* '306' */ + return "Badger Meter" } - case 419: - { /* '419' */ - return "DTL Controls, LLC" + case 307: { /* '307' */ + return "Cirrascale Corporation" } - case 42: - { /* '42' */ - return "Acuity Brands Lighting, Inc." + case 308: { /* '308' */ + return "Elesta GmbH Building Automation" } - case 420: - { /* '420' */ - return "INNCOM International, Inc." + case 309: { /* '309' */ + return "Securiton" } - case 421: - { /* '421' */ - return "METZ CONNECT GmbH" + case 31: { /* '31' */ + return "Tokimec Inc." } - case 422: - { /* '422' */ - return "Greentrol Automation, Inc" + case 310: { /* '310' */ + return "OSlsoft, Inc." } - case 423: - { /* '423' */ - return "BELIMO Automation AG" + case 311: { /* '311' */ + return "Hanazeder Electronic GmbH" } - case 424: - { /* '424' */ - return "Samsung Heavy Industries Co, Ltd" + case 312: { /* '312' */ + return "Honeywell Security Deutschland, Novar GmbH" } - case 425: - { /* '425' */ - return "Triacta Power Technologies, Inc." + case 313: { /* '313' */ + return "Siemens Industry, Inc." } - case 426: - { /* '426' */ - return "Globestar Systems" + case 314: { /* '314' */ + return "ETM Professional Control GmbH" } - case 427: - { /* '427' */ - return "MLB Advanced Media, LP" + case 315: { /* '315' */ + return "Meitav-tec, Ltd." } - case 428: - { /* '428' */ - return "SWG Stuckmann Wirtschaftliche Gebäudesysteme GmbH" + case 316: { /* '316' */ + return "Janitza Electronics GmbH" } - case 429: - { /* '429' */ - return "SensorSwitch" + case 317: { /* '317' */ + return "MKS Nordhausen" } - case 43: - { /* '43' */ - return "Micropower Manufacturing" + case 318: { /* '318' */ + return "De Gier Drive Systems B.V." } - case 430: - { /* '430' */ - return "Multitek Power Limited" + case 319: { /* '319' */ + return "Cypress Envirosystems" } - case 431: - { /* '431' */ - return "Aquametro AG" + case 32: { /* '32' */ + return "Simplex" } - case 432: - { /* '432' */ - return "LG Electronics Inc." + case 320: { /* '320' */ + return "SMARTron s.r.o." } - case 433: - { /* '433' */ - return "Electronic Theatre Controls, Inc." + case 321: { /* '321' */ + return "Verari Systems, Inc." } - case 434: - { /* '434' */ - return "Mitsubishi Electric Corporation Nagoya Works" + case 322: { /* '322' */ + return "K-W Electronic Service, Inc." } - case 435: - { /* '435' */ - return "Delta Electronics, Inc." + case 323: { /* '323' */ + return "ALFA-SMART Energy Management" } - case 436: - { /* '436' */ - return "Elma Kurtalj, Ltd." + case 324: { /* '324' */ + return "Telkonet, Inc." } - case 437: - { /* '437' */ - return "Tyco Fire & Security GmbH" + case 325: { /* '325' */ + return "Securiton GmbH" } - case 438: - { /* '438' */ - return "Nedap Security Management" + case 326: { /* '326' */ + return "Cemtrex, Inc." } - case 439: - { /* '439' */ - return "ESC Automation Inc." + case 327: { /* '327' */ + return "Performance Technologies, Inc." } - case 44: - { /* '44' */ - return "Matrix Controls" + case 328: { /* '328' */ + return "Xtralis (Aust) Pty Ltd" } - case 440: - { /* '440' */ - return "DSP4YOU Ltd." + case 329: { /* '329' */ + return "TROX GmbH" } - case 441: - { /* '441' */ - return "GE Sensing and Inspection Technologies" + case 33: { /* '33' */ + return "North Building Technologies Limited" } - case 442: - { /* '442' */ - return "Embedded Systems SIA" + case 330: { /* '330' */ + return "Beijing Hysine Technology Co., Ltd" } - case 443: - { /* '443' */ - return "BEFEGA GmbH" + case 331: { /* '331' */ + return "RCK Controls, Inc." } - case 444: - { /* '444' */ - return "Baseline Inc." + case 332: { /* '332' */ + return "Distech Controls SAS" } - case 445: - { /* '445' */ - return "Key2Act" + case 333: { /* '333' */ + return "Novar/Honeywell" } - case 446: - { /* '446' */ - return "OEMCtrl" + case 334: { /* '334' */ + return "The S4 Group, Inc." } - case 447: - { /* '447' */ - return "Clarkson Controls Limited" + case 335: { /* '335' */ + return "Schneider Electric" } - case 448: - { /* '448' */ - return "Rogerwell Control System Limited" + case 336: { /* '336' */ + return "LHA Systems" } - case 449: - { /* '449' */ - return "SCL Elements" + case 337: { /* '337' */ + return "GHM engineering Group, Inc." } - case 45: - { /* '45' */ - return "METALAIRE" + case 338: { /* '338' */ + return "Cllimalux S.A." } - case 450: - { /* '450' */ - return "Hitachi Ltd." + case 339: { /* '339' */ + return "VAISALA Oyj" } - case 451: - { /* '451' */ - return "Newron System SA" + case 34: { /* '34' */ + return "Notifier" } - case 452: - { /* '452' */ - return "BEVECO Gebouwautomatisering BV" + case 340: { /* '340' */ + return "COMPLEX (Beijing) Technology, Co., LTD." } - case 453: - { /* '453' */ - return "Streamside Solutions" + case 341: { /* '341' */ + return "SCADAmetrics" } - case 454: - { /* '454' */ - return "Yellowstone Soft" + case 342: { /* '342' */ + return "POWERPEG NSI Limited" } - case 455: - { /* '455' */ - return "Oztech Intelligent Systems Pty Ltd." + case 343: { /* '343' */ + return "BACnet Interoperability Testing Services, Inc." } - case 456: - { /* '456' */ - return "Novelan GmbH" + case 344: { /* '344' */ + return "Teco a.s." } - case 457: - { /* '457' */ - return "Flexim Americas Corporation" + case 345: { /* '345' */ + return "Plexus Technology, Inc." } - case 458: - { /* '458' */ - return "ICP DAS Co., Ltd." + case 346: { /* '346' */ + return "Energy Focus, Inc." } - case 459: - { /* '459' */ - return "CARMA Industries Inc." + case 347: { /* '347' */ + return "Powersmiths International Corp." } - case 46: - { /* '46' */ - return "ESS Engineering" + case 348: { /* '348' */ + return "Nichibei Co., Ltd." } - case 460: - { /* '460' */ - return "Log-One Ltd." + case 349: { /* '349' */ + return "HKC Technology Ltd." } - case 461: - { /* '461' */ - return "TECO Electric & Machinery Co., Ltd." + case 35: { /* '35' */ + return "Reliable Controls Corporation" } - case 462: - { /* '462' */ - return "ConnectEx, Inc." + case 350: { /* '350' */ + return "Ovation Networks, Inc." } - case 463: - { /* '463' */ - return "Turbo DDC Südwest" + case 351: { /* '351' */ + return "Setra Systems" } - case 464: - { /* '464' */ - return "Quatrosense Environmental Ltd." + case 352: { /* '352' */ + return "AVG Automation" } - case 465: - { /* '465' */ - return "Fifth Light Technology Ltd." + case 353: { /* '353' */ + return "ZXC Ltd." } - case 466: - { /* '466' */ - return "Scientific Solutions, Ltd." + case 354: { /* '354' */ + return "Byte Sphere" } - case 467: - { /* '467' */ - return "Controller Area Network Solutions (M) Sdn Bhd" + case 355: { /* '355' */ + return "Generiton Co., Ltd." } - case 468: - { /* '468' */ - return "RESOL – Elektronische Regelungen GmbH" + case 356: { /* '356' */ + return "Holter Regelarmaturen GmbH & Co. KG" } - case 469: - { /* '469' */ - return "RPBUS LLC" + case 357: { /* '357' */ + return "Bedford Instruments, LLC" } - case 47: - { /* '47' */ - return "Sphere Systems Pty Ltd." + case 358: { /* '358' */ + return "Standair Inc." } - case 470: - { /* '470' */ - return "BRS Sistemas Eletronicos" + case 359: { /* '359' */ + return "WEG Automation – R&D" } - case 471: - { /* '471' */ - return "WindowMaster A/S" + case 36: { /* '36' */ + return "Tridium Inc." } - case 472: - { /* '472' */ - return "Sunlux Technologies Ltd." + case 360: { /* '360' */ + return "Prolon Control Systems ApS" } - case 473: - { /* '473' */ - return "Measurlogic" + case 361: { /* '361' */ + return "Inneasoft" } - case 474: - { /* '474' */ - return "Frimat GmbH" + case 362: { /* '362' */ + return "ConneXSoft GmbH" } - case 475: - { /* '475' */ - return "Spirax Sarco" + case 363: { /* '363' */ + return "CEAG Notlichtsysteme GmbH" } - case 476: - { /* '476' */ - return "Luxtron" + case 364: { /* '364' */ + return "Distech Controls Inc." } - case 477: - { /* '477' */ - return "Raypak Inc" + case 365: { /* '365' */ + return "Industrial Technology Research Institute" } - case 478: - { /* '478' */ - return "Air Monitor Corporation" + case 366: { /* '366' */ + return "ICONICS, Inc." } - case 479: - { /* '479' */ - return "Regler Och Webbteknik Sverige (ROWS)" + case 367: { /* '367' */ + return "IQ Controls s.c." } - case 48: - { /* '48' */ - return "Walker Technologies Corporation" + case 368: { /* '368' */ + return "OJ Electronics A/S" } - case 480: - { /* '480' */ - return "Intelligent Lighting Controls Inc." + case 369: { /* '369' */ + return "Rolbit Ltd." } - case 481: - { /* '481' */ - return "Sanyo Electric Industry Co., Ltd" + case 37: { /* '37' */ + return "MSA Safety" } - case 482: - { /* '482' */ - return "E-Mon Energy Monitoring Products" + case 370: { /* '370' */ + return "Synapsys Solutions Ltd." } - case 483: - { /* '483' */ - return "Digital Control Systems" + case 371: { /* '371' */ + return "ACME Engineering Prod. Ltd." } - case 484: - { /* '484' */ - return "ATI Airtest Technologies, Inc." + case 372: { /* '372' */ + return "Zener Electric Pty, Ltd." } - case 485: - { /* '485' */ - return "SCS SA" + case 373: { /* '373' */ + return "Selectronix, Inc." } - case 486: - { /* '486' */ - return "HMS Industrial Networks AB" + case 374: { /* '374' */ + return "Gorbet & Banerjee, LLC." } - case 487: - { /* '487' */ - return "Shenzhen Universal Intellisys Co Ltd" + case 375: { /* '375' */ + return "IME" } - case 488: - { /* '488' */ - return "EK Intellisys Sdn Bhd" + case 376: { /* '376' */ + return "Stephen H. Dawson Computer Service" } - case 489: - { /* '489' */ - return "SysCom" + case 377: { /* '377' */ + return "Accutrol, LLC" } - case 49: - { /* '49' */ - return "H I Solutions, Inc." + case 378: { /* '378' */ + return "Schneider Elektronik GmbH" } - case 490: - { /* '490' */ - return "Firecom, Inc." + case 379: { /* '379' */ + return "Alpha-Inno Tec GmbH" } - case 491: - { /* '491' */ - return "ESA Elektroschaltanlagen Grimma GmbH" + case 38: { /* '38' */ + return "Silicon Energy" } - case 492: - { /* '492' */ - return "Kumahira Co Ltd" + case 380: { /* '380' */ + return "ADMMicro, Inc." } - case 493: - { /* '493' */ - return "Hotraco" + case 381: { /* '381' */ + return "Greystone Energy Systems, Inc." } - case 494: - { /* '494' */ - return "SABO Elektronik GmbH" + case 382: { /* '382' */ + return "CAP Technologie" } - case 495: - { /* '495' */ - return "Equip’Trans" + case 383: { /* '383' */ + return "KeRo Systems" } - case 496: - { /* '496' */ - return "Temperature Control Specialities Co., Inc (TCS)" + case 384: { /* '384' */ + return "Domat Control System s.r.o." } - case 497: - { /* '497' */ - return "FlowCon International A/S" + case 385: { /* '385' */ + return "Efektronics Pty. Ltd." } - case 498: - { /* '498' */ - return "ThyssenKrupp Elevator Americas" + case 386: { /* '386' */ + return "Hekatron Vertriebs GmbH" } - case 499: - { /* '499' */ - return "Abatement Technologies" + case 387: { /* '387' */ + return "Securiton AG" } - case 5: - { /* '5' */ - return "Johnson Controls, Inc." + case 388: { /* '388' */ + return "Carlo Gavazzi Controls SpA" } - case 50: - { /* '50' */ - return "MBS GmbH" + case 389: { /* '389' */ + return "Chipkin Automation Systems" } - case 500: - { /* '500' */ - return "Continental Control Systems, LLC" + case 39: { /* '39' */ + return "Kieback & Peter GmbH & Co KG" } - case 501: - { /* '501' */ - return "WISAG Automatisierungstechnik GmbH & Co KG" + case 390: { /* '390' */ + return "Savant Systems, LLC" } - case 502: - { /* '502' */ - return "EasyIO" + case 391: { /* '391' */ + return "Simmtronic Lighting Controls" } - case 503: - { /* '503' */ - return "EAP-Electric GmbH" + case 392: { /* '392' */ + return "Abelko Innovation AB" } - case 504: - { /* '504' */ - return "Hardmeier" + case 393: { /* '393' */ + return "Seresco Technologies Inc." } - case 505: - { /* '505' */ - return "Mircom Group of Companies" + case 394: { /* '394' */ + return "IT Watchdogs" } - case 506: - { /* '506' */ - return "Quest Controls" + case 395: { /* '395' */ + return "Automation Assist Japan Corp." } - case 507: - { /* '507' */ - return "Mestek, Inc" + case 396: { /* '396' */ + return "Thermokon Sensortechnik GmbH" } - case 508: - { /* '508' */ - return "Pulse Energy" + case 397: { /* '397' */ + return "EGauge Systems, LLC" } - case 509: - { /* '509' */ - return "Tachikawa Corporation" + case 398: { /* '398' */ + return "Quantum Automation (ASIA) PTE, Ltd." } - case 51: - { /* '51' */ - return "SAMSON AG" + case 399: { /* '399' */ + return "Toshiba Lighting & Technology Corp." } - case 510: - { /* '510' */ - return "University of Nebraska-Lincoln" + case 4: { /* '4' */ + return "PolarSoft" } - case 511: - { /* '511' */ - return "Redwood Systems" + case 40: { /* '40' */ + return "Anacon Systems, Inc." } - case 512: - { /* '512' */ - return "PASStec Industrie-Elektronik GmbH" + case 400: { /* '400' */ + return "SPIN Engenharia de Automação Ltda." } - case 513: - { /* '513' */ - return "NgEK, Inc." + case 401: { /* '401' */ + return "Logistics Systems & Software Services India PVT. Ltd." } - case 514: - { /* '514' */ - return "t-mac Technologies" + case 402: { /* '402' */ + return "Delta Controls Integration Products" } - case 515: - { /* '515' */ - return "Jireh Energy Tech Co., Ltd." + case 403: { /* '403' */ + return "Focus Media" } - case 516: - { /* '516' */ - return "Enlighted Inc." + case 404: { /* '404' */ + return "LUMEnergi Inc." } - case 517: - { /* '517' */ - return "El-Piast Sp. Z o.o" + case 405: { /* '405' */ + return "Kara Systems" } - case 518: - { /* '518' */ - return "NetxAutomation Software GmbH" + case 406: { /* '406' */ + return "RF Code, Inc." } - case 519: - { /* '519' */ - return "Invertek Drives" + case 407: { /* '407' */ + return "Fatek Automation Corp." } - case 52: - { /* '52' */ - return "Badger Meter Inc." + case 408: { /* '408' */ + return "JANDA Software Company, LLC" } - case 520: - { /* '520' */ - return "Deutschmann Automation GmbH & Co. KG" + case 409: { /* '409' */ + return "Open System Solutions Limited" } - case 521: - { /* '521' */ - return "EMU Electronic AG" + case 41: { /* '41' */ + return "Systems Controls & Instruments, LLC" } - case 522: - { /* '522' */ - return "Phaedrus Limited" + case 410: { /* '410' */ + return "Intelec Systems PTY Ltd." } - case 523: - { /* '523' */ - return "Sigmatek GmbH & Co KG" + case 411: { /* '411' */ + return "Ecolodgix, LLC" } - case 524: - { /* '524' */ - return "Marlin Controls" + case 412: { /* '412' */ + return "Douglas Lighting Controls" } - case 525: - { /* '525' */ - return "Circutor, SA" + case 413: { /* '413' */ + return "iSAtech GmbH" } - case 526: - { /* '526' */ - return "UTC Fire & Security" + case 414: { /* '414' */ + return "AREAL" } - case 527: - { /* '527' */ - return "DENT Instruments, Inc." + case 415: { /* '415' */ + return "Beckhoff Automation" } - case 528: - { /* '528' */ - return "FHP Manufacturing Company – Bosch Group" + case 416: { /* '416' */ + return "IPAS GmbH" } - case 529: - { /* '529' */ - return "GE Intelligent Platforms" + case 417: { /* '417' */ + return "KE2 Therm Solutions" } - case 53: - { /* '53' */ - return "DAIKIN Industries Ltd." + case 418: { /* '418' */ + return "Base2Products" } - case 530: - { /* '530' */ - return "Inner Range Pty Ltd" + case 419: { /* '419' */ + return "DTL Controls, LLC" } - case 531: - { /* '531' */ - return "GLAS Energy Technology" + case 42: { /* '42' */ + return "Acuity Brands Lighting, Inc." } - case 532: - { /* '532' */ - return "MSR-Electronic-GmbH" + case 420: { /* '420' */ + return "INNCOM International, Inc." } - case 533: - { /* '533' */ - return "Energy Control Systems, Inc." + case 421: { /* '421' */ + return "METZ CONNECT GmbH" } - case 534: - { /* '534' */ - return "EMT Controls" + case 422: { /* '422' */ + return "Greentrol Automation, Inc" } - case 535: - { /* '535' */ - return "Daintree" + case 423: { /* '423' */ + return "BELIMO Automation AG" } - case 536: - { /* '536' */ - return "EURO ICC d.o.o" + case 424: { /* '424' */ + return "Samsung Heavy Industries Co, Ltd" } - case 537: - { /* '537' */ - return "TE Connectivity Energy" + case 425: { /* '425' */ + return "Triacta Power Technologies, Inc." } - case 538: - { /* '538' */ - return "GEZE GmbH" + case 426: { /* '426' */ + return "Globestar Systems" } - case 539: - { /* '539' */ - return "NEC Corporation" + case 427: { /* '427' */ + return "MLB Advanced Media, LP" } - case 54: - { /* '54' */ - return "NARA Controls Inc." + case 428: { /* '428' */ + return "SWG Stuckmann Wirtschaftliche Gebäudesysteme GmbH" } - case 540: - { /* '540' */ - return "Ho Cheung International Company Limited" + case 429: { /* '429' */ + return "SensorSwitch" } - case 541: - { /* '541' */ - return "Sharp Manufacturing Systems Corporation" + case 43: { /* '43' */ + return "Micropower Manufacturing" } - case 542: - { /* '542' */ - return "DOT CONTROLS a.s." + case 430: { /* '430' */ + return "Multitek Power Limited" } - case 543: - { /* '543' */ - return "BeaconMedæs" + case 431: { /* '431' */ + return "Aquametro AG" } - case 544: - { /* '544' */ - return "Midea Commercial Aircon" + case 432: { /* '432' */ + return "LG Electronics Inc." } - case 545: - { /* '545' */ - return "WattMaster Controls" + case 433: { /* '433' */ + return "Electronic Theatre Controls, Inc." } - case 546: - { /* '546' */ - return "Kamstrup A/S" + case 434: { /* '434' */ + return "Mitsubishi Electric Corporation Nagoya Works" } - case 547: - { /* '547' */ - return "CA Computer Automation GmbH" + case 435: { /* '435' */ + return "Delta Electronics, Inc." } - case 548: - { /* '548' */ - return "Laars Heating Systems Company" + case 436: { /* '436' */ + return "Elma Kurtalj, Ltd." } - case 549: - { /* '549' */ - return "Hitachi Systems, Ltd." + case 437: { /* '437' */ + return "Tyco Fire & Security GmbH" } - case 55: - { /* '55' */ - return "Mammoth Inc." + case 438: { /* '438' */ + return "Nedap Security Management" } - case 550: - { /* '550' */ - return "Fushan AKE Electronic Engineering Co., Ltd." + case 439: { /* '439' */ + return "ESC Automation Inc." } - case 551: - { /* '551' */ - return "Toshiba International Corporation" + case 44: { /* '44' */ + return "Matrix Controls" } - case 552: - { /* '552' */ - return "Starman Systems, LLC" + case 440: { /* '440' */ + return "DSP4YOU Ltd." } - case 553: - { /* '553' */ - return "Samsung Techwin Co., Ltd." + case 441: { /* '441' */ + return "GE Sensing and Inspection Technologies" } - case 554: - { /* '554' */ - return "ISAS-Integrated Switchgear and Systems P/L" + case 442: { /* '442' */ + return "Embedded Systems SIA" } - case 556: - { /* '556' */ - return "Obvius" + case 443: { /* '443' */ + return "BEFEGA GmbH" } - case 557: - { /* '557' */ - return "Marek Guzik" + case 444: { /* '444' */ + return "Baseline Inc." } - case 558: - { /* '558' */ - return "Vortek Instruments, LLC" + case 445: { /* '445' */ + return "Key2Act" } - case 559: - { /* '559' */ - return "Universal Lighting Technologies" + case 446: { /* '446' */ + return "OEMCtrl" } - case 56: - { /* '56' */ - return "Liebert Corporation" + case 447: { /* '447' */ + return "Clarkson Controls Limited" } - case 560: - { /* '560' */ - return "Myers Power Products, Inc." + case 448: { /* '448' */ + return "Rogerwell Control System Limited" } - case 561: - { /* '561' */ - return "Vector Controls GmbH" + case 449: { /* '449' */ + return "SCL Elements" } - case 562: - { /* '562' */ - return "Crestron Electronics, Inc." + case 45: { /* '45' */ + return "METALAIRE" } - case 563: - { /* '563' */ - return "A&E Controls Limited" + case 450: { /* '450' */ + return "Hitachi Ltd." } - case 564: - { /* '564' */ - return "Projektomontaza A.D." + case 451: { /* '451' */ + return "Newron System SA" } - case 565: - { /* '565' */ - return "Freeaire Refrigeration" + case 452: { /* '452' */ + return "BEVECO Gebouwautomatisering BV" } - case 566: - { /* '566' */ - return "Aqua Cooler Pty Limited" + case 453: { /* '453' */ + return "Streamside Solutions" } - case 567: - { /* '567' */ - return "Basic Controls" + case 454: { /* '454' */ + return "Yellowstone Soft" } - case 568: - { /* '568' */ - return "GE Measurement and Control Solutions Advanced Sensors" + case 455: { /* '455' */ + return "Oztech Intelligent Systems Pty Ltd." } - case 569: - { /* '569' */ - return "EQUAL Networks" + case 456: { /* '456' */ + return "Novelan GmbH" } - case 57: - { /* '57' */ - return "SEMCO Incorporated" + case 457: { /* '457' */ + return "Flexim Americas Corporation" } - case 570: - { /* '570' */ - return "Millennial Net" + case 458: { /* '458' */ + return "ICP DAS Co., Ltd." } - case 571: - { /* '571' */ - return "APLI Ltd" + case 459: { /* '459' */ + return "CARMA Industries Inc." } - case 572: - { /* '572' */ - return "Electro Industries/GaugeTech" + case 46: { /* '46' */ + return "ESS Engineering" } - case 573: - { /* '573' */ - return "SangMyung University" + case 460: { /* '460' */ + return "Log-One Ltd." } - case 574: - { /* '574' */ - return "Coppertree Analytics, Inc." + case 461: { /* '461' */ + return "TECO Electric & Machinery Co., Ltd." } - case 575: - { /* '575' */ - return "CoreNetiX GmbH" + case 462: { /* '462' */ + return "ConnectEx, Inc." } - case 576: - { /* '576' */ - return "Acutherm" + case 463: { /* '463' */ + return "Turbo DDC Südwest" } - case 577: - { /* '577' */ - return "Dr. Riedel Automatisierungstechnik GmbH" + case 464: { /* '464' */ + return "Quatrosense Environmental Ltd." } - case 578: - { /* '578' */ - return "Shina System Co., Ltd" + case 465: { /* '465' */ + return "Fifth Light Technology Ltd." } - case 579: - { /* '579' */ - return "Iqapertus" + case 466: { /* '466' */ + return "Scientific Solutions, Ltd." } - case 58: - { /* '58' */ - return "Air Monitor Corporation" + case 467: { /* '467' */ + return "Controller Area Network Solutions (M) Sdn Bhd" } - case 580: - { /* '580' */ - return "PSE Technology" + case 468: { /* '468' */ + return "RESOL – Elektronische Regelungen GmbH" } - case 581: - { /* '581' */ - return "BA Systems" + case 469: { /* '469' */ + return "RPBUS LLC" } - case 582: - { /* '582' */ - return "BTICINO" + case 47: { /* '47' */ + return "Sphere Systems Pty Ltd." } - case 583: - { /* '583' */ - return "Monico, Inc." + case 470: { /* '470' */ + return "BRS Sistemas Eletronicos" } - case 584: - { /* '584' */ - return "iCue" + case 471: { /* '471' */ + return "WindowMaster A/S" } - case 585: - { /* '585' */ - return "tekmar Control Systems Ltd." + case 472: { /* '472' */ + return "Sunlux Technologies Ltd." } - case 586: - { /* '586' */ - return "Control Technology Corporation" + case 473: { /* '473' */ + return "Measurlogic" } - case 587: - { /* '587' */ - return "GFAE GmbH" + case 474: { /* '474' */ + return "Frimat GmbH" } - case 588: - { /* '588' */ - return "BeKa Software GmbH" + case 475: { /* '475' */ + return "Spirax Sarco" } - case 589: - { /* '589' */ - return "Isoil Industria SpA" + case 476: { /* '476' */ + return "Luxtron" } - case 59: - { /* '59' */ - return "TRIATEK, LLC" + case 477: { /* '477' */ + return "Raypak Inc" } - case 590: - { /* '590' */ - return "Home Systems Consulting SpA" + case 478: { /* '478' */ + return "Air Monitor Corporation" } - case 591: - { /* '591' */ - return "Socomec" + case 479: { /* '479' */ + return "Regler Och Webbteknik Sverige (ROWS)" } - case 592: - { /* '592' */ - return "Everex Communications, Inc." + case 48: { /* '48' */ + return "Walker Technologies Corporation" } - case 593: - { /* '593' */ - return "Ceiec Electric Technology" + case 480: { /* '480' */ + return "Intelligent Lighting Controls Inc." } - case 594: - { /* '594' */ - return "Atrila GmbH" + case 481: { /* '481' */ + return "Sanyo Electric Industry Co., Ltd" } - case 595: - { /* '595' */ - return "WingTechs" + case 482: { /* '482' */ + return "E-Mon Energy Monitoring Products" } - case 596: - { /* '596' */ - return "Shenzhen Mek Intellisys Pte Ltd." + case 483: { /* '483' */ + return "Digital Control Systems" } - case 597: - { /* '597' */ - return "Nestfield Co., Ltd." + case 484: { /* '484' */ + return "ATI Airtest Technologies, Inc." } - case 598: - { /* '598' */ - return "Swissphone Telecom AG" + case 485: { /* '485' */ + return "SCS SA" } - case 599: - { /* '599' */ - return "PNTECH JSC" + case 486: { /* '486' */ + return "HMS Industrial Networks AB" } - case 6: - { /* '6' */ - return "ABB (Formerly American Auto-Matrix)" + case 487: { /* '487' */ + return "Shenzhen Universal Intellisys Co Ltd" } - case 60: - { /* '60' */ - return "NexLight" + case 488: { /* '488' */ + return "EK Intellisys Sdn Bhd" } - case 600: - { /* '600' */ - return "Horner APG, LLC" + case 489: { /* '489' */ + return "SysCom" } - case 601: - { /* '601' */ - return "PVI Industries, LLC" + case 49: { /* '49' */ + return "H I Solutions, Inc." } - case 602: - { /* '602' */ - return "Ela-compil" + case 490: { /* '490' */ + return "Firecom, Inc." } - case 603: - { /* '603' */ - return "Pegasus Automation International LLC" + case 491: { /* '491' */ + return "ESA Elektroschaltanlagen Grimma GmbH" } - case 604: - { /* '604' */ - return "Wight Electronic Services Ltd." + case 492: { /* '492' */ + return "Kumahira Co Ltd" } - case 605: - { /* '605' */ - return "Marcom" + case 493: { /* '493' */ + return "Hotraco" } - case 606: - { /* '606' */ - return "Exhausto A/S" + case 494: { /* '494' */ + return "SABO Elektronik GmbH" } - case 607: - { /* '607' */ - return "Dwyer Instruments, Inc." + case 495: { /* '495' */ + return "Equip’Trans" } - case 608: - { /* '608' */ - return "Link GmbH" + case 496: { /* '496' */ + return "Temperature Control Specialities Co., Inc (TCS)" } - case 609: - { /* '609' */ - return "Oppermann Regelgerate GmbH" + case 497: { /* '497' */ + return "FlowCon International A/S" } - case 61: - { /* '61' */ - return "Multistack" + case 498: { /* '498' */ + return "ThyssenKrupp Elevator Americas" } - case 610: - { /* '610' */ - return "NuAire, Inc." + case 499: { /* '499' */ + return "Abatement Technologies" } - case 611: - { /* '611' */ - return "Nortec Humidity, Inc." + case 5: { /* '5' */ + return "Johnson Controls, Inc." } - case 612: - { /* '612' */ - return "Bigwood Systems, Inc." + case 50: { /* '50' */ + return "MBS GmbH" } - case 613: - { /* '613' */ - return "Enbala Power Networks" + case 500: { /* '500' */ + return "Continental Control Systems, LLC" } - case 614: - { /* '614' */ - return "Inter Energy Co., Ltd." + case 501: { /* '501' */ + return "WISAG Automatisierungstechnik GmbH & Co KG" } - case 615: - { /* '615' */ - return "ETC" + case 502: { /* '502' */ + return "EasyIO" } - case 616: - { /* '616' */ - return "COMELEC S.A.R.L" + case 503: { /* '503' */ + return "EAP-Electric GmbH" } - case 617: - { /* '617' */ - return "Pythia Technologies" + case 504: { /* '504' */ + return "Hardmeier" } - case 618: - { /* '618' */ - return "TrendPoint Systems, Inc." + case 505: { /* '505' */ + return "Mircom Group of Companies" } - case 619: - { /* '619' */ - return "AWEX" + case 506: { /* '506' */ + return "Quest Controls" } - case 62: - { /* '62' */ - return "TSI Incorporated" + case 507: { /* '507' */ + return "Mestek, Inc" } - case 620: - { /* '620' */ - return "Eurevia" + case 508: { /* '508' */ + return "Pulse Energy" } - case 621: - { /* '621' */ - return "Kongsberg E-lon AS" + case 509: { /* '509' */ + return "Tachikawa Corporation" } - case 622: - { /* '622' */ - return "FlaktWoods" + case 51: { /* '51' */ + return "SAMSON AG" } - case 623: - { /* '623' */ - return "E + E Elektronik GES M.B.H." + case 510: { /* '510' */ + return "University of Nebraska-Lincoln" } - case 624: - { /* '624' */ - return "ARC Informatique" + case 511: { /* '511' */ + return "Redwood Systems" } - case 625: - { /* '625' */ - return "SKIDATA AG" + case 512: { /* '512' */ + return "PASStec Industrie-Elektronik GmbH" } - case 626: - { /* '626' */ - return "WSW Solutions" + case 513: { /* '513' */ + return "NgEK, Inc." } - case 627: - { /* '627' */ - return "Trefon Electronic GmbH" + case 514: { /* '514' */ + return "t-mac Technologies" } - case 628: - { /* '628' */ - return "Dongseo System" + case 515: { /* '515' */ + return "Jireh Energy Tech Co., Ltd." } - case 629: - { /* '629' */ - return "Kanontec Intelligence Technology Co., Ltd." + case 516: { /* '516' */ + return "Enlighted Inc." } - case 63: - { /* '63' */ - return "Weather-Rite, Inc." + case 517: { /* '517' */ + return "El-Piast Sp. Z o.o" } - case 630: - { /* '630' */ - return "EVCO S.p.A." + case 518: { /* '518' */ + return "NetxAutomation Software GmbH" } - case 631: - { /* '631' */ - return "Accuenergy (Canada) Inc." + case 519: { /* '519' */ + return "Invertek Drives" } - case 632: - { /* '632' */ - return "SoftDEL" + case 52: { /* '52' */ + return "Badger Meter Inc." } - case 633: - { /* '633' */ - return "Orion Energy Systems, Inc." + case 520: { /* '520' */ + return "Deutschmann Automation GmbH & Co. KG" } - case 634: - { /* '634' */ - return "Roboticsware" + case 521: { /* '521' */ + return "EMU Electronic AG" } - case 635: - { /* '635' */ - return "DOMIQ Sp. z o.o." + case 522: { /* '522' */ + return "Phaedrus Limited" } - case 636: - { /* '636' */ - return "Solidyne" + case 523: { /* '523' */ + return "Sigmatek GmbH & Co KG" } - case 637: - { /* '637' */ - return "Elecsys Corporation" + case 524: { /* '524' */ + return "Marlin Controls" } - case 638: - { /* '638' */ - return "Conditionaire International Pty. Limited" + case 525: { /* '525' */ + return "Circutor, SA" } - case 639: - { /* '639' */ - return "Quebec, Inc." + case 526: { /* '526' */ + return "UTC Fire & Security" } - case 64: - { /* '64' */ - return "Dunham-Bush" + case 527: { /* '527' */ + return "DENT Instruments, Inc." } - case 640: - { /* '640' */ - return "Homerun Holdings" + case 528: { /* '528' */ + return "FHP Manufacturing Company – Bosch Group" } - case 641: - { /* '641' */ - return "Murata Americas" + case 529: { /* '529' */ + return "GE Intelligent Platforms" } - case 642: - { /* '642' */ - return "Comptek" + case 53: { /* '53' */ + return "DAIKIN Industries Ltd." } - case 643: - { /* '643' */ - return "Westco Systems, Inc." + case 530: { /* '530' */ + return "Inner Range Pty Ltd" } - case 644: - { /* '644' */ - return "Advancis Software & Services GmbH" + case 531: { /* '531' */ + return "GLAS Energy Technology" } - case 645: - { /* '645' */ - return "Intergrid, LLC" + case 532: { /* '532' */ + return "MSR-Electronic-GmbH" } - case 646: - { /* '646' */ - return "Markerr Controls, Inc." + case 533: { /* '533' */ + return "Energy Control Systems, Inc." } - case 647: - { /* '647' */ - return "Toshiba Elevator and Building Systems Corporation" + case 534: { /* '534' */ + return "EMT Controls" } - case 648: - { /* '648' */ - return "Spectrum Controls, Inc." + case 535: { /* '535' */ + return "Daintree" } - case 649: - { /* '649' */ - return "Mkservice" + case 536: { /* '536' */ + return "EURO ICC d.o.o" } - case 65: - { /* '65' */ - return "Reliance Electric" + case 537: { /* '537' */ + return "TE Connectivity Energy" } - case 650: - { /* '650' */ - return "Fox Thermal Instruments" + case 538: { /* '538' */ + return "GEZE GmbH" } - case 651: - { /* '651' */ - return "SyxthSense Ltd" + case 539: { /* '539' */ + return "NEC Corporation" } - case 652: - { /* '652' */ - return "DUHA System S R.O." + case 54: { /* '54' */ + return "NARA Controls Inc." } - case 653: - { /* '653' */ - return "NIBE" + case 540: { /* '540' */ + return "Ho Cheung International Company Limited" } - case 654: - { /* '654' */ - return "Melink Corporation" + case 541: { /* '541' */ + return "Sharp Manufacturing Systems Corporation" } - case 655: - { /* '655' */ - return "Fritz-Haber-Institut" + case 542: { /* '542' */ + return "DOT CONTROLS a.s." } - case 656: - { /* '656' */ - return "MTU Onsite Energy GmbH, Gas Power Systems" + case 543: { /* '543' */ + return "BeaconMedæs" } - case 657: - { /* '657' */ - return "Omega Engineering, Inc." + case 544: { /* '544' */ + return "Midea Commercial Aircon" } - case 658: - { /* '658' */ - return "Avelon" + case 545: { /* '545' */ + return "WattMaster Controls" } - case 659: - { /* '659' */ - return "Ywire Technologies, Inc." + case 546: { /* '546' */ + return "Kamstrup A/S" } - case 66: - { /* '66' */ - return "LCS Inc." + case 547: { /* '547' */ + return "CA Computer Automation GmbH" } - case 660: - { /* '660' */ - return "M.R. Engineering Co., Ltd." + case 548: { /* '548' */ + return "Laars Heating Systems Company" } - case 661: - { /* '661' */ - return "Lochinvar, LLC" + case 549: { /* '549' */ + return "Hitachi Systems, Ltd." } - case 662: - { /* '662' */ - return "Sontay Limited" + case 55: { /* '55' */ + return "Mammoth Inc." } - case 663: - { /* '663' */ - return "GRUPA Slawomir Chelminski" + case 550: { /* '550' */ + return "Fushan AKE Electronic Engineering Co., Ltd." } - case 664: - { /* '664' */ - return "Arch Meter Corporation" + case 551: { /* '551' */ + return "Toshiba International Corporation" } - case 665: - { /* '665' */ - return "Senva, Inc." + case 552: { /* '552' */ + return "Starman Systems, LLC" } - case 667: - { /* '667' */ - return "FM-Tec" + case 553: { /* '553' */ + return "Samsung Techwin Co., Ltd." } - case 668: - { /* '668' */ - return "Systems Specialists, Inc." + case 554: { /* '554' */ + return "ISAS-Integrated Switchgear and Systems P/L" } - case 669: - { /* '669' */ - return "SenseAir" + case 556: { /* '556' */ + return "Obvius" } - case 67: - { /* '67' */ - return "Regulator Australia PTY Ltd." + case 557: { /* '557' */ + return "Marek Guzik" } - case 670: - { /* '670' */ - return "AB IndustrieTechnik Srl" + case 558: { /* '558' */ + return "Vortek Instruments, LLC" } - case 671: - { /* '671' */ - return "Cortland Research, LLC" + case 559: { /* '559' */ + return "Universal Lighting Technologies" } - case 672: - { /* '672' */ - return "MediaView" + case 56: { /* '56' */ + return "Liebert Corporation" } - case 673: - { /* '673' */ - return "VDA Elettronica" + case 560: { /* '560' */ + return "Myers Power Products, Inc." } - case 674: - { /* '674' */ - return "CSS, Inc." + case 561: { /* '561' */ + return "Vector Controls GmbH" } - case 675: - { /* '675' */ - return "Tek-Air Systems, Inc." + case 562: { /* '562' */ + return "Crestron Electronics, Inc." } - case 676: - { /* '676' */ - return "ICDT" + case 563: { /* '563' */ + return "A&E Controls Limited" } - case 677: - { /* '677' */ - return "The Armstrong Monitoring Corporation" + case 564: { /* '564' */ + return "Projektomontaza A.D." } - case 678: - { /* '678' */ - return "DIXELL S.r.l" + case 565: { /* '565' */ + return "Freeaire Refrigeration" } - case 679: - { /* '679' */ - return "Lead System, Inc." + case 566: { /* '566' */ + return "Aqua Cooler Pty Limited" } - case 68: - { /* '68' */ - return "Touch-Plate Lighting Controls" + case 567: { /* '567' */ + return "Basic Controls" } - case 680: - { /* '680' */ - return "ISM EuroCenter S.A." + case 568: { /* '568' */ + return "GE Measurement and Control Solutions Advanced Sensors" } - case 681: - { /* '681' */ - return "TDIS" + case 569: { /* '569' */ + return "EQUAL Networks" } - case 682: - { /* '682' */ - return "Trade FIDES" + case 57: { /* '57' */ + return "SEMCO Incorporated" } - case 683: - { /* '683' */ - return "Knürr GmbH (Emerson Network Power)" + case 570: { /* '570' */ + return "Millennial Net" } - case 684: - { /* '684' */ - return "Resource Data Management" + case 571: { /* '571' */ + return "APLI Ltd" } - case 685: - { /* '685' */ - return "Abies Technology, Inc." + case 572: { /* '572' */ + return "Electro Industries/GaugeTech" } - case 686: - { /* '686' */ - return "UAB Komfovent" + case 573: { /* '573' */ + return "SangMyung University" } - case 687: - { /* '687' */ - return "MIRAE Electrical Mfg. Co., Ltd." + case 574: { /* '574' */ + return "Coppertree Analytics, Inc." } - case 688: - { /* '688' */ - return "HunterDouglas Architectural Projects Scandinavia ApS" + case 575: { /* '575' */ + return "CoreNetiX GmbH" } - case 689: - { /* '689' */ - return "RUNPAQ Group Co., Ltd" + case 576: { /* '576' */ + return "Acutherm" } - case 69: - { /* '69' */ - return "Amann GmbH" + case 577: { /* '577' */ + return "Dr. Riedel Automatisierungstechnik GmbH" } - case 690: - { /* '690' */ - return "Unicard SA" + case 578: { /* '578' */ + return "Shina System Co., Ltd" } - case 691: - { /* '691' */ - return "IE Technologies" + case 579: { /* '579' */ + return "Iqapertus" } - case 692: - { /* '692' */ - return "Ruskin Manufacturing" + case 58: { /* '58' */ + return "Air Monitor Corporation" } - case 693: - { /* '693' */ - return "Calon Associates Limited" + case 580: { /* '580' */ + return "PSE Technology" } - case 694: - { /* '694' */ - return "Contec Co., Ltd." + case 581: { /* '581' */ + return "BA Systems" } - case 695: - { /* '695' */ - return "iT GmbH" + case 582: { /* '582' */ + return "BTICINO" } - case 696: - { /* '696' */ - return "Autani Corporation" + case 583: { /* '583' */ + return "Monico, Inc." } - case 697: - { /* '697' */ - return "Christian Fortin" + case 584: { /* '584' */ + return "iCue" } - case 698: - { /* '698' */ - return "HDL" + case 585: { /* '585' */ + return "tekmar Control Systems Ltd." } - case 699: - { /* '699' */ - return "IPID Sp. Z.O.O Limited" + case 586: { /* '586' */ + return "Control Technology Corporation" } - case 7: - { /* '7' */ - return "Siemens Schweiz AG (Formerly: Landis & Staefa Division Europe)" + case 587: { /* '587' */ + return "GFAE GmbH" } - case 70: - { /* '70' */ - return "RLE Technologies" + case 588: { /* '588' */ + return "BeKa Software GmbH" } - case 700: - { /* '700' */ - return "Fuji Electric Co., Ltd" + case 589: { /* '589' */ + return "Isoil Industria SpA" } - case 701: - { /* '701' */ - return "View, Inc." + case 59: { /* '59' */ + return "TRIATEK, LLC" } - case 702: - { /* '702' */ - return "Samsung S1 Corporation" + case 590: { /* '590' */ + return "Home Systems Consulting SpA" } - case 703: - { /* '703' */ - return "New Lift" + case 591: { /* '591' */ + return "Socomec" } - case 704: - { /* '704' */ - return "VRT Systems" + case 592: { /* '592' */ + return "Everex Communications, Inc." } - case 705: - { /* '705' */ - return "Motion Control Engineering, Inc." + case 593: { /* '593' */ + return "Ceiec Electric Technology" } - case 706: - { /* '706' */ - return "Weiss Klimatechnik GmbH" + case 594: { /* '594' */ + return "Atrila GmbH" } - case 707: - { /* '707' */ - return "Elkon" + case 595: { /* '595' */ + return "WingTechs" } - case 708: - { /* '708' */ - return "Eliwell Controls S.r.l." + case 596: { /* '596' */ + return "Shenzhen Mek Intellisys Pte Ltd." } - case 709: - { /* '709' */ - return "Japan Computer Technos Corp" + case 597: { /* '597' */ + return "Nestfield Co., Ltd." } - case 71: - { /* '71' */ - return "Cardkey Systems" + case 598: { /* '598' */ + return "Swissphone Telecom AG" } - case 710: - { /* '710' */ - return "Rational Network ehf" + case 599: { /* '599' */ + return "PNTECH JSC" } - case 711: - { /* '711' */ - return "Magnum Energy Solutions, LLC" + case 6: { /* '6' */ + return "ABB (Formerly American Auto-Matrix)" } - case 712: - { /* '712' */ - return "MelRok" + case 60: { /* '60' */ + return "NexLight" } - case 713: - { /* '713' */ - return "VAE Group" + case 600: { /* '600' */ + return "Horner APG, LLC" } - case 714: - { /* '714' */ - return "LGCNS" + case 601: { /* '601' */ + return "PVI Industries, LLC" } - case 715: - { /* '715' */ - return "Berghof Automationstechnik GmbH" + case 602: { /* '602' */ + return "Ela-compil" } - case 716: - { /* '716' */ - return "Quark Communications, Inc." + case 603: { /* '603' */ + return "Pegasus Automation International LLC" } - case 717: - { /* '717' */ - return "Sontex" + case 604: { /* '604' */ + return "Wight Electronic Services Ltd." } - case 718: - { /* '718' */ - return "mivune AG" + case 605: { /* '605' */ + return "Marcom" } - case 719: - { /* '719' */ - return "Panduit" + case 606: { /* '606' */ + return "Exhausto A/S" } - case 72: - { /* '72' */ - return "SECOM Co., Ltd." + case 607: { /* '607' */ + return "Dwyer Instruments, Inc." } - case 720: - { /* '720' */ - return "Smart Controls, LLC" + case 608: { /* '608' */ + return "Link GmbH" } - case 721: - { /* '721' */ - return "Compu-Aire, Inc." + case 609: { /* '609' */ + return "Oppermann Regelgerate GmbH" } - case 722: - { /* '722' */ - return "Sierra" + case 61: { /* '61' */ + return "Multistack" } - case 723: - { /* '723' */ - return "ProtoSense Technologies" + case 610: { /* '610' */ + return "NuAire, Inc." } - case 724: - { /* '724' */ - return "Eltrac Technologies Pvt Ltd" + case 611: { /* '611' */ + return "Nortec Humidity, Inc." } - case 725: - { /* '725' */ - return "Bektas Invisible Controls GmbH" + case 612: { /* '612' */ + return "Bigwood Systems, Inc." } - case 726: - { /* '726' */ - return "Entelec" + case 613: { /* '613' */ + return "Enbala Power Networks" } - case 727: - { /* '727' */ - return "INNEXIV" + case 614: { /* '614' */ + return "Inter Energy Co., Ltd." } - case 728: - { /* '728' */ - return "Covenant" + case 615: { /* '615' */ + return "ETC" } - case 729: - { /* '729' */ - return "Davitor AB" + case 616: { /* '616' */ + return "COMELEC S.A.R.L" } - case 73: - { /* '73' */ - return "ABB Gebäudetechnik AG Bereich NetServ" + case 617: { /* '617' */ + return "Pythia Technologies" } - case 730: - { /* '730' */ - return "TongFang Technovator" + case 618: { /* '618' */ + return "TrendPoint Systems, Inc." } - case 731: - { /* '731' */ - return "Building Robotics, Inc." + case 619: { /* '619' */ + return "AWEX" } - case 732: - { /* '732' */ - return "HSS-MSR UG" + case 62: { /* '62' */ + return "TSI Incorporated" } - case 733: - { /* '733' */ - return "FramTack LLC" + case 620: { /* '620' */ + return "Eurevia" } - case 734: - { /* '734' */ - return "B. L. Acoustics, Ltd." + case 621: { /* '621' */ + return "Kongsberg E-lon AS" } - case 735: - { /* '735' */ - return "Traxxon Rock Drills, Ltd" + case 622: { /* '622' */ + return "FlaktWoods" } - case 736: - { /* '736' */ - return "Franke" + case 623: { /* '623' */ + return "E + E Elektronik GES M.B.H." } - case 737: - { /* '737' */ - return "Wurm GmbH & Co" + case 624: { /* '624' */ + return "ARC Informatique" } - case 738: - { /* '738' */ - return "AddENERGIE" + case 625: { /* '625' */ + return "SKIDATA AG" } - case 739: - { /* '739' */ - return "Mirle Automation Corporation" + case 626: { /* '626' */ + return "WSW Solutions" } - case 74: - { /* '74' */ - return "KNX Association cvba" + case 627: { /* '627' */ + return "Trefon Electronic GmbH" } - case 740: - { /* '740' */ - return "Ibis Networks" + case 628: { /* '628' */ + return "Dongseo System" } - case 741: - { /* '741' */ - return "ID-KARTA s.r.o." + case 629: { /* '629' */ + return "Kanontec Intelligence Technology Co., Ltd." } - case 742: - { /* '742' */ - return "Anaren, Inc." + case 63: { /* '63' */ + return "Weather-Rite, Inc." } - case 743: - { /* '743' */ - return "Span, Incorporated" + case 630: { /* '630' */ + return "EVCO S.p.A." } - case 744: - { /* '744' */ - return "Bosch Thermotechnology Corp" + case 631: { /* '631' */ + return "Accuenergy (Canada) Inc." } - case 745: - { /* '745' */ - return "DRC Technology S.A." + case 632: { /* '632' */ + return "SoftDEL" } - case 746: - { /* '746' */ - return "Shanghai Energy Building Technology Co, Ltd" + case 633: { /* '633' */ + return "Orion Energy Systems, Inc." } - case 747: - { /* '747' */ - return "Fraport AG" + case 634: { /* '634' */ + return "Roboticsware" } - case 748: - { /* '748' */ - return "Flowgroup" + case 635: { /* '635' */ + return "DOMIQ Sp. z o.o." } - case 749: - { /* '749' */ - return "Skytron Energy, GmbH" + case 636: { /* '636' */ + return "Solidyne" } - case 75: - { /* '75' */ - return "Institute of Electrical Installation Engineers of Japan (IEIEJ)" + case 637: { /* '637' */ + return "Elecsys Corporation" } - case 750: - { /* '750' */ - return "ALTEL Wicha, Golda Sp. J." + case 638: { /* '638' */ + return "Conditionaire International Pty. Limited" } - case 751: - { /* '751' */ - return "Drupal" + case 639: { /* '639' */ + return "Quebec, Inc." } - case 752: - { /* '752' */ - return "Axiomatic Technology, Ltd" + case 64: { /* '64' */ + return "Dunham-Bush" } - case 753: - { /* '753' */ - return "Bohnke + Partner" + case 640: { /* '640' */ + return "Homerun Holdings" } - case 754: - { /* '754' */ - return "Function1" + case 641: { /* '641' */ + return "Murata Americas" } - case 755: - { /* '755' */ - return "Optergy Pty, Ltd" + case 642: { /* '642' */ + return "Comptek" } - case 756: - { /* '756' */ - return "LSI Virticus" + case 643: { /* '643' */ + return "Westco Systems, Inc." } - case 757: - { /* '757' */ - return "Konzeptpark GmbH" + case 644: { /* '644' */ + return "Advancis Software & Services GmbH" } - case 758: - { /* '758' */ - return "NX Lighting Controls" + case 645: { /* '645' */ + return "Intergrid, LLC" } - case 759: - { /* '759' */ - return "eCurv, Inc." + case 646: { /* '646' */ + return "Markerr Controls, Inc." } - case 76: - { /* '76' */ - return "Nohmi Bosai, Ltd." + case 647: { /* '647' */ + return "Toshiba Elevator and Building Systems Corporation" } - case 760: - { /* '760' */ - return "Agnosys GmbH" + case 648: { /* '648' */ + return "Spectrum Controls, Inc." } - case 761: - { /* '761' */ - return "Shanghai Sunfull Automation Co., LTD" + case 649: { /* '649' */ + return "Mkservice" } - case 762: - { /* '762' */ - return "Kurz Instruments, Inc." + case 65: { /* '65' */ + return "Reliance Electric" } - case 763: - { /* '763' */ - return "Cias Elettronica S.r.l." + case 650: { /* '650' */ + return "Fox Thermal Instruments" } - case 764: - { /* '764' */ - return "Multiaqua, Inc." + case 651: { /* '651' */ + return "SyxthSense Ltd" } - case 765: - { /* '765' */ - return "BlueBox" + case 652: { /* '652' */ + return "DUHA System S R.O." } - case 766: - { /* '766' */ - return "Sensidyne" + case 653: { /* '653' */ + return "NIBE" } - case 767: - { /* '767' */ - return "Viessmann Elektronik GmbH" + case 654: { /* '654' */ + return "Melink Corporation" } - case 768: - { /* '768' */ - return "ADFweb.com srl" + case 655: { /* '655' */ + return "Fritz-Haber-Institut" } - case 769: - { /* '769' */ - return "Gaylord Industries" + case 656: { /* '656' */ + return "MTU Onsite Energy GmbH, Gas Power Systems" } - case 77: - { /* '77' */ - return "Carel S.p.A." + case 657: { /* '657' */ + return "Omega Engineering, Inc." } - case 770: - { /* '770' */ - return "Majur Ltd." + case 658: { /* '658' */ + return "Avelon" } - case 771: - { /* '771' */ - return "Shanghai Huilin Technology Co., Ltd." + case 659: { /* '659' */ + return "Ywire Technologies, Inc." } - case 772: - { /* '772' */ - return "Exotronic" + case 66: { /* '66' */ + return "LCS Inc." } - case 773: - { /* '773' */ - return "SAFECONTROL s.r.o." + case 660: { /* '660' */ + return "M.R. Engineering Co., Ltd." } - case 774: - { /* '774' */ - return "Amatis" + case 661: { /* '661' */ + return "Lochinvar, LLC" } - case 775: - { /* '775' */ - return "Universal Electric Corporation" + case 662: { /* '662' */ + return "Sontay Limited" } - case 776: - { /* '776' */ - return "iBACnet" + case 663: { /* '663' */ + return "GRUPA Slawomir Chelminski" } - case 778: - { /* '778' */ - return "Smartrise Engineering, Inc." + case 664: { /* '664' */ + return "Arch Meter Corporation" } - case 779: - { /* '779' */ - return "Miratron, Inc." + case 665: { /* '665' */ + return "Senva, Inc." } - case 78: - { /* '78' */ - return "UTC Fire & Security España, S.L." + case 667: { /* '667' */ + return "FM-Tec" } - case 780: - { /* '780' */ - return "SmartEdge" + case 668: { /* '668' */ + return "Systems Specialists, Inc." } - case 781: - { /* '781' */ - return "Mitsubishi Electric Australia Pty Ltd" + case 669: { /* '669' */ + return "SenseAir" } - case 782: - { /* '782' */ - return "Triangle Research International Ptd Ltd" + case 67: { /* '67' */ + return "Regulator Australia PTY Ltd." } - case 783: - { /* '783' */ - return "Produal Oy" + case 670: { /* '670' */ + return "AB IndustrieTechnik Srl" } - case 784: - { /* '784' */ - return "Milestone Systems A/S" + case 671: { /* '671' */ + return "Cortland Research, LLC" } - case 785: - { /* '785' */ - return "Trustbridge" + case 672: { /* '672' */ + return "MediaView" } - case 786: - { /* '786' */ - return "Feedback Solutions" + case 673: { /* '673' */ + return "VDA Elettronica" } - case 787: - { /* '787' */ - return "IES" + case 674: { /* '674' */ + return "CSS, Inc." } - case 788: - { /* '788' */ - return "ABB Power Protection SA" + case 675: { /* '675' */ + return "Tek-Air Systems, Inc." } - case 789: - { /* '789' */ - return "Riptide IO" + case 676: { /* '676' */ + return "ICDT" } - case 79: - { /* '79' */ - return "Hochiki Corporation" + case 677: { /* '677' */ + return "The Armstrong Monitoring Corporation" } - case 790: - { /* '790' */ - return "Messerschmitt Systems AG" + case 678: { /* '678' */ + return "DIXELL S.r.l" } - case 791: - { /* '791' */ - return "Dezem Energy Controlling" + case 679: { /* '679' */ + return "Lead System, Inc." } - case 792: - { /* '792' */ - return "MechoSystems" + case 68: { /* '68' */ + return "Touch-Plate Lighting Controls" } - case 793: - { /* '793' */ - return "evon GmbH" + case 680: { /* '680' */ + return "ISM EuroCenter S.A." } - case 794: - { /* '794' */ - return "CS Lab GmbH" + case 681: { /* '681' */ + return "TDIS" } - case 795: - { /* '795' */ - return "8760 Enterprises, Inc." + case 682: { /* '682' */ + return "Trade FIDES" } - case 796: - { /* '796' */ - return "Touche Controls" + case 683: { /* '683' */ + return "Knürr GmbH (Emerson Network Power)" } - case 797: - { /* '797' */ - return "Ontrol Teknik Malzeme San. ve Tic. A.S." + case 684: { /* '684' */ + return "Resource Data Management" } - case 798: - { /* '798' */ - return "Uni Control System Sp. Z o.o." + case 685: { /* '685' */ + return "Abies Technology, Inc." } - case 799: - { /* '799' */ - return "Weihai Ploumeter Co., Ltd" + case 686: { /* '686' */ + return "UAB Komfovent" } - case 8: - { /* '8' */ - return "Delta Controls" + case 687: { /* '687' */ + return "MIRAE Electrical Mfg. Co., Ltd." } - case 80: - { /* '80' */ - return "Fr. Sauter AG" + case 688: { /* '688' */ + return "HunterDouglas Architectural Projects Scandinavia ApS" } - case 800: - { /* '800' */ - return "Elcom International Pvt. Ltd" + case 689: { /* '689' */ + return "RUNPAQ Group Co., Ltd" } - case 801: - { /* '801' */ - return "Signify" + case 69: { /* '69' */ + return "Amann GmbH" } - case 802: - { /* '802' */ - return "AutomationDirect" + case 690: { /* '690' */ + return "Unicard SA" } - case 803: - { /* '803' */ - return "Paragon Robotics" + case 691: { /* '691' */ + return "IE Technologies" } - case 804: - { /* '804' */ - return "SMT System & Modules Technology AG" + case 692: { /* '692' */ + return "Ruskin Manufacturing" } - case 805: - { /* '805' */ - return "Radix IoT LLC" + case 693: { /* '693' */ + return "Calon Associates Limited" } - case 806: - { /* '806' */ - return "CMR Controls Ltd" + case 694: { /* '694' */ + return "Contec Co., Ltd." } - case 807: - { /* '807' */ - return "Innovari, Inc." + case 695: { /* '695' */ + return "iT GmbH" } - case 808: - { /* '808' */ - return "ABB Control Products" + case 696: { /* '696' */ + return "Autani Corporation" } - case 809: - { /* '809' */ - return "Gesellschaft fur Gebäudeautomation mbH" + case 697: { /* '697' */ + return "Christian Fortin" } - case 81: - { /* '81' */ - return "Matsushita Electric Works, Ltd." + case 698: { /* '698' */ + return "HDL" } - case 810: - { /* '810' */ - return "RODI Systems Corp." + case 699: { /* '699' */ + return "IPID Sp. Z.O.O Limited" } - case 811: - { /* '811' */ - return "Nextek Power Systems" + case 7: { /* '7' */ + return "Siemens Schweiz AG (Formerly: Landis & Staefa Division Europe)" } - case 812: - { /* '812' */ - return "Creative Lighting" + case 70: { /* '70' */ + return "RLE Technologies" } - case 813: - { /* '813' */ - return "WaterFurnace International" + case 700: { /* '700' */ + return "Fuji Electric Co., Ltd" } - case 814: - { /* '814' */ - return "Mercury Security" + case 701: { /* '701' */ + return "View, Inc." } - case 815: - { /* '815' */ - return "Hisense (Shandong) Air-Conditioning Co., Ltd." + case 702: { /* '702' */ + return "Samsung S1 Corporation" } - case 816: - { /* '816' */ - return "Layered Solutions, Inc." + case 703: { /* '703' */ + return "New Lift" } - case 817: - { /* '817' */ - return "Leegood Automatic System, Inc." + case 704: { /* '704' */ + return "VRT Systems" } - case 818: - { /* '818' */ - return "Shanghai Restar Technology Co., Ltd." + case 705: { /* '705' */ + return "Motion Control Engineering, Inc." } - case 819: - { /* '819' */ - return "Reimann Ingenieurbüro" + case 706: { /* '706' */ + return "Weiss Klimatechnik GmbH" } - case 82: - { /* '82' */ - return "Mitsubishi Electric Corporation, Inazawa Works" + case 707: { /* '707' */ + return "Elkon" } - case 820: - { /* '820' */ - return "LynTec" + case 708: { /* '708' */ + return "Eliwell Controls S.r.l." } - case 821: - { /* '821' */ - return "HTP" + case 709: { /* '709' */ + return "Japan Computer Technos Corp" } - case 822: - { /* '822' */ - return "Elkor Technologies, Inc." + case 71: { /* '71' */ + return "Cardkey Systems" } - case 823: - { /* '823' */ - return "Bentrol Pty Ltd" + case 710: { /* '710' */ + return "Rational Network ehf" } - case 824: - { /* '824' */ - return "Team-Control Oy" + case 711: { /* '711' */ + return "Magnum Energy Solutions, LLC" } - case 825: - { /* '825' */ - return "NextDevice, LLC" + case 712: { /* '712' */ + return "MelRok" } - case 826: - { /* '826' */ - return "iSMA CONTROLLI S.p.a." + case 713: { /* '713' */ + return "VAE Group" } - case 827: - { /* '827' */ - return "King I Electronics Co., Ltd" + case 714: { /* '714' */ + return "LGCNS" } - case 828: - { /* '828' */ - return "SAMDAV" + case 715: { /* '715' */ + return "Berghof Automationstechnik GmbH" } - case 829: - { /* '829' */ - return "Next Gen Industries Pvt. Ltd." + case 716: { /* '716' */ + return "Quark Communications, Inc." } - case 83: - { /* '83' */ - return "Mitsubishi Heavy Industries, Ltd." + case 717: { /* '717' */ + return "Sontex" } - case 830: - { /* '830' */ - return "Entic LLC" + case 718: { /* '718' */ + return "mivune AG" } - case 831: - { /* '831' */ - return "ETAP" + case 719: { /* '719' */ + return "Panduit" } - case 832: - { /* '832' */ - return "Moralle Electronics Limited" + case 72: { /* '72' */ + return "SECOM Co., Ltd." } - case 833: - { /* '833' */ - return "Leicom AG" + case 720: { /* '720' */ + return "Smart Controls, LLC" } - case 834: - { /* '834' */ - return "Watts Regulator Company" + case 721: { /* '721' */ + return "Compu-Aire, Inc." } - case 835: - { /* '835' */ - return "S.C. Orbtronics S.R.L." + case 722: { /* '722' */ + return "Sierra" } - case 836: - { /* '836' */ - return "Gaussan Technologies" + case 723: { /* '723' */ + return "ProtoSense Technologies" } - case 837: - { /* '837' */ - return "WEBfactory GmbH" + case 724: { /* '724' */ + return "Eltrac Technologies Pvt Ltd" } - case 838: - { /* '838' */ - return "Ocean Controls" + case 725: { /* '725' */ + return "Bektas Invisible Controls GmbH" } - case 839: - { /* '839' */ - return "Messana Air-Ray Conditioning s.r.l." + case 726: { /* '726' */ + return "Entelec" } - case 84: - { /* '84' */ - return "Xylem, Inc." + case 727: { /* '727' */ + return "INNEXIV" } - case 840: - { /* '840' */ - return "Hangzhou BATOWN Technology Co. Ltd." + case 728: { /* '728' */ + return "Covenant" } - case 841: - { /* '841' */ - return "Reasonable Controls" + case 729: { /* '729' */ + return "Davitor AB" } - case 842: - { /* '842' */ - return "Servisys, Inc." + case 73: { /* '73' */ + return "ABB Gebäudetechnik AG Bereich NetServ" } - case 843: - { /* '843' */ - return "halstrup-walcher GmbH" + case 730: { /* '730' */ + return "TongFang Technovator" } - case 844: - { /* '844' */ - return "SWG Automation Fuzhou Limited" + case 731: { /* '731' */ + return "Building Robotics, Inc." } - case 845: - { /* '845' */ - return "KSB Aktiengesellschaft" + case 732: { /* '732' */ + return "HSS-MSR UG" } - case 846: - { /* '846' */ - return "Hybryd Sp. z o.o." + case 733: { /* '733' */ + return "FramTack LLC" } - case 847: - { /* '847' */ - return "Helvatron AG" + case 734: { /* '734' */ + return "B. L. Acoustics, Ltd." } - case 848: - { /* '848' */ - return "Oderon Sp. Z.O.O." + case 735: { /* '735' */ + return "Traxxon Rock Drills, Ltd" } - case 849: - { /* '849' */ - return "mikolab" + case 736: { /* '736' */ + return "Franke" } - case 85: - { /* '85' */ - return "Yamatake Building Systems Co., Ltd." + case 737: { /* '737' */ + return "Wurm GmbH & Co" } - case 850: - { /* '850' */ - return "Exodraft" + case 738: { /* '738' */ + return "AddENERGIE" } - case 851: - { /* '851' */ - return "Hochhuth GmbH" + case 739: { /* '739' */ + return "Mirle Automation Corporation" } - case 852: - { /* '852' */ - return "Integrated System Technologies Ltd." + case 74: { /* '74' */ + return "KNX Association cvba" } - case 853: - { /* '853' */ - return "Shanghai Cellcons Controls Co., Ltd" + case 740: { /* '740' */ + return "Ibis Networks" } - case 854: - { /* '854' */ - return "Emme Controls, LLC" + case 741: { /* '741' */ + return "ID-KARTA s.r.o." } - case 855: - { /* '855' */ - return "Field Diagnostic Services, Inc." + case 742: { /* '742' */ + return "Anaren, Inc." } - case 856: - { /* '856' */ - return "Ges Teknik A.S." + case 743: { /* '743' */ + return "Span, Incorporated" } - case 857: - { /* '857' */ - return "Global Power Products, Inc." + case 744: { /* '744' */ + return "Bosch Thermotechnology Corp" } - case 858: - { /* '858' */ - return "Option NV" + case 745: { /* '745' */ + return "DRC Technology S.A." } - case 859: - { /* '859' */ - return "BV-Control AG" + case 746: { /* '746' */ + return "Shanghai Energy Building Technology Co, Ltd" } - case 86: - { /* '86' */ - return "The Watt Stopper, Inc." + case 747: { /* '747' */ + return "Fraport AG" } - case 860: - { /* '860' */ - return "Sigren Engineering AG" + case 748: { /* '748' */ + return "Flowgroup" } - case 861: - { /* '861' */ - return "Shanghai Jaltone Technology Co., Ltd." + case 749: { /* '749' */ + return "Skytron Energy, GmbH" } - case 862: - { /* '862' */ - return "MaxLine Solutions Ltd" + case 75: { /* '75' */ + return "Institute of Electrical Installation Engineers of Japan (IEIEJ)" } - case 863: - { /* '863' */ - return "Kron Instrumentos Elétricos Ltda" + case 750: { /* '750' */ + return "ALTEL Wicha, Golda Sp. J." } - case 864: - { /* '864' */ - return "Thermo Matrix" + case 751: { /* '751' */ + return "Drupal" } - case 865: - { /* '865' */ - return "Infinite Automation Systems, Inc." + case 752: { /* '752' */ + return "Axiomatic Technology, Ltd" } - case 866: - { /* '866' */ - return "Vantage" + case 753: { /* '753' */ + return "Bohnke + Partner" } - case 867: - { /* '867' */ - return "Elecon Measurements Pvt Ltd" + case 754: { /* '754' */ + return "Function1" } - case 868: - { /* '868' */ - return "TBA" + case 755: { /* '755' */ + return "Optergy Pty, Ltd" } - case 869: - { /* '869' */ - return "Carnes Company" + case 756: { /* '756' */ + return "LSI Virticus" } - case 87: - { /* '87' */ - return "Aichi Tokei Denki Co., Ltd." + case 757: { /* '757' */ + return "Konzeptpark GmbH" } - case 870: - { /* '870' */ - return "Harman Professional" + case 758: { /* '758' */ + return "NX Lighting Controls" } - case 871: - { /* '871' */ - return "Nenutec Asia Pacific Pte Ltd" + case 759: { /* '759' */ + return "eCurv, Inc." } - case 872: - { /* '872' */ - return "Gia NV" + case 76: { /* '76' */ + return "Nohmi Bosai, Ltd." } - case 873: - { /* '873' */ - return "Kepware Tehnologies" + case 760: { /* '760' */ + return "Agnosys GmbH" } - case 874: - { /* '874' */ - return "Temperature Electronics Ltd" + case 761: { /* '761' */ + return "Shanghai Sunfull Automation Co., LTD" } - case 875: - { /* '875' */ - return "Packet Power" + case 762: { /* '762' */ + return "Kurz Instruments, Inc." } - case 876: - { /* '876' */ - return "Project Haystack Corporation" + case 763: { /* '763' */ + return "Cias Elettronica S.r.l." } - case 877: - { /* '877' */ - return "DEOS Controls Americas Inc." + case 764: { /* '764' */ + return "Multiaqua, Inc." } - case 878: - { /* '878' */ - return "Senseware Inc" + case 765: { /* '765' */ + return "BlueBox" } - case 879: - { /* '879' */ - return "MST Systemtechnik AG" + case 766: { /* '766' */ + return "Sensidyne" } - case 88: - { /* '88' */ - return "Activation Technologies, LLC" + case 767: { /* '767' */ + return "Viessmann Elektronik GmbH" } - case 880: - { /* '880' */ - return "Lonix Ltd" + case 768: { /* '768' */ + return "ADFweb.com srl" } - case 881: - { /* '881' */ - return "Gossen Metrawatt GmbH" + case 769: { /* '769' */ + return "Gaylord Industries" } - case 882: - { /* '882' */ - return "Aviosys International Inc." + case 77: { /* '77' */ + return "Carel S.p.A." } - case 883: - { /* '883' */ - return "Efficient Building Automation Corp." + case 770: { /* '770' */ + return "Majur Ltd." } - case 884: - { /* '884' */ - return "Accutron Instruments Inc." + case 771: { /* '771' */ + return "Shanghai Huilin Technology Co., Ltd." } - case 885: - { /* '885' */ - return "Vermont Energy Control Systems LLC" + case 772: { /* '772' */ + return "Exotronic" } - case 886: - { /* '886' */ - return "DCC Dynamics" + case 773: { /* '773' */ + return "SAFECONTROL s.r.o." } - case 887: - { /* '887' */ - return "B.E.G. Brück Electronic GmbH" + case 774: { /* '774' */ + return "Amatis" } - case 889: - { /* '889' */ - return "NGBS Hungary Ltd." + case 775: { /* '775' */ + return "Universal Electric Corporation" } - case 89: - { /* '89' */ - return "Saia-Burgess Controls, Ltd." + case 776: { /* '776' */ + return "iBACnet" } - case 890: - { /* '890' */ - return "ILLUM Technology, LLC" + case 778: { /* '778' */ + return "Smartrise Engineering, Inc." } - case 891: - { /* '891' */ - return "Delta Controls Germany Limited" + case 779: { /* '779' */ + return "Miratron, Inc." } - case 892: - { /* '892' */ - return "S+T Service & Technique S.A." + case 78: { /* '78' */ + return "UTC Fire & Security España, S.L." } - case 893: - { /* '893' */ - return "SimpleSoft" - } - case 894: - { /* '894' */ - return "Altair Engineering" - } - case 895: - { /* '895' */ - return "EZEN Solution Inc." - } - case 896: - { /* '896' */ - return "Fujitec Co. Ltd." - } - case 897: - { /* '897' */ - return "Terralux" - } - case 898: - { /* '898' */ - return "Annicom" - } - case 899: - { /* '899' */ - return "Bihl+Wiedemann GmbH" - } - case 9: - { /* '9' */ - return "Siemens Schweiz AG" - } - case 90: - { /* '90' */ - return "Hitachi, Ltd." - } - case 900: - { /* '900' */ - return "Draper, Inc." - } - case 901: - { /* '901' */ - return "Schüco International KG" - } - case 902: - { /* '902' */ - return "Otis Elevator Company" - } - case 903: - { /* '903' */ - return "Fidelix Oy" - } - case 904: - { /* '904' */ - return "RAM GmbH Mess- und Regeltechnik" - } - case 905: - { /* '905' */ - return "WEMS" - } - case 906: - { /* '906' */ - return "Ravel Electronics Pvt Ltd" - } - case 907: - { /* '907' */ - return "OmniMagni" - } - case 908: - { /* '908' */ - return "Echelon" - } - case 909: - { /* '909' */ - return "Intellimeter Canada, Inc." - } - case 91: - { /* '91' */ - return "Novar Corp./Trend Control Systems Ltd." - } - case 910: - { /* '910' */ - return "Bithouse Oy" - } - case 912: - { /* '912' */ - return "BuildPulse" - } - case 913: - { /* '913' */ - return "Shenzhen 1000 Building Automation Co. Ltd" - } - case 914: - { /* '914' */ - return "AED Engineering GmbH" - } - case 915: - { /* '915' */ - return "Güntner GmbH & Co. KG" - } - case 916: - { /* '916' */ - return "KNXlogic" - } - case 917: - { /* '917' */ - return "CIM Environmental Group" - } - case 918: - { /* '918' */ - return "Flow Control" - } - case 919: - { /* '919' */ - return "Lumen Cache, Inc." - } - case 92: - { /* '92' */ - return "Mitsubishi Electric Lighting Corporation" - } - case 920: - { /* '920' */ - return "Ecosystem" - } - case 921: - { /* '921' */ - return "Potter Electric Signal Company, LLC" - } - case 922: - { /* '922' */ - return "Tyco Fire & Security S.p.A." - } - case 923: - { /* '923' */ - return "Watanabe Electric Industry Co., Ltd." - } - case 924: - { /* '924' */ - return "Causam Energy" - } - case 925: - { /* '925' */ - return "W-tec AG" - } - case 926: - { /* '926' */ - return "IMI Hydronic Engineering International SA" - } - case 927: - { /* '927' */ - return "ARIGO Software" - } - case 928: - { /* '928' */ - return "MSA Safety" - } - case 929: - { /* '929' */ - return "Smart Solucoes Ltda – MERCATO" - } - case 93: - { /* '93' */ - return "Argus Control Systems, Ltd." - } - case 930: - { /* '930' */ - return "PIATRA Engineering" - } - case 931: - { /* '931' */ - return "ODIN Automation Systems, LLC" - } - case 932: - { /* '932' */ - return "Belparts NV" - } - case 933: - { /* '933' */ - return "UAB, SALDA" - } - case 934: - { /* '934' */ - return "Alre-IT Regeltechnik GmbH" - } - case 935: - { /* '935' */ - return "Ingenieurbüro H. Lertes GmbH & Co. KG" - } - case 936: - { /* '936' */ - return "Breathing Buildings" - } - case 937: - { /* '937' */ - return "eWON SA" - } - case 938: - { /* '938' */ - return "Cav. Uff. Giacomo Cimberio S.p.A" - } - case 939: - { /* '939' */ - return "PKE Electronics AG" - } - case 94: - { /* '94' */ - return "Kyuki Corporation" - } - case 940: - { /* '940' */ - return "Allen" - } - case 941: - { /* '941' */ - return "Kastle Systems" - } - case 942: - { /* '942' */ - return "Logical Electro-Mechanical (EM) Systems, Inc." - } - case 943: - { /* '943' */ - return "ppKinetics Instruments, LLC" - } - case 944: - { /* '944' */ - return "Cathexis Technologies" - } - case 945: - { /* '945' */ - return "Sylop sp. Z o.o. sp.k" - } - case 946: - { /* '946' */ - return "Brauns Control GmbH" - } - case 947: - { /* '947' */ - return "OMRON SOCIAL SOLUTIONS CO., LTD." - } - case 948: - { /* '948' */ - return "Wildeboer Bauteile Gmbh" - } - case 949: - { /* '949' */ - return "Shanghai Biens Technologies Ltd" - } - case 95: - { /* '95' */ - return "Richards-Zeta Building Intelligence, Inc." - } - case 950: - { /* '950' */ - return "Beijing HZHY Technology Co., Ltd" - } - case 951: - { /* '951' */ - return "Building Clouds" - } - case 952: - { /* '952' */ - return "The University of Sheffield-Department of Electronic and Electrical Engineering" - } - case 953: - { /* '953' */ - return "Fabtronics Australia Pty Ltd" - } - case 954: - { /* '954' */ - return "SLAT" - } - case 955: - { /* '955' */ - return "Software Motor Corporation" - } - case 956: - { /* '956' */ - return "Armstrong International Inc." - } - case 957: - { /* '957' */ - return "Steril-Aire, Inc." - } - case 958: - { /* '958' */ - return "Infinique" - } - case 959: - { /* '959' */ - return "Arcom" - } - case 96: - { /* '96' */ - return "Scientech R&D, Inc." - } - case 960: - { /* '960' */ - return "Argo Performance, Ltd" - } - case 961: - { /* '961' */ - return "Dialight" - } - case 962: - { /* '962' */ - return "Ideal Technical Solutions" - } - case 963: - { /* '963' */ - return "Neurobat AG" - } - case 964: - { /* '964' */ - return "Neyer Software Consulting LLC" - } - case 965: - { /* '965' */ - return "SCADA Technology Development Co., Ltd." - } - case 966: - { /* '966' */ - return "Demand Logic Limited" - } - case 967: - { /* '967' */ - return "GWA Group Limited" - } - case 968: - { /* '968' */ - return "Occitaline" - } - case 969: - { /* '969' */ - return "NAO Digital Co., Ltd." - } - case 97: - { /* '97' */ - return "VCI Controls, Inc." - } - case 970: - { /* '970' */ - return "Shenzhen Chanslink Network Technology Co., Ltd." - } - case 971: - { /* '971' */ - return "Samsung Electronics Co., Ltd." - } - case 972: - { /* '972' */ - return "Mesa Laboratories, Inc." - } - case 973: - { /* '973' */ - return "Fischer" - } - case 974: - { /* '974' */ - return "OpSys Solutions Ltd." - } - case 975: - { /* '975' */ - return "Advanced Devices Limited" - } - case 976: - { /* '976' */ - return "Condair" - } - case 977: - { /* '977' */ - return "INELCOM Ingenieria Electronica Comercial S.A." - } - case 978: - { /* '978' */ - return "GridPoint, Inc." - } - case 979: - { /* '979' */ - return "ADF Technologies Sdn Bhd" - } - case 98: - { /* '98' */ - return "Toshiba Corporation" - } - case 980: - { /* '980' */ - return "EPM, Inc." - } - case 981: - { /* '981' */ - return "Lighting Controls Ltd" - } - case 982: - { /* '982' */ - return "Perix Controls Ltd." - } - case 983: - { /* '983' */ - return "AERCO International, Inc." - } - case 984: - { /* '984' */ - return "KONE Inc." - } - case 985: - { /* '985' */ - return "Ziehl-Abegg SE" - } - case 986: - { /* '986' */ - return "Robot, S.A." - } - case 987: - { /* '987' */ - return "Optigo Networks, Inc." - } - case 988: - { /* '988' */ - return "Openmotics BVBA" - } - case 989: - { /* '989' */ - return "Metropolitan Industries, Inc." - } - case 99: - { /* '99' */ - return "Mitsubishi Electric Corporation Air Conditioning & Refrigeration Systems Works" - } - case 990: - { /* '990' */ - return "Huawei Technologies Co., Ltd." - } - case 991: - { /* '991' */ - return "Digital Lumens, Inc." - } - case 992: - { /* '992' */ - return "Vanti" - } - case 993: - { /* '993' */ - return "Cree Lighting" - } - case 994: - { /* '994' */ - return "Richmond Heights SDN BHD" - } - case 995: - { /* '995' */ - return "Payne-Sparkman Lighting Mangement" - } - case 996: - { /* '996' */ - return "Ashcroft" - } - case 997: - { /* '997' */ - return "Jet Controls Corp" - } - case 998: - { /* '998' */ - return "Zumtobel Lighting GmbH" - } - default: - { - return "" - } - } -} - -func BACnetVendorIdFirstEnumForFieldVendorName(value string) (BACnetVendorId, error) { - for _, sizeValue := range BACnetVendorIdValues { - if sizeValue.VendorName() == value { - return sizeValue, nil - } - } - return 0, errors.Errorf("enum for %v describing VendorName not found", value) -} -func BACnetVendorIdByValue(value uint16) (enum BACnetVendorId, ok bool) { - switch value { - case 0: - return BACnetVendorId_ASHRAE, true - case 0xFFFF: - return BACnetVendorId_UNKNOWN_VENDOR, true - case 1: - return BACnetVendorId_NIST, true - case 10: - return BACnetVendorId_SCHNEIDER_ELECTRIC, true - case 100: - return BACnetVendorId_CUSTOM_MECHANICAL_EQUIPMENTLLC, true - case 1000: - return BACnetVendorId_EKON_GMBH, true - case 1001: - return BACnetVendorId_MOLEX, true - case 1002: - return BACnetVendorId_MACO_LIGHTING_PTY_LTD, true - case 1003: - return BACnetVendorId_AXECON_CORP, true - case 1004: - return BACnetVendorId_TENSORPLC, true - case 1005: - return BACnetVendorId_KASEMAN_ENVIRONMENTAL_CONTROL_EQUIPMENT_SHANGHAI_LIMITED, true - case 1006: - return BACnetVendorId_AB_AXIS_INDUSTRIES, true - case 1007: - return BACnetVendorId_NETIX_CONTROLS, true - case 1008: - return BACnetVendorId_ELDRIDGE_PRODUCTS_INC, true - case 1009: - return BACnetVendorId_MICRONICS, true - case 101: - return BACnetVendorId_CLIMATE_MASTER, true - case 1010: - return BACnetVendorId_FORTECHO_SOLUTIONS_LTD, true - case 1011: - return BACnetVendorId_SELLERS_MANUFACTURING_COMPANY, true - case 1012: - return BACnetVendorId_RITE_HITE_DOORS_INC, true - case 1013: - return BACnetVendorId_VIOLET_DEFENSELLC, true - case 1014: - return BACnetVendorId_SIMNA, true - case 1015: - return BACnetVendorId_MULTINERGIE_BEST_INC, true - case 1016: - return BACnetVendorId_MEGA_SYSTEM_TECHNOLOGIES_INC, true - case 1017: - return BACnetVendorId_RHEEM, true - case 1018: - return BACnetVendorId_ING_PUNZENBERGERCOPADATA_GMBH, true - case 1019: - return BACnetVendorId_MEC_ELECTRONICS_GMBH, true - case 102: - return BACnetVendorId_ICP_PANEL_TEC_INC, true - case 1020: - return BACnetVendorId_TACO_COMFORT_SOLUTIONS, true - case 1021: - return BACnetVendorId_ALEXANDER_MAIER_GMBH, true - case 1022: - return BACnetVendorId_ECORITHM_INC, true - case 1023: - return BACnetVendorId_ACCURRO_LTD, true - case 1024: - return BACnetVendorId_ROMTECK_AUSTRALIA_PTY_LTD, true - case 1025: - return BACnetVendorId_SPLASH_MONITORING_LIMITED, true - case 1026: - return BACnetVendorId_LIGHT_APPLICATION, true - case 1027: - return BACnetVendorId_LOGICAL_BUILDING_AUTOMATION, true - case 1028: - return BACnetVendorId_EXILIGHT_OY, true - case 1029: - return BACnetVendorId_HAGER_ELECTROSAS, true - case 103: - return BACnetVendorId_D_TEK_CONTROLS, true - case 1030: - return BACnetVendorId_KLIF_COLTD, true - case 1031: - return BACnetVendorId_HYGRO_MATIK, true - case 1032: - return BACnetVendorId_DANIEL_MOUSSEAU_PROGRAMMATION_ELECTRONIQUE, true - case 1033: - return BACnetVendorId_AERIONICS_INC, true - case 1034: - return BACnetVendorId_MS_ELECTRONIQUE_LTEE, true - case 1035: - return BACnetVendorId_AUTOMATION_COMPONENTS_INC, true - case 1036: - return BACnetVendorId_NIOBRARA_RESEARCH_DEVELOPMENT_CORPORATION, true - case 1037: - return BACnetVendorId_NETCOM_SICHERHEITSTECHNIK_GMBH, true - case 1038: - return BACnetVendorId_LUMELSA, true - case 1039: - return BACnetVendorId_GREAT_PLAINS_INDUSTRIES_INC, true - case 104: - return BACnetVendorId_NEC_ENGINEERING_LTD, true - case 1040: - return BACnetVendorId_DOMOTICA_LABSSRL, true - case 1041: - return BACnetVendorId_ENERGY_CLOUD_INC, true - case 1042: - return BACnetVendorId_VOMATEC, true - case 1043: - return BACnetVendorId_DEMMA_COMPANIES, true - case 1044: - return BACnetVendorId_VALSENA, true - case 1045: - return BACnetVendorId_COMSYS_BRTSCHAG, true - case 1046: - return BACnetVendorId_B_GRID, true - case 1047: - return BACnetVendorId_MDJ_SOFTWARE_PTY_LTD, true - case 1048: - return BACnetVendorId_DIMONOFF_INC, true - case 1049: - return BACnetVendorId_EDOMO_SYSTEMS_GMBH, true - case 105: - return BACnetVendorId_PRIVABV, true - case 1050: - return BACnetVendorId_EFFEKTIVLLC, true - case 1051: - return BACnetVendorId_STEAMO_VAP, true - case 1052: - return BACnetVendorId_GRANDCENTRIX_GMBH, true - case 1053: - return BACnetVendorId_WEINTEK_LABS_INC, true - case 1054: - return BACnetVendorId_INTEFOX_GMBH, true - case 1055: - return BACnetVendorId_RADIUS_AUTOMATION_COMPANY, true - case 1056: - return BACnetVendorId_RINGDALE_INC, true - case 1057: - return BACnetVendorId_IWAKI_AMERICA, true - case 1058: - return BACnetVendorId_BRACTLET, true - case 1059: - return BACnetVendorId_STULZ_AIR_TECHNOLOGY_SYSTEMS_INC, true - case 106: - return BACnetVendorId_MEIDENSHA_CORPORATION, true - case 1060: - return BACnetVendorId_CLIMATE_READY_ENGINEERING_PTY_LTD, true - case 1061: - return BACnetVendorId_GENEA_ENERGY_PARTNERS, true - case 1062: - return BACnetVendorId_IO_TALL_CHILE, true - case 1063: - return BACnetVendorId_IKS_CO_LTD, true - case 1064: - return BACnetVendorId_YODIWOAB, true - case 1065: - return BACnetVendorId_TITA_NELECTRONIC_GMBH, true - case 1066: - return BACnetVendorId_IDEC_CORPORATION, true - case 1067: - return BACnetVendorId_SIFRISL, true - case 1068: - return BACnetVendorId_THERMAL_GAS_SYSTEMS_INC, true - case 1069: - return BACnetVendorId_BUILDING_AUTOMATION_PRODUCTS_INC, true - case 107: - return BACnetVendorId_JCI_SYSTEMS_INTEGRATION_SERVICES, true - case 1070: - return BACnetVendorId_ASSET_MAPPING, true - case 1071: - return BACnetVendorId_SMARTEH_COMPANY, true - case 1072: - return BACnetVendorId_DATAPOD_AUSTRALIA_PTY_LTD, true - case 1073: - return BACnetVendorId_BUILDINGS_ALIVE_PTY_LTD, true - case 1074: - return BACnetVendorId_DIGITAL_ELEKTRONIK, true - case 1075: - return BACnetVendorId_TALENT_AUTOMAOE_TECNOLOGIA_LTDA, true - case 1076: - return BACnetVendorId_NORPOSH_LIMITED, true - case 1077: - return BACnetVendorId_MERKUR_FUNKSYSTEMEAG, true - case 1078: - return BACnetVendorId_FASTERC_ZSPOL_SRO, true - case 1079: - return BACnetVendorId_ECO_ADAPT, true - case 108: - return BACnetVendorId_FREEDOM_CORPORATION, true - case 1080: - return BACnetVendorId_ENERGOCENTRUM_PLUSSRO, true - case 1081: - return BACnetVendorId_AMBXUK_LTD, true - case 1082: - return BACnetVendorId_WESTERN_RESERVE_CONTROLS_INC, true - case 1083: - return BACnetVendorId_LAYER_ZERO_POWER_SYSTEMS_INC, true - case 1084: - return BACnetVendorId_CIC_JAN_HEBECSRO, true - case 1085: - return BACnetVendorId_SIGROVBV, true - case 1086: - return BACnetVendorId_ISYS_INTELLIGENT_SYSTEMS, true - case 1087: - return BACnetVendorId_GAS_DETECTION_AUSTRALIA_PTY_LTD, true - case 1088: - return BACnetVendorId_KINCO_AUTOMATION_SHANGHAI_LTD, true - case 1089: - return BACnetVendorId_LARS_ENERGYLLC, true - case 109: - return BACnetVendorId_NEUBERGER_GEBUDEAUTOMATION_GMBH, true - case 1090: - return BACnetVendorId_FLAMEFASTUK_LTD, true - case 1091: - return BACnetVendorId_ROYAL_SERVICE_AIR_CONDITIONING, true - case 1092: - return BACnetVendorId_AMPIO_SP_ZOO, true - case 1093: - return BACnetVendorId_INOVONICS_WIRELESS_CORPORATION, true - case 1094: - return BACnetVendorId_NVENT_THERMAL_MANAGEMENT, true - case 1095: - return BACnetVendorId_SINOWELL_CONTROL_SYSTEM_LTD, true - case 1096: - return BACnetVendorId_MOXA_INC, true - case 1097: - return BACnetVendorId_MATRIXI_CONTROLSDNBHD, true - case 1098: - return BACnetVendorId_PURPLE_SWIFT, true - case 1099: - return BACnetVendorId_OTIM_TECHNOLOGIES, true - case 11: - return BACnetVendorId_TAC, true - case 110: - return BACnetVendorId_E_ZI_CONTROLS, true - case 1100: - return BACnetVendorId_FLOW_MATE_LIMITED, true - case 1101: - return BACnetVendorId_DEGREE_CONTROLS_INC, true - case 1102: - return BACnetVendorId_FEI_XING_SHANGHAI_SOFTWARE_TECHNOLOGIES_CO_LTD, true - case 1103: - return BACnetVendorId_BERG_GMBH, true - case 1104: - return BACnetVendorId_ARENZIT, true - case 1105: - return BACnetVendorId_EDELSTROM_ELECTRONIC_DEVICES_DESIGNINGLLC, true - case 1106: - return BACnetVendorId_DRIVE_CONNECTLLC, true - case 1107: - return BACnetVendorId_DEVELOP_NOW, true - case 1108: - return BACnetVendorId_POORT, true - case 1109: - return BACnetVendorId_VMEIL_INFORMATION_SHANGHAI_LTD, true - case 111: - return BACnetVendorId_LEVITON_MANUFACTURING, true - case 1110: - return BACnetVendorId_RAYLEIGH_INSTRUMENTS, true - case 1112: - return BACnetVendorId_CODESYS_DEVELOPMENT, true - case 1113: - return BACnetVendorId_SMARTWARE_TECHNOLOGIES_GROUPLLC, true - case 1114: - return BACnetVendorId_POLAR_BEAR_SOLUTIONS, true - case 1115: - return BACnetVendorId_CODRA, true - case 1116: - return BACnetVendorId_PHAROS_ARCHITECTURAL_CONTROLS_LTD, true - case 1117: - return BACnetVendorId_ENGI_NEAR_LTD, true - case 1118: - return BACnetVendorId_AD_HOC_ELECTRONICS, true - case 1119: - return BACnetVendorId_UNIFIED_MICROSYSTEMS, true - case 112: - return BACnetVendorId_FUJITSU_LIMITED, true - case 1120: - return BACnetVendorId_INDUSTRIEELEKTRONIK_BRANDENBURG_GMBH, true - case 1121: - return BACnetVendorId_HARTMANN_GMBH, true - case 1122: - return BACnetVendorId_PISCADA, true - case 1123: - return BACnetVendorId_KM_BSYSTEMSSRO, true - case 1124: - return BACnetVendorId_POWER_TECH_ENGINEERINGAS, true - case 1125: - return BACnetVendorId_TELEFONBAU_ARTHUR_SCHWABE_GMBH_COKG, true - case 1126: - return BACnetVendorId_WUXI_FISTWELOVE_TECHNOLOGY_CO_LTD, true - case 1127: - return BACnetVendorId_PRYSM, true - case 1128: - return BACnetVendorId_STEINEL_GMBH, true - case 1129: - return BACnetVendorId_GEORG_FISCHERJRGAG, true - case 113: - return BACnetVendorId_VERTIV_FORMERLY_EMERSON_NETWORK_POWER, true - case 1130: - return BACnetVendorId_MAKE_DEVELOPSL, true - case 1131: - return BACnetVendorId_MONNIT_CORPORATION, true - case 1132: - return BACnetVendorId_MIRROR_LIFE_CORPORATION, true - case 1133: - return BACnetVendorId_SECURE_METERS_LIMITED, true - case 1134: - return BACnetVendorId_PECO, true - case 1135: - return BACnetVendorId_CCTECH_INC, true - case 1136: - return BACnetVendorId_LIGHT_FI_LIMITED, true - case 1137: - return BACnetVendorId_NICE_SPA, true - case 1138: - return BACnetVendorId_FIBER_SEN_SYS_INC, true - case 1139: - return BACnetVendorId_BD_BUCHTAUND_DEGEORGI, true - case 114: - return BACnetVendorId_SA_ARMSTRONG_LTD, true - case 1140: - return BACnetVendorId_VENTACITY_SYSTEMS_INC, true - case 1141: - return BACnetVendorId_HITACHI_JOHNSON_CONTROLS_AIR_CONDITIONING_INC, true - case 1142: - return BACnetVendorId_SAGE_METERING_INC, true - case 1143: - return BACnetVendorId_ANDEL_LIMITED, true - case 1144: - return BACnetVendorId_ECO_SMART_TECHNOLOGIES, true - case 1145: - return BACnetVendorId_SET, true - case 1146: - return BACnetVendorId_PROTEC_FIRE_DETECTION_SPAINSL, true - case 1147: - return BACnetVendorId_AGRAMERUG, true - case 1148: - return BACnetVendorId_ANYLINK_ELECTRONIC_GMBH, true - case 1149: - return BACnetVendorId_SCHINDLER_LTD, true - case 115: - return BACnetVendorId_VISONETAG, true - case 1150: - return BACnetVendorId_JIBREEL_ABDEEN_EST, true - case 1151: - return BACnetVendorId_FLUIDYNE_CONTROL_SYSTEMS_PVT_LTD, true - case 1152: - return BACnetVendorId_PRISM_SYSTEMS_INC, true - case 1153: - return BACnetVendorId_ENERTIV, true - case 1154: - return BACnetVendorId_MIRASOFT_GMBH_COKG, true - case 1155: - return BACnetVendorId_DUALTECHIT, true - case 1156: - return BACnetVendorId_COUNTLOGICLLC, true - case 1157: - return BACnetVendorId_KOHLER, true - case 1158: - return BACnetVendorId_CHEN_SEN_CONTROLS_CO_LTD, true - case 1159: - return BACnetVendorId_GREENHECK, true - case 116: - return BACnetVendorId_MM_SYSTEMS_INC, true - case 1160: - return BACnetVendorId_INTWINE_CONNECTLLC, true - case 1161: - return BACnetVendorId_KARLBORGS_ELKONTROLL, true - case 1162: - return BACnetVendorId_DATAKOM, true - case 1163: - return BACnetVendorId_HOGA_CONTROLAS, true - case 1164: - return BACnetVendorId_COOL_AUTOMATION, true - case 1165: - return BACnetVendorId_INTER_SEARCH_CO_LTD, true - case 1166: - return BACnetVendorId_DABBEL_AUTOMATION_INTELLIGENCE_GMBH, true - case 1167: - return BACnetVendorId_GADGEON_ENGINEERING_SMARTNESS, true - case 1168: - return BACnetVendorId_COSTER_GROUP_SRL, true - case 1169: - return BACnetVendorId_WALTER_MLLERAG, true - case 117: - return BACnetVendorId_CUSTOM_SOFTWARE_ENGINEERING, true - case 1170: - return BACnetVendorId_FLUKE, true - case 1171: - return BACnetVendorId_QUINTEX_SYSTEMS_LTD, true - case 1172: - return BACnetVendorId_SENFFICIENTSDNBHD, true - case 1173: - return BACnetVendorId_NUBEIO_OPERATIONS_PTY_LTD, true - case 1174: - return BACnetVendorId_DAS_INTEGRATOR_PTE_LTD, true - case 1175: - return BACnetVendorId_CREVIS_CO_LTD, true - case 1176: - return BACnetVendorId_I_SQUAREDSOFTWAREINC, true - case 1177: - return BACnetVendorId_KTG_GMBH, true - case 1178: - return BACnetVendorId_POK_GROUP_OY, true - case 1179: - return BACnetVendorId_ADISCOM, true - case 118: - return BACnetVendorId_NITTAN_COMPANY_LIMITED, true - case 1180: - return BACnetVendorId_INCUSENSE, true - case 1181: - return BACnetVendorId_F, true - case 1182: - return BACnetVendorId_ANORD_MARDIX_INC, true - case 1183: - return BACnetVendorId_HOSCH_GEBUDEAUTOMATION_NEUE_PRODUKTE_GMBH, true - case 1184: - return BACnetVendorId_BOSCHIO_GMBH, true - case 1185: - return BACnetVendorId_ROYAL_BOON_EDAM_INTERNATIONALBV, true - case 1186: - return BACnetVendorId_CLACK_CORPORATION, true - case 1187: - return BACnetVendorId_UNITEX_CONTROLSLLC, true - case 1188: - return BACnetVendorId_KTC_GTEBORGAB, true - case 1189: - return BACnetVendorId_INTERZONAB, true - case 119: - return BACnetVendorId_ELUTIONS_INC_WIZCON_SYSTEMSSAS, true - case 1190: - return BACnetVendorId_ISDEINGSL, true - case 1191: - return BACnetVendorId_AB_MAUTOMATIONBUILDINGMESSAGING_GMBH, true - case 1192: - return BACnetVendorId_KENTEC_ELECTRONICS_LTD, true - case 1193: - return BACnetVendorId_EMERSON_COMMERCIALAND_RESIDENTIAL_SOLUTIONS, true - case 1194: - return BACnetVendorId_POWERSIDE, true - case 1195: - return BACnetVendorId_SMC_GROUP, true - case 1196: - return BACnetVendorId_EOS_WEATHER_INSTRUMENTS, true - case 1197: - return BACnetVendorId_ZONEX_SYSTEMS, true - case 1198: - return BACnetVendorId_GENEREX_SYSTEMS_COMPUTERVERTRIEBSGESELLSCHAFTMBH, true - case 1199: - return BACnetVendorId_ENERGY_WALLLLC, true - case 12: - return BACnetVendorId_ORION_ANALYSIS_CORPORATION, true - case 120: - return BACnetVendorId_PACOM_SYSTEMS_PTY_LTD, true - case 1200: - return BACnetVendorId_THERMOFIN, true - case 1201: - return BACnetVendorId_SDATAWAYSA, true - case 1202: - return BACnetVendorId_BIDDLE_AIR_SYSTEMS_LIMITED, true - case 1203: - return BACnetVendorId_KESSLER_ELLIS_PRODUCTS, true - case 1204: - return BACnetVendorId_THERMOSCREENS, true - case 1205: - return BACnetVendorId_MODIO, true - case 1206: - return BACnetVendorId_NEWRON_SOLUTIONS, true - case 1207: - return BACnetVendorId_UNITRONICS, true - case 1208: - return BACnetVendorId_TRILUX_GMBH_COKG, true - case 1209: - return BACnetVendorId_KOLLMORGEN_STEUERUNGSTECHNIK_GMBH, true - case 121: - return BACnetVendorId_UNICO_INC, true - case 1210: - return BACnetVendorId_BOSCH_REXROTHAG, true - case 1211: - return BACnetVendorId_ALARKO_CARRIER, true - case 1212: - return BACnetVendorId_VERDIGRIS_TECHNOLOGIES, true - case 1213: - return BACnetVendorId_SHANGHAISIIC_LONGCHUANG_SMARTECH_SO_LTD, true - case 1214: - return BACnetVendorId_QUINDA_CO, true - case 1215: - return BACnetVendorId_GRUNERAG, true - case 1216: - return BACnetVendorId_BACMOVE, true - case 1217: - return BACnetVendorId_PSIDACAB, true - case 1218: - return BACnetVendorId_ISICON_CONTROL_AUTOMATION, true - case 1219: - return BACnetVendorId_BIG_ASS_FANS, true - case 122: - return BACnetVendorId_EBTRON_INC, true - case 1220: - return BACnetVendorId_DIN_DIETMAR_NOCKER_FACILITY_MANAGEMENT_GMBH, true - case 1221: - return BACnetVendorId_TELDIO, true - case 1222: - return BACnetVendorId_MIKROKLIM_ASRO, true - case 1223: - return BACnetVendorId_DENSITY, true - case 1224: - return BACnetVendorId_ICONAG_LEITTECHNIK_GMBH, true - case 1225: - return BACnetVendorId_AWAIR, true - case 1226: - return BACnetVendorId_TD_ENGINEERING_LTD, true - case 1227: - return BACnetVendorId_SISTEMAS_DIGITALES, true - case 1228: - return BACnetVendorId_LOXONE_ELECTRONICS_GMBH, true - case 1229: - return BACnetVendorId_ACTRON_AIR, true - case 123: - return BACnetVendorId_SCADA_ENGINE, true - case 1230: - return BACnetVendorId_INDUCTIVE_AUTOMATION, true - case 1231: - return BACnetVendorId_THOR_ENGINEERING_GMBH, true - case 1232: - return BACnetVendorId_BERNER_INTERNATIONALLLC, true - case 1233: - return BACnetVendorId_POTSDAM_SENSORSLLC, true - case 1234: - return BACnetVendorId_KOHLER_MIRA_LTD, true - case 1235: - return BACnetVendorId_TECOMON_GMBH, true - case 1236: - return BACnetVendorId_TWO_DIMENSIONAL_INSTRUMENTSLLC, true - case 1237: - return BACnetVendorId_LEFA_TECHNOLOGIES_PTE_LTD, true - case 1238: - return BACnetVendorId_EATONCEAG_NOTLICHTSYSTEME_GMBH, true - case 1239: - return BACnetVendorId_COMMBOX_TECNOLOGIA, true - case 124: - return BACnetVendorId_LENZE_AMERICAS_FORMERLYAC_TECHNOLOGY_CORPORATION, true - case 1240: - return BACnetVendorId_IP_VIDEO_CORPORATION, true - case 1241: - return BACnetVendorId_BENDER_GMBH_COKG, true - case 1242: - return BACnetVendorId_RHYMEBUS_CORPORATION, true - case 1243: - return BACnetVendorId_AXON_SYSTEMS_LTD, true - case 1244: - return BACnetVendorId_ENGINEERED_AIR, true - case 1245: - return BACnetVendorId_ELIPSE_SOFTWARE_LTDA, true - case 1246: - return BACnetVendorId_SIMATIX_BUILDING_TECHNOLOGIES_PVT_LTD, true - case 1247: - return BACnetVendorId_WA_BENJAMIN_ELECTRIC_CO, true - case 1248: - return BACnetVendorId_TROX_AIR_CONDITIONING_COMPONENTS_SUZHOU_CO_LTD, true - case 1249: - return BACnetVendorId_SC_MEDICAL_PTY_LTD, true - case 125: - return BACnetVendorId_EAGLE_TECHNOLOGY, true - case 1250: - return BACnetVendorId_ELCANICAS, true - case 1251: - return BACnetVendorId_OBEOAS, true - case 1252: - return BACnetVendorId_TAPA_INC, true - case 1253: - return BACnetVendorId_ASE_SMART_ENERGY_INC, true - case 1254: - return BACnetVendorId_PERFORMANCE_SERVICES_INC, true - case 1255: - return BACnetVendorId_VERIDIFY_SECURITY, true - case 1256: - return BACnetVendorId_CD_INNOVATIONLTD, true - case 1257: - return BACnetVendorId_BEN_PEOPLES_INDUSTRIESLLC, true - case 1258: - return BACnetVendorId_UNICOMM_SPZOO, true - case 1259: - return BACnetVendorId_THING_TECHNOLOGIES_GMBH, true - case 126: - return BACnetVendorId_DATA_AIRE_INC, true - case 1260: - return BACnetVendorId_BEIJING_HAI_LIN_ENERGY_SAVING_TECHNOLOGY_INC, true - case 1261: - return BACnetVendorId_DIGITAL_REALTY, true - case 1262: - return BACnetVendorId_AGROWTEK_INC, true - case 1263: - return BACnetVendorId_DSP_INNOVATIONBV, true - case 1264: - return BACnetVendorId_STV_ELECTRONIC_GMBH, true - case 1265: - return BACnetVendorId_ELMEASURE_INDIA_PVT_LTD, true - case 1266: - return BACnetVendorId_PINESHORE_ENERGYLLC, true - case 1267: - return BACnetVendorId_BRASCH_ENVIRONMENTAL_TECHNOLOGIESLLC, true - case 1268: - return BACnetVendorId_LION_CONTROLS_COLTD, true - case 1269: - return BACnetVendorId_SINUX, true - case 127: - return BACnetVendorId_ABB_INC, true - case 1270: - return BACnetVendorId_AVNET_INC, true - case 1271: - return BACnetVendorId_SOMFY_ACTIVITESSA, true - case 1272: - return BACnetVendorId_AMICO, true - case 1273: - return BACnetVendorId_SAGE_GLASS, true - case 1274: - return BACnetVendorId_AU_VERTE, true - case 1275: - return BACnetVendorId_AGILE_CONNECTS_PVT_LTD, true - case 1276: - return BACnetVendorId_LOCIMATION_PTY_LTD, true - case 1277: - return BACnetVendorId_ENVIO_SYSTEMS_GMBH, true - case 1278: - return BACnetVendorId_VOYTECH_SYSTEMS_LIMITED, true - case 1279: - return BACnetVendorId_DAVIDSMEYERUND_PAUL_GMBH, true - case 128: - return BACnetVendorId_TRANSBIT_SPZOO, true - case 1280: - return BACnetVendorId_LUSHER_ENGINEERING_SERVICES, true - case 1281: - return BACnetVendorId_CHNT_NANJING_TECHSEL_INTELLIGENT_COMPANYLTD, true - case 1282: - return BACnetVendorId_THREETRONICS_PTY_LTD, true - case 1283: - return BACnetVendorId_SKY_FOUNDRYLLC, true - case 1284: - return BACnetVendorId_HANIL_PRO_TECH, true - case 1285: - return BACnetVendorId_SENSORSCALL, true - case 1286: - return BACnetVendorId_SHANGHAI_JINGPU_INFORMATION_TECHNOLOGY_CO_LTD, true - case 1287: - return BACnetVendorId_LICHTMANUFAKTUR_BERLIN_GMBH, true - case 1288: - return BACnetVendorId_ECO_PARKING_TECHNOLOGIES, true - case 1289: - return BACnetVendorId_ENVISION_DIGITAL_INTERNATIONAL_PTE_LTD, true - case 129: - return BACnetVendorId_TOSHIBA_CARRIER_CORPORATION, true - case 1290: - return BACnetVendorId_ANTONY_DEVELOPPEMENT_ELECTRONIQUE, true - case 1291: - return BACnetVendorId_ISYSTEMS, true - case 1292: - return BACnetVendorId_THUREON_INTERNATIONAL_LIMITED, true - case 1293: - return BACnetVendorId_PULSAFEEDER, true - case 1294: - return BACnetVendorId_MEGA_CHIPS_CORPORATION, true - case 1295: - return BACnetVendorId_TES_CONTROLS, true - case 1296: - return BACnetVendorId_CERMATE, true - case 1297: - return BACnetVendorId_GRAND_VALLEY_STATE_UNIVERSITY, true - case 1298: - return BACnetVendorId_SYMCON_GMBH, true - case 1299: - return BACnetVendorId_THE_CHICAGO_FAUCET_COMPANY, true - case 13: - return BACnetVendorId_TELETROL_SYSTEMS_INC, true - case 130: - return BACnetVendorId_SHENZHEN_JUNZHI_HI_TECH_CO_LTD, true - case 1300: - return BACnetVendorId_GEBERITAG, true - case 1301: - return BACnetVendorId_REX_CONTROLS, true - case 1302: - return BACnetVendorId_IVMS_GMBH, true - case 1303: - return BACnetVendorId_MNPP_SATURN_LTD, true - case 1304: - return BACnetVendorId_REGAL_BELOIT, true - case 1305: - return BACnetVendorId_ACS_AIR_CONDITIONING_SOLUTIONS, true - case 1306: - return BACnetVendorId_GBX_TECHNOLOGYLLC, true - case 1307: - return BACnetVendorId_KAITERRA, true - case 1308: - return BACnetVendorId_THIN_KUANLOT_TECHNOLOGY_SHANGHAI_CO_LTD, true - case 1309: - return BACnetVendorId_HO_CO_STOBV, true - case 131: - return BACnetVendorId_TOKAI_SOFT, true - case 1310: - return BACnetVendorId_SHENZHENASAI_TECHNOLOGY_CO_LTD, true - case 1311: - return BACnetVendorId_RPS_SPA, true - case 1312: - return BACnetVendorId_ESMSOLUTIONS, true - case 1313: - return BACnetVendorId_IO_TECH_SYSTEMS_LIMITED, true - case 1314: - return BACnetVendorId_I_AUTO_LOGIC_CO_LTD, true - case 1315: - return BACnetVendorId_NEW_AGE_MICROLLC, true - case 1316: - return BACnetVendorId_GUARDIAN_GLASS, true - case 1317: - return BACnetVendorId_GUANGZHOU_ZHAOYU_INFORMATION_TECHNOLOGY, true - case 1318: - return BACnetVendorId_ACE_IOT_SOLUTIONSLLC, true - case 1319: - return BACnetVendorId_PORIS_ELECTRONICS_CO_LTD, true - case 132: - return BACnetVendorId_BLUE_RIDGE_TECHNOLOGIES, true - case 1320: - return BACnetVendorId_TERMINUS_TECHNOLOGIES_GROUP, true - case 1321: - return BACnetVendorId_INTECH1_INC, true - case 1322: - return BACnetVendorId_ACCURATE_ELECTRONICS, true - case 1323: - return BACnetVendorId_FLUENCE_BIOENGINEERING, true - case 1324: - return BACnetVendorId_MUN_HEAN_SINGAPORE_PTE_LTD, true - case 1325: - return BACnetVendorId_KATRONICAG_COKG, true - case 1326: - return BACnetVendorId_SUZHOU_XIN_AO_INFORMATION_TECHNOLOGY_CO_LTD, true - case 1327: - return BACnetVendorId_LINKTEKK_TECHNOLOGYJSC, true - case 1328: - return BACnetVendorId_STIRLING_ULTRACOLD, true - case 1329: - return BACnetVendorId_UV_PARTNERS_INC, true - case 133: - return BACnetVendorId_VERIS_INDUSTRIES, true - case 1330: - return BACnetVendorId_PRO_MINENT_GMBH, true - case 1331: - return BACnetVendorId_MULTI_TECH_SYSTEMS_INC, true - case 1332: - return BACnetVendorId_JUMO_GMBH_COKG, true - case 1333: - return BACnetVendorId_QINGDAO_HUARUI_TECHNOLOGY_CO_LTD, true - case 1334: - return BACnetVendorId_CAIRN_SYSTEMES, true - case 1335: - return BACnetVendorId_NEURO_LOGIC_RESEARCH_CORP, true - case 1336: - return BACnetVendorId_TRANSITION_TECHNOLOGIES_ADVANCED_SOLUTIONS_SPZOO, true - case 1337: - return BACnetVendorId_XXTERBV, true - case 1338: - return BACnetVendorId_PASSIVE_LOGIC, true - case 1339: - return BACnetVendorId_EN_SMART_CONTROLS, true - case 134: - return BACnetVendorId_CENTAURUS_PRIME, true - case 1340: - return BACnetVendorId_WATTS_HEATINGAND_HOT_WATER_SOLUTIONSDBA_LYNC, true - case 1341: - return BACnetVendorId_TROPOSPHAIRA_TECHNOLOGIESLLP, true - case 1342: - return BACnetVendorId_NETWORK_THERMOSTAT, true - case 1343: - return BACnetVendorId_TITANIUM_INTELLIGENT_SOLUTIONSLLC, true - case 1344: - return BACnetVendorId_NUMA_PRODUCTSLLC, true - case 1345: - return BACnetVendorId_WAREMA_RENKHOFFSE, true - case 1346: - return BACnetVendorId_FRESEAS, true - case 1347: - return BACnetVendorId_MAPPED, true - case 1348: - return BACnetVendorId_ELEKTRODESIG_NVENTILATORYSRO, true - case 1349: - return BACnetVendorId_AIR_CARE_AUTOMATION_INC, true - case 135: - return BACnetVendorId_SAND_NETWORK_SYSTEMS, true - case 1350: - return BACnetVendorId_ANTRUM, true - case 1351: - return BACnetVendorId_BAO_LINH_CONNECT_TECHNOLOGY, true - case 1352: - return BACnetVendorId_VIRGINIA_CONTROLSLLC, true - case 1353: - return BACnetVendorId_DUOSYSSDNBHD, true - case 1354: - return BACnetVendorId_ONSENSAS, true - case 1355: - return BACnetVendorId_VAUGHN_THERMAL_CORPORATION, true - case 1356: - return BACnetVendorId_THERMOPLASTIC_ENGINEERING_LTDTPE, true - case 1357: - return BACnetVendorId_WIRTH_RESEARCH_LTD, true - case 1358: - return BACnetVendorId_SST_AUTOMATION, true - case 1359: - return BACnetVendorId_SHANGHAI_BENCOL_ELECTRONIC_TECHNOLOGY_CO_LTD, true - case 136: - return BACnetVendorId_REGULVAR_INC, true - case 1360: - return BACnetVendorId_AIWAA_SYSTEMS_PRIVATE_LIMITED, true - case 1361: - return BACnetVendorId_ENLESS_WIRELESS, true - case 1362: - return BACnetVendorId_OZUNO_ENGINEERING_PTY_LTD, true - case 1363: - return BACnetVendorId_HUBBELL_THE_ELECTRIC_HEATER_COMPANY, true - case 1364: - return BACnetVendorId_INDUSTRIAL_TURNAROUND_CORPORATIONITAC, true - case 1365: - return BACnetVendorId_WADSWORTH_CONTROL_SYSTEMS, true - case 1366: - return BACnetVendorId_SERVICES_HILO_INC, true - case 1367: - return BACnetVendorId_IDM_ENERGIESYSTEME_GMBH, true - case 1368: - return BACnetVendorId_BE_NEXTBV, true - case 1369: - return BACnetVendorId_CLEAN_AIRAI_CORPORATION, true - case 137: - return BACnetVendorId_AF_DTEK_DIVISIONOF_FASTEK_INTERNATIONAL_INC, true - case 1370: - return BACnetVendorId_REVOLUTION_MICROELECTRONICS_AMERICA_INC, true - case 1371: - return BACnetVendorId_ARENDARIT_SECURITY_GMBH, true - case 1372: - return BACnetVendorId_ZED_BEE_TECHNOLOGIES_PVT_LTD, true - case 1373: - return BACnetVendorId_WINMATE_TECHNOLOGY_SOLUTIONS_PVT_LTD, true - case 1374: - return BACnetVendorId_SENTICON_LTD, true - case 1375: - return BACnetVendorId_ROSSAKERAB, true - case 1376: - return BACnetVendorId_OPIT_SOLUTIONS_LTD, true - case 1377: - return BACnetVendorId_HOTOWELL_INTERNATIONAL_CO_LIMITED, true - case 1378: - return BACnetVendorId_INIM_ELECTRONICSSRL_UNIPERSONALE, true - case 1379: - return BACnetVendorId_AIRTHINGSASA, true - case 138: - return BACnetVendorId_POWER_COLD_COMFORT_AIR_SOLUTIONS_INC, true - case 1380: - return BACnetVendorId_ANALOG_DEVICES_INC, true - case 1381: - return BACnetVendorId_AI_DIRECTIONSDMCC, true - case 1382: - return BACnetVendorId_PRIMA_ELECTRO_SPA, true - case 1383: - return BACnetVendorId_KLT_CONTROL_SYSTEM_LTD, true - case 1384: - return BACnetVendorId_EVOLUTION_CONTROLS_INC, true - case 1385: - return BACnetVendorId_BEVER_INNOVATIONS, true - case 1386: - return BACnetVendorId_PELICAN_WIRELESS_SYSTEMS, true - case 1387: - return BACnetVendorId_CONTROL_CONCEPTS_INC, true - case 1388: - return BACnetVendorId_AUGMATIC_TECHNOLOGIES_PVT_LTD, true - case 1389: - return BACnetVendorId_XIAMEN_MILESIGHTLOT_CO_LTD, true - case 139: - return BACnetVendorId_I_CONTROLS, true - case 1390: - return BACnetVendorId_TIANJIN_ANJIELOT_SCHIENCEAND_TECHNOLOGY_CO_LTD, true - case 1391: - return BACnetVendorId_GUANGZHOUS_ENERGY_ELECTRONICS_TECHNOLOGY_CO_LTD, true - case 1392: - return BACnetVendorId_AKVO_ATMOSPHERIC_WATER_SYSTEMS_PVT_LTD, true - case 1393: - return BACnetVendorId_EM_FIRST_CO_LTD, true - case 1394: - return BACnetVendorId_IION_SYSTEMS_APS, true - case 1396: - return BACnetVendorId_SAF_TEHNIKAJSC, true - case 1397: - return BACnetVendorId_KOMFORTIQ_INC, true - case 1398: - return BACnetVendorId_COOL_TERA_LIMITED, true - case 1399: - return BACnetVendorId_HADRON_SOLUTIONS_SRLS, true - case 14: - return BACnetVendorId_CIMETRICS_TECHNOLOGY, true - case 140: - return BACnetVendorId_VICONICS_ELECTRONICS_INC, true - case 1401: - return BACnetVendorId_BITPOOL, true - case 1402: - return BACnetVendorId_SONICULLC, true - case 1403: - return BACnetVendorId_RISHABH_INSTRUMENTS_LIMITED, true - case 1404: - return BACnetVendorId_THING_WAREHOUSELLC, true - case 1405: - return BACnetVendorId_INNOFRIENDS_GMBH, true - case 1406: - return BACnetVendorId_METRONICAKP_SPJ, true - case 141: - return BACnetVendorId_YASKAWA_AMERICA_INC, true - case 142: - return BACnetVendorId_DEO_SCONTROLSYSTEMS_GMBH, true - case 143: - return BACnetVendorId_DIGITALE_MESSUND_STEUERSYSTEMEAG, true - case 144: - return BACnetVendorId_FUJITSU_GENERAL_LIMITED, true - case 145: - return BACnetVendorId_PROJECT_ENGINEERING_SRL, true - case 146: - return BACnetVendorId_SANYO_ELECTRIC_CO_LTD, true - case 147: - return BACnetVendorId_INTEGRATED_INFORMATION_SYSTEMS_INC, true - case 148: - return BACnetVendorId_TEMCO_CONTROLS_LTD, true - case 149: - return BACnetVendorId_AIRTEK_INTERNATIONAL_INC, true - case 15: - return BACnetVendorId_CORNELL_UNIVERSITY, true - case 150: - return BACnetVendorId_ADVANTECH_CORPORATION, true - case 151: - return BACnetVendorId_TITAN_PRODUCTS_LTD, true - case 152: - return BACnetVendorId_REGEL_PARTNERS, true - case 153: - return BACnetVendorId_NATIONAL_ENVIRONMENTAL_PRODUCT, true - case 154: - return BACnetVendorId_UNITEC_CORPORATION, true - case 155: - return BACnetVendorId_KANDEN_ENGINEERING_COMPANY, true - case 156: - return BACnetVendorId_MESSNER_GEBUDETECHNIK_GMBH, true - case 157: - return BACnetVendorId_INTEGRATEDCH, true - case 158: - return BACnetVendorId_PRICE_INDUSTRIES, true - case 159: - return BACnetVendorId_SE_ELEKTRONIC_GMBH, true - case 16: - return BACnetVendorId_UNITED_TECHNOLOGIES_CARRIER, true - case 160: - return BACnetVendorId_ROCKWELL_AUTOMATION, true - case 161: - return BACnetVendorId_ENFLEX_CORP, true - case 162: - return BACnetVendorId_ASI_CONTROLS, true - case 163: - return BACnetVendorId_SYS_MIK_GMBH_DRESDEN, true - case 164: - return BACnetVendorId_HSC_REGELUNGSTECHNIK_GMBH, true - case 165: - return BACnetVendorId_SMART_TEMP_AUSTRALIA_PTY_LTD, true - case 166: - return BACnetVendorId_COOPER_CONTROLS, true - case 167: - return BACnetVendorId_DUKSAN_MECASYS_CO_LTD, true - case 168: - return BACnetVendorId_FUJIIT_CO_LTD, true - case 169: - return BACnetVendorId_VACON_PLC, true - case 17: - return BACnetVendorId_HONEYWELL_INC, true - case 170: - return BACnetVendorId_LEADER_CONTROLS, true - case 171: - return BACnetVendorId_ABB_FORMERLY_CYLON_CONTROLS_LTD, true - case 172: - return BACnetVendorId_COMPAS, true - case 173: - return BACnetVendorId_MITSUBISHI_ELECTRIC_BUILDING_TECHNO_SERVICE_CO_LTD, true - case 174: - return BACnetVendorId_BUILDING_CONTROL_INTEGRATORS, true - case 175: - return BACnetVendorId_ITG_WORLDWIDEM_SDN_BHD, true - case 176: - return BACnetVendorId_LUTRON_ELECTRONICS_CO_INC, true - case 177: - return BACnetVendorId_COOPER_ATKINS_CORPORATION, true - case 178: - return BACnetVendorId_LOYTEC_ELECTRONICS_GMBH, true - case 179: - return BACnetVendorId_PRO_LON, true - case 18: - return BACnetVendorId_ALERTON_HONEYWELL, true - case 180: - return BACnetVendorId_MEGA_CONTROLS_LIMITED, true - case 181: - return BACnetVendorId_MICRO_CONTROL_SYSTEMS_INC, true - case 182: - return BACnetVendorId_KIYON_INC, true - case 183: - return BACnetVendorId_DUST_NETWORKS, true - case 184: - return BACnetVendorId_ADVANCED_BUILDING_AUTOMATION_SYSTEMS, true - case 185: - return BACnetVendorId_HERMOSAG, true - case 186: - return BACnetVendorId_CEZIM, true - case 187: - return BACnetVendorId_SOFTING, true - case 188: - return BACnetVendorId_LYNXSPRING_INC, true - case 189: - return BACnetVendorId_SCHNEIDER_TOSHIBA_INVERTER_EUROPE, true - case 19: - return BACnetVendorId_TACAB, true - case 190: - return BACnetVendorId_DANFOSS_DRIVESAS, true - case 191: - return BACnetVendorId_EATON_CORPORATION, true - case 192: - return BACnetVendorId_MATYCASA, true - case 193: - return BACnetVendorId_BOTECHAB, true - case 194: - return BACnetVendorId_NOVEO_INC, true - case 195: - return BACnetVendorId_AMEV, true - case 196: - return BACnetVendorId_YOKOGAWA_ELECTRIC_CORPORATION, true - case 197: - return BACnetVendorId_BOSCH_BUILDING_AUTOMATION_GMBH, true - case 198: - return BACnetVendorId_EXACT_LOGIC, true - case 199: - return BACnetVendorId_MASS_ELECTRONICS_PTY_LTDDBA_INNOTECH_CONTROL_SYSTEMS_AUSTRALIA, true - case 2: - return BACnetVendorId_THE_TRANE_COMPANY, true - case 20: - return BACnetVendorId_HEWLETT_PACKARD_COMPANY, true - case 200: - return BACnetVendorId_KANDENKO_CO_LTD, true - case 201: - return BACnetVendorId_DTF_DATEN_TECHNIK_FRIES, true - case 202: - return BACnetVendorId_KLIMASOFT_LTD, true - case 203: - return BACnetVendorId_TOSHIBA_SCHNEIDER_INVERTER_CORPORATION, true - case 204: - return BACnetVendorId_CONTROL_APPLICATIONS_LTD, true - case 205: - return BACnetVendorId_CIMONCO_LTD, true - case 206: - return BACnetVendorId_ONICON_INCORPORATED, true - case 207: - return BACnetVendorId_AUTOMATION_DISPLAYS_INC, true - case 208: - return BACnetVendorId_CONTROL_SOLUTIONS_INC, true - case 209: - return BACnetVendorId_REMSDAQ_LIMITED, true - case 21: - return BACnetVendorId_DORSETTES_INC, true - case 210: - return BACnetVendorId_NTT_FACILITIES_INC, true - case 211: - return BACnetVendorId_VIPA_GMBH, true - case 212: - return BACnetVendorId_TSC1_ASSOCIATIONOF_JAPAN, true - case 213: - return BACnetVendorId_STRATO_AUTOMATION, true - case 214: - return BACnetVendorId_HRW_LIMITED, true - case 215: - return BACnetVendorId_LIGHTING_CONTROL_DESIGN_INC, true - case 216: - return BACnetVendorId_MERCY_ELECTRONICAND_ELECTRICAL_INDUSTRIES, true - case 217: - return BACnetVendorId_SAMSUNGSDS_CO_LTD, true - case 218: - return BACnetVendorId_IMPACT_FACILITY_SOLUTIONS_INC, true - case 219: - return BACnetVendorId_AIRCUITY, true - case 22: - return BACnetVendorId_SIEMENS_SCHWEIZAG_FORMERLY_CERBERUSAG, true - case 220: - return BACnetVendorId_CONTROL_TECHNIQUES_LTD, true - case 221: - return BACnetVendorId_OPEN_GENERAL_PTY_LTD, true - case 222: - return BACnetVendorId_WAGO_KONTAKTTECHNIK_GMBH_COKG, true - case 223: - return BACnetVendorId_CERUS_INDUSTRIAL, true - case 224: - return BACnetVendorId_CHLORIDE_POWER_PROTECTION_COMPANY, true - case 225: - return BACnetVendorId_COMPUTROLS_INC, true - case 226: - return BACnetVendorId_PHOENIX_CONTACT_GMBH_COKG, true - case 227: - return BACnetVendorId_GRUNDFOS_MANAGEMENTAS, true - case 228: - return BACnetVendorId_RIDDER_DRIVE_SYSTEMS, true - case 229: - return BACnetVendorId_SOFT_DEVICESDNBHD, true - case 23: - return BACnetVendorId_YORK_CONTROLS_GROUP, true - case 230: - return BACnetVendorId_INTEGRATED_CONTROL_TECHNOLOGY_LIMITED, true - case 231: - return BACnetVendorId_AI_RXPERT_SYSTEMS_INC, true - case 232: - return BACnetVendorId_MICROTROL_LIMITED, true - case 233: - return BACnetVendorId_RED_LION_CONTROLS, true - case 234: - return BACnetVendorId_DIGITAL_ELECTRONICS_CORPORATION, true - case 235: - return BACnetVendorId_ENNOVATIS_GMBH, true - case 236: - return BACnetVendorId_SEROTONIN_SOFTWARE_TECHNOLOGIES_INC, true - case 237: - return BACnetVendorId_LS_INDUSTRIAL_SYSTEMS_CO_LTD, true - case 238: - return BACnetVendorId_SQUARED_COMPANY, true - case 239: - return BACnetVendorId_S_SQUARED_INNOVATIONS_INC, true - case 24: - return BACnetVendorId_AUTOMATED_LOGIC_CORPORATION, true - case 240: - return BACnetVendorId_ARICENT_LTD, true - case 241: - return BACnetVendorId_ETHER_METRICSLLC, true - case 242: - return BACnetVendorId_INDUSTRIAL_CONTROL_COMMUNICATIONS_INC, true - case 243: - return BACnetVendorId_PARAGON_CONTROLS_INC, true - case 244: - return BACnetVendorId_AO_SMITH_CORPORATION, true - case 245: - return BACnetVendorId_CONTEMPORARY_CONTROL_SYSTEMS_INC, true - case 246: - return BACnetVendorId_HMS_INDUSTRIAL_NETWORKSSLU, true - case 247: - return BACnetVendorId_INGENIEURGESELLSCHAFTN_HARTLEBMBH, true - case 248: - return BACnetVendorId_HEAT_TIMER_CORPORATION, true - case 249: - return BACnetVendorId_INGRASYS_TECHNOLOGY_INC, true - case 25: - return BACnetVendorId_CSI_CONTROL_SYSTEMS_INTERNATIONAL, true - case 250: - return BACnetVendorId_COSTERM_BUILDING_AUTOMATION, true - case 251: - return BACnetVendorId_WILOSE, true - case 252: - return BACnetVendorId_EMBEDIA_TECHNOLOGIES_CORP, true - case 253: - return BACnetVendorId_TECHNILOG, true - case 254: - return BACnetVendorId_HR_CONTROLS_LTD_COKG, true - case 255: - return BACnetVendorId_LENNOX_INTERNATIONAL_INC, true - case 256: - return BACnetVendorId_RK_TEC_RAUCHKLAPPEN_STEUERUNGSSYSTEME_GMBH_COKG, true - case 257: - return BACnetVendorId_THERMOMAX_LTD, true - case 258: - return BACnetVendorId_ELCON_ELECTRONIC_CONTROL_LTD, true - case 259: - return BACnetVendorId_LARMIA_CONTROLAB, true - case 26: - return BACnetVendorId_PHOENIX_CONTROLS_CORPORATION, true - case 260: - return BACnetVendorId_BA_CNET_STACKAT_SOURCE_FORGE, true - case 261: - return BACnetVendorId_GS_SECURITY_SERVICESAS, true - case 262: - return BACnetVendorId_EXOR_INTERNATIONAL_SPA, true - case 263: - return BACnetVendorId_CRISTAL_CONTROLES, true - case 264: - return BACnetVendorId_REGINAB, true - case 265: - return BACnetVendorId_DIMENSION_SOFTWARE_INC, true - case 266: - return BACnetVendorId_SYNAP_SENSE_CORPORATION, true - case 267: - return BACnetVendorId_BEIJING_NANTREE_ELECTRONIC_CO_LTD, true - case 268: - return BACnetVendorId_CAMUS_HYDRONICS_LTD, true - case 269: - return BACnetVendorId_KAWASAKI_HEAVY_INDUSTRIES_LTD, true - case 27: - return BACnetVendorId_INNOVEX_TECHNOLOGIES_INC, true - case 270: - return BACnetVendorId_CRITICAL_ENVIRONMENT_TECHNOLOGIES, true - case 271: - return BACnetVendorId_ILSHINIBS_CO_LTD, true - case 272: - return BACnetVendorId_ELESTA_ENERGY_CONTROLAG, true - case 273: - return BACnetVendorId_KROPMAN_INSTALLATIETECHNIEK, true - case 274: - return BACnetVendorId_BALDOR_ELECTRIC_COMPANY, true - case 275: - return BACnetVendorId_ING_AMBH, true - case 276: - return BACnetVendorId_GE_CONSUMER_INDUSTRIAL, true - case 277: - return BACnetVendorId_FUNCTIONAL_DEVICES_INC, true - case 278: - return BACnetVendorId_STUDIOSC, true - case 279: - return BACnetVendorId_M_SYSTEM_CO_LTD, true - case 28: - return BACnetVendorId_KMC_CONTROLS_INC, true - case 280: - return BACnetVendorId_YOKOTA_CO_LTD, true - case 281: - return BACnetVendorId_HITRANSE_TECHNOLOGY_COLTD, true - case 282: - return BACnetVendorId_VIGILENT_CORPORATION, true - case 283: - return BACnetVendorId_KELE_INC, true - case 284: - return BACnetVendorId_OPERA_ELECTRONICS_INC, true - case 285: - return BACnetVendorId_GENTEC, true - case 286: - return BACnetVendorId_EMBEDDED_SCIENCE_LABSLLC, true - case 287: - return BACnetVendorId_PARKER_HANNIFIN_CORPORATION, true - case 288: - return BACnetVendorId_MA_CAPS_INTERNATIONAL_LIMITED, true - case 289: - return BACnetVendorId_LINK_CORPORATION, true - case 29: - return BACnetVendorId_XN_TECHNOLOGIES_INC, true - case 290: - return BACnetVendorId_ROMUTEC_STEUERU_REGELSYSTEME_GMBH, true - case 291: - return BACnetVendorId_PRIBUSIN_INC, true - case 292: - return BACnetVendorId_ADVANTAGE_CONTROLS, true - case 293: - return BACnetVendorId_CRITICAL_ROOM_CONTROL, true - case 294: - return BACnetVendorId_LEGRAND, true - case 295: - return BACnetVendorId_TONGDY_CONTROL_TECHNOLOGY_CO_LTD, true - case 296: - return BACnetVendorId_ISSARO_INTEGRIERTE_SYSTEMTECHNIK, true - case 297: - return BACnetVendorId_PRO_DEV_INDUSTRIES, true - case 298: - return BACnetVendorId_DRISTEEM, true - case 299: - return BACnetVendorId_CREATIVE_ELECTRONIC_GMBH, true - case 3: - return BACnetVendorId_MC_QUAY_INTERNATIONAL, true - case 30: - return BACnetVendorId_HYUNDAI_INFORMATION_TECHNOLOGY_CO_LTD, true - case 300: - return BACnetVendorId_SWEGONAB, true - case 301: - return BACnetVendorId_FIRVEN_ASRO, true - case 302: - return BACnetVendorId_HITACHI_APPLIANCES_INC, true - case 303: - return BACnetVendorId_REAL_TIME_AUTOMATION_INC, true - case 304: - return BACnetVendorId_ITEC_HANKYU_HANSHIN_CO, true - case 305: - return BACnetVendorId_CYRUSEM_ENGINEERING_CO_LTD, true - case 306: - return BACnetVendorId_BADGER_METER, true - case 307: - return BACnetVendorId_CIRRASCALE_CORPORATION, true - case 308: - return BACnetVendorId_ELESTA_GMBH_BUILDING_AUTOMATION, true - case 309: - return BACnetVendorId_SECURITON, true - case 31: - return BACnetVendorId_TOKIMEC_INC, true - case 310: - return BACnetVendorId_O_SLSOFT_INC, true - case 311: - return BACnetVendorId_HANAZEDER_ELECTRONIC_GMBH, true - case 312: - return BACnetVendorId_HONEYWELL_SECURITY_DEUTSCHLAND_NOVAR_GMBH, true - case 313: - return BACnetVendorId_SIEMENS_INDUSTRY_INC, true - case 314: - return BACnetVendorId_ETM_PROFESSIONAL_CONTROL_GMBH, true - case 315: - return BACnetVendorId_MEITAVTEC_LTD, true - case 316: - return BACnetVendorId_JANITZA_ELECTRONICS_GMBH, true - case 317: - return BACnetVendorId_MKS_NORDHAUSEN, true - case 318: - return BACnetVendorId_DE_GIER_DRIVE_SYSTEMSBV, true - case 319: - return BACnetVendorId_CYPRESS_ENVIROSYSTEMS, true - case 32: - return BACnetVendorId_SIMPLEX, true - case 320: - return BACnetVendorId_SMAR_TRONSRO, true - case 321: - return BACnetVendorId_VERARI_SYSTEMS_INC, true - case 322: - return BACnetVendorId_KW_ELECTRONIC_SERVICE_INC, true - case 323: - return BACnetVendorId_ALFASMART_ENERGY_MANAGEMENT, true - case 324: - return BACnetVendorId_TELKONET_INC, true - case 325: - return BACnetVendorId_SECURITON_GMBH, true - case 326: - return BACnetVendorId_CEMTREX_INC, true - case 327: - return BACnetVendorId_PERFORMANCE_TECHNOLOGIES_INC, true - case 328: - return BACnetVendorId_XTRALIS_AUST_PTY_LTD, true - case 329: - return BACnetVendorId_TROX_GMBH, true - case 33: - return BACnetVendorId_NORTH_BUILDING_TECHNOLOGIES_LIMITED, true - case 330: - return BACnetVendorId_BEIJING_HYSINE_TECHNOLOGY_CO_LTD, true - case 331: - return BACnetVendorId_RCK_CONTROLS_INC, true - case 332: - return BACnetVendorId_DISTECH_CONTROLSSAS, true - case 333: - return BACnetVendorId_NOVAR_HONEYWELL, true - case 334: - return BACnetVendorId_THES_GROUP_INC, true - case 335: - return BACnetVendorId_SCHNEIDER_ELECTRIC1, true - case 336: - return BACnetVendorId_LHA_SYSTEMS, true - case 337: - return BACnetVendorId_GH_MENGINEERING_GROUP_INC, true - case 338: - return BACnetVendorId_CLLIMALUXSA, true - case 339: - return BACnetVendorId_VAISALA_OYJ, true - case 34: - return BACnetVendorId_NOTIFIER, true - case 340: - return BACnetVendorId_COMPLEX_BEIJING_TECHNOLOGY_COLTD, true - case 341: - return BACnetVendorId_SCAD_AMETRICS, true - case 342: - return BACnetVendorId_POWERPEGNSI_LIMITED, true - case 343: - return BACnetVendorId_BA_CNET_INTEROPERABILITY_TESTING_SERVICES_INC, true - case 344: - return BACnetVendorId_TECOAS, true - case 345: - return BACnetVendorId_PLEXUS_TECHNOLOGY_INC, true - case 346: - return BACnetVendorId_ENERGY_FOCUS_INC, true - case 347: - return BACnetVendorId_POWERSMITHS_INTERNATIONAL_CORP, true - case 348: - return BACnetVendorId_NICHIBEI_CO_LTD, true - case 349: - return BACnetVendorId_HKC_TECHNOLOGY_LTD, true - case 35: - return BACnetVendorId_RELIABLE_CONTROLS_CORPORATION, true - case 350: - return BACnetVendorId_OVATION_NETWORKS_INC, true - case 351: - return BACnetVendorId_SETRA_SYSTEMS, true - case 352: - return BACnetVendorId_AVG_AUTOMATION, true - case 353: - return BACnetVendorId_ZXC_LTD, true - case 354: - return BACnetVendorId_BYTE_SPHERE, true - case 355: - return BACnetVendorId_GENERITON_CO_LTD, true - case 356: - return BACnetVendorId_HOLTER_REGELARMATUREN_GMBH_COKG, true - case 357: - return BACnetVendorId_BEDFORD_INSTRUMENTSLLC, true - case 358: - return BACnetVendorId_STANDAIR_INC, true - case 359: - return BACnetVendorId_WEG_AUTOMATIONRD, true - case 36: - return BACnetVendorId_TRIDIUM_INC, true - case 360: - return BACnetVendorId_PROLON_CONTROL_SYSTEMS_APS, true - case 361: - return BACnetVendorId_INNEASOFT, true - case 362: - return BACnetVendorId_CONNEX_SOFT_GMBH, true - case 363: - return BACnetVendorId_CEAG_NOTLICHTSYSTEME_GMBH, true - case 364: - return BACnetVendorId_DISTECH_CONTROLS_INC, true - case 365: - return BACnetVendorId_INDUSTRIAL_TECHNOLOGY_RESEARCH_INSTITUTE, true - case 366: - return BACnetVendorId_ICONICS_INC, true - case 367: - return BACnetVendorId_IQ_CONTROLSSC, true - case 368: - return BACnetVendorId_OJ_ELECTRONICSAS, true - case 369: - return BACnetVendorId_ROLBIT_LTD, true - case 37: - return BACnetVendorId_MSA_SAFETY, true - case 370: - return BACnetVendorId_SYNAPSYS_SOLUTIONS_LTD, true - case 371: - return BACnetVendorId_ACME_ENGINEERING_PROD_LTD, true - case 372: - return BACnetVendorId_ZENER_ELECTRIC_PTY_LTD, true - case 373: - return BACnetVendorId_SELECTRONIX_INC, true - case 374: - return BACnetVendorId_GORBET_BANERJEELLC, true - case 375: - return BACnetVendorId_IME, true - case 376: - return BACnetVendorId_STEPHENH_DAWSON_COMPUTER_SERVICE, true - case 377: - return BACnetVendorId_ACCUTROLLLC, true - case 378: - return BACnetVendorId_SCHNEIDER_ELEKTRONIK_GMBH, true - case 379: - return BACnetVendorId_ALPHA_INNO_TEC_GMBH, true - case 38: - return BACnetVendorId_SILICON_ENERGY, true - case 380: - return BACnetVendorId_ADM_MICRO_INC, true - case 381: - return BACnetVendorId_GREYSTONE_ENERGY_SYSTEMS_INC, true - case 382: - return BACnetVendorId_CAP_TECHNOLOGIE, true - case 383: - return BACnetVendorId_KE_RO_SYSTEMS, true - case 384: - return BACnetVendorId_DOMAT_CONTROL_SYSTEMSRO, true - case 385: - return BACnetVendorId_EFEKTRONICS_PTY_LTD, true - case 386: - return BACnetVendorId_HEKATRON_VERTRIEBS_GMBH, true - case 387: - return BACnetVendorId_SECURITONAG, true - case 388: - return BACnetVendorId_CARLO_GAVAZZI_CONTROLS_SPA, true - case 389: - return BACnetVendorId_CHIPKIN_AUTOMATION_SYSTEMS, true - case 39: - return BACnetVendorId_KIEBACK_PETER_GMBH_COKG, true - case 390: - return BACnetVendorId_SAVANT_SYSTEMSLLC, true - case 391: - return BACnetVendorId_SIMMTRONIC_LIGHTING_CONTROLS, true - case 392: - return BACnetVendorId_ABELKO_INNOVATIONAB, true - case 393: - return BACnetVendorId_SERESCO_TECHNOLOGIES_INC, true - case 394: - return BACnetVendorId_IT_WATCHDOGS, true - case 395: - return BACnetVendorId_AUTOMATION_ASSIST_JAPAN_CORP, true - case 396: - return BACnetVendorId_THERMOKON_SENSORTECHNIK_GMBH, true - case 397: - return BACnetVendorId_E_GAUGE_SYSTEMSLLC, true - case 398: - return BACnetVendorId_QUANTUM_AUTOMATIONASIAPTE_LTD, true - case 399: - return BACnetVendorId_TOSHIBA_LIGHTING_TECHNOLOGY_CORP, true - case 4: - return BACnetVendorId_POLAR_SOFT, true - case 40: - return BACnetVendorId_ANACON_SYSTEMS_INC, true - case 400: - return BACnetVendorId_SPIN_ENGENHARIADE_AUTOMAO_LTDA, true - case 401: - return BACnetVendorId_LOGISTICS_SYSTEMS_SOFTWARE_SERVICES_INDIAPVT_LTD, true - case 402: - return BACnetVendorId_DELTA_CONTROLS_INTEGRATION_PRODUCTS, true - case 403: - return BACnetVendorId_FOCUS_MEDIA, true - case 404: - return BACnetVendorId_LUM_ENERGI_INC, true - case 405: - return BACnetVendorId_KARA_SYSTEMS, true - case 406: - return BACnetVendorId_RF_CODE_INC, true - case 407: - return BACnetVendorId_FATEK_AUTOMATION_CORP, true - case 408: - return BACnetVendorId_JANDA_SOFTWARE_COMPANYLLC, true - case 409: - return BACnetVendorId_OPEN_SYSTEM_SOLUTIONS_LIMITED, true - case 41: - return BACnetVendorId_SYSTEMS_CONTROLS_INSTRUMENTSLLC, true - case 410: - return BACnetVendorId_INTELEC_SYSTEMSPTY_LTD, true - case 411: - return BACnetVendorId_ECOLODGIXLLC, true - case 412: - return BACnetVendorId_DOUGLAS_LIGHTING_CONTROLS, true - case 413: - return BACnetVendorId_IS_ATECH_GMBH, true - case 414: - return BACnetVendorId_AREAL, true - case 415: - return BACnetVendorId_BECKHOFF_AUTOMATION, true - case 416: - return BACnetVendorId_IPAS_GMBH, true - case 417: - return BACnetVendorId_KE_THERM_SOLUTIONS, true - case 418: - return BACnetVendorId_BASE_PRODUCTS, true - case 419: - return BACnetVendorId_DTL_CONTROLSLLC, true - case 42: - return BACnetVendorId_ACUITY_BRANDS_LIGHTING_INC, true - case 420: - return BACnetVendorId_INNCOM_INTERNATIONAL_INC, true - case 421: - return BACnetVendorId_METZCONNECT_GMBH, true - case 422: - return BACnetVendorId_GREENTROL_AUTOMATION_INC, true - case 423: - return BACnetVendorId_BELIMO_AUTOMATIONAG, true - case 424: - return BACnetVendorId_SAMSUNG_HEAVY_INDUSTRIES_CO_LTD, true - case 425: - return BACnetVendorId_TRIACTA_POWER_TECHNOLOGIES_INC, true - case 426: - return BACnetVendorId_GLOBESTAR_SYSTEMS, true - case 427: - return BACnetVendorId_MLB_ADVANCED_MEDIALP, true - case 428: - return BACnetVendorId_SWG_STUCKMANN_WIRTSCHAFTLICHE_GEBUDESYSTEME_GMBH, true - case 429: - return BACnetVendorId_SENSOR_SWITCH, true - case 43: - return BACnetVendorId_MICROPOWER_MANUFACTURING, true - case 430: - return BACnetVendorId_MULTITEK_POWER_LIMITED, true - case 431: - return BACnetVendorId_AQUAMETROAG, true - case 432: - return BACnetVendorId_LG_ELECTRONICS_INC, true - case 433: - return BACnetVendorId_ELECTRONIC_THEATRE_CONTROLS_INC, true - case 434: - return BACnetVendorId_MITSUBISHI_ELECTRIC_CORPORATION_NAGOYA_WORKS, true - case 435: - return BACnetVendorId_DELTA_ELECTRONICS_INC, true - case 436: - return BACnetVendorId_ELMA_KURTALJ_LTD, true - case 437: - return BACnetVendorId_TYCO_FIRE_SECURITY_GMBH, true - case 438: - return BACnetVendorId_NEDAP_SECURITY_MANAGEMENT, true - case 439: - return BACnetVendorId_ESC_AUTOMATION_INC, true - case 44: - return BACnetVendorId_MATRIX_CONTROLS, true - case 440: - return BACnetVendorId_DSPYOU_LTD, true - case 441: - return BACnetVendorId_GE_SENSINGAND_INSPECTION_TECHNOLOGIES, true - case 442: - return BACnetVendorId_EMBEDDED_SYSTEMSSIA, true - case 443: - return BACnetVendorId_BEFEGA_GMBH, true - case 444: - return BACnetVendorId_BASELINE_INC, true - case 445: - return BACnetVendorId_KEY_ACT, true - case 446: - return BACnetVendorId_OEM_CTRL, true - case 447: - return BACnetVendorId_CLARKSON_CONTROLS_LIMITED, true - case 448: - return BACnetVendorId_ROGERWELL_CONTROL_SYSTEM_LIMITED, true - case 449: - return BACnetVendorId_SCL_ELEMENTS, true - case 45: - return BACnetVendorId_METALAIRE, true - case 450: - return BACnetVendorId_HITACHI_LTD1, true - case 451: - return BACnetVendorId_NEWRON_SYSTEMSA, true - case 452: - return BACnetVendorId_BEVECO_GEBOUWAUTOMATISERINGBV, true - case 453: - return BACnetVendorId_STREAMSIDE_SOLUTIONS, true - case 454: - return BACnetVendorId_YELLOWSTONE_SOFT, true - case 455: - return BACnetVendorId_OZTECH_INTELLIGENT_SYSTEMS_PTY_LTD, true - case 456: - return BACnetVendorId_NOVELAN_GMBH, true - case 457: - return BACnetVendorId_FLEXIM_AMERICAS_CORPORATION, true - case 458: - return BACnetVendorId_ICPDAS_CO_LTD, true - case 459: - return BACnetVendorId_CARMA_INDUSTRIES_INC, true - case 46: - return BACnetVendorId_ESS_ENGINEERING, true - case 460: - return BACnetVendorId_LOG_ONE_LTD, true - case 461: - return BACnetVendorId_TECO_ELECTRIC_MACHINERY_CO_LTD, true - case 462: - return BACnetVendorId_CONNECT_EX_INC, true - case 463: - return BACnetVendorId_TURBODDC_SDWEST, true - case 464: - return BACnetVendorId_QUATROSENSE_ENVIRONMENTAL_LTD, true - case 465: - return BACnetVendorId_FIFTH_LIGHT_TECHNOLOGY_LTD, true - case 466: - return BACnetVendorId_SCIENTIFIC_SOLUTIONS_LTD, true - case 467: - return BACnetVendorId_CONTROLLER_AREA_NETWORK_SOLUTIONSM_SDN_BHD, true - case 468: - return BACnetVendorId_RESOL_ELEKTRONISCHE_REGELUNGEN_GMBH, true - case 469: - return BACnetVendorId_RPBUSLLC, true - case 47: - return BACnetVendorId_SPHERE_SYSTEMS_PTY_LTD, true - case 470: - return BACnetVendorId_BRS_SISTEMAS_ELETRONICOS, true - case 471: - return BACnetVendorId_WINDOW_MASTERAS, true - case 472: - return BACnetVendorId_SUNLUX_TECHNOLOGIES_LTD, true - case 473: - return BACnetVendorId_MEASURLOGIC, true - case 474: - return BACnetVendorId_FRIMAT_GMBH, true - case 475: - return BACnetVendorId_SPIRAX_SARCO, true - case 476: - return BACnetVendorId_LUXTRON, true - case 477: - return BACnetVendorId_RAYPAK_INC, true - case 478: - return BACnetVendorId_AIR_MONITOR_CORPORATION1, true - case 479: - return BACnetVendorId_REGLER_OCH_WEBBTEKNIK_SVERIGEROWS, true - case 48: - return BACnetVendorId_WALKER_TECHNOLOGIES_CORPORATION, true - case 480: - return BACnetVendorId_INTELLIGENT_LIGHTING_CONTROLS_INC, true - case 481: - return BACnetVendorId_SANYO_ELECTRIC_INDUSTRY_CO_LTD, true - case 482: - return BACnetVendorId_E_MON_ENERGY_MONITORING_PRODUCTS, true - case 483: - return BACnetVendorId_DIGITAL_CONTROL_SYSTEMS, true - case 484: - return BACnetVendorId_ATI_AIRTEST_TECHNOLOGIES_INC, true - case 485: - return BACnetVendorId_SCSSA, true - case 486: - return BACnetVendorId_HMS_INDUSTRIAL_NETWORKSAB, true - case 487: - return BACnetVendorId_SHENZHEN_UNIVERSAL_INTELLISYS_CO_LTD, true - case 488: - return BACnetVendorId_EK_INTELLISYS_SDN_BHD, true - case 489: - return BACnetVendorId_SYS_COM, true - case 49: - return BACnetVendorId_HI_SOLUTIONS_INC, true - case 490: - return BACnetVendorId_FIRECOM_INC, true - case 491: - return BACnetVendorId_ESA_ELEKTROSCHALTANLAGEN_GRIMMA_GMBH, true - case 492: - return BACnetVendorId_KUMAHIRA_CO_LTD, true - case 493: - return BACnetVendorId_HOTRACO, true - case 494: - return BACnetVendorId_SABO_ELEKTRONIK_GMBH, true - case 495: - return BACnetVendorId_EQUIP_TRANS, true - case 496: - return BACnetVendorId_TEMPERATURE_CONTROL_SPECIALITIES_CO_INCTCS, true - case 497: - return BACnetVendorId_FLOW_CON_INTERNATIONALAS, true - case 498: - return BACnetVendorId_THYSSEN_KRUPP_ELEVATOR_AMERICAS, true - case 499: - return BACnetVendorId_ABATEMENT_TECHNOLOGIES, true - case 5: - return BACnetVendorId_JOHNSON_CONTROLS_INC, true - case 50: - return BACnetVendorId_MBS_GMBH, true - case 500: - return BACnetVendorId_CONTINENTAL_CONTROL_SYSTEMSLLC, true - case 501: - return BACnetVendorId_WISAG_AUTOMATISIERUNGSTECHNIK_GMBH_COKG, true - case 502: - return BACnetVendorId_EASYIO, true - case 503: - return BACnetVendorId_EAP_ELECTRIC_GMBH, true - case 504: - return BACnetVendorId_HARDMEIER, true - case 505: - return BACnetVendorId_MIRCOM_GROUPOF_COMPANIES, true - case 506: - return BACnetVendorId_QUEST_CONTROLS, true - case 507: - return BACnetVendorId_MESTEK_INC, true - case 508: - return BACnetVendorId_PULSE_ENERGY, true - case 509: - return BACnetVendorId_TACHIKAWA_CORPORATION, true - case 51: - return BACnetVendorId_SAMSONAG, true - case 510: - return BACnetVendorId_UNIVERSITYOF_NEBRASKA_LINCOLN, true - case 511: - return BACnetVendorId_REDWOOD_SYSTEMS, true - case 512: - return BACnetVendorId_PAS_STEC_INDUSTRIE_ELEKTRONIK_GMBH, true - case 513: - return BACnetVendorId_NGEK_INC, true - case 514: - return BACnetVendorId_TMAC_TECHNOLOGIES, true - case 515: - return BACnetVendorId_JIREH_ENERGY_TECH_CO_LTD, true - case 516: - return BACnetVendorId_ENLIGHTED_INC, true - case 517: - return BACnetVendorId_EL_PIAST_SP_ZOO, true - case 518: - return BACnetVendorId_NETX_AUTOMATION_SOFTWARE_GMBH, true - case 519: - return BACnetVendorId_INVERTEK_DRIVES, true - case 52: - return BACnetVendorId_BADGER_METER_INC, true - case 520: - return BACnetVendorId_DEUTSCHMANN_AUTOMATION_GMBH_COKG, true - case 521: - return BACnetVendorId_EMU_ELECTRONICAG, true - case 522: - return BACnetVendorId_PHAEDRUS_LIMITED, true - case 523: - return BACnetVendorId_SIGMATEK_GMBH_COKG, true - case 524: - return BACnetVendorId_MARLIN_CONTROLS, true - case 525: - return BACnetVendorId_CIRCUTORSA, true - case 526: - return BACnetVendorId_UTC_FIRE_SECURITY, true - case 527: - return BACnetVendorId_DENT_INSTRUMENTS_INC, true - case 528: - return BACnetVendorId_FHP_MANUFACTURING_COMPANY_BOSCH_GROUP, true - case 529: - return BACnetVendorId_GE_INTELLIGENT_PLATFORMS, true - case 53: - return BACnetVendorId_DAIKIN_INDUSTRIES_LTD, true - case 530: - return BACnetVendorId_INNER_RANGE_PTY_LTD, true - case 531: - return BACnetVendorId_GLAS_ENERGY_TECHNOLOGY, true - case 532: - return BACnetVendorId_MSR_ELECTRONIC_GMBH, true - case 533: - return BACnetVendorId_ENERGY_CONTROL_SYSTEMS_INC, true - case 534: - return BACnetVendorId_EMT_CONTROLS, true - case 535: - return BACnetVendorId_DAINTREE, true - case 536: - return BACnetVendorId_EUROIC_CDOO, true - case 537: - return BACnetVendorId_TE_CONNECTIVITY_ENERGY, true - case 538: - return BACnetVendorId_GEZE_GMBH, true - case 539: - return BACnetVendorId_NEC_CORPORATION, true - case 54: - return BACnetVendorId_NARA_CONTROLS_INC, true - case 540: - return BACnetVendorId_HO_CHEUNG_INTERNATIONAL_COMPANY_LIMITED, true - case 541: - return BACnetVendorId_SHARP_MANUFACTURING_SYSTEMS_CORPORATION, true - case 542: - return BACnetVendorId_DOTCONTROL_SAS, true - case 543: - return BACnetVendorId_BEACON_MEDS, true - case 544: - return BACnetVendorId_MIDEA_COMMERCIAL_AIRCON, true - case 545: - return BACnetVendorId_WATT_MASTER_CONTROLS, true - case 546: - return BACnetVendorId_KAMSTRUPAS, true - case 547: - return BACnetVendorId_CA_COMPUTER_AUTOMATION_GMBH, true - case 548: - return BACnetVendorId_LAARS_HEATING_SYSTEMS_COMPANY, true - case 549: - return BACnetVendorId_HITACHI_SYSTEMS_LTD, true - case 55: - return BACnetVendorId_MAMMOTH_INC, true - case 550: - return BACnetVendorId_FUSHANAKE_ELECTRONIC_ENGINEERING_CO_LTD, true - case 551: - return BACnetVendorId_TOSHIBA_INTERNATIONAL_CORPORATION, true - case 552: - return BACnetVendorId_STARMAN_SYSTEMSLLC, true - case 553: - return BACnetVendorId_SAMSUNG_TECHWIN_CO_LTD, true - case 554: - return BACnetVendorId_ISAS_INTEGRATED_SWITCHGEARAND_SYSTEMSPL, true - case 556: - return BACnetVendorId_OBVIUS, true - case 557: - return BACnetVendorId_MAREK_GUZIK, true - case 558: - return BACnetVendorId_VORTEK_INSTRUMENTSLLC, true - case 559: - return BACnetVendorId_UNIVERSAL_LIGHTING_TECHNOLOGIES, true - case 56: - return BACnetVendorId_LIEBERT_CORPORATION, true - case 560: - return BACnetVendorId_MYERS_POWER_PRODUCTS_INC, true - case 561: - return BACnetVendorId_VECTOR_CONTROLS_GMBH, true - case 562: - return BACnetVendorId_CRESTRON_ELECTRONICS_INC, true - case 563: - return BACnetVendorId_AE_CONTROLS_LIMITED, true - case 564: - return BACnetVendorId_PROJEKTOMONTAZAAD, true - case 565: - return BACnetVendorId_FREEAIRE_REFRIGERATION, true - case 566: - return BACnetVendorId_AQUA_COOLER_PTY_LIMITED, true - case 567: - return BACnetVendorId_BASIC_CONTROLS, true - case 568: - return BACnetVendorId_GE_MEASUREMENTAND_CONTROL_SOLUTIONS_ADVANCED_SENSORS, true - case 569: - return BACnetVendorId_EQUAL_NETWORKS, true - case 57: - return BACnetVendorId_SEMCO_INCORPORATED, true - case 570: - return BACnetVendorId_MILLENNIAL_NET, true - case 571: - return BACnetVendorId_APLI_LTD, true - case 572: - return BACnetVendorId_ELECTRO_INDUSTRIES_GAUGE_TECH, true - case 573: - return BACnetVendorId_SANG_MYUNG_UNIVERSITY, true - case 574: - return BACnetVendorId_COPPERTREE_ANALYTICS_INC, true - case 575: - return BACnetVendorId_CORE_NETIX_GMBH, true - case 576: - return BACnetVendorId_ACUTHERM, true - case 577: - return BACnetVendorId_DR_RIEDEL_AUTOMATISIERUNGSTECHNIK_GMBH, true - case 578: - return BACnetVendorId_SHINA_SYSTEM_CO_LTD, true - case 579: - return BACnetVendorId_IQAPERTUS, true - case 58: - return BACnetVendorId_AIR_MONITOR_CORPORATION, true - case 580: - return BACnetVendorId_PSE_TECHNOLOGY, true - case 581: - return BACnetVendorId_BA_SYSTEMS, true - case 582: - return BACnetVendorId_BTICINO, true - case 583: - return BACnetVendorId_MONICO_INC, true - case 584: - return BACnetVendorId_I_CUE, true - case 585: - return BACnetVendorId_TEKMAR_CONTROL_SYSTEMS_LTD, true - case 586: - return BACnetVendorId_CONTROL_TECHNOLOGY_CORPORATION, true - case 587: - return BACnetVendorId_GFAE_GMBH, true - case 588: - return BACnetVendorId_BE_KA_SOFTWARE_GMBH, true - case 589: - return BACnetVendorId_ISOIL_INDUSTRIA_SPA, true - case 59: - return BACnetVendorId_TRIATEKLLC, true - case 590: - return BACnetVendorId_HOME_SYSTEMS_CONSULTING_SPA, true - case 591: - return BACnetVendorId_SOCOMEC, true - case 592: - return BACnetVendorId_EVEREX_COMMUNICATIONS_INC, true - case 593: - return BACnetVendorId_CEIEC_ELECTRIC_TECHNOLOGY, true - case 594: - return BACnetVendorId_ATRILA_GMBH, true - case 595: - return BACnetVendorId_WING_TECHS, true - case 596: - return BACnetVendorId_SHENZHEN_MEK_INTELLISYS_PTE_LTD, true - case 597: - return BACnetVendorId_NESTFIELD_CO_LTD, true - case 598: - return BACnetVendorId_SWISSPHONE_TELECOMAG, true - case 599: - return BACnetVendorId_PNTECHJSC, true - case 6: - return BACnetVendorId_ABB_FORMERLY_AMERICAN_AUTO_MATRIX, true - case 60: - return BACnetVendorId_NEX_LIGHT, true - case 600: - return BACnetVendorId_HORNERAPGLLC, true - case 601: - return BACnetVendorId_PVI_INDUSTRIESLLC, true - case 602: - return BACnetVendorId_ELACOMPIL, true - case 603: - return BACnetVendorId_PEGASUS_AUTOMATION_INTERNATIONALLLC, true - case 604: - return BACnetVendorId_WIGHT_ELECTRONIC_SERVICES_LTD, true - case 605: - return BACnetVendorId_MARCOM, true - case 606: - return BACnetVendorId_EXHAUSTOAS, true - case 607: - return BACnetVendorId_DWYER_INSTRUMENTS_INC, true - case 608: - return BACnetVendorId_LINK_GMBH, true - case 609: - return BACnetVendorId_OPPERMANN_REGELGERATE_GMBH, true - case 61: - return BACnetVendorId_MULTISTACK, true - case 610: - return BACnetVendorId_NU_AIRE_INC, true - case 611: - return BACnetVendorId_NORTEC_HUMIDITY_INC, true - case 612: - return BACnetVendorId_BIGWOOD_SYSTEMS_INC, true - case 613: - return BACnetVendorId_ENBALA_POWER_NETWORKS, true - case 614: - return BACnetVendorId_INTER_ENERGY_CO_LTD, true - case 615: - return BACnetVendorId_ETC, true - case 616: - return BACnetVendorId_COMELECSARL, true - case 617: - return BACnetVendorId_PYTHIA_TECHNOLOGIES, true - case 618: - return BACnetVendorId_TREND_POINT_SYSTEMS_INC, true - case 619: - return BACnetVendorId_AWEX, true - case 62: - return BACnetVendorId_TSI_INCORPORATED, true - case 620: - return BACnetVendorId_EUREVIA, true - case 621: - return BACnetVendorId_KONGSBERGELONAS, true - case 622: - return BACnetVendorId_FLAKT_WOODS, true - case 623: - return BACnetVendorId_EE_ELEKTRONIKGESMBH, true - case 624: - return BACnetVendorId_ARC_INFORMATIQUE, true - case 625: - return BACnetVendorId_SKIDATAAG, true - case 626: - return BACnetVendorId_WSW_SOLUTIONS, true - case 627: - return BACnetVendorId_TREFON_ELECTRONIC_GMBH, true - case 628: - return BACnetVendorId_DONGSEO_SYSTEM, true - case 629: - return BACnetVendorId_KANONTEC_INTELLIGENCE_TECHNOLOGY_CO_LTD, true - case 63: - return BACnetVendorId_WEATHER_RITE_INC, true - case 630: - return BACnetVendorId_EVCO_SPA, true - case 631: - return BACnetVendorId_ACCUENERGY_CANADA_INC, true - case 632: - return BACnetVendorId_SOFTDEL, true - case 633: - return BACnetVendorId_ORION_ENERGY_SYSTEMS_INC, true - case 634: - return BACnetVendorId_ROBOTICSWARE, true - case 635: - return BACnetVendorId_DOMIQ_SPZOO, true - case 636: - return BACnetVendorId_SOLIDYNE, true - case 637: - return BACnetVendorId_ELECSYS_CORPORATION, true - case 638: - return BACnetVendorId_CONDITIONAIRE_INTERNATIONAL_PTY_LIMITED, true - case 639: - return BACnetVendorId_QUEBEC_INC, true - case 64: - return BACnetVendorId_DUNHAM_BUSH, true - case 640: - return BACnetVendorId_HOMERUN_HOLDINGS, true - case 641: - return BACnetVendorId_MURATA_AMERICAS, true - case 642: - return BACnetVendorId_COMPTEK, true - case 643: - return BACnetVendorId_WESTCO_SYSTEMS_INC, true - case 644: - return BACnetVendorId_ADVANCIS_SOFTWARE_SERVICES_GMBH, true - case 645: - return BACnetVendorId_INTERGRIDLLC, true - case 646: - return BACnetVendorId_MARKERR_CONTROLS_INC, true - case 647: - return BACnetVendorId_TOSHIBA_ELEVATORAND_BUILDING_SYSTEMS_CORPORATION, true - case 648: - return BACnetVendorId_SPECTRUM_CONTROLS_INC, true - case 649: - return BACnetVendorId_MKSERVICE, true - case 65: - return BACnetVendorId_RELIANCE_ELECTRIC, true - case 650: - return BACnetVendorId_FOX_THERMAL_INSTRUMENTS, true - case 651: - return BACnetVendorId_SYXTH_SENSE_LTD, true - case 652: - return BACnetVendorId_DUHA_SYSTEMSRO, true - case 653: - return BACnetVendorId_NIBE, true - case 654: - return BACnetVendorId_MELINK_CORPORATION, true - case 655: - return BACnetVendorId_FRITZ_HABER_INSTITUT, true - case 656: - return BACnetVendorId_MTU_ONSITE_ENERGY_GMBH_GAS_POWER_SYSTEMS, true - case 657: - return BACnetVendorId_OMEGA_ENGINEERING_INC, true - case 658: - return BACnetVendorId_AVELON, true - case 659: - return BACnetVendorId_YWIRE_TECHNOLOGIES_INC, true - case 66: - return BACnetVendorId_LCS_INC, true - case 660: - return BACnetVendorId_MR_ENGINEERING_CO_LTD, true - case 661: - return BACnetVendorId_LOCHINVARLLC, true - case 662: - return BACnetVendorId_SONTAY_LIMITED, true - case 663: - return BACnetVendorId_GRUPA_SLAWOMIR_CHELMINSKI, true - case 664: - return BACnetVendorId_ARCH_METER_CORPORATION, true - case 665: - return BACnetVendorId_SENVA_INC, true - case 667: - return BACnetVendorId_FM_TEC, true - case 668: - return BACnetVendorId_SYSTEMS_SPECIALISTS_INC, true - case 669: - return BACnetVendorId_SENSE_AIR, true - case 67: - return BACnetVendorId_REGULATOR_AUSTRALIAPTY_LTD, true - case 670: - return BACnetVendorId_AB_INDUSTRIE_TECHNIK_SRL, true - case 671: - return BACnetVendorId_CORTLAND_RESEARCHLLC, true - case 672: - return BACnetVendorId_MEDIA_VIEW, true - case 673: - return BACnetVendorId_VDA_ELETTRONICA, true - case 674: - return BACnetVendorId_CSS_INC, true - case 675: - return BACnetVendorId_TEK_AIR_SYSTEMS_INC, true - case 676: - return BACnetVendorId_ICDT, true - case 677: - return BACnetVendorId_THE_ARMSTRONG_MONITORING_CORPORATION, true - case 678: - return BACnetVendorId_DIXELL_SRL, true - case 679: - return BACnetVendorId_LEAD_SYSTEM_INC, true - case 68: - return BACnetVendorId_TOUCH_PLATE_LIGHTING_CONTROLS, true - case 680: - return BACnetVendorId_ISM_EURO_CENTERSA, true - case 681: - return BACnetVendorId_TDIS, true - case 682: - return BACnetVendorId_TRADEFIDES, true - case 683: - return BACnetVendorId_KNRR_GMBH_EMERSON_NETWORK_POWER, true - case 684: - return BACnetVendorId_RESOURCE_DATA_MANAGEMENT, true - case 685: - return BACnetVendorId_ABIES_TECHNOLOGY_INC, true - case 686: - return BACnetVendorId_UAB_KOMFOVENT, true - case 687: - return BACnetVendorId_MIRAE_ELECTRICAL_MFG_CO_LTD, true - case 688: - return BACnetVendorId_HUNTER_DOUGLAS_ARCHITECTURAL_PROJECTS_SCANDINAVIA_APS, true - case 689: - return BACnetVendorId_RUNPAQ_GROUP_CO_LTD, true - case 69: - return BACnetVendorId_AMANN_GMBH, true - case 690: - return BACnetVendorId_UNICARDSA, true - case 691: - return BACnetVendorId_IE_TECHNOLOGIES, true - case 692: - return BACnetVendorId_RUSKIN_MANUFACTURING, true - case 693: - return BACnetVendorId_CALON_ASSOCIATES_LIMITED, true - case 694: - return BACnetVendorId_CONTEC_CO_LTD, true - case 695: - return BACnetVendorId_IT_GMBH, true - case 696: - return BACnetVendorId_AUTANI_CORPORATION, true - case 697: - return BACnetVendorId_CHRISTIAN_FORTIN, true - case 698: - return BACnetVendorId_HDL, true - case 699: - return BACnetVendorId_IPID_SPZOO_LIMITED, true - case 7: - return BACnetVendorId_SIEMENS_SCHWEIZAG_FORMERLY_LANDIS_STAEFA_DIVISION_EUROPE, true - case 70: - return BACnetVendorId_RLE_TECHNOLOGIES, true - case 700: - return BACnetVendorId_FUJI_ELECTRIC_CO_LTD, true - case 701: - return BACnetVendorId_VIEW_INC, true - case 702: - return BACnetVendorId_SAMSUNGS1_CORPORATION, true - case 703: - return BACnetVendorId_NEW_LIFT, true - case 704: - return BACnetVendorId_VRT_SYSTEMS, true - case 705: - return BACnetVendorId_MOTION_CONTROL_ENGINEERING_INC, true - case 706: - return BACnetVendorId_WEISS_KLIMATECHNIK_GMBH, true - case 707: - return BACnetVendorId_ELKON, true - case 708: - return BACnetVendorId_ELIWELL_CONTROLS_SRL, true - case 709: - return BACnetVendorId_JAPAN_COMPUTER_TECHNOS_CORP, true - case 71: - return BACnetVendorId_CARDKEY_SYSTEMS, true - case 710: - return BACnetVendorId_RATIONAL_NETWORKEHF, true - case 711: - return BACnetVendorId_MAGNUM_ENERGY_SOLUTIONSLLC, true - case 712: - return BACnetVendorId_MEL_ROK, true - case 713: - return BACnetVendorId_VAE_GROUP, true - case 714: - return BACnetVendorId_LGCNS, true - case 715: - return BACnetVendorId_BERGHOF_AUTOMATIONSTECHNIK_GMBH, true - case 716: - return BACnetVendorId_QUARK_COMMUNICATIONS_INC, true - case 717: - return BACnetVendorId_SONTEX, true - case 718: - return BACnetVendorId_MIVUNEAG, true - case 719: - return BACnetVendorId_PANDUIT, true - case 72: - return BACnetVendorId_SECOM_CO_LTD, true - case 720: - return BACnetVendorId_SMART_CONTROLSLLC, true - case 721: - return BACnetVendorId_COMPU_AIRE_INC, true - case 722: - return BACnetVendorId_SIERRA, true - case 723: - return BACnetVendorId_PROTO_SENSE_TECHNOLOGIES, true - case 724: - return BACnetVendorId_ELTRAC_TECHNOLOGIES_PVT_LTD, true - case 725: - return BACnetVendorId_BEKTAS_INVISIBLE_CONTROLS_GMBH, true - case 726: - return BACnetVendorId_ENTELEC, true - case 727: - return BACnetVendorId_INNEXIV, true - case 728: - return BACnetVendorId_COVENANT, true - case 729: - return BACnetVendorId_DAVITORAB, true - case 73: - return BACnetVendorId_ABB_GEBUDETECHNIKAG_BEREICH_NET_SERV, true - case 730: - return BACnetVendorId_TONG_FANG_TECHNOVATOR, true - case 731: - return BACnetVendorId_BUILDING_ROBOTICS_INC, true - case 732: - return BACnetVendorId_HSSMSRUG, true - case 733: - return BACnetVendorId_FRAM_TACKLLC, true - case 734: - return BACnetVendorId_BL_ACOUSTICS_LTD, true - case 735: - return BACnetVendorId_TRAXXON_ROCK_DRILLS_LTD, true - case 736: - return BACnetVendorId_FRANKE, true - case 737: - return BACnetVendorId_WURM_GMBH_CO, true - case 738: - return BACnetVendorId_ADDENERGIE, true - case 739: - return BACnetVendorId_MIRLE_AUTOMATION_CORPORATION, true - case 74: - return BACnetVendorId_KNX_ASSOCIATIONCVBA, true - case 740: - return BACnetVendorId_IBIS_NETWORKS, true - case 741: - return BACnetVendorId_IDKART_ASRO, true - case 742: - return BACnetVendorId_ANAREN_INC, true - case 743: - return BACnetVendorId_SPAN_INCORPORATED, true - case 744: - return BACnetVendorId_BOSCH_THERMOTECHNOLOGY_CORP, true - case 745: - return BACnetVendorId_DRC_TECHNOLOGYSA, true - case 746: - return BACnetVendorId_SHANGHAI_ENERGY_BUILDING_TECHNOLOGY_CO_LTD, true - case 747: - return BACnetVendorId_FRAPORTAG, true - case 748: - return BACnetVendorId_FLOWGROUP, true - case 749: - return BACnetVendorId_SKYTRON_ENERGY_GMBH, true - case 75: - return BACnetVendorId_INSTITUTEOF_ELECTRICAL_INSTALLATION_ENGINEERSOF_JAPANIEIEJ, true - case 750: - return BACnetVendorId_ALTEL_WICHA_GOLDA_SPJ, true - case 751: - return BACnetVendorId_DRUPAL, true - case 752: - return BACnetVendorId_AXIOMATIC_TECHNOLOGY_LTD, true - case 753: - return BACnetVendorId_BOHNKE_PARTNER, true - case 754: - return BACnetVendorId_FUNCTION1, true - case 755: - return BACnetVendorId_OPTERGY_PTY_LTD, true - case 756: - return BACnetVendorId_LSI_VIRTICUS, true - case 757: - return BACnetVendorId_KONZEPTPARK_GMBH, true - case 758: - return BACnetVendorId_NX_LIGHTING_CONTROLS, true - case 759: - return BACnetVendorId_E_CURV_INC, true - case 76: - return BACnetVendorId_NOHMI_BOSAI_LTD, true - case 760: - return BACnetVendorId_AGNOSYS_GMBH, true - case 761: - return BACnetVendorId_SHANGHAI_SUNFULL_AUTOMATION_COLTD, true - case 762: - return BACnetVendorId_KURZ_INSTRUMENTS_INC, true - case 763: - return BACnetVendorId_CIAS_ELETTRONICA_SRL, true - case 764: - return BACnetVendorId_MULTIAQUA_INC, true - case 765: - return BACnetVendorId_BLUE_BOX, true - case 766: - return BACnetVendorId_SENSIDYNE, true - case 767: - return BACnetVendorId_VIESSMANN_ELEKTRONIK_GMBH, true - case 768: - return BACnetVendorId_AD_FWEBCOMSRL, true - case 769: - return BACnetVendorId_GAYLORD_INDUSTRIES, true - case 77: - return BACnetVendorId_CAREL_SPA, true - case 770: - return BACnetVendorId_MAJUR_LTD, true - case 771: - return BACnetVendorId_SHANGHAI_HUILIN_TECHNOLOGY_CO_LTD, true - case 772: - return BACnetVendorId_EXOTRONIC, true - case 773: - return BACnetVendorId_SAFECONTRO_LSRO, true - case 774: - return BACnetVendorId_AMATIS, true - case 775: - return BACnetVendorId_UNIVERSAL_ELECTRIC_CORPORATION, true - case 776: - return BACnetVendorId_IBA_CNET, true - case 778: - return BACnetVendorId_SMARTRISE_ENGINEERING_INC, true - case 779: - return BACnetVendorId_MIRATRON_INC, true - case 78: - return BACnetVendorId_UTC_FIRE_SECURITY_ESPAASL, true - case 780: - return BACnetVendorId_SMART_EDGE, true - case 781: - return BACnetVendorId_MITSUBISHI_ELECTRIC_AUSTRALIA_PTY_LTD, true - case 782: - return BACnetVendorId_TRIANGLE_RESEARCH_INTERNATIONAL_PTD_LTD, true - case 783: - return BACnetVendorId_PRODUAL_OY, true - case 784: - return BACnetVendorId_MILESTONE_SYSTEMSAS, true - case 785: - return BACnetVendorId_TRUSTBRIDGE, true - case 786: - return BACnetVendorId_FEEDBACK_SOLUTIONS, true - case 787: - return BACnetVendorId_IES, true - case 788: - return BACnetVendorId_ABB_POWER_PROTECTIONSA, true - case 789: - return BACnetVendorId_RIPTIDEIO, true - case 79: - return BACnetVendorId_HOCHIKI_CORPORATION, true - case 790: - return BACnetVendorId_MESSERSCHMITT_SYSTEMSAG, true - case 791: - return BACnetVendorId_DEZEM_ENERGY_CONTROLLING, true - case 792: - return BACnetVendorId_MECHO_SYSTEMS, true - case 793: - return BACnetVendorId_EVON_GMBH, true - case 794: - return BACnetVendorId_CS_LAB_GMBH, true - case 795: - return BACnetVendorId_N_0_ENTERPRISES_INC, true - case 796: - return BACnetVendorId_TOUCHE_CONTROLS, true - case 797: - return BACnetVendorId_ONTROL_TEKNIK_MALZEME_SANVE_TICAS, true - case 798: - return BACnetVendorId_UNI_CONTROL_SYSTEM_SP_ZOO, true - case 799: - return BACnetVendorId_WEIHAI_PLOUMETER_CO_LTD, true - case 8: - return BACnetVendorId_DELTA_CONTROLS, true - case 80: - return BACnetVendorId_FR_SAUTERAG, true - case 800: - return BACnetVendorId_ELCOM_INTERNATIONAL_PVT_LTD, true - case 801: - return BACnetVendorId_SIGNIFY, true - case 802: - return BACnetVendorId_AUTOMATION_DIRECT, true - case 803: - return BACnetVendorId_PARAGON_ROBOTICS, true - case 804: - return BACnetVendorId_SMT_SYSTEM_MODULES_TECHNOLOGYAG, true - case 805: - return BACnetVendorId_RADIX_IOTLLC, true - case 806: - return BACnetVendorId_CMR_CONTROLS_LTD, true - case 807: - return BACnetVendorId_INNOVARI_INC, true - case 808: - return BACnetVendorId_ABB_CONTROL_PRODUCTS, true - case 809: - return BACnetVendorId_GESELLSCHAFTFUR_GEBUDEAUTOMATIONMBH, true - case 81: - return BACnetVendorId_MATSUSHITA_ELECTRIC_WORKS_LTD, true - case 810: - return BACnetVendorId_RODI_SYSTEMS_CORP, true - case 811: - return BACnetVendorId_NEXTEK_POWER_SYSTEMS, true - case 812: - return BACnetVendorId_CREATIVE_LIGHTING, true - case 813: - return BACnetVendorId_WATER_FURNACE_INTERNATIONAL, true - case 814: - return BACnetVendorId_MERCURY_SECURITY, true - case 815: - return BACnetVendorId_HISENSE_SHANDONG_AIR_CONDITIONING_CO_LTD, true - case 816: - return BACnetVendorId_LAYERED_SOLUTIONS_INC, true - case 817: - return BACnetVendorId_LEEGOOD_AUTOMATIC_SYSTEM_INC, true - case 818: - return BACnetVendorId_SHANGHAI_RESTAR_TECHNOLOGY_CO_LTD, true - case 819: - return BACnetVendorId_REIMANN_INGENIEURBRO, true - case 82: - return BACnetVendorId_MITSUBISHI_ELECTRIC_CORPORATION_INAZAWA_WORKS, true - case 820: - return BACnetVendorId_LYN_TEC, true - case 821: - return BACnetVendorId_HTP, true - case 822: - return BACnetVendorId_ELKOR_TECHNOLOGIES_INC, true - case 823: - return BACnetVendorId_BENTROL_PTY_LTD, true - case 824: - return BACnetVendorId_TEAM_CONTROL_OY, true - case 825: - return BACnetVendorId_NEXT_DEVICELLC, true - case 826: - return BACnetVendorId_ISMACONTROLLI_SPA, true - case 827: - return BACnetVendorId_KINGI_ELECTRONICS_CO_LTD, true - case 828: - return BACnetVendorId_SAMDAV, true - case 829: - return BACnetVendorId_NEXT_GEN_INDUSTRIES_PVT_LTD, true - case 83: - return BACnetVendorId_MITSUBISHI_HEAVY_INDUSTRIES_LTD, true - case 830: - return BACnetVendorId_ENTICLLC, true - case 831: - return BACnetVendorId_ETAP, true - case 832: - return BACnetVendorId_MORALLE_ELECTRONICS_LIMITED, true - case 833: - return BACnetVendorId_LEICOMAG, true - case 834: - return BACnetVendorId_WATTS_REGULATOR_COMPANY, true - case 835: - return BACnetVendorId_SC_ORBTRONICSSRL, true - case 836: - return BACnetVendorId_GAUSSAN_TECHNOLOGIES, true - case 837: - return BACnetVendorId_WE_BFACTORY_GMBH, true - case 838: - return BACnetVendorId_OCEAN_CONTROLS, true - case 839: - return BACnetVendorId_MESSANA_AIR_RAY_CONDITIONINGSRL, true - case 84: - return BACnetVendorId_XYLEM_INC, true - case 840: - return BACnetVendorId_HANGZHOUBATOWN_TECHNOLOGY_CO_LTD, true - case 841: - return BACnetVendorId_REASONABLE_CONTROLS, true - case 842: - return BACnetVendorId_SERVISYS_INC, true - case 843: - return BACnetVendorId_HALSTRUPWALCHER_GMBH, true - case 844: - return BACnetVendorId_SWG_AUTOMATION_FUZHOU_LIMITED, true - case 845: - return BACnetVendorId_KSB_AKTIENGESELLSCHAFT, true - case 846: - return BACnetVendorId_HYBRYD_SPZOO, true - case 847: - return BACnetVendorId_HELVATRONAG, true - case 848: - return BACnetVendorId_ODERON_SPZOO, true - case 849: - return BACnetVendorId_MIKOLAB, true - case 85: - return BACnetVendorId_YAMATAKE_BUILDING_SYSTEMS_CO_LTD, true - case 850: - return BACnetVendorId_EXODRAFT, true - case 851: - return BACnetVendorId_HOCHHUTH_GMBH, true - case 852: - return BACnetVendorId_INTEGRATED_SYSTEM_TECHNOLOGIES_LTD, true - case 853: - return BACnetVendorId_SHANGHAI_CELLCONS_CONTROLS_CO_LTD, true - case 854: - return BACnetVendorId_EMME_CONTROLSLLC, true - case 855: - return BACnetVendorId_FIELD_DIAGNOSTIC_SERVICES_INC, true - case 856: - return BACnetVendorId_GES_TEKNIKAS, true - case 857: - return BACnetVendorId_GLOBAL_POWER_PRODUCTS_INC, true - case 858: - return BACnetVendorId_OPTIONNV, true - case 859: - return BACnetVendorId_BV_CONTROLAG, true - case 86: - return BACnetVendorId_THE_WATT_STOPPER_INC, true - case 860: - return BACnetVendorId_SIGREN_ENGINEERINGAG, true - case 861: - return BACnetVendorId_SHANGHAI_JALTONE_TECHNOLOGY_CO_LTD, true - case 862: - return BACnetVendorId_MAX_LINE_SOLUTIONS_LTD, true - case 863: - return BACnetVendorId_KRON_INSTRUMENTOS_ELTRICOS_LTDA, true - case 864: - return BACnetVendorId_THERMO_MATRIX, true - case 865: - return BACnetVendorId_INFINITE_AUTOMATION_SYSTEMS_INC, true - case 866: - return BACnetVendorId_VANTAGE, true - case 867: - return BACnetVendorId_ELECON_MEASUREMENTS_PVT_LTD, true - case 868: - return BACnetVendorId_TBA, true - case 869: - return BACnetVendorId_CARNES_COMPANY, true - case 87: - return BACnetVendorId_AICHI_TOKEI_DENKI_CO_LTD, true - case 870: - return BACnetVendorId_HARMAN_PROFESSIONAL, true - case 871: - return BACnetVendorId_NENUTEC_ASIA_PACIFIC_PTE_LTD, true - case 872: - return BACnetVendorId_GIANV, true - case 873: - return BACnetVendorId_KEPWARE_TEHNOLOGIES, true - case 874: - return BACnetVendorId_TEMPERATURE_ELECTRONICS_LTD, true - case 875: - return BACnetVendorId_PACKET_POWER, true - case 876: - return BACnetVendorId_PROJECT_HAYSTACK_CORPORATION, true - case 877: - return BACnetVendorId_DEOS_CONTROLS_AMERICAS_INC, true - case 878: - return BACnetVendorId_SENSEWARE_INC, true - case 879: - return BACnetVendorId_MST_SYSTEMTECHNIKAG, true - case 88: - return BACnetVendorId_ACTIVATION_TECHNOLOGIESLLC, true - case 880: - return BACnetVendorId_LONIX_LTD, true - case 881: - return BACnetVendorId_GOSSEN_METRAWATT_GMBH, true - case 882: - return BACnetVendorId_AVIOSYS_INTERNATIONAL_INC, true - case 883: - return BACnetVendorId_EFFICIENT_BUILDING_AUTOMATION_CORP, true - case 884: - return BACnetVendorId_ACCUTRON_INSTRUMENTS_INC, true - case 885: - return BACnetVendorId_VERMONT_ENERGY_CONTROL_SYSTEMSLLC, true - case 886: - return BACnetVendorId_DCC_DYNAMICS, true - case 887: - return BACnetVendorId_BEG_BRCK_ELECTRONIC_GMBH, true - case 889: - return BACnetVendorId_NGBS_HUNGARY_LTD, true - case 89: - return BACnetVendorId_SAIA_BURGESS_CONTROLS_LTD, true - case 890: - return BACnetVendorId_ILLUM_TECHNOLOGYLLC, true - case 891: - return BACnetVendorId_DELTA_CONTROLS_GERMANY_LIMITED, true - case 892: - return BACnetVendorId_ST_SERVICE_TECHNIQUESA, true - case 893: - return BACnetVendorId_SIMPLE_SOFT, true - case 894: - return BACnetVendorId_ALTAIR_ENGINEERING, true - case 895: - return BACnetVendorId_EZEN_SOLUTION_INC, true - case 896: - return BACnetVendorId_FUJITEC_CO_LTD, true - case 897: - return BACnetVendorId_TERRALUX, true - case 898: - return BACnetVendorId_ANNICOM, true - case 899: - return BACnetVendorId_BIHL_WIEDEMANN_GMBH, true - case 9: - return BACnetVendorId_SIEMENS_SCHWEIZAG, true - case 90: - return BACnetVendorId_HITACHI_LTD, true - case 900: - return BACnetVendorId_DRAPER_INC, true - case 901: - return BACnetVendorId_SCHCO_INTERNATIONALKG, true - case 902: - return BACnetVendorId_OTIS_ELEVATOR_COMPANY, true - case 903: - return BACnetVendorId_FIDELIX_OY, true - case 904: - return BACnetVendorId_RAM_GMBH_MESSUND_REGELTECHNIK, true - case 905: - return BACnetVendorId_WEMS, true - case 906: - return BACnetVendorId_RAVEL_ELECTRONICS_PVT_LTD, true - case 907: - return BACnetVendorId_OMNI_MAGNI, true - case 908: - return BACnetVendorId_ECHELON, true - case 909: - return BACnetVendorId_INTELLIMETER_CANADA_INC, true - case 91: - return BACnetVendorId_NOVAR_CORP_TREND_CONTROL_SYSTEMS_LTD, true - case 910: - return BACnetVendorId_BITHOUSE_OY, true - case 912: - return BACnetVendorId_BUILD_PULSE, true - case 913: - return BACnetVendorId_SHENZHEN1000_BUILDING_AUTOMATION_CO_LTD, true - case 914: - return BACnetVendorId_AED_ENGINEERING_GMBH, true - case 915: - return BACnetVendorId_GNTNER_GMBH_COKG, true - case 916: - return BACnetVendorId_KN_XLOGIC, true - case 917: - return BACnetVendorId_CIM_ENVIRONMENTAL_GROUP, true - case 918: - return BACnetVendorId_FLOW_CONTROL, true - case 919: - return BACnetVendorId_LUMEN_CACHE_INC, true - case 92: - return BACnetVendorId_MITSUBISHI_ELECTRIC_LIGHTING_CORPORATION, true - case 920: - return BACnetVendorId_ECOSYSTEM, true - case 921: - return BACnetVendorId_POTTER_ELECTRIC_SIGNAL_COMPANYLLC, true - case 922: - return BACnetVendorId_TYCO_FIRE_SECURITY_SPA, true - case 923: - return BACnetVendorId_WATANABE_ELECTRIC_INDUSTRY_CO_LTD, true - case 924: - return BACnetVendorId_CAUSAM_ENERGY, true - case 925: - return BACnetVendorId_WTECAG, true - case 926: - return BACnetVendorId_IMI_HYDRONIC_ENGINEERING_INTERNATIONALSA, true - case 927: - return BACnetVendorId_ARIGO_SOFTWARE, true - case 928: - return BACnetVendorId_MSA_SAFETY1, true - case 929: - return BACnetVendorId_SMART_SOLUCOES_LTDAMERCATO, true - case 93: - return BACnetVendorId_ARGUS_CONTROL_SYSTEMS_LTD, true - case 930: - return BACnetVendorId_PIATRA_ENGINEERING, true - case 931: - return BACnetVendorId_ODIN_AUTOMATION_SYSTEMSLLC, true - case 932: - return BACnetVendorId_BELPARTSNV, true - case 933: - return BACnetVendorId_UABSALDA, true - case 934: - return BACnetVendorId_ALREIT_REGELTECHNIK_GMBH, true - case 935: - return BACnetVendorId_INGENIEURBROH_LERTES_GMBH_COKG, true - case 936: - return BACnetVendorId_BREATHING_BUILDINGS, true - case 937: - return BACnetVendorId_EWONSA, true - case 938: - return BACnetVendorId_CAV_UFF_GIACOMO_CIMBERIO_SPA, true - case 939: - return BACnetVendorId_PKE_ELECTRONICSAG, true - case 94: - return BACnetVendorId_KYUKI_CORPORATION, true - case 940: - return BACnetVendorId_ALLEN, true - case 941: - return BACnetVendorId_KASTLE_SYSTEMS, true - case 942: - return BACnetVendorId_LOGICAL_ELECTRO_MECHANICALEM_SYSTEMS_INC, true - case 943: - return BACnetVendorId_PP_KINETICS_INSTRUMENTSLLC, true - case 944: - return BACnetVendorId_CATHEXIS_TECHNOLOGIES, true - case 945: - return BACnetVendorId_SYLOPSP_ZOOSPK, true - case 946: - return BACnetVendorId_BRAUNS_CONTROL_GMBH, true - case 947: - return BACnetVendorId_OMRONSOCIALSOLUTIONSCOLTD, true - case 948: - return BACnetVendorId_WILDEBOER_BAUTEILE_GMBH, true - case 949: - return BACnetVendorId_SHANGHAI_BIENS_TECHNOLOGIES_LTD, true - case 95: - return BACnetVendorId_RICHARDS_ZETA_BUILDING_INTELLIGENCE_INC, true - case 950: - return BACnetVendorId_BEIJINGHZHY_TECHNOLOGY_CO_LTD, true - case 951: - return BACnetVendorId_BUILDING_CLOUDS, true - case 952: - return BACnetVendorId_THE_UNIVERSITYOF_SHEFFIELD_DEPARTMENTOF_ELECTRONICAND_ELECTRICAL_ENGINEERING, true - case 953: - return BACnetVendorId_FABTRONICS_AUSTRALIA_PTY_LTD, true - case 954: - return BACnetVendorId_SLAT, true - case 955: - return BACnetVendorId_SOFTWARE_MOTOR_CORPORATION, true - case 956: - return BACnetVendorId_ARMSTRONG_INTERNATIONAL_INC, true - case 957: - return BACnetVendorId_STERIL_AIRE_INC, true - case 958: - return BACnetVendorId_INFINIQUE, true - case 959: - return BACnetVendorId_ARCOM, true - case 96: - return BACnetVendorId_SCIENTECHRD_INC, true - case 960: - return BACnetVendorId_ARGO_PERFORMANCE_LTD, true - case 961: - return BACnetVendorId_DIALIGHT, true - case 962: - return BACnetVendorId_IDEAL_TECHNICAL_SOLUTIONS, true - case 963: - return BACnetVendorId_NEUROBATAG, true - case 964: - return BACnetVendorId_NEYER_SOFTWARE_CONSULTINGLLC, true - case 965: - return BACnetVendorId_SCADA_TECHNOLOGY_DEVELOPMENT_CO_LTD, true - case 966: - return BACnetVendorId_DEMAND_LOGIC_LIMITED, true - case 967: - return BACnetVendorId_GWA_GROUP_LIMITED, true - case 968: - return BACnetVendorId_OCCITALINE, true - case 969: - return BACnetVendorId_NAO_DIGITAL_CO_LTD, true - case 97: - return BACnetVendorId_VCI_CONTROLS_INC, true - case 970: - return BACnetVendorId_SHENZHEN_CHANSLINK_NETWORK_TECHNOLOGY_CO_LTD, true - case 971: - return BACnetVendorId_SAMSUNG_ELECTRONICS_CO_LTD, true - case 972: - return BACnetVendorId_MESA_LABORATORIES_INC, true - case 973: - return BACnetVendorId_FISCHER, true - case 974: - return BACnetVendorId_OP_SYS_SOLUTIONS_LTD, true - case 975: - return BACnetVendorId_ADVANCED_DEVICES_LIMITED, true - case 976: - return BACnetVendorId_CONDAIR, true - case 977: - return BACnetVendorId_INELCOM_INGENIERIA_ELECTRONICA_COMERCIALSA, true - case 978: - return BACnetVendorId_GRID_POINT_INC, true - case 979: - return BACnetVendorId_ADF_TECHNOLOGIES_SDN_BHD, true - case 98: - return BACnetVendorId_TOSHIBA_CORPORATION, true - case 980: - return BACnetVendorId_EPM_INC, true - case 981: - return BACnetVendorId_LIGHTING_CONTROLS_LTD, true - case 982: - return BACnetVendorId_PERIX_CONTROLS_LTD, true - case 983: - return BACnetVendorId_AERCO_INTERNATIONAL_INC, true - case 984: - return BACnetVendorId_KONE_INC, true - case 985: - return BACnetVendorId_ZIEHL_ABEGGSE, true - case 986: - return BACnetVendorId_ROBOTSA, true - case 987: - return BACnetVendorId_OPTIGO_NETWORKS_INC, true - case 988: - return BACnetVendorId_OPENMOTICSBVBA, true - case 989: - return BACnetVendorId_METROPOLITAN_INDUSTRIES_INC, true - case 99: - return BACnetVendorId_MITSUBISHI_ELECTRIC_CORPORATION_AIR_CONDITIONING_REFRIGERATION_SYSTEMS_WORKS, true - case 990: - return BACnetVendorId_HUAWEI_TECHNOLOGIES_CO_LTD, true - case 991: - return BACnetVendorId_DIGITAL_LUMENS_INC, true - case 992: - return BACnetVendorId_VANTI, true - case 993: - return BACnetVendorId_CREE_LIGHTING, true - case 994: - return BACnetVendorId_RICHMOND_HEIGHTSSDNBHD, true - case 995: - return BACnetVendorId_PAYNE_SPARKMAN_LIGHTING_MANGEMENT, true - case 996: - return BACnetVendorId_ASHCROFT, true - case 997: - return BACnetVendorId_JET_CONTROLS_CORP, true - case 998: - return BACnetVendorId_ZUMTOBEL_LIGHTING_GMBH, true + case 780: { /* '780' */ + return "SmartEdge" + } + case 781: { /* '781' */ + return "Mitsubishi Electric Australia Pty Ltd" + } + case 782: { /* '782' */ + return "Triangle Research International Ptd Ltd" + } + case 783: { /* '783' */ + return "Produal Oy" + } + case 784: { /* '784' */ + return "Milestone Systems A/S" + } + case 785: { /* '785' */ + return "Trustbridge" + } + case 786: { /* '786' */ + return "Feedback Solutions" + } + case 787: { /* '787' */ + return "IES" + } + case 788: { /* '788' */ + return "ABB Power Protection SA" + } + case 789: { /* '789' */ + return "Riptide IO" + } + case 79: { /* '79' */ + return "Hochiki Corporation" + } + case 790: { /* '790' */ + return "Messerschmitt Systems AG" + } + case 791: { /* '791' */ + return "Dezem Energy Controlling" + } + case 792: { /* '792' */ + return "MechoSystems" + } + case 793: { /* '793' */ + return "evon GmbH" + } + case 794: { /* '794' */ + return "CS Lab GmbH" + } + case 795: { /* '795' */ + return "8760 Enterprises, Inc." + } + case 796: { /* '796' */ + return "Touche Controls" + } + case 797: { /* '797' */ + return "Ontrol Teknik Malzeme San. ve Tic. A.S." + } + case 798: { /* '798' */ + return "Uni Control System Sp. Z o.o." + } + case 799: { /* '799' */ + return "Weihai Ploumeter Co., Ltd" + } + case 8: { /* '8' */ + return "Delta Controls" + } + case 80: { /* '80' */ + return "Fr. Sauter AG" + } + case 800: { /* '800' */ + return "Elcom International Pvt. Ltd" + } + case 801: { /* '801' */ + return "Signify" + } + case 802: { /* '802' */ + return "AutomationDirect" + } + case 803: { /* '803' */ + return "Paragon Robotics" + } + case 804: { /* '804' */ + return "SMT System & Modules Technology AG" + } + case 805: { /* '805' */ + return "Radix IoT LLC" + } + case 806: { /* '806' */ + return "CMR Controls Ltd" + } + case 807: { /* '807' */ + return "Innovari, Inc." + } + case 808: { /* '808' */ + return "ABB Control Products" + } + case 809: { /* '809' */ + return "Gesellschaft fur Gebäudeautomation mbH" + } + case 81: { /* '81' */ + return "Matsushita Electric Works, Ltd." + } + case 810: { /* '810' */ + return "RODI Systems Corp." + } + case 811: { /* '811' */ + return "Nextek Power Systems" + } + case 812: { /* '812' */ + return "Creative Lighting" + } + case 813: { /* '813' */ + return "WaterFurnace International" + } + case 814: { /* '814' */ + return "Mercury Security" + } + case 815: { /* '815' */ + return "Hisense (Shandong) Air-Conditioning Co., Ltd." + } + case 816: { /* '816' */ + return "Layered Solutions, Inc." + } + case 817: { /* '817' */ + return "Leegood Automatic System, Inc." + } + case 818: { /* '818' */ + return "Shanghai Restar Technology Co., Ltd." + } + case 819: { /* '819' */ + return "Reimann Ingenieurbüro" + } + case 82: { /* '82' */ + return "Mitsubishi Electric Corporation, Inazawa Works" + } + case 820: { /* '820' */ + return "LynTec" + } + case 821: { /* '821' */ + return "HTP" + } + case 822: { /* '822' */ + return "Elkor Technologies, Inc." + } + case 823: { /* '823' */ + return "Bentrol Pty Ltd" + } + case 824: { /* '824' */ + return "Team-Control Oy" + } + case 825: { /* '825' */ + return "NextDevice, LLC" + } + case 826: { /* '826' */ + return "iSMA CONTROLLI S.p.a." + } + case 827: { /* '827' */ + return "King I Electronics Co., Ltd" + } + case 828: { /* '828' */ + return "SAMDAV" + } + case 829: { /* '829' */ + return "Next Gen Industries Pvt. Ltd." + } + case 83: { /* '83' */ + return "Mitsubishi Heavy Industries, Ltd." + } + case 830: { /* '830' */ + return "Entic LLC" + } + case 831: { /* '831' */ + return "ETAP" + } + case 832: { /* '832' */ + return "Moralle Electronics Limited" + } + case 833: { /* '833' */ + return "Leicom AG" + } + case 834: { /* '834' */ + return "Watts Regulator Company" + } + case 835: { /* '835' */ + return "S.C. Orbtronics S.R.L." + } + case 836: { /* '836' */ + return "Gaussan Technologies" + } + case 837: { /* '837' */ + return "WEBfactory GmbH" + } + case 838: { /* '838' */ + return "Ocean Controls" + } + case 839: { /* '839' */ + return "Messana Air-Ray Conditioning s.r.l." + } + case 84: { /* '84' */ + return "Xylem, Inc." + } + case 840: { /* '840' */ + return "Hangzhou BATOWN Technology Co. Ltd." + } + case 841: { /* '841' */ + return "Reasonable Controls" + } + case 842: { /* '842' */ + return "Servisys, Inc." + } + case 843: { /* '843' */ + return "halstrup-walcher GmbH" + } + case 844: { /* '844' */ + return "SWG Automation Fuzhou Limited" + } + case 845: { /* '845' */ + return "KSB Aktiengesellschaft" + } + case 846: { /* '846' */ + return "Hybryd Sp. z o.o." + } + case 847: { /* '847' */ + return "Helvatron AG" + } + case 848: { /* '848' */ + return "Oderon Sp. Z.O.O." + } + case 849: { /* '849' */ + return "mikolab" + } + case 85: { /* '85' */ + return "Yamatake Building Systems Co., Ltd." + } + case 850: { /* '850' */ + return "Exodraft" + } + case 851: { /* '851' */ + return "Hochhuth GmbH" + } + case 852: { /* '852' */ + return "Integrated System Technologies Ltd." + } + case 853: { /* '853' */ + return "Shanghai Cellcons Controls Co., Ltd" + } + case 854: { /* '854' */ + return "Emme Controls, LLC" + } + case 855: { /* '855' */ + return "Field Diagnostic Services, Inc." + } + case 856: { /* '856' */ + return "Ges Teknik A.S." + } + case 857: { /* '857' */ + return "Global Power Products, Inc." + } + case 858: { /* '858' */ + return "Option NV" + } + case 859: { /* '859' */ + return "BV-Control AG" + } + case 86: { /* '86' */ + return "The Watt Stopper, Inc." + } + case 860: { /* '860' */ + return "Sigren Engineering AG" + } + case 861: { /* '861' */ + return "Shanghai Jaltone Technology Co., Ltd." + } + case 862: { /* '862' */ + return "MaxLine Solutions Ltd" + } + case 863: { /* '863' */ + return "Kron Instrumentos Elétricos Ltda" + } + case 864: { /* '864' */ + return "Thermo Matrix" + } + case 865: { /* '865' */ + return "Infinite Automation Systems, Inc." + } + case 866: { /* '866' */ + return "Vantage" + } + case 867: { /* '867' */ + return "Elecon Measurements Pvt Ltd" + } + case 868: { /* '868' */ + return "TBA" + } + case 869: { /* '869' */ + return "Carnes Company" + } + case 87: { /* '87' */ + return "Aichi Tokei Denki Co., Ltd." + } + case 870: { /* '870' */ + return "Harman Professional" + } + case 871: { /* '871' */ + return "Nenutec Asia Pacific Pte Ltd" + } + case 872: { /* '872' */ + return "Gia NV" + } + case 873: { /* '873' */ + return "Kepware Tehnologies" + } + case 874: { /* '874' */ + return "Temperature Electronics Ltd" + } + case 875: { /* '875' */ + return "Packet Power" + } + case 876: { /* '876' */ + return "Project Haystack Corporation" + } + case 877: { /* '877' */ + return "DEOS Controls Americas Inc." + } + case 878: { /* '878' */ + return "Senseware Inc" + } + case 879: { /* '879' */ + return "MST Systemtechnik AG" + } + case 88: { /* '88' */ + return "Activation Technologies, LLC" + } + case 880: { /* '880' */ + return "Lonix Ltd" + } + case 881: { /* '881' */ + return "Gossen Metrawatt GmbH" + } + case 882: { /* '882' */ + return "Aviosys International Inc." + } + case 883: { /* '883' */ + return "Efficient Building Automation Corp." + } + case 884: { /* '884' */ + return "Accutron Instruments Inc." + } + case 885: { /* '885' */ + return "Vermont Energy Control Systems LLC" + } + case 886: { /* '886' */ + return "DCC Dynamics" + } + case 887: { /* '887' */ + return "B.E.G. Brück Electronic GmbH" + } + case 889: { /* '889' */ + return "NGBS Hungary Ltd." + } + case 89: { /* '89' */ + return "Saia-Burgess Controls, Ltd." + } + case 890: { /* '890' */ + return "ILLUM Technology, LLC" + } + case 891: { /* '891' */ + return "Delta Controls Germany Limited" + } + case 892: { /* '892' */ + return "S+T Service & Technique S.A." + } + case 893: { /* '893' */ + return "SimpleSoft" + } + case 894: { /* '894' */ + return "Altair Engineering" + } + case 895: { /* '895' */ + return "EZEN Solution Inc." + } + case 896: { /* '896' */ + return "Fujitec Co. Ltd." + } + case 897: { /* '897' */ + return "Terralux" + } + case 898: { /* '898' */ + return "Annicom" + } + case 899: { /* '899' */ + return "Bihl+Wiedemann GmbH" + } + case 9: { /* '9' */ + return "Siemens Schweiz AG" + } + case 90: { /* '90' */ + return "Hitachi, Ltd." + } + case 900: { /* '900' */ + return "Draper, Inc." + } + case 901: { /* '901' */ + return "Schüco International KG" + } + case 902: { /* '902' */ + return "Otis Elevator Company" + } + case 903: { /* '903' */ + return "Fidelix Oy" + } + case 904: { /* '904' */ + return "RAM GmbH Mess- und Regeltechnik" + } + case 905: { /* '905' */ + return "WEMS" + } + case 906: { /* '906' */ + return "Ravel Electronics Pvt Ltd" + } + case 907: { /* '907' */ + return "OmniMagni" + } + case 908: { /* '908' */ + return "Echelon" + } + case 909: { /* '909' */ + return "Intellimeter Canada, Inc." + } + case 91: { /* '91' */ + return "Novar Corp./Trend Control Systems Ltd." + } + case 910: { /* '910' */ + return "Bithouse Oy" + } + case 912: { /* '912' */ + return "BuildPulse" + } + case 913: { /* '913' */ + return "Shenzhen 1000 Building Automation Co. Ltd" + } + case 914: { /* '914' */ + return "AED Engineering GmbH" + } + case 915: { /* '915' */ + return "Güntner GmbH & Co. KG" + } + case 916: { /* '916' */ + return "KNXlogic" + } + case 917: { /* '917' */ + return "CIM Environmental Group" + } + case 918: { /* '918' */ + return "Flow Control" + } + case 919: { /* '919' */ + return "Lumen Cache, Inc." + } + case 92: { /* '92' */ + return "Mitsubishi Electric Lighting Corporation" + } + case 920: { /* '920' */ + return "Ecosystem" + } + case 921: { /* '921' */ + return "Potter Electric Signal Company, LLC" + } + case 922: { /* '922' */ + return "Tyco Fire & Security S.p.A." + } + case 923: { /* '923' */ + return "Watanabe Electric Industry Co., Ltd." + } + case 924: { /* '924' */ + return "Causam Energy" + } + case 925: { /* '925' */ + return "W-tec AG" + } + case 926: { /* '926' */ + return "IMI Hydronic Engineering International SA" + } + case 927: { /* '927' */ + return "ARIGO Software" + } + case 928: { /* '928' */ + return "MSA Safety" + } + case 929: { /* '929' */ + return "Smart Solucoes Ltda – MERCATO" + } + case 93: { /* '93' */ + return "Argus Control Systems, Ltd." + } + case 930: { /* '930' */ + return "PIATRA Engineering" + } + case 931: { /* '931' */ + return "ODIN Automation Systems, LLC" + } + case 932: { /* '932' */ + return "Belparts NV" + } + case 933: { /* '933' */ + return "UAB, SALDA" + } + case 934: { /* '934' */ + return "Alre-IT Regeltechnik GmbH" + } + case 935: { /* '935' */ + return "Ingenieurbüro H. Lertes GmbH & Co. KG" + } + case 936: { /* '936' */ + return "Breathing Buildings" + } + case 937: { /* '937' */ + return "eWON SA" + } + case 938: { /* '938' */ + return "Cav. Uff. Giacomo Cimberio S.p.A" + } + case 939: { /* '939' */ + return "PKE Electronics AG" + } + case 94: { /* '94' */ + return "Kyuki Corporation" + } + case 940: { /* '940' */ + return "Allen" + } + case 941: { /* '941' */ + return "Kastle Systems" + } + case 942: { /* '942' */ + return "Logical Electro-Mechanical (EM) Systems, Inc." + } + case 943: { /* '943' */ + return "ppKinetics Instruments, LLC" + } + case 944: { /* '944' */ + return "Cathexis Technologies" + } + case 945: { /* '945' */ + return "Sylop sp. Z o.o. sp.k" + } + case 946: { /* '946' */ + return "Brauns Control GmbH" + } + case 947: { /* '947' */ + return "OMRON SOCIAL SOLUTIONS CO., LTD." + } + case 948: { /* '948' */ + return "Wildeboer Bauteile Gmbh" + } + case 949: { /* '949' */ + return "Shanghai Biens Technologies Ltd" + } + case 95: { /* '95' */ + return "Richards-Zeta Building Intelligence, Inc." + } + case 950: { /* '950' */ + return "Beijing HZHY Technology Co., Ltd" + } + case 951: { /* '951' */ + return "Building Clouds" + } + case 952: { /* '952' */ + return "The University of Sheffield-Department of Electronic and Electrical Engineering" + } + case 953: { /* '953' */ + return "Fabtronics Australia Pty Ltd" + } + case 954: { /* '954' */ + return "SLAT" + } + case 955: { /* '955' */ + return "Software Motor Corporation" + } + case 956: { /* '956' */ + return "Armstrong International Inc." + } + case 957: { /* '957' */ + return "Steril-Aire, Inc." + } + case 958: { /* '958' */ + return "Infinique" + } + case 959: { /* '959' */ + return "Arcom" + } + case 96: { /* '96' */ + return "Scientech R&D, Inc." + } + case 960: { /* '960' */ + return "Argo Performance, Ltd" + } + case 961: { /* '961' */ + return "Dialight" + } + case 962: { /* '962' */ + return "Ideal Technical Solutions" + } + case 963: { /* '963' */ + return "Neurobat AG" + } + case 964: { /* '964' */ + return "Neyer Software Consulting LLC" + } + case 965: { /* '965' */ + return "SCADA Technology Development Co., Ltd." + } + case 966: { /* '966' */ + return "Demand Logic Limited" + } + case 967: { /* '967' */ + return "GWA Group Limited" + } + case 968: { /* '968' */ + return "Occitaline" + } + case 969: { /* '969' */ + return "NAO Digital Co., Ltd." + } + case 97: { /* '97' */ + return "VCI Controls, Inc." + } + case 970: { /* '970' */ + return "Shenzhen Chanslink Network Technology Co., Ltd." + } + case 971: { /* '971' */ + return "Samsung Electronics Co., Ltd." + } + case 972: { /* '972' */ + return "Mesa Laboratories, Inc." + } + case 973: { /* '973' */ + return "Fischer" + } + case 974: { /* '974' */ + return "OpSys Solutions Ltd." + } + case 975: { /* '975' */ + return "Advanced Devices Limited" + } + case 976: { /* '976' */ + return "Condair" + } + case 977: { /* '977' */ + return "INELCOM Ingenieria Electronica Comercial S.A." + } + case 978: { /* '978' */ + return "GridPoint, Inc." + } + case 979: { /* '979' */ + return "ADF Technologies Sdn Bhd" + } + case 98: { /* '98' */ + return "Toshiba Corporation" + } + case 980: { /* '980' */ + return "EPM, Inc." + } + case 981: { /* '981' */ + return "Lighting Controls Ltd" + } + case 982: { /* '982' */ + return "Perix Controls Ltd." + } + case 983: { /* '983' */ + return "AERCO International, Inc." + } + case 984: { /* '984' */ + return "KONE Inc." + } + case 985: { /* '985' */ + return "Ziehl-Abegg SE" + } + case 986: { /* '986' */ + return "Robot, S.A." + } + case 987: { /* '987' */ + return "Optigo Networks, Inc." + } + case 988: { /* '988' */ + return "Openmotics BVBA" + } + case 989: { /* '989' */ + return "Metropolitan Industries, Inc." + } + case 99: { /* '99' */ + return "Mitsubishi Electric Corporation Air Conditioning & Refrigeration Systems Works" + } + case 990: { /* '990' */ + return "Huawei Technologies Co., Ltd." + } + case 991: { /* '991' */ + return "Digital Lumens, Inc." + } + case 992: { /* '992' */ + return "Vanti" + } + case 993: { /* '993' */ + return "Cree Lighting" + } + case 994: { /* '994' */ + return "Richmond Heights SDN BHD" + } + case 995: { /* '995' */ + return "Payne-Sparkman Lighting Mangement" + } + case 996: { /* '996' */ + return "Ashcroft" + } + case 997: { /* '997' */ + return "Jet Controls Corp" + } + case 998: { /* '998' */ + return "Zumtobel Lighting GmbH" + } + default: { + return "" + } + } +} + +func BACnetVendorIdFirstEnumForFieldVendorName(value string) (BACnetVendorId, error) { + for _, sizeValue := range BACnetVendorIdValues { + if sizeValue.VendorName() == value { + return sizeValue, nil + } + } + return 0, errors.Errorf("enum for %v describing VendorName not found", value) +} +func BACnetVendorIdByValue(value uint16) (enum BACnetVendorId, ok bool) { + switch value { + case 0: + return BACnetVendorId_ASHRAE, true + case 0xFFFF: + return BACnetVendorId_UNKNOWN_VENDOR, true + case 1: + return BACnetVendorId_NIST, true + case 10: + return BACnetVendorId_SCHNEIDER_ELECTRIC, true + case 100: + return BACnetVendorId_CUSTOM_MECHANICAL_EQUIPMENTLLC, true + case 1000: + return BACnetVendorId_EKON_GMBH, true + case 1001: + return BACnetVendorId_MOLEX, true + case 1002: + return BACnetVendorId_MACO_LIGHTING_PTY_LTD, true + case 1003: + return BACnetVendorId_AXECON_CORP, true + case 1004: + return BACnetVendorId_TENSORPLC, true + case 1005: + return BACnetVendorId_KASEMAN_ENVIRONMENTAL_CONTROL_EQUIPMENT_SHANGHAI_LIMITED, true + case 1006: + return BACnetVendorId_AB_AXIS_INDUSTRIES, true + case 1007: + return BACnetVendorId_NETIX_CONTROLS, true + case 1008: + return BACnetVendorId_ELDRIDGE_PRODUCTS_INC, true + case 1009: + return BACnetVendorId_MICRONICS, true + case 101: + return BACnetVendorId_CLIMATE_MASTER, true + case 1010: + return BACnetVendorId_FORTECHO_SOLUTIONS_LTD, true + case 1011: + return BACnetVendorId_SELLERS_MANUFACTURING_COMPANY, true + case 1012: + return BACnetVendorId_RITE_HITE_DOORS_INC, true + case 1013: + return BACnetVendorId_VIOLET_DEFENSELLC, true + case 1014: + return BACnetVendorId_SIMNA, true + case 1015: + return BACnetVendorId_MULTINERGIE_BEST_INC, true + case 1016: + return BACnetVendorId_MEGA_SYSTEM_TECHNOLOGIES_INC, true + case 1017: + return BACnetVendorId_RHEEM, true + case 1018: + return BACnetVendorId_ING_PUNZENBERGERCOPADATA_GMBH, true + case 1019: + return BACnetVendorId_MEC_ELECTRONICS_GMBH, true + case 102: + return BACnetVendorId_ICP_PANEL_TEC_INC, true + case 1020: + return BACnetVendorId_TACO_COMFORT_SOLUTIONS, true + case 1021: + return BACnetVendorId_ALEXANDER_MAIER_GMBH, true + case 1022: + return BACnetVendorId_ECORITHM_INC, true + case 1023: + return BACnetVendorId_ACCURRO_LTD, true + case 1024: + return BACnetVendorId_ROMTECK_AUSTRALIA_PTY_LTD, true + case 1025: + return BACnetVendorId_SPLASH_MONITORING_LIMITED, true + case 1026: + return BACnetVendorId_LIGHT_APPLICATION, true + case 1027: + return BACnetVendorId_LOGICAL_BUILDING_AUTOMATION, true + case 1028: + return BACnetVendorId_EXILIGHT_OY, true + case 1029: + return BACnetVendorId_HAGER_ELECTROSAS, true + case 103: + return BACnetVendorId_D_TEK_CONTROLS, true + case 1030: + return BACnetVendorId_KLIF_COLTD, true + case 1031: + return BACnetVendorId_HYGRO_MATIK, true + case 1032: + return BACnetVendorId_DANIEL_MOUSSEAU_PROGRAMMATION_ELECTRONIQUE, true + case 1033: + return BACnetVendorId_AERIONICS_INC, true + case 1034: + return BACnetVendorId_MS_ELECTRONIQUE_LTEE, true + case 1035: + return BACnetVendorId_AUTOMATION_COMPONENTS_INC, true + case 1036: + return BACnetVendorId_NIOBRARA_RESEARCH_DEVELOPMENT_CORPORATION, true + case 1037: + return BACnetVendorId_NETCOM_SICHERHEITSTECHNIK_GMBH, true + case 1038: + return BACnetVendorId_LUMELSA, true + case 1039: + return BACnetVendorId_GREAT_PLAINS_INDUSTRIES_INC, true + case 104: + return BACnetVendorId_NEC_ENGINEERING_LTD, true + case 1040: + return BACnetVendorId_DOMOTICA_LABSSRL, true + case 1041: + return BACnetVendorId_ENERGY_CLOUD_INC, true + case 1042: + return BACnetVendorId_VOMATEC, true + case 1043: + return BACnetVendorId_DEMMA_COMPANIES, true + case 1044: + return BACnetVendorId_VALSENA, true + case 1045: + return BACnetVendorId_COMSYS_BRTSCHAG, true + case 1046: + return BACnetVendorId_B_GRID, true + case 1047: + return BACnetVendorId_MDJ_SOFTWARE_PTY_LTD, true + case 1048: + return BACnetVendorId_DIMONOFF_INC, true + case 1049: + return BACnetVendorId_EDOMO_SYSTEMS_GMBH, true + case 105: + return BACnetVendorId_PRIVABV, true + case 1050: + return BACnetVendorId_EFFEKTIVLLC, true + case 1051: + return BACnetVendorId_STEAMO_VAP, true + case 1052: + return BACnetVendorId_GRANDCENTRIX_GMBH, true + case 1053: + return BACnetVendorId_WEINTEK_LABS_INC, true + case 1054: + return BACnetVendorId_INTEFOX_GMBH, true + case 1055: + return BACnetVendorId_RADIUS_AUTOMATION_COMPANY, true + case 1056: + return BACnetVendorId_RINGDALE_INC, true + case 1057: + return BACnetVendorId_IWAKI_AMERICA, true + case 1058: + return BACnetVendorId_BRACTLET, true + case 1059: + return BACnetVendorId_STULZ_AIR_TECHNOLOGY_SYSTEMS_INC, true + case 106: + return BACnetVendorId_MEIDENSHA_CORPORATION, true + case 1060: + return BACnetVendorId_CLIMATE_READY_ENGINEERING_PTY_LTD, true + case 1061: + return BACnetVendorId_GENEA_ENERGY_PARTNERS, true + case 1062: + return BACnetVendorId_IO_TALL_CHILE, true + case 1063: + return BACnetVendorId_IKS_CO_LTD, true + case 1064: + return BACnetVendorId_YODIWOAB, true + case 1065: + return BACnetVendorId_TITA_NELECTRONIC_GMBH, true + case 1066: + return BACnetVendorId_IDEC_CORPORATION, true + case 1067: + return BACnetVendorId_SIFRISL, true + case 1068: + return BACnetVendorId_THERMAL_GAS_SYSTEMS_INC, true + case 1069: + return BACnetVendorId_BUILDING_AUTOMATION_PRODUCTS_INC, true + case 107: + return BACnetVendorId_JCI_SYSTEMS_INTEGRATION_SERVICES, true + case 1070: + return BACnetVendorId_ASSET_MAPPING, true + case 1071: + return BACnetVendorId_SMARTEH_COMPANY, true + case 1072: + return BACnetVendorId_DATAPOD_AUSTRALIA_PTY_LTD, true + case 1073: + return BACnetVendorId_BUILDINGS_ALIVE_PTY_LTD, true + case 1074: + return BACnetVendorId_DIGITAL_ELEKTRONIK, true + case 1075: + return BACnetVendorId_TALENT_AUTOMAOE_TECNOLOGIA_LTDA, true + case 1076: + return BACnetVendorId_NORPOSH_LIMITED, true + case 1077: + return BACnetVendorId_MERKUR_FUNKSYSTEMEAG, true + case 1078: + return BACnetVendorId_FASTERC_ZSPOL_SRO, true + case 1079: + return BACnetVendorId_ECO_ADAPT, true + case 108: + return BACnetVendorId_FREEDOM_CORPORATION, true + case 1080: + return BACnetVendorId_ENERGOCENTRUM_PLUSSRO, true + case 1081: + return BACnetVendorId_AMBXUK_LTD, true + case 1082: + return BACnetVendorId_WESTERN_RESERVE_CONTROLS_INC, true + case 1083: + return BACnetVendorId_LAYER_ZERO_POWER_SYSTEMS_INC, true + case 1084: + return BACnetVendorId_CIC_JAN_HEBECSRO, true + case 1085: + return BACnetVendorId_SIGROVBV, true + case 1086: + return BACnetVendorId_ISYS_INTELLIGENT_SYSTEMS, true + case 1087: + return BACnetVendorId_GAS_DETECTION_AUSTRALIA_PTY_LTD, true + case 1088: + return BACnetVendorId_KINCO_AUTOMATION_SHANGHAI_LTD, true + case 1089: + return BACnetVendorId_LARS_ENERGYLLC, true + case 109: + return BACnetVendorId_NEUBERGER_GEBUDEAUTOMATION_GMBH, true + case 1090: + return BACnetVendorId_FLAMEFASTUK_LTD, true + case 1091: + return BACnetVendorId_ROYAL_SERVICE_AIR_CONDITIONING, true + case 1092: + return BACnetVendorId_AMPIO_SP_ZOO, true + case 1093: + return BACnetVendorId_INOVONICS_WIRELESS_CORPORATION, true + case 1094: + return BACnetVendorId_NVENT_THERMAL_MANAGEMENT, true + case 1095: + return BACnetVendorId_SINOWELL_CONTROL_SYSTEM_LTD, true + case 1096: + return BACnetVendorId_MOXA_INC, true + case 1097: + return BACnetVendorId_MATRIXI_CONTROLSDNBHD, true + case 1098: + return BACnetVendorId_PURPLE_SWIFT, true + case 1099: + return BACnetVendorId_OTIM_TECHNOLOGIES, true + case 11: + return BACnetVendorId_TAC, true + case 110: + return BACnetVendorId_E_ZI_CONTROLS, true + case 1100: + return BACnetVendorId_FLOW_MATE_LIMITED, true + case 1101: + return BACnetVendorId_DEGREE_CONTROLS_INC, true + case 1102: + return BACnetVendorId_FEI_XING_SHANGHAI_SOFTWARE_TECHNOLOGIES_CO_LTD, true + case 1103: + return BACnetVendorId_BERG_GMBH, true + case 1104: + return BACnetVendorId_ARENZIT, true + case 1105: + return BACnetVendorId_EDELSTROM_ELECTRONIC_DEVICES_DESIGNINGLLC, true + case 1106: + return BACnetVendorId_DRIVE_CONNECTLLC, true + case 1107: + return BACnetVendorId_DEVELOP_NOW, true + case 1108: + return BACnetVendorId_POORT, true + case 1109: + return BACnetVendorId_VMEIL_INFORMATION_SHANGHAI_LTD, true + case 111: + return BACnetVendorId_LEVITON_MANUFACTURING, true + case 1110: + return BACnetVendorId_RAYLEIGH_INSTRUMENTS, true + case 1112: + return BACnetVendorId_CODESYS_DEVELOPMENT, true + case 1113: + return BACnetVendorId_SMARTWARE_TECHNOLOGIES_GROUPLLC, true + case 1114: + return BACnetVendorId_POLAR_BEAR_SOLUTIONS, true + case 1115: + return BACnetVendorId_CODRA, true + case 1116: + return BACnetVendorId_PHAROS_ARCHITECTURAL_CONTROLS_LTD, true + case 1117: + return BACnetVendorId_ENGI_NEAR_LTD, true + case 1118: + return BACnetVendorId_AD_HOC_ELECTRONICS, true + case 1119: + return BACnetVendorId_UNIFIED_MICROSYSTEMS, true + case 112: + return BACnetVendorId_FUJITSU_LIMITED, true + case 1120: + return BACnetVendorId_INDUSTRIEELEKTRONIK_BRANDENBURG_GMBH, true + case 1121: + return BACnetVendorId_HARTMANN_GMBH, true + case 1122: + return BACnetVendorId_PISCADA, true + case 1123: + return BACnetVendorId_KM_BSYSTEMSSRO, true + case 1124: + return BACnetVendorId_POWER_TECH_ENGINEERINGAS, true + case 1125: + return BACnetVendorId_TELEFONBAU_ARTHUR_SCHWABE_GMBH_COKG, true + case 1126: + return BACnetVendorId_WUXI_FISTWELOVE_TECHNOLOGY_CO_LTD, true + case 1127: + return BACnetVendorId_PRYSM, true + case 1128: + return BACnetVendorId_STEINEL_GMBH, true + case 1129: + return BACnetVendorId_GEORG_FISCHERJRGAG, true + case 113: + return BACnetVendorId_VERTIV_FORMERLY_EMERSON_NETWORK_POWER, true + case 1130: + return BACnetVendorId_MAKE_DEVELOPSL, true + case 1131: + return BACnetVendorId_MONNIT_CORPORATION, true + case 1132: + return BACnetVendorId_MIRROR_LIFE_CORPORATION, true + case 1133: + return BACnetVendorId_SECURE_METERS_LIMITED, true + case 1134: + return BACnetVendorId_PECO, true + case 1135: + return BACnetVendorId_CCTECH_INC, true + case 1136: + return BACnetVendorId_LIGHT_FI_LIMITED, true + case 1137: + return BACnetVendorId_NICE_SPA, true + case 1138: + return BACnetVendorId_FIBER_SEN_SYS_INC, true + case 1139: + return BACnetVendorId_BD_BUCHTAUND_DEGEORGI, true + case 114: + return BACnetVendorId_SA_ARMSTRONG_LTD, true + case 1140: + return BACnetVendorId_VENTACITY_SYSTEMS_INC, true + case 1141: + return BACnetVendorId_HITACHI_JOHNSON_CONTROLS_AIR_CONDITIONING_INC, true + case 1142: + return BACnetVendorId_SAGE_METERING_INC, true + case 1143: + return BACnetVendorId_ANDEL_LIMITED, true + case 1144: + return BACnetVendorId_ECO_SMART_TECHNOLOGIES, true + case 1145: + return BACnetVendorId_SET, true + case 1146: + return BACnetVendorId_PROTEC_FIRE_DETECTION_SPAINSL, true + case 1147: + return BACnetVendorId_AGRAMERUG, true + case 1148: + return BACnetVendorId_ANYLINK_ELECTRONIC_GMBH, true + case 1149: + return BACnetVendorId_SCHINDLER_LTD, true + case 115: + return BACnetVendorId_VISONETAG, true + case 1150: + return BACnetVendorId_JIBREEL_ABDEEN_EST, true + case 1151: + return BACnetVendorId_FLUIDYNE_CONTROL_SYSTEMS_PVT_LTD, true + case 1152: + return BACnetVendorId_PRISM_SYSTEMS_INC, true + case 1153: + return BACnetVendorId_ENERTIV, true + case 1154: + return BACnetVendorId_MIRASOFT_GMBH_COKG, true + case 1155: + return BACnetVendorId_DUALTECHIT, true + case 1156: + return BACnetVendorId_COUNTLOGICLLC, true + case 1157: + return BACnetVendorId_KOHLER, true + case 1158: + return BACnetVendorId_CHEN_SEN_CONTROLS_CO_LTD, true + case 1159: + return BACnetVendorId_GREENHECK, true + case 116: + return BACnetVendorId_MM_SYSTEMS_INC, true + case 1160: + return BACnetVendorId_INTWINE_CONNECTLLC, true + case 1161: + return BACnetVendorId_KARLBORGS_ELKONTROLL, true + case 1162: + return BACnetVendorId_DATAKOM, true + case 1163: + return BACnetVendorId_HOGA_CONTROLAS, true + case 1164: + return BACnetVendorId_COOL_AUTOMATION, true + case 1165: + return BACnetVendorId_INTER_SEARCH_CO_LTD, true + case 1166: + return BACnetVendorId_DABBEL_AUTOMATION_INTELLIGENCE_GMBH, true + case 1167: + return BACnetVendorId_GADGEON_ENGINEERING_SMARTNESS, true + case 1168: + return BACnetVendorId_COSTER_GROUP_SRL, true + case 1169: + return BACnetVendorId_WALTER_MLLERAG, true + case 117: + return BACnetVendorId_CUSTOM_SOFTWARE_ENGINEERING, true + case 1170: + return BACnetVendorId_FLUKE, true + case 1171: + return BACnetVendorId_QUINTEX_SYSTEMS_LTD, true + case 1172: + return BACnetVendorId_SENFFICIENTSDNBHD, true + case 1173: + return BACnetVendorId_NUBEIO_OPERATIONS_PTY_LTD, true + case 1174: + return BACnetVendorId_DAS_INTEGRATOR_PTE_LTD, true + case 1175: + return BACnetVendorId_CREVIS_CO_LTD, true + case 1176: + return BACnetVendorId_I_SQUAREDSOFTWAREINC, true + case 1177: + return BACnetVendorId_KTG_GMBH, true + case 1178: + return BACnetVendorId_POK_GROUP_OY, true + case 1179: + return BACnetVendorId_ADISCOM, true + case 118: + return BACnetVendorId_NITTAN_COMPANY_LIMITED, true + case 1180: + return BACnetVendorId_INCUSENSE, true + case 1181: + return BACnetVendorId_F, true + case 1182: + return BACnetVendorId_ANORD_MARDIX_INC, true + case 1183: + return BACnetVendorId_HOSCH_GEBUDEAUTOMATION_NEUE_PRODUKTE_GMBH, true + case 1184: + return BACnetVendorId_BOSCHIO_GMBH, true + case 1185: + return BACnetVendorId_ROYAL_BOON_EDAM_INTERNATIONALBV, true + case 1186: + return BACnetVendorId_CLACK_CORPORATION, true + case 1187: + return BACnetVendorId_UNITEX_CONTROLSLLC, true + case 1188: + return BACnetVendorId_KTC_GTEBORGAB, true + case 1189: + return BACnetVendorId_INTERZONAB, true + case 119: + return BACnetVendorId_ELUTIONS_INC_WIZCON_SYSTEMSSAS, true + case 1190: + return BACnetVendorId_ISDEINGSL, true + case 1191: + return BACnetVendorId_AB_MAUTOMATIONBUILDINGMESSAGING_GMBH, true + case 1192: + return BACnetVendorId_KENTEC_ELECTRONICS_LTD, true + case 1193: + return BACnetVendorId_EMERSON_COMMERCIALAND_RESIDENTIAL_SOLUTIONS, true + case 1194: + return BACnetVendorId_POWERSIDE, true + case 1195: + return BACnetVendorId_SMC_GROUP, true + case 1196: + return BACnetVendorId_EOS_WEATHER_INSTRUMENTS, true + case 1197: + return BACnetVendorId_ZONEX_SYSTEMS, true + case 1198: + return BACnetVendorId_GENEREX_SYSTEMS_COMPUTERVERTRIEBSGESELLSCHAFTMBH, true + case 1199: + return BACnetVendorId_ENERGY_WALLLLC, true + case 12: + return BACnetVendorId_ORION_ANALYSIS_CORPORATION, true + case 120: + return BACnetVendorId_PACOM_SYSTEMS_PTY_LTD, true + case 1200: + return BACnetVendorId_THERMOFIN, true + case 1201: + return BACnetVendorId_SDATAWAYSA, true + case 1202: + return BACnetVendorId_BIDDLE_AIR_SYSTEMS_LIMITED, true + case 1203: + return BACnetVendorId_KESSLER_ELLIS_PRODUCTS, true + case 1204: + return BACnetVendorId_THERMOSCREENS, true + case 1205: + return BACnetVendorId_MODIO, true + case 1206: + return BACnetVendorId_NEWRON_SOLUTIONS, true + case 1207: + return BACnetVendorId_UNITRONICS, true + case 1208: + return BACnetVendorId_TRILUX_GMBH_COKG, true + case 1209: + return BACnetVendorId_KOLLMORGEN_STEUERUNGSTECHNIK_GMBH, true + case 121: + return BACnetVendorId_UNICO_INC, true + case 1210: + return BACnetVendorId_BOSCH_REXROTHAG, true + case 1211: + return BACnetVendorId_ALARKO_CARRIER, true + case 1212: + return BACnetVendorId_VERDIGRIS_TECHNOLOGIES, true + case 1213: + return BACnetVendorId_SHANGHAISIIC_LONGCHUANG_SMARTECH_SO_LTD, true + case 1214: + return BACnetVendorId_QUINDA_CO, true + case 1215: + return BACnetVendorId_GRUNERAG, true + case 1216: + return BACnetVendorId_BACMOVE, true + case 1217: + return BACnetVendorId_PSIDACAB, true + case 1218: + return BACnetVendorId_ISICON_CONTROL_AUTOMATION, true + case 1219: + return BACnetVendorId_BIG_ASS_FANS, true + case 122: + return BACnetVendorId_EBTRON_INC, true + case 1220: + return BACnetVendorId_DIN_DIETMAR_NOCKER_FACILITY_MANAGEMENT_GMBH, true + case 1221: + return BACnetVendorId_TELDIO, true + case 1222: + return BACnetVendorId_MIKROKLIM_ASRO, true + case 1223: + return BACnetVendorId_DENSITY, true + case 1224: + return BACnetVendorId_ICONAG_LEITTECHNIK_GMBH, true + case 1225: + return BACnetVendorId_AWAIR, true + case 1226: + return BACnetVendorId_TD_ENGINEERING_LTD, true + case 1227: + return BACnetVendorId_SISTEMAS_DIGITALES, true + case 1228: + return BACnetVendorId_LOXONE_ELECTRONICS_GMBH, true + case 1229: + return BACnetVendorId_ACTRON_AIR, true + case 123: + return BACnetVendorId_SCADA_ENGINE, true + case 1230: + return BACnetVendorId_INDUCTIVE_AUTOMATION, true + case 1231: + return BACnetVendorId_THOR_ENGINEERING_GMBH, true + case 1232: + return BACnetVendorId_BERNER_INTERNATIONALLLC, true + case 1233: + return BACnetVendorId_POTSDAM_SENSORSLLC, true + case 1234: + return BACnetVendorId_KOHLER_MIRA_LTD, true + case 1235: + return BACnetVendorId_TECOMON_GMBH, true + case 1236: + return BACnetVendorId_TWO_DIMENSIONAL_INSTRUMENTSLLC, true + case 1237: + return BACnetVendorId_LEFA_TECHNOLOGIES_PTE_LTD, true + case 1238: + return BACnetVendorId_EATONCEAG_NOTLICHTSYSTEME_GMBH, true + case 1239: + return BACnetVendorId_COMMBOX_TECNOLOGIA, true + case 124: + return BACnetVendorId_LENZE_AMERICAS_FORMERLYAC_TECHNOLOGY_CORPORATION, true + case 1240: + return BACnetVendorId_IP_VIDEO_CORPORATION, true + case 1241: + return BACnetVendorId_BENDER_GMBH_COKG, true + case 1242: + return BACnetVendorId_RHYMEBUS_CORPORATION, true + case 1243: + return BACnetVendorId_AXON_SYSTEMS_LTD, true + case 1244: + return BACnetVendorId_ENGINEERED_AIR, true + case 1245: + return BACnetVendorId_ELIPSE_SOFTWARE_LTDA, true + case 1246: + return BACnetVendorId_SIMATIX_BUILDING_TECHNOLOGIES_PVT_LTD, true + case 1247: + return BACnetVendorId_WA_BENJAMIN_ELECTRIC_CO, true + case 1248: + return BACnetVendorId_TROX_AIR_CONDITIONING_COMPONENTS_SUZHOU_CO_LTD, true + case 1249: + return BACnetVendorId_SC_MEDICAL_PTY_LTD, true + case 125: + return BACnetVendorId_EAGLE_TECHNOLOGY, true + case 1250: + return BACnetVendorId_ELCANICAS, true + case 1251: + return BACnetVendorId_OBEOAS, true + case 1252: + return BACnetVendorId_TAPA_INC, true + case 1253: + return BACnetVendorId_ASE_SMART_ENERGY_INC, true + case 1254: + return BACnetVendorId_PERFORMANCE_SERVICES_INC, true + case 1255: + return BACnetVendorId_VERIDIFY_SECURITY, true + case 1256: + return BACnetVendorId_CD_INNOVATIONLTD, true + case 1257: + return BACnetVendorId_BEN_PEOPLES_INDUSTRIESLLC, true + case 1258: + return BACnetVendorId_UNICOMM_SPZOO, true + case 1259: + return BACnetVendorId_THING_TECHNOLOGIES_GMBH, true + case 126: + return BACnetVendorId_DATA_AIRE_INC, true + case 1260: + return BACnetVendorId_BEIJING_HAI_LIN_ENERGY_SAVING_TECHNOLOGY_INC, true + case 1261: + return BACnetVendorId_DIGITAL_REALTY, true + case 1262: + return BACnetVendorId_AGROWTEK_INC, true + case 1263: + return BACnetVendorId_DSP_INNOVATIONBV, true + case 1264: + return BACnetVendorId_STV_ELECTRONIC_GMBH, true + case 1265: + return BACnetVendorId_ELMEASURE_INDIA_PVT_LTD, true + case 1266: + return BACnetVendorId_PINESHORE_ENERGYLLC, true + case 1267: + return BACnetVendorId_BRASCH_ENVIRONMENTAL_TECHNOLOGIESLLC, true + case 1268: + return BACnetVendorId_LION_CONTROLS_COLTD, true + case 1269: + return BACnetVendorId_SINUX, true + case 127: + return BACnetVendorId_ABB_INC, true + case 1270: + return BACnetVendorId_AVNET_INC, true + case 1271: + return BACnetVendorId_SOMFY_ACTIVITESSA, true + case 1272: + return BACnetVendorId_AMICO, true + case 1273: + return BACnetVendorId_SAGE_GLASS, true + case 1274: + return BACnetVendorId_AU_VERTE, true + case 1275: + return BACnetVendorId_AGILE_CONNECTS_PVT_LTD, true + case 1276: + return BACnetVendorId_LOCIMATION_PTY_LTD, true + case 1277: + return BACnetVendorId_ENVIO_SYSTEMS_GMBH, true + case 1278: + return BACnetVendorId_VOYTECH_SYSTEMS_LIMITED, true + case 1279: + return BACnetVendorId_DAVIDSMEYERUND_PAUL_GMBH, true + case 128: + return BACnetVendorId_TRANSBIT_SPZOO, true + case 1280: + return BACnetVendorId_LUSHER_ENGINEERING_SERVICES, true + case 1281: + return BACnetVendorId_CHNT_NANJING_TECHSEL_INTELLIGENT_COMPANYLTD, true + case 1282: + return BACnetVendorId_THREETRONICS_PTY_LTD, true + case 1283: + return BACnetVendorId_SKY_FOUNDRYLLC, true + case 1284: + return BACnetVendorId_HANIL_PRO_TECH, true + case 1285: + return BACnetVendorId_SENSORSCALL, true + case 1286: + return BACnetVendorId_SHANGHAI_JINGPU_INFORMATION_TECHNOLOGY_CO_LTD, true + case 1287: + return BACnetVendorId_LICHTMANUFAKTUR_BERLIN_GMBH, true + case 1288: + return BACnetVendorId_ECO_PARKING_TECHNOLOGIES, true + case 1289: + return BACnetVendorId_ENVISION_DIGITAL_INTERNATIONAL_PTE_LTD, true + case 129: + return BACnetVendorId_TOSHIBA_CARRIER_CORPORATION, true + case 1290: + return BACnetVendorId_ANTONY_DEVELOPPEMENT_ELECTRONIQUE, true + case 1291: + return BACnetVendorId_ISYSTEMS, true + case 1292: + return BACnetVendorId_THUREON_INTERNATIONAL_LIMITED, true + case 1293: + return BACnetVendorId_PULSAFEEDER, true + case 1294: + return BACnetVendorId_MEGA_CHIPS_CORPORATION, true + case 1295: + return BACnetVendorId_TES_CONTROLS, true + case 1296: + return BACnetVendorId_CERMATE, true + case 1297: + return BACnetVendorId_GRAND_VALLEY_STATE_UNIVERSITY, true + case 1298: + return BACnetVendorId_SYMCON_GMBH, true + case 1299: + return BACnetVendorId_THE_CHICAGO_FAUCET_COMPANY, true + case 13: + return BACnetVendorId_TELETROL_SYSTEMS_INC, true + case 130: + return BACnetVendorId_SHENZHEN_JUNZHI_HI_TECH_CO_LTD, true + case 1300: + return BACnetVendorId_GEBERITAG, true + case 1301: + return BACnetVendorId_REX_CONTROLS, true + case 1302: + return BACnetVendorId_IVMS_GMBH, true + case 1303: + return BACnetVendorId_MNPP_SATURN_LTD, true + case 1304: + return BACnetVendorId_REGAL_BELOIT, true + case 1305: + return BACnetVendorId_ACS_AIR_CONDITIONING_SOLUTIONS, true + case 1306: + return BACnetVendorId_GBX_TECHNOLOGYLLC, true + case 1307: + return BACnetVendorId_KAITERRA, true + case 1308: + return BACnetVendorId_THIN_KUANLOT_TECHNOLOGY_SHANGHAI_CO_LTD, true + case 1309: + return BACnetVendorId_HO_CO_STOBV, true + case 131: + return BACnetVendorId_TOKAI_SOFT, true + case 1310: + return BACnetVendorId_SHENZHENASAI_TECHNOLOGY_CO_LTD, true + case 1311: + return BACnetVendorId_RPS_SPA, true + case 1312: + return BACnetVendorId_ESMSOLUTIONS, true + case 1313: + return BACnetVendorId_IO_TECH_SYSTEMS_LIMITED, true + case 1314: + return BACnetVendorId_I_AUTO_LOGIC_CO_LTD, true + case 1315: + return BACnetVendorId_NEW_AGE_MICROLLC, true + case 1316: + return BACnetVendorId_GUARDIAN_GLASS, true + case 1317: + return BACnetVendorId_GUANGZHOU_ZHAOYU_INFORMATION_TECHNOLOGY, true + case 1318: + return BACnetVendorId_ACE_IOT_SOLUTIONSLLC, true + case 1319: + return BACnetVendorId_PORIS_ELECTRONICS_CO_LTD, true + case 132: + return BACnetVendorId_BLUE_RIDGE_TECHNOLOGIES, true + case 1320: + return BACnetVendorId_TERMINUS_TECHNOLOGIES_GROUP, true + case 1321: + return BACnetVendorId_INTECH1_INC, true + case 1322: + return BACnetVendorId_ACCURATE_ELECTRONICS, true + case 1323: + return BACnetVendorId_FLUENCE_BIOENGINEERING, true + case 1324: + return BACnetVendorId_MUN_HEAN_SINGAPORE_PTE_LTD, true + case 1325: + return BACnetVendorId_KATRONICAG_COKG, true + case 1326: + return BACnetVendorId_SUZHOU_XIN_AO_INFORMATION_TECHNOLOGY_CO_LTD, true + case 1327: + return BACnetVendorId_LINKTEKK_TECHNOLOGYJSC, true + case 1328: + return BACnetVendorId_STIRLING_ULTRACOLD, true + case 1329: + return BACnetVendorId_UV_PARTNERS_INC, true + case 133: + return BACnetVendorId_VERIS_INDUSTRIES, true + case 1330: + return BACnetVendorId_PRO_MINENT_GMBH, true + case 1331: + return BACnetVendorId_MULTI_TECH_SYSTEMS_INC, true + case 1332: + return BACnetVendorId_JUMO_GMBH_COKG, true + case 1333: + return BACnetVendorId_QINGDAO_HUARUI_TECHNOLOGY_CO_LTD, true + case 1334: + return BACnetVendorId_CAIRN_SYSTEMES, true + case 1335: + return BACnetVendorId_NEURO_LOGIC_RESEARCH_CORP, true + case 1336: + return BACnetVendorId_TRANSITION_TECHNOLOGIES_ADVANCED_SOLUTIONS_SPZOO, true + case 1337: + return BACnetVendorId_XXTERBV, true + case 1338: + return BACnetVendorId_PASSIVE_LOGIC, true + case 1339: + return BACnetVendorId_EN_SMART_CONTROLS, true + case 134: + return BACnetVendorId_CENTAURUS_PRIME, true + case 1340: + return BACnetVendorId_WATTS_HEATINGAND_HOT_WATER_SOLUTIONSDBA_LYNC, true + case 1341: + return BACnetVendorId_TROPOSPHAIRA_TECHNOLOGIESLLP, true + case 1342: + return BACnetVendorId_NETWORK_THERMOSTAT, true + case 1343: + return BACnetVendorId_TITANIUM_INTELLIGENT_SOLUTIONSLLC, true + case 1344: + return BACnetVendorId_NUMA_PRODUCTSLLC, true + case 1345: + return BACnetVendorId_WAREMA_RENKHOFFSE, true + case 1346: + return BACnetVendorId_FRESEAS, true + case 1347: + return BACnetVendorId_MAPPED, true + case 1348: + return BACnetVendorId_ELEKTRODESIG_NVENTILATORYSRO, true + case 1349: + return BACnetVendorId_AIR_CARE_AUTOMATION_INC, true + case 135: + return BACnetVendorId_SAND_NETWORK_SYSTEMS, true + case 1350: + return BACnetVendorId_ANTRUM, true + case 1351: + return BACnetVendorId_BAO_LINH_CONNECT_TECHNOLOGY, true + case 1352: + return BACnetVendorId_VIRGINIA_CONTROLSLLC, true + case 1353: + return BACnetVendorId_DUOSYSSDNBHD, true + case 1354: + return BACnetVendorId_ONSENSAS, true + case 1355: + return BACnetVendorId_VAUGHN_THERMAL_CORPORATION, true + case 1356: + return BACnetVendorId_THERMOPLASTIC_ENGINEERING_LTDTPE, true + case 1357: + return BACnetVendorId_WIRTH_RESEARCH_LTD, true + case 1358: + return BACnetVendorId_SST_AUTOMATION, true + case 1359: + return BACnetVendorId_SHANGHAI_BENCOL_ELECTRONIC_TECHNOLOGY_CO_LTD, true + case 136: + return BACnetVendorId_REGULVAR_INC, true + case 1360: + return BACnetVendorId_AIWAA_SYSTEMS_PRIVATE_LIMITED, true + case 1361: + return BACnetVendorId_ENLESS_WIRELESS, true + case 1362: + return BACnetVendorId_OZUNO_ENGINEERING_PTY_LTD, true + case 1363: + return BACnetVendorId_HUBBELL_THE_ELECTRIC_HEATER_COMPANY, true + case 1364: + return BACnetVendorId_INDUSTRIAL_TURNAROUND_CORPORATIONITAC, true + case 1365: + return BACnetVendorId_WADSWORTH_CONTROL_SYSTEMS, true + case 1366: + return BACnetVendorId_SERVICES_HILO_INC, true + case 1367: + return BACnetVendorId_IDM_ENERGIESYSTEME_GMBH, true + case 1368: + return BACnetVendorId_BE_NEXTBV, true + case 1369: + return BACnetVendorId_CLEAN_AIRAI_CORPORATION, true + case 137: + return BACnetVendorId_AF_DTEK_DIVISIONOF_FASTEK_INTERNATIONAL_INC, true + case 1370: + return BACnetVendorId_REVOLUTION_MICROELECTRONICS_AMERICA_INC, true + case 1371: + return BACnetVendorId_ARENDARIT_SECURITY_GMBH, true + case 1372: + return BACnetVendorId_ZED_BEE_TECHNOLOGIES_PVT_LTD, true + case 1373: + return BACnetVendorId_WINMATE_TECHNOLOGY_SOLUTIONS_PVT_LTD, true + case 1374: + return BACnetVendorId_SENTICON_LTD, true + case 1375: + return BACnetVendorId_ROSSAKERAB, true + case 1376: + return BACnetVendorId_OPIT_SOLUTIONS_LTD, true + case 1377: + return BACnetVendorId_HOTOWELL_INTERNATIONAL_CO_LIMITED, true + case 1378: + return BACnetVendorId_INIM_ELECTRONICSSRL_UNIPERSONALE, true + case 1379: + return BACnetVendorId_AIRTHINGSASA, true + case 138: + return BACnetVendorId_POWER_COLD_COMFORT_AIR_SOLUTIONS_INC, true + case 1380: + return BACnetVendorId_ANALOG_DEVICES_INC, true + case 1381: + return BACnetVendorId_AI_DIRECTIONSDMCC, true + case 1382: + return BACnetVendorId_PRIMA_ELECTRO_SPA, true + case 1383: + return BACnetVendorId_KLT_CONTROL_SYSTEM_LTD, true + case 1384: + return BACnetVendorId_EVOLUTION_CONTROLS_INC, true + case 1385: + return BACnetVendorId_BEVER_INNOVATIONS, true + case 1386: + return BACnetVendorId_PELICAN_WIRELESS_SYSTEMS, true + case 1387: + return BACnetVendorId_CONTROL_CONCEPTS_INC, true + case 1388: + return BACnetVendorId_AUGMATIC_TECHNOLOGIES_PVT_LTD, true + case 1389: + return BACnetVendorId_XIAMEN_MILESIGHTLOT_CO_LTD, true + case 139: + return BACnetVendorId_I_CONTROLS, true + case 1390: + return BACnetVendorId_TIANJIN_ANJIELOT_SCHIENCEAND_TECHNOLOGY_CO_LTD, true + case 1391: + return BACnetVendorId_GUANGZHOUS_ENERGY_ELECTRONICS_TECHNOLOGY_CO_LTD, true + case 1392: + return BACnetVendorId_AKVO_ATMOSPHERIC_WATER_SYSTEMS_PVT_LTD, true + case 1393: + return BACnetVendorId_EM_FIRST_CO_LTD, true + case 1394: + return BACnetVendorId_IION_SYSTEMS_APS, true + case 1396: + return BACnetVendorId_SAF_TEHNIKAJSC, true + case 1397: + return BACnetVendorId_KOMFORTIQ_INC, true + case 1398: + return BACnetVendorId_COOL_TERA_LIMITED, true + case 1399: + return BACnetVendorId_HADRON_SOLUTIONS_SRLS, true + case 14: + return BACnetVendorId_CIMETRICS_TECHNOLOGY, true + case 140: + return BACnetVendorId_VICONICS_ELECTRONICS_INC, true + case 1401: + return BACnetVendorId_BITPOOL, true + case 1402: + return BACnetVendorId_SONICULLC, true + case 1403: + return BACnetVendorId_RISHABH_INSTRUMENTS_LIMITED, true + case 1404: + return BACnetVendorId_THING_WAREHOUSELLC, true + case 1405: + return BACnetVendorId_INNOFRIENDS_GMBH, true + case 1406: + return BACnetVendorId_METRONICAKP_SPJ, true + case 141: + return BACnetVendorId_YASKAWA_AMERICA_INC, true + case 142: + return BACnetVendorId_DEO_SCONTROLSYSTEMS_GMBH, true + case 143: + return BACnetVendorId_DIGITALE_MESSUND_STEUERSYSTEMEAG, true + case 144: + return BACnetVendorId_FUJITSU_GENERAL_LIMITED, true + case 145: + return BACnetVendorId_PROJECT_ENGINEERING_SRL, true + case 146: + return BACnetVendorId_SANYO_ELECTRIC_CO_LTD, true + case 147: + return BACnetVendorId_INTEGRATED_INFORMATION_SYSTEMS_INC, true + case 148: + return BACnetVendorId_TEMCO_CONTROLS_LTD, true + case 149: + return BACnetVendorId_AIRTEK_INTERNATIONAL_INC, true + case 15: + return BACnetVendorId_CORNELL_UNIVERSITY, true + case 150: + return BACnetVendorId_ADVANTECH_CORPORATION, true + case 151: + return BACnetVendorId_TITAN_PRODUCTS_LTD, true + case 152: + return BACnetVendorId_REGEL_PARTNERS, true + case 153: + return BACnetVendorId_NATIONAL_ENVIRONMENTAL_PRODUCT, true + case 154: + return BACnetVendorId_UNITEC_CORPORATION, true + case 155: + return BACnetVendorId_KANDEN_ENGINEERING_COMPANY, true + case 156: + return BACnetVendorId_MESSNER_GEBUDETECHNIK_GMBH, true + case 157: + return BACnetVendorId_INTEGRATEDCH, true + case 158: + return BACnetVendorId_PRICE_INDUSTRIES, true + case 159: + return BACnetVendorId_SE_ELEKTRONIC_GMBH, true + case 16: + return BACnetVendorId_UNITED_TECHNOLOGIES_CARRIER, true + case 160: + return BACnetVendorId_ROCKWELL_AUTOMATION, true + case 161: + return BACnetVendorId_ENFLEX_CORP, true + case 162: + return BACnetVendorId_ASI_CONTROLS, true + case 163: + return BACnetVendorId_SYS_MIK_GMBH_DRESDEN, true + case 164: + return BACnetVendorId_HSC_REGELUNGSTECHNIK_GMBH, true + case 165: + return BACnetVendorId_SMART_TEMP_AUSTRALIA_PTY_LTD, true + case 166: + return BACnetVendorId_COOPER_CONTROLS, true + case 167: + return BACnetVendorId_DUKSAN_MECASYS_CO_LTD, true + case 168: + return BACnetVendorId_FUJIIT_CO_LTD, true + case 169: + return BACnetVendorId_VACON_PLC, true + case 17: + return BACnetVendorId_HONEYWELL_INC, true + case 170: + return BACnetVendorId_LEADER_CONTROLS, true + case 171: + return BACnetVendorId_ABB_FORMERLY_CYLON_CONTROLS_LTD, true + case 172: + return BACnetVendorId_COMPAS, true + case 173: + return BACnetVendorId_MITSUBISHI_ELECTRIC_BUILDING_TECHNO_SERVICE_CO_LTD, true + case 174: + return BACnetVendorId_BUILDING_CONTROL_INTEGRATORS, true + case 175: + return BACnetVendorId_ITG_WORLDWIDEM_SDN_BHD, true + case 176: + return BACnetVendorId_LUTRON_ELECTRONICS_CO_INC, true + case 177: + return BACnetVendorId_COOPER_ATKINS_CORPORATION, true + case 178: + return BACnetVendorId_LOYTEC_ELECTRONICS_GMBH, true + case 179: + return BACnetVendorId_PRO_LON, true + case 18: + return BACnetVendorId_ALERTON_HONEYWELL, true + case 180: + return BACnetVendorId_MEGA_CONTROLS_LIMITED, true + case 181: + return BACnetVendorId_MICRO_CONTROL_SYSTEMS_INC, true + case 182: + return BACnetVendorId_KIYON_INC, true + case 183: + return BACnetVendorId_DUST_NETWORKS, true + case 184: + return BACnetVendorId_ADVANCED_BUILDING_AUTOMATION_SYSTEMS, true + case 185: + return BACnetVendorId_HERMOSAG, true + case 186: + return BACnetVendorId_CEZIM, true + case 187: + return BACnetVendorId_SOFTING, true + case 188: + return BACnetVendorId_LYNXSPRING_INC, true + case 189: + return BACnetVendorId_SCHNEIDER_TOSHIBA_INVERTER_EUROPE, true + case 19: + return BACnetVendorId_TACAB, true + case 190: + return BACnetVendorId_DANFOSS_DRIVESAS, true + case 191: + return BACnetVendorId_EATON_CORPORATION, true + case 192: + return BACnetVendorId_MATYCASA, true + case 193: + return BACnetVendorId_BOTECHAB, true + case 194: + return BACnetVendorId_NOVEO_INC, true + case 195: + return BACnetVendorId_AMEV, true + case 196: + return BACnetVendorId_YOKOGAWA_ELECTRIC_CORPORATION, true + case 197: + return BACnetVendorId_BOSCH_BUILDING_AUTOMATION_GMBH, true + case 198: + return BACnetVendorId_EXACT_LOGIC, true + case 199: + return BACnetVendorId_MASS_ELECTRONICS_PTY_LTDDBA_INNOTECH_CONTROL_SYSTEMS_AUSTRALIA, true + case 2: + return BACnetVendorId_THE_TRANE_COMPANY, true + case 20: + return BACnetVendorId_HEWLETT_PACKARD_COMPANY, true + case 200: + return BACnetVendorId_KANDENKO_CO_LTD, true + case 201: + return BACnetVendorId_DTF_DATEN_TECHNIK_FRIES, true + case 202: + return BACnetVendorId_KLIMASOFT_LTD, true + case 203: + return BACnetVendorId_TOSHIBA_SCHNEIDER_INVERTER_CORPORATION, true + case 204: + return BACnetVendorId_CONTROL_APPLICATIONS_LTD, true + case 205: + return BACnetVendorId_CIMONCO_LTD, true + case 206: + return BACnetVendorId_ONICON_INCORPORATED, true + case 207: + return BACnetVendorId_AUTOMATION_DISPLAYS_INC, true + case 208: + return BACnetVendorId_CONTROL_SOLUTIONS_INC, true + case 209: + return BACnetVendorId_REMSDAQ_LIMITED, true + case 21: + return BACnetVendorId_DORSETTES_INC, true + case 210: + return BACnetVendorId_NTT_FACILITIES_INC, true + case 211: + return BACnetVendorId_VIPA_GMBH, true + case 212: + return BACnetVendorId_TSC1_ASSOCIATIONOF_JAPAN, true + case 213: + return BACnetVendorId_STRATO_AUTOMATION, true + case 214: + return BACnetVendorId_HRW_LIMITED, true + case 215: + return BACnetVendorId_LIGHTING_CONTROL_DESIGN_INC, true + case 216: + return BACnetVendorId_MERCY_ELECTRONICAND_ELECTRICAL_INDUSTRIES, true + case 217: + return BACnetVendorId_SAMSUNGSDS_CO_LTD, true + case 218: + return BACnetVendorId_IMPACT_FACILITY_SOLUTIONS_INC, true + case 219: + return BACnetVendorId_AIRCUITY, true + case 22: + return BACnetVendorId_SIEMENS_SCHWEIZAG_FORMERLY_CERBERUSAG, true + case 220: + return BACnetVendorId_CONTROL_TECHNIQUES_LTD, true + case 221: + return BACnetVendorId_OPEN_GENERAL_PTY_LTD, true + case 222: + return BACnetVendorId_WAGO_KONTAKTTECHNIK_GMBH_COKG, true + case 223: + return BACnetVendorId_CERUS_INDUSTRIAL, true + case 224: + return BACnetVendorId_CHLORIDE_POWER_PROTECTION_COMPANY, true + case 225: + return BACnetVendorId_COMPUTROLS_INC, true + case 226: + return BACnetVendorId_PHOENIX_CONTACT_GMBH_COKG, true + case 227: + return BACnetVendorId_GRUNDFOS_MANAGEMENTAS, true + case 228: + return BACnetVendorId_RIDDER_DRIVE_SYSTEMS, true + case 229: + return BACnetVendorId_SOFT_DEVICESDNBHD, true + case 23: + return BACnetVendorId_YORK_CONTROLS_GROUP, true + case 230: + return BACnetVendorId_INTEGRATED_CONTROL_TECHNOLOGY_LIMITED, true + case 231: + return BACnetVendorId_AI_RXPERT_SYSTEMS_INC, true + case 232: + return BACnetVendorId_MICROTROL_LIMITED, true + case 233: + return BACnetVendorId_RED_LION_CONTROLS, true + case 234: + return BACnetVendorId_DIGITAL_ELECTRONICS_CORPORATION, true + case 235: + return BACnetVendorId_ENNOVATIS_GMBH, true + case 236: + return BACnetVendorId_SEROTONIN_SOFTWARE_TECHNOLOGIES_INC, true + case 237: + return BACnetVendorId_LS_INDUSTRIAL_SYSTEMS_CO_LTD, true + case 238: + return BACnetVendorId_SQUARED_COMPANY, true + case 239: + return BACnetVendorId_S_SQUARED_INNOVATIONS_INC, true + case 24: + return BACnetVendorId_AUTOMATED_LOGIC_CORPORATION, true + case 240: + return BACnetVendorId_ARICENT_LTD, true + case 241: + return BACnetVendorId_ETHER_METRICSLLC, true + case 242: + return BACnetVendorId_INDUSTRIAL_CONTROL_COMMUNICATIONS_INC, true + case 243: + return BACnetVendorId_PARAGON_CONTROLS_INC, true + case 244: + return BACnetVendorId_AO_SMITH_CORPORATION, true + case 245: + return BACnetVendorId_CONTEMPORARY_CONTROL_SYSTEMS_INC, true + case 246: + return BACnetVendorId_HMS_INDUSTRIAL_NETWORKSSLU, true + case 247: + return BACnetVendorId_INGENIEURGESELLSCHAFTN_HARTLEBMBH, true + case 248: + return BACnetVendorId_HEAT_TIMER_CORPORATION, true + case 249: + return BACnetVendorId_INGRASYS_TECHNOLOGY_INC, true + case 25: + return BACnetVendorId_CSI_CONTROL_SYSTEMS_INTERNATIONAL, true + case 250: + return BACnetVendorId_COSTERM_BUILDING_AUTOMATION, true + case 251: + return BACnetVendorId_WILOSE, true + case 252: + return BACnetVendorId_EMBEDIA_TECHNOLOGIES_CORP, true + case 253: + return BACnetVendorId_TECHNILOG, true + case 254: + return BACnetVendorId_HR_CONTROLS_LTD_COKG, true + case 255: + return BACnetVendorId_LENNOX_INTERNATIONAL_INC, true + case 256: + return BACnetVendorId_RK_TEC_RAUCHKLAPPEN_STEUERUNGSSYSTEME_GMBH_COKG, true + case 257: + return BACnetVendorId_THERMOMAX_LTD, true + case 258: + return BACnetVendorId_ELCON_ELECTRONIC_CONTROL_LTD, true + case 259: + return BACnetVendorId_LARMIA_CONTROLAB, true + case 26: + return BACnetVendorId_PHOENIX_CONTROLS_CORPORATION, true + case 260: + return BACnetVendorId_BA_CNET_STACKAT_SOURCE_FORGE, true + case 261: + return BACnetVendorId_GS_SECURITY_SERVICESAS, true + case 262: + return BACnetVendorId_EXOR_INTERNATIONAL_SPA, true + case 263: + return BACnetVendorId_CRISTAL_CONTROLES, true + case 264: + return BACnetVendorId_REGINAB, true + case 265: + return BACnetVendorId_DIMENSION_SOFTWARE_INC, true + case 266: + return BACnetVendorId_SYNAP_SENSE_CORPORATION, true + case 267: + return BACnetVendorId_BEIJING_NANTREE_ELECTRONIC_CO_LTD, true + case 268: + return BACnetVendorId_CAMUS_HYDRONICS_LTD, true + case 269: + return BACnetVendorId_KAWASAKI_HEAVY_INDUSTRIES_LTD, true + case 27: + return BACnetVendorId_INNOVEX_TECHNOLOGIES_INC, true + case 270: + return BACnetVendorId_CRITICAL_ENVIRONMENT_TECHNOLOGIES, true + case 271: + return BACnetVendorId_ILSHINIBS_CO_LTD, true + case 272: + return BACnetVendorId_ELESTA_ENERGY_CONTROLAG, true + case 273: + return BACnetVendorId_KROPMAN_INSTALLATIETECHNIEK, true + case 274: + return BACnetVendorId_BALDOR_ELECTRIC_COMPANY, true + case 275: + return BACnetVendorId_ING_AMBH, true + case 276: + return BACnetVendorId_GE_CONSUMER_INDUSTRIAL, true + case 277: + return BACnetVendorId_FUNCTIONAL_DEVICES_INC, true + case 278: + return BACnetVendorId_STUDIOSC, true + case 279: + return BACnetVendorId_M_SYSTEM_CO_LTD, true + case 28: + return BACnetVendorId_KMC_CONTROLS_INC, true + case 280: + return BACnetVendorId_YOKOTA_CO_LTD, true + case 281: + return BACnetVendorId_HITRANSE_TECHNOLOGY_COLTD, true + case 282: + return BACnetVendorId_VIGILENT_CORPORATION, true + case 283: + return BACnetVendorId_KELE_INC, true + case 284: + return BACnetVendorId_OPERA_ELECTRONICS_INC, true + case 285: + return BACnetVendorId_GENTEC, true + case 286: + return BACnetVendorId_EMBEDDED_SCIENCE_LABSLLC, true + case 287: + return BACnetVendorId_PARKER_HANNIFIN_CORPORATION, true + case 288: + return BACnetVendorId_MA_CAPS_INTERNATIONAL_LIMITED, true + case 289: + return BACnetVendorId_LINK_CORPORATION, true + case 29: + return BACnetVendorId_XN_TECHNOLOGIES_INC, true + case 290: + return BACnetVendorId_ROMUTEC_STEUERU_REGELSYSTEME_GMBH, true + case 291: + return BACnetVendorId_PRIBUSIN_INC, true + case 292: + return BACnetVendorId_ADVANTAGE_CONTROLS, true + case 293: + return BACnetVendorId_CRITICAL_ROOM_CONTROL, true + case 294: + return BACnetVendorId_LEGRAND, true + case 295: + return BACnetVendorId_TONGDY_CONTROL_TECHNOLOGY_CO_LTD, true + case 296: + return BACnetVendorId_ISSARO_INTEGRIERTE_SYSTEMTECHNIK, true + case 297: + return BACnetVendorId_PRO_DEV_INDUSTRIES, true + case 298: + return BACnetVendorId_DRISTEEM, true + case 299: + return BACnetVendorId_CREATIVE_ELECTRONIC_GMBH, true + case 3: + return BACnetVendorId_MC_QUAY_INTERNATIONAL, true + case 30: + return BACnetVendorId_HYUNDAI_INFORMATION_TECHNOLOGY_CO_LTD, true + case 300: + return BACnetVendorId_SWEGONAB, true + case 301: + return BACnetVendorId_FIRVEN_ASRO, true + case 302: + return BACnetVendorId_HITACHI_APPLIANCES_INC, true + case 303: + return BACnetVendorId_REAL_TIME_AUTOMATION_INC, true + case 304: + return BACnetVendorId_ITEC_HANKYU_HANSHIN_CO, true + case 305: + return BACnetVendorId_CYRUSEM_ENGINEERING_CO_LTD, true + case 306: + return BACnetVendorId_BADGER_METER, true + case 307: + return BACnetVendorId_CIRRASCALE_CORPORATION, true + case 308: + return BACnetVendorId_ELESTA_GMBH_BUILDING_AUTOMATION, true + case 309: + return BACnetVendorId_SECURITON, true + case 31: + return BACnetVendorId_TOKIMEC_INC, true + case 310: + return BACnetVendorId_O_SLSOFT_INC, true + case 311: + return BACnetVendorId_HANAZEDER_ELECTRONIC_GMBH, true + case 312: + return BACnetVendorId_HONEYWELL_SECURITY_DEUTSCHLAND_NOVAR_GMBH, true + case 313: + return BACnetVendorId_SIEMENS_INDUSTRY_INC, true + case 314: + return BACnetVendorId_ETM_PROFESSIONAL_CONTROL_GMBH, true + case 315: + return BACnetVendorId_MEITAVTEC_LTD, true + case 316: + return BACnetVendorId_JANITZA_ELECTRONICS_GMBH, true + case 317: + return BACnetVendorId_MKS_NORDHAUSEN, true + case 318: + return BACnetVendorId_DE_GIER_DRIVE_SYSTEMSBV, true + case 319: + return BACnetVendorId_CYPRESS_ENVIROSYSTEMS, true + case 32: + return BACnetVendorId_SIMPLEX, true + case 320: + return BACnetVendorId_SMAR_TRONSRO, true + case 321: + return BACnetVendorId_VERARI_SYSTEMS_INC, true + case 322: + return BACnetVendorId_KW_ELECTRONIC_SERVICE_INC, true + case 323: + return BACnetVendorId_ALFASMART_ENERGY_MANAGEMENT, true + case 324: + return BACnetVendorId_TELKONET_INC, true + case 325: + return BACnetVendorId_SECURITON_GMBH, true + case 326: + return BACnetVendorId_CEMTREX_INC, true + case 327: + return BACnetVendorId_PERFORMANCE_TECHNOLOGIES_INC, true + case 328: + return BACnetVendorId_XTRALIS_AUST_PTY_LTD, true + case 329: + return BACnetVendorId_TROX_GMBH, true + case 33: + return BACnetVendorId_NORTH_BUILDING_TECHNOLOGIES_LIMITED, true + case 330: + return BACnetVendorId_BEIJING_HYSINE_TECHNOLOGY_CO_LTD, true + case 331: + return BACnetVendorId_RCK_CONTROLS_INC, true + case 332: + return BACnetVendorId_DISTECH_CONTROLSSAS, true + case 333: + return BACnetVendorId_NOVAR_HONEYWELL, true + case 334: + return BACnetVendorId_THES_GROUP_INC, true + case 335: + return BACnetVendorId_SCHNEIDER_ELECTRIC1, true + case 336: + return BACnetVendorId_LHA_SYSTEMS, true + case 337: + return BACnetVendorId_GH_MENGINEERING_GROUP_INC, true + case 338: + return BACnetVendorId_CLLIMALUXSA, true + case 339: + return BACnetVendorId_VAISALA_OYJ, true + case 34: + return BACnetVendorId_NOTIFIER, true + case 340: + return BACnetVendorId_COMPLEX_BEIJING_TECHNOLOGY_COLTD, true + case 341: + return BACnetVendorId_SCAD_AMETRICS, true + case 342: + return BACnetVendorId_POWERPEGNSI_LIMITED, true + case 343: + return BACnetVendorId_BA_CNET_INTEROPERABILITY_TESTING_SERVICES_INC, true + case 344: + return BACnetVendorId_TECOAS, true + case 345: + return BACnetVendorId_PLEXUS_TECHNOLOGY_INC, true + case 346: + return BACnetVendorId_ENERGY_FOCUS_INC, true + case 347: + return BACnetVendorId_POWERSMITHS_INTERNATIONAL_CORP, true + case 348: + return BACnetVendorId_NICHIBEI_CO_LTD, true + case 349: + return BACnetVendorId_HKC_TECHNOLOGY_LTD, true + case 35: + return BACnetVendorId_RELIABLE_CONTROLS_CORPORATION, true + case 350: + return BACnetVendorId_OVATION_NETWORKS_INC, true + case 351: + return BACnetVendorId_SETRA_SYSTEMS, true + case 352: + return BACnetVendorId_AVG_AUTOMATION, true + case 353: + return BACnetVendorId_ZXC_LTD, true + case 354: + return BACnetVendorId_BYTE_SPHERE, true + case 355: + return BACnetVendorId_GENERITON_CO_LTD, true + case 356: + return BACnetVendorId_HOLTER_REGELARMATUREN_GMBH_COKG, true + case 357: + return BACnetVendorId_BEDFORD_INSTRUMENTSLLC, true + case 358: + return BACnetVendorId_STANDAIR_INC, true + case 359: + return BACnetVendorId_WEG_AUTOMATIONRD, true + case 36: + return BACnetVendorId_TRIDIUM_INC, true + case 360: + return BACnetVendorId_PROLON_CONTROL_SYSTEMS_APS, true + case 361: + return BACnetVendorId_INNEASOFT, true + case 362: + return BACnetVendorId_CONNEX_SOFT_GMBH, true + case 363: + return BACnetVendorId_CEAG_NOTLICHTSYSTEME_GMBH, true + case 364: + return BACnetVendorId_DISTECH_CONTROLS_INC, true + case 365: + return BACnetVendorId_INDUSTRIAL_TECHNOLOGY_RESEARCH_INSTITUTE, true + case 366: + return BACnetVendorId_ICONICS_INC, true + case 367: + return BACnetVendorId_IQ_CONTROLSSC, true + case 368: + return BACnetVendorId_OJ_ELECTRONICSAS, true + case 369: + return BACnetVendorId_ROLBIT_LTD, true + case 37: + return BACnetVendorId_MSA_SAFETY, true + case 370: + return BACnetVendorId_SYNAPSYS_SOLUTIONS_LTD, true + case 371: + return BACnetVendorId_ACME_ENGINEERING_PROD_LTD, true + case 372: + return BACnetVendorId_ZENER_ELECTRIC_PTY_LTD, true + case 373: + return BACnetVendorId_SELECTRONIX_INC, true + case 374: + return BACnetVendorId_GORBET_BANERJEELLC, true + case 375: + return BACnetVendorId_IME, true + case 376: + return BACnetVendorId_STEPHENH_DAWSON_COMPUTER_SERVICE, true + case 377: + return BACnetVendorId_ACCUTROLLLC, true + case 378: + return BACnetVendorId_SCHNEIDER_ELEKTRONIK_GMBH, true + case 379: + return BACnetVendorId_ALPHA_INNO_TEC_GMBH, true + case 38: + return BACnetVendorId_SILICON_ENERGY, true + case 380: + return BACnetVendorId_ADM_MICRO_INC, true + case 381: + return BACnetVendorId_GREYSTONE_ENERGY_SYSTEMS_INC, true + case 382: + return BACnetVendorId_CAP_TECHNOLOGIE, true + case 383: + return BACnetVendorId_KE_RO_SYSTEMS, true + case 384: + return BACnetVendorId_DOMAT_CONTROL_SYSTEMSRO, true + case 385: + return BACnetVendorId_EFEKTRONICS_PTY_LTD, true + case 386: + return BACnetVendorId_HEKATRON_VERTRIEBS_GMBH, true + case 387: + return BACnetVendorId_SECURITONAG, true + case 388: + return BACnetVendorId_CARLO_GAVAZZI_CONTROLS_SPA, true + case 389: + return BACnetVendorId_CHIPKIN_AUTOMATION_SYSTEMS, true + case 39: + return BACnetVendorId_KIEBACK_PETER_GMBH_COKG, true + case 390: + return BACnetVendorId_SAVANT_SYSTEMSLLC, true + case 391: + return BACnetVendorId_SIMMTRONIC_LIGHTING_CONTROLS, true + case 392: + return BACnetVendorId_ABELKO_INNOVATIONAB, true + case 393: + return BACnetVendorId_SERESCO_TECHNOLOGIES_INC, true + case 394: + return BACnetVendorId_IT_WATCHDOGS, true + case 395: + return BACnetVendorId_AUTOMATION_ASSIST_JAPAN_CORP, true + case 396: + return BACnetVendorId_THERMOKON_SENSORTECHNIK_GMBH, true + case 397: + return BACnetVendorId_E_GAUGE_SYSTEMSLLC, true + case 398: + return BACnetVendorId_QUANTUM_AUTOMATIONASIAPTE_LTD, true + case 399: + return BACnetVendorId_TOSHIBA_LIGHTING_TECHNOLOGY_CORP, true + case 4: + return BACnetVendorId_POLAR_SOFT, true + case 40: + return BACnetVendorId_ANACON_SYSTEMS_INC, true + case 400: + return BACnetVendorId_SPIN_ENGENHARIADE_AUTOMAO_LTDA, true + case 401: + return BACnetVendorId_LOGISTICS_SYSTEMS_SOFTWARE_SERVICES_INDIAPVT_LTD, true + case 402: + return BACnetVendorId_DELTA_CONTROLS_INTEGRATION_PRODUCTS, true + case 403: + return BACnetVendorId_FOCUS_MEDIA, true + case 404: + return BACnetVendorId_LUM_ENERGI_INC, true + case 405: + return BACnetVendorId_KARA_SYSTEMS, true + case 406: + return BACnetVendorId_RF_CODE_INC, true + case 407: + return BACnetVendorId_FATEK_AUTOMATION_CORP, true + case 408: + return BACnetVendorId_JANDA_SOFTWARE_COMPANYLLC, true + case 409: + return BACnetVendorId_OPEN_SYSTEM_SOLUTIONS_LIMITED, true + case 41: + return BACnetVendorId_SYSTEMS_CONTROLS_INSTRUMENTSLLC, true + case 410: + return BACnetVendorId_INTELEC_SYSTEMSPTY_LTD, true + case 411: + return BACnetVendorId_ECOLODGIXLLC, true + case 412: + return BACnetVendorId_DOUGLAS_LIGHTING_CONTROLS, true + case 413: + return BACnetVendorId_IS_ATECH_GMBH, true + case 414: + return BACnetVendorId_AREAL, true + case 415: + return BACnetVendorId_BECKHOFF_AUTOMATION, true + case 416: + return BACnetVendorId_IPAS_GMBH, true + case 417: + return BACnetVendorId_KE_THERM_SOLUTIONS, true + case 418: + return BACnetVendorId_BASE_PRODUCTS, true + case 419: + return BACnetVendorId_DTL_CONTROLSLLC, true + case 42: + return BACnetVendorId_ACUITY_BRANDS_LIGHTING_INC, true + case 420: + return BACnetVendorId_INNCOM_INTERNATIONAL_INC, true + case 421: + return BACnetVendorId_METZCONNECT_GMBH, true + case 422: + return BACnetVendorId_GREENTROL_AUTOMATION_INC, true + case 423: + return BACnetVendorId_BELIMO_AUTOMATIONAG, true + case 424: + return BACnetVendorId_SAMSUNG_HEAVY_INDUSTRIES_CO_LTD, true + case 425: + return BACnetVendorId_TRIACTA_POWER_TECHNOLOGIES_INC, true + case 426: + return BACnetVendorId_GLOBESTAR_SYSTEMS, true + case 427: + return BACnetVendorId_MLB_ADVANCED_MEDIALP, true + case 428: + return BACnetVendorId_SWG_STUCKMANN_WIRTSCHAFTLICHE_GEBUDESYSTEME_GMBH, true + case 429: + return BACnetVendorId_SENSOR_SWITCH, true + case 43: + return BACnetVendorId_MICROPOWER_MANUFACTURING, true + case 430: + return BACnetVendorId_MULTITEK_POWER_LIMITED, true + case 431: + return BACnetVendorId_AQUAMETROAG, true + case 432: + return BACnetVendorId_LG_ELECTRONICS_INC, true + case 433: + return BACnetVendorId_ELECTRONIC_THEATRE_CONTROLS_INC, true + case 434: + return BACnetVendorId_MITSUBISHI_ELECTRIC_CORPORATION_NAGOYA_WORKS, true + case 435: + return BACnetVendorId_DELTA_ELECTRONICS_INC, true + case 436: + return BACnetVendorId_ELMA_KURTALJ_LTD, true + case 437: + return BACnetVendorId_TYCO_FIRE_SECURITY_GMBH, true + case 438: + return BACnetVendorId_NEDAP_SECURITY_MANAGEMENT, true + case 439: + return BACnetVendorId_ESC_AUTOMATION_INC, true + case 44: + return BACnetVendorId_MATRIX_CONTROLS, true + case 440: + return BACnetVendorId_DSPYOU_LTD, true + case 441: + return BACnetVendorId_GE_SENSINGAND_INSPECTION_TECHNOLOGIES, true + case 442: + return BACnetVendorId_EMBEDDED_SYSTEMSSIA, true + case 443: + return BACnetVendorId_BEFEGA_GMBH, true + case 444: + return BACnetVendorId_BASELINE_INC, true + case 445: + return BACnetVendorId_KEY_ACT, true + case 446: + return BACnetVendorId_OEM_CTRL, true + case 447: + return BACnetVendorId_CLARKSON_CONTROLS_LIMITED, true + case 448: + return BACnetVendorId_ROGERWELL_CONTROL_SYSTEM_LIMITED, true + case 449: + return BACnetVendorId_SCL_ELEMENTS, true + case 45: + return BACnetVendorId_METALAIRE, true + case 450: + return BACnetVendorId_HITACHI_LTD1, true + case 451: + return BACnetVendorId_NEWRON_SYSTEMSA, true + case 452: + return BACnetVendorId_BEVECO_GEBOUWAUTOMATISERINGBV, true + case 453: + return BACnetVendorId_STREAMSIDE_SOLUTIONS, true + case 454: + return BACnetVendorId_YELLOWSTONE_SOFT, true + case 455: + return BACnetVendorId_OZTECH_INTELLIGENT_SYSTEMS_PTY_LTD, true + case 456: + return BACnetVendorId_NOVELAN_GMBH, true + case 457: + return BACnetVendorId_FLEXIM_AMERICAS_CORPORATION, true + case 458: + return BACnetVendorId_ICPDAS_CO_LTD, true + case 459: + return BACnetVendorId_CARMA_INDUSTRIES_INC, true + case 46: + return BACnetVendorId_ESS_ENGINEERING, true + case 460: + return BACnetVendorId_LOG_ONE_LTD, true + case 461: + return BACnetVendorId_TECO_ELECTRIC_MACHINERY_CO_LTD, true + case 462: + return BACnetVendorId_CONNECT_EX_INC, true + case 463: + return BACnetVendorId_TURBODDC_SDWEST, true + case 464: + return BACnetVendorId_QUATROSENSE_ENVIRONMENTAL_LTD, true + case 465: + return BACnetVendorId_FIFTH_LIGHT_TECHNOLOGY_LTD, true + case 466: + return BACnetVendorId_SCIENTIFIC_SOLUTIONS_LTD, true + case 467: + return BACnetVendorId_CONTROLLER_AREA_NETWORK_SOLUTIONSM_SDN_BHD, true + case 468: + return BACnetVendorId_RESOL_ELEKTRONISCHE_REGELUNGEN_GMBH, true + case 469: + return BACnetVendorId_RPBUSLLC, true + case 47: + return BACnetVendorId_SPHERE_SYSTEMS_PTY_LTD, true + case 470: + return BACnetVendorId_BRS_SISTEMAS_ELETRONICOS, true + case 471: + return BACnetVendorId_WINDOW_MASTERAS, true + case 472: + return BACnetVendorId_SUNLUX_TECHNOLOGIES_LTD, true + case 473: + return BACnetVendorId_MEASURLOGIC, true + case 474: + return BACnetVendorId_FRIMAT_GMBH, true + case 475: + return BACnetVendorId_SPIRAX_SARCO, true + case 476: + return BACnetVendorId_LUXTRON, true + case 477: + return BACnetVendorId_RAYPAK_INC, true + case 478: + return BACnetVendorId_AIR_MONITOR_CORPORATION1, true + case 479: + return BACnetVendorId_REGLER_OCH_WEBBTEKNIK_SVERIGEROWS, true + case 48: + return BACnetVendorId_WALKER_TECHNOLOGIES_CORPORATION, true + case 480: + return BACnetVendorId_INTELLIGENT_LIGHTING_CONTROLS_INC, true + case 481: + return BACnetVendorId_SANYO_ELECTRIC_INDUSTRY_CO_LTD, true + case 482: + return BACnetVendorId_E_MON_ENERGY_MONITORING_PRODUCTS, true + case 483: + return BACnetVendorId_DIGITAL_CONTROL_SYSTEMS, true + case 484: + return BACnetVendorId_ATI_AIRTEST_TECHNOLOGIES_INC, true + case 485: + return BACnetVendorId_SCSSA, true + case 486: + return BACnetVendorId_HMS_INDUSTRIAL_NETWORKSAB, true + case 487: + return BACnetVendorId_SHENZHEN_UNIVERSAL_INTELLISYS_CO_LTD, true + case 488: + return BACnetVendorId_EK_INTELLISYS_SDN_BHD, true + case 489: + return BACnetVendorId_SYS_COM, true + case 49: + return BACnetVendorId_HI_SOLUTIONS_INC, true + case 490: + return BACnetVendorId_FIRECOM_INC, true + case 491: + return BACnetVendorId_ESA_ELEKTROSCHALTANLAGEN_GRIMMA_GMBH, true + case 492: + return BACnetVendorId_KUMAHIRA_CO_LTD, true + case 493: + return BACnetVendorId_HOTRACO, true + case 494: + return BACnetVendorId_SABO_ELEKTRONIK_GMBH, true + case 495: + return BACnetVendorId_EQUIP_TRANS, true + case 496: + return BACnetVendorId_TEMPERATURE_CONTROL_SPECIALITIES_CO_INCTCS, true + case 497: + return BACnetVendorId_FLOW_CON_INTERNATIONALAS, true + case 498: + return BACnetVendorId_THYSSEN_KRUPP_ELEVATOR_AMERICAS, true + case 499: + return BACnetVendorId_ABATEMENT_TECHNOLOGIES, true + case 5: + return BACnetVendorId_JOHNSON_CONTROLS_INC, true + case 50: + return BACnetVendorId_MBS_GMBH, true + case 500: + return BACnetVendorId_CONTINENTAL_CONTROL_SYSTEMSLLC, true + case 501: + return BACnetVendorId_WISAG_AUTOMATISIERUNGSTECHNIK_GMBH_COKG, true + case 502: + return BACnetVendorId_EASYIO, true + case 503: + return BACnetVendorId_EAP_ELECTRIC_GMBH, true + case 504: + return BACnetVendorId_HARDMEIER, true + case 505: + return BACnetVendorId_MIRCOM_GROUPOF_COMPANIES, true + case 506: + return BACnetVendorId_QUEST_CONTROLS, true + case 507: + return BACnetVendorId_MESTEK_INC, true + case 508: + return BACnetVendorId_PULSE_ENERGY, true + case 509: + return BACnetVendorId_TACHIKAWA_CORPORATION, true + case 51: + return BACnetVendorId_SAMSONAG, true + case 510: + return BACnetVendorId_UNIVERSITYOF_NEBRASKA_LINCOLN, true + case 511: + return BACnetVendorId_REDWOOD_SYSTEMS, true + case 512: + return BACnetVendorId_PAS_STEC_INDUSTRIE_ELEKTRONIK_GMBH, true + case 513: + return BACnetVendorId_NGEK_INC, true + case 514: + return BACnetVendorId_TMAC_TECHNOLOGIES, true + case 515: + return BACnetVendorId_JIREH_ENERGY_TECH_CO_LTD, true + case 516: + return BACnetVendorId_ENLIGHTED_INC, true + case 517: + return BACnetVendorId_EL_PIAST_SP_ZOO, true + case 518: + return BACnetVendorId_NETX_AUTOMATION_SOFTWARE_GMBH, true + case 519: + return BACnetVendorId_INVERTEK_DRIVES, true + case 52: + return BACnetVendorId_BADGER_METER_INC, true + case 520: + return BACnetVendorId_DEUTSCHMANN_AUTOMATION_GMBH_COKG, true + case 521: + return BACnetVendorId_EMU_ELECTRONICAG, true + case 522: + return BACnetVendorId_PHAEDRUS_LIMITED, true + case 523: + return BACnetVendorId_SIGMATEK_GMBH_COKG, true + case 524: + return BACnetVendorId_MARLIN_CONTROLS, true + case 525: + return BACnetVendorId_CIRCUTORSA, true + case 526: + return BACnetVendorId_UTC_FIRE_SECURITY, true + case 527: + return BACnetVendorId_DENT_INSTRUMENTS_INC, true + case 528: + return BACnetVendorId_FHP_MANUFACTURING_COMPANY_BOSCH_GROUP, true + case 529: + return BACnetVendorId_GE_INTELLIGENT_PLATFORMS, true + case 53: + return BACnetVendorId_DAIKIN_INDUSTRIES_LTD, true + case 530: + return BACnetVendorId_INNER_RANGE_PTY_LTD, true + case 531: + return BACnetVendorId_GLAS_ENERGY_TECHNOLOGY, true + case 532: + return BACnetVendorId_MSR_ELECTRONIC_GMBH, true + case 533: + return BACnetVendorId_ENERGY_CONTROL_SYSTEMS_INC, true + case 534: + return BACnetVendorId_EMT_CONTROLS, true + case 535: + return BACnetVendorId_DAINTREE, true + case 536: + return BACnetVendorId_EUROIC_CDOO, true + case 537: + return BACnetVendorId_TE_CONNECTIVITY_ENERGY, true + case 538: + return BACnetVendorId_GEZE_GMBH, true + case 539: + return BACnetVendorId_NEC_CORPORATION, true + case 54: + return BACnetVendorId_NARA_CONTROLS_INC, true + case 540: + return BACnetVendorId_HO_CHEUNG_INTERNATIONAL_COMPANY_LIMITED, true + case 541: + return BACnetVendorId_SHARP_MANUFACTURING_SYSTEMS_CORPORATION, true + case 542: + return BACnetVendorId_DOTCONTROL_SAS, true + case 543: + return BACnetVendorId_BEACON_MEDS, true + case 544: + return BACnetVendorId_MIDEA_COMMERCIAL_AIRCON, true + case 545: + return BACnetVendorId_WATT_MASTER_CONTROLS, true + case 546: + return BACnetVendorId_KAMSTRUPAS, true + case 547: + return BACnetVendorId_CA_COMPUTER_AUTOMATION_GMBH, true + case 548: + return BACnetVendorId_LAARS_HEATING_SYSTEMS_COMPANY, true + case 549: + return BACnetVendorId_HITACHI_SYSTEMS_LTD, true + case 55: + return BACnetVendorId_MAMMOTH_INC, true + case 550: + return BACnetVendorId_FUSHANAKE_ELECTRONIC_ENGINEERING_CO_LTD, true + case 551: + return BACnetVendorId_TOSHIBA_INTERNATIONAL_CORPORATION, true + case 552: + return BACnetVendorId_STARMAN_SYSTEMSLLC, true + case 553: + return BACnetVendorId_SAMSUNG_TECHWIN_CO_LTD, true + case 554: + return BACnetVendorId_ISAS_INTEGRATED_SWITCHGEARAND_SYSTEMSPL, true + case 556: + return BACnetVendorId_OBVIUS, true + case 557: + return BACnetVendorId_MAREK_GUZIK, true + case 558: + return BACnetVendorId_VORTEK_INSTRUMENTSLLC, true + case 559: + return BACnetVendorId_UNIVERSAL_LIGHTING_TECHNOLOGIES, true + case 56: + return BACnetVendorId_LIEBERT_CORPORATION, true + case 560: + return BACnetVendorId_MYERS_POWER_PRODUCTS_INC, true + case 561: + return BACnetVendorId_VECTOR_CONTROLS_GMBH, true + case 562: + return BACnetVendorId_CRESTRON_ELECTRONICS_INC, true + case 563: + return BACnetVendorId_AE_CONTROLS_LIMITED, true + case 564: + return BACnetVendorId_PROJEKTOMONTAZAAD, true + case 565: + return BACnetVendorId_FREEAIRE_REFRIGERATION, true + case 566: + return BACnetVendorId_AQUA_COOLER_PTY_LIMITED, true + case 567: + return BACnetVendorId_BASIC_CONTROLS, true + case 568: + return BACnetVendorId_GE_MEASUREMENTAND_CONTROL_SOLUTIONS_ADVANCED_SENSORS, true + case 569: + return BACnetVendorId_EQUAL_NETWORKS, true + case 57: + return BACnetVendorId_SEMCO_INCORPORATED, true + case 570: + return BACnetVendorId_MILLENNIAL_NET, true + case 571: + return BACnetVendorId_APLI_LTD, true + case 572: + return BACnetVendorId_ELECTRO_INDUSTRIES_GAUGE_TECH, true + case 573: + return BACnetVendorId_SANG_MYUNG_UNIVERSITY, true + case 574: + return BACnetVendorId_COPPERTREE_ANALYTICS_INC, true + case 575: + return BACnetVendorId_CORE_NETIX_GMBH, true + case 576: + return BACnetVendorId_ACUTHERM, true + case 577: + return BACnetVendorId_DR_RIEDEL_AUTOMATISIERUNGSTECHNIK_GMBH, true + case 578: + return BACnetVendorId_SHINA_SYSTEM_CO_LTD, true + case 579: + return BACnetVendorId_IQAPERTUS, true + case 58: + return BACnetVendorId_AIR_MONITOR_CORPORATION, true + case 580: + return BACnetVendorId_PSE_TECHNOLOGY, true + case 581: + return BACnetVendorId_BA_SYSTEMS, true + case 582: + return BACnetVendorId_BTICINO, true + case 583: + return BACnetVendorId_MONICO_INC, true + case 584: + return BACnetVendorId_I_CUE, true + case 585: + return BACnetVendorId_TEKMAR_CONTROL_SYSTEMS_LTD, true + case 586: + return BACnetVendorId_CONTROL_TECHNOLOGY_CORPORATION, true + case 587: + return BACnetVendorId_GFAE_GMBH, true + case 588: + return BACnetVendorId_BE_KA_SOFTWARE_GMBH, true + case 589: + return BACnetVendorId_ISOIL_INDUSTRIA_SPA, true + case 59: + return BACnetVendorId_TRIATEKLLC, true + case 590: + return BACnetVendorId_HOME_SYSTEMS_CONSULTING_SPA, true + case 591: + return BACnetVendorId_SOCOMEC, true + case 592: + return BACnetVendorId_EVEREX_COMMUNICATIONS_INC, true + case 593: + return BACnetVendorId_CEIEC_ELECTRIC_TECHNOLOGY, true + case 594: + return BACnetVendorId_ATRILA_GMBH, true + case 595: + return BACnetVendorId_WING_TECHS, true + case 596: + return BACnetVendorId_SHENZHEN_MEK_INTELLISYS_PTE_LTD, true + case 597: + return BACnetVendorId_NESTFIELD_CO_LTD, true + case 598: + return BACnetVendorId_SWISSPHONE_TELECOMAG, true + case 599: + return BACnetVendorId_PNTECHJSC, true + case 6: + return BACnetVendorId_ABB_FORMERLY_AMERICAN_AUTO_MATRIX, true + case 60: + return BACnetVendorId_NEX_LIGHT, true + case 600: + return BACnetVendorId_HORNERAPGLLC, true + case 601: + return BACnetVendorId_PVI_INDUSTRIESLLC, true + case 602: + return BACnetVendorId_ELACOMPIL, true + case 603: + return BACnetVendorId_PEGASUS_AUTOMATION_INTERNATIONALLLC, true + case 604: + return BACnetVendorId_WIGHT_ELECTRONIC_SERVICES_LTD, true + case 605: + return BACnetVendorId_MARCOM, true + case 606: + return BACnetVendorId_EXHAUSTOAS, true + case 607: + return BACnetVendorId_DWYER_INSTRUMENTS_INC, true + case 608: + return BACnetVendorId_LINK_GMBH, true + case 609: + return BACnetVendorId_OPPERMANN_REGELGERATE_GMBH, true + case 61: + return BACnetVendorId_MULTISTACK, true + case 610: + return BACnetVendorId_NU_AIRE_INC, true + case 611: + return BACnetVendorId_NORTEC_HUMIDITY_INC, true + case 612: + return BACnetVendorId_BIGWOOD_SYSTEMS_INC, true + case 613: + return BACnetVendorId_ENBALA_POWER_NETWORKS, true + case 614: + return BACnetVendorId_INTER_ENERGY_CO_LTD, true + case 615: + return BACnetVendorId_ETC, true + case 616: + return BACnetVendorId_COMELECSARL, true + case 617: + return BACnetVendorId_PYTHIA_TECHNOLOGIES, true + case 618: + return BACnetVendorId_TREND_POINT_SYSTEMS_INC, true + case 619: + return BACnetVendorId_AWEX, true + case 62: + return BACnetVendorId_TSI_INCORPORATED, true + case 620: + return BACnetVendorId_EUREVIA, true + case 621: + return BACnetVendorId_KONGSBERGELONAS, true + case 622: + return BACnetVendorId_FLAKT_WOODS, true + case 623: + return BACnetVendorId_EE_ELEKTRONIKGESMBH, true + case 624: + return BACnetVendorId_ARC_INFORMATIQUE, true + case 625: + return BACnetVendorId_SKIDATAAG, true + case 626: + return BACnetVendorId_WSW_SOLUTIONS, true + case 627: + return BACnetVendorId_TREFON_ELECTRONIC_GMBH, true + case 628: + return BACnetVendorId_DONGSEO_SYSTEM, true + case 629: + return BACnetVendorId_KANONTEC_INTELLIGENCE_TECHNOLOGY_CO_LTD, true + case 63: + return BACnetVendorId_WEATHER_RITE_INC, true + case 630: + return BACnetVendorId_EVCO_SPA, true + case 631: + return BACnetVendorId_ACCUENERGY_CANADA_INC, true + case 632: + return BACnetVendorId_SOFTDEL, true + case 633: + return BACnetVendorId_ORION_ENERGY_SYSTEMS_INC, true + case 634: + return BACnetVendorId_ROBOTICSWARE, true + case 635: + return BACnetVendorId_DOMIQ_SPZOO, true + case 636: + return BACnetVendorId_SOLIDYNE, true + case 637: + return BACnetVendorId_ELECSYS_CORPORATION, true + case 638: + return BACnetVendorId_CONDITIONAIRE_INTERNATIONAL_PTY_LIMITED, true + case 639: + return BACnetVendorId_QUEBEC_INC, true + case 64: + return BACnetVendorId_DUNHAM_BUSH, true + case 640: + return BACnetVendorId_HOMERUN_HOLDINGS, true + case 641: + return BACnetVendorId_MURATA_AMERICAS, true + case 642: + return BACnetVendorId_COMPTEK, true + case 643: + return BACnetVendorId_WESTCO_SYSTEMS_INC, true + case 644: + return BACnetVendorId_ADVANCIS_SOFTWARE_SERVICES_GMBH, true + case 645: + return BACnetVendorId_INTERGRIDLLC, true + case 646: + return BACnetVendorId_MARKERR_CONTROLS_INC, true + case 647: + return BACnetVendorId_TOSHIBA_ELEVATORAND_BUILDING_SYSTEMS_CORPORATION, true + case 648: + return BACnetVendorId_SPECTRUM_CONTROLS_INC, true + case 649: + return BACnetVendorId_MKSERVICE, true + case 65: + return BACnetVendorId_RELIANCE_ELECTRIC, true + case 650: + return BACnetVendorId_FOX_THERMAL_INSTRUMENTS, true + case 651: + return BACnetVendorId_SYXTH_SENSE_LTD, true + case 652: + return BACnetVendorId_DUHA_SYSTEMSRO, true + case 653: + return BACnetVendorId_NIBE, true + case 654: + return BACnetVendorId_MELINK_CORPORATION, true + case 655: + return BACnetVendorId_FRITZ_HABER_INSTITUT, true + case 656: + return BACnetVendorId_MTU_ONSITE_ENERGY_GMBH_GAS_POWER_SYSTEMS, true + case 657: + return BACnetVendorId_OMEGA_ENGINEERING_INC, true + case 658: + return BACnetVendorId_AVELON, true + case 659: + return BACnetVendorId_YWIRE_TECHNOLOGIES_INC, true + case 66: + return BACnetVendorId_LCS_INC, true + case 660: + return BACnetVendorId_MR_ENGINEERING_CO_LTD, true + case 661: + return BACnetVendorId_LOCHINVARLLC, true + case 662: + return BACnetVendorId_SONTAY_LIMITED, true + case 663: + return BACnetVendorId_GRUPA_SLAWOMIR_CHELMINSKI, true + case 664: + return BACnetVendorId_ARCH_METER_CORPORATION, true + case 665: + return BACnetVendorId_SENVA_INC, true + case 667: + return BACnetVendorId_FM_TEC, true + case 668: + return BACnetVendorId_SYSTEMS_SPECIALISTS_INC, true + case 669: + return BACnetVendorId_SENSE_AIR, true + case 67: + return BACnetVendorId_REGULATOR_AUSTRALIAPTY_LTD, true + case 670: + return BACnetVendorId_AB_INDUSTRIE_TECHNIK_SRL, true + case 671: + return BACnetVendorId_CORTLAND_RESEARCHLLC, true + case 672: + return BACnetVendorId_MEDIA_VIEW, true + case 673: + return BACnetVendorId_VDA_ELETTRONICA, true + case 674: + return BACnetVendorId_CSS_INC, true + case 675: + return BACnetVendorId_TEK_AIR_SYSTEMS_INC, true + case 676: + return BACnetVendorId_ICDT, true + case 677: + return BACnetVendorId_THE_ARMSTRONG_MONITORING_CORPORATION, true + case 678: + return BACnetVendorId_DIXELL_SRL, true + case 679: + return BACnetVendorId_LEAD_SYSTEM_INC, true + case 68: + return BACnetVendorId_TOUCH_PLATE_LIGHTING_CONTROLS, true + case 680: + return BACnetVendorId_ISM_EURO_CENTERSA, true + case 681: + return BACnetVendorId_TDIS, true + case 682: + return BACnetVendorId_TRADEFIDES, true + case 683: + return BACnetVendorId_KNRR_GMBH_EMERSON_NETWORK_POWER, true + case 684: + return BACnetVendorId_RESOURCE_DATA_MANAGEMENT, true + case 685: + return BACnetVendorId_ABIES_TECHNOLOGY_INC, true + case 686: + return BACnetVendorId_UAB_KOMFOVENT, true + case 687: + return BACnetVendorId_MIRAE_ELECTRICAL_MFG_CO_LTD, true + case 688: + return BACnetVendorId_HUNTER_DOUGLAS_ARCHITECTURAL_PROJECTS_SCANDINAVIA_APS, true + case 689: + return BACnetVendorId_RUNPAQ_GROUP_CO_LTD, true + case 69: + return BACnetVendorId_AMANN_GMBH, true + case 690: + return BACnetVendorId_UNICARDSA, true + case 691: + return BACnetVendorId_IE_TECHNOLOGIES, true + case 692: + return BACnetVendorId_RUSKIN_MANUFACTURING, true + case 693: + return BACnetVendorId_CALON_ASSOCIATES_LIMITED, true + case 694: + return BACnetVendorId_CONTEC_CO_LTD, true + case 695: + return BACnetVendorId_IT_GMBH, true + case 696: + return BACnetVendorId_AUTANI_CORPORATION, true + case 697: + return BACnetVendorId_CHRISTIAN_FORTIN, true + case 698: + return BACnetVendorId_HDL, true + case 699: + return BACnetVendorId_IPID_SPZOO_LIMITED, true + case 7: + return BACnetVendorId_SIEMENS_SCHWEIZAG_FORMERLY_LANDIS_STAEFA_DIVISION_EUROPE, true + case 70: + return BACnetVendorId_RLE_TECHNOLOGIES, true + case 700: + return BACnetVendorId_FUJI_ELECTRIC_CO_LTD, true + case 701: + return BACnetVendorId_VIEW_INC, true + case 702: + return BACnetVendorId_SAMSUNGS1_CORPORATION, true + case 703: + return BACnetVendorId_NEW_LIFT, true + case 704: + return BACnetVendorId_VRT_SYSTEMS, true + case 705: + return BACnetVendorId_MOTION_CONTROL_ENGINEERING_INC, true + case 706: + return BACnetVendorId_WEISS_KLIMATECHNIK_GMBH, true + case 707: + return BACnetVendorId_ELKON, true + case 708: + return BACnetVendorId_ELIWELL_CONTROLS_SRL, true + case 709: + return BACnetVendorId_JAPAN_COMPUTER_TECHNOS_CORP, true + case 71: + return BACnetVendorId_CARDKEY_SYSTEMS, true + case 710: + return BACnetVendorId_RATIONAL_NETWORKEHF, true + case 711: + return BACnetVendorId_MAGNUM_ENERGY_SOLUTIONSLLC, true + case 712: + return BACnetVendorId_MEL_ROK, true + case 713: + return BACnetVendorId_VAE_GROUP, true + case 714: + return BACnetVendorId_LGCNS, true + case 715: + return BACnetVendorId_BERGHOF_AUTOMATIONSTECHNIK_GMBH, true + case 716: + return BACnetVendorId_QUARK_COMMUNICATIONS_INC, true + case 717: + return BACnetVendorId_SONTEX, true + case 718: + return BACnetVendorId_MIVUNEAG, true + case 719: + return BACnetVendorId_PANDUIT, true + case 72: + return BACnetVendorId_SECOM_CO_LTD, true + case 720: + return BACnetVendorId_SMART_CONTROLSLLC, true + case 721: + return BACnetVendorId_COMPU_AIRE_INC, true + case 722: + return BACnetVendorId_SIERRA, true + case 723: + return BACnetVendorId_PROTO_SENSE_TECHNOLOGIES, true + case 724: + return BACnetVendorId_ELTRAC_TECHNOLOGIES_PVT_LTD, true + case 725: + return BACnetVendorId_BEKTAS_INVISIBLE_CONTROLS_GMBH, true + case 726: + return BACnetVendorId_ENTELEC, true + case 727: + return BACnetVendorId_INNEXIV, true + case 728: + return BACnetVendorId_COVENANT, true + case 729: + return BACnetVendorId_DAVITORAB, true + case 73: + return BACnetVendorId_ABB_GEBUDETECHNIKAG_BEREICH_NET_SERV, true + case 730: + return BACnetVendorId_TONG_FANG_TECHNOVATOR, true + case 731: + return BACnetVendorId_BUILDING_ROBOTICS_INC, true + case 732: + return BACnetVendorId_HSSMSRUG, true + case 733: + return BACnetVendorId_FRAM_TACKLLC, true + case 734: + return BACnetVendorId_BL_ACOUSTICS_LTD, true + case 735: + return BACnetVendorId_TRAXXON_ROCK_DRILLS_LTD, true + case 736: + return BACnetVendorId_FRANKE, true + case 737: + return BACnetVendorId_WURM_GMBH_CO, true + case 738: + return BACnetVendorId_ADDENERGIE, true + case 739: + return BACnetVendorId_MIRLE_AUTOMATION_CORPORATION, true + case 74: + return BACnetVendorId_KNX_ASSOCIATIONCVBA, true + case 740: + return BACnetVendorId_IBIS_NETWORKS, true + case 741: + return BACnetVendorId_IDKART_ASRO, true + case 742: + return BACnetVendorId_ANAREN_INC, true + case 743: + return BACnetVendorId_SPAN_INCORPORATED, true + case 744: + return BACnetVendorId_BOSCH_THERMOTECHNOLOGY_CORP, true + case 745: + return BACnetVendorId_DRC_TECHNOLOGYSA, true + case 746: + return BACnetVendorId_SHANGHAI_ENERGY_BUILDING_TECHNOLOGY_CO_LTD, true + case 747: + return BACnetVendorId_FRAPORTAG, true + case 748: + return BACnetVendorId_FLOWGROUP, true + case 749: + return BACnetVendorId_SKYTRON_ENERGY_GMBH, true + case 75: + return BACnetVendorId_INSTITUTEOF_ELECTRICAL_INSTALLATION_ENGINEERSOF_JAPANIEIEJ, true + case 750: + return BACnetVendorId_ALTEL_WICHA_GOLDA_SPJ, true + case 751: + return BACnetVendorId_DRUPAL, true + case 752: + return BACnetVendorId_AXIOMATIC_TECHNOLOGY_LTD, true + case 753: + return BACnetVendorId_BOHNKE_PARTNER, true + case 754: + return BACnetVendorId_FUNCTION1, true + case 755: + return BACnetVendorId_OPTERGY_PTY_LTD, true + case 756: + return BACnetVendorId_LSI_VIRTICUS, true + case 757: + return BACnetVendorId_KONZEPTPARK_GMBH, true + case 758: + return BACnetVendorId_NX_LIGHTING_CONTROLS, true + case 759: + return BACnetVendorId_E_CURV_INC, true + case 76: + return BACnetVendorId_NOHMI_BOSAI_LTD, true + case 760: + return BACnetVendorId_AGNOSYS_GMBH, true + case 761: + return BACnetVendorId_SHANGHAI_SUNFULL_AUTOMATION_COLTD, true + case 762: + return BACnetVendorId_KURZ_INSTRUMENTS_INC, true + case 763: + return BACnetVendorId_CIAS_ELETTRONICA_SRL, true + case 764: + return BACnetVendorId_MULTIAQUA_INC, true + case 765: + return BACnetVendorId_BLUE_BOX, true + case 766: + return BACnetVendorId_SENSIDYNE, true + case 767: + return BACnetVendorId_VIESSMANN_ELEKTRONIK_GMBH, true + case 768: + return BACnetVendorId_AD_FWEBCOMSRL, true + case 769: + return BACnetVendorId_GAYLORD_INDUSTRIES, true + case 77: + return BACnetVendorId_CAREL_SPA, true + case 770: + return BACnetVendorId_MAJUR_LTD, true + case 771: + return BACnetVendorId_SHANGHAI_HUILIN_TECHNOLOGY_CO_LTD, true + case 772: + return BACnetVendorId_EXOTRONIC, true + case 773: + return BACnetVendorId_SAFECONTRO_LSRO, true + case 774: + return BACnetVendorId_AMATIS, true + case 775: + return BACnetVendorId_UNIVERSAL_ELECTRIC_CORPORATION, true + case 776: + return BACnetVendorId_IBA_CNET, true + case 778: + return BACnetVendorId_SMARTRISE_ENGINEERING_INC, true + case 779: + return BACnetVendorId_MIRATRON_INC, true + case 78: + return BACnetVendorId_UTC_FIRE_SECURITY_ESPAASL, true + case 780: + return BACnetVendorId_SMART_EDGE, true + case 781: + return BACnetVendorId_MITSUBISHI_ELECTRIC_AUSTRALIA_PTY_LTD, true + case 782: + return BACnetVendorId_TRIANGLE_RESEARCH_INTERNATIONAL_PTD_LTD, true + case 783: + return BACnetVendorId_PRODUAL_OY, true + case 784: + return BACnetVendorId_MILESTONE_SYSTEMSAS, true + case 785: + return BACnetVendorId_TRUSTBRIDGE, true + case 786: + return BACnetVendorId_FEEDBACK_SOLUTIONS, true + case 787: + return BACnetVendorId_IES, true + case 788: + return BACnetVendorId_ABB_POWER_PROTECTIONSA, true + case 789: + return BACnetVendorId_RIPTIDEIO, true + case 79: + return BACnetVendorId_HOCHIKI_CORPORATION, true + case 790: + return BACnetVendorId_MESSERSCHMITT_SYSTEMSAG, true + case 791: + return BACnetVendorId_DEZEM_ENERGY_CONTROLLING, true + case 792: + return BACnetVendorId_MECHO_SYSTEMS, true + case 793: + return BACnetVendorId_EVON_GMBH, true + case 794: + return BACnetVendorId_CS_LAB_GMBH, true + case 795: + return BACnetVendorId_N_0_ENTERPRISES_INC, true + case 796: + return BACnetVendorId_TOUCHE_CONTROLS, true + case 797: + return BACnetVendorId_ONTROL_TEKNIK_MALZEME_SANVE_TICAS, true + case 798: + return BACnetVendorId_UNI_CONTROL_SYSTEM_SP_ZOO, true + case 799: + return BACnetVendorId_WEIHAI_PLOUMETER_CO_LTD, true + case 8: + return BACnetVendorId_DELTA_CONTROLS, true + case 80: + return BACnetVendorId_FR_SAUTERAG, true + case 800: + return BACnetVendorId_ELCOM_INTERNATIONAL_PVT_LTD, true + case 801: + return BACnetVendorId_SIGNIFY, true + case 802: + return BACnetVendorId_AUTOMATION_DIRECT, true + case 803: + return BACnetVendorId_PARAGON_ROBOTICS, true + case 804: + return BACnetVendorId_SMT_SYSTEM_MODULES_TECHNOLOGYAG, true + case 805: + return BACnetVendorId_RADIX_IOTLLC, true + case 806: + return BACnetVendorId_CMR_CONTROLS_LTD, true + case 807: + return BACnetVendorId_INNOVARI_INC, true + case 808: + return BACnetVendorId_ABB_CONTROL_PRODUCTS, true + case 809: + return BACnetVendorId_GESELLSCHAFTFUR_GEBUDEAUTOMATIONMBH, true + case 81: + return BACnetVendorId_MATSUSHITA_ELECTRIC_WORKS_LTD, true + case 810: + return BACnetVendorId_RODI_SYSTEMS_CORP, true + case 811: + return BACnetVendorId_NEXTEK_POWER_SYSTEMS, true + case 812: + return BACnetVendorId_CREATIVE_LIGHTING, true + case 813: + return BACnetVendorId_WATER_FURNACE_INTERNATIONAL, true + case 814: + return BACnetVendorId_MERCURY_SECURITY, true + case 815: + return BACnetVendorId_HISENSE_SHANDONG_AIR_CONDITIONING_CO_LTD, true + case 816: + return BACnetVendorId_LAYERED_SOLUTIONS_INC, true + case 817: + return BACnetVendorId_LEEGOOD_AUTOMATIC_SYSTEM_INC, true + case 818: + return BACnetVendorId_SHANGHAI_RESTAR_TECHNOLOGY_CO_LTD, true + case 819: + return BACnetVendorId_REIMANN_INGENIEURBRO, true + case 82: + return BACnetVendorId_MITSUBISHI_ELECTRIC_CORPORATION_INAZAWA_WORKS, true + case 820: + return BACnetVendorId_LYN_TEC, true + case 821: + return BACnetVendorId_HTP, true + case 822: + return BACnetVendorId_ELKOR_TECHNOLOGIES_INC, true + case 823: + return BACnetVendorId_BENTROL_PTY_LTD, true + case 824: + return BACnetVendorId_TEAM_CONTROL_OY, true + case 825: + return BACnetVendorId_NEXT_DEVICELLC, true + case 826: + return BACnetVendorId_ISMACONTROLLI_SPA, true + case 827: + return BACnetVendorId_KINGI_ELECTRONICS_CO_LTD, true + case 828: + return BACnetVendorId_SAMDAV, true + case 829: + return BACnetVendorId_NEXT_GEN_INDUSTRIES_PVT_LTD, true + case 83: + return BACnetVendorId_MITSUBISHI_HEAVY_INDUSTRIES_LTD, true + case 830: + return BACnetVendorId_ENTICLLC, true + case 831: + return BACnetVendorId_ETAP, true + case 832: + return BACnetVendorId_MORALLE_ELECTRONICS_LIMITED, true + case 833: + return BACnetVendorId_LEICOMAG, true + case 834: + return BACnetVendorId_WATTS_REGULATOR_COMPANY, true + case 835: + return BACnetVendorId_SC_ORBTRONICSSRL, true + case 836: + return BACnetVendorId_GAUSSAN_TECHNOLOGIES, true + case 837: + return BACnetVendorId_WE_BFACTORY_GMBH, true + case 838: + return BACnetVendorId_OCEAN_CONTROLS, true + case 839: + return BACnetVendorId_MESSANA_AIR_RAY_CONDITIONINGSRL, true + case 84: + return BACnetVendorId_XYLEM_INC, true + case 840: + return BACnetVendorId_HANGZHOUBATOWN_TECHNOLOGY_CO_LTD, true + case 841: + return BACnetVendorId_REASONABLE_CONTROLS, true + case 842: + return BACnetVendorId_SERVISYS_INC, true + case 843: + return BACnetVendorId_HALSTRUPWALCHER_GMBH, true + case 844: + return BACnetVendorId_SWG_AUTOMATION_FUZHOU_LIMITED, true + case 845: + return BACnetVendorId_KSB_AKTIENGESELLSCHAFT, true + case 846: + return BACnetVendorId_HYBRYD_SPZOO, true + case 847: + return BACnetVendorId_HELVATRONAG, true + case 848: + return BACnetVendorId_ODERON_SPZOO, true + case 849: + return BACnetVendorId_MIKOLAB, true + case 85: + return BACnetVendorId_YAMATAKE_BUILDING_SYSTEMS_CO_LTD, true + case 850: + return BACnetVendorId_EXODRAFT, true + case 851: + return BACnetVendorId_HOCHHUTH_GMBH, true + case 852: + return BACnetVendorId_INTEGRATED_SYSTEM_TECHNOLOGIES_LTD, true + case 853: + return BACnetVendorId_SHANGHAI_CELLCONS_CONTROLS_CO_LTD, true + case 854: + return BACnetVendorId_EMME_CONTROLSLLC, true + case 855: + return BACnetVendorId_FIELD_DIAGNOSTIC_SERVICES_INC, true + case 856: + return BACnetVendorId_GES_TEKNIKAS, true + case 857: + return BACnetVendorId_GLOBAL_POWER_PRODUCTS_INC, true + case 858: + return BACnetVendorId_OPTIONNV, true + case 859: + return BACnetVendorId_BV_CONTROLAG, true + case 86: + return BACnetVendorId_THE_WATT_STOPPER_INC, true + case 860: + return BACnetVendorId_SIGREN_ENGINEERINGAG, true + case 861: + return BACnetVendorId_SHANGHAI_JALTONE_TECHNOLOGY_CO_LTD, true + case 862: + return BACnetVendorId_MAX_LINE_SOLUTIONS_LTD, true + case 863: + return BACnetVendorId_KRON_INSTRUMENTOS_ELTRICOS_LTDA, true + case 864: + return BACnetVendorId_THERMO_MATRIX, true + case 865: + return BACnetVendorId_INFINITE_AUTOMATION_SYSTEMS_INC, true + case 866: + return BACnetVendorId_VANTAGE, true + case 867: + return BACnetVendorId_ELECON_MEASUREMENTS_PVT_LTD, true + case 868: + return BACnetVendorId_TBA, true + case 869: + return BACnetVendorId_CARNES_COMPANY, true + case 87: + return BACnetVendorId_AICHI_TOKEI_DENKI_CO_LTD, true + case 870: + return BACnetVendorId_HARMAN_PROFESSIONAL, true + case 871: + return BACnetVendorId_NENUTEC_ASIA_PACIFIC_PTE_LTD, true + case 872: + return BACnetVendorId_GIANV, true + case 873: + return BACnetVendorId_KEPWARE_TEHNOLOGIES, true + case 874: + return BACnetVendorId_TEMPERATURE_ELECTRONICS_LTD, true + case 875: + return BACnetVendorId_PACKET_POWER, true + case 876: + return BACnetVendorId_PROJECT_HAYSTACK_CORPORATION, true + case 877: + return BACnetVendorId_DEOS_CONTROLS_AMERICAS_INC, true + case 878: + return BACnetVendorId_SENSEWARE_INC, true + case 879: + return BACnetVendorId_MST_SYSTEMTECHNIKAG, true + case 88: + return BACnetVendorId_ACTIVATION_TECHNOLOGIESLLC, true + case 880: + return BACnetVendorId_LONIX_LTD, true + case 881: + return BACnetVendorId_GOSSEN_METRAWATT_GMBH, true + case 882: + return BACnetVendorId_AVIOSYS_INTERNATIONAL_INC, true + case 883: + return BACnetVendorId_EFFICIENT_BUILDING_AUTOMATION_CORP, true + case 884: + return BACnetVendorId_ACCUTRON_INSTRUMENTS_INC, true + case 885: + return BACnetVendorId_VERMONT_ENERGY_CONTROL_SYSTEMSLLC, true + case 886: + return BACnetVendorId_DCC_DYNAMICS, true + case 887: + return BACnetVendorId_BEG_BRCK_ELECTRONIC_GMBH, true + case 889: + return BACnetVendorId_NGBS_HUNGARY_LTD, true + case 89: + return BACnetVendorId_SAIA_BURGESS_CONTROLS_LTD, true + case 890: + return BACnetVendorId_ILLUM_TECHNOLOGYLLC, true + case 891: + return BACnetVendorId_DELTA_CONTROLS_GERMANY_LIMITED, true + case 892: + return BACnetVendorId_ST_SERVICE_TECHNIQUESA, true + case 893: + return BACnetVendorId_SIMPLE_SOFT, true + case 894: + return BACnetVendorId_ALTAIR_ENGINEERING, true + case 895: + return BACnetVendorId_EZEN_SOLUTION_INC, true + case 896: + return BACnetVendorId_FUJITEC_CO_LTD, true + case 897: + return BACnetVendorId_TERRALUX, true + case 898: + return BACnetVendorId_ANNICOM, true + case 899: + return BACnetVendorId_BIHL_WIEDEMANN_GMBH, true + case 9: + return BACnetVendorId_SIEMENS_SCHWEIZAG, true + case 90: + return BACnetVendorId_HITACHI_LTD, true + case 900: + return BACnetVendorId_DRAPER_INC, true + case 901: + return BACnetVendorId_SCHCO_INTERNATIONALKG, true + case 902: + return BACnetVendorId_OTIS_ELEVATOR_COMPANY, true + case 903: + return BACnetVendorId_FIDELIX_OY, true + case 904: + return BACnetVendorId_RAM_GMBH_MESSUND_REGELTECHNIK, true + case 905: + return BACnetVendorId_WEMS, true + case 906: + return BACnetVendorId_RAVEL_ELECTRONICS_PVT_LTD, true + case 907: + return BACnetVendorId_OMNI_MAGNI, true + case 908: + return BACnetVendorId_ECHELON, true + case 909: + return BACnetVendorId_INTELLIMETER_CANADA_INC, true + case 91: + return BACnetVendorId_NOVAR_CORP_TREND_CONTROL_SYSTEMS_LTD, true + case 910: + return BACnetVendorId_BITHOUSE_OY, true + case 912: + return BACnetVendorId_BUILD_PULSE, true + case 913: + return BACnetVendorId_SHENZHEN1000_BUILDING_AUTOMATION_CO_LTD, true + case 914: + return BACnetVendorId_AED_ENGINEERING_GMBH, true + case 915: + return BACnetVendorId_GNTNER_GMBH_COKG, true + case 916: + return BACnetVendorId_KN_XLOGIC, true + case 917: + return BACnetVendorId_CIM_ENVIRONMENTAL_GROUP, true + case 918: + return BACnetVendorId_FLOW_CONTROL, true + case 919: + return BACnetVendorId_LUMEN_CACHE_INC, true + case 92: + return BACnetVendorId_MITSUBISHI_ELECTRIC_LIGHTING_CORPORATION, true + case 920: + return BACnetVendorId_ECOSYSTEM, true + case 921: + return BACnetVendorId_POTTER_ELECTRIC_SIGNAL_COMPANYLLC, true + case 922: + return BACnetVendorId_TYCO_FIRE_SECURITY_SPA, true + case 923: + return BACnetVendorId_WATANABE_ELECTRIC_INDUSTRY_CO_LTD, true + case 924: + return BACnetVendorId_CAUSAM_ENERGY, true + case 925: + return BACnetVendorId_WTECAG, true + case 926: + return BACnetVendorId_IMI_HYDRONIC_ENGINEERING_INTERNATIONALSA, true + case 927: + return BACnetVendorId_ARIGO_SOFTWARE, true + case 928: + return BACnetVendorId_MSA_SAFETY1, true + case 929: + return BACnetVendorId_SMART_SOLUCOES_LTDAMERCATO, true + case 93: + return BACnetVendorId_ARGUS_CONTROL_SYSTEMS_LTD, true + case 930: + return BACnetVendorId_PIATRA_ENGINEERING, true + case 931: + return BACnetVendorId_ODIN_AUTOMATION_SYSTEMSLLC, true + case 932: + return BACnetVendorId_BELPARTSNV, true + case 933: + return BACnetVendorId_UABSALDA, true + case 934: + return BACnetVendorId_ALREIT_REGELTECHNIK_GMBH, true + case 935: + return BACnetVendorId_INGENIEURBROH_LERTES_GMBH_COKG, true + case 936: + return BACnetVendorId_BREATHING_BUILDINGS, true + case 937: + return BACnetVendorId_EWONSA, true + case 938: + return BACnetVendorId_CAV_UFF_GIACOMO_CIMBERIO_SPA, true + case 939: + return BACnetVendorId_PKE_ELECTRONICSAG, true + case 94: + return BACnetVendorId_KYUKI_CORPORATION, true + case 940: + return BACnetVendorId_ALLEN, true + case 941: + return BACnetVendorId_KASTLE_SYSTEMS, true + case 942: + return BACnetVendorId_LOGICAL_ELECTRO_MECHANICALEM_SYSTEMS_INC, true + case 943: + return BACnetVendorId_PP_KINETICS_INSTRUMENTSLLC, true + case 944: + return BACnetVendorId_CATHEXIS_TECHNOLOGIES, true + case 945: + return BACnetVendorId_SYLOPSP_ZOOSPK, true + case 946: + return BACnetVendorId_BRAUNS_CONTROL_GMBH, true + case 947: + return BACnetVendorId_OMRONSOCIALSOLUTIONSCOLTD, true + case 948: + return BACnetVendorId_WILDEBOER_BAUTEILE_GMBH, true + case 949: + return BACnetVendorId_SHANGHAI_BIENS_TECHNOLOGIES_LTD, true + case 95: + return BACnetVendorId_RICHARDS_ZETA_BUILDING_INTELLIGENCE_INC, true + case 950: + return BACnetVendorId_BEIJINGHZHY_TECHNOLOGY_CO_LTD, true + case 951: + return BACnetVendorId_BUILDING_CLOUDS, true + case 952: + return BACnetVendorId_THE_UNIVERSITYOF_SHEFFIELD_DEPARTMENTOF_ELECTRONICAND_ELECTRICAL_ENGINEERING, true + case 953: + return BACnetVendorId_FABTRONICS_AUSTRALIA_PTY_LTD, true + case 954: + return BACnetVendorId_SLAT, true + case 955: + return BACnetVendorId_SOFTWARE_MOTOR_CORPORATION, true + case 956: + return BACnetVendorId_ARMSTRONG_INTERNATIONAL_INC, true + case 957: + return BACnetVendorId_STERIL_AIRE_INC, true + case 958: + return BACnetVendorId_INFINIQUE, true + case 959: + return BACnetVendorId_ARCOM, true + case 96: + return BACnetVendorId_SCIENTECHRD_INC, true + case 960: + return BACnetVendorId_ARGO_PERFORMANCE_LTD, true + case 961: + return BACnetVendorId_DIALIGHT, true + case 962: + return BACnetVendorId_IDEAL_TECHNICAL_SOLUTIONS, true + case 963: + return BACnetVendorId_NEUROBATAG, true + case 964: + return BACnetVendorId_NEYER_SOFTWARE_CONSULTINGLLC, true + case 965: + return BACnetVendorId_SCADA_TECHNOLOGY_DEVELOPMENT_CO_LTD, true + case 966: + return BACnetVendorId_DEMAND_LOGIC_LIMITED, true + case 967: + return BACnetVendorId_GWA_GROUP_LIMITED, true + case 968: + return BACnetVendorId_OCCITALINE, true + case 969: + return BACnetVendorId_NAO_DIGITAL_CO_LTD, true + case 97: + return BACnetVendorId_VCI_CONTROLS_INC, true + case 970: + return BACnetVendorId_SHENZHEN_CHANSLINK_NETWORK_TECHNOLOGY_CO_LTD, true + case 971: + return BACnetVendorId_SAMSUNG_ELECTRONICS_CO_LTD, true + case 972: + return BACnetVendorId_MESA_LABORATORIES_INC, true + case 973: + return BACnetVendorId_FISCHER, true + case 974: + return BACnetVendorId_OP_SYS_SOLUTIONS_LTD, true + case 975: + return BACnetVendorId_ADVANCED_DEVICES_LIMITED, true + case 976: + return BACnetVendorId_CONDAIR, true + case 977: + return BACnetVendorId_INELCOM_INGENIERIA_ELECTRONICA_COMERCIALSA, true + case 978: + return BACnetVendorId_GRID_POINT_INC, true + case 979: + return BACnetVendorId_ADF_TECHNOLOGIES_SDN_BHD, true + case 98: + return BACnetVendorId_TOSHIBA_CORPORATION, true + case 980: + return BACnetVendorId_EPM_INC, true + case 981: + return BACnetVendorId_LIGHTING_CONTROLS_LTD, true + case 982: + return BACnetVendorId_PERIX_CONTROLS_LTD, true + case 983: + return BACnetVendorId_AERCO_INTERNATIONAL_INC, true + case 984: + return BACnetVendorId_KONE_INC, true + case 985: + return BACnetVendorId_ZIEHL_ABEGGSE, true + case 986: + return BACnetVendorId_ROBOTSA, true + case 987: + return BACnetVendorId_OPTIGO_NETWORKS_INC, true + case 988: + return BACnetVendorId_OPENMOTICSBVBA, true + case 989: + return BACnetVendorId_METROPOLITAN_INDUSTRIES_INC, true + case 99: + return BACnetVendorId_MITSUBISHI_ELECTRIC_CORPORATION_AIR_CONDITIONING_REFRIGERATION_SYSTEMS_WORKS, true + case 990: + return BACnetVendorId_HUAWEI_TECHNOLOGIES_CO_LTD, true + case 991: + return BACnetVendorId_DIGITAL_LUMENS_INC, true + case 992: + return BACnetVendorId_VANTI, true + case 993: + return BACnetVendorId_CREE_LIGHTING, true + case 994: + return BACnetVendorId_RICHMOND_HEIGHTSSDNBHD, true + case 995: + return BACnetVendorId_PAYNE_SPARKMAN_LIGHTING_MANGEMENT, true + case 996: + return BACnetVendorId_ASHCROFT, true + case 997: + return BACnetVendorId_JET_CONTROLS_CORP, true + case 998: + return BACnetVendorId_ZUMTOBEL_LIGHTING_GMBH, true } return 0, false } @@ -19680,13 +16881,13 @@ func BACnetVendorIdByName(value string) (enum BACnetVendorId, ok bool) { return 0, false } -func BACnetVendorIdKnows(value uint16) bool { +func BACnetVendorIdKnows(value uint16) bool { for _, typeValue := range BACnetVendorIdValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastBACnetVendorId(structType interface{}) BACnetVendorId { @@ -22544,3 +19745,4 @@ func (e BACnetVendorId) PLC4XEnumName() string { func (e BACnetVendorId) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetVendorIdTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetVendorIdTagged.go index 5e2bf67ad69..c3f84e78fda 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetVendorIdTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetVendorIdTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetVendorIdTagged is the corresponding interface of BACnetVendorIdTagged type BACnetVendorIdTagged interface { @@ -50,15 +52,16 @@ type BACnetVendorIdTaggedExactly interface { // _BACnetVendorIdTagged is the data-structure of this message type _BACnetVendorIdTagged struct { - Header BACnetTagHeader - Value BACnetVendorId - UnknownId uint32 + Header BACnetTagHeader + Value BACnetVendorId + UnknownId uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_BACnetVendorIdTagged) GetIsUnknownId() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetVendorIdTagged factory function for _BACnetVendorIdTagged -func NewBACnetVendorIdTagged(header BACnetTagHeader, value BACnetVendorId, unknownId uint32, tagNumber uint8, tagClass TagClass) *_BACnetVendorIdTagged { - return &_BACnetVendorIdTagged{Header: header, Value: value, UnknownId: unknownId, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetVendorIdTagged( header BACnetTagHeader , value BACnetVendorId , unknownId uint32 , tagNumber uint8 , tagClass TagClass ) *_BACnetVendorIdTagged { +return &_BACnetVendorIdTagged{ Header: header , Value: value , UnknownId: unknownId , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetVendorIdTagged(structType interface{}) BACnetVendorIdTagged { - if casted, ok := structType.(BACnetVendorIdTagged); ok { + if casted, ok := structType.(BACnetVendorIdTagged); ok { return casted } if casted, ok := structType.(*BACnetVendorIdTagged); ok { @@ -123,16 +127,17 @@ func (m *_BACnetVendorIdTagged) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsUnknownId(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsUnknownId(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (unknownId) - lengthInBits += uint16(utils.InlineIf(m.GetIsUnknownId(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsUnknownId(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_BACnetVendorIdTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func BACnetVendorIdTaggedParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetVendorIdTagged") } @@ -164,12 +169,12 @@ func BACnetVendorIdTaggedParseWithBuffer(ctx context.Context, readBuffer utils.R } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool(bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS))) && bool(bool((header.GetActualTagNumber()) == (2))))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool(bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS))) && bool(bool((header.GetActualTagNumber()) == ((2)))))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func BACnetVendorIdTaggedParseWithBuffer(ctx context.Context, readBuffer utils.R } var value BACnetVendorId if _value != nil { - value = _value.(BACnetVendorId) + value = _value.(BACnetVendorId) } // Virtual field @@ -195,7 +200,7 @@ func BACnetVendorIdTaggedParseWithBuffer(ctx context.Context, readBuffer utils.R } var unknownId uint32 if _unknownId != nil { - unknownId = _unknownId.(uint32) + unknownId = _unknownId.(uint32) } if closeErr := readBuffer.CloseContext("BACnetVendorIdTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func BACnetVendorIdTaggedParseWithBuffer(ctx context.Context, readBuffer utils.R // Create the instance return &_BACnetVendorIdTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - UnknownId: unknownId, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + UnknownId: unknownId, + }, nil } func (m *_BACnetVendorIdTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_BACnetVendorIdTagged) Serialize() ([]byte, error) { func (m *_BACnetVendorIdTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetVendorIdTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetVendorIdTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetVendorIdTagged") } @@ -261,6 +266,7 @@ func (m *_BACnetVendorIdTagged) SerializeWithWriteBuffer(ctx context.Context, wr return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_BACnetVendorIdTagged) GetTagNumber() uint8 { func (m *_BACnetVendorIdTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_BACnetVendorIdTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetWeekNDay.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetWeekNDay.go index 456786f4645..a5fdbf7e110 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetWeekNDay.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetWeekNDay.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetWeekNDay is the corresponding interface of BACnetWeekNDay type BACnetWeekNDay interface { @@ -44,14 +46,17 @@ type BACnetWeekNDayExactly interface { type _BACnetWeekNDay struct { } + + + // NewBACnetWeekNDay factory function for _BACnetWeekNDay -func NewBACnetWeekNDay() *_BACnetWeekNDay { - return &_BACnetWeekNDay{} +func NewBACnetWeekNDay( ) *_BACnetWeekNDay { +return &_BACnetWeekNDay{ } } // Deprecated: use the interface for direct cast func CastBACnetWeekNDay(structType interface{}) BACnetWeekNDay { - if casted, ok := structType.(BACnetWeekNDay); ok { + if casted, ok := structType.(BACnetWeekNDay); ok { return casted } if casted, ok := structType.(*BACnetWeekNDay); ok { @@ -70,6 +75,7 @@ func (m *_BACnetWeekNDay) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetWeekNDay) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -88,7 +94,7 @@ func BACnetWeekNDayParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"Unusable type. Exits only for consistency. Use BACnetWeekNDayTagged"}) } @@ -97,7 +103,8 @@ func BACnetWeekNDayParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf } // Create the instance - return &_BACnetWeekNDay{}, nil + return &_BACnetWeekNDay{ + }, nil } func (m *_BACnetWeekNDay) Serialize() ([]byte, error) { @@ -111,7 +118,7 @@ func (m *_BACnetWeekNDay) Serialize() ([]byte, error) { func (m *_BACnetWeekNDay) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetWeekNDay"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetWeekNDay"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetWeekNDay") } @@ -121,6 +128,7 @@ func (m *_BACnetWeekNDay) SerializeWithWriteBuffer(ctx context.Context, writeBuf return nil } + func (m *_BACnetWeekNDay) isBACnetWeekNDay() bool { return true } @@ -135,3 +143,6 @@ func (m *_BACnetWeekNDay) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetWeekNDayTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetWeekNDayTagged.go index 628d10a2852..bb3a93b3f70 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetWeekNDayTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetWeekNDayTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetWeekNDayTagged is the corresponding interface of BACnetWeekNDayTagged type BACnetWeekNDayTagged interface { @@ -78,16 +80,17 @@ type BACnetWeekNDayTaggedExactly interface { // _BACnetWeekNDayTagged is the data-structure of this message type _BACnetWeekNDayTagged struct { - Header BACnetTagHeader - Month uint8 - WeekOfMonth uint8 - DayOfWeek uint8 + Header BACnetTagHeader + Month uint8 + WeekOfMonth uint8 + DayOfWeek uint8 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -121,13 +124,13 @@ func (m *_BACnetWeekNDayTagged) GetDayOfWeek() uint8 { func (m *_BACnetWeekNDayTagged) GetOddMonths() bool { ctx := context.Background() _ = ctx - return bool(bool((m.GetMonth()) == (13))) + return bool(bool((m.GetMonth()) == ((13)))) } func (m *_BACnetWeekNDayTagged) GetEvenMonths() bool { ctx := context.Background() _ = ctx - return bool(bool((m.GetMonth()) == (14))) + return bool(bool((m.GetMonth()) == ((14)))) } func (m *_BACnetWeekNDayTagged) GetAnyMonth() bool { @@ -139,55 +142,55 @@ func (m *_BACnetWeekNDayTagged) GetAnyMonth() bool { func (m *_BACnetWeekNDayTagged) GetDays1to7() bool { ctx := context.Background() _ = ctx - return bool(bool((m.GetWeekOfMonth()) == (1))) + return bool(bool((m.GetWeekOfMonth()) == ((1)))) } func (m *_BACnetWeekNDayTagged) GetDays8to14() bool { ctx := context.Background() _ = ctx - return bool(bool((m.GetWeekOfMonth()) == (2))) + return bool(bool((m.GetWeekOfMonth()) == ((2)))) } func (m *_BACnetWeekNDayTagged) GetDays15to21() bool { ctx := context.Background() _ = ctx - return bool(bool((m.GetWeekOfMonth()) == (3))) + return bool(bool((m.GetWeekOfMonth()) == ((3)))) } func (m *_BACnetWeekNDayTagged) GetDays22to28() bool { ctx := context.Background() _ = ctx - return bool(bool((m.GetWeekOfMonth()) == (4))) + return bool(bool((m.GetWeekOfMonth()) == ((4)))) } func (m *_BACnetWeekNDayTagged) GetDays29to31() bool { ctx := context.Background() _ = ctx - return bool(bool((m.GetWeekOfMonth()) == (5))) + return bool(bool((m.GetWeekOfMonth()) == ((5)))) } func (m *_BACnetWeekNDayTagged) GetLast7DaysOfThisMonth() bool { ctx := context.Background() _ = ctx - return bool(bool((m.GetWeekOfMonth()) == (6))) + return bool(bool((m.GetWeekOfMonth()) == ((6)))) } func (m *_BACnetWeekNDayTagged) GetAny7DaysPriorToLast7DaysOfThisMonth() bool { ctx := context.Background() _ = ctx - return bool(bool((m.GetWeekOfMonth()) == (7))) + return bool(bool((m.GetWeekOfMonth()) == ((7)))) } func (m *_BACnetWeekNDayTagged) GetAny7DaysPriorToLast14DaysOfThisMonth() bool { ctx := context.Background() _ = ctx - return bool(bool((m.GetWeekOfMonth()) == (8))) + return bool(bool((m.GetWeekOfMonth()) == ((8)))) } func (m *_BACnetWeekNDayTagged) GetAny7DaysPriorToLast21DaysOfThisMonth() bool { ctx := context.Background() _ = ctx - return bool(bool((m.GetWeekOfMonth()) == (9))) + return bool(bool((m.GetWeekOfMonth()) == ((9)))) } func (m *_BACnetWeekNDayTagged) GetAnyWeekOfthisMonth() bool { @@ -207,14 +210,15 @@ func (m *_BACnetWeekNDayTagged) GetAnyDayOfWeek() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetWeekNDayTagged factory function for _BACnetWeekNDayTagged -func NewBACnetWeekNDayTagged(header BACnetTagHeader, month uint8, weekOfMonth uint8, dayOfWeek uint8, tagNumber uint8, tagClass TagClass) *_BACnetWeekNDayTagged { - return &_BACnetWeekNDayTagged{Header: header, Month: month, WeekOfMonth: weekOfMonth, DayOfWeek: dayOfWeek, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetWeekNDayTagged( header BACnetTagHeader , month uint8 , weekOfMonth uint8 , dayOfWeek uint8 , tagNumber uint8 , tagClass TagClass ) *_BACnetWeekNDayTagged { +return &_BACnetWeekNDayTagged{ Header: header , Month: month , WeekOfMonth: weekOfMonth , DayOfWeek: dayOfWeek , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetWeekNDayTagged(structType interface{}) BACnetWeekNDayTagged { - if casted, ok := structType.(BACnetWeekNDayTagged); ok { + if casted, ok := structType.(BACnetWeekNDayTagged); ok { return casted } if casted, ok := structType.(*BACnetWeekNDayTagged); ok { @@ -234,7 +238,7 @@ func (m *_BACnetWeekNDayTagged) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += m.Header.GetLengthInBits(ctx) // Simple field (month) - lengthInBits += 8 + lengthInBits += 8; // A virtual field doesn't have any in- or output. @@ -243,7 +247,7 @@ func (m *_BACnetWeekNDayTagged) GetLengthInBits(ctx context.Context) uint16 { // A virtual field doesn't have any in- or output. // Simple field (weekOfMonth) - lengthInBits += 8 + lengthInBits += 8; // A virtual field doesn't have any in- or output. @@ -266,13 +270,14 @@ func (m *_BACnetWeekNDayTagged) GetLengthInBits(ctx context.Context) uint16 { // A virtual field doesn't have any in- or output. // Simple field (dayOfWeek) - lengthInBits += 8 + lengthInBits += 8; // A virtual field doesn't have any in- or output. return lengthInBits } + func (m *_BACnetWeekNDayTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -294,7 +299,7 @@ func BACnetWeekNDayTaggedParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetWeekNDayTagged") } @@ -304,34 +309,34 @@ func BACnetWeekNDayTaggedParseWithBuffer(ctx context.Context, readBuffer utils.R } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } // Validation - if !(bool((header.GetActualLength()) == (3))) { + if (!(bool((header.GetActualLength()) == ((3))))) { return nil, errors.WithStack(utils.ParseValidationError{"We should have at least 3 octets"}) } // Simple Field (month) - _month, _monthErr := readBuffer.ReadUint8("month", 8) +_month, _monthErr := readBuffer.ReadUint8("month", 8) if _monthErr != nil { return nil, errors.Wrap(_monthErr, "Error parsing 'month' field of BACnetWeekNDayTagged") } month := _month // Virtual field - _oddMonths := bool((month) == (13)) + _oddMonths := bool((month) == ((13))) oddMonths := bool(_oddMonths) _ = oddMonths // Virtual field - _evenMonths := bool((month) == (14)) + _evenMonths := bool((month) == ((14))) evenMonths := bool(_evenMonths) _ = evenMonths @@ -341,54 +346,54 @@ func BACnetWeekNDayTaggedParseWithBuffer(ctx context.Context, readBuffer utils.R _ = anyMonth // Simple Field (weekOfMonth) - _weekOfMonth, _weekOfMonthErr := readBuffer.ReadUint8("weekOfMonth", 8) +_weekOfMonth, _weekOfMonthErr := readBuffer.ReadUint8("weekOfMonth", 8) if _weekOfMonthErr != nil { return nil, errors.Wrap(_weekOfMonthErr, "Error parsing 'weekOfMonth' field of BACnetWeekNDayTagged") } weekOfMonth := _weekOfMonth // Virtual field - _days1to7 := bool((weekOfMonth) == (1)) + _days1to7 := bool((weekOfMonth) == ((1))) days1to7 := bool(_days1to7) _ = days1to7 // Virtual field - _days8to14 := bool((weekOfMonth) == (2)) + _days8to14 := bool((weekOfMonth) == ((2))) days8to14 := bool(_days8to14) _ = days8to14 // Virtual field - _days15to21 := bool((weekOfMonth) == (3)) + _days15to21 := bool((weekOfMonth) == ((3))) days15to21 := bool(_days15to21) _ = days15to21 // Virtual field - _days22to28 := bool((weekOfMonth) == (4)) + _days22to28 := bool((weekOfMonth) == ((4))) days22to28 := bool(_days22to28) _ = days22to28 // Virtual field - _days29to31 := bool((weekOfMonth) == (5)) + _days29to31 := bool((weekOfMonth) == ((5))) days29to31 := bool(_days29to31) _ = days29to31 // Virtual field - _last7DaysOfThisMonth := bool((weekOfMonth) == (6)) + _last7DaysOfThisMonth := bool((weekOfMonth) == ((6))) last7DaysOfThisMonth := bool(_last7DaysOfThisMonth) _ = last7DaysOfThisMonth // Virtual field - _any7DaysPriorToLast7DaysOfThisMonth := bool((weekOfMonth) == (7)) + _any7DaysPriorToLast7DaysOfThisMonth := bool((weekOfMonth) == ((7))) any7DaysPriorToLast7DaysOfThisMonth := bool(_any7DaysPriorToLast7DaysOfThisMonth) _ = any7DaysPriorToLast7DaysOfThisMonth // Virtual field - _any7DaysPriorToLast14DaysOfThisMonth := bool((weekOfMonth) == (8)) + _any7DaysPriorToLast14DaysOfThisMonth := bool((weekOfMonth) == ((8))) any7DaysPriorToLast14DaysOfThisMonth := bool(_any7DaysPriorToLast14DaysOfThisMonth) _ = any7DaysPriorToLast14DaysOfThisMonth // Virtual field - _any7DaysPriorToLast21DaysOfThisMonth := bool((weekOfMonth) == (9)) + _any7DaysPriorToLast21DaysOfThisMonth := bool((weekOfMonth) == ((9))) any7DaysPriorToLast21DaysOfThisMonth := bool(_any7DaysPriorToLast21DaysOfThisMonth) _ = any7DaysPriorToLast21DaysOfThisMonth @@ -398,7 +403,7 @@ func BACnetWeekNDayTaggedParseWithBuffer(ctx context.Context, readBuffer utils.R _ = anyWeekOfthisMonth // Simple Field (dayOfWeek) - _dayOfWeek, _dayOfWeekErr := readBuffer.ReadUint8("dayOfWeek", 8) +_dayOfWeek, _dayOfWeekErr := readBuffer.ReadUint8("dayOfWeek", 8) if _dayOfWeekErr != nil { return nil, errors.Wrap(_dayOfWeekErr, "Error parsing 'dayOfWeek' field of BACnetWeekNDayTagged") } @@ -415,13 +420,13 @@ func BACnetWeekNDayTaggedParseWithBuffer(ctx context.Context, readBuffer utils.R // Create the instance return &_BACnetWeekNDayTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Month: month, - WeekOfMonth: weekOfMonth, - DayOfWeek: dayOfWeek, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Month: month, + WeekOfMonth: weekOfMonth, + DayOfWeek: dayOfWeek, + }, nil } func (m *_BACnetWeekNDayTagged) Serialize() ([]byte, error) { @@ -435,7 +440,7 @@ func (m *_BACnetWeekNDayTagged) Serialize() ([]byte, error) { func (m *_BACnetWeekNDayTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetWeekNDayTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetWeekNDayTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetWeekNDayTagged") } @@ -534,6 +539,7 @@ func (m *_BACnetWeekNDayTagged) SerializeWithWriteBuffer(ctx context.Context, wr return nil } + //// // Arguments Getter @@ -543,7 +549,6 @@ func (m *_BACnetWeekNDayTagged) GetTagNumber() uint8 { func (m *_BACnetWeekNDayTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -561,3 +566,6 @@ func (m *_BACnetWeekNDayTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetWriteAccessSpecification.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetWriteAccessSpecification.go index d3041eb694a..d87b744d6f2 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetWriteAccessSpecification.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetWriteAccessSpecification.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetWriteAccessSpecification is the corresponding interface of BACnetWriteAccessSpecification type BACnetWriteAccessSpecification interface { @@ -51,12 +53,13 @@ type BACnetWriteAccessSpecificationExactly interface { // _BACnetWriteAccessSpecification is the data-structure of this message type _BACnetWriteAccessSpecification struct { - ObjectIdentifier BACnetContextTagObjectIdentifier - OpeningTag BACnetOpeningTag - ListOfPropertyWriteDefinition []BACnetPropertyWriteDefinition - ClosingTag BACnetClosingTag + ObjectIdentifier BACnetContextTagObjectIdentifier + OpeningTag BACnetOpeningTag + ListOfPropertyWriteDefinition []BACnetPropertyWriteDefinition + ClosingTag BACnetClosingTag } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,14 +86,15 @@ func (m *_BACnetWriteAccessSpecification) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetWriteAccessSpecification factory function for _BACnetWriteAccessSpecification -func NewBACnetWriteAccessSpecification(objectIdentifier BACnetContextTagObjectIdentifier, openingTag BACnetOpeningTag, listOfPropertyWriteDefinition []BACnetPropertyWriteDefinition, closingTag BACnetClosingTag) *_BACnetWriteAccessSpecification { - return &_BACnetWriteAccessSpecification{ObjectIdentifier: objectIdentifier, OpeningTag: openingTag, ListOfPropertyWriteDefinition: listOfPropertyWriteDefinition, ClosingTag: closingTag} +func NewBACnetWriteAccessSpecification( objectIdentifier BACnetContextTagObjectIdentifier , openingTag BACnetOpeningTag , listOfPropertyWriteDefinition []BACnetPropertyWriteDefinition , closingTag BACnetClosingTag ) *_BACnetWriteAccessSpecification { +return &_BACnetWriteAccessSpecification{ ObjectIdentifier: objectIdentifier , OpeningTag: openingTag , ListOfPropertyWriteDefinition: listOfPropertyWriteDefinition , ClosingTag: closingTag } } // Deprecated: use the interface for direct cast func CastBACnetWriteAccessSpecification(structType interface{}) BACnetWriteAccessSpecification { - if casted, ok := structType.(BACnetWriteAccessSpecification); ok { + if casted, ok := structType.(BACnetWriteAccessSpecification); ok { return casted } if casted, ok := structType.(*BACnetWriteAccessSpecification); ok { @@ -125,6 +129,7 @@ func (m *_BACnetWriteAccessSpecification) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_BACnetWriteAccessSpecification) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -146,7 +151,7 @@ func BACnetWriteAccessSpecificationParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("objectIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for objectIdentifier") } - _objectIdentifier, _objectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER)) +_objectIdentifier, _objectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_BACNET_OBJECT_IDENTIFIER ) ) if _objectIdentifierErr != nil { return nil, errors.Wrap(_objectIdentifierErr, "Error parsing 'objectIdentifier' field of BACnetWriteAccessSpecification") } @@ -159,7 +164,7 @@ func BACnetWriteAccessSpecificationParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1))) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of BACnetWriteAccessSpecification") } @@ -175,8 +180,8 @@ func BACnetWriteAccessSpecificationParseWithBuffer(ctx context.Context, readBuff // Terminated array var listOfPropertyWriteDefinition []BACnetPropertyWriteDefinition { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, 1)) { - _item, _err := BACnetPropertyWriteDefinitionParseWithBuffer(ctx, readBuffer, objectIdentifier.GetObjectType()) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, 1)); { +_item, _err := BACnetPropertyWriteDefinitionParseWithBuffer(ctx, readBuffer , objectIdentifier.GetObjectType() ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'listOfPropertyWriteDefinition' field of BACnetWriteAccessSpecification") } @@ -191,7 +196,7 @@ func BACnetWriteAccessSpecificationParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1))) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of BACnetWriteAccessSpecification") } @@ -206,11 +211,11 @@ func BACnetWriteAccessSpecificationParseWithBuffer(ctx context.Context, readBuff // Create the instance return &_BACnetWriteAccessSpecification{ - ObjectIdentifier: objectIdentifier, - OpeningTag: openingTag, - ListOfPropertyWriteDefinition: listOfPropertyWriteDefinition, - ClosingTag: closingTag, - }, nil + ObjectIdentifier: objectIdentifier, + OpeningTag: openingTag, + ListOfPropertyWriteDefinition: listOfPropertyWriteDefinition, + ClosingTag: closingTag, + }, nil } func (m *_BACnetWriteAccessSpecification) Serialize() ([]byte, error) { @@ -224,7 +229,7 @@ func (m *_BACnetWriteAccessSpecification) Serialize() ([]byte, error) { func (m *_BACnetWriteAccessSpecification) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetWriteAccessSpecification"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetWriteAccessSpecification"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetWriteAccessSpecification") } @@ -287,6 +292,7 @@ func (m *_BACnetWriteAccessSpecification) SerializeWithWriteBuffer(ctx context.C return nil } + func (m *_BACnetWriteAccessSpecification) isBACnetWriteAccessSpecification() bool { return true } @@ -301,3 +307,6 @@ func (m *_BACnetWriteAccessSpecification) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetWriteStatus.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetWriteStatus.go index 407b4cd5cbe..cfa9cfbf42f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetWriteStatus.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetWriteStatus.go @@ -34,18 +34,18 @@ type IBACnetWriteStatus interface { utils.Serializable } -const ( - BACnetWriteStatus_IDLE BACnetWriteStatus = 0 +const( + BACnetWriteStatus_IDLE BACnetWriteStatus = 0 BACnetWriteStatus_IN_PROGRESS BACnetWriteStatus = 1 - BACnetWriteStatus_SUCCESSFUL BACnetWriteStatus = 2 - BACnetWriteStatus_FAILED BACnetWriteStatus = 3 + BACnetWriteStatus_SUCCESSFUL BACnetWriteStatus = 2 + BACnetWriteStatus_FAILED BACnetWriteStatus = 3 ) var BACnetWriteStatusValues []BACnetWriteStatus func init() { _ = errors.New - BACnetWriteStatusValues = []BACnetWriteStatus{ + BACnetWriteStatusValues = []BACnetWriteStatus { BACnetWriteStatus_IDLE, BACnetWriteStatus_IN_PROGRESS, BACnetWriteStatus_SUCCESSFUL, @@ -55,14 +55,14 @@ func init() { func BACnetWriteStatusByValue(value uint8) (enum BACnetWriteStatus, ok bool) { switch value { - case 0: - return BACnetWriteStatus_IDLE, true - case 1: - return BACnetWriteStatus_IN_PROGRESS, true - case 2: - return BACnetWriteStatus_SUCCESSFUL, true - case 3: - return BACnetWriteStatus_FAILED, true + case 0: + return BACnetWriteStatus_IDLE, true + case 1: + return BACnetWriteStatus_IN_PROGRESS, true + case 2: + return BACnetWriteStatus_SUCCESSFUL, true + case 3: + return BACnetWriteStatus_FAILED, true } return 0, false } @@ -81,13 +81,13 @@ func BACnetWriteStatusByName(value string) (enum BACnetWriteStatus, ok bool) { return 0, false } -func BACnetWriteStatusKnows(value uint8) bool { +func BACnetWriteStatusKnows(value uint8) bool { for _, typeValue := range BACnetWriteStatusValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBACnetWriteStatus(structType interface{}) BACnetWriteStatus { @@ -155,3 +155,4 @@ func (e BACnetWriteStatus) PLC4XEnumName() string { func (e BACnetWriteStatus) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetWriteStatusTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetWriteStatusTagged.go index 865fce2999d..786220a26b9 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BACnetWriteStatusTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetWriteStatusTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BACnetWriteStatusTagged is the corresponding interface of BACnetWriteStatusTagged type BACnetWriteStatusTagged interface { @@ -46,14 +48,15 @@ type BACnetWriteStatusTaggedExactly interface { // _BACnetWriteStatusTagged is the data-structure of this message type _BACnetWriteStatusTagged struct { - Header BACnetTagHeader - Value BACnetWriteStatus + Header BACnetTagHeader + Value BACnetWriteStatus // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_BACnetWriteStatusTagged) GetValue() BACnetWriteStatus { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBACnetWriteStatusTagged factory function for _BACnetWriteStatusTagged -func NewBACnetWriteStatusTagged(header BACnetTagHeader, value BACnetWriteStatus, tagNumber uint8, tagClass TagClass) *_BACnetWriteStatusTagged { - return &_BACnetWriteStatusTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewBACnetWriteStatusTagged( header BACnetTagHeader , value BACnetWriteStatus , tagNumber uint8 , tagClass TagClass ) *_BACnetWriteStatusTagged { +return &_BACnetWriteStatusTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBACnetWriteStatusTagged(structType interface{}) BACnetWriteStatusTagged { - if casted, ok := structType.(BACnetWriteStatusTagged); ok { + if casted, ok := structType.(BACnetWriteStatusTagged); ok { return casted } if casted, ok := structType.(*BACnetWriteStatusTagged); ok { @@ -104,6 +108,7 @@ func (m *_BACnetWriteStatusTagged) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BACnetWriteStatusTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func BACnetWriteStatusTaggedParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BACnetWriteStatusTagged") } @@ -135,12 +140,12 @@ func BACnetWriteStatusTaggedParseWithBuffer(ctx context.Context, readBuffer util } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func BACnetWriteStatusTaggedParseWithBuffer(ctx context.Context, readBuffer util } var value BACnetWriteStatus if _value != nil { - value = _value.(BACnetWriteStatus) + value = _value.(BACnetWriteStatus) } if closeErr := readBuffer.CloseContext("BACnetWriteStatusTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func BACnetWriteStatusTaggedParseWithBuffer(ctx context.Context, readBuffer util // Create the instance return &_BACnetWriteStatusTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_BACnetWriteStatusTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_BACnetWriteStatusTagged) Serialize() ([]byte, error) { func (m *_BACnetWriteStatusTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BACnetWriteStatusTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BACnetWriteStatusTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BACnetWriteStatusTagged") } @@ -206,6 +211,7 @@ func (m *_BACnetWriteStatusTagged) SerializeWithWriteBuffer(ctx context.Context, return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_BACnetWriteStatusTagged) GetTagNumber() uint8 { func (m *_BACnetWriteStatusTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_BACnetWriteStatusTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BVLC.go b/plc4go/protocols/bacnetip/readwrite/model/BVLC.go index 6e023a85806..84c66cc2dc6 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BVLC.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BVLC.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -27,7 +28,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const BVLC_BACNETTYPE uint8 = 0x81 @@ -60,6 +62,7 @@ type _BVLCChildRequirements interface { GetBvlcFunction() uint8 } + type BVLCParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child BVLC, serializeChildFunction func() error) error GetTypeName() string @@ -67,13 +70,12 @@ type BVLCParent interface { type BVLCChild interface { utils.Serializable - InitializeParent(parent BVLC) +InitializeParent(parent BVLC ) GetParent() *BVLC GetTypeName() string BVLC } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for virtual fields. @@ -103,14 +105,15 @@ func (m *_BVLC) GetBacnetType() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBVLC factory function for _BVLC -func NewBVLC() *_BVLC { - return &_BVLC{} +func NewBVLC( ) *_BVLC { +return &_BVLC{ } } // Deprecated: use the interface for direct cast func CastBVLC(structType interface{}) BVLC { - if casted, ok := structType.(BVLC); ok { + if casted, ok := structType.(BVLC); ok { return casted } if casted, ok := structType.(*BVLC); ok { @@ -123,13 +126,14 @@ func (m *_BVLC) GetTypeName() string { return "BVLC" } + func (m *_BVLC) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Const Field (bacnetType) lengthInBits += 8 // Discriminator Field (bvlcFunction) - lengthInBits += 8 + lengthInBits += 8; // Implicit Field (bvlcLength) lengthInBits += 16 @@ -186,38 +190,38 @@ func BVLCParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) (BVLC // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type BVLCChildSerializeRequirement interface { BVLC - InitializeParent(BVLC) + InitializeParent(BVLC ) GetParent() BVLC } var _childTemp interface{} var _child BVLCChildSerializeRequirement var typeSwitchError error switch { - case bvlcFunction == 0x00: // BVLCResult - _childTemp, typeSwitchError = BVLCResultParseWithBuffer(ctx, readBuffer) - case bvlcFunction == 0x01: // BVLCWriteBroadcastDistributionTable +case bvlcFunction == 0x00 : // BVLCResult + _childTemp, typeSwitchError = BVLCResultParseWithBuffer(ctx, readBuffer, ) +case bvlcFunction == 0x01 : // BVLCWriteBroadcastDistributionTable _childTemp, typeSwitchError = BVLCWriteBroadcastDistributionTableParseWithBuffer(ctx, readBuffer, bvlcPayloadLength) - case bvlcFunction == 0x02: // BVLCReadBroadcastDistributionTable - _childTemp, typeSwitchError = BVLCReadBroadcastDistributionTableParseWithBuffer(ctx, readBuffer) - case bvlcFunction == 0x03: // BVLCReadBroadcastDistributionTableAck +case bvlcFunction == 0x02 : // BVLCReadBroadcastDistributionTable + _childTemp, typeSwitchError = BVLCReadBroadcastDistributionTableParseWithBuffer(ctx, readBuffer, ) +case bvlcFunction == 0x03 : // BVLCReadBroadcastDistributionTableAck _childTemp, typeSwitchError = BVLCReadBroadcastDistributionTableAckParseWithBuffer(ctx, readBuffer, bvlcPayloadLength) - case bvlcFunction == 0x04: // BVLCForwardedNPDU +case bvlcFunction == 0x04 : // BVLCForwardedNPDU _childTemp, typeSwitchError = BVLCForwardedNPDUParseWithBuffer(ctx, readBuffer, bvlcPayloadLength) - case bvlcFunction == 0x05: // BVLCRegisterForeignDevice - _childTemp, typeSwitchError = BVLCRegisterForeignDeviceParseWithBuffer(ctx, readBuffer) - case bvlcFunction == 0x06: // BVLCReadForeignDeviceTable - _childTemp, typeSwitchError = BVLCReadForeignDeviceTableParseWithBuffer(ctx, readBuffer) - case bvlcFunction == 0x07: // BVLCReadForeignDeviceTableAck +case bvlcFunction == 0x05 : // BVLCRegisterForeignDevice + _childTemp, typeSwitchError = BVLCRegisterForeignDeviceParseWithBuffer(ctx, readBuffer, ) +case bvlcFunction == 0x06 : // BVLCReadForeignDeviceTable + _childTemp, typeSwitchError = BVLCReadForeignDeviceTableParseWithBuffer(ctx, readBuffer, ) +case bvlcFunction == 0x07 : // BVLCReadForeignDeviceTableAck _childTemp, typeSwitchError = BVLCReadForeignDeviceTableAckParseWithBuffer(ctx, readBuffer, bvlcPayloadLength) - case bvlcFunction == 0x08: // BVLCDeleteForeignDeviceTableEntry - _childTemp, typeSwitchError = BVLCDeleteForeignDeviceTableEntryParseWithBuffer(ctx, readBuffer) - case bvlcFunction == 0x09: // BVLCDistributeBroadcastToNetwork +case bvlcFunction == 0x08 : // BVLCDeleteForeignDeviceTableEntry + _childTemp, typeSwitchError = BVLCDeleteForeignDeviceTableEntryParseWithBuffer(ctx, readBuffer, ) +case bvlcFunction == 0x09 : // BVLCDistributeBroadcastToNetwork _childTemp, typeSwitchError = BVLCDistributeBroadcastToNetworkParseWithBuffer(ctx, readBuffer, bvlcPayloadLength) - case bvlcFunction == 0x0A: // BVLCOriginalUnicastNPDU +case bvlcFunction == 0x0A : // BVLCOriginalUnicastNPDU _childTemp, typeSwitchError = BVLCOriginalUnicastNPDUParseWithBuffer(ctx, readBuffer, bvlcPayloadLength) - case bvlcFunction == 0x0B: // BVLCOriginalBroadcastNPDU +case bvlcFunction == 0x0B : // BVLCOriginalBroadcastNPDU _childTemp, typeSwitchError = BVLCOriginalBroadcastNPDUParseWithBuffer(ctx, readBuffer, bvlcPayloadLength) - case bvlcFunction == 0x0C: // BVLCSecureBVLL +case bvlcFunction == 0x0C : // BVLCSecureBVLL _childTemp, typeSwitchError = BVLCSecureBVLLParseWithBuffer(ctx, readBuffer, bvlcPayloadLength) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [bvlcFunction=%v]", bvlcFunction) @@ -232,7 +236,7 @@ func BVLCParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) (BVLC } // Finish initializing - _child.InitializeParent(_child) +_child.InitializeParent(_child ) return _child, nil } @@ -242,7 +246,7 @@ func (pm *_BVLC) SerializeParent(ctx context.Context, writeBuffer utils.WriteBuf _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BVLC"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BVLC"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BVLC") } @@ -282,6 +286,7 @@ func (pm *_BVLC) SerializeParent(ctx context.Context, writeBuffer utils.WriteBuf return nil } + func (m *_BVLC) isBVLC() bool { return true } @@ -296,3 +301,6 @@ func (m *_BVLC) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BVLCBroadcastDistributionTableEntry.go b/plc4go/protocols/bacnetip/readwrite/model/BVLCBroadcastDistributionTableEntry.go index 170255c9a52..845f432f4f0 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BVLCBroadcastDistributionTableEntry.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BVLCBroadcastDistributionTableEntry.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BVLCBroadcastDistributionTableEntry is the corresponding interface of BVLCBroadcastDistributionTableEntry type BVLCBroadcastDistributionTableEntry interface { @@ -49,11 +51,12 @@ type BVLCBroadcastDistributionTableEntryExactly interface { // _BVLCBroadcastDistributionTableEntry is the data-structure of this message type _BVLCBroadcastDistributionTableEntry struct { - Ip []uint8 - Port uint16 - BroadcastDistributionMap []uint8 + Ip []uint8 + Port uint16 + BroadcastDistributionMap []uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -76,14 +79,15 @@ func (m *_BVLCBroadcastDistributionTableEntry) GetBroadcastDistributionMap() []u /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBVLCBroadcastDistributionTableEntry factory function for _BVLCBroadcastDistributionTableEntry -func NewBVLCBroadcastDistributionTableEntry(ip []uint8, port uint16, broadcastDistributionMap []uint8) *_BVLCBroadcastDistributionTableEntry { - return &_BVLCBroadcastDistributionTableEntry{Ip: ip, Port: port, BroadcastDistributionMap: broadcastDistributionMap} +func NewBVLCBroadcastDistributionTableEntry( ip []uint8 , port uint16 , broadcastDistributionMap []uint8 ) *_BVLCBroadcastDistributionTableEntry { +return &_BVLCBroadcastDistributionTableEntry{ Ip: ip , Port: port , BroadcastDistributionMap: broadcastDistributionMap } } // Deprecated: use the interface for direct cast func CastBVLCBroadcastDistributionTableEntry(structType interface{}) BVLCBroadcastDistributionTableEntry { - if casted, ok := structType.(BVLCBroadcastDistributionTableEntry); ok { + if casted, ok := structType.(BVLCBroadcastDistributionTableEntry); ok { return casted } if casted, ok := structType.(*BVLCBroadcastDistributionTableEntry); ok { @@ -105,7 +109,7 @@ func (m *_BVLCBroadcastDistributionTableEntry) GetLengthInBits(ctx context.Conte } // Simple field (port) - lengthInBits += 16 + lengthInBits += 16; // Array field if len(m.BroadcastDistributionMap) > 0 { @@ -115,6 +119,7 @@ func (m *_BVLCBroadcastDistributionTableEntry) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BVLCBroadcastDistributionTableEntry) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -148,7 +153,7 @@ func BVLCBroadcastDistributionTableEntryParseWithBuffer(ctx context.Context, rea arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := readBuffer.ReadUint8("", 8) +_item, _err := readBuffer.ReadUint8("", 8) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'ip' field of BVLCBroadcastDistributionTableEntry") } @@ -160,7 +165,7 @@ func BVLCBroadcastDistributionTableEntryParseWithBuffer(ctx context.Context, rea } // Simple Field (port) - _port, _portErr := readBuffer.ReadUint16("port", 16) +_port, _portErr := readBuffer.ReadUint16("port", 16) if _portErr != nil { return nil, errors.Wrap(_portErr, "Error parsing 'port' field of BVLCBroadcastDistributionTableEntry") } @@ -182,7 +187,7 @@ func BVLCBroadcastDistributionTableEntryParseWithBuffer(ctx context.Context, rea arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := readBuffer.ReadUint8("", 8) +_item, _err := readBuffer.ReadUint8("", 8) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'broadcastDistributionMap' field of BVLCBroadcastDistributionTableEntry") } @@ -199,10 +204,10 @@ func BVLCBroadcastDistributionTableEntryParseWithBuffer(ctx context.Context, rea // Create the instance return &_BVLCBroadcastDistributionTableEntry{ - Ip: ip, - Port: port, - BroadcastDistributionMap: broadcastDistributionMap, - }, nil + Ip: ip, + Port: port, + BroadcastDistributionMap: broadcastDistributionMap, + }, nil } func (m *_BVLCBroadcastDistributionTableEntry) Serialize() ([]byte, error) { @@ -216,7 +221,7 @@ func (m *_BVLCBroadcastDistributionTableEntry) Serialize() ([]byte, error) { func (m *_BVLCBroadcastDistributionTableEntry) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BVLCBroadcastDistributionTableEntry"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BVLCBroadcastDistributionTableEntry"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BVLCBroadcastDistributionTableEntry") } @@ -263,6 +268,7 @@ func (m *_BVLCBroadcastDistributionTableEntry) SerializeWithWriteBuffer(ctx cont return nil } + func (m *_BVLCBroadcastDistributionTableEntry) isBVLCBroadcastDistributionTableEntry() bool { return true } @@ -277,3 +283,6 @@ func (m *_BVLCBroadcastDistributionTableEntry) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BVLCDeleteForeignDeviceTableEntry.go b/plc4go/protocols/bacnetip/readwrite/model/BVLCDeleteForeignDeviceTableEntry.go index 156680fb063..d86af627f01 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BVLCDeleteForeignDeviceTableEntry.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BVLCDeleteForeignDeviceTableEntry.go @@ -19,15 +19,17 @@ package model + import ( "context" "encoding/binary" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BVLCDeleteForeignDeviceTableEntry is the corresponding interface of BVLCDeleteForeignDeviceTableEntry type BVLCDeleteForeignDeviceTableEntry interface { @@ -50,30 +52,30 @@ type BVLCDeleteForeignDeviceTableEntryExactly interface { // _BVLCDeleteForeignDeviceTableEntry is the data-structure of this message type _BVLCDeleteForeignDeviceTableEntry struct { *_BVLC - Ip []uint8 - Port uint16 + Ip []uint8 + Port uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BVLCDeleteForeignDeviceTableEntry) GetBvlcFunction() uint8 { - return 0x08 -} +func (m *_BVLCDeleteForeignDeviceTableEntry) GetBvlcFunction() uint8 { +return 0x08} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BVLCDeleteForeignDeviceTableEntry) InitializeParent(parent BVLC) {} +func (m *_BVLCDeleteForeignDeviceTableEntry) InitializeParent(parent BVLC ) {} -func (m *_BVLCDeleteForeignDeviceTableEntry) GetParent() BVLC { +func (m *_BVLCDeleteForeignDeviceTableEntry) GetParent() BVLC { return m._BVLC } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,12 +94,13 @@ func (m *_BVLCDeleteForeignDeviceTableEntry) GetPort() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBVLCDeleteForeignDeviceTableEntry factory function for _BVLCDeleteForeignDeviceTableEntry -func NewBVLCDeleteForeignDeviceTableEntry(ip []uint8, port uint16) *_BVLCDeleteForeignDeviceTableEntry { +func NewBVLCDeleteForeignDeviceTableEntry( ip []uint8 , port uint16 ) *_BVLCDeleteForeignDeviceTableEntry { _result := &_BVLCDeleteForeignDeviceTableEntry{ - Ip: ip, - Port: port, - _BVLC: NewBVLC(), + Ip: ip, + Port: port, + _BVLC: NewBVLC(), } _result._BVLC._BVLCChildRequirements = _result return _result @@ -105,7 +108,7 @@ func NewBVLCDeleteForeignDeviceTableEntry(ip []uint8, port uint16) *_BVLCDeleteF // Deprecated: use the interface for direct cast func CastBVLCDeleteForeignDeviceTableEntry(structType interface{}) BVLCDeleteForeignDeviceTableEntry { - if casted, ok := structType.(BVLCDeleteForeignDeviceTableEntry); ok { + if casted, ok := structType.(BVLCDeleteForeignDeviceTableEntry); ok { return casted } if casted, ok := structType.(*BVLCDeleteForeignDeviceTableEntry); ok { @@ -127,11 +130,12 @@ func (m *_BVLCDeleteForeignDeviceTableEntry) GetLengthInBits(ctx context.Context } // Simple field (port) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_BVLCDeleteForeignDeviceTableEntry) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,7 +169,7 @@ func BVLCDeleteForeignDeviceTableEntryParseWithBuffer(ctx context.Context, readB arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := readBuffer.ReadUint8("", 8) +_item, _err := readBuffer.ReadUint8("", 8) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'ip' field of BVLCDeleteForeignDeviceTableEntry") } @@ -177,7 +181,7 @@ func BVLCDeleteForeignDeviceTableEntryParseWithBuffer(ctx context.Context, readB } // Simple Field (port) - _port, _portErr := readBuffer.ReadUint16("port", 16) +_port, _portErr := readBuffer.ReadUint16("port", 16) if _portErr != nil { return nil, errors.Wrap(_portErr, "Error parsing 'port' field of BVLCDeleteForeignDeviceTableEntry") } @@ -189,9 +193,10 @@ func BVLCDeleteForeignDeviceTableEntryParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_BVLCDeleteForeignDeviceTableEntry{ - _BVLC: &_BVLC{}, - Ip: ip, - Port: port, + _BVLC: &_BVLC{ + }, + Ip: ip, + Port: port, } _child._BVLC._BVLCChildRequirements = _child return _child, nil @@ -213,27 +218,27 @@ func (m *_BVLCDeleteForeignDeviceTableEntry) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for BVLCDeleteForeignDeviceTableEntry") } - // Array Field (ip) - if pushErr := writeBuffer.PushContext("ip", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for ip") - } - for _curItem, _element := range m.GetIp() { - _ = _curItem - _elementErr := writeBuffer.WriteUint8("", 8, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'ip' field") - } - } - if popErr := writeBuffer.PopContext("ip", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for ip") + // Array Field (ip) + if pushErr := writeBuffer.PushContext("ip", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for ip") + } + for _curItem, _element := range m.GetIp() { + _ = _curItem + _elementErr := writeBuffer.WriteUint8("", 8, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'ip' field") } + } + if popErr := writeBuffer.PopContext("ip", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for ip") + } - // Simple Field (port) - port := uint16(m.GetPort()) - _portErr := writeBuffer.WriteUint16("port", 16, (port)) - if _portErr != nil { - return errors.Wrap(_portErr, "Error serializing 'port' field") - } + // Simple Field (port) + port := uint16(m.GetPort()) + _portErr := writeBuffer.WriteUint16("port", 16, (port)) + if _portErr != nil { + return errors.Wrap(_portErr, "Error serializing 'port' field") + } if popErr := writeBuffer.PopContext("BVLCDeleteForeignDeviceTableEntry"); popErr != nil { return errors.Wrap(popErr, "Error popping for BVLCDeleteForeignDeviceTableEntry") @@ -243,6 +248,7 @@ func (m *_BVLCDeleteForeignDeviceTableEntry) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BVLCDeleteForeignDeviceTableEntry) isBVLCDeleteForeignDeviceTableEntry() bool { return true } @@ -257,3 +263,6 @@ func (m *_BVLCDeleteForeignDeviceTableEntry) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BVLCDistributeBroadcastToNetwork.go b/plc4go/protocols/bacnetip/readwrite/model/BVLCDistributeBroadcastToNetwork.go index e0ac9afacb1..e57fead0840 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BVLCDistributeBroadcastToNetwork.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BVLCDistributeBroadcastToNetwork.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BVLCDistributeBroadcastToNetwork is the corresponding interface of BVLCDistributeBroadcastToNetwork type BVLCDistributeBroadcastToNetwork interface { @@ -47,32 +49,32 @@ type BVLCDistributeBroadcastToNetworkExactly interface { // _BVLCDistributeBroadcastToNetwork is the data-structure of this message type _BVLCDistributeBroadcastToNetwork struct { *_BVLC - Npdu NPDU + Npdu NPDU // Arguments. BvlcPayloadLength uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BVLCDistributeBroadcastToNetwork) GetBvlcFunction() uint8 { - return 0x09 -} +func (m *_BVLCDistributeBroadcastToNetwork) GetBvlcFunction() uint8 { +return 0x09} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BVLCDistributeBroadcastToNetwork) InitializeParent(parent BVLC) {} +func (m *_BVLCDistributeBroadcastToNetwork) InitializeParent(parent BVLC ) {} -func (m *_BVLCDistributeBroadcastToNetwork) GetParent() BVLC { +func (m *_BVLCDistributeBroadcastToNetwork) GetParent() BVLC { return m._BVLC } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -87,11 +89,12 @@ func (m *_BVLCDistributeBroadcastToNetwork) GetNpdu() NPDU { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBVLCDistributeBroadcastToNetwork factory function for _BVLCDistributeBroadcastToNetwork -func NewBVLCDistributeBroadcastToNetwork(npdu NPDU, bvlcPayloadLength uint16) *_BVLCDistributeBroadcastToNetwork { +func NewBVLCDistributeBroadcastToNetwork( npdu NPDU , bvlcPayloadLength uint16 ) *_BVLCDistributeBroadcastToNetwork { _result := &_BVLCDistributeBroadcastToNetwork{ - Npdu: npdu, - _BVLC: NewBVLC(), + Npdu: npdu, + _BVLC: NewBVLC(), } _result._BVLC._BVLCChildRequirements = _result return _result @@ -99,7 +102,7 @@ func NewBVLCDistributeBroadcastToNetwork(npdu NPDU, bvlcPayloadLength uint16) *_ // Deprecated: use the interface for direct cast func CastBVLCDistributeBroadcastToNetwork(structType interface{}) BVLCDistributeBroadcastToNetwork { - if casted, ok := structType.(BVLCDistributeBroadcastToNetwork); ok { + if casted, ok := structType.(BVLCDistributeBroadcastToNetwork); ok { return casted } if casted, ok := structType.(*BVLCDistributeBroadcastToNetwork); ok { @@ -121,6 +124,7 @@ func (m *_BVLCDistributeBroadcastToNetwork) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_BVLCDistributeBroadcastToNetwork) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -142,7 +146,7 @@ func BVLCDistributeBroadcastToNetworkParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("npdu"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for npdu") } - _npdu, _npduErr := NPDUParseWithBuffer(ctx, readBuffer, uint16(bvlcPayloadLength)) +_npdu, _npduErr := NPDUParseWithBuffer(ctx, readBuffer , uint16( bvlcPayloadLength ) ) if _npduErr != nil { return nil, errors.Wrap(_npduErr, "Error parsing 'npdu' field of BVLCDistributeBroadcastToNetwork") } @@ -157,8 +161,9 @@ func BVLCDistributeBroadcastToNetworkParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_BVLCDistributeBroadcastToNetwork{ - _BVLC: &_BVLC{}, - Npdu: npdu, + _BVLC: &_BVLC{ + }, + Npdu: npdu, } _child._BVLC._BVLCChildRequirements = _child return _child, nil @@ -180,17 +185,17 @@ func (m *_BVLCDistributeBroadcastToNetwork) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for BVLCDistributeBroadcastToNetwork") } - // Simple Field (npdu) - if pushErr := writeBuffer.PushContext("npdu"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for npdu") - } - _npduErr := writeBuffer.WriteSerializable(ctx, m.GetNpdu()) - if popErr := writeBuffer.PopContext("npdu"); popErr != nil { - return errors.Wrap(popErr, "Error popping for npdu") - } - if _npduErr != nil { - return errors.Wrap(_npduErr, "Error serializing 'npdu' field") - } + // Simple Field (npdu) + if pushErr := writeBuffer.PushContext("npdu"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for npdu") + } + _npduErr := writeBuffer.WriteSerializable(ctx, m.GetNpdu()) + if popErr := writeBuffer.PopContext("npdu"); popErr != nil { + return errors.Wrap(popErr, "Error popping for npdu") + } + if _npduErr != nil { + return errors.Wrap(_npduErr, "Error serializing 'npdu' field") + } if popErr := writeBuffer.PopContext("BVLCDistributeBroadcastToNetwork"); popErr != nil { return errors.Wrap(popErr, "Error popping for BVLCDistributeBroadcastToNetwork") @@ -200,13 +205,13 @@ func (m *_BVLCDistributeBroadcastToNetwork) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + //// // Arguments Getter func (m *_BVLCDistributeBroadcastToNetwork) GetBvlcPayloadLength() uint16 { return m.BvlcPayloadLength } - // //// @@ -224,3 +229,6 @@ func (m *_BVLCDistributeBroadcastToNetwork) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BVLCForeignDeviceTableEntry.go b/plc4go/protocols/bacnetip/readwrite/model/BVLCForeignDeviceTableEntry.go index 6600ef56651..69394a2cbe6 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BVLCForeignDeviceTableEntry.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BVLCForeignDeviceTableEntry.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BVLCForeignDeviceTableEntry is the corresponding interface of BVLCForeignDeviceTableEntry type BVLCForeignDeviceTableEntry interface { @@ -51,12 +53,13 @@ type BVLCForeignDeviceTableEntryExactly interface { // _BVLCForeignDeviceTableEntry is the data-structure of this message type _BVLCForeignDeviceTableEntry struct { - Ip []uint8 - Port uint16 - Ttl uint16 - SecondRemainingBeforePurge uint16 + Ip []uint8 + Port uint16 + Ttl uint16 + SecondRemainingBeforePurge uint16 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,14 +86,15 @@ func (m *_BVLCForeignDeviceTableEntry) GetSecondRemainingBeforePurge() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBVLCForeignDeviceTableEntry factory function for _BVLCForeignDeviceTableEntry -func NewBVLCForeignDeviceTableEntry(ip []uint8, port uint16, ttl uint16, secondRemainingBeforePurge uint16) *_BVLCForeignDeviceTableEntry { - return &_BVLCForeignDeviceTableEntry{Ip: ip, Port: port, Ttl: ttl, SecondRemainingBeforePurge: secondRemainingBeforePurge} +func NewBVLCForeignDeviceTableEntry( ip []uint8 , port uint16 , ttl uint16 , secondRemainingBeforePurge uint16 ) *_BVLCForeignDeviceTableEntry { +return &_BVLCForeignDeviceTableEntry{ Ip: ip , Port: port , Ttl: ttl , SecondRemainingBeforePurge: secondRemainingBeforePurge } } // Deprecated: use the interface for direct cast func CastBVLCForeignDeviceTableEntry(structType interface{}) BVLCForeignDeviceTableEntry { - if casted, ok := structType.(BVLCForeignDeviceTableEntry); ok { + if casted, ok := structType.(BVLCForeignDeviceTableEntry); ok { return casted } if casted, ok := structType.(*BVLCForeignDeviceTableEntry); ok { @@ -112,17 +116,18 @@ func (m *_BVLCForeignDeviceTableEntry) GetLengthInBits(ctx context.Context) uint } // Simple field (port) - lengthInBits += 16 + lengthInBits += 16; // Simple field (ttl) - lengthInBits += 16 + lengthInBits += 16; // Simple field (secondRemainingBeforePurge) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_BVLCForeignDeviceTableEntry) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -156,7 +161,7 @@ func BVLCForeignDeviceTableEntryParseWithBuffer(ctx context.Context, readBuffer arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := readBuffer.ReadUint8("", 8) +_item, _err := readBuffer.ReadUint8("", 8) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'ip' field of BVLCForeignDeviceTableEntry") } @@ -168,21 +173,21 @@ func BVLCForeignDeviceTableEntryParseWithBuffer(ctx context.Context, readBuffer } // Simple Field (port) - _port, _portErr := readBuffer.ReadUint16("port", 16) +_port, _portErr := readBuffer.ReadUint16("port", 16) if _portErr != nil { return nil, errors.Wrap(_portErr, "Error parsing 'port' field of BVLCForeignDeviceTableEntry") } port := _port // Simple Field (ttl) - _ttl, _ttlErr := readBuffer.ReadUint16("ttl", 16) +_ttl, _ttlErr := readBuffer.ReadUint16("ttl", 16) if _ttlErr != nil { return nil, errors.Wrap(_ttlErr, "Error parsing 'ttl' field of BVLCForeignDeviceTableEntry") } ttl := _ttl // Simple Field (secondRemainingBeforePurge) - _secondRemainingBeforePurge, _secondRemainingBeforePurgeErr := readBuffer.ReadUint16("secondRemainingBeforePurge", 16) +_secondRemainingBeforePurge, _secondRemainingBeforePurgeErr := readBuffer.ReadUint16("secondRemainingBeforePurge", 16) if _secondRemainingBeforePurgeErr != nil { return nil, errors.Wrap(_secondRemainingBeforePurgeErr, "Error parsing 'secondRemainingBeforePurge' field of BVLCForeignDeviceTableEntry") } @@ -194,11 +199,11 @@ func BVLCForeignDeviceTableEntryParseWithBuffer(ctx context.Context, readBuffer // Create the instance return &_BVLCForeignDeviceTableEntry{ - Ip: ip, - Port: port, - Ttl: ttl, - SecondRemainingBeforePurge: secondRemainingBeforePurge, - }, nil + Ip: ip, + Port: port, + Ttl: ttl, + SecondRemainingBeforePurge: secondRemainingBeforePurge, + }, nil } func (m *_BVLCForeignDeviceTableEntry) Serialize() ([]byte, error) { @@ -212,7 +217,7 @@ func (m *_BVLCForeignDeviceTableEntry) Serialize() ([]byte, error) { func (m *_BVLCForeignDeviceTableEntry) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BVLCForeignDeviceTableEntry"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BVLCForeignDeviceTableEntry"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BVLCForeignDeviceTableEntry") } @@ -258,6 +263,7 @@ func (m *_BVLCForeignDeviceTableEntry) SerializeWithWriteBuffer(ctx context.Cont return nil } + func (m *_BVLCForeignDeviceTableEntry) isBVLCForeignDeviceTableEntry() bool { return true } @@ -272,3 +278,6 @@ func (m *_BVLCForeignDeviceTableEntry) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BVLCForwardedNPDU.go b/plc4go/protocols/bacnetip/readwrite/model/BVLCForwardedNPDU.go index 0a6d0a4dfb8..9066efe69ce 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BVLCForwardedNPDU.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BVLCForwardedNPDU.go @@ -19,15 +19,17 @@ package model + import ( "context" "encoding/binary" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BVLCForwardedNPDU is the corresponding interface of BVLCForwardedNPDU type BVLCForwardedNPDU interface { @@ -52,34 +54,34 @@ type BVLCForwardedNPDUExactly interface { // _BVLCForwardedNPDU is the data-structure of this message type _BVLCForwardedNPDU struct { *_BVLC - Ip []uint8 - Port uint16 - Npdu NPDU + Ip []uint8 + Port uint16 + Npdu NPDU // Arguments. BvlcPayloadLength uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BVLCForwardedNPDU) GetBvlcFunction() uint8 { - return 0x04 -} +func (m *_BVLCForwardedNPDU) GetBvlcFunction() uint8 { +return 0x04} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BVLCForwardedNPDU) InitializeParent(parent BVLC) {} +func (m *_BVLCForwardedNPDU) InitializeParent(parent BVLC ) {} -func (m *_BVLCForwardedNPDU) GetParent() BVLC { +func (m *_BVLCForwardedNPDU) GetParent() BVLC { return m._BVLC } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -102,13 +104,14 @@ func (m *_BVLCForwardedNPDU) GetNpdu() NPDU { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBVLCForwardedNPDU factory function for _BVLCForwardedNPDU -func NewBVLCForwardedNPDU(ip []uint8, port uint16, npdu NPDU, bvlcPayloadLength uint16) *_BVLCForwardedNPDU { +func NewBVLCForwardedNPDU( ip []uint8 , port uint16 , npdu NPDU , bvlcPayloadLength uint16 ) *_BVLCForwardedNPDU { _result := &_BVLCForwardedNPDU{ - Ip: ip, - Port: port, - Npdu: npdu, - _BVLC: NewBVLC(), + Ip: ip, + Port: port, + Npdu: npdu, + _BVLC: NewBVLC(), } _result._BVLC._BVLCChildRequirements = _result return _result @@ -116,7 +119,7 @@ func NewBVLCForwardedNPDU(ip []uint8, port uint16, npdu NPDU, bvlcPayloadLength // Deprecated: use the interface for direct cast func CastBVLCForwardedNPDU(structType interface{}) BVLCForwardedNPDU { - if casted, ok := structType.(BVLCForwardedNPDU); ok { + if casted, ok := structType.(BVLCForwardedNPDU); ok { return casted } if casted, ok := structType.(*BVLCForwardedNPDU); ok { @@ -138,7 +141,7 @@ func (m *_BVLCForwardedNPDU) GetLengthInBits(ctx context.Context) uint16 { } // Simple field (port) - lengthInBits += 16 + lengthInBits += 16; // Simple field (npdu) lengthInBits += m.Npdu.GetLengthInBits(ctx) @@ -146,6 +149,7 @@ func (m *_BVLCForwardedNPDU) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BVLCForwardedNPDU) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -179,7 +183,7 @@ func BVLCForwardedNPDUParseWithBuffer(ctx context.Context, readBuffer utils.Read arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := readBuffer.ReadUint8("", 8) +_item, _err := readBuffer.ReadUint8("", 8) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'ip' field of BVLCForwardedNPDU") } @@ -191,7 +195,7 @@ func BVLCForwardedNPDUParseWithBuffer(ctx context.Context, readBuffer utils.Read } // Simple Field (port) - _port, _portErr := readBuffer.ReadUint16("port", 16) +_port, _portErr := readBuffer.ReadUint16("port", 16) if _portErr != nil { return nil, errors.Wrap(_portErr, "Error parsing 'port' field of BVLCForwardedNPDU") } @@ -201,7 +205,7 @@ func BVLCForwardedNPDUParseWithBuffer(ctx context.Context, readBuffer utils.Read if pullErr := readBuffer.PullContext("npdu"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for npdu") } - _npdu, _npduErr := NPDUParseWithBuffer(ctx, readBuffer, uint16(uint16(bvlcPayloadLength)-uint16(uint16(6)))) +_npdu, _npduErr := NPDUParseWithBuffer(ctx, readBuffer , uint16( uint16(bvlcPayloadLength) - uint16(uint16(6)) ) ) if _npduErr != nil { return nil, errors.Wrap(_npduErr, "Error parsing 'npdu' field of BVLCForwardedNPDU") } @@ -216,10 +220,11 @@ func BVLCForwardedNPDUParseWithBuffer(ctx context.Context, readBuffer utils.Read // Create a partially initialized instance _child := &_BVLCForwardedNPDU{ - _BVLC: &_BVLC{}, - Ip: ip, - Port: port, - Npdu: npdu, + _BVLC: &_BVLC{ + }, + Ip: ip, + Port: port, + Npdu: npdu, } _child._BVLC._BVLCChildRequirements = _child return _child, nil @@ -241,39 +246,39 @@ func (m *_BVLCForwardedNPDU) SerializeWithWriteBuffer(ctx context.Context, write return errors.Wrap(pushErr, "Error pushing for BVLCForwardedNPDU") } - // Array Field (ip) - if pushErr := writeBuffer.PushContext("ip", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for ip") - } - for _curItem, _element := range m.GetIp() { - _ = _curItem - _elementErr := writeBuffer.WriteUint8("", 8, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'ip' field") - } - } - if popErr := writeBuffer.PopContext("ip", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for ip") + // Array Field (ip) + if pushErr := writeBuffer.PushContext("ip", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for ip") + } + for _curItem, _element := range m.GetIp() { + _ = _curItem + _elementErr := writeBuffer.WriteUint8("", 8, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'ip' field") } + } + if popErr := writeBuffer.PopContext("ip", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for ip") + } - // Simple Field (port) - port := uint16(m.GetPort()) - _portErr := writeBuffer.WriteUint16("port", 16, (port)) - if _portErr != nil { - return errors.Wrap(_portErr, "Error serializing 'port' field") - } + // Simple Field (port) + port := uint16(m.GetPort()) + _portErr := writeBuffer.WriteUint16("port", 16, (port)) + if _portErr != nil { + return errors.Wrap(_portErr, "Error serializing 'port' field") + } - // Simple Field (npdu) - if pushErr := writeBuffer.PushContext("npdu"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for npdu") - } - _npduErr := writeBuffer.WriteSerializable(ctx, m.GetNpdu()) - if popErr := writeBuffer.PopContext("npdu"); popErr != nil { - return errors.Wrap(popErr, "Error popping for npdu") - } - if _npduErr != nil { - return errors.Wrap(_npduErr, "Error serializing 'npdu' field") - } + // Simple Field (npdu) + if pushErr := writeBuffer.PushContext("npdu"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for npdu") + } + _npduErr := writeBuffer.WriteSerializable(ctx, m.GetNpdu()) + if popErr := writeBuffer.PopContext("npdu"); popErr != nil { + return errors.Wrap(popErr, "Error popping for npdu") + } + if _npduErr != nil { + return errors.Wrap(_npduErr, "Error serializing 'npdu' field") + } if popErr := writeBuffer.PopContext("BVLCForwardedNPDU"); popErr != nil { return errors.Wrap(popErr, "Error popping for BVLCForwardedNPDU") @@ -283,13 +288,13 @@ func (m *_BVLCForwardedNPDU) SerializeWithWriteBuffer(ctx context.Context, write return m.SerializeParent(ctx, writeBuffer, m, ser) } + //// // Arguments Getter func (m *_BVLCForwardedNPDU) GetBvlcPayloadLength() uint16 { return m.BvlcPayloadLength } - // //// @@ -307,3 +312,6 @@ func (m *_BVLCForwardedNPDU) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BVLCOriginalBroadcastNPDU.go b/plc4go/protocols/bacnetip/readwrite/model/BVLCOriginalBroadcastNPDU.go index fa6e5edd73c..d31467b22d8 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BVLCOriginalBroadcastNPDU.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BVLCOriginalBroadcastNPDU.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BVLCOriginalBroadcastNPDU is the corresponding interface of BVLCOriginalBroadcastNPDU type BVLCOriginalBroadcastNPDU interface { @@ -47,32 +49,32 @@ type BVLCOriginalBroadcastNPDUExactly interface { // _BVLCOriginalBroadcastNPDU is the data-structure of this message type _BVLCOriginalBroadcastNPDU struct { *_BVLC - Npdu NPDU + Npdu NPDU // Arguments. BvlcPayloadLength uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BVLCOriginalBroadcastNPDU) GetBvlcFunction() uint8 { - return 0x0B -} +func (m *_BVLCOriginalBroadcastNPDU) GetBvlcFunction() uint8 { +return 0x0B} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BVLCOriginalBroadcastNPDU) InitializeParent(parent BVLC) {} +func (m *_BVLCOriginalBroadcastNPDU) InitializeParent(parent BVLC ) {} -func (m *_BVLCOriginalBroadcastNPDU) GetParent() BVLC { +func (m *_BVLCOriginalBroadcastNPDU) GetParent() BVLC { return m._BVLC } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -87,11 +89,12 @@ func (m *_BVLCOriginalBroadcastNPDU) GetNpdu() NPDU { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBVLCOriginalBroadcastNPDU factory function for _BVLCOriginalBroadcastNPDU -func NewBVLCOriginalBroadcastNPDU(npdu NPDU, bvlcPayloadLength uint16) *_BVLCOriginalBroadcastNPDU { +func NewBVLCOriginalBroadcastNPDU( npdu NPDU , bvlcPayloadLength uint16 ) *_BVLCOriginalBroadcastNPDU { _result := &_BVLCOriginalBroadcastNPDU{ - Npdu: npdu, - _BVLC: NewBVLC(), + Npdu: npdu, + _BVLC: NewBVLC(), } _result._BVLC._BVLCChildRequirements = _result return _result @@ -99,7 +102,7 @@ func NewBVLCOriginalBroadcastNPDU(npdu NPDU, bvlcPayloadLength uint16) *_BVLCOri // Deprecated: use the interface for direct cast func CastBVLCOriginalBroadcastNPDU(structType interface{}) BVLCOriginalBroadcastNPDU { - if casted, ok := structType.(BVLCOriginalBroadcastNPDU); ok { + if casted, ok := structType.(BVLCOriginalBroadcastNPDU); ok { return casted } if casted, ok := structType.(*BVLCOriginalBroadcastNPDU); ok { @@ -121,6 +124,7 @@ func (m *_BVLCOriginalBroadcastNPDU) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_BVLCOriginalBroadcastNPDU) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -142,7 +146,7 @@ func BVLCOriginalBroadcastNPDUParseWithBuffer(ctx context.Context, readBuffer ut if pullErr := readBuffer.PullContext("npdu"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for npdu") } - _npdu, _npduErr := NPDUParseWithBuffer(ctx, readBuffer, uint16(bvlcPayloadLength)) +_npdu, _npduErr := NPDUParseWithBuffer(ctx, readBuffer , uint16( bvlcPayloadLength ) ) if _npduErr != nil { return nil, errors.Wrap(_npduErr, "Error parsing 'npdu' field of BVLCOriginalBroadcastNPDU") } @@ -157,8 +161,9 @@ func BVLCOriginalBroadcastNPDUParseWithBuffer(ctx context.Context, readBuffer ut // Create a partially initialized instance _child := &_BVLCOriginalBroadcastNPDU{ - _BVLC: &_BVLC{}, - Npdu: npdu, + _BVLC: &_BVLC{ + }, + Npdu: npdu, } _child._BVLC._BVLCChildRequirements = _child return _child, nil @@ -180,17 +185,17 @@ func (m *_BVLCOriginalBroadcastNPDU) SerializeWithWriteBuffer(ctx context.Contex return errors.Wrap(pushErr, "Error pushing for BVLCOriginalBroadcastNPDU") } - // Simple Field (npdu) - if pushErr := writeBuffer.PushContext("npdu"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for npdu") - } - _npduErr := writeBuffer.WriteSerializable(ctx, m.GetNpdu()) - if popErr := writeBuffer.PopContext("npdu"); popErr != nil { - return errors.Wrap(popErr, "Error popping for npdu") - } - if _npduErr != nil { - return errors.Wrap(_npduErr, "Error serializing 'npdu' field") - } + // Simple Field (npdu) + if pushErr := writeBuffer.PushContext("npdu"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for npdu") + } + _npduErr := writeBuffer.WriteSerializable(ctx, m.GetNpdu()) + if popErr := writeBuffer.PopContext("npdu"); popErr != nil { + return errors.Wrap(popErr, "Error popping for npdu") + } + if _npduErr != nil { + return errors.Wrap(_npduErr, "Error serializing 'npdu' field") + } if popErr := writeBuffer.PopContext("BVLCOriginalBroadcastNPDU"); popErr != nil { return errors.Wrap(popErr, "Error popping for BVLCOriginalBroadcastNPDU") @@ -200,13 +205,13 @@ func (m *_BVLCOriginalBroadcastNPDU) SerializeWithWriteBuffer(ctx context.Contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + //// // Arguments Getter func (m *_BVLCOriginalBroadcastNPDU) GetBvlcPayloadLength() uint16 { return m.BvlcPayloadLength } - // //// @@ -224,3 +229,6 @@ func (m *_BVLCOriginalBroadcastNPDU) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BVLCOriginalUnicastNPDU.go b/plc4go/protocols/bacnetip/readwrite/model/BVLCOriginalUnicastNPDU.go index 280ae2f15d5..6d31fa771ec 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BVLCOriginalUnicastNPDU.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BVLCOriginalUnicastNPDU.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BVLCOriginalUnicastNPDU is the corresponding interface of BVLCOriginalUnicastNPDU type BVLCOriginalUnicastNPDU interface { @@ -47,32 +49,32 @@ type BVLCOriginalUnicastNPDUExactly interface { // _BVLCOriginalUnicastNPDU is the data-structure of this message type _BVLCOriginalUnicastNPDU struct { *_BVLC - Npdu NPDU + Npdu NPDU // Arguments. BvlcPayloadLength uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BVLCOriginalUnicastNPDU) GetBvlcFunction() uint8 { - return 0x0A -} +func (m *_BVLCOriginalUnicastNPDU) GetBvlcFunction() uint8 { +return 0x0A} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BVLCOriginalUnicastNPDU) InitializeParent(parent BVLC) {} +func (m *_BVLCOriginalUnicastNPDU) InitializeParent(parent BVLC ) {} -func (m *_BVLCOriginalUnicastNPDU) GetParent() BVLC { +func (m *_BVLCOriginalUnicastNPDU) GetParent() BVLC { return m._BVLC } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -87,11 +89,12 @@ func (m *_BVLCOriginalUnicastNPDU) GetNpdu() NPDU { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBVLCOriginalUnicastNPDU factory function for _BVLCOriginalUnicastNPDU -func NewBVLCOriginalUnicastNPDU(npdu NPDU, bvlcPayloadLength uint16) *_BVLCOriginalUnicastNPDU { +func NewBVLCOriginalUnicastNPDU( npdu NPDU , bvlcPayloadLength uint16 ) *_BVLCOriginalUnicastNPDU { _result := &_BVLCOriginalUnicastNPDU{ - Npdu: npdu, - _BVLC: NewBVLC(), + Npdu: npdu, + _BVLC: NewBVLC(), } _result._BVLC._BVLCChildRequirements = _result return _result @@ -99,7 +102,7 @@ func NewBVLCOriginalUnicastNPDU(npdu NPDU, bvlcPayloadLength uint16) *_BVLCOrigi // Deprecated: use the interface for direct cast func CastBVLCOriginalUnicastNPDU(structType interface{}) BVLCOriginalUnicastNPDU { - if casted, ok := structType.(BVLCOriginalUnicastNPDU); ok { + if casted, ok := structType.(BVLCOriginalUnicastNPDU); ok { return casted } if casted, ok := structType.(*BVLCOriginalUnicastNPDU); ok { @@ -121,6 +124,7 @@ func (m *_BVLCOriginalUnicastNPDU) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BVLCOriginalUnicastNPDU) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -142,7 +146,7 @@ func BVLCOriginalUnicastNPDUParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("npdu"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for npdu") } - _npdu, _npduErr := NPDUParseWithBuffer(ctx, readBuffer, uint16(bvlcPayloadLength)) +_npdu, _npduErr := NPDUParseWithBuffer(ctx, readBuffer , uint16( bvlcPayloadLength ) ) if _npduErr != nil { return nil, errors.Wrap(_npduErr, "Error parsing 'npdu' field of BVLCOriginalUnicastNPDU") } @@ -157,8 +161,9 @@ func BVLCOriginalUnicastNPDUParseWithBuffer(ctx context.Context, readBuffer util // Create a partially initialized instance _child := &_BVLCOriginalUnicastNPDU{ - _BVLC: &_BVLC{}, - Npdu: npdu, + _BVLC: &_BVLC{ + }, + Npdu: npdu, } _child._BVLC._BVLCChildRequirements = _child return _child, nil @@ -180,17 +185,17 @@ func (m *_BVLCOriginalUnicastNPDU) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for BVLCOriginalUnicastNPDU") } - // Simple Field (npdu) - if pushErr := writeBuffer.PushContext("npdu"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for npdu") - } - _npduErr := writeBuffer.WriteSerializable(ctx, m.GetNpdu()) - if popErr := writeBuffer.PopContext("npdu"); popErr != nil { - return errors.Wrap(popErr, "Error popping for npdu") - } - if _npduErr != nil { - return errors.Wrap(_npduErr, "Error serializing 'npdu' field") - } + // Simple Field (npdu) + if pushErr := writeBuffer.PushContext("npdu"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for npdu") + } + _npduErr := writeBuffer.WriteSerializable(ctx, m.GetNpdu()) + if popErr := writeBuffer.PopContext("npdu"); popErr != nil { + return errors.Wrap(popErr, "Error popping for npdu") + } + if _npduErr != nil { + return errors.Wrap(_npduErr, "Error serializing 'npdu' field") + } if popErr := writeBuffer.PopContext("BVLCOriginalUnicastNPDU"); popErr != nil { return errors.Wrap(popErr, "Error popping for BVLCOriginalUnicastNPDU") @@ -200,13 +205,13 @@ func (m *_BVLCOriginalUnicastNPDU) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + //// // Arguments Getter func (m *_BVLCOriginalUnicastNPDU) GetBvlcPayloadLength() uint16 { return m.BvlcPayloadLength } - // //// @@ -224,3 +229,6 @@ func (m *_BVLCOriginalUnicastNPDU) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BVLCReadBroadcastDistributionTable.go b/plc4go/protocols/bacnetip/readwrite/model/BVLCReadBroadcastDistributionTable.go index c8fbfaa1d6a..db7f5c21af0 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BVLCReadBroadcastDistributionTable.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BVLCReadBroadcastDistributionTable.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BVLCReadBroadcastDistributionTable is the corresponding interface of BVLCReadBroadcastDistributionTable type BVLCReadBroadcastDistributionTable interface { @@ -47,30 +49,32 @@ type _BVLCReadBroadcastDistributionTable struct { *_BVLC } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BVLCReadBroadcastDistributionTable) GetBvlcFunction() uint8 { - return 0x02 -} +func (m *_BVLCReadBroadcastDistributionTable) GetBvlcFunction() uint8 { +return 0x02} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BVLCReadBroadcastDistributionTable) InitializeParent(parent BVLC) {} +func (m *_BVLCReadBroadcastDistributionTable) InitializeParent(parent BVLC ) {} -func (m *_BVLCReadBroadcastDistributionTable) GetParent() BVLC { +func (m *_BVLCReadBroadcastDistributionTable) GetParent() BVLC { return m._BVLC } + // NewBVLCReadBroadcastDistributionTable factory function for _BVLCReadBroadcastDistributionTable -func NewBVLCReadBroadcastDistributionTable() *_BVLCReadBroadcastDistributionTable { +func NewBVLCReadBroadcastDistributionTable( ) *_BVLCReadBroadcastDistributionTable { _result := &_BVLCReadBroadcastDistributionTable{ - _BVLC: NewBVLC(), + _BVLC: NewBVLC(), } _result._BVLC._BVLCChildRequirements = _result return _result @@ -78,7 +82,7 @@ func NewBVLCReadBroadcastDistributionTable() *_BVLCReadBroadcastDistributionTabl // Deprecated: use the interface for direct cast func CastBVLCReadBroadcastDistributionTable(structType interface{}) BVLCReadBroadcastDistributionTable { - if casted, ok := structType.(BVLCReadBroadcastDistributionTable); ok { + if casted, ok := structType.(BVLCReadBroadcastDistributionTable); ok { return casted } if casted, ok := structType.(*BVLCReadBroadcastDistributionTable); ok { @@ -97,6 +101,7 @@ func (m *_BVLCReadBroadcastDistributionTable) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_BVLCReadBroadcastDistributionTable) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -120,7 +125,8 @@ func BVLCReadBroadcastDistributionTableParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_BVLCReadBroadcastDistributionTable{ - _BVLC: &_BVLC{}, + _BVLC: &_BVLC{ + }, } _child._BVLC._BVLCChildRequirements = _child return _child, nil @@ -150,6 +156,7 @@ func (m *_BVLCReadBroadcastDistributionTable) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BVLCReadBroadcastDistributionTable) isBVLCReadBroadcastDistributionTable() bool { return true } @@ -164,3 +171,6 @@ func (m *_BVLCReadBroadcastDistributionTable) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BVLCReadBroadcastDistributionTableAck.go b/plc4go/protocols/bacnetip/readwrite/model/BVLCReadBroadcastDistributionTableAck.go index b8e63d1fefd..bf78dd1668a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BVLCReadBroadcastDistributionTableAck.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BVLCReadBroadcastDistributionTableAck.go @@ -19,15 +19,17 @@ package model + import ( "context" "encoding/binary" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BVLCReadBroadcastDistributionTableAck is the corresponding interface of BVLCReadBroadcastDistributionTableAck type BVLCReadBroadcastDistributionTableAck interface { @@ -48,32 +50,32 @@ type BVLCReadBroadcastDistributionTableAckExactly interface { // _BVLCReadBroadcastDistributionTableAck is the data-structure of this message type _BVLCReadBroadcastDistributionTableAck struct { *_BVLC - Table []BVLCBroadcastDistributionTableEntry + Table []BVLCBroadcastDistributionTableEntry // Arguments. BvlcPayloadLength uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BVLCReadBroadcastDistributionTableAck) GetBvlcFunction() uint8 { - return 0x03 -} +func (m *_BVLCReadBroadcastDistributionTableAck) GetBvlcFunction() uint8 { +return 0x03} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BVLCReadBroadcastDistributionTableAck) InitializeParent(parent BVLC) {} +func (m *_BVLCReadBroadcastDistributionTableAck) InitializeParent(parent BVLC ) {} -func (m *_BVLCReadBroadcastDistributionTableAck) GetParent() BVLC { +func (m *_BVLCReadBroadcastDistributionTableAck) GetParent() BVLC { return m._BVLC } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -88,11 +90,12 @@ func (m *_BVLCReadBroadcastDistributionTableAck) GetTable() []BVLCBroadcastDistr /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBVLCReadBroadcastDistributionTableAck factory function for _BVLCReadBroadcastDistributionTableAck -func NewBVLCReadBroadcastDistributionTableAck(table []BVLCBroadcastDistributionTableEntry, bvlcPayloadLength uint16) *_BVLCReadBroadcastDistributionTableAck { +func NewBVLCReadBroadcastDistributionTableAck( table []BVLCBroadcastDistributionTableEntry , bvlcPayloadLength uint16 ) *_BVLCReadBroadcastDistributionTableAck { _result := &_BVLCReadBroadcastDistributionTableAck{ Table: table, - _BVLC: NewBVLC(), + _BVLC: NewBVLC(), } _result._BVLC._BVLCChildRequirements = _result return _result @@ -100,7 +103,7 @@ func NewBVLCReadBroadcastDistributionTableAck(table []BVLCBroadcastDistributionT // Deprecated: use the interface for direct cast func CastBVLCReadBroadcastDistributionTableAck(structType interface{}) BVLCReadBroadcastDistributionTableAck { - if casted, ok := structType.(BVLCReadBroadcastDistributionTableAck); ok { + if casted, ok := structType.(BVLCReadBroadcastDistributionTableAck); ok { return casted } if casted, ok := structType.(*BVLCReadBroadcastDistributionTableAck); ok { @@ -126,6 +129,7 @@ func (m *_BVLCReadBroadcastDistributionTableAck) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_BVLCReadBroadcastDistributionTableAck) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -152,8 +156,8 @@ func BVLCReadBroadcastDistributionTableAckParseWithBuffer(ctx context.Context, r { _tableLength := bvlcPayloadLength _tableEndPos := positionAware.GetPos() + uint16(_tableLength) - for positionAware.GetPos() < _tableEndPos { - _item, _err := BVLCBroadcastDistributionTableEntryParseWithBuffer(ctx, readBuffer) + for ;positionAware.GetPos() < _tableEndPos; { +_item, _err := BVLCBroadcastDistributionTableEntryParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'table' field of BVLCReadBroadcastDistributionTableAck") } @@ -170,7 +174,8 @@ func BVLCReadBroadcastDistributionTableAckParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_BVLCReadBroadcastDistributionTableAck{ - _BVLC: &_BVLC{}, + _BVLC: &_BVLC{ + }, Table: table, } _child._BVLC._BVLCChildRequirements = _child @@ -193,22 +198,22 @@ func (m *_BVLCReadBroadcastDistributionTableAck) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for BVLCReadBroadcastDistributionTableAck") } - // Array Field (table) - if pushErr := writeBuffer.PushContext("table", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for table") - } - for _curItem, _element := range m.GetTable() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetTable()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'table' field") - } - } - if popErr := writeBuffer.PopContext("table", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for table") + // Array Field (table) + if pushErr := writeBuffer.PushContext("table", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for table") + } + for _curItem, _element := range m.GetTable() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetTable()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'table' field") } + } + if popErr := writeBuffer.PopContext("table", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for table") + } if popErr := writeBuffer.PopContext("BVLCReadBroadcastDistributionTableAck"); popErr != nil { return errors.Wrap(popErr, "Error popping for BVLCReadBroadcastDistributionTableAck") @@ -218,13 +223,13 @@ func (m *_BVLCReadBroadcastDistributionTableAck) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + //// // Arguments Getter func (m *_BVLCReadBroadcastDistributionTableAck) GetBvlcPayloadLength() uint16 { return m.BvlcPayloadLength } - // //// @@ -242,3 +247,6 @@ func (m *_BVLCReadBroadcastDistributionTableAck) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BVLCReadForeignDeviceTable.go b/plc4go/protocols/bacnetip/readwrite/model/BVLCReadForeignDeviceTable.go index c4943d577a7..6893f8b5cff 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BVLCReadForeignDeviceTable.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BVLCReadForeignDeviceTable.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BVLCReadForeignDeviceTable is the corresponding interface of BVLCReadForeignDeviceTable type BVLCReadForeignDeviceTable interface { @@ -47,30 +49,32 @@ type _BVLCReadForeignDeviceTable struct { *_BVLC } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BVLCReadForeignDeviceTable) GetBvlcFunction() uint8 { - return 0x06 -} +func (m *_BVLCReadForeignDeviceTable) GetBvlcFunction() uint8 { +return 0x06} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BVLCReadForeignDeviceTable) InitializeParent(parent BVLC) {} +func (m *_BVLCReadForeignDeviceTable) InitializeParent(parent BVLC ) {} -func (m *_BVLCReadForeignDeviceTable) GetParent() BVLC { +func (m *_BVLCReadForeignDeviceTable) GetParent() BVLC { return m._BVLC } + // NewBVLCReadForeignDeviceTable factory function for _BVLCReadForeignDeviceTable -func NewBVLCReadForeignDeviceTable() *_BVLCReadForeignDeviceTable { +func NewBVLCReadForeignDeviceTable( ) *_BVLCReadForeignDeviceTable { _result := &_BVLCReadForeignDeviceTable{ - _BVLC: NewBVLC(), + _BVLC: NewBVLC(), } _result._BVLC._BVLCChildRequirements = _result return _result @@ -78,7 +82,7 @@ func NewBVLCReadForeignDeviceTable() *_BVLCReadForeignDeviceTable { // Deprecated: use the interface for direct cast func CastBVLCReadForeignDeviceTable(structType interface{}) BVLCReadForeignDeviceTable { - if casted, ok := structType.(BVLCReadForeignDeviceTable); ok { + if casted, ok := structType.(BVLCReadForeignDeviceTable); ok { return casted } if casted, ok := structType.(*BVLCReadForeignDeviceTable); ok { @@ -97,6 +101,7 @@ func (m *_BVLCReadForeignDeviceTable) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_BVLCReadForeignDeviceTable) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -120,7 +125,8 @@ func BVLCReadForeignDeviceTableParseWithBuffer(ctx context.Context, readBuffer u // Create a partially initialized instance _child := &_BVLCReadForeignDeviceTable{ - _BVLC: &_BVLC{}, + _BVLC: &_BVLC{ + }, } _child._BVLC._BVLCChildRequirements = _child return _child, nil @@ -150,6 +156,7 @@ func (m *_BVLCReadForeignDeviceTable) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BVLCReadForeignDeviceTable) isBVLCReadForeignDeviceTable() bool { return true } @@ -164,3 +171,6 @@ func (m *_BVLCReadForeignDeviceTable) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BVLCReadForeignDeviceTableAck.go b/plc4go/protocols/bacnetip/readwrite/model/BVLCReadForeignDeviceTableAck.go index c6731ec6ae9..154827daafb 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BVLCReadForeignDeviceTableAck.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BVLCReadForeignDeviceTableAck.go @@ -19,15 +19,17 @@ package model + import ( "context" "encoding/binary" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BVLCReadForeignDeviceTableAck is the corresponding interface of BVLCReadForeignDeviceTableAck type BVLCReadForeignDeviceTableAck interface { @@ -48,32 +50,32 @@ type BVLCReadForeignDeviceTableAckExactly interface { // _BVLCReadForeignDeviceTableAck is the data-structure of this message type _BVLCReadForeignDeviceTableAck struct { *_BVLC - Table []BVLCForeignDeviceTableEntry + Table []BVLCForeignDeviceTableEntry // Arguments. BvlcPayloadLength uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BVLCReadForeignDeviceTableAck) GetBvlcFunction() uint8 { - return 0x07 -} +func (m *_BVLCReadForeignDeviceTableAck) GetBvlcFunction() uint8 { +return 0x07} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BVLCReadForeignDeviceTableAck) InitializeParent(parent BVLC) {} +func (m *_BVLCReadForeignDeviceTableAck) InitializeParent(parent BVLC ) {} -func (m *_BVLCReadForeignDeviceTableAck) GetParent() BVLC { +func (m *_BVLCReadForeignDeviceTableAck) GetParent() BVLC { return m._BVLC } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -88,11 +90,12 @@ func (m *_BVLCReadForeignDeviceTableAck) GetTable() []BVLCForeignDeviceTableEntr /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBVLCReadForeignDeviceTableAck factory function for _BVLCReadForeignDeviceTableAck -func NewBVLCReadForeignDeviceTableAck(table []BVLCForeignDeviceTableEntry, bvlcPayloadLength uint16) *_BVLCReadForeignDeviceTableAck { +func NewBVLCReadForeignDeviceTableAck( table []BVLCForeignDeviceTableEntry , bvlcPayloadLength uint16 ) *_BVLCReadForeignDeviceTableAck { _result := &_BVLCReadForeignDeviceTableAck{ Table: table, - _BVLC: NewBVLC(), + _BVLC: NewBVLC(), } _result._BVLC._BVLCChildRequirements = _result return _result @@ -100,7 +103,7 @@ func NewBVLCReadForeignDeviceTableAck(table []BVLCForeignDeviceTableEntry, bvlcP // Deprecated: use the interface for direct cast func CastBVLCReadForeignDeviceTableAck(structType interface{}) BVLCReadForeignDeviceTableAck { - if casted, ok := structType.(BVLCReadForeignDeviceTableAck); ok { + if casted, ok := structType.(BVLCReadForeignDeviceTableAck); ok { return casted } if casted, ok := structType.(*BVLCReadForeignDeviceTableAck); ok { @@ -126,6 +129,7 @@ func (m *_BVLCReadForeignDeviceTableAck) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_BVLCReadForeignDeviceTableAck) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -152,8 +156,8 @@ func BVLCReadForeignDeviceTableAckParseWithBuffer(ctx context.Context, readBuffe { _tableLength := bvlcPayloadLength _tableEndPos := positionAware.GetPos() + uint16(_tableLength) - for positionAware.GetPos() < _tableEndPos { - _item, _err := BVLCForeignDeviceTableEntryParseWithBuffer(ctx, readBuffer) + for ;positionAware.GetPos() < _tableEndPos; { +_item, _err := BVLCForeignDeviceTableEntryParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'table' field of BVLCReadForeignDeviceTableAck") } @@ -170,7 +174,8 @@ func BVLCReadForeignDeviceTableAckParseWithBuffer(ctx context.Context, readBuffe // Create a partially initialized instance _child := &_BVLCReadForeignDeviceTableAck{ - _BVLC: &_BVLC{}, + _BVLC: &_BVLC{ + }, Table: table, } _child._BVLC._BVLCChildRequirements = _child @@ -193,22 +198,22 @@ func (m *_BVLCReadForeignDeviceTableAck) SerializeWithWriteBuffer(ctx context.Co return errors.Wrap(pushErr, "Error pushing for BVLCReadForeignDeviceTableAck") } - // Array Field (table) - if pushErr := writeBuffer.PushContext("table", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for table") - } - for _curItem, _element := range m.GetTable() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetTable()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'table' field") - } - } - if popErr := writeBuffer.PopContext("table", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for table") + // Array Field (table) + if pushErr := writeBuffer.PushContext("table", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for table") + } + for _curItem, _element := range m.GetTable() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetTable()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'table' field") } + } + if popErr := writeBuffer.PopContext("table", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for table") + } if popErr := writeBuffer.PopContext("BVLCReadForeignDeviceTableAck"); popErr != nil { return errors.Wrap(popErr, "Error popping for BVLCReadForeignDeviceTableAck") @@ -218,13 +223,13 @@ func (m *_BVLCReadForeignDeviceTableAck) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + //// // Arguments Getter func (m *_BVLCReadForeignDeviceTableAck) GetBvlcPayloadLength() uint16 { return m.BvlcPayloadLength } - // //// @@ -242,3 +247,6 @@ func (m *_BVLCReadForeignDeviceTableAck) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BVLCRegisterForeignDevice.go b/plc4go/protocols/bacnetip/readwrite/model/BVLCRegisterForeignDevice.go index 9633002acf7..03b8f300dd2 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BVLCRegisterForeignDevice.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BVLCRegisterForeignDevice.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BVLCRegisterForeignDevice is the corresponding interface of BVLCRegisterForeignDevice type BVLCRegisterForeignDevice interface { @@ -47,29 +49,29 @@ type BVLCRegisterForeignDeviceExactly interface { // _BVLCRegisterForeignDevice is the data-structure of this message type _BVLCRegisterForeignDevice struct { *_BVLC - Ttl uint16 + Ttl uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BVLCRegisterForeignDevice) GetBvlcFunction() uint8 { - return 0x05 -} +func (m *_BVLCRegisterForeignDevice) GetBvlcFunction() uint8 { +return 0x05} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BVLCRegisterForeignDevice) InitializeParent(parent BVLC) {} +func (m *_BVLCRegisterForeignDevice) InitializeParent(parent BVLC ) {} -func (m *_BVLCRegisterForeignDevice) GetParent() BVLC { +func (m *_BVLCRegisterForeignDevice) GetParent() BVLC { return m._BVLC } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -84,11 +86,12 @@ func (m *_BVLCRegisterForeignDevice) GetTtl() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBVLCRegisterForeignDevice factory function for _BVLCRegisterForeignDevice -func NewBVLCRegisterForeignDevice(ttl uint16) *_BVLCRegisterForeignDevice { +func NewBVLCRegisterForeignDevice( ttl uint16 ) *_BVLCRegisterForeignDevice { _result := &_BVLCRegisterForeignDevice{ - Ttl: ttl, - _BVLC: NewBVLC(), + Ttl: ttl, + _BVLC: NewBVLC(), } _result._BVLC._BVLCChildRequirements = _result return _result @@ -96,7 +99,7 @@ func NewBVLCRegisterForeignDevice(ttl uint16) *_BVLCRegisterForeignDevice { // Deprecated: use the interface for direct cast func CastBVLCRegisterForeignDevice(structType interface{}) BVLCRegisterForeignDevice { - if casted, ok := structType.(BVLCRegisterForeignDevice); ok { + if casted, ok := structType.(BVLCRegisterForeignDevice); ok { return casted } if casted, ok := structType.(*BVLCRegisterForeignDevice); ok { @@ -113,11 +116,12 @@ func (m *_BVLCRegisterForeignDevice) GetLengthInBits(ctx context.Context) uint16 lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (ttl) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_BVLCRegisterForeignDevice) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func BVLCRegisterForeignDeviceParseWithBuffer(ctx context.Context, readBuffer ut _ = currentPos // Simple Field (ttl) - _ttl, _ttlErr := readBuffer.ReadUint16("ttl", 16) +_ttl, _ttlErr := readBuffer.ReadUint16("ttl", 16) if _ttlErr != nil { return nil, errors.Wrap(_ttlErr, "Error parsing 'ttl' field of BVLCRegisterForeignDevice") } @@ -148,8 +152,9 @@ func BVLCRegisterForeignDeviceParseWithBuffer(ctx context.Context, readBuffer ut // Create a partially initialized instance _child := &_BVLCRegisterForeignDevice{ - _BVLC: &_BVLC{}, - Ttl: ttl, + _BVLC: &_BVLC{ + }, + Ttl: ttl, } _child._BVLC._BVLCChildRequirements = _child return _child, nil @@ -171,12 +176,12 @@ func (m *_BVLCRegisterForeignDevice) SerializeWithWriteBuffer(ctx context.Contex return errors.Wrap(pushErr, "Error pushing for BVLCRegisterForeignDevice") } - // Simple Field (ttl) - ttl := uint16(m.GetTtl()) - _ttlErr := writeBuffer.WriteUint16("ttl", 16, (ttl)) - if _ttlErr != nil { - return errors.Wrap(_ttlErr, "Error serializing 'ttl' field") - } + // Simple Field (ttl) + ttl := uint16(m.GetTtl()) + _ttlErr := writeBuffer.WriteUint16("ttl", 16, (ttl)) + if _ttlErr != nil { + return errors.Wrap(_ttlErr, "Error serializing 'ttl' field") + } if popErr := writeBuffer.PopContext("BVLCRegisterForeignDevice"); popErr != nil { return errors.Wrap(popErr, "Error popping for BVLCRegisterForeignDevice") @@ -186,6 +191,7 @@ func (m *_BVLCRegisterForeignDevice) SerializeWithWriteBuffer(ctx context.Contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BVLCRegisterForeignDevice) isBVLCRegisterForeignDevice() bool { return true } @@ -200,3 +206,6 @@ func (m *_BVLCRegisterForeignDevice) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BVLCResult.go b/plc4go/protocols/bacnetip/readwrite/model/BVLCResult.go index 8b50b72138c..c02699c789a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BVLCResult.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BVLCResult.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BVLCResult is the corresponding interface of BVLCResult type BVLCResult interface { @@ -47,29 +49,29 @@ type BVLCResultExactly interface { // _BVLCResult is the data-structure of this message type _BVLCResult struct { *_BVLC - Code BVLCResultCode + Code BVLCResultCode } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BVLCResult) GetBvlcFunction() uint8 { - return 0x00 -} +func (m *_BVLCResult) GetBvlcFunction() uint8 { +return 0x00} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BVLCResult) InitializeParent(parent BVLC) {} +func (m *_BVLCResult) InitializeParent(parent BVLC ) {} -func (m *_BVLCResult) GetParent() BVLC { +func (m *_BVLCResult) GetParent() BVLC { return m._BVLC } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -84,11 +86,12 @@ func (m *_BVLCResult) GetCode() BVLCResultCode { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBVLCResult factory function for _BVLCResult -func NewBVLCResult(code BVLCResultCode) *_BVLCResult { +func NewBVLCResult( code BVLCResultCode ) *_BVLCResult { _result := &_BVLCResult{ - Code: code, - _BVLC: NewBVLC(), + Code: code, + _BVLC: NewBVLC(), } _result._BVLC._BVLCChildRequirements = _result return _result @@ -96,7 +99,7 @@ func NewBVLCResult(code BVLCResultCode) *_BVLCResult { // Deprecated: use the interface for direct cast func CastBVLCResult(structType interface{}) BVLCResult { - if casted, ok := structType.(BVLCResult); ok { + if casted, ok := structType.(BVLCResult); ok { return casted } if casted, ok := structType.(*BVLCResult); ok { @@ -118,6 +121,7 @@ func (m *_BVLCResult) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BVLCResult) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +143,7 @@ func BVLCResultParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) if pullErr := readBuffer.PullContext("code"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for code") } - _code, _codeErr := BVLCResultCodeParseWithBuffer(ctx, readBuffer) +_code, _codeErr := BVLCResultCodeParseWithBuffer(ctx, readBuffer) if _codeErr != nil { return nil, errors.Wrap(_codeErr, "Error parsing 'code' field of BVLCResult") } @@ -154,8 +158,9 @@ func BVLCResultParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) // Create a partially initialized instance _child := &_BVLCResult{ - _BVLC: &_BVLC{}, - Code: code, + _BVLC: &_BVLC{ + }, + Code: code, } _child._BVLC._BVLCChildRequirements = _child return _child, nil @@ -177,17 +182,17 @@ func (m *_BVLCResult) SerializeWithWriteBuffer(ctx context.Context, writeBuffer return errors.Wrap(pushErr, "Error pushing for BVLCResult") } - // Simple Field (code) - if pushErr := writeBuffer.PushContext("code"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for code") - } - _codeErr := writeBuffer.WriteSerializable(ctx, m.GetCode()) - if popErr := writeBuffer.PopContext("code"); popErr != nil { - return errors.Wrap(popErr, "Error popping for code") - } - if _codeErr != nil { - return errors.Wrap(_codeErr, "Error serializing 'code' field") - } + // Simple Field (code) + if pushErr := writeBuffer.PushContext("code"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for code") + } + _codeErr := writeBuffer.WriteSerializable(ctx, m.GetCode()) + if popErr := writeBuffer.PopContext("code"); popErr != nil { + return errors.Wrap(popErr, "Error popping for code") + } + if _codeErr != nil { + return errors.Wrap(_codeErr, "Error serializing 'code' field") + } if popErr := writeBuffer.PopContext("BVLCResult"); popErr != nil { return errors.Wrap(popErr, "Error popping for BVLCResult") @@ -197,6 +202,7 @@ func (m *_BVLCResult) SerializeWithWriteBuffer(ctx context.Context, writeBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_BVLCResult) isBVLCResult() bool { return true } @@ -211,3 +217,6 @@ func (m *_BVLCResult) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BVLCResultCode.go b/plc4go/protocols/bacnetip/readwrite/model/BVLCResultCode.go index e3b0881b002..04bd00d86f2 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BVLCResultCode.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BVLCResultCode.go @@ -34,21 +34,21 @@ type IBVLCResultCode interface { utils.Serializable } -const ( - BVLCResultCode_SUCCESSFUL_COMPLETION BVLCResultCode = 0x0000 +const( + BVLCResultCode_SUCCESSFUL_COMPLETION BVLCResultCode = 0x0000 BVLCResultCode_WRITE_BROADCAST_DISTRIBUTION_TABLE_NAK BVLCResultCode = 0x0010 - BVLCResultCode_READ_BROADCAST_DISTRIBUTION_TABLE_NAK BVLCResultCode = 0x0020 - BVLCResultCode_REGISTER_FOREIGN_DEVICE_NAK BVLCResultCode = 0x0030 - BVLCResultCode_READ_FOREIGN_DEVICE_TABLE_NAK BVLCResultCode = 0x0040 - BVLCResultCode_DELETE_FOREIGN_DEVICE_TABLE_ENTRY_NAK BVLCResultCode = 0x0050 - BVLCResultCode_DISTRIBUTE_BROADCAST_TO_NETWORK_NAK BVLCResultCode = 0x0060 + BVLCResultCode_READ_BROADCAST_DISTRIBUTION_TABLE_NAK BVLCResultCode = 0x0020 + BVLCResultCode_REGISTER_FOREIGN_DEVICE_NAK BVLCResultCode = 0x0030 + BVLCResultCode_READ_FOREIGN_DEVICE_TABLE_NAK BVLCResultCode = 0x0040 + BVLCResultCode_DELETE_FOREIGN_DEVICE_TABLE_ENTRY_NAK BVLCResultCode = 0x0050 + BVLCResultCode_DISTRIBUTE_BROADCAST_TO_NETWORK_NAK BVLCResultCode = 0x0060 ) var BVLCResultCodeValues []BVLCResultCode func init() { _ = errors.New - BVLCResultCodeValues = []BVLCResultCode{ + BVLCResultCodeValues = []BVLCResultCode { BVLCResultCode_SUCCESSFUL_COMPLETION, BVLCResultCode_WRITE_BROADCAST_DISTRIBUTION_TABLE_NAK, BVLCResultCode_READ_BROADCAST_DISTRIBUTION_TABLE_NAK, @@ -61,20 +61,20 @@ func init() { func BVLCResultCodeByValue(value uint16) (enum BVLCResultCode, ok bool) { switch value { - case 0x0000: - return BVLCResultCode_SUCCESSFUL_COMPLETION, true - case 0x0010: - return BVLCResultCode_WRITE_BROADCAST_DISTRIBUTION_TABLE_NAK, true - case 0x0020: - return BVLCResultCode_READ_BROADCAST_DISTRIBUTION_TABLE_NAK, true - case 0x0030: - return BVLCResultCode_REGISTER_FOREIGN_DEVICE_NAK, true - case 0x0040: - return BVLCResultCode_READ_FOREIGN_DEVICE_TABLE_NAK, true - case 0x0050: - return BVLCResultCode_DELETE_FOREIGN_DEVICE_TABLE_ENTRY_NAK, true - case 0x0060: - return BVLCResultCode_DISTRIBUTE_BROADCAST_TO_NETWORK_NAK, true + case 0x0000: + return BVLCResultCode_SUCCESSFUL_COMPLETION, true + case 0x0010: + return BVLCResultCode_WRITE_BROADCAST_DISTRIBUTION_TABLE_NAK, true + case 0x0020: + return BVLCResultCode_READ_BROADCAST_DISTRIBUTION_TABLE_NAK, true + case 0x0030: + return BVLCResultCode_REGISTER_FOREIGN_DEVICE_NAK, true + case 0x0040: + return BVLCResultCode_READ_FOREIGN_DEVICE_TABLE_NAK, true + case 0x0050: + return BVLCResultCode_DELETE_FOREIGN_DEVICE_TABLE_ENTRY_NAK, true + case 0x0060: + return BVLCResultCode_DISTRIBUTE_BROADCAST_TO_NETWORK_NAK, true } return 0, false } @@ -99,13 +99,13 @@ func BVLCResultCodeByName(value string) (enum BVLCResultCode, ok bool) { return 0, false } -func BVLCResultCodeKnows(value uint16) bool { +func BVLCResultCodeKnows(value uint16) bool { for _, typeValue := range BVLCResultCodeValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastBVLCResultCode(structType interface{}) BVLCResultCode { @@ -179,3 +179,4 @@ func (e BVLCResultCode) PLC4XEnumName() string { func (e BVLCResultCode) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BVLCResultCodeTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BVLCResultCodeTagged.go index 1db9ceea789..17bf400335c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BVLCResultCodeTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BVLCResultCodeTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BVLCResultCodeTagged is the corresponding interface of BVLCResultCodeTagged type BVLCResultCodeTagged interface { @@ -46,14 +48,15 @@ type BVLCResultCodeTaggedExactly interface { // _BVLCResultCodeTagged is the data-structure of this message type _BVLCResultCodeTagged struct { - Header BACnetTagHeader - Value BVLCResultCode + Header BACnetTagHeader + Value BVLCResultCode // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_BVLCResultCodeTagged) GetValue() BVLCResultCode { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBVLCResultCodeTagged factory function for _BVLCResultCodeTagged -func NewBVLCResultCodeTagged(header BACnetTagHeader, value BVLCResultCode, tagNumber uint8, tagClass TagClass) *_BVLCResultCodeTagged { - return &_BVLCResultCodeTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewBVLCResultCodeTagged( header BACnetTagHeader , value BVLCResultCode , tagNumber uint8 , tagClass TagClass ) *_BVLCResultCodeTagged { +return &_BVLCResultCodeTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastBVLCResultCodeTagged(structType interface{}) BVLCResultCodeTagged { - if casted, ok := structType.(BVLCResultCodeTagged); ok { + if casted, ok := structType.(BVLCResultCodeTagged); ok { return casted } if casted, ok := structType.(*BVLCResultCodeTagged); ok { @@ -104,6 +108,7 @@ func (m *_BVLCResultCodeTagged) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BVLCResultCodeTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func BVLCResultCodeTaggedParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of BVLCResultCodeTagged") } @@ -135,12 +140,12 @@ func BVLCResultCodeTaggedParseWithBuffer(ctx context.Context, readBuffer utils.R } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func BVLCResultCodeTaggedParseWithBuffer(ctx context.Context, readBuffer utils.R } var value BVLCResultCode if _value != nil { - value = _value.(BVLCResultCode) + value = _value.(BVLCResultCode) } if closeErr := readBuffer.CloseContext("BVLCResultCodeTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func BVLCResultCodeTaggedParseWithBuffer(ctx context.Context, readBuffer utils.R // Create the instance return &_BVLCResultCodeTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_BVLCResultCodeTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_BVLCResultCodeTagged) Serialize() ([]byte, error) { func (m *_BVLCResultCodeTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BVLCResultCodeTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BVLCResultCodeTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BVLCResultCodeTagged") } @@ -206,6 +211,7 @@ func (m *_BVLCResultCodeTagged) SerializeWithWriteBuffer(ctx context.Context, wr return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_BVLCResultCodeTagged) GetTagNumber() uint8 { func (m *_BVLCResultCodeTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_BVLCResultCodeTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BVLCSecureBVLL.go b/plc4go/protocols/bacnetip/readwrite/model/BVLCSecureBVLL.go index 0b5f9b5d85e..1b9fc816bdf 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BVLCSecureBVLL.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BVLCSecureBVLL.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BVLCSecureBVLL is the corresponding interface of BVLCSecureBVLL type BVLCSecureBVLL interface { @@ -47,32 +49,32 @@ type BVLCSecureBVLLExactly interface { // _BVLCSecureBVLL is the data-structure of this message type _BVLCSecureBVLL struct { *_BVLC - SecurityWrapper []byte + SecurityWrapper []byte // Arguments. BvlcPayloadLength uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BVLCSecureBVLL) GetBvlcFunction() uint8 { - return 0x0C -} +func (m *_BVLCSecureBVLL) GetBvlcFunction() uint8 { +return 0x0C} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BVLCSecureBVLL) InitializeParent(parent BVLC) {} +func (m *_BVLCSecureBVLL) InitializeParent(parent BVLC ) {} -func (m *_BVLCSecureBVLL) GetParent() BVLC { +func (m *_BVLCSecureBVLL) GetParent() BVLC { return m._BVLC } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -87,11 +89,12 @@ func (m *_BVLCSecureBVLL) GetSecurityWrapper() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBVLCSecureBVLL factory function for _BVLCSecureBVLL -func NewBVLCSecureBVLL(securityWrapper []byte, bvlcPayloadLength uint16) *_BVLCSecureBVLL { +func NewBVLCSecureBVLL( securityWrapper []byte , bvlcPayloadLength uint16 ) *_BVLCSecureBVLL { _result := &_BVLCSecureBVLL{ SecurityWrapper: securityWrapper, - _BVLC: NewBVLC(), + _BVLC: NewBVLC(), } _result._BVLC._BVLCChildRequirements = _result return _result @@ -99,7 +102,7 @@ func NewBVLCSecureBVLL(securityWrapper []byte, bvlcPayloadLength uint16) *_BVLCS // Deprecated: use the interface for direct cast func CastBVLCSecureBVLL(structType interface{}) BVLCSecureBVLL { - if casted, ok := structType.(BVLCSecureBVLL); ok { + if casted, ok := structType.(BVLCSecureBVLL); ok { return casted } if casted, ok := structType.(*BVLCSecureBVLL); ok { @@ -123,6 +126,7 @@ func (m *_BVLCSecureBVLL) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BVLCSecureBVLL) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -152,7 +156,8 @@ func BVLCSecureBVLLParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf // Create a partially initialized instance _child := &_BVLCSecureBVLL{ - _BVLC: &_BVLC{}, + _BVLC: &_BVLC{ + }, SecurityWrapper: securityWrapper, } _child._BVLC._BVLCChildRequirements = _child @@ -175,11 +180,11 @@ func (m *_BVLCSecureBVLL) SerializeWithWriteBuffer(ctx context.Context, writeBuf return errors.Wrap(pushErr, "Error pushing for BVLCSecureBVLL") } - // Array Field (securityWrapper) - // Byte Array field (securityWrapper) - if err := writeBuffer.WriteByteArray("securityWrapper", m.GetSecurityWrapper()); err != nil { - return errors.Wrap(err, "Error serializing 'securityWrapper' field") - } + // Array Field (securityWrapper) + // Byte Array field (securityWrapper) + if err := writeBuffer.WriteByteArray("securityWrapper", m.GetSecurityWrapper()); err != nil { + return errors.Wrap(err, "Error serializing 'securityWrapper' field") + } if popErr := writeBuffer.PopContext("BVLCSecureBVLL"); popErr != nil { return errors.Wrap(popErr, "Error popping for BVLCSecureBVLL") @@ -189,13 +194,13 @@ func (m *_BVLCSecureBVLL) SerializeWithWriteBuffer(ctx context.Context, writeBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + //// // Arguments Getter func (m *_BVLCSecureBVLL) GetBvlcPayloadLength() uint16 { return m.BvlcPayloadLength } - // //// @@ -213,3 +218,6 @@ func (m *_BVLCSecureBVLL) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BVLCWriteBroadcastDistributionTable.go b/plc4go/protocols/bacnetip/readwrite/model/BVLCWriteBroadcastDistributionTable.go index d6e44a444b2..e96c7d95282 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BVLCWriteBroadcastDistributionTable.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BVLCWriteBroadcastDistributionTable.go @@ -19,15 +19,17 @@ package model + import ( "context" "encoding/binary" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BVLCWriteBroadcastDistributionTable is the corresponding interface of BVLCWriteBroadcastDistributionTable type BVLCWriteBroadcastDistributionTable interface { @@ -48,32 +50,32 @@ type BVLCWriteBroadcastDistributionTableExactly interface { // _BVLCWriteBroadcastDistributionTable is the data-structure of this message type _BVLCWriteBroadcastDistributionTable struct { *_BVLC - Table []BVLCBroadcastDistributionTableEntry + Table []BVLCBroadcastDistributionTableEntry // Arguments. BvlcPayloadLength uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_BVLCWriteBroadcastDistributionTable) GetBvlcFunction() uint8 { - return 0x01 -} +func (m *_BVLCWriteBroadcastDistributionTable) GetBvlcFunction() uint8 { +return 0x01} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_BVLCWriteBroadcastDistributionTable) InitializeParent(parent BVLC) {} +func (m *_BVLCWriteBroadcastDistributionTable) InitializeParent(parent BVLC ) {} -func (m *_BVLCWriteBroadcastDistributionTable) GetParent() BVLC { +func (m *_BVLCWriteBroadcastDistributionTable) GetParent() BVLC { return m._BVLC } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -88,11 +90,12 @@ func (m *_BVLCWriteBroadcastDistributionTable) GetTable() []BVLCBroadcastDistrib /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBVLCWriteBroadcastDistributionTable factory function for _BVLCWriteBroadcastDistributionTable -func NewBVLCWriteBroadcastDistributionTable(table []BVLCBroadcastDistributionTableEntry, bvlcPayloadLength uint16) *_BVLCWriteBroadcastDistributionTable { +func NewBVLCWriteBroadcastDistributionTable( table []BVLCBroadcastDistributionTableEntry , bvlcPayloadLength uint16 ) *_BVLCWriteBroadcastDistributionTable { _result := &_BVLCWriteBroadcastDistributionTable{ Table: table, - _BVLC: NewBVLC(), + _BVLC: NewBVLC(), } _result._BVLC._BVLCChildRequirements = _result return _result @@ -100,7 +103,7 @@ func NewBVLCWriteBroadcastDistributionTable(table []BVLCBroadcastDistributionTab // Deprecated: use the interface for direct cast func CastBVLCWriteBroadcastDistributionTable(structType interface{}) BVLCWriteBroadcastDistributionTable { - if casted, ok := structType.(BVLCWriteBroadcastDistributionTable); ok { + if casted, ok := structType.(BVLCWriteBroadcastDistributionTable); ok { return casted } if casted, ok := structType.(*BVLCWriteBroadcastDistributionTable); ok { @@ -126,6 +129,7 @@ func (m *_BVLCWriteBroadcastDistributionTable) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_BVLCWriteBroadcastDistributionTable) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -152,8 +156,8 @@ func BVLCWriteBroadcastDistributionTableParseWithBuffer(ctx context.Context, rea { _tableLength := bvlcPayloadLength _tableEndPos := positionAware.GetPos() + uint16(_tableLength) - for positionAware.GetPos() < _tableEndPos { - _item, _err := BVLCBroadcastDistributionTableEntryParseWithBuffer(ctx, readBuffer) + for ;positionAware.GetPos() < _tableEndPos; { +_item, _err := BVLCBroadcastDistributionTableEntryParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'table' field of BVLCWriteBroadcastDistributionTable") } @@ -170,7 +174,8 @@ func BVLCWriteBroadcastDistributionTableParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_BVLCWriteBroadcastDistributionTable{ - _BVLC: &_BVLC{}, + _BVLC: &_BVLC{ + }, Table: table, } _child._BVLC._BVLCChildRequirements = _child @@ -193,22 +198,22 @@ func (m *_BVLCWriteBroadcastDistributionTable) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for BVLCWriteBroadcastDistributionTable") } - // Array Field (table) - if pushErr := writeBuffer.PushContext("table", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for table") - } - for _curItem, _element := range m.GetTable() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetTable()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'table' field") - } - } - if popErr := writeBuffer.PopContext("table", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for table") + // Array Field (table) + if pushErr := writeBuffer.PushContext("table", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for table") + } + for _curItem, _element := range m.GetTable() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetTable()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'table' field") } + } + if popErr := writeBuffer.PopContext("table", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for table") + } if popErr := writeBuffer.PopContext("BVLCWriteBroadcastDistributionTable"); popErr != nil { return errors.Wrap(popErr, "Error popping for BVLCWriteBroadcastDistributionTable") @@ -218,13 +223,13 @@ func (m *_BVLCWriteBroadcastDistributionTable) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + //// // Arguments Getter func (m *_BVLCWriteBroadcastDistributionTable) GetBvlcPayloadLength() uint16 { return m.BvlcPayloadLength } - // //// @@ -242,3 +247,6 @@ func (m *_BVLCWriteBroadcastDistributionTable) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/BacnetConstants.go b/plc4go/protocols/bacnetip/readwrite/model/BacnetConstants.go index aff1c40ab83..0b85491943e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/BacnetConstants.go +++ b/plc4go/protocols/bacnetip/readwrite/model/BacnetConstants.go @@ -19,6 +19,7 @@ package model + import ( "context" "fmt" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const BacnetConstants_BACNETUDPDEFAULTPORT uint16 = uint16(47808) @@ -48,6 +50,7 @@ type BacnetConstantsExactly interface { type _BacnetConstants struct { } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for const fields. @@ -62,14 +65,15 @@ func (m *_BacnetConstants) GetBacnetUdpDefaultPort() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBacnetConstants factory function for _BacnetConstants -func NewBacnetConstants() *_BacnetConstants { - return &_BacnetConstants{} +func NewBacnetConstants( ) *_BacnetConstants { +return &_BacnetConstants{ } } // Deprecated: use the interface for direct cast func CastBacnetConstants(structType interface{}) BacnetConstants { - if casted, ok := structType.(BacnetConstants); ok { + if casted, ok := structType.(BacnetConstants); ok { return casted } if casted, ok := structType.(*BacnetConstants); ok { @@ -91,6 +95,7 @@ func (m *_BacnetConstants) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_BacnetConstants) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +127,8 @@ func BacnetConstantsParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu } // Create the instance - return &_BacnetConstants{}, nil + return &_BacnetConstants{ + }, nil } func (m *_BacnetConstants) Serialize() ([]byte, error) { @@ -136,7 +142,7 @@ func (m *_BacnetConstants) Serialize() ([]byte, error) { func (m *_BacnetConstants) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BacnetConstants"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BacnetConstants"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BacnetConstants") } @@ -152,6 +158,7 @@ func (m *_BacnetConstants) SerializeWithWriteBuffer(ctx context.Context, writeBu return nil } + func (m *_BacnetConstants) isBacnetConstants() bool { return true } @@ -166,3 +173,6 @@ func (m *_BacnetConstants) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/ChangeListAddError.go b/plc4go/protocols/bacnetip/readwrite/model/ChangeListAddError.go index 777e432f34d..62309be62de 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/ChangeListAddError.go +++ b/plc4go/protocols/bacnetip/readwrite/model/ChangeListAddError.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ChangeListAddError is the corresponding interface of ChangeListAddError type ChangeListAddError interface { @@ -48,30 +50,30 @@ type ChangeListAddErrorExactly interface { // _ChangeListAddError is the data-structure of this message type _ChangeListAddError struct { *_BACnetError - ErrorType ErrorEnclosed - FirstFailedElementNumber BACnetContextTagUnsignedInteger + ErrorType ErrorEnclosed + FirstFailedElementNumber BACnetContextTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ChangeListAddError) GetErrorChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_ADD_LIST_ELEMENT -} +func (m *_ChangeListAddError) GetErrorChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_ADD_LIST_ELEMENT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ChangeListAddError) InitializeParent(parent BACnetError) {} +func (m *_ChangeListAddError) InitializeParent(parent BACnetError ) {} -func (m *_ChangeListAddError) GetParent() BACnetError { +func (m *_ChangeListAddError) GetParent() BACnetError { return m._BACnetError } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_ChangeListAddError) GetFirstFailedElementNumber() BACnetContextTagUnsi /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewChangeListAddError factory function for _ChangeListAddError -func NewChangeListAddError(errorType ErrorEnclosed, firstFailedElementNumber BACnetContextTagUnsignedInteger) *_ChangeListAddError { +func NewChangeListAddError( errorType ErrorEnclosed , firstFailedElementNumber BACnetContextTagUnsignedInteger ) *_ChangeListAddError { _result := &_ChangeListAddError{ - ErrorType: errorType, + ErrorType: errorType, FirstFailedElementNumber: firstFailedElementNumber, - _BACnetError: NewBACnetError(), + _BACnetError: NewBACnetError(), } _result._BACnetError._BACnetErrorChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewChangeListAddError(errorType ErrorEnclosed, firstFailedElementNumber BAC // Deprecated: use the interface for direct cast func CastChangeListAddError(structType interface{}) ChangeListAddError { - if casted, ok := structType.(ChangeListAddError); ok { + if casted, ok := structType.(ChangeListAddError); ok { return casted } if casted, ok := structType.(*ChangeListAddError); ok { @@ -128,6 +131,7 @@ func (m *_ChangeListAddError) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_ChangeListAddError) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -149,7 +153,7 @@ func ChangeListAddErrorParseWithBuffer(ctx context.Context, readBuffer utils.Rea if pullErr := readBuffer.PullContext("errorType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for errorType") } - _errorType, _errorTypeErr := ErrorEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_errorType, _errorTypeErr := ErrorEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _errorTypeErr != nil { return nil, errors.Wrap(_errorTypeErr, "Error parsing 'errorType' field of ChangeListAddError") } @@ -162,7 +166,7 @@ func ChangeListAddErrorParseWithBuffer(ctx context.Context, readBuffer utils.Rea if pullErr := readBuffer.PullContext("firstFailedElementNumber"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for firstFailedElementNumber") } - _firstFailedElementNumber, _firstFailedElementNumberErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_firstFailedElementNumber, _firstFailedElementNumberErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _firstFailedElementNumberErr != nil { return nil, errors.Wrap(_firstFailedElementNumberErr, "Error parsing 'firstFailedElementNumber' field of ChangeListAddError") } @@ -177,8 +181,9 @@ func ChangeListAddErrorParseWithBuffer(ctx context.Context, readBuffer utils.Rea // Create a partially initialized instance _child := &_ChangeListAddError{ - _BACnetError: &_BACnetError{}, - ErrorType: errorType, + _BACnetError: &_BACnetError{ + }, + ErrorType: errorType, FirstFailedElementNumber: firstFailedElementNumber, } _child._BACnetError._BACnetErrorChildRequirements = _child @@ -201,29 +206,29 @@ func (m *_ChangeListAddError) SerializeWithWriteBuffer(ctx context.Context, writ return errors.Wrap(pushErr, "Error pushing for ChangeListAddError") } - // Simple Field (errorType) - if pushErr := writeBuffer.PushContext("errorType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for errorType") - } - _errorTypeErr := writeBuffer.WriteSerializable(ctx, m.GetErrorType()) - if popErr := writeBuffer.PopContext("errorType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for errorType") - } - if _errorTypeErr != nil { - return errors.Wrap(_errorTypeErr, "Error serializing 'errorType' field") - } + // Simple Field (errorType) + if pushErr := writeBuffer.PushContext("errorType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for errorType") + } + _errorTypeErr := writeBuffer.WriteSerializable(ctx, m.GetErrorType()) + if popErr := writeBuffer.PopContext("errorType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for errorType") + } + if _errorTypeErr != nil { + return errors.Wrap(_errorTypeErr, "Error serializing 'errorType' field") + } - // Simple Field (firstFailedElementNumber) - if pushErr := writeBuffer.PushContext("firstFailedElementNumber"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for firstFailedElementNumber") - } - _firstFailedElementNumberErr := writeBuffer.WriteSerializable(ctx, m.GetFirstFailedElementNumber()) - if popErr := writeBuffer.PopContext("firstFailedElementNumber"); popErr != nil { - return errors.Wrap(popErr, "Error popping for firstFailedElementNumber") - } - if _firstFailedElementNumberErr != nil { - return errors.Wrap(_firstFailedElementNumberErr, "Error serializing 'firstFailedElementNumber' field") - } + // Simple Field (firstFailedElementNumber) + if pushErr := writeBuffer.PushContext("firstFailedElementNumber"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for firstFailedElementNumber") + } + _firstFailedElementNumberErr := writeBuffer.WriteSerializable(ctx, m.GetFirstFailedElementNumber()) + if popErr := writeBuffer.PopContext("firstFailedElementNumber"); popErr != nil { + return errors.Wrap(popErr, "Error popping for firstFailedElementNumber") + } + if _firstFailedElementNumberErr != nil { + return errors.Wrap(_firstFailedElementNumberErr, "Error serializing 'firstFailedElementNumber' field") + } if popErr := writeBuffer.PopContext("ChangeListAddError"); popErr != nil { return errors.Wrap(popErr, "Error popping for ChangeListAddError") @@ -233,6 +238,7 @@ func (m *_ChangeListAddError) SerializeWithWriteBuffer(ctx context.Context, writ return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ChangeListAddError) isChangeListAddError() bool { return true } @@ -247,3 +253,6 @@ func (m *_ChangeListAddError) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/ChangeListRemoveError.go b/plc4go/protocols/bacnetip/readwrite/model/ChangeListRemoveError.go index 1fd3b50dc45..9c6921590bf 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/ChangeListRemoveError.go +++ b/plc4go/protocols/bacnetip/readwrite/model/ChangeListRemoveError.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ChangeListRemoveError is the corresponding interface of ChangeListRemoveError type ChangeListRemoveError interface { @@ -48,30 +50,30 @@ type ChangeListRemoveErrorExactly interface { // _ChangeListRemoveError is the data-structure of this message type _ChangeListRemoveError struct { *_BACnetError - ErrorType ErrorEnclosed - FirstFailedElementNumber BACnetContextTagUnsignedInteger + ErrorType ErrorEnclosed + FirstFailedElementNumber BACnetContextTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ChangeListRemoveError) GetErrorChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_REMOVE_LIST_ELEMENT -} +func (m *_ChangeListRemoveError) GetErrorChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_REMOVE_LIST_ELEMENT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ChangeListRemoveError) InitializeParent(parent BACnetError) {} +func (m *_ChangeListRemoveError) InitializeParent(parent BACnetError ) {} -func (m *_ChangeListRemoveError) GetParent() BACnetError { +func (m *_ChangeListRemoveError) GetParent() BACnetError { return m._BACnetError } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_ChangeListRemoveError) GetFirstFailedElementNumber() BACnetContextTagU /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewChangeListRemoveError factory function for _ChangeListRemoveError -func NewChangeListRemoveError(errorType ErrorEnclosed, firstFailedElementNumber BACnetContextTagUnsignedInteger) *_ChangeListRemoveError { +func NewChangeListRemoveError( errorType ErrorEnclosed , firstFailedElementNumber BACnetContextTagUnsignedInteger ) *_ChangeListRemoveError { _result := &_ChangeListRemoveError{ - ErrorType: errorType, + ErrorType: errorType, FirstFailedElementNumber: firstFailedElementNumber, - _BACnetError: NewBACnetError(), + _BACnetError: NewBACnetError(), } _result._BACnetError._BACnetErrorChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewChangeListRemoveError(errorType ErrorEnclosed, firstFailedElementNumber // Deprecated: use the interface for direct cast func CastChangeListRemoveError(structType interface{}) ChangeListRemoveError { - if casted, ok := structType.(ChangeListRemoveError); ok { + if casted, ok := structType.(ChangeListRemoveError); ok { return casted } if casted, ok := structType.(*ChangeListRemoveError); ok { @@ -128,6 +131,7 @@ func (m *_ChangeListRemoveError) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_ChangeListRemoveError) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -149,7 +153,7 @@ func ChangeListRemoveErrorParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("errorType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for errorType") } - _errorType, _errorTypeErr := ErrorEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_errorType, _errorTypeErr := ErrorEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _errorTypeErr != nil { return nil, errors.Wrap(_errorTypeErr, "Error parsing 'errorType' field of ChangeListRemoveError") } @@ -162,7 +166,7 @@ func ChangeListRemoveErrorParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("firstFailedElementNumber"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for firstFailedElementNumber") } - _firstFailedElementNumber, _firstFailedElementNumberErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_firstFailedElementNumber, _firstFailedElementNumberErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _firstFailedElementNumberErr != nil { return nil, errors.Wrap(_firstFailedElementNumberErr, "Error parsing 'firstFailedElementNumber' field of ChangeListRemoveError") } @@ -177,8 +181,9 @@ func ChangeListRemoveErrorParseWithBuffer(ctx context.Context, readBuffer utils. // Create a partially initialized instance _child := &_ChangeListRemoveError{ - _BACnetError: &_BACnetError{}, - ErrorType: errorType, + _BACnetError: &_BACnetError{ + }, + ErrorType: errorType, FirstFailedElementNumber: firstFailedElementNumber, } _child._BACnetError._BACnetErrorChildRequirements = _child @@ -201,29 +206,29 @@ func (m *_ChangeListRemoveError) SerializeWithWriteBuffer(ctx context.Context, w return errors.Wrap(pushErr, "Error pushing for ChangeListRemoveError") } - // Simple Field (errorType) - if pushErr := writeBuffer.PushContext("errorType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for errorType") - } - _errorTypeErr := writeBuffer.WriteSerializable(ctx, m.GetErrorType()) - if popErr := writeBuffer.PopContext("errorType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for errorType") - } - if _errorTypeErr != nil { - return errors.Wrap(_errorTypeErr, "Error serializing 'errorType' field") - } + // Simple Field (errorType) + if pushErr := writeBuffer.PushContext("errorType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for errorType") + } + _errorTypeErr := writeBuffer.WriteSerializable(ctx, m.GetErrorType()) + if popErr := writeBuffer.PopContext("errorType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for errorType") + } + if _errorTypeErr != nil { + return errors.Wrap(_errorTypeErr, "Error serializing 'errorType' field") + } - // Simple Field (firstFailedElementNumber) - if pushErr := writeBuffer.PushContext("firstFailedElementNumber"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for firstFailedElementNumber") - } - _firstFailedElementNumberErr := writeBuffer.WriteSerializable(ctx, m.GetFirstFailedElementNumber()) - if popErr := writeBuffer.PopContext("firstFailedElementNumber"); popErr != nil { - return errors.Wrap(popErr, "Error popping for firstFailedElementNumber") - } - if _firstFailedElementNumberErr != nil { - return errors.Wrap(_firstFailedElementNumberErr, "Error serializing 'firstFailedElementNumber' field") - } + // Simple Field (firstFailedElementNumber) + if pushErr := writeBuffer.PushContext("firstFailedElementNumber"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for firstFailedElementNumber") + } + _firstFailedElementNumberErr := writeBuffer.WriteSerializable(ctx, m.GetFirstFailedElementNumber()) + if popErr := writeBuffer.PopContext("firstFailedElementNumber"); popErr != nil { + return errors.Wrap(popErr, "Error popping for firstFailedElementNumber") + } + if _firstFailedElementNumberErr != nil { + return errors.Wrap(_firstFailedElementNumberErr, "Error serializing 'firstFailedElementNumber' field") + } if popErr := writeBuffer.PopContext("ChangeListRemoveError"); popErr != nil { return errors.Wrap(popErr, "Error popping for ChangeListRemoveError") @@ -233,6 +238,7 @@ func (m *_ChangeListRemoveError) SerializeWithWriteBuffer(ctx context.Context, w return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ChangeListRemoveError) isChangeListRemoveError() bool { return true } @@ -247,3 +253,6 @@ func (m *_ChangeListRemoveError) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/ConfirmedEventNotificationRequest.go b/plc4go/protocols/bacnetip/readwrite/model/ConfirmedEventNotificationRequest.go index c4aedffdfd2..7aef332c9fa 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/ConfirmedEventNotificationRequest.go +++ b/plc4go/protocols/bacnetip/readwrite/model/ConfirmedEventNotificationRequest.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ConfirmedEventNotificationRequest is the corresponding interface of ConfirmedEventNotificationRequest type ConfirmedEventNotificationRequest interface { @@ -69,21 +71,22 @@ type ConfirmedEventNotificationRequestExactly interface { // _ConfirmedEventNotificationRequest is the data-structure of this message type _ConfirmedEventNotificationRequest struct { - ProcessIdentifier BACnetContextTagUnsignedInteger - InitiatingDeviceIdentifier BACnetContextTagObjectIdentifier - EventObjectIdentifier BACnetContextTagObjectIdentifier - Timestamp BACnetTimeStampEnclosed - NotificationClass BACnetContextTagUnsignedInteger - Priority BACnetContextTagUnsignedInteger - EventType BACnetEventTypeTagged - MessageText BACnetContextTagCharacterString - NotifyType BACnetNotifyTypeTagged - AckRequired BACnetContextTagBoolean - FromState BACnetEventStateTagged - ToState BACnetEventStateTagged - EventValues BACnetNotificationParameters + ProcessIdentifier BACnetContextTagUnsignedInteger + InitiatingDeviceIdentifier BACnetContextTagObjectIdentifier + EventObjectIdentifier BACnetContextTagObjectIdentifier + Timestamp BACnetTimeStampEnclosed + NotificationClass BACnetContextTagUnsignedInteger + Priority BACnetContextTagUnsignedInteger + EventType BACnetEventTypeTagged + MessageText BACnetContextTagCharacterString + NotifyType BACnetNotifyTypeTagged + AckRequired BACnetContextTagBoolean + FromState BACnetEventStateTagged + ToState BACnetEventStateTagged + EventValues BACnetNotificationParameters } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -146,14 +149,15 @@ func (m *_ConfirmedEventNotificationRequest) GetEventValues() BACnetNotification /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewConfirmedEventNotificationRequest factory function for _ConfirmedEventNotificationRequest -func NewConfirmedEventNotificationRequest(processIdentifier BACnetContextTagUnsignedInteger, initiatingDeviceIdentifier BACnetContextTagObjectIdentifier, eventObjectIdentifier BACnetContextTagObjectIdentifier, timestamp BACnetTimeStampEnclosed, notificationClass BACnetContextTagUnsignedInteger, priority BACnetContextTagUnsignedInteger, eventType BACnetEventTypeTagged, messageText BACnetContextTagCharacterString, notifyType BACnetNotifyTypeTagged, ackRequired BACnetContextTagBoolean, fromState BACnetEventStateTagged, toState BACnetEventStateTagged, eventValues BACnetNotificationParameters) *_ConfirmedEventNotificationRequest { - return &_ConfirmedEventNotificationRequest{ProcessIdentifier: processIdentifier, InitiatingDeviceIdentifier: initiatingDeviceIdentifier, EventObjectIdentifier: eventObjectIdentifier, Timestamp: timestamp, NotificationClass: notificationClass, Priority: priority, EventType: eventType, MessageText: messageText, NotifyType: notifyType, AckRequired: ackRequired, FromState: fromState, ToState: toState, EventValues: eventValues} +func NewConfirmedEventNotificationRequest( processIdentifier BACnetContextTagUnsignedInteger , initiatingDeviceIdentifier BACnetContextTagObjectIdentifier , eventObjectIdentifier BACnetContextTagObjectIdentifier , timestamp BACnetTimeStampEnclosed , notificationClass BACnetContextTagUnsignedInteger , priority BACnetContextTagUnsignedInteger , eventType BACnetEventTypeTagged , messageText BACnetContextTagCharacterString , notifyType BACnetNotifyTypeTagged , ackRequired BACnetContextTagBoolean , fromState BACnetEventStateTagged , toState BACnetEventStateTagged , eventValues BACnetNotificationParameters ) *_ConfirmedEventNotificationRequest { +return &_ConfirmedEventNotificationRequest{ ProcessIdentifier: processIdentifier , InitiatingDeviceIdentifier: initiatingDeviceIdentifier , EventObjectIdentifier: eventObjectIdentifier , Timestamp: timestamp , NotificationClass: notificationClass , Priority: priority , EventType: eventType , MessageText: messageText , NotifyType: notifyType , AckRequired: ackRequired , FromState: fromState , ToState: toState , EventValues: eventValues } } // Deprecated: use the interface for direct cast func CastConfirmedEventNotificationRequest(structType interface{}) ConfirmedEventNotificationRequest { - if casted, ok := structType.(ConfirmedEventNotificationRequest); ok { + if casted, ok := structType.(ConfirmedEventNotificationRequest); ok { return casted } if casted, ok := structType.(*ConfirmedEventNotificationRequest); ok { @@ -219,6 +223,7 @@ func (m *_ConfirmedEventNotificationRequest) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_ConfirmedEventNotificationRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -240,7 +245,7 @@ func ConfirmedEventNotificationRequestParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("processIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for processIdentifier") } - _processIdentifier, _processIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_processIdentifier, _processIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _processIdentifierErr != nil { return nil, errors.Wrap(_processIdentifierErr, "Error parsing 'processIdentifier' field of ConfirmedEventNotificationRequest") } @@ -253,7 +258,7 @@ func ConfirmedEventNotificationRequestParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("initiatingDeviceIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for initiatingDeviceIdentifier") } - _initiatingDeviceIdentifier, _initiatingDeviceIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER)) +_initiatingDeviceIdentifier, _initiatingDeviceIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_BACNET_OBJECT_IDENTIFIER ) ) if _initiatingDeviceIdentifierErr != nil { return nil, errors.Wrap(_initiatingDeviceIdentifierErr, "Error parsing 'initiatingDeviceIdentifier' field of ConfirmedEventNotificationRequest") } @@ -266,7 +271,7 @@ func ConfirmedEventNotificationRequestParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("eventObjectIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for eventObjectIdentifier") } - _eventObjectIdentifier, _eventObjectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER)) +_eventObjectIdentifier, _eventObjectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , BACnetDataType( BACnetDataType_BACNET_OBJECT_IDENTIFIER ) ) if _eventObjectIdentifierErr != nil { return nil, errors.Wrap(_eventObjectIdentifierErr, "Error parsing 'eventObjectIdentifier' field of ConfirmedEventNotificationRequest") } @@ -279,7 +284,7 @@ func ConfirmedEventNotificationRequestParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("timestamp"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timestamp") } - _timestamp, _timestampErr := BACnetTimeStampEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(3))) +_timestamp, _timestampErr := BACnetTimeStampEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(3) ) ) if _timestampErr != nil { return nil, errors.Wrap(_timestampErr, "Error parsing 'timestamp' field of ConfirmedEventNotificationRequest") } @@ -292,7 +297,7 @@ func ConfirmedEventNotificationRequestParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("notificationClass"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for notificationClass") } - _notificationClass, _notificationClassErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(4)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_notificationClass, _notificationClassErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(4) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _notificationClassErr != nil { return nil, errors.Wrap(_notificationClassErr, "Error parsing 'notificationClass' field of ConfirmedEventNotificationRequest") } @@ -305,7 +310,7 @@ func ConfirmedEventNotificationRequestParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("priority"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for priority") } - _priority, _priorityErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(5)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_priority, _priorityErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(5) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _priorityErr != nil { return nil, errors.Wrap(_priorityErr, "Error parsing 'priority' field of ConfirmedEventNotificationRequest") } @@ -318,7 +323,7 @@ func ConfirmedEventNotificationRequestParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("eventType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for eventType") } - _eventType, _eventTypeErr := BACnetEventTypeTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(6)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_eventType, _eventTypeErr := BACnetEventTypeTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(6) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _eventTypeErr != nil { return nil, errors.Wrap(_eventTypeErr, "Error parsing 'eventType' field of ConfirmedEventNotificationRequest") } @@ -329,12 +334,12 @@ func ConfirmedEventNotificationRequestParseWithBuffer(ctx context.Context, readB // Optional Field (messageText) (Can be skipped, if a given expression evaluates to false) var messageText BACnetContextTagCharacterString = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("messageText"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for messageText") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(7), BACnetDataType_CHARACTER_STRING) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(7) , BACnetDataType_CHARACTER_STRING ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -353,7 +358,7 @@ func ConfirmedEventNotificationRequestParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("notifyType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for notifyType") } - _notifyType, _notifyTypeErr := BACnetNotifyTypeTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(8)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_notifyType, _notifyTypeErr := BACnetNotifyTypeTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(8) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _notifyTypeErr != nil { return nil, errors.Wrap(_notifyTypeErr, "Error parsing 'notifyType' field of ConfirmedEventNotificationRequest") } @@ -364,12 +369,12 @@ func ConfirmedEventNotificationRequestParseWithBuffer(ctx context.Context, readB // Optional Field (ackRequired) (Can be skipped, if a given expression evaluates to false) var ackRequired BACnetContextTagBoolean = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("ackRequired"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for ackRequired") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(9), BACnetDataType_BOOLEAN) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(9) , BACnetDataType_BOOLEAN ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -386,12 +391,12 @@ func ConfirmedEventNotificationRequestParseWithBuffer(ctx context.Context, readB // Optional Field (fromState) (Can be skipped, if a given expression evaluates to false) var fromState BACnetEventStateTagged = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("fromState"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for fromState") } - _val, _err := BACnetEventStateTaggedParseWithBuffer(ctx, readBuffer, uint8(10), TagClass_CONTEXT_SPECIFIC_TAGS) +_val, _err := BACnetEventStateTaggedParseWithBuffer(ctx, readBuffer , uint8(10) , TagClass_CONTEXT_SPECIFIC_TAGS ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -410,7 +415,7 @@ func ConfirmedEventNotificationRequestParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("toState"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for toState") } - _toState, _toStateErr := BACnetEventStateTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(11)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_toState, _toStateErr := BACnetEventStateTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(11) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _toStateErr != nil { return nil, errors.Wrap(_toStateErr, "Error parsing 'toState' field of ConfirmedEventNotificationRequest") } @@ -421,12 +426,12 @@ func ConfirmedEventNotificationRequestParseWithBuffer(ctx context.Context, readB // Optional Field (eventValues) (Can be skipped, if a given expression evaluates to false) var eventValues BACnetNotificationParameters = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("eventValues"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for eventValues") } - _val, _err := BACnetNotificationParametersParseWithBuffer(ctx, readBuffer, uint8(12), eventObjectIdentifier.GetObjectType()) +_val, _err := BACnetNotificationParametersParseWithBuffer(ctx, readBuffer , uint8(12) , eventObjectIdentifier.GetObjectType() ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -447,20 +452,20 @@ func ConfirmedEventNotificationRequestParseWithBuffer(ctx context.Context, readB // Create the instance return &_ConfirmedEventNotificationRequest{ - ProcessIdentifier: processIdentifier, - InitiatingDeviceIdentifier: initiatingDeviceIdentifier, - EventObjectIdentifier: eventObjectIdentifier, - Timestamp: timestamp, - NotificationClass: notificationClass, - Priority: priority, - EventType: eventType, - MessageText: messageText, - NotifyType: notifyType, - AckRequired: ackRequired, - FromState: fromState, - ToState: toState, - EventValues: eventValues, - }, nil + ProcessIdentifier: processIdentifier, + InitiatingDeviceIdentifier: initiatingDeviceIdentifier, + EventObjectIdentifier: eventObjectIdentifier, + Timestamp: timestamp, + NotificationClass: notificationClass, + Priority: priority, + EventType: eventType, + MessageText: messageText, + NotifyType: notifyType, + AckRequired: ackRequired, + FromState: fromState, + ToState: toState, + EventValues: eventValues, + }, nil } func (m *_ConfirmedEventNotificationRequest) Serialize() ([]byte, error) { @@ -474,7 +479,7 @@ func (m *_ConfirmedEventNotificationRequest) Serialize() ([]byte, error) { func (m *_ConfirmedEventNotificationRequest) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("ConfirmedEventNotificationRequest"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("ConfirmedEventNotificationRequest"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for ConfirmedEventNotificationRequest") } @@ -656,6 +661,7 @@ func (m *_ConfirmedEventNotificationRequest) SerializeWithWriteBuffer(ctx contex return nil } + func (m *_ConfirmedEventNotificationRequest) isConfirmedEventNotificationRequest() bool { return true } @@ -670,3 +676,6 @@ func (m *_ConfirmedEventNotificationRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/ConfirmedPrivateTransferError.go b/plc4go/protocols/bacnetip/readwrite/model/ConfirmedPrivateTransferError.go index 5132155e57d..1c8508fe7e3 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/ConfirmedPrivateTransferError.go +++ b/plc4go/protocols/bacnetip/readwrite/model/ConfirmedPrivateTransferError.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ConfirmedPrivateTransferError is the corresponding interface of ConfirmedPrivateTransferError type ConfirmedPrivateTransferError interface { @@ -53,32 +55,32 @@ type ConfirmedPrivateTransferErrorExactly interface { // _ConfirmedPrivateTransferError is the data-structure of this message type _ConfirmedPrivateTransferError struct { *_BACnetError - ErrorType ErrorEnclosed - VendorId BACnetVendorIdTagged - ServiceNumber BACnetContextTagUnsignedInteger - ErrorParameters BACnetConstructedData + ErrorType ErrorEnclosed + VendorId BACnetVendorIdTagged + ServiceNumber BACnetContextTagUnsignedInteger + ErrorParameters BACnetConstructedData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ConfirmedPrivateTransferError) GetErrorChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_CONFIRMED_PRIVATE_TRANSFER -} +func (m *_ConfirmedPrivateTransferError) GetErrorChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_CONFIRMED_PRIVATE_TRANSFER} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ConfirmedPrivateTransferError) InitializeParent(parent BACnetError) {} +func (m *_ConfirmedPrivateTransferError) InitializeParent(parent BACnetError ) {} -func (m *_ConfirmedPrivateTransferError) GetParent() BACnetError { +func (m *_ConfirmedPrivateTransferError) GetParent() BACnetError { return m._BACnetError } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -105,14 +107,15 @@ func (m *_ConfirmedPrivateTransferError) GetErrorParameters() BACnetConstructedD /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewConfirmedPrivateTransferError factory function for _ConfirmedPrivateTransferError -func NewConfirmedPrivateTransferError(errorType ErrorEnclosed, vendorId BACnetVendorIdTagged, serviceNumber BACnetContextTagUnsignedInteger, errorParameters BACnetConstructedData) *_ConfirmedPrivateTransferError { +func NewConfirmedPrivateTransferError( errorType ErrorEnclosed , vendorId BACnetVendorIdTagged , serviceNumber BACnetContextTagUnsignedInteger , errorParameters BACnetConstructedData ) *_ConfirmedPrivateTransferError { _result := &_ConfirmedPrivateTransferError{ - ErrorType: errorType, - VendorId: vendorId, - ServiceNumber: serviceNumber, + ErrorType: errorType, + VendorId: vendorId, + ServiceNumber: serviceNumber, ErrorParameters: errorParameters, - _BACnetError: NewBACnetError(), + _BACnetError: NewBACnetError(), } _result._BACnetError._BACnetErrorChildRequirements = _result return _result @@ -120,7 +123,7 @@ func NewConfirmedPrivateTransferError(errorType ErrorEnclosed, vendorId BACnetVe // Deprecated: use the interface for direct cast func CastConfirmedPrivateTransferError(structType interface{}) ConfirmedPrivateTransferError { - if casted, ok := structType.(ConfirmedPrivateTransferError); ok { + if casted, ok := structType.(ConfirmedPrivateTransferError); ok { return casted } if casted, ok := structType.(*ConfirmedPrivateTransferError); ok { @@ -153,6 +156,7 @@ func (m *_ConfirmedPrivateTransferError) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_ConfirmedPrivateTransferError) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -174,7 +178,7 @@ func ConfirmedPrivateTransferErrorParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("errorType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for errorType") } - _errorType, _errorTypeErr := ErrorEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_errorType, _errorTypeErr := ErrorEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _errorTypeErr != nil { return nil, errors.Wrap(_errorTypeErr, "Error parsing 'errorType' field of ConfirmedPrivateTransferError") } @@ -187,7 +191,7 @@ func ConfirmedPrivateTransferErrorParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("vendorId"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for vendorId") } - _vendorId, _vendorIdErr := BACnetVendorIdTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_vendorId, _vendorIdErr := BACnetVendorIdTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _vendorIdErr != nil { return nil, errors.Wrap(_vendorIdErr, "Error parsing 'vendorId' field of ConfirmedPrivateTransferError") } @@ -200,7 +204,7 @@ func ConfirmedPrivateTransferErrorParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("serviceNumber"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for serviceNumber") } - _serviceNumber, _serviceNumberErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_serviceNumber, _serviceNumberErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _serviceNumberErr != nil { return nil, errors.Wrap(_serviceNumberErr, "Error parsing 'serviceNumber' field of ConfirmedPrivateTransferError") } @@ -211,12 +215,12 @@ func ConfirmedPrivateTransferErrorParseWithBuffer(ctx context.Context, readBuffe // Optional Field (errorParameters) (Can be skipped, if a given expression evaluates to false) var errorParameters BACnetConstructedData = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("errorParameters"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for errorParameters") } - _val, _err := BACnetConstructedDataParseWithBuffer(ctx, readBuffer, uint8(3), BACnetObjectType_VENDOR_PROPRIETARY_VALUE, BACnetPropertyIdentifier_VENDOR_PROPRIETARY_VALUE, nil) +_val, _err := BACnetConstructedDataParseWithBuffer(ctx, readBuffer , uint8(3) , BACnetObjectType_VENDOR_PROPRIETARY_VALUE , BACnetPropertyIdentifier_VENDOR_PROPRIETARY_VALUE , nil ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -237,10 +241,11 @@ func ConfirmedPrivateTransferErrorParseWithBuffer(ctx context.Context, readBuffe // Create a partially initialized instance _child := &_ConfirmedPrivateTransferError{ - _BACnetError: &_BACnetError{}, - ErrorType: errorType, - VendorId: vendorId, - ServiceNumber: serviceNumber, + _BACnetError: &_BACnetError{ + }, + ErrorType: errorType, + VendorId: vendorId, + ServiceNumber: serviceNumber, ErrorParameters: errorParameters, } _child._BACnetError._BACnetErrorChildRequirements = _child @@ -263,57 +268,57 @@ func (m *_ConfirmedPrivateTransferError) SerializeWithWriteBuffer(ctx context.Co return errors.Wrap(pushErr, "Error pushing for ConfirmedPrivateTransferError") } - // Simple Field (errorType) - if pushErr := writeBuffer.PushContext("errorType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for errorType") - } - _errorTypeErr := writeBuffer.WriteSerializable(ctx, m.GetErrorType()) - if popErr := writeBuffer.PopContext("errorType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for errorType") - } - if _errorTypeErr != nil { - return errors.Wrap(_errorTypeErr, "Error serializing 'errorType' field") - } + // Simple Field (errorType) + if pushErr := writeBuffer.PushContext("errorType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for errorType") + } + _errorTypeErr := writeBuffer.WriteSerializable(ctx, m.GetErrorType()) + if popErr := writeBuffer.PopContext("errorType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for errorType") + } + if _errorTypeErr != nil { + return errors.Wrap(_errorTypeErr, "Error serializing 'errorType' field") + } - // Simple Field (vendorId) - if pushErr := writeBuffer.PushContext("vendorId"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for vendorId") - } - _vendorIdErr := writeBuffer.WriteSerializable(ctx, m.GetVendorId()) - if popErr := writeBuffer.PopContext("vendorId"); popErr != nil { - return errors.Wrap(popErr, "Error popping for vendorId") - } - if _vendorIdErr != nil { - return errors.Wrap(_vendorIdErr, "Error serializing 'vendorId' field") - } + // Simple Field (vendorId) + if pushErr := writeBuffer.PushContext("vendorId"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for vendorId") + } + _vendorIdErr := writeBuffer.WriteSerializable(ctx, m.GetVendorId()) + if popErr := writeBuffer.PopContext("vendorId"); popErr != nil { + return errors.Wrap(popErr, "Error popping for vendorId") + } + if _vendorIdErr != nil { + return errors.Wrap(_vendorIdErr, "Error serializing 'vendorId' field") + } - // Simple Field (serviceNumber) - if pushErr := writeBuffer.PushContext("serviceNumber"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for serviceNumber") - } - _serviceNumberErr := writeBuffer.WriteSerializable(ctx, m.GetServiceNumber()) - if popErr := writeBuffer.PopContext("serviceNumber"); popErr != nil { - return errors.Wrap(popErr, "Error popping for serviceNumber") + // Simple Field (serviceNumber) + if pushErr := writeBuffer.PushContext("serviceNumber"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for serviceNumber") + } + _serviceNumberErr := writeBuffer.WriteSerializable(ctx, m.GetServiceNumber()) + if popErr := writeBuffer.PopContext("serviceNumber"); popErr != nil { + return errors.Wrap(popErr, "Error popping for serviceNumber") + } + if _serviceNumberErr != nil { + return errors.Wrap(_serviceNumberErr, "Error serializing 'serviceNumber' field") + } + + // Optional Field (errorParameters) (Can be skipped, if the value is null) + var errorParameters BACnetConstructedData = nil + if m.GetErrorParameters() != nil { + if pushErr := writeBuffer.PushContext("errorParameters"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for errorParameters") } - if _serviceNumberErr != nil { - return errors.Wrap(_serviceNumberErr, "Error serializing 'serviceNumber' field") + errorParameters = m.GetErrorParameters() + _errorParametersErr := writeBuffer.WriteSerializable(ctx, errorParameters) + if popErr := writeBuffer.PopContext("errorParameters"); popErr != nil { + return errors.Wrap(popErr, "Error popping for errorParameters") } - - // Optional Field (errorParameters) (Can be skipped, if the value is null) - var errorParameters BACnetConstructedData = nil - if m.GetErrorParameters() != nil { - if pushErr := writeBuffer.PushContext("errorParameters"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for errorParameters") - } - errorParameters = m.GetErrorParameters() - _errorParametersErr := writeBuffer.WriteSerializable(ctx, errorParameters) - if popErr := writeBuffer.PopContext("errorParameters"); popErr != nil { - return errors.Wrap(popErr, "Error popping for errorParameters") - } - if _errorParametersErr != nil { - return errors.Wrap(_errorParametersErr, "Error serializing 'errorParameters' field") - } + if _errorParametersErr != nil { + return errors.Wrap(_errorParametersErr, "Error serializing 'errorParameters' field") } + } if popErr := writeBuffer.PopContext("ConfirmedPrivateTransferError"); popErr != nil { return errors.Wrap(popErr, "Error popping for ConfirmedPrivateTransferError") @@ -323,6 +328,7 @@ func (m *_ConfirmedPrivateTransferError) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ConfirmedPrivateTransferError) isConfirmedPrivateTransferError() bool { return true } @@ -337,3 +343,6 @@ func (m *_ConfirmedPrivateTransferError) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/CreateObjectError.go b/plc4go/protocols/bacnetip/readwrite/model/CreateObjectError.go index ec9623a64a1..449eccf1531 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/CreateObjectError.go +++ b/plc4go/protocols/bacnetip/readwrite/model/CreateObjectError.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CreateObjectError is the corresponding interface of CreateObjectError type CreateObjectError interface { @@ -48,30 +50,30 @@ type CreateObjectErrorExactly interface { // _CreateObjectError is the data-structure of this message type _CreateObjectError struct { *_BACnetError - ErrorType ErrorEnclosed - FirstFailedElementNumber BACnetContextTagUnsignedInteger + ErrorType ErrorEnclosed + FirstFailedElementNumber BACnetContextTagUnsignedInteger } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_CreateObjectError) GetErrorChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_CREATE_OBJECT -} +func (m *_CreateObjectError) GetErrorChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_CREATE_OBJECT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_CreateObjectError) InitializeParent(parent BACnetError) {} +func (m *_CreateObjectError) InitializeParent(parent BACnetError ) {} -func (m *_CreateObjectError) GetParent() BACnetError { +func (m *_CreateObjectError) GetParent() BACnetError { return m._BACnetError } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_CreateObjectError) GetFirstFailedElementNumber() BACnetContextTagUnsig /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCreateObjectError factory function for _CreateObjectError -func NewCreateObjectError(errorType ErrorEnclosed, firstFailedElementNumber BACnetContextTagUnsignedInteger) *_CreateObjectError { +func NewCreateObjectError( errorType ErrorEnclosed , firstFailedElementNumber BACnetContextTagUnsignedInteger ) *_CreateObjectError { _result := &_CreateObjectError{ - ErrorType: errorType, + ErrorType: errorType, FirstFailedElementNumber: firstFailedElementNumber, - _BACnetError: NewBACnetError(), + _BACnetError: NewBACnetError(), } _result._BACnetError._BACnetErrorChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewCreateObjectError(errorType ErrorEnclosed, firstFailedElementNumber BACn // Deprecated: use the interface for direct cast func CastCreateObjectError(structType interface{}) CreateObjectError { - if casted, ok := structType.(CreateObjectError); ok { + if casted, ok := structType.(CreateObjectError); ok { return casted } if casted, ok := structType.(*CreateObjectError); ok { @@ -128,6 +131,7 @@ func (m *_CreateObjectError) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_CreateObjectError) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -149,7 +153,7 @@ func CreateObjectErrorParseWithBuffer(ctx context.Context, readBuffer utils.Read if pullErr := readBuffer.PullContext("errorType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for errorType") } - _errorType, _errorTypeErr := ErrorEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_errorType, _errorTypeErr := ErrorEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _errorTypeErr != nil { return nil, errors.Wrap(_errorTypeErr, "Error parsing 'errorType' field of CreateObjectError") } @@ -162,7 +166,7 @@ func CreateObjectErrorParseWithBuffer(ctx context.Context, readBuffer utils.Read if pullErr := readBuffer.PullContext("firstFailedElementNumber"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for firstFailedElementNumber") } - _firstFailedElementNumber, _firstFailedElementNumberErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1)), BACnetDataType(BACnetDataType_UNSIGNED_INTEGER)) +_firstFailedElementNumber, _firstFailedElementNumberErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) , BACnetDataType( BACnetDataType_UNSIGNED_INTEGER ) ) if _firstFailedElementNumberErr != nil { return nil, errors.Wrap(_firstFailedElementNumberErr, "Error parsing 'firstFailedElementNumber' field of CreateObjectError") } @@ -177,8 +181,9 @@ func CreateObjectErrorParseWithBuffer(ctx context.Context, readBuffer utils.Read // Create a partially initialized instance _child := &_CreateObjectError{ - _BACnetError: &_BACnetError{}, - ErrorType: errorType, + _BACnetError: &_BACnetError{ + }, + ErrorType: errorType, FirstFailedElementNumber: firstFailedElementNumber, } _child._BACnetError._BACnetErrorChildRequirements = _child @@ -201,29 +206,29 @@ func (m *_CreateObjectError) SerializeWithWriteBuffer(ctx context.Context, write return errors.Wrap(pushErr, "Error pushing for CreateObjectError") } - // Simple Field (errorType) - if pushErr := writeBuffer.PushContext("errorType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for errorType") - } - _errorTypeErr := writeBuffer.WriteSerializable(ctx, m.GetErrorType()) - if popErr := writeBuffer.PopContext("errorType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for errorType") - } - if _errorTypeErr != nil { - return errors.Wrap(_errorTypeErr, "Error serializing 'errorType' field") - } + // Simple Field (errorType) + if pushErr := writeBuffer.PushContext("errorType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for errorType") + } + _errorTypeErr := writeBuffer.WriteSerializable(ctx, m.GetErrorType()) + if popErr := writeBuffer.PopContext("errorType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for errorType") + } + if _errorTypeErr != nil { + return errors.Wrap(_errorTypeErr, "Error serializing 'errorType' field") + } - // Simple Field (firstFailedElementNumber) - if pushErr := writeBuffer.PushContext("firstFailedElementNumber"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for firstFailedElementNumber") - } - _firstFailedElementNumberErr := writeBuffer.WriteSerializable(ctx, m.GetFirstFailedElementNumber()) - if popErr := writeBuffer.PopContext("firstFailedElementNumber"); popErr != nil { - return errors.Wrap(popErr, "Error popping for firstFailedElementNumber") - } - if _firstFailedElementNumberErr != nil { - return errors.Wrap(_firstFailedElementNumberErr, "Error serializing 'firstFailedElementNumber' field") - } + // Simple Field (firstFailedElementNumber) + if pushErr := writeBuffer.PushContext("firstFailedElementNumber"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for firstFailedElementNumber") + } + _firstFailedElementNumberErr := writeBuffer.WriteSerializable(ctx, m.GetFirstFailedElementNumber()) + if popErr := writeBuffer.PopContext("firstFailedElementNumber"); popErr != nil { + return errors.Wrap(popErr, "Error popping for firstFailedElementNumber") + } + if _firstFailedElementNumberErr != nil { + return errors.Wrap(_firstFailedElementNumberErr, "Error serializing 'firstFailedElementNumber' field") + } if popErr := writeBuffer.PopContext("CreateObjectError"); popErr != nil { return errors.Wrap(popErr, "Error popping for CreateObjectError") @@ -233,6 +238,7 @@ func (m *_CreateObjectError) SerializeWithWriteBuffer(ctx context.Context, write return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_CreateObjectError) isCreateObjectError() bool { return true } @@ -247,3 +253,6 @@ func (m *_CreateObjectError) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/Error.go b/plc4go/protocols/bacnetip/readwrite/model/Error.go index 3cd575adbcd..df4cf8f4752 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/Error.go +++ b/plc4go/protocols/bacnetip/readwrite/model/Error.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Error is the corresponding interface of Error type Error interface { @@ -46,10 +48,11 @@ type ErrorExactly interface { // _Error is the data-structure of this message type _Error struct { - ErrorClass ErrorClassTagged - ErrorCode ErrorCodeTagged + ErrorClass ErrorClassTagged + ErrorCode ErrorCodeTagged } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -68,14 +71,15 @@ func (m *_Error) GetErrorCode() ErrorCodeTagged { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewError factory function for _Error -func NewError(errorClass ErrorClassTagged, errorCode ErrorCodeTagged) *_Error { - return &_Error{ErrorClass: errorClass, ErrorCode: errorCode} +func NewError( errorClass ErrorClassTagged , errorCode ErrorCodeTagged ) *_Error { +return &_Error{ ErrorClass: errorClass , ErrorCode: errorCode } } // Deprecated: use the interface for direct cast func CastError(structType interface{}) Error { - if casted, ok := structType.(Error); ok { + if casted, ok := structType.(Error); ok { return casted } if casted, ok := structType.(*Error); ok { @@ -100,6 +104,7 @@ func (m *_Error) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_Error) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -121,7 +126,7 @@ func ErrorParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) (Err if pullErr := readBuffer.PullContext("errorClass"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for errorClass") } - _errorClass, _errorClassErr := ErrorClassTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_errorClass, _errorClassErr := ErrorClassTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _errorClassErr != nil { return nil, errors.Wrap(_errorClassErr, "Error parsing 'errorClass' field of Error") } @@ -134,7 +139,7 @@ func ErrorParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) (Err if pullErr := readBuffer.PullContext("errorCode"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for errorCode") } - _errorCode, _errorCodeErr := ErrorCodeTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS)) +_errorCode, _errorCodeErr := ErrorCodeTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_APPLICATION_TAGS ) ) if _errorCodeErr != nil { return nil, errors.Wrap(_errorCodeErr, "Error parsing 'errorCode' field of Error") } @@ -149,9 +154,9 @@ func ErrorParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) (Err // Create the instance return &_Error{ - ErrorClass: errorClass, - ErrorCode: errorCode, - }, nil + ErrorClass: errorClass, + ErrorCode: errorCode, + }, nil } func (m *_Error) Serialize() ([]byte, error) { @@ -165,7 +170,7 @@ func (m *_Error) Serialize() ([]byte, error) { func (m *_Error) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("Error"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("Error"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for Error") } @@ -199,6 +204,7 @@ func (m *_Error) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils return nil } + func (m *_Error) isError() bool { return true } @@ -213,3 +219,6 @@ func (m *_Error) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/ErrorClass.go b/plc4go/protocols/bacnetip/readwrite/model/ErrorClass.go index dfa50705221..571672f8444 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/ErrorClass.go +++ b/plc4go/protocols/bacnetip/readwrite/model/ErrorClass.go @@ -34,23 +34,23 @@ type IErrorClass interface { utils.Serializable } -const ( - ErrorClass_DEVICE ErrorClass = 0x0000 - ErrorClass_OBJECT ErrorClass = 0x0001 - ErrorClass_PROPERTY ErrorClass = 0x0002 - ErrorClass_RESOURCES ErrorClass = 0x0003 - ErrorClass_SECURITY ErrorClass = 0x0004 - ErrorClass_SERVICES ErrorClass = 0x0005 - ErrorClass_VT ErrorClass = 0x0006 - ErrorClass_COMMUNICATION ErrorClass = 0x0007 - ErrorClass_VENDOR_PROPRIETARY_VALUE ErrorClass = 0xFFFF +const( + ErrorClass_DEVICE ErrorClass = 0x0000 + ErrorClass_OBJECT ErrorClass = 0x0001 + ErrorClass_PROPERTY ErrorClass = 0x0002 + ErrorClass_RESOURCES ErrorClass = 0x0003 + ErrorClass_SECURITY ErrorClass = 0x0004 + ErrorClass_SERVICES ErrorClass = 0x0005 + ErrorClass_VT ErrorClass = 0x0006 + ErrorClass_COMMUNICATION ErrorClass = 0x0007 + ErrorClass_VENDOR_PROPRIETARY_VALUE ErrorClass = 0XFFFF ) var ErrorClassValues []ErrorClass func init() { _ = errors.New - ErrorClassValues = []ErrorClass{ + ErrorClassValues = []ErrorClass { ErrorClass_DEVICE, ErrorClass_OBJECT, ErrorClass_PROPERTY, @@ -65,24 +65,24 @@ func init() { func ErrorClassByValue(value uint16) (enum ErrorClass, ok bool) { switch value { - case 0xFFFF: - return ErrorClass_VENDOR_PROPRIETARY_VALUE, true - case 0x0000: - return ErrorClass_DEVICE, true - case 0x0001: - return ErrorClass_OBJECT, true - case 0x0002: - return ErrorClass_PROPERTY, true - case 0x0003: - return ErrorClass_RESOURCES, true - case 0x0004: - return ErrorClass_SECURITY, true - case 0x0005: - return ErrorClass_SERVICES, true - case 0x0006: - return ErrorClass_VT, true - case 0x0007: - return ErrorClass_COMMUNICATION, true + case 0XFFFF: + return ErrorClass_VENDOR_PROPRIETARY_VALUE, true + case 0x0000: + return ErrorClass_DEVICE, true + case 0x0001: + return ErrorClass_OBJECT, true + case 0x0002: + return ErrorClass_PROPERTY, true + case 0x0003: + return ErrorClass_RESOURCES, true + case 0x0004: + return ErrorClass_SECURITY, true + case 0x0005: + return ErrorClass_SERVICES, true + case 0x0006: + return ErrorClass_VT, true + case 0x0007: + return ErrorClass_COMMUNICATION, true } return 0, false } @@ -111,13 +111,13 @@ func ErrorClassByName(value string) (enum ErrorClass, ok bool) { return 0, false } -func ErrorClassKnows(value uint16) bool { +func ErrorClassKnows(value uint16) bool { for _, typeValue := range ErrorClassValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastErrorClass(structType interface{}) ErrorClass { @@ -195,3 +195,4 @@ func (e ErrorClass) PLC4XEnumName() string { func (e ErrorClass) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/ErrorClassTagged.go b/plc4go/protocols/bacnetip/readwrite/model/ErrorClassTagged.go index 31cf3fd4381..2c51a345976 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/ErrorClassTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/ErrorClassTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ErrorClassTagged is the corresponding interface of ErrorClassTagged type ErrorClassTagged interface { @@ -50,15 +52,16 @@ type ErrorClassTaggedExactly interface { // _ErrorClassTagged is the data-structure of this message type _ErrorClassTagged struct { - Header BACnetTagHeader - Value ErrorClass - ProprietaryValue uint32 + Header BACnetTagHeader + Value ErrorClass + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_ErrorClassTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewErrorClassTagged factory function for _ErrorClassTagged -func NewErrorClassTagged(header BACnetTagHeader, value ErrorClass, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_ErrorClassTagged { - return &_ErrorClassTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewErrorClassTagged( header BACnetTagHeader , value ErrorClass , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_ErrorClassTagged { +return &_ErrorClassTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastErrorClassTagged(structType interface{}) ErrorClassTagged { - if casted, ok := structType.(ErrorClassTagged); ok { + if casted, ok := structType.(ErrorClassTagged); ok { return casted } if casted, ok := structType.(*ErrorClassTagged); ok { @@ -123,16 +127,17 @@ func (m *_ErrorClassTagged) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_ErrorClassTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func ErrorClassTaggedParseWithBuffer(ctx context.Context, readBuffer utils.ReadB if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of ErrorClassTagged") } @@ -164,12 +169,12 @@ func ErrorClassTaggedParseWithBuffer(ctx context.Context, readBuffer utils.ReadB } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func ErrorClassTaggedParseWithBuffer(ctx context.Context, readBuffer utils.ReadB } var value ErrorClass if _value != nil { - value = _value.(ErrorClass) + value = _value.(ErrorClass) } // Virtual field @@ -195,7 +200,7 @@ func ErrorClassTaggedParseWithBuffer(ctx context.Context, readBuffer utils.ReadB } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("ErrorClassTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func ErrorClassTaggedParseWithBuffer(ctx context.Context, readBuffer utils.ReadB // Create the instance return &_ErrorClassTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_ErrorClassTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_ErrorClassTagged) Serialize() ([]byte, error) { func (m *_ErrorClassTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("ErrorClassTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("ErrorClassTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for ErrorClassTagged") } @@ -261,6 +266,7 @@ func (m *_ErrorClassTagged) SerializeWithWriteBuffer(ctx context.Context, writeB return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_ErrorClassTagged) GetTagNumber() uint8 { func (m *_ErrorClassTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_ErrorClassTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/ErrorCode.go b/plc4go/protocols/bacnetip/readwrite/model/ErrorCode.go index 5a587ca47bc..a5aa88b35d3 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/ErrorCode.go +++ b/plc4go/protocols/bacnetip/readwrite/model/ErrorCode.go @@ -34,144 +34,144 @@ type IErrorCode interface { utils.Serializable } -const ( - ErrorCode_ABORT_APDU_TOO_LONG ErrorCode = 123 - ErrorCode_ABORT_APPLICATION_EXCEEDED_REPLY_TIME ErrorCode = 124 - ErrorCode_ABORT_BUFFER_OVERFLOW ErrorCode = 51 - ErrorCode_ABORT_INSUFFICIENT_SECURITY ErrorCode = 135 - ErrorCode_ABORT_INVALID_APDU_IN_THIS_STATE ErrorCode = 52 - ErrorCode_ABORT_OTHER ErrorCode = 56 - ErrorCode_ABORT_OUT_OF_RESOURCES ErrorCode = 125 +const( + ErrorCode_ABORT_APDU_TOO_LONG ErrorCode = 123 + ErrorCode_ABORT_APPLICATION_EXCEEDED_REPLY_TIME ErrorCode = 124 + ErrorCode_ABORT_BUFFER_OVERFLOW ErrorCode = 51 + ErrorCode_ABORT_INSUFFICIENT_SECURITY ErrorCode = 135 + ErrorCode_ABORT_INVALID_APDU_IN_THIS_STATE ErrorCode = 52 + ErrorCode_ABORT_OTHER ErrorCode = 56 + ErrorCode_ABORT_OUT_OF_RESOURCES ErrorCode = 125 ErrorCode_ABORT_PREEMPTED_BY_HIGHER_PRIORITY_TASK ErrorCode = 53 - ErrorCode_ABORT_PROPRIETARY ErrorCode = 55 - ErrorCode_ABORT_SECURITY_ERROR ErrorCode = 136 - ErrorCode_ABORT_SEGMENTATION_NOT_SUPPORTED ErrorCode = 54 - ErrorCode_ABORT_TSM_TIMEOUT ErrorCode = 126 - ErrorCode_ABORT_WINDOW_SIZE_OUT_OF_RANGE ErrorCode = 127 - ErrorCode_ACCESS_DENIED ErrorCode = 85 - ErrorCode_ADDRESSING_ERROR ErrorCode = 115 - ErrorCode_BAD_DESTINATION_ADDRESS ErrorCode = 86 - ErrorCode_BAD_DESTINATION_DEVICE_ID ErrorCode = 87 - ErrorCode_BAD_SIGNATURE ErrorCode = 88 - ErrorCode_BAD_SOURCE_ADDRESS ErrorCode = 89 - ErrorCode_BAD_TIMESTAMP ErrorCode = 90 - ErrorCode_Busy ErrorCode = 82 - ErrorCode_CANNOT_USE_KEY ErrorCode = 91 - ErrorCode_CANNOT_VERIFY_MESSAGE_ID ErrorCode = 92 - ErrorCode_CHARACTER_SET_NOT_SUPPORTED ErrorCode = 41 - ErrorCode_COMMUNICATION_DISABLED ErrorCode = 83 - ErrorCode_CONFIGURATION_IN_PROGRESS ErrorCode = 2 - ErrorCode_CORRECT_KEY_REVISION ErrorCode = 93 - ErrorCode_COV_SUBSCRIPTION_FAILED ErrorCode = 43 - ErrorCode_DATATYPE_NOT_SUPPORTED ErrorCode = 47 - ErrorCode_DELETE_FDT_ENTRY_FAILED ErrorCode = 120 - ErrorCode_DESTINATION_DEVICE_ID_REQUIRED ErrorCode = 94 - ErrorCode_DEVICE_BUSY ErrorCode = 3 - ErrorCode_DISTRIBUTE_BROADCAST_FAILED ErrorCode = 121 - ErrorCode_DUPLICATE_ENTRY ErrorCode = 137 - ErrorCode_DUPLICATE_MESSAGE ErrorCode = 95 - ErrorCode_DUPLICATE_NAME ErrorCode = 48 - ErrorCode_DUPLICATE_OBJECT_ID ErrorCode = 49 - ErrorCode_DYNAMIC_CREATION_NOT_SUPPORTED ErrorCode = 4 - ErrorCode_ENCRYPTION_NOT_CONFIGURED ErrorCode = 96 - ErrorCode_ENCRYPTION_REQUIRED ErrorCode = 97 - ErrorCode_FILE_ACCESS_DENIED ErrorCode = 5 - ErrorCode_FILE_FULL ErrorCode = 128 - ErrorCode_INCONSISTENT_CONFIGURATION ErrorCode = 129 - ErrorCode_INCONSISTENT_OBJECT_TYPE ErrorCode = 130 - ErrorCode_INCONSISTENT_PARAMETERS ErrorCode = 7 - ErrorCode_INCONSISTENT_SELECTION_CRITERION ErrorCode = 8 - ErrorCode_INCORRECT_KEY ErrorCode = 98 - ErrorCode_INTERNAL_ERROR ErrorCode = 131 - ErrorCode_INVALID_ARRAY_INDEX ErrorCode = 42 - ErrorCode_INVALID_CONFIGURATION_DATA ErrorCode = 46 - ErrorCode_INVALID_DATA_TYPE ErrorCode = 9 - ErrorCode_D_PARAMETER_DATA_TYPE ErrorCode = 13 - ErrorCode_INVALID_TAG ErrorCode = 57 - ErrorCode_INVALID_TIMESTAMP ErrorCode = 14 - ErrorCode_INVALID_VALUE_IN_THIS_STATE ErrorCode = 138 - ErrorCode_KEY_UPDATE_IN_PROGRESS ErrorCode = 100 - ErrorCode_LIST_ELEMENT_NOT_FOUND ErrorCode = 81 - ErrorCode_LOG_BUFFER_FULL ErrorCode = 75 - ErrorCode_LOGGED_VALUE_PURGED ErrorCode = 76 - ErrorCode_MALFORMED_MESSAGE ErrorCode = 101 - ErrorCode_MESSAGE_TOO_LONG ErrorCode = 113 - ErrorCode_MISSING_REQUIRED_PARAMETER ErrorCode = 16 - ErrorCode_NETWORK_DOWN ErrorCode = 58 - ErrorCode_NO_ALARM_CONFIGURED ErrorCode = 74 - ErrorCode_NO_OBJECTS_OF_SPECIFIED_TYPE ErrorCode = 17 - ErrorCode_NO_PROPERTY_SPECIFIED ErrorCode = 77 - ErrorCode_NO_SPACE_FOR_OBJECT ErrorCode = 18 - ErrorCode_NO_SPACE_TO_ADD_LIST_ELEMENT ErrorCode = 19 - ErrorCode_NO_SPACE_TO_WRITE_PROPERTY ErrorCode = 20 - ErrorCode_NO_VT_SESSIONS_AVAILABLE ErrorCode = 21 - ErrorCode_NOT_CONFIGURED ErrorCode = 132 - ErrorCode_NOT_CONFIGURED_FOR_TRIGGERED_LOGGING ErrorCode = 78 - ErrorCode_NOT_COV_PROPERTY ErrorCode = 44 - ErrorCode_NOT_KEY_SERVER ErrorCode = 102 - ErrorCode_NOT_ROUTER_TO_DNET ErrorCode = 110 - ErrorCode_OBJECT_DELETION_NOT_PERMITTED ErrorCode = 23 - ErrorCode_OBJECT_IDENTIFIER_ALREADY_EXISTS ErrorCode = 24 - ErrorCode_OPERATIONAL_PROBLEM ErrorCode = 25 - ErrorCode_OPTIONAL_FUNCTIONALITY_NOT_SUPPORTED ErrorCode = 45 - ErrorCode_OTHER ErrorCode = 0 - ErrorCode_OUT_OF_MEMORY ErrorCode = 133 - ErrorCode_PARAMETER_OUT_OF_RANGE ErrorCode = 80 - ErrorCode_PASSWORD_FAILURE ErrorCode = 26 - ErrorCode_PROPERTY_IS_NOT_A_LIST ErrorCode = 22 - ErrorCode_PROPERTY_IS_NOT_AN_ARRAY ErrorCode = 50 - ErrorCode_READ_ACCESS_DENIED ErrorCode = 27 - ErrorCode_READ_BDT_FAILED ErrorCode = 117 - ErrorCode_READ_FDT_FAILED ErrorCode = 119 - ErrorCode_REGISTER_FOREIGN_DEVICE_FAILED ErrorCode = 118 - ErrorCode_REJECT_BUFFER_OVERFLOW ErrorCode = 59 - ErrorCode_REJECT_INCONSISTENT_PARAMETERS ErrorCode = 60 - ErrorCode_REJECT_INVALID_PARAMETER_DATA_TYPE ErrorCode = 61 - ErrorCode_REJECT_INVALID_TAG ErrorCode = 62 - ErrorCode_REJECT_MISSING_REQUIRED_PARAMETER ErrorCode = 63 - ErrorCode_REJECT_OTHER ErrorCode = 69 - ErrorCode_REJECT_PARAMETER_OUT_OF_RANGE ErrorCode = 64 - ErrorCode_REJECT_PROPRIETARY ErrorCode = 68 - ErrorCode_REJECT_TOO_MANY_ARGUMENTS ErrorCode = 65 - ErrorCode_REJECT_UNDEFINED_ENUMERATION ErrorCode = 66 - ErrorCode_REJECT_UNRECOGNIZED_SERVICE ErrorCode = 67 - ErrorCode_ROUTER_BUSY ErrorCode = 111 - ErrorCode_SECURITY_ERROR ErrorCode = 114 - ErrorCode_SECURITY_NOT_CONFIGURED ErrorCode = 103 - ErrorCode_SERVICE_REQUEST_DENIED ErrorCode = 29 - ErrorCode_SOURCE_SECURITY_REQUIRED ErrorCode = 104 - ErrorCode_SUCCESS ErrorCode = 84 - ErrorCode_TIMEOUT ErrorCode = 30 - ErrorCode_TOO_MANY_KEYS ErrorCode = 105 - ErrorCode_UNKNOWN_AUTHENTICATION_TYPE ErrorCode = 106 - ErrorCode_UNKNOWN_DEVICE ErrorCode = 70 - ErrorCode_UNKNOWN_FILE_SIZE ErrorCode = 122 - ErrorCode_UNKNOWN_KEY ErrorCode = 107 - ErrorCode_UNKNOWN_KEY_REVISION ErrorCode = 108 - ErrorCode_UNKNOWN_NETWORK_MESSAGE ErrorCode = 112 - ErrorCode_UNKNOWN_OBJECT ErrorCode = 31 - ErrorCode_UNKNOWN_PROPERTY ErrorCode = 32 - ErrorCode_UNKNOWN_ROUTE ErrorCode = 71 - ErrorCode_UNKNOWN_SOURCE_MESSAGE ErrorCode = 109 - ErrorCode_UNKNOWN_SUBSCRIPTION ErrorCode = 79 - ErrorCode_UNKNOWN_VT_CLASS ErrorCode = 34 - ErrorCode_UNKNOWN_VT_SESSION ErrorCode = 35 - ErrorCode_UNSUPPORTED_OBJECT_TYPE ErrorCode = 36 - ErrorCode_VALUE_NOT_INITIALIZED ErrorCode = 72 - ErrorCode_VALUE_OUT_OF_RANGE ErrorCode = 37 - ErrorCode_VALUE_TOO_LONG ErrorCode = 134 - ErrorCode_VT_SESSION_ALREADY_CLOSED ErrorCode = 38 - ErrorCode_VT_SESSION_TERMINATION_FAILURE ErrorCode = 39 - ErrorCode_WRITE_ACCESS_DENIED ErrorCode = 40 - ErrorCode_WRITE_BDT_FAILED ErrorCode = 116 - ErrorCode_VENDOR_PROPRIETARY_VALUE ErrorCode = 0xFFFF + ErrorCode_ABORT_PROPRIETARY ErrorCode = 55 + ErrorCode_ABORT_SECURITY_ERROR ErrorCode = 136 + ErrorCode_ABORT_SEGMENTATION_NOT_SUPPORTED ErrorCode = 54 + ErrorCode_ABORT_TSM_TIMEOUT ErrorCode = 126 + ErrorCode_ABORT_WINDOW_SIZE_OUT_OF_RANGE ErrorCode = 127 + ErrorCode_ACCESS_DENIED ErrorCode = 85 + ErrorCode_ADDRESSING_ERROR ErrorCode = 115 + ErrorCode_BAD_DESTINATION_ADDRESS ErrorCode = 86 + ErrorCode_BAD_DESTINATION_DEVICE_ID ErrorCode = 87 + ErrorCode_BAD_SIGNATURE ErrorCode = 88 + ErrorCode_BAD_SOURCE_ADDRESS ErrorCode = 89 + ErrorCode_BAD_TIMESTAMP ErrorCode = 90 + ErrorCode_Busy ErrorCode = 82 + ErrorCode_CANNOT_USE_KEY ErrorCode = 91 + ErrorCode_CANNOT_VERIFY_MESSAGE_ID ErrorCode = 92 + ErrorCode_CHARACTER_SET_NOT_SUPPORTED ErrorCode = 41 + ErrorCode_COMMUNICATION_DISABLED ErrorCode = 83 + ErrorCode_CONFIGURATION_IN_PROGRESS ErrorCode = 2 + ErrorCode_CORRECT_KEY_REVISION ErrorCode = 93 + ErrorCode_COV_SUBSCRIPTION_FAILED ErrorCode = 43 + ErrorCode_DATATYPE_NOT_SUPPORTED ErrorCode = 47 + ErrorCode_DELETE_FDT_ENTRY_FAILED ErrorCode = 120 + ErrorCode_DESTINATION_DEVICE_ID_REQUIRED ErrorCode = 94 + ErrorCode_DEVICE_BUSY ErrorCode = 3 + ErrorCode_DISTRIBUTE_BROADCAST_FAILED ErrorCode = 121 + ErrorCode_DUPLICATE_ENTRY ErrorCode = 137 + ErrorCode_DUPLICATE_MESSAGE ErrorCode = 95 + ErrorCode_DUPLICATE_NAME ErrorCode = 48 + ErrorCode_DUPLICATE_OBJECT_ID ErrorCode = 49 + ErrorCode_DYNAMIC_CREATION_NOT_SUPPORTED ErrorCode = 4 + ErrorCode_ENCRYPTION_NOT_CONFIGURED ErrorCode = 96 + ErrorCode_ENCRYPTION_REQUIRED ErrorCode = 97 + ErrorCode_FILE_ACCESS_DENIED ErrorCode = 5 + ErrorCode_FILE_FULL ErrorCode = 128 + ErrorCode_INCONSISTENT_CONFIGURATION ErrorCode = 129 + ErrorCode_INCONSISTENT_OBJECT_TYPE ErrorCode = 130 + ErrorCode_INCONSISTENT_PARAMETERS ErrorCode = 7 + ErrorCode_INCONSISTENT_SELECTION_CRITERION ErrorCode = 8 + ErrorCode_INCORRECT_KEY ErrorCode = 98 + ErrorCode_INTERNAL_ERROR ErrorCode = 131 + ErrorCode_INVALID_ARRAY_INDEX ErrorCode = 42 + ErrorCode_INVALID_CONFIGURATION_DATA ErrorCode = 46 + ErrorCode_INVALID_DATA_TYPE ErrorCode = 9 + ErrorCode_D_PARAMETER_DATA_TYPE ErrorCode = 13 + ErrorCode_INVALID_TAG ErrorCode = 57 + ErrorCode_INVALID_TIMESTAMP ErrorCode = 14 + ErrorCode_INVALID_VALUE_IN_THIS_STATE ErrorCode = 138 + ErrorCode_KEY_UPDATE_IN_PROGRESS ErrorCode = 100 + ErrorCode_LIST_ELEMENT_NOT_FOUND ErrorCode = 81 + ErrorCode_LOG_BUFFER_FULL ErrorCode = 75 + ErrorCode_LOGGED_VALUE_PURGED ErrorCode = 76 + ErrorCode_MALFORMED_MESSAGE ErrorCode = 101 + ErrorCode_MESSAGE_TOO_LONG ErrorCode = 113 + ErrorCode_MISSING_REQUIRED_PARAMETER ErrorCode = 16 + ErrorCode_NETWORK_DOWN ErrorCode = 58 + ErrorCode_NO_ALARM_CONFIGURED ErrorCode = 74 + ErrorCode_NO_OBJECTS_OF_SPECIFIED_TYPE ErrorCode = 17 + ErrorCode_NO_PROPERTY_SPECIFIED ErrorCode = 77 + ErrorCode_NO_SPACE_FOR_OBJECT ErrorCode = 18 + ErrorCode_NO_SPACE_TO_ADD_LIST_ELEMENT ErrorCode = 19 + ErrorCode_NO_SPACE_TO_WRITE_PROPERTY ErrorCode = 20 + ErrorCode_NO_VT_SESSIONS_AVAILABLE ErrorCode = 21 + ErrorCode_NOT_CONFIGURED ErrorCode = 132 + ErrorCode_NOT_CONFIGURED_FOR_TRIGGERED_LOGGING ErrorCode = 78 + ErrorCode_NOT_COV_PROPERTY ErrorCode = 44 + ErrorCode_NOT_KEY_SERVER ErrorCode = 102 + ErrorCode_NOT_ROUTER_TO_DNET ErrorCode = 110 + ErrorCode_OBJECT_DELETION_NOT_PERMITTED ErrorCode = 23 + ErrorCode_OBJECT_IDENTIFIER_ALREADY_EXISTS ErrorCode = 24 + ErrorCode_OPERATIONAL_PROBLEM ErrorCode = 25 + ErrorCode_OPTIONAL_FUNCTIONALITY_NOT_SUPPORTED ErrorCode = 45 + ErrorCode_OTHER ErrorCode = 0 + ErrorCode_OUT_OF_MEMORY ErrorCode = 133 + ErrorCode_PARAMETER_OUT_OF_RANGE ErrorCode = 80 + ErrorCode_PASSWORD_FAILURE ErrorCode = 26 + ErrorCode_PROPERTY_IS_NOT_A_LIST ErrorCode = 22 + ErrorCode_PROPERTY_IS_NOT_AN_ARRAY ErrorCode = 50 + ErrorCode_READ_ACCESS_DENIED ErrorCode = 27 + ErrorCode_READ_BDT_FAILED ErrorCode = 117 + ErrorCode_READ_FDT_FAILED ErrorCode = 119 + ErrorCode_REGISTER_FOREIGN_DEVICE_FAILED ErrorCode = 118 + ErrorCode_REJECT_BUFFER_OVERFLOW ErrorCode = 59 + ErrorCode_REJECT_INCONSISTENT_PARAMETERS ErrorCode = 60 + ErrorCode_REJECT_INVALID_PARAMETER_DATA_TYPE ErrorCode = 61 + ErrorCode_REJECT_INVALID_TAG ErrorCode = 62 + ErrorCode_REJECT_MISSING_REQUIRED_PARAMETER ErrorCode = 63 + ErrorCode_REJECT_OTHER ErrorCode = 69 + ErrorCode_REJECT_PARAMETER_OUT_OF_RANGE ErrorCode = 64 + ErrorCode_REJECT_PROPRIETARY ErrorCode = 68 + ErrorCode_REJECT_TOO_MANY_ARGUMENTS ErrorCode = 65 + ErrorCode_REJECT_UNDEFINED_ENUMERATION ErrorCode = 66 + ErrorCode_REJECT_UNRECOGNIZED_SERVICE ErrorCode = 67 + ErrorCode_ROUTER_BUSY ErrorCode = 111 + ErrorCode_SECURITY_ERROR ErrorCode = 114 + ErrorCode_SECURITY_NOT_CONFIGURED ErrorCode = 103 + ErrorCode_SERVICE_REQUEST_DENIED ErrorCode = 29 + ErrorCode_SOURCE_SECURITY_REQUIRED ErrorCode = 104 + ErrorCode_SUCCESS ErrorCode = 84 + ErrorCode_TIMEOUT ErrorCode = 30 + ErrorCode_TOO_MANY_KEYS ErrorCode = 105 + ErrorCode_UNKNOWN_AUTHENTICATION_TYPE ErrorCode = 106 + ErrorCode_UNKNOWN_DEVICE ErrorCode = 70 + ErrorCode_UNKNOWN_FILE_SIZE ErrorCode = 122 + ErrorCode_UNKNOWN_KEY ErrorCode = 107 + ErrorCode_UNKNOWN_KEY_REVISION ErrorCode = 108 + ErrorCode_UNKNOWN_NETWORK_MESSAGE ErrorCode = 112 + ErrorCode_UNKNOWN_OBJECT ErrorCode = 31 + ErrorCode_UNKNOWN_PROPERTY ErrorCode = 32 + ErrorCode_UNKNOWN_ROUTE ErrorCode = 71 + ErrorCode_UNKNOWN_SOURCE_MESSAGE ErrorCode = 109 + ErrorCode_UNKNOWN_SUBSCRIPTION ErrorCode = 79 + ErrorCode_UNKNOWN_VT_CLASS ErrorCode = 34 + ErrorCode_UNKNOWN_VT_SESSION ErrorCode = 35 + ErrorCode_UNSUPPORTED_OBJECT_TYPE ErrorCode = 36 + ErrorCode_VALUE_NOT_INITIALIZED ErrorCode = 72 + ErrorCode_VALUE_OUT_OF_RANGE ErrorCode = 37 + ErrorCode_VALUE_TOO_LONG ErrorCode = 134 + ErrorCode_VT_SESSION_ALREADY_CLOSED ErrorCode = 38 + ErrorCode_VT_SESSION_TERMINATION_FAILURE ErrorCode = 39 + ErrorCode_WRITE_ACCESS_DENIED ErrorCode = 40 + ErrorCode_WRITE_BDT_FAILED ErrorCode = 116 + ErrorCode_VENDOR_PROPRIETARY_VALUE ErrorCode = 0XFFFF ) var ErrorCodeValues []ErrorCode func init() { _ = errors.New - ErrorCodeValues = []ErrorCode{ + ErrorCodeValues = []ErrorCode { ErrorCode_ABORT_APDU_TOO_LONG, ErrorCode_ABORT_APPLICATION_EXCEEDED_REPLY_TIME, ErrorCode_ABORT_BUFFER_OVERFLOW, @@ -307,266 +307,266 @@ func init() { func ErrorCodeByValue(value uint16) (enum ErrorCode, ok bool) { switch value { - case 0: - return ErrorCode_OTHER, true - case 0xFFFF: - return ErrorCode_VENDOR_PROPRIETARY_VALUE, true - case 100: - return ErrorCode_KEY_UPDATE_IN_PROGRESS, true - case 101: - return ErrorCode_MALFORMED_MESSAGE, true - case 102: - return ErrorCode_NOT_KEY_SERVER, true - case 103: - return ErrorCode_SECURITY_NOT_CONFIGURED, true - case 104: - return ErrorCode_SOURCE_SECURITY_REQUIRED, true - case 105: - return ErrorCode_TOO_MANY_KEYS, true - case 106: - return ErrorCode_UNKNOWN_AUTHENTICATION_TYPE, true - case 107: - return ErrorCode_UNKNOWN_KEY, true - case 108: - return ErrorCode_UNKNOWN_KEY_REVISION, true - case 109: - return ErrorCode_UNKNOWN_SOURCE_MESSAGE, true - case 110: - return ErrorCode_NOT_ROUTER_TO_DNET, true - case 111: - return ErrorCode_ROUTER_BUSY, true - case 112: - return ErrorCode_UNKNOWN_NETWORK_MESSAGE, true - case 113: - return ErrorCode_MESSAGE_TOO_LONG, true - case 114: - return ErrorCode_SECURITY_ERROR, true - case 115: - return ErrorCode_ADDRESSING_ERROR, true - case 116: - return ErrorCode_WRITE_BDT_FAILED, true - case 117: - return ErrorCode_READ_BDT_FAILED, true - case 118: - return ErrorCode_REGISTER_FOREIGN_DEVICE_FAILED, true - case 119: - return ErrorCode_READ_FDT_FAILED, true - case 120: - return ErrorCode_DELETE_FDT_ENTRY_FAILED, true - case 121: - return ErrorCode_DISTRIBUTE_BROADCAST_FAILED, true - case 122: - return ErrorCode_UNKNOWN_FILE_SIZE, true - case 123: - return ErrorCode_ABORT_APDU_TOO_LONG, true - case 124: - return ErrorCode_ABORT_APPLICATION_EXCEEDED_REPLY_TIME, true - case 125: - return ErrorCode_ABORT_OUT_OF_RESOURCES, true - case 126: - return ErrorCode_ABORT_TSM_TIMEOUT, true - case 127: - return ErrorCode_ABORT_WINDOW_SIZE_OUT_OF_RANGE, true - case 128: - return ErrorCode_FILE_FULL, true - case 129: - return ErrorCode_INCONSISTENT_CONFIGURATION, true - case 13: - return ErrorCode_D_PARAMETER_DATA_TYPE, true - case 130: - return ErrorCode_INCONSISTENT_OBJECT_TYPE, true - case 131: - return ErrorCode_INTERNAL_ERROR, true - case 132: - return ErrorCode_NOT_CONFIGURED, true - case 133: - return ErrorCode_OUT_OF_MEMORY, true - case 134: - return ErrorCode_VALUE_TOO_LONG, true - case 135: - return ErrorCode_ABORT_INSUFFICIENT_SECURITY, true - case 136: - return ErrorCode_ABORT_SECURITY_ERROR, true - case 137: - return ErrorCode_DUPLICATE_ENTRY, true - case 138: - return ErrorCode_INVALID_VALUE_IN_THIS_STATE, true - case 14: - return ErrorCode_INVALID_TIMESTAMP, true - case 16: - return ErrorCode_MISSING_REQUIRED_PARAMETER, true - case 17: - return ErrorCode_NO_OBJECTS_OF_SPECIFIED_TYPE, true - case 18: - return ErrorCode_NO_SPACE_FOR_OBJECT, true - case 19: - return ErrorCode_NO_SPACE_TO_ADD_LIST_ELEMENT, true - case 2: - return ErrorCode_CONFIGURATION_IN_PROGRESS, true - case 20: - return ErrorCode_NO_SPACE_TO_WRITE_PROPERTY, true - case 21: - return ErrorCode_NO_VT_SESSIONS_AVAILABLE, true - case 22: - return ErrorCode_PROPERTY_IS_NOT_A_LIST, true - case 23: - return ErrorCode_OBJECT_DELETION_NOT_PERMITTED, true - case 24: - return ErrorCode_OBJECT_IDENTIFIER_ALREADY_EXISTS, true - case 25: - return ErrorCode_OPERATIONAL_PROBLEM, true - case 26: - return ErrorCode_PASSWORD_FAILURE, true - case 27: - return ErrorCode_READ_ACCESS_DENIED, true - case 29: - return ErrorCode_SERVICE_REQUEST_DENIED, true - case 3: - return ErrorCode_DEVICE_BUSY, true - case 30: - return ErrorCode_TIMEOUT, true - case 31: - return ErrorCode_UNKNOWN_OBJECT, true - case 32: - return ErrorCode_UNKNOWN_PROPERTY, true - case 34: - return ErrorCode_UNKNOWN_VT_CLASS, true - case 35: - return ErrorCode_UNKNOWN_VT_SESSION, true - case 36: - return ErrorCode_UNSUPPORTED_OBJECT_TYPE, true - case 37: - return ErrorCode_VALUE_OUT_OF_RANGE, true - case 38: - return ErrorCode_VT_SESSION_ALREADY_CLOSED, true - case 39: - return ErrorCode_VT_SESSION_TERMINATION_FAILURE, true - case 4: - return ErrorCode_DYNAMIC_CREATION_NOT_SUPPORTED, true - case 40: - return ErrorCode_WRITE_ACCESS_DENIED, true - case 41: - return ErrorCode_CHARACTER_SET_NOT_SUPPORTED, true - case 42: - return ErrorCode_INVALID_ARRAY_INDEX, true - case 43: - return ErrorCode_COV_SUBSCRIPTION_FAILED, true - case 44: - return ErrorCode_NOT_COV_PROPERTY, true - case 45: - return ErrorCode_OPTIONAL_FUNCTIONALITY_NOT_SUPPORTED, true - case 46: - return ErrorCode_INVALID_CONFIGURATION_DATA, true - case 47: - return ErrorCode_DATATYPE_NOT_SUPPORTED, true - case 48: - return ErrorCode_DUPLICATE_NAME, true - case 49: - return ErrorCode_DUPLICATE_OBJECT_ID, true - case 5: - return ErrorCode_FILE_ACCESS_DENIED, true - case 50: - return ErrorCode_PROPERTY_IS_NOT_AN_ARRAY, true - case 51: - return ErrorCode_ABORT_BUFFER_OVERFLOW, true - case 52: - return ErrorCode_ABORT_INVALID_APDU_IN_THIS_STATE, true - case 53: - return ErrorCode_ABORT_PREEMPTED_BY_HIGHER_PRIORITY_TASK, true - case 54: - return ErrorCode_ABORT_SEGMENTATION_NOT_SUPPORTED, true - case 55: - return ErrorCode_ABORT_PROPRIETARY, true - case 56: - return ErrorCode_ABORT_OTHER, true - case 57: - return ErrorCode_INVALID_TAG, true - case 58: - return ErrorCode_NETWORK_DOWN, true - case 59: - return ErrorCode_REJECT_BUFFER_OVERFLOW, true - case 60: - return ErrorCode_REJECT_INCONSISTENT_PARAMETERS, true - case 61: - return ErrorCode_REJECT_INVALID_PARAMETER_DATA_TYPE, true - case 62: - return ErrorCode_REJECT_INVALID_TAG, true - case 63: - return ErrorCode_REJECT_MISSING_REQUIRED_PARAMETER, true - case 64: - return ErrorCode_REJECT_PARAMETER_OUT_OF_RANGE, true - case 65: - return ErrorCode_REJECT_TOO_MANY_ARGUMENTS, true - case 66: - return ErrorCode_REJECT_UNDEFINED_ENUMERATION, true - case 67: - return ErrorCode_REJECT_UNRECOGNIZED_SERVICE, true - case 68: - return ErrorCode_REJECT_PROPRIETARY, true - case 69: - return ErrorCode_REJECT_OTHER, true - case 7: - return ErrorCode_INCONSISTENT_PARAMETERS, true - case 70: - return ErrorCode_UNKNOWN_DEVICE, true - case 71: - return ErrorCode_UNKNOWN_ROUTE, true - case 72: - return ErrorCode_VALUE_NOT_INITIALIZED, true - case 74: - return ErrorCode_NO_ALARM_CONFIGURED, true - case 75: - return ErrorCode_LOG_BUFFER_FULL, true - case 76: - return ErrorCode_LOGGED_VALUE_PURGED, true - case 77: - return ErrorCode_NO_PROPERTY_SPECIFIED, true - case 78: - return ErrorCode_NOT_CONFIGURED_FOR_TRIGGERED_LOGGING, true - case 79: - return ErrorCode_UNKNOWN_SUBSCRIPTION, true - case 8: - return ErrorCode_INCONSISTENT_SELECTION_CRITERION, true - case 80: - return ErrorCode_PARAMETER_OUT_OF_RANGE, true - case 81: - return ErrorCode_LIST_ELEMENT_NOT_FOUND, true - case 82: - return ErrorCode_Busy, true - case 83: - return ErrorCode_COMMUNICATION_DISABLED, true - case 84: - return ErrorCode_SUCCESS, true - case 85: - return ErrorCode_ACCESS_DENIED, true - case 86: - return ErrorCode_BAD_DESTINATION_ADDRESS, true - case 87: - return ErrorCode_BAD_DESTINATION_DEVICE_ID, true - case 88: - return ErrorCode_BAD_SIGNATURE, true - case 89: - return ErrorCode_BAD_SOURCE_ADDRESS, true - case 9: - return ErrorCode_INVALID_DATA_TYPE, true - case 90: - return ErrorCode_BAD_TIMESTAMP, true - case 91: - return ErrorCode_CANNOT_USE_KEY, true - case 92: - return ErrorCode_CANNOT_VERIFY_MESSAGE_ID, true - case 93: - return ErrorCode_CORRECT_KEY_REVISION, true - case 94: - return ErrorCode_DESTINATION_DEVICE_ID_REQUIRED, true - case 95: - return ErrorCode_DUPLICATE_MESSAGE, true - case 96: - return ErrorCode_ENCRYPTION_NOT_CONFIGURED, true - case 97: - return ErrorCode_ENCRYPTION_REQUIRED, true - case 98: - return ErrorCode_INCORRECT_KEY, true + case 0: + return ErrorCode_OTHER, true + case 0XFFFF: + return ErrorCode_VENDOR_PROPRIETARY_VALUE, true + case 100: + return ErrorCode_KEY_UPDATE_IN_PROGRESS, true + case 101: + return ErrorCode_MALFORMED_MESSAGE, true + case 102: + return ErrorCode_NOT_KEY_SERVER, true + case 103: + return ErrorCode_SECURITY_NOT_CONFIGURED, true + case 104: + return ErrorCode_SOURCE_SECURITY_REQUIRED, true + case 105: + return ErrorCode_TOO_MANY_KEYS, true + case 106: + return ErrorCode_UNKNOWN_AUTHENTICATION_TYPE, true + case 107: + return ErrorCode_UNKNOWN_KEY, true + case 108: + return ErrorCode_UNKNOWN_KEY_REVISION, true + case 109: + return ErrorCode_UNKNOWN_SOURCE_MESSAGE, true + case 110: + return ErrorCode_NOT_ROUTER_TO_DNET, true + case 111: + return ErrorCode_ROUTER_BUSY, true + case 112: + return ErrorCode_UNKNOWN_NETWORK_MESSAGE, true + case 113: + return ErrorCode_MESSAGE_TOO_LONG, true + case 114: + return ErrorCode_SECURITY_ERROR, true + case 115: + return ErrorCode_ADDRESSING_ERROR, true + case 116: + return ErrorCode_WRITE_BDT_FAILED, true + case 117: + return ErrorCode_READ_BDT_FAILED, true + case 118: + return ErrorCode_REGISTER_FOREIGN_DEVICE_FAILED, true + case 119: + return ErrorCode_READ_FDT_FAILED, true + case 120: + return ErrorCode_DELETE_FDT_ENTRY_FAILED, true + case 121: + return ErrorCode_DISTRIBUTE_BROADCAST_FAILED, true + case 122: + return ErrorCode_UNKNOWN_FILE_SIZE, true + case 123: + return ErrorCode_ABORT_APDU_TOO_LONG, true + case 124: + return ErrorCode_ABORT_APPLICATION_EXCEEDED_REPLY_TIME, true + case 125: + return ErrorCode_ABORT_OUT_OF_RESOURCES, true + case 126: + return ErrorCode_ABORT_TSM_TIMEOUT, true + case 127: + return ErrorCode_ABORT_WINDOW_SIZE_OUT_OF_RANGE, true + case 128: + return ErrorCode_FILE_FULL, true + case 129: + return ErrorCode_INCONSISTENT_CONFIGURATION, true + case 13: + return ErrorCode_D_PARAMETER_DATA_TYPE, true + case 130: + return ErrorCode_INCONSISTENT_OBJECT_TYPE, true + case 131: + return ErrorCode_INTERNAL_ERROR, true + case 132: + return ErrorCode_NOT_CONFIGURED, true + case 133: + return ErrorCode_OUT_OF_MEMORY, true + case 134: + return ErrorCode_VALUE_TOO_LONG, true + case 135: + return ErrorCode_ABORT_INSUFFICIENT_SECURITY, true + case 136: + return ErrorCode_ABORT_SECURITY_ERROR, true + case 137: + return ErrorCode_DUPLICATE_ENTRY, true + case 138: + return ErrorCode_INVALID_VALUE_IN_THIS_STATE, true + case 14: + return ErrorCode_INVALID_TIMESTAMP, true + case 16: + return ErrorCode_MISSING_REQUIRED_PARAMETER, true + case 17: + return ErrorCode_NO_OBJECTS_OF_SPECIFIED_TYPE, true + case 18: + return ErrorCode_NO_SPACE_FOR_OBJECT, true + case 19: + return ErrorCode_NO_SPACE_TO_ADD_LIST_ELEMENT, true + case 2: + return ErrorCode_CONFIGURATION_IN_PROGRESS, true + case 20: + return ErrorCode_NO_SPACE_TO_WRITE_PROPERTY, true + case 21: + return ErrorCode_NO_VT_SESSIONS_AVAILABLE, true + case 22: + return ErrorCode_PROPERTY_IS_NOT_A_LIST, true + case 23: + return ErrorCode_OBJECT_DELETION_NOT_PERMITTED, true + case 24: + return ErrorCode_OBJECT_IDENTIFIER_ALREADY_EXISTS, true + case 25: + return ErrorCode_OPERATIONAL_PROBLEM, true + case 26: + return ErrorCode_PASSWORD_FAILURE, true + case 27: + return ErrorCode_READ_ACCESS_DENIED, true + case 29: + return ErrorCode_SERVICE_REQUEST_DENIED, true + case 3: + return ErrorCode_DEVICE_BUSY, true + case 30: + return ErrorCode_TIMEOUT, true + case 31: + return ErrorCode_UNKNOWN_OBJECT, true + case 32: + return ErrorCode_UNKNOWN_PROPERTY, true + case 34: + return ErrorCode_UNKNOWN_VT_CLASS, true + case 35: + return ErrorCode_UNKNOWN_VT_SESSION, true + case 36: + return ErrorCode_UNSUPPORTED_OBJECT_TYPE, true + case 37: + return ErrorCode_VALUE_OUT_OF_RANGE, true + case 38: + return ErrorCode_VT_SESSION_ALREADY_CLOSED, true + case 39: + return ErrorCode_VT_SESSION_TERMINATION_FAILURE, true + case 4: + return ErrorCode_DYNAMIC_CREATION_NOT_SUPPORTED, true + case 40: + return ErrorCode_WRITE_ACCESS_DENIED, true + case 41: + return ErrorCode_CHARACTER_SET_NOT_SUPPORTED, true + case 42: + return ErrorCode_INVALID_ARRAY_INDEX, true + case 43: + return ErrorCode_COV_SUBSCRIPTION_FAILED, true + case 44: + return ErrorCode_NOT_COV_PROPERTY, true + case 45: + return ErrorCode_OPTIONAL_FUNCTIONALITY_NOT_SUPPORTED, true + case 46: + return ErrorCode_INVALID_CONFIGURATION_DATA, true + case 47: + return ErrorCode_DATATYPE_NOT_SUPPORTED, true + case 48: + return ErrorCode_DUPLICATE_NAME, true + case 49: + return ErrorCode_DUPLICATE_OBJECT_ID, true + case 5: + return ErrorCode_FILE_ACCESS_DENIED, true + case 50: + return ErrorCode_PROPERTY_IS_NOT_AN_ARRAY, true + case 51: + return ErrorCode_ABORT_BUFFER_OVERFLOW, true + case 52: + return ErrorCode_ABORT_INVALID_APDU_IN_THIS_STATE, true + case 53: + return ErrorCode_ABORT_PREEMPTED_BY_HIGHER_PRIORITY_TASK, true + case 54: + return ErrorCode_ABORT_SEGMENTATION_NOT_SUPPORTED, true + case 55: + return ErrorCode_ABORT_PROPRIETARY, true + case 56: + return ErrorCode_ABORT_OTHER, true + case 57: + return ErrorCode_INVALID_TAG, true + case 58: + return ErrorCode_NETWORK_DOWN, true + case 59: + return ErrorCode_REJECT_BUFFER_OVERFLOW, true + case 60: + return ErrorCode_REJECT_INCONSISTENT_PARAMETERS, true + case 61: + return ErrorCode_REJECT_INVALID_PARAMETER_DATA_TYPE, true + case 62: + return ErrorCode_REJECT_INVALID_TAG, true + case 63: + return ErrorCode_REJECT_MISSING_REQUIRED_PARAMETER, true + case 64: + return ErrorCode_REJECT_PARAMETER_OUT_OF_RANGE, true + case 65: + return ErrorCode_REJECT_TOO_MANY_ARGUMENTS, true + case 66: + return ErrorCode_REJECT_UNDEFINED_ENUMERATION, true + case 67: + return ErrorCode_REJECT_UNRECOGNIZED_SERVICE, true + case 68: + return ErrorCode_REJECT_PROPRIETARY, true + case 69: + return ErrorCode_REJECT_OTHER, true + case 7: + return ErrorCode_INCONSISTENT_PARAMETERS, true + case 70: + return ErrorCode_UNKNOWN_DEVICE, true + case 71: + return ErrorCode_UNKNOWN_ROUTE, true + case 72: + return ErrorCode_VALUE_NOT_INITIALIZED, true + case 74: + return ErrorCode_NO_ALARM_CONFIGURED, true + case 75: + return ErrorCode_LOG_BUFFER_FULL, true + case 76: + return ErrorCode_LOGGED_VALUE_PURGED, true + case 77: + return ErrorCode_NO_PROPERTY_SPECIFIED, true + case 78: + return ErrorCode_NOT_CONFIGURED_FOR_TRIGGERED_LOGGING, true + case 79: + return ErrorCode_UNKNOWN_SUBSCRIPTION, true + case 8: + return ErrorCode_INCONSISTENT_SELECTION_CRITERION, true + case 80: + return ErrorCode_PARAMETER_OUT_OF_RANGE, true + case 81: + return ErrorCode_LIST_ELEMENT_NOT_FOUND, true + case 82: + return ErrorCode_Busy, true + case 83: + return ErrorCode_COMMUNICATION_DISABLED, true + case 84: + return ErrorCode_SUCCESS, true + case 85: + return ErrorCode_ACCESS_DENIED, true + case 86: + return ErrorCode_BAD_DESTINATION_ADDRESS, true + case 87: + return ErrorCode_BAD_DESTINATION_DEVICE_ID, true + case 88: + return ErrorCode_BAD_SIGNATURE, true + case 89: + return ErrorCode_BAD_SOURCE_ADDRESS, true + case 9: + return ErrorCode_INVALID_DATA_TYPE, true + case 90: + return ErrorCode_BAD_TIMESTAMP, true + case 91: + return ErrorCode_CANNOT_USE_KEY, true + case 92: + return ErrorCode_CANNOT_VERIFY_MESSAGE_ID, true + case 93: + return ErrorCode_CORRECT_KEY_REVISION, true + case 94: + return ErrorCode_DESTINATION_DEVICE_ID_REQUIRED, true + case 95: + return ErrorCode_DUPLICATE_MESSAGE, true + case 96: + return ErrorCode_ENCRYPTION_NOT_CONFIGURED, true + case 97: + return ErrorCode_ENCRYPTION_REQUIRED, true + case 98: + return ErrorCode_INCORRECT_KEY, true } return 0, false } @@ -837,13 +837,13 @@ func ErrorCodeByName(value string) (enum ErrorCode, ok bool) { return 0, false } -func ErrorCodeKnows(value uint16) bool { +func ErrorCodeKnows(value uint16) bool { for _, typeValue := range ErrorCodeValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastErrorCode(structType interface{}) ErrorCode { @@ -1163,3 +1163,4 @@ func (e ErrorCode) PLC4XEnumName() string { func (e ErrorCode) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/ErrorCodeTagged.go b/plc4go/protocols/bacnetip/readwrite/model/ErrorCodeTagged.go index 184390c4578..f4af6809232 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/ErrorCodeTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/ErrorCodeTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ErrorCodeTagged is the corresponding interface of ErrorCodeTagged type ErrorCodeTagged interface { @@ -50,15 +52,16 @@ type ErrorCodeTaggedExactly interface { // _ErrorCodeTagged is the data-structure of this message type _ErrorCodeTagged struct { - Header BACnetTagHeader - Value ErrorCode - ProprietaryValue uint32 + Header BACnetTagHeader + Value ErrorCode + ProprietaryValue uint32 // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +99,15 @@ func (m *_ErrorCodeTagged) GetIsProprietary() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewErrorCodeTagged factory function for _ErrorCodeTagged -func NewErrorCodeTagged(header BACnetTagHeader, value ErrorCode, proprietaryValue uint32, tagNumber uint8, tagClass TagClass) *_ErrorCodeTagged { - return &_ErrorCodeTagged{Header: header, Value: value, ProprietaryValue: proprietaryValue, TagNumber: tagNumber, TagClass: tagClass} +func NewErrorCodeTagged( header BACnetTagHeader , value ErrorCode , proprietaryValue uint32 , tagNumber uint8 , tagClass TagClass ) *_ErrorCodeTagged { +return &_ErrorCodeTagged{ Header: header , Value: value , ProprietaryValue: proprietaryValue , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastErrorCodeTagged(structType interface{}) ErrorCodeTagged { - if casted, ok := structType.(ErrorCodeTagged); ok { + if casted, ok := structType.(ErrorCodeTagged); ok { return casted } if casted, ok := structType.(*ErrorCodeTagged); ok { @@ -123,16 +127,17 @@ func (m *_ErrorCodeTagged) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += m.Header.GetLengthInBits(ctx) // Manual Field (value) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32(int32(0)) }, func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32(int32(0))}, func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}).(int32)) // A virtual field doesn't have any in- or output. // Manual Field (proprietaryValue) - lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} { return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8)))) }, func() interface{} { return int32(int32(0)) }).(int32)) + lengthInBits += uint16(utils.InlineIf(m.GetIsProprietary(), func() interface{} {return int32((int32(m.GetHeader().GetActualLength()) * int32(int32(8))))}, func() interface{} {return int32(int32(0))}).(int32)) return lengthInBits } + func (m *_ErrorCodeTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func ErrorCodeTaggedParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of ErrorCodeTagged") } @@ -164,12 +169,12 @@ func ErrorCodeTaggedParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -180,7 +185,7 @@ func ErrorCodeTaggedParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu } var value ErrorCode if _value != nil { - value = _value.(ErrorCode) + value = _value.(ErrorCode) } // Virtual field @@ -195,7 +200,7 @@ func ErrorCodeTaggedParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu } var proprietaryValue uint32 if _proprietaryValue != nil { - proprietaryValue = _proprietaryValue.(uint32) + proprietaryValue = _proprietaryValue.(uint32) } if closeErr := readBuffer.CloseContext("ErrorCodeTagged"); closeErr != nil { @@ -204,12 +209,12 @@ func ErrorCodeTaggedParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu // Create the instance return &_ErrorCodeTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - ProprietaryValue: proprietaryValue, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + ProprietaryValue: proprietaryValue, + }, nil } func (m *_ErrorCodeTagged) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_ErrorCodeTagged) Serialize() ([]byte, error) { func (m *_ErrorCodeTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("ErrorCodeTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("ErrorCodeTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for ErrorCodeTagged") } @@ -261,6 +266,7 @@ func (m *_ErrorCodeTagged) SerializeWithWriteBuffer(ctx context.Context, writeBu return nil } + //// // Arguments Getter @@ -270,7 +276,6 @@ func (m *_ErrorCodeTagged) GetTagNumber() uint8 { func (m *_ErrorCodeTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -288,3 +293,6 @@ func (m *_ErrorCodeTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/ErrorEnclosed.go b/plc4go/protocols/bacnetip/readwrite/model/ErrorEnclosed.go index 8bc1e8bfbc4..91d5030ced7 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/ErrorEnclosed.go +++ b/plc4go/protocols/bacnetip/readwrite/model/ErrorEnclosed.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ErrorEnclosed is the corresponding interface of ErrorEnclosed type ErrorEnclosed interface { @@ -48,14 +50,15 @@ type ErrorEnclosedExactly interface { // _ErrorEnclosed is the data-structure of this message type _ErrorEnclosed struct { - OpeningTag BACnetOpeningTag - Error Error - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + Error Error + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -78,14 +81,15 @@ func (m *_ErrorEnclosed) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewErrorEnclosed factory function for _ErrorEnclosed -func NewErrorEnclosed(openingTag BACnetOpeningTag, error Error, closingTag BACnetClosingTag, tagNumber uint8) *_ErrorEnclosed { - return &_ErrorEnclosed{OpeningTag: openingTag, Error: error, ClosingTag: closingTag, TagNumber: tagNumber} +func NewErrorEnclosed( openingTag BACnetOpeningTag , error Error , closingTag BACnetClosingTag , tagNumber uint8 ) *_ErrorEnclosed { +return &_ErrorEnclosed{ OpeningTag: openingTag , Error: error , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastErrorEnclosed(structType interface{}) ErrorEnclosed { - if casted, ok := structType.(ErrorEnclosed); ok { + if casted, ok := structType.(ErrorEnclosed); ok { return casted } if casted, ok := structType.(*ErrorEnclosed); ok { @@ -113,6 +117,7 @@ func (m *_ErrorEnclosed) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_ErrorEnclosed) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -134,7 +139,7 @@ func ErrorEnclosedParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of ErrorEnclosed") } @@ -147,7 +152,7 @@ func ErrorEnclosedParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff if pullErr := readBuffer.PullContext("error"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for error") } - _error, _errorErr := ErrorParseWithBuffer(ctx, readBuffer) +_error, _errorErr := ErrorParseWithBuffer(ctx, readBuffer) if _errorErr != nil { return nil, errors.Wrap(_errorErr, "Error parsing 'error' field of ErrorEnclosed") } @@ -160,7 +165,7 @@ func ErrorEnclosedParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of ErrorEnclosed") } @@ -175,11 +180,11 @@ func ErrorEnclosedParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff // Create the instance return &_ErrorEnclosed{ - TagNumber: tagNumber, - OpeningTag: openingTag, - Error: error, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + Error: error, + ClosingTag: closingTag, + }, nil } func (m *_ErrorEnclosed) Serialize() ([]byte, error) { @@ -193,7 +198,7 @@ func (m *_ErrorEnclosed) Serialize() ([]byte, error) { func (m *_ErrorEnclosed) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("ErrorEnclosed"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("ErrorEnclosed"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for ErrorEnclosed") } @@ -239,13 +244,13 @@ func (m *_ErrorEnclosed) SerializeWithWriteBuffer(ctx context.Context, writeBuff return nil } + //// // Arguments Getter func (m *_ErrorEnclosed) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -263,3 +268,6 @@ func (m *_ErrorEnclosed) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/ListOfCovNotifications.go b/plc4go/protocols/bacnetip/readwrite/model/ListOfCovNotifications.go index 9514af2e343..5dc15acf6ac 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/ListOfCovNotifications.go +++ b/plc4go/protocols/bacnetip/readwrite/model/ListOfCovNotifications.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ListOfCovNotifications is the corresponding interface of ListOfCovNotifications type ListOfCovNotifications interface { @@ -51,12 +53,13 @@ type ListOfCovNotificationsExactly interface { // _ListOfCovNotifications is the data-structure of this message type _ListOfCovNotifications struct { - MonitoredObjectIdentifier BACnetContextTagObjectIdentifier - OpeningTag BACnetOpeningTag - ListOfValues []ListOfCovNotificationsValue - ClosingTag BACnetClosingTag + MonitoredObjectIdentifier BACnetContextTagObjectIdentifier + OpeningTag BACnetOpeningTag + ListOfValues []ListOfCovNotificationsValue + ClosingTag BACnetClosingTag } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,14 +86,15 @@ func (m *_ListOfCovNotifications) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewListOfCovNotifications factory function for _ListOfCovNotifications -func NewListOfCovNotifications(monitoredObjectIdentifier BACnetContextTagObjectIdentifier, openingTag BACnetOpeningTag, listOfValues []ListOfCovNotificationsValue, closingTag BACnetClosingTag) *_ListOfCovNotifications { - return &_ListOfCovNotifications{MonitoredObjectIdentifier: monitoredObjectIdentifier, OpeningTag: openingTag, ListOfValues: listOfValues, ClosingTag: closingTag} +func NewListOfCovNotifications( monitoredObjectIdentifier BACnetContextTagObjectIdentifier , openingTag BACnetOpeningTag , listOfValues []ListOfCovNotificationsValue , closingTag BACnetClosingTag ) *_ListOfCovNotifications { +return &_ListOfCovNotifications{ MonitoredObjectIdentifier: monitoredObjectIdentifier , OpeningTag: openingTag , ListOfValues: listOfValues , ClosingTag: closingTag } } // Deprecated: use the interface for direct cast func CastListOfCovNotifications(structType interface{}) ListOfCovNotifications { - if casted, ok := structType.(ListOfCovNotifications); ok { + if casted, ok := structType.(ListOfCovNotifications); ok { return casted } if casted, ok := structType.(*ListOfCovNotifications); ok { @@ -125,6 +129,7 @@ func (m *_ListOfCovNotifications) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_ListOfCovNotifications) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -146,7 +151,7 @@ func ListOfCovNotificationsParseWithBuffer(ctx context.Context, readBuffer utils if pullErr := readBuffer.PullContext("monitoredObjectIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for monitoredObjectIdentifier") } - _monitoredObjectIdentifier, _monitoredObjectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER)) +_monitoredObjectIdentifier, _monitoredObjectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_BACNET_OBJECT_IDENTIFIER ) ) if _monitoredObjectIdentifierErr != nil { return nil, errors.Wrap(_monitoredObjectIdentifierErr, "Error parsing 'monitoredObjectIdentifier' field of ListOfCovNotifications") } @@ -159,7 +164,7 @@ func ListOfCovNotificationsParseWithBuffer(ctx context.Context, readBuffer utils if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1))) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of ListOfCovNotifications") } @@ -175,8 +180,8 @@ func ListOfCovNotificationsParseWithBuffer(ctx context.Context, readBuffer utils // Terminated array var listOfValues []ListOfCovNotificationsValue { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, 1)) { - _item, _err := ListOfCovNotificationsValueParseWithBuffer(ctx, readBuffer, monitoredObjectIdentifier.GetObjectType()) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, 1)); { +_item, _err := ListOfCovNotificationsValueParseWithBuffer(ctx, readBuffer , monitoredObjectIdentifier.GetObjectType() ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'listOfValues' field of ListOfCovNotifications") } @@ -191,7 +196,7 @@ func ListOfCovNotificationsParseWithBuffer(ctx context.Context, readBuffer utils if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(uint8(1))) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of ListOfCovNotifications") } @@ -206,11 +211,11 @@ func ListOfCovNotificationsParseWithBuffer(ctx context.Context, readBuffer utils // Create the instance return &_ListOfCovNotifications{ - MonitoredObjectIdentifier: monitoredObjectIdentifier, - OpeningTag: openingTag, - ListOfValues: listOfValues, - ClosingTag: closingTag, - }, nil + MonitoredObjectIdentifier: monitoredObjectIdentifier, + OpeningTag: openingTag, + ListOfValues: listOfValues, + ClosingTag: closingTag, + }, nil } func (m *_ListOfCovNotifications) Serialize() ([]byte, error) { @@ -224,7 +229,7 @@ func (m *_ListOfCovNotifications) Serialize() ([]byte, error) { func (m *_ListOfCovNotifications) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("ListOfCovNotifications"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("ListOfCovNotifications"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for ListOfCovNotifications") } @@ -287,6 +292,7 @@ func (m *_ListOfCovNotifications) SerializeWithWriteBuffer(ctx context.Context, return nil } + func (m *_ListOfCovNotifications) isListOfCovNotifications() bool { return true } @@ -301,3 +307,6 @@ func (m *_ListOfCovNotifications) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/ListOfCovNotificationsList.go b/plc4go/protocols/bacnetip/readwrite/model/ListOfCovNotificationsList.go index a655fac492e..22ffa1e5d53 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/ListOfCovNotificationsList.go +++ b/plc4go/protocols/bacnetip/readwrite/model/ListOfCovNotificationsList.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ListOfCovNotificationsList is the corresponding interface of ListOfCovNotificationsList type ListOfCovNotificationsList interface { @@ -49,14 +51,15 @@ type ListOfCovNotificationsListExactly interface { // _ListOfCovNotificationsList is the data-structure of this message type _ListOfCovNotificationsList struct { - OpeningTag BACnetOpeningTag - Specifications []ListOfCovNotifications - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + Specifications []ListOfCovNotifications + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -79,14 +82,15 @@ func (m *_ListOfCovNotificationsList) GetClosingTag() BACnetClosingTag { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewListOfCovNotificationsList factory function for _ListOfCovNotificationsList -func NewListOfCovNotificationsList(openingTag BACnetOpeningTag, specifications []ListOfCovNotifications, closingTag BACnetClosingTag, tagNumber uint8) *_ListOfCovNotificationsList { - return &_ListOfCovNotificationsList{OpeningTag: openingTag, Specifications: specifications, ClosingTag: closingTag, TagNumber: tagNumber} +func NewListOfCovNotificationsList( openingTag BACnetOpeningTag , specifications []ListOfCovNotifications , closingTag BACnetClosingTag , tagNumber uint8 ) *_ListOfCovNotificationsList { +return &_ListOfCovNotificationsList{ OpeningTag: openingTag , Specifications: specifications , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastListOfCovNotificationsList(structType interface{}) ListOfCovNotificationsList { - if casted, ok := structType.(ListOfCovNotificationsList); ok { + if casted, ok := structType.(ListOfCovNotificationsList); ok { return casted } if casted, ok := structType.(*ListOfCovNotificationsList); ok { @@ -118,6 +122,7 @@ func (m *_ListOfCovNotificationsList) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_ListOfCovNotificationsList) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +144,7 @@ func ListOfCovNotificationsListParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of ListOfCovNotificationsList") } @@ -155,8 +160,8 @@ func ListOfCovNotificationsListParseWithBuffer(ctx context.Context, readBuffer u // Terminated array var specifications []ListOfCovNotifications { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) { - _item, _err := ListOfCovNotificationsParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)); { +_item, _err := ListOfCovNotificationsParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'specifications' field of ListOfCovNotificationsList") } @@ -171,7 +176,7 @@ func ListOfCovNotificationsListParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of ListOfCovNotificationsList") } @@ -186,11 +191,11 @@ func ListOfCovNotificationsListParseWithBuffer(ctx context.Context, readBuffer u // Create the instance return &_ListOfCovNotificationsList{ - TagNumber: tagNumber, - OpeningTag: openingTag, - Specifications: specifications, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + Specifications: specifications, + ClosingTag: closingTag, + }, nil } func (m *_ListOfCovNotificationsList) Serialize() ([]byte, error) { @@ -204,7 +209,7 @@ func (m *_ListOfCovNotificationsList) Serialize() ([]byte, error) { func (m *_ListOfCovNotificationsList) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("ListOfCovNotificationsList"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("ListOfCovNotificationsList"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for ListOfCovNotificationsList") } @@ -255,13 +260,13 @@ func (m *_ListOfCovNotificationsList) SerializeWithWriteBuffer(ctx context.Conte return nil } + //// // Arguments Getter func (m *_ListOfCovNotificationsList) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -279,3 +284,6 @@ func (m *_ListOfCovNotificationsList) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/ListOfCovNotificationsValue.go b/plc4go/protocols/bacnetip/readwrite/model/ListOfCovNotificationsValue.go index 7ce90f959f8..90d3b11aaf0 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/ListOfCovNotificationsValue.go +++ b/plc4go/protocols/bacnetip/readwrite/model/ListOfCovNotificationsValue.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ListOfCovNotificationsValue is the corresponding interface of ListOfCovNotificationsValue type ListOfCovNotificationsValue interface { @@ -51,15 +53,16 @@ type ListOfCovNotificationsValueExactly interface { // _ListOfCovNotificationsValue is the data-structure of this message type _ListOfCovNotificationsValue struct { - PropertyIdentifier BACnetPropertyIdentifierTagged - ArrayIndex BACnetContextTagUnsignedInteger - PropertyValue BACnetConstructedData - TimeOfChange BACnetContextTagTime + PropertyIdentifier BACnetPropertyIdentifierTagged + ArrayIndex BACnetContextTagUnsignedInteger + PropertyValue BACnetConstructedData + TimeOfChange BACnetContextTagTime // Arguments. ObjectTypeArgument BACnetObjectType } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -86,14 +89,15 @@ func (m *_ListOfCovNotificationsValue) GetTimeOfChange() BACnetContextTagTime { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewListOfCovNotificationsValue factory function for _ListOfCovNotificationsValue -func NewListOfCovNotificationsValue(propertyIdentifier BACnetPropertyIdentifierTagged, arrayIndex BACnetContextTagUnsignedInteger, propertyValue BACnetConstructedData, timeOfChange BACnetContextTagTime, objectTypeArgument BACnetObjectType) *_ListOfCovNotificationsValue { - return &_ListOfCovNotificationsValue{PropertyIdentifier: propertyIdentifier, ArrayIndex: arrayIndex, PropertyValue: propertyValue, TimeOfChange: timeOfChange, ObjectTypeArgument: objectTypeArgument} +func NewListOfCovNotificationsValue( propertyIdentifier BACnetPropertyIdentifierTagged , arrayIndex BACnetContextTagUnsignedInteger , propertyValue BACnetConstructedData , timeOfChange BACnetContextTagTime , objectTypeArgument BACnetObjectType ) *_ListOfCovNotificationsValue { +return &_ListOfCovNotificationsValue{ PropertyIdentifier: propertyIdentifier , ArrayIndex: arrayIndex , PropertyValue: propertyValue , TimeOfChange: timeOfChange , ObjectTypeArgument: objectTypeArgument } } // Deprecated: use the interface for direct cast func CastListOfCovNotificationsValue(structType interface{}) ListOfCovNotificationsValue { - if casted, ok := structType.(ListOfCovNotificationsValue); ok { + if casted, ok := structType.(ListOfCovNotificationsValue); ok { return casted } if casted, ok := structType.(*ListOfCovNotificationsValue); ok { @@ -128,6 +132,7 @@ func (m *_ListOfCovNotificationsValue) GetLengthInBits(ctx context.Context) uint return lengthInBits } + func (m *_ListOfCovNotificationsValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -149,7 +154,7 @@ func ListOfCovNotificationsValueParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("propertyIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for propertyIdentifier") } - _propertyIdentifier, _propertyIdentifierErr := BACnetPropertyIdentifierTaggedParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS)) +_propertyIdentifier, _propertyIdentifierErr := BACnetPropertyIdentifierTaggedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , TagClass( TagClass_CONTEXT_SPECIFIC_TAGS ) ) if _propertyIdentifierErr != nil { return nil, errors.Wrap(_propertyIdentifierErr, "Error parsing 'propertyIdentifier' field of ListOfCovNotificationsValue") } @@ -160,12 +165,12 @@ func ListOfCovNotificationsValueParseWithBuffer(ctx context.Context, readBuffer // Optional Field (arrayIndex) (Can be skipped, if a given expression evaluates to false) var arrayIndex BACnetContextTagUnsignedInteger = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("arrayIndex"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for arrayIndex") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(1), BACnetDataType_UNSIGNED_INTEGER) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(1) , BACnetDataType_UNSIGNED_INTEGER ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -184,7 +189,7 @@ func ListOfCovNotificationsValueParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("propertyValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for propertyValue") } - _propertyValue, _propertyValueErr := BACnetConstructedDataParseWithBuffer(ctx, readBuffer, uint8(uint8(2)), BACnetObjectType(objectTypeArgument), BACnetPropertyIdentifier(propertyIdentifier.GetValue()), (CastBACnetTagPayloadUnsignedInteger(utils.InlineIf(bool((arrayIndex) != (nil)), func() interface{} { return CastBACnetTagPayloadUnsignedInteger((arrayIndex).GetPayload()) }, func() interface{} { return CastBACnetTagPayloadUnsignedInteger(nil) })))) +_propertyValue, _propertyValueErr := BACnetConstructedDataParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) , BACnetObjectType( objectTypeArgument ) , BACnetPropertyIdentifier( propertyIdentifier.GetValue() ) , (CastBACnetTagPayloadUnsignedInteger(utils.InlineIf(bool(((arrayIndex)) != (nil)), func() interface{} {return CastBACnetTagPayloadUnsignedInteger((arrayIndex).GetPayload())}, func() interface{} {return CastBACnetTagPayloadUnsignedInteger(nil)}))) ) if _propertyValueErr != nil { return nil, errors.Wrap(_propertyValueErr, "Error parsing 'propertyValue' field of ListOfCovNotificationsValue") } @@ -195,12 +200,12 @@ func ListOfCovNotificationsValueParseWithBuffer(ctx context.Context, readBuffer // Optional Field (timeOfChange) (Can be skipped, if a given expression evaluates to false) var timeOfChange BACnetContextTagTime = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("timeOfChange"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeOfChange") } - _val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(3), BACnetDataType_TIME) +_val, _err := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8(3) , BACnetDataType_TIME ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -221,12 +226,12 @@ func ListOfCovNotificationsValueParseWithBuffer(ctx context.Context, readBuffer // Create the instance return &_ListOfCovNotificationsValue{ - ObjectTypeArgument: objectTypeArgument, - PropertyIdentifier: propertyIdentifier, - ArrayIndex: arrayIndex, - PropertyValue: propertyValue, - TimeOfChange: timeOfChange, - }, nil + ObjectTypeArgument: objectTypeArgument, + PropertyIdentifier: propertyIdentifier, + ArrayIndex: arrayIndex, + PropertyValue: propertyValue, + TimeOfChange: timeOfChange, + }, nil } func (m *_ListOfCovNotificationsValue) Serialize() ([]byte, error) { @@ -240,7 +245,7 @@ func (m *_ListOfCovNotificationsValue) Serialize() ([]byte, error) { func (m *_ListOfCovNotificationsValue) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("ListOfCovNotificationsValue"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("ListOfCovNotificationsValue"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for ListOfCovNotificationsValue") } @@ -306,13 +311,13 @@ func (m *_ListOfCovNotificationsValue) SerializeWithWriteBuffer(ctx context.Cont return nil } + //// // Arguments Getter func (m *_ListOfCovNotificationsValue) GetObjectTypeArgument() BACnetObjectType { return m.ObjectTypeArgument } - // //// @@ -330,3 +335,6 @@ func (m *_ListOfCovNotificationsValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/MaxApduLengthAccepted.go b/plc4go/protocols/bacnetip/readwrite/model/MaxApduLengthAccepted.go index a748f79983f..f1756b72a7f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/MaxApduLengthAccepted.go +++ b/plc4go/protocols/bacnetip/readwrite/model/MaxApduLengthAccepted.go @@ -35,13 +35,13 @@ type IMaxApduLengthAccepted interface { NumberOfOctets() uint16 } -const ( - MaxApduLengthAccepted_MINIMUM_MESSAGE_SIZE MaxApduLengthAccepted = 0x0 - MaxApduLengthAccepted_NUM_OCTETS_128 MaxApduLengthAccepted = 0x1 - MaxApduLengthAccepted_NUM_OCTETS_206 MaxApduLengthAccepted = 0x2 - MaxApduLengthAccepted_NUM_OCTETS_480 MaxApduLengthAccepted = 0x3 - MaxApduLengthAccepted_NUM_OCTETS_1024 MaxApduLengthAccepted = 0x4 - MaxApduLengthAccepted_NUM_OCTETS_1476 MaxApduLengthAccepted = 0x5 +const( + MaxApduLengthAccepted_MINIMUM_MESSAGE_SIZE MaxApduLengthAccepted = 0x0 + MaxApduLengthAccepted_NUM_OCTETS_128 MaxApduLengthAccepted = 0x1 + MaxApduLengthAccepted_NUM_OCTETS_206 MaxApduLengthAccepted = 0x2 + MaxApduLengthAccepted_NUM_OCTETS_480 MaxApduLengthAccepted = 0x3 + MaxApduLengthAccepted_NUM_OCTETS_1024 MaxApduLengthAccepted = 0x4 + MaxApduLengthAccepted_NUM_OCTETS_1476 MaxApduLengthAccepted = 0x5 MaxApduLengthAccepted_RESERVED_BY_ASHRAE_01 MaxApduLengthAccepted = 0x6 MaxApduLengthAccepted_RESERVED_BY_ASHRAE_02 MaxApduLengthAccepted = 0x7 MaxApduLengthAccepted_RESERVED_BY_ASHRAE_03 MaxApduLengthAccepted = 0x8 @@ -58,7 +58,7 @@ var MaxApduLengthAcceptedValues []MaxApduLengthAccepted func init() { _ = errors.New - MaxApduLengthAcceptedValues = []MaxApduLengthAccepted{ + MaxApduLengthAcceptedValues = []MaxApduLengthAccepted { MaxApduLengthAccepted_MINIMUM_MESSAGE_SIZE, MaxApduLengthAccepted_NUM_OCTETS_128, MaxApduLengthAccepted_NUM_OCTETS_206, @@ -78,74 +78,58 @@ func init() { } } + func (e MaxApduLengthAccepted) NumberOfOctets() uint16 { - switch e { - case 0x0: - { /* '0x0' */ - return 50 + switch e { + case 0x0: { /* '0x0' */ + return 50 } - case 0x1: - { /* '0x1' */ - return 128 + case 0x1: { /* '0x1' */ + return 128 } - case 0x2: - { /* '0x2' */ - return 206 + case 0x2: { /* '0x2' */ + return 206 } - case 0x3: - { /* '0x3' */ - return 480 + case 0x3: { /* '0x3' */ + return 480 } - case 0x4: - { /* '0x4' */ - return 1024 + case 0x4: { /* '0x4' */ + return 1024 } - case 0x5: - { /* '0x5' */ - return 1476 + case 0x5: { /* '0x5' */ + return 1476 } - case 0x6: - { /* '0x6' */ - return 0 + case 0x6: { /* '0x6' */ + return 0 } - case 0x7: - { /* '0x7' */ - return 0 + case 0x7: { /* '0x7' */ + return 0 } - case 0x8: - { /* '0x8' */ - return 0 + case 0x8: { /* '0x8' */ + return 0 } - case 0x9: - { /* '0x9' */ - return 0 + case 0x9: { /* '0x9' */ + return 0 } - case 0xA: - { /* '0xA' */ - return 0 + case 0xA: { /* '0xA' */ + return 0 } - case 0xB: - { /* '0xB' */ - return 0 + case 0xB: { /* '0xB' */ + return 0 } - case 0xC: - { /* '0xC' */ - return 0 + case 0xC: { /* '0xC' */ + return 0 } - case 0xD: - { /* '0xD' */ - return 0 + case 0xD: { /* '0xD' */ + return 0 } - case 0xE: - { /* '0xE' */ - return 0 + case 0xE: { /* '0xE' */ + return 0 } - case 0xF: - { /* '0xF' */ - return 0 + case 0xF: { /* '0xF' */ + return 0 } - default: - { + default: { return 0 } } @@ -161,38 +145,38 @@ func MaxApduLengthAcceptedFirstEnumForFieldNumberOfOctets(value uint16) (MaxApdu } func MaxApduLengthAcceptedByValue(value uint8) (enum MaxApduLengthAccepted, ok bool) { switch value { - case 0x0: - return MaxApduLengthAccepted_MINIMUM_MESSAGE_SIZE, true - case 0x1: - return MaxApduLengthAccepted_NUM_OCTETS_128, true - case 0x2: - return MaxApduLengthAccepted_NUM_OCTETS_206, true - case 0x3: - return MaxApduLengthAccepted_NUM_OCTETS_480, true - case 0x4: - return MaxApduLengthAccepted_NUM_OCTETS_1024, true - case 0x5: - return MaxApduLengthAccepted_NUM_OCTETS_1476, true - case 0x6: - return MaxApduLengthAccepted_RESERVED_BY_ASHRAE_01, true - case 0x7: - return MaxApduLengthAccepted_RESERVED_BY_ASHRAE_02, true - case 0x8: - return MaxApduLengthAccepted_RESERVED_BY_ASHRAE_03, true - case 0x9: - return MaxApduLengthAccepted_RESERVED_BY_ASHRAE_04, true - case 0xA: - return MaxApduLengthAccepted_RESERVED_BY_ASHRAE_05, true - case 0xB: - return MaxApduLengthAccepted_RESERVED_BY_ASHRAE_06, true - case 0xC: - return MaxApduLengthAccepted_RESERVED_BY_ASHRAE_07, true - case 0xD: - return MaxApduLengthAccepted_RESERVED_BY_ASHRAE_08, true - case 0xE: - return MaxApduLengthAccepted_RESERVED_BY_ASHRAE_09, true - case 0xF: - return MaxApduLengthAccepted_RESERVED_BY_ASHRAE_10, true + case 0x0: + return MaxApduLengthAccepted_MINIMUM_MESSAGE_SIZE, true + case 0x1: + return MaxApduLengthAccepted_NUM_OCTETS_128, true + case 0x2: + return MaxApduLengthAccepted_NUM_OCTETS_206, true + case 0x3: + return MaxApduLengthAccepted_NUM_OCTETS_480, true + case 0x4: + return MaxApduLengthAccepted_NUM_OCTETS_1024, true + case 0x5: + return MaxApduLengthAccepted_NUM_OCTETS_1476, true + case 0x6: + return MaxApduLengthAccepted_RESERVED_BY_ASHRAE_01, true + case 0x7: + return MaxApduLengthAccepted_RESERVED_BY_ASHRAE_02, true + case 0x8: + return MaxApduLengthAccepted_RESERVED_BY_ASHRAE_03, true + case 0x9: + return MaxApduLengthAccepted_RESERVED_BY_ASHRAE_04, true + case 0xA: + return MaxApduLengthAccepted_RESERVED_BY_ASHRAE_05, true + case 0xB: + return MaxApduLengthAccepted_RESERVED_BY_ASHRAE_06, true + case 0xC: + return MaxApduLengthAccepted_RESERVED_BY_ASHRAE_07, true + case 0xD: + return MaxApduLengthAccepted_RESERVED_BY_ASHRAE_08, true + case 0xE: + return MaxApduLengthAccepted_RESERVED_BY_ASHRAE_09, true + case 0xF: + return MaxApduLengthAccepted_RESERVED_BY_ASHRAE_10, true } return 0, false } @@ -235,13 +219,13 @@ func MaxApduLengthAcceptedByName(value string) (enum MaxApduLengthAccepted, ok b return 0, false } -func MaxApduLengthAcceptedKnows(value uint8) bool { +func MaxApduLengthAcceptedKnows(value uint8) bool { for _, typeValue := range MaxApduLengthAcceptedValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastMaxApduLengthAccepted(structType interface{}) MaxApduLengthAccepted { @@ -333,3 +317,4 @@ func (e MaxApduLengthAccepted) PLC4XEnumName() string { func (e MaxApduLengthAccepted) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/MaxSegmentsAccepted.go b/plc4go/protocols/bacnetip/readwrite/model/MaxSegmentsAccepted.go index 7c0e4fbef88..e9bc9bb45d9 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/MaxSegmentsAccepted.go +++ b/plc4go/protocols/bacnetip/readwrite/model/MaxSegmentsAccepted.go @@ -35,14 +35,14 @@ type IMaxSegmentsAccepted interface { MaxSegments() uint8 } -const ( - MaxSegmentsAccepted_UNSPECIFIED MaxSegmentsAccepted = 0x0 - MaxSegmentsAccepted_NUM_SEGMENTS_02 MaxSegmentsAccepted = 0x1 - MaxSegmentsAccepted_NUM_SEGMENTS_04 MaxSegmentsAccepted = 0x2 - MaxSegmentsAccepted_NUM_SEGMENTS_08 MaxSegmentsAccepted = 0x3 - MaxSegmentsAccepted_NUM_SEGMENTS_16 MaxSegmentsAccepted = 0x4 - MaxSegmentsAccepted_NUM_SEGMENTS_32 MaxSegmentsAccepted = 0x5 - MaxSegmentsAccepted_NUM_SEGMENTS_64 MaxSegmentsAccepted = 0x6 +const( + MaxSegmentsAccepted_UNSPECIFIED MaxSegmentsAccepted = 0x0 + MaxSegmentsAccepted_NUM_SEGMENTS_02 MaxSegmentsAccepted = 0x1 + MaxSegmentsAccepted_NUM_SEGMENTS_04 MaxSegmentsAccepted = 0x2 + MaxSegmentsAccepted_NUM_SEGMENTS_08 MaxSegmentsAccepted = 0x3 + MaxSegmentsAccepted_NUM_SEGMENTS_16 MaxSegmentsAccepted = 0x4 + MaxSegmentsAccepted_NUM_SEGMENTS_32 MaxSegmentsAccepted = 0x5 + MaxSegmentsAccepted_NUM_SEGMENTS_64 MaxSegmentsAccepted = 0x6 MaxSegmentsAccepted_MORE_THAN_64_SEGMENTS MaxSegmentsAccepted = 0x7 ) @@ -50,7 +50,7 @@ var MaxSegmentsAcceptedValues []MaxSegmentsAccepted func init() { _ = errors.New - MaxSegmentsAcceptedValues = []MaxSegmentsAccepted{ + MaxSegmentsAcceptedValues = []MaxSegmentsAccepted { MaxSegmentsAccepted_UNSPECIFIED, MaxSegmentsAccepted_NUM_SEGMENTS_02, MaxSegmentsAccepted_NUM_SEGMENTS_04, @@ -62,42 +62,34 @@ func init() { } } + func (e MaxSegmentsAccepted) MaxSegments() uint8 { - switch e { - case 0x0: - { /* '0x0' */ - return 255 + switch e { + case 0x0: { /* '0x0' */ + return 255 } - case 0x1: - { /* '0x1' */ - return 2 + case 0x1: { /* '0x1' */ + return 2 } - case 0x2: - { /* '0x2' */ - return 4 + case 0x2: { /* '0x2' */ + return 4 } - case 0x3: - { /* '0x3' */ - return 8 + case 0x3: { /* '0x3' */ + return 8 } - case 0x4: - { /* '0x4' */ - return 16 + case 0x4: { /* '0x4' */ + return 16 } - case 0x5: - { /* '0x5' */ - return 32 + case 0x5: { /* '0x5' */ + return 32 } - case 0x6: - { /* '0x6' */ - return 64 + case 0x6: { /* '0x6' */ + return 64 } - case 0x7: - { /* '0x7' */ - return 255 + case 0x7: { /* '0x7' */ + return 255 } - default: - { + default: { return 0 } } @@ -113,22 +105,22 @@ func MaxSegmentsAcceptedFirstEnumForFieldMaxSegments(value uint8) (MaxSegmentsAc } func MaxSegmentsAcceptedByValue(value uint8) (enum MaxSegmentsAccepted, ok bool) { switch value { - case 0x0: - return MaxSegmentsAccepted_UNSPECIFIED, true - case 0x1: - return MaxSegmentsAccepted_NUM_SEGMENTS_02, true - case 0x2: - return MaxSegmentsAccepted_NUM_SEGMENTS_04, true - case 0x3: - return MaxSegmentsAccepted_NUM_SEGMENTS_08, true - case 0x4: - return MaxSegmentsAccepted_NUM_SEGMENTS_16, true - case 0x5: - return MaxSegmentsAccepted_NUM_SEGMENTS_32, true - case 0x6: - return MaxSegmentsAccepted_NUM_SEGMENTS_64, true - case 0x7: - return MaxSegmentsAccepted_MORE_THAN_64_SEGMENTS, true + case 0x0: + return MaxSegmentsAccepted_UNSPECIFIED, true + case 0x1: + return MaxSegmentsAccepted_NUM_SEGMENTS_02, true + case 0x2: + return MaxSegmentsAccepted_NUM_SEGMENTS_04, true + case 0x3: + return MaxSegmentsAccepted_NUM_SEGMENTS_08, true + case 0x4: + return MaxSegmentsAccepted_NUM_SEGMENTS_16, true + case 0x5: + return MaxSegmentsAccepted_NUM_SEGMENTS_32, true + case 0x6: + return MaxSegmentsAccepted_NUM_SEGMENTS_64, true + case 0x7: + return MaxSegmentsAccepted_MORE_THAN_64_SEGMENTS, true } return 0, false } @@ -155,13 +147,13 @@ func MaxSegmentsAcceptedByName(value string) (enum MaxSegmentsAccepted, ok bool) return 0, false } -func MaxSegmentsAcceptedKnows(value uint8) bool { +func MaxSegmentsAcceptedKnows(value uint8) bool { for _, typeValue := range MaxSegmentsAcceptedValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastMaxSegmentsAccepted(structType interface{}) MaxSegmentsAccepted { @@ -237,3 +229,4 @@ func (e MaxSegmentsAccepted) PLC4XEnumName() string { func (e MaxSegmentsAccepted) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/NLM.go b/plc4go/protocols/bacnetip/readwrite/model/NLM.go index c1da93ea9b5..9874ec807f1 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/NLM.go +++ b/plc4go/protocols/bacnetip/readwrite/model/NLM.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // NLM is the corresponding interface of NLM type NLM interface { @@ -58,6 +60,7 @@ type _NLMChildRequirements interface { GetMessageType() uint8 } + type NLMParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child NLM, serializeChildFunction func() error) error GetTypeName() string @@ -65,13 +68,12 @@ type NLMParent interface { type NLMChild interface { utils.Serializable - InitializeParent(parent NLM) +InitializeParent(parent NLM ) GetParent() *NLM GetTypeName() string NLM } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for virtual fields. @@ -80,7 +82,7 @@ type NLMChild interface { func (m *_NLM) GetIsVendorProprietaryMessage() bool { ctx := context.Background() _ = ctx - return bool(bool((m.GetMessageType()) >= (128))) + return bool(bool((m.GetMessageType()) >= ((128)))) } /////////////////////// @@ -88,14 +90,15 @@ func (m *_NLM) GetIsVendorProprietaryMessage() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewNLM factory function for _NLM -func NewNLM(apduLength uint16) *_NLM { - return &_NLM{ApduLength: apduLength} +func NewNLM( apduLength uint16 ) *_NLM { +return &_NLM{ ApduLength: apduLength } } // Deprecated: use the interface for direct cast func CastNLM(structType interface{}) NLM { - if casted, ok := structType.(NLM); ok { + if casted, ok := structType.(NLM); ok { return casted } if casted, ok := structType.(*NLM); ok { @@ -108,10 +111,11 @@ func (m *_NLM) GetTypeName() string { return "NLM" } + func (m *_NLM) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Discriminator Field (messageType) - lengthInBits += 8 + lengthInBits += 8; // A virtual field doesn't have any in- or output. @@ -142,63 +146,63 @@ func NLMParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, apduLe } // Virtual field - _isVendorProprietaryMessage := bool((messageType) >= (128)) + _isVendorProprietaryMessage := bool((messageType) >= ((128))) isVendorProprietaryMessage := bool(_isVendorProprietaryMessage) _ = isVendorProprietaryMessage // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type NLMChildSerializeRequirement interface { NLM - InitializeParent(NLM) + InitializeParent(NLM ) GetParent() NLM } var _childTemp interface{} var _child NLMChildSerializeRequirement var typeSwitchError error switch { - case messageType == 0x00: // NLMWhoIsRouterToNetwork +case messageType == 0x00 : // NLMWhoIsRouterToNetwork _childTemp, typeSwitchError = NLMWhoIsRouterToNetworkParseWithBuffer(ctx, readBuffer, apduLength) - case messageType == 0x01: // NLMIAmRouterToNetwork +case messageType == 0x01 : // NLMIAmRouterToNetwork _childTemp, typeSwitchError = NLMIAmRouterToNetworkParseWithBuffer(ctx, readBuffer, apduLength) - case messageType == 0x02: // NLMICouldBeRouterToNetwork +case messageType == 0x02 : // NLMICouldBeRouterToNetwork _childTemp, typeSwitchError = NLMICouldBeRouterToNetworkParseWithBuffer(ctx, readBuffer, apduLength) - case messageType == 0x03: // NLMRejectRouterToNetwork +case messageType == 0x03 : // NLMRejectRouterToNetwork _childTemp, typeSwitchError = NLMRejectRouterToNetworkParseWithBuffer(ctx, readBuffer, apduLength) - case messageType == 0x04: // NLMRouterBusyToNetwork +case messageType == 0x04 : // NLMRouterBusyToNetwork _childTemp, typeSwitchError = NLMRouterBusyToNetworkParseWithBuffer(ctx, readBuffer, apduLength) - case messageType == 0x05: // NLMRouterAvailableToNetwork +case messageType == 0x05 : // NLMRouterAvailableToNetwork _childTemp, typeSwitchError = NLMRouterAvailableToNetworkParseWithBuffer(ctx, readBuffer, apduLength) - case messageType == 0x06: // NLMInitalizeRoutingTable +case messageType == 0x06 : // NLMInitalizeRoutingTable _childTemp, typeSwitchError = NLMInitalizeRoutingTableParseWithBuffer(ctx, readBuffer, apduLength) - case messageType == 0x07: // NLMInitalizeRoutingTableAck +case messageType == 0x07 : // NLMInitalizeRoutingTableAck _childTemp, typeSwitchError = NLMInitalizeRoutingTableAckParseWithBuffer(ctx, readBuffer, apduLength) - case messageType == 0x08: // NLMEstablishConnectionToNetwork +case messageType == 0x08 : // NLMEstablishConnectionToNetwork _childTemp, typeSwitchError = NLMEstablishConnectionToNetworkParseWithBuffer(ctx, readBuffer, apduLength) - case messageType == 0x09: // NLMDisconnectConnectionToNetwork +case messageType == 0x09 : // NLMDisconnectConnectionToNetwork _childTemp, typeSwitchError = NLMDisconnectConnectionToNetworkParseWithBuffer(ctx, readBuffer, apduLength) - case messageType == 0x0A: // NLMChallengeRequest +case messageType == 0x0A : // NLMChallengeRequest _childTemp, typeSwitchError = NLMChallengeRequestParseWithBuffer(ctx, readBuffer, apduLength) - case messageType == 0x0B: // NLMSecurityPayload +case messageType == 0x0B : // NLMSecurityPayload _childTemp, typeSwitchError = NLMSecurityPayloadParseWithBuffer(ctx, readBuffer, apduLength) - case messageType == 0x0C: // NLMSecurityResponse +case messageType == 0x0C : // NLMSecurityResponse _childTemp, typeSwitchError = NLMSecurityResponseParseWithBuffer(ctx, readBuffer, apduLength) - case messageType == 0x0D: // NLMRequestKeyUpdate +case messageType == 0x0D : // NLMRequestKeyUpdate _childTemp, typeSwitchError = NLMRequestKeyUpdateParseWithBuffer(ctx, readBuffer, apduLength) - case messageType == 0x0E: // NLMUpdateKeyUpdate +case messageType == 0x0E : // NLMUpdateKeyUpdate _childTemp, typeSwitchError = NLMUpdateKeyUpdateParseWithBuffer(ctx, readBuffer, apduLength) - case messageType == 0x0F: // NLMUpdateKeyDistributionKey +case messageType == 0x0F : // NLMUpdateKeyDistributionKey _childTemp, typeSwitchError = NLMUpdateKeyDistributionKeyParseWithBuffer(ctx, readBuffer, apduLength) - case messageType == 0x10: // NLMRequestMasterKey +case messageType == 0x10 : // NLMRequestMasterKey _childTemp, typeSwitchError = NLMRequestMasterKeyParseWithBuffer(ctx, readBuffer, apduLength) - case messageType == 0x11: // NLMSetMasterKey +case messageType == 0x11 : // NLMSetMasterKey _childTemp, typeSwitchError = NLMSetMasterKeyParseWithBuffer(ctx, readBuffer, apduLength) - case messageType == 0x12: // NLMWhatIsNetworkNumber +case messageType == 0x12 : // NLMWhatIsNetworkNumber _childTemp, typeSwitchError = NLMWhatIsNetworkNumberParseWithBuffer(ctx, readBuffer, apduLength) - case messageType == 0x13: // NLMNetworkNumberIs +case messageType == 0x13 : // NLMNetworkNumberIs _childTemp, typeSwitchError = NLMNetworkNumberIsParseWithBuffer(ctx, readBuffer, apduLength) - case 0 == 0 && isVendorProprietaryMessage == bool(false): // NLMReserved +case 0==0 && isVendorProprietaryMessage == bool(false) : // NLMReserved _childTemp, typeSwitchError = NLMReservedParseWithBuffer(ctx, readBuffer, apduLength) - case 0 == 0: // NLMVendorProprietaryMessage +case 0==0 : // NLMVendorProprietaryMessage _childTemp, typeSwitchError = NLMVendorProprietaryMessageParseWithBuffer(ctx, readBuffer, apduLength) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [messageType=%v, isVendorProprietaryMessage=%v]", messageType, isVendorProprietaryMessage) @@ -213,7 +217,7 @@ func NLMParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, apduLe } // Finish initializing - _child.InitializeParent(_child) +_child.InitializeParent(_child ) return _child, nil } @@ -223,7 +227,7 @@ func (pm *_NLM) SerializeParent(ctx context.Context, writeBuffer utils.WriteBuff _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("NLM"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("NLM"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for NLM") } @@ -250,13 +254,13 @@ func (pm *_NLM) SerializeParent(ctx context.Context, writeBuffer utils.WriteBuff return nil } + //// // Arguments Getter func (m *_NLM) GetApduLength() uint16 { return m.ApduLength } - // //// @@ -274,3 +278,6 @@ func (m *_NLM) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/NLMChallengeRequest.go b/plc4go/protocols/bacnetip/readwrite/model/NLMChallengeRequest.go index 64b88362c8a..aba5adfd544 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/NLMChallengeRequest.go +++ b/plc4go/protocols/bacnetip/readwrite/model/NLMChallengeRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // NLMChallengeRequest is the corresponding interface of NLMChallengeRequest type NLMChallengeRequest interface { @@ -50,31 +52,31 @@ type NLMChallengeRequestExactly interface { // _NLMChallengeRequest is the data-structure of this message type _NLMChallengeRequest struct { *_NLM - MessageChallenge byte - OriginalMessageId uint32 - OriginalTimestamp uint32 + MessageChallenge byte + OriginalMessageId uint32 + OriginalTimestamp uint32 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_NLMChallengeRequest) GetMessageType() uint8 { - return 0x0A -} +func (m *_NLMChallengeRequest) GetMessageType() uint8 { +return 0x0A} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_NLMChallengeRequest) InitializeParent(parent NLM) {} +func (m *_NLMChallengeRequest) InitializeParent(parent NLM ) {} -func (m *_NLMChallengeRequest) GetParent() NLM { +func (m *_NLMChallengeRequest) GetParent() NLM { return m._NLM } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -97,13 +99,14 @@ func (m *_NLMChallengeRequest) GetOriginalTimestamp() uint32 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewNLMChallengeRequest factory function for _NLMChallengeRequest -func NewNLMChallengeRequest(messageChallenge byte, originalMessageId uint32, originalTimestamp uint32, apduLength uint16) *_NLMChallengeRequest { +func NewNLMChallengeRequest( messageChallenge byte , originalMessageId uint32 , originalTimestamp uint32 , apduLength uint16 ) *_NLMChallengeRequest { _result := &_NLMChallengeRequest{ - MessageChallenge: messageChallenge, + MessageChallenge: messageChallenge, OriginalMessageId: originalMessageId, OriginalTimestamp: originalTimestamp, - _NLM: NewNLM(apduLength), + _NLM: NewNLM(apduLength), } _result._NLM._NLMChildRequirements = _result return _result @@ -111,7 +114,7 @@ func NewNLMChallengeRequest(messageChallenge byte, originalMessageId uint32, ori // Deprecated: use the interface for direct cast func CastNLMChallengeRequest(structType interface{}) NLMChallengeRequest { - if casted, ok := structType.(NLMChallengeRequest); ok { + if casted, ok := structType.(NLMChallengeRequest); ok { return casted } if casted, ok := structType.(*NLMChallengeRequest); ok { @@ -128,17 +131,18 @@ func (m *_NLMChallengeRequest) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (messageChallenge) - lengthInBits += 8 + lengthInBits += 8; // Simple field (originalMessageId) - lengthInBits += 32 + lengthInBits += 32; // Simple field (originalTimestamp) - lengthInBits += 32 + lengthInBits += 32; return lengthInBits } + func (m *_NLMChallengeRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -157,21 +161,21 @@ func NLMChallengeRequestParseWithBuffer(ctx context.Context, readBuffer utils.Re _ = currentPos // Simple Field (messageChallenge) - _messageChallenge, _messageChallengeErr := readBuffer.ReadByte("messageChallenge") +_messageChallenge, _messageChallengeErr := readBuffer.ReadByte("messageChallenge") if _messageChallengeErr != nil { return nil, errors.Wrap(_messageChallengeErr, "Error parsing 'messageChallenge' field of NLMChallengeRequest") } messageChallenge := _messageChallenge // Simple Field (originalMessageId) - _originalMessageId, _originalMessageIdErr := readBuffer.ReadUint32("originalMessageId", 32) +_originalMessageId, _originalMessageIdErr := readBuffer.ReadUint32("originalMessageId", 32) if _originalMessageIdErr != nil { return nil, errors.Wrap(_originalMessageIdErr, "Error parsing 'originalMessageId' field of NLMChallengeRequest") } originalMessageId := _originalMessageId // Simple Field (originalTimestamp) - _originalTimestamp, _originalTimestampErr := readBuffer.ReadUint32("originalTimestamp", 32) +_originalTimestamp, _originalTimestampErr := readBuffer.ReadUint32("originalTimestamp", 32) if _originalTimestampErr != nil { return nil, errors.Wrap(_originalTimestampErr, "Error parsing 'originalTimestamp' field of NLMChallengeRequest") } @@ -186,7 +190,7 @@ func NLMChallengeRequestParseWithBuffer(ctx context.Context, readBuffer utils.Re _NLM: &_NLM{ ApduLength: apduLength, }, - MessageChallenge: messageChallenge, + MessageChallenge: messageChallenge, OriginalMessageId: originalMessageId, OriginalTimestamp: originalTimestamp, } @@ -210,26 +214,26 @@ func (m *_NLMChallengeRequest) SerializeWithWriteBuffer(ctx context.Context, wri return errors.Wrap(pushErr, "Error pushing for NLMChallengeRequest") } - // Simple Field (messageChallenge) - messageChallenge := byte(m.GetMessageChallenge()) - _messageChallengeErr := writeBuffer.WriteByte("messageChallenge", (messageChallenge)) - if _messageChallengeErr != nil { - return errors.Wrap(_messageChallengeErr, "Error serializing 'messageChallenge' field") - } + // Simple Field (messageChallenge) + messageChallenge := byte(m.GetMessageChallenge()) + _messageChallengeErr := writeBuffer.WriteByte("messageChallenge", (messageChallenge)) + if _messageChallengeErr != nil { + return errors.Wrap(_messageChallengeErr, "Error serializing 'messageChallenge' field") + } - // Simple Field (originalMessageId) - originalMessageId := uint32(m.GetOriginalMessageId()) - _originalMessageIdErr := writeBuffer.WriteUint32("originalMessageId", 32, (originalMessageId)) - if _originalMessageIdErr != nil { - return errors.Wrap(_originalMessageIdErr, "Error serializing 'originalMessageId' field") - } + // Simple Field (originalMessageId) + originalMessageId := uint32(m.GetOriginalMessageId()) + _originalMessageIdErr := writeBuffer.WriteUint32("originalMessageId", 32, (originalMessageId)) + if _originalMessageIdErr != nil { + return errors.Wrap(_originalMessageIdErr, "Error serializing 'originalMessageId' field") + } - // Simple Field (originalTimestamp) - originalTimestamp := uint32(m.GetOriginalTimestamp()) - _originalTimestampErr := writeBuffer.WriteUint32("originalTimestamp", 32, (originalTimestamp)) - if _originalTimestampErr != nil { - return errors.Wrap(_originalTimestampErr, "Error serializing 'originalTimestamp' field") - } + // Simple Field (originalTimestamp) + originalTimestamp := uint32(m.GetOriginalTimestamp()) + _originalTimestampErr := writeBuffer.WriteUint32("originalTimestamp", 32, (originalTimestamp)) + if _originalTimestampErr != nil { + return errors.Wrap(_originalTimestampErr, "Error serializing 'originalTimestamp' field") + } if popErr := writeBuffer.PopContext("NLMChallengeRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for NLMChallengeRequest") @@ -239,6 +243,7 @@ func (m *_NLMChallengeRequest) SerializeWithWriteBuffer(ctx context.Context, wri return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_NLMChallengeRequest) isNLMChallengeRequest() bool { return true } @@ -253,3 +258,6 @@ func (m *_NLMChallengeRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/NLMDisconnectConnectionToNetwork.go b/plc4go/protocols/bacnetip/readwrite/model/NLMDisconnectConnectionToNetwork.go index 812f1fc1b8c..dd4255476df 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/NLMDisconnectConnectionToNetwork.go +++ b/plc4go/protocols/bacnetip/readwrite/model/NLMDisconnectConnectionToNetwork.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // NLMDisconnectConnectionToNetwork is the corresponding interface of NLMDisconnectConnectionToNetwork type NLMDisconnectConnectionToNetwork interface { @@ -46,29 +48,29 @@ type NLMDisconnectConnectionToNetworkExactly interface { // _NLMDisconnectConnectionToNetwork is the data-structure of this message type _NLMDisconnectConnectionToNetwork struct { *_NLM - DestinationNetworkAddress uint16 + DestinationNetworkAddress uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_NLMDisconnectConnectionToNetwork) GetMessageType() uint8 { - return 0x09 -} +func (m *_NLMDisconnectConnectionToNetwork) GetMessageType() uint8 { +return 0x09} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_NLMDisconnectConnectionToNetwork) InitializeParent(parent NLM) {} +func (m *_NLMDisconnectConnectionToNetwork) InitializeParent(parent NLM ) {} -func (m *_NLMDisconnectConnectionToNetwork) GetParent() NLM { +func (m *_NLMDisconnectConnectionToNetwork) GetParent() NLM { return m._NLM } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_NLMDisconnectConnectionToNetwork) GetDestinationNetworkAddress() uint1 /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewNLMDisconnectConnectionToNetwork factory function for _NLMDisconnectConnectionToNetwork -func NewNLMDisconnectConnectionToNetwork(destinationNetworkAddress uint16, apduLength uint16) *_NLMDisconnectConnectionToNetwork { +func NewNLMDisconnectConnectionToNetwork( destinationNetworkAddress uint16 , apduLength uint16 ) *_NLMDisconnectConnectionToNetwork { _result := &_NLMDisconnectConnectionToNetwork{ DestinationNetworkAddress: destinationNetworkAddress, - _NLM: NewNLM(apduLength), + _NLM: NewNLM(apduLength), } _result._NLM._NLMChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewNLMDisconnectConnectionToNetwork(destinationNetworkAddress uint16, apduL // Deprecated: use the interface for direct cast func CastNLMDisconnectConnectionToNetwork(structType interface{}) NLMDisconnectConnectionToNetwork { - if casted, ok := structType.(NLMDisconnectConnectionToNetwork); ok { + if casted, ok := structType.(NLMDisconnectConnectionToNetwork); ok { return casted } if casted, ok := structType.(*NLMDisconnectConnectionToNetwork); ok { @@ -112,11 +115,12 @@ func (m *_NLMDisconnectConnectionToNetwork) GetLengthInBits(ctx context.Context) lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (destinationNetworkAddress) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_NLMDisconnectConnectionToNetwork) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -135,7 +139,7 @@ func NLMDisconnectConnectionToNetworkParseWithBuffer(ctx context.Context, readBu _ = currentPos // Simple Field (destinationNetworkAddress) - _destinationNetworkAddress, _destinationNetworkAddressErr := readBuffer.ReadUint16("destinationNetworkAddress", 16) +_destinationNetworkAddress, _destinationNetworkAddressErr := readBuffer.ReadUint16("destinationNetworkAddress", 16) if _destinationNetworkAddressErr != nil { return nil, errors.Wrap(_destinationNetworkAddressErr, "Error parsing 'destinationNetworkAddress' field of NLMDisconnectConnectionToNetwork") } @@ -172,12 +176,12 @@ func (m *_NLMDisconnectConnectionToNetwork) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for NLMDisconnectConnectionToNetwork") } - // Simple Field (destinationNetworkAddress) - destinationNetworkAddress := uint16(m.GetDestinationNetworkAddress()) - _destinationNetworkAddressErr := writeBuffer.WriteUint16("destinationNetworkAddress", 16, (destinationNetworkAddress)) - if _destinationNetworkAddressErr != nil { - return errors.Wrap(_destinationNetworkAddressErr, "Error serializing 'destinationNetworkAddress' field") - } + // Simple Field (destinationNetworkAddress) + destinationNetworkAddress := uint16(m.GetDestinationNetworkAddress()) + _destinationNetworkAddressErr := writeBuffer.WriteUint16("destinationNetworkAddress", 16, (destinationNetworkAddress)) + if _destinationNetworkAddressErr != nil { + return errors.Wrap(_destinationNetworkAddressErr, "Error serializing 'destinationNetworkAddress' field") + } if popErr := writeBuffer.PopContext("NLMDisconnectConnectionToNetwork"); popErr != nil { return errors.Wrap(popErr, "Error popping for NLMDisconnectConnectionToNetwork") @@ -187,6 +191,7 @@ func (m *_NLMDisconnectConnectionToNetwork) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_NLMDisconnectConnectionToNetwork) isNLMDisconnectConnectionToNetwork() bool { return true } @@ -201,3 +206,6 @@ func (m *_NLMDisconnectConnectionToNetwork) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/NLMEstablishConnectionToNetwork.go b/plc4go/protocols/bacnetip/readwrite/model/NLMEstablishConnectionToNetwork.go index a615b0db8b2..e9eae096523 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/NLMEstablishConnectionToNetwork.go +++ b/plc4go/protocols/bacnetip/readwrite/model/NLMEstablishConnectionToNetwork.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // NLMEstablishConnectionToNetwork is the corresponding interface of NLMEstablishConnectionToNetwork type NLMEstablishConnectionToNetwork interface { @@ -48,30 +50,30 @@ type NLMEstablishConnectionToNetworkExactly interface { // _NLMEstablishConnectionToNetwork is the data-structure of this message type _NLMEstablishConnectionToNetwork struct { *_NLM - DestinationNetworkAddress uint16 - TerminationTime uint8 + DestinationNetworkAddress uint16 + TerminationTime uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_NLMEstablishConnectionToNetwork) GetMessageType() uint8 { - return 0x08 -} +func (m *_NLMEstablishConnectionToNetwork) GetMessageType() uint8 { +return 0x08} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_NLMEstablishConnectionToNetwork) InitializeParent(parent NLM) {} +func (m *_NLMEstablishConnectionToNetwork) InitializeParent(parent NLM ) {} -func (m *_NLMEstablishConnectionToNetwork) GetParent() NLM { +func (m *_NLMEstablishConnectionToNetwork) GetParent() NLM { return m._NLM } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_NLMEstablishConnectionToNetwork) GetTerminationTime() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewNLMEstablishConnectionToNetwork factory function for _NLMEstablishConnectionToNetwork -func NewNLMEstablishConnectionToNetwork(destinationNetworkAddress uint16, terminationTime uint8, apduLength uint16) *_NLMEstablishConnectionToNetwork { +func NewNLMEstablishConnectionToNetwork( destinationNetworkAddress uint16 , terminationTime uint8 , apduLength uint16 ) *_NLMEstablishConnectionToNetwork { _result := &_NLMEstablishConnectionToNetwork{ DestinationNetworkAddress: destinationNetworkAddress, - TerminationTime: terminationTime, - _NLM: NewNLM(apduLength), + TerminationTime: terminationTime, + _NLM: NewNLM(apduLength), } _result._NLM._NLMChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewNLMEstablishConnectionToNetwork(destinationNetworkAddress uint16, termin // Deprecated: use the interface for direct cast func CastNLMEstablishConnectionToNetwork(structType interface{}) NLMEstablishConnectionToNetwork { - if casted, ok := structType.(NLMEstablishConnectionToNetwork); ok { + if casted, ok := structType.(NLMEstablishConnectionToNetwork); ok { return casted } if casted, ok := structType.(*NLMEstablishConnectionToNetwork); ok { @@ -120,14 +123,15 @@ func (m *_NLMEstablishConnectionToNetwork) GetLengthInBits(ctx context.Context) lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (destinationNetworkAddress) - lengthInBits += 16 + lengthInBits += 16; // Simple field (terminationTime) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_NLMEstablishConnectionToNetwork) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -146,14 +150,14 @@ func NLMEstablishConnectionToNetworkParseWithBuffer(ctx context.Context, readBuf _ = currentPos // Simple Field (destinationNetworkAddress) - _destinationNetworkAddress, _destinationNetworkAddressErr := readBuffer.ReadUint16("destinationNetworkAddress", 16) +_destinationNetworkAddress, _destinationNetworkAddressErr := readBuffer.ReadUint16("destinationNetworkAddress", 16) if _destinationNetworkAddressErr != nil { return nil, errors.Wrap(_destinationNetworkAddressErr, "Error parsing 'destinationNetworkAddress' field of NLMEstablishConnectionToNetwork") } destinationNetworkAddress := _destinationNetworkAddress // Simple Field (terminationTime) - _terminationTime, _terminationTimeErr := readBuffer.ReadUint8("terminationTime", 8) +_terminationTime, _terminationTimeErr := readBuffer.ReadUint8("terminationTime", 8) if _terminationTimeErr != nil { return nil, errors.Wrap(_terminationTimeErr, "Error parsing 'terminationTime' field of NLMEstablishConnectionToNetwork") } @@ -169,7 +173,7 @@ func NLMEstablishConnectionToNetworkParseWithBuffer(ctx context.Context, readBuf ApduLength: apduLength, }, DestinationNetworkAddress: destinationNetworkAddress, - TerminationTime: terminationTime, + TerminationTime: terminationTime, } _child._NLM._NLMChildRequirements = _child return _child, nil @@ -191,19 +195,19 @@ func (m *_NLMEstablishConnectionToNetwork) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for NLMEstablishConnectionToNetwork") } - // Simple Field (destinationNetworkAddress) - destinationNetworkAddress := uint16(m.GetDestinationNetworkAddress()) - _destinationNetworkAddressErr := writeBuffer.WriteUint16("destinationNetworkAddress", 16, (destinationNetworkAddress)) - if _destinationNetworkAddressErr != nil { - return errors.Wrap(_destinationNetworkAddressErr, "Error serializing 'destinationNetworkAddress' field") - } + // Simple Field (destinationNetworkAddress) + destinationNetworkAddress := uint16(m.GetDestinationNetworkAddress()) + _destinationNetworkAddressErr := writeBuffer.WriteUint16("destinationNetworkAddress", 16, (destinationNetworkAddress)) + if _destinationNetworkAddressErr != nil { + return errors.Wrap(_destinationNetworkAddressErr, "Error serializing 'destinationNetworkAddress' field") + } - // Simple Field (terminationTime) - terminationTime := uint8(m.GetTerminationTime()) - _terminationTimeErr := writeBuffer.WriteUint8("terminationTime", 8, (terminationTime)) - if _terminationTimeErr != nil { - return errors.Wrap(_terminationTimeErr, "Error serializing 'terminationTime' field") - } + // Simple Field (terminationTime) + terminationTime := uint8(m.GetTerminationTime()) + _terminationTimeErr := writeBuffer.WriteUint8("terminationTime", 8, (terminationTime)) + if _terminationTimeErr != nil { + return errors.Wrap(_terminationTimeErr, "Error serializing 'terminationTime' field") + } if popErr := writeBuffer.PopContext("NLMEstablishConnectionToNetwork"); popErr != nil { return errors.Wrap(popErr, "Error popping for NLMEstablishConnectionToNetwork") @@ -213,6 +217,7 @@ func (m *_NLMEstablishConnectionToNetwork) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_NLMEstablishConnectionToNetwork) isNLMEstablishConnectionToNetwork() bool { return true } @@ -227,3 +232,6 @@ func (m *_NLMEstablishConnectionToNetwork) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/NLMIAmRouterToNetwork.go b/plc4go/protocols/bacnetip/readwrite/model/NLMIAmRouterToNetwork.go index 2de39b1e760..379ecddb50d 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/NLMIAmRouterToNetwork.go +++ b/plc4go/protocols/bacnetip/readwrite/model/NLMIAmRouterToNetwork.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // NLMIAmRouterToNetwork is the corresponding interface of NLMIAmRouterToNetwork type NLMIAmRouterToNetwork interface { @@ -46,29 +48,29 @@ type NLMIAmRouterToNetworkExactly interface { // _NLMIAmRouterToNetwork is the data-structure of this message type _NLMIAmRouterToNetwork struct { *_NLM - DestinationNetworkAddresses []uint16 + DestinationNetworkAddresses []uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_NLMIAmRouterToNetwork) GetMessageType() uint8 { - return 0x01 -} +func (m *_NLMIAmRouterToNetwork) GetMessageType() uint8 { +return 0x01} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_NLMIAmRouterToNetwork) InitializeParent(parent NLM) {} +func (m *_NLMIAmRouterToNetwork) InitializeParent(parent NLM ) {} -func (m *_NLMIAmRouterToNetwork) GetParent() NLM { +func (m *_NLMIAmRouterToNetwork) GetParent() NLM { return m._NLM } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_NLMIAmRouterToNetwork) GetDestinationNetworkAddresses() []uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewNLMIAmRouterToNetwork factory function for _NLMIAmRouterToNetwork -func NewNLMIAmRouterToNetwork(destinationNetworkAddresses []uint16, apduLength uint16) *_NLMIAmRouterToNetwork { +func NewNLMIAmRouterToNetwork( destinationNetworkAddresses []uint16 , apduLength uint16 ) *_NLMIAmRouterToNetwork { _result := &_NLMIAmRouterToNetwork{ DestinationNetworkAddresses: destinationNetworkAddresses, - _NLM: NewNLM(apduLength), + _NLM: NewNLM(apduLength), } _result._NLM._NLMChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewNLMIAmRouterToNetwork(destinationNetworkAddresses []uint16, apduLength u // Deprecated: use the interface for direct cast func CastNLMIAmRouterToNetwork(structType interface{}) NLMIAmRouterToNetwork { - if casted, ok := structType.(NLMIAmRouterToNetwork); ok { + if casted, ok := structType.(NLMIAmRouterToNetwork); ok { return casted } if casted, ok := structType.(*NLMIAmRouterToNetwork); ok { @@ -119,6 +122,7 @@ func (m *_NLMIAmRouterToNetwork) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_NLMIAmRouterToNetwork) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -145,8 +149,8 @@ func NLMIAmRouterToNetworkParseWithBuffer(ctx context.Context, readBuffer utils. { _destinationNetworkAddressesLength := uint16(apduLength) - uint16(uint16(1)) _destinationNetworkAddressesEndPos := positionAware.GetPos() + uint16(_destinationNetworkAddressesLength) - for positionAware.GetPos() < _destinationNetworkAddressesEndPos { - _item, _err := readBuffer.ReadUint16("", 16) + for ;positionAware.GetPos() < _destinationNetworkAddressesEndPos; { +_item, _err := readBuffer.ReadUint16("", 16) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'destinationNetworkAddresses' field of NLMIAmRouterToNetwork") } @@ -188,20 +192,20 @@ func (m *_NLMIAmRouterToNetwork) SerializeWithWriteBuffer(ctx context.Context, w return errors.Wrap(pushErr, "Error pushing for NLMIAmRouterToNetwork") } - // Array Field (destinationNetworkAddresses) - if pushErr := writeBuffer.PushContext("destinationNetworkAddresses", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for destinationNetworkAddresses") - } - for _curItem, _element := range m.GetDestinationNetworkAddresses() { - _ = _curItem - _elementErr := writeBuffer.WriteUint16("", 16, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'destinationNetworkAddresses' field") - } - } - if popErr := writeBuffer.PopContext("destinationNetworkAddresses", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for destinationNetworkAddresses") + // Array Field (destinationNetworkAddresses) + if pushErr := writeBuffer.PushContext("destinationNetworkAddresses", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for destinationNetworkAddresses") + } + for _curItem, _element := range m.GetDestinationNetworkAddresses() { + _ = _curItem + _elementErr := writeBuffer.WriteUint16("", 16, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'destinationNetworkAddresses' field") } + } + if popErr := writeBuffer.PopContext("destinationNetworkAddresses", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for destinationNetworkAddresses") + } if popErr := writeBuffer.PopContext("NLMIAmRouterToNetwork"); popErr != nil { return errors.Wrap(popErr, "Error popping for NLMIAmRouterToNetwork") @@ -211,6 +215,7 @@ func (m *_NLMIAmRouterToNetwork) SerializeWithWriteBuffer(ctx context.Context, w return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_NLMIAmRouterToNetwork) isNLMIAmRouterToNetwork() bool { return true } @@ -225,3 +230,6 @@ func (m *_NLMIAmRouterToNetwork) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/NLMICouldBeRouterToNetwork.go b/plc4go/protocols/bacnetip/readwrite/model/NLMICouldBeRouterToNetwork.go index dc13166a339..99cdff12c55 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/NLMICouldBeRouterToNetwork.go +++ b/plc4go/protocols/bacnetip/readwrite/model/NLMICouldBeRouterToNetwork.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // NLMICouldBeRouterToNetwork is the corresponding interface of NLMICouldBeRouterToNetwork type NLMICouldBeRouterToNetwork interface { @@ -48,30 +50,30 @@ type NLMICouldBeRouterToNetworkExactly interface { // _NLMICouldBeRouterToNetwork is the data-structure of this message type _NLMICouldBeRouterToNetwork struct { *_NLM - DestinationNetworkAddress uint16 - PerformanceIndex uint8 + DestinationNetworkAddress uint16 + PerformanceIndex uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_NLMICouldBeRouterToNetwork) GetMessageType() uint8 { - return 0x02 -} +func (m *_NLMICouldBeRouterToNetwork) GetMessageType() uint8 { +return 0x02} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_NLMICouldBeRouterToNetwork) InitializeParent(parent NLM) {} +func (m *_NLMICouldBeRouterToNetwork) InitializeParent(parent NLM ) {} -func (m *_NLMICouldBeRouterToNetwork) GetParent() NLM { +func (m *_NLMICouldBeRouterToNetwork) GetParent() NLM { return m._NLM } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_NLMICouldBeRouterToNetwork) GetPerformanceIndex() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewNLMICouldBeRouterToNetwork factory function for _NLMICouldBeRouterToNetwork -func NewNLMICouldBeRouterToNetwork(destinationNetworkAddress uint16, performanceIndex uint8, apduLength uint16) *_NLMICouldBeRouterToNetwork { +func NewNLMICouldBeRouterToNetwork( destinationNetworkAddress uint16 , performanceIndex uint8 , apduLength uint16 ) *_NLMICouldBeRouterToNetwork { _result := &_NLMICouldBeRouterToNetwork{ DestinationNetworkAddress: destinationNetworkAddress, - PerformanceIndex: performanceIndex, - _NLM: NewNLM(apduLength), + PerformanceIndex: performanceIndex, + _NLM: NewNLM(apduLength), } _result._NLM._NLMChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewNLMICouldBeRouterToNetwork(destinationNetworkAddress uint16, performance // Deprecated: use the interface for direct cast func CastNLMICouldBeRouterToNetwork(structType interface{}) NLMICouldBeRouterToNetwork { - if casted, ok := structType.(NLMICouldBeRouterToNetwork); ok { + if casted, ok := structType.(NLMICouldBeRouterToNetwork); ok { return casted } if casted, ok := structType.(*NLMICouldBeRouterToNetwork); ok { @@ -120,14 +123,15 @@ func (m *_NLMICouldBeRouterToNetwork) GetLengthInBits(ctx context.Context) uint1 lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (destinationNetworkAddress) - lengthInBits += 16 + lengthInBits += 16; // Simple field (performanceIndex) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_NLMICouldBeRouterToNetwork) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -146,14 +150,14 @@ func NLMICouldBeRouterToNetworkParseWithBuffer(ctx context.Context, readBuffer u _ = currentPos // Simple Field (destinationNetworkAddress) - _destinationNetworkAddress, _destinationNetworkAddressErr := readBuffer.ReadUint16("destinationNetworkAddress", 16) +_destinationNetworkAddress, _destinationNetworkAddressErr := readBuffer.ReadUint16("destinationNetworkAddress", 16) if _destinationNetworkAddressErr != nil { return nil, errors.Wrap(_destinationNetworkAddressErr, "Error parsing 'destinationNetworkAddress' field of NLMICouldBeRouterToNetwork") } destinationNetworkAddress := _destinationNetworkAddress // Simple Field (performanceIndex) - _performanceIndex, _performanceIndexErr := readBuffer.ReadUint8("performanceIndex", 8) +_performanceIndex, _performanceIndexErr := readBuffer.ReadUint8("performanceIndex", 8) if _performanceIndexErr != nil { return nil, errors.Wrap(_performanceIndexErr, "Error parsing 'performanceIndex' field of NLMICouldBeRouterToNetwork") } @@ -169,7 +173,7 @@ func NLMICouldBeRouterToNetworkParseWithBuffer(ctx context.Context, readBuffer u ApduLength: apduLength, }, DestinationNetworkAddress: destinationNetworkAddress, - PerformanceIndex: performanceIndex, + PerformanceIndex: performanceIndex, } _child._NLM._NLMChildRequirements = _child return _child, nil @@ -191,19 +195,19 @@ func (m *_NLMICouldBeRouterToNetwork) SerializeWithWriteBuffer(ctx context.Conte return errors.Wrap(pushErr, "Error pushing for NLMICouldBeRouterToNetwork") } - // Simple Field (destinationNetworkAddress) - destinationNetworkAddress := uint16(m.GetDestinationNetworkAddress()) - _destinationNetworkAddressErr := writeBuffer.WriteUint16("destinationNetworkAddress", 16, (destinationNetworkAddress)) - if _destinationNetworkAddressErr != nil { - return errors.Wrap(_destinationNetworkAddressErr, "Error serializing 'destinationNetworkAddress' field") - } + // Simple Field (destinationNetworkAddress) + destinationNetworkAddress := uint16(m.GetDestinationNetworkAddress()) + _destinationNetworkAddressErr := writeBuffer.WriteUint16("destinationNetworkAddress", 16, (destinationNetworkAddress)) + if _destinationNetworkAddressErr != nil { + return errors.Wrap(_destinationNetworkAddressErr, "Error serializing 'destinationNetworkAddress' field") + } - // Simple Field (performanceIndex) - performanceIndex := uint8(m.GetPerformanceIndex()) - _performanceIndexErr := writeBuffer.WriteUint8("performanceIndex", 8, (performanceIndex)) - if _performanceIndexErr != nil { - return errors.Wrap(_performanceIndexErr, "Error serializing 'performanceIndex' field") - } + // Simple Field (performanceIndex) + performanceIndex := uint8(m.GetPerformanceIndex()) + _performanceIndexErr := writeBuffer.WriteUint8("performanceIndex", 8, (performanceIndex)) + if _performanceIndexErr != nil { + return errors.Wrap(_performanceIndexErr, "Error serializing 'performanceIndex' field") + } if popErr := writeBuffer.PopContext("NLMICouldBeRouterToNetwork"); popErr != nil { return errors.Wrap(popErr, "Error popping for NLMICouldBeRouterToNetwork") @@ -213,6 +217,7 @@ func (m *_NLMICouldBeRouterToNetwork) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_NLMICouldBeRouterToNetwork) isNLMICouldBeRouterToNetwork() bool { return true } @@ -227,3 +232,6 @@ func (m *_NLMICouldBeRouterToNetwork) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/NLMInitalizeRoutingTable.go b/plc4go/protocols/bacnetip/readwrite/model/NLMInitalizeRoutingTable.go index 593eca816fc..5151a7b4408 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/NLMInitalizeRoutingTable.go +++ b/plc4go/protocols/bacnetip/readwrite/model/NLMInitalizeRoutingTable.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // NLMInitalizeRoutingTable is the corresponding interface of NLMInitalizeRoutingTable type NLMInitalizeRoutingTable interface { @@ -49,30 +51,30 @@ type NLMInitalizeRoutingTableExactly interface { // _NLMInitalizeRoutingTable is the data-structure of this message type _NLMInitalizeRoutingTable struct { *_NLM - NumberOfPorts uint8 - PortMappings []NLMInitalizeRoutingTablePortMapping + NumberOfPorts uint8 + PortMappings []NLMInitalizeRoutingTablePortMapping } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_NLMInitalizeRoutingTable) GetMessageType() uint8 { - return 0x06 -} +func (m *_NLMInitalizeRoutingTable) GetMessageType() uint8 { +return 0x06} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_NLMInitalizeRoutingTable) InitializeParent(parent NLM) {} +func (m *_NLMInitalizeRoutingTable) InitializeParent(parent NLM ) {} -func (m *_NLMInitalizeRoutingTable) GetParent() NLM { +func (m *_NLMInitalizeRoutingTable) GetParent() NLM { return m._NLM } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -91,12 +93,13 @@ func (m *_NLMInitalizeRoutingTable) GetPortMappings() []NLMInitalizeRoutingTable /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewNLMInitalizeRoutingTable factory function for _NLMInitalizeRoutingTable -func NewNLMInitalizeRoutingTable(numberOfPorts uint8, portMappings []NLMInitalizeRoutingTablePortMapping, apduLength uint16) *_NLMInitalizeRoutingTable { +func NewNLMInitalizeRoutingTable( numberOfPorts uint8 , portMappings []NLMInitalizeRoutingTablePortMapping , apduLength uint16 ) *_NLMInitalizeRoutingTable { _result := &_NLMInitalizeRoutingTable{ NumberOfPorts: numberOfPorts, - PortMappings: portMappings, - _NLM: NewNLM(apduLength), + PortMappings: portMappings, + _NLM: NewNLM(apduLength), } _result._NLM._NLMChildRequirements = _result return _result @@ -104,7 +107,7 @@ func NewNLMInitalizeRoutingTable(numberOfPorts uint8, portMappings []NLMInitaliz // Deprecated: use the interface for direct cast func CastNLMInitalizeRoutingTable(structType interface{}) NLMInitalizeRoutingTable { - if casted, ok := structType.(NLMInitalizeRoutingTable); ok { + if casted, ok := structType.(NLMInitalizeRoutingTable); ok { return casted } if casted, ok := structType.(*NLMInitalizeRoutingTable); ok { @@ -121,7 +124,7 @@ func (m *_NLMInitalizeRoutingTable) GetLengthInBits(ctx context.Context) uint16 lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (numberOfPorts) - lengthInBits += 8 + lengthInBits += 8; // Array field if len(m.PortMappings) > 0 { @@ -129,13 +132,14 @@ func (m *_NLMInitalizeRoutingTable) GetLengthInBits(ctx context.Context) uint16 arrayCtx := spiContext.CreateArrayContext(ctx, len(m.PortMappings), _curItem) _ = arrayCtx _ = _curItem - lengthInBits += element.(interface{ GetLengthInBits(context.Context) uint16 }).GetLengthInBits(arrayCtx) + lengthInBits += element.(interface{GetLengthInBits(context.Context) uint16}).GetLengthInBits(arrayCtx) } } return lengthInBits } + func (m *_NLMInitalizeRoutingTable) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +158,7 @@ func NLMInitalizeRoutingTableParseWithBuffer(ctx context.Context, readBuffer uti _ = currentPos // Simple Field (numberOfPorts) - _numberOfPorts, _numberOfPortsErr := readBuffer.ReadUint8("numberOfPorts", 8) +_numberOfPorts, _numberOfPortsErr := readBuffer.ReadUint8("numberOfPorts", 8) if _numberOfPortsErr != nil { return nil, errors.Wrap(_numberOfPortsErr, "Error parsing 'numberOfPorts' field of NLMInitalizeRoutingTable") } @@ -176,7 +180,7 @@ func NLMInitalizeRoutingTableParseWithBuffer(ctx context.Context, readBuffer uti arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := NLMInitalizeRoutingTablePortMappingParseWithBuffer(arrayCtx, readBuffer) +_item, _err := NLMInitalizeRoutingTablePortMappingParseWithBuffer(arrayCtx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'portMappings' field of NLMInitalizeRoutingTable") } @@ -197,7 +201,7 @@ func NLMInitalizeRoutingTableParseWithBuffer(ctx context.Context, readBuffer uti ApduLength: apduLength, }, NumberOfPorts: numberOfPorts, - PortMappings: portMappings, + PortMappings: portMappings, } _child._NLM._NLMChildRequirements = _child return _child, nil @@ -219,29 +223,29 @@ func (m *_NLMInitalizeRoutingTable) SerializeWithWriteBuffer(ctx context.Context return errors.Wrap(pushErr, "Error pushing for NLMInitalizeRoutingTable") } - // Simple Field (numberOfPorts) - numberOfPorts := uint8(m.GetNumberOfPorts()) - _numberOfPortsErr := writeBuffer.WriteUint8("numberOfPorts", 8, (numberOfPorts)) - if _numberOfPortsErr != nil { - return errors.Wrap(_numberOfPortsErr, "Error serializing 'numberOfPorts' field") - } + // Simple Field (numberOfPorts) + numberOfPorts := uint8(m.GetNumberOfPorts()) + _numberOfPortsErr := writeBuffer.WriteUint8("numberOfPorts", 8, (numberOfPorts)) + if _numberOfPortsErr != nil { + return errors.Wrap(_numberOfPortsErr, "Error serializing 'numberOfPorts' field") + } - // Array Field (portMappings) - if pushErr := writeBuffer.PushContext("portMappings", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for portMappings") - } - for _curItem, _element := range m.GetPortMappings() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetPortMappings()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'portMappings' field") - } - } - if popErr := writeBuffer.PopContext("portMappings", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for portMappings") + // Array Field (portMappings) + if pushErr := writeBuffer.PushContext("portMappings", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for portMappings") + } + for _curItem, _element := range m.GetPortMappings() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetPortMappings()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'portMappings' field") } + } + if popErr := writeBuffer.PopContext("portMappings", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for portMappings") + } if popErr := writeBuffer.PopContext("NLMInitalizeRoutingTable"); popErr != nil { return errors.Wrap(popErr, "Error popping for NLMInitalizeRoutingTable") @@ -251,6 +255,7 @@ func (m *_NLMInitalizeRoutingTable) SerializeWithWriteBuffer(ctx context.Context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_NLMInitalizeRoutingTable) isNLMInitalizeRoutingTable() bool { return true } @@ -265,3 +270,6 @@ func (m *_NLMInitalizeRoutingTable) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/NLMInitalizeRoutingTableAck.go b/plc4go/protocols/bacnetip/readwrite/model/NLMInitalizeRoutingTableAck.go index c3df015548a..0c56b173baf 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/NLMInitalizeRoutingTableAck.go +++ b/plc4go/protocols/bacnetip/readwrite/model/NLMInitalizeRoutingTableAck.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // NLMInitalizeRoutingTableAck is the corresponding interface of NLMInitalizeRoutingTableAck type NLMInitalizeRoutingTableAck interface { @@ -49,30 +51,30 @@ type NLMInitalizeRoutingTableAckExactly interface { // _NLMInitalizeRoutingTableAck is the data-structure of this message type _NLMInitalizeRoutingTableAck struct { *_NLM - NumberOfPorts uint8 - PortMappings []NLMInitalizeRoutingTablePortMapping + NumberOfPorts uint8 + PortMappings []NLMInitalizeRoutingTablePortMapping } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_NLMInitalizeRoutingTableAck) GetMessageType() uint8 { - return 0x07 -} +func (m *_NLMInitalizeRoutingTableAck) GetMessageType() uint8 { +return 0x07} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_NLMInitalizeRoutingTableAck) InitializeParent(parent NLM) {} +func (m *_NLMInitalizeRoutingTableAck) InitializeParent(parent NLM ) {} -func (m *_NLMInitalizeRoutingTableAck) GetParent() NLM { +func (m *_NLMInitalizeRoutingTableAck) GetParent() NLM { return m._NLM } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -91,12 +93,13 @@ func (m *_NLMInitalizeRoutingTableAck) GetPortMappings() []NLMInitalizeRoutingTa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewNLMInitalizeRoutingTableAck factory function for _NLMInitalizeRoutingTableAck -func NewNLMInitalizeRoutingTableAck(numberOfPorts uint8, portMappings []NLMInitalizeRoutingTablePortMapping, apduLength uint16) *_NLMInitalizeRoutingTableAck { +func NewNLMInitalizeRoutingTableAck( numberOfPorts uint8 , portMappings []NLMInitalizeRoutingTablePortMapping , apduLength uint16 ) *_NLMInitalizeRoutingTableAck { _result := &_NLMInitalizeRoutingTableAck{ NumberOfPorts: numberOfPorts, - PortMappings: portMappings, - _NLM: NewNLM(apduLength), + PortMappings: portMappings, + _NLM: NewNLM(apduLength), } _result._NLM._NLMChildRequirements = _result return _result @@ -104,7 +107,7 @@ func NewNLMInitalizeRoutingTableAck(numberOfPorts uint8, portMappings []NLMInita // Deprecated: use the interface for direct cast func CastNLMInitalizeRoutingTableAck(structType interface{}) NLMInitalizeRoutingTableAck { - if casted, ok := structType.(NLMInitalizeRoutingTableAck); ok { + if casted, ok := structType.(NLMInitalizeRoutingTableAck); ok { return casted } if casted, ok := structType.(*NLMInitalizeRoutingTableAck); ok { @@ -121,7 +124,7 @@ func (m *_NLMInitalizeRoutingTableAck) GetLengthInBits(ctx context.Context) uint lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (numberOfPorts) - lengthInBits += 8 + lengthInBits += 8; // Array field if len(m.PortMappings) > 0 { @@ -129,13 +132,14 @@ func (m *_NLMInitalizeRoutingTableAck) GetLengthInBits(ctx context.Context) uint arrayCtx := spiContext.CreateArrayContext(ctx, len(m.PortMappings), _curItem) _ = arrayCtx _ = _curItem - lengthInBits += element.(interface{ GetLengthInBits(context.Context) uint16 }).GetLengthInBits(arrayCtx) + lengthInBits += element.(interface{GetLengthInBits(context.Context) uint16}).GetLengthInBits(arrayCtx) } } return lengthInBits } + func (m *_NLMInitalizeRoutingTableAck) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +158,7 @@ func NLMInitalizeRoutingTableAckParseWithBuffer(ctx context.Context, readBuffer _ = currentPos // Simple Field (numberOfPorts) - _numberOfPorts, _numberOfPortsErr := readBuffer.ReadUint8("numberOfPorts", 8) +_numberOfPorts, _numberOfPortsErr := readBuffer.ReadUint8("numberOfPorts", 8) if _numberOfPortsErr != nil { return nil, errors.Wrap(_numberOfPortsErr, "Error parsing 'numberOfPorts' field of NLMInitalizeRoutingTableAck") } @@ -176,7 +180,7 @@ func NLMInitalizeRoutingTableAckParseWithBuffer(ctx context.Context, readBuffer arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := NLMInitalizeRoutingTablePortMappingParseWithBuffer(arrayCtx, readBuffer) +_item, _err := NLMInitalizeRoutingTablePortMappingParseWithBuffer(arrayCtx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'portMappings' field of NLMInitalizeRoutingTableAck") } @@ -197,7 +201,7 @@ func NLMInitalizeRoutingTableAckParseWithBuffer(ctx context.Context, readBuffer ApduLength: apduLength, }, NumberOfPorts: numberOfPorts, - PortMappings: portMappings, + PortMappings: portMappings, } _child._NLM._NLMChildRequirements = _child return _child, nil @@ -219,29 +223,29 @@ func (m *_NLMInitalizeRoutingTableAck) SerializeWithWriteBuffer(ctx context.Cont return errors.Wrap(pushErr, "Error pushing for NLMInitalizeRoutingTableAck") } - // Simple Field (numberOfPorts) - numberOfPorts := uint8(m.GetNumberOfPorts()) - _numberOfPortsErr := writeBuffer.WriteUint8("numberOfPorts", 8, (numberOfPorts)) - if _numberOfPortsErr != nil { - return errors.Wrap(_numberOfPortsErr, "Error serializing 'numberOfPorts' field") - } + // Simple Field (numberOfPorts) + numberOfPorts := uint8(m.GetNumberOfPorts()) + _numberOfPortsErr := writeBuffer.WriteUint8("numberOfPorts", 8, (numberOfPorts)) + if _numberOfPortsErr != nil { + return errors.Wrap(_numberOfPortsErr, "Error serializing 'numberOfPorts' field") + } - // Array Field (portMappings) - if pushErr := writeBuffer.PushContext("portMappings", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for portMappings") - } - for _curItem, _element := range m.GetPortMappings() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetPortMappings()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'portMappings' field") - } - } - if popErr := writeBuffer.PopContext("portMappings", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for portMappings") + // Array Field (portMappings) + if pushErr := writeBuffer.PushContext("portMappings", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for portMappings") + } + for _curItem, _element := range m.GetPortMappings() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetPortMappings()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'portMappings' field") } + } + if popErr := writeBuffer.PopContext("portMappings", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for portMappings") + } if popErr := writeBuffer.PopContext("NLMInitalizeRoutingTableAck"); popErr != nil { return errors.Wrap(popErr, "Error popping for NLMInitalizeRoutingTableAck") @@ -251,6 +255,7 @@ func (m *_NLMInitalizeRoutingTableAck) SerializeWithWriteBuffer(ctx context.Cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_NLMInitalizeRoutingTableAck) isNLMInitalizeRoutingTableAck() bool { return true } @@ -265,3 +270,6 @@ func (m *_NLMInitalizeRoutingTableAck) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/NLMInitalizeRoutingTablePortMapping.go b/plc4go/protocols/bacnetip/readwrite/model/NLMInitalizeRoutingTablePortMapping.go index cf1e99bb660..fa4f7f5b569 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/NLMInitalizeRoutingTablePortMapping.go +++ b/plc4go/protocols/bacnetip/readwrite/model/NLMInitalizeRoutingTablePortMapping.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // NLMInitalizeRoutingTablePortMapping is the corresponding interface of NLMInitalizeRoutingTablePortMapping type NLMInitalizeRoutingTablePortMapping interface { @@ -50,12 +52,13 @@ type NLMInitalizeRoutingTablePortMappingExactly interface { // _NLMInitalizeRoutingTablePortMapping is the data-structure of this message type _NLMInitalizeRoutingTablePortMapping struct { - DestinationNetworkAddress uint16 - PortId uint8 - PortInfoLength uint8 - PortInfo []byte + DestinationNetworkAddress uint16 + PortId uint8 + PortInfoLength uint8 + PortInfo []byte } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -82,14 +85,15 @@ func (m *_NLMInitalizeRoutingTablePortMapping) GetPortInfo() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewNLMInitalizeRoutingTablePortMapping factory function for _NLMInitalizeRoutingTablePortMapping -func NewNLMInitalizeRoutingTablePortMapping(destinationNetworkAddress uint16, portId uint8, portInfoLength uint8, portInfo []byte) *_NLMInitalizeRoutingTablePortMapping { - return &_NLMInitalizeRoutingTablePortMapping{DestinationNetworkAddress: destinationNetworkAddress, PortId: portId, PortInfoLength: portInfoLength, PortInfo: portInfo} +func NewNLMInitalizeRoutingTablePortMapping( destinationNetworkAddress uint16 , portId uint8 , portInfoLength uint8 , portInfo []byte ) *_NLMInitalizeRoutingTablePortMapping { +return &_NLMInitalizeRoutingTablePortMapping{ DestinationNetworkAddress: destinationNetworkAddress , PortId: portId , PortInfoLength: portInfoLength , PortInfo: portInfo } } // Deprecated: use the interface for direct cast func CastNLMInitalizeRoutingTablePortMapping(structType interface{}) NLMInitalizeRoutingTablePortMapping { - if casted, ok := structType.(NLMInitalizeRoutingTablePortMapping); ok { + if casted, ok := structType.(NLMInitalizeRoutingTablePortMapping); ok { return casted } if casted, ok := structType.(*NLMInitalizeRoutingTablePortMapping); ok { @@ -106,13 +110,13 @@ func (m *_NLMInitalizeRoutingTablePortMapping) GetLengthInBits(ctx context.Conte lengthInBits := uint16(0) // Simple field (destinationNetworkAddress) - lengthInBits += 16 + lengthInBits += 16; // Simple field (portId) - lengthInBits += 8 + lengthInBits += 8; // Simple field (portInfoLength) - lengthInBits += 8 + lengthInBits += 8; // Array field if len(m.PortInfo) > 0 { @@ -122,6 +126,7 @@ func (m *_NLMInitalizeRoutingTablePortMapping) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_NLMInitalizeRoutingTablePortMapping) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -140,21 +145,21 @@ func NLMInitalizeRoutingTablePortMappingParseWithBuffer(ctx context.Context, rea _ = currentPos // Simple Field (destinationNetworkAddress) - _destinationNetworkAddress, _destinationNetworkAddressErr := readBuffer.ReadUint16("destinationNetworkAddress", 16) +_destinationNetworkAddress, _destinationNetworkAddressErr := readBuffer.ReadUint16("destinationNetworkAddress", 16) if _destinationNetworkAddressErr != nil { return nil, errors.Wrap(_destinationNetworkAddressErr, "Error parsing 'destinationNetworkAddress' field of NLMInitalizeRoutingTablePortMapping") } destinationNetworkAddress := _destinationNetworkAddress // Simple Field (portId) - _portId, _portIdErr := readBuffer.ReadUint8("portId", 8) +_portId, _portIdErr := readBuffer.ReadUint8("portId", 8) if _portIdErr != nil { return nil, errors.Wrap(_portIdErr, "Error parsing 'portId' field of NLMInitalizeRoutingTablePortMapping") } portId := _portId // Simple Field (portInfoLength) - _portInfoLength, _portInfoLengthErr := readBuffer.ReadUint8("portInfoLength", 8) +_portInfoLength, _portInfoLengthErr := readBuffer.ReadUint8("portInfoLength", 8) if _portInfoLengthErr != nil { return nil, errors.Wrap(_portInfoLengthErr, "Error parsing 'portInfoLength' field of NLMInitalizeRoutingTablePortMapping") } @@ -172,11 +177,11 @@ func NLMInitalizeRoutingTablePortMappingParseWithBuffer(ctx context.Context, rea // Create the instance return &_NLMInitalizeRoutingTablePortMapping{ - DestinationNetworkAddress: destinationNetworkAddress, - PortId: portId, - PortInfoLength: portInfoLength, - PortInfo: portInfo, - }, nil + DestinationNetworkAddress: destinationNetworkAddress, + PortId: portId, + PortInfoLength: portInfoLength, + PortInfo: portInfo, + }, nil } func (m *_NLMInitalizeRoutingTablePortMapping) Serialize() ([]byte, error) { @@ -190,7 +195,7 @@ func (m *_NLMInitalizeRoutingTablePortMapping) Serialize() ([]byte, error) { func (m *_NLMInitalizeRoutingTablePortMapping) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("NLMInitalizeRoutingTablePortMapping"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("NLMInitalizeRoutingTablePortMapping"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for NLMInitalizeRoutingTablePortMapping") } @@ -227,6 +232,7 @@ func (m *_NLMInitalizeRoutingTablePortMapping) SerializeWithWriteBuffer(ctx cont return nil } + func (m *_NLMInitalizeRoutingTablePortMapping) isNLMInitalizeRoutingTablePortMapping() bool { return true } @@ -241,3 +247,6 @@ func (m *_NLMInitalizeRoutingTablePortMapping) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/NLMNetworkNumberIs.go b/plc4go/protocols/bacnetip/readwrite/model/NLMNetworkNumberIs.go index 70d4a46b11f..732abaef84f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/NLMNetworkNumberIs.go +++ b/plc4go/protocols/bacnetip/readwrite/model/NLMNetworkNumberIs.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // NLMNetworkNumberIs is the corresponding interface of NLMNetworkNumberIs type NLMNetworkNumberIs interface { @@ -48,32 +50,32 @@ type NLMNetworkNumberIsExactly interface { // _NLMNetworkNumberIs is the data-structure of this message type _NLMNetworkNumberIs struct { *_NLM - NetworkNumber uint16 - NetworkNumberConfigured bool + NetworkNumber uint16 + NetworkNumberConfigured bool // Reserved Fields reservedField0 *uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_NLMNetworkNumberIs) GetMessageType() uint8 { - return 0x13 -} +func (m *_NLMNetworkNumberIs) GetMessageType() uint8 { +return 0x13} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_NLMNetworkNumberIs) InitializeParent(parent NLM) {} +func (m *_NLMNetworkNumberIs) InitializeParent(parent NLM ) {} -func (m *_NLMNetworkNumberIs) GetParent() NLM { +func (m *_NLMNetworkNumberIs) GetParent() NLM { return m._NLM } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,12 +94,13 @@ func (m *_NLMNetworkNumberIs) GetNetworkNumberConfigured() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewNLMNetworkNumberIs factory function for _NLMNetworkNumberIs -func NewNLMNetworkNumberIs(networkNumber uint16, networkNumberConfigured bool, apduLength uint16) *_NLMNetworkNumberIs { +func NewNLMNetworkNumberIs( networkNumber uint16 , networkNumberConfigured bool , apduLength uint16 ) *_NLMNetworkNumberIs { _result := &_NLMNetworkNumberIs{ - NetworkNumber: networkNumber, + NetworkNumber: networkNumber, NetworkNumberConfigured: networkNumberConfigured, - _NLM: NewNLM(apduLength), + _NLM: NewNLM(apduLength), } _result._NLM._NLMChildRequirements = _result return _result @@ -105,7 +108,7 @@ func NewNLMNetworkNumberIs(networkNumber uint16, networkNumberConfigured bool, a // Deprecated: use the interface for direct cast func CastNLMNetworkNumberIs(structType interface{}) NLMNetworkNumberIs { - if casted, ok := structType.(NLMNetworkNumberIs); ok { + if casted, ok := structType.(NLMNetworkNumberIs); ok { return casted } if casted, ok := structType.(*NLMNetworkNumberIs); ok { @@ -122,17 +125,18 @@ func (m *_NLMNetworkNumberIs) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (networkNumber) - lengthInBits += 16 + lengthInBits += 16; // Reserved Field (reserved) lengthInBits += 7 // Simple field (networkNumberConfigured) - lengthInBits += 1 + lengthInBits += 1; return lengthInBits } + func (m *_NLMNetworkNumberIs) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,7 +155,7 @@ func NLMNetworkNumberIsParseWithBuffer(ctx context.Context, readBuffer utils.Rea _ = currentPos // Simple Field (networkNumber) - _networkNumber, _networkNumberErr := readBuffer.ReadUint16("networkNumber", 16) +_networkNumber, _networkNumberErr := readBuffer.ReadUint16("networkNumber", 16) if _networkNumberErr != nil { return nil, errors.Wrap(_networkNumberErr, "Error parsing 'networkNumber' field of NLMNetworkNumberIs") } @@ -167,7 +171,7 @@ func NLMNetworkNumberIsParseWithBuffer(ctx context.Context, readBuffer utils.Rea if reserved != uint8(0) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -175,7 +179,7 @@ func NLMNetworkNumberIsParseWithBuffer(ctx context.Context, readBuffer utils.Rea } // Simple Field (networkNumberConfigured) - _networkNumberConfigured, _networkNumberConfiguredErr := readBuffer.ReadBit("networkNumberConfigured") +_networkNumberConfigured, _networkNumberConfiguredErr := readBuffer.ReadBit("networkNumberConfigured") if _networkNumberConfiguredErr != nil { return nil, errors.Wrap(_networkNumberConfiguredErr, "Error parsing 'networkNumberConfigured' field of NLMNetworkNumberIs") } @@ -190,9 +194,9 @@ func NLMNetworkNumberIsParseWithBuffer(ctx context.Context, readBuffer utils.Rea _NLM: &_NLM{ ApduLength: apduLength, }, - NetworkNumber: networkNumber, + NetworkNumber: networkNumber, NetworkNumberConfigured: networkNumberConfigured, - reservedField0: reservedField0, + reservedField0: reservedField0, } _child._NLM._NLMChildRequirements = _child return _child, nil @@ -214,35 +218,35 @@ func (m *_NLMNetworkNumberIs) SerializeWithWriteBuffer(ctx context.Context, writ return errors.Wrap(pushErr, "Error pushing for NLMNetworkNumberIs") } - // Simple Field (networkNumber) - networkNumber := uint16(m.GetNetworkNumber()) - _networkNumberErr := writeBuffer.WriteUint16("networkNumber", 16, (networkNumber)) - if _networkNumberErr != nil { - return errors.Wrap(_networkNumberErr, "Error serializing 'networkNumber' field") - } + // Simple Field (networkNumber) + networkNumber := uint16(m.GetNetworkNumber()) + _networkNumberErr := writeBuffer.WriteUint16("networkNumber", 16, (networkNumber)) + if _networkNumberErr != nil { + return errors.Wrap(_networkNumberErr, "Error serializing 'networkNumber' field") + } - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteUint8("reserved", 7, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 } - - // Simple Field (networkNumberConfigured) - networkNumberConfigured := bool(m.GetNetworkNumberConfigured()) - _networkNumberConfiguredErr := writeBuffer.WriteBit("networkNumberConfigured", (networkNumberConfigured)) - if _networkNumberConfiguredErr != nil { - return errors.Wrap(_networkNumberConfiguredErr, "Error serializing 'networkNumberConfigured' field") + _err := writeBuffer.WriteUint8("reserved", 7, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } + + // Simple Field (networkNumberConfigured) + networkNumberConfigured := bool(m.GetNetworkNumberConfigured()) + _networkNumberConfiguredErr := writeBuffer.WriteBit("networkNumberConfigured", (networkNumberConfigured)) + if _networkNumberConfiguredErr != nil { + return errors.Wrap(_networkNumberConfiguredErr, "Error serializing 'networkNumberConfigured' field") + } if popErr := writeBuffer.PopContext("NLMNetworkNumberIs"); popErr != nil { return errors.Wrap(popErr, "Error popping for NLMNetworkNumberIs") @@ -252,6 +256,7 @@ func (m *_NLMNetworkNumberIs) SerializeWithWriteBuffer(ctx context.Context, writ return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_NLMNetworkNumberIs) isNLMNetworkNumberIs() bool { return true } @@ -266,3 +271,6 @@ func (m *_NLMNetworkNumberIs) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/NLMRejectRouterToNetwork.go b/plc4go/protocols/bacnetip/readwrite/model/NLMRejectRouterToNetwork.go index b734958984b..4b12640ddcc 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/NLMRejectRouterToNetwork.go +++ b/plc4go/protocols/bacnetip/readwrite/model/NLMRejectRouterToNetwork.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // NLMRejectRouterToNetwork is the corresponding interface of NLMRejectRouterToNetwork type NLMRejectRouterToNetwork interface { @@ -48,30 +50,30 @@ type NLMRejectRouterToNetworkExactly interface { // _NLMRejectRouterToNetwork is the data-structure of this message type _NLMRejectRouterToNetwork struct { *_NLM - RejectReason NLMRejectRouterToNetworkRejectReason - DestinationNetworkAddress uint16 + RejectReason NLMRejectRouterToNetworkRejectReason + DestinationNetworkAddress uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_NLMRejectRouterToNetwork) GetMessageType() uint8 { - return 0x03 -} +func (m *_NLMRejectRouterToNetwork) GetMessageType() uint8 { +return 0x03} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_NLMRejectRouterToNetwork) InitializeParent(parent NLM) {} +func (m *_NLMRejectRouterToNetwork) InitializeParent(parent NLM ) {} -func (m *_NLMRejectRouterToNetwork) GetParent() NLM { +func (m *_NLMRejectRouterToNetwork) GetParent() NLM { return m._NLM } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_NLMRejectRouterToNetwork) GetDestinationNetworkAddress() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewNLMRejectRouterToNetwork factory function for _NLMRejectRouterToNetwork -func NewNLMRejectRouterToNetwork(rejectReason NLMRejectRouterToNetworkRejectReason, destinationNetworkAddress uint16, apduLength uint16) *_NLMRejectRouterToNetwork { +func NewNLMRejectRouterToNetwork( rejectReason NLMRejectRouterToNetworkRejectReason , destinationNetworkAddress uint16 , apduLength uint16 ) *_NLMRejectRouterToNetwork { _result := &_NLMRejectRouterToNetwork{ - RejectReason: rejectReason, + RejectReason: rejectReason, DestinationNetworkAddress: destinationNetworkAddress, - _NLM: NewNLM(apduLength), + _NLM: NewNLM(apduLength), } _result._NLM._NLMChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewNLMRejectRouterToNetwork(rejectReason NLMRejectRouterToNetworkRejectReas // Deprecated: use the interface for direct cast func CastNLMRejectRouterToNetwork(structType interface{}) NLMRejectRouterToNetwork { - if casted, ok := structType.(NLMRejectRouterToNetwork); ok { + if casted, ok := structType.(NLMRejectRouterToNetwork); ok { return casted } if casted, ok := structType.(*NLMRejectRouterToNetwork); ok { @@ -123,11 +126,12 @@ func (m *_NLMRejectRouterToNetwork) GetLengthInBits(ctx context.Context) uint16 lengthInBits += 8 // Simple field (destinationNetworkAddress) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_NLMRejectRouterToNetwork) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -149,7 +153,7 @@ func NLMRejectRouterToNetworkParseWithBuffer(ctx context.Context, readBuffer uti if pullErr := readBuffer.PullContext("rejectReason"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for rejectReason") } - _rejectReason, _rejectReasonErr := NLMRejectRouterToNetworkRejectReasonParseWithBuffer(ctx, readBuffer) +_rejectReason, _rejectReasonErr := NLMRejectRouterToNetworkRejectReasonParseWithBuffer(ctx, readBuffer) if _rejectReasonErr != nil { return nil, errors.Wrap(_rejectReasonErr, "Error parsing 'rejectReason' field of NLMRejectRouterToNetwork") } @@ -159,7 +163,7 @@ func NLMRejectRouterToNetworkParseWithBuffer(ctx context.Context, readBuffer uti } // Simple Field (destinationNetworkAddress) - _destinationNetworkAddress, _destinationNetworkAddressErr := readBuffer.ReadUint16("destinationNetworkAddress", 16) +_destinationNetworkAddress, _destinationNetworkAddressErr := readBuffer.ReadUint16("destinationNetworkAddress", 16) if _destinationNetworkAddressErr != nil { return nil, errors.Wrap(_destinationNetworkAddressErr, "Error parsing 'destinationNetworkAddress' field of NLMRejectRouterToNetwork") } @@ -174,7 +178,7 @@ func NLMRejectRouterToNetworkParseWithBuffer(ctx context.Context, readBuffer uti _NLM: &_NLM{ ApduLength: apduLength, }, - RejectReason: rejectReason, + RejectReason: rejectReason, DestinationNetworkAddress: destinationNetworkAddress, } _child._NLM._NLMChildRequirements = _child @@ -197,24 +201,24 @@ func (m *_NLMRejectRouterToNetwork) SerializeWithWriteBuffer(ctx context.Context return errors.Wrap(pushErr, "Error pushing for NLMRejectRouterToNetwork") } - // Simple Field (rejectReason) - if pushErr := writeBuffer.PushContext("rejectReason"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for rejectReason") - } - _rejectReasonErr := writeBuffer.WriteSerializable(ctx, m.GetRejectReason()) - if popErr := writeBuffer.PopContext("rejectReason"); popErr != nil { - return errors.Wrap(popErr, "Error popping for rejectReason") - } - if _rejectReasonErr != nil { - return errors.Wrap(_rejectReasonErr, "Error serializing 'rejectReason' field") - } + // Simple Field (rejectReason) + if pushErr := writeBuffer.PushContext("rejectReason"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for rejectReason") + } + _rejectReasonErr := writeBuffer.WriteSerializable(ctx, m.GetRejectReason()) + if popErr := writeBuffer.PopContext("rejectReason"); popErr != nil { + return errors.Wrap(popErr, "Error popping for rejectReason") + } + if _rejectReasonErr != nil { + return errors.Wrap(_rejectReasonErr, "Error serializing 'rejectReason' field") + } - // Simple Field (destinationNetworkAddress) - destinationNetworkAddress := uint16(m.GetDestinationNetworkAddress()) - _destinationNetworkAddressErr := writeBuffer.WriteUint16("destinationNetworkAddress", 16, (destinationNetworkAddress)) - if _destinationNetworkAddressErr != nil { - return errors.Wrap(_destinationNetworkAddressErr, "Error serializing 'destinationNetworkAddress' field") - } + // Simple Field (destinationNetworkAddress) + destinationNetworkAddress := uint16(m.GetDestinationNetworkAddress()) + _destinationNetworkAddressErr := writeBuffer.WriteUint16("destinationNetworkAddress", 16, (destinationNetworkAddress)) + if _destinationNetworkAddressErr != nil { + return errors.Wrap(_destinationNetworkAddressErr, "Error serializing 'destinationNetworkAddress' field") + } if popErr := writeBuffer.PopContext("NLMRejectRouterToNetwork"); popErr != nil { return errors.Wrap(popErr, "Error popping for NLMRejectRouterToNetwork") @@ -224,6 +228,7 @@ func (m *_NLMRejectRouterToNetwork) SerializeWithWriteBuffer(ctx context.Context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_NLMRejectRouterToNetwork) isNLMRejectRouterToNetwork() bool { return true } @@ -238,3 +243,6 @@ func (m *_NLMRejectRouterToNetwork) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/NLMRejectRouterToNetworkRejectReason.go b/plc4go/protocols/bacnetip/readwrite/model/NLMRejectRouterToNetworkRejectReason.go index 8baeb3557b9..e33409d793c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/NLMRejectRouterToNetworkRejectReason.go +++ b/plc4go/protocols/bacnetip/readwrite/model/NLMRejectRouterToNetworkRejectReason.go @@ -34,21 +34,21 @@ type INLMRejectRouterToNetworkRejectReason interface { utils.Serializable } -const ( - NLMRejectRouterToNetworkRejectReason_OTHER NLMRejectRouterToNetworkRejectReason = 0 +const( + NLMRejectRouterToNetworkRejectReason_OTHER NLMRejectRouterToNetworkRejectReason = 0 NLMRejectRouterToNetworkRejectReason_NOT_DIRECTLY_CONNECTED NLMRejectRouterToNetworkRejectReason = 1 - NLMRejectRouterToNetworkRejectReason_BUSY NLMRejectRouterToNetworkRejectReason = 2 - NLMRejectRouterToNetworkRejectReason_UNKNOWN_NLMT NLMRejectRouterToNetworkRejectReason = 3 - NLMRejectRouterToNetworkRejectReason_TOO_LONG NLMRejectRouterToNetworkRejectReason = 4 - NLMRejectRouterToNetworkRejectReason_SECURITY_ERROR NLMRejectRouterToNetworkRejectReason = 5 - NLMRejectRouterToNetworkRejectReason_ADDRESSING_ERROR NLMRejectRouterToNetworkRejectReason = 6 + NLMRejectRouterToNetworkRejectReason_BUSY NLMRejectRouterToNetworkRejectReason = 2 + NLMRejectRouterToNetworkRejectReason_UNKNOWN_NLMT NLMRejectRouterToNetworkRejectReason = 3 + NLMRejectRouterToNetworkRejectReason_TOO_LONG NLMRejectRouterToNetworkRejectReason = 4 + NLMRejectRouterToNetworkRejectReason_SECURITY_ERROR NLMRejectRouterToNetworkRejectReason = 5 + NLMRejectRouterToNetworkRejectReason_ADDRESSING_ERROR NLMRejectRouterToNetworkRejectReason = 6 ) var NLMRejectRouterToNetworkRejectReasonValues []NLMRejectRouterToNetworkRejectReason func init() { _ = errors.New - NLMRejectRouterToNetworkRejectReasonValues = []NLMRejectRouterToNetworkRejectReason{ + NLMRejectRouterToNetworkRejectReasonValues = []NLMRejectRouterToNetworkRejectReason { NLMRejectRouterToNetworkRejectReason_OTHER, NLMRejectRouterToNetworkRejectReason_NOT_DIRECTLY_CONNECTED, NLMRejectRouterToNetworkRejectReason_BUSY, @@ -61,20 +61,20 @@ func init() { func NLMRejectRouterToNetworkRejectReasonByValue(value uint8) (enum NLMRejectRouterToNetworkRejectReason, ok bool) { switch value { - case 0: - return NLMRejectRouterToNetworkRejectReason_OTHER, true - case 1: - return NLMRejectRouterToNetworkRejectReason_NOT_DIRECTLY_CONNECTED, true - case 2: - return NLMRejectRouterToNetworkRejectReason_BUSY, true - case 3: - return NLMRejectRouterToNetworkRejectReason_UNKNOWN_NLMT, true - case 4: - return NLMRejectRouterToNetworkRejectReason_TOO_LONG, true - case 5: - return NLMRejectRouterToNetworkRejectReason_SECURITY_ERROR, true - case 6: - return NLMRejectRouterToNetworkRejectReason_ADDRESSING_ERROR, true + case 0: + return NLMRejectRouterToNetworkRejectReason_OTHER, true + case 1: + return NLMRejectRouterToNetworkRejectReason_NOT_DIRECTLY_CONNECTED, true + case 2: + return NLMRejectRouterToNetworkRejectReason_BUSY, true + case 3: + return NLMRejectRouterToNetworkRejectReason_UNKNOWN_NLMT, true + case 4: + return NLMRejectRouterToNetworkRejectReason_TOO_LONG, true + case 5: + return NLMRejectRouterToNetworkRejectReason_SECURITY_ERROR, true + case 6: + return NLMRejectRouterToNetworkRejectReason_ADDRESSING_ERROR, true } return 0, false } @@ -99,13 +99,13 @@ func NLMRejectRouterToNetworkRejectReasonByName(value string) (enum NLMRejectRou return 0, false } -func NLMRejectRouterToNetworkRejectReasonKnows(value uint8) bool { +func NLMRejectRouterToNetworkRejectReasonKnows(value uint8) bool { for _, typeValue := range NLMRejectRouterToNetworkRejectReasonValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastNLMRejectRouterToNetworkRejectReason(structType interface{}) NLMRejectRouterToNetworkRejectReason { @@ -179,3 +179,4 @@ func (e NLMRejectRouterToNetworkRejectReason) PLC4XEnumName() string { func (e NLMRejectRouterToNetworkRejectReason) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/NLMRequestKeyUpdate.go b/plc4go/protocols/bacnetip/readwrite/model/NLMRequestKeyUpdate.go index a23b90abc27..853487258c4 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/NLMRequestKeyUpdate.go +++ b/plc4go/protocols/bacnetip/readwrite/model/NLMRequestKeyUpdate.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // NLMRequestKeyUpdate is the corresponding interface of NLMRequestKeyUpdate type NLMRequestKeyUpdate interface { @@ -58,35 +60,35 @@ type NLMRequestKeyUpdateExactly interface { // _NLMRequestKeyUpdate is the data-structure of this message type _NLMRequestKeyUpdate struct { *_NLM - Set1KeyRevision byte - Set1ActivationTime uint32 - Set1ExpirationTime uint32 - Set2KeyRevision byte - Set2ActivationTime uint32 - Set2ExpirationTime uint32 - DistributionKeyRevision byte + Set1KeyRevision byte + Set1ActivationTime uint32 + Set1ExpirationTime uint32 + Set2KeyRevision byte + Set2ActivationTime uint32 + Set2ExpirationTime uint32 + DistributionKeyRevision byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_NLMRequestKeyUpdate) GetMessageType() uint8 { - return 0x0D -} +func (m *_NLMRequestKeyUpdate) GetMessageType() uint8 { +return 0x0D} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_NLMRequestKeyUpdate) InitializeParent(parent NLM) {} +func (m *_NLMRequestKeyUpdate) InitializeParent(parent NLM ) {} -func (m *_NLMRequestKeyUpdate) GetParent() NLM { +func (m *_NLMRequestKeyUpdate) GetParent() NLM { return m._NLM } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -125,17 +127,18 @@ func (m *_NLMRequestKeyUpdate) GetDistributionKeyRevision() byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewNLMRequestKeyUpdate factory function for _NLMRequestKeyUpdate -func NewNLMRequestKeyUpdate(set1KeyRevision byte, set1ActivationTime uint32, set1ExpirationTime uint32, set2KeyRevision byte, set2ActivationTime uint32, set2ExpirationTime uint32, distributionKeyRevision byte, apduLength uint16) *_NLMRequestKeyUpdate { +func NewNLMRequestKeyUpdate( set1KeyRevision byte , set1ActivationTime uint32 , set1ExpirationTime uint32 , set2KeyRevision byte , set2ActivationTime uint32 , set2ExpirationTime uint32 , distributionKeyRevision byte , apduLength uint16 ) *_NLMRequestKeyUpdate { _result := &_NLMRequestKeyUpdate{ - Set1KeyRevision: set1KeyRevision, - Set1ActivationTime: set1ActivationTime, - Set1ExpirationTime: set1ExpirationTime, - Set2KeyRevision: set2KeyRevision, - Set2ActivationTime: set2ActivationTime, - Set2ExpirationTime: set2ExpirationTime, + Set1KeyRevision: set1KeyRevision, + Set1ActivationTime: set1ActivationTime, + Set1ExpirationTime: set1ExpirationTime, + Set2KeyRevision: set2KeyRevision, + Set2ActivationTime: set2ActivationTime, + Set2ExpirationTime: set2ExpirationTime, DistributionKeyRevision: distributionKeyRevision, - _NLM: NewNLM(apduLength), + _NLM: NewNLM(apduLength), } _result._NLM._NLMChildRequirements = _result return _result @@ -143,7 +146,7 @@ func NewNLMRequestKeyUpdate(set1KeyRevision byte, set1ActivationTime uint32, set // Deprecated: use the interface for direct cast func CastNLMRequestKeyUpdate(structType interface{}) NLMRequestKeyUpdate { - if casted, ok := structType.(NLMRequestKeyUpdate); ok { + if casted, ok := structType.(NLMRequestKeyUpdate); ok { return casted } if casted, ok := structType.(*NLMRequestKeyUpdate); ok { @@ -160,29 +163,30 @@ func (m *_NLMRequestKeyUpdate) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (set1KeyRevision) - lengthInBits += 8 + lengthInBits += 8; // Simple field (set1ActivationTime) - lengthInBits += 32 + lengthInBits += 32; // Simple field (set1ExpirationTime) - lengthInBits += 32 + lengthInBits += 32; // Simple field (set2KeyRevision) - lengthInBits += 8 + lengthInBits += 8; // Simple field (set2ActivationTime) - lengthInBits += 32 + lengthInBits += 32; // Simple field (set2ExpirationTime) - lengthInBits += 32 + lengthInBits += 32; // Simple field (distributionKeyRevision) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_NLMRequestKeyUpdate) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -201,49 +205,49 @@ func NLMRequestKeyUpdateParseWithBuffer(ctx context.Context, readBuffer utils.Re _ = currentPos // Simple Field (set1KeyRevision) - _set1KeyRevision, _set1KeyRevisionErr := readBuffer.ReadByte("set1KeyRevision") +_set1KeyRevision, _set1KeyRevisionErr := readBuffer.ReadByte("set1KeyRevision") if _set1KeyRevisionErr != nil { return nil, errors.Wrap(_set1KeyRevisionErr, "Error parsing 'set1KeyRevision' field of NLMRequestKeyUpdate") } set1KeyRevision := _set1KeyRevision // Simple Field (set1ActivationTime) - _set1ActivationTime, _set1ActivationTimeErr := readBuffer.ReadUint32("set1ActivationTime", 32) +_set1ActivationTime, _set1ActivationTimeErr := readBuffer.ReadUint32("set1ActivationTime", 32) if _set1ActivationTimeErr != nil { return nil, errors.Wrap(_set1ActivationTimeErr, "Error parsing 'set1ActivationTime' field of NLMRequestKeyUpdate") } set1ActivationTime := _set1ActivationTime // Simple Field (set1ExpirationTime) - _set1ExpirationTime, _set1ExpirationTimeErr := readBuffer.ReadUint32("set1ExpirationTime", 32) +_set1ExpirationTime, _set1ExpirationTimeErr := readBuffer.ReadUint32("set1ExpirationTime", 32) if _set1ExpirationTimeErr != nil { return nil, errors.Wrap(_set1ExpirationTimeErr, "Error parsing 'set1ExpirationTime' field of NLMRequestKeyUpdate") } set1ExpirationTime := _set1ExpirationTime // Simple Field (set2KeyRevision) - _set2KeyRevision, _set2KeyRevisionErr := readBuffer.ReadByte("set2KeyRevision") +_set2KeyRevision, _set2KeyRevisionErr := readBuffer.ReadByte("set2KeyRevision") if _set2KeyRevisionErr != nil { return nil, errors.Wrap(_set2KeyRevisionErr, "Error parsing 'set2KeyRevision' field of NLMRequestKeyUpdate") } set2KeyRevision := _set2KeyRevision // Simple Field (set2ActivationTime) - _set2ActivationTime, _set2ActivationTimeErr := readBuffer.ReadUint32("set2ActivationTime", 32) +_set2ActivationTime, _set2ActivationTimeErr := readBuffer.ReadUint32("set2ActivationTime", 32) if _set2ActivationTimeErr != nil { return nil, errors.Wrap(_set2ActivationTimeErr, "Error parsing 'set2ActivationTime' field of NLMRequestKeyUpdate") } set2ActivationTime := _set2ActivationTime // Simple Field (set2ExpirationTime) - _set2ExpirationTime, _set2ExpirationTimeErr := readBuffer.ReadUint32("set2ExpirationTime", 32) +_set2ExpirationTime, _set2ExpirationTimeErr := readBuffer.ReadUint32("set2ExpirationTime", 32) if _set2ExpirationTimeErr != nil { return nil, errors.Wrap(_set2ExpirationTimeErr, "Error parsing 'set2ExpirationTime' field of NLMRequestKeyUpdate") } set2ExpirationTime := _set2ExpirationTime // Simple Field (distributionKeyRevision) - _distributionKeyRevision, _distributionKeyRevisionErr := readBuffer.ReadByte("distributionKeyRevision") +_distributionKeyRevision, _distributionKeyRevisionErr := readBuffer.ReadByte("distributionKeyRevision") if _distributionKeyRevisionErr != nil { return nil, errors.Wrap(_distributionKeyRevisionErr, "Error parsing 'distributionKeyRevision' field of NLMRequestKeyUpdate") } @@ -258,12 +262,12 @@ func NLMRequestKeyUpdateParseWithBuffer(ctx context.Context, readBuffer utils.Re _NLM: &_NLM{ ApduLength: apduLength, }, - Set1KeyRevision: set1KeyRevision, - Set1ActivationTime: set1ActivationTime, - Set1ExpirationTime: set1ExpirationTime, - Set2KeyRevision: set2KeyRevision, - Set2ActivationTime: set2ActivationTime, - Set2ExpirationTime: set2ExpirationTime, + Set1KeyRevision: set1KeyRevision, + Set1ActivationTime: set1ActivationTime, + Set1ExpirationTime: set1ExpirationTime, + Set2KeyRevision: set2KeyRevision, + Set2ActivationTime: set2ActivationTime, + Set2ExpirationTime: set2ExpirationTime, DistributionKeyRevision: distributionKeyRevision, } _child._NLM._NLMChildRequirements = _child @@ -286,54 +290,54 @@ func (m *_NLMRequestKeyUpdate) SerializeWithWriteBuffer(ctx context.Context, wri return errors.Wrap(pushErr, "Error pushing for NLMRequestKeyUpdate") } - // Simple Field (set1KeyRevision) - set1KeyRevision := byte(m.GetSet1KeyRevision()) - _set1KeyRevisionErr := writeBuffer.WriteByte("set1KeyRevision", (set1KeyRevision)) - if _set1KeyRevisionErr != nil { - return errors.Wrap(_set1KeyRevisionErr, "Error serializing 'set1KeyRevision' field") - } + // Simple Field (set1KeyRevision) + set1KeyRevision := byte(m.GetSet1KeyRevision()) + _set1KeyRevisionErr := writeBuffer.WriteByte("set1KeyRevision", (set1KeyRevision)) + if _set1KeyRevisionErr != nil { + return errors.Wrap(_set1KeyRevisionErr, "Error serializing 'set1KeyRevision' field") + } - // Simple Field (set1ActivationTime) - set1ActivationTime := uint32(m.GetSet1ActivationTime()) - _set1ActivationTimeErr := writeBuffer.WriteUint32("set1ActivationTime", 32, (set1ActivationTime)) - if _set1ActivationTimeErr != nil { - return errors.Wrap(_set1ActivationTimeErr, "Error serializing 'set1ActivationTime' field") - } + // Simple Field (set1ActivationTime) + set1ActivationTime := uint32(m.GetSet1ActivationTime()) + _set1ActivationTimeErr := writeBuffer.WriteUint32("set1ActivationTime", 32, (set1ActivationTime)) + if _set1ActivationTimeErr != nil { + return errors.Wrap(_set1ActivationTimeErr, "Error serializing 'set1ActivationTime' field") + } - // Simple Field (set1ExpirationTime) - set1ExpirationTime := uint32(m.GetSet1ExpirationTime()) - _set1ExpirationTimeErr := writeBuffer.WriteUint32("set1ExpirationTime", 32, (set1ExpirationTime)) - if _set1ExpirationTimeErr != nil { - return errors.Wrap(_set1ExpirationTimeErr, "Error serializing 'set1ExpirationTime' field") - } + // Simple Field (set1ExpirationTime) + set1ExpirationTime := uint32(m.GetSet1ExpirationTime()) + _set1ExpirationTimeErr := writeBuffer.WriteUint32("set1ExpirationTime", 32, (set1ExpirationTime)) + if _set1ExpirationTimeErr != nil { + return errors.Wrap(_set1ExpirationTimeErr, "Error serializing 'set1ExpirationTime' field") + } - // Simple Field (set2KeyRevision) - set2KeyRevision := byte(m.GetSet2KeyRevision()) - _set2KeyRevisionErr := writeBuffer.WriteByte("set2KeyRevision", (set2KeyRevision)) - if _set2KeyRevisionErr != nil { - return errors.Wrap(_set2KeyRevisionErr, "Error serializing 'set2KeyRevision' field") - } + // Simple Field (set2KeyRevision) + set2KeyRevision := byte(m.GetSet2KeyRevision()) + _set2KeyRevisionErr := writeBuffer.WriteByte("set2KeyRevision", (set2KeyRevision)) + if _set2KeyRevisionErr != nil { + return errors.Wrap(_set2KeyRevisionErr, "Error serializing 'set2KeyRevision' field") + } - // Simple Field (set2ActivationTime) - set2ActivationTime := uint32(m.GetSet2ActivationTime()) - _set2ActivationTimeErr := writeBuffer.WriteUint32("set2ActivationTime", 32, (set2ActivationTime)) - if _set2ActivationTimeErr != nil { - return errors.Wrap(_set2ActivationTimeErr, "Error serializing 'set2ActivationTime' field") - } + // Simple Field (set2ActivationTime) + set2ActivationTime := uint32(m.GetSet2ActivationTime()) + _set2ActivationTimeErr := writeBuffer.WriteUint32("set2ActivationTime", 32, (set2ActivationTime)) + if _set2ActivationTimeErr != nil { + return errors.Wrap(_set2ActivationTimeErr, "Error serializing 'set2ActivationTime' field") + } - // Simple Field (set2ExpirationTime) - set2ExpirationTime := uint32(m.GetSet2ExpirationTime()) - _set2ExpirationTimeErr := writeBuffer.WriteUint32("set2ExpirationTime", 32, (set2ExpirationTime)) - if _set2ExpirationTimeErr != nil { - return errors.Wrap(_set2ExpirationTimeErr, "Error serializing 'set2ExpirationTime' field") - } + // Simple Field (set2ExpirationTime) + set2ExpirationTime := uint32(m.GetSet2ExpirationTime()) + _set2ExpirationTimeErr := writeBuffer.WriteUint32("set2ExpirationTime", 32, (set2ExpirationTime)) + if _set2ExpirationTimeErr != nil { + return errors.Wrap(_set2ExpirationTimeErr, "Error serializing 'set2ExpirationTime' field") + } - // Simple Field (distributionKeyRevision) - distributionKeyRevision := byte(m.GetDistributionKeyRevision()) - _distributionKeyRevisionErr := writeBuffer.WriteByte("distributionKeyRevision", (distributionKeyRevision)) - if _distributionKeyRevisionErr != nil { - return errors.Wrap(_distributionKeyRevisionErr, "Error serializing 'distributionKeyRevision' field") - } + // Simple Field (distributionKeyRevision) + distributionKeyRevision := byte(m.GetDistributionKeyRevision()) + _distributionKeyRevisionErr := writeBuffer.WriteByte("distributionKeyRevision", (distributionKeyRevision)) + if _distributionKeyRevisionErr != nil { + return errors.Wrap(_distributionKeyRevisionErr, "Error serializing 'distributionKeyRevision' field") + } if popErr := writeBuffer.PopContext("NLMRequestKeyUpdate"); popErr != nil { return errors.Wrap(popErr, "Error popping for NLMRequestKeyUpdate") @@ -343,6 +347,7 @@ func (m *_NLMRequestKeyUpdate) SerializeWithWriteBuffer(ctx context.Context, wri return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_NLMRequestKeyUpdate) isNLMRequestKeyUpdate() bool { return true } @@ -357,3 +362,6 @@ func (m *_NLMRequestKeyUpdate) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/NLMRequestMasterKey.go b/plc4go/protocols/bacnetip/readwrite/model/NLMRequestMasterKey.go index 3e3b1646182..42d499dd08f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/NLMRequestMasterKey.go +++ b/plc4go/protocols/bacnetip/readwrite/model/NLMRequestMasterKey.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // NLMRequestMasterKey is the corresponding interface of NLMRequestMasterKey type NLMRequestMasterKey interface { @@ -48,30 +50,30 @@ type NLMRequestMasterKeyExactly interface { // _NLMRequestMasterKey is the data-structure of this message type _NLMRequestMasterKey struct { *_NLM - NumberOfSupportedKeyAlgorithms uint8 - EncryptionAndSignatureAlgorithms []byte + NumberOfSupportedKeyAlgorithms uint8 + EncryptionAndSignatureAlgorithms []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_NLMRequestMasterKey) GetMessageType() uint8 { - return 0x10 -} +func (m *_NLMRequestMasterKey) GetMessageType() uint8 { +return 0x10} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_NLMRequestMasterKey) InitializeParent(parent NLM) {} +func (m *_NLMRequestMasterKey) InitializeParent(parent NLM ) {} -func (m *_NLMRequestMasterKey) GetParent() NLM { +func (m *_NLMRequestMasterKey) GetParent() NLM { return m._NLM } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_NLMRequestMasterKey) GetEncryptionAndSignatureAlgorithms() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewNLMRequestMasterKey factory function for _NLMRequestMasterKey -func NewNLMRequestMasterKey(numberOfSupportedKeyAlgorithms uint8, encryptionAndSignatureAlgorithms []byte, apduLength uint16) *_NLMRequestMasterKey { +func NewNLMRequestMasterKey( numberOfSupportedKeyAlgorithms uint8 , encryptionAndSignatureAlgorithms []byte , apduLength uint16 ) *_NLMRequestMasterKey { _result := &_NLMRequestMasterKey{ - NumberOfSupportedKeyAlgorithms: numberOfSupportedKeyAlgorithms, + NumberOfSupportedKeyAlgorithms: numberOfSupportedKeyAlgorithms, EncryptionAndSignatureAlgorithms: encryptionAndSignatureAlgorithms, - _NLM: NewNLM(apduLength), + _NLM: NewNLM(apduLength), } _result._NLM._NLMChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewNLMRequestMasterKey(numberOfSupportedKeyAlgorithms uint8, encryptionAndS // Deprecated: use the interface for direct cast func CastNLMRequestMasterKey(structType interface{}) NLMRequestMasterKey { - if casted, ok := structType.(NLMRequestMasterKey); ok { + if casted, ok := structType.(NLMRequestMasterKey); ok { return casted } if casted, ok := structType.(*NLMRequestMasterKey); ok { @@ -120,7 +123,7 @@ func (m *_NLMRequestMasterKey) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (numberOfSupportedKeyAlgorithms) - lengthInBits += 8 + lengthInBits += 8; // Array field if len(m.EncryptionAndSignatureAlgorithms) > 0 { @@ -130,6 +133,7 @@ func (m *_NLMRequestMasterKey) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_NLMRequestMasterKey) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -148,7 +152,7 @@ func NLMRequestMasterKeyParseWithBuffer(ctx context.Context, readBuffer utils.Re _ = currentPos // Simple Field (numberOfSupportedKeyAlgorithms) - _numberOfSupportedKeyAlgorithms, _numberOfSupportedKeyAlgorithmsErr := readBuffer.ReadUint8("numberOfSupportedKeyAlgorithms", 8) +_numberOfSupportedKeyAlgorithms, _numberOfSupportedKeyAlgorithmsErr := readBuffer.ReadUint8("numberOfSupportedKeyAlgorithms", 8) if _numberOfSupportedKeyAlgorithmsErr != nil { return nil, errors.Wrap(_numberOfSupportedKeyAlgorithmsErr, "Error parsing 'numberOfSupportedKeyAlgorithms' field of NLMRequestMasterKey") } @@ -169,7 +173,7 @@ func NLMRequestMasterKeyParseWithBuffer(ctx context.Context, readBuffer utils.Re _NLM: &_NLM{ ApduLength: apduLength, }, - NumberOfSupportedKeyAlgorithms: numberOfSupportedKeyAlgorithms, + NumberOfSupportedKeyAlgorithms: numberOfSupportedKeyAlgorithms, EncryptionAndSignatureAlgorithms: encryptionAndSignatureAlgorithms, } _child._NLM._NLMChildRequirements = _child @@ -192,18 +196,18 @@ func (m *_NLMRequestMasterKey) SerializeWithWriteBuffer(ctx context.Context, wri return errors.Wrap(pushErr, "Error pushing for NLMRequestMasterKey") } - // Simple Field (numberOfSupportedKeyAlgorithms) - numberOfSupportedKeyAlgorithms := uint8(m.GetNumberOfSupportedKeyAlgorithms()) - _numberOfSupportedKeyAlgorithmsErr := writeBuffer.WriteUint8("numberOfSupportedKeyAlgorithms", 8, (numberOfSupportedKeyAlgorithms)) - if _numberOfSupportedKeyAlgorithmsErr != nil { - return errors.Wrap(_numberOfSupportedKeyAlgorithmsErr, "Error serializing 'numberOfSupportedKeyAlgorithms' field") - } + // Simple Field (numberOfSupportedKeyAlgorithms) + numberOfSupportedKeyAlgorithms := uint8(m.GetNumberOfSupportedKeyAlgorithms()) + _numberOfSupportedKeyAlgorithmsErr := writeBuffer.WriteUint8("numberOfSupportedKeyAlgorithms", 8, (numberOfSupportedKeyAlgorithms)) + if _numberOfSupportedKeyAlgorithmsErr != nil { + return errors.Wrap(_numberOfSupportedKeyAlgorithmsErr, "Error serializing 'numberOfSupportedKeyAlgorithms' field") + } - // Array Field (encryptionAndSignatureAlgorithms) - // Byte Array field (encryptionAndSignatureAlgorithms) - if err := writeBuffer.WriteByteArray("encryptionAndSignatureAlgorithms", m.GetEncryptionAndSignatureAlgorithms()); err != nil { - return errors.Wrap(err, "Error serializing 'encryptionAndSignatureAlgorithms' field") - } + // Array Field (encryptionAndSignatureAlgorithms) + // Byte Array field (encryptionAndSignatureAlgorithms) + if err := writeBuffer.WriteByteArray("encryptionAndSignatureAlgorithms", m.GetEncryptionAndSignatureAlgorithms()); err != nil { + return errors.Wrap(err, "Error serializing 'encryptionAndSignatureAlgorithms' field") + } if popErr := writeBuffer.PopContext("NLMRequestMasterKey"); popErr != nil { return errors.Wrap(popErr, "Error popping for NLMRequestMasterKey") @@ -213,6 +217,7 @@ func (m *_NLMRequestMasterKey) SerializeWithWriteBuffer(ctx context.Context, wri return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_NLMRequestMasterKey) isNLMRequestMasterKey() bool { return true } @@ -227,3 +232,6 @@ func (m *_NLMRequestMasterKey) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/NLMReserved.go b/plc4go/protocols/bacnetip/readwrite/model/NLMReserved.go index b9a7b6a04fc..d10a9997050 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/NLMReserved.go +++ b/plc4go/protocols/bacnetip/readwrite/model/NLMReserved.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // NLMReserved is the corresponding interface of NLMReserved type NLMReserved interface { @@ -46,29 +48,29 @@ type NLMReservedExactly interface { // _NLMReserved is the data-structure of this message type _NLMReserved struct { *_NLM - UnknownBytes []byte + UnknownBytes []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_NLMReserved) GetMessageType() uint8 { - return 0 -} +func (m *_NLMReserved) GetMessageType() uint8 { +return 0} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_NLMReserved) InitializeParent(parent NLM) {} +func (m *_NLMReserved) InitializeParent(parent NLM ) {} -func (m *_NLMReserved) GetParent() NLM { +func (m *_NLMReserved) GetParent() NLM { return m._NLM } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_NLMReserved) GetUnknownBytes() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewNLMReserved factory function for _NLMReserved -func NewNLMReserved(unknownBytes []byte, apduLength uint16) *_NLMReserved { +func NewNLMReserved( unknownBytes []byte , apduLength uint16 ) *_NLMReserved { _result := &_NLMReserved{ UnknownBytes: unknownBytes, - _NLM: NewNLM(apduLength), + _NLM: NewNLM(apduLength), } _result._NLM._NLMChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewNLMReserved(unknownBytes []byte, apduLength uint16) *_NLMReserved { // Deprecated: use the interface for direct cast func CastNLMReserved(structType interface{}) NLMReserved { - if casted, ok := structType.(NLMReserved); ok { + if casted, ok := structType.(NLMReserved); ok { return casted } if casted, ok := structType.(*NLMReserved); ok { @@ -119,6 +122,7 @@ func (m *_NLMReserved) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_NLMReserved) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func NLMReservedParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer currentPos := positionAware.GetPos() _ = currentPos // Byte Array field (unknownBytes) - numberOfBytesunknownBytes := int(utils.InlineIf((bool((apduLength) > (0))), func() interface{} { return uint16((uint16(apduLength) - uint16(uint16(1)))) }, func() interface{} { return uint16(uint16(0)) }).(uint16)) + numberOfBytesunknownBytes := int(utils.InlineIf((bool((apduLength) > ((0)))), func() interface{} {return uint16((uint16(apduLength) - uint16(uint16(1))))}, func() interface{} {return uint16(uint16(0))}).(uint16)) unknownBytes, _readArrayErr := readBuffer.ReadByteArray("unknownBytes", numberOfBytesunknownBytes) if _readArrayErr != nil { return nil, errors.Wrap(_readArrayErr, "Error parsing 'unknownBytes' field of NLMReserved") @@ -173,11 +177,11 @@ func (m *_NLMReserved) SerializeWithWriteBuffer(ctx context.Context, writeBuffer return errors.Wrap(pushErr, "Error pushing for NLMReserved") } - // Array Field (unknownBytes) - // Byte Array field (unknownBytes) - if err := writeBuffer.WriteByteArray("unknownBytes", m.GetUnknownBytes()); err != nil { - return errors.Wrap(err, "Error serializing 'unknownBytes' field") - } + // Array Field (unknownBytes) + // Byte Array field (unknownBytes) + if err := writeBuffer.WriteByteArray("unknownBytes", m.GetUnknownBytes()); err != nil { + return errors.Wrap(err, "Error serializing 'unknownBytes' field") + } if popErr := writeBuffer.PopContext("NLMReserved"); popErr != nil { return errors.Wrap(popErr, "Error popping for NLMReserved") @@ -187,6 +191,7 @@ func (m *_NLMReserved) SerializeWithWriteBuffer(ctx context.Context, writeBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_NLMReserved) isNLMReserved() bool { return true } @@ -201,3 +206,6 @@ func (m *_NLMReserved) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/NLMRouterAvailableToNetwork.go b/plc4go/protocols/bacnetip/readwrite/model/NLMRouterAvailableToNetwork.go index ab8a3c6f4c0..dc3dc7ba583 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/NLMRouterAvailableToNetwork.go +++ b/plc4go/protocols/bacnetip/readwrite/model/NLMRouterAvailableToNetwork.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // NLMRouterAvailableToNetwork is the corresponding interface of NLMRouterAvailableToNetwork type NLMRouterAvailableToNetwork interface { @@ -46,29 +48,29 @@ type NLMRouterAvailableToNetworkExactly interface { // _NLMRouterAvailableToNetwork is the data-structure of this message type _NLMRouterAvailableToNetwork struct { *_NLM - DestinationNetworkAddresses []uint16 + DestinationNetworkAddresses []uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_NLMRouterAvailableToNetwork) GetMessageType() uint8 { - return 0x05 -} +func (m *_NLMRouterAvailableToNetwork) GetMessageType() uint8 { +return 0x05} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_NLMRouterAvailableToNetwork) InitializeParent(parent NLM) {} +func (m *_NLMRouterAvailableToNetwork) InitializeParent(parent NLM ) {} -func (m *_NLMRouterAvailableToNetwork) GetParent() NLM { +func (m *_NLMRouterAvailableToNetwork) GetParent() NLM { return m._NLM } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_NLMRouterAvailableToNetwork) GetDestinationNetworkAddresses() []uint16 /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewNLMRouterAvailableToNetwork factory function for _NLMRouterAvailableToNetwork -func NewNLMRouterAvailableToNetwork(destinationNetworkAddresses []uint16, apduLength uint16) *_NLMRouterAvailableToNetwork { +func NewNLMRouterAvailableToNetwork( destinationNetworkAddresses []uint16 , apduLength uint16 ) *_NLMRouterAvailableToNetwork { _result := &_NLMRouterAvailableToNetwork{ DestinationNetworkAddresses: destinationNetworkAddresses, - _NLM: NewNLM(apduLength), + _NLM: NewNLM(apduLength), } _result._NLM._NLMChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewNLMRouterAvailableToNetwork(destinationNetworkAddresses []uint16, apduLe // Deprecated: use the interface for direct cast func CastNLMRouterAvailableToNetwork(structType interface{}) NLMRouterAvailableToNetwork { - if casted, ok := structType.(NLMRouterAvailableToNetwork); ok { + if casted, ok := structType.(NLMRouterAvailableToNetwork); ok { return casted } if casted, ok := structType.(*NLMRouterAvailableToNetwork); ok { @@ -119,6 +122,7 @@ func (m *_NLMRouterAvailableToNetwork) GetLengthInBits(ctx context.Context) uint return lengthInBits } + func (m *_NLMRouterAvailableToNetwork) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -145,8 +149,8 @@ func NLMRouterAvailableToNetworkParseWithBuffer(ctx context.Context, readBuffer { _destinationNetworkAddressesLength := uint16(apduLength) - uint16(uint16(1)) _destinationNetworkAddressesEndPos := positionAware.GetPos() + uint16(_destinationNetworkAddressesLength) - for positionAware.GetPos() < _destinationNetworkAddressesEndPos { - _item, _err := readBuffer.ReadUint16("", 16) + for ;positionAware.GetPos() < _destinationNetworkAddressesEndPos; { +_item, _err := readBuffer.ReadUint16("", 16) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'destinationNetworkAddresses' field of NLMRouterAvailableToNetwork") } @@ -188,20 +192,20 @@ func (m *_NLMRouterAvailableToNetwork) SerializeWithWriteBuffer(ctx context.Cont return errors.Wrap(pushErr, "Error pushing for NLMRouterAvailableToNetwork") } - // Array Field (destinationNetworkAddresses) - if pushErr := writeBuffer.PushContext("destinationNetworkAddresses", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for destinationNetworkAddresses") - } - for _curItem, _element := range m.GetDestinationNetworkAddresses() { - _ = _curItem - _elementErr := writeBuffer.WriteUint16("", 16, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'destinationNetworkAddresses' field") - } - } - if popErr := writeBuffer.PopContext("destinationNetworkAddresses", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for destinationNetworkAddresses") + // Array Field (destinationNetworkAddresses) + if pushErr := writeBuffer.PushContext("destinationNetworkAddresses", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for destinationNetworkAddresses") + } + for _curItem, _element := range m.GetDestinationNetworkAddresses() { + _ = _curItem + _elementErr := writeBuffer.WriteUint16("", 16, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'destinationNetworkAddresses' field") } + } + if popErr := writeBuffer.PopContext("destinationNetworkAddresses", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for destinationNetworkAddresses") + } if popErr := writeBuffer.PopContext("NLMRouterAvailableToNetwork"); popErr != nil { return errors.Wrap(popErr, "Error popping for NLMRouterAvailableToNetwork") @@ -211,6 +215,7 @@ func (m *_NLMRouterAvailableToNetwork) SerializeWithWriteBuffer(ctx context.Cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_NLMRouterAvailableToNetwork) isNLMRouterAvailableToNetwork() bool { return true } @@ -225,3 +230,6 @@ func (m *_NLMRouterAvailableToNetwork) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/NLMRouterBusyToNetwork.go b/plc4go/protocols/bacnetip/readwrite/model/NLMRouterBusyToNetwork.go index b655c298a32..c2516627984 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/NLMRouterBusyToNetwork.go +++ b/plc4go/protocols/bacnetip/readwrite/model/NLMRouterBusyToNetwork.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // NLMRouterBusyToNetwork is the corresponding interface of NLMRouterBusyToNetwork type NLMRouterBusyToNetwork interface { @@ -46,29 +48,29 @@ type NLMRouterBusyToNetworkExactly interface { // _NLMRouterBusyToNetwork is the data-structure of this message type _NLMRouterBusyToNetwork struct { *_NLM - DestinationNetworkAddresses []uint16 + DestinationNetworkAddresses []uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_NLMRouterBusyToNetwork) GetMessageType() uint8 { - return 0x04 -} +func (m *_NLMRouterBusyToNetwork) GetMessageType() uint8 { +return 0x04} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_NLMRouterBusyToNetwork) InitializeParent(parent NLM) {} +func (m *_NLMRouterBusyToNetwork) InitializeParent(parent NLM ) {} -func (m *_NLMRouterBusyToNetwork) GetParent() NLM { +func (m *_NLMRouterBusyToNetwork) GetParent() NLM { return m._NLM } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_NLMRouterBusyToNetwork) GetDestinationNetworkAddresses() []uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewNLMRouterBusyToNetwork factory function for _NLMRouterBusyToNetwork -func NewNLMRouterBusyToNetwork(destinationNetworkAddresses []uint16, apduLength uint16) *_NLMRouterBusyToNetwork { +func NewNLMRouterBusyToNetwork( destinationNetworkAddresses []uint16 , apduLength uint16 ) *_NLMRouterBusyToNetwork { _result := &_NLMRouterBusyToNetwork{ DestinationNetworkAddresses: destinationNetworkAddresses, - _NLM: NewNLM(apduLength), + _NLM: NewNLM(apduLength), } _result._NLM._NLMChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewNLMRouterBusyToNetwork(destinationNetworkAddresses []uint16, apduLength // Deprecated: use the interface for direct cast func CastNLMRouterBusyToNetwork(structType interface{}) NLMRouterBusyToNetwork { - if casted, ok := structType.(NLMRouterBusyToNetwork); ok { + if casted, ok := structType.(NLMRouterBusyToNetwork); ok { return casted } if casted, ok := structType.(*NLMRouterBusyToNetwork); ok { @@ -119,6 +122,7 @@ func (m *_NLMRouterBusyToNetwork) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_NLMRouterBusyToNetwork) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -145,8 +149,8 @@ func NLMRouterBusyToNetworkParseWithBuffer(ctx context.Context, readBuffer utils { _destinationNetworkAddressesLength := uint16(apduLength) - uint16(uint16(1)) _destinationNetworkAddressesEndPos := positionAware.GetPos() + uint16(_destinationNetworkAddressesLength) - for positionAware.GetPos() < _destinationNetworkAddressesEndPos { - _item, _err := readBuffer.ReadUint16("", 16) + for ;positionAware.GetPos() < _destinationNetworkAddressesEndPos; { +_item, _err := readBuffer.ReadUint16("", 16) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'destinationNetworkAddresses' field of NLMRouterBusyToNetwork") } @@ -188,20 +192,20 @@ func (m *_NLMRouterBusyToNetwork) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for NLMRouterBusyToNetwork") } - // Array Field (destinationNetworkAddresses) - if pushErr := writeBuffer.PushContext("destinationNetworkAddresses", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for destinationNetworkAddresses") - } - for _curItem, _element := range m.GetDestinationNetworkAddresses() { - _ = _curItem - _elementErr := writeBuffer.WriteUint16("", 16, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'destinationNetworkAddresses' field") - } - } - if popErr := writeBuffer.PopContext("destinationNetworkAddresses", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for destinationNetworkAddresses") + // Array Field (destinationNetworkAddresses) + if pushErr := writeBuffer.PushContext("destinationNetworkAddresses", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for destinationNetworkAddresses") + } + for _curItem, _element := range m.GetDestinationNetworkAddresses() { + _ = _curItem + _elementErr := writeBuffer.WriteUint16("", 16, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'destinationNetworkAddresses' field") } + } + if popErr := writeBuffer.PopContext("destinationNetworkAddresses", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for destinationNetworkAddresses") + } if popErr := writeBuffer.PopContext("NLMRouterBusyToNetwork"); popErr != nil { return errors.Wrap(popErr, "Error popping for NLMRouterBusyToNetwork") @@ -211,6 +215,7 @@ func (m *_NLMRouterBusyToNetwork) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_NLMRouterBusyToNetwork) isNLMRouterBusyToNetwork() bool { return true } @@ -225,3 +230,6 @@ func (m *_NLMRouterBusyToNetwork) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/NLMSecurityPayload.go b/plc4go/protocols/bacnetip/readwrite/model/NLMSecurityPayload.go index 606dce79c07..9d2e8765781 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/NLMSecurityPayload.go +++ b/plc4go/protocols/bacnetip/readwrite/model/NLMSecurityPayload.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // NLMSecurityPayload is the corresponding interface of NLMSecurityPayload type NLMSecurityPayload interface { @@ -48,30 +50,30 @@ type NLMSecurityPayloadExactly interface { // _NLMSecurityPayload is the data-structure of this message type _NLMSecurityPayload struct { *_NLM - PayloadLength uint16 - Payload []byte + PayloadLength uint16 + Payload []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_NLMSecurityPayload) GetMessageType() uint8 { - return 0x0B -} +func (m *_NLMSecurityPayload) GetMessageType() uint8 { +return 0x0B} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_NLMSecurityPayload) InitializeParent(parent NLM) {} +func (m *_NLMSecurityPayload) InitializeParent(parent NLM ) {} -func (m *_NLMSecurityPayload) GetParent() NLM { +func (m *_NLMSecurityPayload) GetParent() NLM { return m._NLM } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_NLMSecurityPayload) GetPayload() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewNLMSecurityPayload factory function for _NLMSecurityPayload -func NewNLMSecurityPayload(payloadLength uint16, payload []byte, apduLength uint16) *_NLMSecurityPayload { +func NewNLMSecurityPayload( payloadLength uint16 , payload []byte , apduLength uint16 ) *_NLMSecurityPayload { _result := &_NLMSecurityPayload{ PayloadLength: payloadLength, - Payload: payload, - _NLM: NewNLM(apduLength), + Payload: payload, + _NLM: NewNLM(apduLength), } _result._NLM._NLMChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewNLMSecurityPayload(payloadLength uint16, payload []byte, apduLength uint // Deprecated: use the interface for direct cast func CastNLMSecurityPayload(structType interface{}) NLMSecurityPayload { - if casted, ok := structType.(NLMSecurityPayload); ok { + if casted, ok := structType.(NLMSecurityPayload); ok { return casted } if casted, ok := structType.(*NLMSecurityPayload); ok { @@ -120,7 +123,7 @@ func (m *_NLMSecurityPayload) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (payloadLength) - lengthInBits += 16 + lengthInBits += 16; // Array field if len(m.Payload) > 0 { @@ -130,6 +133,7 @@ func (m *_NLMSecurityPayload) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_NLMSecurityPayload) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -148,7 +152,7 @@ func NLMSecurityPayloadParseWithBuffer(ctx context.Context, readBuffer utils.Rea _ = currentPos // Simple Field (payloadLength) - _payloadLength, _payloadLengthErr := readBuffer.ReadUint16("payloadLength", 16) +_payloadLength, _payloadLengthErr := readBuffer.ReadUint16("payloadLength", 16) if _payloadLengthErr != nil { return nil, errors.Wrap(_payloadLengthErr, "Error parsing 'payloadLength' field of NLMSecurityPayload") } @@ -170,7 +174,7 @@ func NLMSecurityPayloadParseWithBuffer(ctx context.Context, readBuffer utils.Rea ApduLength: apduLength, }, PayloadLength: payloadLength, - Payload: payload, + Payload: payload, } _child._NLM._NLMChildRequirements = _child return _child, nil @@ -192,18 +196,18 @@ func (m *_NLMSecurityPayload) SerializeWithWriteBuffer(ctx context.Context, writ return errors.Wrap(pushErr, "Error pushing for NLMSecurityPayload") } - // Simple Field (payloadLength) - payloadLength := uint16(m.GetPayloadLength()) - _payloadLengthErr := writeBuffer.WriteUint16("payloadLength", 16, (payloadLength)) - if _payloadLengthErr != nil { - return errors.Wrap(_payloadLengthErr, "Error serializing 'payloadLength' field") - } + // Simple Field (payloadLength) + payloadLength := uint16(m.GetPayloadLength()) + _payloadLengthErr := writeBuffer.WriteUint16("payloadLength", 16, (payloadLength)) + if _payloadLengthErr != nil { + return errors.Wrap(_payloadLengthErr, "Error serializing 'payloadLength' field") + } - // Array Field (payload) - // Byte Array field (payload) - if err := writeBuffer.WriteByteArray("payload", m.GetPayload()); err != nil { - return errors.Wrap(err, "Error serializing 'payload' field") - } + // Array Field (payload) + // Byte Array field (payload) + if err := writeBuffer.WriteByteArray("payload", m.GetPayload()); err != nil { + return errors.Wrap(err, "Error serializing 'payload' field") + } if popErr := writeBuffer.PopContext("NLMSecurityPayload"); popErr != nil { return errors.Wrap(popErr, "Error popping for NLMSecurityPayload") @@ -213,6 +217,7 @@ func (m *_NLMSecurityPayload) SerializeWithWriteBuffer(ctx context.Context, writ return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_NLMSecurityPayload) isNLMSecurityPayload() bool { return true } @@ -227,3 +232,6 @@ func (m *_NLMSecurityPayload) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/NLMSecurityResponse.go b/plc4go/protocols/bacnetip/readwrite/model/NLMSecurityResponse.go index 170168679bf..d052bfca36a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/NLMSecurityResponse.go +++ b/plc4go/protocols/bacnetip/readwrite/model/NLMSecurityResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // NLMSecurityResponse is the corresponding interface of NLMSecurityResponse type NLMSecurityResponse interface { @@ -52,32 +54,32 @@ type NLMSecurityResponseExactly interface { // _NLMSecurityResponse is the data-structure of this message type _NLMSecurityResponse struct { *_NLM - ResponseCode SecurityResponseCode - OriginalMessageId uint32 - OriginalTimestamp uint32 - VariableParameters []byte + ResponseCode SecurityResponseCode + OriginalMessageId uint32 + OriginalTimestamp uint32 + VariableParameters []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_NLMSecurityResponse) GetMessageType() uint8 { - return 0x0C -} +func (m *_NLMSecurityResponse) GetMessageType() uint8 { +return 0x0C} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_NLMSecurityResponse) InitializeParent(parent NLM) {} +func (m *_NLMSecurityResponse) InitializeParent(parent NLM ) {} -func (m *_NLMSecurityResponse) GetParent() NLM { +func (m *_NLMSecurityResponse) GetParent() NLM { return m._NLM } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -104,14 +106,15 @@ func (m *_NLMSecurityResponse) GetVariableParameters() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewNLMSecurityResponse factory function for _NLMSecurityResponse -func NewNLMSecurityResponse(responseCode SecurityResponseCode, originalMessageId uint32, originalTimestamp uint32, variableParameters []byte, apduLength uint16) *_NLMSecurityResponse { +func NewNLMSecurityResponse( responseCode SecurityResponseCode , originalMessageId uint32 , originalTimestamp uint32 , variableParameters []byte , apduLength uint16 ) *_NLMSecurityResponse { _result := &_NLMSecurityResponse{ - ResponseCode: responseCode, - OriginalMessageId: originalMessageId, - OriginalTimestamp: originalTimestamp, + ResponseCode: responseCode, + OriginalMessageId: originalMessageId, + OriginalTimestamp: originalTimestamp, VariableParameters: variableParameters, - _NLM: NewNLM(apduLength), + _NLM: NewNLM(apduLength), } _result._NLM._NLMChildRequirements = _result return _result @@ -119,7 +122,7 @@ func NewNLMSecurityResponse(responseCode SecurityResponseCode, originalMessageId // Deprecated: use the interface for direct cast func CastNLMSecurityResponse(structType interface{}) NLMSecurityResponse { - if casted, ok := structType.(NLMSecurityResponse); ok { + if casted, ok := structType.(NLMSecurityResponse); ok { return casted } if casted, ok := structType.(*NLMSecurityResponse); ok { @@ -139,10 +142,10 @@ func (m *_NLMSecurityResponse) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += 8 // Simple field (originalMessageId) - lengthInBits += 32 + lengthInBits += 32; // Simple field (originalTimestamp) - lengthInBits += 32 + lengthInBits += 32; // Array field if len(m.VariableParameters) > 0 { @@ -152,6 +155,7 @@ func (m *_NLMSecurityResponse) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_NLMSecurityResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -173,7 +177,7 @@ func NLMSecurityResponseParseWithBuffer(ctx context.Context, readBuffer utils.Re if pullErr := readBuffer.PullContext("responseCode"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for responseCode") } - _responseCode, _responseCodeErr := SecurityResponseCodeParseWithBuffer(ctx, readBuffer) +_responseCode, _responseCodeErr := SecurityResponseCodeParseWithBuffer(ctx, readBuffer) if _responseCodeErr != nil { return nil, errors.Wrap(_responseCodeErr, "Error parsing 'responseCode' field of NLMSecurityResponse") } @@ -183,20 +187,20 @@ func NLMSecurityResponseParseWithBuffer(ctx context.Context, readBuffer utils.Re } // Simple Field (originalMessageId) - _originalMessageId, _originalMessageIdErr := readBuffer.ReadUint32("originalMessageId", 32) +_originalMessageId, _originalMessageIdErr := readBuffer.ReadUint32("originalMessageId", 32) if _originalMessageIdErr != nil { return nil, errors.Wrap(_originalMessageIdErr, "Error parsing 'originalMessageId' field of NLMSecurityResponse") } originalMessageId := _originalMessageId // Simple Field (originalTimestamp) - _originalTimestamp, _originalTimestampErr := readBuffer.ReadUint32("originalTimestamp", 32) +_originalTimestamp, _originalTimestampErr := readBuffer.ReadUint32("originalTimestamp", 32) if _originalTimestampErr != nil { return nil, errors.Wrap(_originalTimestampErr, "Error parsing 'originalTimestamp' field of NLMSecurityResponse") } originalTimestamp := _originalTimestamp // Byte Array field (variableParameters) - numberOfBytesvariableParameters := int(uint16(apduLength) - uint16((uint16(uint16(uint16(uint16(1))+uint16(uint16(1)))+uint16(uint16(4))) + uint16(uint16(4))))) + numberOfBytesvariableParameters := int(uint16(apduLength) - uint16((uint16(uint16(uint16(uint16(1)) + uint16(uint16(1))) + uint16(uint16(4))) + uint16(uint16(4))))) variableParameters, _readArrayErr := readBuffer.ReadByteArray("variableParameters", numberOfBytesvariableParameters) if _readArrayErr != nil { return nil, errors.Wrap(_readArrayErr, "Error parsing 'variableParameters' field of NLMSecurityResponse") @@ -211,9 +215,9 @@ func NLMSecurityResponseParseWithBuffer(ctx context.Context, readBuffer utils.Re _NLM: &_NLM{ ApduLength: apduLength, }, - ResponseCode: responseCode, - OriginalMessageId: originalMessageId, - OriginalTimestamp: originalTimestamp, + ResponseCode: responseCode, + OriginalMessageId: originalMessageId, + OriginalTimestamp: originalTimestamp, VariableParameters: variableParameters, } _child._NLM._NLMChildRequirements = _child @@ -236,37 +240,37 @@ func (m *_NLMSecurityResponse) SerializeWithWriteBuffer(ctx context.Context, wri return errors.Wrap(pushErr, "Error pushing for NLMSecurityResponse") } - // Simple Field (responseCode) - if pushErr := writeBuffer.PushContext("responseCode"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for responseCode") - } - _responseCodeErr := writeBuffer.WriteSerializable(ctx, m.GetResponseCode()) - if popErr := writeBuffer.PopContext("responseCode"); popErr != nil { - return errors.Wrap(popErr, "Error popping for responseCode") - } - if _responseCodeErr != nil { - return errors.Wrap(_responseCodeErr, "Error serializing 'responseCode' field") - } + // Simple Field (responseCode) + if pushErr := writeBuffer.PushContext("responseCode"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for responseCode") + } + _responseCodeErr := writeBuffer.WriteSerializable(ctx, m.GetResponseCode()) + if popErr := writeBuffer.PopContext("responseCode"); popErr != nil { + return errors.Wrap(popErr, "Error popping for responseCode") + } + if _responseCodeErr != nil { + return errors.Wrap(_responseCodeErr, "Error serializing 'responseCode' field") + } - // Simple Field (originalMessageId) - originalMessageId := uint32(m.GetOriginalMessageId()) - _originalMessageIdErr := writeBuffer.WriteUint32("originalMessageId", 32, (originalMessageId)) - if _originalMessageIdErr != nil { - return errors.Wrap(_originalMessageIdErr, "Error serializing 'originalMessageId' field") - } + // Simple Field (originalMessageId) + originalMessageId := uint32(m.GetOriginalMessageId()) + _originalMessageIdErr := writeBuffer.WriteUint32("originalMessageId", 32, (originalMessageId)) + if _originalMessageIdErr != nil { + return errors.Wrap(_originalMessageIdErr, "Error serializing 'originalMessageId' field") + } - // Simple Field (originalTimestamp) - originalTimestamp := uint32(m.GetOriginalTimestamp()) - _originalTimestampErr := writeBuffer.WriteUint32("originalTimestamp", 32, (originalTimestamp)) - if _originalTimestampErr != nil { - return errors.Wrap(_originalTimestampErr, "Error serializing 'originalTimestamp' field") - } + // Simple Field (originalTimestamp) + originalTimestamp := uint32(m.GetOriginalTimestamp()) + _originalTimestampErr := writeBuffer.WriteUint32("originalTimestamp", 32, (originalTimestamp)) + if _originalTimestampErr != nil { + return errors.Wrap(_originalTimestampErr, "Error serializing 'originalTimestamp' field") + } - // Array Field (variableParameters) - // Byte Array field (variableParameters) - if err := writeBuffer.WriteByteArray("variableParameters", m.GetVariableParameters()); err != nil { - return errors.Wrap(err, "Error serializing 'variableParameters' field") - } + // Array Field (variableParameters) + // Byte Array field (variableParameters) + if err := writeBuffer.WriteByteArray("variableParameters", m.GetVariableParameters()); err != nil { + return errors.Wrap(err, "Error serializing 'variableParameters' field") + } if popErr := writeBuffer.PopContext("NLMSecurityResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for NLMSecurityResponse") @@ -276,6 +280,7 @@ func (m *_NLMSecurityResponse) SerializeWithWriteBuffer(ctx context.Context, wri return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_NLMSecurityResponse) isNLMSecurityResponse() bool { return true } @@ -290,3 +295,6 @@ func (m *_NLMSecurityResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/NLMSetMasterKey.go b/plc4go/protocols/bacnetip/readwrite/model/NLMSetMasterKey.go index e088ae7491d..5bd602b8318 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/NLMSetMasterKey.go +++ b/plc4go/protocols/bacnetip/readwrite/model/NLMSetMasterKey.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // NLMSetMasterKey is the corresponding interface of NLMSetMasterKey type NLMSetMasterKey interface { @@ -46,29 +48,29 @@ type NLMSetMasterKeyExactly interface { // _NLMSetMasterKey is the data-structure of this message type _NLMSetMasterKey struct { *_NLM - Key NLMUpdateKeyUpdateKeyEntry + Key NLMUpdateKeyUpdateKeyEntry } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_NLMSetMasterKey) GetMessageType() uint8 { - return 0x11 -} +func (m *_NLMSetMasterKey) GetMessageType() uint8 { +return 0x11} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_NLMSetMasterKey) InitializeParent(parent NLM) {} +func (m *_NLMSetMasterKey) InitializeParent(parent NLM ) {} -func (m *_NLMSetMasterKey) GetParent() NLM { +func (m *_NLMSetMasterKey) GetParent() NLM { return m._NLM } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_NLMSetMasterKey) GetKey() NLMUpdateKeyUpdateKeyEntry { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewNLMSetMasterKey factory function for _NLMSetMasterKey -func NewNLMSetMasterKey(key NLMUpdateKeyUpdateKeyEntry, apduLength uint16) *_NLMSetMasterKey { +func NewNLMSetMasterKey( key NLMUpdateKeyUpdateKeyEntry , apduLength uint16 ) *_NLMSetMasterKey { _result := &_NLMSetMasterKey{ - Key: key, - _NLM: NewNLM(apduLength), + Key: key, + _NLM: NewNLM(apduLength), } _result._NLM._NLMChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewNLMSetMasterKey(key NLMUpdateKeyUpdateKeyEntry, apduLength uint16) *_NLM // Deprecated: use the interface for direct cast func CastNLMSetMasterKey(structType interface{}) NLMSetMasterKey { - if casted, ok := structType.(NLMSetMasterKey); ok { + if casted, ok := structType.(NLMSetMasterKey); ok { return casted } if casted, ok := structType.(*NLMSetMasterKey); ok { @@ -117,6 +120,7 @@ func (m *_NLMSetMasterKey) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_NLMSetMasterKey) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func NLMSetMasterKeyParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu if pullErr := readBuffer.PullContext("key"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for key") } - _key, _keyErr := NLMUpdateKeyUpdateKeyEntryParseWithBuffer(ctx, readBuffer) +_key, _keyErr := NLMUpdateKeyUpdateKeyEntryParseWithBuffer(ctx, readBuffer) if _keyErr != nil { return nil, errors.Wrap(_keyErr, "Error parsing 'key' field of NLMSetMasterKey") } @@ -178,17 +182,17 @@ func (m *_NLMSetMasterKey) SerializeWithWriteBuffer(ctx context.Context, writeBu return errors.Wrap(pushErr, "Error pushing for NLMSetMasterKey") } - // Simple Field (key) - if pushErr := writeBuffer.PushContext("key"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for key") - } - _keyErr := writeBuffer.WriteSerializable(ctx, m.GetKey()) - if popErr := writeBuffer.PopContext("key"); popErr != nil { - return errors.Wrap(popErr, "Error popping for key") - } - if _keyErr != nil { - return errors.Wrap(_keyErr, "Error serializing 'key' field") - } + // Simple Field (key) + if pushErr := writeBuffer.PushContext("key"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for key") + } + _keyErr := writeBuffer.WriteSerializable(ctx, m.GetKey()) + if popErr := writeBuffer.PopContext("key"); popErr != nil { + return errors.Wrap(popErr, "Error popping for key") + } + if _keyErr != nil { + return errors.Wrap(_keyErr, "Error serializing 'key' field") + } if popErr := writeBuffer.PopContext("NLMSetMasterKey"); popErr != nil { return errors.Wrap(popErr, "Error popping for NLMSetMasterKey") @@ -198,6 +202,7 @@ func (m *_NLMSetMasterKey) SerializeWithWriteBuffer(ctx context.Context, writeBu return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_NLMSetMasterKey) isNLMSetMasterKey() bool { return true } @@ -212,3 +217,6 @@ func (m *_NLMSetMasterKey) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/NLMUpdateKeyDistributionKey.go b/plc4go/protocols/bacnetip/readwrite/model/NLMUpdateKeyDistributionKey.go index 6ec10597b87..02c14224187 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/NLMUpdateKeyDistributionKey.go +++ b/plc4go/protocols/bacnetip/readwrite/model/NLMUpdateKeyDistributionKey.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // NLMUpdateKeyDistributionKey is the corresponding interface of NLMUpdateKeyDistributionKey type NLMUpdateKeyDistributionKey interface { @@ -48,30 +50,30 @@ type NLMUpdateKeyDistributionKeyExactly interface { // _NLMUpdateKeyDistributionKey is the data-structure of this message type _NLMUpdateKeyDistributionKey struct { *_NLM - KeyRevision byte - Key NLMUpdateKeyUpdateKeyEntry + KeyRevision byte + Key NLMUpdateKeyUpdateKeyEntry } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_NLMUpdateKeyDistributionKey) GetMessageType() uint8 { - return 0x0F -} +func (m *_NLMUpdateKeyDistributionKey) GetMessageType() uint8 { +return 0x0F} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_NLMUpdateKeyDistributionKey) InitializeParent(parent NLM) {} +func (m *_NLMUpdateKeyDistributionKey) InitializeParent(parent NLM ) {} -func (m *_NLMUpdateKeyDistributionKey) GetParent() NLM { +func (m *_NLMUpdateKeyDistributionKey) GetParent() NLM { return m._NLM } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_NLMUpdateKeyDistributionKey) GetKey() NLMUpdateKeyUpdateKeyEntry { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewNLMUpdateKeyDistributionKey factory function for _NLMUpdateKeyDistributionKey -func NewNLMUpdateKeyDistributionKey(keyRevision byte, key NLMUpdateKeyUpdateKeyEntry, apduLength uint16) *_NLMUpdateKeyDistributionKey { +func NewNLMUpdateKeyDistributionKey( keyRevision byte , key NLMUpdateKeyUpdateKeyEntry , apduLength uint16 ) *_NLMUpdateKeyDistributionKey { _result := &_NLMUpdateKeyDistributionKey{ KeyRevision: keyRevision, - Key: key, - _NLM: NewNLM(apduLength), + Key: key, + _NLM: NewNLM(apduLength), } _result._NLM._NLMChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewNLMUpdateKeyDistributionKey(keyRevision byte, key NLMUpdateKeyUpdateKeyE // Deprecated: use the interface for direct cast func CastNLMUpdateKeyDistributionKey(structType interface{}) NLMUpdateKeyDistributionKey { - if casted, ok := structType.(NLMUpdateKeyDistributionKey); ok { + if casted, ok := structType.(NLMUpdateKeyDistributionKey); ok { return casted } if casted, ok := structType.(*NLMUpdateKeyDistributionKey); ok { @@ -120,7 +123,7 @@ func (m *_NLMUpdateKeyDistributionKey) GetLengthInBits(ctx context.Context) uint lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (keyRevision) - lengthInBits += 8 + lengthInBits += 8; // Simple field (key) lengthInBits += m.Key.GetLengthInBits(ctx) @@ -128,6 +131,7 @@ func (m *_NLMUpdateKeyDistributionKey) GetLengthInBits(ctx context.Context) uint return lengthInBits } + func (m *_NLMUpdateKeyDistributionKey) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -146,7 +150,7 @@ func NLMUpdateKeyDistributionKeyParseWithBuffer(ctx context.Context, readBuffer _ = currentPos // Simple Field (keyRevision) - _keyRevision, _keyRevisionErr := readBuffer.ReadByte("keyRevision") +_keyRevision, _keyRevisionErr := readBuffer.ReadByte("keyRevision") if _keyRevisionErr != nil { return nil, errors.Wrap(_keyRevisionErr, "Error parsing 'keyRevision' field of NLMUpdateKeyDistributionKey") } @@ -156,7 +160,7 @@ func NLMUpdateKeyDistributionKeyParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("key"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for key") } - _key, _keyErr := NLMUpdateKeyUpdateKeyEntryParseWithBuffer(ctx, readBuffer) +_key, _keyErr := NLMUpdateKeyUpdateKeyEntryParseWithBuffer(ctx, readBuffer) if _keyErr != nil { return nil, errors.Wrap(_keyErr, "Error parsing 'key' field of NLMUpdateKeyDistributionKey") } @@ -175,7 +179,7 @@ func NLMUpdateKeyDistributionKeyParseWithBuffer(ctx context.Context, readBuffer ApduLength: apduLength, }, KeyRevision: keyRevision, - Key: key, + Key: key, } _child._NLM._NLMChildRequirements = _child return _child, nil @@ -197,24 +201,24 @@ func (m *_NLMUpdateKeyDistributionKey) SerializeWithWriteBuffer(ctx context.Cont return errors.Wrap(pushErr, "Error pushing for NLMUpdateKeyDistributionKey") } - // Simple Field (keyRevision) - keyRevision := byte(m.GetKeyRevision()) - _keyRevisionErr := writeBuffer.WriteByte("keyRevision", (keyRevision)) - if _keyRevisionErr != nil { - return errors.Wrap(_keyRevisionErr, "Error serializing 'keyRevision' field") - } + // Simple Field (keyRevision) + keyRevision := byte(m.GetKeyRevision()) + _keyRevisionErr := writeBuffer.WriteByte("keyRevision", (keyRevision)) + if _keyRevisionErr != nil { + return errors.Wrap(_keyRevisionErr, "Error serializing 'keyRevision' field") + } - // Simple Field (key) - if pushErr := writeBuffer.PushContext("key"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for key") - } - _keyErr := writeBuffer.WriteSerializable(ctx, m.GetKey()) - if popErr := writeBuffer.PopContext("key"); popErr != nil { - return errors.Wrap(popErr, "Error popping for key") - } - if _keyErr != nil { - return errors.Wrap(_keyErr, "Error serializing 'key' field") - } + // Simple Field (key) + if pushErr := writeBuffer.PushContext("key"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for key") + } + _keyErr := writeBuffer.WriteSerializable(ctx, m.GetKey()) + if popErr := writeBuffer.PopContext("key"); popErr != nil { + return errors.Wrap(popErr, "Error popping for key") + } + if _keyErr != nil { + return errors.Wrap(_keyErr, "Error serializing 'key' field") + } if popErr := writeBuffer.PopContext("NLMUpdateKeyDistributionKey"); popErr != nil { return errors.Wrap(popErr, "Error popping for NLMUpdateKeyDistributionKey") @@ -224,6 +228,7 @@ func (m *_NLMUpdateKeyDistributionKey) SerializeWithWriteBuffer(ctx context.Cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_NLMUpdateKeyDistributionKey) isNLMUpdateKeyDistributionKey() bool { return true } @@ -238,3 +243,6 @@ func (m *_NLMUpdateKeyDistributionKey) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/NLMUpdateKeyUpdate.go b/plc4go/protocols/bacnetip/readwrite/model/NLMUpdateKeyUpdate.go index e23ca64dd89..ba809c53134 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/NLMUpdateKeyUpdate.go +++ b/plc4go/protocols/bacnetip/readwrite/model/NLMUpdateKeyUpdate.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // NLMUpdateKeyUpdate is the corresponding interface of NLMUpdateKeyUpdate type NLMUpdateKeyUpdate interface { @@ -67,39 +69,39 @@ type NLMUpdateKeyUpdateExactly interface { // _NLMUpdateKeyUpdate is the data-structure of this message type _NLMUpdateKeyUpdate struct { *_NLM - ControlFlags NLMUpdateKeyUpdateControlFlags - Set1KeyRevision *byte - Set1ActivationTime *uint32 - Set1ExpirationTime *uint32 - Set1KeyCount *uint8 - Set1Keys []NLMUpdateKeyUpdateKeyEntry - Set2KeyRevision *byte - Set2ActivationTime *uint32 - Set2ExpirationTime *uint32 - Set2KeyCount *uint8 - Set2Keys []NLMUpdateKeyUpdateKeyEntry + ControlFlags NLMUpdateKeyUpdateControlFlags + Set1KeyRevision *byte + Set1ActivationTime *uint32 + Set1ExpirationTime *uint32 + Set1KeyCount *uint8 + Set1Keys []NLMUpdateKeyUpdateKeyEntry + Set2KeyRevision *byte + Set2ActivationTime *uint32 + Set2ExpirationTime *uint32 + Set2KeyCount *uint8 + Set2Keys []NLMUpdateKeyUpdateKeyEntry } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_NLMUpdateKeyUpdate) GetMessageType() uint8 { - return 0x0E -} +func (m *_NLMUpdateKeyUpdate) GetMessageType() uint8 { +return 0x0E} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_NLMUpdateKeyUpdate) InitializeParent(parent NLM) {} +func (m *_NLMUpdateKeyUpdate) InitializeParent(parent NLM ) {} -func (m *_NLMUpdateKeyUpdate) GetParent() NLM { +func (m *_NLMUpdateKeyUpdate) GetParent() NLM { return m._NLM } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -154,21 +156,22 @@ func (m *_NLMUpdateKeyUpdate) GetSet2Keys() []NLMUpdateKeyUpdateKeyEntry { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewNLMUpdateKeyUpdate factory function for _NLMUpdateKeyUpdate -func NewNLMUpdateKeyUpdate(controlFlags NLMUpdateKeyUpdateControlFlags, set1KeyRevision *byte, set1ActivationTime *uint32, set1ExpirationTime *uint32, set1KeyCount *uint8, set1Keys []NLMUpdateKeyUpdateKeyEntry, set2KeyRevision *byte, set2ActivationTime *uint32, set2ExpirationTime *uint32, set2KeyCount *uint8, set2Keys []NLMUpdateKeyUpdateKeyEntry, apduLength uint16) *_NLMUpdateKeyUpdate { +func NewNLMUpdateKeyUpdate( controlFlags NLMUpdateKeyUpdateControlFlags , set1KeyRevision *byte , set1ActivationTime *uint32 , set1ExpirationTime *uint32 , set1KeyCount *uint8 , set1Keys []NLMUpdateKeyUpdateKeyEntry , set2KeyRevision *byte , set2ActivationTime *uint32 , set2ExpirationTime *uint32 , set2KeyCount *uint8 , set2Keys []NLMUpdateKeyUpdateKeyEntry , apduLength uint16 ) *_NLMUpdateKeyUpdate { _result := &_NLMUpdateKeyUpdate{ - ControlFlags: controlFlags, - Set1KeyRevision: set1KeyRevision, + ControlFlags: controlFlags, + Set1KeyRevision: set1KeyRevision, Set1ActivationTime: set1ActivationTime, Set1ExpirationTime: set1ExpirationTime, - Set1KeyCount: set1KeyCount, - Set1Keys: set1Keys, - Set2KeyRevision: set2KeyRevision, + Set1KeyCount: set1KeyCount, + Set1Keys: set1Keys, + Set2KeyRevision: set2KeyRevision, Set2ActivationTime: set2ActivationTime, Set2ExpirationTime: set2ExpirationTime, - Set2KeyCount: set2KeyCount, - Set2Keys: set2Keys, - _NLM: NewNLM(apduLength), + Set2KeyCount: set2KeyCount, + Set2Keys: set2Keys, + _NLM: NewNLM(apduLength), } _result._NLM._NLMChildRequirements = _result return _result @@ -176,7 +179,7 @@ func NewNLMUpdateKeyUpdate(controlFlags NLMUpdateKeyUpdateControlFlags, set1KeyR // Deprecated: use the interface for direct cast func CastNLMUpdateKeyUpdate(structType interface{}) NLMUpdateKeyUpdate { - if casted, ok := structType.(NLMUpdateKeyUpdate); ok { + if casted, ok := structType.(NLMUpdateKeyUpdate); ok { return casted } if casted, ok := structType.(*NLMUpdateKeyUpdate); ok { @@ -221,7 +224,7 @@ func (m *_NLMUpdateKeyUpdate) GetLengthInBits(ctx context.Context) uint16 { arrayCtx := spiContext.CreateArrayContext(ctx, len(m.Set1Keys), _curItem) _ = arrayCtx _ = _curItem - lengthInBits += element.(interface{ GetLengthInBits(context.Context) uint16 }).GetLengthInBits(arrayCtx) + lengthInBits += element.(interface{GetLengthInBits(context.Context) uint16}).GetLengthInBits(arrayCtx) } } @@ -251,13 +254,14 @@ func (m *_NLMUpdateKeyUpdate) GetLengthInBits(ctx context.Context) uint16 { arrayCtx := spiContext.CreateArrayContext(ctx, len(m.Set2Keys), _curItem) _ = arrayCtx _ = _curItem - lengthInBits += element.(interface{ GetLengthInBits(context.Context) uint16 }).GetLengthInBits(arrayCtx) + lengthInBits += element.(interface{GetLengthInBits(context.Context) uint16}).GetLengthInBits(arrayCtx) } } return lengthInBits } + func (m *_NLMUpdateKeyUpdate) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -279,7 +283,7 @@ func NLMUpdateKeyUpdateParseWithBuffer(ctx context.Context, readBuffer utils.Rea if pullErr := readBuffer.PullContext("controlFlags"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for controlFlags") } - _controlFlags, _controlFlagsErr := NLMUpdateKeyUpdateControlFlagsParseWithBuffer(ctx, readBuffer) +_controlFlags, _controlFlagsErr := NLMUpdateKeyUpdateControlFlagsParseWithBuffer(ctx, readBuffer) if _controlFlagsErr != nil { return nil, errors.Wrap(_controlFlagsErr, "Error parsing 'controlFlags' field of NLMUpdateKeyUpdate") } @@ -333,18 +337,18 @@ func NLMUpdateKeyUpdateParseWithBuffer(ctx context.Context, readBuffer utils.Rea return nil, errors.Wrap(pullErr, "Error pulling for set1Keys") } // Count array - set1Keys := make([]NLMUpdateKeyUpdateKeyEntry, utils.InlineIf(bool((set1KeyCount) != (nil)), func() interface{} { return uint16((*set1KeyCount)) }, func() interface{} { return uint16(uint16(0)) }).(uint16)) + set1Keys := make([]NLMUpdateKeyUpdateKeyEntry, utils.InlineIf(bool(((set1KeyCount)) != (nil)), func() interface{} {return uint16((*set1KeyCount))}, func() interface{} {return uint16(uint16(0))}).(uint16)) // This happens when the size is set conditional to 0 if len(set1Keys) == 0 { set1Keys = nil } { - _numItems := uint16(utils.InlineIf(bool((set1KeyCount) != (nil)), func() interface{} { return uint16((*set1KeyCount)) }, func() interface{} { return uint16(uint16(0)) }).(uint16)) + _numItems := uint16(utils.InlineIf(bool(((set1KeyCount)) != (nil)), func() interface{} {return uint16((*set1KeyCount))}, func() interface{} {return uint16(uint16(0))}).(uint16)) for _curItem := uint16(0); _curItem < _numItems; _curItem++ { arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := NLMUpdateKeyUpdateKeyEntryParseWithBuffer(arrayCtx, readBuffer) +_item, _err := NLMUpdateKeyUpdateKeyEntryParseWithBuffer(arrayCtx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'set1Keys' field of NLMUpdateKeyUpdate") } @@ -400,18 +404,18 @@ func NLMUpdateKeyUpdateParseWithBuffer(ctx context.Context, readBuffer utils.Rea return nil, errors.Wrap(pullErr, "Error pulling for set2Keys") } // Count array - set2Keys := make([]NLMUpdateKeyUpdateKeyEntry, utils.InlineIf(bool((set1KeyCount) != (nil)), func() interface{} { return uint16((*set1KeyCount)) }, func() interface{} { return uint16(uint16(0)) }).(uint16)) + set2Keys := make([]NLMUpdateKeyUpdateKeyEntry, utils.InlineIf(bool(((set1KeyCount)) != (nil)), func() interface{} {return uint16((*set1KeyCount))}, func() interface{} {return uint16(uint16(0))}).(uint16)) // This happens when the size is set conditional to 0 if len(set2Keys) == 0 { set2Keys = nil } { - _numItems := uint16(utils.InlineIf(bool((set1KeyCount) != (nil)), func() interface{} { return uint16((*set1KeyCount)) }, func() interface{} { return uint16(uint16(0)) }).(uint16)) + _numItems := uint16(utils.InlineIf(bool(((set1KeyCount)) != (nil)), func() interface{} {return uint16((*set1KeyCount))}, func() interface{} {return uint16(uint16(0))}).(uint16)) for _curItem := uint16(0); _curItem < _numItems; _curItem++ { arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := NLMUpdateKeyUpdateKeyEntryParseWithBuffer(arrayCtx, readBuffer) +_item, _err := NLMUpdateKeyUpdateKeyEntryParseWithBuffer(arrayCtx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'set2Keys' field of NLMUpdateKeyUpdate") } @@ -431,17 +435,17 @@ func NLMUpdateKeyUpdateParseWithBuffer(ctx context.Context, readBuffer utils.Rea _NLM: &_NLM{ ApduLength: apduLength, }, - ControlFlags: controlFlags, - Set1KeyRevision: set1KeyRevision, + ControlFlags: controlFlags, + Set1KeyRevision: set1KeyRevision, Set1ActivationTime: set1ActivationTime, Set1ExpirationTime: set1ExpirationTime, - Set1KeyCount: set1KeyCount, - Set1Keys: set1Keys, - Set2KeyRevision: set2KeyRevision, + Set1KeyCount: set1KeyCount, + Set1Keys: set1Keys, + Set2KeyRevision: set2KeyRevision, Set2ActivationTime: set2ActivationTime, Set2ExpirationTime: set2ExpirationTime, - Set2KeyCount: set2KeyCount, - Set2Keys: set2Keys, + Set2KeyCount: set2KeyCount, + Set2Keys: set2Keys, } _child._NLM._NLMChildRequirements = _child return _child, nil @@ -463,131 +467,131 @@ func (m *_NLMUpdateKeyUpdate) SerializeWithWriteBuffer(ctx context.Context, writ return errors.Wrap(pushErr, "Error pushing for NLMUpdateKeyUpdate") } - // Simple Field (controlFlags) - if pushErr := writeBuffer.PushContext("controlFlags"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for controlFlags") - } - _controlFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetControlFlags()) - if popErr := writeBuffer.PopContext("controlFlags"); popErr != nil { - return errors.Wrap(popErr, "Error popping for controlFlags") - } - if _controlFlagsErr != nil { - return errors.Wrap(_controlFlagsErr, "Error serializing 'controlFlags' field") - } + // Simple Field (controlFlags) + if pushErr := writeBuffer.PushContext("controlFlags"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for controlFlags") + } + _controlFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetControlFlags()) + if popErr := writeBuffer.PopContext("controlFlags"); popErr != nil { + return errors.Wrap(popErr, "Error popping for controlFlags") + } + if _controlFlagsErr != nil { + return errors.Wrap(_controlFlagsErr, "Error serializing 'controlFlags' field") + } - // Optional Field (set1KeyRevision) (Can be skipped, if the value is null) - var set1KeyRevision *byte = nil - if m.GetSet1KeyRevision() != nil { - set1KeyRevision = m.GetSet1KeyRevision() - _set1KeyRevisionErr := writeBuffer.WriteByte("set1KeyRevision", *(set1KeyRevision)) - if _set1KeyRevisionErr != nil { - return errors.Wrap(_set1KeyRevisionErr, "Error serializing 'set1KeyRevision' field") - } + // Optional Field (set1KeyRevision) (Can be skipped, if the value is null) + var set1KeyRevision *byte = nil + if m.GetSet1KeyRevision() != nil { + set1KeyRevision = m.GetSet1KeyRevision() + _set1KeyRevisionErr := writeBuffer.WriteByte("set1KeyRevision", *(set1KeyRevision)) + if _set1KeyRevisionErr != nil { + return errors.Wrap(_set1KeyRevisionErr, "Error serializing 'set1KeyRevision' field") } + } - // Optional Field (set1ActivationTime) (Can be skipped, if the value is null) - var set1ActivationTime *uint32 = nil - if m.GetSet1ActivationTime() != nil { - set1ActivationTime = m.GetSet1ActivationTime() - _set1ActivationTimeErr := writeBuffer.WriteUint32("set1ActivationTime", 32, *(set1ActivationTime)) - if _set1ActivationTimeErr != nil { - return errors.Wrap(_set1ActivationTimeErr, "Error serializing 'set1ActivationTime' field") - } + // Optional Field (set1ActivationTime) (Can be skipped, if the value is null) + var set1ActivationTime *uint32 = nil + if m.GetSet1ActivationTime() != nil { + set1ActivationTime = m.GetSet1ActivationTime() + _set1ActivationTimeErr := writeBuffer.WriteUint32("set1ActivationTime", 32, *(set1ActivationTime)) + if _set1ActivationTimeErr != nil { + return errors.Wrap(_set1ActivationTimeErr, "Error serializing 'set1ActivationTime' field") } + } - // Optional Field (set1ExpirationTime) (Can be skipped, if the value is null) - var set1ExpirationTime *uint32 = nil - if m.GetSet1ExpirationTime() != nil { - set1ExpirationTime = m.GetSet1ExpirationTime() - _set1ExpirationTimeErr := writeBuffer.WriteUint32("set1ExpirationTime", 32, *(set1ExpirationTime)) - if _set1ExpirationTimeErr != nil { - return errors.Wrap(_set1ExpirationTimeErr, "Error serializing 'set1ExpirationTime' field") - } + // Optional Field (set1ExpirationTime) (Can be skipped, if the value is null) + var set1ExpirationTime *uint32 = nil + if m.GetSet1ExpirationTime() != nil { + set1ExpirationTime = m.GetSet1ExpirationTime() + _set1ExpirationTimeErr := writeBuffer.WriteUint32("set1ExpirationTime", 32, *(set1ExpirationTime)) + if _set1ExpirationTimeErr != nil { + return errors.Wrap(_set1ExpirationTimeErr, "Error serializing 'set1ExpirationTime' field") } + } - // Optional Field (set1KeyCount) (Can be skipped, if the value is null) - var set1KeyCount *uint8 = nil - if m.GetSet1KeyCount() != nil { - set1KeyCount = m.GetSet1KeyCount() - _set1KeyCountErr := writeBuffer.WriteUint8("set1KeyCount", 8, *(set1KeyCount)) - if _set1KeyCountErr != nil { - return errors.Wrap(_set1KeyCountErr, "Error serializing 'set1KeyCount' field") - } + // Optional Field (set1KeyCount) (Can be skipped, if the value is null) + var set1KeyCount *uint8 = nil + if m.GetSet1KeyCount() != nil { + set1KeyCount = m.GetSet1KeyCount() + _set1KeyCountErr := writeBuffer.WriteUint8("set1KeyCount", 8, *(set1KeyCount)) + if _set1KeyCountErr != nil { + return errors.Wrap(_set1KeyCountErr, "Error serializing 'set1KeyCount' field") } + } - // Array Field (set1Keys) - if pushErr := writeBuffer.PushContext("set1Keys", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for set1Keys") - } - for _curItem, _element := range m.GetSet1Keys() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetSet1Keys()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'set1Keys' field") - } - } - if popErr := writeBuffer.PopContext("set1Keys", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for set1Keys") + // Array Field (set1Keys) + if pushErr := writeBuffer.PushContext("set1Keys", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for set1Keys") + } + for _curItem, _element := range m.GetSet1Keys() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetSet1Keys()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'set1Keys' field") } + } + if popErr := writeBuffer.PopContext("set1Keys", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for set1Keys") + } - // Optional Field (set2KeyRevision) (Can be skipped, if the value is null) - var set2KeyRevision *byte = nil - if m.GetSet2KeyRevision() != nil { - set2KeyRevision = m.GetSet2KeyRevision() - _set2KeyRevisionErr := writeBuffer.WriteByte("set2KeyRevision", *(set2KeyRevision)) - if _set2KeyRevisionErr != nil { - return errors.Wrap(_set2KeyRevisionErr, "Error serializing 'set2KeyRevision' field") - } + // Optional Field (set2KeyRevision) (Can be skipped, if the value is null) + var set2KeyRevision *byte = nil + if m.GetSet2KeyRevision() != nil { + set2KeyRevision = m.GetSet2KeyRevision() + _set2KeyRevisionErr := writeBuffer.WriteByte("set2KeyRevision", *(set2KeyRevision)) + if _set2KeyRevisionErr != nil { + return errors.Wrap(_set2KeyRevisionErr, "Error serializing 'set2KeyRevision' field") } + } - // Optional Field (set2ActivationTime) (Can be skipped, if the value is null) - var set2ActivationTime *uint32 = nil - if m.GetSet2ActivationTime() != nil { - set2ActivationTime = m.GetSet2ActivationTime() - _set2ActivationTimeErr := writeBuffer.WriteUint32("set2ActivationTime", 32, *(set2ActivationTime)) - if _set2ActivationTimeErr != nil { - return errors.Wrap(_set2ActivationTimeErr, "Error serializing 'set2ActivationTime' field") - } + // Optional Field (set2ActivationTime) (Can be skipped, if the value is null) + var set2ActivationTime *uint32 = nil + if m.GetSet2ActivationTime() != nil { + set2ActivationTime = m.GetSet2ActivationTime() + _set2ActivationTimeErr := writeBuffer.WriteUint32("set2ActivationTime", 32, *(set2ActivationTime)) + if _set2ActivationTimeErr != nil { + return errors.Wrap(_set2ActivationTimeErr, "Error serializing 'set2ActivationTime' field") } + } - // Optional Field (set2ExpirationTime) (Can be skipped, if the value is null) - var set2ExpirationTime *uint32 = nil - if m.GetSet2ExpirationTime() != nil { - set2ExpirationTime = m.GetSet2ExpirationTime() - _set2ExpirationTimeErr := writeBuffer.WriteUint32("set2ExpirationTime", 32, *(set2ExpirationTime)) - if _set2ExpirationTimeErr != nil { - return errors.Wrap(_set2ExpirationTimeErr, "Error serializing 'set2ExpirationTime' field") - } + // Optional Field (set2ExpirationTime) (Can be skipped, if the value is null) + var set2ExpirationTime *uint32 = nil + if m.GetSet2ExpirationTime() != nil { + set2ExpirationTime = m.GetSet2ExpirationTime() + _set2ExpirationTimeErr := writeBuffer.WriteUint32("set2ExpirationTime", 32, *(set2ExpirationTime)) + if _set2ExpirationTimeErr != nil { + return errors.Wrap(_set2ExpirationTimeErr, "Error serializing 'set2ExpirationTime' field") } + } - // Optional Field (set2KeyCount) (Can be skipped, if the value is null) - var set2KeyCount *uint8 = nil - if m.GetSet2KeyCount() != nil { - set2KeyCount = m.GetSet2KeyCount() - _set2KeyCountErr := writeBuffer.WriteUint8("set2KeyCount", 8, *(set2KeyCount)) - if _set2KeyCountErr != nil { - return errors.Wrap(_set2KeyCountErr, "Error serializing 'set2KeyCount' field") - } + // Optional Field (set2KeyCount) (Can be skipped, if the value is null) + var set2KeyCount *uint8 = nil + if m.GetSet2KeyCount() != nil { + set2KeyCount = m.GetSet2KeyCount() + _set2KeyCountErr := writeBuffer.WriteUint8("set2KeyCount", 8, *(set2KeyCount)) + if _set2KeyCountErr != nil { + return errors.Wrap(_set2KeyCountErr, "Error serializing 'set2KeyCount' field") } + } - // Array Field (set2Keys) - if pushErr := writeBuffer.PushContext("set2Keys", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for set2Keys") - } - for _curItem, _element := range m.GetSet2Keys() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetSet2Keys()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'set2Keys' field") - } - } - if popErr := writeBuffer.PopContext("set2Keys", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for set2Keys") + // Array Field (set2Keys) + if pushErr := writeBuffer.PushContext("set2Keys", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for set2Keys") + } + for _curItem, _element := range m.GetSet2Keys() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetSet2Keys()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'set2Keys' field") } + } + if popErr := writeBuffer.PopContext("set2Keys", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for set2Keys") + } if popErr := writeBuffer.PopContext("NLMUpdateKeyUpdate"); popErr != nil { return errors.Wrap(popErr, "Error popping for NLMUpdateKeyUpdate") @@ -597,6 +601,7 @@ func (m *_NLMUpdateKeyUpdate) SerializeWithWriteBuffer(ctx context.Context, writ return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_NLMUpdateKeyUpdate) isNLMUpdateKeyUpdate() bool { return true } @@ -611,3 +616,6 @@ func (m *_NLMUpdateKeyUpdate) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/NLMUpdateKeyUpdateControlFlags.go b/plc4go/protocols/bacnetip/readwrite/model/NLMUpdateKeyUpdateControlFlags.go index 8d2292168cb..4d130d82b7f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/NLMUpdateKeyUpdateControlFlags.go +++ b/plc4go/protocols/bacnetip/readwrite/model/NLMUpdateKeyUpdateControlFlags.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // NLMUpdateKeyUpdateControlFlags is the corresponding interface of NLMUpdateKeyUpdateControlFlags type NLMUpdateKeyUpdateControlFlags interface { @@ -58,16 +60,17 @@ type NLMUpdateKeyUpdateControlFlagsExactly interface { // _NLMUpdateKeyUpdateControlFlags is the data-structure of this message type _NLMUpdateKeyUpdateControlFlags struct { - Set1KeyRevisionActivationTimeExpirationTimePresent bool - Set1KeyCountKeyParametersPresent bool - Set1ShouldBeCleared bool - Set2KeyRevisionActivationTimeExpirationTimePresent bool - Set2KeyCountKeyParametersPresent bool - Set2ShouldBeCleared bool - MoreMessagesToBeExpected bool - RemoveAllKeys bool + Set1KeyRevisionActivationTimeExpirationTimePresent bool + Set1KeyCountKeyParametersPresent bool + Set1ShouldBeCleared bool + Set2KeyRevisionActivationTimeExpirationTimePresent bool + Set2KeyCountKeyParametersPresent bool + Set2ShouldBeCleared bool + MoreMessagesToBeExpected bool + RemoveAllKeys bool } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -110,14 +113,15 @@ func (m *_NLMUpdateKeyUpdateControlFlags) GetRemoveAllKeys() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewNLMUpdateKeyUpdateControlFlags factory function for _NLMUpdateKeyUpdateControlFlags -func NewNLMUpdateKeyUpdateControlFlags(set1KeyRevisionActivationTimeExpirationTimePresent bool, set1KeyCountKeyParametersPresent bool, set1ShouldBeCleared bool, set2KeyRevisionActivationTimeExpirationTimePresent bool, set2KeyCountKeyParametersPresent bool, set2ShouldBeCleared bool, moreMessagesToBeExpected bool, removeAllKeys bool) *_NLMUpdateKeyUpdateControlFlags { - return &_NLMUpdateKeyUpdateControlFlags{Set1KeyRevisionActivationTimeExpirationTimePresent: set1KeyRevisionActivationTimeExpirationTimePresent, Set1KeyCountKeyParametersPresent: set1KeyCountKeyParametersPresent, Set1ShouldBeCleared: set1ShouldBeCleared, Set2KeyRevisionActivationTimeExpirationTimePresent: set2KeyRevisionActivationTimeExpirationTimePresent, Set2KeyCountKeyParametersPresent: set2KeyCountKeyParametersPresent, Set2ShouldBeCleared: set2ShouldBeCleared, MoreMessagesToBeExpected: moreMessagesToBeExpected, RemoveAllKeys: removeAllKeys} +func NewNLMUpdateKeyUpdateControlFlags( set1KeyRevisionActivationTimeExpirationTimePresent bool , set1KeyCountKeyParametersPresent bool , set1ShouldBeCleared bool , set2KeyRevisionActivationTimeExpirationTimePresent bool , set2KeyCountKeyParametersPresent bool , set2ShouldBeCleared bool , moreMessagesToBeExpected bool , removeAllKeys bool ) *_NLMUpdateKeyUpdateControlFlags { +return &_NLMUpdateKeyUpdateControlFlags{ Set1KeyRevisionActivationTimeExpirationTimePresent: set1KeyRevisionActivationTimeExpirationTimePresent , Set1KeyCountKeyParametersPresent: set1KeyCountKeyParametersPresent , Set1ShouldBeCleared: set1ShouldBeCleared , Set2KeyRevisionActivationTimeExpirationTimePresent: set2KeyRevisionActivationTimeExpirationTimePresent , Set2KeyCountKeyParametersPresent: set2KeyCountKeyParametersPresent , Set2ShouldBeCleared: set2ShouldBeCleared , MoreMessagesToBeExpected: moreMessagesToBeExpected , RemoveAllKeys: removeAllKeys } } // Deprecated: use the interface for direct cast func CastNLMUpdateKeyUpdateControlFlags(structType interface{}) NLMUpdateKeyUpdateControlFlags { - if casted, ok := structType.(NLMUpdateKeyUpdateControlFlags); ok { + if casted, ok := structType.(NLMUpdateKeyUpdateControlFlags); ok { return casted } if casted, ok := structType.(*NLMUpdateKeyUpdateControlFlags); ok { @@ -134,32 +138,33 @@ func (m *_NLMUpdateKeyUpdateControlFlags) GetLengthInBits(ctx context.Context) u lengthInBits := uint16(0) // Simple field (set1KeyRevisionActivationTimeExpirationTimePresent) - lengthInBits += 1 + lengthInBits += 1; // Simple field (set1KeyCountKeyParametersPresent) - lengthInBits += 1 + lengthInBits += 1; // Simple field (set1ShouldBeCleared) - lengthInBits += 1 + lengthInBits += 1; // Simple field (set2KeyRevisionActivationTimeExpirationTimePresent) - lengthInBits += 1 + lengthInBits += 1; // Simple field (set2KeyCountKeyParametersPresent) - lengthInBits += 1 + lengthInBits += 1; // Simple field (set2ShouldBeCleared) - lengthInBits += 1 + lengthInBits += 1; // Simple field (moreMessagesToBeExpected) - lengthInBits += 1 + lengthInBits += 1; // Simple field (removeAllKeys) - lengthInBits += 1 + lengthInBits += 1; return lengthInBits } + func (m *_NLMUpdateKeyUpdateControlFlags) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -178,56 +183,56 @@ func NLMUpdateKeyUpdateControlFlagsParseWithBuffer(ctx context.Context, readBuff _ = currentPos // Simple Field (set1KeyRevisionActivationTimeExpirationTimePresent) - _set1KeyRevisionActivationTimeExpirationTimePresent, _set1KeyRevisionActivationTimeExpirationTimePresentErr := readBuffer.ReadBit("set1KeyRevisionActivationTimeExpirationTimePresent") +_set1KeyRevisionActivationTimeExpirationTimePresent, _set1KeyRevisionActivationTimeExpirationTimePresentErr := readBuffer.ReadBit("set1KeyRevisionActivationTimeExpirationTimePresent") if _set1KeyRevisionActivationTimeExpirationTimePresentErr != nil { return nil, errors.Wrap(_set1KeyRevisionActivationTimeExpirationTimePresentErr, "Error parsing 'set1KeyRevisionActivationTimeExpirationTimePresent' field of NLMUpdateKeyUpdateControlFlags") } set1KeyRevisionActivationTimeExpirationTimePresent := _set1KeyRevisionActivationTimeExpirationTimePresent // Simple Field (set1KeyCountKeyParametersPresent) - _set1KeyCountKeyParametersPresent, _set1KeyCountKeyParametersPresentErr := readBuffer.ReadBit("set1KeyCountKeyParametersPresent") +_set1KeyCountKeyParametersPresent, _set1KeyCountKeyParametersPresentErr := readBuffer.ReadBit("set1KeyCountKeyParametersPresent") if _set1KeyCountKeyParametersPresentErr != nil { return nil, errors.Wrap(_set1KeyCountKeyParametersPresentErr, "Error parsing 'set1KeyCountKeyParametersPresent' field of NLMUpdateKeyUpdateControlFlags") } set1KeyCountKeyParametersPresent := _set1KeyCountKeyParametersPresent // Simple Field (set1ShouldBeCleared) - _set1ShouldBeCleared, _set1ShouldBeClearedErr := readBuffer.ReadBit("set1ShouldBeCleared") +_set1ShouldBeCleared, _set1ShouldBeClearedErr := readBuffer.ReadBit("set1ShouldBeCleared") if _set1ShouldBeClearedErr != nil { return nil, errors.Wrap(_set1ShouldBeClearedErr, "Error parsing 'set1ShouldBeCleared' field of NLMUpdateKeyUpdateControlFlags") } set1ShouldBeCleared := _set1ShouldBeCleared // Simple Field (set2KeyRevisionActivationTimeExpirationTimePresent) - _set2KeyRevisionActivationTimeExpirationTimePresent, _set2KeyRevisionActivationTimeExpirationTimePresentErr := readBuffer.ReadBit("set2KeyRevisionActivationTimeExpirationTimePresent") +_set2KeyRevisionActivationTimeExpirationTimePresent, _set2KeyRevisionActivationTimeExpirationTimePresentErr := readBuffer.ReadBit("set2KeyRevisionActivationTimeExpirationTimePresent") if _set2KeyRevisionActivationTimeExpirationTimePresentErr != nil { return nil, errors.Wrap(_set2KeyRevisionActivationTimeExpirationTimePresentErr, "Error parsing 'set2KeyRevisionActivationTimeExpirationTimePresent' field of NLMUpdateKeyUpdateControlFlags") } set2KeyRevisionActivationTimeExpirationTimePresent := _set2KeyRevisionActivationTimeExpirationTimePresent // Simple Field (set2KeyCountKeyParametersPresent) - _set2KeyCountKeyParametersPresent, _set2KeyCountKeyParametersPresentErr := readBuffer.ReadBit("set2KeyCountKeyParametersPresent") +_set2KeyCountKeyParametersPresent, _set2KeyCountKeyParametersPresentErr := readBuffer.ReadBit("set2KeyCountKeyParametersPresent") if _set2KeyCountKeyParametersPresentErr != nil { return nil, errors.Wrap(_set2KeyCountKeyParametersPresentErr, "Error parsing 'set2KeyCountKeyParametersPresent' field of NLMUpdateKeyUpdateControlFlags") } set2KeyCountKeyParametersPresent := _set2KeyCountKeyParametersPresent // Simple Field (set2ShouldBeCleared) - _set2ShouldBeCleared, _set2ShouldBeClearedErr := readBuffer.ReadBit("set2ShouldBeCleared") +_set2ShouldBeCleared, _set2ShouldBeClearedErr := readBuffer.ReadBit("set2ShouldBeCleared") if _set2ShouldBeClearedErr != nil { return nil, errors.Wrap(_set2ShouldBeClearedErr, "Error parsing 'set2ShouldBeCleared' field of NLMUpdateKeyUpdateControlFlags") } set2ShouldBeCleared := _set2ShouldBeCleared // Simple Field (moreMessagesToBeExpected) - _moreMessagesToBeExpected, _moreMessagesToBeExpectedErr := readBuffer.ReadBit("moreMessagesToBeExpected") +_moreMessagesToBeExpected, _moreMessagesToBeExpectedErr := readBuffer.ReadBit("moreMessagesToBeExpected") if _moreMessagesToBeExpectedErr != nil { return nil, errors.Wrap(_moreMessagesToBeExpectedErr, "Error parsing 'moreMessagesToBeExpected' field of NLMUpdateKeyUpdateControlFlags") } moreMessagesToBeExpected := _moreMessagesToBeExpected // Simple Field (removeAllKeys) - _removeAllKeys, _removeAllKeysErr := readBuffer.ReadBit("removeAllKeys") +_removeAllKeys, _removeAllKeysErr := readBuffer.ReadBit("removeAllKeys") if _removeAllKeysErr != nil { return nil, errors.Wrap(_removeAllKeysErr, "Error parsing 'removeAllKeys' field of NLMUpdateKeyUpdateControlFlags") } @@ -239,15 +244,15 @@ func NLMUpdateKeyUpdateControlFlagsParseWithBuffer(ctx context.Context, readBuff // Create the instance return &_NLMUpdateKeyUpdateControlFlags{ - Set1KeyRevisionActivationTimeExpirationTimePresent: set1KeyRevisionActivationTimeExpirationTimePresent, - Set1KeyCountKeyParametersPresent: set1KeyCountKeyParametersPresent, - Set1ShouldBeCleared: set1ShouldBeCleared, - Set2KeyRevisionActivationTimeExpirationTimePresent: set2KeyRevisionActivationTimeExpirationTimePresent, - Set2KeyCountKeyParametersPresent: set2KeyCountKeyParametersPresent, - Set2ShouldBeCleared: set2ShouldBeCleared, - MoreMessagesToBeExpected: moreMessagesToBeExpected, - RemoveAllKeys: removeAllKeys, - }, nil + Set1KeyRevisionActivationTimeExpirationTimePresent: set1KeyRevisionActivationTimeExpirationTimePresent, + Set1KeyCountKeyParametersPresent: set1KeyCountKeyParametersPresent, + Set1ShouldBeCleared: set1ShouldBeCleared, + Set2KeyRevisionActivationTimeExpirationTimePresent: set2KeyRevisionActivationTimeExpirationTimePresent, + Set2KeyCountKeyParametersPresent: set2KeyCountKeyParametersPresent, + Set2ShouldBeCleared: set2ShouldBeCleared, + MoreMessagesToBeExpected: moreMessagesToBeExpected, + RemoveAllKeys: removeAllKeys, + }, nil } func (m *_NLMUpdateKeyUpdateControlFlags) Serialize() ([]byte, error) { @@ -261,7 +266,7 @@ func (m *_NLMUpdateKeyUpdateControlFlags) Serialize() ([]byte, error) { func (m *_NLMUpdateKeyUpdateControlFlags) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("NLMUpdateKeyUpdateControlFlags"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("NLMUpdateKeyUpdateControlFlags"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for NLMUpdateKeyUpdateControlFlags") } @@ -327,6 +332,7 @@ func (m *_NLMUpdateKeyUpdateControlFlags) SerializeWithWriteBuffer(ctx context.C return nil } + func (m *_NLMUpdateKeyUpdateControlFlags) isNLMUpdateKeyUpdateControlFlags() bool { return true } @@ -341,3 +347,6 @@ func (m *_NLMUpdateKeyUpdateControlFlags) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/NLMUpdateKeyUpdateKeyEntry.go b/plc4go/protocols/bacnetip/readwrite/model/NLMUpdateKeyUpdateKeyEntry.go index 6cf1f317418..9b46aeeaa36 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/NLMUpdateKeyUpdateKeyEntry.go +++ b/plc4go/protocols/bacnetip/readwrite/model/NLMUpdateKeyUpdateKeyEntry.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // NLMUpdateKeyUpdateKeyEntry is the corresponding interface of NLMUpdateKeyUpdateKeyEntry type NLMUpdateKeyUpdateKeyEntry interface { @@ -48,11 +50,12 @@ type NLMUpdateKeyUpdateKeyEntryExactly interface { // _NLMUpdateKeyUpdateKeyEntry is the data-structure of this message type _NLMUpdateKeyUpdateKeyEntry struct { - KeyIdentifier uint16 - KeySize uint8 - Key []byte + KeyIdentifier uint16 + KeySize uint8 + Key []byte } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -75,14 +78,15 @@ func (m *_NLMUpdateKeyUpdateKeyEntry) GetKey() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewNLMUpdateKeyUpdateKeyEntry factory function for _NLMUpdateKeyUpdateKeyEntry -func NewNLMUpdateKeyUpdateKeyEntry(keyIdentifier uint16, keySize uint8, key []byte) *_NLMUpdateKeyUpdateKeyEntry { - return &_NLMUpdateKeyUpdateKeyEntry{KeyIdentifier: keyIdentifier, KeySize: keySize, Key: key} +func NewNLMUpdateKeyUpdateKeyEntry( keyIdentifier uint16 , keySize uint8 , key []byte ) *_NLMUpdateKeyUpdateKeyEntry { +return &_NLMUpdateKeyUpdateKeyEntry{ KeyIdentifier: keyIdentifier , KeySize: keySize , Key: key } } // Deprecated: use the interface for direct cast func CastNLMUpdateKeyUpdateKeyEntry(structType interface{}) NLMUpdateKeyUpdateKeyEntry { - if casted, ok := structType.(NLMUpdateKeyUpdateKeyEntry); ok { + if casted, ok := structType.(NLMUpdateKeyUpdateKeyEntry); ok { return casted } if casted, ok := structType.(*NLMUpdateKeyUpdateKeyEntry); ok { @@ -99,10 +103,10 @@ func (m *_NLMUpdateKeyUpdateKeyEntry) GetLengthInBits(ctx context.Context) uint1 lengthInBits := uint16(0) // Simple field (keyIdentifier) - lengthInBits += 16 + lengthInBits += 16; // Simple field (keySize) - lengthInBits += 8 + lengthInBits += 8; // Array field if len(m.Key) > 0 { @@ -112,6 +116,7 @@ func (m *_NLMUpdateKeyUpdateKeyEntry) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_NLMUpdateKeyUpdateKeyEntry) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -130,14 +135,14 @@ func NLMUpdateKeyUpdateKeyEntryParseWithBuffer(ctx context.Context, readBuffer u _ = currentPos // Simple Field (keyIdentifier) - _keyIdentifier, _keyIdentifierErr := readBuffer.ReadUint16("keyIdentifier", 16) +_keyIdentifier, _keyIdentifierErr := readBuffer.ReadUint16("keyIdentifier", 16) if _keyIdentifierErr != nil { return nil, errors.Wrap(_keyIdentifierErr, "Error parsing 'keyIdentifier' field of NLMUpdateKeyUpdateKeyEntry") } keyIdentifier := _keyIdentifier // Simple Field (keySize) - _keySize, _keySizeErr := readBuffer.ReadUint8("keySize", 8) +_keySize, _keySizeErr := readBuffer.ReadUint8("keySize", 8) if _keySizeErr != nil { return nil, errors.Wrap(_keySizeErr, "Error parsing 'keySize' field of NLMUpdateKeyUpdateKeyEntry") } @@ -155,10 +160,10 @@ func NLMUpdateKeyUpdateKeyEntryParseWithBuffer(ctx context.Context, readBuffer u // Create the instance return &_NLMUpdateKeyUpdateKeyEntry{ - KeyIdentifier: keyIdentifier, - KeySize: keySize, - Key: key, - }, nil + KeyIdentifier: keyIdentifier, + KeySize: keySize, + Key: key, + }, nil } func (m *_NLMUpdateKeyUpdateKeyEntry) Serialize() ([]byte, error) { @@ -172,7 +177,7 @@ func (m *_NLMUpdateKeyUpdateKeyEntry) Serialize() ([]byte, error) { func (m *_NLMUpdateKeyUpdateKeyEntry) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("NLMUpdateKeyUpdateKeyEntry"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("NLMUpdateKeyUpdateKeyEntry"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for NLMUpdateKeyUpdateKeyEntry") } @@ -202,6 +207,7 @@ func (m *_NLMUpdateKeyUpdateKeyEntry) SerializeWithWriteBuffer(ctx context.Conte return nil } + func (m *_NLMUpdateKeyUpdateKeyEntry) isNLMUpdateKeyUpdateKeyEntry() bool { return true } @@ -216,3 +222,6 @@ func (m *_NLMUpdateKeyUpdateKeyEntry) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/NLMVendorProprietaryMessage.go b/plc4go/protocols/bacnetip/readwrite/model/NLMVendorProprietaryMessage.go index ce6310fe78c..eb9bd72811f 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/NLMVendorProprietaryMessage.go +++ b/plc4go/protocols/bacnetip/readwrite/model/NLMVendorProprietaryMessage.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // NLMVendorProprietaryMessage is the corresponding interface of NLMVendorProprietaryMessage type NLMVendorProprietaryMessage interface { @@ -48,30 +50,30 @@ type NLMVendorProprietaryMessageExactly interface { // _NLMVendorProprietaryMessage is the data-structure of this message type _NLMVendorProprietaryMessage struct { *_NLM - VendorId BACnetVendorId - ProprietaryMessage []byte + VendorId BACnetVendorId + ProprietaryMessage []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_NLMVendorProprietaryMessage) GetMessageType() uint8 { - return 0 -} +func (m *_NLMVendorProprietaryMessage) GetMessageType() uint8 { +return 0} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_NLMVendorProprietaryMessage) InitializeParent(parent NLM) {} +func (m *_NLMVendorProprietaryMessage) InitializeParent(parent NLM ) {} -func (m *_NLMVendorProprietaryMessage) GetParent() NLM { +func (m *_NLMVendorProprietaryMessage) GetParent() NLM { return m._NLM } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_NLMVendorProprietaryMessage) GetProprietaryMessage() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewNLMVendorProprietaryMessage factory function for _NLMVendorProprietaryMessage -func NewNLMVendorProprietaryMessage(vendorId BACnetVendorId, proprietaryMessage []byte, apduLength uint16) *_NLMVendorProprietaryMessage { +func NewNLMVendorProprietaryMessage( vendorId BACnetVendorId , proprietaryMessage []byte , apduLength uint16 ) *_NLMVendorProprietaryMessage { _result := &_NLMVendorProprietaryMessage{ - VendorId: vendorId, + VendorId: vendorId, ProprietaryMessage: proprietaryMessage, - _NLM: NewNLM(apduLength), + _NLM: NewNLM(apduLength), } _result._NLM._NLMChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewNLMVendorProprietaryMessage(vendorId BACnetVendorId, proprietaryMessage // Deprecated: use the interface for direct cast func CastNLMVendorProprietaryMessage(structType interface{}) NLMVendorProprietaryMessage { - if casted, ok := structType.(NLMVendorProprietaryMessage); ok { + if casted, ok := structType.(NLMVendorProprietaryMessage); ok { return casted } if casted, ok := structType.(*NLMVendorProprietaryMessage); ok { @@ -130,6 +133,7 @@ func (m *_NLMVendorProprietaryMessage) GetLengthInBits(ctx context.Context) uint return lengthInBits } + func (m *_NLMVendorProprietaryMessage) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,7 +155,7 @@ func NLMVendorProprietaryMessageParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("vendorId"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for vendorId") } - _vendorId, _vendorIdErr := BACnetVendorIdParseWithBuffer(ctx, readBuffer) +_vendorId, _vendorIdErr := BACnetVendorIdParseWithBuffer(ctx, readBuffer) if _vendorIdErr != nil { return nil, errors.Wrap(_vendorIdErr, "Error parsing 'vendorId' field of NLMVendorProprietaryMessage") } @@ -160,7 +164,7 @@ func NLMVendorProprietaryMessageParseWithBuffer(ctx context.Context, readBuffer return nil, errors.Wrap(closeErr, "Error closing for vendorId") } // Byte Array field (proprietaryMessage) - numberOfBytesproprietaryMessage := int(utils.InlineIf((bool((apduLength) > (0))), func() interface{} { return uint16((uint16(apduLength) - uint16(uint16(3)))) }, func() interface{} { return uint16(uint16(0)) }).(uint16)) + numberOfBytesproprietaryMessage := int(utils.InlineIf((bool((apduLength) > ((0)))), func() interface{} {return uint16((uint16(apduLength) - uint16(uint16(3))))}, func() interface{} {return uint16(uint16(0))}).(uint16)) proprietaryMessage, _readArrayErr := readBuffer.ReadByteArray("proprietaryMessage", numberOfBytesproprietaryMessage) if _readArrayErr != nil { return nil, errors.Wrap(_readArrayErr, "Error parsing 'proprietaryMessage' field of NLMVendorProprietaryMessage") @@ -175,7 +179,7 @@ func NLMVendorProprietaryMessageParseWithBuffer(ctx context.Context, readBuffer _NLM: &_NLM{ ApduLength: apduLength, }, - VendorId: vendorId, + VendorId: vendorId, ProprietaryMessage: proprietaryMessage, } _child._NLM._NLMChildRequirements = _child @@ -198,23 +202,23 @@ func (m *_NLMVendorProprietaryMessage) SerializeWithWriteBuffer(ctx context.Cont return errors.Wrap(pushErr, "Error pushing for NLMVendorProprietaryMessage") } - // Simple Field (vendorId) - if pushErr := writeBuffer.PushContext("vendorId"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for vendorId") - } - _vendorIdErr := writeBuffer.WriteSerializable(ctx, m.GetVendorId()) - if popErr := writeBuffer.PopContext("vendorId"); popErr != nil { - return errors.Wrap(popErr, "Error popping for vendorId") - } - if _vendorIdErr != nil { - return errors.Wrap(_vendorIdErr, "Error serializing 'vendorId' field") - } + // Simple Field (vendorId) + if pushErr := writeBuffer.PushContext("vendorId"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for vendorId") + } + _vendorIdErr := writeBuffer.WriteSerializable(ctx, m.GetVendorId()) + if popErr := writeBuffer.PopContext("vendorId"); popErr != nil { + return errors.Wrap(popErr, "Error popping for vendorId") + } + if _vendorIdErr != nil { + return errors.Wrap(_vendorIdErr, "Error serializing 'vendorId' field") + } - // Array Field (proprietaryMessage) - // Byte Array field (proprietaryMessage) - if err := writeBuffer.WriteByteArray("proprietaryMessage", m.GetProprietaryMessage()); err != nil { - return errors.Wrap(err, "Error serializing 'proprietaryMessage' field") - } + // Array Field (proprietaryMessage) + // Byte Array field (proprietaryMessage) + if err := writeBuffer.WriteByteArray("proprietaryMessage", m.GetProprietaryMessage()); err != nil { + return errors.Wrap(err, "Error serializing 'proprietaryMessage' field") + } if popErr := writeBuffer.PopContext("NLMVendorProprietaryMessage"); popErr != nil { return errors.Wrap(popErr, "Error popping for NLMVendorProprietaryMessage") @@ -224,6 +228,7 @@ func (m *_NLMVendorProprietaryMessage) SerializeWithWriteBuffer(ctx context.Cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_NLMVendorProprietaryMessage) isNLMVendorProprietaryMessage() bool { return true } @@ -238,3 +243,6 @@ func (m *_NLMVendorProprietaryMessage) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/NLMWhatIsNetworkNumber.go b/plc4go/protocols/bacnetip/readwrite/model/NLMWhatIsNetworkNumber.go index 6a75d2884bf..419e2bf8620 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/NLMWhatIsNetworkNumber.go +++ b/plc4go/protocols/bacnetip/readwrite/model/NLMWhatIsNetworkNumber.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // NLMWhatIsNetworkNumber is the corresponding interface of NLMWhatIsNetworkNumber type NLMWhatIsNetworkNumber interface { @@ -46,30 +48,32 @@ type _NLMWhatIsNetworkNumber struct { *_NLM } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_NLMWhatIsNetworkNumber) GetMessageType() uint8 { - return 0x12 -} +func (m *_NLMWhatIsNetworkNumber) GetMessageType() uint8 { +return 0x12} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_NLMWhatIsNetworkNumber) InitializeParent(parent NLM) {} +func (m *_NLMWhatIsNetworkNumber) InitializeParent(parent NLM ) {} -func (m *_NLMWhatIsNetworkNumber) GetParent() NLM { +func (m *_NLMWhatIsNetworkNumber) GetParent() NLM { return m._NLM } + // NewNLMWhatIsNetworkNumber factory function for _NLMWhatIsNetworkNumber -func NewNLMWhatIsNetworkNumber(apduLength uint16) *_NLMWhatIsNetworkNumber { +func NewNLMWhatIsNetworkNumber( apduLength uint16 ) *_NLMWhatIsNetworkNumber { _result := &_NLMWhatIsNetworkNumber{ - _NLM: NewNLM(apduLength), + _NLM: NewNLM(apduLength), } _result._NLM._NLMChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewNLMWhatIsNetworkNumber(apduLength uint16) *_NLMWhatIsNetworkNumber { // Deprecated: use the interface for direct cast func CastNLMWhatIsNetworkNumber(structType interface{}) NLMWhatIsNetworkNumber { - if casted, ok := structType.(NLMWhatIsNetworkNumber); ok { + if casted, ok := structType.(NLMWhatIsNetworkNumber); ok { return casted } if casted, ok := structType.(*NLMWhatIsNetworkNumber); ok { @@ -96,6 +100,7 @@ func (m *_NLMWhatIsNetworkNumber) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_NLMWhatIsNetworkNumber) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_NLMWhatIsNetworkNumber) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_NLMWhatIsNetworkNumber) isNLMWhatIsNetworkNumber() bool { return true } @@ -165,3 +171,6 @@ func (m *_NLMWhatIsNetworkNumber) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/NLMWhoIsRouterToNetwork.go b/plc4go/protocols/bacnetip/readwrite/model/NLMWhoIsRouterToNetwork.go index 4c4b0ec9ef6..06f1ff8069c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/NLMWhoIsRouterToNetwork.go +++ b/plc4go/protocols/bacnetip/readwrite/model/NLMWhoIsRouterToNetwork.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // NLMWhoIsRouterToNetwork is the corresponding interface of NLMWhoIsRouterToNetwork type NLMWhoIsRouterToNetwork interface { @@ -46,29 +48,29 @@ type NLMWhoIsRouterToNetworkExactly interface { // _NLMWhoIsRouterToNetwork is the data-structure of this message type _NLMWhoIsRouterToNetwork struct { *_NLM - DestinationNetworkAddress *uint16 + DestinationNetworkAddress *uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_NLMWhoIsRouterToNetwork) GetMessageType() uint8 { - return 0x00 -} +func (m *_NLMWhoIsRouterToNetwork) GetMessageType() uint8 { +return 0x00} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_NLMWhoIsRouterToNetwork) InitializeParent(parent NLM) {} +func (m *_NLMWhoIsRouterToNetwork) InitializeParent(parent NLM ) {} -func (m *_NLMWhoIsRouterToNetwork) GetParent() NLM { +func (m *_NLMWhoIsRouterToNetwork) GetParent() NLM { return m._NLM } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_NLMWhoIsRouterToNetwork) GetDestinationNetworkAddress() *uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewNLMWhoIsRouterToNetwork factory function for _NLMWhoIsRouterToNetwork -func NewNLMWhoIsRouterToNetwork(destinationNetworkAddress *uint16, apduLength uint16) *_NLMWhoIsRouterToNetwork { +func NewNLMWhoIsRouterToNetwork( destinationNetworkAddress *uint16 , apduLength uint16 ) *_NLMWhoIsRouterToNetwork { _result := &_NLMWhoIsRouterToNetwork{ DestinationNetworkAddress: destinationNetworkAddress, - _NLM: NewNLM(apduLength), + _NLM: NewNLM(apduLength), } _result._NLM._NLMChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewNLMWhoIsRouterToNetwork(destinationNetworkAddress *uint16, apduLength ui // Deprecated: use the interface for direct cast func CastNLMWhoIsRouterToNetwork(structType interface{}) NLMWhoIsRouterToNetwork { - if casted, ok := structType.(NLMWhoIsRouterToNetwork); ok { + if casted, ok := structType.(NLMWhoIsRouterToNetwork); ok { return casted } if casted, ok := structType.(*NLMWhoIsRouterToNetwork); ok { @@ -119,6 +122,7 @@ func (m *_NLMWhoIsRouterToNetwork) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_NLMWhoIsRouterToNetwork) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func NLMWhoIsRouterToNetworkParseWithBuffer(ctx context.Context, readBuffer util // Optional Field (destinationNetworkAddress) (Can be skipped, if a given expression evaluates to false) var destinationNetworkAddress *uint16 = nil - { +{ _val, _err := readBuffer.ReadUint16("destinationNetworkAddress", 16) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'destinationNetworkAddress' field of NLMWhoIsRouterToNetwork") @@ -177,15 +181,15 @@ func (m *_NLMWhoIsRouterToNetwork) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for NLMWhoIsRouterToNetwork") } - // Optional Field (destinationNetworkAddress) (Can be skipped, if the value is null) - var destinationNetworkAddress *uint16 = nil - if m.GetDestinationNetworkAddress() != nil { - destinationNetworkAddress = m.GetDestinationNetworkAddress() - _destinationNetworkAddressErr := writeBuffer.WriteUint16("destinationNetworkAddress", 16, *(destinationNetworkAddress)) - if _destinationNetworkAddressErr != nil { - return errors.Wrap(_destinationNetworkAddressErr, "Error serializing 'destinationNetworkAddress' field") - } + // Optional Field (destinationNetworkAddress) (Can be skipped, if the value is null) + var destinationNetworkAddress *uint16 = nil + if m.GetDestinationNetworkAddress() != nil { + destinationNetworkAddress = m.GetDestinationNetworkAddress() + _destinationNetworkAddressErr := writeBuffer.WriteUint16("destinationNetworkAddress", 16, *(destinationNetworkAddress)) + if _destinationNetworkAddressErr != nil { + return errors.Wrap(_destinationNetworkAddressErr, "Error serializing 'destinationNetworkAddress' field") } + } if popErr := writeBuffer.PopContext("NLMWhoIsRouterToNetwork"); popErr != nil { return errors.Wrap(popErr, "Error popping for NLMWhoIsRouterToNetwork") @@ -195,6 +199,7 @@ func (m *_NLMWhoIsRouterToNetwork) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_NLMWhoIsRouterToNetwork) isNLMWhoIsRouterToNetwork() bool { return true } @@ -209,3 +214,6 @@ func (m *_NLMWhoIsRouterToNetwork) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/NPDU.go b/plc4go/protocols/bacnetip/readwrite/model/NPDU.go index dcc96910a0e..22f4809fe86 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/NPDU.go +++ b/plc4go/protocols/bacnetip/readwrite/model/NPDU.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // NPDU is the corresponding interface of NPDU type NPDU interface { @@ -72,22 +74,23 @@ type NPDUExactly interface { // _NPDU is the data-structure of this message type _NPDU struct { - ProtocolVersionNumber uint8 - Control NPDUControl - DestinationNetworkAddress *uint16 - DestinationLength *uint8 - DestinationAddress []uint8 - SourceNetworkAddress *uint16 - SourceLength *uint8 - SourceAddress []uint8 - HopCount *uint8 - Nlm NLM - Apdu APDU + ProtocolVersionNumber uint8 + Control NPDUControl + DestinationNetworkAddress *uint16 + DestinationLength *uint8 + DestinationAddress []uint8 + SourceNetworkAddress *uint16 + SourceLength *uint8 + SourceAddress []uint8 + HopCount *uint8 + Nlm NLM + Apdu APDU // Arguments. NpduLength uint16 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -163,7 +166,7 @@ func (m *_NPDU) GetDestinationLengthAddon() uint16 { _ = nlm apdu := m.Apdu _ = apdu - return uint16(utils.InlineIf(m.GetControl().GetDestinationSpecified(), func() interface{} { return uint16((uint16(uint16(3)) + uint16((*m.GetDestinationLength())))) }, func() interface{} { return uint16(uint16(0)) }).(uint16)) + return uint16(utils.InlineIf(m.GetControl().GetDestinationSpecified(), func() interface{} {return uint16((uint16(uint16(3)) + uint16((*m.GetDestinationLength()))))}, func() interface{} {return uint16(uint16(0))}).(uint16)) } func (m *_NPDU) GetSourceLengthAddon() uint16 { @@ -183,7 +186,7 @@ func (m *_NPDU) GetSourceLengthAddon() uint16 { _ = nlm apdu := m.Apdu _ = apdu - return uint16(utils.InlineIf(m.GetControl().GetSourceSpecified(), func() interface{} { return uint16((uint16(uint16(3)) + uint16((*m.GetSourceLength())))) }, func() interface{} { return uint16(uint16(0)) }).(uint16)) + return uint16(utils.InlineIf(m.GetControl().GetSourceSpecified(), func() interface{} {return uint16((uint16(uint16(3)) + uint16((*m.GetSourceLength()))))}, func() interface{} {return uint16(uint16(0))}).(uint16)) } func (m *_NPDU) GetPayloadSubtraction() uint16 { @@ -203,7 +206,7 @@ func (m *_NPDU) GetPayloadSubtraction() uint16 { _ = nlm apdu := m.Apdu _ = apdu - return uint16(uint16(uint16(2)) + uint16((uint16(uint16(m.GetSourceLengthAddon())+uint16(m.GetDestinationLengthAddon())) + uint16((utils.InlineIf((m.GetControl().GetDestinationSpecified()), func() interface{} { return uint16(uint16(1)) }, func() interface{} { return uint16(uint16(0)) }).(uint16)))))) + return uint16(uint16(uint16(2)) + uint16((uint16(uint16(m.GetSourceLengthAddon()) + uint16(m.GetDestinationLengthAddon())) + uint16((utils.InlineIf((m.GetControl().GetDestinationSpecified()), func() interface{} {return uint16(uint16(1))}, func() interface{} {return uint16(uint16(0))}).(uint16)))))) } /////////////////////// @@ -211,14 +214,15 @@ func (m *_NPDU) GetPayloadSubtraction() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewNPDU factory function for _NPDU -func NewNPDU(protocolVersionNumber uint8, control NPDUControl, destinationNetworkAddress *uint16, destinationLength *uint8, destinationAddress []uint8, sourceNetworkAddress *uint16, sourceLength *uint8, sourceAddress []uint8, hopCount *uint8, nlm NLM, apdu APDU, npduLength uint16) *_NPDU { - return &_NPDU{ProtocolVersionNumber: protocolVersionNumber, Control: control, DestinationNetworkAddress: destinationNetworkAddress, DestinationLength: destinationLength, DestinationAddress: destinationAddress, SourceNetworkAddress: sourceNetworkAddress, SourceLength: sourceLength, SourceAddress: sourceAddress, HopCount: hopCount, Nlm: nlm, Apdu: apdu, NpduLength: npduLength} +func NewNPDU( protocolVersionNumber uint8 , control NPDUControl , destinationNetworkAddress *uint16 , destinationLength *uint8 , destinationAddress []uint8 , sourceNetworkAddress *uint16 , sourceLength *uint8 , sourceAddress []uint8 , hopCount *uint8 , nlm NLM , apdu APDU , npduLength uint16 ) *_NPDU { +return &_NPDU{ ProtocolVersionNumber: protocolVersionNumber , Control: control , DestinationNetworkAddress: destinationNetworkAddress , DestinationLength: destinationLength , DestinationAddress: destinationAddress , SourceNetworkAddress: sourceNetworkAddress , SourceLength: sourceLength , SourceAddress: sourceAddress , HopCount: hopCount , Nlm: nlm , Apdu: apdu , NpduLength: npduLength } } // Deprecated: use the interface for direct cast func CastNPDU(structType interface{}) NPDU { - if casted, ok := structType.(NPDU); ok { + if casted, ok := structType.(NPDU); ok { return casted } if casted, ok := structType.(*NPDU); ok { @@ -235,7 +239,7 @@ func (m *_NPDU) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (protocolVersionNumber) - lengthInBits += 8 + lengthInBits += 8; // Simple field (control) lengthInBits += m.Control.GetLengthInBits(ctx) @@ -294,6 +298,7 @@ func (m *_NPDU) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_NPDU) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -312,7 +317,7 @@ func NPDUParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, npduL _ = currentPos // Simple Field (protocolVersionNumber) - _protocolVersionNumber, _protocolVersionNumberErr := readBuffer.ReadUint8("protocolVersionNumber", 8) +_protocolVersionNumber, _protocolVersionNumberErr := readBuffer.ReadUint8("protocolVersionNumber", 8) if _protocolVersionNumberErr != nil { return nil, errors.Wrap(_protocolVersionNumberErr, "Error parsing 'protocolVersionNumber' field of NPDU") } @@ -322,7 +327,7 @@ func NPDUParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, npduL if pullErr := readBuffer.PullContext("control"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for control") } - _control, _controlErr := NPDUControlParseWithBuffer(ctx, readBuffer) +_control, _controlErr := NPDUControlParseWithBuffer(ctx, readBuffer) if _controlErr != nil { return nil, errors.Wrap(_controlErr, "Error parsing 'control' field of NPDU") } @@ -356,18 +361,18 @@ func NPDUParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, npduL return nil, errors.Wrap(pullErr, "Error pulling for destinationAddress") } // Count array - destinationAddress := make([]uint8, utils.InlineIf(control.GetDestinationSpecified(), func() interface{} { return uint16((*destinationLength)) }, func() interface{} { return uint16(uint16(0)) }).(uint16)) + destinationAddress := make([]uint8, utils.InlineIf(control.GetDestinationSpecified(), func() interface{} {return uint16((*destinationLength))}, func() interface{} {return uint16(uint16(0))}).(uint16)) // This happens when the size is set conditional to 0 if len(destinationAddress) == 0 { destinationAddress = nil } { - _numItems := uint16(utils.InlineIf(control.GetDestinationSpecified(), func() interface{} { return uint16((*destinationLength)) }, func() interface{} { return uint16(uint16(0)) }).(uint16)) + _numItems := uint16(utils.InlineIf(control.GetDestinationSpecified(), func() interface{} {return uint16((*destinationLength))}, func() interface{} {return uint16(uint16(0))}).(uint16)) for _curItem := uint16(0); _curItem < _numItems; _curItem++ { arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := readBuffer.ReadUint8("", 8) +_item, _err := readBuffer.ReadUint8("", 8) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'destinationAddress' field of NPDU") } @@ -379,7 +384,7 @@ func NPDUParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, npduL } // Virtual field - _destinationLengthAddon := utils.InlineIf(control.GetDestinationSpecified(), func() interface{} { return uint16((uint16(uint16(3)) + uint16((*destinationLength)))) }, func() interface{} { return uint16(uint16(0)) }).(uint16) + _destinationLengthAddon := utils.InlineIf(control.GetDestinationSpecified(), func() interface{} {return uint16((uint16(uint16(3)) + uint16((*destinationLength))))}, func() interface{} {return uint16(uint16(0))}).(uint16) destinationLengthAddon := uint16(_destinationLengthAddon) _ = destinationLengthAddon @@ -408,18 +413,18 @@ func NPDUParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, npduL return nil, errors.Wrap(pullErr, "Error pulling for sourceAddress") } // Count array - sourceAddress := make([]uint8, utils.InlineIf(control.GetSourceSpecified(), func() interface{} { return uint16((*sourceLength)) }, func() interface{} { return uint16(uint16(0)) }).(uint16)) + sourceAddress := make([]uint8, utils.InlineIf(control.GetSourceSpecified(), func() interface{} {return uint16((*sourceLength))}, func() interface{} {return uint16(uint16(0))}).(uint16)) // This happens when the size is set conditional to 0 if len(sourceAddress) == 0 { sourceAddress = nil } { - _numItems := uint16(utils.InlineIf(control.GetSourceSpecified(), func() interface{} { return uint16((*sourceLength)) }, func() interface{} { return uint16(uint16(0)) }).(uint16)) + _numItems := uint16(utils.InlineIf(control.GetSourceSpecified(), func() interface{} {return uint16((*sourceLength))}, func() interface{} {return uint16(uint16(0))}).(uint16)) for _curItem := uint16(0); _curItem < _numItems; _curItem++ { arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := readBuffer.ReadUint8("", 8) +_item, _err := readBuffer.ReadUint8("", 8) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'sourceAddress' field of NPDU") } @@ -431,7 +436,7 @@ func NPDUParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, npduL } // Virtual field - _sourceLengthAddon := utils.InlineIf(control.GetSourceSpecified(), func() interface{} { return uint16((uint16(uint16(3)) + uint16((*sourceLength)))) }, func() interface{} { return uint16(uint16(0)) }).(uint16) + _sourceLengthAddon := utils.InlineIf(control.GetSourceSpecified(), func() interface{} {return uint16((uint16(uint16(3)) + uint16((*sourceLength))))}, func() interface{} {return uint16(uint16(0))}).(uint16) sourceLengthAddon := uint16(_sourceLengthAddon) _ = sourceLengthAddon @@ -446,7 +451,7 @@ func NPDUParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, npduL } // Virtual field - _payloadSubtraction := uint16(uint16(2)) + uint16((uint16(uint16(sourceLengthAddon)+uint16(destinationLengthAddon)) + uint16((utils.InlineIf((control.GetDestinationSpecified()), func() interface{} { return uint16(uint16(1)) }, func() interface{} { return uint16(uint16(0)) }).(uint16))))) + _payloadSubtraction := uint16(uint16(2)) + uint16((uint16(uint16(sourceLengthAddon) + uint16(destinationLengthAddon)) + uint16((utils.InlineIf((control.GetDestinationSpecified()), func() interface{} {return uint16(uint16(1))}, func() interface{} {return uint16(uint16(0))}).(uint16))))) payloadSubtraction := uint16(_payloadSubtraction) _ = payloadSubtraction @@ -457,7 +462,7 @@ func NPDUParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, npduL if pullErr := readBuffer.PullContext("nlm"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for nlm") } - _val, _err := NLMParseWithBuffer(ctx, readBuffer, uint16(npduLength)-uint16(payloadSubtraction)) +_val, _err := NLMParseWithBuffer(ctx, readBuffer , uint16(npduLength) - uint16(payloadSubtraction) ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -479,7 +484,7 @@ func NPDUParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, npduL if pullErr := readBuffer.PullContext("apdu"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for apdu") } - _val, _err := APDUParseWithBuffer(ctx, readBuffer, uint16(npduLength)-uint16(payloadSubtraction)) +_val, _err := APDUParseWithBuffer(ctx, readBuffer , uint16(npduLength) - uint16(payloadSubtraction) ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -495,7 +500,7 @@ func NPDUParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, npduL } // Validation - if !(bool(bool((nlm) != (nil))) || bool(bool((apdu) != (nil)))) { + if (!(bool(bool(((nlm)) != (nil))) || bool(bool(((apdu)) != (nil))))) { return nil, errors.WithStack(utils.ParseValidationError{"something is wrong here... apdu and nlm not set"}) } @@ -505,19 +510,19 @@ func NPDUParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, npduL // Create the instance return &_NPDU{ - NpduLength: npduLength, - ProtocolVersionNumber: protocolVersionNumber, - Control: control, - DestinationNetworkAddress: destinationNetworkAddress, - DestinationLength: destinationLength, - DestinationAddress: destinationAddress, - SourceNetworkAddress: sourceNetworkAddress, - SourceLength: sourceLength, - SourceAddress: sourceAddress, - HopCount: hopCount, - Nlm: nlm, - Apdu: apdu, - }, nil + NpduLength: npduLength, + ProtocolVersionNumber: protocolVersionNumber, + Control: control, + DestinationNetworkAddress: destinationNetworkAddress, + DestinationLength: destinationLength, + DestinationAddress: destinationAddress, + SourceNetworkAddress: sourceNetworkAddress, + SourceLength: sourceLength, + SourceAddress: sourceAddress, + HopCount: hopCount, + Nlm: nlm, + Apdu: apdu, + }, nil } func (m *_NPDU) Serialize() ([]byte, error) { @@ -531,7 +536,7 @@ func (m *_NPDU) Serialize() ([]byte, error) { func (m *_NPDU) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("NPDU"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("NPDU"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for NPDU") } @@ -684,13 +689,13 @@ func (m *_NPDU) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils. return nil } + //// // Arguments Getter func (m *_NPDU) GetNpduLength() uint16 { return m.NpduLength } - // //// @@ -708,3 +713,6 @@ func (m *_NPDU) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/NPDUControl.go b/plc4go/protocols/bacnetip/readwrite/model/NPDUControl.go index d3f8438c937..958eab36b2b 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/NPDUControl.go +++ b/plc4go/protocols/bacnetip/readwrite/model/NPDUControl.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // NPDUControl is the corresponding interface of NPDUControl type NPDUControl interface { @@ -52,16 +54,17 @@ type NPDUControlExactly interface { // _NPDUControl is the data-structure of this message type _NPDUControl struct { - MessageTypeFieldPresent bool - DestinationSpecified bool - SourceSpecified bool - ExpectingReply bool - NetworkPriority NPDUNetworkPriority + MessageTypeFieldPresent bool + DestinationSpecified bool + SourceSpecified bool + ExpectingReply bool + NetworkPriority NPDUNetworkPriority // Reserved Fields reservedField0 *uint8 reservedField1 *uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,14 +95,15 @@ func (m *_NPDUControl) GetNetworkPriority() NPDUNetworkPriority { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewNPDUControl factory function for _NPDUControl -func NewNPDUControl(messageTypeFieldPresent bool, destinationSpecified bool, sourceSpecified bool, expectingReply bool, networkPriority NPDUNetworkPriority) *_NPDUControl { - return &_NPDUControl{MessageTypeFieldPresent: messageTypeFieldPresent, DestinationSpecified: destinationSpecified, SourceSpecified: sourceSpecified, ExpectingReply: expectingReply, NetworkPriority: networkPriority} +func NewNPDUControl( messageTypeFieldPresent bool , destinationSpecified bool , sourceSpecified bool , expectingReply bool , networkPriority NPDUNetworkPriority ) *_NPDUControl { +return &_NPDUControl{ MessageTypeFieldPresent: messageTypeFieldPresent , DestinationSpecified: destinationSpecified , SourceSpecified: sourceSpecified , ExpectingReply: expectingReply , NetworkPriority: networkPriority } } // Deprecated: use the interface for direct cast func CastNPDUControl(structType interface{}) NPDUControl { - if casted, ok := structType.(NPDUControl); ok { + if casted, ok := structType.(NPDUControl); ok { return casted } if casted, ok := structType.(*NPDUControl); ok { @@ -116,22 +120,22 @@ func (m *_NPDUControl) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (messageTypeFieldPresent) - lengthInBits += 1 + lengthInBits += 1; // Reserved Field (reserved) lengthInBits += 1 // Simple field (destinationSpecified) - lengthInBits += 1 + lengthInBits += 1; // Reserved Field (reserved) lengthInBits += 1 // Simple field (sourceSpecified) - lengthInBits += 1 + lengthInBits += 1; // Simple field (expectingReply) - lengthInBits += 1 + lengthInBits += 1; // Simple field (networkPriority) lengthInBits += 2 @@ -139,6 +143,7 @@ func (m *_NPDUControl) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_NPDUControl) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -157,7 +162,7 @@ func NPDUControlParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer _ = currentPos // Simple Field (messageTypeFieldPresent) - _messageTypeFieldPresent, _messageTypeFieldPresentErr := readBuffer.ReadBit("messageTypeFieldPresent") +_messageTypeFieldPresent, _messageTypeFieldPresentErr := readBuffer.ReadBit("messageTypeFieldPresent") if _messageTypeFieldPresentErr != nil { return nil, errors.Wrap(_messageTypeFieldPresentErr, "Error parsing 'messageTypeFieldPresent' field of NPDUControl") } @@ -173,7 +178,7 @@ func NPDUControlParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer if reserved != uint8(0) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -181,7 +186,7 @@ func NPDUControlParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer } // Simple Field (destinationSpecified) - _destinationSpecified, _destinationSpecifiedErr := readBuffer.ReadBit("destinationSpecified") +_destinationSpecified, _destinationSpecifiedErr := readBuffer.ReadBit("destinationSpecified") if _destinationSpecifiedErr != nil { return nil, errors.Wrap(_destinationSpecifiedErr, "Error parsing 'destinationSpecified' field of NPDUControl") } @@ -197,7 +202,7 @@ func NPDUControlParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer if reserved != uint8(0) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField1 = &reserved @@ -205,14 +210,14 @@ func NPDUControlParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer } // Simple Field (sourceSpecified) - _sourceSpecified, _sourceSpecifiedErr := readBuffer.ReadBit("sourceSpecified") +_sourceSpecified, _sourceSpecifiedErr := readBuffer.ReadBit("sourceSpecified") if _sourceSpecifiedErr != nil { return nil, errors.Wrap(_sourceSpecifiedErr, "Error parsing 'sourceSpecified' field of NPDUControl") } sourceSpecified := _sourceSpecified // Simple Field (expectingReply) - _expectingReply, _expectingReplyErr := readBuffer.ReadBit("expectingReply") +_expectingReply, _expectingReplyErr := readBuffer.ReadBit("expectingReply") if _expectingReplyErr != nil { return nil, errors.Wrap(_expectingReplyErr, "Error parsing 'expectingReply' field of NPDUControl") } @@ -222,7 +227,7 @@ func NPDUControlParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer if pullErr := readBuffer.PullContext("networkPriority"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for networkPriority") } - _networkPriority, _networkPriorityErr := NPDUNetworkPriorityParseWithBuffer(ctx, readBuffer) +_networkPriority, _networkPriorityErr := NPDUNetworkPriorityParseWithBuffer(ctx, readBuffer) if _networkPriorityErr != nil { return nil, errors.Wrap(_networkPriorityErr, "Error parsing 'networkPriority' field of NPDUControl") } @@ -237,14 +242,14 @@ func NPDUControlParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer // Create the instance return &_NPDUControl{ - MessageTypeFieldPresent: messageTypeFieldPresent, - DestinationSpecified: destinationSpecified, - SourceSpecified: sourceSpecified, - ExpectingReply: expectingReply, - NetworkPriority: networkPriority, - reservedField0: reservedField0, - reservedField1: reservedField1, - }, nil + MessageTypeFieldPresent: messageTypeFieldPresent, + DestinationSpecified: destinationSpecified, + SourceSpecified: sourceSpecified, + ExpectingReply: expectingReply, + NetworkPriority: networkPriority, + reservedField0: reservedField0, + reservedField1: reservedField1, + }, nil } func (m *_NPDUControl) Serialize() ([]byte, error) { @@ -258,7 +263,7 @@ func (m *_NPDUControl) Serialize() ([]byte, error) { func (m *_NPDUControl) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("NPDUControl"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("NPDUControl"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for NPDUControl") } @@ -275,7 +280,7 @@ func (m *_NPDUControl) SerializeWithWriteBuffer(ctx context.Context, writeBuffer if m.reservedField0 != nil { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0), - "got value": reserved, + "got value": reserved, }).Msg("Overriding reserved field with unexpected value.") reserved = *m.reservedField0 } @@ -298,7 +303,7 @@ func (m *_NPDUControl) SerializeWithWriteBuffer(ctx context.Context, writeBuffer if m.reservedField1 != nil { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0), - "got value": reserved, + "got value": reserved, }).Msg("Overriding reserved field with unexpected value.") reserved = *m.reservedField1 } @@ -340,6 +345,7 @@ func (m *_NPDUControl) SerializeWithWriteBuffer(ctx context.Context, writeBuffer return nil } + func (m *_NPDUControl) isNPDUControl() bool { return true } @@ -354,3 +360,6 @@ func (m *_NPDUControl) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/NPDUNetworkPriority.go b/plc4go/protocols/bacnetip/readwrite/model/NPDUNetworkPriority.go index f7710b12dab..58175c01107 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/NPDUNetworkPriority.go +++ b/plc4go/protocols/bacnetip/readwrite/model/NPDUNetworkPriority.go @@ -34,18 +34,18 @@ type INPDUNetworkPriority interface { utils.Serializable } -const ( - NPDUNetworkPriority_LIFE_SAVETY_MESSAGE NPDUNetworkPriority = 3 +const( + NPDUNetworkPriority_LIFE_SAVETY_MESSAGE NPDUNetworkPriority = 3 NPDUNetworkPriority_CRITICAL_EQUIPMENT_MESSAGE NPDUNetworkPriority = 2 - NPDUNetworkPriority_URGENT_MESSAGE NPDUNetworkPriority = 1 - NPDUNetworkPriority_NORMAL_MESSAGE NPDUNetworkPriority = 0 + NPDUNetworkPriority_URGENT_MESSAGE NPDUNetworkPriority = 1 + NPDUNetworkPriority_NORMAL_MESSAGE NPDUNetworkPriority = 0 ) var NPDUNetworkPriorityValues []NPDUNetworkPriority func init() { _ = errors.New - NPDUNetworkPriorityValues = []NPDUNetworkPriority{ + NPDUNetworkPriorityValues = []NPDUNetworkPriority { NPDUNetworkPriority_LIFE_SAVETY_MESSAGE, NPDUNetworkPriority_CRITICAL_EQUIPMENT_MESSAGE, NPDUNetworkPriority_URGENT_MESSAGE, @@ -55,14 +55,14 @@ func init() { func NPDUNetworkPriorityByValue(value uint8) (enum NPDUNetworkPriority, ok bool) { switch value { - case 0: - return NPDUNetworkPriority_NORMAL_MESSAGE, true - case 1: - return NPDUNetworkPriority_URGENT_MESSAGE, true - case 2: - return NPDUNetworkPriority_CRITICAL_EQUIPMENT_MESSAGE, true - case 3: - return NPDUNetworkPriority_LIFE_SAVETY_MESSAGE, true + case 0: + return NPDUNetworkPriority_NORMAL_MESSAGE, true + case 1: + return NPDUNetworkPriority_URGENT_MESSAGE, true + case 2: + return NPDUNetworkPriority_CRITICAL_EQUIPMENT_MESSAGE, true + case 3: + return NPDUNetworkPriority_LIFE_SAVETY_MESSAGE, true } return 0, false } @@ -81,13 +81,13 @@ func NPDUNetworkPriorityByName(value string) (enum NPDUNetworkPriority, ok bool) return 0, false } -func NPDUNetworkPriorityKnows(value uint8) bool { +func NPDUNetworkPriorityKnows(value uint8) bool { for _, typeValue := range NPDUNetworkPriorityValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastNPDUNetworkPriority(structType interface{}) NPDUNetworkPriority { @@ -155,3 +155,4 @@ func (e NPDUNetworkPriority) PLC4XEnumName() string { func (e NPDUNetworkPriority) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/NPDUNetworkPriorityTagged.go b/plc4go/protocols/bacnetip/readwrite/model/NPDUNetworkPriorityTagged.go index 5858c08d7e7..6bf37f43e3c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/NPDUNetworkPriorityTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/NPDUNetworkPriorityTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // NPDUNetworkPriorityTagged is the corresponding interface of NPDUNetworkPriorityTagged type NPDUNetworkPriorityTagged interface { @@ -46,14 +48,15 @@ type NPDUNetworkPriorityTaggedExactly interface { // _NPDUNetworkPriorityTagged is the data-structure of this message type _NPDUNetworkPriorityTagged struct { - Header BACnetTagHeader - Value NPDUNetworkPriority + Header BACnetTagHeader + Value NPDUNetworkPriority // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_NPDUNetworkPriorityTagged) GetValue() NPDUNetworkPriority { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewNPDUNetworkPriorityTagged factory function for _NPDUNetworkPriorityTagged -func NewNPDUNetworkPriorityTagged(header BACnetTagHeader, value NPDUNetworkPriority, tagNumber uint8, tagClass TagClass) *_NPDUNetworkPriorityTagged { - return &_NPDUNetworkPriorityTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewNPDUNetworkPriorityTagged( header BACnetTagHeader , value NPDUNetworkPriority , tagNumber uint8 , tagClass TagClass ) *_NPDUNetworkPriorityTagged { +return &_NPDUNetworkPriorityTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastNPDUNetworkPriorityTagged(structType interface{}) NPDUNetworkPriorityTagged { - if casted, ok := structType.(NPDUNetworkPriorityTagged); ok { + if casted, ok := structType.(NPDUNetworkPriorityTagged); ok { return casted } if casted, ok := structType.(*NPDUNetworkPriorityTagged); ok { @@ -104,6 +108,7 @@ func (m *_NPDUNetworkPriorityTagged) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_NPDUNetworkPriorityTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func NPDUNetworkPriorityTaggedParseWithBuffer(ctx context.Context, readBuffer ut if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of NPDUNetworkPriorityTagged") } @@ -135,12 +140,12 @@ func NPDUNetworkPriorityTaggedParseWithBuffer(ctx context.Context, readBuffer ut } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func NPDUNetworkPriorityTaggedParseWithBuffer(ctx context.Context, readBuffer ut } var value NPDUNetworkPriority if _value != nil { - value = _value.(NPDUNetworkPriority) + value = _value.(NPDUNetworkPriority) } if closeErr := readBuffer.CloseContext("NPDUNetworkPriorityTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func NPDUNetworkPriorityTaggedParseWithBuffer(ctx context.Context, readBuffer ut // Create the instance return &_NPDUNetworkPriorityTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_NPDUNetworkPriorityTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_NPDUNetworkPriorityTagged) Serialize() ([]byte, error) { func (m *_NPDUNetworkPriorityTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("NPDUNetworkPriorityTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("NPDUNetworkPriorityTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for NPDUNetworkPriorityTagged") } @@ -206,6 +211,7 @@ func (m *_NPDUNetworkPriorityTagged) SerializeWithWriteBuffer(ctx context.Contex return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_NPDUNetworkPriorityTagged) GetTagNumber() uint8 { func (m *_NPDUNetworkPriorityTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_NPDUNetworkPriorityTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/SecurityResponseCode.go b/plc4go/protocols/bacnetip/readwrite/model/SecurityResponseCode.go index 4943e1cfb04..d95c46675d4 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/SecurityResponseCode.go +++ b/plc4go/protocols/bacnetip/readwrite/model/SecurityResponseCode.go @@ -34,40 +34,40 @@ type ISecurityResponseCode interface { utils.Serializable } -const ( - SecurityResponseCode_SUCCESS SecurityResponseCode = 0x00 - SecurityResponseCode_ACCESS_DENIED SecurityResponseCode = 0x01 - SecurityResponseCode_BAD_DESTINATION_ADDRESS SecurityResponseCode = 0x02 - SecurityResponseCode_BAD_DESTINATION_DEVICE_ID SecurityResponseCode = 0x03 - SecurityResponseCode_BAD_SIGNATURE SecurityResponseCode = 0x04 - SecurityResponseCode_BAD_SOURCE_ADDRESS SecurityResponseCode = 0x05 - SecurityResponseCode_BAD_TIMESTAMP SecurityResponseCode = 0x06 - SecurityResponseCode_CANNOT_USE_KEY SecurityResponseCode = 0x07 - SecurityResponseCode_CANNOT_VERIFY_MESSAGE_ID SecurityResponseCode = 0x08 - SecurityResponseCode_CORRECT_KEY_REVISION SecurityResponseCode = 0x09 +const( + SecurityResponseCode_SUCCESS SecurityResponseCode = 0x00 + SecurityResponseCode_ACCESS_DENIED SecurityResponseCode = 0x01 + SecurityResponseCode_BAD_DESTINATION_ADDRESS SecurityResponseCode = 0x02 + SecurityResponseCode_BAD_DESTINATION_DEVICE_ID SecurityResponseCode = 0x03 + SecurityResponseCode_BAD_SIGNATURE SecurityResponseCode = 0x04 + SecurityResponseCode_BAD_SOURCE_ADDRESS SecurityResponseCode = 0x05 + SecurityResponseCode_BAD_TIMESTAMP SecurityResponseCode = 0x06 + SecurityResponseCode_CANNOT_USE_KEY SecurityResponseCode = 0x07 + SecurityResponseCode_CANNOT_VERIFY_MESSAGE_ID SecurityResponseCode = 0x08 + SecurityResponseCode_CORRECT_KEY_REVISION SecurityResponseCode = 0x09 SecurityResponseCode_DESTINATION_DEVICE_ID_REQUIRED SecurityResponseCode = 0x0A - SecurityResponseCode_DUPLICATE_MESSAGE SecurityResponseCode = 0x0B - SecurityResponseCode_ENCRYPTION_NOT_CONFIGURED SecurityResponseCode = 0x0C - SecurityResponseCode_ENCRYPTION_REQUIRED SecurityResponseCode = 0x0D - SecurityResponseCode_INCORRECT_KEY SecurityResponseCode = 0x0E - SecurityResponseCode_INVALID_KEY_DATA SecurityResponseCode = 0x0F - SecurityResponseCode_KEY_UPDATE_IN_PROGRESS SecurityResponseCode = 0x10 - SecurityResponseCode_MALFORMED_MESSAGE SecurityResponseCode = 0x11 - SecurityResponseCode_NOT_KEY_SERVER SecurityResponseCode = 0x12 - SecurityResponseCode_SECURITY_NOT_CONFIGURED SecurityResponseCode = 0x13 - SecurityResponseCode_SOURCE_SECURITY_REQUIRED SecurityResponseCode = 0x14 - SecurityResponseCode_TOO_MANY_KEYS SecurityResponseCode = 0x15 - SecurityResponseCode_UNKNOWN_AUTHENTICATION_TYPE SecurityResponseCode = 0x16 - SecurityResponseCode_UNKNOWN_KEY SecurityResponseCode = 0x17 - SecurityResponseCode_UNKNOWN_KEY_REVISION SecurityResponseCode = 0x18 - SecurityResponseCode_UNKNOWN_SOURCE_MESSAGE SecurityResponseCode = 0x19 + SecurityResponseCode_DUPLICATE_MESSAGE SecurityResponseCode = 0x0B + SecurityResponseCode_ENCRYPTION_NOT_CONFIGURED SecurityResponseCode = 0x0C + SecurityResponseCode_ENCRYPTION_REQUIRED SecurityResponseCode = 0x0D + SecurityResponseCode_INCORRECT_KEY SecurityResponseCode = 0x0E + SecurityResponseCode_INVALID_KEY_DATA SecurityResponseCode = 0x0F + SecurityResponseCode_KEY_UPDATE_IN_PROGRESS SecurityResponseCode = 0x10 + SecurityResponseCode_MALFORMED_MESSAGE SecurityResponseCode = 0x11 + SecurityResponseCode_NOT_KEY_SERVER SecurityResponseCode = 0x12 + SecurityResponseCode_SECURITY_NOT_CONFIGURED SecurityResponseCode = 0x13 + SecurityResponseCode_SOURCE_SECURITY_REQUIRED SecurityResponseCode = 0x14 + SecurityResponseCode_TOO_MANY_KEYS SecurityResponseCode = 0x15 + SecurityResponseCode_UNKNOWN_AUTHENTICATION_TYPE SecurityResponseCode = 0x16 + SecurityResponseCode_UNKNOWN_KEY SecurityResponseCode = 0x17 + SecurityResponseCode_UNKNOWN_KEY_REVISION SecurityResponseCode = 0x18 + SecurityResponseCode_UNKNOWN_SOURCE_MESSAGE SecurityResponseCode = 0x19 ) var SecurityResponseCodeValues []SecurityResponseCode func init() { _ = errors.New - SecurityResponseCodeValues = []SecurityResponseCode{ + SecurityResponseCodeValues = []SecurityResponseCode { SecurityResponseCode_SUCCESS, SecurityResponseCode_ACCESS_DENIED, SecurityResponseCode_BAD_DESTINATION_ADDRESS, @@ -99,58 +99,58 @@ func init() { func SecurityResponseCodeByValue(value uint8) (enum SecurityResponseCode, ok bool) { switch value { - case 0x00: - return SecurityResponseCode_SUCCESS, true - case 0x01: - return SecurityResponseCode_ACCESS_DENIED, true - case 0x02: - return SecurityResponseCode_BAD_DESTINATION_ADDRESS, true - case 0x03: - return SecurityResponseCode_BAD_DESTINATION_DEVICE_ID, true - case 0x04: - return SecurityResponseCode_BAD_SIGNATURE, true - case 0x05: - return SecurityResponseCode_BAD_SOURCE_ADDRESS, true - case 0x06: - return SecurityResponseCode_BAD_TIMESTAMP, true - case 0x07: - return SecurityResponseCode_CANNOT_USE_KEY, true - case 0x08: - return SecurityResponseCode_CANNOT_VERIFY_MESSAGE_ID, true - case 0x09: - return SecurityResponseCode_CORRECT_KEY_REVISION, true - case 0x0A: - return SecurityResponseCode_DESTINATION_DEVICE_ID_REQUIRED, true - case 0x0B: - return SecurityResponseCode_DUPLICATE_MESSAGE, true - case 0x0C: - return SecurityResponseCode_ENCRYPTION_NOT_CONFIGURED, true - case 0x0D: - return SecurityResponseCode_ENCRYPTION_REQUIRED, true - case 0x0E: - return SecurityResponseCode_INCORRECT_KEY, true - case 0x0F: - return SecurityResponseCode_INVALID_KEY_DATA, true - case 0x10: - return SecurityResponseCode_KEY_UPDATE_IN_PROGRESS, true - case 0x11: - return SecurityResponseCode_MALFORMED_MESSAGE, true - case 0x12: - return SecurityResponseCode_NOT_KEY_SERVER, true - case 0x13: - return SecurityResponseCode_SECURITY_NOT_CONFIGURED, true - case 0x14: - return SecurityResponseCode_SOURCE_SECURITY_REQUIRED, true - case 0x15: - return SecurityResponseCode_TOO_MANY_KEYS, true - case 0x16: - return SecurityResponseCode_UNKNOWN_AUTHENTICATION_TYPE, true - case 0x17: - return SecurityResponseCode_UNKNOWN_KEY, true - case 0x18: - return SecurityResponseCode_UNKNOWN_KEY_REVISION, true - case 0x19: - return SecurityResponseCode_UNKNOWN_SOURCE_MESSAGE, true + case 0x00: + return SecurityResponseCode_SUCCESS, true + case 0x01: + return SecurityResponseCode_ACCESS_DENIED, true + case 0x02: + return SecurityResponseCode_BAD_DESTINATION_ADDRESS, true + case 0x03: + return SecurityResponseCode_BAD_DESTINATION_DEVICE_ID, true + case 0x04: + return SecurityResponseCode_BAD_SIGNATURE, true + case 0x05: + return SecurityResponseCode_BAD_SOURCE_ADDRESS, true + case 0x06: + return SecurityResponseCode_BAD_TIMESTAMP, true + case 0x07: + return SecurityResponseCode_CANNOT_USE_KEY, true + case 0x08: + return SecurityResponseCode_CANNOT_VERIFY_MESSAGE_ID, true + case 0x09: + return SecurityResponseCode_CORRECT_KEY_REVISION, true + case 0x0A: + return SecurityResponseCode_DESTINATION_DEVICE_ID_REQUIRED, true + case 0x0B: + return SecurityResponseCode_DUPLICATE_MESSAGE, true + case 0x0C: + return SecurityResponseCode_ENCRYPTION_NOT_CONFIGURED, true + case 0x0D: + return SecurityResponseCode_ENCRYPTION_REQUIRED, true + case 0x0E: + return SecurityResponseCode_INCORRECT_KEY, true + case 0x0F: + return SecurityResponseCode_INVALID_KEY_DATA, true + case 0x10: + return SecurityResponseCode_KEY_UPDATE_IN_PROGRESS, true + case 0x11: + return SecurityResponseCode_MALFORMED_MESSAGE, true + case 0x12: + return SecurityResponseCode_NOT_KEY_SERVER, true + case 0x13: + return SecurityResponseCode_SECURITY_NOT_CONFIGURED, true + case 0x14: + return SecurityResponseCode_SOURCE_SECURITY_REQUIRED, true + case 0x15: + return SecurityResponseCode_TOO_MANY_KEYS, true + case 0x16: + return SecurityResponseCode_UNKNOWN_AUTHENTICATION_TYPE, true + case 0x17: + return SecurityResponseCode_UNKNOWN_KEY, true + case 0x18: + return SecurityResponseCode_UNKNOWN_KEY_REVISION, true + case 0x19: + return SecurityResponseCode_UNKNOWN_SOURCE_MESSAGE, true } return 0, false } @@ -213,13 +213,13 @@ func SecurityResponseCodeByName(value string) (enum SecurityResponseCode, ok boo return 0, false } -func SecurityResponseCodeKnows(value uint8) bool { +func SecurityResponseCodeKnows(value uint8) bool { for _, typeValue := range SecurityResponseCodeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastSecurityResponseCode(structType interface{}) SecurityResponseCode { @@ -331,3 +331,4 @@ func (e SecurityResponseCode) PLC4XEnumName() string { func (e SecurityResponseCode) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/SecurityResponseCodeTagged.go b/plc4go/protocols/bacnetip/readwrite/model/SecurityResponseCodeTagged.go index 3dbb61f2256..8cb075e0501 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/SecurityResponseCodeTagged.go +++ b/plc4go/protocols/bacnetip/readwrite/model/SecurityResponseCodeTagged.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityResponseCodeTagged is the corresponding interface of SecurityResponseCodeTagged type SecurityResponseCodeTagged interface { @@ -46,14 +48,15 @@ type SecurityResponseCodeTaggedExactly interface { // _SecurityResponseCodeTagged is the data-structure of this message type _SecurityResponseCodeTagged struct { - Header BACnetTagHeader - Value SecurityResponseCode + Header BACnetTagHeader + Value SecurityResponseCode // Arguments. TagNumber uint8 - TagClass TagClass + TagClass TagClass } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -72,14 +75,15 @@ func (m *_SecurityResponseCodeTagged) GetValue() SecurityResponseCode { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSecurityResponseCodeTagged factory function for _SecurityResponseCodeTagged -func NewSecurityResponseCodeTagged(header BACnetTagHeader, value SecurityResponseCode, tagNumber uint8, tagClass TagClass) *_SecurityResponseCodeTagged { - return &_SecurityResponseCodeTagged{Header: header, Value: value, TagNumber: tagNumber, TagClass: tagClass} +func NewSecurityResponseCodeTagged( header BACnetTagHeader , value SecurityResponseCode , tagNumber uint8 , tagClass TagClass ) *_SecurityResponseCodeTagged { +return &_SecurityResponseCodeTagged{ Header: header , Value: value , TagNumber: tagNumber , TagClass: tagClass } } // Deprecated: use the interface for direct cast func CastSecurityResponseCodeTagged(structType interface{}) SecurityResponseCodeTagged { - if casted, ok := structType.(SecurityResponseCodeTagged); ok { + if casted, ok := structType.(SecurityResponseCodeTagged); ok { return casted } if casted, ok := structType.(*SecurityResponseCodeTagged); ok { @@ -104,6 +108,7 @@ func (m *_SecurityResponseCodeTagged) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_SecurityResponseCodeTagged) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +130,7 @@ func SecurityResponseCodeTaggedParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := BACnetTagHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of SecurityResponseCodeTagged") } @@ -135,12 +140,12 @@ func SecurityResponseCodeTaggedParseWithBuffer(ctx context.Context, readBuffer u } // Validation - if !(bool((header.GetTagClass()) == (tagClass))) { + if (!(bool((header.GetTagClass()) == (tagClass)))) { return nil, errors.WithStack(utils.ParseValidationError{"tag class doesn't match"}) } // Validation - if !(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber))))) { + if (!(bool((bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool((bool((header.GetActualTagNumber()) == (tagNumber)))))) { return nil, errors.WithStack(utils.ParseAssertError{"tagnumber doesn't match"}) } @@ -151,7 +156,7 @@ func SecurityResponseCodeTaggedParseWithBuffer(ctx context.Context, readBuffer u } var value SecurityResponseCode if _value != nil { - value = _value.(SecurityResponseCode) + value = _value.(SecurityResponseCode) } if closeErr := readBuffer.CloseContext("SecurityResponseCodeTagged"); closeErr != nil { @@ -160,11 +165,11 @@ func SecurityResponseCodeTaggedParseWithBuffer(ctx context.Context, readBuffer u // Create the instance return &_SecurityResponseCodeTagged{ - TagNumber: tagNumber, - TagClass: tagClass, - Header: header, - Value: value, - }, nil + TagNumber: tagNumber, + TagClass: tagClass, + Header: header, + Value: value, + }, nil } func (m *_SecurityResponseCodeTagged) Serialize() ([]byte, error) { @@ -178,7 +183,7 @@ func (m *_SecurityResponseCodeTagged) Serialize() ([]byte, error) { func (m *_SecurityResponseCodeTagged) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("SecurityResponseCodeTagged"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("SecurityResponseCodeTagged"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for SecurityResponseCodeTagged") } @@ -206,6 +211,7 @@ func (m *_SecurityResponseCodeTagged) SerializeWithWriteBuffer(ctx context.Conte return nil } + //// // Arguments Getter @@ -215,7 +221,6 @@ func (m *_SecurityResponseCodeTagged) GetTagNumber() uint8 { func (m *_SecurityResponseCodeTagged) GetTagClass() TagClass { return m.TagClass } - // //// @@ -233,3 +238,6 @@ func (m *_SecurityResponseCodeTagged) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/SubscribeCOVPropertyMultipleError.go b/plc4go/protocols/bacnetip/readwrite/model/SubscribeCOVPropertyMultipleError.go index d8be1648ffb..9452f5cdb7e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/SubscribeCOVPropertyMultipleError.go +++ b/plc4go/protocols/bacnetip/readwrite/model/SubscribeCOVPropertyMultipleError.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SubscribeCOVPropertyMultipleError is the corresponding interface of SubscribeCOVPropertyMultipleError type SubscribeCOVPropertyMultipleError interface { @@ -48,30 +50,30 @@ type SubscribeCOVPropertyMultipleErrorExactly interface { // _SubscribeCOVPropertyMultipleError is the data-structure of this message type _SubscribeCOVPropertyMultipleError struct { *_BACnetError - ErrorType ErrorEnclosed - FirstFailedSubscription SubscribeCOVPropertyMultipleErrorFirstFailedSubscription + ErrorType ErrorEnclosed + FirstFailedSubscription SubscribeCOVPropertyMultipleErrorFirstFailedSubscription } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SubscribeCOVPropertyMultipleError) GetErrorChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_SUBSCRIBE_COV_PROPERTY_MULTIPLE -} +func (m *_SubscribeCOVPropertyMultipleError) GetErrorChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_SUBSCRIBE_COV_PROPERTY_MULTIPLE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SubscribeCOVPropertyMultipleError) InitializeParent(parent BACnetError) {} +func (m *_SubscribeCOVPropertyMultipleError) InitializeParent(parent BACnetError ) {} -func (m *_SubscribeCOVPropertyMultipleError) GetParent() BACnetError { +func (m *_SubscribeCOVPropertyMultipleError) GetParent() BACnetError { return m._BACnetError } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_SubscribeCOVPropertyMultipleError) GetFirstFailedSubscription() Subscr /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSubscribeCOVPropertyMultipleError factory function for _SubscribeCOVPropertyMultipleError -func NewSubscribeCOVPropertyMultipleError(errorType ErrorEnclosed, firstFailedSubscription SubscribeCOVPropertyMultipleErrorFirstFailedSubscription) *_SubscribeCOVPropertyMultipleError { +func NewSubscribeCOVPropertyMultipleError( errorType ErrorEnclosed , firstFailedSubscription SubscribeCOVPropertyMultipleErrorFirstFailedSubscription ) *_SubscribeCOVPropertyMultipleError { _result := &_SubscribeCOVPropertyMultipleError{ - ErrorType: errorType, + ErrorType: errorType, FirstFailedSubscription: firstFailedSubscription, - _BACnetError: NewBACnetError(), + _BACnetError: NewBACnetError(), } _result._BACnetError._BACnetErrorChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewSubscribeCOVPropertyMultipleError(errorType ErrorEnclosed, firstFailedSu // Deprecated: use the interface for direct cast func CastSubscribeCOVPropertyMultipleError(structType interface{}) SubscribeCOVPropertyMultipleError { - if casted, ok := structType.(SubscribeCOVPropertyMultipleError); ok { + if casted, ok := structType.(SubscribeCOVPropertyMultipleError); ok { return casted } if casted, ok := structType.(*SubscribeCOVPropertyMultipleError); ok { @@ -128,6 +131,7 @@ func (m *_SubscribeCOVPropertyMultipleError) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_SubscribeCOVPropertyMultipleError) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -149,7 +153,7 @@ func SubscribeCOVPropertyMultipleErrorParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("errorType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for errorType") } - _errorType, _errorTypeErr := ErrorEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_errorType, _errorTypeErr := ErrorEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _errorTypeErr != nil { return nil, errors.Wrap(_errorTypeErr, "Error parsing 'errorType' field of SubscribeCOVPropertyMultipleError") } @@ -162,7 +166,7 @@ func SubscribeCOVPropertyMultipleErrorParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("firstFailedSubscription"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for firstFailedSubscription") } - _firstFailedSubscription, _firstFailedSubscriptionErr := SubscribeCOVPropertyMultipleErrorFirstFailedSubscriptionParseWithBuffer(ctx, readBuffer, uint8(uint8(1))) +_firstFailedSubscription, _firstFailedSubscriptionErr := SubscribeCOVPropertyMultipleErrorFirstFailedSubscriptionParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) ) if _firstFailedSubscriptionErr != nil { return nil, errors.Wrap(_firstFailedSubscriptionErr, "Error parsing 'firstFailedSubscription' field of SubscribeCOVPropertyMultipleError") } @@ -177,8 +181,9 @@ func SubscribeCOVPropertyMultipleErrorParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_SubscribeCOVPropertyMultipleError{ - _BACnetError: &_BACnetError{}, - ErrorType: errorType, + _BACnetError: &_BACnetError{ + }, + ErrorType: errorType, FirstFailedSubscription: firstFailedSubscription, } _child._BACnetError._BACnetErrorChildRequirements = _child @@ -201,29 +206,29 @@ func (m *_SubscribeCOVPropertyMultipleError) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for SubscribeCOVPropertyMultipleError") } - // Simple Field (errorType) - if pushErr := writeBuffer.PushContext("errorType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for errorType") - } - _errorTypeErr := writeBuffer.WriteSerializable(ctx, m.GetErrorType()) - if popErr := writeBuffer.PopContext("errorType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for errorType") - } - if _errorTypeErr != nil { - return errors.Wrap(_errorTypeErr, "Error serializing 'errorType' field") - } + // Simple Field (errorType) + if pushErr := writeBuffer.PushContext("errorType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for errorType") + } + _errorTypeErr := writeBuffer.WriteSerializable(ctx, m.GetErrorType()) + if popErr := writeBuffer.PopContext("errorType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for errorType") + } + if _errorTypeErr != nil { + return errors.Wrap(_errorTypeErr, "Error serializing 'errorType' field") + } - // Simple Field (firstFailedSubscription) - if pushErr := writeBuffer.PushContext("firstFailedSubscription"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for firstFailedSubscription") - } - _firstFailedSubscriptionErr := writeBuffer.WriteSerializable(ctx, m.GetFirstFailedSubscription()) - if popErr := writeBuffer.PopContext("firstFailedSubscription"); popErr != nil { - return errors.Wrap(popErr, "Error popping for firstFailedSubscription") - } - if _firstFailedSubscriptionErr != nil { - return errors.Wrap(_firstFailedSubscriptionErr, "Error serializing 'firstFailedSubscription' field") - } + // Simple Field (firstFailedSubscription) + if pushErr := writeBuffer.PushContext("firstFailedSubscription"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for firstFailedSubscription") + } + _firstFailedSubscriptionErr := writeBuffer.WriteSerializable(ctx, m.GetFirstFailedSubscription()) + if popErr := writeBuffer.PopContext("firstFailedSubscription"); popErr != nil { + return errors.Wrap(popErr, "Error popping for firstFailedSubscription") + } + if _firstFailedSubscriptionErr != nil { + return errors.Wrap(_firstFailedSubscriptionErr, "Error serializing 'firstFailedSubscription' field") + } if popErr := writeBuffer.PopContext("SubscribeCOVPropertyMultipleError"); popErr != nil { return errors.Wrap(popErr, "Error popping for SubscribeCOVPropertyMultipleError") @@ -233,6 +238,7 @@ func (m *_SubscribeCOVPropertyMultipleError) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SubscribeCOVPropertyMultipleError) isSubscribeCOVPropertyMultipleError() bool { return true } @@ -247,3 +253,6 @@ func (m *_SubscribeCOVPropertyMultipleError) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/SubscribeCOVPropertyMultipleErrorFirstFailedSubscription.go b/plc4go/protocols/bacnetip/readwrite/model/SubscribeCOVPropertyMultipleErrorFirstFailedSubscription.go index a9590258ddb..e3a5159e4f6 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/SubscribeCOVPropertyMultipleErrorFirstFailedSubscription.go +++ b/plc4go/protocols/bacnetip/readwrite/model/SubscribeCOVPropertyMultipleErrorFirstFailedSubscription.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SubscribeCOVPropertyMultipleErrorFirstFailedSubscription is the corresponding interface of SubscribeCOVPropertyMultipleErrorFirstFailedSubscription type SubscribeCOVPropertyMultipleErrorFirstFailedSubscription interface { @@ -52,16 +54,17 @@ type SubscribeCOVPropertyMultipleErrorFirstFailedSubscriptionExactly interface { // _SubscribeCOVPropertyMultipleErrorFirstFailedSubscription is the data-structure of this message type _SubscribeCOVPropertyMultipleErrorFirstFailedSubscription struct { - OpeningTag BACnetOpeningTag - MonitoredObjectIdentifier BACnetContextTagObjectIdentifier - MonitoredPropertyReference BACnetPropertyReferenceEnclosed - ErrorType ErrorEnclosed - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + MonitoredObjectIdentifier BACnetContextTagObjectIdentifier + MonitoredPropertyReference BACnetPropertyReferenceEnclosed + ErrorType ErrorEnclosed + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,14 +95,15 @@ func (m *_SubscribeCOVPropertyMultipleErrorFirstFailedSubscription) GetClosingTa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSubscribeCOVPropertyMultipleErrorFirstFailedSubscription factory function for _SubscribeCOVPropertyMultipleErrorFirstFailedSubscription -func NewSubscribeCOVPropertyMultipleErrorFirstFailedSubscription(openingTag BACnetOpeningTag, monitoredObjectIdentifier BACnetContextTagObjectIdentifier, monitoredPropertyReference BACnetPropertyReferenceEnclosed, errorType ErrorEnclosed, closingTag BACnetClosingTag, tagNumber uint8) *_SubscribeCOVPropertyMultipleErrorFirstFailedSubscription { - return &_SubscribeCOVPropertyMultipleErrorFirstFailedSubscription{OpeningTag: openingTag, MonitoredObjectIdentifier: monitoredObjectIdentifier, MonitoredPropertyReference: monitoredPropertyReference, ErrorType: errorType, ClosingTag: closingTag, TagNumber: tagNumber} +func NewSubscribeCOVPropertyMultipleErrorFirstFailedSubscription( openingTag BACnetOpeningTag , monitoredObjectIdentifier BACnetContextTagObjectIdentifier , monitoredPropertyReference BACnetPropertyReferenceEnclosed , errorType ErrorEnclosed , closingTag BACnetClosingTag , tagNumber uint8 ) *_SubscribeCOVPropertyMultipleErrorFirstFailedSubscription { +return &_SubscribeCOVPropertyMultipleErrorFirstFailedSubscription{ OpeningTag: openingTag , MonitoredObjectIdentifier: monitoredObjectIdentifier , MonitoredPropertyReference: monitoredPropertyReference , ErrorType: errorType , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastSubscribeCOVPropertyMultipleErrorFirstFailedSubscription(structType interface{}) SubscribeCOVPropertyMultipleErrorFirstFailedSubscription { - if casted, ok := structType.(SubscribeCOVPropertyMultipleErrorFirstFailedSubscription); ok { + if casted, ok := structType.(SubscribeCOVPropertyMultipleErrorFirstFailedSubscription); ok { return casted } if casted, ok := structType.(*SubscribeCOVPropertyMultipleErrorFirstFailedSubscription); ok { @@ -133,6 +137,7 @@ func (m *_SubscribeCOVPropertyMultipleErrorFirstFailedSubscription) GetLengthInB return lengthInBits } + func (m *_SubscribeCOVPropertyMultipleErrorFirstFailedSubscription) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +159,7 @@ func SubscribeCOVPropertyMultipleErrorFirstFailedSubscriptionParseWithBuffer(ctx if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of SubscribeCOVPropertyMultipleErrorFirstFailedSubscription") } @@ -167,7 +172,7 @@ func SubscribeCOVPropertyMultipleErrorFirstFailedSubscriptionParseWithBuffer(ctx if pullErr := readBuffer.PullContext("monitoredObjectIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for monitoredObjectIdentifier") } - _monitoredObjectIdentifier, _monitoredObjectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer, uint8(uint8(0)), BACnetDataType(BACnetDataType_BACNET_OBJECT_IDENTIFIER)) +_monitoredObjectIdentifier, _monitoredObjectIdentifierErr := BACnetContextTagParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) , BACnetDataType( BACnetDataType_BACNET_OBJECT_IDENTIFIER ) ) if _monitoredObjectIdentifierErr != nil { return nil, errors.Wrap(_monitoredObjectIdentifierErr, "Error parsing 'monitoredObjectIdentifier' field of SubscribeCOVPropertyMultipleErrorFirstFailedSubscription") } @@ -180,7 +185,7 @@ func SubscribeCOVPropertyMultipleErrorFirstFailedSubscriptionParseWithBuffer(ctx if pullErr := readBuffer.PullContext("monitoredPropertyReference"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for monitoredPropertyReference") } - _monitoredPropertyReference, _monitoredPropertyReferenceErr := BACnetPropertyReferenceEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(1))) +_monitoredPropertyReference, _monitoredPropertyReferenceErr := BACnetPropertyReferenceEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) ) if _monitoredPropertyReferenceErr != nil { return nil, errors.Wrap(_monitoredPropertyReferenceErr, "Error parsing 'monitoredPropertyReference' field of SubscribeCOVPropertyMultipleErrorFirstFailedSubscription") } @@ -193,7 +198,7 @@ func SubscribeCOVPropertyMultipleErrorFirstFailedSubscriptionParseWithBuffer(ctx if pullErr := readBuffer.PullContext("errorType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for errorType") } - _errorType, _errorTypeErr := ErrorEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(2))) +_errorType, _errorTypeErr := ErrorEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(2) ) ) if _errorTypeErr != nil { return nil, errors.Wrap(_errorTypeErr, "Error parsing 'errorType' field of SubscribeCOVPropertyMultipleErrorFirstFailedSubscription") } @@ -206,7 +211,7 @@ func SubscribeCOVPropertyMultipleErrorFirstFailedSubscriptionParseWithBuffer(ctx if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of SubscribeCOVPropertyMultipleErrorFirstFailedSubscription") } @@ -221,13 +226,13 @@ func SubscribeCOVPropertyMultipleErrorFirstFailedSubscriptionParseWithBuffer(ctx // Create the instance return &_SubscribeCOVPropertyMultipleErrorFirstFailedSubscription{ - TagNumber: tagNumber, - OpeningTag: openingTag, - MonitoredObjectIdentifier: monitoredObjectIdentifier, - MonitoredPropertyReference: monitoredPropertyReference, - ErrorType: errorType, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + MonitoredObjectIdentifier: monitoredObjectIdentifier, + MonitoredPropertyReference: monitoredPropertyReference, + ErrorType: errorType, + ClosingTag: closingTag, + }, nil } func (m *_SubscribeCOVPropertyMultipleErrorFirstFailedSubscription) Serialize() ([]byte, error) { @@ -241,7 +246,7 @@ func (m *_SubscribeCOVPropertyMultipleErrorFirstFailedSubscription) Serialize() func (m *_SubscribeCOVPropertyMultipleErrorFirstFailedSubscription) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("SubscribeCOVPropertyMultipleErrorFirstFailedSubscription"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("SubscribeCOVPropertyMultipleErrorFirstFailedSubscription"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for SubscribeCOVPropertyMultipleErrorFirstFailedSubscription") } @@ -311,13 +316,13 @@ func (m *_SubscribeCOVPropertyMultipleErrorFirstFailedSubscription) SerializeWit return nil } + //// // Arguments Getter func (m *_SubscribeCOVPropertyMultipleErrorFirstFailedSubscription) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -335,3 +340,6 @@ func (m *_SubscribeCOVPropertyMultipleErrorFirstFailedSubscription) String() str } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/TagClass.go b/plc4go/protocols/bacnetip/readwrite/model/TagClass.go index 89f00534868..63a09c2664c 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/TagClass.go +++ b/plc4go/protocols/bacnetip/readwrite/model/TagClass.go @@ -34,8 +34,8 @@ type ITagClass interface { utils.Serializable } -const ( - TagClass_APPLICATION_TAGS TagClass = 0x0 +const( + TagClass_APPLICATION_TAGS TagClass = 0x0 TagClass_CONTEXT_SPECIFIC_TAGS TagClass = 0x1 ) @@ -43,7 +43,7 @@ var TagClassValues []TagClass func init() { _ = errors.New - TagClassValues = []TagClass{ + TagClassValues = []TagClass { TagClass_APPLICATION_TAGS, TagClass_CONTEXT_SPECIFIC_TAGS, } @@ -51,10 +51,10 @@ func init() { func TagClassByValue(value uint8) (enum TagClass, ok bool) { switch value { - case 0x0: - return TagClass_APPLICATION_TAGS, true - case 0x1: - return TagClass_CONTEXT_SPECIFIC_TAGS, true + case 0x0: + return TagClass_APPLICATION_TAGS, true + case 0x1: + return TagClass_CONTEXT_SPECIFIC_TAGS, true } return 0, false } @@ -69,13 +69,13 @@ func TagClassByName(value string) (enum TagClass, ok bool) { return 0, false } -func TagClassKnows(value uint8) bool { +func TagClassKnows(value uint8) bool { for _, typeValue := range TagClassValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastTagClass(structType interface{}) TagClass { @@ -139,3 +139,4 @@ func (e TagClass) PLC4XEnumName() string { func (e TagClass) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/bacnetip/readwrite/model/VTCloseError.go b/plc4go/protocols/bacnetip/readwrite/model/VTCloseError.go index f7197922cbf..61b9575f79a 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/VTCloseError.go +++ b/plc4go/protocols/bacnetip/readwrite/model/VTCloseError.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // VTCloseError is the corresponding interface of VTCloseError type VTCloseError interface { @@ -49,30 +51,30 @@ type VTCloseErrorExactly interface { // _VTCloseError is the data-structure of this message type _VTCloseError struct { *_BACnetError - ErrorType ErrorEnclosed - ListOfVtSessionIdentifiers VTCloseErrorListOfVTSessionIdentifiers + ErrorType ErrorEnclosed + ListOfVtSessionIdentifiers VTCloseErrorListOfVTSessionIdentifiers } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_VTCloseError) GetErrorChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_VT_CLOSE -} +func (m *_VTCloseError) GetErrorChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_VT_CLOSE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_VTCloseError) InitializeParent(parent BACnetError) {} +func (m *_VTCloseError) InitializeParent(parent BACnetError ) {} -func (m *_VTCloseError) GetParent() BACnetError { +func (m *_VTCloseError) GetParent() BACnetError { return m._BACnetError } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -91,12 +93,13 @@ func (m *_VTCloseError) GetListOfVtSessionIdentifiers() VTCloseErrorListOfVTSess /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewVTCloseError factory function for _VTCloseError -func NewVTCloseError(errorType ErrorEnclosed, listOfVtSessionIdentifiers VTCloseErrorListOfVTSessionIdentifiers) *_VTCloseError { +func NewVTCloseError( errorType ErrorEnclosed , listOfVtSessionIdentifiers VTCloseErrorListOfVTSessionIdentifiers ) *_VTCloseError { _result := &_VTCloseError{ - ErrorType: errorType, + ErrorType: errorType, ListOfVtSessionIdentifiers: listOfVtSessionIdentifiers, - _BACnetError: NewBACnetError(), + _BACnetError: NewBACnetError(), } _result._BACnetError._BACnetErrorChildRequirements = _result return _result @@ -104,7 +107,7 @@ func NewVTCloseError(errorType ErrorEnclosed, listOfVtSessionIdentifiers VTClose // Deprecated: use the interface for direct cast func CastVTCloseError(structType interface{}) VTCloseError { - if casted, ok := structType.(VTCloseError); ok { + if casted, ok := structType.(VTCloseError); ok { return casted } if casted, ok := structType.(*VTCloseError); ok { @@ -131,6 +134,7 @@ func (m *_VTCloseError) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_VTCloseError) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -152,7 +156,7 @@ func VTCloseErrorParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe if pullErr := readBuffer.PullContext("errorType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for errorType") } - _errorType, _errorTypeErr := ErrorEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_errorType, _errorTypeErr := ErrorEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _errorTypeErr != nil { return nil, errors.Wrap(_errorTypeErr, "Error parsing 'errorType' field of VTCloseError") } @@ -163,12 +167,12 @@ func VTCloseErrorParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe // Optional Field (listOfVtSessionIdentifiers) (Can be skipped, if a given expression evaluates to false) var listOfVtSessionIdentifiers VTCloseErrorListOfVTSessionIdentifiers = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("listOfVtSessionIdentifiers"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for listOfVtSessionIdentifiers") } - _val, _err := VTCloseErrorListOfVTSessionIdentifiersParseWithBuffer(ctx, readBuffer, uint8(1)) +_val, _err := VTCloseErrorListOfVTSessionIdentifiersParseWithBuffer(ctx, readBuffer , uint8(1) ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -189,8 +193,9 @@ func VTCloseErrorParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe // Create a partially initialized instance _child := &_VTCloseError{ - _BACnetError: &_BACnetError{}, - ErrorType: errorType, + _BACnetError: &_BACnetError{ + }, + ErrorType: errorType, ListOfVtSessionIdentifiers: listOfVtSessionIdentifiers, } _child._BACnetError._BACnetErrorChildRequirements = _child @@ -213,33 +218,33 @@ func (m *_VTCloseError) SerializeWithWriteBuffer(ctx context.Context, writeBuffe return errors.Wrap(pushErr, "Error pushing for VTCloseError") } - // Simple Field (errorType) - if pushErr := writeBuffer.PushContext("errorType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for errorType") - } - _errorTypeErr := writeBuffer.WriteSerializable(ctx, m.GetErrorType()) - if popErr := writeBuffer.PopContext("errorType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for errorType") + // Simple Field (errorType) + if pushErr := writeBuffer.PushContext("errorType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for errorType") + } + _errorTypeErr := writeBuffer.WriteSerializable(ctx, m.GetErrorType()) + if popErr := writeBuffer.PopContext("errorType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for errorType") + } + if _errorTypeErr != nil { + return errors.Wrap(_errorTypeErr, "Error serializing 'errorType' field") + } + + // Optional Field (listOfVtSessionIdentifiers) (Can be skipped, if the value is null) + var listOfVtSessionIdentifiers VTCloseErrorListOfVTSessionIdentifiers = nil + if m.GetListOfVtSessionIdentifiers() != nil { + if pushErr := writeBuffer.PushContext("listOfVtSessionIdentifiers"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for listOfVtSessionIdentifiers") } - if _errorTypeErr != nil { - return errors.Wrap(_errorTypeErr, "Error serializing 'errorType' field") + listOfVtSessionIdentifiers = m.GetListOfVtSessionIdentifiers() + _listOfVtSessionIdentifiersErr := writeBuffer.WriteSerializable(ctx, listOfVtSessionIdentifiers) + if popErr := writeBuffer.PopContext("listOfVtSessionIdentifiers"); popErr != nil { + return errors.Wrap(popErr, "Error popping for listOfVtSessionIdentifiers") } - - // Optional Field (listOfVtSessionIdentifiers) (Can be skipped, if the value is null) - var listOfVtSessionIdentifiers VTCloseErrorListOfVTSessionIdentifiers = nil - if m.GetListOfVtSessionIdentifiers() != nil { - if pushErr := writeBuffer.PushContext("listOfVtSessionIdentifiers"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for listOfVtSessionIdentifiers") - } - listOfVtSessionIdentifiers = m.GetListOfVtSessionIdentifiers() - _listOfVtSessionIdentifiersErr := writeBuffer.WriteSerializable(ctx, listOfVtSessionIdentifiers) - if popErr := writeBuffer.PopContext("listOfVtSessionIdentifiers"); popErr != nil { - return errors.Wrap(popErr, "Error popping for listOfVtSessionIdentifiers") - } - if _listOfVtSessionIdentifiersErr != nil { - return errors.Wrap(_listOfVtSessionIdentifiersErr, "Error serializing 'listOfVtSessionIdentifiers' field") - } + if _listOfVtSessionIdentifiersErr != nil { + return errors.Wrap(_listOfVtSessionIdentifiersErr, "Error serializing 'listOfVtSessionIdentifiers' field") } + } if popErr := writeBuffer.PopContext("VTCloseError"); popErr != nil { return errors.Wrap(popErr, "Error popping for VTCloseError") @@ -249,6 +254,7 @@ func (m *_VTCloseError) SerializeWithWriteBuffer(ctx context.Context, writeBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_VTCloseError) isVTCloseError() bool { return true } @@ -263,3 +269,6 @@ func (m *_VTCloseError) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/VTCloseErrorListOfVTSessionIdentifiers.go b/plc4go/protocols/bacnetip/readwrite/model/VTCloseErrorListOfVTSessionIdentifiers.go index b71e65398f5..50504fdf150 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/VTCloseErrorListOfVTSessionIdentifiers.go +++ b/plc4go/protocols/bacnetip/readwrite/model/VTCloseErrorListOfVTSessionIdentifiers.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // VTCloseErrorListOfVTSessionIdentifiers is the corresponding interface of VTCloseErrorListOfVTSessionIdentifiers type VTCloseErrorListOfVTSessionIdentifiers interface { @@ -49,14 +51,15 @@ type VTCloseErrorListOfVTSessionIdentifiersExactly interface { // _VTCloseErrorListOfVTSessionIdentifiers is the data-structure of this message type _VTCloseErrorListOfVTSessionIdentifiers struct { - OpeningTag BACnetOpeningTag - ListOfVtSessionIdentifiers []BACnetApplicationTagUnsignedInteger - ClosingTag BACnetClosingTag + OpeningTag BACnetOpeningTag + ListOfVtSessionIdentifiers []BACnetApplicationTagUnsignedInteger + ClosingTag BACnetClosingTag // Arguments. TagNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -79,14 +82,15 @@ func (m *_VTCloseErrorListOfVTSessionIdentifiers) GetClosingTag() BACnetClosingT /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewVTCloseErrorListOfVTSessionIdentifiers factory function for _VTCloseErrorListOfVTSessionIdentifiers -func NewVTCloseErrorListOfVTSessionIdentifiers(openingTag BACnetOpeningTag, listOfVtSessionIdentifiers []BACnetApplicationTagUnsignedInteger, closingTag BACnetClosingTag, tagNumber uint8) *_VTCloseErrorListOfVTSessionIdentifiers { - return &_VTCloseErrorListOfVTSessionIdentifiers{OpeningTag: openingTag, ListOfVtSessionIdentifiers: listOfVtSessionIdentifiers, ClosingTag: closingTag, TagNumber: tagNumber} +func NewVTCloseErrorListOfVTSessionIdentifiers( openingTag BACnetOpeningTag , listOfVtSessionIdentifiers []BACnetApplicationTagUnsignedInteger , closingTag BACnetClosingTag , tagNumber uint8 ) *_VTCloseErrorListOfVTSessionIdentifiers { +return &_VTCloseErrorListOfVTSessionIdentifiers{ OpeningTag: openingTag , ListOfVtSessionIdentifiers: listOfVtSessionIdentifiers , ClosingTag: closingTag , TagNumber: tagNumber } } // Deprecated: use the interface for direct cast func CastVTCloseErrorListOfVTSessionIdentifiers(structType interface{}) VTCloseErrorListOfVTSessionIdentifiers { - if casted, ok := structType.(VTCloseErrorListOfVTSessionIdentifiers); ok { + if casted, ok := structType.(VTCloseErrorListOfVTSessionIdentifiers); ok { return casted } if casted, ok := structType.(*VTCloseErrorListOfVTSessionIdentifiers); ok { @@ -118,6 +122,7 @@ func (m *_VTCloseErrorListOfVTSessionIdentifiers) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_VTCloseErrorListOfVTSessionIdentifiers) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +144,7 @@ func VTCloseErrorListOfVTSessionIdentifiersParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("openingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for openingTag") } - _openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_openingTag, _openingTagErr := BACnetOpeningTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _openingTagErr != nil { return nil, errors.Wrap(_openingTagErr, "Error parsing 'openingTag' field of VTCloseErrorListOfVTSessionIdentifiers") } @@ -155,8 +160,8 @@ func VTCloseErrorListOfVTSessionIdentifiersParseWithBuffer(ctx context.Context, // Terminated array var listOfVtSessionIdentifiers []BACnetApplicationTagUnsignedInteger { - for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, 1)) { - _item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) + for ;!bool(IsBACnetConstructedDataClosingTag(readBuffer, false, 1)); { +_item, _err := BACnetApplicationTagParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'listOfVtSessionIdentifiers' field of VTCloseErrorListOfVTSessionIdentifiers") } @@ -171,7 +176,7 @@ func VTCloseErrorListOfVTSessionIdentifiersParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("closingTag"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for closingTag") } - _closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer, uint8(tagNumber)) +_closingTag, _closingTagErr := BACnetClosingTagParseWithBuffer(ctx, readBuffer , uint8( tagNumber ) ) if _closingTagErr != nil { return nil, errors.Wrap(_closingTagErr, "Error parsing 'closingTag' field of VTCloseErrorListOfVTSessionIdentifiers") } @@ -186,11 +191,11 @@ func VTCloseErrorListOfVTSessionIdentifiersParseWithBuffer(ctx context.Context, // Create the instance return &_VTCloseErrorListOfVTSessionIdentifiers{ - TagNumber: tagNumber, - OpeningTag: openingTag, - ListOfVtSessionIdentifiers: listOfVtSessionIdentifiers, - ClosingTag: closingTag, - }, nil + TagNumber: tagNumber, + OpeningTag: openingTag, + ListOfVtSessionIdentifiers: listOfVtSessionIdentifiers, + ClosingTag: closingTag, + }, nil } func (m *_VTCloseErrorListOfVTSessionIdentifiers) Serialize() ([]byte, error) { @@ -204,7 +209,7 @@ func (m *_VTCloseErrorListOfVTSessionIdentifiers) Serialize() ([]byte, error) { func (m *_VTCloseErrorListOfVTSessionIdentifiers) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("VTCloseErrorListOfVTSessionIdentifiers"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("VTCloseErrorListOfVTSessionIdentifiers"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for VTCloseErrorListOfVTSessionIdentifiers") } @@ -255,13 +260,13 @@ func (m *_VTCloseErrorListOfVTSessionIdentifiers) SerializeWithWriteBuffer(ctx c return nil } + //// // Arguments Getter func (m *_VTCloseErrorListOfVTSessionIdentifiers) GetTagNumber() uint8 { return m.TagNumber } - // //// @@ -279,3 +284,6 @@ func (m *_VTCloseErrorListOfVTSessionIdentifiers) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/WritePropertyMultipleError.go b/plc4go/protocols/bacnetip/readwrite/model/WritePropertyMultipleError.go index 98fea43f1d1..ce05dc0cc55 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/WritePropertyMultipleError.go +++ b/plc4go/protocols/bacnetip/readwrite/model/WritePropertyMultipleError.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // WritePropertyMultipleError is the corresponding interface of WritePropertyMultipleError type WritePropertyMultipleError interface { @@ -48,30 +50,30 @@ type WritePropertyMultipleErrorExactly interface { // _WritePropertyMultipleError is the data-structure of this message type _WritePropertyMultipleError struct { *_BACnetError - ErrorType ErrorEnclosed - FirstFailedWriteAttempt BACnetObjectPropertyReferenceEnclosed + ErrorType ErrorEnclosed + FirstFailedWriteAttempt BACnetObjectPropertyReferenceEnclosed } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_WritePropertyMultipleError) GetErrorChoice() BACnetConfirmedServiceChoice { - return BACnetConfirmedServiceChoice_WRITE_PROPERTY_MULTIPLE -} +func (m *_WritePropertyMultipleError) GetErrorChoice() BACnetConfirmedServiceChoice { +return BACnetConfirmedServiceChoice_WRITE_PROPERTY_MULTIPLE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_WritePropertyMultipleError) InitializeParent(parent BACnetError) {} +func (m *_WritePropertyMultipleError) InitializeParent(parent BACnetError ) {} -func (m *_WritePropertyMultipleError) GetParent() BACnetError { +func (m *_WritePropertyMultipleError) GetParent() BACnetError { return m._BACnetError } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_WritePropertyMultipleError) GetFirstFailedWriteAttempt() BACnetObjectP /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewWritePropertyMultipleError factory function for _WritePropertyMultipleError -func NewWritePropertyMultipleError(errorType ErrorEnclosed, firstFailedWriteAttempt BACnetObjectPropertyReferenceEnclosed) *_WritePropertyMultipleError { +func NewWritePropertyMultipleError( errorType ErrorEnclosed , firstFailedWriteAttempt BACnetObjectPropertyReferenceEnclosed ) *_WritePropertyMultipleError { _result := &_WritePropertyMultipleError{ - ErrorType: errorType, + ErrorType: errorType, FirstFailedWriteAttempt: firstFailedWriteAttempt, - _BACnetError: NewBACnetError(), + _BACnetError: NewBACnetError(), } _result._BACnetError._BACnetErrorChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewWritePropertyMultipleError(errorType ErrorEnclosed, firstFailedWriteAtte // Deprecated: use the interface for direct cast func CastWritePropertyMultipleError(structType interface{}) WritePropertyMultipleError { - if casted, ok := structType.(WritePropertyMultipleError); ok { + if casted, ok := structType.(WritePropertyMultipleError); ok { return casted } if casted, ok := structType.(*WritePropertyMultipleError); ok { @@ -128,6 +131,7 @@ func (m *_WritePropertyMultipleError) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_WritePropertyMultipleError) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -149,7 +153,7 @@ func WritePropertyMultipleErrorParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("errorType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for errorType") } - _errorType, _errorTypeErr := ErrorEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(0))) +_errorType, _errorTypeErr := ErrorEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(0) ) ) if _errorTypeErr != nil { return nil, errors.Wrap(_errorTypeErr, "Error parsing 'errorType' field of WritePropertyMultipleError") } @@ -162,7 +166,7 @@ func WritePropertyMultipleErrorParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("firstFailedWriteAttempt"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for firstFailedWriteAttempt") } - _firstFailedWriteAttempt, _firstFailedWriteAttemptErr := BACnetObjectPropertyReferenceEnclosedParseWithBuffer(ctx, readBuffer, uint8(uint8(1))) +_firstFailedWriteAttempt, _firstFailedWriteAttemptErr := BACnetObjectPropertyReferenceEnclosedParseWithBuffer(ctx, readBuffer , uint8( uint8(1) ) ) if _firstFailedWriteAttemptErr != nil { return nil, errors.Wrap(_firstFailedWriteAttemptErr, "Error parsing 'firstFailedWriteAttempt' field of WritePropertyMultipleError") } @@ -177,8 +181,9 @@ func WritePropertyMultipleErrorParseWithBuffer(ctx context.Context, readBuffer u // Create a partially initialized instance _child := &_WritePropertyMultipleError{ - _BACnetError: &_BACnetError{}, - ErrorType: errorType, + _BACnetError: &_BACnetError{ + }, + ErrorType: errorType, FirstFailedWriteAttempt: firstFailedWriteAttempt, } _child._BACnetError._BACnetErrorChildRequirements = _child @@ -201,29 +206,29 @@ func (m *_WritePropertyMultipleError) SerializeWithWriteBuffer(ctx context.Conte return errors.Wrap(pushErr, "Error pushing for WritePropertyMultipleError") } - // Simple Field (errorType) - if pushErr := writeBuffer.PushContext("errorType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for errorType") - } - _errorTypeErr := writeBuffer.WriteSerializable(ctx, m.GetErrorType()) - if popErr := writeBuffer.PopContext("errorType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for errorType") - } - if _errorTypeErr != nil { - return errors.Wrap(_errorTypeErr, "Error serializing 'errorType' field") - } + // Simple Field (errorType) + if pushErr := writeBuffer.PushContext("errorType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for errorType") + } + _errorTypeErr := writeBuffer.WriteSerializable(ctx, m.GetErrorType()) + if popErr := writeBuffer.PopContext("errorType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for errorType") + } + if _errorTypeErr != nil { + return errors.Wrap(_errorTypeErr, "Error serializing 'errorType' field") + } - // Simple Field (firstFailedWriteAttempt) - if pushErr := writeBuffer.PushContext("firstFailedWriteAttempt"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for firstFailedWriteAttempt") - } - _firstFailedWriteAttemptErr := writeBuffer.WriteSerializable(ctx, m.GetFirstFailedWriteAttempt()) - if popErr := writeBuffer.PopContext("firstFailedWriteAttempt"); popErr != nil { - return errors.Wrap(popErr, "Error popping for firstFailedWriteAttempt") - } - if _firstFailedWriteAttemptErr != nil { - return errors.Wrap(_firstFailedWriteAttemptErr, "Error serializing 'firstFailedWriteAttempt' field") - } + // Simple Field (firstFailedWriteAttempt) + if pushErr := writeBuffer.PushContext("firstFailedWriteAttempt"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for firstFailedWriteAttempt") + } + _firstFailedWriteAttemptErr := writeBuffer.WriteSerializable(ctx, m.GetFirstFailedWriteAttempt()) + if popErr := writeBuffer.PopContext("firstFailedWriteAttempt"); popErr != nil { + return errors.Wrap(popErr, "Error popping for firstFailedWriteAttempt") + } + if _firstFailedWriteAttemptErr != nil { + return errors.Wrap(_firstFailedWriteAttemptErr, "Error serializing 'firstFailedWriteAttempt' field") + } if popErr := writeBuffer.PopContext("WritePropertyMultipleError"); popErr != nil { return errors.Wrap(popErr, "Error popping for WritePropertyMultipleError") @@ -233,6 +238,7 @@ func (m *_WritePropertyMultipleError) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_WritePropertyMultipleError) isWritePropertyMultipleError() bool { return true } @@ -247,3 +253,6 @@ func (m *_WritePropertyMultipleError) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/bacnetip/readwrite/model/plc4x_common.go b/plc4go/protocols/bacnetip/readwrite/model/plc4x_common.go index d2d66e8bdd3..42166d94e68 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/plc4x_common.go +++ b/plc4go/protocols/bacnetip/readwrite/model/plc4x_common.go @@ -15,7 +15,7 @@ * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - */ +*/ package model @@ -25,3 +25,4 @@ import "github.com/rs/zerolog/log" // Plc4xModelLog is the Logger used by the Parse/Serialize methods var Plc4xModelLog = &log.Logger + diff --git a/plc4go/protocols/cbus/readwrite/ParserHelper.go b/plc4go/protocols/cbus/readwrite/ParserHelper.go index afabeabaab4..75aad51cefb 100644 --- a/plc4go/protocols/cbus/readwrite/ParserHelper.go +++ b/plc4go/protocols/cbus/readwrite/ParserHelper.go @@ -37,7 +37,7 @@ func (m CbusParserHelper) Parse(typeName string, arguments []string, io utils.Re case "HVACStatusFlags": return model.HVACStatusFlagsParseWithBuffer(context.Background(), io) case "ParameterValue": - parameterType, _ := model.ParameterTypeByName(arguments[0]) + parameterType, _ := model.ParameterTypeByName(arguments[0]) numBytes, err := utils.StrToUint8(arguments[1]) if err != nil { return nil, errors.Wrap(err, "Error parsing") @@ -80,7 +80,7 @@ func (m CbusParserHelper) Parse(typeName string, arguments []string, io utils.Re case "LightingData": return model.LightingDataParseWithBuffer(context.Background(), io) case "SALData": - applicationId, _ := model.ApplicationIdByName(arguments[0]) + applicationId, _ := model.ApplicationIdByName(arguments[0]) return model.SALDataParseWithBuffer(context.Background(), io, applicationId) case "CBusCommand": var cBusOptions model.CBusOptions @@ -152,7 +152,7 @@ func (m CbusParserHelper) Parse(typeName string, arguments []string, io utils.Re case "ParameterChange": return model.ParameterChangeParseWithBuffer(context.Background(), io) case "ErrorReportingSystemCategoryType": - errorReportingSystemCategoryClass, _ := model.ErrorReportingSystemCategoryClassByName(arguments[0]) + errorReportingSystemCategoryClass, _ := model.ErrorReportingSystemCategoryClassByName(arguments[0]) return model.ErrorReportingSystemCategoryTypeParseWithBuffer(context.Background(), io, errorReportingSystemCategoryClass) case "Confirmation": return model.ConfirmationParseWithBuffer(context.Background(), io) @@ -195,7 +195,7 @@ func (m CbusParserHelper) Parse(typeName string, arguments []string, io utils.Re case "TamperStatus": return model.TamperStatusParseWithBuffer(context.Background(), io) case "IdentifyReplyCommand": - attribute, _ := model.AttributeByName(arguments[0]) + attribute, _ := model.AttributeByName(arguments[0]) numBytes, err := utils.StrToUint8(arguments[1]) if err != nil { return nil, errors.Wrap(err, "Error parsing") diff --git a/plc4go/protocols/cbus/readwrite/XmlParserHelper.go b/plc4go/protocols/cbus/readwrite/XmlParserHelper.go index 77fbb52cccb..4f817aa6d5f 100644 --- a/plc4go/protocols/cbus/readwrite/XmlParserHelper.go +++ b/plc4go/protocols/cbus/readwrite/XmlParserHelper.go @@ -21,8 +21,8 @@ package readwrite import ( "context" - "strconv" "strings" + "strconv" "github.com/apache/plc4x/plc4go/protocols/cbus/readwrite/model" "github.com/apache/plc4x/plc4go/spi/utils" @@ -43,220 +43,220 @@ func init() { } func (m CbusXmlParserHelper) Parse(typeName string, xmlString string, parserArguments ...string) (interface{}, error) { - switch typeName { - case "HVACStatusFlags": - return model.HVACStatusFlagsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "ParameterValue": - parameterType, _ := model.ParameterTypeByName(parserArguments[0]) - parsedUint1, err := strconv.ParseUint(parserArguments[1], 10, 8) - if err != nil { - return nil, err - } - numBytes := uint8(parsedUint1) - return model.ParameterValueParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), parameterType, numBytes) - case "ReplyOrConfirmation": - // TODO: find a way to parse the sub types - var cBusOptions model.CBusOptions - // TODO: find a way to parse the sub types - var requestContext model.RequestContext - return model.ReplyOrConfirmationParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cBusOptions, requestContext) - case "CBusOptions": - return model.CBusOptionsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "TemperatureBroadcastData": - return model.TemperatureBroadcastDataParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "PanicStatus": - return model.PanicStatusParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "IdentifyReplyCommandUnitSummary": - return model.IdentifyReplyCommandUnitSummaryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "InterfaceOptions1PowerUpSettings": - return model.InterfaceOptions1PowerUpSettingsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "MonitoredSAL": - // TODO: find a way to parse the sub types - var cBusOptions model.CBusOptions - return model.MonitoredSALParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cBusOptions) - case "ReplyNetwork": - return model.ReplyNetworkParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "SerialNumber": - return model.SerialNumberParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "CBusPointToMultiPointCommand": - // TODO: find a way to parse the sub types - var cBusOptions model.CBusOptions - return model.CBusPointToMultiPointCommandParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cBusOptions) - case "StatusRequest": - return model.StatusRequestParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "InterfaceOptions3": - return model.InterfaceOptions3ParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "InterfaceOptions1": - return model.InterfaceOptions1ParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "InterfaceOptions2": - return model.InterfaceOptions2ParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "HVACModeAndFlags": - return model.HVACModeAndFlagsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "LightingData": - return model.LightingDataParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "SALData": - applicationId, _ := model.ApplicationIdByName(parserArguments[0]) - return model.SALDataParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), applicationId) - case "CBusCommand": - // TODO: find a way to parse the sub types - var cBusOptions model.CBusOptions - return model.CBusCommandParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cBusOptions) - case "HVACHumidity": - return model.HVACHumidityParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "HVACHumidityModeAndFlags": - return model.HVACHumidityModeAndFlagsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "CBusConstants": - return model.CBusConstantsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "SerialInterfaceAddress": - return model.SerialInterfaceAddressParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "MeasurementData": - return model.MeasurementDataParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "HVACZoneList": - return model.HVACZoneListParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "MediaTransportControlData": - return model.MediaTransportControlDataParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "StatusByte": - return model.StatusByteParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "TriggerControlLabelOptions": - return model.TriggerControlLabelOptionsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "HVACAuxiliaryLevel": - return model.HVACAuxiliaryLevelParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "ErrorReportingData": - return model.ErrorReportingDataParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "UnitAddress": - return model.UnitAddressParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "SecurityArmCode": - return model.SecurityArmCodeParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "MeteringData": - return model.MeteringDataParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "EnableControlData": - return model.EnableControlDataParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "ApplicationAddress2": - return model.ApplicationAddress2ParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "ApplicationAddress1": - return model.ApplicationAddress1ParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "RequestContext": - return model.RequestContextParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "TriggerControlData": - return model.TriggerControlDataParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "HVACStartTime": - return model.HVACStartTimeParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "HVACTemperature": - return model.HVACTemperatureParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "RequestTermination": - return model.RequestTerminationParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "CBusMessage": - isResponse := parserArguments[0] == "true" - // TODO: find a way to parse the sub types - var requestContext model.RequestContext - // TODO: find a way to parse the sub types - var cBusOptions model.CBusOptions - return model.CBusMessageParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), isResponse, requestContext, cBusOptions) - case "ErrorReportingSystemCategory": - return model.ErrorReportingSystemCategoryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "PowerUp": - return model.PowerUpParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "Reply": - // TODO: find a way to parse the sub types - var cBusOptions model.CBusOptions - // TODO: find a way to parse the sub types - var requestContext model.RequestContext - return model.ReplyParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cBusOptions, requestContext) - case "TelephonyData": - return model.TelephonyDataParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "HVACHumidityStatusFlags": - return model.HVACHumidityStatusFlagsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "ParameterChange": - return model.ParameterChangeParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "ErrorReportingSystemCategoryType": - errorReportingSystemCategoryClass, _ := model.ErrorReportingSystemCategoryClassByName(parserArguments[0]) - return model.ErrorReportingSystemCategoryTypeParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), errorReportingSystemCategoryClass) - case "Confirmation": - return model.ConfirmationParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "SecurityData": - return model.SecurityDataParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "NetworkProtocolControlInformation": - return model.NetworkProtocolControlInformationParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "CBusHeader": - return model.CBusHeaderParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "Request": - // TODO: find a way to parse the sub types - var cBusOptions model.CBusOptions - return model.RequestParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cBusOptions) - case "Alpha": - return model.AlphaParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "CALData": - // TODO: find a way to parse the sub types - var requestContext model.RequestContext - return model.CALDataParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), requestContext) - case "Checksum": - return model.ChecksumParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "CALReply": - // TODO: find a way to parse the sub types - var cBusOptions model.CBusOptions - // TODO: find a way to parse the sub types - var requestContext model.RequestContext - return model.CALReplyParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cBusOptions, requestContext) - case "CustomManufacturer": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - numBytes := uint8(parsedUint0) - return model.CustomManufacturerParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), numBytes) - case "AccessControlData": - return model.AccessControlDataParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "ClockAndTimekeepingData": - return model.ClockAndTimekeepingDataParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "NetworkRoute": - return model.NetworkRouteParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "ResponseTermination": - return model.ResponseTerminationParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "LevelInformation": - return model.LevelInformationParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "TamperStatus": - return model.TamperStatusParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "IdentifyReplyCommand": - attribute, _ := model.AttributeByName(parserArguments[0]) - parsedUint1, err := strconv.ParseUint(parserArguments[1], 10, 5) - if err != nil { - return nil, err - } - numBytes := uint8(parsedUint1) - return model.IdentifyReplyCommandParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), attribute, numBytes) - case "HVACRawLevels": - return model.HVACRawLevelsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "ZoneStatus": - return model.ZoneStatusParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "BridgeAddress": - return model.BridgeAddressParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "LightingLabelOptions": - return model.LightingLabelOptionsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "CustomTypes": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - numBytes := uint8(parsedUint0) - return model.CustomTypesParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), numBytes) - case "EncodedReply": - // TODO: find a way to parse the sub types - var cBusOptions model.CBusOptions - // TODO: find a way to parse the sub types - var requestContext model.RequestContext - return model.EncodedReplyParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cBusOptions, requestContext) - case "CBusPointToPointToMultiPointCommand": - // TODO: find a way to parse the sub types - var cBusOptions model.CBusOptions - return model.CBusPointToPointToMultiPointCommandParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cBusOptions) - case "CBusPointToPointCommand": - // TODO: find a way to parse the sub types - var cBusOptions model.CBusOptions - return model.CBusPointToPointCommandParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cBusOptions) - case "AirConditioningData": - return model.AirConditioningDataParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "LogicAssignment": - return model.LogicAssignmentParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - } - return nil, errors.Errorf("Unsupported type %s", typeName) + switch typeName { + case "HVACStatusFlags": + return model.HVACStatusFlagsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "ParameterValue": + parameterType, _ := model.ParameterTypeByName(parserArguments[0]) + parsedUint1, err := strconv.ParseUint(parserArguments[1], 10, 8) + if err!=nil { + return nil, err + } + numBytes := uint8(parsedUint1) + return model.ParameterValueParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), parameterType, numBytes ) + case "ReplyOrConfirmation": + // TODO: find a way to parse the sub types + var cBusOptions model.CBusOptions + // TODO: find a way to parse the sub types + var requestContext model.RequestContext + return model.ReplyOrConfirmationParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cBusOptions, requestContext ) + case "CBusOptions": + return model.CBusOptionsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "TemperatureBroadcastData": + return model.TemperatureBroadcastDataParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "PanicStatus": + return model.PanicStatusParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "IdentifyReplyCommandUnitSummary": + return model.IdentifyReplyCommandUnitSummaryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "InterfaceOptions1PowerUpSettings": + return model.InterfaceOptions1PowerUpSettingsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "MonitoredSAL": + // TODO: find a way to parse the sub types + var cBusOptions model.CBusOptions + return model.MonitoredSALParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cBusOptions ) + case "ReplyNetwork": + return model.ReplyNetworkParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "SerialNumber": + return model.SerialNumberParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "CBusPointToMultiPointCommand": + // TODO: find a way to parse the sub types + var cBusOptions model.CBusOptions + return model.CBusPointToMultiPointCommandParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cBusOptions ) + case "StatusRequest": + return model.StatusRequestParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "InterfaceOptions3": + return model.InterfaceOptions3ParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "InterfaceOptions1": + return model.InterfaceOptions1ParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "InterfaceOptions2": + return model.InterfaceOptions2ParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "HVACModeAndFlags": + return model.HVACModeAndFlagsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "LightingData": + return model.LightingDataParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "SALData": + applicationId, _ := model.ApplicationIdByName(parserArguments[0]) + return model.SALDataParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), applicationId ) + case "CBusCommand": + // TODO: find a way to parse the sub types + var cBusOptions model.CBusOptions + return model.CBusCommandParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cBusOptions ) + case "HVACHumidity": + return model.HVACHumidityParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "HVACHumidityModeAndFlags": + return model.HVACHumidityModeAndFlagsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "CBusConstants": + return model.CBusConstantsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "SerialInterfaceAddress": + return model.SerialInterfaceAddressParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "MeasurementData": + return model.MeasurementDataParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "HVACZoneList": + return model.HVACZoneListParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "MediaTransportControlData": + return model.MediaTransportControlDataParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "StatusByte": + return model.StatusByteParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "TriggerControlLabelOptions": + return model.TriggerControlLabelOptionsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "HVACAuxiliaryLevel": + return model.HVACAuxiliaryLevelParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "ErrorReportingData": + return model.ErrorReportingDataParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "UnitAddress": + return model.UnitAddressParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "SecurityArmCode": + return model.SecurityArmCodeParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "MeteringData": + return model.MeteringDataParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "EnableControlData": + return model.EnableControlDataParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "ApplicationAddress2": + return model.ApplicationAddress2ParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "ApplicationAddress1": + return model.ApplicationAddress1ParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "RequestContext": + return model.RequestContextParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "TriggerControlData": + return model.TriggerControlDataParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "HVACStartTime": + return model.HVACStartTimeParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "HVACTemperature": + return model.HVACTemperatureParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "RequestTermination": + return model.RequestTerminationParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "CBusMessage": + isResponse := parserArguments[0] == "true" + // TODO: find a way to parse the sub types + var requestContext model.RequestContext + // TODO: find a way to parse the sub types + var cBusOptions model.CBusOptions + return model.CBusMessageParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), isResponse, requestContext, cBusOptions ) + case "ErrorReportingSystemCategory": + return model.ErrorReportingSystemCategoryParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "PowerUp": + return model.PowerUpParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "Reply": + // TODO: find a way to parse the sub types + var cBusOptions model.CBusOptions + // TODO: find a way to parse the sub types + var requestContext model.RequestContext + return model.ReplyParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cBusOptions, requestContext ) + case "TelephonyData": + return model.TelephonyDataParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "HVACHumidityStatusFlags": + return model.HVACHumidityStatusFlagsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "ParameterChange": + return model.ParameterChangeParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "ErrorReportingSystemCategoryType": + errorReportingSystemCategoryClass, _ := model.ErrorReportingSystemCategoryClassByName(parserArguments[0]) + return model.ErrorReportingSystemCategoryTypeParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), errorReportingSystemCategoryClass ) + case "Confirmation": + return model.ConfirmationParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "SecurityData": + return model.SecurityDataParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "NetworkProtocolControlInformation": + return model.NetworkProtocolControlInformationParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "CBusHeader": + return model.CBusHeaderParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "Request": + // TODO: find a way to parse the sub types + var cBusOptions model.CBusOptions + return model.RequestParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cBusOptions ) + case "Alpha": + return model.AlphaParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "CALData": + // TODO: find a way to parse the sub types + var requestContext model.RequestContext + return model.CALDataParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), requestContext ) + case "Checksum": + return model.ChecksumParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "CALReply": + // TODO: find a way to parse the sub types + var cBusOptions model.CBusOptions + // TODO: find a way to parse the sub types + var requestContext model.RequestContext + return model.CALReplyParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cBusOptions, requestContext ) + case "CustomManufacturer": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + numBytes := uint8(parsedUint0) + return model.CustomManufacturerParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), numBytes ) + case "AccessControlData": + return model.AccessControlDataParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "ClockAndTimekeepingData": + return model.ClockAndTimekeepingDataParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "NetworkRoute": + return model.NetworkRouteParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "ResponseTermination": + return model.ResponseTerminationParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "LevelInformation": + return model.LevelInformationParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "TamperStatus": + return model.TamperStatusParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "IdentifyReplyCommand": + attribute, _ := model.AttributeByName(parserArguments[0]) + parsedUint1, err := strconv.ParseUint(parserArguments[1], 10, 5) + if err!=nil { + return nil, err + } + numBytes := uint8(parsedUint1) + return model.IdentifyReplyCommandParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), attribute, numBytes ) + case "HVACRawLevels": + return model.HVACRawLevelsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "ZoneStatus": + return model.ZoneStatusParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "BridgeAddress": + return model.BridgeAddressParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "LightingLabelOptions": + return model.LightingLabelOptionsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "CustomTypes": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + numBytes := uint8(parsedUint0) + return model.CustomTypesParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), numBytes ) + case "EncodedReply": + // TODO: find a way to parse the sub types + var cBusOptions model.CBusOptions + // TODO: find a way to parse the sub types + var requestContext model.RequestContext + return model.EncodedReplyParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cBusOptions, requestContext ) + case "CBusPointToPointToMultiPointCommand": + // TODO: find a way to parse the sub types + var cBusOptions model.CBusOptions + return model.CBusPointToPointToMultiPointCommandParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cBusOptions ) + case "CBusPointToPointCommand": + // TODO: find a way to parse the sub types + var cBusOptions model.CBusOptions + return model.CBusPointToPointCommandParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cBusOptions ) + case "AirConditioningData": + return model.AirConditioningDataParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "LogicAssignment": + return model.LogicAssignmentParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + } + return nil, errors.Errorf("Unsupported type %s", typeName) } diff --git a/plc4go/protocols/cbus/readwrite/model/AccessControlCategory.go b/plc4go/protocols/cbus/readwrite/model/AccessControlCategory.go index 05f2298eb0e..9be54a4e309 100644 --- a/plc4go/protocols/cbus/readwrite/model/AccessControlCategory.go +++ b/plc4go/protocols/cbus/readwrite/model/AccessControlCategory.go @@ -34,16 +34,16 @@ type IAccessControlCategory interface { utils.Serializable } -const ( +const( AccessControlCategory_SYSTEM_ACTIVITY AccessControlCategory = 0x00 - AccessControlCategory_SYSTEM_REQUEST AccessControlCategory = 0x01 + AccessControlCategory_SYSTEM_REQUEST AccessControlCategory = 0x01 ) var AccessControlCategoryValues []AccessControlCategory func init() { _ = errors.New - AccessControlCategoryValues = []AccessControlCategory{ + AccessControlCategoryValues = []AccessControlCategory { AccessControlCategory_SYSTEM_ACTIVITY, AccessControlCategory_SYSTEM_REQUEST, } @@ -51,10 +51,10 @@ func init() { func AccessControlCategoryByValue(value uint8) (enum AccessControlCategory, ok bool) { switch value { - case 0x00: - return AccessControlCategory_SYSTEM_ACTIVITY, true - case 0x01: - return AccessControlCategory_SYSTEM_REQUEST, true + case 0x00: + return AccessControlCategory_SYSTEM_ACTIVITY, true + case 0x01: + return AccessControlCategory_SYSTEM_REQUEST, true } return 0, false } @@ -69,13 +69,13 @@ func AccessControlCategoryByName(value string) (enum AccessControlCategory, ok b return 0, false } -func AccessControlCategoryKnows(value uint8) bool { +func AccessControlCategoryKnows(value uint8) bool { for _, typeValue := range AccessControlCategoryValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastAccessControlCategory(structType interface{}) AccessControlCategory { @@ -139,3 +139,4 @@ func (e AccessControlCategory) PLC4XEnumName() string { func (e AccessControlCategory) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/AccessControlCommandType.go b/plc4go/protocols/cbus/readwrite/model/AccessControlCommandType.go index 9039b07deeb..e098aaf69e4 100644 --- a/plc4go/protocols/cbus/readwrite/model/AccessControlCommandType.go +++ b/plc4go/protocols/cbus/readwrite/model/AccessControlCommandType.go @@ -35,22 +35,22 @@ type IAccessControlCommandType interface { NumberOfArguments() uint8 } -const ( - AccessControlCommandType_CLOSE_ACCESS_POINT AccessControlCommandType = 0x00 - AccessControlCommandType_LOCK_ACCESS_POINT AccessControlCommandType = 0x01 - AccessControlCommandType_ACCESS_POINT_LEFT_OPEN AccessControlCommandType = 0x02 +const( + AccessControlCommandType_CLOSE_ACCESS_POINT AccessControlCommandType = 0x00 + AccessControlCommandType_LOCK_ACCESS_POINT AccessControlCommandType = 0x01 + AccessControlCommandType_ACCESS_POINT_LEFT_OPEN AccessControlCommandType = 0x02 AccessControlCommandType_ACCESS_POINT_FORCED_OPEN AccessControlCommandType = 0x03 - AccessControlCommandType_ACCESS_POINT_CLOSED AccessControlCommandType = 0x04 - AccessControlCommandType_REQUEST_TO_EXIT AccessControlCommandType = 0x05 - AccessControlCommandType_VALID_ACCESS AccessControlCommandType = 0x06 - AccessControlCommandType_INVALID_ACCESS AccessControlCommandType = 0x07 + AccessControlCommandType_ACCESS_POINT_CLOSED AccessControlCommandType = 0x04 + AccessControlCommandType_REQUEST_TO_EXIT AccessControlCommandType = 0x05 + AccessControlCommandType_VALID_ACCESS AccessControlCommandType = 0x06 + AccessControlCommandType_INVALID_ACCESS AccessControlCommandType = 0x07 ) var AccessControlCommandTypeValues []AccessControlCommandType func init() { _ = errors.New - AccessControlCommandTypeValues = []AccessControlCommandType{ + AccessControlCommandTypeValues = []AccessControlCommandType { AccessControlCommandType_CLOSE_ACCESS_POINT, AccessControlCommandType_LOCK_ACCESS_POINT, AccessControlCommandType_ACCESS_POINT_LEFT_OPEN, @@ -62,42 +62,34 @@ func init() { } } + func (e AccessControlCommandType) NumberOfArguments() uint8 { - switch e { - case 0x00: - { /* '0x00' */ - return 0 + switch e { + case 0x00: { /* '0x00' */ + return 0 } - case 0x01: - { /* '0x01' */ - return 0 + case 0x01: { /* '0x01' */ + return 0 } - case 0x02: - { /* '0x02' */ - return 0 + case 0x02: { /* '0x02' */ + return 0 } - case 0x03: - { /* '0x03' */ - return 0 + case 0x03: { /* '0x03' */ + return 0 } - case 0x04: - { /* '0x04' */ - return 0 + case 0x04: { /* '0x04' */ + return 0 } - case 0x05: - { /* '0x05' */ - return 0 + case 0x05: { /* '0x05' */ + return 0 } - case 0x06: - { /* '0x06' */ - return 2 + case 0x06: { /* '0x06' */ + return 2 } - case 0x07: - { /* '0x07' */ - return 2 + case 0x07: { /* '0x07' */ + return 2 } - default: - { + default: { return 0 } } @@ -113,22 +105,22 @@ func AccessControlCommandTypeFirstEnumForFieldNumberOfArguments(value uint8) (Ac } func AccessControlCommandTypeByValue(value uint8) (enum AccessControlCommandType, ok bool) { switch value { - case 0x00: - return AccessControlCommandType_CLOSE_ACCESS_POINT, true - case 0x01: - return AccessControlCommandType_LOCK_ACCESS_POINT, true - case 0x02: - return AccessControlCommandType_ACCESS_POINT_LEFT_OPEN, true - case 0x03: - return AccessControlCommandType_ACCESS_POINT_FORCED_OPEN, true - case 0x04: - return AccessControlCommandType_ACCESS_POINT_CLOSED, true - case 0x05: - return AccessControlCommandType_REQUEST_TO_EXIT, true - case 0x06: - return AccessControlCommandType_VALID_ACCESS, true - case 0x07: - return AccessControlCommandType_INVALID_ACCESS, true + case 0x00: + return AccessControlCommandType_CLOSE_ACCESS_POINT, true + case 0x01: + return AccessControlCommandType_LOCK_ACCESS_POINT, true + case 0x02: + return AccessControlCommandType_ACCESS_POINT_LEFT_OPEN, true + case 0x03: + return AccessControlCommandType_ACCESS_POINT_FORCED_OPEN, true + case 0x04: + return AccessControlCommandType_ACCESS_POINT_CLOSED, true + case 0x05: + return AccessControlCommandType_REQUEST_TO_EXIT, true + case 0x06: + return AccessControlCommandType_VALID_ACCESS, true + case 0x07: + return AccessControlCommandType_INVALID_ACCESS, true } return 0, false } @@ -155,13 +147,13 @@ func AccessControlCommandTypeByName(value string) (enum AccessControlCommandType return 0, false } -func AccessControlCommandTypeKnows(value uint8) bool { +func AccessControlCommandTypeKnows(value uint8) bool { for _, typeValue := range AccessControlCommandTypeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastAccessControlCommandType(structType interface{}) AccessControlCommandType { @@ -237,3 +229,4 @@ func (e AccessControlCommandType) PLC4XEnumName() string { func (e AccessControlCommandType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/AccessControlCommandTypeContainer.go b/plc4go/protocols/cbus/readwrite/model/AccessControlCommandTypeContainer.go index 42d8b08507e..b98ae0caed9 100644 --- a/plc4go/protocols/cbus/readwrite/model/AccessControlCommandTypeContainer.go +++ b/plc4go/protocols/cbus/readwrite/model/AccessControlCommandTypeContainer.go @@ -37,55 +37,55 @@ type IAccessControlCommandTypeContainer interface { Category() AccessControlCategory } -const ( - AccessControlCommandTypeContainer_AccessControlCommandCloseAccessPoint AccessControlCommandTypeContainer = 0x02 - AccessControlCommandTypeContainer_AccessControlCommandLockAccessPoint AccessControlCommandTypeContainer = 0x0A - AccessControlCommandTypeContainer_AccessControlCommandAccessPointLeftOpen AccessControlCommandTypeContainer = 0x12 - AccessControlCommandTypeContainer_AccessControlCommandAccessPointForcedOpen AccessControlCommandTypeContainer = 0x1A - AccessControlCommandTypeContainer_AccessControlCommandAccessPointClosed AccessControlCommandTypeContainer = 0x22 - AccessControlCommandTypeContainer_AccessControlCommandRequestToExit AccessControlCommandTypeContainer = 0x32 - AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_0Bytes AccessControlCommandTypeContainer = 0xA0 - AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_1Bytes AccessControlCommandTypeContainer = 0xA1 - AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_2Bytes AccessControlCommandTypeContainer = 0xA2 - AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_3Bytes AccessControlCommandTypeContainer = 0xA3 - AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_4Bytes AccessControlCommandTypeContainer = 0xA4 - AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_5Bytes AccessControlCommandTypeContainer = 0xA5 - AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_6Bytes AccessControlCommandTypeContainer = 0xA6 - AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_7Bytes AccessControlCommandTypeContainer = 0xA7 - AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_8Bytes AccessControlCommandTypeContainer = 0xA8 - AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_9Bytes AccessControlCommandTypeContainer = 0xA9 - AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_10Bytes AccessControlCommandTypeContainer = 0xAA - AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_11Bytes AccessControlCommandTypeContainer = 0xAB - AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_12Bytes AccessControlCommandTypeContainer = 0xAC - AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_13Bytes AccessControlCommandTypeContainer = 0xAD - AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_14Bytes AccessControlCommandTypeContainer = 0xAE - AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_15Bytes AccessControlCommandTypeContainer = 0xAF - AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_16Bytes AccessControlCommandTypeContainer = 0xB0 - AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_17Bytes AccessControlCommandTypeContainer = 0xB1 - AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_18Bytes AccessControlCommandTypeContainer = 0xB2 - AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_19Bytes AccessControlCommandTypeContainer = 0xB3 - AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_20Bytes AccessControlCommandTypeContainer = 0xB4 - AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_21Bytes AccessControlCommandTypeContainer = 0xB5 - AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_22Bytes AccessControlCommandTypeContainer = 0xB6 - AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_23Bytes AccessControlCommandTypeContainer = 0xB7 - AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_24Bytes AccessControlCommandTypeContainer = 0xB8 - AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_25Bytes AccessControlCommandTypeContainer = 0xB9 - AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_26Bytes AccessControlCommandTypeContainer = 0xBA - AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_27Bytes AccessControlCommandTypeContainer = 0xBB - AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_28Bytes AccessControlCommandTypeContainer = 0xBC - AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_29Bytes AccessControlCommandTypeContainer = 0xBD - AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_30Bytes AccessControlCommandTypeContainer = 0xBE - AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_31Bytes AccessControlCommandTypeContainer = 0xBF - AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_0Bytes AccessControlCommandTypeContainer = 0xC0 - AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_1Bytes AccessControlCommandTypeContainer = 0xC1 - AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_2Bytes AccessControlCommandTypeContainer = 0xC2 - AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_3Bytes AccessControlCommandTypeContainer = 0xC3 - AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_4Bytes AccessControlCommandTypeContainer = 0xC4 - AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_5Bytes AccessControlCommandTypeContainer = 0xC5 - AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_6Bytes AccessControlCommandTypeContainer = 0xC6 - AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_7Bytes AccessControlCommandTypeContainer = 0xC7 - AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_8Bytes AccessControlCommandTypeContainer = 0xC8 - AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_9Bytes AccessControlCommandTypeContainer = 0xC9 +const( + AccessControlCommandTypeContainer_AccessControlCommandCloseAccessPoint AccessControlCommandTypeContainer = 0x02 + AccessControlCommandTypeContainer_AccessControlCommandLockAccessPoint AccessControlCommandTypeContainer = 0x0A + AccessControlCommandTypeContainer_AccessControlCommandAccessPointLeftOpen AccessControlCommandTypeContainer = 0x12 + AccessControlCommandTypeContainer_AccessControlCommandAccessPointForcedOpen AccessControlCommandTypeContainer = 0x1A + AccessControlCommandTypeContainer_AccessControlCommandAccessPointClosed AccessControlCommandTypeContainer = 0x22 + AccessControlCommandTypeContainer_AccessControlCommandRequestToExit AccessControlCommandTypeContainer = 0x32 + AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_0Bytes AccessControlCommandTypeContainer = 0xA0 + AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_1Bytes AccessControlCommandTypeContainer = 0xA1 + AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_2Bytes AccessControlCommandTypeContainer = 0xA2 + AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_3Bytes AccessControlCommandTypeContainer = 0xA3 + AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_4Bytes AccessControlCommandTypeContainer = 0xA4 + AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_5Bytes AccessControlCommandTypeContainer = 0xA5 + AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_6Bytes AccessControlCommandTypeContainer = 0xA6 + AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_7Bytes AccessControlCommandTypeContainer = 0xA7 + AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_8Bytes AccessControlCommandTypeContainer = 0xA8 + AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_9Bytes AccessControlCommandTypeContainer = 0xA9 + AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_10Bytes AccessControlCommandTypeContainer = 0xAA + AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_11Bytes AccessControlCommandTypeContainer = 0xAB + AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_12Bytes AccessControlCommandTypeContainer = 0xAC + AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_13Bytes AccessControlCommandTypeContainer = 0xAD + AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_14Bytes AccessControlCommandTypeContainer = 0xAE + AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_15Bytes AccessControlCommandTypeContainer = 0xAF + AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_16Bytes AccessControlCommandTypeContainer = 0xB0 + AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_17Bytes AccessControlCommandTypeContainer = 0xB1 + AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_18Bytes AccessControlCommandTypeContainer = 0xB2 + AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_19Bytes AccessControlCommandTypeContainer = 0xB3 + AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_20Bytes AccessControlCommandTypeContainer = 0xB4 + AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_21Bytes AccessControlCommandTypeContainer = 0xB5 + AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_22Bytes AccessControlCommandTypeContainer = 0xB6 + AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_23Bytes AccessControlCommandTypeContainer = 0xB7 + AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_24Bytes AccessControlCommandTypeContainer = 0xB8 + AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_25Bytes AccessControlCommandTypeContainer = 0xB9 + AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_26Bytes AccessControlCommandTypeContainer = 0xBA + AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_27Bytes AccessControlCommandTypeContainer = 0xBB + AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_28Bytes AccessControlCommandTypeContainer = 0xBC + AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_29Bytes AccessControlCommandTypeContainer = 0xBD + AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_30Bytes AccessControlCommandTypeContainer = 0xBE + AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_31Bytes AccessControlCommandTypeContainer = 0xBF + AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_0Bytes AccessControlCommandTypeContainer = 0xC0 + AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_1Bytes AccessControlCommandTypeContainer = 0xC1 + AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_2Bytes AccessControlCommandTypeContainer = 0xC2 + AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_3Bytes AccessControlCommandTypeContainer = 0xC3 + AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_4Bytes AccessControlCommandTypeContainer = 0xC4 + AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_5Bytes AccessControlCommandTypeContainer = 0xC5 + AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_6Bytes AccessControlCommandTypeContainer = 0xC6 + AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_7Bytes AccessControlCommandTypeContainer = 0xC7 + AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_8Bytes AccessControlCommandTypeContainer = 0xC8 + AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_9Bytes AccessControlCommandTypeContainer = 0xC9 AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_10Bytes AccessControlCommandTypeContainer = 0xCA AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_11Bytes AccessControlCommandTypeContainer = 0xCB AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_12Bytes AccessControlCommandTypeContainer = 0xCC @@ -114,7 +114,7 @@ var AccessControlCommandTypeContainerValues []AccessControlCommandTypeContainer func init() { _ = errors.New - AccessControlCommandTypeContainerValues = []AccessControlCommandTypeContainer{ + AccessControlCommandTypeContainerValues = []AccessControlCommandTypeContainer { AccessControlCommandTypeContainer_AccessControlCommandCloseAccessPoint, AccessControlCommandTypeContainer_AccessControlCommandLockAccessPoint, AccessControlCommandTypeContainer_AccessControlCommandAccessPointLeftOpen, @@ -188,290 +188,220 @@ func init() { } } + func (e AccessControlCommandTypeContainer) NumBytes() uint8 { - switch e { - case 0x02: - { /* '0x02' */ - return 2 + switch e { + case 0x02: { /* '0x02' */ + return 2 } - case 0x0A: - { /* '0x0A' */ - return 2 + case 0x0A: { /* '0x0A' */ + return 2 } - case 0x12: - { /* '0x12' */ - return 2 + case 0x12: { /* '0x12' */ + return 2 } - case 0x1A: - { /* '0x1A' */ - return 2 + case 0x1A: { /* '0x1A' */ + return 2 } - case 0x22: - { /* '0x22' */ - return 2 + case 0x22: { /* '0x22' */ + return 2 } - case 0x32: - { /* '0x32' */ - return 2 + case 0x32: { /* '0x32' */ + return 2 } - case 0xA0: - { /* '0xA0' */ - return 0 + case 0xA0: { /* '0xA0' */ + return 0 } - case 0xA1: - { /* '0xA1' */ - return 1 + case 0xA1: { /* '0xA1' */ + return 1 } - case 0xA2: - { /* '0xA2' */ - return 2 + case 0xA2: { /* '0xA2' */ + return 2 } - case 0xA3: - { /* '0xA3' */ - return 3 + case 0xA3: { /* '0xA3' */ + return 3 } - case 0xA4: - { /* '0xA4' */ - return 4 + case 0xA4: { /* '0xA4' */ + return 4 } - case 0xA5: - { /* '0xA5' */ - return 5 + case 0xA5: { /* '0xA5' */ + return 5 } - case 0xA6: - { /* '0xA6' */ - return 6 + case 0xA6: { /* '0xA6' */ + return 6 } - case 0xA7: - { /* '0xA7' */ - return 7 + case 0xA7: { /* '0xA7' */ + return 7 } - case 0xA8: - { /* '0xA8' */ - return 8 + case 0xA8: { /* '0xA8' */ + return 8 } - case 0xA9: - { /* '0xA9' */ - return 9 + case 0xA9: { /* '0xA9' */ + return 9 } - case 0xAA: - { /* '0xAA' */ - return 10 + case 0xAA: { /* '0xAA' */ + return 10 } - case 0xAB: - { /* '0xAB' */ - return 11 + case 0xAB: { /* '0xAB' */ + return 11 } - case 0xAC: - { /* '0xAC' */ - return 12 + case 0xAC: { /* '0xAC' */ + return 12 } - case 0xAD: - { /* '0xAD' */ - return 13 + case 0xAD: { /* '0xAD' */ + return 13 } - case 0xAE: - { /* '0xAE' */ - return 14 + case 0xAE: { /* '0xAE' */ + return 14 } - case 0xAF: - { /* '0xAF' */ - return 15 + case 0xAF: { /* '0xAF' */ + return 15 } - case 0xB0: - { /* '0xB0' */ - return 16 + case 0xB0: { /* '0xB0' */ + return 16 } - case 0xB1: - { /* '0xB1' */ - return 17 + case 0xB1: { /* '0xB1' */ + return 17 } - case 0xB2: - { /* '0xB2' */ - return 18 + case 0xB2: { /* '0xB2' */ + return 18 } - case 0xB3: - { /* '0xB3' */ - return 19 + case 0xB3: { /* '0xB3' */ + return 19 } - case 0xB4: - { /* '0xB4' */ - return 20 + case 0xB4: { /* '0xB4' */ + return 20 } - case 0xB5: - { /* '0xB5' */ - return 21 + case 0xB5: { /* '0xB5' */ + return 21 } - case 0xB6: - { /* '0xB6' */ - return 22 + case 0xB6: { /* '0xB6' */ + return 22 } - case 0xB7: - { /* '0xB7' */ - return 23 + case 0xB7: { /* '0xB7' */ + return 23 } - case 0xB8: - { /* '0xB8' */ - return 24 + case 0xB8: { /* '0xB8' */ + return 24 } - case 0xB9: - { /* '0xB9' */ - return 25 + case 0xB9: { /* '0xB9' */ + return 25 } - case 0xBA: - { /* '0xBA' */ - return 26 + case 0xBA: { /* '0xBA' */ + return 26 } - case 0xBB: - { /* '0xBB' */ - return 27 + case 0xBB: { /* '0xBB' */ + return 27 } - case 0xBC: - { /* '0xBC' */ - return 28 + case 0xBC: { /* '0xBC' */ + return 28 } - case 0xBD: - { /* '0xBD' */ - return 29 + case 0xBD: { /* '0xBD' */ + return 29 } - case 0xBE: - { /* '0xBE' */ - return 30 + case 0xBE: { /* '0xBE' */ + return 30 } - case 0xBF: - { /* '0xBF' */ - return 31 + case 0xBF: { /* '0xBF' */ + return 31 } - case 0xC0: - { /* '0xC0' */ - return 0 + case 0xC0: { /* '0xC0' */ + return 0 } - case 0xC1: - { /* '0xC1' */ - return 1 + case 0xC1: { /* '0xC1' */ + return 1 } - case 0xC2: - { /* '0xC2' */ - return 2 + case 0xC2: { /* '0xC2' */ + return 2 } - case 0xC3: - { /* '0xC3' */ - return 3 + case 0xC3: { /* '0xC3' */ + return 3 } - case 0xC4: - { /* '0xC4' */ - return 4 + case 0xC4: { /* '0xC4' */ + return 4 } - case 0xC5: - { /* '0xC5' */ - return 5 + case 0xC5: { /* '0xC5' */ + return 5 } - case 0xC6: - { /* '0xC6' */ - return 6 + case 0xC6: { /* '0xC6' */ + return 6 } - case 0xC7: - { /* '0xC7' */ - return 7 + case 0xC7: { /* '0xC7' */ + return 7 } - case 0xC8: - { /* '0xC8' */ - return 8 + case 0xC8: { /* '0xC8' */ + return 8 } - case 0xC9: - { /* '0xC9' */ - return 9 + case 0xC9: { /* '0xC9' */ + return 9 } - case 0xCA: - { /* '0xCA' */ - return 10 + case 0xCA: { /* '0xCA' */ + return 10 } - case 0xCB: - { /* '0xCB' */ - return 11 + case 0xCB: { /* '0xCB' */ + return 11 } - case 0xCC: - { /* '0xCC' */ - return 12 + case 0xCC: { /* '0xCC' */ + return 12 } - case 0xCD: - { /* '0xCD' */ - return 13 + case 0xCD: { /* '0xCD' */ + return 13 } - case 0xCE: - { /* '0xCE' */ - return 14 + case 0xCE: { /* '0xCE' */ + return 14 } - case 0xCF: - { /* '0xCF' */ - return 15 + case 0xCF: { /* '0xCF' */ + return 15 } - case 0xD0: - { /* '0xD0' */ - return 16 + case 0xD0: { /* '0xD0' */ + return 16 } - case 0xD1: - { /* '0xD1' */ - return 17 + case 0xD1: { /* '0xD1' */ + return 17 } - case 0xD2: - { /* '0xD2' */ - return 18 + case 0xD2: { /* '0xD2' */ + return 18 } - case 0xD3: - { /* '0xD3' */ - return 19 + case 0xD3: { /* '0xD3' */ + return 19 } - case 0xD4: - { /* '0xD4' */ - return 20 + case 0xD4: { /* '0xD4' */ + return 20 } - case 0xD5: - { /* '0xD5' */ - return 21 + case 0xD5: { /* '0xD5' */ + return 21 } - case 0xD6: - { /* '0xD6' */ - return 22 + case 0xD6: { /* '0xD6' */ + return 22 } - case 0xD7: - { /* '0xD7' */ - return 23 + case 0xD7: { /* '0xD7' */ + return 23 } - case 0xD8: - { /* '0xD8' */ - return 24 + case 0xD8: { /* '0xD8' */ + return 24 } - case 0xD9: - { /* '0xD9' */ - return 25 + case 0xD9: { /* '0xD9' */ + return 25 } - case 0xDA: - { /* '0xDA' */ - return 26 + case 0xDA: { /* '0xDA' */ + return 26 } - case 0xDB: - { /* '0xDB' */ - return 27 + case 0xDB: { /* '0xDB' */ + return 27 } - case 0xDC: - { /* '0xDC' */ - return 28 + case 0xDC: { /* '0xDC' */ + return 28 } - case 0xDD: - { /* '0xDD' */ - return 29 + case 0xDD: { /* '0xDD' */ + return 29 } - case 0xDE: - { /* '0xDE' */ - return 30 + case 0xDE: { /* '0xDE' */ + return 30 } - case 0xDF: - { /* '0xDF' */ - return 31 + case 0xDF: { /* '0xDF' */ + return 31 } - default: - { + default: { return 0 } } @@ -487,289 +417,218 @@ func AccessControlCommandTypeContainerFirstEnumForFieldNumBytes(value uint8) (Ac } func (e AccessControlCommandTypeContainer) CommandType() AccessControlCommandType { - switch e { - case 0x02: - { /* '0x02' */ + switch e { + case 0x02: { /* '0x02' */ return AccessControlCommandType_CLOSE_ACCESS_POINT } - case 0x0A: - { /* '0x0A' */ + case 0x0A: { /* '0x0A' */ return AccessControlCommandType_LOCK_ACCESS_POINT } - case 0x12: - { /* '0x12' */ + case 0x12: { /* '0x12' */ return AccessControlCommandType_ACCESS_POINT_LEFT_OPEN } - case 0x1A: - { /* '0x1A' */ + case 0x1A: { /* '0x1A' */ return AccessControlCommandType_ACCESS_POINT_FORCED_OPEN } - case 0x22: - { /* '0x22' */ + case 0x22: { /* '0x22' */ return AccessControlCommandType_ACCESS_POINT_CLOSED } - case 0x32: - { /* '0x32' */ + case 0x32: { /* '0x32' */ return AccessControlCommandType_REQUEST_TO_EXIT } - case 0xA0: - { /* '0xA0' */ + case 0xA0: { /* '0xA0' */ return AccessControlCommandType_VALID_ACCESS } - case 0xA1: - { /* '0xA1' */ + case 0xA1: { /* '0xA1' */ return AccessControlCommandType_VALID_ACCESS } - case 0xA2: - { /* '0xA2' */ + case 0xA2: { /* '0xA2' */ return AccessControlCommandType_VALID_ACCESS } - case 0xA3: - { /* '0xA3' */ + case 0xA3: { /* '0xA3' */ return AccessControlCommandType_VALID_ACCESS } - case 0xA4: - { /* '0xA4' */ + case 0xA4: { /* '0xA4' */ return AccessControlCommandType_VALID_ACCESS } - case 0xA5: - { /* '0xA5' */ + case 0xA5: { /* '0xA5' */ return AccessControlCommandType_VALID_ACCESS } - case 0xA6: - { /* '0xA6' */ + case 0xA6: { /* '0xA6' */ return AccessControlCommandType_VALID_ACCESS } - case 0xA7: - { /* '0xA7' */ + case 0xA7: { /* '0xA7' */ return AccessControlCommandType_VALID_ACCESS } - case 0xA8: - { /* '0xA8' */ + case 0xA8: { /* '0xA8' */ return AccessControlCommandType_VALID_ACCESS } - case 0xA9: - { /* '0xA9' */ + case 0xA9: { /* '0xA9' */ return AccessControlCommandType_VALID_ACCESS } - case 0xAA: - { /* '0xAA' */ + case 0xAA: { /* '0xAA' */ return AccessControlCommandType_VALID_ACCESS } - case 0xAB: - { /* '0xAB' */ + case 0xAB: { /* '0xAB' */ return AccessControlCommandType_VALID_ACCESS } - case 0xAC: - { /* '0xAC' */ + case 0xAC: { /* '0xAC' */ return AccessControlCommandType_VALID_ACCESS } - case 0xAD: - { /* '0xAD' */ + case 0xAD: { /* '0xAD' */ return AccessControlCommandType_VALID_ACCESS } - case 0xAE: - { /* '0xAE' */ + case 0xAE: { /* '0xAE' */ return AccessControlCommandType_VALID_ACCESS } - case 0xAF: - { /* '0xAF' */ + case 0xAF: { /* '0xAF' */ return AccessControlCommandType_VALID_ACCESS } - case 0xB0: - { /* '0xB0' */ + case 0xB0: { /* '0xB0' */ return AccessControlCommandType_VALID_ACCESS } - case 0xB1: - { /* '0xB1' */ + case 0xB1: { /* '0xB1' */ return AccessControlCommandType_VALID_ACCESS } - case 0xB2: - { /* '0xB2' */ + case 0xB2: { /* '0xB2' */ return AccessControlCommandType_VALID_ACCESS } - case 0xB3: - { /* '0xB3' */ + case 0xB3: { /* '0xB3' */ return AccessControlCommandType_VALID_ACCESS } - case 0xB4: - { /* '0xB4' */ + case 0xB4: { /* '0xB4' */ return AccessControlCommandType_VALID_ACCESS } - case 0xB5: - { /* '0xB5' */ + case 0xB5: { /* '0xB5' */ return AccessControlCommandType_VALID_ACCESS } - case 0xB6: - { /* '0xB6' */ + case 0xB6: { /* '0xB6' */ return AccessControlCommandType_VALID_ACCESS } - case 0xB7: - { /* '0xB7' */ + case 0xB7: { /* '0xB7' */ return AccessControlCommandType_VALID_ACCESS } - case 0xB8: - { /* '0xB8' */ + case 0xB8: { /* '0xB8' */ return AccessControlCommandType_VALID_ACCESS } - case 0xB9: - { /* '0xB9' */ + case 0xB9: { /* '0xB9' */ return AccessControlCommandType_VALID_ACCESS } - case 0xBA: - { /* '0xBA' */ + case 0xBA: { /* '0xBA' */ return AccessControlCommandType_VALID_ACCESS } - case 0xBB: - { /* '0xBB' */ + case 0xBB: { /* '0xBB' */ return AccessControlCommandType_VALID_ACCESS } - case 0xBC: - { /* '0xBC' */ + case 0xBC: { /* '0xBC' */ return AccessControlCommandType_VALID_ACCESS } - case 0xBD: - { /* '0xBD' */ + case 0xBD: { /* '0xBD' */ return AccessControlCommandType_VALID_ACCESS } - case 0xBE: - { /* '0xBE' */ + case 0xBE: { /* '0xBE' */ return AccessControlCommandType_VALID_ACCESS } - case 0xBF: - { /* '0xBF' */ + case 0xBF: { /* '0xBF' */ return AccessControlCommandType_VALID_ACCESS } - case 0xC0: - { /* '0xC0' */ + case 0xC0: { /* '0xC0' */ return AccessControlCommandType_INVALID_ACCESS } - case 0xC1: - { /* '0xC1' */ + case 0xC1: { /* '0xC1' */ return AccessControlCommandType_INVALID_ACCESS } - case 0xC2: - { /* '0xC2' */ + case 0xC2: { /* '0xC2' */ return AccessControlCommandType_INVALID_ACCESS } - case 0xC3: - { /* '0xC3' */ + case 0xC3: { /* '0xC3' */ return AccessControlCommandType_INVALID_ACCESS } - case 0xC4: - { /* '0xC4' */ + case 0xC4: { /* '0xC4' */ return AccessControlCommandType_INVALID_ACCESS } - case 0xC5: - { /* '0xC5' */ + case 0xC5: { /* '0xC5' */ return AccessControlCommandType_INVALID_ACCESS } - case 0xC6: - { /* '0xC6' */ + case 0xC6: { /* '0xC6' */ return AccessControlCommandType_INVALID_ACCESS } - case 0xC7: - { /* '0xC7' */ + case 0xC7: { /* '0xC7' */ return AccessControlCommandType_INVALID_ACCESS } - case 0xC8: - { /* '0xC8' */ + case 0xC8: { /* '0xC8' */ return AccessControlCommandType_INVALID_ACCESS } - case 0xC9: - { /* '0xC9' */ + case 0xC9: { /* '0xC9' */ return AccessControlCommandType_INVALID_ACCESS } - case 0xCA: - { /* '0xCA' */ + case 0xCA: { /* '0xCA' */ return AccessControlCommandType_INVALID_ACCESS } - case 0xCB: - { /* '0xCB' */ + case 0xCB: { /* '0xCB' */ return AccessControlCommandType_INVALID_ACCESS } - case 0xCC: - { /* '0xCC' */ + case 0xCC: { /* '0xCC' */ return AccessControlCommandType_INVALID_ACCESS } - case 0xCD: - { /* '0xCD' */ + case 0xCD: { /* '0xCD' */ return AccessControlCommandType_INVALID_ACCESS } - case 0xCE: - { /* '0xCE' */ + case 0xCE: { /* '0xCE' */ return AccessControlCommandType_INVALID_ACCESS } - case 0xCF: - { /* '0xCF' */ + case 0xCF: { /* '0xCF' */ return AccessControlCommandType_INVALID_ACCESS } - case 0xD0: - { /* '0xD0' */ + case 0xD0: { /* '0xD0' */ return AccessControlCommandType_INVALID_ACCESS } - case 0xD1: - { /* '0xD1' */ + case 0xD1: { /* '0xD1' */ return AccessControlCommandType_INVALID_ACCESS } - case 0xD2: - { /* '0xD2' */ + case 0xD2: { /* '0xD2' */ return AccessControlCommandType_INVALID_ACCESS } - case 0xD3: - { /* '0xD3' */ + case 0xD3: { /* '0xD3' */ return AccessControlCommandType_INVALID_ACCESS } - case 0xD4: - { /* '0xD4' */ + case 0xD4: { /* '0xD4' */ return AccessControlCommandType_INVALID_ACCESS } - case 0xD5: - { /* '0xD5' */ + case 0xD5: { /* '0xD5' */ return AccessControlCommandType_INVALID_ACCESS } - case 0xD6: - { /* '0xD6' */ + case 0xD6: { /* '0xD6' */ return AccessControlCommandType_INVALID_ACCESS } - case 0xD7: - { /* '0xD7' */ + case 0xD7: { /* '0xD7' */ return AccessControlCommandType_INVALID_ACCESS } - case 0xD8: - { /* '0xD8' */ + case 0xD8: { /* '0xD8' */ return AccessControlCommandType_INVALID_ACCESS } - case 0xD9: - { /* '0xD9' */ + case 0xD9: { /* '0xD9' */ return AccessControlCommandType_INVALID_ACCESS } - case 0xDA: - { /* '0xDA' */ + case 0xDA: { /* '0xDA' */ return AccessControlCommandType_INVALID_ACCESS } - case 0xDB: - { /* '0xDB' */ + case 0xDB: { /* '0xDB' */ return AccessControlCommandType_INVALID_ACCESS } - case 0xDC: - { /* '0xDC' */ + case 0xDC: { /* '0xDC' */ return AccessControlCommandType_INVALID_ACCESS } - case 0xDD: - { /* '0xDD' */ + case 0xDD: { /* '0xDD' */ return AccessControlCommandType_INVALID_ACCESS } - case 0xDE: - { /* '0xDE' */ + case 0xDE: { /* '0xDE' */ return AccessControlCommandType_INVALID_ACCESS } - case 0xDF: - { /* '0xDF' */ + case 0xDF: { /* '0xDF' */ return AccessControlCommandType_INVALID_ACCESS } - default: - { + default: { return 0 } } @@ -785,289 +644,218 @@ func AccessControlCommandTypeContainerFirstEnumForFieldCommandType(value AccessC } func (e AccessControlCommandTypeContainer) Category() AccessControlCategory { - switch e { - case 0x02: - { /* '0x02' */ + switch e { + case 0x02: { /* '0x02' */ return AccessControlCategory_SYSTEM_REQUEST } - case 0x0A: - { /* '0x0A' */ + case 0x0A: { /* '0x0A' */ return AccessControlCategory_SYSTEM_REQUEST } - case 0x12: - { /* '0x12' */ + case 0x12: { /* '0x12' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0x1A: - { /* '0x1A' */ + case 0x1A: { /* '0x1A' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0x22: - { /* '0x22' */ + case 0x22: { /* '0x22' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0x32: - { /* '0x32' */ + case 0x32: { /* '0x32' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xA0: - { /* '0xA0' */ + case 0xA0: { /* '0xA0' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xA1: - { /* '0xA1' */ + case 0xA1: { /* '0xA1' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xA2: - { /* '0xA2' */ + case 0xA2: { /* '0xA2' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xA3: - { /* '0xA3' */ + case 0xA3: { /* '0xA3' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xA4: - { /* '0xA4' */ + case 0xA4: { /* '0xA4' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xA5: - { /* '0xA5' */ + case 0xA5: { /* '0xA5' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xA6: - { /* '0xA6' */ + case 0xA6: { /* '0xA6' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xA7: - { /* '0xA7' */ + case 0xA7: { /* '0xA7' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xA8: - { /* '0xA8' */ + case 0xA8: { /* '0xA8' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xA9: - { /* '0xA9' */ + case 0xA9: { /* '0xA9' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xAA: - { /* '0xAA' */ + case 0xAA: { /* '0xAA' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xAB: - { /* '0xAB' */ + case 0xAB: { /* '0xAB' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xAC: - { /* '0xAC' */ + case 0xAC: { /* '0xAC' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xAD: - { /* '0xAD' */ + case 0xAD: { /* '0xAD' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xAE: - { /* '0xAE' */ + case 0xAE: { /* '0xAE' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xAF: - { /* '0xAF' */ + case 0xAF: { /* '0xAF' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xB0: - { /* '0xB0' */ + case 0xB0: { /* '0xB0' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xB1: - { /* '0xB1' */ + case 0xB1: { /* '0xB1' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xB2: - { /* '0xB2' */ + case 0xB2: { /* '0xB2' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xB3: - { /* '0xB3' */ + case 0xB3: { /* '0xB3' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xB4: - { /* '0xB4' */ + case 0xB4: { /* '0xB4' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xB5: - { /* '0xB5' */ + case 0xB5: { /* '0xB5' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xB6: - { /* '0xB6' */ + case 0xB6: { /* '0xB6' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xB7: - { /* '0xB7' */ + case 0xB7: { /* '0xB7' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xB8: - { /* '0xB8' */ + case 0xB8: { /* '0xB8' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xB9: - { /* '0xB9' */ + case 0xB9: { /* '0xB9' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xBA: - { /* '0xBA' */ + case 0xBA: { /* '0xBA' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xBB: - { /* '0xBB' */ + case 0xBB: { /* '0xBB' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xBC: - { /* '0xBC' */ + case 0xBC: { /* '0xBC' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xBD: - { /* '0xBD' */ + case 0xBD: { /* '0xBD' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xBE: - { /* '0xBE' */ + case 0xBE: { /* '0xBE' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xBF: - { /* '0xBF' */ + case 0xBF: { /* '0xBF' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xC0: - { /* '0xC0' */ + case 0xC0: { /* '0xC0' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xC1: - { /* '0xC1' */ + case 0xC1: { /* '0xC1' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xC2: - { /* '0xC2' */ + case 0xC2: { /* '0xC2' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xC3: - { /* '0xC3' */ + case 0xC3: { /* '0xC3' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xC4: - { /* '0xC4' */ + case 0xC4: { /* '0xC4' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xC5: - { /* '0xC5' */ + case 0xC5: { /* '0xC5' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xC6: - { /* '0xC6' */ + case 0xC6: { /* '0xC6' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xC7: - { /* '0xC7' */ + case 0xC7: { /* '0xC7' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xC8: - { /* '0xC8' */ + case 0xC8: { /* '0xC8' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xC9: - { /* '0xC9' */ + case 0xC9: { /* '0xC9' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xCA: - { /* '0xCA' */ + case 0xCA: { /* '0xCA' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xCB: - { /* '0xCB' */ + case 0xCB: { /* '0xCB' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xCC: - { /* '0xCC' */ + case 0xCC: { /* '0xCC' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xCD: - { /* '0xCD' */ + case 0xCD: { /* '0xCD' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xCE: - { /* '0xCE' */ + case 0xCE: { /* '0xCE' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xCF: - { /* '0xCF' */ + case 0xCF: { /* '0xCF' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xD0: - { /* '0xD0' */ + case 0xD0: { /* '0xD0' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xD1: - { /* '0xD1' */ + case 0xD1: { /* '0xD1' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xD2: - { /* '0xD2' */ + case 0xD2: { /* '0xD2' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xD3: - { /* '0xD3' */ + case 0xD3: { /* '0xD3' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xD4: - { /* '0xD4' */ + case 0xD4: { /* '0xD4' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xD5: - { /* '0xD5' */ + case 0xD5: { /* '0xD5' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xD6: - { /* '0xD6' */ + case 0xD6: { /* '0xD6' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xD7: - { /* '0xD7' */ + case 0xD7: { /* '0xD7' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xD8: - { /* '0xD8' */ + case 0xD8: { /* '0xD8' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xD9: - { /* '0xD9' */ + case 0xD9: { /* '0xD9' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xDA: - { /* '0xDA' */ + case 0xDA: { /* '0xDA' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xDB: - { /* '0xDB' */ + case 0xDB: { /* '0xDB' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xDC: - { /* '0xDC' */ + case 0xDC: { /* '0xDC' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xDD: - { /* '0xDD' */ + case 0xDD: { /* '0xDD' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xDE: - { /* '0xDE' */ + case 0xDE: { /* '0xDE' */ return AccessControlCategory_SYSTEM_ACTIVITY } - case 0xDF: - { /* '0xDF' */ + case 0xDF: { /* '0xDF' */ return AccessControlCategory_SYSTEM_ACTIVITY } - default: - { + default: { return 0 } } @@ -1083,146 +871,146 @@ func AccessControlCommandTypeContainerFirstEnumForFieldCategory(value AccessCont } func AccessControlCommandTypeContainerByValue(value uint8) (enum AccessControlCommandTypeContainer, ok bool) { switch value { - case 0x02: - return AccessControlCommandTypeContainer_AccessControlCommandCloseAccessPoint, true - case 0x0A: - return AccessControlCommandTypeContainer_AccessControlCommandLockAccessPoint, true - case 0x12: - return AccessControlCommandTypeContainer_AccessControlCommandAccessPointLeftOpen, true - case 0x1A: - return AccessControlCommandTypeContainer_AccessControlCommandAccessPointForcedOpen, true - case 0x22: - return AccessControlCommandTypeContainer_AccessControlCommandAccessPointClosed, true - case 0x32: - return AccessControlCommandTypeContainer_AccessControlCommandRequestToExit, true - case 0xA0: - return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_0Bytes, true - case 0xA1: - return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_1Bytes, true - case 0xA2: - return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_2Bytes, true - case 0xA3: - return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_3Bytes, true - case 0xA4: - return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_4Bytes, true - case 0xA5: - return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_5Bytes, true - case 0xA6: - return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_6Bytes, true - case 0xA7: - return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_7Bytes, true - case 0xA8: - return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_8Bytes, true - case 0xA9: - return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_9Bytes, true - case 0xAA: - return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_10Bytes, true - case 0xAB: - return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_11Bytes, true - case 0xAC: - return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_12Bytes, true - case 0xAD: - return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_13Bytes, true - case 0xAE: - return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_14Bytes, true - case 0xAF: - return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_15Bytes, true - case 0xB0: - return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_16Bytes, true - case 0xB1: - return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_17Bytes, true - case 0xB2: - return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_18Bytes, true - case 0xB3: - return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_19Bytes, true - case 0xB4: - return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_20Bytes, true - case 0xB5: - return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_21Bytes, true - case 0xB6: - return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_22Bytes, true - case 0xB7: - return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_23Bytes, true - case 0xB8: - return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_24Bytes, true - case 0xB9: - return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_25Bytes, true - case 0xBA: - return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_26Bytes, true - case 0xBB: - return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_27Bytes, true - case 0xBC: - return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_28Bytes, true - case 0xBD: - return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_29Bytes, true - case 0xBE: - return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_30Bytes, true - case 0xBF: - return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_31Bytes, true - case 0xC0: - return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_0Bytes, true - case 0xC1: - return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_1Bytes, true - case 0xC2: - return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_2Bytes, true - case 0xC3: - return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_3Bytes, true - case 0xC4: - return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_4Bytes, true - case 0xC5: - return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_5Bytes, true - case 0xC6: - return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_6Bytes, true - case 0xC7: - return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_7Bytes, true - case 0xC8: - return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_8Bytes, true - case 0xC9: - return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_9Bytes, true - case 0xCA: - return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_10Bytes, true - case 0xCB: - return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_11Bytes, true - case 0xCC: - return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_12Bytes, true - case 0xCD: - return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_13Bytes, true - case 0xCE: - return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_14Bytes, true - case 0xCF: - return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_15Bytes, true - case 0xD0: - return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_16Bytes, true - case 0xD1: - return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_17Bytes, true - case 0xD2: - return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_18Bytes, true - case 0xD3: - return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_19Bytes, true - case 0xD4: - return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_20Bytes, true - case 0xD5: - return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_21Bytes, true - case 0xD6: - return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_22Bytes, true - case 0xD7: - return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_23Bytes, true - case 0xD8: - return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_24Bytes, true - case 0xD9: - return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_25Bytes, true - case 0xDA: - return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_26Bytes, true - case 0xDB: - return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_27Bytes, true - case 0xDC: - return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_28Bytes, true - case 0xDD: - return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_29Bytes, true - case 0xDE: - return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_30Bytes, true - case 0xDF: - return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_31Bytes, true + case 0x02: + return AccessControlCommandTypeContainer_AccessControlCommandCloseAccessPoint, true + case 0x0A: + return AccessControlCommandTypeContainer_AccessControlCommandLockAccessPoint, true + case 0x12: + return AccessControlCommandTypeContainer_AccessControlCommandAccessPointLeftOpen, true + case 0x1A: + return AccessControlCommandTypeContainer_AccessControlCommandAccessPointForcedOpen, true + case 0x22: + return AccessControlCommandTypeContainer_AccessControlCommandAccessPointClosed, true + case 0x32: + return AccessControlCommandTypeContainer_AccessControlCommandRequestToExit, true + case 0xA0: + return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_0Bytes, true + case 0xA1: + return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_1Bytes, true + case 0xA2: + return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_2Bytes, true + case 0xA3: + return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_3Bytes, true + case 0xA4: + return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_4Bytes, true + case 0xA5: + return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_5Bytes, true + case 0xA6: + return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_6Bytes, true + case 0xA7: + return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_7Bytes, true + case 0xA8: + return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_8Bytes, true + case 0xA9: + return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_9Bytes, true + case 0xAA: + return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_10Bytes, true + case 0xAB: + return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_11Bytes, true + case 0xAC: + return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_12Bytes, true + case 0xAD: + return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_13Bytes, true + case 0xAE: + return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_14Bytes, true + case 0xAF: + return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_15Bytes, true + case 0xB0: + return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_16Bytes, true + case 0xB1: + return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_17Bytes, true + case 0xB2: + return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_18Bytes, true + case 0xB3: + return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_19Bytes, true + case 0xB4: + return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_20Bytes, true + case 0xB5: + return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_21Bytes, true + case 0xB6: + return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_22Bytes, true + case 0xB7: + return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_23Bytes, true + case 0xB8: + return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_24Bytes, true + case 0xB9: + return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_25Bytes, true + case 0xBA: + return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_26Bytes, true + case 0xBB: + return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_27Bytes, true + case 0xBC: + return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_28Bytes, true + case 0xBD: + return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_29Bytes, true + case 0xBE: + return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_30Bytes, true + case 0xBF: + return AccessControlCommandTypeContainer_AccessControlCommandValidAccessRequest_31Bytes, true + case 0xC0: + return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_0Bytes, true + case 0xC1: + return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_1Bytes, true + case 0xC2: + return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_2Bytes, true + case 0xC3: + return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_3Bytes, true + case 0xC4: + return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_4Bytes, true + case 0xC5: + return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_5Bytes, true + case 0xC6: + return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_6Bytes, true + case 0xC7: + return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_7Bytes, true + case 0xC8: + return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_8Bytes, true + case 0xC9: + return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_9Bytes, true + case 0xCA: + return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_10Bytes, true + case 0xCB: + return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_11Bytes, true + case 0xCC: + return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_12Bytes, true + case 0xCD: + return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_13Bytes, true + case 0xCE: + return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_14Bytes, true + case 0xCF: + return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_15Bytes, true + case 0xD0: + return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_16Bytes, true + case 0xD1: + return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_17Bytes, true + case 0xD2: + return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_18Bytes, true + case 0xD3: + return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_19Bytes, true + case 0xD4: + return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_20Bytes, true + case 0xD5: + return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_21Bytes, true + case 0xD6: + return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_22Bytes, true + case 0xD7: + return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_23Bytes, true + case 0xD8: + return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_24Bytes, true + case 0xD9: + return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_25Bytes, true + case 0xDA: + return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_26Bytes, true + case 0xDB: + return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_27Bytes, true + case 0xDC: + return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_28Bytes, true + case 0xDD: + return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_29Bytes, true + case 0xDE: + return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_30Bytes, true + case 0xDF: + return AccessControlCommandTypeContainer_AccessControlCommandInvalidAccessRequest_31Bytes, true } return 0, false } @@ -1373,13 +1161,13 @@ func AccessControlCommandTypeContainerByName(value string) (enum AccessControlCo return 0, false } -func AccessControlCommandTypeContainerKnows(value uint8) bool { +func AccessControlCommandTypeContainerKnows(value uint8) bool { for _, typeValue := range AccessControlCommandTypeContainerValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastAccessControlCommandTypeContainer(structType interface{}) AccessControlCommandTypeContainer { @@ -1579,3 +1367,4 @@ func (e AccessControlCommandTypeContainer) PLC4XEnumName() string { func (e AccessControlCommandTypeContainer) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/AccessControlData.go b/plc4go/protocols/cbus/readwrite/model/AccessControlData.go index a22ee135532..ee11a8aff04 100644 --- a/plc4go/protocols/cbus/readwrite/model/AccessControlData.go +++ b/plc4go/protocols/cbus/readwrite/model/AccessControlData.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AccessControlData is the corresponding interface of AccessControlData type AccessControlData interface { @@ -51,9 +53,9 @@ type AccessControlDataExactly interface { // _AccessControlData is the data-structure of this message type _AccessControlData struct { _AccessControlDataChildRequirements - CommandTypeContainer AccessControlCommandTypeContainer - NetworkId byte - AccessPointId byte + CommandTypeContainer AccessControlCommandTypeContainer + NetworkId byte + AccessPointId byte } type _AccessControlDataChildRequirements interface { @@ -61,6 +63,7 @@ type _AccessControlDataChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type AccessControlDataParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child AccessControlData, serializeChildFunction func() error) error GetTypeName() string @@ -68,13 +71,12 @@ type AccessControlDataParent interface { type AccessControlDataChild interface { utils.Serializable - InitializeParent(parent AccessControlData, commandTypeContainer AccessControlCommandTypeContainer, networkId byte, accessPointId byte) +InitializeParent(parent AccessControlData , commandTypeContainer AccessControlCommandTypeContainer , networkId byte , accessPointId byte ) GetParent() *AccessControlData GetTypeName() string AccessControlData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -112,14 +114,15 @@ func (m *_AccessControlData) GetCommandType() AccessControlCommandType { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAccessControlData factory function for _AccessControlData -func NewAccessControlData(commandTypeContainer AccessControlCommandTypeContainer, networkId byte, accessPointId byte) *_AccessControlData { - return &_AccessControlData{CommandTypeContainer: commandTypeContainer, NetworkId: networkId, AccessPointId: accessPointId} +func NewAccessControlData( commandTypeContainer AccessControlCommandTypeContainer , networkId byte , accessPointId byte ) *_AccessControlData { +return &_AccessControlData{ CommandTypeContainer: commandTypeContainer , NetworkId: networkId , AccessPointId: accessPointId } } // Deprecated: use the interface for direct cast func CastAccessControlData(structType interface{}) AccessControlData { - if casted, ok := structType.(AccessControlData); ok { + if casted, ok := structType.(AccessControlData); ok { return casted } if casted, ok := structType.(*AccessControlData); ok { @@ -132,6 +135,7 @@ func (m *_AccessControlData) GetTypeName() string { return "AccessControlData" } + func (m *_AccessControlData) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -141,10 +145,10 @@ func (m *_AccessControlData) GetParentLengthInBits(ctx context.Context) uint16 { // A virtual field doesn't have any in- or output. // Simple field (networkId) - lengthInBits += 8 + lengthInBits += 8; // Simple field (accessPointId) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } @@ -167,7 +171,7 @@ func AccessControlDataParseWithBuffer(ctx context.Context, readBuffer utils.Read _ = currentPos // Validation - if !(KnowsAccessControlCommandTypeContainer(readBuffer)) { + if (!(KnowsAccessControlCommandTypeContainer(readBuffer))) { return nil, errors.WithStack(utils.ParseAssertError{"no command type could be found"}) } @@ -175,7 +179,7 @@ func AccessControlDataParseWithBuffer(ctx context.Context, readBuffer utils.Read if pullErr := readBuffer.PullContext("commandTypeContainer"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for commandTypeContainer") } - _commandTypeContainer, _commandTypeContainerErr := AccessControlCommandTypeContainerParseWithBuffer(ctx, readBuffer) +_commandTypeContainer, _commandTypeContainerErr := AccessControlCommandTypeContainerParseWithBuffer(ctx, readBuffer) if _commandTypeContainerErr != nil { return nil, errors.Wrap(_commandTypeContainerErr, "Error parsing 'commandTypeContainer' field of AccessControlData") } @@ -190,14 +194,14 @@ func AccessControlDataParseWithBuffer(ctx context.Context, readBuffer utils.Read _ = commandType // Simple Field (networkId) - _networkId, _networkIdErr := readBuffer.ReadByte("networkId") +_networkId, _networkIdErr := readBuffer.ReadByte("networkId") if _networkIdErr != nil { return nil, errors.Wrap(_networkIdErr, "Error parsing 'networkId' field of AccessControlData") } networkId := _networkId // Simple Field (accessPointId) - _accessPointId, _accessPointIdErr := readBuffer.ReadByte("accessPointId") +_accessPointId, _accessPointIdErr := readBuffer.ReadByte("accessPointId") if _accessPointIdErr != nil { return nil, errors.Wrap(_accessPointIdErr, "Error parsing 'accessPointId' field of AccessControlData") } @@ -206,29 +210,29 @@ func AccessControlDataParseWithBuffer(ctx context.Context, readBuffer utils.Read // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type AccessControlDataChildSerializeRequirement interface { AccessControlData - InitializeParent(AccessControlData, AccessControlCommandTypeContainer, byte, byte) + InitializeParent(AccessControlData, AccessControlCommandTypeContainer, byte, byte) GetParent() AccessControlData } var _childTemp interface{} var _child AccessControlDataChildSerializeRequirement var typeSwitchError error switch { - case commandType == AccessControlCommandType_VALID_ACCESS: // AccessControlDataValidAccessRequest +case commandType == AccessControlCommandType_VALID_ACCESS : // AccessControlDataValidAccessRequest _childTemp, typeSwitchError = AccessControlDataValidAccessRequestParseWithBuffer(ctx, readBuffer, commandTypeContainer) - case commandType == AccessControlCommandType_INVALID_ACCESS: // AccessControlDataInvalidAccessRequest +case commandType == AccessControlCommandType_INVALID_ACCESS : // AccessControlDataInvalidAccessRequest _childTemp, typeSwitchError = AccessControlDataInvalidAccessRequestParseWithBuffer(ctx, readBuffer, commandTypeContainer) - case commandType == AccessControlCommandType_ACCESS_POINT_LEFT_OPEN: // AccessControlDataAccessPointLeftOpen - _childTemp, typeSwitchError = AccessControlDataAccessPointLeftOpenParseWithBuffer(ctx, readBuffer) - case commandType == AccessControlCommandType_ACCESS_POINT_FORCED_OPEN: // AccessControlDataAccessPointForcedOpen - _childTemp, typeSwitchError = AccessControlDataAccessPointForcedOpenParseWithBuffer(ctx, readBuffer) - case commandType == AccessControlCommandType_ACCESS_POINT_CLOSED: // AccessControlDataAccessPointClosed - _childTemp, typeSwitchError = AccessControlDataAccessPointClosedParseWithBuffer(ctx, readBuffer) - case commandType == AccessControlCommandType_REQUEST_TO_EXIT: // AccessControlDataRequestToExit - _childTemp, typeSwitchError = AccessControlDataRequestToExitParseWithBuffer(ctx, readBuffer) - case commandType == AccessControlCommandType_CLOSE_ACCESS_POINT: // AccessControlDataCloseAccessPoint - _childTemp, typeSwitchError = AccessControlDataCloseAccessPointParseWithBuffer(ctx, readBuffer) - case commandType == AccessControlCommandType_LOCK_ACCESS_POINT: // AccessControlDataLockAccessPoint - _childTemp, typeSwitchError = AccessControlDataLockAccessPointParseWithBuffer(ctx, readBuffer) +case commandType == AccessControlCommandType_ACCESS_POINT_LEFT_OPEN : // AccessControlDataAccessPointLeftOpen + _childTemp, typeSwitchError = AccessControlDataAccessPointLeftOpenParseWithBuffer(ctx, readBuffer, ) +case commandType == AccessControlCommandType_ACCESS_POINT_FORCED_OPEN : // AccessControlDataAccessPointForcedOpen + _childTemp, typeSwitchError = AccessControlDataAccessPointForcedOpenParseWithBuffer(ctx, readBuffer, ) +case commandType == AccessControlCommandType_ACCESS_POINT_CLOSED : // AccessControlDataAccessPointClosed + _childTemp, typeSwitchError = AccessControlDataAccessPointClosedParseWithBuffer(ctx, readBuffer, ) +case commandType == AccessControlCommandType_REQUEST_TO_EXIT : // AccessControlDataRequestToExit + _childTemp, typeSwitchError = AccessControlDataRequestToExitParseWithBuffer(ctx, readBuffer, ) +case commandType == AccessControlCommandType_CLOSE_ACCESS_POINT : // AccessControlDataCloseAccessPoint + _childTemp, typeSwitchError = AccessControlDataCloseAccessPointParseWithBuffer(ctx, readBuffer, ) +case commandType == AccessControlCommandType_LOCK_ACCESS_POINT : // AccessControlDataLockAccessPoint + _childTemp, typeSwitchError = AccessControlDataLockAccessPointParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [commandType=%v]", commandType) } @@ -242,7 +246,7 @@ func AccessControlDataParseWithBuffer(ctx context.Context, readBuffer utils.Read } // Finish initializing - _child.InitializeParent(_child, commandTypeContainer, networkId, accessPointId) +_child.InitializeParent(_child , commandTypeContainer , networkId , accessPointId ) return _child, nil } @@ -252,7 +256,7 @@ func (pm *_AccessControlData) SerializeParent(ctx context.Context, writeBuffer u _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("AccessControlData"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("AccessControlData"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for AccessControlData") } @@ -297,6 +301,7 @@ func (pm *_AccessControlData) SerializeParent(ctx context.Context, writeBuffer u return nil } + func (m *_AccessControlData) isAccessControlData() bool { return true } @@ -311,3 +316,6 @@ func (m *_AccessControlData) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/AccessControlDataAccessPointClosed.go b/plc4go/protocols/cbus/readwrite/model/AccessControlDataAccessPointClosed.go index 65fe12e1fd6..0fbef784cc4 100644 --- a/plc4go/protocols/cbus/readwrite/model/AccessControlDataAccessPointClosed.go +++ b/plc4go/protocols/cbus/readwrite/model/AccessControlDataAccessPointClosed.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AccessControlDataAccessPointClosed is the corresponding interface of AccessControlDataAccessPointClosed type AccessControlDataAccessPointClosed interface { @@ -46,6 +48,8 @@ type _AccessControlDataAccessPointClosed struct { *_AccessControlData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,20 +60,20 @@ type _AccessControlDataAccessPointClosed struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AccessControlDataAccessPointClosed) InitializeParent(parent AccessControlData, commandTypeContainer AccessControlCommandTypeContainer, networkId byte, accessPointId byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_AccessControlDataAccessPointClosed) InitializeParent(parent AccessControlData , commandTypeContainer AccessControlCommandTypeContainer , networkId byte , accessPointId byte ) { m.CommandTypeContainer = commandTypeContainer m.NetworkId = networkId m.AccessPointId = accessPointId } -func (m *_AccessControlDataAccessPointClosed) GetParent() AccessControlData { +func (m *_AccessControlDataAccessPointClosed) GetParent() AccessControlData { return m._AccessControlData } + // NewAccessControlDataAccessPointClosed factory function for _AccessControlDataAccessPointClosed -func NewAccessControlDataAccessPointClosed(commandTypeContainer AccessControlCommandTypeContainer, networkId byte, accessPointId byte) *_AccessControlDataAccessPointClosed { +func NewAccessControlDataAccessPointClosed( commandTypeContainer AccessControlCommandTypeContainer , networkId byte , accessPointId byte ) *_AccessControlDataAccessPointClosed { _result := &_AccessControlDataAccessPointClosed{ - _AccessControlData: NewAccessControlData(commandTypeContainer, networkId, accessPointId), + _AccessControlData: NewAccessControlData(commandTypeContainer, networkId, accessPointId), } _result._AccessControlData._AccessControlDataChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewAccessControlDataAccessPointClosed(commandTypeContainer AccessControlCom // Deprecated: use the interface for direct cast func CastAccessControlDataAccessPointClosed(structType interface{}) AccessControlDataAccessPointClosed { - if casted, ok := structType.(AccessControlDataAccessPointClosed); ok { + if casted, ok := structType.(AccessControlDataAccessPointClosed); ok { return casted } if casted, ok := structType.(*AccessControlDataAccessPointClosed); ok { @@ -96,6 +100,7 @@ func (m *_AccessControlDataAccessPointClosed) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_AccessControlDataAccessPointClosed) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -119,7 +124,8 @@ func AccessControlDataAccessPointClosedParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_AccessControlDataAccessPointClosed{ - _AccessControlData: &_AccessControlData{}, + _AccessControlData: &_AccessControlData{ + }, } _child._AccessControlData._AccessControlDataChildRequirements = _child return _child, nil @@ -149,6 +155,7 @@ func (m *_AccessControlDataAccessPointClosed) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AccessControlDataAccessPointClosed) isAccessControlDataAccessPointClosed() bool { return true } @@ -163,3 +170,6 @@ func (m *_AccessControlDataAccessPointClosed) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/AccessControlDataAccessPointForcedOpen.go b/plc4go/protocols/cbus/readwrite/model/AccessControlDataAccessPointForcedOpen.go index ec32e687c7b..cdf9f0e273f 100644 --- a/plc4go/protocols/cbus/readwrite/model/AccessControlDataAccessPointForcedOpen.go +++ b/plc4go/protocols/cbus/readwrite/model/AccessControlDataAccessPointForcedOpen.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AccessControlDataAccessPointForcedOpen is the corresponding interface of AccessControlDataAccessPointForcedOpen type AccessControlDataAccessPointForcedOpen interface { @@ -46,6 +48,8 @@ type _AccessControlDataAccessPointForcedOpen struct { *_AccessControlData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,20 +60,20 @@ type _AccessControlDataAccessPointForcedOpen struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AccessControlDataAccessPointForcedOpen) InitializeParent(parent AccessControlData, commandTypeContainer AccessControlCommandTypeContainer, networkId byte, accessPointId byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_AccessControlDataAccessPointForcedOpen) InitializeParent(parent AccessControlData , commandTypeContainer AccessControlCommandTypeContainer , networkId byte , accessPointId byte ) { m.CommandTypeContainer = commandTypeContainer m.NetworkId = networkId m.AccessPointId = accessPointId } -func (m *_AccessControlDataAccessPointForcedOpen) GetParent() AccessControlData { +func (m *_AccessControlDataAccessPointForcedOpen) GetParent() AccessControlData { return m._AccessControlData } + // NewAccessControlDataAccessPointForcedOpen factory function for _AccessControlDataAccessPointForcedOpen -func NewAccessControlDataAccessPointForcedOpen(commandTypeContainer AccessControlCommandTypeContainer, networkId byte, accessPointId byte) *_AccessControlDataAccessPointForcedOpen { +func NewAccessControlDataAccessPointForcedOpen( commandTypeContainer AccessControlCommandTypeContainer , networkId byte , accessPointId byte ) *_AccessControlDataAccessPointForcedOpen { _result := &_AccessControlDataAccessPointForcedOpen{ - _AccessControlData: NewAccessControlData(commandTypeContainer, networkId, accessPointId), + _AccessControlData: NewAccessControlData(commandTypeContainer, networkId, accessPointId), } _result._AccessControlData._AccessControlDataChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewAccessControlDataAccessPointForcedOpen(commandTypeContainer AccessContro // Deprecated: use the interface for direct cast func CastAccessControlDataAccessPointForcedOpen(structType interface{}) AccessControlDataAccessPointForcedOpen { - if casted, ok := structType.(AccessControlDataAccessPointForcedOpen); ok { + if casted, ok := structType.(AccessControlDataAccessPointForcedOpen); ok { return casted } if casted, ok := structType.(*AccessControlDataAccessPointForcedOpen); ok { @@ -96,6 +100,7 @@ func (m *_AccessControlDataAccessPointForcedOpen) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_AccessControlDataAccessPointForcedOpen) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -119,7 +124,8 @@ func AccessControlDataAccessPointForcedOpenParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_AccessControlDataAccessPointForcedOpen{ - _AccessControlData: &_AccessControlData{}, + _AccessControlData: &_AccessControlData{ + }, } _child._AccessControlData._AccessControlDataChildRequirements = _child return _child, nil @@ -149,6 +155,7 @@ func (m *_AccessControlDataAccessPointForcedOpen) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AccessControlDataAccessPointForcedOpen) isAccessControlDataAccessPointForcedOpen() bool { return true } @@ -163,3 +170,6 @@ func (m *_AccessControlDataAccessPointForcedOpen) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/AccessControlDataAccessPointLeftOpen.go b/plc4go/protocols/cbus/readwrite/model/AccessControlDataAccessPointLeftOpen.go index 6b62566c569..ca6599b5075 100644 --- a/plc4go/protocols/cbus/readwrite/model/AccessControlDataAccessPointLeftOpen.go +++ b/plc4go/protocols/cbus/readwrite/model/AccessControlDataAccessPointLeftOpen.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AccessControlDataAccessPointLeftOpen is the corresponding interface of AccessControlDataAccessPointLeftOpen type AccessControlDataAccessPointLeftOpen interface { @@ -46,6 +48,8 @@ type _AccessControlDataAccessPointLeftOpen struct { *_AccessControlData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,20 +60,20 @@ type _AccessControlDataAccessPointLeftOpen struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AccessControlDataAccessPointLeftOpen) InitializeParent(parent AccessControlData, commandTypeContainer AccessControlCommandTypeContainer, networkId byte, accessPointId byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_AccessControlDataAccessPointLeftOpen) InitializeParent(parent AccessControlData , commandTypeContainer AccessControlCommandTypeContainer , networkId byte , accessPointId byte ) { m.CommandTypeContainer = commandTypeContainer m.NetworkId = networkId m.AccessPointId = accessPointId } -func (m *_AccessControlDataAccessPointLeftOpen) GetParent() AccessControlData { +func (m *_AccessControlDataAccessPointLeftOpen) GetParent() AccessControlData { return m._AccessControlData } + // NewAccessControlDataAccessPointLeftOpen factory function for _AccessControlDataAccessPointLeftOpen -func NewAccessControlDataAccessPointLeftOpen(commandTypeContainer AccessControlCommandTypeContainer, networkId byte, accessPointId byte) *_AccessControlDataAccessPointLeftOpen { +func NewAccessControlDataAccessPointLeftOpen( commandTypeContainer AccessControlCommandTypeContainer , networkId byte , accessPointId byte ) *_AccessControlDataAccessPointLeftOpen { _result := &_AccessControlDataAccessPointLeftOpen{ - _AccessControlData: NewAccessControlData(commandTypeContainer, networkId, accessPointId), + _AccessControlData: NewAccessControlData(commandTypeContainer, networkId, accessPointId), } _result._AccessControlData._AccessControlDataChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewAccessControlDataAccessPointLeftOpen(commandTypeContainer AccessControlC // Deprecated: use the interface for direct cast func CastAccessControlDataAccessPointLeftOpen(structType interface{}) AccessControlDataAccessPointLeftOpen { - if casted, ok := structType.(AccessControlDataAccessPointLeftOpen); ok { + if casted, ok := structType.(AccessControlDataAccessPointLeftOpen); ok { return casted } if casted, ok := structType.(*AccessControlDataAccessPointLeftOpen); ok { @@ -96,6 +100,7 @@ func (m *_AccessControlDataAccessPointLeftOpen) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_AccessControlDataAccessPointLeftOpen) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -119,7 +124,8 @@ func AccessControlDataAccessPointLeftOpenParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_AccessControlDataAccessPointLeftOpen{ - _AccessControlData: &_AccessControlData{}, + _AccessControlData: &_AccessControlData{ + }, } _child._AccessControlData._AccessControlDataChildRequirements = _child return _child, nil @@ -149,6 +155,7 @@ func (m *_AccessControlDataAccessPointLeftOpen) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AccessControlDataAccessPointLeftOpen) isAccessControlDataAccessPointLeftOpen() bool { return true } @@ -163,3 +170,6 @@ func (m *_AccessControlDataAccessPointLeftOpen) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/AccessControlDataCloseAccessPoint.go b/plc4go/protocols/cbus/readwrite/model/AccessControlDataCloseAccessPoint.go index c5a686e947d..12b0eb2ef76 100644 --- a/plc4go/protocols/cbus/readwrite/model/AccessControlDataCloseAccessPoint.go +++ b/plc4go/protocols/cbus/readwrite/model/AccessControlDataCloseAccessPoint.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AccessControlDataCloseAccessPoint is the corresponding interface of AccessControlDataCloseAccessPoint type AccessControlDataCloseAccessPoint interface { @@ -46,6 +48,8 @@ type _AccessControlDataCloseAccessPoint struct { *_AccessControlData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,20 +60,20 @@ type _AccessControlDataCloseAccessPoint struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AccessControlDataCloseAccessPoint) InitializeParent(parent AccessControlData, commandTypeContainer AccessControlCommandTypeContainer, networkId byte, accessPointId byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_AccessControlDataCloseAccessPoint) InitializeParent(parent AccessControlData , commandTypeContainer AccessControlCommandTypeContainer , networkId byte , accessPointId byte ) { m.CommandTypeContainer = commandTypeContainer m.NetworkId = networkId m.AccessPointId = accessPointId } -func (m *_AccessControlDataCloseAccessPoint) GetParent() AccessControlData { +func (m *_AccessControlDataCloseAccessPoint) GetParent() AccessControlData { return m._AccessControlData } + // NewAccessControlDataCloseAccessPoint factory function for _AccessControlDataCloseAccessPoint -func NewAccessControlDataCloseAccessPoint(commandTypeContainer AccessControlCommandTypeContainer, networkId byte, accessPointId byte) *_AccessControlDataCloseAccessPoint { +func NewAccessControlDataCloseAccessPoint( commandTypeContainer AccessControlCommandTypeContainer , networkId byte , accessPointId byte ) *_AccessControlDataCloseAccessPoint { _result := &_AccessControlDataCloseAccessPoint{ - _AccessControlData: NewAccessControlData(commandTypeContainer, networkId, accessPointId), + _AccessControlData: NewAccessControlData(commandTypeContainer, networkId, accessPointId), } _result._AccessControlData._AccessControlDataChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewAccessControlDataCloseAccessPoint(commandTypeContainer AccessControlComm // Deprecated: use the interface for direct cast func CastAccessControlDataCloseAccessPoint(structType interface{}) AccessControlDataCloseAccessPoint { - if casted, ok := structType.(AccessControlDataCloseAccessPoint); ok { + if casted, ok := structType.(AccessControlDataCloseAccessPoint); ok { return casted } if casted, ok := structType.(*AccessControlDataCloseAccessPoint); ok { @@ -96,6 +100,7 @@ func (m *_AccessControlDataCloseAccessPoint) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_AccessControlDataCloseAccessPoint) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -119,7 +124,8 @@ func AccessControlDataCloseAccessPointParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_AccessControlDataCloseAccessPoint{ - _AccessControlData: &_AccessControlData{}, + _AccessControlData: &_AccessControlData{ + }, } _child._AccessControlData._AccessControlDataChildRequirements = _child return _child, nil @@ -149,6 +155,7 @@ func (m *_AccessControlDataCloseAccessPoint) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AccessControlDataCloseAccessPoint) isAccessControlDataCloseAccessPoint() bool { return true } @@ -163,3 +170,6 @@ func (m *_AccessControlDataCloseAccessPoint) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/AccessControlDataInvalidAccessRequest.go b/plc4go/protocols/cbus/readwrite/model/AccessControlDataInvalidAccessRequest.go index 15e8d545a8b..460a2bd0eaf 100644 --- a/plc4go/protocols/cbus/readwrite/model/AccessControlDataInvalidAccessRequest.go +++ b/plc4go/protocols/cbus/readwrite/model/AccessControlDataInvalidAccessRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AccessControlDataInvalidAccessRequest is the corresponding interface of AccessControlDataInvalidAccessRequest type AccessControlDataInvalidAccessRequest interface { @@ -48,10 +50,12 @@ type AccessControlDataInvalidAccessRequestExactly interface { // _AccessControlDataInvalidAccessRequest is the data-structure of this message type _AccessControlDataInvalidAccessRequest struct { *_AccessControlData - AccessControlDirection AccessControlDirection - Data []byte + AccessControlDirection AccessControlDirection + Data []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -62,16 +66,14 @@ type _AccessControlDataInvalidAccessRequest struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AccessControlDataInvalidAccessRequest) InitializeParent(parent AccessControlData, commandTypeContainer AccessControlCommandTypeContainer, networkId byte, accessPointId byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_AccessControlDataInvalidAccessRequest) InitializeParent(parent AccessControlData , commandTypeContainer AccessControlCommandTypeContainer , networkId byte , accessPointId byte ) { m.CommandTypeContainer = commandTypeContainer m.NetworkId = networkId m.AccessPointId = accessPointId } -func (m *_AccessControlDataInvalidAccessRequest) GetParent() AccessControlData { +func (m *_AccessControlDataInvalidAccessRequest) GetParent() AccessControlData { return m._AccessControlData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_AccessControlDataInvalidAccessRequest) GetData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAccessControlDataInvalidAccessRequest factory function for _AccessControlDataInvalidAccessRequest -func NewAccessControlDataInvalidAccessRequest(accessControlDirection AccessControlDirection, data []byte, commandTypeContainer AccessControlCommandTypeContainer, networkId byte, accessPointId byte) *_AccessControlDataInvalidAccessRequest { +func NewAccessControlDataInvalidAccessRequest( accessControlDirection AccessControlDirection , data []byte , commandTypeContainer AccessControlCommandTypeContainer , networkId byte , accessPointId byte ) *_AccessControlDataInvalidAccessRequest { _result := &_AccessControlDataInvalidAccessRequest{ AccessControlDirection: accessControlDirection, - Data: data, - _AccessControlData: NewAccessControlData(commandTypeContainer, networkId, accessPointId), + Data: data, + _AccessControlData: NewAccessControlData(commandTypeContainer, networkId, accessPointId), } _result._AccessControlData._AccessControlDataChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewAccessControlDataInvalidAccessRequest(accessControlDirection AccessContr // Deprecated: use the interface for direct cast func CastAccessControlDataInvalidAccessRequest(structType interface{}) AccessControlDataInvalidAccessRequest { - if casted, ok := structType.(AccessControlDataInvalidAccessRequest); ok { + if casted, ok := structType.(AccessControlDataInvalidAccessRequest); ok { return casted } if casted, ok := structType.(*AccessControlDataInvalidAccessRequest); ok { @@ -130,6 +133,7 @@ func (m *_AccessControlDataInvalidAccessRequest) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_AccessControlDataInvalidAccessRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,7 +155,7 @@ func AccessControlDataInvalidAccessRequestParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("accessControlDirection"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for accessControlDirection") } - _accessControlDirection, _accessControlDirectionErr := AccessControlDirectionParseWithBuffer(ctx, readBuffer) +_accessControlDirection, _accessControlDirectionErr := AccessControlDirectionParseWithBuffer(ctx, readBuffer) if _accessControlDirectionErr != nil { return nil, errors.Wrap(_accessControlDirectionErr, "Error parsing 'accessControlDirection' field of AccessControlDataInvalidAccessRequest") } @@ -172,9 +176,10 @@ func AccessControlDataInvalidAccessRequestParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_AccessControlDataInvalidAccessRequest{ - _AccessControlData: &_AccessControlData{}, + _AccessControlData: &_AccessControlData{ + }, AccessControlDirection: accessControlDirection, - Data: data, + Data: data, } _child._AccessControlData._AccessControlDataChildRequirements = _child return _child, nil @@ -196,23 +201,23 @@ func (m *_AccessControlDataInvalidAccessRequest) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for AccessControlDataInvalidAccessRequest") } - // Simple Field (accessControlDirection) - if pushErr := writeBuffer.PushContext("accessControlDirection"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for accessControlDirection") - } - _accessControlDirectionErr := writeBuffer.WriteSerializable(ctx, m.GetAccessControlDirection()) - if popErr := writeBuffer.PopContext("accessControlDirection"); popErr != nil { - return errors.Wrap(popErr, "Error popping for accessControlDirection") - } - if _accessControlDirectionErr != nil { - return errors.Wrap(_accessControlDirectionErr, "Error serializing 'accessControlDirection' field") - } + // Simple Field (accessControlDirection) + if pushErr := writeBuffer.PushContext("accessControlDirection"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for accessControlDirection") + } + _accessControlDirectionErr := writeBuffer.WriteSerializable(ctx, m.GetAccessControlDirection()) + if popErr := writeBuffer.PopContext("accessControlDirection"); popErr != nil { + return errors.Wrap(popErr, "Error popping for accessControlDirection") + } + if _accessControlDirectionErr != nil { + return errors.Wrap(_accessControlDirectionErr, "Error serializing 'accessControlDirection' field") + } - // Array Field (data) - // Byte Array field (data) - if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { - return errors.Wrap(err, "Error serializing 'data' field") - } + // Array Field (data) + // Byte Array field (data) + if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { + return errors.Wrap(err, "Error serializing 'data' field") + } if popErr := writeBuffer.PopContext("AccessControlDataInvalidAccessRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for AccessControlDataInvalidAccessRequest") @@ -222,6 +227,7 @@ func (m *_AccessControlDataInvalidAccessRequest) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AccessControlDataInvalidAccessRequest) isAccessControlDataInvalidAccessRequest() bool { return true } @@ -236,3 +242,6 @@ func (m *_AccessControlDataInvalidAccessRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/AccessControlDataLockAccessPoint.go b/plc4go/protocols/cbus/readwrite/model/AccessControlDataLockAccessPoint.go index 657a9d9e988..8c6034c50fd 100644 --- a/plc4go/protocols/cbus/readwrite/model/AccessControlDataLockAccessPoint.go +++ b/plc4go/protocols/cbus/readwrite/model/AccessControlDataLockAccessPoint.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AccessControlDataLockAccessPoint is the corresponding interface of AccessControlDataLockAccessPoint type AccessControlDataLockAccessPoint interface { @@ -46,6 +48,8 @@ type _AccessControlDataLockAccessPoint struct { *_AccessControlData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,20 +60,20 @@ type _AccessControlDataLockAccessPoint struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AccessControlDataLockAccessPoint) InitializeParent(parent AccessControlData, commandTypeContainer AccessControlCommandTypeContainer, networkId byte, accessPointId byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_AccessControlDataLockAccessPoint) InitializeParent(parent AccessControlData , commandTypeContainer AccessControlCommandTypeContainer , networkId byte , accessPointId byte ) { m.CommandTypeContainer = commandTypeContainer m.NetworkId = networkId m.AccessPointId = accessPointId } -func (m *_AccessControlDataLockAccessPoint) GetParent() AccessControlData { +func (m *_AccessControlDataLockAccessPoint) GetParent() AccessControlData { return m._AccessControlData } + // NewAccessControlDataLockAccessPoint factory function for _AccessControlDataLockAccessPoint -func NewAccessControlDataLockAccessPoint(commandTypeContainer AccessControlCommandTypeContainer, networkId byte, accessPointId byte) *_AccessControlDataLockAccessPoint { +func NewAccessControlDataLockAccessPoint( commandTypeContainer AccessControlCommandTypeContainer , networkId byte , accessPointId byte ) *_AccessControlDataLockAccessPoint { _result := &_AccessControlDataLockAccessPoint{ - _AccessControlData: NewAccessControlData(commandTypeContainer, networkId, accessPointId), + _AccessControlData: NewAccessControlData(commandTypeContainer, networkId, accessPointId), } _result._AccessControlData._AccessControlDataChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewAccessControlDataLockAccessPoint(commandTypeContainer AccessControlComma // Deprecated: use the interface for direct cast func CastAccessControlDataLockAccessPoint(structType interface{}) AccessControlDataLockAccessPoint { - if casted, ok := structType.(AccessControlDataLockAccessPoint); ok { + if casted, ok := structType.(AccessControlDataLockAccessPoint); ok { return casted } if casted, ok := structType.(*AccessControlDataLockAccessPoint); ok { @@ -96,6 +100,7 @@ func (m *_AccessControlDataLockAccessPoint) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_AccessControlDataLockAccessPoint) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -119,7 +124,8 @@ func AccessControlDataLockAccessPointParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_AccessControlDataLockAccessPoint{ - _AccessControlData: &_AccessControlData{}, + _AccessControlData: &_AccessControlData{ + }, } _child._AccessControlData._AccessControlDataChildRequirements = _child return _child, nil @@ -149,6 +155,7 @@ func (m *_AccessControlDataLockAccessPoint) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AccessControlDataLockAccessPoint) isAccessControlDataLockAccessPoint() bool { return true } @@ -163,3 +170,6 @@ func (m *_AccessControlDataLockAccessPoint) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/AccessControlDataRequestToExit.go b/plc4go/protocols/cbus/readwrite/model/AccessControlDataRequestToExit.go index d979035ab07..54123ec1658 100644 --- a/plc4go/protocols/cbus/readwrite/model/AccessControlDataRequestToExit.go +++ b/plc4go/protocols/cbus/readwrite/model/AccessControlDataRequestToExit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AccessControlDataRequestToExit is the corresponding interface of AccessControlDataRequestToExit type AccessControlDataRequestToExit interface { @@ -46,6 +48,8 @@ type _AccessControlDataRequestToExit struct { *_AccessControlData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,20 +60,20 @@ type _AccessControlDataRequestToExit struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AccessControlDataRequestToExit) InitializeParent(parent AccessControlData, commandTypeContainer AccessControlCommandTypeContainer, networkId byte, accessPointId byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_AccessControlDataRequestToExit) InitializeParent(parent AccessControlData , commandTypeContainer AccessControlCommandTypeContainer , networkId byte , accessPointId byte ) { m.CommandTypeContainer = commandTypeContainer m.NetworkId = networkId m.AccessPointId = accessPointId } -func (m *_AccessControlDataRequestToExit) GetParent() AccessControlData { +func (m *_AccessControlDataRequestToExit) GetParent() AccessControlData { return m._AccessControlData } + // NewAccessControlDataRequestToExit factory function for _AccessControlDataRequestToExit -func NewAccessControlDataRequestToExit(commandTypeContainer AccessControlCommandTypeContainer, networkId byte, accessPointId byte) *_AccessControlDataRequestToExit { +func NewAccessControlDataRequestToExit( commandTypeContainer AccessControlCommandTypeContainer , networkId byte , accessPointId byte ) *_AccessControlDataRequestToExit { _result := &_AccessControlDataRequestToExit{ - _AccessControlData: NewAccessControlData(commandTypeContainer, networkId, accessPointId), + _AccessControlData: NewAccessControlData(commandTypeContainer, networkId, accessPointId), } _result._AccessControlData._AccessControlDataChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewAccessControlDataRequestToExit(commandTypeContainer AccessControlCommand // Deprecated: use the interface for direct cast func CastAccessControlDataRequestToExit(structType interface{}) AccessControlDataRequestToExit { - if casted, ok := structType.(AccessControlDataRequestToExit); ok { + if casted, ok := structType.(AccessControlDataRequestToExit); ok { return casted } if casted, ok := structType.(*AccessControlDataRequestToExit); ok { @@ -96,6 +100,7 @@ func (m *_AccessControlDataRequestToExit) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_AccessControlDataRequestToExit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -119,7 +124,8 @@ func AccessControlDataRequestToExitParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_AccessControlDataRequestToExit{ - _AccessControlData: &_AccessControlData{}, + _AccessControlData: &_AccessControlData{ + }, } _child._AccessControlData._AccessControlDataChildRequirements = _child return _child, nil @@ -149,6 +155,7 @@ func (m *_AccessControlDataRequestToExit) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AccessControlDataRequestToExit) isAccessControlDataRequestToExit() bool { return true } @@ -163,3 +170,6 @@ func (m *_AccessControlDataRequestToExit) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/AccessControlDataValidAccessRequest.go b/plc4go/protocols/cbus/readwrite/model/AccessControlDataValidAccessRequest.go index e5a1080b800..3ceaca72429 100644 --- a/plc4go/protocols/cbus/readwrite/model/AccessControlDataValidAccessRequest.go +++ b/plc4go/protocols/cbus/readwrite/model/AccessControlDataValidAccessRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AccessControlDataValidAccessRequest is the corresponding interface of AccessControlDataValidAccessRequest type AccessControlDataValidAccessRequest interface { @@ -48,10 +50,12 @@ type AccessControlDataValidAccessRequestExactly interface { // _AccessControlDataValidAccessRequest is the data-structure of this message type _AccessControlDataValidAccessRequest struct { *_AccessControlData - AccessControlDirection AccessControlDirection - Data []byte + AccessControlDirection AccessControlDirection + Data []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -62,16 +66,14 @@ type _AccessControlDataValidAccessRequest struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AccessControlDataValidAccessRequest) InitializeParent(parent AccessControlData, commandTypeContainer AccessControlCommandTypeContainer, networkId byte, accessPointId byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_AccessControlDataValidAccessRequest) InitializeParent(parent AccessControlData , commandTypeContainer AccessControlCommandTypeContainer , networkId byte , accessPointId byte ) { m.CommandTypeContainer = commandTypeContainer m.NetworkId = networkId m.AccessPointId = accessPointId } -func (m *_AccessControlDataValidAccessRequest) GetParent() AccessControlData { +func (m *_AccessControlDataValidAccessRequest) GetParent() AccessControlData { return m._AccessControlData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_AccessControlDataValidAccessRequest) GetData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAccessControlDataValidAccessRequest factory function for _AccessControlDataValidAccessRequest -func NewAccessControlDataValidAccessRequest(accessControlDirection AccessControlDirection, data []byte, commandTypeContainer AccessControlCommandTypeContainer, networkId byte, accessPointId byte) *_AccessControlDataValidAccessRequest { +func NewAccessControlDataValidAccessRequest( accessControlDirection AccessControlDirection , data []byte , commandTypeContainer AccessControlCommandTypeContainer , networkId byte , accessPointId byte ) *_AccessControlDataValidAccessRequest { _result := &_AccessControlDataValidAccessRequest{ AccessControlDirection: accessControlDirection, - Data: data, - _AccessControlData: NewAccessControlData(commandTypeContainer, networkId, accessPointId), + Data: data, + _AccessControlData: NewAccessControlData(commandTypeContainer, networkId, accessPointId), } _result._AccessControlData._AccessControlDataChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewAccessControlDataValidAccessRequest(accessControlDirection AccessControl // Deprecated: use the interface for direct cast func CastAccessControlDataValidAccessRequest(structType interface{}) AccessControlDataValidAccessRequest { - if casted, ok := structType.(AccessControlDataValidAccessRequest); ok { + if casted, ok := structType.(AccessControlDataValidAccessRequest); ok { return casted } if casted, ok := structType.(*AccessControlDataValidAccessRequest); ok { @@ -130,6 +133,7 @@ func (m *_AccessControlDataValidAccessRequest) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_AccessControlDataValidAccessRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,7 +155,7 @@ func AccessControlDataValidAccessRequestParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("accessControlDirection"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for accessControlDirection") } - _accessControlDirection, _accessControlDirectionErr := AccessControlDirectionParseWithBuffer(ctx, readBuffer) +_accessControlDirection, _accessControlDirectionErr := AccessControlDirectionParseWithBuffer(ctx, readBuffer) if _accessControlDirectionErr != nil { return nil, errors.Wrap(_accessControlDirectionErr, "Error parsing 'accessControlDirection' field of AccessControlDataValidAccessRequest") } @@ -172,9 +176,10 @@ func AccessControlDataValidAccessRequestParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_AccessControlDataValidAccessRequest{ - _AccessControlData: &_AccessControlData{}, + _AccessControlData: &_AccessControlData{ + }, AccessControlDirection: accessControlDirection, - Data: data, + Data: data, } _child._AccessControlData._AccessControlDataChildRequirements = _child return _child, nil @@ -196,23 +201,23 @@ func (m *_AccessControlDataValidAccessRequest) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for AccessControlDataValidAccessRequest") } - // Simple Field (accessControlDirection) - if pushErr := writeBuffer.PushContext("accessControlDirection"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for accessControlDirection") - } - _accessControlDirectionErr := writeBuffer.WriteSerializable(ctx, m.GetAccessControlDirection()) - if popErr := writeBuffer.PopContext("accessControlDirection"); popErr != nil { - return errors.Wrap(popErr, "Error popping for accessControlDirection") - } - if _accessControlDirectionErr != nil { - return errors.Wrap(_accessControlDirectionErr, "Error serializing 'accessControlDirection' field") - } + // Simple Field (accessControlDirection) + if pushErr := writeBuffer.PushContext("accessControlDirection"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for accessControlDirection") + } + _accessControlDirectionErr := writeBuffer.WriteSerializable(ctx, m.GetAccessControlDirection()) + if popErr := writeBuffer.PopContext("accessControlDirection"); popErr != nil { + return errors.Wrap(popErr, "Error popping for accessControlDirection") + } + if _accessControlDirectionErr != nil { + return errors.Wrap(_accessControlDirectionErr, "Error serializing 'accessControlDirection' field") + } - // Array Field (data) - // Byte Array field (data) - if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { - return errors.Wrap(err, "Error serializing 'data' field") - } + // Array Field (data) + // Byte Array field (data) + if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { + return errors.Wrap(err, "Error serializing 'data' field") + } if popErr := writeBuffer.PopContext("AccessControlDataValidAccessRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for AccessControlDataValidAccessRequest") @@ -222,6 +227,7 @@ func (m *_AccessControlDataValidAccessRequest) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AccessControlDataValidAccessRequest) isAccessControlDataValidAccessRequest() bool { return true } @@ -236,3 +242,6 @@ func (m *_AccessControlDataValidAccessRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/AccessControlDirection.go b/plc4go/protocols/cbus/readwrite/model/AccessControlDirection.go index 75f4f896969..3ea59508894 100644 --- a/plc4go/protocols/cbus/readwrite/model/AccessControlDirection.go +++ b/plc4go/protocols/cbus/readwrite/model/AccessControlDirection.go @@ -34,17 +34,17 @@ type IAccessControlDirection interface { utils.Serializable } -const ( +const( AccessControlDirection_NOT_USED AccessControlDirection = 0x00 - AccessControlDirection_IN AccessControlDirection = 0x01 - AccessControlDirection_OUT AccessControlDirection = 0x02 + AccessControlDirection_IN AccessControlDirection = 0x01 + AccessControlDirection_OUT AccessControlDirection = 0x02 ) var AccessControlDirectionValues []AccessControlDirection func init() { _ = errors.New - AccessControlDirectionValues = []AccessControlDirection{ + AccessControlDirectionValues = []AccessControlDirection { AccessControlDirection_NOT_USED, AccessControlDirection_IN, AccessControlDirection_OUT, @@ -53,12 +53,12 @@ func init() { func AccessControlDirectionByValue(value uint8) (enum AccessControlDirection, ok bool) { switch value { - case 0x00: - return AccessControlDirection_NOT_USED, true - case 0x01: - return AccessControlDirection_IN, true - case 0x02: - return AccessControlDirection_OUT, true + case 0x00: + return AccessControlDirection_NOT_USED, true + case 0x01: + return AccessControlDirection_IN, true + case 0x02: + return AccessControlDirection_OUT, true } return 0, false } @@ -75,13 +75,13 @@ func AccessControlDirectionByName(value string) (enum AccessControlDirection, ok return 0, false } -func AccessControlDirectionKnows(value uint8) bool { +func AccessControlDirectionKnows(value uint8) bool { for _, typeValue := range AccessControlDirectionValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastAccessControlDirection(structType interface{}) AccessControlDirection { @@ -147,3 +147,4 @@ func (e AccessControlDirection) PLC4XEnumName() string { func (e AccessControlDirection) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningCommandType.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningCommandType.go index 09442529314..19f817074ab 100644 --- a/plc4go/protocols/cbus/readwrite/model/AirConditioningCommandType.go +++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningCommandType.go @@ -35,33 +35,33 @@ type IAirConditioningCommandType interface { NumberOfArguments() uint8 } -const ( - AirConditioningCommandType_SET_ZONE_GROUP_OFF AirConditioningCommandType = 0x00 - AirConditioningCommandType_ZONE_HVAC_PLANT_STATUS AirConditioningCommandType = 0x01 - AirConditioningCommandType_ZONE_HUMIDITY_PLANT_STATUS AirConditioningCommandType = 0x02 - AirConditioningCommandType_ZONE_TEMPERATURE AirConditioningCommandType = 0x03 - AirConditioningCommandType_ZONE_HUMIDITY AirConditioningCommandType = 0x04 - AirConditioningCommandType_REFRESH AirConditioningCommandType = 0x05 - AirConditioningCommandType_SET_ZONE_HVAC_MODE AirConditioningCommandType = 0x06 - AirConditioningCommandType_SET_PLANT_HVAC_LEVEL AirConditioningCommandType = 0x07 - AirConditioningCommandType_SET_ZONE_HUMIDITY_MODE AirConditioningCommandType = 0x08 - AirConditioningCommandType_SET_PLANT_HUMIDITY_LEVEL AirConditioningCommandType = 0x09 - AirConditioningCommandType_SET_HVAC_UPPER_GUARD_LIMIT AirConditioningCommandType = 0x0A - AirConditioningCommandType_SET_HVAC_LOWER_GUARD_LIMIT AirConditioningCommandType = 0x0B - AirConditioningCommandType_SET_HVAC_SETBACK_LIMIT AirConditioningCommandType = 0x0C +const( + AirConditioningCommandType_SET_ZONE_GROUP_OFF AirConditioningCommandType = 0x00 + AirConditioningCommandType_ZONE_HVAC_PLANT_STATUS AirConditioningCommandType = 0x01 + AirConditioningCommandType_ZONE_HUMIDITY_PLANT_STATUS AirConditioningCommandType = 0x02 + AirConditioningCommandType_ZONE_TEMPERATURE AirConditioningCommandType = 0x03 + AirConditioningCommandType_ZONE_HUMIDITY AirConditioningCommandType = 0x04 + AirConditioningCommandType_REFRESH AirConditioningCommandType = 0x05 + AirConditioningCommandType_SET_ZONE_HVAC_MODE AirConditioningCommandType = 0x06 + AirConditioningCommandType_SET_PLANT_HVAC_LEVEL AirConditioningCommandType = 0x07 + AirConditioningCommandType_SET_ZONE_HUMIDITY_MODE AirConditioningCommandType = 0x08 + AirConditioningCommandType_SET_PLANT_HUMIDITY_LEVEL AirConditioningCommandType = 0x09 + AirConditioningCommandType_SET_HVAC_UPPER_GUARD_LIMIT AirConditioningCommandType = 0x0A + AirConditioningCommandType_SET_HVAC_LOWER_GUARD_LIMIT AirConditioningCommandType = 0x0B + AirConditioningCommandType_SET_HVAC_SETBACK_LIMIT AirConditioningCommandType = 0x0C AirConditioningCommandType_SET_HUMIDITY_UPPER_GUARD_LIMIT AirConditioningCommandType = 0x0D AirConditioningCommandType_SET_HUMIDITY_LOWER_GUARD_LIMIT AirConditioningCommandType = 0x0E - AirConditioningCommandType_SET_ZONE_GROUP_ON AirConditioningCommandType = 0x0F - AirConditioningCommandType_SET_HUMIDITY_SETBACK_LIMIT AirConditioningCommandType = 0x10 - AirConditioningCommandType_HVAC_SCHEDULE_ENTRY AirConditioningCommandType = 0x11 - AirConditioningCommandType_HUMIDITY_SCHEDULE_ENTRY AirConditioningCommandType = 0x12 + AirConditioningCommandType_SET_ZONE_GROUP_ON AirConditioningCommandType = 0x0F + AirConditioningCommandType_SET_HUMIDITY_SETBACK_LIMIT AirConditioningCommandType = 0x10 + AirConditioningCommandType_HVAC_SCHEDULE_ENTRY AirConditioningCommandType = 0x11 + AirConditioningCommandType_HUMIDITY_SCHEDULE_ENTRY AirConditioningCommandType = 0x12 ) var AirConditioningCommandTypeValues []AirConditioningCommandType func init() { _ = errors.New - AirConditioningCommandTypeValues = []AirConditioningCommandType{ + AirConditioningCommandTypeValues = []AirConditioningCommandType { AirConditioningCommandType_SET_ZONE_GROUP_OFF, AirConditioningCommandType_ZONE_HVAC_PLANT_STATUS, AirConditioningCommandType_ZONE_HUMIDITY_PLANT_STATUS, @@ -84,86 +84,67 @@ func init() { } } + func (e AirConditioningCommandType) NumberOfArguments() uint8 { - switch e { - case 0x00: - { /* '0x00' */ - return 0 + switch e { + case 0x00: { /* '0x00' */ + return 0 } - case 0x01: - { /* '0x01' */ - return 5 + case 0x01: { /* '0x01' */ + return 5 } - case 0x02: - { /* '0x02' */ - return 5 + case 0x02: { /* '0x02' */ + return 5 } - case 0x03: - { /* '0x03' */ - return 4 + case 0x03: { /* '0x03' */ + return 4 } - case 0x04: - { /* '0x04' */ - return 4 + case 0x04: { /* '0x04' */ + return 4 } - case 0x05: - { /* '0x05' */ - return 1 + case 0x05: { /* '0x05' */ + return 1 } - case 0x06: - { /* '0x06' */ - return 5 + case 0x06: { /* '0x06' */ + return 5 } - case 0x07: - { /* '0x07' */ - return 5 + case 0x07: { /* '0x07' */ + return 5 } - case 0x08: - { /* '0x08' */ - return 5 + case 0x08: { /* '0x08' */ + return 5 } - case 0x09: - { /* '0x09' */ - return 5 + case 0x09: { /* '0x09' */ + return 5 } - case 0x0A: - { /* '0x0A' */ - return 4 + case 0x0A: { /* '0x0A' */ + return 4 } - case 0x0B: - { /* '0x0B' */ - return 4 + case 0x0B: { /* '0x0B' */ + return 4 } - case 0x0C: - { /* '0x0C' */ - return 4 + case 0x0C: { /* '0x0C' */ + return 4 } - case 0x0D: - { /* '0x0D' */ - return 4 + case 0x0D: { /* '0x0D' */ + return 4 } - case 0x0E: - { /* '0x0E' */ - return 4 + case 0x0E: { /* '0x0E' */ + return 4 } - case 0x0F: - { /* '0x0F' */ - return 1 + case 0x0F: { /* '0x0F' */ + return 1 } - case 0x10: - { /* '0x10' */ - return 1 + case 0x10: { /* '0x10' */ + return 1 } - case 0x11: - { /* '0x11' */ - return 7 + case 0x11: { /* '0x11' */ + return 7 } - case 0x12: - { /* '0x12' */ - return 7 + case 0x12: { /* '0x12' */ + return 7 } - default: - { + default: { return 0 } } @@ -179,44 +160,44 @@ func AirConditioningCommandTypeFirstEnumForFieldNumberOfArguments(value uint8) ( } func AirConditioningCommandTypeByValue(value uint8) (enum AirConditioningCommandType, ok bool) { switch value { - case 0x00: - return AirConditioningCommandType_SET_ZONE_GROUP_OFF, true - case 0x01: - return AirConditioningCommandType_ZONE_HVAC_PLANT_STATUS, true - case 0x02: - return AirConditioningCommandType_ZONE_HUMIDITY_PLANT_STATUS, true - case 0x03: - return AirConditioningCommandType_ZONE_TEMPERATURE, true - case 0x04: - return AirConditioningCommandType_ZONE_HUMIDITY, true - case 0x05: - return AirConditioningCommandType_REFRESH, true - case 0x06: - return AirConditioningCommandType_SET_ZONE_HVAC_MODE, true - case 0x07: - return AirConditioningCommandType_SET_PLANT_HVAC_LEVEL, true - case 0x08: - return AirConditioningCommandType_SET_ZONE_HUMIDITY_MODE, true - case 0x09: - return AirConditioningCommandType_SET_PLANT_HUMIDITY_LEVEL, true - case 0x0A: - return AirConditioningCommandType_SET_HVAC_UPPER_GUARD_LIMIT, true - case 0x0B: - return AirConditioningCommandType_SET_HVAC_LOWER_GUARD_LIMIT, true - case 0x0C: - return AirConditioningCommandType_SET_HVAC_SETBACK_LIMIT, true - case 0x0D: - return AirConditioningCommandType_SET_HUMIDITY_UPPER_GUARD_LIMIT, true - case 0x0E: - return AirConditioningCommandType_SET_HUMIDITY_LOWER_GUARD_LIMIT, true - case 0x0F: - return AirConditioningCommandType_SET_ZONE_GROUP_ON, true - case 0x10: - return AirConditioningCommandType_SET_HUMIDITY_SETBACK_LIMIT, true - case 0x11: - return AirConditioningCommandType_HVAC_SCHEDULE_ENTRY, true - case 0x12: - return AirConditioningCommandType_HUMIDITY_SCHEDULE_ENTRY, true + case 0x00: + return AirConditioningCommandType_SET_ZONE_GROUP_OFF, true + case 0x01: + return AirConditioningCommandType_ZONE_HVAC_PLANT_STATUS, true + case 0x02: + return AirConditioningCommandType_ZONE_HUMIDITY_PLANT_STATUS, true + case 0x03: + return AirConditioningCommandType_ZONE_TEMPERATURE, true + case 0x04: + return AirConditioningCommandType_ZONE_HUMIDITY, true + case 0x05: + return AirConditioningCommandType_REFRESH, true + case 0x06: + return AirConditioningCommandType_SET_ZONE_HVAC_MODE, true + case 0x07: + return AirConditioningCommandType_SET_PLANT_HVAC_LEVEL, true + case 0x08: + return AirConditioningCommandType_SET_ZONE_HUMIDITY_MODE, true + case 0x09: + return AirConditioningCommandType_SET_PLANT_HUMIDITY_LEVEL, true + case 0x0A: + return AirConditioningCommandType_SET_HVAC_UPPER_GUARD_LIMIT, true + case 0x0B: + return AirConditioningCommandType_SET_HVAC_LOWER_GUARD_LIMIT, true + case 0x0C: + return AirConditioningCommandType_SET_HVAC_SETBACK_LIMIT, true + case 0x0D: + return AirConditioningCommandType_SET_HUMIDITY_UPPER_GUARD_LIMIT, true + case 0x0E: + return AirConditioningCommandType_SET_HUMIDITY_LOWER_GUARD_LIMIT, true + case 0x0F: + return AirConditioningCommandType_SET_ZONE_GROUP_ON, true + case 0x10: + return AirConditioningCommandType_SET_HUMIDITY_SETBACK_LIMIT, true + case 0x11: + return AirConditioningCommandType_HVAC_SCHEDULE_ENTRY, true + case 0x12: + return AirConditioningCommandType_HUMIDITY_SCHEDULE_ENTRY, true } return 0, false } @@ -265,13 +246,13 @@ func AirConditioningCommandTypeByName(value string) (enum AirConditioningCommand return 0, false } -func AirConditioningCommandTypeKnows(value uint8) bool { +func AirConditioningCommandTypeKnows(value uint8) bool { for _, typeValue := range AirConditioningCommandTypeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastAirConditioningCommandType(structType interface{}) AirConditioningCommandType { @@ -369,3 +350,4 @@ func (e AirConditioningCommandType) PLC4XEnumName() string { func (e AirConditioningCommandType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningCommandTypeContainer.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningCommandTypeContainer.go index d2fa6645ba2..13aab9a02df 100644 --- a/plc4go/protocols/cbus/readwrite/model/AirConditioningCommandTypeContainer.go +++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningCommandTypeContainer.go @@ -36,33 +36,33 @@ type IAirConditioningCommandTypeContainer interface { CommandType() AirConditioningCommandType } -const ( - AirConditioningCommandTypeContainer_AirConditioningCommandSetZoneGroupOff AirConditioningCommandTypeContainer = 0x01 - AirConditioningCommandTypeContainer_AirConditioningCommandZoneHvacPlantStatus AirConditioningCommandTypeContainer = 0x05 - AirConditioningCommandTypeContainer_AirConditioningCommandZoneHumidityPlantStatus AirConditioningCommandTypeContainer = 0x0D - AirConditioningCommandTypeContainer_AirConditioningCommandZoneTemperature AirConditioningCommandTypeContainer = 0x15 - AirConditioningCommandTypeContainer_AirConditioningCommandZoneHumidity AirConditioningCommandTypeContainer = 0x1D - AirConditioningCommandTypeContainer_AirConditioningCommandRefresh AirConditioningCommandTypeContainer = 0x21 - AirConditioningCommandTypeContainer_AirConditioningCommandSetZoneHvacMode AirConditioningCommandTypeContainer = 0x2F - AirConditioningCommandTypeContainer_AirConditioningCommandSetPlantHvacLevel AirConditioningCommandTypeContainer = 0x36 - AirConditioningCommandTypeContainer_AirConditioningCommandSetZoneHumidityMode AirConditioningCommandTypeContainer = 0x47 - AirConditioningCommandTypeContainer_AirConditioningCommandSetPlantHumidityLevel AirConditioningCommandTypeContainer = 0x4E - AirConditioningCommandTypeContainer_AirConditioningCommandSetHvacUpperGuardLimit AirConditioningCommandTypeContainer = 0x55 - AirConditioningCommandTypeContainer_AirConditioningCommandSetHvacLowerGuardLimit AirConditioningCommandTypeContainer = 0x5D - AirConditioningCommandTypeContainer_AirConditioningCommandSetHvacSetbackLimit AirConditioningCommandTypeContainer = 0x65 +const( + AirConditioningCommandTypeContainer_AirConditioningCommandSetZoneGroupOff AirConditioningCommandTypeContainer = 0x01 + AirConditioningCommandTypeContainer_AirConditioningCommandZoneHvacPlantStatus AirConditioningCommandTypeContainer = 0x05 + AirConditioningCommandTypeContainer_AirConditioningCommandZoneHumidityPlantStatus AirConditioningCommandTypeContainer = 0x0D + AirConditioningCommandTypeContainer_AirConditioningCommandZoneTemperature AirConditioningCommandTypeContainer = 0x15 + AirConditioningCommandTypeContainer_AirConditioningCommandZoneHumidity AirConditioningCommandTypeContainer = 0x1D + AirConditioningCommandTypeContainer_AirConditioningCommandRefresh AirConditioningCommandTypeContainer = 0x21 + AirConditioningCommandTypeContainer_AirConditioningCommandSetZoneHvacMode AirConditioningCommandTypeContainer = 0x2F + AirConditioningCommandTypeContainer_AirConditioningCommandSetPlantHvacLevel AirConditioningCommandTypeContainer = 0x36 + AirConditioningCommandTypeContainer_AirConditioningCommandSetZoneHumidityMode AirConditioningCommandTypeContainer = 0x47 + AirConditioningCommandTypeContainer_AirConditioningCommandSetPlantHumidityLevel AirConditioningCommandTypeContainer = 0x4E + AirConditioningCommandTypeContainer_AirConditioningCommandSetHvacUpperGuardLimit AirConditioningCommandTypeContainer = 0x55 + AirConditioningCommandTypeContainer_AirConditioningCommandSetHvacLowerGuardLimit AirConditioningCommandTypeContainer = 0x5D + AirConditioningCommandTypeContainer_AirConditioningCommandSetHvacSetbackLimit AirConditioningCommandTypeContainer = 0x65 AirConditioningCommandTypeContainer_AirConditioningCommandSetHumidityUpperGuardLimit AirConditioningCommandTypeContainer = 0x6D AirConditioningCommandTypeContainer_AirConditioningCommandSetHumidityLowerGuardLimit AirConditioningCommandTypeContainer = 0x75 - AirConditioningCommandTypeContainer_AirConditioningCommandSetZoneGroupOn AirConditioningCommandTypeContainer = 0x79 - AirConditioningCommandTypeContainer_AirConditioningCommandSetHumiditySetbackLimit AirConditioningCommandTypeContainer = 0x7D - AirConditioningCommandTypeContainer_AirConditioningCommandHvacScheduleEntry AirConditioningCommandTypeContainer = 0x89 - AirConditioningCommandTypeContainer_AirConditioningCommandHumidityScheduleEntry AirConditioningCommandTypeContainer = 0xA9 + AirConditioningCommandTypeContainer_AirConditioningCommandSetZoneGroupOn AirConditioningCommandTypeContainer = 0x79 + AirConditioningCommandTypeContainer_AirConditioningCommandSetHumiditySetbackLimit AirConditioningCommandTypeContainer = 0x7D + AirConditioningCommandTypeContainer_AirConditioningCommandHvacScheduleEntry AirConditioningCommandTypeContainer = 0x89 + AirConditioningCommandTypeContainer_AirConditioningCommandHumidityScheduleEntry AirConditioningCommandTypeContainer = 0xA9 ) var AirConditioningCommandTypeContainerValues []AirConditioningCommandTypeContainer func init() { _ = errors.New - AirConditioningCommandTypeContainerValues = []AirConditioningCommandTypeContainer{ + AirConditioningCommandTypeContainerValues = []AirConditioningCommandTypeContainer { AirConditioningCommandTypeContainer_AirConditioningCommandSetZoneGroupOff, AirConditioningCommandTypeContainer_AirConditioningCommandZoneHvacPlantStatus, AirConditioningCommandTypeContainer_AirConditioningCommandZoneHumidityPlantStatus, @@ -85,86 +85,67 @@ func init() { } } + func (e AirConditioningCommandTypeContainer) NumBytes() uint8 { - switch e { - case 0x01: - { /* '0x01' */ - return 1 + switch e { + case 0x01: { /* '0x01' */ + return 1 } - case 0x05: - { /* '0x05' */ - return 5 + case 0x05: { /* '0x05' */ + return 5 } - case 0x0D: - { /* '0x0D' */ - return 5 + case 0x0D: { /* '0x0D' */ + return 5 } - case 0x15: - { /* '0x15' */ - return 5 + case 0x15: { /* '0x15' */ + return 5 } - case 0x1D: - { /* '0x1D' */ - return 5 + case 0x1D: { /* '0x1D' */ + return 5 } - case 0x21: - { /* '0x21' */ - return 1 + case 0x21: { /* '0x21' */ + return 1 } - case 0x2F: - { /* '0x2F' */ - return 7 + case 0x2F: { /* '0x2F' */ + return 7 } - case 0x36: - { /* '0x36' */ - return 6 + case 0x36: { /* '0x36' */ + return 6 } - case 0x47: - { /* '0x47' */ - return 7 + case 0x47: { /* '0x47' */ + return 7 } - case 0x4E: - { /* '0x4E' */ - return 6 + case 0x4E: { /* '0x4E' */ + return 6 } - case 0x55: - { /* '0x55' */ - return 5 + case 0x55: { /* '0x55' */ + return 5 } - case 0x5D: - { /* '0x5D' */ - return 5 + case 0x5D: { /* '0x5D' */ + return 5 } - case 0x65: - { /* '0x65' */ - return 5 + case 0x65: { /* '0x65' */ + return 5 } - case 0x6D: - { /* '0x6D' */ - return 5 + case 0x6D: { /* '0x6D' */ + return 5 } - case 0x75: - { /* '0x75' */ - return 5 + case 0x75: { /* '0x75' */ + return 5 } - case 0x79: - { /* '0x79' */ - return 1 + case 0x79: { /* '0x79' */ + return 1 } - case 0x7D: - { /* '0x7D' */ - return 5 + case 0x7D: { /* '0x7D' */ + return 5 } - case 0x89: - { /* '0x89' */ - return 9 + case 0x89: { /* '0x89' */ + return 9 } - case 0xA9: - { /* '0xA9' */ - return 9 + case 0xA9: { /* '0xA9' */ + return 9 } - default: - { + default: { return 0 } } @@ -180,85 +161,65 @@ func AirConditioningCommandTypeContainerFirstEnumForFieldNumBytes(value uint8) ( } func (e AirConditioningCommandTypeContainer) CommandType() AirConditioningCommandType { - switch e { - case 0x01: - { /* '0x01' */ + switch e { + case 0x01: { /* '0x01' */ return AirConditioningCommandType_SET_ZONE_GROUP_OFF } - case 0x05: - { /* '0x05' */ + case 0x05: { /* '0x05' */ return AirConditioningCommandType_ZONE_HVAC_PLANT_STATUS } - case 0x0D: - { /* '0x0D' */ + case 0x0D: { /* '0x0D' */ return AirConditioningCommandType_ZONE_HUMIDITY_PLANT_STATUS } - case 0x15: - { /* '0x15' */ + case 0x15: { /* '0x15' */ return AirConditioningCommandType_ZONE_TEMPERATURE } - case 0x1D: - { /* '0x1D' */ + case 0x1D: { /* '0x1D' */ return AirConditioningCommandType_ZONE_HUMIDITY } - case 0x21: - { /* '0x21' */ + case 0x21: { /* '0x21' */ return AirConditioningCommandType_REFRESH } - case 0x2F: - { /* '0x2F' */ + case 0x2F: { /* '0x2F' */ return AirConditioningCommandType_SET_ZONE_HVAC_MODE } - case 0x36: - { /* '0x36' */ + case 0x36: { /* '0x36' */ return AirConditioningCommandType_SET_PLANT_HVAC_LEVEL } - case 0x47: - { /* '0x47' */ + case 0x47: { /* '0x47' */ return AirConditioningCommandType_SET_ZONE_HUMIDITY_MODE } - case 0x4E: - { /* '0x4E' */ + case 0x4E: { /* '0x4E' */ return AirConditioningCommandType_SET_PLANT_HUMIDITY_LEVEL } - case 0x55: - { /* '0x55' */ + case 0x55: { /* '0x55' */ return AirConditioningCommandType_SET_HVAC_UPPER_GUARD_LIMIT } - case 0x5D: - { /* '0x5D' */ + case 0x5D: { /* '0x5D' */ return AirConditioningCommandType_SET_HVAC_LOWER_GUARD_LIMIT } - case 0x65: - { /* '0x65' */ + case 0x65: { /* '0x65' */ return AirConditioningCommandType_SET_HVAC_SETBACK_LIMIT } - case 0x6D: - { /* '0x6D' */ + case 0x6D: { /* '0x6D' */ return AirConditioningCommandType_SET_HUMIDITY_UPPER_GUARD_LIMIT } - case 0x75: - { /* '0x75' */ + case 0x75: { /* '0x75' */ return AirConditioningCommandType_SET_HUMIDITY_LOWER_GUARD_LIMIT } - case 0x79: - { /* '0x79' */ + case 0x79: { /* '0x79' */ return AirConditioningCommandType_SET_ZONE_GROUP_ON } - case 0x7D: - { /* '0x7D' */ + case 0x7D: { /* '0x7D' */ return AirConditioningCommandType_SET_HUMIDITY_SETBACK_LIMIT } - case 0x89: - { /* '0x89' */ + case 0x89: { /* '0x89' */ return AirConditioningCommandType_HVAC_SCHEDULE_ENTRY } - case 0xA9: - { /* '0xA9' */ + case 0xA9: { /* '0xA9' */ return AirConditioningCommandType_HUMIDITY_SCHEDULE_ENTRY } - default: - { + default: { return 0 } } @@ -274,44 +235,44 @@ func AirConditioningCommandTypeContainerFirstEnumForFieldCommandType(value AirCo } func AirConditioningCommandTypeContainerByValue(value uint8) (enum AirConditioningCommandTypeContainer, ok bool) { switch value { - case 0x01: - return AirConditioningCommandTypeContainer_AirConditioningCommandSetZoneGroupOff, true - case 0x05: - return AirConditioningCommandTypeContainer_AirConditioningCommandZoneHvacPlantStatus, true - case 0x0D: - return AirConditioningCommandTypeContainer_AirConditioningCommandZoneHumidityPlantStatus, true - case 0x15: - return AirConditioningCommandTypeContainer_AirConditioningCommandZoneTemperature, true - case 0x1D: - return AirConditioningCommandTypeContainer_AirConditioningCommandZoneHumidity, true - case 0x21: - return AirConditioningCommandTypeContainer_AirConditioningCommandRefresh, true - case 0x2F: - return AirConditioningCommandTypeContainer_AirConditioningCommandSetZoneHvacMode, true - case 0x36: - return AirConditioningCommandTypeContainer_AirConditioningCommandSetPlantHvacLevel, true - case 0x47: - return AirConditioningCommandTypeContainer_AirConditioningCommandSetZoneHumidityMode, true - case 0x4E: - return AirConditioningCommandTypeContainer_AirConditioningCommandSetPlantHumidityLevel, true - case 0x55: - return AirConditioningCommandTypeContainer_AirConditioningCommandSetHvacUpperGuardLimit, true - case 0x5D: - return AirConditioningCommandTypeContainer_AirConditioningCommandSetHvacLowerGuardLimit, true - case 0x65: - return AirConditioningCommandTypeContainer_AirConditioningCommandSetHvacSetbackLimit, true - case 0x6D: - return AirConditioningCommandTypeContainer_AirConditioningCommandSetHumidityUpperGuardLimit, true - case 0x75: - return AirConditioningCommandTypeContainer_AirConditioningCommandSetHumidityLowerGuardLimit, true - case 0x79: - return AirConditioningCommandTypeContainer_AirConditioningCommandSetZoneGroupOn, true - case 0x7D: - return AirConditioningCommandTypeContainer_AirConditioningCommandSetHumiditySetbackLimit, true - case 0x89: - return AirConditioningCommandTypeContainer_AirConditioningCommandHvacScheduleEntry, true - case 0xA9: - return AirConditioningCommandTypeContainer_AirConditioningCommandHumidityScheduleEntry, true + case 0x01: + return AirConditioningCommandTypeContainer_AirConditioningCommandSetZoneGroupOff, true + case 0x05: + return AirConditioningCommandTypeContainer_AirConditioningCommandZoneHvacPlantStatus, true + case 0x0D: + return AirConditioningCommandTypeContainer_AirConditioningCommandZoneHumidityPlantStatus, true + case 0x15: + return AirConditioningCommandTypeContainer_AirConditioningCommandZoneTemperature, true + case 0x1D: + return AirConditioningCommandTypeContainer_AirConditioningCommandZoneHumidity, true + case 0x21: + return AirConditioningCommandTypeContainer_AirConditioningCommandRefresh, true + case 0x2F: + return AirConditioningCommandTypeContainer_AirConditioningCommandSetZoneHvacMode, true + case 0x36: + return AirConditioningCommandTypeContainer_AirConditioningCommandSetPlantHvacLevel, true + case 0x47: + return AirConditioningCommandTypeContainer_AirConditioningCommandSetZoneHumidityMode, true + case 0x4E: + return AirConditioningCommandTypeContainer_AirConditioningCommandSetPlantHumidityLevel, true + case 0x55: + return AirConditioningCommandTypeContainer_AirConditioningCommandSetHvacUpperGuardLimit, true + case 0x5D: + return AirConditioningCommandTypeContainer_AirConditioningCommandSetHvacLowerGuardLimit, true + case 0x65: + return AirConditioningCommandTypeContainer_AirConditioningCommandSetHvacSetbackLimit, true + case 0x6D: + return AirConditioningCommandTypeContainer_AirConditioningCommandSetHumidityUpperGuardLimit, true + case 0x75: + return AirConditioningCommandTypeContainer_AirConditioningCommandSetHumidityLowerGuardLimit, true + case 0x79: + return AirConditioningCommandTypeContainer_AirConditioningCommandSetZoneGroupOn, true + case 0x7D: + return AirConditioningCommandTypeContainer_AirConditioningCommandSetHumiditySetbackLimit, true + case 0x89: + return AirConditioningCommandTypeContainer_AirConditioningCommandHvacScheduleEntry, true + case 0xA9: + return AirConditioningCommandTypeContainer_AirConditioningCommandHumidityScheduleEntry, true } return 0, false } @@ -360,13 +321,13 @@ func AirConditioningCommandTypeContainerByName(value string) (enum AirConditioni return 0, false } -func AirConditioningCommandTypeContainerKnows(value uint8) bool { +func AirConditioningCommandTypeContainerKnows(value uint8) bool { for _, typeValue := range AirConditioningCommandTypeContainerValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastAirConditioningCommandTypeContainer(structType interface{}) AirConditioningCommandTypeContainer { @@ -464,3 +425,4 @@ func (e AirConditioningCommandTypeContainer) PLC4XEnumName() string { func (e AirConditioningCommandTypeContainer) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningData.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningData.go index cc223cb5bae..9ef6ebe4351 100644 --- a/plc4go/protocols/cbus/readwrite/model/AirConditioningData.go +++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningData.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AirConditioningData is the corresponding interface of AirConditioningData type AirConditioningData interface { @@ -47,7 +49,7 @@ type AirConditioningDataExactly interface { // _AirConditioningData is the data-structure of this message type _AirConditioningData struct { _AirConditioningDataChildRequirements - CommandTypeContainer AirConditioningCommandTypeContainer + CommandTypeContainer AirConditioningCommandTypeContainer } type _AirConditioningDataChildRequirements interface { @@ -55,6 +57,7 @@ type _AirConditioningDataChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type AirConditioningDataParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child AirConditioningData, serializeChildFunction func() error) error GetTypeName() string @@ -62,13 +65,12 @@ type AirConditioningDataParent interface { type AirConditioningDataChild interface { utils.Serializable - InitializeParent(parent AirConditioningData, commandTypeContainer AirConditioningCommandTypeContainer) +InitializeParent(parent AirConditioningData , commandTypeContainer AirConditioningCommandTypeContainer ) GetParent() *AirConditioningData GetTypeName() string AirConditioningData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,14 +100,15 @@ func (m *_AirConditioningData) GetCommandType() AirConditioningCommandType { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAirConditioningData factory function for _AirConditioningData -func NewAirConditioningData(commandTypeContainer AirConditioningCommandTypeContainer) *_AirConditioningData { - return &_AirConditioningData{CommandTypeContainer: commandTypeContainer} +func NewAirConditioningData( commandTypeContainer AirConditioningCommandTypeContainer ) *_AirConditioningData { +return &_AirConditioningData{ CommandTypeContainer: commandTypeContainer } } // Deprecated: use the interface for direct cast func CastAirConditioningData(structType interface{}) AirConditioningData { - if casted, ok := structType.(AirConditioningData); ok { + if casted, ok := structType.(AirConditioningData); ok { return casted } if casted, ok := structType.(*AirConditioningData); ok { @@ -118,6 +121,7 @@ func (m *_AirConditioningData) GetTypeName() string { return "AirConditioningData" } + func (m *_AirConditioningData) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -147,7 +151,7 @@ func AirConditioningDataParseWithBuffer(ctx context.Context, readBuffer utils.Re _ = currentPos // Validation - if !(KnowsAirConditioningCommandTypeContainer(readBuffer)) { + if (!(KnowsAirConditioningCommandTypeContainer(readBuffer))) { return nil, errors.WithStack(utils.ParseAssertError{"no command type could be found"}) } @@ -155,7 +159,7 @@ func AirConditioningDataParseWithBuffer(ctx context.Context, readBuffer utils.Re if pullErr := readBuffer.PullContext("commandTypeContainer"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for commandTypeContainer") } - _commandTypeContainer, _commandTypeContainerErr := AirConditioningCommandTypeContainerParseWithBuffer(ctx, readBuffer) +_commandTypeContainer, _commandTypeContainerErr := AirConditioningCommandTypeContainerParseWithBuffer(ctx, readBuffer) if _commandTypeContainerErr != nil { return nil, errors.Wrap(_commandTypeContainerErr, "Error parsing 'commandTypeContainer' field of AirConditioningData") } @@ -172,51 +176,51 @@ func AirConditioningDataParseWithBuffer(ctx context.Context, readBuffer utils.Re // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type AirConditioningDataChildSerializeRequirement interface { AirConditioningData - InitializeParent(AirConditioningData, AirConditioningCommandTypeContainer) + InitializeParent(AirConditioningData, AirConditioningCommandTypeContainer) GetParent() AirConditioningData } var _childTemp interface{} var _child AirConditioningDataChildSerializeRequirement var typeSwitchError error switch { - case commandType == AirConditioningCommandType_HVAC_SCHEDULE_ENTRY: // AirConditioningDataHvacScheduleEntry - _childTemp, typeSwitchError = AirConditioningDataHvacScheduleEntryParseWithBuffer(ctx, readBuffer) - case commandType == AirConditioningCommandType_HUMIDITY_SCHEDULE_ENTRY: // AirConditioningDataHumidityScheduleEntry - _childTemp, typeSwitchError = AirConditioningDataHumidityScheduleEntryParseWithBuffer(ctx, readBuffer) - case commandType == AirConditioningCommandType_REFRESH: // AirConditioningDataRefresh - _childTemp, typeSwitchError = AirConditioningDataRefreshParseWithBuffer(ctx, readBuffer) - case commandType == AirConditioningCommandType_ZONE_HVAC_PLANT_STATUS: // AirConditioningDataZoneHvacPlantStatus - _childTemp, typeSwitchError = AirConditioningDataZoneHvacPlantStatusParseWithBuffer(ctx, readBuffer) - case commandType == AirConditioningCommandType_ZONE_HUMIDITY_PLANT_STATUS: // AirConditioningDataZoneHumidityPlantStatus - _childTemp, typeSwitchError = AirConditioningDataZoneHumidityPlantStatusParseWithBuffer(ctx, readBuffer) - case commandType == AirConditioningCommandType_ZONE_TEMPERATURE: // AirConditioningDataZoneTemperature - _childTemp, typeSwitchError = AirConditioningDataZoneTemperatureParseWithBuffer(ctx, readBuffer) - case commandType == AirConditioningCommandType_ZONE_HUMIDITY: // AirConditioningDataZoneHumidity - _childTemp, typeSwitchError = AirConditioningDataZoneHumidityParseWithBuffer(ctx, readBuffer) - case commandType == AirConditioningCommandType_SET_ZONE_GROUP_OFF: // AirConditioningDataSetZoneGroupOff - _childTemp, typeSwitchError = AirConditioningDataSetZoneGroupOffParseWithBuffer(ctx, readBuffer) - case commandType == AirConditioningCommandType_SET_ZONE_GROUP_ON: // AirConditioningDataSetZoneGroupOn - _childTemp, typeSwitchError = AirConditioningDataSetZoneGroupOnParseWithBuffer(ctx, readBuffer) - case commandType == AirConditioningCommandType_SET_ZONE_HVAC_MODE: // AirConditioningDataSetZoneHvacMode - _childTemp, typeSwitchError = AirConditioningDataSetZoneHvacModeParseWithBuffer(ctx, readBuffer) - case commandType == AirConditioningCommandType_SET_PLANT_HVAC_LEVEL: // AirConditioningDataSetPlantHvacLevel - _childTemp, typeSwitchError = AirConditioningDataSetPlantHvacLevelParseWithBuffer(ctx, readBuffer) - case commandType == AirConditioningCommandType_SET_ZONE_HUMIDITY_MODE: // AirConditioningDataSetZoneHumidityMode - _childTemp, typeSwitchError = AirConditioningDataSetZoneHumidityModeParseWithBuffer(ctx, readBuffer) - case commandType == AirConditioningCommandType_SET_PLANT_HUMIDITY_LEVEL: // AirConditioningDataSetPlantHumidityLevel - _childTemp, typeSwitchError = AirConditioningDataSetPlantHumidityLevelParseWithBuffer(ctx, readBuffer) - case commandType == AirConditioningCommandType_SET_HVAC_UPPER_GUARD_LIMIT: // AirConditioningDataSetHvacUpperGuardLimit - _childTemp, typeSwitchError = AirConditioningDataSetHvacUpperGuardLimitParseWithBuffer(ctx, readBuffer) - case commandType == AirConditioningCommandType_SET_HVAC_LOWER_GUARD_LIMIT: // AirConditioningDataSetHvacLowerGuardLimit - _childTemp, typeSwitchError = AirConditioningDataSetHvacLowerGuardLimitParseWithBuffer(ctx, readBuffer) - case commandType == AirConditioningCommandType_SET_HVAC_SETBACK_LIMIT: // AirConditioningDataSetHvacSetbackLimit - _childTemp, typeSwitchError = AirConditioningDataSetHvacSetbackLimitParseWithBuffer(ctx, readBuffer) - case commandType == AirConditioningCommandType_SET_HUMIDITY_UPPER_GUARD_LIMIT: // AirConditioningDataSetHumidityUpperGuardLimit - _childTemp, typeSwitchError = AirConditioningDataSetHumidityUpperGuardLimitParseWithBuffer(ctx, readBuffer) - case commandType == AirConditioningCommandType_SET_HUMIDITY_LOWER_GUARD_LIMIT: // AirConditioningDataSetHumidityLowerGuardLimit - _childTemp, typeSwitchError = AirConditioningDataSetHumidityLowerGuardLimitParseWithBuffer(ctx, readBuffer) - case commandType == AirConditioningCommandType_SET_HUMIDITY_SETBACK_LIMIT: // AirConditioningDataSetHumiditySetbackLimit - _childTemp, typeSwitchError = AirConditioningDataSetHumiditySetbackLimitParseWithBuffer(ctx, readBuffer) +case commandType == AirConditioningCommandType_HVAC_SCHEDULE_ENTRY : // AirConditioningDataHvacScheduleEntry + _childTemp, typeSwitchError = AirConditioningDataHvacScheduleEntryParseWithBuffer(ctx, readBuffer, ) +case commandType == AirConditioningCommandType_HUMIDITY_SCHEDULE_ENTRY : // AirConditioningDataHumidityScheduleEntry + _childTemp, typeSwitchError = AirConditioningDataHumidityScheduleEntryParseWithBuffer(ctx, readBuffer, ) +case commandType == AirConditioningCommandType_REFRESH : // AirConditioningDataRefresh + _childTemp, typeSwitchError = AirConditioningDataRefreshParseWithBuffer(ctx, readBuffer, ) +case commandType == AirConditioningCommandType_ZONE_HVAC_PLANT_STATUS : // AirConditioningDataZoneHvacPlantStatus + _childTemp, typeSwitchError = AirConditioningDataZoneHvacPlantStatusParseWithBuffer(ctx, readBuffer, ) +case commandType == AirConditioningCommandType_ZONE_HUMIDITY_PLANT_STATUS : // AirConditioningDataZoneHumidityPlantStatus + _childTemp, typeSwitchError = AirConditioningDataZoneHumidityPlantStatusParseWithBuffer(ctx, readBuffer, ) +case commandType == AirConditioningCommandType_ZONE_TEMPERATURE : // AirConditioningDataZoneTemperature + _childTemp, typeSwitchError = AirConditioningDataZoneTemperatureParseWithBuffer(ctx, readBuffer, ) +case commandType == AirConditioningCommandType_ZONE_HUMIDITY : // AirConditioningDataZoneHumidity + _childTemp, typeSwitchError = AirConditioningDataZoneHumidityParseWithBuffer(ctx, readBuffer, ) +case commandType == AirConditioningCommandType_SET_ZONE_GROUP_OFF : // AirConditioningDataSetZoneGroupOff + _childTemp, typeSwitchError = AirConditioningDataSetZoneGroupOffParseWithBuffer(ctx, readBuffer, ) +case commandType == AirConditioningCommandType_SET_ZONE_GROUP_ON : // AirConditioningDataSetZoneGroupOn + _childTemp, typeSwitchError = AirConditioningDataSetZoneGroupOnParseWithBuffer(ctx, readBuffer, ) +case commandType == AirConditioningCommandType_SET_ZONE_HVAC_MODE : // AirConditioningDataSetZoneHvacMode + _childTemp, typeSwitchError = AirConditioningDataSetZoneHvacModeParseWithBuffer(ctx, readBuffer, ) +case commandType == AirConditioningCommandType_SET_PLANT_HVAC_LEVEL : // AirConditioningDataSetPlantHvacLevel + _childTemp, typeSwitchError = AirConditioningDataSetPlantHvacLevelParseWithBuffer(ctx, readBuffer, ) +case commandType == AirConditioningCommandType_SET_ZONE_HUMIDITY_MODE : // AirConditioningDataSetZoneHumidityMode + _childTemp, typeSwitchError = AirConditioningDataSetZoneHumidityModeParseWithBuffer(ctx, readBuffer, ) +case commandType == AirConditioningCommandType_SET_PLANT_HUMIDITY_LEVEL : // AirConditioningDataSetPlantHumidityLevel + _childTemp, typeSwitchError = AirConditioningDataSetPlantHumidityLevelParseWithBuffer(ctx, readBuffer, ) +case commandType == AirConditioningCommandType_SET_HVAC_UPPER_GUARD_LIMIT : // AirConditioningDataSetHvacUpperGuardLimit + _childTemp, typeSwitchError = AirConditioningDataSetHvacUpperGuardLimitParseWithBuffer(ctx, readBuffer, ) +case commandType == AirConditioningCommandType_SET_HVAC_LOWER_GUARD_LIMIT : // AirConditioningDataSetHvacLowerGuardLimit + _childTemp, typeSwitchError = AirConditioningDataSetHvacLowerGuardLimitParseWithBuffer(ctx, readBuffer, ) +case commandType == AirConditioningCommandType_SET_HVAC_SETBACK_LIMIT : // AirConditioningDataSetHvacSetbackLimit + _childTemp, typeSwitchError = AirConditioningDataSetHvacSetbackLimitParseWithBuffer(ctx, readBuffer, ) +case commandType == AirConditioningCommandType_SET_HUMIDITY_UPPER_GUARD_LIMIT : // AirConditioningDataSetHumidityUpperGuardLimit + _childTemp, typeSwitchError = AirConditioningDataSetHumidityUpperGuardLimitParseWithBuffer(ctx, readBuffer, ) +case commandType == AirConditioningCommandType_SET_HUMIDITY_LOWER_GUARD_LIMIT : // AirConditioningDataSetHumidityLowerGuardLimit + _childTemp, typeSwitchError = AirConditioningDataSetHumidityLowerGuardLimitParseWithBuffer(ctx, readBuffer, ) +case commandType == AirConditioningCommandType_SET_HUMIDITY_SETBACK_LIMIT : // AirConditioningDataSetHumiditySetbackLimit + _childTemp, typeSwitchError = AirConditioningDataSetHumiditySetbackLimitParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [commandType=%v]", commandType) } @@ -230,7 +234,7 @@ func AirConditioningDataParseWithBuffer(ctx context.Context, readBuffer utils.Re } // Finish initializing - _child.InitializeParent(_child, commandTypeContainer) +_child.InitializeParent(_child , commandTypeContainer ) return _child, nil } @@ -240,7 +244,7 @@ func (pm *_AirConditioningData) SerializeParent(ctx context.Context, writeBuffer _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("AirConditioningData"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("AirConditioningData"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for AirConditioningData") } @@ -271,6 +275,7 @@ func (pm *_AirConditioningData) SerializeParent(ctx context.Context, writeBuffer return nil } + func (m *_AirConditioningData) isAirConditioningData() bool { return true } @@ -285,3 +290,6 @@ func (m *_AirConditioningData) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataHumidityScheduleEntry.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataHumidityScheduleEntry.go index ba61090cab8..97336378653 100644 --- a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataHumidityScheduleEntry.go +++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataHumidityScheduleEntry.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AirConditioningDataHumidityScheduleEntry is the corresponding interface of AirConditioningDataHumidityScheduleEntry type AirConditioningDataHumidityScheduleEntry interface { @@ -61,16 +63,18 @@ type AirConditioningDataHumidityScheduleEntryExactly interface { // _AirConditioningDataHumidityScheduleEntry is the data-structure of this message type _AirConditioningDataHumidityScheduleEntry struct { *_AirConditioningData - ZoneGroup byte - ZoneList HVACZoneList - Entry uint8 - Format byte - HumidityModeAndFlags HVACHumidityModeAndFlags - StartTime HVACStartTime - Level HVACHumidity - RawLevel HVACRawLevels + ZoneGroup byte + ZoneList HVACZoneList + Entry uint8 + Format byte + HumidityModeAndFlags HVACHumidityModeAndFlags + StartTime HVACStartTime + Level HVACHumidity + RawLevel HVACRawLevels } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -81,14 +85,12 @@ type _AirConditioningDataHumidityScheduleEntry struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AirConditioningDataHumidityScheduleEntry) InitializeParent(parent AirConditioningData, commandTypeContainer AirConditioningCommandTypeContainer) { - m.CommandTypeContainer = commandTypeContainer +func (m *_AirConditioningDataHumidityScheduleEntry) InitializeParent(parent AirConditioningData , commandTypeContainer AirConditioningCommandTypeContainer ) { m.CommandTypeContainer = commandTypeContainer } -func (m *_AirConditioningDataHumidityScheduleEntry) GetParent() AirConditioningData { +func (m *_AirConditioningDataHumidityScheduleEntry) GetParent() AirConditioningData { return m._AirConditioningData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -131,18 +133,19 @@ func (m *_AirConditioningDataHumidityScheduleEntry) GetRawLevel() HVACRawLevels /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAirConditioningDataHumidityScheduleEntry factory function for _AirConditioningDataHumidityScheduleEntry -func NewAirConditioningDataHumidityScheduleEntry(zoneGroup byte, zoneList HVACZoneList, entry uint8, format byte, humidityModeAndFlags HVACHumidityModeAndFlags, startTime HVACStartTime, level HVACHumidity, rawLevel HVACRawLevels, commandTypeContainer AirConditioningCommandTypeContainer) *_AirConditioningDataHumidityScheduleEntry { +func NewAirConditioningDataHumidityScheduleEntry( zoneGroup byte , zoneList HVACZoneList , entry uint8 , format byte , humidityModeAndFlags HVACHumidityModeAndFlags , startTime HVACStartTime , level HVACHumidity , rawLevel HVACRawLevels , commandTypeContainer AirConditioningCommandTypeContainer ) *_AirConditioningDataHumidityScheduleEntry { _result := &_AirConditioningDataHumidityScheduleEntry{ - ZoneGroup: zoneGroup, - ZoneList: zoneList, - Entry: entry, - Format: format, + ZoneGroup: zoneGroup, + ZoneList: zoneList, + Entry: entry, + Format: format, HumidityModeAndFlags: humidityModeAndFlags, - StartTime: startTime, - Level: level, - RawLevel: rawLevel, - _AirConditioningData: NewAirConditioningData(commandTypeContainer), + StartTime: startTime, + Level: level, + RawLevel: rawLevel, + _AirConditioningData: NewAirConditioningData(commandTypeContainer), } _result._AirConditioningData._AirConditioningDataChildRequirements = _result return _result @@ -150,7 +153,7 @@ func NewAirConditioningDataHumidityScheduleEntry(zoneGroup byte, zoneList HVACZo // Deprecated: use the interface for direct cast func CastAirConditioningDataHumidityScheduleEntry(structType interface{}) AirConditioningDataHumidityScheduleEntry { - if casted, ok := structType.(AirConditioningDataHumidityScheduleEntry); ok { + if casted, ok := structType.(AirConditioningDataHumidityScheduleEntry); ok { return casted } if casted, ok := structType.(*AirConditioningDataHumidityScheduleEntry); ok { @@ -167,16 +170,16 @@ func (m *_AirConditioningDataHumidityScheduleEntry) GetLengthInBits(ctx context. lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (zoneGroup) - lengthInBits += 8 + lengthInBits += 8; // Simple field (zoneList) lengthInBits += m.ZoneList.GetLengthInBits(ctx) // Simple field (entry) - lengthInBits += 8 + lengthInBits += 8; // Simple field (format) - lengthInBits += 8 + lengthInBits += 8; // Simple field (humidityModeAndFlags) lengthInBits += m.HumidityModeAndFlags.GetLengthInBits(ctx) @@ -197,6 +200,7 @@ func (m *_AirConditioningDataHumidityScheduleEntry) GetLengthInBits(ctx context. return lengthInBits } + func (m *_AirConditioningDataHumidityScheduleEntry) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -215,7 +219,7 @@ func AirConditioningDataHumidityScheduleEntryParseWithBuffer(ctx context.Context _ = currentPos // Simple Field (zoneGroup) - _zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup") +_zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup") if _zoneGroupErr != nil { return nil, errors.Wrap(_zoneGroupErr, "Error parsing 'zoneGroup' field of AirConditioningDataHumidityScheduleEntry") } @@ -225,7 +229,7 @@ func AirConditioningDataHumidityScheduleEntryParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("zoneList"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for zoneList") } - _zoneList, _zoneListErr := HVACZoneListParseWithBuffer(ctx, readBuffer) +_zoneList, _zoneListErr := HVACZoneListParseWithBuffer(ctx, readBuffer) if _zoneListErr != nil { return nil, errors.Wrap(_zoneListErr, "Error parsing 'zoneList' field of AirConditioningDataHumidityScheduleEntry") } @@ -235,14 +239,14 @@ func AirConditioningDataHumidityScheduleEntryParseWithBuffer(ctx context.Context } // Simple Field (entry) - _entry, _entryErr := readBuffer.ReadUint8("entry", 8) +_entry, _entryErr := readBuffer.ReadUint8("entry", 8) if _entryErr != nil { return nil, errors.Wrap(_entryErr, "Error parsing 'entry' field of AirConditioningDataHumidityScheduleEntry") } entry := _entry // Simple Field (format) - _format, _formatErr := readBuffer.ReadByte("format") +_format, _formatErr := readBuffer.ReadByte("format") if _formatErr != nil { return nil, errors.Wrap(_formatErr, "Error parsing 'format' field of AirConditioningDataHumidityScheduleEntry") } @@ -252,7 +256,7 @@ func AirConditioningDataHumidityScheduleEntryParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("humidityModeAndFlags"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for humidityModeAndFlags") } - _humidityModeAndFlags, _humidityModeAndFlagsErr := HVACHumidityModeAndFlagsParseWithBuffer(ctx, readBuffer) +_humidityModeAndFlags, _humidityModeAndFlagsErr := HVACHumidityModeAndFlagsParseWithBuffer(ctx, readBuffer) if _humidityModeAndFlagsErr != nil { return nil, errors.Wrap(_humidityModeAndFlagsErr, "Error parsing 'humidityModeAndFlags' field of AirConditioningDataHumidityScheduleEntry") } @@ -265,7 +269,7 @@ func AirConditioningDataHumidityScheduleEntryParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("startTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for startTime") } - _startTime, _startTimeErr := HVACStartTimeParseWithBuffer(ctx, readBuffer) +_startTime, _startTimeErr := HVACStartTimeParseWithBuffer(ctx, readBuffer) if _startTimeErr != nil { return nil, errors.Wrap(_startTimeErr, "Error parsing 'startTime' field of AirConditioningDataHumidityScheduleEntry") } @@ -281,7 +285,7 @@ func AirConditioningDataHumidityScheduleEntryParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("level"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for level") } - _val, _err := HVACHumidityParseWithBuffer(ctx, readBuffer) +_val, _err := HVACHumidityParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -303,7 +307,7 @@ func AirConditioningDataHumidityScheduleEntryParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("rawLevel"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for rawLevel") } - _val, _err := HVACRawLevelsParseWithBuffer(ctx, readBuffer) +_val, _err := HVACRawLevelsParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -324,15 +328,16 @@ func AirConditioningDataHumidityScheduleEntryParseWithBuffer(ctx context.Context // Create a partially initialized instance _child := &_AirConditioningDataHumidityScheduleEntry{ - _AirConditioningData: &_AirConditioningData{}, - ZoneGroup: zoneGroup, - ZoneList: zoneList, - Entry: entry, - Format: format, + _AirConditioningData: &_AirConditioningData{ + }, + ZoneGroup: zoneGroup, + ZoneList: zoneList, + Entry: entry, + Format: format, HumidityModeAndFlags: humidityModeAndFlags, - StartTime: startTime, - Level: level, - RawLevel: rawLevel, + StartTime: startTime, + Level: level, + RawLevel: rawLevel, } _child._AirConditioningData._AirConditioningDataChildRequirements = _child return _child, nil @@ -354,94 +359,94 @@ func (m *_AirConditioningDataHumidityScheduleEntry) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for AirConditioningDataHumidityScheduleEntry") } - // Simple Field (zoneGroup) - zoneGroup := byte(m.GetZoneGroup()) - _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup)) - if _zoneGroupErr != nil { - return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field") - } + // Simple Field (zoneGroup) + zoneGroup := byte(m.GetZoneGroup()) + _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup)) + if _zoneGroupErr != nil { + return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field") + } - // Simple Field (zoneList) - if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for zoneList") - } - _zoneListErr := writeBuffer.WriteSerializable(ctx, m.GetZoneList()) - if popErr := writeBuffer.PopContext("zoneList"); popErr != nil { - return errors.Wrap(popErr, "Error popping for zoneList") - } - if _zoneListErr != nil { - return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field") - } + // Simple Field (zoneList) + if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for zoneList") + } + _zoneListErr := writeBuffer.WriteSerializable(ctx, m.GetZoneList()) + if popErr := writeBuffer.PopContext("zoneList"); popErr != nil { + return errors.Wrap(popErr, "Error popping for zoneList") + } + if _zoneListErr != nil { + return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field") + } - // Simple Field (entry) - entry := uint8(m.GetEntry()) - _entryErr := writeBuffer.WriteUint8("entry", 8, (entry)) - if _entryErr != nil { - return errors.Wrap(_entryErr, "Error serializing 'entry' field") - } + // Simple Field (entry) + entry := uint8(m.GetEntry()) + _entryErr := writeBuffer.WriteUint8("entry", 8, (entry)) + if _entryErr != nil { + return errors.Wrap(_entryErr, "Error serializing 'entry' field") + } - // Simple Field (format) - format := byte(m.GetFormat()) - _formatErr := writeBuffer.WriteByte("format", (format)) - if _formatErr != nil { - return errors.Wrap(_formatErr, "Error serializing 'format' field") - } + // Simple Field (format) + format := byte(m.GetFormat()) + _formatErr := writeBuffer.WriteByte("format", (format)) + if _formatErr != nil { + return errors.Wrap(_formatErr, "Error serializing 'format' field") + } - // Simple Field (humidityModeAndFlags) - if pushErr := writeBuffer.PushContext("humidityModeAndFlags"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for humidityModeAndFlags") - } - _humidityModeAndFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetHumidityModeAndFlags()) - if popErr := writeBuffer.PopContext("humidityModeAndFlags"); popErr != nil { - return errors.Wrap(popErr, "Error popping for humidityModeAndFlags") - } - if _humidityModeAndFlagsErr != nil { - return errors.Wrap(_humidityModeAndFlagsErr, "Error serializing 'humidityModeAndFlags' field") - } + // Simple Field (humidityModeAndFlags) + if pushErr := writeBuffer.PushContext("humidityModeAndFlags"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for humidityModeAndFlags") + } + _humidityModeAndFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetHumidityModeAndFlags()) + if popErr := writeBuffer.PopContext("humidityModeAndFlags"); popErr != nil { + return errors.Wrap(popErr, "Error popping for humidityModeAndFlags") + } + if _humidityModeAndFlagsErr != nil { + return errors.Wrap(_humidityModeAndFlagsErr, "Error serializing 'humidityModeAndFlags' field") + } + + // Simple Field (startTime) + if pushErr := writeBuffer.PushContext("startTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for startTime") + } + _startTimeErr := writeBuffer.WriteSerializable(ctx, m.GetStartTime()) + if popErr := writeBuffer.PopContext("startTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for startTime") + } + if _startTimeErr != nil { + return errors.Wrap(_startTimeErr, "Error serializing 'startTime' field") + } - // Simple Field (startTime) - if pushErr := writeBuffer.PushContext("startTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for startTime") + // Optional Field (level) (Can be skipped, if the value is null) + var level HVACHumidity = nil + if m.GetLevel() != nil { + if pushErr := writeBuffer.PushContext("level"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for level") } - _startTimeErr := writeBuffer.WriteSerializable(ctx, m.GetStartTime()) - if popErr := writeBuffer.PopContext("startTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for startTime") + level = m.GetLevel() + _levelErr := writeBuffer.WriteSerializable(ctx, level) + if popErr := writeBuffer.PopContext("level"); popErr != nil { + return errors.Wrap(popErr, "Error popping for level") } - if _startTimeErr != nil { - return errors.Wrap(_startTimeErr, "Error serializing 'startTime' field") + if _levelErr != nil { + return errors.Wrap(_levelErr, "Error serializing 'level' field") } + } - // Optional Field (level) (Can be skipped, if the value is null) - var level HVACHumidity = nil - if m.GetLevel() != nil { - if pushErr := writeBuffer.PushContext("level"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for level") - } - level = m.GetLevel() - _levelErr := writeBuffer.WriteSerializable(ctx, level) - if popErr := writeBuffer.PopContext("level"); popErr != nil { - return errors.Wrap(popErr, "Error popping for level") - } - if _levelErr != nil { - return errors.Wrap(_levelErr, "Error serializing 'level' field") - } + // Optional Field (rawLevel) (Can be skipped, if the value is null) + var rawLevel HVACRawLevels = nil + if m.GetRawLevel() != nil { + if pushErr := writeBuffer.PushContext("rawLevel"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for rawLevel") } - - // Optional Field (rawLevel) (Can be skipped, if the value is null) - var rawLevel HVACRawLevels = nil - if m.GetRawLevel() != nil { - if pushErr := writeBuffer.PushContext("rawLevel"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for rawLevel") - } - rawLevel = m.GetRawLevel() - _rawLevelErr := writeBuffer.WriteSerializable(ctx, rawLevel) - if popErr := writeBuffer.PopContext("rawLevel"); popErr != nil { - return errors.Wrap(popErr, "Error popping for rawLevel") - } - if _rawLevelErr != nil { - return errors.Wrap(_rawLevelErr, "Error serializing 'rawLevel' field") - } + rawLevel = m.GetRawLevel() + _rawLevelErr := writeBuffer.WriteSerializable(ctx, rawLevel) + if popErr := writeBuffer.PopContext("rawLevel"); popErr != nil { + return errors.Wrap(popErr, "Error popping for rawLevel") + } + if _rawLevelErr != nil { + return errors.Wrap(_rawLevelErr, "Error serializing 'rawLevel' field") } + } if popErr := writeBuffer.PopContext("AirConditioningDataHumidityScheduleEntry"); popErr != nil { return errors.Wrap(popErr, "Error popping for AirConditioningDataHumidityScheduleEntry") @@ -451,6 +456,7 @@ func (m *_AirConditioningDataHumidityScheduleEntry) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AirConditioningDataHumidityScheduleEntry) isAirConditioningDataHumidityScheduleEntry() bool { return true } @@ -465,3 +471,6 @@ func (m *_AirConditioningDataHumidityScheduleEntry) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataHvacScheduleEntry.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataHvacScheduleEntry.go index c1525ba517a..d4e896012d4 100644 --- a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataHvacScheduleEntry.go +++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataHvacScheduleEntry.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AirConditioningDataHvacScheduleEntry is the corresponding interface of AirConditioningDataHvacScheduleEntry type AirConditioningDataHvacScheduleEntry interface { @@ -61,16 +63,18 @@ type AirConditioningDataHvacScheduleEntryExactly interface { // _AirConditioningDataHvacScheduleEntry is the data-structure of this message type _AirConditioningDataHvacScheduleEntry struct { *_AirConditioningData - ZoneGroup byte - ZoneList HVACZoneList - Entry uint8 - Format byte - HvacModeAndFlags HVACModeAndFlags - StartTime HVACStartTime - Level HVACTemperature - RawLevel HVACRawLevels + ZoneGroup byte + ZoneList HVACZoneList + Entry uint8 + Format byte + HvacModeAndFlags HVACModeAndFlags + StartTime HVACStartTime + Level HVACTemperature + RawLevel HVACRawLevels } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -81,14 +85,12 @@ type _AirConditioningDataHvacScheduleEntry struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AirConditioningDataHvacScheduleEntry) InitializeParent(parent AirConditioningData, commandTypeContainer AirConditioningCommandTypeContainer) { - m.CommandTypeContainer = commandTypeContainer +func (m *_AirConditioningDataHvacScheduleEntry) InitializeParent(parent AirConditioningData , commandTypeContainer AirConditioningCommandTypeContainer ) { m.CommandTypeContainer = commandTypeContainer } -func (m *_AirConditioningDataHvacScheduleEntry) GetParent() AirConditioningData { +func (m *_AirConditioningDataHvacScheduleEntry) GetParent() AirConditioningData { return m._AirConditioningData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -131,18 +133,19 @@ func (m *_AirConditioningDataHvacScheduleEntry) GetRawLevel() HVACRawLevels { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAirConditioningDataHvacScheduleEntry factory function for _AirConditioningDataHvacScheduleEntry -func NewAirConditioningDataHvacScheduleEntry(zoneGroup byte, zoneList HVACZoneList, entry uint8, format byte, hvacModeAndFlags HVACModeAndFlags, startTime HVACStartTime, level HVACTemperature, rawLevel HVACRawLevels, commandTypeContainer AirConditioningCommandTypeContainer) *_AirConditioningDataHvacScheduleEntry { +func NewAirConditioningDataHvacScheduleEntry( zoneGroup byte , zoneList HVACZoneList , entry uint8 , format byte , hvacModeAndFlags HVACModeAndFlags , startTime HVACStartTime , level HVACTemperature , rawLevel HVACRawLevels , commandTypeContainer AirConditioningCommandTypeContainer ) *_AirConditioningDataHvacScheduleEntry { _result := &_AirConditioningDataHvacScheduleEntry{ - ZoneGroup: zoneGroup, - ZoneList: zoneList, - Entry: entry, - Format: format, - HvacModeAndFlags: hvacModeAndFlags, - StartTime: startTime, - Level: level, - RawLevel: rawLevel, - _AirConditioningData: NewAirConditioningData(commandTypeContainer), + ZoneGroup: zoneGroup, + ZoneList: zoneList, + Entry: entry, + Format: format, + HvacModeAndFlags: hvacModeAndFlags, + StartTime: startTime, + Level: level, + RawLevel: rawLevel, + _AirConditioningData: NewAirConditioningData(commandTypeContainer), } _result._AirConditioningData._AirConditioningDataChildRequirements = _result return _result @@ -150,7 +153,7 @@ func NewAirConditioningDataHvacScheduleEntry(zoneGroup byte, zoneList HVACZoneLi // Deprecated: use the interface for direct cast func CastAirConditioningDataHvacScheduleEntry(structType interface{}) AirConditioningDataHvacScheduleEntry { - if casted, ok := structType.(AirConditioningDataHvacScheduleEntry); ok { + if casted, ok := structType.(AirConditioningDataHvacScheduleEntry); ok { return casted } if casted, ok := structType.(*AirConditioningDataHvacScheduleEntry); ok { @@ -167,16 +170,16 @@ func (m *_AirConditioningDataHvacScheduleEntry) GetLengthInBits(ctx context.Cont lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (zoneGroup) - lengthInBits += 8 + lengthInBits += 8; // Simple field (zoneList) lengthInBits += m.ZoneList.GetLengthInBits(ctx) // Simple field (entry) - lengthInBits += 8 + lengthInBits += 8; // Simple field (format) - lengthInBits += 8 + lengthInBits += 8; // Simple field (hvacModeAndFlags) lengthInBits += m.HvacModeAndFlags.GetLengthInBits(ctx) @@ -197,6 +200,7 @@ func (m *_AirConditioningDataHvacScheduleEntry) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_AirConditioningDataHvacScheduleEntry) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -215,7 +219,7 @@ func AirConditioningDataHvacScheduleEntryParseWithBuffer(ctx context.Context, re _ = currentPos // Simple Field (zoneGroup) - _zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup") +_zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup") if _zoneGroupErr != nil { return nil, errors.Wrap(_zoneGroupErr, "Error parsing 'zoneGroup' field of AirConditioningDataHvacScheduleEntry") } @@ -225,7 +229,7 @@ func AirConditioningDataHvacScheduleEntryParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("zoneList"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for zoneList") } - _zoneList, _zoneListErr := HVACZoneListParseWithBuffer(ctx, readBuffer) +_zoneList, _zoneListErr := HVACZoneListParseWithBuffer(ctx, readBuffer) if _zoneListErr != nil { return nil, errors.Wrap(_zoneListErr, "Error parsing 'zoneList' field of AirConditioningDataHvacScheduleEntry") } @@ -235,14 +239,14 @@ func AirConditioningDataHvacScheduleEntryParseWithBuffer(ctx context.Context, re } // Simple Field (entry) - _entry, _entryErr := readBuffer.ReadUint8("entry", 8) +_entry, _entryErr := readBuffer.ReadUint8("entry", 8) if _entryErr != nil { return nil, errors.Wrap(_entryErr, "Error parsing 'entry' field of AirConditioningDataHvacScheduleEntry") } entry := _entry // Simple Field (format) - _format, _formatErr := readBuffer.ReadByte("format") +_format, _formatErr := readBuffer.ReadByte("format") if _formatErr != nil { return nil, errors.Wrap(_formatErr, "Error parsing 'format' field of AirConditioningDataHvacScheduleEntry") } @@ -252,7 +256,7 @@ func AirConditioningDataHvacScheduleEntryParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("hvacModeAndFlags"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for hvacModeAndFlags") } - _hvacModeAndFlags, _hvacModeAndFlagsErr := HVACModeAndFlagsParseWithBuffer(ctx, readBuffer) +_hvacModeAndFlags, _hvacModeAndFlagsErr := HVACModeAndFlagsParseWithBuffer(ctx, readBuffer) if _hvacModeAndFlagsErr != nil { return nil, errors.Wrap(_hvacModeAndFlagsErr, "Error parsing 'hvacModeAndFlags' field of AirConditioningDataHvacScheduleEntry") } @@ -265,7 +269,7 @@ func AirConditioningDataHvacScheduleEntryParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("startTime"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for startTime") } - _startTime, _startTimeErr := HVACStartTimeParseWithBuffer(ctx, readBuffer) +_startTime, _startTimeErr := HVACStartTimeParseWithBuffer(ctx, readBuffer) if _startTimeErr != nil { return nil, errors.Wrap(_startTimeErr, "Error parsing 'startTime' field of AirConditioningDataHvacScheduleEntry") } @@ -281,7 +285,7 @@ func AirConditioningDataHvacScheduleEntryParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("level"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for level") } - _val, _err := HVACTemperatureParseWithBuffer(ctx, readBuffer) +_val, _err := HVACTemperatureParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -303,7 +307,7 @@ func AirConditioningDataHvacScheduleEntryParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("rawLevel"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for rawLevel") } - _val, _err := HVACRawLevelsParseWithBuffer(ctx, readBuffer) +_val, _err := HVACRawLevelsParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -324,15 +328,16 @@ func AirConditioningDataHvacScheduleEntryParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_AirConditioningDataHvacScheduleEntry{ - _AirConditioningData: &_AirConditioningData{}, - ZoneGroup: zoneGroup, - ZoneList: zoneList, - Entry: entry, - Format: format, - HvacModeAndFlags: hvacModeAndFlags, - StartTime: startTime, - Level: level, - RawLevel: rawLevel, + _AirConditioningData: &_AirConditioningData{ + }, + ZoneGroup: zoneGroup, + ZoneList: zoneList, + Entry: entry, + Format: format, + HvacModeAndFlags: hvacModeAndFlags, + StartTime: startTime, + Level: level, + RawLevel: rawLevel, } _child._AirConditioningData._AirConditioningDataChildRequirements = _child return _child, nil @@ -354,94 +359,94 @@ func (m *_AirConditioningDataHvacScheduleEntry) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for AirConditioningDataHvacScheduleEntry") } - // Simple Field (zoneGroup) - zoneGroup := byte(m.GetZoneGroup()) - _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup)) - if _zoneGroupErr != nil { - return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field") - } + // Simple Field (zoneGroup) + zoneGroup := byte(m.GetZoneGroup()) + _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup)) + if _zoneGroupErr != nil { + return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field") + } - // Simple Field (zoneList) - if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for zoneList") - } - _zoneListErr := writeBuffer.WriteSerializable(ctx, m.GetZoneList()) - if popErr := writeBuffer.PopContext("zoneList"); popErr != nil { - return errors.Wrap(popErr, "Error popping for zoneList") - } - if _zoneListErr != nil { - return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field") - } + // Simple Field (zoneList) + if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for zoneList") + } + _zoneListErr := writeBuffer.WriteSerializable(ctx, m.GetZoneList()) + if popErr := writeBuffer.PopContext("zoneList"); popErr != nil { + return errors.Wrap(popErr, "Error popping for zoneList") + } + if _zoneListErr != nil { + return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field") + } - // Simple Field (entry) - entry := uint8(m.GetEntry()) - _entryErr := writeBuffer.WriteUint8("entry", 8, (entry)) - if _entryErr != nil { - return errors.Wrap(_entryErr, "Error serializing 'entry' field") - } + // Simple Field (entry) + entry := uint8(m.GetEntry()) + _entryErr := writeBuffer.WriteUint8("entry", 8, (entry)) + if _entryErr != nil { + return errors.Wrap(_entryErr, "Error serializing 'entry' field") + } - // Simple Field (format) - format := byte(m.GetFormat()) - _formatErr := writeBuffer.WriteByte("format", (format)) - if _formatErr != nil { - return errors.Wrap(_formatErr, "Error serializing 'format' field") - } + // Simple Field (format) + format := byte(m.GetFormat()) + _formatErr := writeBuffer.WriteByte("format", (format)) + if _formatErr != nil { + return errors.Wrap(_formatErr, "Error serializing 'format' field") + } - // Simple Field (hvacModeAndFlags) - if pushErr := writeBuffer.PushContext("hvacModeAndFlags"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for hvacModeAndFlags") - } - _hvacModeAndFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetHvacModeAndFlags()) - if popErr := writeBuffer.PopContext("hvacModeAndFlags"); popErr != nil { - return errors.Wrap(popErr, "Error popping for hvacModeAndFlags") - } - if _hvacModeAndFlagsErr != nil { - return errors.Wrap(_hvacModeAndFlagsErr, "Error serializing 'hvacModeAndFlags' field") - } + // Simple Field (hvacModeAndFlags) + if pushErr := writeBuffer.PushContext("hvacModeAndFlags"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for hvacModeAndFlags") + } + _hvacModeAndFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetHvacModeAndFlags()) + if popErr := writeBuffer.PopContext("hvacModeAndFlags"); popErr != nil { + return errors.Wrap(popErr, "Error popping for hvacModeAndFlags") + } + if _hvacModeAndFlagsErr != nil { + return errors.Wrap(_hvacModeAndFlagsErr, "Error serializing 'hvacModeAndFlags' field") + } + + // Simple Field (startTime) + if pushErr := writeBuffer.PushContext("startTime"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for startTime") + } + _startTimeErr := writeBuffer.WriteSerializable(ctx, m.GetStartTime()) + if popErr := writeBuffer.PopContext("startTime"); popErr != nil { + return errors.Wrap(popErr, "Error popping for startTime") + } + if _startTimeErr != nil { + return errors.Wrap(_startTimeErr, "Error serializing 'startTime' field") + } - // Simple Field (startTime) - if pushErr := writeBuffer.PushContext("startTime"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for startTime") + // Optional Field (level) (Can be skipped, if the value is null) + var level HVACTemperature = nil + if m.GetLevel() != nil { + if pushErr := writeBuffer.PushContext("level"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for level") } - _startTimeErr := writeBuffer.WriteSerializable(ctx, m.GetStartTime()) - if popErr := writeBuffer.PopContext("startTime"); popErr != nil { - return errors.Wrap(popErr, "Error popping for startTime") + level = m.GetLevel() + _levelErr := writeBuffer.WriteSerializable(ctx, level) + if popErr := writeBuffer.PopContext("level"); popErr != nil { + return errors.Wrap(popErr, "Error popping for level") } - if _startTimeErr != nil { - return errors.Wrap(_startTimeErr, "Error serializing 'startTime' field") + if _levelErr != nil { + return errors.Wrap(_levelErr, "Error serializing 'level' field") } + } - // Optional Field (level) (Can be skipped, if the value is null) - var level HVACTemperature = nil - if m.GetLevel() != nil { - if pushErr := writeBuffer.PushContext("level"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for level") - } - level = m.GetLevel() - _levelErr := writeBuffer.WriteSerializable(ctx, level) - if popErr := writeBuffer.PopContext("level"); popErr != nil { - return errors.Wrap(popErr, "Error popping for level") - } - if _levelErr != nil { - return errors.Wrap(_levelErr, "Error serializing 'level' field") - } + // Optional Field (rawLevel) (Can be skipped, if the value is null) + var rawLevel HVACRawLevels = nil + if m.GetRawLevel() != nil { + if pushErr := writeBuffer.PushContext("rawLevel"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for rawLevel") } - - // Optional Field (rawLevel) (Can be skipped, if the value is null) - var rawLevel HVACRawLevels = nil - if m.GetRawLevel() != nil { - if pushErr := writeBuffer.PushContext("rawLevel"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for rawLevel") - } - rawLevel = m.GetRawLevel() - _rawLevelErr := writeBuffer.WriteSerializable(ctx, rawLevel) - if popErr := writeBuffer.PopContext("rawLevel"); popErr != nil { - return errors.Wrap(popErr, "Error popping for rawLevel") - } - if _rawLevelErr != nil { - return errors.Wrap(_rawLevelErr, "Error serializing 'rawLevel' field") - } + rawLevel = m.GetRawLevel() + _rawLevelErr := writeBuffer.WriteSerializable(ctx, rawLevel) + if popErr := writeBuffer.PopContext("rawLevel"); popErr != nil { + return errors.Wrap(popErr, "Error popping for rawLevel") + } + if _rawLevelErr != nil { + return errors.Wrap(_rawLevelErr, "Error serializing 'rawLevel' field") } + } if popErr := writeBuffer.PopContext("AirConditioningDataHvacScheduleEntry"); popErr != nil { return errors.Wrap(popErr, "Error popping for AirConditioningDataHvacScheduleEntry") @@ -451,6 +456,7 @@ func (m *_AirConditioningDataHvacScheduleEntry) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AirConditioningDataHvacScheduleEntry) isAirConditioningDataHvacScheduleEntry() bool { return true } @@ -465,3 +471,6 @@ func (m *_AirConditioningDataHvacScheduleEntry) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataRefresh.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataRefresh.go index 8f265c7c8ee..f6bf1dd3931 100644 --- a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataRefresh.go +++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataRefresh.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AirConditioningDataRefresh is the corresponding interface of AirConditioningDataRefresh type AirConditioningDataRefresh interface { @@ -46,9 +48,11 @@ type AirConditioningDataRefreshExactly interface { // _AirConditioningDataRefresh is the data-structure of this message type _AirConditioningDataRefresh struct { *_AirConditioningData - ZoneGroup byte + ZoneGroup byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _AirConditioningDataRefresh struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AirConditioningDataRefresh) InitializeParent(parent AirConditioningData, commandTypeContainer AirConditioningCommandTypeContainer) { - m.CommandTypeContainer = commandTypeContainer +func (m *_AirConditioningDataRefresh) InitializeParent(parent AirConditioningData , commandTypeContainer AirConditioningCommandTypeContainer ) { m.CommandTypeContainer = commandTypeContainer } -func (m *_AirConditioningDataRefresh) GetParent() AirConditioningData { +func (m *_AirConditioningDataRefresh) GetParent() AirConditioningData { return m._AirConditioningData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_AirConditioningDataRefresh) GetZoneGroup() byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAirConditioningDataRefresh factory function for _AirConditioningDataRefresh -func NewAirConditioningDataRefresh(zoneGroup byte, commandTypeContainer AirConditioningCommandTypeContainer) *_AirConditioningDataRefresh { +func NewAirConditioningDataRefresh( zoneGroup byte , commandTypeContainer AirConditioningCommandTypeContainer ) *_AirConditioningDataRefresh { _result := &_AirConditioningDataRefresh{ - ZoneGroup: zoneGroup, - _AirConditioningData: NewAirConditioningData(commandTypeContainer), + ZoneGroup: zoneGroup, + _AirConditioningData: NewAirConditioningData(commandTypeContainer), } _result._AirConditioningData._AirConditioningDataChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewAirConditioningDataRefresh(zoneGroup byte, commandTypeContainer AirCondi // Deprecated: use the interface for direct cast func CastAirConditioningDataRefresh(structType interface{}) AirConditioningDataRefresh { - if casted, ok := structType.(AirConditioningDataRefresh); ok { + if casted, ok := structType.(AirConditioningDataRefresh); ok { return casted } if casted, ok := structType.(*AirConditioningDataRefresh); ok { @@ -110,11 +113,12 @@ func (m *_AirConditioningDataRefresh) GetLengthInBits(ctx context.Context) uint1 lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (zoneGroup) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_AirConditioningDataRefresh) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -133,7 +137,7 @@ func AirConditioningDataRefreshParseWithBuffer(ctx context.Context, readBuffer u _ = currentPos // Simple Field (zoneGroup) - _zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup") +_zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup") if _zoneGroupErr != nil { return nil, errors.Wrap(_zoneGroupErr, "Error parsing 'zoneGroup' field of AirConditioningDataRefresh") } @@ -145,8 +149,9 @@ func AirConditioningDataRefreshParseWithBuffer(ctx context.Context, readBuffer u // Create a partially initialized instance _child := &_AirConditioningDataRefresh{ - _AirConditioningData: &_AirConditioningData{}, - ZoneGroup: zoneGroup, + _AirConditioningData: &_AirConditioningData{ + }, + ZoneGroup: zoneGroup, } _child._AirConditioningData._AirConditioningDataChildRequirements = _child return _child, nil @@ -168,12 +173,12 @@ func (m *_AirConditioningDataRefresh) SerializeWithWriteBuffer(ctx context.Conte return errors.Wrap(pushErr, "Error pushing for AirConditioningDataRefresh") } - // Simple Field (zoneGroup) - zoneGroup := byte(m.GetZoneGroup()) - _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup)) - if _zoneGroupErr != nil { - return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field") - } + // Simple Field (zoneGroup) + zoneGroup := byte(m.GetZoneGroup()) + _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup)) + if _zoneGroupErr != nil { + return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field") + } if popErr := writeBuffer.PopContext("AirConditioningDataRefresh"); popErr != nil { return errors.Wrap(popErr, "Error popping for AirConditioningDataRefresh") @@ -183,6 +188,7 @@ func (m *_AirConditioningDataRefresh) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AirConditioningDataRefresh) isAirConditioningDataRefresh() bool { return true } @@ -197,3 +203,6 @@ func (m *_AirConditioningDataRefresh) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHumidityLowerGuardLimit.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHumidityLowerGuardLimit.go index 22e9f67b716..60ef8d6cb7d 100644 --- a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHumidityLowerGuardLimit.go +++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHumidityLowerGuardLimit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AirConditioningDataSetHumidityLowerGuardLimit is the corresponding interface of AirConditioningDataSetHumidityLowerGuardLimit type AirConditioningDataSetHumidityLowerGuardLimit interface { @@ -52,12 +54,14 @@ type AirConditioningDataSetHumidityLowerGuardLimitExactly interface { // _AirConditioningDataSetHumidityLowerGuardLimit is the data-structure of this message type _AirConditioningDataSetHumidityLowerGuardLimit struct { *_AirConditioningData - ZoneGroup byte - ZoneList HVACZoneList - Limit HVACHumidity - HvacModeAndFlags HVACHumidityModeAndFlags + ZoneGroup byte + ZoneList HVACZoneList + Limit HVACHumidity + HvacModeAndFlags HVACHumidityModeAndFlags } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -68,14 +72,12 @@ type _AirConditioningDataSetHumidityLowerGuardLimit struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AirConditioningDataSetHumidityLowerGuardLimit) InitializeParent(parent AirConditioningData, commandTypeContainer AirConditioningCommandTypeContainer) { - m.CommandTypeContainer = commandTypeContainer +func (m *_AirConditioningDataSetHumidityLowerGuardLimit) InitializeParent(parent AirConditioningData , commandTypeContainer AirConditioningCommandTypeContainer ) { m.CommandTypeContainer = commandTypeContainer } -func (m *_AirConditioningDataSetHumidityLowerGuardLimit) GetParent() AirConditioningData { +func (m *_AirConditioningDataSetHumidityLowerGuardLimit) GetParent() AirConditioningData { return m._AirConditioningData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -102,14 +104,15 @@ func (m *_AirConditioningDataSetHumidityLowerGuardLimit) GetHvacModeAndFlags() H /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAirConditioningDataSetHumidityLowerGuardLimit factory function for _AirConditioningDataSetHumidityLowerGuardLimit -func NewAirConditioningDataSetHumidityLowerGuardLimit(zoneGroup byte, zoneList HVACZoneList, limit HVACHumidity, hvacModeAndFlags HVACHumidityModeAndFlags, commandTypeContainer AirConditioningCommandTypeContainer) *_AirConditioningDataSetHumidityLowerGuardLimit { +func NewAirConditioningDataSetHumidityLowerGuardLimit( zoneGroup byte , zoneList HVACZoneList , limit HVACHumidity , hvacModeAndFlags HVACHumidityModeAndFlags , commandTypeContainer AirConditioningCommandTypeContainer ) *_AirConditioningDataSetHumidityLowerGuardLimit { _result := &_AirConditioningDataSetHumidityLowerGuardLimit{ - ZoneGroup: zoneGroup, - ZoneList: zoneList, - Limit: limit, - HvacModeAndFlags: hvacModeAndFlags, - _AirConditioningData: NewAirConditioningData(commandTypeContainer), + ZoneGroup: zoneGroup, + ZoneList: zoneList, + Limit: limit, + HvacModeAndFlags: hvacModeAndFlags, + _AirConditioningData: NewAirConditioningData(commandTypeContainer), } _result._AirConditioningData._AirConditioningDataChildRequirements = _result return _result @@ -117,7 +120,7 @@ func NewAirConditioningDataSetHumidityLowerGuardLimit(zoneGroup byte, zoneList H // Deprecated: use the interface for direct cast func CastAirConditioningDataSetHumidityLowerGuardLimit(structType interface{}) AirConditioningDataSetHumidityLowerGuardLimit { - if casted, ok := structType.(AirConditioningDataSetHumidityLowerGuardLimit); ok { + if casted, ok := structType.(AirConditioningDataSetHumidityLowerGuardLimit); ok { return casted } if casted, ok := structType.(*AirConditioningDataSetHumidityLowerGuardLimit); ok { @@ -134,7 +137,7 @@ func (m *_AirConditioningDataSetHumidityLowerGuardLimit) GetLengthInBits(ctx con lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (zoneGroup) - lengthInBits += 8 + lengthInBits += 8; // Simple field (zoneList) lengthInBits += m.ZoneList.GetLengthInBits(ctx) @@ -148,6 +151,7 @@ func (m *_AirConditioningDataSetHumidityLowerGuardLimit) GetLengthInBits(ctx con return lengthInBits } + func (m *_AirConditioningDataSetHumidityLowerGuardLimit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -166,7 +170,7 @@ func AirConditioningDataSetHumidityLowerGuardLimitParseWithBuffer(ctx context.Co _ = currentPos // Simple Field (zoneGroup) - _zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup") +_zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup") if _zoneGroupErr != nil { return nil, errors.Wrap(_zoneGroupErr, "Error parsing 'zoneGroup' field of AirConditioningDataSetHumidityLowerGuardLimit") } @@ -176,7 +180,7 @@ func AirConditioningDataSetHumidityLowerGuardLimitParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("zoneList"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for zoneList") } - _zoneList, _zoneListErr := HVACZoneListParseWithBuffer(ctx, readBuffer) +_zoneList, _zoneListErr := HVACZoneListParseWithBuffer(ctx, readBuffer) if _zoneListErr != nil { return nil, errors.Wrap(_zoneListErr, "Error parsing 'zoneList' field of AirConditioningDataSetHumidityLowerGuardLimit") } @@ -189,7 +193,7 @@ func AirConditioningDataSetHumidityLowerGuardLimitParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("limit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for limit") } - _limit, _limitErr := HVACHumidityParseWithBuffer(ctx, readBuffer) +_limit, _limitErr := HVACHumidityParseWithBuffer(ctx, readBuffer) if _limitErr != nil { return nil, errors.Wrap(_limitErr, "Error parsing 'limit' field of AirConditioningDataSetHumidityLowerGuardLimit") } @@ -202,7 +206,7 @@ func AirConditioningDataSetHumidityLowerGuardLimitParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("hvacModeAndFlags"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for hvacModeAndFlags") } - _hvacModeAndFlags, _hvacModeAndFlagsErr := HVACHumidityModeAndFlagsParseWithBuffer(ctx, readBuffer) +_hvacModeAndFlags, _hvacModeAndFlagsErr := HVACHumidityModeAndFlagsParseWithBuffer(ctx, readBuffer) if _hvacModeAndFlagsErr != nil { return nil, errors.Wrap(_hvacModeAndFlagsErr, "Error parsing 'hvacModeAndFlags' field of AirConditioningDataSetHumidityLowerGuardLimit") } @@ -217,11 +221,12 @@ func AirConditioningDataSetHumidityLowerGuardLimitParseWithBuffer(ctx context.Co // Create a partially initialized instance _child := &_AirConditioningDataSetHumidityLowerGuardLimit{ - _AirConditioningData: &_AirConditioningData{}, - ZoneGroup: zoneGroup, - ZoneList: zoneList, - Limit: limit, - HvacModeAndFlags: hvacModeAndFlags, + _AirConditioningData: &_AirConditioningData{ + }, + ZoneGroup: zoneGroup, + ZoneList: zoneList, + Limit: limit, + HvacModeAndFlags: hvacModeAndFlags, } _child._AirConditioningData._AirConditioningDataChildRequirements = _child return _child, nil @@ -243,48 +248,48 @@ func (m *_AirConditioningDataSetHumidityLowerGuardLimit) SerializeWithWriteBuffe return errors.Wrap(pushErr, "Error pushing for AirConditioningDataSetHumidityLowerGuardLimit") } - // Simple Field (zoneGroup) - zoneGroup := byte(m.GetZoneGroup()) - _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup)) - if _zoneGroupErr != nil { - return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field") - } + // Simple Field (zoneGroup) + zoneGroup := byte(m.GetZoneGroup()) + _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup)) + if _zoneGroupErr != nil { + return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field") + } - // Simple Field (zoneList) - if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for zoneList") - } - _zoneListErr := writeBuffer.WriteSerializable(ctx, m.GetZoneList()) - if popErr := writeBuffer.PopContext("zoneList"); popErr != nil { - return errors.Wrap(popErr, "Error popping for zoneList") - } - if _zoneListErr != nil { - return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field") - } + // Simple Field (zoneList) + if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for zoneList") + } + _zoneListErr := writeBuffer.WriteSerializable(ctx, m.GetZoneList()) + if popErr := writeBuffer.PopContext("zoneList"); popErr != nil { + return errors.Wrap(popErr, "Error popping for zoneList") + } + if _zoneListErr != nil { + return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field") + } - // Simple Field (limit) - if pushErr := writeBuffer.PushContext("limit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for limit") - } - _limitErr := writeBuffer.WriteSerializable(ctx, m.GetLimit()) - if popErr := writeBuffer.PopContext("limit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for limit") - } - if _limitErr != nil { - return errors.Wrap(_limitErr, "Error serializing 'limit' field") - } + // Simple Field (limit) + if pushErr := writeBuffer.PushContext("limit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for limit") + } + _limitErr := writeBuffer.WriteSerializable(ctx, m.GetLimit()) + if popErr := writeBuffer.PopContext("limit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for limit") + } + if _limitErr != nil { + return errors.Wrap(_limitErr, "Error serializing 'limit' field") + } - // Simple Field (hvacModeAndFlags) - if pushErr := writeBuffer.PushContext("hvacModeAndFlags"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for hvacModeAndFlags") - } - _hvacModeAndFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetHvacModeAndFlags()) - if popErr := writeBuffer.PopContext("hvacModeAndFlags"); popErr != nil { - return errors.Wrap(popErr, "Error popping for hvacModeAndFlags") - } - if _hvacModeAndFlagsErr != nil { - return errors.Wrap(_hvacModeAndFlagsErr, "Error serializing 'hvacModeAndFlags' field") - } + // Simple Field (hvacModeAndFlags) + if pushErr := writeBuffer.PushContext("hvacModeAndFlags"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for hvacModeAndFlags") + } + _hvacModeAndFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetHvacModeAndFlags()) + if popErr := writeBuffer.PopContext("hvacModeAndFlags"); popErr != nil { + return errors.Wrap(popErr, "Error popping for hvacModeAndFlags") + } + if _hvacModeAndFlagsErr != nil { + return errors.Wrap(_hvacModeAndFlagsErr, "Error serializing 'hvacModeAndFlags' field") + } if popErr := writeBuffer.PopContext("AirConditioningDataSetHumidityLowerGuardLimit"); popErr != nil { return errors.Wrap(popErr, "Error popping for AirConditioningDataSetHumidityLowerGuardLimit") @@ -294,6 +299,7 @@ func (m *_AirConditioningDataSetHumidityLowerGuardLimit) SerializeWithWriteBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AirConditioningDataSetHumidityLowerGuardLimit) isAirConditioningDataSetHumidityLowerGuardLimit() bool { return true } @@ -308,3 +314,6 @@ func (m *_AirConditioningDataSetHumidityLowerGuardLimit) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHumiditySetbackLimit.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHumiditySetbackLimit.go index bdb631727f9..f7161711caa 100644 --- a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHumiditySetbackLimit.go +++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHumiditySetbackLimit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AirConditioningDataSetHumiditySetbackLimit is the corresponding interface of AirConditioningDataSetHumiditySetbackLimit type AirConditioningDataSetHumiditySetbackLimit interface { @@ -52,12 +54,14 @@ type AirConditioningDataSetHumiditySetbackLimitExactly interface { // _AirConditioningDataSetHumiditySetbackLimit is the data-structure of this message type _AirConditioningDataSetHumiditySetbackLimit struct { *_AirConditioningData - ZoneGroup byte - ZoneList HVACZoneList - Limit HVACHumidity - HvacModeAndFlags HVACHumidityModeAndFlags + ZoneGroup byte + ZoneList HVACZoneList + Limit HVACHumidity + HvacModeAndFlags HVACHumidityModeAndFlags } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -68,14 +72,12 @@ type _AirConditioningDataSetHumiditySetbackLimit struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AirConditioningDataSetHumiditySetbackLimit) InitializeParent(parent AirConditioningData, commandTypeContainer AirConditioningCommandTypeContainer) { - m.CommandTypeContainer = commandTypeContainer +func (m *_AirConditioningDataSetHumiditySetbackLimit) InitializeParent(parent AirConditioningData , commandTypeContainer AirConditioningCommandTypeContainer ) { m.CommandTypeContainer = commandTypeContainer } -func (m *_AirConditioningDataSetHumiditySetbackLimit) GetParent() AirConditioningData { +func (m *_AirConditioningDataSetHumiditySetbackLimit) GetParent() AirConditioningData { return m._AirConditioningData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -102,14 +104,15 @@ func (m *_AirConditioningDataSetHumiditySetbackLimit) GetHvacModeAndFlags() HVAC /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAirConditioningDataSetHumiditySetbackLimit factory function for _AirConditioningDataSetHumiditySetbackLimit -func NewAirConditioningDataSetHumiditySetbackLimit(zoneGroup byte, zoneList HVACZoneList, limit HVACHumidity, hvacModeAndFlags HVACHumidityModeAndFlags, commandTypeContainer AirConditioningCommandTypeContainer) *_AirConditioningDataSetHumiditySetbackLimit { +func NewAirConditioningDataSetHumiditySetbackLimit( zoneGroup byte , zoneList HVACZoneList , limit HVACHumidity , hvacModeAndFlags HVACHumidityModeAndFlags , commandTypeContainer AirConditioningCommandTypeContainer ) *_AirConditioningDataSetHumiditySetbackLimit { _result := &_AirConditioningDataSetHumiditySetbackLimit{ - ZoneGroup: zoneGroup, - ZoneList: zoneList, - Limit: limit, - HvacModeAndFlags: hvacModeAndFlags, - _AirConditioningData: NewAirConditioningData(commandTypeContainer), + ZoneGroup: zoneGroup, + ZoneList: zoneList, + Limit: limit, + HvacModeAndFlags: hvacModeAndFlags, + _AirConditioningData: NewAirConditioningData(commandTypeContainer), } _result._AirConditioningData._AirConditioningDataChildRequirements = _result return _result @@ -117,7 +120,7 @@ func NewAirConditioningDataSetHumiditySetbackLimit(zoneGroup byte, zoneList HVAC // Deprecated: use the interface for direct cast func CastAirConditioningDataSetHumiditySetbackLimit(structType interface{}) AirConditioningDataSetHumiditySetbackLimit { - if casted, ok := structType.(AirConditioningDataSetHumiditySetbackLimit); ok { + if casted, ok := structType.(AirConditioningDataSetHumiditySetbackLimit); ok { return casted } if casted, ok := structType.(*AirConditioningDataSetHumiditySetbackLimit); ok { @@ -134,7 +137,7 @@ func (m *_AirConditioningDataSetHumiditySetbackLimit) GetLengthInBits(ctx contex lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (zoneGroup) - lengthInBits += 8 + lengthInBits += 8; // Simple field (zoneList) lengthInBits += m.ZoneList.GetLengthInBits(ctx) @@ -148,6 +151,7 @@ func (m *_AirConditioningDataSetHumiditySetbackLimit) GetLengthInBits(ctx contex return lengthInBits } + func (m *_AirConditioningDataSetHumiditySetbackLimit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -166,7 +170,7 @@ func AirConditioningDataSetHumiditySetbackLimitParseWithBuffer(ctx context.Conte _ = currentPos // Simple Field (zoneGroup) - _zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup") +_zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup") if _zoneGroupErr != nil { return nil, errors.Wrap(_zoneGroupErr, "Error parsing 'zoneGroup' field of AirConditioningDataSetHumiditySetbackLimit") } @@ -176,7 +180,7 @@ func AirConditioningDataSetHumiditySetbackLimitParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("zoneList"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for zoneList") } - _zoneList, _zoneListErr := HVACZoneListParseWithBuffer(ctx, readBuffer) +_zoneList, _zoneListErr := HVACZoneListParseWithBuffer(ctx, readBuffer) if _zoneListErr != nil { return nil, errors.Wrap(_zoneListErr, "Error parsing 'zoneList' field of AirConditioningDataSetHumiditySetbackLimit") } @@ -189,7 +193,7 @@ func AirConditioningDataSetHumiditySetbackLimitParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("limit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for limit") } - _limit, _limitErr := HVACHumidityParseWithBuffer(ctx, readBuffer) +_limit, _limitErr := HVACHumidityParseWithBuffer(ctx, readBuffer) if _limitErr != nil { return nil, errors.Wrap(_limitErr, "Error parsing 'limit' field of AirConditioningDataSetHumiditySetbackLimit") } @@ -202,7 +206,7 @@ func AirConditioningDataSetHumiditySetbackLimitParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("hvacModeAndFlags"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for hvacModeAndFlags") } - _hvacModeAndFlags, _hvacModeAndFlagsErr := HVACHumidityModeAndFlagsParseWithBuffer(ctx, readBuffer) +_hvacModeAndFlags, _hvacModeAndFlagsErr := HVACHumidityModeAndFlagsParseWithBuffer(ctx, readBuffer) if _hvacModeAndFlagsErr != nil { return nil, errors.Wrap(_hvacModeAndFlagsErr, "Error parsing 'hvacModeAndFlags' field of AirConditioningDataSetHumiditySetbackLimit") } @@ -217,11 +221,12 @@ func AirConditioningDataSetHumiditySetbackLimitParseWithBuffer(ctx context.Conte // Create a partially initialized instance _child := &_AirConditioningDataSetHumiditySetbackLimit{ - _AirConditioningData: &_AirConditioningData{}, - ZoneGroup: zoneGroup, - ZoneList: zoneList, - Limit: limit, - HvacModeAndFlags: hvacModeAndFlags, + _AirConditioningData: &_AirConditioningData{ + }, + ZoneGroup: zoneGroup, + ZoneList: zoneList, + Limit: limit, + HvacModeAndFlags: hvacModeAndFlags, } _child._AirConditioningData._AirConditioningDataChildRequirements = _child return _child, nil @@ -243,48 +248,48 @@ func (m *_AirConditioningDataSetHumiditySetbackLimit) SerializeWithWriteBuffer(c return errors.Wrap(pushErr, "Error pushing for AirConditioningDataSetHumiditySetbackLimit") } - // Simple Field (zoneGroup) - zoneGroup := byte(m.GetZoneGroup()) - _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup)) - if _zoneGroupErr != nil { - return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field") - } + // Simple Field (zoneGroup) + zoneGroup := byte(m.GetZoneGroup()) + _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup)) + if _zoneGroupErr != nil { + return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field") + } - // Simple Field (zoneList) - if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for zoneList") - } - _zoneListErr := writeBuffer.WriteSerializable(ctx, m.GetZoneList()) - if popErr := writeBuffer.PopContext("zoneList"); popErr != nil { - return errors.Wrap(popErr, "Error popping for zoneList") - } - if _zoneListErr != nil { - return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field") - } + // Simple Field (zoneList) + if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for zoneList") + } + _zoneListErr := writeBuffer.WriteSerializable(ctx, m.GetZoneList()) + if popErr := writeBuffer.PopContext("zoneList"); popErr != nil { + return errors.Wrap(popErr, "Error popping for zoneList") + } + if _zoneListErr != nil { + return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field") + } - // Simple Field (limit) - if pushErr := writeBuffer.PushContext("limit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for limit") - } - _limitErr := writeBuffer.WriteSerializable(ctx, m.GetLimit()) - if popErr := writeBuffer.PopContext("limit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for limit") - } - if _limitErr != nil { - return errors.Wrap(_limitErr, "Error serializing 'limit' field") - } + // Simple Field (limit) + if pushErr := writeBuffer.PushContext("limit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for limit") + } + _limitErr := writeBuffer.WriteSerializable(ctx, m.GetLimit()) + if popErr := writeBuffer.PopContext("limit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for limit") + } + if _limitErr != nil { + return errors.Wrap(_limitErr, "Error serializing 'limit' field") + } - // Simple Field (hvacModeAndFlags) - if pushErr := writeBuffer.PushContext("hvacModeAndFlags"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for hvacModeAndFlags") - } - _hvacModeAndFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetHvacModeAndFlags()) - if popErr := writeBuffer.PopContext("hvacModeAndFlags"); popErr != nil { - return errors.Wrap(popErr, "Error popping for hvacModeAndFlags") - } - if _hvacModeAndFlagsErr != nil { - return errors.Wrap(_hvacModeAndFlagsErr, "Error serializing 'hvacModeAndFlags' field") - } + // Simple Field (hvacModeAndFlags) + if pushErr := writeBuffer.PushContext("hvacModeAndFlags"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for hvacModeAndFlags") + } + _hvacModeAndFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetHvacModeAndFlags()) + if popErr := writeBuffer.PopContext("hvacModeAndFlags"); popErr != nil { + return errors.Wrap(popErr, "Error popping for hvacModeAndFlags") + } + if _hvacModeAndFlagsErr != nil { + return errors.Wrap(_hvacModeAndFlagsErr, "Error serializing 'hvacModeAndFlags' field") + } if popErr := writeBuffer.PopContext("AirConditioningDataSetHumiditySetbackLimit"); popErr != nil { return errors.Wrap(popErr, "Error popping for AirConditioningDataSetHumiditySetbackLimit") @@ -294,6 +299,7 @@ func (m *_AirConditioningDataSetHumiditySetbackLimit) SerializeWithWriteBuffer(c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AirConditioningDataSetHumiditySetbackLimit) isAirConditioningDataSetHumiditySetbackLimit() bool { return true } @@ -308,3 +314,6 @@ func (m *_AirConditioningDataSetHumiditySetbackLimit) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHumidityUpperGuardLimit.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHumidityUpperGuardLimit.go index 51cda2e1219..2889021193a 100644 --- a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHumidityUpperGuardLimit.go +++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHumidityUpperGuardLimit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AirConditioningDataSetHumidityUpperGuardLimit is the corresponding interface of AirConditioningDataSetHumidityUpperGuardLimit type AirConditioningDataSetHumidityUpperGuardLimit interface { @@ -52,12 +54,14 @@ type AirConditioningDataSetHumidityUpperGuardLimitExactly interface { // _AirConditioningDataSetHumidityUpperGuardLimit is the data-structure of this message type _AirConditioningDataSetHumidityUpperGuardLimit struct { *_AirConditioningData - ZoneGroup byte - ZoneList HVACZoneList - Limit HVACHumidity - HvacModeAndFlags HVACHumidityModeAndFlags + ZoneGroup byte + ZoneList HVACZoneList + Limit HVACHumidity + HvacModeAndFlags HVACHumidityModeAndFlags } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -68,14 +72,12 @@ type _AirConditioningDataSetHumidityUpperGuardLimit struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AirConditioningDataSetHumidityUpperGuardLimit) InitializeParent(parent AirConditioningData, commandTypeContainer AirConditioningCommandTypeContainer) { - m.CommandTypeContainer = commandTypeContainer +func (m *_AirConditioningDataSetHumidityUpperGuardLimit) InitializeParent(parent AirConditioningData , commandTypeContainer AirConditioningCommandTypeContainer ) { m.CommandTypeContainer = commandTypeContainer } -func (m *_AirConditioningDataSetHumidityUpperGuardLimit) GetParent() AirConditioningData { +func (m *_AirConditioningDataSetHumidityUpperGuardLimit) GetParent() AirConditioningData { return m._AirConditioningData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -102,14 +104,15 @@ func (m *_AirConditioningDataSetHumidityUpperGuardLimit) GetHvacModeAndFlags() H /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAirConditioningDataSetHumidityUpperGuardLimit factory function for _AirConditioningDataSetHumidityUpperGuardLimit -func NewAirConditioningDataSetHumidityUpperGuardLimit(zoneGroup byte, zoneList HVACZoneList, limit HVACHumidity, hvacModeAndFlags HVACHumidityModeAndFlags, commandTypeContainer AirConditioningCommandTypeContainer) *_AirConditioningDataSetHumidityUpperGuardLimit { +func NewAirConditioningDataSetHumidityUpperGuardLimit( zoneGroup byte , zoneList HVACZoneList , limit HVACHumidity , hvacModeAndFlags HVACHumidityModeAndFlags , commandTypeContainer AirConditioningCommandTypeContainer ) *_AirConditioningDataSetHumidityUpperGuardLimit { _result := &_AirConditioningDataSetHumidityUpperGuardLimit{ - ZoneGroup: zoneGroup, - ZoneList: zoneList, - Limit: limit, - HvacModeAndFlags: hvacModeAndFlags, - _AirConditioningData: NewAirConditioningData(commandTypeContainer), + ZoneGroup: zoneGroup, + ZoneList: zoneList, + Limit: limit, + HvacModeAndFlags: hvacModeAndFlags, + _AirConditioningData: NewAirConditioningData(commandTypeContainer), } _result._AirConditioningData._AirConditioningDataChildRequirements = _result return _result @@ -117,7 +120,7 @@ func NewAirConditioningDataSetHumidityUpperGuardLimit(zoneGroup byte, zoneList H // Deprecated: use the interface for direct cast func CastAirConditioningDataSetHumidityUpperGuardLimit(structType interface{}) AirConditioningDataSetHumidityUpperGuardLimit { - if casted, ok := structType.(AirConditioningDataSetHumidityUpperGuardLimit); ok { + if casted, ok := structType.(AirConditioningDataSetHumidityUpperGuardLimit); ok { return casted } if casted, ok := structType.(*AirConditioningDataSetHumidityUpperGuardLimit); ok { @@ -134,7 +137,7 @@ func (m *_AirConditioningDataSetHumidityUpperGuardLimit) GetLengthInBits(ctx con lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (zoneGroup) - lengthInBits += 8 + lengthInBits += 8; // Simple field (zoneList) lengthInBits += m.ZoneList.GetLengthInBits(ctx) @@ -148,6 +151,7 @@ func (m *_AirConditioningDataSetHumidityUpperGuardLimit) GetLengthInBits(ctx con return lengthInBits } + func (m *_AirConditioningDataSetHumidityUpperGuardLimit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -166,7 +170,7 @@ func AirConditioningDataSetHumidityUpperGuardLimitParseWithBuffer(ctx context.Co _ = currentPos // Simple Field (zoneGroup) - _zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup") +_zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup") if _zoneGroupErr != nil { return nil, errors.Wrap(_zoneGroupErr, "Error parsing 'zoneGroup' field of AirConditioningDataSetHumidityUpperGuardLimit") } @@ -176,7 +180,7 @@ func AirConditioningDataSetHumidityUpperGuardLimitParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("zoneList"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for zoneList") } - _zoneList, _zoneListErr := HVACZoneListParseWithBuffer(ctx, readBuffer) +_zoneList, _zoneListErr := HVACZoneListParseWithBuffer(ctx, readBuffer) if _zoneListErr != nil { return nil, errors.Wrap(_zoneListErr, "Error parsing 'zoneList' field of AirConditioningDataSetHumidityUpperGuardLimit") } @@ -189,7 +193,7 @@ func AirConditioningDataSetHumidityUpperGuardLimitParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("limit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for limit") } - _limit, _limitErr := HVACHumidityParseWithBuffer(ctx, readBuffer) +_limit, _limitErr := HVACHumidityParseWithBuffer(ctx, readBuffer) if _limitErr != nil { return nil, errors.Wrap(_limitErr, "Error parsing 'limit' field of AirConditioningDataSetHumidityUpperGuardLimit") } @@ -202,7 +206,7 @@ func AirConditioningDataSetHumidityUpperGuardLimitParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("hvacModeAndFlags"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for hvacModeAndFlags") } - _hvacModeAndFlags, _hvacModeAndFlagsErr := HVACHumidityModeAndFlagsParseWithBuffer(ctx, readBuffer) +_hvacModeAndFlags, _hvacModeAndFlagsErr := HVACHumidityModeAndFlagsParseWithBuffer(ctx, readBuffer) if _hvacModeAndFlagsErr != nil { return nil, errors.Wrap(_hvacModeAndFlagsErr, "Error parsing 'hvacModeAndFlags' field of AirConditioningDataSetHumidityUpperGuardLimit") } @@ -217,11 +221,12 @@ func AirConditioningDataSetHumidityUpperGuardLimitParseWithBuffer(ctx context.Co // Create a partially initialized instance _child := &_AirConditioningDataSetHumidityUpperGuardLimit{ - _AirConditioningData: &_AirConditioningData{}, - ZoneGroup: zoneGroup, - ZoneList: zoneList, - Limit: limit, - HvacModeAndFlags: hvacModeAndFlags, + _AirConditioningData: &_AirConditioningData{ + }, + ZoneGroup: zoneGroup, + ZoneList: zoneList, + Limit: limit, + HvacModeAndFlags: hvacModeAndFlags, } _child._AirConditioningData._AirConditioningDataChildRequirements = _child return _child, nil @@ -243,48 +248,48 @@ func (m *_AirConditioningDataSetHumidityUpperGuardLimit) SerializeWithWriteBuffe return errors.Wrap(pushErr, "Error pushing for AirConditioningDataSetHumidityUpperGuardLimit") } - // Simple Field (zoneGroup) - zoneGroup := byte(m.GetZoneGroup()) - _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup)) - if _zoneGroupErr != nil { - return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field") - } + // Simple Field (zoneGroup) + zoneGroup := byte(m.GetZoneGroup()) + _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup)) + if _zoneGroupErr != nil { + return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field") + } - // Simple Field (zoneList) - if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for zoneList") - } - _zoneListErr := writeBuffer.WriteSerializable(ctx, m.GetZoneList()) - if popErr := writeBuffer.PopContext("zoneList"); popErr != nil { - return errors.Wrap(popErr, "Error popping for zoneList") - } - if _zoneListErr != nil { - return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field") - } + // Simple Field (zoneList) + if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for zoneList") + } + _zoneListErr := writeBuffer.WriteSerializable(ctx, m.GetZoneList()) + if popErr := writeBuffer.PopContext("zoneList"); popErr != nil { + return errors.Wrap(popErr, "Error popping for zoneList") + } + if _zoneListErr != nil { + return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field") + } - // Simple Field (limit) - if pushErr := writeBuffer.PushContext("limit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for limit") - } - _limitErr := writeBuffer.WriteSerializable(ctx, m.GetLimit()) - if popErr := writeBuffer.PopContext("limit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for limit") - } - if _limitErr != nil { - return errors.Wrap(_limitErr, "Error serializing 'limit' field") - } + // Simple Field (limit) + if pushErr := writeBuffer.PushContext("limit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for limit") + } + _limitErr := writeBuffer.WriteSerializable(ctx, m.GetLimit()) + if popErr := writeBuffer.PopContext("limit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for limit") + } + if _limitErr != nil { + return errors.Wrap(_limitErr, "Error serializing 'limit' field") + } - // Simple Field (hvacModeAndFlags) - if pushErr := writeBuffer.PushContext("hvacModeAndFlags"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for hvacModeAndFlags") - } - _hvacModeAndFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetHvacModeAndFlags()) - if popErr := writeBuffer.PopContext("hvacModeAndFlags"); popErr != nil { - return errors.Wrap(popErr, "Error popping for hvacModeAndFlags") - } - if _hvacModeAndFlagsErr != nil { - return errors.Wrap(_hvacModeAndFlagsErr, "Error serializing 'hvacModeAndFlags' field") - } + // Simple Field (hvacModeAndFlags) + if pushErr := writeBuffer.PushContext("hvacModeAndFlags"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for hvacModeAndFlags") + } + _hvacModeAndFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetHvacModeAndFlags()) + if popErr := writeBuffer.PopContext("hvacModeAndFlags"); popErr != nil { + return errors.Wrap(popErr, "Error popping for hvacModeAndFlags") + } + if _hvacModeAndFlagsErr != nil { + return errors.Wrap(_hvacModeAndFlagsErr, "Error serializing 'hvacModeAndFlags' field") + } if popErr := writeBuffer.PopContext("AirConditioningDataSetHumidityUpperGuardLimit"); popErr != nil { return errors.Wrap(popErr, "Error popping for AirConditioningDataSetHumidityUpperGuardLimit") @@ -294,6 +299,7 @@ func (m *_AirConditioningDataSetHumidityUpperGuardLimit) SerializeWithWriteBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AirConditioningDataSetHumidityUpperGuardLimit) isAirConditioningDataSetHumidityUpperGuardLimit() bool { return true } @@ -308,3 +314,6 @@ func (m *_AirConditioningDataSetHumidityUpperGuardLimit) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHvacLowerGuardLimit.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHvacLowerGuardLimit.go index 27b63231e2f..9a892361b3f 100644 --- a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHvacLowerGuardLimit.go +++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHvacLowerGuardLimit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AirConditioningDataSetHvacLowerGuardLimit is the corresponding interface of AirConditioningDataSetHvacLowerGuardLimit type AirConditioningDataSetHvacLowerGuardLimit interface { @@ -52,12 +54,14 @@ type AirConditioningDataSetHvacLowerGuardLimitExactly interface { // _AirConditioningDataSetHvacLowerGuardLimit is the data-structure of this message type _AirConditioningDataSetHvacLowerGuardLimit struct { *_AirConditioningData - ZoneGroup byte - ZoneList HVACZoneList - Limit HVACTemperature - HvacModeAndFlags HVACModeAndFlags + ZoneGroup byte + ZoneList HVACZoneList + Limit HVACTemperature + HvacModeAndFlags HVACModeAndFlags } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -68,14 +72,12 @@ type _AirConditioningDataSetHvacLowerGuardLimit struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AirConditioningDataSetHvacLowerGuardLimit) InitializeParent(parent AirConditioningData, commandTypeContainer AirConditioningCommandTypeContainer) { - m.CommandTypeContainer = commandTypeContainer +func (m *_AirConditioningDataSetHvacLowerGuardLimit) InitializeParent(parent AirConditioningData , commandTypeContainer AirConditioningCommandTypeContainer ) { m.CommandTypeContainer = commandTypeContainer } -func (m *_AirConditioningDataSetHvacLowerGuardLimit) GetParent() AirConditioningData { +func (m *_AirConditioningDataSetHvacLowerGuardLimit) GetParent() AirConditioningData { return m._AirConditioningData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -102,14 +104,15 @@ func (m *_AirConditioningDataSetHvacLowerGuardLimit) GetHvacModeAndFlags() HVACM /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAirConditioningDataSetHvacLowerGuardLimit factory function for _AirConditioningDataSetHvacLowerGuardLimit -func NewAirConditioningDataSetHvacLowerGuardLimit(zoneGroup byte, zoneList HVACZoneList, limit HVACTemperature, hvacModeAndFlags HVACModeAndFlags, commandTypeContainer AirConditioningCommandTypeContainer) *_AirConditioningDataSetHvacLowerGuardLimit { +func NewAirConditioningDataSetHvacLowerGuardLimit( zoneGroup byte , zoneList HVACZoneList , limit HVACTemperature , hvacModeAndFlags HVACModeAndFlags , commandTypeContainer AirConditioningCommandTypeContainer ) *_AirConditioningDataSetHvacLowerGuardLimit { _result := &_AirConditioningDataSetHvacLowerGuardLimit{ - ZoneGroup: zoneGroup, - ZoneList: zoneList, - Limit: limit, - HvacModeAndFlags: hvacModeAndFlags, - _AirConditioningData: NewAirConditioningData(commandTypeContainer), + ZoneGroup: zoneGroup, + ZoneList: zoneList, + Limit: limit, + HvacModeAndFlags: hvacModeAndFlags, + _AirConditioningData: NewAirConditioningData(commandTypeContainer), } _result._AirConditioningData._AirConditioningDataChildRequirements = _result return _result @@ -117,7 +120,7 @@ func NewAirConditioningDataSetHvacLowerGuardLimit(zoneGroup byte, zoneList HVACZ // Deprecated: use the interface for direct cast func CastAirConditioningDataSetHvacLowerGuardLimit(structType interface{}) AirConditioningDataSetHvacLowerGuardLimit { - if casted, ok := structType.(AirConditioningDataSetHvacLowerGuardLimit); ok { + if casted, ok := structType.(AirConditioningDataSetHvacLowerGuardLimit); ok { return casted } if casted, ok := structType.(*AirConditioningDataSetHvacLowerGuardLimit); ok { @@ -134,7 +137,7 @@ func (m *_AirConditioningDataSetHvacLowerGuardLimit) GetLengthInBits(ctx context lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (zoneGroup) - lengthInBits += 8 + lengthInBits += 8; // Simple field (zoneList) lengthInBits += m.ZoneList.GetLengthInBits(ctx) @@ -148,6 +151,7 @@ func (m *_AirConditioningDataSetHvacLowerGuardLimit) GetLengthInBits(ctx context return lengthInBits } + func (m *_AirConditioningDataSetHvacLowerGuardLimit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -166,7 +170,7 @@ func AirConditioningDataSetHvacLowerGuardLimitParseWithBuffer(ctx context.Contex _ = currentPos // Simple Field (zoneGroup) - _zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup") +_zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup") if _zoneGroupErr != nil { return nil, errors.Wrap(_zoneGroupErr, "Error parsing 'zoneGroup' field of AirConditioningDataSetHvacLowerGuardLimit") } @@ -176,7 +180,7 @@ func AirConditioningDataSetHvacLowerGuardLimitParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("zoneList"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for zoneList") } - _zoneList, _zoneListErr := HVACZoneListParseWithBuffer(ctx, readBuffer) +_zoneList, _zoneListErr := HVACZoneListParseWithBuffer(ctx, readBuffer) if _zoneListErr != nil { return nil, errors.Wrap(_zoneListErr, "Error parsing 'zoneList' field of AirConditioningDataSetHvacLowerGuardLimit") } @@ -189,7 +193,7 @@ func AirConditioningDataSetHvacLowerGuardLimitParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("limit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for limit") } - _limit, _limitErr := HVACTemperatureParseWithBuffer(ctx, readBuffer) +_limit, _limitErr := HVACTemperatureParseWithBuffer(ctx, readBuffer) if _limitErr != nil { return nil, errors.Wrap(_limitErr, "Error parsing 'limit' field of AirConditioningDataSetHvacLowerGuardLimit") } @@ -202,7 +206,7 @@ func AirConditioningDataSetHvacLowerGuardLimitParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("hvacModeAndFlags"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for hvacModeAndFlags") } - _hvacModeAndFlags, _hvacModeAndFlagsErr := HVACModeAndFlagsParseWithBuffer(ctx, readBuffer) +_hvacModeAndFlags, _hvacModeAndFlagsErr := HVACModeAndFlagsParseWithBuffer(ctx, readBuffer) if _hvacModeAndFlagsErr != nil { return nil, errors.Wrap(_hvacModeAndFlagsErr, "Error parsing 'hvacModeAndFlags' field of AirConditioningDataSetHvacLowerGuardLimit") } @@ -217,11 +221,12 @@ func AirConditioningDataSetHvacLowerGuardLimitParseWithBuffer(ctx context.Contex // Create a partially initialized instance _child := &_AirConditioningDataSetHvacLowerGuardLimit{ - _AirConditioningData: &_AirConditioningData{}, - ZoneGroup: zoneGroup, - ZoneList: zoneList, - Limit: limit, - HvacModeAndFlags: hvacModeAndFlags, + _AirConditioningData: &_AirConditioningData{ + }, + ZoneGroup: zoneGroup, + ZoneList: zoneList, + Limit: limit, + HvacModeAndFlags: hvacModeAndFlags, } _child._AirConditioningData._AirConditioningDataChildRequirements = _child return _child, nil @@ -243,48 +248,48 @@ func (m *_AirConditioningDataSetHvacLowerGuardLimit) SerializeWithWriteBuffer(ct return errors.Wrap(pushErr, "Error pushing for AirConditioningDataSetHvacLowerGuardLimit") } - // Simple Field (zoneGroup) - zoneGroup := byte(m.GetZoneGroup()) - _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup)) - if _zoneGroupErr != nil { - return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field") - } + // Simple Field (zoneGroup) + zoneGroup := byte(m.GetZoneGroup()) + _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup)) + if _zoneGroupErr != nil { + return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field") + } - // Simple Field (zoneList) - if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for zoneList") - } - _zoneListErr := writeBuffer.WriteSerializable(ctx, m.GetZoneList()) - if popErr := writeBuffer.PopContext("zoneList"); popErr != nil { - return errors.Wrap(popErr, "Error popping for zoneList") - } - if _zoneListErr != nil { - return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field") - } + // Simple Field (zoneList) + if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for zoneList") + } + _zoneListErr := writeBuffer.WriteSerializable(ctx, m.GetZoneList()) + if popErr := writeBuffer.PopContext("zoneList"); popErr != nil { + return errors.Wrap(popErr, "Error popping for zoneList") + } + if _zoneListErr != nil { + return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field") + } - // Simple Field (limit) - if pushErr := writeBuffer.PushContext("limit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for limit") - } - _limitErr := writeBuffer.WriteSerializable(ctx, m.GetLimit()) - if popErr := writeBuffer.PopContext("limit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for limit") - } - if _limitErr != nil { - return errors.Wrap(_limitErr, "Error serializing 'limit' field") - } + // Simple Field (limit) + if pushErr := writeBuffer.PushContext("limit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for limit") + } + _limitErr := writeBuffer.WriteSerializable(ctx, m.GetLimit()) + if popErr := writeBuffer.PopContext("limit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for limit") + } + if _limitErr != nil { + return errors.Wrap(_limitErr, "Error serializing 'limit' field") + } - // Simple Field (hvacModeAndFlags) - if pushErr := writeBuffer.PushContext("hvacModeAndFlags"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for hvacModeAndFlags") - } - _hvacModeAndFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetHvacModeAndFlags()) - if popErr := writeBuffer.PopContext("hvacModeAndFlags"); popErr != nil { - return errors.Wrap(popErr, "Error popping for hvacModeAndFlags") - } - if _hvacModeAndFlagsErr != nil { - return errors.Wrap(_hvacModeAndFlagsErr, "Error serializing 'hvacModeAndFlags' field") - } + // Simple Field (hvacModeAndFlags) + if pushErr := writeBuffer.PushContext("hvacModeAndFlags"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for hvacModeAndFlags") + } + _hvacModeAndFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetHvacModeAndFlags()) + if popErr := writeBuffer.PopContext("hvacModeAndFlags"); popErr != nil { + return errors.Wrap(popErr, "Error popping for hvacModeAndFlags") + } + if _hvacModeAndFlagsErr != nil { + return errors.Wrap(_hvacModeAndFlagsErr, "Error serializing 'hvacModeAndFlags' field") + } if popErr := writeBuffer.PopContext("AirConditioningDataSetHvacLowerGuardLimit"); popErr != nil { return errors.Wrap(popErr, "Error popping for AirConditioningDataSetHvacLowerGuardLimit") @@ -294,6 +299,7 @@ func (m *_AirConditioningDataSetHvacLowerGuardLimit) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AirConditioningDataSetHvacLowerGuardLimit) isAirConditioningDataSetHvacLowerGuardLimit() bool { return true } @@ -308,3 +314,6 @@ func (m *_AirConditioningDataSetHvacLowerGuardLimit) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHvacSetbackLimit.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHvacSetbackLimit.go index 2f2c6def7b9..662783571c7 100644 --- a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHvacSetbackLimit.go +++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHvacSetbackLimit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AirConditioningDataSetHvacSetbackLimit is the corresponding interface of AirConditioningDataSetHvacSetbackLimit type AirConditioningDataSetHvacSetbackLimit interface { @@ -52,12 +54,14 @@ type AirConditioningDataSetHvacSetbackLimitExactly interface { // _AirConditioningDataSetHvacSetbackLimit is the data-structure of this message type _AirConditioningDataSetHvacSetbackLimit struct { *_AirConditioningData - ZoneGroup byte - ZoneList HVACZoneList - Limit HVACTemperature - HvacModeAndFlags HVACModeAndFlags + ZoneGroup byte + ZoneList HVACZoneList + Limit HVACTemperature + HvacModeAndFlags HVACModeAndFlags } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -68,14 +72,12 @@ type _AirConditioningDataSetHvacSetbackLimit struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AirConditioningDataSetHvacSetbackLimit) InitializeParent(parent AirConditioningData, commandTypeContainer AirConditioningCommandTypeContainer) { - m.CommandTypeContainer = commandTypeContainer +func (m *_AirConditioningDataSetHvacSetbackLimit) InitializeParent(parent AirConditioningData , commandTypeContainer AirConditioningCommandTypeContainer ) { m.CommandTypeContainer = commandTypeContainer } -func (m *_AirConditioningDataSetHvacSetbackLimit) GetParent() AirConditioningData { +func (m *_AirConditioningDataSetHvacSetbackLimit) GetParent() AirConditioningData { return m._AirConditioningData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -102,14 +104,15 @@ func (m *_AirConditioningDataSetHvacSetbackLimit) GetHvacModeAndFlags() HVACMode /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAirConditioningDataSetHvacSetbackLimit factory function for _AirConditioningDataSetHvacSetbackLimit -func NewAirConditioningDataSetHvacSetbackLimit(zoneGroup byte, zoneList HVACZoneList, limit HVACTemperature, hvacModeAndFlags HVACModeAndFlags, commandTypeContainer AirConditioningCommandTypeContainer) *_AirConditioningDataSetHvacSetbackLimit { +func NewAirConditioningDataSetHvacSetbackLimit( zoneGroup byte , zoneList HVACZoneList , limit HVACTemperature , hvacModeAndFlags HVACModeAndFlags , commandTypeContainer AirConditioningCommandTypeContainer ) *_AirConditioningDataSetHvacSetbackLimit { _result := &_AirConditioningDataSetHvacSetbackLimit{ - ZoneGroup: zoneGroup, - ZoneList: zoneList, - Limit: limit, - HvacModeAndFlags: hvacModeAndFlags, - _AirConditioningData: NewAirConditioningData(commandTypeContainer), + ZoneGroup: zoneGroup, + ZoneList: zoneList, + Limit: limit, + HvacModeAndFlags: hvacModeAndFlags, + _AirConditioningData: NewAirConditioningData(commandTypeContainer), } _result._AirConditioningData._AirConditioningDataChildRequirements = _result return _result @@ -117,7 +120,7 @@ func NewAirConditioningDataSetHvacSetbackLimit(zoneGroup byte, zoneList HVACZone // Deprecated: use the interface for direct cast func CastAirConditioningDataSetHvacSetbackLimit(structType interface{}) AirConditioningDataSetHvacSetbackLimit { - if casted, ok := structType.(AirConditioningDataSetHvacSetbackLimit); ok { + if casted, ok := structType.(AirConditioningDataSetHvacSetbackLimit); ok { return casted } if casted, ok := structType.(*AirConditioningDataSetHvacSetbackLimit); ok { @@ -134,7 +137,7 @@ func (m *_AirConditioningDataSetHvacSetbackLimit) GetLengthInBits(ctx context.Co lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (zoneGroup) - lengthInBits += 8 + lengthInBits += 8; // Simple field (zoneList) lengthInBits += m.ZoneList.GetLengthInBits(ctx) @@ -148,6 +151,7 @@ func (m *_AirConditioningDataSetHvacSetbackLimit) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_AirConditioningDataSetHvacSetbackLimit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -166,7 +170,7 @@ func AirConditioningDataSetHvacSetbackLimitParseWithBuffer(ctx context.Context, _ = currentPos // Simple Field (zoneGroup) - _zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup") +_zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup") if _zoneGroupErr != nil { return nil, errors.Wrap(_zoneGroupErr, "Error parsing 'zoneGroup' field of AirConditioningDataSetHvacSetbackLimit") } @@ -176,7 +180,7 @@ func AirConditioningDataSetHvacSetbackLimitParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("zoneList"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for zoneList") } - _zoneList, _zoneListErr := HVACZoneListParseWithBuffer(ctx, readBuffer) +_zoneList, _zoneListErr := HVACZoneListParseWithBuffer(ctx, readBuffer) if _zoneListErr != nil { return nil, errors.Wrap(_zoneListErr, "Error parsing 'zoneList' field of AirConditioningDataSetHvacSetbackLimit") } @@ -189,7 +193,7 @@ func AirConditioningDataSetHvacSetbackLimitParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("limit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for limit") } - _limit, _limitErr := HVACTemperatureParseWithBuffer(ctx, readBuffer) +_limit, _limitErr := HVACTemperatureParseWithBuffer(ctx, readBuffer) if _limitErr != nil { return nil, errors.Wrap(_limitErr, "Error parsing 'limit' field of AirConditioningDataSetHvacSetbackLimit") } @@ -202,7 +206,7 @@ func AirConditioningDataSetHvacSetbackLimitParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("hvacModeAndFlags"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for hvacModeAndFlags") } - _hvacModeAndFlags, _hvacModeAndFlagsErr := HVACModeAndFlagsParseWithBuffer(ctx, readBuffer) +_hvacModeAndFlags, _hvacModeAndFlagsErr := HVACModeAndFlagsParseWithBuffer(ctx, readBuffer) if _hvacModeAndFlagsErr != nil { return nil, errors.Wrap(_hvacModeAndFlagsErr, "Error parsing 'hvacModeAndFlags' field of AirConditioningDataSetHvacSetbackLimit") } @@ -217,11 +221,12 @@ func AirConditioningDataSetHvacSetbackLimitParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_AirConditioningDataSetHvacSetbackLimit{ - _AirConditioningData: &_AirConditioningData{}, - ZoneGroup: zoneGroup, - ZoneList: zoneList, - Limit: limit, - HvacModeAndFlags: hvacModeAndFlags, + _AirConditioningData: &_AirConditioningData{ + }, + ZoneGroup: zoneGroup, + ZoneList: zoneList, + Limit: limit, + HvacModeAndFlags: hvacModeAndFlags, } _child._AirConditioningData._AirConditioningDataChildRequirements = _child return _child, nil @@ -243,48 +248,48 @@ func (m *_AirConditioningDataSetHvacSetbackLimit) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for AirConditioningDataSetHvacSetbackLimit") } - // Simple Field (zoneGroup) - zoneGroup := byte(m.GetZoneGroup()) - _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup)) - if _zoneGroupErr != nil { - return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field") - } + // Simple Field (zoneGroup) + zoneGroup := byte(m.GetZoneGroup()) + _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup)) + if _zoneGroupErr != nil { + return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field") + } - // Simple Field (zoneList) - if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for zoneList") - } - _zoneListErr := writeBuffer.WriteSerializable(ctx, m.GetZoneList()) - if popErr := writeBuffer.PopContext("zoneList"); popErr != nil { - return errors.Wrap(popErr, "Error popping for zoneList") - } - if _zoneListErr != nil { - return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field") - } + // Simple Field (zoneList) + if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for zoneList") + } + _zoneListErr := writeBuffer.WriteSerializable(ctx, m.GetZoneList()) + if popErr := writeBuffer.PopContext("zoneList"); popErr != nil { + return errors.Wrap(popErr, "Error popping for zoneList") + } + if _zoneListErr != nil { + return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field") + } - // Simple Field (limit) - if pushErr := writeBuffer.PushContext("limit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for limit") - } - _limitErr := writeBuffer.WriteSerializable(ctx, m.GetLimit()) - if popErr := writeBuffer.PopContext("limit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for limit") - } - if _limitErr != nil { - return errors.Wrap(_limitErr, "Error serializing 'limit' field") - } + // Simple Field (limit) + if pushErr := writeBuffer.PushContext("limit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for limit") + } + _limitErr := writeBuffer.WriteSerializable(ctx, m.GetLimit()) + if popErr := writeBuffer.PopContext("limit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for limit") + } + if _limitErr != nil { + return errors.Wrap(_limitErr, "Error serializing 'limit' field") + } - // Simple Field (hvacModeAndFlags) - if pushErr := writeBuffer.PushContext("hvacModeAndFlags"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for hvacModeAndFlags") - } - _hvacModeAndFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetHvacModeAndFlags()) - if popErr := writeBuffer.PopContext("hvacModeAndFlags"); popErr != nil { - return errors.Wrap(popErr, "Error popping for hvacModeAndFlags") - } - if _hvacModeAndFlagsErr != nil { - return errors.Wrap(_hvacModeAndFlagsErr, "Error serializing 'hvacModeAndFlags' field") - } + // Simple Field (hvacModeAndFlags) + if pushErr := writeBuffer.PushContext("hvacModeAndFlags"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for hvacModeAndFlags") + } + _hvacModeAndFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetHvacModeAndFlags()) + if popErr := writeBuffer.PopContext("hvacModeAndFlags"); popErr != nil { + return errors.Wrap(popErr, "Error popping for hvacModeAndFlags") + } + if _hvacModeAndFlagsErr != nil { + return errors.Wrap(_hvacModeAndFlagsErr, "Error serializing 'hvacModeAndFlags' field") + } if popErr := writeBuffer.PopContext("AirConditioningDataSetHvacSetbackLimit"); popErr != nil { return errors.Wrap(popErr, "Error popping for AirConditioningDataSetHvacSetbackLimit") @@ -294,6 +299,7 @@ func (m *_AirConditioningDataSetHvacSetbackLimit) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AirConditioningDataSetHvacSetbackLimit) isAirConditioningDataSetHvacSetbackLimit() bool { return true } @@ -308,3 +314,6 @@ func (m *_AirConditioningDataSetHvacSetbackLimit) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHvacUpperGuardLimit.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHvacUpperGuardLimit.go index 100733109d2..a1505684c6a 100644 --- a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHvacUpperGuardLimit.go +++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetHvacUpperGuardLimit.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AirConditioningDataSetHvacUpperGuardLimit is the corresponding interface of AirConditioningDataSetHvacUpperGuardLimit type AirConditioningDataSetHvacUpperGuardLimit interface { @@ -52,12 +54,14 @@ type AirConditioningDataSetHvacUpperGuardLimitExactly interface { // _AirConditioningDataSetHvacUpperGuardLimit is the data-structure of this message type _AirConditioningDataSetHvacUpperGuardLimit struct { *_AirConditioningData - ZoneGroup byte - ZoneList HVACZoneList - Limit HVACTemperature - HvacModeAndFlags HVACModeAndFlags + ZoneGroup byte + ZoneList HVACZoneList + Limit HVACTemperature + HvacModeAndFlags HVACModeAndFlags } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -68,14 +72,12 @@ type _AirConditioningDataSetHvacUpperGuardLimit struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AirConditioningDataSetHvacUpperGuardLimit) InitializeParent(parent AirConditioningData, commandTypeContainer AirConditioningCommandTypeContainer) { - m.CommandTypeContainer = commandTypeContainer +func (m *_AirConditioningDataSetHvacUpperGuardLimit) InitializeParent(parent AirConditioningData , commandTypeContainer AirConditioningCommandTypeContainer ) { m.CommandTypeContainer = commandTypeContainer } -func (m *_AirConditioningDataSetHvacUpperGuardLimit) GetParent() AirConditioningData { +func (m *_AirConditioningDataSetHvacUpperGuardLimit) GetParent() AirConditioningData { return m._AirConditioningData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -102,14 +104,15 @@ func (m *_AirConditioningDataSetHvacUpperGuardLimit) GetHvacModeAndFlags() HVACM /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAirConditioningDataSetHvacUpperGuardLimit factory function for _AirConditioningDataSetHvacUpperGuardLimit -func NewAirConditioningDataSetHvacUpperGuardLimit(zoneGroup byte, zoneList HVACZoneList, limit HVACTemperature, hvacModeAndFlags HVACModeAndFlags, commandTypeContainer AirConditioningCommandTypeContainer) *_AirConditioningDataSetHvacUpperGuardLimit { +func NewAirConditioningDataSetHvacUpperGuardLimit( zoneGroup byte , zoneList HVACZoneList , limit HVACTemperature , hvacModeAndFlags HVACModeAndFlags , commandTypeContainer AirConditioningCommandTypeContainer ) *_AirConditioningDataSetHvacUpperGuardLimit { _result := &_AirConditioningDataSetHvacUpperGuardLimit{ - ZoneGroup: zoneGroup, - ZoneList: zoneList, - Limit: limit, - HvacModeAndFlags: hvacModeAndFlags, - _AirConditioningData: NewAirConditioningData(commandTypeContainer), + ZoneGroup: zoneGroup, + ZoneList: zoneList, + Limit: limit, + HvacModeAndFlags: hvacModeAndFlags, + _AirConditioningData: NewAirConditioningData(commandTypeContainer), } _result._AirConditioningData._AirConditioningDataChildRequirements = _result return _result @@ -117,7 +120,7 @@ func NewAirConditioningDataSetHvacUpperGuardLimit(zoneGroup byte, zoneList HVACZ // Deprecated: use the interface for direct cast func CastAirConditioningDataSetHvacUpperGuardLimit(structType interface{}) AirConditioningDataSetHvacUpperGuardLimit { - if casted, ok := structType.(AirConditioningDataSetHvacUpperGuardLimit); ok { + if casted, ok := structType.(AirConditioningDataSetHvacUpperGuardLimit); ok { return casted } if casted, ok := structType.(*AirConditioningDataSetHvacUpperGuardLimit); ok { @@ -134,7 +137,7 @@ func (m *_AirConditioningDataSetHvacUpperGuardLimit) GetLengthInBits(ctx context lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (zoneGroup) - lengthInBits += 8 + lengthInBits += 8; // Simple field (zoneList) lengthInBits += m.ZoneList.GetLengthInBits(ctx) @@ -148,6 +151,7 @@ func (m *_AirConditioningDataSetHvacUpperGuardLimit) GetLengthInBits(ctx context return lengthInBits } + func (m *_AirConditioningDataSetHvacUpperGuardLimit) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -166,7 +170,7 @@ func AirConditioningDataSetHvacUpperGuardLimitParseWithBuffer(ctx context.Contex _ = currentPos // Simple Field (zoneGroup) - _zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup") +_zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup") if _zoneGroupErr != nil { return nil, errors.Wrap(_zoneGroupErr, "Error parsing 'zoneGroup' field of AirConditioningDataSetHvacUpperGuardLimit") } @@ -176,7 +180,7 @@ func AirConditioningDataSetHvacUpperGuardLimitParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("zoneList"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for zoneList") } - _zoneList, _zoneListErr := HVACZoneListParseWithBuffer(ctx, readBuffer) +_zoneList, _zoneListErr := HVACZoneListParseWithBuffer(ctx, readBuffer) if _zoneListErr != nil { return nil, errors.Wrap(_zoneListErr, "Error parsing 'zoneList' field of AirConditioningDataSetHvacUpperGuardLimit") } @@ -189,7 +193,7 @@ func AirConditioningDataSetHvacUpperGuardLimitParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("limit"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for limit") } - _limit, _limitErr := HVACTemperatureParseWithBuffer(ctx, readBuffer) +_limit, _limitErr := HVACTemperatureParseWithBuffer(ctx, readBuffer) if _limitErr != nil { return nil, errors.Wrap(_limitErr, "Error parsing 'limit' field of AirConditioningDataSetHvacUpperGuardLimit") } @@ -202,7 +206,7 @@ func AirConditioningDataSetHvacUpperGuardLimitParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("hvacModeAndFlags"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for hvacModeAndFlags") } - _hvacModeAndFlags, _hvacModeAndFlagsErr := HVACModeAndFlagsParseWithBuffer(ctx, readBuffer) +_hvacModeAndFlags, _hvacModeAndFlagsErr := HVACModeAndFlagsParseWithBuffer(ctx, readBuffer) if _hvacModeAndFlagsErr != nil { return nil, errors.Wrap(_hvacModeAndFlagsErr, "Error parsing 'hvacModeAndFlags' field of AirConditioningDataSetHvacUpperGuardLimit") } @@ -217,11 +221,12 @@ func AirConditioningDataSetHvacUpperGuardLimitParseWithBuffer(ctx context.Contex // Create a partially initialized instance _child := &_AirConditioningDataSetHvacUpperGuardLimit{ - _AirConditioningData: &_AirConditioningData{}, - ZoneGroup: zoneGroup, - ZoneList: zoneList, - Limit: limit, - HvacModeAndFlags: hvacModeAndFlags, + _AirConditioningData: &_AirConditioningData{ + }, + ZoneGroup: zoneGroup, + ZoneList: zoneList, + Limit: limit, + HvacModeAndFlags: hvacModeAndFlags, } _child._AirConditioningData._AirConditioningDataChildRequirements = _child return _child, nil @@ -243,48 +248,48 @@ func (m *_AirConditioningDataSetHvacUpperGuardLimit) SerializeWithWriteBuffer(ct return errors.Wrap(pushErr, "Error pushing for AirConditioningDataSetHvacUpperGuardLimit") } - // Simple Field (zoneGroup) - zoneGroup := byte(m.GetZoneGroup()) - _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup)) - if _zoneGroupErr != nil { - return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field") - } + // Simple Field (zoneGroup) + zoneGroup := byte(m.GetZoneGroup()) + _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup)) + if _zoneGroupErr != nil { + return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field") + } - // Simple Field (zoneList) - if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for zoneList") - } - _zoneListErr := writeBuffer.WriteSerializable(ctx, m.GetZoneList()) - if popErr := writeBuffer.PopContext("zoneList"); popErr != nil { - return errors.Wrap(popErr, "Error popping for zoneList") - } - if _zoneListErr != nil { - return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field") - } + // Simple Field (zoneList) + if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for zoneList") + } + _zoneListErr := writeBuffer.WriteSerializable(ctx, m.GetZoneList()) + if popErr := writeBuffer.PopContext("zoneList"); popErr != nil { + return errors.Wrap(popErr, "Error popping for zoneList") + } + if _zoneListErr != nil { + return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field") + } - // Simple Field (limit) - if pushErr := writeBuffer.PushContext("limit"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for limit") - } - _limitErr := writeBuffer.WriteSerializable(ctx, m.GetLimit()) - if popErr := writeBuffer.PopContext("limit"); popErr != nil { - return errors.Wrap(popErr, "Error popping for limit") - } - if _limitErr != nil { - return errors.Wrap(_limitErr, "Error serializing 'limit' field") - } + // Simple Field (limit) + if pushErr := writeBuffer.PushContext("limit"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for limit") + } + _limitErr := writeBuffer.WriteSerializable(ctx, m.GetLimit()) + if popErr := writeBuffer.PopContext("limit"); popErr != nil { + return errors.Wrap(popErr, "Error popping for limit") + } + if _limitErr != nil { + return errors.Wrap(_limitErr, "Error serializing 'limit' field") + } - // Simple Field (hvacModeAndFlags) - if pushErr := writeBuffer.PushContext("hvacModeAndFlags"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for hvacModeAndFlags") - } - _hvacModeAndFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetHvacModeAndFlags()) - if popErr := writeBuffer.PopContext("hvacModeAndFlags"); popErr != nil { - return errors.Wrap(popErr, "Error popping for hvacModeAndFlags") - } - if _hvacModeAndFlagsErr != nil { - return errors.Wrap(_hvacModeAndFlagsErr, "Error serializing 'hvacModeAndFlags' field") - } + // Simple Field (hvacModeAndFlags) + if pushErr := writeBuffer.PushContext("hvacModeAndFlags"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for hvacModeAndFlags") + } + _hvacModeAndFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetHvacModeAndFlags()) + if popErr := writeBuffer.PopContext("hvacModeAndFlags"); popErr != nil { + return errors.Wrap(popErr, "Error popping for hvacModeAndFlags") + } + if _hvacModeAndFlagsErr != nil { + return errors.Wrap(_hvacModeAndFlagsErr, "Error serializing 'hvacModeAndFlags' field") + } if popErr := writeBuffer.PopContext("AirConditioningDataSetHvacUpperGuardLimit"); popErr != nil { return errors.Wrap(popErr, "Error popping for AirConditioningDataSetHvacUpperGuardLimit") @@ -294,6 +299,7 @@ func (m *_AirConditioningDataSetHvacUpperGuardLimit) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AirConditioningDataSetHvacUpperGuardLimit) isAirConditioningDataSetHvacUpperGuardLimit() bool { return true } @@ -308,3 +314,6 @@ func (m *_AirConditioningDataSetHvacUpperGuardLimit) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetPlantHumidityLevel.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetPlantHumidityLevel.go index c75a2e39f98..2814fe1311a 100644 --- a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetPlantHumidityLevel.go +++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetPlantHumidityLevel.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AirConditioningDataSetPlantHumidityLevel is the corresponding interface of AirConditioningDataSetPlantHumidityLevel type AirConditioningDataSetPlantHumidityLevel interface { @@ -59,15 +61,17 @@ type AirConditioningDataSetPlantHumidityLevelExactly interface { // _AirConditioningDataSetPlantHumidityLevel is the data-structure of this message type _AirConditioningDataSetPlantHumidityLevel struct { *_AirConditioningData - ZoneGroup byte - ZoneList HVACZoneList - HumidityModeAndFlags HVACHumidityModeAndFlags - HumidityType HVACHumidityType - Level HVACHumidity - RawLevel HVACRawLevels - AuxLevel HVACAuxiliaryLevel + ZoneGroup byte + ZoneList HVACZoneList + HumidityModeAndFlags HVACHumidityModeAndFlags + HumidityType HVACHumidityType + Level HVACHumidity + RawLevel HVACRawLevels + AuxLevel HVACAuxiliaryLevel } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -78,14 +82,12 @@ type _AirConditioningDataSetPlantHumidityLevel struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AirConditioningDataSetPlantHumidityLevel) InitializeParent(parent AirConditioningData, commandTypeContainer AirConditioningCommandTypeContainer) { - m.CommandTypeContainer = commandTypeContainer +func (m *_AirConditioningDataSetPlantHumidityLevel) InitializeParent(parent AirConditioningData , commandTypeContainer AirConditioningCommandTypeContainer ) { m.CommandTypeContainer = commandTypeContainer } -func (m *_AirConditioningDataSetPlantHumidityLevel) GetParent() AirConditioningData { +func (m *_AirConditioningDataSetPlantHumidityLevel) GetParent() AirConditioningData { return m._AirConditioningData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -124,17 +126,18 @@ func (m *_AirConditioningDataSetPlantHumidityLevel) GetAuxLevel() HVACAuxiliaryL /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAirConditioningDataSetPlantHumidityLevel factory function for _AirConditioningDataSetPlantHumidityLevel -func NewAirConditioningDataSetPlantHumidityLevel(zoneGroup byte, zoneList HVACZoneList, humidityModeAndFlags HVACHumidityModeAndFlags, humidityType HVACHumidityType, level HVACHumidity, rawLevel HVACRawLevels, auxLevel HVACAuxiliaryLevel, commandTypeContainer AirConditioningCommandTypeContainer) *_AirConditioningDataSetPlantHumidityLevel { +func NewAirConditioningDataSetPlantHumidityLevel( zoneGroup byte , zoneList HVACZoneList , humidityModeAndFlags HVACHumidityModeAndFlags , humidityType HVACHumidityType , level HVACHumidity , rawLevel HVACRawLevels , auxLevel HVACAuxiliaryLevel , commandTypeContainer AirConditioningCommandTypeContainer ) *_AirConditioningDataSetPlantHumidityLevel { _result := &_AirConditioningDataSetPlantHumidityLevel{ - ZoneGroup: zoneGroup, - ZoneList: zoneList, + ZoneGroup: zoneGroup, + ZoneList: zoneList, HumidityModeAndFlags: humidityModeAndFlags, - HumidityType: humidityType, - Level: level, - RawLevel: rawLevel, - AuxLevel: auxLevel, - _AirConditioningData: NewAirConditioningData(commandTypeContainer), + HumidityType: humidityType, + Level: level, + RawLevel: rawLevel, + AuxLevel: auxLevel, + _AirConditioningData: NewAirConditioningData(commandTypeContainer), } _result._AirConditioningData._AirConditioningDataChildRequirements = _result return _result @@ -142,7 +145,7 @@ func NewAirConditioningDataSetPlantHumidityLevel(zoneGroup byte, zoneList HVACZo // Deprecated: use the interface for direct cast func CastAirConditioningDataSetPlantHumidityLevel(structType interface{}) AirConditioningDataSetPlantHumidityLevel { - if casted, ok := structType.(AirConditioningDataSetPlantHumidityLevel); ok { + if casted, ok := structType.(AirConditioningDataSetPlantHumidityLevel); ok { return casted } if casted, ok := structType.(*AirConditioningDataSetPlantHumidityLevel); ok { @@ -159,7 +162,7 @@ func (m *_AirConditioningDataSetPlantHumidityLevel) GetLengthInBits(ctx context. lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (zoneGroup) - lengthInBits += 8 + lengthInBits += 8; // Simple field (zoneList) lengthInBits += m.ZoneList.GetLengthInBits(ctx) @@ -188,6 +191,7 @@ func (m *_AirConditioningDataSetPlantHumidityLevel) GetLengthInBits(ctx context. return lengthInBits } + func (m *_AirConditioningDataSetPlantHumidityLevel) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -206,7 +210,7 @@ func AirConditioningDataSetPlantHumidityLevelParseWithBuffer(ctx context.Context _ = currentPos // Simple Field (zoneGroup) - _zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup") +_zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup") if _zoneGroupErr != nil { return nil, errors.Wrap(_zoneGroupErr, "Error parsing 'zoneGroup' field of AirConditioningDataSetPlantHumidityLevel") } @@ -216,7 +220,7 @@ func AirConditioningDataSetPlantHumidityLevelParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("zoneList"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for zoneList") } - _zoneList, _zoneListErr := HVACZoneListParseWithBuffer(ctx, readBuffer) +_zoneList, _zoneListErr := HVACZoneListParseWithBuffer(ctx, readBuffer) if _zoneListErr != nil { return nil, errors.Wrap(_zoneListErr, "Error parsing 'zoneList' field of AirConditioningDataSetPlantHumidityLevel") } @@ -229,7 +233,7 @@ func AirConditioningDataSetPlantHumidityLevelParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("humidityModeAndFlags"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for humidityModeAndFlags") } - _humidityModeAndFlags, _humidityModeAndFlagsErr := HVACHumidityModeAndFlagsParseWithBuffer(ctx, readBuffer) +_humidityModeAndFlags, _humidityModeAndFlagsErr := HVACHumidityModeAndFlagsParseWithBuffer(ctx, readBuffer) if _humidityModeAndFlagsErr != nil { return nil, errors.Wrap(_humidityModeAndFlagsErr, "Error parsing 'humidityModeAndFlags' field of AirConditioningDataSetPlantHumidityLevel") } @@ -242,7 +246,7 @@ func AirConditioningDataSetPlantHumidityLevelParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("humidityType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for humidityType") } - _humidityType, _humidityTypeErr := HVACHumidityTypeParseWithBuffer(ctx, readBuffer) +_humidityType, _humidityTypeErr := HVACHumidityTypeParseWithBuffer(ctx, readBuffer) if _humidityTypeErr != nil { return nil, errors.Wrap(_humidityTypeErr, "Error parsing 'humidityType' field of AirConditioningDataSetPlantHumidityLevel") } @@ -258,7 +262,7 @@ func AirConditioningDataSetPlantHumidityLevelParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("level"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for level") } - _val, _err := HVACHumidityParseWithBuffer(ctx, readBuffer) +_val, _err := HVACHumidityParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -280,7 +284,7 @@ func AirConditioningDataSetPlantHumidityLevelParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("rawLevel"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for rawLevel") } - _val, _err := HVACRawLevelsParseWithBuffer(ctx, readBuffer) +_val, _err := HVACRawLevelsParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -302,7 +306,7 @@ func AirConditioningDataSetPlantHumidityLevelParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("auxLevel"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for auxLevel") } - _val, _err := HVACAuxiliaryLevelParseWithBuffer(ctx, readBuffer) +_val, _err := HVACAuxiliaryLevelParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -323,14 +327,15 @@ func AirConditioningDataSetPlantHumidityLevelParseWithBuffer(ctx context.Context // Create a partially initialized instance _child := &_AirConditioningDataSetPlantHumidityLevel{ - _AirConditioningData: &_AirConditioningData{}, - ZoneGroup: zoneGroup, - ZoneList: zoneList, + _AirConditioningData: &_AirConditioningData{ + }, + ZoneGroup: zoneGroup, + ZoneList: zoneList, HumidityModeAndFlags: humidityModeAndFlags, - HumidityType: humidityType, - Level: level, - RawLevel: rawLevel, - AuxLevel: auxLevel, + HumidityType: humidityType, + Level: level, + RawLevel: rawLevel, + AuxLevel: auxLevel, } _child._AirConditioningData._AirConditioningDataChildRequirements = _child return _child, nil @@ -352,96 +357,96 @@ func (m *_AirConditioningDataSetPlantHumidityLevel) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for AirConditioningDataSetPlantHumidityLevel") } - // Simple Field (zoneGroup) - zoneGroup := byte(m.GetZoneGroup()) - _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup)) - if _zoneGroupErr != nil { - return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field") - } + // Simple Field (zoneGroup) + zoneGroup := byte(m.GetZoneGroup()) + _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup)) + if _zoneGroupErr != nil { + return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field") + } - // Simple Field (zoneList) - if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for zoneList") - } - _zoneListErr := writeBuffer.WriteSerializable(ctx, m.GetZoneList()) - if popErr := writeBuffer.PopContext("zoneList"); popErr != nil { - return errors.Wrap(popErr, "Error popping for zoneList") - } - if _zoneListErr != nil { - return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field") - } + // Simple Field (zoneList) + if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for zoneList") + } + _zoneListErr := writeBuffer.WriteSerializable(ctx, m.GetZoneList()) + if popErr := writeBuffer.PopContext("zoneList"); popErr != nil { + return errors.Wrap(popErr, "Error popping for zoneList") + } + if _zoneListErr != nil { + return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field") + } - // Simple Field (humidityModeAndFlags) - if pushErr := writeBuffer.PushContext("humidityModeAndFlags"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for humidityModeAndFlags") + // Simple Field (humidityModeAndFlags) + if pushErr := writeBuffer.PushContext("humidityModeAndFlags"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for humidityModeAndFlags") + } + _humidityModeAndFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetHumidityModeAndFlags()) + if popErr := writeBuffer.PopContext("humidityModeAndFlags"); popErr != nil { + return errors.Wrap(popErr, "Error popping for humidityModeAndFlags") + } + if _humidityModeAndFlagsErr != nil { + return errors.Wrap(_humidityModeAndFlagsErr, "Error serializing 'humidityModeAndFlags' field") + } + + // Simple Field (humidityType) + if pushErr := writeBuffer.PushContext("humidityType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for humidityType") + } + _humidityTypeErr := writeBuffer.WriteSerializable(ctx, m.GetHumidityType()) + if popErr := writeBuffer.PopContext("humidityType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for humidityType") + } + if _humidityTypeErr != nil { + return errors.Wrap(_humidityTypeErr, "Error serializing 'humidityType' field") + } + + // Optional Field (level) (Can be skipped, if the value is null) + var level HVACHumidity = nil + if m.GetLevel() != nil { + if pushErr := writeBuffer.PushContext("level"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for level") } - _humidityModeAndFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetHumidityModeAndFlags()) - if popErr := writeBuffer.PopContext("humidityModeAndFlags"); popErr != nil { - return errors.Wrap(popErr, "Error popping for humidityModeAndFlags") + level = m.GetLevel() + _levelErr := writeBuffer.WriteSerializable(ctx, level) + if popErr := writeBuffer.PopContext("level"); popErr != nil { + return errors.Wrap(popErr, "Error popping for level") } - if _humidityModeAndFlagsErr != nil { - return errors.Wrap(_humidityModeAndFlagsErr, "Error serializing 'humidityModeAndFlags' field") + if _levelErr != nil { + return errors.Wrap(_levelErr, "Error serializing 'level' field") } + } - // Simple Field (humidityType) - if pushErr := writeBuffer.PushContext("humidityType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for humidityType") + // Optional Field (rawLevel) (Can be skipped, if the value is null) + var rawLevel HVACRawLevels = nil + if m.GetRawLevel() != nil { + if pushErr := writeBuffer.PushContext("rawLevel"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for rawLevel") } - _humidityTypeErr := writeBuffer.WriteSerializable(ctx, m.GetHumidityType()) - if popErr := writeBuffer.PopContext("humidityType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for humidityType") + rawLevel = m.GetRawLevel() + _rawLevelErr := writeBuffer.WriteSerializable(ctx, rawLevel) + if popErr := writeBuffer.PopContext("rawLevel"); popErr != nil { + return errors.Wrap(popErr, "Error popping for rawLevel") } - if _humidityTypeErr != nil { - return errors.Wrap(_humidityTypeErr, "Error serializing 'humidityType' field") + if _rawLevelErr != nil { + return errors.Wrap(_rawLevelErr, "Error serializing 'rawLevel' field") } + } - // Optional Field (level) (Can be skipped, if the value is null) - var level HVACHumidity = nil - if m.GetLevel() != nil { - if pushErr := writeBuffer.PushContext("level"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for level") - } - level = m.GetLevel() - _levelErr := writeBuffer.WriteSerializable(ctx, level) - if popErr := writeBuffer.PopContext("level"); popErr != nil { - return errors.Wrap(popErr, "Error popping for level") - } - if _levelErr != nil { - return errors.Wrap(_levelErr, "Error serializing 'level' field") - } + // Optional Field (auxLevel) (Can be skipped, if the value is null) + var auxLevel HVACAuxiliaryLevel = nil + if m.GetAuxLevel() != nil { + if pushErr := writeBuffer.PushContext("auxLevel"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for auxLevel") } - - // Optional Field (rawLevel) (Can be skipped, if the value is null) - var rawLevel HVACRawLevels = nil - if m.GetRawLevel() != nil { - if pushErr := writeBuffer.PushContext("rawLevel"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for rawLevel") - } - rawLevel = m.GetRawLevel() - _rawLevelErr := writeBuffer.WriteSerializable(ctx, rawLevel) - if popErr := writeBuffer.PopContext("rawLevel"); popErr != nil { - return errors.Wrap(popErr, "Error popping for rawLevel") - } - if _rawLevelErr != nil { - return errors.Wrap(_rawLevelErr, "Error serializing 'rawLevel' field") - } + auxLevel = m.GetAuxLevel() + _auxLevelErr := writeBuffer.WriteSerializable(ctx, auxLevel) + if popErr := writeBuffer.PopContext("auxLevel"); popErr != nil { + return errors.Wrap(popErr, "Error popping for auxLevel") } - - // Optional Field (auxLevel) (Can be skipped, if the value is null) - var auxLevel HVACAuxiliaryLevel = nil - if m.GetAuxLevel() != nil { - if pushErr := writeBuffer.PushContext("auxLevel"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for auxLevel") - } - auxLevel = m.GetAuxLevel() - _auxLevelErr := writeBuffer.WriteSerializable(ctx, auxLevel) - if popErr := writeBuffer.PopContext("auxLevel"); popErr != nil { - return errors.Wrap(popErr, "Error popping for auxLevel") - } - if _auxLevelErr != nil { - return errors.Wrap(_auxLevelErr, "Error serializing 'auxLevel' field") - } + if _auxLevelErr != nil { + return errors.Wrap(_auxLevelErr, "Error serializing 'auxLevel' field") } + } if popErr := writeBuffer.PopContext("AirConditioningDataSetPlantHumidityLevel"); popErr != nil { return errors.Wrap(popErr, "Error popping for AirConditioningDataSetPlantHumidityLevel") @@ -451,6 +456,7 @@ func (m *_AirConditioningDataSetPlantHumidityLevel) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AirConditioningDataSetPlantHumidityLevel) isAirConditioningDataSetPlantHumidityLevel() bool { return true } @@ -465,3 +471,6 @@ func (m *_AirConditioningDataSetPlantHumidityLevel) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetPlantHvacLevel.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetPlantHvacLevel.go index bc8654a4d8b..c3535a6df9b 100644 --- a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetPlantHvacLevel.go +++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetPlantHvacLevel.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AirConditioningDataSetPlantHvacLevel is the corresponding interface of AirConditioningDataSetPlantHvacLevel type AirConditioningDataSetPlantHvacLevel interface { @@ -59,15 +61,17 @@ type AirConditioningDataSetPlantHvacLevelExactly interface { // _AirConditioningDataSetPlantHvacLevel is the data-structure of this message type _AirConditioningDataSetPlantHvacLevel struct { *_AirConditioningData - ZoneGroup byte - ZoneList HVACZoneList - HvacModeAndFlags HVACModeAndFlags - HvacType HVACType - Level HVACTemperature - RawLevel HVACRawLevels - AuxLevel HVACAuxiliaryLevel + ZoneGroup byte + ZoneList HVACZoneList + HvacModeAndFlags HVACModeAndFlags + HvacType HVACType + Level HVACTemperature + RawLevel HVACRawLevels + AuxLevel HVACAuxiliaryLevel } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -78,14 +82,12 @@ type _AirConditioningDataSetPlantHvacLevel struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AirConditioningDataSetPlantHvacLevel) InitializeParent(parent AirConditioningData, commandTypeContainer AirConditioningCommandTypeContainer) { - m.CommandTypeContainer = commandTypeContainer +func (m *_AirConditioningDataSetPlantHvacLevel) InitializeParent(parent AirConditioningData , commandTypeContainer AirConditioningCommandTypeContainer ) { m.CommandTypeContainer = commandTypeContainer } -func (m *_AirConditioningDataSetPlantHvacLevel) GetParent() AirConditioningData { +func (m *_AirConditioningDataSetPlantHvacLevel) GetParent() AirConditioningData { return m._AirConditioningData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -124,17 +126,18 @@ func (m *_AirConditioningDataSetPlantHvacLevel) GetAuxLevel() HVACAuxiliaryLevel /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAirConditioningDataSetPlantHvacLevel factory function for _AirConditioningDataSetPlantHvacLevel -func NewAirConditioningDataSetPlantHvacLevel(zoneGroup byte, zoneList HVACZoneList, hvacModeAndFlags HVACModeAndFlags, hvacType HVACType, level HVACTemperature, rawLevel HVACRawLevels, auxLevel HVACAuxiliaryLevel, commandTypeContainer AirConditioningCommandTypeContainer) *_AirConditioningDataSetPlantHvacLevel { +func NewAirConditioningDataSetPlantHvacLevel( zoneGroup byte , zoneList HVACZoneList , hvacModeAndFlags HVACModeAndFlags , hvacType HVACType , level HVACTemperature , rawLevel HVACRawLevels , auxLevel HVACAuxiliaryLevel , commandTypeContainer AirConditioningCommandTypeContainer ) *_AirConditioningDataSetPlantHvacLevel { _result := &_AirConditioningDataSetPlantHvacLevel{ - ZoneGroup: zoneGroup, - ZoneList: zoneList, - HvacModeAndFlags: hvacModeAndFlags, - HvacType: hvacType, - Level: level, - RawLevel: rawLevel, - AuxLevel: auxLevel, - _AirConditioningData: NewAirConditioningData(commandTypeContainer), + ZoneGroup: zoneGroup, + ZoneList: zoneList, + HvacModeAndFlags: hvacModeAndFlags, + HvacType: hvacType, + Level: level, + RawLevel: rawLevel, + AuxLevel: auxLevel, + _AirConditioningData: NewAirConditioningData(commandTypeContainer), } _result._AirConditioningData._AirConditioningDataChildRequirements = _result return _result @@ -142,7 +145,7 @@ func NewAirConditioningDataSetPlantHvacLevel(zoneGroup byte, zoneList HVACZoneLi // Deprecated: use the interface for direct cast func CastAirConditioningDataSetPlantHvacLevel(structType interface{}) AirConditioningDataSetPlantHvacLevel { - if casted, ok := structType.(AirConditioningDataSetPlantHvacLevel); ok { + if casted, ok := structType.(AirConditioningDataSetPlantHvacLevel); ok { return casted } if casted, ok := structType.(*AirConditioningDataSetPlantHvacLevel); ok { @@ -159,7 +162,7 @@ func (m *_AirConditioningDataSetPlantHvacLevel) GetLengthInBits(ctx context.Cont lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (zoneGroup) - lengthInBits += 8 + lengthInBits += 8; // Simple field (zoneList) lengthInBits += m.ZoneList.GetLengthInBits(ctx) @@ -188,6 +191,7 @@ func (m *_AirConditioningDataSetPlantHvacLevel) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_AirConditioningDataSetPlantHvacLevel) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -206,7 +210,7 @@ func AirConditioningDataSetPlantHvacLevelParseWithBuffer(ctx context.Context, re _ = currentPos // Simple Field (zoneGroup) - _zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup") +_zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup") if _zoneGroupErr != nil { return nil, errors.Wrap(_zoneGroupErr, "Error parsing 'zoneGroup' field of AirConditioningDataSetPlantHvacLevel") } @@ -216,7 +220,7 @@ func AirConditioningDataSetPlantHvacLevelParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("zoneList"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for zoneList") } - _zoneList, _zoneListErr := HVACZoneListParseWithBuffer(ctx, readBuffer) +_zoneList, _zoneListErr := HVACZoneListParseWithBuffer(ctx, readBuffer) if _zoneListErr != nil { return nil, errors.Wrap(_zoneListErr, "Error parsing 'zoneList' field of AirConditioningDataSetPlantHvacLevel") } @@ -229,7 +233,7 @@ func AirConditioningDataSetPlantHvacLevelParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("hvacModeAndFlags"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for hvacModeAndFlags") } - _hvacModeAndFlags, _hvacModeAndFlagsErr := HVACModeAndFlagsParseWithBuffer(ctx, readBuffer) +_hvacModeAndFlags, _hvacModeAndFlagsErr := HVACModeAndFlagsParseWithBuffer(ctx, readBuffer) if _hvacModeAndFlagsErr != nil { return nil, errors.Wrap(_hvacModeAndFlagsErr, "Error parsing 'hvacModeAndFlags' field of AirConditioningDataSetPlantHvacLevel") } @@ -242,7 +246,7 @@ func AirConditioningDataSetPlantHvacLevelParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("hvacType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for hvacType") } - _hvacType, _hvacTypeErr := HVACTypeParseWithBuffer(ctx, readBuffer) +_hvacType, _hvacTypeErr := HVACTypeParseWithBuffer(ctx, readBuffer) if _hvacTypeErr != nil { return nil, errors.Wrap(_hvacTypeErr, "Error parsing 'hvacType' field of AirConditioningDataSetPlantHvacLevel") } @@ -258,7 +262,7 @@ func AirConditioningDataSetPlantHvacLevelParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("level"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for level") } - _val, _err := HVACTemperatureParseWithBuffer(ctx, readBuffer) +_val, _err := HVACTemperatureParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -280,7 +284,7 @@ func AirConditioningDataSetPlantHvacLevelParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("rawLevel"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for rawLevel") } - _val, _err := HVACRawLevelsParseWithBuffer(ctx, readBuffer) +_val, _err := HVACRawLevelsParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -302,7 +306,7 @@ func AirConditioningDataSetPlantHvacLevelParseWithBuffer(ctx context.Context, re if pullErr := readBuffer.PullContext("auxLevel"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for auxLevel") } - _val, _err := HVACAuxiliaryLevelParseWithBuffer(ctx, readBuffer) +_val, _err := HVACAuxiliaryLevelParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -323,14 +327,15 @@ func AirConditioningDataSetPlantHvacLevelParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_AirConditioningDataSetPlantHvacLevel{ - _AirConditioningData: &_AirConditioningData{}, - ZoneGroup: zoneGroup, - ZoneList: zoneList, - HvacModeAndFlags: hvacModeAndFlags, - HvacType: hvacType, - Level: level, - RawLevel: rawLevel, - AuxLevel: auxLevel, + _AirConditioningData: &_AirConditioningData{ + }, + ZoneGroup: zoneGroup, + ZoneList: zoneList, + HvacModeAndFlags: hvacModeAndFlags, + HvacType: hvacType, + Level: level, + RawLevel: rawLevel, + AuxLevel: auxLevel, } _child._AirConditioningData._AirConditioningDataChildRequirements = _child return _child, nil @@ -352,96 +357,96 @@ func (m *_AirConditioningDataSetPlantHvacLevel) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for AirConditioningDataSetPlantHvacLevel") } - // Simple Field (zoneGroup) - zoneGroup := byte(m.GetZoneGroup()) - _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup)) - if _zoneGroupErr != nil { - return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field") - } + // Simple Field (zoneGroup) + zoneGroup := byte(m.GetZoneGroup()) + _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup)) + if _zoneGroupErr != nil { + return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field") + } - // Simple Field (zoneList) - if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for zoneList") - } - _zoneListErr := writeBuffer.WriteSerializable(ctx, m.GetZoneList()) - if popErr := writeBuffer.PopContext("zoneList"); popErr != nil { - return errors.Wrap(popErr, "Error popping for zoneList") - } - if _zoneListErr != nil { - return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field") - } + // Simple Field (zoneList) + if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for zoneList") + } + _zoneListErr := writeBuffer.WriteSerializable(ctx, m.GetZoneList()) + if popErr := writeBuffer.PopContext("zoneList"); popErr != nil { + return errors.Wrap(popErr, "Error popping for zoneList") + } + if _zoneListErr != nil { + return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field") + } - // Simple Field (hvacModeAndFlags) - if pushErr := writeBuffer.PushContext("hvacModeAndFlags"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for hvacModeAndFlags") + // Simple Field (hvacModeAndFlags) + if pushErr := writeBuffer.PushContext("hvacModeAndFlags"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for hvacModeAndFlags") + } + _hvacModeAndFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetHvacModeAndFlags()) + if popErr := writeBuffer.PopContext("hvacModeAndFlags"); popErr != nil { + return errors.Wrap(popErr, "Error popping for hvacModeAndFlags") + } + if _hvacModeAndFlagsErr != nil { + return errors.Wrap(_hvacModeAndFlagsErr, "Error serializing 'hvacModeAndFlags' field") + } + + // Simple Field (hvacType) + if pushErr := writeBuffer.PushContext("hvacType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for hvacType") + } + _hvacTypeErr := writeBuffer.WriteSerializable(ctx, m.GetHvacType()) + if popErr := writeBuffer.PopContext("hvacType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for hvacType") + } + if _hvacTypeErr != nil { + return errors.Wrap(_hvacTypeErr, "Error serializing 'hvacType' field") + } + + // Optional Field (level) (Can be skipped, if the value is null) + var level HVACTemperature = nil + if m.GetLevel() != nil { + if pushErr := writeBuffer.PushContext("level"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for level") } - _hvacModeAndFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetHvacModeAndFlags()) - if popErr := writeBuffer.PopContext("hvacModeAndFlags"); popErr != nil { - return errors.Wrap(popErr, "Error popping for hvacModeAndFlags") + level = m.GetLevel() + _levelErr := writeBuffer.WriteSerializable(ctx, level) + if popErr := writeBuffer.PopContext("level"); popErr != nil { + return errors.Wrap(popErr, "Error popping for level") } - if _hvacModeAndFlagsErr != nil { - return errors.Wrap(_hvacModeAndFlagsErr, "Error serializing 'hvacModeAndFlags' field") + if _levelErr != nil { + return errors.Wrap(_levelErr, "Error serializing 'level' field") } + } - // Simple Field (hvacType) - if pushErr := writeBuffer.PushContext("hvacType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for hvacType") + // Optional Field (rawLevel) (Can be skipped, if the value is null) + var rawLevel HVACRawLevels = nil + if m.GetRawLevel() != nil { + if pushErr := writeBuffer.PushContext("rawLevel"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for rawLevel") } - _hvacTypeErr := writeBuffer.WriteSerializable(ctx, m.GetHvacType()) - if popErr := writeBuffer.PopContext("hvacType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for hvacType") + rawLevel = m.GetRawLevel() + _rawLevelErr := writeBuffer.WriteSerializable(ctx, rawLevel) + if popErr := writeBuffer.PopContext("rawLevel"); popErr != nil { + return errors.Wrap(popErr, "Error popping for rawLevel") } - if _hvacTypeErr != nil { - return errors.Wrap(_hvacTypeErr, "Error serializing 'hvacType' field") + if _rawLevelErr != nil { + return errors.Wrap(_rawLevelErr, "Error serializing 'rawLevel' field") } + } - // Optional Field (level) (Can be skipped, if the value is null) - var level HVACTemperature = nil - if m.GetLevel() != nil { - if pushErr := writeBuffer.PushContext("level"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for level") - } - level = m.GetLevel() - _levelErr := writeBuffer.WriteSerializable(ctx, level) - if popErr := writeBuffer.PopContext("level"); popErr != nil { - return errors.Wrap(popErr, "Error popping for level") - } - if _levelErr != nil { - return errors.Wrap(_levelErr, "Error serializing 'level' field") - } + // Optional Field (auxLevel) (Can be skipped, if the value is null) + var auxLevel HVACAuxiliaryLevel = nil + if m.GetAuxLevel() != nil { + if pushErr := writeBuffer.PushContext("auxLevel"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for auxLevel") } - - // Optional Field (rawLevel) (Can be skipped, if the value is null) - var rawLevel HVACRawLevels = nil - if m.GetRawLevel() != nil { - if pushErr := writeBuffer.PushContext("rawLevel"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for rawLevel") - } - rawLevel = m.GetRawLevel() - _rawLevelErr := writeBuffer.WriteSerializable(ctx, rawLevel) - if popErr := writeBuffer.PopContext("rawLevel"); popErr != nil { - return errors.Wrap(popErr, "Error popping for rawLevel") - } - if _rawLevelErr != nil { - return errors.Wrap(_rawLevelErr, "Error serializing 'rawLevel' field") - } + auxLevel = m.GetAuxLevel() + _auxLevelErr := writeBuffer.WriteSerializable(ctx, auxLevel) + if popErr := writeBuffer.PopContext("auxLevel"); popErr != nil { + return errors.Wrap(popErr, "Error popping for auxLevel") } - - // Optional Field (auxLevel) (Can be skipped, if the value is null) - var auxLevel HVACAuxiliaryLevel = nil - if m.GetAuxLevel() != nil { - if pushErr := writeBuffer.PushContext("auxLevel"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for auxLevel") - } - auxLevel = m.GetAuxLevel() - _auxLevelErr := writeBuffer.WriteSerializable(ctx, auxLevel) - if popErr := writeBuffer.PopContext("auxLevel"); popErr != nil { - return errors.Wrap(popErr, "Error popping for auxLevel") - } - if _auxLevelErr != nil { - return errors.Wrap(_auxLevelErr, "Error serializing 'auxLevel' field") - } + if _auxLevelErr != nil { + return errors.Wrap(_auxLevelErr, "Error serializing 'auxLevel' field") } + } if popErr := writeBuffer.PopContext("AirConditioningDataSetPlantHvacLevel"); popErr != nil { return errors.Wrap(popErr, "Error popping for AirConditioningDataSetPlantHvacLevel") @@ -451,6 +456,7 @@ func (m *_AirConditioningDataSetPlantHvacLevel) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AirConditioningDataSetPlantHvacLevel) isAirConditioningDataSetPlantHvacLevel() bool { return true } @@ -465,3 +471,6 @@ func (m *_AirConditioningDataSetPlantHvacLevel) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetZoneGroupOff.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetZoneGroupOff.go index 5f867c7b8a4..4eb85b8f046 100644 --- a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetZoneGroupOff.go +++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetZoneGroupOff.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AirConditioningDataSetZoneGroupOff is the corresponding interface of AirConditioningDataSetZoneGroupOff type AirConditioningDataSetZoneGroupOff interface { @@ -46,9 +48,11 @@ type AirConditioningDataSetZoneGroupOffExactly interface { // _AirConditioningDataSetZoneGroupOff is the data-structure of this message type _AirConditioningDataSetZoneGroupOff struct { *_AirConditioningData - ZoneGroup byte + ZoneGroup byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _AirConditioningDataSetZoneGroupOff struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AirConditioningDataSetZoneGroupOff) InitializeParent(parent AirConditioningData, commandTypeContainer AirConditioningCommandTypeContainer) { - m.CommandTypeContainer = commandTypeContainer +func (m *_AirConditioningDataSetZoneGroupOff) InitializeParent(parent AirConditioningData , commandTypeContainer AirConditioningCommandTypeContainer ) { m.CommandTypeContainer = commandTypeContainer } -func (m *_AirConditioningDataSetZoneGroupOff) GetParent() AirConditioningData { +func (m *_AirConditioningDataSetZoneGroupOff) GetParent() AirConditioningData { return m._AirConditioningData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_AirConditioningDataSetZoneGroupOff) GetZoneGroup() byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAirConditioningDataSetZoneGroupOff factory function for _AirConditioningDataSetZoneGroupOff -func NewAirConditioningDataSetZoneGroupOff(zoneGroup byte, commandTypeContainer AirConditioningCommandTypeContainer) *_AirConditioningDataSetZoneGroupOff { +func NewAirConditioningDataSetZoneGroupOff( zoneGroup byte , commandTypeContainer AirConditioningCommandTypeContainer ) *_AirConditioningDataSetZoneGroupOff { _result := &_AirConditioningDataSetZoneGroupOff{ - ZoneGroup: zoneGroup, - _AirConditioningData: NewAirConditioningData(commandTypeContainer), + ZoneGroup: zoneGroup, + _AirConditioningData: NewAirConditioningData(commandTypeContainer), } _result._AirConditioningData._AirConditioningDataChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewAirConditioningDataSetZoneGroupOff(zoneGroup byte, commandTypeContainer // Deprecated: use the interface for direct cast func CastAirConditioningDataSetZoneGroupOff(structType interface{}) AirConditioningDataSetZoneGroupOff { - if casted, ok := structType.(AirConditioningDataSetZoneGroupOff); ok { + if casted, ok := structType.(AirConditioningDataSetZoneGroupOff); ok { return casted } if casted, ok := structType.(*AirConditioningDataSetZoneGroupOff); ok { @@ -110,11 +113,12 @@ func (m *_AirConditioningDataSetZoneGroupOff) GetLengthInBits(ctx context.Contex lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (zoneGroup) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_AirConditioningDataSetZoneGroupOff) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -133,7 +137,7 @@ func AirConditioningDataSetZoneGroupOffParseWithBuffer(ctx context.Context, read _ = currentPos // Simple Field (zoneGroup) - _zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup") +_zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup") if _zoneGroupErr != nil { return nil, errors.Wrap(_zoneGroupErr, "Error parsing 'zoneGroup' field of AirConditioningDataSetZoneGroupOff") } @@ -145,8 +149,9 @@ func AirConditioningDataSetZoneGroupOffParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_AirConditioningDataSetZoneGroupOff{ - _AirConditioningData: &_AirConditioningData{}, - ZoneGroup: zoneGroup, + _AirConditioningData: &_AirConditioningData{ + }, + ZoneGroup: zoneGroup, } _child._AirConditioningData._AirConditioningDataChildRequirements = _child return _child, nil @@ -168,12 +173,12 @@ func (m *_AirConditioningDataSetZoneGroupOff) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for AirConditioningDataSetZoneGroupOff") } - // Simple Field (zoneGroup) - zoneGroup := byte(m.GetZoneGroup()) - _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup)) - if _zoneGroupErr != nil { - return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field") - } + // Simple Field (zoneGroup) + zoneGroup := byte(m.GetZoneGroup()) + _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup)) + if _zoneGroupErr != nil { + return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field") + } if popErr := writeBuffer.PopContext("AirConditioningDataSetZoneGroupOff"); popErr != nil { return errors.Wrap(popErr, "Error popping for AirConditioningDataSetZoneGroupOff") @@ -183,6 +188,7 @@ func (m *_AirConditioningDataSetZoneGroupOff) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AirConditioningDataSetZoneGroupOff) isAirConditioningDataSetZoneGroupOff() bool { return true } @@ -197,3 +203,6 @@ func (m *_AirConditioningDataSetZoneGroupOff) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetZoneGroupOn.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetZoneGroupOn.go index 0455f30c6bd..da8ef2c7e65 100644 --- a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetZoneGroupOn.go +++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetZoneGroupOn.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AirConditioningDataSetZoneGroupOn is the corresponding interface of AirConditioningDataSetZoneGroupOn type AirConditioningDataSetZoneGroupOn interface { @@ -46,9 +48,11 @@ type AirConditioningDataSetZoneGroupOnExactly interface { // _AirConditioningDataSetZoneGroupOn is the data-structure of this message type _AirConditioningDataSetZoneGroupOn struct { *_AirConditioningData - ZoneGroup byte + ZoneGroup byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _AirConditioningDataSetZoneGroupOn struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AirConditioningDataSetZoneGroupOn) InitializeParent(parent AirConditioningData, commandTypeContainer AirConditioningCommandTypeContainer) { - m.CommandTypeContainer = commandTypeContainer +func (m *_AirConditioningDataSetZoneGroupOn) InitializeParent(parent AirConditioningData , commandTypeContainer AirConditioningCommandTypeContainer ) { m.CommandTypeContainer = commandTypeContainer } -func (m *_AirConditioningDataSetZoneGroupOn) GetParent() AirConditioningData { +func (m *_AirConditioningDataSetZoneGroupOn) GetParent() AirConditioningData { return m._AirConditioningData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_AirConditioningDataSetZoneGroupOn) GetZoneGroup() byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAirConditioningDataSetZoneGroupOn factory function for _AirConditioningDataSetZoneGroupOn -func NewAirConditioningDataSetZoneGroupOn(zoneGroup byte, commandTypeContainer AirConditioningCommandTypeContainer) *_AirConditioningDataSetZoneGroupOn { +func NewAirConditioningDataSetZoneGroupOn( zoneGroup byte , commandTypeContainer AirConditioningCommandTypeContainer ) *_AirConditioningDataSetZoneGroupOn { _result := &_AirConditioningDataSetZoneGroupOn{ - ZoneGroup: zoneGroup, - _AirConditioningData: NewAirConditioningData(commandTypeContainer), + ZoneGroup: zoneGroup, + _AirConditioningData: NewAirConditioningData(commandTypeContainer), } _result._AirConditioningData._AirConditioningDataChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewAirConditioningDataSetZoneGroupOn(zoneGroup byte, commandTypeContainer A // Deprecated: use the interface for direct cast func CastAirConditioningDataSetZoneGroupOn(structType interface{}) AirConditioningDataSetZoneGroupOn { - if casted, ok := structType.(AirConditioningDataSetZoneGroupOn); ok { + if casted, ok := structType.(AirConditioningDataSetZoneGroupOn); ok { return casted } if casted, ok := structType.(*AirConditioningDataSetZoneGroupOn); ok { @@ -110,11 +113,12 @@ func (m *_AirConditioningDataSetZoneGroupOn) GetLengthInBits(ctx context.Context lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (zoneGroup) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_AirConditioningDataSetZoneGroupOn) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -133,7 +137,7 @@ func AirConditioningDataSetZoneGroupOnParseWithBuffer(ctx context.Context, readB _ = currentPos // Simple Field (zoneGroup) - _zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup") +_zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup") if _zoneGroupErr != nil { return nil, errors.Wrap(_zoneGroupErr, "Error parsing 'zoneGroup' field of AirConditioningDataSetZoneGroupOn") } @@ -145,8 +149,9 @@ func AirConditioningDataSetZoneGroupOnParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_AirConditioningDataSetZoneGroupOn{ - _AirConditioningData: &_AirConditioningData{}, - ZoneGroup: zoneGroup, + _AirConditioningData: &_AirConditioningData{ + }, + ZoneGroup: zoneGroup, } _child._AirConditioningData._AirConditioningDataChildRequirements = _child return _child, nil @@ -168,12 +173,12 @@ func (m *_AirConditioningDataSetZoneGroupOn) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for AirConditioningDataSetZoneGroupOn") } - // Simple Field (zoneGroup) - zoneGroup := byte(m.GetZoneGroup()) - _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup)) - if _zoneGroupErr != nil { - return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field") - } + // Simple Field (zoneGroup) + zoneGroup := byte(m.GetZoneGroup()) + _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup)) + if _zoneGroupErr != nil { + return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field") + } if popErr := writeBuffer.PopContext("AirConditioningDataSetZoneGroupOn"); popErr != nil { return errors.Wrap(popErr, "Error popping for AirConditioningDataSetZoneGroupOn") @@ -183,6 +188,7 @@ func (m *_AirConditioningDataSetZoneGroupOn) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AirConditioningDataSetZoneGroupOn) isAirConditioningDataSetZoneGroupOn() bool { return true } @@ -197,3 +203,6 @@ func (m *_AirConditioningDataSetZoneGroupOn) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetZoneHumidityMode.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetZoneHumidityMode.go index f2192aea58d..8ab0fe5175a 100644 --- a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetZoneHumidityMode.go +++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetZoneHumidityMode.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AirConditioningDataSetZoneHumidityMode is the corresponding interface of AirConditioningDataSetZoneHumidityMode type AirConditioningDataSetZoneHumidityMode interface { @@ -59,15 +61,17 @@ type AirConditioningDataSetZoneHumidityModeExactly interface { // _AirConditioningDataSetZoneHumidityMode is the data-structure of this message type _AirConditioningDataSetZoneHumidityMode struct { *_AirConditioningData - ZoneGroup byte - ZoneList HVACZoneList - HumidityModeAndFlags HVACHumidityModeAndFlags - HumidityType HVACHumidityType - Level HVACHumidity - RawLevel HVACRawLevels - AuxLevel HVACAuxiliaryLevel + ZoneGroup byte + ZoneList HVACZoneList + HumidityModeAndFlags HVACHumidityModeAndFlags + HumidityType HVACHumidityType + Level HVACHumidity + RawLevel HVACRawLevels + AuxLevel HVACAuxiliaryLevel } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -78,14 +82,12 @@ type _AirConditioningDataSetZoneHumidityMode struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AirConditioningDataSetZoneHumidityMode) InitializeParent(parent AirConditioningData, commandTypeContainer AirConditioningCommandTypeContainer) { - m.CommandTypeContainer = commandTypeContainer +func (m *_AirConditioningDataSetZoneHumidityMode) InitializeParent(parent AirConditioningData , commandTypeContainer AirConditioningCommandTypeContainer ) { m.CommandTypeContainer = commandTypeContainer } -func (m *_AirConditioningDataSetZoneHumidityMode) GetParent() AirConditioningData { +func (m *_AirConditioningDataSetZoneHumidityMode) GetParent() AirConditioningData { return m._AirConditioningData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -124,17 +126,18 @@ func (m *_AirConditioningDataSetZoneHumidityMode) GetAuxLevel() HVACAuxiliaryLev /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAirConditioningDataSetZoneHumidityMode factory function for _AirConditioningDataSetZoneHumidityMode -func NewAirConditioningDataSetZoneHumidityMode(zoneGroup byte, zoneList HVACZoneList, humidityModeAndFlags HVACHumidityModeAndFlags, humidityType HVACHumidityType, level HVACHumidity, rawLevel HVACRawLevels, auxLevel HVACAuxiliaryLevel, commandTypeContainer AirConditioningCommandTypeContainer) *_AirConditioningDataSetZoneHumidityMode { +func NewAirConditioningDataSetZoneHumidityMode( zoneGroup byte , zoneList HVACZoneList , humidityModeAndFlags HVACHumidityModeAndFlags , humidityType HVACHumidityType , level HVACHumidity , rawLevel HVACRawLevels , auxLevel HVACAuxiliaryLevel , commandTypeContainer AirConditioningCommandTypeContainer ) *_AirConditioningDataSetZoneHumidityMode { _result := &_AirConditioningDataSetZoneHumidityMode{ - ZoneGroup: zoneGroup, - ZoneList: zoneList, + ZoneGroup: zoneGroup, + ZoneList: zoneList, HumidityModeAndFlags: humidityModeAndFlags, - HumidityType: humidityType, - Level: level, - RawLevel: rawLevel, - AuxLevel: auxLevel, - _AirConditioningData: NewAirConditioningData(commandTypeContainer), + HumidityType: humidityType, + Level: level, + RawLevel: rawLevel, + AuxLevel: auxLevel, + _AirConditioningData: NewAirConditioningData(commandTypeContainer), } _result._AirConditioningData._AirConditioningDataChildRequirements = _result return _result @@ -142,7 +145,7 @@ func NewAirConditioningDataSetZoneHumidityMode(zoneGroup byte, zoneList HVACZone // Deprecated: use the interface for direct cast func CastAirConditioningDataSetZoneHumidityMode(structType interface{}) AirConditioningDataSetZoneHumidityMode { - if casted, ok := structType.(AirConditioningDataSetZoneHumidityMode); ok { + if casted, ok := structType.(AirConditioningDataSetZoneHumidityMode); ok { return casted } if casted, ok := structType.(*AirConditioningDataSetZoneHumidityMode); ok { @@ -159,7 +162,7 @@ func (m *_AirConditioningDataSetZoneHumidityMode) GetLengthInBits(ctx context.Co lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (zoneGroup) - lengthInBits += 8 + lengthInBits += 8; // Simple field (zoneList) lengthInBits += m.ZoneList.GetLengthInBits(ctx) @@ -188,6 +191,7 @@ func (m *_AirConditioningDataSetZoneHumidityMode) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_AirConditioningDataSetZoneHumidityMode) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -206,7 +210,7 @@ func AirConditioningDataSetZoneHumidityModeParseWithBuffer(ctx context.Context, _ = currentPos // Simple Field (zoneGroup) - _zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup") +_zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup") if _zoneGroupErr != nil { return nil, errors.Wrap(_zoneGroupErr, "Error parsing 'zoneGroup' field of AirConditioningDataSetZoneHumidityMode") } @@ -216,7 +220,7 @@ func AirConditioningDataSetZoneHumidityModeParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("zoneList"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for zoneList") } - _zoneList, _zoneListErr := HVACZoneListParseWithBuffer(ctx, readBuffer) +_zoneList, _zoneListErr := HVACZoneListParseWithBuffer(ctx, readBuffer) if _zoneListErr != nil { return nil, errors.Wrap(_zoneListErr, "Error parsing 'zoneList' field of AirConditioningDataSetZoneHumidityMode") } @@ -229,7 +233,7 @@ func AirConditioningDataSetZoneHumidityModeParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("humidityModeAndFlags"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for humidityModeAndFlags") } - _humidityModeAndFlags, _humidityModeAndFlagsErr := HVACHumidityModeAndFlagsParseWithBuffer(ctx, readBuffer) +_humidityModeAndFlags, _humidityModeAndFlagsErr := HVACHumidityModeAndFlagsParseWithBuffer(ctx, readBuffer) if _humidityModeAndFlagsErr != nil { return nil, errors.Wrap(_humidityModeAndFlagsErr, "Error parsing 'humidityModeAndFlags' field of AirConditioningDataSetZoneHumidityMode") } @@ -242,7 +246,7 @@ func AirConditioningDataSetZoneHumidityModeParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("humidityType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for humidityType") } - _humidityType, _humidityTypeErr := HVACHumidityTypeParseWithBuffer(ctx, readBuffer) +_humidityType, _humidityTypeErr := HVACHumidityTypeParseWithBuffer(ctx, readBuffer) if _humidityTypeErr != nil { return nil, errors.Wrap(_humidityTypeErr, "Error parsing 'humidityType' field of AirConditioningDataSetZoneHumidityMode") } @@ -258,7 +262,7 @@ func AirConditioningDataSetZoneHumidityModeParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("level"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for level") } - _val, _err := HVACHumidityParseWithBuffer(ctx, readBuffer) +_val, _err := HVACHumidityParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -280,7 +284,7 @@ func AirConditioningDataSetZoneHumidityModeParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("rawLevel"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for rawLevel") } - _val, _err := HVACRawLevelsParseWithBuffer(ctx, readBuffer) +_val, _err := HVACRawLevelsParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -302,7 +306,7 @@ func AirConditioningDataSetZoneHumidityModeParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("auxLevel"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for auxLevel") } - _val, _err := HVACAuxiliaryLevelParseWithBuffer(ctx, readBuffer) +_val, _err := HVACAuxiliaryLevelParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -323,14 +327,15 @@ func AirConditioningDataSetZoneHumidityModeParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_AirConditioningDataSetZoneHumidityMode{ - _AirConditioningData: &_AirConditioningData{}, - ZoneGroup: zoneGroup, - ZoneList: zoneList, + _AirConditioningData: &_AirConditioningData{ + }, + ZoneGroup: zoneGroup, + ZoneList: zoneList, HumidityModeAndFlags: humidityModeAndFlags, - HumidityType: humidityType, - Level: level, - RawLevel: rawLevel, - AuxLevel: auxLevel, + HumidityType: humidityType, + Level: level, + RawLevel: rawLevel, + AuxLevel: auxLevel, } _child._AirConditioningData._AirConditioningDataChildRequirements = _child return _child, nil @@ -352,96 +357,96 @@ func (m *_AirConditioningDataSetZoneHumidityMode) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for AirConditioningDataSetZoneHumidityMode") } - // Simple Field (zoneGroup) - zoneGroup := byte(m.GetZoneGroup()) - _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup)) - if _zoneGroupErr != nil { - return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field") - } + // Simple Field (zoneGroup) + zoneGroup := byte(m.GetZoneGroup()) + _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup)) + if _zoneGroupErr != nil { + return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field") + } - // Simple Field (zoneList) - if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for zoneList") - } - _zoneListErr := writeBuffer.WriteSerializable(ctx, m.GetZoneList()) - if popErr := writeBuffer.PopContext("zoneList"); popErr != nil { - return errors.Wrap(popErr, "Error popping for zoneList") - } - if _zoneListErr != nil { - return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field") - } + // Simple Field (zoneList) + if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for zoneList") + } + _zoneListErr := writeBuffer.WriteSerializable(ctx, m.GetZoneList()) + if popErr := writeBuffer.PopContext("zoneList"); popErr != nil { + return errors.Wrap(popErr, "Error popping for zoneList") + } + if _zoneListErr != nil { + return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field") + } - // Simple Field (humidityModeAndFlags) - if pushErr := writeBuffer.PushContext("humidityModeAndFlags"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for humidityModeAndFlags") + // Simple Field (humidityModeAndFlags) + if pushErr := writeBuffer.PushContext("humidityModeAndFlags"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for humidityModeAndFlags") + } + _humidityModeAndFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetHumidityModeAndFlags()) + if popErr := writeBuffer.PopContext("humidityModeAndFlags"); popErr != nil { + return errors.Wrap(popErr, "Error popping for humidityModeAndFlags") + } + if _humidityModeAndFlagsErr != nil { + return errors.Wrap(_humidityModeAndFlagsErr, "Error serializing 'humidityModeAndFlags' field") + } + + // Simple Field (humidityType) + if pushErr := writeBuffer.PushContext("humidityType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for humidityType") + } + _humidityTypeErr := writeBuffer.WriteSerializable(ctx, m.GetHumidityType()) + if popErr := writeBuffer.PopContext("humidityType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for humidityType") + } + if _humidityTypeErr != nil { + return errors.Wrap(_humidityTypeErr, "Error serializing 'humidityType' field") + } + + // Optional Field (level) (Can be skipped, if the value is null) + var level HVACHumidity = nil + if m.GetLevel() != nil { + if pushErr := writeBuffer.PushContext("level"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for level") } - _humidityModeAndFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetHumidityModeAndFlags()) - if popErr := writeBuffer.PopContext("humidityModeAndFlags"); popErr != nil { - return errors.Wrap(popErr, "Error popping for humidityModeAndFlags") + level = m.GetLevel() + _levelErr := writeBuffer.WriteSerializable(ctx, level) + if popErr := writeBuffer.PopContext("level"); popErr != nil { + return errors.Wrap(popErr, "Error popping for level") } - if _humidityModeAndFlagsErr != nil { - return errors.Wrap(_humidityModeAndFlagsErr, "Error serializing 'humidityModeAndFlags' field") + if _levelErr != nil { + return errors.Wrap(_levelErr, "Error serializing 'level' field") } + } - // Simple Field (humidityType) - if pushErr := writeBuffer.PushContext("humidityType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for humidityType") + // Optional Field (rawLevel) (Can be skipped, if the value is null) + var rawLevel HVACRawLevels = nil + if m.GetRawLevel() != nil { + if pushErr := writeBuffer.PushContext("rawLevel"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for rawLevel") } - _humidityTypeErr := writeBuffer.WriteSerializable(ctx, m.GetHumidityType()) - if popErr := writeBuffer.PopContext("humidityType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for humidityType") + rawLevel = m.GetRawLevel() + _rawLevelErr := writeBuffer.WriteSerializable(ctx, rawLevel) + if popErr := writeBuffer.PopContext("rawLevel"); popErr != nil { + return errors.Wrap(popErr, "Error popping for rawLevel") } - if _humidityTypeErr != nil { - return errors.Wrap(_humidityTypeErr, "Error serializing 'humidityType' field") + if _rawLevelErr != nil { + return errors.Wrap(_rawLevelErr, "Error serializing 'rawLevel' field") } + } - // Optional Field (level) (Can be skipped, if the value is null) - var level HVACHumidity = nil - if m.GetLevel() != nil { - if pushErr := writeBuffer.PushContext("level"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for level") - } - level = m.GetLevel() - _levelErr := writeBuffer.WriteSerializable(ctx, level) - if popErr := writeBuffer.PopContext("level"); popErr != nil { - return errors.Wrap(popErr, "Error popping for level") - } - if _levelErr != nil { - return errors.Wrap(_levelErr, "Error serializing 'level' field") - } + // Optional Field (auxLevel) (Can be skipped, if the value is null) + var auxLevel HVACAuxiliaryLevel = nil + if m.GetAuxLevel() != nil { + if pushErr := writeBuffer.PushContext("auxLevel"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for auxLevel") } - - // Optional Field (rawLevel) (Can be skipped, if the value is null) - var rawLevel HVACRawLevels = nil - if m.GetRawLevel() != nil { - if pushErr := writeBuffer.PushContext("rawLevel"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for rawLevel") - } - rawLevel = m.GetRawLevel() - _rawLevelErr := writeBuffer.WriteSerializable(ctx, rawLevel) - if popErr := writeBuffer.PopContext("rawLevel"); popErr != nil { - return errors.Wrap(popErr, "Error popping for rawLevel") - } - if _rawLevelErr != nil { - return errors.Wrap(_rawLevelErr, "Error serializing 'rawLevel' field") - } + auxLevel = m.GetAuxLevel() + _auxLevelErr := writeBuffer.WriteSerializable(ctx, auxLevel) + if popErr := writeBuffer.PopContext("auxLevel"); popErr != nil { + return errors.Wrap(popErr, "Error popping for auxLevel") } - - // Optional Field (auxLevel) (Can be skipped, if the value is null) - var auxLevel HVACAuxiliaryLevel = nil - if m.GetAuxLevel() != nil { - if pushErr := writeBuffer.PushContext("auxLevel"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for auxLevel") - } - auxLevel = m.GetAuxLevel() - _auxLevelErr := writeBuffer.WriteSerializable(ctx, auxLevel) - if popErr := writeBuffer.PopContext("auxLevel"); popErr != nil { - return errors.Wrap(popErr, "Error popping for auxLevel") - } - if _auxLevelErr != nil { - return errors.Wrap(_auxLevelErr, "Error serializing 'auxLevel' field") - } + if _auxLevelErr != nil { + return errors.Wrap(_auxLevelErr, "Error serializing 'auxLevel' field") } + } if popErr := writeBuffer.PopContext("AirConditioningDataSetZoneHumidityMode"); popErr != nil { return errors.Wrap(popErr, "Error popping for AirConditioningDataSetZoneHumidityMode") @@ -451,6 +456,7 @@ func (m *_AirConditioningDataSetZoneHumidityMode) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AirConditioningDataSetZoneHumidityMode) isAirConditioningDataSetZoneHumidityMode() bool { return true } @@ -465,3 +471,6 @@ func (m *_AirConditioningDataSetZoneHumidityMode) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetZoneHvacMode.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetZoneHvacMode.go index 93610619df6..6343cb3c8f9 100644 --- a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetZoneHvacMode.go +++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataSetZoneHvacMode.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AirConditioningDataSetZoneHvacMode is the corresponding interface of AirConditioningDataSetZoneHvacMode type AirConditioningDataSetZoneHvacMode interface { @@ -59,15 +61,17 @@ type AirConditioningDataSetZoneHvacModeExactly interface { // _AirConditioningDataSetZoneHvacMode is the data-structure of this message type _AirConditioningDataSetZoneHvacMode struct { *_AirConditioningData - ZoneGroup byte - ZoneList HVACZoneList - HvacModeAndFlags HVACModeAndFlags - HvacType HVACType - Level HVACTemperature - RawLevel HVACRawLevels - AuxLevel HVACAuxiliaryLevel + ZoneGroup byte + ZoneList HVACZoneList + HvacModeAndFlags HVACModeAndFlags + HvacType HVACType + Level HVACTemperature + RawLevel HVACRawLevels + AuxLevel HVACAuxiliaryLevel } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -78,14 +82,12 @@ type _AirConditioningDataSetZoneHvacMode struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AirConditioningDataSetZoneHvacMode) InitializeParent(parent AirConditioningData, commandTypeContainer AirConditioningCommandTypeContainer) { - m.CommandTypeContainer = commandTypeContainer +func (m *_AirConditioningDataSetZoneHvacMode) InitializeParent(parent AirConditioningData , commandTypeContainer AirConditioningCommandTypeContainer ) { m.CommandTypeContainer = commandTypeContainer } -func (m *_AirConditioningDataSetZoneHvacMode) GetParent() AirConditioningData { +func (m *_AirConditioningDataSetZoneHvacMode) GetParent() AirConditioningData { return m._AirConditioningData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -124,17 +126,18 @@ func (m *_AirConditioningDataSetZoneHvacMode) GetAuxLevel() HVACAuxiliaryLevel { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAirConditioningDataSetZoneHvacMode factory function for _AirConditioningDataSetZoneHvacMode -func NewAirConditioningDataSetZoneHvacMode(zoneGroup byte, zoneList HVACZoneList, hvacModeAndFlags HVACModeAndFlags, hvacType HVACType, level HVACTemperature, rawLevel HVACRawLevels, auxLevel HVACAuxiliaryLevel, commandTypeContainer AirConditioningCommandTypeContainer) *_AirConditioningDataSetZoneHvacMode { +func NewAirConditioningDataSetZoneHvacMode( zoneGroup byte , zoneList HVACZoneList , hvacModeAndFlags HVACModeAndFlags , hvacType HVACType , level HVACTemperature , rawLevel HVACRawLevels , auxLevel HVACAuxiliaryLevel , commandTypeContainer AirConditioningCommandTypeContainer ) *_AirConditioningDataSetZoneHvacMode { _result := &_AirConditioningDataSetZoneHvacMode{ - ZoneGroup: zoneGroup, - ZoneList: zoneList, - HvacModeAndFlags: hvacModeAndFlags, - HvacType: hvacType, - Level: level, - RawLevel: rawLevel, - AuxLevel: auxLevel, - _AirConditioningData: NewAirConditioningData(commandTypeContainer), + ZoneGroup: zoneGroup, + ZoneList: zoneList, + HvacModeAndFlags: hvacModeAndFlags, + HvacType: hvacType, + Level: level, + RawLevel: rawLevel, + AuxLevel: auxLevel, + _AirConditioningData: NewAirConditioningData(commandTypeContainer), } _result._AirConditioningData._AirConditioningDataChildRequirements = _result return _result @@ -142,7 +145,7 @@ func NewAirConditioningDataSetZoneHvacMode(zoneGroup byte, zoneList HVACZoneList // Deprecated: use the interface for direct cast func CastAirConditioningDataSetZoneHvacMode(structType interface{}) AirConditioningDataSetZoneHvacMode { - if casted, ok := structType.(AirConditioningDataSetZoneHvacMode); ok { + if casted, ok := structType.(AirConditioningDataSetZoneHvacMode); ok { return casted } if casted, ok := structType.(*AirConditioningDataSetZoneHvacMode); ok { @@ -159,7 +162,7 @@ func (m *_AirConditioningDataSetZoneHvacMode) GetLengthInBits(ctx context.Contex lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (zoneGroup) - lengthInBits += 8 + lengthInBits += 8; // Simple field (zoneList) lengthInBits += m.ZoneList.GetLengthInBits(ctx) @@ -188,6 +191,7 @@ func (m *_AirConditioningDataSetZoneHvacMode) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_AirConditioningDataSetZoneHvacMode) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -206,7 +210,7 @@ func AirConditioningDataSetZoneHvacModeParseWithBuffer(ctx context.Context, read _ = currentPos // Simple Field (zoneGroup) - _zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup") +_zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup") if _zoneGroupErr != nil { return nil, errors.Wrap(_zoneGroupErr, "Error parsing 'zoneGroup' field of AirConditioningDataSetZoneHvacMode") } @@ -216,7 +220,7 @@ func AirConditioningDataSetZoneHvacModeParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("zoneList"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for zoneList") } - _zoneList, _zoneListErr := HVACZoneListParseWithBuffer(ctx, readBuffer) +_zoneList, _zoneListErr := HVACZoneListParseWithBuffer(ctx, readBuffer) if _zoneListErr != nil { return nil, errors.Wrap(_zoneListErr, "Error parsing 'zoneList' field of AirConditioningDataSetZoneHvacMode") } @@ -229,7 +233,7 @@ func AirConditioningDataSetZoneHvacModeParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("hvacModeAndFlags"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for hvacModeAndFlags") } - _hvacModeAndFlags, _hvacModeAndFlagsErr := HVACModeAndFlagsParseWithBuffer(ctx, readBuffer) +_hvacModeAndFlags, _hvacModeAndFlagsErr := HVACModeAndFlagsParseWithBuffer(ctx, readBuffer) if _hvacModeAndFlagsErr != nil { return nil, errors.Wrap(_hvacModeAndFlagsErr, "Error parsing 'hvacModeAndFlags' field of AirConditioningDataSetZoneHvacMode") } @@ -242,7 +246,7 @@ func AirConditioningDataSetZoneHvacModeParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("hvacType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for hvacType") } - _hvacType, _hvacTypeErr := HVACTypeParseWithBuffer(ctx, readBuffer) +_hvacType, _hvacTypeErr := HVACTypeParseWithBuffer(ctx, readBuffer) if _hvacTypeErr != nil { return nil, errors.Wrap(_hvacTypeErr, "Error parsing 'hvacType' field of AirConditioningDataSetZoneHvacMode") } @@ -258,7 +262,7 @@ func AirConditioningDataSetZoneHvacModeParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("level"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for level") } - _val, _err := HVACTemperatureParseWithBuffer(ctx, readBuffer) +_val, _err := HVACTemperatureParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -280,7 +284,7 @@ func AirConditioningDataSetZoneHvacModeParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("rawLevel"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for rawLevel") } - _val, _err := HVACRawLevelsParseWithBuffer(ctx, readBuffer) +_val, _err := HVACRawLevelsParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -302,7 +306,7 @@ func AirConditioningDataSetZoneHvacModeParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("auxLevel"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for auxLevel") } - _val, _err := HVACAuxiliaryLevelParseWithBuffer(ctx, readBuffer) +_val, _err := HVACAuxiliaryLevelParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -323,14 +327,15 @@ func AirConditioningDataSetZoneHvacModeParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_AirConditioningDataSetZoneHvacMode{ - _AirConditioningData: &_AirConditioningData{}, - ZoneGroup: zoneGroup, - ZoneList: zoneList, - HvacModeAndFlags: hvacModeAndFlags, - HvacType: hvacType, - Level: level, - RawLevel: rawLevel, - AuxLevel: auxLevel, + _AirConditioningData: &_AirConditioningData{ + }, + ZoneGroup: zoneGroup, + ZoneList: zoneList, + HvacModeAndFlags: hvacModeAndFlags, + HvacType: hvacType, + Level: level, + RawLevel: rawLevel, + AuxLevel: auxLevel, } _child._AirConditioningData._AirConditioningDataChildRequirements = _child return _child, nil @@ -352,96 +357,96 @@ func (m *_AirConditioningDataSetZoneHvacMode) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for AirConditioningDataSetZoneHvacMode") } - // Simple Field (zoneGroup) - zoneGroup := byte(m.GetZoneGroup()) - _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup)) - if _zoneGroupErr != nil { - return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field") - } + // Simple Field (zoneGroup) + zoneGroup := byte(m.GetZoneGroup()) + _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup)) + if _zoneGroupErr != nil { + return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field") + } - // Simple Field (zoneList) - if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for zoneList") - } - _zoneListErr := writeBuffer.WriteSerializable(ctx, m.GetZoneList()) - if popErr := writeBuffer.PopContext("zoneList"); popErr != nil { - return errors.Wrap(popErr, "Error popping for zoneList") - } - if _zoneListErr != nil { - return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field") - } + // Simple Field (zoneList) + if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for zoneList") + } + _zoneListErr := writeBuffer.WriteSerializable(ctx, m.GetZoneList()) + if popErr := writeBuffer.PopContext("zoneList"); popErr != nil { + return errors.Wrap(popErr, "Error popping for zoneList") + } + if _zoneListErr != nil { + return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field") + } - // Simple Field (hvacModeAndFlags) - if pushErr := writeBuffer.PushContext("hvacModeAndFlags"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for hvacModeAndFlags") + // Simple Field (hvacModeAndFlags) + if pushErr := writeBuffer.PushContext("hvacModeAndFlags"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for hvacModeAndFlags") + } + _hvacModeAndFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetHvacModeAndFlags()) + if popErr := writeBuffer.PopContext("hvacModeAndFlags"); popErr != nil { + return errors.Wrap(popErr, "Error popping for hvacModeAndFlags") + } + if _hvacModeAndFlagsErr != nil { + return errors.Wrap(_hvacModeAndFlagsErr, "Error serializing 'hvacModeAndFlags' field") + } + + // Simple Field (hvacType) + if pushErr := writeBuffer.PushContext("hvacType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for hvacType") + } + _hvacTypeErr := writeBuffer.WriteSerializable(ctx, m.GetHvacType()) + if popErr := writeBuffer.PopContext("hvacType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for hvacType") + } + if _hvacTypeErr != nil { + return errors.Wrap(_hvacTypeErr, "Error serializing 'hvacType' field") + } + + // Optional Field (level) (Can be skipped, if the value is null) + var level HVACTemperature = nil + if m.GetLevel() != nil { + if pushErr := writeBuffer.PushContext("level"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for level") } - _hvacModeAndFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetHvacModeAndFlags()) - if popErr := writeBuffer.PopContext("hvacModeAndFlags"); popErr != nil { - return errors.Wrap(popErr, "Error popping for hvacModeAndFlags") + level = m.GetLevel() + _levelErr := writeBuffer.WriteSerializable(ctx, level) + if popErr := writeBuffer.PopContext("level"); popErr != nil { + return errors.Wrap(popErr, "Error popping for level") } - if _hvacModeAndFlagsErr != nil { - return errors.Wrap(_hvacModeAndFlagsErr, "Error serializing 'hvacModeAndFlags' field") + if _levelErr != nil { + return errors.Wrap(_levelErr, "Error serializing 'level' field") } + } - // Simple Field (hvacType) - if pushErr := writeBuffer.PushContext("hvacType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for hvacType") + // Optional Field (rawLevel) (Can be skipped, if the value is null) + var rawLevel HVACRawLevels = nil + if m.GetRawLevel() != nil { + if pushErr := writeBuffer.PushContext("rawLevel"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for rawLevel") } - _hvacTypeErr := writeBuffer.WriteSerializable(ctx, m.GetHvacType()) - if popErr := writeBuffer.PopContext("hvacType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for hvacType") + rawLevel = m.GetRawLevel() + _rawLevelErr := writeBuffer.WriteSerializable(ctx, rawLevel) + if popErr := writeBuffer.PopContext("rawLevel"); popErr != nil { + return errors.Wrap(popErr, "Error popping for rawLevel") } - if _hvacTypeErr != nil { - return errors.Wrap(_hvacTypeErr, "Error serializing 'hvacType' field") + if _rawLevelErr != nil { + return errors.Wrap(_rawLevelErr, "Error serializing 'rawLevel' field") } + } - // Optional Field (level) (Can be skipped, if the value is null) - var level HVACTemperature = nil - if m.GetLevel() != nil { - if pushErr := writeBuffer.PushContext("level"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for level") - } - level = m.GetLevel() - _levelErr := writeBuffer.WriteSerializable(ctx, level) - if popErr := writeBuffer.PopContext("level"); popErr != nil { - return errors.Wrap(popErr, "Error popping for level") - } - if _levelErr != nil { - return errors.Wrap(_levelErr, "Error serializing 'level' field") - } + // Optional Field (auxLevel) (Can be skipped, if the value is null) + var auxLevel HVACAuxiliaryLevel = nil + if m.GetAuxLevel() != nil { + if pushErr := writeBuffer.PushContext("auxLevel"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for auxLevel") } - - // Optional Field (rawLevel) (Can be skipped, if the value is null) - var rawLevel HVACRawLevels = nil - if m.GetRawLevel() != nil { - if pushErr := writeBuffer.PushContext("rawLevel"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for rawLevel") - } - rawLevel = m.GetRawLevel() - _rawLevelErr := writeBuffer.WriteSerializable(ctx, rawLevel) - if popErr := writeBuffer.PopContext("rawLevel"); popErr != nil { - return errors.Wrap(popErr, "Error popping for rawLevel") - } - if _rawLevelErr != nil { - return errors.Wrap(_rawLevelErr, "Error serializing 'rawLevel' field") - } + auxLevel = m.GetAuxLevel() + _auxLevelErr := writeBuffer.WriteSerializable(ctx, auxLevel) + if popErr := writeBuffer.PopContext("auxLevel"); popErr != nil { + return errors.Wrap(popErr, "Error popping for auxLevel") } - - // Optional Field (auxLevel) (Can be skipped, if the value is null) - var auxLevel HVACAuxiliaryLevel = nil - if m.GetAuxLevel() != nil { - if pushErr := writeBuffer.PushContext("auxLevel"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for auxLevel") - } - auxLevel = m.GetAuxLevel() - _auxLevelErr := writeBuffer.WriteSerializable(ctx, auxLevel) - if popErr := writeBuffer.PopContext("auxLevel"); popErr != nil { - return errors.Wrap(popErr, "Error popping for auxLevel") - } - if _auxLevelErr != nil { - return errors.Wrap(_auxLevelErr, "Error serializing 'auxLevel' field") - } + if _auxLevelErr != nil { + return errors.Wrap(_auxLevelErr, "Error serializing 'auxLevel' field") } + } if popErr := writeBuffer.PopContext("AirConditioningDataSetZoneHvacMode"); popErr != nil { return errors.Wrap(popErr, "Error popping for AirConditioningDataSetZoneHvacMode") @@ -451,6 +456,7 @@ func (m *_AirConditioningDataSetZoneHvacMode) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AirConditioningDataSetZoneHvacMode) isAirConditioningDataSetZoneHvacMode() bool { return true } @@ -465,3 +471,6 @@ func (m *_AirConditioningDataSetZoneHvacMode) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataZoneHumidity.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataZoneHumidity.go index 65c60de4530..b7f89a7c077 100644 --- a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataZoneHumidity.go +++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataZoneHumidity.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AirConditioningDataZoneHumidity is the corresponding interface of AirConditioningDataZoneHumidity type AirConditioningDataZoneHumidity interface { @@ -52,12 +54,14 @@ type AirConditioningDataZoneHumidityExactly interface { // _AirConditioningDataZoneHumidity is the data-structure of this message type _AirConditioningDataZoneHumidity struct { *_AirConditioningData - ZoneGroup byte - ZoneList HVACZoneList - Humidity HVACHumidity - SensorStatus HVACSensorStatus + ZoneGroup byte + ZoneList HVACZoneList + Humidity HVACHumidity + SensorStatus HVACSensorStatus } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -68,14 +72,12 @@ type _AirConditioningDataZoneHumidity struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AirConditioningDataZoneHumidity) InitializeParent(parent AirConditioningData, commandTypeContainer AirConditioningCommandTypeContainer) { - m.CommandTypeContainer = commandTypeContainer +func (m *_AirConditioningDataZoneHumidity) InitializeParent(parent AirConditioningData , commandTypeContainer AirConditioningCommandTypeContainer ) { m.CommandTypeContainer = commandTypeContainer } -func (m *_AirConditioningDataZoneHumidity) GetParent() AirConditioningData { +func (m *_AirConditioningDataZoneHumidity) GetParent() AirConditioningData { return m._AirConditioningData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -102,14 +104,15 @@ func (m *_AirConditioningDataZoneHumidity) GetSensorStatus() HVACSensorStatus { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAirConditioningDataZoneHumidity factory function for _AirConditioningDataZoneHumidity -func NewAirConditioningDataZoneHumidity(zoneGroup byte, zoneList HVACZoneList, humidity HVACHumidity, sensorStatus HVACSensorStatus, commandTypeContainer AirConditioningCommandTypeContainer) *_AirConditioningDataZoneHumidity { +func NewAirConditioningDataZoneHumidity( zoneGroup byte , zoneList HVACZoneList , humidity HVACHumidity , sensorStatus HVACSensorStatus , commandTypeContainer AirConditioningCommandTypeContainer ) *_AirConditioningDataZoneHumidity { _result := &_AirConditioningDataZoneHumidity{ - ZoneGroup: zoneGroup, - ZoneList: zoneList, - Humidity: humidity, - SensorStatus: sensorStatus, - _AirConditioningData: NewAirConditioningData(commandTypeContainer), + ZoneGroup: zoneGroup, + ZoneList: zoneList, + Humidity: humidity, + SensorStatus: sensorStatus, + _AirConditioningData: NewAirConditioningData(commandTypeContainer), } _result._AirConditioningData._AirConditioningDataChildRequirements = _result return _result @@ -117,7 +120,7 @@ func NewAirConditioningDataZoneHumidity(zoneGroup byte, zoneList HVACZoneList, h // Deprecated: use the interface for direct cast func CastAirConditioningDataZoneHumidity(structType interface{}) AirConditioningDataZoneHumidity { - if casted, ok := structType.(AirConditioningDataZoneHumidity); ok { + if casted, ok := structType.(AirConditioningDataZoneHumidity); ok { return casted } if casted, ok := structType.(*AirConditioningDataZoneHumidity); ok { @@ -134,7 +137,7 @@ func (m *_AirConditioningDataZoneHumidity) GetLengthInBits(ctx context.Context) lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (zoneGroup) - lengthInBits += 8 + lengthInBits += 8; // Simple field (zoneList) lengthInBits += m.ZoneList.GetLengthInBits(ctx) @@ -148,6 +151,7 @@ func (m *_AirConditioningDataZoneHumidity) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_AirConditioningDataZoneHumidity) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -166,7 +170,7 @@ func AirConditioningDataZoneHumidityParseWithBuffer(ctx context.Context, readBuf _ = currentPos // Simple Field (zoneGroup) - _zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup") +_zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup") if _zoneGroupErr != nil { return nil, errors.Wrap(_zoneGroupErr, "Error parsing 'zoneGroup' field of AirConditioningDataZoneHumidity") } @@ -176,7 +180,7 @@ func AirConditioningDataZoneHumidityParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("zoneList"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for zoneList") } - _zoneList, _zoneListErr := HVACZoneListParseWithBuffer(ctx, readBuffer) +_zoneList, _zoneListErr := HVACZoneListParseWithBuffer(ctx, readBuffer) if _zoneListErr != nil { return nil, errors.Wrap(_zoneListErr, "Error parsing 'zoneList' field of AirConditioningDataZoneHumidity") } @@ -189,7 +193,7 @@ func AirConditioningDataZoneHumidityParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("humidity"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for humidity") } - _humidity, _humidityErr := HVACHumidityParseWithBuffer(ctx, readBuffer) +_humidity, _humidityErr := HVACHumidityParseWithBuffer(ctx, readBuffer) if _humidityErr != nil { return nil, errors.Wrap(_humidityErr, "Error parsing 'humidity' field of AirConditioningDataZoneHumidity") } @@ -202,7 +206,7 @@ func AirConditioningDataZoneHumidityParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("sensorStatus"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for sensorStatus") } - _sensorStatus, _sensorStatusErr := HVACSensorStatusParseWithBuffer(ctx, readBuffer) +_sensorStatus, _sensorStatusErr := HVACSensorStatusParseWithBuffer(ctx, readBuffer) if _sensorStatusErr != nil { return nil, errors.Wrap(_sensorStatusErr, "Error parsing 'sensorStatus' field of AirConditioningDataZoneHumidity") } @@ -217,11 +221,12 @@ func AirConditioningDataZoneHumidityParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_AirConditioningDataZoneHumidity{ - _AirConditioningData: &_AirConditioningData{}, - ZoneGroup: zoneGroup, - ZoneList: zoneList, - Humidity: humidity, - SensorStatus: sensorStatus, + _AirConditioningData: &_AirConditioningData{ + }, + ZoneGroup: zoneGroup, + ZoneList: zoneList, + Humidity: humidity, + SensorStatus: sensorStatus, } _child._AirConditioningData._AirConditioningDataChildRequirements = _child return _child, nil @@ -243,48 +248,48 @@ func (m *_AirConditioningDataZoneHumidity) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for AirConditioningDataZoneHumidity") } - // Simple Field (zoneGroup) - zoneGroup := byte(m.GetZoneGroup()) - _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup)) - if _zoneGroupErr != nil { - return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field") - } + // Simple Field (zoneGroup) + zoneGroup := byte(m.GetZoneGroup()) + _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup)) + if _zoneGroupErr != nil { + return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field") + } - // Simple Field (zoneList) - if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for zoneList") - } - _zoneListErr := writeBuffer.WriteSerializable(ctx, m.GetZoneList()) - if popErr := writeBuffer.PopContext("zoneList"); popErr != nil { - return errors.Wrap(popErr, "Error popping for zoneList") - } - if _zoneListErr != nil { - return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field") - } + // Simple Field (zoneList) + if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for zoneList") + } + _zoneListErr := writeBuffer.WriteSerializable(ctx, m.GetZoneList()) + if popErr := writeBuffer.PopContext("zoneList"); popErr != nil { + return errors.Wrap(popErr, "Error popping for zoneList") + } + if _zoneListErr != nil { + return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field") + } - // Simple Field (humidity) - if pushErr := writeBuffer.PushContext("humidity"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for humidity") - } - _humidityErr := writeBuffer.WriteSerializable(ctx, m.GetHumidity()) - if popErr := writeBuffer.PopContext("humidity"); popErr != nil { - return errors.Wrap(popErr, "Error popping for humidity") - } - if _humidityErr != nil { - return errors.Wrap(_humidityErr, "Error serializing 'humidity' field") - } + // Simple Field (humidity) + if pushErr := writeBuffer.PushContext("humidity"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for humidity") + } + _humidityErr := writeBuffer.WriteSerializable(ctx, m.GetHumidity()) + if popErr := writeBuffer.PopContext("humidity"); popErr != nil { + return errors.Wrap(popErr, "Error popping for humidity") + } + if _humidityErr != nil { + return errors.Wrap(_humidityErr, "Error serializing 'humidity' field") + } - // Simple Field (sensorStatus) - if pushErr := writeBuffer.PushContext("sensorStatus"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for sensorStatus") - } - _sensorStatusErr := writeBuffer.WriteSerializable(ctx, m.GetSensorStatus()) - if popErr := writeBuffer.PopContext("sensorStatus"); popErr != nil { - return errors.Wrap(popErr, "Error popping for sensorStatus") - } - if _sensorStatusErr != nil { - return errors.Wrap(_sensorStatusErr, "Error serializing 'sensorStatus' field") - } + // Simple Field (sensorStatus) + if pushErr := writeBuffer.PushContext("sensorStatus"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for sensorStatus") + } + _sensorStatusErr := writeBuffer.WriteSerializable(ctx, m.GetSensorStatus()) + if popErr := writeBuffer.PopContext("sensorStatus"); popErr != nil { + return errors.Wrap(popErr, "Error popping for sensorStatus") + } + if _sensorStatusErr != nil { + return errors.Wrap(_sensorStatusErr, "Error serializing 'sensorStatus' field") + } if popErr := writeBuffer.PopContext("AirConditioningDataZoneHumidity"); popErr != nil { return errors.Wrap(popErr, "Error popping for AirConditioningDataZoneHumidity") @@ -294,6 +299,7 @@ func (m *_AirConditioningDataZoneHumidity) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AirConditioningDataZoneHumidity) isAirConditioningDataZoneHumidity() bool { return true } @@ -308,3 +314,6 @@ func (m *_AirConditioningDataZoneHumidity) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataZoneHumidityPlantStatus.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataZoneHumidityPlantStatus.go index e46a2c51179..a03eccd13a3 100644 --- a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataZoneHumidityPlantStatus.go +++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataZoneHumidityPlantStatus.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AirConditioningDataZoneHumidityPlantStatus is the corresponding interface of AirConditioningDataZoneHumidityPlantStatus type AirConditioningDataZoneHumidityPlantStatus interface { @@ -54,13 +56,15 @@ type AirConditioningDataZoneHumidityPlantStatusExactly interface { // _AirConditioningDataZoneHumidityPlantStatus is the data-structure of this message type _AirConditioningDataZoneHumidityPlantStatus struct { *_AirConditioningData - ZoneGroup byte - ZoneList HVACZoneList - HumidityType HVACHumidityType - HumidityStatus HVACHumidityStatusFlags - HumidityErrorCode HVACHumidityError + ZoneGroup byte + ZoneList HVACZoneList + HumidityType HVACHumidityType + HumidityStatus HVACHumidityStatusFlags + HumidityErrorCode HVACHumidityError } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -71,14 +75,12 @@ type _AirConditioningDataZoneHumidityPlantStatus struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AirConditioningDataZoneHumidityPlantStatus) InitializeParent(parent AirConditioningData, commandTypeContainer AirConditioningCommandTypeContainer) { - m.CommandTypeContainer = commandTypeContainer +func (m *_AirConditioningDataZoneHumidityPlantStatus) InitializeParent(parent AirConditioningData , commandTypeContainer AirConditioningCommandTypeContainer ) { m.CommandTypeContainer = commandTypeContainer } -func (m *_AirConditioningDataZoneHumidityPlantStatus) GetParent() AirConditioningData { +func (m *_AirConditioningDataZoneHumidityPlantStatus) GetParent() AirConditioningData { return m._AirConditioningData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -109,15 +111,16 @@ func (m *_AirConditioningDataZoneHumidityPlantStatus) GetHumidityErrorCode() HVA /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAirConditioningDataZoneHumidityPlantStatus factory function for _AirConditioningDataZoneHumidityPlantStatus -func NewAirConditioningDataZoneHumidityPlantStatus(zoneGroup byte, zoneList HVACZoneList, humidityType HVACHumidityType, humidityStatus HVACHumidityStatusFlags, humidityErrorCode HVACHumidityError, commandTypeContainer AirConditioningCommandTypeContainer) *_AirConditioningDataZoneHumidityPlantStatus { +func NewAirConditioningDataZoneHumidityPlantStatus( zoneGroup byte , zoneList HVACZoneList , humidityType HVACHumidityType , humidityStatus HVACHumidityStatusFlags , humidityErrorCode HVACHumidityError , commandTypeContainer AirConditioningCommandTypeContainer ) *_AirConditioningDataZoneHumidityPlantStatus { _result := &_AirConditioningDataZoneHumidityPlantStatus{ - ZoneGroup: zoneGroup, - ZoneList: zoneList, - HumidityType: humidityType, - HumidityStatus: humidityStatus, - HumidityErrorCode: humidityErrorCode, - _AirConditioningData: NewAirConditioningData(commandTypeContainer), + ZoneGroup: zoneGroup, + ZoneList: zoneList, + HumidityType: humidityType, + HumidityStatus: humidityStatus, + HumidityErrorCode: humidityErrorCode, + _AirConditioningData: NewAirConditioningData(commandTypeContainer), } _result._AirConditioningData._AirConditioningDataChildRequirements = _result return _result @@ -125,7 +128,7 @@ func NewAirConditioningDataZoneHumidityPlantStatus(zoneGroup byte, zoneList HVAC // Deprecated: use the interface for direct cast func CastAirConditioningDataZoneHumidityPlantStatus(structType interface{}) AirConditioningDataZoneHumidityPlantStatus { - if casted, ok := structType.(AirConditioningDataZoneHumidityPlantStatus); ok { + if casted, ok := structType.(AirConditioningDataZoneHumidityPlantStatus); ok { return casted } if casted, ok := structType.(*AirConditioningDataZoneHumidityPlantStatus); ok { @@ -142,7 +145,7 @@ func (m *_AirConditioningDataZoneHumidityPlantStatus) GetLengthInBits(ctx contex lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (zoneGroup) - lengthInBits += 8 + lengthInBits += 8; // Simple field (zoneList) lengthInBits += m.ZoneList.GetLengthInBits(ctx) @@ -159,6 +162,7 @@ func (m *_AirConditioningDataZoneHumidityPlantStatus) GetLengthInBits(ctx contex return lengthInBits } + func (m *_AirConditioningDataZoneHumidityPlantStatus) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -177,7 +181,7 @@ func AirConditioningDataZoneHumidityPlantStatusParseWithBuffer(ctx context.Conte _ = currentPos // Simple Field (zoneGroup) - _zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup") +_zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup") if _zoneGroupErr != nil { return nil, errors.Wrap(_zoneGroupErr, "Error parsing 'zoneGroup' field of AirConditioningDataZoneHumidityPlantStatus") } @@ -187,7 +191,7 @@ func AirConditioningDataZoneHumidityPlantStatusParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("zoneList"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for zoneList") } - _zoneList, _zoneListErr := HVACZoneListParseWithBuffer(ctx, readBuffer) +_zoneList, _zoneListErr := HVACZoneListParseWithBuffer(ctx, readBuffer) if _zoneListErr != nil { return nil, errors.Wrap(_zoneListErr, "Error parsing 'zoneList' field of AirConditioningDataZoneHumidityPlantStatus") } @@ -200,7 +204,7 @@ func AirConditioningDataZoneHumidityPlantStatusParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("humidityType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for humidityType") } - _humidityType, _humidityTypeErr := HVACHumidityTypeParseWithBuffer(ctx, readBuffer) +_humidityType, _humidityTypeErr := HVACHumidityTypeParseWithBuffer(ctx, readBuffer) if _humidityTypeErr != nil { return nil, errors.Wrap(_humidityTypeErr, "Error parsing 'humidityType' field of AirConditioningDataZoneHumidityPlantStatus") } @@ -213,7 +217,7 @@ func AirConditioningDataZoneHumidityPlantStatusParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("humidityStatus"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for humidityStatus") } - _humidityStatus, _humidityStatusErr := HVACHumidityStatusFlagsParseWithBuffer(ctx, readBuffer) +_humidityStatus, _humidityStatusErr := HVACHumidityStatusFlagsParseWithBuffer(ctx, readBuffer) if _humidityStatusErr != nil { return nil, errors.Wrap(_humidityStatusErr, "Error parsing 'humidityStatus' field of AirConditioningDataZoneHumidityPlantStatus") } @@ -226,7 +230,7 @@ func AirConditioningDataZoneHumidityPlantStatusParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("humidityErrorCode"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for humidityErrorCode") } - _humidityErrorCode, _humidityErrorCodeErr := HVACHumidityErrorParseWithBuffer(ctx, readBuffer) +_humidityErrorCode, _humidityErrorCodeErr := HVACHumidityErrorParseWithBuffer(ctx, readBuffer) if _humidityErrorCodeErr != nil { return nil, errors.Wrap(_humidityErrorCodeErr, "Error parsing 'humidityErrorCode' field of AirConditioningDataZoneHumidityPlantStatus") } @@ -241,12 +245,13 @@ func AirConditioningDataZoneHumidityPlantStatusParseWithBuffer(ctx context.Conte // Create a partially initialized instance _child := &_AirConditioningDataZoneHumidityPlantStatus{ - _AirConditioningData: &_AirConditioningData{}, - ZoneGroup: zoneGroup, - ZoneList: zoneList, - HumidityType: humidityType, - HumidityStatus: humidityStatus, - HumidityErrorCode: humidityErrorCode, + _AirConditioningData: &_AirConditioningData{ + }, + ZoneGroup: zoneGroup, + ZoneList: zoneList, + HumidityType: humidityType, + HumidityStatus: humidityStatus, + HumidityErrorCode: humidityErrorCode, } _child._AirConditioningData._AirConditioningDataChildRequirements = _child return _child, nil @@ -268,60 +273,60 @@ func (m *_AirConditioningDataZoneHumidityPlantStatus) SerializeWithWriteBuffer(c return errors.Wrap(pushErr, "Error pushing for AirConditioningDataZoneHumidityPlantStatus") } - // Simple Field (zoneGroup) - zoneGroup := byte(m.GetZoneGroup()) - _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup)) - if _zoneGroupErr != nil { - return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field") - } + // Simple Field (zoneGroup) + zoneGroup := byte(m.GetZoneGroup()) + _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup)) + if _zoneGroupErr != nil { + return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field") + } - // Simple Field (zoneList) - if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for zoneList") - } - _zoneListErr := writeBuffer.WriteSerializable(ctx, m.GetZoneList()) - if popErr := writeBuffer.PopContext("zoneList"); popErr != nil { - return errors.Wrap(popErr, "Error popping for zoneList") - } - if _zoneListErr != nil { - return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field") - } + // Simple Field (zoneList) + if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for zoneList") + } + _zoneListErr := writeBuffer.WriteSerializable(ctx, m.GetZoneList()) + if popErr := writeBuffer.PopContext("zoneList"); popErr != nil { + return errors.Wrap(popErr, "Error popping for zoneList") + } + if _zoneListErr != nil { + return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field") + } - // Simple Field (humidityType) - if pushErr := writeBuffer.PushContext("humidityType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for humidityType") - } - _humidityTypeErr := writeBuffer.WriteSerializable(ctx, m.GetHumidityType()) - if popErr := writeBuffer.PopContext("humidityType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for humidityType") - } - if _humidityTypeErr != nil { - return errors.Wrap(_humidityTypeErr, "Error serializing 'humidityType' field") - } + // Simple Field (humidityType) + if pushErr := writeBuffer.PushContext("humidityType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for humidityType") + } + _humidityTypeErr := writeBuffer.WriteSerializable(ctx, m.GetHumidityType()) + if popErr := writeBuffer.PopContext("humidityType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for humidityType") + } + if _humidityTypeErr != nil { + return errors.Wrap(_humidityTypeErr, "Error serializing 'humidityType' field") + } - // Simple Field (humidityStatus) - if pushErr := writeBuffer.PushContext("humidityStatus"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for humidityStatus") - } - _humidityStatusErr := writeBuffer.WriteSerializable(ctx, m.GetHumidityStatus()) - if popErr := writeBuffer.PopContext("humidityStatus"); popErr != nil { - return errors.Wrap(popErr, "Error popping for humidityStatus") - } - if _humidityStatusErr != nil { - return errors.Wrap(_humidityStatusErr, "Error serializing 'humidityStatus' field") - } + // Simple Field (humidityStatus) + if pushErr := writeBuffer.PushContext("humidityStatus"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for humidityStatus") + } + _humidityStatusErr := writeBuffer.WriteSerializable(ctx, m.GetHumidityStatus()) + if popErr := writeBuffer.PopContext("humidityStatus"); popErr != nil { + return errors.Wrap(popErr, "Error popping for humidityStatus") + } + if _humidityStatusErr != nil { + return errors.Wrap(_humidityStatusErr, "Error serializing 'humidityStatus' field") + } - // Simple Field (humidityErrorCode) - if pushErr := writeBuffer.PushContext("humidityErrorCode"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for humidityErrorCode") - } - _humidityErrorCodeErr := writeBuffer.WriteSerializable(ctx, m.GetHumidityErrorCode()) - if popErr := writeBuffer.PopContext("humidityErrorCode"); popErr != nil { - return errors.Wrap(popErr, "Error popping for humidityErrorCode") - } - if _humidityErrorCodeErr != nil { - return errors.Wrap(_humidityErrorCodeErr, "Error serializing 'humidityErrorCode' field") - } + // Simple Field (humidityErrorCode) + if pushErr := writeBuffer.PushContext("humidityErrorCode"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for humidityErrorCode") + } + _humidityErrorCodeErr := writeBuffer.WriteSerializable(ctx, m.GetHumidityErrorCode()) + if popErr := writeBuffer.PopContext("humidityErrorCode"); popErr != nil { + return errors.Wrap(popErr, "Error popping for humidityErrorCode") + } + if _humidityErrorCodeErr != nil { + return errors.Wrap(_humidityErrorCodeErr, "Error serializing 'humidityErrorCode' field") + } if popErr := writeBuffer.PopContext("AirConditioningDataZoneHumidityPlantStatus"); popErr != nil { return errors.Wrap(popErr, "Error popping for AirConditioningDataZoneHumidityPlantStatus") @@ -331,6 +336,7 @@ func (m *_AirConditioningDataZoneHumidityPlantStatus) SerializeWithWriteBuffer(c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AirConditioningDataZoneHumidityPlantStatus) isAirConditioningDataZoneHumidityPlantStatus() bool { return true } @@ -345,3 +351,6 @@ func (m *_AirConditioningDataZoneHumidityPlantStatus) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataZoneHvacPlantStatus.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataZoneHvacPlantStatus.go index 4372f5d1c49..e93ae34512e 100644 --- a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataZoneHvacPlantStatus.go +++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataZoneHvacPlantStatus.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AirConditioningDataZoneHvacPlantStatus is the corresponding interface of AirConditioningDataZoneHvacPlantStatus type AirConditioningDataZoneHvacPlantStatus interface { @@ -54,13 +56,15 @@ type AirConditioningDataZoneHvacPlantStatusExactly interface { // _AirConditioningDataZoneHvacPlantStatus is the data-structure of this message type _AirConditioningDataZoneHvacPlantStatus struct { *_AirConditioningData - ZoneGroup byte - ZoneList HVACZoneList - HvacType HVACType - HvacStatus HVACStatusFlags - HvacErrorCode HVACError + ZoneGroup byte + ZoneList HVACZoneList + HvacType HVACType + HvacStatus HVACStatusFlags + HvacErrorCode HVACError } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -71,14 +75,12 @@ type _AirConditioningDataZoneHvacPlantStatus struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AirConditioningDataZoneHvacPlantStatus) InitializeParent(parent AirConditioningData, commandTypeContainer AirConditioningCommandTypeContainer) { - m.CommandTypeContainer = commandTypeContainer +func (m *_AirConditioningDataZoneHvacPlantStatus) InitializeParent(parent AirConditioningData , commandTypeContainer AirConditioningCommandTypeContainer ) { m.CommandTypeContainer = commandTypeContainer } -func (m *_AirConditioningDataZoneHvacPlantStatus) GetParent() AirConditioningData { +func (m *_AirConditioningDataZoneHvacPlantStatus) GetParent() AirConditioningData { return m._AirConditioningData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -109,15 +111,16 @@ func (m *_AirConditioningDataZoneHvacPlantStatus) GetHvacErrorCode() HVACError { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAirConditioningDataZoneHvacPlantStatus factory function for _AirConditioningDataZoneHvacPlantStatus -func NewAirConditioningDataZoneHvacPlantStatus(zoneGroup byte, zoneList HVACZoneList, hvacType HVACType, hvacStatus HVACStatusFlags, hvacErrorCode HVACError, commandTypeContainer AirConditioningCommandTypeContainer) *_AirConditioningDataZoneHvacPlantStatus { +func NewAirConditioningDataZoneHvacPlantStatus( zoneGroup byte , zoneList HVACZoneList , hvacType HVACType , hvacStatus HVACStatusFlags , hvacErrorCode HVACError , commandTypeContainer AirConditioningCommandTypeContainer ) *_AirConditioningDataZoneHvacPlantStatus { _result := &_AirConditioningDataZoneHvacPlantStatus{ - ZoneGroup: zoneGroup, - ZoneList: zoneList, - HvacType: hvacType, - HvacStatus: hvacStatus, - HvacErrorCode: hvacErrorCode, - _AirConditioningData: NewAirConditioningData(commandTypeContainer), + ZoneGroup: zoneGroup, + ZoneList: zoneList, + HvacType: hvacType, + HvacStatus: hvacStatus, + HvacErrorCode: hvacErrorCode, + _AirConditioningData: NewAirConditioningData(commandTypeContainer), } _result._AirConditioningData._AirConditioningDataChildRequirements = _result return _result @@ -125,7 +128,7 @@ func NewAirConditioningDataZoneHvacPlantStatus(zoneGroup byte, zoneList HVACZone // Deprecated: use the interface for direct cast func CastAirConditioningDataZoneHvacPlantStatus(structType interface{}) AirConditioningDataZoneHvacPlantStatus { - if casted, ok := structType.(AirConditioningDataZoneHvacPlantStatus); ok { + if casted, ok := structType.(AirConditioningDataZoneHvacPlantStatus); ok { return casted } if casted, ok := structType.(*AirConditioningDataZoneHvacPlantStatus); ok { @@ -142,7 +145,7 @@ func (m *_AirConditioningDataZoneHvacPlantStatus) GetLengthInBits(ctx context.Co lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (zoneGroup) - lengthInBits += 8 + lengthInBits += 8; // Simple field (zoneList) lengthInBits += m.ZoneList.GetLengthInBits(ctx) @@ -159,6 +162,7 @@ func (m *_AirConditioningDataZoneHvacPlantStatus) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_AirConditioningDataZoneHvacPlantStatus) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -177,7 +181,7 @@ func AirConditioningDataZoneHvacPlantStatusParseWithBuffer(ctx context.Context, _ = currentPos // Simple Field (zoneGroup) - _zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup") +_zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup") if _zoneGroupErr != nil { return nil, errors.Wrap(_zoneGroupErr, "Error parsing 'zoneGroup' field of AirConditioningDataZoneHvacPlantStatus") } @@ -187,7 +191,7 @@ func AirConditioningDataZoneHvacPlantStatusParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("zoneList"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for zoneList") } - _zoneList, _zoneListErr := HVACZoneListParseWithBuffer(ctx, readBuffer) +_zoneList, _zoneListErr := HVACZoneListParseWithBuffer(ctx, readBuffer) if _zoneListErr != nil { return nil, errors.Wrap(_zoneListErr, "Error parsing 'zoneList' field of AirConditioningDataZoneHvacPlantStatus") } @@ -200,7 +204,7 @@ func AirConditioningDataZoneHvacPlantStatusParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("hvacType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for hvacType") } - _hvacType, _hvacTypeErr := HVACTypeParseWithBuffer(ctx, readBuffer) +_hvacType, _hvacTypeErr := HVACTypeParseWithBuffer(ctx, readBuffer) if _hvacTypeErr != nil { return nil, errors.Wrap(_hvacTypeErr, "Error parsing 'hvacType' field of AirConditioningDataZoneHvacPlantStatus") } @@ -213,7 +217,7 @@ func AirConditioningDataZoneHvacPlantStatusParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("hvacStatus"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for hvacStatus") } - _hvacStatus, _hvacStatusErr := HVACStatusFlagsParseWithBuffer(ctx, readBuffer) +_hvacStatus, _hvacStatusErr := HVACStatusFlagsParseWithBuffer(ctx, readBuffer) if _hvacStatusErr != nil { return nil, errors.Wrap(_hvacStatusErr, "Error parsing 'hvacStatus' field of AirConditioningDataZoneHvacPlantStatus") } @@ -226,7 +230,7 @@ func AirConditioningDataZoneHvacPlantStatusParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("hvacErrorCode"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for hvacErrorCode") } - _hvacErrorCode, _hvacErrorCodeErr := HVACErrorParseWithBuffer(ctx, readBuffer) +_hvacErrorCode, _hvacErrorCodeErr := HVACErrorParseWithBuffer(ctx, readBuffer) if _hvacErrorCodeErr != nil { return nil, errors.Wrap(_hvacErrorCodeErr, "Error parsing 'hvacErrorCode' field of AirConditioningDataZoneHvacPlantStatus") } @@ -241,12 +245,13 @@ func AirConditioningDataZoneHvacPlantStatusParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_AirConditioningDataZoneHvacPlantStatus{ - _AirConditioningData: &_AirConditioningData{}, - ZoneGroup: zoneGroup, - ZoneList: zoneList, - HvacType: hvacType, - HvacStatus: hvacStatus, - HvacErrorCode: hvacErrorCode, + _AirConditioningData: &_AirConditioningData{ + }, + ZoneGroup: zoneGroup, + ZoneList: zoneList, + HvacType: hvacType, + HvacStatus: hvacStatus, + HvacErrorCode: hvacErrorCode, } _child._AirConditioningData._AirConditioningDataChildRequirements = _child return _child, nil @@ -268,60 +273,60 @@ func (m *_AirConditioningDataZoneHvacPlantStatus) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for AirConditioningDataZoneHvacPlantStatus") } - // Simple Field (zoneGroup) - zoneGroup := byte(m.GetZoneGroup()) - _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup)) - if _zoneGroupErr != nil { - return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field") - } + // Simple Field (zoneGroup) + zoneGroup := byte(m.GetZoneGroup()) + _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup)) + if _zoneGroupErr != nil { + return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field") + } - // Simple Field (zoneList) - if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for zoneList") - } - _zoneListErr := writeBuffer.WriteSerializable(ctx, m.GetZoneList()) - if popErr := writeBuffer.PopContext("zoneList"); popErr != nil { - return errors.Wrap(popErr, "Error popping for zoneList") - } - if _zoneListErr != nil { - return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field") - } + // Simple Field (zoneList) + if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for zoneList") + } + _zoneListErr := writeBuffer.WriteSerializable(ctx, m.GetZoneList()) + if popErr := writeBuffer.PopContext("zoneList"); popErr != nil { + return errors.Wrap(popErr, "Error popping for zoneList") + } + if _zoneListErr != nil { + return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field") + } - // Simple Field (hvacType) - if pushErr := writeBuffer.PushContext("hvacType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for hvacType") - } - _hvacTypeErr := writeBuffer.WriteSerializable(ctx, m.GetHvacType()) - if popErr := writeBuffer.PopContext("hvacType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for hvacType") - } - if _hvacTypeErr != nil { - return errors.Wrap(_hvacTypeErr, "Error serializing 'hvacType' field") - } + // Simple Field (hvacType) + if pushErr := writeBuffer.PushContext("hvacType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for hvacType") + } + _hvacTypeErr := writeBuffer.WriteSerializable(ctx, m.GetHvacType()) + if popErr := writeBuffer.PopContext("hvacType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for hvacType") + } + if _hvacTypeErr != nil { + return errors.Wrap(_hvacTypeErr, "Error serializing 'hvacType' field") + } - // Simple Field (hvacStatus) - if pushErr := writeBuffer.PushContext("hvacStatus"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for hvacStatus") - } - _hvacStatusErr := writeBuffer.WriteSerializable(ctx, m.GetHvacStatus()) - if popErr := writeBuffer.PopContext("hvacStatus"); popErr != nil { - return errors.Wrap(popErr, "Error popping for hvacStatus") - } - if _hvacStatusErr != nil { - return errors.Wrap(_hvacStatusErr, "Error serializing 'hvacStatus' field") - } + // Simple Field (hvacStatus) + if pushErr := writeBuffer.PushContext("hvacStatus"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for hvacStatus") + } + _hvacStatusErr := writeBuffer.WriteSerializable(ctx, m.GetHvacStatus()) + if popErr := writeBuffer.PopContext("hvacStatus"); popErr != nil { + return errors.Wrap(popErr, "Error popping for hvacStatus") + } + if _hvacStatusErr != nil { + return errors.Wrap(_hvacStatusErr, "Error serializing 'hvacStatus' field") + } - // Simple Field (hvacErrorCode) - if pushErr := writeBuffer.PushContext("hvacErrorCode"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for hvacErrorCode") - } - _hvacErrorCodeErr := writeBuffer.WriteSerializable(ctx, m.GetHvacErrorCode()) - if popErr := writeBuffer.PopContext("hvacErrorCode"); popErr != nil { - return errors.Wrap(popErr, "Error popping for hvacErrorCode") - } - if _hvacErrorCodeErr != nil { - return errors.Wrap(_hvacErrorCodeErr, "Error serializing 'hvacErrorCode' field") - } + // Simple Field (hvacErrorCode) + if pushErr := writeBuffer.PushContext("hvacErrorCode"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for hvacErrorCode") + } + _hvacErrorCodeErr := writeBuffer.WriteSerializable(ctx, m.GetHvacErrorCode()) + if popErr := writeBuffer.PopContext("hvacErrorCode"); popErr != nil { + return errors.Wrap(popErr, "Error popping for hvacErrorCode") + } + if _hvacErrorCodeErr != nil { + return errors.Wrap(_hvacErrorCodeErr, "Error serializing 'hvacErrorCode' field") + } if popErr := writeBuffer.PopContext("AirConditioningDataZoneHvacPlantStatus"); popErr != nil { return errors.Wrap(popErr, "Error popping for AirConditioningDataZoneHvacPlantStatus") @@ -331,6 +336,7 @@ func (m *_AirConditioningDataZoneHvacPlantStatus) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AirConditioningDataZoneHvacPlantStatus) isAirConditioningDataZoneHvacPlantStatus() bool { return true } @@ -345,3 +351,6 @@ func (m *_AirConditioningDataZoneHvacPlantStatus) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataZoneTemperature.go b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataZoneTemperature.go index 1754a763780..9033656e379 100644 --- a/plc4go/protocols/cbus/readwrite/model/AirConditioningDataZoneTemperature.go +++ b/plc4go/protocols/cbus/readwrite/model/AirConditioningDataZoneTemperature.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AirConditioningDataZoneTemperature is the corresponding interface of AirConditioningDataZoneTemperature type AirConditioningDataZoneTemperature interface { @@ -52,12 +54,14 @@ type AirConditioningDataZoneTemperatureExactly interface { // _AirConditioningDataZoneTemperature is the data-structure of this message type _AirConditioningDataZoneTemperature struct { *_AirConditioningData - ZoneGroup byte - ZoneList HVACZoneList - Temperature HVACTemperature - SensorStatus HVACSensorStatus + ZoneGroup byte + ZoneList HVACZoneList + Temperature HVACTemperature + SensorStatus HVACSensorStatus } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -68,14 +72,12 @@ type _AirConditioningDataZoneTemperature struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_AirConditioningDataZoneTemperature) InitializeParent(parent AirConditioningData, commandTypeContainer AirConditioningCommandTypeContainer) { - m.CommandTypeContainer = commandTypeContainer +func (m *_AirConditioningDataZoneTemperature) InitializeParent(parent AirConditioningData , commandTypeContainer AirConditioningCommandTypeContainer ) { m.CommandTypeContainer = commandTypeContainer } -func (m *_AirConditioningDataZoneTemperature) GetParent() AirConditioningData { +func (m *_AirConditioningDataZoneTemperature) GetParent() AirConditioningData { return m._AirConditioningData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -102,14 +104,15 @@ func (m *_AirConditioningDataZoneTemperature) GetSensorStatus() HVACSensorStatus /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAirConditioningDataZoneTemperature factory function for _AirConditioningDataZoneTemperature -func NewAirConditioningDataZoneTemperature(zoneGroup byte, zoneList HVACZoneList, temperature HVACTemperature, sensorStatus HVACSensorStatus, commandTypeContainer AirConditioningCommandTypeContainer) *_AirConditioningDataZoneTemperature { +func NewAirConditioningDataZoneTemperature( zoneGroup byte , zoneList HVACZoneList , temperature HVACTemperature , sensorStatus HVACSensorStatus , commandTypeContainer AirConditioningCommandTypeContainer ) *_AirConditioningDataZoneTemperature { _result := &_AirConditioningDataZoneTemperature{ - ZoneGroup: zoneGroup, - ZoneList: zoneList, - Temperature: temperature, - SensorStatus: sensorStatus, - _AirConditioningData: NewAirConditioningData(commandTypeContainer), + ZoneGroup: zoneGroup, + ZoneList: zoneList, + Temperature: temperature, + SensorStatus: sensorStatus, + _AirConditioningData: NewAirConditioningData(commandTypeContainer), } _result._AirConditioningData._AirConditioningDataChildRequirements = _result return _result @@ -117,7 +120,7 @@ func NewAirConditioningDataZoneTemperature(zoneGroup byte, zoneList HVACZoneList // Deprecated: use the interface for direct cast func CastAirConditioningDataZoneTemperature(structType interface{}) AirConditioningDataZoneTemperature { - if casted, ok := structType.(AirConditioningDataZoneTemperature); ok { + if casted, ok := structType.(AirConditioningDataZoneTemperature); ok { return casted } if casted, ok := structType.(*AirConditioningDataZoneTemperature); ok { @@ -134,7 +137,7 @@ func (m *_AirConditioningDataZoneTemperature) GetLengthInBits(ctx context.Contex lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (zoneGroup) - lengthInBits += 8 + lengthInBits += 8; // Simple field (zoneList) lengthInBits += m.ZoneList.GetLengthInBits(ctx) @@ -148,6 +151,7 @@ func (m *_AirConditioningDataZoneTemperature) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_AirConditioningDataZoneTemperature) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -166,7 +170,7 @@ func AirConditioningDataZoneTemperatureParseWithBuffer(ctx context.Context, read _ = currentPos // Simple Field (zoneGroup) - _zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup") +_zoneGroup, _zoneGroupErr := readBuffer.ReadByte("zoneGroup") if _zoneGroupErr != nil { return nil, errors.Wrap(_zoneGroupErr, "Error parsing 'zoneGroup' field of AirConditioningDataZoneTemperature") } @@ -176,7 +180,7 @@ func AirConditioningDataZoneTemperatureParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("zoneList"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for zoneList") } - _zoneList, _zoneListErr := HVACZoneListParseWithBuffer(ctx, readBuffer) +_zoneList, _zoneListErr := HVACZoneListParseWithBuffer(ctx, readBuffer) if _zoneListErr != nil { return nil, errors.Wrap(_zoneListErr, "Error parsing 'zoneList' field of AirConditioningDataZoneTemperature") } @@ -189,7 +193,7 @@ func AirConditioningDataZoneTemperatureParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("temperature"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for temperature") } - _temperature, _temperatureErr := HVACTemperatureParseWithBuffer(ctx, readBuffer) +_temperature, _temperatureErr := HVACTemperatureParseWithBuffer(ctx, readBuffer) if _temperatureErr != nil { return nil, errors.Wrap(_temperatureErr, "Error parsing 'temperature' field of AirConditioningDataZoneTemperature") } @@ -202,7 +206,7 @@ func AirConditioningDataZoneTemperatureParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("sensorStatus"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for sensorStatus") } - _sensorStatus, _sensorStatusErr := HVACSensorStatusParseWithBuffer(ctx, readBuffer) +_sensorStatus, _sensorStatusErr := HVACSensorStatusParseWithBuffer(ctx, readBuffer) if _sensorStatusErr != nil { return nil, errors.Wrap(_sensorStatusErr, "Error parsing 'sensorStatus' field of AirConditioningDataZoneTemperature") } @@ -217,11 +221,12 @@ func AirConditioningDataZoneTemperatureParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_AirConditioningDataZoneTemperature{ - _AirConditioningData: &_AirConditioningData{}, - ZoneGroup: zoneGroup, - ZoneList: zoneList, - Temperature: temperature, - SensorStatus: sensorStatus, + _AirConditioningData: &_AirConditioningData{ + }, + ZoneGroup: zoneGroup, + ZoneList: zoneList, + Temperature: temperature, + SensorStatus: sensorStatus, } _child._AirConditioningData._AirConditioningDataChildRequirements = _child return _child, nil @@ -243,48 +248,48 @@ func (m *_AirConditioningDataZoneTemperature) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for AirConditioningDataZoneTemperature") } - // Simple Field (zoneGroup) - zoneGroup := byte(m.GetZoneGroup()) - _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup)) - if _zoneGroupErr != nil { - return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field") - } + // Simple Field (zoneGroup) + zoneGroup := byte(m.GetZoneGroup()) + _zoneGroupErr := writeBuffer.WriteByte("zoneGroup", (zoneGroup)) + if _zoneGroupErr != nil { + return errors.Wrap(_zoneGroupErr, "Error serializing 'zoneGroup' field") + } - // Simple Field (zoneList) - if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for zoneList") - } - _zoneListErr := writeBuffer.WriteSerializable(ctx, m.GetZoneList()) - if popErr := writeBuffer.PopContext("zoneList"); popErr != nil { - return errors.Wrap(popErr, "Error popping for zoneList") - } - if _zoneListErr != nil { - return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field") - } + // Simple Field (zoneList) + if pushErr := writeBuffer.PushContext("zoneList"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for zoneList") + } + _zoneListErr := writeBuffer.WriteSerializable(ctx, m.GetZoneList()) + if popErr := writeBuffer.PopContext("zoneList"); popErr != nil { + return errors.Wrap(popErr, "Error popping for zoneList") + } + if _zoneListErr != nil { + return errors.Wrap(_zoneListErr, "Error serializing 'zoneList' field") + } - // Simple Field (temperature) - if pushErr := writeBuffer.PushContext("temperature"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for temperature") - } - _temperatureErr := writeBuffer.WriteSerializable(ctx, m.GetTemperature()) - if popErr := writeBuffer.PopContext("temperature"); popErr != nil { - return errors.Wrap(popErr, "Error popping for temperature") - } - if _temperatureErr != nil { - return errors.Wrap(_temperatureErr, "Error serializing 'temperature' field") - } + // Simple Field (temperature) + if pushErr := writeBuffer.PushContext("temperature"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for temperature") + } + _temperatureErr := writeBuffer.WriteSerializable(ctx, m.GetTemperature()) + if popErr := writeBuffer.PopContext("temperature"); popErr != nil { + return errors.Wrap(popErr, "Error popping for temperature") + } + if _temperatureErr != nil { + return errors.Wrap(_temperatureErr, "Error serializing 'temperature' field") + } - // Simple Field (sensorStatus) - if pushErr := writeBuffer.PushContext("sensorStatus"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for sensorStatus") - } - _sensorStatusErr := writeBuffer.WriteSerializable(ctx, m.GetSensorStatus()) - if popErr := writeBuffer.PopContext("sensorStatus"); popErr != nil { - return errors.Wrap(popErr, "Error popping for sensorStatus") - } - if _sensorStatusErr != nil { - return errors.Wrap(_sensorStatusErr, "Error serializing 'sensorStatus' field") - } + // Simple Field (sensorStatus) + if pushErr := writeBuffer.PushContext("sensorStatus"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for sensorStatus") + } + _sensorStatusErr := writeBuffer.WriteSerializable(ctx, m.GetSensorStatus()) + if popErr := writeBuffer.PopContext("sensorStatus"); popErr != nil { + return errors.Wrap(popErr, "Error popping for sensorStatus") + } + if _sensorStatusErr != nil { + return errors.Wrap(_sensorStatusErr, "Error serializing 'sensorStatus' field") + } if popErr := writeBuffer.PopContext("AirConditioningDataZoneTemperature"); popErr != nil { return errors.Wrap(popErr, "Error popping for AirConditioningDataZoneTemperature") @@ -294,6 +299,7 @@ func (m *_AirConditioningDataZoneTemperature) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_AirConditioningDataZoneTemperature) isAirConditioningDataZoneTemperature() bool { return true } @@ -308,3 +314,6 @@ func (m *_AirConditioningDataZoneTemperature) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/Alpha.go b/plc4go/protocols/cbus/readwrite/model/Alpha.go index 749f9520b2f..2cda5d0872a 100644 --- a/plc4go/protocols/cbus/readwrite/model/Alpha.go +++ b/plc4go/protocols/cbus/readwrite/model/Alpha.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Alpha is the corresponding interface of Alpha type Alpha interface { @@ -44,9 +46,10 @@ type AlphaExactly interface { // _Alpha is the data-structure of this message type _Alpha struct { - Character byte + Character byte } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -61,14 +64,15 @@ func (m *_Alpha) GetCharacter() byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAlpha factory function for _Alpha -func NewAlpha(character byte) *_Alpha { - return &_Alpha{Character: character} +func NewAlpha( character byte ) *_Alpha { +return &_Alpha{ Character: character } } // Deprecated: use the interface for direct cast func CastAlpha(structType interface{}) Alpha { - if casted, ok := structType.(Alpha); ok { + if casted, ok := structType.(Alpha); ok { return casted } if casted, ok := structType.(*Alpha); ok { @@ -85,11 +89,12 @@ func (m *_Alpha) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (character) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_Alpha) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -108,14 +113,14 @@ func AlphaParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) (Alp _ = currentPos // Simple Field (character) - _character, _characterErr := readBuffer.ReadByte("character") +_character, _characterErr := readBuffer.ReadByte("character") if _characterErr != nil { return nil, errors.Wrap(_characterErr, "Error parsing 'character' field of Alpha") } character := _character // Validation - if !(bool((bool((character) >= (0x67)))) && bool((bool((character) <= (0x7A))))) { + if (!(bool((bool((character) >= (0x67)))) && bool((bool((character) <= (0x7A)))))) { return nil, errors.WithStack(utils.ParseAssertError{"character not in alpha space"}) } @@ -125,8 +130,8 @@ func AlphaParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) (Alp // Create the instance return &_Alpha{ - Character: character, - }, nil + Character: character, + }, nil } func (m *_Alpha) Serialize() ([]byte, error) { @@ -140,7 +145,7 @@ func (m *_Alpha) Serialize() ([]byte, error) { func (m *_Alpha) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("Alpha"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("Alpha"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for Alpha") } @@ -157,6 +162,7 @@ func (m *_Alpha) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils return nil } + func (m *_Alpha) isAlpha() bool { return true } @@ -171,3 +177,6 @@ func (m *_Alpha) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/ApplicationAddress1.go b/plc4go/protocols/cbus/readwrite/model/ApplicationAddress1.go index c224d436e23..632e481c4d5 100644 --- a/plc4go/protocols/cbus/readwrite/model/ApplicationAddress1.go +++ b/plc4go/protocols/cbus/readwrite/model/ApplicationAddress1.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApplicationAddress1 is the corresponding interface of ApplicationAddress1 type ApplicationAddress1 interface { @@ -46,9 +48,10 @@ type ApplicationAddress1Exactly interface { // _ApplicationAddress1 is the data-structure of this message type _ApplicationAddress1 struct { - Address byte + Address byte } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -78,14 +81,15 @@ func (m *_ApplicationAddress1) GetIsWildcard() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewApplicationAddress1 factory function for _ApplicationAddress1 -func NewApplicationAddress1(address byte) *_ApplicationAddress1 { - return &_ApplicationAddress1{Address: address} +func NewApplicationAddress1( address byte ) *_ApplicationAddress1 { +return &_ApplicationAddress1{ Address: address } } // Deprecated: use the interface for direct cast func CastApplicationAddress1(structType interface{}) ApplicationAddress1 { - if casted, ok := structType.(ApplicationAddress1); ok { + if casted, ok := structType.(ApplicationAddress1); ok { return casted } if casted, ok := structType.(*ApplicationAddress1); ok { @@ -102,13 +106,14 @@ func (m *_ApplicationAddress1) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (address) - lengthInBits += 8 + lengthInBits += 8; // A virtual field doesn't have any in- or output. return lengthInBits } + func (m *_ApplicationAddress1) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -127,7 +132,7 @@ func ApplicationAddress1ParseWithBuffer(ctx context.Context, readBuffer utils.Re _ = currentPos // Simple Field (address) - _address, _addressErr := readBuffer.ReadByte("address") +_address, _addressErr := readBuffer.ReadByte("address") if _addressErr != nil { return nil, errors.Wrap(_addressErr, "Error parsing 'address' field of ApplicationAddress1") } @@ -144,8 +149,8 @@ func ApplicationAddress1ParseWithBuffer(ctx context.Context, readBuffer utils.Re // Create the instance return &_ApplicationAddress1{ - Address: address, - }, nil + Address: address, + }, nil } func (m *_ApplicationAddress1) Serialize() ([]byte, error) { @@ -159,7 +164,7 @@ func (m *_ApplicationAddress1) Serialize() ([]byte, error) { func (m *_ApplicationAddress1) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("ApplicationAddress1"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("ApplicationAddress1"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for ApplicationAddress1") } @@ -180,6 +185,7 @@ func (m *_ApplicationAddress1) SerializeWithWriteBuffer(ctx context.Context, wri return nil } + func (m *_ApplicationAddress1) isApplicationAddress1() bool { return true } @@ -194,3 +200,6 @@ func (m *_ApplicationAddress1) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/ApplicationAddress2.go b/plc4go/protocols/cbus/readwrite/model/ApplicationAddress2.go index 84f2453c5af..1eafe162b95 100644 --- a/plc4go/protocols/cbus/readwrite/model/ApplicationAddress2.go +++ b/plc4go/protocols/cbus/readwrite/model/ApplicationAddress2.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApplicationAddress2 is the corresponding interface of ApplicationAddress2 type ApplicationAddress2 interface { @@ -46,9 +48,10 @@ type ApplicationAddress2Exactly interface { // _ApplicationAddress2 is the data-structure of this message type _ApplicationAddress2 struct { - Address byte + Address byte } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -78,14 +81,15 @@ func (m *_ApplicationAddress2) GetIsWildcard() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewApplicationAddress2 factory function for _ApplicationAddress2 -func NewApplicationAddress2(address byte) *_ApplicationAddress2 { - return &_ApplicationAddress2{Address: address} +func NewApplicationAddress2( address byte ) *_ApplicationAddress2 { +return &_ApplicationAddress2{ Address: address } } // Deprecated: use the interface for direct cast func CastApplicationAddress2(structType interface{}) ApplicationAddress2 { - if casted, ok := structType.(ApplicationAddress2); ok { + if casted, ok := structType.(ApplicationAddress2); ok { return casted } if casted, ok := structType.(*ApplicationAddress2); ok { @@ -102,13 +106,14 @@ func (m *_ApplicationAddress2) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (address) - lengthInBits += 8 + lengthInBits += 8; // A virtual field doesn't have any in- or output. return lengthInBits } + func (m *_ApplicationAddress2) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -127,7 +132,7 @@ func ApplicationAddress2ParseWithBuffer(ctx context.Context, readBuffer utils.Re _ = currentPos // Simple Field (address) - _address, _addressErr := readBuffer.ReadByte("address") +_address, _addressErr := readBuffer.ReadByte("address") if _addressErr != nil { return nil, errors.Wrap(_addressErr, "Error parsing 'address' field of ApplicationAddress2") } @@ -144,8 +149,8 @@ func ApplicationAddress2ParseWithBuffer(ctx context.Context, readBuffer utils.Re // Create the instance return &_ApplicationAddress2{ - Address: address, - }, nil + Address: address, + }, nil } func (m *_ApplicationAddress2) Serialize() ([]byte, error) { @@ -159,7 +164,7 @@ func (m *_ApplicationAddress2) Serialize() ([]byte, error) { func (m *_ApplicationAddress2) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("ApplicationAddress2"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("ApplicationAddress2"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for ApplicationAddress2") } @@ -180,6 +185,7 @@ func (m *_ApplicationAddress2) SerializeWithWriteBuffer(ctx context.Context, wri return nil } + func (m *_ApplicationAddress2) isApplicationAddress2() bool { return true } @@ -194,3 +200,6 @@ func (m *_ApplicationAddress2) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/ApplicationId.go b/plc4go/protocols/cbus/readwrite/model/ApplicationId.go index 69c9b4b4b5a..14bd2b7d7bb 100644 --- a/plc4go/protocols/cbus/readwrite/model/ApplicationId.go +++ b/plc4go/protocols/cbus/readwrite/model/ApplicationId.go @@ -34,39 +34,39 @@ type IApplicationId interface { utils.Serializable } -const ( - ApplicationId_RESERVED ApplicationId = 0x00 - ApplicationId_FREE_USAGE ApplicationId = 0x01 - ApplicationId_TEMPERATURE_BROADCAST ApplicationId = 0x02 - ApplicationId_ROOM_CONTROL_SYSTEM ApplicationId = 0x03 - ApplicationId_LIGHTING ApplicationId = 0x04 - ApplicationId_VENTILATION ApplicationId = 0x05 - ApplicationId_IRRIGATION_CONTROL ApplicationId = 0x06 +const( + ApplicationId_RESERVED ApplicationId = 0x00 + ApplicationId_FREE_USAGE ApplicationId = 0x01 + ApplicationId_TEMPERATURE_BROADCAST ApplicationId = 0x02 + ApplicationId_ROOM_CONTROL_SYSTEM ApplicationId = 0x03 + ApplicationId_LIGHTING ApplicationId = 0x04 + ApplicationId_VENTILATION ApplicationId = 0x05 + ApplicationId_IRRIGATION_CONTROL ApplicationId = 0x06 ApplicationId_POOLS_SPAS_PONDS_FOUNTAINS_CONTROL ApplicationId = 0x07 - ApplicationId_HEATING ApplicationId = 0x08 - ApplicationId_AIR_CONDITIONING ApplicationId = 0x09 - ApplicationId_TRIGGER_CONTROL ApplicationId = 0x0A - ApplicationId_ENABLE_CONTROL ApplicationId = 0x0B - ApplicationId_AUDIO_AND_VIDEO ApplicationId = 0x0C - ApplicationId_SECURITY ApplicationId = 0x0D - ApplicationId_METERING ApplicationId = 0x0E - ApplicationId_ACCESS_CONTROL ApplicationId = 0x0F - ApplicationId_CLOCK_AND_TIMEKEEPING ApplicationId = 0x10 - ApplicationId_TELEPHONY_STATUS_AND_CONTROL ApplicationId = 0x11 - ApplicationId_MEASUREMENT ApplicationId = 0x12 - ApplicationId_TESTING ApplicationId = 0x13 - ApplicationId_MEDIA_TRANSPORT_CONTROL ApplicationId = 0x14 - ApplicationId_ERROR_REPORTING ApplicationId = 0x15 - ApplicationId_HVAC_ACTUATOR ApplicationId = 0x16 - ApplicationId_INFO_MESSAGES ApplicationId = 0x17 - ApplicationId_NETWORK_CONTROL ApplicationId = 0x18 + ApplicationId_HEATING ApplicationId = 0x08 + ApplicationId_AIR_CONDITIONING ApplicationId = 0x09 + ApplicationId_TRIGGER_CONTROL ApplicationId = 0x0A + ApplicationId_ENABLE_CONTROL ApplicationId = 0x0B + ApplicationId_AUDIO_AND_VIDEO ApplicationId = 0x0C + ApplicationId_SECURITY ApplicationId = 0x0D + ApplicationId_METERING ApplicationId = 0x0E + ApplicationId_ACCESS_CONTROL ApplicationId = 0x0F + ApplicationId_CLOCK_AND_TIMEKEEPING ApplicationId = 0x10 + ApplicationId_TELEPHONY_STATUS_AND_CONTROL ApplicationId = 0x11 + ApplicationId_MEASUREMENT ApplicationId = 0x12 + ApplicationId_TESTING ApplicationId = 0x13 + ApplicationId_MEDIA_TRANSPORT_CONTROL ApplicationId = 0x14 + ApplicationId_ERROR_REPORTING ApplicationId = 0x15 + ApplicationId_HVAC_ACTUATOR ApplicationId = 0x16 + ApplicationId_INFO_MESSAGES ApplicationId = 0x17 + ApplicationId_NETWORK_CONTROL ApplicationId = 0x18 ) var ApplicationIdValues []ApplicationId func init() { _ = errors.New - ApplicationIdValues = []ApplicationId{ + ApplicationIdValues = []ApplicationId { ApplicationId_RESERVED, ApplicationId_FREE_USAGE, ApplicationId_TEMPERATURE_BROADCAST, @@ -97,56 +97,56 @@ func init() { func ApplicationIdByValue(value uint8) (enum ApplicationId, ok bool) { switch value { - case 0x00: - return ApplicationId_RESERVED, true - case 0x01: - return ApplicationId_FREE_USAGE, true - case 0x02: - return ApplicationId_TEMPERATURE_BROADCAST, true - case 0x03: - return ApplicationId_ROOM_CONTROL_SYSTEM, true - case 0x04: - return ApplicationId_LIGHTING, true - case 0x05: - return ApplicationId_VENTILATION, true - case 0x06: - return ApplicationId_IRRIGATION_CONTROL, true - case 0x07: - return ApplicationId_POOLS_SPAS_PONDS_FOUNTAINS_CONTROL, true - case 0x08: - return ApplicationId_HEATING, true - case 0x09: - return ApplicationId_AIR_CONDITIONING, true - case 0x0A: - return ApplicationId_TRIGGER_CONTROL, true - case 0x0B: - return ApplicationId_ENABLE_CONTROL, true - case 0x0C: - return ApplicationId_AUDIO_AND_VIDEO, true - case 0x0D: - return ApplicationId_SECURITY, true - case 0x0E: - return ApplicationId_METERING, true - case 0x0F: - return ApplicationId_ACCESS_CONTROL, true - case 0x10: - return ApplicationId_CLOCK_AND_TIMEKEEPING, true - case 0x11: - return ApplicationId_TELEPHONY_STATUS_AND_CONTROL, true - case 0x12: - return ApplicationId_MEASUREMENT, true - case 0x13: - return ApplicationId_TESTING, true - case 0x14: - return ApplicationId_MEDIA_TRANSPORT_CONTROL, true - case 0x15: - return ApplicationId_ERROR_REPORTING, true - case 0x16: - return ApplicationId_HVAC_ACTUATOR, true - case 0x17: - return ApplicationId_INFO_MESSAGES, true - case 0x18: - return ApplicationId_NETWORK_CONTROL, true + case 0x00: + return ApplicationId_RESERVED, true + case 0x01: + return ApplicationId_FREE_USAGE, true + case 0x02: + return ApplicationId_TEMPERATURE_BROADCAST, true + case 0x03: + return ApplicationId_ROOM_CONTROL_SYSTEM, true + case 0x04: + return ApplicationId_LIGHTING, true + case 0x05: + return ApplicationId_VENTILATION, true + case 0x06: + return ApplicationId_IRRIGATION_CONTROL, true + case 0x07: + return ApplicationId_POOLS_SPAS_PONDS_FOUNTAINS_CONTROL, true + case 0x08: + return ApplicationId_HEATING, true + case 0x09: + return ApplicationId_AIR_CONDITIONING, true + case 0x0A: + return ApplicationId_TRIGGER_CONTROL, true + case 0x0B: + return ApplicationId_ENABLE_CONTROL, true + case 0x0C: + return ApplicationId_AUDIO_AND_VIDEO, true + case 0x0D: + return ApplicationId_SECURITY, true + case 0x0E: + return ApplicationId_METERING, true + case 0x0F: + return ApplicationId_ACCESS_CONTROL, true + case 0x10: + return ApplicationId_CLOCK_AND_TIMEKEEPING, true + case 0x11: + return ApplicationId_TELEPHONY_STATUS_AND_CONTROL, true + case 0x12: + return ApplicationId_MEASUREMENT, true + case 0x13: + return ApplicationId_TESTING, true + case 0x14: + return ApplicationId_MEDIA_TRANSPORT_CONTROL, true + case 0x15: + return ApplicationId_ERROR_REPORTING, true + case 0x16: + return ApplicationId_HVAC_ACTUATOR, true + case 0x17: + return ApplicationId_INFO_MESSAGES, true + case 0x18: + return ApplicationId_NETWORK_CONTROL, true } return 0, false } @@ -207,13 +207,13 @@ func ApplicationIdByName(value string) (enum ApplicationId, ok bool) { return 0, false } -func ApplicationIdKnows(value uint8) bool { +func ApplicationIdKnows(value uint8) bool { for _, typeValue := range ApplicationIdValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastApplicationId(structType interface{}) ApplicationId { @@ -323,3 +323,4 @@ func (e ApplicationId) PLC4XEnumName() string { func (e ApplicationId) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/ApplicationIdContainer.go b/plc4go/protocols/cbus/readwrite/model/ApplicationIdContainer.go index 084bebad895..1c1e6b8b03f 100644 --- a/plc4go/protocols/cbus/readwrite/model/ApplicationIdContainer.go +++ b/plc4go/protocols/cbus/readwrite/model/ApplicationIdContainer.go @@ -36,270 +36,270 @@ type IApplicationIdContainer interface { ApplicationId() ApplicationId } -const ( - ApplicationIdContainer_RESERVED_00 ApplicationIdContainer = 0x00 - ApplicationIdContainer_FREE_USAGE_01 ApplicationIdContainer = 0x01 - ApplicationIdContainer_FREE_USAGE_02 ApplicationIdContainer = 0x02 - ApplicationIdContainer_FREE_USAGE_03 ApplicationIdContainer = 0x03 - ApplicationIdContainer_FREE_USAGE_04 ApplicationIdContainer = 0x04 - ApplicationIdContainer_FREE_USAGE_05 ApplicationIdContainer = 0x05 - ApplicationIdContainer_FREE_USAGE_06 ApplicationIdContainer = 0x06 - ApplicationIdContainer_FREE_USAGE_07 ApplicationIdContainer = 0x07 - ApplicationIdContainer_FREE_USAGE_08 ApplicationIdContainer = 0x08 - ApplicationIdContainer_FREE_USAGE_09 ApplicationIdContainer = 0x09 - ApplicationIdContainer_FREE_USAGE_0A ApplicationIdContainer = 0x0A - ApplicationIdContainer_FREE_USAGE_0B ApplicationIdContainer = 0x0B - ApplicationIdContainer_FREE_USAGE_0C ApplicationIdContainer = 0x0C - ApplicationIdContainer_FREE_USAGE_0D ApplicationIdContainer = 0x0D - ApplicationIdContainer_FREE_USAGE_0E ApplicationIdContainer = 0x0E - ApplicationIdContainer_FREE_USAGE_0F ApplicationIdContainer = 0x0F - ApplicationIdContainer_RESERVED_10 ApplicationIdContainer = 0x10 - ApplicationIdContainer_RESERVED_11 ApplicationIdContainer = 0x11 - ApplicationIdContainer_RESERVED_12 ApplicationIdContainer = 0x12 - ApplicationIdContainer_RESERVED_13 ApplicationIdContainer = 0x13 - ApplicationIdContainer_RESERVED_14 ApplicationIdContainer = 0x14 - ApplicationIdContainer_RESERVED_15 ApplicationIdContainer = 0x15 - ApplicationIdContainer_RESERVED_16 ApplicationIdContainer = 0x16 - ApplicationIdContainer_RESERVED_17 ApplicationIdContainer = 0x17 - ApplicationIdContainer_RESERVED_18 ApplicationIdContainer = 0x18 - ApplicationIdContainer_TEMPERATURE_BROADCAST_19 ApplicationIdContainer = 0x19 - ApplicationIdContainer_RESERVED_1A ApplicationIdContainer = 0x1A - ApplicationIdContainer_RESERVED_1B ApplicationIdContainer = 0x1B - ApplicationIdContainer_RESERVED_1C ApplicationIdContainer = 0x1C - ApplicationIdContainer_RESERVED_1D ApplicationIdContainer = 0x1D - ApplicationIdContainer_RESERVED_1E ApplicationIdContainer = 0x1E - ApplicationIdContainer_RESERVED_1F ApplicationIdContainer = 0x1F - ApplicationIdContainer_RESERVED_20 ApplicationIdContainer = 0x20 - ApplicationIdContainer_RESERVED_21 ApplicationIdContainer = 0x21 - ApplicationIdContainer_RESERVED_22 ApplicationIdContainer = 0x22 - ApplicationIdContainer_RESERVED_23 ApplicationIdContainer = 0x23 - ApplicationIdContainer_RESERVED_24 ApplicationIdContainer = 0x24 - ApplicationIdContainer_RESERVED_25 ApplicationIdContainer = 0x25 - ApplicationIdContainer_ROOM_CONTROL_SYSTEM_26 ApplicationIdContainer = 0x26 - ApplicationIdContainer_RESERVED_27 ApplicationIdContainer = 0x27 - ApplicationIdContainer_RESERVED_28 ApplicationIdContainer = 0x28 - ApplicationIdContainer_RESERVED_29 ApplicationIdContainer = 0x29 - ApplicationIdContainer_RESERVED_2A ApplicationIdContainer = 0x2A - ApplicationIdContainer_RESERVED_2B ApplicationIdContainer = 0x2B - ApplicationIdContainer_RESERVED_2C ApplicationIdContainer = 0x2C - ApplicationIdContainer_RESERVED_2D ApplicationIdContainer = 0x2D - ApplicationIdContainer_RESERVED_2E ApplicationIdContainer = 0x2E - ApplicationIdContainer_RESERVED_2F ApplicationIdContainer = 0x2F - ApplicationIdContainer_LIGHTING_30 ApplicationIdContainer = 0x30 - ApplicationIdContainer_LIGHTING_31 ApplicationIdContainer = 0x31 - ApplicationIdContainer_LIGHTING_32 ApplicationIdContainer = 0x32 - ApplicationIdContainer_LIGHTING_33 ApplicationIdContainer = 0x33 - ApplicationIdContainer_LIGHTING_34 ApplicationIdContainer = 0x34 - ApplicationIdContainer_LIGHTING_35 ApplicationIdContainer = 0x35 - ApplicationIdContainer_LIGHTING_36 ApplicationIdContainer = 0x36 - ApplicationIdContainer_LIGHTING_37 ApplicationIdContainer = 0x37 - ApplicationIdContainer_LIGHTING_38 ApplicationIdContainer = 0x38 - ApplicationIdContainer_LIGHTING_39 ApplicationIdContainer = 0x39 - ApplicationIdContainer_LIGHTING_3A ApplicationIdContainer = 0x3A - ApplicationIdContainer_LIGHTING_3B ApplicationIdContainer = 0x3B - ApplicationIdContainer_LIGHTING_3C ApplicationIdContainer = 0x3C - ApplicationIdContainer_LIGHTING_3D ApplicationIdContainer = 0x3D - ApplicationIdContainer_LIGHTING_3E ApplicationIdContainer = 0x3E - ApplicationIdContainer_LIGHTING_3F ApplicationIdContainer = 0x3F - ApplicationIdContainer_LIGHTING_40 ApplicationIdContainer = 0x40 - ApplicationIdContainer_LIGHTING_41 ApplicationIdContainer = 0x41 - ApplicationIdContainer_LIGHTING_42 ApplicationIdContainer = 0x42 - ApplicationIdContainer_LIGHTING_43 ApplicationIdContainer = 0x43 - ApplicationIdContainer_LIGHTING_44 ApplicationIdContainer = 0x44 - ApplicationIdContainer_LIGHTING_45 ApplicationIdContainer = 0x45 - ApplicationIdContainer_LIGHTING_46 ApplicationIdContainer = 0x46 - ApplicationIdContainer_LIGHTING_47 ApplicationIdContainer = 0x47 - ApplicationIdContainer_LIGHTING_48 ApplicationIdContainer = 0x48 - ApplicationIdContainer_LIGHTING_49 ApplicationIdContainer = 0x49 - ApplicationIdContainer_LIGHTING_4A ApplicationIdContainer = 0x4A - ApplicationIdContainer_LIGHTING_4B ApplicationIdContainer = 0x4B - ApplicationIdContainer_LIGHTING_4C ApplicationIdContainer = 0x4C - ApplicationIdContainer_LIGHTING_4D ApplicationIdContainer = 0x4D - ApplicationIdContainer_LIGHTING_4E ApplicationIdContainer = 0x4E - ApplicationIdContainer_LIGHTING_4F ApplicationIdContainer = 0x4F - ApplicationIdContainer_LIGHTING_50 ApplicationIdContainer = 0x50 - ApplicationIdContainer_LIGHTING_51 ApplicationIdContainer = 0x51 - ApplicationIdContainer_LIGHTING_52 ApplicationIdContainer = 0x52 - ApplicationIdContainer_LIGHTING_53 ApplicationIdContainer = 0x53 - ApplicationIdContainer_LIGHTING_54 ApplicationIdContainer = 0x54 - ApplicationIdContainer_LIGHTING_55 ApplicationIdContainer = 0x55 - ApplicationIdContainer_LIGHTING_56 ApplicationIdContainer = 0x56 - ApplicationIdContainer_LIGHTING_57 ApplicationIdContainer = 0x57 - ApplicationIdContainer_LIGHTING_58 ApplicationIdContainer = 0x58 - ApplicationIdContainer_LIGHTING_59 ApplicationIdContainer = 0x59 - ApplicationIdContainer_LIGHTING_5A ApplicationIdContainer = 0x5A - ApplicationIdContainer_LIGHTING_5B ApplicationIdContainer = 0x5B - ApplicationIdContainer_LIGHTING_5C ApplicationIdContainer = 0x5C - ApplicationIdContainer_LIGHTING_5D ApplicationIdContainer = 0x5D - ApplicationIdContainer_LIGHTING_5E ApplicationIdContainer = 0x5E - ApplicationIdContainer_LIGHTING_5F ApplicationIdContainer = 0x5F - ApplicationIdContainer_RESERVED_60 ApplicationIdContainer = 0x60 - ApplicationIdContainer_RESERVED_61 ApplicationIdContainer = 0x61 - ApplicationIdContainer_RESERVED_62 ApplicationIdContainer = 0x62 - ApplicationIdContainer_RESERVED_63 ApplicationIdContainer = 0x63 - ApplicationIdContainer_RESERVED_64 ApplicationIdContainer = 0x64 - ApplicationIdContainer_RESERVED_65 ApplicationIdContainer = 0x65 - ApplicationIdContainer_RESERVED_66 ApplicationIdContainer = 0x66 - ApplicationIdContainer_RESERVED_67 ApplicationIdContainer = 0x67 - ApplicationIdContainer_RESERVED_68 ApplicationIdContainer = 0x68 - ApplicationIdContainer_RESERVED_69 ApplicationIdContainer = 0x69 - ApplicationIdContainer_RESERVED_6A ApplicationIdContainer = 0x6A - ApplicationIdContainer_RESERVED_6B ApplicationIdContainer = 0x6B - ApplicationIdContainer_RESERVED_6C ApplicationIdContainer = 0x6C - ApplicationIdContainer_RESERVED_6D ApplicationIdContainer = 0x6D - ApplicationIdContainer_RESERVED_6E ApplicationIdContainer = 0x6E - ApplicationIdContainer_RESERVED_6F ApplicationIdContainer = 0x6F - ApplicationIdContainer_VENTILATION_70 ApplicationIdContainer = 0x70 - ApplicationIdContainer_IRRIGATION_CONTROL_71 ApplicationIdContainer = 0x71 +const( + ApplicationIdContainer_RESERVED_00 ApplicationIdContainer = 0x00 + ApplicationIdContainer_FREE_USAGE_01 ApplicationIdContainer = 0x01 + ApplicationIdContainer_FREE_USAGE_02 ApplicationIdContainer = 0x02 + ApplicationIdContainer_FREE_USAGE_03 ApplicationIdContainer = 0x03 + ApplicationIdContainer_FREE_USAGE_04 ApplicationIdContainer = 0x04 + ApplicationIdContainer_FREE_USAGE_05 ApplicationIdContainer = 0x05 + ApplicationIdContainer_FREE_USAGE_06 ApplicationIdContainer = 0x06 + ApplicationIdContainer_FREE_USAGE_07 ApplicationIdContainer = 0x07 + ApplicationIdContainer_FREE_USAGE_08 ApplicationIdContainer = 0x08 + ApplicationIdContainer_FREE_USAGE_09 ApplicationIdContainer = 0x09 + ApplicationIdContainer_FREE_USAGE_0A ApplicationIdContainer = 0x0A + ApplicationIdContainer_FREE_USAGE_0B ApplicationIdContainer = 0x0B + ApplicationIdContainer_FREE_USAGE_0C ApplicationIdContainer = 0x0C + ApplicationIdContainer_FREE_USAGE_0D ApplicationIdContainer = 0x0D + ApplicationIdContainer_FREE_USAGE_0E ApplicationIdContainer = 0x0E + ApplicationIdContainer_FREE_USAGE_0F ApplicationIdContainer = 0x0F + ApplicationIdContainer_RESERVED_10 ApplicationIdContainer = 0x10 + ApplicationIdContainer_RESERVED_11 ApplicationIdContainer = 0x11 + ApplicationIdContainer_RESERVED_12 ApplicationIdContainer = 0x12 + ApplicationIdContainer_RESERVED_13 ApplicationIdContainer = 0x13 + ApplicationIdContainer_RESERVED_14 ApplicationIdContainer = 0x14 + ApplicationIdContainer_RESERVED_15 ApplicationIdContainer = 0x15 + ApplicationIdContainer_RESERVED_16 ApplicationIdContainer = 0x16 + ApplicationIdContainer_RESERVED_17 ApplicationIdContainer = 0x17 + ApplicationIdContainer_RESERVED_18 ApplicationIdContainer = 0x18 + ApplicationIdContainer_TEMPERATURE_BROADCAST_19 ApplicationIdContainer = 0x19 + ApplicationIdContainer_RESERVED_1A ApplicationIdContainer = 0x1A + ApplicationIdContainer_RESERVED_1B ApplicationIdContainer = 0x1B + ApplicationIdContainer_RESERVED_1C ApplicationIdContainer = 0x1C + ApplicationIdContainer_RESERVED_1D ApplicationIdContainer = 0x1D + ApplicationIdContainer_RESERVED_1E ApplicationIdContainer = 0x1E + ApplicationIdContainer_RESERVED_1F ApplicationIdContainer = 0x1F + ApplicationIdContainer_RESERVED_20 ApplicationIdContainer = 0x20 + ApplicationIdContainer_RESERVED_21 ApplicationIdContainer = 0x21 + ApplicationIdContainer_RESERVED_22 ApplicationIdContainer = 0x22 + ApplicationIdContainer_RESERVED_23 ApplicationIdContainer = 0x23 + ApplicationIdContainer_RESERVED_24 ApplicationIdContainer = 0x24 + ApplicationIdContainer_RESERVED_25 ApplicationIdContainer = 0x25 + ApplicationIdContainer_ROOM_CONTROL_SYSTEM_26 ApplicationIdContainer = 0x26 + ApplicationIdContainer_RESERVED_27 ApplicationIdContainer = 0x27 + ApplicationIdContainer_RESERVED_28 ApplicationIdContainer = 0x28 + ApplicationIdContainer_RESERVED_29 ApplicationIdContainer = 0x29 + ApplicationIdContainer_RESERVED_2A ApplicationIdContainer = 0x2A + ApplicationIdContainer_RESERVED_2B ApplicationIdContainer = 0x2B + ApplicationIdContainer_RESERVED_2C ApplicationIdContainer = 0x2C + ApplicationIdContainer_RESERVED_2D ApplicationIdContainer = 0x2D + ApplicationIdContainer_RESERVED_2E ApplicationIdContainer = 0x2E + ApplicationIdContainer_RESERVED_2F ApplicationIdContainer = 0x2F + ApplicationIdContainer_LIGHTING_30 ApplicationIdContainer = 0x30 + ApplicationIdContainer_LIGHTING_31 ApplicationIdContainer = 0x31 + ApplicationIdContainer_LIGHTING_32 ApplicationIdContainer = 0x32 + ApplicationIdContainer_LIGHTING_33 ApplicationIdContainer = 0x33 + ApplicationIdContainer_LIGHTING_34 ApplicationIdContainer = 0x34 + ApplicationIdContainer_LIGHTING_35 ApplicationIdContainer = 0x35 + ApplicationIdContainer_LIGHTING_36 ApplicationIdContainer = 0x36 + ApplicationIdContainer_LIGHTING_37 ApplicationIdContainer = 0x37 + ApplicationIdContainer_LIGHTING_38 ApplicationIdContainer = 0x38 + ApplicationIdContainer_LIGHTING_39 ApplicationIdContainer = 0x39 + ApplicationIdContainer_LIGHTING_3A ApplicationIdContainer = 0x3A + ApplicationIdContainer_LIGHTING_3B ApplicationIdContainer = 0x3B + ApplicationIdContainer_LIGHTING_3C ApplicationIdContainer = 0x3C + ApplicationIdContainer_LIGHTING_3D ApplicationIdContainer = 0x3D + ApplicationIdContainer_LIGHTING_3E ApplicationIdContainer = 0x3E + ApplicationIdContainer_LIGHTING_3F ApplicationIdContainer = 0x3F + ApplicationIdContainer_LIGHTING_40 ApplicationIdContainer = 0x40 + ApplicationIdContainer_LIGHTING_41 ApplicationIdContainer = 0x41 + ApplicationIdContainer_LIGHTING_42 ApplicationIdContainer = 0x42 + ApplicationIdContainer_LIGHTING_43 ApplicationIdContainer = 0x43 + ApplicationIdContainer_LIGHTING_44 ApplicationIdContainer = 0x44 + ApplicationIdContainer_LIGHTING_45 ApplicationIdContainer = 0x45 + ApplicationIdContainer_LIGHTING_46 ApplicationIdContainer = 0x46 + ApplicationIdContainer_LIGHTING_47 ApplicationIdContainer = 0x47 + ApplicationIdContainer_LIGHTING_48 ApplicationIdContainer = 0x48 + ApplicationIdContainer_LIGHTING_49 ApplicationIdContainer = 0x49 + ApplicationIdContainer_LIGHTING_4A ApplicationIdContainer = 0x4A + ApplicationIdContainer_LIGHTING_4B ApplicationIdContainer = 0x4B + ApplicationIdContainer_LIGHTING_4C ApplicationIdContainer = 0x4C + ApplicationIdContainer_LIGHTING_4D ApplicationIdContainer = 0x4D + ApplicationIdContainer_LIGHTING_4E ApplicationIdContainer = 0x4E + ApplicationIdContainer_LIGHTING_4F ApplicationIdContainer = 0x4F + ApplicationIdContainer_LIGHTING_50 ApplicationIdContainer = 0x50 + ApplicationIdContainer_LIGHTING_51 ApplicationIdContainer = 0x51 + ApplicationIdContainer_LIGHTING_52 ApplicationIdContainer = 0x52 + ApplicationIdContainer_LIGHTING_53 ApplicationIdContainer = 0x53 + ApplicationIdContainer_LIGHTING_54 ApplicationIdContainer = 0x54 + ApplicationIdContainer_LIGHTING_55 ApplicationIdContainer = 0x55 + ApplicationIdContainer_LIGHTING_56 ApplicationIdContainer = 0x56 + ApplicationIdContainer_LIGHTING_57 ApplicationIdContainer = 0x57 + ApplicationIdContainer_LIGHTING_58 ApplicationIdContainer = 0x58 + ApplicationIdContainer_LIGHTING_59 ApplicationIdContainer = 0x59 + ApplicationIdContainer_LIGHTING_5A ApplicationIdContainer = 0x5A + ApplicationIdContainer_LIGHTING_5B ApplicationIdContainer = 0x5B + ApplicationIdContainer_LIGHTING_5C ApplicationIdContainer = 0x5C + ApplicationIdContainer_LIGHTING_5D ApplicationIdContainer = 0x5D + ApplicationIdContainer_LIGHTING_5E ApplicationIdContainer = 0x5E + ApplicationIdContainer_LIGHTING_5F ApplicationIdContainer = 0x5F + ApplicationIdContainer_RESERVED_60 ApplicationIdContainer = 0x60 + ApplicationIdContainer_RESERVED_61 ApplicationIdContainer = 0x61 + ApplicationIdContainer_RESERVED_62 ApplicationIdContainer = 0x62 + ApplicationIdContainer_RESERVED_63 ApplicationIdContainer = 0x63 + ApplicationIdContainer_RESERVED_64 ApplicationIdContainer = 0x64 + ApplicationIdContainer_RESERVED_65 ApplicationIdContainer = 0x65 + ApplicationIdContainer_RESERVED_66 ApplicationIdContainer = 0x66 + ApplicationIdContainer_RESERVED_67 ApplicationIdContainer = 0x67 + ApplicationIdContainer_RESERVED_68 ApplicationIdContainer = 0x68 + ApplicationIdContainer_RESERVED_69 ApplicationIdContainer = 0x69 + ApplicationIdContainer_RESERVED_6A ApplicationIdContainer = 0x6A + ApplicationIdContainer_RESERVED_6B ApplicationIdContainer = 0x6B + ApplicationIdContainer_RESERVED_6C ApplicationIdContainer = 0x6C + ApplicationIdContainer_RESERVED_6D ApplicationIdContainer = 0x6D + ApplicationIdContainer_RESERVED_6E ApplicationIdContainer = 0x6E + ApplicationIdContainer_RESERVED_6F ApplicationIdContainer = 0x6F + ApplicationIdContainer_VENTILATION_70 ApplicationIdContainer = 0x70 + ApplicationIdContainer_IRRIGATION_CONTROL_71 ApplicationIdContainer = 0x71 ApplicationIdContainer_POOLS_SPAS_PONDS_FOUNTAINS_CONTROL_72 ApplicationIdContainer = 0x72 - ApplicationIdContainer_HVAC_ACTUATOR_73 ApplicationIdContainer = 0x73 - ApplicationIdContainer_HVAC_ACTUATOR_74 ApplicationIdContainer = 0x74 - ApplicationIdContainer_RESERVED_75 ApplicationIdContainer = 0x75 - ApplicationIdContainer_RESERVED_76 ApplicationIdContainer = 0x76 - ApplicationIdContainer_RESERVED_77 ApplicationIdContainer = 0x77 - ApplicationIdContainer_RESERVED_78 ApplicationIdContainer = 0x78 - ApplicationIdContainer_RESERVED_79 ApplicationIdContainer = 0x79 - ApplicationIdContainer_RESERVED_7A ApplicationIdContainer = 0x7A - ApplicationIdContainer_RESERVED_7B ApplicationIdContainer = 0x7B - ApplicationIdContainer_RESERVED_7C ApplicationIdContainer = 0x7C - ApplicationIdContainer_RESERVED_7D ApplicationIdContainer = 0x7D - ApplicationIdContainer_RESERVED_7E ApplicationIdContainer = 0x7E - ApplicationIdContainer_RESERVED_7F ApplicationIdContainer = 0x7F - ApplicationIdContainer_RESERVED_80 ApplicationIdContainer = 0x80 - ApplicationIdContainer_RESERVED_81 ApplicationIdContainer = 0x81 - ApplicationIdContainer_RESERVED_82 ApplicationIdContainer = 0x82 - ApplicationIdContainer_RESERVED_83 ApplicationIdContainer = 0x83 - ApplicationIdContainer_RESERVED_84 ApplicationIdContainer = 0x84 - ApplicationIdContainer_RESERVED_85 ApplicationIdContainer = 0x85 - ApplicationIdContainer_RESERVED_86 ApplicationIdContainer = 0x86 - ApplicationIdContainer_RESERVED_87 ApplicationIdContainer = 0x87 - ApplicationIdContainer_HEATING_88 ApplicationIdContainer = 0x88 - ApplicationIdContainer_RESERVED_89 ApplicationIdContainer = 0x89 - ApplicationIdContainer_RESERVED_8A ApplicationIdContainer = 0x8A - ApplicationIdContainer_RESERVED_8B ApplicationIdContainer = 0x8B - ApplicationIdContainer_RESERVED_8C ApplicationIdContainer = 0x8C - ApplicationIdContainer_RESERVED_8D ApplicationIdContainer = 0x8D - ApplicationIdContainer_RESERVED_8E ApplicationIdContainer = 0x8E - ApplicationIdContainer_RESERVED_8F ApplicationIdContainer = 0x8F - ApplicationIdContainer_RESERVED_90 ApplicationIdContainer = 0x90 - ApplicationIdContainer_RESERVED_91 ApplicationIdContainer = 0x91 - ApplicationIdContainer_RESERVED_92 ApplicationIdContainer = 0x92 - ApplicationIdContainer_RESERVED_93 ApplicationIdContainer = 0x93 - ApplicationIdContainer_RESERVED_94 ApplicationIdContainer = 0x94 - ApplicationIdContainer_RESERVED_95 ApplicationIdContainer = 0x95 - ApplicationIdContainer_RESERVED_96 ApplicationIdContainer = 0x96 - ApplicationIdContainer_RESERVED_97 ApplicationIdContainer = 0x97 - ApplicationIdContainer_RESERVED_98 ApplicationIdContainer = 0x98 - ApplicationIdContainer_RESERVED_99 ApplicationIdContainer = 0x99 - ApplicationIdContainer_RESERVED_9A ApplicationIdContainer = 0x9A - ApplicationIdContainer_RESERVED_9B ApplicationIdContainer = 0x9B - ApplicationIdContainer_RESERVED_9C ApplicationIdContainer = 0x9C - ApplicationIdContainer_RESERVED_9D ApplicationIdContainer = 0x9D - ApplicationIdContainer_RESERVED_9E ApplicationIdContainer = 0x9E - ApplicationIdContainer_RESERVED_9F ApplicationIdContainer = 0x9F - ApplicationIdContainer_RESERVED_A0 ApplicationIdContainer = 0xA0 - ApplicationIdContainer_RESERVED_A1 ApplicationIdContainer = 0xA1 - ApplicationIdContainer_RESERVED_A2 ApplicationIdContainer = 0xA2 - ApplicationIdContainer_RESERVED_A3 ApplicationIdContainer = 0xA3 - ApplicationIdContainer_RESERVED_A4 ApplicationIdContainer = 0xA4 - ApplicationIdContainer_RESERVED_A5 ApplicationIdContainer = 0xA5 - ApplicationIdContainer_RESERVED_A6 ApplicationIdContainer = 0xA6 - ApplicationIdContainer_RESERVED_A7 ApplicationIdContainer = 0xA7 - ApplicationIdContainer_RESERVED_A8 ApplicationIdContainer = 0xA8 - ApplicationIdContainer_RESERVED_A9 ApplicationIdContainer = 0xA9 - ApplicationIdContainer_RESERVED_AA ApplicationIdContainer = 0xAA - ApplicationIdContainer_RESERVED_AB ApplicationIdContainer = 0xAB - ApplicationIdContainer_AIR_CONDITIONING_AC ApplicationIdContainer = 0xAC - ApplicationIdContainer_INFO_MESSAGES ApplicationIdContainer = 0xAD - ApplicationIdContainer_RESERVED_AE ApplicationIdContainer = 0xAE - ApplicationIdContainer_RESERVED_AF ApplicationIdContainer = 0xAF - ApplicationIdContainer_RESERVED_B0 ApplicationIdContainer = 0xB0 - ApplicationIdContainer_RESERVED_B1 ApplicationIdContainer = 0xB1 - ApplicationIdContainer_RESERVED_B2 ApplicationIdContainer = 0xB2 - ApplicationIdContainer_RESERVED_B3 ApplicationIdContainer = 0xB3 - ApplicationIdContainer_RESERVED_B4 ApplicationIdContainer = 0xB4 - ApplicationIdContainer_RESERVED_B5 ApplicationIdContainer = 0xB5 - ApplicationIdContainer_RESERVED_B6 ApplicationIdContainer = 0xB6 - ApplicationIdContainer_RESERVED_B7 ApplicationIdContainer = 0xB7 - ApplicationIdContainer_RESERVED_B8 ApplicationIdContainer = 0xB8 - ApplicationIdContainer_RESERVED_B9 ApplicationIdContainer = 0xB9 - ApplicationIdContainer_RESERVED_BA ApplicationIdContainer = 0xBA - ApplicationIdContainer_RESERVED_BB ApplicationIdContainer = 0xBB - ApplicationIdContainer_RESERVED_BC ApplicationIdContainer = 0xBC - ApplicationIdContainer_RESERVED_BD ApplicationIdContainer = 0xBD - ApplicationIdContainer_RESERVED_BE ApplicationIdContainer = 0xBE - ApplicationIdContainer_RESERVED_BF ApplicationIdContainer = 0xBF - ApplicationIdContainer_MEDIA_TRANSPORT_CONTROL_C0 ApplicationIdContainer = 0xC0 - ApplicationIdContainer_RESERVED_C1 ApplicationIdContainer = 0xC1 - ApplicationIdContainer_RESERVED_C2 ApplicationIdContainer = 0xC2 - ApplicationIdContainer_RESERVED_C3 ApplicationIdContainer = 0xC3 - ApplicationIdContainer_RESERVED_C4 ApplicationIdContainer = 0xC4 - ApplicationIdContainer_RESERVED_C5 ApplicationIdContainer = 0xC5 - ApplicationIdContainer_RESERVED_C6 ApplicationIdContainer = 0xC6 - ApplicationIdContainer_RESERVED_C7 ApplicationIdContainer = 0xC7 - ApplicationIdContainer_RESERVED_C8 ApplicationIdContainer = 0xC8 - ApplicationIdContainer_RESERVED_C9 ApplicationIdContainer = 0xC9 - ApplicationIdContainer_TRIGGER_CONTROL_CA ApplicationIdContainer = 0xCA - ApplicationIdContainer_ENABLE_CONTROL_CB ApplicationIdContainer = 0xCB - ApplicationIdContainer_I_HAVE_NO_IDEA_CC ApplicationIdContainer = 0xCC - ApplicationIdContainer_AUDIO_AND_VIDEO_CD ApplicationIdContainer = 0xCD - ApplicationIdContainer_ERROR_REPORTING_CE ApplicationIdContainer = 0xCE - ApplicationIdContainer_RESERVED_CF ApplicationIdContainer = 0xCF - ApplicationIdContainer_SECURITY_D0 ApplicationIdContainer = 0xD0 - ApplicationIdContainer_METERING_D1 ApplicationIdContainer = 0xD1 - ApplicationIdContainer_RESERVED_D2 ApplicationIdContainer = 0xD2 - ApplicationIdContainer_RESERVED_D3 ApplicationIdContainer = 0xD3 - ApplicationIdContainer_RESERVED_D4 ApplicationIdContainer = 0xD4 - ApplicationIdContainer_ACCESS_CONTROL_D5 ApplicationIdContainer = 0xD5 - ApplicationIdContainer_RESERVED_D6 ApplicationIdContainer = 0xD6 - ApplicationIdContainer_RESERVED_D7 ApplicationIdContainer = 0xD7 - ApplicationIdContainer_RESERVED_D8 ApplicationIdContainer = 0xD8 - ApplicationIdContainer_RESERVED_D9 ApplicationIdContainer = 0xD9 - ApplicationIdContainer_RESERVED_DA ApplicationIdContainer = 0xDA - ApplicationIdContainer_RESERVED_DB ApplicationIdContainer = 0xDB - ApplicationIdContainer_RESERVED_DC ApplicationIdContainer = 0xDC - ApplicationIdContainer_RESERVED_DD ApplicationIdContainer = 0xDD - ApplicationIdContainer_RESERVED_DE ApplicationIdContainer = 0xDE - ApplicationIdContainer_CLOCK_AND_TIMEKEEPING_DF ApplicationIdContainer = 0xDF - ApplicationIdContainer_TELEPHONY_STATUS_AND_CONTROL_E0 ApplicationIdContainer = 0xE0 - ApplicationIdContainer_RESERVED_E1 ApplicationIdContainer = 0xE1 - ApplicationIdContainer_RESERVED_E2 ApplicationIdContainer = 0xE2 - ApplicationIdContainer_RESERVED_E3 ApplicationIdContainer = 0xE3 - ApplicationIdContainer_MEASUREMENT_E4 ApplicationIdContainer = 0xE4 - ApplicationIdContainer_RESERVED_E5 ApplicationIdContainer = 0xE5 - ApplicationIdContainer_RESERVED_E6 ApplicationIdContainer = 0xE6 - ApplicationIdContainer_RESERVED_E7 ApplicationIdContainer = 0xE7 - ApplicationIdContainer_RESERVED_E8 ApplicationIdContainer = 0xE8 - ApplicationIdContainer_RESERVED_E9 ApplicationIdContainer = 0xE9 - ApplicationIdContainer_RESERVED_EA ApplicationIdContainer = 0xEA - ApplicationIdContainer_RESERVED_EB ApplicationIdContainer = 0xEB - ApplicationIdContainer_RESERVED_EC ApplicationIdContainer = 0xEC - ApplicationIdContainer_RESERVED_ED ApplicationIdContainer = 0xED - ApplicationIdContainer_RESERVED_EE ApplicationIdContainer = 0xEE - ApplicationIdContainer_RESERVED_EF ApplicationIdContainer = 0xEF - ApplicationIdContainer_RESERVED_F0 ApplicationIdContainer = 0xF0 - ApplicationIdContainer_RESERVED_F1 ApplicationIdContainer = 0xF1 - ApplicationIdContainer_RESERVED_F2 ApplicationIdContainer = 0xF2 - ApplicationIdContainer_RESERVED_F3 ApplicationIdContainer = 0xF3 - ApplicationIdContainer_RESERVED_F4 ApplicationIdContainer = 0xF4 - ApplicationIdContainer_RESERVED_F5 ApplicationIdContainer = 0xF5 - ApplicationIdContainer_RESERVED_F6 ApplicationIdContainer = 0xF6 - ApplicationIdContainer_RESERVED_F7 ApplicationIdContainer = 0xF7 - ApplicationIdContainer_RESERVED_F8 ApplicationIdContainer = 0xF8 - ApplicationIdContainer_RESERVED_F9 ApplicationIdContainer = 0xF9 - ApplicationIdContainer_TESTING_FA ApplicationIdContainer = 0xFA - ApplicationIdContainer_RESERVED_FB ApplicationIdContainer = 0xFB - ApplicationIdContainer_RESERVED_FC ApplicationIdContainer = 0xFC - ApplicationIdContainer_RESERVED_FD ApplicationIdContainer = 0xFD - ApplicationIdContainer_RESERVED_FE ApplicationIdContainer = 0xFE - ApplicationIdContainer_NETWORK_CONTROL ApplicationIdContainer = 0xFF + ApplicationIdContainer_HVAC_ACTUATOR_73 ApplicationIdContainer = 0x73 + ApplicationIdContainer_HVAC_ACTUATOR_74 ApplicationIdContainer = 0x74 + ApplicationIdContainer_RESERVED_75 ApplicationIdContainer = 0x75 + ApplicationIdContainer_RESERVED_76 ApplicationIdContainer = 0x76 + ApplicationIdContainer_RESERVED_77 ApplicationIdContainer = 0x77 + ApplicationIdContainer_RESERVED_78 ApplicationIdContainer = 0x78 + ApplicationIdContainer_RESERVED_79 ApplicationIdContainer = 0x79 + ApplicationIdContainer_RESERVED_7A ApplicationIdContainer = 0x7A + ApplicationIdContainer_RESERVED_7B ApplicationIdContainer = 0x7B + ApplicationIdContainer_RESERVED_7C ApplicationIdContainer = 0x7C + ApplicationIdContainer_RESERVED_7D ApplicationIdContainer = 0x7D + ApplicationIdContainer_RESERVED_7E ApplicationIdContainer = 0x7E + ApplicationIdContainer_RESERVED_7F ApplicationIdContainer = 0x7F + ApplicationIdContainer_RESERVED_80 ApplicationIdContainer = 0x80 + ApplicationIdContainer_RESERVED_81 ApplicationIdContainer = 0x81 + ApplicationIdContainer_RESERVED_82 ApplicationIdContainer = 0x82 + ApplicationIdContainer_RESERVED_83 ApplicationIdContainer = 0x83 + ApplicationIdContainer_RESERVED_84 ApplicationIdContainer = 0x84 + ApplicationIdContainer_RESERVED_85 ApplicationIdContainer = 0x85 + ApplicationIdContainer_RESERVED_86 ApplicationIdContainer = 0x86 + ApplicationIdContainer_RESERVED_87 ApplicationIdContainer = 0x87 + ApplicationIdContainer_HEATING_88 ApplicationIdContainer = 0x88 + ApplicationIdContainer_RESERVED_89 ApplicationIdContainer = 0x89 + ApplicationIdContainer_RESERVED_8A ApplicationIdContainer = 0x8A + ApplicationIdContainer_RESERVED_8B ApplicationIdContainer = 0x8B + ApplicationIdContainer_RESERVED_8C ApplicationIdContainer = 0x8C + ApplicationIdContainer_RESERVED_8D ApplicationIdContainer = 0x8D + ApplicationIdContainer_RESERVED_8E ApplicationIdContainer = 0x8E + ApplicationIdContainer_RESERVED_8F ApplicationIdContainer = 0x8F + ApplicationIdContainer_RESERVED_90 ApplicationIdContainer = 0x90 + ApplicationIdContainer_RESERVED_91 ApplicationIdContainer = 0x91 + ApplicationIdContainer_RESERVED_92 ApplicationIdContainer = 0x92 + ApplicationIdContainer_RESERVED_93 ApplicationIdContainer = 0x93 + ApplicationIdContainer_RESERVED_94 ApplicationIdContainer = 0x94 + ApplicationIdContainer_RESERVED_95 ApplicationIdContainer = 0x95 + ApplicationIdContainer_RESERVED_96 ApplicationIdContainer = 0x96 + ApplicationIdContainer_RESERVED_97 ApplicationIdContainer = 0x97 + ApplicationIdContainer_RESERVED_98 ApplicationIdContainer = 0x98 + ApplicationIdContainer_RESERVED_99 ApplicationIdContainer = 0x99 + ApplicationIdContainer_RESERVED_9A ApplicationIdContainer = 0x9A + ApplicationIdContainer_RESERVED_9B ApplicationIdContainer = 0x9B + ApplicationIdContainer_RESERVED_9C ApplicationIdContainer = 0x9C + ApplicationIdContainer_RESERVED_9D ApplicationIdContainer = 0x9D + ApplicationIdContainer_RESERVED_9E ApplicationIdContainer = 0x9E + ApplicationIdContainer_RESERVED_9F ApplicationIdContainer = 0x9F + ApplicationIdContainer_RESERVED_A0 ApplicationIdContainer = 0xA0 + ApplicationIdContainer_RESERVED_A1 ApplicationIdContainer = 0xA1 + ApplicationIdContainer_RESERVED_A2 ApplicationIdContainer = 0xA2 + ApplicationIdContainer_RESERVED_A3 ApplicationIdContainer = 0xA3 + ApplicationIdContainer_RESERVED_A4 ApplicationIdContainer = 0xA4 + ApplicationIdContainer_RESERVED_A5 ApplicationIdContainer = 0xA5 + ApplicationIdContainer_RESERVED_A6 ApplicationIdContainer = 0xA6 + ApplicationIdContainer_RESERVED_A7 ApplicationIdContainer = 0xA7 + ApplicationIdContainer_RESERVED_A8 ApplicationIdContainer = 0xA8 + ApplicationIdContainer_RESERVED_A9 ApplicationIdContainer = 0xA9 + ApplicationIdContainer_RESERVED_AA ApplicationIdContainer = 0xAA + ApplicationIdContainer_RESERVED_AB ApplicationIdContainer = 0xAB + ApplicationIdContainer_AIR_CONDITIONING_AC ApplicationIdContainer = 0xAC + ApplicationIdContainer_INFO_MESSAGES ApplicationIdContainer = 0xAD + ApplicationIdContainer_RESERVED_AE ApplicationIdContainer = 0xAE + ApplicationIdContainer_RESERVED_AF ApplicationIdContainer = 0xAF + ApplicationIdContainer_RESERVED_B0 ApplicationIdContainer = 0xB0 + ApplicationIdContainer_RESERVED_B1 ApplicationIdContainer = 0xB1 + ApplicationIdContainer_RESERVED_B2 ApplicationIdContainer = 0xB2 + ApplicationIdContainer_RESERVED_B3 ApplicationIdContainer = 0xB3 + ApplicationIdContainer_RESERVED_B4 ApplicationIdContainer = 0xB4 + ApplicationIdContainer_RESERVED_B5 ApplicationIdContainer = 0xB5 + ApplicationIdContainer_RESERVED_B6 ApplicationIdContainer = 0xB6 + ApplicationIdContainer_RESERVED_B7 ApplicationIdContainer = 0xB7 + ApplicationIdContainer_RESERVED_B8 ApplicationIdContainer = 0xB8 + ApplicationIdContainer_RESERVED_B9 ApplicationIdContainer = 0xB9 + ApplicationIdContainer_RESERVED_BA ApplicationIdContainer = 0xBA + ApplicationIdContainer_RESERVED_BB ApplicationIdContainer = 0xBB + ApplicationIdContainer_RESERVED_BC ApplicationIdContainer = 0xBC + ApplicationIdContainer_RESERVED_BD ApplicationIdContainer = 0xBD + ApplicationIdContainer_RESERVED_BE ApplicationIdContainer = 0xBE + ApplicationIdContainer_RESERVED_BF ApplicationIdContainer = 0xBF + ApplicationIdContainer_MEDIA_TRANSPORT_CONTROL_C0 ApplicationIdContainer = 0xC0 + ApplicationIdContainer_RESERVED_C1 ApplicationIdContainer = 0xC1 + ApplicationIdContainer_RESERVED_C2 ApplicationIdContainer = 0xC2 + ApplicationIdContainer_RESERVED_C3 ApplicationIdContainer = 0xC3 + ApplicationIdContainer_RESERVED_C4 ApplicationIdContainer = 0xC4 + ApplicationIdContainer_RESERVED_C5 ApplicationIdContainer = 0xC5 + ApplicationIdContainer_RESERVED_C6 ApplicationIdContainer = 0xC6 + ApplicationIdContainer_RESERVED_C7 ApplicationIdContainer = 0xC7 + ApplicationIdContainer_RESERVED_C8 ApplicationIdContainer = 0xC8 + ApplicationIdContainer_RESERVED_C9 ApplicationIdContainer = 0xC9 + ApplicationIdContainer_TRIGGER_CONTROL_CA ApplicationIdContainer = 0xCA + ApplicationIdContainer_ENABLE_CONTROL_CB ApplicationIdContainer = 0xCB + ApplicationIdContainer_I_HAVE_NO_IDEA_CC ApplicationIdContainer = 0xCC + ApplicationIdContainer_AUDIO_AND_VIDEO_CD ApplicationIdContainer = 0xCD + ApplicationIdContainer_ERROR_REPORTING_CE ApplicationIdContainer = 0xCE + ApplicationIdContainer_RESERVED_CF ApplicationIdContainer = 0xCF + ApplicationIdContainer_SECURITY_D0 ApplicationIdContainer = 0xD0 + ApplicationIdContainer_METERING_D1 ApplicationIdContainer = 0xD1 + ApplicationIdContainer_RESERVED_D2 ApplicationIdContainer = 0xD2 + ApplicationIdContainer_RESERVED_D3 ApplicationIdContainer = 0xD3 + ApplicationIdContainer_RESERVED_D4 ApplicationIdContainer = 0xD4 + ApplicationIdContainer_ACCESS_CONTROL_D5 ApplicationIdContainer = 0xD5 + ApplicationIdContainer_RESERVED_D6 ApplicationIdContainer = 0xD6 + ApplicationIdContainer_RESERVED_D7 ApplicationIdContainer = 0xD7 + ApplicationIdContainer_RESERVED_D8 ApplicationIdContainer = 0xD8 + ApplicationIdContainer_RESERVED_D9 ApplicationIdContainer = 0xD9 + ApplicationIdContainer_RESERVED_DA ApplicationIdContainer = 0xDA + ApplicationIdContainer_RESERVED_DB ApplicationIdContainer = 0xDB + ApplicationIdContainer_RESERVED_DC ApplicationIdContainer = 0xDC + ApplicationIdContainer_RESERVED_DD ApplicationIdContainer = 0xDD + ApplicationIdContainer_RESERVED_DE ApplicationIdContainer = 0xDE + ApplicationIdContainer_CLOCK_AND_TIMEKEEPING_DF ApplicationIdContainer = 0xDF + ApplicationIdContainer_TELEPHONY_STATUS_AND_CONTROL_E0 ApplicationIdContainer = 0xE0 + ApplicationIdContainer_RESERVED_E1 ApplicationIdContainer = 0xE1 + ApplicationIdContainer_RESERVED_E2 ApplicationIdContainer = 0xE2 + ApplicationIdContainer_RESERVED_E3 ApplicationIdContainer = 0xE3 + ApplicationIdContainer_MEASUREMENT_E4 ApplicationIdContainer = 0xE4 + ApplicationIdContainer_RESERVED_E5 ApplicationIdContainer = 0xE5 + ApplicationIdContainer_RESERVED_E6 ApplicationIdContainer = 0xE6 + ApplicationIdContainer_RESERVED_E7 ApplicationIdContainer = 0xE7 + ApplicationIdContainer_RESERVED_E8 ApplicationIdContainer = 0xE8 + ApplicationIdContainer_RESERVED_E9 ApplicationIdContainer = 0xE9 + ApplicationIdContainer_RESERVED_EA ApplicationIdContainer = 0xEA + ApplicationIdContainer_RESERVED_EB ApplicationIdContainer = 0xEB + ApplicationIdContainer_RESERVED_EC ApplicationIdContainer = 0xEC + ApplicationIdContainer_RESERVED_ED ApplicationIdContainer = 0xED + ApplicationIdContainer_RESERVED_EE ApplicationIdContainer = 0xEE + ApplicationIdContainer_RESERVED_EF ApplicationIdContainer = 0xEF + ApplicationIdContainer_RESERVED_F0 ApplicationIdContainer = 0xF0 + ApplicationIdContainer_RESERVED_F1 ApplicationIdContainer = 0xF1 + ApplicationIdContainer_RESERVED_F2 ApplicationIdContainer = 0xF2 + ApplicationIdContainer_RESERVED_F3 ApplicationIdContainer = 0xF3 + ApplicationIdContainer_RESERVED_F4 ApplicationIdContainer = 0xF4 + ApplicationIdContainer_RESERVED_F5 ApplicationIdContainer = 0xF5 + ApplicationIdContainer_RESERVED_F6 ApplicationIdContainer = 0xF6 + ApplicationIdContainer_RESERVED_F7 ApplicationIdContainer = 0xF7 + ApplicationIdContainer_RESERVED_F8 ApplicationIdContainer = 0xF8 + ApplicationIdContainer_RESERVED_F9 ApplicationIdContainer = 0xF9 + ApplicationIdContainer_TESTING_FA ApplicationIdContainer = 0xFA + ApplicationIdContainer_RESERVED_FB ApplicationIdContainer = 0xFB + ApplicationIdContainer_RESERVED_FC ApplicationIdContainer = 0xFC + ApplicationIdContainer_RESERVED_FD ApplicationIdContainer = 0xFD + ApplicationIdContainer_RESERVED_FE ApplicationIdContainer = 0xFE + ApplicationIdContainer_NETWORK_CONTROL ApplicationIdContainer = 0xFF ) var ApplicationIdContainerValues []ApplicationIdContainer func init() { _ = errors.New - ApplicationIdContainerValues = []ApplicationIdContainer{ + ApplicationIdContainerValues = []ApplicationIdContainer { ApplicationIdContainer_RESERVED_00, ApplicationIdContainer_FREE_USAGE_01, ApplicationIdContainer_FREE_USAGE_02, @@ -559,1034 +559,778 @@ func init() { } } + func (e ApplicationIdContainer) LightingCompatible() LightingCompatible { - switch e { - case 0x00: - { /* '0x00' */ + switch e { + case 0x00: { /* '0x00' */ return LightingCompatible_NA } - case 0x01: - { /* '0x01' */ + case 0x01: { /* '0x01' */ return LightingCompatible_NA } - case 0x02: - { /* '0x02' */ + case 0x02: { /* '0x02' */ return LightingCompatible_NA } - case 0x03: - { /* '0x03' */ + case 0x03: { /* '0x03' */ return LightingCompatible_NA } - case 0x04: - { /* '0x04' */ + case 0x04: { /* '0x04' */ return LightingCompatible_NA } - case 0x05: - { /* '0x05' */ + case 0x05: { /* '0x05' */ return LightingCompatible_NA } - case 0x06: - { /* '0x06' */ + case 0x06: { /* '0x06' */ return LightingCompatible_NA } - case 0x07: - { /* '0x07' */ + case 0x07: { /* '0x07' */ return LightingCompatible_NA } - case 0x08: - { /* '0x08' */ + case 0x08: { /* '0x08' */ return LightingCompatible_NA } - case 0x09: - { /* '0x09' */ + case 0x09: { /* '0x09' */ return LightingCompatible_NA } - case 0x0A: - { /* '0x0A' */ + case 0x0A: { /* '0x0A' */ return LightingCompatible_NA } - case 0x0B: - { /* '0x0B' */ + case 0x0B: { /* '0x0B' */ return LightingCompatible_NA } - case 0x0C: - { /* '0x0C' */ + case 0x0C: { /* '0x0C' */ return LightingCompatible_NA } - case 0x0D: - { /* '0x0D' */ + case 0x0D: { /* '0x0D' */ return LightingCompatible_NA } - case 0x0E: - { /* '0x0E' */ + case 0x0E: { /* '0x0E' */ return LightingCompatible_NA } - case 0x0F: - { /* '0x0F' */ + case 0x0F: { /* '0x0F' */ return LightingCompatible_NA } - case 0x10: - { /* '0x10' */ + case 0x10: { /* '0x10' */ return LightingCompatible_NA } - case 0x11: - { /* '0x11' */ + case 0x11: { /* '0x11' */ return LightingCompatible_NA } - case 0x12: - { /* '0x12' */ + case 0x12: { /* '0x12' */ return LightingCompatible_NA } - case 0x13: - { /* '0x13' */ + case 0x13: { /* '0x13' */ return LightingCompatible_NA } - case 0x14: - { /* '0x14' */ + case 0x14: { /* '0x14' */ return LightingCompatible_NA } - case 0x15: - { /* '0x15' */ + case 0x15: { /* '0x15' */ return LightingCompatible_NA } - case 0x16: - { /* '0x16' */ + case 0x16: { /* '0x16' */ return LightingCompatible_NA } - case 0x17: - { /* '0x17' */ + case 0x17: { /* '0x17' */ return LightingCompatible_NA } - case 0x18: - { /* '0x18' */ + case 0x18: { /* '0x18' */ return LightingCompatible_NA } - case 0x19: - { /* '0x19' */ + case 0x19: { /* '0x19' */ return LightingCompatible_NO } - case 0x1A: - { /* '0x1A' */ + case 0x1A: { /* '0x1A' */ return LightingCompatible_NA } - case 0x1B: - { /* '0x1B' */ + case 0x1B: { /* '0x1B' */ return LightingCompatible_NA } - case 0x1C: - { /* '0x1C' */ + case 0x1C: { /* '0x1C' */ return LightingCompatible_NA } - case 0x1D: - { /* '0x1D' */ + case 0x1D: { /* '0x1D' */ return LightingCompatible_NA } - case 0x1E: - { /* '0x1E' */ + case 0x1E: { /* '0x1E' */ return LightingCompatible_NA } - case 0x1F: - { /* '0x1F' */ + case 0x1F: { /* '0x1F' */ return LightingCompatible_NA } - case 0x20: - { /* '0x20' */ + case 0x20: { /* '0x20' */ return LightingCompatible_NA } - case 0x21: - { /* '0x21' */ + case 0x21: { /* '0x21' */ return LightingCompatible_NA } - case 0x22: - { /* '0x22' */ + case 0x22: { /* '0x22' */ return LightingCompatible_NA } - case 0x23: - { /* '0x23' */ + case 0x23: { /* '0x23' */ return LightingCompatible_NA } - case 0x24: - { /* '0x24' */ + case 0x24: { /* '0x24' */ return LightingCompatible_NA } - case 0x25: - { /* '0x25' */ + case 0x25: { /* '0x25' */ return LightingCompatible_NA } - case 0x26: - { /* '0x26' */ + case 0x26: { /* '0x26' */ return LightingCompatible_YES } - case 0x27: - { /* '0x27' */ + case 0x27: { /* '0x27' */ return LightingCompatible_NA } - case 0x28: - { /* '0x28' */ + case 0x28: { /* '0x28' */ return LightingCompatible_NA } - case 0x29: - { /* '0x29' */ + case 0x29: { /* '0x29' */ return LightingCompatible_NA } - case 0x2A: - { /* '0x2A' */ + case 0x2A: { /* '0x2A' */ return LightingCompatible_NA } - case 0x2B: - { /* '0x2B' */ + case 0x2B: { /* '0x2B' */ return LightingCompatible_NA } - case 0x2C: - { /* '0x2C' */ + case 0x2C: { /* '0x2C' */ return LightingCompatible_NA } - case 0x2D: - { /* '0x2D' */ + case 0x2D: { /* '0x2D' */ return LightingCompatible_NA } - case 0x2E: - { /* '0x2E' */ + case 0x2E: { /* '0x2E' */ return LightingCompatible_NA } - case 0x2F: - { /* '0x2F' */ + case 0x2F: { /* '0x2F' */ return LightingCompatible_NA } - case 0x30: - { /* '0x30' */ + case 0x30: { /* '0x30' */ return LightingCompatible_YES } - case 0x31: - { /* '0x31' */ + case 0x31: { /* '0x31' */ return LightingCompatible_YES } - case 0x32: - { /* '0x32' */ + case 0x32: { /* '0x32' */ return LightingCompatible_YES } - case 0x33: - { /* '0x33' */ + case 0x33: { /* '0x33' */ return LightingCompatible_YES } - case 0x34: - { /* '0x34' */ + case 0x34: { /* '0x34' */ return LightingCompatible_YES } - case 0x35: - { /* '0x35' */ + case 0x35: { /* '0x35' */ return LightingCompatible_YES } - case 0x36: - { /* '0x36' */ + case 0x36: { /* '0x36' */ return LightingCompatible_YES } - case 0x37: - { /* '0x37' */ + case 0x37: { /* '0x37' */ return LightingCompatible_YES } - case 0x38: - { /* '0x38' */ + case 0x38: { /* '0x38' */ return LightingCompatible_YES } - case 0x39: - { /* '0x39' */ + case 0x39: { /* '0x39' */ return LightingCompatible_YES } - case 0x3A: - { /* '0x3A' */ + case 0x3A: { /* '0x3A' */ return LightingCompatible_YES } - case 0x3B: - { /* '0x3B' */ + case 0x3B: { /* '0x3B' */ return LightingCompatible_YES } - case 0x3C: - { /* '0x3C' */ + case 0x3C: { /* '0x3C' */ return LightingCompatible_YES } - case 0x3D: - { /* '0x3D' */ + case 0x3D: { /* '0x3D' */ return LightingCompatible_YES } - case 0x3E: - { /* '0x3E' */ + case 0x3E: { /* '0x3E' */ return LightingCompatible_YES } - case 0x3F: - { /* '0x3F' */ + case 0x3F: { /* '0x3F' */ return LightingCompatible_YES } - case 0x40: - { /* '0x40' */ + case 0x40: { /* '0x40' */ return LightingCompatible_YES } - case 0x41: - { /* '0x41' */ + case 0x41: { /* '0x41' */ return LightingCompatible_YES } - case 0x42: - { /* '0x42' */ + case 0x42: { /* '0x42' */ return LightingCompatible_YES } - case 0x43: - { /* '0x43' */ + case 0x43: { /* '0x43' */ return LightingCompatible_YES } - case 0x44: - { /* '0x44' */ + case 0x44: { /* '0x44' */ return LightingCompatible_YES } - case 0x45: - { /* '0x45' */ + case 0x45: { /* '0x45' */ return LightingCompatible_YES } - case 0x46: - { /* '0x46' */ + case 0x46: { /* '0x46' */ return LightingCompatible_YES } - case 0x47: - { /* '0x47' */ + case 0x47: { /* '0x47' */ return LightingCompatible_YES } - case 0x48: - { /* '0x48' */ + case 0x48: { /* '0x48' */ return LightingCompatible_YES } - case 0x49: - { /* '0x49' */ + case 0x49: { /* '0x49' */ return LightingCompatible_YES } - case 0x4A: - { /* '0x4A' */ + case 0x4A: { /* '0x4A' */ return LightingCompatible_YES } - case 0x4B: - { /* '0x4B' */ + case 0x4B: { /* '0x4B' */ return LightingCompatible_YES } - case 0x4C: - { /* '0x4C' */ + case 0x4C: { /* '0x4C' */ return LightingCompatible_YES } - case 0x4D: - { /* '0x4D' */ + case 0x4D: { /* '0x4D' */ return LightingCompatible_YES } - case 0x4E: - { /* '0x4E' */ + case 0x4E: { /* '0x4E' */ return LightingCompatible_YES } - case 0x4F: - { /* '0x4F' */ + case 0x4F: { /* '0x4F' */ return LightingCompatible_YES } - case 0x50: - { /* '0x50' */ + case 0x50: { /* '0x50' */ return LightingCompatible_YES } - case 0x51: - { /* '0x51' */ + case 0x51: { /* '0x51' */ return LightingCompatible_YES } - case 0x52: - { /* '0x52' */ + case 0x52: { /* '0x52' */ return LightingCompatible_YES } - case 0x53: - { /* '0x53' */ + case 0x53: { /* '0x53' */ return LightingCompatible_YES } - case 0x54: - { /* '0x54' */ + case 0x54: { /* '0x54' */ return LightingCompatible_YES } - case 0x55: - { /* '0x55' */ + case 0x55: { /* '0x55' */ return LightingCompatible_YES } - case 0x56: - { /* '0x56' */ + case 0x56: { /* '0x56' */ return LightingCompatible_YES } - case 0x57: - { /* '0x57' */ + case 0x57: { /* '0x57' */ return LightingCompatible_YES } - case 0x58: - { /* '0x58' */ + case 0x58: { /* '0x58' */ return LightingCompatible_YES } - case 0x59: - { /* '0x59' */ + case 0x59: { /* '0x59' */ return LightingCompatible_YES } - case 0x5A: - { /* '0x5A' */ + case 0x5A: { /* '0x5A' */ return LightingCompatible_YES } - case 0x5B: - { /* '0x5B' */ + case 0x5B: { /* '0x5B' */ return LightingCompatible_YES } - case 0x5C: - { /* '0x5C' */ + case 0x5C: { /* '0x5C' */ return LightingCompatible_YES } - case 0x5D: - { /* '0x5D' */ + case 0x5D: { /* '0x5D' */ return LightingCompatible_YES } - case 0x5E: - { /* '0x5E' */ + case 0x5E: { /* '0x5E' */ return LightingCompatible_YES } - case 0x5F: - { /* '0x5F' */ + case 0x5F: { /* '0x5F' */ return LightingCompatible_YES } - case 0x60: - { /* '0x60' */ + case 0x60: { /* '0x60' */ return LightingCompatible_NA } - case 0x61: - { /* '0x61' */ + case 0x61: { /* '0x61' */ return LightingCompatible_NA } - case 0x62: - { /* '0x62' */ + case 0x62: { /* '0x62' */ return LightingCompatible_NA } - case 0x63: - { /* '0x63' */ + case 0x63: { /* '0x63' */ return LightingCompatible_NA } - case 0x64: - { /* '0x64' */ + case 0x64: { /* '0x64' */ return LightingCompatible_NA } - case 0x65: - { /* '0x65' */ + case 0x65: { /* '0x65' */ return LightingCompatible_NA } - case 0x66: - { /* '0x66' */ + case 0x66: { /* '0x66' */ return LightingCompatible_NA } - case 0x67: - { /* '0x67' */ + case 0x67: { /* '0x67' */ return LightingCompatible_NA } - case 0x68: - { /* '0x68' */ + case 0x68: { /* '0x68' */ return LightingCompatible_NA } - case 0x69: - { /* '0x69' */ + case 0x69: { /* '0x69' */ return LightingCompatible_NA } - case 0x6A: - { /* '0x6A' */ + case 0x6A: { /* '0x6A' */ return LightingCompatible_NA } - case 0x6B: - { /* '0x6B' */ + case 0x6B: { /* '0x6B' */ return LightingCompatible_NA } - case 0x6C: - { /* '0x6C' */ + case 0x6C: { /* '0x6C' */ return LightingCompatible_NA } - case 0x6D: - { /* '0x6D' */ + case 0x6D: { /* '0x6D' */ return LightingCompatible_NA } - case 0x6E: - { /* '0x6E' */ + case 0x6E: { /* '0x6E' */ return LightingCompatible_NA } - case 0x6F: - { /* '0x6F' */ + case 0x6F: { /* '0x6F' */ return LightingCompatible_NA } - case 0x70: - { /* '0x70' */ + case 0x70: { /* '0x70' */ return LightingCompatible_YES } - case 0x71: - { /* '0x71' */ + case 0x71: { /* '0x71' */ return LightingCompatible_YES } - case 0x72: - { /* '0x72' */ + case 0x72: { /* '0x72' */ return LightingCompatible_YES } - case 0x73: - { /* '0x73' */ + case 0x73: { /* '0x73' */ return LightingCompatible_NA } - case 0x74: - { /* '0x74' */ + case 0x74: { /* '0x74' */ return LightingCompatible_NA } - case 0x75: - { /* '0x75' */ + case 0x75: { /* '0x75' */ return LightingCompatible_NA } - case 0x76: - { /* '0x76' */ + case 0x76: { /* '0x76' */ return LightingCompatible_NA } - case 0x77: - { /* '0x77' */ + case 0x77: { /* '0x77' */ return LightingCompatible_NA } - case 0x78: - { /* '0x78' */ + case 0x78: { /* '0x78' */ return LightingCompatible_NA } - case 0x79: - { /* '0x79' */ + case 0x79: { /* '0x79' */ return LightingCompatible_NA } - case 0x7A: - { /* '0x7A' */ + case 0x7A: { /* '0x7A' */ return LightingCompatible_NA } - case 0x7B: - { /* '0x7B' */ + case 0x7B: { /* '0x7B' */ return LightingCompatible_NA } - case 0x7C: - { /* '0x7C' */ + case 0x7C: { /* '0x7C' */ return LightingCompatible_NA } - case 0x7D: - { /* '0x7D' */ + case 0x7D: { /* '0x7D' */ return LightingCompatible_NA } - case 0x7E: - { /* '0x7E' */ + case 0x7E: { /* '0x7E' */ return LightingCompatible_NA } - case 0x7F: - { /* '0x7F' */ + case 0x7F: { /* '0x7F' */ return LightingCompatible_NA } - case 0x80: - { /* '0x80' */ + case 0x80: { /* '0x80' */ return LightingCompatible_NA } - case 0x81: - { /* '0x81' */ + case 0x81: { /* '0x81' */ return LightingCompatible_NA } - case 0x82: - { /* '0x82' */ + case 0x82: { /* '0x82' */ return LightingCompatible_NA } - case 0x83: - { /* '0x83' */ + case 0x83: { /* '0x83' */ return LightingCompatible_NA } - case 0x84: - { /* '0x84' */ + case 0x84: { /* '0x84' */ return LightingCompatible_NA } - case 0x85: - { /* '0x85' */ + case 0x85: { /* '0x85' */ return LightingCompatible_NA } - case 0x86: - { /* '0x86' */ + case 0x86: { /* '0x86' */ return LightingCompatible_NA } - case 0x87: - { /* '0x87' */ + case 0x87: { /* '0x87' */ return LightingCompatible_NA } - case 0x88: - { /* '0x88' */ + case 0x88: { /* '0x88' */ return LightingCompatible_YES } - case 0x89: - { /* '0x89' */ + case 0x89: { /* '0x89' */ return LightingCompatible_NA } - case 0x8A: - { /* '0x8A' */ + case 0x8A: { /* '0x8A' */ return LightingCompatible_NA } - case 0x8B: - { /* '0x8B' */ + case 0x8B: { /* '0x8B' */ return LightingCompatible_NA } - case 0x8C: - { /* '0x8C' */ + case 0x8C: { /* '0x8C' */ return LightingCompatible_NA } - case 0x8D: - { /* '0x8D' */ + case 0x8D: { /* '0x8D' */ return LightingCompatible_NA } - case 0x8E: - { /* '0x8E' */ + case 0x8E: { /* '0x8E' */ return LightingCompatible_NA } - case 0x8F: - { /* '0x8F' */ + case 0x8F: { /* '0x8F' */ return LightingCompatible_NA } - case 0x90: - { /* '0x90' */ + case 0x90: { /* '0x90' */ return LightingCompatible_NA } - case 0x91: - { /* '0x91' */ + case 0x91: { /* '0x91' */ return LightingCompatible_NA } - case 0x92: - { /* '0x92' */ + case 0x92: { /* '0x92' */ return LightingCompatible_NA } - case 0x93: - { /* '0x93' */ + case 0x93: { /* '0x93' */ return LightingCompatible_NA } - case 0x94: - { /* '0x94' */ + case 0x94: { /* '0x94' */ return LightingCompatible_NA } - case 0x95: - { /* '0x95' */ + case 0x95: { /* '0x95' */ return LightingCompatible_NA } - case 0x96: - { /* '0x96' */ + case 0x96: { /* '0x96' */ return LightingCompatible_NA } - case 0x97: - { /* '0x97' */ + case 0x97: { /* '0x97' */ return LightingCompatible_NA } - case 0x98: - { /* '0x98' */ + case 0x98: { /* '0x98' */ return LightingCompatible_NA } - case 0x99: - { /* '0x99' */ + case 0x99: { /* '0x99' */ return LightingCompatible_NA } - case 0x9A: - { /* '0x9A' */ + case 0x9A: { /* '0x9A' */ return LightingCompatible_NA } - case 0x9B: - { /* '0x9B' */ + case 0x9B: { /* '0x9B' */ return LightingCompatible_NA } - case 0x9C: - { /* '0x9C' */ + case 0x9C: { /* '0x9C' */ return LightingCompatible_NA } - case 0x9D: - { /* '0x9D' */ + case 0x9D: { /* '0x9D' */ return LightingCompatible_NA } - case 0x9E: - { /* '0x9E' */ + case 0x9E: { /* '0x9E' */ return LightingCompatible_NA } - case 0x9F: - { /* '0x9F' */ + case 0x9F: { /* '0x9F' */ return LightingCompatible_NA } - case 0xA0: - { /* '0xA0' */ + case 0xA0: { /* '0xA0' */ return LightingCompatible_NA } - case 0xA1: - { /* '0xA1' */ + case 0xA1: { /* '0xA1' */ return LightingCompatible_NA } - case 0xA2: - { /* '0xA2' */ + case 0xA2: { /* '0xA2' */ return LightingCompatible_NA } - case 0xA3: - { /* '0xA3' */ + case 0xA3: { /* '0xA3' */ return LightingCompatible_NA } - case 0xA4: - { /* '0xA4' */ + case 0xA4: { /* '0xA4' */ return LightingCompatible_NA } - case 0xA5: - { /* '0xA5' */ + case 0xA5: { /* '0xA5' */ return LightingCompatible_NA } - case 0xA6: - { /* '0xA6' */ + case 0xA6: { /* '0xA6' */ return LightingCompatible_NA } - case 0xA7: - { /* '0xA7' */ + case 0xA7: { /* '0xA7' */ return LightingCompatible_NA } - case 0xA8: - { /* '0xA8' */ + case 0xA8: { /* '0xA8' */ return LightingCompatible_NA } - case 0xA9: - { /* '0xA9' */ + case 0xA9: { /* '0xA9' */ return LightingCompatible_NA } - case 0xAA: - { /* '0xAA' */ + case 0xAA: { /* '0xAA' */ return LightingCompatible_NA } - case 0xAB: - { /* '0xAB' */ + case 0xAB: { /* '0xAB' */ return LightingCompatible_NA } - case 0xAC: - { /* '0xAC' */ + case 0xAC: { /* '0xAC' */ return LightingCompatible_NO } - case 0xAD: - { /* '0xAD' */ + case 0xAD: { /* '0xAD' */ return LightingCompatible_NA } - case 0xAE: - { /* '0xAE' */ + case 0xAE: { /* '0xAE' */ return LightingCompatible_NA } - case 0xAF: - { /* '0xAF' */ + case 0xAF: { /* '0xAF' */ return LightingCompatible_NA } - case 0xB0: - { /* '0xB0' */ + case 0xB0: { /* '0xB0' */ return LightingCompatible_NA } - case 0xB1: - { /* '0xB1' */ + case 0xB1: { /* '0xB1' */ return LightingCompatible_NA } - case 0xB2: - { /* '0xB2' */ + case 0xB2: { /* '0xB2' */ return LightingCompatible_NA } - case 0xB3: - { /* '0xB3' */ + case 0xB3: { /* '0xB3' */ return LightingCompatible_NA } - case 0xB4: - { /* '0xB4' */ + case 0xB4: { /* '0xB4' */ return LightingCompatible_NA } - case 0xB5: - { /* '0xB5' */ + case 0xB5: { /* '0xB5' */ return LightingCompatible_NA } - case 0xB6: - { /* '0xB6' */ + case 0xB6: { /* '0xB6' */ return LightingCompatible_NA } - case 0xB7: - { /* '0xB7' */ + case 0xB7: { /* '0xB7' */ return LightingCompatible_NA } - case 0xB8: - { /* '0xB8' */ + case 0xB8: { /* '0xB8' */ return LightingCompatible_NA } - case 0xB9: - { /* '0xB9' */ + case 0xB9: { /* '0xB9' */ return LightingCompatible_NA } - case 0xBA: - { /* '0xBA' */ + case 0xBA: { /* '0xBA' */ return LightingCompatible_NA } - case 0xBB: - { /* '0xBB' */ + case 0xBB: { /* '0xBB' */ return LightingCompatible_NA } - case 0xBC: - { /* '0xBC' */ + case 0xBC: { /* '0xBC' */ return LightingCompatible_NA } - case 0xBD: - { /* '0xBD' */ + case 0xBD: { /* '0xBD' */ return LightingCompatible_NA } - case 0xBE: - { /* '0xBE' */ + case 0xBE: { /* '0xBE' */ return LightingCompatible_NA } - case 0xBF: - { /* '0xBF' */ + case 0xBF: { /* '0xBF' */ return LightingCompatible_NA } - case 0xC0: - { /* '0xC0' */ + case 0xC0: { /* '0xC0' */ return LightingCompatible_NA } - case 0xC1: - { /* '0xC1' */ + case 0xC1: { /* '0xC1' */ return LightingCompatible_NA } - case 0xC2: - { /* '0xC2' */ + case 0xC2: { /* '0xC2' */ return LightingCompatible_NA } - case 0xC3: - { /* '0xC3' */ + case 0xC3: { /* '0xC3' */ return LightingCompatible_NA } - case 0xC4: - { /* '0xC4' */ + case 0xC4: { /* '0xC4' */ return LightingCompatible_NA } - case 0xC5: - { /* '0xC5' */ + case 0xC5: { /* '0xC5' */ return LightingCompatible_NA } - case 0xC6: - { /* '0xC6' */ + case 0xC6: { /* '0xC6' */ return LightingCompatible_NA } - case 0xC7: - { /* '0xC7' */ + case 0xC7: { /* '0xC7' */ return LightingCompatible_NA } - case 0xC8: - { /* '0xC8' */ + case 0xC8: { /* '0xC8' */ return LightingCompatible_NA } - case 0xC9: - { /* '0xC9' */ + case 0xC9: { /* '0xC9' */ return LightingCompatible_NA } - case 0xCA: - { /* '0xCA' */ + case 0xCA: { /* '0xCA' */ return LightingCompatible_YES_BUT_RESTRICTIONS } - case 0xCB: - { /* '0xCB' */ + case 0xCB: { /* '0xCB' */ return LightingCompatible_YES_BUT_RESTRICTIONS } - case 0xCC: - { /* '0xCC' */ + case 0xCC: { /* '0xCC' */ return LightingCompatible_NA } - case 0xCD: - { /* '0xCD' */ + case 0xCD: { /* '0xCD' */ return LightingCompatible_YES_BUT_RESTRICTIONS } - case 0xCE: - { /* '0xCE' */ + case 0xCE: { /* '0xCE' */ return LightingCompatible_NA } - case 0xCF: - { /* '0xCF' */ + case 0xCF: { /* '0xCF' */ return LightingCompatible_NA } - case 0xD0: - { /* '0xD0' */ + case 0xD0: { /* '0xD0' */ return LightingCompatible_NO } - case 0xD1: - { /* '0xD1' */ + case 0xD1: { /* '0xD1' */ return LightingCompatible_NO } - case 0xD2: - { /* '0xD2' */ + case 0xD2: { /* '0xD2' */ return LightingCompatible_NA } - case 0xD3: - { /* '0xD3' */ + case 0xD3: { /* '0xD3' */ return LightingCompatible_NA } - case 0xD4: - { /* '0xD4' */ + case 0xD4: { /* '0xD4' */ return LightingCompatible_NA } - case 0xD5: - { /* '0xD5' */ + case 0xD5: { /* '0xD5' */ return LightingCompatible_NO } - case 0xD6: - { /* '0xD6' */ + case 0xD6: { /* '0xD6' */ return LightingCompatible_NA } - case 0xD7: - { /* '0xD7' */ + case 0xD7: { /* '0xD7' */ return LightingCompatible_NA } - case 0xD8: - { /* '0xD8' */ + case 0xD8: { /* '0xD8' */ return LightingCompatible_NA } - case 0xD9: - { /* '0xD9' */ + case 0xD9: { /* '0xD9' */ return LightingCompatible_NA } - case 0xDA: - { /* '0xDA' */ + case 0xDA: { /* '0xDA' */ return LightingCompatible_NA } - case 0xDB: - { /* '0xDB' */ + case 0xDB: { /* '0xDB' */ return LightingCompatible_NA } - case 0xDC: - { /* '0xDC' */ + case 0xDC: { /* '0xDC' */ return LightingCompatible_NA } - case 0xDD: - { /* '0xDD' */ + case 0xDD: { /* '0xDD' */ return LightingCompatible_NA } - case 0xDE: - { /* '0xDE' */ + case 0xDE: { /* '0xDE' */ return LightingCompatible_NA } - case 0xDF: - { /* '0xDF' */ + case 0xDF: { /* '0xDF' */ return LightingCompatible_NO } - case 0xE0: - { /* '0xE0' */ + case 0xE0: { /* '0xE0' */ return LightingCompatible_NO } - case 0xE1: - { /* '0xE1' */ + case 0xE1: { /* '0xE1' */ return LightingCompatible_NA } - case 0xE2: - { /* '0xE2' */ + case 0xE2: { /* '0xE2' */ return LightingCompatible_NA } - case 0xE3: - { /* '0xE3' */ + case 0xE3: { /* '0xE3' */ return LightingCompatible_NA } - case 0xE4: - { /* '0xE4' */ + case 0xE4: { /* '0xE4' */ return LightingCompatible_NO } - case 0xE5: - { /* '0xE5' */ + case 0xE5: { /* '0xE5' */ return LightingCompatible_NA } - case 0xE6: - { /* '0xE6' */ + case 0xE6: { /* '0xE6' */ return LightingCompatible_NA } - case 0xE7: - { /* '0xE7' */ + case 0xE7: { /* '0xE7' */ return LightingCompatible_NA } - case 0xE8: - { /* '0xE8' */ + case 0xE8: { /* '0xE8' */ return LightingCompatible_NA } - case 0xE9: - { /* '0xE9' */ + case 0xE9: { /* '0xE9' */ return LightingCompatible_NA } - case 0xEA: - { /* '0xEA' */ + case 0xEA: { /* '0xEA' */ return LightingCompatible_NA } - case 0xEB: - { /* '0xEB' */ + case 0xEB: { /* '0xEB' */ return LightingCompatible_NA } - case 0xEC: - { /* '0xEC' */ + case 0xEC: { /* '0xEC' */ return LightingCompatible_NA } - case 0xED: - { /* '0xED' */ + case 0xED: { /* '0xED' */ return LightingCompatible_NA } - case 0xEE: - { /* '0xEE' */ + case 0xEE: { /* '0xEE' */ return LightingCompatible_NA } - case 0xEF: - { /* '0xEF' */ + case 0xEF: { /* '0xEF' */ return LightingCompatible_NA } - case 0xF0: - { /* '0xF0' */ + case 0xF0: { /* '0xF0' */ return LightingCompatible_NA } - case 0xF1: - { /* '0xF1' */ + case 0xF1: { /* '0xF1' */ return LightingCompatible_NA } - case 0xF2: - { /* '0xF2' */ + case 0xF2: { /* '0xF2' */ return LightingCompatible_NA } - case 0xF3: - { /* '0xF3' */ + case 0xF3: { /* '0xF3' */ return LightingCompatible_NA } - case 0xF4: - { /* '0xF4' */ + case 0xF4: { /* '0xF4' */ return LightingCompatible_NA } - case 0xF5: - { /* '0xF5' */ + case 0xF5: { /* '0xF5' */ return LightingCompatible_NA } - case 0xF6: - { /* '0xF6' */ + case 0xF6: { /* '0xF6' */ return LightingCompatible_NA } - case 0xF7: - { /* '0xF7' */ + case 0xF7: { /* '0xF7' */ return LightingCompatible_NA } - case 0xF8: - { /* '0xF8' */ + case 0xF8: { /* '0xF8' */ return LightingCompatible_NA } - case 0xF9: - { /* '0xF9' */ + case 0xF9: { /* '0xF9' */ return LightingCompatible_NA } - case 0xFA: - { /* '0xFA' */ + case 0xFA: { /* '0xFA' */ return LightingCompatible_NA } - case 0xFB: - { /* '0xFB' */ + case 0xFB: { /* '0xFB' */ return LightingCompatible_NO } - case 0xFC: - { /* '0xFC' */ + case 0xFC: { /* '0xFC' */ return LightingCompatible_NO } - case 0xFD: - { /* '0xFD' */ + case 0xFD: { /* '0xFD' */ return LightingCompatible_NO } - case 0xFE: - { /* '0xFE' */ + case 0xFE: { /* '0xFE' */ return LightingCompatible_NO } - case 0xFF: - { /* '0xFF' */ + case 0xFF: { /* '0xFF' */ return LightingCompatible_NO } - default: - { + default: { return 0 } } @@ -1602,1033 +1346,776 @@ func ApplicationIdContainerFirstEnumForFieldLightingCompatible(value LightingCom } func (e ApplicationIdContainer) ApplicationId() ApplicationId { - switch e { - case 0x00: - { /* '0x00' */ + switch e { + case 0x00: { /* '0x00' */ return ApplicationId_RESERVED } - case 0x01: - { /* '0x01' */ + case 0x01: { /* '0x01' */ return ApplicationId_FREE_USAGE } - case 0x02: - { /* '0x02' */ + case 0x02: { /* '0x02' */ return ApplicationId_FREE_USAGE } - case 0x03: - { /* '0x03' */ + case 0x03: { /* '0x03' */ return ApplicationId_FREE_USAGE } - case 0x04: - { /* '0x04' */ + case 0x04: { /* '0x04' */ return ApplicationId_FREE_USAGE } - case 0x05: - { /* '0x05' */ + case 0x05: { /* '0x05' */ return ApplicationId_FREE_USAGE } - case 0x06: - { /* '0x06' */ + case 0x06: { /* '0x06' */ return ApplicationId_FREE_USAGE } - case 0x07: - { /* '0x07' */ + case 0x07: { /* '0x07' */ return ApplicationId_FREE_USAGE } - case 0x08: - { /* '0x08' */ + case 0x08: { /* '0x08' */ return ApplicationId_FREE_USAGE } - case 0x09: - { /* '0x09' */ + case 0x09: { /* '0x09' */ return ApplicationId_FREE_USAGE } - case 0x0A: - { /* '0x0A' */ + case 0x0A: { /* '0x0A' */ return ApplicationId_FREE_USAGE } - case 0x0B: - { /* '0x0B' */ + case 0x0B: { /* '0x0B' */ return ApplicationId_FREE_USAGE } - case 0x0C: - { /* '0x0C' */ + case 0x0C: { /* '0x0C' */ return ApplicationId_FREE_USAGE } - case 0x0D: - { /* '0x0D' */ + case 0x0D: { /* '0x0D' */ return ApplicationId_FREE_USAGE } - case 0x0E: - { /* '0x0E' */ + case 0x0E: { /* '0x0E' */ return ApplicationId_FREE_USAGE } - case 0x0F: - { /* '0x0F' */ + case 0x0F: { /* '0x0F' */ return ApplicationId_FREE_USAGE } - case 0x10: - { /* '0x10' */ + case 0x10: { /* '0x10' */ return ApplicationId_RESERVED } - case 0x11: - { /* '0x11' */ + case 0x11: { /* '0x11' */ return ApplicationId_RESERVED } - case 0x12: - { /* '0x12' */ + case 0x12: { /* '0x12' */ return ApplicationId_RESERVED } - case 0x13: - { /* '0x13' */ + case 0x13: { /* '0x13' */ return ApplicationId_RESERVED } - case 0x14: - { /* '0x14' */ + case 0x14: { /* '0x14' */ return ApplicationId_RESERVED } - case 0x15: - { /* '0x15' */ + case 0x15: { /* '0x15' */ return ApplicationId_RESERVED } - case 0x16: - { /* '0x16' */ + case 0x16: { /* '0x16' */ return ApplicationId_RESERVED } - case 0x17: - { /* '0x17' */ + case 0x17: { /* '0x17' */ return ApplicationId_RESERVED } - case 0x18: - { /* '0x18' */ + case 0x18: { /* '0x18' */ return ApplicationId_RESERVED } - case 0x19: - { /* '0x19' */ + case 0x19: { /* '0x19' */ return ApplicationId_TEMPERATURE_BROADCAST } - case 0x1A: - { /* '0x1A' */ + case 0x1A: { /* '0x1A' */ return ApplicationId_RESERVED } - case 0x1B: - { /* '0x1B' */ + case 0x1B: { /* '0x1B' */ return ApplicationId_RESERVED } - case 0x1C: - { /* '0x1C' */ + case 0x1C: { /* '0x1C' */ return ApplicationId_RESERVED } - case 0x1D: - { /* '0x1D' */ + case 0x1D: { /* '0x1D' */ return ApplicationId_RESERVED } - case 0x1E: - { /* '0x1E' */ + case 0x1E: { /* '0x1E' */ return ApplicationId_RESERVED } - case 0x1F: - { /* '0x1F' */ + case 0x1F: { /* '0x1F' */ return ApplicationId_RESERVED } - case 0x20: - { /* '0x20' */ + case 0x20: { /* '0x20' */ return ApplicationId_RESERVED } - case 0x21: - { /* '0x21' */ + case 0x21: { /* '0x21' */ return ApplicationId_RESERVED } - case 0x22: - { /* '0x22' */ + case 0x22: { /* '0x22' */ return ApplicationId_RESERVED } - case 0x23: - { /* '0x23' */ + case 0x23: { /* '0x23' */ return ApplicationId_RESERVED } - case 0x24: - { /* '0x24' */ + case 0x24: { /* '0x24' */ return ApplicationId_RESERVED } - case 0x25: - { /* '0x25' */ + case 0x25: { /* '0x25' */ return ApplicationId_RESERVED } - case 0x26: - { /* '0x26' */ + case 0x26: { /* '0x26' */ return ApplicationId_ROOM_CONTROL_SYSTEM } - case 0x27: - { /* '0x27' */ + case 0x27: { /* '0x27' */ return ApplicationId_RESERVED } - case 0x28: - { /* '0x28' */ + case 0x28: { /* '0x28' */ return ApplicationId_RESERVED } - case 0x29: - { /* '0x29' */ + case 0x29: { /* '0x29' */ return ApplicationId_RESERVED } - case 0x2A: - { /* '0x2A' */ + case 0x2A: { /* '0x2A' */ return ApplicationId_RESERVED } - case 0x2B: - { /* '0x2B' */ + case 0x2B: { /* '0x2B' */ return ApplicationId_RESERVED } - case 0x2C: - { /* '0x2C' */ + case 0x2C: { /* '0x2C' */ return ApplicationId_RESERVED } - case 0x2D: - { /* '0x2D' */ + case 0x2D: { /* '0x2D' */ return ApplicationId_RESERVED } - case 0x2E: - { /* '0x2E' */ + case 0x2E: { /* '0x2E' */ return ApplicationId_RESERVED } - case 0x2F: - { /* '0x2F' */ + case 0x2F: { /* '0x2F' */ return ApplicationId_RESERVED } - case 0x30: - { /* '0x30' */ + case 0x30: { /* '0x30' */ return ApplicationId_LIGHTING } - case 0x31: - { /* '0x31' */ + case 0x31: { /* '0x31' */ return ApplicationId_LIGHTING } - case 0x32: - { /* '0x32' */ + case 0x32: { /* '0x32' */ return ApplicationId_LIGHTING } - case 0x33: - { /* '0x33' */ + case 0x33: { /* '0x33' */ return ApplicationId_LIGHTING } - case 0x34: - { /* '0x34' */ + case 0x34: { /* '0x34' */ return ApplicationId_LIGHTING } - case 0x35: - { /* '0x35' */ + case 0x35: { /* '0x35' */ return ApplicationId_LIGHTING } - case 0x36: - { /* '0x36' */ + case 0x36: { /* '0x36' */ return ApplicationId_LIGHTING } - case 0x37: - { /* '0x37' */ + case 0x37: { /* '0x37' */ return ApplicationId_LIGHTING } - case 0x38: - { /* '0x38' */ + case 0x38: { /* '0x38' */ return ApplicationId_LIGHTING } - case 0x39: - { /* '0x39' */ + case 0x39: { /* '0x39' */ return ApplicationId_LIGHTING } - case 0x3A: - { /* '0x3A' */ + case 0x3A: { /* '0x3A' */ return ApplicationId_LIGHTING } - case 0x3B: - { /* '0x3B' */ + case 0x3B: { /* '0x3B' */ return ApplicationId_LIGHTING } - case 0x3C: - { /* '0x3C' */ + case 0x3C: { /* '0x3C' */ return ApplicationId_LIGHTING } - case 0x3D: - { /* '0x3D' */ + case 0x3D: { /* '0x3D' */ return ApplicationId_LIGHTING } - case 0x3E: - { /* '0x3E' */ + case 0x3E: { /* '0x3E' */ return ApplicationId_LIGHTING } - case 0x3F: - { /* '0x3F' */ + case 0x3F: { /* '0x3F' */ return ApplicationId_LIGHTING } - case 0x40: - { /* '0x40' */ + case 0x40: { /* '0x40' */ return ApplicationId_LIGHTING } - case 0x41: - { /* '0x41' */ + case 0x41: { /* '0x41' */ return ApplicationId_LIGHTING } - case 0x42: - { /* '0x42' */ + case 0x42: { /* '0x42' */ return ApplicationId_LIGHTING } - case 0x43: - { /* '0x43' */ + case 0x43: { /* '0x43' */ return ApplicationId_LIGHTING } - case 0x44: - { /* '0x44' */ + case 0x44: { /* '0x44' */ return ApplicationId_LIGHTING } - case 0x45: - { /* '0x45' */ + case 0x45: { /* '0x45' */ return ApplicationId_LIGHTING } - case 0x46: - { /* '0x46' */ + case 0x46: { /* '0x46' */ return ApplicationId_LIGHTING } - case 0x47: - { /* '0x47' */ + case 0x47: { /* '0x47' */ return ApplicationId_LIGHTING } - case 0x48: - { /* '0x48' */ + case 0x48: { /* '0x48' */ return ApplicationId_LIGHTING } - case 0x49: - { /* '0x49' */ + case 0x49: { /* '0x49' */ return ApplicationId_LIGHTING } - case 0x4A: - { /* '0x4A' */ + case 0x4A: { /* '0x4A' */ return ApplicationId_LIGHTING } - case 0x4B: - { /* '0x4B' */ + case 0x4B: { /* '0x4B' */ return ApplicationId_LIGHTING } - case 0x4C: - { /* '0x4C' */ + case 0x4C: { /* '0x4C' */ return ApplicationId_LIGHTING } - case 0x4D: - { /* '0x4D' */ + case 0x4D: { /* '0x4D' */ return ApplicationId_LIGHTING } - case 0x4E: - { /* '0x4E' */ + case 0x4E: { /* '0x4E' */ return ApplicationId_LIGHTING } - case 0x4F: - { /* '0x4F' */ + case 0x4F: { /* '0x4F' */ return ApplicationId_LIGHTING } - case 0x50: - { /* '0x50' */ + case 0x50: { /* '0x50' */ return ApplicationId_LIGHTING } - case 0x51: - { /* '0x51' */ + case 0x51: { /* '0x51' */ return ApplicationId_LIGHTING } - case 0x52: - { /* '0x52' */ + case 0x52: { /* '0x52' */ return ApplicationId_LIGHTING } - case 0x53: - { /* '0x53' */ + case 0x53: { /* '0x53' */ return ApplicationId_LIGHTING } - case 0x54: - { /* '0x54' */ + case 0x54: { /* '0x54' */ return ApplicationId_LIGHTING } - case 0x55: - { /* '0x55' */ + case 0x55: { /* '0x55' */ return ApplicationId_LIGHTING } - case 0x56: - { /* '0x56' */ + case 0x56: { /* '0x56' */ return ApplicationId_LIGHTING } - case 0x57: - { /* '0x57' */ + case 0x57: { /* '0x57' */ return ApplicationId_LIGHTING } - case 0x58: - { /* '0x58' */ + case 0x58: { /* '0x58' */ return ApplicationId_LIGHTING } - case 0x59: - { /* '0x59' */ + case 0x59: { /* '0x59' */ return ApplicationId_LIGHTING } - case 0x5A: - { /* '0x5A' */ + case 0x5A: { /* '0x5A' */ return ApplicationId_LIGHTING } - case 0x5B: - { /* '0x5B' */ + case 0x5B: { /* '0x5B' */ return ApplicationId_LIGHTING } - case 0x5C: - { /* '0x5C' */ + case 0x5C: { /* '0x5C' */ return ApplicationId_LIGHTING } - case 0x5D: - { /* '0x5D' */ + case 0x5D: { /* '0x5D' */ return ApplicationId_LIGHTING } - case 0x5E: - { /* '0x5E' */ + case 0x5E: { /* '0x5E' */ return ApplicationId_LIGHTING } - case 0x5F: - { /* '0x5F' */ + case 0x5F: { /* '0x5F' */ return ApplicationId_LIGHTING } - case 0x60: - { /* '0x60' */ + case 0x60: { /* '0x60' */ return ApplicationId_RESERVED } - case 0x61: - { /* '0x61' */ + case 0x61: { /* '0x61' */ return ApplicationId_RESERVED } - case 0x62: - { /* '0x62' */ + case 0x62: { /* '0x62' */ return ApplicationId_RESERVED } - case 0x63: - { /* '0x63' */ + case 0x63: { /* '0x63' */ return ApplicationId_RESERVED } - case 0x64: - { /* '0x64' */ + case 0x64: { /* '0x64' */ return ApplicationId_RESERVED } - case 0x65: - { /* '0x65' */ + case 0x65: { /* '0x65' */ return ApplicationId_RESERVED } - case 0x66: - { /* '0x66' */ + case 0x66: { /* '0x66' */ return ApplicationId_RESERVED } - case 0x67: - { /* '0x67' */ + case 0x67: { /* '0x67' */ return ApplicationId_RESERVED } - case 0x68: - { /* '0x68' */ + case 0x68: { /* '0x68' */ return ApplicationId_RESERVED } - case 0x69: - { /* '0x69' */ + case 0x69: { /* '0x69' */ return ApplicationId_RESERVED } - case 0x6A: - { /* '0x6A' */ + case 0x6A: { /* '0x6A' */ return ApplicationId_RESERVED } - case 0x6B: - { /* '0x6B' */ + case 0x6B: { /* '0x6B' */ return ApplicationId_RESERVED } - case 0x6C: - { /* '0x6C' */ + case 0x6C: { /* '0x6C' */ return ApplicationId_RESERVED } - case 0x6D: - { /* '0x6D' */ + case 0x6D: { /* '0x6D' */ return ApplicationId_RESERVED } - case 0x6E: - { /* '0x6E' */ + case 0x6E: { /* '0x6E' */ return ApplicationId_RESERVED } - case 0x6F: - { /* '0x6F' */ + case 0x6F: { /* '0x6F' */ return ApplicationId_RESERVED } - case 0x70: - { /* '0x70' */ + case 0x70: { /* '0x70' */ return ApplicationId_VENTILATION } - case 0x71: - { /* '0x71' */ + case 0x71: { /* '0x71' */ return ApplicationId_IRRIGATION_CONTROL } - case 0x72: - { /* '0x72' */ + case 0x72: { /* '0x72' */ return ApplicationId_POOLS_SPAS_PONDS_FOUNTAINS_CONTROL } - case 0x73: - { /* '0x73' */ + case 0x73: { /* '0x73' */ return ApplicationId_HVAC_ACTUATOR } - case 0x74: - { /* '0x74' */ + case 0x74: { /* '0x74' */ return ApplicationId_HVAC_ACTUATOR } - case 0x75: - { /* '0x75' */ + case 0x75: { /* '0x75' */ return ApplicationId_RESERVED } - case 0x76: - { /* '0x76' */ + case 0x76: { /* '0x76' */ return ApplicationId_RESERVED } - case 0x77: - { /* '0x77' */ + case 0x77: { /* '0x77' */ return ApplicationId_RESERVED } - case 0x78: - { /* '0x78' */ + case 0x78: { /* '0x78' */ return ApplicationId_RESERVED } - case 0x79: - { /* '0x79' */ + case 0x79: { /* '0x79' */ return ApplicationId_RESERVED } - case 0x7A: - { /* '0x7A' */ + case 0x7A: { /* '0x7A' */ return ApplicationId_RESERVED } - case 0x7B: - { /* '0x7B' */ + case 0x7B: { /* '0x7B' */ return ApplicationId_RESERVED } - case 0x7C: - { /* '0x7C' */ + case 0x7C: { /* '0x7C' */ return ApplicationId_RESERVED } - case 0x7D: - { /* '0x7D' */ + case 0x7D: { /* '0x7D' */ return ApplicationId_RESERVED } - case 0x7E: - { /* '0x7E' */ + case 0x7E: { /* '0x7E' */ return ApplicationId_RESERVED } - case 0x7F: - { /* '0x7F' */ + case 0x7F: { /* '0x7F' */ return ApplicationId_RESERVED } - case 0x80: - { /* '0x80' */ + case 0x80: { /* '0x80' */ return ApplicationId_RESERVED } - case 0x81: - { /* '0x81' */ + case 0x81: { /* '0x81' */ return ApplicationId_RESERVED } - case 0x82: - { /* '0x82' */ + case 0x82: { /* '0x82' */ return ApplicationId_RESERVED } - case 0x83: - { /* '0x83' */ + case 0x83: { /* '0x83' */ return ApplicationId_RESERVED } - case 0x84: - { /* '0x84' */ + case 0x84: { /* '0x84' */ return ApplicationId_RESERVED } - case 0x85: - { /* '0x85' */ + case 0x85: { /* '0x85' */ return ApplicationId_RESERVED } - case 0x86: - { /* '0x86' */ + case 0x86: { /* '0x86' */ return ApplicationId_RESERVED } - case 0x87: - { /* '0x87' */ + case 0x87: { /* '0x87' */ return ApplicationId_RESERVED } - case 0x88: - { /* '0x88' */ + case 0x88: { /* '0x88' */ return ApplicationId_HEATING } - case 0x89: - { /* '0x89' */ + case 0x89: { /* '0x89' */ return ApplicationId_RESERVED } - case 0x8A: - { /* '0x8A' */ + case 0x8A: { /* '0x8A' */ return ApplicationId_RESERVED } - case 0x8B: - { /* '0x8B' */ + case 0x8B: { /* '0x8B' */ return ApplicationId_RESERVED } - case 0x8C: - { /* '0x8C' */ + case 0x8C: { /* '0x8C' */ return ApplicationId_RESERVED } - case 0x8D: - { /* '0x8D' */ + case 0x8D: { /* '0x8D' */ return ApplicationId_RESERVED } - case 0x8E: - { /* '0x8E' */ + case 0x8E: { /* '0x8E' */ return ApplicationId_RESERVED } - case 0x8F: - { /* '0x8F' */ + case 0x8F: { /* '0x8F' */ return ApplicationId_RESERVED } - case 0x90: - { /* '0x90' */ + case 0x90: { /* '0x90' */ return ApplicationId_RESERVED } - case 0x91: - { /* '0x91' */ + case 0x91: { /* '0x91' */ return ApplicationId_RESERVED } - case 0x92: - { /* '0x92' */ + case 0x92: { /* '0x92' */ return ApplicationId_RESERVED } - case 0x93: - { /* '0x93' */ + case 0x93: { /* '0x93' */ return ApplicationId_RESERVED } - case 0x94: - { /* '0x94' */ + case 0x94: { /* '0x94' */ return ApplicationId_RESERVED } - case 0x95: - { /* '0x95' */ + case 0x95: { /* '0x95' */ return ApplicationId_RESERVED } - case 0x96: - { /* '0x96' */ + case 0x96: { /* '0x96' */ return ApplicationId_RESERVED } - case 0x97: - { /* '0x97' */ + case 0x97: { /* '0x97' */ return ApplicationId_RESERVED } - case 0x98: - { /* '0x98' */ + case 0x98: { /* '0x98' */ return ApplicationId_RESERVED } - case 0x99: - { /* '0x99' */ + case 0x99: { /* '0x99' */ return ApplicationId_RESERVED } - case 0x9A: - { /* '0x9A' */ + case 0x9A: { /* '0x9A' */ return ApplicationId_RESERVED } - case 0x9B: - { /* '0x9B' */ + case 0x9B: { /* '0x9B' */ return ApplicationId_RESERVED } - case 0x9C: - { /* '0x9C' */ + case 0x9C: { /* '0x9C' */ return ApplicationId_RESERVED } - case 0x9D: - { /* '0x9D' */ + case 0x9D: { /* '0x9D' */ return ApplicationId_RESERVED } - case 0x9E: - { /* '0x9E' */ + case 0x9E: { /* '0x9E' */ return ApplicationId_RESERVED } - case 0x9F: - { /* '0x9F' */ + case 0x9F: { /* '0x9F' */ return ApplicationId_RESERVED } - case 0xA0: - { /* '0xA0' */ + case 0xA0: { /* '0xA0' */ return ApplicationId_RESERVED } - case 0xA1: - { /* '0xA1' */ + case 0xA1: { /* '0xA1' */ return ApplicationId_RESERVED } - case 0xA2: - { /* '0xA2' */ + case 0xA2: { /* '0xA2' */ return ApplicationId_RESERVED } - case 0xA3: - { /* '0xA3' */ + case 0xA3: { /* '0xA3' */ return ApplicationId_RESERVED } - case 0xA4: - { /* '0xA4' */ + case 0xA4: { /* '0xA4' */ return ApplicationId_RESERVED } - case 0xA5: - { /* '0xA5' */ + case 0xA5: { /* '0xA5' */ return ApplicationId_RESERVED } - case 0xA6: - { /* '0xA6' */ + case 0xA6: { /* '0xA6' */ return ApplicationId_RESERVED } - case 0xA7: - { /* '0xA7' */ + case 0xA7: { /* '0xA7' */ return ApplicationId_RESERVED } - case 0xA8: - { /* '0xA8' */ + case 0xA8: { /* '0xA8' */ return ApplicationId_RESERVED } - case 0xA9: - { /* '0xA9' */ + case 0xA9: { /* '0xA9' */ return ApplicationId_RESERVED } - case 0xAA: - { /* '0xAA' */ + case 0xAA: { /* '0xAA' */ return ApplicationId_RESERVED } - case 0xAB: - { /* '0xAB' */ + case 0xAB: { /* '0xAB' */ return ApplicationId_RESERVED } - case 0xAC: - { /* '0xAC' */ + case 0xAC: { /* '0xAC' */ return ApplicationId_AIR_CONDITIONING } - case 0xAD: - { /* '0xAD' */ + case 0xAD: { /* '0xAD' */ return ApplicationId_INFO_MESSAGES } - case 0xAE: - { /* '0xAE' */ + case 0xAE: { /* '0xAE' */ return ApplicationId_RESERVED } - case 0xAF: - { /* '0xAF' */ + case 0xAF: { /* '0xAF' */ return ApplicationId_RESERVED } - case 0xB0: - { /* '0xB0' */ + case 0xB0: { /* '0xB0' */ return ApplicationId_RESERVED } - case 0xB1: - { /* '0xB1' */ + case 0xB1: { /* '0xB1' */ return ApplicationId_RESERVED } - case 0xB2: - { /* '0xB2' */ + case 0xB2: { /* '0xB2' */ return ApplicationId_RESERVED } - case 0xB3: - { /* '0xB3' */ + case 0xB3: { /* '0xB3' */ return ApplicationId_RESERVED } - case 0xB4: - { /* '0xB4' */ + case 0xB4: { /* '0xB4' */ return ApplicationId_RESERVED } - case 0xB5: - { /* '0xB5' */ + case 0xB5: { /* '0xB5' */ return ApplicationId_RESERVED } - case 0xB6: - { /* '0xB6' */ + case 0xB6: { /* '0xB6' */ return ApplicationId_RESERVED } - case 0xB7: - { /* '0xB7' */ + case 0xB7: { /* '0xB7' */ return ApplicationId_RESERVED } - case 0xB8: - { /* '0xB8' */ + case 0xB8: { /* '0xB8' */ return ApplicationId_RESERVED } - case 0xB9: - { /* '0xB9' */ + case 0xB9: { /* '0xB9' */ return ApplicationId_RESERVED } - case 0xBA: - { /* '0xBA' */ + case 0xBA: { /* '0xBA' */ return ApplicationId_RESERVED } - case 0xBB: - { /* '0xBB' */ + case 0xBB: { /* '0xBB' */ return ApplicationId_RESERVED } - case 0xBC: - { /* '0xBC' */ + case 0xBC: { /* '0xBC' */ return ApplicationId_RESERVED } - case 0xBD: - { /* '0xBD' */ + case 0xBD: { /* '0xBD' */ return ApplicationId_RESERVED } - case 0xBE: - { /* '0xBE' */ + case 0xBE: { /* '0xBE' */ return ApplicationId_RESERVED } - case 0xBF: - { /* '0xBF' */ + case 0xBF: { /* '0xBF' */ return ApplicationId_RESERVED } - case 0xC0: - { /* '0xC0' */ + case 0xC0: { /* '0xC0' */ return ApplicationId_MEDIA_TRANSPORT_CONTROL } - case 0xC1: - { /* '0xC1' */ + case 0xC1: { /* '0xC1' */ return ApplicationId_RESERVED } - case 0xC2: - { /* '0xC2' */ + case 0xC2: { /* '0xC2' */ return ApplicationId_RESERVED } - case 0xC3: - { /* '0xC3' */ + case 0xC3: { /* '0xC3' */ return ApplicationId_RESERVED } - case 0xC4: - { /* '0xC4' */ + case 0xC4: { /* '0xC4' */ return ApplicationId_RESERVED } - case 0xC5: - { /* '0xC5' */ + case 0xC5: { /* '0xC5' */ return ApplicationId_RESERVED } - case 0xC6: - { /* '0xC6' */ + case 0xC6: { /* '0xC6' */ return ApplicationId_RESERVED } - case 0xC7: - { /* '0xC7' */ + case 0xC7: { /* '0xC7' */ return ApplicationId_RESERVED } - case 0xC8: - { /* '0xC8' */ + case 0xC8: { /* '0xC8' */ return ApplicationId_RESERVED } - case 0xC9: - { /* '0xC9' */ + case 0xC9: { /* '0xC9' */ return ApplicationId_RESERVED } - case 0xCA: - { /* '0xCA' */ + case 0xCA: { /* '0xCA' */ return ApplicationId_TRIGGER_CONTROL } - case 0xCB: - { /* '0xCB' */ + case 0xCB: { /* '0xCB' */ return ApplicationId_ENABLE_CONTROL } - case 0xCC: - { /* '0xCC' */ + case 0xCC: { /* '0xCC' */ return ApplicationId_RESERVED } - case 0xCD: - { /* '0xCD' */ + case 0xCD: { /* '0xCD' */ return ApplicationId_AUDIO_AND_VIDEO } - case 0xCE: - { /* '0xCE' */ + case 0xCE: { /* '0xCE' */ return ApplicationId_ERROR_REPORTING } - case 0xCF: - { /* '0xCF' */ + case 0xCF: { /* '0xCF' */ return ApplicationId_RESERVED } - case 0xD0: - { /* '0xD0' */ + case 0xD0: { /* '0xD0' */ return ApplicationId_SECURITY } - case 0xD1: - { /* '0xD1' */ + case 0xD1: { /* '0xD1' */ return ApplicationId_METERING } - case 0xD2: - { /* '0xD2' */ + case 0xD2: { /* '0xD2' */ return ApplicationId_RESERVED } - case 0xD3: - { /* '0xD3' */ + case 0xD3: { /* '0xD3' */ return ApplicationId_RESERVED } - case 0xD4: - { /* '0xD4' */ + case 0xD4: { /* '0xD4' */ return ApplicationId_RESERVED } - case 0xD5: - { /* '0xD5' */ + case 0xD5: { /* '0xD5' */ return ApplicationId_ACCESS_CONTROL } - case 0xD6: - { /* '0xD6' */ + case 0xD6: { /* '0xD6' */ return ApplicationId_RESERVED } - case 0xD7: - { /* '0xD7' */ + case 0xD7: { /* '0xD7' */ return ApplicationId_RESERVED } - case 0xD8: - { /* '0xD8' */ + case 0xD8: { /* '0xD8' */ return ApplicationId_RESERVED } - case 0xD9: - { /* '0xD9' */ + case 0xD9: { /* '0xD9' */ return ApplicationId_RESERVED } - case 0xDA: - { /* '0xDA' */ + case 0xDA: { /* '0xDA' */ return ApplicationId_RESERVED } - case 0xDB: - { /* '0xDB' */ + case 0xDB: { /* '0xDB' */ return ApplicationId_RESERVED } - case 0xDC: - { /* '0xDC' */ + case 0xDC: { /* '0xDC' */ return ApplicationId_RESERVED } - case 0xDD: - { /* '0xDD' */ + case 0xDD: { /* '0xDD' */ return ApplicationId_RESERVED } - case 0xDE: - { /* '0xDE' */ + case 0xDE: { /* '0xDE' */ return ApplicationId_RESERVED } - case 0xDF: - { /* '0xDF' */ + case 0xDF: { /* '0xDF' */ return ApplicationId_CLOCK_AND_TIMEKEEPING } - case 0xE0: - { /* '0xE0' */ + case 0xE0: { /* '0xE0' */ return ApplicationId_TELEPHONY_STATUS_AND_CONTROL } - case 0xE1: - { /* '0xE1' */ + case 0xE1: { /* '0xE1' */ return ApplicationId_RESERVED } - case 0xE2: - { /* '0xE2' */ + case 0xE2: { /* '0xE2' */ return ApplicationId_RESERVED } - case 0xE3: - { /* '0xE3' */ + case 0xE3: { /* '0xE3' */ return ApplicationId_RESERVED } - case 0xE4: - { /* '0xE4' */ + case 0xE4: { /* '0xE4' */ return ApplicationId_MEASUREMENT } - case 0xE5: - { /* '0xE5' */ + case 0xE5: { /* '0xE5' */ return ApplicationId_RESERVED } - case 0xE6: - { /* '0xE6' */ + case 0xE6: { /* '0xE6' */ return ApplicationId_RESERVED } - case 0xE7: - { /* '0xE7' */ + case 0xE7: { /* '0xE7' */ return ApplicationId_RESERVED } - case 0xE8: - { /* '0xE8' */ + case 0xE8: { /* '0xE8' */ return ApplicationId_RESERVED } - case 0xE9: - { /* '0xE9' */ + case 0xE9: { /* '0xE9' */ return ApplicationId_RESERVED } - case 0xEA: - { /* '0xEA' */ + case 0xEA: { /* '0xEA' */ return ApplicationId_RESERVED } - case 0xEB: - { /* '0xEB' */ + case 0xEB: { /* '0xEB' */ return ApplicationId_RESERVED } - case 0xEC: - { /* '0xEC' */ + case 0xEC: { /* '0xEC' */ return ApplicationId_RESERVED } - case 0xED: - { /* '0xED' */ + case 0xED: { /* '0xED' */ return ApplicationId_RESERVED } - case 0xEE: - { /* '0xEE' */ + case 0xEE: { /* '0xEE' */ return ApplicationId_RESERVED } - case 0xEF: - { /* '0xEF' */ + case 0xEF: { /* '0xEF' */ return ApplicationId_RESERVED } - case 0xF0: - { /* '0xF0' */ + case 0xF0: { /* '0xF0' */ return ApplicationId_RESERVED } - case 0xF1: - { /* '0xF1' */ + case 0xF1: { /* '0xF1' */ return ApplicationId_RESERVED } - case 0xF2: - { /* '0xF2' */ + case 0xF2: { /* '0xF2' */ return ApplicationId_RESERVED } - case 0xF3: - { /* '0xF3' */ + case 0xF3: { /* '0xF3' */ return ApplicationId_RESERVED } - case 0xF4: - { /* '0xF4' */ + case 0xF4: { /* '0xF4' */ return ApplicationId_RESERVED } - case 0xF5: - { /* '0xF5' */ + case 0xF5: { /* '0xF5' */ return ApplicationId_RESERVED } - case 0xF6: - { /* '0xF6' */ + case 0xF6: { /* '0xF6' */ return ApplicationId_RESERVED } - case 0xF7: - { /* '0xF7' */ + case 0xF7: { /* '0xF7' */ return ApplicationId_RESERVED } - case 0xF8: - { /* '0xF8' */ + case 0xF8: { /* '0xF8' */ return ApplicationId_RESERVED } - case 0xF9: - { /* '0xF9' */ + case 0xF9: { /* '0xF9' */ return ApplicationId_RESERVED } - case 0xFA: - { /* '0xFA' */ + case 0xFA: { /* '0xFA' */ return ApplicationId_TESTING } - case 0xFB: - { /* '0xFB' */ + case 0xFB: { /* '0xFB' */ return ApplicationId_RESERVED } - case 0xFC: - { /* '0xFC' */ + case 0xFC: { /* '0xFC' */ return ApplicationId_RESERVED } - case 0xFD: - { /* '0xFD' */ + case 0xFD: { /* '0xFD' */ return ApplicationId_RESERVED } - case 0xFE: - { /* '0xFE' */ + case 0xFE: { /* '0xFE' */ return ApplicationId_RESERVED } - case 0xFF: - { /* '0xFF' */ + case 0xFF: { /* '0xFF' */ return ApplicationId_NETWORK_CONTROL } - default: - { + default: { return 0 } } @@ -2644,518 +2131,518 @@ func ApplicationIdContainerFirstEnumForFieldApplicationId(value ApplicationId) ( } func ApplicationIdContainerByValue(value uint8) (enum ApplicationIdContainer, ok bool) { switch value { - case 0x00: - return ApplicationIdContainer_RESERVED_00, true - case 0x01: - return ApplicationIdContainer_FREE_USAGE_01, true - case 0x02: - return ApplicationIdContainer_FREE_USAGE_02, true - case 0x03: - return ApplicationIdContainer_FREE_USAGE_03, true - case 0x04: - return ApplicationIdContainer_FREE_USAGE_04, true - case 0x05: - return ApplicationIdContainer_FREE_USAGE_05, true - case 0x06: - return ApplicationIdContainer_FREE_USAGE_06, true - case 0x07: - return ApplicationIdContainer_FREE_USAGE_07, true - case 0x08: - return ApplicationIdContainer_FREE_USAGE_08, true - case 0x09: - return ApplicationIdContainer_FREE_USAGE_09, true - case 0x0A: - return ApplicationIdContainer_FREE_USAGE_0A, true - case 0x0B: - return ApplicationIdContainer_FREE_USAGE_0B, true - case 0x0C: - return ApplicationIdContainer_FREE_USAGE_0C, true - case 0x0D: - return ApplicationIdContainer_FREE_USAGE_0D, true - case 0x0E: - return ApplicationIdContainer_FREE_USAGE_0E, true - case 0x0F: - return ApplicationIdContainer_FREE_USAGE_0F, true - case 0x10: - return ApplicationIdContainer_RESERVED_10, true - case 0x11: - return ApplicationIdContainer_RESERVED_11, true - case 0x12: - return ApplicationIdContainer_RESERVED_12, true - case 0x13: - return ApplicationIdContainer_RESERVED_13, true - case 0x14: - return ApplicationIdContainer_RESERVED_14, true - case 0x15: - return ApplicationIdContainer_RESERVED_15, true - case 0x16: - return ApplicationIdContainer_RESERVED_16, true - case 0x17: - return ApplicationIdContainer_RESERVED_17, true - case 0x18: - return ApplicationIdContainer_RESERVED_18, true - case 0x19: - return ApplicationIdContainer_TEMPERATURE_BROADCAST_19, true - case 0x1A: - return ApplicationIdContainer_RESERVED_1A, true - case 0x1B: - return ApplicationIdContainer_RESERVED_1B, true - case 0x1C: - return ApplicationIdContainer_RESERVED_1C, true - case 0x1D: - return ApplicationIdContainer_RESERVED_1D, true - case 0x1E: - return ApplicationIdContainer_RESERVED_1E, true - case 0x1F: - return ApplicationIdContainer_RESERVED_1F, true - case 0x20: - return ApplicationIdContainer_RESERVED_20, true - case 0x21: - return ApplicationIdContainer_RESERVED_21, true - case 0x22: - return ApplicationIdContainer_RESERVED_22, true - case 0x23: - return ApplicationIdContainer_RESERVED_23, true - case 0x24: - return ApplicationIdContainer_RESERVED_24, true - case 0x25: - return ApplicationIdContainer_RESERVED_25, true - case 0x26: - return ApplicationIdContainer_ROOM_CONTROL_SYSTEM_26, true - case 0x27: - return ApplicationIdContainer_RESERVED_27, true - case 0x28: - return ApplicationIdContainer_RESERVED_28, true - case 0x29: - return ApplicationIdContainer_RESERVED_29, true - case 0x2A: - return ApplicationIdContainer_RESERVED_2A, true - case 0x2B: - return ApplicationIdContainer_RESERVED_2B, true - case 0x2C: - return ApplicationIdContainer_RESERVED_2C, true - case 0x2D: - return ApplicationIdContainer_RESERVED_2D, true - case 0x2E: - return ApplicationIdContainer_RESERVED_2E, true - case 0x2F: - return ApplicationIdContainer_RESERVED_2F, true - case 0x30: - return ApplicationIdContainer_LIGHTING_30, true - case 0x31: - return ApplicationIdContainer_LIGHTING_31, true - case 0x32: - return ApplicationIdContainer_LIGHTING_32, true - case 0x33: - return ApplicationIdContainer_LIGHTING_33, true - case 0x34: - return ApplicationIdContainer_LIGHTING_34, true - case 0x35: - return ApplicationIdContainer_LIGHTING_35, true - case 0x36: - return ApplicationIdContainer_LIGHTING_36, true - case 0x37: - return ApplicationIdContainer_LIGHTING_37, true - case 0x38: - return ApplicationIdContainer_LIGHTING_38, true - case 0x39: - return ApplicationIdContainer_LIGHTING_39, true - case 0x3A: - return ApplicationIdContainer_LIGHTING_3A, true - case 0x3B: - return ApplicationIdContainer_LIGHTING_3B, true - case 0x3C: - return ApplicationIdContainer_LIGHTING_3C, true - case 0x3D: - return ApplicationIdContainer_LIGHTING_3D, true - case 0x3E: - return ApplicationIdContainer_LIGHTING_3E, true - case 0x3F: - return ApplicationIdContainer_LIGHTING_3F, true - case 0x40: - return ApplicationIdContainer_LIGHTING_40, true - case 0x41: - return ApplicationIdContainer_LIGHTING_41, true - case 0x42: - return ApplicationIdContainer_LIGHTING_42, true - case 0x43: - return ApplicationIdContainer_LIGHTING_43, true - case 0x44: - return ApplicationIdContainer_LIGHTING_44, true - case 0x45: - return ApplicationIdContainer_LIGHTING_45, true - case 0x46: - return ApplicationIdContainer_LIGHTING_46, true - case 0x47: - return ApplicationIdContainer_LIGHTING_47, true - case 0x48: - return ApplicationIdContainer_LIGHTING_48, true - case 0x49: - return ApplicationIdContainer_LIGHTING_49, true - case 0x4A: - return ApplicationIdContainer_LIGHTING_4A, true - case 0x4B: - return ApplicationIdContainer_LIGHTING_4B, true - case 0x4C: - return ApplicationIdContainer_LIGHTING_4C, true - case 0x4D: - return ApplicationIdContainer_LIGHTING_4D, true - case 0x4E: - return ApplicationIdContainer_LIGHTING_4E, true - case 0x4F: - return ApplicationIdContainer_LIGHTING_4F, true - case 0x50: - return ApplicationIdContainer_LIGHTING_50, true - case 0x51: - return ApplicationIdContainer_LIGHTING_51, true - case 0x52: - return ApplicationIdContainer_LIGHTING_52, true - case 0x53: - return ApplicationIdContainer_LIGHTING_53, true - case 0x54: - return ApplicationIdContainer_LIGHTING_54, true - case 0x55: - return ApplicationIdContainer_LIGHTING_55, true - case 0x56: - return ApplicationIdContainer_LIGHTING_56, true - case 0x57: - return ApplicationIdContainer_LIGHTING_57, true - case 0x58: - return ApplicationIdContainer_LIGHTING_58, true - case 0x59: - return ApplicationIdContainer_LIGHTING_59, true - case 0x5A: - return ApplicationIdContainer_LIGHTING_5A, true - case 0x5B: - return ApplicationIdContainer_LIGHTING_5B, true - case 0x5C: - return ApplicationIdContainer_LIGHTING_5C, true - case 0x5D: - return ApplicationIdContainer_LIGHTING_5D, true - case 0x5E: - return ApplicationIdContainer_LIGHTING_5E, true - case 0x5F: - return ApplicationIdContainer_LIGHTING_5F, true - case 0x60: - return ApplicationIdContainer_RESERVED_60, true - case 0x61: - return ApplicationIdContainer_RESERVED_61, true - case 0x62: - return ApplicationIdContainer_RESERVED_62, true - case 0x63: - return ApplicationIdContainer_RESERVED_63, true - case 0x64: - return ApplicationIdContainer_RESERVED_64, true - case 0x65: - return ApplicationIdContainer_RESERVED_65, true - case 0x66: - return ApplicationIdContainer_RESERVED_66, true - case 0x67: - return ApplicationIdContainer_RESERVED_67, true - case 0x68: - return ApplicationIdContainer_RESERVED_68, true - case 0x69: - return ApplicationIdContainer_RESERVED_69, true - case 0x6A: - return ApplicationIdContainer_RESERVED_6A, true - case 0x6B: - return ApplicationIdContainer_RESERVED_6B, true - case 0x6C: - return ApplicationIdContainer_RESERVED_6C, true - case 0x6D: - return ApplicationIdContainer_RESERVED_6D, true - case 0x6E: - return ApplicationIdContainer_RESERVED_6E, true - case 0x6F: - return ApplicationIdContainer_RESERVED_6F, true - case 0x70: - return ApplicationIdContainer_VENTILATION_70, true - case 0x71: - return ApplicationIdContainer_IRRIGATION_CONTROL_71, true - case 0x72: - return ApplicationIdContainer_POOLS_SPAS_PONDS_FOUNTAINS_CONTROL_72, true - case 0x73: - return ApplicationIdContainer_HVAC_ACTUATOR_73, true - case 0x74: - return ApplicationIdContainer_HVAC_ACTUATOR_74, true - case 0x75: - return ApplicationIdContainer_RESERVED_75, true - case 0x76: - return ApplicationIdContainer_RESERVED_76, true - case 0x77: - return ApplicationIdContainer_RESERVED_77, true - case 0x78: - return ApplicationIdContainer_RESERVED_78, true - case 0x79: - return ApplicationIdContainer_RESERVED_79, true - case 0x7A: - return ApplicationIdContainer_RESERVED_7A, true - case 0x7B: - return ApplicationIdContainer_RESERVED_7B, true - case 0x7C: - return ApplicationIdContainer_RESERVED_7C, true - case 0x7D: - return ApplicationIdContainer_RESERVED_7D, true - case 0x7E: - return ApplicationIdContainer_RESERVED_7E, true - case 0x7F: - return ApplicationIdContainer_RESERVED_7F, true - case 0x80: - return ApplicationIdContainer_RESERVED_80, true - case 0x81: - return ApplicationIdContainer_RESERVED_81, true - case 0x82: - return ApplicationIdContainer_RESERVED_82, true - case 0x83: - return ApplicationIdContainer_RESERVED_83, true - case 0x84: - return ApplicationIdContainer_RESERVED_84, true - case 0x85: - return ApplicationIdContainer_RESERVED_85, true - case 0x86: - return ApplicationIdContainer_RESERVED_86, true - case 0x87: - return ApplicationIdContainer_RESERVED_87, true - case 0x88: - return ApplicationIdContainer_HEATING_88, true - case 0x89: - return ApplicationIdContainer_RESERVED_89, true - case 0x8A: - return ApplicationIdContainer_RESERVED_8A, true - case 0x8B: - return ApplicationIdContainer_RESERVED_8B, true - case 0x8C: - return ApplicationIdContainer_RESERVED_8C, true - case 0x8D: - return ApplicationIdContainer_RESERVED_8D, true - case 0x8E: - return ApplicationIdContainer_RESERVED_8E, true - case 0x8F: - return ApplicationIdContainer_RESERVED_8F, true - case 0x90: - return ApplicationIdContainer_RESERVED_90, true - case 0x91: - return ApplicationIdContainer_RESERVED_91, true - case 0x92: - return ApplicationIdContainer_RESERVED_92, true - case 0x93: - return ApplicationIdContainer_RESERVED_93, true - case 0x94: - return ApplicationIdContainer_RESERVED_94, true - case 0x95: - return ApplicationIdContainer_RESERVED_95, true - case 0x96: - return ApplicationIdContainer_RESERVED_96, true - case 0x97: - return ApplicationIdContainer_RESERVED_97, true - case 0x98: - return ApplicationIdContainer_RESERVED_98, true - case 0x99: - return ApplicationIdContainer_RESERVED_99, true - case 0x9A: - return ApplicationIdContainer_RESERVED_9A, true - case 0x9B: - return ApplicationIdContainer_RESERVED_9B, true - case 0x9C: - return ApplicationIdContainer_RESERVED_9C, true - case 0x9D: - return ApplicationIdContainer_RESERVED_9D, true - case 0x9E: - return ApplicationIdContainer_RESERVED_9E, true - case 0x9F: - return ApplicationIdContainer_RESERVED_9F, true - case 0xA0: - return ApplicationIdContainer_RESERVED_A0, true - case 0xA1: - return ApplicationIdContainer_RESERVED_A1, true - case 0xA2: - return ApplicationIdContainer_RESERVED_A2, true - case 0xA3: - return ApplicationIdContainer_RESERVED_A3, true - case 0xA4: - return ApplicationIdContainer_RESERVED_A4, true - case 0xA5: - return ApplicationIdContainer_RESERVED_A5, true - case 0xA6: - return ApplicationIdContainer_RESERVED_A6, true - case 0xA7: - return ApplicationIdContainer_RESERVED_A7, true - case 0xA8: - return ApplicationIdContainer_RESERVED_A8, true - case 0xA9: - return ApplicationIdContainer_RESERVED_A9, true - case 0xAA: - return ApplicationIdContainer_RESERVED_AA, true - case 0xAB: - return ApplicationIdContainer_RESERVED_AB, true - case 0xAC: - return ApplicationIdContainer_AIR_CONDITIONING_AC, true - case 0xAD: - return ApplicationIdContainer_INFO_MESSAGES, true - case 0xAE: - return ApplicationIdContainer_RESERVED_AE, true - case 0xAF: - return ApplicationIdContainer_RESERVED_AF, true - case 0xB0: - return ApplicationIdContainer_RESERVED_B0, true - case 0xB1: - return ApplicationIdContainer_RESERVED_B1, true - case 0xB2: - return ApplicationIdContainer_RESERVED_B2, true - case 0xB3: - return ApplicationIdContainer_RESERVED_B3, true - case 0xB4: - return ApplicationIdContainer_RESERVED_B4, true - case 0xB5: - return ApplicationIdContainer_RESERVED_B5, true - case 0xB6: - return ApplicationIdContainer_RESERVED_B6, true - case 0xB7: - return ApplicationIdContainer_RESERVED_B7, true - case 0xB8: - return ApplicationIdContainer_RESERVED_B8, true - case 0xB9: - return ApplicationIdContainer_RESERVED_B9, true - case 0xBA: - return ApplicationIdContainer_RESERVED_BA, true - case 0xBB: - return ApplicationIdContainer_RESERVED_BB, true - case 0xBC: - return ApplicationIdContainer_RESERVED_BC, true - case 0xBD: - return ApplicationIdContainer_RESERVED_BD, true - case 0xBE: - return ApplicationIdContainer_RESERVED_BE, true - case 0xBF: - return ApplicationIdContainer_RESERVED_BF, true - case 0xC0: - return ApplicationIdContainer_MEDIA_TRANSPORT_CONTROL_C0, true - case 0xC1: - return ApplicationIdContainer_RESERVED_C1, true - case 0xC2: - return ApplicationIdContainer_RESERVED_C2, true - case 0xC3: - return ApplicationIdContainer_RESERVED_C3, true - case 0xC4: - return ApplicationIdContainer_RESERVED_C4, true - case 0xC5: - return ApplicationIdContainer_RESERVED_C5, true - case 0xC6: - return ApplicationIdContainer_RESERVED_C6, true - case 0xC7: - return ApplicationIdContainer_RESERVED_C7, true - case 0xC8: - return ApplicationIdContainer_RESERVED_C8, true - case 0xC9: - return ApplicationIdContainer_RESERVED_C9, true - case 0xCA: - return ApplicationIdContainer_TRIGGER_CONTROL_CA, true - case 0xCB: - return ApplicationIdContainer_ENABLE_CONTROL_CB, true - case 0xCC: - return ApplicationIdContainer_I_HAVE_NO_IDEA_CC, true - case 0xCD: - return ApplicationIdContainer_AUDIO_AND_VIDEO_CD, true - case 0xCE: - return ApplicationIdContainer_ERROR_REPORTING_CE, true - case 0xCF: - return ApplicationIdContainer_RESERVED_CF, true - case 0xD0: - return ApplicationIdContainer_SECURITY_D0, true - case 0xD1: - return ApplicationIdContainer_METERING_D1, true - case 0xD2: - return ApplicationIdContainer_RESERVED_D2, true - case 0xD3: - return ApplicationIdContainer_RESERVED_D3, true - case 0xD4: - return ApplicationIdContainer_RESERVED_D4, true - case 0xD5: - return ApplicationIdContainer_ACCESS_CONTROL_D5, true - case 0xD6: - return ApplicationIdContainer_RESERVED_D6, true - case 0xD7: - return ApplicationIdContainer_RESERVED_D7, true - case 0xD8: - return ApplicationIdContainer_RESERVED_D8, true - case 0xD9: - return ApplicationIdContainer_RESERVED_D9, true - case 0xDA: - return ApplicationIdContainer_RESERVED_DA, true - case 0xDB: - return ApplicationIdContainer_RESERVED_DB, true - case 0xDC: - return ApplicationIdContainer_RESERVED_DC, true - case 0xDD: - return ApplicationIdContainer_RESERVED_DD, true - case 0xDE: - return ApplicationIdContainer_RESERVED_DE, true - case 0xDF: - return ApplicationIdContainer_CLOCK_AND_TIMEKEEPING_DF, true - case 0xE0: - return ApplicationIdContainer_TELEPHONY_STATUS_AND_CONTROL_E0, true - case 0xE1: - return ApplicationIdContainer_RESERVED_E1, true - case 0xE2: - return ApplicationIdContainer_RESERVED_E2, true - case 0xE3: - return ApplicationIdContainer_RESERVED_E3, true - case 0xE4: - return ApplicationIdContainer_MEASUREMENT_E4, true - case 0xE5: - return ApplicationIdContainer_RESERVED_E5, true - case 0xE6: - return ApplicationIdContainer_RESERVED_E6, true - case 0xE7: - return ApplicationIdContainer_RESERVED_E7, true - case 0xE8: - return ApplicationIdContainer_RESERVED_E8, true - case 0xE9: - return ApplicationIdContainer_RESERVED_E9, true - case 0xEA: - return ApplicationIdContainer_RESERVED_EA, true - case 0xEB: - return ApplicationIdContainer_RESERVED_EB, true - case 0xEC: - return ApplicationIdContainer_RESERVED_EC, true - case 0xED: - return ApplicationIdContainer_RESERVED_ED, true - case 0xEE: - return ApplicationIdContainer_RESERVED_EE, true - case 0xEF: - return ApplicationIdContainer_RESERVED_EF, true - case 0xF0: - return ApplicationIdContainer_RESERVED_F0, true - case 0xF1: - return ApplicationIdContainer_RESERVED_F1, true - case 0xF2: - return ApplicationIdContainer_RESERVED_F2, true - case 0xF3: - return ApplicationIdContainer_RESERVED_F3, true - case 0xF4: - return ApplicationIdContainer_RESERVED_F4, true - case 0xF5: - return ApplicationIdContainer_RESERVED_F5, true - case 0xF6: - return ApplicationIdContainer_RESERVED_F6, true - case 0xF7: - return ApplicationIdContainer_RESERVED_F7, true - case 0xF8: - return ApplicationIdContainer_RESERVED_F8, true - case 0xF9: - return ApplicationIdContainer_RESERVED_F9, true - case 0xFA: - return ApplicationIdContainer_TESTING_FA, true - case 0xFB: - return ApplicationIdContainer_RESERVED_FB, true - case 0xFC: - return ApplicationIdContainer_RESERVED_FC, true - case 0xFD: - return ApplicationIdContainer_RESERVED_FD, true - case 0xFE: - return ApplicationIdContainer_RESERVED_FE, true - case 0xFF: - return ApplicationIdContainer_NETWORK_CONTROL, true + case 0x00: + return ApplicationIdContainer_RESERVED_00, true + case 0x01: + return ApplicationIdContainer_FREE_USAGE_01, true + case 0x02: + return ApplicationIdContainer_FREE_USAGE_02, true + case 0x03: + return ApplicationIdContainer_FREE_USAGE_03, true + case 0x04: + return ApplicationIdContainer_FREE_USAGE_04, true + case 0x05: + return ApplicationIdContainer_FREE_USAGE_05, true + case 0x06: + return ApplicationIdContainer_FREE_USAGE_06, true + case 0x07: + return ApplicationIdContainer_FREE_USAGE_07, true + case 0x08: + return ApplicationIdContainer_FREE_USAGE_08, true + case 0x09: + return ApplicationIdContainer_FREE_USAGE_09, true + case 0x0A: + return ApplicationIdContainer_FREE_USAGE_0A, true + case 0x0B: + return ApplicationIdContainer_FREE_USAGE_0B, true + case 0x0C: + return ApplicationIdContainer_FREE_USAGE_0C, true + case 0x0D: + return ApplicationIdContainer_FREE_USAGE_0D, true + case 0x0E: + return ApplicationIdContainer_FREE_USAGE_0E, true + case 0x0F: + return ApplicationIdContainer_FREE_USAGE_0F, true + case 0x10: + return ApplicationIdContainer_RESERVED_10, true + case 0x11: + return ApplicationIdContainer_RESERVED_11, true + case 0x12: + return ApplicationIdContainer_RESERVED_12, true + case 0x13: + return ApplicationIdContainer_RESERVED_13, true + case 0x14: + return ApplicationIdContainer_RESERVED_14, true + case 0x15: + return ApplicationIdContainer_RESERVED_15, true + case 0x16: + return ApplicationIdContainer_RESERVED_16, true + case 0x17: + return ApplicationIdContainer_RESERVED_17, true + case 0x18: + return ApplicationIdContainer_RESERVED_18, true + case 0x19: + return ApplicationIdContainer_TEMPERATURE_BROADCAST_19, true + case 0x1A: + return ApplicationIdContainer_RESERVED_1A, true + case 0x1B: + return ApplicationIdContainer_RESERVED_1B, true + case 0x1C: + return ApplicationIdContainer_RESERVED_1C, true + case 0x1D: + return ApplicationIdContainer_RESERVED_1D, true + case 0x1E: + return ApplicationIdContainer_RESERVED_1E, true + case 0x1F: + return ApplicationIdContainer_RESERVED_1F, true + case 0x20: + return ApplicationIdContainer_RESERVED_20, true + case 0x21: + return ApplicationIdContainer_RESERVED_21, true + case 0x22: + return ApplicationIdContainer_RESERVED_22, true + case 0x23: + return ApplicationIdContainer_RESERVED_23, true + case 0x24: + return ApplicationIdContainer_RESERVED_24, true + case 0x25: + return ApplicationIdContainer_RESERVED_25, true + case 0x26: + return ApplicationIdContainer_ROOM_CONTROL_SYSTEM_26, true + case 0x27: + return ApplicationIdContainer_RESERVED_27, true + case 0x28: + return ApplicationIdContainer_RESERVED_28, true + case 0x29: + return ApplicationIdContainer_RESERVED_29, true + case 0x2A: + return ApplicationIdContainer_RESERVED_2A, true + case 0x2B: + return ApplicationIdContainer_RESERVED_2B, true + case 0x2C: + return ApplicationIdContainer_RESERVED_2C, true + case 0x2D: + return ApplicationIdContainer_RESERVED_2D, true + case 0x2E: + return ApplicationIdContainer_RESERVED_2E, true + case 0x2F: + return ApplicationIdContainer_RESERVED_2F, true + case 0x30: + return ApplicationIdContainer_LIGHTING_30, true + case 0x31: + return ApplicationIdContainer_LIGHTING_31, true + case 0x32: + return ApplicationIdContainer_LIGHTING_32, true + case 0x33: + return ApplicationIdContainer_LIGHTING_33, true + case 0x34: + return ApplicationIdContainer_LIGHTING_34, true + case 0x35: + return ApplicationIdContainer_LIGHTING_35, true + case 0x36: + return ApplicationIdContainer_LIGHTING_36, true + case 0x37: + return ApplicationIdContainer_LIGHTING_37, true + case 0x38: + return ApplicationIdContainer_LIGHTING_38, true + case 0x39: + return ApplicationIdContainer_LIGHTING_39, true + case 0x3A: + return ApplicationIdContainer_LIGHTING_3A, true + case 0x3B: + return ApplicationIdContainer_LIGHTING_3B, true + case 0x3C: + return ApplicationIdContainer_LIGHTING_3C, true + case 0x3D: + return ApplicationIdContainer_LIGHTING_3D, true + case 0x3E: + return ApplicationIdContainer_LIGHTING_3E, true + case 0x3F: + return ApplicationIdContainer_LIGHTING_3F, true + case 0x40: + return ApplicationIdContainer_LIGHTING_40, true + case 0x41: + return ApplicationIdContainer_LIGHTING_41, true + case 0x42: + return ApplicationIdContainer_LIGHTING_42, true + case 0x43: + return ApplicationIdContainer_LIGHTING_43, true + case 0x44: + return ApplicationIdContainer_LIGHTING_44, true + case 0x45: + return ApplicationIdContainer_LIGHTING_45, true + case 0x46: + return ApplicationIdContainer_LIGHTING_46, true + case 0x47: + return ApplicationIdContainer_LIGHTING_47, true + case 0x48: + return ApplicationIdContainer_LIGHTING_48, true + case 0x49: + return ApplicationIdContainer_LIGHTING_49, true + case 0x4A: + return ApplicationIdContainer_LIGHTING_4A, true + case 0x4B: + return ApplicationIdContainer_LIGHTING_4B, true + case 0x4C: + return ApplicationIdContainer_LIGHTING_4C, true + case 0x4D: + return ApplicationIdContainer_LIGHTING_4D, true + case 0x4E: + return ApplicationIdContainer_LIGHTING_4E, true + case 0x4F: + return ApplicationIdContainer_LIGHTING_4F, true + case 0x50: + return ApplicationIdContainer_LIGHTING_50, true + case 0x51: + return ApplicationIdContainer_LIGHTING_51, true + case 0x52: + return ApplicationIdContainer_LIGHTING_52, true + case 0x53: + return ApplicationIdContainer_LIGHTING_53, true + case 0x54: + return ApplicationIdContainer_LIGHTING_54, true + case 0x55: + return ApplicationIdContainer_LIGHTING_55, true + case 0x56: + return ApplicationIdContainer_LIGHTING_56, true + case 0x57: + return ApplicationIdContainer_LIGHTING_57, true + case 0x58: + return ApplicationIdContainer_LIGHTING_58, true + case 0x59: + return ApplicationIdContainer_LIGHTING_59, true + case 0x5A: + return ApplicationIdContainer_LIGHTING_5A, true + case 0x5B: + return ApplicationIdContainer_LIGHTING_5B, true + case 0x5C: + return ApplicationIdContainer_LIGHTING_5C, true + case 0x5D: + return ApplicationIdContainer_LIGHTING_5D, true + case 0x5E: + return ApplicationIdContainer_LIGHTING_5E, true + case 0x5F: + return ApplicationIdContainer_LIGHTING_5F, true + case 0x60: + return ApplicationIdContainer_RESERVED_60, true + case 0x61: + return ApplicationIdContainer_RESERVED_61, true + case 0x62: + return ApplicationIdContainer_RESERVED_62, true + case 0x63: + return ApplicationIdContainer_RESERVED_63, true + case 0x64: + return ApplicationIdContainer_RESERVED_64, true + case 0x65: + return ApplicationIdContainer_RESERVED_65, true + case 0x66: + return ApplicationIdContainer_RESERVED_66, true + case 0x67: + return ApplicationIdContainer_RESERVED_67, true + case 0x68: + return ApplicationIdContainer_RESERVED_68, true + case 0x69: + return ApplicationIdContainer_RESERVED_69, true + case 0x6A: + return ApplicationIdContainer_RESERVED_6A, true + case 0x6B: + return ApplicationIdContainer_RESERVED_6B, true + case 0x6C: + return ApplicationIdContainer_RESERVED_6C, true + case 0x6D: + return ApplicationIdContainer_RESERVED_6D, true + case 0x6E: + return ApplicationIdContainer_RESERVED_6E, true + case 0x6F: + return ApplicationIdContainer_RESERVED_6F, true + case 0x70: + return ApplicationIdContainer_VENTILATION_70, true + case 0x71: + return ApplicationIdContainer_IRRIGATION_CONTROL_71, true + case 0x72: + return ApplicationIdContainer_POOLS_SPAS_PONDS_FOUNTAINS_CONTROL_72, true + case 0x73: + return ApplicationIdContainer_HVAC_ACTUATOR_73, true + case 0x74: + return ApplicationIdContainer_HVAC_ACTUATOR_74, true + case 0x75: + return ApplicationIdContainer_RESERVED_75, true + case 0x76: + return ApplicationIdContainer_RESERVED_76, true + case 0x77: + return ApplicationIdContainer_RESERVED_77, true + case 0x78: + return ApplicationIdContainer_RESERVED_78, true + case 0x79: + return ApplicationIdContainer_RESERVED_79, true + case 0x7A: + return ApplicationIdContainer_RESERVED_7A, true + case 0x7B: + return ApplicationIdContainer_RESERVED_7B, true + case 0x7C: + return ApplicationIdContainer_RESERVED_7C, true + case 0x7D: + return ApplicationIdContainer_RESERVED_7D, true + case 0x7E: + return ApplicationIdContainer_RESERVED_7E, true + case 0x7F: + return ApplicationIdContainer_RESERVED_7F, true + case 0x80: + return ApplicationIdContainer_RESERVED_80, true + case 0x81: + return ApplicationIdContainer_RESERVED_81, true + case 0x82: + return ApplicationIdContainer_RESERVED_82, true + case 0x83: + return ApplicationIdContainer_RESERVED_83, true + case 0x84: + return ApplicationIdContainer_RESERVED_84, true + case 0x85: + return ApplicationIdContainer_RESERVED_85, true + case 0x86: + return ApplicationIdContainer_RESERVED_86, true + case 0x87: + return ApplicationIdContainer_RESERVED_87, true + case 0x88: + return ApplicationIdContainer_HEATING_88, true + case 0x89: + return ApplicationIdContainer_RESERVED_89, true + case 0x8A: + return ApplicationIdContainer_RESERVED_8A, true + case 0x8B: + return ApplicationIdContainer_RESERVED_8B, true + case 0x8C: + return ApplicationIdContainer_RESERVED_8C, true + case 0x8D: + return ApplicationIdContainer_RESERVED_8D, true + case 0x8E: + return ApplicationIdContainer_RESERVED_8E, true + case 0x8F: + return ApplicationIdContainer_RESERVED_8F, true + case 0x90: + return ApplicationIdContainer_RESERVED_90, true + case 0x91: + return ApplicationIdContainer_RESERVED_91, true + case 0x92: + return ApplicationIdContainer_RESERVED_92, true + case 0x93: + return ApplicationIdContainer_RESERVED_93, true + case 0x94: + return ApplicationIdContainer_RESERVED_94, true + case 0x95: + return ApplicationIdContainer_RESERVED_95, true + case 0x96: + return ApplicationIdContainer_RESERVED_96, true + case 0x97: + return ApplicationIdContainer_RESERVED_97, true + case 0x98: + return ApplicationIdContainer_RESERVED_98, true + case 0x99: + return ApplicationIdContainer_RESERVED_99, true + case 0x9A: + return ApplicationIdContainer_RESERVED_9A, true + case 0x9B: + return ApplicationIdContainer_RESERVED_9B, true + case 0x9C: + return ApplicationIdContainer_RESERVED_9C, true + case 0x9D: + return ApplicationIdContainer_RESERVED_9D, true + case 0x9E: + return ApplicationIdContainer_RESERVED_9E, true + case 0x9F: + return ApplicationIdContainer_RESERVED_9F, true + case 0xA0: + return ApplicationIdContainer_RESERVED_A0, true + case 0xA1: + return ApplicationIdContainer_RESERVED_A1, true + case 0xA2: + return ApplicationIdContainer_RESERVED_A2, true + case 0xA3: + return ApplicationIdContainer_RESERVED_A3, true + case 0xA4: + return ApplicationIdContainer_RESERVED_A4, true + case 0xA5: + return ApplicationIdContainer_RESERVED_A5, true + case 0xA6: + return ApplicationIdContainer_RESERVED_A6, true + case 0xA7: + return ApplicationIdContainer_RESERVED_A7, true + case 0xA8: + return ApplicationIdContainer_RESERVED_A8, true + case 0xA9: + return ApplicationIdContainer_RESERVED_A9, true + case 0xAA: + return ApplicationIdContainer_RESERVED_AA, true + case 0xAB: + return ApplicationIdContainer_RESERVED_AB, true + case 0xAC: + return ApplicationIdContainer_AIR_CONDITIONING_AC, true + case 0xAD: + return ApplicationIdContainer_INFO_MESSAGES, true + case 0xAE: + return ApplicationIdContainer_RESERVED_AE, true + case 0xAF: + return ApplicationIdContainer_RESERVED_AF, true + case 0xB0: + return ApplicationIdContainer_RESERVED_B0, true + case 0xB1: + return ApplicationIdContainer_RESERVED_B1, true + case 0xB2: + return ApplicationIdContainer_RESERVED_B2, true + case 0xB3: + return ApplicationIdContainer_RESERVED_B3, true + case 0xB4: + return ApplicationIdContainer_RESERVED_B4, true + case 0xB5: + return ApplicationIdContainer_RESERVED_B5, true + case 0xB6: + return ApplicationIdContainer_RESERVED_B6, true + case 0xB7: + return ApplicationIdContainer_RESERVED_B7, true + case 0xB8: + return ApplicationIdContainer_RESERVED_B8, true + case 0xB9: + return ApplicationIdContainer_RESERVED_B9, true + case 0xBA: + return ApplicationIdContainer_RESERVED_BA, true + case 0xBB: + return ApplicationIdContainer_RESERVED_BB, true + case 0xBC: + return ApplicationIdContainer_RESERVED_BC, true + case 0xBD: + return ApplicationIdContainer_RESERVED_BD, true + case 0xBE: + return ApplicationIdContainer_RESERVED_BE, true + case 0xBF: + return ApplicationIdContainer_RESERVED_BF, true + case 0xC0: + return ApplicationIdContainer_MEDIA_TRANSPORT_CONTROL_C0, true + case 0xC1: + return ApplicationIdContainer_RESERVED_C1, true + case 0xC2: + return ApplicationIdContainer_RESERVED_C2, true + case 0xC3: + return ApplicationIdContainer_RESERVED_C3, true + case 0xC4: + return ApplicationIdContainer_RESERVED_C4, true + case 0xC5: + return ApplicationIdContainer_RESERVED_C5, true + case 0xC6: + return ApplicationIdContainer_RESERVED_C6, true + case 0xC7: + return ApplicationIdContainer_RESERVED_C7, true + case 0xC8: + return ApplicationIdContainer_RESERVED_C8, true + case 0xC9: + return ApplicationIdContainer_RESERVED_C9, true + case 0xCA: + return ApplicationIdContainer_TRIGGER_CONTROL_CA, true + case 0xCB: + return ApplicationIdContainer_ENABLE_CONTROL_CB, true + case 0xCC: + return ApplicationIdContainer_I_HAVE_NO_IDEA_CC, true + case 0xCD: + return ApplicationIdContainer_AUDIO_AND_VIDEO_CD, true + case 0xCE: + return ApplicationIdContainer_ERROR_REPORTING_CE, true + case 0xCF: + return ApplicationIdContainer_RESERVED_CF, true + case 0xD0: + return ApplicationIdContainer_SECURITY_D0, true + case 0xD1: + return ApplicationIdContainer_METERING_D1, true + case 0xD2: + return ApplicationIdContainer_RESERVED_D2, true + case 0xD3: + return ApplicationIdContainer_RESERVED_D3, true + case 0xD4: + return ApplicationIdContainer_RESERVED_D4, true + case 0xD5: + return ApplicationIdContainer_ACCESS_CONTROL_D5, true + case 0xD6: + return ApplicationIdContainer_RESERVED_D6, true + case 0xD7: + return ApplicationIdContainer_RESERVED_D7, true + case 0xD8: + return ApplicationIdContainer_RESERVED_D8, true + case 0xD9: + return ApplicationIdContainer_RESERVED_D9, true + case 0xDA: + return ApplicationIdContainer_RESERVED_DA, true + case 0xDB: + return ApplicationIdContainer_RESERVED_DB, true + case 0xDC: + return ApplicationIdContainer_RESERVED_DC, true + case 0xDD: + return ApplicationIdContainer_RESERVED_DD, true + case 0xDE: + return ApplicationIdContainer_RESERVED_DE, true + case 0xDF: + return ApplicationIdContainer_CLOCK_AND_TIMEKEEPING_DF, true + case 0xE0: + return ApplicationIdContainer_TELEPHONY_STATUS_AND_CONTROL_E0, true + case 0xE1: + return ApplicationIdContainer_RESERVED_E1, true + case 0xE2: + return ApplicationIdContainer_RESERVED_E2, true + case 0xE3: + return ApplicationIdContainer_RESERVED_E3, true + case 0xE4: + return ApplicationIdContainer_MEASUREMENT_E4, true + case 0xE5: + return ApplicationIdContainer_RESERVED_E5, true + case 0xE6: + return ApplicationIdContainer_RESERVED_E6, true + case 0xE7: + return ApplicationIdContainer_RESERVED_E7, true + case 0xE8: + return ApplicationIdContainer_RESERVED_E8, true + case 0xE9: + return ApplicationIdContainer_RESERVED_E9, true + case 0xEA: + return ApplicationIdContainer_RESERVED_EA, true + case 0xEB: + return ApplicationIdContainer_RESERVED_EB, true + case 0xEC: + return ApplicationIdContainer_RESERVED_EC, true + case 0xED: + return ApplicationIdContainer_RESERVED_ED, true + case 0xEE: + return ApplicationIdContainer_RESERVED_EE, true + case 0xEF: + return ApplicationIdContainer_RESERVED_EF, true + case 0xF0: + return ApplicationIdContainer_RESERVED_F0, true + case 0xF1: + return ApplicationIdContainer_RESERVED_F1, true + case 0xF2: + return ApplicationIdContainer_RESERVED_F2, true + case 0xF3: + return ApplicationIdContainer_RESERVED_F3, true + case 0xF4: + return ApplicationIdContainer_RESERVED_F4, true + case 0xF5: + return ApplicationIdContainer_RESERVED_F5, true + case 0xF6: + return ApplicationIdContainer_RESERVED_F6, true + case 0xF7: + return ApplicationIdContainer_RESERVED_F7, true + case 0xF8: + return ApplicationIdContainer_RESERVED_F8, true + case 0xF9: + return ApplicationIdContainer_RESERVED_F9, true + case 0xFA: + return ApplicationIdContainer_TESTING_FA, true + case 0xFB: + return ApplicationIdContainer_RESERVED_FB, true + case 0xFC: + return ApplicationIdContainer_RESERVED_FC, true + case 0xFD: + return ApplicationIdContainer_RESERVED_FD, true + case 0xFE: + return ApplicationIdContainer_RESERVED_FE, true + case 0xFF: + return ApplicationIdContainer_NETWORK_CONTROL, true } return 0, false } @@ -3678,13 +3165,13 @@ func ApplicationIdContainerByName(value string) (enum ApplicationIdContainer, ok return 0, false } -func ApplicationIdContainerKnows(value uint8) bool { +func ApplicationIdContainerKnows(value uint8) bool { for _, typeValue := range ApplicationIdContainerValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastApplicationIdContainer(structType interface{}) ApplicationIdContainer { @@ -4256,3 +3743,4 @@ func (e ApplicationIdContainer) PLC4XEnumName() string { func (e ApplicationIdContainer) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/Attribute.go b/plc4go/protocols/cbus/readwrite/model/Attribute.go index 053a0569d50..057a3453c9e 100644 --- a/plc4go/protocols/cbus/readwrite/model/Attribute.go +++ b/plc4go/protocols/cbus/readwrite/model/Attribute.go @@ -35,32 +35,32 @@ type IAttribute interface { BytesReturned() uint8 } -const ( - Attribute_Manufacturer Attribute = 0x00 - Attribute_Type Attribute = 0x01 - Attribute_FirmwareVersion Attribute = 0x02 - Attribute_Summary Attribute = 0x03 +const( + Attribute_Manufacturer Attribute = 0x00 + Attribute_Type Attribute = 0x01 + Attribute_FirmwareVersion Attribute = 0x02 + Attribute_Summary Attribute = 0x03 Attribute_ExtendedDiagnosticSummary Attribute = 0x04 - Attribute_NetworkTerminalLevels Attribute = 0x05 - Attribute_TerminalLevel Attribute = 0x06 - Attribute_NetworkVoltage Attribute = 0x07 - Attribute_GAVValuesCurrent Attribute = 0x08 - Attribute_GAVValuesStored Attribute = 0x09 - Attribute_GAVPhysicalAddresses Attribute = 0x0A - Attribute_LogicalAssignment Attribute = 0x0B - Attribute_Delays Attribute = 0x0C - Attribute_MinimumLevels Attribute = 0x0D - Attribute_MaximumLevels Attribute = 0x0E - Attribute_CurrentSenseLevels Attribute = 0x0F - Attribute_OutputUnitSummary Attribute = 0x10 - Attribute_DSIStatus Attribute = 0x11 + Attribute_NetworkTerminalLevels Attribute = 0x05 + Attribute_TerminalLevel Attribute = 0x06 + Attribute_NetworkVoltage Attribute = 0x07 + Attribute_GAVValuesCurrent Attribute = 0x08 + Attribute_GAVValuesStored Attribute = 0x09 + Attribute_GAVPhysicalAddresses Attribute = 0x0A + Attribute_LogicalAssignment Attribute = 0x0B + Attribute_Delays Attribute = 0x0C + Attribute_MinimumLevels Attribute = 0x0D + Attribute_MaximumLevels Attribute = 0x0E + Attribute_CurrentSenseLevels Attribute = 0x0F + Attribute_OutputUnitSummary Attribute = 0x10 + Attribute_DSIStatus Attribute = 0x11 ) var AttributeValues []Attribute func init() { _ = errors.New - AttributeValues = []Attribute{ + AttributeValues = []Attribute { Attribute_Manufacturer, Attribute_Type, Attribute_FirmwareVersion, @@ -82,82 +82,64 @@ func init() { } } + func (e Attribute) BytesReturned() uint8 { - switch e { - case 0x00: - { /* '0x00' */ - return 8 + switch e { + case 0x00: { /* '0x00' */ + return 8 } - case 0x01: - { /* '0x01' */ - return 8 + case 0x01: { /* '0x01' */ + return 8 } - case 0x02: - { /* '0x02' */ - return 8 + case 0x02: { /* '0x02' */ + return 8 } - case 0x03: - { /* '0x03' */ - return 9 + case 0x03: { /* '0x03' */ + return 9 } - case 0x04: - { /* '0x04' */ - return 13 + case 0x04: { /* '0x04' */ + return 13 } - case 0x05: - { /* '0x05' */ - return 13 + case 0x05: { /* '0x05' */ + return 13 } - case 0x06: - { /* '0x06' */ - return 13 + case 0x06: { /* '0x06' */ + return 13 } - case 0x07: - { /* '0x07' */ - return 5 + case 0x07: { /* '0x07' */ + return 5 } - case 0x08: - { /* '0x08' */ - return 16 + case 0x08: { /* '0x08' */ + return 16 } - case 0x09: - { /* '0x09' */ - return 16 + case 0x09: { /* '0x09' */ + return 16 } - case 0x0A: - { /* '0x0A' */ - return 16 + case 0x0A: { /* '0x0A' */ + return 16 } - case 0x0B: - { /* '0x0B' */ - return 13 + case 0x0B: { /* '0x0B' */ + return 13 } - case 0x0C: - { /* '0x0C' */ - return 14 + case 0x0C: { /* '0x0C' */ + return 14 } - case 0x0D: - { /* '0x0D' */ - return 13 + case 0x0D: { /* '0x0D' */ + return 13 } - case 0x0E: - { /* '0x0E' */ - return 13 + case 0x0E: { /* '0x0E' */ + return 13 } - case 0x0F: - { /* '0x0F' */ - return 8 + case 0x0F: { /* '0x0F' */ + return 8 } - case 0x10: - { /* '0x10' */ - return 4 + case 0x10: { /* '0x10' */ + return 4 } - case 0x11: - { /* '0x11' */ - return 10 + case 0x11: { /* '0x11' */ + return 10 } - default: - { + default: { return 0 } } @@ -173,42 +155,42 @@ func AttributeFirstEnumForFieldBytesReturned(value uint8) (Attribute, error) { } func AttributeByValue(value uint8) (enum Attribute, ok bool) { switch value { - case 0x00: - return Attribute_Manufacturer, true - case 0x01: - return Attribute_Type, true - case 0x02: - return Attribute_FirmwareVersion, true - case 0x03: - return Attribute_Summary, true - case 0x04: - return Attribute_ExtendedDiagnosticSummary, true - case 0x05: - return Attribute_NetworkTerminalLevels, true - case 0x06: - return Attribute_TerminalLevel, true - case 0x07: - return Attribute_NetworkVoltage, true - case 0x08: - return Attribute_GAVValuesCurrent, true - case 0x09: - return Attribute_GAVValuesStored, true - case 0x0A: - return Attribute_GAVPhysicalAddresses, true - case 0x0B: - return Attribute_LogicalAssignment, true - case 0x0C: - return Attribute_Delays, true - case 0x0D: - return Attribute_MinimumLevels, true - case 0x0E: - return Attribute_MaximumLevels, true - case 0x0F: - return Attribute_CurrentSenseLevels, true - case 0x10: - return Attribute_OutputUnitSummary, true - case 0x11: - return Attribute_DSIStatus, true + case 0x00: + return Attribute_Manufacturer, true + case 0x01: + return Attribute_Type, true + case 0x02: + return Attribute_FirmwareVersion, true + case 0x03: + return Attribute_Summary, true + case 0x04: + return Attribute_ExtendedDiagnosticSummary, true + case 0x05: + return Attribute_NetworkTerminalLevels, true + case 0x06: + return Attribute_TerminalLevel, true + case 0x07: + return Attribute_NetworkVoltage, true + case 0x08: + return Attribute_GAVValuesCurrent, true + case 0x09: + return Attribute_GAVValuesStored, true + case 0x0A: + return Attribute_GAVPhysicalAddresses, true + case 0x0B: + return Attribute_LogicalAssignment, true + case 0x0C: + return Attribute_Delays, true + case 0x0D: + return Attribute_MinimumLevels, true + case 0x0E: + return Attribute_MaximumLevels, true + case 0x0F: + return Attribute_CurrentSenseLevels, true + case 0x10: + return Attribute_OutputUnitSummary, true + case 0x11: + return Attribute_DSIStatus, true } return 0, false } @@ -255,13 +237,13 @@ func AttributeByName(value string) (enum Attribute, ok bool) { return 0, false } -func AttributeKnows(value uint8) bool { +func AttributeKnows(value uint8) bool { for _, typeValue := range AttributeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastAttribute(structType interface{}) Attribute { @@ -357,3 +339,4 @@ func (e Attribute) PLC4XEnumName() string { func (e Attribute) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/BaudRateSelector.go b/plc4go/protocols/cbus/readwrite/model/BaudRateSelector.go index ee35f570c0d..563ad39c83e 100644 --- a/plc4go/protocols/cbus/readwrite/model/BaudRateSelector.go +++ b/plc4go/protocols/cbus/readwrite/model/BaudRateSelector.go @@ -34,12 +34,12 @@ type IBaudRateSelector interface { utils.Serializable } -const ( +const( BaudRateSelector_SELECTED_4800_BAUD BaudRateSelector = 0x01 BaudRateSelector_SELECTED_2400_BAUD BaudRateSelector = 0x02 BaudRateSelector_SELECTED_1200_BAUD BaudRateSelector = 0x03 - BaudRateSelector_SELECTED_600_BAUD BaudRateSelector = 0x04 - BaudRateSelector_SELECTED_300_BAUD BaudRateSelector = 0x05 + BaudRateSelector_SELECTED_600_BAUD BaudRateSelector = 0x04 + BaudRateSelector_SELECTED_300_BAUD BaudRateSelector = 0x05 BaudRateSelector_SELECTED_9600_BAUD BaudRateSelector = 0xFF ) @@ -47,7 +47,7 @@ var BaudRateSelectorValues []BaudRateSelector func init() { _ = errors.New - BaudRateSelectorValues = []BaudRateSelector{ + BaudRateSelectorValues = []BaudRateSelector { BaudRateSelector_SELECTED_4800_BAUD, BaudRateSelector_SELECTED_2400_BAUD, BaudRateSelector_SELECTED_1200_BAUD, @@ -59,18 +59,18 @@ func init() { func BaudRateSelectorByValue(value uint8) (enum BaudRateSelector, ok bool) { switch value { - case 0x01: - return BaudRateSelector_SELECTED_4800_BAUD, true - case 0x02: - return BaudRateSelector_SELECTED_2400_BAUD, true - case 0x03: - return BaudRateSelector_SELECTED_1200_BAUD, true - case 0x04: - return BaudRateSelector_SELECTED_600_BAUD, true - case 0x05: - return BaudRateSelector_SELECTED_300_BAUD, true - case 0xFF: - return BaudRateSelector_SELECTED_9600_BAUD, true + case 0x01: + return BaudRateSelector_SELECTED_4800_BAUD, true + case 0x02: + return BaudRateSelector_SELECTED_2400_BAUD, true + case 0x03: + return BaudRateSelector_SELECTED_1200_BAUD, true + case 0x04: + return BaudRateSelector_SELECTED_600_BAUD, true + case 0x05: + return BaudRateSelector_SELECTED_300_BAUD, true + case 0xFF: + return BaudRateSelector_SELECTED_9600_BAUD, true } return 0, false } @@ -93,13 +93,13 @@ func BaudRateSelectorByName(value string) (enum BaudRateSelector, ok bool) { return 0, false } -func BaudRateSelectorKnows(value uint8) bool { +func BaudRateSelectorKnows(value uint8) bool { for _, typeValue := range BaudRateSelectorValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastBaudRateSelector(structType interface{}) BaudRateSelector { @@ -171,3 +171,4 @@ func (e BaudRateSelector) PLC4XEnumName() string { func (e BaudRateSelector) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/BridgeAddress.go b/plc4go/protocols/cbus/readwrite/model/BridgeAddress.go index ff3db0c85aa..aa60818a0e2 100644 --- a/plc4go/protocols/cbus/readwrite/model/BridgeAddress.go +++ b/plc4go/protocols/cbus/readwrite/model/BridgeAddress.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // BridgeAddress is the corresponding interface of BridgeAddress type BridgeAddress interface { @@ -44,9 +46,10 @@ type BridgeAddressExactly interface { // _BridgeAddress is the data-structure of this message type _BridgeAddress struct { - Address byte + Address byte } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -61,14 +64,15 @@ func (m *_BridgeAddress) GetAddress() byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewBridgeAddress factory function for _BridgeAddress -func NewBridgeAddress(address byte) *_BridgeAddress { - return &_BridgeAddress{Address: address} +func NewBridgeAddress( address byte ) *_BridgeAddress { +return &_BridgeAddress{ Address: address } } // Deprecated: use the interface for direct cast func CastBridgeAddress(structType interface{}) BridgeAddress { - if casted, ok := structType.(BridgeAddress); ok { + if casted, ok := structType.(BridgeAddress); ok { return casted } if casted, ok := structType.(*BridgeAddress); ok { @@ -85,11 +89,12 @@ func (m *_BridgeAddress) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (address) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_BridgeAddress) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -108,7 +113,7 @@ func BridgeAddressParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff _ = currentPos // Simple Field (address) - _address, _addressErr := readBuffer.ReadByte("address") +_address, _addressErr := readBuffer.ReadByte("address") if _addressErr != nil { return nil, errors.Wrap(_addressErr, "Error parsing 'address' field of BridgeAddress") } @@ -120,8 +125,8 @@ func BridgeAddressParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff // Create the instance return &_BridgeAddress{ - Address: address, - }, nil + Address: address, + }, nil } func (m *_BridgeAddress) Serialize() ([]byte, error) { @@ -135,7 +140,7 @@ func (m *_BridgeAddress) Serialize() ([]byte, error) { func (m *_BridgeAddress) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("BridgeAddress"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("BridgeAddress"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for BridgeAddress") } @@ -152,6 +157,7 @@ func (m *_BridgeAddress) SerializeWithWriteBuffer(ctx context.Context, writeBuff return nil } + func (m *_BridgeAddress) isBridgeAddress() bool { return true } @@ -166,3 +172,6 @@ func (m *_BridgeAddress) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/CALCommandType.go b/plc4go/protocols/cbus/readwrite/model/CALCommandType.go index 4701f7d4879..4bb51d5a3bc 100644 --- a/plc4go/protocols/cbus/readwrite/model/CALCommandType.go +++ b/plc4go/protocols/cbus/readwrite/model/CALCommandType.go @@ -34,15 +34,15 @@ type ICALCommandType interface { utils.Serializable } -const ( - CALCommandType_RESET CALCommandType = 0x00 - CALCommandType_RECALL CALCommandType = 0x01 - CALCommandType_IDENTIFY CALCommandType = 0x02 - CALCommandType_GET_STATUS CALCommandType = 0x03 - CALCommandType_WRITE CALCommandType = 0x04 - CALCommandType_REPLY CALCommandType = 0x0F - CALCommandType_ACKNOWLEDGE CALCommandType = 0x10 - CALCommandType_STATUS CALCommandType = 0x11 +const( + CALCommandType_RESET CALCommandType = 0x00 + CALCommandType_RECALL CALCommandType = 0x01 + CALCommandType_IDENTIFY CALCommandType = 0x02 + CALCommandType_GET_STATUS CALCommandType = 0x03 + CALCommandType_WRITE CALCommandType = 0x04 + CALCommandType_REPLY CALCommandType = 0x0F + CALCommandType_ACKNOWLEDGE CALCommandType = 0x10 + CALCommandType_STATUS CALCommandType = 0x11 CALCommandType_STATUS_EXTENDED CALCommandType = 0x12 ) @@ -50,7 +50,7 @@ var CALCommandTypeValues []CALCommandType func init() { _ = errors.New - CALCommandTypeValues = []CALCommandType{ + CALCommandTypeValues = []CALCommandType { CALCommandType_RESET, CALCommandType_RECALL, CALCommandType_IDENTIFY, @@ -65,24 +65,24 @@ func init() { func CALCommandTypeByValue(value uint8) (enum CALCommandType, ok bool) { switch value { - case 0x00: - return CALCommandType_RESET, true - case 0x01: - return CALCommandType_RECALL, true - case 0x02: - return CALCommandType_IDENTIFY, true - case 0x03: - return CALCommandType_GET_STATUS, true - case 0x04: - return CALCommandType_WRITE, true - case 0x0F: - return CALCommandType_REPLY, true - case 0x10: - return CALCommandType_ACKNOWLEDGE, true - case 0x11: - return CALCommandType_STATUS, true - case 0x12: - return CALCommandType_STATUS_EXTENDED, true + case 0x00: + return CALCommandType_RESET, true + case 0x01: + return CALCommandType_RECALL, true + case 0x02: + return CALCommandType_IDENTIFY, true + case 0x03: + return CALCommandType_GET_STATUS, true + case 0x04: + return CALCommandType_WRITE, true + case 0x0F: + return CALCommandType_REPLY, true + case 0x10: + return CALCommandType_ACKNOWLEDGE, true + case 0x11: + return CALCommandType_STATUS, true + case 0x12: + return CALCommandType_STATUS_EXTENDED, true } return 0, false } @@ -111,13 +111,13 @@ func CALCommandTypeByName(value string) (enum CALCommandType, ok bool) { return 0, false } -func CALCommandTypeKnows(value uint8) bool { +func CALCommandTypeKnows(value uint8) bool { for _, typeValue := range CALCommandTypeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastCALCommandType(structType interface{}) CALCommandType { @@ -195,3 +195,4 @@ func (e CALCommandType) PLC4XEnumName() string { func (e CALCommandType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/CALCommandTypeContainer.go b/plc4go/protocols/cbus/readwrite/model/CALCommandTypeContainer.go index 6a200d9ecc8..0d9a5c161a6 100644 --- a/plc4go/protocols/cbus/readwrite/model/CALCommandTypeContainer.go +++ b/plc4go/protocols/cbus/readwrite/model/CALCommandTypeContainer.go @@ -36,102 +36,102 @@ type ICALCommandTypeContainer interface { CommandType() CALCommandType } -const ( - CALCommandTypeContainer_CALCommandReset CALCommandTypeContainer = 0x08 - CALCommandTypeContainer_CALCommandRecall CALCommandTypeContainer = 0x1A - CALCommandTypeContainer_CALCommandIdentify CALCommandTypeContainer = 0x21 - CALCommandTypeContainer_CALCommandGetStatus CALCommandTypeContainer = 0x2A - CALCommandTypeContainer_CALCommandAcknowledge CALCommandTypeContainer = 0x32 - CALCommandTypeContainer_CALCommandReply_0Bytes CALCommandTypeContainer = 0x80 - CALCommandTypeContainer_CALCommandReply_1Bytes CALCommandTypeContainer = 0x81 - CALCommandTypeContainer_CALCommandReply_2Bytes CALCommandTypeContainer = 0x82 - CALCommandTypeContainer_CALCommandReply_3Bytes CALCommandTypeContainer = 0x83 - CALCommandTypeContainer_CALCommandReply_4Bytes CALCommandTypeContainer = 0x84 - CALCommandTypeContainer_CALCommandReply_5Bytes CALCommandTypeContainer = 0x85 - CALCommandTypeContainer_CALCommandReply_6Bytes CALCommandTypeContainer = 0x86 - CALCommandTypeContainer_CALCommandReply_7Bytes CALCommandTypeContainer = 0x87 - CALCommandTypeContainer_CALCommandReply_8Bytes CALCommandTypeContainer = 0x88 - CALCommandTypeContainer_CALCommandReply_9Bytes CALCommandTypeContainer = 0x89 - CALCommandTypeContainer_CALCommandReply_10Bytes CALCommandTypeContainer = 0x8A - CALCommandTypeContainer_CALCommandReply_11Bytes CALCommandTypeContainer = 0x8B - CALCommandTypeContainer_CALCommandReply_12Bytes CALCommandTypeContainer = 0x8C - CALCommandTypeContainer_CALCommandReply_13Bytes CALCommandTypeContainer = 0x8D - CALCommandTypeContainer_CALCommandReply_14Bytes CALCommandTypeContainer = 0x8E - CALCommandTypeContainer_CALCommandReply_15Bytes CALCommandTypeContainer = 0x8F - CALCommandTypeContainer_CALCommandReply_16Bytes CALCommandTypeContainer = 0x90 - CALCommandTypeContainer_CALCommandReply_17Bytes CALCommandTypeContainer = 0x91 - CALCommandTypeContainer_CALCommandReply_18Bytes CALCommandTypeContainer = 0x92 - CALCommandTypeContainer_CALCommandReply_19Bytes CALCommandTypeContainer = 0x93 - CALCommandTypeContainer_CALCommandReply_20Bytes CALCommandTypeContainer = 0x94 - CALCommandTypeContainer_CALCommandReply_21Bytes CALCommandTypeContainer = 0x95 - CALCommandTypeContainer_CALCommandReply_22Bytes CALCommandTypeContainer = 0x96 - CALCommandTypeContainer_CALCommandReply_23Bytes CALCommandTypeContainer = 0x97 - CALCommandTypeContainer_CALCommandReply_24Bytes CALCommandTypeContainer = 0x98 - CALCommandTypeContainer_CALCommandReply_25Bytes CALCommandTypeContainer = 0x99 - CALCommandTypeContainer_CALCommandReply_26Bytes CALCommandTypeContainer = 0x9A - CALCommandTypeContainer_CALCommandReply_27Bytes CALCommandTypeContainer = 0x9B - CALCommandTypeContainer_CALCommandReply_28Bytes CALCommandTypeContainer = 0x9C - CALCommandTypeContainer_CALCommandReply_29Bytes CALCommandTypeContainer = 0x9D - CALCommandTypeContainer_CALCommandReply_30Bytes CALCommandTypeContainer = 0x9E - CALCommandTypeContainer_CALCommandReply_31Bytes CALCommandTypeContainer = 0x9F - CALCommandTypeContainer_CALCommandWrite_0Bytes CALCommandTypeContainer = 0xA0 - CALCommandTypeContainer_CALCommandWrite_1Bytes CALCommandTypeContainer = 0xA1 - CALCommandTypeContainer_CALCommandWrite_2Bytes CALCommandTypeContainer = 0xA2 - CALCommandTypeContainer_CALCommandWrite_3Bytes CALCommandTypeContainer = 0xA3 - CALCommandTypeContainer_CALCommandWrite_4Bytes CALCommandTypeContainer = 0xA4 - CALCommandTypeContainer_CALCommandWrite_5Bytes CALCommandTypeContainer = 0xA5 - CALCommandTypeContainer_CALCommandWrite_6Bytes CALCommandTypeContainer = 0xA6 - CALCommandTypeContainer_CALCommandWrite_7Bytes CALCommandTypeContainer = 0xA7 - CALCommandTypeContainer_CALCommandWrite_8Bytes CALCommandTypeContainer = 0xA8 - CALCommandTypeContainer_CALCommandWrite_9Bytes CALCommandTypeContainer = 0xA9 - CALCommandTypeContainer_CALCommandWrite_10Bytes CALCommandTypeContainer = 0xAA - CALCommandTypeContainer_CALCommandWrite_11Bytes CALCommandTypeContainer = 0xAB - CALCommandTypeContainer_CALCommandWrite_12Bytes CALCommandTypeContainer = 0xAC - CALCommandTypeContainer_CALCommandWrite_13Bytes CALCommandTypeContainer = 0xAD - CALCommandTypeContainer_CALCommandWrite_14Bytes CALCommandTypeContainer = 0xAE - CALCommandTypeContainer_CALCommandWrite_15Bytes CALCommandTypeContainer = 0xAF - CALCommandTypeContainer_CALCommandStatus_0Bytes CALCommandTypeContainer = 0xC0 - CALCommandTypeContainer_CALCommandStatus_1Bytes CALCommandTypeContainer = 0xC1 - CALCommandTypeContainer_CALCommandStatus_2Bytes CALCommandTypeContainer = 0xC2 - CALCommandTypeContainer_CALCommandStatus_3Bytes CALCommandTypeContainer = 0xC3 - CALCommandTypeContainer_CALCommandStatus_4Bytes CALCommandTypeContainer = 0xC4 - CALCommandTypeContainer_CALCommandStatus_5Bytes CALCommandTypeContainer = 0xC5 - CALCommandTypeContainer_CALCommandStatus_6Bytes CALCommandTypeContainer = 0xC6 - CALCommandTypeContainer_CALCommandStatus_7Bytes CALCommandTypeContainer = 0xC7 - CALCommandTypeContainer_CALCommandStatus_8Bytes CALCommandTypeContainer = 0xC8 - CALCommandTypeContainer_CALCommandStatus_9Bytes CALCommandTypeContainer = 0xC9 - CALCommandTypeContainer_CALCommandStatus_10Bytes CALCommandTypeContainer = 0xCA - CALCommandTypeContainer_CALCommandStatus_11Bytes CALCommandTypeContainer = 0xCB - CALCommandTypeContainer_CALCommandStatus_12Bytes CALCommandTypeContainer = 0xCC - CALCommandTypeContainer_CALCommandStatus_13Bytes CALCommandTypeContainer = 0xCD - CALCommandTypeContainer_CALCommandStatus_14Bytes CALCommandTypeContainer = 0xCE - CALCommandTypeContainer_CALCommandStatus_15Bytes CALCommandTypeContainer = 0xCF - CALCommandTypeContainer_CALCommandStatus_16Bytes CALCommandTypeContainer = 0xD0 - CALCommandTypeContainer_CALCommandStatus_17Bytes CALCommandTypeContainer = 0xD1 - CALCommandTypeContainer_CALCommandStatus_18Bytes CALCommandTypeContainer = 0xD2 - CALCommandTypeContainer_CALCommandStatus_19Bytes CALCommandTypeContainer = 0xD3 - CALCommandTypeContainer_CALCommandStatus_20Bytes CALCommandTypeContainer = 0xD4 - CALCommandTypeContainer_CALCommandStatus_21Bytes CALCommandTypeContainer = 0xD5 - CALCommandTypeContainer_CALCommandStatus_22Bytes CALCommandTypeContainer = 0xD6 - CALCommandTypeContainer_CALCommandStatus_23Bytes CALCommandTypeContainer = 0xD7 - CALCommandTypeContainer_CALCommandStatus_24Bytes CALCommandTypeContainer = 0xD8 - CALCommandTypeContainer_CALCommandStatus_25Bytes CALCommandTypeContainer = 0xD9 - CALCommandTypeContainer_CALCommandStatus_26Bytes CALCommandTypeContainer = 0xDA - CALCommandTypeContainer_CALCommandStatus_27Bytes CALCommandTypeContainer = 0xDB - CALCommandTypeContainer_CALCommandStatus_28Bytes CALCommandTypeContainer = 0xDC - CALCommandTypeContainer_CALCommandStatus_29Bytes CALCommandTypeContainer = 0xDD - CALCommandTypeContainer_CALCommandStatus_30Bytes CALCommandTypeContainer = 0xDE - CALCommandTypeContainer_CALCommandStatus_31Bytes CALCommandTypeContainer = 0xDF - CALCommandTypeContainer_CALCommandStatusExtended_0Bytes CALCommandTypeContainer = 0xE0 - CALCommandTypeContainer_CALCommandStatusExtended_1Bytes CALCommandTypeContainer = 0xE1 - CALCommandTypeContainer_CALCommandStatusExtended_2Bytes CALCommandTypeContainer = 0xE2 - CALCommandTypeContainer_CALCommandStatusExtended_3Bytes CALCommandTypeContainer = 0xE3 - CALCommandTypeContainer_CALCommandStatusExtended_4Bytes CALCommandTypeContainer = 0xE4 - CALCommandTypeContainer_CALCommandStatusExtended_5Bytes CALCommandTypeContainer = 0xE5 - CALCommandTypeContainer_CALCommandStatusExtended_6Bytes CALCommandTypeContainer = 0xE6 - CALCommandTypeContainer_CALCommandStatusExtended_7Bytes CALCommandTypeContainer = 0xE7 - CALCommandTypeContainer_CALCommandStatusExtended_8Bytes CALCommandTypeContainer = 0xE8 - CALCommandTypeContainer_CALCommandStatusExtended_9Bytes CALCommandTypeContainer = 0xE9 +const( + CALCommandTypeContainer_CALCommandReset CALCommandTypeContainer = 0x08 + CALCommandTypeContainer_CALCommandRecall CALCommandTypeContainer = 0x1A + CALCommandTypeContainer_CALCommandIdentify CALCommandTypeContainer = 0x21 + CALCommandTypeContainer_CALCommandGetStatus CALCommandTypeContainer = 0x2A + CALCommandTypeContainer_CALCommandAcknowledge CALCommandTypeContainer = 0x32 + CALCommandTypeContainer_CALCommandReply_0Bytes CALCommandTypeContainer = 0x80 + CALCommandTypeContainer_CALCommandReply_1Bytes CALCommandTypeContainer = 0x81 + CALCommandTypeContainer_CALCommandReply_2Bytes CALCommandTypeContainer = 0x82 + CALCommandTypeContainer_CALCommandReply_3Bytes CALCommandTypeContainer = 0x83 + CALCommandTypeContainer_CALCommandReply_4Bytes CALCommandTypeContainer = 0x84 + CALCommandTypeContainer_CALCommandReply_5Bytes CALCommandTypeContainer = 0x85 + CALCommandTypeContainer_CALCommandReply_6Bytes CALCommandTypeContainer = 0x86 + CALCommandTypeContainer_CALCommandReply_7Bytes CALCommandTypeContainer = 0x87 + CALCommandTypeContainer_CALCommandReply_8Bytes CALCommandTypeContainer = 0x88 + CALCommandTypeContainer_CALCommandReply_9Bytes CALCommandTypeContainer = 0x89 + CALCommandTypeContainer_CALCommandReply_10Bytes CALCommandTypeContainer = 0x8A + CALCommandTypeContainer_CALCommandReply_11Bytes CALCommandTypeContainer = 0x8B + CALCommandTypeContainer_CALCommandReply_12Bytes CALCommandTypeContainer = 0x8C + CALCommandTypeContainer_CALCommandReply_13Bytes CALCommandTypeContainer = 0x8D + CALCommandTypeContainer_CALCommandReply_14Bytes CALCommandTypeContainer = 0x8E + CALCommandTypeContainer_CALCommandReply_15Bytes CALCommandTypeContainer = 0x8F + CALCommandTypeContainer_CALCommandReply_16Bytes CALCommandTypeContainer = 0x90 + CALCommandTypeContainer_CALCommandReply_17Bytes CALCommandTypeContainer = 0x91 + CALCommandTypeContainer_CALCommandReply_18Bytes CALCommandTypeContainer = 0x92 + CALCommandTypeContainer_CALCommandReply_19Bytes CALCommandTypeContainer = 0x93 + CALCommandTypeContainer_CALCommandReply_20Bytes CALCommandTypeContainer = 0x94 + CALCommandTypeContainer_CALCommandReply_21Bytes CALCommandTypeContainer = 0x95 + CALCommandTypeContainer_CALCommandReply_22Bytes CALCommandTypeContainer = 0x96 + CALCommandTypeContainer_CALCommandReply_23Bytes CALCommandTypeContainer = 0x97 + CALCommandTypeContainer_CALCommandReply_24Bytes CALCommandTypeContainer = 0x98 + CALCommandTypeContainer_CALCommandReply_25Bytes CALCommandTypeContainer = 0x99 + CALCommandTypeContainer_CALCommandReply_26Bytes CALCommandTypeContainer = 0x9A + CALCommandTypeContainer_CALCommandReply_27Bytes CALCommandTypeContainer = 0x9B + CALCommandTypeContainer_CALCommandReply_28Bytes CALCommandTypeContainer = 0x9C + CALCommandTypeContainer_CALCommandReply_29Bytes CALCommandTypeContainer = 0x9D + CALCommandTypeContainer_CALCommandReply_30Bytes CALCommandTypeContainer = 0x9E + CALCommandTypeContainer_CALCommandReply_31Bytes CALCommandTypeContainer = 0x9F + CALCommandTypeContainer_CALCommandWrite_0Bytes CALCommandTypeContainer = 0xA0 + CALCommandTypeContainer_CALCommandWrite_1Bytes CALCommandTypeContainer = 0xA1 + CALCommandTypeContainer_CALCommandWrite_2Bytes CALCommandTypeContainer = 0xA2 + CALCommandTypeContainer_CALCommandWrite_3Bytes CALCommandTypeContainer = 0xA3 + CALCommandTypeContainer_CALCommandWrite_4Bytes CALCommandTypeContainer = 0xA4 + CALCommandTypeContainer_CALCommandWrite_5Bytes CALCommandTypeContainer = 0xA5 + CALCommandTypeContainer_CALCommandWrite_6Bytes CALCommandTypeContainer = 0xA6 + CALCommandTypeContainer_CALCommandWrite_7Bytes CALCommandTypeContainer = 0xA7 + CALCommandTypeContainer_CALCommandWrite_8Bytes CALCommandTypeContainer = 0xA8 + CALCommandTypeContainer_CALCommandWrite_9Bytes CALCommandTypeContainer = 0xA9 + CALCommandTypeContainer_CALCommandWrite_10Bytes CALCommandTypeContainer = 0xAA + CALCommandTypeContainer_CALCommandWrite_11Bytes CALCommandTypeContainer = 0xAB + CALCommandTypeContainer_CALCommandWrite_12Bytes CALCommandTypeContainer = 0xAC + CALCommandTypeContainer_CALCommandWrite_13Bytes CALCommandTypeContainer = 0xAD + CALCommandTypeContainer_CALCommandWrite_14Bytes CALCommandTypeContainer = 0xAE + CALCommandTypeContainer_CALCommandWrite_15Bytes CALCommandTypeContainer = 0xAF + CALCommandTypeContainer_CALCommandStatus_0Bytes CALCommandTypeContainer = 0xC0 + CALCommandTypeContainer_CALCommandStatus_1Bytes CALCommandTypeContainer = 0xC1 + CALCommandTypeContainer_CALCommandStatus_2Bytes CALCommandTypeContainer = 0xC2 + CALCommandTypeContainer_CALCommandStatus_3Bytes CALCommandTypeContainer = 0xC3 + CALCommandTypeContainer_CALCommandStatus_4Bytes CALCommandTypeContainer = 0xC4 + CALCommandTypeContainer_CALCommandStatus_5Bytes CALCommandTypeContainer = 0xC5 + CALCommandTypeContainer_CALCommandStatus_6Bytes CALCommandTypeContainer = 0xC6 + CALCommandTypeContainer_CALCommandStatus_7Bytes CALCommandTypeContainer = 0xC7 + CALCommandTypeContainer_CALCommandStatus_8Bytes CALCommandTypeContainer = 0xC8 + CALCommandTypeContainer_CALCommandStatus_9Bytes CALCommandTypeContainer = 0xC9 + CALCommandTypeContainer_CALCommandStatus_10Bytes CALCommandTypeContainer = 0xCA + CALCommandTypeContainer_CALCommandStatus_11Bytes CALCommandTypeContainer = 0xCB + CALCommandTypeContainer_CALCommandStatus_12Bytes CALCommandTypeContainer = 0xCC + CALCommandTypeContainer_CALCommandStatus_13Bytes CALCommandTypeContainer = 0xCD + CALCommandTypeContainer_CALCommandStatus_14Bytes CALCommandTypeContainer = 0xCE + CALCommandTypeContainer_CALCommandStatus_15Bytes CALCommandTypeContainer = 0xCF + CALCommandTypeContainer_CALCommandStatus_16Bytes CALCommandTypeContainer = 0xD0 + CALCommandTypeContainer_CALCommandStatus_17Bytes CALCommandTypeContainer = 0xD1 + CALCommandTypeContainer_CALCommandStatus_18Bytes CALCommandTypeContainer = 0xD2 + CALCommandTypeContainer_CALCommandStatus_19Bytes CALCommandTypeContainer = 0xD3 + CALCommandTypeContainer_CALCommandStatus_20Bytes CALCommandTypeContainer = 0xD4 + CALCommandTypeContainer_CALCommandStatus_21Bytes CALCommandTypeContainer = 0xD5 + CALCommandTypeContainer_CALCommandStatus_22Bytes CALCommandTypeContainer = 0xD6 + CALCommandTypeContainer_CALCommandStatus_23Bytes CALCommandTypeContainer = 0xD7 + CALCommandTypeContainer_CALCommandStatus_24Bytes CALCommandTypeContainer = 0xD8 + CALCommandTypeContainer_CALCommandStatus_25Bytes CALCommandTypeContainer = 0xD9 + CALCommandTypeContainer_CALCommandStatus_26Bytes CALCommandTypeContainer = 0xDA + CALCommandTypeContainer_CALCommandStatus_27Bytes CALCommandTypeContainer = 0xDB + CALCommandTypeContainer_CALCommandStatus_28Bytes CALCommandTypeContainer = 0xDC + CALCommandTypeContainer_CALCommandStatus_29Bytes CALCommandTypeContainer = 0xDD + CALCommandTypeContainer_CALCommandStatus_30Bytes CALCommandTypeContainer = 0xDE + CALCommandTypeContainer_CALCommandStatus_31Bytes CALCommandTypeContainer = 0xDF + CALCommandTypeContainer_CALCommandStatusExtended_0Bytes CALCommandTypeContainer = 0xE0 + CALCommandTypeContainer_CALCommandStatusExtended_1Bytes CALCommandTypeContainer = 0xE1 + CALCommandTypeContainer_CALCommandStatusExtended_2Bytes CALCommandTypeContainer = 0xE2 + CALCommandTypeContainer_CALCommandStatusExtended_3Bytes CALCommandTypeContainer = 0xE3 + CALCommandTypeContainer_CALCommandStatusExtended_4Bytes CALCommandTypeContainer = 0xE4 + CALCommandTypeContainer_CALCommandStatusExtended_5Bytes CALCommandTypeContainer = 0xE5 + CALCommandTypeContainer_CALCommandStatusExtended_6Bytes CALCommandTypeContainer = 0xE6 + CALCommandTypeContainer_CALCommandStatusExtended_7Bytes CALCommandTypeContainer = 0xE7 + CALCommandTypeContainer_CALCommandStatusExtended_8Bytes CALCommandTypeContainer = 0xE8 + CALCommandTypeContainer_CALCommandStatusExtended_9Bytes CALCommandTypeContainer = 0xE9 CALCommandTypeContainer_CALCommandStatusExtended_10Bytes CALCommandTypeContainer = 0xEA CALCommandTypeContainer_CALCommandStatusExtended_11Bytes CALCommandTypeContainer = 0xEB CALCommandTypeContainer_CALCommandStatusExtended_12Bytes CALCommandTypeContainer = 0xEC @@ -160,7 +160,7 @@ var CALCommandTypeContainerValues []CALCommandTypeContainer func init() { _ = errors.New - CALCommandTypeContainerValues = []CALCommandTypeContainer{ + CALCommandTypeContainerValues = []CALCommandTypeContainer { CALCommandTypeContainer_CALCommandReset, CALCommandTypeContainer_CALCommandRecall, CALCommandTypeContainer_CALCommandIdentify, @@ -281,478 +281,361 @@ func init() { } } + func (e CALCommandTypeContainer) NumBytes() uint8 { - switch e { - case 0x08: - { /* '0x08' */ - return 0 + switch e { + case 0x08: { /* '0x08' */ + return 0 } - case 0x1A: - { /* '0x1A' */ - return 2 + case 0x1A: { /* '0x1A' */ + return 2 } - case 0x21: - { /* '0x21' */ - return 1 + case 0x21: { /* '0x21' */ + return 1 } - case 0x2A: - { /* '0x2A' */ - return 2 + case 0x2A: { /* '0x2A' */ + return 2 } - case 0x32: - { /* '0x32' */ - return 2 + case 0x32: { /* '0x32' */ + return 2 } - case 0x80: - { /* '0x80' */ - return 0 + case 0x80: { /* '0x80' */ + return 0 } - case 0x81: - { /* '0x81' */ - return 1 + case 0x81: { /* '0x81' */ + return 1 } - case 0x82: - { /* '0x82' */ - return 2 + case 0x82: { /* '0x82' */ + return 2 } - case 0x83: - { /* '0x83' */ - return 3 + case 0x83: { /* '0x83' */ + return 3 } - case 0x84: - { /* '0x84' */ - return 4 + case 0x84: { /* '0x84' */ + return 4 } - case 0x85: - { /* '0x85' */ - return 5 + case 0x85: { /* '0x85' */ + return 5 } - case 0x86: - { /* '0x86' */ - return 6 + case 0x86: { /* '0x86' */ + return 6 } - case 0x87: - { /* '0x87' */ - return 7 + case 0x87: { /* '0x87' */ + return 7 } - case 0x88: - { /* '0x88' */ - return 8 + case 0x88: { /* '0x88' */ + return 8 } - case 0x89: - { /* '0x89' */ - return 9 + case 0x89: { /* '0x89' */ + return 9 } - case 0x8A: - { /* '0x8A' */ - return 10 + case 0x8A: { /* '0x8A' */ + return 10 } - case 0x8B: - { /* '0x8B' */ - return 11 + case 0x8B: { /* '0x8B' */ + return 11 } - case 0x8C: - { /* '0x8C' */ - return 12 + case 0x8C: { /* '0x8C' */ + return 12 } - case 0x8D: - { /* '0x8D' */ - return 13 + case 0x8D: { /* '0x8D' */ + return 13 } - case 0x8E: - { /* '0x8E' */ - return 14 + case 0x8E: { /* '0x8E' */ + return 14 } - case 0x8F: - { /* '0x8F' */ - return 15 + case 0x8F: { /* '0x8F' */ + return 15 } - case 0x90: - { /* '0x90' */ - return 16 + case 0x90: { /* '0x90' */ + return 16 } - case 0x91: - { /* '0x91' */ - return 17 + case 0x91: { /* '0x91' */ + return 17 } - case 0x92: - { /* '0x92' */ - return 18 + case 0x92: { /* '0x92' */ + return 18 } - case 0x93: - { /* '0x93' */ - return 19 + case 0x93: { /* '0x93' */ + return 19 } - case 0x94: - { /* '0x94' */ - return 20 + case 0x94: { /* '0x94' */ + return 20 } - case 0x95: - { /* '0x95' */ - return 21 + case 0x95: { /* '0x95' */ + return 21 } - case 0x96: - { /* '0x96' */ - return 22 + case 0x96: { /* '0x96' */ + return 22 } - case 0x97: - { /* '0x97' */ - return 23 + case 0x97: { /* '0x97' */ + return 23 } - case 0x98: - { /* '0x98' */ - return 24 + case 0x98: { /* '0x98' */ + return 24 } - case 0x99: - { /* '0x99' */ - return 25 + case 0x99: { /* '0x99' */ + return 25 } - case 0x9A: - { /* '0x9A' */ - return 26 + case 0x9A: { /* '0x9A' */ + return 26 } - case 0x9B: - { /* '0x9B' */ - return 27 + case 0x9B: { /* '0x9B' */ + return 27 } - case 0x9C: - { /* '0x9C' */ - return 28 + case 0x9C: { /* '0x9C' */ + return 28 } - case 0x9D: - { /* '0x9D' */ - return 29 + case 0x9D: { /* '0x9D' */ + return 29 } - case 0x9E: - { /* '0x9E' */ - return 30 + case 0x9E: { /* '0x9E' */ + return 30 } - case 0x9F: - { /* '0x9F' */ - return 31 + case 0x9F: { /* '0x9F' */ + return 31 } - case 0xA0: - { /* '0xA0' */ - return 0 + case 0xA0: { /* '0xA0' */ + return 0 } - case 0xA1: - { /* '0xA1' */ - return 1 + case 0xA1: { /* '0xA1' */ + return 1 } - case 0xA2: - { /* '0xA2' */ - return 2 + case 0xA2: { /* '0xA2' */ + return 2 } - case 0xA3: - { /* '0xA3' */ - return 3 + case 0xA3: { /* '0xA3' */ + return 3 } - case 0xA4: - { /* '0xA4' */ - return 4 + case 0xA4: { /* '0xA4' */ + return 4 } - case 0xA5: - { /* '0xA5' */ - return 5 + case 0xA5: { /* '0xA5' */ + return 5 } - case 0xA6: - { /* '0xA6' */ - return 6 + case 0xA6: { /* '0xA6' */ + return 6 } - case 0xA7: - { /* '0xA7' */ - return 7 + case 0xA7: { /* '0xA7' */ + return 7 } - case 0xA8: - { /* '0xA8' */ - return 8 + case 0xA8: { /* '0xA8' */ + return 8 } - case 0xA9: - { /* '0xA9' */ - return 9 + case 0xA9: { /* '0xA9' */ + return 9 } - case 0xAA: - { /* '0xAA' */ - return 10 + case 0xAA: { /* '0xAA' */ + return 10 } - case 0xAB: - { /* '0xAB' */ - return 11 + case 0xAB: { /* '0xAB' */ + return 11 } - case 0xAC: - { /* '0xAC' */ - return 12 + case 0xAC: { /* '0xAC' */ + return 12 } - case 0xAD: - { /* '0xAD' */ - return 13 + case 0xAD: { /* '0xAD' */ + return 13 } - case 0xAE: - { /* '0xAE' */ - return 14 + case 0xAE: { /* '0xAE' */ + return 14 } - case 0xAF: - { /* '0xAF' */ - return 15 + case 0xAF: { /* '0xAF' */ + return 15 } - case 0xC0: - { /* '0xC0' */ - return 0 + case 0xC0: { /* '0xC0' */ + return 0 } - case 0xC1: - { /* '0xC1' */ - return 1 + case 0xC1: { /* '0xC1' */ + return 1 } - case 0xC2: - { /* '0xC2' */ - return 2 + case 0xC2: { /* '0xC2' */ + return 2 } - case 0xC3: - { /* '0xC3' */ - return 3 + case 0xC3: { /* '0xC3' */ + return 3 } - case 0xC4: - { /* '0xC4' */ - return 4 + case 0xC4: { /* '0xC4' */ + return 4 } - case 0xC5: - { /* '0xC5' */ - return 5 + case 0xC5: { /* '0xC5' */ + return 5 } - case 0xC6: - { /* '0xC6' */ - return 6 + case 0xC6: { /* '0xC6' */ + return 6 } - case 0xC7: - { /* '0xC7' */ - return 7 + case 0xC7: { /* '0xC7' */ + return 7 } - case 0xC8: - { /* '0xC8' */ - return 8 + case 0xC8: { /* '0xC8' */ + return 8 } - case 0xC9: - { /* '0xC9' */ - return 9 + case 0xC9: { /* '0xC9' */ + return 9 } - case 0xCA: - { /* '0xCA' */ - return 10 + case 0xCA: { /* '0xCA' */ + return 10 } - case 0xCB: - { /* '0xCB' */ - return 11 + case 0xCB: { /* '0xCB' */ + return 11 } - case 0xCC: - { /* '0xCC' */ - return 12 + case 0xCC: { /* '0xCC' */ + return 12 } - case 0xCD: - { /* '0xCD' */ - return 13 + case 0xCD: { /* '0xCD' */ + return 13 } - case 0xCE: - { /* '0xCE' */ - return 14 + case 0xCE: { /* '0xCE' */ + return 14 } - case 0xCF: - { /* '0xCF' */ - return 15 + case 0xCF: { /* '0xCF' */ + return 15 } - case 0xD0: - { /* '0xD0' */ - return 16 + case 0xD0: { /* '0xD0' */ + return 16 } - case 0xD1: - { /* '0xD1' */ - return 17 + case 0xD1: { /* '0xD1' */ + return 17 } - case 0xD2: - { /* '0xD2' */ - return 18 + case 0xD2: { /* '0xD2' */ + return 18 } - case 0xD3: - { /* '0xD3' */ - return 19 + case 0xD3: { /* '0xD3' */ + return 19 } - case 0xD4: - { /* '0xD4' */ - return 20 + case 0xD4: { /* '0xD4' */ + return 20 } - case 0xD5: - { /* '0xD5' */ - return 21 + case 0xD5: { /* '0xD5' */ + return 21 } - case 0xD6: - { /* '0xD6' */ - return 22 + case 0xD6: { /* '0xD6' */ + return 22 } - case 0xD7: - { /* '0xD7' */ - return 23 + case 0xD7: { /* '0xD7' */ + return 23 } - case 0xD8: - { /* '0xD8' */ - return 24 + case 0xD8: { /* '0xD8' */ + return 24 } - case 0xD9: - { /* '0xD9' */ - return 25 + case 0xD9: { /* '0xD9' */ + return 25 } - case 0xDA: - { /* '0xDA' */ - return 26 + case 0xDA: { /* '0xDA' */ + return 26 } - case 0xDB: - { /* '0xDB' */ - return 27 + case 0xDB: { /* '0xDB' */ + return 27 } - case 0xDC: - { /* '0xDC' */ - return 28 + case 0xDC: { /* '0xDC' */ + return 28 } - case 0xDD: - { /* '0xDD' */ - return 29 + case 0xDD: { /* '0xDD' */ + return 29 } - case 0xDE: - { /* '0xDE' */ - return 30 + case 0xDE: { /* '0xDE' */ + return 30 } - case 0xDF: - { /* '0xDF' */ - return 31 + case 0xDF: { /* '0xDF' */ + return 31 } - case 0xE0: - { /* '0xE0' */ - return 0 + case 0xE0: { /* '0xE0' */ + return 0 } - case 0xE1: - { /* '0xE1' */ - return 1 + case 0xE1: { /* '0xE1' */ + return 1 } - case 0xE2: - { /* '0xE2' */ - return 2 + case 0xE2: { /* '0xE2' */ + return 2 } - case 0xE3: - { /* '0xE3' */ - return 3 + case 0xE3: { /* '0xE3' */ + return 3 } - case 0xE4: - { /* '0xE4' */ - return 4 + case 0xE4: { /* '0xE4' */ + return 4 } - case 0xE5: - { /* '0xE5' */ - return 5 + case 0xE5: { /* '0xE5' */ + return 5 } - case 0xE6: - { /* '0xE6' */ - return 6 + case 0xE6: { /* '0xE6' */ + return 6 } - case 0xE7: - { /* '0xE7' */ - return 7 + case 0xE7: { /* '0xE7' */ + return 7 } - case 0xE8: - { /* '0xE8' */ - return 8 + case 0xE8: { /* '0xE8' */ + return 8 } - case 0xE9: - { /* '0xE9' */ - return 9 + case 0xE9: { /* '0xE9' */ + return 9 } - case 0xEA: - { /* '0xEA' */ - return 10 + case 0xEA: { /* '0xEA' */ + return 10 } - case 0xEB: - { /* '0xEB' */ - return 11 + case 0xEB: { /* '0xEB' */ + return 11 } - case 0xEC: - { /* '0xEC' */ - return 12 + case 0xEC: { /* '0xEC' */ + return 12 } - case 0xED: - { /* '0xED' */ - return 13 + case 0xED: { /* '0xED' */ + return 13 } - case 0xEE: - { /* '0xEE' */ - return 14 + case 0xEE: { /* '0xEE' */ + return 14 } - case 0xEF: - { /* '0xEF' */ - return 15 + case 0xEF: { /* '0xEF' */ + return 15 } - case 0xF0: - { /* '0xF0' */ - return 16 + case 0xF0: { /* '0xF0' */ + return 16 } - case 0xF1: - { /* '0xF1' */ - return 17 + case 0xF1: { /* '0xF1' */ + return 17 } - case 0xF2: - { /* '0xF2' */ - return 18 + case 0xF2: { /* '0xF2' */ + return 18 } - case 0xF3: - { /* '0xF3' */ - return 19 + case 0xF3: { /* '0xF3' */ + return 19 } - case 0xF4: - { /* '0xF4' */ - return 20 + case 0xF4: { /* '0xF4' */ + return 20 } - case 0xF5: - { /* '0xF5' */ - return 21 + case 0xF5: { /* '0xF5' */ + return 21 } - case 0xF6: - { /* '0xF6' */ - return 22 + case 0xF6: { /* '0xF6' */ + return 22 } - case 0xF7: - { /* '0xF7' */ - return 23 + case 0xF7: { /* '0xF7' */ + return 23 } - case 0xF8: - { /* '0xF8' */ - return 24 + case 0xF8: { /* '0xF8' */ + return 24 } - case 0xF9: - { /* '0xF9' */ - return 25 + case 0xF9: { /* '0xF9' */ + return 25 } - case 0xFA: - { /* '0xFA' */ - return 26 + case 0xFA: { /* '0xFA' */ + return 26 } - case 0xFB: - { /* '0xFB' */ - return 27 + case 0xFB: { /* '0xFB' */ + return 27 } - case 0xFC: - { /* '0xFC' */ - return 28 + case 0xFC: { /* '0xFC' */ + return 28 } - case 0xFD: - { /* '0xFD' */ - return 29 + case 0xFD: { /* '0xFD' */ + return 29 } - case 0xFE: - { /* '0xFE' */ - return 30 + case 0xFE: { /* '0xFE' */ + return 30 } - case 0xFF: - { /* '0xFF' */ - return 31 + case 0xFF: { /* '0xFF' */ + return 31 } - default: - { + default: { return 0 } } @@ -768,477 +651,359 @@ func CALCommandTypeContainerFirstEnumForFieldNumBytes(value uint8) (CALCommandTy } func (e CALCommandTypeContainer) CommandType() CALCommandType { - switch e { - case 0x08: - { /* '0x08' */ + switch e { + case 0x08: { /* '0x08' */ return CALCommandType_RESET } - case 0x1A: - { /* '0x1A' */ + case 0x1A: { /* '0x1A' */ return CALCommandType_RECALL } - case 0x21: - { /* '0x21' */ + case 0x21: { /* '0x21' */ return CALCommandType_IDENTIFY } - case 0x2A: - { /* '0x2A' */ + case 0x2A: { /* '0x2A' */ return CALCommandType_GET_STATUS } - case 0x32: - { /* '0x32' */ + case 0x32: { /* '0x32' */ return CALCommandType_ACKNOWLEDGE } - case 0x80: - { /* '0x80' */ + case 0x80: { /* '0x80' */ return CALCommandType_REPLY } - case 0x81: - { /* '0x81' */ + case 0x81: { /* '0x81' */ return CALCommandType_REPLY } - case 0x82: - { /* '0x82' */ + case 0x82: { /* '0x82' */ return CALCommandType_REPLY } - case 0x83: - { /* '0x83' */ + case 0x83: { /* '0x83' */ return CALCommandType_REPLY } - case 0x84: - { /* '0x84' */ + case 0x84: { /* '0x84' */ return CALCommandType_REPLY } - case 0x85: - { /* '0x85' */ + case 0x85: { /* '0x85' */ return CALCommandType_REPLY } - case 0x86: - { /* '0x86' */ + case 0x86: { /* '0x86' */ return CALCommandType_REPLY } - case 0x87: - { /* '0x87' */ + case 0x87: { /* '0x87' */ return CALCommandType_REPLY } - case 0x88: - { /* '0x88' */ + case 0x88: { /* '0x88' */ return CALCommandType_REPLY } - case 0x89: - { /* '0x89' */ + case 0x89: { /* '0x89' */ return CALCommandType_REPLY } - case 0x8A: - { /* '0x8A' */ + case 0x8A: { /* '0x8A' */ return CALCommandType_REPLY } - case 0x8B: - { /* '0x8B' */ + case 0x8B: { /* '0x8B' */ return CALCommandType_REPLY } - case 0x8C: - { /* '0x8C' */ + case 0x8C: { /* '0x8C' */ return CALCommandType_REPLY } - case 0x8D: - { /* '0x8D' */ + case 0x8D: { /* '0x8D' */ return CALCommandType_REPLY } - case 0x8E: - { /* '0x8E' */ + case 0x8E: { /* '0x8E' */ return CALCommandType_REPLY } - case 0x8F: - { /* '0x8F' */ + case 0x8F: { /* '0x8F' */ return CALCommandType_REPLY } - case 0x90: - { /* '0x90' */ + case 0x90: { /* '0x90' */ return CALCommandType_REPLY } - case 0x91: - { /* '0x91' */ + case 0x91: { /* '0x91' */ return CALCommandType_REPLY } - case 0x92: - { /* '0x92' */ + case 0x92: { /* '0x92' */ return CALCommandType_REPLY } - case 0x93: - { /* '0x93' */ + case 0x93: { /* '0x93' */ return CALCommandType_REPLY } - case 0x94: - { /* '0x94' */ + case 0x94: { /* '0x94' */ return CALCommandType_REPLY } - case 0x95: - { /* '0x95' */ + case 0x95: { /* '0x95' */ return CALCommandType_REPLY } - case 0x96: - { /* '0x96' */ + case 0x96: { /* '0x96' */ return CALCommandType_REPLY } - case 0x97: - { /* '0x97' */ + case 0x97: { /* '0x97' */ return CALCommandType_REPLY } - case 0x98: - { /* '0x98' */ + case 0x98: { /* '0x98' */ return CALCommandType_REPLY } - case 0x99: - { /* '0x99' */ + case 0x99: { /* '0x99' */ return CALCommandType_REPLY } - case 0x9A: - { /* '0x9A' */ + case 0x9A: { /* '0x9A' */ return CALCommandType_REPLY } - case 0x9B: - { /* '0x9B' */ + case 0x9B: { /* '0x9B' */ return CALCommandType_REPLY } - case 0x9C: - { /* '0x9C' */ + case 0x9C: { /* '0x9C' */ return CALCommandType_REPLY } - case 0x9D: - { /* '0x9D' */ + case 0x9D: { /* '0x9D' */ return CALCommandType_REPLY } - case 0x9E: - { /* '0x9E' */ + case 0x9E: { /* '0x9E' */ return CALCommandType_REPLY } - case 0x9F: - { /* '0x9F' */ + case 0x9F: { /* '0x9F' */ return CALCommandType_REPLY } - case 0xA0: - { /* '0xA0' */ + case 0xA0: { /* '0xA0' */ return CALCommandType_WRITE } - case 0xA1: - { /* '0xA1' */ + case 0xA1: { /* '0xA1' */ return CALCommandType_WRITE } - case 0xA2: - { /* '0xA2' */ + case 0xA2: { /* '0xA2' */ return CALCommandType_WRITE } - case 0xA3: - { /* '0xA3' */ + case 0xA3: { /* '0xA3' */ return CALCommandType_WRITE } - case 0xA4: - { /* '0xA4' */ + case 0xA4: { /* '0xA4' */ return CALCommandType_WRITE } - case 0xA5: - { /* '0xA5' */ + case 0xA5: { /* '0xA5' */ return CALCommandType_WRITE } - case 0xA6: - { /* '0xA6' */ + case 0xA6: { /* '0xA6' */ return CALCommandType_WRITE } - case 0xA7: - { /* '0xA7' */ + case 0xA7: { /* '0xA7' */ return CALCommandType_WRITE } - case 0xA8: - { /* '0xA8' */ + case 0xA8: { /* '0xA8' */ return CALCommandType_WRITE } - case 0xA9: - { /* '0xA9' */ + case 0xA9: { /* '0xA9' */ return CALCommandType_WRITE } - case 0xAA: - { /* '0xAA' */ + case 0xAA: { /* '0xAA' */ return CALCommandType_WRITE } - case 0xAB: - { /* '0xAB' */ + case 0xAB: { /* '0xAB' */ return CALCommandType_WRITE } - case 0xAC: - { /* '0xAC' */ + case 0xAC: { /* '0xAC' */ return CALCommandType_WRITE } - case 0xAD: - { /* '0xAD' */ + case 0xAD: { /* '0xAD' */ return CALCommandType_WRITE } - case 0xAE: - { /* '0xAE' */ + case 0xAE: { /* '0xAE' */ return CALCommandType_WRITE } - case 0xAF: - { /* '0xAF' */ + case 0xAF: { /* '0xAF' */ return CALCommandType_WRITE } - case 0xC0: - { /* '0xC0' */ + case 0xC0: { /* '0xC0' */ return CALCommandType_STATUS } - case 0xC1: - { /* '0xC1' */ + case 0xC1: { /* '0xC1' */ return CALCommandType_STATUS } - case 0xC2: - { /* '0xC2' */ + case 0xC2: { /* '0xC2' */ return CALCommandType_STATUS } - case 0xC3: - { /* '0xC3' */ + case 0xC3: { /* '0xC3' */ return CALCommandType_STATUS } - case 0xC4: - { /* '0xC4' */ + case 0xC4: { /* '0xC4' */ return CALCommandType_STATUS } - case 0xC5: - { /* '0xC5' */ + case 0xC5: { /* '0xC5' */ return CALCommandType_STATUS } - case 0xC6: - { /* '0xC6' */ + case 0xC6: { /* '0xC6' */ return CALCommandType_STATUS } - case 0xC7: - { /* '0xC7' */ + case 0xC7: { /* '0xC7' */ return CALCommandType_STATUS } - case 0xC8: - { /* '0xC8' */ + case 0xC8: { /* '0xC8' */ return CALCommandType_STATUS } - case 0xC9: - { /* '0xC9' */ + case 0xC9: { /* '0xC9' */ return CALCommandType_STATUS } - case 0xCA: - { /* '0xCA' */ + case 0xCA: { /* '0xCA' */ return CALCommandType_STATUS } - case 0xCB: - { /* '0xCB' */ + case 0xCB: { /* '0xCB' */ return CALCommandType_STATUS } - case 0xCC: - { /* '0xCC' */ + case 0xCC: { /* '0xCC' */ return CALCommandType_STATUS } - case 0xCD: - { /* '0xCD' */ + case 0xCD: { /* '0xCD' */ return CALCommandType_STATUS } - case 0xCE: - { /* '0xCE' */ + case 0xCE: { /* '0xCE' */ return CALCommandType_STATUS } - case 0xCF: - { /* '0xCF' */ + case 0xCF: { /* '0xCF' */ return CALCommandType_STATUS } - case 0xD0: - { /* '0xD0' */ + case 0xD0: { /* '0xD0' */ return CALCommandType_STATUS } - case 0xD1: - { /* '0xD1' */ + case 0xD1: { /* '0xD1' */ return CALCommandType_STATUS } - case 0xD2: - { /* '0xD2' */ + case 0xD2: { /* '0xD2' */ return CALCommandType_STATUS } - case 0xD3: - { /* '0xD3' */ + case 0xD3: { /* '0xD3' */ return CALCommandType_STATUS } - case 0xD4: - { /* '0xD4' */ + case 0xD4: { /* '0xD4' */ return CALCommandType_STATUS } - case 0xD5: - { /* '0xD5' */ + case 0xD5: { /* '0xD5' */ return CALCommandType_STATUS } - case 0xD6: - { /* '0xD6' */ + case 0xD6: { /* '0xD6' */ return CALCommandType_STATUS } - case 0xD7: - { /* '0xD7' */ + case 0xD7: { /* '0xD7' */ return CALCommandType_STATUS } - case 0xD8: - { /* '0xD8' */ + case 0xD8: { /* '0xD8' */ return CALCommandType_STATUS } - case 0xD9: - { /* '0xD9' */ + case 0xD9: { /* '0xD9' */ return CALCommandType_STATUS } - case 0xDA: - { /* '0xDA' */ + case 0xDA: { /* '0xDA' */ return CALCommandType_STATUS } - case 0xDB: - { /* '0xDB' */ + case 0xDB: { /* '0xDB' */ return CALCommandType_STATUS } - case 0xDC: - { /* '0xDC' */ + case 0xDC: { /* '0xDC' */ return CALCommandType_STATUS } - case 0xDD: - { /* '0xDD' */ + case 0xDD: { /* '0xDD' */ return CALCommandType_STATUS } - case 0xDE: - { /* '0xDE' */ + case 0xDE: { /* '0xDE' */ return CALCommandType_STATUS } - case 0xDF: - { /* '0xDF' */ + case 0xDF: { /* '0xDF' */ return CALCommandType_STATUS } - case 0xE0: - { /* '0xE0' */ + case 0xE0: { /* '0xE0' */ return CALCommandType_STATUS_EXTENDED } - case 0xE1: - { /* '0xE1' */ + case 0xE1: { /* '0xE1' */ return CALCommandType_STATUS_EXTENDED } - case 0xE2: - { /* '0xE2' */ + case 0xE2: { /* '0xE2' */ return CALCommandType_STATUS_EXTENDED } - case 0xE3: - { /* '0xE3' */ + case 0xE3: { /* '0xE3' */ return CALCommandType_STATUS_EXTENDED } - case 0xE4: - { /* '0xE4' */ + case 0xE4: { /* '0xE4' */ return CALCommandType_STATUS_EXTENDED } - case 0xE5: - { /* '0xE5' */ + case 0xE5: { /* '0xE5' */ return CALCommandType_STATUS_EXTENDED } - case 0xE6: - { /* '0xE6' */ + case 0xE6: { /* '0xE6' */ return CALCommandType_STATUS_EXTENDED } - case 0xE7: - { /* '0xE7' */ + case 0xE7: { /* '0xE7' */ return CALCommandType_STATUS_EXTENDED } - case 0xE8: - { /* '0xE8' */ + case 0xE8: { /* '0xE8' */ return CALCommandType_STATUS_EXTENDED } - case 0xE9: - { /* '0xE9' */ + case 0xE9: { /* '0xE9' */ return CALCommandType_STATUS_EXTENDED } - case 0xEA: - { /* '0xEA' */ + case 0xEA: { /* '0xEA' */ return CALCommandType_STATUS_EXTENDED } - case 0xEB: - { /* '0xEB' */ + case 0xEB: { /* '0xEB' */ return CALCommandType_STATUS_EXTENDED } - case 0xEC: - { /* '0xEC' */ + case 0xEC: { /* '0xEC' */ return CALCommandType_STATUS_EXTENDED } - case 0xED: - { /* '0xED' */ + case 0xED: { /* '0xED' */ return CALCommandType_STATUS_EXTENDED } - case 0xEE: - { /* '0xEE' */ + case 0xEE: { /* '0xEE' */ return CALCommandType_STATUS_EXTENDED } - case 0xEF: - { /* '0xEF' */ + case 0xEF: { /* '0xEF' */ return CALCommandType_STATUS_EXTENDED } - case 0xF0: - { /* '0xF0' */ + case 0xF0: { /* '0xF0' */ return CALCommandType_STATUS_EXTENDED } - case 0xF1: - { /* '0xF1' */ + case 0xF1: { /* '0xF1' */ return CALCommandType_STATUS_EXTENDED } - case 0xF2: - { /* '0xF2' */ + case 0xF2: { /* '0xF2' */ return CALCommandType_STATUS_EXTENDED } - case 0xF3: - { /* '0xF3' */ + case 0xF3: { /* '0xF3' */ return CALCommandType_STATUS_EXTENDED } - case 0xF4: - { /* '0xF4' */ + case 0xF4: { /* '0xF4' */ return CALCommandType_STATUS_EXTENDED } - case 0xF5: - { /* '0xF5' */ + case 0xF5: { /* '0xF5' */ return CALCommandType_STATUS_EXTENDED } - case 0xF6: - { /* '0xF6' */ + case 0xF6: { /* '0xF6' */ return CALCommandType_STATUS_EXTENDED } - case 0xF7: - { /* '0xF7' */ + case 0xF7: { /* '0xF7' */ return CALCommandType_STATUS_EXTENDED } - case 0xF8: - { /* '0xF8' */ + case 0xF8: { /* '0xF8' */ return CALCommandType_STATUS_EXTENDED } - case 0xF9: - { /* '0xF9' */ + case 0xF9: { /* '0xF9' */ return CALCommandType_STATUS_EXTENDED } - case 0xFA: - { /* '0xFA' */ + case 0xFA: { /* '0xFA' */ return CALCommandType_STATUS_EXTENDED } - case 0xFB: - { /* '0xFB' */ + case 0xFB: { /* '0xFB' */ return CALCommandType_STATUS_EXTENDED } - case 0xFC: - { /* '0xFC' */ + case 0xFC: { /* '0xFC' */ return CALCommandType_STATUS_EXTENDED } - case 0xFD: - { /* '0xFD' */ + case 0xFD: { /* '0xFD' */ return CALCommandType_STATUS_EXTENDED } - case 0xFE: - { /* '0xFE' */ + case 0xFE: { /* '0xFE' */ return CALCommandType_STATUS_EXTENDED } - case 0xFF: - { /* '0xFF' */ + case 0xFF: { /* '0xFF' */ return CALCommandType_STATUS_EXTENDED } - default: - { + default: { return 0 } } @@ -1254,240 +1019,240 @@ func CALCommandTypeContainerFirstEnumForFieldCommandType(value CALCommandType) ( } func CALCommandTypeContainerByValue(value uint8) (enum CALCommandTypeContainer, ok bool) { switch value { - case 0x08: - return CALCommandTypeContainer_CALCommandReset, true - case 0x1A: - return CALCommandTypeContainer_CALCommandRecall, true - case 0x21: - return CALCommandTypeContainer_CALCommandIdentify, true - case 0x2A: - return CALCommandTypeContainer_CALCommandGetStatus, true - case 0x32: - return CALCommandTypeContainer_CALCommandAcknowledge, true - case 0x80: - return CALCommandTypeContainer_CALCommandReply_0Bytes, true - case 0x81: - return CALCommandTypeContainer_CALCommandReply_1Bytes, true - case 0x82: - return CALCommandTypeContainer_CALCommandReply_2Bytes, true - case 0x83: - return CALCommandTypeContainer_CALCommandReply_3Bytes, true - case 0x84: - return CALCommandTypeContainer_CALCommandReply_4Bytes, true - case 0x85: - return CALCommandTypeContainer_CALCommandReply_5Bytes, true - case 0x86: - return CALCommandTypeContainer_CALCommandReply_6Bytes, true - case 0x87: - return CALCommandTypeContainer_CALCommandReply_7Bytes, true - case 0x88: - return CALCommandTypeContainer_CALCommandReply_8Bytes, true - case 0x89: - return CALCommandTypeContainer_CALCommandReply_9Bytes, true - case 0x8A: - return CALCommandTypeContainer_CALCommandReply_10Bytes, true - case 0x8B: - return CALCommandTypeContainer_CALCommandReply_11Bytes, true - case 0x8C: - return CALCommandTypeContainer_CALCommandReply_12Bytes, true - case 0x8D: - return CALCommandTypeContainer_CALCommandReply_13Bytes, true - case 0x8E: - return CALCommandTypeContainer_CALCommandReply_14Bytes, true - case 0x8F: - return CALCommandTypeContainer_CALCommandReply_15Bytes, true - case 0x90: - return CALCommandTypeContainer_CALCommandReply_16Bytes, true - case 0x91: - return CALCommandTypeContainer_CALCommandReply_17Bytes, true - case 0x92: - return CALCommandTypeContainer_CALCommandReply_18Bytes, true - case 0x93: - return CALCommandTypeContainer_CALCommandReply_19Bytes, true - case 0x94: - return CALCommandTypeContainer_CALCommandReply_20Bytes, true - case 0x95: - return CALCommandTypeContainer_CALCommandReply_21Bytes, true - case 0x96: - return CALCommandTypeContainer_CALCommandReply_22Bytes, true - case 0x97: - return CALCommandTypeContainer_CALCommandReply_23Bytes, true - case 0x98: - return CALCommandTypeContainer_CALCommandReply_24Bytes, true - case 0x99: - return CALCommandTypeContainer_CALCommandReply_25Bytes, true - case 0x9A: - return CALCommandTypeContainer_CALCommandReply_26Bytes, true - case 0x9B: - return CALCommandTypeContainer_CALCommandReply_27Bytes, true - case 0x9C: - return CALCommandTypeContainer_CALCommandReply_28Bytes, true - case 0x9D: - return CALCommandTypeContainer_CALCommandReply_29Bytes, true - case 0x9E: - return CALCommandTypeContainer_CALCommandReply_30Bytes, true - case 0x9F: - return CALCommandTypeContainer_CALCommandReply_31Bytes, true - case 0xA0: - return CALCommandTypeContainer_CALCommandWrite_0Bytes, true - case 0xA1: - return CALCommandTypeContainer_CALCommandWrite_1Bytes, true - case 0xA2: - return CALCommandTypeContainer_CALCommandWrite_2Bytes, true - case 0xA3: - return CALCommandTypeContainer_CALCommandWrite_3Bytes, true - case 0xA4: - return CALCommandTypeContainer_CALCommandWrite_4Bytes, true - case 0xA5: - return CALCommandTypeContainer_CALCommandWrite_5Bytes, true - case 0xA6: - return CALCommandTypeContainer_CALCommandWrite_6Bytes, true - case 0xA7: - return CALCommandTypeContainer_CALCommandWrite_7Bytes, true - case 0xA8: - return CALCommandTypeContainer_CALCommandWrite_8Bytes, true - case 0xA9: - return CALCommandTypeContainer_CALCommandWrite_9Bytes, true - case 0xAA: - return CALCommandTypeContainer_CALCommandWrite_10Bytes, true - case 0xAB: - return CALCommandTypeContainer_CALCommandWrite_11Bytes, true - case 0xAC: - return CALCommandTypeContainer_CALCommandWrite_12Bytes, true - case 0xAD: - return CALCommandTypeContainer_CALCommandWrite_13Bytes, true - case 0xAE: - return CALCommandTypeContainer_CALCommandWrite_14Bytes, true - case 0xAF: - return CALCommandTypeContainer_CALCommandWrite_15Bytes, true - case 0xC0: - return CALCommandTypeContainer_CALCommandStatus_0Bytes, true - case 0xC1: - return CALCommandTypeContainer_CALCommandStatus_1Bytes, true - case 0xC2: - return CALCommandTypeContainer_CALCommandStatus_2Bytes, true - case 0xC3: - return CALCommandTypeContainer_CALCommandStatus_3Bytes, true - case 0xC4: - return CALCommandTypeContainer_CALCommandStatus_4Bytes, true - case 0xC5: - return CALCommandTypeContainer_CALCommandStatus_5Bytes, true - case 0xC6: - return CALCommandTypeContainer_CALCommandStatus_6Bytes, true - case 0xC7: - return CALCommandTypeContainer_CALCommandStatus_7Bytes, true - case 0xC8: - return CALCommandTypeContainer_CALCommandStatus_8Bytes, true - case 0xC9: - return CALCommandTypeContainer_CALCommandStatus_9Bytes, true - case 0xCA: - return CALCommandTypeContainer_CALCommandStatus_10Bytes, true - case 0xCB: - return CALCommandTypeContainer_CALCommandStatus_11Bytes, true - case 0xCC: - return CALCommandTypeContainer_CALCommandStatus_12Bytes, true - case 0xCD: - return CALCommandTypeContainer_CALCommandStatus_13Bytes, true - case 0xCE: - return CALCommandTypeContainer_CALCommandStatus_14Bytes, true - case 0xCF: - return CALCommandTypeContainer_CALCommandStatus_15Bytes, true - case 0xD0: - return CALCommandTypeContainer_CALCommandStatus_16Bytes, true - case 0xD1: - return CALCommandTypeContainer_CALCommandStatus_17Bytes, true - case 0xD2: - return CALCommandTypeContainer_CALCommandStatus_18Bytes, true - case 0xD3: - return CALCommandTypeContainer_CALCommandStatus_19Bytes, true - case 0xD4: - return CALCommandTypeContainer_CALCommandStatus_20Bytes, true - case 0xD5: - return CALCommandTypeContainer_CALCommandStatus_21Bytes, true - case 0xD6: - return CALCommandTypeContainer_CALCommandStatus_22Bytes, true - case 0xD7: - return CALCommandTypeContainer_CALCommandStatus_23Bytes, true - case 0xD8: - return CALCommandTypeContainer_CALCommandStatus_24Bytes, true - case 0xD9: - return CALCommandTypeContainer_CALCommandStatus_25Bytes, true - case 0xDA: - return CALCommandTypeContainer_CALCommandStatus_26Bytes, true - case 0xDB: - return CALCommandTypeContainer_CALCommandStatus_27Bytes, true - case 0xDC: - return CALCommandTypeContainer_CALCommandStatus_28Bytes, true - case 0xDD: - return CALCommandTypeContainer_CALCommandStatus_29Bytes, true - case 0xDE: - return CALCommandTypeContainer_CALCommandStatus_30Bytes, true - case 0xDF: - return CALCommandTypeContainer_CALCommandStatus_31Bytes, true - case 0xE0: - return CALCommandTypeContainer_CALCommandStatusExtended_0Bytes, true - case 0xE1: - return CALCommandTypeContainer_CALCommandStatusExtended_1Bytes, true - case 0xE2: - return CALCommandTypeContainer_CALCommandStatusExtended_2Bytes, true - case 0xE3: - return CALCommandTypeContainer_CALCommandStatusExtended_3Bytes, true - case 0xE4: - return CALCommandTypeContainer_CALCommandStatusExtended_4Bytes, true - case 0xE5: - return CALCommandTypeContainer_CALCommandStatusExtended_5Bytes, true - case 0xE6: - return CALCommandTypeContainer_CALCommandStatusExtended_6Bytes, true - case 0xE7: - return CALCommandTypeContainer_CALCommandStatusExtended_7Bytes, true - case 0xE8: - return CALCommandTypeContainer_CALCommandStatusExtended_8Bytes, true - case 0xE9: - return CALCommandTypeContainer_CALCommandStatusExtended_9Bytes, true - case 0xEA: - return CALCommandTypeContainer_CALCommandStatusExtended_10Bytes, true - case 0xEB: - return CALCommandTypeContainer_CALCommandStatusExtended_11Bytes, true - case 0xEC: - return CALCommandTypeContainer_CALCommandStatusExtended_12Bytes, true - case 0xED: - return CALCommandTypeContainer_CALCommandStatusExtended_13Bytes, true - case 0xEE: - return CALCommandTypeContainer_CALCommandStatusExtended_14Bytes, true - case 0xEF: - return CALCommandTypeContainer_CALCommandStatusExtended_15Bytes, true - case 0xF0: - return CALCommandTypeContainer_CALCommandStatusExtended_16Bytes, true - case 0xF1: - return CALCommandTypeContainer_CALCommandStatusExtended_17Bytes, true - case 0xF2: - return CALCommandTypeContainer_CALCommandStatusExtended_18Bytes, true - case 0xF3: - return CALCommandTypeContainer_CALCommandStatusExtended_19Bytes, true - case 0xF4: - return CALCommandTypeContainer_CALCommandStatusExtended_20Bytes, true - case 0xF5: - return CALCommandTypeContainer_CALCommandStatusExtended_21Bytes, true - case 0xF6: - return CALCommandTypeContainer_CALCommandStatusExtended_22Bytes, true - case 0xF7: - return CALCommandTypeContainer_CALCommandStatusExtended_23Bytes, true - case 0xF8: - return CALCommandTypeContainer_CALCommandStatusExtended_24Bytes, true - case 0xF9: - return CALCommandTypeContainer_CALCommandStatusExtended_25Bytes, true - case 0xFA: - return CALCommandTypeContainer_CALCommandStatusExtended_26Bytes, true - case 0xFB: - return CALCommandTypeContainer_CALCommandStatusExtended_27Bytes, true - case 0xFC: - return CALCommandTypeContainer_CALCommandStatusExtended_28Bytes, true - case 0xFD: - return CALCommandTypeContainer_CALCommandStatusExtended_29Bytes, true - case 0xFE: - return CALCommandTypeContainer_CALCommandStatusExtended_30Bytes, true - case 0xFF: - return CALCommandTypeContainer_CALCommandStatusExtended_31Bytes, true + case 0x08: + return CALCommandTypeContainer_CALCommandReset, true + case 0x1A: + return CALCommandTypeContainer_CALCommandRecall, true + case 0x21: + return CALCommandTypeContainer_CALCommandIdentify, true + case 0x2A: + return CALCommandTypeContainer_CALCommandGetStatus, true + case 0x32: + return CALCommandTypeContainer_CALCommandAcknowledge, true + case 0x80: + return CALCommandTypeContainer_CALCommandReply_0Bytes, true + case 0x81: + return CALCommandTypeContainer_CALCommandReply_1Bytes, true + case 0x82: + return CALCommandTypeContainer_CALCommandReply_2Bytes, true + case 0x83: + return CALCommandTypeContainer_CALCommandReply_3Bytes, true + case 0x84: + return CALCommandTypeContainer_CALCommandReply_4Bytes, true + case 0x85: + return CALCommandTypeContainer_CALCommandReply_5Bytes, true + case 0x86: + return CALCommandTypeContainer_CALCommandReply_6Bytes, true + case 0x87: + return CALCommandTypeContainer_CALCommandReply_7Bytes, true + case 0x88: + return CALCommandTypeContainer_CALCommandReply_8Bytes, true + case 0x89: + return CALCommandTypeContainer_CALCommandReply_9Bytes, true + case 0x8A: + return CALCommandTypeContainer_CALCommandReply_10Bytes, true + case 0x8B: + return CALCommandTypeContainer_CALCommandReply_11Bytes, true + case 0x8C: + return CALCommandTypeContainer_CALCommandReply_12Bytes, true + case 0x8D: + return CALCommandTypeContainer_CALCommandReply_13Bytes, true + case 0x8E: + return CALCommandTypeContainer_CALCommandReply_14Bytes, true + case 0x8F: + return CALCommandTypeContainer_CALCommandReply_15Bytes, true + case 0x90: + return CALCommandTypeContainer_CALCommandReply_16Bytes, true + case 0x91: + return CALCommandTypeContainer_CALCommandReply_17Bytes, true + case 0x92: + return CALCommandTypeContainer_CALCommandReply_18Bytes, true + case 0x93: + return CALCommandTypeContainer_CALCommandReply_19Bytes, true + case 0x94: + return CALCommandTypeContainer_CALCommandReply_20Bytes, true + case 0x95: + return CALCommandTypeContainer_CALCommandReply_21Bytes, true + case 0x96: + return CALCommandTypeContainer_CALCommandReply_22Bytes, true + case 0x97: + return CALCommandTypeContainer_CALCommandReply_23Bytes, true + case 0x98: + return CALCommandTypeContainer_CALCommandReply_24Bytes, true + case 0x99: + return CALCommandTypeContainer_CALCommandReply_25Bytes, true + case 0x9A: + return CALCommandTypeContainer_CALCommandReply_26Bytes, true + case 0x9B: + return CALCommandTypeContainer_CALCommandReply_27Bytes, true + case 0x9C: + return CALCommandTypeContainer_CALCommandReply_28Bytes, true + case 0x9D: + return CALCommandTypeContainer_CALCommandReply_29Bytes, true + case 0x9E: + return CALCommandTypeContainer_CALCommandReply_30Bytes, true + case 0x9F: + return CALCommandTypeContainer_CALCommandReply_31Bytes, true + case 0xA0: + return CALCommandTypeContainer_CALCommandWrite_0Bytes, true + case 0xA1: + return CALCommandTypeContainer_CALCommandWrite_1Bytes, true + case 0xA2: + return CALCommandTypeContainer_CALCommandWrite_2Bytes, true + case 0xA3: + return CALCommandTypeContainer_CALCommandWrite_3Bytes, true + case 0xA4: + return CALCommandTypeContainer_CALCommandWrite_4Bytes, true + case 0xA5: + return CALCommandTypeContainer_CALCommandWrite_5Bytes, true + case 0xA6: + return CALCommandTypeContainer_CALCommandWrite_6Bytes, true + case 0xA7: + return CALCommandTypeContainer_CALCommandWrite_7Bytes, true + case 0xA8: + return CALCommandTypeContainer_CALCommandWrite_8Bytes, true + case 0xA9: + return CALCommandTypeContainer_CALCommandWrite_9Bytes, true + case 0xAA: + return CALCommandTypeContainer_CALCommandWrite_10Bytes, true + case 0xAB: + return CALCommandTypeContainer_CALCommandWrite_11Bytes, true + case 0xAC: + return CALCommandTypeContainer_CALCommandWrite_12Bytes, true + case 0xAD: + return CALCommandTypeContainer_CALCommandWrite_13Bytes, true + case 0xAE: + return CALCommandTypeContainer_CALCommandWrite_14Bytes, true + case 0xAF: + return CALCommandTypeContainer_CALCommandWrite_15Bytes, true + case 0xC0: + return CALCommandTypeContainer_CALCommandStatus_0Bytes, true + case 0xC1: + return CALCommandTypeContainer_CALCommandStatus_1Bytes, true + case 0xC2: + return CALCommandTypeContainer_CALCommandStatus_2Bytes, true + case 0xC3: + return CALCommandTypeContainer_CALCommandStatus_3Bytes, true + case 0xC4: + return CALCommandTypeContainer_CALCommandStatus_4Bytes, true + case 0xC5: + return CALCommandTypeContainer_CALCommandStatus_5Bytes, true + case 0xC6: + return CALCommandTypeContainer_CALCommandStatus_6Bytes, true + case 0xC7: + return CALCommandTypeContainer_CALCommandStatus_7Bytes, true + case 0xC8: + return CALCommandTypeContainer_CALCommandStatus_8Bytes, true + case 0xC9: + return CALCommandTypeContainer_CALCommandStatus_9Bytes, true + case 0xCA: + return CALCommandTypeContainer_CALCommandStatus_10Bytes, true + case 0xCB: + return CALCommandTypeContainer_CALCommandStatus_11Bytes, true + case 0xCC: + return CALCommandTypeContainer_CALCommandStatus_12Bytes, true + case 0xCD: + return CALCommandTypeContainer_CALCommandStatus_13Bytes, true + case 0xCE: + return CALCommandTypeContainer_CALCommandStatus_14Bytes, true + case 0xCF: + return CALCommandTypeContainer_CALCommandStatus_15Bytes, true + case 0xD0: + return CALCommandTypeContainer_CALCommandStatus_16Bytes, true + case 0xD1: + return CALCommandTypeContainer_CALCommandStatus_17Bytes, true + case 0xD2: + return CALCommandTypeContainer_CALCommandStatus_18Bytes, true + case 0xD3: + return CALCommandTypeContainer_CALCommandStatus_19Bytes, true + case 0xD4: + return CALCommandTypeContainer_CALCommandStatus_20Bytes, true + case 0xD5: + return CALCommandTypeContainer_CALCommandStatus_21Bytes, true + case 0xD6: + return CALCommandTypeContainer_CALCommandStatus_22Bytes, true + case 0xD7: + return CALCommandTypeContainer_CALCommandStatus_23Bytes, true + case 0xD8: + return CALCommandTypeContainer_CALCommandStatus_24Bytes, true + case 0xD9: + return CALCommandTypeContainer_CALCommandStatus_25Bytes, true + case 0xDA: + return CALCommandTypeContainer_CALCommandStatus_26Bytes, true + case 0xDB: + return CALCommandTypeContainer_CALCommandStatus_27Bytes, true + case 0xDC: + return CALCommandTypeContainer_CALCommandStatus_28Bytes, true + case 0xDD: + return CALCommandTypeContainer_CALCommandStatus_29Bytes, true + case 0xDE: + return CALCommandTypeContainer_CALCommandStatus_30Bytes, true + case 0xDF: + return CALCommandTypeContainer_CALCommandStatus_31Bytes, true + case 0xE0: + return CALCommandTypeContainer_CALCommandStatusExtended_0Bytes, true + case 0xE1: + return CALCommandTypeContainer_CALCommandStatusExtended_1Bytes, true + case 0xE2: + return CALCommandTypeContainer_CALCommandStatusExtended_2Bytes, true + case 0xE3: + return CALCommandTypeContainer_CALCommandStatusExtended_3Bytes, true + case 0xE4: + return CALCommandTypeContainer_CALCommandStatusExtended_4Bytes, true + case 0xE5: + return CALCommandTypeContainer_CALCommandStatusExtended_5Bytes, true + case 0xE6: + return CALCommandTypeContainer_CALCommandStatusExtended_6Bytes, true + case 0xE7: + return CALCommandTypeContainer_CALCommandStatusExtended_7Bytes, true + case 0xE8: + return CALCommandTypeContainer_CALCommandStatusExtended_8Bytes, true + case 0xE9: + return CALCommandTypeContainer_CALCommandStatusExtended_9Bytes, true + case 0xEA: + return CALCommandTypeContainer_CALCommandStatusExtended_10Bytes, true + case 0xEB: + return CALCommandTypeContainer_CALCommandStatusExtended_11Bytes, true + case 0xEC: + return CALCommandTypeContainer_CALCommandStatusExtended_12Bytes, true + case 0xED: + return CALCommandTypeContainer_CALCommandStatusExtended_13Bytes, true + case 0xEE: + return CALCommandTypeContainer_CALCommandStatusExtended_14Bytes, true + case 0xEF: + return CALCommandTypeContainer_CALCommandStatusExtended_15Bytes, true + case 0xF0: + return CALCommandTypeContainer_CALCommandStatusExtended_16Bytes, true + case 0xF1: + return CALCommandTypeContainer_CALCommandStatusExtended_17Bytes, true + case 0xF2: + return CALCommandTypeContainer_CALCommandStatusExtended_18Bytes, true + case 0xF3: + return CALCommandTypeContainer_CALCommandStatusExtended_19Bytes, true + case 0xF4: + return CALCommandTypeContainer_CALCommandStatusExtended_20Bytes, true + case 0xF5: + return CALCommandTypeContainer_CALCommandStatusExtended_21Bytes, true + case 0xF6: + return CALCommandTypeContainer_CALCommandStatusExtended_22Bytes, true + case 0xF7: + return CALCommandTypeContainer_CALCommandStatusExtended_23Bytes, true + case 0xF8: + return CALCommandTypeContainer_CALCommandStatusExtended_24Bytes, true + case 0xF9: + return CALCommandTypeContainer_CALCommandStatusExtended_25Bytes, true + case 0xFA: + return CALCommandTypeContainer_CALCommandStatusExtended_26Bytes, true + case 0xFB: + return CALCommandTypeContainer_CALCommandStatusExtended_27Bytes, true + case 0xFC: + return CALCommandTypeContainer_CALCommandStatusExtended_28Bytes, true + case 0xFD: + return CALCommandTypeContainer_CALCommandStatusExtended_29Bytes, true + case 0xFE: + return CALCommandTypeContainer_CALCommandStatusExtended_30Bytes, true + case 0xFF: + return CALCommandTypeContainer_CALCommandStatusExtended_31Bytes, true } return 0, false } @@ -1732,13 +1497,13 @@ func CALCommandTypeContainerByName(value string) (enum CALCommandTypeContainer, return 0, false } -func CALCommandTypeContainerKnows(value uint8) bool { +func CALCommandTypeContainerKnows(value uint8) bool { for _, typeValue := range CALCommandTypeContainerValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastCALCommandTypeContainer(structType interface{}) CALCommandTypeContainer { @@ -2032,3 +1797,4 @@ func (e CALCommandTypeContainer) PLC4XEnumName() string { func (e CALCommandTypeContainer) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/CALData.go b/plc4go/protocols/cbus/readwrite/model/CALData.go index 85d0c927816..53b8ab7f911 100644 --- a/plc4go/protocols/cbus/readwrite/model/CALData.go +++ b/plc4go/protocols/cbus/readwrite/model/CALData.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CALData is the corresponding interface of CALData type CALData interface { @@ -52,8 +54,8 @@ type CALDataExactly interface { // _CALData is the data-structure of this message type _CALData struct { _CALDataChildRequirements - CommandTypeContainer CALCommandTypeContainer - AdditionalData CALData + CommandTypeContainer CALCommandTypeContainer + AdditionalData CALData // Arguments. RequestContext RequestContext @@ -64,6 +66,7 @@ type _CALDataChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type CALDataParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child CALData, serializeChildFunction func() error) error GetTypeName() string @@ -71,13 +74,12 @@ type CALDataParent interface { type CALDataChild interface { utils.Serializable - InitializeParent(parent CALData, commandTypeContainer CALCommandTypeContainer, additionalData CALData) +InitializeParent(parent CALData , commandTypeContainer CALCommandTypeContainer , additionalData CALData ) GetParent() *CALData GetTypeName() string CALData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -113,7 +115,7 @@ func (m *_CALData) GetSendIdentifyRequestBefore() bool { _ = ctx additionalData := m.AdditionalData _ = additionalData - return bool(utils.InlineIf(bool((m.RequestContext) != (nil)), func() interface{} { return bool(m.RequestContext.GetSendIdentifyRequestBefore()) }, func() interface{} { return bool(bool(false)) }).(bool)) + return bool(utils.InlineIf(bool((m.RequestContext) != (nil)), func() interface{} {return bool(m.RequestContext.GetSendIdentifyRequestBefore())}, func() interface{} {return bool(bool(false))}).(bool)) } /////////////////////// @@ -121,14 +123,15 @@ func (m *_CALData) GetSendIdentifyRequestBefore() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCALData factory function for _CALData -func NewCALData(commandTypeContainer CALCommandTypeContainer, additionalData CALData, requestContext RequestContext) *_CALData { - return &_CALData{CommandTypeContainer: commandTypeContainer, AdditionalData: additionalData, RequestContext: requestContext} +func NewCALData( commandTypeContainer CALCommandTypeContainer , additionalData CALData , requestContext RequestContext ) *_CALData { +return &_CALData{ CommandTypeContainer: commandTypeContainer , AdditionalData: additionalData , RequestContext: requestContext } } // Deprecated: use the interface for direct cast func CastCALData(structType interface{}) CALData { - if casted, ok := structType.(CALData); ok { + if casted, ok := structType.(CALData); ok { return casted } if casted, ok := structType.(*CALData); ok { @@ -141,6 +144,7 @@ func (m *_CALData) GetTypeName() string { return "CALData" } + func (m *_CALData) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -177,7 +181,7 @@ func CALDataParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, re _ = currentPos // Validation - if !(KnowsCALCommandTypeContainer(readBuffer)) { + if (!(KnowsCALCommandTypeContainer(readBuffer))) { return nil, errors.WithStack(utils.ParseAssertError{"no command type could be found"}) } @@ -185,7 +189,7 @@ func CALDataParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, re if pullErr := readBuffer.PullContext("commandTypeContainer"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for commandTypeContainer") } - _commandTypeContainer, _commandTypeContainerErr := CALCommandTypeContainerParseWithBuffer(ctx, readBuffer) +_commandTypeContainer, _commandTypeContainerErr := CALCommandTypeContainerParseWithBuffer(ctx, readBuffer) if _commandTypeContainerErr != nil { return nil, errors.Wrap(_commandTypeContainerErr, "Error parsing 'commandTypeContainer' field of CALData") } @@ -200,39 +204,39 @@ func CALDataParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, re _ = commandType // Virtual field - _sendIdentifyRequestBefore := utils.InlineIf(bool((requestContext) != (nil)), func() interface{} { return bool(requestContext.GetSendIdentifyRequestBefore()) }, func() interface{} { return bool(bool(false)) }).(bool) + _sendIdentifyRequestBefore := utils.InlineIf(bool((requestContext) != (nil)), func() interface{} {return bool(requestContext.GetSendIdentifyRequestBefore())}, func() interface{} {return bool(bool(false))}).(bool) sendIdentifyRequestBefore := bool(_sendIdentifyRequestBefore) _ = sendIdentifyRequestBefore // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type CALDataChildSerializeRequirement interface { CALData - InitializeParent(CALData, CALCommandTypeContainer, CALData) + InitializeParent(CALData, CALCommandTypeContainer, CALData) GetParent() CALData } var _childTemp interface{} var _child CALDataChildSerializeRequirement var typeSwitchError error switch { - case commandType == CALCommandType_RESET: // CALDataReset +case commandType == CALCommandType_RESET : // CALDataReset _childTemp, typeSwitchError = CALDataResetParseWithBuffer(ctx, readBuffer, requestContext) - case commandType == CALCommandType_RECALL: // CALDataRecall +case commandType == CALCommandType_RECALL : // CALDataRecall _childTemp, typeSwitchError = CALDataRecallParseWithBuffer(ctx, readBuffer, requestContext) - case commandType == CALCommandType_IDENTIFY: // CALDataIdentify +case commandType == CALCommandType_IDENTIFY : // CALDataIdentify _childTemp, typeSwitchError = CALDataIdentifyParseWithBuffer(ctx, readBuffer, requestContext) - case commandType == CALCommandType_GET_STATUS: // CALDataGetStatus +case commandType == CALCommandType_GET_STATUS : // CALDataGetStatus _childTemp, typeSwitchError = CALDataGetStatusParseWithBuffer(ctx, readBuffer, requestContext) - case commandType == CALCommandType_WRITE: // CALDataWrite +case commandType == CALCommandType_WRITE : // CALDataWrite _childTemp, typeSwitchError = CALDataWriteParseWithBuffer(ctx, readBuffer, commandTypeContainer, requestContext) - case commandType == CALCommandType_REPLY && sendIdentifyRequestBefore == bool(true): // CALDataIdentifyReply +case commandType == CALCommandType_REPLY && sendIdentifyRequestBefore == bool(true) : // CALDataIdentifyReply _childTemp, typeSwitchError = CALDataIdentifyReplyParseWithBuffer(ctx, readBuffer, commandTypeContainer, requestContext) - case commandType == CALCommandType_REPLY: // CALDataReply +case commandType == CALCommandType_REPLY : // CALDataReply _childTemp, typeSwitchError = CALDataReplyParseWithBuffer(ctx, readBuffer, commandTypeContainer, requestContext) - case commandType == CALCommandType_ACKNOWLEDGE: // CALDataAcknowledge +case commandType == CALCommandType_ACKNOWLEDGE : // CALDataAcknowledge _childTemp, typeSwitchError = CALDataAcknowledgeParseWithBuffer(ctx, readBuffer, requestContext) - case commandType == CALCommandType_STATUS: // CALDataStatus +case commandType == CALCommandType_STATUS : // CALDataStatus _childTemp, typeSwitchError = CALDataStatusParseWithBuffer(ctx, readBuffer, commandTypeContainer, requestContext) - case commandType == CALCommandType_STATUS_EXTENDED: // CALDataStatusExtended +case commandType == CALCommandType_STATUS_EXTENDED : // CALDataStatusExtended _childTemp, typeSwitchError = CALDataStatusExtendedParseWithBuffer(ctx, readBuffer, commandTypeContainer, requestContext) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [commandType=%v, sendIdentifyRequestBefore=%v]", commandType, sendIdentifyRequestBefore) @@ -244,12 +248,12 @@ func CALDataParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, re // Optional Field (additionalData) (Can be skipped, if a given expression evaluates to false) var additionalData CALData = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("additionalData"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for additionalData") } - _val, _err := CALDataParseWithBuffer(ctx, readBuffer, nil) +_val, _err := CALDataParseWithBuffer(ctx, readBuffer , nil ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -269,7 +273,7 @@ func CALDataParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, re } // Finish initializing - _child.InitializeParent(_child, commandTypeContainer, additionalData) +_child.InitializeParent(_child , commandTypeContainer , additionalData ) return _child, nil } @@ -279,7 +283,7 @@ func (pm *_CALData) SerializeParent(ctx context.Context, writeBuffer utils.Write _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("CALData"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("CALData"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for CALData") } @@ -330,13 +334,13 @@ func (pm *_CALData) SerializeParent(ctx context.Context, writeBuffer utils.Write return nil } + //// // Arguments Getter func (m *_CALData) GetRequestContext() RequestContext { return m.RequestContext } - // //// @@ -354,3 +358,6 @@ func (m *_CALData) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/CALDataAcknowledge.go b/plc4go/protocols/cbus/readwrite/model/CALDataAcknowledge.go index 66069abb213..d546da16971 100644 --- a/plc4go/protocols/cbus/readwrite/model/CALDataAcknowledge.go +++ b/plc4go/protocols/cbus/readwrite/model/CALDataAcknowledge.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CALDataAcknowledge is the corresponding interface of CALDataAcknowledge type CALDataAcknowledge interface { @@ -48,10 +50,12 @@ type CALDataAcknowledgeExactly interface { // _CALDataAcknowledge is the data-structure of this message type _CALDataAcknowledge struct { *_CALData - ParamNo Parameter - Code uint8 + ParamNo Parameter + Code uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -62,15 +66,13 @@ type _CALDataAcknowledge struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_CALDataAcknowledge) InitializeParent(parent CALData, commandTypeContainer CALCommandTypeContainer, additionalData CALData) { - m.CommandTypeContainer = commandTypeContainer +func (m *_CALDataAcknowledge) InitializeParent(parent CALData , commandTypeContainer CALCommandTypeContainer , additionalData CALData ) { m.CommandTypeContainer = commandTypeContainer m.AdditionalData = additionalData } -func (m *_CALDataAcknowledge) GetParent() CALData { +func (m *_CALDataAcknowledge) GetParent() CALData { return m._CALData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -89,12 +91,13 @@ func (m *_CALDataAcknowledge) GetCode() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCALDataAcknowledge factory function for _CALDataAcknowledge -func NewCALDataAcknowledge(paramNo Parameter, code uint8, commandTypeContainer CALCommandTypeContainer, additionalData CALData, requestContext RequestContext) *_CALDataAcknowledge { +func NewCALDataAcknowledge( paramNo Parameter , code uint8 , commandTypeContainer CALCommandTypeContainer , additionalData CALData , requestContext RequestContext ) *_CALDataAcknowledge { _result := &_CALDataAcknowledge{ - ParamNo: paramNo, - Code: code, - _CALData: NewCALData(commandTypeContainer, additionalData, requestContext), + ParamNo: paramNo, + Code: code, + _CALData: NewCALData(commandTypeContainer, additionalData, requestContext), } _result._CALData._CALDataChildRequirements = _result return _result @@ -102,7 +105,7 @@ func NewCALDataAcknowledge(paramNo Parameter, code uint8, commandTypeContainer C // Deprecated: use the interface for direct cast func CastCALDataAcknowledge(structType interface{}) CALDataAcknowledge { - if casted, ok := structType.(CALDataAcknowledge); ok { + if casted, ok := structType.(CALDataAcknowledge); ok { return casted } if casted, ok := structType.(*CALDataAcknowledge); ok { @@ -122,11 +125,12 @@ func (m *_CALDataAcknowledge) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += 8 // Simple field (code) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_CALDataAcknowledge) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -148,7 +152,7 @@ func CALDataAcknowledgeParseWithBuffer(ctx context.Context, readBuffer utils.Rea if pullErr := readBuffer.PullContext("paramNo"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for paramNo") } - _paramNo, _paramNoErr := ParameterParseWithBuffer(ctx, readBuffer) +_paramNo, _paramNoErr := ParameterParseWithBuffer(ctx, readBuffer) if _paramNoErr != nil { return nil, errors.Wrap(_paramNoErr, "Error parsing 'paramNo' field of CALDataAcknowledge") } @@ -158,7 +162,7 @@ func CALDataAcknowledgeParseWithBuffer(ctx context.Context, readBuffer utils.Rea } // Simple Field (code) - _code, _codeErr := readBuffer.ReadUint8("code", 8) +_code, _codeErr := readBuffer.ReadUint8("code", 8) if _codeErr != nil { return nil, errors.Wrap(_codeErr, "Error parsing 'code' field of CALDataAcknowledge") } @@ -174,7 +178,7 @@ func CALDataAcknowledgeParseWithBuffer(ctx context.Context, readBuffer utils.Rea RequestContext: requestContext, }, ParamNo: paramNo, - Code: code, + Code: code, } _child._CALData._CALDataChildRequirements = _child return _child, nil @@ -196,24 +200,24 @@ func (m *_CALDataAcknowledge) SerializeWithWriteBuffer(ctx context.Context, writ return errors.Wrap(pushErr, "Error pushing for CALDataAcknowledge") } - // Simple Field (paramNo) - if pushErr := writeBuffer.PushContext("paramNo"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for paramNo") - } - _paramNoErr := writeBuffer.WriteSerializable(ctx, m.GetParamNo()) - if popErr := writeBuffer.PopContext("paramNo"); popErr != nil { - return errors.Wrap(popErr, "Error popping for paramNo") - } - if _paramNoErr != nil { - return errors.Wrap(_paramNoErr, "Error serializing 'paramNo' field") - } + // Simple Field (paramNo) + if pushErr := writeBuffer.PushContext("paramNo"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for paramNo") + } + _paramNoErr := writeBuffer.WriteSerializable(ctx, m.GetParamNo()) + if popErr := writeBuffer.PopContext("paramNo"); popErr != nil { + return errors.Wrap(popErr, "Error popping for paramNo") + } + if _paramNoErr != nil { + return errors.Wrap(_paramNoErr, "Error serializing 'paramNo' field") + } - // Simple Field (code) - code := uint8(m.GetCode()) - _codeErr := writeBuffer.WriteUint8("code", 8, (code)) - if _codeErr != nil { - return errors.Wrap(_codeErr, "Error serializing 'code' field") - } + // Simple Field (code) + code := uint8(m.GetCode()) + _codeErr := writeBuffer.WriteUint8("code", 8, (code)) + if _codeErr != nil { + return errors.Wrap(_codeErr, "Error serializing 'code' field") + } if popErr := writeBuffer.PopContext("CALDataAcknowledge"); popErr != nil { return errors.Wrap(popErr, "Error popping for CALDataAcknowledge") @@ -223,6 +227,7 @@ func (m *_CALDataAcknowledge) SerializeWithWriteBuffer(ctx context.Context, writ return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_CALDataAcknowledge) isCALDataAcknowledge() bool { return true } @@ -237,3 +242,6 @@ func (m *_CALDataAcknowledge) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/CALDataGetStatus.go b/plc4go/protocols/cbus/readwrite/model/CALDataGetStatus.go index a44dde32d93..6f2a7971b2b 100644 --- a/plc4go/protocols/cbus/readwrite/model/CALDataGetStatus.go +++ b/plc4go/protocols/cbus/readwrite/model/CALDataGetStatus.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CALDataGetStatus is the corresponding interface of CALDataGetStatus type CALDataGetStatus interface { @@ -48,10 +50,12 @@ type CALDataGetStatusExactly interface { // _CALDataGetStatus is the data-structure of this message type _CALDataGetStatus struct { *_CALData - ParamNo Parameter - Count uint8 + ParamNo Parameter + Count uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -62,15 +66,13 @@ type _CALDataGetStatus struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_CALDataGetStatus) InitializeParent(parent CALData, commandTypeContainer CALCommandTypeContainer, additionalData CALData) { - m.CommandTypeContainer = commandTypeContainer +func (m *_CALDataGetStatus) InitializeParent(parent CALData , commandTypeContainer CALCommandTypeContainer , additionalData CALData ) { m.CommandTypeContainer = commandTypeContainer m.AdditionalData = additionalData } -func (m *_CALDataGetStatus) GetParent() CALData { +func (m *_CALDataGetStatus) GetParent() CALData { return m._CALData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -89,12 +91,13 @@ func (m *_CALDataGetStatus) GetCount() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCALDataGetStatus factory function for _CALDataGetStatus -func NewCALDataGetStatus(paramNo Parameter, count uint8, commandTypeContainer CALCommandTypeContainer, additionalData CALData, requestContext RequestContext) *_CALDataGetStatus { +func NewCALDataGetStatus( paramNo Parameter , count uint8 , commandTypeContainer CALCommandTypeContainer , additionalData CALData , requestContext RequestContext ) *_CALDataGetStatus { _result := &_CALDataGetStatus{ - ParamNo: paramNo, - Count: count, - _CALData: NewCALData(commandTypeContainer, additionalData, requestContext), + ParamNo: paramNo, + Count: count, + _CALData: NewCALData(commandTypeContainer, additionalData, requestContext), } _result._CALData._CALDataChildRequirements = _result return _result @@ -102,7 +105,7 @@ func NewCALDataGetStatus(paramNo Parameter, count uint8, commandTypeContainer CA // Deprecated: use the interface for direct cast func CastCALDataGetStatus(structType interface{}) CALDataGetStatus { - if casted, ok := structType.(CALDataGetStatus); ok { + if casted, ok := structType.(CALDataGetStatus); ok { return casted } if casted, ok := structType.(*CALDataGetStatus); ok { @@ -122,11 +125,12 @@ func (m *_CALDataGetStatus) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += 8 // Simple field (count) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_CALDataGetStatus) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -148,7 +152,7 @@ func CALDataGetStatusParseWithBuffer(ctx context.Context, readBuffer utils.ReadB if pullErr := readBuffer.PullContext("paramNo"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for paramNo") } - _paramNo, _paramNoErr := ParameterParseWithBuffer(ctx, readBuffer) +_paramNo, _paramNoErr := ParameterParseWithBuffer(ctx, readBuffer) if _paramNoErr != nil { return nil, errors.Wrap(_paramNoErr, "Error parsing 'paramNo' field of CALDataGetStatus") } @@ -158,7 +162,7 @@ func CALDataGetStatusParseWithBuffer(ctx context.Context, readBuffer utils.ReadB } // Simple Field (count) - _count, _countErr := readBuffer.ReadUint8("count", 8) +_count, _countErr := readBuffer.ReadUint8("count", 8) if _countErr != nil { return nil, errors.Wrap(_countErr, "Error parsing 'count' field of CALDataGetStatus") } @@ -174,7 +178,7 @@ func CALDataGetStatusParseWithBuffer(ctx context.Context, readBuffer utils.ReadB RequestContext: requestContext, }, ParamNo: paramNo, - Count: count, + Count: count, } _child._CALData._CALDataChildRequirements = _child return _child, nil @@ -196,24 +200,24 @@ func (m *_CALDataGetStatus) SerializeWithWriteBuffer(ctx context.Context, writeB return errors.Wrap(pushErr, "Error pushing for CALDataGetStatus") } - // Simple Field (paramNo) - if pushErr := writeBuffer.PushContext("paramNo"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for paramNo") - } - _paramNoErr := writeBuffer.WriteSerializable(ctx, m.GetParamNo()) - if popErr := writeBuffer.PopContext("paramNo"); popErr != nil { - return errors.Wrap(popErr, "Error popping for paramNo") - } - if _paramNoErr != nil { - return errors.Wrap(_paramNoErr, "Error serializing 'paramNo' field") - } + // Simple Field (paramNo) + if pushErr := writeBuffer.PushContext("paramNo"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for paramNo") + } + _paramNoErr := writeBuffer.WriteSerializable(ctx, m.GetParamNo()) + if popErr := writeBuffer.PopContext("paramNo"); popErr != nil { + return errors.Wrap(popErr, "Error popping for paramNo") + } + if _paramNoErr != nil { + return errors.Wrap(_paramNoErr, "Error serializing 'paramNo' field") + } - // Simple Field (count) - count := uint8(m.GetCount()) - _countErr := writeBuffer.WriteUint8("count", 8, (count)) - if _countErr != nil { - return errors.Wrap(_countErr, "Error serializing 'count' field") - } + // Simple Field (count) + count := uint8(m.GetCount()) + _countErr := writeBuffer.WriteUint8("count", 8, (count)) + if _countErr != nil { + return errors.Wrap(_countErr, "Error serializing 'count' field") + } if popErr := writeBuffer.PopContext("CALDataGetStatus"); popErr != nil { return errors.Wrap(popErr, "Error popping for CALDataGetStatus") @@ -223,6 +227,7 @@ func (m *_CALDataGetStatus) SerializeWithWriteBuffer(ctx context.Context, writeB return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_CALDataGetStatus) isCALDataGetStatus() bool { return true } @@ -237,3 +242,6 @@ func (m *_CALDataGetStatus) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/CALDataIdentify.go b/plc4go/protocols/cbus/readwrite/model/CALDataIdentify.go index d2b4c625a8a..687823dfcd1 100644 --- a/plc4go/protocols/cbus/readwrite/model/CALDataIdentify.go +++ b/plc4go/protocols/cbus/readwrite/model/CALDataIdentify.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CALDataIdentify is the corresponding interface of CALDataIdentify type CALDataIdentify interface { @@ -46,9 +48,11 @@ type CALDataIdentifyExactly interface { // _CALDataIdentify is the data-structure of this message type _CALDataIdentify struct { *_CALData - Attribute Attribute + Attribute Attribute } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,15 +63,13 @@ type _CALDataIdentify struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_CALDataIdentify) InitializeParent(parent CALData, commandTypeContainer CALCommandTypeContainer, additionalData CALData) { - m.CommandTypeContainer = commandTypeContainer +func (m *_CALDataIdentify) InitializeParent(parent CALData , commandTypeContainer CALCommandTypeContainer , additionalData CALData ) { m.CommandTypeContainer = commandTypeContainer m.AdditionalData = additionalData } -func (m *_CALDataIdentify) GetParent() CALData { +func (m *_CALDataIdentify) GetParent() CALData { return m._CALData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -82,11 +84,12 @@ func (m *_CALDataIdentify) GetAttribute() Attribute { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCALDataIdentify factory function for _CALDataIdentify -func NewCALDataIdentify(attribute Attribute, commandTypeContainer CALCommandTypeContainer, additionalData CALData, requestContext RequestContext) *_CALDataIdentify { +func NewCALDataIdentify( attribute Attribute , commandTypeContainer CALCommandTypeContainer , additionalData CALData , requestContext RequestContext ) *_CALDataIdentify { _result := &_CALDataIdentify{ Attribute: attribute, - _CALData: NewCALData(commandTypeContainer, additionalData, requestContext), + _CALData: NewCALData(commandTypeContainer, additionalData, requestContext), } _result._CALData._CALDataChildRequirements = _result return _result @@ -94,7 +97,7 @@ func NewCALDataIdentify(attribute Attribute, commandTypeContainer CALCommandType // Deprecated: use the interface for direct cast func CastCALDataIdentify(structType interface{}) CALDataIdentify { - if casted, ok := structType.(CALDataIdentify); ok { + if casted, ok := structType.(CALDataIdentify); ok { return casted } if casted, ok := structType.(*CALDataIdentify); ok { @@ -116,6 +119,7 @@ func (m *_CALDataIdentify) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_CALDataIdentify) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -137,7 +141,7 @@ func CALDataIdentifyParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu if pullErr := readBuffer.PullContext("attribute"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for attribute") } - _attribute, _attributeErr := AttributeParseWithBuffer(ctx, readBuffer) +_attribute, _attributeErr := AttributeParseWithBuffer(ctx, readBuffer) if _attributeErr != nil { return nil, errors.Wrap(_attributeErr, "Error parsing 'attribute' field of CALDataIdentify") } @@ -177,17 +181,17 @@ func (m *_CALDataIdentify) SerializeWithWriteBuffer(ctx context.Context, writeBu return errors.Wrap(pushErr, "Error pushing for CALDataIdentify") } - // Simple Field (attribute) - if pushErr := writeBuffer.PushContext("attribute"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for attribute") - } - _attributeErr := writeBuffer.WriteSerializable(ctx, m.GetAttribute()) - if popErr := writeBuffer.PopContext("attribute"); popErr != nil { - return errors.Wrap(popErr, "Error popping for attribute") - } - if _attributeErr != nil { - return errors.Wrap(_attributeErr, "Error serializing 'attribute' field") - } + // Simple Field (attribute) + if pushErr := writeBuffer.PushContext("attribute"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for attribute") + } + _attributeErr := writeBuffer.WriteSerializable(ctx, m.GetAttribute()) + if popErr := writeBuffer.PopContext("attribute"); popErr != nil { + return errors.Wrap(popErr, "Error popping for attribute") + } + if _attributeErr != nil { + return errors.Wrap(_attributeErr, "Error serializing 'attribute' field") + } if popErr := writeBuffer.PopContext("CALDataIdentify"); popErr != nil { return errors.Wrap(popErr, "Error popping for CALDataIdentify") @@ -197,6 +201,7 @@ func (m *_CALDataIdentify) SerializeWithWriteBuffer(ctx context.Context, writeBu return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_CALDataIdentify) isCALDataIdentify() bool { return true } @@ -211,3 +216,6 @@ func (m *_CALDataIdentify) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/CALDataIdentifyReply.go b/plc4go/protocols/cbus/readwrite/model/CALDataIdentifyReply.go index a199d57b078..ee42637c090 100644 --- a/plc4go/protocols/cbus/readwrite/model/CALDataIdentifyReply.go +++ b/plc4go/protocols/cbus/readwrite/model/CALDataIdentifyReply.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CALDataIdentifyReply is the corresponding interface of CALDataIdentifyReply type CALDataIdentifyReply interface { @@ -48,10 +50,12 @@ type CALDataIdentifyReplyExactly interface { // _CALDataIdentifyReply is the data-structure of this message type _CALDataIdentifyReply struct { *_CALData - Attribute Attribute - IdentifyReplyCommand IdentifyReplyCommand + Attribute Attribute + IdentifyReplyCommand IdentifyReplyCommand } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -62,15 +66,13 @@ type _CALDataIdentifyReply struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_CALDataIdentifyReply) InitializeParent(parent CALData, commandTypeContainer CALCommandTypeContainer, additionalData CALData) { - m.CommandTypeContainer = commandTypeContainer +func (m *_CALDataIdentifyReply) InitializeParent(parent CALData , commandTypeContainer CALCommandTypeContainer , additionalData CALData ) { m.CommandTypeContainer = commandTypeContainer m.AdditionalData = additionalData } -func (m *_CALDataIdentifyReply) GetParent() CALData { +func (m *_CALDataIdentifyReply) GetParent() CALData { return m._CALData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -89,12 +91,13 @@ func (m *_CALDataIdentifyReply) GetIdentifyReplyCommand() IdentifyReplyCommand { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCALDataIdentifyReply factory function for _CALDataIdentifyReply -func NewCALDataIdentifyReply(attribute Attribute, identifyReplyCommand IdentifyReplyCommand, commandTypeContainer CALCommandTypeContainer, additionalData CALData, requestContext RequestContext) *_CALDataIdentifyReply { +func NewCALDataIdentifyReply( attribute Attribute , identifyReplyCommand IdentifyReplyCommand , commandTypeContainer CALCommandTypeContainer , additionalData CALData , requestContext RequestContext ) *_CALDataIdentifyReply { _result := &_CALDataIdentifyReply{ - Attribute: attribute, + Attribute: attribute, IdentifyReplyCommand: identifyReplyCommand, - _CALData: NewCALData(commandTypeContainer, additionalData, requestContext), + _CALData: NewCALData(commandTypeContainer, additionalData, requestContext), } _result._CALData._CALDataChildRequirements = _result return _result @@ -102,7 +105,7 @@ func NewCALDataIdentifyReply(attribute Attribute, identifyReplyCommand IdentifyR // Deprecated: use the interface for direct cast func CastCALDataIdentifyReply(structType interface{}) CALDataIdentifyReply { - if casted, ok := structType.(CALDataIdentifyReply); ok { + if casted, ok := structType.(CALDataIdentifyReply); ok { return casted } if casted, ok := structType.(*CALDataIdentifyReply); ok { @@ -127,6 +130,7 @@ func (m *_CALDataIdentifyReply) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_CALDataIdentifyReply) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -148,7 +152,7 @@ func CALDataIdentifyReplyParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("attribute"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for attribute") } - _attribute, _attributeErr := AttributeParseWithBuffer(ctx, readBuffer) +_attribute, _attributeErr := AttributeParseWithBuffer(ctx, readBuffer) if _attributeErr != nil { return nil, errors.Wrap(_attributeErr, "Error parsing 'attribute' field of CALDataIdentifyReply") } @@ -161,7 +165,7 @@ func CALDataIdentifyReplyParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("identifyReplyCommand"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for identifyReplyCommand") } - _identifyReplyCommand, _identifyReplyCommandErr := IdentifyReplyCommandParseWithBuffer(ctx, readBuffer, Attribute(attribute), uint8(uint8(commandTypeContainer.NumBytes())-uint8(uint8(1)))) +_identifyReplyCommand, _identifyReplyCommandErr := IdentifyReplyCommandParseWithBuffer(ctx, readBuffer , Attribute( attribute ) , uint8( uint8(commandTypeContainer.NumBytes()) - uint8(uint8(1)) ) ) if _identifyReplyCommandErr != nil { return nil, errors.Wrap(_identifyReplyCommandErr, "Error parsing 'identifyReplyCommand' field of CALDataIdentifyReply") } @@ -179,7 +183,7 @@ func CALDataIdentifyReplyParseWithBuffer(ctx context.Context, readBuffer utils.R _CALData: &_CALData{ RequestContext: requestContext, }, - Attribute: attribute, + Attribute: attribute, IdentifyReplyCommand: identifyReplyCommand, } _child._CALData._CALDataChildRequirements = _child @@ -202,29 +206,29 @@ func (m *_CALDataIdentifyReply) SerializeWithWriteBuffer(ctx context.Context, wr return errors.Wrap(pushErr, "Error pushing for CALDataIdentifyReply") } - // Simple Field (attribute) - if pushErr := writeBuffer.PushContext("attribute"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for attribute") - } - _attributeErr := writeBuffer.WriteSerializable(ctx, m.GetAttribute()) - if popErr := writeBuffer.PopContext("attribute"); popErr != nil { - return errors.Wrap(popErr, "Error popping for attribute") - } - if _attributeErr != nil { - return errors.Wrap(_attributeErr, "Error serializing 'attribute' field") - } + // Simple Field (attribute) + if pushErr := writeBuffer.PushContext("attribute"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for attribute") + } + _attributeErr := writeBuffer.WriteSerializable(ctx, m.GetAttribute()) + if popErr := writeBuffer.PopContext("attribute"); popErr != nil { + return errors.Wrap(popErr, "Error popping for attribute") + } + if _attributeErr != nil { + return errors.Wrap(_attributeErr, "Error serializing 'attribute' field") + } - // Simple Field (identifyReplyCommand) - if pushErr := writeBuffer.PushContext("identifyReplyCommand"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for identifyReplyCommand") - } - _identifyReplyCommandErr := writeBuffer.WriteSerializable(ctx, m.GetIdentifyReplyCommand()) - if popErr := writeBuffer.PopContext("identifyReplyCommand"); popErr != nil { - return errors.Wrap(popErr, "Error popping for identifyReplyCommand") - } - if _identifyReplyCommandErr != nil { - return errors.Wrap(_identifyReplyCommandErr, "Error serializing 'identifyReplyCommand' field") - } + // Simple Field (identifyReplyCommand) + if pushErr := writeBuffer.PushContext("identifyReplyCommand"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for identifyReplyCommand") + } + _identifyReplyCommandErr := writeBuffer.WriteSerializable(ctx, m.GetIdentifyReplyCommand()) + if popErr := writeBuffer.PopContext("identifyReplyCommand"); popErr != nil { + return errors.Wrap(popErr, "Error popping for identifyReplyCommand") + } + if _identifyReplyCommandErr != nil { + return errors.Wrap(_identifyReplyCommandErr, "Error serializing 'identifyReplyCommand' field") + } if popErr := writeBuffer.PopContext("CALDataIdentifyReply"); popErr != nil { return errors.Wrap(popErr, "Error popping for CALDataIdentifyReply") @@ -234,6 +238,7 @@ func (m *_CALDataIdentifyReply) SerializeWithWriteBuffer(ctx context.Context, wr return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_CALDataIdentifyReply) isCALDataIdentifyReply() bool { return true } @@ -248,3 +253,6 @@ func (m *_CALDataIdentifyReply) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/CALDataRecall.go b/plc4go/protocols/cbus/readwrite/model/CALDataRecall.go index 9998c556ae3..0d2e976ca89 100644 --- a/plc4go/protocols/cbus/readwrite/model/CALDataRecall.go +++ b/plc4go/protocols/cbus/readwrite/model/CALDataRecall.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CALDataRecall is the corresponding interface of CALDataRecall type CALDataRecall interface { @@ -48,10 +50,12 @@ type CALDataRecallExactly interface { // _CALDataRecall is the data-structure of this message type _CALDataRecall struct { *_CALData - ParamNo Parameter - Count uint8 + ParamNo Parameter + Count uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -62,15 +66,13 @@ type _CALDataRecall struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_CALDataRecall) InitializeParent(parent CALData, commandTypeContainer CALCommandTypeContainer, additionalData CALData) { - m.CommandTypeContainer = commandTypeContainer +func (m *_CALDataRecall) InitializeParent(parent CALData , commandTypeContainer CALCommandTypeContainer , additionalData CALData ) { m.CommandTypeContainer = commandTypeContainer m.AdditionalData = additionalData } -func (m *_CALDataRecall) GetParent() CALData { +func (m *_CALDataRecall) GetParent() CALData { return m._CALData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -89,12 +91,13 @@ func (m *_CALDataRecall) GetCount() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCALDataRecall factory function for _CALDataRecall -func NewCALDataRecall(paramNo Parameter, count uint8, commandTypeContainer CALCommandTypeContainer, additionalData CALData, requestContext RequestContext) *_CALDataRecall { +func NewCALDataRecall( paramNo Parameter , count uint8 , commandTypeContainer CALCommandTypeContainer , additionalData CALData , requestContext RequestContext ) *_CALDataRecall { _result := &_CALDataRecall{ - ParamNo: paramNo, - Count: count, - _CALData: NewCALData(commandTypeContainer, additionalData, requestContext), + ParamNo: paramNo, + Count: count, + _CALData: NewCALData(commandTypeContainer, additionalData, requestContext), } _result._CALData._CALDataChildRequirements = _result return _result @@ -102,7 +105,7 @@ func NewCALDataRecall(paramNo Parameter, count uint8, commandTypeContainer CALCo // Deprecated: use the interface for direct cast func CastCALDataRecall(structType interface{}) CALDataRecall { - if casted, ok := structType.(CALDataRecall); ok { + if casted, ok := structType.(CALDataRecall); ok { return casted } if casted, ok := structType.(*CALDataRecall); ok { @@ -122,11 +125,12 @@ func (m *_CALDataRecall) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += 8 // Simple field (count) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_CALDataRecall) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -148,7 +152,7 @@ func CALDataRecallParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff if pullErr := readBuffer.PullContext("paramNo"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for paramNo") } - _paramNo, _paramNoErr := ParameterParseWithBuffer(ctx, readBuffer) +_paramNo, _paramNoErr := ParameterParseWithBuffer(ctx, readBuffer) if _paramNoErr != nil { return nil, errors.Wrap(_paramNoErr, "Error parsing 'paramNo' field of CALDataRecall") } @@ -158,7 +162,7 @@ func CALDataRecallParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff } // Simple Field (count) - _count, _countErr := readBuffer.ReadUint8("count", 8) +_count, _countErr := readBuffer.ReadUint8("count", 8) if _countErr != nil { return nil, errors.Wrap(_countErr, "Error parsing 'count' field of CALDataRecall") } @@ -174,7 +178,7 @@ func CALDataRecallParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff RequestContext: requestContext, }, ParamNo: paramNo, - Count: count, + Count: count, } _child._CALData._CALDataChildRequirements = _child return _child, nil @@ -196,24 +200,24 @@ func (m *_CALDataRecall) SerializeWithWriteBuffer(ctx context.Context, writeBuff return errors.Wrap(pushErr, "Error pushing for CALDataRecall") } - // Simple Field (paramNo) - if pushErr := writeBuffer.PushContext("paramNo"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for paramNo") - } - _paramNoErr := writeBuffer.WriteSerializable(ctx, m.GetParamNo()) - if popErr := writeBuffer.PopContext("paramNo"); popErr != nil { - return errors.Wrap(popErr, "Error popping for paramNo") - } - if _paramNoErr != nil { - return errors.Wrap(_paramNoErr, "Error serializing 'paramNo' field") - } + // Simple Field (paramNo) + if pushErr := writeBuffer.PushContext("paramNo"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for paramNo") + } + _paramNoErr := writeBuffer.WriteSerializable(ctx, m.GetParamNo()) + if popErr := writeBuffer.PopContext("paramNo"); popErr != nil { + return errors.Wrap(popErr, "Error popping for paramNo") + } + if _paramNoErr != nil { + return errors.Wrap(_paramNoErr, "Error serializing 'paramNo' field") + } - // Simple Field (count) - count := uint8(m.GetCount()) - _countErr := writeBuffer.WriteUint8("count", 8, (count)) - if _countErr != nil { - return errors.Wrap(_countErr, "Error serializing 'count' field") - } + // Simple Field (count) + count := uint8(m.GetCount()) + _countErr := writeBuffer.WriteUint8("count", 8, (count)) + if _countErr != nil { + return errors.Wrap(_countErr, "Error serializing 'count' field") + } if popErr := writeBuffer.PopContext("CALDataRecall"); popErr != nil { return errors.Wrap(popErr, "Error popping for CALDataRecall") @@ -223,6 +227,7 @@ func (m *_CALDataRecall) SerializeWithWriteBuffer(ctx context.Context, writeBuff return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_CALDataRecall) isCALDataRecall() bool { return true } @@ -237,3 +242,6 @@ func (m *_CALDataRecall) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/CALDataReply.go b/plc4go/protocols/cbus/readwrite/model/CALDataReply.go index c69b29e9c17..4cf3809304e 100644 --- a/plc4go/protocols/cbus/readwrite/model/CALDataReply.go +++ b/plc4go/protocols/cbus/readwrite/model/CALDataReply.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CALDataReply is the corresponding interface of CALDataReply type CALDataReply interface { @@ -48,10 +50,12 @@ type CALDataReplyExactly interface { // _CALDataReply is the data-structure of this message type _CALDataReply struct { *_CALData - ParamNo Parameter - ParameterValue ParameterValue + ParamNo Parameter + ParameterValue ParameterValue } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -62,15 +66,13 @@ type _CALDataReply struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_CALDataReply) InitializeParent(parent CALData, commandTypeContainer CALCommandTypeContainer, additionalData CALData) { - m.CommandTypeContainer = commandTypeContainer +func (m *_CALDataReply) InitializeParent(parent CALData , commandTypeContainer CALCommandTypeContainer , additionalData CALData ) { m.CommandTypeContainer = commandTypeContainer m.AdditionalData = additionalData } -func (m *_CALDataReply) GetParent() CALData { +func (m *_CALDataReply) GetParent() CALData { return m._CALData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -89,12 +91,13 @@ func (m *_CALDataReply) GetParameterValue() ParameterValue { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCALDataReply factory function for _CALDataReply -func NewCALDataReply(paramNo Parameter, parameterValue ParameterValue, commandTypeContainer CALCommandTypeContainer, additionalData CALData, requestContext RequestContext) *_CALDataReply { +func NewCALDataReply( paramNo Parameter , parameterValue ParameterValue , commandTypeContainer CALCommandTypeContainer , additionalData CALData , requestContext RequestContext ) *_CALDataReply { _result := &_CALDataReply{ - ParamNo: paramNo, + ParamNo: paramNo, ParameterValue: parameterValue, - _CALData: NewCALData(commandTypeContainer, additionalData, requestContext), + _CALData: NewCALData(commandTypeContainer, additionalData, requestContext), } _result._CALData._CALDataChildRequirements = _result return _result @@ -102,7 +105,7 @@ func NewCALDataReply(paramNo Parameter, parameterValue ParameterValue, commandTy // Deprecated: use the interface for direct cast func CastCALDataReply(structType interface{}) CALDataReply { - if casted, ok := structType.(CALDataReply); ok { + if casted, ok := structType.(CALDataReply); ok { return casted } if casted, ok := structType.(*CALDataReply); ok { @@ -127,6 +130,7 @@ func (m *_CALDataReply) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_CALDataReply) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -148,7 +152,7 @@ func CALDataReplyParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe if pullErr := readBuffer.PullContext("paramNo"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for paramNo") } - _paramNo, _paramNoErr := ParameterParseWithBuffer(ctx, readBuffer) +_paramNo, _paramNoErr := ParameterParseWithBuffer(ctx, readBuffer) if _paramNoErr != nil { return nil, errors.Wrap(_paramNoErr, "Error parsing 'paramNo' field of CALDataReply") } @@ -161,7 +165,7 @@ func CALDataReplyParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe if pullErr := readBuffer.PullContext("parameterValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for parameterValue") } - _parameterValue, _parameterValueErr := ParameterValueParseWithBuffer(ctx, readBuffer, ParameterType(paramNo.ParameterType()), uint8(uint8(commandTypeContainer.NumBytes())-uint8(uint8(1)))) +_parameterValue, _parameterValueErr := ParameterValueParseWithBuffer(ctx, readBuffer , ParameterType( paramNo.ParameterType() ) , uint8( uint8(commandTypeContainer.NumBytes()) - uint8(uint8(1)) ) ) if _parameterValueErr != nil { return nil, errors.Wrap(_parameterValueErr, "Error parsing 'parameterValue' field of CALDataReply") } @@ -179,7 +183,7 @@ func CALDataReplyParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe _CALData: &_CALData{ RequestContext: requestContext, }, - ParamNo: paramNo, + ParamNo: paramNo, ParameterValue: parameterValue, } _child._CALData._CALDataChildRequirements = _child @@ -202,29 +206,29 @@ func (m *_CALDataReply) SerializeWithWriteBuffer(ctx context.Context, writeBuffe return errors.Wrap(pushErr, "Error pushing for CALDataReply") } - // Simple Field (paramNo) - if pushErr := writeBuffer.PushContext("paramNo"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for paramNo") - } - _paramNoErr := writeBuffer.WriteSerializable(ctx, m.GetParamNo()) - if popErr := writeBuffer.PopContext("paramNo"); popErr != nil { - return errors.Wrap(popErr, "Error popping for paramNo") - } - if _paramNoErr != nil { - return errors.Wrap(_paramNoErr, "Error serializing 'paramNo' field") - } + // Simple Field (paramNo) + if pushErr := writeBuffer.PushContext("paramNo"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for paramNo") + } + _paramNoErr := writeBuffer.WriteSerializable(ctx, m.GetParamNo()) + if popErr := writeBuffer.PopContext("paramNo"); popErr != nil { + return errors.Wrap(popErr, "Error popping for paramNo") + } + if _paramNoErr != nil { + return errors.Wrap(_paramNoErr, "Error serializing 'paramNo' field") + } - // Simple Field (parameterValue) - if pushErr := writeBuffer.PushContext("parameterValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for parameterValue") - } - _parameterValueErr := writeBuffer.WriteSerializable(ctx, m.GetParameterValue()) - if popErr := writeBuffer.PopContext("parameterValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for parameterValue") - } - if _parameterValueErr != nil { - return errors.Wrap(_parameterValueErr, "Error serializing 'parameterValue' field") - } + // Simple Field (parameterValue) + if pushErr := writeBuffer.PushContext("parameterValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for parameterValue") + } + _parameterValueErr := writeBuffer.WriteSerializable(ctx, m.GetParameterValue()) + if popErr := writeBuffer.PopContext("parameterValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for parameterValue") + } + if _parameterValueErr != nil { + return errors.Wrap(_parameterValueErr, "Error serializing 'parameterValue' field") + } if popErr := writeBuffer.PopContext("CALDataReply"); popErr != nil { return errors.Wrap(popErr, "Error popping for CALDataReply") @@ -234,6 +238,7 @@ func (m *_CALDataReply) SerializeWithWriteBuffer(ctx context.Context, writeBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_CALDataReply) isCALDataReply() bool { return true } @@ -248,3 +253,6 @@ func (m *_CALDataReply) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/CALDataReset.go b/plc4go/protocols/cbus/readwrite/model/CALDataReset.go index 94f17d83b7a..21e2cc793b1 100644 --- a/plc4go/protocols/cbus/readwrite/model/CALDataReset.go +++ b/plc4go/protocols/cbus/readwrite/model/CALDataReset.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CALDataReset is the corresponding interface of CALDataReset type CALDataReset interface { @@ -46,6 +48,8 @@ type _CALDataReset struct { *_CALData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,19 +60,19 @@ type _CALDataReset struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_CALDataReset) InitializeParent(parent CALData, commandTypeContainer CALCommandTypeContainer, additionalData CALData) { - m.CommandTypeContainer = commandTypeContainer +func (m *_CALDataReset) InitializeParent(parent CALData , commandTypeContainer CALCommandTypeContainer , additionalData CALData ) { m.CommandTypeContainer = commandTypeContainer m.AdditionalData = additionalData } -func (m *_CALDataReset) GetParent() CALData { +func (m *_CALDataReset) GetParent() CALData { return m._CALData } + // NewCALDataReset factory function for _CALDataReset -func NewCALDataReset(commandTypeContainer CALCommandTypeContainer, additionalData CALData, requestContext RequestContext) *_CALDataReset { +func NewCALDataReset( commandTypeContainer CALCommandTypeContainer , additionalData CALData , requestContext RequestContext ) *_CALDataReset { _result := &_CALDataReset{ - _CALData: NewCALData(commandTypeContainer, additionalData, requestContext), + _CALData: NewCALData(commandTypeContainer, additionalData, requestContext), } _result._CALData._CALDataChildRequirements = _result return _result @@ -76,7 +80,7 @@ func NewCALDataReset(commandTypeContainer CALCommandTypeContainer, additionalDat // Deprecated: use the interface for direct cast func CastCALDataReset(structType interface{}) CALDataReset { - if casted, ok := structType.(CALDataReset); ok { + if casted, ok := structType.(CALDataReset); ok { return casted } if casted, ok := structType.(*CALDataReset); ok { @@ -95,6 +99,7 @@ func (m *_CALDataReset) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_CALDataReset) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -150,6 +155,7 @@ func (m *_CALDataReset) SerializeWithWriteBuffer(ctx context.Context, writeBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_CALDataReset) isCALDataReset() bool { return true } @@ -164,3 +170,6 @@ func (m *_CALDataReset) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/CALDataStatus.go b/plc4go/protocols/cbus/readwrite/model/CALDataStatus.go index 9ea02220ab0..90a3b159db1 100644 --- a/plc4go/protocols/cbus/readwrite/model/CALDataStatus.go +++ b/plc4go/protocols/cbus/readwrite/model/CALDataStatus.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CALDataStatus is the corresponding interface of CALDataStatus type CALDataStatus interface { @@ -51,11 +53,13 @@ type CALDataStatusExactly interface { // _CALDataStatus is the data-structure of this message type _CALDataStatus struct { *_CALData - Application ApplicationIdContainer - BlockStart uint8 - StatusBytes []StatusByte + Application ApplicationIdContainer + BlockStart uint8 + StatusBytes []StatusByte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -66,15 +70,13 @@ type _CALDataStatus struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_CALDataStatus) InitializeParent(parent CALData, commandTypeContainer CALCommandTypeContainer, additionalData CALData) { - m.CommandTypeContainer = commandTypeContainer +func (m *_CALDataStatus) InitializeParent(parent CALData , commandTypeContainer CALCommandTypeContainer , additionalData CALData ) { m.CommandTypeContainer = commandTypeContainer m.AdditionalData = additionalData } -func (m *_CALDataStatus) GetParent() CALData { +func (m *_CALDataStatus) GetParent() CALData { return m._CALData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -97,13 +99,14 @@ func (m *_CALDataStatus) GetStatusBytes() []StatusByte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCALDataStatus factory function for _CALDataStatus -func NewCALDataStatus(application ApplicationIdContainer, blockStart uint8, statusBytes []StatusByte, commandTypeContainer CALCommandTypeContainer, additionalData CALData, requestContext RequestContext) *_CALDataStatus { +func NewCALDataStatus( application ApplicationIdContainer , blockStart uint8 , statusBytes []StatusByte , commandTypeContainer CALCommandTypeContainer , additionalData CALData , requestContext RequestContext ) *_CALDataStatus { _result := &_CALDataStatus{ Application: application, - BlockStart: blockStart, + BlockStart: blockStart, StatusBytes: statusBytes, - _CALData: NewCALData(commandTypeContainer, additionalData, requestContext), + _CALData: NewCALData(commandTypeContainer, additionalData, requestContext), } _result._CALData._CALDataChildRequirements = _result return _result @@ -111,7 +114,7 @@ func NewCALDataStatus(application ApplicationIdContainer, blockStart uint8, stat // Deprecated: use the interface for direct cast func CastCALDataStatus(structType interface{}) CALDataStatus { - if casted, ok := structType.(CALDataStatus); ok { + if casted, ok := structType.(CALDataStatus); ok { return casted } if casted, ok := structType.(*CALDataStatus); ok { @@ -131,7 +134,7 @@ func (m *_CALDataStatus) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += 8 // Simple field (blockStart) - lengthInBits += 8 + lengthInBits += 8; // Array field if len(m.StatusBytes) > 0 { @@ -139,13 +142,14 @@ func (m *_CALDataStatus) GetLengthInBits(ctx context.Context) uint16 { arrayCtx := spiContext.CreateArrayContext(ctx, len(m.StatusBytes), _curItem) _ = arrayCtx _ = _curItem - lengthInBits += element.(interface{ GetLengthInBits(context.Context) uint16 }).GetLengthInBits(arrayCtx) + lengthInBits += element.(interface{GetLengthInBits(context.Context) uint16}).GetLengthInBits(arrayCtx) } } return lengthInBits } + func (m *_CALDataStatus) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -167,7 +171,7 @@ func CALDataStatusParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff if pullErr := readBuffer.PullContext("application"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for application") } - _application, _applicationErr := ApplicationIdContainerParseWithBuffer(ctx, readBuffer) +_application, _applicationErr := ApplicationIdContainerParseWithBuffer(ctx, readBuffer) if _applicationErr != nil { return nil, errors.Wrap(_applicationErr, "Error parsing 'application' field of CALDataStatus") } @@ -177,7 +181,7 @@ func CALDataStatusParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff } // Simple Field (blockStart) - _blockStart, _blockStartErr := readBuffer.ReadUint8("blockStart", 8) +_blockStart, _blockStartErr := readBuffer.ReadUint8("blockStart", 8) if _blockStartErr != nil { return nil, errors.Wrap(_blockStartErr, "Error parsing 'blockStart' field of CALDataStatus") } @@ -188,7 +192,7 @@ func CALDataStatusParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff return nil, errors.Wrap(pullErr, "Error pulling for statusBytes") } // Count array - statusBytes := make([]StatusByte, uint16(commandTypeContainer.NumBytes())-uint16(uint16(2))) + statusBytes := make([]StatusByte, uint16(commandTypeContainer.NumBytes()) - uint16(uint16(2))) // This happens when the size is set conditional to 0 if len(statusBytes) == 0 { statusBytes = nil @@ -199,7 +203,7 @@ func CALDataStatusParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := StatusByteParseWithBuffer(arrayCtx, readBuffer) +_item, _err := StatusByteParseWithBuffer(arrayCtx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'statusBytes' field of CALDataStatus") } @@ -220,7 +224,7 @@ func CALDataStatusParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff RequestContext: requestContext, }, Application: application, - BlockStart: blockStart, + BlockStart: blockStart, StatusBytes: statusBytes, } _child._CALData._CALDataChildRequirements = _child @@ -243,41 +247,41 @@ func (m *_CALDataStatus) SerializeWithWriteBuffer(ctx context.Context, writeBuff return errors.Wrap(pushErr, "Error pushing for CALDataStatus") } - // Simple Field (application) - if pushErr := writeBuffer.PushContext("application"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for application") - } - _applicationErr := writeBuffer.WriteSerializable(ctx, m.GetApplication()) - if popErr := writeBuffer.PopContext("application"); popErr != nil { - return errors.Wrap(popErr, "Error popping for application") - } - if _applicationErr != nil { - return errors.Wrap(_applicationErr, "Error serializing 'application' field") - } + // Simple Field (application) + if pushErr := writeBuffer.PushContext("application"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for application") + } + _applicationErr := writeBuffer.WriteSerializable(ctx, m.GetApplication()) + if popErr := writeBuffer.PopContext("application"); popErr != nil { + return errors.Wrap(popErr, "Error popping for application") + } + if _applicationErr != nil { + return errors.Wrap(_applicationErr, "Error serializing 'application' field") + } - // Simple Field (blockStart) - blockStart := uint8(m.GetBlockStart()) - _blockStartErr := writeBuffer.WriteUint8("blockStart", 8, (blockStart)) - if _blockStartErr != nil { - return errors.Wrap(_blockStartErr, "Error serializing 'blockStart' field") - } + // Simple Field (blockStart) + blockStart := uint8(m.GetBlockStart()) + _blockStartErr := writeBuffer.WriteUint8("blockStart", 8, (blockStart)) + if _blockStartErr != nil { + return errors.Wrap(_blockStartErr, "Error serializing 'blockStart' field") + } - // Array Field (statusBytes) - if pushErr := writeBuffer.PushContext("statusBytes", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for statusBytes") - } - for _curItem, _element := range m.GetStatusBytes() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetStatusBytes()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'statusBytes' field") - } - } - if popErr := writeBuffer.PopContext("statusBytes", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for statusBytes") + // Array Field (statusBytes) + if pushErr := writeBuffer.PushContext("statusBytes", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for statusBytes") + } + for _curItem, _element := range m.GetStatusBytes() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetStatusBytes()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'statusBytes' field") } + } + if popErr := writeBuffer.PopContext("statusBytes", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for statusBytes") + } if popErr := writeBuffer.PopContext("CALDataStatus"); popErr != nil { return errors.Wrap(popErr, "Error popping for CALDataStatus") @@ -287,6 +291,7 @@ func (m *_CALDataStatus) SerializeWithWriteBuffer(ctx context.Context, writeBuff return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_CALDataStatus) isCALDataStatus() bool { return true } @@ -301,3 +306,6 @@ func (m *_CALDataStatus) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/CALDataStatusExtended.go b/plc4go/protocols/cbus/readwrite/model/CALDataStatusExtended.go index 15ed284635f..9f4aa2c5a38 100644 --- a/plc4go/protocols/cbus/readwrite/model/CALDataStatusExtended.go +++ b/plc4go/protocols/cbus/readwrite/model/CALDataStatusExtended.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CALDataStatusExtended is the corresponding interface of CALDataStatusExtended type CALDataStatusExtended interface { @@ -59,13 +61,15 @@ type CALDataStatusExtendedExactly interface { // _CALDataStatusExtended is the data-structure of this message type _CALDataStatusExtended struct { *_CALData - Coding StatusCoding - Application ApplicationIdContainer - BlockStart uint8 - StatusBytes []StatusByte - LevelInformation []LevelInformation + Coding StatusCoding + Application ApplicationIdContainer + BlockStart uint8 + StatusBytes []StatusByte + LevelInformation []LevelInformation } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -76,15 +80,13 @@ type _CALDataStatusExtended struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_CALDataStatusExtended) InitializeParent(parent CALData, commandTypeContainer CALCommandTypeContainer, additionalData CALData) { - m.CommandTypeContainer = commandTypeContainer +func (m *_CALDataStatusExtended) InitializeParent(parent CALData , commandTypeContainer CALCommandTypeContainer , additionalData CALData ) { m.CommandTypeContainer = commandTypeContainer m.AdditionalData = additionalData } -func (m *_CALDataStatusExtended) GetParent() CALData { +func (m *_CALDataStatusExtended) GetParent() CALData { return m._CALData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -122,15 +124,13 @@ func (m *_CALDataStatusExtended) GetLevelInformation() []LevelInformation { func (m *_CALDataStatusExtended) GetNumberOfStatusBytes() uint8 { ctx := context.Background() _ = ctx - return uint8(utils.InlineIf((bool(bool((m.GetCoding()) == (StatusCoding_BINARY_BY_THIS_SERIAL_INTERFACE))) || bool(bool((m.GetCoding()) == (StatusCoding_BINARY_BY_ELSEWHERE)))), func() interface{} { return uint8((uint8(m.GetCommandTypeContainer().NumBytes()) - uint8(uint8(3)))) }, func() interface{} { return uint8((uint8(0))) }).(uint8)) + return uint8(utils.InlineIf((bool(bool((m.GetCoding()) == (StatusCoding_BINARY_BY_THIS_SERIAL_INTERFACE))) || bool(bool((m.GetCoding()) == (StatusCoding_BINARY_BY_ELSEWHERE)))), func() interface{} {return uint8((uint8(m.GetCommandTypeContainer().NumBytes()) - uint8(uint8(3))))}, func() interface{} {return uint8((uint8(0)))}).(uint8)) } func (m *_CALDataStatusExtended) GetNumberOfLevelInformation() uint8 { ctx := context.Background() _ = ctx - return uint8(utils.InlineIf((bool(bool((m.GetCoding()) == (StatusCoding_LEVEL_BY_THIS_SERIAL_INTERFACE))) || bool(bool((m.GetCoding()) == (StatusCoding_LEVEL_BY_ELSEWHERE)))), func() interface{} { - return uint8((uint8((uint8(m.GetCommandTypeContainer().NumBytes()) - uint8(uint8(3)))) / uint8(uint8(2)))) - }, func() interface{} { return uint8((uint8(0))) }).(uint8)) + return uint8(utils.InlineIf((bool(bool((m.GetCoding()) == (StatusCoding_LEVEL_BY_THIS_SERIAL_INTERFACE))) || bool(bool((m.GetCoding()) == (StatusCoding_LEVEL_BY_ELSEWHERE)))), func() interface{} {return uint8((uint8((uint8(m.GetCommandTypeContainer().NumBytes()) - uint8(uint8(3)))) / uint8(uint8(2))))}, func() interface{} {return uint8((uint8(0)))}).(uint8)) } /////////////////////// @@ -138,15 +138,16 @@ func (m *_CALDataStatusExtended) GetNumberOfLevelInformation() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCALDataStatusExtended factory function for _CALDataStatusExtended -func NewCALDataStatusExtended(coding StatusCoding, application ApplicationIdContainer, blockStart uint8, statusBytes []StatusByte, levelInformation []LevelInformation, commandTypeContainer CALCommandTypeContainer, additionalData CALData, requestContext RequestContext) *_CALDataStatusExtended { +func NewCALDataStatusExtended( coding StatusCoding , application ApplicationIdContainer , blockStart uint8 , statusBytes []StatusByte , levelInformation []LevelInformation , commandTypeContainer CALCommandTypeContainer , additionalData CALData , requestContext RequestContext ) *_CALDataStatusExtended { _result := &_CALDataStatusExtended{ - Coding: coding, - Application: application, - BlockStart: blockStart, - StatusBytes: statusBytes, + Coding: coding, + Application: application, + BlockStart: blockStart, + StatusBytes: statusBytes, LevelInformation: levelInformation, - _CALData: NewCALData(commandTypeContainer, additionalData, requestContext), + _CALData: NewCALData(commandTypeContainer, additionalData, requestContext), } _result._CALData._CALDataChildRequirements = _result return _result @@ -154,7 +155,7 @@ func NewCALDataStatusExtended(coding StatusCoding, application ApplicationIdCont // Deprecated: use the interface for direct cast func CastCALDataStatusExtended(structType interface{}) CALDataStatusExtended { - if casted, ok := structType.(CALDataStatusExtended); ok { + if casted, ok := structType.(CALDataStatusExtended); ok { return casted } if casted, ok := structType.(*CALDataStatusExtended); ok { @@ -177,7 +178,7 @@ func (m *_CALDataStatusExtended) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += 8 // Simple field (blockStart) - lengthInBits += 8 + lengthInBits += 8; // A virtual field doesn't have any in- or output. @@ -189,7 +190,7 @@ func (m *_CALDataStatusExtended) GetLengthInBits(ctx context.Context) uint16 { arrayCtx := spiContext.CreateArrayContext(ctx, len(m.StatusBytes), _curItem) _ = arrayCtx _ = _curItem - lengthInBits += element.(interface{ GetLengthInBits(context.Context) uint16 }).GetLengthInBits(arrayCtx) + lengthInBits += element.(interface{GetLengthInBits(context.Context) uint16}).GetLengthInBits(arrayCtx) } } @@ -199,13 +200,14 @@ func (m *_CALDataStatusExtended) GetLengthInBits(ctx context.Context) uint16 { arrayCtx := spiContext.CreateArrayContext(ctx, len(m.LevelInformation), _curItem) _ = arrayCtx _ = _curItem - lengthInBits += element.(interface{ GetLengthInBits(context.Context) uint16 }).GetLengthInBits(arrayCtx) + lengthInBits += element.(interface{GetLengthInBits(context.Context) uint16}).GetLengthInBits(arrayCtx) } } return lengthInBits } + func (m *_CALDataStatusExtended) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -227,7 +229,7 @@ func CALDataStatusExtendedParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("coding"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for coding") } - _coding, _codingErr := StatusCodingParseWithBuffer(ctx, readBuffer) +_coding, _codingErr := StatusCodingParseWithBuffer(ctx, readBuffer) if _codingErr != nil { return nil, errors.Wrap(_codingErr, "Error parsing 'coding' field of CALDataStatusExtended") } @@ -240,7 +242,7 @@ func CALDataStatusExtendedParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("application"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for application") } - _application, _applicationErr := ApplicationIdContainerParseWithBuffer(ctx, readBuffer) +_application, _applicationErr := ApplicationIdContainerParseWithBuffer(ctx, readBuffer) if _applicationErr != nil { return nil, errors.Wrap(_applicationErr, "Error parsing 'application' field of CALDataStatusExtended") } @@ -250,21 +252,19 @@ func CALDataStatusExtendedParseWithBuffer(ctx context.Context, readBuffer utils. } // Simple Field (blockStart) - _blockStart, _blockStartErr := readBuffer.ReadUint8("blockStart", 8) +_blockStart, _blockStartErr := readBuffer.ReadUint8("blockStart", 8) if _blockStartErr != nil { return nil, errors.Wrap(_blockStartErr, "Error parsing 'blockStart' field of CALDataStatusExtended") } blockStart := _blockStart // Virtual field - _numberOfStatusBytes := utils.InlineIf((bool(bool((coding) == (StatusCoding_BINARY_BY_THIS_SERIAL_INTERFACE))) || bool(bool((coding) == (StatusCoding_BINARY_BY_ELSEWHERE)))), func() interface{} { return uint8((uint8(commandTypeContainer.NumBytes()) - uint8(uint8(3)))) }, func() interface{} { return uint8((uint8(0))) }).(uint8) + _numberOfStatusBytes := utils.InlineIf((bool(bool((coding) == (StatusCoding_BINARY_BY_THIS_SERIAL_INTERFACE))) || bool(bool((coding) == (StatusCoding_BINARY_BY_ELSEWHERE)))), func() interface{} {return uint8((uint8(commandTypeContainer.NumBytes()) - uint8(uint8(3))))}, func() interface{} {return uint8((uint8(0)))}).(uint8) numberOfStatusBytes := uint8(_numberOfStatusBytes) _ = numberOfStatusBytes // Virtual field - _numberOfLevelInformation := utils.InlineIf((bool(bool((coding) == (StatusCoding_LEVEL_BY_THIS_SERIAL_INTERFACE))) || bool(bool((coding) == (StatusCoding_LEVEL_BY_ELSEWHERE)))), func() interface{} { - return uint8((uint8((uint8(commandTypeContainer.NumBytes()) - uint8(uint8(3)))) / uint8(uint8(2)))) - }, func() interface{} { return uint8((uint8(0))) }).(uint8) + _numberOfLevelInformation := utils.InlineIf((bool(bool((coding) == (StatusCoding_LEVEL_BY_THIS_SERIAL_INTERFACE))) || bool(bool((coding) == (StatusCoding_LEVEL_BY_ELSEWHERE)))), func() interface{} {return uint8((uint8((uint8(commandTypeContainer.NumBytes()) - uint8(uint8(3)))) / uint8(uint8(2))))}, func() interface{} {return uint8((uint8(0)))}).(uint8) numberOfLevelInformation := uint8(_numberOfLevelInformation) _ = numberOfLevelInformation @@ -284,7 +284,7 @@ func CALDataStatusExtendedParseWithBuffer(ctx context.Context, readBuffer utils. arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := StatusByteParseWithBuffer(arrayCtx, readBuffer) +_item, _err := StatusByteParseWithBuffer(arrayCtx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'statusBytes' field of CALDataStatusExtended") } @@ -311,7 +311,7 @@ func CALDataStatusExtendedParseWithBuffer(ctx context.Context, readBuffer utils. arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := LevelInformationParseWithBuffer(arrayCtx, readBuffer) +_item, _err := LevelInformationParseWithBuffer(arrayCtx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'levelInformation' field of CALDataStatusExtended") } @@ -331,10 +331,10 @@ func CALDataStatusExtendedParseWithBuffer(ctx context.Context, readBuffer utils. _CALData: &_CALData{ RequestContext: requestContext, }, - Coding: coding, - Application: application, - BlockStart: blockStart, - StatusBytes: statusBytes, + Coding: coding, + Application: application, + BlockStart: blockStart, + StatusBytes: statusBytes, LevelInformation: levelInformation, } _child._CALData._CALDataChildRequirements = _child @@ -357,78 +357,78 @@ func (m *_CALDataStatusExtended) SerializeWithWriteBuffer(ctx context.Context, w return errors.Wrap(pushErr, "Error pushing for CALDataStatusExtended") } - // Simple Field (coding) - if pushErr := writeBuffer.PushContext("coding"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for coding") - } - _codingErr := writeBuffer.WriteSerializable(ctx, m.GetCoding()) - if popErr := writeBuffer.PopContext("coding"); popErr != nil { - return errors.Wrap(popErr, "Error popping for coding") - } - if _codingErr != nil { - return errors.Wrap(_codingErr, "Error serializing 'coding' field") - } + // Simple Field (coding) + if pushErr := writeBuffer.PushContext("coding"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for coding") + } + _codingErr := writeBuffer.WriteSerializable(ctx, m.GetCoding()) + if popErr := writeBuffer.PopContext("coding"); popErr != nil { + return errors.Wrap(popErr, "Error popping for coding") + } + if _codingErr != nil { + return errors.Wrap(_codingErr, "Error serializing 'coding' field") + } - // Simple Field (application) - if pushErr := writeBuffer.PushContext("application"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for application") - } - _applicationErr := writeBuffer.WriteSerializable(ctx, m.GetApplication()) - if popErr := writeBuffer.PopContext("application"); popErr != nil { - return errors.Wrap(popErr, "Error popping for application") - } - if _applicationErr != nil { - return errors.Wrap(_applicationErr, "Error serializing 'application' field") - } + // Simple Field (application) + if pushErr := writeBuffer.PushContext("application"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for application") + } + _applicationErr := writeBuffer.WriteSerializable(ctx, m.GetApplication()) + if popErr := writeBuffer.PopContext("application"); popErr != nil { + return errors.Wrap(popErr, "Error popping for application") + } + if _applicationErr != nil { + return errors.Wrap(_applicationErr, "Error serializing 'application' field") + } - // Simple Field (blockStart) - blockStart := uint8(m.GetBlockStart()) - _blockStartErr := writeBuffer.WriteUint8("blockStart", 8, (blockStart)) - if _blockStartErr != nil { - return errors.Wrap(_blockStartErr, "Error serializing 'blockStart' field") - } - // Virtual field - if _numberOfStatusBytesErr := writeBuffer.WriteVirtual(ctx, "numberOfStatusBytes", m.GetNumberOfStatusBytes()); _numberOfStatusBytesErr != nil { - return errors.Wrap(_numberOfStatusBytesErr, "Error serializing 'numberOfStatusBytes' field") - } - // Virtual field - if _numberOfLevelInformationErr := writeBuffer.WriteVirtual(ctx, "numberOfLevelInformation", m.GetNumberOfLevelInformation()); _numberOfLevelInformationErr != nil { - return errors.Wrap(_numberOfLevelInformationErr, "Error serializing 'numberOfLevelInformation' field") - } + // Simple Field (blockStart) + blockStart := uint8(m.GetBlockStart()) + _blockStartErr := writeBuffer.WriteUint8("blockStart", 8, (blockStart)) + if _blockStartErr != nil { + return errors.Wrap(_blockStartErr, "Error serializing 'blockStart' field") + } + // Virtual field + if _numberOfStatusBytesErr := writeBuffer.WriteVirtual(ctx, "numberOfStatusBytes", m.GetNumberOfStatusBytes()); _numberOfStatusBytesErr != nil { + return errors.Wrap(_numberOfStatusBytesErr, "Error serializing 'numberOfStatusBytes' field") + } + // Virtual field + if _numberOfLevelInformationErr := writeBuffer.WriteVirtual(ctx, "numberOfLevelInformation", m.GetNumberOfLevelInformation()); _numberOfLevelInformationErr != nil { + return errors.Wrap(_numberOfLevelInformationErr, "Error serializing 'numberOfLevelInformation' field") + } - // Array Field (statusBytes) - if pushErr := writeBuffer.PushContext("statusBytes", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for statusBytes") - } - for _curItem, _element := range m.GetStatusBytes() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetStatusBytes()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'statusBytes' field") - } - } - if popErr := writeBuffer.PopContext("statusBytes", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for statusBytes") + // Array Field (statusBytes) + if pushErr := writeBuffer.PushContext("statusBytes", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for statusBytes") + } + for _curItem, _element := range m.GetStatusBytes() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetStatusBytes()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'statusBytes' field") } + } + if popErr := writeBuffer.PopContext("statusBytes", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for statusBytes") + } - // Array Field (levelInformation) - if pushErr := writeBuffer.PushContext("levelInformation", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for levelInformation") - } - for _curItem, _element := range m.GetLevelInformation() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetLevelInformation()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'levelInformation' field") - } - } - if popErr := writeBuffer.PopContext("levelInformation", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for levelInformation") + // Array Field (levelInformation) + if pushErr := writeBuffer.PushContext("levelInformation", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for levelInformation") + } + for _curItem, _element := range m.GetLevelInformation() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetLevelInformation()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'levelInformation' field") } + } + if popErr := writeBuffer.PopContext("levelInformation", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for levelInformation") + } if popErr := writeBuffer.PopContext("CALDataStatusExtended"); popErr != nil { return errors.Wrap(popErr, "Error popping for CALDataStatusExtended") @@ -438,6 +438,7 @@ func (m *_CALDataStatusExtended) SerializeWithWriteBuffer(ctx context.Context, w return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_CALDataStatusExtended) isCALDataStatusExtended() bool { return true } @@ -452,3 +453,6 @@ func (m *_CALDataStatusExtended) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/CALDataWrite.go b/plc4go/protocols/cbus/readwrite/model/CALDataWrite.go index 358305197c4..7dddd329dbf 100644 --- a/plc4go/protocols/cbus/readwrite/model/CALDataWrite.go +++ b/plc4go/protocols/cbus/readwrite/model/CALDataWrite.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CALDataWrite is the corresponding interface of CALDataWrite type CALDataWrite interface { @@ -50,11 +52,13 @@ type CALDataWriteExactly interface { // _CALDataWrite is the data-structure of this message type _CALDataWrite struct { *_CALData - ParamNo Parameter - Code byte - ParameterValue ParameterValue + ParamNo Parameter + Code byte + ParameterValue ParameterValue } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -65,15 +69,13 @@ type _CALDataWrite struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_CALDataWrite) InitializeParent(parent CALData, commandTypeContainer CALCommandTypeContainer, additionalData CALData) { - m.CommandTypeContainer = commandTypeContainer +func (m *_CALDataWrite) InitializeParent(parent CALData , commandTypeContainer CALCommandTypeContainer , additionalData CALData ) { m.CommandTypeContainer = commandTypeContainer m.AdditionalData = additionalData } -func (m *_CALDataWrite) GetParent() CALData { +func (m *_CALDataWrite) GetParent() CALData { return m._CALData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,13 +98,14 @@ func (m *_CALDataWrite) GetParameterValue() ParameterValue { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCALDataWrite factory function for _CALDataWrite -func NewCALDataWrite(paramNo Parameter, code byte, parameterValue ParameterValue, commandTypeContainer CALCommandTypeContainer, additionalData CALData, requestContext RequestContext) *_CALDataWrite { +func NewCALDataWrite( paramNo Parameter , code byte , parameterValue ParameterValue , commandTypeContainer CALCommandTypeContainer , additionalData CALData , requestContext RequestContext ) *_CALDataWrite { _result := &_CALDataWrite{ - ParamNo: paramNo, - Code: code, + ParamNo: paramNo, + Code: code, ParameterValue: parameterValue, - _CALData: NewCALData(commandTypeContainer, additionalData, requestContext), + _CALData: NewCALData(commandTypeContainer, additionalData, requestContext), } _result._CALData._CALDataChildRequirements = _result return _result @@ -110,7 +113,7 @@ func NewCALDataWrite(paramNo Parameter, code byte, parameterValue ParameterValue // Deprecated: use the interface for direct cast func CastCALDataWrite(structType interface{}) CALDataWrite { - if casted, ok := structType.(CALDataWrite); ok { + if casted, ok := structType.(CALDataWrite); ok { return casted } if casted, ok := structType.(*CALDataWrite); ok { @@ -130,7 +133,7 @@ func (m *_CALDataWrite) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += 8 // Simple field (code) - lengthInBits += 8 + lengthInBits += 8; // Simple field (parameterValue) lengthInBits += m.ParameterValue.GetLengthInBits(ctx) @@ -138,6 +141,7 @@ func (m *_CALDataWrite) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_CALDataWrite) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -159,7 +163,7 @@ func CALDataWriteParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe if pullErr := readBuffer.PullContext("paramNo"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for paramNo") } - _paramNo, _paramNoErr := ParameterParseWithBuffer(ctx, readBuffer) +_paramNo, _paramNoErr := ParameterParseWithBuffer(ctx, readBuffer) if _paramNoErr != nil { return nil, errors.Wrap(_paramNoErr, "Error parsing 'paramNo' field of CALDataWrite") } @@ -169,7 +173,7 @@ func CALDataWriteParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe } // Simple Field (code) - _code, _codeErr := readBuffer.ReadByte("code") +_code, _codeErr := readBuffer.ReadByte("code") if _codeErr != nil { return nil, errors.Wrap(_codeErr, "Error parsing 'code' field of CALDataWrite") } @@ -179,7 +183,7 @@ func CALDataWriteParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe if pullErr := readBuffer.PullContext("parameterValue"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for parameterValue") } - _parameterValue, _parameterValueErr := ParameterValueParseWithBuffer(ctx, readBuffer, ParameterType(paramNo.ParameterType()), uint8(uint8(commandTypeContainer.NumBytes())-uint8(uint8(2)))) +_parameterValue, _parameterValueErr := ParameterValueParseWithBuffer(ctx, readBuffer , ParameterType( paramNo.ParameterType() ) , uint8( uint8(commandTypeContainer.NumBytes()) - uint8(uint8(2)) ) ) if _parameterValueErr != nil { return nil, errors.Wrap(_parameterValueErr, "Error parsing 'parameterValue' field of CALDataWrite") } @@ -197,8 +201,8 @@ func CALDataWriteParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe _CALData: &_CALData{ RequestContext: requestContext, }, - ParamNo: paramNo, - Code: code, + ParamNo: paramNo, + Code: code, ParameterValue: parameterValue, } _child._CALData._CALDataChildRequirements = _child @@ -221,36 +225,36 @@ func (m *_CALDataWrite) SerializeWithWriteBuffer(ctx context.Context, writeBuffe return errors.Wrap(pushErr, "Error pushing for CALDataWrite") } - // Simple Field (paramNo) - if pushErr := writeBuffer.PushContext("paramNo"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for paramNo") - } - _paramNoErr := writeBuffer.WriteSerializable(ctx, m.GetParamNo()) - if popErr := writeBuffer.PopContext("paramNo"); popErr != nil { - return errors.Wrap(popErr, "Error popping for paramNo") - } - if _paramNoErr != nil { - return errors.Wrap(_paramNoErr, "Error serializing 'paramNo' field") - } + // Simple Field (paramNo) + if pushErr := writeBuffer.PushContext("paramNo"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for paramNo") + } + _paramNoErr := writeBuffer.WriteSerializable(ctx, m.GetParamNo()) + if popErr := writeBuffer.PopContext("paramNo"); popErr != nil { + return errors.Wrap(popErr, "Error popping for paramNo") + } + if _paramNoErr != nil { + return errors.Wrap(_paramNoErr, "Error serializing 'paramNo' field") + } - // Simple Field (code) - code := byte(m.GetCode()) - _codeErr := writeBuffer.WriteByte("code", (code)) - if _codeErr != nil { - return errors.Wrap(_codeErr, "Error serializing 'code' field") - } + // Simple Field (code) + code := byte(m.GetCode()) + _codeErr := writeBuffer.WriteByte("code", (code)) + if _codeErr != nil { + return errors.Wrap(_codeErr, "Error serializing 'code' field") + } - // Simple Field (parameterValue) - if pushErr := writeBuffer.PushContext("parameterValue"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for parameterValue") - } - _parameterValueErr := writeBuffer.WriteSerializable(ctx, m.GetParameterValue()) - if popErr := writeBuffer.PopContext("parameterValue"); popErr != nil { - return errors.Wrap(popErr, "Error popping for parameterValue") - } - if _parameterValueErr != nil { - return errors.Wrap(_parameterValueErr, "Error serializing 'parameterValue' field") - } + // Simple Field (parameterValue) + if pushErr := writeBuffer.PushContext("parameterValue"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for parameterValue") + } + _parameterValueErr := writeBuffer.WriteSerializable(ctx, m.GetParameterValue()) + if popErr := writeBuffer.PopContext("parameterValue"); popErr != nil { + return errors.Wrap(popErr, "Error popping for parameterValue") + } + if _parameterValueErr != nil { + return errors.Wrap(_parameterValueErr, "Error serializing 'parameterValue' field") + } if popErr := writeBuffer.PopContext("CALDataWrite"); popErr != nil { return errors.Wrap(popErr, "Error popping for CALDataWrite") @@ -260,6 +264,7 @@ func (m *_CALDataWrite) SerializeWithWriteBuffer(ctx context.Context, writeBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_CALDataWrite) isCALDataWrite() bool { return true } @@ -274,3 +279,6 @@ func (m *_CALDataWrite) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/CALReply.go b/plc4go/protocols/cbus/readwrite/model/CALReply.go index 6d4ff04d714..2e2e4a5432c 100644 --- a/plc4go/protocols/cbus/readwrite/model/CALReply.go +++ b/plc4go/protocols/cbus/readwrite/model/CALReply.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CALReply is the corresponding interface of CALReply type CALReply interface { @@ -47,11 +49,11 @@ type CALReplyExactly interface { // _CALReply is the data-structure of this message type _CALReply struct { _CALReplyChildRequirements - CalType byte - CalData CALData + CalType byte + CalData CALData // Arguments. - CBusOptions CBusOptions + CBusOptions CBusOptions RequestContext RequestContext } @@ -60,6 +62,7 @@ type _CALReplyChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type CALReplyParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child CALReply, serializeChildFunction func() error) error GetTypeName() string @@ -67,13 +70,12 @@ type CALReplyParent interface { type CALReplyChild interface { utils.Serializable - InitializeParent(parent CALReply, calType byte, calData CALData) +InitializeParent(parent CALReply , calType byte , calData CALData ) GetParent() *CALReply GetTypeName() string CALReply } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,14 +94,15 @@ func (m *_CALReply) GetCalData() CALData { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCALReply factory function for _CALReply -func NewCALReply(calType byte, calData CALData, cBusOptions CBusOptions, requestContext RequestContext) *_CALReply { - return &_CALReply{CalType: calType, CalData: calData, CBusOptions: cBusOptions, RequestContext: requestContext} +func NewCALReply( calType byte , calData CALData , cBusOptions CBusOptions , requestContext RequestContext ) *_CALReply { +return &_CALReply{ CalType: calType , CalData: calData , CBusOptions: cBusOptions , RequestContext: requestContext } } // Deprecated: use the interface for direct cast func CastCALReply(structType interface{}) CALReply { - if casted, ok := structType.(CALReply); ok { + if casted, ok := structType.(CALReply); ok { return casted } if casted, ok := structType.(*CALReply); ok { @@ -112,6 +115,7 @@ func (m *_CALReply) GetTypeName() string { return "CALReply" } + func (m *_CALReply) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -138,28 +142,28 @@ func CALReplyParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, c currentPos := positionAware.GetPos() _ = currentPos - // Peek Field (calType) - currentPos = positionAware.GetPos() - calType, _err := readBuffer.ReadByte("calType") - if _err != nil { - return nil, errors.Wrap(_err, "Error parsing 'calType' field of CALReply") - } + // Peek Field (calType) + currentPos = positionAware.GetPos() + calType, _err := readBuffer.ReadByte("calType") + if _err != nil { + return nil, errors.Wrap(_err, "Error parsing 'calType' field of CALReply") + } - readBuffer.Reset(currentPos) + readBuffer.Reset(currentPos) // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type CALReplyChildSerializeRequirement interface { CALReply - InitializeParent(CALReply, byte, CALData) + InitializeParent(CALReply, byte, CALData) GetParent() CALReply } var _childTemp interface{} var _child CALReplyChildSerializeRequirement var typeSwitchError error switch { - case calType == 0x86: // CALReplyLong +case calType == 0x86 : // CALReplyLong _childTemp, typeSwitchError = CALReplyLongParseWithBuffer(ctx, readBuffer, cBusOptions, requestContext) - case true: // CALReplyShort +case true : // CALReplyShort _childTemp, typeSwitchError = CALReplyShortParseWithBuffer(ctx, readBuffer, cBusOptions, requestContext) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [calType=%v]", calType) @@ -173,7 +177,7 @@ func CALReplyParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, c if pullErr := readBuffer.PullContext("calData"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for calData") } - _calData, _calDataErr := CALDataParseWithBuffer(ctx, readBuffer, requestContext) +_calData, _calDataErr := CALDataParseWithBuffer(ctx, readBuffer , requestContext ) if _calDataErr != nil { return nil, errors.Wrap(_calDataErr, "Error parsing 'calData' field of CALReply") } @@ -187,7 +191,7 @@ func CALReplyParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, c } // Finish initializing - _child.InitializeParent(_child, calType, calData) +_child.InitializeParent(_child , calType , calData ) return _child, nil } @@ -197,7 +201,7 @@ func (pm *_CALReply) SerializeParent(ctx context.Context, writeBuffer utils.Writ _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("CALReply"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("CALReply"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for CALReply") } @@ -224,6 +228,7 @@ func (pm *_CALReply) SerializeParent(ctx context.Context, writeBuffer utils.Writ return nil } + //// // Arguments Getter @@ -233,7 +238,6 @@ func (m *_CALReply) GetCBusOptions() CBusOptions { func (m *_CALReply) GetRequestContext() RequestContext { return m.RequestContext } - // //// @@ -251,3 +255,6 @@ func (m *_CALReply) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/CALReplyLong.go b/plc4go/protocols/cbus/readwrite/model/CALReplyLong.go index 54c85a9387f..e8c09c7feb5 100644 --- a/plc4go/protocols/cbus/readwrite/model/CALReplyLong.go +++ b/plc4go/protocols/cbus/readwrite/model/CALReplyLong.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CALReplyLong is the corresponding interface of CALReplyLong type CALReplyLong interface { @@ -59,16 +61,18 @@ type CALReplyLongExactly interface { // _CALReplyLong is the data-structure of this message type _CALReplyLong struct { *_CALReply - TerminatingByte uint32 - UnitAddress UnitAddress - BridgeAddress BridgeAddress - SerialInterfaceAddress SerialInterfaceAddress - ReservedByte *byte - ReplyNetwork ReplyNetwork + TerminatingByte uint32 + UnitAddress UnitAddress + BridgeAddress BridgeAddress + SerialInterfaceAddress SerialInterfaceAddress + ReservedByte *byte + ReplyNetwork ReplyNetwork // Reserved Fields reservedField0 *byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -79,15 +83,13 @@ type _CALReplyLong struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_CALReplyLong) InitializeParent(parent CALReply, calType byte, calData CALData) { - m.CalType = calType +func (m *_CALReplyLong) InitializeParent(parent CALReply , calType byte , calData CALData ) { m.CalType = calType m.CalData = calData } -func (m *_CALReplyLong) GetParent() CALReply { +func (m *_CALReplyLong) GetParent() CALReply { return m._CALReply } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -137,7 +139,7 @@ func (m *_CALReplyLong) GetIsUnitAddress() bool { _ = reservedByte replyNetwork := m.ReplyNetwork _ = replyNetwork - return bool(bool((m.GetTerminatingByte() & 0xff) == (0x00))) + return bool(bool(((m.GetTerminatingByte()& 0xff)) == (0x00))) } /////////////////////// @@ -145,16 +147,17 @@ func (m *_CALReplyLong) GetIsUnitAddress() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCALReplyLong factory function for _CALReplyLong -func NewCALReplyLong(terminatingByte uint32, unitAddress UnitAddress, bridgeAddress BridgeAddress, serialInterfaceAddress SerialInterfaceAddress, reservedByte *byte, replyNetwork ReplyNetwork, calType byte, calData CALData, cBusOptions CBusOptions, requestContext RequestContext) *_CALReplyLong { +func NewCALReplyLong( terminatingByte uint32 , unitAddress UnitAddress , bridgeAddress BridgeAddress , serialInterfaceAddress SerialInterfaceAddress , reservedByte *byte , replyNetwork ReplyNetwork , calType byte , calData CALData , cBusOptions CBusOptions , requestContext RequestContext ) *_CALReplyLong { _result := &_CALReplyLong{ - TerminatingByte: terminatingByte, - UnitAddress: unitAddress, - BridgeAddress: bridgeAddress, + TerminatingByte: terminatingByte, + UnitAddress: unitAddress, + BridgeAddress: bridgeAddress, SerialInterfaceAddress: serialInterfaceAddress, - ReservedByte: reservedByte, - ReplyNetwork: replyNetwork, - _CALReply: NewCALReply(calType, calData, cBusOptions, requestContext), + ReservedByte: reservedByte, + ReplyNetwork: replyNetwork, + _CALReply: NewCALReply(calType, calData, cBusOptions, requestContext), } _result._CALReply._CALReplyChildRequirements = _result return _result @@ -162,7 +165,7 @@ func NewCALReplyLong(terminatingByte uint32, unitAddress UnitAddress, bridgeAddr // Deprecated: use the interface for direct cast func CastCALReplyLong(structType interface{}) CALReplyLong { - if casted, ok := structType.(CALReplyLong); ok { + if casted, ok := structType.(CALReplyLong); ok { return casted } if casted, ok := structType.(*CALReplyLong); ok { @@ -209,6 +212,7 @@ func (m *_CALReplyLong) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_CALReplyLong) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -236,24 +240,24 @@ func CALReplyLongParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe if reserved != byte(0x86) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": byte(0x86), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved } } - // Peek Field (terminatingByte) - currentPos = positionAware.GetPos() - terminatingByte, _err := readBuffer.ReadUint32("terminatingByte", 24) - if _err != nil { - return nil, errors.Wrap(_err, "Error parsing 'terminatingByte' field of CALReplyLong") - } + // Peek Field (terminatingByte) + currentPos = positionAware.GetPos() + terminatingByte, _err := readBuffer.ReadUint32("terminatingByte", 24) + if _err != nil { + return nil, errors.Wrap(_err, "Error parsing 'terminatingByte' field of CALReplyLong") + } - readBuffer.Reset(currentPos) + readBuffer.Reset(currentPos) // Virtual field - _isUnitAddress := bool((terminatingByte & 0xff) == (0x00)) + _isUnitAddress := bool(((terminatingByte& 0xff)) == (0x00)) isUnitAddress := bool(_isUnitAddress) _ = isUnitAddress @@ -264,7 +268,7 @@ func CALReplyLongParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe if pullErr := readBuffer.PullContext("unitAddress"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for unitAddress") } - _val, _err := UnitAddressParseWithBuffer(ctx, readBuffer) +_val, _err := UnitAddressParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -286,7 +290,7 @@ func CALReplyLongParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe if pullErr := readBuffer.PullContext("bridgeAddress"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for bridgeAddress") } - _val, _err := BridgeAddressParseWithBuffer(ctx, readBuffer) +_val, _err := BridgeAddressParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -305,7 +309,7 @@ func CALReplyLongParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe if pullErr := readBuffer.PullContext("serialInterfaceAddress"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for serialInterfaceAddress") } - _serialInterfaceAddress, _serialInterfaceAddressErr := SerialInterfaceAddressParseWithBuffer(ctx, readBuffer) +_serialInterfaceAddress, _serialInterfaceAddressErr := SerialInterfaceAddressParseWithBuffer(ctx, readBuffer) if _serialInterfaceAddressErr != nil { return nil, errors.Wrap(_serialInterfaceAddressErr, "Error parsing 'serialInterfaceAddress' field of CALReplyLong") } @@ -325,7 +329,7 @@ func CALReplyLongParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe } // Validation - if !(bool(bool(isUnitAddress) && bool(bool((*reservedByte) == (0x00)))) || bool(!(isUnitAddress))) { + if (!(bool(bool(isUnitAddress) && bool(bool(((*reservedByte)) == (0x00)))) || bool(!(isUnitAddress)))) { return nil, errors.WithStack(utils.ParseValidationError{"wrong reservedByte"}) } @@ -336,7 +340,7 @@ func CALReplyLongParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe if pullErr := readBuffer.PullContext("replyNetwork"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for replyNetwork") } - _val, _err := ReplyNetworkParseWithBuffer(ctx, readBuffer) +_val, _err := ReplyNetworkParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -358,16 +362,16 @@ func CALReplyLongParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe // Create a partially initialized instance _child := &_CALReplyLong{ _CALReply: &_CALReply{ - CBusOptions: cBusOptions, + CBusOptions: cBusOptions, RequestContext: requestContext, }, - TerminatingByte: terminatingByte, - UnitAddress: unitAddress, - BridgeAddress: bridgeAddress, + TerminatingByte: terminatingByte, + UnitAddress: unitAddress, + BridgeAddress: bridgeAddress, SerialInterfaceAddress: serialInterfaceAddress, - ReservedByte: reservedByte, - ReplyNetwork: replyNetwork, - reservedField0: reservedField0, + ReservedByte: reservedByte, + ReplyNetwork: replyNetwork, + reservedField0: reservedField0, } _child._CALReply._CALReplyChildRequirements = _child return _child, nil @@ -389,95 +393,95 @@ func (m *_CALReplyLong) SerializeWithWriteBuffer(ctx context.Context, writeBuffe return errors.Wrap(pushErr, "Error pushing for CALReplyLong") } - // Reserved Field (reserved) - { - var reserved byte = byte(0x86) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": byte(0x86), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteByte("reserved", reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + // Reserved Field (reserved) + { + var reserved byte = byte(0x86) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": byte(0x86), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 } - // Virtual field - if _isUnitAddressErr := writeBuffer.WriteVirtual(ctx, "isUnitAddress", m.GetIsUnitAddress()); _isUnitAddressErr != nil { - return errors.Wrap(_isUnitAddressErr, "Error serializing 'isUnitAddress' field") + _err := writeBuffer.WriteByte("reserved", reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } + // Virtual field + if _isUnitAddressErr := writeBuffer.WriteVirtual(ctx, "isUnitAddress", m.GetIsUnitAddress()); _isUnitAddressErr != nil { + return errors.Wrap(_isUnitAddressErr, "Error serializing 'isUnitAddress' field") + } - // Optional Field (unitAddress) (Can be skipped, if the value is null) - var unitAddress UnitAddress = nil - if m.GetUnitAddress() != nil { - if pushErr := writeBuffer.PushContext("unitAddress"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for unitAddress") - } - unitAddress = m.GetUnitAddress() - _unitAddressErr := writeBuffer.WriteSerializable(ctx, unitAddress) - if popErr := writeBuffer.PopContext("unitAddress"); popErr != nil { - return errors.Wrap(popErr, "Error popping for unitAddress") - } - if _unitAddressErr != nil { - return errors.Wrap(_unitAddressErr, "Error serializing 'unitAddress' field") - } + // Optional Field (unitAddress) (Can be skipped, if the value is null) + var unitAddress UnitAddress = nil + if m.GetUnitAddress() != nil { + if pushErr := writeBuffer.PushContext("unitAddress"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for unitAddress") } - - // Optional Field (bridgeAddress) (Can be skipped, if the value is null) - var bridgeAddress BridgeAddress = nil - if m.GetBridgeAddress() != nil { - if pushErr := writeBuffer.PushContext("bridgeAddress"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for bridgeAddress") - } - bridgeAddress = m.GetBridgeAddress() - _bridgeAddressErr := writeBuffer.WriteSerializable(ctx, bridgeAddress) - if popErr := writeBuffer.PopContext("bridgeAddress"); popErr != nil { - return errors.Wrap(popErr, "Error popping for bridgeAddress") - } - if _bridgeAddressErr != nil { - return errors.Wrap(_bridgeAddressErr, "Error serializing 'bridgeAddress' field") - } + unitAddress = m.GetUnitAddress() + _unitAddressErr := writeBuffer.WriteSerializable(ctx, unitAddress) + if popErr := writeBuffer.PopContext("unitAddress"); popErr != nil { + return errors.Wrap(popErr, "Error popping for unitAddress") + } + if _unitAddressErr != nil { + return errors.Wrap(_unitAddressErr, "Error serializing 'unitAddress' field") } + } - // Simple Field (serialInterfaceAddress) - if pushErr := writeBuffer.PushContext("serialInterfaceAddress"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for serialInterfaceAddress") + // Optional Field (bridgeAddress) (Can be skipped, if the value is null) + var bridgeAddress BridgeAddress = nil + if m.GetBridgeAddress() != nil { + if pushErr := writeBuffer.PushContext("bridgeAddress"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for bridgeAddress") } - _serialInterfaceAddressErr := writeBuffer.WriteSerializable(ctx, m.GetSerialInterfaceAddress()) - if popErr := writeBuffer.PopContext("serialInterfaceAddress"); popErr != nil { - return errors.Wrap(popErr, "Error popping for serialInterfaceAddress") + bridgeAddress = m.GetBridgeAddress() + _bridgeAddressErr := writeBuffer.WriteSerializable(ctx, bridgeAddress) + if popErr := writeBuffer.PopContext("bridgeAddress"); popErr != nil { + return errors.Wrap(popErr, "Error popping for bridgeAddress") } - if _serialInterfaceAddressErr != nil { - return errors.Wrap(_serialInterfaceAddressErr, "Error serializing 'serialInterfaceAddress' field") + if _bridgeAddressErr != nil { + return errors.Wrap(_bridgeAddressErr, "Error serializing 'bridgeAddress' field") } + } - // Optional Field (reservedByte) (Can be skipped, if the value is null) - var reservedByte *byte = nil - if m.GetReservedByte() != nil { - reservedByte = m.GetReservedByte() - _reservedByteErr := writeBuffer.WriteByte("reservedByte", *(reservedByte)) - if _reservedByteErr != nil { - return errors.Wrap(_reservedByteErr, "Error serializing 'reservedByte' field") - } + // Simple Field (serialInterfaceAddress) + if pushErr := writeBuffer.PushContext("serialInterfaceAddress"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for serialInterfaceAddress") + } + _serialInterfaceAddressErr := writeBuffer.WriteSerializable(ctx, m.GetSerialInterfaceAddress()) + if popErr := writeBuffer.PopContext("serialInterfaceAddress"); popErr != nil { + return errors.Wrap(popErr, "Error popping for serialInterfaceAddress") + } + if _serialInterfaceAddressErr != nil { + return errors.Wrap(_serialInterfaceAddressErr, "Error serializing 'serialInterfaceAddress' field") + } + + // Optional Field (reservedByte) (Can be skipped, if the value is null) + var reservedByte *byte = nil + if m.GetReservedByte() != nil { + reservedByte = m.GetReservedByte() + _reservedByteErr := writeBuffer.WriteByte("reservedByte", *(reservedByte)) + if _reservedByteErr != nil { + return errors.Wrap(_reservedByteErr, "Error serializing 'reservedByte' field") } + } - // Optional Field (replyNetwork) (Can be skipped, if the value is null) - var replyNetwork ReplyNetwork = nil - if m.GetReplyNetwork() != nil { - if pushErr := writeBuffer.PushContext("replyNetwork"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for replyNetwork") - } - replyNetwork = m.GetReplyNetwork() - _replyNetworkErr := writeBuffer.WriteSerializable(ctx, replyNetwork) - if popErr := writeBuffer.PopContext("replyNetwork"); popErr != nil { - return errors.Wrap(popErr, "Error popping for replyNetwork") - } - if _replyNetworkErr != nil { - return errors.Wrap(_replyNetworkErr, "Error serializing 'replyNetwork' field") - } + // Optional Field (replyNetwork) (Can be skipped, if the value is null) + var replyNetwork ReplyNetwork = nil + if m.GetReplyNetwork() != nil { + if pushErr := writeBuffer.PushContext("replyNetwork"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for replyNetwork") + } + replyNetwork = m.GetReplyNetwork() + _replyNetworkErr := writeBuffer.WriteSerializable(ctx, replyNetwork) + if popErr := writeBuffer.PopContext("replyNetwork"); popErr != nil { + return errors.Wrap(popErr, "Error popping for replyNetwork") } + if _replyNetworkErr != nil { + return errors.Wrap(_replyNetworkErr, "Error serializing 'replyNetwork' field") + } + } if popErr := writeBuffer.PopContext("CALReplyLong"); popErr != nil { return errors.Wrap(popErr, "Error popping for CALReplyLong") @@ -487,6 +491,7 @@ func (m *_CALReplyLong) SerializeWithWriteBuffer(ctx context.Context, writeBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_CALReplyLong) isCALReplyLong() bool { return true } @@ -501,3 +506,6 @@ func (m *_CALReplyLong) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/CALReplyShort.go b/plc4go/protocols/cbus/readwrite/model/CALReplyShort.go index 3796451deb0..e7645b1b2a2 100644 --- a/plc4go/protocols/cbus/readwrite/model/CALReplyShort.go +++ b/plc4go/protocols/cbus/readwrite/model/CALReplyShort.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CALReplyShort is the corresponding interface of CALReplyShort type CALReplyShort interface { @@ -46,6 +48,8 @@ type _CALReplyShort struct { *_CALReply } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,19 +60,19 @@ type _CALReplyShort struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_CALReplyShort) InitializeParent(parent CALReply, calType byte, calData CALData) { - m.CalType = calType +func (m *_CALReplyShort) InitializeParent(parent CALReply , calType byte , calData CALData ) { m.CalType = calType m.CalData = calData } -func (m *_CALReplyShort) GetParent() CALReply { +func (m *_CALReplyShort) GetParent() CALReply { return m._CALReply } + // NewCALReplyShort factory function for _CALReplyShort -func NewCALReplyShort(calType byte, calData CALData, cBusOptions CBusOptions, requestContext RequestContext) *_CALReplyShort { +func NewCALReplyShort( calType byte , calData CALData , cBusOptions CBusOptions , requestContext RequestContext ) *_CALReplyShort { _result := &_CALReplyShort{ - _CALReply: NewCALReply(calType, calData, cBusOptions, requestContext), + _CALReply: NewCALReply(calType, calData, cBusOptions, requestContext), } _result._CALReply._CALReplyChildRequirements = _result return _result @@ -76,7 +80,7 @@ func NewCALReplyShort(calType byte, calData CALData, cBusOptions CBusOptions, re // Deprecated: use the interface for direct cast func CastCALReplyShort(structType interface{}) CALReplyShort { - if casted, ok := structType.(CALReplyShort); ok { + if casted, ok := structType.(CALReplyShort); ok { return casted } if casted, ok := structType.(*CALReplyShort); ok { @@ -95,6 +99,7 @@ func (m *_CALReplyShort) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_CALReplyShort) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -119,7 +124,7 @@ func CALReplyShortParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff // Create a partially initialized instance _child := &_CALReplyShort{ _CALReply: &_CALReply{ - CBusOptions: cBusOptions, + CBusOptions: cBusOptions, RequestContext: requestContext, }, } @@ -151,6 +156,7 @@ func (m *_CALReplyShort) SerializeWithWriteBuffer(ctx context.Context, writeBuff return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_CALReplyShort) isCALReplyShort() bool { return true } @@ -165,3 +171,6 @@ func (m *_CALReplyShort) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/CBusCommand.go b/plc4go/protocols/cbus/readwrite/model/CBusCommand.go index 737f18eb631..9547d98c6f8 100644 --- a/plc4go/protocols/cbus/readwrite/model/CBusCommand.go +++ b/plc4go/protocols/cbus/readwrite/model/CBusCommand.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CBusCommand is the corresponding interface of CBusCommand type CBusCommand interface { @@ -49,7 +51,7 @@ type CBusCommandExactly interface { // _CBusCommand is the data-structure of this message type _CBusCommand struct { _CBusCommandChildRequirements - Header CBusHeader + Header CBusHeader // Arguments. CBusOptions CBusOptions @@ -60,6 +62,7 @@ type _CBusCommandChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type CBusCommandParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child CBusCommand, serializeChildFunction func() error) error GetTypeName() string @@ -67,13 +70,12 @@ type CBusCommandParent interface { type CBusCommandChild interface { utils.Serializable - InitializeParent(parent CBusCommand, header CBusHeader) +InitializeParent(parent CBusCommand , header CBusHeader ) GetParent() *CBusCommand GetTypeName() string CBusCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -109,14 +111,15 @@ func (m *_CBusCommand) GetDestinationAddressType() DestinationAddressType { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCBusCommand factory function for _CBusCommand -func NewCBusCommand(header CBusHeader, cBusOptions CBusOptions) *_CBusCommand { - return &_CBusCommand{Header: header, CBusOptions: cBusOptions} +func NewCBusCommand( header CBusHeader , cBusOptions CBusOptions ) *_CBusCommand { +return &_CBusCommand{ Header: header , CBusOptions: cBusOptions } } // Deprecated: use the interface for direct cast func CastCBusCommand(structType interface{}) CBusCommand { - if casted, ok := structType.(CBusCommand); ok { + if casted, ok := structType.(CBusCommand); ok { return casted } if casted, ok := structType.(*CBusCommand); ok { @@ -129,6 +132,7 @@ func (m *_CBusCommand) GetTypeName() string { return "CBusCommand" } + func (m *_CBusCommand) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -163,7 +167,7 @@ func CBusCommandParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer if pullErr := readBuffer.PullContext("header"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for header") } - _header, _headerErr := CBusHeaderParseWithBuffer(ctx, readBuffer) +_header, _headerErr := CBusHeaderParseWithBuffer(ctx, readBuffer) if _headerErr != nil { return nil, errors.Wrap(_headerErr, "Error parsing 'header' field of CBusCommand") } @@ -185,20 +189,20 @@ func CBusCommandParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type CBusCommandChildSerializeRequirement interface { CBusCommand - InitializeParent(CBusCommand, CBusHeader) + InitializeParent(CBusCommand, CBusHeader) GetParent() CBusCommand } var _childTemp interface{} var _child CBusCommandChildSerializeRequirement var typeSwitchError error switch { - case 0 == 0 && isDeviceManagement == bool(true): // CBusCommandDeviceManagement +case 0==0 && isDeviceManagement == bool(true) : // CBusCommandDeviceManagement _childTemp, typeSwitchError = CBusCommandDeviceManagementParseWithBuffer(ctx, readBuffer, cBusOptions) - case destinationAddressType == DestinationAddressType_PointToPointToMultiPoint: // CBusCommandPointToPointToMultiPoint +case destinationAddressType == DestinationAddressType_PointToPointToMultiPoint : // CBusCommandPointToPointToMultiPoint _childTemp, typeSwitchError = CBusCommandPointToPointToMultiPointParseWithBuffer(ctx, readBuffer, cBusOptions) - case destinationAddressType == DestinationAddressType_PointToMultiPoint: // CBusCommandPointToMultiPoint +case destinationAddressType == DestinationAddressType_PointToMultiPoint : // CBusCommandPointToMultiPoint _childTemp, typeSwitchError = CBusCommandPointToMultiPointParseWithBuffer(ctx, readBuffer, cBusOptions) - case destinationAddressType == DestinationAddressType_PointToPoint: // CBusCommandPointToPoint +case destinationAddressType == DestinationAddressType_PointToPoint : // CBusCommandPointToPoint _childTemp, typeSwitchError = CBusCommandPointToPointParseWithBuffer(ctx, readBuffer, cBusOptions) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [destinationAddressType=%v, isDeviceManagement=%v]", destinationAddressType, isDeviceManagement) @@ -213,7 +217,7 @@ func CBusCommandParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer } // Finish initializing - _child.InitializeParent(_child, header) +_child.InitializeParent(_child , header ) return _child, nil } @@ -223,7 +227,7 @@ func (pm *_CBusCommand) SerializeParent(ctx context.Context, writeBuffer utils.W _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("CBusCommand"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("CBusCommand"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for CBusCommand") } @@ -258,13 +262,13 @@ func (pm *_CBusCommand) SerializeParent(ctx context.Context, writeBuffer utils.W return nil } + //// // Arguments Getter func (m *_CBusCommand) GetCBusOptions() CBusOptions { return m.CBusOptions } - // //// @@ -282,3 +286,6 @@ func (m *_CBusCommand) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/CBusCommandDeviceManagement.go b/plc4go/protocols/cbus/readwrite/model/CBusCommandDeviceManagement.go index b68b7df5923..b60692017b3 100644 --- a/plc4go/protocols/cbus/readwrite/model/CBusCommandDeviceManagement.go +++ b/plc4go/protocols/cbus/readwrite/model/CBusCommandDeviceManagement.go @@ -19,6 +19,7 @@ package model + import ( "context" "fmt" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const CBusCommandDeviceManagement_DELIMITER byte = 0x0 @@ -52,10 +54,12 @@ type CBusCommandDeviceManagementExactly interface { // _CBusCommandDeviceManagement is the data-structure of this message type _CBusCommandDeviceManagement struct { *_CBusCommand - ParamNo Parameter - ParameterValue byte + ParamNo Parameter + ParameterValue byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -66,14 +70,12 @@ type _CBusCommandDeviceManagement struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_CBusCommandDeviceManagement) InitializeParent(parent CBusCommand, header CBusHeader) { - m.Header = header +func (m *_CBusCommandDeviceManagement) InitializeParent(parent CBusCommand , header CBusHeader ) { m.Header = header } -func (m *_CBusCommandDeviceManagement) GetParent() CBusCommand { +func (m *_CBusCommandDeviceManagement) GetParent() CBusCommand { return m._CBusCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -105,12 +107,13 @@ func (m *_CBusCommandDeviceManagement) GetDelimiter() byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCBusCommandDeviceManagement factory function for _CBusCommandDeviceManagement -func NewCBusCommandDeviceManagement(paramNo Parameter, parameterValue byte, header CBusHeader, cBusOptions CBusOptions) *_CBusCommandDeviceManagement { +func NewCBusCommandDeviceManagement( paramNo Parameter , parameterValue byte , header CBusHeader , cBusOptions CBusOptions ) *_CBusCommandDeviceManagement { _result := &_CBusCommandDeviceManagement{ - ParamNo: paramNo, + ParamNo: paramNo, ParameterValue: parameterValue, - _CBusCommand: NewCBusCommand(header, cBusOptions), + _CBusCommand: NewCBusCommand(header, cBusOptions), } _result._CBusCommand._CBusCommandChildRequirements = _result return _result @@ -118,7 +121,7 @@ func NewCBusCommandDeviceManagement(paramNo Parameter, parameterValue byte, head // Deprecated: use the interface for direct cast func CastCBusCommandDeviceManagement(structType interface{}) CBusCommandDeviceManagement { - if casted, ok := structType.(CBusCommandDeviceManagement); ok { + if casted, ok := structType.(CBusCommandDeviceManagement); ok { return casted } if casted, ok := structType.(*CBusCommandDeviceManagement); ok { @@ -141,11 +144,12 @@ func (m *_CBusCommandDeviceManagement) GetLengthInBits(ctx context.Context) uint lengthInBits += 8 // Simple field (parameterValue) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_CBusCommandDeviceManagement) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -167,7 +171,7 @@ func CBusCommandDeviceManagementParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("paramNo"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for paramNo") } - _paramNo, _paramNoErr := ParameterParseWithBuffer(ctx, readBuffer) +_paramNo, _paramNoErr := ParameterParseWithBuffer(ctx, readBuffer) if _paramNoErr != nil { return nil, errors.Wrap(_paramNoErr, "Error parsing 'paramNo' field of CBusCommandDeviceManagement") } @@ -186,7 +190,7 @@ func CBusCommandDeviceManagementParseWithBuffer(ctx context.Context, readBuffer } // Simple Field (parameterValue) - _parameterValue, _parameterValueErr := readBuffer.ReadByte("parameterValue") +_parameterValue, _parameterValueErr := readBuffer.ReadByte("parameterValue") if _parameterValueErr != nil { return nil, errors.Wrap(_parameterValueErr, "Error parsing 'parameterValue' field of CBusCommandDeviceManagement") } @@ -201,7 +205,7 @@ func CBusCommandDeviceManagementParseWithBuffer(ctx context.Context, readBuffer _CBusCommand: &_CBusCommand{ CBusOptions: cBusOptions, }, - ParamNo: paramNo, + ParamNo: paramNo, ParameterValue: parameterValue, } _child._CBusCommand._CBusCommandChildRequirements = _child @@ -224,30 +228,30 @@ func (m *_CBusCommandDeviceManagement) SerializeWithWriteBuffer(ctx context.Cont return errors.Wrap(pushErr, "Error pushing for CBusCommandDeviceManagement") } - // Simple Field (paramNo) - if pushErr := writeBuffer.PushContext("paramNo"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for paramNo") - } - _paramNoErr := writeBuffer.WriteSerializable(ctx, m.GetParamNo()) - if popErr := writeBuffer.PopContext("paramNo"); popErr != nil { - return errors.Wrap(popErr, "Error popping for paramNo") - } - if _paramNoErr != nil { - return errors.Wrap(_paramNoErr, "Error serializing 'paramNo' field") - } + // Simple Field (paramNo) + if pushErr := writeBuffer.PushContext("paramNo"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for paramNo") + } + _paramNoErr := writeBuffer.WriteSerializable(ctx, m.GetParamNo()) + if popErr := writeBuffer.PopContext("paramNo"); popErr != nil { + return errors.Wrap(popErr, "Error popping for paramNo") + } + if _paramNoErr != nil { + return errors.Wrap(_paramNoErr, "Error serializing 'paramNo' field") + } - // Const Field (delimiter) - _delimiterErr := writeBuffer.WriteByte("delimiter", 0x0) - if _delimiterErr != nil { - return errors.Wrap(_delimiterErr, "Error serializing 'delimiter' field") - } + // Const Field (delimiter) + _delimiterErr := writeBuffer.WriteByte("delimiter", 0x0) + if _delimiterErr != nil { + return errors.Wrap(_delimiterErr, "Error serializing 'delimiter' field") + } - // Simple Field (parameterValue) - parameterValue := byte(m.GetParameterValue()) - _parameterValueErr := writeBuffer.WriteByte("parameterValue", (parameterValue)) - if _parameterValueErr != nil { - return errors.Wrap(_parameterValueErr, "Error serializing 'parameterValue' field") - } + // Simple Field (parameterValue) + parameterValue := byte(m.GetParameterValue()) + _parameterValueErr := writeBuffer.WriteByte("parameterValue", (parameterValue)) + if _parameterValueErr != nil { + return errors.Wrap(_parameterValueErr, "Error serializing 'parameterValue' field") + } if popErr := writeBuffer.PopContext("CBusCommandDeviceManagement"); popErr != nil { return errors.Wrap(popErr, "Error popping for CBusCommandDeviceManagement") @@ -257,6 +261,7 @@ func (m *_CBusCommandDeviceManagement) SerializeWithWriteBuffer(ctx context.Cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_CBusCommandDeviceManagement) isCBusCommandDeviceManagement() bool { return true } @@ -271,3 +276,6 @@ func (m *_CBusCommandDeviceManagement) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/CBusCommandPointToMultiPoint.go b/plc4go/protocols/cbus/readwrite/model/CBusCommandPointToMultiPoint.go index 5830c301f0a..0e7ac44e2f2 100644 --- a/plc4go/protocols/cbus/readwrite/model/CBusCommandPointToMultiPoint.go +++ b/plc4go/protocols/cbus/readwrite/model/CBusCommandPointToMultiPoint.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CBusCommandPointToMultiPoint is the corresponding interface of CBusCommandPointToMultiPoint type CBusCommandPointToMultiPoint interface { @@ -46,9 +48,11 @@ type CBusCommandPointToMultiPointExactly interface { // _CBusCommandPointToMultiPoint is the data-structure of this message type _CBusCommandPointToMultiPoint struct { *_CBusCommand - Command CBusPointToMultiPointCommand + Command CBusPointToMultiPointCommand } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _CBusCommandPointToMultiPoint struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_CBusCommandPointToMultiPoint) InitializeParent(parent CBusCommand, header CBusHeader) { - m.Header = header +func (m *_CBusCommandPointToMultiPoint) InitializeParent(parent CBusCommand , header CBusHeader ) { m.Header = header } -func (m *_CBusCommandPointToMultiPoint) GetParent() CBusCommand { +func (m *_CBusCommandPointToMultiPoint) GetParent() CBusCommand { return m._CBusCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_CBusCommandPointToMultiPoint) GetCommand() CBusPointToMultiPointComman /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCBusCommandPointToMultiPoint factory function for _CBusCommandPointToMultiPoint -func NewCBusCommandPointToMultiPoint(command CBusPointToMultiPointCommand, header CBusHeader, cBusOptions CBusOptions) *_CBusCommandPointToMultiPoint { +func NewCBusCommandPointToMultiPoint( command CBusPointToMultiPointCommand , header CBusHeader , cBusOptions CBusOptions ) *_CBusCommandPointToMultiPoint { _result := &_CBusCommandPointToMultiPoint{ - Command: command, - _CBusCommand: NewCBusCommand(header, cBusOptions), + Command: command, + _CBusCommand: NewCBusCommand(header, cBusOptions), } _result._CBusCommand._CBusCommandChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewCBusCommandPointToMultiPoint(command CBusPointToMultiPointCommand, heade // Deprecated: use the interface for direct cast func CastCBusCommandPointToMultiPoint(structType interface{}) CBusCommandPointToMultiPoint { - if casted, ok := structType.(CBusCommandPointToMultiPoint); ok { + if casted, ok := structType.(CBusCommandPointToMultiPoint); ok { return casted } if casted, ok := structType.(*CBusCommandPointToMultiPoint); ok { @@ -115,6 +118,7 @@ func (m *_CBusCommandPointToMultiPoint) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_CBusCommandPointToMultiPoint) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func CBusCommandPointToMultiPointParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("command"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for command") } - _command, _commandErr := CBusPointToMultiPointCommandParseWithBuffer(ctx, readBuffer, cBusOptions) +_command, _commandErr := CBusPointToMultiPointCommandParseWithBuffer(ctx, readBuffer , cBusOptions ) if _commandErr != nil { return nil, errors.Wrap(_commandErr, "Error parsing 'command' field of CBusCommandPointToMultiPoint") } @@ -176,17 +180,17 @@ func (m *_CBusCommandPointToMultiPoint) SerializeWithWriteBuffer(ctx context.Con return errors.Wrap(pushErr, "Error pushing for CBusCommandPointToMultiPoint") } - // Simple Field (command) - if pushErr := writeBuffer.PushContext("command"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for command") - } - _commandErr := writeBuffer.WriteSerializable(ctx, m.GetCommand()) - if popErr := writeBuffer.PopContext("command"); popErr != nil { - return errors.Wrap(popErr, "Error popping for command") - } - if _commandErr != nil { - return errors.Wrap(_commandErr, "Error serializing 'command' field") - } + // Simple Field (command) + if pushErr := writeBuffer.PushContext("command"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for command") + } + _commandErr := writeBuffer.WriteSerializable(ctx, m.GetCommand()) + if popErr := writeBuffer.PopContext("command"); popErr != nil { + return errors.Wrap(popErr, "Error popping for command") + } + if _commandErr != nil { + return errors.Wrap(_commandErr, "Error serializing 'command' field") + } if popErr := writeBuffer.PopContext("CBusCommandPointToMultiPoint"); popErr != nil { return errors.Wrap(popErr, "Error popping for CBusCommandPointToMultiPoint") @@ -196,6 +200,7 @@ func (m *_CBusCommandPointToMultiPoint) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_CBusCommandPointToMultiPoint) isCBusCommandPointToMultiPoint() bool { return true } @@ -210,3 +215,6 @@ func (m *_CBusCommandPointToMultiPoint) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/CBusCommandPointToPoint.go b/plc4go/protocols/cbus/readwrite/model/CBusCommandPointToPoint.go index 594b3706dda..bff3729ceeb 100644 --- a/plc4go/protocols/cbus/readwrite/model/CBusCommandPointToPoint.go +++ b/plc4go/protocols/cbus/readwrite/model/CBusCommandPointToPoint.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CBusCommandPointToPoint is the corresponding interface of CBusCommandPointToPoint type CBusCommandPointToPoint interface { @@ -46,9 +48,11 @@ type CBusCommandPointToPointExactly interface { // _CBusCommandPointToPoint is the data-structure of this message type _CBusCommandPointToPoint struct { *_CBusCommand - Command CBusPointToPointCommand + Command CBusPointToPointCommand } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _CBusCommandPointToPoint struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_CBusCommandPointToPoint) InitializeParent(parent CBusCommand, header CBusHeader) { - m.Header = header +func (m *_CBusCommandPointToPoint) InitializeParent(parent CBusCommand , header CBusHeader ) { m.Header = header } -func (m *_CBusCommandPointToPoint) GetParent() CBusCommand { +func (m *_CBusCommandPointToPoint) GetParent() CBusCommand { return m._CBusCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_CBusCommandPointToPoint) GetCommand() CBusPointToPointCommand { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCBusCommandPointToPoint factory function for _CBusCommandPointToPoint -func NewCBusCommandPointToPoint(command CBusPointToPointCommand, header CBusHeader, cBusOptions CBusOptions) *_CBusCommandPointToPoint { +func NewCBusCommandPointToPoint( command CBusPointToPointCommand , header CBusHeader , cBusOptions CBusOptions ) *_CBusCommandPointToPoint { _result := &_CBusCommandPointToPoint{ - Command: command, - _CBusCommand: NewCBusCommand(header, cBusOptions), + Command: command, + _CBusCommand: NewCBusCommand(header, cBusOptions), } _result._CBusCommand._CBusCommandChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewCBusCommandPointToPoint(command CBusPointToPointCommand, header CBusHead // Deprecated: use the interface for direct cast func CastCBusCommandPointToPoint(structType interface{}) CBusCommandPointToPoint { - if casted, ok := structType.(CBusCommandPointToPoint); ok { + if casted, ok := structType.(CBusCommandPointToPoint); ok { return casted } if casted, ok := structType.(*CBusCommandPointToPoint); ok { @@ -115,6 +118,7 @@ func (m *_CBusCommandPointToPoint) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_CBusCommandPointToPoint) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func CBusCommandPointToPointParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("command"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for command") } - _command, _commandErr := CBusPointToPointCommandParseWithBuffer(ctx, readBuffer, cBusOptions) +_command, _commandErr := CBusPointToPointCommandParseWithBuffer(ctx, readBuffer , cBusOptions ) if _commandErr != nil { return nil, errors.Wrap(_commandErr, "Error parsing 'command' field of CBusCommandPointToPoint") } @@ -176,17 +180,17 @@ func (m *_CBusCommandPointToPoint) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for CBusCommandPointToPoint") } - // Simple Field (command) - if pushErr := writeBuffer.PushContext("command"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for command") - } - _commandErr := writeBuffer.WriteSerializable(ctx, m.GetCommand()) - if popErr := writeBuffer.PopContext("command"); popErr != nil { - return errors.Wrap(popErr, "Error popping for command") - } - if _commandErr != nil { - return errors.Wrap(_commandErr, "Error serializing 'command' field") - } + // Simple Field (command) + if pushErr := writeBuffer.PushContext("command"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for command") + } + _commandErr := writeBuffer.WriteSerializable(ctx, m.GetCommand()) + if popErr := writeBuffer.PopContext("command"); popErr != nil { + return errors.Wrap(popErr, "Error popping for command") + } + if _commandErr != nil { + return errors.Wrap(_commandErr, "Error serializing 'command' field") + } if popErr := writeBuffer.PopContext("CBusCommandPointToPoint"); popErr != nil { return errors.Wrap(popErr, "Error popping for CBusCommandPointToPoint") @@ -196,6 +200,7 @@ func (m *_CBusCommandPointToPoint) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_CBusCommandPointToPoint) isCBusCommandPointToPoint() bool { return true } @@ -210,3 +215,6 @@ func (m *_CBusCommandPointToPoint) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/CBusCommandPointToPointToMultiPoint.go b/plc4go/protocols/cbus/readwrite/model/CBusCommandPointToPointToMultiPoint.go index 720807fea67..25566e454cb 100644 --- a/plc4go/protocols/cbus/readwrite/model/CBusCommandPointToPointToMultiPoint.go +++ b/plc4go/protocols/cbus/readwrite/model/CBusCommandPointToPointToMultiPoint.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CBusCommandPointToPointToMultiPoint is the corresponding interface of CBusCommandPointToPointToMultiPoint type CBusCommandPointToPointToMultiPoint interface { @@ -46,9 +48,11 @@ type CBusCommandPointToPointToMultiPointExactly interface { // _CBusCommandPointToPointToMultiPoint is the data-structure of this message type _CBusCommandPointToPointToMultiPoint struct { *_CBusCommand - Command CBusPointToPointToMultiPointCommand + Command CBusPointToPointToMultiPointCommand } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _CBusCommandPointToPointToMultiPoint struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_CBusCommandPointToPointToMultiPoint) InitializeParent(parent CBusCommand, header CBusHeader) { - m.Header = header +func (m *_CBusCommandPointToPointToMultiPoint) InitializeParent(parent CBusCommand , header CBusHeader ) { m.Header = header } -func (m *_CBusCommandPointToPointToMultiPoint) GetParent() CBusCommand { +func (m *_CBusCommandPointToPointToMultiPoint) GetParent() CBusCommand { return m._CBusCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_CBusCommandPointToPointToMultiPoint) GetCommand() CBusPointToPointToMu /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCBusCommandPointToPointToMultiPoint factory function for _CBusCommandPointToPointToMultiPoint -func NewCBusCommandPointToPointToMultiPoint(command CBusPointToPointToMultiPointCommand, header CBusHeader, cBusOptions CBusOptions) *_CBusCommandPointToPointToMultiPoint { +func NewCBusCommandPointToPointToMultiPoint( command CBusPointToPointToMultiPointCommand , header CBusHeader , cBusOptions CBusOptions ) *_CBusCommandPointToPointToMultiPoint { _result := &_CBusCommandPointToPointToMultiPoint{ - Command: command, - _CBusCommand: NewCBusCommand(header, cBusOptions), + Command: command, + _CBusCommand: NewCBusCommand(header, cBusOptions), } _result._CBusCommand._CBusCommandChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewCBusCommandPointToPointToMultiPoint(command CBusPointToPointToMultiPoint // Deprecated: use the interface for direct cast func CastCBusCommandPointToPointToMultiPoint(structType interface{}) CBusCommandPointToPointToMultiPoint { - if casted, ok := structType.(CBusCommandPointToPointToMultiPoint); ok { + if casted, ok := structType.(CBusCommandPointToPointToMultiPoint); ok { return casted } if casted, ok := structType.(*CBusCommandPointToPointToMultiPoint); ok { @@ -115,6 +118,7 @@ func (m *_CBusCommandPointToPointToMultiPoint) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_CBusCommandPointToPointToMultiPoint) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func CBusCommandPointToPointToMultiPointParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("command"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for command") } - _command, _commandErr := CBusPointToPointToMultiPointCommandParseWithBuffer(ctx, readBuffer, cBusOptions) +_command, _commandErr := CBusPointToPointToMultiPointCommandParseWithBuffer(ctx, readBuffer , cBusOptions ) if _commandErr != nil { return nil, errors.Wrap(_commandErr, "Error parsing 'command' field of CBusCommandPointToPointToMultiPoint") } @@ -176,17 +180,17 @@ func (m *_CBusCommandPointToPointToMultiPoint) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for CBusCommandPointToPointToMultiPoint") } - // Simple Field (command) - if pushErr := writeBuffer.PushContext("command"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for command") - } - _commandErr := writeBuffer.WriteSerializable(ctx, m.GetCommand()) - if popErr := writeBuffer.PopContext("command"); popErr != nil { - return errors.Wrap(popErr, "Error popping for command") - } - if _commandErr != nil { - return errors.Wrap(_commandErr, "Error serializing 'command' field") - } + // Simple Field (command) + if pushErr := writeBuffer.PushContext("command"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for command") + } + _commandErr := writeBuffer.WriteSerializable(ctx, m.GetCommand()) + if popErr := writeBuffer.PopContext("command"); popErr != nil { + return errors.Wrap(popErr, "Error popping for command") + } + if _commandErr != nil { + return errors.Wrap(_commandErr, "Error serializing 'command' field") + } if popErr := writeBuffer.PopContext("CBusCommandPointToPointToMultiPoint"); popErr != nil { return errors.Wrap(popErr, "Error popping for CBusCommandPointToPointToMultiPoint") @@ -196,6 +200,7 @@ func (m *_CBusCommandPointToPointToMultiPoint) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_CBusCommandPointToPointToMultiPoint) isCBusCommandPointToPointToMultiPoint() bool { return true } @@ -210,3 +215,6 @@ func (m *_CBusCommandPointToPointToMultiPoint) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/CBusConstants.go b/plc4go/protocols/cbus/readwrite/model/CBusConstants.go index 88bda45cb29..dd65fa2eb40 100644 --- a/plc4go/protocols/cbus/readwrite/model/CBusConstants.go +++ b/plc4go/protocols/cbus/readwrite/model/CBusConstants.go @@ -19,6 +19,7 @@ package model + import ( "context" "fmt" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const CBusConstants_CBUSTCPDEFAULTPORT uint16 = uint16(10001) @@ -48,6 +50,7 @@ type CBusConstantsExactly interface { type _CBusConstants struct { } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for const fields. @@ -62,14 +65,15 @@ func (m *_CBusConstants) GetCbusTcpDefaultPort() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCBusConstants factory function for _CBusConstants -func NewCBusConstants() *_CBusConstants { - return &_CBusConstants{} +func NewCBusConstants( ) *_CBusConstants { +return &_CBusConstants{ } } // Deprecated: use the interface for direct cast func CastCBusConstants(structType interface{}) CBusConstants { - if casted, ok := structType.(CBusConstants); ok { + if casted, ok := structType.(CBusConstants); ok { return casted } if casted, ok := structType.(*CBusConstants); ok { @@ -91,6 +95,7 @@ func (m *_CBusConstants) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_CBusConstants) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +127,8 @@ func CBusConstantsParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff } // Create the instance - return &_CBusConstants{}, nil + return &_CBusConstants{ + }, nil } func (m *_CBusConstants) Serialize() ([]byte, error) { @@ -136,7 +142,7 @@ func (m *_CBusConstants) Serialize() ([]byte, error) { func (m *_CBusConstants) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("CBusConstants"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("CBusConstants"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for CBusConstants") } @@ -152,6 +158,7 @@ func (m *_CBusConstants) SerializeWithWriteBuffer(ctx context.Context, writeBuff return nil } + func (m *_CBusConstants) isCBusConstants() bool { return true } @@ -166,3 +173,6 @@ func (m *_CBusConstants) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/CBusHeader.go b/plc4go/protocols/cbus/readwrite/model/CBusHeader.go index 79e7ed22a9b..a026e89fe0a 100644 --- a/plc4go/protocols/cbus/readwrite/model/CBusHeader.go +++ b/plc4go/protocols/cbus/readwrite/model/CBusHeader.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CBusHeader is the corresponding interface of CBusHeader type CBusHeader interface { @@ -50,12 +52,13 @@ type CBusHeaderExactly interface { // _CBusHeader is the data-structure of this message type _CBusHeader struct { - PriorityClass PriorityClass - Dp bool - Rc uint8 - DestinationAddressType DestinationAddressType + PriorityClass PriorityClass + Dp bool + Rc uint8 + DestinationAddressType DestinationAddressType } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -82,14 +85,15 @@ func (m *_CBusHeader) GetDestinationAddressType() DestinationAddressType { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCBusHeader factory function for _CBusHeader -func NewCBusHeader(priorityClass PriorityClass, dp bool, rc uint8, destinationAddressType DestinationAddressType) *_CBusHeader { - return &_CBusHeader{PriorityClass: priorityClass, Dp: dp, Rc: rc, DestinationAddressType: destinationAddressType} +func NewCBusHeader( priorityClass PriorityClass , dp bool , rc uint8 , destinationAddressType DestinationAddressType ) *_CBusHeader { +return &_CBusHeader{ PriorityClass: priorityClass , Dp: dp , Rc: rc , DestinationAddressType: destinationAddressType } } // Deprecated: use the interface for direct cast func CastCBusHeader(structType interface{}) CBusHeader { - if casted, ok := structType.(CBusHeader); ok { + if casted, ok := structType.(CBusHeader); ok { return casted } if casted, ok := structType.(*CBusHeader); ok { @@ -109,10 +113,10 @@ func (m *_CBusHeader) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += 2 // Simple field (dp) - lengthInBits += 1 + lengthInBits += 1; // Simple field (rc) - lengthInBits += 2 + lengthInBits += 2; // Simple field (destinationAddressType) lengthInBits += 3 @@ -120,6 +124,7 @@ func (m *_CBusHeader) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_CBusHeader) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -141,7 +146,7 @@ func CBusHeaderParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) if pullErr := readBuffer.PullContext("priorityClass"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for priorityClass") } - _priorityClass, _priorityClassErr := PriorityClassParseWithBuffer(ctx, readBuffer) +_priorityClass, _priorityClassErr := PriorityClassParseWithBuffer(ctx, readBuffer) if _priorityClassErr != nil { return nil, errors.Wrap(_priorityClassErr, "Error parsing 'priorityClass' field of CBusHeader") } @@ -151,14 +156,14 @@ func CBusHeaderParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) } // Simple Field (dp) - _dp, _dpErr := readBuffer.ReadBit("dp") +_dp, _dpErr := readBuffer.ReadBit("dp") if _dpErr != nil { return nil, errors.Wrap(_dpErr, "Error parsing 'dp' field of CBusHeader") } dp := _dp // Simple Field (rc) - _rc, _rcErr := readBuffer.ReadUint8("rc", 2) +_rc, _rcErr := readBuffer.ReadUint8("rc", 2) if _rcErr != nil { return nil, errors.Wrap(_rcErr, "Error parsing 'rc' field of CBusHeader") } @@ -168,7 +173,7 @@ func CBusHeaderParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) if pullErr := readBuffer.PullContext("destinationAddressType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for destinationAddressType") } - _destinationAddressType, _destinationAddressTypeErr := DestinationAddressTypeParseWithBuffer(ctx, readBuffer) +_destinationAddressType, _destinationAddressTypeErr := DestinationAddressTypeParseWithBuffer(ctx, readBuffer) if _destinationAddressTypeErr != nil { return nil, errors.Wrap(_destinationAddressTypeErr, "Error parsing 'destinationAddressType' field of CBusHeader") } @@ -183,11 +188,11 @@ func CBusHeaderParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) // Create the instance return &_CBusHeader{ - PriorityClass: priorityClass, - Dp: dp, - Rc: rc, - DestinationAddressType: destinationAddressType, - }, nil + PriorityClass: priorityClass, + Dp: dp, + Rc: rc, + DestinationAddressType: destinationAddressType, + }, nil } func (m *_CBusHeader) Serialize() ([]byte, error) { @@ -201,7 +206,7 @@ func (m *_CBusHeader) Serialize() ([]byte, error) { func (m *_CBusHeader) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("CBusHeader"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("CBusHeader"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for CBusHeader") } @@ -249,6 +254,7 @@ func (m *_CBusHeader) SerializeWithWriteBuffer(ctx context.Context, writeBuffer return nil } + func (m *_CBusHeader) isCBusHeader() bool { return true } @@ -263,3 +269,6 @@ func (m *_CBusHeader) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/CBusMessage.go b/plc4go/protocols/cbus/readwrite/model/CBusMessage.go index 176a9198e69..82c56388891 100644 --- a/plc4go/protocols/cbus/readwrite/model/CBusMessage.go +++ b/plc4go/protocols/cbus/readwrite/model/CBusMessage.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CBusMessage is the corresponding interface of CBusMessage type CBusMessage interface { @@ -48,7 +50,7 @@ type _CBusMessage struct { // Arguments. RequestContext RequestContext - CBusOptions CBusOptions + CBusOptions CBusOptions } type _CBusMessageChildRequirements interface { @@ -57,6 +59,7 @@ type _CBusMessageChildRequirements interface { GetIsResponse() bool } + type CBusMessageParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child CBusMessage, serializeChildFunction func() error) error GetTypeName() string @@ -64,21 +67,22 @@ type CBusMessageParent interface { type CBusMessageChild interface { utils.Serializable - InitializeParent(parent CBusMessage) +InitializeParent(parent CBusMessage ) GetParent() *CBusMessage GetTypeName() string CBusMessage } + // NewCBusMessage factory function for _CBusMessage -func NewCBusMessage(requestContext RequestContext, cBusOptions CBusOptions) *_CBusMessage { - return &_CBusMessage{RequestContext: requestContext, CBusOptions: cBusOptions} +func NewCBusMessage( requestContext RequestContext , cBusOptions CBusOptions ) *_CBusMessage { +return &_CBusMessage{ RequestContext: requestContext , CBusOptions: cBusOptions } } // Deprecated: use the interface for direct cast func CastCBusMessage(structType interface{}) CBusMessage { - if casted, ok := structType.(CBusMessage); ok { + if casted, ok := structType.(CBusMessage); ok { return casted } if casted, ok := structType.(*CBusMessage); ok { @@ -91,6 +95,7 @@ func (m *_CBusMessage) GetTypeName() string { return "CBusMessage" } + func (m *_CBusMessage) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -115,28 +120,28 @@ func CBusMessageParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer _ = currentPos // Validation - if !(bool((requestContext) != (nil))) { + if (!(bool((requestContext) != (nil)))) { return nil, errors.WithStack(utils.ParseValidationError{"requestContext required"}) } // Validation - if !(bool((cBusOptions) != (nil))) { + if (!(bool((cBusOptions) != (nil)))) { return nil, errors.WithStack(utils.ParseValidationError{"cBusOptions required"}) } // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type CBusMessageChildSerializeRequirement interface { CBusMessage - InitializeParent(CBusMessage) + InitializeParent(CBusMessage ) GetParent() CBusMessage } var _childTemp interface{} var _child CBusMessageChildSerializeRequirement var typeSwitchError error switch { - case isResponse == bool(false): // CBusMessageToServer +case isResponse == bool(false) : // CBusMessageToServer _childTemp, typeSwitchError = CBusMessageToServerParseWithBuffer(ctx, readBuffer, isResponse, requestContext, cBusOptions) - case isResponse == bool(true): // CBusMessageToClient +case isResponse == bool(true) : // CBusMessageToClient _childTemp, typeSwitchError = CBusMessageToClientParseWithBuffer(ctx, readBuffer, isResponse, requestContext, cBusOptions) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [isResponse=%v]", isResponse) @@ -151,7 +156,7 @@ func CBusMessageParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer } // Finish initializing - _child.InitializeParent(_child) +_child.InitializeParent(_child ) return _child, nil } @@ -161,7 +166,7 @@ func (pm *_CBusMessage) SerializeParent(ctx context.Context, writeBuffer utils.W _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("CBusMessage"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("CBusMessage"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for CBusMessage") } @@ -176,6 +181,7 @@ func (pm *_CBusMessage) SerializeParent(ctx context.Context, writeBuffer utils.W return nil } + //// // Arguments Getter @@ -185,7 +191,6 @@ func (m *_CBusMessage) GetRequestContext() RequestContext { func (m *_CBusMessage) GetCBusOptions() CBusOptions { return m.CBusOptions } - // //// @@ -203,3 +208,6 @@ func (m *_CBusMessage) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/CBusMessageToClient.go b/plc4go/protocols/cbus/readwrite/model/CBusMessageToClient.go index 807b5ab6674..21d703a5fdb 100644 --- a/plc4go/protocols/cbus/readwrite/model/CBusMessageToClient.go +++ b/plc4go/protocols/cbus/readwrite/model/CBusMessageToClient.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CBusMessageToClient is the corresponding interface of CBusMessageToClient type CBusMessageToClient interface { @@ -46,29 +48,29 @@ type CBusMessageToClientExactly interface { // _CBusMessageToClient is the data-structure of this message type _CBusMessageToClient struct { *_CBusMessage - Reply ReplyOrConfirmation + Reply ReplyOrConfirmation } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_CBusMessageToClient) GetIsResponse() bool { - return bool(true) -} +func (m *_CBusMessageToClient) GetIsResponse() bool { +return bool(true)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_CBusMessageToClient) InitializeParent(parent CBusMessage) {} +func (m *_CBusMessageToClient) InitializeParent(parent CBusMessage ) {} -func (m *_CBusMessageToClient) GetParent() CBusMessage { +func (m *_CBusMessageToClient) GetParent() CBusMessage { return m._CBusMessage } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_CBusMessageToClient) GetReply() ReplyOrConfirmation { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCBusMessageToClient factory function for _CBusMessageToClient -func NewCBusMessageToClient(reply ReplyOrConfirmation, requestContext RequestContext, cBusOptions CBusOptions) *_CBusMessageToClient { +func NewCBusMessageToClient( reply ReplyOrConfirmation , requestContext RequestContext , cBusOptions CBusOptions ) *_CBusMessageToClient { _result := &_CBusMessageToClient{ - Reply: reply, - _CBusMessage: NewCBusMessage(requestContext, cBusOptions), + Reply: reply, + _CBusMessage: NewCBusMessage(requestContext, cBusOptions), } _result._CBusMessage._CBusMessageChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewCBusMessageToClient(reply ReplyOrConfirmation, requestContext RequestCon // Deprecated: use the interface for direct cast func CastCBusMessageToClient(structType interface{}) CBusMessageToClient { - if casted, ok := structType.(CBusMessageToClient); ok { + if casted, ok := structType.(CBusMessageToClient); ok { return casted } if casted, ok := structType.(*CBusMessageToClient); ok { @@ -117,6 +120,7 @@ func (m *_CBusMessageToClient) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_CBusMessageToClient) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func CBusMessageToClientParseWithBuffer(ctx context.Context, readBuffer utils.Re if pullErr := readBuffer.PullContext("reply"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for reply") } - _reply, _replyErr := ReplyOrConfirmationParseWithBuffer(ctx, readBuffer, cBusOptions, requestContext) +_reply, _replyErr := ReplyOrConfirmationParseWithBuffer(ctx, readBuffer , cBusOptions , requestContext ) if _replyErr != nil { return nil, errors.Wrap(_replyErr, "Error parsing 'reply' field of CBusMessageToClient") } @@ -155,7 +159,7 @@ func CBusMessageToClientParseWithBuffer(ctx context.Context, readBuffer utils.Re _child := &_CBusMessageToClient{ _CBusMessage: &_CBusMessage{ RequestContext: requestContext, - CBusOptions: cBusOptions, + CBusOptions: cBusOptions, }, Reply: reply, } @@ -179,17 +183,17 @@ func (m *_CBusMessageToClient) SerializeWithWriteBuffer(ctx context.Context, wri return errors.Wrap(pushErr, "Error pushing for CBusMessageToClient") } - // Simple Field (reply) - if pushErr := writeBuffer.PushContext("reply"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for reply") - } - _replyErr := writeBuffer.WriteSerializable(ctx, m.GetReply()) - if popErr := writeBuffer.PopContext("reply"); popErr != nil { - return errors.Wrap(popErr, "Error popping for reply") - } - if _replyErr != nil { - return errors.Wrap(_replyErr, "Error serializing 'reply' field") - } + // Simple Field (reply) + if pushErr := writeBuffer.PushContext("reply"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for reply") + } + _replyErr := writeBuffer.WriteSerializable(ctx, m.GetReply()) + if popErr := writeBuffer.PopContext("reply"); popErr != nil { + return errors.Wrap(popErr, "Error popping for reply") + } + if _replyErr != nil { + return errors.Wrap(_replyErr, "Error serializing 'reply' field") + } if popErr := writeBuffer.PopContext("CBusMessageToClient"); popErr != nil { return errors.Wrap(popErr, "Error popping for CBusMessageToClient") @@ -199,6 +203,7 @@ func (m *_CBusMessageToClient) SerializeWithWriteBuffer(ctx context.Context, wri return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_CBusMessageToClient) isCBusMessageToClient() bool { return true } @@ -213,3 +218,6 @@ func (m *_CBusMessageToClient) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/CBusMessageToServer.go b/plc4go/protocols/cbus/readwrite/model/CBusMessageToServer.go index a817f97022f..c1e8e04094a 100644 --- a/plc4go/protocols/cbus/readwrite/model/CBusMessageToServer.go +++ b/plc4go/protocols/cbus/readwrite/model/CBusMessageToServer.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CBusMessageToServer is the corresponding interface of CBusMessageToServer type CBusMessageToServer interface { @@ -46,29 +48,29 @@ type CBusMessageToServerExactly interface { // _CBusMessageToServer is the data-structure of this message type _CBusMessageToServer struct { *_CBusMessage - Request Request + Request Request } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_CBusMessageToServer) GetIsResponse() bool { - return bool(false) -} +func (m *_CBusMessageToServer) GetIsResponse() bool { +return bool(false)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_CBusMessageToServer) InitializeParent(parent CBusMessage) {} +func (m *_CBusMessageToServer) InitializeParent(parent CBusMessage ) {} -func (m *_CBusMessageToServer) GetParent() CBusMessage { +func (m *_CBusMessageToServer) GetParent() CBusMessage { return m._CBusMessage } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_CBusMessageToServer) GetRequest() Request { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCBusMessageToServer factory function for _CBusMessageToServer -func NewCBusMessageToServer(request Request, requestContext RequestContext, cBusOptions CBusOptions) *_CBusMessageToServer { +func NewCBusMessageToServer( request Request , requestContext RequestContext , cBusOptions CBusOptions ) *_CBusMessageToServer { _result := &_CBusMessageToServer{ - Request: request, - _CBusMessage: NewCBusMessage(requestContext, cBusOptions), + Request: request, + _CBusMessage: NewCBusMessage(requestContext, cBusOptions), } _result._CBusMessage._CBusMessageChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewCBusMessageToServer(request Request, requestContext RequestContext, cBus // Deprecated: use the interface for direct cast func CastCBusMessageToServer(structType interface{}) CBusMessageToServer { - if casted, ok := structType.(CBusMessageToServer); ok { + if casted, ok := structType.(CBusMessageToServer); ok { return casted } if casted, ok := structType.(*CBusMessageToServer); ok { @@ -117,6 +120,7 @@ func (m *_CBusMessageToServer) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_CBusMessageToServer) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func CBusMessageToServerParseWithBuffer(ctx context.Context, readBuffer utils.Re if pullErr := readBuffer.PullContext("request"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for request") } - _request, _requestErr := RequestParseWithBuffer(ctx, readBuffer, cBusOptions) +_request, _requestErr := RequestParseWithBuffer(ctx, readBuffer , cBusOptions ) if _requestErr != nil { return nil, errors.Wrap(_requestErr, "Error parsing 'request' field of CBusMessageToServer") } @@ -155,7 +159,7 @@ func CBusMessageToServerParseWithBuffer(ctx context.Context, readBuffer utils.Re _child := &_CBusMessageToServer{ _CBusMessage: &_CBusMessage{ RequestContext: requestContext, - CBusOptions: cBusOptions, + CBusOptions: cBusOptions, }, Request: request, } @@ -179,17 +183,17 @@ func (m *_CBusMessageToServer) SerializeWithWriteBuffer(ctx context.Context, wri return errors.Wrap(pushErr, "Error pushing for CBusMessageToServer") } - // Simple Field (request) - if pushErr := writeBuffer.PushContext("request"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for request") - } - _requestErr := writeBuffer.WriteSerializable(ctx, m.GetRequest()) - if popErr := writeBuffer.PopContext("request"); popErr != nil { - return errors.Wrap(popErr, "Error popping for request") - } - if _requestErr != nil { - return errors.Wrap(_requestErr, "Error serializing 'request' field") - } + // Simple Field (request) + if pushErr := writeBuffer.PushContext("request"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for request") + } + _requestErr := writeBuffer.WriteSerializable(ctx, m.GetRequest()) + if popErr := writeBuffer.PopContext("request"); popErr != nil { + return errors.Wrap(popErr, "Error popping for request") + } + if _requestErr != nil { + return errors.Wrap(_requestErr, "Error serializing 'request' field") + } if popErr := writeBuffer.PopContext("CBusMessageToServer"); popErr != nil { return errors.Wrap(popErr, "Error popping for CBusMessageToServer") @@ -199,6 +203,7 @@ func (m *_CBusMessageToServer) SerializeWithWriteBuffer(ctx context.Context, wri return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_CBusMessageToServer) isCBusMessageToServer() bool { return true } @@ -213,3 +218,6 @@ func (m *_CBusMessageToServer) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/CBusOptions.go b/plc4go/protocols/cbus/readwrite/model/CBusOptions.go index cb08cca6510..41cf5a2cc28 100644 --- a/plc4go/protocols/cbus/readwrite/model/CBusOptions.go +++ b/plc4go/protocols/cbus/readwrite/model/CBusOptions.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CBusOptions is the corresponding interface of CBusOptions type CBusOptions interface { @@ -60,17 +62,18 @@ type CBusOptionsExactly interface { // _CBusOptions is the data-structure of this message type _CBusOptions struct { - Connect bool - Smart bool - Idmon bool - Exstat bool - Monitor bool - Monall bool - Pun bool - Pcn bool - Srchk bool + Connect bool + Smart bool + Idmon bool + Exstat bool + Monitor bool + Monall bool + Pun bool + Pcn bool + Srchk bool } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -117,14 +120,15 @@ func (m *_CBusOptions) GetSrchk() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCBusOptions factory function for _CBusOptions -func NewCBusOptions(connect bool, smart bool, idmon bool, exstat bool, monitor bool, monall bool, pun bool, pcn bool, srchk bool) *_CBusOptions { - return &_CBusOptions{Connect: connect, Smart: smart, Idmon: idmon, Exstat: exstat, Monitor: monitor, Monall: monall, Pun: pun, Pcn: pcn, Srchk: srchk} +func NewCBusOptions( connect bool , smart bool , idmon bool , exstat bool , monitor bool , monall bool , pun bool , pcn bool , srchk bool ) *_CBusOptions { +return &_CBusOptions{ Connect: connect , Smart: smart , Idmon: idmon , Exstat: exstat , Monitor: monitor , Monall: monall , Pun: pun , Pcn: pcn , Srchk: srchk } } // Deprecated: use the interface for direct cast func CastCBusOptions(structType interface{}) CBusOptions { - if casted, ok := structType.(CBusOptions); ok { + if casted, ok := structType.(CBusOptions); ok { return casted } if casted, ok := structType.(*CBusOptions); ok { @@ -141,35 +145,36 @@ func (m *_CBusOptions) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (connect) - lengthInBits += 1 + lengthInBits += 1; // Simple field (smart) - lengthInBits += 1 + lengthInBits += 1; // Simple field (idmon) - lengthInBits += 1 + lengthInBits += 1; // Simple field (exstat) - lengthInBits += 1 + lengthInBits += 1; // Simple field (monitor) - lengthInBits += 1 + lengthInBits += 1; // Simple field (monall) - lengthInBits += 1 + lengthInBits += 1; // Simple field (pun) - lengthInBits += 1 + lengthInBits += 1; // Simple field (pcn) - lengthInBits += 1 + lengthInBits += 1; // Simple field (srchk) - lengthInBits += 1 + lengthInBits += 1; return lengthInBits } + func (m *_CBusOptions) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -188,63 +193,63 @@ func CBusOptionsParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer _ = currentPos // Simple Field (connect) - _connect, _connectErr := readBuffer.ReadBit("connect") +_connect, _connectErr := readBuffer.ReadBit("connect") if _connectErr != nil { return nil, errors.Wrap(_connectErr, "Error parsing 'connect' field of CBusOptions") } connect := _connect // Simple Field (smart) - _smart, _smartErr := readBuffer.ReadBit("smart") +_smart, _smartErr := readBuffer.ReadBit("smart") if _smartErr != nil { return nil, errors.Wrap(_smartErr, "Error parsing 'smart' field of CBusOptions") } smart := _smart // Simple Field (idmon) - _idmon, _idmonErr := readBuffer.ReadBit("idmon") +_idmon, _idmonErr := readBuffer.ReadBit("idmon") if _idmonErr != nil { return nil, errors.Wrap(_idmonErr, "Error parsing 'idmon' field of CBusOptions") } idmon := _idmon // Simple Field (exstat) - _exstat, _exstatErr := readBuffer.ReadBit("exstat") +_exstat, _exstatErr := readBuffer.ReadBit("exstat") if _exstatErr != nil { return nil, errors.Wrap(_exstatErr, "Error parsing 'exstat' field of CBusOptions") } exstat := _exstat // Simple Field (monitor) - _monitor, _monitorErr := readBuffer.ReadBit("monitor") +_monitor, _monitorErr := readBuffer.ReadBit("monitor") if _monitorErr != nil { return nil, errors.Wrap(_monitorErr, "Error parsing 'monitor' field of CBusOptions") } monitor := _monitor // Simple Field (monall) - _monall, _monallErr := readBuffer.ReadBit("monall") +_monall, _monallErr := readBuffer.ReadBit("monall") if _monallErr != nil { return nil, errors.Wrap(_monallErr, "Error parsing 'monall' field of CBusOptions") } monall := _monall // Simple Field (pun) - _pun, _punErr := readBuffer.ReadBit("pun") +_pun, _punErr := readBuffer.ReadBit("pun") if _punErr != nil { return nil, errors.Wrap(_punErr, "Error parsing 'pun' field of CBusOptions") } pun := _pun // Simple Field (pcn) - _pcn, _pcnErr := readBuffer.ReadBit("pcn") +_pcn, _pcnErr := readBuffer.ReadBit("pcn") if _pcnErr != nil { return nil, errors.Wrap(_pcnErr, "Error parsing 'pcn' field of CBusOptions") } pcn := _pcn // Simple Field (srchk) - _srchk, _srchkErr := readBuffer.ReadBit("srchk") +_srchk, _srchkErr := readBuffer.ReadBit("srchk") if _srchkErr != nil { return nil, errors.Wrap(_srchkErr, "Error parsing 'srchk' field of CBusOptions") } @@ -256,16 +261,16 @@ func CBusOptionsParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer // Create the instance return &_CBusOptions{ - Connect: connect, - Smart: smart, - Idmon: idmon, - Exstat: exstat, - Monitor: monitor, - Monall: monall, - Pun: pun, - Pcn: pcn, - Srchk: srchk, - }, nil + Connect: connect, + Smart: smart, + Idmon: idmon, + Exstat: exstat, + Monitor: monitor, + Monall: monall, + Pun: pun, + Pcn: pcn, + Srchk: srchk, + }, nil } func (m *_CBusOptions) Serialize() ([]byte, error) { @@ -279,7 +284,7 @@ func (m *_CBusOptions) Serialize() ([]byte, error) { func (m *_CBusOptions) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("CBusOptions"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("CBusOptions"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for CBusOptions") } @@ -352,6 +357,7 @@ func (m *_CBusOptions) SerializeWithWriteBuffer(ctx context.Context, writeBuffer return nil } + func (m *_CBusOptions) isCBusOptions() bool { return true } @@ -366,3 +372,6 @@ func (m *_CBusOptions) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/CBusPointToMultiPointCommand.go b/plc4go/protocols/cbus/readwrite/model/CBusPointToMultiPointCommand.go index 3a4b4db3326..ed05527d1f6 100644 --- a/plc4go/protocols/cbus/readwrite/model/CBusPointToMultiPointCommand.go +++ b/plc4go/protocols/cbus/readwrite/model/CBusPointToMultiPointCommand.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CBusPointToMultiPointCommand is the corresponding interface of CBusPointToMultiPointCommand type CBusPointToMultiPointCommand interface { @@ -45,7 +47,7 @@ type CBusPointToMultiPointCommandExactly interface { // _CBusPointToMultiPointCommand is the data-structure of this message type _CBusPointToMultiPointCommand struct { _CBusPointToMultiPointCommandChildRequirements - PeekedApplication byte + PeekedApplication byte // Arguments. CBusOptions CBusOptions @@ -56,6 +58,7 @@ type _CBusPointToMultiPointCommandChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type CBusPointToMultiPointCommandParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child CBusPointToMultiPointCommand, serializeChildFunction func() error) error GetTypeName() string @@ -63,13 +66,12 @@ type CBusPointToMultiPointCommandParent interface { type CBusPointToMultiPointCommandChild interface { utils.Serializable - InitializeParent(parent CBusPointToMultiPointCommand, peekedApplication byte) +InitializeParent(parent CBusPointToMultiPointCommand , peekedApplication byte ) GetParent() *CBusPointToMultiPointCommand GetTypeName() string CBusPointToMultiPointCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -84,14 +86,15 @@ func (m *_CBusPointToMultiPointCommand) GetPeekedApplication() byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCBusPointToMultiPointCommand factory function for _CBusPointToMultiPointCommand -func NewCBusPointToMultiPointCommand(peekedApplication byte, cBusOptions CBusOptions) *_CBusPointToMultiPointCommand { - return &_CBusPointToMultiPointCommand{PeekedApplication: peekedApplication, CBusOptions: cBusOptions} +func NewCBusPointToMultiPointCommand( peekedApplication byte , cBusOptions CBusOptions ) *_CBusPointToMultiPointCommand { +return &_CBusPointToMultiPointCommand{ PeekedApplication: peekedApplication , CBusOptions: cBusOptions } } // Deprecated: use the interface for direct cast func CastCBusPointToMultiPointCommand(structType interface{}) CBusPointToMultiPointCommand { - if casted, ok := structType.(CBusPointToMultiPointCommand); ok { + if casted, ok := structType.(CBusPointToMultiPointCommand); ok { return casted } if casted, ok := structType.(*CBusPointToMultiPointCommand); ok { @@ -104,6 +107,7 @@ func (m *_CBusPointToMultiPointCommand) GetTypeName() string { return "CBusPointToMultiPointCommand" } + func (m *_CBusPointToMultiPointCommand) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -127,28 +131,28 @@ func CBusPointToMultiPointCommandParseWithBuffer(ctx context.Context, readBuffer currentPos := positionAware.GetPos() _ = currentPos - // Peek Field (peekedApplication) - currentPos = positionAware.GetPos() - peekedApplication, _err := readBuffer.ReadByte("peekedApplication") - if _err != nil { - return nil, errors.Wrap(_err, "Error parsing 'peekedApplication' field of CBusPointToMultiPointCommand") - } + // Peek Field (peekedApplication) + currentPos = positionAware.GetPos() + peekedApplication, _err := readBuffer.ReadByte("peekedApplication") + if _err != nil { + return nil, errors.Wrap(_err, "Error parsing 'peekedApplication' field of CBusPointToMultiPointCommand") + } - readBuffer.Reset(currentPos) + readBuffer.Reset(currentPos) // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type CBusPointToMultiPointCommandChildSerializeRequirement interface { CBusPointToMultiPointCommand - InitializeParent(CBusPointToMultiPointCommand, byte) + InitializeParent(CBusPointToMultiPointCommand, byte) GetParent() CBusPointToMultiPointCommand } var _childTemp interface{} var _child CBusPointToMultiPointCommandChildSerializeRequirement var typeSwitchError error switch { - case peekedApplication == 0xFF: // CBusPointToMultiPointCommandStatus +case peekedApplication == 0xFF : // CBusPointToMultiPointCommandStatus _childTemp, typeSwitchError = CBusPointToMultiPointCommandStatusParseWithBuffer(ctx, readBuffer, cBusOptions) - case 0 == 0: // CBusPointToMultiPointCommandNormal +case 0==0 : // CBusPointToMultiPointCommandNormal _childTemp, typeSwitchError = CBusPointToMultiPointCommandNormalParseWithBuffer(ctx, readBuffer, cBusOptions) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedApplication=%v]", peekedApplication) @@ -163,7 +167,7 @@ func CBusPointToMultiPointCommandParseWithBuffer(ctx context.Context, readBuffer } // Finish initializing - _child.InitializeParent(_child, peekedApplication) +_child.InitializeParent(_child , peekedApplication ) return _child, nil } @@ -173,7 +177,7 @@ func (pm *_CBusPointToMultiPointCommand) SerializeParent(ctx context.Context, wr _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("CBusPointToMultiPointCommand"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("CBusPointToMultiPointCommand"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for CBusPointToMultiPointCommand") } @@ -188,13 +192,13 @@ func (pm *_CBusPointToMultiPointCommand) SerializeParent(ctx context.Context, wr return nil } + //// // Arguments Getter func (m *_CBusPointToMultiPointCommand) GetCBusOptions() CBusOptions { return m.CBusOptions } - // //// @@ -212,3 +216,6 @@ func (m *_CBusPointToMultiPointCommand) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/CBusPointToMultiPointCommandNormal.go b/plc4go/protocols/cbus/readwrite/model/CBusPointToMultiPointCommandNormal.go index aefd4a3122e..edca2ed3c1f 100644 --- a/plc4go/protocols/cbus/readwrite/model/CBusPointToMultiPointCommandNormal.go +++ b/plc4go/protocols/cbus/readwrite/model/CBusPointToMultiPointCommandNormal.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CBusPointToMultiPointCommandNormal is the corresponding interface of CBusPointToMultiPointCommandNormal type CBusPointToMultiPointCommandNormal interface { @@ -48,12 +50,14 @@ type CBusPointToMultiPointCommandNormalExactly interface { // _CBusPointToMultiPointCommandNormal is the data-structure of this message type _CBusPointToMultiPointCommandNormal struct { *_CBusPointToMultiPointCommand - Application ApplicationIdContainer - SalData SALData + Application ApplicationIdContainer + SalData SALData // Reserved Fields reservedField0 *byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -64,14 +68,12 @@ type _CBusPointToMultiPointCommandNormal struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_CBusPointToMultiPointCommandNormal) InitializeParent(parent CBusPointToMultiPointCommand, peekedApplication byte) { - m.PeekedApplication = peekedApplication +func (m *_CBusPointToMultiPointCommandNormal) InitializeParent(parent CBusPointToMultiPointCommand , peekedApplication byte ) { m.PeekedApplication = peekedApplication } -func (m *_CBusPointToMultiPointCommandNormal) GetParent() CBusPointToMultiPointCommand { +func (m *_CBusPointToMultiPointCommandNormal) GetParent() CBusPointToMultiPointCommand { return m._CBusPointToMultiPointCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_CBusPointToMultiPointCommandNormal) GetSalData() SALData { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCBusPointToMultiPointCommandNormal factory function for _CBusPointToMultiPointCommandNormal -func NewCBusPointToMultiPointCommandNormal(application ApplicationIdContainer, salData SALData, peekedApplication byte, cBusOptions CBusOptions) *_CBusPointToMultiPointCommandNormal { +func NewCBusPointToMultiPointCommandNormal( application ApplicationIdContainer , salData SALData , peekedApplication byte , cBusOptions CBusOptions ) *_CBusPointToMultiPointCommandNormal { _result := &_CBusPointToMultiPointCommandNormal{ - Application: application, - SalData: salData, - _CBusPointToMultiPointCommand: NewCBusPointToMultiPointCommand(peekedApplication, cBusOptions), + Application: application, + SalData: salData, + _CBusPointToMultiPointCommand: NewCBusPointToMultiPointCommand(peekedApplication, cBusOptions), } _result._CBusPointToMultiPointCommand._CBusPointToMultiPointCommandChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewCBusPointToMultiPointCommandNormal(application ApplicationIdContainer, s // Deprecated: use the interface for direct cast func CastCBusPointToMultiPointCommandNormal(structType interface{}) CBusPointToMultiPointCommandNormal { - if casted, ok := structType.(CBusPointToMultiPointCommandNormal); ok { + if casted, ok := structType.(CBusPointToMultiPointCommandNormal); ok { return casted } if casted, ok := structType.(*CBusPointToMultiPointCommandNormal); ok { @@ -131,6 +134,7 @@ func (m *_CBusPointToMultiPointCommandNormal) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_CBusPointToMultiPointCommandNormal) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -152,7 +156,7 @@ func CBusPointToMultiPointCommandNormalParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("application"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for application") } - _application, _applicationErr := ApplicationIdContainerParseWithBuffer(ctx, readBuffer) +_application, _applicationErr := ApplicationIdContainerParseWithBuffer(ctx, readBuffer) if _applicationErr != nil { return nil, errors.Wrap(_applicationErr, "Error parsing 'application' field of CBusPointToMultiPointCommandNormal") } @@ -171,7 +175,7 @@ func CBusPointToMultiPointCommandNormalParseWithBuffer(ctx context.Context, read if reserved != byte(0x00) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": byte(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -182,7 +186,7 @@ func CBusPointToMultiPointCommandNormalParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("salData"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for salData") } - _salData, _salDataErr := SALDataParseWithBuffer(ctx, readBuffer, ApplicationId(application.ApplicationId())) +_salData, _salDataErr := SALDataParseWithBuffer(ctx, readBuffer , ApplicationId( application.ApplicationId() ) ) if _salDataErr != nil { return nil, errors.Wrap(_salDataErr, "Error parsing 'salData' field of CBusPointToMultiPointCommandNormal") } @@ -200,8 +204,8 @@ func CBusPointToMultiPointCommandNormalParseWithBuffer(ctx context.Context, read _CBusPointToMultiPointCommand: &_CBusPointToMultiPointCommand{ CBusOptions: cBusOptions, }, - Application: application, - SalData: salData, + Application: application, + SalData: salData, reservedField0: reservedField0, } _child._CBusPointToMultiPointCommand._CBusPointToMultiPointCommandChildRequirements = _child @@ -224,45 +228,45 @@ func (m *_CBusPointToMultiPointCommandNormal) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for CBusPointToMultiPointCommandNormal") } - // Simple Field (application) - if pushErr := writeBuffer.PushContext("application"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for application") - } - _applicationErr := writeBuffer.WriteSerializable(ctx, m.GetApplication()) - if popErr := writeBuffer.PopContext("application"); popErr != nil { - return errors.Wrap(popErr, "Error popping for application") - } - if _applicationErr != nil { - return errors.Wrap(_applicationErr, "Error serializing 'application' field") - } - - // Reserved Field (reserved) - { - var reserved byte = byte(0x00) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": byte(0x00), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteByte("reserved", reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } - } + // Simple Field (application) + if pushErr := writeBuffer.PushContext("application"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for application") + } + _applicationErr := writeBuffer.WriteSerializable(ctx, m.GetApplication()) + if popErr := writeBuffer.PopContext("application"); popErr != nil { + return errors.Wrap(popErr, "Error popping for application") + } + if _applicationErr != nil { + return errors.Wrap(_applicationErr, "Error serializing 'application' field") + } - // Simple Field (salData) - if pushErr := writeBuffer.PushContext("salData"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for salData") - } - _salDataErr := writeBuffer.WriteSerializable(ctx, m.GetSalData()) - if popErr := writeBuffer.PopContext("salData"); popErr != nil { - return errors.Wrap(popErr, "Error popping for salData") + // Reserved Field (reserved) + { + var reserved byte = byte(0x00) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": byte(0x00), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 } - if _salDataErr != nil { - return errors.Wrap(_salDataErr, "Error serializing 'salData' field") + _err := writeBuffer.WriteByte("reserved", reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } + + // Simple Field (salData) + if pushErr := writeBuffer.PushContext("salData"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for salData") + } + _salDataErr := writeBuffer.WriteSerializable(ctx, m.GetSalData()) + if popErr := writeBuffer.PopContext("salData"); popErr != nil { + return errors.Wrap(popErr, "Error popping for salData") + } + if _salDataErr != nil { + return errors.Wrap(_salDataErr, "Error serializing 'salData' field") + } if popErr := writeBuffer.PopContext("CBusPointToMultiPointCommandNormal"); popErr != nil { return errors.Wrap(popErr, "Error popping for CBusPointToMultiPointCommandNormal") @@ -272,6 +276,7 @@ func (m *_CBusPointToMultiPointCommandNormal) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_CBusPointToMultiPointCommandNormal) isCBusPointToMultiPointCommandNormal() bool { return true } @@ -286,3 +291,6 @@ func (m *_CBusPointToMultiPointCommandNormal) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/CBusPointToMultiPointCommandStatus.go b/plc4go/protocols/cbus/readwrite/model/CBusPointToMultiPointCommandStatus.go index bcd2a460556..33d6954ad55 100644 --- a/plc4go/protocols/cbus/readwrite/model/CBusPointToMultiPointCommandStatus.go +++ b/plc4go/protocols/cbus/readwrite/model/CBusPointToMultiPointCommandStatus.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CBusPointToMultiPointCommandStatus is the corresponding interface of CBusPointToMultiPointCommandStatus type CBusPointToMultiPointCommandStatus interface { @@ -46,12 +48,14 @@ type CBusPointToMultiPointCommandStatusExactly interface { // _CBusPointToMultiPointCommandStatus is the data-structure of this message type _CBusPointToMultiPointCommandStatus struct { *_CBusPointToMultiPointCommand - StatusRequest StatusRequest + StatusRequest StatusRequest // Reserved Fields reservedField0 *byte reservedField1 *byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -62,14 +66,12 @@ type _CBusPointToMultiPointCommandStatus struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_CBusPointToMultiPointCommandStatus) InitializeParent(parent CBusPointToMultiPointCommand, peekedApplication byte) { - m.PeekedApplication = peekedApplication +func (m *_CBusPointToMultiPointCommandStatus) InitializeParent(parent CBusPointToMultiPointCommand , peekedApplication byte ) { m.PeekedApplication = peekedApplication } -func (m *_CBusPointToMultiPointCommandStatus) GetParent() CBusPointToMultiPointCommand { +func (m *_CBusPointToMultiPointCommandStatus) GetParent() CBusPointToMultiPointCommand { return m._CBusPointToMultiPointCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -84,11 +86,12 @@ func (m *_CBusPointToMultiPointCommandStatus) GetStatusRequest() StatusRequest { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCBusPointToMultiPointCommandStatus factory function for _CBusPointToMultiPointCommandStatus -func NewCBusPointToMultiPointCommandStatus(statusRequest StatusRequest, peekedApplication byte, cBusOptions CBusOptions) *_CBusPointToMultiPointCommandStatus { +func NewCBusPointToMultiPointCommandStatus( statusRequest StatusRequest , peekedApplication byte , cBusOptions CBusOptions ) *_CBusPointToMultiPointCommandStatus { _result := &_CBusPointToMultiPointCommandStatus{ - StatusRequest: statusRequest, - _CBusPointToMultiPointCommand: NewCBusPointToMultiPointCommand(peekedApplication, cBusOptions), + StatusRequest: statusRequest, + _CBusPointToMultiPointCommand: NewCBusPointToMultiPointCommand(peekedApplication, cBusOptions), } _result._CBusPointToMultiPointCommand._CBusPointToMultiPointCommandChildRequirements = _result return _result @@ -96,7 +99,7 @@ func NewCBusPointToMultiPointCommandStatus(statusRequest StatusRequest, peekedAp // Deprecated: use the interface for direct cast func CastCBusPointToMultiPointCommandStatus(structType interface{}) CBusPointToMultiPointCommandStatus { - if casted, ok := structType.(CBusPointToMultiPointCommandStatus); ok { + if casted, ok := structType.(CBusPointToMultiPointCommandStatus); ok { return casted } if casted, ok := structType.(*CBusPointToMultiPointCommandStatus); ok { @@ -124,6 +127,7 @@ func (m *_CBusPointToMultiPointCommandStatus) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_CBusPointToMultiPointCommandStatus) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,7 +155,7 @@ func CBusPointToMultiPointCommandStatusParseWithBuffer(ctx context.Context, read if reserved != byte(0xFF) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": byte(0xFF), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -168,7 +172,7 @@ func CBusPointToMultiPointCommandStatusParseWithBuffer(ctx context.Context, read if reserved != byte(0x00) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": byte(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField1 = &reserved @@ -179,7 +183,7 @@ func CBusPointToMultiPointCommandStatusParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("statusRequest"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for statusRequest") } - _statusRequest, _statusRequestErr := StatusRequestParseWithBuffer(ctx, readBuffer) +_statusRequest, _statusRequestErr := StatusRequestParseWithBuffer(ctx, readBuffer) if _statusRequestErr != nil { return nil, errors.Wrap(_statusRequestErr, "Error parsing 'statusRequest' field of CBusPointToMultiPointCommandStatus") } @@ -197,7 +201,7 @@ func CBusPointToMultiPointCommandStatusParseWithBuffer(ctx context.Context, read _CBusPointToMultiPointCommand: &_CBusPointToMultiPointCommand{ CBusOptions: cBusOptions, }, - StatusRequest: statusRequest, + StatusRequest: statusRequest, reservedField0: reservedField0, reservedField1: reservedField1, } @@ -221,49 +225,49 @@ func (m *_CBusPointToMultiPointCommandStatus) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for CBusPointToMultiPointCommandStatus") } - // Reserved Field (reserved) - { - var reserved byte = byte(0xFF) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": byte(0xFF), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteByte("reserved", reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + // Reserved Field (reserved) + { + var reserved byte = byte(0xFF) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": byte(0xFF), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 } - - // Reserved Field (reserved) - { - var reserved byte = byte(0x00) - if m.reservedField1 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": byte(0x00), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField1 - } - _err := writeBuffer.WriteByte("reserved", reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + _err := writeBuffer.WriteByte("reserved", reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } - // Simple Field (statusRequest) - if pushErr := writeBuffer.PushContext("statusRequest"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for statusRequest") - } - _statusRequestErr := writeBuffer.WriteSerializable(ctx, m.GetStatusRequest()) - if popErr := writeBuffer.PopContext("statusRequest"); popErr != nil { - return errors.Wrap(popErr, "Error popping for statusRequest") + // Reserved Field (reserved) + { + var reserved byte = byte(0x00) + if m.reservedField1 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": byte(0x00), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField1 } - if _statusRequestErr != nil { - return errors.Wrap(_statusRequestErr, "Error serializing 'statusRequest' field") + _err := writeBuffer.WriteByte("reserved", reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } + + // Simple Field (statusRequest) + if pushErr := writeBuffer.PushContext("statusRequest"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for statusRequest") + } + _statusRequestErr := writeBuffer.WriteSerializable(ctx, m.GetStatusRequest()) + if popErr := writeBuffer.PopContext("statusRequest"); popErr != nil { + return errors.Wrap(popErr, "Error popping for statusRequest") + } + if _statusRequestErr != nil { + return errors.Wrap(_statusRequestErr, "Error serializing 'statusRequest' field") + } if popErr := writeBuffer.PopContext("CBusPointToMultiPointCommandStatus"); popErr != nil { return errors.Wrap(popErr, "Error popping for CBusPointToMultiPointCommandStatus") @@ -273,6 +277,7 @@ func (m *_CBusPointToMultiPointCommandStatus) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_CBusPointToMultiPointCommandStatus) isCBusPointToMultiPointCommandStatus() bool { return true } @@ -287,3 +292,6 @@ func (m *_CBusPointToMultiPointCommandStatus) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/CBusPointToPointCommand.go b/plc4go/protocols/cbus/readwrite/model/CBusPointToPointCommand.go index f8f807b6dff..64064b695d2 100644 --- a/plc4go/protocols/cbus/readwrite/model/CBusPointToPointCommand.go +++ b/plc4go/protocols/cbus/readwrite/model/CBusPointToPointCommand.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CBusPointToPointCommand is the corresponding interface of CBusPointToPointCommand type CBusPointToPointCommand interface { @@ -49,8 +51,8 @@ type CBusPointToPointCommandExactly interface { // _CBusPointToPointCommand is the data-structure of this message type _CBusPointToPointCommand struct { _CBusPointToPointCommandChildRequirements - BridgeAddressCountPeek uint16 - CalData CALData + BridgeAddressCountPeek uint16 + CalData CALData // Arguments. CBusOptions CBusOptions @@ -61,6 +63,7 @@ type _CBusPointToPointCommandChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type CBusPointToPointCommandParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child CBusPointToPointCommand, serializeChildFunction func() error) error GetTypeName() string @@ -68,13 +71,12 @@ type CBusPointToPointCommandParent interface { type CBusPointToPointCommandChild interface { utils.Serializable - InitializeParent(parent CBusPointToPointCommand, bridgeAddressCountPeek uint16, calData CALData) +InitializeParent(parent CBusPointToPointCommand , bridgeAddressCountPeek uint16 , calData CALData ) GetParent() *CBusPointToPointCommand GetTypeName() string CBusPointToPointCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -100,7 +102,7 @@ func (m *_CBusPointToPointCommand) GetCalData() CALData { func (m *_CBusPointToPointCommand) GetIsDirect() bool { ctx := context.Background() _ = ctx - return bool(bool((m.GetBridgeAddressCountPeek() & 0x00FF) == (0x0000))) + return bool(bool(((m.GetBridgeAddressCountPeek()& 0x00FF)) == (0x0000))) } /////////////////////// @@ -108,14 +110,15 @@ func (m *_CBusPointToPointCommand) GetIsDirect() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCBusPointToPointCommand factory function for _CBusPointToPointCommand -func NewCBusPointToPointCommand(bridgeAddressCountPeek uint16, calData CALData, cBusOptions CBusOptions) *_CBusPointToPointCommand { - return &_CBusPointToPointCommand{BridgeAddressCountPeek: bridgeAddressCountPeek, CalData: calData, CBusOptions: cBusOptions} +func NewCBusPointToPointCommand( bridgeAddressCountPeek uint16 , calData CALData , cBusOptions CBusOptions ) *_CBusPointToPointCommand { +return &_CBusPointToPointCommand{ BridgeAddressCountPeek: bridgeAddressCountPeek , CalData: calData , CBusOptions: cBusOptions } } // Deprecated: use the interface for direct cast func CastCBusPointToPointCommand(structType interface{}) CBusPointToPointCommand { - if casted, ok := structType.(CBusPointToPointCommand); ok { + if casted, ok := structType.(CBusPointToPointCommand); ok { return casted } if casted, ok := structType.(*CBusPointToPointCommand); ok { @@ -128,6 +131,7 @@ func (m *_CBusPointToPointCommand) GetTypeName() string { return "CBusPointToPointCommand" } + func (m *_CBusPointToPointCommand) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -156,33 +160,33 @@ func CBusPointToPointCommandParseWithBuffer(ctx context.Context, readBuffer util currentPos := positionAware.GetPos() _ = currentPos - // Peek Field (bridgeAddressCountPeek) - currentPos = positionAware.GetPos() - bridgeAddressCountPeek, _err := readBuffer.ReadUint16("bridgeAddressCountPeek", 16) - if _err != nil { - return nil, errors.Wrap(_err, "Error parsing 'bridgeAddressCountPeek' field of CBusPointToPointCommand") - } + // Peek Field (bridgeAddressCountPeek) + currentPos = positionAware.GetPos() + bridgeAddressCountPeek, _err := readBuffer.ReadUint16("bridgeAddressCountPeek", 16) + if _err != nil { + return nil, errors.Wrap(_err, "Error parsing 'bridgeAddressCountPeek' field of CBusPointToPointCommand") + } - readBuffer.Reset(currentPos) + readBuffer.Reset(currentPos) // Virtual field - _isDirect := bool((bridgeAddressCountPeek & 0x00FF) == (0x0000)) + _isDirect := bool(((bridgeAddressCountPeek& 0x00FF)) == (0x0000)) isDirect := bool(_isDirect) _ = isDirect // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type CBusPointToPointCommandChildSerializeRequirement interface { CBusPointToPointCommand - InitializeParent(CBusPointToPointCommand, uint16, CALData) + InitializeParent(CBusPointToPointCommand, uint16, CALData) GetParent() CBusPointToPointCommand } var _childTemp interface{} var _child CBusPointToPointCommandChildSerializeRequirement var typeSwitchError error switch { - case isDirect == bool(true): // CBusPointToPointCommandDirect +case isDirect == bool(true) : // CBusPointToPointCommandDirect _childTemp, typeSwitchError = CBusPointToPointCommandDirectParseWithBuffer(ctx, readBuffer, cBusOptions) - case isDirect == bool(false): // CBusPointToPointCommandIndirect +case isDirect == bool(false) : // CBusPointToPointCommandIndirect _childTemp, typeSwitchError = CBusPointToPointCommandIndirectParseWithBuffer(ctx, readBuffer, cBusOptions) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [isDirect=%v]", isDirect) @@ -196,7 +200,7 @@ func CBusPointToPointCommandParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("calData"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for calData") } - _calData, _calDataErr := CALDataParseWithBuffer(ctx, readBuffer, nil) +_calData, _calDataErr := CALDataParseWithBuffer(ctx, readBuffer , nil ) if _calDataErr != nil { return nil, errors.Wrap(_calDataErr, "Error parsing 'calData' field of CBusPointToPointCommand") } @@ -210,7 +214,7 @@ func CBusPointToPointCommandParseWithBuffer(ctx context.Context, readBuffer util } // Finish initializing - _child.InitializeParent(_child, bridgeAddressCountPeek, calData) +_child.InitializeParent(_child , bridgeAddressCountPeek , calData ) return _child, nil } @@ -220,7 +224,7 @@ func (pm *_CBusPointToPointCommand) SerializeParent(ctx context.Context, writeBu _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("CBusPointToPointCommand"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("CBusPointToPointCommand"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for CBusPointToPointCommand") } // Virtual field @@ -251,13 +255,13 @@ func (pm *_CBusPointToPointCommand) SerializeParent(ctx context.Context, writeBu return nil } + //// // Arguments Getter func (m *_CBusPointToPointCommand) GetCBusOptions() CBusOptions { return m.CBusOptions } - // //// @@ -275,3 +279,6 @@ func (m *_CBusPointToPointCommand) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/CBusPointToPointCommandDirect.go b/plc4go/protocols/cbus/readwrite/model/CBusPointToPointCommandDirect.go index dc6fa9062aa..61103418cfd 100644 --- a/plc4go/protocols/cbus/readwrite/model/CBusPointToPointCommandDirect.go +++ b/plc4go/protocols/cbus/readwrite/model/CBusPointToPointCommandDirect.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CBusPointToPointCommandDirect is the corresponding interface of CBusPointToPointCommandDirect type CBusPointToPointCommandDirect interface { @@ -46,11 +48,13 @@ type CBusPointToPointCommandDirectExactly interface { // _CBusPointToPointCommandDirect is the data-structure of this message type _CBusPointToPointCommandDirect struct { *_CBusPointToPointCommand - UnitAddress UnitAddress + UnitAddress UnitAddress // Reserved Fields reservedField0 *uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -61,15 +65,13 @@ type _CBusPointToPointCommandDirect struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_CBusPointToPointCommandDirect) InitializeParent(parent CBusPointToPointCommand, bridgeAddressCountPeek uint16, calData CALData) { - m.BridgeAddressCountPeek = bridgeAddressCountPeek +func (m *_CBusPointToPointCommandDirect) InitializeParent(parent CBusPointToPointCommand , bridgeAddressCountPeek uint16 , calData CALData ) { m.BridgeAddressCountPeek = bridgeAddressCountPeek m.CalData = calData } -func (m *_CBusPointToPointCommandDirect) GetParent() CBusPointToPointCommand { +func (m *_CBusPointToPointCommandDirect) GetParent() CBusPointToPointCommand { return m._CBusPointToPointCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -84,11 +86,12 @@ func (m *_CBusPointToPointCommandDirect) GetUnitAddress() UnitAddress { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCBusPointToPointCommandDirect factory function for _CBusPointToPointCommandDirect -func NewCBusPointToPointCommandDirect(unitAddress UnitAddress, bridgeAddressCountPeek uint16, calData CALData, cBusOptions CBusOptions) *_CBusPointToPointCommandDirect { +func NewCBusPointToPointCommandDirect( unitAddress UnitAddress , bridgeAddressCountPeek uint16 , calData CALData , cBusOptions CBusOptions ) *_CBusPointToPointCommandDirect { _result := &_CBusPointToPointCommandDirect{ - UnitAddress: unitAddress, - _CBusPointToPointCommand: NewCBusPointToPointCommand(bridgeAddressCountPeek, calData, cBusOptions), + UnitAddress: unitAddress, + _CBusPointToPointCommand: NewCBusPointToPointCommand(bridgeAddressCountPeek, calData, cBusOptions), } _result._CBusPointToPointCommand._CBusPointToPointCommandChildRequirements = _result return _result @@ -96,7 +99,7 @@ func NewCBusPointToPointCommandDirect(unitAddress UnitAddress, bridgeAddressCoun // Deprecated: use the interface for direct cast func CastCBusPointToPointCommandDirect(structType interface{}) CBusPointToPointCommandDirect { - if casted, ok := structType.(CBusPointToPointCommandDirect); ok { + if casted, ok := structType.(CBusPointToPointCommandDirect); ok { return casted } if casted, ok := structType.(*CBusPointToPointCommandDirect); ok { @@ -121,6 +124,7 @@ func (m *_CBusPointToPointCommandDirect) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_CBusPointToPointCommandDirect) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -142,7 +146,7 @@ func CBusPointToPointCommandDirectParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("unitAddress"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for unitAddress") } - _unitAddress, _unitAddressErr := UnitAddressParseWithBuffer(ctx, readBuffer) +_unitAddress, _unitAddressErr := UnitAddressParseWithBuffer(ctx, readBuffer) if _unitAddressErr != nil { return nil, errors.Wrap(_unitAddressErr, "Error parsing 'unitAddress' field of CBusPointToPointCommandDirect") } @@ -161,7 +165,7 @@ func CBusPointToPointCommandDirectParseWithBuffer(ctx context.Context, readBuffe if reserved != uint8(0x00) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -177,7 +181,7 @@ func CBusPointToPointCommandDirectParseWithBuffer(ctx context.Context, readBuffe _CBusPointToPointCommand: &_CBusPointToPointCommand{ CBusOptions: cBusOptions, }, - UnitAddress: unitAddress, + UnitAddress: unitAddress, reservedField0: reservedField0, } _child._CBusPointToPointCommand._CBusPointToPointCommandChildRequirements = _child @@ -200,33 +204,33 @@ func (m *_CBusPointToPointCommandDirect) SerializeWithWriteBuffer(ctx context.Co return errors.Wrap(pushErr, "Error pushing for CBusPointToPointCommandDirect") } - // Simple Field (unitAddress) - if pushErr := writeBuffer.PushContext("unitAddress"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for unitAddress") - } - _unitAddressErr := writeBuffer.WriteSerializable(ctx, m.GetUnitAddress()) - if popErr := writeBuffer.PopContext("unitAddress"); popErr != nil { - return errors.Wrap(popErr, "Error popping for unitAddress") - } - if _unitAddressErr != nil { - return errors.Wrap(_unitAddressErr, "Error serializing 'unitAddress' field") - } + // Simple Field (unitAddress) + if pushErr := writeBuffer.PushContext("unitAddress"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for unitAddress") + } + _unitAddressErr := writeBuffer.WriteSerializable(ctx, m.GetUnitAddress()) + if popErr := writeBuffer.PopContext("unitAddress"); popErr != nil { + return errors.Wrap(popErr, "Error popping for unitAddress") + } + if _unitAddressErr != nil { + return errors.Wrap(_unitAddressErr, "Error serializing 'unitAddress' field") + } - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0x00) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0x00), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteUint8("reserved", 8, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0x00) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0x00), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 } + _err := writeBuffer.WriteUint8("reserved", 8, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") + } + } if popErr := writeBuffer.PopContext("CBusPointToPointCommandDirect"); popErr != nil { return errors.Wrap(popErr, "Error popping for CBusPointToPointCommandDirect") @@ -236,6 +240,7 @@ func (m *_CBusPointToPointCommandDirect) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_CBusPointToPointCommandDirect) isCBusPointToPointCommandDirect() bool { return true } @@ -250,3 +255,6 @@ func (m *_CBusPointToPointCommandDirect) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/CBusPointToPointCommandIndirect.go b/plc4go/protocols/cbus/readwrite/model/CBusPointToPointCommandIndirect.go index 5384442ae5f..a3efe08e390 100644 --- a/plc4go/protocols/cbus/readwrite/model/CBusPointToPointCommandIndirect.go +++ b/plc4go/protocols/cbus/readwrite/model/CBusPointToPointCommandIndirect.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CBusPointToPointCommandIndirect is the corresponding interface of CBusPointToPointCommandIndirect type CBusPointToPointCommandIndirect interface { @@ -50,11 +52,13 @@ type CBusPointToPointCommandIndirectExactly interface { // _CBusPointToPointCommandIndirect is the data-structure of this message type _CBusPointToPointCommandIndirect struct { *_CBusPointToPointCommand - BridgeAddress BridgeAddress - NetworkRoute NetworkRoute - UnitAddress UnitAddress + BridgeAddress BridgeAddress + NetworkRoute NetworkRoute + UnitAddress UnitAddress } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -65,15 +69,13 @@ type _CBusPointToPointCommandIndirect struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_CBusPointToPointCommandIndirect) InitializeParent(parent CBusPointToPointCommand, bridgeAddressCountPeek uint16, calData CALData) { - m.BridgeAddressCountPeek = bridgeAddressCountPeek +func (m *_CBusPointToPointCommandIndirect) InitializeParent(parent CBusPointToPointCommand , bridgeAddressCountPeek uint16 , calData CALData ) { m.BridgeAddressCountPeek = bridgeAddressCountPeek m.CalData = calData } -func (m *_CBusPointToPointCommandIndirect) GetParent() CBusPointToPointCommand { +func (m *_CBusPointToPointCommandIndirect) GetParent() CBusPointToPointCommand { return m._CBusPointToPointCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,13 +98,14 @@ func (m *_CBusPointToPointCommandIndirect) GetUnitAddress() UnitAddress { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCBusPointToPointCommandIndirect factory function for _CBusPointToPointCommandIndirect -func NewCBusPointToPointCommandIndirect(bridgeAddress BridgeAddress, networkRoute NetworkRoute, unitAddress UnitAddress, bridgeAddressCountPeek uint16, calData CALData, cBusOptions CBusOptions) *_CBusPointToPointCommandIndirect { +func NewCBusPointToPointCommandIndirect( bridgeAddress BridgeAddress , networkRoute NetworkRoute , unitAddress UnitAddress , bridgeAddressCountPeek uint16 , calData CALData , cBusOptions CBusOptions ) *_CBusPointToPointCommandIndirect { _result := &_CBusPointToPointCommandIndirect{ - BridgeAddress: bridgeAddress, - NetworkRoute: networkRoute, - UnitAddress: unitAddress, - _CBusPointToPointCommand: NewCBusPointToPointCommand(bridgeAddressCountPeek, calData, cBusOptions), + BridgeAddress: bridgeAddress, + NetworkRoute: networkRoute, + UnitAddress: unitAddress, + _CBusPointToPointCommand: NewCBusPointToPointCommand(bridgeAddressCountPeek, calData, cBusOptions), } _result._CBusPointToPointCommand._CBusPointToPointCommandChildRequirements = _result return _result @@ -110,7 +113,7 @@ func NewCBusPointToPointCommandIndirect(bridgeAddress BridgeAddress, networkRout // Deprecated: use the interface for direct cast func CastCBusPointToPointCommandIndirect(structType interface{}) CBusPointToPointCommandIndirect { - if casted, ok := structType.(CBusPointToPointCommandIndirect); ok { + if casted, ok := structType.(CBusPointToPointCommandIndirect); ok { return casted } if casted, ok := structType.(*CBusPointToPointCommandIndirect); ok { @@ -138,6 +141,7 @@ func (m *_CBusPointToPointCommandIndirect) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_CBusPointToPointCommandIndirect) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -159,7 +163,7 @@ func CBusPointToPointCommandIndirectParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("bridgeAddress"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for bridgeAddress") } - _bridgeAddress, _bridgeAddressErr := BridgeAddressParseWithBuffer(ctx, readBuffer) +_bridgeAddress, _bridgeAddressErr := BridgeAddressParseWithBuffer(ctx, readBuffer) if _bridgeAddressErr != nil { return nil, errors.Wrap(_bridgeAddressErr, "Error parsing 'bridgeAddress' field of CBusPointToPointCommandIndirect") } @@ -172,7 +176,7 @@ func CBusPointToPointCommandIndirectParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("networkRoute"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for networkRoute") } - _networkRoute, _networkRouteErr := NetworkRouteParseWithBuffer(ctx, readBuffer) +_networkRoute, _networkRouteErr := NetworkRouteParseWithBuffer(ctx, readBuffer) if _networkRouteErr != nil { return nil, errors.Wrap(_networkRouteErr, "Error parsing 'networkRoute' field of CBusPointToPointCommandIndirect") } @@ -185,7 +189,7 @@ func CBusPointToPointCommandIndirectParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("unitAddress"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for unitAddress") } - _unitAddress, _unitAddressErr := UnitAddressParseWithBuffer(ctx, readBuffer) +_unitAddress, _unitAddressErr := UnitAddressParseWithBuffer(ctx, readBuffer) if _unitAddressErr != nil { return nil, errors.Wrap(_unitAddressErr, "Error parsing 'unitAddress' field of CBusPointToPointCommandIndirect") } @@ -204,8 +208,8 @@ func CBusPointToPointCommandIndirectParseWithBuffer(ctx context.Context, readBuf CBusOptions: cBusOptions, }, BridgeAddress: bridgeAddress, - NetworkRoute: networkRoute, - UnitAddress: unitAddress, + NetworkRoute: networkRoute, + UnitAddress: unitAddress, } _child._CBusPointToPointCommand._CBusPointToPointCommandChildRequirements = _child return _child, nil @@ -227,41 +231,41 @@ func (m *_CBusPointToPointCommandIndirect) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for CBusPointToPointCommandIndirect") } - // Simple Field (bridgeAddress) - if pushErr := writeBuffer.PushContext("bridgeAddress"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for bridgeAddress") - } - _bridgeAddressErr := writeBuffer.WriteSerializable(ctx, m.GetBridgeAddress()) - if popErr := writeBuffer.PopContext("bridgeAddress"); popErr != nil { - return errors.Wrap(popErr, "Error popping for bridgeAddress") - } - if _bridgeAddressErr != nil { - return errors.Wrap(_bridgeAddressErr, "Error serializing 'bridgeAddress' field") - } + // Simple Field (bridgeAddress) + if pushErr := writeBuffer.PushContext("bridgeAddress"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for bridgeAddress") + } + _bridgeAddressErr := writeBuffer.WriteSerializable(ctx, m.GetBridgeAddress()) + if popErr := writeBuffer.PopContext("bridgeAddress"); popErr != nil { + return errors.Wrap(popErr, "Error popping for bridgeAddress") + } + if _bridgeAddressErr != nil { + return errors.Wrap(_bridgeAddressErr, "Error serializing 'bridgeAddress' field") + } - // Simple Field (networkRoute) - if pushErr := writeBuffer.PushContext("networkRoute"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for networkRoute") - } - _networkRouteErr := writeBuffer.WriteSerializable(ctx, m.GetNetworkRoute()) - if popErr := writeBuffer.PopContext("networkRoute"); popErr != nil { - return errors.Wrap(popErr, "Error popping for networkRoute") - } - if _networkRouteErr != nil { - return errors.Wrap(_networkRouteErr, "Error serializing 'networkRoute' field") - } + // Simple Field (networkRoute) + if pushErr := writeBuffer.PushContext("networkRoute"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for networkRoute") + } + _networkRouteErr := writeBuffer.WriteSerializable(ctx, m.GetNetworkRoute()) + if popErr := writeBuffer.PopContext("networkRoute"); popErr != nil { + return errors.Wrap(popErr, "Error popping for networkRoute") + } + if _networkRouteErr != nil { + return errors.Wrap(_networkRouteErr, "Error serializing 'networkRoute' field") + } - // Simple Field (unitAddress) - if pushErr := writeBuffer.PushContext("unitAddress"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for unitAddress") - } - _unitAddressErr := writeBuffer.WriteSerializable(ctx, m.GetUnitAddress()) - if popErr := writeBuffer.PopContext("unitAddress"); popErr != nil { - return errors.Wrap(popErr, "Error popping for unitAddress") - } - if _unitAddressErr != nil { - return errors.Wrap(_unitAddressErr, "Error serializing 'unitAddress' field") - } + // Simple Field (unitAddress) + if pushErr := writeBuffer.PushContext("unitAddress"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for unitAddress") + } + _unitAddressErr := writeBuffer.WriteSerializable(ctx, m.GetUnitAddress()) + if popErr := writeBuffer.PopContext("unitAddress"); popErr != nil { + return errors.Wrap(popErr, "Error popping for unitAddress") + } + if _unitAddressErr != nil { + return errors.Wrap(_unitAddressErr, "Error serializing 'unitAddress' field") + } if popErr := writeBuffer.PopContext("CBusPointToPointCommandIndirect"); popErr != nil { return errors.Wrap(popErr, "Error popping for CBusPointToPointCommandIndirect") @@ -271,6 +275,7 @@ func (m *_CBusPointToPointCommandIndirect) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_CBusPointToPointCommandIndirect) isCBusPointToPointCommandIndirect() bool { return true } @@ -285,3 +290,6 @@ func (m *_CBusPointToPointCommandIndirect) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/CBusPointToPointToMultiPointCommand.go b/plc4go/protocols/cbus/readwrite/model/CBusPointToPointToMultiPointCommand.go index bbaa6bca15c..ed5df50ceda 100644 --- a/plc4go/protocols/cbus/readwrite/model/CBusPointToPointToMultiPointCommand.go +++ b/plc4go/protocols/cbus/readwrite/model/CBusPointToPointToMultiPointCommand.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CBusPointToPointToMultiPointCommand is the corresponding interface of CBusPointToPointToMultiPointCommand type CBusPointToPointToMultiPointCommand interface { @@ -49,9 +51,9 @@ type CBusPointToPointToMultiPointCommandExactly interface { // _CBusPointToPointToMultiPointCommand is the data-structure of this message type _CBusPointToPointToMultiPointCommand struct { _CBusPointToPointToMultiPointCommandChildRequirements - BridgeAddress BridgeAddress - NetworkRoute NetworkRoute - PeekedApplication byte + BridgeAddress BridgeAddress + NetworkRoute NetworkRoute + PeekedApplication byte // Arguments. CBusOptions CBusOptions @@ -62,6 +64,7 @@ type _CBusPointToPointToMultiPointCommandChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type CBusPointToPointToMultiPointCommandParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child CBusPointToPointToMultiPointCommand, serializeChildFunction func() error) error GetTypeName() string @@ -69,13 +72,12 @@ type CBusPointToPointToMultiPointCommandParent interface { type CBusPointToPointToMultiPointCommandChild interface { utils.Serializable - InitializeParent(parent CBusPointToPointToMultiPointCommand, bridgeAddress BridgeAddress, networkRoute NetworkRoute, peekedApplication byte) +InitializeParent(parent CBusPointToPointToMultiPointCommand , bridgeAddress BridgeAddress , networkRoute NetworkRoute , peekedApplication byte ) GetParent() *CBusPointToPointToMultiPointCommand GetTypeName() string CBusPointToPointToMultiPointCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,14 +100,15 @@ func (m *_CBusPointToPointToMultiPointCommand) GetPeekedApplication() byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCBusPointToPointToMultiPointCommand factory function for _CBusPointToPointToMultiPointCommand -func NewCBusPointToPointToMultiPointCommand(bridgeAddress BridgeAddress, networkRoute NetworkRoute, peekedApplication byte, cBusOptions CBusOptions) *_CBusPointToPointToMultiPointCommand { - return &_CBusPointToPointToMultiPointCommand{BridgeAddress: bridgeAddress, NetworkRoute: networkRoute, PeekedApplication: peekedApplication, CBusOptions: cBusOptions} +func NewCBusPointToPointToMultiPointCommand( bridgeAddress BridgeAddress , networkRoute NetworkRoute , peekedApplication byte , cBusOptions CBusOptions ) *_CBusPointToPointToMultiPointCommand { +return &_CBusPointToPointToMultiPointCommand{ BridgeAddress: bridgeAddress , NetworkRoute: networkRoute , PeekedApplication: peekedApplication , CBusOptions: cBusOptions } } // Deprecated: use the interface for direct cast func CastCBusPointToPointToMultiPointCommand(structType interface{}) CBusPointToPointToMultiPointCommand { - if casted, ok := structType.(CBusPointToPointToMultiPointCommand); ok { + if casted, ok := structType.(CBusPointToPointToMultiPointCommand); ok { return casted } if casted, ok := structType.(*CBusPointToPointToMultiPointCommand); ok { @@ -118,6 +121,7 @@ func (m *_CBusPointToPointToMultiPointCommand) GetTypeName() string { return "CBusPointToPointToMultiPointCommand" } + func (m *_CBusPointToPointToMultiPointCommand) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -151,7 +155,7 @@ func CBusPointToPointToMultiPointCommandParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("bridgeAddress"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for bridgeAddress") } - _bridgeAddress, _bridgeAddressErr := BridgeAddressParseWithBuffer(ctx, readBuffer) +_bridgeAddress, _bridgeAddressErr := BridgeAddressParseWithBuffer(ctx, readBuffer) if _bridgeAddressErr != nil { return nil, errors.Wrap(_bridgeAddressErr, "Error parsing 'bridgeAddress' field of CBusPointToPointToMultiPointCommand") } @@ -164,7 +168,7 @@ func CBusPointToPointToMultiPointCommandParseWithBuffer(ctx context.Context, rea if pullErr := readBuffer.PullContext("networkRoute"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for networkRoute") } - _networkRoute, _networkRouteErr := NetworkRouteParseWithBuffer(ctx, readBuffer) +_networkRoute, _networkRouteErr := NetworkRouteParseWithBuffer(ctx, readBuffer) if _networkRouteErr != nil { return nil, errors.Wrap(_networkRouteErr, "Error parsing 'networkRoute' field of CBusPointToPointToMultiPointCommand") } @@ -173,28 +177,28 @@ func CBusPointToPointToMultiPointCommandParseWithBuffer(ctx context.Context, rea return nil, errors.Wrap(closeErr, "Error closing for networkRoute") } - // Peek Field (peekedApplication) - currentPos = positionAware.GetPos() - peekedApplication, _err := readBuffer.ReadByte("peekedApplication") - if _err != nil { - return nil, errors.Wrap(_err, "Error parsing 'peekedApplication' field of CBusPointToPointToMultiPointCommand") - } + // Peek Field (peekedApplication) + currentPos = positionAware.GetPos() + peekedApplication, _err := readBuffer.ReadByte("peekedApplication") + if _err != nil { + return nil, errors.Wrap(_err, "Error parsing 'peekedApplication' field of CBusPointToPointToMultiPointCommand") + } - readBuffer.Reset(currentPos) + readBuffer.Reset(currentPos) // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type CBusPointToPointToMultiPointCommandChildSerializeRequirement interface { CBusPointToPointToMultiPointCommand - InitializeParent(CBusPointToPointToMultiPointCommand, BridgeAddress, NetworkRoute, byte) + InitializeParent(CBusPointToPointToMultiPointCommand, BridgeAddress, NetworkRoute, byte) GetParent() CBusPointToPointToMultiPointCommand } var _childTemp interface{} var _child CBusPointToPointToMultiPointCommandChildSerializeRequirement var typeSwitchError error switch { - case peekedApplication == 0xFF: // CBusPointToPointToMultiPointCommandStatus +case peekedApplication == 0xFF : // CBusPointToPointToMultiPointCommandStatus _childTemp, typeSwitchError = CBusPointToPointToMultiPointCommandStatusParseWithBuffer(ctx, readBuffer, cBusOptions) - case 0 == 0: // CBusPointToPointToMultiPointCommandNormal +case 0==0 : // CBusPointToPointToMultiPointCommandNormal _childTemp, typeSwitchError = CBusPointToPointToMultiPointCommandNormalParseWithBuffer(ctx, readBuffer, cBusOptions) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedApplication=%v]", peekedApplication) @@ -209,7 +213,7 @@ func CBusPointToPointToMultiPointCommandParseWithBuffer(ctx context.Context, rea } // Finish initializing - _child.InitializeParent(_child, bridgeAddress, networkRoute, peekedApplication) +_child.InitializeParent(_child , bridgeAddress , networkRoute , peekedApplication ) return _child, nil } @@ -219,7 +223,7 @@ func (pm *_CBusPointToPointToMultiPointCommand) SerializeParent(ctx context.Cont _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("CBusPointToPointToMultiPointCommand"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("CBusPointToPointToMultiPointCommand"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for CBusPointToPointToMultiPointCommand") } @@ -258,13 +262,13 @@ func (pm *_CBusPointToPointToMultiPointCommand) SerializeParent(ctx context.Cont return nil } + //// // Arguments Getter func (m *_CBusPointToPointToMultiPointCommand) GetCBusOptions() CBusOptions { return m.CBusOptions } - // //// @@ -282,3 +286,6 @@ func (m *_CBusPointToPointToMultiPointCommand) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/CBusPointToPointToMultiPointCommandNormal.go b/plc4go/protocols/cbus/readwrite/model/CBusPointToPointToMultiPointCommandNormal.go index b92681be0d2..af10d3892ef 100644 --- a/plc4go/protocols/cbus/readwrite/model/CBusPointToPointToMultiPointCommandNormal.go +++ b/plc4go/protocols/cbus/readwrite/model/CBusPointToPointToMultiPointCommandNormal.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CBusPointToPointToMultiPointCommandNormal is the corresponding interface of CBusPointToPointToMultiPointCommandNormal type CBusPointToPointToMultiPointCommandNormal interface { @@ -48,10 +50,12 @@ type CBusPointToPointToMultiPointCommandNormalExactly interface { // _CBusPointToPointToMultiPointCommandNormal is the data-structure of this message type _CBusPointToPointToMultiPointCommandNormal struct { *_CBusPointToPointToMultiPointCommand - Application ApplicationIdContainer - SalData SALData + Application ApplicationIdContainer + SalData SALData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -62,16 +66,14 @@ type _CBusPointToPointToMultiPointCommandNormal struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_CBusPointToPointToMultiPointCommandNormal) InitializeParent(parent CBusPointToPointToMultiPointCommand, bridgeAddress BridgeAddress, networkRoute NetworkRoute, peekedApplication byte) { - m.BridgeAddress = bridgeAddress +func (m *_CBusPointToPointToMultiPointCommandNormal) InitializeParent(parent CBusPointToPointToMultiPointCommand , bridgeAddress BridgeAddress , networkRoute NetworkRoute , peekedApplication byte ) { m.BridgeAddress = bridgeAddress m.NetworkRoute = networkRoute m.PeekedApplication = peekedApplication } -func (m *_CBusPointToPointToMultiPointCommandNormal) GetParent() CBusPointToPointToMultiPointCommand { +func (m *_CBusPointToPointToMultiPointCommandNormal) GetParent() CBusPointToPointToMultiPointCommand { return m._CBusPointToPointToMultiPointCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_CBusPointToPointToMultiPointCommandNormal) GetSalData() SALData { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCBusPointToPointToMultiPointCommandNormal factory function for _CBusPointToPointToMultiPointCommandNormal -func NewCBusPointToPointToMultiPointCommandNormal(application ApplicationIdContainer, salData SALData, bridgeAddress BridgeAddress, networkRoute NetworkRoute, peekedApplication byte, cBusOptions CBusOptions) *_CBusPointToPointToMultiPointCommandNormal { +func NewCBusPointToPointToMultiPointCommandNormal( application ApplicationIdContainer , salData SALData , bridgeAddress BridgeAddress , networkRoute NetworkRoute , peekedApplication byte , cBusOptions CBusOptions ) *_CBusPointToPointToMultiPointCommandNormal { _result := &_CBusPointToPointToMultiPointCommandNormal{ - Application: application, - SalData: salData, - _CBusPointToPointToMultiPointCommand: NewCBusPointToPointToMultiPointCommand(bridgeAddress, networkRoute, peekedApplication, cBusOptions), + Application: application, + SalData: salData, + _CBusPointToPointToMultiPointCommand: NewCBusPointToPointToMultiPointCommand(bridgeAddress, networkRoute, peekedApplication, cBusOptions), } _result._CBusPointToPointToMultiPointCommand._CBusPointToPointToMultiPointCommandChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewCBusPointToPointToMultiPointCommandNormal(application ApplicationIdConta // Deprecated: use the interface for direct cast func CastCBusPointToPointToMultiPointCommandNormal(structType interface{}) CBusPointToPointToMultiPointCommandNormal { - if casted, ok := structType.(CBusPointToPointToMultiPointCommandNormal); ok { + if casted, ok := structType.(CBusPointToPointToMultiPointCommandNormal); ok { return casted } if casted, ok := structType.(*CBusPointToPointToMultiPointCommandNormal); ok { @@ -128,6 +131,7 @@ func (m *_CBusPointToPointToMultiPointCommandNormal) GetLengthInBits(ctx context return lengthInBits } + func (m *_CBusPointToPointToMultiPointCommandNormal) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -149,7 +153,7 @@ func CBusPointToPointToMultiPointCommandNormalParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("application"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for application") } - _application, _applicationErr := ApplicationIdContainerParseWithBuffer(ctx, readBuffer) +_application, _applicationErr := ApplicationIdContainerParseWithBuffer(ctx, readBuffer) if _applicationErr != nil { return nil, errors.Wrap(_applicationErr, "Error parsing 'application' field of CBusPointToPointToMultiPointCommandNormal") } @@ -162,7 +166,7 @@ func CBusPointToPointToMultiPointCommandNormalParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("salData"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for salData") } - _salData, _salDataErr := SALDataParseWithBuffer(ctx, readBuffer, ApplicationId(application.ApplicationId())) +_salData, _salDataErr := SALDataParseWithBuffer(ctx, readBuffer , ApplicationId( application.ApplicationId() ) ) if _salDataErr != nil { return nil, errors.Wrap(_salDataErr, "Error parsing 'salData' field of CBusPointToPointToMultiPointCommandNormal") } @@ -181,7 +185,7 @@ func CBusPointToPointToMultiPointCommandNormalParseWithBuffer(ctx context.Contex CBusOptions: cBusOptions, }, Application: application, - SalData: salData, + SalData: salData, } _child._CBusPointToPointToMultiPointCommand._CBusPointToPointToMultiPointCommandChildRequirements = _child return _child, nil @@ -203,29 +207,29 @@ func (m *_CBusPointToPointToMultiPointCommandNormal) SerializeWithWriteBuffer(ct return errors.Wrap(pushErr, "Error pushing for CBusPointToPointToMultiPointCommandNormal") } - // Simple Field (application) - if pushErr := writeBuffer.PushContext("application"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for application") - } - _applicationErr := writeBuffer.WriteSerializable(ctx, m.GetApplication()) - if popErr := writeBuffer.PopContext("application"); popErr != nil { - return errors.Wrap(popErr, "Error popping for application") - } - if _applicationErr != nil { - return errors.Wrap(_applicationErr, "Error serializing 'application' field") - } + // Simple Field (application) + if pushErr := writeBuffer.PushContext("application"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for application") + } + _applicationErr := writeBuffer.WriteSerializable(ctx, m.GetApplication()) + if popErr := writeBuffer.PopContext("application"); popErr != nil { + return errors.Wrap(popErr, "Error popping for application") + } + if _applicationErr != nil { + return errors.Wrap(_applicationErr, "Error serializing 'application' field") + } - // Simple Field (salData) - if pushErr := writeBuffer.PushContext("salData"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for salData") - } - _salDataErr := writeBuffer.WriteSerializable(ctx, m.GetSalData()) - if popErr := writeBuffer.PopContext("salData"); popErr != nil { - return errors.Wrap(popErr, "Error popping for salData") - } - if _salDataErr != nil { - return errors.Wrap(_salDataErr, "Error serializing 'salData' field") - } + // Simple Field (salData) + if pushErr := writeBuffer.PushContext("salData"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for salData") + } + _salDataErr := writeBuffer.WriteSerializable(ctx, m.GetSalData()) + if popErr := writeBuffer.PopContext("salData"); popErr != nil { + return errors.Wrap(popErr, "Error popping for salData") + } + if _salDataErr != nil { + return errors.Wrap(_salDataErr, "Error serializing 'salData' field") + } if popErr := writeBuffer.PopContext("CBusPointToPointToMultiPointCommandNormal"); popErr != nil { return errors.Wrap(popErr, "Error popping for CBusPointToPointToMultiPointCommandNormal") @@ -235,6 +239,7 @@ func (m *_CBusPointToPointToMultiPointCommandNormal) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_CBusPointToPointToMultiPointCommandNormal) isCBusPointToPointToMultiPointCommandNormal() bool { return true } @@ -249,3 +254,6 @@ func (m *_CBusPointToPointToMultiPointCommandNormal) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/CBusPointToPointToMultiPointCommandStatus.go b/plc4go/protocols/cbus/readwrite/model/CBusPointToPointToMultiPointCommandStatus.go index 671a7cfbf66..8397b0286b4 100644 --- a/plc4go/protocols/cbus/readwrite/model/CBusPointToPointToMultiPointCommandStatus.go +++ b/plc4go/protocols/cbus/readwrite/model/CBusPointToPointToMultiPointCommandStatus.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CBusPointToPointToMultiPointCommandStatus is the corresponding interface of CBusPointToPointToMultiPointCommandStatus type CBusPointToPointToMultiPointCommandStatus interface { @@ -46,11 +48,13 @@ type CBusPointToPointToMultiPointCommandStatusExactly interface { // _CBusPointToPointToMultiPointCommandStatus is the data-structure of this message type _CBusPointToPointToMultiPointCommandStatus struct { *_CBusPointToPointToMultiPointCommand - StatusRequest StatusRequest + StatusRequest StatusRequest // Reserved Fields reservedField0 *byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -61,16 +65,14 @@ type _CBusPointToPointToMultiPointCommandStatus struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_CBusPointToPointToMultiPointCommandStatus) InitializeParent(parent CBusPointToPointToMultiPointCommand, bridgeAddress BridgeAddress, networkRoute NetworkRoute, peekedApplication byte) { - m.BridgeAddress = bridgeAddress +func (m *_CBusPointToPointToMultiPointCommandStatus) InitializeParent(parent CBusPointToPointToMultiPointCommand , bridgeAddress BridgeAddress , networkRoute NetworkRoute , peekedApplication byte ) { m.BridgeAddress = bridgeAddress m.NetworkRoute = networkRoute m.PeekedApplication = peekedApplication } -func (m *_CBusPointToPointToMultiPointCommandStatus) GetParent() CBusPointToPointToMultiPointCommand { +func (m *_CBusPointToPointToMultiPointCommandStatus) GetParent() CBusPointToPointToMultiPointCommand { return m._CBusPointToPointToMultiPointCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -85,11 +87,12 @@ func (m *_CBusPointToPointToMultiPointCommandStatus) GetStatusRequest() StatusRe /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCBusPointToPointToMultiPointCommandStatus factory function for _CBusPointToPointToMultiPointCommandStatus -func NewCBusPointToPointToMultiPointCommandStatus(statusRequest StatusRequest, bridgeAddress BridgeAddress, networkRoute NetworkRoute, peekedApplication byte, cBusOptions CBusOptions) *_CBusPointToPointToMultiPointCommandStatus { +func NewCBusPointToPointToMultiPointCommandStatus( statusRequest StatusRequest , bridgeAddress BridgeAddress , networkRoute NetworkRoute , peekedApplication byte , cBusOptions CBusOptions ) *_CBusPointToPointToMultiPointCommandStatus { _result := &_CBusPointToPointToMultiPointCommandStatus{ - StatusRequest: statusRequest, - _CBusPointToPointToMultiPointCommand: NewCBusPointToPointToMultiPointCommand(bridgeAddress, networkRoute, peekedApplication, cBusOptions), + StatusRequest: statusRequest, + _CBusPointToPointToMultiPointCommand: NewCBusPointToPointToMultiPointCommand(bridgeAddress, networkRoute, peekedApplication, cBusOptions), } _result._CBusPointToPointToMultiPointCommand._CBusPointToPointToMultiPointCommandChildRequirements = _result return _result @@ -97,7 +100,7 @@ func NewCBusPointToPointToMultiPointCommandStatus(statusRequest StatusRequest, b // Deprecated: use the interface for direct cast func CastCBusPointToPointToMultiPointCommandStatus(structType interface{}) CBusPointToPointToMultiPointCommandStatus { - if casted, ok := structType.(CBusPointToPointToMultiPointCommandStatus); ok { + if casted, ok := structType.(CBusPointToPointToMultiPointCommandStatus); ok { return casted } if casted, ok := structType.(*CBusPointToPointToMultiPointCommandStatus); ok { @@ -122,6 +125,7 @@ func (m *_CBusPointToPointToMultiPointCommandStatus) GetLengthInBits(ctx context return lengthInBits } + func (m *_CBusPointToPointToMultiPointCommandStatus) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -149,7 +153,7 @@ func CBusPointToPointToMultiPointCommandStatusParseWithBuffer(ctx context.Contex if reserved != byte(0xFF) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": byte(0xFF), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -160,7 +164,7 @@ func CBusPointToPointToMultiPointCommandStatusParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("statusRequest"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for statusRequest") } - _statusRequest, _statusRequestErr := StatusRequestParseWithBuffer(ctx, readBuffer) +_statusRequest, _statusRequestErr := StatusRequestParseWithBuffer(ctx, readBuffer) if _statusRequestErr != nil { return nil, errors.Wrap(_statusRequestErr, "Error parsing 'statusRequest' field of CBusPointToPointToMultiPointCommandStatus") } @@ -178,7 +182,7 @@ func CBusPointToPointToMultiPointCommandStatusParseWithBuffer(ctx context.Contex _CBusPointToPointToMultiPointCommand: &_CBusPointToPointToMultiPointCommand{ CBusOptions: cBusOptions, }, - StatusRequest: statusRequest, + StatusRequest: statusRequest, reservedField0: reservedField0, } _child._CBusPointToPointToMultiPointCommand._CBusPointToPointToMultiPointCommandChildRequirements = _child @@ -201,33 +205,33 @@ func (m *_CBusPointToPointToMultiPointCommandStatus) SerializeWithWriteBuffer(ct return errors.Wrap(pushErr, "Error pushing for CBusPointToPointToMultiPointCommandStatus") } - // Reserved Field (reserved) - { - var reserved byte = byte(0xFF) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": byte(0xFF), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteByte("reserved", reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } - } - - // Simple Field (statusRequest) - if pushErr := writeBuffer.PushContext("statusRequest"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for statusRequest") - } - _statusRequestErr := writeBuffer.WriteSerializable(ctx, m.GetStatusRequest()) - if popErr := writeBuffer.PopContext("statusRequest"); popErr != nil { - return errors.Wrap(popErr, "Error popping for statusRequest") + // Reserved Field (reserved) + { + var reserved byte = byte(0xFF) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": byte(0xFF), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 } - if _statusRequestErr != nil { - return errors.Wrap(_statusRequestErr, "Error serializing 'statusRequest' field") + _err := writeBuffer.WriteByte("reserved", reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } + + // Simple Field (statusRequest) + if pushErr := writeBuffer.PushContext("statusRequest"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for statusRequest") + } + _statusRequestErr := writeBuffer.WriteSerializable(ctx, m.GetStatusRequest()) + if popErr := writeBuffer.PopContext("statusRequest"); popErr != nil { + return errors.Wrap(popErr, "Error popping for statusRequest") + } + if _statusRequestErr != nil { + return errors.Wrap(_statusRequestErr, "Error serializing 'statusRequest' field") + } if popErr := writeBuffer.PopContext("CBusPointToPointToMultiPointCommandStatus"); popErr != nil { return errors.Wrap(popErr, "Error popping for CBusPointToPointToMultiPointCommandStatus") @@ -237,6 +241,7 @@ func (m *_CBusPointToPointToMultiPointCommandStatus) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_CBusPointToPointToMultiPointCommandStatus) isCBusPointToPointToMultiPointCommandStatus() bool { return true } @@ -251,3 +256,6 @@ func (m *_CBusPointToPointToMultiPointCommandStatus) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/ChannelStatus.go b/plc4go/protocols/cbus/readwrite/model/ChannelStatus.go index 3c53379d1e7..108f936c81e 100644 --- a/plc4go/protocols/cbus/readwrite/model/ChannelStatus.go +++ b/plc4go/protocols/cbus/readwrite/model/ChannelStatus.go @@ -34,9 +34,9 @@ type IChannelStatus interface { utils.Serializable } -const ( - ChannelStatus_OK ChannelStatus = 0 - ChannelStatus_LAMP_FAULT ChannelStatus = 2 +const( + ChannelStatus_OK ChannelStatus = 0 + ChannelStatus_LAMP_FAULT ChannelStatus = 2 ChannelStatus_CURRENT_LIMIT_OR_SHORT ChannelStatus = 3 ) @@ -44,7 +44,7 @@ var ChannelStatusValues []ChannelStatus func init() { _ = errors.New - ChannelStatusValues = []ChannelStatus{ + ChannelStatusValues = []ChannelStatus { ChannelStatus_OK, ChannelStatus_LAMP_FAULT, ChannelStatus_CURRENT_LIMIT_OR_SHORT, @@ -53,12 +53,12 @@ func init() { func ChannelStatusByValue(value uint8) (enum ChannelStatus, ok bool) { switch value { - case 0: - return ChannelStatus_OK, true - case 2: - return ChannelStatus_LAMP_FAULT, true - case 3: - return ChannelStatus_CURRENT_LIMIT_OR_SHORT, true + case 0: + return ChannelStatus_OK, true + case 2: + return ChannelStatus_LAMP_FAULT, true + case 3: + return ChannelStatus_CURRENT_LIMIT_OR_SHORT, true } return 0, false } @@ -75,13 +75,13 @@ func ChannelStatusByName(value string) (enum ChannelStatus, ok bool) { return 0, false } -func ChannelStatusKnows(value uint8) bool { +func ChannelStatusKnows(value uint8) bool { for _, typeValue := range ChannelStatusValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastChannelStatus(structType interface{}) ChannelStatus { @@ -147,3 +147,4 @@ func (e ChannelStatus) PLC4XEnumName() string { func (e ChannelStatus) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/Checksum.go b/plc4go/protocols/cbus/readwrite/model/Checksum.go index fd83e200bf6..0c984c127d9 100644 --- a/plc4go/protocols/cbus/readwrite/model/Checksum.go +++ b/plc4go/protocols/cbus/readwrite/model/Checksum.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Checksum is the corresponding interface of Checksum type Checksum interface { @@ -44,9 +46,10 @@ type ChecksumExactly interface { // _Checksum is the data-structure of this message type _Checksum struct { - Value byte + Value byte } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -61,14 +64,15 @@ func (m *_Checksum) GetValue() byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewChecksum factory function for _Checksum -func NewChecksum(value byte) *_Checksum { - return &_Checksum{Value: value} +func NewChecksum( value byte ) *_Checksum { +return &_Checksum{ Value: value } } // Deprecated: use the interface for direct cast func CastChecksum(structType interface{}) Checksum { - if casted, ok := structType.(Checksum); ok { + if casted, ok := structType.(Checksum); ok { return casted } if casted, ok := structType.(*Checksum); ok { @@ -85,11 +89,12 @@ func (m *_Checksum) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (value) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_Checksum) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -108,7 +113,7 @@ func ChecksumParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) ( _ = currentPos // Simple Field (value) - _value, _valueErr := readBuffer.ReadByte("value") +_value, _valueErr := readBuffer.ReadByte("value") if _valueErr != nil { return nil, errors.Wrap(_valueErr, "Error parsing 'value' field of Checksum") } @@ -120,8 +125,8 @@ func ChecksumParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) ( // Create the instance return &_Checksum{ - Value: value, - }, nil + Value: value, + }, nil } func (m *_Checksum) Serialize() ([]byte, error) { @@ -135,7 +140,7 @@ func (m *_Checksum) Serialize() ([]byte, error) { func (m *_Checksum) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("Checksum"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("Checksum"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for Checksum") } @@ -152,6 +157,7 @@ func (m *_Checksum) SerializeWithWriteBuffer(ctx context.Context, writeBuffer ut return nil } + func (m *_Checksum) isChecksum() bool { return true } @@ -166,3 +172,6 @@ func (m *_Checksum) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/ClockAndTimekeepingCommandType.go b/plc4go/protocols/cbus/readwrite/model/ClockAndTimekeepingCommandType.go index 95b6efc70be..4463a9d1ef5 100644 --- a/plc4go/protocols/cbus/readwrite/model/ClockAndTimekeepingCommandType.go +++ b/plc4go/protocols/cbus/readwrite/model/ClockAndTimekeepingCommandType.go @@ -35,33 +35,31 @@ type IClockAndTimekeepingCommandType interface { NumberOfArguments() uint8 } -const ( +const( ClockAndTimekeepingCommandType_UPDATE_NETWORK_VARIABLE ClockAndTimekeepingCommandType = 0x00 - ClockAndTimekeepingCommandType_REQUEST_REFRESH ClockAndTimekeepingCommandType = 0x01 + ClockAndTimekeepingCommandType_REQUEST_REFRESH ClockAndTimekeepingCommandType = 0x01 ) var ClockAndTimekeepingCommandTypeValues []ClockAndTimekeepingCommandType func init() { _ = errors.New - ClockAndTimekeepingCommandTypeValues = []ClockAndTimekeepingCommandType{ + ClockAndTimekeepingCommandTypeValues = []ClockAndTimekeepingCommandType { ClockAndTimekeepingCommandType_UPDATE_NETWORK_VARIABLE, ClockAndTimekeepingCommandType_REQUEST_REFRESH, } } + func (e ClockAndTimekeepingCommandType) NumberOfArguments() uint8 { - switch e { - case 0x00: - { /* '0x00' */ - return 0xFF + switch e { + case 0x00: { /* '0x00' */ + return 0xFF } - case 0x01: - { /* '0x01' */ - return 0 + case 0x01: { /* '0x01' */ + return 0 } - default: - { + default: { return 0 } } @@ -77,10 +75,10 @@ func ClockAndTimekeepingCommandTypeFirstEnumForFieldNumberOfArguments(value uint } func ClockAndTimekeepingCommandTypeByValue(value uint8) (enum ClockAndTimekeepingCommandType, ok bool) { switch value { - case 0x00: - return ClockAndTimekeepingCommandType_UPDATE_NETWORK_VARIABLE, true - case 0x01: - return ClockAndTimekeepingCommandType_REQUEST_REFRESH, true + case 0x00: + return ClockAndTimekeepingCommandType_UPDATE_NETWORK_VARIABLE, true + case 0x01: + return ClockAndTimekeepingCommandType_REQUEST_REFRESH, true } return 0, false } @@ -95,13 +93,13 @@ func ClockAndTimekeepingCommandTypeByName(value string) (enum ClockAndTimekeepin return 0, false } -func ClockAndTimekeepingCommandTypeKnows(value uint8) bool { +func ClockAndTimekeepingCommandTypeKnows(value uint8) bool { for _, typeValue := range ClockAndTimekeepingCommandTypeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastClockAndTimekeepingCommandType(structType interface{}) ClockAndTimekeepingCommandType { @@ -165,3 +163,4 @@ func (e ClockAndTimekeepingCommandType) PLC4XEnumName() string { func (e ClockAndTimekeepingCommandType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/ClockAndTimekeepingCommandTypeContainer.go b/plc4go/protocols/cbus/readwrite/model/ClockAndTimekeepingCommandTypeContainer.go index 58f9f2831d6..8168dda90b2 100644 --- a/plc4go/protocols/cbus/readwrite/model/ClockAndTimekeepingCommandTypeContainer.go +++ b/plc4go/protocols/cbus/readwrite/model/ClockAndTimekeepingCommandTypeContainer.go @@ -36,7 +36,7 @@ type IClockAndTimekeepingCommandTypeContainer interface { CommandType() ClockAndTimekeepingCommandType } -const ( +const( ClockAndTimekeepingCommandTypeContainer_MediaTransportControlCommandUpdateNetworkVariable_0Bytes ClockAndTimekeepingCommandTypeContainer = 0x08 ClockAndTimekeepingCommandTypeContainer_MediaTransportControlCommandUpdateNetworkVariable_1Bytes ClockAndTimekeepingCommandTypeContainer = 0x09 ClockAndTimekeepingCommandTypeContainer_MediaTransportControlCommandUpdateNetworkVariable_2Bytes ClockAndTimekeepingCommandTypeContainer = 0x0A @@ -45,14 +45,14 @@ const ( ClockAndTimekeepingCommandTypeContainer_MediaTransportControlCommandUpdateNetworkVariable_5Bytes ClockAndTimekeepingCommandTypeContainer = 0x0D ClockAndTimekeepingCommandTypeContainer_MediaTransportControlCommandUpdateNetworkVariable_6Bytes ClockAndTimekeepingCommandTypeContainer = 0x0E ClockAndTimekeepingCommandTypeContainer_MediaTransportControlCommandUpdateNetworkVariable_7Bytes ClockAndTimekeepingCommandTypeContainer = 0x0F - ClockAndTimekeepingCommandTypeContainer_MediaTransportControlCommandRequestRefresh ClockAndTimekeepingCommandTypeContainer = 0x11 + ClockAndTimekeepingCommandTypeContainer_MediaTransportControlCommandRequestRefresh ClockAndTimekeepingCommandTypeContainer = 0x11 ) var ClockAndTimekeepingCommandTypeContainerValues []ClockAndTimekeepingCommandTypeContainer func init() { _ = errors.New - ClockAndTimekeepingCommandTypeContainerValues = []ClockAndTimekeepingCommandTypeContainer{ + ClockAndTimekeepingCommandTypeContainerValues = []ClockAndTimekeepingCommandTypeContainer { ClockAndTimekeepingCommandTypeContainer_MediaTransportControlCommandUpdateNetworkVariable_0Bytes, ClockAndTimekeepingCommandTypeContainer_MediaTransportControlCommandUpdateNetworkVariable_1Bytes, ClockAndTimekeepingCommandTypeContainer_MediaTransportControlCommandUpdateNetworkVariable_2Bytes, @@ -65,46 +65,37 @@ func init() { } } + func (e ClockAndTimekeepingCommandTypeContainer) NumBytes() uint8 { - switch e { - case 0x08: - { /* '0x08' */ - return 0 + switch e { + case 0x08: { /* '0x08' */ + return 0 } - case 0x09: - { /* '0x09' */ - return 1 + case 0x09: { /* '0x09' */ + return 1 } - case 0x0A: - { /* '0x0A' */ - return 2 + case 0x0A: { /* '0x0A' */ + return 2 } - case 0x0B: - { /* '0x0B' */ - return 3 + case 0x0B: { /* '0x0B' */ + return 3 } - case 0x0C: - { /* '0x0C' */ - return 4 + case 0x0C: { /* '0x0C' */ + return 4 } - case 0x0D: - { /* '0x0D' */ - return 5 + case 0x0D: { /* '0x0D' */ + return 5 } - case 0x0E: - { /* '0x0E' */ - return 6 + case 0x0E: { /* '0x0E' */ + return 6 } - case 0x0F: - { /* '0x0F' */ - return 7 + case 0x0F: { /* '0x0F' */ + return 7 } - case 0x11: - { /* '0x11' */ - return 1 + case 0x11: { /* '0x11' */ + return 1 } - default: - { + default: { return 0 } } @@ -120,45 +111,35 @@ func ClockAndTimekeepingCommandTypeContainerFirstEnumForFieldNumBytes(value uint } func (e ClockAndTimekeepingCommandTypeContainer) CommandType() ClockAndTimekeepingCommandType { - switch e { - case 0x08: - { /* '0x08' */ + switch e { + case 0x08: { /* '0x08' */ return ClockAndTimekeepingCommandType_UPDATE_NETWORK_VARIABLE } - case 0x09: - { /* '0x09' */ + case 0x09: { /* '0x09' */ return ClockAndTimekeepingCommandType_UPDATE_NETWORK_VARIABLE } - case 0x0A: - { /* '0x0A' */ + case 0x0A: { /* '0x0A' */ return ClockAndTimekeepingCommandType_UPDATE_NETWORK_VARIABLE } - case 0x0B: - { /* '0x0B' */ + case 0x0B: { /* '0x0B' */ return ClockAndTimekeepingCommandType_UPDATE_NETWORK_VARIABLE } - case 0x0C: - { /* '0x0C' */ + case 0x0C: { /* '0x0C' */ return ClockAndTimekeepingCommandType_UPDATE_NETWORK_VARIABLE } - case 0x0D: - { /* '0x0D' */ + case 0x0D: { /* '0x0D' */ return ClockAndTimekeepingCommandType_UPDATE_NETWORK_VARIABLE } - case 0x0E: - { /* '0x0E' */ + case 0x0E: { /* '0x0E' */ return ClockAndTimekeepingCommandType_UPDATE_NETWORK_VARIABLE } - case 0x0F: - { /* '0x0F' */ + case 0x0F: { /* '0x0F' */ return ClockAndTimekeepingCommandType_UPDATE_NETWORK_VARIABLE } - case 0x11: - { /* '0x11' */ + case 0x11: { /* '0x11' */ return ClockAndTimekeepingCommandType_REQUEST_REFRESH } - default: - { + default: { return 0 } } @@ -174,24 +155,24 @@ func ClockAndTimekeepingCommandTypeContainerFirstEnumForFieldCommandType(value C } func ClockAndTimekeepingCommandTypeContainerByValue(value uint8) (enum ClockAndTimekeepingCommandTypeContainer, ok bool) { switch value { - case 0x08: - return ClockAndTimekeepingCommandTypeContainer_MediaTransportControlCommandUpdateNetworkVariable_0Bytes, true - case 0x09: - return ClockAndTimekeepingCommandTypeContainer_MediaTransportControlCommandUpdateNetworkVariable_1Bytes, true - case 0x0A: - return ClockAndTimekeepingCommandTypeContainer_MediaTransportControlCommandUpdateNetworkVariable_2Bytes, true - case 0x0B: - return ClockAndTimekeepingCommandTypeContainer_MediaTransportControlCommandUpdateNetworkVariable_3Bytes, true - case 0x0C: - return ClockAndTimekeepingCommandTypeContainer_MediaTransportControlCommandUpdateNetworkVariable_4Bytes, true - case 0x0D: - return ClockAndTimekeepingCommandTypeContainer_MediaTransportControlCommandUpdateNetworkVariable_5Bytes, true - case 0x0E: - return ClockAndTimekeepingCommandTypeContainer_MediaTransportControlCommandUpdateNetworkVariable_6Bytes, true - case 0x0F: - return ClockAndTimekeepingCommandTypeContainer_MediaTransportControlCommandUpdateNetworkVariable_7Bytes, true - case 0x11: - return ClockAndTimekeepingCommandTypeContainer_MediaTransportControlCommandRequestRefresh, true + case 0x08: + return ClockAndTimekeepingCommandTypeContainer_MediaTransportControlCommandUpdateNetworkVariable_0Bytes, true + case 0x09: + return ClockAndTimekeepingCommandTypeContainer_MediaTransportControlCommandUpdateNetworkVariable_1Bytes, true + case 0x0A: + return ClockAndTimekeepingCommandTypeContainer_MediaTransportControlCommandUpdateNetworkVariable_2Bytes, true + case 0x0B: + return ClockAndTimekeepingCommandTypeContainer_MediaTransportControlCommandUpdateNetworkVariable_3Bytes, true + case 0x0C: + return ClockAndTimekeepingCommandTypeContainer_MediaTransportControlCommandUpdateNetworkVariable_4Bytes, true + case 0x0D: + return ClockAndTimekeepingCommandTypeContainer_MediaTransportControlCommandUpdateNetworkVariable_5Bytes, true + case 0x0E: + return ClockAndTimekeepingCommandTypeContainer_MediaTransportControlCommandUpdateNetworkVariable_6Bytes, true + case 0x0F: + return ClockAndTimekeepingCommandTypeContainer_MediaTransportControlCommandUpdateNetworkVariable_7Bytes, true + case 0x11: + return ClockAndTimekeepingCommandTypeContainer_MediaTransportControlCommandRequestRefresh, true } return 0, false } @@ -220,13 +201,13 @@ func ClockAndTimekeepingCommandTypeContainerByName(value string) (enum ClockAndT return 0, false } -func ClockAndTimekeepingCommandTypeContainerKnows(value uint8) bool { +func ClockAndTimekeepingCommandTypeContainerKnows(value uint8) bool { for _, typeValue := range ClockAndTimekeepingCommandTypeContainerValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastClockAndTimekeepingCommandTypeContainer(structType interface{}) ClockAndTimekeepingCommandTypeContainer { @@ -304,3 +285,4 @@ func (e ClockAndTimekeepingCommandTypeContainer) PLC4XEnumName() string { func (e ClockAndTimekeepingCommandTypeContainer) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/ClockAndTimekeepingData.go b/plc4go/protocols/cbus/readwrite/model/ClockAndTimekeepingData.go index 4e88d57c9f0..a304927efe5 100644 --- a/plc4go/protocols/cbus/readwrite/model/ClockAndTimekeepingData.go +++ b/plc4go/protocols/cbus/readwrite/model/ClockAndTimekeepingData.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ClockAndTimekeepingData is the corresponding interface of ClockAndTimekeepingData type ClockAndTimekeepingData interface { @@ -49,8 +51,8 @@ type ClockAndTimekeepingDataExactly interface { // _ClockAndTimekeepingData is the data-structure of this message type _ClockAndTimekeepingData struct { _ClockAndTimekeepingDataChildRequirements - CommandTypeContainer ClockAndTimekeepingCommandTypeContainer - Argument byte + CommandTypeContainer ClockAndTimekeepingCommandTypeContainer + Argument byte } type _ClockAndTimekeepingDataChildRequirements interface { @@ -58,6 +60,7 @@ type _ClockAndTimekeepingDataChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type ClockAndTimekeepingDataParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child ClockAndTimekeepingData, serializeChildFunction func() error) error GetTypeName() string @@ -65,13 +68,12 @@ type ClockAndTimekeepingDataParent interface { type ClockAndTimekeepingDataChild interface { utils.Serializable - InitializeParent(parent ClockAndTimekeepingData, commandTypeContainer ClockAndTimekeepingCommandTypeContainer, argument byte) +InitializeParent(parent ClockAndTimekeepingData , commandTypeContainer ClockAndTimekeepingCommandTypeContainer , argument byte ) GetParent() *ClockAndTimekeepingData GetTypeName() string ClockAndTimekeepingData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -105,14 +107,15 @@ func (m *_ClockAndTimekeepingData) GetCommandType() ClockAndTimekeepingCommandTy /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewClockAndTimekeepingData factory function for _ClockAndTimekeepingData -func NewClockAndTimekeepingData(commandTypeContainer ClockAndTimekeepingCommandTypeContainer, argument byte) *_ClockAndTimekeepingData { - return &_ClockAndTimekeepingData{CommandTypeContainer: commandTypeContainer, Argument: argument} +func NewClockAndTimekeepingData( commandTypeContainer ClockAndTimekeepingCommandTypeContainer , argument byte ) *_ClockAndTimekeepingData { +return &_ClockAndTimekeepingData{ CommandTypeContainer: commandTypeContainer , Argument: argument } } // Deprecated: use the interface for direct cast func CastClockAndTimekeepingData(structType interface{}) ClockAndTimekeepingData { - if casted, ok := structType.(ClockAndTimekeepingData); ok { + if casted, ok := structType.(ClockAndTimekeepingData); ok { return casted } if casted, ok := structType.(*ClockAndTimekeepingData); ok { @@ -125,6 +128,7 @@ func (m *_ClockAndTimekeepingData) GetTypeName() string { return "ClockAndTimekeepingData" } + func (m *_ClockAndTimekeepingData) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -134,7 +138,7 @@ func (m *_ClockAndTimekeepingData) GetParentLengthInBits(ctx context.Context) ui // A virtual field doesn't have any in- or output. // Simple field (argument) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } @@ -157,7 +161,7 @@ func ClockAndTimekeepingDataParseWithBuffer(ctx context.Context, readBuffer util _ = currentPos // Validation - if !(KnowsClockAndTimekeepingCommandTypeContainer(readBuffer)) { + if (!(KnowsClockAndTimekeepingCommandTypeContainer(readBuffer))) { return nil, errors.WithStack(utils.ParseAssertError{"no command type could be found"}) } @@ -165,7 +169,7 @@ func ClockAndTimekeepingDataParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("commandTypeContainer"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for commandTypeContainer") } - _commandTypeContainer, _commandTypeContainerErr := ClockAndTimekeepingCommandTypeContainerParseWithBuffer(ctx, readBuffer) +_commandTypeContainer, _commandTypeContainerErr := ClockAndTimekeepingCommandTypeContainerParseWithBuffer(ctx, readBuffer) if _commandTypeContainerErr != nil { return nil, errors.Wrap(_commandTypeContainerErr, "Error parsing 'commandTypeContainer' field of ClockAndTimekeepingData") } @@ -180,7 +184,7 @@ func ClockAndTimekeepingDataParseWithBuffer(ctx context.Context, readBuffer util _ = commandType // Simple Field (argument) - _argument, _argumentErr := readBuffer.ReadByte("argument") +_argument, _argumentErr := readBuffer.ReadByte("argument") if _argumentErr != nil { return nil, errors.Wrap(_argumentErr, "Error parsing 'argument' field of ClockAndTimekeepingData") } @@ -189,19 +193,19 @@ func ClockAndTimekeepingDataParseWithBuffer(ctx context.Context, readBuffer util // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type ClockAndTimekeepingDataChildSerializeRequirement interface { ClockAndTimekeepingData - InitializeParent(ClockAndTimekeepingData, ClockAndTimekeepingCommandTypeContainer, byte) + InitializeParent(ClockAndTimekeepingData, ClockAndTimekeepingCommandTypeContainer, byte) GetParent() ClockAndTimekeepingData } var _childTemp interface{} var _child ClockAndTimekeepingDataChildSerializeRequirement var typeSwitchError error switch { - case commandType == ClockAndTimekeepingCommandType_UPDATE_NETWORK_VARIABLE && argument == 0x01: // ClockAndTimekeepingDataUpdateTime - _childTemp, typeSwitchError = ClockAndTimekeepingDataUpdateTimeParseWithBuffer(ctx, readBuffer) - case commandType == ClockAndTimekeepingCommandType_UPDATE_NETWORK_VARIABLE && argument == 0x02: // ClockAndTimekeepingDataUpdateDate - _childTemp, typeSwitchError = ClockAndTimekeepingDataUpdateDateParseWithBuffer(ctx, readBuffer) - case commandType == ClockAndTimekeepingCommandType_REQUEST_REFRESH && argument == 0x03: // ClockAndTimekeepingDataRequestRefresh - _childTemp, typeSwitchError = ClockAndTimekeepingDataRequestRefreshParseWithBuffer(ctx, readBuffer) +case commandType == ClockAndTimekeepingCommandType_UPDATE_NETWORK_VARIABLE && argument == 0x01 : // ClockAndTimekeepingDataUpdateTime + _childTemp, typeSwitchError = ClockAndTimekeepingDataUpdateTimeParseWithBuffer(ctx, readBuffer, ) +case commandType == ClockAndTimekeepingCommandType_UPDATE_NETWORK_VARIABLE && argument == 0x02 : // ClockAndTimekeepingDataUpdateDate + _childTemp, typeSwitchError = ClockAndTimekeepingDataUpdateDateParseWithBuffer(ctx, readBuffer, ) +case commandType == ClockAndTimekeepingCommandType_REQUEST_REFRESH && argument == 0x03 : // ClockAndTimekeepingDataRequestRefresh + _childTemp, typeSwitchError = ClockAndTimekeepingDataRequestRefreshParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [commandType=%v, argument=%v]", commandType, argument) } @@ -215,7 +219,7 @@ func ClockAndTimekeepingDataParseWithBuffer(ctx context.Context, readBuffer util } // Finish initializing - _child.InitializeParent(_child, commandTypeContainer, argument) +_child.InitializeParent(_child , commandTypeContainer , argument ) return _child, nil } @@ -225,7 +229,7 @@ func (pm *_ClockAndTimekeepingData) SerializeParent(ctx context.Context, writeBu _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("ClockAndTimekeepingData"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("ClockAndTimekeepingData"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for ClockAndTimekeepingData") } @@ -263,6 +267,7 @@ func (pm *_ClockAndTimekeepingData) SerializeParent(ctx context.Context, writeBu return nil } + func (m *_ClockAndTimekeepingData) isClockAndTimekeepingData() bool { return true } @@ -277,3 +282,6 @@ func (m *_ClockAndTimekeepingData) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/ClockAndTimekeepingDataRequestRefresh.go b/plc4go/protocols/cbus/readwrite/model/ClockAndTimekeepingDataRequestRefresh.go index 025bb672a64..e825d774a6e 100644 --- a/plc4go/protocols/cbus/readwrite/model/ClockAndTimekeepingDataRequestRefresh.go +++ b/plc4go/protocols/cbus/readwrite/model/ClockAndTimekeepingDataRequestRefresh.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ClockAndTimekeepingDataRequestRefresh is the corresponding interface of ClockAndTimekeepingDataRequestRefresh type ClockAndTimekeepingDataRequestRefresh interface { @@ -46,6 +48,8 @@ type _ClockAndTimekeepingDataRequestRefresh struct { *_ClockAndTimekeepingData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,19 +60,19 @@ type _ClockAndTimekeepingDataRequestRefresh struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ClockAndTimekeepingDataRequestRefresh) InitializeParent(parent ClockAndTimekeepingData, commandTypeContainer ClockAndTimekeepingCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_ClockAndTimekeepingDataRequestRefresh) InitializeParent(parent ClockAndTimekeepingData , commandTypeContainer ClockAndTimekeepingCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_ClockAndTimekeepingDataRequestRefresh) GetParent() ClockAndTimekeepingData { +func (m *_ClockAndTimekeepingDataRequestRefresh) GetParent() ClockAndTimekeepingData { return m._ClockAndTimekeepingData } + // NewClockAndTimekeepingDataRequestRefresh factory function for _ClockAndTimekeepingDataRequestRefresh -func NewClockAndTimekeepingDataRequestRefresh(commandTypeContainer ClockAndTimekeepingCommandTypeContainer, argument byte) *_ClockAndTimekeepingDataRequestRefresh { +func NewClockAndTimekeepingDataRequestRefresh( commandTypeContainer ClockAndTimekeepingCommandTypeContainer , argument byte ) *_ClockAndTimekeepingDataRequestRefresh { _result := &_ClockAndTimekeepingDataRequestRefresh{ - _ClockAndTimekeepingData: NewClockAndTimekeepingData(commandTypeContainer, argument), + _ClockAndTimekeepingData: NewClockAndTimekeepingData(commandTypeContainer, argument), } _result._ClockAndTimekeepingData._ClockAndTimekeepingDataChildRequirements = _result return _result @@ -76,7 +80,7 @@ func NewClockAndTimekeepingDataRequestRefresh(commandTypeContainer ClockAndTimek // Deprecated: use the interface for direct cast func CastClockAndTimekeepingDataRequestRefresh(structType interface{}) ClockAndTimekeepingDataRequestRefresh { - if casted, ok := structType.(ClockAndTimekeepingDataRequestRefresh); ok { + if casted, ok := structType.(ClockAndTimekeepingDataRequestRefresh); ok { return casted } if casted, ok := structType.(*ClockAndTimekeepingDataRequestRefresh); ok { @@ -95,6 +99,7 @@ func (m *_ClockAndTimekeepingDataRequestRefresh) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_ClockAndTimekeepingDataRequestRefresh) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -118,7 +123,8 @@ func ClockAndTimekeepingDataRequestRefreshParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_ClockAndTimekeepingDataRequestRefresh{ - _ClockAndTimekeepingData: &_ClockAndTimekeepingData{}, + _ClockAndTimekeepingData: &_ClockAndTimekeepingData{ + }, } _child._ClockAndTimekeepingData._ClockAndTimekeepingDataChildRequirements = _child return _child, nil @@ -148,6 +154,7 @@ func (m *_ClockAndTimekeepingDataRequestRefresh) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ClockAndTimekeepingDataRequestRefresh) isClockAndTimekeepingDataRequestRefresh() bool { return true } @@ -162,3 +169,6 @@ func (m *_ClockAndTimekeepingDataRequestRefresh) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/ClockAndTimekeepingDataUpdateDate.go b/plc4go/protocols/cbus/readwrite/model/ClockAndTimekeepingDataUpdateDate.go index cae4dc08aab..aa25d74e473 100644 --- a/plc4go/protocols/cbus/readwrite/model/ClockAndTimekeepingDataUpdateDate.go +++ b/plc4go/protocols/cbus/readwrite/model/ClockAndTimekeepingDataUpdateDate.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ClockAndTimekeepingDataUpdateDate is the corresponding interface of ClockAndTimekeepingDataUpdateDate type ClockAndTimekeepingDataUpdateDate interface { @@ -54,13 +56,15 @@ type ClockAndTimekeepingDataUpdateDateExactly interface { // _ClockAndTimekeepingDataUpdateDate is the data-structure of this message type _ClockAndTimekeepingDataUpdateDate struct { *_ClockAndTimekeepingData - YearHigh byte - YearLow byte - Month uint8 - Day uint8 - DayOfWeek uint8 + YearHigh byte + YearLow byte + Month uint8 + Day uint8 + DayOfWeek uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -71,15 +75,13 @@ type _ClockAndTimekeepingDataUpdateDate struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ClockAndTimekeepingDataUpdateDate) InitializeParent(parent ClockAndTimekeepingData, commandTypeContainer ClockAndTimekeepingCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_ClockAndTimekeepingDataUpdateDate) InitializeParent(parent ClockAndTimekeepingData , commandTypeContainer ClockAndTimekeepingCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_ClockAndTimekeepingDataUpdateDate) GetParent() ClockAndTimekeepingData { +func (m *_ClockAndTimekeepingDataUpdateDate) GetParent() ClockAndTimekeepingData { return m._ClockAndTimekeepingData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -110,15 +112,16 @@ func (m *_ClockAndTimekeepingDataUpdateDate) GetDayOfWeek() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewClockAndTimekeepingDataUpdateDate factory function for _ClockAndTimekeepingDataUpdateDate -func NewClockAndTimekeepingDataUpdateDate(yearHigh byte, yearLow byte, month uint8, day uint8, dayOfWeek uint8, commandTypeContainer ClockAndTimekeepingCommandTypeContainer, argument byte) *_ClockAndTimekeepingDataUpdateDate { +func NewClockAndTimekeepingDataUpdateDate( yearHigh byte , yearLow byte , month uint8 , day uint8 , dayOfWeek uint8 , commandTypeContainer ClockAndTimekeepingCommandTypeContainer , argument byte ) *_ClockAndTimekeepingDataUpdateDate { _result := &_ClockAndTimekeepingDataUpdateDate{ - YearHigh: yearHigh, - YearLow: yearLow, - Month: month, - Day: day, - DayOfWeek: dayOfWeek, - _ClockAndTimekeepingData: NewClockAndTimekeepingData(commandTypeContainer, argument), + YearHigh: yearHigh, + YearLow: yearLow, + Month: month, + Day: day, + DayOfWeek: dayOfWeek, + _ClockAndTimekeepingData: NewClockAndTimekeepingData(commandTypeContainer, argument), } _result._ClockAndTimekeepingData._ClockAndTimekeepingDataChildRequirements = _result return _result @@ -126,7 +129,7 @@ func NewClockAndTimekeepingDataUpdateDate(yearHigh byte, yearLow byte, month uin // Deprecated: use the interface for direct cast func CastClockAndTimekeepingDataUpdateDate(structType interface{}) ClockAndTimekeepingDataUpdateDate { - if casted, ok := structType.(ClockAndTimekeepingDataUpdateDate); ok { + if casted, ok := structType.(ClockAndTimekeepingDataUpdateDate); ok { return casted } if casted, ok := structType.(*ClockAndTimekeepingDataUpdateDate); ok { @@ -143,23 +146,24 @@ func (m *_ClockAndTimekeepingDataUpdateDate) GetLengthInBits(ctx context.Context lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (yearHigh) - lengthInBits += 8 + lengthInBits += 8; // Simple field (yearLow) - lengthInBits += 8 + lengthInBits += 8; // Simple field (month) - lengthInBits += 8 + lengthInBits += 8; // Simple field (day) - lengthInBits += 8 + lengthInBits += 8; // Simple field (dayOfWeek) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_ClockAndTimekeepingDataUpdateDate) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -178,35 +182,35 @@ func ClockAndTimekeepingDataUpdateDateParseWithBuffer(ctx context.Context, readB _ = currentPos // Simple Field (yearHigh) - _yearHigh, _yearHighErr := readBuffer.ReadByte("yearHigh") +_yearHigh, _yearHighErr := readBuffer.ReadByte("yearHigh") if _yearHighErr != nil { return nil, errors.Wrap(_yearHighErr, "Error parsing 'yearHigh' field of ClockAndTimekeepingDataUpdateDate") } yearHigh := _yearHigh // Simple Field (yearLow) - _yearLow, _yearLowErr := readBuffer.ReadByte("yearLow") +_yearLow, _yearLowErr := readBuffer.ReadByte("yearLow") if _yearLowErr != nil { return nil, errors.Wrap(_yearLowErr, "Error parsing 'yearLow' field of ClockAndTimekeepingDataUpdateDate") } yearLow := _yearLow // Simple Field (month) - _month, _monthErr := readBuffer.ReadUint8("month", 8) +_month, _monthErr := readBuffer.ReadUint8("month", 8) if _monthErr != nil { return nil, errors.Wrap(_monthErr, "Error parsing 'month' field of ClockAndTimekeepingDataUpdateDate") } month := _month // Simple Field (day) - _day, _dayErr := readBuffer.ReadUint8("day", 8) +_day, _dayErr := readBuffer.ReadUint8("day", 8) if _dayErr != nil { return nil, errors.Wrap(_dayErr, "Error parsing 'day' field of ClockAndTimekeepingDataUpdateDate") } day := _day // Simple Field (dayOfWeek) - _dayOfWeek, _dayOfWeekErr := readBuffer.ReadUint8("dayOfWeek", 8) +_dayOfWeek, _dayOfWeekErr := readBuffer.ReadUint8("dayOfWeek", 8) if _dayOfWeekErr != nil { return nil, errors.Wrap(_dayOfWeekErr, "Error parsing 'dayOfWeek' field of ClockAndTimekeepingDataUpdateDate") } @@ -218,12 +222,13 @@ func ClockAndTimekeepingDataUpdateDateParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_ClockAndTimekeepingDataUpdateDate{ - _ClockAndTimekeepingData: &_ClockAndTimekeepingData{}, - YearHigh: yearHigh, - YearLow: yearLow, - Month: month, - Day: day, - DayOfWeek: dayOfWeek, + _ClockAndTimekeepingData: &_ClockAndTimekeepingData{ + }, + YearHigh: yearHigh, + YearLow: yearLow, + Month: month, + Day: day, + DayOfWeek: dayOfWeek, } _child._ClockAndTimekeepingData._ClockAndTimekeepingDataChildRequirements = _child return _child, nil @@ -245,40 +250,40 @@ func (m *_ClockAndTimekeepingDataUpdateDate) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for ClockAndTimekeepingDataUpdateDate") } - // Simple Field (yearHigh) - yearHigh := byte(m.GetYearHigh()) - _yearHighErr := writeBuffer.WriteByte("yearHigh", (yearHigh)) - if _yearHighErr != nil { - return errors.Wrap(_yearHighErr, "Error serializing 'yearHigh' field") - } + // Simple Field (yearHigh) + yearHigh := byte(m.GetYearHigh()) + _yearHighErr := writeBuffer.WriteByte("yearHigh", (yearHigh)) + if _yearHighErr != nil { + return errors.Wrap(_yearHighErr, "Error serializing 'yearHigh' field") + } - // Simple Field (yearLow) - yearLow := byte(m.GetYearLow()) - _yearLowErr := writeBuffer.WriteByte("yearLow", (yearLow)) - if _yearLowErr != nil { - return errors.Wrap(_yearLowErr, "Error serializing 'yearLow' field") - } + // Simple Field (yearLow) + yearLow := byte(m.GetYearLow()) + _yearLowErr := writeBuffer.WriteByte("yearLow", (yearLow)) + if _yearLowErr != nil { + return errors.Wrap(_yearLowErr, "Error serializing 'yearLow' field") + } - // Simple Field (month) - month := uint8(m.GetMonth()) - _monthErr := writeBuffer.WriteUint8("month", 8, (month)) - if _monthErr != nil { - return errors.Wrap(_monthErr, "Error serializing 'month' field") - } + // Simple Field (month) + month := uint8(m.GetMonth()) + _monthErr := writeBuffer.WriteUint8("month", 8, (month)) + if _monthErr != nil { + return errors.Wrap(_monthErr, "Error serializing 'month' field") + } - // Simple Field (day) - day := uint8(m.GetDay()) - _dayErr := writeBuffer.WriteUint8("day", 8, (day)) - if _dayErr != nil { - return errors.Wrap(_dayErr, "Error serializing 'day' field") - } + // Simple Field (day) + day := uint8(m.GetDay()) + _dayErr := writeBuffer.WriteUint8("day", 8, (day)) + if _dayErr != nil { + return errors.Wrap(_dayErr, "Error serializing 'day' field") + } - // Simple Field (dayOfWeek) - dayOfWeek := uint8(m.GetDayOfWeek()) - _dayOfWeekErr := writeBuffer.WriteUint8("dayOfWeek", 8, (dayOfWeek)) - if _dayOfWeekErr != nil { - return errors.Wrap(_dayOfWeekErr, "Error serializing 'dayOfWeek' field") - } + // Simple Field (dayOfWeek) + dayOfWeek := uint8(m.GetDayOfWeek()) + _dayOfWeekErr := writeBuffer.WriteUint8("dayOfWeek", 8, (dayOfWeek)) + if _dayOfWeekErr != nil { + return errors.Wrap(_dayOfWeekErr, "Error serializing 'dayOfWeek' field") + } if popErr := writeBuffer.PopContext("ClockAndTimekeepingDataUpdateDate"); popErr != nil { return errors.Wrap(popErr, "Error popping for ClockAndTimekeepingDataUpdateDate") @@ -288,6 +293,7 @@ func (m *_ClockAndTimekeepingDataUpdateDate) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ClockAndTimekeepingDataUpdateDate) isClockAndTimekeepingDataUpdateDate() bool { return true } @@ -302,3 +308,6 @@ func (m *_ClockAndTimekeepingDataUpdateDate) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/ClockAndTimekeepingDataUpdateTime.go b/plc4go/protocols/cbus/readwrite/model/ClockAndTimekeepingDataUpdateTime.go index 17608e5020c..b2a42de548c 100644 --- a/plc4go/protocols/cbus/readwrite/model/ClockAndTimekeepingDataUpdateTime.go +++ b/plc4go/protocols/cbus/readwrite/model/ClockAndTimekeepingDataUpdateTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ClockAndTimekeepingDataUpdateTime is the corresponding interface of ClockAndTimekeepingDataUpdateTime type ClockAndTimekeepingDataUpdateTime interface { @@ -60,12 +62,14 @@ type ClockAndTimekeepingDataUpdateTimeExactly interface { // _ClockAndTimekeepingDataUpdateTime is the data-structure of this message type _ClockAndTimekeepingDataUpdateTime struct { *_ClockAndTimekeepingData - Hours uint8 - Minute uint8 - Second uint8 - DaylightSaving byte + Hours uint8 + Minute uint8 + Second uint8 + DaylightSaving byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -76,15 +80,13 @@ type _ClockAndTimekeepingDataUpdateTime struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ClockAndTimekeepingDataUpdateTime) InitializeParent(parent ClockAndTimekeepingData, commandTypeContainer ClockAndTimekeepingCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_ClockAndTimekeepingDataUpdateTime) InitializeParent(parent ClockAndTimekeepingData , commandTypeContainer ClockAndTimekeepingCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_ClockAndTimekeepingDataUpdateTime) GetParent() ClockAndTimekeepingData { +func (m *_ClockAndTimekeepingDataUpdateTime) GetParent() ClockAndTimekeepingData { return m._ClockAndTimekeepingData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -144,14 +146,15 @@ func (m *_ClockAndTimekeepingDataUpdateTime) GetIsUnknown() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewClockAndTimekeepingDataUpdateTime factory function for _ClockAndTimekeepingDataUpdateTime -func NewClockAndTimekeepingDataUpdateTime(hours uint8, minute uint8, second uint8, daylightSaving byte, commandTypeContainer ClockAndTimekeepingCommandTypeContainer, argument byte) *_ClockAndTimekeepingDataUpdateTime { +func NewClockAndTimekeepingDataUpdateTime( hours uint8 , minute uint8 , second uint8 , daylightSaving byte , commandTypeContainer ClockAndTimekeepingCommandTypeContainer , argument byte ) *_ClockAndTimekeepingDataUpdateTime { _result := &_ClockAndTimekeepingDataUpdateTime{ - Hours: hours, - Minute: minute, - Second: second, - DaylightSaving: daylightSaving, - _ClockAndTimekeepingData: NewClockAndTimekeepingData(commandTypeContainer, argument), + Hours: hours, + Minute: minute, + Second: second, + DaylightSaving: daylightSaving, + _ClockAndTimekeepingData: NewClockAndTimekeepingData(commandTypeContainer, argument), } _result._ClockAndTimekeepingData._ClockAndTimekeepingDataChildRequirements = _result return _result @@ -159,7 +162,7 @@ func NewClockAndTimekeepingDataUpdateTime(hours uint8, minute uint8, second uint // Deprecated: use the interface for direct cast func CastClockAndTimekeepingDataUpdateTime(structType interface{}) ClockAndTimekeepingDataUpdateTime { - if casted, ok := structType.(ClockAndTimekeepingDataUpdateTime); ok { + if casted, ok := structType.(ClockAndTimekeepingDataUpdateTime); ok { return casted } if casted, ok := structType.(*ClockAndTimekeepingDataUpdateTime); ok { @@ -176,16 +179,16 @@ func (m *_ClockAndTimekeepingDataUpdateTime) GetLengthInBits(ctx context.Context lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (hours) - lengthInBits += 8 + lengthInBits += 8; // Simple field (minute) - lengthInBits += 8 + lengthInBits += 8; // Simple field (second) - lengthInBits += 8 + lengthInBits += 8; // Simple field (daylightSaving) - lengthInBits += 8 + lengthInBits += 8; // A virtual field doesn't have any in- or output. @@ -198,6 +201,7 @@ func (m *_ClockAndTimekeepingDataUpdateTime) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_ClockAndTimekeepingDataUpdateTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -216,28 +220,28 @@ func ClockAndTimekeepingDataUpdateTimeParseWithBuffer(ctx context.Context, readB _ = currentPos // Simple Field (hours) - _hours, _hoursErr := readBuffer.ReadUint8("hours", 8) +_hours, _hoursErr := readBuffer.ReadUint8("hours", 8) if _hoursErr != nil { return nil, errors.Wrap(_hoursErr, "Error parsing 'hours' field of ClockAndTimekeepingDataUpdateTime") } hours := _hours // Simple Field (minute) - _minute, _minuteErr := readBuffer.ReadUint8("minute", 8) +_minute, _minuteErr := readBuffer.ReadUint8("minute", 8) if _minuteErr != nil { return nil, errors.Wrap(_minuteErr, "Error parsing 'minute' field of ClockAndTimekeepingDataUpdateTime") } minute := _minute // Simple Field (second) - _second, _secondErr := readBuffer.ReadUint8("second", 8) +_second, _secondErr := readBuffer.ReadUint8("second", 8) if _secondErr != nil { return nil, errors.Wrap(_secondErr, "Error parsing 'second' field of ClockAndTimekeepingDataUpdateTime") } second := _second // Simple Field (daylightSaving) - _daylightSaving, _daylightSavingErr := readBuffer.ReadByte("daylightSaving") +_daylightSaving, _daylightSavingErr := readBuffer.ReadByte("daylightSaving") if _daylightSavingErr != nil { return nil, errors.Wrap(_daylightSavingErr, "Error parsing 'daylightSaving' field of ClockAndTimekeepingDataUpdateTime") } @@ -269,11 +273,12 @@ func ClockAndTimekeepingDataUpdateTimeParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_ClockAndTimekeepingDataUpdateTime{ - _ClockAndTimekeepingData: &_ClockAndTimekeepingData{}, - Hours: hours, - Minute: minute, - Second: second, - DaylightSaving: daylightSaving, + _ClockAndTimekeepingData: &_ClockAndTimekeepingData{ + }, + Hours: hours, + Minute: minute, + Second: second, + DaylightSaving: daylightSaving, } _child._ClockAndTimekeepingData._ClockAndTimekeepingDataChildRequirements = _child return _child, nil @@ -295,49 +300,49 @@ func (m *_ClockAndTimekeepingDataUpdateTime) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for ClockAndTimekeepingDataUpdateTime") } - // Simple Field (hours) - hours := uint8(m.GetHours()) - _hoursErr := writeBuffer.WriteUint8("hours", 8, (hours)) - if _hoursErr != nil { - return errors.Wrap(_hoursErr, "Error serializing 'hours' field") - } + // Simple Field (hours) + hours := uint8(m.GetHours()) + _hoursErr := writeBuffer.WriteUint8("hours", 8, (hours)) + if _hoursErr != nil { + return errors.Wrap(_hoursErr, "Error serializing 'hours' field") + } - // Simple Field (minute) - minute := uint8(m.GetMinute()) - _minuteErr := writeBuffer.WriteUint8("minute", 8, (minute)) - if _minuteErr != nil { - return errors.Wrap(_minuteErr, "Error serializing 'minute' field") - } + // Simple Field (minute) + minute := uint8(m.GetMinute()) + _minuteErr := writeBuffer.WriteUint8("minute", 8, (minute)) + if _minuteErr != nil { + return errors.Wrap(_minuteErr, "Error serializing 'minute' field") + } - // Simple Field (second) - second := uint8(m.GetSecond()) - _secondErr := writeBuffer.WriteUint8("second", 8, (second)) - if _secondErr != nil { - return errors.Wrap(_secondErr, "Error serializing 'second' field") - } + // Simple Field (second) + second := uint8(m.GetSecond()) + _secondErr := writeBuffer.WriteUint8("second", 8, (second)) + if _secondErr != nil { + return errors.Wrap(_secondErr, "Error serializing 'second' field") + } - // Simple Field (daylightSaving) - daylightSaving := byte(m.GetDaylightSaving()) - _daylightSavingErr := writeBuffer.WriteByte("daylightSaving", (daylightSaving)) - if _daylightSavingErr != nil { - return errors.Wrap(_daylightSavingErr, "Error serializing 'daylightSaving' field") - } - // Virtual field - if _isNoDaylightSavingsErr := writeBuffer.WriteVirtual(ctx, "isNoDaylightSavings", m.GetIsNoDaylightSavings()); _isNoDaylightSavingsErr != nil { - return errors.Wrap(_isNoDaylightSavingsErr, "Error serializing 'isNoDaylightSavings' field") - } - // Virtual field - if _isAdvancedBy1HourErr := writeBuffer.WriteVirtual(ctx, "isAdvancedBy1Hour", m.GetIsAdvancedBy1Hour()); _isAdvancedBy1HourErr != nil { - return errors.Wrap(_isAdvancedBy1HourErr, "Error serializing 'isAdvancedBy1Hour' field") - } - // Virtual field - if _isReservedErr := writeBuffer.WriteVirtual(ctx, "isReserved", m.GetIsReserved()); _isReservedErr != nil { - return errors.Wrap(_isReservedErr, "Error serializing 'isReserved' field") - } - // Virtual field - if _isUnknownErr := writeBuffer.WriteVirtual(ctx, "isUnknown", m.GetIsUnknown()); _isUnknownErr != nil { - return errors.Wrap(_isUnknownErr, "Error serializing 'isUnknown' field") - } + // Simple Field (daylightSaving) + daylightSaving := byte(m.GetDaylightSaving()) + _daylightSavingErr := writeBuffer.WriteByte("daylightSaving", (daylightSaving)) + if _daylightSavingErr != nil { + return errors.Wrap(_daylightSavingErr, "Error serializing 'daylightSaving' field") + } + // Virtual field + if _isNoDaylightSavingsErr := writeBuffer.WriteVirtual(ctx, "isNoDaylightSavings", m.GetIsNoDaylightSavings()); _isNoDaylightSavingsErr != nil { + return errors.Wrap(_isNoDaylightSavingsErr, "Error serializing 'isNoDaylightSavings' field") + } + // Virtual field + if _isAdvancedBy1HourErr := writeBuffer.WriteVirtual(ctx, "isAdvancedBy1Hour", m.GetIsAdvancedBy1Hour()); _isAdvancedBy1HourErr != nil { + return errors.Wrap(_isAdvancedBy1HourErr, "Error serializing 'isAdvancedBy1Hour' field") + } + // Virtual field + if _isReservedErr := writeBuffer.WriteVirtual(ctx, "isReserved", m.GetIsReserved()); _isReservedErr != nil { + return errors.Wrap(_isReservedErr, "Error serializing 'isReserved' field") + } + // Virtual field + if _isUnknownErr := writeBuffer.WriteVirtual(ctx, "isUnknown", m.GetIsUnknown()); _isUnknownErr != nil { + return errors.Wrap(_isUnknownErr, "Error serializing 'isUnknown' field") + } if popErr := writeBuffer.PopContext("ClockAndTimekeepingDataUpdateTime"); popErr != nil { return errors.Wrap(popErr, "Error popping for ClockAndTimekeepingDataUpdateTime") @@ -347,6 +352,7 @@ func (m *_ClockAndTimekeepingDataUpdateTime) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ClockAndTimekeepingDataUpdateTime) isClockAndTimekeepingDataUpdateTime() bool { return true } @@ -361,3 +367,6 @@ func (m *_ClockAndTimekeepingDataUpdateTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/Confirmation.go b/plc4go/protocols/cbus/readwrite/model/Confirmation.go index 1db9412bca4..caee7a7e9c3 100644 --- a/plc4go/protocols/cbus/readwrite/model/Confirmation.go +++ b/plc4go/protocols/cbus/readwrite/model/Confirmation.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Confirmation is the corresponding interface of Confirmation type Confirmation interface { @@ -51,11 +53,12 @@ type ConfirmationExactly interface { // _Confirmation is the data-structure of this message type _Confirmation struct { - Alpha Alpha - SecondAlpha Alpha - ConfirmationType ConfirmationType + Alpha Alpha + SecondAlpha Alpha + ConfirmationType ConfirmationType } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -95,14 +98,15 @@ func (m *_Confirmation) GetIsSuccess() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewConfirmation factory function for _Confirmation -func NewConfirmation(alpha Alpha, secondAlpha Alpha, confirmationType ConfirmationType) *_Confirmation { - return &_Confirmation{Alpha: alpha, SecondAlpha: secondAlpha, ConfirmationType: confirmationType} +func NewConfirmation( alpha Alpha , secondAlpha Alpha , confirmationType ConfirmationType ) *_Confirmation { +return &_Confirmation{ Alpha: alpha , SecondAlpha: secondAlpha , ConfirmationType: confirmationType } } // Deprecated: use the interface for direct cast func CastConfirmation(structType interface{}) Confirmation { - if casted, ok := structType.(Confirmation); ok { + if casted, ok := structType.(Confirmation); ok { return casted } if casted, ok := structType.(*Confirmation); ok { @@ -134,6 +138,7 @@ func (m *_Confirmation) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_Confirmation) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -155,7 +160,7 @@ func ConfirmationParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe if pullErr := readBuffer.PullContext("alpha"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for alpha") } - _alpha, _alphaErr := AlphaParseWithBuffer(ctx, readBuffer) +_alpha, _alphaErr := AlphaParseWithBuffer(ctx, readBuffer) if _alphaErr != nil { return nil, errors.Wrap(_alphaErr, "Error parsing 'alpha' field of Confirmation") } @@ -166,12 +171,12 @@ func ConfirmationParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe // Optional Field (secondAlpha) (Can be skipped, if a given expression evaluates to false) var secondAlpha Alpha = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("secondAlpha"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for secondAlpha") } - _val, _err := AlphaParseWithBuffer(ctx, readBuffer) +_val, _err := AlphaParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -190,7 +195,7 @@ func ConfirmationParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe if pullErr := readBuffer.PullContext("confirmationType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for confirmationType") } - _confirmationType, _confirmationTypeErr := ConfirmationTypeParseWithBuffer(ctx, readBuffer) +_confirmationType, _confirmationTypeErr := ConfirmationTypeParseWithBuffer(ctx, readBuffer) if _confirmationTypeErr != nil { return nil, errors.Wrap(_confirmationTypeErr, "Error parsing 'confirmationType' field of Confirmation") } @@ -210,10 +215,10 @@ func ConfirmationParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe // Create the instance return &_Confirmation{ - Alpha: alpha, - SecondAlpha: secondAlpha, - ConfirmationType: confirmationType, - }, nil + Alpha: alpha, + SecondAlpha: secondAlpha, + ConfirmationType: confirmationType, + }, nil } func (m *_Confirmation) Serialize() ([]byte, error) { @@ -227,7 +232,7 @@ func (m *_Confirmation) Serialize() ([]byte, error) { func (m *_Confirmation) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("Confirmation"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("Confirmation"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for Confirmation") } @@ -281,6 +286,7 @@ func (m *_Confirmation) SerializeWithWriteBuffer(ctx context.Context, writeBuffe return nil } + func (m *_Confirmation) isConfirmation() bool { return true } @@ -295,3 +301,6 @@ func (m *_Confirmation) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/ConfirmationType.go b/plc4go/protocols/cbus/readwrite/model/ConfirmationType.go index d4fa3d6b409..6e195258ec1 100644 --- a/plc4go/protocols/cbus/readwrite/model/ConfirmationType.go +++ b/plc4go/protocols/cbus/readwrite/model/ConfirmationType.go @@ -34,20 +34,20 @@ type IConfirmationType interface { utils.Serializable } -const ( - ConfirmationType_CONFIRMATION_SUCCESSFUL ConfirmationType = 0x2E +const( + ConfirmationType_CONFIRMATION_SUCCESSFUL ConfirmationType = 0x2E ConfirmationType_NOT_TRANSMITTED_TO_MANY_RE_TRANSMISSIONS ConfirmationType = 0x23 - ConfirmationType_NOT_TRANSMITTED_CORRUPTION ConfirmationType = 0x24 - ConfirmationType_NOT_TRANSMITTED_SYNC_LOSS ConfirmationType = 0x25 - ConfirmationType_NOT_TRANSMITTED_TOO_LONG ConfirmationType = 0x27 - ConfirmationType_CHECKSUM_FAILURE ConfirmationType = 0x21 + ConfirmationType_NOT_TRANSMITTED_CORRUPTION ConfirmationType = 0x24 + ConfirmationType_NOT_TRANSMITTED_SYNC_LOSS ConfirmationType = 0x25 + ConfirmationType_NOT_TRANSMITTED_TOO_LONG ConfirmationType = 0x27 + ConfirmationType_CHECKSUM_FAILURE ConfirmationType = 0x21 ) var ConfirmationTypeValues []ConfirmationType func init() { _ = errors.New - ConfirmationTypeValues = []ConfirmationType{ + ConfirmationTypeValues = []ConfirmationType { ConfirmationType_CONFIRMATION_SUCCESSFUL, ConfirmationType_NOT_TRANSMITTED_TO_MANY_RE_TRANSMISSIONS, ConfirmationType_NOT_TRANSMITTED_CORRUPTION, @@ -59,18 +59,18 @@ func init() { func ConfirmationTypeByValue(value byte) (enum ConfirmationType, ok bool) { switch value { - case 0x21: - return ConfirmationType_CHECKSUM_FAILURE, true - case 0x23: - return ConfirmationType_NOT_TRANSMITTED_TO_MANY_RE_TRANSMISSIONS, true - case 0x24: - return ConfirmationType_NOT_TRANSMITTED_CORRUPTION, true - case 0x25: - return ConfirmationType_NOT_TRANSMITTED_SYNC_LOSS, true - case 0x27: - return ConfirmationType_NOT_TRANSMITTED_TOO_LONG, true - case 0x2E: - return ConfirmationType_CONFIRMATION_SUCCESSFUL, true + case 0x21: + return ConfirmationType_CHECKSUM_FAILURE, true + case 0x23: + return ConfirmationType_NOT_TRANSMITTED_TO_MANY_RE_TRANSMISSIONS, true + case 0x24: + return ConfirmationType_NOT_TRANSMITTED_CORRUPTION, true + case 0x25: + return ConfirmationType_NOT_TRANSMITTED_SYNC_LOSS, true + case 0x27: + return ConfirmationType_NOT_TRANSMITTED_TOO_LONG, true + case 0x2E: + return ConfirmationType_CONFIRMATION_SUCCESSFUL, true } return 0, false } @@ -93,13 +93,13 @@ func ConfirmationTypeByName(value string) (enum ConfirmationType, ok bool) { return 0, false } -func ConfirmationTypeKnows(value byte) bool { +func ConfirmationTypeKnows(value byte) bool { for _, typeValue := range ConfirmationTypeValues { if byte(typeValue) == value { return true } } - return false + return false; } func CastConfirmationType(structType interface{}) ConfirmationType { @@ -171,3 +171,4 @@ func (e ConfirmationType) PLC4XEnumName() string { func (e ConfirmationType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/CustomManufacturer.go b/plc4go/protocols/cbus/readwrite/model/CustomManufacturer.go index b35772d0048..4b88f3e95d1 100644 --- a/plc4go/protocols/cbus/readwrite/model/CustomManufacturer.go +++ b/plc4go/protocols/cbus/readwrite/model/CustomManufacturer.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CustomManufacturer is the corresponding interface of CustomManufacturer type CustomManufacturer interface { @@ -44,12 +46,13 @@ type CustomManufacturerExactly interface { // _CustomManufacturer is the data-structure of this message type _CustomManufacturer struct { - CustomString string + CustomString string // Arguments. NumBytes uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -64,14 +67,15 @@ func (m *_CustomManufacturer) GetCustomString() string { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCustomManufacturer factory function for _CustomManufacturer -func NewCustomManufacturer(customString string, numBytes uint8) *_CustomManufacturer { - return &_CustomManufacturer{CustomString: customString, NumBytes: numBytes} +func NewCustomManufacturer( customString string , numBytes uint8 ) *_CustomManufacturer { +return &_CustomManufacturer{ CustomString: customString , NumBytes: numBytes } } // Deprecated: use the interface for direct cast func CastCustomManufacturer(structType interface{}) CustomManufacturer { - if casted, ok := structType.(CustomManufacturer); ok { + if casted, ok := structType.(CustomManufacturer); ok { return casted } if casted, ok := structType.(*CustomManufacturer); ok { @@ -93,6 +97,7 @@ func (m *_CustomManufacturer) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_CustomManufacturer) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -111,7 +116,7 @@ func CustomManufacturerParseWithBuffer(ctx context.Context, readBuffer utils.Rea _ = currentPos // Simple Field (customString) - _customString, _customStringErr := readBuffer.ReadString("customString", uint32((8)*(numBytes)), "UTF-8") +_customString, _customStringErr := readBuffer.ReadString("customString", uint32(((8)) * (numBytes)), "UTF-8") if _customStringErr != nil { return nil, errors.Wrap(_customStringErr, "Error parsing 'customString' field of CustomManufacturer") } @@ -123,9 +128,9 @@ func CustomManufacturerParseWithBuffer(ctx context.Context, readBuffer utils.Rea // Create the instance return &_CustomManufacturer{ - NumBytes: numBytes, - CustomString: customString, - }, nil + NumBytes: numBytes, + CustomString: customString, + }, nil } func (m *_CustomManufacturer) Serialize() ([]byte, error) { @@ -139,13 +144,13 @@ func (m *_CustomManufacturer) Serialize() ([]byte, error) { func (m *_CustomManufacturer) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("CustomManufacturer"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("CustomManufacturer"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for CustomManufacturer") } // Simple Field (customString) customString := string(m.GetCustomString()) - _customStringErr := writeBuffer.WriteString("customString", uint32((8)*(m.GetNumBytes())), "UTF-8", (customString)) + _customStringErr := writeBuffer.WriteString("customString", uint32(((8)) * (m.GetNumBytes())), "UTF-8", (customString)) if _customStringErr != nil { return errors.Wrap(_customStringErr, "Error serializing 'customString' field") } @@ -156,13 +161,13 @@ func (m *_CustomManufacturer) SerializeWithWriteBuffer(ctx context.Context, writ return nil } + //// // Arguments Getter func (m *_CustomManufacturer) GetNumBytes() uint8 { return m.NumBytes } - // //// @@ -180,3 +185,6 @@ func (m *_CustomManufacturer) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/CustomTypes.go b/plc4go/protocols/cbus/readwrite/model/CustomTypes.go index 06d04ed936f..140b84a137e 100644 --- a/plc4go/protocols/cbus/readwrite/model/CustomTypes.go +++ b/plc4go/protocols/cbus/readwrite/model/CustomTypes.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CustomTypes is the corresponding interface of CustomTypes type CustomTypes interface { @@ -44,12 +46,13 @@ type CustomTypesExactly interface { // _CustomTypes is the data-structure of this message type _CustomTypes struct { - CustomString string + CustomString string // Arguments. NumBytes uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -64,14 +67,15 @@ func (m *_CustomTypes) GetCustomString() string { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCustomTypes factory function for _CustomTypes -func NewCustomTypes(customString string, numBytes uint8) *_CustomTypes { - return &_CustomTypes{CustomString: customString, NumBytes: numBytes} +func NewCustomTypes( customString string , numBytes uint8 ) *_CustomTypes { +return &_CustomTypes{ CustomString: customString , NumBytes: numBytes } } // Deprecated: use the interface for direct cast func CastCustomTypes(structType interface{}) CustomTypes { - if casted, ok := structType.(CustomTypes); ok { + if casted, ok := structType.(CustomTypes); ok { return casted } if casted, ok := structType.(*CustomTypes); ok { @@ -93,6 +97,7 @@ func (m *_CustomTypes) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_CustomTypes) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -111,7 +116,7 @@ func CustomTypesParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer _ = currentPos // Simple Field (customString) - _customString, _customStringErr := readBuffer.ReadString("customString", uint32((8)*(numBytes)), "UTF-8") +_customString, _customStringErr := readBuffer.ReadString("customString", uint32(((8)) * (numBytes)), "UTF-8") if _customStringErr != nil { return nil, errors.Wrap(_customStringErr, "Error parsing 'customString' field of CustomTypes") } @@ -123,9 +128,9 @@ func CustomTypesParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer // Create the instance return &_CustomTypes{ - NumBytes: numBytes, - CustomString: customString, - }, nil + NumBytes: numBytes, + CustomString: customString, + }, nil } func (m *_CustomTypes) Serialize() ([]byte, error) { @@ -139,13 +144,13 @@ func (m *_CustomTypes) Serialize() ([]byte, error) { func (m *_CustomTypes) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("CustomTypes"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("CustomTypes"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for CustomTypes") } // Simple Field (customString) customString := string(m.GetCustomString()) - _customStringErr := writeBuffer.WriteString("customString", uint32((8)*(m.GetNumBytes())), "UTF-8", (customString)) + _customStringErr := writeBuffer.WriteString("customString", uint32(((8)) * (m.GetNumBytes())), "UTF-8", (customString)) if _customStringErr != nil { return errors.Wrap(_customStringErr, "Error serializing 'customString' field") } @@ -156,13 +161,13 @@ func (m *_CustomTypes) SerializeWithWriteBuffer(ctx context.Context, writeBuffer return nil } + //// // Arguments Getter func (m *_CustomTypes) GetNumBytes() uint8 { return m.NumBytes } - // //// @@ -180,3 +185,6 @@ func (m *_CustomTypes) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/DestinationAddressType.go b/plc4go/protocols/cbus/readwrite/model/DestinationAddressType.go index 39ff79a4628..21918fca75a 100644 --- a/plc4go/protocols/cbus/readwrite/model/DestinationAddressType.go +++ b/plc4go/protocols/cbus/readwrite/model/DestinationAddressType.go @@ -34,17 +34,17 @@ type IDestinationAddressType interface { utils.Serializable } -const ( +const( DestinationAddressType_PointToPointToMultiPoint DestinationAddressType = 0x03 - DestinationAddressType_PointToMultiPoint DestinationAddressType = 0x05 - DestinationAddressType_PointToPoint DestinationAddressType = 0x06 + DestinationAddressType_PointToMultiPoint DestinationAddressType = 0x05 + DestinationAddressType_PointToPoint DestinationAddressType = 0x06 ) var DestinationAddressTypeValues []DestinationAddressType func init() { _ = errors.New - DestinationAddressTypeValues = []DestinationAddressType{ + DestinationAddressTypeValues = []DestinationAddressType { DestinationAddressType_PointToPointToMultiPoint, DestinationAddressType_PointToMultiPoint, DestinationAddressType_PointToPoint, @@ -53,12 +53,12 @@ func init() { func DestinationAddressTypeByValue(value uint8) (enum DestinationAddressType, ok bool) { switch value { - case 0x03: - return DestinationAddressType_PointToPointToMultiPoint, true - case 0x05: - return DestinationAddressType_PointToMultiPoint, true - case 0x06: - return DestinationAddressType_PointToPoint, true + case 0x03: + return DestinationAddressType_PointToPointToMultiPoint, true + case 0x05: + return DestinationAddressType_PointToMultiPoint, true + case 0x06: + return DestinationAddressType_PointToPoint, true } return 0, false } @@ -75,13 +75,13 @@ func DestinationAddressTypeByName(value string) (enum DestinationAddressType, ok return 0, false } -func DestinationAddressTypeKnows(value uint8) bool { +func DestinationAddressTypeKnows(value uint8) bool { for _, typeValue := range DestinationAddressTypeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastDestinationAddressType(structType interface{}) DestinationAddressType { @@ -147,3 +147,4 @@ func (e DestinationAddressType) PLC4XEnumName() string { func (e DestinationAddressType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/DialInFailureReason.go b/plc4go/protocols/cbus/readwrite/model/DialInFailureReason.go index ae6f3b372bd..3bd0466ea1a 100644 --- a/plc4go/protocols/cbus/readwrite/model/DialInFailureReason.go +++ b/plc4go/protocols/cbus/readwrite/model/DialInFailureReason.go @@ -34,7 +34,7 @@ type IDialInFailureReason interface { utils.Serializable } -const ( +const( DialInFailureReason_PHONE_STOPPED_RINGING DialInFailureReason = 0x01 ) @@ -42,15 +42,15 @@ var DialInFailureReasonValues []DialInFailureReason func init() { _ = errors.New - DialInFailureReasonValues = []DialInFailureReason{ + DialInFailureReasonValues = []DialInFailureReason { DialInFailureReason_PHONE_STOPPED_RINGING, } } func DialInFailureReasonByValue(value uint8) (enum DialInFailureReason, ok bool) { switch value { - case 0x01: - return DialInFailureReason_PHONE_STOPPED_RINGING, true + case 0x01: + return DialInFailureReason_PHONE_STOPPED_RINGING, true } return 0, false } @@ -63,13 +63,13 @@ func DialInFailureReasonByName(value string) (enum DialInFailureReason, ok bool) return 0, false } -func DialInFailureReasonKnows(value uint8) bool { +func DialInFailureReasonKnows(value uint8) bool { for _, typeValue := range DialInFailureReasonValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastDialInFailureReason(structType interface{}) DialInFailureReason { @@ -131,3 +131,4 @@ func (e DialInFailureReason) PLC4XEnumName() string { func (e DialInFailureReason) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/DialOutFailureReason.go b/plc4go/protocols/cbus/readwrite/model/DialOutFailureReason.go index 1dacef22445..1d1fdd1ec1a 100644 --- a/plc4go/protocols/cbus/readwrite/model/DialOutFailureReason.go +++ b/plc4go/protocols/cbus/readwrite/model/DialOutFailureReason.go @@ -34,20 +34,20 @@ type IDialOutFailureReason interface { utils.Serializable } -const ( - DialOutFailureReason_NO_DIAL_TONE DialOutFailureReason = 0x01 - DialOutFailureReason_NO_ANSWER DialOutFailureReason = 0x02 - DialOutFailureReason_NO_VALID_ACKNOWLEDGEMENT_OF_PROMPTS DialOutFailureReason = 0x03 +const( + DialOutFailureReason_NO_DIAL_TONE DialOutFailureReason = 0x01 + DialOutFailureReason_NO_ANSWER DialOutFailureReason = 0x02 + DialOutFailureReason_NO_VALID_ACKNOWLEDGEMENT_OF_PROMPTS DialOutFailureReason = 0x03 DialOutFailureReason_NUMBER_WAS_UNOBTAINABLE_DOES_NOT_EXIST DialOutFailureReason = 0x04 - DialOutFailureReason_NUMBER_WAS_BUSY DialOutFailureReason = 0x05 - DialOutFailureReason_INTERNAL_FAILURE DialOutFailureReason = 0x06 + DialOutFailureReason_NUMBER_WAS_BUSY DialOutFailureReason = 0x05 + DialOutFailureReason_INTERNAL_FAILURE DialOutFailureReason = 0x06 ) var DialOutFailureReasonValues []DialOutFailureReason func init() { _ = errors.New - DialOutFailureReasonValues = []DialOutFailureReason{ + DialOutFailureReasonValues = []DialOutFailureReason { DialOutFailureReason_NO_DIAL_TONE, DialOutFailureReason_NO_ANSWER, DialOutFailureReason_NO_VALID_ACKNOWLEDGEMENT_OF_PROMPTS, @@ -59,18 +59,18 @@ func init() { func DialOutFailureReasonByValue(value uint8) (enum DialOutFailureReason, ok bool) { switch value { - case 0x01: - return DialOutFailureReason_NO_DIAL_TONE, true - case 0x02: - return DialOutFailureReason_NO_ANSWER, true - case 0x03: - return DialOutFailureReason_NO_VALID_ACKNOWLEDGEMENT_OF_PROMPTS, true - case 0x04: - return DialOutFailureReason_NUMBER_WAS_UNOBTAINABLE_DOES_NOT_EXIST, true - case 0x05: - return DialOutFailureReason_NUMBER_WAS_BUSY, true - case 0x06: - return DialOutFailureReason_INTERNAL_FAILURE, true + case 0x01: + return DialOutFailureReason_NO_DIAL_TONE, true + case 0x02: + return DialOutFailureReason_NO_ANSWER, true + case 0x03: + return DialOutFailureReason_NO_VALID_ACKNOWLEDGEMENT_OF_PROMPTS, true + case 0x04: + return DialOutFailureReason_NUMBER_WAS_UNOBTAINABLE_DOES_NOT_EXIST, true + case 0x05: + return DialOutFailureReason_NUMBER_WAS_BUSY, true + case 0x06: + return DialOutFailureReason_INTERNAL_FAILURE, true } return 0, false } @@ -93,13 +93,13 @@ func DialOutFailureReasonByName(value string) (enum DialOutFailureReason, ok boo return 0, false } -func DialOutFailureReasonKnows(value uint8) bool { +func DialOutFailureReasonKnows(value uint8) bool { for _, typeValue := range DialOutFailureReasonValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastDialOutFailureReason(structType interface{}) DialOutFailureReason { @@ -171,3 +171,4 @@ func (e DialOutFailureReason) PLC4XEnumName() string { func (e DialOutFailureReason) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/EnableControlCommandType.go b/plc4go/protocols/cbus/readwrite/model/EnableControlCommandType.go index 15e0f46cc75..7d221388cc5 100644 --- a/plc4go/protocols/cbus/readwrite/model/EnableControlCommandType.go +++ b/plc4go/protocols/cbus/readwrite/model/EnableControlCommandType.go @@ -35,7 +35,7 @@ type IEnableControlCommandType interface { NumberOfArguments() uint8 } -const ( +const( EnableControlCommandType_SET_NETWORK_VARIABLE EnableControlCommandType = 0x00 ) @@ -43,19 +43,18 @@ var EnableControlCommandTypeValues []EnableControlCommandType func init() { _ = errors.New - EnableControlCommandTypeValues = []EnableControlCommandType{ + EnableControlCommandTypeValues = []EnableControlCommandType { EnableControlCommandType_SET_NETWORK_VARIABLE, } } + func (e EnableControlCommandType) NumberOfArguments() uint8 { - switch e { - case 0x00: - { /* '0x00' */ - return 1 + switch e { + case 0x00: { /* '0x00' */ + return 1 } - default: - { + default: { return 0 } } @@ -71,8 +70,8 @@ func EnableControlCommandTypeFirstEnumForFieldNumberOfArguments(value uint8) (En } func EnableControlCommandTypeByValue(value uint8) (enum EnableControlCommandType, ok bool) { switch value { - case 0x00: - return EnableControlCommandType_SET_NETWORK_VARIABLE, true + case 0x00: + return EnableControlCommandType_SET_NETWORK_VARIABLE, true } return 0, false } @@ -85,13 +84,13 @@ func EnableControlCommandTypeByName(value string) (enum EnableControlCommandType return 0, false } -func EnableControlCommandTypeKnows(value uint8) bool { +func EnableControlCommandTypeKnows(value uint8) bool { for _, typeValue := range EnableControlCommandTypeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastEnableControlCommandType(structType interface{}) EnableControlCommandType { @@ -153,3 +152,4 @@ func (e EnableControlCommandType) PLC4XEnumName() string { func (e EnableControlCommandType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/EnableControlCommandTypeContainer.go b/plc4go/protocols/cbus/readwrite/model/EnableControlCommandTypeContainer.go index 9d2cc7f4ca7..397e2647c26 100644 --- a/plc4go/protocols/cbus/readwrite/model/EnableControlCommandTypeContainer.go +++ b/plc4go/protocols/cbus/readwrite/model/EnableControlCommandTypeContainer.go @@ -36,17 +36,17 @@ type IEnableControlCommandTypeContainer interface { CommandType() EnableControlCommandType } -const ( - EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable0_2Bytes EnableControlCommandTypeContainer = 0x02 - EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable1_2Bytes EnableControlCommandTypeContainer = 0x0A - EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable2_2Bytes EnableControlCommandTypeContainer = 0x12 - EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable3_2Bytes EnableControlCommandTypeContainer = 0x1A - EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable4_2Bytes EnableControlCommandTypeContainer = 0x22 - EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable5_2Bytes EnableControlCommandTypeContainer = 0x2A - EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable6_2Bytes EnableControlCommandTypeContainer = 0x32 - EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable7_2Bytes EnableControlCommandTypeContainer = 0x3A - EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable8_2Bytes EnableControlCommandTypeContainer = 0x42 - EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable9_2Bytes EnableControlCommandTypeContainer = 0x4A +const( + EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable0_2Bytes EnableControlCommandTypeContainer = 0x02 + EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable1_2Bytes EnableControlCommandTypeContainer = 0x0A + EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable2_2Bytes EnableControlCommandTypeContainer = 0x12 + EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable3_2Bytes EnableControlCommandTypeContainer = 0x1A + EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable4_2Bytes EnableControlCommandTypeContainer = 0x22 + EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable5_2Bytes EnableControlCommandTypeContainer = 0x2A + EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable6_2Bytes EnableControlCommandTypeContainer = 0x32 + EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable7_2Bytes EnableControlCommandTypeContainer = 0x3A + EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable8_2Bytes EnableControlCommandTypeContainer = 0x42 + EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable9_2Bytes EnableControlCommandTypeContainer = 0x4A EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable10_2Bytes EnableControlCommandTypeContainer = 0x52 EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable11_2Bytes EnableControlCommandTypeContainer = 0x5A EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable12_2Bytes EnableControlCommandTypeContainer = 0x62 @@ -59,7 +59,7 @@ var EnableControlCommandTypeContainerValues []EnableControlCommandTypeContainer func init() { _ = errors.New - EnableControlCommandTypeContainerValues = []EnableControlCommandTypeContainer{ + EnableControlCommandTypeContainerValues = []EnableControlCommandTypeContainer { EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable0_2Bytes, EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable1_2Bytes, EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable2_2Bytes, @@ -79,74 +79,58 @@ func init() { } } + func (e EnableControlCommandTypeContainer) NumBytes() uint8 { - switch e { - case 0x02: - { /* '0x02' */ - return 2 + switch e { + case 0x02: { /* '0x02' */ + return 2 } - case 0x0A: - { /* '0x0A' */ - return 2 + case 0x0A: { /* '0x0A' */ + return 2 } - case 0x12: - { /* '0x12' */ - return 2 + case 0x12: { /* '0x12' */ + return 2 } - case 0x1A: - { /* '0x1A' */ - return 2 + case 0x1A: { /* '0x1A' */ + return 2 } - case 0x22: - { /* '0x22' */ - return 2 + case 0x22: { /* '0x22' */ + return 2 } - case 0x2A: - { /* '0x2A' */ - return 2 + case 0x2A: { /* '0x2A' */ + return 2 } - case 0x32: - { /* '0x32' */ - return 2 + case 0x32: { /* '0x32' */ + return 2 } - case 0x3A: - { /* '0x3A' */ - return 2 + case 0x3A: { /* '0x3A' */ + return 2 } - case 0x42: - { /* '0x42' */ - return 2 + case 0x42: { /* '0x42' */ + return 2 } - case 0x4A: - { /* '0x4A' */ - return 2 + case 0x4A: { /* '0x4A' */ + return 2 } - case 0x52: - { /* '0x52' */ - return 2 + case 0x52: { /* '0x52' */ + return 2 } - case 0x5A: - { /* '0x5A' */ - return 2 + case 0x5A: { /* '0x5A' */ + return 2 } - case 0x62: - { /* '0x62' */ - return 2 + case 0x62: { /* '0x62' */ + return 2 } - case 0x6A: - { /* '0x6A' */ - return 2 + case 0x6A: { /* '0x6A' */ + return 2 } - case 0x72: - { /* '0x72' */ - return 2 + case 0x72: { /* '0x72' */ + return 2 } - case 0x7A: - { /* '0x7A' */ - return 2 + case 0x7A: { /* '0x7A' */ + return 2 } - default: - { + default: { return 0 } } @@ -162,73 +146,56 @@ func EnableControlCommandTypeContainerFirstEnumForFieldNumBytes(value uint8) (En } func (e EnableControlCommandTypeContainer) CommandType() EnableControlCommandType { - switch e { - case 0x02: - { /* '0x02' */ + switch e { + case 0x02: { /* '0x02' */ return EnableControlCommandType_SET_NETWORK_VARIABLE } - case 0x0A: - { /* '0x0A' */ + case 0x0A: { /* '0x0A' */ return EnableControlCommandType_SET_NETWORK_VARIABLE } - case 0x12: - { /* '0x12' */ + case 0x12: { /* '0x12' */ return EnableControlCommandType_SET_NETWORK_VARIABLE } - case 0x1A: - { /* '0x1A' */ + case 0x1A: { /* '0x1A' */ return EnableControlCommandType_SET_NETWORK_VARIABLE } - case 0x22: - { /* '0x22' */ + case 0x22: { /* '0x22' */ return EnableControlCommandType_SET_NETWORK_VARIABLE } - case 0x2A: - { /* '0x2A' */ + case 0x2A: { /* '0x2A' */ return EnableControlCommandType_SET_NETWORK_VARIABLE } - case 0x32: - { /* '0x32' */ + case 0x32: { /* '0x32' */ return EnableControlCommandType_SET_NETWORK_VARIABLE } - case 0x3A: - { /* '0x3A' */ + case 0x3A: { /* '0x3A' */ return EnableControlCommandType_SET_NETWORK_VARIABLE } - case 0x42: - { /* '0x42' */ + case 0x42: { /* '0x42' */ return EnableControlCommandType_SET_NETWORK_VARIABLE } - case 0x4A: - { /* '0x4A' */ + case 0x4A: { /* '0x4A' */ return EnableControlCommandType_SET_NETWORK_VARIABLE } - case 0x52: - { /* '0x52' */ + case 0x52: { /* '0x52' */ return EnableControlCommandType_SET_NETWORK_VARIABLE } - case 0x5A: - { /* '0x5A' */ + case 0x5A: { /* '0x5A' */ return EnableControlCommandType_SET_NETWORK_VARIABLE } - case 0x62: - { /* '0x62' */ + case 0x62: { /* '0x62' */ return EnableControlCommandType_SET_NETWORK_VARIABLE } - case 0x6A: - { /* '0x6A' */ + case 0x6A: { /* '0x6A' */ return EnableControlCommandType_SET_NETWORK_VARIABLE } - case 0x72: - { /* '0x72' */ + case 0x72: { /* '0x72' */ return EnableControlCommandType_SET_NETWORK_VARIABLE } - case 0x7A: - { /* '0x7A' */ + case 0x7A: { /* '0x7A' */ return EnableControlCommandType_SET_NETWORK_VARIABLE } - default: - { + default: { return 0 } } @@ -244,38 +211,38 @@ func EnableControlCommandTypeContainerFirstEnumForFieldCommandType(value EnableC } func EnableControlCommandTypeContainerByValue(value uint8) (enum EnableControlCommandTypeContainer, ok bool) { switch value { - case 0x02: - return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable0_2Bytes, true - case 0x0A: - return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable1_2Bytes, true - case 0x12: - return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable2_2Bytes, true - case 0x1A: - return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable3_2Bytes, true - case 0x22: - return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable4_2Bytes, true - case 0x2A: - return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable5_2Bytes, true - case 0x32: - return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable6_2Bytes, true - case 0x3A: - return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable7_2Bytes, true - case 0x42: - return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable8_2Bytes, true - case 0x4A: - return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable9_2Bytes, true - case 0x52: - return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable10_2Bytes, true - case 0x5A: - return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable11_2Bytes, true - case 0x62: - return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable12_2Bytes, true - case 0x6A: - return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable13_2Bytes, true - case 0x72: - return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable14_2Bytes, true - case 0x7A: - return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable15_2Bytes, true + case 0x02: + return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable0_2Bytes, true + case 0x0A: + return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable1_2Bytes, true + case 0x12: + return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable2_2Bytes, true + case 0x1A: + return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable3_2Bytes, true + case 0x22: + return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable4_2Bytes, true + case 0x2A: + return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable5_2Bytes, true + case 0x32: + return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable6_2Bytes, true + case 0x3A: + return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable7_2Bytes, true + case 0x42: + return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable8_2Bytes, true + case 0x4A: + return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable9_2Bytes, true + case 0x52: + return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable10_2Bytes, true + case 0x5A: + return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable11_2Bytes, true + case 0x62: + return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable12_2Bytes, true + case 0x6A: + return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable13_2Bytes, true + case 0x72: + return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable14_2Bytes, true + case 0x7A: + return EnableControlCommandTypeContainer_EnableControlCommandSetNetworkVariable15_2Bytes, true } return 0, false } @@ -318,13 +285,13 @@ func EnableControlCommandTypeContainerByName(value string) (enum EnableControlCo return 0, false } -func EnableControlCommandTypeContainerKnows(value uint8) bool { +func EnableControlCommandTypeContainerKnows(value uint8) bool { for _, typeValue := range EnableControlCommandTypeContainerValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastEnableControlCommandTypeContainer(structType interface{}) EnableControlCommandTypeContainer { @@ -416,3 +383,4 @@ func (e EnableControlCommandTypeContainer) PLC4XEnumName() string { func (e EnableControlCommandTypeContainer) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/EnableControlData.go b/plc4go/protocols/cbus/readwrite/model/EnableControlData.go index a0c4ba4711b..96c4f8e73b7 100644 --- a/plc4go/protocols/cbus/readwrite/model/EnableControlData.go +++ b/plc4go/protocols/cbus/readwrite/model/EnableControlData.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // EnableControlData is the corresponding interface of EnableControlData type EnableControlData interface { @@ -50,11 +52,12 @@ type EnableControlDataExactly interface { // _EnableControlData is the data-structure of this message type _EnableControlData struct { - CommandTypeContainer EnableControlCommandTypeContainer - EnableNetworkVariable byte - Value byte + CommandTypeContainer EnableControlCommandTypeContainer + EnableNetworkVariable byte + Value byte } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,14 +95,15 @@ func (m *_EnableControlData) GetCommandType() EnableControlCommandType { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewEnableControlData factory function for _EnableControlData -func NewEnableControlData(commandTypeContainer EnableControlCommandTypeContainer, enableNetworkVariable byte, value byte) *_EnableControlData { - return &_EnableControlData{CommandTypeContainer: commandTypeContainer, EnableNetworkVariable: enableNetworkVariable, Value: value} +func NewEnableControlData( commandTypeContainer EnableControlCommandTypeContainer , enableNetworkVariable byte , value byte ) *_EnableControlData { +return &_EnableControlData{ CommandTypeContainer: commandTypeContainer , EnableNetworkVariable: enableNetworkVariable , Value: value } } // Deprecated: use the interface for direct cast func CastEnableControlData(structType interface{}) EnableControlData { - if casted, ok := structType.(EnableControlData); ok { + if casted, ok := structType.(EnableControlData); ok { return casted } if casted, ok := structType.(*EnableControlData); ok { @@ -121,14 +125,15 @@ func (m *_EnableControlData) GetLengthInBits(ctx context.Context) uint16 { // A virtual field doesn't have any in- or output. // Simple field (enableNetworkVariable) - lengthInBits += 8 + lengthInBits += 8; // Simple field (value) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_EnableControlData) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -147,7 +152,7 @@ func EnableControlDataParseWithBuffer(ctx context.Context, readBuffer utils.Read _ = currentPos // Validation - if !(KnowsEnableControlCommandTypeContainer(readBuffer)) { + if (!(KnowsEnableControlCommandTypeContainer(readBuffer))) { return nil, errors.WithStack(utils.ParseAssertError{"no command type could be found"}) } @@ -155,7 +160,7 @@ func EnableControlDataParseWithBuffer(ctx context.Context, readBuffer utils.Read if pullErr := readBuffer.PullContext("commandTypeContainer"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for commandTypeContainer") } - _commandTypeContainer, _commandTypeContainerErr := EnableControlCommandTypeContainerParseWithBuffer(ctx, readBuffer) +_commandTypeContainer, _commandTypeContainerErr := EnableControlCommandTypeContainerParseWithBuffer(ctx, readBuffer) if _commandTypeContainerErr != nil { return nil, errors.Wrap(_commandTypeContainerErr, "Error parsing 'commandTypeContainer' field of EnableControlData") } @@ -170,14 +175,14 @@ func EnableControlDataParseWithBuffer(ctx context.Context, readBuffer utils.Read _ = commandType // Simple Field (enableNetworkVariable) - _enableNetworkVariable, _enableNetworkVariableErr := readBuffer.ReadByte("enableNetworkVariable") +_enableNetworkVariable, _enableNetworkVariableErr := readBuffer.ReadByte("enableNetworkVariable") if _enableNetworkVariableErr != nil { return nil, errors.Wrap(_enableNetworkVariableErr, "Error parsing 'enableNetworkVariable' field of EnableControlData") } enableNetworkVariable := _enableNetworkVariable // Simple Field (value) - _value, _valueErr := readBuffer.ReadByte("value") +_value, _valueErr := readBuffer.ReadByte("value") if _valueErr != nil { return nil, errors.Wrap(_valueErr, "Error parsing 'value' field of EnableControlData") } @@ -189,10 +194,10 @@ func EnableControlDataParseWithBuffer(ctx context.Context, readBuffer utils.Read // Create the instance return &_EnableControlData{ - CommandTypeContainer: commandTypeContainer, - EnableNetworkVariable: enableNetworkVariable, - Value: value, - }, nil + CommandTypeContainer: commandTypeContainer, + EnableNetworkVariable: enableNetworkVariable, + Value: value, + }, nil } func (m *_EnableControlData) Serialize() ([]byte, error) { @@ -206,7 +211,7 @@ func (m *_EnableControlData) Serialize() ([]byte, error) { func (m *_EnableControlData) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("EnableControlData"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("EnableControlData"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for EnableControlData") } @@ -246,6 +251,7 @@ func (m *_EnableControlData) SerializeWithWriteBuffer(ctx context.Context, write return nil } + func (m *_EnableControlData) isEnableControlData() bool { return true } @@ -260,3 +266,6 @@ func (m *_EnableControlData) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/EncodedReply.go b/plc4go/protocols/cbus/readwrite/model/EncodedReply.go index d9a7a42e3be..72cb180a755 100644 --- a/plc4go/protocols/cbus/readwrite/model/EncodedReply.go +++ b/plc4go/protocols/cbus/readwrite/model/EncodedReply.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // EncodedReply is the corresponding interface of EncodedReply type EncodedReply interface { @@ -47,10 +49,10 @@ type EncodedReplyExactly interface { // _EncodedReply is the data-structure of this message type _EncodedReply struct { _EncodedReplyChildRequirements - PeekedByte byte + PeekedByte byte // Arguments. - CBusOptions CBusOptions + CBusOptions CBusOptions RequestContext RequestContext } @@ -59,6 +61,7 @@ type _EncodedReplyChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type EncodedReplyParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child EncodedReply, serializeChildFunction func() error) error GetTypeName() string @@ -66,13 +69,12 @@ type EncodedReplyParent interface { type EncodedReplyChild interface { utils.Serializable - InitializeParent(parent EncodedReply, peekedByte byte) +InitializeParent(parent EncodedReply , peekedByte byte ) GetParent() *EncodedReply GetTypeName() string EncodedReply } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -94,7 +96,7 @@ func (m *_EncodedReply) GetPeekedByte() byte { func (m *_EncodedReply) GetIsMonitoredSAL() bool { ctx := context.Background() _ = ctx - return bool(bool((bool(bool(bool((m.GetPeekedByte()&0x3F) == (0x05))) || bool(bool((m.GetPeekedByte()) == (0x00)))) || bool(bool((m.GetPeekedByte()&0xF8) == (0x00))))) && bool(!(m.RequestContext.GetSendIdentifyRequestBefore()))) + return bool(bool((bool(bool(bool(((m.GetPeekedByte()& 0x3F)) == (0x05))) || bool(bool((m.GetPeekedByte()) == (0x00)))) || bool(bool(((m.GetPeekedByte()& 0xF8)) == (0x00))))) && bool(!(m.RequestContext.GetSendIdentifyRequestBefore()))) } /////////////////////// @@ -102,14 +104,15 @@ func (m *_EncodedReply) GetIsMonitoredSAL() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewEncodedReply factory function for _EncodedReply -func NewEncodedReply(peekedByte byte, cBusOptions CBusOptions, requestContext RequestContext) *_EncodedReply { - return &_EncodedReply{PeekedByte: peekedByte, CBusOptions: cBusOptions, RequestContext: requestContext} +func NewEncodedReply( peekedByte byte , cBusOptions CBusOptions , requestContext RequestContext ) *_EncodedReply { +return &_EncodedReply{ PeekedByte: peekedByte , CBusOptions: cBusOptions , RequestContext: requestContext } } // Deprecated: use the interface for direct cast func CastEncodedReply(structType interface{}) EncodedReply { - if casted, ok := structType.(EncodedReply); ok { + if casted, ok := structType.(EncodedReply); ok { return casted } if casted, ok := structType.(*EncodedReply); ok { @@ -122,6 +125,7 @@ func (m *_EncodedReply) GetTypeName() string { return "EncodedReply" } + func (m *_EncodedReply) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -147,33 +151,33 @@ func EncodedReplyParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe currentPos := positionAware.GetPos() _ = currentPos - // Peek Field (peekedByte) - currentPos = positionAware.GetPos() - peekedByte, _err := readBuffer.ReadByte("peekedByte") - if _err != nil { - return nil, errors.Wrap(_err, "Error parsing 'peekedByte' field of EncodedReply") - } + // Peek Field (peekedByte) + currentPos = positionAware.GetPos() + peekedByte, _err := readBuffer.ReadByte("peekedByte") + if _err != nil { + return nil, errors.Wrap(_err, "Error parsing 'peekedByte' field of EncodedReply") + } - readBuffer.Reset(currentPos) + readBuffer.Reset(currentPos) // Virtual field - _isMonitoredSAL := bool((bool(bool(bool((peekedByte&0x3F) == (0x05))) || bool(bool((peekedByte) == (0x00)))) || bool(bool((peekedByte&0xF8) == (0x00))))) && bool(!(requestContext.GetSendIdentifyRequestBefore())) + _isMonitoredSAL := bool((bool(bool(bool(((peekedByte& 0x3F)) == (0x05))) || bool(bool((peekedByte) == (0x00)))) || bool(bool(((peekedByte& 0xF8)) == (0x00))))) && bool(!(requestContext.GetSendIdentifyRequestBefore())) isMonitoredSAL := bool(_isMonitoredSAL) _ = isMonitoredSAL // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type EncodedReplyChildSerializeRequirement interface { EncodedReply - InitializeParent(EncodedReply, byte) + InitializeParent(EncodedReply, byte) GetParent() EncodedReply } var _childTemp interface{} var _child EncodedReplyChildSerializeRequirement var typeSwitchError error switch { - case isMonitoredSAL == bool(true): // MonitoredSALReply +case isMonitoredSAL == bool(true) : // MonitoredSALReply _childTemp, typeSwitchError = MonitoredSALReplyParseWithBuffer(ctx, readBuffer, cBusOptions, requestContext) - case 0 == 0: // EncodedReplyCALReply +case 0==0 : // EncodedReplyCALReply _childTemp, typeSwitchError = EncodedReplyCALReplyParseWithBuffer(ctx, readBuffer, cBusOptions, requestContext) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [isMonitoredSAL=%v]", isMonitoredSAL) @@ -188,7 +192,7 @@ func EncodedReplyParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe } // Finish initializing - _child.InitializeParent(_child, peekedByte) +_child.InitializeParent(_child , peekedByte ) return _child, nil } @@ -198,7 +202,7 @@ func (pm *_EncodedReply) SerializeParent(ctx context.Context, writeBuffer utils. _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("EncodedReply"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("EncodedReply"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for EncodedReply") } // Virtual field @@ -217,6 +221,7 @@ func (pm *_EncodedReply) SerializeParent(ctx context.Context, writeBuffer utils. return nil } + //// // Arguments Getter @@ -226,7 +231,6 @@ func (m *_EncodedReply) GetCBusOptions() CBusOptions { func (m *_EncodedReply) GetRequestContext() RequestContext { return m.RequestContext } - // //// @@ -244,3 +248,6 @@ func (m *_EncodedReply) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/EncodedReplyCALReply.go b/plc4go/protocols/cbus/readwrite/model/EncodedReplyCALReply.go index 4a879e212c8..d9aaebab46e 100644 --- a/plc4go/protocols/cbus/readwrite/model/EncodedReplyCALReply.go +++ b/plc4go/protocols/cbus/readwrite/model/EncodedReplyCALReply.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // EncodedReplyCALReply is the corresponding interface of EncodedReplyCALReply type EncodedReplyCALReply interface { @@ -46,9 +48,11 @@ type EncodedReplyCALReplyExactly interface { // _EncodedReplyCALReply is the data-structure of this message type _EncodedReplyCALReply struct { *_EncodedReply - CalReply CALReply + CalReply CALReply } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _EncodedReplyCALReply struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_EncodedReplyCALReply) InitializeParent(parent EncodedReply, peekedByte byte) { - m.PeekedByte = peekedByte +func (m *_EncodedReplyCALReply) InitializeParent(parent EncodedReply , peekedByte byte ) { m.PeekedByte = peekedByte } -func (m *_EncodedReplyCALReply) GetParent() EncodedReply { +func (m *_EncodedReplyCALReply) GetParent() EncodedReply { return m._EncodedReply } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_EncodedReplyCALReply) GetCalReply() CALReply { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewEncodedReplyCALReply factory function for _EncodedReplyCALReply -func NewEncodedReplyCALReply(calReply CALReply, peekedByte byte, cBusOptions CBusOptions, requestContext RequestContext) *_EncodedReplyCALReply { +func NewEncodedReplyCALReply( calReply CALReply , peekedByte byte , cBusOptions CBusOptions , requestContext RequestContext ) *_EncodedReplyCALReply { _result := &_EncodedReplyCALReply{ - CalReply: calReply, - _EncodedReply: NewEncodedReply(peekedByte, cBusOptions, requestContext), + CalReply: calReply, + _EncodedReply: NewEncodedReply(peekedByte, cBusOptions, requestContext), } _result._EncodedReply._EncodedReplyChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewEncodedReplyCALReply(calReply CALReply, peekedByte byte, cBusOptions CBu // Deprecated: use the interface for direct cast func CastEncodedReplyCALReply(structType interface{}) EncodedReplyCALReply { - if casted, ok := structType.(EncodedReplyCALReply); ok { + if casted, ok := structType.(EncodedReplyCALReply); ok { return casted } if casted, ok := structType.(*EncodedReplyCALReply); ok { @@ -115,6 +118,7 @@ func (m *_EncodedReplyCALReply) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_EncodedReplyCALReply) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func EncodedReplyCALReplyParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("calReply"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for calReply") } - _calReply, _calReplyErr := CALReplyParseWithBuffer(ctx, readBuffer, cBusOptions, requestContext) +_calReply, _calReplyErr := CALReplyParseWithBuffer(ctx, readBuffer , cBusOptions , requestContext ) if _calReplyErr != nil { return nil, errors.Wrap(_calReplyErr, "Error parsing 'calReply' field of EncodedReplyCALReply") } @@ -152,7 +156,7 @@ func EncodedReplyCALReplyParseWithBuffer(ctx context.Context, readBuffer utils.R // Create a partially initialized instance _child := &_EncodedReplyCALReply{ _EncodedReply: &_EncodedReply{ - CBusOptions: cBusOptions, + CBusOptions: cBusOptions, RequestContext: requestContext, }, CalReply: calReply, @@ -177,17 +181,17 @@ func (m *_EncodedReplyCALReply) SerializeWithWriteBuffer(ctx context.Context, wr return errors.Wrap(pushErr, "Error pushing for EncodedReplyCALReply") } - // Simple Field (calReply) - if pushErr := writeBuffer.PushContext("calReply"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for calReply") - } - _calReplyErr := writeBuffer.WriteSerializable(ctx, m.GetCalReply()) - if popErr := writeBuffer.PopContext("calReply"); popErr != nil { - return errors.Wrap(popErr, "Error popping for calReply") - } - if _calReplyErr != nil { - return errors.Wrap(_calReplyErr, "Error serializing 'calReply' field") - } + // Simple Field (calReply) + if pushErr := writeBuffer.PushContext("calReply"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for calReply") + } + _calReplyErr := writeBuffer.WriteSerializable(ctx, m.GetCalReply()) + if popErr := writeBuffer.PopContext("calReply"); popErr != nil { + return errors.Wrap(popErr, "Error popping for calReply") + } + if _calReplyErr != nil { + return errors.Wrap(_calReplyErr, "Error serializing 'calReply' field") + } if popErr := writeBuffer.PopContext("EncodedReplyCALReply"); popErr != nil { return errors.Wrap(popErr, "Error popping for EncodedReplyCALReply") @@ -197,6 +201,7 @@ func (m *_EncodedReplyCALReply) SerializeWithWriteBuffer(ctx context.Context, wr return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_EncodedReplyCALReply) isEncodedReplyCALReply() bool { return true } @@ -211,3 +216,6 @@ func (m *_EncodedReplyCALReply) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/ErrorReportingCommandType.go b/plc4go/protocols/cbus/readwrite/model/ErrorReportingCommandType.go index 31db7e9fd55..f5cc7aa0269 100644 --- a/plc4go/protocols/cbus/readwrite/model/ErrorReportingCommandType.go +++ b/plc4go/protocols/cbus/readwrite/model/ErrorReportingCommandType.go @@ -35,10 +35,10 @@ type IErrorReportingCommandType interface { NumberOfArguments() uint8 } -const ( - ErrorReportingCommandType_DEPRECATED ErrorReportingCommandType = 0x00 - ErrorReportingCommandType_ERROR_REPORT ErrorReportingCommandType = 0x01 - ErrorReportingCommandType_ACKNOWLEDGE ErrorReportingCommandType = 0x02 +const( + ErrorReportingCommandType_DEPRECATED ErrorReportingCommandType = 0x00 + ErrorReportingCommandType_ERROR_REPORT ErrorReportingCommandType = 0x01 + ErrorReportingCommandType_ACKNOWLEDGE ErrorReportingCommandType = 0x02 ErrorReportingCommandType_CLEAR_MOST_SEVERE ErrorReportingCommandType = 0x03 ) @@ -46,7 +46,7 @@ var ErrorReportingCommandTypeValues []ErrorReportingCommandType func init() { _ = errors.New - ErrorReportingCommandTypeValues = []ErrorReportingCommandType{ + ErrorReportingCommandTypeValues = []ErrorReportingCommandType { ErrorReportingCommandType_DEPRECATED, ErrorReportingCommandType_ERROR_REPORT, ErrorReportingCommandType_ACKNOWLEDGE, @@ -54,26 +54,22 @@ func init() { } } + func (e ErrorReportingCommandType) NumberOfArguments() uint8 { - switch e { - case 0x00: - { /* '0x00' */ - return 8 + switch e { + case 0x00: { /* '0x00' */ + return 8 } - case 0x01: - { /* '0x01' */ - return 8 + case 0x01: { /* '0x01' */ + return 8 } - case 0x02: - { /* '0x02' */ - return 8 + case 0x02: { /* '0x02' */ + return 8 } - case 0x03: - { /* '0x03' */ - return 8 + case 0x03: { /* '0x03' */ + return 8 } - default: - { + default: { return 0 } } @@ -89,14 +85,14 @@ func ErrorReportingCommandTypeFirstEnumForFieldNumberOfArguments(value uint8) (E } func ErrorReportingCommandTypeByValue(value uint8) (enum ErrorReportingCommandType, ok bool) { switch value { - case 0x00: - return ErrorReportingCommandType_DEPRECATED, true - case 0x01: - return ErrorReportingCommandType_ERROR_REPORT, true - case 0x02: - return ErrorReportingCommandType_ACKNOWLEDGE, true - case 0x03: - return ErrorReportingCommandType_CLEAR_MOST_SEVERE, true + case 0x00: + return ErrorReportingCommandType_DEPRECATED, true + case 0x01: + return ErrorReportingCommandType_ERROR_REPORT, true + case 0x02: + return ErrorReportingCommandType_ACKNOWLEDGE, true + case 0x03: + return ErrorReportingCommandType_CLEAR_MOST_SEVERE, true } return 0, false } @@ -115,13 +111,13 @@ func ErrorReportingCommandTypeByName(value string) (enum ErrorReportingCommandTy return 0, false } -func ErrorReportingCommandTypeKnows(value uint8) bool { +func ErrorReportingCommandTypeKnows(value uint8) bool { for _, typeValue := range ErrorReportingCommandTypeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastErrorReportingCommandType(structType interface{}) ErrorReportingCommandType { @@ -189,3 +185,4 @@ func (e ErrorReportingCommandType) PLC4XEnumName() string { func (e ErrorReportingCommandType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/ErrorReportingCommandTypeContainer.go b/plc4go/protocols/cbus/readwrite/model/ErrorReportingCommandTypeContainer.go index 12c3281172b..5b585e7a24f 100644 --- a/plc4go/protocols/cbus/readwrite/model/ErrorReportingCommandTypeContainer.go +++ b/plc4go/protocols/cbus/readwrite/model/ErrorReportingCommandTypeContainer.go @@ -36,10 +36,10 @@ type IErrorReportingCommandTypeContainer interface { CommandType() ErrorReportingCommandType } -const ( - ErrorReportingCommandTypeContainer_ErrorReportingCommandDeprecated ErrorReportingCommandTypeContainer = 0x05 - ErrorReportingCommandTypeContainer_ErrorReportingCommandErrorReport ErrorReportingCommandTypeContainer = 0x15 - ErrorReportingCommandTypeContainer_ErrorReportingCommandAcknowledge ErrorReportingCommandTypeContainer = 0x25 +const( + ErrorReportingCommandTypeContainer_ErrorReportingCommandDeprecated ErrorReportingCommandTypeContainer = 0x05 + ErrorReportingCommandTypeContainer_ErrorReportingCommandErrorReport ErrorReportingCommandTypeContainer = 0x15 + ErrorReportingCommandTypeContainer_ErrorReportingCommandAcknowledge ErrorReportingCommandTypeContainer = 0x25 ErrorReportingCommandTypeContainer_ErrorReportingCommandClearMostSevere ErrorReportingCommandTypeContainer = 0x35 ) @@ -47,7 +47,7 @@ var ErrorReportingCommandTypeContainerValues []ErrorReportingCommandTypeContaine func init() { _ = errors.New - ErrorReportingCommandTypeContainerValues = []ErrorReportingCommandTypeContainer{ + ErrorReportingCommandTypeContainerValues = []ErrorReportingCommandTypeContainer { ErrorReportingCommandTypeContainer_ErrorReportingCommandDeprecated, ErrorReportingCommandTypeContainer_ErrorReportingCommandErrorReport, ErrorReportingCommandTypeContainer_ErrorReportingCommandAcknowledge, @@ -55,26 +55,22 @@ func init() { } } + func (e ErrorReportingCommandTypeContainer) NumBytes() uint8 { - switch e { - case 0x05: - { /* '0x05' */ - return 5 + switch e { + case 0x05: { /* '0x05' */ + return 5 } - case 0x15: - { /* '0x15' */ - return 5 + case 0x15: { /* '0x15' */ + return 5 } - case 0x25: - { /* '0x25' */ - return 5 + case 0x25: { /* '0x25' */ + return 5 } - case 0x35: - { /* '0x35' */ - return 5 + case 0x35: { /* '0x35' */ + return 5 } - default: - { + default: { return 0 } } @@ -90,25 +86,20 @@ func ErrorReportingCommandTypeContainerFirstEnumForFieldNumBytes(value uint8) (E } func (e ErrorReportingCommandTypeContainer) CommandType() ErrorReportingCommandType { - switch e { - case 0x05: - { /* '0x05' */ + switch e { + case 0x05: { /* '0x05' */ return ErrorReportingCommandType_DEPRECATED } - case 0x15: - { /* '0x15' */ + case 0x15: { /* '0x15' */ return ErrorReportingCommandType_ERROR_REPORT } - case 0x25: - { /* '0x25' */ + case 0x25: { /* '0x25' */ return ErrorReportingCommandType_ACKNOWLEDGE } - case 0x35: - { /* '0x35' */ + case 0x35: { /* '0x35' */ return ErrorReportingCommandType_CLEAR_MOST_SEVERE } - default: - { + default: { return 0 } } @@ -124,14 +115,14 @@ func ErrorReportingCommandTypeContainerFirstEnumForFieldCommandType(value ErrorR } func ErrorReportingCommandTypeContainerByValue(value uint8) (enum ErrorReportingCommandTypeContainer, ok bool) { switch value { - case 0x05: - return ErrorReportingCommandTypeContainer_ErrorReportingCommandDeprecated, true - case 0x15: - return ErrorReportingCommandTypeContainer_ErrorReportingCommandErrorReport, true - case 0x25: - return ErrorReportingCommandTypeContainer_ErrorReportingCommandAcknowledge, true - case 0x35: - return ErrorReportingCommandTypeContainer_ErrorReportingCommandClearMostSevere, true + case 0x05: + return ErrorReportingCommandTypeContainer_ErrorReportingCommandDeprecated, true + case 0x15: + return ErrorReportingCommandTypeContainer_ErrorReportingCommandErrorReport, true + case 0x25: + return ErrorReportingCommandTypeContainer_ErrorReportingCommandAcknowledge, true + case 0x35: + return ErrorReportingCommandTypeContainer_ErrorReportingCommandClearMostSevere, true } return 0, false } @@ -150,13 +141,13 @@ func ErrorReportingCommandTypeContainerByName(value string) (enum ErrorReporting return 0, false } -func ErrorReportingCommandTypeContainerKnows(value uint8) bool { +func ErrorReportingCommandTypeContainerKnows(value uint8) bool { for _, typeValue := range ErrorReportingCommandTypeContainerValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastErrorReportingCommandTypeContainer(structType interface{}) ErrorReportingCommandTypeContainer { @@ -224,3 +215,4 @@ func (e ErrorReportingCommandTypeContainer) PLC4XEnumName() string { func (e ErrorReportingCommandTypeContainer) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/ErrorReportingData.go b/plc4go/protocols/cbus/readwrite/model/ErrorReportingData.go index ed7c641e80f..4c53e6a9e59 100644 --- a/plc4go/protocols/cbus/readwrite/model/ErrorReportingData.go +++ b/plc4go/protocols/cbus/readwrite/model/ErrorReportingData.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ErrorReportingData is the corresponding interface of ErrorReportingData type ErrorReportingData interface { @@ -47,7 +49,7 @@ type ErrorReportingDataExactly interface { // _ErrorReportingData is the data-structure of this message type _ErrorReportingData struct { _ErrorReportingDataChildRequirements - CommandTypeContainer ErrorReportingCommandTypeContainer + CommandTypeContainer ErrorReportingCommandTypeContainer } type _ErrorReportingDataChildRequirements interface { @@ -55,6 +57,7 @@ type _ErrorReportingDataChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type ErrorReportingDataParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child ErrorReportingData, serializeChildFunction func() error) error GetTypeName() string @@ -62,13 +65,12 @@ type ErrorReportingDataParent interface { type ErrorReportingDataChild interface { utils.Serializable - InitializeParent(parent ErrorReportingData, commandTypeContainer ErrorReportingCommandTypeContainer) +InitializeParent(parent ErrorReportingData , commandTypeContainer ErrorReportingCommandTypeContainer ) GetParent() *ErrorReportingData GetTypeName() string ErrorReportingData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,14 +100,15 @@ func (m *_ErrorReportingData) GetCommandType() ErrorReportingCommandType { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewErrorReportingData factory function for _ErrorReportingData -func NewErrorReportingData(commandTypeContainer ErrorReportingCommandTypeContainer) *_ErrorReportingData { - return &_ErrorReportingData{CommandTypeContainer: commandTypeContainer} +func NewErrorReportingData( commandTypeContainer ErrorReportingCommandTypeContainer ) *_ErrorReportingData { +return &_ErrorReportingData{ CommandTypeContainer: commandTypeContainer } } // Deprecated: use the interface for direct cast func CastErrorReportingData(structType interface{}) ErrorReportingData { - if casted, ok := structType.(ErrorReportingData); ok { + if casted, ok := structType.(ErrorReportingData); ok { return casted } if casted, ok := structType.(*ErrorReportingData); ok { @@ -118,6 +121,7 @@ func (m *_ErrorReportingData) GetTypeName() string { return "ErrorReportingData" } + func (m *_ErrorReportingData) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -147,7 +151,7 @@ func ErrorReportingDataParseWithBuffer(ctx context.Context, readBuffer utils.Rea _ = currentPos // Validation - if !(KnowsErrorReportingCommandTypeContainer(readBuffer)) { + if (!(KnowsErrorReportingCommandTypeContainer(readBuffer))) { return nil, errors.WithStack(utils.ParseAssertError{"no command type could be found"}) } @@ -155,7 +159,7 @@ func ErrorReportingDataParseWithBuffer(ctx context.Context, readBuffer utils.Rea if pullErr := readBuffer.PullContext("commandTypeContainer"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for commandTypeContainer") } - _commandTypeContainer, _commandTypeContainerErr := ErrorReportingCommandTypeContainerParseWithBuffer(ctx, readBuffer) +_commandTypeContainer, _commandTypeContainerErr := ErrorReportingCommandTypeContainerParseWithBuffer(ctx, readBuffer) if _commandTypeContainerErr != nil { return nil, errors.Wrap(_commandTypeContainerErr, "Error parsing 'commandTypeContainer' field of ErrorReportingData") } @@ -172,15 +176,15 @@ func ErrorReportingDataParseWithBuffer(ctx context.Context, readBuffer utils.Rea // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type ErrorReportingDataChildSerializeRequirement interface { ErrorReportingData - InitializeParent(ErrorReportingData, ErrorReportingCommandTypeContainer) + InitializeParent(ErrorReportingData, ErrorReportingCommandTypeContainer) GetParent() ErrorReportingData } var _childTemp interface{} var _child ErrorReportingDataChildSerializeRequirement var typeSwitchError error switch { - case 0 == 0: // ErrorReportingDataGeneric - _childTemp, typeSwitchError = ErrorReportingDataGenericParseWithBuffer(ctx, readBuffer) +case 0==0 : // ErrorReportingDataGeneric + _childTemp, typeSwitchError = ErrorReportingDataGenericParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [commandType=%v]", commandType) } @@ -194,7 +198,7 @@ func ErrorReportingDataParseWithBuffer(ctx context.Context, readBuffer utils.Rea } // Finish initializing - _child.InitializeParent(_child, commandTypeContainer) +_child.InitializeParent(_child , commandTypeContainer ) return _child, nil } @@ -204,7 +208,7 @@ func (pm *_ErrorReportingData) SerializeParent(ctx context.Context, writeBuffer _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("ErrorReportingData"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("ErrorReportingData"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for ErrorReportingData") } @@ -235,6 +239,7 @@ func (pm *_ErrorReportingData) SerializeParent(ctx context.Context, writeBuffer return nil } + func (m *_ErrorReportingData) isErrorReportingData() bool { return true } @@ -249,3 +254,6 @@ func (m *_ErrorReportingData) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/ErrorReportingDataGeneric.go b/plc4go/protocols/cbus/readwrite/model/ErrorReportingDataGeneric.go index 97a3d7523a1..12e77562a15 100644 --- a/plc4go/protocols/cbus/readwrite/model/ErrorReportingDataGeneric.go +++ b/plc4go/protocols/cbus/readwrite/model/ErrorReportingDataGeneric.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ErrorReportingDataGeneric is the corresponding interface of ErrorReportingDataGeneric type ErrorReportingDataGeneric interface { @@ -66,16 +68,18 @@ type ErrorReportingDataGenericExactly interface { // _ErrorReportingDataGeneric is the data-structure of this message type _ErrorReportingDataGeneric struct { *_ErrorReportingData - SystemCategory ErrorReportingSystemCategory - MostRecent bool - Acknowledge bool - MostSevere bool - Severity ErrorReportingSeverity - DeviceId uint8 - ErrorData1 uint8 - ErrorData2 uint8 + SystemCategory ErrorReportingSystemCategory + MostRecent bool + Acknowledge bool + MostSevere bool + Severity ErrorReportingSeverity + DeviceId uint8 + ErrorData1 uint8 + ErrorData2 uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -86,14 +90,12 @@ type _ErrorReportingDataGeneric struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ErrorReportingDataGeneric) InitializeParent(parent ErrorReportingData, commandTypeContainer ErrorReportingCommandTypeContainer) { - m.CommandTypeContainer = commandTypeContainer +func (m *_ErrorReportingDataGeneric) InitializeParent(parent ErrorReportingData , commandTypeContainer ErrorReportingCommandTypeContainer ) { m.CommandTypeContainer = commandTypeContainer } -func (m *_ErrorReportingDataGeneric) GetParent() ErrorReportingData { +func (m *_ErrorReportingDataGeneric) GetParent() ErrorReportingData { return m._ErrorReportingData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -163,18 +165,19 @@ func (m *_ErrorReportingDataGeneric) GetIsMostRecentAndMostSevere() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewErrorReportingDataGeneric factory function for _ErrorReportingDataGeneric -func NewErrorReportingDataGeneric(systemCategory ErrorReportingSystemCategory, mostRecent bool, acknowledge bool, mostSevere bool, severity ErrorReportingSeverity, deviceId uint8, errorData1 uint8, errorData2 uint8, commandTypeContainer ErrorReportingCommandTypeContainer) *_ErrorReportingDataGeneric { +func NewErrorReportingDataGeneric( systemCategory ErrorReportingSystemCategory , mostRecent bool , acknowledge bool , mostSevere bool , severity ErrorReportingSeverity , deviceId uint8 , errorData1 uint8 , errorData2 uint8 , commandTypeContainer ErrorReportingCommandTypeContainer ) *_ErrorReportingDataGeneric { _result := &_ErrorReportingDataGeneric{ - SystemCategory: systemCategory, - MostRecent: mostRecent, - Acknowledge: acknowledge, - MostSevere: mostSevere, - Severity: severity, - DeviceId: deviceId, - ErrorData1: errorData1, - ErrorData2: errorData2, - _ErrorReportingData: NewErrorReportingData(commandTypeContainer), + SystemCategory: systemCategory, + MostRecent: mostRecent, + Acknowledge: acknowledge, + MostSevere: mostSevere, + Severity: severity, + DeviceId: deviceId, + ErrorData1: errorData1, + ErrorData2: errorData2, + _ErrorReportingData: NewErrorReportingData(commandTypeContainer), } _result._ErrorReportingData._ErrorReportingDataChildRequirements = _result return _result @@ -182,7 +185,7 @@ func NewErrorReportingDataGeneric(systemCategory ErrorReportingSystemCategory, m // Deprecated: use the interface for direct cast func CastErrorReportingDataGeneric(structType interface{}) ErrorReportingDataGeneric { - if casted, ok := structType.(ErrorReportingDataGeneric); ok { + if casted, ok := structType.(ErrorReportingDataGeneric); ok { return casted } if casted, ok := structType.(*ErrorReportingDataGeneric); ok { @@ -202,13 +205,13 @@ func (m *_ErrorReportingDataGeneric) GetLengthInBits(ctx context.Context) uint16 lengthInBits += m.SystemCategory.GetLengthInBits(ctx) // Simple field (mostRecent) - lengthInBits += 1 + lengthInBits += 1; // Simple field (acknowledge) - lengthInBits += 1 + lengthInBits += 1; // Simple field (mostSevere) - lengthInBits += 1 + lengthInBits += 1; // A virtual field doesn't have any in- or output. @@ -220,17 +223,18 @@ func (m *_ErrorReportingDataGeneric) GetLengthInBits(ctx context.Context) uint16 lengthInBits += 3 // Simple field (deviceId) - lengthInBits += 8 + lengthInBits += 8; // Simple field (errorData1) - lengthInBits += 8 + lengthInBits += 8; // Simple field (errorData2) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_ErrorReportingDataGeneric) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -252,7 +256,7 @@ func ErrorReportingDataGenericParseWithBuffer(ctx context.Context, readBuffer ut if pullErr := readBuffer.PullContext("systemCategory"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for systemCategory") } - _systemCategory, _systemCategoryErr := ErrorReportingSystemCategoryParseWithBuffer(ctx, readBuffer) +_systemCategory, _systemCategoryErr := ErrorReportingSystemCategoryParseWithBuffer(ctx, readBuffer) if _systemCategoryErr != nil { return nil, errors.Wrap(_systemCategoryErr, "Error parsing 'systemCategory' field of ErrorReportingDataGeneric") } @@ -262,28 +266,28 @@ func ErrorReportingDataGenericParseWithBuffer(ctx context.Context, readBuffer ut } // Simple Field (mostRecent) - _mostRecent, _mostRecentErr := readBuffer.ReadBit("mostRecent") +_mostRecent, _mostRecentErr := readBuffer.ReadBit("mostRecent") if _mostRecentErr != nil { return nil, errors.Wrap(_mostRecentErr, "Error parsing 'mostRecent' field of ErrorReportingDataGeneric") } mostRecent := _mostRecent // Simple Field (acknowledge) - _acknowledge, _acknowledgeErr := readBuffer.ReadBit("acknowledge") +_acknowledge, _acknowledgeErr := readBuffer.ReadBit("acknowledge") if _acknowledgeErr != nil { return nil, errors.Wrap(_acknowledgeErr, "Error parsing 'acknowledge' field of ErrorReportingDataGeneric") } acknowledge := _acknowledge // Simple Field (mostSevere) - _mostSevere, _mostSevereErr := readBuffer.ReadBit("mostSevere") +_mostSevere, _mostSevereErr := readBuffer.ReadBit("mostSevere") if _mostSevereErr != nil { return nil, errors.Wrap(_mostSevereErr, "Error parsing 'mostSevere' field of ErrorReportingDataGeneric") } mostSevere := _mostSevere // Validation - if !(bool(mostRecent) || bool(mostSevere)) { + if (!(bool(mostRecent) || bool(mostSevere))) { return nil, errors.WithStack(utils.ParseValidationError{"Invalid Error condition"}) } @@ -306,7 +310,7 @@ func ErrorReportingDataGenericParseWithBuffer(ctx context.Context, readBuffer ut if pullErr := readBuffer.PullContext("severity"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for severity") } - _severity, _severityErr := ErrorReportingSeverityParseWithBuffer(ctx, readBuffer) +_severity, _severityErr := ErrorReportingSeverityParseWithBuffer(ctx, readBuffer) if _severityErr != nil { return nil, errors.Wrap(_severityErr, "Error parsing 'severity' field of ErrorReportingDataGeneric") } @@ -316,21 +320,21 @@ func ErrorReportingDataGenericParseWithBuffer(ctx context.Context, readBuffer ut } // Simple Field (deviceId) - _deviceId, _deviceIdErr := readBuffer.ReadUint8("deviceId", 8) +_deviceId, _deviceIdErr := readBuffer.ReadUint8("deviceId", 8) if _deviceIdErr != nil { return nil, errors.Wrap(_deviceIdErr, "Error parsing 'deviceId' field of ErrorReportingDataGeneric") } deviceId := _deviceId // Simple Field (errorData1) - _errorData1, _errorData1Err := readBuffer.ReadUint8("errorData1", 8) +_errorData1, _errorData1Err := readBuffer.ReadUint8("errorData1", 8) if _errorData1Err != nil { return nil, errors.Wrap(_errorData1Err, "Error parsing 'errorData1' field of ErrorReportingDataGeneric") } errorData1 := _errorData1 // Simple Field (errorData2) - _errorData2, _errorData2Err := readBuffer.ReadUint8("errorData2", 8) +_errorData2, _errorData2Err := readBuffer.ReadUint8("errorData2", 8) if _errorData2Err != nil { return nil, errors.Wrap(_errorData2Err, "Error parsing 'errorData2' field of ErrorReportingDataGeneric") } @@ -342,15 +346,16 @@ func ErrorReportingDataGenericParseWithBuffer(ctx context.Context, readBuffer ut // Create a partially initialized instance _child := &_ErrorReportingDataGeneric{ - _ErrorReportingData: &_ErrorReportingData{}, - SystemCategory: systemCategory, - MostRecent: mostRecent, - Acknowledge: acknowledge, - MostSevere: mostSevere, - Severity: severity, - DeviceId: deviceId, - ErrorData1: errorData1, - ErrorData2: errorData2, + _ErrorReportingData: &_ErrorReportingData{ + }, + SystemCategory: systemCategory, + MostRecent: mostRecent, + Acknowledge: acknowledge, + MostSevere: mostSevere, + Severity: severity, + DeviceId: deviceId, + ErrorData1: errorData1, + ErrorData2: errorData2, } _child._ErrorReportingData._ErrorReportingDataChildRequirements = _child return _child, nil @@ -372,83 +377,83 @@ func (m *_ErrorReportingDataGeneric) SerializeWithWriteBuffer(ctx context.Contex return errors.Wrap(pushErr, "Error pushing for ErrorReportingDataGeneric") } - // Simple Field (systemCategory) - if pushErr := writeBuffer.PushContext("systemCategory"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for systemCategory") - } - _systemCategoryErr := writeBuffer.WriteSerializable(ctx, m.GetSystemCategory()) - if popErr := writeBuffer.PopContext("systemCategory"); popErr != nil { - return errors.Wrap(popErr, "Error popping for systemCategory") - } - if _systemCategoryErr != nil { - return errors.Wrap(_systemCategoryErr, "Error serializing 'systemCategory' field") - } + // Simple Field (systemCategory) + if pushErr := writeBuffer.PushContext("systemCategory"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for systemCategory") + } + _systemCategoryErr := writeBuffer.WriteSerializable(ctx, m.GetSystemCategory()) + if popErr := writeBuffer.PopContext("systemCategory"); popErr != nil { + return errors.Wrap(popErr, "Error popping for systemCategory") + } + if _systemCategoryErr != nil { + return errors.Wrap(_systemCategoryErr, "Error serializing 'systemCategory' field") + } - // Simple Field (mostRecent) - mostRecent := bool(m.GetMostRecent()) - _mostRecentErr := writeBuffer.WriteBit("mostRecent", (mostRecent)) - if _mostRecentErr != nil { - return errors.Wrap(_mostRecentErr, "Error serializing 'mostRecent' field") - } + // Simple Field (mostRecent) + mostRecent := bool(m.GetMostRecent()) + _mostRecentErr := writeBuffer.WriteBit("mostRecent", (mostRecent)) + if _mostRecentErr != nil { + return errors.Wrap(_mostRecentErr, "Error serializing 'mostRecent' field") + } - // Simple Field (acknowledge) - acknowledge := bool(m.GetAcknowledge()) - _acknowledgeErr := writeBuffer.WriteBit("acknowledge", (acknowledge)) - if _acknowledgeErr != nil { - return errors.Wrap(_acknowledgeErr, "Error serializing 'acknowledge' field") - } + // Simple Field (acknowledge) + acknowledge := bool(m.GetAcknowledge()) + _acknowledgeErr := writeBuffer.WriteBit("acknowledge", (acknowledge)) + if _acknowledgeErr != nil { + return errors.Wrap(_acknowledgeErr, "Error serializing 'acknowledge' field") + } - // Simple Field (mostSevere) - mostSevere := bool(m.GetMostSevere()) - _mostSevereErr := writeBuffer.WriteBit("mostSevere", (mostSevere)) - if _mostSevereErr != nil { - return errors.Wrap(_mostSevereErr, "Error serializing 'mostSevere' field") - } - // Virtual field - if _isMostSevereErrorErr := writeBuffer.WriteVirtual(ctx, "isMostSevereError", m.GetIsMostSevereError()); _isMostSevereErrorErr != nil { - return errors.Wrap(_isMostSevereErrorErr, "Error serializing 'isMostSevereError' field") - } - // Virtual field - if _isMostRecentErrorErr := writeBuffer.WriteVirtual(ctx, "isMostRecentError", m.GetIsMostRecentError()); _isMostRecentErrorErr != nil { - return errors.Wrap(_isMostRecentErrorErr, "Error serializing 'isMostRecentError' field") - } - // Virtual field - if _isMostRecentAndMostSevereErr := writeBuffer.WriteVirtual(ctx, "isMostRecentAndMostSevere", m.GetIsMostRecentAndMostSevere()); _isMostRecentAndMostSevereErr != nil { - return errors.Wrap(_isMostRecentAndMostSevereErr, "Error serializing 'isMostRecentAndMostSevere' field") - } + // Simple Field (mostSevere) + mostSevere := bool(m.GetMostSevere()) + _mostSevereErr := writeBuffer.WriteBit("mostSevere", (mostSevere)) + if _mostSevereErr != nil { + return errors.Wrap(_mostSevereErr, "Error serializing 'mostSevere' field") + } + // Virtual field + if _isMostSevereErrorErr := writeBuffer.WriteVirtual(ctx, "isMostSevereError", m.GetIsMostSevereError()); _isMostSevereErrorErr != nil { + return errors.Wrap(_isMostSevereErrorErr, "Error serializing 'isMostSevereError' field") + } + // Virtual field + if _isMostRecentErrorErr := writeBuffer.WriteVirtual(ctx, "isMostRecentError", m.GetIsMostRecentError()); _isMostRecentErrorErr != nil { + return errors.Wrap(_isMostRecentErrorErr, "Error serializing 'isMostRecentError' field") + } + // Virtual field + if _isMostRecentAndMostSevereErr := writeBuffer.WriteVirtual(ctx, "isMostRecentAndMostSevere", m.GetIsMostRecentAndMostSevere()); _isMostRecentAndMostSevereErr != nil { + return errors.Wrap(_isMostRecentAndMostSevereErr, "Error serializing 'isMostRecentAndMostSevere' field") + } - // Simple Field (severity) - if pushErr := writeBuffer.PushContext("severity"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for severity") - } - _severityErr := writeBuffer.WriteSerializable(ctx, m.GetSeverity()) - if popErr := writeBuffer.PopContext("severity"); popErr != nil { - return errors.Wrap(popErr, "Error popping for severity") - } - if _severityErr != nil { - return errors.Wrap(_severityErr, "Error serializing 'severity' field") - } + // Simple Field (severity) + if pushErr := writeBuffer.PushContext("severity"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for severity") + } + _severityErr := writeBuffer.WriteSerializable(ctx, m.GetSeverity()) + if popErr := writeBuffer.PopContext("severity"); popErr != nil { + return errors.Wrap(popErr, "Error popping for severity") + } + if _severityErr != nil { + return errors.Wrap(_severityErr, "Error serializing 'severity' field") + } - // Simple Field (deviceId) - deviceId := uint8(m.GetDeviceId()) - _deviceIdErr := writeBuffer.WriteUint8("deviceId", 8, (deviceId)) - if _deviceIdErr != nil { - return errors.Wrap(_deviceIdErr, "Error serializing 'deviceId' field") - } + // Simple Field (deviceId) + deviceId := uint8(m.GetDeviceId()) + _deviceIdErr := writeBuffer.WriteUint8("deviceId", 8, (deviceId)) + if _deviceIdErr != nil { + return errors.Wrap(_deviceIdErr, "Error serializing 'deviceId' field") + } - // Simple Field (errorData1) - errorData1 := uint8(m.GetErrorData1()) - _errorData1Err := writeBuffer.WriteUint8("errorData1", 8, (errorData1)) - if _errorData1Err != nil { - return errors.Wrap(_errorData1Err, "Error serializing 'errorData1' field") - } + // Simple Field (errorData1) + errorData1 := uint8(m.GetErrorData1()) + _errorData1Err := writeBuffer.WriteUint8("errorData1", 8, (errorData1)) + if _errorData1Err != nil { + return errors.Wrap(_errorData1Err, "Error serializing 'errorData1' field") + } - // Simple Field (errorData2) - errorData2 := uint8(m.GetErrorData2()) - _errorData2Err := writeBuffer.WriteUint8("errorData2", 8, (errorData2)) - if _errorData2Err != nil { - return errors.Wrap(_errorData2Err, "Error serializing 'errorData2' field") - } + // Simple Field (errorData2) + errorData2 := uint8(m.GetErrorData2()) + _errorData2Err := writeBuffer.WriteUint8("errorData2", 8, (errorData2)) + if _errorData2Err != nil { + return errors.Wrap(_errorData2Err, "Error serializing 'errorData2' field") + } if popErr := writeBuffer.PopContext("ErrorReportingDataGeneric"); popErr != nil { return errors.Wrap(popErr, "Error popping for ErrorReportingDataGeneric") @@ -458,6 +463,7 @@ func (m *_ErrorReportingDataGeneric) SerializeWithWriteBuffer(ctx context.Contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ErrorReportingDataGeneric) isErrorReportingDataGeneric() bool { return true } @@ -472,3 +478,6 @@ func (m *_ErrorReportingDataGeneric) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/ErrorReportingSeverity.go b/plc4go/protocols/cbus/readwrite/model/ErrorReportingSeverity.go index 5844d6f78b9..6b98d3279f4 100644 --- a/plc4go/protocols/cbus/readwrite/model/ErrorReportingSeverity.go +++ b/plc4go/protocols/cbus/readwrite/model/ErrorReportingSeverity.go @@ -34,22 +34,22 @@ type IErrorReportingSeverity interface { utils.Serializable } -const ( - ErrorReportingSeverity_ALL_OK ErrorReportingSeverity = 0x0 - ErrorReportingSeverity_OK ErrorReportingSeverity = 0x1 - ErrorReportingSeverity_MINOR_FAILURE ErrorReportingSeverity = 0x2 +const( + ErrorReportingSeverity_ALL_OK ErrorReportingSeverity = 0x0 + ErrorReportingSeverity_OK ErrorReportingSeverity = 0x1 + ErrorReportingSeverity_MINOR_FAILURE ErrorReportingSeverity = 0x2 ErrorReportingSeverity_GENERAL_FAILURE ErrorReportingSeverity = 0x3 ErrorReportingSeverity_EXTREME_FAILURE ErrorReportingSeverity = 0x4 - ErrorReportingSeverity_RESERVED_1 ErrorReportingSeverity = 0x5 - ErrorReportingSeverity_RESERVED_2 ErrorReportingSeverity = 0x6 - ErrorReportingSeverity_RESERVED_3 ErrorReportingSeverity = 0x7 + ErrorReportingSeverity_RESERVED_1 ErrorReportingSeverity = 0x5 + ErrorReportingSeverity_RESERVED_2 ErrorReportingSeverity = 0x6 + ErrorReportingSeverity_RESERVED_3 ErrorReportingSeverity = 0x7 ) var ErrorReportingSeverityValues []ErrorReportingSeverity func init() { _ = errors.New - ErrorReportingSeverityValues = []ErrorReportingSeverity{ + ErrorReportingSeverityValues = []ErrorReportingSeverity { ErrorReportingSeverity_ALL_OK, ErrorReportingSeverity_OK, ErrorReportingSeverity_MINOR_FAILURE, @@ -63,22 +63,22 @@ func init() { func ErrorReportingSeverityByValue(value uint8) (enum ErrorReportingSeverity, ok bool) { switch value { - case 0x0: - return ErrorReportingSeverity_ALL_OK, true - case 0x1: - return ErrorReportingSeverity_OK, true - case 0x2: - return ErrorReportingSeverity_MINOR_FAILURE, true - case 0x3: - return ErrorReportingSeverity_GENERAL_FAILURE, true - case 0x4: - return ErrorReportingSeverity_EXTREME_FAILURE, true - case 0x5: - return ErrorReportingSeverity_RESERVED_1, true - case 0x6: - return ErrorReportingSeverity_RESERVED_2, true - case 0x7: - return ErrorReportingSeverity_RESERVED_3, true + case 0x0: + return ErrorReportingSeverity_ALL_OK, true + case 0x1: + return ErrorReportingSeverity_OK, true + case 0x2: + return ErrorReportingSeverity_MINOR_FAILURE, true + case 0x3: + return ErrorReportingSeverity_GENERAL_FAILURE, true + case 0x4: + return ErrorReportingSeverity_EXTREME_FAILURE, true + case 0x5: + return ErrorReportingSeverity_RESERVED_1, true + case 0x6: + return ErrorReportingSeverity_RESERVED_2, true + case 0x7: + return ErrorReportingSeverity_RESERVED_3, true } return 0, false } @@ -105,13 +105,13 @@ func ErrorReportingSeverityByName(value string) (enum ErrorReportingSeverity, ok return 0, false } -func ErrorReportingSeverityKnows(value uint8) bool { +func ErrorReportingSeverityKnows(value uint8) bool { for _, typeValue := range ErrorReportingSeverityValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastErrorReportingSeverity(structType interface{}) ErrorReportingSeverity { @@ -187,3 +187,4 @@ func (e ErrorReportingSeverity) PLC4XEnumName() string { func (e ErrorReportingSeverity) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategory.go b/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategory.go index aa2532240f4..c758025f297 100644 --- a/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategory.go +++ b/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategory.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ErrorReportingSystemCategory is the corresponding interface of ErrorReportingSystemCategory type ErrorReportingSystemCategory interface { @@ -48,11 +50,12 @@ type ErrorReportingSystemCategoryExactly interface { // _ErrorReportingSystemCategory is the data-structure of this message type _ErrorReportingSystemCategory struct { - SystemCategoryClass ErrorReportingSystemCategoryClass - SystemCategoryType ErrorReportingSystemCategoryType - SystemCategoryVariant ErrorReportingSystemCategoryVariant + SystemCategoryClass ErrorReportingSystemCategoryClass + SystemCategoryType ErrorReportingSystemCategoryType + SystemCategoryVariant ErrorReportingSystemCategoryVariant } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -75,14 +78,15 @@ func (m *_ErrorReportingSystemCategory) GetSystemCategoryVariant() ErrorReportin /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewErrorReportingSystemCategory factory function for _ErrorReportingSystemCategory -func NewErrorReportingSystemCategory(systemCategoryClass ErrorReportingSystemCategoryClass, systemCategoryType ErrorReportingSystemCategoryType, systemCategoryVariant ErrorReportingSystemCategoryVariant) *_ErrorReportingSystemCategory { - return &_ErrorReportingSystemCategory{SystemCategoryClass: systemCategoryClass, SystemCategoryType: systemCategoryType, SystemCategoryVariant: systemCategoryVariant} +func NewErrorReportingSystemCategory( systemCategoryClass ErrorReportingSystemCategoryClass , systemCategoryType ErrorReportingSystemCategoryType , systemCategoryVariant ErrorReportingSystemCategoryVariant ) *_ErrorReportingSystemCategory { +return &_ErrorReportingSystemCategory{ SystemCategoryClass: systemCategoryClass , SystemCategoryType: systemCategoryType , SystemCategoryVariant: systemCategoryVariant } } // Deprecated: use the interface for direct cast func CastErrorReportingSystemCategory(structType interface{}) ErrorReportingSystemCategory { - if casted, ok := structType.(ErrorReportingSystemCategory); ok { + if casted, ok := structType.(ErrorReportingSystemCategory); ok { return casted } if casted, ok := structType.(*ErrorReportingSystemCategory); ok { @@ -110,6 +114,7 @@ func (m *_ErrorReportingSystemCategory) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_ErrorReportingSystemCategory) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -131,7 +136,7 @@ func ErrorReportingSystemCategoryParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("systemCategoryClass"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for systemCategoryClass") } - _systemCategoryClass, _systemCategoryClassErr := ErrorReportingSystemCategoryClassParseWithBuffer(ctx, readBuffer) +_systemCategoryClass, _systemCategoryClassErr := ErrorReportingSystemCategoryClassParseWithBuffer(ctx, readBuffer) if _systemCategoryClassErr != nil { return nil, errors.Wrap(_systemCategoryClassErr, "Error parsing 'systemCategoryClass' field of ErrorReportingSystemCategory") } @@ -144,7 +149,7 @@ func ErrorReportingSystemCategoryParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("systemCategoryType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for systemCategoryType") } - _systemCategoryType, _systemCategoryTypeErr := ErrorReportingSystemCategoryTypeParseWithBuffer(ctx, readBuffer, ErrorReportingSystemCategoryClass(systemCategoryClass)) +_systemCategoryType, _systemCategoryTypeErr := ErrorReportingSystemCategoryTypeParseWithBuffer(ctx, readBuffer , ErrorReportingSystemCategoryClass( systemCategoryClass ) ) if _systemCategoryTypeErr != nil { return nil, errors.Wrap(_systemCategoryTypeErr, "Error parsing 'systemCategoryType' field of ErrorReportingSystemCategory") } @@ -157,7 +162,7 @@ func ErrorReportingSystemCategoryParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("systemCategoryVariant"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for systemCategoryVariant") } - _systemCategoryVariant, _systemCategoryVariantErr := ErrorReportingSystemCategoryVariantParseWithBuffer(ctx, readBuffer) +_systemCategoryVariant, _systemCategoryVariantErr := ErrorReportingSystemCategoryVariantParseWithBuffer(ctx, readBuffer) if _systemCategoryVariantErr != nil { return nil, errors.Wrap(_systemCategoryVariantErr, "Error parsing 'systemCategoryVariant' field of ErrorReportingSystemCategory") } @@ -172,10 +177,10 @@ func ErrorReportingSystemCategoryParseWithBuffer(ctx context.Context, readBuffer // Create the instance return &_ErrorReportingSystemCategory{ - SystemCategoryClass: systemCategoryClass, - SystemCategoryType: systemCategoryType, - SystemCategoryVariant: systemCategoryVariant, - }, nil + SystemCategoryClass: systemCategoryClass, + SystemCategoryType: systemCategoryType, + SystemCategoryVariant: systemCategoryVariant, + }, nil } func (m *_ErrorReportingSystemCategory) Serialize() ([]byte, error) { @@ -189,7 +194,7 @@ func (m *_ErrorReportingSystemCategory) Serialize() ([]byte, error) { func (m *_ErrorReportingSystemCategory) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("ErrorReportingSystemCategory"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("ErrorReportingSystemCategory"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for ErrorReportingSystemCategory") } @@ -235,6 +240,7 @@ func (m *_ErrorReportingSystemCategory) SerializeWithWriteBuffer(ctx context.Con return nil } + func (m *_ErrorReportingSystemCategory) isErrorReportingSystemCategory() bool { return true } @@ -249,3 +255,6 @@ func (m *_ErrorReportingSystemCategory) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryClass.go b/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryClass.go index 923060e9fea..3d6804756ca 100644 --- a/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryClass.go +++ b/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryClass.go @@ -34,30 +34,30 @@ type IErrorReportingSystemCategoryClass interface { utils.Serializable } -const ( - ErrorReportingSystemCategoryClass_RESERVED_0 ErrorReportingSystemCategoryClass = 0x0 - ErrorReportingSystemCategoryClass_RESERVED_1 ErrorReportingSystemCategoryClass = 0x1 - ErrorReportingSystemCategoryClass_RESERVED_2 ErrorReportingSystemCategoryClass = 0x2 - ErrorReportingSystemCategoryClass_RESERVED_3 ErrorReportingSystemCategoryClass = 0x3 - ErrorReportingSystemCategoryClass_RESERVED_4 ErrorReportingSystemCategoryClass = 0x4 - ErrorReportingSystemCategoryClass_INPUT_UNITS ErrorReportingSystemCategoryClass = 0x5 - ErrorReportingSystemCategoryClass_RESERVED_6 ErrorReportingSystemCategoryClass = 0x6 - ErrorReportingSystemCategoryClass_RESERVED_7 ErrorReportingSystemCategoryClass = 0x7 - ErrorReportingSystemCategoryClass_RESERVED_8 ErrorReportingSystemCategoryClass = 0x8 - ErrorReportingSystemCategoryClass_SUPPORT_UNITS ErrorReportingSystemCategoryClass = 0x9 - ErrorReportingSystemCategoryClass_RESERVED_10 ErrorReportingSystemCategoryClass = 0xA +const( + ErrorReportingSystemCategoryClass_RESERVED_0 ErrorReportingSystemCategoryClass = 0x0 + ErrorReportingSystemCategoryClass_RESERVED_1 ErrorReportingSystemCategoryClass = 0x1 + ErrorReportingSystemCategoryClass_RESERVED_2 ErrorReportingSystemCategoryClass = 0x2 + ErrorReportingSystemCategoryClass_RESERVED_3 ErrorReportingSystemCategoryClass = 0x3 + ErrorReportingSystemCategoryClass_RESERVED_4 ErrorReportingSystemCategoryClass = 0x4 + ErrorReportingSystemCategoryClass_INPUT_UNITS ErrorReportingSystemCategoryClass = 0x5 + ErrorReportingSystemCategoryClass_RESERVED_6 ErrorReportingSystemCategoryClass = 0x6 + ErrorReportingSystemCategoryClass_RESERVED_7 ErrorReportingSystemCategoryClass = 0x7 + ErrorReportingSystemCategoryClass_RESERVED_8 ErrorReportingSystemCategoryClass = 0x8 + ErrorReportingSystemCategoryClass_SUPPORT_UNITS ErrorReportingSystemCategoryClass = 0x9 + ErrorReportingSystemCategoryClass_RESERVED_10 ErrorReportingSystemCategoryClass = 0xA ErrorReportingSystemCategoryClass_BUILDING_MANAGEMENT_SYSTEMS ErrorReportingSystemCategoryClass = 0xB - ErrorReportingSystemCategoryClass_RESERVED_12 ErrorReportingSystemCategoryClass = 0xC - ErrorReportingSystemCategoryClass_OUTPUT_UNITS ErrorReportingSystemCategoryClass = 0xD - ErrorReportingSystemCategoryClass_RESERVED_14 ErrorReportingSystemCategoryClass = 0xE - ErrorReportingSystemCategoryClass_CLIMATE_CONTROLLERS ErrorReportingSystemCategoryClass = 0xF + ErrorReportingSystemCategoryClass_RESERVED_12 ErrorReportingSystemCategoryClass = 0xC + ErrorReportingSystemCategoryClass_OUTPUT_UNITS ErrorReportingSystemCategoryClass = 0xD + ErrorReportingSystemCategoryClass_RESERVED_14 ErrorReportingSystemCategoryClass = 0xE + ErrorReportingSystemCategoryClass_CLIMATE_CONTROLLERS ErrorReportingSystemCategoryClass = 0xF ) var ErrorReportingSystemCategoryClassValues []ErrorReportingSystemCategoryClass func init() { _ = errors.New - ErrorReportingSystemCategoryClassValues = []ErrorReportingSystemCategoryClass{ + ErrorReportingSystemCategoryClassValues = []ErrorReportingSystemCategoryClass { ErrorReportingSystemCategoryClass_RESERVED_0, ErrorReportingSystemCategoryClass_RESERVED_1, ErrorReportingSystemCategoryClass_RESERVED_2, @@ -79,38 +79,38 @@ func init() { func ErrorReportingSystemCategoryClassByValue(value uint8) (enum ErrorReportingSystemCategoryClass, ok bool) { switch value { - case 0x0: - return ErrorReportingSystemCategoryClass_RESERVED_0, true - case 0x1: - return ErrorReportingSystemCategoryClass_RESERVED_1, true - case 0x2: - return ErrorReportingSystemCategoryClass_RESERVED_2, true - case 0x3: - return ErrorReportingSystemCategoryClass_RESERVED_3, true - case 0x4: - return ErrorReportingSystemCategoryClass_RESERVED_4, true - case 0x5: - return ErrorReportingSystemCategoryClass_INPUT_UNITS, true - case 0x6: - return ErrorReportingSystemCategoryClass_RESERVED_6, true - case 0x7: - return ErrorReportingSystemCategoryClass_RESERVED_7, true - case 0x8: - return ErrorReportingSystemCategoryClass_RESERVED_8, true - case 0x9: - return ErrorReportingSystemCategoryClass_SUPPORT_UNITS, true - case 0xA: - return ErrorReportingSystemCategoryClass_RESERVED_10, true - case 0xB: - return ErrorReportingSystemCategoryClass_BUILDING_MANAGEMENT_SYSTEMS, true - case 0xC: - return ErrorReportingSystemCategoryClass_RESERVED_12, true - case 0xD: - return ErrorReportingSystemCategoryClass_OUTPUT_UNITS, true - case 0xE: - return ErrorReportingSystemCategoryClass_RESERVED_14, true - case 0xF: - return ErrorReportingSystemCategoryClass_CLIMATE_CONTROLLERS, true + case 0x0: + return ErrorReportingSystemCategoryClass_RESERVED_0, true + case 0x1: + return ErrorReportingSystemCategoryClass_RESERVED_1, true + case 0x2: + return ErrorReportingSystemCategoryClass_RESERVED_2, true + case 0x3: + return ErrorReportingSystemCategoryClass_RESERVED_3, true + case 0x4: + return ErrorReportingSystemCategoryClass_RESERVED_4, true + case 0x5: + return ErrorReportingSystemCategoryClass_INPUT_UNITS, true + case 0x6: + return ErrorReportingSystemCategoryClass_RESERVED_6, true + case 0x7: + return ErrorReportingSystemCategoryClass_RESERVED_7, true + case 0x8: + return ErrorReportingSystemCategoryClass_RESERVED_8, true + case 0x9: + return ErrorReportingSystemCategoryClass_SUPPORT_UNITS, true + case 0xA: + return ErrorReportingSystemCategoryClass_RESERVED_10, true + case 0xB: + return ErrorReportingSystemCategoryClass_BUILDING_MANAGEMENT_SYSTEMS, true + case 0xC: + return ErrorReportingSystemCategoryClass_RESERVED_12, true + case 0xD: + return ErrorReportingSystemCategoryClass_OUTPUT_UNITS, true + case 0xE: + return ErrorReportingSystemCategoryClass_RESERVED_14, true + case 0xF: + return ErrorReportingSystemCategoryClass_CLIMATE_CONTROLLERS, true } return 0, false } @@ -153,13 +153,13 @@ func ErrorReportingSystemCategoryClassByName(value string) (enum ErrorReportingS return 0, false } -func ErrorReportingSystemCategoryClassKnows(value uint8) bool { +func ErrorReportingSystemCategoryClassKnows(value uint8) bool { for _, typeValue := range ErrorReportingSystemCategoryClassValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastErrorReportingSystemCategoryClass(structType interface{}) ErrorReportingSystemCategoryClass { @@ -251,3 +251,4 @@ func (e ErrorReportingSystemCategoryClass) PLC4XEnumName() string { func (e ErrorReportingSystemCategoryClass) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryType.go b/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryType.go index 69f202dd95c..3d47bee08bc 100644 --- a/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryType.go +++ b/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryType.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ErrorReportingSystemCategoryType is the corresponding interface of ErrorReportingSystemCategoryType type ErrorReportingSystemCategoryType interface { @@ -53,6 +55,7 @@ type _ErrorReportingSystemCategoryTypeChildRequirements interface { GetErrorReportingSystemCategoryClass() ErrorReportingSystemCategoryClass } + type ErrorReportingSystemCategoryTypeParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child ErrorReportingSystemCategoryType, serializeChildFunction func() error) error GetTypeName() string @@ -60,21 +63,22 @@ type ErrorReportingSystemCategoryTypeParent interface { type ErrorReportingSystemCategoryTypeChild interface { utils.Serializable - InitializeParent(parent ErrorReportingSystemCategoryType) +InitializeParent(parent ErrorReportingSystemCategoryType ) GetParent() *ErrorReportingSystemCategoryType GetTypeName() string ErrorReportingSystemCategoryType } + // NewErrorReportingSystemCategoryType factory function for _ErrorReportingSystemCategoryType -func NewErrorReportingSystemCategoryType() *_ErrorReportingSystemCategoryType { - return &_ErrorReportingSystemCategoryType{} +func NewErrorReportingSystemCategoryType( ) *_ErrorReportingSystemCategoryType { +return &_ErrorReportingSystemCategoryType{ } } // Deprecated: use the interface for direct cast func CastErrorReportingSystemCategoryType(structType interface{}) ErrorReportingSystemCategoryType { - if casted, ok := structType.(ErrorReportingSystemCategoryType); ok { + if casted, ok := structType.(ErrorReportingSystemCategoryType); ok { return casted } if casted, ok := structType.(*ErrorReportingSystemCategoryType); ok { @@ -87,6 +91,7 @@ func (m *_ErrorReportingSystemCategoryType) GetTypeName() string { return "ErrorReportingSystemCategoryType" } + func (m *_ErrorReportingSystemCategoryType) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -113,24 +118,24 @@ func ErrorReportingSystemCategoryTypeParseWithBuffer(ctx context.Context, readBu // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type ErrorReportingSystemCategoryTypeChildSerializeRequirement interface { ErrorReportingSystemCategoryType - InitializeParent(ErrorReportingSystemCategoryType) + InitializeParent(ErrorReportingSystemCategoryType ) GetParent() ErrorReportingSystemCategoryType } var _childTemp interface{} var _child ErrorReportingSystemCategoryTypeChildSerializeRequirement var typeSwitchError error switch { - case errorReportingSystemCategoryClass == ErrorReportingSystemCategoryClass_INPUT_UNITS: // ErrorReportingSystemCategoryTypeInputUnits +case errorReportingSystemCategoryClass == ErrorReportingSystemCategoryClass_INPUT_UNITS : // ErrorReportingSystemCategoryTypeInputUnits _childTemp, typeSwitchError = ErrorReportingSystemCategoryTypeInputUnitsParseWithBuffer(ctx, readBuffer, errorReportingSystemCategoryClass) - case errorReportingSystemCategoryClass == ErrorReportingSystemCategoryClass_SUPPORT_UNITS: // ErrorReportingSystemCategoryTypeSupportUnits +case errorReportingSystemCategoryClass == ErrorReportingSystemCategoryClass_SUPPORT_UNITS : // ErrorReportingSystemCategoryTypeSupportUnits _childTemp, typeSwitchError = ErrorReportingSystemCategoryTypeSupportUnitsParseWithBuffer(ctx, readBuffer, errorReportingSystemCategoryClass) - case errorReportingSystemCategoryClass == ErrorReportingSystemCategoryClass_BUILDING_MANAGEMENT_SYSTEMS: // ErrorReportingSystemCategoryTypeBuildingManagementSystems +case errorReportingSystemCategoryClass == ErrorReportingSystemCategoryClass_BUILDING_MANAGEMENT_SYSTEMS : // ErrorReportingSystemCategoryTypeBuildingManagementSystems _childTemp, typeSwitchError = ErrorReportingSystemCategoryTypeBuildingManagementSystemsParseWithBuffer(ctx, readBuffer, errorReportingSystemCategoryClass) - case errorReportingSystemCategoryClass == ErrorReportingSystemCategoryClass_OUTPUT_UNITS: // ErrorReportingSystemCategoryTypeOutputUnits +case errorReportingSystemCategoryClass == ErrorReportingSystemCategoryClass_OUTPUT_UNITS : // ErrorReportingSystemCategoryTypeOutputUnits _childTemp, typeSwitchError = ErrorReportingSystemCategoryTypeOutputUnitsParseWithBuffer(ctx, readBuffer, errorReportingSystemCategoryClass) - case errorReportingSystemCategoryClass == ErrorReportingSystemCategoryClass_CLIMATE_CONTROLLERS: // ErrorReportingSystemCategoryTypeClimateControllers +case errorReportingSystemCategoryClass == ErrorReportingSystemCategoryClass_CLIMATE_CONTROLLERS : // ErrorReportingSystemCategoryTypeClimateControllers _childTemp, typeSwitchError = ErrorReportingSystemCategoryTypeClimateControllersParseWithBuffer(ctx, readBuffer, errorReportingSystemCategoryClass) - case 0 == 0: // ErrorReportingSystemCategoryTypeReserved +case 0==0 : // ErrorReportingSystemCategoryTypeReserved _childTemp, typeSwitchError = ErrorReportingSystemCategoryTypeReservedParseWithBuffer(ctx, readBuffer, errorReportingSystemCategoryClass) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [errorReportingSystemCategoryClass=%v]", errorReportingSystemCategoryClass) @@ -145,7 +150,7 @@ func ErrorReportingSystemCategoryTypeParseWithBuffer(ctx context.Context, readBu } // Finish initializing - _child.InitializeParent(_child) +_child.InitializeParent(_child ) return _child, nil } @@ -155,7 +160,7 @@ func (pm *_ErrorReportingSystemCategoryType) SerializeParent(ctx context.Context _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("ErrorReportingSystemCategoryType"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("ErrorReportingSystemCategoryType"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for ErrorReportingSystemCategoryType") } @@ -170,6 +175,7 @@ func (pm *_ErrorReportingSystemCategoryType) SerializeParent(ctx context.Context return nil } + func (m *_ErrorReportingSystemCategoryType) isErrorReportingSystemCategoryType() bool { return true } @@ -184,3 +190,6 @@ func (m *_ErrorReportingSystemCategoryType) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeBuildingManagementSystems.go b/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeBuildingManagementSystems.go index eaa3381dbb0..11ebdb113b8 100644 --- a/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeBuildingManagementSystems.go +++ b/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeBuildingManagementSystems.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ErrorReportingSystemCategoryTypeBuildingManagementSystems is the corresponding interface of ErrorReportingSystemCategoryTypeBuildingManagementSystems type ErrorReportingSystemCategoryTypeBuildingManagementSystems interface { @@ -46,30 +48,29 @@ type ErrorReportingSystemCategoryTypeBuildingManagementSystemsExactly interface // _ErrorReportingSystemCategoryTypeBuildingManagementSystems is the data-structure of this message type _ErrorReportingSystemCategoryTypeBuildingManagementSystems struct { *_ErrorReportingSystemCategoryType - CategoryForType ErrorReportingSystemCategoryTypeForBuildingManagementSystems + CategoryForType ErrorReportingSystemCategoryTypeForBuildingManagementSystems } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ErrorReportingSystemCategoryTypeBuildingManagementSystems) GetErrorReportingSystemCategoryClass() ErrorReportingSystemCategoryClass { - return ErrorReportingSystemCategoryClass_BUILDING_MANAGEMENT_SYSTEMS -} +func (m *_ErrorReportingSystemCategoryTypeBuildingManagementSystems) GetErrorReportingSystemCategoryClass() ErrorReportingSystemCategoryClass { +return ErrorReportingSystemCategoryClass_BUILDING_MANAGEMENT_SYSTEMS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ErrorReportingSystemCategoryTypeBuildingManagementSystems) InitializeParent(parent ErrorReportingSystemCategoryType) { -} +func (m *_ErrorReportingSystemCategoryTypeBuildingManagementSystems) InitializeParent(parent ErrorReportingSystemCategoryType ) {} -func (m *_ErrorReportingSystemCategoryTypeBuildingManagementSystems) GetParent() ErrorReportingSystemCategoryType { +func (m *_ErrorReportingSystemCategoryTypeBuildingManagementSystems) GetParent() ErrorReportingSystemCategoryType { return m._ErrorReportingSystemCategoryType } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -84,11 +85,12 @@ func (m *_ErrorReportingSystemCategoryTypeBuildingManagementSystems) GetCategory /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewErrorReportingSystemCategoryTypeBuildingManagementSystems factory function for _ErrorReportingSystemCategoryTypeBuildingManagementSystems -func NewErrorReportingSystemCategoryTypeBuildingManagementSystems(categoryForType ErrorReportingSystemCategoryTypeForBuildingManagementSystems) *_ErrorReportingSystemCategoryTypeBuildingManagementSystems { +func NewErrorReportingSystemCategoryTypeBuildingManagementSystems( categoryForType ErrorReportingSystemCategoryTypeForBuildingManagementSystems ) *_ErrorReportingSystemCategoryTypeBuildingManagementSystems { _result := &_ErrorReportingSystemCategoryTypeBuildingManagementSystems{ - CategoryForType: categoryForType, - _ErrorReportingSystemCategoryType: NewErrorReportingSystemCategoryType(), + CategoryForType: categoryForType, + _ErrorReportingSystemCategoryType: NewErrorReportingSystemCategoryType(), } _result._ErrorReportingSystemCategoryType._ErrorReportingSystemCategoryTypeChildRequirements = _result return _result @@ -96,7 +98,7 @@ func NewErrorReportingSystemCategoryTypeBuildingManagementSystems(categoryForTyp // Deprecated: use the interface for direct cast func CastErrorReportingSystemCategoryTypeBuildingManagementSystems(structType interface{}) ErrorReportingSystemCategoryTypeBuildingManagementSystems { - if casted, ok := structType.(ErrorReportingSystemCategoryTypeBuildingManagementSystems); ok { + if casted, ok := structType.(ErrorReportingSystemCategoryTypeBuildingManagementSystems); ok { return casted } if casted, ok := structType.(*ErrorReportingSystemCategoryTypeBuildingManagementSystems); ok { @@ -118,6 +120,7 @@ func (m *_ErrorReportingSystemCategoryTypeBuildingManagementSystems) GetLengthIn return lengthInBits } + func (m *_ErrorReportingSystemCategoryTypeBuildingManagementSystems) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +142,7 @@ func ErrorReportingSystemCategoryTypeBuildingManagementSystemsParseWithBuffer(ct if pullErr := readBuffer.PullContext("categoryForType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for categoryForType") } - _categoryForType, _categoryForTypeErr := ErrorReportingSystemCategoryTypeForBuildingManagementSystemsParseWithBuffer(ctx, readBuffer) +_categoryForType, _categoryForTypeErr := ErrorReportingSystemCategoryTypeForBuildingManagementSystemsParseWithBuffer(ctx, readBuffer) if _categoryForTypeErr != nil { return nil, errors.Wrap(_categoryForTypeErr, "Error parsing 'categoryForType' field of ErrorReportingSystemCategoryTypeBuildingManagementSystems") } @@ -154,8 +157,9 @@ func ErrorReportingSystemCategoryTypeBuildingManagementSystemsParseWithBuffer(ct // Create a partially initialized instance _child := &_ErrorReportingSystemCategoryTypeBuildingManagementSystems{ - _ErrorReportingSystemCategoryType: &_ErrorReportingSystemCategoryType{}, - CategoryForType: categoryForType, + _ErrorReportingSystemCategoryType: &_ErrorReportingSystemCategoryType{ + }, + CategoryForType: categoryForType, } _child._ErrorReportingSystemCategoryType._ErrorReportingSystemCategoryTypeChildRequirements = _child return _child, nil @@ -177,17 +181,17 @@ func (m *_ErrorReportingSystemCategoryTypeBuildingManagementSystems) SerializeWi return errors.Wrap(pushErr, "Error pushing for ErrorReportingSystemCategoryTypeBuildingManagementSystems") } - // Simple Field (categoryForType) - if pushErr := writeBuffer.PushContext("categoryForType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for categoryForType") - } - _categoryForTypeErr := writeBuffer.WriteSerializable(ctx, m.GetCategoryForType()) - if popErr := writeBuffer.PopContext("categoryForType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for categoryForType") - } - if _categoryForTypeErr != nil { - return errors.Wrap(_categoryForTypeErr, "Error serializing 'categoryForType' field") - } + // Simple Field (categoryForType) + if pushErr := writeBuffer.PushContext("categoryForType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for categoryForType") + } + _categoryForTypeErr := writeBuffer.WriteSerializable(ctx, m.GetCategoryForType()) + if popErr := writeBuffer.PopContext("categoryForType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for categoryForType") + } + if _categoryForTypeErr != nil { + return errors.Wrap(_categoryForTypeErr, "Error serializing 'categoryForType' field") + } if popErr := writeBuffer.PopContext("ErrorReportingSystemCategoryTypeBuildingManagementSystems"); popErr != nil { return errors.Wrap(popErr, "Error popping for ErrorReportingSystemCategoryTypeBuildingManagementSystems") @@ -197,6 +201,7 @@ func (m *_ErrorReportingSystemCategoryTypeBuildingManagementSystems) SerializeWi return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ErrorReportingSystemCategoryTypeBuildingManagementSystems) isErrorReportingSystemCategoryTypeBuildingManagementSystems() bool { return true } @@ -211,3 +216,6 @@ func (m *_ErrorReportingSystemCategoryTypeBuildingManagementSystems) String() st } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeClimateControllers.go b/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeClimateControllers.go index e5b4ae364c5..95cf38ee4bd 100644 --- a/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeClimateControllers.go +++ b/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeClimateControllers.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ErrorReportingSystemCategoryTypeClimateControllers is the corresponding interface of ErrorReportingSystemCategoryTypeClimateControllers type ErrorReportingSystemCategoryTypeClimateControllers interface { @@ -46,30 +48,29 @@ type ErrorReportingSystemCategoryTypeClimateControllersExactly interface { // _ErrorReportingSystemCategoryTypeClimateControllers is the data-structure of this message type _ErrorReportingSystemCategoryTypeClimateControllers struct { *_ErrorReportingSystemCategoryType - CategoryForType ErrorReportingSystemCategoryTypeForClimateControllers + CategoryForType ErrorReportingSystemCategoryTypeForClimateControllers } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ErrorReportingSystemCategoryTypeClimateControllers) GetErrorReportingSystemCategoryClass() ErrorReportingSystemCategoryClass { - return ErrorReportingSystemCategoryClass_CLIMATE_CONTROLLERS -} +func (m *_ErrorReportingSystemCategoryTypeClimateControllers) GetErrorReportingSystemCategoryClass() ErrorReportingSystemCategoryClass { +return ErrorReportingSystemCategoryClass_CLIMATE_CONTROLLERS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ErrorReportingSystemCategoryTypeClimateControllers) InitializeParent(parent ErrorReportingSystemCategoryType) { -} +func (m *_ErrorReportingSystemCategoryTypeClimateControllers) InitializeParent(parent ErrorReportingSystemCategoryType ) {} -func (m *_ErrorReportingSystemCategoryTypeClimateControllers) GetParent() ErrorReportingSystemCategoryType { +func (m *_ErrorReportingSystemCategoryTypeClimateControllers) GetParent() ErrorReportingSystemCategoryType { return m._ErrorReportingSystemCategoryType } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -84,11 +85,12 @@ func (m *_ErrorReportingSystemCategoryTypeClimateControllers) GetCategoryForType /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewErrorReportingSystemCategoryTypeClimateControllers factory function for _ErrorReportingSystemCategoryTypeClimateControllers -func NewErrorReportingSystemCategoryTypeClimateControllers(categoryForType ErrorReportingSystemCategoryTypeForClimateControllers) *_ErrorReportingSystemCategoryTypeClimateControllers { +func NewErrorReportingSystemCategoryTypeClimateControllers( categoryForType ErrorReportingSystemCategoryTypeForClimateControllers ) *_ErrorReportingSystemCategoryTypeClimateControllers { _result := &_ErrorReportingSystemCategoryTypeClimateControllers{ - CategoryForType: categoryForType, - _ErrorReportingSystemCategoryType: NewErrorReportingSystemCategoryType(), + CategoryForType: categoryForType, + _ErrorReportingSystemCategoryType: NewErrorReportingSystemCategoryType(), } _result._ErrorReportingSystemCategoryType._ErrorReportingSystemCategoryTypeChildRequirements = _result return _result @@ -96,7 +98,7 @@ func NewErrorReportingSystemCategoryTypeClimateControllers(categoryForType Error // Deprecated: use the interface for direct cast func CastErrorReportingSystemCategoryTypeClimateControllers(structType interface{}) ErrorReportingSystemCategoryTypeClimateControllers { - if casted, ok := structType.(ErrorReportingSystemCategoryTypeClimateControllers); ok { + if casted, ok := structType.(ErrorReportingSystemCategoryTypeClimateControllers); ok { return casted } if casted, ok := structType.(*ErrorReportingSystemCategoryTypeClimateControllers); ok { @@ -118,6 +120,7 @@ func (m *_ErrorReportingSystemCategoryTypeClimateControllers) GetLengthInBits(ct return lengthInBits } + func (m *_ErrorReportingSystemCategoryTypeClimateControllers) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +142,7 @@ func ErrorReportingSystemCategoryTypeClimateControllersParseWithBuffer(ctx conte if pullErr := readBuffer.PullContext("categoryForType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for categoryForType") } - _categoryForType, _categoryForTypeErr := ErrorReportingSystemCategoryTypeForClimateControllersParseWithBuffer(ctx, readBuffer) +_categoryForType, _categoryForTypeErr := ErrorReportingSystemCategoryTypeForClimateControllersParseWithBuffer(ctx, readBuffer) if _categoryForTypeErr != nil { return nil, errors.Wrap(_categoryForTypeErr, "Error parsing 'categoryForType' field of ErrorReportingSystemCategoryTypeClimateControllers") } @@ -154,8 +157,9 @@ func ErrorReportingSystemCategoryTypeClimateControllersParseWithBuffer(ctx conte // Create a partially initialized instance _child := &_ErrorReportingSystemCategoryTypeClimateControllers{ - _ErrorReportingSystemCategoryType: &_ErrorReportingSystemCategoryType{}, - CategoryForType: categoryForType, + _ErrorReportingSystemCategoryType: &_ErrorReportingSystemCategoryType{ + }, + CategoryForType: categoryForType, } _child._ErrorReportingSystemCategoryType._ErrorReportingSystemCategoryTypeChildRequirements = _child return _child, nil @@ -177,17 +181,17 @@ func (m *_ErrorReportingSystemCategoryTypeClimateControllers) SerializeWithWrite return errors.Wrap(pushErr, "Error pushing for ErrorReportingSystemCategoryTypeClimateControllers") } - // Simple Field (categoryForType) - if pushErr := writeBuffer.PushContext("categoryForType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for categoryForType") - } - _categoryForTypeErr := writeBuffer.WriteSerializable(ctx, m.GetCategoryForType()) - if popErr := writeBuffer.PopContext("categoryForType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for categoryForType") - } - if _categoryForTypeErr != nil { - return errors.Wrap(_categoryForTypeErr, "Error serializing 'categoryForType' field") - } + // Simple Field (categoryForType) + if pushErr := writeBuffer.PushContext("categoryForType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for categoryForType") + } + _categoryForTypeErr := writeBuffer.WriteSerializable(ctx, m.GetCategoryForType()) + if popErr := writeBuffer.PopContext("categoryForType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for categoryForType") + } + if _categoryForTypeErr != nil { + return errors.Wrap(_categoryForTypeErr, "Error serializing 'categoryForType' field") + } if popErr := writeBuffer.PopContext("ErrorReportingSystemCategoryTypeClimateControllers"); popErr != nil { return errors.Wrap(popErr, "Error popping for ErrorReportingSystemCategoryTypeClimateControllers") @@ -197,6 +201,7 @@ func (m *_ErrorReportingSystemCategoryTypeClimateControllers) SerializeWithWrite return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ErrorReportingSystemCategoryTypeClimateControllers) isErrorReportingSystemCategoryTypeClimateControllers() bool { return true } @@ -211,3 +216,6 @@ func (m *_ErrorReportingSystemCategoryTypeClimateControllers) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeForBuildingManagementSystems.go b/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeForBuildingManagementSystems.go index 5908a1e0b68..22618f106c2 100644 --- a/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeForBuildingManagementSystems.go +++ b/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeForBuildingManagementSystems.go @@ -34,30 +34,30 @@ type IErrorReportingSystemCategoryTypeForBuildingManagementSystems interface { utils.Serializable } -const ( +const( ErrorReportingSystemCategoryTypeForBuildingManagementSystems_BMS_DIAGNOSTIC_REPORTING ErrorReportingSystemCategoryTypeForBuildingManagementSystems = 0x0 - ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_1 ErrorReportingSystemCategoryTypeForBuildingManagementSystems = 0x1 - ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_2 ErrorReportingSystemCategoryTypeForBuildingManagementSystems = 0x2 - ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_3 ErrorReportingSystemCategoryTypeForBuildingManagementSystems = 0x3 - ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_4 ErrorReportingSystemCategoryTypeForBuildingManagementSystems = 0x4 - ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_5 ErrorReportingSystemCategoryTypeForBuildingManagementSystems = 0x5 - ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_6 ErrorReportingSystemCategoryTypeForBuildingManagementSystems = 0x6 - ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_7 ErrorReportingSystemCategoryTypeForBuildingManagementSystems = 0x7 - ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_8 ErrorReportingSystemCategoryTypeForBuildingManagementSystems = 0x8 - ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_9 ErrorReportingSystemCategoryTypeForBuildingManagementSystems = 0x9 - ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_10 ErrorReportingSystemCategoryTypeForBuildingManagementSystems = 0xA - ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_11 ErrorReportingSystemCategoryTypeForBuildingManagementSystems = 0xB - ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_12 ErrorReportingSystemCategoryTypeForBuildingManagementSystems = 0xC - ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_13 ErrorReportingSystemCategoryTypeForBuildingManagementSystems = 0xD - ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_14 ErrorReportingSystemCategoryTypeForBuildingManagementSystems = 0xE - ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_15 ErrorReportingSystemCategoryTypeForBuildingManagementSystems = 0xF + ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_1 ErrorReportingSystemCategoryTypeForBuildingManagementSystems = 0x1 + ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_2 ErrorReportingSystemCategoryTypeForBuildingManagementSystems = 0x2 + ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_3 ErrorReportingSystemCategoryTypeForBuildingManagementSystems = 0x3 + ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_4 ErrorReportingSystemCategoryTypeForBuildingManagementSystems = 0x4 + ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_5 ErrorReportingSystemCategoryTypeForBuildingManagementSystems = 0x5 + ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_6 ErrorReportingSystemCategoryTypeForBuildingManagementSystems = 0x6 + ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_7 ErrorReportingSystemCategoryTypeForBuildingManagementSystems = 0x7 + ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_8 ErrorReportingSystemCategoryTypeForBuildingManagementSystems = 0x8 + ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_9 ErrorReportingSystemCategoryTypeForBuildingManagementSystems = 0x9 + ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_10 ErrorReportingSystemCategoryTypeForBuildingManagementSystems = 0xA + ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_11 ErrorReportingSystemCategoryTypeForBuildingManagementSystems = 0xB + ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_12 ErrorReportingSystemCategoryTypeForBuildingManagementSystems = 0xC + ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_13 ErrorReportingSystemCategoryTypeForBuildingManagementSystems = 0xD + ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_14 ErrorReportingSystemCategoryTypeForBuildingManagementSystems = 0xE + ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_15 ErrorReportingSystemCategoryTypeForBuildingManagementSystems = 0xF ) var ErrorReportingSystemCategoryTypeForBuildingManagementSystemsValues []ErrorReportingSystemCategoryTypeForBuildingManagementSystems func init() { _ = errors.New - ErrorReportingSystemCategoryTypeForBuildingManagementSystemsValues = []ErrorReportingSystemCategoryTypeForBuildingManagementSystems{ + ErrorReportingSystemCategoryTypeForBuildingManagementSystemsValues = []ErrorReportingSystemCategoryTypeForBuildingManagementSystems { ErrorReportingSystemCategoryTypeForBuildingManagementSystems_BMS_DIAGNOSTIC_REPORTING, ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_1, ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_2, @@ -79,38 +79,38 @@ func init() { func ErrorReportingSystemCategoryTypeForBuildingManagementSystemsByValue(value uint8) (enum ErrorReportingSystemCategoryTypeForBuildingManagementSystems, ok bool) { switch value { - case 0x0: - return ErrorReportingSystemCategoryTypeForBuildingManagementSystems_BMS_DIAGNOSTIC_REPORTING, true - case 0x1: - return ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_1, true - case 0x2: - return ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_2, true - case 0x3: - return ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_3, true - case 0x4: - return ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_4, true - case 0x5: - return ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_5, true - case 0x6: - return ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_6, true - case 0x7: - return ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_7, true - case 0x8: - return ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_8, true - case 0x9: - return ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_9, true - case 0xA: - return ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_10, true - case 0xB: - return ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_11, true - case 0xC: - return ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_12, true - case 0xD: - return ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_13, true - case 0xE: - return ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_14, true - case 0xF: - return ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_15, true + case 0x0: + return ErrorReportingSystemCategoryTypeForBuildingManagementSystems_BMS_DIAGNOSTIC_REPORTING, true + case 0x1: + return ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_1, true + case 0x2: + return ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_2, true + case 0x3: + return ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_3, true + case 0x4: + return ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_4, true + case 0x5: + return ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_5, true + case 0x6: + return ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_6, true + case 0x7: + return ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_7, true + case 0x8: + return ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_8, true + case 0x9: + return ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_9, true + case 0xA: + return ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_10, true + case 0xB: + return ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_11, true + case 0xC: + return ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_12, true + case 0xD: + return ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_13, true + case 0xE: + return ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_14, true + case 0xF: + return ErrorReportingSystemCategoryTypeForBuildingManagementSystems_RESERVED_15, true } return 0, false } @@ -153,13 +153,13 @@ func ErrorReportingSystemCategoryTypeForBuildingManagementSystemsByName(value st return 0, false } -func ErrorReportingSystemCategoryTypeForBuildingManagementSystemsKnows(value uint8) bool { +func ErrorReportingSystemCategoryTypeForBuildingManagementSystemsKnows(value uint8) bool { for _, typeValue := range ErrorReportingSystemCategoryTypeForBuildingManagementSystemsValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastErrorReportingSystemCategoryTypeForBuildingManagementSystems(structType interface{}) ErrorReportingSystemCategoryTypeForBuildingManagementSystems { @@ -251,3 +251,4 @@ func (e ErrorReportingSystemCategoryTypeForBuildingManagementSystems) PLC4XEnumN func (e ErrorReportingSystemCategoryTypeForBuildingManagementSystems) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeForClimateControllers.go b/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeForClimateControllers.go index d977f47c7f0..242d55e040a 100644 --- a/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeForClimateControllers.go +++ b/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeForClimateControllers.go @@ -34,30 +34,30 @@ type IErrorReportingSystemCategoryTypeForClimateControllers interface { utils.Serializable } -const ( - ErrorReportingSystemCategoryTypeForClimateControllers_AIR_CONDITIONING_SYSTEM ErrorReportingSystemCategoryTypeForClimateControllers = 0x0 - ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_1 ErrorReportingSystemCategoryTypeForClimateControllers = 0x1 - ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_2 ErrorReportingSystemCategoryTypeForClimateControllers = 0x2 - ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_3 ErrorReportingSystemCategoryTypeForClimateControllers = 0x3 - ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_4 ErrorReportingSystemCategoryTypeForClimateControllers = 0x4 - ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_5 ErrorReportingSystemCategoryTypeForClimateControllers = 0x5 - ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_6 ErrorReportingSystemCategoryTypeForClimateControllers = 0x6 - ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_7 ErrorReportingSystemCategoryTypeForClimateControllers = 0x7 - ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_8 ErrorReportingSystemCategoryTypeForClimateControllers = 0x8 - ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_9 ErrorReportingSystemCategoryTypeForClimateControllers = 0x9 - ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_10 ErrorReportingSystemCategoryTypeForClimateControllers = 0xA - ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_11 ErrorReportingSystemCategoryTypeForClimateControllers = 0xB +const( + ErrorReportingSystemCategoryTypeForClimateControllers_AIR_CONDITIONING_SYSTEM ErrorReportingSystemCategoryTypeForClimateControllers = 0x0 + ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_1 ErrorReportingSystemCategoryTypeForClimateControllers = 0x1 + ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_2 ErrorReportingSystemCategoryTypeForClimateControllers = 0x2 + ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_3 ErrorReportingSystemCategoryTypeForClimateControllers = 0x3 + ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_4 ErrorReportingSystemCategoryTypeForClimateControllers = 0x4 + ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_5 ErrorReportingSystemCategoryTypeForClimateControllers = 0x5 + ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_6 ErrorReportingSystemCategoryTypeForClimateControllers = 0x6 + ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_7 ErrorReportingSystemCategoryTypeForClimateControllers = 0x7 + ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_8 ErrorReportingSystemCategoryTypeForClimateControllers = 0x8 + ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_9 ErrorReportingSystemCategoryTypeForClimateControllers = 0x9 + ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_10 ErrorReportingSystemCategoryTypeForClimateControllers = 0xA + ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_11 ErrorReportingSystemCategoryTypeForClimateControllers = 0xB ErrorReportingSystemCategoryTypeForClimateControllers_GLOBAL_WARMING_MODULATOR ErrorReportingSystemCategoryTypeForClimateControllers = 0xC - ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_13 ErrorReportingSystemCategoryTypeForClimateControllers = 0xD - ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_14 ErrorReportingSystemCategoryTypeForClimateControllers = 0xE - ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_15 ErrorReportingSystemCategoryTypeForClimateControllers = 0xF + ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_13 ErrorReportingSystemCategoryTypeForClimateControllers = 0xD + ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_14 ErrorReportingSystemCategoryTypeForClimateControllers = 0xE + ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_15 ErrorReportingSystemCategoryTypeForClimateControllers = 0xF ) var ErrorReportingSystemCategoryTypeForClimateControllersValues []ErrorReportingSystemCategoryTypeForClimateControllers func init() { _ = errors.New - ErrorReportingSystemCategoryTypeForClimateControllersValues = []ErrorReportingSystemCategoryTypeForClimateControllers{ + ErrorReportingSystemCategoryTypeForClimateControllersValues = []ErrorReportingSystemCategoryTypeForClimateControllers { ErrorReportingSystemCategoryTypeForClimateControllers_AIR_CONDITIONING_SYSTEM, ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_1, ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_2, @@ -79,38 +79,38 @@ func init() { func ErrorReportingSystemCategoryTypeForClimateControllersByValue(value uint8) (enum ErrorReportingSystemCategoryTypeForClimateControllers, ok bool) { switch value { - case 0x0: - return ErrorReportingSystemCategoryTypeForClimateControllers_AIR_CONDITIONING_SYSTEM, true - case 0x1: - return ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_1, true - case 0x2: - return ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_2, true - case 0x3: - return ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_3, true - case 0x4: - return ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_4, true - case 0x5: - return ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_5, true - case 0x6: - return ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_6, true - case 0x7: - return ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_7, true - case 0x8: - return ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_8, true - case 0x9: - return ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_9, true - case 0xA: - return ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_10, true - case 0xB: - return ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_11, true - case 0xC: - return ErrorReportingSystemCategoryTypeForClimateControllers_GLOBAL_WARMING_MODULATOR, true - case 0xD: - return ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_13, true - case 0xE: - return ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_14, true - case 0xF: - return ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_15, true + case 0x0: + return ErrorReportingSystemCategoryTypeForClimateControllers_AIR_CONDITIONING_SYSTEM, true + case 0x1: + return ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_1, true + case 0x2: + return ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_2, true + case 0x3: + return ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_3, true + case 0x4: + return ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_4, true + case 0x5: + return ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_5, true + case 0x6: + return ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_6, true + case 0x7: + return ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_7, true + case 0x8: + return ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_8, true + case 0x9: + return ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_9, true + case 0xA: + return ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_10, true + case 0xB: + return ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_11, true + case 0xC: + return ErrorReportingSystemCategoryTypeForClimateControllers_GLOBAL_WARMING_MODULATOR, true + case 0xD: + return ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_13, true + case 0xE: + return ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_14, true + case 0xF: + return ErrorReportingSystemCategoryTypeForClimateControllers_RESERVED_15, true } return 0, false } @@ -153,13 +153,13 @@ func ErrorReportingSystemCategoryTypeForClimateControllersByName(value string) ( return 0, false } -func ErrorReportingSystemCategoryTypeForClimateControllersKnows(value uint8) bool { +func ErrorReportingSystemCategoryTypeForClimateControllersKnows(value uint8) bool { for _, typeValue := range ErrorReportingSystemCategoryTypeForClimateControllersValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastErrorReportingSystemCategoryTypeForClimateControllers(structType interface{}) ErrorReportingSystemCategoryTypeForClimateControllers { @@ -251,3 +251,4 @@ func (e ErrorReportingSystemCategoryTypeForClimateControllers) PLC4XEnumName() s func (e ErrorReportingSystemCategoryTypeForClimateControllers) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeForInputUnits.go b/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeForInputUnits.go index 60047313900..c09df9a3bd7 100644 --- a/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeForInputUnits.go +++ b/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeForInputUnits.go @@ -34,30 +34,30 @@ type IErrorReportingSystemCategoryTypeForInputUnits interface { utils.Serializable } -const ( - ErrorReportingSystemCategoryTypeForInputUnits_KEY_UNITS ErrorReportingSystemCategoryTypeForInputUnits = 0x0 +const( + ErrorReportingSystemCategoryTypeForInputUnits_KEY_UNITS ErrorReportingSystemCategoryTypeForInputUnits = 0x0 ErrorReportingSystemCategoryTypeForInputUnits_TELECOMMAND_AND_REMOTE_ENTRY ErrorReportingSystemCategoryTypeForInputUnits = 0x1 - ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_2 ErrorReportingSystemCategoryTypeForInputUnits = 0x2 - ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_3 ErrorReportingSystemCategoryTypeForInputUnits = 0x3 - ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_4 ErrorReportingSystemCategoryTypeForInputUnits = 0x4 - ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_5 ErrorReportingSystemCategoryTypeForInputUnits = 0x5 - ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_6 ErrorReportingSystemCategoryTypeForInputUnits = 0x6 - ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_7 ErrorReportingSystemCategoryTypeForInputUnits = 0x7 - ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_8 ErrorReportingSystemCategoryTypeForInputUnits = 0x8 - ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_9 ErrorReportingSystemCategoryTypeForInputUnits = 0x9 - ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_10 ErrorReportingSystemCategoryTypeForInputUnits = 0xA - ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_11 ErrorReportingSystemCategoryTypeForInputUnits = 0xB - ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_12 ErrorReportingSystemCategoryTypeForInputUnits = 0xC - ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_13 ErrorReportingSystemCategoryTypeForInputUnits = 0xD - ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_14 ErrorReportingSystemCategoryTypeForInputUnits = 0xE - ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_15 ErrorReportingSystemCategoryTypeForInputUnits = 0xF + ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_2 ErrorReportingSystemCategoryTypeForInputUnits = 0x2 + ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_3 ErrorReportingSystemCategoryTypeForInputUnits = 0x3 + ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_4 ErrorReportingSystemCategoryTypeForInputUnits = 0x4 + ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_5 ErrorReportingSystemCategoryTypeForInputUnits = 0x5 + ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_6 ErrorReportingSystemCategoryTypeForInputUnits = 0x6 + ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_7 ErrorReportingSystemCategoryTypeForInputUnits = 0x7 + ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_8 ErrorReportingSystemCategoryTypeForInputUnits = 0x8 + ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_9 ErrorReportingSystemCategoryTypeForInputUnits = 0x9 + ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_10 ErrorReportingSystemCategoryTypeForInputUnits = 0xA + ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_11 ErrorReportingSystemCategoryTypeForInputUnits = 0xB + ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_12 ErrorReportingSystemCategoryTypeForInputUnits = 0xC + ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_13 ErrorReportingSystemCategoryTypeForInputUnits = 0xD + ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_14 ErrorReportingSystemCategoryTypeForInputUnits = 0xE + ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_15 ErrorReportingSystemCategoryTypeForInputUnits = 0xF ) var ErrorReportingSystemCategoryTypeForInputUnitsValues []ErrorReportingSystemCategoryTypeForInputUnits func init() { _ = errors.New - ErrorReportingSystemCategoryTypeForInputUnitsValues = []ErrorReportingSystemCategoryTypeForInputUnits{ + ErrorReportingSystemCategoryTypeForInputUnitsValues = []ErrorReportingSystemCategoryTypeForInputUnits { ErrorReportingSystemCategoryTypeForInputUnits_KEY_UNITS, ErrorReportingSystemCategoryTypeForInputUnits_TELECOMMAND_AND_REMOTE_ENTRY, ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_2, @@ -79,38 +79,38 @@ func init() { func ErrorReportingSystemCategoryTypeForInputUnitsByValue(value uint8) (enum ErrorReportingSystemCategoryTypeForInputUnits, ok bool) { switch value { - case 0x0: - return ErrorReportingSystemCategoryTypeForInputUnits_KEY_UNITS, true - case 0x1: - return ErrorReportingSystemCategoryTypeForInputUnits_TELECOMMAND_AND_REMOTE_ENTRY, true - case 0x2: - return ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_2, true - case 0x3: - return ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_3, true - case 0x4: - return ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_4, true - case 0x5: - return ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_5, true - case 0x6: - return ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_6, true - case 0x7: - return ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_7, true - case 0x8: - return ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_8, true - case 0x9: - return ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_9, true - case 0xA: - return ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_10, true - case 0xB: - return ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_11, true - case 0xC: - return ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_12, true - case 0xD: - return ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_13, true - case 0xE: - return ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_14, true - case 0xF: - return ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_15, true + case 0x0: + return ErrorReportingSystemCategoryTypeForInputUnits_KEY_UNITS, true + case 0x1: + return ErrorReportingSystemCategoryTypeForInputUnits_TELECOMMAND_AND_REMOTE_ENTRY, true + case 0x2: + return ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_2, true + case 0x3: + return ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_3, true + case 0x4: + return ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_4, true + case 0x5: + return ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_5, true + case 0x6: + return ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_6, true + case 0x7: + return ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_7, true + case 0x8: + return ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_8, true + case 0x9: + return ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_9, true + case 0xA: + return ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_10, true + case 0xB: + return ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_11, true + case 0xC: + return ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_12, true + case 0xD: + return ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_13, true + case 0xE: + return ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_14, true + case 0xF: + return ErrorReportingSystemCategoryTypeForInputUnits_RESERVED_15, true } return 0, false } @@ -153,13 +153,13 @@ func ErrorReportingSystemCategoryTypeForInputUnitsByName(value string) (enum Err return 0, false } -func ErrorReportingSystemCategoryTypeForInputUnitsKnows(value uint8) bool { +func ErrorReportingSystemCategoryTypeForInputUnitsKnows(value uint8) bool { for _, typeValue := range ErrorReportingSystemCategoryTypeForInputUnitsValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastErrorReportingSystemCategoryTypeForInputUnits(structType interface{}) ErrorReportingSystemCategoryTypeForInputUnits { @@ -251,3 +251,4 @@ func (e ErrorReportingSystemCategoryTypeForInputUnits) PLC4XEnumName() string { func (e ErrorReportingSystemCategoryTypeForInputUnits) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeForOutputUnits.go b/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeForOutputUnits.go index d4f4b5ce7e8..3e77ce30068 100644 --- a/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeForOutputUnits.go +++ b/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeForOutputUnits.go @@ -34,30 +34,30 @@ type IErrorReportingSystemCategoryTypeForOutputUnits interface { utils.Serializable } -const ( - ErrorReportingSystemCategoryTypeForOutputUnits_LE_MONOBLOCK_DIMMERS ErrorReportingSystemCategoryTypeForOutputUnits = 0x0 - ErrorReportingSystemCategoryTypeForOutputUnits_TE_MONOBLOCK_DIMMERS ErrorReportingSystemCategoryTypeForOutputUnits = 0x1 - ErrorReportingSystemCategoryTypeForOutputUnits_RESERVED_2 ErrorReportingSystemCategoryTypeForOutputUnits = 0x2 - ErrorReportingSystemCategoryTypeForOutputUnits_RESERVED_3 ErrorReportingSystemCategoryTypeForOutputUnits = 0x3 - ErrorReportingSystemCategoryTypeForOutputUnits_RELAYS_AND_OTHER_ON_OFF_SWITCHING_DEVICES ErrorReportingSystemCategoryTypeForOutputUnits = 0x4 - ErrorReportingSystemCategoryTypeForOutputUnits_RESERVED_5 ErrorReportingSystemCategoryTypeForOutputUnits = 0x5 - ErrorReportingSystemCategoryTypeForOutputUnits_PWM_DIMMERS_INCLUDES_LED_CONTROL ErrorReportingSystemCategoryTypeForOutputUnits = 0x6 - ErrorReportingSystemCategoryTypeForOutputUnits_SINEWAVE_MONOBLOCK_DIMMERS ErrorReportingSystemCategoryTypeForOutputUnits = 0x7 - ErrorReportingSystemCategoryTypeForOutputUnits_RESERVED_8 ErrorReportingSystemCategoryTypeForOutputUnits = 0x8 - ErrorReportingSystemCategoryTypeForOutputUnits_RESERVED_9 ErrorReportingSystemCategoryTypeForOutputUnits = 0x9 +const( + ErrorReportingSystemCategoryTypeForOutputUnits_LE_MONOBLOCK_DIMMERS ErrorReportingSystemCategoryTypeForOutputUnits = 0x0 + ErrorReportingSystemCategoryTypeForOutputUnits_TE_MONOBLOCK_DIMMERS ErrorReportingSystemCategoryTypeForOutputUnits = 0x1 + ErrorReportingSystemCategoryTypeForOutputUnits_RESERVED_2 ErrorReportingSystemCategoryTypeForOutputUnits = 0x2 + ErrorReportingSystemCategoryTypeForOutputUnits_RESERVED_3 ErrorReportingSystemCategoryTypeForOutputUnits = 0x3 + ErrorReportingSystemCategoryTypeForOutputUnits_RELAYS_AND_OTHER_ON_OFF_SWITCHING_DEVICES ErrorReportingSystemCategoryTypeForOutputUnits = 0x4 + ErrorReportingSystemCategoryTypeForOutputUnits_RESERVED_5 ErrorReportingSystemCategoryTypeForOutputUnits = 0x5 + ErrorReportingSystemCategoryTypeForOutputUnits_PWM_DIMMERS_INCLUDES_LED_CONTROL ErrorReportingSystemCategoryTypeForOutputUnits = 0x6 + ErrorReportingSystemCategoryTypeForOutputUnits_SINEWAVE_MONOBLOCK_DIMMERS ErrorReportingSystemCategoryTypeForOutputUnits = 0x7 + ErrorReportingSystemCategoryTypeForOutputUnits_RESERVED_8 ErrorReportingSystemCategoryTypeForOutputUnits = 0x8 + ErrorReportingSystemCategoryTypeForOutputUnits_RESERVED_9 ErrorReportingSystemCategoryTypeForOutputUnits = 0x9 ErrorReportingSystemCategoryTypeForOutputUnits_DALI_DSI_AND_OTHER_BALLAST_CONTROL_GATEWAYS ErrorReportingSystemCategoryTypeForOutputUnits = 0xA - ErrorReportingSystemCategoryTypeForOutputUnits_MODULAR_DIMMERS ErrorReportingSystemCategoryTypeForOutputUnits = 0xB - ErrorReportingSystemCategoryTypeForOutputUnits_RESERVED_12 ErrorReportingSystemCategoryTypeForOutputUnits = 0xC - ErrorReportingSystemCategoryTypeForOutputUnits_UNIVERSAL_MONOBLOCK_DIMMERS ErrorReportingSystemCategoryTypeForOutputUnits = 0xD - ErrorReportingSystemCategoryTypeForOutputUnits_DEVICE_CONTROLLERS_IR_RS_232_etc ErrorReportingSystemCategoryTypeForOutputUnits = 0xE - ErrorReportingSystemCategoryTypeForOutputUnits_RESERVED_15 ErrorReportingSystemCategoryTypeForOutputUnits = 0xF + ErrorReportingSystemCategoryTypeForOutputUnits_MODULAR_DIMMERS ErrorReportingSystemCategoryTypeForOutputUnits = 0xB + ErrorReportingSystemCategoryTypeForOutputUnits_RESERVED_12 ErrorReportingSystemCategoryTypeForOutputUnits = 0xC + ErrorReportingSystemCategoryTypeForOutputUnits_UNIVERSAL_MONOBLOCK_DIMMERS ErrorReportingSystemCategoryTypeForOutputUnits = 0xD + ErrorReportingSystemCategoryTypeForOutputUnits_DEVICE_CONTROLLERS_IR_RS_232_etc ErrorReportingSystemCategoryTypeForOutputUnits = 0xE + ErrorReportingSystemCategoryTypeForOutputUnits_RESERVED_15 ErrorReportingSystemCategoryTypeForOutputUnits = 0xF ) var ErrorReportingSystemCategoryTypeForOutputUnitsValues []ErrorReportingSystemCategoryTypeForOutputUnits func init() { _ = errors.New - ErrorReportingSystemCategoryTypeForOutputUnitsValues = []ErrorReportingSystemCategoryTypeForOutputUnits{ + ErrorReportingSystemCategoryTypeForOutputUnitsValues = []ErrorReportingSystemCategoryTypeForOutputUnits { ErrorReportingSystemCategoryTypeForOutputUnits_LE_MONOBLOCK_DIMMERS, ErrorReportingSystemCategoryTypeForOutputUnits_TE_MONOBLOCK_DIMMERS, ErrorReportingSystemCategoryTypeForOutputUnits_RESERVED_2, @@ -79,38 +79,38 @@ func init() { func ErrorReportingSystemCategoryTypeForOutputUnitsByValue(value uint8) (enum ErrorReportingSystemCategoryTypeForOutputUnits, ok bool) { switch value { - case 0x0: - return ErrorReportingSystemCategoryTypeForOutputUnits_LE_MONOBLOCK_DIMMERS, true - case 0x1: - return ErrorReportingSystemCategoryTypeForOutputUnits_TE_MONOBLOCK_DIMMERS, true - case 0x2: - return ErrorReportingSystemCategoryTypeForOutputUnits_RESERVED_2, true - case 0x3: - return ErrorReportingSystemCategoryTypeForOutputUnits_RESERVED_3, true - case 0x4: - return ErrorReportingSystemCategoryTypeForOutputUnits_RELAYS_AND_OTHER_ON_OFF_SWITCHING_DEVICES, true - case 0x5: - return ErrorReportingSystemCategoryTypeForOutputUnits_RESERVED_5, true - case 0x6: - return ErrorReportingSystemCategoryTypeForOutputUnits_PWM_DIMMERS_INCLUDES_LED_CONTROL, true - case 0x7: - return ErrorReportingSystemCategoryTypeForOutputUnits_SINEWAVE_MONOBLOCK_DIMMERS, true - case 0x8: - return ErrorReportingSystemCategoryTypeForOutputUnits_RESERVED_8, true - case 0x9: - return ErrorReportingSystemCategoryTypeForOutputUnits_RESERVED_9, true - case 0xA: - return ErrorReportingSystemCategoryTypeForOutputUnits_DALI_DSI_AND_OTHER_BALLAST_CONTROL_GATEWAYS, true - case 0xB: - return ErrorReportingSystemCategoryTypeForOutputUnits_MODULAR_DIMMERS, true - case 0xC: - return ErrorReportingSystemCategoryTypeForOutputUnits_RESERVED_12, true - case 0xD: - return ErrorReportingSystemCategoryTypeForOutputUnits_UNIVERSAL_MONOBLOCK_DIMMERS, true - case 0xE: - return ErrorReportingSystemCategoryTypeForOutputUnits_DEVICE_CONTROLLERS_IR_RS_232_etc, true - case 0xF: - return ErrorReportingSystemCategoryTypeForOutputUnits_RESERVED_15, true + case 0x0: + return ErrorReportingSystemCategoryTypeForOutputUnits_LE_MONOBLOCK_DIMMERS, true + case 0x1: + return ErrorReportingSystemCategoryTypeForOutputUnits_TE_MONOBLOCK_DIMMERS, true + case 0x2: + return ErrorReportingSystemCategoryTypeForOutputUnits_RESERVED_2, true + case 0x3: + return ErrorReportingSystemCategoryTypeForOutputUnits_RESERVED_3, true + case 0x4: + return ErrorReportingSystemCategoryTypeForOutputUnits_RELAYS_AND_OTHER_ON_OFF_SWITCHING_DEVICES, true + case 0x5: + return ErrorReportingSystemCategoryTypeForOutputUnits_RESERVED_5, true + case 0x6: + return ErrorReportingSystemCategoryTypeForOutputUnits_PWM_DIMMERS_INCLUDES_LED_CONTROL, true + case 0x7: + return ErrorReportingSystemCategoryTypeForOutputUnits_SINEWAVE_MONOBLOCK_DIMMERS, true + case 0x8: + return ErrorReportingSystemCategoryTypeForOutputUnits_RESERVED_8, true + case 0x9: + return ErrorReportingSystemCategoryTypeForOutputUnits_RESERVED_9, true + case 0xA: + return ErrorReportingSystemCategoryTypeForOutputUnits_DALI_DSI_AND_OTHER_BALLAST_CONTROL_GATEWAYS, true + case 0xB: + return ErrorReportingSystemCategoryTypeForOutputUnits_MODULAR_DIMMERS, true + case 0xC: + return ErrorReportingSystemCategoryTypeForOutputUnits_RESERVED_12, true + case 0xD: + return ErrorReportingSystemCategoryTypeForOutputUnits_UNIVERSAL_MONOBLOCK_DIMMERS, true + case 0xE: + return ErrorReportingSystemCategoryTypeForOutputUnits_DEVICE_CONTROLLERS_IR_RS_232_etc, true + case 0xF: + return ErrorReportingSystemCategoryTypeForOutputUnits_RESERVED_15, true } return 0, false } @@ -153,13 +153,13 @@ func ErrorReportingSystemCategoryTypeForOutputUnitsByName(value string) (enum Er return 0, false } -func ErrorReportingSystemCategoryTypeForOutputUnitsKnows(value uint8) bool { +func ErrorReportingSystemCategoryTypeForOutputUnitsKnows(value uint8) bool { for _, typeValue := range ErrorReportingSystemCategoryTypeForOutputUnitsValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastErrorReportingSystemCategoryTypeForOutputUnits(structType interface{}) ErrorReportingSystemCategoryTypeForOutputUnits { @@ -251,3 +251,4 @@ func (e ErrorReportingSystemCategoryTypeForOutputUnits) PLC4XEnumName() string { func (e ErrorReportingSystemCategoryTypeForOutputUnits) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeForSupportUnits.go b/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeForSupportUnits.go index 0232a069552..7cb66572c18 100644 --- a/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeForSupportUnits.go +++ b/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeForSupportUnits.go @@ -34,30 +34,30 @@ type IErrorReportingSystemCategoryTypeForSupportUnits interface { utils.Serializable } -const ( +const( ErrorReportingSystemCategoryTypeForSupportUnits_POWER_SUPPLIES ErrorReportingSystemCategoryTypeForSupportUnits = 0x0 - ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_1 ErrorReportingSystemCategoryTypeForSupportUnits = 0x1 - ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_2 ErrorReportingSystemCategoryTypeForSupportUnits = 0x2 - ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_3 ErrorReportingSystemCategoryTypeForSupportUnits = 0x3 - ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_4 ErrorReportingSystemCategoryTypeForSupportUnits = 0x4 - ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_5 ErrorReportingSystemCategoryTypeForSupportUnits = 0x5 - ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_6 ErrorReportingSystemCategoryTypeForSupportUnits = 0x6 - ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_7 ErrorReportingSystemCategoryTypeForSupportUnits = 0x7 - ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_8 ErrorReportingSystemCategoryTypeForSupportUnits = 0x8 - ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_9 ErrorReportingSystemCategoryTypeForSupportUnits = 0x9 - ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_10 ErrorReportingSystemCategoryTypeForSupportUnits = 0xA - ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_11 ErrorReportingSystemCategoryTypeForSupportUnits = 0xB - ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_12 ErrorReportingSystemCategoryTypeForSupportUnits = 0xC - ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_13 ErrorReportingSystemCategoryTypeForSupportUnits = 0xD - ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_14 ErrorReportingSystemCategoryTypeForSupportUnits = 0xE - ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_15 ErrorReportingSystemCategoryTypeForSupportUnits = 0xF + ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_1 ErrorReportingSystemCategoryTypeForSupportUnits = 0x1 + ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_2 ErrorReportingSystemCategoryTypeForSupportUnits = 0x2 + ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_3 ErrorReportingSystemCategoryTypeForSupportUnits = 0x3 + ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_4 ErrorReportingSystemCategoryTypeForSupportUnits = 0x4 + ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_5 ErrorReportingSystemCategoryTypeForSupportUnits = 0x5 + ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_6 ErrorReportingSystemCategoryTypeForSupportUnits = 0x6 + ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_7 ErrorReportingSystemCategoryTypeForSupportUnits = 0x7 + ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_8 ErrorReportingSystemCategoryTypeForSupportUnits = 0x8 + ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_9 ErrorReportingSystemCategoryTypeForSupportUnits = 0x9 + ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_10 ErrorReportingSystemCategoryTypeForSupportUnits = 0xA + ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_11 ErrorReportingSystemCategoryTypeForSupportUnits = 0xB + ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_12 ErrorReportingSystemCategoryTypeForSupportUnits = 0xC + ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_13 ErrorReportingSystemCategoryTypeForSupportUnits = 0xD + ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_14 ErrorReportingSystemCategoryTypeForSupportUnits = 0xE + ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_15 ErrorReportingSystemCategoryTypeForSupportUnits = 0xF ) var ErrorReportingSystemCategoryTypeForSupportUnitsValues []ErrorReportingSystemCategoryTypeForSupportUnits func init() { _ = errors.New - ErrorReportingSystemCategoryTypeForSupportUnitsValues = []ErrorReportingSystemCategoryTypeForSupportUnits{ + ErrorReportingSystemCategoryTypeForSupportUnitsValues = []ErrorReportingSystemCategoryTypeForSupportUnits { ErrorReportingSystemCategoryTypeForSupportUnits_POWER_SUPPLIES, ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_1, ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_2, @@ -79,38 +79,38 @@ func init() { func ErrorReportingSystemCategoryTypeForSupportUnitsByValue(value uint8) (enum ErrorReportingSystemCategoryTypeForSupportUnits, ok bool) { switch value { - case 0x0: - return ErrorReportingSystemCategoryTypeForSupportUnits_POWER_SUPPLIES, true - case 0x1: - return ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_1, true - case 0x2: - return ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_2, true - case 0x3: - return ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_3, true - case 0x4: - return ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_4, true - case 0x5: - return ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_5, true - case 0x6: - return ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_6, true - case 0x7: - return ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_7, true - case 0x8: - return ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_8, true - case 0x9: - return ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_9, true - case 0xA: - return ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_10, true - case 0xB: - return ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_11, true - case 0xC: - return ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_12, true - case 0xD: - return ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_13, true - case 0xE: - return ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_14, true - case 0xF: - return ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_15, true + case 0x0: + return ErrorReportingSystemCategoryTypeForSupportUnits_POWER_SUPPLIES, true + case 0x1: + return ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_1, true + case 0x2: + return ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_2, true + case 0x3: + return ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_3, true + case 0x4: + return ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_4, true + case 0x5: + return ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_5, true + case 0x6: + return ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_6, true + case 0x7: + return ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_7, true + case 0x8: + return ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_8, true + case 0x9: + return ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_9, true + case 0xA: + return ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_10, true + case 0xB: + return ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_11, true + case 0xC: + return ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_12, true + case 0xD: + return ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_13, true + case 0xE: + return ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_14, true + case 0xF: + return ErrorReportingSystemCategoryTypeForSupportUnits_RESERVED_15, true } return 0, false } @@ -153,13 +153,13 @@ func ErrorReportingSystemCategoryTypeForSupportUnitsByName(value string) (enum E return 0, false } -func ErrorReportingSystemCategoryTypeForSupportUnitsKnows(value uint8) bool { +func ErrorReportingSystemCategoryTypeForSupportUnitsKnows(value uint8) bool { for _, typeValue := range ErrorReportingSystemCategoryTypeForSupportUnitsValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastErrorReportingSystemCategoryTypeForSupportUnits(structType interface{}) ErrorReportingSystemCategoryTypeForSupportUnits { @@ -251,3 +251,4 @@ func (e ErrorReportingSystemCategoryTypeForSupportUnits) PLC4XEnumName() string func (e ErrorReportingSystemCategoryTypeForSupportUnits) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeInputUnits.go b/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeInputUnits.go index ee21e827477..fa4db5d171d 100644 --- a/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeInputUnits.go +++ b/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeInputUnits.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ErrorReportingSystemCategoryTypeInputUnits is the corresponding interface of ErrorReportingSystemCategoryTypeInputUnits type ErrorReportingSystemCategoryTypeInputUnits interface { @@ -46,30 +48,29 @@ type ErrorReportingSystemCategoryTypeInputUnitsExactly interface { // _ErrorReportingSystemCategoryTypeInputUnits is the data-structure of this message type _ErrorReportingSystemCategoryTypeInputUnits struct { *_ErrorReportingSystemCategoryType - CategoryForType ErrorReportingSystemCategoryTypeForInputUnits + CategoryForType ErrorReportingSystemCategoryTypeForInputUnits } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ErrorReportingSystemCategoryTypeInputUnits) GetErrorReportingSystemCategoryClass() ErrorReportingSystemCategoryClass { - return ErrorReportingSystemCategoryClass_INPUT_UNITS -} +func (m *_ErrorReportingSystemCategoryTypeInputUnits) GetErrorReportingSystemCategoryClass() ErrorReportingSystemCategoryClass { +return ErrorReportingSystemCategoryClass_INPUT_UNITS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ErrorReportingSystemCategoryTypeInputUnits) InitializeParent(parent ErrorReportingSystemCategoryType) { -} +func (m *_ErrorReportingSystemCategoryTypeInputUnits) InitializeParent(parent ErrorReportingSystemCategoryType ) {} -func (m *_ErrorReportingSystemCategoryTypeInputUnits) GetParent() ErrorReportingSystemCategoryType { +func (m *_ErrorReportingSystemCategoryTypeInputUnits) GetParent() ErrorReportingSystemCategoryType { return m._ErrorReportingSystemCategoryType } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -84,11 +85,12 @@ func (m *_ErrorReportingSystemCategoryTypeInputUnits) GetCategoryForType() Error /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewErrorReportingSystemCategoryTypeInputUnits factory function for _ErrorReportingSystemCategoryTypeInputUnits -func NewErrorReportingSystemCategoryTypeInputUnits(categoryForType ErrorReportingSystemCategoryTypeForInputUnits) *_ErrorReportingSystemCategoryTypeInputUnits { +func NewErrorReportingSystemCategoryTypeInputUnits( categoryForType ErrorReportingSystemCategoryTypeForInputUnits ) *_ErrorReportingSystemCategoryTypeInputUnits { _result := &_ErrorReportingSystemCategoryTypeInputUnits{ - CategoryForType: categoryForType, - _ErrorReportingSystemCategoryType: NewErrorReportingSystemCategoryType(), + CategoryForType: categoryForType, + _ErrorReportingSystemCategoryType: NewErrorReportingSystemCategoryType(), } _result._ErrorReportingSystemCategoryType._ErrorReportingSystemCategoryTypeChildRequirements = _result return _result @@ -96,7 +98,7 @@ func NewErrorReportingSystemCategoryTypeInputUnits(categoryForType ErrorReportin // Deprecated: use the interface for direct cast func CastErrorReportingSystemCategoryTypeInputUnits(structType interface{}) ErrorReportingSystemCategoryTypeInputUnits { - if casted, ok := structType.(ErrorReportingSystemCategoryTypeInputUnits); ok { + if casted, ok := structType.(ErrorReportingSystemCategoryTypeInputUnits); ok { return casted } if casted, ok := structType.(*ErrorReportingSystemCategoryTypeInputUnits); ok { @@ -118,6 +120,7 @@ func (m *_ErrorReportingSystemCategoryTypeInputUnits) GetLengthInBits(ctx contex return lengthInBits } + func (m *_ErrorReportingSystemCategoryTypeInputUnits) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +142,7 @@ func ErrorReportingSystemCategoryTypeInputUnitsParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("categoryForType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for categoryForType") } - _categoryForType, _categoryForTypeErr := ErrorReportingSystemCategoryTypeForInputUnitsParseWithBuffer(ctx, readBuffer) +_categoryForType, _categoryForTypeErr := ErrorReportingSystemCategoryTypeForInputUnitsParseWithBuffer(ctx, readBuffer) if _categoryForTypeErr != nil { return nil, errors.Wrap(_categoryForTypeErr, "Error parsing 'categoryForType' field of ErrorReportingSystemCategoryTypeInputUnits") } @@ -154,8 +157,9 @@ func ErrorReportingSystemCategoryTypeInputUnitsParseWithBuffer(ctx context.Conte // Create a partially initialized instance _child := &_ErrorReportingSystemCategoryTypeInputUnits{ - _ErrorReportingSystemCategoryType: &_ErrorReportingSystemCategoryType{}, - CategoryForType: categoryForType, + _ErrorReportingSystemCategoryType: &_ErrorReportingSystemCategoryType{ + }, + CategoryForType: categoryForType, } _child._ErrorReportingSystemCategoryType._ErrorReportingSystemCategoryTypeChildRequirements = _child return _child, nil @@ -177,17 +181,17 @@ func (m *_ErrorReportingSystemCategoryTypeInputUnits) SerializeWithWriteBuffer(c return errors.Wrap(pushErr, "Error pushing for ErrorReportingSystemCategoryTypeInputUnits") } - // Simple Field (categoryForType) - if pushErr := writeBuffer.PushContext("categoryForType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for categoryForType") - } - _categoryForTypeErr := writeBuffer.WriteSerializable(ctx, m.GetCategoryForType()) - if popErr := writeBuffer.PopContext("categoryForType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for categoryForType") - } - if _categoryForTypeErr != nil { - return errors.Wrap(_categoryForTypeErr, "Error serializing 'categoryForType' field") - } + // Simple Field (categoryForType) + if pushErr := writeBuffer.PushContext("categoryForType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for categoryForType") + } + _categoryForTypeErr := writeBuffer.WriteSerializable(ctx, m.GetCategoryForType()) + if popErr := writeBuffer.PopContext("categoryForType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for categoryForType") + } + if _categoryForTypeErr != nil { + return errors.Wrap(_categoryForTypeErr, "Error serializing 'categoryForType' field") + } if popErr := writeBuffer.PopContext("ErrorReportingSystemCategoryTypeInputUnits"); popErr != nil { return errors.Wrap(popErr, "Error popping for ErrorReportingSystemCategoryTypeInputUnits") @@ -197,6 +201,7 @@ func (m *_ErrorReportingSystemCategoryTypeInputUnits) SerializeWithWriteBuffer(c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ErrorReportingSystemCategoryTypeInputUnits) isErrorReportingSystemCategoryTypeInputUnits() bool { return true } @@ -211,3 +216,6 @@ func (m *_ErrorReportingSystemCategoryTypeInputUnits) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeOutputUnits.go b/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeOutputUnits.go index 6a6bd27335b..650c4ce3485 100644 --- a/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeOutputUnits.go +++ b/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeOutputUnits.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ErrorReportingSystemCategoryTypeOutputUnits is the corresponding interface of ErrorReportingSystemCategoryTypeOutputUnits type ErrorReportingSystemCategoryTypeOutputUnits interface { @@ -46,30 +48,29 @@ type ErrorReportingSystemCategoryTypeOutputUnitsExactly interface { // _ErrorReportingSystemCategoryTypeOutputUnits is the data-structure of this message type _ErrorReportingSystemCategoryTypeOutputUnits struct { *_ErrorReportingSystemCategoryType - CategoryForType ErrorReportingSystemCategoryTypeForOutputUnits + CategoryForType ErrorReportingSystemCategoryTypeForOutputUnits } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ErrorReportingSystemCategoryTypeOutputUnits) GetErrorReportingSystemCategoryClass() ErrorReportingSystemCategoryClass { - return ErrorReportingSystemCategoryClass_OUTPUT_UNITS -} +func (m *_ErrorReportingSystemCategoryTypeOutputUnits) GetErrorReportingSystemCategoryClass() ErrorReportingSystemCategoryClass { +return ErrorReportingSystemCategoryClass_OUTPUT_UNITS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ErrorReportingSystemCategoryTypeOutputUnits) InitializeParent(parent ErrorReportingSystemCategoryType) { -} +func (m *_ErrorReportingSystemCategoryTypeOutputUnits) InitializeParent(parent ErrorReportingSystemCategoryType ) {} -func (m *_ErrorReportingSystemCategoryTypeOutputUnits) GetParent() ErrorReportingSystemCategoryType { +func (m *_ErrorReportingSystemCategoryTypeOutputUnits) GetParent() ErrorReportingSystemCategoryType { return m._ErrorReportingSystemCategoryType } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -84,11 +85,12 @@ func (m *_ErrorReportingSystemCategoryTypeOutputUnits) GetCategoryForType() Erro /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewErrorReportingSystemCategoryTypeOutputUnits factory function for _ErrorReportingSystemCategoryTypeOutputUnits -func NewErrorReportingSystemCategoryTypeOutputUnits(categoryForType ErrorReportingSystemCategoryTypeForOutputUnits) *_ErrorReportingSystemCategoryTypeOutputUnits { +func NewErrorReportingSystemCategoryTypeOutputUnits( categoryForType ErrorReportingSystemCategoryTypeForOutputUnits ) *_ErrorReportingSystemCategoryTypeOutputUnits { _result := &_ErrorReportingSystemCategoryTypeOutputUnits{ - CategoryForType: categoryForType, - _ErrorReportingSystemCategoryType: NewErrorReportingSystemCategoryType(), + CategoryForType: categoryForType, + _ErrorReportingSystemCategoryType: NewErrorReportingSystemCategoryType(), } _result._ErrorReportingSystemCategoryType._ErrorReportingSystemCategoryTypeChildRequirements = _result return _result @@ -96,7 +98,7 @@ func NewErrorReportingSystemCategoryTypeOutputUnits(categoryForType ErrorReporti // Deprecated: use the interface for direct cast func CastErrorReportingSystemCategoryTypeOutputUnits(structType interface{}) ErrorReportingSystemCategoryTypeOutputUnits { - if casted, ok := structType.(ErrorReportingSystemCategoryTypeOutputUnits); ok { + if casted, ok := structType.(ErrorReportingSystemCategoryTypeOutputUnits); ok { return casted } if casted, ok := structType.(*ErrorReportingSystemCategoryTypeOutputUnits); ok { @@ -118,6 +120,7 @@ func (m *_ErrorReportingSystemCategoryTypeOutputUnits) GetLengthInBits(ctx conte return lengthInBits } + func (m *_ErrorReportingSystemCategoryTypeOutputUnits) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +142,7 @@ func ErrorReportingSystemCategoryTypeOutputUnitsParseWithBuffer(ctx context.Cont if pullErr := readBuffer.PullContext("categoryForType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for categoryForType") } - _categoryForType, _categoryForTypeErr := ErrorReportingSystemCategoryTypeForOutputUnitsParseWithBuffer(ctx, readBuffer) +_categoryForType, _categoryForTypeErr := ErrorReportingSystemCategoryTypeForOutputUnitsParseWithBuffer(ctx, readBuffer) if _categoryForTypeErr != nil { return nil, errors.Wrap(_categoryForTypeErr, "Error parsing 'categoryForType' field of ErrorReportingSystemCategoryTypeOutputUnits") } @@ -154,8 +157,9 @@ func ErrorReportingSystemCategoryTypeOutputUnitsParseWithBuffer(ctx context.Cont // Create a partially initialized instance _child := &_ErrorReportingSystemCategoryTypeOutputUnits{ - _ErrorReportingSystemCategoryType: &_ErrorReportingSystemCategoryType{}, - CategoryForType: categoryForType, + _ErrorReportingSystemCategoryType: &_ErrorReportingSystemCategoryType{ + }, + CategoryForType: categoryForType, } _child._ErrorReportingSystemCategoryType._ErrorReportingSystemCategoryTypeChildRequirements = _child return _child, nil @@ -177,17 +181,17 @@ func (m *_ErrorReportingSystemCategoryTypeOutputUnits) SerializeWithWriteBuffer( return errors.Wrap(pushErr, "Error pushing for ErrorReportingSystemCategoryTypeOutputUnits") } - // Simple Field (categoryForType) - if pushErr := writeBuffer.PushContext("categoryForType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for categoryForType") - } - _categoryForTypeErr := writeBuffer.WriteSerializable(ctx, m.GetCategoryForType()) - if popErr := writeBuffer.PopContext("categoryForType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for categoryForType") - } - if _categoryForTypeErr != nil { - return errors.Wrap(_categoryForTypeErr, "Error serializing 'categoryForType' field") - } + // Simple Field (categoryForType) + if pushErr := writeBuffer.PushContext("categoryForType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for categoryForType") + } + _categoryForTypeErr := writeBuffer.WriteSerializable(ctx, m.GetCategoryForType()) + if popErr := writeBuffer.PopContext("categoryForType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for categoryForType") + } + if _categoryForTypeErr != nil { + return errors.Wrap(_categoryForTypeErr, "Error serializing 'categoryForType' field") + } if popErr := writeBuffer.PopContext("ErrorReportingSystemCategoryTypeOutputUnits"); popErr != nil { return errors.Wrap(popErr, "Error popping for ErrorReportingSystemCategoryTypeOutputUnits") @@ -197,6 +201,7 @@ func (m *_ErrorReportingSystemCategoryTypeOutputUnits) SerializeWithWriteBuffer( return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ErrorReportingSystemCategoryTypeOutputUnits) isErrorReportingSystemCategoryTypeOutputUnits() bool { return true } @@ -211,3 +216,6 @@ func (m *_ErrorReportingSystemCategoryTypeOutputUnits) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeReserved.go b/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeReserved.go index a5a97ff0a2c..f0a728927f1 100644 --- a/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeReserved.go +++ b/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeReserved.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ErrorReportingSystemCategoryTypeReserved is the corresponding interface of ErrorReportingSystemCategoryTypeReserved type ErrorReportingSystemCategoryTypeReserved interface { @@ -46,30 +48,29 @@ type ErrorReportingSystemCategoryTypeReservedExactly interface { // _ErrorReportingSystemCategoryTypeReserved is the data-structure of this message type _ErrorReportingSystemCategoryTypeReserved struct { *_ErrorReportingSystemCategoryType - ReservedValue uint8 + ReservedValue uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ErrorReportingSystemCategoryTypeReserved) GetErrorReportingSystemCategoryClass() ErrorReportingSystemCategoryClass { - return 0 -} +func (m *_ErrorReportingSystemCategoryTypeReserved) GetErrorReportingSystemCategoryClass() ErrorReportingSystemCategoryClass { +return 0} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ErrorReportingSystemCategoryTypeReserved) InitializeParent(parent ErrorReportingSystemCategoryType) { -} +func (m *_ErrorReportingSystemCategoryTypeReserved) InitializeParent(parent ErrorReportingSystemCategoryType ) {} -func (m *_ErrorReportingSystemCategoryTypeReserved) GetParent() ErrorReportingSystemCategoryType { +func (m *_ErrorReportingSystemCategoryTypeReserved) GetParent() ErrorReportingSystemCategoryType { return m._ErrorReportingSystemCategoryType } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -84,11 +85,12 @@ func (m *_ErrorReportingSystemCategoryTypeReserved) GetReservedValue() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewErrorReportingSystemCategoryTypeReserved factory function for _ErrorReportingSystemCategoryTypeReserved -func NewErrorReportingSystemCategoryTypeReserved(reservedValue uint8) *_ErrorReportingSystemCategoryTypeReserved { +func NewErrorReportingSystemCategoryTypeReserved( reservedValue uint8 ) *_ErrorReportingSystemCategoryTypeReserved { _result := &_ErrorReportingSystemCategoryTypeReserved{ - ReservedValue: reservedValue, - _ErrorReportingSystemCategoryType: NewErrorReportingSystemCategoryType(), + ReservedValue: reservedValue, + _ErrorReportingSystemCategoryType: NewErrorReportingSystemCategoryType(), } _result._ErrorReportingSystemCategoryType._ErrorReportingSystemCategoryTypeChildRequirements = _result return _result @@ -96,7 +98,7 @@ func NewErrorReportingSystemCategoryTypeReserved(reservedValue uint8) *_ErrorRep // Deprecated: use the interface for direct cast func CastErrorReportingSystemCategoryTypeReserved(structType interface{}) ErrorReportingSystemCategoryTypeReserved { - if casted, ok := structType.(ErrorReportingSystemCategoryTypeReserved); ok { + if casted, ok := structType.(ErrorReportingSystemCategoryTypeReserved); ok { return casted } if casted, ok := structType.(*ErrorReportingSystemCategoryTypeReserved); ok { @@ -113,11 +115,12 @@ func (m *_ErrorReportingSystemCategoryTypeReserved) GetLengthInBits(ctx context. lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (reservedValue) - lengthInBits += 4 + lengthInBits += 4; return lengthInBits } + func (m *_ErrorReportingSystemCategoryTypeReserved) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +139,7 @@ func ErrorReportingSystemCategoryTypeReservedParseWithBuffer(ctx context.Context _ = currentPos // Simple Field (reservedValue) - _reservedValue, _reservedValueErr := readBuffer.ReadUint8("reservedValue", 4) +_reservedValue, _reservedValueErr := readBuffer.ReadUint8("reservedValue", 4) if _reservedValueErr != nil { return nil, errors.Wrap(_reservedValueErr, "Error parsing 'reservedValue' field of ErrorReportingSystemCategoryTypeReserved") } @@ -148,8 +151,9 @@ func ErrorReportingSystemCategoryTypeReservedParseWithBuffer(ctx context.Context // Create a partially initialized instance _child := &_ErrorReportingSystemCategoryTypeReserved{ - _ErrorReportingSystemCategoryType: &_ErrorReportingSystemCategoryType{}, - ReservedValue: reservedValue, + _ErrorReportingSystemCategoryType: &_ErrorReportingSystemCategoryType{ + }, + ReservedValue: reservedValue, } _child._ErrorReportingSystemCategoryType._ErrorReportingSystemCategoryTypeChildRequirements = _child return _child, nil @@ -171,12 +175,12 @@ func (m *_ErrorReportingSystemCategoryTypeReserved) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for ErrorReportingSystemCategoryTypeReserved") } - // Simple Field (reservedValue) - reservedValue := uint8(m.GetReservedValue()) - _reservedValueErr := writeBuffer.WriteUint8("reservedValue", 4, (reservedValue)) - if _reservedValueErr != nil { - return errors.Wrap(_reservedValueErr, "Error serializing 'reservedValue' field") - } + // Simple Field (reservedValue) + reservedValue := uint8(m.GetReservedValue()) + _reservedValueErr := writeBuffer.WriteUint8("reservedValue", 4, (reservedValue)) + if _reservedValueErr != nil { + return errors.Wrap(_reservedValueErr, "Error serializing 'reservedValue' field") + } if popErr := writeBuffer.PopContext("ErrorReportingSystemCategoryTypeReserved"); popErr != nil { return errors.Wrap(popErr, "Error popping for ErrorReportingSystemCategoryTypeReserved") @@ -186,6 +190,7 @@ func (m *_ErrorReportingSystemCategoryTypeReserved) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ErrorReportingSystemCategoryTypeReserved) isErrorReportingSystemCategoryTypeReserved() bool { return true } @@ -200,3 +205,6 @@ func (m *_ErrorReportingSystemCategoryTypeReserved) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeSupportUnits.go b/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeSupportUnits.go index 1617b58d8dd..056ba86040a 100644 --- a/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeSupportUnits.go +++ b/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryTypeSupportUnits.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ErrorReportingSystemCategoryTypeSupportUnits is the corresponding interface of ErrorReportingSystemCategoryTypeSupportUnits type ErrorReportingSystemCategoryTypeSupportUnits interface { @@ -46,30 +48,29 @@ type ErrorReportingSystemCategoryTypeSupportUnitsExactly interface { // _ErrorReportingSystemCategoryTypeSupportUnits is the data-structure of this message type _ErrorReportingSystemCategoryTypeSupportUnits struct { *_ErrorReportingSystemCategoryType - CategoryForType ErrorReportingSystemCategoryTypeForSupportUnits + CategoryForType ErrorReportingSystemCategoryTypeForSupportUnits } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ErrorReportingSystemCategoryTypeSupportUnits) GetErrorReportingSystemCategoryClass() ErrorReportingSystemCategoryClass { - return ErrorReportingSystemCategoryClass_SUPPORT_UNITS -} +func (m *_ErrorReportingSystemCategoryTypeSupportUnits) GetErrorReportingSystemCategoryClass() ErrorReportingSystemCategoryClass { +return ErrorReportingSystemCategoryClass_SUPPORT_UNITS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ErrorReportingSystemCategoryTypeSupportUnits) InitializeParent(parent ErrorReportingSystemCategoryType) { -} +func (m *_ErrorReportingSystemCategoryTypeSupportUnits) InitializeParent(parent ErrorReportingSystemCategoryType ) {} -func (m *_ErrorReportingSystemCategoryTypeSupportUnits) GetParent() ErrorReportingSystemCategoryType { +func (m *_ErrorReportingSystemCategoryTypeSupportUnits) GetParent() ErrorReportingSystemCategoryType { return m._ErrorReportingSystemCategoryType } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -84,11 +85,12 @@ func (m *_ErrorReportingSystemCategoryTypeSupportUnits) GetCategoryForType() Err /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewErrorReportingSystemCategoryTypeSupportUnits factory function for _ErrorReportingSystemCategoryTypeSupportUnits -func NewErrorReportingSystemCategoryTypeSupportUnits(categoryForType ErrorReportingSystemCategoryTypeForSupportUnits) *_ErrorReportingSystemCategoryTypeSupportUnits { +func NewErrorReportingSystemCategoryTypeSupportUnits( categoryForType ErrorReportingSystemCategoryTypeForSupportUnits ) *_ErrorReportingSystemCategoryTypeSupportUnits { _result := &_ErrorReportingSystemCategoryTypeSupportUnits{ - CategoryForType: categoryForType, - _ErrorReportingSystemCategoryType: NewErrorReportingSystemCategoryType(), + CategoryForType: categoryForType, + _ErrorReportingSystemCategoryType: NewErrorReportingSystemCategoryType(), } _result._ErrorReportingSystemCategoryType._ErrorReportingSystemCategoryTypeChildRequirements = _result return _result @@ -96,7 +98,7 @@ func NewErrorReportingSystemCategoryTypeSupportUnits(categoryForType ErrorReport // Deprecated: use the interface for direct cast func CastErrorReportingSystemCategoryTypeSupportUnits(structType interface{}) ErrorReportingSystemCategoryTypeSupportUnits { - if casted, ok := structType.(ErrorReportingSystemCategoryTypeSupportUnits); ok { + if casted, ok := structType.(ErrorReportingSystemCategoryTypeSupportUnits); ok { return casted } if casted, ok := structType.(*ErrorReportingSystemCategoryTypeSupportUnits); ok { @@ -118,6 +120,7 @@ func (m *_ErrorReportingSystemCategoryTypeSupportUnits) GetLengthInBits(ctx cont return lengthInBits } + func (m *_ErrorReportingSystemCategoryTypeSupportUnits) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +142,7 @@ func ErrorReportingSystemCategoryTypeSupportUnitsParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("categoryForType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for categoryForType") } - _categoryForType, _categoryForTypeErr := ErrorReportingSystemCategoryTypeForSupportUnitsParseWithBuffer(ctx, readBuffer) +_categoryForType, _categoryForTypeErr := ErrorReportingSystemCategoryTypeForSupportUnitsParseWithBuffer(ctx, readBuffer) if _categoryForTypeErr != nil { return nil, errors.Wrap(_categoryForTypeErr, "Error parsing 'categoryForType' field of ErrorReportingSystemCategoryTypeSupportUnits") } @@ -154,8 +157,9 @@ func ErrorReportingSystemCategoryTypeSupportUnitsParseWithBuffer(ctx context.Con // Create a partially initialized instance _child := &_ErrorReportingSystemCategoryTypeSupportUnits{ - _ErrorReportingSystemCategoryType: &_ErrorReportingSystemCategoryType{}, - CategoryForType: categoryForType, + _ErrorReportingSystemCategoryType: &_ErrorReportingSystemCategoryType{ + }, + CategoryForType: categoryForType, } _child._ErrorReportingSystemCategoryType._ErrorReportingSystemCategoryTypeChildRequirements = _child return _child, nil @@ -177,17 +181,17 @@ func (m *_ErrorReportingSystemCategoryTypeSupportUnits) SerializeWithWriteBuffer return errors.Wrap(pushErr, "Error pushing for ErrorReportingSystemCategoryTypeSupportUnits") } - // Simple Field (categoryForType) - if pushErr := writeBuffer.PushContext("categoryForType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for categoryForType") - } - _categoryForTypeErr := writeBuffer.WriteSerializable(ctx, m.GetCategoryForType()) - if popErr := writeBuffer.PopContext("categoryForType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for categoryForType") - } - if _categoryForTypeErr != nil { - return errors.Wrap(_categoryForTypeErr, "Error serializing 'categoryForType' field") - } + // Simple Field (categoryForType) + if pushErr := writeBuffer.PushContext("categoryForType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for categoryForType") + } + _categoryForTypeErr := writeBuffer.WriteSerializable(ctx, m.GetCategoryForType()) + if popErr := writeBuffer.PopContext("categoryForType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for categoryForType") + } + if _categoryForTypeErr != nil { + return errors.Wrap(_categoryForTypeErr, "Error serializing 'categoryForType' field") + } if popErr := writeBuffer.PopContext("ErrorReportingSystemCategoryTypeSupportUnits"); popErr != nil { return errors.Wrap(popErr, "Error popping for ErrorReportingSystemCategoryTypeSupportUnits") @@ -197,6 +201,7 @@ func (m *_ErrorReportingSystemCategoryTypeSupportUnits) SerializeWithWriteBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ErrorReportingSystemCategoryTypeSupportUnits) isErrorReportingSystemCategoryTypeSupportUnits() bool { return true } @@ -211,3 +216,6 @@ func (m *_ErrorReportingSystemCategoryTypeSupportUnits) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryVariant.go b/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryVariant.go index a997ad2f682..49ded8d3be0 100644 --- a/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryVariant.go +++ b/plc4go/protocols/cbus/readwrite/model/ErrorReportingSystemCategoryVariant.go @@ -34,7 +34,7 @@ type IErrorReportingSystemCategoryVariant interface { utils.Serializable } -const ( +const( ErrorReportingSystemCategoryVariant_RESERVED_0 ErrorReportingSystemCategoryVariant = 0x0 ErrorReportingSystemCategoryVariant_RESERVED_1 ErrorReportingSystemCategoryVariant = 0x1 ErrorReportingSystemCategoryVariant_RESERVED_2 ErrorReportingSystemCategoryVariant = 0x2 @@ -45,7 +45,7 @@ var ErrorReportingSystemCategoryVariantValues []ErrorReportingSystemCategoryVari func init() { _ = errors.New - ErrorReportingSystemCategoryVariantValues = []ErrorReportingSystemCategoryVariant{ + ErrorReportingSystemCategoryVariantValues = []ErrorReportingSystemCategoryVariant { ErrorReportingSystemCategoryVariant_RESERVED_0, ErrorReportingSystemCategoryVariant_RESERVED_1, ErrorReportingSystemCategoryVariant_RESERVED_2, @@ -55,14 +55,14 @@ func init() { func ErrorReportingSystemCategoryVariantByValue(value uint8) (enum ErrorReportingSystemCategoryVariant, ok bool) { switch value { - case 0x0: - return ErrorReportingSystemCategoryVariant_RESERVED_0, true - case 0x1: - return ErrorReportingSystemCategoryVariant_RESERVED_1, true - case 0x2: - return ErrorReportingSystemCategoryVariant_RESERVED_2, true - case 0x3: - return ErrorReportingSystemCategoryVariant_RESERVED_3, true + case 0x0: + return ErrorReportingSystemCategoryVariant_RESERVED_0, true + case 0x1: + return ErrorReportingSystemCategoryVariant_RESERVED_1, true + case 0x2: + return ErrorReportingSystemCategoryVariant_RESERVED_2, true + case 0x3: + return ErrorReportingSystemCategoryVariant_RESERVED_3, true } return 0, false } @@ -81,13 +81,13 @@ func ErrorReportingSystemCategoryVariantByName(value string) (enum ErrorReportin return 0, false } -func ErrorReportingSystemCategoryVariantKnows(value uint8) bool { +func ErrorReportingSystemCategoryVariantKnows(value uint8) bool { for _, typeValue := range ErrorReportingSystemCategoryVariantValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastErrorReportingSystemCategoryVariant(structType interface{}) ErrorReportingSystemCategoryVariant { @@ -155,3 +155,4 @@ func (e ErrorReportingSystemCategoryVariant) PLC4XEnumName() string { func (e ErrorReportingSystemCategoryVariant) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/GAVState.go b/plc4go/protocols/cbus/readwrite/model/GAVState.go index 3e38798f538..fd92b643688 100644 --- a/plc4go/protocols/cbus/readwrite/model/GAVState.go +++ b/plc4go/protocols/cbus/readwrite/model/GAVState.go @@ -34,18 +34,18 @@ type IGAVState interface { utils.Serializable } -const ( +const( GAVState_DOES_NOT_EXIST GAVState = 0 - GAVState_ON GAVState = 1 - GAVState_OFF GAVState = 2 - GAVState_ERROR GAVState = 3 + GAVState_ON GAVState = 1 + GAVState_OFF GAVState = 2 + GAVState_ERROR GAVState = 3 ) var GAVStateValues []GAVState func init() { _ = errors.New - GAVStateValues = []GAVState{ + GAVStateValues = []GAVState { GAVState_DOES_NOT_EXIST, GAVState_ON, GAVState_OFF, @@ -55,14 +55,14 @@ func init() { func GAVStateByValue(value uint8) (enum GAVState, ok bool) { switch value { - case 0: - return GAVState_DOES_NOT_EXIST, true - case 1: - return GAVState_ON, true - case 2: - return GAVState_OFF, true - case 3: - return GAVState_ERROR, true + case 0: + return GAVState_DOES_NOT_EXIST, true + case 1: + return GAVState_ON, true + case 2: + return GAVState_OFF, true + case 3: + return GAVState_ERROR, true } return 0, false } @@ -81,13 +81,13 @@ func GAVStateByName(value string) (enum GAVState, ok bool) { return 0, false } -func GAVStateKnows(value uint8) bool { +func GAVStateKnows(value uint8) bool { for _, typeValue := range GAVStateValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastGAVState(structType interface{}) GAVState { @@ -155,3 +155,4 @@ func (e GAVState) PLC4XEnumName() string { func (e GAVState) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/HVACAuxiliaryLevel.go b/plc4go/protocols/cbus/readwrite/model/HVACAuxiliaryLevel.go index a47ecc7ee0b..664924cc0d6 100644 --- a/plc4go/protocols/cbus/readwrite/model/HVACAuxiliaryLevel.go +++ b/plc4go/protocols/cbus/readwrite/model/HVACAuxiliaryLevel.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // HVACAuxiliaryLevel is the corresponding interface of HVACAuxiliaryLevel type HVACAuxiliaryLevel interface { @@ -54,12 +56,13 @@ type HVACAuxiliaryLevelExactly interface { // _HVACAuxiliaryLevel is the data-structure of this message type _HVACAuxiliaryLevel struct { - FanMode bool - Mode uint8 + FanMode bool + Mode uint8 // Reserved Fields reservedField0 *bool } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -111,14 +114,15 @@ func (m *_HVACAuxiliaryLevel) GetSpeedSettings() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewHVACAuxiliaryLevel factory function for _HVACAuxiliaryLevel -func NewHVACAuxiliaryLevel(fanMode bool, mode uint8) *_HVACAuxiliaryLevel { - return &_HVACAuxiliaryLevel{FanMode: fanMode, Mode: mode} +func NewHVACAuxiliaryLevel( fanMode bool , mode uint8 ) *_HVACAuxiliaryLevel { +return &_HVACAuxiliaryLevel{ FanMode: fanMode , Mode: mode } } // Deprecated: use the interface for direct cast func CastHVACAuxiliaryLevel(structType interface{}) HVACAuxiliaryLevel { - if casted, ok := structType.(HVACAuxiliaryLevel); ok { + if casted, ok := structType.(HVACAuxiliaryLevel); ok { return casted } if casted, ok := structType.(*HVACAuxiliaryLevel); ok { @@ -138,14 +142,14 @@ func (m *_HVACAuxiliaryLevel) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += 1 // Simple field (fanMode) - lengthInBits += 1 + lengthInBits += 1; // A virtual field doesn't have any in- or output. // A virtual field doesn't have any in- or output. // Simple field (mode) - lengthInBits += 6 + lengthInBits += 6; // A virtual field doesn't have any in- or output. @@ -154,6 +158,7 @@ func (m *_HVACAuxiliaryLevel) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_HVACAuxiliaryLevel) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -181,7 +186,7 @@ func HVACAuxiliaryLevelParseWithBuffer(ctx context.Context, readBuffer utils.Rea if reserved != bool(false) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -189,7 +194,7 @@ func HVACAuxiliaryLevelParseWithBuffer(ctx context.Context, readBuffer utils.Rea } // Simple Field (fanMode) - _fanMode, _fanModeErr := readBuffer.ReadBit("fanMode") +_fanMode, _fanModeErr := readBuffer.ReadBit("fanMode") if _fanModeErr != nil { return nil, errors.Wrap(_fanModeErr, "Error parsing 'fanMode' field of HVACAuxiliaryLevel") } @@ -206,7 +211,7 @@ func HVACAuxiliaryLevelParseWithBuffer(ctx context.Context, readBuffer utils.Rea _ = isFanModeContinuous // Simple Field (mode) - _mode, _modeErr := readBuffer.ReadUint8("mode", 6) +_mode, _modeErr := readBuffer.ReadUint8("mode", 6) if _modeErr != nil { return nil, errors.Wrap(_modeErr, "Error parsing 'mode' field of HVACAuxiliaryLevel") } @@ -228,10 +233,10 @@ func HVACAuxiliaryLevelParseWithBuffer(ctx context.Context, readBuffer utils.Rea // Create the instance return &_HVACAuxiliaryLevel{ - FanMode: fanMode, - Mode: mode, - reservedField0: reservedField0, - }, nil + FanMode: fanMode, + Mode: mode, + reservedField0: reservedField0, + }, nil } func (m *_HVACAuxiliaryLevel) Serialize() ([]byte, error) { @@ -245,7 +250,7 @@ func (m *_HVACAuxiliaryLevel) Serialize() ([]byte, error) { func (m *_HVACAuxiliaryLevel) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("HVACAuxiliaryLevel"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("HVACAuxiliaryLevel"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for HVACAuxiliaryLevel") } @@ -255,7 +260,7 @@ func (m *_HVACAuxiliaryLevel) SerializeWithWriteBuffer(ctx context.Context, writ if m.reservedField0 != nil { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Overriding reserved field with unexpected value.") reserved = *m.reservedField0 } @@ -301,6 +306,7 @@ func (m *_HVACAuxiliaryLevel) SerializeWithWriteBuffer(ctx context.Context, writ return nil } + func (m *_HVACAuxiliaryLevel) isHVACAuxiliaryLevel() bool { return true } @@ -315,3 +321,6 @@ func (m *_HVACAuxiliaryLevel) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/HVACError.go b/plc4go/protocols/cbus/readwrite/model/HVACError.go index 8bd0e786e0f..1e272610cec 100644 --- a/plc4go/protocols/cbus/readwrite/model/HVACError.go +++ b/plc4go/protocols/cbus/readwrite/model/HVACError.go @@ -34,154 +34,154 @@ type IHVACError interface { utils.Serializable } -const ( - HVACError_NO_ERROR HVACError = 0x00 - HVACError_HEATER_TOTAL_FAILURE HVACError = 0x01 - HVACError_COOLER_TOTAL_FAILURE HVACError = 0x02 - HVACError_FAN_TOTAL_FAILURE HVACError = 0x03 - HVACError_TEMPERATURE_SENSOR_FAILURE HVACError = 0x04 - HVACError_HEATER_TEMPORARY_PROBLEM HVACError = 0x05 - HVACError_COOLER_TEMPORARY_PROBLEM HVACError = 0x06 - HVACError_FAN_TEMPORARY_PROBLEM HVACError = 0x07 - HVACError_HEATER_SERVICE_REQUIRED HVACError = 0x08 - HVACError_COOLER_SERVICE_REQUIRED HVACError = 0x09 - HVACError_FAN_SERVICE_REQUIRED HVACError = 0x0A +const( + HVACError_NO_ERROR HVACError = 0x00 + HVACError_HEATER_TOTAL_FAILURE HVACError = 0x01 + HVACError_COOLER_TOTAL_FAILURE HVACError = 0x02 + HVACError_FAN_TOTAL_FAILURE HVACError = 0x03 + HVACError_TEMPERATURE_SENSOR_FAILURE HVACError = 0x04 + HVACError_HEATER_TEMPORARY_PROBLEM HVACError = 0x05 + HVACError_COOLER_TEMPORARY_PROBLEM HVACError = 0x06 + HVACError_FAN_TEMPORARY_PROBLEM HVACError = 0x07 + HVACError_HEATER_SERVICE_REQUIRED HVACError = 0x08 + HVACError_COOLER_SERVICE_REQUIRED HVACError = 0x09 + HVACError_FAN_SERVICE_REQUIRED HVACError = 0x0A HVACError_FILTER_REPLACEMENT_REQUIRED HVACError = 0x0B - HVACError_CUSTOM_ERROR_0 HVACError = 0x80 - HVACError_CUSTOM_ERROR_1 HVACError = 0x81 - HVACError_CUSTOM_ERROR_2 HVACError = 0x82 - HVACError_CUSTOM_ERROR_3 HVACError = 0x83 - HVACError_CUSTOM_ERROR_4 HVACError = 0x84 - HVACError_CUSTOM_ERROR_5 HVACError = 0x85 - HVACError_CUSTOM_ERROR_6 HVACError = 0x86 - HVACError_CUSTOM_ERROR_7 HVACError = 0x87 - HVACError_CUSTOM_ERROR_8 HVACError = 0x88 - HVACError_CUSTOM_ERROR_9 HVACError = 0x89 - HVACError_CUSTOM_ERROR_10 HVACError = 0x8A - HVACError_CUSTOM_ERROR_11 HVACError = 0x8B - HVACError_CUSTOM_ERROR_12 HVACError = 0x8C - HVACError_CUSTOM_ERROR_13 HVACError = 0x8D - HVACError_CUSTOM_ERROR_14 HVACError = 0x8E - HVACError_CUSTOM_ERROR_15 HVACError = 0x8F - HVACError_CUSTOM_ERROR_16 HVACError = 0x90 - HVACError_CUSTOM_ERROR_17 HVACError = 0x91 - HVACError_CUSTOM_ERROR_18 HVACError = 0x92 - HVACError_CUSTOM_ERROR_19 HVACError = 0x93 - HVACError_CUSTOM_ERROR_20 HVACError = 0x94 - HVACError_CUSTOM_ERROR_21 HVACError = 0x95 - HVACError_CUSTOM_ERROR_22 HVACError = 0x96 - HVACError_CUSTOM_ERROR_23 HVACError = 0x97 - HVACError_CUSTOM_ERROR_24 HVACError = 0x98 - HVACError_CUSTOM_ERROR_25 HVACError = 0x99 - HVACError_CUSTOM_ERROR_26 HVACError = 0x9A - HVACError_CUSTOM_ERROR_27 HVACError = 0x9B - HVACError_CUSTOM_ERROR_28 HVACError = 0x9C - HVACError_CUSTOM_ERROR_29 HVACError = 0x9D - HVACError_CUSTOM_ERROR_30 HVACError = 0x9E - HVACError_CUSTOM_ERROR_31 HVACError = 0x9F - HVACError_CUSTOM_ERROR_32 HVACError = 0xA0 - HVACError_CUSTOM_ERROR_33 HVACError = 0xA1 - HVACError_CUSTOM_ERROR_34 HVACError = 0xA2 - HVACError_CUSTOM_ERROR_35 HVACError = 0xA3 - HVACError_CUSTOM_ERROR_36 HVACError = 0xA4 - HVACError_CUSTOM_ERROR_37 HVACError = 0xA5 - HVACError_CUSTOM_ERROR_38 HVACError = 0xA6 - HVACError_CUSTOM_ERROR_39 HVACError = 0xA7 - HVACError_CUSTOM_ERROR_40 HVACError = 0xA8 - HVACError_CUSTOM_ERROR_41 HVACError = 0xA9 - HVACError_CUSTOM_ERROR_42 HVACError = 0xAA - HVACError_CUSTOM_ERROR_43 HVACError = 0xAB - HVACError_CUSTOM_ERROR_44 HVACError = 0xAC - HVACError_CUSTOM_ERROR_45 HVACError = 0xAD - HVACError_CUSTOM_ERROR_46 HVACError = 0xAE - HVACError_CUSTOM_ERROR_47 HVACError = 0xAF - HVACError_CUSTOM_ERROR_48 HVACError = 0xB0 - HVACError_CUSTOM_ERROR_49 HVACError = 0xB1 - HVACError_CUSTOM_ERROR_50 HVACError = 0xB2 - HVACError_CUSTOM_ERROR_51 HVACError = 0xB3 - HVACError_CUSTOM_ERROR_52 HVACError = 0xB4 - HVACError_CUSTOM_ERROR_53 HVACError = 0xB5 - HVACError_CUSTOM_ERROR_54 HVACError = 0xB6 - HVACError_CUSTOM_ERROR_55 HVACError = 0xB7 - HVACError_CUSTOM_ERROR_56 HVACError = 0xB8 - HVACError_CUSTOM_ERROR_57 HVACError = 0xB9 - HVACError_CUSTOM_ERROR_58 HVACError = 0xBA - HVACError_CUSTOM_ERROR_59 HVACError = 0xBB - HVACError_CUSTOM_ERROR_60 HVACError = 0xBC - HVACError_CUSTOM_ERROR_61 HVACError = 0xBD - HVACError_CUSTOM_ERROR_62 HVACError = 0xBE - HVACError_CUSTOM_ERROR_63 HVACError = 0xBF - HVACError_CUSTOM_ERROR_64 HVACError = 0xC0 - HVACError_CUSTOM_ERROR_65 HVACError = 0xC1 - HVACError_CUSTOM_ERROR_66 HVACError = 0xC2 - HVACError_CUSTOM_ERROR_67 HVACError = 0xC3 - HVACError_CUSTOM_ERROR_68 HVACError = 0xC4 - HVACError_CUSTOM_ERROR_69 HVACError = 0xC5 - HVACError_CUSTOM_ERROR_70 HVACError = 0xC6 - HVACError_CUSTOM_ERROR_71 HVACError = 0xC7 - HVACError_CUSTOM_ERROR_72 HVACError = 0xC8 - HVACError_CUSTOM_ERROR_73 HVACError = 0xC9 - HVACError_CUSTOM_ERROR_74 HVACError = 0xCA - HVACError_CUSTOM_ERROR_75 HVACError = 0xCB - HVACError_CUSTOM_ERROR_76 HVACError = 0xCC - HVACError_CUSTOM_ERROR_77 HVACError = 0xCD - HVACError_CUSTOM_ERROR_78 HVACError = 0xCE - HVACError_CUSTOM_ERROR_79 HVACError = 0xCF - HVACError_CUSTOM_ERROR_80 HVACError = 0xD0 - HVACError_CUSTOM_ERROR_81 HVACError = 0xD1 - HVACError_CUSTOM_ERROR_82 HVACError = 0xD2 - HVACError_CUSTOM_ERROR_83 HVACError = 0xD3 - HVACError_CUSTOM_ERROR_84 HVACError = 0xD4 - HVACError_CUSTOM_ERROR_85 HVACError = 0xD5 - HVACError_CUSTOM_ERROR_86 HVACError = 0xD6 - HVACError_CUSTOM_ERROR_87 HVACError = 0xD7 - HVACError_CUSTOM_ERROR_88 HVACError = 0xD8 - HVACError_CUSTOM_ERROR_89 HVACError = 0xD9 - HVACError_CUSTOM_ERROR_90 HVACError = 0xDA - HVACError_CUSTOM_ERROR_91 HVACError = 0xDB - HVACError_CUSTOM_ERROR_92 HVACError = 0xDC - HVACError_CUSTOM_ERROR_93 HVACError = 0xDD - HVACError_CUSTOM_ERROR_94 HVACError = 0xDE - HVACError_CUSTOM_ERROR_95 HVACError = 0xDF - HVACError_CUSTOM_ERROR_96 HVACError = 0xE0 - HVACError_CUSTOM_ERROR_97 HVACError = 0xE1 - HVACError_CUSTOM_ERROR_98 HVACError = 0xE2 - HVACError_CUSTOM_ERROR_99 HVACError = 0xE3 - HVACError_CUSTOM_ERROR_100 HVACError = 0xE4 - HVACError_CUSTOM_ERROR_101 HVACError = 0xE5 - HVACError_CUSTOM_ERROR_102 HVACError = 0xE6 - HVACError_CUSTOM_ERROR_103 HVACError = 0xE7 - HVACError_CUSTOM_ERROR_104 HVACError = 0xE8 - HVACError_CUSTOM_ERROR_105 HVACError = 0xE9 - HVACError_CUSTOM_ERROR_106 HVACError = 0xEA - HVACError_CUSTOM_ERROR_107 HVACError = 0xEB - HVACError_CUSTOM_ERROR_108 HVACError = 0xEC - HVACError_CUSTOM_ERROR_109 HVACError = 0xED - HVACError_CUSTOM_ERROR_110 HVACError = 0xEE - HVACError_CUSTOM_ERROR_111 HVACError = 0xEF - HVACError_CUSTOM_ERROR_112 HVACError = 0xF0 - HVACError_CUSTOM_ERROR_113 HVACError = 0xF1 - HVACError_CUSTOM_ERROR_114 HVACError = 0xF2 - HVACError_CUSTOM_ERROR_115 HVACError = 0xF3 - HVACError_CUSTOM_ERROR_116 HVACError = 0xF4 - HVACError_CUSTOM_ERROR_117 HVACError = 0xF5 - HVACError_CUSTOM_ERROR_118 HVACError = 0xF6 - HVACError_CUSTOM_ERROR_119 HVACError = 0xF7 - HVACError_CUSTOM_ERROR_120 HVACError = 0xF8 - HVACError_CUSTOM_ERROR_121 HVACError = 0xF9 - HVACError_CUSTOM_ERROR_122 HVACError = 0xFA - HVACError_CUSTOM_ERROR_123 HVACError = 0xFB - HVACError_CUSTOM_ERROR_124 HVACError = 0xFC - HVACError_CUSTOM_ERROR_125 HVACError = 0xFD - HVACError_CUSTOM_ERROR_126 HVACError = 0xFE - HVACError_CUSTOM_ERROR_127 HVACError = 0xFF + HVACError_CUSTOM_ERROR_0 HVACError = 0x80 + HVACError_CUSTOM_ERROR_1 HVACError = 0x81 + HVACError_CUSTOM_ERROR_2 HVACError = 0x82 + HVACError_CUSTOM_ERROR_3 HVACError = 0x83 + HVACError_CUSTOM_ERROR_4 HVACError = 0x84 + HVACError_CUSTOM_ERROR_5 HVACError = 0x85 + HVACError_CUSTOM_ERROR_6 HVACError = 0x86 + HVACError_CUSTOM_ERROR_7 HVACError = 0x87 + HVACError_CUSTOM_ERROR_8 HVACError = 0x88 + HVACError_CUSTOM_ERROR_9 HVACError = 0x89 + HVACError_CUSTOM_ERROR_10 HVACError = 0x8A + HVACError_CUSTOM_ERROR_11 HVACError = 0x8B + HVACError_CUSTOM_ERROR_12 HVACError = 0x8C + HVACError_CUSTOM_ERROR_13 HVACError = 0x8D + HVACError_CUSTOM_ERROR_14 HVACError = 0x8E + HVACError_CUSTOM_ERROR_15 HVACError = 0x8F + HVACError_CUSTOM_ERROR_16 HVACError = 0x90 + HVACError_CUSTOM_ERROR_17 HVACError = 0x91 + HVACError_CUSTOM_ERROR_18 HVACError = 0x92 + HVACError_CUSTOM_ERROR_19 HVACError = 0x93 + HVACError_CUSTOM_ERROR_20 HVACError = 0x94 + HVACError_CUSTOM_ERROR_21 HVACError = 0x95 + HVACError_CUSTOM_ERROR_22 HVACError = 0x96 + HVACError_CUSTOM_ERROR_23 HVACError = 0x97 + HVACError_CUSTOM_ERROR_24 HVACError = 0x98 + HVACError_CUSTOM_ERROR_25 HVACError = 0x99 + HVACError_CUSTOM_ERROR_26 HVACError = 0x9A + HVACError_CUSTOM_ERROR_27 HVACError = 0x9B + HVACError_CUSTOM_ERROR_28 HVACError = 0x9C + HVACError_CUSTOM_ERROR_29 HVACError = 0x9D + HVACError_CUSTOM_ERROR_30 HVACError = 0x9E + HVACError_CUSTOM_ERROR_31 HVACError = 0x9F + HVACError_CUSTOM_ERROR_32 HVACError = 0xA0 + HVACError_CUSTOM_ERROR_33 HVACError = 0xA1 + HVACError_CUSTOM_ERROR_34 HVACError = 0xA2 + HVACError_CUSTOM_ERROR_35 HVACError = 0xA3 + HVACError_CUSTOM_ERROR_36 HVACError = 0xA4 + HVACError_CUSTOM_ERROR_37 HVACError = 0xA5 + HVACError_CUSTOM_ERROR_38 HVACError = 0xA6 + HVACError_CUSTOM_ERROR_39 HVACError = 0xA7 + HVACError_CUSTOM_ERROR_40 HVACError = 0xA8 + HVACError_CUSTOM_ERROR_41 HVACError = 0xA9 + HVACError_CUSTOM_ERROR_42 HVACError = 0xAA + HVACError_CUSTOM_ERROR_43 HVACError = 0xAB + HVACError_CUSTOM_ERROR_44 HVACError = 0xAC + HVACError_CUSTOM_ERROR_45 HVACError = 0xAD + HVACError_CUSTOM_ERROR_46 HVACError = 0xAE + HVACError_CUSTOM_ERROR_47 HVACError = 0xAF + HVACError_CUSTOM_ERROR_48 HVACError = 0xB0 + HVACError_CUSTOM_ERROR_49 HVACError = 0xB1 + HVACError_CUSTOM_ERROR_50 HVACError = 0xB2 + HVACError_CUSTOM_ERROR_51 HVACError = 0xB3 + HVACError_CUSTOM_ERROR_52 HVACError = 0xB4 + HVACError_CUSTOM_ERROR_53 HVACError = 0xB5 + HVACError_CUSTOM_ERROR_54 HVACError = 0xB6 + HVACError_CUSTOM_ERROR_55 HVACError = 0xB7 + HVACError_CUSTOM_ERROR_56 HVACError = 0xB8 + HVACError_CUSTOM_ERROR_57 HVACError = 0xB9 + HVACError_CUSTOM_ERROR_58 HVACError = 0xBA + HVACError_CUSTOM_ERROR_59 HVACError = 0xBB + HVACError_CUSTOM_ERROR_60 HVACError = 0xBC + HVACError_CUSTOM_ERROR_61 HVACError = 0xBD + HVACError_CUSTOM_ERROR_62 HVACError = 0xBE + HVACError_CUSTOM_ERROR_63 HVACError = 0xBF + HVACError_CUSTOM_ERROR_64 HVACError = 0xC0 + HVACError_CUSTOM_ERROR_65 HVACError = 0xC1 + HVACError_CUSTOM_ERROR_66 HVACError = 0xC2 + HVACError_CUSTOM_ERROR_67 HVACError = 0xC3 + HVACError_CUSTOM_ERROR_68 HVACError = 0xC4 + HVACError_CUSTOM_ERROR_69 HVACError = 0xC5 + HVACError_CUSTOM_ERROR_70 HVACError = 0xC6 + HVACError_CUSTOM_ERROR_71 HVACError = 0xC7 + HVACError_CUSTOM_ERROR_72 HVACError = 0xC8 + HVACError_CUSTOM_ERROR_73 HVACError = 0xC9 + HVACError_CUSTOM_ERROR_74 HVACError = 0xCA + HVACError_CUSTOM_ERROR_75 HVACError = 0xCB + HVACError_CUSTOM_ERROR_76 HVACError = 0xCC + HVACError_CUSTOM_ERROR_77 HVACError = 0xCD + HVACError_CUSTOM_ERROR_78 HVACError = 0xCE + HVACError_CUSTOM_ERROR_79 HVACError = 0xCF + HVACError_CUSTOM_ERROR_80 HVACError = 0xD0 + HVACError_CUSTOM_ERROR_81 HVACError = 0xD1 + HVACError_CUSTOM_ERROR_82 HVACError = 0xD2 + HVACError_CUSTOM_ERROR_83 HVACError = 0xD3 + HVACError_CUSTOM_ERROR_84 HVACError = 0xD4 + HVACError_CUSTOM_ERROR_85 HVACError = 0xD5 + HVACError_CUSTOM_ERROR_86 HVACError = 0xD6 + HVACError_CUSTOM_ERROR_87 HVACError = 0xD7 + HVACError_CUSTOM_ERROR_88 HVACError = 0xD8 + HVACError_CUSTOM_ERROR_89 HVACError = 0xD9 + HVACError_CUSTOM_ERROR_90 HVACError = 0xDA + HVACError_CUSTOM_ERROR_91 HVACError = 0xDB + HVACError_CUSTOM_ERROR_92 HVACError = 0xDC + HVACError_CUSTOM_ERROR_93 HVACError = 0xDD + HVACError_CUSTOM_ERROR_94 HVACError = 0xDE + HVACError_CUSTOM_ERROR_95 HVACError = 0xDF + HVACError_CUSTOM_ERROR_96 HVACError = 0xE0 + HVACError_CUSTOM_ERROR_97 HVACError = 0xE1 + HVACError_CUSTOM_ERROR_98 HVACError = 0xE2 + HVACError_CUSTOM_ERROR_99 HVACError = 0xE3 + HVACError_CUSTOM_ERROR_100 HVACError = 0xE4 + HVACError_CUSTOM_ERROR_101 HVACError = 0xE5 + HVACError_CUSTOM_ERROR_102 HVACError = 0xE6 + HVACError_CUSTOM_ERROR_103 HVACError = 0xE7 + HVACError_CUSTOM_ERROR_104 HVACError = 0xE8 + HVACError_CUSTOM_ERROR_105 HVACError = 0xE9 + HVACError_CUSTOM_ERROR_106 HVACError = 0xEA + HVACError_CUSTOM_ERROR_107 HVACError = 0xEB + HVACError_CUSTOM_ERROR_108 HVACError = 0xEC + HVACError_CUSTOM_ERROR_109 HVACError = 0xED + HVACError_CUSTOM_ERROR_110 HVACError = 0xEE + HVACError_CUSTOM_ERROR_111 HVACError = 0xEF + HVACError_CUSTOM_ERROR_112 HVACError = 0xF0 + HVACError_CUSTOM_ERROR_113 HVACError = 0xF1 + HVACError_CUSTOM_ERROR_114 HVACError = 0xF2 + HVACError_CUSTOM_ERROR_115 HVACError = 0xF3 + HVACError_CUSTOM_ERROR_116 HVACError = 0xF4 + HVACError_CUSTOM_ERROR_117 HVACError = 0xF5 + HVACError_CUSTOM_ERROR_118 HVACError = 0xF6 + HVACError_CUSTOM_ERROR_119 HVACError = 0xF7 + HVACError_CUSTOM_ERROR_120 HVACError = 0xF8 + HVACError_CUSTOM_ERROR_121 HVACError = 0xF9 + HVACError_CUSTOM_ERROR_122 HVACError = 0xFA + HVACError_CUSTOM_ERROR_123 HVACError = 0xFB + HVACError_CUSTOM_ERROR_124 HVACError = 0xFC + HVACError_CUSTOM_ERROR_125 HVACError = 0xFD + HVACError_CUSTOM_ERROR_126 HVACError = 0xFE + HVACError_CUSTOM_ERROR_127 HVACError = 0xFF ) var HVACErrorValues []HVACError func init() { _ = errors.New - HVACErrorValues = []HVACError{ + HVACErrorValues = []HVACError { HVACError_NO_ERROR, HVACError_HEATER_TOTAL_FAILURE, HVACError_COOLER_TOTAL_FAILURE, @@ -327,286 +327,286 @@ func init() { func HVACErrorByValue(value uint8) (enum HVACError, ok bool) { switch value { - case 0x00: - return HVACError_NO_ERROR, true - case 0x01: - return HVACError_HEATER_TOTAL_FAILURE, true - case 0x02: - return HVACError_COOLER_TOTAL_FAILURE, true - case 0x03: - return HVACError_FAN_TOTAL_FAILURE, true - case 0x04: - return HVACError_TEMPERATURE_SENSOR_FAILURE, true - case 0x05: - return HVACError_HEATER_TEMPORARY_PROBLEM, true - case 0x06: - return HVACError_COOLER_TEMPORARY_PROBLEM, true - case 0x07: - return HVACError_FAN_TEMPORARY_PROBLEM, true - case 0x08: - return HVACError_HEATER_SERVICE_REQUIRED, true - case 0x09: - return HVACError_COOLER_SERVICE_REQUIRED, true - case 0x0A: - return HVACError_FAN_SERVICE_REQUIRED, true - case 0x0B: - return HVACError_FILTER_REPLACEMENT_REQUIRED, true - case 0x80: - return HVACError_CUSTOM_ERROR_0, true - case 0x81: - return HVACError_CUSTOM_ERROR_1, true - case 0x82: - return HVACError_CUSTOM_ERROR_2, true - case 0x83: - return HVACError_CUSTOM_ERROR_3, true - case 0x84: - return HVACError_CUSTOM_ERROR_4, true - case 0x85: - return HVACError_CUSTOM_ERROR_5, true - case 0x86: - return HVACError_CUSTOM_ERROR_6, true - case 0x87: - return HVACError_CUSTOM_ERROR_7, true - case 0x88: - return HVACError_CUSTOM_ERROR_8, true - case 0x89: - return HVACError_CUSTOM_ERROR_9, true - case 0x8A: - return HVACError_CUSTOM_ERROR_10, true - case 0x8B: - return HVACError_CUSTOM_ERROR_11, true - case 0x8C: - return HVACError_CUSTOM_ERROR_12, true - case 0x8D: - return HVACError_CUSTOM_ERROR_13, true - case 0x8E: - return HVACError_CUSTOM_ERROR_14, true - case 0x8F: - return HVACError_CUSTOM_ERROR_15, true - case 0x90: - return HVACError_CUSTOM_ERROR_16, true - case 0x91: - return HVACError_CUSTOM_ERROR_17, true - case 0x92: - return HVACError_CUSTOM_ERROR_18, true - case 0x93: - return HVACError_CUSTOM_ERROR_19, true - case 0x94: - return HVACError_CUSTOM_ERROR_20, true - case 0x95: - return HVACError_CUSTOM_ERROR_21, true - case 0x96: - return HVACError_CUSTOM_ERROR_22, true - case 0x97: - return HVACError_CUSTOM_ERROR_23, true - case 0x98: - return HVACError_CUSTOM_ERROR_24, true - case 0x99: - return HVACError_CUSTOM_ERROR_25, true - case 0x9A: - return HVACError_CUSTOM_ERROR_26, true - case 0x9B: - return HVACError_CUSTOM_ERROR_27, true - case 0x9C: - return HVACError_CUSTOM_ERROR_28, true - case 0x9D: - return HVACError_CUSTOM_ERROR_29, true - case 0x9E: - return HVACError_CUSTOM_ERROR_30, true - case 0x9F: - return HVACError_CUSTOM_ERROR_31, true - case 0xA0: - return HVACError_CUSTOM_ERROR_32, true - case 0xA1: - return HVACError_CUSTOM_ERROR_33, true - case 0xA2: - return HVACError_CUSTOM_ERROR_34, true - case 0xA3: - return HVACError_CUSTOM_ERROR_35, true - case 0xA4: - return HVACError_CUSTOM_ERROR_36, true - case 0xA5: - return HVACError_CUSTOM_ERROR_37, true - case 0xA6: - return HVACError_CUSTOM_ERROR_38, true - case 0xA7: - return HVACError_CUSTOM_ERROR_39, true - case 0xA8: - return HVACError_CUSTOM_ERROR_40, true - case 0xA9: - return HVACError_CUSTOM_ERROR_41, true - case 0xAA: - return HVACError_CUSTOM_ERROR_42, true - case 0xAB: - return HVACError_CUSTOM_ERROR_43, true - case 0xAC: - return HVACError_CUSTOM_ERROR_44, true - case 0xAD: - return HVACError_CUSTOM_ERROR_45, true - case 0xAE: - return HVACError_CUSTOM_ERROR_46, true - case 0xAF: - return HVACError_CUSTOM_ERROR_47, true - case 0xB0: - return HVACError_CUSTOM_ERROR_48, true - case 0xB1: - return HVACError_CUSTOM_ERROR_49, true - case 0xB2: - return HVACError_CUSTOM_ERROR_50, true - case 0xB3: - return HVACError_CUSTOM_ERROR_51, true - case 0xB4: - return HVACError_CUSTOM_ERROR_52, true - case 0xB5: - return HVACError_CUSTOM_ERROR_53, true - case 0xB6: - return HVACError_CUSTOM_ERROR_54, true - case 0xB7: - return HVACError_CUSTOM_ERROR_55, true - case 0xB8: - return HVACError_CUSTOM_ERROR_56, true - case 0xB9: - return HVACError_CUSTOM_ERROR_57, true - case 0xBA: - return HVACError_CUSTOM_ERROR_58, true - case 0xBB: - return HVACError_CUSTOM_ERROR_59, true - case 0xBC: - return HVACError_CUSTOM_ERROR_60, true - case 0xBD: - return HVACError_CUSTOM_ERROR_61, true - case 0xBE: - return HVACError_CUSTOM_ERROR_62, true - case 0xBF: - return HVACError_CUSTOM_ERROR_63, true - case 0xC0: - return HVACError_CUSTOM_ERROR_64, true - case 0xC1: - return HVACError_CUSTOM_ERROR_65, true - case 0xC2: - return HVACError_CUSTOM_ERROR_66, true - case 0xC3: - return HVACError_CUSTOM_ERROR_67, true - case 0xC4: - return HVACError_CUSTOM_ERROR_68, true - case 0xC5: - return HVACError_CUSTOM_ERROR_69, true - case 0xC6: - return HVACError_CUSTOM_ERROR_70, true - case 0xC7: - return HVACError_CUSTOM_ERROR_71, true - case 0xC8: - return HVACError_CUSTOM_ERROR_72, true - case 0xC9: - return HVACError_CUSTOM_ERROR_73, true - case 0xCA: - return HVACError_CUSTOM_ERROR_74, true - case 0xCB: - return HVACError_CUSTOM_ERROR_75, true - case 0xCC: - return HVACError_CUSTOM_ERROR_76, true - case 0xCD: - return HVACError_CUSTOM_ERROR_77, true - case 0xCE: - return HVACError_CUSTOM_ERROR_78, true - case 0xCF: - return HVACError_CUSTOM_ERROR_79, true - case 0xD0: - return HVACError_CUSTOM_ERROR_80, true - case 0xD1: - return HVACError_CUSTOM_ERROR_81, true - case 0xD2: - return HVACError_CUSTOM_ERROR_82, true - case 0xD3: - return HVACError_CUSTOM_ERROR_83, true - case 0xD4: - return HVACError_CUSTOM_ERROR_84, true - case 0xD5: - return HVACError_CUSTOM_ERROR_85, true - case 0xD6: - return HVACError_CUSTOM_ERROR_86, true - case 0xD7: - return HVACError_CUSTOM_ERROR_87, true - case 0xD8: - return HVACError_CUSTOM_ERROR_88, true - case 0xD9: - return HVACError_CUSTOM_ERROR_89, true - case 0xDA: - return HVACError_CUSTOM_ERROR_90, true - case 0xDB: - return HVACError_CUSTOM_ERROR_91, true - case 0xDC: - return HVACError_CUSTOM_ERROR_92, true - case 0xDD: - return HVACError_CUSTOM_ERROR_93, true - case 0xDE: - return HVACError_CUSTOM_ERROR_94, true - case 0xDF: - return HVACError_CUSTOM_ERROR_95, true - case 0xE0: - return HVACError_CUSTOM_ERROR_96, true - case 0xE1: - return HVACError_CUSTOM_ERROR_97, true - case 0xE2: - return HVACError_CUSTOM_ERROR_98, true - case 0xE3: - return HVACError_CUSTOM_ERROR_99, true - case 0xE4: - return HVACError_CUSTOM_ERROR_100, true - case 0xE5: - return HVACError_CUSTOM_ERROR_101, true - case 0xE6: - return HVACError_CUSTOM_ERROR_102, true - case 0xE7: - return HVACError_CUSTOM_ERROR_103, true - case 0xE8: - return HVACError_CUSTOM_ERROR_104, true - case 0xE9: - return HVACError_CUSTOM_ERROR_105, true - case 0xEA: - return HVACError_CUSTOM_ERROR_106, true - case 0xEB: - return HVACError_CUSTOM_ERROR_107, true - case 0xEC: - return HVACError_CUSTOM_ERROR_108, true - case 0xED: - return HVACError_CUSTOM_ERROR_109, true - case 0xEE: - return HVACError_CUSTOM_ERROR_110, true - case 0xEF: - return HVACError_CUSTOM_ERROR_111, true - case 0xF0: - return HVACError_CUSTOM_ERROR_112, true - case 0xF1: - return HVACError_CUSTOM_ERROR_113, true - case 0xF2: - return HVACError_CUSTOM_ERROR_114, true - case 0xF3: - return HVACError_CUSTOM_ERROR_115, true - case 0xF4: - return HVACError_CUSTOM_ERROR_116, true - case 0xF5: - return HVACError_CUSTOM_ERROR_117, true - case 0xF6: - return HVACError_CUSTOM_ERROR_118, true - case 0xF7: - return HVACError_CUSTOM_ERROR_119, true - case 0xF8: - return HVACError_CUSTOM_ERROR_120, true - case 0xF9: - return HVACError_CUSTOM_ERROR_121, true - case 0xFA: - return HVACError_CUSTOM_ERROR_122, true - case 0xFB: - return HVACError_CUSTOM_ERROR_123, true - case 0xFC: - return HVACError_CUSTOM_ERROR_124, true - case 0xFD: - return HVACError_CUSTOM_ERROR_125, true - case 0xFE: - return HVACError_CUSTOM_ERROR_126, true - case 0xFF: - return HVACError_CUSTOM_ERROR_127, true + case 0x00: + return HVACError_NO_ERROR, true + case 0x01: + return HVACError_HEATER_TOTAL_FAILURE, true + case 0x02: + return HVACError_COOLER_TOTAL_FAILURE, true + case 0x03: + return HVACError_FAN_TOTAL_FAILURE, true + case 0x04: + return HVACError_TEMPERATURE_SENSOR_FAILURE, true + case 0x05: + return HVACError_HEATER_TEMPORARY_PROBLEM, true + case 0x06: + return HVACError_COOLER_TEMPORARY_PROBLEM, true + case 0x07: + return HVACError_FAN_TEMPORARY_PROBLEM, true + case 0x08: + return HVACError_HEATER_SERVICE_REQUIRED, true + case 0x09: + return HVACError_COOLER_SERVICE_REQUIRED, true + case 0x0A: + return HVACError_FAN_SERVICE_REQUIRED, true + case 0x0B: + return HVACError_FILTER_REPLACEMENT_REQUIRED, true + case 0x80: + return HVACError_CUSTOM_ERROR_0, true + case 0x81: + return HVACError_CUSTOM_ERROR_1, true + case 0x82: + return HVACError_CUSTOM_ERROR_2, true + case 0x83: + return HVACError_CUSTOM_ERROR_3, true + case 0x84: + return HVACError_CUSTOM_ERROR_4, true + case 0x85: + return HVACError_CUSTOM_ERROR_5, true + case 0x86: + return HVACError_CUSTOM_ERROR_6, true + case 0x87: + return HVACError_CUSTOM_ERROR_7, true + case 0x88: + return HVACError_CUSTOM_ERROR_8, true + case 0x89: + return HVACError_CUSTOM_ERROR_9, true + case 0x8A: + return HVACError_CUSTOM_ERROR_10, true + case 0x8B: + return HVACError_CUSTOM_ERROR_11, true + case 0x8C: + return HVACError_CUSTOM_ERROR_12, true + case 0x8D: + return HVACError_CUSTOM_ERROR_13, true + case 0x8E: + return HVACError_CUSTOM_ERROR_14, true + case 0x8F: + return HVACError_CUSTOM_ERROR_15, true + case 0x90: + return HVACError_CUSTOM_ERROR_16, true + case 0x91: + return HVACError_CUSTOM_ERROR_17, true + case 0x92: + return HVACError_CUSTOM_ERROR_18, true + case 0x93: + return HVACError_CUSTOM_ERROR_19, true + case 0x94: + return HVACError_CUSTOM_ERROR_20, true + case 0x95: + return HVACError_CUSTOM_ERROR_21, true + case 0x96: + return HVACError_CUSTOM_ERROR_22, true + case 0x97: + return HVACError_CUSTOM_ERROR_23, true + case 0x98: + return HVACError_CUSTOM_ERROR_24, true + case 0x99: + return HVACError_CUSTOM_ERROR_25, true + case 0x9A: + return HVACError_CUSTOM_ERROR_26, true + case 0x9B: + return HVACError_CUSTOM_ERROR_27, true + case 0x9C: + return HVACError_CUSTOM_ERROR_28, true + case 0x9D: + return HVACError_CUSTOM_ERROR_29, true + case 0x9E: + return HVACError_CUSTOM_ERROR_30, true + case 0x9F: + return HVACError_CUSTOM_ERROR_31, true + case 0xA0: + return HVACError_CUSTOM_ERROR_32, true + case 0xA1: + return HVACError_CUSTOM_ERROR_33, true + case 0xA2: + return HVACError_CUSTOM_ERROR_34, true + case 0xA3: + return HVACError_CUSTOM_ERROR_35, true + case 0xA4: + return HVACError_CUSTOM_ERROR_36, true + case 0xA5: + return HVACError_CUSTOM_ERROR_37, true + case 0xA6: + return HVACError_CUSTOM_ERROR_38, true + case 0xA7: + return HVACError_CUSTOM_ERROR_39, true + case 0xA8: + return HVACError_CUSTOM_ERROR_40, true + case 0xA9: + return HVACError_CUSTOM_ERROR_41, true + case 0xAA: + return HVACError_CUSTOM_ERROR_42, true + case 0xAB: + return HVACError_CUSTOM_ERROR_43, true + case 0xAC: + return HVACError_CUSTOM_ERROR_44, true + case 0xAD: + return HVACError_CUSTOM_ERROR_45, true + case 0xAE: + return HVACError_CUSTOM_ERROR_46, true + case 0xAF: + return HVACError_CUSTOM_ERROR_47, true + case 0xB0: + return HVACError_CUSTOM_ERROR_48, true + case 0xB1: + return HVACError_CUSTOM_ERROR_49, true + case 0xB2: + return HVACError_CUSTOM_ERROR_50, true + case 0xB3: + return HVACError_CUSTOM_ERROR_51, true + case 0xB4: + return HVACError_CUSTOM_ERROR_52, true + case 0xB5: + return HVACError_CUSTOM_ERROR_53, true + case 0xB6: + return HVACError_CUSTOM_ERROR_54, true + case 0xB7: + return HVACError_CUSTOM_ERROR_55, true + case 0xB8: + return HVACError_CUSTOM_ERROR_56, true + case 0xB9: + return HVACError_CUSTOM_ERROR_57, true + case 0xBA: + return HVACError_CUSTOM_ERROR_58, true + case 0xBB: + return HVACError_CUSTOM_ERROR_59, true + case 0xBC: + return HVACError_CUSTOM_ERROR_60, true + case 0xBD: + return HVACError_CUSTOM_ERROR_61, true + case 0xBE: + return HVACError_CUSTOM_ERROR_62, true + case 0xBF: + return HVACError_CUSTOM_ERROR_63, true + case 0xC0: + return HVACError_CUSTOM_ERROR_64, true + case 0xC1: + return HVACError_CUSTOM_ERROR_65, true + case 0xC2: + return HVACError_CUSTOM_ERROR_66, true + case 0xC3: + return HVACError_CUSTOM_ERROR_67, true + case 0xC4: + return HVACError_CUSTOM_ERROR_68, true + case 0xC5: + return HVACError_CUSTOM_ERROR_69, true + case 0xC6: + return HVACError_CUSTOM_ERROR_70, true + case 0xC7: + return HVACError_CUSTOM_ERROR_71, true + case 0xC8: + return HVACError_CUSTOM_ERROR_72, true + case 0xC9: + return HVACError_CUSTOM_ERROR_73, true + case 0xCA: + return HVACError_CUSTOM_ERROR_74, true + case 0xCB: + return HVACError_CUSTOM_ERROR_75, true + case 0xCC: + return HVACError_CUSTOM_ERROR_76, true + case 0xCD: + return HVACError_CUSTOM_ERROR_77, true + case 0xCE: + return HVACError_CUSTOM_ERROR_78, true + case 0xCF: + return HVACError_CUSTOM_ERROR_79, true + case 0xD0: + return HVACError_CUSTOM_ERROR_80, true + case 0xD1: + return HVACError_CUSTOM_ERROR_81, true + case 0xD2: + return HVACError_CUSTOM_ERROR_82, true + case 0xD3: + return HVACError_CUSTOM_ERROR_83, true + case 0xD4: + return HVACError_CUSTOM_ERROR_84, true + case 0xD5: + return HVACError_CUSTOM_ERROR_85, true + case 0xD6: + return HVACError_CUSTOM_ERROR_86, true + case 0xD7: + return HVACError_CUSTOM_ERROR_87, true + case 0xD8: + return HVACError_CUSTOM_ERROR_88, true + case 0xD9: + return HVACError_CUSTOM_ERROR_89, true + case 0xDA: + return HVACError_CUSTOM_ERROR_90, true + case 0xDB: + return HVACError_CUSTOM_ERROR_91, true + case 0xDC: + return HVACError_CUSTOM_ERROR_92, true + case 0xDD: + return HVACError_CUSTOM_ERROR_93, true + case 0xDE: + return HVACError_CUSTOM_ERROR_94, true + case 0xDF: + return HVACError_CUSTOM_ERROR_95, true + case 0xE0: + return HVACError_CUSTOM_ERROR_96, true + case 0xE1: + return HVACError_CUSTOM_ERROR_97, true + case 0xE2: + return HVACError_CUSTOM_ERROR_98, true + case 0xE3: + return HVACError_CUSTOM_ERROR_99, true + case 0xE4: + return HVACError_CUSTOM_ERROR_100, true + case 0xE5: + return HVACError_CUSTOM_ERROR_101, true + case 0xE6: + return HVACError_CUSTOM_ERROR_102, true + case 0xE7: + return HVACError_CUSTOM_ERROR_103, true + case 0xE8: + return HVACError_CUSTOM_ERROR_104, true + case 0xE9: + return HVACError_CUSTOM_ERROR_105, true + case 0xEA: + return HVACError_CUSTOM_ERROR_106, true + case 0xEB: + return HVACError_CUSTOM_ERROR_107, true + case 0xEC: + return HVACError_CUSTOM_ERROR_108, true + case 0xED: + return HVACError_CUSTOM_ERROR_109, true + case 0xEE: + return HVACError_CUSTOM_ERROR_110, true + case 0xEF: + return HVACError_CUSTOM_ERROR_111, true + case 0xF0: + return HVACError_CUSTOM_ERROR_112, true + case 0xF1: + return HVACError_CUSTOM_ERROR_113, true + case 0xF2: + return HVACError_CUSTOM_ERROR_114, true + case 0xF3: + return HVACError_CUSTOM_ERROR_115, true + case 0xF4: + return HVACError_CUSTOM_ERROR_116, true + case 0xF5: + return HVACError_CUSTOM_ERROR_117, true + case 0xF6: + return HVACError_CUSTOM_ERROR_118, true + case 0xF7: + return HVACError_CUSTOM_ERROR_119, true + case 0xF8: + return HVACError_CUSTOM_ERROR_120, true + case 0xF9: + return HVACError_CUSTOM_ERROR_121, true + case 0xFA: + return HVACError_CUSTOM_ERROR_122, true + case 0xFB: + return HVACError_CUSTOM_ERROR_123, true + case 0xFC: + return HVACError_CUSTOM_ERROR_124, true + case 0xFD: + return HVACError_CUSTOM_ERROR_125, true + case 0xFE: + return HVACError_CUSTOM_ERROR_126, true + case 0xFF: + return HVACError_CUSTOM_ERROR_127, true } return 0, false } @@ -897,13 +897,13 @@ func HVACErrorByName(value string) (enum HVACError, ok bool) { return 0, false } -func HVACErrorKnows(value uint8) bool { +func HVACErrorKnows(value uint8) bool { for _, typeValue := range HVACErrorValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastHVACError(structType interface{}) HVACError { @@ -1243,3 +1243,4 @@ func (e HVACError) PLC4XEnumName() string { func (e HVACError) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/HVACHumidity.go b/plc4go/protocols/cbus/readwrite/model/HVACHumidity.go index f219aa2a499..09c093bcbdf 100644 --- a/plc4go/protocols/cbus/readwrite/model/HVACHumidity.go +++ b/plc4go/protocols/cbus/readwrite/model/HVACHumidity.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // HVACHumidity is the corresponding interface of HVACHumidity type HVACHumidity interface { @@ -46,9 +48,10 @@ type HVACHumidityExactly interface { // _HVACHumidity is the data-structure of this message type _HVACHumidity struct { - HumidityValue uint16 + HumidityValue uint16 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -78,14 +81,15 @@ func (m *_HVACHumidity) GetHumidityInPercent() float32 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewHVACHumidity factory function for _HVACHumidity -func NewHVACHumidity(humidityValue uint16) *_HVACHumidity { - return &_HVACHumidity{HumidityValue: humidityValue} +func NewHVACHumidity( humidityValue uint16 ) *_HVACHumidity { +return &_HVACHumidity{ HumidityValue: humidityValue } } // Deprecated: use the interface for direct cast func CastHVACHumidity(structType interface{}) HVACHumidity { - if casted, ok := structType.(HVACHumidity); ok { + if casted, ok := structType.(HVACHumidity); ok { return casted } if casted, ok := structType.(*HVACHumidity); ok { @@ -102,13 +106,14 @@ func (m *_HVACHumidity) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (humidityValue) - lengthInBits += 16 + lengthInBits += 16; // A virtual field doesn't have any in- or output. return lengthInBits } + func (m *_HVACHumidity) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -127,7 +132,7 @@ func HVACHumidityParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe _ = currentPos // Simple Field (humidityValue) - _humidityValue, _humidityValueErr := readBuffer.ReadUint16("humidityValue", 16) +_humidityValue, _humidityValueErr := readBuffer.ReadUint16("humidityValue", 16) if _humidityValueErr != nil { return nil, errors.Wrap(_humidityValueErr, "Error parsing 'humidityValue' field of HVACHumidity") } @@ -144,8 +149,8 @@ func HVACHumidityParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe // Create the instance return &_HVACHumidity{ - HumidityValue: humidityValue, - }, nil + HumidityValue: humidityValue, + }, nil } func (m *_HVACHumidity) Serialize() ([]byte, error) { @@ -159,7 +164,7 @@ func (m *_HVACHumidity) Serialize() ([]byte, error) { func (m *_HVACHumidity) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("HVACHumidity"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("HVACHumidity"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for HVACHumidity") } @@ -180,6 +185,7 @@ func (m *_HVACHumidity) SerializeWithWriteBuffer(ctx context.Context, writeBuffe return nil } + func (m *_HVACHumidity) isHVACHumidity() bool { return true } @@ -194,3 +200,6 @@ func (m *_HVACHumidity) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/HVACHumidityError.go b/plc4go/protocols/cbus/readwrite/model/HVACHumidityError.go index 0a1a3c5857b..071dfaab50f 100644 --- a/plc4go/protocols/cbus/readwrite/model/HVACHumidityError.go +++ b/plc4go/protocols/cbus/readwrite/model/HVACHumidityError.go @@ -34,154 +34,154 @@ type IHVACHumidityError interface { utils.Serializable } -const ( - HVACHumidityError_NO_ERROR HVACHumidityError = 0x00 - HVACHumidityError_HUMIDIFIER_TOTAL_FAILURE HVACHumidityError = 0x01 - HVACHumidityError_DEHUMIDIFIER_TOTAL_FAILURE HVACHumidityError = 0x02 - HVACHumidityError_FAN_TOTAL_FAILURE HVACHumidityError = 0x03 - HVACHumidityError_HUMIDITY_SENSOR_FAILURE HVACHumidityError = 0x04 - HVACHumidityError_HUMIDIFIER_TEMPORARY_PROBLEM HVACHumidityError = 0x05 +const( + HVACHumidityError_NO_ERROR HVACHumidityError = 0x00 + HVACHumidityError_HUMIDIFIER_TOTAL_FAILURE HVACHumidityError = 0x01 + HVACHumidityError_DEHUMIDIFIER_TOTAL_FAILURE HVACHumidityError = 0x02 + HVACHumidityError_FAN_TOTAL_FAILURE HVACHumidityError = 0x03 + HVACHumidityError_HUMIDITY_SENSOR_FAILURE HVACHumidityError = 0x04 + HVACHumidityError_HUMIDIFIER_TEMPORARY_PROBLEM HVACHumidityError = 0x05 HVACHumidityError_DEHUMIDIFIER_TEMPORARY_PROBLEM HVACHumidityError = 0x06 - HVACHumidityError_FAN_TEMPORARY_PROBLEM HVACHumidityError = 0x07 - HVACHumidityError_HUMIDIFIER_SERVICE_REQUIRED HVACHumidityError = 0x08 - HVACHumidityError_DEHUMIDIFIER_SERVICE_REQUIRED HVACHumidityError = 0x09 - HVACHumidityError_FAN_SERVICE_REQUIRED HVACHumidityError = 0x0A - HVACHumidityError_FILTER_REPLACEMENT_REQUIRED HVACHumidityError = 0x0B - HVACHumidityError_CUSTOM_ERROR_0 HVACHumidityError = 0x80 - HVACHumidityError_CUSTOM_ERROR_1 HVACHumidityError = 0x81 - HVACHumidityError_CUSTOM_ERROR_2 HVACHumidityError = 0x82 - HVACHumidityError_CUSTOM_ERROR_3 HVACHumidityError = 0x83 - HVACHumidityError_CUSTOM_ERROR_4 HVACHumidityError = 0x84 - HVACHumidityError_CUSTOM_ERROR_5 HVACHumidityError = 0x85 - HVACHumidityError_CUSTOM_ERROR_6 HVACHumidityError = 0x86 - HVACHumidityError_CUSTOM_ERROR_7 HVACHumidityError = 0x87 - HVACHumidityError_CUSTOM_ERROR_8 HVACHumidityError = 0x88 - HVACHumidityError_CUSTOM_ERROR_9 HVACHumidityError = 0x89 - HVACHumidityError_CUSTOM_ERROR_10 HVACHumidityError = 0x8A - HVACHumidityError_CUSTOM_ERROR_11 HVACHumidityError = 0x8B - HVACHumidityError_CUSTOM_ERROR_12 HVACHumidityError = 0x8C - HVACHumidityError_CUSTOM_ERROR_13 HVACHumidityError = 0x8D - HVACHumidityError_CUSTOM_ERROR_14 HVACHumidityError = 0x8E - HVACHumidityError_CUSTOM_ERROR_15 HVACHumidityError = 0x8F - HVACHumidityError_CUSTOM_ERROR_16 HVACHumidityError = 0x90 - HVACHumidityError_CUSTOM_ERROR_17 HVACHumidityError = 0x91 - HVACHumidityError_CUSTOM_ERROR_18 HVACHumidityError = 0x92 - HVACHumidityError_CUSTOM_ERROR_19 HVACHumidityError = 0x93 - HVACHumidityError_CUSTOM_ERROR_20 HVACHumidityError = 0x94 - HVACHumidityError_CUSTOM_ERROR_21 HVACHumidityError = 0x95 - HVACHumidityError_CUSTOM_ERROR_22 HVACHumidityError = 0x96 - HVACHumidityError_CUSTOM_ERROR_23 HVACHumidityError = 0x97 - HVACHumidityError_CUSTOM_ERROR_24 HVACHumidityError = 0x98 - HVACHumidityError_CUSTOM_ERROR_25 HVACHumidityError = 0x99 - HVACHumidityError_CUSTOM_ERROR_26 HVACHumidityError = 0x9A - HVACHumidityError_CUSTOM_ERROR_27 HVACHumidityError = 0x9B - HVACHumidityError_CUSTOM_ERROR_28 HVACHumidityError = 0x9C - HVACHumidityError_CUSTOM_ERROR_29 HVACHumidityError = 0x9D - HVACHumidityError_CUSTOM_ERROR_30 HVACHumidityError = 0x9E - HVACHumidityError_CUSTOM_ERROR_31 HVACHumidityError = 0x9F - HVACHumidityError_CUSTOM_ERROR_32 HVACHumidityError = 0xA0 - HVACHumidityError_CUSTOM_ERROR_33 HVACHumidityError = 0xA1 - HVACHumidityError_CUSTOM_ERROR_34 HVACHumidityError = 0xA2 - HVACHumidityError_CUSTOM_ERROR_35 HVACHumidityError = 0xA3 - HVACHumidityError_CUSTOM_ERROR_36 HVACHumidityError = 0xA4 - HVACHumidityError_CUSTOM_ERROR_37 HVACHumidityError = 0xA5 - HVACHumidityError_CUSTOM_ERROR_38 HVACHumidityError = 0xA6 - HVACHumidityError_CUSTOM_ERROR_39 HVACHumidityError = 0xA7 - HVACHumidityError_CUSTOM_ERROR_40 HVACHumidityError = 0xA8 - HVACHumidityError_CUSTOM_ERROR_41 HVACHumidityError = 0xA9 - HVACHumidityError_CUSTOM_ERROR_42 HVACHumidityError = 0xAA - HVACHumidityError_CUSTOM_ERROR_43 HVACHumidityError = 0xAB - HVACHumidityError_CUSTOM_ERROR_44 HVACHumidityError = 0xAC - HVACHumidityError_CUSTOM_ERROR_45 HVACHumidityError = 0xAD - HVACHumidityError_CUSTOM_ERROR_46 HVACHumidityError = 0xAE - HVACHumidityError_CUSTOM_ERROR_47 HVACHumidityError = 0xAF - HVACHumidityError_CUSTOM_ERROR_48 HVACHumidityError = 0xB0 - HVACHumidityError_CUSTOM_ERROR_49 HVACHumidityError = 0xB1 - HVACHumidityError_CUSTOM_ERROR_50 HVACHumidityError = 0xB2 - HVACHumidityError_CUSTOM_ERROR_51 HVACHumidityError = 0xB3 - HVACHumidityError_CUSTOM_ERROR_52 HVACHumidityError = 0xB4 - HVACHumidityError_CUSTOM_ERROR_53 HVACHumidityError = 0xB5 - HVACHumidityError_CUSTOM_ERROR_54 HVACHumidityError = 0xB6 - HVACHumidityError_CUSTOM_ERROR_55 HVACHumidityError = 0xB7 - HVACHumidityError_CUSTOM_ERROR_56 HVACHumidityError = 0xB8 - HVACHumidityError_CUSTOM_ERROR_57 HVACHumidityError = 0xB9 - HVACHumidityError_CUSTOM_ERROR_58 HVACHumidityError = 0xBA - HVACHumidityError_CUSTOM_ERROR_59 HVACHumidityError = 0xBB - HVACHumidityError_CUSTOM_ERROR_60 HVACHumidityError = 0xBC - HVACHumidityError_CUSTOM_ERROR_61 HVACHumidityError = 0xBD - HVACHumidityError_CUSTOM_ERROR_62 HVACHumidityError = 0xBE - HVACHumidityError_CUSTOM_ERROR_63 HVACHumidityError = 0xBF - HVACHumidityError_CUSTOM_ERROR_64 HVACHumidityError = 0xC0 - HVACHumidityError_CUSTOM_ERROR_65 HVACHumidityError = 0xC1 - HVACHumidityError_CUSTOM_ERROR_66 HVACHumidityError = 0xC2 - HVACHumidityError_CUSTOM_ERROR_67 HVACHumidityError = 0xC3 - HVACHumidityError_CUSTOM_ERROR_68 HVACHumidityError = 0xC4 - HVACHumidityError_CUSTOM_ERROR_69 HVACHumidityError = 0xC5 - HVACHumidityError_CUSTOM_ERROR_70 HVACHumidityError = 0xC6 - HVACHumidityError_CUSTOM_ERROR_71 HVACHumidityError = 0xC7 - HVACHumidityError_CUSTOM_ERROR_72 HVACHumidityError = 0xC8 - HVACHumidityError_CUSTOM_ERROR_73 HVACHumidityError = 0xC9 - HVACHumidityError_CUSTOM_ERROR_74 HVACHumidityError = 0xCA - HVACHumidityError_CUSTOM_ERROR_75 HVACHumidityError = 0xCB - HVACHumidityError_CUSTOM_ERROR_76 HVACHumidityError = 0xCC - HVACHumidityError_CUSTOM_ERROR_77 HVACHumidityError = 0xCD - HVACHumidityError_CUSTOM_ERROR_78 HVACHumidityError = 0xCE - HVACHumidityError_CUSTOM_ERROR_79 HVACHumidityError = 0xCF - HVACHumidityError_CUSTOM_ERROR_80 HVACHumidityError = 0xD0 - HVACHumidityError_CUSTOM_ERROR_81 HVACHumidityError = 0xD1 - HVACHumidityError_CUSTOM_ERROR_82 HVACHumidityError = 0xD2 - HVACHumidityError_CUSTOM_ERROR_83 HVACHumidityError = 0xD3 - HVACHumidityError_CUSTOM_ERROR_84 HVACHumidityError = 0xD4 - HVACHumidityError_CUSTOM_ERROR_85 HVACHumidityError = 0xD5 - HVACHumidityError_CUSTOM_ERROR_86 HVACHumidityError = 0xD6 - HVACHumidityError_CUSTOM_ERROR_87 HVACHumidityError = 0xD7 - HVACHumidityError_CUSTOM_ERROR_88 HVACHumidityError = 0xD8 - HVACHumidityError_CUSTOM_ERROR_89 HVACHumidityError = 0xD9 - HVACHumidityError_CUSTOM_ERROR_90 HVACHumidityError = 0xDA - HVACHumidityError_CUSTOM_ERROR_91 HVACHumidityError = 0xDB - HVACHumidityError_CUSTOM_ERROR_92 HVACHumidityError = 0xDC - HVACHumidityError_CUSTOM_ERROR_93 HVACHumidityError = 0xDD - HVACHumidityError_CUSTOM_ERROR_94 HVACHumidityError = 0xDE - HVACHumidityError_CUSTOM_ERROR_95 HVACHumidityError = 0xDF - HVACHumidityError_CUSTOM_ERROR_96 HVACHumidityError = 0xE0 - HVACHumidityError_CUSTOM_ERROR_97 HVACHumidityError = 0xE1 - HVACHumidityError_CUSTOM_ERROR_98 HVACHumidityError = 0xE2 - HVACHumidityError_CUSTOM_ERROR_99 HVACHumidityError = 0xE3 - HVACHumidityError_CUSTOM_ERROR_100 HVACHumidityError = 0xE4 - HVACHumidityError_CUSTOM_ERROR_101 HVACHumidityError = 0xE5 - HVACHumidityError_CUSTOM_ERROR_102 HVACHumidityError = 0xE6 - HVACHumidityError_CUSTOM_ERROR_103 HVACHumidityError = 0xE7 - HVACHumidityError_CUSTOM_ERROR_104 HVACHumidityError = 0xE8 - HVACHumidityError_CUSTOM_ERROR_105 HVACHumidityError = 0xE9 - HVACHumidityError_CUSTOM_ERROR_106 HVACHumidityError = 0xEA - HVACHumidityError_CUSTOM_ERROR_107 HVACHumidityError = 0xEB - HVACHumidityError_CUSTOM_ERROR_108 HVACHumidityError = 0xEC - HVACHumidityError_CUSTOM_ERROR_109 HVACHumidityError = 0xED - HVACHumidityError_CUSTOM_ERROR_110 HVACHumidityError = 0xEE - HVACHumidityError_CUSTOM_ERROR_111 HVACHumidityError = 0xEF - HVACHumidityError_CUSTOM_ERROR_112 HVACHumidityError = 0xF0 - HVACHumidityError_CUSTOM_ERROR_113 HVACHumidityError = 0xF1 - HVACHumidityError_CUSTOM_ERROR_114 HVACHumidityError = 0xF2 - HVACHumidityError_CUSTOM_ERROR_115 HVACHumidityError = 0xF3 - HVACHumidityError_CUSTOM_ERROR_116 HVACHumidityError = 0xF4 - HVACHumidityError_CUSTOM_ERROR_117 HVACHumidityError = 0xF5 - HVACHumidityError_CUSTOM_ERROR_118 HVACHumidityError = 0xF6 - HVACHumidityError_CUSTOM_ERROR_119 HVACHumidityError = 0xF7 - HVACHumidityError_CUSTOM_ERROR_120 HVACHumidityError = 0xF8 - HVACHumidityError_CUSTOM_ERROR_121 HVACHumidityError = 0xF9 - HVACHumidityError_CUSTOM_ERROR_122 HVACHumidityError = 0xFA - HVACHumidityError_CUSTOM_ERROR_123 HVACHumidityError = 0xFB - HVACHumidityError_CUSTOM_ERROR_124 HVACHumidityError = 0xFC - HVACHumidityError_CUSTOM_ERROR_125 HVACHumidityError = 0xFD - HVACHumidityError_CUSTOM_ERROR_126 HVACHumidityError = 0xFE - HVACHumidityError_CUSTOM_ERROR_127 HVACHumidityError = 0xFF + HVACHumidityError_FAN_TEMPORARY_PROBLEM HVACHumidityError = 0x07 + HVACHumidityError_HUMIDIFIER_SERVICE_REQUIRED HVACHumidityError = 0x08 + HVACHumidityError_DEHUMIDIFIER_SERVICE_REQUIRED HVACHumidityError = 0x09 + HVACHumidityError_FAN_SERVICE_REQUIRED HVACHumidityError = 0x0A + HVACHumidityError_FILTER_REPLACEMENT_REQUIRED HVACHumidityError = 0x0B + HVACHumidityError_CUSTOM_ERROR_0 HVACHumidityError = 0x80 + HVACHumidityError_CUSTOM_ERROR_1 HVACHumidityError = 0x81 + HVACHumidityError_CUSTOM_ERROR_2 HVACHumidityError = 0x82 + HVACHumidityError_CUSTOM_ERROR_3 HVACHumidityError = 0x83 + HVACHumidityError_CUSTOM_ERROR_4 HVACHumidityError = 0x84 + HVACHumidityError_CUSTOM_ERROR_5 HVACHumidityError = 0x85 + HVACHumidityError_CUSTOM_ERROR_6 HVACHumidityError = 0x86 + HVACHumidityError_CUSTOM_ERROR_7 HVACHumidityError = 0x87 + HVACHumidityError_CUSTOM_ERROR_8 HVACHumidityError = 0x88 + HVACHumidityError_CUSTOM_ERROR_9 HVACHumidityError = 0x89 + HVACHumidityError_CUSTOM_ERROR_10 HVACHumidityError = 0x8A + HVACHumidityError_CUSTOM_ERROR_11 HVACHumidityError = 0x8B + HVACHumidityError_CUSTOM_ERROR_12 HVACHumidityError = 0x8C + HVACHumidityError_CUSTOM_ERROR_13 HVACHumidityError = 0x8D + HVACHumidityError_CUSTOM_ERROR_14 HVACHumidityError = 0x8E + HVACHumidityError_CUSTOM_ERROR_15 HVACHumidityError = 0x8F + HVACHumidityError_CUSTOM_ERROR_16 HVACHumidityError = 0x90 + HVACHumidityError_CUSTOM_ERROR_17 HVACHumidityError = 0x91 + HVACHumidityError_CUSTOM_ERROR_18 HVACHumidityError = 0x92 + HVACHumidityError_CUSTOM_ERROR_19 HVACHumidityError = 0x93 + HVACHumidityError_CUSTOM_ERROR_20 HVACHumidityError = 0x94 + HVACHumidityError_CUSTOM_ERROR_21 HVACHumidityError = 0x95 + HVACHumidityError_CUSTOM_ERROR_22 HVACHumidityError = 0x96 + HVACHumidityError_CUSTOM_ERROR_23 HVACHumidityError = 0x97 + HVACHumidityError_CUSTOM_ERROR_24 HVACHumidityError = 0x98 + HVACHumidityError_CUSTOM_ERROR_25 HVACHumidityError = 0x99 + HVACHumidityError_CUSTOM_ERROR_26 HVACHumidityError = 0x9A + HVACHumidityError_CUSTOM_ERROR_27 HVACHumidityError = 0x9B + HVACHumidityError_CUSTOM_ERROR_28 HVACHumidityError = 0x9C + HVACHumidityError_CUSTOM_ERROR_29 HVACHumidityError = 0x9D + HVACHumidityError_CUSTOM_ERROR_30 HVACHumidityError = 0x9E + HVACHumidityError_CUSTOM_ERROR_31 HVACHumidityError = 0x9F + HVACHumidityError_CUSTOM_ERROR_32 HVACHumidityError = 0xA0 + HVACHumidityError_CUSTOM_ERROR_33 HVACHumidityError = 0xA1 + HVACHumidityError_CUSTOM_ERROR_34 HVACHumidityError = 0xA2 + HVACHumidityError_CUSTOM_ERROR_35 HVACHumidityError = 0xA3 + HVACHumidityError_CUSTOM_ERROR_36 HVACHumidityError = 0xA4 + HVACHumidityError_CUSTOM_ERROR_37 HVACHumidityError = 0xA5 + HVACHumidityError_CUSTOM_ERROR_38 HVACHumidityError = 0xA6 + HVACHumidityError_CUSTOM_ERROR_39 HVACHumidityError = 0xA7 + HVACHumidityError_CUSTOM_ERROR_40 HVACHumidityError = 0xA8 + HVACHumidityError_CUSTOM_ERROR_41 HVACHumidityError = 0xA9 + HVACHumidityError_CUSTOM_ERROR_42 HVACHumidityError = 0xAA + HVACHumidityError_CUSTOM_ERROR_43 HVACHumidityError = 0xAB + HVACHumidityError_CUSTOM_ERROR_44 HVACHumidityError = 0xAC + HVACHumidityError_CUSTOM_ERROR_45 HVACHumidityError = 0xAD + HVACHumidityError_CUSTOM_ERROR_46 HVACHumidityError = 0xAE + HVACHumidityError_CUSTOM_ERROR_47 HVACHumidityError = 0xAF + HVACHumidityError_CUSTOM_ERROR_48 HVACHumidityError = 0xB0 + HVACHumidityError_CUSTOM_ERROR_49 HVACHumidityError = 0xB1 + HVACHumidityError_CUSTOM_ERROR_50 HVACHumidityError = 0xB2 + HVACHumidityError_CUSTOM_ERROR_51 HVACHumidityError = 0xB3 + HVACHumidityError_CUSTOM_ERROR_52 HVACHumidityError = 0xB4 + HVACHumidityError_CUSTOM_ERROR_53 HVACHumidityError = 0xB5 + HVACHumidityError_CUSTOM_ERROR_54 HVACHumidityError = 0xB6 + HVACHumidityError_CUSTOM_ERROR_55 HVACHumidityError = 0xB7 + HVACHumidityError_CUSTOM_ERROR_56 HVACHumidityError = 0xB8 + HVACHumidityError_CUSTOM_ERROR_57 HVACHumidityError = 0xB9 + HVACHumidityError_CUSTOM_ERROR_58 HVACHumidityError = 0xBA + HVACHumidityError_CUSTOM_ERROR_59 HVACHumidityError = 0xBB + HVACHumidityError_CUSTOM_ERROR_60 HVACHumidityError = 0xBC + HVACHumidityError_CUSTOM_ERROR_61 HVACHumidityError = 0xBD + HVACHumidityError_CUSTOM_ERROR_62 HVACHumidityError = 0xBE + HVACHumidityError_CUSTOM_ERROR_63 HVACHumidityError = 0xBF + HVACHumidityError_CUSTOM_ERROR_64 HVACHumidityError = 0xC0 + HVACHumidityError_CUSTOM_ERROR_65 HVACHumidityError = 0xC1 + HVACHumidityError_CUSTOM_ERROR_66 HVACHumidityError = 0xC2 + HVACHumidityError_CUSTOM_ERROR_67 HVACHumidityError = 0xC3 + HVACHumidityError_CUSTOM_ERROR_68 HVACHumidityError = 0xC4 + HVACHumidityError_CUSTOM_ERROR_69 HVACHumidityError = 0xC5 + HVACHumidityError_CUSTOM_ERROR_70 HVACHumidityError = 0xC6 + HVACHumidityError_CUSTOM_ERROR_71 HVACHumidityError = 0xC7 + HVACHumidityError_CUSTOM_ERROR_72 HVACHumidityError = 0xC8 + HVACHumidityError_CUSTOM_ERROR_73 HVACHumidityError = 0xC9 + HVACHumidityError_CUSTOM_ERROR_74 HVACHumidityError = 0xCA + HVACHumidityError_CUSTOM_ERROR_75 HVACHumidityError = 0xCB + HVACHumidityError_CUSTOM_ERROR_76 HVACHumidityError = 0xCC + HVACHumidityError_CUSTOM_ERROR_77 HVACHumidityError = 0xCD + HVACHumidityError_CUSTOM_ERROR_78 HVACHumidityError = 0xCE + HVACHumidityError_CUSTOM_ERROR_79 HVACHumidityError = 0xCF + HVACHumidityError_CUSTOM_ERROR_80 HVACHumidityError = 0xD0 + HVACHumidityError_CUSTOM_ERROR_81 HVACHumidityError = 0xD1 + HVACHumidityError_CUSTOM_ERROR_82 HVACHumidityError = 0xD2 + HVACHumidityError_CUSTOM_ERROR_83 HVACHumidityError = 0xD3 + HVACHumidityError_CUSTOM_ERROR_84 HVACHumidityError = 0xD4 + HVACHumidityError_CUSTOM_ERROR_85 HVACHumidityError = 0xD5 + HVACHumidityError_CUSTOM_ERROR_86 HVACHumidityError = 0xD6 + HVACHumidityError_CUSTOM_ERROR_87 HVACHumidityError = 0xD7 + HVACHumidityError_CUSTOM_ERROR_88 HVACHumidityError = 0xD8 + HVACHumidityError_CUSTOM_ERROR_89 HVACHumidityError = 0xD9 + HVACHumidityError_CUSTOM_ERROR_90 HVACHumidityError = 0xDA + HVACHumidityError_CUSTOM_ERROR_91 HVACHumidityError = 0xDB + HVACHumidityError_CUSTOM_ERROR_92 HVACHumidityError = 0xDC + HVACHumidityError_CUSTOM_ERROR_93 HVACHumidityError = 0xDD + HVACHumidityError_CUSTOM_ERROR_94 HVACHumidityError = 0xDE + HVACHumidityError_CUSTOM_ERROR_95 HVACHumidityError = 0xDF + HVACHumidityError_CUSTOM_ERROR_96 HVACHumidityError = 0xE0 + HVACHumidityError_CUSTOM_ERROR_97 HVACHumidityError = 0xE1 + HVACHumidityError_CUSTOM_ERROR_98 HVACHumidityError = 0xE2 + HVACHumidityError_CUSTOM_ERROR_99 HVACHumidityError = 0xE3 + HVACHumidityError_CUSTOM_ERROR_100 HVACHumidityError = 0xE4 + HVACHumidityError_CUSTOM_ERROR_101 HVACHumidityError = 0xE5 + HVACHumidityError_CUSTOM_ERROR_102 HVACHumidityError = 0xE6 + HVACHumidityError_CUSTOM_ERROR_103 HVACHumidityError = 0xE7 + HVACHumidityError_CUSTOM_ERROR_104 HVACHumidityError = 0xE8 + HVACHumidityError_CUSTOM_ERROR_105 HVACHumidityError = 0xE9 + HVACHumidityError_CUSTOM_ERROR_106 HVACHumidityError = 0xEA + HVACHumidityError_CUSTOM_ERROR_107 HVACHumidityError = 0xEB + HVACHumidityError_CUSTOM_ERROR_108 HVACHumidityError = 0xEC + HVACHumidityError_CUSTOM_ERROR_109 HVACHumidityError = 0xED + HVACHumidityError_CUSTOM_ERROR_110 HVACHumidityError = 0xEE + HVACHumidityError_CUSTOM_ERROR_111 HVACHumidityError = 0xEF + HVACHumidityError_CUSTOM_ERROR_112 HVACHumidityError = 0xF0 + HVACHumidityError_CUSTOM_ERROR_113 HVACHumidityError = 0xF1 + HVACHumidityError_CUSTOM_ERROR_114 HVACHumidityError = 0xF2 + HVACHumidityError_CUSTOM_ERROR_115 HVACHumidityError = 0xF3 + HVACHumidityError_CUSTOM_ERROR_116 HVACHumidityError = 0xF4 + HVACHumidityError_CUSTOM_ERROR_117 HVACHumidityError = 0xF5 + HVACHumidityError_CUSTOM_ERROR_118 HVACHumidityError = 0xF6 + HVACHumidityError_CUSTOM_ERROR_119 HVACHumidityError = 0xF7 + HVACHumidityError_CUSTOM_ERROR_120 HVACHumidityError = 0xF8 + HVACHumidityError_CUSTOM_ERROR_121 HVACHumidityError = 0xF9 + HVACHumidityError_CUSTOM_ERROR_122 HVACHumidityError = 0xFA + HVACHumidityError_CUSTOM_ERROR_123 HVACHumidityError = 0xFB + HVACHumidityError_CUSTOM_ERROR_124 HVACHumidityError = 0xFC + HVACHumidityError_CUSTOM_ERROR_125 HVACHumidityError = 0xFD + HVACHumidityError_CUSTOM_ERROR_126 HVACHumidityError = 0xFE + HVACHumidityError_CUSTOM_ERROR_127 HVACHumidityError = 0xFF ) var HVACHumidityErrorValues []HVACHumidityError func init() { _ = errors.New - HVACHumidityErrorValues = []HVACHumidityError{ + HVACHumidityErrorValues = []HVACHumidityError { HVACHumidityError_NO_ERROR, HVACHumidityError_HUMIDIFIER_TOTAL_FAILURE, HVACHumidityError_DEHUMIDIFIER_TOTAL_FAILURE, @@ -327,286 +327,286 @@ func init() { func HVACHumidityErrorByValue(value uint8) (enum HVACHumidityError, ok bool) { switch value { - case 0x00: - return HVACHumidityError_NO_ERROR, true - case 0x01: - return HVACHumidityError_HUMIDIFIER_TOTAL_FAILURE, true - case 0x02: - return HVACHumidityError_DEHUMIDIFIER_TOTAL_FAILURE, true - case 0x03: - return HVACHumidityError_FAN_TOTAL_FAILURE, true - case 0x04: - return HVACHumidityError_HUMIDITY_SENSOR_FAILURE, true - case 0x05: - return HVACHumidityError_HUMIDIFIER_TEMPORARY_PROBLEM, true - case 0x06: - return HVACHumidityError_DEHUMIDIFIER_TEMPORARY_PROBLEM, true - case 0x07: - return HVACHumidityError_FAN_TEMPORARY_PROBLEM, true - case 0x08: - return HVACHumidityError_HUMIDIFIER_SERVICE_REQUIRED, true - case 0x09: - return HVACHumidityError_DEHUMIDIFIER_SERVICE_REQUIRED, true - case 0x0A: - return HVACHumidityError_FAN_SERVICE_REQUIRED, true - case 0x0B: - return HVACHumidityError_FILTER_REPLACEMENT_REQUIRED, true - case 0x80: - return HVACHumidityError_CUSTOM_ERROR_0, true - case 0x81: - return HVACHumidityError_CUSTOM_ERROR_1, true - case 0x82: - return HVACHumidityError_CUSTOM_ERROR_2, true - case 0x83: - return HVACHumidityError_CUSTOM_ERROR_3, true - case 0x84: - return HVACHumidityError_CUSTOM_ERROR_4, true - case 0x85: - return HVACHumidityError_CUSTOM_ERROR_5, true - case 0x86: - return HVACHumidityError_CUSTOM_ERROR_6, true - case 0x87: - return HVACHumidityError_CUSTOM_ERROR_7, true - case 0x88: - return HVACHumidityError_CUSTOM_ERROR_8, true - case 0x89: - return HVACHumidityError_CUSTOM_ERROR_9, true - case 0x8A: - return HVACHumidityError_CUSTOM_ERROR_10, true - case 0x8B: - return HVACHumidityError_CUSTOM_ERROR_11, true - case 0x8C: - return HVACHumidityError_CUSTOM_ERROR_12, true - case 0x8D: - return HVACHumidityError_CUSTOM_ERROR_13, true - case 0x8E: - return HVACHumidityError_CUSTOM_ERROR_14, true - case 0x8F: - return HVACHumidityError_CUSTOM_ERROR_15, true - case 0x90: - return HVACHumidityError_CUSTOM_ERROR_16, true - case 0x91: - return HVACHumidityError_CUSTOM_ERROR_17, true - case 0x92: - return HVACHumidityError_CUSTOM_ERROR_18, true - case 0x93: - return HVACHumidityError_CUSTOM_ERROR_19, true - case 0x94: - return HVACHumidityError_CUSTOM_ERROR_20, true - case 0x95: - return HVACHumidityError_CUSTOM_ERROR_21, true - case 0x96: - return HVACHumidityError_CUSTOM_ERROR_22, true - case 0x97: - return HVACHumidityError_CUSTOM_ERROR_23, true - case 0x98: - return HVACHumidityError_CUSTOM_ERROR_24, true - case 0x99: - return HVACHumidityError_CUSTOM_ERROR_25, true - case 0x9A: - return HVACHumidityError_CUSTOM_ERROR_26, true - case 0x9B: - return HVACHumidityError_CUSTOM_ERROR_27, true - case 0x9C: - return HVACHumidityError_CUSTOM_ERROR_28, true - case 0x9D: - return HVACHumidityError_CUSTOM_ERROR_29, true - case 0x9E: - return HVACHumidityError_CUSTOM_ERROR_30, true - case 0x9F: - return HVACHumidityError_CUSTOM_ERROR_31, true - case 0xA0: - return HVACHumidityError_CUSTOM_ERROR_32, true - case 0xA1: - return HVACHumidityError_CUSTOM_ERROR_33, true - case 0xA2: - return HVACHumidityError_CUSTOM_ERROR_34, true - case 0xA3: - return HVACHumidityError_CUSTOM_ERROR_35, true - case 0xA4: - return HVACHumidityError_CUSTOM_ERROR_36, true - case 0xA5: - return HVACHumidityError_CUSTOM_ERROR_37, true - case 0xA6: - return HVACHumidityError_CUSTOM_ERROR_38, true - case 0xA7: - return HVACHumidityError_CUSTOM_ERROR_39, true - case 0xA8: - return HVACHumidityError_CUSTOM_ERROR_40, true - case 0xA9: - return HVACHumidityError_CUSTOM_ERROR_41, true - case 0xAA: - return HVACHumidityError_CUSTOM_ERROR_42, true - case 0xAB: - return HVACHumidityError_CUSTOM_ERROR_43, true - case 0xAC: - return HVACHumidityError_CUSTOM_ERROR_44, true - case 0xAD: - return HVACHumidityError_CUSTOM_ERROR_45, true - case 0xAE: - return HVACHumidityError_CUSTOM_ERROR_46, true - case 0xAF: - return HVACHumidityError_CUSTOM_ERROR_47, true - case 0xB0: - return HVACHumidityError_CUSTOM_ERROR_48, true - case 0xB1: - return HVACHumidityError_CUSTOM_ERROR_49, true - case 0xB2: - return HVACHumidityError_CUSTOM_ERROR_50, true - case 0xB3: - return HVACHumidityError_CUSTOM_ERROR_51, true - case 0xB4: - return HVACHumidityError_CUSTOM_ERROR_52, true - case 0xB5: - return HVACHumidityError_CUSTOM_ERROR_53, true - case 0xB6: - return HVACHumidityError_CUSTOM_ERROR_54, true - case 0xB7: - return HVACHumidityError_CUSTOM_ERROR_55, true - case 0xB8: - return HVACHumidityError_CUSTOM_ERROR_56, true - case 0xB9: - return HVACHumidityError_CUSTOM_ERROR_57, true - case 0xBA: - return HVACHumidityError_CUSTOM_ERROR_58, true - case 0xBB: - return HVACHumidityError_CUSTOM_ERROR_59, true - case 0xBC: - return HVACHumidityError_CUSTOM_ERROR_60, true - case 0xBD: - return HVACHumidityError_CUSTOM_ERROR_61, true - case 0xBE: - return HVACHumidityError_CUSTOM_ERROR_62, true - case 0xBF: - return HVACHumidityError_CUSTOM_ERROR_63, true - case 0xC0: - return HVACHumidityError_CUSTOM_ERROR_64, true - case 0xC1: - return HVACHumidityError_CUSTOM_ERROR_65, true - case 0xC2: - return HVACHumidityError_CUSTOM_ERROR_66, true - case 0xC3: - return HVACHumidityError_CUSTOM_ERROR_67, true - case 0xC4: - return HVACHumidityError_CUSTOM_ERROR_68, true - case 0xC5: - return HVACHumidityError_CUSTOM_ERROR_69, true - case 0xC6: - return HVACHumidityError_CUSTOM_ERROR_70, true - case 0xC7: - return HVACHumidityError_CUSTOM_ERROR_71, true - case 0xC8: - return HVACHumidityError_CUSTOM_ERROR_72, true - case 0xC9: - return HVACHumidityError_CUSTOM_ERROR_73, true - case 0xCA: - return HVACHumidityError_CUSTOM_ERROR_74, true - case 0xCB: - return HVACHumidityError_CUSTOM_ERROR_75, true - case 0xCC: - return HVACHumidityError_CUSTOM_ERROR_76, true - case 0xCD: - return HVACHumidityError_CUSTOM_ERROR_77, true - case 0xCE: - return HVACHumidityError_CUSTOM_ERROR_78, true - case 0xCF: - return HVACHumidityError_CUSTOM_ERROR_79, true - case 0xD0: - return HVACHumidityError_CUSTOM_ERROR_80, true - case 0xD1: - return HVACHumidityError_CUSTOM_ERROR_81, true - case 0xD2: - return HVACHumidityError_CUSTOM_ERROR_82, true - case 0xD3: - return HVACHumidityError_CUSTOM_ERROR_83, true - case 0xD4: - return HVACHumidityError_CUSTOM_ERROR_84, true - case 0xD5: - return HVACHumidityError_CUSTOM_ERROR_85, true - case 0xD6: - return HVACHumidityError_CUSTOM_ERROR_86, true - case 0xD7: - return HVACHumidityError_CUSTOM_ERROR_87, true - case 0xD8: - return HVACHumidityError_CUSTOM_ERROR_88, true - case 0xD9: - return HVACHumidityError_CUSTOM_ERROR_89, true - case 0xDA: - return HVACHumidityError_CUSTOM_ERROR_90, true - case 0xDB: - return HVACHumidityError_CUSTOM_ERROR_91, true - case 0xDC: - return HVACHumidityError_CUSTOM_ERROR_92, true - case 0xDD: - return HVACHumidityError_CUSTOM_ERROR_93, true - case 0xDE: - return HVACHumidityError_CUSTOM_ERROR_94, true - case 0xDF: - return HVACHumidityError_CUSTOM_ERROR_95, true - case 0xE0: - return HVACHumidityError_CUSTOM_ERROR_96, true - case 0xE1: - return HVACHumidityError_CUSTOM_ERROR_97, true - case 0xE2: - return HVACHumidityError_CUSTOM_ERROR_98, true - case 0xE3: - return HVACHumidityError_CUSTOM_ERROR_99, true - case 0xE4: - return HVACHumidityError_CUSTOM_ERROR_100, true - case 0xE5: - return HVACHumidityError_CUSTOM_ERROR_101, true - case 0xE6: - return HVACHumidityError_CUSTOM_ERROR_102, true - case 0xE7: - return HVACHumidityError_CUSTOM_ERROR_103, true - case 0xE8: - return HVACHumidityError_CUSTOM_ERROR_104, true - case 0xE9: - return HVACHumidityError_CUSTOM_ERROR_105, true - case 0xEA: - return HVACHumidityError_CUSTOM_ERROR_106, true - case 0xEB: - return HVACHumidityError_CUSTOM_ERROR_107, true - case 0xEC: - return HVACHumidityError_CUSTOM_ERROR_108, true - case 0xED: - return HVACHumidityError_CUSTOM_ERROR_109, true - case 0xEE: - return HVACHumidityError_CUSTOM_ERROR_110, true - case 0xEF: - return HVACHumidityError_CUSTOM_ERROR_111, true - case 0xF0: - return HVACHumidityError_CUSTOM_ERROR_112, true - case 0xF1: - return HVACHumidityError_CUSTOM_ERROR_113, true - case 0xF2: - return HVACHumidityError_CUSTOM_ERROR_114, true - case 0xF3: - return HVACHumidityError_CUSTOM_ERROR_115, true - case 0xF4: - return HVACHumidityError_CUSTOM_ERROR_116, true - case 0xF5: - return HVACHumidityError_CUSTOM_ERROR_117, true - case 0xF6: - return HVACHumidityError_CUSTOM_ERROR_118, true - case 0xF7: - return HVACHumidityError_CUSTOM_ERROR_119, true - case 0xF8: - return HVACHumidityError_CUSTOM_ERROR_120, true - case 0xF9: - return HVACHumidityError_CUSTOM_ERROR_121, true - case 0xFA: - return HVACHumidityError_CUSTOM_ERROR_122, true - case 0xFB: - return HVACHumidityError_CUSTOM_ERROR_123, true - case 0xFC: - return HVACHumidityError_CUSTOM_ERROR_124, true - case 0xFD: - return HVACHumidityError_CUSTOM_ERROR_125, true - case 0xFE: - return HVACHumidityError_CUSTOM_ERROR_126, true - case 0xFF: - return HVACHumidityError_CUSTOM_ERROR_127, true + case 0x00: + return HVACHumidityError_NO_ERROR, true + case 0x01: + return HVACHumidityError_HUMIDIFIER_TOTAL_FAILURE, true + case 0x02: + return HVACHumidityError_DEHUMIDIFIER_TOTAL_FAILURE, true + case 0x03: + return HVACHumidityError_FAN_TOTAL_FAILURE, true + case 0x04: + return HVACHumidityError_HUMIDITY_SENSOR_FAILURE, true + case 0x05: + return HVACHumidityError_HUMIDIFIER_TEMPORARY_PROBLEM, true + case 0x06: + return HVACHumidityError_DEHUMIDIFIER_TEMPORARY_PROBLEM, true + case 0x07: + return HVACHumidityError_FAN_TEMPORARY_PROBLEM, true + case 0x08: + return HVACHumidityError_HUMIDIFIER_SERVICE_REQUIRED, true + case 0x09: + return HVACHumidityError_DEHUMIDIFIER_SERVICE_REQUIRED, true + case 0x0A: + return HVACHumidityError_FAN_SERVICE_REQUIRED, true + case 0x0B: + return HVACHumidityError_FILTER_REPLACEMENT_REQUIRED, true + case 0x80: + return HVACHumidityError_CUSTOM_ERROR_0, true + case 0x81: + return HVACHumidityError_CUSTOM_ERROR_1, true + case 0x82: + return HVACHumidityError_CUSTOM_ERROR_2, true + case 0x83: + return HVACHumidityError_CUSTOM_ERROR_3, true + case 0x84: + return HVACHumidityError_CUSTOM_ERROR_4, true + case 0x85: + return HVACHumidityError_CUSTOM_ERROR_5, true + case 0x86: + return HVACHumidityError_CUSTOM_ERROR_6, true + case 0x87: + return HVACHumidityError_CUSTOM_ERROR_7, true + case 0x88: + return HVACHumidityError_CUSTOM_ERROR_8, true + case 0x89: + return HVACHumidityError_CUSTOM_ERROR_9, true + case 0x8A: + return HVACHumidityError_CUSTOM_ERROR_10, true + case 0x8B: + return HVACHumidityError_CUSTOM_ERROR_11, true + case 0x8C: + return HVACHumidityError_CUSTOM_ERROR_12, true + case 0x8D: + return HVACHumidityError_CUSTOM_ERROR_13, true + case 0x8E: + return HVACHumidityError_CUSTOM_ERROR_14, true + case 0x8F: + return HVACHumidityError_CUSTOM_ERROR_15, true + case 0x90: + return HVACHumidityError_CUSTOM_ERROR_16, true + case 0x91: + return HVACHumidityError_CUSTOM_ERROR_17, true + case 0x92: + return HVACHumidityError_CUSTOM_ERROR_18, true + case 0x93: + return HVACHumidityError_CUSTOM_ERROR_19, true + case 0x94: + return HVACHumidityError_CUSTOM_ERROR_20, true + case 0x95: + return HVACHumidityError_CUSTOM_ERROR_21, true + case 0x96: + return HVACHumidityError_CUSTOM_ERROR_22, true + case 0x97: + return HVACHumidityError_CUSTOM_ERROR_23, true + case 0x98: + return HVACHumidityError_CUSTOM_ERROR_24, true + case 0x99: + return HVACHumidityError_CUSTOM_ERROR_25, true + case 0x9A: + return HVACHumidityError_CUSTOM_ERROR_26, true + case 0x9B: + return HVACHumidityError_CUSTOM_ERROR_27, true + case 0x9C: + return HVACHumidityError_CUSTOM_ERROR_28, true + case 0x9D: + return HVACHumidityError_CUSTOM_ERROR_29, true + case 0x9E: + return HVACHumidityError_CUSTOM_ERROR_30, true + case 0x9F: + return HVACHumidityError_CUSTOM_ERROR_31, true + case 0xA0: + return HVACHumidityError_CUSTOM_ERROR_32, true + case 0xA1: + return HVACHumidityError_CUSTOM_ERROR_33, true + case 0xA2: + return HVACHumidityError_CUSTOM_ERROR_34, true + case 0xA3: + return HVACHumidityError_CUSTOM_ERROR_35, true + case 0xA4: + return HVACHumidityError_CUSTOM_ERROR_36, true + case 0xA5: + return HVACHumidityError_CUSTOM_ERROR_37, true + case 0xA6: + return HVACHumidityError_CUSTOM_ERROR_38, true + case 0xA7: + return HVACHumidityError_CUSTOM_ERROR_39, true + case 0xA8: + return HVACHumidityError_CUSTOM_ERROR_40, true + case 0xA9: + return HVACHumidityError_CUSTOM_ERROR_41, true + case 0xAA: + return HVACHumidityError_CUSTOM_ERROR_42, true + case 0xAB: + return HVACHumidityError_CUSTOM_ERROR_43, true + case 0xAC: + return HVACHumidityError_CUSTOM_ERROR_44, true + case 0xAD: + return HVACHumidityError_CUSTOM_ERROR_45, true + case 0xAE: + return HVACHumidityError_CUSTOM_ERROR_46, true + case 0xAF: + return HVACHumidityError_CUSTOM_ERROR_47, true + case 0xB0: + return HVACHumidityError_CUSTOM_ERROR_48, true + case 0xB1: + return HVACHumidityError_CUSTOM_ERROR_49, true + case 0xB2: + return HVACHumidityError_CUSTOM_ERROR_50, true + case 0xB3: + return HVACHumidityError_CUSTOM_ERROR_51, true + case 0xB4: + return HVACHumidityError_CUSTOM_ERROR_52, true + case 0xB5: + return HVACHumidityError_CUSTOM_ERROR_53, true + case 0xB6: + return HVACHumidityError_CUSTOM_ERROR_54, true + case 0xB7: + return HVACHumidityError_CUSTOM_ERROR_55, true + case 0xB8: + return HVACHumidityError_CUSTOM_ERROR_56, true + case 0xB9: + return HVACHumidityError_CUSTOM_ERROR_57, true + case 0xBA: + return HVACHumidityError_CUSTOM_ERROR_58, true + case 0xBB: + return HVACHumidityError_CUSTOM_ERROR_59, true + case 0xBC: + return HVACHumidityError_CUSTOM_ERROR_60, true + case 0xBD: + return HVACHumidityError_CUSTOM_ERROR_61, true + case 0xBE: + return HVACHumidityError_CUSTOM_ERROR_62, true + case 0xBF: + return HVACHumidityError_CUSTOM_ERROR_63, true + case 0xC0: + return HVACHumidityError_CUSTOM_ERROR_64, true + case 0xC1: + return HVACHumidityError_CUSTOM_ERROR_65, true + case 0xC2: + return HVACHumidityError_CUSTOM_ERROR_66, true + case 0xC3: + return HVACHumidityError_CUSTOM_ERROR_67, true + case 0xC4: + return HVACHumidityError_CUSTOM_ERROR_68, true + case 0xC5: + return HVACHumidityError_CUSTOM_ERROR_69, true + case 0xC6: + return HVACHumidityError_CUSTOM_ERROR_70, true + case 0xC7: + return HVACHumidityError_CUSTOM_ERROR_71, true + case 0xC8: + return HVACHumidityError_CUSTOM_ERROR_72, true + case 0xC9: + return HVACHumidityError_CUSTOM_ERROR_73, true + case 0xCA: + return HVACHumidityError_CUSTOM_ERROR_74, true + case 0xCB: + return HVACHumidityError_CUSTOM_ERROR_75, true + case 0xCC: + return HVACHumidityError_CUSTOM_ERROR_76, true + case 0xCD: + return HVACHumidityError_CUSTOM_ERROR_77, true + case 0xCE: + return HVACHumidityError_CUSTOM_ERROR_78, true + case 0xCF: + return HVACHumidityError_CUSTOM_ERROR_79, true + case 0xD0: + return HVACHumidityError_CUSTOM_ERROR_80, true + case 0xD1: + return HVACHumidityError_CUSTOM_ERROR_81, true + case 0xD2: + return HVACHumidityError_CUSTOM_ERROR_82, true + case 0xD3: + return HVACHumidityError_CUSTOM_ERROR_83, true + case 0xD4: + return HVACHumidityError_CUSTOM_ERROR_84, true + case 0xD5: + return HVACHumidityError_CUSTOM_ERROR_85, true + case 0xD6: + return HVACHumidityError_CUSTOM_ERROR_86, true + case 0xD7: + return HVACHumidityError_CUSTOM_ERROR_87, true + case 0xD8: + return HVACHumidityError_CUSTOM_ERROR_88, true + case 0xD9: + return HVACHumidityError_CUSTOM_ERROR_89, true + case 0xDA: + return HVACHumidityError_CUSTOM_ERROR_90, true + case 0xDB: + return HVACHumidityError_CUSTOM_ERROR_91, true + case 0xDC: + return HVACHumidityError_CUSTOM_ERROR_92, true + case 0xDD: + return HVACHumidityError_CUSTOM_ERROR_93, true + case 0xDE: + return HVACHumidityError_CUSTOM_ERROR_94, true + case 0xDF: + return HVACHumidityError_CUSTOM_ERROR_95, true + case 0xE0: + return HVACHumidityError_CUSTOM_ERROR_96, true + case 0xE1: + return HVACHumidityError_CUSTOM_ERROR_97, true + case 0xE2: + return HVACHumidityError_CUSTOM_ERROR_98, true + case 0xE3: + return HVACHumidityError_CUSTOM_ERROR_99, true + case 0xE4: + return HVACHumidityError_CUSTOM_ERROR_100, true + case 0xE5: + return HVACHumidityError_CUSTOM_ERROR_101, true + case 0xE6: + return HVACHumidityError_CUSTOM_ERROR_102, true + case 0xE7: + return HVACHumidityError_CUSTOM_ERROR_103, true + case 0xE8: + return HVACHumidityError_CUSTOM_ERROR_104, true + case 0xE9: + return HVACHumidityError_CUSTOM_ERROR_105, true + case 0xEA: + return HVACHumidityError_CUSTOM_ERROR_106, true + case 0xEB: + return HVACHumidityError_CUSTOM_ERROR_107, true + case 0xEC: + return HVACHumidityError_CUSTOM_ERROR_108, true + case 0xED: + return HVACHumidityError_CUSTOM_ERROR_109, true + case 0xEE: + return HVACHumidityError_CUSTOM_ERROR_110, true + case 0xEF: + return HVACHumidityError_CUSTOM_ERROR_111, true + case 0xF0: + return HVACHumidityError_CUSTOM_ERROR_112, true + case 0xF1: + return HVACHumidityError_CUSTOM_ERROR_113, true + case 0xF2: + return HVACHumidityError_CUSTOM_ERROR_114, true + case 0xF3: + return HVACHumidityError_CUSTOM_ERROR_115, true + case 0xF4: + return HVACHumidityError_CUSTOM_ERROR_116, true + case 0xF5: + return HVACHumidityError_CUSTOM_ERROR_117, true + case 0xF6: + return HVACHumidityError_CUSTOM_ERROR_118, true + case 0xF7: + return HVACHumidityError_CUSTOM_ERROR_119, true + case 0xF8: + return HVACHumidityError_CUSTOM_ERROR_120, true + case 0xF9: + return HVACHumidityError_CUSTOM_ERROR_121, true + case 0xFA: + return HVACHumidityError_CUSTOM_ERROR_122, true + case 0xFB: + return HVACHumidityError_CUSTOM_ERROR_123, true + case 0xFC: + return HVACHumidityError_CUSTOM_ERROR_124, true + case 0xFD: + return HVACHumidityError_CUSTOM_ERROR_125, true + case 0xFE: + return HVACHumidityError_CUSTOM_ERROR_126, true + case 0xFF: + return HVACHumidityError_CUSTOM_ERROR_127, true } return 0, false } @@ -897,13 +897,13 @@ func HVACHumidityErrorByName(value string) (enum HVACHumidityError, ok bool) { return 0, false } -func HVACHumidityErrorKnows(value uint8) bool { +func HVACHumidityErrorKnows(value uint8) bool { for _, typeValue := range HVACHumidityErrorValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastHVACHumidityError(structType interface{}) HVACHumidityError { @@ -1243,3 +1243,4 @@ func (e HVACHumidityError) PLC4XEnumName() string { func (e HVACHumidityError) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/HVACHumidityModeAndFlags.go b/plc4go/protocols/cbus/readwrite/model/HVACHumidityModeAndFlags.go index 3e6a609dde3..4c6c32d1992 100644 --- a/plc4go/protocols/cbus/readwrite/model/HVACHumidityModeAndFlags.go +++ b/plc4go/protocols/cbus/readwrite/model/HVACHumidityModeAndFlags.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // HVACHumidityModeAndFlags is the corresponding interface of HVACHumidityModeAndFlags type HVACHumidityModeAndFlags interface { @@ -68,15 +70,16 @@ type HVACHumidityModeAndFlagsExactly interface { // _HVACHumidityModeAndFlags is the data-structure of this message type _HVACHumidityModeAndFlags struct { - AuxiliaryLevel bool - Guard bool - Setback bool - Level bool - Mode HVACHumidityModeAndFlagsMode + AuxiliaryLevel bool + Guard bool + Setback bool + Level bool + Mode HVACHumidityModeAndFlagsMode // Reserved Fields reservedField0 *bool } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -164,14 +167,15 @@ func (m *_HVACHumidityModeAndFlags) GetIsLevelRaw() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewHVACHumidityModeAndFlags factory function for _HVACHumidityModeAndFlags -func NewHVACHumidityModeAndFlags(auxiliaryLevel bool, guard bool, setback bool, level bool, mode HVACHumidityModeAndFlagsMode) *_HVACHumidityModeAndFlags { - return &_HVACHumidityModeAndFlags{AuxiliaryLevel: auxiliaryLevel, Guard: guard, Setback: setback, Level: level, Mode: mode} +func NewHVACHumidityModeAndFlags( auxiliaryLevel bool , guard bool , setback bool , level bool , mode HVACHumidityModeAndFlagsMode ) *_HVACHumidityModeAndFlags { +return &_HVACHumidityModeAndFlags{ AuxiliaryLevel: auxiliaryLevel , Guard: guard , Setback: setback , Level: level , Mode: mode } } // Deprecated: use the interface for direct cast func CastHVACHumidityModeAndFlags(structType interface{}) HVACHumidityModeAndFlags { - if casted, ok := structType.(HVACHumidityModeAndFlags); ok { + if casted, ok := structType.(HVACHumidityModeAndFlags); ok { return casted } if casted, ok := structType.(*HVACHumidityModeAndFlags); ok { @@ -191,28 +195,28 @@ func (m *_HVACHumidityModeAndFlags) GetLengthInBits(ctx context.Context) uint16 lengthInBits += 1 // Simple field (auxiliaryLevel) - lengthInBits += 1 + lengthInBits += 1; // A virtual field doesn't have any in- or output. // A virtual field doesn't have any in- or output. // Simple field (guard) - lengthInBits += 1 + lengthInBits += 1; // A virtual field doesn't have any in- or output. // A virtual field doesn't have any in- or output. // Simple field (setback) - lengthInBits += 1 + lengthInBits += 1; // A virtual field doesn't have any in- or output. // A virtual field doesn't have any in- or output. // Simple field (level) - lengthInBits += 1 + lengthInBits += 1; // A virtual field doesn't have any in- or output. @@ -224,6 +228,7 @@ func (m *_HVACHumidityModeAndFlags) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_HVACHumidityModeAndFlags) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -251,7 +256,7 @@ func HVACHumidityModeAndFlagsParseWithBuffer(ctx context.Context, readBuffer uti if reserved != bool(false) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -259,7 +264,7 @@ func HVACHumidityModeAndFlagsParseWithBuffer(ctx context.Context, readBuffer uti } // Simple Field (auxiliaryLevel) - _auxiliaryLevel, _auxiliaryLevelErr := readBuffer.ReadBit("auxiliaryLevel") +_auxiliaryLevel, _auxiliaryLevelErr := readBuffer.ReadBit("auxiliaryLevel") if _auxiliaryLevelErr != nil { return nil, errors.Wrap(_auxiliaryLevelErr, "Error parsing 'auxiliaryLevel' field of HVACHumidityModeAndFlags") } @@ -276,7 +281,7 @@ func HVACHumidityModeAndFlagsParseWithBuffer(ctx context.Context, readBuffer uti _ = isAuxLevelUsed // Simple Field (guard) - _guard, _guardErr := readBuffer.ReadBit("guard") +_guard, _guardErr := readBuffer.ReadBit("guard") if _guardErr != nil { return nil, errors.Wrap(_guardErr, "Error parsing 'guard' field of HVACHumidityModeAndFlags") } @@ -293,7 +298,7 @@ func HVACHumidityModeAndFlagsParseWithBuffer(ctx context.Context, readBuffer uti _ = isGuardEnabled // Simple Field (setback) - _setback, _setbackErr := readBuffer.ReadBit("setback") +_setback, _setbackErr := readBuffer.ReadBit("setback") if _setbackErr != nil { return nil, errors.Wrap(_setbackErr, "Error parsing 'setback' field of HVACHumidityModeAndFlags") } @@ -310,7 +315,7 @@ func HVACHumidityModeAndFlagsParseWithBuffer(ctx context.Context, readBuffer uti _ = isSetbackEnabled // Simple Field (level) - _level, _levelErr := readBuffer.ReadBit("level") +_level, _levelErr := readBuffer.ReadBit("level") if _levelErr != nil { return nil, errors.Wrap(_levelErr, "Error parsing 'level' field of HVACHumidityModeAndFlags") } @@ -330,7 +335,7 @@ func HVACHumidityModeAndFlagsParseWithBuffer(ctx context.Context, readBuffer uti if pullErr := readBuffer.PullContext("mode"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for mode") } - _mode, _modeErr := HVACHumidityModeAndFlagsModeParseWithBuffer(ctx, readBuffer) +_mode, _modeErr := HVACHumidityModeAndFlagsModeParseWithBuffer(ctx, readBuffer) if _modeErr != nil { return nil, errors.Wrap(_modeErr, "Error parsing 'mode' field of HVACHumidityModeAndFlags") } @@ -345,13 +350,13 @@ func HVACHumidityModeAndFlagsParseWithBuffer(ctx context.Context, readBuffer uti // Create the instance return &_HVACHumidityModeAndFlags{ - AuxiliaryLevel: auxiliaryLevel, - Guard: guard, - Setback: setback, - Level: level, - Mode: mode, - reservedField0: reservedField0, - }, nil + AuxiliaryLevel: auxiliaryLevel, + Guard: guard, + Setback: setback, + Level: level, + Mode: mode, + reservedField0: reservedField0, + }, nil } func (m *_HVACHumidityModeAndFlags) Serialize() ([]byte, error) { @@ -365,7 +370,7 @@ func (m *_HVACHumidityModeAndFlags) Serialize() ([]byte, error) { func (m *_HVACHumidityModeAndFlags) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("HVACHumidityModeAndFlags"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("HVACHumidityModeAndFlags"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for HVACHumidityModeAndFlags") } @@ -375,7 +380,7 @@ func (m *_HVACHumidityModeAndFlags) SerializeWithWriteBuffer(ctx context.Context if m.reservedField0 != nil { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Overriding reserved field with unexpected value.") reserved = *m.reservedField0 } @@ -463,6 +468,7 @@ func (m *_HVACHumidityModeAndFlags) SerializeWithWriteBuffer(ctx context.Context return nil } + func (m *_HVACHumidityModeAndFlags) isHVACHumidityModeAndFlags() bool { return true } @@ -477,3 +483,6 @@ func (m *_HVACHumidityModeAndFlags) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/HVACHumidityModeAndFlagsMode.go b/plc4go/protocols/cbus/readwrite/model/HVACHumidityModeAndFlagsMode.go index cbc0c6740ea..bd1a9b4646e 100644 --- a/plc4go/protocols/cbus/readwrite/model/HVACHumidityModeAndFlagsMode.go +++ b/plc4go/protocols/cbus/readwrite/model/HVACHumidityModeAndFlagsMode.go @@ -34,10 +34,10 @@ type IHVACHumidityModeAndFlagsMode interface { utils.Serializable } -const ( - HVACHumidityModeAndFlagsMode_OFF HVACHumidityModeAndFlagsMode = 0x0 - HVACHumidityModeAndFlagsMode_HUMIDIFY_ONLY HVACHumidityModeAndFlagsMode = 0x1 - HVACHumidityModeAndFlagsMode_DEHUMIDIFY_ONLY HVACHumidityModeAndFlagsMode = 0x2 +const( + HVACHumidityModeAndFlagsMode_OFF HVACHumidityModeAndFlagsMode = 0x0 + HVACHumidityModeAndFlagsMode_HUMIDIFY_ONLY HVACHumidityModeAndFlagsMode = 0x1 + HVACHumidityModeAndFlagsMode_DEHUMIDIFY_ONLY HVACHumidityModeAndFlagsMode = 0x2 HVACHumidityModeAndFlagsMode_HUMIDITY_CONTROL HVACHumidityModeAndFlagsMode = 0x3 ) @@ -45,7 +45,7 @@ var HVACHumidityModeAndFlagsModeValues []HVACHumidityModeAndFlagsMode func init() { _ = errors.New - HVACHumidityModeAndFlagsModeValues = []HVACHumidityModeAndFlagsMode{ + HVACHumidityModeAndFlagsModeValues = []HVACHumidityModeAndFlagsMode { HVACHumidityModeAndFlagsMode_OFF, HVACHumidityModeAndFlagsMode_HUMIDIFY_ONLY, HVACHumidityModeAndFlagsMode_DEHUMIDIFY_ONLY, @@ -55,14 +55,14 @@ func init() { func HVACHumidityModeAndFlagsModeByValue(value uint8) (enum HVACHumidityModeAndFlagsMode, ok bool) { switch value { - case 0x0: - return HVACHumidityModeAndFlagsMode_OFF, true - case 0x1: - return HVACHumidityModeAndFlagsMode_HUMIDIFY_ONLY, true - case 0x2: - return HVACHumidityModeAndFlagsMode_DEHUMIDIFY_ONLY, true - case 0x3: - return HVACHumidityModeAndFlagsMode_HUMIDITY_CONTROL, true + case 0x0: + return HVACHumidityModeAndFlagsMode_OFF, true + case 0x1: + return HVACHumidityModeAndFlagsMode_HUMIDIFY_ONLY, true + case 0x2: + return HVACHumidityModeAndFlagsMode_DEHUMIDIFY_ONLY, true + case 0x3: + return HVACHumidityModeAndFlagsMode_HUMIDITY_CONTROL, true } return 0, false } @@ -81,13 +81,13 @@ func HVACHumidityModeAndFlagsModeByName(value string) (enum HVACHumidityModeAndF return 0, false } -func HVACHumidityModeAndFlagsModeKnows(value uint8) bool { +func HVACHumidityModeAndFlagsModeKnows(value uint8) bool { for _, typeValue := range HVACHumidityModeAndFlagsModeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastHVACHumidityModeAndFlagsMode(structType interface{}) HVACHumidityModeAndFlagsMode { @@ -155,3 +155,4 @@ func (e HVACHumidityModeAndFlagsMode) PLC4XEnumName() string { func (e HVACHumidityModeAndFlagsMode) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/HVACHumidityStatusFlags.go b/plc4go/protocols/cbus/readwrite/model/HVACHumidityStatusFlags.go index 2fe35292da0..430286c7504 100644 --- a/plc4go/protocols/cbus/readwrite/model/HVACHumidityStatusFlags.go +++ b/plc4go/protocols/cbus/readwrite/model/HVACHumidityStatusFlags.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // HVACHumidityStatusFlags is the corresponding interface of HVACHumidityStatusFlags type HVACHumidityStatusFlags interface { @@ -60,17 +62,18 @@ type HVACHumidityStatusFlagsExactly interface { // _HVACHumidityStatusFlags is the data-structure of this message type _HVACHumidityStatusFlags struct { - Expansion bool - Error bool - Busy bool - DamperState bool - FanActive bool - DehumidifyingPlant bool - HumidifyingPlant bool + Expansion bool + Error bool + Busy bool + DamperState bool + FanActive bool + DehumidifyingPlant bool + HumidifyingPlant bool // Reserved Fields reservedField0 *bool } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -130,14 +133,15 @@ func (m *_HVACHumidityStatusFlags) GetIsDamperStateOpen() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewHVACHumidityStatusFlags factory function for _HVACHumidityStatusFlags -func NewHVACHumidityStatusFlags(expansion bool, error bool, busy bool, damperState bool, fanActive bool, dehumidifyingPlant bool, humidifyingPlant bool) *_HVACHumidityStatusFlags { - return &_HVACHumidityStatusFlags{Expansion: expansion, Error: error, Busy: busy, DamperState: damperState, FanActive: fanActive, DehumidifyingPlant: dehumidifyingPlant, HumidifyingPlant: humidifyingPlant} +func NewHVACHumidityStatusFlags( expansion bool , error bool , busy bool , damperState bool , fanActive bool , dehumidifyingPlant bool , humidifyingPlant bool ) *_HVACHumidityStatusFlags { +return &_HVACHumidityStatusFlags{ Expansion: expansion , Error: error , Busy: busy , DamperState: damperState , FanActive: fanActive , DehumidifyingPlant: dehumidifyingPlant , HumidifyingPlant: humidifyingPlant } } // Deprecated: use the interface for direct cast func CastHVACHumidityStatusFlags(structType interface{}) HVACHumidityStatusFlags { - if casted, ok := structType.(HVACHumidityStatusFlags); ok { + if casted, ok := structType.(HVACHumidityStatusFlags); ok { return casted } if casted, ok := structType.(*HVACHumidityStatusFlags); ok { @@ -154,36 +158,37 @@ func (m *_HVACHumidityStatusFlags) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (expansion) - lengthInBits += 1 + lengthInBits += 1; // Simple field (error) - lengthInBits += 1 + lengthInBits += 1; // Simple field (busy) - lengthInBits += 1 + lengthInBits += 1; // Reserved Field (reserved) lengthInBits += 1 // Simple field (damperState) - lengthInBits += 1 + lengthInBits += 1; // A virtual field doesn't have any in- or output. // A virtual field doesn't have any in- or output. // Simple field (fanActive) - lengthInBits += 1 + lengthInBits += 1; // Simple field (dehumidifyingPlant) - lengthInBits += 1 + lengthInBits += 1; // Simple field (humidifyingPlant) - lengthInBits += 1 + lengthInBits += 1; return lengthInBits } + func (m *_HVACHumidityStatusFlags) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -202,21 +207,21 @@ func HVACHumidityStatusFlagsParseWithBuffer(ctx context.Context, readBuffer util _ = currentPos // Simple Field (expansion) - _expansion, _expansionErr := readBuffer.ReadBit("expansion") +_expansion, _expansionErr := readBuffer.ReadBit("expansion") if _expansionErr != nil { return nil, errors.Wrap(_expansionErr, "Error parsing 'expansion' field of HVACHumidityStatusFlags") } expansion := _expansion // Simple Field (error) - _error, _errorErr := readBuffer.ReadBit("error") +_error, _errorErr := readBuffer.ReadBit("error") if _errorErr != nil { return nil, errors.Wrap(_errorErr, "Error parsing 'error' field of HVACHumidityStatusFlags") } error := _error // Simple Field (busy) - _busy, _busyErr := readBuffer.ReadBit("busy") +_busy, _busyErr := readBuffer.ReadBit("busy") if _busyErr != nil { return nil, errors.Wrap(_busyErr, "Error parsing 'busy' field of HVACHumidityStatusFlags") } @@ -232,7 +237,7 @@ func HVACHumidityStatusFlagsParseWithBuffer(ctx context.Context, readBuffer util if reserved != bool(false) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -240,7 +245,7 @@ func HVACHumidityStatusFlagsParseWithBuffer(ctx context.Context, readBuffer util } // Simple Field (damperState) - _damperState, _damperStateErr := readBuffer.ReadBit("damperState") +_damperState, _damperStateErr := readBuffer.ReadBit("damperState") if _damperStateErr != nil { return nil, errors.Wrap(_damperStateErr, "Error parsing 'damperState' field of HVACHumidityStatusFlags") } @@ -257,21 +262,21 @@ func HVACHumidityStatusFlagsParseWithBuffer(ctx context.Context, readBuffer util _ = isDamperStateOpen // Simple Field (fanActive) - _fanActive, _fanActiveErr := readBuffer.ReadBit("fanActive") +_fanActive, _fanActiveErr := readBuffer.ReadBit("fanActive") if _fanActiveErr != nil { return nil, errors.Wrap(_fanActiveErr, "Error parsing 'fanActive' field of HVACHumidityStatusFlags") } fanActive := _fanActive // Simple Field (dehumidifyingPlant) - _dehumidifyingPlant, _dehumidifyingPlantErr := readBuffer.ReadBit("dehumidifyingPlant") +_dehumidifyingPlant, _dehumidifyingPlantErr := readBuffer.ReadBit("dehumidifyingPlant") if _dehumidifyingPlantErr != nil { return nil, errors.Wrap(_dehumidifyingPlantErr, "Error parsing 'dehumidifyingPlant' field of HVACHumidityStatusFlags") } dehumidifyingPlant := _dehumidifyingPlant // Simple Field (humidifyingPlant) - _humidifyingPlant, _humidifyingPlantErr := readBuffer.ReadBit("humidifyingPlant") +_humidifyingPlant, _humidifyingPlantErr := readBuffer.ReadBit("humidifyingPlant") if _humidifyingPlantErr != nil { return nil, errors.Wrap(_humidifyingPlantErr, "Error parsing 'humidifyingPlant' field of HVACHumidityStatusFlags") } @@ -283,15 +288,15 @@ func HVACHumidityStatusFlagsParseWithBuffer(ctx context.Context, readBuffer util // Create the instance return &_HVACHumidityStatusFlags{ - Expansion: expansion, - Error: error, - Busy: busy, - DamperState: damperState, - FanActive: fanActive, - DehumidifyingPlant: dehumidifyingPlant, - HumidifyingPlant: humidifyingPlant, - reservedField0: reservedField0, - }, nil + Expansion: expansion, + Error: error, + Busy: busy, + DamperState: damperState, + FanActive: fanActive, + DehumidifyingPlant: dehumidifyingPlant, + HumidifyingPlant: humidifyingPlant, + reservedField0: reservedField0, + }, nil } func (m *_HVACHumidityStatusFlags) Serialize() ([]byte, error) { @@ -305,7 +310,7 @@ func (m *_HVACHumidityStatusFlags) Serialize() ([]byte, error) { func (m *_HVACHumidityStatusFlags) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("HVACHumidityStatusFlags"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("HVACHumidityStatusFlags"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for HVACHumidityStatusFlags") } @@ -336,7 +341,7 @@ func (m *_HVACHumidityStatusFlags) SerializeWithWriteBuffer(ctx context.Context, if m.reservedField0 != nil { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Overriding reserved field with unexpected value.") reserved = *m.reservedField0 } @@ -388,6 +393,7 @@ func (m *_HVACHumidityStatusFlags) SerializeWithWriteBuffer(ctx context.Context, return nil } + func (m *_HVACHumidityStatusFlags) isHVACHumidityStatusFlags() bool { return true } @@ -402,3 +408,6 @@ func (m *_HVACHumidityStatusFlags) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/HVACHumidityType.go b/plc4go/protocols/cbus/readwrite/model/HVACHumidityType.go index 93b9b565b8b..b5ae15696dd 100644 --- a/plc4go/protocols/cbus/readwrite/model/HVACHumidityType.go +++ b/plc4go/protocols/cbus/readwrite/model/HVACHumidityType.go @@ -34,10 +34,10 @@ type IHVACHumidityType interface { utils.Serializable } -const ( - HVACHumidityType_NONE HVACHumidityType = 0x00 - HVACHumidityType_EVAPORATOR HVACHumidityType = 0x01 - HVACHumidityType_REFRIGERATIVE HVACHumidityType = 0x02 +const( + HVACHumidityType_NONE HVACHumidityType = 0x00 + HVACHumidityType_EVAPORATOR HVACHumidityType = 0x01 + HVACHumidityType_REFRIGERATIVE HVACHumidityType = 0x02 HVACHumidityType_EVAPORATOR_REFRIGERATIVE HVACHumidityType = 0x03 ) @@ -45,7 +45,7 @@ var HVACHumidityTypeValues []HVACHumidityType func init() { _ = errors.New - HVACHumidityTypeValues = []HVACHumidityType{ + HVACHumidityTypeValues = []HVACHumidityType { HVACHumidityType_NONE, HVACHumidityType_EVAPORATOR, HVACHumidityType_REFRIGERATIVE, @@ -55,14 +55,14 @@ func init() { func HVACHumidityTypeByValue(value uint8) (enum HVACHumidityType, ok bool) { switch value { - case 0x00: - return HVACHumidityType_NONE, true - case 0x01: - return HVACHumidityType_EVAPORATOR, true - case 0x02: - return HVACHumidityType_REFRIGERATIVE, true - case 0x03: - return HVACHumidityType_EVAPORATOR_REFRIGERATIVE, true + case 0x00: + return HVACHumidityType_NONE, true + case 0x01: + return HVACHumidityType_EVAPORATOR, true + case 0x02: + return HVACHumidityType_REFRIGERATIVE, true + case 0x03: + return HVACHumidityType_EVAPORATOR_REFRIGERATIVE, true } return 0, false } @@ -81,13 +81,13 @@ func HVACHumidityTypeByName(value string) (enum HVACHumidityType, ok bool) { return 0, false } -func HVACHumidityTypeKnows(value uint8) bool { +func HVACHumidityTypeKnows(value uint8) bool { for _, typeValue := range HVACHumidityTypeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastHVACHumidityType(structType interface{}) HVACHumidityType { @@ -155,3 +155,4 @@ func (e HVACHumidityType) PLC4XEnumName() string { func (e HVACHumidityType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/HVACModeAndFlags.go b/plc4go/protocols/cbus/readwrite/model/HVACModeAndFlags.go index 8b37080e2dd..340b9376d21 100644 --- a/plc4go/protocols/cbus/readwrite/model/HVACModeAndFlags.go +++ b/plc4go/protocols/cbus/readwrite/model/HVACModeAndFlags.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // HVACModeAndFlags is the corresponding interface of HVACModeAndFlags type HVACModeAndFlags interface { @@ -68,15 +70,16 @@ type HVACModeAndFlagsExactly interface { // _HVACModeAndFlags is the data-structure of this message type _HVACModeAndFlags struct { - AuxiliaryLevel bool - Guard bool - Setback bool - Level bool - Mode HVACModeAndFlagsMode + AuxiliaryLevel bool + Guard bool + Setback bool + Level bool + Mode HVACModeAndFlagsMode // Reserved Fields reservedField0 *bool } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -164,14 +167,15 @@ func (m *_HVACModeAndFlags) GetIsLevelRaw() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewHVACModeAndFlags factory function for _HVACModeAndFlags -func NewHVACModeAndFlags(auxiliaryLevel bool, guard bool, setback bool, level bool, mode HVACModeAndFlagsMode) *_HVACModeAndFlags { - return &_HVACModeAndFlags{AuxiliaryLevel: auxiliaryLevel, Guard: guard, Setback: setback, Level: level, Mode: mode} +func NewHVACModeAndFlags( auxiliaryLevel bool , guard bool , setback bool , level bool , mode HVACModeAndFlagsMode ) *_HVACModeAndFlags { +return &_HVACModeAndFlags{ AuxiliaryLevel: auxiliaryLevel , Guard: guard , Setback: setback , Level: level , Mode: mode } } // Deprecated: use the interface for direct cast func CastHVACModeAndFlags(structType interface{}) HVACModeAndFlags { - if casted, ok := structType.(HVACModeAndFlags); ok { + if casted, ok := structType.(HVACModeAndFlags); ok { return casted } if casted, ok := structType.(*HVACModeAndFlags); ok { @@ -191,28 +195,28 @@ func (m *_HVACModeAndFlags) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += 1 // Simple field (auxiliaryLevel) - lengthInBits += 1 + lengthInBits += 1; // A virtual field doesn't have any in- or output. // A virtual field doesn't have any in- or output. // Simple field (guard) - lengthInBits += 1 + lengthInBits += 1; // A virtual field doesn't have any in- or output. // A virtual field doesn't have any in- or output. // Simple field (setback) - lengthInBits += 1 + lengthInBits += 1; // A virtual field doesn't have any in- or output. // A virtual field doesn't have any in- or output. // Simple field (level) - lengthInBits += 1 + lengthInBits += 1; // A virtual field doesn't have any in- or output. @@ -224,6 +228,7 @@ func (m *_HVACModeAndFlags) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_HVACModeAndFlags) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -251,7 +256,7 @@ func HVACModeAndFlagsParseWithBuffer(ctx context.Context, readBuffer utils.ReadB if reserved != bool(false) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -259,7 +264,7 @@ func HVACModeAndFlagsParseWithBuffer(ctx context.Context, readBuffer utils.ReadB } // Simple Field (auxiliaryLevel) - _auxiliaryLevel, _auxiliaryLevelErr := readBuffer.ReadBit("auxiliaryLevel") +_auxiliaryLevel, _auxiliaryLevelErr := readBuffer.ReadBit("auxiliaryLevel") if _auxiliaryLevelErr != nil { return nil, errors.Wrap(_auxiliaryLevelErr, "Error parsing 'auxiliaryLevel' field of HVACModeAndFlags") } @@ -276,7 +281,7 @@ func HVACModeAndFlagsParseWithBuffer(ctx context.Context, readBuffer utils.ReadB _ = isAuxLevelUsed // Simple Field (guard) - _guard, _guardErr := readBuffer.ReadBit("guard") +_guard, _guardErr := readBuffer.ReadBit("guard") if _guardErr != nil { return nil, errors.Wrap(_guardErr, "Error parsing 'guard' field of HVACModeAndFlags") } @@ -293,7 +298,7 @@ func HVACModeAndFlagsParseWithBuffer(ctx context.Context, readBuffer utils.ReadB _ = isGuardEnabled // Simple Field (setback) - _setback, _setbackErr := readBuffer.ReadBit("setback") +_setback, _setbackErr := readBuffer.ReadBit("setback") if _setbackErr != nil { return nil, errors.Wrap(_setbackErr, "Error parsing 'setback' field of HVACModeAndFlags") } @@ -310,7 +315,7 @@ func HVACModeAndFlagsParseWithBuffer(ctx context.Context, readBuffer utils.ReadB _ = isSetbackEnabled // Simple Field (level) - _level, _levelErr := readBuffer.ReadBit("level") +_level, _levelErr := readBuffer.ReadBit("level") if _levelErr != nil { return nil, errors.Wrap(_levelErr, "Error parsing 'level' field of HVACModeAndFlags") } @@ -330,7 +335,7 @@ func HVACModeAndFlagsParseWithBuffer(ctx context.Context, readBuffer utils.ReadB if pullErr := readBuffer.PullContext("mode"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for mode") } - _mode, _modeErr := HVACModeAndFlagsModeParseWithBuffer(ctx, readBuffer) +_mode, _modeErr := HVACModeAndFlagsModeParseWithBuffer(ctx, readBuffer) if _modeErr != nil { return nil, errors.Wrap(_modeErr, "Error parsing 'mode' field of HVACModeAndFlags") } @@ -345,13 +350,13 @@ func HVACModeAndFlagsParseWithBuffer(ctx context.Context, readBuffer utils.ReadB // Create the instance return &_HVACModeAndFlags{ - AuxiliaryLevel: auxiliaryLevel, - Guard: guard, - Setback: setback, - Level: level, - Mode: mode, - reservedField0: reservedField0, - }, nil + AuxiliaryLevel: auxiliaryLevel, + Guard: guard, + Setback: setback, + Level: level, + Mode: mode, + reservedField0: reservedField0, + }, nil } func (m *_HVACModeAndFlags) Serialize() ([]byte, error) { @@ -365,7 +370,7 @@ func (m *_HVACModeAndFlags) Serialize() ([]byte, error) { func (m *_HVACModeAndFlags) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("HVACModeAndFlags"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("HVACModeAndFlags"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for HVACModeAndFlags") } @@ -375,7 +380,7 @@ func (m *_HVACModeAndFlags) SerializeWithWriteBuffer(ctx context.Context, writeB if m.reservedField0 != nil { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Overriding reserved field with unexpected value.") reserved = *m.reservedField0 } @@ -463,6 +468,7 @@ func (m *_HVACModeAndFlags) SerializeWithWriteBuffer(ctx context.Context, writeB return nil } + func (m *_HVACModeAndFlags) isHVACModeAndFlags() bool { return true } @@ -477,3 +483,6 @@ func (m *_HVACModeAndFlags) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/HVACModeAndFlagsMode.go b/plc4go/protocols/cbus/readwrite/model/HVACModeAndFlagsMode.go index 4fd8c3bcec7..28e34b56401 100644 --- a/plc4go/protocols/cbus/readwrite/model/HVACModeAndFlagsMode.go +++ b/plc4go/protocols/cbus/readwrite/model/HVACModeAndFlagsMode.go @@ -34,10 +34,10 @@ type IHVACModeAndFlagsMode interface { utils.Serializable } -const ( - HVACModeAndFlagsMode_OFF HVACModeAndFlagsMode = 0x0 - HVACModeAndFlagsMode_HEAT_ONLY HVACModeAndFlagsMode = 0x1 - HVACModeAndFlagsMode_COOL_ONLY HVACModeAndFlagsMode = 0x2 +const( + HVACModeAndFlagsMode_OFF HVACModeAndFlagsMode = 0x0 + HVACModeAndFlagsMode_HEAT_ONLY HVACModeAndFlagsMode = 0x1 + HVACModeAndFlagsMode_COOL_ONLY HVACModeAndFlagsMode = 0x2 HVACModeAndFlagsMode_HEAT_AND_COOL HVACModeAndFlagsMode = 0x3 HVACModeAndFlagsMode_VENT_FAN_ONLY HVACModeAndFlagsMode = 0x4 ) @@ -46,7 +46,7 @@ var HVACModeAndFlagsModeValues []HVACModeAndFlagsMode func init() { _ = errors.New - HVACModeAndFlagsModeValues = []HVACModeAndFlagsMode{ + HVACModeAndFlagsModeValues = []HVACModeAndFlagsMode { HVACModeAndFlagsMode_OFF, HVACModeAndFlagsMode_HEAT_ONLY, HVACModeAndFlagsMode_COOL_ONLY, @@ -57,16 +57,16 @@ func init() { func HVACModeAndFlagsModeByValue(value uint8) (enum HVACModeAndFlagsMode, ok bool) { switch value { - case 0x0: - return HVACModeAndFlagsMode_OFF, true - case 0x1: - return HVACModeAndFlagsMode_HEAT_ONLY, true - case 0x2: - return HVACModeAndFlagsMode_COOL_ONLY, true - case 0x3: - return HVACModeAndFlagsMode_HEAT_AND_COOL, true - case 0x4: - return HVACModeAndFlagsMode_VENT_FAN_ONLY, true + case 0x0: + return HVACModeAndFlagsMode_OFF, true + case 0x1: + return HVACModeAndFlagsMode_HEAT_ONLY, true + case 0x2: + return HVACModeAndFlagsMode_COOL_ONLY, true + case 0x3: + return HVACModeAndFlagsMode_HEAT_AND_COOL, true + case 0x4: + return HVACModeAndFlagsMode_VENT_FAN_ONLY, true } return 0, false } @@ -87,13 +87,13 @@ func HVACModeAndFlagsModeByName(value string) (enum HVACModeAndFlagsMode, ok boo return 0, false } -func HVACModeAndFlagsModeKnows(value uint8) bool { +func HVACModeAndFlagsModeKnows(value uint8) bool { for _, typeValue := range HVACModeAndFlagsModeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastHVACModeAndFlagsMode(structType interface{}) HVACModeAndFlagsMode { @@ -163,3 +163,4 @@ func (e HVACModeAndFlagsMode) PLC4XEnumName() string { func (e HVACModeAndFlagsMode) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/HVACRawLevels.go b/plc4go/protocols/cbus/readwrite/model/HVACRawLevels.go index edf4eee90c8..34d09661be4 100644 --- a/plc4go/protocols/cbus/readwrite/model/HVACRawLevels.go +++ b/plc4go/protocols/cbus/readwrite/model/HVACRawLevels.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // HVACRawLevels is the corresponding interface of HVACRawLevels type HVACRawLevels interface { @@ -46,9 +48,10 @@ type HVACRawLevelsExactly interface { // _HVACRawLevels is the data-structure of this message type _HVACRawLevels struct { - RawValue int16 + RawValue int16 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -78,14 +81,15 @@ func (m *_HVACRawLevels) GetValueInPercent() float32 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewHVACRawLevels factory function for _HVACRawLevels -func NewHVACRawLevels(rawValue int16) *_HVACRawLevels { - return &_HVACRawLevels{RawValue: rawValue} +func NewHVACRawLevels( rawValue int16 ) *_HVACRawLevels { +return &_HVACRawLevels{ RawValue: rawValue } } // Deprecated: use the interface for direct cast func CastHVACRawLevels(structType interface{}) HVACRawLevels { - if casted, ok := structType.(HVACRawLevels); ok { + if casted, ok := structType.(HVACRawLevels); ok { return casted } if casted, ok := structType.(*HVACRawLevels); ok { @@ -102,13 +106,14 @@ func (m *_HVACRawLevels) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (rawValue) - lengthInBits += 16 + lengthInBits += 16; // A virtual field doesn't have any in- or output. return lengthInBits } + func (m *_HVACRawLevels) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -127,7 +132,7 @@ func HVACRawLevelsParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff _ = currentPos // Simple Field (rawValue) - _rawValue, _rawValueErr := readBuffer.ReadInt16("rawValue", 16) +_rawValue, _rawValueErr := readBuffer.ReadInt16("rawValue", 16) if _rawValueErr != nil { return nil, errors.Wrap(_rawValueErr, "Error parsing 'rawValue' field of HVACRawLevels") } @@ -144,8 +149,8 @@ func HVACRawLevelsParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff // Create the instance return &_HVACRawLevels{ - RawValue: rawValue, - }, nil + RawValue: rawValue, + }, nil } func (m *_HVACRawLevels) Serialize() ([]byte, error) { @@ -159,7 +164,7 @@ func (m *_HVACRawLevels) Serialize() ([]byte, error) { func (m *_HVACRawLevels) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("HVACRawLevels"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("HVACRawLevels"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for HVACRawLevels") } @@ -180,6 +185,7 @@ func (m *_HVACRawLevels) SerializeWithWriteBuffer(ctx context.Context, writeBuff return nil } + func (m *_HVACRawLevels) isHVACRawLevels() bool { return true } @@ -194,3 +200,6 @@ func (m *_HVACRawLevels) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/HVACSensorStatus.go b/plc4go/protocols/cbus/readwrite/model/HVACSensorStatus.go index 9fb3dc979aa..f9d4acb10cf 100644 --- a/plc4go/protocols/cbus/readwrite/model/HVACSensorStatus.go +++ b/plc4go/protocols/cbus/readwrite/model/HVACSensorStatus.go @@ -34,18 +34,18 @@ type IHVACSensorStatus interface { utils.Serializable } -const ( - HVACSensorStatus_NO_ERROR_OPERATING_NORMALLY HVACSensorStatus = 0x00 +const( + HVACSensorStatus_NO_ERROR_OPERATING_NORMALLY HVACSensorStatus = 0x00 HVACSensorStatus_SENSOR_OPERATING_IN_RELAXED_ACCURACY_BAND HVACSensorStatus = 0x01 - HVACSensorStatus_SENSOR_OUT_OF_CALIBRATION HVACSensorStatus = 0x02 - HVACSensorStatus_SENSOR_TOTAL_FAILURE HVACSensorStatus = 0x03 + HVACSensorStatus_SENSOR_OUT_OF_CALIBRATION HVACSensorStatus = 0x02 + HVACSensorStatus_SENSOR_TOTAL_FAILURE HVACSensorStatus = 0x03 ) var HVACSensorStatusValues []HVACSensorStatus func init() { _ = errors.New - HVACSensorStatusValues = []HVACSensorStatus{ + HVACSensorStatusValues = []HVACSensorStatus { HVACSensorStatus_NO_ERROR_OPERATING_NORMALLY, HVACSensorStatus_SENSOR_OPERATING_IN_RELAXED_ACCURACY_BAND, HVACSensorStatus_SENSOR_OUT_OF_CALIBRATION, @@ -55,14 +55,14 @@ func init() { func HVACSensorStatusByValue(value uint8) (enum HVACSensorStatus, ok bool) { switch value { - case 0x00: - return HVACSensorStatus_NO_ERROR_OPERATING_NORMALLY, true - case 0x01: - return HVACSensorStatus_SENSOR_OPERATING_IN_RELAXED_ACCURACY_BAND, true - case 0x02: - return HVACSensorStatus_SENSOR_OUT_OF_CALIBRATION, true - case 0x03: - return HVACSensorStatus_SENSOR_TOTAL_FAILURE, true + case 0x00: + return HVACSensorStatus_NO_ERROR_OPERATING_NORMALLY, true + case 0x01: + return HVACSensorStatus_SENSOR_OPERATING_IN_RELAXED_ACCURACY_BAND, true + case 0x02: + return HVACSensorStatus_SENSOR_OUT_OF_CALIBRATION, true + case 0x03: + return HVACSensorStatus_SENSOR_TOTAL_FAILURE, true } return 0, false } @@ -81,13 +81,13 @@ func HVACSensorStatusByName(value string) (enum HVACSensorStatus, ok bool) { return 0, false } -func HVACSensorStatusKnows(value uint8) bool { +func HVACSensorStatusKnows(value uint8) bool { for _, typeValue := range HVACSensorStatusValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastHVACSensorStatus(structType interface{}) HVACSensorStatus { @@ -155,3 +155,4 @@ func (e HVACSensorStatus) PLC4XEnumName() string { func (e HVACSensorStatus) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/HVACStartTime.go b/plc4go/protocols/cbus/readwrite/model/HVACStartTime.go index 38bc704908f..3e2c48c5e01 100644 --- a/plc4go/protocols/cbus/readwrite/model/HVACStartTime.go +++ b/plc4go/protocols/cbus/readwrite/model/HVACStartTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // HVACStartTime is the corresponding interface of HVACStartTime type HVACStartTime interface { @@ -54,9 +56,10 @@ type HVACStartTimeExactly interface { // _HVACStartTime is the data-structure of this message type _HVACStartTime struct { - MinutesSinceSunday12AM uint16 + MinutesSinceSunday12AM uint16 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -110,14 +113,15 @@ func (m *_HVACStartTime) GetMinute() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewHVACStartTime factory function for _HVACStartTime -func NewHVACStartTime(minutesSinceSunday12AM uint16) *_HVACStartTime { - return &_HVACStartTime{MinutesSinceSunday12AM: minutesSinceSunday12AM} +func NewHVACStartTime( minutesSinceSunday12AM uint16 ) *_HVACStartTime { +return &_HVACStartTime{ MinutesSinceSunday12AM: minutesSinceSunday12AM } } // Deprecated: use the interface for direct cast func CastHVACStartTime(structType interface{}) HVACStartTime { - if casted, ok := structType.(HVACStartTime); ok { + if casted, ok := structType.(HVACStartTime); ok { return casted } if casted, ok := structType.(*HVACStartTime); ok { @@ -134,7 +138,7 @@ func (m *_HVACStartTime) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (minutesSinceSunday12AM) - lengthInBits += 16 + lengthInBits += 16; // A virtual field doesn't have any in- or output. @@ -149,6 +153,7 @@ func (m *_HVACStartTime) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_HVACStartTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -167,7 +172,7 @@ func HVACStartTimeParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff _ = currentPos // Simple Field (minutesSinceSunday12AM) - _minutesSinceSunday12AM, _minutesSinceSunday12AMErr := readBuffer.ReadUint16("minutesSinceSunday12AM", 16) +_minutesSinceSunday12AM, _minutesSinceSunday12AMErr := readBuffer.ReadUint16("minutesSinceSunday12AM", 16) if _minutesSinceSunday12AMErr != nil { return nil, errors.Wrap(_minutesSinceSunday12AMErr, "Error parsing 'minutesSinceSunday12AM' field of HVACStartTime") } @@ -204,8 +209,8 @@ func HVACStartTimeParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff // Create the instance return &_HVACStartTime{ - MinutesSinceSunday12AM: minutesSinceSunday12AM, - }, nil + MinutesSinceSunday12AM: minutesSinceSunday12AM, + }, nil } func (m *_HVACStartTime) Serialize() ([]byte, error) { @@ -219,7 +224,7 @@ func (m *_HVACStartTime) Serialize() ([]byte, error) { func (m *_HVACStartTime) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("HVACStartTime"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("HVACStartTime"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for HVACStartTime") } @@ -256,6 +261,7 @@ func (m *_HVACStartTime) SerializeWithWriteBuffer(ctx context.Context, writeBuff return nil } + func (m *_HVACStartTime) isHVACStartTime() bool { return true } @@ -270,3 +276,6 @@ func (m *_HVACStartTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/HVACStatusFlags.go b/plc4go/protocols/cbus/readwrite/model/HVACStatusFlags.go index e9e2c9a3654..7285dc9bf57 100644 --- a/plc4go/protocols/cbus/readwrite/model/HVACStatusFlags.go +++ b/plc4go/protocols/cbus/readwrite/model/HVACStatusFlags.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // HVACStatusFlags is the corresponding interface of HVACStatusFlags type HVACStatusFlags interface { @@ -60,17 +62,18 @@ type HVACStatusFlagsExactly interface { // _HVACStatusFlags is the data-structure of this message type _HVACStatusFlags struct { - Expansion bool - Error bool - Busy bool - DamperState bool - FanActive bool - HeatingPlant bool - CoolingPlant bool + Expansion bool + Error bool + Busy bool + DamperState bool + FanActive bool + HeatingPlant bool + CoolingPlant bool // Reserved Fields reservedField0 *bool } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -130,14 +133,15 @@ func (m *_HVACStatusFlags) GetIsDamperStateOpen() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewHVACStatusFlags factory function for _HVACStatusFlags -func NewHVACStatusFlags(expansion bool, error bool, busy bool, damperState bool, fanActive bool, heatingPlant bool, coolingPlant bool) *_HVACStatusFlags { - return &_HVACStatusFlags{Expansion: expansion, Error: error, Busy: busy, DamperState: damperState, FanActive: fanActive, HeatingPlant: heatingPlant, CoolingPlant: coolingPlant} +func NewHVACStatusFlags( expansion bool , error bool , busy bool , damperState bool , fanActive bool , heatingPlant bool , coolingPlant bool ) *_HVACStatusFlags { +return &_HVACStatusFlags{ Expansion: expansion , Error: error , Busy: busy , DamperState: damperState , FanActive: fanActive , HeatingPlant: heatingPlant , CoolingPlant: coolingPlant } } // Deprecated: use the interface for direct cast func CastHVACStatusFlags(structType interface{}) HVACStatusFlags { - if casted, ok := structType.(HVACStatusFlags); ok { + if casted, ok := structType.(HVACStatusFlags); ok { return casted } if casted, ok := structType.(*HVACStatusFlags); ok { @@ -154,36 +158,37 @@ func (m *_HVACStatusFlags) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (expansion) - lengthInBits += 1 + lengthInBits += 1; // Simple field (error) - lengthInBits += 1 + lengthInBits += 1; // Simple field (busy) - lengthInBits += 1 + lengthInBits += 1; // Reserved Field (reserved) lengthInBits += 1 // Simple field (damperState) - lengthInBits += 1 + lengthInBits += 1; // A virtual field doesn't have any in- or output. // A virtual field doesn't have any in- or output. // Simple field (fanActive) - lengthInBits += 1 + lengthInBits += 1; // Simple field (heatingPlant) - lengthInBits += 1 + lengthInBits += 1; // Simple field (coolingPlant) - lengthInBits += 1 + lengthInBits += 1; return lengthInBits } + func (m *_HVACStatusFlags) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -202,21 +207,21 @@ func HVACStatusFlagsParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu _ = currentPos // Simple Field (expansion) - _expansion, _expansionErr := readBuffer.ReadBit("expansion") +_expansion, _expansionErr := readBuffer.ReadBit("expansion") if _expansionErr != nil { return nil, errors.Wrap(_expansionErr, "Error parsing 'expansion' field of HVACStatusFlags") } expansion := _expansion // Simple Field (error) - _error, _errorErr := readBuffer.ReadBit("error") +_error, _errorErr := readBuffer.ReadBit("error") if _errorErr != nil { return nil, errors.Wrap(_errorErr, "Error parsing 'error' field of HVACStatusFlags") } error := _error // Simple Field (busy) - _busy, _busyErr := readBuffer.ReadBit("busy") +_busy, _busyErr := readBuffer.ReadBit("busy") if _busyErr != nil { return nil, errors.Wrap(_busyErr, "Error parsing 'busy' field of HVACStatusFlags") } @@ -232,7 +237,7 @@ func HVACStatusFlagsParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu if reserved != bool(false) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -240,7 +245,7 @@ func HVACStatusFlagsParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu } // Simple Field (damperState) - _damperState, _damperStateErr := readBuffer.ReadBit("damperState") +_damperState, _damperStateErr := readBuffer.ReadBit("damperState") if _damperStateErr != nil { return nil, errors.Wrap(_damperStateErr, "Error parsing 'damperState' field of HVACStatusFlags") } @@ -257,21 +262,21 @@ func HVACStatusFlagsParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu _ = isDamperStateOpen // Simple Field (fanActive) - _fanActive, _fanActiveErr := readBuffer.ReadBit("fanActive") +_fanActive, _fanActiveErr := readBuffer.ReadBit("fanActive") if _fanActiveErr != nil { return nil, errors.Wrap(_fanActiveErr, "Error parsing 'fanActive' field of HVACStatusFlags") } fanActive := _fanActive // Simple Field (heatingPlant) - _heatingPlant, _heatingPlantErr := readBuffer.ReadBit("heatingPlant") +_heatingPlant, _heatingPlantErr := readBuffer.ReadBit("heatingPlant") if _heatingPlantErr != nil { return nil, errors.Wrap(_heatingPlantErr, "Error parsing 'heatingPlant' field of HVACStatusFlags") } heatingPlant := _heatingPlant // Simple Field (coolingPlant) - _coolingPlant, _coolingPlantErr := readBuffer.ReadBit("coolingPlant") +_coolingPlant, _coolingPlantErr := readBuffer.ReadBit("coolingPlant") if _coolingPlantErr != nil { return nil, errors.Wrap(_coolingPlantErr, "Error parsing 'coolingPlant' field of HVACStatusFlags") } @@ -283,15 +288,15 @@ func HVACStatusFlagsParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu // Create the instance return &_HVACStatusFlags{ - Expansion: expansion, - Error: error, - Busy: busy, - DamperState: damperState, - FanActive: fanActive, - HeatingPlant: heatingPlant, - CoolingPlant: coolingPlant, - reservedField0: reservedField0, - }, nil + Expansion: expansion, + Error: error, + Busy: busy, + DamperState: damperState, + FanActive: fanActive, + HeatingPlant: heatingPlant, + CoolingPlant: coolingPlant, + reservedField0: reservedField0, + }, nil } func (m *_HVACStatusFlags) Serialize() ([]byte, error) { @@ -305,7 +310,7 @@ func (m *_HVACStatusFlags) Serialize() ([]byte, error) { func (m *_HVACStatusFlags) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("HVACStatusFlags"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("HVACStatusFlags"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for HVACStatusFlags") } @@ -336,7 +341,7 @@ func (m *_HVACStatusFlags) SerializeWithWriteBuffer(ctx context.Context, writeBu if m.reservedField0 != nil { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Overriding reserved field with unexpected value.") reserved = *m.reservedField0 } @@ -388,6 +393,7 @@ func (m *_HVACStatusFlags) SerializeWithWriteBuffer(ctx context.Context, writeBu return nil } + func (m *_HVACStatusFlags) isHVACStatusFlags() bool { return true } @@ -402,3 +408,6 @@ func (m *_HVACStatusFlags) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/HVACTemperature.go b/plc4go/protocols/cbus/readwrite/model/HVACTemperature.go index f439ccc9ef9..869674e2895 100644 --- a/plc4go/protocols/cbus/readwrite/model/HVACTemperature.go +++ b/plc4go/protocols/cbus/readwrite/model/HVACTemperature.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // HVACTemperature is the corresponding interface of HVACTemperature type HVACTemperature interface { @@ -46,9 +48,10 @@ type HVACTemperatureExactly interface { // _HVACTemperature is the data-structure of this message type _HVACTemperature struct { - TemperatureValue int16 + TemperatureValue int16 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -78,14 +81,15 @@ func (m *_HVACTemperature) GetTemperatureInCelcius() float32 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewHVACTemperature factory function for _HVACTemperature -func NewHVACTemperature(temperatureValue int16) *_HVACTemperature { - return &_HVACTemperature{TemperatureValue: temperatureValue} +func NewHVACTemperature( temperatureValue int16 ) *_HVACTemperature { +return &_HVACTemperature{ TemperatureValue: temperatureValue } } // Deprecated: use the interface for direct cast func CastHVACTemperature(structType interface{}) HVACTemperature { - if casted, ok := structType.(HVACTemperature); ok { + if casted, ok := structType.(HVACTemperature); ok { return casted } if casted, ok := structType.(*HVACTemperature); ok { @@ -102,13 +106,14 @@ func (m *_HVACTemperature) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (temperatureValue) - lengthInBits += 16 + lengthInBits += 16; // A virtual field doesn't have any in- or output. return lengthInBits } + func (m *_HVACTemperature) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -127,7 +132,7 @@ func HVACTemperatureParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu _ = currentPos // Simple Field (temperatureValue) - _temperatureValue, _temperatureValueErr := readBuffer.ReadInt16("temperatureValue", 16) +_temperatureValue, _temperatureValueErr := readBuffer.ReadInt16("temperatureValue", 16) if _temperatureValueErr != nil { return nil, errors.Wrap(_temperatureValueErr, "Error parsing 'temperatureValue' field of HVACTemperature") } @@ -144,8 +149,8 @@ func HVACTemperatureParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu // Create the instance return &_HVACTemperature{ - TemperatureValue: temperatureValue, - }, nil + TemperatureValue: temperatureValue, + }, nil } func (m *_HVACTemperature) Serialize() ([]byte, error) { @@ -159,7 +164,7 @@ func (m *_HVACTemperature) Serialize() ([]byte, error) { func (m *_HVACTemperature) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("HVACTemperature"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("HVACTemperature"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for HVACTemperature") } @@ -180,6 +185,7 @@ func (m *_HVACTemperature) SerializeWithWriteBuffer(ctx context.Context, writeBu return nil } + func (m *_HVACTemperature) isHVACTemperature() bool { return true } @@ -194,3 +200,6 @@ func (m *_HVACTemperature) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/HVACType.go b/plc4go/protocols/cbus/readwrite/model/HVACType.go index 33f5bb2a06f..79ee66a8a5c 100644 --- a/plc4go/protocols/cbus/readwrite/model/HVACType.go +++ b/plc4go/protocols/cbus/readwrite/model/HVACType.go @@ -34,26 +34,26 @@ type IHVACType interface { utils.Serializable } -const ( - HVACType_NONE HVACType = 0x00 - HVACType_FURNACE_GAS_OIL_ELECTRIC HVACType = 0x01 - HVACType_EVAPORATIVE HVACType = 0x02 - HVACType_HEAT_PUMP_REVERSE_CYCLE HVACType = 0x03 - HVACType_HEAT_PUMP_HEATING_ONLY HVACType = 0x04 - HVACType_HEAT_PUMP_COOLING_ONLY HVACType = 0x05 - HVACType_FURNANCE_EVAP_COOLING HVACType = 0x06 +const( + HVACType_NONE HVACType = 0x00 + HVACType_FURNACE_GAS_OIL_ELECTRIC HVACType = 0x01 + HVACType_EVAPORATIVE HVACType = 0x02 + HVACType_HEAT_PUMP_REVERSE_CYCLE HVACType = 0x03 + HVACType_HEAT_PUMP_HEATING_ONLY HVACType = 0x04 + HVACType_HEAT_PUMP_COOLING_ONLY HVACType = 0x05 + HVACType_FURNANCE_EVAP_COOLING HVACType = 0x06 HVACType_FURNANCE_HEAT_PUMP_COOLING_ONLY HVACType = 0x07 - HVACType_HYDRONIC HVACType = 0x08 + HVACType_HYDRONIC HVACType = 0x08 HVACType_HYDRONIC_HEAT_PUMP_COOLING_ONLY HVACType = 0x09 - HVACType_HYDRONIC_EVAPORATIVE HVACType = 0x0A - HVACType_ANY HVACType = 0xFF + HVACType_HYDRONIC_EVAPORATIVE HVACType = 0x0A + HVACType_ANY HVACType = 0xFF ) var HVACTypeValues []HVACType func init() { _ = errors.New - HVACTypeValues = []HVACType{ + HVACTypeValues = []HVACType { HVACType_NONE, HVACType_FURNACE_GAS_OIL_ELECTRIC, HVACType_EVAPORATIVE, @@ -71,30 +71,30 @@ func init() { func HVACTypeByValue(value uint8) (enum HVACType, ok bool) { switch value { - case 0x00: - return HVACType_NONE, true - case 0x01: - return HVACType_FURNACE_GAS_OIL_ELECTRIC, true - case 0x02: - return HVACType_EVAPORATIVE, true - case 0x03: - return HVACType_HEAT_PUMP_REVERSE_CYCLE, true - case 0x04: - return HVACType_HEAT_PUMP_HEATING_ONLY, true - case 0x05: - return HVACType_HEAT_PUMP_COOLING_ONLY, true - case 0x06: - return HVACType_FURNANCE_EVAP_COOLING, true - case 0x07: - return HVACType_FURNANCE_HEAT_PUMP_COOLING_ONLY, true - case 0x08: - return HVACType_HYDRONIC, true - case 0x09: - return HVACType_HYDRONIC_HEAT_PUMP_COOLING_ONLY, true - case 0x0A: - return HVACType_HYDRONIC_EVAPORATIVE, true - case 0xFF: - return HVACType_ANY, true + case 0x00: + return HVACType_NONE, true + case 0x01: + return HVACType_FURNACE_GAS_OIL_ELECTRIC, true + case 0x02: + return HVACType_EVAPORATIVE, true + case 0x03: + return HVACType_HEAT_PUMP_REVERSE_CYCLE, true + case 0x04: + return HVACType_HEAT_PUMP_HEATING_ONLY, true + case 0x05: + return HVACType_HEAT_PUMP_COOLING_ONLY, true + case 0x06: + return HVACType_FURNANCE_EVAP_COOLING, true + case 0x07: + return HVACType_FURNANCE_HEAT_PUMP_COOLING_ONLY, true + case 0x08: + return HVACType_HYDRONIC, true + case 0x09: + return HVACType_HYDRONIC_HEAT_PUMP_COOLING_ONLY, true + case 0x0A: + return HVACType_HYDRONIC_EVAPORATIVE, true + case 0xFF: + return HVACType_ANY, true } return 0, false } @@ -129,13 +129,13 @@ func HVACTypeByName(value string) (enum HVACType, ok bool) { return 0, false } -func HVACTypeKnows(value uint8) bool { +func HVACTypeKnows(value uint8) bool { for _, typeValue := range HVACTypeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastHVACType(structType interface{}) HVACType { @@ -219,3 +219,4 @@ func (e HVACType) PLC4XEnumName() string { func (e HVACType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/HVACZoneList.go b/plc4go/protocols/cbus/readwrite/model/HVACZoneList.go index 8532d397aec..e355a1bb40c 100644 --- a/plc4go/protocols/cbus/readwrite/model/HVACZoneList.go +++ b/plc4go/protocols/cbus/readwrite/model/HVACZoneList.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // HVACZoneList is the corresponding interface of HVACZoneList type HVACZoneList interface { @@ -60,16 +62,17 @@ type HVACZoneListExactly interface { // _HVACZoneList is the data-structure of this message type _HVACZoneList struct { - Expansion bool - Zone6 bool - Zone5 bool - Zone4 bool - Zone3 bool - Zone2 bool - Zone1 bool - Zone0 bool + Expansion bool + Zone6 bool + Zone5 bool + Zone4 bool + Zone3 bool + Zone2 bool + Zone1 bool + Zone0 bool } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -127,14 +130,15 @@ func (m *_HVACZoneList) GetUnswitchedZone() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewHVACZoneList factory function for _HVACZoneList -func NewHVACZoneList(expansion bool, zone6 bool, zone5 bool, zone4 bool, zone3 bool, zone2 bool, zone1 bool, zone0 bool) *_HVACZoneList { - return &_HVACZoneList{Expansion: expansion, Zone6: zone6, Zone5: zone5, Zone4: zone4, Zone3: zone3, Zone2: zone2, Zone1: zone1, Zone0: zone0} +func NewHVACZoneList( expansion bool , zone6 bool , zone5 bool , zone4 bool , zone3 bool , zone2 bool , zone1 bool , zone0 bool ) *_HVACZoneList { +return &_HVACZoneList{ Expansion: expansion , Zone6: zone6 , Zone5: zone5 , Zone4: zone4 , Zone3: zone3 , Zone2: zone2 , Zone1: zone1 , Zone0: zone0 } } // Deprecated: use the interface for direct cast func CastHVACZoneList(structType interface{}) HVACZoneList { - if casted, ok := structType.(HVACZoneList); ok { + if casted, ok := structType.(HVACZoneList); ok { return casted } if casted, ok := structType.(*HVACZoneList); ok { @@ -151,34 +155,35 @@ func (m *_HVACZoneList) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (expansion) - lengthInBits += 1 + lengthInBits += 1; // Simple field (zone6) - lengthInBits += 1 + lengthInBits += 1; // Simple field (zone5) - lengthInBits += 1 + lengthInBits += 1; // Simple field (zone4) - lengthInBits += 1 + lengthInBits += 1; // Simple field (zone3) - lengthInBits += 1 + lengthInBits += 1; // Simple field (zone2) - lengthInBits += 1 + lengthInBits += 1; // Simple field (zone1) - lengthInBits += 1 + lengthInBits += 1; // Simple field (zone0) - lengthInBits += 1 + lengthInBits += 1; // A virtual field doesn't have any in- or output. return lengthInBits } + func (m *_HVACZoneList) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -197,56 +202,56 @@ func HVACZoneListParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe _ = currentPos // Simple Field (expansion) - _expansion, _expansionErr := readBuffer.ReadBit("expansion") +_expansion, _expansionErr := readBuffer.ReadBit("expansion") if _expansionErr != nil { return nil, errors.Wrap(_expansionErr, "Error parsing 'expansion' field of HVACZoneList") } expansion := _expansion // Simple Field (zone6) - _zone6, _zone6Err := readBuffer.ReadBit("zone6") +_zone6, _zone6Err := readBuffer.ReadBit("zone6") if _zone6Err != nil { return nil, errors.Wrap(_zone6Err, "Error parsing 'zone6' field of HVACZoneList") } zone6 := _zone6 // Simple Field (zone5) - _zone5, _zone5Err := readBuffer.ReadBit("zone5") +_zone5, _zone5Err := readBuffer.ReadBit("zone5") if _zone5Err != nil { return nil, errors.Wrap(_zone5Err, "Error parsing 'zone5' field of HVACZoneList") } zone5 := _zone5 // Simple Field (zone4) - _zone4, _zone4Err := readBuffer.ReadBit("zone4") +_zone4, _zone4Err := readBuffer.ReadBit("zone4") if _zone4Err != nil { return nil, errors.Wrap(_zone4Err, "Error parsing 'zone4' field of HVACZoneList") } zone4 := _zone4 // Simple Field (zone3) - _zone3, _zone3Err := readBuffer.ReadBit("zone3") +_zone3, _zone3Err := readBuffer.ReadBit("zone3") if _zone3Err != nil { return nil, errors.Wrap(_zone3Err, "Error parsing 'zone3' field of HVACZoneList") } zone3 := _zone3 // Simple Field (zone2) - _zone2, _zone2Err := readBuffer.ReadBit("zone2") +_zone2, _zone2Err := readBuffer.ReadBit("zone2") if _zone2Err != nil { return nil, errors.Wrap(_zone2Err, "Error parsing 'zone2' field of HVACZoneList") } zone2 := _zone2 // Simple Field (zone1) - _zone1, _zone1Err := readBuffer.ReadBit("zone1") +_zone1, _zone1Err := readBuffer.ReadBit("zone1") if _zone1Err != nil { return nil, errors.Wrap(_zone1Err, "Error parsing 'zone1' field of HVACZoneList") } zone1 := _zone1 // Simple Field (zone0) - _zone0, _zone0Err := readBuffer.ReadBit("zone0") +_zone0, _zone0Err := readBuffer.ReadBit("zone0") if _zone0Err != nil { return nil, errors.Wrap(_zone0Err, "Error parsing 'zone0' field of HVACZoneList") } @@ -263,15 +268,15 @@ func HVACZoneListParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe // Create the instance return &_HVACZoneList{ - Expansion: expansion, - Zone6: zone6, - Zone5: zone5, - Zone4: zone4, - Zone3: zone3, - Zone2: zone2, - Zone1: zone1, - Zone0: zone0, - }, nil + Expansion: expansion, + Zone6: zone6, + Zone5: zone5, + Zone4: zone4, + Zone3: zone3, + Zone2: zone2, + Zone1: zone1, + Zone0: zone0, + }, nil } func (m *_HVACZoneList) Serialize() ([]byte, error) { @@ -285,7 +290,7 @@ func (m *_HVACZoneList) Serialize() ([]byte, error) { func (m *_HVACZoneList) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("HVACZoneList"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("HVACZoneList"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for HVACZoneList") } @@ -355,6 +360,7 @@ func (m *_HVACZoneList) SerializeWithWriteBuffer(ctx context.Context, writeBuffe return nil } + func (m *_HVACZoneList) isHVACZoneList() bool { return true } @@ -369,3 +375,6 @@ func (m *_HVACZoneList) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommand.go b/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommand.go index 27a6fd5c4a0..c89a1d2437a 100644 --- a/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommand.go +++ b/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommand.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // IdentifyReplyCommand is the corresponding interface of IdentifyReplyCommand type IdentifyReplyCommand interface { @@ -56,6 +58,7 @@ type _IdentifyReplyCommandChildRequirements interface { GetAttribute() Attribute } + type IdentifyReplyCommandParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child IdentifyReplyCommand, serializeChildFunction func() error) error GetTypeName() string @@ -63,21 +66,22 @@ type IdentifyReplyCommandParent interface { type IdentifyReplyCommandChild interface { utils.Serializable - InitializeParent(parent IdentifyReplyCommand) +InitializeParent(parent IdentifyReplyCommand ) GetParent() *IdentifyReplyCommand GetTypeName() string IdentifyReplyCommand } + // NewIdentifyReplyCommand factory function for _IdentifyReplyCommand -func NewIdentifyReplyCommand(numBytes uint8) *_IdentifyReplyCommand { - return &_IdentifyReplyCommand{NumBytes: numBytes} +func NewIdentifyReplyCommand( numBytes uint8 ) *_IdentifyReplyCommand { +return &_IdentifyReplyCommand{ NumBytes: numBytes } } // Deprecated: use the interface for direct cast func CastIdentifyReplyCommand(structType interface{}) IdentifyReplyCommand { - if casted, ok := structType.(IdentifyReplyCommand); ok { + if casted, ok := structType.(IdentifyReplyCommand); ok { return casted } if casted, ok := structType.(*IdentifyReplyCommand); ok { @@ -90,6 +94,7 @@ func (m *_IdentifyReplyCommand) GetTypeName() string { return "IdentifyReplyCommand" } + func (m *_IdentifyReplyCommand) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -116,48 +121,48 @@ func IdentifyReplyCommandParseWithBuffer(ctx context.Context, readBuffer utils.R // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type IdentifyReplyCommandChildSerializeRequirement interface { IdentifyReplyCommand - InitializeParent(IdentifyReplyCommand) + InitializeParent(IdentifyReplyCommand ) GetParent() IdentifyReplyCommand } var _childTemp interface{} var _child IdentifyReplyCommandChildSerializeRequirement var typeSwitchError error switch { - case attribute == Attribute_Manufacturer: // IdentifyReplyCommandManufacturer +case attribute == Attribute_Manufacturer : // IdentifyReplyCommandManufacturer _childTemp, typeSwitchError = IdentifyReplyCommandManufacturerParseWithBuffer(ctx, readBuffer, attribute, numBytes) - case attribute == Attribute_Type: // IdentifyReplyCommandType +case attribute == Attribute_Type : // IdentifyReplyCommandType _childTemp, typeSwitchError = IdentifyReplyCommandTypeParseWithBuffer(ctx, readBuffer, attribute, numBytes) - case attribute == Attribute_FirmwareVersion: // IdentifyReplyCommandFirmwareVersion +case attribute == Attribute_FirmwareVersion : // IdentifyReplyCommandFirmwareVersion _childTemp, typeSwitchError = IdentifyReplyCommandFirmwareVersionParseWithBuffer(ctx, readBuffer, attribute, numBytes) - case attribute == Attribute_Summary: // IdentifyReplyCommandSummary +case attribute == Attribute_Summary : // IdentifyReplyCommandSummary _childTemp, typeSwitchError = IdentifyReplyCommandSummaryParseWithBuffer(ctx, readBuffer, attribute, numBytes) - case attribute == Attribute_ExtendedDiagnosticSummary: // IdentifyReplyCommandExtendedDiagnosticSummary +case attribute == Attribute_ExtendedDiagnosticSummary : // IdentifyReplyCommandExtendedDiagnosticSummary _childTemp, typeSwitchError = IdentifyReplyCommandExtendedDiagnosticSummaryParseWithBuffer(ctx, readBuffer, attribute, numBytes) - case attribute == Attribute_NetworkTerminalLevels: // IdentifyReplyCommandNetworkTerminalLevels +case attribute == Attribute_NetworkTerminalLevels : // IdentifyReplyCommandNetworkTerminalLevels _childTemp, typeSwitchError = IdentifyReplyCommandNetworkTerminalLevelsParseWithBuffer(ctx, readBuffer, attribute, numBytes) - case attribute == Attribute_TerminalLevel: // IdentifyReplyCommandTerminalLevels +case attribute == Attribute_TerminalLevel : // IdentifyReplyCommandTerminalLevels _childTemp, typeSwitchError = IdentifyReplyCommandTerminalLevelsParseWithBuffer(ctx, readBuffer, attribute, numBytes) - case attribute == Attribute_NetworkVoltage: // IdentifyReplyCommandNetworkVoltage +case attribute == Attribute_NetworkVoltage : // IdentifyReplyCommandNetworkVoltage _childTemp, typeSwitchError = IdentifyReplyCommandNetworkVoltageParseWithBuffer(ctx, readBuffer, attribute, numBytes) - case attribute == Attribute_GAVValuesCurrent: // IdentifyReplyCommandGAVValuesCurrent +case attribute == Attribute_GAVValuesCurrent : // IdentifyReplyCommandGAVValuesCurrent _childTemp, typeSwitchError = IdentifyReplyCommandGAVValuesCurrentParseWithBuffer(ctx, readBuffer, attribute, numBytes) - case attribute == Attribute_GAVValuesStored: // IdentifyReplyCommandGAVValuesStored +case attribute == Attribute_GAVValuesStored : // IdentifyReplyCommandGAVValuesStored _childTemp, typeSwitchError = IdentifyReplyCommandGAVValuesStoredParseWithBuffer(ctx, readBuffer, attribute, numBytes) - case attribute == Attribute_GAVPhysicalAddresses: // IdentifyReplyCommandGAVPhysicalAddresses +case attribute == Attribute_GAVPhysicalAddresses : // IdentifyReplyCommandGAVPhysicalAddresses _childTemp, typeSwitchError = IdentifyReplyCommandGAVPhysicalAddressesParseWithBuffer(ctx, readBuffer, attribute, numBytes) - case attribute == Attribute_LogicalAssignment: // IdentifyReplyCommandLogicalAssignment +case attribute == Attribute_LogicalAssignment : // IdentifyReplyCommandLogicalAssignment _childTemp, typeSwitchError = IdentifyReplyCommandLogicalAssignmentParseWithBuffer(ctx, readBuffer, attribute, numBytes) - case attribute == Attribute_Delays: // IdentifyReplyCommandDelays +case attribute == Attribute_Delays : // IdentifyReplyCommandDelays _childTemp, typeSwitchError = IdentifyReplyCommandDelaysParseWithBuffer(ctx, readBuffer, attribute, numBytes) - case attribute == Attribute_MinimumLevels: // IdentifyReplyCommandMinimumLevels +case attribute == Attribute_MinimumLevels : // IdentifyReplyCommandMinimumLevels _childTemp, typeSwitchError = IdentifyReplyCommandMinimumLevelsParseWithBuffer(ctx, readBuffer, attribute, numBytes) - case attribute == Attribute_MaximumLevels: // IdentifyReplyCommandMaximumLevels +case attribute == Attribute_MaximumLevels : // IdentifyReplyCommandMaximumLevels _childTemp, typeSwitchError = IdentifyReplyCommandMaximumLevelsParseWithBuffer(ctx, readBuffer, attribute, numBytes) - case attribute == Attribute_CurrentSenseLevels: // IdentifyReplyCommandCurrentSenseLevels +case attribute == Attribute_CurrentSenseLevels : // IdentifyReplyCommandCurrentSenseLevels _childTemp, typeSwitchError = IdentifyReplyCommandCurrentSenseLevelsParseWithBuffer(ctx, readBuffer, attribute, numBytes) - case attribute == Attribute_OutputUnitSummary: // IdentifyReplyCommandOutputUnitSummary +case attribute == Attribute_OutputUnitSummary : // IdentifyReplyCommandOutputUnitSummary _childTemp, typeSwitchError = IdentifyReplyCommandOutputUnitSummaryParseWithBuffer(ctx, readBuffer, attribute, numBytes) - case attribute == Attribute_DSIStatus: // IdentifyReplyCommandDSIStatus +case attribute == Attribute_DSIStatus : // IdentifyReplyCommandDSIStatus _childTemp, typeSwitchError = IdentifyReplyCommandDSIStatusParseWithBuffer(ctx, readBuffer, attribute, numBytes) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [attribute=%v]", attribute) @@ -172,7 +177,7 @@ func IdentifyReplyCommandParseWithBuffer(ctx context.Context, readBuffer utils.R } // Finish initializing - _child.InitializeParent(_child) +_child.InitializeParent(_child ) return _child, nil } @@ -182,7 +187,7 @@ func (pm *_IdentifyReplyCommand) SerializeParent(ctx context.Context, writeBuffe _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("IdentifyReplyCommand"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("IdentifyReplyCommand"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for IdentifyReplyCommand") } @@ -197,13 +202,13 @@ func (pm *_IdentifyReplyCommand) SerializeParent(ctx context.Context, writeBuffe return nil } + //// // Arguments Getter func (m *_IdentifyReplyCommand) GetNumBytes() uint8 { return m.NumBytes } - // //// @@ -221,3 +226,6 @@ func (m *_IdentifyReplyCommand) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandCurrentSenseLevels.go b/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandCurrentSenseLevels.go index e504c4e7470..d10f4107bea 100644 --- a/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandCurrentSenseLevels.go +++ b/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandCurrentSenseLevels.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // IdentifyReplyCommandCurrentSenseLevels is the corresponding interface of IdentifyReplyCommandCurrentSenseLevels type IdentifyReplyCommandCurrentSenseLevels interface { @@ -46,29 +48,29 @@ type IdentifyReplyCommandCurrentSenseLevelsExactly interface { // _IdentifyReplyCommandCurrentSenseLevels is the data-structure of this message type _IdentifyReplyCommandCurrentSenseLevels struct { *_IdentifyReplyCommand - CurrentSenseLevels []byte + CurrentSenseLevels []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_IdentifyReplyCommandCurrentSenseLevels) GetAttribute() Attribute { - return Attribute_CurrentSenseLevels -} +func (m *_IdentifyReplyCommandCurrentSenseLevels) GetAttribute() Attribute { +return Attribute_CurrentSenseLevels} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_IdentifyReplyCommandCurrentSenseLevels) InitializeParent(parent IdentifyReplyCommand) {} +func (m *_IdentifyReplyCommandCurrentSenseLevels) InitializeParent(parent IdentifyReplyCommand ) {} -func (m *_IdentifyReplyCommandCurrentSenseLevels) GetParent() IdentifyReplyCommand { +func (m *_IdentifyReplyCommandCurrentSenseLevels) GetParent() IdentifyReplyCommand { return m._IdentifyReplyCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_IdentifyReplyCommandCurrentSenseLevels) GetCurrentSenseLevels() []byte /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewIdentifyReplyCommandCurrentSenseLevels factory function for _IdentifyReplyCommandCurrentSenseLevels -func NewIdentifyReplyCommandCurrentSenseLevels(currentSenseLevels []byte, numBytes uint8) *_IdentifyReplyCommandCurrentSenseLevels { +func NewIdentifyReplyCommandCurrentSenseLevels( currentSenseLevels []byte , numBytes uint8 ) *_IdentifyReplyCommandCurrentSenseLevels { _result := &_IdentifyReplyCommandCurrentSenseLevels{ - CurrentSenseLevels: currentSenseLevels, - _IdentifyReplyCommand: NewIdentifyReplyCommand(numBytes), + CurrentSenseLevels: currentSenseLevels, + _IdentifyReplyCommand: NewIdentifyReplyCommand(numBytes), } _result._IdentifyReplyCommand._IdentifyReplyCommandChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewIdentifyReplyCommandCurrentSenseLevels(currentSenseLevels []byte, numByt // Deprecated: use the interface for direct cast func CastIdentifyReplyCommandCurrentSenseLevels(structType interface{}) IdentifyReplyCommandCurrentSenseLevels { - if casted, ok := structType.(IdentifyReplyCommandCurrentSenseLevels); ok { + if casted, ok := structType.(IdentifyReplyCommandCurrentSenseLevels); ok { return casted } if casted, ok := structType.(*IdentifyReplyCommandCurrentSenseLevels); ok { @@ -119,6 +122,7 @@ func (m *_IdentifyReplyCommandCurrentSenseLevels) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_IdentifyReplyCommandCurrentSenseLevels) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -173,11 +177,11 @@ func (m *_IdentifyReplyCommandCurrentSenseLevels) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for IdentifyReplyCommandCurrentSenseLevels") } - // Array Field (currentSenseLevels) - // Byte Array field (currentSenseLevels) - if err := writeBuffer.WriteByteArray("currentSenseLevels", m.GetCurrentSenseLevels()); err != nil { - return errors.Wrap(err, "Error serializing 'currentSenseLevels' field") - } + // Array Field (currentSenseLevels) + // Byte Array field (currentSenseLevels) + if err := writeBuffer.WriteByteArray("currentSenseLevels", m.GetCurrentSenseLevels()); err != nil { + return errors.Wrap(err, "Error serializing 'currentSenseLevels' field") + } if popErr := writeBuffer.PopContext("IdentifyReplyCommandCurrentSenseLevels"); popErr != nil { return errors.Wrap(popErr, "Error popping for IdentifyReplyCommandCurrentSenseLevels") @@ -187,6 +191,7 @@ func (m *_IdentifyReplyCommandCurrentSenseLevels) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_IdentifyReplyCommandCurrentSenseLevels) isIdentifyReplyCommandCurrentSenseLevels() bool { return true } @@ -201,3 +206,6 @@ func (m *_IdentifyReplyCommandCurrentSenseLevels) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandDSIStatus.go b/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandDSIStatus.go index 9ebb52b557c..a4c60a9250e 100644 --- a/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandDSIStatus.go +++ b/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandDSIStatus.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // IdentifyReplyCommandDSIStatus is the corresponding interface of IdentifyReplyCommandDSIStatus type IdentifyReplyCommandDSIStatus interface { @@ -64,38 +66,38 @@ type IdentifyReplyCommandDSIStatusExactly interface { // _IdentifyReplyCommandDSIStatus is the data-structure of this message type _IdentifyReplyCommandDSIStatus struct { *_IdentifyReplyCommand - ChannelStatus1 ChannelStatus - ChannelStatus2 ChannelStatus - ChannelStatus3 ChannelStatus - ChannelStatus4 ChannelStatus - ChannelStatus5 ChannelStatus - ChannelStatus6 ChannelStatus - ChannelStatus7 ChannelStatus - ChannelStatus8 ChannelStatus - UnitStatus UnitStatus - DimmingUCRevisionNumber byte + ChannelStatus1 ChannelStatus + ChannelStatus2 ChannelStatus + ChannelStatus3 ChannelStatus + ChannelStatus4 ChannelStatus + ChannelStatus5 ChannelStatus + ChannelStatus6 ChannelStatus + ChannelStatus7 ChannelStatus + ChannelStatus8 ChannelStatus + UnitStatus UnitStatus + DimmingUCRevisionNumber byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_IdentifyReplyCommandDSIStatus) GetAttribute() Attribute { - return Attribute_DSIStatus -} +func (m *_IdentifyReplyCommandDSIStatus) GetAttribute() Attribute { +return Attribute_DSIStatus} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_IdentifyReplyCommandDSIStatus) InitializeParent(parent IdentifyReplyCommand) {} +func (m *_IdentifyReplyCommandDSIStatus) InitializeParent(parent IdentifyReplyCommand ) {} -func (m *_IdentifyReplyCommandDSIStatus) GetParent() IdentifyReplyCommand { +func (m *_IdentifyReplyCommandDSIStatus) GetParent() IdentifyReplyCommand { return m._IdentifyReplyCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -146,20 +148,21 @@ func (m *_IdentifyReplyCommandDSIStatus) GetDimmingUCRevisionNumber() byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewIdentifyReplyCommandDSIStatus factory function for _IdentifyReplyCommandDSIStatus -func NewIdentifyReplyCommandDSIStatus(channelStatus1 ChannelStatus, channelStatus2 ChannelStatus, channelStatus3 ChannelStatus, channelStatus4 ChannelStatus, channelStatus5 ChannelStatus, channelStatus6 ChannelStatus, channelStatus7 ChannelStatus, channelStatus8 ChannelStatus, unitStatus UnitStatus, dimmingUCRevisionNumber byte, numBytes uint8) *_IdentifyReplyCommandDSIStatus { +func NewIdentifyReplyCommandDSIStatus( channelStatus1 ChannelStatus , channelStatus2 ChannelStatus , channelStatus3 ChannelStatus , channelStatus4 ChannelStatus , channelStatus5 ChannelStatus , channelStatus6 ChannelStatus , channelStatus7 ChannelStatus , channelStatus8 ChannelStatus , unitStatus UnitStatus , dimmingUCRevisionNumber byte , numBytes uint8 ) *_IdentifyReplyCommandDSIStatus { _result := &_IdentifyReplyCommandDSIStatus{ - ChannelStatus1: channelStatus1, - ChannelStatus2: channelStatus2, - ChannelStatus3: channelStatus3, - ChannelStatus4: channelStatus4, - ChannelStatus5: channelStatus5, - ChannelStatus6: channelStatus6, - ChannelStatus7: channelStatus7, - ChannelStatus8: channelStatus8, - UnitStatus: unitStatus, + ChannelStatus1: channelStatus1, + ChannelStatus2: channelStatus2, + ChannelStatus3: channelStatus3, + ChannelStatus4: channelStatus4, + ChannelStatus5: channelStatus5, + ChannelStatus6: channelStatus6, + ChannelStatus7: channelStatus7, + ChannelStatus8: channelStatus8, + UnitStatus: unitStatus, DimmingUCRevisionNumber: dimmingUCRevisionNumber, - _IdentifyReplyCommand: NewIdentifyReplyCommand(numBytes), + _IdentifyReplyCommand: NewIdentifyReplyCommand(numBytes), } _result._IdentifyReplyCommand._IdentifyReplyCommandChildRequirements = _result return _result @@ -167,7 +170,7 @@ func NewIdentifyReplyCommandDSIStatus(channelStatus1 ChannelStatus, channelStatu // Deprecated: use the interface for direct cast func CastIdentifyReplyCommandDSIStatus(structType interface{}) IdentifyReplyCommandDSIStatus { - if casted, ok := structType.(IdentifyReplyCommandDSIStatus); ok { + if casted, ok := structType.(IdentifyReplyCommandDSIStatus); ok { return casted } if casted, ok := structType.(*IdentifyReplyCommandDSIStatus); ok { @@ -211,11 +214,12 @@ func (m *_IdentifyReplyCommandDSIStatus) GetLengthInBits(ctx context.Context) ui lengthInBits += 8 // Simple field (dimmingUCRevisionNumber) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_IdentifyReplyCommandDSIStatus) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -237,7 +241,7 @@ func IdentifyReplyCommandDSIStatusParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("channelStatus1"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for channelStatus1") } - _channelStatus1, _channelStatus1Err := ChannelStatusParseWithBuffer(ctx, readBuffer) +_channelStatus1, _channelStatus1Err := ChannelStatusParseWithBuffer(ctx, readBuffer) if _channelStatus1Err != nil { return nil, errors.Wrap(_channelStatus1Err, "Error parsing 'channelStatus1' field of IdentifyReplyCommandDSIStatus") } @@ -250,7 +254,7 @@ func IdentifyReplyCommandDSIStatusParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("channelStatus2"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for channelStatus2") } - _channelStatus2, _channelStatus2Err := ChannelStatusParseWithBuffer(ctx, readBuffer) +_channelStatus2, _channelStatus2Err := ChannelStatusParseWithBuffer(ctx, readBuffer) if _channelStatus2Err != nil { return nil, errors.Wrap(_channelStatus2Err, "Error parsing 'channelStatus2' field of IdentifyReplyCommandDSIStatus") } @@ -263,7 +267,7 @@ func IdentifyReplyCommandDSIStatusParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("channelStatus3"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for channelStatus3") } - _channelStatus3, _channelStatus3Err := ChannelStatusParseWithBuffer(ctx, readBuffer) +_channelStatus3, _channelStatus3Err := ChannelStatusParseWithBuffer(ctx, readBuffer) if _channelStatus3Err != nil { return nil, errors.Wrap(_channelStatus3Err, "Error parsing 'channelStatus3' field of IdentifyReplyCommandDSIStatus") } @@ -276,7 +280,7 @@ func IdentifyReplyCommandDSIStatusParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("channelStatus4"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for channelStatus4") } - _channelStatus4, _channelStatus4Err := ChannelStatusParseWithBuffer(ctx, readBuffer) +_channelStatus4, _channelStatus4Err := ChannelStatusParseWithBuffer(ctx, readBuffer) if _channelStatus4Err != nil { return nil, errors.Wrap(_channelStatus4Err, "Error parsing 'channelStatus4' field of IdentifyReplyCommandDSIStatus") } @@ -289,7 +293,7 @@ func IdentifyReplyCommandDSIStatusParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("channelStatus5"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for channelStatus5") } - _channelStatus5, _channelStatus5Err := ChannelStatusParseWithBuffer(ctx, readBuffer) +_channelStatus5, _channelStatus5Err := ChannelStatusParseWithBuffer(ctx, readBuffer) if _channelStatus5Err != nil { return nil, errors.Wrap(_channelStatus5Err, "Error parsing 'channelStatus5' field of IdentifyReplyCommandDSIStatus") } @@ -302,7 +306,7 @@ func IdentifyReplyCommandDSIStatusParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("channelStatus6"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for channelStatus6") } - _channelStatus6, _channelStatus6Err := ChannelStatusParseWithBuffer(ctx, readBuffer) +_channelStatus6, _channelStatus6Err := ChannelStatusParseWithBuffer(ctx, readBuffer) if _channelStatus6Err != nil { return nil, errors.Wrap(_channelStatus6Err, "Error parsing 'channelStatus6' field of IdentifyReplyCommandDSIStatus") } @@ -315,7 +319,7 @@ func IdentifyReplyCommandDSIStatusParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("channelStatus7"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for channelStatus7") } - _channelStatus7, _channelStatus7Err := ChannelStatusParseWithBuffer(ctx, readBuffer) +_channelStatus7, _channelStatus7Err := ChannelStatusParseWithBuffer(ctx, readBuffer) if _channelStatus7Err != nil { return nil, errors.Wrap(_channelStatus7Err, "Error parsing 'channelStatus7' field of IdentifyReplyCommandDSIStatus") } @@ -328,7 +332,7 @@ func IdentifyReplyCommandDSIStatusParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("channelStatus8"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for channelStatus8") } - _channelStatus8, _channelStatus8Err := ChannelStatusParseWithBuffer(ctx, readBuffer) +_channelStatus8, _channelStatus8Err := ChannelStatusParseWithBuffer(ctx, readBuffer) if _channelStatus8Err != nil { return nil, errors.Wrap(_channelStatus8Err, "Error parsing 'channelStatus8' field of IdentifyReplyCommandDSIStatus") } @@ -341,7 +345,7 @@ func IdentifyReplyCommandDSIStatusParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("unitStatus"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for unitStatus") } - _unitStatus, _unitStatusErr := UnitStatusParseWithBuffer(ctx, readBuffer) +_unitStatus, _unitStatusErr := UnitStatusParseWithBuffer(ctx, readBuffer) if _unitStatusErr != nil { return nil, errors.Wrap(_unitStatusErr, "Error parsing 'unitStatus' field of IdentifyReplyCommandDSIStatus") } @@ -351,7 +355,7 @@ func IdentifyReplyCommandDSIStatusParseWithBuffer(ctx context.Context, readBuffe } // Simple Field (dimmingUCRevisionNumber) - _dimmingUCRevisionNumber, _dimmingUCRevisionNumberErr := readBuffer.ReadByte("dimmingUCRevisionNumber") +_dimmingUCRevisionNumber, _dimmingUCRevisionNumberErr := readBuffer.ReadByte("dimmingUCRevisionNumber") if _dimmingUCRevisionNumberErr != nil { return nil, errors.Wrap(_dimmingUCRevisionNumberErr, "Error parsing 'dimmingUCRevisionNumber' field of IdentifyReplyCommandDSIStatus") } @@ -366,15 +370,15 @@ func IdentifyReplyCommandDSIStatusParseWithBuffer(ctx context.Context, readBuffe _IdentifyReplyCommand: &_IdentifyReplyCommand{ NumBytes: numBytes, }, - ChannelStatus1: channelStatus1, - ChannelStatus2: channelStatus2, - ChannelStatus3: channelStatus3, - ChannelStatus4: channelStatus4, - ChannelStatus5: channelStatus5, - ChannelStatus6: channelStatus6, - ChannelStatus7: channelStatus7, - ChannelStatus8: channelStatus8, - UnitStatus: unitStatus, + ChannelStatus1: channelStatus1, + ChannelStatus2: channelStatus2, + ChannelStatus3: channelStatus3, + ChannelStatus4: channelStatus4, + ChannelStatus5: channelStatus5, + ChannelStatus6: channelStatus6, + ChannelStatus7: channelStatus7, + ChannelStatus8: channelStatus8, + UnitStatus: unitStatus, DimmingUCRevisionNumber: dimmingUCRevisionNumber, } _child._IdentifyReplyCommand._IdentifyReplyCommandChildRequirements = _child @@ -397,120 +401,120 @@ func (m *_IdentifyReplyCommandDSIStatus) SerializeWithWriteBuffer(ctx context.Co return errors.Wrap(pushErr, "Error pushing for IdentifyReplyCommandDSIStatus") } - // Simple Field (channelStatus1) - if pushErr := writeBuffer.PushContext("channelStatus1"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for channelStatus1") - } - _channelStatus1Err := writeBuffer.WriteSerializable(ctx, m.GetChannelStatus1()) - if popErr := writeBuffer.PopContext("channelStatus1"); popErr != nil { - return errors.Wrap(popErr, "Error popping for channelStatus1") - } - if _channelStatus1Err != nil { - return errors.Wrap(_channelStatus1Err, "Error serializing 'channelStatus1' field") - } + // Simple Field (channelStatus1) + if pushErr := writeBuffer.PushContext("channelStatus1"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for channelStatus1") + } + _channelStatus1Err := writeBuffer.WriteSerializable(ctx, m.GetChannelStatus1()) + if popErr := writeBuffer.PopContext("channelStatus1"); popErr != nil { + return errors.Wrap(popErr, "Error popping for channelStatus1") + } + if _channelStatus1Err != nil { + return errors.Wrap(_channelStatus1Err, "Error serializing 'channelStatus1' field") + } - // Simple Field (channelStatus2) - if pushErr := writeBuffer.PushContext("channelStatus2"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for channelStatus2") - } - _channelStatus2Err := writeBuffer.WriteSerializable(ctx, m.GetChannelStatus2()) - if popErr := writeBuffer.PopContext("channelStatus2"); popErr != nil { - return errors.Wrap(popErr, "Error popping for channelStatus2") - } - if _channelStatus2Err != nil { - return errors.Wrap(_channelStatus2Err, "Error serializing 'channelStatus2' field") - } + // Simple Field (channelStatus2) + if pushErr := writeBuffer.PushContext("channelStatus2"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for channelStatus2") + } + _channelStatus2Err := writeBuffer.WriteSerializable(ctx, m.GetChannelStatus2()) + if popErr := writeBuffer.PopContext("channelStatus2"); popErr != nil { + return errors.Wrap(popErr, "Error popping for channelStatus2") + } + if _channelStatus2Err != nil { + return errors.Wrap(_channelStatus2Err, "Error serializing 'channelStatus2' field") + } - // Simple Field (channelStatus3) - if pushErr := writeBuffer.PushContext("channelStatus3"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for channelStatus3") - } - _channelStatus3Err := writeBuffer.WriteSerializable(ctx, m.GetChannelStatus3()) - if popErr := writeBuffer.PopContext("channelStatus3"); popErr != nil { - return errors.Wrap(popErr, "Error popping for channelStatus3") - } - if _channelStatus3Err != nil { - return errors.Wrap(_channelStatus3Err, "Error serializing 'channelStatus3' field") - } + // Simple Field (channelStatus3) + if pushErr := writeBuffer.PushContext("channelStatus3"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for channelStatus3") + } + _channelStatus3Err := writeBuffer.WriteSerializable(ctx, m.GetChannelStatus3()) + if popErr := writeBuffer.PopContext("channelStatus3"); popErr != nil { + return errors.Wrap(popErr, "Error popping for channelStatus3") + } + if _channelStatus3Err != nil { + return errors.Wrap(_channelStatus3Err, "Error serializing 'channelStatus3' field") + } - // Simple Field (channelStatus4) - if pushErr := writeBuffer.PushContext("channelStatus4"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for channelStatus4") - } - _channelStatus4Err := writeBuffer.WriteSerializable(ctx, m.GetChannelStatus4()) - if popErr := writeBuffer.PopContext("channelStatus4"); popErr != nil { - return errors.Wrap(popErr, "Error popping for channelStatus4") - } - if _channelStatus4Err != nil { - return errors.Wrap(_channelStatus4Err, "Error serializing 'channelStatus4' field") - } + // Simple Field (channelStatus4) + if pushErr := writeBuffer.PushContext("channelStatus4"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for channelStatus4") + } + _channelStatus4Err := writeBuffer.WriteSerializable(ctx, m.GetChannelStatus4()) + if popErr := writeBuffer.PopContext("channelStatus4"); popErr != nil { + return errors.Wrap(popErr, "Error popping for channelStatus4") + } + if _channelStatus4Err != nil { + return errors.Wrap(_channelStatus4Err, "Error serializing 'channelStatus4' field") + } - // Simple Field (channelStatus5) - if pushErr := writeBuffer.PushContext("channelStatus5"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for channelStatus5") - } - _channelStatus5Err := writeBuffer.WriteSerializable(ctx, m.GetChannelStatus5()) - if popErr := writeBuffer.PopContext("channelStatus5"); popErr != nil { - return errors.Wrap(popErr, "Error popping for channelStatus5") - } - if _channelStatus5Err != nil { - return errors.Wrap(_channelStatus5Err, "Error serializing 'channelStatus5' field") - } + // Simple Field (channelStatus5) + if pushErr := writeBuffer.PushContext("channelStatus5"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for channelStatus5") + } + _channelStatus5Err := writeBuffer.WriteSerializable(ctx, m.GetChannelStatus5()) + if popErr := writeBuffer.PopContext("channelStatus5"); popErr != nil { + return errors.Wrap(popErr, "Error popping for channelStatus5") + } + if _channelStatus5Err != nil { + return errors.Wrap(_channelStatus5Err, "Error serializing 'channelStatus5' field") + } - // Simple Field (channelStatus6) - if pushErr := writeBuffer.PushContext("channelStatus6"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for channelStatus6") - } - _channelStatus6Err := writeBuffer.WriteSerializable(ctx, m.GetChannelStatus6()) - if popErr := writeBuffer.PopContext("channelStatus6"); popErr != nil { - return errors.Wrap(popErr, "Error popping for channelStatus6") - } - if _channelStatus6Err != nil { - return errors.Wrap(_channelStatus6Err, "Error serializing 'channelStatus6' field") - } + // Simple Field (channelStatus6) + if pushErr := writeBuffer.PushContext("channelStatus6"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for channelStatus6") + } + _channelStatus6Err := writeBuffer.WriteSerializable(ctx, m.GetChannelStatus6()) + if popErr := writeBuffer.PopContext("channelStatus6"); popErr != nil { + return errors.Wrap(popErr, "Error popping for channelStatus6") + } + if _channelStatus6Err != nil { + return errors.Wrap(_channelStatus6Err, "Error serializing 'channelStatus6' field") + } - // Simple Field (channelStatus7) - if pushErr := writeBuffer.PushContext("channelStatus7"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for channelStatus7") - } - _channelStatus7Err := writeBuffer.WriteSerializable(ctx, m.GetChannelStatus7()) - if popErr := writeBuffer.PopContext("channelStatus7"); popErr != nil { - return errors.Wrap(popErr, "Error popping for channelStatus7") - } - if _channelStatus7Err != nil { - return errors.Wrap(_channelStatus7Err, "Error serializing 'channelStatus7' field") - } + // Simple Field (channelStatus7) + if pushErr := writeBuffer.PushContext("channelStatus7"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for channelStatus7") + } + _channelStatus7Err := writeBuffer.WriteSerializable(ctx, m.GetChannelStatus7()) + if popErr := writeBuffer.PopContext("channelStatus7"); popErr != nil { + return errors.Wrap(popErr, "Error popping for channelStatus7") + } + if _channelStatus7Err != nil { + return errors.Wrap(_channelStatus7Err, "Error serializing 'channelStatus7' field") + } - // Simple Field (channelStatus8) - if pushErr := writeBuffer.PushContext("channelStatus8"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for channelStatus8") - } - _channelStatus8Err := writeBuffer.WriteSerializable(ctx, m.GetChannelStatus8()) - if popErr := writeBuffer.PopContext("channelStatus8"); popErr != nil { - return errors.Wrap(popErr, "Error popping for channelStatus8") - } - if _channelStatus8Err != nil { - return errors.Wrap(_channelStatus8Err, "Error serializing 'channelStatus8' field") - } + // Simple Field (channelStatus8) + if pushErr := writeBuffer.PushContext("channelStatus8"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for channelStatus8") + } + _channelStatus8Err := writeBuffer.WriteSerializable(ctx, m.GetChannelStatus8()) + if popErr := writeBuffer.PopContext("channelStatus8"); popErr != nil { + return errors.Wrap(popErr, "Error popping for channelStatus8") + } + if _channelStatus8Err != nil { + return errors.Wrap(_channelStatus8Err, "Error serializing 'channelStatus8' field") + } - // Simple Field (unitStatus) - if pushErr := writeBuffer.PushContext("unitStatus"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for unitStatus") - } - _unitStatusErr := writeBuffer.WriteSerializable(ctx, m.GetUnitStatus()) - if popErr := writeBuffer.PopContext("unitStatus"); popErr != nil { - return errors.Wrap(popErr, "Error popping for unitStatus") - } - if _unitStatusErr != nil { - return errors.Wrap(_unitStatusErr, "Error serializing 'unitStatus' field") - } + // Simple Field (unitStatus) + if pushErr := writeBuffer.PushContext("unitStatus"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for unitStatus") + } + _unitStatusErr := writeBuffer.WriteSerializable(ctx, m.GetUnitStatus()) + if popErr := writeBuffer.PopContext("unitStatus"); popErr != nil { + return errors.Wrap(popErr, "Error popping for unitStatus") + } + if _unitStatusErr != nil { + return errors.Wrap(_unitStatusErr, "Error serializing 'unitStatus' field") + } - // Simple Field (dimmingUCRevisionNumber) - dimmingUCRevisionNumber := byte(m.GetDimmingUCRevisionNumber()) - _dimmingUCRevisionNumberErr := writeBuffer.WriteByte("dimmingUCRevisionNumber", (dimmingUCRevisionNumber)) - if _dimmingUCRevisionNumberErr != nil { - return errors.Wrap(_dimmingUCRevisionNumberErr, "Error serializing 'dimmingUCRevisionNumber' field") - } + // Simple Field (dimmingUCRevisionNumber) + dimmingUCRevisionNumber := byte(m.GetDimmingUCRevisionNumber()) + _dimmingUCRevisionNumberErr := writeBuffer.WriteByte("dimmingUCRevisionNumber", (dimmingUCRevisionNumber)) + if _dimmingUCRevisionNumberErr != nil { + return errors.Wrap(_dimmingUCRevisionNumberErr, "Error serializing 'dimmingUCRevisionNumber' field") + } if popErr := writeBuffer.PopContext("IdentifyReplyCommandDSIStatus"); popErr != nil { return errors.Wrap(popErr, "Error popping for IdentifyReplyCommandDSIStatus") @@ -520,6 +524,7 @@ func (m *_IdentifyReplyCommandDSIStatus) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_IdentifyReplyCommandDSIStatus) isIdentifyReplyCommandDSIStatus() bool { return true } @@ -534,3 +539,6 @@ func (m *_IdentifyReplyCommandDSIStatus) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandDelays.go b/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandDelays.go index 6f8068e8d8f..cc8ddea5739 100644 --- a/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandDelays.go +++ b/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandDelays.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // IdentifyReplyCommandDelays is the corresponding interface of IdentifyReplyCommandDelays type IdentifyReplyCommandDelays interface { @@ -48,30 +50,30 @@ type IdentifyReplyCommandDelaysExactly interface { // _IdentifyReplyCommandDelays is the data-structure of this message type _IdentifyReplyCommandDelays struct { *_IdentifyReplyCommand - TerminalLevels []byte - ReStrikeDelay byte + TerminalLevels []byte + ReStrikeDelay byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_IdentifyReplyCommandDelays) GetAttribute() Attribute { - return Attribute_Delays -} +func (m *_IdentifyReplyCommandDelays) GetAttribute() Attribute { +return Attribute_Delays} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_IdentifyReplyCommandDelays) InitializeParent(parent IdentifyReplyCommand) {} +func (m *_IdentifyReplyCommandDelays) InitializeParent(parent IdentifyReplyCommand ) {} -func (m *_IdentifyReplyCommandDelays) GetParent() IdentifyReplyCommand { +func (m *_IdentifyReplyCommandDelays) GetParent() IdentifyReplyCommand { return m._IdentifyReplyCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_IdentifyReplyCommandDelays) GetReStrikeDelay() byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewIdentifyReplyCommandDelays factory function for _IdentifyReplyCommandDelays -func NewIdentifyReplyCommandDelays(terminalLevels []byte, reStrikeDelay byte, numBytes uint8) *_IdentifyReplyCommandDelays { +func NewIdentifyReplyCommandDelays( terminalLevels []byte , reStrikeDelay byte , numBytes uint8 ) *_IdentifyReplyCommandDelays { _result := &_IdentifyReplyCommandDelays{ - TerminalLevels: terminalLevels, - ReStrikeDelay: reStrikeDelay, - _IdentifyReplyCommand: NewIdentifyReplyCommand(numBytes), + TerminalLevels: terminalLevels, + ReStrikeDelay: reStrikeDelay, + _IdentifyReplyCommand: NewIdentifyReplyCommand(numBytes), } _result._IdentifyReplyCommand._IdentifyReplyCommandChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewIdentifyReplyCommandDelays(terminalLevels []byte, reStrikeDelay byte, nu // Deprecated: use the interface for direct cast func CastIdentifyReplyCommandDelays(structType interface{}) IdentifyReplyCommandDelays { - if casted, ok := structType.(IdentifyReplyCommandDelays); ok { + if casted, ok := structType.(IdentifyReplyCommandDelays); ok { return casted } if casted, ok := structType.(*IdentifyReplyCommandDelays); ok { @@ -125,11 +128,12 @@ func (m *_IdentifyReplyCommandDelays) GetLengthInBits(ctx context.Context) uint1 } // Simple field (reStrikeDelay) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_IdentifyReplyCommandDelays) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +158,7 @@ func IdentifyReplyCommandDelaysParseWithBuffer(ctx context.Context, readBuffer u } // Simple Field (reStrikeDelay) - _reStrikeDelay, _reStrikeDelayErr := readBuffer.ReadByte("reStrikeDelay") +_reStrikeDelay, _reStrikeDelayErr := readBuffer.ReadByte("reStrikeDelay") if _reStrikeDelayErr != nil { return nil, errors.Wrap(_reStrikeDelayErr, "Error parsing 'reStrikeDelay' field of IdentifyReplyCommandDelays") } @@ -170,7 +174,7 @@ func IdentifyReplyCommandDelaysParseWithBuffer(ctx context.Context, readBuffer u NumBytes: numBytes, }, TerminalLevels: terminalLevels, - ReStrikeDelay: reStrikeDelay, + ReStrikeDelay: reStrikeDelay, } _child._IdentifyReplyCommand._IdentifyReplyCommandChildRequirements = _child return _child, nil @@ -192,18 +196,18 @@ func (m *_IdentifyReplyCommandDelays) SerializeWithWriteBuffer(ctx context.Conte return errors.Wrap(pushErr, "Error pushing for IdentifyReplyCommandDelays") } - // Array Field (terminalLevels) - // Byte Array field (terminalLevels) - if err := writeBuffer.WriteByteArray("terminalLevels", m.GetTerminalLevels()); err != nil { - return errors.Wrap(err, "Error serializing 'terminalLevels' field") - } + // Array Field (terminalLevels) + // Byte Array field (terminalLevels) + if err := writeBuffer.WriteByteArray("terminalLevels", m.GetTerminalLevels()); err != nil { + return errors.Wrap(err, "Error serializing 'terminalLevels' field") + } - // Simple Field (reStrikeDelay) - reStrikeDelay := byte(m.GetReStrikeDelay()) - _reStrikeDelayErr := writeBuffer.WriteByte("reStrikeDelay", (reStrikeDelay)) - if _reStrikeDelayErr != nil { - return errors.Wrap(_reStrikeDelayErr, "Error serializing 'reStrikeDelay' field") - } + // Simple Field (reStrikeDelay) + reStrikeDelay := byte(m.GetReStrikeDelay()) + _reStrikeDelayErr := writeBuffer.WriteByte("reStrikeDelay", (reStrikeDelay)) + if _reStrikeDelayErr != nil { + return errors.Wrap(_reStrikeDelayErr, "Error serializing 'reStrikeDelay' field") + } if popErr := writeBuffer.PopContext("IdentifyReplyCommandDelays"); popErr != nil { return errors.Wrap(popErr, "Error popping for IdentifyReplyCommandDelays") @@ -213,6 +217,7 @@ func (m *_IdentifyReplyCommandDelays) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_IdentifyReplyCommandDelays) isIdentifyReplyCommandDelays() bool { return true } @@ -227,3 +232,6 @@ func (m *_IdentifyReplyCommandDelays) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandExtendedDiagnosticSummary.go b/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandExtendedDiagnosticSummary.go index d8474dcfb5c..f710768a3fd 100644 --- a/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandExtendedDiagnosticSummary.go +++ b/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandExtendedDiagnosticSummary.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // IdentifyReplyCommandExtendedDiagnosticSummary is the corresponding interface of IdentifyReplyCommandExtendedDiagnosticSummary type IdentifyReplyCommandExtendedDiagnosticSummary interface { @@ -84,52 +86,51 @@ type IdentifyReplyCommandExtendedDiagnosticSummaryExactly interface { // _IdentifyReplyCommandExtendedDiagnosticSummary is the data-structure of this message type _IdentifyReplyCommandExtendedDiagnosticSummary struct { *_IdentifyReplyCommand - LowApplication ApplicationIdContainer - HighApplication ApplicationIdContainer - Area byte - Crc uint16 - SerialNumber uint32 - NetworkVoltage byte - UnitInLearnMode bool - NetworkVoltageLow bool - NetworkVoltageMarginal bool - EnableChecksumAlarm bool - OutputUnit bool - InstallationMMIError bool - EEWriteError bool - EEChecksumError bool - EEDataError bool - MicroReset bool - CommsTxError bool - InternalStackOverflow bool - MicroPowerReset bool + LowApplication ApplicationIdContainer + HighApplication ApplicationIdContainer + Area byte + Crc uint16 + SerialNumber uint32 + NetworkVoltage byte + UnitInLearnMode bool + NetworkVoltageLow bool + NetworkVoltageMarginal bool + EnableChecksumAlarm bool + OutputUnit bool + InstallationMMIError bool + EEWriteError bool + EEChecksumError bool + EEDataError bool + MicroReset bool + CommsTxError bool + InternalStackOverflow bool + MicroPowerReset bool // Reserved Fields reservedField0 *uint8 reservedField1 *uint8 reservedField2 *uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_IdentifyReplyCommandExtendedDiagnosticSummary) GetAttribute() Attribute { - return Attribute_ExtendedDiagnosticSummary -} +func (m *_IdentifyReplyCommandExtendedDiagnosticSummary) GetAttribute() Attribute { +return Attribute_ExtendedDiagnosticSummary} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_IdentifyReplyCommandExtendedDiagnosticSummary) InitializeParent(parent IdentifyReplyCommand) { -} +func (m *_IdentifyReplyCommandExtendedDiagnosticSummary) InitializeParent(parent IdentifyReplyCommand ) {} -func (m *_IdentifyReplyCommandExtendedDiagnosticSummary) GetParent() IdentifyReplyCommand { +func (m *_IdentifyReplyCommandExtendedDiagnosticSummary) GetParent() IdentifyReplyCommand { return m._IdentifyReplyCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -231,29 +232,30 @@ func (m *_IdentifyReplyCommandExtendedDiagnosticSummary) GetNetworkVoltageInVolt /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewIdentifyReplyCommandExtendedDiagnosticSummary factory function for _IdentifyReplyCommandExtendedDiagnosticSummary -func NewIdentifyReplyCommandExtendedDiagnosticSummary(lowApplication ApplicationIdContainer, highApplication ApplicationIdContainer, area byte, crc uint16, serialNumber uint32, networkVoltage byte, unitInLearnMode bool, networkVoltageLow bool, networkVoltageMarginal bool, enableChecksumAlarm bool, outputUnit bool, installationMMIError bool, EEWriteError bool, EEChecksumError bool, EEDataError bool, microReset bool, commsTxError bool, internalStackOverflow bool, microPowerReset bool, numBytes uint8) *_IdentifyReplyCommandExtendedDiagnosticSummary { +func NewIdentifyReplyCommandExtendedDiagnosticSummary( lowApplication ApplicationIdContainer , highApplication ApplicationIdContainer , area byte , crc uint16 , serialNumber uint32 , networkVoltage byte , unitInLearnMode bool , networkVoltageLow bool , networkVoltageMarginal bool , enableChecksumAlarm bool , outputUnit bool , installationMMIError bool , EEWriteError bool , EEChecksumError bool , EEDataError bool , microReset bool , commsTxError bool , internalStackOverflow bool , microPowerReset bool , numBytes uint8 ) *_IdentifyReplyCommandExtendedDiagnosticSummary { _result := &_IdentifyReplyCommandExtendedDiagnosticSummary{ - LowApplication: lowApplication, - HighApplication: highApplication, - Area: area, - Crc: crc, - SerialNumber: serialNumber, - NetworkVoltage: networkVoltage, - UnitInLearnMode: unitInLearnMode, - NetworkVoltageLow: networkVoltageLow, + LowApplication: lowApplication, + HighApplication: highApplication, + Area: area, + Crc: crc, + SerialNumber: serialNumber, + NetworkVoltage: networkVoltage, + UnitInLearnMode: unitInLearnMode, + NetworkVoltageLow: networkVoltageLow, NetworkVoltageMarginal: networkVoltageMarginal, - EnableChecksumAlarm: enableChecksumAlarm, - OutputUnit: outputUnit, - InstallationMMIError: installationMMIError, - EEWriteError: EEWriteError, - EEChecksumError: EEChecksumError, - EEDataError: EEDataError, - MicroReset: microReset, - CommsTxError: commsTxError, - InternalStackOverflow: internalStackOverflow, - MicroPowerReset: microPowerReset, - _IdentifyReplyCommand: NewIdentifyReplyCommand(numBytes), + EnableChecksumAlarm: enableChecksumAlarm, + OutputUnit: outputUnit, + InstallationMMIError: installationMMIError, + EEWriteError: EEWriteError, + EEChecksumError: EEChecksumError, + EEDataError: EEDataError, + MicroReset: microReset, + CommsTxError: commsTxError, + InternalStackOverflow: internalStackOverflow, + MicroPowerReset: microPowerReset, + _IdentifyReplyCommand: NewIdentifyReplyCommand(numBytes), } _result._IdentifyReplyCommand._IdentifyReplyCommandChildRequirements = _result return _result @@ -261,7 +263,7 @@ func NewIdentifyReplyCommandExtendedDiagnosticSummary(lowApplication Application // Deprecated: use the interface for direct cast func CastIdentifyReplyCommandExtendedDiagnosticSummary(structType interface{}) IdentifyReplyCommandExtendedDiagnosticSummary { - if casted, ok := structType.(IdentifyReplyCommandExtendedDiagnosticSummary); ok { + if casted, ok := structType.(IdentifyReplyCommandExtendedDiagnosticSummary); ok { return casted } if casted, ok := structType.(*IdentifyReplyCommandExtendedDiagnosticSummary); ok { @@ -284,27 +286,27 @@ func (m *_IdentifyReplyCommandExtendedDiagnosticSummary) GetLengthInBits(ctx con lengthInBits += 8 // Simple field (area) - lengthInBits += 8 + lengthInBits += 8; // Simple field (crc) - lengthInBits += 16 + lengthInBits += 16; // Simple field (serialNumber) - lengthInBits += 32 + lengthInBits += 32; // Simple field (networkVoltage) - lengthInBits += 8 + lengthInBits += 8; // A virtual field doesn't have any in- or output. // Simple field (unitInLearnMode) - lengthInBits += 1 + lengthInBits += 1; // Simple field (networkVoltageLow) - lengthInBits += 1 + lengthInBits += 1; // Simple field (networkVoltageMarginal) - lengthInBits += 1 + lengthInBits += 1; // Reserved Field (reserved) lengthInBits += 1 @@ -316,38 +318,39 @@ func (m *_IdentifyReplyCommandExtendedDiagnosticSummary) GetLengthInBits(ctx con lengthInBits += 1 // Simple field (enableChecksumAlarm) - lengthInBits += 1 + lengthInBits += 1; // Simple field (outputUnit) - lengthInBits += 1 + lengthInBits += 1; // Simple field (installationMMIError) - lengthInBits += 1 + lengthInBits += 1; // Simple field (EEWriteError) - lengthInBits += 1 + lengthInBits += 1; // Simple field (EEChecksumError) - lengthInBits += 1 + lengthInBits += 1; // Simple field (EEDataError) - lengthInBits += 1 + lengthInBits += 1; // Simple field (microReset) - lengthInBits += 1 + lengthInBits += 1; // Simple field (commsTxError) - lengthInBits += 1 + lengthInBits += 1; // Simple field (internalStackOverflow) - lengthInBits += 1 + lengthInBits += 1; // Simple field (microPowerReset) - lengthInBits += 1 + lengthInBits += 1; return lengthInBits } + func (m *_IdentifyReplyCommandExtendedDiagnosticSummary) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -369,7 +372,7 @@ func IdentifyReplyCommandExtendedDiagnosticSummaryParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("lowApplication"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lowApplication") } - _lowApplication, _lowApplicationErr := ApplicationIdContainerParseWithBuffer(ctx, readBuffer) +_lowApplication, _lowApplicationErr := ApplicationIdContainerParseWithBuffer(ctx, readBuffer) if _lowApplicationErr != nil { return nil, errors.Wrap(_lowApplicationErr, "Error parsing 'lowApplication' field of IdentifyReplyCommandExtendedDiagnosticSummary") } @@ -382,7 +385,7 @@ func IdentifyReplyCommandExtendedDiagnosticSummaryParseWithBuffer(ctx context.Co if pullErr := readBuffer.PullContext("highApplication"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for highApplication") } - _highApplication, _highApplicationErr := ApplicationIdContainerParseWithBuffer(ctx, readBuffer) +_highApplication, _highApplicationErr := ApplicationIdContainerParseWithBuffer(ctx, readBuffer) if _highApplicationErr != nil { return nil, errors.Wrap(_highApplicationErr, "Error parsing 'highApplication' field of IdentifyReplyCommandExtendedDiagnosticSummary") } @@ -392,28 +395,28 @@ func IdentifyReplyCommandExtendedDiagnosticSummaryParseWithBuffer(ctx context.Co } // Simple Field (area) - _area, _areaErr := readBuffer.ReadByte("area") +_area, _areaErr := readBuffer.ReadByte("area") if _areaErr != nil { return nil, errors.Wrap(_areaErr, "Error parsing 'area' field of IdentifyReplyCommandExtendedDiagnosticSummary") } area := _area // Simple Field (crc) - _crc, _crcErr := readBuffer.ReadUint16("crc", 16) +_crc, _crcErr := readBuffer.ReadUint16("crc", 16) if _crcErr != nil { return nil, errors.Wrap(_crcErr, "Error parsing 'crc' field of IdentifyReplyCommandExtendedDiagnosticSummary") } crc := _crc // Simple Field (serialNumber) - _serialNumber, _serialNumberErr := readBuffer.ReadUint32("serialNumber", 32) +_serialNumber, _serialNumberErr := readBuffer.ReadUint32("serialNumber", 32) if _serialNumberErr != nil { return nil, errors.Wrap(_serialNumberErr, "Error parsing 'serialNumber' field of IdentifyReplyCommandExtendedDiagnosticSummary") } serialNumber := _serialNumber // Simple Field (networkVoltage) - _networkVoltage, _networkVoltageErr := readBuffer.ReadByte("networkVoltage") +_networkVoltage, _networkVoltageErr := readBuffer.ReadByte("networkVoltage") if _networkVoltageErr != nil { return nil, errors.Wrap(_networkVoltageErr, "Error parsing 'networkVoltage' field of IdentifyReplyCommandExtendedDiagnosticSummary") } @@ -425,21 +428,21 @@ func IdentifyReplyCommandExtendedDiagnosticSummaryParseWithBuffer(ctx context.Co _ = networkVoltageInVolts // Simple Field (unitInLearnMode) - _unitInLearnMode, _unitInLearnModeErr := readBuffer.ReadBit("unitInLearnMode") +_unitInLearnMode, _unitInLearnModeErr := readBuffer.ReadBit("unitInLearnMode") if _unitInLearnModeErr != nil { return nil, errors.Wrap(_unitInLearnModeErr, "Error parsing 'unitInLearnMode' field of IdentifyReplyCommandExtendedDiagnosticSummary") } unitInLearnMode := _unitInLearnMode // Simple Field (networkVoltageLow) - _networkVoltageLow, _networkVoltageLowErr := readBuffer.ReadBit("networkVoltageLow") +_networkVoltageLow, _networkVoltageLowErr := readBuffer.ReadBit("networkVoltageLow") if _networkVoltageLowErr != nil { return nil, errors.Wrap(_networkVoltageLowErr, "Error parsing 'networkVoltageLow' field of IdentifyReplyCommandExtendedDiagnosticSummary") } networkVoltageLow := _networkVoltageLow // Simple Field (networkVoltageMarginal) - _networkVoltageMarginal, _networkVoltageMarginalErr := readBuffer.ReadBit("networkVoltageMarginal") +_networkVoltageMarginal, _networkVoltageMarginalErr := readBuffer.ReadBit("networkVoltageMarginal") if _networkVoltageMarginalErr != nil { return nil, errors.Wrap(_networkVoltageMarginalErr, "Error parsing 'networkVoltageMarginal' field of IdentifyReplyCommandExtendedDiagnosticSummary") } @@ -455,7 +458,7 @@ func IdentifyReplyCommandExtendedDiagnosticSummaryParseWithBuffer(ctx context.Co if reserved != uint8(0) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -472,7 +475,7 @@ func IdentifyReplyCommandExtendedDiagnosticSummaryParseWithBuffer(ctx context.Co if reserved != uint8(0) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField1 = &reserved @@ -489,7 +492,7 @@ func IdentifyReplyCommandExtendedDiagnosticSummaryParseWithBuffer(ctx context.Co if reserved != uint8(0) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField2 = &reserved @@ -497,70 +500,70 @@ func IdentifyReplyCommandExtendedDiagnosticSummaryParseWithBuffer(ctx context.Co } // Simple Field (enableChecksumAlarm) - _enableChecksumAlarm, _enableChecksumAlarmErr := readBuffer.ReadBit("enableChecksumAlarm") +_enableChecksumAlarm, _enableChecksumAlarmErr := readBuffer.ReadBit("enableChecksumAlarm") if _enableChecksumAlarmErr != nil { return nil, errors.Wrap(_enableChecksumAlarmErr, "Error parsing 'enableChecksumAlarm' field of IdentifyReplyCommandExtendedDiagnosticSummary") } enableChecksumAlarm := _enableChecksumAlarm // Simple Field (outputUnit) - _outputUnit, _outputUnitErr := readBuffer.ReadBit("outputUnit") +_outputUnit, _outputUnitErr := readBuffer.ReadBit("outputUnit") if _outputUnitErr != nil { return nil, errors.Wrap(_outputUnitErr, "Error parsing 'outputUnit' field of IdentifyReplyCommandExtendedDiagnosticSummary") } outputUnit := _outputUnit // Simple Field (installationMMIError) - _installationMMIError, _installationMMIErrorErr := readBuffer.ReadBit("installationMMIError") +_installationMMIError, _installationMMIErrorErr := readBuffer.ReadBit("installationMMIError") if _installationMMIErrorErr != nil { return nil, errors.Wrap(_installationMMIErrorErr, "Error parsing 'installationMMIError' field of IdentifyReplyCommandExtendedDiagnosticSummary") } installationMMIError := _installationMMIError // Simple Field (EEWriteError) - _EEWriteError, _EEWriteErrorErr := readBuffer.ReadBit("EEWriteError") +_EEWriteError, _EEWriteErrorErr := readBuffer.ReadBit("EEWriteError") if _EEWriteErrorErr != nil { return nil, errors.Wrap(_EEWriteErrorErr, "Error parsing 'EEWriteError' field of IdentifyReplyCommandExtendedDiagnosticSummary") } EEWriteError := _EEWriteError // Simple Field (EEChecksumError) - _EEChecksumError, _EEChecksumErrorErr := readBuffer.ReadBit("EEChecksumError") +_EEChecksumError, _EEChecksumErrorErr := readBuffer.ReadBit("EEChecksumError") if _EEChecksumErrorErr != nil { return nil, errors.Wrap(_EEChecksumErrorErr, "Error parsing 'EEChecksumError' field of IdentifyReplyCommandExtendedDiagnosticSummary") } EEChecksumError := _EEChecksumError // Simple Field (EEDataError) - _EEDataError, _EEDataErrorErr := readBuffer.ReadBit("EEDataError") +_EEDataError, _EEDataErrorErr := readBuffer.ReadBit("EEDataError") if _EEDataErrorErr != nil { return nil, errors.Wrap(_EEDataErrorErr, "Error parsing 'EEDataError' field of IdentifyReplyCommandExtendedDiagnosticSummary") } EEDataError := _EEDataError // Simple Field (microReset) - _microReset, _microResetErr := readBuffer.ReadBit("microReset") +_microReset, _microResetErr := readBuffer.ReadBit("microReset") if _microResetErr != nil { return nil, errors.Wrap(_microResetErr, "Error parsing 'microReset' field of IdentifyReplyCommandExtendedDiagnosticSummary") } microReset := _microReset // Simple Field (commsTxError) - _commsTxError, _commsTxErrorErr := readBuffer.ReadBit("commsTxError") +_commsTxError, _commsTxErrorErr := readBuffer.ReadBit("commsTxError") if _commsTxErrorErr != nil { return nil, errors.Wrap(_commsTxErrorErr, "Error parsing 'commsTxError' field of IdentifyReplyCommandExtendedDiagnosticSummary") } commsTxError := _commsTxError // Simple Field (internalStackOverflow) - _internalStackOverflow, _internalStackOverflowErr := readBuffer.ReadBit("internalStackOverflow") +_internalStackOverflow, _internalStackOverflowErr := readBuffer.ReadBit("internalStackOverflow") if _internalStackOverflowErr != nil { return nil, errors.Wrap(_internalStackOverflowErr, "Error parsing 'internalStackOverflow' field of IdentifyReplyCommandExtendedDiagnosticSummary") } internalStackOverflow := _internalStackOverflow // Simple Field (microPowerReset) - _microPowerReset, _microPowerResetErr := readBuffer.ReadBit("microPowerReset") +_microPowerReset, _microPowerResetErr := readBuffer.ReadBit("microPowerReset") if _microPowerResetErr != nil { return nil, errors.Wrap(_microPowerResetErr, "Error parsing 'microPowerReset' field of IdentifyReplyCommandExtendedDiagnosticSummary") } @@ -575,28 +578,28 @@ func IdentifyReplyCommandExtendedDiagnosticSummaryParseWithBuffer(ctx context.Co _IdentifyReplyCommand: &_IdentifyReplyCommand{ NumBytes: numBytes, }, - LowApplication: lowApplication, - HighApplication: highApplication, - Area: area, - Crc: crc, - SerialNumber: serialNumber, - NetworkVoltage: networkVoltage, - UnitInLearnMode: unitInLearnMode, - NetworkVoltageLow: networkVoltageLow, + LowApplication: lowApplication, + HighApplication: highApplication, + Area: area, + Crc: crc, + SerialNumber: serialNumber, + NetworkVoltage: networkVoltage, + UnitInLearnMode: unitInLearnMode, + NetworkVoltageLow: networkVoltageLow, NetworkVoltageMarginal: networkVoltageMarginal, - EnableChecksumAlarm: enableChecksumAlarm, - OutputUnit: outputUnit, - InstallationMMIError: installationMMIError, - EEWriteError: EEWriteError, - EEChecksumError: EEChecksumError, - EEDataError: EEDataError, - MicroReset: microReset, - CommsTxError: commsTxError, - InternalStackOverflow: internalStackOverflow, - MicroPowerReset: microPowerReset, - reservedField0: reservedField0, - reservedField1: reservedField1, - reservedField2: reservedField2, + EnableChecksumAlarm: enableChecksumAlarm, + OutputUnit: outputUnit, + InstallationMMIError: installationMMIError, + EEWriteError: EEWriteError, + EEChecksumError: EEChecksumError, + EEDataError: EEDataError, + MicroReset: microReset, + CommsTxError: commsTxError, + InternalStackOverflow: internalStackOverflow, + MicroPowerReset: microPowerReset, + reservedField0: reservedField0, + reservedField1: reservedField1, + reservedField2: reservedField2, } _child._IdentifyReplyCommand._IdentifyReplyCommandChildRequirements = _child return _child, nil @@ -618,200 +621,200 @@ func (m *_IdentifyReplyCommandExtendedDiagnosticSummary) SerializeWithWriteBuffe return errors.Wrap(pushErr, "Error pushing for IdentifyReplyCommandExtendedDiagnosticSummary") } - // Simple Field (lowApplication) - if pushErr := writeBuffer.PushContext("lowApplication"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lowApplication") - } - _lowApplicationErr := writeBuffer.WriteSerializable(ctx, m.GetLowApplication()) - if popErr := writeBuffer.PopContext("lowApplication"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lowApplication") - } - if _lowApplicationErr != nil { - return errors.Wrap(_lowApplicationErr, "Error serializing 'lowApplication' field") - } + // Simple Field (lowApplication) + if pushErr := writeBuffer.PushContext("lowApplication"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lowApplication") + } + _lowApplicationErr := writeBuffer.WriteSerializable(ctx, m.GetLowApplication()) + if popErr := writeBuffer.PopContext("lowApplication"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lowApplication") + } + if _lowApplicationErr != nil { + return errors.Wrap(_lowApplicationErr, "Error serializing 'lowApplication' field") + } - // Simple Field (highApplication) - if pushErr := writeBuffer.PushContext("highApplication"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for highApplication") - } - _highApplicationErr := writeBuffer.WriteSerializable(ctx, m.GetHighApplication()) - if popErr := writeBuffer.PopContext("highApplication"); popErr != nil { - return errors.Wrap(popErr, "Error popping for highApplication") - } - if _highApplicationErr != nil { - return errors.Wrap(_highApplicationErr, "Error serializing 'highApplication' field") - } + // Simple Field (highApplication) + if pushErr := writeBuffer.PushContext("highApplication"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for highApplication") + } + _highApplicationErr := writeBuffer.WriteSerializable(ctx, m.GetHighApplication()) + if popErr := writeBuffer.PopContext("highApplication"); popErr != nil { + return errors.Wrap(popErr, "Error popping for highApplication") + } + if _highApplicationErr != nil { + return errors.Wrap(_highApplicationErr, "Error serializing 'highApplication' field") + } - // Simple Field (area) - area := byte(m.GetArea()) - _areaErr := writeBuffer.WriteByte("area", (area)) - if _areaErr != nil { - return errors.Wrap(_areaErr, "Error serializing 'area' field") - } + // Simple Field (area) + area := byte(m.GetArea()) + _areaErr := writeBuffer.WriteByte("area", (area)) + if _areaErr != nil { + return errors.Wrap(_areaErr, "Error serializing 'area' field") + } - // Simple Field (crc) - crc := uint16(m.GetCrc()) - _crcErr := writeBuffer.WriteUint16("crc", 16, (crc)) - if _crcErr != nil { - return errors.Wrap(_crcErr, "Error serializing 'crc' field") - } + // Simple Field (crc) + crc := uint16(m.GetCrc()) + _crcErr := writeBuffer.WriteUint16("crc", 16, (crc)) + if _crcErr != nil { + return errors.Wrap(_crcErr, "Error serializing 'crc' field") + } - // Simple Field (serialNumber) - serialNumber := uint32(m.GetSerialNumber()) - _serialNumberErr := writeBuffer.WriteUint32("serialNumber", 32, (serialNumber)) - if _serialNumberErr != nil { - return errors.Wrap(_serialNumberErr, "Error serializing 'serialNumber' field") - } + // Simple Field (serialNumber) + serialNumber := uint32(m.GetSerialNumber()) + _serialNumberErr := writeBuffer.WriteUint32("serialNumber", 32, (serialNumber)) + if _serialNumberErr != nil { + return errors.Wrap(_serialNumberErr, "Error serializing 'serialNumber' field") + } - // Simple Field (networkVoltage) - networkVoltage := byte(m.GetNetworkVoltage()) - _networkVoltageErr := writeBuffer.WriteByte("networkVoltage", (networkVoltage)) - if _networkVoltageErr != nil { - return errors.Wrap(_networkVoltageErr, "Error serializing 'networkVoltage' field") - } - // Virtual field - if _networkVoltageInVoltsErr := writeBuffer.WriteVirtual(ctx, "networkVoltageInVolts", m.GetNetworkVoltageInVolts()); _networkVoltageInVoltsErr != nil { - return errors.Wrap(_networkVoltageInVoltsErr, "Error serializing 'networkVoltageInVolts' field") - } + // Simple Field (networkVoltage) + networkVoltage := byte(m.GetNetworkVoltage()) + _networkVoltageErr := writeBuffer.WriteByte("networkVoltage", (networkVoltage)) + if _networkVoltageErr != nil { + return errors.Wrap(_networkVoltageErr, "Error serializing 'networkVoltage' field") + } + // Virtual field + if _networkVoltageInVoltsErr := writeBuffer.WriteVirtual(ctx, "networkVoltageInVolts", m.GetNetworkVoltageInVolts()); _networkVoltageInVoltsErr != nil { + return errors.Wrap(_networkVoltageInVoltsErr, "Error serializing 'networkVoltageInVolts' field") + } - // Simple Field (unitInLearnMode) - unitInLearnMode := bool(m.GetUnitInLearnMode()) - _unitInLearnModeErr := writeBuffer.WriteBit("unitInLearnMode", (unitInLearnMode)) - if _unitInLearnModeErr != nil { - return errors.Wrap(_unitInLearnModeErr, "Error serializing 'unitInLearnMode' field") - } + // Simple Field (unitInLearnMode) + unitInLearnMode := bool(m.GetUnitInLearnMode()) + _unitInLearnModeErr := writeBuffer.WriteBit("unitInLearnMode", (unitInLearnMode)) + if _unitInLearnModeErr != nil { + return errors.Wrap(_unitInLearnModeErr, "Error serializing 'unitInLearnMode' field") + } - // Simple Field (networkVoltageLow) - networkVoltageLow := bool(m.GetNetworkVoltageLow()) - _networkVoltageLowErr := writeBuffer.WriteBit("networkVoltageLow", (networkVoltageLow)) - if _networkVoltageLowErr != nil { - return errors.Wrap(_networkVoltageLowErr, "Error serializing 'networkVoltageLow' field") - } + // Simple Field (networkVoltageLow) + networkVoltageLow := bool(m.GetNetworkVoltageLow()) + _networkVoltageLowErr := writeBuffer.WriteBit("networkVoltageLow", (networkVoltageLow)) + if _networkVoltageLowErr != nil { + return errors.Wrap(_networkVoltageLowErr, "Error serializing 'networkVoltageLow' field") + } - // Simple Field (networkVoltageMarginal) - networkVoltageMarginal := bool(m.GetNetworkVoltageMarginal()) - _networkVoltageMarginalErr := writeBuffer.WriteBit("networkVoltageMarginal", (networkVoltageMarginal)) - if _networkVoltageMarginalErr != nil { - return errors.Wrap(_networkVoltageMarginalErr, "Error serializing 'networkVoltageMarginal' field") - } + // Simple Field (networkVoltageMarginal) + networkVoltageMarginal := bool(m.GetNetworkVoltageMarginal()) + _networkVoltageMarginalErr := writeBuffer.WriteBit("networkVoltageMarginal", (networkVoltageMarginal)) + if _networkVoltageMarginalErr != nil { + return errors.Wrap(_networkVoltageMarginalErr, "Error serializing 'networkVoltageMarginal' field") + } - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteUint8("reserved", 1, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 } - - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0) - if m.reservedField1 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField1 - } - _err := writeBuffer.WriteUint8("reserved", 1, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + _err := writeBuffer.WriteUint8("reserved", 1, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0) - if m.reservedField2 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField2 - } - _err := writeBuffer.WriteUint8("reserved", 1, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0) + if m.reservedField1 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField1 } - - // Simple Field (enableChecksumAlarm) - enableChecksumAlarm := bool(m.GetEnableChecksumAlarm()) - _enableChecksumAlarmErr := writeBuffer.WriteBit("enableChecksumAlarm", (enableChecksumAlarm)) - if _enableChecksumAlarmErr != nil { - return errors.Wrap(_enableChecksumAlarmErr, "Error serializing 'enableChecksumAlarm' field") + _err := writeBuffer.WriteUint8("reserved", 1, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } - // Simple Field (outputUnit) - outputUnit := bool(m.GetOutputUnit()) - _outputUnitErr := writeBuffer.WriteBit("outputUnit", (outputUnit)) - if _outputUnitErr != nil { - return errors.Wrap(_outputUnitErr, "Error serializing 'outputUnit' field") + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0) + if m.reservedField2 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField2 } - - // Simple Field (installationMMIError) - installationMMIError := bool(m.GetInstallationMMIError()) - _installationMMIErrorErr := writeBuffer.WriteBit("installationMMIError", (installationMMIError)) - if _installationMMIErrorErr != nil { - return errors.Wrap(_installationMMIErrorErr, "Error serializing 'installationMMIError' field") + _err := writeBuffer.WriteUint8("reserved", 1, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } - // Simple Field (EEWriteError) - EEWriteError := bool(m.GetEEWriteError()) - _EEWriteErrorErr := writeBuffer.WriteBit("EEWriteError", (EEWriteError)) - if _EEWriteErrorErr != nil { - return errors.Wrap(_EEWriteErrorErr, "Error serializing 'EEWriteError' field") - } + // Simple Field (enableChecksumAlarm) + enableChecksumAlarm := bool(m.GetEnableChecksumAlarm()) + _enableChecksumAlarmErr := writeBuffer.WriteBit("enableChecksumAlarm", (enableChecksumAlarm)) + if _enableChecksumAlarmErr != nil { + return errors.Wrap(_enableChecksumAlarmErr, "Error serializing 'enableChecksumAlarm' field") + } - // Simple Field (EEChecksumError) - EEChecksumError := bool(m.GetEEChecksumError()) - _EEChecksumErrorErr := writeBuffer.WriteBit("EEChecksumError", (EEChecksumError)) - if _EEChecksumErrorErr != nil { - return errors.Wrap(_EEChecksumErrorErr, "Error serializing 'EEChecksumError' field") - } + // Simple Field (outputUnit) + outputUnit := bool(m.GetOutputUnit()) + _outputUnitErr := writeBuffer.WriteBit("outputUnit", (outputUnit)) + if _outputUnitErr != nil { + return errors.Wrap(_outputUnitErr, "Error serializing 'outputUnit' field") + } - // Simple Field (EEDataError) - EEDataError := bool(m.GetEEDataError()) - _EEDataErrorErr := writeBuffer.WriteBit("EEDataError", (EEDataError)) - if _EEDataErrorErr != nil { - return errors.Wrap(_EEDataErrorErr, "Error serializing 'EEDataError' field") - } + // Simple Field (installationMMIError) + installationMMIError := bool(m.GetInstallationMMIError()) + _installationMMIErrorErr := writeBuffer.WriteBit("installationMMIError", (installationMMIError)) + if _installationMMIErrorErr != nil { + return errors.Wrap(_installationMMIErrorErr, "Error serializing 'installationMMIError' field") + } - // Simple Field (microReset) - microReset := bool(m.GetMicroReset()) - _microResetErr := writeBuffer.WriteBit("microReset", (microReset)) - if _microResetErr != nil { - return errors.Wrap(_microResetErr, "Error serializing 'microReset' field") - } + // Simple Field (EEWriteError) + EEWriteError := bool(m.GetEEWriteError()) + _EEWriteErrorErr := writeBuffer.WriteBit("EEWriteError", (EEWriteError)) + if _EEWriteErrorErr != nil { + return errors.Wrap(_EEWriteErrorErr, "Error serializing 'EEWriteError' field") + } - // Simple Field (commsTxError) - commsTxError := bool(m.GetCommsTxError()) - _commsTxErrorErr := writeBuffer.WriteBit("commsTxError", (commsTxError)) - if _commsTxErrorErr != nil { - return errors.Wrap(_commsTxErrorErr, "Error serializing 'commsTxError' field") - } + // Simple Field (EEChecksumError) + EEChecksumError := bool(m.GetEEChecksumError()) + _EEChecksumErrorErr := writeBuffer.WriteBit("EEChecksumError", (EEChecksumError)) + if _EEChecksumErrorErr != nil { + return errors.Wrap(_EEChecksumErrorErr, "Error serializing 'EEChecksumError' field") + } - // Simple Field (internalStackOverflow) - internalStackOverflow := bool(m.GetInternalStackOverflow()) - _internalStackOverflowErr := writeBuffer.WriteBit("internalStackOverflow", (internalStackOverflow)) - if _internalStackOverflowErr != nil { - return errors.Wrap(_internalStackOverflowErr, "Error serializing 'internalStackOverflow' field") - } + // Simple Field (EEDataError) + EEDataError := bool(m.GetEEDataError()) + _EEDataErrorErr := writeBuffer.WriteBit("EEDataError", (EEDataError)) + if _EEDataErrorErr != nil { + return errors.Wrap(_EEDataErrorErr, "Error serializing 'EEDataError' field") + } - // Simple Field (microPowerReset) - microPowerReset := bool(m.GetMicroPowerReset()) - _microPowerResetErr := writeBuffer.WriteBit("microPowerReset", (microPowerReset)) - if _microPowerResetErr != nil { - return errors.Wrap(_microPowerResetErr, "Error serializing 'microPowerReset' field") - } + // Simple Field (microReset) + microReset := bool(m.GetMicroReset()) + _microResetErr := writeBuffer.WriteBit("microReset", (microReset)) + if _microResetErr != nil { + return errors.Wrap(_microResetErr, "Error serializing 'microReset' field") + } + + // Simple Field (commsTxError) + commsTxError := bool(m.GetCommsTxError()) + _commsTxErrorErr := writeBuffer.WriteBit("commsTxError", (commsTxError)) + if _commsTxErrorErr != nil { + return errors.Wrap(_commsTxErrorErr, "Error serializing 'commsTxError' field") + } + + // Simple Field (internalStackOverflow) + internalStackOverflow := bool(m.GetInternalStackOverflow()) + _internalStackOverflowErr := writeBuffer.WriteBit("internalStackOverflow", (internalStackOverflow)) + if _internalStackOverflowErr != nil { + return errors.Wrap(_internalStackOverflowErr, "Error serializing 'internalStackOverflow' field") + } + + // Simple Field (microPowerReset) + microPowerReset := bool(m.GetMicroPowerReset()) + _microPowerResetErr := writeBuffer.WriteBit("microPowerReset", (microPowerReset)) + if _microPowerResetErr != nil { + return errors.Wrap(_microPowerResetErr, "Error serializing 'microPowerReset' field") + } if popErr := writeBuffer.PopContext("IdentifyReplyCommandExtendedDiagnosticSummary"); popErr != nil { return errors.Wrap(popErr, "Error popping for IdentifyReplyCommandExtendedDiagnosticSummary") @@ -821,6 +824,7 @@ func (m *_IdentifyReplyCommandExtendedDiagnosticSummary) SerializeWithWriteBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_IdentifyReplyCommandExtendedDiagnosticSummary) isIdentifyReplyCommandExtendedDiagnosticSummary() bool { return true } @@ -835,3 +839,6 @@ func (m *_IdentifyReplyCommandExtendedDiagnosticSummary) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandFirmwareVersion.go b/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandFirmwareVersion.go index bfcf91aa462..38fbf208b13 100644 --- a/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandFirmwareVersion.go +++ b/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandFirmwareVersion.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // IdentifyReplyCommandFirmwareVersion is the corresponding interface of IdentifyReplyCommandFirmwareVersion type IdentifyReplyCommandFirmwareVersion interface { @@ -46,29 +48,29 @@ type IdentifyReplyCommandFirmwareVersionExactly interface { // _IdentifyReplyCommandFirmwareVersion is the data-structure of this message type _IdentifyReplyCommandFirmwareVersion struct { *_IdentifyReplyCommand - FirmwareVersion string + FirmwareVersion string } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_IdentifyReplyCommandFirmwareVersion) GetAttribute() Attribute { - return Attribute_FirmwareVersion -} +func (m *_IdentifyReplyCommandFirmwareVersion) GetAttribute() Attribute { +return Attribute_FirmwareVersion} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_IdentifyReplyCommandFirmwareVersion) InitializeParent(parent IdentifyReplyCommand) {} +func (m *_IdentifyReplyCommandFirmwareVersion) InitializeParent(parent IdentifyReplyCommand ) {} -func (m *_IdentifyReplyCommandFirmwareVersion) GetParent() IdentifyReplyCommand { +func (m *_IdentifyReplyCommandFirmwareVersion) GetParent() IdentifyReplyCommand { return m._IdentifyReplyCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_IdentifyReplyCommandFirmwareVersion) GetFirmwareVersion() string { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewIdentifyReplyCommandFirmwareVersion factory function for _IdentifyReplyCommandFirmwareVersion -func NewIdentifyReplyCommandFirmwareVersion(firmwareVersion string, numBytes uint8) *_IdentifyReplyCommandFirmwareVersion { +func NewIdentifyReplyCommandFirmwareVersion( firmwareVersion string , numBytes uint8 ) *_IdentifyReplyCommandFirmwareVersion { _result := &_IdentifyReplyCommandFirmwareVersion{ - FirmwareVersion: firmwareVersion, - _IdentifyReplyCommand: NewIdentifyReplyCommand(numBytes), + FirmwareVersion: firmwareVersion, + _IdentifyReplyCommand: NewIdentifyReplyCommand(numBytes), } _result._IdentifyReplyCommand._IdentifyReplyCommandChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewIdentifyReplyCommandFirmwareVersion(firmwareVersion string, numBytes uin // Deprecated: use the interface for direct cast func CastIdentifyReplyCommandFirmwareVersion(structType interface{}) IdentifyReplyCommandFirmwareVersion { - if casted, ok := structType.(IdentifyReplyCommandFirmwareVersion); ok { + if casted, ok := structType.(IdentifyReplyCommandFirmwareVersion); ok { return casted } if casted, ok := structType.(*IdentifyReplyCommandFirmwareVersion); ok { @@ -112,11 +115,12 @@ func (m *_IdentifyReplyCommandFirmwareVersion) GetLengthInBits(ctx context.Conte lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (firmwareVersion) - lengthInBits += 64 + lengthInBits += 64; return lengthInBits } + func (m *_IdentifyReplyCommandFirmwareVersion) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -135,7 +139,7 @@ func IdentifyReplyCommandFirmwareVersionParseWithBuffer(ctx context.Context, rea _ = currentPos // Simple Field (firmwareVersion) - _firmwareVersion, _firmwareVersionErr := readBuffer.ReadString("firmwareVersion", uint32(64), "UTF-8") +_firmwareVersion, _firmwareVersionErr := readBuffer.ReadString("firmwareVersion", uint32(64), "UTF-8") if _firmwareVersionErr != nil { return nil, errors.Wrap(_firmwareVersionErr, "Error parsing 'firmwareVersion' field of IdentifyReplyCommandFirmwareVersion") } @@ -172,12 +176,12 @@ func (m *_IdentifyReplyCommandFirmwareVersion) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for IdentifyReplyCommandFirmwareVersion") } - // Simple Field (firmwareVersion) - firmwareVersion := string(m.GetFirmwareVersion()) - _firmwareVersionErr := writeBuffer.WriteString("firmwareVersion", uint32(64), "UTF-8", (firmwareVersion)) - if _firmwareVersionErr != nil { - return errors.Wrap(_firmwareVersionErr, "Error serializing 'firmwareVersion' field") - } + // Simple Field (firmwareVersion) + firmwareVersion := string(m.GetFirmwareVersion()) + _firmwareVersionErr := writeBuffer.WriteString("firmwareVersion", uint32(64), "UTF-8", (firmwareVersion)) + if _firmwareVersionErr != nil { + return errors.Wrap(_firmwareVersionErr, "Error serializing 'firmwareVersion' field") + } if popErr := writeBuffer.PopContext("IdentifyReplyCommandFirmwareVersion"); popErr != nil { return errors.Wrap(popErr, "Error popping for IdentifyReplyCommandFirmwareVersion") @@ -187,6 +191,7 @@ func (m *_IdentifyReplyCommandFirmwareVersion) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_IdentifyReplyCommandFirmwareVersion) isIdentifyReplyCommandFirmwareVersion() bool { return true } @@ -201,3 +206,6 @@ func (m *_IdentifyReplyCommandFirmwareVersion) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandGAVPhysicalAddresses.go b/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandGAVPhysicalAddresses.go index 5d3a0c9887c..fba911154d4 100644 --- a/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandGAVPhysicalAddresses.go +++ b/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandGAVPhysicalAddresses.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // IdentifyReplyCommandGAVPhysicalAddresses is the corresponding interface of IdentifyReplyCommandGAVPhysicalAddresses type IdentifyReplyCommandGAVPhysicalAddresses interface { @@ -46,29 +48,29 @@ type IdentifyReplyCommandGAVPhysicalAddressesExactly interface { // _IdentifyReplyCommandGAVPhysicalAddresses is the data-structure of this message type _IdentifyReplyCommandGAVPhysicalAddresses struct { *_IdentifyReplyCommand - Values []byte + Values []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_IdentifyReplyCommandGAVPhysicalAddresses) GetAttribute() Attribute { - return Attribute_GAVPhysicalAddresses -} +func (m *_IdentifyReplyCommandGAVPhysicalAddresses) GetAttribute() Attribute { +return Attribute_GAVPhysicalAddresses} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_IdentifyReplyCommandGAVPhysicalAddresses) InitializeParent(parent IdentifyReplyCommand) {} +func (m *_IdentifyReplyCommandGAVPhysicalAddresses) InitializeParent(parent IdentifyReplyCommand ) {} -func (m *_IdentifyReplyCommandGAVPhysicalAddresses) GetParent() IdentifyReplyCommand { +func (m *_IdentifyReplyCommandGAVPhysicalAddresses) GetParent() IdentifyReplyCommand { return m._IdentifyReplyCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_IdentifyReplyCommandGAVPhysicalAddresses) GetValues() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewIdentifyReplyCommandGAVPhysicalAddresses factory function for _IdentifyReplyCommandGAVPhysicalAddresses -func NewIdentifyReplyCommandGAVPhysicalAddresses(values []byte, numBytes uint8) *_IdentifyReplyCommandGAVPhysicalAddresses { +func NewIdentifyReplyCommandGAVPhysicalAddresses( values []byte , numBytes uint8 ) *_IdentifyReplyCommandGAVPhysicalAddresses { _result := &_IdentifyReplyCommandGAVPhysicalAddresses{ - Values: values, - _IdentifyReplyCommand: NewIdentifyReplyCommand(numBytes), + Values: values, + _IdentifyReplyCommand: NewIdentifyReplyCommand(numBytes), } _result._IdentifyReplyCommand._IdentifyReplyCommandChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewIdentifyReplyCommandGAVPhysicalAddresses(values []byte, numBytes uint8) // Deprecated: use the interface for direct cast func CastIdentifyReplyCommandGAVPhysicalAddresses(structType interface{}) IdentifyReplyCommandGAVPhysicalAddresses { - if casted, ok := structType.(IdentifyReplyCommandGAVPhysicalAddresses); ok { + if casted, ok := structType.(IdentifyReplyCommandGAVPhysicalAddresses); ok { return casted } if casted, ok := structType.(*IdentifyReplyCommandGAVPhysicalAddresses); ok { @@ -119,6 +122,7 @@ func (m *_IdentifyReplyCommandGAVPhysicalAddresses) GetLengthInBits(ctx context. return lengthInBits } + func (m *_IdentifyReplyCommandGAVPhysicalAddresses) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -173,11 +177,11 @@ func (m *_IdentifyReplyCommandGAVPhysicalAddresses) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for IdentifyReplyCommandGAVPhysicalAddresses") } - // Array Field (values) - // Byte Array field (values) - if err := writeBuffer.WriteByteArray("values", m.GetValues()); err != nil { - return errors.Wrap(err, "Error serializing 'values' field") - } + // Array Field (values) + // Byte Array field (values) + if err := writeBuffer.WriteByteArray("values", m.GetValues()); err != nil { + return errors.Wrap(err, "Error serializing 'values' field") + } if popErr := writeBuffer.PopContext("IdentifyReplyCommandGAVPhysicalAddresses"); popErr != nil { return errors.Wrap(popErr, "Error popping for IdentifyReplyCommandGAVPhysicalAddresses") @@ -187,6 +191,7 @@ func (m *_IdentifyReplyCommandGAVPhysicalAddresses) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_IdentifyReplyCommandGAVPhysicalAddresses) isIdentifyReplyCommandGAVPhysicalAddresses() bool { return true } @@ -201,3 +206,6 @@ func (m *_IdentifyReplyCommandGAVPhysicalAddresses) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandGAVValuesCurrent.go b/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandGAVValuesCurrent.go index bf0f83e1713..7059a9237cb 100644 --- a/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandGAVValuesCurrent.go +++ b/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandGAVValuesCurrent.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // IdentifyReplyCommandGAVValuesCurrent is the corresponding interface of IdentifyReplyCommandGAVValuesCurrent type IdentifyReplyCommandGAVValuesCurrent interface { @@ -46,29 +48,29 @@ type IdentifyReplyCommandGAVValuesCurrentExactly interface { // _IdentifyReplyCommandGAVValuesCurrent is the data-structure of this message type _IdentifyReplyCommandGAVValuesCurrent struct { *_IdentifyReplyCommand - Values []byte + Values []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_IdentifyReplyCommandGAVValuesCurrent) GetAttribute() Attribute { - return Attribute_GAVValuesCurrent -} +func (m *_IdentifyReplyCommandGAVValuesCurrent) GetAttribute() Attribute { +return Attribute_GAVValuesCurrent} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_IdentifyReplyCommandGAVValuesCurrent) InitializeParent(parent IdentifyReplyCommand) {} +func (m *_IdentifyReplyCommandGAVValuesCurrent) InitializeParent(parent IdentifyReplyCommand ) {} -func (m *_IdentifyReplyCommandGAVValuesCurrent) GetParent() IdentifyReplyCommand { +func (m *_IdentifyReplyCommandGAVValuesCurrent) GetParent() IdentifyReplyCommand { return m._IdentifyReplyCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_IdentifyReplyCommandGAVValuesCurrent) GetValues() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewIdentifyReplyCommandGAVValuesCurrent factory function for _IdentifyReplyCommandGAVValuesCurrent -func NewIdentifyReplyCommandGAVValuesCurrent(values []byte, numBytes uint8) *_IdentifyReplyCommandGAVValuesCurrent { +func NewIdentifyReplyCommandGAVValuesCurrent( values []byte , numBytes uint8 ) *_IdentifyReplyCommandGAVValuesCurrent { _result := &_IdentifyReplyCommandGAVValuesCurrent{ - Values: values, - _IdentifyReplyCommand: NewIdentifyReplyCommand(numBytes), + Values: values, + _IdentifyReplyCommand: NewIdentifyReplyCommand(numBytes), } _result._IdentifyReplyCommand._IdentifyReplyCommandChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewIdentifyReplyCommandGAVValuesCurrent(values []byte, numBytes uint8) *_Id // Deprecated: use the interface for direct cast func CastIdentifyReplyCommandGAVValuesCurrent(structType interface{}) IdentifyReplyCommandGAVValuesCurrent { - if casted, ok := structType.(IdentifyReplyCommandGAVValuesCurrent); ok { + if casted, ok := structType.(IdentifyReplyCommandGAVValuesCurrent); ok { return casted } if casted, ok := structType.(*IdentifyReplyCommandGAVValuesCurrent); ok { @@ -119,6 +122,7 @@ func (m *_IdentifyReplyCommandGAVValuesCurrent) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_IdentifyReplyCommandGAVValuesCurrent) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -173,11 +177,11 @@ func (m *_IdentifyReplyCommandGAVValuesCurrent) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for IdentifyReplyCommandGAVValuesCurrent") } - // Array Field (values) - // Byte Array field (values) - if err := writeBuffer.WriteByteArray("values", m.GetValues()); err != nil { - return errors.Wrap(err, "Error serializing 'values' field") - } + // Array Field (values) + // Byte Array field (values) + if err := writeBuffer.WriteByteArray("values", m.GetValues()); err != nil { + return errors.Wrap(err, "Error serializing 'values' field") + } if popErr := writeBuffer.PopContext("IdentifyReplyCommandGAVValuesCurrent"); popErr != nil { return errors.Wrap(popErr, "Error popping for IdentifyReplyCommandGAVValuesCurrent") @@ -187,6 +191,7 @@ func (m *_IdentifyReplyCommandGAVValuesCurrent) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_IdentifyReplyCommandGAVValuesCurrent) isIdentifyReplyCommandGAVValuesCurrent() bool { return true } @@ -201,3 +206,6 @@ func (m *_IdentifyReplyCommandGAVValuesCurrent) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandGAVValuesStored.go b/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandGAVValuesStored.go index be89f86b1a6..53cfa3a2991 100644 --- a/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandGAVValuesStored.go +++ b/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandGAVValuesStored.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // IdentifyReplyCommandGAVValuesStored is the corresponding interface of IdentifyReplyCommandGAVValuesStored type IdentifyReplyCommandGAVValuesStored interface { @@ -46,29 +48,29 @@ type IdentifyReplyCommandGAVValuesStoredExactly interface { // _IdentifyReplyCommandGAVValuesStored is the data-structure of this message type _IdentifyReplyCommandGAVValuesStored struct { *_IdentifyReplyCommand - Values []byte + Values []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_IdentifyReplyCommandGAVValuesStored) GetAttribute() Attribute { - return Attribute_GAVValuesStored -} +func (m *_IdentifyReplyCommandGAVValuesStored) GetAttribute() Attribute { +return Attribute_GAVValuesStored} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_IdentifyReplyCommandGAVValuesStored) InitializeParent(parent IdentifyReplyCommand) {} +func (m *_IdentifyReplyCommandGAVValuesStored) InitializeParent(parent IdentifyReplyCommand ) {} -func (m *_IdentifyReplyCommandGAVValuesStored) GetParent() IdentifyReplyCommand { +func (m *_IdentifyReplyCommandGAVValuesStored) GetParent() IdentifyReplyCommand { return m._IdentifyReplyCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_IdentifyReplyCommandGAVValuesStored) GetValues() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewIdentifyReplyCommandGAVValuesStored factory function for _IdentifyReplyCommandGAVValuesStored -func NewIdentifyReplyCommandGAVValuesStored(values []byte, numBytes uint8) *_IdentifyReplyCommandGAVValuesStored { +func NewIdentifyReplyCommandGAVValuesStored( values []byte , numBytes uint8 ) *_IdentifyReplyCommandGAVValuesStored { _result := &_IdentifyReplyCommandGAVValuesStored{ - Values: values, - _IdentifyReplyCommand: NewIdentifyReplyCommand(numBytes), + Values: values, + _IdentifyReplyCommand: NewIdentifyReplyCommand(numBytes), } _result._IdentifyReplyCommand._IdentifyReplyCommandChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewIdentifyReplyCommandGAVValuesStored(values []byte, numBytes uint8) *_Ide // Deprecated: use the interface for direct cast func CastIdentifyReplyCommandGAVValuesStored(structType interface{}) IdentifyReplyCommandGAVValuesStored { - if casted, ok := structType.(IdentifyReplyCommandGAVValuesStored); ok { + if casted, ok := structType.(IdentifyReplyCommandGAVValuesStored); ok { return casted } if casted, ok := structType.(*IdentifyReplyCommandGAVValuesStored); ok { @@ -119,6 +122,7 @@ func (m *_IdentifyReplyCommandGAVValuesStored) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_IdentifyReplyCommandGAVValuesStored) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -173,11 +177,11 @@ func (m *_IdentifyReplyCommandGAVValuesStored) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for IdentifyReplyCommandGAVValuesStored") } - // Array Field (values) - // Byte Array field (values) - if err := writeBuffer.WriteByteArray("values", m.GetValues()); err != nil { - return errors.Wrap(err, "Error serializing 'values' field") - } + // Array Field (values) + // Byte Array field (values) + if err := writeBuffer.WriteByteArray("values", m.GetValues()); err != nil { + return errors.Wrap(err, "Error serializing 'values' field") + } if popErr := writeBuffer.PopContext("IdentifyReplyCommandGAVValuesStored"); popErr != nil { return errors.Wrap(popErr, "Error popping for IdentifyReplyCommandGAVValuesStored") @@ -187,6 +191,7 @@ func (m *_IdentifyReplyCommandGAVValuesStored) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_IdentifyReplyCommandGAVValuesStored) isIdentifyReplyCommandGAVValuesStored() bool { return true } @@ -201,3 +206,6 @@ func (m *_IdentifyReplyCommandGAVValuesStored) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandLogicalAssignment.go b/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandLogicalAssignment.go index c17d0d78c37..fb45dea94ea 100644 --- a/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandLogicalAssignment.go +++ b/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandLogicalAssignment.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // IdentifyReplyCommandLogicalAssignment is the corresponding interface of IdentifyReplyCommandLogicalAssignment type IdentifyReplyCommandLogicalAssignment interface { @@ -47,29 +49,29 @@ type IdentifyReplyCommandLogicalAssignmentExactly interface { // _IdentifyReplyCommandLogicalAssignment is the data-structure of this message type _IdentifyReplyCommandLogicalAssignment struct { *_IdentifyReplyCommand - LogicAssigment []LogicAssignment + LogicAssigment []LogicAssignment } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_IdentifyReplyCommandLogicalAssignment) GetAttribute() Attribute { - return Attribute_LogicalAssignment -} +func (m *_IdentifyReplyCommandLogicalAssignment) GetAttribute() Attribute { +return Attribute_LogicalAssignment} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_IdentifyReplyCommandLogicalAssignment) InitializeParent(parent IdentifyReplyCommand) {} +func (m *_IdentifyReplyCommandLogicalAssignment) InitializeParent(parent IdentifyReplyCommand ) {} -func (m *_IdentifyReplyCommandLogicalAssignment) GetParent() IdentifyReplyCommand { +func (m *_IdentifyReplyCommandLogicalAssignment) GetParent() IdentifyReplyCommand { return m._IdentifyReplyCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -84,11 +86,12 @@ func (m *_IdentifyReplyCommandLogicalAssignment) GetLogicAssigment() []LogicAssi /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewIdentifyReplyCommandLogicalAssignment factory function for _IdentifyReplyCommandLogicalAssignment -func NewIdentifyReplyCommandLogicalAssignment(logicAssigment []LogicAssignment, numBytes uint8) *_IdentifyReplyCommandLogicalAssignment { +func NewIdentifyReplyCommandLogicalAssignment( logicAssigment []LogicAssignment , numBytes uint8 ) *_IdentifyReplyCommandLogicalAssignment { _result := &_IdentifyReplyCommandLogicalAssignment{ - LogicAssigment: logicAssigment, - _IdentifyReplyCommand: NewIdentifyReplyCommand(numBytes), + LogicAssigment: logicAssigment, + _IdentifyReplyCommand: NewIdentifyReplyCommand(numBytes), } _result._IdentifyReplyCommand._IdentifyReplyCommandChildRequirements = _result return _result @@ -96,7 +99,7 @@ func NewIdentifyReplyCommandLogicalAssignment(logicAssigment []LogicAssignment, // Deprecated: use the interface for direct cast func CastIdentifyReplyCommandLogicalAssignment(structType interface{}) IdentifyReplyCommandLogicalAssignment { - if casted, ok := structType.(IdentifyReplyCommandLogicalAssignment); ok { + if casted, ok := structType.(IdentifyReplyCommandLogicalAssignment); ok { return casted } if casted, ok := structType.(*IdentifyReplyCommandLogicalAssignment); ok { @@ -118,13 +121,14 @@ func (m *_IdentifyReplyCommandLogicalAssignment) GetLengthInBits(ctx context.Con arrayCtx := spiContext.CreateArrayContext(ctx, len(m.LogicAssigment), _curItem) _ = arrayCtx _ = _curItem - lengthInBits += element.(interface{ GetLengthInBits(context.Context) uint16 }).GetLengthInBits(arrayCtx) + lengthInBits += element.(interface{GetLengthInBits(context.Context) uint16}).GetLengthInBits(arrayCtx) } } return lengthInBits } + func (m *_IdentifyReplyCommandLogicalAssignment) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -158,7 +162,7 @@ func IdentifyReplyCommandLogicalAssignmentParseWithBuffer(ctx context.Context, r arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := LogicAssignmentParseWithBuffer(arrayCtx, readBuffer) +_item, _err := LogicAssignmentParseWithBuffer(arrayCtx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'logicAssigment' field of IdentifyReplyCommandLogicalAssignment") } @@ -200,22 +204,22 @@ func (m *_IdentifyReplyCommandLogicalAssignment) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for IdentifyReplyCommandLogicalAssignment") } - // Array Field (logicAssigment) - if pushErr := writeBuffer.PushContext("logicAssigment", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for logicAssigment") - } - for _curItem, _element := range m.GetLogicAssigment() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetLogicAssigment()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'logicAssigment' field") - } - } - if popErr := writeBuffer.PopContext("logicAssigment", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for logicAssigment") + // Array Field (logicAssigment) + if pushErr := writeBuffer.PushContext("logicAssigment", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for logicAssigment") + } + for _curItem, _element := range m.GetLogicAssigment() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetLogicAssigment()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'logicAssigment' field") } + } + if popErr := writeBuffer.PopContext("logicAssigment", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for logicAssigment") + } if popErr := writeBuffer.PopContext("IdentifyReplyCommandLogicalAssignment"); popErr != nil { return errors.Wrap(popErr, "Error popping for IdentifyReplyCommandLogicalAssignment") @@ -225,6 +229,7 @@ func (m *_IdentifyReplyCommandLogicalAssignment) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_IdentifyReplyCommandLogicalAssignment) isIdentifyReplyCommandLogicalAssignment() bool { return true } @@ -239,3 +244,6 @@ func (m *_IdentifyReplyCommandLogicalAssignment) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandManufacturer.go b/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandManufacturer.go index c5f10498b12..2e72a1dd20e 100644 --- a/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandManufacturer.go +++ b/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandManufacturer.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // IdentifyReplyCommandManufacturer is the corresponding interface of IdentifyReplyCommandManufacturer type IdentifyReplyCommandManufacturer interface { @@ -46,29 +48,29 @@ type IdentifyReplyCommandManufacturerExactly interface { // _IdentifyReplyCommandManufacturer is the data-structure of this message type _IdentifyReplyCommandManufacturer struct { *_IdentifyReplyCommand - ManufacturerName string + ManufacturerName string } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_IdentifyReplyCommandManufacturer) GetAttribute() Attribute { - return Attribute_Manufacturer -} +func (m *_IdentifyReplyCommandManufacturer) GetAttribute() Attribute { +return Attribute_Manufacturer} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_IdentifyReplyCommandManufacturer) InitializeParent(parent IdentifyReplyCommand) {} +func (m *_IdentifyReplyCommandManufacturer) InitializeParent(parent IdentifyReplyCommand ) {} -func (m *_IdentifyReplyCommandManufacturer) GetParent() IdentifyReplyCommand { +func (m *_IdentifyReplyCommandManufacturer) GetParent() IdentifyReplyCommand { return m._IdentifyReplyCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_IdentifyReplyCommandManufacturer) GetManufacturerName() string { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewIdentifyReplyCommandManufacturer factory function for _IdentifyReplyCommandManufacturer -func NewIdentifyReplyCommandManufacturer(manufacturerName string, numBytes uint8) *_IdentifyReplyCommandManufacturer { +func NewIdentifyReplyCommandManufacturer( manufacturerName string , numBytes uint8 ) *_IdentifyReplyCommandManufacturer { _result := &_IdentifyReplyCommandManufacturer{ - ManufacturerName: manufacturerName, - _IdentifyReplyCommand: NewIdentifyReplyCommand(numBytes), + ManufacturerName: manufacturerName, + _IdentifyReplyCommand: NewIdentifyReplyCommand(numBytes), } _result._IdentifyReplyCommand._IdentifyReplyCommandChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewIdentifyReplyCommandManufacturer(manufacturerName string, numBytes uint8 // Deprecated: use the interface for direct cast func CastIdentifyReplyCommandManufacturer(structType interface{}) IdentifyReplyCommandManufacturer { - if casted, ok := structType.(IdentifyReplyCommandManufacturer); ok { + if casted, ok := structType.(IdentifyReplyCommandManufacturer); ok { return casted } if casted, ok := structType.(*IdentifyReplyCommandManufacturer); ok { @@ -112,11 +115,12 @@ func (m *_IdentifyReplyCommandManufacturer) GetLengthInBits(ctx context.Context) lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (manufacturerName) - lengthInBits += 64 + lengthInBits += 64; return lengthInBits } + func (m *_IdentifyReplyCommandManufacturer) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -135,7 +139,7 @@ func IdentifyReplyCommandManufacturerParseWithBuffer(ctx context.Context, readBu _ = currentPos // Simple Field (manufacturerName) - _manufacturerName, _manufacturerNameErr := readBuffer.ReadString("manufacturerName", uint32(64), "UTF-8") +_manufacturerName, _manufacturerNameErr := readBuffer.ReadString("manufacturerName", uint32(64), "UTF-8") if _manufacturerNameErr != nil { return nil, errors.Wrap(_manufacturerNameErr, "Error parsing 'manufacturerName' field of IdentifyReplyCommandManufacturer") } @@ -172,12 +176,12 @@ func (m *_IdentifyReplyCommandManufacturer) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for IdentifyReplyCommandManufacturer") } - // Simple Field (manufacturerName) - manufacturerName := string(m.GetManufacturerName()) - _manufacturerNameErr := writeBuffer.WriteString("manufacturerName", uint32(64), "UTF-8", (manufacturerName)) - if _manufacturerNameErr != nil { - return errors.Wrap(_manufacturerNameErr, "Error serializing 'manufacturerName' field") - } + // Simple Field (manufacturerName) + manufacturerName := string(m.GetManufacturerName()) + _manufacturerNameErr := writeBuffer.WriteString("manufacturerName", uint32(64), "UTF-8", (manufacturerName)) + if _manufacturerNameErr != nil { + return errors.Wrap(_manufacturerNameErr, "Error serializing 'manufacturerName' field") + } if popErr := writeBuffer.PopContext("IdentifyReplyCommandManufacturer"); popErr != nil { return errors.Wrap(popErr, "Error popping for IdentifyReplyCommandManufacturer") @@ -187,6 +191,7 @@ func (m *_IdentifyReplyCommandManufacturer) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_IdentifyReplyCommandManufacturer) isIdentifyReplyCommandManufacturer() bool { return true } @@ -201,3 +206,6 @@ func (m *_IdentifyReplyCommandManufacturer) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandMaximumLevels.go b/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandMaximumLevels.go index 05336d20959..7f3d309e56c 100644 --- a/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandMaximumLevels.go +++ b/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandMaximumLevels.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // IdentifyReplyCommandMaximumLevels is the corresponding interface of IdentifyReplyCommandMaximumLevels type IdentifyReplyCommandMaximumLevels interface { @@ -46,29 +48,29 @@ type IdentifyReplyCommandMaximumLevelsExactly interface { // _IdentifyReplyCommandMaximumLevels is the data-structure of this message type _IdentifyReplyCommandMaximumLevels struct { *_IdentifyReplyCommand - MaximumLevels []byte + MaximumLevels []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_IdentifyReplyCommandMaximumLevels) GetAttribute() Attribute { - return Attribute_MaximumLevels -} +func (m *_IdentifyReplyCommandMaximumLevels) GetAttribute() Attribute { +return Attribute_MaximumLevels} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_IdentifyReplyCommandMaximumLevels) InitializeParent(parent IdentifyReplyCommand) {} +func (m *_IdentifyReplyCommandMaximumLevels) InitializeParent(parent IdentifyReplyCommand ) {} -func (m *_IdentifyReplyCommandMaximumLevels) GetParent() IdentifyReplyCommand { +func (m *_IdentifyReplyCommandMaximumLevels) GetParent() IdentifyReplyCommand { return m._IdentifyReplyCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_IdentifyReplyCommandMaximumLevels) GetMaximumLevels() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewIdentifyReplyCommandMaximumLevels factory function for _IdentifyReplyCommandMaximumLevels -func NewIdentifyReplyCommandMaximumLevels(maximumLevels []byte, numBytes uint8) *_IdentifyReplyCommandMaximumLevels { +func NewIdentifyReplyCommandMaximumLevels( maximumLevels []byte , numBytes uint8 ) *_IdentifyReplyCommandMaximumLevels { _result := &_IdentifyReplyCommandMaximumLevels{ - MaximumLevels: maximumLevels, - _IdentifyReplyCommand: NewIdentifyReplyCommand(numBytes), + MaximumLevels: maximumLevels, + _IdentifyReplyCommand: NewIdentifyReplyCommand(numBytes), } _result._IdentifyReplyCommand._IdentifyReplyCommandChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewIdentifyReplyCommandMaximumLevels(maximumLevels []byte, numBytes uint8) // Deprecated: use the interface for direct cast func CastIdentifyReplyCommandMaximumLevels(structType interface{}) IdentifyReplyCommandMaximumLevels { - if casted, ok := structType.(IdentifyReplyCommandMaximumLevels); ok { + if casted, ok := structType.(IdentifyReplyCommandMaximumLevels); ok { return casted } if casted, ok := structType.(*IdentifyReplyCommandMaximumLevels); ok { @@ -119,6 +122,7 @@ func (m *_IdentifyReplyCommandMaximumLevels) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_IdentifyReplyCommandMaximumLevels) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -173,11 +177,11 @@ func (m *_IdentifyReplyCommandMaximumLevels) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for IdentifyReplyCommandMaximumLevels") } - // Array Field (maximumLevels) - // Byte Array field (maximumLevels) - if err := writeBuffer.WriteByteArray("maximumLevels", m.GetMaximumLevels()); err != nil { - return errors.Wrap(err, "Error serializing 'maximumLevels' field") - } + // Array Field (maximumLevels) + // Byte Array field (maximumLevels) + if err := writeBuffer.WriteByteArray("maximumLevels", m.GetMaximumLevels()); err != nil { + return errors.Wrap(err, "Error serializing 'maximumLevels' field") + } if popErr := writeBuffer.PopContext("IdentifyReplyCommandMaximumLevels"); popErr != nil { return errors.Wrap(popErr, "Error popping for IdentifyReplyCommandMaximumLevels") @@ -187,6 +191,7 @@ func (m *_IdentifyReplyCommandMaximumLevels) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_IdentifyReplyCommandMaximumLevels) isIdentifyReplyCommandMaximumLevels() bool { return true } @@ -201,3 +206,6 @@ func (m *_IdentifyReplyCommandMaximumLevels) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandMinimumLevels.go b/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandMinimumLevels.go index b04b578c46e..8e413e4fc77 100644 --- a/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandMinimumLevels.go +++ b/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandMinimumLevels.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // IdentifyReplyCommandMinimumLevels is the corresponding interface of IdentifyReplyCommandMinimumLevels type IdentifyReplyCommandMinimumLevels interface { @@ -46,29 +48,29 @@ type IdentifyReplyCommandMinimumLevelsExactly interface { // _IdentifyReplyCommandMinimumLevels is the data-structure of this message type _IdentifyReplyCommandMinimumLevels struct { *_IdentifyReplyCommand - MinimumLevels []byte + MinimumLevels []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_IdentifyReplyCommandMinimumLevels) GetAttribute() Attribute { - return Attribute_MinimumLevels -} +func (m *_IdentifyReplyCommandMinimumLevels) GetAttribute() Attribute { +return Attribute_MinimumLevels} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_IdentifyReplyCommandMinimumLevels) InitializeParent(parent IdentifyReplyCommand) {} +func (m *_IdentifyReplyCommandMinimumLevels) InitializeParent(parent IdentifyReplyCommand ) {} -func (m *_IdentifyReplyCommandMinimumLevels) GetParent() IdentifyReplyCommand { +func (m *_IdentifyReplyCommandMinimumLevels) GetParent() IdentifyReplyCommand { return m._IdentifyReplyCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_IdentifyReplyCommandMinimumLevels) GetMinimumLevels() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewIdentifyReplyCommandMinimumLevels factory function for _IdentifyReplyCommandMinimumLevels -func NewIdentifyReplyCommandMinimumLevels(minimumLevels []byte, numBytes uint8) *_IdentifyReplyCommandMinimumLevels { +func NewIdentifyReplyCommandMinimumLevels( minimumLevels []byte , numBytes uint8 ) *_IdentifyReplyCommandMinimumLevels { _result := &_IdentifyReplyCommandMinimumLevels{ - MinimumLevels: minimumLevels, - _IdentifyReplyCommand: NewIdentifyReplyCommand(numBytes), + MinimumLevels: minimumLevels, + _IdentifyReplyCommand: NewIdentifyReplyCommand(numBytes), } _result._IdentifyReplyCommand._IdentifyReplyCommandChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewIdentifyReplyCommandMinimumLevels(minimumLevels []byte, numBytes uint8) // Deprecated: use the interface for direct cast func CastIdentifyReplyCommandMinimumLevels(structType interface{}) IdentifyReplyCommandMinimumLevels { - if casted, ok := structType.(IdentifyReplyCommandMinimumLevels); ok { + if casted, ok := structType.(IdentifyReplyCommandMinimumLevels); ok { return casted } if casted, ok := structType.(*IdentifyReplyCommandMinimumLevels); ok { @@ -119,6 +122,7 @@ func (m *_IdentifyReplyCommandMinimumLevels) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_IdentifyReplyCommandMinimumLevels) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -173,11 +177,11 @@ func (m *_IdentifyReplyCommandMinimumLevels) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for IdentifyReplyCommandMinimumLevels") } - // Array Field (minimumLevels) - // Byte Array field (minimumLevels) - if err := writeBuffer.WriteByteArray("minimumLevels", m.GetMinimumLevels()); err != nil { - return errors.Wrap(err, "Error serializing 'minimumLevels' field") - } + // Array Field (minimumLevels) + // Byte Array field (minimumLevels) + if err := writeBuffer.WriteByteArray("minimumLevels", m.GetMinimumLevels()); err != nil { + return errors.Wrap(err, "Error serializing 'minimumLevels' field") + } if popErr := writeBuffer.PopContext("IdentifyReplyCommandMinimumLevels"); popErr != nil { return errors.Wrap(popErr, "Error popping for IdentifyReplyCommandMinimumLevels") @@ -187,6 +191,7 @@ func (m *_IdentifyReplyCommandMinimumLevels) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_IdentifyReplyCommandMinimumLevels) isIdentifyReplyCommandMinimumLevels() bool { return true } @@ -201,3 +206,6 @@ func (m *_IdentifyReplyCommandMinimumLevels) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandNetworkTerminalLevels.go b/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandNetworkTerminalLevels.go index 967fbddea89..2b4b78dae9f 100644 --- a/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandNetworkTerminalLevels.go +++ b/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandNetworkTerminalLevels.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // IdentifyReplyCommandNetworkTerminalLevels is the corresponding interface of IdentifyReplyCommandNetworkTerminalLevels type IdentifyReplyCommandNetworkTerminalLevels interface { @@ -46,29 +48,29 @@ type IdentifyReplyCommandNetworkTerminalLevelsExactly interface { // _IdentifyReplyCommandNetworkTerminalLevels is the data-structure of this message type _IdentifyReplyCommandNetworkTerminalLevels struct { *_IdentifyReplyCommand - NetworkTerminalLevels []byte + NetworkTerminalLevels []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_IdentifyReplyCommandNetworkTerminalLevels) GetAttribute() Attribute { - return Attribute_NetworkTerminalLevels -} +func (m *_IdentifyReplyCommandNetworkTerminalLevels) GetAttribute() Attribute { +return Attribute_NetworkTerminalLevels} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_IdentifyReplyCommandNetworkTerminalLevels) InitializeParent(parent IdentifyReplyCommand) {} +func (m *_IdentifyReplyCommandNetworkTerminalLevels) InitializeParent(parent IdentifyReplyCommand ) {} -func (m *_IdentifyReplyCommandNetworkTerminalLevels) GetParent() IdentifyReplyCommand { +func (m *_IdentifyReplyCommandNetworkTerminalLevels) GetParent() IdentifyReplyCommand { return m._IdentifyReplyCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_IdentifyReplyCommandNetworkTerminalLevels) GetNetworkTerminalLevels() /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewIdentifyReplyCommandNetworkTerminalLevels factory function for _IdentifyReplyCommandNetworkTerminalLevels -func NewIdentifyReplyCommandNetworkTerminalLevels(networkTerminalLevels []byte, numBytes uint8) *_IdentifyReplyCommandNetworkTerminalLevels { +func NewIdentifyReplyCommandNetworkTerminalLevels( networkTerminalLevels []byte , numBytes uint8 ) *_IdentifyReplyCommandNetworkTerminalLevels { _result := &_IdentifyReplyCommandNetworkTerminalLevels{ NetworkTerminalLevels: networkTerminalLevels, - _IdentifyReplyCommand: NewIdentifyReplyCommand(numBytes), + _IdentifyReplyCommand: NewIdentifyReplyCommand(numBytes), } _result._IdentifyReplyCommand._IdentifyReplyCommandChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewIdentifyReplyCommandNetworkTerminalLevels(networkTerminalLevels []byte, // Deprecated: use the interface for direct cast func CastIdentifyReplyCommandNetworkTerminalLevels(structType interface{}) IdentifyReplyCommandNetworkTerminalLevels { - if casted, ok := structType.(IdentifyReplyCommandNetworkTerminalLevels); ok { + if casted, ok := structType.(IdentifyReplyCommandNetworkTerminalLevels); ok { return casted } if casted, ok := structType.(*IdentifyReplyCommandNetworkTerminalLevels); ok { @@ -119,6 +122,7 @@ func (m *_IdentifyReplyCommandNetworkTerminalLevels) GetLengthInBits(ctx context return lengthInBits } + func (m *_IdentifyReplyCommandNetworkTerminalLevels) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -173,11 +177,11 @@ func (m *_IdentifyReplyCommandNetworkTerminalLevels) SerializeWithWriteBuffer(ct return errors.Wrap(pushErr, "Error pushing for IdentifyReplyCommandNetworkTerminalLevels") } - // Array Field (networkTerminalLevels) - // Byte Array field (networkTerminalLevels) - if err := writeBuffer.WriteByteArray("networkTerminalLevels", m.GetNetworkTerminalLevels()); err != nil { - return errors.Wrap(err, "Error serializing 'networkTerminalLevels' field") - } + // Array Field (networkTerminalLevels) + // Byte Array field (networkTerminalLevels) + if err := writeBuffer.WriteByteArray("networkTerminalLevels", m.GetNetworkTerminalLevels()); err != nil { + return errors.Wrap(err, "Error serializing 'networkTerminalLevels' field") + } if popErr := writeBuffer.PopContext("IdentifyReplyCommandNetworkTerminalLevels"); popErr != nil { return errors.Wrap(popErr, "Error popping for IdentifyReplyCommandNetworkTerminalLevels") @@ -187,6 +191,7 @@ func (m *_IdentifyReplyCommandNetworkTerminalLevels) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_IdentifyReplyCommandNetworkTerminalLevels) isIdentifyReplyCommandNetworkTerminalLevels() bool { return true } @@ -201,3 +206,6 @@ func (m *_IdentifyReplyCommandNetworkTerminalLevels) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandNetworkVoltage.go b/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandNetworkVoltage.go index 77e56f42243..2161f0b9b70 100644 --- a/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandNetworkVoltage.go +++ b/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandNetworkVoltage.go @@ -19,6 +19,7 @@ package model + import ( "context" "fmt" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const IdentifyReplyCommandNetworkVoltage_DOT byte = 0x2C @@ -53,30 +55,30 @@ type IdentifyReplyCommandNetworkVoltageExactly interface { // _IdentifyReplyCommandNetworkVoltage is the data-structure of this message type _IdentifyReplyCommandNetworkVoltage struct { *_IdentifyReplyCommand - Volts string - VoltsDecimalPlace string + Volts string + VoltsDecimalPlace string } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_IdentifyReplyCommandNetworkVoltage) GetAttribute() Attribute { - return Attribute_NetworkVoltage -} +func (m *_IdentifyReplyCommandNetworkVoltage) GetAttribute() Attribute { +return Attribute_NetworkVoltage} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_IdentifyReplyCommandNetworkVoltage) InitializeParent(parent IdentifyReplyCommand) {} +func (m *_IdentifyReplyCommandNetworkVoltage) InitializeParent(parent IdentifyReplyCommand ) {} -func (m *_IdentifyReplyCommandNetworkVoltage) GetParent() IdentifyReplyCommand { +func (m *_IdentifyReplyCommandNetworkVoltage) GetParent() IdentifyReplyCommand { return m._IdentifyReplyCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -112,12 +114,13 @@ func (m *_IdentifyReplyCommandNetworkVoltage) GetV() byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewIdentifyReplyCommandNetworkVoltage factory function for _IdentifyReplyCommandNetworkVoltage -func NewIdentifyReplyCommandNetworkVoltage(volts string, voltsDecimalPlace string, numBytes uint8) *_IdentifyReplyCommandNetworkVoltage { +func NewIdentifyReplyCommandNetworkVoltage( volts string , voltsDecimalPlace string , numBytes uint8 ) *_IdentifyReplyCommandNetworkVoltage { _result := &_IdentifyReplyCommandNetworkVoltage{ - Volts: volts, - VoltsDecimalPlace: voltsDecimalPlace, - _IdentifyReplyCommand: NewIdentifyReplyCommand(numBytes), + Volts: volts, + VoltsDecimalPlace: voltsDecimalPlace, + _IdentifyReplyCommand: NewIdentifyReplyCommand(numBytes), } _result._IdentifyReplyCommand._IdentifyReplyCommandChildRequirements = _result return _result @@ -125,7 +128,7 @@ func NewIdentifyReplyCommandNetworkVoltage(volts string, voltsDecimalPlace strin // Deprecated: use the interface for direct cast func CastIdentifyReplyCommandNetworkVoltage(structType interface{}) IdentifyReplyCommandNetworkVoltage { - if casted, ok := structType.(IdentifyReplyCommandNetworkVoltage); ok { + if casted, ok := structType.(IdentifyReplyCommandNetworkVoltage); ok { return casted } if casted, ok := structType.(*IdentifyReplyCommandNetworkVoltage); ok { @@ -142,13 +145,13 @@ func (m *_IdentifyReplyCommandNetworkVoltage) GetLengthInBits(ctx context.Contex lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (volts) - lengthInBits += 16 + lengthInBits += 16; // Const Field (dot) lengthInBits += 8 // Simple field (voltsDecimalPlace) - lengthInBits += 16 + lengthInBits += 16; // Const Field (v) lengthInBits += 8 @@ -156,6 +159,7 @@ func (m *_IdentifyReplyCommandNetworkVoltage) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_IdentifyReplyCommandNetworkVoltage) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -174,7 +178,7 @@ func IdentifyReplyCommandNetworkVoltageParseWithBuffer(ctx context.Context, read _ = currentPos // Simple Field (volts) - _volts, _voltsErr := readBuffer.ReadString("volts", uint32(16), "UTF-8") +_volts, _voltsErr := readBuffer.ReadString("volts", uint32(16), "UTF-8") if _voltsErr != nil { return nil, errors.Wrap(_voltsErr, "Error parsing 'volts' field of IdentifyReplyCommandNetworkVoltage") } @@ -190,7 +194,7 @@ func IdentifyReplyCommandNetworkVoltageParseWithBuffer(ctx context.Context, read } // Simple Field (voltsDecimalPlace) - _voltsDecimalPlace, _voltsDecimalPlaceErr := readBuffer.ReadString("voltsDecimalPlace", uint32(16), "UTF-8") +_voltsDecimalPlace, _voltsDecimalPlaceErr := readBuffer.ReadString("voltsDecimalPlace", uint32(16), "UTF-8") if _voltsDecimalPlaceErr != nil { return nil, errors.Wrap(_voltsDecimalPlaceErr, "Error parsing 'voltsDecimalPlace' field of IdentifyReplyCommandNetworkVoltage") } @@ -214,7 +218,7 @@ func IdentifyReplyCommandNetworkVoltageParseWithBuffer(ctx context.Context, read _IdentifyReplyCommand: &_IdentifyReplyCommand{ NumBytes: numBytes, }, - Volts: volts, + Volts: volts, VoltsDecimalPlace: voltsDecimalPlace, } _child._IdentifyReplyCommand._IdentifyReplyCommandChildRequirements = _child @@ -237,31 +241,31 @@ func (m *_IdentifyReplyCommandNetworkVoltage) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for IdentifyReplyCommandNetworkVoltage") } - // Simple Field (volts) - volts := string(m.GetVolts()) - _voltsErr := writeBuffer.WriteString("volts", uint32(16), "UTF-8", (volts)) - if _voltsErr != nil { - return errors.Wrap(_voltsErr, "Error serializing 'volts' field") - } + // Simple Field (volts) + volts := string(m.GetVolts()) + _voltsErr := writeBuffer.WriteString("volts", uint32(16), "UTF-8", (volts)) + if _voltsErr != nil { + return errors.Wrap(_voltsErr, "Error serializing 'volts' field") + } - // Const Field (dot) - _dotErr := writeBuffer.WriteByte("dot", 0x2C) - if _dotErr != nil { - return errors.Wrap(_dotErr, "Error serializing 'dot' field") - } + // Const Field (dot) + _dotErr := writeBuffer.WriteByte("dot", 0x2C) + if _dotErr != nil { + return errors.Wrap(_dotErr, "Error serializing 'dot' field") + } - // Simple Field (voltsDecimalPlace) - voltsDecimalPlace := string(m.GetVoltsDecimalPlace()) - _voltsDecimalPlaceErr := writeBuffer.WriteString("voltsDecimalPlace", uint32(16), "UTF-8", (voltsDecimalPlace)) - if _voltsDecimalPlaceErr != nil { - return errors.Wrap(_voltsDecimalPlaceErr, "Error serializing 'voltsDecimalPlace' field") - } + // Simple Field (voltsDecimalPlace) + voltsDecimalPlace := string(m.GetVoltsDecimalPlace()) + _voltsDecimalPlaceErr := writeBuffer.WriteString("voltsDecimalPlace", uint32(16), "UTF-8", (voltsDecimalPlace)) + if _voltsDecimalPlaceErr != nil { + return errors.Wrap(_voltsDecimalPlaceErr, "Error serializing 'voltsDecimalPlace' field") + } - // Const Field (v) - _vErr := writeBuffer.WriteByte("v", 0x56) - if _vErr != nil { - return errors.Wrap(_vErr, "Error serializing 'v' field") - } + // Const Field (v) + _vErr := writeBuffer.WriteByte("v", 0x56) + if _vErr != nil { + return errors.Wrap(_vErr, "Error serializing 'v' field") + } if popErr := writeBuffer.PopContext("IdentifyReplyCommandNetworkVoltage"); popErr != nil { return errors.Wrap(popErr, "Error popping for IdentifyReplyCommandNetworkVoltage") @@ -271,6 +275,7 @@ func (m *_IdentifyReplyCommandNetworkVoltage) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_IdentifyReplyCommandNetworkVoltage) isIdentifyReplyCommandNetworkVoltage() bool { return true } @@ -285,3 +290,6 @@ func (m *_IdentifyReplyCommandNetworkVoltage) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandOutputUnitSummary.go b/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandOutputUnitSummary.go index b277eef27ed..d4152c80d7c 100644 --- a/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandOutputUnitSummary.go +++ b/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandOutputUnitSummary.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // IdentifyReplyCommandOutputUnitSummary is the corresponding interface of IdentifyReplyCommandOutputUnitSummary type IdentifyReplyCommandOutputUnitSummary interface { @@ -52,32 +54,32 @@ type IdentifyReplyCommandOutputUnitSummaryExactly interface { // _IdentifyReplyCommandOutputUnitSummary is the data-structure of this message type _IdentifyReplyCommandOutputUnitSummary struct { *_IdentifyReplyCommand - UnitFlags IdentifyReplyCommandUnitSummary - GavStoreEnabledByte1 *byte - GavStoreEnabledByte2 *byte - TimeFromLastRecoverOfMainsInSeconds uint8 + UnitFlags IdentifyReplyCommandUnitSummary + GavStoreEnabledByte1 *byte + GavStoreEnabledByte2 *byte + TimeFromLastRecoverOfMainsInSeconds uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_IdentifyReplyCommandOutputUnitSummary) GetAttribute() Attribute { - return Attribute_OutputUnitSummary -} +func (m *_IdentifyReplyCommandOutputUnitSummary) GetAttribute() Attribute { +return Attribute_OutputUnitSummary} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_IdentifyReplyCommandOutputUnitSummary) InitializeParent(parent IdentifyReplyCommand) {} +func (m *_IdentifyReplyCommandOutputUnitSummary) InitializeParent(parent IdentifyReplyCommand ) {} -func (m *_IdentifyReplyCommandOutputUnitSummary) GetParent() IdentifyReplyCommand { +func (m *_IdentifyReplyCommandOutputUnitSummary) GetParent() IdentifyReplyCommand { return m._IdentifyReplyCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -104,14 +106,15 @@ func (m *_IdentifyReplyCommandOutputUnitSummary) GetTimeFromLastRecoverOfMainsIn /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewIdentifyReplyCommandOutputUnitSummary factory function for _IdentifyReplyCommandOutputUnitSummary -func NewIdentifyReplyCommandOutputUnitSummary(unitFlags IdentifyReplyCommandUnitSummary, gavStoreEnabledByte1 *byte, gavStoreEnabledByte2 *byte, timeFromLastRecoverOfMainsInSeconds uint8, numBytes uint8) *_IdentifyReplyCommandOutputUnitSummary { +func NewIdentifyReplyCommandOutputUnitSummary( unitFlags IdentifyReplyCommandUnitSummary , gavStoreEnabledByte1 *byte , gavStoreEnabledByte2 *byte , timeFromLastRecoverOfMainsInSeconds uint8 , numBytes uint8 ) *_IdentifyReplyCommandOutputUnitSummary { _result := &_IdentifyReplyCommandOutputUnitSummary{ - UnitFlags: unitFlags, - GavStoreEnabledByte1: gavStoreEnabledByte1, - GavStoreEnabledByte2: gavStoreEnabledByte2, + UnitFlags: unitFlags, + GavStoreEnabledByte1: gavStoreEnabledByte1, + GavStoreEnabledByte2: gavStoreEnabledByte2, TimeFromLastRecoverOfMainsInSeconds: timeFromLastRecoverOfMainsInSeconds, - _IdentifyReplyCommand: NewIdentifyReplyCommand(numBytes), + _IdentifyReplyCommand: NewIdentifyReplyCommand(numBytes), } _result._IdentifyReplyCommand._IdentifyReplyCommandChildRequirements = _result return _result @@ -119,7 +122,7 @@ func NewIdentifyReplyCommandOutputUnitSummary(unitFlags IdentifyReplyCommandUnit // Deprecated: use the interface for direct cast func CastIdentifyReplyCommandOutputUnitSummary(structType interface{}) IdentifyReplyCommandOutputUnitSummary { - if casted, ok := structType.(IdentifyReplyCommandOutputUnitSummary); ok { + if casted, ok := structType.(IdentifyReplyCommandOutputUnitSummary); ok { return casted } if casted, ok := structType.(*IdentifyReplyCommandOutputUnitSummary); ok { @@ -149,11 +152,12 @@ func (m *_IdentifyReplyCommandOutputUnitSummary) GetLengthInBits(ctx context.Con } // Simple field (timeFromLastRecoverOfMainsInSeconds) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_IdentifyReplyCommandOutputUnitSummary) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -175,7 +179,7 @@ func IdentifyReplyCommandOutputUnitSummaryParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("unitFlags"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for unitFlags") } - _unitFlags, _unitFlagsErr := IdentifyReplyCommandUnitSummaryParseWithBuffer(ctx, readBuffer) +_unitFlags, _unitFlagsErr := IdentifyReplyCommandUnitSummaryParseWithBuffer(ctx, readBuffer) if _unitFlagsErr != nil { return nil, errors.Wrap(_unitFlagsErr, "Error parsing 'unitFlags' field of IdentifyReplyCommandOutputUnitSummary") } @@ -186,7 +190,7 @@ func IdentifyReplyCommandOutputUnitSummaryParseWithBuffer(ctx context.Context, r // Optional Field (gavStoreEnabledByte1) (Can be skipped, if a given expression evaluates to false) var gavStoreEnabledByte1 *byte = nil - if bool((numBytes) > (1)) { + if bool((numBytes) > ((1))) { _val, _err := readBuffer.ReadByte("gavStoreEnabledByte1") if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'gavStoreEnabledByte1' field of IdentifyReplyCommandOutputUnitSummary") @@ -196,7 +200,7 @@ func IdentifyReplyCommandOutputUnitSummaryParseWithBuffer(ctx context.Context, r // Optional Field (gavStoreEnabledByte2) (Can be skipped, if a given expression evaluates to false) var gavStoreEnabledByte2 *byte = nil - if bool((numBytes) > (2)) { + if bool((numBytes) > ((2))) { _val, _err := readBuffer.ReadByte("gavStoreEnabledByte2") if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'gavStoreEnabledByte2' field of IdentifyReplyCommandOutputUnitSummary") @@ -205,7 +209,7 @@ func IdentifyReplyCommandOutputUnitSummaryParseWithBuffer(ctx context.Context, r } // Simple Field (timeFromLastRecoverOfMainsInSeconds) - _timeFromLastRecoverOfMainsInSeconds, _timeFromLastRecoverOfMainsInSecondsErr := readBuffer.ReadUint8("timeFromLastRecoverOfMainsInSeconds", 8) +_timeFromLastRecoverOfMainsInSeconds, _timeFromLastRecoverOfMainsInSecondsErr := readBuffer.ReadUint8("timeFromLastRecoverOfMainsInSeconds", 8) if _timeFromLastRecoverOfMainsInSecondsErr != nil { return nil, errors.Wrap(_timeFromLastRecoverOfMainsInSecondsErr, "Error parsing 'timeFromLastRecoverOfMainsInSeconds' field of IdentifyReplyCommandOutputUnitSummary") } @@ -220,9 +224,9 @@ func IdentifyReplyCommandOutputUnitSummaryParseWithBuffer(ctx context.Context, r _IdentifyReplyCommand: &_IdentifyReplyCommand{ NumBytes: numBytes, }, - UnitFlags: unitFlags, - GavStoreEnabledByte1: gavStoreEnabledByte1, - GavStoreEnabledByte2: gavStoreEnabledByte2, + UnitFlags: unitFlags, + GavStoreEnabledByte1: gavStoreEnabledByte1, + GavStoreEnabledByte2: gavStoreEnabledByte2, TimeFromLastRecoverOfMainsInSeconds: timeFromLastRecoverOfMainsInSeconds, } _child._IdentifyReplyCommand._IdentifyReplyCommandChildRequirements = _child @@ -245,44 +249,44 @@ func (m *_IdentifyReplyCommandOutputUnitSummary) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for IdentifyReplyCommandOutputUnitSummary") } - // Simple Field (unitFlags) - if pushErr := writeBuffer.PushContext("unitFlags"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for unitFlags") - } - _unitFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetUnitFlags()) - if popErr := writeBuffer.PopContext("unitFlags"); popErr != nil { - return errors.Wrap(popErr, "Error popping for unitFlags") - } - if _unitFlagsErr != nil { - return errors.Wrap(_unitFlagsErr, "Error serializing 'unitFlags' field") - } + // Simple Field (unitFlags) + if pushErr := writeBuffer.PushContext("unitFlags"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for unitFlags") + } + _unitFlagsErr := writeBuffer.WriteSerializable(ctx, m.GetUnitFlags()) + if popErr := writeBuffer.PopContext("unitFlags"); popErr != nil { + return errors.Wrap(popErr, "Error popping for unitFlags") + } + if _unitFlagsErr != nil { + return errors.Wrap(_unitFlagsErr, "Error serializing 'unitFlags' field") + } - // Optional Field (gavStoreEnabledByte1) (Can be skipped, if the value is null) - var gavStoreEnabledByte1 *byte = nil - if m.GetGavStoreEnabledByte1() != nil { - gavStoreEnabledByte1 = m.GetGavStoreEnabledByte1() - _gavStoreEnabledByte1Err := writeBuffer.WriteByte("gavStoreEnabledByte1", *(gavStoreEnabledByte1)) - if _gavStoreEnabledByte1Err != nil { - return errors.Wrap(_gavStoreEnabledByte1Err, "Error serializing 'gavStoreEnabledByte1' field") - } + // Optional Field (gavStoreEnabledByte1) (Can be skipped, if the value is null) + var gavStoreEnabledByte1 *byte = nil + if m.GetGavStoreEnabledByte1() != nil { + gavStoreEnabledByte1 = m.GetGavStoreEnabledByte1() + _gavStoreEnabledByte1Err := writeBuffer.WriteByte("gavStoreEnabledByte1", *(gavStoreEnabledByte1)) + if _gavStoreEnabledByte1Err != nil { + return errors.Wrap(_gavStoreEnabledByte1Err, "Error serializing 'gavStoreEnabledByte1' field") } + } - // Optional Field (gavStoreEnabledByte2) (Can be skipped, if the value is null) - var gavStoreEnabledByte2 *byte = nil - if m.GetGavStoreEnabledByte2() != nil { - gavStoreEnabledByte2 = m.GetGavStoreEnabledByte2() - _gavStoreEnabledByte2Err := writeBuffer.WriteByte("gavStoreEnabledByte2", *(gavStoreEnabledByte2)) - if _gavStoreEnabledByte2Err != nil { - return errors.Wrap(_gavStoreEnabledByte2Err, "Error serializing 'gavStoreEnabledByte2' field") - } + // Optional Field (gavStoreEnabledByte2) (Can be skipped, if the value is null) + var gavStoreEnabledByte2 *byte = nil + if m.GetGavStoreEnabledByte2() != nil { + gavStoreEnabledByte2 = m.GetGavStoreEnabledByte2() + _gavStoreEnabledByte2Err := writeBuffer.WriteByte("gavStoreEnabledByte2", *(gavStoreEnabledByte2)) + if _gavStoreEnabledByte2Err != nil { + return errors.Wrap(_gavStoreEnabledByte2Err, "Error serializing 'gavStoreEnabledByte2' field") } + } - // Simple Field (timeFromLastRecoverOfMainsInSeconds) - timeFromLastRecoverOfMainsInSeconds := uint8(m.GetTimeFromLastRecoverOfMainsInSeconds()) - _timeFromLastRecoverOfMainsInSecondsErr := writeBuffer.WriteUint8("timeFromLastRecoverOfMainsInSeconds", 8, (timeFromLastRecoverOfMainsInSeconds)) - if _timeFromLastRecoverOfMainsInSecondsErr != nil { - return errors.Wrap(_timeFromLastRecoverOfMainsInSecondsErr, "Error serializing 'timeFromLastRecoverOfMainsInSeconds' field") - } + // Simple Field (timeFromLastRecoverOfMainsInSeconds) + timeFromLastRecoverOfMainsInSeconds := uint8(m.GetTimeFromLastRecoverOfMainsInSeconds()) + _timeFromLastRecoverOfMainsInSecondsErr := writeBuffer.WriteUint8("timeFromLastRecoverOfMainsInSeconds", 8, (timeFromLastRecoverOfMainsInSeconds)) + if _timeFromLastRecoverOfMainsInSecondsErr != nil { + return errors.Wrap(_timeFromLastRecoverOfMainsInSecondsErr, "Error serializing 'timeFromLastRecoverOfMainsInSeconds' field") + } if popErr := writeBuffer.PopContext("IdentifyReplyCommandOutputUnitSummary"); popErr != nil { return errors.Wrap(popErr, "Error popping for IdentifyReplyCommandOutputUnitSummary") @@ -292,6 +296,7 @@ func (m *_IdentifyReplyCommandOutputUnitSummary) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_IdentifyReplyCommandOutputUnitSummary) isIdentifyReplyCommandOutputUnitSummary() bool { return true } @@ -306,3 +311,6 @@ func (m *_IdentifyReplyCommandOutputUnitSummary) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandSummary.go b/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandSummary.go index 4d81e1a3688..04dc48c40e8 100644 --- a/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandSummary.go +++ b/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandSummary.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // IdentifyReplyCommandSummary is the corresponding interface of IdentifyReplyCommandSummary type IdentifyReplyCommandSummary interface { @@ -50,31 +52,31 @@ type IdentifyReplyCommandSummaryExactly interface { // _IdentifyReplyCommandSummary is the data-structure of this message type _IdentifyReplyCommandSummary struct { *_IdentifyReplyCommand - PartName string - UnitServiceType byte - Version string + PartName string + UnitServiceType byte + Version string } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_IdentifyReplyCommandSummary) GetAttribute() Attribute { - return Attribute_Summary -} +func (m *_IdentifyReplyCommandSummary) GetAttribute() Attribute { +return Attribute_Summary} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_IdentifyReplyCommandSummary) InitializeParent(parent IdentifyReplyCommand) {} +func (m *_IdentifyReplyCommandSummary) InitializeParent(parent IdentifyReplyCommand ) {} -func (m *_IdentifyReplyCommandSummary) GetParent() IdentifyReplyCommand { +func (m *_IdentifyReplyCommandSummary) GetParent() IdentifyReplyCommand { return m._IdentifyReplyCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -97,13 +99,14 @@ func (m *_IdentifyReplyCommandSummary) GetVersion() string { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewIdentifyReplyCommandSummary factory function for _IdentifyReplyCommandSummary -func NewIdentifyReplyCommandSummary(partName string, unitServiceType byte, version string, numBytes uint8) *_IdentifyReplyCommandSummary { +func NewIdentifyReplyCommandSummary( partName string , unitServiceType byte , version string , numBytes uint8 ) *_IdentifyReplyCommandSummary { _result := &_IdentifyReplyCommandSummary{ - PartName: partName, - UnitServiceType: unitServiceType, - Version: version, - _IdentifyReplyCommand: NewIdentifyReplyCommand(numBytes), + PartName: partName, + UnitServiceType: unitServiceType, + Version: version, + _IdentifyReplyCommand: NewIdentifyReplyCommand(numBytes), } _result._IdentifyReplyCommand._IdentifyReplyCommandChildRequirements = _result return _result @@ -111,7 +114,7 @@ func NewIdentifyReplyCommandSummary(partName string, unitServiceType byte, versi // Deprecated: use the interface for direct cast func CastIdentifyReplyCommandSummary(structType interface{}) IdentifyReplyCommandSummary { - if casted, ok := structType.(IdentifyReplyCommandSummary); ok { + if casted, ok := structType.(IdentifyReplyCommandSummary); ok { return casted } if casted, ok := structType.(*IdentifyReplyCommandSummary); ok { @@ -128,17 +131,18 @@ func (m *_IdentifyReplyCommandSummary) GetLengthInBits(ctx context.Context) uint lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (partName) - lengthInBits += 48 + lengthInBits += 48; // Simple field (unitServiceType) - lengthInBits += 8 + lengthInBits += 8; // Simple field (version) - lengthInBits += 32 + lengthInBits += 32; return lengthInBits } + func (m *_IdentifyReplyCommandSummary) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -157,21 +161,21 @@ func IdentifyReplyCommandSummaryParseWithBuffer(ctx context.Context, readBuffer _ = currentPos // Simple Field (partName) - _partName, _partNameErr := readBuffer.ReadString("partName", uint32(48), "UTF-8") +_partName, _partNameErr := readBuffer.ReadString("partName", uint32(48), "UTF-8") if _partNameErr != nil { return nil, errors.Wrap(_partNameErr, "Error parsing 'partName' field of IdentifyReplyCommandSummary") } partName := _partName // Simple Field (unitServiceType) - _unitServiceType, _unitServiceTypeErr := readBuffer.ReadByte("unitServiceType") +_unitServiceType, _unitServiceTypeErr := readBuffer.ReadByte("unitServiceType") if _unitServiceTypeErr != nil { return nil, errors.Wrap(_unitServiceTypeErr, "Error parsing 'unitServiceType' field of IdentifyReplyCommandSummary") } unitServiceType := _unitServiceType // Simple Field (version) - _version, _versionErr := readBuffer.ReadString("version", uint32(32), "UTF-8") +_version, _versionErr := readBuffer.ReadString("version", uint32(32), "UTF-8") if _versionErr != nil { return nil, errors.Wrap(_versionErr, "Error parsing 'version' field of IdentifyReplyCommandSummary") } @@ -186,9 +190,9 @@ func IdentifyReplyCommandSummaryParseWithBuffer(ctx context.Context, readBuffer _IdentifyReplyCommand: &_IdentifyReplyCommand{ NumBytes: numBytes, }, - PartName: partName, + PartName: partName, UnitServiceType: unitServiceType, - Version: version, + Version: version, } _child._IdentifyReplyCommand._IdentifyReplyCommandChildRequirements = _child return _child, nil @@ -210,26 +214,26 @@ func (m *_IdentifyReplyCommandSummary) SerializeWithWriteBuffer(ctx context.Cont return errors.Wrap(pushErr, "Error pushing for IdentifyReplyCommandSummary") } - // Simple Field (partName) - partName := string(m.GetPartName()) - _partNameErr := writeBuffer.WriteString("partName", uint32(48), "UTF-8", (partName)) - if _partNameErr != nil { - return errors.Wrap(_partNameErr, "Error serializing 'partName' field") - } + // Simple Field (partName) + partName := string(m.GetPartName()) + _partNameErr := writeBuffer.WriteString("partName", uint32(48), "UTF-8", (partName)) + if _partNameErr != nil { + return errors.Wrap(_partNameErr, "Error serializing 'partName' field") + } - // Simple Field (unitServiceType) - unitServiceType := byte(m.GetUnitServiceType()) - _unitServiceTypeErr := writeBuffer.WriteByte("unitServiceType", (unitServiceType)) - if _unitServiceTypeErr != nil { - return errors.Wrap(_unitServiceTypeErr, "Error serializing 'unitServiceType' field") - } + // Simple Field (unitServiceType) + unitServiceType := byte(m.GetUnitServiceType()) + _unitServiceTypeErr := writeBuffer.WriteByte("unitServiceType", (unitServiceType)) + if _unitServiceTypeErr != nil { + return errors.Wrap(_unitServiceTypeErr, "Error serializing 'unitServiceType' field") + } - // Simple Field (version) - version := string(m.GetVersion()) - _versionErr := writeBuffer.WriteString("version", uint32(32), "UTF-8", (version)) - if _versionErr != nil { - return errors.Wrap(_versionErr, "Error serializing 'version' field") - } + // Simple Field (version) + version := string(m.GetVersion()) + _versionErr := writeBuffer.WriteString("version", uint32(32), "UTF-8", (version)) + if _versionErr != nil { + return errors.Wrap(_versionErr, "Error serializing 'version' field") + } if popErr := writeBuffer.PopContext("IdentifyReplyCommandSummary"); popErr != nil { return errors.Wrap(popErr, "Error popping for IdentifyReplyCommandSummary") @@ -239,6 +243,7 @@ func (m *_IdentifyReplyCommandSummary) SerializeWithWriteBuffer(ctx context.Cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_IdentifyReplyCommandSummary) isIdentifyReplyCommandSummary() bool { return true } @@ -253,3 +258,6 @@ func (m *_IdentifyReplyCommandSummary) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandTerminalLevels.go b/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandTerminalLevels.go index 2aea1690f52..fffc6051497 100644 --- a/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandTerminalLevels.go +++ b/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandTerminalLevels.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // IdentifyReplyCommandTerminalLevels is the corresponding interface of IdentifyReplyCommandTerminalLevels type IdentifyReplyCommandTerminalLevels interface { @@ -46,29 +48,29 @@ type IdentifyReplyCommandTerminalLevelsExactly interface { // _IdentifyReplyCommandTerminalLevels is the data-structure of this message type _IdentifyReplyCommandTerminalLevels struct { *_IdentifyReplyCommand - TerminalLevels []byte + TerminalLevels []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_IdentifyReplyCommandTerminalLevels) GetAttribute() Attribute { - return Attribute_TerminalLevel -} +func (m *_IdentifyReplyCommandTerminalLevels) GetAttribute() Attribute { +return Attribute_TerminalLevel} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_IdentifyReplyCommandTerminalLevels) InitializeParent(parent IdentifyReplyCommand) {} +func (m *_IdentifyReplyCommandTerminalLevels) InitializeParent(parent IdentifyReplyCommand ) {} -func (m *_IdentifyReplyCommandTerminalLevels) GetParent() IdentifyReplyCommand { +func (m *_IdentifyReplyCommandTerminalLevels) GetParent() IdentifyReplyCommand { return m._IdentifyReplyCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_IdentifyReplyCommandTerminalLevels) GetTerminalLevels() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewIdentifyReplyCommandTerminalLevels factory function for _IdentifyReplyCommandTerminalLevels -func NewIdentifyReplyCommandTerminalLevels(terminalLevels []byte, numBytes uint8) *_IdentifyReplyCommandTerminalLevels { +func NewIdentifyReplyCommandTerminalLevels( terminalLevels []byte , numBytes uint8 ) *_IdentifyReplyCommandTerminalLevels { _result := &_IdentifyReplyCommandTerminalLevels{ - TerminalLevels: terminalLevels, - _IdentifyReplyCommand: NewIdentifyReplyCommand(numBytes), + TerminalLevels: terminalLevels, + _IdentifyReplyCommand: NewIdentifyReplyCommand(numBytes), } _result._IdentifyReplyCommand._IdentifyReplyCommandChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewIdentifyReplyCommandTerminalLevels(terminalLevels []byte, numBytes uint8 // Deprecated: use the interface for direct cast func CastIdentifyReplyCommandTerminalLevels(structType interface{}) IdentifyReplyCommandTerminalLevels { - if casted, ok := structType.(IdentifyReplyCommandTerminalLevels); ok { + if casted, ok := structType.(IdentifyReplyCommandTerminalLevels); ok { return casted } if casted, ok := structType.(*IdentifyReplyCommandTerminalLevels); ok { @@ -119,6 +122,7 @@ func (m *_IdentifyReplyCommandTerminalLevels) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_IdentifyReplyCommandTerminalLevels) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -173,11 +177,11 @@ func (m *_IdentifyReplyCommandTerminalLevels) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for IdentifyReplyCommandTerminalLevels") } - // Array Field (terminalLevels) - // Byte Array field (terminalLevels) - if err := writeBuffer.WriteByteArray("terminalLevels", m.GetTerminalLevels()); err != nil { - return errors.Wrap(err, "Error serializing 'terminalLevels' field") - } + // Array Field (terminalLevels) + // Byte Array field (terminalLevels) + if err := writeBuffer.WriteByteArray("terminalLevels", m.GetTerminalLevels()); err != nil { + return errors.Wrap(err, "Error serializing 'terminalLevels' field") + } if popErr := writeBuffer.PopContext("IdentifyReplyCommandTerminalLevels"); popErr != nil { return errors.Wrap(popErr, "Error popping for IdentifyReplyCommandTerminalLevels") @@ -187,6 +191,7 @@ func (m *_IdentifyReplyCommandTerminalLevels) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_IdentifyReplyCommandTerminalLevels) isIdentifyReplyCommandTerminalLevels() bool { return true } @@ -201,3 +206,6 @@ func (m *_IdentifyReplyCommandTerminalLevels) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandType.go b/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandType.go index 1e88c738172..89535ff5b16 100644 --- a/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandType.go +++ b/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandType.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // IdentifyReplyCommandType is the corresponding interface of IdentifyReplyCommandType type IdentifyReplyCommandType interface { @@ -46,29 +48,29 @@ type IdentifyReplyCommandTypeExactly interface { // _IdentifyReplyCommandType is the data-structure of this message type _IdentifyReplyCommandType struct { *_IdentifyReplyCommand - UnitType string + UnitType string } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_IdentifyReplyCommandType) GetAttribute() Attribute { - return Attribute_Type -} +func (m *_IdentifyReplyCommandType) GetAttribute() Attribute { +return Attribute_Type} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_IdentifyReplyCommandType) InitializeParent(parent IdentifyReplyCommand) {} +func (m *_IdentifyReplyCommandType) InitializeParent(parent IdentifyReplyCommand ) {} -func (m *_IdentifyReplyCommandType) GetParent() IdentifyReplyCommand { +func (m *_IdentifyReplyCommandType) GetParent() IdentifyReplyCommand { return m._IdentifyReplyCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_IdentifyReplyCommandType) GetUnitType() string { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewIdentifyReplyCommandType factory function for _IdentifyReplyCommandType -func NewIdentifyReplyCommandType(unitType string, numBytes uint8) *_IdentifyReplyCommandType { +func NewIdentifyReplyCommandType( unitType string , numBytes uint8 ) *_IdentifyReplyCommandType { _result := &_IdentifyReplyCommandType{ - UnitType: unitType, - _IdentifyReplyCommand: NewIdentifyReplyCommand(numBytes), + UnitType: unitType, + _IdentifyReplyCommand: NewIdentifyReplyCommand(numBytes), } _result._IdentifyReplyCommand._IdentifyReplyCommandChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewIdentifyReplyCommandType(unitType string, numBytes uint8) *_IdentifyRepl // Deprecated: use the interface for direct cast func CastIdentifyReplyCommandType(structType interface{}) IdentifyReplyCommandType { - if casted, ok := structType.(IdentifyReplyCommandType); ok { + if casted, ok := structType.(IdentifyReplyCommandType); ok { return casted } if casted, ok := structType.(*IdentifyReplyCommandType); ok { @@ -112,11 +115,12 @@ func (m *_IdentifyReplyCommandType) GetLengthInBits(ctx context.Context) uint16 lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (unitType) - lengthInBits += 64 + lengthInBits += 64; return lengthInBits } + func (m *_IdentifyReplyCommandType) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -135,7 +139,7 @@ func IdentifyReplyCommandTypeParseWithBuffer(ctx context.Context, readBuffer uti _ = currentPos // Simple Field (unitType) - _unitType, _unitTypeErr := readBuffer.ReadString("unitType", uint32(64), "UTF-8") +_unitType, _unitTypeErr := readBuffer.ReadString("unitType", uint32(64), "UTF-8") if _unitTypeErr != nil { return nil, errors.Wrap(_unitTypeErr, "Error parsing 'unitType' field of IdentifyReplyCommandType") } @@ -172,12 +176,12 @@ func (m *_IdentifyReplyCommandType) SerializeWithWriteBuffer(ctx context.Context return errors.Wrap(pushErr, "Error pushing for IdentifyReplyCommandType") } - // Simple Field (unitType) - unitType := string(m.GetUnitType()) - _unitTypeErr := writeBuffer.WriteString("unitType", uint32(64), "UTF-8", (unitType)) - if _unitTypeErr != nil { - return errors.Wrap(_unitTypeErr, "Error serializing 'unitType' field") - } + // Simple Field (unitType) + unitType := string(m.GetUnitType()) + _unitTypeErr := writeBuffer.WriteString("unitType", uint32(64), "UTF-8", (unitType)) + if _unitTypeErr != nil { + return errors.Wrap(_unitTypeErr, "Error serializing 'unitType' field") + } if popErr := writeBuffer.PopContext("IdentifyReplyCommandType"); popErr != nil { return errors.Wrap(popErr, "Error popping for IdentifyReplyCommandType") @@ -187,6 +191,7 @@ func (m *_IdentifyReplyCommandType) SerializeWithWriteBuffer(ctx context.Context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_IdentifyReplyCommandType) isIdentifyReplyCommandType() bool { return true } @@ -201,3 +206,6 @@ func (m *_IdentifyReplyCommandType) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandUnitSummary.go b/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandUnitSummary.go index ddc6ff9d5aa..6a999eda52c 100644 --- a/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandUnitSummary.go +++ b/plc4go/protocols/cbus/readwrite/model/IdentifyReplyCommandUnitSummary.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // IdentifyReplyCommandUnitSummary is the corresponding interface of IdentifyReplyCommandUnitSummary type IdentifyReplyCommandUnitSummary interface { @@ -58,16 +60,17 @@ type IdentifyReplyCommandUnitSummaryExactly interface { // _IdentifyReplyCommandUnitSummary is the data-structure of this message type _IdentifyReplyCommandUnitSummary struct { - AssertingNetworkBurden bool - RestrikeTimingActive bool - RemoteOFFInputAsserted bool - RemoteONInputAsserted bool - LocalToggleEnabled bool - LocalToggleActiveState bool - ClockGenerationEnabled bool - UnitGeneratingClock bool + AssertingNetworkBurden bool + RestrikeTimingActive bool + RemoteOFFInputAsserted bool + RemoteONInputAsserted bool + LocalToggleEnabled bool + LocalToggleActiveState bool + ClockGenerationEnabled bool + UnitGeneratingClock bool } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -110,14 +113,15 @@ func (m *_IdentifyReplyCommandUnitSummary) GetUnitGeneratingClock() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewIdentifyReplyCommandUnitSummary factory function for _IdentifyReplyCommandUnitSummary -func NewIdentifyReplyCommandUnitSummary(assertingNetworkBurden bool, restrikeTimingActive bool, remoteOFFInputAsserted bool, remoteONInputAsserted bool, localToggleEnabled bool, localToggleActiveState bool, clockGenerationEnabled bool, unitGeneratingClock bool) *_IdentifyReplyCommandUnitSummary { - return &_IdentifyReplyCommandUnitSummary{AssertingNetworkBurden: assertingNetworkBurden, RestrikeTimingActive: restrikeTimingActive, RemoteOFFInputAsserted: remoteOFFInputAsserted, RemoteONInputAsserted: remoteONInputAsserted, LocalToggleEnabled: localToggleEnabled, LocalToggleActiveState: localToggleActiveState, ClockGenerationEnabled: clockGenerationEnabled, UnitGeneratingClock: unitGeneratingClock} +func NewIdentifyReplyCommandUnitSummary( assertingNetworkBurden bool , restrikeTimingActive bool , remoteOFFInputAsserted bool , remoteONInputAsserted bool , localToggleEnabled bool , localToggleActiveState bool , clockGenerationEnabled bool , unitGeneratingClock bool ) *_IdentifyReplyCommandUnitSummary { +return &_IdentifyReplyCommandUnitSummary{ AssertingNetworkBurden: assertingNetworkBurden , RestrikeTimingActive: restrikeTimingActive , RemoteOFFInputAsserted: remoteOFFInputAsserted , RemoteONInputAsserted: remoteONInputAsserted , LocalToggleEnabled: localToggleEnabled , LocalToggleActiveState: localToggleActiveState , ClockGenerationEnabled: clockGenerationEnabled , UnitGeneratingClock: unitGeneratingClock } } // Deprecated: use the interface for direct cast func CastIdentifyReplyCommandUnitSummary(structType interface{}) IdentifyReplyCommandUnitSummary { - if casted, ok := structType.(IdentifyReplyCommandUnitSummary); ok { + if casted, ok := structType.(IdentifyReplyCommandUnitSummary); ok { return casted } if casted, ok := structType.(*IdentifyReplyCommandUnitSummary); ok { @@ -134,32 +138,33 @@ func (m *_IdentifyReplyCommandUnitSummary) GetLengthInBits(ctx context.Context) lengthInBits := uint16(0) // Simple field (assertingNetworkBurden) - lengthInBits += 1 + lengthInBits += 1; // Simple field (restrikeTimingActive) - lengthInBits += 1 + lengthInBits += 1; // Simple field (remoteOFFInputAsserted) - lengthInBits += 1 + lengthInBits += 1; // Simple field (remoteONInputAsserted) - lengthInBits += 1 + lengthInBits += 1; // Simple field (localToggleEnabled) - lengthInBits += 1 + lengthInBits += 1; // Simple field (localToggleActiveState) - lengthInBits += 1 + lengthInBits += 1; // Simple field (clockGenerationEnabled) - lengthInBits += 1 + lengthInBits += 1; // Simple field (unitGeneratingClock) - lengthInBits += 1 + lengthInBits += 1; return lengthInBits } + func (m *_IdentifyReplyCommandUnitSummary) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -178,56 +183,56 @@ func IdentifyReplyCommandUnitSummaryParseWithBuffer(ctx context.Context, readBuf _ = currentPos // Simple Field (assertingNetworkBurden) - _assertingNetworkBurden, _assertingNetworkBurdenErr := readBuffer.ReadBit("assertingNetworkBurden") +_assertingNetworkBurden, _assertingNetworkBurdenErr := readBuffer.ReadBit("assertingNetworkBurden") if _assertingNetworkBurdenErr != nil { return nil, errors.Wrap(_assertingNetworkBurdenErr, "Error parsing 'assertingNetworkBurden' field of IdentifyReplyCommandUnitSummary") } assertingNetworkBurden := _assertingNetworkBurden // Simple Field (restrikeTimingActive) - _restrikeTimingActive, _restrikeTimingActiveErr := readBuffer.ReadBit("restrikeTimingActive") +_restrikeTimingActive, _restrikeTimingActiveErr := readBuffer.ReadBit("restrikeTimingActive") if _restrikeTimingActiveErr != nil { return nil, errors.Wrap(_restrikeTimingActiveErr, "Error parsing 'restrikeTimingActive' field of IdentifyReplyCommandUnitSummary") } restrikeTimingActive := _restrikeTimingActive // Simple Field (remoteOFFInputAsserted) - _remoteOFFInputAsserted, _remoteOFFInputAssertedErr := readBuffer.ReadBit("remoteOFFInputAsserted") +_remoteOFFInputAsserted, _remoteOFFInputAssertedErr := readBuffer.ReadBit("remoteOFFInputAsserted") if _remoteOFFInputAssertedErr != nil { return nil, errors.Wrap(_remoteOFFInputAssertedErr, "Error parsing 'remoteOFFInputAsserted' field of IdentifyReplyCommandUnitSummary") } remoteOFFInputAsserted := _remoteOFFInputAsserted // Simple Field (remoteONInputAsserted) - _remoteONInputAsserted, _remoteONInputAssertedErr := readBuffer.ReadBit("remoteONInputAsserted") +_remoteONInputAsserted, _remoteONInputAssertedErr := readBuffer.ReadBit("remoteONInputAsserted") if _remoteONInputAssertedErr != nil { return nil, errors.Wrap(_remoteONInputAssertedErr, "Error parsing 'remoteONInputAsserted' field of IdentifyReplyCommandUnitSummary") } remoteONInputAsserted := _remoteONInputAsserted // Simple Field (localToggleEnabled) - _localToggleEnabled, _localToggleEnabledErr := readBuffer.ReadBit("localToggleEnabled") +_localToggleEnabled, _localToggleEnabledErr := readBuffer.ReadBit("localToggleEnabled") if _localToggleEnabledErr != nil { return nil, errors.Wrap(_localToggleEnabledErr, "Error parsing 'localToggleEnabled' field of IdentifyReplyCommandUnitSummary") } localToggleEnabled := _localToggleEnabled // Simple Field (localToggleActiveState) - _localToggleActiveState, _localToggleActiveStateErr := readBuffer.ReadBit("localToggleActiveState") +_localToggleActiveState, _localToggleActiveStateErr := readBuffer.ReadBit("localToggleActiveState") if _localToggleActiveStateErr != nil { return nil, errors.Wrap(_localToggleActiveStateErr, "Error parsing 'localToggleActiveState' field of IdentifyReplyCommandUnitSummary") } localToggleActiveState := _localToggleActiveState // Simple Field (clockGenerationEnabled) - _clockGenerationEnabled, _clockGenerationEnabledErr := readBuffer.ReadBit("clockGenerationEnabled") +_clockGenerationEnabled, _clockGenerationEnabledErr := readBuffer.ReadBit("clockGenerationEnabled") if _clockGenerationEnabledErr != nil { return nil, errors.Wrap(_clockGenerationEnabledErr, "Error parsing 'clockGenerationEnabled' field of IdentifyReplyCommandUnitSummary") } clockGenerationEnabled := _clockGenerationEnabled // Simple Field (unitGeneratingClock) - _unitGeneratingClock, _unitGeneratingClockErr := readBuffer.ReadBit("unitGeneratingClock") +_unitGeneratingClock, _unitGeneratingClockErr := readBuffer.ReadBit("unitGeneratingClock") if _unitGeneratingClockErr != nil { return nil, errors.Wrap(_unitGeneratingClockErr, "Error parsing 'unitGeneratingClock' field of IdentifyReplyCommandUnitSummary") } @@ -239,15 +244,15 @@ func IdentifyReplyCommandUnitSummaryParseWithBuffer(ctx context.Context, readBuf // Create the instance return &_IdentifyReplyCommandUnitSummary{ - AssertingNetworkBurden: assertingNetworkBurden, - RestrikeTimingActive: restrikeTimingActive, - RemoteOFFInputAsserted: remoteOFFInputAsserted, - RemoteONInputAsserted: remoteONInputAsserted, - LocalToggleEnabled: localToggleEnabled, - LocalToggleActiveState: localToggleActiveState, - ClockGenerationEnabled: clockGenerationEnabled, - UnitGeneratingClock: unitGeneratingClock, - }, nil + AssertingNetworkBurden: assertingNetworkBurden, + RestrikeTimingActive: restrikeTimingActive, + RemoteOFFInputAsserted: remoteOFFInputAsserted, + RemoteONInputAsserted: remoteONInputAsserted, + LocalToggleEnabled: localToggleEnabled, + LocalToggleActiveState: localToggleActiveState, + ClockGenerationEnabled: clockGenerationEnabled, + UnitGeneratingClock: unitGeneratingClock, + }, nil } func (m *_IdentifyReplyCommandUnitSummary) Serialize() ([]byte, error) { @@ -261,7 +266,7 @@ func (m *_IdentifyReplyCommandUnitSummary) Serialize() ([]byte, error) { func (m *_IdentifyReplyCommandUnitSummary) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("IdentifyReplyCommandUnitSummary"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("IdentifyReplyCommandUnitSummary"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for IdentifyReplyCommandUnitSummary") } @@ -327,6 +332,7 @@ func (m *_IdentifyReplyCommandUnitSummary) SerializeWithWriteBuffer(ctx context. return nil } + func (m *_IdentifyReplyCommandUnitSummary) isIdentifyReplyCommandUnitSummary() bool { return true } @@ -341,3 +347,6 @@ func (m *_IdentifyReplyCommandUnitSummary) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/InterfaceOptions1.go b/plc4go/protocols/cbus/readwrite/model/InterfaceOptions1.go index 6b9dc7cfac2..ea351bd7f9f 100644 --- a/plc4go/protocols/cbus/readwrite/model/InterfaceOptions1.go +++ b/plc4go/protocols/cbus/readwrite/model/InterfaceOptions1.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // InterfaceOptions1 is the corresponding interface of InterfaceOptions1 type InterfaceOptions1 interface { @@ -54,17 +56,18 @@ type InterfaceOptions1Exactly interface { // _InterfaceOptions1 is the data-structure of this message type _InterfaceOptions1 struct { - Idmon bool - Monitor bool - Smart bool - Srchk bool - XonXoff bool - Connect bool + Idmon bool + Monitor bool + Smart bool + Srchk bool + XonXoff bool + Connect bool // Reserved Fields reservedField0 *bool reservedField1 *bool } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -99,14 +102,15 @@ func (m *_InterfaceOptions1) GetConnect() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewInterfaceOptions1 factory function for _InterfaceOptions1 -func NewInterfaceOptions1(idmon bool, monitor bool, smart bool, srchk bool, xonXoff bool, connect bool) *_InterfaceOptions1 { - return &_InterfaceOptions1{Idmon: idmon, Monitor: monitor, Smart: smart, Srchk: srchk, XonXoff: xonXoff, Connect: connect} +func NewInterfaceOptions1( idmon bool , monitor bool , smart bool , srchk bool , xonXoff bool , connect bool ) *_InterfaceOptions1 { +return &_InterfaceOptions1{ Idmon: idmon , Monitor: monitor , Smart: smart , Srchk: srchk , XonXoff: xonXoff , Connect: connect } } // Deprecated: use the interface for direct cast func CastInterfaceOptions1(structType interface{}) InterfaceOptions1 { - if casted, ok := structType.(InterfaceOptions1); ok { + if casted, ok := structType.(InterfaceOptions1); ok { return casted } if casted, ok := structType.(*InterfaceOptions1); ok { @@ -126,29 +130,30 @@ func (m *_InterfaceOptions1) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += 1 // Simple field (idmon) - lengthInBits += 1 + lengthInBits += 1; // Simple field (monitor) - lengthInBits += 1 + lengthInBits += 1; // Simple field (smart) - lengthInBits += 1 + lengthInBits += 1; // Simple field (srchk) - lengthInBits += 1 + lengthInBits += 1; // Simple field (xonXoff) - lengthInBits += 1 + lengthInBits += 1; // Reserved Field (reserved) lengthInBits += 1 // Simple field (connect) - lengthInBits += 1 + lengthInBits += 1; return lengthInBits } + func (m *_InterfaceOptions1) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -176,7 +181,7 @@ func InterfaceOptions1ParseWithBuffer(ctx context.Context, readBuffer utils.Read if reserved != bool(false) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -184,35 +189,35 @@ func InterfaceOptions1ParseWithBuffer(ctx context.Context, readBuffer utils.Read } // Simple Field (idmon) - _idmon, _idmonErr := readBuffer.ReadBit("idmon") +_idmon, _idmonErr := readBuffer.ReadBit("idmon") if _idmonErr != nil { return nil, errors.Wrap(_idmonErr, "Error parsing 'idmon' field of InterfaceOptions1") } idmon := _idmon // Simple Field (monitor) - _monitor, _monitorErr := readBuffer.ReadBit("monitor") +_monitor, _monitorErr := readBuffer.ReadBit("monitor") if _monitorErr != nil { return nil, errors.Wrap(_monitorErr, "Error parsing 'monitor' field of InterfaceOptions1") } monitor := _monitor // Simple Field (smart) - _smart, _smartErr := readBuffer.ReadBit("smart") +_smart, _smartErr := readBuffer.ReadBit("smart") if _smartErr != nil { return nil, errors.Wrap(_smartErr, "Error parsing 'smart' field of InterfaceOptions1") } smart := _smart // Simple Field (srchk) - _srchk, _srchkErr := readBuffer.ReadBit("srchk") +_srchk, _srchkErr := readBuffer.ReadBit("srchk") if _srchkErr != nil { return nil, errors.Wrap(_srchkErr, "Error parsing 'srchk' field of InterfaceOptions1") } srchk := _srchk // Simple Field (xonXoff) - _xonXoff, _xonXoffErr := readBuffer.ReadBit("xonXoff") +_xonXoff, _xonXoffErr := readBuffer.ReadBit("xonXoff") if _xonXoffErr != nil { return nil, errors.Wrap(_xonXoffErr, "Error parsing 'xonXoff' field of InterfaceOptions1") } @@ -228,7 +233,7 @@ func InterfaceOptions1ParseWithBuffer(ctx context.Context, readBuffer utils.Read if reserved != bool(false) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField1 = &reserved @@ -236,7 +241,7 @@ func InterfaceOptions1ParseWithBuffer(ctx context.Context, readBuffer utils.Read } // Simple Field (connect) - _connect, _connectErr := readBuffer.ReadBit("connect") +_connect, _connectErr := readBuffer.ReadBit("connect") if _connectErr != nil { return nil, errors.Wrap(_connectErr, "Error parsing 'connect' field of InterfaceOptions1") } @@ -248,15 +253,15 @@ func InterfaceOptions1ParseWithBuffer(ctx context.Context, readBuffer utils.Read // Create the instance return &_InterfaceOptions1{ - Idmon: idmon, - Monitor: monitor, - Smart: smart, - Srchk: srchk, - XonXoff: xonXoff, - Connect: connect, - reservedField0: reservedField0, - reservedField1: reservedField1, - }, nil + Idmon: idmon, + Monitor: monitor, + Smart: smart, + Srchk: srchk, + XonXoff: xonXoff, + Connect: connect, + reservedField0: reservedField0, + reservedField1: reservedField1, + }, nil } func (m *_InterfaceOptions1) Serialize() ([]byte, error) { @@ -270,7 +275,7 @@ func (m *_InterfaceOptions1) Serialize() ([]byte, error) { func (m *_InterfaceOptions1) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("InterfaceOptions1"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("InterfaceOptions1"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for InterfaceOptions1") } @@ -280,7 +285,7 @@ func (m *_InterfaceOptions1) SerializeWithWriteBuffer(ctx context.Context, write if m.reservedField0 != nil { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Overriding reserved field with unexpected value.") reserved = *m.reservedField0 } @@ -331,7 +336,7 @@ func (m *_InterfaceOptions1) SerializeWithWriteBuffer(ctx context.Context, write if m.reservedField1 != nil { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Overriding reserved field with unexpected value.") reserved = *m.reservedField1 } @@ -354,6 +359,7 @@ func (m *_InterfaceOptions1) SerializeWithWriteBuffer(ctx context.Context, write return nil } + func (m *_InterfaceOptions1) isInterfaceOptions1() bool { return true } @@ -368,3 +374,6 @@ func (m *_InterfaceOptions1) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/InterfaceOptions1PowerUpSettings.go b/plc4go/protocols/cbus/readwrite/model/InterfaceOptions1PowerUpSettings.go index f7067c1e18d..2b57a07786f 100644 --- a/plc4go/protocols/cbus/readwrite/model/InterfaceOptions1PowerUpSettings.go +++ b/plc4go/protocols/cbus/readwrite/model/InterfaceOptions1PowerUpSettings.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // InterfaceOptions1PowerUpSettings is the corresponding interface of InterfaceOptions1PowerUpSettings type InterfaceOptions1PowerUpSettings interface { @@ -44,9 +46,10 @@ type InterfaceOptions1PowerUpSettingsExactly interface { // _InterfaceOptions1PowerUpSettings is the data-structure of this message type _InterfaceOptions1PowerUpSettings struct { - InterfaceOptions1 InterfaceOptions1 + InterfaceOptions1 InterfaceOptions1 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -61,14 +64,15 @@ func (m *_InterfaceOptions1PowerUpSettings) GetInterfaceOptions1() InterfaceOpti /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewInterfaceOptions1PowerUpSettings factory function for _InterfaceOptions1PowerUpSettings -func NewInterfaceOptions1PowerUpSettings(interfaceOptions1 InterfaceOptions1) *_InterfaceOptions1PowerUpSettings { - return &_InterfaceOptions1PowerUpSettings{InterfaceOptions1: interfaceOptions1} +func NewInterfaceOptions1PowerUpSettings( interfaceOptions1 InterfaceOptions1 ) *_InterfaceOptions1PowerUpSettings { +return &_InterfaceOptions1PowerUpSettings{ InterfaceOptions1: interfaceOptions1 } } // Deprecated: use the interface for direct cast func CastInterfaceOptions1PowerUpSettings(structType interface{}) InterfaceOptions1PowerUpSettings { - if casted, ok := structType.(InterfaceOptions1PowerUpSettings); ok { + if casted, ok := structType.(InterfaceOptions1PowerUpSettings); ok { return casted } if casted, ok := structType.(*InterfaceOptions1PowerUpSettings); ok { @@ -90,6 +94,7 @@ func (m *_InterfaceOptions1PowerUpSettings) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_InterfaceOptions1PowerUpSettings) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -111,7 +116,7 @@ func InterfaceOptions1PowerUpSettingsParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("interfaceOptions1"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for interfaceOptions1") } - _interfaceOptions1, _interfaceOptions1Err := InterfaceOptions1ParseWithBuffer(ctx, readBuffer) +_interfaceOptions1, _interfaceOptions1Err := InterfaceOptions1ParseWithBuffer(ctx, readBuffer) if _interfaceOptions1Err != nil { return nil, errors.Wrap(_interfaceOptions1Err, "Error parsing 'interfaceOptions1' field of InterfaceOptions1PowerUpSettings") } @@ -126,8 +131,8 @@ func InterfaceOptions1PowerUpSettingsParseWithBuffer(ctx context.Context, readBu // Create the instance return &_InterfaceOptions1PowerUpSettings{ - InterfaceOptions1: interfaceOptions1, - }, nil + InterfaceOptions1: interfaceOptions1, + }, nil } func (m *_InterfaceOptions1PowerUpSettings) Serialize() ([]byte, error) { @@ -141,7 +146,7 @@ func (m *_InterfaceOptions1PowerUpSettings) Serialize() ([]byte, error) { func (m *_InterfaceOptions1PowerUpSettings) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("InterfaceOptions1PowerUpSettings"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("InterfaceOptions1PowerUpSettings"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for InterfaceOptions1PowerUpSettings") } @@ -163,6 +168,7 @@ func (m *_InterfaceOptions1PowerUpSettings) SerializeWithWriteBuffer(ctx context return nil } + func (m *_InterfaceOptions1PowerUpSettings) isInterfaceOptions1PowerUpSettings() bool { return true } @@ -177,3 +183,6 @@ func (m *_InterfaceOptions1PowerUpSettings) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/InterfaceOptions2.go b/plc4go/protocols/cbus/readwrite/model/InterfaceOptions2.go index 7759c84fbc1..1400ca2728c 100644 --- a/plc4go/protocols/cbus/readwrite/model/InterfaceOptions2.go +++ b/plc4go/protocols/cbus/readwrite/model/InterfaceOptions2.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // InterfaceOptions2 is the corresponding interface of InterfaceOptions2 type InterfaceOptions2 interface { @@ -46,8 +48,8 @@ type InterfaceOptions2Exactly interface { // _InterfaceOptions2 is the data-structure of this message type _InterfaceOptions2 struct { - Burden bool - ClockGen bool + Burden bool + ClockGen bool // Reserved Fields reservedField0 *bool reservedField1 *bool @@ -57,6 +59,7 @@ type _InterfaceOptions2 struct { reservedField5 *bool } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -75,14 +78,15 @@ func (m *_InterfaceOptions2) GetClockGen() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewInterfaceOptions2 factory function for _InterfaceOptions2 -func NewInterfaceOptions2(burden bool, clockGen bool) *_InterfaceOptions2 { - return &_InterfaceOptions2{Burden: burden, ClockGen: clockGen} +func NewInterfaceOptions2( burden bool , clockGen bool ) *_InterfaceOptions2 { +return &_InterfaceOptions2{ Burden: burden , ClockGen: clockGen } } // Deprecated: use the interface for direct cast func CastInterfaceOptions2(structType interface{}) InterfaceOptions2 { - if casted, ok := structType.(InterfaceOptions2); ok { + if casted, ok := structType.(InterfaceOptions2); ok { return casted } if casted, ok := structType.(*InterfaceOptions2); ok { @@ -102,7 +106,7 @@ func (m *_InterfaceOptions2) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += 1 // Simple field (burden) - lengthInBits += 1 + lengthInBits += 1; // Reserved Field (reserved) lengthInBits += 1 @@ -120,11 +124,12 @@ func (m *_InterfaceOptions2) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += 1 // Simple field (clockGen) - lengthInBits += 1 + lengthInBits += 1; return lengthInBits } + func (m *_InterfaceOptions2) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -152,7 +157,7 @@ func InterfaceOptions2ParseWithBuffer(ctx context.Context, readBuffer utils.Read if reserved != bool(false) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -160,7 +165,7 @@ func InterfaceOptions2ParseWithBuffer(ctx context.Context, readBuffer utils.Read } // Simple Field (burden) - _burden, _burdenErr := readBuffer.ReadBit("burden") +_burden, _burdenErr := readBuffer.ReadBit("burden") if _burdenErr != nil { return nil, errors.Wrap(_burdenErr, "Error parsing 'burden' field of InterfaceOptions2") } @@ -176,7 +181,7 @@ func InterfaceOptions2ParseWithBuffer(ctx context.Context, readBuffer utils.Read if reserved != bool(false) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField1 = &reserved @@ -193,7 +198,7 @@ func InterfaceOptions2ParseWithBuffer(ctx context.Context, readBuffer utils.Read if reserved != bool(false) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField2 = &reserved @@ -210,7 +215,7 @@ func InterfaceOptions2ParseWithBuffer(ctx context.Context, readBuffer utils.Read if reserved != bool(false) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField3 = &reserved @@ -227,7 +232,7 @@ func InterfaceOptions2ParseWithBuffer(ctx context.Context, readBuffer utils.Read if reserved != bool(false) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField4 = &reserved @@ -244,7 +249,7 @@ func InterfaceOptions2ParseWithBuffer(ctx context.Context, readBuffer utils.Read if reserved != bool(false) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField5 = &reserved @@ -252,7 +257,7 @@ func InterfaceOptions2ParseWithBuffer(ctx context.Context, readBuffer utils.Read } // Simple Field (clockGen) - _clockGen, _clockGenErr := readBuffer.ReadBit("clockGen") +_clockGen, _clockGenErr := readBuffer.ReadBit("clockGen") if _clockGenErr != nil { return nil, errors.Wrap(_clockGenErr, "Error parsing 'clockGen' field of InterfaceOptions2") } @@ -264,15 +269,15 @@ func InterfaceOptions2ParseWithBuffer(ctx context.Context, readBuffer utils.Read // Create the instance return &_InterfaceOptions2{ - Burden: burden, - ClockGen: clockGen, - reservedField0: reservedField0, - reservedField1: reservedField1, - reservedField2: reservedField2, - reservedField3: reservedField3, - reservedField4: reservedField4, - reservedField5: reservedField5, - }, nil + Burden: burden, + ClockGen: clockGen, + reservedField0: reservedField0, + reservedField1: reservedField1, + reservedField2: reservedField2, + reservedField3: reservedField3, + reservedField4: reservedField4, + reservedField5: reservedField5, + }, nil } func (m *_InterfaceOptions2) Serialize() ([]byte, error) { @@ -286,7 +291,7 @@ func (m *_InterfaceOptions2) Serialize() ([]byte, error) { func (m *_InterfaceOptions2) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("InterfaceOptions2"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("InterfaceOptions2"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for InterfaceOptions2") } @@ -296,7 +301,7 @@ func (m *_InterfaceOptions2) SerializeWithWriteBuffer(ctx context.Context, write if m.reservedField0 != nil { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Overriding reserved field with unexpected value.") reserved = *m.reservedField0 } @@ -319,7 +324,7 @@ func (m *_InterfaceOptions2) SerializeWithWriteBuffer(ctx context.Context, write if m.reservedField1 != nil { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Overriding reserved field with unexpected value.") reserved = *m.reservedField1 } @@ -335,7 +340,7 @@ func (m *_InterfaceOptions2) SerializeWithWriteBuffer(ctx context.Context, write if m.reservedField2 != nil { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Overriding reserved field with unexpected value.") reserved = *m.reservedField2 } @@ -351,7 +356,7 @@ func (m *_InterfaceOptions2) SerializeWithWriteBuffer(ctx context.Context, write if m.reservedField3 != nil { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Overriding reserved field with unexpected value.") reserved = *m.reservedField3 } @@ -367,7 +372,7 @@ func (m *_InterfaceOptions2) SerializeWithWriteBuffer(ctx context.Context, write if m.reservedField4 != nil { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Overriding reserved field with unexpected value.") reserved = *m.reservedField4 } @@ -383,7 +388,7 @@ func (m *_InterfaceOptions2) SerializeWithWriteBuffer(ctx context.Context, write if m.reservedField5 != nil { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Overriding reserved field with unexpected value.") reserved = *m.reservedField5 } @@ -406,6 +411,7 @@ func (m *_InterfaceOptions2) SerializeWithWriteBuffer(ctx context.Context, write return nil } + func (m *_InterfaceOptions2) isInterfaceOptions2() bool { return true } @@ -420,3 +426,6 @@ func (m *_InterfaceOptions2) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/InterfaceOptions3.go b/plc4go/protocols/cbus/readwrite/model/InterfaceOptions3.go index b14a0fb0a4b..c7f584180c9 100644 --- a/plc4go/protocols/cbus/readwrite/model/InterfaceOptions3.go +++ b/plc4go/protocols/cbus/readwrite/model/InterfaceOptions3.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // InterfaceOptions3 is the corresponding interface of InterfaceOptions3 type InterfaceOptions3 interface { @@ -50,10 +52,10 @@ type InterfaceOptions3Exactly interface { // _InterfaceOptions3 is the data-structure of this message type _InterfaceOptions3 struct { - Exstat bool - Pun bool - LocalSal bool - Pcn bool + Exstat bool + Pun bool + LocalSal bool + Pcn bool // Reserved Fields reservedField0 *bool reservedField1 *bool @@ -61,6 +63,7 @@ type _InterfaceOptions3 struct { reservedField3 *bool } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -87,14 +90,15 @@ func (m *_InterfaceOptions3) GetPcn() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewInterfaceOptions3 factory function for _InterfaceOptions3 -func NewInterfaceOptions3(exstat bool, pun bool, localSal bool, pcn bool) *_InterfaceOptions3 { - return &_InterfaceOptions3{Exstat: exstat, Pun: pun, LocalSal: localSal, Pcn: pcn} +func NewInterfaceOptions3( exstat bool , pun bool , localSal bool , pcn bool ) *_InterfaceOptions3 { +return &_InterfaceOptions3{ Exstat: exstat , Pun: pun , LocalSal: localSal , Pcn: pcn } } // Deprecated: use the interface for direct cast func CastInterfaceOptions3(structType interface{}) InterfaceOptions3 { - if casted, ok := structType.(InterfaceOptions3); ok { + if casted, ok := structType.(InterfaceOptions3); ok { return casted } if casted, ok := structType.(*InterfaceOptions3); ok { @@ -123,20 +127,21 @@ func (m *_InterfaceOptions3) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += 1 // Simple field (exstat) - lengthInBits += 1 + lengthInBits += 1; // Simple field (pun) - lengthInBits += 1 + lengthInBits += 1; // Simple field (localSal) - lengthInBits += 1 + lengthInBits += 1; // Simple field (pcn) - lengthInBits += 1 + lengthInBits += 1; return lengthInBits } + func (m *_InterfaceOptions3) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -164,7 +169,7 @@ func InterfaceOptions3ParseWithBuffer(ctx context.Context, readBuffer utils.Read if reserved != bool(false) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -181,7 +186,7 @@ func InterfaceOptions3ParseWithBuffer(ctx context.Context, readBuffer utils.Read if reserved != bool(false) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField1 = &reserved @@ -198,7 +203,7 @@ func InterfaceOptions3ParseWithBuffer(ctx context.Context, readBuffer utils.Read if reserved != bool(false) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField2 = &reserved @@ -215,7 +220,7 @@ func InterfaceOptions3ParseWithBuffer(ctx context.Context, readBuffer utils.Read if reserved != bool(false) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField3 = &reserved @@ -223,28 +228,28 @@ func InterfaceOptions3ParseWithBuffer(ctx context.Context, readBuffer utils.Read } // Simple Field (exstat) - _exstat, _exstatErr := readBuffer.ReadBit("exstat") +_exstat, _exstatErr := readBuffer.ReadBit("exstat") if _exstatErr != nil { return nil, errors.Wrap(_exstatErr, "Error parsing 'exstat' field of InterfaceOptions3") } exstat := _exstat // Simple Field (pun) - _pun, _punErr := readBuffer.ReadBit("pun") +_pun, _punErr := readBuffer.ReadBit("pun") if _punErr != nil { return nil, errors.Wrap(_punErr, "Error parsing 'pun' field of InterfaceOptions3") } pun := _pun // Simple Field (localSal) - _localSal, _localSalErr := readBuffer.ReadBit("localSal") +_localSal, _localSalErr := readBuffer.ReadBit("localSal") if _localSalErr != nil { return nil, errors.Wrap(_localSalErr, "Error parsing 'localSal' field of InterfaceOptions3") } localSal := _localSal // Simple Field (pcn) - _pcn, _pcnErr := readBuffer.ReadBit("pcn") +_pcn, _pcnErr := readBuffer.ReadBit("pcn") if _pcnErr != nil { return nil, errors.Wrap(_pcnErr, "Error parsing 'pcn' field of InterfaceOptions3") } @@ -256,15 +261,15 @@ func InterfaceOptions3ParseWithBuffer(ctx context.Context, readBuffer utils.Read // Create the instance return &_InterfaceOptions3{ - Exstat: exstat, - Pun: pun, - LocalSal: localSal, - Pcn: pcn, - reservedField0: reservedField0, - reservedField1: reservedField1, - reservedField2: reservedField2, - reservedField3: reservedField3, - }, nil + Exstat: exstat, + Pun: pun, + LocalSal: localSal, + Pcn: pcn, + reservedField0: reservedField0, + reservedField1: reservedField1, + reservedField2: reservedField2, + reservedField3: reservedField3, + }, nil } func (m *_InterfaceOptions3) Serialize() ([]byte, error) { @@ -278,7 +283,7 @@ func (m *_InterfaceOptions3) Serialize() ([]byte, error) { func (m *_InterfaceOptions3) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("InterfaceOptions3"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("InterfaceOptions3"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for InterfaceOptions3") } @@ -288,7 +293,7 @@ func (m *_InterfaceOptions3) SerializeWithWriteBuffer(ctx context.Context, write if m.reservedField0 != nil { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Overriding reserved field with unexpected value.") reserved = *m.reservedField0 } @@ -304,7 +309,7 @@ func (m *_InterfaceOptions3) SerializeWithWriteBuffer(ctx context.Context, write if m.reservedField1 != nil { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Overriding reserved field with unexpected value.") reserved = *m.reservedField1 } @@ -320,7 +325,7 @@ func (m *_InterfaceOptions3) SerializeWithWriteBuffer(ctx context.Context, write if m.reservedField2 != nil { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Overriding reserved field with unexpected value.") reserved = *m.reservedField2 } @@ -336,7 +341,7 @@ func (m *_InterfaceOptions3) SerializeWithWriteBuffer(ctx context.Context, write if m.reservedField3 != nil { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Overriding reserved field with unexpected value.") reserved = *m.reservedField3 } @@ -380,6 +385,7 @@ func (m *_InterfaceOptions3) SerializeWithWriteBuffer(ctx context.Context, write return nil } + func (m *_InterfaceOptions3) isInterfaceOptions3() bool { return true } @@ -394,3 +400,6 @@ func (m *_InterfaceOptions3) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/Language.go b/plc4go/protocols/cbus/readwrite/model/Language.go index e0ae6270c9f..40a78e34aee 100644 --- a/plc4go/protocols/cbus/readwrite/model/Language.go +++ b/plc4go/protocols/cbus/readwrite/model/Language.go @@ -34,83 +34,83 @@ type ILanguage interface { utils.Serializable } -const ( - Language_NO_LANGUAGE Language = 0x00 - Language_ENGLISH Language = 0x01 - Language_ENGLISH_AUSTRALIA Language = 0x02 - Language_ENGLISH_BELIZE Language = 0x03 - Language_ENGLISH_CANADA Language = 0x04 - Language_ENGLISH_CARRIBEAN Language = 0x05 - Language_ENGLISH_IRELAND Language = 0x06 - Language_ENGLISH_JAMAICA Language = 0x07 - Language_ENGLISH_NEW_ZEALAND Language = 0x08 - Language_ENGLISH_PHILIPPINES Language = 0x09 - Language_ENGLISH_SOUTH_AFRICA Language = 0x0A - Language_ENGLISH_TRINIDAD Language = 0x0B - Language_ENGLISH_UK Language = 0x0C - Language_ENGLISH_USA Language = 0x0D - Language_ENGLISH_ZIMBABWE Language = 0x0E - Language_AFRIKAANS Language = 0x40 - Language_BASQUE Language = 0x41 - Language_CATALAN Language = 0x42 - Language_DANISH Language = 0x43 - Language_DUTCH_BELGIUM Language = 0x44 - Language_DUTCH_NETHERLANDS Language = 0x45 - Language_FAEROESE Language = 0x46 - Language_FINNISH Language = 0x47 - Language_FRENCH_BELGIUM Language = 0x48 - Language_FRENCH_CANADA Language = 0x49 - Language_FRENCH Language = 0x4A - Language_FRENCH_LUXEMBOURG Language = 0x4B - Language_FRENCH_MONACO Language = 0x4C - Language_FRENCH_SWITZERLAND Language = 0x4D - Language_GALICIAN Language = 0x4E - Language_GERMAN_AUSTRIA Language = 0x4F - Language_GERMAN Language = 0x50 - Language_GERMAN_LIECHTENSTEIN Language = 0x51 - Language_GERMAN_LUXEMBOURG Language = 0x52 - Language_GERMAN_SWITZERLAND Language = 0x53 - Language_ICELANDIC Language = 0x54 - Language_INDONESIAN Language = 0x55 - Language_ITALIAN Language = 0x56 - Language_ITALIAN_SWITZERLAND Language = 0x57 - Language_MALAY_BRUNEI Language = 0x58 - Language_MALAY Language = 0x59 - Language_NORWEGIAN Language = 0x5A - Language_NORWEGIAN_NYNORSK Language = 0x5B - Language_PORTUGUESE_BRAZIL Language = 0x5C - Language_PORTUGUESE Language = 0x5D - Language_SPANISH_ARGENTINE Language = 0x5E - Language_SPANISH_BOLIVIA Language = 0x5F - Language_SPANISH_CHILE Language = 0x60 - Language_SPANISH_COLOMBIA Language = 0x61 - Language_SPANISH_COSTA_RICA Language = 0x62 +const( + Language_NO_LANGUAGE Language = 0x00 + Language_ENGLISH Language = 0x01 + Language_ENGLISH_AUSTRALIA Language = 0x02 + Language_ENGLISH_BELIZE Language = 0x03 + Language_ENGLISH_CANADA Language = 0x04 + Language_ENGLISH_CARRIBEAN Language = 0x05 + Language_ENGLISH_IRELAND Language = 0x06 + Language_ENGLISH_JAMAICA Language = 0x07 + Language_ENGLISH_NEW_ZEALAND Language = 0x08 + Language_ENGLISH_PHILIPPINES Language = 0x09 + Language_ENGLISH_SOUTH_AFRICA Language = 0x0A + Language_ENGLISH_TRINIDAD Language = 0x0B + Language_ENGLISH_UK Language = 0x0C + Language_ENGLISH_USA Language = 0x0D + Language_ENGLISH_ZIMBABWE Language = 0x0E + Language_AFRIKAANS Language = 0x40 + Language_BASQUE Language = 0x41 + Language_CATALAN Language = 0x42 + Language_DANISH Language = 0x43 + Language_DUTCH_BELGIUM Language = 0x44 + Language_DUTCH_NETHERLANDS Language = 0x45 + Language_FAEROESE Language = 0x46 + Language_FINNISH Language = 0x47 + Language_FRENCH_BELGIUM Language = 0x48 + Language_FRENCH_CANADA Language = 0x49 + Language_FRENCH Language = 0x4A + Language_FRENCH_LUXEMBOURG Language = 0x4B + Language_FRENCH_MONACO Language = 0x4C + Language_FRENCH_SWITZERLAND Language = 0x4D + Language_GALICIAN Language = 0x4E + Language_GERMAN_AUSTRIA Language = 0x4F + Language_GERMAN Language = 0x50 + Language_GERMAN_LIECHTENSTEIN Language = 0x51 + Language_GERMAN_LUXEMBOURG Language = 0x52 + Language_GERMAN_SWITZERLAND Language = 0x53 + Language_ICELANDIC Language = 0x54 + Language_INDONESIAN Language = 0x55 + Language_ITALIAN Language = 0x56 + Language_ITALIAN_SWITZERLAND Language = 0x57 + Language_MALAY_BRUNEI Language = 0x58 + Language_MALAY Language = 0x59 + Language_NORWEGIAN Language = 0x5A + Language_NORWEGIAN_NYNORSK Language = 0x5B + Language_PORTUGUESE_BRAZIL Language = 0x5C + Language_PORTUGUESE Language = 0x5D + Language_SPANISH_ARGENTINE Language = 0x5E + Language_SPANISH_BOLIVIA Language = 0x5F + Language_SPANISH_CHILE Language = 0x60 + Language_SPANISH_COLOMBIA Language = 0x61 + Language_SPANISH_COSTA_RICA Language = 0x62 Language_SPANISH_DOMINICAN_REPUBLIC Language = 0x63 - Language_SPANISH_ECUADOR Language = 0x64 - Language_SPANISH_EL_SALVADOR Language = 0x65 - Language_SPANISH_GUATEMALA Language = 0x66 - Language_SPANISH_HONDURAS Language = 0x67 - Language_SPANISH Language = 0x68 - Language_SPANISH_MEXICO Language = 0x69 - Language_SPANISH_NICARAGUA Language = 0x6A - Language_SPANISH_PANAMA Language = 0x6B - Language_SPANISH_PARAGUAY Language = 0x6C - Language_SPANISH_PERU Language = 0x6D - Language_SPANISH_PERTO_RICO Language = 0x6E - Language_SPANISH_TRADITIONAL Language = 0x6F - Language_SPANISH_URUGUAY Language = 0x70 - Language_SPANISH_VENEZUELA Language = 0x71 - Language_SWAHILI Language = 0x72 - Language_SWEDISH Language = 0x73 - Language_SWEDISH_FINLAND Language = 0x74 - Language_CHINESE_CP936 Language = 0xCA + Language_SPANISH_ECUADOR Language = 0x64 + Language_SPANISH_EL_SALVADOR Language = 0x65 + Language_SPANISH_GUATEMALA Language = 0x66 + Language_SPANISH_HONDURAS Language = 0x67 + Language_SPANISH Language = 0x68 + Language_SPANISH_MEXICO Language = 0x69 + Language_SPANISH_NICARAGUA Language = 0x6A + Language_SPANISH_PANAMA Language = 0x6B + Language_SPANISH_PARAGUAY Language = 0x6C + Language_SPANISH_PERU Language = 0x6D + Language_SPANISH_PERTO_RICO Language = 0x6E + Language_SPANISH_TRADITIONAL Language = 0x6F + Language_SPANISH_URUGUAY Language = 0x70 + Language_SPANISH_VENEZUELA Language = 0x71 + Language_SWAHILI Language = 0x72 + Language_SWEDISH Language = 0x73 + Language_SWEDISH_FINLAND Language = 0x74 + Language_CHINESE_CP936 Language = 0xCA ) var LanguageValues []Language func init() { _ = errors.New - LanguageValues = []Language{ + LanguageValues = []Language { Language_NO_LANGUAGE, Language_ENGLISH, Language_ENGLISH_AUSTRALIA, @@ -185,144 +185,144 @@ func init() { func LanguageByValue(value uint8) (enum Language, ok bool) { switch value { - case 0x00: - return Language_NO_LANGUAGE, true - case 0x01: - return Language_ENGLISH, true - case 0x02: - return Language_ENGLISH_AUSTRALIA, true - case 0x03: - return Language_ENGLISH_BELIZE, true - case 0x04: - return Language_ENGLISH_CANADA, true - case 0x05: - return Language_ENGLISH_CARRIBEAN, true - case 0x06: - return Language_ENGLISH_IRELAND, true - case 0x07: - return Language_ENGLISH_JAMAICA, true - case 0x08: - return Language_ENGLISH_NEW_ZEALAND, true - case 0x09: - return Language_ENGLISH_PHILIPPINES, true - case 0x0A: - return Language_ENGLISH_SOUTH_AFRICA, true - case 0x0B: - return Language_ENGLISH_TRINIDAD, true - case 0x0C: - return Language_ENGLISH_UK, true - case 0x0D: - return Language_ENGLISH_USA, true - case 0x0E: - return Language_ENGLISH_ZIMBABWE, true - case 0x40: - return Language_AFRIKAANS, true - case 0x41: - return Language_BASQUE, true - case 0x42: - return Language_CATALAN, true - case 0x43: - return Language_DANISH, true - case 0x44: - return Language_DUTCH_BELGIUM, true - case 0x45: - return Language_DUTCH_NETHERLANDS, true - case 0x46: - return Language_FAEROESE, true - case 0x47: - return Language_FINNISH, true - case 0x48: - return Language_FRENCH_BELGIUM, true - case 0x49: - return Language_FRENCH_CANADA, true - case 0x4A: - return Language_FRENCH, true - case 0x4B: - return Language_FRENCH_LUXEMBOURG, true - case 0x4C: - return Language_FRENCH_MONACO, true - case 0x4D: - return Language_FRENCH_SWITZERLAND, true - case 0x4E: - return Language_GALICIAN, true - case 0x4F: - return Language_GERMAN_AUSTRIA, true - case 0x50: - return Language_GERMAN, true - case 0x51: - return Language_GERMAN_LIECHTENSTEIN, true - case 0x52: - return Language_GERMAN_LUXEMBOURG, true - case 0x53: - return Language_GERMAN_SWITZERLAND, true - case 0x54: - return Language_ICELANDIC, true - case 0x55: - return Language_INDONESIAN, true - case 0x56: - return Language_ITALIAN, true - case 0x57: - return Language_ITALIAN_SWITZERLAND, true - case 0x58: - return Language_MALAY_BRUNEI, true - case 0x59: - return Language_MALAY, true - case 0x5A: - return Language_NORWEGIAN, true - case 0x5B: - return Language_NORWEGIAN_NYNORSK, true - case 0x5C: - return Language_PORTUGUESE_BRAZIL, true - case 0x5D: - return Language_PORTUGUESE, true - case 0x5E: - return Language_SPANISH_ARGENTINE, true - case 0x5F: - return Language_SPANISH_BOLIVIA, true - case 0x60: - return Language_SPANISH_CHILE, true - case 0x61: - return Language_SPANISH_COLOMBIA, true - case 0x62: - return Language_SPANISH_COSTA_RICA, true - case 0x63: - return Language_SPANISH_DOMINICAN_REPUBLIC, true - case 0x64: - return Language_SPANISH_ECUADOR, true - case 0x65: - return Language_SPANISH_EL_SALVADOR, true - case 0x66: - return Language_SPANISH_GUATEMALA, true - case 0x67: - return Language_SPANISH_HONDURAS, true - case 0x68: - return Language_SPANISH, true - case 0x69: - return Language_SPANISH_MEXICO, true - case 0x6A: - return Language_SPANISH_NICARAGUA, true - case 0x6B: - return Language_SPANISH_PANAMA, true - case 0x6C: - return Language_SPANISH_PARAGUAY, true - case 0x6D: - return Language_SPANISH_PERU, true - case 0x6E: - return Language_SPANISH_PERTO_RICO, true - case 0x6F: - return Language_SPANISH_TRADITIONAL, true - case 0x70: - return Language_SPANISH_URUGUAY, true - case 0x71: - return Language_SPANISH_VENEZUELA, true - case 0x72: - return Language_SWAHILI, true - case 0x73: - return Language_SWEDISH, true - case 0x74: - return Language_SWEDISH_FINLAND, true - case 0xCA: - return Language_CHINESE_CP936, true + case 0x00: + return Language_NO_LANGUAGE, true + case 0x01: + return Language_ENGLISH, true + case 0x02: + return Language_ENGLISH_AUSTRALIA, true + case 0x03: + return Language_ENGLISH_BELIZE, true + case 0x04: + return Language_ENGLISH_CANADA, true + case 0x05: + return Language_ENGLISH_CARRIBEAN, true + case 0x06: + return Language_ENGLISH_IRELAND, true + case 0x07: + return Language_ENGLISH_JAMAICA, true + case 0x08: + return Language_ENGLISH_NEW_ZEALAND, true + case 0x09: + return Language_ENGLISH_PHILIPPINES, true + case 0x0A: + return Language_ENGLISH_SOUTH_AFRICA, true + case 0x0B: + return Language_ENGLISH_TRINIDAD, true + case 0x0C: + return Language_ENGLISH_UK, true + case 0x0D: + return Language_ENGLISH_USA, true + case 0x0E: + return Language_ENGLISH_ZIMBABWE, true + case 0x40: + return Language_AFRIKAANS, true + case 0x41: + return Language_BASQUE, true + case 0x42: + return Language_CATALAN, true + case 0x43: + return Language_DANISH, true + case 0x44: + return Language_DUTCH_BELGIUM, true + case 0x45: + return Language_DUTCH_NETHERLANDS, true + case 0x46: + return Language_FAEROESE, true + case 0x47: + return Language_FINNISH, true + case 0x48: + return Language_FRENCH_BELGIUM, true + case 0x49: + return Language_FRENCH_CANADA, true + case 0x4A: + return Language_FRENCH, true + case 0x4B: + return Language_FRENCH_LUXEMBOURG, true + case 0x4C: + return Language_FRENCH_MONACO, true + case 0x4D: + return Language_FRENCH_SWITZERLAND, true + case 0x4E: + return Language_GALICIAN, true + case 0x4F: + return Language_GERMAN_AUSTRIA, true + case 0x50: + return Language_GERMAN, true + case 0x51: + return Language_GERMAN_LIECHTENSTEIN, true + case 0x52: + return Language_GERMAN_LUXEMBOURG, true + case 0x53: + return Language_GERMAN_SWITZERLAND, true + case 0x54: + return Language_ICELANDIC, true + case 0x55: + return Language_INDONESIAN, true + case 0x56: + return Language_ITALIAN, true + case 0x57: + return Language_ITALIAN_SWITZERLAND, true + case 0x58: + return Language_MALAY_BRUNEI, true + case 0x59: + return Language_MALAY, true + case 0x5A: + return Language_NORWEGIAN, true + case 0x5B: + return Language_NORWEGIAN_NYNORSK, true + case 0x5C: + return Language_PORTUGUESE_BRAZIL, true + case 0x5D: + return Language_PORTUGUESE, true + case 0x5E: + return Language_SPANISH_ARGENTINE, true + case 0x5F: + return Language_SPANISH_BOLIVIA, true + case 0x60: + return Language_SPANISH_CHILE, true + case 0x61: + return Language_SPANISH_COLOMBIA, true + case 0x62: + return Language_SPANISH_COSTA_RICA, true + case 0x63: + return Language_SPANISH_DOMINICAN_REPUBLIC, true + case 0x64: + return Language_SPANISH_ECUADOR, true + case 0x65: + return Language_SPANISH_EL_SALVADOR, true + case 0x66: + return Language_SPANISH_GUATEMALA, true + case 0x67: + return Language_SPANISH_HONDURAS, true + case 0x68: + return Language_SPANISH, true + case 0x69: + return Language_SPANISH_MEXICO, true + case 0x6A: + return Language_SPANISH_NICARAGUA, true + case 0x6B: + return Language_SPANISH_PANAMA, true + case 0x6C: + return Language_SPANISH_PARAGUAY, true + case 0x6D: + return Language_SPANISH_PERU, true + case 0x6E: + return Language_SPANISH_PERTO_RICO, true + case 0x6F: + return Language_SPANISH_TRADITIONAL, true + case 0x70: + return Language_SPANISH_URUGUAY, true + case 0x71: + return Language_SPANISH_VENEZUELA, true + case 0x72: + return Language_SWAHILI, true + case 0x73: + return Language_SWEDISH, true + case 0x74: + return Language_SWEDISH_FINLAND, true + case 0xCA: + return Language_CHINESE_CP936, true } return 0, false } @@ -471,13 +471,13 @@ func LanguageByName(value string) (enum Language, ok bool) { return 0, false } -func LanguageKnows(value uint8) bool { +func LanguageKnows(value uint8) bool { for _, typeValue := range LanguageValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastLanguage(structType interface{}) Language { @@ -675,3 +675,4 @@ func (e Language) PLC4XEnumName() string { func (e Language) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/LevelInformation.go b/plc4go/protocols/cbus/readwrite/model/LevelInformation.go index 03389d0b4b0..99b75d6996f 100644 --- a/plc4go/protocols/cbus/readwrite/model/LevelInformation.go +++ b/plc4go/protocols/cbus/readwrite/model/LevelInformation.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // LevelInformation is the corresponding interface of LevelInformation type LevelInformation interface { @@ -61,7 +63,7 @@ type LevelInformationExactly interface { // _LevelInformation is the data-structure of this message type _LevelInformation struct { _LevelInformationChildRequirements - Raw uint16 + Raw uint16 } type _LevelInformationChildRequirements interface { @@ -69,6 +71,7 @@ type _LevelInformationChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type LevelInformationParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child LevelInformation, serializeChildFunction func() error) error GetTypeName() string @@ -76,13 +79,12 @@ type LevelInformationParent interface { type LevelInformationChild interface { utils.Serializable - InitializeParent(parent LevelInformation, raw uint16) +InitializeParent(parent LevelInformation , raw uint16 ) GetParent() *LevelInformation GetTypeName() string LevelInformation } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -104,25 +106,25 @@ func (m *_LevelInformation) GetRaw() uint16 { func (m *_LevelInformation) GetNibble1() uint8 { ctx := context.Background() _ = ctx - return uint8((m.GetRaw() & 0xF000) >> uint8(12)) + return uint8((m.GetRaw()& 0xF000)>> uint8(12)) } func (m *_LevelInformation) GetNibble2() uint8 { ctx := context.Background() _ = ctx - return uint8((m.GetRaw() & 0x0F00) >> uint8(8)) + return uint8((m.GetRaw()& 0x0F00)>> uint8(8)) } func (m *_LevelInformation) GetNibble3() uint8 { ctx := context.Background() _ = ctx - return uint8((m.GetRaw() & 0x00F0) >> uint8(4)) + return uint8((m.GetRaw()& 0x00F0)>> uint8(4)) } func (m *_LevelInformation) GetNibble4() uint8 { ctx := context.Background() _ = ctx - return uint8((m.GetRaw() & 0x000F) >> uint8(0)) + return uint8((m.GetRaw()& 0x000F)>> uint8(0)) } func (m *_LevelInformation) GetIsAbsent() bool { @@ -154,14 +156,15 @@ func (m *_LevelInformation) GetIsCorrupted() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewLevelInformation factory function for _LevelInformation -func NewLevelInformation(raw uint16) *_LevelInformation { - return &_LevelInformation{Raw: raw} +func NewLevelInformation( raw uint16 ) *_LevelInformation { +return &_LevelInformation{ Raw: raw } } // Deprecated: use the interface for direct cast func CastLevelInformation(structType interface{}) LevelInformation { - if casted, ok := structType.(LevelInformation); ok { + if casted, ok := structType.(LevelInformation); ok { return casted } if casted, ok := structType.(*LevelInformation); ok { @@ -174,6 +177,7 @@ func (m *_LevelInformation) GetTypeName() string { return "LevelInformation" } + func (m *_LevelInformation) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -213,32 +217,32 @@ func LevelInformationParseWithBuffer(ctx context.Context, readBuffer utils.ReadB currentPos := positionAware.GetPos() _ = currentPos - // Peek Field (raw) - currentPos = positionAware.GetPos() - raw, _err := readBuffer.ReadUint16("raw", 16) - if _err != nil { - return nil, errors.Wrap(_err, "Error parsing 'raw' field of LevelInformation") - } + // Peek Field (raw) + currentPos = positionAware.GetPos() + raw, _err := readBuffer.ReadUint16("raw", 16) + if _err != nil { + return nil, errors.Wrap(_err, "Error parsing 'raw' field of LevelInformation") + } - readBuffer.Reset(currentPos) + readBuffer.Reset(currentPos) // Virtual field - _nibble1 := (raw & 0xF000) >> uint8(12) + _nibble1 := (raw& 0xF000)>> uint8(12) nibble1 := uint8(_nibble1) _ = nibble1 // Virtual field - _nibble2 := (raw & 0x0F00) >> uint8(8) + _nibble2 := (raw& 0x0F00)>> uint8(8) nibble2 := uint8(_nibble2) _ = nibble2 // Virtual field - _nibble3 := (raw & 0x00F0) >> uint8(4) + _nibble3 := (raw& 0x00F0)>> uint8(4) nibble3 := uint8(_nibble3) _ = nibble3 // Virtual field - _nibble4 := (raw & 0x000F) >> uint8(0) + _nibble4 := (raw& 0x000F)>> uint8(0) nibble4 := uint8(_nibble4) _ = nibble4 @@ -265,19 +269,19 @@ func LevelInformationParseWithBuffer(ctx context.Context, readBuffer utils.ReadB // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type LevelInformationChildSerializeRequirement interface { LevelInformation - InitializeParent(LevelInformation, uint16) + InitializeParent(LevelInformation, uint16) GetParent() LevelInformation } var _childTemp interface{} var _child LevelInformationChildSerializeRequirement var typeSwitchError error switch { - case isAbsent == bool(true): // LevelInformationAbsent - _childTemp, typeSwitchError = LevelInformationAbsentParseWithBuffer(ctx, readBuffer) - case 0 == 0 && isCorrupted == bool(true): // LevelInformationCorrupted - _childTemp, typeSwitchError = LevelInformationCorruptedParseWithBuffer(ctx, readBuffer) - case 0 == 0: // LevelInformationNormal - _childTemp, typeSwitchError = LevelInformationNormalParseWithBuffer(ctx, readBuffer) +case isAbsent == bool(true) : // LevelInformationAbsent + _childTemp, typeSwitchError = LevelInformationAbsentParseWithBuffer(ctx, readBuffer, ) +case 0==0 && isCorrupted == bool(true) : // LevelInformationCorrupted + _childTemp, typeSwitchError = LevelInformationCorruptedParseWithBuffer(ctx, readBuffer, ) +case 0==0 : // LevelInformationNormal + _childTemp, typeSwitchError = LevelInformationNormalParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [isAbsent=%v, isCorrupted=%v]", isAbsent, isCorrupted) } @@ -291,7 +295,7 @@ func LevelInformationParseWithBuffer(ctx context.Context, readBuffer utils.ReadB } // Finish initializing - _child.InitializeParent(_child, raw) +_child.InitializeParent(_child , raw ) return _child, nil } @@ -301,7 +305,7 @@ func (pm *_LevelInformation) SerializeParent(ctx context.Context, writeBuffer ut _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("LevelInformation"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("LevelInformation"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for LevelInformation") } // Virtual field @@ -348,6 +352,7 @@ func (pm *_LevelInformation) SerializeParent(ctx context.Context, writeBuffer ut return nil } + func (m *_LevelInformation) isLevelInformation() bool { return true } @@ -362,3 +367,6 @@ func (m *_LevelInformation) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/LevelInformationAbsent.go b/plc4go/protocols/cbus/readwrite/model/LevelInformationAbsent.go index 87f8d3d3c3f..2ba379e2529 100644 --- a/plc4go/protocols/cbus/readwrite/model/LevelInformationAbsent.go +++ b/plc4go/protocols/cbus/readwrite/model/LevelInformationAbsent.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // LevelInformationAbsent is the corresponding interface of LevelInformationAbsent type LevelInformationAbsent interface { @@ -48,6 +50,8 @@ type _LevelInformationAbsent struct { reservedField0 *uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -58,18 +62,18 @@ type _LevelInformationAbsent struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_LevelInformationAbsent) InitializeParent(parent LevelInformation, raw uint16) { - m.Raw = raw +func (m *_LevelInformationAbsent) InitializeParent(parent LevelInformation , raw uint16 ) { m.Raw = raw } -func (m *_LevelInformationAbsent) GetParent() LevelInformation { +func (m *_LevelInformationAbsent) GetParent() LevelInformation { return m._LevelInformation } + // NewLevelInformationAbsent factory function for _LevelInformationAbsent -func NewLevelInformationAbsent(raw uint16) *_LevelInformationAbsent { +func NewLevelInformationAbsent( raw uint16 ) *_LevelInformationAbsent { _result := &_LevelInformationAbsent{ - _LevelInformation: NewLevelInformation(raw), + _LevelInformation: NewLevelInformation(raw), } _result._LevelInformation._LevelInformationChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewLevelInformationAbsent(raw uint16) *_LevelInformationAbsent { // Deprecated: use the interface for direct cast func CastLevelInformationAbsent(structType interface{}) LevelInformationAbsent { - if casted, ok := structType.(LevelInformationAbsent); ok { + if casted, ok := structType.(LevelInformationAbsent); ok { return casted } if casted, ok := structType.(*LevelInformationAbsent); ok { @@ -99,6 +103,7 @@ func (m *_LevelInformationAbsent) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_LevelInformationAbsent) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -126,7 +131,7 @@ func LevelInformationAbsentParseWithBuffer(ctx context.Context, readBuffer utils if reserved != uint16(0x0000) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint16(0x0000), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -139,8 +144,9 @@ func LevelInformationAbsentParseWithBuffer(ctx context.Context, readBuffer utils // Create a partially initialized instance _child := &_LevelInformationAbsent{ - _LevelInformation: &_LevelInformation{}, - reservedField0: reservedField0, + _LevelInformation: &_LevelInformation{ + }, + reservedField0: reservedField0, } _child._LevelInformation._LevelInformationChildRequirements = _child return _child, nil @@ -162,21 +168,21 @@ func (m *_LevelInformationAbsent) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for LevelInformationAbsent") } - // Reserved Field (reserved) - { - var reserved uint16 = uint16(0x0000) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint16(0x0000), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteUint16("reserved", 16, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + // Reserved Field (reserved) + { + var reserved uint16 = uint16(0x0000) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint16(0x0000), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 + } + _err := writeBuffer.WriteUint16("reserved", 16, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } if popErr := writeBuffer.PopContext("LevelInformationAbsent"); popErr != nil { return errors.Wrap(popErr, "Error popping for LevelInformationAbsent") @@ -186,6 +192,7 @@ func (m *_LevelInformationAbsent) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_LevelInformationAbsent) isLevelInformationAbsent() bool { return true } @@ -200,3 +207,6 @@ func (m *_LevelInformationAbsent) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/LevelInformationCorrupted.go b/plc4go/protocols/cbus/readwrite/model/LevelInformationCorrupted.go index d0d17bb747a..da3721c001e 100644 --- a/plc4go/protocols/cbus/readwrite/model/LevelInformationCorrupted.go +++ b/plc4go/protocols/cbus/readwrite/model/LevelInformationCorrupted.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // LevelInformationCorrupted is the corresponding interface of LevelInformationCorrupted type LevelInformationCorrupted interface { @@ -52,12 +54,14 @@ type LevelInformationCorruptedExactly interface { // _LevelInformationCorrupted is the data-structure of this message type _LevelInformationCorrupted struct { *_LevelInformation - CorruptedNibble1 uint8 - CorruptedNibble2 uint8 - CorruptedNibble3 uint8 - CorruptedNibble4 uint8 + CorruptedNibble1 uint8 + CorruptedNibble2 uint8 + CorruptedNibble3 uint8 + CorruptedNibble4 uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -68,14 +72,12 @@ type _LevelInformationCorrupted struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_LevelInformationCorrupted) InitializeParent(parent LevelInformation, raw uint16) { - m.Raw = raw +func (m *_LevelInformationCorrupted) InitializeParent(parent LevelInformation , raw uint16 ) { m.Raw = raw } -func (m *_LevelInformationCorrupted) GetParent() LevelInformation { +func (m *_LevelInformationCorrupted) GetParent() LevelInformation { return m._LevelInformation } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -102,14 +104,15 @@ func (m *_LevelInformationCorrupted) GetCorruptedNibble4() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewLevelInformationCorrupted factory function for _LevelInformationCorrupted -func NewLevelInformationCorrupted(corruptedNibble1 uint8, corruptedNibble2 uint8, corruptedNibble3 uint8, corruptedNibble4 uint8, raw uint16) *_LevelInformationCorrupted { +func NewLevelInformationCorrupted( corruptedNibble1 uint8 , corruptedNibble2 uint8 , corruptedNibble3 uint8 , corruptedNibble4 uint8 , raw uint16 ) *_LevelInformationCorrupted { _result := &_LevelInformationCorrupted{ - CorruptedNibble1: corruptedNibble1, - CorruptedNibble2: corruptedNibble2, - CorruptedNibble3: corruptedNibble3, - CorruptedNibble4: corruptedNibble4, - _LevelInformation: NewLevelInformation(raw), + CorruptedNibble1: corruptedNibble1, + CorruptedNibble2: corruptedNibble2, + CorruptedNibble3: corruptedNibble3, + CorruptedNibble4: corruptedNibble4, + _LevelInformation: NewLevelInformation(raw), } _result._LevelInformation._LevelInformationChildRequirements = _result return _result @@ -117,7 +120,7 @@ func NewLevelInformationCorrupted(corruptedNibble1 uint8, corruptedNibble2 uint8 // Deprecated: use the interface for direct cast func CastLevelInformationCorrupted(structType interface{}) LevelInformationCorrupted { - if casted, ok := structType.(LevelInformationCorrupted); ok { + if casted, ok := structType.(LevelInformationCorrupted); ok { return casted } if casted, ok := structType.(*LevelInformationCorrupted); ok { @@ -134,20 +137,21 @@ func (m *_LevelInformationCorrupted) GetLengthInBits(ctx context.Context) uint16 lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (corruptedNibble1) - lengthInBits += 4 + lengthInBits += 4; // Simple field (corruptedNibble2) - lengthInBits += 4 + lengthInBits += 4; // Simple field (corruptedNibble3) - lengthInBits += 4 + lengthInBits += 4; // Simple field (corruptedNibble4) - lengthInBits += 4 + lengthInBits += 4; return lengthInBits } + func (m *_LevelInformationCorrupted) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -166,28 +170,28 @@ func LevelInformationCorruptedParseWithBuffer(ctx context.Context, readBuffer ut _ = currentPos // Simple Field (corruptedNibble1) - _corruptedNibble1, _corruptedNibble1Err := readBuffer.ReadUint8("corruptedNibble1", 4) +_corruptedNibble1, _corruptedNibble1Err := readBuffer.ReadUint8("corruptedNibble1", 4) if _corruptedNibble1Err != nil { return nil, errors.Wrap(_corruptedNibble1Err, "Error parsing 'corruptedNibble1' field of LevelInformationCorrupted") } corruptedNibble1 := _corruptedNibble1 // Simple Field (corruptedNibble2) - _corruptedNibble2, _corruptedNibble2Err := readBuffer.ReadUint8("corruptedNibble2", 4) +_corruptedNibble2, _corruptedNibble2Err := readBuffer.ReadUint8("corruptedNibble2", 4) if _corruptedNibble2Err != nil { return nil, errors.Wrap(_corruptedNibble2Err, "Error parsing 'corruptedNibble2' field of LevelInformationCorrupted") } corruptedNibble2 := _corruptedNibble2 // Simple Field (corruptedNibble3) - _corruptedNibble3, _corruptedNibble3Err := readBuffer.ReadUint8("corruptedNibble3", 4) +_corruptedNibble3, _corruptedNibble3Err := readBuffer.ReadUint8("corruptedNibble3", 4) if _corruptedNibble3Err != nil { return nil, errors.Wrap(_corruptedNibble3Err, "Error parsing 'corruptedNibble3' field of LevelInformationCorrupted") } corruptedNibble3 := _corruptedNibble3 // Simple Field (corruptedNibble4) - _corruptedNibble4, _corruptedNibble4Err := readBuffer.ReadUint8("corruptedNibble4", 4) +_corruptedNibble4, _corruptedNibble4Err := readBuffer.ReadUint8("corruptedNibble4", 4) if _corruptedNibble4Err != nil { return nil, errors.Wrap(_corruptedNibble4Err, "Error parsing 'corruptedNibble4' field of LevelInformationCorrupted") } @@ -199,11 +203,12 @@ func LevelInformationCorruptedParseWithBuffer(ctx context.Context, readBuffer ut // Create a partially initialized instance _child := &_LevelInformationCorrupted{ - _LevelInformation: &_LevelInformation{}, - CorruptedNibble1: corruptedNibble1, - CorruptedNibble2: corruptedNibble2, - CorruptedNibble3: corruptedNibble3, - CorruptedNibble4: corruptedNibble4, + _LevelInformation: &_LevelInformation{ + }, + CorruptedNibble1: corruptedNibble1, + CorruptedNibble2: corruptedNibble2, + CorruptedNibble3: corruptedNibble3, + CorruptedNibble4: corruptedNibble4, } _child._LevelInformation._LevelInformationChildRequirements = _child return _child, nil @@ -225,33 +230,33 @@ func (m *_LevelInformationCorrupted) SerializeWithWriteBuffer(ctx context.Contex return errors.Wrap(pushErr, "Error pushing for LevelInformationCorrupted") } - // Simple Field (corruptedNibble1) - corruptedNibble1 := uint8(m.GetCorruptedNibble1()) - _corruptedNibble1Err := writeBuffer.WriteUint8("corruptedNibble1", 4, (corruptedNibble1)) - if _corruptedNibble1Err != nil { - return errors.Wrap(_corruptedNibble1Err, "Error serializing 'corruptedNibble1' field") - } + // Simple Field (corruptedNibble1) + corruptedNibble1 := uint8(m.GetCorruptedNibble1()) + _corruptedNibble1Err := writeBuffer.WriteUint8("corruptedNibble1", 4, (corruptedNibble1)) + if _corruptedNibble1Err != nil { + return errors.Wrap(_corruptedNibble1Err, "Error serializing 'corruptedNibble1' field") + } - // Simple Field (corruptedNibble2) - corruptedNibble2 := uint8(m.GetCorruptedNibble2()) - _corruptedNibble2Err := writeBuffer.WriteUint8("corruptedNibble2", 4, (corruptedNibble2)) - if _corruptedNibble2Err != nil { - return errors.Wrap(_corruptedNibble2Err, "Error serializing 'corruptedNibble2' field") - } + // Simple Field (corruptedNibble2) + corruptedNibble2 := uint8(m.GetCorruptedNibble2()) + _corruptedNibble2Err := writeBuffer.WriteUint8("corruptedNibble2", 4, (corruptedNibble2)) + if _corruptedNibble2Err != nil { + return errors.Wrap(_corruptedNibble2Err, "Error serializing 'corruptedNibble2' field") + } - // Simple Field (corruptedNibble3) - corruptedNibble3 := uint8(m.GetCorruptedNibble3()) - _corruptedNibble3Err := writeBuffer.WriteUint8("corruptedNibble3", 4, (corruptedNibble3)) - if _corruptedNibble3Err != nil { - return errors.Wrap(_corruptedNibble3Err, "Error serializing 'corruptedNibble3' field") - } + // Simple Field (corruptedNibble3) + corruptedNibble3 := uint8(m.GetCorruptedNibble3()) + _corruptedNibble3Err := writeBuffer.WriteUint8("corruptedNibble3", 4, (corruptedNibble3)) + if _corruptedNibble3Err != nil { + return errors.Wrap(_corruptedNibble3Err, "Error serializing 'corruptedNibble3' field") + } - // Simple Field (corruptedNibble4) - corruptedNibble4 := uint8(m.GetCorruptedNibble4()) - _corruptedNibble4Err := writeBuffer.WriteUint8("corruptedNibble4", 4, (corruptedNibble4)) - if _corruptedNibble4Err != nil { - return errors.Wrap(_corruptedNibble4Err, "Error serializing 'corruptedNibble4' field") - } + // Simple Field (corruptedNibble4) + corruptedNibble4 := uint8(m.GetCorruptedNibble4()) + _corruptedNibble4Err := writeBuffer.WriteUint8("corruptedNibble4", 4, (corruptedNibble4)) + if _corruptedNibble4Err != nil { + return errors.Wrap(_corruptedNibble4Err, "Error serializing 'corruptedNibble4' field") + } if popErr := writeBuffer.PopContext("LevelInformationCorrupted"); popErr != nil { return errors.Wrap(popErr, "Error popping for LevelInformationCorrupted") @@ -261,6 +266,7 @@ func (m *_LevelInformationCorrupted) SerializeWithWriteBuffer(ctx context.Contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_LevelInformationCorrupted) isLevelInformationCorrupted() bool { return true } @@ -275,3 +281,6 @@ func (m *_LevelInformationCorrupted) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/LevelInformationNibblePair.go b/plc4go/protocols/cbus/readwrite/model/LevelInformationNibblePair.go index 1179377e277..90251f45d5a 100644 --- a/plc4go/protocols/cbus/readwrite/model/LevelInformationNibblePair.go +++ b/plc4go/protocols/cbus/readwrite/model/LevelInformationNibblePair.go @@ -35,7 +35,7 @@ type ILevelInformationNibblePair interface { NibbleValue() uint8 } -const ( +const( LevelInformationNibblePair_Value_F LevelInformationNibblePair = 0x55 LevelInformationNibblePair_Value_E LevelInformationNibblePair = 0x56 LevelInformationNibblePair_Value_D LevelInformationNibblePair = 0x59 @@ -58,7 +58,7 @@ var LevelInformationNibblePairValues []LevelInformationNibblePair func init() { _ = errors.New - LevelInformationNibblePairValues = []LevelInformationNibblePair{ + LevelInformationNibblePairValues = []LevelInformationNibblePair { LevelInformationNibblePair_Value_F, LevelInformationNibblePair_Value_E, LevelInformationNibblePair_Value_D, @@ -78,74 +78,58 @@ func init() { } } + func (e LevelInformationNibblePair) NibbleValue() uint8 { - switch e { - case 0x55: - { /* '0x55' */ - return 0xF + switch e { + case 0x55: { /* '0x55' */ + return 0xF } - case 0x56: - { /* '0x56' */ - return 0xE + case 0x56: { /* '0x56' */ + return 0xE } - case 0x59: - { /* '0x59' */ - return 0xD + case 0x59: { /* '0x59' */ + return 0xD } - case 0x5A: - { /* '0x5A' */ - return 0xC + case 0x5A: { /* '0x5A' */ + return 0xC } - case 0x65: - { /* '0x65' */ - return 0xB + case 0x65: { /* '0x65' */ + return 0xB } - case 0x66: - { /* '0x66' */ - return 0xA + case 0x66: { /* '0x66' */ + return 0xA } - case 0x69: - { /* '0x69' */ - return 0x9 + case 0x69: { /* '0x69' */ + return 0x9 } - case 0x6A: - { /* '0x6A' */ - return 0x8 + case 0x6A: { /* '0x6A' */ + return 0x8 } - case 0x95: - { /* '0x95' */ - return 0x7 + case 0x95: { /* '0x95' */ + return 0x7 } - case 0x96: - { /* '0x96' */ - return 0x6 + case 0x96: { /* '0x96' */ + return 0x6 } - case 0x99: - { /* '0x99' */ - return 0x5 + case 0x99: { /* '0x99' */ + return 0x5 } - case 0x9A: - { /* '0x9A' */ - return 0x4 + case 0x9A: { /* '0x9A' */ + return 0x4 } - case 0xA5: - { /* '0xA5' */ - return 0x3 + case 0xA5: { /* '0xA5' */ + return 0x3 } - case 0xA6: - { /* '0xA6' */ - return 0x2 + case 0xA6: { /* '0xA6' */ + return 0x2 } - case 0xA9: - { /* '0xA9' */ - return 0x1 + case 0xA9: { /* '0xA9' */ + return 0x1 } - case 0xAA: - { /* '0xAA' */ - return 0x0 + case 0xAA: { /* '0xAA' */ + return 0x0 } - default: - { + default: { return 0 } } @@ -161,38 +145,38 @@ func LevelInformationNibblePairFirstEnumForFieldNibbleValue(value uint8) (LevelI } func LevelInformationNibblePairByValue(value uint8) (enum LevelInformationNibblePair, ok bool) { switch value { - case 0x55: - return LevelInformationNibblePair_Value_F, true - case 0x56: - return LevelInformationNibblePair_Value_E, true - case 0x59: - return LevelInformationNibblePair_Value_D, true - case 0x5A: - return LevelInformationNibblePair_Value_C, true - case 0x65: - return LevelInformationNibblePair_Value_B, true - case 0x66: - return LevelInformationNibblePair_Value_A, true - case 0x69: - return LevelInformationNibblePair_Value_9, true - case 0x6A: - return LevelInformationNibblePair_Value_8, true - case 0x95: - return LevelInformationNibblePair_Value_7, true - case 0x96: - return LevelInformationNibblePair_Value_6, true - case 0x99: - return LevelInformationNibblePair_Value_5, true - case 0x9A: - return LevelInformationNibblePair_Value_4, true - case 0xA5: - return LevelInformationNibblePair_Value_3, true - case 0xA6: - return LevelInformationNibblePair_Value_2, true - case 0xA9: - return LevelInformationNibblePair_Value_1, true - case 0xAA: - return LevelInformationNibblePair_Value_0, true + case 0x55: + return LevelInformationNibblePair_Value_F, true + case 0x56: + return LevelInformationNibblePair_Value_E, true + case 0x59: + return LevelInformationNibblePair_Value_D, true + case 0x5A: + return LevelInformationNibblePair_Value_C, true + case 0x65: + return LevelInformationNibblePair_Value_B, true + case 0x66: + return LevelInformationNibblePair_Value_A, true + case 0x69: + return LevelInformationNibblePair_Value_9, true + case 0x6A: + return LevelInformationNibblePair_Value_8, true + case 0x95: + return LevelInformationNibblePair_Value_7, true + case 0x96: + return LevelInformationNibblePair_Value_6, true + case 0x99: + return LevelInformationNibblePair_Value_5, true + case 0x9A: + return LevelInformationNibblePair_Value_4, true + case 0xA5: + return LevelInformationNibblePair_Value_3, true + case 0xA6: + return LevelInformationNibblePair_Value_2, true + case 0xA9: + return LevelInformationNibblePair_Value_1, true + case 0xAA: + return LevelInformationNibblePair_Value_0, true } return 0, false } @@ -235,13 +219,13 @@ func LevelInformationNibblePairByName(value string) (enum LevelInformationNibble return 0, false } -func LevelInformationNibblePairKnows(value uint8) bool { +func LevelInformationNibblePairKnows(value uint8) bool { for _, typeValue := range LevelInformationNibblePairValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastLevelInformationNibblePair(structType interface{}) LevelInformationNibblePair { @@ -333,3 +317,4 @@ func (e LevelInformationNibblePair) PLC4XEnumName() string { func (e LevelInformationNibblePair) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/LevelInformationNormal.go b/plc4go/protocols/cbus/readwrite/model/LevelInformationNormal.go index e3fea27ca4c..8c2ad5080fd 100644 --- a/plc4go/protocols/cbus/readwrite/model/LevelInformationNormal.go +++ b/plc4go/protocols/cbus/readwrite/model/LevelInformationNormal.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // LevelInformationNormal is the corresponding interface of LevelInformationNormal type LevelInformationNormal interface { @@ -52,10 +54,12 @@ type LevelInformationNormalExactly interface { // _LevelInformationNormal is the data-structure of this message type _LevelInformationNormal struct { *_LevelInformation - Pair1 LevelInformationNibblePair - Pair2 LevelInformationNibblePair + Pair1 LevelInformationNibblePair + Pair2 LevelInformationNibblePair } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -66,14 +70,12 @@ type _LevelInformationNormal struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_LevelInformationNormal) InitializeParent(parent LevelInformation, raw uint16) { - m.Raw = raw +func (m *_LevelInformationNormal) InitializeParent(parent LevelInformation , raw uint16 ) { m.Raw = raw } -func (m *_LevelInformationNormal) GetParent() LevelInformation { +func (m *_LevelInformationNormal) GetParent() LevelInformation { return m._LevelInformation } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -99,13 +101,13 @@ func (m *_LevelInformationNormal) GetPair2() LevelInformationNibblePair { func (m *_LevelInformationNormal) GetActualLevel() uint8 { ctx := context.Background() _ = ctx - return uint8(m.GetPair2().NibbleValue()<= (1))) { + if (!(bool((numBytes) >= ((1))))) { return nil, errors.WithStack(utils.ParseValidationError{"ApplicationAddress1 has exactly one byte"}) } @@ -156,7 +160,7 @@ func ParameterValueApplicationAddress1ParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("value"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for value") } - _value, _valueErr := ApplicationAddress1ParseWithBuffer(ctx, readBuffer) +_value, _valueErr := ApplicationAddress1ParseWithBuffer(ctx, readBuffer) if _valueErr != nil { return nil, errors.Wrap(_valueErr, "Error parsing 'value' field of ParameterValueApplicationAddress1") } @@ -181,7 +185,7 @@ func ParameterValueApplicationAddress1ParseWithBuffer(ctx context.Context, readB NumBytes: numBytes, }, Value: value, - Data: data, + Data: data, } _child._ParameterValue._ParameterValueChildRequirements = _child return _child, nil @@ -203,23 +207,23 @@ func (m *_ParameterValueApplicationAddress1) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for ParameterValueApplicationAddress1") } - // Simple Field (value) - if pushErr := writeBuffer.PushContext("value"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for value") - } - _valueErr := writeBuffer.WriteSerializable(ctx, m.GetValue()) - if popErr := writeBuffer.PopContext("value"); popErr != nil { - return errors.Wrap(popErr, "Error popping for value") - } - if _valueErr != nil { - return errors.Wrap(_valueErr, "Error serializing 'value' field") - } + // Simple Field (value) + if pushErr := writeBuffer.PushContext("value"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for value") + } + _valueErr := writeBuffer.WriteSerializable(ctx, m.GetValue()) + if popErr := writeBuffer.PopContext("value"); popErr != nil { + return errors.Wrap(popErr, "Error popping for value") + } + if _valueErr != nil { + return errors.Wrap(_valueErr, "Error serializing 'value' field") + } - // Array Field (data) - // Byte Array field (data) - if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { - return errors.Wrap(err, "Error serializing 'data' field") - } + // Array Field (data) + // Byte Array field (data) + if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { + return errors.Wrap(err, "Error serializing 'data' field") + } if popErr := writeBuffer.PopContext("ParameterValueApplicationAddress1"); popErr != nil { return errors.Wrap(popErr, "Error popping for ParameterValueApplicationAddress1") @@ -229,6 +233,7 @@ func (m *_ParameterValueApplicationAddress1) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ParameterValueApplicationAddress1) isParameterValueApplicationAddress1() bool { return true } @@ -243,3 +248,6 @@ func (m *_ParameterValueApplicationAddress1) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/ParameterValueApplicationAddress2.go b/plc4go/protocols/cbus/readwrite/model/ParameterValueApplicationAddress2.go index 59365dcfd12..08bd0bf3866 100644 --- a/plc4go/protocols/cbus/readwrite/model/ParameterValueApplicationAddress2.go +++ b/plc4go/protocols/cbus/readwrite/model/ParameterValueApplicationAddress2.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ParameterValueApplicationAddress2 is the corresponding interface of ParameterValueApplicationAddress2 type ParameterValueApplicationAddress2 interface { @@ -48,30 +50,30 @@ type ParameterValueApplicationAddress2Exactly interface { // _ParameterValueApplicationAddress2 is the data-structure of this message type _ParameterValueApplicationAddress2 struct { *_ParameterValue - Value ApplicationAddress2 - Data []byte + Value ApplicationAddress2 + Data []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ParameterValueApplicationAddress2) GetParameterType() ParameterType { - return ParameterType_APPLICATION_ADDRESS_2 -} +func (m *_ParameterValueApplicationAddress2) GetParameterType() ParameterType { +return ParameterType_APPLICATION_ADDRESS_2} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ParameterValueApplicationAddress2) InitializeParent(parent ParameterValue) {} +func (m *_ParameterValueApplicationAddress2) InitializeParent(parent ParameterValue ) {} -func (m *_ParameterValueApplicationAddress2) GetParent() ParameterValue { +func (m *_ParameterValueApplicationAddress2) GetParent() ParameterValue { return m._ParameterValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_ParameterValueApplicationAddress2) GetData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewParameterValueApplicationAddress2 factory function for _ParameterValueApplicationAddress2 -func NewParameterValueApplicationAddress2(value ApplicationAddress2, data []byte, numBytes uint8) *_ParameterValueApplicationAddress2 { +func NewParameterValueApplicationAddress2( value ApplicationAddress2 , data []byte , numBytes uint8 ) *_ParameterValueApplicationAddress2 { _result := &_ParameterValueApplicationAddress2{ - Value: value, - Data: data, - _ParameterValue: NewParameterValue(numBytes), + Value: value, + Data: data, + _ParameterValue: NewParameterValue(numBytes), } _result._ParameterValue._ParameterValueChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewParameterValueApplicationAddress2(value ApplicationAddress2, data []byte // Deprecated: use the interface for direct cast func CastParameterValueApplicationAddress2(structType interface{}) ParameterValueApplicationAddress2 { - if casted, ok := structType.(ParameterValueApplicationAddress2); ok { + if casted, ok := structType.(ParameterValueApplicationAddress2); ok { return casted } if casted, ok := structType.(*ParameterValueApplicationAddress2); ok { @@ -130,6 +133,7 @@ func (m *_ParameterValueApplicationAddress2) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_ParameterValueApplicationAddress2) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -148,7 +152,7 @@ func ParameterValueApplicationAddress2ParseWithBuffer(ctx context.Context, readB _ = currentPos // Validation - if !(bool((numBytes) >= (1))) { + if (!(bool((numBytes) >= ((1))))) { return nil, errors.WithStack(utils.ParseValidationError{"ApplicationAddress2 has exactly one byte"}) } @@ -156,7 +160,7 @@ func ParameterValueApplicationAddress2ParseWithBuffer(ctx context.Context, readB if pullErr := readBuffer.PullContext("value"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for value") } - _value, _valueErr := ApplicationAddress2ParseWithBuffer(ctx, readBuffer) +_value, _valueErr := ApplicationAddress2ParseWithBuffer(ctx, readBuffer) if _valueErr != nil { return nil, errors.Wrap(_valueErr, "Error parsing 'value' field of ParameterValueApplicationAddress2") } @@ -181,7 +185,7 @@ func ParameterValueApplicationAddress2ParseWithBuffer(ctx context.Context, readB NumBytes: numBytes, }, Value: value, - Data: data, + Data: data, } _child._ParameterValue._ParameterValueChildRequirements = _child return _child, nil @@ -203,23 +207,23 @@ func (m *_ParameterValueApplicationAddress2) SerializeWithWriteBuffer(ctx contex return errors.Wrap(pushErr, "Error pushing for ParameterValueApplicationAddress2") } - // Simple Field (value) - if pushErr := writeBuffer.PushContext("value"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for value") - } - _valueErr := writeBuffer.WriteSerializable(ctx, m.GetValue()) - if popErr := writeBuffer.PopContext("value"); popErr != nil { - return errors.Wrap(popErr, "Error popping for value") - } - if _valueErr != nil { - return errors.Wrap(_valueErr, "Error serializing 'value' field") - } + // Simple Field (value) + if pushErr := writeBuffer.PushContext("value"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for value") + } + _valueErr := writeBuffer.WriteSerializable(ctx, m.GetValue()) + if popErr := writeBuffer.PopContext("value"); popErr != nil { + return errors.Wrap(popErr, "Error popping for value") + } + if _valueErr != nil { + return errors.Wrap(_valueErr, "Error serializing 'value' field") + } - // Array Field (data) - // Byte Array field (data) - if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { - return errors.Wrap(err, "Error serializing 'data' field") - } + // Array Field (data) + // Byte Array field (data) + if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { + return errors.Wrap(err, "Error serializing 'data' field") + } if popErr := writeBuffer.PopContext("ParameterValueApplicationAddress2"); popErr != nil { return errors.Wrap(popErr, "Error popping for ParameterValueApplicationAddress2") @@ -229,6 +233,7 @@ func (m *_ParameterValueApplicationAddress2) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ParameterValueApplicationAddress2) isParameterValueApplicationAddress2() bool { return true } @@ -243,3 +248,6 @@ func (m *_ParameterValueApplicationAddress2) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/ParameterValueBaudRateSelector.go b/plc4go/protocols/cbus/readwrite/model/ParameterValueBaudRateSelector.go index 44e6f40127d..c68a0e5a882 100644 --- a/plc4go/protocols/cbus/readwrite/model/ParameterValueBaudRateSelector.go +++ b/plc4go/protocols/cbus/readwrite/model/ParameterValueBaudRateSelector.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ParameterValueBaudRateSelector is the corresponding interface of ParameterValueBaudRateSelector type ParameterValueBaudRateSelector interface { @@ -48,30 +50,30 @@ type ParameterValueBaudRateSelectorExactly interface { // _ParameterValueBaudRateSelector is the data-structure of this message type _ParameterValueBaudRateSelector struct { *_ParameterValue - Value BaudRateSelector - Data []byte + Value BaudRateSelector + Data []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ParameterValueBaudRateSelector) GetParameterType() ParameterType { - return ParameterType_BAUD_RATE_SELECTOR -} +func (m *_ParameterValueBaudRateSelector) GetParameterType() ParameterType { +return ParameterType_BAUD_RATE_SELECTOR} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ParameterValueBaudRateSelector) InitializeParent(parent ParameterValue) {} +func (m *_ParameterValueBaudRateSelector) InitializeParent(parent ParameterValue ) {} -func (m *_ParameterValueBaudRateSelector) GetParent() ParameterValue { +func (m *_ParameterValueBaudRateSelector) GetParent() ParameterValue { return m._ParameterValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_ParameterValueBaudRateSelector) GetData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewParameterValueBaudRateSelector factory function for _ParameterValueBaudRateSelector -func NewParameterValueBaudRateSelector(value BaudRateSelector, data []byte, numBytes uint8) *_ParameterValueBaudRateSelector { +func NewParameterValueBaudRateSelector( value BaudRateSelector , data []byte , numBytes uint8 ) *_ParameterValueBaudRateSelector { _result := &_ParameterValueBaudRateSelector{ - Value: value, - Data: data, - _ParameterValue: NewParameterValue(numBytes), + Value: value, + Data: data, + _ParameterValue: NewParameterValue(numBytes), } _result._ParameterValue._ParameterValueChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewParameterValueBaudRateSelector(value BaudRateSelector, data []byte, numB // Deprecated: use the interface for direct cast func CastParameterValueBaudRateSelector(structType interface{}) ParameterValueBaudRateSelector { - if casted, ok := structType.(ParameterValueBaudRateSelector); ok { + if casted, ok := structType.(ParameterValueBaudRateSelector); ok { return casted } if casted, ok := structType.(*ParameterValueBaudRateSelector); ok { @@ -130,6 +133,7 @@ func (m *_ParameterValueBaudRateSelector) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_ParameterValueBaudRateSelector) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -148,7 +152,7 @@ func ParameterValueBaudRateSelectorParseWithBuffer(ctx context.Context, readBuff _ = currentPos // Validation - if !(bool((numBytes) >= (1))) { + if (!(bool((numBytes) >= ((1))))) { return nil, errors.WithStack(utils.ParseValidationError{"BaudRateSelector has exactly one byte"}) } @@ -156,7 +160,7 @@ func ParameterValueBaudRateSelectorParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("value"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for value") } - _value, _valueErr := BaudRateSelectorParseWithBuffer(ctx, readBuffer) +_value, _valueErr := BaudRateSelectorParseWithBuffer(ctx, readBuffer) if _valueErr != nil { return nil, errors.Wrap(_valueErr, "Error parsing 'value' field of ParameterValueBaudRateSelector") } @@ -181,7 +185,7 @@ func ParameterValueBaudRateSelectorParseWithBuffer(ctx context.Context, readBuff NumBytes: numBytes, }, Value: value, - Data: data, + Data: data, } _child._ParameterValue._ParameterValueChildRequirements = _child return _child, nil @@ -203,23 +207,23 @@ func (m *_ParameterValueBaudRateSelector) SerializeWithWriteBuffer(ctx context.C return errors.Wrap(pushErr, "Error pushing for ParameterValueBaudRateSelector") } - // Simple Field (value) - if pushErr := writeBuffer.PushContext("value"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for value") - } - _valueErr := writeBuffer.WriteSerializable(ctx, m.GetValue()) - if popErr := writeBuffer.PopContext("value"); popErr != nil { - return errors.Wrap(popErr, "Error popping for value") - } - if _valueErr != nil { - return errors.Wrap(_valueErr, "Error serializing 'value' field") - } + // Simple Field (value) + if pushErr := writeBuffer.PushContext("value"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for value") + } + _valueErr := writeBuffer.WriteSerializable(ctx, m.GetValue()) + if popErr := writeBuffer.PopContext("value"); popErr != nil { + return errors.Wrap(popErr, "Error popping for value") + } + if _valueErr != nil { + return errors.Wrap(_valueErr, "Error serializing 'value' field") + } - // Array Field (data) - // Byte Array field (data) - if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { - return errors.Wrap(err, "Error serializing 'data' field") - } + // Array Field (data) + // Byte Array field (data) + if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { + return errors.Wrap(err, "Error serializing 'data' field") + } if popErr := writeBuffer.PopContext("ParameterValueBaudRateSelector"); popErr != nil { return errors.Wrap(popErr, "Error popping for ParameterValueBaudRateSelector") @@ -229,6 +233,7 @@ func (m *_ParameterValueBaudRateSelector) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ParameterValueBaudRateSelector) isParameterValueBaudRateSelector() bool { return true } @@ -243,3 +248,6 @@ func (m *_ParameterValueBaudRateSelector) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/ParameterValueCustomManufacturer.go b/plc4go/protocols/cbus/readwrite/model/ParameterValueCustomManufacturer.go index 8d29199c97f..e07eafc8672 100644 --- a/plc4go/protocols/cbus/readwrite/model/ParameterValueCustomManufacturer.go +++ b/plc4go/protocols/cbus/readwrite/model/ParameterValueCustomManufacturer.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ParameterValueCustomManufacturer is the corresponding interface of ParameterValueCustomManufacturer type ParameterValueCustomManufacturer interface { @@ -46,29 +48,29 @@ type ParameterValueCustomManufacturerExactly interface { // _ParameterValueCustomManufacturer is the data-structure of this message type _ParameterValueCustomManufacturer struct { *_ParameterValue - Value CustomManufacturer + Value CustomManufacturer } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ParameterValueCustomManufacturer) GetParameterType() ParameterType { - return ParameterType_CUSTOM_MANUFACTURER -} +func (m *_ParameterValueCustomManufacturer) GetParameterType() ParameterType { +return ParameterType_CUSTOM_MANUFACTURER} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ParameterValueCustomManufacturer) InitializeParent(parent ParameterValue) {} +func (m *_ParameterValueCustomManufacturer) InitializeParent(parent ParameterValue ) {} -func (m *_ParameterValueCustomManufacturer) GetParent() ParameterValue { +func (m *_ParameterValueCustomManufacturer) GetParent() ParameterValue { return m._ParameterValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_ParameterValueCustomManufacturer) GetValue() CustomManufacturer { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewParameterValueCustomManufacturer factory function for _ParameterValueCustomManufacturer -func NewParameterValueCustomManufacturer(value CustomManufacturer, numBytes uint8) *_ParameterValueCustomManufacturer { +func NewParameterValueCustomManufacturer( value CustomManufacturer , numBytes uint8 ) *_ParameterValueCustomManufacturer { _result := &_ParameterValueCustomManufacturer{ - Value: value, - _ParameterValue: NewParameterValue(numBytes), + Value: value, + _ParameterValue: NewParameterValue(numBytes), } _result._ParameterValue._ParameterValueChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewParameterValueCustomManufacturer(value CustomManufacturer, numBytes uint // Deprecated: use the interface for direct cast func CastParameterValueCustomManufacturer(structType interface{}) ParameterValueCustomManufacturer { - if casted, ok := structType.(ParameterValueCustomManufacturer); ok { + if casted, ok := structType.(ParameterValueCustomManufacturer); ok { return casted } if casted, ok := structType.(*ParameterValueCustomManufacturer); ok { @@ -117,6 +120,7 @@ func (m *_ParameterValueCustomManufacturer) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_ParameterValueCustomManufacturer) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func ParameterValueCustomManufacturerParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("value"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for value") } - _value, _valueErr := CustomManufacturerParseWithBuffer(ctx, readBuffer, uint8(numBytes)) +_value, _valueErr := CustomManufacturerParseWithBuffer(ctx, readBuffer , uint8( numBytes ) ) if _valueErr != nil { return nil, errors.Wrap(_valueErr, "Error parsing 'value' field of ParameterValueCustomManufacturer") } @@ -178,17 +182,17 @@ func (m *_ParameterValueCustomManufacturer) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for ParameterValueCustomManufacturer") } - // Simple Field (value) - if pushErr := writeBuffer.PushContext("value"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for value") - } - _valueErr := writeBuffer.WriteSerializable(ctx, m.GetValue()) - if popErr := writeBuffer.PopContext("value"); popErr != nil { - return errors.Wrap(popErr, "Error popping for value") - } - if _valueErr != nil { - return errors.Wrap(_valueErr, "Error serializing 'value' field") - } + // Simple Field (value) + if pushErr := writeBuffer.PushContext("value"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for value") + } + _valueErr := writeBuffer.WriteSerializable(ctx, m.GetValue()) + if popErr := writeBuffer.PopContext("value"); popErr != nil { + return errors.Wrap(popErr, "Error popping for value") + } + if _valueErr != nil { + return errors.Wrap(_valueErr, "Error serializing 'value' field") + } if popErr := writeBuffer.PopContext("ParameterValueCustomManufacturer"); popErr != nil { return errors.Wrap(popErr, "Error popping for ParameterValueCustomManufacturer") @@ -198,6 +202,7 @@ func (m *_ParameterValueCustomManufacturer) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ParameterValueCustomManufacturer) isParameterValueCustomManufacturer() bool { return true } @@ -212,3 +217,6 @@ func (m *_ParameterValueCustomManufacturer) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/ParameterValueCustomTypes.go b/plc4go/protocols/cbus/readwrite/model/ParameterValueCustomTypes.go index 5d790d5bdde..7076e9c4340 100644 --- a/plc4go/protocols/cbus/readwrite/model/ParameterValueCustomTypes.go +++ b/plc4go/protocols/cbus/readwrite/model/ParameterValueCustomTypes.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ParameterValueCustomTypes is the corresponding interface of ParameterValueCustomTypes type ParameterValueCustomTypes interface { @@ -46,29 +48,29 @@ type ParameterValueCustomTypesExactly interface { // _ParameterValueCustomTypes is the data-structure of this message type _ParameterValueCustomTypes struct { *_ParameterValue - Value CustomTypes + Value CustomTypes } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ParameterValueCustomTypes) GetParameterType() ParameterType { - return ParameterType_CUSTOM_TYPE -} +func (m *_ParameterValueCustomTypes) GetParameterType() ParameterType { +return ParameterType_CUSTOM_TYPE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ParameterValueCustomTypes) InitializeParent(parent ParameterValue) {} +func (m *_ParameterValueCustomTypes) InitializeParent(parent ParameterValue ) {} -func (m *_ParameterValueCustomTypes) GetParent() ParameterValue { +func (m *_ParameterValueCustomTypes) GetParent() ParameterValue { return m._ParameterValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_ParameterValueCustomTypes) GetValue() CustomTypes { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewParameterValueCustomTypes factory function for _ParameterValueCustomTypes -func NewParameterValueCustomTypes(value CustomTypes, numBytes uint8) *_ParameterValueCustomTypes { +func NewParameterValueCustomTypes( value CustomTypes , numBytes uint8 ) *_ParameterValueCustomTypes { _result := &_ParameterValueCustomTypes{ - Value: value, - _ParameterValue: NewParameterValue(numBytes), + Value: value, + _ParameterValue: NewParameterValue(numBytes), } _result._ParameterValue._ParameterValueChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewParameterValueCustomTypes(value CustomTypes, numBytes uint8) *_Parameter // Deprecated: use the interface for direct cast func CastParameterValueCustomTypes(structType interface{}) ParameterValueCustomTypes { - if casted, ok := structType.(ParameterValueCustomTypes); ok { + if casted, ok := structType.(ParameterValueCustomTypes); ok { return casted } if casted, ok := structType.(*ParameterValueCustomTypes); ok { @@ -117,6 +120,7 @@ func (m *_ParameterValueCustomTypes) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_ParameterValueCustomTypes) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func ParameterValueCustomTypesParseWithBuffer(ctx context.Context, readBuffer ut if pullErr := readBuffer.PullContext("value"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for value") } - _value, _valueErr := CustomTypesParseWithBuffer(ctx, readBuffer, uint8(numBytes)) +_value, _valueErr := CustomTypesParseWithBuffer(ctx, readBuffer , uint8( numBytes ) ) if _valueErr != nil { return nil, errors.Wrap(_valueErr, "Error parsing 'value' field of ParameterValueCustomTypes") } @@ -178,17 +182,17 @@ func (m *_ParameterValueCustomTypes) SerializeWithWriteBuffer(ctx context.Contex return errors.Wrap(pushErr, "Error pushing for ParameterValueCustomTypes") } - // Simple Field (value) - if pushErr := writeBuffer.PushContext("value"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for value") - } - _valueErr := writeBuffer.WriteSerializable(ctx, m.GetValue()) - if popErr := writeBuffer.PopContext("value"); popErr != nil { - return errors.Wrap(popErr, "Error popping for value") - } - if _valueErr != nil { - return errors.Wrap(_valueErr, "Error serializing 'value' field") - } + // Simple Field (value) + if pushErr := writeBuffer.PushContext("value"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for value") + } + _valueErr := writeBuffer.WriteSerializable(ctx, m.GetValue()) + if popErr := writeBuffer.PopContext("value"); popErr != nil { + return errors.Wrap(popErr, "Error popping for value") + } + if _valueErr != nil { + return errors.Wrap(_valueErr, "Error serializing 'value' field") + } if popErr := writeBuffer.PopContext("ParameterValueCustomTypes"); popErr != nil { return errors.Wrap(popErr, "Error popping for ParameterValueCustomTypes") @@ -198,6 +202,7 @@ func (m *_ParameterValueCustomTypes) SerializeWithWriteBuffer(ctx context.Contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ParameterValueCustomTypes) isParameterValueCustomTypes() bool { return true } @@ -212,3 +217,6 @@ func (m *_ParameterValueCustomTypes) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/ParameterValueInterfaceOptions1.go b/plc4go/protocols/cbus/readwrite/model/ParameterValueInterfaceOptions1.go index 39ec0568e18..6d42fee54ff 100644 --- a/plc4go/protocols/cbus/readwrite/model/ParameterValueInterfaceOptions1.go +++ b/plc4go/protocols/cbus/readwrite/model/ParameterValueInterfaceOptions1.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ParameterValueInterfaceOptions1 is the corresponding interface of ParameterValueInterfaceOptions1 type ParameterValueInterfaceOptions1 interface { @@ -48,30 +50,30 @@ type ParameterValueInterfaceOptions1Exactly interface { // _ParameterValueInterfaceOptions1 is the data-structure of this message type _ParameterValueInterfaceOptions1 struct { *_ParameterValue - Value InterfaceOptions1 - Data []byte + Value InterfaceOptions1 + Data []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ParameterValueInterfaceOptions1) GetParameterType() ParameterType { - return ParameterType_INTERFACE_OPTIONS_1 -} +func (m *_ParameterValueInterfaceOptions1) GetParameterType() ParameterType { +return ParameterType_INTERFACE_OPTIONS_1} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ParameterValueInterfaceOptions1) InitializeParent(parent ParameterValue) {} +func (m *_ParameterValueInterfaceOptions1) InitializeParent(parent ParameterValue ) {} -func (m *_ParameterValueInterfaceOptions1) GetParent() ParameterValue { +func (m *_ParameterValueInterfaceOptions1) GetParent() ParameterValue { return m._ParameterValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_ParameterValueInterfaceOptions1) GetData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewParameterValueInterfaceOptions1 factory function for _ParameterValueInterfaceOptions1 -func NewParameterValueInterfaceOptions1(value InterfaceOptions1, data []byte, numBytes uint8) *_ParameterValueInterfaceOptions1 { +func NewParameterValueInterfaceOptions1( value InterfaceOptions1 , data []byte , numBytes uint8 ) *_ParameterValueInterfaceOptions1 { _result := &_ParameterValueInterfaceOptions1{ - Value: value, - Data: data, - _ParameterValue: NewParameterValue(numBytes), + Value: value, + Data: data, + _ParameterValue: NewParameterValue(numBytes), } _result._ParameterValue._ParameterValueChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewParameterValueInterfaceOptions1(value InterfaceOptions1, data []byte, nu // Deprecated: use the interface for direct cast func CastParameterValueInterfaceOptions1(structType interface{}) ParameterValueInterfaceOptions1 { - if casted, ok := structType.(ParameterValueInterfaceOptions1); ok { + if casted, ok := structType.(ParameterValueInterfaceOptions1); ok { return casted } if casted, ok := structType.(*ParameterValueInterfaceOptions1); ok { @@ -130,6 +133,7 @@ func (m *_ParameterValueInterfaceOptions1) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_ParameterValueInterfaceOptions1) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -148,7 +152,7 @@ func ParameterValueInterfaceOptions1ParseWithBuffer(ctx context.Context, readBuf _ = currentPos // Validation - if !(bool((numBytes) >= (1))) { + if (!(bool((numBytes) >= ((1))))) { return nil, errors.WithStack(utils.ParseValidationError{"InterfaceOptions1 has exactly one byte"}) } @@ -156,7 +160,7 @@ func ParameterValueInterfaceOptions1ParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("value"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for value") } - _value, _valueErr := InterfaceOptions1ParseWithBuffer(ctx, readBuffer) +_value, _valueErr := InterfaceOptions1ParseWithBuffer(ctx, readBuffer) if _valueErr != nil { return nil, errors.Wrap(_valueErr, "Error parsing 'value' field of ParameterValueInterfaceOptions1") } @@ -181,7 +185,7 @@ func ParameterValueInterfaceOptions1ParseWithBuffer(ctx context.Context, readBuf NumBytes: numBytes, }, Value: value, - Data: data, + Data: data, } _child._ParameterValue._ParameterValueChildRequirements = _child return _child, nil @@ -203,23 +207,23 @@ func (m *_ParameterValueInterfaceOptions1) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for ParameterValueInterfaceOptions1") } - // Simple Field (value) - if pushErr := writeBuffer.PushContext("value"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for value") - } - _valueErr := writeBuffer.WriteSerializable(ctx, m.GetValue()) - if popErr := writeBuffer.PopContext("value"); popErr != nil { - return errors.Wrap(popErr, "Error popping for value") - } - if _valueErr != nil { - return errors.Wrap(_valueErr, "Error serializing 'value' field") - } + // Simple Field (value) + if pushErr := writeBuffer.PushContext("value"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for value") + } + _valueErr := writeBuffer.WriteSerializable(ctx, m.GetValue()) + if popErr := writeBuffer.PopContext("value"); popErr != nil { + return errors.Wrap(popErr, "Error popping for value") + } + if _valueErr != nil { + return errors.Wrap(_valueErr, "Error serializing 'value' field") + } - // Array Field (data) - // Byte Array field (data) - if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { - return errors.Wrap(err, "Error serializing 'data' field") - } + // Array Field (data) + // Byte Array field (data) + if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { + return errors.Wrap(err, "Error serializing 'data' field") + } if popErr := writeBuffer.PopContext("ParameterValueInterfaceOptions1"); popErr != nil { return errors.Wrap(popErr, "Error popping for ParameterValueInterfaceOptions1") @@ -229,6 +233,7 @@ func (m *_ParameterValueInterfaceOptions1) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ParameterValueInterfaceOptions1) isParameterValueInterfaceOptions1() bool { return true } @@ -243,3 +248,6 @@ func (m *_ParameterValueInterfaceOptions1) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/ParameterValueInterfaceOptions1PowerUpSettings.go b/plc4go/protocols/cbus/readwrite/model/ParameterValueInterfaceOptions1PowerUpSettings.go index 7bf66b55143..ab5243ed58a 100644 --- a/plc4go/protocols/cbus/readwrite/model/ParameterValueInterfaceOptions1PowerUpSettings.go +++ b/plc4go/protocols/cbus/readwrite/model/ParameterValueInterfaceOptions1PowerUpSettings.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ParameterValueInterfaceOptions1PowerUpSettings is the corresponding interface of ParameterValueInterfaceOptions1PowerUpSettings type ParameterValueInterfaceOptions1PowerUpSettings interface { @@ -46,29 +48,29 @@ type ParameterValueInterfaceOptions1PowerUpSettingsExactly interface { // _ParameterValueInterfaceOptions1PowerUpSettings is the data-structure of this message type _ParameterValueInterfaceOptions1PowerUpSettings struct { *_ParameterValue - Value InterfaceOptions1PowerUpSettings + Value InterfaceOptions1PowerUpSettings } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ParameterValueInterfaceOptions1PowerUpSettings) GetParameterType() ParameterType { - return ParameterType_INTERFACE_OPTIONS_1_POWER_UP_SETTINGS -} +func (m *_ParameterValueInterfaceOptions1PowerUpSettings) GetParameterType() ParameterType { +return ParameterType_INTERFACE_OPTIONS_1_POWER_UP_SETTINGS} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ParameterValueInterfaceOptions1PowerUpSettings) InitializeParent(parent ParameterValue) {} +func (m *_ParameterValueInterfaceOptions1PowerUpSettings) InitializeParent(parent ParameterValue ) {} -func (m *_ParameterValueInterfaceOptions1PowerUpSettings) GetParent() ParameterValue { +func (m *_ParameterValueInterfaceOptions1PowerUpSettings) GetParent() ParameterValue { return m._ParameterValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_ParameterValueInterfaceOptions1PowerUpSettings) GetValue() InterfaceOp /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewParameterValueInterfaceOptions1PowerUpSettings factory function for _ParameterValueInterfaceOptions1PowerUpSettings -func NewParameterValueInterfaceOptions1PowerUpSettings(value InterfaceOptions1PowerUpSettings, numBytes uint8) *_ParameterValueInterfaceOptions1PowerUpSettings { +func NewParameterValueInterfaceOptions1PowerUpSettings( value InterfaceOptions1PowerUpSettings , numBytes uint8 ) *_ParameterValueInterfaceOptions1PowerUpSettings { _result := &_ParameterValueInterfaceOptions1PowerUpSettings{ - Value: value, - _ParameterValue: NewParameterValue(numBytes), + Value: value, + _ParameterValue: NewParameterValue(numBytes), } _result._ParameterValue._ParameterValueChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewParameterValueInterfaceOptions1PowerUpSettings(value InterfaceOptions1Po // Deprecated: use the interface for direct cast func CastParameterValueInterfaceOptions1PowerUpSettings(structType interface{}) ParameterValueInterfaceOptions1PowerUpSettings { - if casted, ok := structType.(ParameterValueInterfaceOptions1PowerUpSettings); ok { + if casted, ok := structType.(ParameterValueInterfaceOptions1PowerUpSettings); ok { return casted } if casted, ok := structType.(*ParameterValueInterfaceOptions1PowerUpSettings); ok { @@ -117,6 +120,7 @@ func (m *_ParameterValueInterfaceOptions1PowerUpSettings) GetLengthInBits(ctx co return lengthInBits } + func (m *_ParameterValueInterfaceOptions1PowerUpSettings) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -135,7 +139,7 @@ func ParameterValueInterfaceOptions1PowerUpSettingsParseWithBuffer(ctx context.C _ = currentPos // Validation - if !(bool((numBytes) >= (1))) { + if (!(bool((numBytes) >= ((1))))) { return nil, errors.WithStack(utils.ParseValidationError{"InterfaceOptions1PowerUpSettings has exactly one byte"}) } @@ -143,7 +147,7 @@ func ParameterValueInterfaceOptions1PowerUpSettingsParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("value"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for value") } - _value, _valueErr := InterfaceOptions1PowerUpSettingsParseWithBuffer(ctx, readBuffer) +_value, _valueErr := InterfaceOptions1PowerUpSettingsParseWithBuffer(ctx, readBuffer) if _valueErr != nil { return nil, errors.Wrap(_valueErr, "Error parsing 'value' field of ParameterValueInterfaceOptions1PowerUpSettings") } @@ -183,17 +187,17 @@ func (m *_ParameterValueInterfaceOptions1PowerUpSettings) SerializeWithWriteBuff return errors.Wrap(pushErr, "Error pushing for ParameterValueInterfaceOptions1PowerUpSettings") } - // Simple Field (value) - if pushErr := writeBuffer.PushContext("value"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for value") - } - _valueErr := writeBuffer.WriteSerializable(ctx, m.GetValue()) - if popErr := writeBuffer.PopContext("value"); popErr != nil { - return errors.Wrap(popErr, "Error popping for value") - } - if _valueErr != nil { - return errors.Wrap(_valueErr, "Error serializing 'value' field") - } + // Simple Field (value) + if pushErr := writeBuffer.PushContext("value"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for value") + } + _valueErr := writeBuffer.WriteSerializable(ctx, m.GetValue()) + if popErr := writeBuffer.PopContext("value"); popErr != nil { + return errors.Wrap(popErr, "Error popping for value") + } + if _valueErr != nil { + return errors.Wrap(_valueErr, "Error serializing 'value' field") + } if popErr := writeBuffer.PopContext("ParameterValueInterfaceOptions1PowerUpSettings"); popErr != nil { return errors.Wrap(popErr, "Error popping for ParameterValueInterfaceOptions1PowerUpSettings") @@ -203,6 +207,7 @@ func (m *_ParameterValueInterfaceOptions1PowerUpSettings) SerializeWithWriteBuff return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ParameterValueInterfaceOptions1PowerUpSettings) isParameterValueInterfaceOptions1PowerUpSettings() bool { return true } @@ -217,3 +222,6 @@ func (m *_ParameterValueInterfaceOptions1PowerUpSettings) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/ParameterValueInterfaceOptions2.go b/plc4go/protocols/cbus/readwrite/model/ParameterValueInterfaceOptions2.go index 1d962261826..764e8784f8e 100644 --- a/plc4go/protocols/cbus/readwrite/model/ParameterValueInterfaceOptions2.go +++ b/plc4go/protocols/cbus/readwrite/model/ParameterValueInterfaceOptions2.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ParameterValueInterfaceOptions2 is the corresponding interface of ParameterValueInterfaceOptions2 type ParameterValueInterfaceOptions2 interface { @@ -48,30 +50,30 @@ type ParameterValueInterfaceOptions2Exactly interface { // _ParameterValueInterfaceOptions2 is the data-structure of this message type _ParameterValueInterfaceOptions2 struct { *_ParameterValue - Value InterfaceOptions2 - Data []byte + Value InterfaceOptions2 + Data []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ParameterValueInterfaceOptions2) GetParameterType() ParameterType { - return ParameterType_INTERFACE_OPTIONS_2 -} +func (m *_ParameterValueInterfaceOptions2) GetParameterType() ParameterType { +return ParameterType_INTERFACE_OPTIONS_2} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ParameterValueInterfaceOptions2) InitializeParent(parent ParameterValue) {} +func (m *_ParameterValueInterfaceOptions2) InitializeParent(parent ParameterValue ) {} -func (m *_ParameterValueInterfaceOptions2) GetParent() ParameterValue { +func (m *_ParameterValueInterfaceOptions2) GetParent() ParameterValue { return m._ParameterValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_ParameterValueInterfaceOptions2) GetData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewParameterValueInterfaceOptions2 factory function for _ParameterValueInterfaceOptions2 -func NewParameterValueInterfaceOptions2(value InterfaceOptions2, data []byte, numBytes uint8) *_ParameterValueInterfaceOptions2 { +func NewParameterValueInterfaceOptions2( value InterfaceOptions2 , data []byte , numBytes uint8 ) *_ParameterValueInterfaceOptions2 { _result := &_ParameterValueInterfaceOptions2{ - Value: value, - Data: data, - _ParameterValue: NewParameterValue(numBytes), + Value: value, + Data: data, + _ParameterValue: NewParameterValue(numBytes), } _result._ParameterValue._ParameterValueChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewParameterValueInterfaceOptions2(value InterfaceOptions2, data []byte, nu // Deprecated: use the interface for direct cast func CastParameterValueInterfaceOptions2(structType interface{}) ParameterValueInterfaceOptions2 { - if casted, ok := structType.(ParameterValueInterfaceOptions2); ok { + if casted, ok := structType.(ParameterValueInterfaceOptions2); ok { return casted } if casted, ok := structType.(*ParameterValueInterfaceOptions2); ok { @@ -130,6 +133,7 @@ func (m *_ParameterValueInterfaceOptions2) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_ParameterValueInterfaceOptions2) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -148,7 +152,7 @@ func ParameterValueInterfaceOptions2ParseWithBuffer(ctx context.Context, readBuf _ = currentPos // Validation - if !(bool((numBytes) >= (1))) { + if (!(bool((numBytes) >= ((1))))) { return nil, errors.WithStack(utils.ParseValidationError{"InterfaceOptions2 has exactly one byte"}) } @@ -156,7 +160,7 @@ func ParameterValueInterfaceOptions2ParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("value"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for value") } - _value, _valueErr := InterfaceOptions2ParseWithBuffer(ctx, readBuffer) +_value, _valueErr := InterfaceOptions2ParseWithBuffer(ctx, readBuffer) if _valueErr != nil { return nil, errors.Wrap(_valueErr, "Error parsing 'value' field of ParameterValueInterfaceOptions2") } @@ -181,7 +185,7 @@ func ParameterValueInterfaceOptions2ParseWithBuffer(ctx context.Context, readBuf NumBytes: numBytes, }, Value: value, - Data: data, + Data: data, } _child._ParameterValue._ParameterValueChildRequirements = _child return _child, nil @@ -203,23 +207,23 @@ func (m *_ParameterValueInterfaceOptions2) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for ParameterValueInterfaceOptions2") } - // Simple Field (value) - if pushErr := writeBuffer.PushContext("value"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for value") - } - _valueErr := writeBuffer.WriteSerializable(ctx, m.GetValue()) - if popErr := writeBuffer.PopContext("value"); popErr != nil { - return errors.Wrap(popErr, "Error popping for value") - } - if _valueErr != nil { - return errors.Wrap(_valueErr, "Error serializing 'value' field") - } + // Simple Field (value) + if pushErr := writeBuffer.PushContext("value"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for value") + } + _valueErr := writeBuffer.WriteSerializable(ctx, m.GetValue()) + if popErr := writeBuffer.PopContext("value"); popErr != nil { + return errors.Wrap(popErr, "Error popping for value") + } + if _valueErr != nil { + return errors.Wrap(_valueErr, "Error serializing 'value' field") + } - // Array Field (data) - // Byte Array field (data) - if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { - return errors.Wrap(err, "Error serializing 'data' field") - } + // Array Field (data) + // Byte Array field (data) + if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { + return errors.Wrap(err, "Error serializing 'data' field") + } if popErr := writeBuffer.PopContext("ParameterValueInterfaceOptions2"); popErr != nil { return errors.Wrap(popErr, "Error popping for ParameterValueInterfaceOptions2") @@ -229,6 +233,7 @@ func (m *_ParameterValueInterfaceOptions2) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ParameterValueInterfaceOptions2) isParameterValueInterfaceOptions2() bool { return true } @@ -243,3 +248,6 @@ func (m *_ParameterValueInterfaceOptions2) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/ParameterValueInterfaceOptions3.go b/plc4go/protocols/cbus/readwrite/model/ParameterValueInterfaceOptions3.go index f147ba6f931..6a618175378 100644 --- a/plc4go/protocols/cbus/readwrite/model/ParameterValueInterfaceOptions3.go +++ b/plc4go/protocols/cbus/readwrite/model/ParameterValueInterfaceOptions3.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ParameterValueInterfaceOptions3 is the corresponding interface of ParameterValueInterfaceOptions3 type ParameterValueInterfaceOptions3 interface { @@ -48,30 +50,30 @@ type ParameterValueInterfaceOptions3Exactly interface { // _ParameterValueInterfaceOptions3 is the data-structure of this message type _ParameterValueInterfaceOptions3 struct { *_ParameterValue - Value InterfaceOptions3 - Data []byte + Value InterfaceOptions3 + Data []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ParameterValueInterfaceOptions3) GetParameterType() ParameterType { - return ParameterType_INTERFACE_OPTIONS_3 -} +func (m *_ParameterValueInterfaceOptions3) GetParameterType() ParameterType { +return ParameterType_INTERFACE_OPTIONS_3} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ParameterValueInterfaceOptions3) InitializeParent(parent ParameterValue) {} +func (m *_ParameterValueInterfaceOptions3) InitializeParent(parent ParameterValue ) {} -func (m *_ParameterValueInterfaceOptions3) GetParent() ParameterValue { +func (m *_ParameterValueInterfaceOptions3) GetParent() ParameterValue { return m._ParameterValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_ParameterValueInterfaceOptions3) GetData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewParameterValueInterfaceOptions3 factory function for _ParameterValueInterfaceOptions3 -func NewParameterValueInterfaceOptions3(value InterfaceOptions3, data []byte, numBytes uint8) *_ParameterValueInterfaceOptions3 { +func NewParameterValueInterfaceOptions3( value InterfaceOptions3 , data []byte , numBytes uint8 ) *_ParameterValueInterfaceOptions3 { _result := &_ParameterValueInterfaceOptions3{ - Value: value, - Data: data, - _ParameterValue: NewParameterValue(numBytes), + Value: value, + Data: data, + _ParameterValue: NewParameterValue(numBytes), } _result._ParameterValue._ParameterValueChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewParameterValueInterfaceOptions3(value InterfaceOptions3, data []byte, nu // Deprecated: use the interface for direct cast func CastParameterValueInterfaceOptions3(structType interface{}) ParameterValueInterfaceOptions3 { - if casted, ok := structType.(ParameterValueInterfaceOptions3); ok { + if casted, ok := structType.(ParameterValueInterfaceOptions3); ok { return casted } if casted, ok := structType.(*ParameterValueInterfaceOptions3); ok { @@ -130,6 +133,7 @@ func (m *_ParameterValueInterfaceOptions3) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_ParameterValueInterfaceOptions3) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -148,7 +152,7 @@ func ParameterValueInterfaceOptions3ParseWithBuffer(ctx context.Context, readBuf _ = currentPos // Validation - if !(bool((numBytes) >= (1))) { + if (!(bool((numBytes) >= ((1))))) { return nil, errors.WithStack(utils.ParseValidationError{"InterfaceOptions3 has exactly one byte"}) } @@ -156,7 +160,7 @@ func ParameterValueInterfaceOptions3ParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("value"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for value") } - _value, _valueErr := InterfaceOptions3ParseWithBuffer(ctx, readBuffer) +_value, _valueErr := InterfaceOptions3ParseWithBuffer(ctx, readBuffer) if _valueErr != nil { return nil, errors.Wrap(_valueErr, "Error parsing 'value' field of ParameterValueInterfaceOptions3") } @@ -181,7 +185,7 @@ func ParameterValueInterfaceOptions3ParseWithBuffer(ctx context.Context, readBuf NumBytes: numBytes, }, Value: value, - Data: data, + Data: data, } _child._ParameterValue._ParameterValueChildRequirements = _child return _child, nil @@ -203,23 +207,23 @@ func (m *_ParameterValueInterfaceOptions3) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for ParameterValueInterfaceOptions3") } - // Simple Field (value) - if pushErr := writeBuffer.PushContext("value"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for value") - } - _valueErr := writeBuffer.WriteSerializable(ctx, m.GetValue()) - if popErr := writeBuffer.PopContext("value"); popErr != nil { - return errors.Wrap(popErr, "Error popping for value") - } - if _valueErr != nil { - return errors.Wrap(_valueErr, "Error serializing 'value' field") - } + // Simple Field (value) + if pushErr := writeBuffer.PushContext("value"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for value") + } + _valueErr := writeBuffer.WriteSerializable(ctx, m.GetValue()) + if popErr := writeBuffer.PopContext("value"); popErr != nil { + return errors.Wrap(popErr, "Error popping for value") + } + if _valueErr != nil { + return errors.Wrap(_valueErr, "Error serializing 'value' field") + } - // Array Field (data) - // Byte Array field (data) - if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { - return errors.Wrap(err, "Error serializing 'data' field") - } + // Array Field (data) + // Byte Array field (data) + if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { + return errors.Wrap(err, "Error serializing 'data' field") + } if popErr := writeBuffer.PopContext("ParameterValueInterfaceOptions3"); popErr != nil { return errors.Wrap(popErr, "Error popping for ParameterValueInterfaceOptions3") @@ -229,6 +233,7 @@ func (m *_ParameterValueInterfaceOptions3) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ParameterValueInterfaceOptions3) isParameterValueInterfaceOptions3() bool { return true } @@ -243,3 +248,6 @@ func (m *_ParameterValueInterfaceOptions3) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/ParameterValueRaw.go b/plc4go/protocols/cbus/readwrite/model/ParameterValueRaw.go index b36093e5126..f32c7168d50 100644 --- a/plc4go/protocols/cbus/readwrite/model/ParameterValueRaw.go +++ b/plc4go/protocols/cbus/readwrite/model/ParameterValueRaw.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ParameterValueRaw is the corresponding interface of ParameterValueRaw type ParameterValueRaw interface { @@ -46,29 +48,29 @@ type ParameterValueRawExactly interface { // _ParameterValueRaw is the data-structure of this message type _ParameterValueRaw struct { *_ParameterValue - Data []byte + Data []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ParameterValueRaw) GetParameterType() ParameterType { - return 0 -} +func (m *_ParameterValueRaw) GetParameterType() ParameterType { +return 0} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ParameterValueRaw) InitializeParent(parent ParameterValue) {} +func (m *_ParameterValueRaw) InitializeParent(parent ParameterValue ) {} -func (m *_ParameterValueRaw) GetParent() ParameterValue { +func (m *_ParameterValueRaw) GetParent() ParameterValue { return m._ParameterValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_ParameterValueRaw) GetData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewParameterValueRaw factory function for _ParameterValueRaw -func NewParameterValueRaw(data []byte, numBytes uint8) *_ParameterValueRaw { +func NewParameterValueRaw( data []byte , numBytes uint8 ) *_ParameterValueRaw { _result := &_ParameterValueRaw{ - Data: data, - _ParameterValue: NewParameterValue(numBytes), + Data: data, + _ParameterValue: NewParameterValue(numBytes), } _result._ParameterValue._ParameterValueChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewParameterValueRaw(data []byte, numBytes uint8) *_ParameterValueRaw { // Deprecated: use the interface for direct cast func CastParameterValueRaw(structType interface{}) ParameterValueRaw { - if casted, ok := structType.(ParameterValueRaw); ok { + if casted, ok := structType.(ParameterValueRaw); ok { return casted } if casted, ok := structType.(*ParameterValueRaw); ok { @@ -119,6 +122,7 @@ func (m *_ParameterValueRaw) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_ParameterValueRaw) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -173,11 +177,11 @@ func (m *_ParameterValueRaw) SerializeWithWriteBuffer(ctx context.Context, write return errors.Wrap(pushErr, "Error pushing for ParameterValueRaw") } - // Array Field (data) - // Byte Array field (data) - if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { - return errors.Wrap(err, "Error serializing 'data' field") - } + // Array Field (data) + // Byte Array field (data) + if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { + return errors.Wrap(err, "Error serializing 'data' field") + } if popErr := writeBuffer.PopContext("ParameterValueRaw"); popErr != nil { return errors.Wrap(popErr, "Error popping for ParameterValueRaw") @@ -187,6 +191,7 @@ func (m *_ParameterValueRaw) SerializeWithWriteBuffer(ctx context.Context, write return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ParameterValueRaw) isParameterValueRaw() bool { return true } @@ -201,3 +206,6 @@ func (m *_ParameterValueRaw) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/ParameterValueSerialNumber.go b/plc4go/protocols/cbus/readwrite/model/ParameterValueSerialNumber.go index 300f9401299..dff6bb4b0c3 100644 --- a/plc4go/protocols/cbus/readwrite/model/ParameterValueSerialNumber.go +++ b/plc4go/protocols/cbus/readwrite/model/ParameterValueSerialNumber.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ParameterValueSerialNumber is the corresponding interface of ParameterValueSerialNumber type ParameterValueSerialNumber interface { @@ -48,30 +50,30 @@ type ParameterValueSerialNumberExactly interface { // _ParameterValueSerialNumber is the data-structure of this message type _ParameterValueSerialNumber struct { *_ParameterValue - Value SerialNumber - Data []byte + Value SerialNumber + Data []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ParameterValueSerialNumber) GetParameterType() ParameterType { - return ParameterType_SERIAL_NUMBER -} +func (m *_ParameterValueSerialNumber) GetParameterType() ParameterType { +return ParameterType_SERIAL_NUMBER} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ParameterValueSerialNumber) InitializeParent(parent ParameterValue) {} +func (m *_ParameterValueSerialNumber) InitializeParent(parent ParameterValue ) {} -func (m *_ParameterValueSerialNumber) GetParent() ParameterValue { +func (m *_ParameterValueSerialNumber) GetParent() ParameterValue { return m._ParameterValue } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_ParameterValueSerialNumber) GetData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewParameterValueSerialNumber factory function for _ParameterValueSerialNumber -func NewParameterValueSerialNumber(value SerialNumber, data []byte, numBytes uint8) *_ParameterValueSerialNumber { +func NewParameterValueSerialNumber( value SerialNumber , data []byte , numBytes uint8 ) *_ParameterValueSerialNumber { _result := &_ParameterValueSerialNumber{ - Value: value, - Data: data, - _ParameterValue: NewParameterValue(numBytes), + Value: value, + Data: data, + _ParameterValue: NewParameterValue(numBytes), } _result._ParameterValue._ParameterValueChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewParameterValueSerialNumber(value SerialNumber, data []byte, numBytes uin // Deprecated: use the interface for direct cast func CastParameterValueSerialNumber(structType interface{}) ParameterValueSerialNumber { - if casted, ok := structType.(ParameterValueSerialNumber); ok { + if casted, ok := structType.(ParameterValueSerialNumber); ok { return casted } if casted, ok := structType.(*ParameterValueSerialNumber); ok { @@ -130,6 +133,7 @@ func (m *_ParameterValueSerialNumber) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_ParameterValueSerialNumber) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -148,7 +152,7 @@ func ParameterValueSerialNumberParseWithBuffer(ctx context.Context, readBuffer u _ = currentPos // Validation - if !(bool((numBytes) >= (4))) { + if (!(bool((numBytes) >= ((4))))) { return nil, errors.WithStack(utils.ParseValidationError{"SerialNumber has exactly four bytes"}) } @@ -156,7 +160,7 @@ func ParameterValueSerialNumberParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("value"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for value") } - _value, _valueErr := SerialNumberParseWithBuffer(ctx, readBuffer) +_value, _valueErr := SerialNumberParseWithBuffer(ctx, readBuffer) if _valueErr != nil { return nil, errors.Wrap(_valueErr, "Error parsing 'value' field of ParameterValueSerialNumber") } @@ -181,7 +185,7 @@ func ParameterValueSerialNumberParseWithBuffer(ctx context.Context, readBuffer u NumBytes: numBytes, }, Value: value, - Data: data, + Data: data, } _child._ParameterValue._ParameterValueChildRequirements = _child return _child, nil @@ -203,23 +207,23 @@ func (m *_ParameterValueSerialNumber) SerializeWithWriteBuffer(ctx context.Conte return errors.Wrap(pushErr, "Error pushing for ParameterValueSerialNumber") } - // Simple Field (value) - if pushErr := writeBuffer.PushContext("value"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for value") - } - _valueErr := writeBuffer.WriteSerializable(ctx, m.GetValue()) - if popErr := writeBuffer.PopContext("value"); popErr != nil { - return errors.Wrap(popErr, "Error popping for value") - } - if _valueErr != nil { - return errors.Wrap(_valueErr, "Error serializing 'value' field") - } + // Simple Field (value) + if pushErr := writeBuffer.PushContext("value"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for value") + } + _valueErr := writeBuffer.WriteSerializable(ctx, m.GetValue()) + if popErr := writeBuffer.PopContext("value"); popErr != nil { + return errors.Wrap(popErr, "Error popping for value") + } + if _valueErr != nil { + return errors.Wrap(_valueErr, "Error serializing 'value' field") + } - // Array Field (data) - // Byte Array field (data) - if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { - return errors.Wrap(err, "Error serializing 'data' field") - } + // Array Field (data) + // Byte Array field (data) + if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { + return errors.Wrap(err, "Error serializing 'data' field") + } if popErr := writeBuffer.PopContext("ParameterValueSerialNumber"); popErr != nil { return errors.Wrap(popErr, "Error popping for ParameterValueSerialNumber") @@ -229,6 +233,7 @@ func (m *_ParameterValueSerialNumber) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ParameterValueSerialNumber) isParameterValueSerialNumber() bool { return true } @@ -243,3 +248,6 @@ func (m *_ParameterValueSerialNumber) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/PowerUp.go b/plc4go/protocols/cbus/readwrite/model/PowerUp.go index 92a66816508..40ad9f345c9 100644 --- a/plc4go/protocols/cbus/readwrite/model/PowerUp.go +++ b/plc4go/protocols/cbus/readwrite/model/PowerUp.go @@ -19,6 +19,7 @@ package model + import ( "context" "fmt" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const PowerUp_POWERUPINDICATOR1 byte = 0x2B @@ -49,6 +51,7 @@ type PowerUpExactly interface { type _PowerUp struct { } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for const fields. @@ -67,14 +70,15 @@ func (m *_PowerUp) GetPowerUpIndicator2() byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewPowerUp factory function for _PowerUp -func NewPowerUp() *_PowerUp { - return &_PowerUp{} +func NewPowerUp( ) *_PowerUp { +return &_PowerUp{ } } // Deprecated: use the interface for direct cast func CastPowerUp(structType interface{}) PowerUp { - if casted, ok := structType.(PowerUp); ok { + if casted, ok := structType.(PowerUp); ok { return casted } if casted, ok := structType.(*PowerUp); ok { @@ -99,6 +103,7 @@ func (m *_PowerUp) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_PowerUp) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +144,8 @@ func PowerUpParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) (P } // Create the instance - return &_PowerUp{}, nil + return &_PowerUp{ + }, nil } func (m *_PowerUp) Serialize() ([]byte, error) { @@ -153,7 +159,7 @@ func (m *_PowerUp) Serialize() ([]byte, error) { func (m *_PowerUp) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("PowerUp"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("PowerUp"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for PowerUp") } @@ -175,6 +181,7 @@ func (m *_PowerUp) SerializeWithWriteBuffer(ctx context.Context, writeBuffer uti return nil } + func (m *_PowerUp) isPowerUp() bool { return true } @@ -189,3 +196,6 @@ func (m *_PowerUp) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/PowerUpReply.go b/plc4go/protocols/cbus/readwrite/model/PowerUpReply.go index ea43e37b931..b4310f0ad16 100644 --- a/plc4go/protocols/cbus/readwrite/model/PowerUpReply.go +++ b/plc4go/protocols/cbus/readwrite/model/PowerUpReply.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // PowerUpReply is the corresponding interface of PowerUpReply type PowerUpReply interface { @@ -46,9 +48,11 @@ type PowerUpReplyExactly interface { // _PowerUpReply is the data-structure of this message type _PowerUpReply struct { *_Reply - PowerUpIndicator PowerUp + PowerUpIndicator PowerUp } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,14 +63,12 @@ type _PowerUpReply struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_PowerUpReply) InitializeParent(parent Reply, peekedByte byte) { - m.PeekedByte = peekedByte +func (m *_PowerUpReply) InitializeParent(parent Reply , peekedByte byte ) { m.PeekedByte = peekedByte } -func (m *_PowerUpReply) GetParent() Reply { +func (m *_PowerUpReply) GetParent() Reply { return m._Reply } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,11 +83,12 @@ func (m *_PowerUpReply) GetPowerUpIndicator() PowerUp { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewPowerUpReply factory function for _PowerUpReply -func NewPowerUpReply(powerUpIndicator PowerUp, peekedByte byte, cBusOptions CBusOptions, requestContext RequestContext) *_PowerUpReply { +func NewPowerUpReply( powerUpIndicator PowerUp , peekedByte byte , cBusOptions CBusOptions , requestContext RequestContext ) *_PowerUpReply { _result := &_PowerUpReply{ PowerUpIndicator: powerUpIndicator, - _Reply: NewReply(peekedByte, cBusOptions, requestContext), + _Reply: NewReply(peekedByte, cBusOptions, requestContext), } _result._Reply._ReplyChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewPowerUpReply(powerUpIndicator PowerUp, peekedByte byte, cBusOptions CBus // Deprecated: use the interface for direct cast func CastPowerUpReply(structType interface{}) PowerUpReply { - if casted, ok := structType.(PowerUpReply); ok { + if casted, ok := structType.(PowerUpReply); ok { return casted } if casted, ok := structType.(*PowerUpReply); ok { @@ -115,6 +118,7 @@ func (m *_PowerUpReply) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_PowerUpReply) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,7 +140,7 @@ func PowerUpReplyParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe if pullErr := readBuffer.PullContext("powerUpIndicator"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for powerUpIndicator") } - _powerUpIndicator, _powerUpIndicatorErr := PowerUpParseWithBuffer(ctx, readBuffer) +_powerUpIndicator, _powerUpIndicatorErr := PowerUpParseWithBuffer(ctx, readBuffer) if _powerUpIndicatorErr != nil { return nil, errors.Wrap(_powerUpIndicatorErr, "Error parsing 'powerUpIndicator' field of PowerUpReply") } @@ -152,7 +156,7 @@ func PowerUpReplyParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe // Create a partially initialized instance _child := &_PowerUpReply{ _Reply: &_Reply{ - CBusOptions: cBusOptions, + CBusOptions: cBusOptions, RequestContext: requestContext, }, PowerUpIndicator: powerUpIndicator, @@ -177,17 +181,17 @@ func (m *_PowerUpReply) SerializeWithWriteBuffer(ctx context.Context, writeBuffe return errors.Wrap(pushErr, "Error pushing for PowerUpReply") } - // Simple Field (powerUpIndicator) - if pushErr := writeBuffer.PushContext("powerUpIndicator"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for powerUpIndicator") - } - _powerUpIndicatorErr := writeBuffer.WriteSerializable(ctx, m.GetPowerUpIndicator()) - if popErr := writeBuffer.PopContext("powerUpIndicator"); popErr != nil { - return errors.Wrap(popErr, "Error popping for powerUpIndicator") - } - if _powerUpIndicatorErr != nil { - return errors.Wrap(_powerUpIndicatorErr, "Error serializing 'powerUpIndicator' field") - } + // Simple Field (powerUpIndicator) + if pushErr := writeBuffer.PushContext("powerUpIndicator"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for powerUpIndicator") + } + _powerUpIndicatorErr := writeBuffer.WriteSerializable(ctx, m.GetPowerUpIndicator()) + if popErr := writeBuffer.PopContext("powerUpIndicator"); popErr != nil { + return errors.Wrap(popErr, "Error popping for powerUpIndicator") + } + if _powerUpIndicatorErr != nil { + return errors.Wrap(_powerUpIndicatorErr, "Error serializing 'powerUpIndicator' field") + } if popErr := writeBuffer.PopContext("PowerUpReply"); popErr != nil { return errors.Wrap(popErr, "Error popping for PowerUpReply") @@ -197,6 +201,7 @@ func (m *_PowerUpReply) SerializeWithWriteBuffer(ctx context.Context, writeBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_PowerUpReply) isPowerUpReply() bool { return true } @@ -211,3 +216,6 @@ func (m *_PowerUpReply) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/PriorityClass.go b/plc4go/protocols/cbus/readwrite/model/PriorityClass.go index 7a3d4e88ead..461b92094af 100644 --- a/plc4go/protocols/cbus/readwrite/model/PriorityClass.go +++ b/plc4go/protocols/cbus/readwrite/model/PriorityClass.go @@ -34,7 +34,7 @@ type IPriorityClass interface { utils.Serializable } -const ( +const( PriorityClass_Class4 PriorityClass = 0x00 PriorityClass_Class3 PriorityClass = 0x01 PriorityClass_Class2 PriorityClass = 0x02 @@ -45,7 +45,7 @@ var PriorityClassValues []PriorityClass func init() { _ = errors.New - PriorityClassValues = []PriorityClass{ + PriorityClassValues = []PriorityClass { PriorityClass_Class4, PriorityClass_Class3, PriorityClass_Class2, @@ -55,14 +55,14 @@ func init() { func PriorityClassByValue(value uint8) (enum PriorityClass, ok bool) { switch value { - case 0x00: - return PriorityClass_Class4, true - case 0x01: - return PriorityClass_Class3, true - case 0x02: - return PriorityClass_Class2, true - case 0x03: - return PriorityClass_Class1, true + case 0x00: + return PriorityClass_Class4, true + case 0x01: + return PriorityClass_Class3, true + case 0x02: + return PriorityClass_Class2, true + case 0x03: + return PriorityClass_Class1, true } return 0, false } @@ -81,13 +81,13 @@ func PriorityClassByName(value string) (enum PriorityClass, ok bool) { return 0, false } -func PriorityClassKnows(value uint8) bool { +func PriorityClassKnows(value uint8) bool { for _, typeValue := range PriorityClassValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastPriorityClass(structType interface{}) PriorityClass { @@ -155,3 +155,4 @@ func (e PriorityClass) PLC4XEnumName() string { func (e PriorityClass) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/ProtectionLevel.go b/plc4go/protocols/cbus/readwrite/model/ProtectionLevel.go index 721a7761047..dccb1600b3c 100644 --- a/plc4go/protocols/cbus/readwrite/model/ProtectionLevel.go +++ b/plc4go/protocols/cbus/readwrite/model/ProtectionLevel.go @@ -35,18 +35,18 @@ type IProtectionLevel interface { Description() string } -const ( +const( ProtectionLevel_UNLOCK_REQUIRED ProtectionLevel = 0 ProtectionLevel_NO_WRITE_ACCESS ProtectionLevel = 1 - ProtectionLevel_NONE ProtectionLevel = 2 - ProtectionLevel_READ_ONLY ProtectionLevel = 3 + ProtectionLevel_NONE ProtectionLevel = 2 + ProtectionLevel_READ_ONLY ProtectionLevel = 3 ) var ProtectionLevelValues []ProtectionLevel func init() { _ = errors.New - ProtectionLevelValues = []ProtectionLevel{ + ProtectionLevelValues = []ProtectionLevel { ProtectionLevel_UNLOCK_REQUIRED, ProtectionLevel_NO_WRITE_ACCESS, ProtectionLevel_NONE, @@ -54,26 +54,22 @@ func init() { } } + func (e ProtectionLevel) Description() string { - switch e { - case 0: - { /* '0' */ - return "Unlock required from C-BUS port" + switch e { + case 0: { /* '0' */ + return "Unlock required from C-BUS port" } - case 1: - { /* '1' */ - return "No write access via C-BUS port" + case 1: { /* '1' */ + return "No write access via C-BUS port" } - case 2: - { /* '2' */ - return "None" + case 2: { /* '2' */ + return "None" } - case 3: - { /* '3' */ - return "Read only" + case 3: { /* '3' */ + return "Read only" } - default: - { + default: { return "" } } @@ -89,14 +85,14 @@ func ProtectionLevelFirstEnumForFieldDescription(value string) (ProtectionLevel, } func ProtectionLevelByValue(value uint8) (enum ProtectionLevel, ok bool) { switch value { - case 0: - return ProtectionLevel_UNLOCK_REQUIRED, true - case 1: - return ProtectionLevel_NO_WRITE_ACCESS, true - case 2: - return ProtectionLevel_NONE, true - case 3: - return ProtectionLevel_READ_ONLY, true + case 0: + return ProtectionLevel_UNLOCK_REQUIRED, true + case 1: + return ProtectionLevel_NO_WRITE_ACCESS, true + case 2: + return ProtectionLevel_NONE, true + case 3: + return ProtectionLevel_READ_ONLY, true } return 0, false } @@ -115,13 +111,13 @@ func ProtectionLevelByName(value string) (enum ProtectionLevel, ok bool) { return 0, false } -func ProtectionLevelKnows(value uint8) bool { +func ProtectionLevelKnows(value uint8) bool { for _, typeValue := range ProtectionLevelValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastProtectionLevel(structType interface{}) ProtectionLevel { @@ -189,3 +185,4 @@ func (e ProtectionLevel) PLC4XEnumName() string { func (e ProtectionLevel) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/Reply.go b/plc4go/protocols/cbus/readwrite/model/Reply.go index 63f2354ac18..cce1c7806c9 100644 --- a/plc4go/protocols/cbus/readwrite/model/Reply.go +++ b/plc4go/protocols/cbus/readwrite/model/Reply.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Reply is the corresponding interface of Reply type Reply interface { @@ -45,10 +47,10 @@ type ReplyExactly interface { // _Reply is the data-structure of this message type _Reply struct { _ReplyChildRequirements - PeekedByte byte + PeekedByte byte // Arguments. - CBusOptions CBusOptions + CBusOptions CBusOptions RequestContext RequestContext } @@ -57,6 +59,7 @@ type _ReplyChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type ReplyParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child Reply, serializeChildFunction func() error) error GetTypeName() string @@ -64,13 +67,12 @@ type ReplyParent interface { type ReplyChild interface { utils.Serializable - InitializeParent(parent Reply, peekedByte byte) +InitializeParent(parent Reply , peekedByte byte ) GetParent() *Reply GetTypeName() string Reply } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -85,14 +87,15 @@ func (m *_Reply) GetPeekedByte() byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewReply factory function for _Reply -func NewReply(peekedByte byte, cBusOptions CBusOptions, requestContext RequestContext) *_Reply { - return &_Reply{PeekedByte: peekedByte, CBusOptions: cBusOptions, RequestContext: requestContext} +func NewReply( peekedByte byte , cBusOptions CBusOptions , requestContext RequestContext ) *_Reply { +return &_Reply{ PeekedByte: peekedByte , CBusOptions: cBusOptions , RequestContext: requestContext } } // Deprecated: use the interface for direct cast func CastReply(structType interface{}) Reply { - if casted, ok := structType.(Reply); ok { + if casted, ok := structType.(Reply); ok { return casted } if casted, ok := structType.(*Reply); ok { @@ -105,6 +108,7 @@ func (m *_Reply) GetTypeName() string { return "Reply" } + func (m *_Reply) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -128,30 +132,30 @@ func ReplyParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, cBus currentPos := positionAware.GetPos() _ = currentPos - // Peek Field (peekedByte) - currentPos = positionAware.GetPos() - peekedByte, _err := readBuffer.ReadByte("peekedByte") - if _err != nil { - return nil, errors.Wrap(_err, "Error parsing 'peekedByte' field of Reply") - } + // Peek Field (peekedByte) + currentPos = positionAware.GetPos() + peekedByte, _err := readBuffer.ReadByte("peekedByte") + if _err != nil { + return nil, errors.Wrap(_err, "Error parsing 'peekedByte' field of Reply") + } - readBuffer.Reset(currentPos) + readBuffer.Reset(currentPos) // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type ReplyChildSerializeRequirement interface { Reply - InitializeParent(Reply, byte) + InitializeParent(Reply, byte) GetParent() Reply } var _childTemp interface{} var _child ReplyChildSerializeRequirement var typeSwitchError error switch { - case peekedByte == 0x2B: // PowerUpReply +case peekedByte == 0x2B : // PowerUpReply _childTemp, typeSwitchError = PowerUpReplyParseWithBuffer(ctx, readBuffer, cBusOptions, requestContext) - case peekedByte == 0x3D: // ParameterChangeReply +case peekedByte == 0x3D : // ParameterChangeReply _childTemp, typeSwitchError = ParameterChangeReplyParseWithBuffer(ctx, readBuffer, cBusOptions, requestContext) - case 0 == 0: // ReplyEncodedReply +case 0==0 : // ReplyEncodedReply _childTemp, typeSwitchError = ReplyEncodedReplyParseWithBuffer(ctx, readBuffer, cBusOptions, requestContext) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [peekedByte=%v]", peekedByte) @@ -166,7 +170,7 @@ func ReplyParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, cBus } // Finish initializing - _child.InitializeParent(_child, peekedByte) +_child.InitializeParent(_child , peekedByte ) return _child, nil } @@ -176,7 +180,7 @@ func (pm *_Reply) SerializeParent(ctx context.Context, writeBuffer utils.WriteBu _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("Reply"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("Reply"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for Reply") } @@ -191,6 +195,7 @@ func (pm *_Reply) SerializeParent(ctx context.Context, writeBuffer utils.WriteBu return nil } + //// // Arguments Getter @@ -200,7 +205,6 @@ func (m *_Reply) GetCBusOptions() CBusOptions { func (m *_Reply) GetRequestContext() RequestContext { return m.RequestContext } - // //// @@ -218,3 +222,6 @@ func (m *_Reply) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/ReplyEncodedReply.go b/plc4go/protocols/cbus/readwrite/model/ReplyEncodedReply.go index 2d7a2019e35..33c1078b9e4 100644 --- a/plc4go/protocols/cbus/readwrite/model/ReplyEncodedReply.go +++ b/plc4go/protocols/cbus/readwrite/model/ReplyEncodedReply.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ReplyEncodedReply is the corresponding interface of ReplyEncodedReply type ReplyEncodedReply interface { @@ -52,10 +54,12 @@ type ReplyEncodedReplyExactly interface { // _ReplyEncodedReply is the data-structure of this message type _ReplyEncodedReply struct { *_Reply - EncodedReply EncodedReply - Chksum Checksum + EncodedReply EncodedReply + Chksum Checksum } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -66,14 +70,12 @@ type _ReplyEncodedReply struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ReplyEncodedReply) InitializeParent(parent Reply, peekedByte byte) { - m.PeekedByte = peekedByte +func (m *_ReplyEncodedReply) InitializeParent(parent Reply , peekedByte byte ) { m.PeekedByte = peekedByte } -func (m *_ReplyEncodedReply) GetParent() Reply { +func (m *_ReplyEncodedReply) GetParent() Reply { return m._Reply } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -113,12 +115,13 @@ func (m *_ReplyEncodedReply) GetChksumDecoded() Checksum { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewReplyEncodedReply factory function for _ReplyEncodedReply -func NewReplyEncodedReply(encodedReply EncodedReply, chksum Checksum, peekedByte byte, cBusOptions CBusOptions, requestContext RequestContext) *_ReplyEncodedReply { +func NewReplyEncodedReply( encodedReply EncodedReply , chksum Checksum , peekedByte byte , cBusOptions CBusOptions , requestContext RequestContext ) *_ReplyEncodedReply { _result := &_ReplyEncodedReply{ EncodedReply: encodedReply, - Chksum: chksum, - _Reply: NewReply(peekedByte, cBusOptions, requestContext), + Chksum: chksum, + _Reply: NewReply(peekedByte, cBusOptions, requestContext), } _result._Reply._ReplyChildRequirements = _result return _result @@ -126,7 +129,7 @@ func NewReplyEncodedReply(encodedReply EncodedReply, chksum Checksum, peekedByte // Deprecated: use the interface for direct cast func CastReplyEncodedReply(structType interface{}) ReplyEncodedReply { - if casted, ok := structType.(ReplyEncodedReply); ok { + if casted, ok := structType.(ReplyEncodedReply); ok { return casted } if casted, ok := structType.(*ReplyEncodedReply); ok { @@ -148,13 +151,14 @@ func (m *_ReplyEncodedReply) GetLengthInBits(ctx context.Context) uint16 { // A virtual field doesn't have any in- or output. // Manual Field (chksum) - lengthInBits += uint16(utils.InlineIf((m.CBusOptions.GetSrchk()), func() interface{} { return int32((int32(16))) }, func() interface{} { return int32((int32(0))) }).(int32)) + lengthInBits += uint16(utils.InlineIf((m.CBusOptions.GetSrchk()), func() interface{} {return int32((int32(16)))}, func() interface{} {return int32((int32(0)))}).(int32)) // A virtual field doesn't have any in- or output. return lengthInBits } + func (m *_ReplyEncodedReply) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -179,7 +183,7 @@ func ReplyEncodedReplyParseWithBuffer(ctx context.Context, readBuffer utils.Read } var encodedReply EncodedReply if _encodedReply != nil { - encodedReply = _encodedReply.(EncodedReply) + encodedReply = _encodedReply.(EncodedReply) } // Virtual field @@ -194,7 +198,7 @@ func ReplyEncodedReplyParseWithBuffer(ctx context.Context, readBuffer utils.Read } var chksum Checksum if _chksum != nil { - chksum = _chksum.(Checksum) + chksum = _chksum.(Checksum) } // Virtual field @@ -209,11 +213,11 @@ func ReplyEncodedReplyParseWithBuffer(ctx context.Context, readBuffer utils.Read // Create a partially initialized instance _child := &_ReplyEncodedReply{ _Reply: &_Reply{ - CBusOptions: cBusOptions, + CBusOptions: cBusOptions, RequestContext: requestContext, }, EncodedReply: encodedReply, - Chksum: chksum, + Chksum: chksum, } _child._Reply._ReplyChildRequirements = _child return _child, nil @@ -235,25 +239,25 @@ func (m *_ReplyEncodedReply) SerializeWithWriteBuffer(ctx context.Context, write return errors.Wrap(pushErr, "Error pushing for ReplyEncodedReply") } - // Manual Field (encodedReply) - _encodedReplyErr := WriteEncodedReply(writeBuffer, m.GetEncodedReply()) - if _encodedReplyErr != nil { - return errors.Wrap(_encodedReplyErr, "Error serializing 'encodedReply' field") - } - // Virtual field - if _encodedReplyDecodedErr := writeBuffer.WriteVirtual(ctx, "encodedReplyDecoded", m.GetEncodedReplyDecoded()); _encodedReplyDecodedErr != nil { - return errors.Wrap(_encodedReplyDecodedErr, "Error serializing 'encodedReplyDecoded' field") - } + // Manual Field (encodedReply) + _encodedReplyErr := WriteEncodedReply(writeBuffer, m.GetEncodedReply()) + if _encodedReplyErr != nil { + return errors.Wrap(_encodedReplyErr, "Error serializing 'encodedReply' field") + } + // Virtual field + if _encodedReplyDecodedErr := writeBuffer.WriteVirtual(ctx, "encodedReplyDecoded", m.GetEncodedReplyDecoded()); _encodedReplyDecodedErr != nil { + return errors.Wrap(_encodedReplyDecodedErr, "Error serializing 'encodedReplyDecoded' field") + } - // Manual Field (chksum) - _chksumErr := CalculateChecksum(writeBuffer, m.GetEncodedReply(), m.CBusOptions.GetSrchk()) - if _chksumErr != nil { - return errors.Wrap(_chksumErr, "Error serializing 'chksum' field") - } - // Virtual field - if _chksumDecodedErr := writeBuffer.WriteVirtual(ctx, "chksumDecoded", m.GetChksumDecoded()); _chksumDecodedErr != nil { - return errors.Wrap(_chksumDecodedErr, "Error serializing 'chksumDecoded' field") - } + // Manual Field (chksum) + _chksumErr := CalculateChecksum(writeBuffer, m.GetEncodedReply(), m.CBusOptions.GetSrchk()) + if _chksumErr != nil { + return errors.Wrap(_chksumErr, "Error serializing 'chksum' field") + } + // Virtual field + if _chksumDecodedErr := writeBuffer.WriteVirtual(ctx, "chksumDecoded", m.GetChksumDecoded()); _chksumDecodedErr != nil { + return errors.Wrap(_chksumDecodedErr, "Error serializing 'chksumDecoded' field") + } if popErr := writeBuffer.PopContext("ReplyEncodedReply"); popErr != nil { return errors.Wrap(popErr, "Error popping for ReplyEncodedReply") @@ -263,6 +267,7 @@ func (m *_ReplyEncodedReply) SerializeWithWriteBuffer(ctx context.Context, write return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ReplyEncodedReply) isReplyEncodedReply() bool { return true } @@ -277,3 +282,6 @@ func (m *_ReplyEncodedReply) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/ReplyNetwork.go b/plc4go/protocols/cbus/readwrite/model/ReplyNetwork.go index e38fb179de6..17247a25604 100644 --- a/plc4go/protocols/cbus/readwrite/model/ReplyNetwork.go +++ b/plc4go/protocols/cbus/readwrite/model/ReplyNetwork.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ReplyNetwork is the corresponding interface of ReplyNetwork type ReplyNetwork interface { @@ -46,10 +48,11 @@ type ReplyNetworkExactly interface { // _ReplyNetwork is the data-structure of this message type _ReplyNetwork struct { - NetworkRoute NetworkRoute - UnitAddress UnitAddress + NetworkRoute NetworkRoute + UnitAddress UnitAddress } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -68,14 +71,15 @@ func (m *_ReplyNetwork) GetUnitAddress() UnitAddress { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewReplyNetwork factory function for _ReplyNetwork -func NewReplyNetwork(networkRoute NetworkRoute, unitAddress UnitAddress) *_ReplyNetwork { - return &_ReplyNetwork{NetworkRoute: networkRoute, UnitAddress: unitAddress} +func NewReplyNetwork( networkRoute NetworkRoute , unitAddress UnitAddress ) *_ReplyNetwork { +return &_ReplyNetwork{ NetworkRoute: networkRoute , UnitAddress: unitAddress } } // Deprecated: use the interface for direct cast func CastReplyNetwork(structType interface{}) ReplyNetwork { - if casted, ok := structType.(ReplyNetwork); ok { + if casted, ok := structType.(ReplyNetwork); ok { return casted } if casted, ok := structType.(*ReplyNetwork); ok { @@ -100,6 +104,7 @@ func (m *_ReplyNetwork) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_ReplyNetwork) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -121,7 +126,7 @@ func ReplyNetworkParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe if pullErr := readBuffer.PullContext("networkRoute"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for networkRoute") } - _networkRoute, _networkRouteErr := NetworkRouteParseWithBuffer(ctx, readBuffer) +_networkRoute, _networkRouteErr := NetworkRouteParseWithBuffer(ctx, readBuffer) if _networkRouteErr != nil { return nil, errors.Wrap(_networkRouteErr, "Error parsing 'networkRoute' field of ReplyNetwork") } @@ -134,7 +139,7 @@ func ReplyNetworkParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe if pullErr := readBuffer.PullContext("unitAddress"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for unitAddress") } - _unitAddress, _unitAddressErr := UnitAddressParseWithBuffer(ctx, readBuffer) +_unitAddress, _unitAddressErr := UnitAddressParseWithBuffer(ctx, readBuffer) if _unitAddressErr != nil { return nil, errors.Wrap(_unitAddressErr, "Error parsing 'unitAddress' field of ReplyNetwork") } @@ -149,9 +154,9 @@ func ReplyNetworkParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe // Create the instance return &_ReplyNetwork{ - NetworkRoute: networkRoute, - UnitAddress: unitAddress, - }, nil + NetworkRoute: networkRoute, + UnitAddress: unitAddress, + }, nil } func (m *_ReplyNetwork) Serialize() ([]byte, error) { @@ -165,7 +170,7 @@ func (m *_ReplyNetwork) Serialize() ([]byte, error) { func (m *_ReplyNetwork) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("ReplyNetwork"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("ReplyNetwork"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for ReplyNetwork") } @@ -199,6 +204,7 @@ func (m *_ReplyNetwork) SerializeWithWriteBuffer(ctx context.Context, writeBuffe return nil } + func (m *_ReplyNetwork) isReplyNetwork() bool { return true } @@ -213,3 +219,6 @@ func (m *_ReplyNetwork) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/ReplyOrConfirmation.go b/plc4go/protocols/cbus/readwrite/model/ReplyOrConfirmation.go index 851ee52cd97..22ba8859279 100644 --- a/plc4go/protocols/cbus/readwrite/model/ReplyOrConfirmation.go +++ b/plc4go/protocols/cbus/readwrite/model/ReplyOrConfirmation.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ReplyOrConfirmation is the corresponding interface of ReplyOrConfirmation type ReplyOrConfirmation interface { @@ -47,10 +49,10 @@ type ReplyOrConfirmationExactly interface { // _ReplyOrConfirmation is the data-structure of this message type _ReplyOrConfirmation struct { _ReplyOrConfirmationChildRequirements - PeekedByte byte + PeekedByte byte // Arguments. - CBusOptions CBusOptions + CBusOptions CBusOptions RequestContext RequestContext } @@ -59,6 +61,7 @@ type _ReplyOrConfirmationChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type ReplyOrConfirmationParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child ReplyOrConfirmation, serializeChildFunction func() error) error GetTypeName() string @@ -66,13 +69,12 @@ type ReplyOrConfirmationParent interface { type ReplyOrConfirmationChild interface { utils.Serializable - InitializeParent(parent ReplyOrConfirmation, peekedByte byte) +InitializeParent(parent ReplyOrConfirmation , peekedByte byte ) GetParent() *ReplyOrConfirmation GetTypeName() string ReplyOrConfirmation } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -102,14 +104,15 @@ func (m *_ReplyOrConfirmation) GetIsAlpha() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewReplyOrConfirmation factory function for _ReplyOrConfirmation -func NewReplyOrConfirmation(peekedByte byte, cBusOptions CBusOptions, requestContext RequestContext) *_ReplyOrConfirmation { - return &_ReplyOrConfirmation{PeekedByte: peekedByte, CBusOptions: cBusOptions, RequestContext: requestContext} +func NewReplyOrConfirmation( peekedByte byte , cBusOptions CBusOptions , requestContext RequestContext ) *_ReplyOrConfirmation { +return &_ReplyOrConfirmation{ PeekedByte: peekedByte , CBusOptions: cBusOptions , RequestContext: requestContext } } // Deprecated: use the interface for direct cast func CastReplyOrConfirmation(structType interface{}) ReplyOrConfirmation { - if casted, ok := structType.(ReplyOrConfirmation); ok { + if casted, ok := structType.(ReplyOrConfirmation); ok { return casted } if casted, ok := structType.(*ReplyOrConfirmation); ok { @@ -122,6 +125,7 @@ func (m *_ReplyOrConfirmation) GetTypeName() string { return "ReplyOrConfirmation" } + func (m *_ReplyOrConfirmation) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -147,14 +151,14 @@ func ReplyOrConfirmationParseWithBuffer(ctx context.Context, readBuffer utils.Re currentPos := positionAware.GetPos() _ = currentPos - // Peek Field (peekedByte) - currentPos = positionAware.GetPos() - peekedByte, _err := readBuffer.ReadByte("peekedByte") - if _err != nil { - return nil, errors.Wrap(_err, "Error parsing 'peekedByte' field of ReplyOrConfirmation") - } + // Peek Field (peekedByte) + currentPos = positionAware.GetPos() + peekedByte, _err := readBuffer.ReadByte("peekedByte") + if _err != nil { + return nil, errors.Wrap(_err, "Error parsing 'peekedByte' field of ReplyOrConfirmation") + } - readBuffer.Reset(currentPos) + readBuffer.Reset(currentPos) // Virtual field _isAlpha := bool((bool((peekedByte) >= (0x67)))) && bool((bool((peekedByte) <= (0x7A)))) @@ -164,18 +168,18 @@ func ReplyOrConfirmationParseWithBuffer(ctx context.Context, readBuffer utils.Re // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type ReplyOrConfirmationChildSerializeRequirement interface { ReplyOrConfirmation - InitializeParent(ReplyOrConfirmation, byte) + InitializeParent(ReplyOrConfirmation, byte) GetParent() ReplyOrConfirmation } var _childTemp interface{} var _child ReplyOrConfirmationChildSerializeRequirement var typeSwitchError error switch { - case isAlpha == bool(false) && peekedByte == 0x21: // ServerErrorReply +case isAlpha == bool(false) && peekedByte == 0x21 : // ServerErrorReply _childTemp, typeSwitchError = ServerErrorReplyParseWithBuffer(ctx, readBuffer, cBusOptions, requestContext) - case isAlpha == bool(true): // ReplyOrConfirmationConfirmation +case isAlpha == bool(true) : // ReplyOrConfirmationConfirmation _childTemp, typeSwitchError = ReplyOrConfirmationConfirmationParseWithBuffer(ctx, readBuffer, cBusOptions, requestContext) - case isAlpha == bool(false): // ReplyOrConfirmationReply +case isAlpha == bool(false) : // ReplyOrConfirmationReply _childTemp, typeSwitchError = ReplyOrConfirmationReplyParseWithBuffer(ctx, readBuffer, cBusOptions, requestContext) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [isAlpha=%v, peekedByte=%v]", isAlpha, peekedByte) @@ -190,7 +194,7 @@ func ReplyOrConfirmationParseWithBuffer(ctx context.Context, readBuffer utils.Re } // Finish initializing - _child.InitializeParent(_child, peekedByte) +_child.InitializeParent(_child , peekedByte ) return _child, nil } @@ -200,7 +204,7 @@ func (pm *_ReplyOrConfirmation) SerializeParent(ctx context.Context, writeBuffer _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("ReplyOrConfirmation"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("ReplyOrConfirmation"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for ReplyOrConfirmation") } // Virtual field @@ -219,6 +223,7 @@ func (pm *_ReplyOrConfirmation) SerializeParent(ctx context.Context, writeBuffer return nil } + //// // Arguments Getter @@ -228,7 +233,6 @@ func (m *_ReplyOrConfirmation) GetCBusOptions() CBusOptions { func (m *_ReplyOrConfirmation) GetRequestContext() RequestContext { return m.RequestContext } - // //// @@ -246,3 +250,6 @@ func (m *_ReplyOrConfirmation) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/ReplyOrConfirmationConfirmation.go b/plc4go/protocols/cbus/readwrite/model/ReplyOrConfirmationConfirmation.go index 9ad803f1846..e516ed8f1bd 100644 --- a/plc4go/protocols/cbus/readwrite/model/ReplyOrConfirmationConfirmation.go +++ b/plc4go/protocols/cbus/readwrite/model/ReplyOrConfirmationConfirmation.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ReplyOrConfirmationConfirmation is the corresponding interface of ReplyOrConfirmationConfirmation type ReplyOrConfirmationConfirmation interface { @@ -49,10 +51,12 @@ type ReplyOrConfirmationConfirmationExactly interface { // _ReplyOrConfirmationConfirmation is the data-structure of this message type _ReplyOrConfirmationConfirmation struct { *_ReplyOrConfirmation - Confirmation Confirmation - EmbeddedReply ReplyOrConfirmation + Confirmation Confirmation + EmbeddedReply ReplyOrConfirmation } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -63,14 +67,12 @@ type _ReplyOrConfirmationConfirmation struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ReplyOrConfirmationConfirmation) InitializeParent(parent ReplyOrConfirmation, peekedByte byte) { - m.PeekedByte = peekedByte +func (m *_ReplyOrConfirmationConfirmation) InitializeParent(parent ReplyOrConfirmation , peekedByte byte ) { m.PeekedByte = peekedByte } -func (m *_ReplyOrConfirmationConfirmation) GetParent() ReplyOrConfirmation { +func (m *_ReplyOrConfirmationConfirmation) GetParent() ReplyOrConfirmation { return m._ReplyOrConfirmation } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -89,12 +91,13 @@ func (m *_ReplyOrConfirmationConfirmation) GetEmbeddedReply() ReplyOrConfirmatio /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewReplyOrConfirmationConfirmation factory function for _ReplyOrConfirmationConfirmation -func NewReplyOrConfirmationConfirmation(confirmation Confirmation, embeddedReply ReplyOrConfirmation, peekedByte byte, cBusOptions CBusOptions, requestContext RequestContext) *_ReplyOrConfirmationConfirmation { +func NewReplyOrConfirmationConfirmation( confirmation Confirmation , embeddedReply ReplyOrConfirmation , peekedByte byte , cBusOptions CBusOptions , requestContext RequestContext ) *_ReplyOrConfirmationConfirmation { _result := &_ReplyOrConfirmationConfirmation{ - Confirmation: confirmation, - EmbeddedReply: embeddedReply, - _ReplyOrConfirmation: NewReplyOrConfirmation(peekedByte, cBusOptions, requestContext), + Confirmation: confirmation, + EmbeddedReply: embeddedReply, + _ReplyOrConfirmation: NewReplyOrConfirmation(peekedByte, cBusOptions, requestContext), } _result._ReplyOrConfirmation._ReplyOrConfirmationChildRequirements = _result return _result @@ -102,7 +105,7 @@ func NewReplyOrConfirmationConfirmation(confirmation Confirmation, embeddedReply // Deprecated: use the interface for direct cast func CastReplyOrConfirmationConfirmation(structType interface{}) ReplyOrConfirmationConfirmation { - if casted, ok := structType.(ReplyOrConfirmationConfirmation); ok { + if casted, ok := structType.(ReplyOrConfirmationConfirmation); ok { return casted } if casted, ok := structType.(*ReplyOrConfirmationConfirmation); ok { @@ -129,6 +132,7 @@ func (m *_ReplyOrConfirmationConfirmation) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_ReplyOrConfirmationConfirmation) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -150,7 +154,7 @@ func ReplyOrConfirmationConfirmationParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("confirmation"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for confirmation") } - _confirmation, _confirmationErr := ConfirmationParseWithBuffer(ctx, readBuffer) +_confirmation, _confirmationErr := ConfirmationParseWithBuffer(ctx, readBuffer) if _confirmationErr != nil { return nil, errors.Wrap(_confirmationErr, "Error parsing 'confirmation' field of ReplyOrConfirmationConfirmation") } @@ -161,12 +165,12 @@ func ReplyOrConfirmationConfirmationParseWithBuffer(ctx context.Context, readBuf // Optional Field (embeddedReply) (Can be skipped, if a given expression evaluates to false) var embeddedReply ReplyOrConfirmation = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("embeddedReply"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for embeddedReply") } - _val, _err := ReplyOrConfirmationParseWithBuffer(ctx, readBuffer, cBusOptions, requestContext) +_val, _err := ReplyOrConfirmationParseWithBuffer(ctx, readBuffer , cBusOptions , requestContext ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -188,10 +192,10 @@ func ReplyOrConfirmationConfirmationParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_ReplyOrConfirmationConfirmation{ _ReplyOrConfirmation: &_ReplyOrConfirmation{ - CBusOptions: cBusOptions, + CBusOptions: cBusOptions, RequestContext: requestContext, }, - Confirmation: confirmation, + Confirmation: confirmation, EmbeddedReply: embeddedReply, } _child._ReplyOrConfirmation._ReplyOrConfirmationChildRequirements = _child @@ -214,33 +218,33 @@ func (m *_ReplyOrConfirmationConfirmation) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for ReplyOrConfirmationConfirmation") } - // Simple Field (confirmation) - if pushErr := writeBuffer.PushContext("confirmation"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for confirmation") - } - _confirmationErr := writeBuffer.WriteSerializable(ctx, m.GetConfirmation()) - if popErr := writeBuffer.PopContext("confirmation"); popErr != nil { - return errors.Wrap(popErr, "Error popping for confirmation") + // Simple Field (confirmation) + if pushErr := writeBuffer.PushContext("confirmation"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for confirmation") + } + _confirmationErr := writeBuffer.WriteSerializable(ctx, m.GetConfirmation()) + if popErr := writeBuffer.PopContext("confirmation"); popErr != nil { + return errors.Wrap(popErr, "Error popping for confirmation") + } + if _confirmationErr != nil { + return errors.Wrap(_confirmationErr, "Error serializing 'confirmation' field") + } + + // Optional Field (embeddedReply) (Can be skipped, if the value is null) + var embeddedReply ReplyOrConfirmation = nil + if m.GetEmbeddedReply() != nil { + if pushErr := writeBuffer.PushContext("embeddedReply"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for embeddedReply") } - if _confirmationErr != nil { - return errors.Wrap(_confirmationErr, "Error serializing 'confirmation' field") + embeddedReply = m.GetEmbeddedReply() + _embeddedReplyErr := writeBuffer.WriteSerializable(ctx, embeddedReply) + if popErr := writeBuffer.PopContext("embeddedReply"); popErr != nil { + return errors.Wrap(popErr, "Error popping for embeddedReply") } - - // Optional Field (embeddedReply) (Can be skipped, if the value is null) - var embeddedReply ReplyOrConfirmation = nil - if m.GetEmbeddedReply() != nil { - if pushErr := writeBuffer.PushContext("embeddedReply"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for embeddedReply") - } - embeddedReply = m.GetEmbeddedReply() - _embeddedReplyErr := writeBuffer.WriteSerializable(ctx, embeddedReply) - if popErr := writeBuffer.PopContext("embeddedReply"); popErr != nil { - return errors.Wrap(popErr, "Error popping for embeddedReply") - } - if _embeddedReplyErr != nil { - return errors.Wrap(_embeddedReplyErr, "Error serializing 'embeddedReply' field") - } + if _embeddedReplyErr != nil { + return errors.Wrap(_embeddedReplyErr, "Error serializing 'embeddedReply' field") } + } if popErr := writeBuffer.PopContext("ReplyOrConfirmationConfirmation"); popErr != nil { return errors.Wrap(popErr, "Error popping for ReplyOrConfirmationConfirmation") @@ -250,6 +254,7 @@ func (m *_ReplyOrConfirmationConfirmation) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ReplyOrConfirmationConfirmation) isReplyOrConfirmationConfirmation() bool { return true } @@ -264,3 +269,6 @@ func (m *_ReplyOrConfirmationConfirmation) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/ReplyOrConfirmationReply.go b/plc4go/protocols/cbus/readwrite/model/ReplyOrConfirmationReply.go index 79fd053af01..993a7630df8 100644 --- a/plc4go/protocols/cbus/readwrite/model/ReplyOrConfirmationReply.go +++ b/plc4go/protocols/cbus/readwrite/model/ReplyOrConfirmationReply.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ReplyOrConfirmationReply is the corresponding interface of ReplyOrConfirmationReply type ReplyOrConfirmationReply interface { @@ -48,10 +50,12 @@ type ReplyOrConfirmationReplyExactly interface { // _ReplyOrConfirmationReply is the data-structure of this message type _ReplyOrConfirmationReply struct { *_ReplyOrConfirmation - Reply Reply - Termination ResponseTermination + Reply Reply + Termination ResponseTermination } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -62,14 +66,12 @@ type _ReplyOrConfirmationReply struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ReplyOrConfirmationReply) InitializeParent(parent ReplyOrConfirmation, peekedByte byte) { - m.PeekedByte = peekedByte +func (m *_ReplyOrConfirmationReply) InitializeParent(parent ReplyOrConfirmation , peekedByte byte ) { m.PeekedByte = peekedByte } -func (m *_ReplyOrConfirmationReply) GetParent() ReplyOrConfirmation { +func (m *_ReplyOrConfirmationReply) GetParent() ReplyOrConfirmation { return m._ReplyOrConfirmation } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -88,12 +90,13 @@ func (m *_ReplyOrConfirmationReply) GetTermination() ResponseTermination { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewReplyOrConfirmationReply factory function for _ReplyOrConfirmationReply -func NewReplyOrConfirmationReply(reply Reply, termination ResponseTermination, peekedByte byte, cBusOptions CBusOptions, requestContext RequestContext) *_ReplyOrConfirmationReply { +func NewReplyOrConfirmationReply( reply Reply , termination ResponseTermination , peekedByte byte , cBusOptions CBusOptions , requestContext RequestContext ) *_ReplyOrConfirmationReply { _result := &_ReplyOrConfirmationReply{ - Reply: reply, - Termination: termination, - _ReplyOrConfirmation: NewReplyOrConfirmation(peekedByte, cBusOptions, requestContext), + Reply: reply, + Termination: termination, + _ReplyOrConfirmation: NewReplyOrConfirmation(peekedByte, cBusOptions, requestContext), } _result._ReplyOrConfirmation._ReplyOrConfirmationChildRequirements = _result return _result @@ -101,7 +104,7 @@ func NewReplyOrConfirmationReply(reply Reply, termination ResponseTermination, p // Deprecated: use the interface for direct cast func CastReplyOrConfirmationReply(structType interface{}) ReplyOrConfirmationReply { - if casted, ok := structType.(ReplyOrConfirmationReply); ok { + if casted, ok := structType.(ReplyOrConfirmationReply); ok { return casted } if casted, ok := structType.(*ReplyOrConfirmationReply); ok { @@ -126,6 +129,7 @@ func (m *_ReplyOrConfirmationReply) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_ReplyOrConfirmationReply) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -147,7 +151,7 @@ func ReplyOrConfirmationReplyParseWithBuffer(ctx context.Context, readBuffer uti if pullErr := readBuffer.PullContext("reply"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for reply") } - _reply, _replyErr := ReplyParseWithBuffer(ctx, readBuffer, cBusOptions, requestContext) +_reply, _replyErr := ReplyParseWithBuffer(ctx, readBuffer , cBusOptions , requestContext ) if _replyErr != nil { return nil, errors.Wrap(_replyErr, "Error parsing 'reply' field of ReplyOrConfirmationReply") } @@ -160,7 +164,7 @@ func ReplyOrConfirmationReplyParseWithBuffer(ctx context.Context, readBuffer uti if pullErr := readBuffer.PullContext("termination"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for termination") } - _termination, _terminationErr := ResponseTerminationParseWithBuffer(ctx, readBuffer) +_termination, _terminationErr := ResponseTerminationParseWithBuffer(ctx, readBuffer) if _terminationErr != nil { return nil, errors.Wrap(_terminationErr, "Error parsing 'termination' field of ReplyOrConfirmationReply") } @@ -176,10 +180,10 @@ func ReplyOrConfirmationReplyParseWithBuffer(ctx context.Context, readBuffer uti // Create a partially initialized instance _child := &_ReplyOrConfirmationReply{ _ReplyOrConfirmation: &_ReplyOrConfirmation{ - CBusOptions: cBusOptions, + CBusOptions: cBusOptions, RequestContext: requestContext, }, - Reply: reply, + Reply: reply, Termination: termination, } _child._ReplyOrConfirmation._ReplyOrConfirmationChildRequirements = _child @@ -202,29 +206,29 @@ func (m *_ReplyOrConfirmationReply) SerializeWithWriteBuffer(ctx context.Context return errors.Wrap(pushErr, "Error pushing for ReplyOrConfirmationReply") } - // Simple Field (reply) - if pushErr := writeBuffer.PushContext("reply"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for reply") - } - _replyErr := writeBuffer.WriteSerializable(ctx, m.GetReply()) - if popErr := writeBuffer.PopContext("reply"); popErr != nil { - return errors.Wrap(popErr, "Error popping for reply") - } - if _replyErr != nil { - return errors.Wrap(_replyErr, "Error serializing 'reply' field") - } + // Simple Field (reply) + if pushErr := writeBuffer.PushContext("reply"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for reply") + } + _replyErr := writeBuffer.WriteSerializable(ctx, m.GetReply()) + if popErr := writeBuffer.PopContext("reply"); popErr != nil { + return errors.Wrap(popErr, "Error popping for reply") + } + if _replyErr != nil { + return errors.Wrap(_replyErr, "Error serializing 'reply' field") + } - // Simple Field (termination) - if pushErr := writeBuffer.PushContext("termination"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for termination") - } - _terminationErr := writeBuffer.WriteSerializable(ctx, m.GetTermination()) - if popErr := writeBuffer.PopContext("termination"); popErr != nil { - return errors.Wrap(popErr, "Error popping for termination") - } - if _terminationErr != nil { - return errors.Wrap(_terminationErr, "Error serializing 'termination' field") - } + // Simple Field (termination) + if pushErr := writeBuffer.PushContext("termination"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for termination") + } + _terminationErr := writeBuffer.WriteSerializable(ctx, m.GetTermination()) + if popErr := writeBuffer.PopContext("termination"); popErr != nil { + return errors.Wrap(popErr, "Error popping for termination") + } + if _terminationErr != nil { + return errors.Wrap(_terminationErr, "Error serializing 'termination' field") + } if popErr := writeBuffer.PopContext("ReplyOrConfirmationReply"); popErr != nil { return errors.Wrap(popErr, "Error popping for ReplyOrConfirmationReply") @@ -234,6 +238,7 @@ func (m *_ReplyOrConfirmationReply) SerializeWithWriteBuffer(ctx context.Context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ReplyOrConfirmationReply) isReplyOrConfirmationReply() bool { return true } @@ -248,3 +253,6 @@ func (m *_ReplyOrConfirmationReply) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/Request.go b/plc4go/protocols/cbus/readwrite/model/Request.go index 0195b19f292..e4ab116936e 100644 --- a/plc4go/protocols/cbus/readwrite/model/Request.go +++ b/plc4go/protocols/cbus/readwrite/model/Request.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Request is the corresponding interface of Request type Request interface { @@ -55,11 +57,11 @@ type RequestExactly interface { // _Request is the data-structure of this message type _Request struct { _RequestChildRequirements - PeekedByte RequestType - StartingCR *RequestType - ResetMode *RequestType - SecondPeek RequestType - Termination RequestTermination + PeekedByte RequestType + StartingCR *RequestType + ResetMode *RequestType + SecondPeek RequestType + Termination RequestTermination // Arguments. CBusOptions CBusOptions @@ -70,6 +72,7 @@ type _RequestChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type RequestParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child Request, serializeChildFunction func() error) error GetTypeName() string @@ -77,13 +80,12 @@ type RequestParent interface { type RequestChild interface { utils.Serializable - InitializeParent(parent Request, peekedByte RequestType, startingCR *RequestType, resetMode *RequestType, secondPeek RequestType, termination RequestTermination) +InitializeParent(parent Request , peekedByte RequestType , startingCR * RequestType , resetMode * RequestType , secondPeek RequestType , termination RequestTermination ) GetParent() *Request GetTypeName() string Request } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -125,7 +127,7 @@ func (m *_Request) GetActualPeek() RequestType { _ = startingCR resetMode := m.ResetMode _ = resetMode - return CastRequestType(CastRequestType(utils.InlineIf(bool((bool(bool((m.GetStartingCR()) == (nil))) && bool(bool((m.GetResetMode()) == (nil))))) || bool((bool(bool(bool((m.GetStartingCR()) == (nil))) && bool(bool((m.GetResetMode()) != (nil)))) && bool(bool((m.GetSecondPeek()) == (RequestType_EMPTY))))), func() interface{} { return CastRequestType(m.GetPeekedByte()) }, func() interface{} { return CastRequestType(m.GetSecondPeek()) }))) + return CastRequestType(CastRequestType(utils.InlineIf(bool((bool(bool(((m.GetStartingCR())) == (nil))) && bool(bool(((m.GetResetMode())) == (nil))))) || bool((bool(bool(bool(((m.GetStartingCR())) == (nil))) && bool(bool(((m.GetResetMode())) != (nil)))) && bool(bool((m.GetSecondPeek()) == (RequestType_EMPTY))))), func() interface{} {return CastRequestType(m.GetPeekedByte())}, func() interface{} {return CastRequestType(m.GetSecondPeek())}))) } /////////////////////// @@ -133,14 +135,15 @@ func (m *_Request) GetActualPeek() RequestType { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewRequest factory function for _Request -func NewRequest(peekedByte RequestType, startingCR *RequestType, resetMode *RequestType, secondPeek RequestType, termination RequestTermination, cBusOptions CBusOptions) *_Request { - return &_Request{PeekedByte: peekedByte, StartingCR: startingCR, ResetMode: resetMode, SecondPeek: secondPeek, Termination: termination, CBusOptions: cBusOptions} +func NewRequest( peekedByte RequestType , startingCR *RequestType , resetMode *RequestType , secondPeek RequestType , termination RequestTermination , cBusOptions CBusOptions ) *_Request { +return &_Request{ PeekedByte: peekedByte , StartingCR: startingCR , ResetMode: resetMode , SecondPeek: secondPeek , Termination: termination , CBusOptions: cBusOptions } } // Deprecated: use the interface for direct cast func CastRequest(structType interface{}) Request { - if casted, ok := structType.(Request); ok { + if casted, ok := structType.(Request); ok { return casted } if casted, ok := structType.(*Request); ok { @@ -153,6 +156,7 @@ func (m *_Request) GetTypeName() string { return "Request" } + func (m *_Request) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -191,20 +195,20 @@ func RequestParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, cB currentPos := positionAware.GetPos() _ = currentPos - // Peek Field (peekedByte) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("peekedByte"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for peekedByte") - } - peekedByte, _err := RequestTypeParseWithBuffer(ctx, readBuffer) - if _err != nil { - return nil, errors.Wrap(_err, "Error parsing 'peekedByte' field of Request") - } - if closeErr := readBuffer.CloseContext("peekedByte"); closeErr != nil { - return nil, errors.Wrap(closeErr, "Error closing for peekedByte") - } - - readBuffer.Reset(currentPos) + // Peek Field (peekedByte) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("peekedByte"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for peekedByte") + } + peekedByte, _err := RequestTypeParseWithBuffer(ctx, readBuffer) + if _err != nil { + return nil, errors.Wrap(_err, "Error parsing 'peekedByte' field of Request") + } + if closeErr := readBuffer.CloseContext("peekedByte"); closeErr != nil { + return nil, errors.Wrap(closeErr, "Error closing for peekedByte") + } + + readBuffer.Reset(currentPos) // Optional Field (startingCR) (Can be skipped, if a given expression evaluates to false) var startingCR *RequestType = nil @@ -238,49 +242,49 @@ func RequestParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, cB } } - // Peek Field (secondPeek) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("secondPeek"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for secondPeek") - } - secondPeek, _err := RequestTypeParseWithBuffer(ctx, readBuffer) - if _err != nil { - return nil, errors.Wrap(_err, "Error parsing 'secondPeek' field of Request") - } - if closeErr := readBuffer.CloseContext("secondPeek"); closeErr != nil { - return nil, errors.Wrap(closeErr, "Error closing for secondPeek") - } - - readBuffer.Reset(currentPos) + // Peek Field (secondPeek) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("secondPeek"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for secondPeek") + } + secondPeek, _err := RequestTypeParseWithBuffer(ctx, readBuffer) + if _err != nil { + return nil, errors.Wrap(_err, "Error parsing 'secondPeek' field of Request") + } + if closeErr := readBuffer.CloseContext("secondPeek"); closeErr != nil { + return nil, errors.Wrap(closeErr, "Error closing for secondPeek") + } + + readBuffer.Reset(currentPos) // Virtual field - _actualPeek := CastRequestType(utils.InlineIf(bool((bool(bool((startingCR) == (nil))) && bool(bool((resetMode) == (nil))))) || bool((bool(bool(bool((startingCR) == (nil))) && bool(bool((resetMode) != (nil)))) && bool(bool((secondPeek) == (RequestType_EMPTY))))), func() interface{} { return CastRequestType(peekedByte) }, func() interface{} { return CastRequestType(secondPeek) })) + _actualPeek := CastRequestType(utils.InlineIf(bool((bool(bool(((startingCR)) == (nil))) && bool(bool(((resetMode)) == (nil))))) || bool((bool(bool(bool(((startingCR)) == (nil))) && bool(bool(((resetMode)) != (nil)))) && bool(bool((secondPeek) == (RequestType_EMPTY))))), func() interface{} {return CastRequestType(peekedByte)}, func() interface{} {return CastRequestType(secondPeek)})) actualPeek := RequestType(_actualPeek) _ = actualPeek // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type RequestChildSerializeRequirement interface { Request - InitializeParent(Request, RequestType, *RequestType, *RequestType, RequestType, RequestTermination) + InitializeParent(Request, RequestType, *RequestType, *RequestType, RequestType, RequestTermination) GetParent() Request } var _childTemp interface{} var _child RequestChildSerializeRequirement var typeSwitchError error switch { - case actualPeek == RequestType_SMART_CONNECT_SHORTCUT: // RequestSmartConnectShortcut +case actualPeek == RequestType_SMART_CONNECT_SHORTCUT : // RequestSmartConnectShortcut _childTemp, typeSwitchError = RequestSmartConnectShortcutParseWithBuffer(ctx, readBuffer, cBusOptions) - case actualPeek == RequestType_RESET: // RequestReset +case actualPeek == RequestType_RESET : // RequestReset _childTemp, typeSwitchError = RequestResetParseWithBuffer(ctx, readBuffer, cBusOptions) - case actualPeek == RequestType_DIRECT_COMMAND: // RequestDirectCommandAccess +case actualPeek == RequestType_DIRECT_COMMAND : // RequestDirectCommandAccess _childTemp, typeSwitchError = RequestDirectCommandAccessParseWithBuffer(ctx, readBuffer, cBusOptions) - case actualPeek == RequestType_REQUEST_COMMAND: // RequestCommand +case actualPeek == RequestType_REQUEST_COMMAND : // RequestCommand _childTemp, typeSwitchError = RequestCommandParseWithBuffer(ctx, readBuffer, cBusOptions) - case actualPeek == RequestType_NULL: // RequestNull +case actualPeek == RequestType_NULL : // RequestNull _childTemp, typeSwitchError = RequestNullParseWithBuffer(ctx, readBuffer, cBusOptions) - case actualPeek == RequestType_EMPTY: // RequestEmpty +case actualPeek == RequestType_EMPTY : // RequestEmpty _childTemp, typeSwitchError = RequestEmptyParseWithBuffer(ctx, readBuffer, cBusOptions) - case 0 == 0: // RequestObsolete +case 0==0 : // RequestObsolete _childTemp, typeSwitchError = RequestObsoleteParseWithBuffer(ctx, readBuffer, cBusOptions) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [actualPeek=%v]", actualPeek) @@ -294,7 +298,7 @@ func RequestParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, cB if pullErr := readBuffer.PullContext("termination"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for termination") } - _termination, _terminationErr := RequestTerminationParseWithBuffer(ctx, readBuffer) +_termination, _terminationErr := RequestTerminationParseWithBuffer(ctx, readBuffer) if _terminationErr != nil { return nil, errors.Wrap(_terminationErr, "Error parsing 'termination' field of Request") } @@ -308,7 +312,7 @@ func RequestParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, cB } // Finish initializing - _child.InitializeParent(_child, peekedByte, startingCR, resetMode, secondPeek, termination) +_child.InitializeParent(_child , peekedByte , startingCR , resetMode , secondPeek , termination ) return _child, nil } @@ -318,7 +322,7 @@ func (pm *_Request) SerializeParent(ctx context.Context, writeBuffer utils.Write _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("Request"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("Request"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for Request") } @@ -381,13 +385,13 @@ func (pm *_Request) SerializeParent(ctx context.Context, writeBuffer utils.Write return nil } + //// // Arguments Getter func (m *_Request) GetCBusOptions() CBusOptions { return m.CBusOptions } - // //// @@ -405,3 +409,6 @@ func (m *_Request) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/RequestCommand.go b/plc4go/protocols/cbus/readwrite/model/RequestCommand.go index 2000c07d695..be74dbbe02f 100644 --- a/plc4go/protocols/cbus/readwrite/model/RequestCommand.go +++ b/plc4go/protocols/cbus/readwrite/model/RequestCommand.go @@ -19,6 +19,7 @@ package model + import ( "context" "fmt" @@ -27,7 +28,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const RequestCommand_INITIATOR byte = 0x5C @@ -59,11 +61,13 @@ type RequestCommandExactly interface { // _RequestCommand is the data-structure of this message type _RequestCommand struct { *_Request - CbusCommand CBusCommand - Chksum Checksum - Alpha Alpha + CbusCommand CBusCommand + Chksum Checksum + Alpha Alpha } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -74,18 +78,16 @@ type _RequestCommand struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_RequestCommand) InitializeParent(parent Request, peekedByte RequestType, startingCR *RequestType, resetMode *RequestType, secondPeek RequestType, termination RequestTermination) { - m.PeekedByte = peekedByte +func (m *_RequestCommand) InitializeParent(parent Request , peekedByte RequestType , startingCR * RequestType , resetMode * RequestType , secondPeek RequestType , termination RequestTermination ) { m.PeekedByte = peekedByte m.StartingCR = startingCR m.ResetMode = resetMode m.SecondPeek = secondPeek m.Termination = termination } -func (m *_RequestCommand) GetParent() Request { +func (m *_RequestCommand) GetParent() Request { return m._Request } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -146,13 +148,14 @@ func (m *_RequestCommand) GetInitiator() byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewRequestCommand factory function for _RequestCommand -func NewRequestCommand(cbusCommand CBusCommand, chksum Checksum, alpha Alpha, peekedByte RequestType, startingCR *RequestType, resetMode *RequestType, secondPeek RequestType, termination RequestTermination, cBusOptions CBusOptions) *_RequestCommand { +func NewRequestCommand( cbusCommand CBusCommand , chksum Checksum , alpha Alpha , peekedByte RequestType , startingCR *RequestType , resetMode *RequestType , secondPeek RequestType , termination RequestTermination , cBusOptions CBusOptions ) *_RequestCommand { _result := &_RequestCommand{ CbusCommand: cbusCommand, - Chksum: chksum, - Alpha: alpha, - _Request: NewRequest(peekedByte, startingCR, resetMode, secondPeek, termination, cBusOptions), + Chksum: chksum, + Alpha: alpha, + _Request: NewRequest(peekedByte, startingCR, resetMode, secondPeek, termination, cBusOptions), } _result._Request._RequestChildRequirements = _result return _result @@ -160,7 +163,7 @@ func NewRequestCommand(cbusCommand CBusCommand, chksum Checksum, alpha Alpha, pe // Deprecated: use the interface for direct cast func CastRequestCommand(structType interface{}) RequestCommand { - if casted, ok := structType.(RequestCommand); ok { + if casted, ok := structType.(RequestCommand); ok { return casted } if casted, ok := structType.(*RequestCommand); ok { @@ -185,7 +188,7 @@ func (m *_RequestCommand) GetLengthInBits(ctx context.Context) uint16 { // A virtual field doesn't have any in- or output. // Manual Field (chksum) - lengthInBits += uint16(utils.InlineIf((m.CBusOptions.GetSrchk()), func() interface{} { return int32((int32(16))) }, func() interface{} { return int32((int32(0))) }).(int32)) + lengthInBits += uint16(utils.InlineIf((m.CBusOptions.GetSrchk()), func() interface{} {return int32((int32(16)))}, func() interface{} {return int32((int32(0)))}).(int32)) // A virtual field doesn't have any in- or output. @@ -197,6 +200,7 @@ func (m *_RequestCommand) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_RequestCommand) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -230,7 +234,7 @@ func RequestCommandParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf } var cbusCommand CBusCommand if _cbusCommand != nil { - cbusCommand = _cbusCommand.(CBusCommand) + cbusCommand = _cbusCommand.(CBusCommand) } // Virtual field @@ -245,7 +249,7 @@ func RequestCommandParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf } var chksum Checksum if _chksum != nil { - chksum = _chksum.(Checksum) + chksum = _chksum.(Checksum) } // Virtual field @@ -255,12 +259,12 @@ func RequestCommandParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf // Optional Field (alpha) (Can be skipped, if a given expression evaluates to false) var alpha Alpha = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("alpha"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for alpha") } - _val, _err := AlphaParseWithBuffer(ctx, readBuffer) +_val, _err := AlphaParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -285,8 +289,8 @@ func RequestCommandParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf CBusOptions: cBusOptions, }, CbusCommand: cbusCommand, - Chksum: chksum, - Alpha: alpha, + Chksum: chksum, + Alpha: alpha, } _child._Request._RequestChildRequirements = _child return _child, nil @@ -308,47 +312,47 @@ func (m *_RequestCommand) SerializeWithWriteBuffer(ctx context.Context, writeBuf return errors.Wrap(pushErr, "Error pushing for RequestCommand") } - // Const Field (initiator) - _initiatorErr := writeBuffer.WriteByte("initiator", 0x5C) - if _initiatorErr != nil { - return errors.Wrap(_initiatorErr, "Error serializing 'initiator' field") - } + // Const Field (initiator) + _initiatorErr := writeBuffer.WriteByte("initiator", 0x5C) + if _initiatorErr != nil { + return errors.Wrap(_initiatorErr, "Error serializing 'initiator' field") + } - // Manual Field (cbusCommand) - _cbusCommandErr := WriteCBusCommand(writeBuffer, m.GetCbusCommand()) - if _cbusCommandErr != nil { - return errors.Wrap(_cbusCommandErr, "Error serializing 'cbusCommand' field") - } - // Virtual field - if _cbusCommandDecodedErr := writeBuffer.WriteVirtual(ctx, "cbusCommandDecoded", m.GetCbusCommandDecoded()); _cbusCommandDecodedErr != nil { - return errors.Wrap(_cbusCommandDecodedErr, "Error serializing 'cbusCommandDecoded' field") - } + // Manual Field (cbusCommand) + _cbusCommandErr := WriteCBusCommand(writeBuffer, m.GetCbusCommand()) + if _cbusCommandErr != nil { + return errors.Wrap(_cbusCommandErr, "Error serializing 'cbusCommand' field") + } + // Virtual field + if _cbusCommandDecodedErr := writeBuffer.WriteVirtual(ctx, "cbusCommandDecoded", m.GetCbusCommandDecoded()); _cbusCommandDecodedErr != nil { + return errors.Wrap(_cbusCommandDecodedErr, "Error serializing 'cbusCommandDecoded' field") + } - // Manual Field (chksum) - _chksumErr := CalculateChecksum(writeBuffer, m.GetCbusCommand(), m.CBusOptions.GetSrchk()) - if _chksumErr != nil { - return errors.Wrap(_chksumErr, "Error serializing 'chksum' field") + // Manual Field (chksum) + _chksumErr := CalculateChecksum(writeBuffer, m.GetCbusCommand(), m.CBusOptions.GetSrchk()) + if _chksumErr != nil { + return errors.Wrap(_chksumErr, "Error serializing 'chksum' field") + } + // Virtual field + if _chksumDecodedErr := writeBuffer.WriteVirtual(ctx, "chksumDecoded", m.GetChksumDecoded()); _chksumDecodedErr != nil { + return errors.Wrap(_chksumDecodedErr, "Error serializing 'chksumDecoded' field") + } + + // Optional Field (alpha) (Can be skipped, if the value is null) + var alpha Alpha = nil + if m.GetAlpha() != nil { + if pushErr := writeBuffer.PushContext("alpha"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for alpha") } - // Virtual field - if _chksumDecodedErr := writeBuffer.WriteVirtual(ctx, "chksumDecoded", m.GetChksumDecoded()); _chksumDecodedErr != nil { - return errors.Wrap(_chksumDecodedErr, "Error serializing 'chksumDecoded' field") + alpha = m.GetAlpha() + _alphaErr := writeBuffer.WriteSerializable(ctx, alpha) + if popErr := writeBuffer.PopContext("alpha"); popErr != nil { + return errors.Wrap(popErr, "Error popping for alpha") } - - // Optional Field (alpha) (Can be skipped, if the value is null) - var alpha Alpha = nil - if m.GetAlpha() != nil { - if pushErr := writeBuffer.PushContext("alpha"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for alpha") - } - alpha = m.GetAlpha() - _alphaErr := writeBuffer.WriteSerializable(ctx, alpha) - if popErr := writeBuffer.PopContext("alpha"); popErr != nil { - return errors.Wrap(popErr, "Error popping for alpha") - } - if _alphaErr != nil { - return errors.Wrap(_alphaErr, "Error serializing 'alpha' field") - } + if _alphaErr != nil { + return errors.Wrap(_alphaErr, "Error serializing 'alpha' field") } + } if popErr := writeBuffer.PopContext("RequestCommand"); popErr != nil { return errors.Wrap(popErr, "Error popping for RequestCommand") @@ -358,6 +362,7 @@ func (m *_RequestCommand) SerializeWithWriteBuffer(ctx context.Context, writeBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_RequestCommand) isRequestCommand() bool { return true } @@ -372,3 +377,6 @@ func (m *_RequestCommand) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/RequestContext.go b/plc4go/protocols/cbus/readwrite/model/RequestContext.go index 4248512ee8f..a723894c9cb 100644 --- a/plc4go/protocols/cbus/readwrite/model/RequestContext.go +++ b/plc4go/protocols/cbus/readwrite/model/RequestContext.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // RequestContext is the corresponding interface of RequestContext type RequestContext interface { @@ -44,9 +46,10 @@ type RequestContextExactly interface { // _RequestContext is the data-structure of this message type _RequestContext struct { - SendIdentifyRequestBefore bool + SendIdentifyRequestBefore bool } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -61,14 +64,15 @@ func (m *_RequestContext) GetSendIdentifyRequestBefore() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewRequestContext factory function for _RequestContext -func NewRequestContext(sendIdentifyRequestBefore bool) *_RequestContext { - return &_RequestContext{SendIdentifyRequestBefore: sendIdentifyRequestBefore} +func NewRequestContext( sendIdentifyRequestBefore bool ) *_RequestContext { +return &_RequestContext{ SendIdentifyRequestBefore: sendIdentifyRequestBefore } } // Deprecated: use the interface for direct cast func CastRequestContext(structType interface{}) RequestContext { - if casted, ok := structType.(RequestContext); ok { + if casted, ok := structType.(RequestContext); ok { return casted } if casted, ok := structType.(*RequestContext); ok { @@ -85,11 +89,12 @@ func (m *_RequestContext) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (sendIdentifyRequestBefore) - lengthInBits += 1 + lengthInBits += 1; return lengthInBits } + func (m *_RequestContext) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -108,7 +113,7 @@ func RequestContextParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf _ = currentPos // Simple Field (sendIdentifyRequestBefore) - _sendIdentifyRequestBefore, _sendIdentifyRequestBeforeErr := readBuffer.ReadBit("sendIdentifyRequestBefore") +_sendIdentifyRequestBefore, _sendIdentifyRequestBeforeErr := readBuffer.ReadBit("sendIdentifyRequestBefore") if _sendIdentifyRequestBeforeErr != nil { return nil, errors.Wrap(_sendIdentifyRequestBeforeErr, "Error parsing 'sendIdentifyRequestBefore' field of RequestContext") } @@ -120,8 +125,8 @@ func RequestContextParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf // Create the instance return &_RequestContext{ - SendIdentifyRequestBefore: sendIdentifyRequestBefore, - }, nil + SendIdentifyRequestBefore: sendIdentifyRequestBefore, + }, nil } func (m *_RequestContext) Serialize() ([]byte, error) { @@ -135,7 +140,7 @@ func (m *_RequestContext) Serialize() ([]byte, error) { func (m *_RequestContext) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("RequestContext"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("RequestContext"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for RequestContext") } @@ -152,6 +157,7 @@ func (m *_RequestContext) SerializeWithWriteBuffer(ctx context.Context, writeBuf return nil } + func (m *_RequestContext) isRequestContext() bool { return true } @@ -166,3 +172,6 @@ func (m *_RequestContext) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/RequestDirectCommandAccess.go b/plc4go/protocols/cbus/readwrite/model/RequestDirectCommandAccess.go index efd81f04f71..fd0340b6537 100644 --- a/plc4go/protocols/cbus/readwrite/model/RequestDirectCommandAccess.go +++ b/plc4go/protocols/cbus/readwrite/model/RequestDirectCommandAccess.go @@ -19,6 +19,7 @@ package model + import ( "context" "fmt" @@ -27,7 +28,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const RequestDirectCommandAccess_AT byte = 0x40 @@ -55,10 +57,12 @@ type RequestDirectCommandAccessExactly interface { // _RequestDirectCommandAccess is the data-structure of this message type _RequestDirectCommandAccess struct { *_Request - CalData CALData - Alpha Alpha + CalData CALData + Alpha Alpha } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -69,18 +73,16 @@ type _RequestDirectCommandAccess struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_RequestDirectCommandAccess) InitializeParent(parent Request, peekedByte RequestType, startingCR *RequestType, resetMode *RequestType, secondPeek RequestType, termination RequestTermination) { - m.PeekedByte = peekedByte +func (m *_RequestDirectCommandAccess) InitializeParent(parent Request , peekedByte RequestType , startingCR * RequestType , resetMode * RequestType , secondPeek RequestType , termination RequestTermination ) { m.PeekedByte = peekedByte m.StartingCR = startingCR m.ResetMode = resetMode m.SecondPeek = secondPeek m.Termination = termination } -func (m *_RequestDirectCommandAccess) GetParent() Request { +func (m *_RequestDirectCommandAccess) GetParent() Request { return m._Request } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -129,12 +131,13 @@ func (m *_RequestDirectCommandAccess) GetAt() byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewRequestDirectCommandAccess factory function for _RequestDirectCommandAccess -func NewRequestDirectCommandAccess(calData CALData, alpha Alpha, peekedByte RequestType, startingCR *RequestType, resetMode *RequestType, secondPeek RequestType, termination RequestTermination, cBusOptions CBusOptions) *_RequestDirectCommandAccess { +func NewRequestDirectCommandAccess( calData CALData , alpha Alpha , peekedByte RequestType , startingCR *RequestType , resetMode *RequestType , secondPeek RequestType , termination RequestTermination , cBusOptions CBusOptions ) *_RequestDirectCommandAccess { _result := &_RequestDirectCommandAccess{ - CalData: calData, - Alpha: alpha, - _Request: NewRequest(peekedByte, startingCR, resetMode, secondPeek, termination, cBusOptions), + CalData: calData, + Alpha: alpha, + _Request: NewRequest(peekedByte, startingCR, resetMode, secondPeek, termination, cBusOptions), } _result._Request._RequestChildRequirements = _result return _result @@ -142,7 +145,7 @@ func NewRequestDirectCommandAccess(calData CALData, alpha Alpha, peekedByte Requ // Deprecated: use the interface for direct cast func CastRequestDirectCommandAccess(structType interface{}) RequestDirectCommandAccess { - if casted, ok := structType.(RequestDirectCommandAccess); ok { + if casted, ok := structType.(RequestDirectCommandAccess); ok { return casted } if casted, ok := structType.(*RequestDirectCommandAccess); ok { @@ -174,6 +177,7 @@ func (m *_RequestDirectCommandAccess) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_RequestDirectCommandAccess) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -207,7 +211,7 @@ func RequestDirectCommandAccessParseWithBuffer(ctx context.Context, readBuffer u } var calData CALData if _calData != nil { - calData = _calData.(CALData) + calData = _calData.(CALData) } // Virtual field @@ -217,12 +221,12 @@ func RequestDirectCommandAccessParseWithBuffer(ctx context.Context, readBuffer u // Optional Field (alpha) (Can be skipped, if a given expression evaluates to false) var alpha Alpha = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("alpha"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for alpha") } - _val, _err := AlphaParseWithBuffer(ctx, readBuffer) +_val, _err := AlphaParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -247,7 +251,7 @@ func RequestDirectCommandAccessParseWithBuffer(ctx context.Context, readBuffer u CBusOptions: cBusOptions, }, CalData: calData, - Alpha: alpha, + Alpha: alpha, } _child._Request._RequestChildRequirements = _child return _child, nil @@ -269,37 +273,37 @@ func (m *_RequestDirectCommandAccess) SerializeWithWriteBuffer(ctx context.Conte return errors.Wrap(pushErr, "Error pushing for RequestDirectCommandAccess") } - // Const Field (at) - _atErr := writeBuffer.WriteByte("at", 0x40) - if _atErr != nil { - return errors.Wrap(_atErr, "Error serializing 'at' field") - } + // Const Field (at) + _atErr := writeBuffer.WriteByte("at", 0x40) + if _atErr != nil { + return errors.Wrap(_atErr, "Error serializing 'at' field") + } + + // Manual Field (calData) + _calDataErr := WriteCALData(writeBuffer, m.GetCalData()) + if _calDataErr != nil { + return errors.Wrap(_calDataErr, "Error serializing 'calData' field") + } + // Virtual field + if _calDataDecodedErr := writeBuffer.WriteVirtual(ctx, "calDataDecoded", m.GetCalDataDecoded()); _calDataDecodedErr != nil { + return errors.Wrap(_calDataDecodedErr, "Error serializing 'calDataDecoded' field") + } - // Manual Field (calData) - _calDataErr := WriteCALData(writeBuffer, m.GetCalData()) - if _calDataErr != nil { - return errors.Wrap(_calDataErr, "Error serializing 'calData' field") + // Optional Field (alpha) (Can be skipped, if the value is null) + var alpha Alpha = nil + if m.GetAlpha() != nil { + if pushErr := writeBuffer.PushContext("alpha"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for alpha") } - // Virtual field - if _calDataDecodedErr := writeBuffer.WriteVirtual(ctx, "calDataDecoded", m.GetCalDataDecoded()); _calDataDecodedErr != nil { - return errors.Wrap(_calDataDecodedErr, "Error serializing 'calDataDecoded' field") + alpha = m.GetAlpha() + _alphaErr := writeBuffer.WriteSerializable(ctx, alpha) + if popErr := writeBuffer.PopContext("alpha"); popErr != nil { + return errors.Wrap(popErr, "Error popping for alpha") } - - // Optional Field (alpha) (Can be skipped, if the value is null) - var alpha Alpha = nil - if m.GetAlpha() != nil { - if pushErr := writeBuffer.PushContext("alpha"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for alpha") - } - alpha = m.GetAlpha() - _alphaErr := writeBuffer.WriteSerializable(ctx, alpha) - if popErr := writeBuffer.PopContext("alpha"); popErr != nil { - return errors.Wrap(popErr, "Error popping for alpha") - } - if _alphaErr != nil { - return errors.Wrap(_alphaErr, "Error serializing 'alpha' field") - } + if _alphaErr != nil { + return errors.Wrap(_alphaErr, "Error serializing 'alpha' field") } + } if popErr := writeBuffer.PopContext("RequestDirectCommandAccess"); popErr != nil { return errors.Wrap(popErr, "Error popping for RequestDirectCommandAccess") @@ -309,6 +313,7 @@ func (m *_RequestDirectCommandAccess) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_RequestDirectCommandAccess) isRequestDirectCommandAccess() bool { return true } @@ -323,3 +328,6 @@ func (m *_RequestDirectCommandAccess) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/RequestEmpty.go b/plc4go/protocols/cbus/readwrite/model/RequestEmpty.go index 852f912bdfa..aaa9988d228 100644 --- a/plc4go/protocols/cbus/readwrite/model/RequestEmpty.go +++ b/plc4go/protocols/cbus/readwrite/model/RequestEmpty.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // RequestEmpty is the corresponding interface of RequestEmpty type RequestEmpty interface { @@ -46,6 +48,8 @@ type _RequestEmpty struct { *_Request } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,22 +60,22 @@ type _RequestEmpty struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_RequestEmpty) InitializeParent(parent Request, peekedByte RequestType, startingCR *RequestType, resetMode *RequestType, secondPeek RequestType, termination RequestTermination) { - m.PeekedByte = peekedByte +func (m *_RequestEmpty) InitializeParent(parent Request , peekedByte RequestType , startingCR * RequestType , resetMode * RequestType , secondPeek RequestType , termination RequestTermination ) { m.PeekedByte = peekedByte m.StartingCR = startingCR m.ResetMode = resetMode m.SecondPeek = secondPeek m.Termination = termination } -func (m *_RequestEmpty) GetParent() Request { +func (m *_RequestEmpty) GetParent() Request { return m._Request } + // NewRequestEmpty factory function for _RequestEmpty -func NewRequestEmpty(peekedByte RequestType, startingCR *RequestType, resetMode *RequestType, secondPeek RequestType, termination RequestTermination, cBusOptions CBusOptions) *_RequestEmpty { +func NewRequestEmpty( peekedByte RequestType , startingCR *RequestType , resetMode *RequestType , secondPeek RequestType , termination RequestTermination , cBusOptions CBusOptions ) *_RequestEmpty { _result := &_RequestEmpty{ - _Request: NewRequest(peekedByte, startingCR, resetMode, secondPeek, termination, cBusOptions), + _Request: NewRequest(peekedByte, startingCR, resetMode, secondPeek, termination, cBusOptions), } _result._Request._RequestChildRequirements = _result return _result @@ -79,7 +83,7 @@ func NewRequestEmpty(peekedByte RequestType, startingCR *RequestType, resetMode // Deprecated: use the interface for direct cast func CastRequestEmpty(structType interface{}) RequestEmpty { - if casted, ok := structType.(RequestEmpty); ok { + if casted, ok := structType.(RequestEmpty); ok { return casted } if casted, ok := structType.(*RequestEmpty); ok { @@ -98,6 +102,7 @@ func (m *_RequestEmpty) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_RequestEmpty) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -153,6 +158,7 @@ func (m *_RequestEmpty) SerializeWithWriteBuffer(ctx context.Context, writeBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_RequestEmpty) isRequestEmpty() bool { return true } @@ -167,3 +173,6 @@ func (m *_RequestEmpty) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/RequestNull.go b/plc4go/protocols/cbus/readwrite/model/RequestNull.go index ccb33572ad9..00d21a48212 100644 --- a/plc4go/protocols/cbus/readwrite/model/RequestNull.go +++ b/plc4go/protocols/cbus/readwrite/model/RequestNull.go @@ -19,6 +19,7 @@ package model + import ( "context" "fmt" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const RequestNull_NULLINDICATOR uint32 = 0x6E756C6C @@ -50,6 +52,8 @@ type _RequestNull struct { *_Request } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -60,18 +64,16 @@ type _RequestNull struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_RequestNull) InitializeParent(parent Request, peekedByte RequestType, startingCR *RequestType, resetMode *RequestType, secondPeek RequestType, termination RequestTermination) { - m.PeekedByte = peekedByte +func (m *_RequestNull) InitializeParent(parent Request , peekedByte RequestType , startingCR * RequestType , resetMode * RequestType , secondPeek RequestType , termination RequestTermination ) { m.PeekedByte = peekedByte m.StartingCR = startingCR m.ResetMode = resetMode m.SecondPeek = secondPeek m.Termination = termination } -func (m *_RequestNull) GetParent() Request { +func (m *_RequestNull) GetParent() Request { return m._Request } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for const fields. @@ -86,10 +88,11 @@ func (m *_RequestNull) GetNullIndicator() uint32 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewRequestNull factory function for _RequestNull -func NewRequestNull(peekedByte RequestType, startingCR *RequestType, resetMode *RequestType, secondPeek RequestType, termination RequestTermination, cBusOptions CBusOptions) *_RequestNull { +func NewRequestNull( peekedByte RequestType , startingCR *RequestType , resetMode *RequestType , secondPeek RequestType , termination RequestTermination , cBusOptions CBusOptions ) *_RequestNull { _result := &_RequestNull{ - _Request: NewRequest(peekedByte, startingCR, resetMode, secondPeek, termination, cBusOptions), + _Request: NewRequest(peekedByte, startingCR, resetMode, secondPeek, termination, cBusOptions), } _result._Request._RequestChildRequirements = _result return _result @@ -97,7 +100,7 @@ func NewRequestNull(peekedByte RequestType, startingCR *RequestType, resetMode * // Deprecated: use the interface for direct cast func CastRequestNull(structType interface{}) RequestNull { - if casted, ok := structType.(RequestNull); ok { + if casted, ok := structType.(RequestNull); ok { return casted } if casted, ok := structType.(*RequestNull); ok { @@ -119,6 +122,7 @@ func (m *_RequestNull) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_RequestNull) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -175,11 +179,11 @@ func (m *_RequestNull) SerializeWithWriteBuffer(ctx context.Context, writeBuffer return errors.Wrap(pushErr, "Error pushing for RequestNull") } - // Const Field (nullIndicator) - _nullIndicatorErr := writeBuffer.WriteUint32("nullIndicator", 32, 0x6E756C6C) - if _nullIndicatorErr != nil { - return errors.Wrap(_nullIndicatorErr, "Error serializing 'nullIndicator' field") - } + // Const Field (nullIndicator) + _nullIndicatorErr := writeBuffer.WriteUint32("nullIndicator", 32, 0x6E756C6C) + if _nullIndicatorErr != nil { + return errors.Wrap(_nullIndicatorErr, "Error serializing 'nullIndicator' field") + } if popErr := writeBuffer.PopContext("RequestNull"); popErr != nil { return errors.Wrap(popErr, "Error popping for RequestNull") @@ -189,6 +193,7 @@ func (m *_RequestNull) SerializeWithWriteBuffer(ctx context.Context, writeBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_RequestNull) isRequestNull() bool { return true } @@ -203,3 +208,6 @@ func (m *_RequestNull) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/RequestObsolete.go b/plc4go/protocols/cbus/readwrite/model/RequestObsolete.go index b0c4537b373..51a8c9e1e20 100644 --- a/plc4go/protocols/cbus/readwrite/model/RequestObsolete.go +++ b/plc4go/protocols/cbus/readwrite/model/RequestObsolete.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // RequestObsolete is the corresponding interface of RequestObsolete type RequestObsolete interface { @@ -51,10 +53,12 @@ type RequestObsoleteExactly interface { // _RequestObsolete is the data-structure of this message type _RequestObsolete struct { *_Request - CalData CALData - Alpha Alpha + CalData CALData + Alpha Alpha } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -65,18 +69,16 @@ type _RequestObsolete struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_RequestObsolete) InitializeParent(parent Request, peekedByte RequestType, startingCR *RequestType, resetMode *RequestType, secondPeek RequestType, termination RequestTermination) { - m.PeekedByte = peekedByte +func (m *_RequestObsolete) InitializeParent(parent Request , peekedByte RequestType , startingCR * RequestType , resetMode * RequestType , secondPeek RequestType , termination RequestTermination ) { m.PeekedByte = peekedByte m.StartingCR = startingCR m.ResetMode = resetMode m.SecondPeek = secondPeek m.Termination = termination } -func (m *_RequestObsolete) GetParent() Request { +func (m *_RequestObsolete) GetParent() Request { return m._Request } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -112,12 +114,13 @@ func (m *_RequestObsolete) GetCalDataDecoded() CALData { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewRequestObsolete factory function for _RequestObsolete -func NewRequestObsolete(calData CALData, alpha Alpha, peekedByte RequestType, startingCR *RequestType, resetMode *RequestType, secondPeek RequestType, termination RequestTermination, cBusOptions CBusOptions) *_RequestObsolete { +func NewRequestObsolete( calData CALData , alpha Alpha , peekedByte RequestType , startingCR *RequestType , resetMode *RequestType , secondPeek RequestType , termination RequestTermination , cBusOptions CBusOptions ) *_RequestObsolete { _result := &_RequestObsolete{ - CalData: calData, - Alpha: alpha, - _Request: NewRequest(peekedByte, startingCR, resetMode, secondPeek, termination, cBusOptions), + CalData: calData, + Alpha: alpha, + _Request: NewRequest(peekedByte, startingCR, resetMode, secondPeek, termination, cBusOptions), } _result._Request._RequestChildRequirements = _result return _result @@ -125,7 +128,7 @@ func NewRequestObsolete(calData CALData, alpha Alpha, peekedByte RequestType, st // Deprecated: use the interface for direct cast func CastRequestObsolete(structType interface{}) RequestObsolete { - if casted, ok := structType.(RequestObsolete); ok { + if casted, ok := structType.(RequestObsolete); ok { return casted } if casted, ok := structType.(*RequestObsolete); ok { @@ -154,6 +157,7 @@ func (m *_RequestObsolete) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_RequestObsolete) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -178,7 +182,7 @@ func RequestObsoleteParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu } var calData CALData if _calData != nil { - calData = _calData.(CALData) + calData = _calData.(CALData) } // Virtual field @@ -188,12 +192,12 @@ func RequestObsoleteParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu // Optional Field (alpha) (Can be skipped, if a given expression evaluates to false) var alpha Alpha = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("alpha"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for alpha") } - _val, _err := AlphaParseWithBuffer(ctx, readBuffer) +_val, _err := AlphaParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -218,7 +222,7 @@ func RequestObsoleteParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu CBusOptions: cBusOptions, }, CalData: calData, - Alpha: alpha, + Alpha: alpha, } _child._Request._RequestChildRequirements = _child return _child, nil @@ -240,31 +244,31 @@ func (m *_RequestObsolete) SerializeWithWriteBuffer(ctx context.Context, writeBu return errors.Wrap(pushErr, "Error pushing for RequestObsolete") } - // Manual Field (calData) - _calDataErr := WriteCALData(writeBuffer, m.GetCalData()) - if _calDataErr != nil { - return errors.Wrap(_calDataErr, "Error serializing 'calData' field") + // Manual Field (calData) + _calDataErr := WriteCALData(writeBuffer, m.GetCalData()) + if _calDataErr != nil { + return errors.Wrap(_calDataErr, "Error serializing 'calData' field") + } + // Virtual field + if _calDataDecodedErr := writeBuffer.WriteVirtual(ctx, "calDataDecoded", m.GetCalDataDecoded()); _calDataDecodedErr != nil { + return errors.Wrap(_calDataDecodedErr, "Error serializing 'calDataDecoded' field") + } + + // Optional Field (alpha) (Can be skipped, if the value is null) + var alpha Alpha = nil + if m.GetAlpha() != nil { + if pushErr := writeBuffer.PushContext("alpha"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for alpha") } - // Virtual field - if _calDataDecodedErr := writeBuffer.WriteVirtual(ctx, "calDataDecoded", m.GetCalDataDecoded()); _calDataDecodedErr != nil { - return errors.Wrap(_calDataDecodedErr, "Error serializing 'calDataDecoded' field") + alpha = m.GetAlpha() + _alphaErr := writeBuffer.WriteSerializable(ctx, alpha) + if popErr := writeBuffer.PopContext("alpha"); popErr != nil { + return errors.Wrap(popErr, "Error popping for alpha") } - - // Optional Field (alpha) (Can be skipped, if the value is null) - var alpha Alpha = nil - if m.GetAlpha() != nil { - if pushErr := writeBuffer.PushContext("alpha"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for alpha") - } - alpha = m.GetAlpha() - _alphaErr := writeBuffer.WriteSerializable(ctx, alpha) - if popErr := writeBuffer.PopContext("alpha"); popErr != nil { - return errors.Wrap(popErr, "Error popping for alpha") - } - if _alphaErr != nil { - return errors.Wrap(_alphaErr, "Error serializing 'alpha' field") - } + if _alphaErr != nil { + return errors.Wrap(_alphaErr, "Error serializing 'alpha' field") } + } if popErr := writeBuffer.PopContext("RequestObsolete"); popErr != nil { return errors.Wrap(popErr, "Error popping for RequestObsolete") @@ -274,6 +278,7 @@ func (m *_RequestObsolete) SerializeWithWriteBuffer(ctx context.Context, writeBu return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_RequestObsolete) isRequestObsolete() bool { return true } @@ -288,3 +293,6 @@ func (m *_RequestObsolete) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/RequestReset.go b/plc4go/protocols/cbus/readwrite/model/RequestReset.go index b99e08c2a94..41e9c6a6b92 100644 --- a/plc4go/protocols/cbus/readwrite/model/RequestReset.go +++ b/plc4go/protocols/cbus/readwrite/model/RequestReset.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // RequestReset is the corresponding interface of RequestReset type RequestReset interface { @@ -52,12 +54,14 @@ type RequestResetExactly interface { // _RequestReset is the data-structure of this message type _RequestReset struct { *_Request - TildePeek RequestType - SecondTilde *RequestType - TildePeek2 RequestType - ThirdTilde *RequestType + TildePeek RequestType + SecondTilde *RequestType + TildePeek2 RequestType + ThirdTilde *RequestType } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -68,18 +72,16 @@ type _RequestReset struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_RequestReset) InitializeParent(parent Request, peekedByte RequestType, startingCR *RequestType, resetMode *RequestType, secondPeek RequestType, termination RequestTermination) { - m.PeekedByte = peekedByte +func (m *_RequestReset) InitializeParent(parent Request , peekedByte RequestType , startingCR * RequestType , resetMode * RequestType , secondPeek RequestType , termination RequestTermination ) { m.PeekedByte = peekedByte m.StartingCR = startingCR m.ResetMode = resetMode m.SecondPeek = secondPeek m.Termination = termination } -func (m *_RequestReset) GetParent() Request { +func (m *_RequestReset) GetParent() Request { return m._Request } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -106,14 +108,15 @@ func (m *_RequestReset) GetThirdTilde() *RequestType { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewRequestReset factory function for _RequestReset -func NewRequestReset(tildePeek RequestType, secondTilde *RequestType, tildePeek2 RequestType, thirdTilde *RequestType, peekedByte RequestType, startingCR *RequestType, resetMode *RequestType, secondPeek RequestType, termination RequestTermination, cBusOptions CBusOptions) *_RequestReset { +func NewRequestReset( tildePeek RequestType , secondTilde *RequestType , tildePeek2 RequestType , thirdTilde *RequestType , peekedByte RequestType , startingCR *RequestType , resetMode *RequestType , secondPeek RequestType , termination RequestTermination , cBusOptions CBusOptions ) *_RequestReset { _result := &_RequestReset{ - TildePeek: tildePeek, + TildePeek: tildePeek, SecondTilde: secondTilde, - TildePeek2: tildePeek2, - ThirdTilde: thirdTilde, - _Request: NewRequest(peekedByte, startingCR, resetMode, secondPeek, termination, cBusOptions), + TildePeek2: tildePeek2, + ThirdTilde: thirdTilde, + _Request: NewRequest(peekedByte, startingCR, resetMode, secondPeek, termination, cBusOptions), } _result._Request._RequestChildRequirements = _result return _result @@ -121,7 +124,7 @@ func NewRequestReset(tildePeek RequestType, secondTilde *RequestType, tildePeek2 // Deprecated: use the interface for direct cast func CastRequestReset(structType interface{}) RequestReset { - if casted, ok := structType.(RequestReset); ok { + if casted, ok := structType.(RequestReset); ok { return casted } if casted, ok := structType.(*RequestReset); ok { @@ -150,6 +153,7 @@ func (m *_RequestReset) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_RequestReset) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -167,20 +171,20 @@ func RequestResetParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe currentPos := positionAware.GetPos() _ = currentPos - // Peek Field (tildePeek) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("tildePeek"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for tildePeek") - } - tildePeek, _err := RequestTypeParseWithBuffer(ctx, readBuffer) - if _err != nil { - return nil, errors.Wrap(_err, "Error parsing 'tildePeek' field of RequestReset") - } - if closeErr := readBuffer.CloseContext("tildePeek"); closeErr != nil { - return nil, errors.Wrap(closeErr, "Error closing for tildePeek") - } - - readBuffer.Reset(currentPos) + // Peek Field (tildePeek) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("tildePeek"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for tildePeek") + } + tildePeek, _err := RequestTypeParseWithBuffer(ctx, readBuffer) + if _err != nil { + return nil, errors.Wrap(_err, "Error parsing 'tildePeek' field of RequestReset") + } + if closeErr := readBuffer.CloseContext("tildePeek"); closeErr != nil { + return nil, errors.Wrap(closeErr, "Error closing for tildePeek") + } + + readBuffer.Reset(currentPos) // Optional Field (secondTilde) (Can be skipped, if a given expression evaluates to false) var secondTilde *RequestType = nil @@ -198,20 +202,20 @@ func RequestResetParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe } } - // Peek Field (tildePeek2) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("tildePeek2"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for tildePeek2") - } - tildePeek2, _err := RequestTypeParseWithBuffer(ctx, readBuffer) - if _err != nil { - return nil, errors.Wrap(_err, "Error parsing 'tildePeek2' field of RequestReset") - } - if closeErr := readBuffer.CloseContext("tildePeek2"); closeErr != nil { - return nil, errors.Wrap(closeErr, "Error closing for tildePeek2") - } - - readBuffer.Reset(currentPos) + // Peek Field (tildePeek2) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("tildePeek2"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for tildePeek2") + } + tildePeek2, _err := RequestTypeParseWithBuffer(ctx, readBuffer) + if _err != nil { + return nil, errors.Wrap(_err, "Error parsing 'tildePeek2' field of RequestReset") + } + if closeErr := readBuffer.CloseContext("tildePeek2"); closeErr != nil { + return nil, errors.Wrap(closeErr, "Error closing for tildePeek2") + } + + readBuffer.Reset(currentPos) // Optional Field (thirdTilde) (Can be skipped, if a given expression evaluates to false) var thirdTilde *RequestType = nil @@ -238,10 +242,10 @@ func RequestResetParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe _Request: &_Request{ CBusOptions: cBusOptions, }, - TildePeek: tildePeek, + TildePeek: tildePeek, SecondTilde: secondTilde, - TildePeek2: tildePeek2, - ThirdTilde: thirdTilde, + TildePeek2: tildePeek2, + ThirdTilde: thirdTilde, } _child._Request._RequestChildRequirements = _child return _child, nil @@ -263,37 +267,37 @@ func (m *_RequestReset) SerializeWithWriteBuffer(ctx context.Context, writeBuffe return errors.Wrap(pushErr, "Error pushing for RequestReset") } - // Optional Field (secondTilde) (Can be skipped, if the value is null) - var secondTilde *RequestType = nil - if m.GetSecondTilde() != nil { - if pushErr := writeBuffer.PushContext("secondTilde"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for secondTilde") - } - secondTilde = m.GetSecondTilde() - _secondTildeErr := writeBuffer.WriteSerializable(ctx, secondTilde) - if popErr := writeBuffer.PopContext("secondTilde"); popErr != nil { - return errors.Wrap(popErr, "Error popping for secondTilde") - } - if _secondTildeErr != nil { - return errors.Wrap(_secondTildeErr, "Error serializing 'secondTilde' field") - } + // Optional Field (secondTilde) (Can be skipped, if the value is null) + var secondTilde *RequestType = nil + if m.GetSecondTilde() != nil { + if pushErr := writeBuffer.PushContext("secondTilde"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for secondTilde") + } + secondTilde = m.GetSecondTilde() + _secondTildeErr := writeBuffer.WriteSerializable(ctx, secondTilde) + if popErr := writeBuffer.PopContext("secondTilde"); popErr != nil { + return errors.Wrap(popErr, "Error popping for secondTilde") + } + if _secondTildeErr != nil { + return errors.Wrap(_secondTildeErr, "Error serializing 'secondTilde' field") } + } - // Optional Field (thirdTilde) (Can be skipped, if the value is null) - var thirdTilde *RequestType = nil - if m.GetThirdTilde() != nil { - if pushErr := writeBuffer.PushContext("thirdTilde"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for thirdTilde") - } - thirdTilde = m.GetThirdTilde() - _thirdTildeErr := writeBuffer.WriteSerializable(ctx, thirdTilde) - if popErr := writeBuffer.PopContext("thirdTilde"); popErr != nil { - return errors.Wrap(popErr, "Error popping for thirdTilde") - } - if _thirdTildeErr != nil { - return errors.Wrap(_thirdTildeErr, "Error serializing 'thirdTilde' field") - } + // Optional Field (thirdTilde) (Can be skipped, if the value is null) + var thirdTilde *RequestType = nil + if m.GetThirdTilde() != nil { + if pushErr := writeBuffer.PushContext("thirdTilde"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for thirdTilde") + } + thirdTilde = m.GetThirdTilde() + _thirdTildeErr := writeBuffer.WriteSerializable(ctx, thirdTilde) + if popErr := writeBuffer.PopContext("thirdTilde"); popErr != nil { + return errors.Wrap(popErr, "Error popping for thirdTilde") } + if _thirdTildeErr != nil { + return errors.Wrap(_thirdTildeErr, "Error serializing 'thirdTilde' field") + } + } if popErr := writeBuffer.PopContext("RequestReset"); popErr != nil { return errors.Wrap(popErr, "Error popping for RequestReset") @@ -303,6 +307,7 @@ func (m *_RequestReset) SerializeWithWriteBuffer(ctx context.Context, writeBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_RequestReset) isRequestReset() bool { return true } @@ -317,3 +322,6 @@ func (m *_RequestReset) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/RequestSmartConnectShortcut.go b/plc4go/protocols/cbus/readwrite/model/RequestSmartConnectShortcut.go index 4c0eebd8fb5..596634ee874 100644 --- a/plc4go/protocols/cbus/readwrite/model/RequestSmartConnectShortcut.go +++ b/plc4go/protocols/cbus/readwrite/model/RequestSmartConnectShortcut.go @@ -19,6 +19,7 @@ package model + import ( "context" "fmt" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const RequestSmartConnectShortcut_PIPE byte = 0x7C @@ -52,10 +54,12 @@ type RequestSmartConnectShortcutExactly interface { // _RequestSmartConnectShortcut is the data-structure of this message type _RequestSmartConnectShortcut struct { *_Request - PipePeek RequestType - SecondPipe *byte + PipePeek RequestType + SecondPipe *byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -66,18 +70,16 @@ type _RequestSmartConnectShortcut struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_RequestSmartConnectShortcut) InitializeParent(parent Request, peekedByte RequestType, startingCR *RequestType, resetMode *RequestType, secondPeek RequestType, termination RequestTermination) { - m.PeekedByte = peekedByte +func (m *_RequestSmartConnectShortcut) InitializeParent(parent Request , peekedByte RequestType , startingCR * RequestType , resetMode * RequestType , secondPeek RequestType , termination RequestTermination ) { m.PeekedByte = peekedByte m.StartingCR = startingCR m.ResetMode = resetMode m.SecondPeek = secondPeek m.Termination = termination } -func (m *_RequestSmartConnectShortcut) GetParent() Request { +func (m *_RequestSmartConnectShortcut) GetParent() Request { return m._Request } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -109,12 +111,13 @@ func (m *_RequestSmartConnectShortcut) GetPipe() byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewRequestSmartConnectShortcut factory function for _RequestSmartConnectShortcut -func NewRequestSmartConnectShortcut(pipePeek RequestType, secondPipe *byte, peekedByte RequestType, startingCR *RequestType, resetMode *RequestType, secondPeek RequestType, termination RequestTermination, cBusOptions CBusOptions) *_RequestSmartConnectShortcut { +func NewRequestSmartConnectShortcut( pipePeek RequestType , secondPipe *byte , peekedByte RequestType , startingCR *RequestType , resetMode *RequestType , secondPeek RequestType , termination RequestTermination , cBusOptions CBusOptions ) *_RequestSmartConnectShortcut { _result := &_RequestSmartConnectShortcut{ - PipePeek: pipePeek, + PipePeek: pipePeek, SecondPipe: secondPipe, - _Request: NewRequest(peekedByte, startingCR, resetMode, secondPeek, termination, cBusOptions), + _Request: NewRequest(peekedByte, startingCR, resetMode, secondPeek, termination, cBusOptions), } _result._Request._RequestChildRequirements = _result return _result @@ -122,7 +125,7 @@ func NewRequestSmartConnectShortcut(pipePeek RequestType, secondPipe *byte, peek // Deprecated: use the interface for direct cast func CastRequestSmartConnectShortcut(structType interface{}) RequestSmartConnectShortcut { - if casted, ok := structType.(RequestSmartConnectShortcut); ok { + if casted, ok := structType.(RequestSmartConnectShortcut); ok { return casted } if casted, ok := structType.(*RequestSmartConnectShortcut); ok { @@ -149,6 +152,7 @@ func (m *_RequestSmartConnectShortcut) GetLengthInBits(ctx context.Context) uint return lengthInBits } + func (m *_RequestSmartConnectShortcut) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -175,20 +179,20 @@ func RequestSmartConnectShortcutParseWithBuffer(ctx context.Context, readBuffer return nil, errors.New("Expected constant value " + fmt.Sprintf("%d", RequestSmartConnectShortcut_PIPE) + " but got " + fmt.Sprintf("%d", pipe)) } - // Peek Field (pipePeek) - currentPos = positionAware.GetPos() - if pullErr := readBuffer.PullContext("pipePeek"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for pipePeek") - } - pipePeek, _err := RequestTypeParseWithBuffer(ctx, readBuffer) - if _err != nil { - return nil, errors.Wrap(_err, "Error parsing 'pipePeek' field of RequestSmartConnectShortcut") - } - if closeErr := readBuffer.CloseContext("pipePeek"); closeErr != nil { - return nil, errors.Wrap(closeErr, "Error closing for pipePeek") - } - - readBuffer.Reset(currentPos) + // Peek Field (pipePeek) + currentPos = positionAware.GetPos() + if pullErr := readBuffer.PullContext("pipePeek"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for pipePeek") + } + pipePeek, _err := RequestTypeParseWithBuffer(ctx, readBuffer) + if _err != nil { + return nil, errors.Wrap(_err, "Error parsing 'pipePeek' field of RequestSmartConnectShortcut") + } + if closeErr := readBuffer.CloseContext("pipePeek"); closeErr != nil { + return nil, errors.Wrap(closeErr, "Error closing for pipePeek") + } + + readBuffer.Reset(currentPos) // Optional Field (secondPipe) (Can be skipped, if a given expression evaluates to false) var secondPipe *byte = nil @@ -209,7 +213,7 @@ func RequestSmartConnectShortcutParseWithBuffer(ctx context.Context, readBuffer _Request: &_Request{ CBusOptions: cBusOptions, }, - PipePeek: pipePeek, + PipePeek: pipePeek, SecondPipe: secondPipe, } _child._Request._RequestChildRequirements = _child @@ -232,21 +236,21 @@ func (m *_RequestSmartConnectShortcut) SerializeWithWriteBuffer(ctx context.Cont return errors.Wrap(pushErr, "Error pushing for RequestSmartConnectShortcut") } - // Const Field (pipe) - _pipeErr := writeBuffer.WriteByte("pipe", 0x7C) - if _pipeErr != nil { - return errors.Wrap(_pipeErr, "Error serializing 'pipe' field") - } + // Const Field (pipe) + _pipeErr := writeBuffer.WriteByte("pipe", 0x7C) + if _pipeErr != nil { + return errors.Wrap(_pipeErr, "Error serializing 'pipe' field") + } - // Optional Field (secondPipe) (Can be skipped, if the value is null) - var secondPipe *byte = nil - if m.GetSecondPipe() != nil { - secondPipe = m.GetSecondPipe() - _secondPipeErr := writeBuffer.WriteByte("secondPipe", *(secondPipe)) - if _secondPipeErr != nil { - return errors.Wrap(_secondPipeErr, "Error serializing 'secondPipe' field") - } + // Optional Field (secondPipe) (Can be skipped, if the value is null) + var secondPipe *byte = nil + if m.GetSecondPipe() != nil { + secondPipe = m.GetSecondPipe() + _secondPipeErr := writeBuffer.WriteByte("secondPipe", *(secondPipe)) + if _secondPipeErr != nil { + return errors.Wrap(_secondPipeErr, "Error serializing 'secondPipe' field") } + } if popErr := writeBuffer.PopContext("RequestSmartConnectShortcut"); popErr != nil { return errors.Wrap(popErr, "Error popping for RequestSmartConnectShortcut") @@ -256,6 +260,7 @@ func (m *_RequestSmartConnectShortcut) SerializeWithWriteBuffer(ctx context.Cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_RequestSmartConnectShortcut) isRequestSmartConnectShortcut() bool { return true } @@ -270,3 +275,6 @@ func (m *_RequestSmartConnectShortcut) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/RequestTermination.go b/plc4go/protocols/cbus/readwrite/model/RequestTermination.go index c667d0b79d9..d1d2b407c29 100644 --- a/plc4go/protocols/cbus/readwrite/model/RequestTermination.go +++ b/plc4go/protocols/cbus/readwrite/model/RequestTermination.go @@ -19,6 +19,7 @@ package model + import ( "context" "fmt" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const RequestTermination_CR byte = 0x0D @@ -48,6 +50,7 @@ type RequestTerminationExactly interface { type _RequestTermination struct { } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for const fields. @@ -62,14 +65,15 @@ func (m *_RequestTermination) GetCr() byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewRequestTermination factory function for _RequestTermination -func NewRequestTermination() *_RequestTermination { - return &_RequestTermination{} +func NewRequestTermination( ) *_RequestTermination { +return &_RequestTermination{ } } // Deprecated: use the interface for direct cast func CastRequestTermination(structType interface{}) RequestTermination { - if casted, ok := structType.(RequestTermination); ok { + if casted, ok := structType.(RequestTermination); ok { return casted } if casted, ok := structType.(*RequestTermination); ok { @@ -91,6 +95,7 @@ func (m *_RequestTermination) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_RequestTermination) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +127,8 @@ func RequestTerminationParseWithBuffer(ctx context.Context, readBuffer utils.Rea } // Create the instance - return &_RequestTermination{}, nil + return &_RequestTermination{ + }, nil } func (m *_RequestTermination) Serialize() ([]byte, error) { @@ -136,7 +142,7 @@ func (m *_RequestTermination) Serialize() ([]byte, error) { func (m *_RequestTermination) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("RequestTermination"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("RequestTermination"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for RequestTermination") } @@ -152,6 +158,7 @@ func (m *_RequestTermination) SerializeWithWriteBuffer(ctx context.Context, writ return nil } + func (m *_RequestTermination) isRequestTermination() bool { return true } @@ -166,3 +173,6 @@ func (m *_RequestTermination) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/RequestType.go b/plc4go/protocols/cbus/readwrite/model/RequestType.go index 055e10f7a5e..dc90eee3fba 100644 --- a/plc4go/protocols/cbus/readwrite/model/RequestType.go +++ b/plc4go/protocols/cbus/readwrite/model/RequestType.go @@ -35,21 +35,21 @@ type IRequestType interface { ControlChar() uint8 } -const ( - RequestType_UNKNOWN RequestType = 0x00 +const( + RequestType_UNKNOWN RequestType = 0x00 RequestType_SMART_CONNECT_SHORTCUT RequestType = 0x7C - RequestType_RESET RequestType = 0x7E - RequestType_DIRECT_COMMAND RequestType = 0x40 - RequestType_REQUEST_COMMAND RequestType = 0x5C - RequestType_NULL RequestType = 0x6E - RequestType_EMPTY RequestType = 0x0D + RequestType_RESET RequestType = 0x7E + RequestType_DIRECT_COMMAND RequestType = 0x40 + RequestType_REQUEST_COMMAND RequestType = 0x5C + RequestType_NULL RequestType = 0x6E + RequestType_EMPTY RequestType = 0x0D ) var RequestTypeValues []RequestType func init() { _ = errors.New - RequestTypeValues = []RequestType{ + RequestTypeValues = []RequestType { RequestType_UNKNOWN, RequestType_SMART_CONNECT_SHORTCUT, RequestType_RESET, @@ -60,38 +60,31 @@ func init() { } } + func (e RequestType) ControlChar() uint8 { - switch e { - case 0x00: - { /* '0x00' */ - return 0x00 + switch e { + case 0x00: { /* '0x00' */ + return 0x00 } - case 0x0D: - { /* '0x0D' */ - return 0x00 + case 0x0D: { /* '0x0D' */ + return 0x00 } - case 0x40: - { /* '0x40' */ - return 0x40 + case 0x40: { /* '0x40' */ + return 0x40 } - case 0x5C: - { /* '0x5C' */ - return 0x5C + case 0x5C: { /* '0x5C' */ + return 0x5C } - case 0x6E: - { /* '0x6E' */ - return 0x00 + case 0x6E: { /* '0x6E' */ + return 0x00 } - case 0x7C: - { /* '0x7C' */ - return 0x7C + case 0x7C: { /* '0x7C' */ + return 0x7C } - case 0x7E: - { /* '0x7E' */ - return 0x7E + case 0x7E: { /* '0x7E' */ + return 0x7E } - default: - { + default: { return 0 } } @@ -107,20 +100,20 @@ func RequestTypeFirstEnumForFieldControlChar(value uint8) (RequestType, error) { } func RequestTypeByValue(value uint8) (enum RequestType, ok bool) { switch value { - case 0x00: - return RequestType_UNKNOWN, true - case 0x0D: - return RequestType_EMPTY, true - case 0x40: - return RequestType_DIRECT_COMMAND, true - case 0x5C: - return RequestType_REQUEST_COMMAND, true - case 0x6E: - return RequestType_NULL, true - case 0x7C: - return RequestType_SMART_CONNECT_SHORTCUT, true - case 0x7E: - return RequestType_RESET, true + case 0x00: + return RequestType_UNKNOWN, true + case 0x0D: + return RequestType_EMPTY, true + case 0x40: + return RequestType_DIRECT_COMMAND, true + case 0x5C: + return RequestType_REQUEST_COMMAND, true + case 0x6E: + return RequestType_NULL, true + case 0x7C: + return RequestType_SMART_CONNECT_SHORTCUT, true + case 0x7E: + return RequestType_RESET, true } return 0, false } @@ -145,13 +138,13 @@ func RequestTypeByName(value string) (enum RequestType, ok bool) { return 0, false } -func RequestTypeKnows(value uint8) bool { +func RequestTypeKnows(value uint8) bool { for _, typeValue := range RequestTypeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastRequestType(structType interface{}) RequestType { @@ -225,3 +218,4 @@ func (e RequestType) PLC4XEnumName() string { func (e RequestType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/ResponseTermination.go b/plc4go/protocols/cbus/readwrite/model/ResponseTermination.go index 77471374e25..aa56498d80b 100644 --- a/plc4go/protocols/cbus/readwrite/model/ResponseTermination.go +++ b/plc4go/protocols/cbus/readwrite/model/ResponseTermination.go @@ -19,6 +19,7 @@ package model + import ( "context" "fmt" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const ResponseTermination_CR byte = 0x0D @@ -49,6 +51,7 @@ type ResponseTerminationExactly interface { type _ResponseTermination struct { } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for const fields. @@ -67,14 +70,15 @@ func (m *_ResponseTermination) GetLf() byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewResponseTermination factory function for _ResponseTermination -func NewResponseTermination() *_ResponseTermination { - return &_ResponseTermination{} +func NewResponseTermination( ) *_ResponseTermination { +return &_ResponseTermination{ } } // Deprecated: use the interface for direct cast func CastResponseTermination(structType interface{}) ResponseTermination { - if casted, ok := structType.(ResponseTermination); ok { + if casted, ok := structType.(ResponseTermination); ok { return casted } if casted, ok := structType.(*ResponseTermination); ok { @@ -99,6 +103,7 @@ func (m *_ResponseTermination) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_ResponseTermination) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +144,8 @@ func ResponseTerminationParseWithBuffer(ctx context.Context, readBuffer utils.Re } // Create the instance - return &_ResponseTermination{}, nil + return &_ResponseTermination{ + }, nil } func (m *_ResponseTermination) Serialize() ([]byte, error) { @@ -153,7 +159,7 @@ func (m *_ResponseTermination) Serialize() ([]byte, error) { func (m *_ResponseTermination) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("ResponseTermination"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("ResponseTermination"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for ResponseTermination") } @@ -175,6 +181,7 @@ func (m *_ResponseTermination) SerializeWithWriteBuffer(ctx context.Context, wri return nil } + func (m *_ResponseTermination) isResponseTermination() bool { return true } @@ -189,3 +196,6 @@ func (m *_ResponseTermination) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SALData.go b/plc4go/protocols/cbus/readwrite/model/SALData.go index d57bfc0cff0..d2622c417fc 100644 --- a/plc4go/protocols/cbus/readwrite/model/SALData.go +++ b/plc4go/protocols/cbus/readwrite/model/SALData.go @@ -19,6 +19,7 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" @@ -26,7 +27,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SALData is the corresponding interface of SALData type SALData interface { @@ -48,7 +50,7 @@ type SALDataExactly interface { // _SALData is the data-structure of this message type _SALData struct { _SALDataChildRequirements - SalData SALData + SalData SALData } type _SALDataChildRequirements interface { @@ -57,6 +59,7 @@ type _SALDataChildRequirements interface { GetApplicationId() ApplicationId } + type SALDataParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child SALData, serializeChildFunction func() error) error GetTypeName() string @@ -64,13 +67,12 @@ type SALDataParent interface { type SALDataChild interface { utils.Serializable - InitializeParent(parent SALData, salData SALData) +InitializeParent(parent SALData , salData SALData ) GetParent() *SALData GetTypeName() string SALData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -85,14 +87,15 @@ func (m *_SALData) GetSalData() SALData { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSALData factory function for _SALData -func NewSALData(salData SALData) *_SALData { - return &_SALData{SalData: salData} +func NewSALData( salData SALData ) *_SALData { +return &_SALData{ SalData: salData } } // Deprecated: use the interface for direct cast func CastSALData(structType interface{}) SALData { - if casted, ok := structType.(SALData); ok { + if casted, ok := structType.(SALData); ok { return casted } if casted, ok := structType.(*SALData); ok { @@ -105,6 +108,7 @@ func (m *_SALData) GetTypeName() string { return "SALData" } + func (m *_SALData) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -136,58 +140,58 @@ func SALDataParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, ap // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type SALDataChildSerializeRequirement interface { SALData - InitializeParent(SALData, SALData) + InitializeParent(SALData, SALData) GetParent() SALData } var _childTemp interface{} var _child SALDataChildSerializeRequirement var typeSwitchError error switch { - case applicationId == ApplicationId_RESERVED: // SALDataReserved +case applicationId == ApplicationId_RESERVED : // SALDataReserved _childTemp, typeSwitchError = SALDataReservedParseWithBuffer(ctx, readBuffer, applicationId) - case applicationId == ApplicationId_FREE_USAGE: // SALDataFreeUsage +case applicationId == ApplicationId_FREE_USAGE : // SALDataFreeUsage _childTemp, typeSwitchError = SALDataFreeUsageParseWithBuffer(ctx, readBuffer, applicationId) - case applicationId == ApplicationId_TEMPERATURE_BROADCAST: // SALDataTemperatureBroadcast +case applicationId == ApplicationId_TEMPERATURE_BROADCAST : // SALDataTemperatureBroadcast _childTemp, typeSwitchError = SALDataTemperatureBroadcastParseWithBuffer(ctx, readBuffer, applicationId) - case applicationId == ApplicationId_ROOM_CONTROL_SYSTEM: // SALDataRoomControlSystem +case applicationId == ApplicationId_ROOM_CONTROL_SYSTEM : // SALDataRoomControlSystem _childTemp, typeSwitchError = SALDataRoomControlSystemParseWithBuffer(ctx, readBuffer, applicationId) - case applicationId == ApplicationId_LIGHTING: // SALDataLighting +case applicationId == ApplicationId_LIGHTING : // SALDataLighting _childTemp, typeSwitchError = SALDataLightingParseWithBuffer(ctx, readBuffer, applicationId) - case applicationId == ApplicationId_VENTILATION: // SALDataVentilation +case applicationId == ApplicationId_VENTILATION : // SALDataVentilation _childTemp, typeSwitchError = SALDataVentilationParseWithBuffer(ctx, readBuffer, applicationId) - case applicationId == ApplicationId_IRRIGATION_CONTROL: // SALDataIrrigationControl +case applicationId == ApplicationId_IRRIGATION_CONTROL : // SALDataIrrigationControl _childTemp, typeSwitchError = SALDataIrrigationControlParseWithBuffer(ctx, readBuffer, applicationId) - case applicationId == ApplicationId_POOLS_SPAS_PONDS_FOUNTAINS_CONTROL: // SALDataPoolsSpasPondsFountainsControl +case applicationId == ApplicationId_POOLS_SPAS_PONDS_FOUNTAINS_CONTROL : // SALDataPoolsSpasPondsFountainsControl _childTemp, typeSwitchError = SALDataPoolsSpasPondsFountainsControlParseWithBuffer(ctx, readBuffer, applicationId) - case applicationId == ApplicationId_HEATING: // SALDataHeating +case applicationId == ApplicationId_HEATING : // SALDataHeating _childTemp, typeSwitchError = SALDataHeatingParseWithBuffer(ctx, readBuffer, applicationId) - case applicationId == ApplicationId_AIR_CONDITIONING: // SALDataAirConditioning +case applicationId == ApplicationId_AIR_CONDITIONING : // SALDataAirConditioning _childTemp, typeSwitchError = SALDataAirConditioningParseWithBuffer(ctx, readBuffer, applicationId) - case applicationId == ApplicationId_TRIGGER_CONTROL: // SALDataTriggerControl +case applicationId == ApplicationId_TRIGGER_CONTROL : // SALDataTriggerControl _childTemp, typeSwitchError = SALDataTriggerControlParseWithBuffer(ctx, readBuffer, applicationId) - case applicationId == ApplicationId_ENABLE_CONTROL: // SALDataEnableControl +case applicationId == ApplicationId_ENABLE_CONTROL : // SALDataEnableControl _childTemp, typeSwitchError = SALDataEnableControlParseWithBuffer(ctx, readBuffer, applicationId) - case applicationId == ApplicationId_AUDIO_AND_VIDEO: // SALDataAudioAndVideo +case applicationId == ApplicationId_AUDIO_AND_VIDEO : // SALDataAudioAndVideo _childTemp, typeSwitchError = SALDataAudioAndVideoParseWithBuffer(ctx, readBuffer, applicationId) - case applicationId == ApplicationId_SECURITY: // SALDataSecurity +case applicationId == ApplicationId_SECURITY : // SALDataSecurity _childTemp, typeSwitchError = SALDataSecurityParseWithBuffer(ctx, readBuffer, applicationId) - case applicationId == ApplicationId_METERING: // SALDataMetering +case applicationId == ApplicationId_METERING : // SALDataMetering _childTemp, typeSwitchError = SALDataMeteringParseWithBuffer(ctx, readBuffer, applicationId) - case applicationId == ApplicationId_ACCESS_CONTROL: // SALDataAccessControl +case applicationId == ApplicationId_ACCESS_CONTROL : // SALDataAccessControl _childTemp, typeSwitchError = SALDataAccessControlParseWithBuffer(ctx, readBuffer, applicationId) - case applicationId == ApplicationId_CLOCK_AND_TIMEKEEPING: // SALDataClockAndTimekeeping +case applicationId == ApplicationId_CLOCK_AND_TIMEKEEPING : // SALDataClockAndTimekeeping _childTemp, typeSwitchError = SALDataClockAndTimekeepingParseWithBuffer(ctx, readBuffer, applicationId) - case applicationId == ApplicationId_TELEPHONY_STATUS_AND_CONTROL: // SALDataTelephonyStatusAndControl +case applicationId == ApplicationId_TELEPHONY_STATUS_AND_CONTROL : // SALDataTelephonyStatusAndControl _childTemp, typeSwitchError = SALDataTelephonyStatusAndControlParseWithBuffer(ctx, readBuffer, applicationId) - case applicationId == ApplicationId_MEASUREMENT: // SALDataMeasurement +case applicationId == ApplicationId_MEASUREMENT : // SALDataMeasurement _childTemp, typeSwitchError = SALDataMeasurementParseWithBuffer(ctx, readBuffer, applicationId) - case applicationId == ApplicationId_TESTING: // SALDataTesting +case applicationId == ApplicationId_TESTING : // SALDataTesting _childTemp, typeSwitchError = SALDataTestingParseWithBuffer(ctx, readBuffer, applicationId) - case applicationId == ApplicationId_MEDIA_TRANSPORT_CONTROL: // SALDataMediaTransport +case applicationId == ApplicationId_MEDIA_TRANSPORT_CONTROL : // SALDataMediaTransport _childTemp, typeSwitchError = SALDataMediaTransportParseWithBuffer(ctx, readBuffer, applicationId) - case applicationId == ApplicationId_ERROR_REPORTING: // SALDataErrorReporting +case applicationId == ApplicationId_ERROR_REPORTING : // SALDataErrorReporting _childTemp, typeSwitchError = SALDataErrorReportingParseWithBuffer(ctx, readBuffer, applicationId) - case applicationId == ApplicationId_HVAC_ACTUATOR: // SALDataHvacActuator +case applicationId == ApplicationId_HVAC_ACTUATOR : // SALDataHvacActuator _childTemp, typeSwitchError = SALDataHvacActuatorParseWithBuffer(ctx, readBuffer, applicationId) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [applicationId=%v]", applicationId) @@ -199,12 +203,12 @@ func SALDataParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, ap // Optional Field (salData) (Can be skipped, if a given expression evaluates to false) var salData SALData = nil - { +{ currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("salData"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for salData") } - _val, _err := SALDataParseWithBuffer(ctx, readBuffer, applicationId) +_val, _err := SALDataParseWithBuffer(ctx, readBuffer , applicationId ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -224,7 +228,7 @@ func SALDataParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, ap } // Finish initializing - _child.InitializeParent(_child, salData) +_child.InitializeParent(_child , salData ) return _child, nil } @@ -234,7 +238,7 @@ func (pm *_SALData) SerializeParent(ctx context.Context, writeBuffer utils.Write _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("SALData"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("SALData"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for SALData") } @@ -265,6 +269,7 @@ func (pm *_SALData) SerializeParent(ctx context.Context, writeBuffer utils.Write return nil } + func (m *_SALData) isSALData() bool { return true } @@ -279,3 +284,6 @@ func (m *_SALData) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SALDataAccessControl.go b/plc4go/protocols/cbus/readwrite/model/SALDataAccessControl.go index 4de0e75d448..5dd7e12663b 100644 --- a/plc4go/protocols/cbus/readwrite/model/SALDataAccessControl.go +++ b/plc4go/protocols/cbus/readwrite/model/SALDataAccessControl.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SALDataAccessControl is the corresponding interface of SALDataAccessControl type SALDataAccessControl interface { @@ -46,31 +48,30 @@ type SALDataAccessControlExactly interface { // _SALDataAccessControl is the data-structure of this message type _SALDataAccessControl struct { *_SALData - AccessControlData AccessControlData + AccessControlData AccessControlData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SALDataAccessControl) GetApplicationId() ApplicationId { - return ApplicationId_ACCESS_CONTROL -} +func (m *_SALDataAccessControl) GetApplicationId() ApplicationId { +return ApplicationId_ACCESS_CONTROL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SALDataAccessControl) InitializeParent(parent SALData, salData SALData) { - m.SalData = salData +func (m *_SALDataAccessControl) InitializeParent(parent SALData , salData SALData ) { m.SalData = salData } -func (m *_SALDataAccessControl) GetParent() SALData { +func (m *_SALDataAccessControl) GetParent() SALData { return m._SALData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -85,11 +86,12 @@ func (m *_SALDataAccessControl) GetAccessControlData() AccessControlData { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSALDataAccessControl factory function for _SALDataAccessControl -func NewSALDataAccessControl(accessControlData AccessControlData, salData SALData) *_SALDataAccessControl { +func NewSALDataAccessControl( accessControlData AccessControlData , salData SALData ) *_SALDataAccessControl { _result := &_SALDataAccessControl{ AccessControlData: accessControlData, - _SALData: NewSALData(salData), + _SALData: NewSALData(salData), } _result._SALData._SALDataChildRequirements = _result return _result @@ -97,7 +99,7 @@ func NewSALDataAccessControl(accessControlData AccessControlData, salData SALDat // Deprecated: use the interface for direct cast func CastSALDataAccessControl(structType interface{}) SALDataAccessControl { - if casted, ok := structType.(SALDataAccessControl); ok { + if casted, ok := structType.(SALDataAccessControl); ok { return casted } if casted, ok := structType.(*SALDataAccessControl); ok { @@ -119,6 +121,7 @@ func (m *_SALDataAccessControl) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_SALDataAccessControl) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -140,7 +143,7 @@ func SALDataAccessControlParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("accessControlData"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for accessControlData") } - _accessControlData, _accessControlDataErr := AccessControlDataParseWithBuffer(ctx, readBuffer) +_accessControlData, _accessControlDataErr := AccessControlDataParseWithBuffer(ctx, readBuffer) if _accessControlDataErr != nil { return nil, errors.Wrap(_accessControlDataErr, "Error parsing 'accessControlData' field of SALDataAccessControl") } @@ -155,7 +158,8 @@ func SALDataAccessControlParseWithBuffer(ctx context.Context, readBuffer utils.R // Create a partially initialized instance _child := &_SALDataAccessControl{ - _SALData: &_SALData{}, + _SALData: &_SALData{ + }, AccessControlData: accessControlData, } _child._SALData._SALDataChildRequirements = _child @@ -178,17 +182,17 @@ func (m *_SALDataAccessControl) SerializeWithWriteBuffer(ctx context.Context, wr return errors.Wrap(pushErr, "Error pushing for SALDataAccessControl") } - // Simple Field (accessControlData) - if pushErr := writeBuffer.PushContext("accessControlData"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for accessControlData") - } - _accessControlDataErr := writeBuffer.WriteSerializable(ctx, m.GetAccessControlData()) - if popErr := writeBuffer.PopContext("accessControlData"); popErr != nil { - return errors.Wrap(popErr, "Error popping for accessControlData") - } - if _accessControlDataErr != nil { - return errors.Wrap(_accessControlDataErr, "Error serializing 'accessControlData' field") - } + // Simple Field (accessControlData) + if pushErr := writeBuffer.PushContext("accessControlData"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for accessControlData") + } + _accessControlDataErr := writeBuffer.WriteSerializable(ctx, m.GetAccessControlData()) + if popErr := writeBuffer.PopContext("accessControlData"); popErr != nil { + return errors.Wrap(popErr, "Error popping for accessControlData") + } + if _accessControlDataErr != nil { + return errors.Wrap(_accessControlDataErr, "Error serializing 'accessControlData' field") + } if popErr := writeBuffer.PopContext("SALDataAccessControl"); popErr != nil { return errors.Wrap(popErr, "Error popping for SALDataAccessControl") @@ -198,6 +202,7 @@ func (m *_SALDataAccessControl) SerializeWithWriteBuffer(ctx context.Context, wr return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SALDataAccessControl) isSALDataAccessControl() bool { return true } @@ -212,3 +217,6 @@ func (m *_SALDataAccessControl) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SALDataAirConditioning.go b/plc4go/protocols/cbus/readwrite/model/SALDataAirConditioning.go index 6ec28373ec4..0a9da2d62de 100644 --- a/plc4go/protocols/cbus/readwrite/model/SALDataAirConditioning.go +++ b/plc4go/protocols/cbus/readwrite/model/SALDataAirConditioning.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SALDataAirConditioning is the corresponding interface of SALDataAirConditioning type SALDataAirConditioning interface { @@ -46,31 +48,30 @@ type SALDataAirConditioningExactly interface { // _SALDataAirConditioning is the data-structure of this message type _SALDataAirConditioning struct { *_SALData - AirConditioningData AirConditioningData + AirConditioningData AirConditioningData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SALDataAirConditioning) GetApplicationId() ApplicationId { - return ApplicationId_AIR_CONDITIONING -} +func (m *_SALDataAirConditioning) GetApplicationId() ApplicationId { +return ApplicationId_AIR_CONDITIONING} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SALDataAirConditioning) InitializeParent(parent SALData, salData SALData) { - m.SalData = salData +func (m *_SALDataAirConditioning) InitializeParent(parent SALData , salData SALData ) { m.SalData = salData } -func (m *_SALDataAirConditioning) GetParent() SALData { +func (m *_SALDataAirConditioning) GetParent() SALData { return m._SALData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -85,11 +86,12 @@ func (m *_SALDataAirConditioning) GetAirConditioningData() AirConditioningData { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSALDataAirConditioning factory function for _SALDataAirConditioning -func NewSALDataAirConditioning(airConditioningData AirConditioningData, salData SALData) *_SALDataAirConditioning { +func NewSALDataAirConditioning( airConditioningData AirConditioningData , salData SALData ) *_SALDataAirConditioning { _result := &_SALDataAirConditioning{ AirConditioningData: airConditioningData, - _SALData: NewSALData(salData), + _SALData: NewSALData(salData), } _result._SALData._SALDataChildRequirements = _result return _result @@ -97,7 +99,7 @@ func NewSALDataAirConditioning(airConditioningData AirConditioningData, salData // Deprecated: use the interface for direct cast func CastSALDataAirConditioning(structType interface{}) SALDataAirConditioning { - if casted, ok := structType.(SALDataAirConditioning); ok { + if casted, ok := structType.(SALDataAirConditioning); ok { return casted } if casted, ok := structType.(*SALDataAirConditioning); ok { @@ -119,6 +121,7 @@ func (m *_SALDataAirConditioning) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_SALDataAirConditioning) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -140,7 +143,7 @@ func SALDataAirConditioningParseWithBuffer(ctx context.Context, readBuffer utils if pullErr := readBuffer.PullContext("airConditioningData"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for airConditioningData") } - _airConditioningData, _airConditioningDataErr := AirConditioningDataParseWithBuffer(ctx, readBuffer) +_airConditioningData, _airConditioningDataErr := AirConditioningDataParseWithBuffer(ctx, readBuffer) if _airConditioningDataErr != nil { return nil, errors.Wrap(_airConditioningDataErr, "Error parsing 'airConditioningData' field of SALDataAirConditioning") } @@ -155,7 +158,8 @@ func SALDataAirConditioningParseWithBuffer(ctx context.Context, readBuffer utils // Create a partially initialized instance _child := &_SALDataAirConditioning{ - _SALData: &_SALData{}, + _SALData: &_SALData{ + }, AirConditioningData: airConditioningData, } _child._SALData._SALDataChildRequirements = _child @@ -178,17 +182,17 @@ func (m *_SALDataAirConditioning) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for SALDataAirConditioning") } - // Simple Field (airConditioningData) - if pushErr := writeBuffer.PushContext("airConditioningData"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for airConditioningData") - } - _airConditioningDataErr := writeBuffer.WriteSerializable(ctx, m.GetAirConditioningData()) - if popErr := writeBuffer.PopContext("airConditioningData"); popErr != nil { - return errors.Wrap(popErr, "Error popping for airConditioningData") - } - if _airConditioningDataErr != nil { - return errors.Wrap(_airConditioningDataErr, "Error serializing 'airConditioningData' field") - } + // Simple Field (airConditioningData) + if pushErr := writeBuffer.PushContext("airConditioningData"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for airConditioningData") + } + _airConditioningDataErr := writeBuffer.WriteSerializable(ctx, m.GetAirConditioningData()) + if popErr := writeBuffer.PopContext("airConditioningData"); popErr != nil { + return errors.Wrap(popErr, "Error popping for airConditioningData") + } + if _airConditioningDataErr != nil { + return errors.Wrap(_airConditioningDataErr, "Error serializing 'airConditioningData' field") + } if popErr := writeBuffer.PopContext("SALDataAirConditioning"); popErr != nil { return errors.Wrap(popErr, "Error popping for SALDataAirConditioning") @@ -198,6 +202,7 @@ func (m *_SALDataAirConditioning) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SALDataAirConditioning) isSALDataAirConditioning() bool { return true } @@ -212,3 +217,6 @@ func (m *_SALDataAirConditioning) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SALDataAudioAndVideo.go b/plc4go/protocols/cbus/readwrite/model/SALDataAudioAndVideo.go index 486a28b4d61..e54e8c2728a 100644 --- a/plc4go/protocols/cbus/readwrite/model/SALDataAudioAndVideo.go +++ b/plc4go/protocols/cbus/readwrite/model/SALDataAudioAndVideo.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SALDataAudioAndVideo is the corresponding interface of SALDataAudioAndVideo type SALDataAudioAndVideo interface { @@ -46,31 +48,30 @@ type SALDataAudioAndVideoExactly interface { // _SALDataAudioAndVideo is the data-structure of this message type _SALDataAudioAndVideo struct { *_SALData - AudioVideoData LightingData + AudioVideoData LightingData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SALDataAudioAndVideo) GetApplicationId() ApplicationId { - return ApplicationId_AUDIO_AND_VIDEO -} +func (m *_SALDataAudioAndVideo) GetApplicationId() ApplicationId { +return ApplicationId_AUDIO_AND_VIDEO} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SALDataAudioAndVideo) InitializeParent(parent SALData, salData SALData) { - m.SalData = salData +func (m *_SALDataAudioAndVideo) InitializeParent(parent SALData , salData SALData ) { m.SalData = salData } -func (m *_SALDataAudioAndVideo) GetParent() SALData { +func (m *_SALDataAudioAndVideo) GetParent() SALData { return m._SALData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -85,11 +86,12 @@ func (m *_SALDataAudioAndVideo) GetAudioVideoData() LightingData { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSALDataAudioAndVideo factory function for _SALDataAudioAndVideo -func NewSALDataAudioAndVideo(audioVideoData LightingData, salData SALData) *_SALDataAudioAndVideo { +func NewSALDataAudioAndVideo( audioVideoData LightingData , salData SALData ) *_SALDataAudioAndVideo { _result := &_SALDataAudioAndVideo{ AudioVideoData: audioVideoData, - _SALData: NewSALData(salData), + _SALData: NewSALData(salData), } _result._SALData._SALDataChildRequirements = _result return _result @@ -97,7 +99,7 @@ func NewSALDataAudioAndVideo(audioVideoData LightingData, salData SALData) *_SAL // Deprecated: use the interface for direct cast func CastSALDataAudioAndVideo(structType interface{}) SALDataAudioAndVideo { - if casted, ok := structType.(SALDataAudioAndVideo); ok { + if casted, ok := structType.(SALDataAudioAndVideo); ok { return casted } if casted, ok := structType.(*SALDataAudioAndVideo); ok { @@ -119,6 +121,7 @@ func (m *_SALDataAudioAndVideo) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_SALDataAudioAndVideo) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -140,7 +143,7 @@ func SALDataAudioAndVideoParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("audioVideoData"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for audioVideoData") } - _audioVideoData, _audioVideoDataErr := LightingDataParseWithBuffer(ctx, readBuffer) +_audioVideoData, _audioVideoDataErr := LightingDataParseWithBuffer(ctx, readBuffer) if _audioVideoDataErr != nil { return nil, errors.Wrap(_audioVideoDataErr, "Error parsing 'audioVideoData' field of SALDataAudioAndVideo") } @@ -155,7 +158,8 @@ func SALDataAudioAndVideoParseWithBuffer(ctx context.Context, readBuffer utils.R // Create a partially initialized instance _child := &_SALDataAudioAndVideo{ - _SALData: &_SALData{}, + _SALData: &_SALData{ + }, AudioVideoData: audioVideoData, } _child._SALData._SALDataChildRequirements = _child @@ -178,17 +182,17 @@ func (m *_SALDataAudioAndVideo) SerializeWithWriteBuffer(ctx context.Context, wr return errors.Wrap(pushErr, "Error pushing for SALDataAudioAndVideo") } - // Simple Field (audioVideoData) - if pushErr := writeBuffer.PushContext("audioVideoData"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for audioVideoData") - } - _audioVideoDataErr := writeBuffer.WriteSerializable(ctx, m.GetAudioVideoData()) - if popErr := writeBuffer.PopContext("audioVideoData"); popErr != nil { - return errors.Wrap(popErr, "Error popping for audioVideoData") - } - if _audioVideoDataErr != nil { - return errors.Wrap(_audioVideoDataErr, "Error serializing 'audioVideoData' field") - } + // Simple Field (audioVideoData) + if pushErr := writeBuffer.PushContext("audioVideoData"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for audioVideoData") + } + _audioVideoDataErr := writeBuffer.WriteSerializable(ctx, m.GetAudioVideoData()) + if popErr := writeBuffer.PopContext("audioVideoData"); popErr != nil { + return errors.Wrap(popErr, "Error popping for audioVideoData") + } + if _audioVideoDataErr != nil { + return errors.Wrap(_audioVideoDataErr, "Error serializing 'audioVideoData' field") + } if popErr := writeBuffer.PopContext("SALDataAudioAndVideo"); popErr != nil { return errors.Wrap(popErr, "Error popping for SALDataAudioAndVideo") @@ -198,6 +202,7 @@ func (m *_SALDataAudioAndVideo) SerializeWithWriteBuffer(ctx context.Context, wr return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SALDataAudioAndVideo) isSALDataAudioAndVideo() bool { return true } @@ -212,3 +217,6 @@ func (m *_SALDataAudioAndVideo) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SALDataClockAndTimekeeping.go b/plc4go/protocols/cbus/readwrite/model/SALDataClockAndTimekeeping.go index fbadf163b67..65d767ce87d 100644 --- a/plc4go/protocols/cbus/readwrite/model/SALDataClockAndTimekeeping.go +++ b/plc4go/protocols/cbus/readwrite/model/SALDataClockAndTimekeeping.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SALDataClockAndTimekeeping is the corresponding interface of SALDataClockAndTimekeeping type SALDataClockAndTimekeeping interface { @@ -46,31 +48,30 @@ type SALDataClockAndTimekeepingExactly interface { // _SALDataClockAndTimekeeping is the data-structure of this message type _SALDataClockAndTimekeeping struct { *_SALData - ClockAndTimekeepingData ClockAndTimekeepingData + ClockAndTimekeepingData ClockAndTimekeepingData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SALDataClockAndTimekeeping) GetApplicationId() ApplicationId { - return ApplicationId_CLOCK_AND_TIMEKEEPING -} +func (m *_SALDataClockAndTimekeeping) GetApplicationId() ApplicationId { +return ApplicationId_CLOCK_AND_TIMEKEEPING} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SALDataClockAndTimekeeping) InitializeParent(parent SALData, salData SALData) { - m.SalData = salData +func (m *_SALDataClockAndTimekeeping) InitializeParent(parent SALData , salData SALData ) { m.SalData = salData } -func (m *_SALDataClockAndTimekeeping) GetParent() SALData { +func (m *_SALDataClockAndTimekeeping) GetParent() SALData { return m._SALData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -85,11 +86,12 @@ func (m *_SALDataClockAndTimekeeping) GetClockAndTimekeepingData() ClockAndTimek /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSALDataClockAndTimekeeping factory function for _SALDataClockAndTimekeeping -func NewSALDataClockAndTimekeeping(clockAndTimekeepingData ClockAndTimekeepingData, salData SALData) *_SALDataClockAndTimekeeping { +func NewSALDataClockAndTimekeeping( clockAndTimekeepingData ClockAndTimekeepingData , salData SALData ) *_SALDataClockAndTimekeeping { _result := &_SALDataClockAndTimekeeping{ ClockAndTimekeepingData: clockAndTimekeepingData, - _SALData: NewSALData(salData), + _SALData: NewSALData(salData), } _result._SALData._SALDataChildRequirements = _result return _result @@ -97,7 +99,7 @@ func NewSALDataClockAndTimekeeping(clockAndTimekeepingData ClockAndTimekeepingDa // Deprecated: use the interface for direct cast func CastSALDataClockAndTimekeeping(structType interface{}) SALDataClockAndTimekeeping { - if casted, ok := structType.(SALDataClockAndTimekeeping); ok { + if casted, ok := structType.(SALDataClockAndTimekeeping); ok { return casted } if casted, ok := structType.(*SALDataClockAndTimekeeping); ok { @@ -119,6 +121,7 @@ func (m *_SALDataClockAndTimekeeping) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_SALDataClockAndTimekeeping) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -140,7 +143,7 @@ func SALDataClockAndTimekeepingParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("clockAndTimekeepingData"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for clockAndTimekeepingData") } - _clockAndTimekeepingData, _clockAndTimekeepingDataErr := ClockAndTimekeepingDataParseWithBuffer(ctx, readBuffer) +_clockAndTimekeepingData, _clockAndTimekeepingDataErr := ClockAndTimekeepingDataParseWithBuffer(ctx, readBuffer) if _clockAndTimekeepingDataErr != nil { return nil, errors.Wrap(_clockAndTimekeepingDataErr, "Error parsing 'clockAndTimekeepingData' field of SALDataClockAndTimekeeping") } @@ -155,7 +158,8 @@ func SALDataClockAndTimekeepingParseWithBuffer(ctx context.Context, readBuffer u // Create a partially initialized instance _child := &_SALDataClockAndTimekeeping{ - _SALData: &_SALData{}, + _SALData: &_SALData{ + }, ClockAndTimekeepingData: clockAndTimekeepingData, } _child._SALData._SALDataChildRequirements = _child @@ -178,17 +182,17 @@ func (m *_SALDataClockAndTimekeeping) SerializeWithWriteBuffer(ctx context.Conte return errors.Wrap(pushErr, "Error pushing for SALDataClockAndTimekeeping") } - // Simple Field (clockAndTimekeepingData) - if pushErr := writeBuffer.PushContext("clockAndTimekeepingData"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for clockAndTimekeepingData") - } - _clockAndTimekeepingDataErr := writeBuffer.WriteSerializable(ctx, m.GetClockAndTimekeepingData()) - if popErr := writeBuffer.PopContext("clockAndTimekeepingData"); popErr != nil { - return errors.Wrap(popErr, "Error popping for clockAndTimekeepingData") - } - if _clockAndTimekeepingDataErr != nil { - return errors.Wrap(_clockAndTimekeepingDataErr, "Error serializing 'clockAndTimekeepingData' field") - } + // Simple Field (clockAndTimekeepingData) + if pushErr := writeBuffer.PushContext("clockAndTimekeepingData"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for clockAndTimekeepingData") + } + _clockAndTimekeepingDataErr := writeBuffer.WriteSerializable(ctx, m.GetClockAndTimekeepingData()) + if popErr := writeBuffer.PopContext("clockAndTimekeepingData"); popErr != nil { + return errors.Wrap(popErr, "Error popping for clockAndTimekeepingData") + } + if _clockAndTimekeepingDataErr != nil { + return errors.Wrap(_clockAndTimekeepingDataErr, "Error serializing 'clockAndTimekeepingData' field") + } if popErr := writeBuffer.PopContext("SALDataClockAndTimekeeping"); popErr != nil { return errors.Wrap(popErr, "Error popping for SALDataClockAndTimekeeping") @@ -198,6 +202,7 @@ func (m *_SALDataClockAndTimekeeping) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SALDataClockAndTimekeeping) isSALDataClockAndTimekeeping() bool { return true } @@ -212,3 +217,6 @@ func (m *_SALDataClockAndTimekeeping) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SALDataEnableControl.go b/plc4go/protocols/cbus/readwrite/model/SALDataEnableControl.go index a8e234aa505..e4b49e24566 100644 --- a/plc4go/protocols/cbus/readwrite/model/SALDataEnableControl.go +++ b/plc4go/protocols/cbus/readwrite/model/SALDataEnableControl.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SALDataEnableControl is the corresponding interface of SALDataEnableControl type SALDataEnableControl interface { @@ -46,31 +48,30 @@ type SALDataEnableControlExactly interface { // _SALDataEnableControl is the data-structure of this message type _SALDataEnableControl struct { *_SALData - EnableControlData EnableControlData + EnableControlData EnableControlData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SALDataEnableControl) GetApplicationId() ApplicationId { - return ApplicationId_ENABLE_CONTROL -} +func (m *_SALDataEnableControl) GetApplicationId() ApplicationId { +return ApplicationId_ENABLE_CONTROL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SALDataEnableControl) InitializeParent(parent SALData, salData SALData) { - m.SalData = salData +func (m *_SALDataEnableControl) InitializeParent(parent SALData , salData SALData ) { m.SalData = salData } -func (m *_SALDataEnableControl) GetParent() SALData { +func (m *_SALDataEnableControl) GetParent() SALData { return m._SALData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -85,11 +86,12 @@ func (m *_SALDataEnableControl) GetEnableControlData() EnableControlData { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSALDataEnableControl factory function for _SALDataEnableControl -func NewSALDataEnableControl(enableControlData EnableControlData, salData SALData) *_SALDataEnableControl { +func NewSALDataEnableControl( enableControlData EnableControlData , salData SALData ) *_SALDataEnableControl { _result := &_SALDataEnableControl{ EnableControlData: enableControlData, - _SALData: NewSALData(salData), + _SALData: NewSALData(salData), } _result._SALData._SALDataChildRequirements = _result return _result @@ -97,7 +99,7 @@ func NewSALDataEnableControl(enableControlData EnableControlData, salData SALDat // Deprecated: use the interface for direct cast func CastSALDataEnableControl(structType interface{}) SALDataEnableControl { - if casted, ok := structType.(SALDataEnableControl); ok { + if casted, ok := structType.(SALDataEnableControl); ok { return casted } if casted, ok := structType.(*SALDataEnableControl); ok { @@ -119,6 +121,7 @@ func (m *_SALDataEnableControl) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_SALDataEnableControl) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -140,7 +143,7 @@ func SALDataEnableControlParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("enableControlData"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for enableControlData") } - _enableControlData, _enableControlDataErr := EnableControlDataParseWithBuffer(ctx, readBuffer) +_enableControlData, _enableControlDataErr := EnableControlDataParseWithBuffer(ctx, readBuffer) if _enableControlDataErr != nil { return nil, errors.Wrap(_enableControlDataErr, "Error parsing 'enableControlData' field of SALDataEnableControl") } @@ -155,7 +158,8 @@ func SALDataEnableControlParseWithBuffer(ctx context.Context, readBuffer utils.R // Create a partially initialized instance _child := &_SALDataEnableControl{ - _SALData: &_SALData{}, + _SALData: &_SALData{ + }, EnableControlData: enableControlData, } _child._SALData._SALDataChildRequirements = _child @@ -178,17 +182,17 @@ func (m *_SALDataEnableControl) SerializeWithWriteBuffer(ctx context.Context, wr return errors.Wrap(pushErr, "Error pushing for SALDataEnableControl") } - // Simple Field (enableControlData) - if pushErr := writeBuffer.PushContext("enableControlData"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for enableControlData") - } - _enableControlDataErr := writeBuffer.WriteSerializable(ctx, m.GetEnableControlData()) - if popErr := writeBuffer.PopContext("enableControlData"); popErr != nil { - return errors.Wrap(popErr, "Error popping for enableControlData") - } - if _enableControlDataErr != nil { - return errors.Wrap(_enableControlDataErr, "Error serializing 'enableControlData' field") - } + // Simple Field (enableControlData) + if pushErr := writeBuffer.PushContext("enableControlData"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for enableControlData") + } + _enableControlDataErr := writeBuffer.WriteSerializable(ctx, m.GetEnableControlData()) + if popErr := writeBuffer.PopContext("enableControlData"); popErr != nil { + return errors.Wrap(popErr, "Error popping for enableControlData") + } + if _enableControlDataErr != nil { + return errors.Wrap(_enableControlDataErr, "Error serializing 'enableControlData' field") + } if popErr := writeBuffer.PopContext("SALDataEnableControl"); popErr != nil { return errors.Wrap(popErr, "Error popping for SALDataEnableControl") @@ -198,6 +202,7 @@ func (m *_SALDataEnableControl) SerializeWithWriteBuffer(ctx context.Context, wr return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SALDataEnableControl) isSALDataEnableControl() bool { return true } @@ -212,3 +217,6 @@ func (m *_SALDataEnableControl) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SALDataErrorReporting.go b/plc4go/protocols/cbus/readwrite/model/SALDataErrorReporting.go index 90df968564c..ec3d7a21dca 100644 --- a/plc4go/protocols/cbus/readwrite/model/SALDataErrorReporting.go +++ b/plc4go/protocols/cbus/readwrite/model/SALDataErrorReporting.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SALDataErrorReporting is the corresponding interface of SALDataErrorReporting type SALDataErrorReporting interface { @@ -46,31 +48,30 @@ type SALDataErrorReportingExactly interface { // _SALDataErrorReporting is the data-structure of this message type _SALDataErrorReporting struct { *_SALData - ErrorReportingData ErrorReportingData + ErrorReportingData ErrorReportingData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SALDataErrorReporting) GetApplicationId() ApplicationId { - return ApplicationId_ERROR_REPORTING -} +func (m *_SALDataErrorReporting) GetApplicationId() ApplicationId { +return ApplicationId_ERROR_REPORTING} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SALDataErrorReporting) InitializeParent(parent SALData, salData SALData) { - m.SalData = salData +func (m *_SALDataErrorReporting) InitializeParent(parent SALData , salData SALData ) { m.SalData = salData } -func (m *_SALDataErrorReporting) GetParent() SALData { +func (m *_SALDataErrorReporting) GetParent() SALData { return m._SALData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -85,11 +86,12 @@ func (m *_SALDataErrorReporting) GetErrorReportingData() ErrorReportingData { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSALDataErrorReporting factory function for _SALDataErrorReporting -func NewSALDataErrorReporting(errorReportingData ErrorReportingData, salData SALData) *_SALDataErrorReporting { +func NewSALDataErrorReporting( errorReportingData ErrorReportingData , salData SALData ) *_SALDataErrorReporting { _result := &_SALDataErrorReporting{ ErrorReportingData: errorReportingData, - _SALData: NewSALData(salData), + _SALData: NewSALData(salData), } _result._SALData._SALDataChildRequirements = _result return _result @@ -97,7 +99,7 @@ func NewSALDataErrorReporting(errorReportingData ErrorReportingData, salData SAL // Deprecated: use the interface for direct cast func CastSALDataErrorReporting(structType interface{}) SALDataErrorReporting { - if casted, ok := structType.(SALDataErrorReporting); ok { + if casted, ok := structType.(SALDataErrorReporting); ok { return casted } if casted, ok := structType.(*SALDataErrorReporting); ok { @@ -119,6 +121,7 @@ func (m *_SALDataErrorReporting) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_SALDataErrorReporting) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -140,7 +143,7 @@ func SALDataErrorReportingParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("errorReportingData"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for errorReportingData") } - _errorReportingData, _errorReportingDataErr := ErrorReportingDataParseWithBuffer(ctx, readBuffer) +_errorReportingData, _errorReportingDataErr := ErrorReportingDataParseWithBuffer(ctx, readBuffer) if _errorReportingDataErr != nil { return nil, errors.Wrap(_errorReportingDataErr, "Error parsing 'errorReportingData' field of SALDataErrorReporting") } @@ -155,7 +158,8 @@ func SALDataErrorReportingParseWithBuffer(ctx context.Context, readBuffer utils. // Create a partially initialized instance _child := &_SALDataErrorReporting{ - _SALData: &_SALData{}, + _SALData: &_SALData{ + }, ErrorReportingData: errorReportingData, } _child._SALData._SALDataChildRequirements = _child @@ -178,17 +182,17 @@ func (m *_SALDataErrorReporting) SerializeWithWriteBuffer(ctx context.Context, w return errors.Wrap(pushErr, "Error pushing for SALDataErrorReporting") } - // Simple Field (errorReportingData) - if pushErr := writeBuffer.PushContext("errorReportingData"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for errorReportingData") - } - _errorReportingDataErr := writeBuffer.WriteSerializable(ctx, m.GetErrorReportingData()) - if popErr := writeBuffer.PopContext("errorReportingData"); popErr != nil { - return errors.Wrap(popErr, "Error popping for errorReportingData") - } - if _errorReportingDataErr != nil { - return errors.Wrap(_errorReportingDataErr, "Error serializing 'errorReportingData' field") - } + // Simple Field (errorReportingData) + if pushErr := writeBuffer.PushContext("errorReportingData"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for errorReportingData") + } + _errorReportingDataErr := writeBuffer.WriteSerializable(ctx, m.GetErrorReportingData()) + if popErr := writeBuffer.PopContext("errorReportingData"); popErr != nil { + return errors.Wrap(popErr, "Error popping for errorReportingData") + } + if _errorReportingDataErr != nil { + return errors.Wrap(_errorReportingDataErr, "Error serializing 'errorReportingData' field") + } if popErr := writeBuffer.PopContext("SALDataErrorReporting"); popErr != nil { return errors.Wrap(popErr, "Error popping for SALDataErrorReporting") @@ -198,6 +202,7 @@ func (m *_SALDataErrorReporting) SerializeWithWriteBuffer(ctx context.Context, w return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SALDataErrorReporting) isSALDataErrorReporting() bool { return true } @@ -212,3 +217,6 @@ func (m *_SALDataErrorReporting) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SALDataFreeUsage.go b/plc4go/protocols/cbus/readwrite/model/SALDataFreeUsage.go index d91445ed362..aa039b146bb 100644 --- a/plc4go/protocols/cbus/readwrite/model/SALDataFreeUsage.go +++ b/plc4go/protocols/cbus/readwrite/model/SALDataFreeUsage.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SALDataFreeUsage is the corresponding interface of SALDataFreeUsage type SALDataFreeUsage interface { @@ -46,32 +48,33 @@ type _SALDataFreeUsage struct { *_SALData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SALDataFreeUsage) GetApplicationId() ApplicationId { - return ApplicationId_FREE_USAGE -} +func (m *_SALDataFreeUsage) GetApplicationId() ApplicationId { +return ApplicationId_FREE_USAGE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SALDataFreeUsage) InitializeParent(parent SALData, salData SALData) { - m.SalData = salData +func (m *_SALDataFreeUsage) InitializeParent(parent SALData , salData SALData ) { m.SalData = salData } -func (m *_SALDataFreeUsage) GetParent() SALData { +func (m *_SALDataFreeUsage) GetParent() SALData { return m._SALData } + // NewSALDataFreeUsage factory function for _SALDataFreeUsage -func NewSALDataFreeUsage(salData SALData) *_SALDataFreeUsage { +func NewSALDataFreeUsage( salData SALData ) *_SALDataFreeUsage { _result := &_SALDataFreeUsage{ - _SALData: NewSALData(salData), + _SALData: NewSALData(salData), } _result._SALData._SALDataChildRequirements = _result return _result @@ -79,7 +82,7 @@ func NewSALDataFreeUsage(salData SALData) *_SALDataFreeUsage { // Deprecated: use the interface for direct cast func CastSALDataFreeUsage(structType interface{}) SALDataFreeUsage { - if casted, ok := structType.(SALDataFreeUsage); ok { + if casted, ok := structType.(SALDataFreeUsage); ok { return casted } if casted, ok := structType.(*SALDataFreeUsage); ok { @@ -98,6 +101,7 @@ func (m *_SALDataFreeUsage) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_SALDataFreeUsage) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -116,7 +120,7 @@ func SALDataFreeUsageParseWithBuffer(ctx context.Context, readBuffer utils.ReadB _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"FREE_USAGE Not yet implemented"}) } @@ -126,7 +130,8 @@ func SALDataFreeUsageParseWithBuffer(ctx context.Context, readBuffer utils.ReadB // Create a partially initialized instance _child := &_SALDataFreeUsage{ - _SALData: &_SALData{}, + _SALData: &_SALData{ + }, } _child._SALData._SALDataChildRequirements = _child return _child, nil @@ -156,6 +161,7 @@ func (m *_SALDataFreeUsage) SerializeWithWriteBuffer(ctx context.Context, writeB return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SALDataFreeUsage) isSALDataFreeUsage() bool { return true } @@ -170,3 +176,6 @@ func (m *_SALDataFreeUsage) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SALDataHeating.go b/plc4go/protocols/cbus/readwrite/model/SALDataHeating.go index 010dc9ae3f6..5c442b4d9a1 100644 --- a/plc4go/protocols/cbus/readwrite/model/SALDataHeating.go +++ b/plc4go/protocols/cbus/readwrite/model/SALDataHeating.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SALDataHeating is the corresponding interface of SALDataHeating type SALDataHeating interface { @@ -46,31 +48,30 @@ type SALDataHeatingExactly interface { // _SALDataHeating is the data-structure of this message type _SALDataHeating struct { *_SALData - HeatingData LightingData + HeatingData LightingData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SALDataHeating) GetApplicationId() ApplicationId { - return ApplicationId_HEATING -} +func (m *_SALDataHeating) GetApplicationId() ApplicationId { +return ApplicationId_HEATING} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SALDataHeating) InitializeParent(parent SALData, salData SALData) { - m.SalData = salData +func (m *_SALDataHeating) InitializeParent(parent SALData , salData SALData ) { m.SalData = salData } -func (m *_SALDataHeating) GetParent() SALData { +func (m *_SALDataHeating) GetParent() SALData { return m._SALData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -85,11 +86,12 @@ func (m *_SALDataHeating) GetHeatingData() LightingData { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSALDataHeating factory function for _SALDataHeating -func NewSALDataHeating(heatingData LightingData, salData SALData) *_SALDataHeating { +func NewSALDataHeating( heatingData LightingData , salData SALData ) *_SALDataHeating { _result := &_SALDataHeating{ HeatingData: heatingData, - _SALData: NewSALData(salData), + _SALData: NewSALData(salData), } _result._SALData._SALDataChildRequirements = _result return _result @@ -97,7 +99,7 @@ func NewSALDataHeating(heatingData LightingData, salData SALData) *_SALDataHeati // Deprecated: use the interface for direct cast func CastSALDataHeating(structType interface{}) SALDataHeating { - if casted, ok := structType.(SALDataHeating); ok { + if casted, ok := structType.(SALDataHeating); ok { return casted } if casted, ok := structType.(*SALDataHeating); ok { @@ -119,6 +121,7 @@ func (m *_SALDataHeating) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_SALDataHeating) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -140,7 +143,7 @@ func SALDataHeatingParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf if pullErr := readBuffer.PullContext("heatingData"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for heatingData") } - _heatingData, _heatingDataErr := LightingDataParseWithBuffer(ctx, readBuffer) +_heatingData, _heatingDataErr := LightingDataParseWithBuffer(ctx, readBuffer) if _heatingDataErr != nil { return nil, errors.Wrap(_heatingDataErr, "Error parsing 'heatingData' field of SALDataHeating") } @@ -155,7 +158,8 @@ func SALDataHeatingParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf // Create a partially initialized instance _child := &_SALDataHeating{ - _SALData: &_SALData{}, + _SALData: &_SALData{ + }, HeatingData: heatingData, } _child._SALData._SALDataChildRequirements = _child @@ -178,17 +182,17 @@ func (m *_SALDataHeating) SerializeWithWriteBuffer(ctx context.Context, writeBuf return errors.Wrap(pushErr, "Error pushing for SALDataHeating") } - // Simple Field (heatingData) - if pushErr := writeBuffer.PushContext("heatingData"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for heatingData") - } - _heatingDataErr := writeBuffer.WriteSerializable(ctx, m.GetHeatingData()) - if popErr := writeBuffer.PopContext("heatingData"); popErr != nil { - return errors.Wrap(popErr, "Error popping for heatingData") - } - if _heatingDataErr != nil { - return errors.Wrap(_heatingDataErr, "Error serializing 'heatingData' field") - } + // Simple Field (heatingData) + if pushErr := writeBuffer.PushContext("heatingData"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for heatingData") + } + _heatingDataErr := writeBuffer.WriteSerializable(ctx, m.GetHeatingData()) + if popErr := writeBuffer.PopContext("heatingData"); popErr != nil { + return errors.Wrap(popErr, "Error popping for heatingData") + } + if _heatingDataErr != nil { + return errors.Wrap(_heatingDataErr, "Error serializing 'heatingData' field") + } if popErr := writeBuffer.PopContext("SALDataHeating"); popErr != nil { return errors.Wrap(popErr, "Error popping for SALDataHeating") @@ -198,6 +202,7 @@ func (m *_SALDataHeating) SerializeWithWriteBuffer(ctx context.Context, writeBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SALDataHeating) isSALDataHeating() bool { return true } @@ -212,3 +217,6 @@ func (m *_SALDataHeating) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SALDataHvacActuator.go b/plc4go/protocols/cbus/readwrite/model/SALDataHvacActuator.go index bd1dfb8f096..ca0fa29688d 100644 --- a/plc4go/protocols/cbus/readwrite/model/SALDataHvacActuator.go +++ b/plc4go/protocols/cbus/readwrite/model/SALDataHvacActuator.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SALDataHvacActuator is the corresponding interface of SALDataHvacActuator type SALDataHvacActuator interface { @@ -46,31 +48,30 @@ type SALDataHvacActuatorExactly interface { // _SALDataHvacActuator is the data-structure of this message type _SALDataHvacActuator struct { *_SALData - HvacActuatorData LightingData + HvacActuatorData LightingData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SALDataHvacActuator) GetApplicationId() ApplicationId { - return ApplicationId_HVAC_ACTUATOR -} +func (m *_SALDataHvacActuator) GetApplicationId() ApplicationId { +return ApplicationId_HVAC_ACTUATOR} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SALDataHvacActuator) InitializeParent(parent SALData, salData SALData) { - m.SalData = salData +func (m *_SALDataHvacActuator) InitializeParent(parent SALData , salData SALData ) { m.SalData = salData } -func (m *_SALDataHvacActuator) GetParent() SALData { +func (m *_SALDataHvacActuator) GetParent() SALData { return m._SALData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -85,11 +86,12 @@ func (m *_SALDataHvacActuator) GetHvacActuatorData() LightingData { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSALDataHvacActuator factory function for _SALDataHvacActuator -func NewSALDataHvacActuator(hvacActuatorData LightingData, salData SALData) *_SALDataHvacActuator { +func NewSALDataHvacActuator( hvacActuatorData LightingData , salData SALData ) *_SALDataHvacActuator { _result := &_SALDataHvacActuator{ HvacActuatorData: hvacActuatorData, - _SALData: NewSALData(salData), + _SALData: NewSALData(salData), } _result._SALData._SALDataChildRequirements = _result return _result @@ -97,7 +99,7 @@ func NewSALDataHvacActuator(hvacActuatorData LightingData, salData SALData) *_SA // Deprecated: use the interface for direct cast func CastSALDataHvacActuator(structType interface{}) SALDataHvacActuator { - if casted, ok := structType.(SALDataHvacActuator); ok { + if casted, ok := structType.(SALDataHvacActuator); ok { return casted } if casted, ok := structType.(*SALDataHvacActuator); ok { @@ -119,6 +121,7 @@ func (m *_SALDataHvacActuator) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_SALDataHvacActuator) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -140,7 +143,7 @@ func SALDataHvacActuatorParseWithBuffer(ctx context.Context, readBuffer utils.Re if pullErr := readBuffer.PullContext("hvacActuatorData"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for hvacActuatorData") } - _hvacActuatorData, _hvacActuatorDataErr := LightingDataParseWithBuffer(ctx, readBuffer) +_hvacActuatorData, _hvacActuatorDataErr := LightingDataParseWithBuffer(ctx, readBuffer) if _hvacActuatorDataErr != nil { return nil, errors.Wrap(_hvacActuatorDataErr, "Error parsing 'hvacActuatorData' field of SALDataHvacActuator") } @@ -155,7 +158,8 @@ func SALDataHvacActuatorParseWithBuffer(ctx context.Context, readBuffer utils.Re // Create a partially initialized instance _child := &_SALDataHvacActuator{ - _SALData: &_SALData{}, + _SALData: &_SALData{ + }, HvacActuatorData: hvacActuatorData, } _child._SALData._SALDataChildRequirements = _child @@ -178,17 +182,17 @@ func (m *_SALDataHvacActuator) SerializeWithWriteBuffer(ctx context.Context, wri return errors.Wrap(pushErr, "Error pushing for SALDataHvacActuator") } - // Simple Field (hvacActuatorData) - if pushErr := writeBuffer.PushContext("hvacActuatorData"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for hvacActuatorData") - } - _hvacActuatorDataErr := writeBuffer.WriteSerializable(ctx, m.GetHvacActuatorData()) - if popErr := writeBuffer.PopContext("hvacActuatorData"); popErr != nil { - return errors.Wrap(popErr, "Error popping for hvacActuatorData") - } - if _hvacActuatorDataErr != nil { - return errors.Wrap(_hvacActuatorDataErr, "Error serializing 'hvacActuatorData' field") - } + // Simple Field (hvacActuatorData) + if pushErr := writeBuffer.PushContext("hvacActuatorData"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for hvacActuatorData") + } + _hvacActuatorDataErr := writeBuffer.WriteSerializable(ctx, m.GetHvacActuatorData()) + if popErr := writeBuffer.PopContext("hvacActuatorData"); popErr != nil { + return errors.Wrap(popErr, "Error popping for hvacActuatorData") + } + if _hvacActuatorDataErr != nil { + return errors.Wrap(_hvacActuatorDataErr, "Error serializing 'hvacActuatorData' field") + } if popErr := writeBuffer.PopContext("SALDataHvacActuator"); popErr != nil { return errors.Wrap(popErr, "Error popping for SALDataHvacActuator") @@ -198,6 +202,7 @@ func (m *_SALDataHvacActuator) SerializeWithWriteBuffer(ctx context.Context, wri return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SALDataHvacActuator) isSALDataHvacActuator() bool { return true } @@ -212,3 +217,6 @@ func (m *_SALDataHvacActuator) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SALDataIrrigationControl.go b/plc4go/protocols/cbus/readwrite/model/SALDataIrrigationControl.go index f1eb4a82b2f..2c2aac72de3 100644 --- a/plc4go/protocols/cbus/readwrite/model/SALDataIrrigationControl.go +++ b/plc4go/protocols/cbus/readwrite/model/SALDataIrrigationControl.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SALDataIrrigationControl is the corresponding interface of SALDataIrrigationControl type SALDataIrrigationControl interface { @@ -46,31 +48,30 @@ type SALDataIrrigationControlExactly interface { // _SALDataIrrigationControl is the data-structure of this message type _SALDataIrrigationControl struct { *_SALData - IrrigationControlData LightingData + IrrigationControlData LightingData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SALDataIrrigationControl) GetApplicationId() ApplicationId { - return ApplicationId_IRRIGATION_CONTROL -} +func (m *_SALDataIrrigationControl) GetApplicationId() ApplicationId { +return ApplicationId_IRRIGATION_CONTROL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SALDataIrrigationControl) InitializeParent(parent SALData, salData SALData) { - m.SalData = salData +func (m *_SALDataIrrigationControl) InitializeParent(parent SALData , salData SALData ) { m.SalData = salData } -func (m *_SALDataIrrigationControl) GetParent() SALData { +func (m *_SALDataIrrigationControl) GetParent() SALData { return m._SALData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -85,11 +86,12 @@ func (m *_SALDataIrrigationControl) GetIrrigationControlData() LightingData { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSALDataIrrigationControl factory function for _SALDataIrrigationControl -func NewSALDataIrrigationControl(irrigationControlData LightingData, salData SALData) *_SALDataIrrigationControl { +func NewSALDataIrrigationControl( irrigationControlData LightingData , salData SALData ) *_SALDataIrrigationControl { _result := &_SALDataIrrigationControl{ IrrigationControlData: irrigationControlData, - _SALData: NewSALData(salData), + _SALData: NewSALData(salData), } _result._SALData._SALDataChildRequirements = _result return _result @@ -97,7 +99,7 @@ func NewSALDataIrrigationControl(irrigationControlData LightingData, salData SAL // Deprecated: use the interface for direct cast func CastSALDataIrrigationControl(structType interface{}) SALDataIrrigationControl { - if casted, ok := structType.(SALDataIrrigationControl); ok { + if casted, ok := structType.(SALDataIrrigationControl); ok { return casted } if casted, ok := structType.(*SALDataIrrigationControl); ok { @@ -119,6 +121,7 @@ func (m *_SALDataIrrigationControl) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_SALDataIrrigationControl) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -140,7 +143,7 @@ func SALDataIrrigationControlParseWithBuffer(ctx context.Context, readBuffer uti if pullErr := readBuffer.PullContext("irrigationControlData"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for irrigationControlData") } - _irrigationControlData, _irrigationControlDataErr := LightingDataParseWithBuffer(ctx, readBuffer) +_irrigationControlData, _irrigationControlDataErr := LightingDataParseWithBuffer(ctx, readBuffer) if _irrigationControlDataErr != nil { return nil, errors.Wrap(_irrigationControlDataErr, "Error parsing 'irrigationControlData' field of SALDataIrrigationControl") } @@ -155,7 +158,8 @@ func SALDataIrrigationControlParseWithBuffer(ctx context.Context, readBuffer uti // Create a partially initialized instance _child := &_SALDataIrrigationControl{ - _SALData: &_SALData{}, + _SALData: &_SALData{ + }, IrrigationControlData: irrigationControlData, } _child._SALData._SALDataChildRequirements = _child @@ -178,17 +182,17 @@ func (m *_SALDataIrrigationControl) SerializeWithWriteBuffer(ctx context.Context return errors.Wrap(pushErr, "Error pushing for SALDataIrrigationControl") } - // Simple Field (irrigationControlData) - if pushErr := writeBuffer.PushContext("irrigationControlData"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for irrigationControlData") - } - _irrigationControlDataErr := writeBuffer.WriteSerializable(ctx, m.GetIrrigationControlData()) - if popErr := writeBuffer.PopContext("irrigationControlData"); popErr != nil { - return errors.Wrap(popErr, "Error popping for irrigationControlData") - } - if _irrigationControlDataErr != nil { - return errors.Wrap(_irrigationControlDataErr, "Error serializing 'irrigationControlData' field") - } + // Simple Field (irrigationControlData) + if pushErr := writeBuffer.PushContext("irrigationControlData"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for irrigationControlData") + } + _irrigationControlDataErr := writeBuffer.WriteSerializable(ctx, m.GetIrrigationControlData()) + if popErr := writeBuffer.PopContext("irrigationControlData"); popErr != nil { + return errors.Wrap(popErr, "Error popping for irrigationControlData") + } + if _irrigationControlDataErr != nil { + return errors.Wrap(_irrigationControlDataErr, "Error serializing 'irrigationControlData' field") + } if popErr := writeBuffer.PopContext("SALDataIrrigationControl"); popErr != nil { return errors.Wrap(popErr, "Error popping for SALDataIrrigationControl") @@ -198,6 +202,7 @@ func (m *_SALDataIrrigationControl) SerializeWithWriteBuffer(ctx context.Context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SALDataIrrigationControl) isSALDataIrrigationControl() bool { return true } @@ -212,3 +217,6 @@ func (m *_SALDataIrrigationControl) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SALDataLighting.go b/plc4go/protocols/cbus/readwrite/model/SALDataLighting.go index 007562f4743..2f4845b73f7 100644 --- a/plc4go/protocols/cbus/readwrite/model/SALDataLighting.go +++ b/plc4go/protocols/cbus/readwrite/model/SALDataLighting.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SALDataLighting is the corresponding interface of SALDataLighting type SALDataLighting interface { @@ -46,31 +48,30 @@ type SALDataLightingExactly interface { // _SALDataLighting is the data-structure of this message type _SALDataLighting struct { *_SALData - LightingData LightingData + LightingData LightingData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SALDataLighting) GetApplicationId() ApplicationId { - return ApplicationId_LIGHTING -} +func (m *_SALDataLighting) GetApplicationId() ApplicationId { +return ApplicationId_LIGHTING} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SALDataLighting) InitializeParent(parent SALData, salData SALData) { - m.SalData = salData +func (m *_SALDataLighting) InitializeParent(parent SALData , salData SALData ) { m.SalData = salData } -func (m *_SALDataLighting) GetParent() SALData { +func (m *_SALDataLighting) GetParent() SALData { return m._SALData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -85,11 +86,12 @@ func (m *_SALDataLighting) GetLightingData() LightingData { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSALDataLighting factory function for _SALDataLighting -func NewSALDataLighting(lightingData LightingData, salData SALData) *_SALDataLighting { +func NewSALDataLighting( lightingData LightingData , salData SALData ) *_SALDataLighting { _result := &_SALDataLighting{ LightingData: lightingData, - _SALData: NewSALData(salData), + _SALData: NewSALData(salData), } _result._SALData._SALDataChildRequirements = _result return _result @@ -97,7 +99,7 @@ func NewSALDataLighting(lightingData LightingData, salData SALData) *_SALDataLig // Deprecated: use the interface for direct cast func CastSALDataLighting(structType interface{}) SALDataLighting { - if casted, ok := structType.(SALDataLighting); ok { + if casted, ok := structType.(SALDataLighting); ok { return casted } if casted, ok := structType.(*SALDataLighting); ok { @@ -119,6 +121,7 @@ func (m *_SALDataLighting) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_SALDataLighting) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -140,7 +143,7 @@ func SALDataLightingParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu if pullErr := readBuffer.PullContext("lightingData"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for lightingData") } - _lightingData, _lightingDataErr := LightingDataParseWithBuffer(ctx, readBuffer) +_lightingData, _lightingDataErr := LightingDataParseWithBuffer(ctx, readBuffer) if _lightingDataErr != nil { return nil, errors.Wrap(_lightingDataErr, "Error parsing 'lightingData' field of SALDataLighting") } @@ -155,7 +158,8 @@ func SALDataLightingParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu // Create a partially initialized instance _child := &_SALDataLighting{ - _SALData: &_SALData{}, + _SALData: &_SALData{ + }, LightingData: lightingData, } _child._SALData._SALDataChildRequirements = _child @@ -178,17 +182,17 @@ func (m *_SALDataLighting) SerializeWithWriteBuffer(ctx context.Context, writeBu return errors.Wrap(pushErr, "Error pushing for SALDataLighting") } - // Simple Field (lightingData) - if pushErr := writeBuffer.PushContext("lightingData"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for lightingData") - } - _lightingDataErr := writeBuffer.WriteSerializable(ctx, m.GetLightingData()) - if popErr := writeBuffer.PopContext("lightingData"); popErr != nil { - return errors.Wrap(popErr, "Error popping for lightingData") - } - if _lightingDataErr != nil { - return errors.Wrap(_lightingDataErr, "Error serializing 'lightingData' field") - } + // Simple Field (lightingData) + if pushErr := writeBuffer.PushContext("lightingData"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for lightingData") + } + _lightingDataErr := writeBuffer.WriteSerializable(ctx, m.GetLightingData()) + if popErr := writeBuffer.PopContext("lightingData"); popErr != nil { + return errors.Wrap(popErr, "Error popping for lightingData") + } + if _lightingDataErr != nil { + return errors.Wrap(_lightingDataErr, "Error serializing 'lightingData' field") + } if popErr := writeBuffer.PopContext("SALDataLighting"); popErr != nil { return errors.Wrap(popErr, "Error popping for SALDataLighting") @@ -198,6 +202,7 @@ func (m *_SALDataLighting) SerializeWithWriteBuffer(ctx context.Context, writeBu return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SALDataLighting) isSALDataLighting() bool { return true } @@ -212,3 +217,6 @@ func (m *_SALDataLighting) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SALDataMeasurement.go b/plc4go/protocols/cbus/readwrite/model/SALDataMeasurement.go index 64f9fc52c01..4f3c2746c83 100644 --- a/plc4go/protocols/cbus/readwrite/model/SALDataMeasurement.go +++ b/plc4go/protocols/cbus/readwrite/model/SALDataMeasurement.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SALDataMeasurement is the corresponding interface of SALDataMeasurement type SALDataMeasurement interface { @@ -46,31 +48,30 @@ type SALDataMeasurementExactly interface { // _SALDataMeasurement is the data-structure of this message type _SALDataMeasurement struct { *_SALData - MeasurementData MeasurementData + MeasurementData MeasurementData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SALDataMeasurement) GetApplicationId() ApplicationId { - return ApplicationId_MEASUREMENT -} +func (m *_SALDataMeasurement) GetApplicationId() ApplicationId { +return ApplicationId_MEASUREMENT} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SALDataMeasurement) InitializeParent(parent SALData, salData SALData) { - m.SalData = salData +func (m *_SALDataMeasurement) InitializeParent(parent SALData , salData SALData ) { m.SalData = salData } -func (m *_SALDataMeasurement) GetParent() SALData { +func (m *_SALDataMeasurement) GetParent() SALData { return m._SALData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -85,11 +86,12 @@ func (m *_SALDataMeasurement) GetMeasurementData() MeasurementData { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSALDataMeasurement factory function for _SALDataMeasurement -func NewSALDataMeasurement(measurementData MeasurementData, salData SALData) *_SALDataMeasurement { +func NewSALDataMeasurement( measurementData MeasurementData , salData SALData ) *_SALDataMeasurement { _result := &_SALDataMeasurement{ MeasurementData: measurementData, - _SALData: NewSALData(salData), + _SALData: NewSALData(salData), } _result._SALData._SALDataChildRequirements = _result return _result @@ -97,7 +99,7 @@ func NewSALDataMeasurement(measurementData MeasurementData, salData SALData) *_S // Deprecated: use the interface for direct cast func CastSALDataMeasurement(structType interface{}) SALDataMeasurement { - if casted, ok := structType.(SALDataMeasurement); ok { + if casted, ok := structType.(SALDataMeasurement); ok { return casted } if casted, ok := structType.(*SALDataMeasurement); ok { @@ -119,6 +121,7 @@ func (m *_SALDataMeasurement) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_SALDataMeasurement) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -140,7 +143,7 @@ func SALDataMeasurementParseWithBuffer(ctx context.Context, readBuffer utils.Rea if pullErr := readBuffer.PullContext("measurementData"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for measurementData") } - _measurementData, _measurementDataErr := MeasurementDataParseWithBuffer(ctx, readBuffer) +_measurementData, _measurementDataErr := MeasurementDataParseWithBuffer(ctx, readBuffer) if _measurementDataErr != nil { return nil, errors.Wrap(_measurementDataErr, "Error parsing 'measurementData' field of SALDataMeasurement") } @@ -155,7 +158,8 @@ func SALDataMeasurementParseWithBuffer(ctx context.Context, readBuffer utils.Rea // Create a partially initialized instance _child := &_SALDataMeasurement{ - _SALData: &_SALData{}, + _SALData: &_SALData{ + }, MeasurementData: measurementData, } _child._SALData._SALDataChildRequirements = _child @@ -178,17 +182,17 @@ func (m *_SALDataMeasurement) SerializeWithWriteBuffer(ctx context.Context, writ return errors.Wrap(pushErr, "Error pushing for SALDataMeasurement") } - // Simple Field (measurementData) - if pushErr := writeBuffer.PushContext("measurementData"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for measurementData") - } - _measurementDataErr := writeBuffer.WriteSerializable(ctx, m.GetMeasurementData()) - if popErr := writeBuffer.PopContext("measurementData"); popErr != nil { - return errors.Wrap(popErr, "Error popping for measurementData") - } - if _measurementDataErr != nil { - return errors.Wrap(_measurementDataErr, "Error serializing 'measurementData' field") - } + // Simple Field (measurementData) + if pushErr := writeBuffer.PushContext("measurementData"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for measurementData") + } + _measurementDataErr := writeBuffer.WriteSerializable(ctx, m.GetMeasurementData()) + if popErr := writeBuffer.PopContext("measurementData"); popErr != nil { + return errors.Wrap(popErr, "Error popping for measurementData") + } + if _measurementDataErr != nil { + return errors.Wrap(_measurementDataErr, "Error serializing 'measurementData' field") + } if popErr := writeBuffer.PopContext("SALDataMeasurement"); popErr != nil { return errors.Wrap(popErr, "Error popping for SALDataMeasurement") @@ -198,6 +202,7 @@ func (m *_SALDataMeasurement) SerializeWithWriteBuffer(ctx context.Context, writ return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SALDataMeasurement) isSALDataMeasurement() bool { return true } @@ -212,3 +217,6 @@ func (m *_SALDataMeasurement) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SALDataMediaTransport.go b/plc4go/protocols/cbus/readwrite/model/SALDataMediaTransport.go index 03dc2c676f5..0938d96c39f 100644 --- a/plc4go/protocols/cbus/readwrite/model/SALDataMediaTransport.go +++ b/plc4go/protocols/cbus/readwrite/model/SALDataMediaTransport.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SALDataMediaTransport is the corresponding interface of SALDataMediaTransport type SALDataMediaTransport interface { @@ -46,31 +48,30 @@ type SALDataMediaTransportExactly interface { // _SALDataMediaTransport is the data-structure of this message type _SALDataMediaTransport struct { *_SALData - MediaTransportControlData MediaTransportControlData + MediaTransportControlData MediaTransportControlData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SALDataMediaTransport) GetApplicationId() ApplicationId { - return ApplicationId_MEDIA_TRANSPORT_CONTROL -} +func (m *_SALDataMediaTransport) GetApplicationId() ApplicationId { +return ApplicationId_MEDIA_TRANSPORT_CONTROL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SALDataMediaTransport) InitializeParent(parent SALData, salData SALData) { - m.SalData = salData +func (m *_SALDataMediaTransport) InitializeParent(parent SALData , salData SALData ) { m.SalData = salData } -func (m *_SALDataMediaTransport) GetParent() SALData { +func (m *_SALDataMediaTransport) GetParent() SALData { return m._SALData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -85,11 +86,12 @@ func (m *_SALDataMediaTransport) GetMediaTransportControlData() MediaTransportCo /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSALDataMediaTransport factory function for _SALDataMediaTransport -func NewSALDataMediaTransport(mediaTransportControlData MediaTransportControlData, salData SALData) *_SALDataMediaTransport { +func NewSALDataMediaTransport( mediaTransportControlData MediaTransportControlData , salData SALData ) *_SALDataMediaTransport { _result := &_SALDataMediaTransport{ MediaTransportControlData: mediaTransportControlData, - _SALData: NewSALData(salData), + _SALData: NewSALData(salData), } _result._SALData._SALDataChildRequirements = _result return _result @@ -97,7 +99,7 @@ func NewSALDataMediaTransport(mediaTransportControlData MediaTransportControlDat // Deprecated: use the interface for direct cast func CastSALDataMediaTransport(structType interface{}) SALDataMediaTransport { - if casted, ok := structType.(SALDataMediaTransport); ok { + if casted, ok := structType.(SALDataMediaTransport); ok { return casted } if casted, ok := structType.(*SALDataMediaTransport); ok { @@ -119,6 +121,7 @@ func (m *_SALDataMediaTransport) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_SALDataMediaTransport) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -140,7 +143,7 @@ func SALDataMediaTransportParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("mediaTransportControlData"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for mediaTransportControlData") } - _mediaTransportControlData, _mediaTransportControlDataErr := MediaTransportControlDataParseWithBuffer(ctx, readBuffer) +_mediaTransportControlData, _mediaTransportControlDataErr := MediaTransportControlDataParseWithBuffer(ctx, readBuffer) if _mediaTransportControlDataErr != nil { return nil, errors.Wrap(_mediaTransportControlDataErr, "Error parsing 'mediaTransportControlData' field of SALDataMediaTransport") } @@ -155,7 +158,8 @@ func SALDataMediaTransportParseWithBuffer(ctx context.Context, readBuffer utils. // Create a partially initialized instance _child := &_SALDataMediaTransport{ - _SALData: &_SALData{}, + _SALData: &_SALData{ + }, MediaTransportControlData: mediaTransportControlData, } _child._SALData._SALDataChildRequirements = _child @@ -178,17 +182,17 @@ func (m *_SALDataMediaTransport) SerializeWithWriteBuffer(ctx context.Context, w return errors.Wrap(pushErr, "Error pushing for SALDataMediaTransport") } - // Simple Field (mediaTransportControlData) - if pushErr := writeBuffer.PushContext("mediaTransportControlData"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for mediaTransportControlData") - } - _mediaTransportControlDataErr := writeBuffer.WriteSerializable(ctx, m.GetMediaTransportControlData()) - if popErr := writeBuffer.PopContext("mediaTransportControlData"); popErr != nil { - return errors.Wrap(popErr, "Error popping for mediaTransportControlData") - } - if _mediaTransportControlDataErr != nil { - return errors.Wrap(_mediaTransportControlDataErr, "Error serializing 'mediaTransportControlData' field") - } + // Simple Field (mediaTransportControlData) + if pushErr := writeBuffer.PushContext("mediaTransportControlData"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for mediaTransportControlData") + } + _mediaTransportControlDataErr := writeBuffer.WriteSerializable(ctx, m.GetMediaTransportControlData()) + if popErr := writeBuffer.PopContext("mediaTransportControlData"); popErr != nil { + return errors.Wrap(popErr, "Error popping for mediaTransportControlData") + } + if _mediaTransportControlDataErr != nil { + return errors.Wrap(_mediaTransportControlDataErr, "Error serializing 'mediaTransportControlData' field") + } if popErr := writeBuffer.PopContext("SALDataMediaTransport"); popErr != nil { return errors.Wrap(popErr, "Error popping for SALDataMediaTransport") @@ -198,6 +202,7 @@ func (m *_SALDataMediaTransport) SerializeWithWriteBuffer(ctx context.Context, w return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SALDataMediaTransport) isSALDataMediaTransport() bool { return true } @@ -212,3 +217,6 @@ func (m *_SALDataMediaTransport) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SALDataMetering.go b/plc4go/protocols/cbus/readwrite/model/SALDataMetering.go index 760b20c76f3..6b08a9680d7 100644 --- a/plc4go/protocols/cbus/readwrite/model/SALDataMetering.go +++ b/plc4go/protocols/cbus/readwrite/model/SALDataMetering.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SALDataMetering is the corresponding interface of SALDataMetering type SALDataMetering interface { @@ -46,31 +48,30 @@ type SALDataMeteringExactly interface { // _SALDataMetering is the data-structure of this message type _SALDataMetering struct { *_SALData - MeteringData MeteringData + MeteringData MeteringData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SALDataMetering) GetApplicationId() ApplicationId { - return ApplicationId_METERING -} +func (m *_SALDataMetering) GetApplicationId() ApplicationId { +return ApplicationId_METERING} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SALDataMetering) InitializeParent(parent SALData, salData SALData) { - m.SalData = salData +func (m *_SALDataMetering) InitializeParent(parent SALData , salData SALData ) { m.SalData = salData } -func (m *_SALDataMetering) GetParent() SALData { +func (m *_SALDataMetering) GetParent() SALData { return m._SALData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -85,11 +86,12 @@ func (m *_SALDataMetering) GetMeteringData() MeteringData { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSALDataMetering factory function for _SALDataMetering -func NewSALDataMetering(meteringData MeteringData, salData SALData) *_SALDataMetering { +func NewSALDataMetering( meteringData MeteringData , salData SALData ) *_SALDataMetering { _result := &_SALDataMetering{ MeteringData: meteringData, - _SALData: NewSALData(salData), + _SALData: NewSALData(salData), } _result._SALData._SALDataChildRequirements = _result return _result @@ -97,7 +99,7 @@ func NewSALDataMetering(meteringData MeteringData, salData SALData) *_SALDataMet // Deprecated: use the interface for direct cast func CastSALDataMetering(structType interface{}) SALDataMetering { - if casted, ok := structType.(SALDataMetering); ok { + if casted, ok := structType.(SALDataMetering); ok { return casted } if casted, ok := structType.(*SALDataMetering); ok { @@ -119,6 +121,7 @@ func (m *_SALDataMetering) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_SALDataMetering) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -140,7 +143,7 @@ func SALDataMeteringParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu if pullErr := readBuffer.PullContext("meteringData"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for meteringData") } - _meteringData, _meteringDataErr := MeteringDataParseWithBuffer(ctx, readBuffer) +_meteringData, _meteringDataErr := MeteringDataParseWithBuffer(ctx, readBuffer) if _meteringDataErr != nil { return nil, errors.Wrap(_meteringDataErr, "Error parsing 'meteringData' field of SALDataMetering") } @@ -155,7 +158,8 @@ func SALDataMeteringParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu // Create a partially initialized instance _child := &_SALDataMetering{ - _SALData: &_SALData{}, + _SALData: &_SALData{ + }, MeteringData: meteringData, } _child._SALData._SALDataChildRequirements = _child @@ -178,17 +182,17 @@ func (m *_SALDataMetering) SerializeWithWriteBuffer(ctx context.Context, writeBu return errors.Wrap(pushErr, "Error pushing for SALDataMetering") } - // Simple Field (meteringData) - if pushErr := writeBuffer.PushContext("meteringData"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for meteringData") - } - _meteringDataErr := writeBuffer.WriteSerializable(ctx, m.GetMeteringData()) - if popErr := writeBuffer.PopContext("meteringData"); popErr != nil { - return errors.Wrap(popErr, "Error popping for meteringData") - } - if _meteringDataErr != nil { - return errors.Wrap(_meteringDataErr, "Error serializing 'meteringData' field") - } + // Simple Field (meteringData) + if pushErr := writeBuffer.PushContext("meteringData"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for meteringData") + } + _meteringDataErr := writeBuffer.WriteSerializable(ctx, m.GetMeteringData()) + if popErr := writeBuffer.PopContext("meteringData"); popErr != nil { + return errors.Wrap(popErr, "Error popping for meteringData") + } + if _meteringDataErr != nil { + return errors.Wrap(_meteringDataErr, "Error serializing 'meteringData' field") + } if popErr := writeBuffer.PopContext("SALDataMetering"); popErr != nil { return errors.Wrap(popErr, "Error popping for SALDataMetering") @@ -198,6 +202,7 @@ func (m *_SALDataMetering) SerializeWithWriteBuffer(ctx context.Context, writeBu return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SALDataMetering) isSALDataMetering() bool { return true } @@ -212,3 +217,6 @@ func (m *_SALDataMetering) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SALDataPoolsSpasPondsFountainsControl.go b/plc4go/protocols/cbus/readwrite/model/SALDataPoolsSpasPondsFountainsControl.go index 1e313f3540b..0203d9812a4 100644 --- a/plc4go/protocols/cbus/readwrite/model/SALDataPoolsSpasPondsFountainsControl.go +++ b/plc4go/protocols/cbus/readwrite/model/SALDataPoolsSpasPondsFountainsControl.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SALDataPoolsSpasPondsFountainsControl is the corresponding interface of SALDataPoolsSpasPondsFountainsControl type SALDataPoolsSpasPondsFountainsControl interface { @@ -46,31 +48,30 @@ type SALDataPoolsSpasPondsFountainsControlExactly interface { // _SALDataPoolsSpasPondsFountainsControl is the data-structure of this message type _SALDataPoolsSpasPondsFountainsControl struct { *_SALData - PoolsSpaPondsFountainsData LightingData + PoolsSpaPondsFountainsData LightingData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SALDataPoolsSpasPondsFountainsControl) GetApplicationId() ApplicationId { - return ApplicationId_POOLS_SPAS_PONDS_FOUNTAINS_CONTROL -} +func (m *_SALDataPoolsSpasPondsFountainsControl) GetApplicationId() ApplicationId { +return ApplicationId_POOLS_SPAS_PONDS_FOUNTAINS_CONTROL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SALDataPoolsSpasPondsFountainsControl) InitializeParent(parent SALData, salData SALData) { - m.SalData = salData +func (m *_SALDataPoolsSpasPondsFountainsControl) InitializeParent(parent SALData , salData SALData ) { m.SalData = salData } -func (m *_SALDataPoolsSpasPondsFountainsControl) GetParent() SALData { +func (m *_SALDataPoolsSpasPondsFountainsControl) GetParent() SALData { return m._SALData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -85,11 +86,12 @@ func (m *_SALDataPoolsSpasPondsFountainsControl) GetPoolsSpaPondsFountainsData() /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSALDataPoolsSpasPondsFountainsControl factory function for _SALDataPoolsSpasPondsFountainsControl -func NewSALDataPoolsSpasPondsFountainsControl(poolsSpaPondsFountainsData LightingData, salData SALData) *_SALDataPoolsSpasPondsFountainsControl { +func NewSALDataPoolsSpasPondsFountainsControl( poolsSpaPondsFountainsData LightingData , salData SALData ) *_SALDataPoolsSpasPondsFountainsControl { _result := &_SALDataPoolsSpasPondsFountainsControl{ PoolsSpaPondsFountainsData: poolsSpaPondsFountainsData, - _SALData: NewSALData(salData), + _SALData: NewSALData(salData), } _result._SALData._SALDataChildRequirements = _result return _result @@ -97,7 +99,7 @@ func NewSALDataPoolsSpasPondsFountainsControl(poolsSpaPondsFountainsData Lightin // Deprecated: use the interface for direct cast func CastSALDataPoolsSpasPondsFountainsControl(structType interface{}) SALDataPoolsSpasPondsFountainsControl { - if casted, ok := structType.(SALDataPoolsSpasPondsFountainsControl); ok { + if casted, ok := structType.(SALDataPoolsSpasPondsFountainsControl); ok { return casted } if casted, ok := structType.(*SALDataPoolsSpasPondsFountainsControl); ok { @@ -119,6 +121,7 @@ func (m *_SALDataPoolsSpasPondsFountainsControl) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_SALDataPoolsSpasPondsFountainsControl) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -140,7 +143,7 @@ func SALDataPoolsSpasPondsFountainsControlParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("poolsSpaPondsFountainsData"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for poolsSpaPondsFountainsData") } - _poolsSpaPondsFountainsData, _poolsSpaPondsFountainsDataErr := LightingDataParseWithBuffer(ctx, readBuffer) +_poolsSpaPondsFountainsData, _poolsSpaPondsFountainsDataErr := LightingDataParseWithBuffer(ctx, readBuffer) if _poolsSpaPondsFountainsDataErr != nil { return nil, errors.Wrap(_poolsSpaPondsFountainsDataErr, "Error parsing 'poolsSpaPondsFountainsData' field of SALDataPoolsSpasPondsFountainsControl") } @@ -155,7 +158,8 @@ func SALDataPoolsSpasPondsFountainsControlParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_SALDataPoolsSpasPondsFountainsControl{ - _SALData: &_SALData{}, + _SALData: &_SALData{ + }, PoolsSpaPondsFountainsData: poolsSpaPondsFountainsData, } _child._SALData._SALDataChildRequirements = _child @@ -178,17 +182,17 @@ func (m *_SALDataPoolsSpasPondsFountainsControl) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for SALDataPoolsSpasPondsFountainsControl") } - // Simple Field (poolsSpaPondsFountainsData) - if pushErr := writeBuffer.PushContext("poolsSpaPondsFountainsData"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for poolsSpaPondsFountainsData") - } - _poolsSpaPondsFountainsDataErr := writeBuffer.WriteSerializable(ctx, m.GetPoolsSpaPondsFountainsData()) - if popErr := writeBuffer.PopContext("poolsSpaPondsFountainsData"); popErr != nil { - return errors.Wrap(popErr, "Error popping for poolsSpaPondsFountainsData") - } - if _poolsSpaPondsFountainsDataErr != nil { - return errors.Wrap(_poolsSpaPondsFountainsDataErr, "Error serializing 'poolsSpaPondsFountainsData' field") - } + // Simple Field (poolsSpaPondsFountainsData) + if pushErr := writeBuffer.PushContext("poolsSpaPondsFountainsData"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for poolsSpaPondsFountainsData") + } + _poolsSpaPondsFountainsDataErr := writeBuffer.WriteSerializable(ctx, m.GetPoolsSpaPondsFountainsData()) + if popErr := writeBuffer.PopContext("poolsSpaPondsFountainsData"); popErr != nil { + return errors.Wrap(popErr, "Error popping for poolsSpaPondsFountainsData") + } + if _poolsSpaPondsFountainsDataErr != nil { + return errors.Wrap(_poolsSpaPondsFountainsDataErr, "Error serializing 'poolsSpaPondsFountainsData' field") + } if popErr := writeBuffer.PopContext("SALDataPoolsSpasPondsFountainsControl"); popErr != nil { return errors.Wrap(popErr, "Error popping for SALDataPoolsSpasPondsFountainsControl") @@ -198,6 +202,7 @@ func (m *_SALDataPoolsSpasPondsFountainsControl) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SALDataPoolsSpasPondsFountainsControl) isSALDataPoolsSpasPondsFountainsControl() bool { return true } @@ -212,3 +217,6 @@ func (m *_SALDataPoolsSpasPondsFountainsControl) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SALDataReserved.go b/plc4go/protocols/cbus/readwrite/model/SALDataReserved.go index 35efd0bf335..822d11ab5e3 100644 --- a/plc4go/protocols/cbus/readwrite/model/SALDataReserved.go +++ b/plc4go/protocols/cbus/readwrite/model/SALDataReserved.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SALDataReserved is the corresponding interface of SALDataReserved type SALDataReserved interface { @@ -46,32 +48,33 @@ type _SALDataReserved struct { *_SALData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SALDataReserved) GetApplicationId() ApplicationId { - return ApplicationId_RESERVED -} +func (m *_SALDataReserved) GetApplicationId() ApplicationId { +return ApplicationId_RESERVED} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SALDataReserved) InitializeParent(parent SALData, salData SALData) { - m.SalData = salData +func (m *_SALDataReserved) InitializeParent(parent SALData , salData SALData ) { m.SalData = salData } -func (m *_SALDataReserved) GetParent() SALData { +func (m *_SALDataReserved) GetParent() SALData { return m._SALData } + // NewSALDataReserved factory function for _SALDataReserved -func NewSALDataReserved(salData SALData) *_SALDataReserved { +func NewSALDataReserved( salData SALData ) *_SALDataReserved { _result := &_SALDataReserved{ - _SALData: NewSALData(salData), + _SALData: NewSALData(salData), } _result._SALData._SALDataChildRequirements = _result return _result @@ -79,7 +82,7 @@ func NewSALDataReserved(salData SALData) *_SALDataReserved { // Deprecated: use the interface for direct cast func CastSALDataReserved(structType interface{}) SALDataReserved { - if casted, ok := structType.(SALDataReserved); ok { + if casted, ok := structType.(SALDataReserved); ok { return casted } if casted, ok := structType.(*SALDataReserved); ok { @@ -98,6 +101,7 @@ func (m *_SALDataReserved) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_SALDataReserved) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -116,7 +120,7 @@ func SALDataReservedParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"RESERVED Not yet implemented"}) } @@ -126,7 +130,8 @@ func SALDataReservedParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu // Create a partially initialized instance _child := &_SALDataReserved{ - _SALData: &_SALData{}, + _SALData: &_SALData{ + }, } _child._SALData._SALDataChildRequirements = _child return _child, nil @@ -156,6 +161,7 @@ func (m *_SALDataReserved) SerializeWithWriteBuffer(ctx context.Context, writeBu return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SALDataReserved) isSALDataReserved() bool { return true } @@ -170,3 +176,6 @@ func (m *_SALDataReserved) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SALDataRoomControlSystem.go b/plc4go/protocols/cbus/readwrite/model/SALDataRoomControlSystem.go index 0e85bf8cf84..527d50a8cf9 100644 --- a/plc4go/protocols/cbus/readwrite/model/SALDataRoomControlSystem.go +++ b/plc4go/protocols/cbus/readwrite/model/SALDataRoomControlSystem.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SALDataRoomControlSystem is the corresponding interface of SALDataRoomControlSystem type SALDataRoomControlSystem interface { @@ -46,32 +48,33 @@ type _SALDataRoomControlSystem struct { *_SALData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SALDataRoomControlSystem) GetApplicationId() ApplicationId { - return ApplicationId_ROOM_CONTROL_SYSTEM -} +func (m *_SALDataRoomControlSystem) GetApplicationId() ApplicationId { +return ApplicationId_ROOM_CONTROL_SYSTEM} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SALDataRoomControlSystem) InitializeParent(parent SALData, salData SALData) { - m.SalData = salData +func (m *_SALDataRoomControlSystem) InitializeParent(parent SALData , salData SALData ) { m.SalData = salData } -func (m *_SALDataRoomControlSystem) GetParent() SALData { +func (m *_SALDataRoomControlSystem) GetParent() SALData { return m._SALData } + // NewSALDataRoomControlSystem factory function for _SALDataRoomControlSystem -func NewSALDataRoomControlSystem(salData SALData) *_SALDataRoomControlSystem { +func NewSALDataRoomControlSystem( salData SALData ) *_SALDataRoomControlSystem { _result := &_SALDataRoomControlSystem{ - _SALData: NewSALData(salData), + _SALData: NewSALData(salData), } _result._SALData._SALDataChildRequirements = _result return _result @@ -79,7 +82,7 @@ func NewSALDataRoomControlSystem(salData SALData) *_SALDataRoomControlSystem { // Deprecated: use the interface for direct cast func CastSALDataRoomControlSystem(structType interface{}) SALDataRoomControlSystem { - if casted, ok := structType.(SALDataRoomControlSystem); ok { + if casted, ok := structType.(SALDataRoomControlSystem); ok { return casted } if casted, ok := structType.(*SALDataRoomControlSystem); ok { @@ -98,6 +101,7 @@ func (m *_SALDataRoomControlSystem) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_SALDataRoomControlSystem) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -116,7 +120,7 @@ func SALDataRoomControlSystemParseWithBuffer(ctx context.Context, readBuffer uti _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"ROOM_CONTROL_SYSTEM Not yet implemented"}) } @@ -126,7 +130,8 @@ func SALDataRoomControlSystemParseWithBuffer(ctx context.Context, readBuffer uti // Create a partially initialized instance _child := &_SALDataRoomControlSystem{ - _SALData: &_SALData{}, + _SALData: &_SALData{ + }, } _child._SALData._SALDataChildRequirements = _child return _child, nil @@ -156,6 +161,7 @@ func (m *_SALDataRoomControlSystem) SerializeWithWriteBuffer(ctx context.Context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SALDataRoomControlSystem) isSALDataRoomControlSystem() bool { return true } @@ -170,3 +176,6 @@ func (m *_SALDataRoomControlSystem) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SALDataSecurity.go b/plc4go/protocols/cbus/readwrite/model/SALDataSecurity.go index 9a25a0bad53..8df38cbb7c2 100644 --- a/plc4go/protocols/cbus/readwrite/model/SALDataSecurity.go +++ b/plc4go/protocols/cbus/readwrite/model/SALDataSecurity.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SALDataSecurity is the corresponding interface of SALDataSecurity type SALDataSecurity interface { @@ -46,31 +48,30 @@ type SALDataSecurityExactly interface { // _SALDataSecurity is the data-structure of this message type _SALDataSecurity struct { *_SALData - SecurityData SecurityData + SecurityData SecurityData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SALDataSecurity) GetApplicationId() ApplicationId { - return ApplicationId_SECURITY -} +func (m *_SALDataSecurity) GetApplicationId() ApplicationId { +return ApplicationId_SECURITY} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SALDataSecurity) InitializeParent(parent SALData, salData SALData) { - m.SalData = salData +func (m *_SALDataSecurity) InitializeParent(parent SALData , salData SALData ) { m.SalData = salData } -func (m *_SALDataSecurity) GetParent() SALData { +func (m *_SALDataSecurity) GetParent() SALData { return m._SALData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -85,11 +86,12 @@ func (m *_SALDataSecurity) GetSecurityData() SecurityData { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSALDataSecurity factory function for _SALDataSecurity -func NewSALDataSecurity(securityData SecurityData, salData SALData) *_SALDataSecurity { +func NewSALDataSecurity( securityData SecurityData , salData SALData ) *_SALDataSecurity { _result := &_SALDataSecurity{ SecurityData: securityData, - _SALData: NewSALData(salData), + _SALData: NewSALData(salData), } _result._SALData._SALDataChildRequirements = _result return _result @@ -97,7 +99,7 @@ func NewSALDataSecurity(securityData SecurityData, salData SALData) *_SALDataSec // Deprecated: use the interface for direct cast func CastSALDataSecurity(structType interface{}) SALDataSecurity { - if casted, ok := structType.(SALDataSecurity); ok { + if casted, ok := structType.(SALDataSecurity); ok { return casted } if casted, ok := structType.(*SALDataSecurity); ok { @@ -119,6 +121,7 @@ func (m *_SALDataSecurity) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_SALDataSecurity) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -140,7 +143,7 @@ func SALDataSecurityParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu if pullErr := readBuffer.PullContext("securityData"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for securityData") } - _securityData, _securityDataErr := SecurityDataParseWithBuffer(ctx, readBuffer) +_securityData, _securityDataErr := SecurityDataParseWithBuffer(ctx, readBuffer) if _securityDataErr != nil { return nil, errors.Wrap(_securityDataErr, "Error parsing 'securityData' field of SALDataSecurity") } @@ -155,7 +158,8 @@ func SALDataSecurityParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu // Create a partially initialized instance _child := &_SALDataSecurity{ - _SALData: &_SALData{}, + _SALData: &_SALData{ + }, SecurityData: securityData, } _child._SALData._SALDataChildRequirements = _child @@ -178,17 +182,17 @@ func (m *_SALDataSecurity) SerializeWithWriteBuffer(ctx context.Context, writeBu return errors.Wrap(pushErr, "Error pushing for SALDataSecurity") } - // Simple Field (securityData) - if pushErr := writeBuffer.PushContext("securityData"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for securityData") - } - _securityDataErr := writeBuffer.WriteSerializable(ctx, m.GetSecurityData()) - if popErr := writeBuffer.PopContext("securityData"); popErr != nil { - return errors.Wrap(popErr, "Error popping for securityData") - } - if _securityDataErr != nil { - return errors.Wrap(_securityDataErr, "Error serializing 'securityData' field") - } + // Simple Field (securityData) + if pushErr := writeBuffer.PushContext("securityData"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for securityData") + } + _securityDataErr := writeBuffer.WriteSerializable(ctx, m.GetSecurityData()) + if popErr := writeBuffer.PopContext("securityData"); popErr != nil { + return errors.Wrap(popErr, "Error popping for securityData") + } + if _securityDataErr != nil { + return errors.Wrap(_securityDataErr, "Error serializing 'securityData' field") + } if popErr := writeBuffer.PopContext("SALDataSecurity"); popErr != nil { return errors.Wrap(popErr, "Error popping for SALDataSecurity") @@ -198,6 +202,7 @@ func (m *_SALDataSecurity) SerializeWithWriteBuffer(ctx context.Context, writeBu return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SALDataSecurity) isSALDataSecurity() bool { return true } @@ -212,3 +217,6 @@ func (m *_SALDataSecurity) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SALDataTelephonyStatusAndControl.go b/plc4go/protocols/cbus/readwrite/model/SALDataTelephonyStatusAndControl.go index 37ac7e3c8ea..96db2c40fee 100644 --- a/plc4go/protocols/cbus/readwrite/model/SALDataTelephonyStatusAndControl.go +++ b/plc4go/protocols/cbus/readwrite/model/SALDataTelephonyStatusAndControl.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SALDataTelephonyStatusAndControl is the corresponding interface of SALDataTelephonyStatusAndControl type SALDataTelephonyStatusAndControl interface { @@ -46,31 +48,30 @@ type SALDataTelephonyStatusAndControlExactly interface { // _SALDataTelephonyStatusAndControl is the data-structure of this message type _SALDataTelephonyStatusAndControl struct { *_SALData - TelephonyData TelephonyData + TelephonyData TelephonyData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SALDataTelephonyStatusAndControl) GetApplicationId() ApplicationId { - return ApplicationId_TELEPHONY_STATUS_AND_CONTROL -} +func (m *_SALDataTelephonyStatusAndControl) GetApplicationId() ApplicationId { +return ApplicationId_TELEPHONY_STATUS_AND_CONTROL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SALDataTelephonyStatusAndControl) InitializeParent(parent SALData, salData SALData) { - m.SalData = salData +func (m *_SALDataTelephonyStatusAndControl) InitializeParent(parent SALData , salData SALData ) { m.SalData = salData } -func (m *_SALDataTelephonyStatusAndControl) GetParent() SALData { +func (m *_SALDataTelephonyStatusAndControl) GetParent() SALData { return m._SALData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -85,11 +86,12 @@ func (m *_SALDataTelephonyStatusAndControl) GetTelephonyData() TelephonyData { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSALDataTelephonyStatusAndControl factory function for _SALDataTelephonyStatusAndControl -func NewSALDataTelephonyStatusAndControl(telephonyData TelephonyData, salData SALData) *_SALDataTelephonyStatusAndControl { +func NewSALDataTelephonyStatusAndControl( telephonyData TelephonyData , salData SALData ) *_SALDataTelephonyStatusAndControl { _result := &_SALDataTelephonyStatusAndControl{ TelephonyData: telephonyData, - _SALData: NewSALData(salData), + _SALData: NewSALData(salData), } _result._SALData._SALDataChildRequirements = _result return _result @@ -97,7 +99,7 @@ func NewSALDataTelephonyStatusAndControl(telephonyData TelephonyData, salData SA // Deprecated: use the interface for direct cast func CastSALDataTelephonyStatusAndControl(structType interface{}) SALDataTelephonyStatusAndControl { - if casted, ok := structType.(SALDataTelephonyStatusAndControl); ok { + if casted, ok := structType.(SALDataTelephonyStatusAndControl); ok { return casted } if casted, ok := structType.(*SALDataTelephonyStatusAndControl); ok { @@ -119,6 +121,7 @@ func (m *_SALDataTelephonyStatusAndControl) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_SALDataTelephonyStatusAndControl) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -140,7 +143,7 @@ func SALDataTelephonyStatusAndControlParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("telephonyData"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for telephonyData") } - _telephonyData, _telephonyDataErr := TelephonyDataParseWithBuffer(ctx, readBuffer) +_telephonyData, _telephonyDataErr := TelephonyDataParseWithBuffer(ctx, readBuffer) if _telephonyDataErr != nil { return nil, errors.Wrap(_telephonyDataErr, "Error parsing 'telephonyData' field of SALDataTelephonyStatusAndControl") } @@ -155,7 +158,8 @@ func SALDataTelephonyStatusAndControlParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_SALDataTelephonyStatusAndControl{ - _SALData: &_SALData{}, + _SALData: &_SALData{ + }, TelephonyData: telephonyData, } _child._SALData._SALDataChildRequirements = _child @@ -178,17 +182,17 @@ func (m *_SALDataTelephonyStatusAndControl) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for SALDataTelephonyStatusAndControl") } - // Simple Field (telephonyData) - if pushErr := writeBuffer.PushContext("telephonyData"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for telephonyData") - } - _telephonyDataErr := writeBuffer.WriteSerializable(ctx, m.GetTelephonyData()) - if popErr := writeBuffer.PopContext("telephonyData"); popErr != nil { - return errors.Wrap(popErr, "Error popping for telephonyData") - } - if _telephonyDataErr != nil { - return errors.Wrap(_telephonyDataErr, "Error serializing 'telephonyData' field") - } + // Simple Field (telephonyData) + if pushErr := writeBuffer.PushContext("telephonyData"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for telephonyData") + } + _telephonyDataErr := writeBuffer.WriteSerializable(ctx, m.GetTelephonyData()) + if popErr := writeBuffer.PopContext("telephonyData"); popErr != nil { + return errors.Wrap(popErr, "Error popping for telephonyData") + } + if _telephonyDataErr != nil { + return errors.Wrap(_telephonyDataErr, "Error serializing 'telephonyData' field") + } if popErr := writeBuffer.PopContext("SALDataTelephonyStatusAndControl"); popErr != nil { return errors.Wrap(popErr, "Error popping for SALDataTelephonyStatusAndControl") @@ -198,6 +202,7 @@ func (m *_SALDataTelephonyStatusAndControl) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SALDataTelephonyStatusAndControl) isSALDataTelephonyStatusAndControl() bool { return true } @@ -212,3 +217,6 @@ func (m *_SALDataTelephonyStatusAndControl) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SALDataTemperatureBroadcast.go b/plc4go/protocols/cbus/readwrite/model/SALDataTemperatureBroadcast.go index 144900bc07b..048d2d4dcae 100644 --- a/plc4go/protocols/cbus/readwrite/model/SALDataTemperatureBroadcast.go +++ b/plc4go/protocols/cbus/readwrite/model/SALDataTemperatureBroadcast.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SALDataTemperatureBroadcast is the corresponding interface of SALDataTemperatureBroadcast type SALDataTemperatureBroadcast interface { @@ -46,31 +48,30 @@ type SALDataTemperatureBroadcastExactly interface { // _SALDataTemperatureBroadcast is the data-structure of this message type _SALDataTemperatureBroadcast struct { *_SALData - TemperatureBroadcastData TemperatureBroadcastData + TemperatureBroadcastData TemperatureBroadcastData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SALDataTemperatureBroadcast) GetApplicationId() ApplicationId { - return ApplicationId_TEMPERATURE_BROADCAST -} +func (m *_SALDataTemperatureBroadcast) GetApplicationId() ApplicationId { +return ApplicationId_TEMPERATURE_BROADCAST} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SALDataTemperatureBroadcast) InitializeParent(parent SALData, salData SALData) { - m.SalData = salData +func (m *_SALDataTemperatureBroadcast) InitializeParent(parent SALData , salData SALData ) { m.SalData = salData } -func (m *_SALDataTemperatureBroadcast) GetParent() SALData { +func (m *_SALDataTemperatureBroadcast) GetParent() SALData { return m._SALData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -85,11 +86,12 @@ func (m *_SALDataTemperatureBroadcast) GetTemperatureBroadcastData() Temperature /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSALDataTemperatureBroadcast factory function for _SALDataTemperatureBroadcast -func NewSALDataTemperatureBroadcast(temperatureBroadcastData TemperatureBroadcastData, salData SALData) *_SALDataTemperatureBroadcast { +func NewSALDataTemperatureBroadcast( temperatureBroadcastData TemperatureBroadcastData , salData SALData ) *_SALDataTemperatureBroadcast { _result := &_SALDataTemperatureBroadcast{ TemperatureBroadcastData: temperatureBroadcastData, - _SALData: NewSALData(salData), + _SALData: NewSALData(salData), } _result._SALData._SALDataChildRequirements = _result return _result @@ -97,7 +99,7 @@ func NewSALDataTemperatureBroadcast(temperatureBroadcastData TemperatureBroadcas // Deprecated: use the interface for direct cast func CastSALDataTemperatureBroadcast(structType interface{}) SALDataTemperatureBroadcast { - if casted, ok := structType.(SALDataTemperatureBroadcast); ok { + if casted, ok := structType.(SALDataTemperatureBroadcast); ok { return casted } if casted, ok := structType.(*SALDataTemperatureBroadcast); ok { @@ -119,6 +121,7 @@ func (m *_SALDataTemperatureBroadcast) GetLengthInBits(ctx context.Context) uint return lengthInBits } + func (m *_SALDataTemperatureBroadcast) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -140,7 +143,7 @@ func SALDataTemperatureBroadcastParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("temperatureBroadcastData"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for temperatureBroadcastData") } - _temperatureBroadcastData, _temperatureBroadcastDataErr := TemperatureBroadcastDataParseWithBuffer(ctx, readBuffer) +_temperatureBroadcastData, _temperatureBroadcastDataErr := TemperatureBroadcastDataParseWithBuffer(ctx, readBuffer) if _temperatureBroadcastDataErr != nil { return nil, errors.Wrap(_temperatureBroadcastDataErr, "Error parsing 'temperatureBroadcastData' field of SALDataTemperatureBroadcast") } @@ -155,7 +158,8 @@ func SALDataTemperatureBroadcastParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_SALDataTemperatureBroadcast{ - _SALData: &_SALData{}, + _SALData: &_SALData{ + }, TemperatureBroadcastData: temperatureBroadcastData, } _child._SALData._SALDataChildRequirements = _child @@ -178,17 +182,17 @@ func (m *_SALDataTemperatureBroadcast) SerializeWithWriteBuffer(ctx context.Cont return errors.Wrap(pushErr, "Error pushing for SALDataTemperatureBroadcast") } - // Simple Field (temperatureBroadcastData) - if pushErr := writeBuffer.PushContext("temperatureBroadcastData"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for temperatureBroadcastData") - } - _temperatureBroadcastDataErr := writeBuffer.WriteSerializable(ctx, m.GetTemperatureBroadcastData()) - if popErr := writeBuffer.PopContext("temperatureBroadcastData"); popErr != nil { - return errors.Wrap(popErr, "Error popping for temperatureBroadcastData") - } - if _temperatureBroadcastDataErr != nil { - return errors.Wrap(_temperatureBroadcastDataErr, "Error serializing 'temperatureBroadcastData' field") - } + // Simple Field (temperatureBroadcastData) + if pushErr := writeBuffer.PushContext("temperatureBroadcastData"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for temperatureBroadcastData") + } + _temperatureBroadcastDataErr := writeBuffer.WriteSerializable(ctx, m.GetTemperatureBroadcastData()) + if popErr := writeBuffer.PopContext("temperatureBroadcastData"); popErr != nil { + return errors.Wrap(popErr, "Error popping for temperatureBroadcastData") + } + if _temperatureBroadcastDataErr != nil { + return errors.Wrap(_temperatureBroadcastDataErr, "Error serializing 'temperatureBroadcastData' field") + } if popErr := writeBuffer.PopContext("SALDataTemperatureBroadcast"); popErr != nil { return errors.Wrap(popErr, "Error popping for SALDataTemperatureBroadcast") @@ -198,6 +202,7 @@ func (m *_SALDataTemperatureBroadcast) SerializeWithWriteBuffer(ctx context.Cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SALDataTemperatureBroadcast) isSALDataTemperatureBroadcast() bool { return true } @@ -212,3 +217,6 @@ func (m *_SALDataTemperatureBroadcast) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SALDataTesting.go b/plc4go/protocols/cbus/readwrite/model/SALDataTesting.go index 9e1430dde5c..639e7dd214f 100644 --- a/plc4go/protocols/cbus/readwrite/model/SALDataTesting.go +++ b/plc4go/protocols/cbus/readwrite/model/SALDataTesting.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SALDataTesting is the corresponding interface of SALDataTesting type SALDataTesting interface { @@ -46,32 +48,33 @@ type _SALDataTesting struct { *_SALData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SALDataTesting) GetApplicationId() ApplicationId { - return ApplicationId_TESTING -} +func (m *_SALDataTesting) GetApplicationId() ApplicationId { +return ApplicationId_TESTING} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SALDataTesting) InitializeParent(parent SALData, salData SALData) { - m.SalData = salData +func (m *_SALDataTesting) InitializeParent(parent SALData , salData SALData ) { m.SalData = salData } -func (m *_SALDataTesting) GetParent() SALData { +func (m *_SALDataTesting) GetParent() SALData { return m._SALData } + // NewSALDataTesting factory function for _SALDataTesting -func NewSALDataTesting(salData SALData) *_SALDataTesting { +func NewSALDataTesting( salData SALData ) *_SALDataTesting { _result := &_SALDataTesting{ - _SALData: NewSALData(salData), + _SALData: NewSALData(salData), } _result._SALData._SALDataChildRequirements = _result return _result @@ -79,7 +82,7 @@ func NewSALDataTesting(salData SALData) *_SALDataTesting { // Deprecated: use the interface for direct cast func CastSALDataTesting(structType interface{}) SALDataTesting { - if casted, ok := structType.(SALDataTesting); ok { + if casted, ok := structType.(SALDataTesting); ok { return casted } if casted, ok := structType.(*SALDataTesting); ok { @@ -98,6 +101,7 @@ func (m *_SALDataTesting) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_SALDataTesting) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -116,7 +120,7 @@ func SALDataTestingParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf _ = currentPos // Validation - if !(bool((1) == (2))) { + if (!(bool(((1)) == ((2))))) { return nil, errors.WithStack(utils.ParseValidationError{"TESTING Not yet implemented"}) } @@ -126,7 +130,8 @@ func SALDataTestingParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf // Create a partially initialized instance _child := &_SALDataTesting{ - _SALData: &_SALData{}, + _SALData: &_SALData{ + }, } _child._SALData._SALDataChildRequirements = _child return _child, nil @@ -156,6 +161,7 @@ func (m *_SALDataTesting) SerializeWithWriteBuffer(ctx context.Context, writeBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SALDataTesting) isSALDataTesting() bool { return true } @@ -170,3 +176,6 @@ func (m *_SALDataTesting) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SALDataTriggerControl.go b/plc4go/protocols/cbus/readwrite/model/SALDataTriggerControl.go index 28f24f5f503..1e05be63a45 100644 --- a/plc4go/protocols/cbus/readwrite/model/SALDataTriggerControl.go +++ b/plc4go/protocols/cbus/readwrite/model/SALDataTriggerControl.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SALDataTriggerControl is the corresponding interface of SALDataTriggerControl type SALDataTriggerControl interface { @@ -46,31 +48,30 @@ type SALDataTriggerControlExactly interface { // _SALDataTriggerControl is the data-structure of this message type _SALDataTriggerControl struct { *_SALData - TriggerControlData TriggerControlData + TriggerControlData TriggerControlData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SALDataTriggerControl) GetApplicationId() ApplicationId { - return ApplicationId_TRIGGER_CONTROL -} +func (m *_SALDataTriggerControl) GetApplicationId() ApplicationId { +return ApplicationId_TRIGGER_CONTROL} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SALDataTriggerControl) InitializeParent(parent SALData, salData SALData) { - m.SalData = salData +func (m *_SALDataTriggerControl) InitializeParent(parent SALData , salData SALData ) { m.SalData = salData } -func (m *_SALDataTriggerControl) GetParent() SALData { +func (m *_SALDataTriggerControl) GetParent() SALData { return m._SALData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -85,11 +86,12 @@ func (m *_SALDataTriggerControl) GetTriggerControlData() TriggerControlData { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSALDataTriggerControl factory function for _SALDataTriggerControl -func NewSALDataTriggerControl(triggerControlData TriggerControlData, salData SALData) *_SALDataTriggerControl { +func NewSALDataTriggerControl( triggerControlData TriggerControlData , salData SALData ) *_SALDataTriggerControl { _result := &_SALDataTriggerControl{ TriggerControlData: triggerControlData, - _SALData: NewSALData(salData), + _SALData: NewSALData(salData), } _result._SALData._SALDataChildRequirements = _result return _result @@ -97,7 +99,7 @@ func NewSALDataTriggerControl(triggerControlData TriggerControlData, salData SAL // Deprecated: use the interface for direct cast func CastSALDataTriggerControl(structType interface{}) SALDataTriggerControl { - if casted, ok := structType.(SALDataTriggerControl); ok { + if casted, ok := structType.(SALDataTriggerControl); ok { return casted } if casted, ok := structType.(*SALDataTriggerControl); ok { @@ -119,6 +121,7 @@ func (m *_SALDataTriggerControl) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_SALDataTriggerControl) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -140,7 +143,7 @@ func SALDataTriggerControlParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("triggerControlData"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for triggerControlData") } - _triggerControlData, _triggerControlDataErr := TriggerControlDataParseWithBuffer(ctx, readBuffer) +_triggerControlData, _triggerControlDataErr := TriggerControlDataParseWithBuffer(ctx, readBuffer) if _triggerControlDataErr != nil { return nil, errors.Wrap(_triggerControlDataErr, "Error parsing 'triggerControlData' field of SALDataTriggerControl") } @@ -155,7 +158,8 @@ func SALDataTriggerControlParseWithBuffer(ctx context.Context, readBuffer utils. // Create a partially initialized instance _child := &_SALDataTriggerControl{ - _SALData: &_SALData{}, + _SALData: &_SALData{ + }, TriggerControlData: triggerControlData, } _child._SALData._SALDataChildRequirements = _child @@ -178,17 +182,17 @@ func (m *_SALDataTriggerControl) SerializeWithWriteBuffer(ctx context.Context, w return errors.Wrap(pushErr, "Error pushing for SALDataTriggerControl") } - // Simple Field (triggerControlData) - if pushErr := writeBuffer.PushContext("triggerControlData"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for triggerControlData") - } - _triggerControlDataErr := writeBuffer.WriteSerializable(ctx, m.GetTriggerControlData()) - if popErr := writeBuffer.PopContext("triggerControlData"); popErr != nil { - return errors.Wrap(popErr, "Error popping for triggerControlData") - } - if _triggerControlDataErr != nil { - return errors.Wrap(_triggerControlDataErr, "Error serializing 'triggerControlData' field") - } + // Simple Field (triggerControlData) + if pushErr := writeBuffer.PushContext("triggerControlData"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for triggerControlData") + } + _triggerControlDataErr := writeBuffer.WriteSerializable(ctx, m.GetTriggerControlData()) + if popErr := writeBuffer.PopContext("triggerControlData"); popErr != nil { + return errors.Wrap(popErr, "Error popping for triggerControlData") + } + if _triggerControlDataErr != nil { + return errors.Wrap(_triggerControlDataErr, "Error serializing 'triggerControlData' field") + } if popErr := writeBuffer.PopContext("SALDataTriggerControl"); popErr != nil { return errors.Wrap(popErr, "Error popping for SALDataTriggerControl") @@ -198,6 +202,7 @@ func (m *_SALDataTriggerControl) SerializeWithWriteBuffer(ctx context.Context, w return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SALDataTriggerControl) isSALDataTriggerControl() bool { return true } @@ -212,3 +217,6 @@ func (m *_SALDataTriggerControl) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SALDataVentilation.go b/plc4go/protocols/cbus/readwrite/model/SALDataVentilation.go index 92266d50201..6c87b226257 100644 --- a/plc4go/protocols/cbus/readwrite/model/SALDataVentilation.go +++ b/plc4go/protocols/cbus/readwrite/model/SALDataVentilation.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SALDataVentilation is the corresponding interface of SALDataVentilation type SALDataVentilation interface { @@ -46,31 +48,30 @@ type SALDataVentilationExactly interface { // _SALDataVentilation is the data-structure of this message type _SALDataVentilation struct { *_SALData - VentilationData LightingData + VentilationData LightingData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SALDataVentilation) GetApplicationId() ApplicationId { - return ApplicationId_VENTILATION -} +func (m *_SALDataVentilation) GetApplicationId() ApplicationId { +return ApplicationId_VENTILATION} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SALDataVentilation) InitializeParent(parent SALData, salData SALData) { - m.SalData = salData +func (m *_SALDataVentilation) InitializeParent(parent SALData , salData SALData ) { m.SalData = salData } -func (m *_SALDataVentilation) GetParent() SALData { +func (m *_SALDataVentilation) GetParent() SALData { return m._SALData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -85,11 +86,12 @@ func (m *_SALDataVentilation) GetVentilationData() LightingData { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSALDataVentilation factory function for _SALDataVentilation -func NewSALDataVentilation(ventilationData LightingData, salData SALData) *_SALDataVentilation { +func NewSALDataVentilation( ventilationData LightingData , salData SALData ) *_SALDataVentilation { _result := &_SALDataVentilation{ VentilationData: ventilationData, - _SALData: NewSALData(salData), + _SALData: NewSALData(salData), } _result._SALData._SALDataChildRequirements = _result return _result @@ -97,7 +99,7 @@ func NewSALDataVentilation(ventilationData LightingData, salData SALData) *_SALD // Deprecated: use the interface for direct cast func CastSALDataVentilation(structType interface{}) SALDataVentilation { - if casted, ok := structType.(SALDataVentilation); ok { + if casted, ok := structType.(SALDataVentilation); ok { return casted } if casted, ok := structType.(*SALDataVentilation); ok { @@ -119,6 +121,7 @@ func (m *_SALDataVentilation) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_SALDataVentilation) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -140,7 +143,7 @@ func SALDataVentilationParseWithBuffer(ctx context.Context, readBuffer utils.Rea if pullErr := readBuffer.PullContext("ventilationData"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for ventilationData") } - _ventilationData, _ventilationDataErr := LightingDataParseWithBuffer(ctx, readBuffer) +_ventilationData, _ventilationDataErr := LightingDataParseWithBuffer(ctx, readBuffer) if _ventilationDataErr != nil { return nil, errors.Wrap(_ventilationDataErr, "Error parsing 'ventilationData' field of SALDataVentilation") } @@ -155,7 +158,8 @@ func SALDataVentilationParseWithBuffer(ctx context.Context, readBuffer utils.Rea // Create a partially initialized instance _child := &_SALDataVentilation{ - _SALData: &_SALData{}, + _SALData: &_SALData{ + }, VentilationData: ventilationData, } _child._SALData._SALDataChildRequirements = _child @@ -178,17 +182,17 @@ func (m *_SALDataVentilation) SerializeWithWriteBuffer(ctx context.Context, writ return errors.Wrap(pushErr, "Error pushing for SALDataVentilation") } - // Simple Field (ventilationData) - if pushErr := writeBuffer.PushContext("ventilationData"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for ventilationData") - } - _ventilationDataErr := writeBuffer.WriteSerializable(ctx, m.GetVentilationData()) - if popErr := writeBuffer.PopContext("ventilationData"); popErr != nil { - return errors.Wrap(popErr, "Error popping for ventilationData") - } - if _ventilationDataErr != nil { - return errors.Wrap(_ventilationDataErr, "Error serializing 'ventilationData' field") - } + // Simple Field (ventilationData) + if pushErr := writeBuffer.PushContext("ventilationData"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for ventilationData") + } + _ventilationDataErr := writeBuffer.WriteSerializable(ctx, m.GetVentilationData()) + if popErr := writeBuffer.PopContext("ventilationData"); popErr != nil { + return errors.Wrap(popErr, "Error popping for ventilationData") + } + if _ventilationDataErr != nil { + return errors.Wrap(_ventilationDataErr, "Error serializing 'ventilationData' field") + } if popErr := writeBuffer.PopContext("SALDataVentilation"); popErr != nil { return errors.Wrap(popErr, "Error popping for SALDataVentilation") @@ -198,6 +202,7 @@ func (m *_SALDataVentilation) SerializeWithWriteBuffer(ctx context.Context, writ return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SALDataVentilation) isSALDataVentilation() bool { return true } @@ -212,3 +217,6 @@ func (m *_SALDataVentilation) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityArmCode.go b/plc4go/protocols/cbus/readwrite/model/SecurityArmCode.go index 5d49719d194..996994346ab 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityArmCode.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityArmCode.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityArmCode is the corresponding interface of SecurityArmCode type SecurityArmCode interface { @@ -54,9 +56,10 @@ type SecurityArmCodeExactly interface { // _SecurityArmCode is the data-structure of this message type _SecurityArmCode struct { - Code uint8 + Code uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -110,14 +113,15 @@ func (m *_SecurityArmCode) GetIsReserved() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSecurityArmCode factory function for _SecurityArmCode -func NewSecurityArmCode(code uint8) *_SecurityArmCode { - return &_SecurityArmCode{Code: code} +func NewSecurityArmCode( code uint8 ) *_SecurityArmCode { +return &_SecurityArmCode{ Code: code } } // Deprecated: use the interface for direct cast func CastSecurityArmCode(structType interface{}) SecurityArmCode { - if casted, ok := structType.(SecurityArmCode); ok { + if casted, ok := structType.(SecurityArmCode); ok { return casted } if casted, ok := structType.(*SecurityArmCode); ok { @@ -134,7 +138,7 @@ func (m *_SecurityArmCode) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (code) - lengthInBits += 8 + lengthInBits += 8; // A virtual field doesn't have any in- or output. @@ -149,6 +153,7 @@ func (m *_SecurityArmCode) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_SecurityArmCode) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -167,7 +172,7 @@ func SecurityArmCodeParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu _ = currentPos // Simple Field (code) - _code, _codeErr := readBuffer.ReadUint8("code", 8) +_code, _codeErr := readBuffer.ReadUint8("code", 8) if _codeErr != nil { return nil, errors.Wrap(_codeErr, "Error parsing 'code' field of SecurityArmCode") } @@ -204,8 +209,8 @@ func SecurityArmCodeParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu // Create the instance return &_SecurityArmCode{ - Code: code, - }, nil + Code: code, + }, nil } func (m *_SecurityArmCode) Serialize() ([]byte, error) { @@ -219,7 +224,7 @@ func (m *_SecurityArmCode) Serialize() ([]byte, error) { func (m *_SecurityArmCode) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("SecurityArmCode"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("SecurityArmCode"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for SecurityArmCode") } @@ -256,6 +261,7 @@ func (m *_SecurityArmCode) SerializeWithWriteBuffer(ctx context.Context, writeBu return nil } + func (m *_SecurityArmCode) isSecurityArmCode() bool { return true } @@ -270,3 +276,6 @@ func (m *_SecurityArmCode) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityCommandType.go b/plc4go/protocols/cbus/readwrite/model/SecurityCommandType.go index 2069f8c8f35..b04ab8cd1a5 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityCommandType.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityCommandType.go @@ -35,9 +35,9 @@ type ISecurityCommandType interface { NumberOfArguments() uint8 } -const ( - SecurityCommandType_OFF SecurityCommandType = 0x00 - SecurityCommandType_ON SecurityCommandType = 0x01 +const( + SecurityCommandType_OFF SecurityCommandType = 0x00 + SecurityCommandType_ON SecurityCommandType = 0x01 SecurityCommandType_EVENT SecurityCommandType = 0x02 ) @@ -45,29 +45,26 @@ var SecurityCommandTypeValues []SecurityCommandType func init() { _ = errors.New - SecurityCommandTypeValues = []SecurityCommandType{ + SecurityCommandTypeValues = []SecurityCommandType { SecurityCommandType_OFF, SecurityCommandType_ON, SecurityCommandType_EVENT, } } + func (e SecurityCommandType) NumberOfArguments() uint8 { - switch e { - case 0x00: - { /* '0x00' */ - return 0 + switch e { + case 0x00: { /* '0x00' */ + return 0 } - case 0x01: - { /* '0x01' */ - return 1 + case 0x01: { /* '0x01' */ + return 1 } - case 0x02: - { /* '0x02' */ - return 0xFF + case 0x02: { /* '0x02' */ + return 0xFF } - default: - { + default: { return 0 } } @@ -83,12 +80,12 @@ func SecurityCommandTypeFirstEnumForFieldNumberOfArguments(value uint8) (Securit } func SecurityCommandTypeByValue(value uint8) (enum SecurityCommandType, ok bool) { switch value { - case 0x00: - return SecurityCommandType_OFF, true - case 0x01: - return SecurityCommandType_ON, true - case 0x02: - return SecurityCommandType_EVENT, true + case 0x00: + return SecurityCommandType_OFF, true + case 0x01: + return SecurityCommandType_ON, true + case 0x02: + return SecurityCommandType_EVENT, true } return 0, false } @@ -105,13 +102,13 @@ func SecurityCommandTypeByName(value string) (enum SecurityCommandType, ok bool) return 0, false } -func SecurityCommandTypeKnows(value uint8) bool { +func SecurityCommandTypeKnows(value uint8) bool { for _, typeValue := range SecurityCommandTypeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastSecurityCommandType(structType interface{}) SecurityCommandType { @@ -177,3 +174,4 @@ func (e SecurityCommandType) PLC4XEnumName() string { func (e SecurityCommandType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityCommandTypeContainer.go b/plc4go/protocols/cbus/readwrite/model/SecurityCommandTypeContainer.go index 732278b19ba..de8784341b0 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityCommandTypeContainer.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityCommandTypeContainer.go @@ -36,73 +36,73 @@ type ISecurityCommandTypeContainer interface { CommandType() SecurityCommandType } -const ( - SecurityCommandTypeContainer_SecurityCommandOff_0Bytes SecurityCommandTypeContainer = 0x00 - SecurityCommandTypeContainer_SecurityCommandOff_1Bytes SecurityCommandTypeContainer = 0x01 - SecurityCommandTypeContainer_SecurityCommandOff_2Bytes SecurityCommandTypeContainer = 0x02 - SecurityCommandTypeContainer_SecurityCommandOff_3Bytes SecurityCommandTypeContainer = 0x03 - SecurityCommandTypeContainer_SecurityCommandOff_4Bytes SecurityCommandTypeContainer = 0x04 - SecurityCommandTypeContainer_SecurityCommandOff_5Bytes SecurityCommandTypeContainer = 0x05 - SecurityCommandTypeContainer_SecurityCommandOff_6Bytes SecurityCommandTypeContainer = 0x06 - SecurityCommandTypeContainer_SecurityCommandOff_7Bytes SecurityCommandTypeContainer = 0x07 - SecurityCommandTypeContainer_SecurityCommandEvent_0Bytes SecurityCommandTypeContainer = 0x08 - SecurityCommandTypeContainer_SecurityCommandEvent_1Bytes SecurityCommandTypeContainer = 0x09 - SecurityCommandTypeContainer_SecurityCommandEvent_2Bytes SecurityCommandTypeContainer = 0x0A - SecurityCommandTypeContainer_SecurityCommandEvent_3Bytes SecurityCommandTypeContainer = 0x0B - SecurityCommandTypeContainer_SecurityCommandEvent_4Bytes SecurityCommandTypeContainer = 0x0C - SecurityCommandTypeContainer_SecurityCommandEvent_5Bytes SecurityCommandTypeContainer = 0x0D - SecurityCommandTypeContainer_SecurityCommandEvent_6Bytes SecurityCommandTypeContainer = 0x0E - SecurityCommandTypeContainer_SecurityCommandEvent_7Bytes SecurityCommandTypeContainer = 0x0F - SecurityCommandTypeContainer_SecurityCommandOn_0Bytes SecurityCommandTypeContainer = 0x78 - SecurityCommandTypeContainer_SecurityCommandOn_1Bytes SecurityCommandTypeContainer = 0x79 - SecurityCommandTypeContainer_SecurityCommandOn_2Bytes SecurityCommandTypeContainer = 0x7A - SecurityCommandTypeContainer_SecurityCommandOn_3Bytes SecurityCommandTypeContainer = 0x7B - SecurityCommandTypeContainer_SecurityCommandOn_4Bytes SecurityCommandTypeContainer = 0x7C - SecurityCommandTypeContainer_SecurityCommandOn_5Bytes SecurityCommandTypeContainer = 0x7D - SecurityCommandTypeContainer_SecurityCommandOn_6Bytes SecurityCommandTypeContainer = 0x7E - SecurityCommandTypeContainer_SecurityCommandOn_7Bytes SecurityCommandTypeContainer = 0x7F - SecurityCommandTypeContainer_SecurityCommandLongOff_0Bytes SecurityCommandTypeContainer = 0x80 - SecurityCommandTypeContainer_SecurityCommandLongOff_1Bytes SecurityCommandTypeContainer = 0x81 - SecurityCommandTypeContainer_SecurityCommandLongOff_2Bytes SecurityCommandTypeContainer = 0x82 - SecurityCommandTypeContainer_SecurityCommandLongOff_3Bytes SecurityCommandTypeContainer = 0x83 - SecurityCommandTypeContainer_SecurityCommandLongOff_4Bytes SecurityCommandTypeContainer = 0x84 - SecurityCommandTypeContainer_SecurityCommandLongOff_5Bytes SecurityCommandTypeContainer = 0x85 - SecurityCommandTypeContainer_SecurityCommandLongOff_6Bytes SecurityCommandTypeContainer = 0x86 - SecurityCommandTypeContainer_SecurityCommandLongOff_7Bytes SecurityCommandTypeContainer = 0x87 - SecurityCommandTypeContainer_SecurityCommandLongOff_8Bytes SecurityCommandTypeContainer = 0x88 - SecurityCommandTypeContainer_SecurityCommandLongOff_9Bytes SecurityCommandTypeContainer = 0x89 - SecurityCommandTypeContainer_SecurityCommandLongOff_10Bytes SecurityCommandTypeContainer = 0x8A - SecurityCommandTypeContainer_SecurityCommandLongOff_11Bytes SecurityCommandTypeContainer = 0x8B - SecurityCommandTypeContainer_SecurityCommandLongOff_12Bytes SecurityCommandTypeContainer = 0x8C - SecurityCommandTypeContainer_SecurityCommandLongOff_13Bytes SecurityCommandTypeContainer = 0x8D - SecurityCommandTypeContainer_SecurityCommandLongOff_14Bytes SecurityCommandTypeContainer = 0x8E - SecurityCommandTypeContainer_SecurityCommandLongOff_15Bytes SecurityCommandTypeContainer = 0x8F - SecurityCommandTypeContainer_SecurityCommandLongOff_16Bytes SecurityCommandTypeContainer = 0x90 - SecurityCommandTypeContainer_SecurityCommandLongOff_17Bytes SecurityCommandTypeContainer = 0x91 - SecurityCommandTypeContainer_SecurityCommandLongOff_18Bytes SecurityCommandTypeContainer = 0x92 - SecurityCommandTypeContainer_SecurityCommandLongOff_19Bytes SecurityCommandTypeContainer = 0x93 - SecurityCommandTypeContainer_SecurityCommandLongOff_20Bytes SecurityCommandTypeContainer = 0x94 - SecurityCommandTypeContainer_SecurityCommandLongOff_21Bytes SecurityCommandTypeContainer = 0x95 - SecurityCommandTypeContainer_SecurityCommandLongOff_22Bytes SecurityCommandTypeContainer = 0x96 - SecurityCommandTypeContainer_SecurityCommandLongOff_23Bytes SecurityCommandTypeContainer = 0x97 - SecurityCommandTypeContainer_SecurityCommandLongOff_24Bytes SecurityCommandTypeContainer = 0x98 - SecurityCommandTypeContainer_SecurityCommandLongOff_25Bytes SecurityCommandTypeContainer = 0x99 - SecurityCommandTypeContainer_SecurityCommandLongOff_26Bytes SecurityCommandTypeContainer = 0x9A - SecurityCommandTypeContainer_SecurityCommandLongOff_27Bytes SecurityCommandTypeContainer = 0x9B - SecurityCommandTypeContainer_SecurityCommandLongOff_28Bytes SecurityCommandTypeContainer = 0x9C - SecurityCommandTypeContainer_SecurityCommandLongOff_29Bytes SecurityCommandTypeContainer = 0x9D - SecurityCommandTypeContainer_SecurityCommandLongOff_30Bytes SecurityCommandTypeContainer = 0x9E - SecurityCommandTypeContainer_SecurityCommandLongOff_31Bytes SecurityCommandTypeContainer = 0x9F - SecurityCommandTypeContainer_SecurityCommandLongEvent_0Bytes SecurityCommandTypeContainer = 0xA0 - SecurityCommandTypeContainer_SecurityCommandLongEvent_1Bytes SecurityCommandTypeContainer = 0xA1 - SecurityCommandTypeContainer_SecurityCommandLongEvent_2Bytes SecurityCommandTypeContainer = 0xA2 - SecurityCommandTypeContainer_SecurityCommandLongEvent_3Bytes SecurityCommandTypeContainer = 0xA3 - SecurityCommandTypeContainer_SecurityCommandLongEvent_4Bytes SecurityCommandTypeContainer = 0xA4 - SecurityCommandTypeContainer_SecurityCommandLongEvent_5Bytes SecurityCommandTypeContainer = 0xA5 - SecurityCommandTypeContainer_SecurityCommandLongEvent_6Bytes SecurityCommandTypeContainer = 0xA6 - SecurityCommandTypeContainer_SecurityCommandLongEvent_7Bytes SecurityCommandTypeContainer = 0xA7 - SecurityCommandTypeContainer_SecurityCommandLongEvent_8Bytes SecurityCommandTypeContainer = 0xA8 - SecurityCommandTypeContainer_SecurityCommandLongEvent_9Bytes SecurityCommandTypeContainer = 0xA9 +const( + SecurityCommandTypeContainer_SecurityCommandOff_0Bytes SecurityCommandTypeContainer = 0x00 + SecurityCommandTypeContainer_SecurityCommandOff_1Bytes SecurityCommandTypeContainer = 0x01 + SecurityCommandTypeContainer_SecurityCommandOff_2Bytes SecurityCommandTypeContainer = 0x02 + SecurityCommandTypeContainer_SecurityCommandOff_3Bytes SecurityCommandTypeContainer = 0x03 + SecurityCommandTypeContainer_SecurityCommandOff_4Bytes SecurityCommandTypeContainer = 0x04 + SecurityCommandTypeContainer_SecurityCommandOff_5Bytes SecurityCommandTypeContainer = 0x05 + SecurityCommandTypeContainer_SecurityCommandOff_6Bytes SecurityCommandTypeContainer = 0x06 + SecurityCommandTypeContainer_SecurityCommandOff_7Bytes SecurityCommandTypeContainer = 0x07 + SecurityCommandTypeContainer_SecurityCommandEvent_0Bytes SecurityCommandTypeContainer = 0x08 + SecurityCommandTypeContainer_SecurityCommandEvent_1Bytes SecurityCommandTypeContainer = 0x09 + SecurityCommandTypeContainer_SecurityCommandEvent_2Bytes SecurityCommandTypeContainer = 0x0A + SecurityCommandTypeContainer_SecurityCommandEvent_3Bytes SecurityCommandTypeContainer = 0x0B + SecurityCommandTypeContainer_SecurityCommandEvent_4Bytes SecurityCommandTypeContainer = 0x0C + SecurityCommandTypeContainer_SecurityCommandEvent_5Bytes SecurityCommandTypeContainer = 0x0D + SecurityCommandTypeContainer_SecurityCommandEvent_6Bytes SecurityCommandTypeContainer = 0x0E + SecurityCommandTypeContainer_SecurityCommandEvent_7Bytes SecurityCommandTypeContainer = 0x0F + SecurityCommandTypeContainer_SecurityCommandOn_0Bytes SecurityCommandTypeContainer = 0x78 + SecurityCommandTypeContainer_SecurityCommandOn_1Bytes SecurityCommandTypeContainer = 0x79 + SecurityCommandTypeContainer_SecurityCommandOn_2Bytes SecurityCommandTypeContainer = 0x7A + SecurityCommandTypeContainer_SecurityCommandOn_3Bytes SecurityCommandTypeContainer = 0x7B + SecurityCommandTypeContainer_SecurityCommandOn_4Bytes SecurityCommandTypeContainer = 0x7C + SecurityCommandTypeContainer_SecurityCommandOn_5Bytes SecurityCommandTypeContainer = 0x7D + SecurityCommandTypeContainer_SecurityCommandOn_6Bytes SecurityCommandTypeContainer = 0x7E + SecurityCommandTypeContainer_SecurityCommandOn_7Bytes SecurityCommandTypeContainer = 0x7F + SecurityCommandTypeContainer_SecurityCommandLongOff_0Bytes SecurityCommandTypeContainer = 0x80 + SecurityCommandTypeContainer_SecurityCommandLongOff_1Bytes SecurityCommandTypeContainer = 0x81 + SecurityCommandTypeContainer_SecurityCommandLongOff_2Bytes SecurityCommandTypeContainer = 0x82 + SecurityCommandTypeContainer_SecurityCommandLongOff_3Bytes SecurityCommandTypeContainer = 0x83 + SecurityCommandTypeContainer_SecurityCommandLongOff_4Bytes SecurityCommandTypeContainer = 0x84 + SecurityCommandTypeContainer_SecurityCommandLongOff_5Bytes SecurityCommandTypeContainer = 0x85 + SecurityCommandTypeContainer_SecurityCommandLongOff_6Bytes SecurityCommandTypeContainer = 0x86 + SecurityCommandTypeContainer_SecurityCommandLongOff_7Bytes SecurityCommandTypeContainer = 0x87 + SecurityCommandTypeContainer_SecurityCommandLongOff_8Bytes SecurityCommandTypeContainer = 0x88 + SecurityCommandTypeContainer_SecurityCommandLongOff_9Bytes SecurityCommandTypeContainer = 0x89 + SecurityCommandTypeContainer_SecurityCommandLongOff_10Bytes SecurityCommandTypeContainer = 0x8A + SecurityCommandTypeContainer_SecurityCommandLongOff_11Bytes SecurityCommandTypeContainer = 0x8B + SecurityCommandTypeContainer_SecurityCommandLongOff_12Bytes SecurityCommandTypeContainer = 0x8C + SecurityCommandTypeContainer_SecurityCommandLongOff_13Bytes SecurityCommandTypeContainer = 0x8D + SecurityCommandTypeContainer_SecurityCommandLongOff_14Bytes SecurityCommandTypeContainer = 0x8E + SecurityCommandTypeContainer_SecurityCommandLongOff_15Bytes SecurityCommandTypeContainer = 0x8F + SecurityCommandTypeContainer_SecurityCommandLongOff_16Bytes SecurityCommandTypeContainer = 0x90 + SecurityCommandTypeContainer_SecurityCommandLongOff_17Bytes SecurityCommandTypeContainer = 0x91 + SecurityCommandTypeContainer_SecurityCommandLongOff_18Bytes SecurityCommandTypeContainer = 0x92 + SecurityCommandTypeContainer_SecurityCommandLongOff_19Bytes SecurityCommandTypeContainer = 0x93 + SecurityCommandTypeContainer_SecurityCommandLongOff_20Bytes SecurityCommandTypeContainer = 0x94 + SecurityCommandTypeContainer_SecurityCommandLongOff_21Bytes SecurityCommandTypeContainer = 0x95 + SecurityCommandTypeContainer_SecurityCommandLongOff_22Bytes SecurityCommandTypeContainer = 0x96 + SecurityCommandTypeContainer_SecurityCommandLongOff_23Bytes SecurityCommandTypeContainer = 0x97 + SecurityCommandTypeContainer_SecurityCommandLongOff_24Bytes SecurityCommandTypeContainer = 0x98 + SecurityCommandTypeContainer_SecurityCommandLongOff_25Bytes SecurityCommandTypeContainer = 0x99 + SecurityCommandTypeContainer_SecurityCommandLongOff_26Bytes SecurityCommandTypeContainer = 0x9A + SecurityCommandTypeContainer_SecurityCommandLongOff_27Bytes SecurityCommandTypeContainer = 0x9B + SecurityCommandTypeContainer_SecurityCommandLongOff_28Bytes SecurityCommandTypeContainer = 0x9C + SecurityCommandTypeContainer_SecurityCommandLongOff_29Bytes SecurityCommandTypeContainer = 0x9D + SecurityCommandTypeContainer_SecurityCommandLongOff_30Bytes SecurityCommandTypeContainer = 0x9E + SecurityCommandTypeContainer_SecurityCommandLongOff_31Bytes SecurityCommandTypeContainer = 0x9F + SecurityCommandTypeContainer_SecurityCommandLongEvent_0Bytes SecurityCommandTypeContainer = 0xA0 + SecurityCommandTypeContainer_SecurityCommandLongEvent_1Bytes SecurityCommandTypeContainer = 0xA1 + SecurityCommandTypeContainer_SecurityCommandLongEvent_2Bytes SecurityCommandTypeContainer = 0xA2 + SecurityCommandTypeContainer_SecurityCommandLongEvent_3Bytes SecurityCommandTypeContainer = 0xA3 + SecurityCommandTypeContainer_SecurityCommandLongEvent_4Bytes SecurityCommandTypeContainer = 0xA4 + SecurityCommandTypeContainer_SecurityCommandLongEvent_5Bytes SecurityCommandTypeContainer = 0xA5 + SecurityCommandTypeContainer_SecurityCommandLongEvent_6Bytes SecurityCommandTypeContainer = 0xA6 + SecurityCommandTypeContainer_SecurityCommandLongEvent_7Bytes SecurityCommandTypeContainer = 0xA7 + SecurityCommandTypeContainer_SecurityCommandLongEvent_8Bytes SecurityCommandTypeContainer = 0xA8 + SecurityCommandTypeContainer_SecurityCommandLongEvent_9Bytes SecurityCommandTypeContainer = 0xA9 SecurityCommandTypeContainer_SecurityCommandLongEvent_10Bytes SecurityCommandTypeContainer = 0xAA SecurityCommandTypeContainer_SecurityCommandLongEvent_11Bytes SecurityCommandTypeContainer = 0xAB SecurityCommandTypeContainer_SecurityCommandLongEvent_12Bytes SecurityCommandTypeContainer = 0xAC @@ -125,45 +125,45 @@ const ( SecurityCommandTypeContainer_SecurityCommandLongEvent_29Bytes SecurityCommandTypeContainer = 0xBD SecurityCommandTypeContainer_SecurityCommandLongEvent_30Bytes SecurityCommandTypeContainer = 0xBE SecurityCommandTypeContainer_SecurityCommandLongEvent_31Bytes SecurityCommandTypeContainer = 0xBF - SecurityCommandTypeContainer_SecurityCommandLongOn_0Bytes SecurityCommandTypeContainer = 0xE0 - SecurityCommandTypeContainer_SecurityCommandLongOn_1Bytes SecurityCommandTypeContainer = 0xE1 - SecurityCommandTypeContainer_SecurityCommandLongOn_2Bytes SecurityCommandTypeContainer = 0xE2 - SecurityCommandTypeContainer_SecurityCommandLongOn_3Bytes SecurityCommandTypeContainer = 0xE3 - SecurityCommandTypeContainer_SecurityCommandLongOn_4Bytes SecurityCommandTypeContainer = 0xE4 - SecurityCommandTypeContainer_SecurityCommandLongOn_5Bytes SecurityCommandTypeContainer = 0xE5 - SecurityCommandTypeContainer_SecurityCommandLongOn_6Bytes SecurityCommandTypeContainer = 0xE6 - SecurityCommandTypeContainer_SecurityCommandLongOn_7Bytes SecurityCommandTypeContainer = 0xE7 - SecurityCommandTypeContainer_SecurityCommandLongOn_8Bytes SecurityCommandTypeContainer = 0xE8 - SecurityCommandTypeContainer_SecurityCommandLongOn_9Bytes SecurityCommandTypeContainer = 0xE9 - SecurityCommandTypeContainer_SecurityCommandLongOn_10Bytes SecurityCommandTypeContainer = 0xEA - SecurityCommandTypeContainer_SecurityCommandLongOn_11Bytes SecurityCommandTypeContainer = 0xEB - SecurityCommandTypeContainer_SecurityCommandLongOn_12Bytes SecurityCommandTypeContainer = 0xEC - SecurityCommandTypeContainer_SecurityCommandLongOn_13Bytes SecurityCommandTypeContainer = 0xED - SecurityCommandTypeContainer_SecurityCommandLongOn_14Bytes SecurityCommandTypeContainer = 0xEE - SecurityCommandTypeContainer_SecurityCommandLongOn_15Bytes SecurityCommandTypeContainer = 0xEF - SecurityCommandTypeContainer_SecurityCommandLongOn_16Bytes SecurityCommandTypeContainer = 0xF0 - SecurityCommandTypeContainer_SecurityCommandLongOn_17Bytes SecurityCommandTypeContainer = 0xF1 - SecurityCommandTypeContainer_SecurityCommandLongOn_18Bytes SecurityCommandTypeContainer = 0xF2 - SecurityCommandTypeContainer_SecurityCommandLongOn_19Bytes SecurityCommandTypeContainer = 0xF3 - SecurityCommandTypeContainer_SecurityCommandLongOn_20Bytes SecurityCommandTypeContainer = 0xF4 - SecurityCommandTypeContainer_SecurityCommandLongOn_21Bytes SecurityCommandTypeContainer = 0xF5 - SecurityCommandTypeContainer_SecurityCommandLongOn_22Bytes SecurityCommandTypeContainer = 0xF6 - SecurityCommandTypeContainer_SecurityCommandLongOn_23Bytes SecurityCommandTypeContainer = 0xF7 - SecurityCommandTypeContainer_SecurityCommandLongOn_24Bytes SecurityCommandTypeContainer = 0xF8 - SecurityCommandTypeContainer_SecurityCommandLongOn_25Bytes SecurityCommandTypeContainer = 0xF9 - SecurityCommandTypeContainer_SecurityCommandLongOn_26Bytes SecurityCommandTypeContainer = 0xFA - SecurityCommandTypeContainer_SecurityCommandLongOn_27Bytes SecurityCommandTypeContainer = 0xFB - SecurityCommandTypeContainer_SecurityCommandLongOn_28Bytes SecurityCommandTypeContainer = 0xFC - SecurityCommandTypeContainer_SecurityCommandLongOn_29Bytes SecurityCommandTypeContainer = 0xFD - SecurityCommandTypeContainer_SecurityCommandLongOn_30Bytes SecurityCommandTypeContainer = 0xFE - SecurityCommandTypeContainer_SecurityCommandLongOn_31Bytes SecurityCommandTypeContainer = 0xFF + SecurityCommandTypeContainer_SecurityCommandLongOn_0Bytes SecurityCommandTypeContainer = 0xE0 + SecurityCommandTypeContainer_SecurityCommandLongOn_1Bytes SecurityCommandTypeContainer = 0xE1 + SecurityCommandTypeContainer_SecurityCommandLongOn_2Bytes SecurityCommandTypeContainer = 0xE2 + SecurityCommandTypeContainer_SecurityCommandLongOn_3Bytes SecurityCommandTypeContainer = 0xE3 + SecurityCommandTypeContainer_SecurityCommandLongOn_4Bytes SecurityCommandTypeContainer = 0xE4 + SecurityCommandTypeContainer_SecurityCommandLongOn_5Bytes SecurityCommandTypeContainer = 0xE5 + SecurityCommandTypeContainer_SecurityCommandLongOn_6Bytes SecurityCommandTypeContainer = 0xE6 + SecurityCommandTypeContainer_SecurityCommandLongOn_7Bytes SecurityCommandTypeContainer = 0xE7 + SecurityCommandTypeContainer_SecurityCommandLongOn_8Bytes SecurityCommandTypeContainer = 0xE8 + SecurityCommandTypeContainer_SecurityCommandLongOn_9Bytes SecurityCommandTypeContainer = 0xE9 + SecurityCommandTypeContainer_SecurityCommandLongOn_10Bytes SecurityCommandTypeContainer = 0xEA + SecurityCommandTypeContainer_SecurityCommandLongOn_11Bytes SecurityCommandTypeContainer = 0xEB + SecurityCommandTypeContainer_SecurityCommandLongOn_12Bytes SecurityCommandTypeContainer = 0xEC + SecurityCommandTypeContainer_SecurityCommandLongOn_13Bytes SecurityCommandTypeContainer = 0xED + SecurityCommandTypeContainer_SecurityCommandLongOn_14Bytes SecurityCommandTypeContainer = 0xEE + SecurityCommandTypeContainer_SecurityCommandLongOn_15Bytes SecurityCommandTypeContainer = 0xEF + SecurityCommandTypeContainer_SecurityCommandLongOn_16Bytes SecurityCommandTypeContainer = 0xF0 + SecurityCommandTypeContainer_SecurityCommandLongOn_17Bytes SecurityCommandTypeContainer = 0xF1 + SecurityCommandTypeContainer_SecurityCommandLongOn_18Bytes SecurityCommandTypeContainer = 0xF2 + SecurityCommandTypeContainer_SecurityCommandLongOn_19Bytes SecurityCommandTypeContainer = 0xF3 + SecurityCommandTypeContainer_SecurityCommandLongOn_20Bytes SecurityCommandTypeContainer = 0xF4 + SecurityCommandTypeContainer_SecurityCommandLongOn_21Bytes SecurityCommandTypeContainer = 0xF5 + SecurityCommandTypeContainer_SecurityCommandLongOn_22Bytes SecurityCommandTypeContainer = 0xF6 + SecurityCommandTypeContainer_SecurityCommandLongOn_23Bytes SecurityCommandTypeContainer = 0xF7 + SecurityCommandTypeContainer_SecurityCommandLongOn_24Bytes SecurityCommandTypeContainer = 0xF8 + SecurityCommandTypeContainer_SecurityCommandLongOn_25Bytes SecurityCommandTypeContainer = 0xF9 + SecurityCommandTypeContainer_SecurityCommandLongOn_26Bytes SecurityCommandTypeContainer = 0xFA + SecurityCommandTypeContainer_SecurityCommandLongOn_27Bytes SecurityCommandTypeContainer = 0xFB + SecurityCommandTypeContainer_SecurityCommandLongOn_28Bytes SecurityCommandTypeContainer = 0xFC + SecurityCommandTypeContainer_SecurityCommandLongOn_29Bytes SecurityCommandTypeContainer = 0xFD + SecurityCommandTypeContainer_SecurityCommandLongOn_30Bytes SecurityCommandTypeContainer = 0xFE + SecurityCommandTypeContainer_SecurityCommandLongOn_31Bytes SecurityCommandTypeContainer = 0xFF ) var SecurityCommandTypeContainerValues []SecurityCommandTypeContainer func init() { _ = errors.New - SecurityCommandTypeContainerValues = []SecurityCommandTypeContainer{ + SecurityCommandTypeContainerValues = []SecurityCommandTypeContainer { SecurityCommandTypeContainer_SecurityCommandOff_0Bytes, SecurityCommandTypeContainer_SecurityCommandOff_1Bytes, SecurityCommandTypeContainer_SecurityCommandOff_2Bytes, @@ -287,490 +287,370 @@ func init() { } } + func (e SecurityCommandTypeContainer) NumBytes() uint8 { - switch e { - case 0x00: - { /* '0x00' */ - return 0 + switch e { + case 0x00: { /* '0x00' */ + return 0 } - case 0x01: - { /* '0x01' */ - return 1 + case 0x01: { /* '0x01' */ + return 1 } - case 0x02: - { /* '0x02' */ - return 2 + case 0x02: { /* '0x02' */ + return 2 } - case 0x03: - { /* '0x03' */ - return 3 + case 0x03: { /* '0x03' */ + return 3 } - case 0x04: - { /* '0x04' */ - return 4 + case 0x04: { /* '0x04' */ + return 4 } - case 0x05: - { /* '0x05' */ - return 5 + case 0x05: { /* '0x05' */ + return 5 } - case 0x06: - { /* '0x06' */ - return 6 + case 0x06: { /* '0x06' */ + return 6 } - case 0x07: - { /* '0x07' */ - return 7 + case 0x07: { /* '0x07' */ + return 7 } - case 0x08: - { /* '0x08' */ - return 0 + case 0x08: { /* '0x08' */ + return 0 } - case 0x09: - { /* '0x09' */ - return 1 + case 0x09: { /* '0x09' */ + return 1 } - case 0x0A: - { /* '0x0A' */ - return 2 + case 0x0A: { /* '0x0A' */ + return 2 } - case 0x0B: - { /* '0x0B' */ - return 3 + case 0x0B: { /* '0x0B' */ + return 3 } - case 0x0C: - { /* '0x0C' */ - return 4 + case 0x0C: { /* '0x0C' */ + return 4 } - case 0x0D: - { /* '0x0D' */ - return 5 + case 0x0D: { /* '0x0D' */ + return 5 } - case 0x0E: - { /* '0x0E' */ - return 6 + case 0x0E: { /* '0x0E' */ + return 6 } - case 0x0F: - { /* '0x0F' */ - return 7 + case 0x0F: { /* '0x0F' */ + return 7 } - case 0x78: - { /* '0x78' */ - return 0 + case 0x78: { /* '0x78' */ + return 0 } - case 0x79: - { /* '0x79' */ - return 1 + case 0x79: { /* '0x79' */ + return 1 } - case 0x7A: - { /* '0x7A' */ - return 2 + case 0x7A: { /* '0x7A' */ + return 2 } - case 0x7B: - { /* '0x7B' */ - return 3 + case 0x7B: { /* '0x7B' */ + return 3 } - case 0x7C: - { /* '0x7C' */ - return 4 + case 0x7C: { /* '0x7C' */ + return 4 } - case 0x7D: - { /* '0x7D' */ - return 5 + case 0x7D: { /* '0x7D' */ + return 5 } - case 0x7E: - { /* '0x7E' */ - return 6 + case 0x7E: { /* '0x7E' */ + return 6 } - case 0x7F: - { /* '0x7F' */ - return 7 + case 0x7F: { /* '0x7F' */ + return 7 } - case 0x80: - { /* '0x80' */ - return 8 + case 0x80: { /* '0x80' */ + return 8 } - case 0x81: - { /* '0x81' */ - return 1 + case 0x81: { /* '0x81' */ + return 1 } - case 0x82: - { /* '0x82' */ - return 2 + case 0x82: { /* '0x82' */ + return 2 } - case 0x83: - { /* '0x83' */ - return 3 + case 0x83: { /* '0x83' */ + return 3 } - case 0x84: - { /* '0x84' */ - return 4 + case 0x84: { /* '0x84' */ + return 4 } - case 0x85: - { /* '0x85' */ - return 5 + case 0x85: { /* '0x85' */ + return 5 } - case 0x86: - { /* '0x86' */ - return 6 + case 0x86: { /* '0x86' */ + return 6 } - case 0x87: - { /* '0x87' */ - return 7 + case 0x87: { /* '0x87' */ + return 7 } - case 0x88: - { /* '0x88' */ - return 8 + case 0x88: { /* '0x88' */ + return 8 } - case 0x89: - { /* '0x89' */ - return 9 + case 0x89: { /* '0x89' */ + return 9 } - case 0x8A: - { /* '0x8A' */ - return 10 + case 0x8A: { /* '0x8A' */ + return 10 } - case 0x8B: - { /* '0x8B' */ - return 11 + case 0x8B: { /* '0x8B' */ + return 11 } - case 0x8C: - { /* '0x8C' */ - return 12 + case 0x8C: { /* '0x8C' */ + return 12 } - case 0x8D: - { /* '0x8D' */ - return 13 + case 0x8D: { /* '0x8D' */ + return 13 } - case 0x8E: - { /* '0x8E' */ - return 14 + case 0x8E: { /* '0x8E' */ + return 14 } - case 0x8F: - { /* '0x8F' */ - return 15 + case 0x8F: { /* '0x8F' */ + return 15 } - case 0x90: - { /* '0x90' */ - return 16 + case 0x90: { /* '0x90' */ + return 16 } - case 0x91: - { /* '0x91' */ - return 17 + case 0x91: { /* '0x91' */ + return 17 } - case 0x92: - { /* '0x92' */ - return 18 + case 0x92: { /* '0x92' */ + return 18 } - case 0x93: - { /* '0x93' */ - return 19 + case 0x93: { /* '0x93' */ + return 19 } - case 0x94: - { /* '0x94' */ - return 20 + case 0x94: { /* '0x94' */ + return 20 } - case 0x95: - { /* '0x95' */ - return 21 + case 0x95: { /* '0x95' */ + return 21 } - case 0x96: - { /* '0x96' */ - return 22 + case 0x96: { /* '0x96' */ + return 22 } - case 0x97: - { /* '0x97' */ - return 23 + case 0x97: { /* '0x97' */ + return 23 } - case 0x98: - { /* '0x98' */ - return 24 + case 0x98: { /* '0x98' */ + return 24 } - case 0x99: - { /* '0x99' */ - return 25 + case 0x99: { /* '0x99' */ + return 25 } - case 0x9A: - { /* '0x9A' */ - return 26 + case 0x9A: { /* '0x9A' */ + return 26 } - case 0x9B: - { /* '0x9B' */ - return 27 + case 0x9B: { /* '0x9B' */ + return 27 } - case 0x9C: - { /* '0x9C' */ - return 28 + case 0x9C: { /* '0x9C' */ + return 28 } - case 0x9D: - { /* '0x9D' */ - return 29 + case 0x9D: { /* '0x9D' */ + return 29 } - case 0x9E: - { /* '0x9E' */ - return 30 + case 0x9E: { /* '0x9E' */ + return 30 } - case 0x9F: - { /* '0x9F' */ - return 31 + case 0x9F: { /* '0x9F' */ + return 31 } - case 0xA0: - { /* '0xA0' */ - return 0 + case 0xA0: { /* '0xA0' */ + return 0 } - case 0xA1: - { /* '0xA1' */ - return 1 + case 0xA1: { /* '0xA1' */ + return 1 } - case 0xA2: - { /* '0xA2' */ - return 2 + case 0xA2: { /* '0xA2' */ + return 2 } - case 0xA3: - { /* '0xA3' */ - return 3 + case 0xA3: { /* '0xA3' */ + return 3 } - case 0xA4: - { /* '0xA4' */ - return 4 + case 0xA4: { /* '0xA4' */ + return 4 } - case 0xA5: - { /* '0xA5' */ - return 5 + case 0xA5: { /* '0xA5' */ + return 5 } - case 0xA6: - { /* '0xA6' */ - return 6 + case 0xA6: { /* '0xA6' */ + return 6 } - case 0xA7: - { /* '0xA7' */ - return 7 + case 0xA7: { /* '0xA7' */ + return 7 } - case 0xA8: - { /* '0xA8' */ - return 8 + case 0xA8: { /* '0xA8' */ + return 8 } - case 0xA9: - { /* '0xA9' */ - return 9 + case 0xA9: { /* '0xA9' */ + return 9 } - case 0xAA: - { /* '0xAA' */ - return 10 + case 0xAA: { /* '0xAA' */ + return 10 } - case 0xAB: - { /* '0xAB' */ - return 11 + case 0xAB: { /* '0xAB' */ + return 11 } - case 0xAC: - { /* '0xAC' */ - return 12 + case 0xAC: { /* '0xAC' */ + return 12 } - case 0xAD: - { /* '0xAD' */ - return 13 + case 0xAD: { /* '0xAD' */ + return 13 } - case 0xAE: - { /* '0xAE' */ - return 14 + case 0xAE: { /* '0xAE' */ + return 14 } - case 0xAF: - { /* '0xAF' */ - return 15 + case 0xAF: { /* '0xAF' */ + return 15 } - case 0xB0: - { /* '0xB0' */ - return 16 + case 0xB0: { /* '0xB0' */ + return 16 } - case 0xB1: - { /* '0xB1' */ - return 17 + case 0xB1: { /* '0xB1' */ + return 17 } - case 0xB2: - { /* '0xB2' */ - return 18 + case 0xB2: { /* '0xB2' */ + return 18 } - case 0xB3: - { /* '0xB3' */ - return 19 + case 0xB3: { /* '0xB3' */ + return 19 } - case 0xB4: - { /* '0xB4' */ - return 20 + case 0xB4: { /* '0xB4' */ + return 20 } - case 0xB5: - { /* '0xB5' */ - return 21 + case 0xB5: { /* '0xB5' */ + return 21 } - case 0xB6: - { /* '0xB6' */ - return 22 + case 0xB6: { /* '0xB6' */ + return 22 } - case 0xB7: - { /* '0xB7' */ - return 23 + case 0xB7: { /* '0xB7' */ + return 23 } - case 0xB8: - { /* '0xB8' */ - return 24 + case 0xB8: { /* '0xB8' */ + return 24 } - case 0xB9: - { /* '0xB9' */ - return 25 + case 0xB9: { /* '0xB9' */ + return 25 } - case 0xBA: - { /* '0xBA' */ - return 26 + case 0xBA: { /* '0xBA' */ + return 26 } - case 0xBB: - { /* '0xBB' */ - return 27 + case 0xBB: { /* '0xBB' */ + return 27 } - case 0xBC: - { /* '0xBC' */ - return 28 + case 0xBC: { /* '0xBC' */ + return 28 } - case 0xBD: - { /* '0xBD' */ - return 29 + case 0xBD: { /* '0xBD' */ + return 29 } - case 0xBE: - { /* '0xBE' */ - return 30 + case 0xBE: { /* '0xBE' */ + return 30 } - case 0xBF: - { /* '0xBF' */ - return 31 + case 0xBF: { /* '0xBF' */ + return 31 } - case 0xE0: - { /* '0xE0' */ - return 0 + case 0xE0: { /* '0xE0' */ + return 0 } - case 0xE1: - { /* '0xE1' */ - return 1 + case 0xE1: { /* '0xE1' */ + return 1 } - case 0xE2: - { /* '0xE2' */ - return 2 + case 0xE2: { /* '0xE2' */ + return 2 } - case 0xE3: - { /* '0xE3' */ - return 3 + case 0xE3: { /* '0xE3' */ + return 3 } - case 0xE4: - { /* '0xE4' */ - return 4 + case 0xE4: { /* '0xE4' */ + return 4 } - case 0xE5: - { /* '0xE5' */ - return 5 + case 0xE5: { /* '0xE5' */ + return 5 } - case 0xE6: - { /* '0xE6' */ - return 6 + case 0xE6: { /* '0xE6' */ + return 6 } - case 0xE7: - { /* '0xE7' */ - return 7 + case 0xE7: { /* '0xE7' */ + return 7 } - case 0xE8: - { /* '0xE8' */ - return 8 + case 0xE8: { /* '0xE8' */ + return 8 } - case 0xE9: - { /* '0xE9' */ - return 9 + case 0xE9: { /* '0xE9' */ + return 9 } - case 0xEA: - { /* '0xEA' */ - return 10 + case 0xEA: { /* '0xEA' */ + return 10 } - case 0xEB: - { /* '0xEB' */ - return 11 + case 0xEB: { /* '0xEB' */ + return 11 } - case 0xEC: - { /* '0xEC' */ - return 12 + case 0xEC: { /* '0xEC' */ + return 12 } - case 0xED: - { /* '0xED' */ - return 13 + case 0xED: { /* '0xED' */ + return 13 } - case 0xEE: - { /* '0xEE' */ - return 14 + case 0xEE: { /* '0xEE' */ + return 14 } - case 0xEF: - { /* '0xEF' */ - return 15 + case 0xEF: { /* '0xEF' */ + return 15 } - case 0xF0: - { /* '0xF0' */ - return 16 + case 0xF0: { /* '0xF0' */ + return 16 } - case 0xF1: - { /* '0xF1' */ - return 17 + case 0xF1: { /* '0xF1' */ + return 17 } - case 0xF2: - { /* '0xF2' */ - return 18 + case 0xF2: { /* '0xF2' */ + return 18 } - case 0xF3: - { /* '0xF3' */ - return 19 + case 0xF3: { /* '0xF3' */ + return 19 } - case 0xF4: - { /* '0xF4' */ - return 20 + case 0xF4: { /* '0xF4' */ + return 20 } - case 0xF5: - { /* '0xF5' */ - return 21 + case 0xF5: { /* '0xF5' */ + return 21 } - case 0xF6: - { /* '0xF6' */ - return 22 + case 0xF6: { /* '0xF6' */ + return 22 } - case 0xF7: - { /* '0xF7' */ - return 23 + case 0xF7: { /* '0xF7' */ + return 23 } - case 0xF8: - { /* '0xF8' */ - return 24 + case 0xF8: { /* '0xF8' */ + return 24 } - case 0xF9: - { /* '0xF9' */ - return 25 + case 0xF9: { /* '0xF9' */ + return 25 } - case 0xFA: - { /* '0xFA' */ - return 26 + case 0xFA: { /* '0xFA' */ + return 26 } - case 0xFB: - { /* '0xFB' */ - return 27 + case 0xFB: { /* '0xFB' */ + return 27 } - case 0xFC: - { /* '0xFC' */ - return 28 + case 0xFC: { /* '0xFC' */ + return 28 } - case 0xFD: - { /* '0xFD' */ - return 29 + case 0xFD: { /* '0xFD' */ + return 29 } - case 0xFE: - { /* '0xFE' */ - return 30 + case 0xFE: { /* '0xFE' */ + return 30 } - case 0xFF: - { /* '0xFF' */ - return 31 + case 0xFF: { /* '0xFF' */ + return 31 } - default: - { + default: { return 0 } } @@ -786,489 +666,368 @@ func SecurityCommandTypeContainerFirstEnumForFieldNumBytes(value uint8) (Securit } func (e SecurityCommandTypeContainer) CommandType() SecurityCommandType { - switch e { - case 0x00: - { /* '0x00' */ + switch e { + case 0x00: { /* '0x00' */ return SecurityCommandType_OFF } - case 0x01: - { /* '0x01' */ + case 0x01: { /* '0x01' */ return SecurityCommandType_OFF } - case 0x02: - { /* '0x02' */ + case 0x02: { /* '0x02' */ return SecurityCommandType_OFF } - case 0x03: - { /* '0x03' */ + case 0x03: { /* '0x03' */ return SecurityCommandType_OFF } - case 0x04: - { /* '0x04' */ + case 0x04: { /* '0x04' */ return SecurityCommandType_OFF } - case 0x05: - { /* '0x05' */ + case 0x05: { /* '0x05' */ return SecurityCommandType_OFF } - case 0x06: - { /* '0x06' */ + case 0x06: { /* '0x06' */ return SecurityCommandType_OFF } - case 0x07: - { /* '0x07' */ + case 0x07: { /* '0x07' */ return SecurityCommandType_OFF } - case 0x08: - { /* '0x08' */ + case 0x08: { /* '0x08' */ return SecurityCommandType_EVENT } - case 0x09: - { /* '0x09' */ + case 0x09: { /* '0x09' */ return SecurityCommandType_EVENT } - case 0x0A: - { /* '0x0A' */ + case 0x0A: { /* '0x0A' */ return SecurityCommandType_EVENT } - case 0x0B: - { /* '0x0B' */ + case 0x0B: { /* '0x0B' */ return SecurityCommandType_EVENT } - case 0x0C: - { /* '0x0C' */ + case 0x0C: { /* '0x0C' */ return SecurityCommandType_EVENT } - case 0x0D: - { /* '0x0D' */ + case 0x0D: { /* '0x0D' */ return SecurityCommandType_EVENT } - case 0x0E: - { /* '0x0E' */ + case 0x0E: { /* '0x0E' */ return SecurityCommandType_EVENT } - case 0x0F: - { /* '0x0F' */ + case 0x0F: { /* '0x0F' */ return SecurityCommandType_EVENT } - case 0x78: - { /* '0x78' */ + case 0x78: { /* '0x78' */ return SecurityCommandType_ON } - case 0x79: - { /* '0x79' */ + case 0x79: { /* '0x79' */ return SecurityCommandType_ON } - case 0x7A: - { /* '0x7A' */ + case 0x7A: { /* '0x7A' */ return SecurityCommandType_ON } - case 0x7B: - { /* '0x7B' */ + case 0x7B: { /* '0x7B' */ return SecurityCommandType_ON } - case 0x7C: - { /* '0x7C' */ + case 0x7C: { /* '0x7C' */ return SecurityCommandType_ON } - case 0x7D: - { /* '0x7D' */ + case 0x7D: { /* '0x7D' */ return SecurityCommandType_ON } - case 0x7E: - { /* '0x7E' */ + case 0x7E: { /* '0x7E' */ return SecurityCommandType_ON } - case 0x7F: - { /* '0x7F' */ + case 0x7F: { /* '0x7F' */ return SecurityCommandType_ON } - case 0x80: - { /* '0x80' */ + case 0x80: { /* '0x80' */ return SecurityCommandType_OFF } - case 0x81: - { /* '0x81' */ + case 0x81: { /* '0x81' */ return SecurityCommandType_OFF } - case 0x82: - { /* '0x82' */ + case 0x82: { /* '0x82' */ return SecurityCommandType_OFF } - case 0x83: - { /* '0x83' */ + case 0x83: { /* '0x83' */ return SecurityCommandType_OFF } - case 0x84: - { /* '0x84' */ + case 0x84: { /* '0x84' */ return SecurityCommandType_OFF } - case 0x85: - { /* '0x85' */ + case 0x85: { /* '0x85' */ return SecurityCommandType_OFF } - case 0x86: - { /* '0x86' */ + case 0x86: { /* '0x86' */ return SecurityCommandType_OFF } - case 0x87: - { /* '0x87' */ + case 0x87: { /* '0x87' */ return SecurityCommandType_OFF } - case 0x88: - { /* '0x88' */ + case 0x88: { /* '0x88' */ return SecurityCommandType_OFF } - case 0x89: - { /* '0x89' */ + case 0x89: { /* '0x89' */ return SecurityCommandType_OFF } - case 0x8A: - { /* '0x8A' */ + case 0x8A: { /* '0x8A' */ return SecurityCommandType_OFF } - case 0x8B: - { /* '0x8B' */ + case 0x8B: { /* '0x8B' */ return SecurityCommandType_OFF } - case 0x8C: - { /* '0x8C' */ + case 0x8C: { /* '0x8C' */ return SecurityCommandType_OFF } - case 0x8D: - { /* '0x8D' */ + case 0x8D: { /* '0x8D' */ return SecurityCommandType_OFF } - case 0x8E: - { /* '0x8E' */ + case 0x8E: { /* '0x8E' */ return SecurityCommandType_OFF } - case 0x8F: - { /* '0x8F' */ + case 0x8F: { /* '0x8F' */ return SecurityCommandType_OFF } - case 0x90: - { /* '0x90' */ + case 0x90: { /* '0x90' */ return SecurityCommandType_OFF } - case 0x91: - { /* '0x91' */ + case 0x91: { /* '0x91' */ return SecurityCommandType_OFF } - case 0x92: - { /* '0x92' */ + case 0x92: { /* '0x92' */ return SecurityCommandType_OFF } - case 0x93: - { /* '0x93' */ + case 0x93: { /* '0x93' */ return SecurityCommandType_OFF } - case 0x94: - { /* '0x94' */ + case 0x94: { /* '0x94' */ return SecurityCommandType_OFF } - case 0x95: - { /* '0x95' */ + case 0x95: { /* '0x95' */ return SecurityCommandType_OFF } - case 0x96: - { /* '0x96' */ + case 0x96: { /* '0x96' */ return SecurityCommandType_OFF } - case 0x97: - { /* '0x97' */ + case 0x97: { /* '0x97' */ return SecurityCommandType_OFF } - case 0x98: - { /* '0x98' */ + case 0x98: { /* '0x98' */ return SecurityCommandType_OFF } - case 0x99: - { /* '0x99' */ + case 0x99: { /* '0x99' */ return SecurityCommandType_OFF } - case 0x9A: - { /* '0x9A' */ + case 0x9A: { /* '0x9A' */ return SecurityCommandType_OFF } - case 0x9B: - { /* '0x9B' */ + case 0x9B: { /* '0x9B' */ return SecurityCommandType_OFF } - case 0x9C: - { /* '0x9C' */ + case 0x9C: { /* '0x9C' */ return SecurityCommandType_OFF } - case 0x9D: - { /* '0x9D' */ + case 0x9D: { /* '0x9D' */ return SecurityCommandType_OFF } - case 0x9E: - { /* '0x9E' */ + case 0x9E: { /* '0x9E' */ return SecurityCommandType_OFF } - case 0x9F: - { /* '0x9F' */ + case 0x9F: { /* '0x9F' */ return SecurityCommandType_OFF } - case 0xA0: - { /* '0xA0' */ + case 0xA0: { /* '0xA0' */ return SecurityCommandType_EVENT } - case 0xA1: - { /* '0xA1' */ + case 0xA1: { /* '0xA1' */ return SecurityCommandType_EVENT } - case 0xA2: - { /* '0xA2' */ + case 0xA2: { /* '0xA2' */ return SecurityCommandType_EVENT } - case 0xA3: - { /* '0xA3' */ + case 0xA3: { /* '0xA3' */ return SecurityCommandType_EVENT } - case 0xA4: - { /* '0xA4' */ + case 0xA4: { /* '0xA4' */ return SecurityCommandType_EVENT } - case 0xA5: - { /* '0xA5' */ + case 0xA5: { /* '0xA5' */ return SecurityCommandType_EVENT } - case 0xA6: - { /* '0xA6' */ + case 0xA6: { /* '0xA6' */ return SecurityCommandType_EVENT } - case 0xA7: - { /* '0xA7' */ + case 0xA7: { /* '0xA7' */ return SecurityCommandType_EVENT } - case 0xA8: - { /* '0xA8' */ + case 0xA8: { /* '0xA8' */ return SecurityCommandType_EVENT } - case 0xA9: - { /* '0xA9' */ + case 0xA9: { /* '0xA9' */ return SecurityCommandType_EVENT } - case 0xAA: - { /* '0xAA' */ + case 0xAA: { /* '0xAA' */ return SecurityCommandType_EVENT } - case 0xAB: - { /* '0xAB' */ + case 0xAB: { /* '0xAB' */ return SecurityCommandType_EVENT } - case 0xAC: - { /* '0xAC' */ + case 0xAC: { /* '0xAC' */ return SecurityCommandType_EVENT } - case 0xAD: - { /* '0xAD' */ + case 0xAD: { /* '0xAD' */ return SecurityCommandType_EVENT } - case 0xAE: - { /* '0xAE' */ + case 0xAE: { /* '0xAE' */ return SecurityCommandType_EVENT } - case 0xAF: - { /* '0xAF' */ + case 0xAF: { /* '0xAF' */ return SecurityCommandType_EVENT } - case 0xB0: - { /* '0xB0' */ + case 0xB0: { /* '0xB0' */ return SecurityCommandType_EVENT } - case 0xB1: - { /* '0xB1' */ + case 0xB1: { /* '0xB1' */ return SecurityCommandType_EVENT } - case 0xB2: - { /* '0xB2' */ + case 0xB2: { /* '0xB2' */ return SecurityCommandType_EVENT } - case 0xB3: - { /* '0xB3' */ + case 0xB3: { /* '0xB3' */ return SecurityCommandType_EVENT } - case 0xB4: - { /* '0xB4' */ + case 0xB4: { /* '0xB4' */ return SecurityCommandType_EVENT } - case 0xB5: - { /* '0xB5' */ + case 0xB5: { /* '0xB5' */ return SecurityCommandType_EVENT } - case 0xB6: - { /* '0xB6' */ + case 0xB6: { /* '0xB6' */ return SecurityCommandType_EVENT } - case 0xB7: - { /* '0xB7' */ + case 0xB7: { /* '0xB7' */ return SecurityCommandType_EVENT } - case 0xB8: - { /* '0xB8' */ + case 0xB8: { /* '0xB8' */ return SecurityCommandType_EVENT } - case 0xB9: - { /* '0xB9' */ + case 0xB9: { /* '0xB9' */ return SecurityCommandType_EVENT } - case 0xBA: - { /* '0xBA' */ + case 0xBA: { /* '0xBA' */ return SecurityCommandType_EVENT } - case 0xBB: - { /* '0xBB' */ + case 0xBB: { /* '0xBB' */ return SecurityCommandType_EVENT } - case 0xBC: - { /* '0xBC' */ + case 0xBC: { /* '0xBC' */ return SecurityCommandType_EVENT } - case 0xBD: - { /* '0xBD' */ + case 0xBD: { /* '0xBD' */ return SecurityCommandType_EVENT } - case 0xBE: - { /* '0xBE' */ + case 0xBE: { /* '0xBE' */ return SecurityCommandType_EVENT } - case 0xBF: - { /* '0xBF' */ + case 0xBF: { /* '0xBF' */ return SecurityCommandType_EVENT } - case 0xE0: - { /* '0xE0' */ + case 0xE0: { /* '0xE0' */ return SecurityCommandType_ON } - case 0xE1: - { /* '0xE1' */ + case 0xE1: { /* '0xE1' */ return SecurityCommandType_ON } - case 0xE2: - { /* '0xE2' */ + case 0xE2: { /* '0xE2' */ return SecurityCommandType_ON } - case 0xE3: - { /* '0xE3' */ + case 0xE3: { /* '0xE3' */ return SecurityCommandType_ON } - case 0xE4: - { /* '0xE4' */ + case 0xE4: { /* '0xE4' */ return SecurityCommandType_ON } - case 0xE5: - { /* '0xE5' */ + case 0xE5: { /* '0xE5' */ return SecurityCommandType_ON } - case 0xE6: - { /* '0xE6' */ + case 0xE6: { /* '0xE6' */ return SecurityCommandType_ON } - case 0xE7: - { /* '0xE7' */ + case 0xE7: { /* '0xE7' */ return SecurityCommandType_ON } - case 0xE8: - { /* '0xE8' */ + case 0xE8: { /* '0xE8' */ return SecurityCommandType_ON } - case 0xE9: - { /* '0xE9' */ + case 0xE9: { /* '0xE9' */ return SecurityCommandType_ON } - case 0xEA: - { /* '0xEA' */ + case 0xEA: { /* '0xEA' */ return SecurityCommandType_ON } - case 0xEB: - { /* '0xEB' */ + case 0xEB: { /* '0xEB' */ return SecurityCommandType_ON } - case 0xEC: - { /* '0xEC' */ + case 0xEC: { /* '0xEC' */ return SecurityCommandType_ON } - case 0xED: - { /* '0xED' */ + case 0xED: { /* '0xED' */ return SecurityCommandType_ON } - case 0xEE: - { /* '0xEE' */ + case 0xEE: { /* '0xEE' */ return SecurityCommandType_ON } - case 0xEF: - { /* '0xEF' */ + case 0xEF: { /* '0xEF' */ return SecurityCommandType_ON } - case 0xF0: - { /* '0xF0' */ + case 0xF0: { /* '0xF0' */ return SecurityCommandType_ON } - case 0xF1: - { /* '0xF1' */ + case 0xF1: { /* '0xF1' */ return SecurityCommandType_ON } - case 0xF2: - { /* '0xF2' */ + case 0xF2: { /* '0xF2' */ return SecurityCommandType_ON } - case 0xF3: - { /* '0xF3' */ + case 0xF3: { /* '0xF3' */ return SecurityCommandType_ON } - case 0xF4: - { /* '0xF4' */ + case 0xF4: { /* '0xF4' */ return SecurityCommandType_ON } - case 0xF5: - { /* '0xF5' */ + case 0xF5: { /* '0xF5' */ return SecurityCommandType_ON } - case 0xF6: - { /* '0xF6' */ + case 0xF6: { /* '0xF6' */ return SecurityCommandType_ON } - case 0xF7: - { /* '0xF7' */ + case 0xF7: { /* '0xF7' */ return SecurityCommandType_ON } - case 0xF8: - { /* '0xF8' */ + case 0xF8: { /* '0xF8' */ return SecurityCommandType_ON } - case 0xF9: - { /* '0xF9' */ + case 0xF9: { /* '0xF9' */ return SecurityCommandType_ON } - case 0xFA: - { /* '0xFA' */ + case 0xFA: { /* '0xFA' */ return SecurityCommandType_ON } - case 0xFB: - { /* '0xFB' */ + case 0xFB: { /* '0xFB' */ return SecurityCommandType_ON } - case 0xFC: - { /* '0xFC' */ + case 0xFC: { /* '0xFC' */ return SecurityCommandType_ON } - case 0xFD: - { /* '0xFD' */ + case 0xFD: { /* '0xFD' */ return SecurityCommandType_ON } - case 0xFE: - { /* '0xFE' */ + case 0xFE: { /* '0xFE' */ return SecurityCommandType_ON } - case 0xFF: - { /* '0xFF' */ + case 0xFF: { /* '0xFF' */ return SecurityCommandType_ON } - default: - { + default: { return 0 } } @@ -1284,246 +1043,246 @@ func SecurityCommandTypeContainerFirstEnumForFieldCommandType(value SecurityComm } func SecurityCommandTypeContainerByValue(value uint8) (enum SecurityCommandTypeContainer, ok bool) { switch value { - case 0x00: - return SecurityCommandTypeContainer_SecurityCommandOff_0Bytes, true - case 0x01: - return SecurityCommandTypeContainer_SecurityCommandOff_1Bytes, true - case 0x02: - return SecurityCommandTypeContainer_SecurityCommandOff_2Bytes, true - case 0x03: - return SecurityCommandTypeContainer_SecurityCommandOff_3Bytes, true - case 0x04: - return SecurityCommandTypeContainer_SecurityCommandOff_4Bytes, true - case 0x05: - return SecurityCommandTypeContainer_SecurityCommandOff_5Bytes, true - case 0x06: - return SecurityCommandTypeContainer_SecurityCommandOff_6Bytes, true - case 0x07: - return SecurityCommandTypeContainer_SecurityCommandOff_7Bytes, true - case 0x08: - return SecurityCommandTypeContainer_SecurityCommandEvent_0Bytes, true - case 0x09: - return SecurityCommandTypeContainer_SecurityCommandEvent_1Bytes, true - case 0x0A: - return SecurityCommandTypeContainer_SecurityCommandEvent_2Bytes, true - case 0x0B: - return SecurityCommandTypeContainer_SecurityCommandEvent_3Bytes, true - case 0x0C: - return SecurityCommandTypeContainer_SecurityCommandEvent_4Bytes, true - case 0x0D: - return SecurityCommandTypeContainer_SecurityCommandEvent_5Bytes, true - case 0x0E: - return SecurityCommandTypeContainer_SecurityCommandEvent_6Bytes, true - case 0x0F: - return SecurityCommandTypeContainer_SecurityCommandEvent_7Bytes, true - case 0x78: - return SecurityCommandTypeContainer_SecurityCommandOn_0Bytes, true - case 0x79: - return SecurityCommandTypeContainer_SecurityCommandOn_1Bytes, true - case 0x7A: - return SecurityCommandTypeContainer_SecurityCommandOn_2Bytes, true - case 0x7B: - return SecurityCommandTypeContainer_SecurityCommandOn_3Bytes, true - case 0x7C: - return SecurityCommandTypeContainer_SecurityCommandOn_4Bytes, true - case 0x7D: - return SecurityCommandTypeContainer_SecurityCommandOn_5Bytes, true - case 0x7E: - return SecurityCommandTypeContainer_SecurityCommandOn_6Bytes, true - case 0x7F: - return SecurityCommandTypeContainer_SecurityCommandOn_7Bytes, true - case 0x80: - return SecurityCommandTypeContainer_SecurityCommandLongOff_0Bytes, true - case 0x81: - return SecurityCommandTypeContainer_SecurityCommandLongOff_1Bytes, true - case 0x82: - return SecurityCommandTypeContainer_SecurityCommandLongOff_2Bytes, true - case 0x83: - return SecurityCommandTypeContainer_SecurityCommandLongOff_3Bytes, true - case 0x84: - return SecurityCommandTypeContainer_SecurityCommandLongOff_4Bytes, true - case 0x85: - return SecurityCommandTypeContainer_SecurityCommandLongOff_5Bytes, true - case 0x86: - return SecurityCommandTypeContainer_SecurityCommandLongOff_6Bytes, true - case 0x87: - return SecurityCommandTypeContainer_SecurityCommandLongOff_7Bytes, true - case 0x88: - return SecurityCommandTypeContainer_SecurityCommandLongOff_8Bytes, true - case 0x89: - return SecurityCommandTypeContainer_SecurityCommandLongOff_9Bytes, true - case 0x8A: - return SecurityCommandTypeContainer_SecurityCommandLongOff_10Bytes, true - case 0x8B: - return SecurityCommandTypeContainer_SecurityCommandLongOff_11Bytes, true - case 0x8C: - return SecurityCommandTypeContainer_SecurityCommandLongOff_12Bytes, true - case 0x8D: - return SecurityCommandTypeContainer_SecurityCommandLongOff_13Bytes, true - case 0x8E: - return SecurityCommandTypeContainer_SecurityCommandLongOff_14Bytes, true - case 0x8F: - return SecurityCommandTypeContainer_SecurityCommandLongOff_15Bytes, true - case 0x90: - return SecurityCommandTypeContainer_SecurityCommandLongOff_16Bytes, true - case 0x91: - return SecurityCommandTypeContainer_SecurityCommandLongOff_17Bytes, true - case 0x92: - return SecurityCommandTypeContainer_SecurityCommandLongOff_18Bytes, true - case 0x93: - return SecurityCommandTypeContainer_SecurityCommandLongOff_19Bytes, true - case 0x94: - return SecurityCommandTypeContainer_SecurityCommandLongOff_20Bytes, true - case 0x95: - return SecurityCommandTypeContainer_SecurityCommandLongOff_21Bytes, true - case 0x96: - return SecurityCommandTypeContainer_SecurityCommandLongOff_22Bytes, true - case 0x97: - return SecurityCommandTypeContainer_SecurityCommandLongOff_23Bytes, true - case 0x98: - return SecurityCommandTypeContainer_SecurityCommandLongOff_24Bytes, true - case 0x99: - return SecurityCommandTypeContainer_SecurityCommandLongOff_25Bytes, true - case 0x9A: - return SecurityCommandTypeContainer_SecurityCommandLongOff_26Bytes, true - case 0x9B: - return SecurityCommandTypeContainer_SecurityCommandLongOff_27Bytes, true - case 0x9C: - return SecurityCommandTypeContainer_SecurityCommandLongOff_28Bytes, true - case 0x9D: - return SecurityCommandTypeContainer_SecurityCommandLongOff_29Bytes, true - case 0x9E: - return SecurityCommandTypeContainer_SecurityCommandLongOff_30Bytes, true - case 0x9F: - return SecurityCommandTypeContainer_SecurityCommandLongOff_31Bytes, true - case 0xA0: - return SecurityCommandTypeContainer_SecurityCommandLongEvent_0Bytes, true - case 0xA1: - return SecurityCommandTypeContainer_SecurityCommandLongEvent_1Bytes, true - case 0xA2: - return SecurityCommandTypeContainer_SecurityCommandLongEvent_2Bytes, true - case 0xA3: - return SecurityCommandTypeContainer_SecurityCommandLongEvent_3Bytes, true - case 0xA4: - return SecurityCommandTypeContainer_SecurityCommandLongEvent_4Bytes, true - case 0xA5: - return SecurityCommandTypeContainer_SecurityCommandLongEvent_5Bytes, true - case 0xA6: - return SecurityCommandTypeContainer_SecurityCommandLongEvent_6Bytes, true - case 0xA7: - return SecurityCommandTypeContainer_SecurityCommandLongEvent_7Bytes, true - case 0xA8: - return SecurityCommandTypeContainer_SecurityCommandLongEvent_8Bytes, true - case 0xA9: - return SecurityCommandTypeContainer_SecurityCommandLongEvent_9Bytes, true - case 0xAA: - return SecurityCommandTypeContainer_SecurityCommandLongEvent_10Bytes, true - case 0xAB: - return SecurityCommandTypeContainer_SecurityCommandLongEvent_11Bytes, true - case 0xAC: - return SecurityCommandTypeContainer_SecurityCommandLongEvent_12Bytes, true - case 0xAD: - return SecurityCommandTypeContainer_SecurityCommandLongEvent_13Bytes, true - case 0xAE: - return SecurityCommandTypeContainer_SecurityCommandLongEvent_14Bytes, true - case 0xAF: - return SecurityCommandTypeContainer_SecurityCommandLongEvent_15Bytes, true - case 0xB0: - return SecurityCommandTypeContainer_SecurityCommandLongEvent_16Bytes, true - case 0xB1: - return SecurityCommandTypeContainer_SecurityCommandLongEvent_17Bytes, true - case 0xB2: - return SecurityCommandTypeContainer_SecurityCommandLongEvent_18Bytes, true - case 0xB3: - return SecurityCommandTypeContainer_SecurityCommandLongEvent_19Bytes, true - case 0xB4: - return SecurityCommandTypeContainer_SecurityCommandLongEvent_20Bytes, true - case 0xB5: - return SecurityCommandTypeContainer_SecurityCommandLongEvent_21Bytes, true - case 0xB6: - return SecurityCommandTypeContainer_SecurityCommandLongEvent_22Bytes, true - case 0xB7: - return SecurityCommandTypeContainer_SecurityCommandLongEvent_23Bytes, true - case 0xB8: - return SecurityCommandTypeContainer_SecurityCommandLongEvent_24Bytes, true - case 0xB9: - return SecurityCommandTypeContainer_SecurityCommandLongEvent_25Bytes, true - case 0xBA: - return SecurityCommandTypeContainer_SecurityCommandLongEvent_26Bytes, true - case 0xBB: - return SecurityCommandTypeContainer_SecurityCommandLongEvent_27Bytes, true - case 0xBC: - return SecurityCommandTypeContainer_SecurityCommandLongEvent_28Bytes, true - case 0xBD: - return SecurityCommandTypeContainer_SecurityCommandLongEvent_29Bytes, true - case 0xBE: - return SecurityCommandTypeContainer_SecurityCommandLongEvent_30Bytes, true - case 0xBF: - return SecurityCommandTypeContainer_SecurityCommandLongEvent_31Bytes, true - case 0xE0: - return SecurityCommandTypeContainer_SecurityCommandLongOn_0Bytes, true - case 0xE1: - return SecurityCommandTypeContainer_SecurityCommandLongOn_1Bytes, true - case 0xE2: - return SecurityCommandTypeContainer_SecurityCommandLongOn_2Bytes, true - case 0xE3: - return SecurityCommandTypeContainer_SecurityCommandLongOn_3Bytes, true - case 0xE4: - return SecurityCommandTypeContainer_SecurityCommandLongOn_4Bytes, true - case 0xE5: - return SecurityCommandTypeContainer_SecurityCommandLongOn_5Bytes, true - case 0xE6: - return SecurityCommandTypeContainer_SecurityCommandLongOn_6Bytes, true - case 0xE7: - return SecurityCommandTypeContainer_SecurityCommandLongOn_7Bytes, true - case 0xE8: - return SecurityCommandTypeContainer_SecurityCommandLongOn_8Bytes, true - case 0xE9: - return SecurityCommandTypeContainer_SecurityCommandLongOn_9Bytes, true - case 0xEA: - return SecurityCommandTypeContainer_SecurityCommandLongOn_10Bytes, true - case 0xEB: - return SecurityCommandTypeContainer_SecurityCommandLongOn_11Bytes, true - case 0xEC: - return SecurityCommandTypeContainer_SecurityCommandLongOn_12Bytes, true - case 0xED: - return SecurityCommandTypeContainer_SecurityCommandLongOn_13Bytes, true - case 0xEE: - return SecurityCommandTypeContainer_SecurityCommandLongOn_14Bytes, true - case 0xEF: - return SecurityCommandTypeContainer_SecurityCommandLongOn_15Bytes, true - case 0xF0: - return SecurityCommandTypeContainer_SecurityCommandLongOn_16Bytes, true - case 0xF1: - return SecurityCommandTypeContainer_SecurityCommandLongOn_17Bytes, true - case 0xF2: - return SecurityCommandTypeContainer_SecurityCommandLongOn_18Bytes, true - case 0xF3: - return SecurityCommandTypeContainer_SecurityCommandLongOn_19Bytes, true - case 0xF4: - return SecurityCommandTypeContainer_SecurityCommandLongOn_20Bytes, true - case 0xF5: - return SecurityCommandTypeContainer_SecurityCommandLongOn_21Bytes, true - case 0xF6: - return SecurityCommandTypeContainer_SecurityCommandLongOn_22Bytes, true - case 0xF7: - return SecurityCommandTypeContainer_SecurityCommandLongOn_23Bytes, true - case 0xF8: - return SecurityCommandTypeContainer_SecurityCommandLongOn_24Bytes, true - case 0xF9: - return SecurityCommandTypeContainer_SecurityCommandLongOn_25Bytes, true - case 0xFA: - return SecurityCommandTypeContainer_SecurityCommandLongOn_26Bytes, true - case 0xFB: - return SecurityCommandTypeContainer_SecurityCommandLongOn_27Bytes, true - case 0xFC: - return SecurityCommandTypeContainer_SecurityCommandLongOn_28Bytes, true - case 0xFD: - return SecurityCommandTypeContainer_SecurityCommandLongOn_29Bytes, true - case 0xFE: - return SecurityCommandTypeContainer_SecurityCommandLongOn_30Bytes, true - case 0xFF: - return SecurityCommandTypeContainer_SecurityCommandLongOn_31Bytes, true + case 0x00: + return SecurityCommandTypeContainer_SecurityCommandOff_0Bytes, true + case 0x01: + return SecurityCommandTypeContainer_SecurityCommandOff_1Bytes, true + case 0x02: + return SecurityCommandTypeContainer_SecurityCommandOff_2Bytes, true + case 0x03: + return SecurityCommandTypeContainer_SecurityCommandOff_3Bytes, true + case 0x04: + return SecurityCommandTypeContainer_SecurityCommandOff_4Bytes, true + case 0x05: + return SecurityCommandTypeContainer_SecurityCommandOff_5Bytes, true + case 0x06: + return SecurityCommandTypeContainer_SecurityCommandOff_6Bytes, true + case 0x07: + return SecurityCommandTypeContainer_SecurityCommandOff_7Bytes, true + case 0x08: + return SecurityCommandTypeContainer_SecurityCommandEvent_0Bytes, true + case 0x09: + return SecurityCommandTypeContainer_SecurityCommandEvent_1Bytes, true + case 0x0A: + return SecurityCommandTypeContainer_SecurityCommandEvent_2Bytes, true + case 0x0B: + return SecurityCommandTypeContainer_SecurityCommandEvent_3Bytes, true + case 0x0C: + return SecurityCommandTypeContainer_SecurityCommandEvent_4Bytes, true + case 0x0D: + return SecurityCommandTypeContainer_SecurityCommandEvent_5Bytes, true + case 0x0E: + return SecurityCommandTypeContainer_SecurityCommandEvent_6Bytes, true + case 0x0F: + return SecurityCommandTypeContainer_SecurityCommandEvent_7Bytes, true + case 0x78: + return SecurityCommandTypeContainer_SecurityCommandOn_0Bytes, true + case 0x79: + return SecurityCommandTypeContainer_SecurityCommandOn_1Bytes, true + case 0x7A: + return SecurityCommandTypeContainer_SecurityCommandOn_2Bytes, true + case 0x7B: + return SecurityCommandTypeContainer_SecurityCommandOn_3Bytes, true + case 0x7C: + return SecurityCommandTypeContainer_SecurityCommandOn_4Bytes, true + case 0x7D: + return SecurityCommandTypeContainer_SecurityCommandOn_5Bytes, true + case 0x7E: + return SecurityCommandTypeContainer_SecurityCommandOn_6Bytes, true + case 0x7F: + return SecurityCommandTypeContainer_SecurityCommandOn_7Bytes, true + case 0x80: + return SecurityCommandTypeContainer_SecurityCommandLongOff_0Bytes, true + case 0x81: + return SecurityCommandTypeContainer_SecurityCommandLongOff_1Bytes, true + case 0x82: + return SecurityCommandTypeContainer_SecurityCommandLongOff_2Bytes, true + case 0x83: + return SecurityCommandTypeContainer_SecurityCommandLongOff_3Bytes, true + case 0x84: + return SecurityCommandTypeContainer_SecurityCommandLongOff_4Bytes, true + case 0x85: + return SecurityCommandTypeContainer_SecurityCommandLongOff_5Bytes, true + case 0x86: + return SecurityCommandTypeContainer_SecurityCommandLongOff_6Bytes, true + case 0x87: + return SecurityCommandTypeContainer_SecurityCommandLongOff_7Bytes, true + case 0x88: + return SecurityCommandTypeContainer_SecurityCommandLongOff_8Bytes, true + case 0x89: + return SecurityCommandTypeContainer_SecurityCommandLongOff_9Bytes, true + case 0x8A: + return SecurityCommandTypeContainer_SecurityCommandLongOff_10Bytes, true + case 0x8B: + return SecurityCommandTypeContainer_SecurityCommandLongOff_11Bytes, true + case 0x8C: + return SecurityCommandTypeContainer_SecurityCommandLongOff_12Bytes, true + case 0x8D: + return SecurityCommandTypeContainer_SecurityCommandLongOff_13Bytes, true + case 0x8E: + return SecurityCommandTypeContainer_SecurityCommandLongOff_14Bytes, true + case 0x8F: + return SecurityCommandTypeContainer_SecurityCommandLongOff_15Bytes, true + case 0x90: + return SecurityCommandTypeContainer_SecurityCommandLongOff_16Bytes, true + case 0x91: + return SecurityCommandTypeContainer_SecurityCommandLongOff_17Bytes, true + case 0x92: + return SecurityCommandTypeContainer_SecurityCommandLongOff_18Bytes, true + case 0x93: + return SecurityCommandTypeContainer_SecurityCommandLongOff_19Bytes, true + case 0x94: + return SecurityCommandTypeContainer_SecurityCommandLongOff_20Bytes, true + case 0x95: + return SecurityCommandTypeContainer_SecurityCommandLongOff_21Bytes, true + case 0x96: + return SecurityCommandTypeContainer_SecurityCommandLongOff_22Bytes, true + case 0x97: + return SecurityCommandTypeContainer_SecurityCommandLongOff_23Bytes, true + case 0x98: + return SecurityCommandTypeContainer_SecurityCommandLongOff_24Bytes, true + case 0x99: + return SecurityCommandTypeContainer_SecurityCommandLongOff_25Bytes, true + case 0x9A: + return SecurityCommandTypeContainer_SecurityCommandLongOff_26Bytes, true + case 0x9B: + return SecurityCommandTypeContainer_SecurityCommandLongOff_27Bytes, true + case 0x9C: + return SecurityCommandTypeContainer_SecurityCommandLongOff_28Bytes, true + case 0x9D: + return SecurityCommandTypeContainer_SecurityCommandLongOff_29Bytes, true + case 0x9E: + return SecurityCommandTypeContainer_SecurityCommandLongOff_30Bytes, true + case 0x9F: + return SecurityCommandTypeContainer_SecurityCommandLongOff_31Bytes, true + case 0xA0: + return SecurityCommandTypeContainer_SecurityCommandLongEvent_0Bytes, true + case 0xA1: + return SecurityCommandTypeContainer_SecurityCommandLongEvent_1Bytes, true + case 0xA2: + return SecurityCommandTypeContainer_SecurityCommandLongEvent_2Bytes, true + case 0xA3: + return SecurityCommandTypeContainer_SecurityCommandLongEvent_3Bytes, true + case 0xA4: + return SecurityCommandTypeContainer_SecurityCommandLongEvent_4Bytes, true + case 0xA5: + return SecurityCommandTypeContainer_SecurityCommandLongEvent_5Bytes, true + case 0xA6: + return SecurityCommandTypeContainer_SecurityCommandLongEvent_6Bytes, true + case 0xA7: + return SecurityCommandTypeContainer_SecurityCommandLongEvent_7Bytes, true + case 0xA8: + return SecurityCommandTypeContainer_SecurityCommandLongEvent_8Bytes, true + case 0xA9: + return SecurityCommandTypeContainer_SecurityCommandLongEvent_9Bytes, true + case 0xAA: + return SecurityCommandTypeContainer_SecurityCommandLongEvent_10Bytes, true + case 0xAB: + return SecurityCommandTypeContainer_SecurityCommandLongEvent_11Bytes, true + case 0xAC: + return SecurityCommandTypeContainer_SecurityCommandLongEvent_12Bytes, true + case 0xAD: + return SecurityCommandTypeContainer_SecurityCommandLongEvent_13Bytes, true + case 0xAE: + return SecurityCommandTypeContainer_SecurityCommandLongEvent_14Bytes, true + case 0xAF: + return SecurityCommandTypeContainer_SecurityCommandLongEvent_15Bytes, true + case 0xB0: + return SecurityCommandTypeContainer_SecurityCommandLongEvent_16Bytes, true + case 0xB1: + return SecurityCommandTypeContainer_SecurityCommandLongEvent_17Bytes, true + case 0xB2: + return SecurityCommandTypeContainer_SecurityCommandLongEvent_18Bytes, true + case 0xB3: + return SecurityCommandTypeContainer_SecurityCommandLongEvent_19Bytes, true + case 0xB4: + return SecurityCommandTypeContainer_SecurityCommandLongEvent_20Bytes, true + case 0xB5: + return SecurityCommandTypeContainer_SecurityCommandLongEvent_21Bytes, true + case 0xB6: + return SecurityCommandTypeContainer_SecurityCommandLongEvent_22Bytes, true + case 0xB7: + return SecurityCommandTypeContainer_SecurityCommandLongEvent_23Bytes, true + case 0xB8: + return SecurityCommandTypeContainer_SecurityCommandLongEvent_24Bytes, true + case 0xB9: + return SecurityCommandTypeContainer_SecurityCommandLongEvent_25Bytes, true + case 0xBA: + return SecurityCommandTypeContainer_SecurityCommandLongEvent_26Bytes, true + case 0xBB: + return SecurityCommandTypeContainer_SecurityCommandLongEvent_27Bytes, true + case 0xBC: + return SecurityCommandTypeContainer_SecurityCommandLongEvent_28Bytes, true + case 0xBD: + return SecurityCommandTypeContainer_SecurityCommandLongEvent_29Bytes, true + case 0xBE: + return SecurityCommandTypeContainer_SecurityCommandLongEvent_30Bytes, true + case 0xBF: + return SecurityCommandTypeContainer_SecurityCommandLongEvent_31Bytes, true + case 0xE0: + return SecurityCommandTypeContainer_SecurityCommandLongOn_0Bytes, true + case 0xE1: + return SecurityCommandTypeContainer_SecurityCommandLongOn_1Bytes, true + case 0xE2: + return SecurityCommandTypeContainer_SecurityCommandLongOn_2Bytes, true + case 0xE3: + return SecurityCommandTypeContainer_SecurityCommandLongOn_3Bytes, true + case 0xE4: + return SecurityCommandTypeContainer_SecurityCommandLongOn_4Bytes, true + case 0xE5: + return SecurityCommandTypeContainer_SecurityCommandLongOn_5Bytes, true + case 0xE6: + return SecurityCommandTypeContainer_SecurityCommandLongOn_6Bytes, true + case 0xE7: + return SecurityCommandTypeContainer_SecurityCommandLongOn_7Bytes, true + case 0xE8: + return SecurityCommandTypeContainer_SecurityCommandLongOn_8Bytes, true + case 0xE9: + return SecurityCommandTypeContainer_SecurityCommandLongOn_9Bytes, true + case 0xEA: + return SecurityCommandTypeContainer_SecurityCommandLongOn_10Bytes, true + case 0xEB: + return SecurityCommandTypeContainer_SecurityCommandLongOn_11Bytes, true + case 0xEC: + return SecurityCommandTypeContainer_SecurityCommandLongOn_12Bytes, true + case 0xED: + return SecurityCommandTypeContainer_SecurityCommandLongOn_13Bytes, true + case 0xEE: + return SecurityCommandTypeContainer_SecurityCommandLongOn_14Bytes, true + case 0xEF: + return SecurityCommandTypeContainer_SecurityCommandLongOn_15Bytes, true + case 0xF0: + return SecurityCommandTypeContainer_SecurityCommandLongOn_16Bytes, true + case 0xF1: + return SecurityCommandTypeContainer_SecurityCommandLongOn_17Bytes, true + case 0xF2: + return SecurityCommandTypeContainer_SecurityCommandLongOn_18Bytes, true + case 0xF3: + return SecurityCommandTypeContainer_SecurityCommandLongOn_19Bytes, true + case 0xF4: + return SecurityCommandTypeContainer_SecurityCommandLongOn_20Bytes, true + case 0xF5: + return SecurityCommandTypeContainer_SecurityCommandLongOn_21Bytes, true + case 0xF6: + return SecurityCommandTypeContainer_SecurityCommandLongOn_22Bytes, true + case 0xF7: + return SecurityCommandTypeContainer_SecurityCommandLongOn_23Bytes, true + case 0xF8: + return SecurityCommandTypeContainer_SecurityCommandLongOn_24Bytes, true + case 0xF9: + return SecurityCommandTypeContainer_SecurityCommandLongOn_25Bytes, true + case 0xFA: + return SecurityCommandTypeContainer_SecurityCommandLongOn_26Bytes, true + case 0xFB: + return SecurityCommandTypeContainer_SecurityCommandLongOn_27Bytes, true + case 0xFC: + return SecurityCommandTypeContainer_SecurityCommandLongOn_28Bytes, true + case 0xFD: + return SecurityCommandTypeContainer_SecurityCommandLongOn_29Bytes, true + case 0xFE: + return SecurityCommandTypeContainer_SecurityCommandLongOn_30Bytes, true + case 0xFF: + return SecurityCommandTypeContainer_SecurityCommandLongOn_31Bytes, true } return 0, false } @@ -1774,13 +1533,13 @@ func SecurityCommandTypeContainerByName(value string) (enum SecurityCommandTypeC return 0, false } -func SecurityCommandTypeContainerKnows(value uint8) bool { +func SecurityCommandTypeContainerKnows(value uint8) bool { for _, typeValue := range SecurityCommandTypeContainerValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastSecurityCommandTypeContainer(structType interface{}) SecurityCommandTypeContainer { @@ -2080,3 +1839,4 @@ func (e SecurityCommandTypeContainer) PLC4XEnumName() string { func (e SecurityCommandTypeContainer) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityData.go b/plc4go/protocols/cbus/readwrite/model/SecurityData.go index 2145af0cdf4..8a28758ec5e 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityData.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityData.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityData is the corresponding interface of SecurityData type SecurityData interface { @@ -49,8 +51,8 @@ type SecurityDataExactly interface { // _SecurityData is the data-structure of this message type _SecurityData struct { _SecurityDataChildRequirements - CommandTypeContainer SecurityCommandTypeContainer - Argument byte + CommandTypeContainer SecurityCommandTypeContainer + Argument byte } type _SecurityDataChildRequirements interface { @@ -58,6 +60,7 @@ type _SecurityDataChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type SecurityDataParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child SecurityData, serializeChildFunction func() error) error GetTypeName() string @@ -65,13 +68,12 @@ type SecurityDataParent interface { type SecurityDataChild interface { utils.Serializable - InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) +InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) GetParent() *SecurityData GetTypeName() string SecurityData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -105,14 +107,15 @@ func (m *_SecurityData) GetCommandType() SecurityCommandType { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSecurityData factory function for _SecurityData -func NewSecurityData(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityData { - return &_SecurityData{CommandTypeContainer: commandTypeContainer, Argument: argument} +func NewSecurityData( commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityData { +return &_SecurityData{ CommandTypeContainer: commandTypeContainer , Argument: argument } } // Deprecated: use the interface for direct cast func CastSecurityData(structType interface{}) SecurityData { - if casted, ok := structType.(SecurityData); ok { + if casted, ok := structType.(SecurityData); ok { return casted } if casted, ok := structType.(*SecurityData); ok { @@ -125,6 +128,7 @@ func (m *_SecurityData) GetTypeName() string { return "SecurityData" } + func (m *_SecurityData) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -134,7 +138,7 @@ func (m *_SecurityData) GetParentLengthInBits(ctx context.Context) uint16 { // A virtual field doesn't have any in- or output. // Simple field (argument) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } @@ -157,7 +161,7 @@ func SecurityDataParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe _ = currentPos // Validation - if !(KnowsSecurityCommandTypeContainer(readBuffer)) { + if (!(KnowsSecurityCommandTypeContainer(readBuffer))) { return nil, errors.WithStack(utils.ParseAssertError{"no command type could be found"}) } @@ -165,7 +169,7 @@ func SecurityDataParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe if pullErr := readBuffer.PullContext("commandTypeContainer"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for commandTypeContainer") } - _commandTypeContainer, _commandTypeContainerErr := SecurityCommandTypeContainerParseWithBuffer(ctx, readBuffer) +_commandTypeContainer, _commandTypeContainerErr := SecurityCommandTypeContainerParseWithBuffer(ctx, readBuffer) if _commandTypeContainerErr != nil { return nil, errors.Wrap(_commandTypeContainerErr, "Error parsing 'commandTypeContainer' field of SecurityData") } @@ -180,7 +184,7 @@ func SecurityDataParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe _ = commandType // Simple Field (argument) - _argument, _argumentErr := readBuffer.ReadByte("argument") +_argument, _argumentErr := readBuffer.ReadByte("argument") if _argumentErr != nil { return nil, errors.Wrap(_argumentErr, "Error parsing 'argument' field of SecurityData") } @@ -189,108 +193,108 @@ func SecurityDataParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type SecurityDataChildSerializeRequirement interface { SecurityData - InitializeParent(SecurityData, SecurityCommandTypeContainer, byte) + InitializeParent(SecurityData, SecurityCommandTypeContainer, byte) GetParent() SecurityData } var _childTemp interface{} var _child SecurityDataChildSerializeRequirement var typeSwitchError error switch { - case commandType == SecurityCommandType_ON && argument == 0x80: // SecurityDataSystemArmedDisarmed - _childTemp, typeSwitchError = SecurityDataSystemArmedDisarmedParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_OFF && argument == 0x80: // SecurityDataSystemDisarmed - _childTemp, typeSwitchError = SecurityDataSystemDisarmedParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_EVENT && argument == 0x81: // SecurityDataExitDelayStarted - _childTemp, typeSwitchError = SecurityDataExitDelayStartedParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_EVENT && argument == 0x82: // SecurityDataEntryDelayStarted - _childTemp, typeSwitchError = SecurityDataEntryDelayStartedParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_ON && argument == 0x83: // SecurityDataAlarmOn - _childTemp, typeSwitchError = SecurityDataAlarmOnParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_OFF && argument == 0x83: // SecurityDataAlarmOff - _childTemp, typeSwitchError = SecurityDataAlarmOffParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_ON && argument == 0x84: // SecurityDataTamperOn - _childTemp, typeSwitchError = SecurityDataTamperOnParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_OFF && argument == 0x84: // SecurityDataTamperOff - _childTemp, typeSwitchError = SecurityDataTamperOffParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_ON && argument == 0x85: // SecurityDataPanicActivated - _childTemp, typeSwitchError = SecurityDataPanicActivatedParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_OFF && argument == 0x85: // SecurityDataPanicCleared - _childTemp, typeSwitchError = SecurityDataPanicClearedParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_EVENT && argument == 0x86: // SecurityDataZoneUnsealed - _childTemp, typeSwitchError = SecurityDataZoneUnsealedParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_EVENT && argument == 0x87: // SecurityDataZoneSealed - _childTemp, typeSwitchError = SecurityDataZoneSealedParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_EVENT && argument == 0x88: // SecurityDataZoneOpen - _childTemp, typeSwitchError = SecurityDataZoneOpenParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_EVENT && argument == 0x89: // SecurityDataZoneShort - _childTemp, typeSwitchError = SecurityDataZoneShortParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_EVENT && argument == 0x89: // SecurityDataZoneIsolated - _childTemp, typeSwitchError = SecurityDataZoneIsolatedParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_ON && argument == 0x8B: // SecurityDataLowBatteryDetected - _childTemp, typeSwitchError = SecurityDataLowBatteryDetectedParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_OFF && argument == 0x8B: // SecurityDataLowBatteryCorrected - _childTemp, typeSwitchError = SecurityDataLowBatteryCorrectedParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_EVENT && argument == 0x8C: // SecurityDataLowBatteryCharging - _childTemp, typeSwitchError = SecurityDataLowBatteryChargingParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_EVENT && argument == 0x8D: // SecurityDataZoneName - _childTemp, typeSwitchError = SecurityDataZoneNameParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_EVENT && argument == 0x8E: // SecurityDataStatusReport1 - _childTemp, typeSwitchError = SecurityDataStatusReport1ParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_EVENT && argument == 0x8F: // SecurityDataStatusReport2 - _childTemp, typeSwitchError = SecurityDataStatusReport2ParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_EVENT && argument == 0x90: // SecurityDataPasswordEntryStatus - _childTemp, typeSwitchError = SecurityDataPasswordEntryStatusParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_ON && argument == 0x91: // SecurityDataMainsFailure - _childTemp, typeSwitchError = SecurityDataMainsFailureParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_OFF && argument == 0x91: // SecurityDataMainsRestoredOrApplied - _childTemp, typeSwitchError = SecurityDataMainsRestoredOrAppliedParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_EVENT && argument == 0x92: // SecurityDataArmReadyNotReady - _childTemp, typeSwitchError = SecurityDataArmReadyNotReadyParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_EVENT && argument == 0x93: // SecurityDataCurrentAlarmType - _childTemp, typeSwitchError = SecurityDataCurrentAlarmTypeParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_ON && argument == 0x94: // SecurityDataLineCutAlarmRaised - _childTemp, typeSwitchError = SecurityDataLineCutAlarmRaisedParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_OFF && argument == 0x94: // SecurityDataLineCutAlarmCleared - _childTemp, typeSwitchError = SecurityDataLineCutAlarmClearedParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_ON && argument == 0x95: // SecurityDataArmFailedRaised - _childTemp, typeSwitchError = SecurityDataArmFailedRaisedParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_OFF && argument == 0x95: // SecurityDataArmFailedCleared - _childTemp, typeSwitchError = SecurityDataArmFailedClearedParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_ON && argument == 0x96: // SecurityDataFireAlarmRaised - _childTemp, typeSwitchError = SecurityDataFireAlarmRaisedParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_OFF && argument == 0x96: // SecurityDataFireAlarmCleared - _childTemp, typeSwitchError = SecurityDataFireAlarmClearedParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_ON && argument == 0x97: // SecurityDataGasAlarmRaised - _childTemp, typeSwitchError = SecurityDataGasAlarmRaisedParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_OFF && argument == 0x97: // SecurityDataGasAlarmCleared - _childTemp, typeSwitchError = SecurityDataGasAlarmClearedParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_ON && argument == 0x98: // SecurityDataOtherAlarmRaised - _childTemp, typeSwitchError = SecurityDataOtherAlarmRaisedParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_OFF && argument == 0x98: // SecurityDataOtherAlarmCleared - _childTemp, typeSwitchError = SecurityDataOtherAlarmClearedParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_EVENT && argument == 0xA0: // SecurityDataStatus1Request - _childTemp, typeSwitchError = SecurityDataStatus1RequestParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_EVENT && argument == 0xA1: // SecurityDataStatus2Request - _childTemp, typeSwitchError = SecurityDataStatus2RequestParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_EVENT && argument == 0xA2: // SecurityDataArmSystem - _childTemp, typeSwitchError = SecurityDataArmSystemParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_ON && argument == 0xA3: // SecurityDataRaiseTamper - _childTemp, typeSwitchError = SecurityDataRaiseTamperParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_OFF && argument == 0xA3: // SecurityDataDropTamper - _childTemp, typeSwitchError = SecurityDataDropTamperParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_ON && argument == 0xA4: // SecurityDataRaiseAlarm - _childTemp, typeSwitchError = SecurityDataRaiseAlarmParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_EVENT && argument == 0xA5: // SecurityDataEmulatedKeypad - _childTemp, typeSwitchError = SecurityDataEmulatedKeypadParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_ON && argument == 0xA6: // SecurityDataDisplayMessage +case commandType == SecurityCommandType_ON && argument == 0x80 : // SecurityDataSystemArmedDisarmed + _childTemp, typeSwitchError = SecurityDataSystemArmedDisarmedParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_OFF && argument == 0x80 : // SecurityDataSystemDisarmed + _childTemp, typeSwitchError = SecurityDataSystemDisarmedParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_EVENT && argument == 0x81 : // SecurityDataExitDelayStarted + _childTemp, typeSwitchError = SecurityDataExitDelayStartedParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_EVENT && argument == 0x82 : // SecurityDataEntryDelayStarted + _childTemp, typeSwitchError = SecurityDataEntryDelayStartedParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_ON && argument == 0x83 : // SecurityDataAlarmOn + _childTemp, typeSwitchError = SecurityDataAlarmOnParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_OFF && argument == 0x83 : // SecurityDataAlarmOff + _childTemp, typeSwitchError = SecurityDataAlarmOffParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_ON && argument == 0x84 : // SecurityDataTamperOn + _childTemp, typeSwitchError = SecurityDataTamperOnParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_OFF && argument == 0x84 : // SecurityDataTamperOff + _childTemp, typeSwitchError = SecurityDataTamperOffParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_ON && argument == 0x85 : // SecurityDataPanicActivated + _childTemp, typeSwitchError = SecurityDataPanicActivatedParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_OFF && argument == 0x85 : // SecurityDataPanicCleared + _childTemp, typeSwitchError = SecurityDataPanicClearedParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_EVENT && argument == 0x86 : // SecurityDataZoneUnsealed + _childTemp, typeSwitchError = SecurityDataZoneUnsealedParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_EVENT && argument == 0x87 : // SecurityDataZoneSealed + _childTemp, typeSwitchError = SecurityDataZoneSealedParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_EVENT && argument == 0x88 : // SecurityDataZoneOpen + _childTemp, typeSwitchError = SecurityDataZoneOpenParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_EVENT && argument == 0x89 : // SecurityDataZoneShort + _childTemp, typeSwitchError = SecurityDataZoneShortParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_EVENT && argument == 0x89 : // SecurityDataZoneIsolated + _childTemp, typeSwitchError = SecurityDataZoneIsolatedParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_ON && argument == 0x8B : // SecurityDataLowBatteryDetected + _childTemp, typeSwitchError = SecurityDataLowBatteryDetectedParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_OFF && argument == 0x8B : // SecurityDataLowBatteryCorrected + _childTemp, typeSwitchError = SecurityDataLowBatteryCorrectedParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_EVENT && argument == 0x8C : // SecurityDataLowBatteryCharging + _childTemp, typeSwitchError = SecurityDataLowBatteryChargingParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_EVENT && argument == 0x8D : // SecurityDataZoneName + _childTemp, typeSwitchError = SecurityDataZoneNameParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_EVENT && argument == 0x8E : // SecurityDataStatusReport1 + _childTemp, typeSwitchError = SecurityDataStatusReport1ParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_EVENT && argument == 0x8F : // SecurityDataStatusReport2 + _childTemp, typeSwitchError = SecurityDataStatusReport2ParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_EVENT && argument == 0x90 : // SecurityDataPasswordEntryStatus + _childTemp, typeSwitchError = SecurityDataPasswordEntryStatusParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_ON && argument == 0x91 : // SecurityDataMainsFailure + _childTemp, typeSwitchError = SecurityDataMainsFailureParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_OFF && argument == 0x91 : // SecurityDataMainsRestoredOrApplied + _childTemp, typeSwitchError = SecurityDataMainsRestoredOrAppliedParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_EVENT && argument == 0x92 : // SecurityDataArmReadyNotReady + _childTemp, typeSwitchError = SecurityDataArmReadyNotReadyParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_EVENT && argument == 0x93 : // SecurityDataCurrentAlarmType + _childTemp, typeSwitchError = SecurityDataCurrentAlarmTypeParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_ON && argument == 0x94 : // SecurityDataLineCutAlarmRaised + _childTemp, typeSwitchError = SecurityDataLineCutAlarmRaisedParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_OFF && argument == 0x94 : // SecurityDataLineCutAlarmCleared + _childTemp, typeSwitchError = SecurityDataLineCutAlarmClearedParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_ON && argument == 0x95 : // SecurityDataArmFailedRaised + _childTemp, typeSwitchError = SecurityDataArmFailedRaisedParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_OFF && argument == 0x95 : // SecurityDataArmFailedCleared + _childTemp, typeSwitchError = SecurityDataArmFailedClearedParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_ON && argument == 0x96 : // SecurityDataFireAlarmRaised + _childTemp, typeSwitchError = SecurityDataFireAlarmRaisedParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_OFF && argument == 0x96 : // SecurityDataFireAlarmCleared + _childTemp, typeSwitchError = SecurityDataFireAlarmClearedParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_ON && argument == 0x97 : // SecurityDataGasAlarmRaised + _childTemp, typeSwitchError = SecurityDataGasAlarmRaisedParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_OFF && argument == 0x97 : // SecurityDataGasAlarmCleared + _childTemp, typeSwitchError = SecurityDataGasAlarmClearedParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_ON && argument == 0x98 : // SecurityDataOtherAlarmRaised + _childTemp, typeSwitchError = SecurityDataOtherAlarmRaisedParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_OFF && argument == 0x98 : // SecurityDataOtherAlarmCleared + _childTemp, typeSwitchError = SecurityDataOtherAlarmClearedParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_EVENT && argument == 0xA0 : // SecurityDataStatus1Request + _childTemp, typeSwitchError = SecurityDataStatus1RequestParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_EVENT && argument == 0xA1 : // SecurityDataStatus2Request + _childTemp, typeSwitchError = SecurityDataStatus2RequestParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_EVENT && argument == 0xA2 : // SecurityDataArmSystem + _childTemp, typeSwitchError = SecurityDataArmSystemParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_ON && argument == 0xA3 : // SecurityDataRaiseTamper + _childTemp, typeSwitchError = SecurityDataRaiseTamperParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_OFF && argument == 0xA3 : // SecurityDataDropTamper + _childTemp, typeSwitchError = SecurityDataDropTamperParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_ON && argument == 0xA4 : // SecurityDataRaiseAlarm + _childTemp, typeSwitchError = SecurityDataRaiseAlarmParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_EVENT && argument == 0xA5 : // SecurityDataEmulatedKeypad + _childTemp, typeSwitchError = SecurityDataEmulatedKeypadParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_ON && argument == 0xA6 : // SecurityDataDisplayMessage _childTemp, typeSwitchError = SecurityDataDisplayMessageParseWithBuffer(ctx, readBuffer, commandTypeContainer) - case commandType == SecurityCommandType_EVENT && argument == 0xA7: // SecurityDataRequestZoneName - _childTemp, typeSwitchError = SecurityDataRequestZoneNameParseWithBuffer(ctx, readBuffer) - case commandType == SecurityCommandType_OFF: // SecurityDataOff +case commandType == SecurityCommandType_EVENT && argument == 0xA7 : // SecurityDataRequestZoneName + _childTemp, typeSwitchError = SecurityDataRequestZoneNameParseWithBuffer(ctx, readBuffer, ) +case commandType == SecurityCommandType_OFF : // SecurityDataOff _childTemp, typeSwitchError = SecurityDataOffParseWithBuffer(ctx, readBuffer, commandTypeContainer) - case commandType == SecurityCommandType_ON: // SecurityDataOn +case commandType == SecurityCommandType_ON : // SecurityDataOn _childTemp, typeSwitchError = SecurityDataOnParseWithBuffer(ctx, readBuffer, commandTypeContainer) - case commandType == SecurityCommandType_EVENT: // SecurityDataEvent +case commandType == SecurityCommandType_EVENT : // SecurityDataEvent _childTemp, typeSwitchError = SecurityDataEventParseWithBuffer(ctx, readBuffer, commandTypeContainer) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [commandType=%v, argument=%v]", commandType, argument) @@ -305,7 +309,7 @@ func SecurityDataParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe } // Finish initializing - _child.InitializeParent(_child, commandTypeContainer, argument) +_child.InitializeParent(_child , commandTypeContainer , argument ) return _child, nil } @@ -315,7 +319,7 @@ func (pm *_SecurityData) SerializeParent(ctx context.Context, writeBuffer utils. _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("SecurityData"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("SecurityData"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for SecurityData") } @@ -353,6 +357,7 @@ func (pm *_SecurityData) SerializeParent(ctx context.Context, writeBuffer utils. return nil } + func (m *_SecurityData) isSecurityData() bool { return true } @@ -367,3 +372,6 @@ func (m *_SecurityData) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataAlarmOff.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataAlarmOff.go index 8cc9d1733f7..cb294f3b277 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataAlarmOff.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataAlarmOff.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataAlarmOff is the corresponding interface of SecurityDataAlarmOff type SecurityDataAlarmOff interface { @@ -46,6 +48,8 @@ type _SecurityDataAlarmOff struct { *_SecurityData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,19 +60,19 @@ type _SecurityDataAlarmOff struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataAlarmOff) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataAlarmOff) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataAlarmOff) GetParent() SecurityData { +func (m *_SecurityDataAlarmOff) GetParent() SecurityData { return m._SecurityData } + // NewSecurityDataAlarmOff factory function for _SecurityDataAlarmOff -func NewSecurityDataAlarmOff(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataAlarmOff { +func NewSecurityDataAlarmOff( commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataAlarmOff { _result := &_SecurityDataAlarmOff{ - _SecurityData: NewSecurityData(commandTypeContainer, argument), + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -76,7 +80,7 @@ func NewSecurityDataAlarmOff(commandTypeContainer SecurityCommandTypeContainer, // Deprecated: use the interface for direct cast func CastSecurityDataAlarmOff(structType interface{}) SecurityDataAlarmOff { - if casted, ok := structType.(SecurityDataAlarmOff); ok { + if casted, ok := structType.(SecurityDataAlarmOff); ok { return casted } if casted, ok := structType.(*SecurityDataAlarmOff); ok { @@ -95,6 +99,7 @@ func (m *_SecurityDataAlarmOff) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_SecurityDataAlarmOff) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -118,7 +123,8 @@ func SecurityDataAlarmOffParseWithBuffer(ctx context.Context, readBuffer utils.R // Create a partially initialized instance _child := &_SecurityDataAlarmOff{ - _SecurityData: &_SecurityData{}, + _SecurityData: &_SecurityData{ + }, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -148,6 +154,7 @@ func (m *_SecurityDataAlarmOff) SerializeWithWriteBuffer(ctx context.Context, wr return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataAlarmOff) isSecurityDataAlarmOff() bool { return true } @@ -162,3 +169,6 @@ func (m *_SecurityDataAlarmOff) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataAlarmOn.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataAlarmOn.go index 83a13eefd4b..ae209d6c6fe 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataAlarmOn.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataAlarmOn.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataAlarmOn is the corresponding interface of SecurityDataAlarmOn type SecurityDataAlarmOn interface { @@ -46,6 +48,8 @@ type _SecurityDataAlarmOn struct { *_SecurityData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,19 +60,19 @@ type _SecurityDataAlarmOn struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataAlarmOn) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataAlarmOn) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataAlarmOn) GetParent() SecurityData { +func (m *_SecurityDataAlarmOn) GetParent() SecurityData { return m._SecurityData } + // NewSecurityDataAlarmOn factory function for _SecurityDataAlarmOn -func NewSecurityDataAlarmOn(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataAlarmOn { +func NewSecurityDataAlarmOn( commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataAlarmOn { _result := &_SecurityDataAlarmOn{ - _SecurityData: NewSecurityData(commandTypeContainer, argument), + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -76,7 +80,7 @@ func NewSecurityDataAlarmOn(commandTypeContainer SecurityCommandTypeContainer, a // Deprecated: use the interface for direct cast func CastSecurityDataAlarmOn(structType interface{}) SecurityDataAlarmOn { - if casted, ok := structType.(SecurityDataAlarmOn); ok { + if casted, ok := structType.(SecurityDataAlarmOn); ok { return casted } if casted, ok := structType.(*SecurityDataAlarmOn); ok { @@ -95,6 +99,7 @@ func (m *_SecurityDataAlarmOn) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_SecurityDataAlarmOn) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -118,7 +123,8 @@ func SecurityDataAlarmOnParseWithBuffer(ctx context.Context, readBuffer utils.Re // Create a partially initialized instance _child := &_SecurityDataAlarmOn{ - _SecurityData: &_SecurityData{}, + _SecurityData: &_SecurityData{ + }, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -148,6 +154,7 @@ func (m *_SecurityDataAlarmOn) SerializeWithWriteBuffer(ctx context.Context, wri return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataAlarmOn) isSecurityDataAlarmOn() bool { return true } @@ -162,3 +169,6 @@ func (m *_SecurityDataAlarmOn) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataArmFailedCleared.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataArmFailedCleared.go index 79c1e7642fe..609cee7b716 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataArmFailedCleared.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataArmFailedCleared.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataArmFailedCleared is the corresponding interface of SecurityDataArmFailedCleared type SecurityDataArmFailedCleared interface { @@ -46,6 +48,8 @@ type _SecurityDataArmFailedCleared struct { *_SecurityData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,19 +60,19 @@ type _SecurityDataArmFailedCleared struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataArmFailedCleared) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataArmFailedCleared) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataArmFailedCleared) GetParent() SecurityData { +func (m *_SecurityDataArmFailedCleared) GetParent() SecurityData { return m._SecurityData } + // NewSecurityDataArmFailedCleared factory function for _SecurityDataArmFailedCleared -func NewSecurityDataArmFailedCleared(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataArmFailedCleared { +func NewSecurityDataArmFailedCleared( commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataArmFailedCleared { _result := &_SecurityDataArmFailedCleared{ - _SecurityData: NewSecurityData(commandTypeContainer, argument), + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -76,7 +80,7 @@ func NewSecurityDataArmFailedCleared(commandTypeContainer SecurityCommandTypeCon // Deprecated: use the interface for direct cast func CastSecurityDataArmFailedCleared(structType interface{}) SecurityDataArmFailedCleared { - if casted, ok := structType.(SecurityDataArmFailedCleared); ok { + if casted, ok := structType.(SecurityDataArmFailedCleared); ok { return casted } if casted, ok := structType.(*SecurityDataArmFailedCleared); ok { @@ -95,6 +99,7 @@ func (m *_SecurityDataArmFailedCleared) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_SecurityDataArmFailedCleared) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -118,7 +123,8 @@ func SecurityDataArmFailedClearedParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_SecurityDataArmFailedCleared{ - _SecurityData: &_SecurityData{}, + _SecurityData: &_SecurityData{ + }, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -148,6 +154,7 @@ func (m *_SecurityDataArmFailedCleared) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataArmFailedCleared) isSecurityDataArmFailedCleared() bool { return true } @@ -162,3 +169,6 @@ func (m *_SecurityDataArmFailedCleared) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataArmFailedRaised.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataArmFailedRaised.go index dd69c800a3a..c3be91f7e80 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataArmFailedRaised.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataArmFailedRaised.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataArmFailedRaised is the corresponding interface of SecurityDataArmFailedRaised type SecurityDataArmFailedRaised interface { @@ -46,6 +48,8 @@ type _SecurityDataArmFailedRaised struct { *_SecurityData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,19 +60,19 @@ type _SecurityDataArmFailedRaised struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataArmFailedRaised) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataArmFailedRaised) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataArmFailedRaised) GetParent() SecurityData { +func (m *_SecurityDataArmFailedRaised) GetParent() SecurityData { return m._SecurityData } + // NewSecurityDataArmFailedRaised factory function for _SecurityDataArmFailedRaised -func NewSecurityDataArmFailedRaised(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataArmFailedRaised { +func NewSecurityDataArmFailedRaised( commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataArmFailedRaised { _result := &_SecurityDataArmFailedRaised{ - _SecurityData: NewSecurityData(commandTypeContainer, argument), + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -76,7 +80,7 @@ func NewSecurityDataArmFailedRaised(commandTypeContainer SecurityCommandTypeCont // Deprecated: use the interface for direct cast func CastSecurityDataArmFailedRaised(structType interface{}) SecurityDataArmFailedRaised { - if casted, ok := structType.(SecurityDataArmFailedRaised); ok { + if casted, ok := structType.(SecurityDataArmFailedRaised); ok { return casted } if casted, ok := structType.(*SecurityDataArmFailedRaised); ok { @@ -95,6 +99,7 @@ func (m *_SecurityDataArmFailedRaised) GetLengthInBits(ctx context.Context) uint return lengthInBits } + func (m *_SecurityDataArmFailedRaised) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -118,7 +123,8 @@ func SecurityDataArmFailedRaisedParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_SecurityDataArmFailedRaised{ - _SecurityData: &_SecurityData{}, + _SecurityData: &_SecurityData{ + }, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -148,6 +154,7 @@ func (m *_SecurityDataArmFailedRaised) SerializeWithWriteBuffer(ctx context.Cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataArmFailedRaised) isSecurityDataArmFailedRaised() bool { return true } @@ -162,3 +169,6 @@ func (m *_SecurityDataArmFailedRaised) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataArmReadyNotReady.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataArmReadyNotReady.go index 0fd6786570e..bf87aa320be 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataArmReadyNotReady.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataArmReadyNotReady.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataArmReadyNotReady is the corresponding interface of SecurityDataArmReadyNotReady type SecurityDataArmReadyNotReady interface { @@ -46,9 +48,11 @@ type SecurityDataArmReadyNotReadyExactly interface { // _SecurityDataArmReadyNotReady is the data-structure of this message type _SecurityDataArmReadyNotReady struct { *_SecurityData - ZoneNumber uint8 + ZoneNumber uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,15 +63,13 @@ type _SecurityDataArmReadyNotReady struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataArmReadyNotReady) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataArmReadyNotReady) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataArmReadyNotReady) GetParent() SecurityData { +func (m *_SecurityDataArmReadyNotReady) GetParent() SecurityData { return m._SecurityData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -82,11 +84,12 @@ func (m *_SecurityDataArmReadyNotReady) GetZoneNumber() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSecurityDataArmReadyNotReady factory function for _SecurityDataArmReadyNotReady -func NewSecurityDataArmReadyNotReady(zoneNumber uint8, commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataArmReadyNotReady { +func NewSecurityDataArmReadyNotReady( zoneNumber uint8 , commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataArmReadyNotReady { _result := &_SecurityDataArmReadyNotReady{ - ZoneNumber: zoneNumber, - _SecurityData: NewSecurityData(commandTypeContainer, argument), + ZoneNumber: zoneNumber, + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -94,7 +97,7 @@ func NewSecurityDataArmReadyNotReady(zoneNumber uint8, commandTypeContainer Secu // Deprecated: use the interface for direct cast func CastSecurityDataArmReadyNotReady(structType interface{}) SecurityDataArmReadyNotReady { - if casted, ok := structType.(SecurityDataArmReadyNotReady); ok { + if casted, ok := structType.(SecurityDataArmReadyNotReady); ok { return casted } if casted, ok := structType.(*SecurityDataArmReadyNotReady); ok { @@ -111,11 +114,12 @@ func (m *_SecurityDataArmReadyNotReady) GetLengthInBits(ctx context.Context) uin lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (zoneNumber) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_SecurityDataArmReadyNotReady) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -134,7 +138,7 @@ func SecurityDataArmReadyNotReadyParseWithBuffer(ctx context.Context, readBuffer _ = currentPos // Simple Field (zoneNumber) - _zoneNumber, _zoneNumberErr := readBuffer.ReadUint8("zoneNumber", 8) +_zoneNumber, _zoneNumberErr := readBuffer.ReadUint8("zoneNumber", 8) if _zoneNumberErr != nil { return nil, errors.Wrap(_zoneNumberErr, "Error parsing 'zoneNumber' field of SecurityDataArmReadyNotReady") } @@ -146,8 +150,9 @@ func SecurityDataArmReadyNotReadyParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_SecurityDataArmReadyNotReady{ - _SecurityData: &_SecurityData{}, - ZoneNumber: zoneNumber, + _SecurityData: &_SecurityData{ + }, + ZoneNumber: zoneNumber, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -169,12 +174,12 @@ func (m *_SecurityDataArmReadyNotReady) SerializeWithWriteBuffer(ctx context.Con return errors.Wrap(pushErr, "Error pushing for SecurityDataArmReadyNotReady") } - // Simple Field (zoneNumber) - zoneNumber := uint8(m.GetZoneNumber()) - _zoneNumberErr := writeBuffer.WriteUint8("zoneNumber", 8, (zoneNumber)) - if _zoneNumberErr != nil { - return errors.Wrap(_zoneNumberErr, "Error serializing 'zoneNumber' field") - } + // Simple Field (zoneNumber) + zoneNumber := uint8(m.GetZoneNumber()) + _zoneNumberErr := writeBuffer.WriteUint8("zoneNumber", 8, (zoneNumber)) + if _zoneNumberErr != nil { + return errors.Wrap(_zoneNumberErr, "Error serializing 'zoneNumber' field") + } if popErr := writeBuffer.PopContext("SecurityDataArmReadyNotReady"); popErr != nil { return errors.Wrap(popErr, "Error popping for SecurityDataArmReadyNotReady") @@ -184,6 +189,7 @@ func (m *_SecurityDataArmReadyNotReady) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataArmReadyNotReady) isSecurityDataArmReadyNotReady() bool { return true } @@ -198,3 +204,6 @@ func (m *_SecurityDataArmReadyNotReady) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataArmSystem.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataArmSystem.go index 4e727b188b7..596942fe4bb 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataArmSystem.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataArmSystem.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataArmSystem is the corresponding interface of SecurityDataArmSystem type SecurityDataArmSystem interface { @@ -58,9 +60,11 @@ type SecurityDataArmSystemExactly interface { // _SecurityDataArmSystem is the data-structure of this message type _SecurityDataArmSystem struct { *_SecurityData - ArmMode byte + ArmMode byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -71,15 +75,13 @@ type _SecurityDataArmSystem struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataArmSystem) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataArmSystem) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataArmSystem) GetParent() SecurityData { +func (m *_SecurityDataArmSystem) GetParent() SecurityData { return m._SecurityData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -139,11 +141,12 @@ func (m *_SecurityDataArmSystem) GetIsArmToHighestLevelOfProtection() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSecurityDataArmSystem factory function for _SecurityDataArmSystem -func NewSecurityDataArmSystem(armMode byte, commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataArmSystem { +func NewSecurityDataArmSystem( armMode byte , commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataArmSystem { _result := &_SecurityDataArmSystem{ - ArmMode: armMode, - _SecurityData: NewSecurityData(commandTypeContainer, argument), + ArmMode: armMode, + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -151,7 +154,7 @@ func NewSecurityDataArmSystem(armMode byte, commandTypeContainer SecurityCommand // Deprecated: use the interface for direct cast func CastSecurityDataArmSystem(structType interface{}) SecurityDataArmSystem { - if casted, ok := structType.(SecurityDataArmSystem); ok { + if casted, ok := structType.(SecurityDataArmSystem); ok { return casted } if casted, ok := structType.(*SecurityDataArmSystem); ok { @@ -168,7 +171,7 @@ func (m *_SecurityDataArmSystem) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (armMode) - lengthInBits += 8 + lengthInBits += 8; // A virtual field doesn't have any in- or output. @@ -185,6 +188,7 @@ func (m *_SecurityDataArmSystem) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_SecurityDataArmSystem) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -203,7 +207,7 @@ func SecurityDataArmSystemParseWithBuffer(ctx context.Context, readBuffer utils. _ = currentPos // Simple Field (armMode) - _armMode, _armModeErr := readBuffer.ReadByte("armMode") +_armMode, _armModeErr := readBuffer.ReadByte("armMode") if _armModeErr != nil { return nil, errors.Wrap(_armModeErr, "Error parsing 'armMode' field of SecurityDataArmSystem") } @@ -245,8 +249,9 @@ func SecurityDataArmSystemParseWithBuffer(ctx context.Context, readBuffer utils. // Create a partially initialized instance _child := &_SecurityDataArmSystem{ - _SecurityData: &_SecurityData{}, - ArmMode: armMode, + _SecurityData: &_SecurityData{ + }, + ArmMode: armMode, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -268,36 +273,36 @@ func (m *_SecurityDataArmSystem) SerializeWithWriteBuffer(ctx context.Context, w return errors.Wrap(pushErr, "Error pushing for SecurityDataArmSystem") } - // Simple Field (armMode) - armMode := byte(m.GetArmMode()) - _armModeErr := writeBuffer.WriteByte("armMode", (armMode)) - if _armModeErr != nil { - return errors.Wrap(_armModeErr, "Error serializing 'armMode' field") - } - // Virtual field - if _isReservedErr := writeBuffer.WriteVirtual(ctx, "isReserved", m.GetIsReserved()); _isReservedErr != nil { - return errors.Wrap(_isReservedErr, "Error serializing 'isReserved' field") - } - // Virtual field - if _isArmToAwayModeErr := writeBuffer.WriteVirtual(ctx, "isArmToAwayMode", m.GetIsArmToAwayMode()); _isArmToAwayModeErr != nil { - return errors.Wrap(_isArmToAwayModeErr, "Error serializing 'isArmToAwayMode' field") - } - // Virtual field - if _isArmToNightModeErr := writeBuffer.WriteVirtual(ctx, "isArmToNightMode", m.GetIsArmToNightMode()); _isArmToNightModeErr != nil { - return errors.Wrap(_isArmToNightModeErr, "Error serializing 'isArmToNightMode' field") - } - // Virtual field - if _isArmToDayModeErr := writeBuffer.WriteVirtual(ctx, "isArmToDayMode", m.GetIsArmToDayMode()); _isArmToDayModeErr != nil { - return errors.Wrap(_isArmToDayModeErr, "Error serializing 'isArmToDayMode' field") - } - // Virtual field - if _isArmToVacationModeErr := writeBuffer.WriteVirtual(ctx, "isArmToVacationMode", m.GetIsArmToVacationMode()); _isArmToVacationModeErr != nil { - return errors.Wrap(_isArmToVacationModeErr, "Error serializing 'isArmToVacationMode' field") - } - // Virtual field - if _isArmToHighestLevelOfProtectionErr := writeBuffer.WriteVirtual(ctx, "isArmToHighestLevelOfProtection", m.GetIsArmToHighestLevelOfProtection()); _isArmToHighestLevelOfProtectionErr != nil { - return errors.Wrap(_isArmToHighestLevelOfProtectionErr, "Error serializing 'isArmToHighestLevelOfProtection' field") - } + // Simple Field (armMode) + armMode := byte(m.GetArmMode()) + _armModeErr := writeBuffer.WriteByte("armMode", (armMode)) + if _armModeErr != nil { + return errors.Wrap(_armModeErr, "Error serializing 'armMode' field") + } + // Virtual field + if _isReservedErr := writeBuffer.WriteVirtual(ctx, "isReserved", m.GetIsReserved()); _isReservedErr != nil { + return errors.Wrap(_isReservedErr, "Error serializing 'isReserved' field") + } + // Virtual field + if _isArmToAwayModeErr := writeBuffer.WriteVirtual(ctx, "isArmToAwayMode", m.GetIsArmToAwayMode()); _isArmToAwayModeErr != nil { + return errors.Wrap(_isArmToAwayModeErr, "Error serializing 'isArmToAwayMode' field") + } + // Virtual field + if _isArmToNightModeErr := writeBuffer.WriteVirtual(ctx, "isArmToNightMode", m.GetIsArmToNightMode()); _isArmToNightModeErr != nil { + return errors.Wrap(_isArmToNightModeErr, "Error serializing 'isArmToNightMode' field") + } + // Virtual field + if _isArmToDayModeErr := writeBuffer.WriteVirtual(ctx, "isArmToDayMode", m.GetIsArmToDayMode()); _isArmToDayModeErr != nil { + return errors.Wrap(_isArmToDayModeErr, "Error serializing 'isArmToDayMode' field") + } + // Virtual field + if _isArmToVacationModeErr := writeBuffer.WriteVirtual(ctx, "isArmToVacationMode", m.GetIsArmToVacationMode()); _isArmToVacationModeErr != nil { + return errors.Wrap(_isArmToVacationModeErr, "Error serializing 'isArmToVacationMode' field") + } + // Virtual field + if _isArmToHighestLevelOfProtectionErr := writeBuffer.WriteVirtual(ctx, "isArmToHighestLevelOfProtection", m.GetIsArmToHighestLevelOfProtection()); _isArmToHighestLevelOfProtectionErr != nil { + return errors.Wrap(_isArmToHighestLevelOfProtectionErr, "Error serializing 'isArmToHighestLevelOfProtection' field") + } if popErr := writeBuffer.PopContext("SecurityDataArmSystem"); popErr != nil { return errors.Wrap(popErr, "Error popping for SecurityDataArmSystem") @@ -307,6 +312,7 @@ func (m *_SecurityDataArmSystem) SerializeWithWriteBuffer(ctx context.Context, w return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataArmSystem) isSecurityDataArmSystem() bool { return true } @@ -321,3 +327,6 @@ func (m *_SecurityDataArmSystem) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataCurrentAlarmType.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataCurrentAlarmType.go index c6c13bd26f5..6cd0ddf3efb 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataCurrentAlarmType.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataCurrentAlarmType.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataCurrentAlarmType is the corresponding interface of SecurityDataCurrentAlarmType type SecurityDataCurrentAlarmType interface { @@ -46,6 +48,8 @@ type _SecurityDataCurrentAlarmType struct { *_SecurityData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,19 +60,19 @@ type _SecurityDataCurrentAlarmType struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataCurrentAlarmType) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataCurrentAlarmType) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataCurrentAlarmType) GetParent() SecurityData { +func (m *_SecurityDataCurrentAlarmType) GetParent() SecurityData { return m._SecurityData } + // NewSecurityDataCurrentAlarmType factory function for _SecurityDataCurrentAlarmType -func NewSecurityDataCurrentAlarmType(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataCurrentAlarmType { +func NewSecurityDataCurrentAlarmType( commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataCurrentAlarmType { _result := &_SecurityDataCurrentAlarmType{ - _SecurityData: NewSecurityData(commandTypeContainer, argument), + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -76,7 +80,7 @@ func NewSecurityDataCurrentAlarmType(commandTypeContainer SecurityCommandTypeCon // Deprecated: use the interface for direct cast func CastSecurityDataCurrentAlarmType(structType interface{}) SecurityDataCurrentAlarmType { - if casted, ok := structType.(SecurityDataCurrentAlarmType); ok { + if casted, ok := structType.(SecurityDataCurrentAlarmType); ok { return casted } if casted, ok := structType.(*SecurityDataCurrentAlarmType); ok { @@ -95,6 +99,7 @@ func (m *_SecurityDataCurrentAlarmType) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_SecurityDataCurrentAlarmType) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -118,7 +123,8 @@ func SecurityDataCurrentAlarmTypeParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_SecurityDataCurrentAlarmType{ - _SecurityData: &_SecurityData{}, + _SecurityData: &_SecurityData{ + }, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -148,6 +154,7 @@ func (m *_SecurityDataCurrentAlarmType) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataCurrentAlarmType) isSecurityDataCurrentAlarmType() bool { return true } @@ -162,3 +169,6 @@ func (m *_SecurityDataCurrentAlarmType) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataDisplayMessage.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataDisplayMessage.go index 4c5bb2ce88b..a3141b6c544 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataDisplayMessage.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataDisplayMessage.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataDisplayMessage is the corresponding interface of SecurityDataDisplayMessage type SecurityDataDisplayMessage interface { @@ -46,9 +48,11 @@ type SecurityDataDisplayMessageExactly interface { // _SecurityDataDisplayMessage is the data-structure of this message type _SecurityDataDisplayMessage struct { *_SecurityData - Message string + Message string } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,15 +63,13 @@ type _SecurityDataDisplayMessage struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataDisplayMessage) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataDisplayMessage) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataDisplayMessage) GetParent() SecurityData { +func (m *_SecurityDataDisplayMessage) GetParent() SecurityData { return m._SecurityData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -82,11 +84,12 @@ func (m *_SecurityDataDisplayMessage) GetMessage() string { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSecurityDataDisplayMessage factory function for _SecurityDataDisplayMessage -func NewSecurityDataDisplayMessage(message string, commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataDisplayMessage { +func NewSecurityDataDisplayMessage( message string , commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataDisplayMessage { _result := &_SecurityDataDisplayMessage{ - Message: message, - _SecurityData: NewSecurityData(commandTypeContainer, argument), + Message: message, + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -94,7 +97,7 @@ func NewSecurityDataDisplayMessage(message string, commandTypeContainer Security // Deprecated: use the interface for direct cast func CastSecurityDataDisplayMessage(structType interface{}) SecurityDataDisplayMessage { - if casted, ok := structType.(SecurityDataDisplayMessage); ok { + if casted, ok := structType.(SecurityDataDisplayMessage); ok { return casted } if casted, ok := structType.(*SecurityDataDisplayMessage); ok { @@ -116,6 +119,7 @@ func (m *_SecurityDataDisplayMessage) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_SecurityDataDisplayMessage) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -134,7 +138,7 @@ func SecurityDataDisplayMessageParseWithBuffer(ctx context.Context, readBuffer u _ = currentPos // Simple Field (message) - _message, _messageErr := readBuffer.ReadString("message", uint32(((commandTypeContainer.NumBytes())-(1))*(8)), "UTF-8") +_message, _messageErr := readBuffer.ReadString("message", uint32((((commandTypeContainer.NumBytes()) - ((1)))) * ((8))), "UTF-8") if _messageErr != nil { return nil, errors.Wrap(_messageErr, "Error parsing 'message' field of SecurityDataDisplayMessage") } @@ -146,8 +150,9 @@ func SecurityDataDisplayMessageParseWithBuffer(ctx context.Context, readBuffer u // Create a partially initialized instance _child := &_SecurityDataDisplayMessage{ - _SecurityData: &_SecurityData{}, - Message: message, + _SecurityData: &_SecurityData{ + }, + Message: message, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -169,12 +174,12 @@ func (m *_SecurityDataDisplayMessage) SerializeWithWriteBuffer(ctx context.Conte return errors.Wrap(pushErr, "Error pushing for SecurityDataDisplayMessage") } - // Simple Field (message) - message := string(m.GetMessage()) - _messageErr := writeBuffer.WriteString("message", uint32(((m.GetCommandTypeContainer().NumBytes())-(1))*(8)), "UTF-8", (message)) - if _messageErr != nil { - return errors.Wrap(_messageErr, "Error serializing 'message' field") - } + // Simple Field (message) + message := string(m.GetMessage()) + _messageErr := writeBuffer.WriteString("message", uint32((((m.GetCommandTypeContainer().NumBytes()) - ((1)))) * ((8))), "UTF-8", (message)) + if _messageErr != nil { + return errors.Wrap(_messageErr, "Error serializing 'message' field") + } if popErr := writeBuffer.PopContext("SecurityDataDisplayMessage"); popErr != nil { return errors.Wrap(popErr, "Error popping for SecurityDataDisplayMessage") @@ -184,6 +189,7 @@ func (m *_SecurityDataDisplayMessage) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataDisplayMessage) isSecurityDataDisplayMessage() bool { return true } @@ -198,3 +204,6 @@ func (m *_SecurityDataDisplayMessage) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataDropTamper.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataDropTamper.go index 95e322a262c..22e996420e7 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataDropTamper.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataDropTamper.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataDropTamper is the corresponding interface of SecurityDataDropTamper type SecurityDataDropTamper interface { @@ -46,6 +48,8 @@ type _SecurityDataDropTamper struct { *_SecurityData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,19 +60,19 @@ type _SecurityDataDropTamper struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataDropTamper) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataDropTamper) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataDropTamper) GetParent() SecurityData { +func (m *_SecurityDataDropTamper) GetParent() SecurityData { return m._SecurityData } + // NewSecurityDataDropTamper factory function for _SecurityDataDropTamper -func NewSecurityDataDropTamper(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataDropTamper { +func NewSecurityDataDropTamper( commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataDropTamper { _result := &_SecurityDataDropTamper{ - _SecurityData: NewSecurityData(commandTypeContainer, argument), + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -76,7 +80,7 @@ func NewSecurityDataDropTamper(commandTypeContainer SecurityCommandTypeContainer // Deprecated: use the interface for direct cast func CastSecurityDataDropTamper(structType interface{}) SecurityDataDropTamper { - if casted, ok := structType.(SecurityDataDropTamper); ok { + if casted, ok := structType.(SecurityDataDropTamper); ok { return casted } if casted, ok := structType.(*SecurityDataDropTamper); ok { @@ -95,6 +99,7 @@ func (m *_SecurityDataDropTamper) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_SecurityDataDropTamper) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -118,7 +123,8 @@ func SecurityDataDropTamperParseWithBuffer(ctx context.Context, readBuffer utils // Create a partially initialized instance _child := &_SecurityDataDropTamper{ - _SecurityData: &_SecurityData{}, + _SecurityData: &_SecurityData{ + }, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -148,6 +154,7 @@ func (m *_SecurityDataDropTamper) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataDropTamper) isSecurityDataDropTamper() bool { return true } @@ -162,3 +169,6 @@ func (m *_SecurityDataDropTamper) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataEmulatedKeypad.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataEmulatedKeypad.go index 2f6f9a7e743..c4d6ac3e9a6 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataEmulatedKeypad.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataEmulatedKeypad.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataEmulatedKeypad is the corresponding interface of SecurityDataEmulatedKeypad type SecurityDataEmulatedKeypad interface { @@ -68,9 +70,11 @@ type SecurityDataEmulatedKeypadExactly interface { // _SecurityDataEmulatedKeypad is the data-structure of this message type _SecurityDataEmulatedKeypad struct { *_SecurityData - Key byte + Key byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -81,15 +85,13 @@ type _SecurityDataEmulatedKeypad struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataEmulatedKeypad) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataEmulatedKeypad) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataEmulatedKeypad) GetParent() SecurityData { +func (m *_SecurityDataEmulatedKeypad) GetParent() SecurityData { return m._SecurityData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -179,11 +181,12 @@ func (m *_SecurityDataEmulatedKeypad) GetIsVacation() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSecurityDataEmulatedKeypad factory function for _SecurityDataEmulatedKeypad -func NewSecurityDataEmulatedKeypad(key byte, commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataEmulatedKeypad { +func NewSecurityDataEmulatedKeypad( key byte , commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataEmulatedKeypad { _result := &_SecurityDataEmulatedKeypad{ - Key: key, - _SecurityData: NewSecurityData(commandTypeContainer, argument), + Key: key, + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -191,7 +194,7 @@ func NewSecurityDataEmulatedKeypad(key byte, commandTypeContainer SecurityComman // Deprecated: use the interface for direct cast func CastSecurityDataEmulatedKeypad(structType interface{}) SecurityDataEmulatedKeypad { - if casted, ok := structType.(SecurityDataEmulatedKeypad); ok { + if casted, ok := structType.(SecurityDataEmulatedKeypad); ok { return casted } if casted, ok := structType.(*SecurityDataEmulatedKeypad); ok { @@ -208,7 +211,7 @@ func (m *_SecurityDataEmulatedKeypad) GetLengthInBits(ctx context.Context) uint1 lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (key) - lengthInBits += 8 + lengthInBits += 8; // A virtual field doesn't have any in- or output. @@ -235,6 +238,7 @@ func (m *_SecurityDataEmulatedKeypad) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_SecurityDataEmulatedKeypad) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -253,7 +257,7 @@ func SecurityDataEmulatedKeypadParseWithBuffer(ctx context.Context, readBuffer u _ = currentPos // Simple Field (key) - _key, _keyErr := readBuffer.ReadByte("key") +_key, _keyErr := readBuffer.ReadByte("key") if _keyErr != nil { return nil, errors.Wrap(_keyErr, "Error parsing 'key' field of SecurityDataEmulatedKeypad") } @@ -320,8 +324,9 @@ func SecurityDataEmulatedKeypadParseWithBuffer(ctx context.Context, readBuffer u // Create a partially initialized instance _child := &_SecurityDataEmulatedKeypad{ - _SecurityData: &_SecurityData{}, - Key: key, + _SecurityData: &_SecurityData{ + }, + Key: key, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -343,56 +348,56 @@ func (m *_SecurityDataEmulatedKeypad) SerializeWithWriteBuffer(ctx context.Conte return errors.Wrap(pushErr, "Error pushing for SecurityDataEmulatedKeypad") } - // Simple Field (key) - key := byte(m.GetKey()) - _keyErr := writeBuffer.WriteByte("key", (key)) - if _keyErr != nil { - return errors.Wrap(_keyErr, "Error serializing 'key' field") - } - // Virtual field - if _isAsciiErr := writeBuffer.WriteVirtual(ctx, "isAscii", m.GetIsAscii()); _isAsciiErr != nil { - return errors.Wrap(_isAsciiErr, "Error serializing 'isAscii' field") - } - // Virtual field - if _isCustomErr := writeBuffer.WriteVirtual(ctx, "isCustom", m.GetIsCustom()); _isCustomErr != nil { - return errors.Wrap(_isCustomErr, "Error serializing 'isCustom' field") - } - // Virtual field - if _isEnterErr := writeBuffer.WriteVirtual(ctx, "isEnter", m.GetIsEnter()); _isEnterErr != nil { - return errors.Wrap(_isEnterErr, "Error serializing 'isEnter' field") - } - // Virtual field - if _isShiftErr := writeBuffer.WriteVirtual(ctx, "isShift", m.GetIsShift()); _isShiftErr != nil { - return errors.Wrap(_isShiftErr, "Error serializing 'isShift' field") - } - // Virtual field - if _isPanicErr := writeBuffer.WriteVirtual(ctx, "isPanic", m.GetIsPanic()); _isPanicErr != nil { - return errors.Wrap(_isPanicErr, "Error serializing 'isPanic' field") - } - // Virtual field - if _isFireErr := writeBuffer.WriteVirtual(ctx, "isFire", m.GetIsFire()); _isFireErr != nil { - return errors.Wrap(_isFireErr, "Error serializing 'isFire' field") - } - // Virtual field - if _isARMErr := writeBuffer.WriteVirtual(ctx, "isARM", m.GetIsARM()); _isARMErr != nil { - return errors.Wrap(_isARMErr, "Error serializing 'isARM' field") - } - // Virtual field - if _isAwayErr := writeBuffer.WriteVirtual(ctx, "isAway", m.GetIsAway()); _isAwayErr != nil { - return errors.Wrap(_isAwayErr, "Error serializing 'isAway' field") - } - // Virtual field - if _isNightErr := writeBuffer.WriteVirtual(ctx, "isNight", m.GetIsNight()); _isNightErr != nil { - return errors.Wrap(_isNightErr, "Error serializing 'isNight' field") - } - // Virtual field - if _isDayErr := writeBuffer.WriteVirtual(ctx, "isDay", m.GetIsDay()); _isDayErr != nil { - return errors.Wrap(_isDayErr, "Error serializing 'isDay' field") - } - // Virtual field - if _isVacationErr := writeBuffer.WriteVirtual(ctx, "isVacation", m.GetIsVacation()); _isVacationErr != nil { - return errors.Wrap(_isVacationErr, "Error serializing 'isVacation' field") - } + // Simple Field (key) + key := byte(m.GetKey()) + _keyErr := writeBuffer.WriteByte("key", (key)) + if _keyErr != nil { + return errors.Wrap(_keyErr, "Error serializing 'key' field") + } + // Virtual field + if _isAsciiErr := writeBuffer.WriteVirtual(ctx, "isAscii", m.GetIsAscii()); _isAsciiErr != nil { + return errors.Wrap(_isAsciiErr, "Error serializing 'isAscii' field") + } + // Virtual field + if _isCustomErr := writeBuffer.WriteVirtual(ctx, "isCustom", m.GetIsCustom()); _isCustomErr != nil { + return errors.Wrap(_isCustomErr, "Error serializing 'isCustom' field") + } + // Virtual field + if _isEnterErr := writeBuffer.WriteVirtual(ctx, "isEnter", m.GetIsEnter()); _isEnterErr != nil { + return errors.Wrap(_isEnterErr, "Error serializing 'isEnter' field") + } + // Virtual field + if _isShiftErr := writeBuffer.WriteVirtual(ctx, "isShift", m.GetIsShift()); _isShiftErr != nil { + return errors.Wrap(_isShiftErr, "Error serializing 'isShift' field") + } + // Virtual field + if _isPanicErr := writeBuffer.WriteVirtual(ctx, "isPanic", m.GetIsPanic()); _isPanicErr != nil { + return errors.Wrap(_isPanicErr, "Error serializing 'isPanic' field") + } + // Virtual field + if _isFireErr := writeBuffer.WriteVirtual(ctx, "isFire", m.GetIsFire()); _isFireErr != nil { + return errors.Wrap(_isFireErr, "Error serializing 'isFire' field") + } + // Virtual field + if _isARMErr := writeBuffer.WriteVirtual(ctx, "isARM", m.GetIsARM()); _isARMErr != nil { + return errors.Wrap(_isARMErr, "Error serializing 'isARM' field") + } + // Virtual field + if _isAwayErr := writeBuffer.WriteVirtual(ctx, "isAway", m.GetIsAway()); _isAwayErr != nil { + return errors.Wrap(_isAwayErr, "Error serializing 'isAway' field") + } + // Virtual field + if _isNightErr := writeBuffer.WriteVirtual(ctx, "isNight", m.GetIsNight()); _isNightErr != nil { + return errors.Wrap(_isNightErr, "Error serializing 'isNight' field") + } + // Virtual field + if _isDayErr := writeBuffer.WriteVirtual(ctx, "isDay", m.GetIsDay()); _isDayErr != nil { + return errors.Wrap(_isDayErr, "Error serializing 'isDay' field") + } + // Virtual field + if _isVacationErr := writeBuffer.WriteVirtual(ctx, "isVacation", m.GetIsVacation()); _isVacationErr != nil { + return errors.Wrap(_isVacationErr, "Error serializing 'isVacation' field") + } if popErr := writeBuffer.PopContext("SecurityDataEmulatedKeypad"); popErr != nil { return errors.Wrap(popErr, "Error popping for SecurityDataEmulatedKeypad") @@ -402,6 +407,7 @@ func (m *_SecurityDataEmulatedKeypad) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataEmulatedKeypad) isSecurityDataEmulatedKeypad() bool { return true } @@ -416,3 +422,6 @@ func (m *_SecurityDataEmulatedKeypad) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataEntryDelayStarted.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataEntryDelayStarted.go index e002a3cc8ba..d7d5afdd4e0 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataEntryDelayStarted.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataEntryDelayStarted.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataEntryDelayStarted is the corresponding interface of SecurityDataEntryDelayStarted type SecurityDataEntryDelayStarted interface { @@ -46,6 +48,8 @@ type _SecurityDataEntryDelayStarted struct { *_SecurityData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,19 +60,19 @@ type _SecurityDataEntryDelayStarted struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataEntryDelayStarted) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataEntryDelayStarted) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataEntryDelayStarted) GetParent() SecurityData { +func (m *_SecurityDataEntryDelayStarted) GetParent() SecurityData { return m._SecurityData } + // NewSecurityDataEntryDelayStarted factory function for _SecurityDataEntryDelayStarted -func NewSecurityDataEntryDelayStarted(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataEntryDelayStarted { +func NewSecurityDataEntryDelayStarted( commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataEntryDelayStarted { _result := &_SecurityDataEntryDelayStarted{ - _SecurityData: NewSecurityData(commandTypeContainer, argument), + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -76,7 +80,7 @@ func NewSecurityDataEntryDelayStarted(commandTypeContainer SecurityCommandTypeCo // Deprecated: use the interface for direct cast func CastSecurityDataEntryDelayStarted(structType interface{}) SecurityDataEntryDelayStarted { - if casted, ok := structType.(SecurityDataEntryDelayStarted); ok { + if casted, ok := structType.(SecurityDataEntryDelayStarted); ok { return casted } if casted, ok := structType.(*SecurityDataEntryDelayStarted); ok { @@ -95,6 +99,7 @@ func (m *_SecurityDataEntryDelayStarted) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_SecurityDataEntryDelayStarted) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -118,7 +123,8 @@ func SecurityDataEntryDelayStartedParseWithBuffer(ctx context.Context, readBuffe // Create a partially initialized instance _child := &_SecurityDataEntryDelayStarted{ - _SecurityData: &_SecurityData{}, + _SecurityData: &_SecurityData{ + }, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -148,6 +154,7 @@ func (m *_SecurityDataEntryDelayStarted) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataEntryDelayStarted) isSecurityDataEntryDelayStarted() bool { return true } @@ -162,3 +169,6 @@ func (m *_SecurityDataEntryDelayStarted) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataEvent.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataEvent.go index dae41caadf6..60d13c40e1c 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataEvent.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataEvent.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataEvent is the corresponding interface of SecurityDataEvent type SecurityDataEvent interface { @@ -46,9 +48,11 @@ type SecurityDataEventExactly interface { // _SecurityDataEvent is the data-structure of this message type _SecurityDataEvent struct { *_SecurityData - Data []byte + Data []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,15 +63,13 @@ type _SecurityDataEvent struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataEvent) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataEvent) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataEvent) GetParent() SecurityData { +func (m *_SecurityDataEvent) GetParent() SecurityData { return m._SecurityData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -82,11 +84,12 @@ func (m *_SecurityDataEvent) GetData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSecurityDataEvent factory function for _SecurityDataEvent -func NewSecurityDataEvent(data []byte, commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataEvent { +func NewSecurityDataEvent( data []byte , commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataEvent { _result := &_SecurityDataEvent{ - Data: data, - _SecurityData: NewSecurityData(commandTypeContainer, argument), + Data: data, + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -94,7 +97,7 @@ func NewSecurityDataEvent(data []byte, commandTypeContainer SecurityCommandTypeC // Deprecated: use the interface for direct cast func CastSecurityDataEvent(structType interface{}) SecurityDataEvent { - if casted, ok := structType.(SecurityDataEvent); ok { + if casted, ok := structType.(SecurityDataEvent); ok { return casted } if casted, ok := structType.(*SecurityDataEvent); ok { @@ -118,6 +121,7 @@ func (m *_SecurityDataEvent) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_SecurityDataEvent) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -147,8 +151,9 @@ func SecurityDataEventParseWithBuffer(ctx context.Context, readBuffer utils.Read // Create a partially initialized instance _child := &_SecurityDataEvent{ - _SecurityData: &_SecurityData{}, - Data: data, + _SecurityData: &_SecurityData{ + }, + Data: data, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -170,11 +175,11 @@ func (m *_SecurityDataEvent) SerializeWithWriteBuffer(ctx context.Context, write return errors.Wrap(pushErr, "Error pushing for SecurityDataEvent") } - // Array Field (data) - // Byte Array field (data) - if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { - return errors.Wrap(err, "Error serializing 'data' field") - } + // Array Field (data) + // Byte Array field (data) + if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { + return errors.Wrap(err, "Error serializing 'data' field") + } if popErr := writeBuffer.PopContext("SecurityDataEvent"); popErr != nil { return errors.Wrap(popErr, "Error popping for SecurityDataEvent") @@ -184,6 +189,7 @@ func (m *_SecurityDataEvent) SerializeWithWriteBuffer(ctx context.Context, write return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataEvent) isSecurityDataEvent() bool { return true } @@ -198,3 +204,6 @@ func (m *_SecurityDataEvent) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataExitDelayStarted.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataExitDelayStarted.go index 0e066a8bd8a..ba9c63a2767 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataExitDelayStarted.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataExitDelayStarted.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataExitDelayStarted is the corresponding interface of SecurityDataExitDelayStarted type SecurityDataExitDelayStarted interface { @@ -46,6 +48,8 @@ type _SecurityDataExitDelayStarted struct { *_SecurityData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,19 +60,19 @@ type _SecurityDataExitDelayStarted struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataExitDelayStarted) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataExitDelayStarted) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataExitDelayStarted) GetParent() SecurityData { +func (m *_SecurityDataExitDelayStarted) GetParent() SecurityData { return m._SecurityData } + // NewSecurityDataExitDelayStarted factory function for _SecurityDataExitDelayStarted -func NewSecurityDataExitDelayStarted(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataExitDelayStarted { +func NewSecurityDataExitDelayStarted( commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataExitDelayStarted { _result := &_SecurityDataExitDelayStarted{ - _SecurityData: NewSecurityData(commandTypeContainer, argument), + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -76,7 +80,7 @@ func NewSecurityDataExitDelayStarted(commandTypeContainer SecurityCommandTypeCon // Deprecated: use the interface for direct cast func CastSecurityDataExitDelayStarted(structType interface{}) SecurityDataExitDelayStarted { - if casted, ok := structType.(SecurityDataExitDelayStarted); ok { + if casted, ok := structType.(SecurityDataExitDelayStarted); ok { return casted } if casted, ok := structType.(*SecurityDataExitDelayStarted); ok { @@ -95,6 +99,7 @@ func (m *_SecurityDataExitDelayStarted) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_SecurityDataExitDelayStarted) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -118,7 +123,8 @@ func SecurityDataExitDelayStartedParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_SecurityDataExitDelayStarted{ - _SecurityData: &_SecurityData{}, + _SecurityData: &_SecurityData{ + }, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -148,6 +154,7 @@ func (m *_SecurityDataExitDelayStarted) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataExitDelayStarted) isSecurityDataExitDelayStarted() bool { return true } @@ -162,3 +169,6 @@ func (m *_SecurityDataExitDelayStarted) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataFireAlarmCleared.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataFireAlarmCleared.go index 62100781bfe..c28da3a954a 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataFireAlarmCleared.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataFireAlarmCleared.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataFireAlarmCleared is the corresponding interface of SecurityDataFireAlarmCleared type SecurityDataFireAlarmCleared interface { @@ -46,6 +48,8 @@ type _SecurityDataFireAlarmCleared struct { *_SecurityData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,19 +60,19 @@ type _SecurityDataFireAlarmCleared struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataFireAlarmCleared) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataFireAlarmCleared) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataFireAlarmCleared) GetParent() SecurityData { +func (m *_SecurityDataFireAlarmCleared) GetParent() SecurityData { return m._SecurityData } + // NewSecurityDataFireAlarmCleared factory function for _SecurityDataFireAlarmCleared -func NewSecurityDataFireAlarmCleared(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataFireAlarmCleared { +func NewSecurityDataFireAlarmCleared( commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataFireAlarmCleared { _result := &_SecurityDataFireAlarmCleared{ - _SecurityData: NewSecurityData(commandTypeContainer, argument), + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -76,7 +80,7 @@ func NewSecurityDataFireAlarmCleared(commandTypeContainer SecurityCommandTypeCon // Deprecated: use the interface for direct cast func CastSecurityDataFireAlarmCleared(structType interface{}) SecurityDataFireAlarmCleared { - if casted, ok := structType.(SecurityDataFireAlarmCleared); ok { + if casted, ok := structType.(SecurityDataFireAlarmCleared); ok { return casted } if casted, ok := structType.(*SecurityDataFireAlarmCleared); ok { @@ -95,6 +99,7 @@ func (m *_SecurityDataFireAlarmCleared) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_SecurityDataFireAlarmCleared) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -118,7 +123,8 @@ func SecurityDataFireAlarmClearedParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_SecurityDataFireAlarmCleared{ - _SecurityData: &_SecurityData{}, + _SecurityData: &_SecurityData{ + }, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -148,6 +154,7 @@ func (m *_SecurityDataFireAlarmCleared) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataFireAlarmCleared) isSecurityDataFireAlarmCleared() bool { return true } @@ -162,3 +169,6 @@ func (m *_SecurityDataFireAlarmCleared) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataFireAlarmRaised.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataFireAlarmRaised.go index 8af7c04edfe..cc5fec42b19 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataFireAlarmRaised.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataFireAlarmRaised.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataFireAlarmRaised is the corresponding interface of SecurityDataFireAlarmRaised type SecurityDataFireAlarmRaised interface { @@ -46,6 +48,8 @@ type _SecurityDataFireAlarmRaised struct { *_SecurityData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,19 +60,19 @@ type _SecurityDataFireAlarmRaised struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataFireAlarmRaised) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataFireAlarmRaised) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataFireAlarmRaised) GetParent() SecurityData { +func (m *_SecurityDataFireAlarmRaised) GetParent() SecurityData { return m._SecurityData } + // NewSecurityDataFireAlarmRaised factory function for _SecurityDataFireAlarmRaised -func NewSecurityDataFireAlarmRaised(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataFireAlarmRaised { +func NewSecurityDataFireAlarmRaised( commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataFireAlarmRaised { _result := &_SecurityDataFireAlarmRaised{ - _SecurityData: NewSecurityData(commandTypeContainer, argument), + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -76,7 +80,7 @@ func NewSecurityDataFireAlarmRaised(commandTypeContainer SecurityCommandTypeCont // Deprecated: use the interface for direct cast func CastSecurityDataFireAlarmRaised(structType interface{}) SecurityDataFireAlarmRaised { - if casted, ok := structType.(SecurityDataFireAlarmRaised); ok { + if casted, ok := structType.(SecurityDataFireAlarmRaised); ok { return casted } if casted, ok := structType.(*SecurityDataFireAlarmRaised); ok { @@ -95,6 +99,7 @@ func (m *_SecurityDataFireAlarmRaised) GetLengthInBits(ctx context.Context) uint return lengthInBits } + func (m *_SecurityDataFireAlarmRaised) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -118,7 +123,8 @@ func SecurityDataFireAlarmRaisedParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_SecurityDataFireAlarmRaised{ - _SecurityData: &_SecurityData{}, + _SecurityData: &_SecurityData{ + }, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -148,6 +154,7 @@ func (m *_SecurityDataFireAlarmRaised) SerializeWithWriteBuffer(ctx context.Cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataFireAlarmRaised) isSecurityDataFireAlarmRaised() bool { return true } @@ -162,3 +169,6 @@ func (m *_SecurityDataFireAlarmRaised) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataGasAlarmCleared.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataGasAlarmCleared.go index 1131366dad2..44db7b26393 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataGasAlarmCleared.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataGasAlarmCleared.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataGasAlarmCleared is the corresponding interface of SecurityDataGasAlarmCleared type SecurityDataGasAlarmCleared interface { @@ -46,6 +48,8 @@ type _SecurityDataGasAlarmCleared struct { *_SecurityData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,19 +60,19 @@ type _SecurityDataGasAlarmCleared struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataGasAlarmCleared) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataGasAlarmCleared) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataGasAlarmCleared) GetParent() SecurityData { +func (m *_SecurityDataGasAlarmCleared) GetParent() SecurityData { return m._SecurityData } + // NewSecurityDataGasAlarmCleared factory function for _SecurityDataGasAlarmCleared -func NewSecurityDataGasAlarmCleared(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataGasAlarmCleared { +func NewSecurityDataGasAlarmCleared( commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataGasAlarmCleared { _result := &_SecurityDataGasAlarmCleared{ - _SecurityData: NewSecurityData(commandTypeContainer, argument), + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -76,7 +80,7 @@ func NewSecurityDataGasAlarmCleared(commandTypeContainer SecurityCommandTypeCont // Deprecated: use the interface for direct cast func CastSecurityDataGasAlarmCleared(structType interface{}) SecurityDataGasAlarmCleared { - if casted, ok := structType.(SecurityDataGasAlarmCleared); ok { + if casted, ok := structType.(SecurityDataGasAlarmCleared); ok { return casted } if casted, ok := structType.(*SecurityDataGasAlarmCleared); ok { @@ -95,6 +99,7 @@ func (m *_SecurityDataGasAlarmCleared) GetLengthInBits(ctx context.Context) uint return lengthInBits } + func (m *_SecurityDataGasAlarmCleared) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -118,7 +123,8 @@ func SecurityDataGasAlarmClearedParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_SecurityDataGasAlarmCleared{ - _SecurityData: &_SecurityData{}, + _SecurityData: &_SecurityData{ + }, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -148,6 +154,7 @@ func (m *_SecurityDataGasAlarmCleared) SerializeWithWriteBuffer(ctx context.Cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataGasAlarmCleared) isSecurityDataGasAlarmCleared() bool { return true } @@ -162,3 +169,6 @@ func (m *_SecurityDataGasAlarmCleared) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataGasAlarmRaised.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataGasAlarmRaised.go index 32b793bd85a..7f209d697fc 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataGasAlarmRaised.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataGasAlarmRaised.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataGasAlarmRaised is the corresponding interface of SecurityDataGasAlarmRaised type SecurityDataGasAlarmRaised interface { @@ -46,6 +48,8 @@ type _SecurityDataGasAlarmRaised struct { *_SecurityData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,19 +60,19 @@ type _SecurityDataGasAlarmRaised struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataGasAlarmRaised) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataGasAlarmRaised) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataGasAlarmRaised) GetParent() SecurityData { +func (m *_SecurityDataGasAlarmRaised) GetParent() SecurityData { return m._SecurityData } + // NewSecurityDataGasAlarmRaised factory function for _SecurityDataGasAlarmRaised -func NewSecurityDataGasAlarmRaised(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataGasAlarmRaised { +func NewSecurityDataGasAlarmRaised( commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataGasAlarmRaised { _result := &_SecurityDataGasAlarmRaised{ - _SecurityData: NewSecurityData(commandTypeContainer, argument), + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -76,7 +80,7 @@ func NewSecurityDataGasAlarmRaised(commandTypeContainer SecurityCommandTypeConta // Deprecated: use the interface for direct cast func CastSecurityDataGasAlarmRaised(structType interface{}) SecurityDataGasAlarmRaised { - if casted, ok := structType.(SecurityDataGasAlarmRaised); ok { + if casted, ok := structType.(SecurityDataGasAlarmRaised); ok { return casted } if casted, ok := structType.(*SecurityDataGasAlarmRaised); ok { @@ -95,6 +99,7 @@ func (m *_SecurityDataGasAlarmRaised) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_SecurityDataGasAlarmRaised) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -118,7 +123,8 @@ func SecurityDataGasAlarmRaisedParseWithBuffer(ctx context.Context, readBuffer u // Create a partially initialized instance _child := &_SecurityDataGasAlarmRaised{ - _SecurityData: &_SecurityData{}, + _SecurityData: &_SecurityData{ + }, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -148,6 +154,7 @@ func (m *_SecurityDataGasAlarmRaised) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataGasAlarmRaised) isSecurityDataGasAlarmRaised() bool { return true } @@ -162,3 +169,6 @@ func (m *_SecurityDataGasAlarmRaised) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataLineCutAlarmCleared.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataLineCutAlarmCleared.go index d4bb2589df8..63c5278b30a 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataLineCutAlarmCleared.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataLineCutAlarmCleared.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataLineCutAlarmCleared is the corresponding interface of SecurityDataLineCutAlarmCleared type SecurityDataLineCutAlarmCleared interface { @@ -46,6 +48,8 @@ type _SecurityDataLineCutAlarmCleared struct { *_SecurityData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,19 +60,19 @@ type _SecurityDataLineCutAlarmCleared struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataLineCutAlarmCleared) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataLineCutAlarmCleared) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataLineCutAlarmCleared) GetParent() SecurityData { +func (m *_SecurityDataLineCutAlarmCleared) GetParent() SecurityData { return m._SecurityData } + // NewSecurityDataLineCutAlarmCleared factory function for _SecurityDataLineCutAlarmCleared -func NewSecurityDataLineCutAlarmCleared(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataLineCutAlarmCleared { +func NewSecurityDataLineCutAlarmCleared( commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataLineCutAlarmCleared { _result := &_SecurityDataLineCutAlarmCleared{ - _SecurityData: NewSecurityData(commandTypeContainer, argument), + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -76,7 +80,7 @@ func NewSecurityDataLineCutAlarmCleared(commandTypeContainer SecurityCommandType // Deprecated: use the interface for direct cast func CastSecurityDataLineCutAlarmCleared(structType interface{}) SecurityDataLineCutAlarmCleared { - if casted, ok := structType.(SecurityDataLineCutAlarmCleared); ok { + if casted, ok := structType.(SecurityDataLineCutAlarmCleared); ok { return casted } if casted, ok := structType.(*SecurityDataLineCutAlarmCleared); ok { @@ -95,6 +99,7 @@ func (m *_SecurityDataLineCutAlarmCleared) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_SecurityDataLineCutAlarmCleared) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -118,7 +123,8 @@ func SecurityDataLineCutAlarmClearedParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_SecurityDataLineCutAlarmCleared{ - _SecurityData: &_SecurityData{}, + _SecurityData: &_SecurityData{ + }, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -148,6 +154,7 @@ func (m *_SecurityDataLineCutAlarmCleared) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataLineCutAlarmCleared) isSecurityDataLineCutAlarmCleared() bool { return true } @@ -162,3 +169,6 @@ func (m *_SecurityDataLineCutAlarmCleared) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataLineCutAlarmRaised.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataLineCutAlarmRaised.go index 47360ac4529..19971e3383c 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataLineCutAlarmRaised.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataLineCutAlarmRaised.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataLineCutAlarmRaised is the corresponding interface of SecurityDataLineCutAlarmRaised type SecurityDataLineCutAlarmRaised interface { @@ -46,6 +48,8 @@ type _SecurityDataLineCutAlarmRaised struct { *_SecurityData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,19 +60,19 @@ type _SecurityDataLineCutAlarmRaised struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataLineCutAlarmRaised) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataLineCutAlarmRaised) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataLineCutAlarmRaised) GetParent() SecurityData { +func (m *_SecurityDataLineCutAlarmRaised) GetParent() SecurityData { return m._SecurityData } + // NewSecurityDataLineCutAlarmRaised factory function for _SecurityDataLineCutAlarmRaised -func NewSecurityDataLineCutAlarmRaised(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataLineCutAlarmRaised { +func NewSecurityDataLineCutAlarmRaised( commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataLineCutAlarmRaised { _result := &_SecurityDataLineCutAlarmRaised{ - _SecurityData: NewSecurityData(commandTypeContainer, argument), + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -76,7 +80,7 @@ func NewSecurityDataLineCutAlarmRaised(commandTypeContainer SecurityCommandTypeC // Deprecated: use the interface for direct cast func CastSecurityDataLineCutAlarmRaised(structType interface{}) SecurityDataLineCutAlarmRaised { - if casted, ok := structType.(SecurityDataLineCutAlarmRaised); ok { + if casted, ok := structType.(SecurityDataLineCutAlarmRaised); ok { return casted } if casted, ok := structType.(*SecurityDataLineCutAlarmRaised); ok { @@ -95,6 +99,7 @@ func (m *_SecurityDataLineCutAlarmRaised) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_SecurityDataLineCutAlarmRaised) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -118,7 +123,8 @@ func SecurityDataLineCutAlarmRaisedParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_SecurityDataLineCutAlarmRaised{ - _SecurityData: &_SecurityData{}, + _SecurityData: &_SecurityData{ + }, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -148,6 +154,7 @@ func (m *_SecurityDataLineCutAlarmRaised) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataLineCutAlarmRaised) isSecurityDataLineCutAlarmRaised() bool { return true } @@ -162,3 +169,6 @@ func (m *_SecurityDataLineCutAlarmRaised) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataLowBatteryCharging.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataLowBatteryCharging.go index 98f0accb49e..f98c99bdf94 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataLowBatteryCharging.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataLowBatteryCharging.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataLowBatteryCharging is the corresponding interface of SecurityDataLowBatteryCharging type SecurityDataLowBatteryCharging interface { @@ -50,9 +52,11 @@ type SecurityDataLowBatteryChargingExactly interface { // _SecurityDataLowBatteryCharging is the data-structure of this message type _SecurityDataLowBatteryCharging struct { *_SecurityData - StartStop byte + StartStop byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -63,15 +67,13 @@ type _SecurityDataLowBatteryCharging struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataLowBatteryCharging) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataLowBatteryCharging) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataLowBatteryCharging) GetParent() SecurityData { +func (m *_SecurityDataLowBatteryCharging) GetParent() SecurityData { return m._SecurityData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -107,11 +109,12 @@ func (m *_SecurityDataLowBatteryCharging) GetChargeStarted() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSecurityDataLowBatteryCharging factory function for _SecurityDataLowBatteryCharging -func NewSecurityDataLowBatteryCharging(startStop byte, commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataLowBatteryCharging { +func NewSecurityDataLowBatteryCharging( startStop byte , commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataLowBatteryCharging { _result := &_SecurityDataLowBatteryCharging{ - StartStop: startStop, - _SecurityData: NewSecurityData(commandTypeContainer, argument), + StartStop: startStop, + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -119,7 +122,7 @@ func NewSecurityDataLowBatteryCharging(startStop byte, commandTypeContainer Secu // Deprecated: use the interface for direct cast func CastSecurityDataLowBatteryCharging(structType interface{}) SecurityDataLowBatteryCharging { - if casted, ok := structType.(SecurityDataLowBatteryCharging); ok { + if casted, ok := structType.(SecurityDataLowBatteryCharging); ok { return casted } if casted, ok := structType.(*SecurityDataLowBatteryCharging); ok { @@ -136,7 +139,7 @@ func (m *_SecurityDataLowBatteryCharging) GetLengthInBits(ctx context.Context) u lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (startStop) - lengthInBits += 8 + lengthInBits += 8; // A virtual field doesn't have any in- or output. @@ -145,6 +148,7 @@ func (m *_SecurityDataLowBatteryCharging) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_SecurityDataLowBatteryCharging) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -163,7 +167,7 @@ func SecurityDataLowBatteryChargingParseWithBuffer(ctx context.Context, readBuff _ = currentPos // Simple Field (startStop) - _startStop, _startStopErr := readBuffer.ReadByte("startStop") +_startStop, _startStopErr := readBuffer.ReadByte("startStop") if _startStopErr != nil { return nil, errors.Wrap(_startStopErr, "Error parsing 'startStop' field of SecurityDataLowBatteryCharging") } @@ -185,8 +189,9 @@ func SecurityDataLowBatteryChargingParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_SecurityDataLowBatteryCharging{ - _SecurityData: &_SecurityData{}, - StartStop: startStop, + _SecurityData: &_SecurityData{ + }, + StartStop: startStop, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -208,20 +213,20 @@ func (m *_SecurityDataLowBatteryCharging) SerializeWithWriteBuffer(ctx context.C return errors.Wrap(pushErr, "Error pushing for SecurityDataLowBatteryCharging") } - // Simple Field (startStop) - startStop := byte(m.GetStartStop()) - _startStopErr := writeBuffer.WriteByte("startStop", (startStop)) - if _startStopErr != nil { - return errors.Wrap(_startStopErr, "Error serializing 'startStop' field") - } - // Virtual field - if _chargeStoppedErr := writeBuffer.WriteVirtual(ctx, "chargeStopped", m.GetChargeStopped()); _chargeStoppedErr != nil { - return errors.Wrap(_chargeStoppedErr, "Error serializing 'chargeStopped' field") - } - // Virtual field - if _chargeStartedErr := writeBuffer.WriteVirtual(ctx, "chargeStarted", m.GetChargeStarted()); _chargeStartedErr != nil { - return errors.Wrap(_chargeStartedErr, "Error serializing 'chargeStarted' field") - } + // Simple Field (startStop) + startStop := byte(m.GetStartStop()) + _startStopErr := writeBuffer.WriteByte("startStop", (startStop)) + if _startStopErr != nil { + return errors.Wrap(_startStopErr, "Error serializing 'startStop' field") + } + // Virtual field + if _chargeStoppedErr := writeBuffer.WriteVirtual(ctx, "chargeStopped", m.GetChargeStopped()); _chargeStoppedErr != nil { + return errors.Wrap(_chargeStoppedErr, "Error serializing 'chargeStopped' field") + } + // Virtual field + if _chargeStartedErr := writeBuffer.WriteVirtual(ctx, "chargeStarted", m.GetChargeStarted()); _chargeStartedErr != nil { + return errors.Wrap(_chargeStartedErr, "Error serializing 'chargeStarted' field") + } if popErr := writeBuffer.PopContext("SecurityDataLowBatteryCharging"); popErr != nil { return errors.Wrap(popErr, "Error popping for SecurityDataLowBatteryCharging") @@ -231,6 +236,7 @@ func (m *_SecurityDataLowBatteryCharging) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataLowBatteryCharging) isSecurityDataLowBatteryCharging() bool { return true } @@ -245,3 +251,6 @@ func (m *_SecurityDataLowBatteryCharging) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataLowBatteryCorrected.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataLowBatteryCorrected.go index 0de5dd5b329..02f3bb2d3a2 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataLowBatteryCorrected.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataLowBatteryCorrected.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataLowBatteryCorrected is the corresponding interface of SecurityDataLowBatteryCorrected type SecurityDataLowBatteryCorrected interface { @@ -46,6 +48,8 @@ type _SecurityDataLowBatteryCorrected struct { *_SecurityData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,19 +60,19 @@ type _SecurityDataLowBatteryCorrected struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataLowBatteryCorrected) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataLowBatteryCorrected) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataLowBatteryCorrected) GetParent() SecurityData { +func (m *_SecurityDataLowBatteryCorrected) GetParent() SecurityData { return m._SecurityData } + // NewSecurityDataLowBatteryCorrected factory function for _SecurityDataLowBatteryCorrected -func NewSecurityDataLowBatteryCorrected(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataLowBatteryCorrected { +func NewSecurityDataLowBatteryCorrected( commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataLowBatteryCorrected { _result := &_SecurityDataLowBatteryCorrected{ - _SecurityData: NewSecurityData(commandTypeContainer, argument), + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -76,7 +80,7 @@ func NewSecurityDataLowBatteryCorrected(commandTypeContainer SecurityCommandType // Deprecated: use the interface for direct cast func CastSecurityDataLowBatteryCorrected(structType interface{}) SecurityDataLowBatteryCorrected { - if casted, ok := structType.(SecurityDataLowBatteryCorrected); ok { + if casted, ok := structType.(SecurityDataLowBatteryCorrected); ok { return casted } if casted, ok := structType.(*SecurityDataLowBatteryCorrected); ok { @@ -95,6 +99,7 @@ func (m *_SecurityDataLowBatteryCorrected) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_SecurityDataLowBatteryCorrected) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -118,7 +123,8 @@ func SecurityDataLowBatteryCorrectedParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_SecurityDataLowBatteryCorrected{ - _SecurityData: &_SecurityData{}, + _SecurityData: &_SecurityData{ + }, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -148,6 +154,7 @@ func (m *_SecurityDataLowBatteryCorrected) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataLowBatteryCorrected) isSecurityDataLowBatteryCorrected() bool { return true } @@ -162,3 +169,6 @@ func (m *_SecurityDataLowBatteryCorrected) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataLowBatteryDetected.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataLowBatteryDetected.go index a1537e1b70f..520b59328c8 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataLowBatteryDetected.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataLowBatteryDetected.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataLowBatteryDetected is the corresponding interface of SecurityDataLowBatteryDetected type SecurityDataLowBatteryDetected interface { @@ -46,6 +48,8 @@ type _SecurityDataLowBatteryDetected struct { *_SecurityData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,19 +60,19 @@ type _SecurityDataLowBatteryDetected struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataLowBatteryDetected) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataLowBatteryDetected) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataLowBatteryDetected) GetParent() SecurityData { +func (m *_SecurityDataLowBatteryDetected) GetParent() SecurityData { return m._SecurityData } + // NewSecurityDataLowBatteryDetected factory function for _SecurityDataLowBatteryDetected -func NewSecurityDataLowBatteryDetected(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataLowBatteryDetected { +func NewSecurityDataLowBatteryDetected( commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataLowBatteryDetected { _result := &_SecurityDataLowBatteryDetected{ - _SecurityData: NewSecurityData(commandTypeContainer, argument), + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -76,7 +80,7 @@ func NewSecurityDataLowBatteryDetected(commandTypeContainer SecurityCommandTypeC // Deprecated: use the interface for direct cast func CastSecurityDataLowBatteryDetected(structType interface{}) SecurityDataLowBatteryDetected { - if casted, ok := structType.(SecurityDataLowBatteryDetected); ok { + if casted, ok := structType.(SecurityDataLowBatteryDetected); ok { return casted } if casted, ok := structType.(*SecurityDataLowBatteryDetected); ok { @@ -95,6 +99,7 @@ func (m *_SecurityDataLowBatteryDetected) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_SecurityDataLowBatteryDetected) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -118,7 +123,8 @@ func SecurityDataLowBatteryDetectedParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_SecurityDataLowBatteryDetected{ - _SecurityData: &_SecurityData{}, + _SecurityData: &_SecurityData{ + }, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -148,6 +154,7 @@ func (m *_SecurityDataLowBatteryDetected) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataLowBatteryDetected) isSecurityDataLowBatteryDetected() bool { return true } @@ -162,3 +169,6 @@ func (m *_SecurityDataLowBatteryDetected) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataMainsFailure.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataMainsFailure.go index a66b0d241c2..da6235c325c 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataMainsFailure.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataMainsFailure.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataMainsFailure is the corresponding interface of SecurityDataMainsFailure type SecurityDataMainsFailure interface { @@ -46,6 +48,8 @@ type _SecurityDataMainsFailure struct { *_SecurityData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,19 +60,19 @@ type _SecurityDataMainsFailure struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataMainsFailure) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataMainsFailure) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataMainsFailure) GetParent() SecurityData { +func (m *_SecurityDataMainsFailure) GetParent() SecurityData { return m._SecurityData } + // NewSecurityDataMainsFailure factory function for _SecurityDataMainsFailure -func NewSecurityDataMainsFailure(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataMainsFailure { +func NewSecurityDataMainsFailure( commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataMainsFailure { _result := &_SecurityDataMainsFailure{ - _SecurityData: NewSecurityData(commandTypeContainer, argument), + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -76,7 +80,7 @@ func NewSecurityDataMainsFailure(commandTypeContainer SecurityCommandTypeContain // Deprecated: use the interface for direct cast func CastSecurityDataMainsFailure(structType interface{}) SecurityDataMainsFailure { - if casted, ok := structType.(SecurityDataMainsFailure); ok { + if casted, ok := structType.(SecurityDataMainsFailure); ok { return casted } if casted, ok := structType.(*SecurityDataMainsFailure); ok { @@ -95,6 +99,7 @@ func (m *_SecurityDataMainsFailure) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_SecurityDataMainsFailure) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -118,7 +123,8 @@ func SecurityDataMainsFailureParseWithBuffer(ctx context.Context, readBuffer uti // Create a partially initialized instance _child := &_SecurityDataMainsFailure{ - _SecurityData: &_SecurityData{}, + _SecurityData: &_SecurityData{ + }, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -148,6 +154,7 @@ func (m *_SecurityDataMainsFailure) SerializeWithWriteBuffer(ctx context.Context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataMainsFailure) isSecurityDataMainsFailure() bool { return true } @@ -162,3 +169,6 @@ func (m *_SecurityDataMainsFailure) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataMainsRestoredOrApplied.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataMainsRestoredOrApplied.go index d101e9283e9..b9c61771e80 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataMainsRestoredOrApplied.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataMainsRestoredOrApplied.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataMainsRestoredOrApplied is the corresponding interface of SecurityDataMainsRestoredOrApplied type SecurityDataMainsRestoredOrApplied interface { @@ -46,6 +48,8 @@ type _SecurityDataMainsRestoredOrApplied struct { *_SecurityData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,19 +60,19 @@ type _SecurityDataMainsRestoredOrApplied struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataMainsRestoredOrApplied) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataMainsRestoredOrApplied) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataMainsRestoredOrApplied) GetParent() SecurityData { +func (m *_SecurityDataMainsRestoredOrApplied) GetParent() SecurityData { return m._SecurityData } + // NewSecurityDataMainsRestoredOrApplied factory function for _SecurityDataMainsRestoredOrApplied -func NewSecurityDataMainsRestoredOrApplied(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataMainsRestoredOrApplied { +func NewSecurityDataMainsRestoredOrApplied( commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataMainsRestoredOrApplied { _result := &_SecurityDataMainsRestoredOrApplied{ - _SecurityData: NewSecurityData(commandTypeContainer, argument), + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -76,7 +80,7 @@ func NewSecurityDataMainsRestoredOrApplied(commandTypeContainer SecurityCommandT // Deprecated: use the interface for direct cast func CastSecurityDataMainsRestoredOrApplied(structType interface{}) SecurityDataMainsRestoredOrApplied { - if casted, ok := structType.(SecurityDataMainsRestoredOrApplied); ok { + if casted, ok := structType.(SecurityDataMainsRestoredOrApplied); ok { return casted } if casted, ok := structType.(*SecurityDataMainsRestoredOrApplied); ok { @@ -95,6 +99,7 @@ func (m *_SecurityDataMainsRestoredOrApplied) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_SecurityDataMainsRestoredOrApplied) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -118,7 +123,8 @@ func SecurityDataMainsRestoredOrAppliedParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_SecurityDataMainsRestoredOrApplied{ - _SecurityData: &_SecurityData{}, + _SecurityData: &_SecurityData{ + }, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -148,6 +154,7 @@ func (m *_SecurityDataMainsRestoredOrApplied) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataMainsRestoredOrApplied) isSecurityDataMainsRestoredOrApplied() bool { return true } @@ -162,3 +169,6 @@ func (m *_SecurityDataMainsRestoredOrApplied) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataOff.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataOff.go index 48391a53f78..c89ab7f6178 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataOff.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataOff.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataOff is the corresponding interface of SecurityDataOff type SecurityDataOff interface { @@ -46,9 +48,11 @@ type SecurityDataOffExactly interface { // _SecurityDataOff is the data-structure of this message type _SecurityDataOff struct { *_SecurityData - Data []byte + Data []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,15 +63,13 @@ type _SecurityDataOff struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataOff) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataOff) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataOff) GetParent() SecurityData { +func (m *_SecurityDataOff) GetParent() SecurityData { return m._SecurityData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -82,11 +84,12 @@ func (m *_SecurityDataOff) GetData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSecurityDataOff factory function for _SecurityDataOff -func NewSecurityDataOff(data []byte, commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataOff { +func NewSecurityDataOff( data []byte , commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataOff { _result := &_SecurityDataOff{ - Data: data, - _SecurityData: NewSecurityData(commandTypeContainer, argument), + Data: data, + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -94,7 +97,7 @@ func NewSecurityDataOff(data []byte, commandTypeContainer SecurityCommandTypeCon // Deprecated: use the interface for direct cast func CastSecurityDataOff(structType interface{}) SecurityDataOff { - if casted, ok := structType.(SecurityDataOff); ok { + if casted, ok := structType.(SecurityDataOff); ok { return casted } if casted, ok := structType.(*SecurityDataOff); ok { @@ -118,6 +121,7 @@ func (m *_SecurityDataOff) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_SecurityDataOff) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -147,8 +151,9 @@ func SecurityDataOffParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu // Create a partially initialized instance _child := &_SecurityDataOff{ - _SecurityData: &_SecurityData{}, - Data: data, + _SecurityData: &_SecurityData{ + }, + Data: data, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -170,11 +175,11 @@ func (m *_SecurityDataOff) SerializeWithWriteBuffer(ctx context.Context, writeBu return errors.Wrap(pushErr, "Error pushing for SecurityDataOff") } - // Array Field (data) - // Byte Array field (data) - if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { - return errors.Wrap(err, "Error serializing 'data' field") - } + // Array Field (data) + // Byte Array field (data) + if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { + return errors.Wrap(err, "Error serializing 'data' field") + } if popErr := writeBuffer.PopContext("SecurityDataOff"); popErr != nil { return errors.Wrap(popErr, "Error popping for SecurityDataOff") @@ -184,6 +189,7 @@ func (m *_SecurityDataOff) SerializeWithWriteBuffer(ctx context.Context, writeBu return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataOff) isSecurityDataOff() bool { return true } @@ -198,3 +204,6 @@ func (m *_SecurityDataOff) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataOn.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataOn.go index bb178ffc2c5..3576f385f08 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataOn.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataOn.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataOn is the corresponding interface of SecurityDataOn type SecurityDataOn interface { @@ -46,9 +48,11 @@ type SecurityDataOnExactly interface { // _SecurityDataOn is the data-structure of this message type _SecurityDataOn struct { *_SecurityData - Data []byte + Data []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,15 +63,13 @@ type _SecurityDataOn struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataOn) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataOn) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataOn) GetParent() SecurityData { +func (m *_SecurityDataOn) GetParent() SecurityData { return m._SecurityData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -82,11 +84,12 @@ func (m *_SecurityDataOn) GetData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSecurityDataOn factory function for _SecurityDataOn -func NewSecurityDataOn(data []byte, commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataOn { +func NewSecurityDataOn( data []byte , commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataOn { _result := &_SecurityDataOn{ - Data: data, - _SecurityData: NewSecurityData(commandTypeContainer, argument), + Data: data, + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -94,7 +97,7 @@ func NewSecurityDataOn(data []byte, commandTypeContainer SecurityCommandTypeCont // Deprecated: use the interface for direct cast func CastSecurityDataOn(structType interface{}) SecurityDataOn { - if casted, ok := structType.(SecurityDataOn); ok { + if casted, ok := structType.(SecurityDataOn); ok { return casted } if casted, ok := structType.(*SecurityDataOn); ok { @@ -118,6 +121,7 @@ func (m *_SecurityDataOn) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_SecurityDataOn) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -147,8 +151,9 @@ func SecurityDataOnParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf // Create a partially initialized instance _child := &_SecurityDataOn{ - _SecurityData: &_SecurityData{}, - Data: data, + _SecurityData: &_SecurityData{ + }, + Data: data, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -170,11 +175,11 @@ func (m *_SecurityDataOn) SerializeWithWriteBuffer(ctx context.Context, writeBuf return errors.Wrap(pushErr, "Error pushing for SecurityDataOn") } - // Array Field (data) - // Byte Array field (data) - if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { - return errors.Wrap(err, "Error serializing 'data' field") - } + // Array Field (data) + // Byte Array field (data) + if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { + return errors.Wrap(err, "Error serializing 'data' field") + } if popErr := writeBuffer.PopContext("SecurityDataOn"); popErr != nil { return errors.Wrap(popErr, "Error popping for SecurityDataOn") @@ -184,6 +189,7 @@ func (m *_SecurityDataOn) SerializeWithWriteBuffer(ctx context.Context, writeBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataOn) isSecurityDataOn() bool { return true } @@ -198,3 +204,6 @@ func (m *_SecurityDataOn) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataOtherAlarmCleared.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataOtherAlarmCleared.go index 386c1159482..0aa22d552aa 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataOtherAlarmCleared.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataOtherAlarmCleared.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataOtherAlarmCleared is the corresponding interface of SecurityDataOtherAlarmCleared type SecurityDataOtherAlarmCleared interface { @@ -46,6 +48,8 @@ type _SecurityDataOtherAlarmCleared struct { *_SecurityData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,19 +60,19 @@ type _SecurityDataOtherAlarmCleared struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataOtherAlarmCleared) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataOtherAlarmCleared) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataOtherAlarmCleared) GetParent() SecurityData { +func (m *_SecurityDataOtherAlarmCleared) GetParent() SecurityData { return m._SecurityData } + // NewSecurityDataOtherAlarmCleared factory function for _SecurityDataOtherAlarmCleared -func NewSecurityDataOtherAlarmCleared(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataOtherAlarmCleared { +func NewSecurityDataOtherAlarmCleared( commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataOtherAlarmCleared { _result := &_SecurityDataOtherAlarmCleared{ - _SecurityData: NewSecurityData(commandTypeContainer, argument), + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -76,7 +80,7 @@ func NewSecurityDataOtherAlarmCleared(commandTypeContainer SecurityCommandTypeCo // Deprecated: use the interface for direct cast func CastSecurityDataOtherAlarmCleared(structType interface{}) SecurityDataOtherAlarmCleared { - if casted, ok := structType.(SecurityDataOtherAlarmCleared); ok { + if casted, ok := structType.(SecurityDataOtherAlarmCleared); ok { return casted } if casted, ok := structType.(*SecurityDataOtherAlarmCleared); ok { @@ -95,6 +99,7 @@ func (m *_SecurityDataOtherAlarmCleared) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_SecurityDataOtherAlarmCleared) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -118,7 +123,8 @@ func SecurityDataOtherAlarmClearedParseWithBuffer(ctx context.Context, readBuffe // Create a partially initialized instance _child := &_SecurityDataOtherAlarmCleared{ - _SecurityData: &_SecurityData{}, + _SecurityData: &_SecurityData{ + }, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -148,6 +154,7 @@ func (m *_SecurityDataOtherAlarmCleared) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataOtherAlarmCleared) isSecurityDataOtherAlarmCleared() bool { return true } @@ -162,3 +169,6 @@ func (m *_SecurityDataOtherAlarmCleared) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataOtherAlarmRaised.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataOtherAlarmRaised.go index 61c15b74ae4..b9bef99bf2a 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataOtherAlarmRaised.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataOtherAlarmRaised.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataOtherAlarmRaised is the corresponding interface of SecurityDataOtherAlarmRaised type SecurityDataOtherAlarmRaised interface { @@ -46,6 +48,8 @@ type _SecurityDataOtherAlarmRaised struct { *_SecurityData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,19 +60,19 @@ type _SecurityDataOtherAlarmRaised struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataOtherAlarmRaised) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataOtherAlarmRaised) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataOtherAlarmRaised) GetParent() SecurityData { +func (m *_SecurityDataOtherAlarmRaised) GetParent() SecurityData { return m._SecurityData } + // NewSecurityDataOtherAlarmRaised factory function for _SecurityDataOtherAlarmRaised -func NewSecurityDataOtherAlarmRaised(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataOtherAlarmRaised { +func NewSecurityDataOtherAlarmRaised( commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataOtherAlarmRaised { _result := &_SecurityDataOtherAlarmRaised{ - _SecurityData: NewSecurityData(commandTypeContainer, argument), + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -76,7 +80,7 @@ func NewSecurityDataOtherAlarmRaised(commandTypeContainer SecurityCommandTypeCon // Deprecated: use the interface for direct cast func CastSecurityDataOtherAlarmRaised(structType interface{}) SecurityDataOtherAlarmRaised { - if casted, ok := structType.(SecurityDataOtherAlarmRaised); ok { + if casted, ok := structType.(SecurityDataOtherAlarmRaised); ok { return casted } if casted, ok := structType.(*SecurityDataOtherAlarmRaised); ok { @@ -95,6 +99,7 @@ func (m *_SecurityDataOtherAlarmRaised) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_SecurityDataOtherAlarmRaised) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -118,7 +123,8 @@ func SecurityDataOtherAlarmRaisedParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_SecurityDataOtherAlarmRaised{ - _SecurityData: &_SecurityData{}, + _SecurityData: &_SecurityData{ + }, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -148,6 +154,7 @@ func (m *_SecurityDataOtherAlarmRaised) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataOtherAlarmRaised) isSecurityDataOtherAlarmRaised() bool { return true } @@ -162,3 +169,6 @@ func (m *_SecurityDataOtherAlarmRaised) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataPanicActivated.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataPanicActivated.go index 09eb6c8e00f..a79fc99c6e7 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataPanicActivated.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataPanicActivated.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataPanicActivated is the corresponding interface of SecurityDataPanicActivated type SecurityDataPanicActivated interface { @@ -46,6 +48,8 @@ type _SecurityDataPanicActivated struct { *_SecurityData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,19 +60,19 @@ type _SecurityDataPanicActivated struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataPanicActivated) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataPanicActivated) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataPanicActivated) GetParent() SecurityData { +func (m *_SecurityDataPanicActivated) GetParent() SecurityData { return m._SecurityData } + // NewSecurityDataPanicActivated factory function for _SecurityDataPanicActivated -func NewSecurityDataPanicActivated(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataPanicActivated { +func NewSecurityDataPanicActivated( commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataPanicActivated { _result := &_SecurityDataPanicActivated{ - _SecurityData: NewSecurityData(commandTypeContainer, argument), + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -76,7 +80,7 @@ func NewSecurityDataPanicActivated(commandTypeContainer SecurityCommandTypeConta // Deprecated: use the interface for direct cast func CastSecurityDataPanicActivated(structType interface{}) SecurityDataPanicActivated { - if casted, ok := structType.(SecurityDataPanicActivated); ok { + if casted, ok := structType.(SecurityDataPanicActivated); ok { return casted } if casted, ok := structType.(*SecurityDataPanicActivated); ok { @@ -95,6 +99,7 @@ func (m *_SecurityDataPanicActivated) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_SecurityDataPanicActivated) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -118,7 +123,8 @@ func SecurityDataPanicActivatedParseWithBuffer(ctx context.Context, readBuffer u // Create a partially initialized instance _child := &_SecurityDataPanicActivated{ - _SecurityData: &_SecurityData{}, + _SecurityData: &_SecurityData{ + }, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -148,6 +154,7 @@ func (m *_SecurityDataPanicActivated) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataPanicActivated) isSecurityDataPanicActivated() bool { return true } @@ -162,3 +169,6 @@ func (m *_SecurityDataPanicActivated) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataPanicCleared.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataPanicCleared.go index 8c619be6ab7..b8df771ba4f 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataPanicCleared.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataPanicCleared.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataPanicCleared is the corresponding interface of SecurityDataPanicCleared type SecurityDataPanicCleared interface { @@ -46,6 +48,8 @@ type _SecurityDataPanicCleared struct { *_SecurityData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,19 +60,19 @@ type _SecurityDataPanicCleared struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataPanicCleared) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataPanicCleared) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataPanicCleared) GetParent() SecurityData { +func (m *_SecurityDataPanicCleared) GetParent() SecurityData { return m._SecurityData } + // NewSecurityDataPanicCleared factory function for _SecurityDataPanicCleared -func NewSecurityDataPanicCleared(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataPanicCleared { +func NewSecurityDataPanicCleared( commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataPanicCleared { _result := &_SecurityDataPanicCleared{ - _SecurityData: NewSecurityData(commandTypeContainer, argument), + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -76,7 +80,7 @@ func NewSecurityDataPanicCleared(commandTypeContainer SecurityCommandTypeContain // Deprecated: use the interface for direct cast func CastSecurityDataPanicCleared(structType interface{}) SecurityDataPanicCleared { - if casted, ok := structType.(SecurityDataPanicCleared); ok { + if casted, ok := structType.(SecurityDataPanicCleared); ok { return casted } if casted, ok := structType.(*SecurityDataPanicCleared); ok { @@ -95,6 +99,7 @@ func (m *_SecurityDataPanicCleared) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_SecurityDataPanicCleared) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -118,7 +123,8 @@ func SecurityDataPanicClearedParseWithBuffer(ctx context.Context, readBuffer uti // Create a partially initialized instance _child := &_SecurityDataPanicCleared{ - _SecurityData: &_SecurityData{}, + _SecurityData: &_SecurityData{ + }, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -148,6 +154,7 @@ func (m *_SecurityDataPanicCleared) SerializeWithWriteBuffer(ctx context.Context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataPanicCleared) isSecurityDataPanicCleared() bool { return true } @@ -162,3 +169,6 @@ func (m *_SecurityDataPanicCleared) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataPasswordEntryStatus.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataPasswordEntryStatus.go index 1b5bfd0c0d0..446964a15d1 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataPasswordEntryStatus.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataPasswordEntryStatus.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataPasswordEntryStatus is the corresponding interface of SecurityDataPasswordEntryStatus type SecurityDataPasswordEntryStatus interface { @@ -56,9 +58,11 @@ type SecurityDataPasswordEntryStatusExactly interface { // _SecurityDataPasswordEntryStatus is the data-structure of this message type _SecurityDataPasswordEntryStatus struct { *_SecurityData - Code byte + Code byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -69,15 +73,13 @@ type _SecurityDataPasswordEntryStatus struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataPasswordEntryStatus) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataPasswordEntryStatus) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataPasswordEntryStatus) GetParent() SecurityData { +func (m *_SecurityDataPasswordEntryStatus) GetParent() SecurityData { return m._SecurityData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -131,11 +133,12 @@ func (m *_SecurityDataPasswordEntryStatus) GetIsReserved() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSecurityDataPasswordEntryStatus factory function for _SecurityDataPasswordEntryStatus -func NewSecurityDataPasswordEntryStatus(code byte, commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataPasswordEntryStatus { +func NewSecurityDataPasswordEntryStatus( code byte , commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataPasswordEntryStatus { _result := &_SecurityDataPasswordEntryStatus{ - Code: code, - _SecurityData: NewSecurityData(commandTypeContainer, argument), + Code: code, + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -143,7 +146,7 @@ func NewSecurityDataPasswordEntryStatus(code byte, commandTypeContainer Security // Deprecated: use the interface for direct cast func CastSecurityDataPasswordEntryStatus(structType interface{}) SecurityDataPasswordEntryStatus { - if casted, ok := structType.(SecurityDataPasswordEntryStatus); ok { + if casted, ok := structType.(SecurityDataPasswordEntryStatus); ok { return casted } if casted, ok := structType.(*SecurityDataPasswordEntryStatus); ok { @@ -160,7 +163,7 @@ func (m *_SecurityDataPasswordEntryStatus) GetLengthInBits(ctx context.Context) lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (code) - lengthInBits += 8 + lengthInBits += 8; // A virtual field doesn't have any in- or output. @@ -175,6 +178,7 @@ func (m *_SecurityDataPasswordEntryStatus) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_SecurityDataPasswordEntryStatus) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -193,7 +197,7 @@ func SecurityDataPasswordEntryStatusParseWithBuffer(ctx context.Context, readBuf _ = currentPos // Simple Field (code) - _code, _codeErr := readBuffer.ReadByte("code") +_code, _codeErr := readBuffer.ReadByte("code") if _codeErr != nil { return nil, errors.Wrap(_codeErr, "Error parsing 'code' field of SecurityDataPasswordEntryStatus") } @@ -230,8 +234,9 @@ func SecurityDataPasswordEntryStatusParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_SecurityDataPasswordEntryStatus{ - _SecurityData: &_SecurityData{}, - Code: code, + _SecurityData: &_SecurityData{ + }, + Code: code, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -253,32 +258,32 @@ func (m *_SecurityDataPasswordEntryStatus) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for SecurityDataPasswordEntryStatus") } - // Simple Field (code) - code := byte(m.GetCode()) - _codeErr := writeBuffer.WriteByte("code", (code)) - if _codeErr != nil { - return errors.Wrap(_codeErr, "Error serializing 'code' field") - } - // Virtual field - if _isPasswordEntrySucceededErr := writeBuffer.WriteVirtual(ctx, "isPasswordEntrySucceeded", m.GetIsPasswordEntrySucceeded()); _isPasswordEntrySucceededErr != nil { - return errors.Wrap(_isPasswordEntrySucceededErr, "Error serializing 'isPasswordEntrySucceeded' field") - } - // Virtual field - if _isPasswordEntryFailedErr := writeBuffer.WriteVirtual(ctx, "isPasswordEntryFailed", m.GetIsPasswordEntryFailed()); _isPasswordEntryFailedErr != nil { - return errors.Wrap(_isPasswordEntryFailedErr, "Error serializing 'isPasswordEntryFailed' field") - } - // Virtual field - if _isPasswordEntryDisabledErr := writeBuffer.WriteVirtual(ctx, "isPasswordEntryDisabled", m.GetIsPasswordEntryDisabled()); _isPasswordEntryDisabledErr != nil { - return errors.Wrap(_isPasswordEntryDisabledErr, "Error serializing 'isPasswordEntryDisabled' field") - } - // Virtual field - if _isPasswordEntryEnabledAgainErr := writeBuffer.WriteVirtual(ctx, "isPasswordEntryEnabledAgain", m.GetIsPasswordEntryEnabledAgain()); _isPasswordEntryEnabledAgainErr != nil { - return errors.Wrap(_isPasswordEntryEnabledAgainErr, "Error serializing 'isPasswordEntryEnabledAgain' field") - } - // Virtual field - if _isReservedErr := writeBuffer.WriteVirtual(ctx, "isReserved", m.GetIsReserved()); _isReservedErr != nil { - return errors.Wrap(_isReservedErr, "Error serializing 'isReserved' field") - } + // Simple Field (code) + code := byte(m.GetCode()) + _codeErr := writeBuffer.WriteByte("code", (code)) + if _codeErr != nil { + return errors.Wrap(_codeErr, "Error serializing 'code' field") + } + // Virtual field + if _isPasswordEntrySucceededErr := writeBuffer.WriteVirtual(ctx, "isPasswordEntrySucceeded", m.GetIsPasswordEntrySucceeded()); _isPasswordEntrySucceededErr != nil { + return errors.Wrap(_isPasswordEntrySucceededErr, "Error serializing 'isPasswordEntrySucceeded' field") + } + // Virtual field + if _isPasswordEntryFailedErr := writeBuffer.WriteVirtual(ctx, "isPasswordEntryFailed", m.GetIsPasswordEntryFailed()); _isPasswordEntryFailedErr != nil { + return errors.Wrap(_isPasswordEntryFailedErr, "Error serializing 'isPasswordEntryFailed' field") + } + // Virtual field + if _isPasswordEntryDisabledErr := writeBuffer.WriteVirtual(ctx, "isPasswordEntryDisabled", m.GetIsPasswordEntryDisabled()); _isPasswordEntryDisabledErr != nil { + return errors.Wrap(_isPasswordEntryDisabledErr, "Error serializing 'isPasswordEntryDisabled' field") + } + // Virtual field + if _isPasswordEntryEnabledAgainErr := writeBuffer.WriteVirtual(ctx, "isPasswordEntryEnabledAgain", m.GetIsPasswordEntryEnabledAgain()); _isPasswordEntryEnabledAgainErr != nil { + return errors.Wrap(_isPasswordEntryEnabledAgainErr, "Error serializing 'isPasswordEntryEnabledAgain' field") + } + // Virtual field + if _isReservedErr := writeBuffer.WriteVirtual(ctx, "isReserved", m.GetIsReserved()); _isReservedErr != nil { + return errors.Wrap(_isReservedErr, "Error serializing 'isReserved' field") + } if popErr := writeBuffer.PopContext("SecurityDataPasswordEntryStatus"); popErr != nil { return errors.Wrap(popErr, "Error popping for SecurityDataPasswordEntryStatus") @@ -288,6 +293,7 @@ func (m *_SecurityDataPasswordEntryStatus) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataPasswordEntryStatus) isSecurityDataPasswordEntryStatus() bool { return true } @@ -302,3 +308,6 @@ func (m *_SecurityDataPasswordEntryStatus) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataRaiseAlarm.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataRaiseAlarm.go index 35a05ff40ad..1a01c585c91 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataRaiseAlarm.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataRaiseAlarm.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataRaiseAlarm is the corresponding interface of SecurityDataRaiseAlarm type SecurityDataRaiseAlarm interface { @@ -46,6 +48,8 @@ type _SecurityDataRaiseAlarm struct { *_SecurityData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,19 +60,19 @@ type _SecurityDataRaiseAlarm struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataRaiseAlarm) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataRaiseAlarm) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataRaiseAlarm) GetParent() SecurityData { +func (m *_SecurityDataRaiseAlarm) GetParent() SecurityData { return m._SecurityData } + // NewSecurityDataRaiseAlarm factory function for _SecurityDataRaiseAlarm -func NewSecurityDataRaiseAlarm(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataRaiseAlarm { +func NewSecurityDataRaiseAlarm( commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataRaiseAlarm { _result := &_SecurityDataRaiseAlarm{ - _SecurityData: NewSecurityData(commandTypeContainer, argument), + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -76,7 +80,7 @@ func NewSecurityDataRaiseAlarm(commandTypeContainer SecurityCommandTypeContainer // Deprecated: use the interface for direct cast func CastSecurityDataRaiseAlarm(structType interface{}) SecurityDataRaiseAlarm { - if casted, ok := structType.(SecurityDataRaiseAlarm); ok { + if casted, ok := structType.(SecurityDataRaiseAlarm); ok { return casted } if casted, ok := structType.(*SecurityDataRaiseAlarm); ok { @@ -95,6 +99,7 @@ func (m *_SecurityDataRaiseAlarm) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_SecurityDataRaiseAlarm) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -118,7 +123,8 @@ func SecurityDataRaiseAlarmParseWithBuffer(ctx context.Context, readBuffer utils // Create a partially initialized instance _child := &_SecurityDataRaiseAlarm{ - _SecurityData: &_SecurityData{}, + _SecurityData: &_SecurityData{ + }, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -148,6 +154,7 @@ func (m *_SecurityDataRaiseAlarm) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataRaiseAlarm) isSecurityDataRaiseAlarm() bool { return true } @@ -162,3 +169,6 @@ func (m *_SecurityDataRaiseAlarm) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataRaiseTamper.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataRaiseTamper.go index 46ef90f682f..75a4eceb6d9 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataRaiseTamper.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataRaiseTamper.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataRaiseTamper is the corresponding interface of SecurityDataRaiseTamper type SecurityDataRaiseTamper interface { @@ -46,6 +48,8 @@ type _SecurityDataRaiseTamper struct { *_SecurityData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,19 +60,19 @@ type _SecurityDataRaiseTamper struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataRaiseTamper) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataRaiseTamper) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataRaiseTamper) GetParent() SecurityData { +func (m *_SecurityDataRaiseTamper) GetParent() SecurityData { return m._SecurityData } + // NewSecurityDataRaiseTamper factory function for _SecurityDataRaiseTamper -func NewSecurityDataRaiseTamper(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataRaiseTamper { +func NewSecurityDataRaiseTamper( commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataRaiseTamper { _result := &_SecurityDataRaiseTamper{ - _SecurityData: NewSecurityData(commandTypeContainer, argument), + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -76,7 +80,7 @@ func NewSecurityDataRaiseTamper(commandTypeContainer SecurityCommandTypeContaine // Deprecated: use the interface for direct cast func CastSecurityDataRaiseTamper(structType interface{}) SecurityDataRaiseTamper { - if casted, ok := structType.(SecurityDataRaiseTamper); ok { + if casted, ok := structType.(SecurityDataRaiseTamper); ok { return casted } if casted, ok := structType.(*SecurityDataRaiseTamper); ok { @@ -95,6 +99,7 @@ func (m *_SecurityDataRaiseTamper) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_SecurityDataRaiseTamper) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -118,7 +123,8 @@ func SecurityDataRaiseTamperParseWithBuffer(ctx context.Context, readBuffer util // Create a partially initialized instance _child := &_SecurityDataRaiseTamper{ - _SecurityData: &_SecurityData{}, + _SecurityData: &_SecurityData{ + }, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -148,6 +154,7 @@ func (m *_SecurityDataRaiseTamper) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataRaiseTamper) isSecurityDataRaiseTamper() bool { return true } @@ -162,3 +169,6 @@ func (m *_SecurityDataRaiseTamper) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataRequestZoneName.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataRequestZoneName.go index 6827b1a069d..71c92cba749 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataRequestZoneName.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataRequestZoneName.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataRequestZoneName is the corresponding interface of SecurityDataRequestZoneName type SecurityDataRequestZoneName interface { @@ -46,9 +48,11 @@ type SecurityDataRequestZoneNameExactly interface { // _SecurityDataRequestZoneName is the data-structure of this message type _SecurityDataRequestZoneName struct { *_SecurityData - ZoneNumber uint8 + ZoneNumber uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,15 +63,13 @@ type _SecurityDataRequestZoneName struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataRequestZoneName) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataRequestZoneName) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataRequestZoneName) GetParent() SecurityData { +func (m *_SecurityDataRequestZoneName) GetParent() SecurityData { return m._SecurityData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -82,11 +84,12 @@ func (m *_SecurityDataRequestZoneName) GetZoneNumber() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSecurityDataRequestZoneName factory function for _SecurityDataRequestZoneName -func NewSecurityDataRequestZoneName(zoneNumber uint8, commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataRequestZoneName { +func NewSecurityDataRequestZoneName( zoneNumber uint8 , commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataRequestZoneName { _result := &_SecurityDataRequestZoneName{ - ZoneNumber: zoneNumber, - _SecurityData: NewSecurityData(commandTypeContainer, argument), + ZoneNumber: zoneNumber, + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -94,7 +97,7 @@ func NewSecurityDataRequestZoneName(zoneNumber uint8, commandTypeContainer Secur // Deprecated: use the interface for direct cast func CastSecurityDataRequestZoneName(structType interface{}) SecurityDataRequestZoneName { - if casted, ok := structType.(SecurityDataRequestZoneName); ok { + if casted, ok := structType.(SecurityDataRequestZoneName); ok { return casted } if casted, ok := structType.(*SecurityDataRequestZoneName); ok { @@ -111,11 +114,12 @@ func (m *_SecurityDataRequestZoneName) GetLengthInBits(ctx context.Context) uint lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (zoneNumber) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_SecurityDataRequestZoneName) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -134,7 +138,7 @@ func SecurityDataRequestZoneNameParseWithBuffer(ctx context.Context, readBuffer _ = currentPos // Simple Field (zoneNumber) - _zoneNumber, _zoneNumberErr := readBuffer.ReadUint8("zoneNumber", 8) +_zoneNumber, _zoneNumberErr := readBuffer.ReadUint8("zoneNumber", 8) if _zoneNumberErr != nil { return nil, errors.Wrap(_zoneNumberErr, "Error parsing 'zoneNumber' field of SecurityDataRequestZoneName") } @@ -146,8 +150,9 @@ func SecurityDataRequestZoneNameParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_SecurityDataRequestZoneName{ - _SecurityData: &_SecurityData{}, - ZoneNumber: zoneNumber, + _SecurityData: &_SecurityData{ + }, + ZoneNumber: zoneNumber, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -169,12 +174,12 @@ func (m *_SecurityDataRequestZoneName) SerializeWithWriteBuffer(ctx context.Cont return errors.Wrap(pushErr, "Error pushing for SecurityDataRequestZoneName") } - // Simple Field (zoneNumber) - zoneNumber := uint8(m.GetZoneNumber()) - _zoneNumberErr := writeBuffer.WriteUint8("zoneNumber", 8, (zoneNumber)) - if _zoneNumberErr != nil { - return errors.Wrap(_zoneNumberErr, "Error serializing 'zoneNumber' field") - } + // Simple Field (zoneNumber) + zoneNumber := uint8(m.GetZoneNumber()) + _zoneNumberErr := writeBuffer.WriteUint8("zoneNumber", 8, (zoneNumber)) + if _zoneNumberErr != nil { + return errors.Wrap(_zoneNumberErr, "Error serializing 'zoneNumber' field") + } if popErr := writeBuffer.PopContext("SecurityDataRequestZoneName"); popErr != nil { return errors.Wrap(popErr, "Error popping for SecurityDataRequestZoneName") @@ -184,6 +189,7 @@ func (m *_SecurityDataRequestZoneName) SerializeWithWriteBuffer(ctx context.Cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataRequestZoneName) isSecurityDataRequestZoneName() bool { return true } @@ -198,3 +204,6 @@ func (m *_SecurityDataRequestZoneName) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataStatus1Request.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataStatus1Request.go index 1a9b5c888f8..976bd9463c7 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataStatus1Request.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataStatus1Request.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataStatus1Request is the corresponding interface of SecurityDataStatus1Request type SecurityDataStatus1Request interface { @@ -46,6 +48,8 @@ type _SecurityDataStatus1Request struct { *_SecurityData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,19 +60,19 @@ type _SecurityDataStatus1Request struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataStatus1Request) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataStatus1Request) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataStatus1Request) GetParent() SecurityData { +func (m *_SecurityDataStatus1Request) GetParent() SecurityData { return m._SecurityData } + // NewSecurityDataStatus1Request factory function for _SecurityDataStatus1Request -func NewSecurityDataStatus1Request(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataStatus1Request { +func NewSecurityDataStatus1Request( commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataStatus1Request { _result := &_SecurityDataStatus1Request{ - _SecurityData: NewSecurityData(commandTypeContainer, argument), + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -76,7 +80,7 @@ func NewSecurityDataStatus1Request(commandTypeContainer SecurityCommandTypeConta // Deprecated: use the interface for direct cast func CastSecurityDataStatus1Request(structType interface{}) SecurityDataStatus1Request { - if casted, ok := structType.(SecurityDataStatus1Request); ok { + if casted, ok := structType.(SecurityDataStatus1Request); ok { return casted } if casted, ok := structType.(*SecurityDataStatus1Request); ok { @@ -95,6 +99,7 @@ func (m *_SecurityDataStatus1Request) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_SecurityDataStatus1Request) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -118,7 +123,8 @@ func SecurityDataStatus1RequestParseWithBuffer(ctx context.Context, readBuffer u // Create a partially initialized instance _child := &_SecurityDataStatus1Request{ - _SecurityData: &_SecurityData{}, + _SecurityData: &_SecurityData{ + }, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -148,6 +154,7 @@ func (m *_SecurityDataStatus1Request) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataStatus1Request) isSecurityDataStatus1Request() bool { return true } @@ -162,3 +169,6 @@ func (m *_SecurityDataStatus1Request) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataStatus2Request.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataStatus2Request.go index 2a108f23972..852ac5e8c56 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataStatus2Request.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataStatus2Request.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataStatus2Request is the corresponding interface of SecurityDataStatus2Request type SecurityDataStatus2Request interface { @@ -46,6 +48,8 @@ type _SecurityDataStatus2Request struct { *_SecurityData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,19 +60,19 @@ type _SecurityDataStatus2Request struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataStatus2Request) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataStatus2Request) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataStatus2Request) GetParent() SecurityData { +func (m *_SecurityDataStatus2Request) GetParent() SecurityData { return m._SecurityData } + // NewSecurityDataStatus2Request factory function for _SecurityDataStatus2Request -func NewSecurityDataStatus2Request(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataStatus2Request { +func NewSecurityDataStatus2Request( commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataStatus2Request { _result := &_SecurityDataStatus2Request{ - _SecurityData: NewSecurityData(commandTypeContainer, argument), + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -76,7 +80,7 @@ func NewSecurityDataStatus2Request(commandTypeContainer SecurityCommandTypeConta // Deprecated: use the interface for direct cast func CastSecurityDataStatus2Request(structType interface{}) SecurityDataStatus2Request { - if casted, ok := structType.(SecurityDataStatus2Request); ok { + if casted, ok := structType.(SecurityDataStatus2Request); ok { return casted } if casted, ok := structType.(*SecurityDataStatus2Request); ok { @@ -95,6 +99,7 @@ func (m *_SecurityDataStatus2Request) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_SecurityDataStatus2Request) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -118,7 +123,8 @@ func SecurityDataStatus2RequestParseWithBuffer(ctx context.Context, readBuffer u // Create a partially initialized instance _child := &_SecurityDataStatus2Request{ - _SecurityData: &_SecurityData{}, + _SecurityData: &_SecurityData{ + }, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -148,6 +154,7 @@ func (m *_SecurityDataStatus2Request) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataStatus2Request) isSecurityDataStatus2Request() bool { return true } @@ -162,3 +169,6 @@ func (m *_SecurityDataStatus2Request) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataStatusReport1.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataStatusReport1.go index 18bff0c3c27..3686a0a6921 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataStatusReport1.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataStatusReport1.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataStatusReport1 is the corresponding interface of SecurityDataStatusReport1 type SecurityDataStatusReport1 interface { @@ -53,12 +55,14 @@ type SecurityDataStatusReport1Exactly interface { // _SecurityDataStatusReport1 is the data-structure of this message type _SecurityDataStatusReport1 struct { *_SecurityData - ArmCodeType SecurityArmCode - TamperStatus TamperStatus - PanicStatus PanicStatus - ZoneStatus []ZoneStatus + ArmCodeType SecurityArmCode + TamperStatus TamperStatus + PanicStatus PanicStatus + ZoneStatus []ZoneStatus } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -69,15 +73,13 @@ type _SecurityDataStatusReport1 struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataStatusReport1) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataStatusReport1) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataStatusReport1) GetParent() SecurityData { +func (m *_SecurityDataStatusReport1) GetParent() SecurityData { return m._SecurityData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -104,14 +106,15 @@ func (m *_SecurityDataStatusReport1) GetZoneStatus() []ZoneStatus { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSecurityDataStatusReport1 factory function for _SecurityDataStatusReport1 -func NewSecurityDataStatusReport1(armCodeType SecurityArmCode, tamperStatus TamperStatus, panicStatus PanicStatus, zoneStatus []ZoneStatus, commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataStatusReport1 { +func NewSecurityDataStatusReport1( armCodeType SecurityArmCode , tamperStatus TamperStatus , panicStatus PanicStatus , zoneStatus []ZoneStatus , commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataStatusReport1 { _result := &_SecurityDataStatusReport1{ - ArmCodeType: armCodeType, - TamperStatus: tamperStatus, - PanicStatus: panicStatus, - ZoneStatus: zoneStatus, - _SecurityData: NewSecurityData(commandTypeContainer, argument), + ArmCodeType: armCodeType, + TamperStatus: tamperStatus, + PanicStatus: panicStatus, + ZoneStatus: zoneStatus, + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -119,7 +122,7 @@ func NewSecurityDataStatusReport1(armCodeType SecurityArmCode, tamperStatus Tamp // Deprecated: use the interface for direct cast func CastSecurityDataStatusReport1(structType interface{}) SecurityDataStatusReport1 { - if casted, ok := structType.(SecurityDataStatusReport1); ok { + if casted, ok := structType.(SecurityDataStatusReport1); ok { return casted } if casted, ok := structType.(*SecurityDataStatusReport1); ok { @@ -150,13 +153,14 @@ func (m *_SecurityDataStatusReport1) GetLengthInBits(ctx context.Context) uint16 arrayCtx := spiContext.CreateArrayContext(ctx, len(m.ZoneStatus), _curItem) _ = arrayCtx _ = _curItem - lengthInBits += element.(interface{ GetLengthInBits(context.Context) uint16 }).GetLengthInBits(arrayCtx) + lengthInBits += element.(interface{GetLengthInBits(context.Context) uint16}).GetLengthInBits(arrayCtx) } } return lengthInBits } + func (m *_SecurityDataStatusReport1) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -178,7 +182,7 @@ func SecurityDataStatusReport1ParseWithBuffer(ctx context.Context, readBuffer ut if pullErr := readBuffer.PullContext("armCodeType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for armCodeType") } - _armCodeType, _armCodeTypeErr := SecurityArmCodeParseWithBuffer(ctx, readBuffer) +_armCodeType, _armCodeTypeErr := SecurityArmCodeParseWithBuffer(ctx, readBuffer) if _armCodeTypeErr != nil { return nil, errors.Wrap(_armCodeTypeErr, "Error parsing 'armCodeType' field of SecurityDataStatusReport1") } @@ -191,7 +195,7 @@ func SecurityDataStatusReport1ParseWithBuffer(ctx context.Context, readBuffer ut if pullErr := readBuffer.PullContext("tamperStatus"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for tamperStatus") } - _tamperStatus, _tamperStatusErr := TamperStatusParseWithBuffer(ctx, readBuffer) +_tamperStatus, _tamperStatusErr := TamperStatusParseWithBuffer(ctx, readBuffer) if _tamperStatusErr != nil { return nil, errors.Wrap(_tamperStatusErr, "Error parsing 'tamperStatus' field of SecurityDataStatusReport1") } @@ -204,7 +208,7 @@ func SecurityDataStatusReport1ParseWithBuffer(ctx context.Context, readBuffer ut if pullErr := readBuffer.PullContext("panicStatus"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for panicStatus") } - _panicStatus, _panicStatusErr := PanicStatusParseWithBuffer(ctx, readBuffer) +_panicStatus, _panicStatusErr := PanicStatusParseWithBuffer(ctx, readBuffer) if _panicStatusErr != nil { return nil, errors.Wrap(_panicStatusErr, "Error parsing 'panicStatus' field of SecurityDataStatusReport1") } @@ -229,7 +233,7 @@ func SecurityDataStatusReport1ParseWithBuffer(ctx context.Context, readBuffer ut arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := ZoneStatusParseWithBuffer(arrayCtx, readBuffer) +_item, _err := ZoneStatusParseWithBuffer(arrayCtx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'zoneStatus' field of SecurityDataStatusReport1") } @@ -246,11 +250,12 @@ func SecurityDataStatusReport1ParseWithBuffer(ctx context.Context, readBuffer ut // Create a partially initialized instance _child := &_SecurityDataStatusReport1{ - _SecurityData: &_SecurityData{}, - ArmCodeType: armCodeType, - TamperStatus: tamperStatus, - PanicStatus: panicStatus, - ZoneStatus: zoneStatus, + _SecurityData: &_SecurityData{ + }, + ArmCodeType: armCodeType, + TamperStatus: tamperStatus, + PanicStatus: panicStatus, + ZoneStatus: zoneStatus, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -272,58 +277,58 @@ func (m *_SecurityDataStatusReport1) SerializeWithWriteBuffer(ctx context.Contex return errors.Wrap(pushErr, "Error pushing for SecurityDataStatusReport1") } - // Simple Field (armCodeType) - if pushErr := writeBuffer.PushContext("armCodeType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for armCodeType") - } - _armCodeTypeErr := writeBuffer.WriteSerializable(ctx, m.GetArmCodeType()) - if popErr := writeBuffer.PopContext("armCodeType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for armCodeType") - } - if _armCodeTypeErr != nil { - return errors.Wrap(_armCodeTypeErr, "Error serializing 'armCodeType' field") - } + // Simple Field (armCodeType) + if pushErr := writeBuffer.PushContext("armCodeType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for armCodeType") + } + _armCodeTypeErr := writeBuffer.WriteSerializable(ctx, m.GetArmCodeType()) + if popErr := writeBuffer.PopContext("armCodeType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for armCodeType") + } + if _armCodeTypeErr != nil { + return errors.Wrap(_armCodeTypeErr, "Error serializing 'armCodeType' field") + } - // Simple Field (tamperStatus) - if pushErr := writeBuffer.PushContext("tamperStatus"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for tamperStatus") - } - _tamperStatusErr := writeBuffer.WriteSerializable(ctx, m.GetTamperStatus()) - if popErr := writeBuffer.PopContext("tamperStatus"); popErr != nil { - return errors.Wrap(popErr, "Error popping for tamperStatus") - } - if _tamperStatusErr != nil { - return errors.Wrap(_tamperStatusErr, "Error serializing 'tamperStatus' field") - } + // Simple Field (tamperStatus) + if pushErr := writeBuffer.PushContext("tamperStatus"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for tamperStatus") + } + _tamperStatusErr := writeBuffer.WriteSerializable(ctx, m.GetTamperStatus()) + if popErr := writeBuffer.PopContext("tamperStatus"); popErr != nil { + return errors.Wrap(popErr, "Error popping for tamperStatus") + } + if _tamperStatusErr != nil { + return errors.Wrap(_tamperStatusErr, "Error serializing 'tamperStatus' field") + } - // Simple Field (panicStatus) - if pushErr := writeBuffer.PushContext("panicStatus"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for panicStatus") - } - _panicStatusErr := writeBuffer.WriteSerializable(ctx, m.GetPanicStatus()) - if popErr := writeBuffer.PopContext("panicStatus"); popErr != nil { - return errors.Wrap(popErr, "Error popping for panicStatus") - } - if _panicStatusErr != nil { - return errors.Wrap(_panicStatusErr, "Error serializing 'panicStatus' field") - } + // Simple Field (panicStatus) + if pushErr := writeBuffer.PushContext("panicStatus"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for panicStatus") + } + _panicStatusErr := writeBuffer.WriteSerializable(ctx, m.GetPanicStatus()) + if popErr := writeBuffer.PopContext("panicStatus"); popErr != nil { + return errors.Wrap(popErr, "Error popping for panicStatus") + } + if _panicStatusErr != nil { + return errors.Wrap(_panicStatusErr, "Error serializing 'panicStatus' field") + } - // Array Field (zoneStatus) - if pushErr := writeBuffer.PushContext("zoneStatus", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for zoneStatus") - } - for _curItem, _element := range m.GetZoneStatus() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetZoneStatus()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'zoneStatus' field") - } - } - if popErr := writeBuffer.PopContext("zoneStatus", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for zoneStatus") + // Array Field (zoneStatus) + if pushErr := writeBuffer.PushContext("zoneStatus", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for zoneStatus") + } + for _curItem, _element := range m.GetZoneStatus() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetZoneStatus()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'zoneStatus' field") } + } + if popErr := writeBuffer.PopContext("zoneStatus", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for zoneStatus") + } if popErr := writeBuffer.PopContext("SecurityDataStatusReport1"); popErr != nil { return errors.Wrap(popErr, "Error popping for SecurityDataStatusReport1") @@ -333,6 +338,7 @@ func (m *_SecurityDataStatusReport1) SerializeWithWriteBuffer(ctx context.Contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataStatusReport1) isSecurityDataStatusReport1() bool { return true } @@ -347,3 +353,6 @@ func (m *_SecurityDataStatusReport1) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataStatusReport2.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataStatusReport2.go index d57e79ac054..0f0bad2146d 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataStatusReport2.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataStatusReport2.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataStatusReport2 is the corresponding interface of SecurityDataStatusReport2 type SecurityDataStatusReport2 interface { @@ -47,9 +49,11 @@ type SecurityDataStatusReport2Exactly interface { // _SecurityDataStatusReport2 is the data-structure of this message type _SecurityDataStatusReport2 struct { *_SecurityData - ZoneStatus []ZoneStatus + ZoneStatus []ZoneStatus } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -60,15 +64,13 @@ type _SecurityDataStatusReport2 struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataStatusReport2) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataStatusReport2) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataStatusReport2) GetParent() SecurityData { +func (m *_SecurityDataStatusReport2) GetParent() SecurityData { return m._SecurityData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_SecurityDataStatusReport2) GetZoneStatus() []ZoneStatus { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSecurityDataStatusReport2 factory function for _SecurityDataStatusReport2 -func NewSecurityDataStatusReport2(zoneStatus []ZoneStatus, commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataStatusReport2 { +func NewSecurityDataStatusReport2( zoneStatus []ZoneStatus , commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataStatusReport2 { _result := &_SecurityDataStatusReport2{ - ZoneStatus: zoneStatus, - _SecurityData: NewSecurityData(commandTypeContainer, argument), + ZoneStatus: zoneStatus, + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewSecurityDataStatusReport2(zoneStatus []ZoneStatus, commandTypeContainer // Deprecated: use the interface for direct cast func CastSecurityDataStatusReport2(structType interface{}) SecurityDataStatusReport2 { - if casted, ok := structType.(SecurityDataStatusReport2); ok { + if casted, ok := structType.(SecurityDataStatusReport2); ok { return casted } if casted, ok := structType.(*SecurityDataStatusReport2); ok { @@ -117,13 +120,14 @@ func (m *_SecurityDataStatusReport2) GetLengthInBits(ctx context.Context) uint16 arrayCtx := spiContext.CreateArrayContext(ctx, len(m.ZoneStatus), _curItem) _ = arrayCtx _ = _curItem - lengthInBits += element.(interface{ GetLengthInBits(context.Context) uint16 }).GetLengthInBits(arrayCtx) + lengthInBits += element.(interface{GetLengthInBits(context.Context) uint16}).GetLengthInBits(arrayCtx) } } return lengthInBits } + func (m *_SecurityDataStatusReport2) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -157,7 +161,7 @@ func SecurityDataStatusReport2ParseWithBuffer(ctx context.Context, readBuffer ut arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := ZoneStatusParseWithBuffer(arrayCtx, readBuffer) +_item, _err := ZoneStatusParseWithBuffer(arrayCtx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'zoneStatus' field of SecurityDataStatusReport2") } @@ -174,8 +178,9 @@ func SecurityDataStatusReport2ParseWithBuffer(ctx context.Context, readBuffer ut // Create a partially initialized instance _child := &_SecurityDataStatusReport2{ - _SecurityData: &_SecurityData{}, - ZoneStatus: zoneStatus, + _SecurityData: &_SecurityData{ + }, + ZoneStatus: zoneStatus, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -197,22 +202,22 @@ func (m *_SecurityDataStatusReport2) SerializeWithWriteBuffer(ctx context.Contex return errors.Wrap(pushErr, "Error pushing for SecurityDataStatusReport2") } - // Array Field (zoneStatus) - if pushErr := writeBuffer.PushContext("zoneStatus", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for zoneStatus") - } - for _curItem, _element := range m.GetZoneStatus() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetZoneStatus()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'zoneStatus' field") - } - } - if popErr := writeBuffer.PopContext("zoneStatus", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for zoneStatus") + // Array Field (zoneStatus) + if pushErr := writeBuffer.PushContext("zoneStatus", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for zoneStatus") + } + for _curItem, _element := range m.GetZoneStatus() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetZoneStatus()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'zoneStatus' field") } + } + if popErr := writeBuffer.PopContext("zoneStatus", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for zoneStatus") + } if popErr := writeBuffer.PopContext("SecurityDataStatusReport2"); popErr != nil { return errors.Wrap(popErr, "Error popping for SecurityDataStatusReport2") @@ -222,6 +227,7 @@ func (m *_SecurityDataStatusReport2) SerializeWithWriteBuffer(ctx context.Contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataStatusReport2) isSecurityDataStatusReport2() bool { return true } @@ -236,3 +242,6 @@ func (m *_SecurityDataStatusReport2) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataSystemArmedDisarmed.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataSystemArmedDisarmed.go index 745c70eef16..2e8ca5a6738 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataSystemArmedDisarmed.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataSystemArmedDisarmed.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataSystemArmedDisarmed is the corresponding interface of SecurityDataSystemArmedDisarmed type SecurityDataSystemArmedDisarmed interface { @@ -46,9 +48,11 @@ type SecurityDataSystemArmedDisarmedExactly interface { // _SecurityDataSystemArmedDisarmed is the data-structure of this message type _SecurityDataSystemArmedDisarmed struct { *_SecurityData - ArmCodeType SecurityArmCode + ArmCodeType SecurityArmCode } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,15 +63,13 @@ type _SecurityDataSystemArmedDisarmed struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataSystemArmedDisarmed) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataSystemArmedDisarmed) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataSystemArmedDisarmed) GetParent() SecurityData { +func (m *_SecurityDataSystemArmedDisarmed) GetParent() SecurityData { return m._SecurityData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -82,11 +84,12 @@ func (m *_SecurityDataSystemArmedDisarmed) GetArmCodeType() SecurityArmCode { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSecurityDataSystemArmedDisarmed factory function for _SecurityDataSystemArmedDisarmed -func NewSecurityDataSystemArmedDisarmed(armCodeType SecurityArmCode, commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataSystemArmedDisarmed { +func NewSecurityDataSystemArmedDisarmed( armCodeType SecurityArmCode , commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataSystemArmedDisarmed { _result := &_SecurityDataSystemArmedDisarmed{ - ArmCodeType: armCodeType, - _SecurityData: NewSecurityData(commandTypeContainer, argument), + ArmCodeType: armCodeType, + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -94,7 +97,7 @@ func NewSecurityDataSystemArmedDisarmed(armCodeType SecurityArmCode, commandType // Deprecated: use the interface for direct cast func CastSecurityDataSystemArmedDisarmed(structType interface{}) SecurityDataSystemArmedDisarmed { - if casted, ok := structType.(SecurityDataSystemArmedDisarmed); ok { + if casted, ok := structType.(SecurityDataSystemArmedDisarmed); ok { return casted } if casted, ok := structType.(*SecurityDataSystemArmedDisarmed); ok { @@ -116,6 +119,7 @@ func (m *_SecurityDataSystemArmedDisarmed) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_SecurityDataSystemArmedDisarmed) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -137,7 +141,7 @@ func SecurityDataSystemArmedDisarmedParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("armCodeType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for armCodeType") } - _armCodeType, _armCodeTypeErr := SecurityArmCodeParseWithBuffer(ctx, readBuffer) +_armCodeType, _armCodeTypeErr := SecurityArmCodeParseWithBuffer(ctx, readBuffer) if _armCodeTypeErr != nil { return nil, errors.Wrap(_armCodeTypeErr, "Error parsing 'armCodeType' field of SecurityDataSystemArmedDisarmed") } @@ -152,8 +156,9 @@ func SecurityDataSystemArmedDisarmedParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_SecurityDataSystemArmedDisarmed{ - _SecurityData: &_SecurityData{}, - ArmCodeType: armCodeType, + _SecurityData: &_SecurityData{ + }, + ArmCodeType: armCodeType, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -175,17 +180,17 @@ func (m *_SecurityDataSystemArmedDisarmed) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for SecurityDataSystemArmedDisarmed") } - // Simple Field (armCodeType) - if pushErr := writeBuffer.PushContext("armCodeType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for armCodeType") - } - _armCodeTypeErr := writeBuffer.WriteSerializable(ctx, m.GetArmCodeType()) - if popErr := writeBuffer.PopContext("armCodeType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for armCodeType") - } - if _armCodeTypeErr != nil { - return errors.Wrap(_armCodeTypeErr, "Error serializing 'armCodeType' field") - } + // Simple Field (armCodeType) + if pushErr := writeBuffer.PushContext("armCodeType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for armCodeType") + } + _armCodeTypeErr := writeBuffer.WriteSerializable(ctx, m.GetArmCodeType()) + if popErr := writeBuffer.PopContext("armCodeType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for armCodeType") + } + if _armCodeTypeErr != nil { + return errors.Wrap(_armCodeTypeErr, "Error serializing 'armCodeType' field") + } if popErr := writeBuffer.PopContext("SecurityDataSystemArmedDisarmed"); popErr != nil { return errors.Wrap(popErr, "Error popping for SecurityDataSystemArmedDisarmed") @@ -195,6 +200,7 @@ func (m *_SecurityDataSystemArmedDisarmed) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataSystemArmedDisarmed) isSecurityDataSystemArmedDisarmed() bool { return true } @@ -209,3 +215,6 @@ func (m *_SecurityDataSystemArmedDisarmed) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataSystemDisarmed.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataSystemDisarmed.go index b95a0ea1cb6..c4129e312a8 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataSystemDisarmed.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataSystemDisarmed.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataSystemDisarmed is the corresponding interface of SecurityDataSystemDisarmed type SecurityDataSystemDisarmed interface { @@ -46,6 +48,8 @@ type _SecurityDataSystemDisarmed struct { *_SecurityData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,19 +60,19 @@ type _SecurityDataSystemDisarmed struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataSystemDisarmed) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataSystemDisarmed) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataSystemDisarmed) GetParent() SecurityData { +func (m *_SecurityDataSystemDisarmed) GetParent() SecurityData { return m._SecurityData } + // NewSecurityDataSystemDisarmed factory function for _SecurityDataSystemDisarmed -func NewSecurityDataSystemDisarmed(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataSystemDisarmed { +func NewSecurityDataSystemDisarmed( commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataSystemDisarmed { _result := &_SecurityDataSystemDisarmed{ - _SecurityData: NewSecurityData(commandTypeContainer, argument), + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -76,7 +80,7 @@ func NewSecurityDataSystemDisarmed(commandTypeContainer SecurityCommandTypeConta // Deprecated: use the interface for direct cast func CastSecurityDataSystemDisarmed(structType interface{}) SecurityDataSystemDisarmed { - if casted, ok := structType.(SecurityDataSystemDisarmed); ok { + if casted, ok := structType.(SecurityDataSystemDisarmed); ok { return casted } if casted, ok := structType.(*SecurityDataSystemDisarmed); ok { @@ -95,6 +99,7 @@ func (m *_SecurityDataSystemDisarmed) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_SecurityDataSystemDisarmed) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -118,7 +123,8 @@ func SecurityDataSystemDisarmedParseWithBuffer(ctx context.Context, readBuffer u // Create a partially initialized instance _child := &_SecurityDataSystemDisarmed{ - _SecurityData: &_SecurityData{}, + _SecurityData: &_SecurityData{ + }, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -148,6 +154,7 @@ func (m *_SecurityDataSystemDisarmed) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataSystemDisarmed) isSecurityDataSystemDisarmed() bool { return true } @@ -162,3 +169,6 @@ func (m *_SecurityDataSystemDisarmed) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataTamperOff.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataTamperOff.go index aa8de154001..5a773c6c4ea 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataTamperOff.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataTamperOff.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataTamperOff is the corresponding interface of SecurityDataTamperOff type SecurityDataTamperOff interface { @@ -46,6 +48,8 @@ type _SecurityDataTamperOff struct { *_SecurityData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,19 +60,19 @@ type _SecurityDataTamperOff struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataTamperOff) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataTamperOff) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataTamperOff) GetParent() SecurityData { +func (m *_SecurityDataTamperOff) GetParent() SecurityData { return m._SecurityData } + // NewSecurityDataTamperOff factory function for _SecurityDataTamperOff -func NewSecurityDataTamperOff(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataTamperOff { +func NewSecurityDataTamperOff( commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataTamperOff { _result := &_SecurityDataTamperOff{ - _SecurityData: NewSecurityData(commandTypeContainer, argument), + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -76,7 +80,7 @@ func NewSecurityDataTamperOff(commandTypeContainer SecurityCommandTypeContainer, // Deprecated: use the interface for direct cast func CastSecurityDataTamperOff(structType interface{}) SecurityDataTamperOff { - if casted, ok := structType.(SecurityDataTamperOff); ok { + if casted, ok := structType.(SecurityDataTamperOff); ok { return casted } if casted, ok := structType.(*SecurityDataTamperOff); ok { @@ -95,6 +99,7 @@ func (m *_SecurityDataTamperOff) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_SecurityDataTamperOff) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -118,7 +123,8 @@ func SecurityDataTamperOffParseWithBuffer(ctx context.Context, readBuffer utils. // Create a partially initialized instance _child := &_SecurityDataTamperOff{ - _SecurityData: &_SecurityData{}, + _SecurityData: &_SecurityData{ + }, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -148,6 +154,7 @@ func (m *_SecurityDataTamperOff) SerializeWithWriteBuffer(ctx context.Context, w return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataTamperOff) isSecurityDataTamperOff() bool { return true } @@ -162,3 +169,6 @@ func (m *_SecurityDataTamperOff) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataTamperOn.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataTamperOn.go index 39a8acca1f1..ac72b4a8547 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataTamperOn.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataTamperOn.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataTamperOn is the corresponding interface of SecurityDataTamperOn type SecurityDataTamperOn interface { @@ -46,6 +48,8 @@ type _SecurityDataTamperOn struct { *_SecurityData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,19 +60,19 @@ type _SecurityDataTamperOn struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataTamperOn) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataTamperOn) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataTamperOn) GetParent() SecurityData { +func (m *_SecurityDataTamperOn) GetParent() SecurityData { return m._SecurityData } + // NewSecurityDataTamperOn factory function for _SecurityDataTamperOn -func NewSecurityDataTamperOn(commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataTamperOn { +func NewSecurityDataTamperOn( commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataTamperOn { _result := &_SecurityDataTamperOn{ - _SecurityData: NewSecurityData(commandTypeContainer, argument), + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -76,7 +80,7 @@ func NewSecurityDataTamperOn(commandTypeContainer SecurityCommandTypeContainer, // Deprecated: use the interface for direct cast func CastSecurityDataTamperOn(structType interface{}) SecurityDataTamperOn { - if casted, ok := structType.(SecurityDataTamperOn); ok { + if casted, ok := structType.(SecurityDataTamperOn); ok { return casted } if casted, ok := structType.(*SecurityDataTamperOn); ok { @@ -95,6 +99,7 @@ func (m *_SecurityDataTamperOn) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_SecurityDataTamperOn) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -118,7 +123,8 @@ func SecurityDataTamperOnParseWithBuffer(ctx context.Context, readBuffer utils.R // Create a partially initialized instance _child := &_SecurityDataTamperOn{ - _SecurityData: &_SecurityData{}, + _SecurityData: &_SecurityData{ + }, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -148,6 +154,7 @@ func (m *_SecurityDataTamperOn) SerializeWithWriteBuffer(ctx context.Context, wr return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataTamperOn) isSecurityDataTamperOn() bool { return true } @@ -162,3 +169,6 @@ func (m *_SecurityDataTamperOn) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataZoneIsolated.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataZoneIsolated.go index e790cd5d8c8..77d27de170f 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataZoneIsolated.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataZoneIsolated.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataZoneIsolated is the corresponding interface of SecurityDataZoneIsolated type SecurityDataZoneIsolated interface { @@ -46,9 +48,11 @@ type SecurityDataZoneIsolatedExactly interface { // _SecurityDataZoneIsolated is the data-structure of this message type _SecurityDataZoneIsolated struct { *_SecurityData - ZoneNumber uint8 + ZoneNumber uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,15 +63,13 @@ type _SecurityDataZoneIsolated struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataZoneIsolated) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataZoneIsolated) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataZoneIsolated) GetParent() SecurityData { +func (m *_SecurityDataZoneIsolated) GetParent() SecurityData { return m._SecurityData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -82,11 +84,12 @@ func (m *_SecurityDataZoneIsolated) GetZoneNumber() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSecurityDataZoneIsolated factory function for _SecurityDataZoneIsolated -func NewSecurityDataZoneIsolated(zoneNumber uint8, commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataZoneIsolated { +func NewSecurityDataZoneIsolated( zoneNumber uint8 , commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataZoneIsolated { _result := &_SecurityDataZoneIsolated{ - ZoneNumber: zoneNumber, - _SecurityData: NewSecurityData(commandTypeContainer, argument), + ZoneNumber: zoneNumber, + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -94,7 +97,7 @@ func NewSecurityDataZoneIsolated(zoneNumber uint8, commandTypeContainer Security // Deprecated: use the interface for direct cast func CastSecurityDataZoneIsolated(structType interface{}) SecurityDataZoneIsolated { - if casted, ok := structType.(SecurityDataZoneIsolated); ok { + if casted, ok := structType.(SecurityDataZoneIsolated); ok { return casted } if casted, ok := structType.(*SecurityDataZoneIsolated); ok { @@ -111,11 +114,12 @@ func (m *_SecurityDataZoneIsolated) GetLengthInBits(ctx context.Context) uint16 lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (zoneNumber) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_SecurityDataZoneIsolated) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -134,7 +138,7 @@ func SecurityDataZoneIsolatedParseWithBuffer(ctx context.Context, readBuffer uti _ = currentPos // Simple Field (zoneNumber) - _zoneNumber, _zoneNumberErr := readBuffer.ReadUint8("zoneNumber", 8) +_zoneNumber, _zoneNumberErr := readBuffer.ReadUint8("zoneNumber", 8) if _zoneNumberErr != nil { return nil, errors.Wrap(_zoneNumberErr, "Error parsing 'zoneNumber' field of SecurityDataZoneIsolated") } @@ -146,8 +150,9 @@ func SecurityDataZoneIsolatedParseWithBuffer(ctx context.Context, readBuffer uti // Create a partially initialized instance _child := &_SecurityDataZoneIsolated{ - _SecurityData: &_SecurityData{}, - ZoneNumber: zoneNumber, + _SecurityData: &_SecurityData{ + }, + ZoneNumber: zoneNumber, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -169,12 +174,12 @@ func (m *_SecurityDataZoneIsolated) SerializeWithWriteBuffer(ctx context.Context return errors.Wrap(pushErr, "Error pushing for SecurityDataZoneIsolated") } - // Simple Field (zoneNumber) - zoneNumber := uint8(m.GetZoneNumber()) - _zoneNumberErr := writeBuffer.WriteUint8("zoneNumber", 8, (zoneNumber)) - if _zoneNumberErr != nil { - return errors.Wrap(_zoneNumberErr, "Error serializing 'zoneNumber' field") - } + // Simple Field (zoneNumber) + zoneNumber := uint8(m.GetZoneNumber()) + _zoneNumberErr := writeBuffer.WriteUint8("zoneNumber", 8, (zoneNumber)) + if _zoneNumberErr != nil { + return errors.Wrap(_zoneNumberErr, "Error serializing 'zoneNumber' field") + } if popErr := writeBuffer.PopContext("SecurityDataZoneIsolated"); popErr != nil { return errors.Wrap(popErr, "Error popping for SecurityDataZoneIsolated") @@ -184,6 +189,7 @@ func (m *_SecurityDataZoneIsolated) SerializeWithWriteBuffer(ctx context.Context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataZoneIsolated) isSecurityDataZoneIsolated() bool { return true } @@ -198,3 +204,6 @@ func (m *_SecurityDataZoneIsolated) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataZoneName.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataZoneName.go index 4b4658cd96f..8bbd0f4dc68 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataZoneName.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataZoneName.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataZoneName is the corresponding interface of SecurityDataZoneName type SecurityDataZoneName interface { @@ -48,10 +50,12 @@ type SecurityDataZoneNameExactly interface { // _SecurityDataZoneName is the data-structure of this message type _SecurityDataZoneName struct { *_SecurityData - ZoneNumber uint8 - ZoneName string + ZoneNumber uint8 + ZoneName string } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -62,15 +66,13 @@ type _SecurityDataZoneName struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataZoneName) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataZoneName) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataZoneName) GetParent() SecurityData { +func (m *_SecurityDataZoneName) GetParent() SecurityData { return m._SecurityData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -89,12 +91,13 @@ func (m *_SecurityDataZoneName) GetZoneName() string { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSecurityDataZoneName factory function for _SecurityDataZoneName -func NewSecurityDataZoneName(zoneNumber uint8, zoneName string, commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataZoneName { +func NewSecurityDataZoneName( zoneNumber uint8 , zoneName string , commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataZoneName { _result := &_SecurityDataZoneName{ - ZoneNumber: zoneNumber, - ZoneName: zoneName, - _SecurityData: NewSecurityData(commandTypeContainer, argument), + ZoneNumber: zoneNumber, + ZoneName: zoneName, + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -102,7 +105,7 @@ func NewSecurityDataZoneName(zoneNumber uint8, zoneName string, commandTypeConta // Deprecated: use the interface for direct cast func CastSecurityDataZoneName(structType interface{}) SecurityDataZoneName { - if casted, ok := structType.(SecurityDataZoneName); ok { + if casted, ok := structType.(SecurityDataZoneName); ok { return casted } if casted, ok := structType.(*SecurityDataZoneName); ok { @@ -119,14 +122,15 @@ func (m *_SecurityDataZoneName) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (zoneNumber) - lengthInBits += 8 + lengthInBits += 8; // Simple field (zoneName) - lengthInBits += 88 + lengthInBits += 88; return lengthInBits } + func (m *_SecurityDataZoneName) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -145,14 +149,14 @@ func SecurityDataZoneNameParseWithBuffer(ctx context.Context, readBuffer utils.R _ = currentPos // Simple Field (zoneNumber) - _zoneNumber, _zoneNumberErr := readBuffer.ReadUint8("zoneNumber", 8) +_zoneNumber, _zoneNumberErr := readBuffer.ReadUint8("zoneNumber", 8) if _zoneNumberErr != nil { return nil, errors.Wrap(_zoneNumberErr, "Error parsing 'zoneNumber' field of SecurityDataZoneName") } zoneNumber := _zoneNumber // Simple Field (zoneName) - _zoneName, _zoneNameErr := readBuffer.ReadString("zoneName", uint32(88), "UTF-8") +_zoneName, _zoneNameErr := readBuffer.ReadString("zoneName", uint32(88), "UTF-8") if _zoneNameErr != nil { return nil, errors.Wrap(_zoneNameErr, "Error parsing 'zoneName' field of SecurityDataZoneName") } @@ -164,9 +168,10 @@ func SecurityDataZoneNameParseWithBuffer(ctx context.Context, readBuffer utils.R // Create a partially initialized instance _child := &_SecurityDataZoneName{ - _SecurityData: &_SecurityData{}, - ZoneNumber: zoneNumber, - ZoneName: zoneName, + _SecurityData: &_SecurityData{ + }, + ZoneNumber: zoneNumber, + ZoneName: zoneName, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -188,19 +193,19 @@ func (m *_SecurityDataZoneName) SerializeWithWriteBuffer(ctx context.Context, wr return errors.Wrap(pushErr, "Error pushing for SecurityDataZoneName") } - // Simple Field (zoneNumber) - zoneNumber := uint8(m.GetZoneNumber()) - _zoneNumberErr := writeBuffer.WriteUint8("zoneNumber", 8, (zoneNumber)) - if _zoneNumberErr != nil { - return errors.Wrap(_zoneNumberErr, "Error serializing 'zoneNumber' field") - } + // Simple Field (zoneNumber) + zoneNumber := uint8(m.GetZoneNumber()) + _zoneNumberErr := writeBuffer.WriteUint8("zoneNumber", 8, (zoneNumber)) + if _zoneNumberErr != nil { + return errors.Wrap(_zoneNumberErr, "Error serializing 'zoneNumber' field") + } - // Simple Field (zoneName) - zoneName := string(m.GetZoneName()) - _zoneNameErr := writeBuffer.WriteString("zoneName", uint32(88), "UTF-8", (zoneName)) - if _zoneNameErr != nil { - return errors.Wrap(_zoneNameErr, "Error serializing 'zoneName' field") - } + // Simple Field (zoneName) + zoneName := string(m.GetZoneName()) + _zoneNameErr := writeBuffer.WriteString("zoneName", uint32(88), "UTF-8", (zoneName)) + if _zoneNameErr != nil { + return errors.Wrap(_zoneNameErr, "Error serializing 'zoneName' field") + } if popErr := writeBuffer.PopContext("SecurityDataZoneName"); popErr != nil { return errors.Wrap(popErr, "Error popping for SecurityDataZoneName") @@ -210,6 +215,7 @@ func (m *_SecurityDataZoneName) SerializeWithWriteBuffer(ctx context.Context, wr return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataZoneName) isSecurityDataZoneName() bool { return true } @@ -224,3 +230,6 @@ func (m *_SecurityDataZoneName) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataZoneOpen.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataZoneOpen.go index 024b6e729ad..c5cb72f6d86 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataZoneOpen.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataZoneOpen.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataZoneOpen is the corresponding interface of SecurityDataZoneOpen type SecurityDataZoneOpen interface { @@ -46,9 +48,11 @@ type SecurityDataZoneOpenExactly interface { // _SecurityDataZoneOpen is the data-structure of this message type _SecurityDataZoneOpen struct { *_SecurityData - ZoneNumber uint8 + ZoneNumber uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,15 +63,13 @@ type _SecurityDataZoneOpen struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataZoneOpen) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataZoneOpen) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataZoneOpen) GetParent() SecurityData { +func (m *_SecurityDataZoneOpen) GetParent() SecurityData { return m._SecurityData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -82,11 +84,12 @@ func (m *_SecurityDataZoneOpen) GetZoneNumber() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSecurityDataZoneOpen factory function for _SecurityDataZoneOpen -func NewSecurityDataZoneOpen(zoneNumber uint8, commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataZoneOpen { +func NewSecurityDataZoneOpen( zoneNumber uint8 , commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataZoneOpen { _result := &_SecurityDataZoneOpen{ - ZoneNumber: zoneNumber, - _SecurityData: NewSecurityData(commandTypeContainer, argument), + ZoneNumber: zoneNumber, + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -94,7 +97,7 @@ func NewSecurityDataZoneOpen(zoneNumber uint8, commandTypeContainer SecurityComm // Deprecated: use the interface for direct cast func CastSecurityDataZoneOpen(structType interface{}) SecurityDataZoneOpen { - if casted, ok := structType.(SecurityDataZoneOpen); ok { + if casted, ok := structType.(SecurityDataZoneOpen); ok { return casted } if casted, ok := structType.(*SecurityDataZoneOpen); ok { @@ -111,11 +114,12 @@ func (m *_SecurityDataZoneOpen) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (zoneNumber) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_SecurityDataZoneOpen) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -134,7 +138,7 @@ func SecurityDataZoneOpenParseWithBuffer(ctx context.Context, readBuffer utils.R _ = currentPos // Simple Field (zoneNumber) - _zoneNumber, _zoneNumberErr := readBuffer.ReadUint8("zoneNumber", 8) +_zoneNumber, _zoneNumberErr := readBuffer.ReadUint8("zoneNumber", 8) if _zoneNumberErr != nil { return nil, errors.Wrap(_zoneNumberErr, "Error parsing 'zoneNumber' field of SecurityDataZoneOpen") } @@ -146,8 +150,9 @@ func SecurityDataZoneOpenParseWithBuffer(ctx context.Context, readBuffer utils.R // Create a partially initialized instance _child := &_SecurityDataZoneOpen{ - _SecurityData: &_SecurityData{}, - ZoneNumber: zoneNumber, + _SecurityData: &_SecurityData{ + }, + ZoneNumber: zoneNumber, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -169,12 +174,12 @@ func (m *_SecurityDataZoneOpen) SerializeWithWriteBuffer(ctx context.Context, wr return errors.Wrap(pushErr, "Error pushing for SecurityDataZoneOpen") } - // Simple Field (zoneNumber) - zoneNumber := uint8(m.GetZoneNumber()) - _zoneNumberErr := writeBuffer.WriteUint8("zoneNumber", 8, (zoneNumber)) - if _zoneNumberErr != nil { - return errors.Wrap(_zoneNumberErr, "Error serializing 'zoneNumber' field") - } + // Simple Field (zoneNumber) + zoneNumber := uint8(m.GetZoneNumber()) + _zoneNumberErr := writeBuffer.WriteUint8("zoneNumber", 8, (zoneNumber)) + if _zoneNumberErr != nil { + return errors.Wrap(_zoneNumberErr, "Error serializing 'zoneNumber' field") + } if popErr := writeBuffer.PopContext("SecurityDataZoneOpen"); popErr != nil { return errors.Wrap(popErr, "Error popping for SecurityDataZoneOpen") @@ -184,6 +189,7 @@ func (m *_SecurityDataZoneOpen) SerializeWithWriteBuffer(ctx context.Context, wr return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataZoneOpen) isSecurityDataZoneOpen() bool { return true } @@ -198,3 +204,6 @@ func (m *_SecurityDataZoneOpen) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataZoneSealed.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataZoneSealed.go index a43248527a4..a91a2e8f832 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataZoneSealed.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataZoneSealed.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataZoneSealed is the corresponding interface of SecurityDataZoneSealed type SecurityDataZoneSealed interface { @@ -46,9 +48,11 @@ type SecurityDataZoneSealedExactly interface { // _SecurityDataZoneSealed is the data-structure of this message type _SecurityDataZoneSealed struct { *_SecurityData - ZoneNumber uint8 + ZoneNumber uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,15 +63,13 @@ type _SecurityDataZoneSealed struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataZoneSealed) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataZoneSealed) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataZoneSealed) GetParent() SecurityData { +func (m *_SecurityDataZoneSealed) GetParent() SecurityData { return m._SecurityData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -82,11 +84,12 @@ func (m *_SecurityDataZoneSealed) GetZoneNumber() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSecurityDataZoneSealed factory function for _SecurityDataZoneSealed -func NewSecurityDataZoneSealed(zoneNumber uint8, commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataZoneSealed { +func NewSecurityDataZoneSealed( zoneNumber uint8 , commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataZoneSealed { _result := &_SecurityDataZoneSealed{ - ZoneNumber: zoneNumber, - _SecurityData: NewSecurityData(commandTypeContainer, argument), + ZoneNumber: zoneNumber, + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -94,7 +97,7 @@ func NewSecurityDataZoneSealed(zoneNumber uint8, commandTypeContainer SecurityCo // Deprecated: use the interface for direct cast func CastSecurityDataZoneSealed(structType interface{}) SecurityDataZoneSealed { - if casted, ok := structType.(SecurityDataZoneSealed); ok { + if casted, ok := structType.(SecurityDataZoneSealed); ok { return casted } if casted, ok := structType.(*SecurityDataZoneSealed); ok { @@ -111,11 +114,12 @@ func (m *_SecurityDataZoneSealed) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (zoneNumber) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_SecurityDataZoneSealed) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -134,7 +138,7 @@ func SecurityDataZoneSealedParseWithBuffer(ctx context.Context, readBuffer utils _ = currentPos // Simple Field (zoneNumber) - _zoneNumber, _zoneNumberErr := readBuffer.ReadUint8("zoneNumber", 8) +_zoneNumber, _zoneNumberErr := readBuffer.ReadUint8("zoneNumber", 8) if _zoneNumberErr != nil { return nil, errors.Wrap(_zoneNumberErr, "Error parsing 'zoneNumber' field of SecurityDataZoneSealed") } @@ -146,8 +150,9 @@ func SecurityDataZoneSealedParseWithBuffer(ctx context.Context, readBuffer utils // Create a partially initialized instance _child := &_SecurityDataZoneSealed{ - _SecurityData: &_SecurityData{}, - ZoneNumber: zoneNumber, + _SecurityData: &_SecurityData{ + }, + ZoneNumber: zoneNumber, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -169,12 +174,12 @@ func (m *_SecurityDataZoneSealed) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for SecurityDataZoneSealed") } - // Simple Field (zoneNumber) - zoneNumber := uint8(m.GetZoneNumber()) - _zoneNumberErr := writeBuffer.WriteUint8("zoneNumber", 8, (zoneNumber)) - if _zoneNumberErr != nil { - return errors.Wrap(_zoneNumberErr, "Error serializing 'zoneNumber' field") - } + // Simple Field (zoneNumber) + zoneNumber := uint8(m.GetZoneNumber()) + _zoneNumberErr := writeBuffer.WriteUint8("zoneNumber", 8, (zoneNumber)) + if _zoneNumberErr != nil { + return errors.Wrap(_zoneNumberErr, "Error serializing 'zoneNumber' field") + } if popErr := writeBuffer.PopContext("SecurityDataZoneSealed"); popErr != nil { return errors.Wrap(popErr, "Error popping for SecurityDataZoneSealed") @@ -184,6 +189,7 @@ func (m *_SecurityDataZoneSealed) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataZoneSealed) isSecurityDataZoneSealed() bool { return true } @@ -198,3 +204,6 @@ func (m *_SecurityDataZoneSealed) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataZoneShort.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataZoneShort.go index 7cbac997735..0aa10cc2e11 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataZoneShort.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataZoneShort.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataZoneShort is the corresponding interface of SecurityDataZoneShort type SecurityDataZoneShort interface { @@ -46,9 +48,11 @@ type SecurityDataZoneShortExactly interface { // _SecurityDataZoneShort is the data-structure of this message type _SecurityDataZoneShort struct { *_SecurityData - ZoneNumber uint8 + ZoneNumber uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,15 +63,13 @@ type _SecurityDataZoneShort struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataZoneShort) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataZoneShort) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataZoneShort) GetParent() SecurityData { +func (m *_SecurityDataZoneShort) GetParent() SecurityData { return m._SecurityData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -82,11 +84,12 @@ func (m *_SecurityDataZoneShort) GetZoneNumber() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSecurityDataZoneShort factory function for _SecurityDataZoneShort -func NewSecurityDataZoneShort(zoneNumber uint8, commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataZoneShort { +func NewSecurityDataZoneShort( zoneNumber uint8 , commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataZoneShort { _result := &_SecurityDataZoneShort{ - ZoneNumber: zoneNumber, - _SecurityData: NewSecurityData(commandTypeContainer, argument), + ZoneNumber: zoneNumber, + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -94,7 +97,7 @@ func NewSecurityDataZoneShort(zoneNumber uint8, commandTypeContainer SecurityCom // Deprecated: use the interface for direct cast func CastSecurityDataZoneShort(structType interface{}) SecurityDataZoneShort { - if casted, ok := structType.(SecurityDataZoneShort); ok { + if casted, ok := structType.(SecurityDataZoneShort); ok { return casted } if casted, ok := structType.(*SecurityDataZoneShort); ok { @@ -111,11 +114,12 @@ func (m *_SecurityDataZoneShort) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (zoneNumber) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_SecurityDataZoneShort) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -134,7 +138,7 @@ func SecurityDataZoneShortParseWithBuffer(ctx context.Context, readBuffer utils. _ = currentPos // Simple Field (zoneNumber) - _zoneNumber, _zoneNumberErr := readBuffer.ReadUint8("zoneNumber", 8) +_zoneNumber, _zoneNumberErr := readBuffer.ReadUint8("zoneNumber", 8) if _zoneNumberErr != nil { return nil, errors.Wrap(_zoneNumberErr, "Error parsing 'zoneNumber' field of SecurityDataZoneShort") } @@ -146,8 +150,9 @@ func SecurityDataZoneShortParseWithBuffer(ctx context.Context, readBuffer utils. // Create a partially initialized instance _child := &_SecurityDataZoneShort{ - _SecurityData: &_SecurityData{}, - ZoneNumber: zoneNumber, + _SecurityData: &_SecurityData{ + }, + ZoneNumber: zoneNumber, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -169,12 +174,12 @@ func (m *_SecurityDataZoneShort) SerializeWithWriteBuffer(ctx context.Context, w return errors.Wrap(pushErr, "Error pushing for SecurityDataZoneShort") } - // Simple Field (zoneNumber) - zoneNumber := uint8(m.GetZoneNumber()) - _zoneNumberErr := writeBuffer.WriteUint8("zoneNumber", 8, (zoneNumber)) - if _zoneNumberErr != nil { - return errors.Wrap(_zoneNumberErr, "Error serializing 'zoneNumber' field") - } + // Simple Field (zoneNumber) + zoneNumber := uint8(m.GetZoneNumber()) + _zoneNumberErr := writeBuffer.WriteUint8("zoneNumber", 8, (zoneNumber)) + if _zoneNumberErr != nil { + return errors.Wrap(_zoneNumberErr, "Error serializing 'zoneNumber' field") + } if popErr := writeBuffer.PopContext("SecurityDataZoneShort"); popErr != nil { return errors.Wrap(popErr, "Error popping for SecurityDataZoneShort") @@ -184,6 +189,7 @@ func (m *_SecurityDataZoneShort) SerializeWithWriteBuffer(ctx context.Context, w return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataZoneShort) isSecurityDataZoneShort() bool { return true } @@ -198,3 +204,6 @@ func (m *_SecurityDataZoneShort) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SecurityDataZoneUnsealed.go b/plc4go/protocols/cbus/readwrite/model/SecurityDataZoneUnsealed.go index 44909ea5c92..9ded53075d8 100644 --- a/plc4go/protocols/cbus/readwrite/model/SecurityDataZoneUnsealed.go +++ b/plc4go/protocols/cbus/readwrite/model/SecurityDataZoneUnsealed.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SecurityDataZoneUnsealed is the corresponding interface of SecurityDataZoneUnsealed type SecurityDataZoneUnsealed interface { @@ -46,9 +48,11 @@ type SecurityDataZoneUnsealedExactly interface { // _SecurityDataZoneUnsealed is the data-structure of this message type _SecurityDataZoneUnsealed struct { *_SecurityData - ZoneNumber uint8 + ZoneNumber uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,15 +63,13 @@ type _SecurityDataZoneUnsealed struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SecurityDataZoneUnsealed) InitializeParent(parent SecurityData, commandTypeContainer SecurityCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_SecurityDataZoneUnsealed) InitializeParent(parent SecurityData , commandTypeContainer SecurityCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_SecurityDataZoneUnsealed) GetParent() SecurityData { +func (m *_SecurityDataZoneUnsealed) GetParent() SecurityData { return m._SecurityData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -82,11 +84,12 @@ func (m *_SecurityDataZoneUnsealed) GetZoneNumber() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSecurityDataZoneUnsealed factory function for _SecurityDataZoneUnsealed -func NewSecurityDataZoneUnsealed(zoneNumber uint8, commandTypeContainer SecurityCommandTypeContainer, argument byte) *_SecurityDataZoneUnsealed { +func NewSecurityDataZoneUnsealed( zoneNumber uint8 , commandTypeContainer SecurityCommandTypeContainer , argument byte ) *_SecurityDataZoneUnsealed { _result := &_SecurityDataZoneUnsealed{ - ZoneNumber: zoneNumber, - _SecurityData: NewSecurityData(commandTypeContainer, argument), + ZoneNumber: zoneNumber, + _SecurityData: NewSecurityData(commandTypeContainer, argument), } _result._SecurityData._SecurityDataChildRequirements = _result return _result @@ -94,7 +97,7 @@ func NewSecurityDataZoneUnsealed(zoneNumber uint8, commandTypeContainer Security // Deprecated: use the interface for direct cast func CastSecurityDataZoneUnsealed(structType interface{}) SecurityDataZoneUnsealed { - if casted, ok := structType.(SecurityDataZoneUnsealed); ok { + if casted, ok := structType.(SecurityDataZoneUnsealed); ok { return casted } if casted, ok := structType.(*SecurityDataZoneUnsealed); ok { @@ -111,11 +114,12 @@ func (m *_SecurityDataZoneUnsealed) GetLengthInBits(ctx context.Context) uint16 lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (zoneNumber) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_SecurityDataZoneUnsealed) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -134,7 +138,7 @@ func SecurityDataZoneUnsealedParseWithBuffer(ctx context.Context, readBuffer uti _ = currentPos // Simple Field (zoneNumber) - _zoneNumber, _zoneNumberErr := readBuffer.ReadUint8("zoneNumber", 8) +_zoneNumber, _zoneNumberErr := readBuffer.ReadUint8("zoneNumber", 8) if _zoneNumberErr != nil { return nil, errors.Wrap(_zoneNumberErr, "Error parsing 'zoneNumber' field of SecurityDataZoneUnsealed") } @@ -146,8 +150,9 @@ func SecurityDataZoneUnsealedParseWithBuffer(ctx context.Context, readBuffer uti // Create a partially initialized instance _child := &_SecurityDataZoneUnsealed{ - _SecurityData: &_SecurityData{}, - ZoneNumber: zoneNumber, + _SecurityData: &_SecurityData{ + }, + ZoneNumber: zoneNumber, } _child._SecurityData._SecurityDataChildRequirements = _child return _child, nil @@ -169,12 +174,12 @@ func (m *_SecurityDataZoneUnsealed) SerializeWithWriteBuffer(ctx context.Context return errors.Wrap(pushErr, "Error pushing for SecurityDataZoneUnsealed") } - // Simple Field (zoneNumber) - zoneNumber := uint8(m.GetZoneNumber()) - _zoneNumberErr := writeBuffer.WriteUint8("zoneNumber", 8, (zoneNumber)) - if _zoneNumberErr != nil { - return errors.Wrap(_zoneNumberErr, "Error serializing 'zoneNumber' field") - } + // Simple Field (zoneNumber) + zoneNumber := uint8(m.GetZoneNumber()) + _zoneNumberErr := writeBuffer.WriteUint8("zoneNumber", 8, (zoneNumber)) + if _zoneNumberErr != nil { + return errors.Wrap(_zoneNumberErr, "Error serializing 'zoneNumber' field") + } if popErr := writeBuffer.PopContext("SecurityDataZoneUnsealed"); popErr != nil { return errors.Wrap(popErr, "Error popping for SecurityDataZoneUnsealed") @@ -184,6 +189,7 @@ func (m *_SecurityDataZoneUnsealed) SerializeWithWriteBuffer(ctx context.Context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SecurityDataZoneUnsealed) isSecurityDataZoneUnsealed() bool { return true } @@ -198,3 +204,6 @@ func (m *_SecurityDataZoneUnsealed) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SerialInterfaceAddress.go b/plc4go/protocols/cbus/readwrite/model/SerialInterfaceAddress.go index 7dd99bb5a15..0ebc530cccc 100644 --- a/plc4go/protocols/cbus/readwrite/model/SerialInterfaceAddress.go +++ b/plc4go/protocols/cbus/readwrite/model/SerialInterfaceAddress.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SerialInterfaceAddress is the corresponding interface of SerialInterfaceAddress type SerialInterfaceAddress interface { @@ -44,9 +46,10 @@ type SerialInterfaceAddressExactly interface { // _SerialInterfaceAddress is the data-structure of this message type _SerialInterfaceAddress struct { - Address byte + Address byte } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -61,14 +64,15 @@ func (m *_SerialInterfaceAddress) GetAddress() byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSerialInterfaceAddress factory function for _SerialInterfaceAddress -func NewSerialInterfaceAddress(address byte) *_SerialInterfaceAddress { - return &_SerialInterfaceAddress{Address: address} +func NewSerialInterfaceAddress( address byte ) *_SerialInterfaceAddress { +return &_SerialInterfaceAddress{ Address: address } } // Deprecated: use the interface for direct cast func CastSerialInterfaceAddress(structType interface{}) SerialInterfaceAddress { - if casted, ok := structType.(SerialInterfaceAddress); ok { + if casted, ok := structType.(SerialInterfaceAddress); ok { return casted } if casted, ok := structType.(*SerialInterfaceAddress); ok { @@ -85,11 +89,12 @@ func (m *_SerialInterfaceAddress) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (address) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_SerialInterfaceAddress) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -108,7 +113,7 @@ func SerialInterfaceAddressParseWithBuffer(ctx context.Context, readBuffer utils _ = currentPos // Simple Field (address) - _address, _addressErr := readBuffer.ReadByte("address") +_address, _addressErr := readBuffer.ReadByte("address") if _addressErr != nil { return nil, errors.Wrap(_addressErr, "Error parsing 'address' field of SerialInterfaceAddress") } @@ -120,8 +125,8 @@ func SerialInterfaceAddressParseWithBuffer(ctx context.Context, readBuffer utils // Create the instance return &_SerialInterfaceAddress{ - Address: address, - }, nil + Address: address, + }, nil } func (m *_SerialInterfaceAddress) Serialize() ([]byte, error) { @@ -135,7 +140,7 @@ func (m *_SerialInterfaceAddress) Serialize() ([]byte, error) { func (m *_SerialInterfaceAddress) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("SerialInterfaceAddress"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("SerialInterfaceAddress"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for SerialInterfaceAddress") } @@ -152,6 +157,7 @@ func (m *_SerialInterfaceAddress) SerializeWithWriteBuffer(ctx context.Context, return nil } + func (m *_SerialInterfaceAddress) isSerialInterfaceAddress() bool { return true } @@ -166,3 +172,6 @@ func (m *_SerialInterfaceAddress) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/SerialNumber.go b/plc4go/protocols/cbus/readwrite/model/SerialNumber.go index 572983fd3ce..907166284e8 100644 --- a/plc4go/protocols/cbus/readwrite/model/SerialNumber.go +++ b/plc4go/protocols/cbus/readwrite/model/SerialNumber.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SerialNumber is the corresponding interface of SerialNumber type SerialNumber interface { @@ -50,12 +52,13 @@ type SerialNumberExactly interface { // _SerialNumber is the data-structure of this message type _SerialNumber struct { - Octet1 byte - Octet2 byte - Octet3 byte - Octet4 byte + Octet1 byte + Octet2 byte + Octet3 byte + Octet4 byte } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -82,14 +85,15 @@ func (m *_SerialNumber) GetOctet4() byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSerialNumber factory function for _SerialNumber -func NewSerialNumber(octet1 byte, octet2 byte, octet3 byte, octet4 byte) *_SerialNumber { - return &_SerialNumber{Octet1: octet1, Octet2: octet2, Octet3: octet3, Octet4: octet4} +func NewSerialNumber( octet1 byte , octet2 byte , octet3 byte , octet4 byte ) *_SerialNumber { +return &_SerialNumber{ Octet1: octet1 , Octet2: octet2 , Octet3: octet3 , Octet4: octet4 } } // Deprecated: use the interface for direct cast func CastSerialNumber(structType interface{}) SerialNumber { - if casted, ok := structType.(SerialNumber); ok { + if casted, ok := structType.(SerialNumber); ok { return casted } if casted, ok := structType.(*SerialNumber); ok { @@ -106,20 +110,21 @@ func (m *_SerialNumber) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (octet1) - lengthInBits += 8 + lengthInBits += 8; // Simple field (octet2) - lengthInBits += 8 + lengthInBits += 8; // Simple field (octet3) - lengthInBits += 8 + lengthInBits += 8; // Simple field (octet4) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_SerialNumber) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,28 +143,28 @@ func SerialNumberParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe _ = currentPos // Simple Field (octet1) - _octet1, _octet1Err := readBuffer.ReadByte("octet1") +_octet1, _octet1Err := readBuffer.ReadByte("octet1") if _octet1Err != nil { return nil, errors.Wrap(_octet1Err, "Error parsing 'octet1' field of SerialNumber") } octet1 := _octet1 // Simple Field (octet2) - _octet2, _octet2Err := readBuffer.ReadByte("octet2") +_octet2, _octet2Err := readBuffer.ReadByte("octet2") if _octet2Err != nil { return nil, errors.Wrap(_octet2Err, "Error parsing 'octet2' field of SerialNumber") } octet2 := _octet2 // Simple Field (octet3) - _octet3, _octet3Err := readBuffer.ReadByte("octet3") +_octet3, _octet3Err := readBuffer.ReadByte("octet3") if _octet3Err != nil { return nil, errors.Wrap(_octet3Err, "Error parsing 'octet3' field of SerialNumber") } octet3 := _octet3 // Simple Field (octet4) - _octet4, _octet4Err := readBuffer.ReadByte("octet4") +_octet4, _octet4Err := readBuffer.ReadByte("octet4") if _octet4Err != nil { return nil, errors.Wrap(_octet4Err, "Error parsing 'octet4' field of SerialNumber") } @@ -171,11 +176,11 @@ func SerialNumberParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe // Create the instance return &_SerialNumber{ - Octet1: octet1, - Octet2: octet2, - Octet3: octet3, - Octet4: octet4, - }, nil + Octet1: octet1, + Octet2: octet2, + Octet3: octet3, + Octet4: octet4, + }, nil } func (m *_SerialNumber) Serialize() ([]byte, error) { @@ -189,7 +194,7 @@ func (m *_SerialNumber) Serialize() ([]byte, error) { func (m *_SerialNumber) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("SerialNumber"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("SerialNumber"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for SerialNumber") } @@ -227,6 +232,7 @@ func (m *_SerialNumber) SerializeWithWriteBuffer(ctx context.Context, writeBuffe return nil } + func (m *_SerialNumber) isSerialNumber() bool { return true } @@ -241,3 +247,6 @@ func (m *_SerialNumber) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/ServerErrorReply.go b/plc4go/protocols/cbus/readwrite/model/ServerErrorReply.go index f996fad4268..9b9824d85e5 100644 --- a/plc4go/protocols/cbus/readwrite/model/ServerErrorReply.go +++ b/plc4go/protocols/cbus/readwrite/model/ServerErrorReply.go @@ -19,6 +19,7 @@ package model + import ( "context" "fmt" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const ServerErrorReply_ERRORMARKER byte = 0x21 @@ -50,6 +52,8 @@ type _ServerErrorReply struct { *_ReplyOrConfirmation } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -60,14 +64,12 @@ type _ServerErrorReply struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ServerErrorReply) InitializeParent(parent ReplyOrConfirmation, peekedByte byte) { - m.PeekedByte = peekedByte +func (m *_ServerErrorReply) InitializeParent(parent ReplyOrConfirmation , peekedByte byte ) { m.PeekedByte = peekedByte } -func (m *_ServerErrorReply) GetParent() ReplyOrConfirmation { +func (m *_ServerErrorReply) GetParent() ReplyOrConfirmation { return m._ReplyOrConfirmation } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for const fields. @@ -82,10 +84,11 @@ func (m *_ServerErrorReply) GetErrorMarker() byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewServerErrorReply factory function for _ServerErrorReply -func NewServerErrorReply(peekedByte byte, cBusOptions CBusOptions, requestContext RequestContext) *_ServerErrorReply { +func NewServerErrorReply( peekedByte byte , cBusOptions CBusOptions , requestContext RequestContext ) *_ServerErrorReply { _result := &_ServerErrorReply{ - _ReplyOrConfirmation: NewReplyOrConfirmation(peekedByte, cBusOptions, requestContext), + _ReplyOrConfirmation: NewReplyOrConfirmation(peekedByte, cBusOptions, requestContext), } _result._ReplyOrConfirmation._ReplyOrConfirmationChildRequirements = _result return _result @@ -93,7 +96,7 @@ func NewServerErrorReply(peekedByte byte, cBusOptions CBusOptions, requestContex // Deprecated: use the interface for direct cast func CastServerErrorReply(structType interface{}) ServerErrorReply { - if casted, ok := structType.(ServerErrorReply); ok { + if casted, ok := structType.(ServerErrorReply); ok { return casted } if casted, ok := structType.(*ServerErrorReply); ok { @@ -115,6 +118,7 @@ func (m *_ServerErrorReply) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_ServerErrorReply) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -148,7 +152,7 @@ func ServerErrorReplyParseWithBuffer(ctx context.Context, readBuffer utils.ReadB // Create a partially initialized instance _child := &_ServerErrorReply{ _ReplyOrConfirmation: &_ReplyOrConfirmation{ - CBusOptions: cBusOptions, + CBusOptions: cBusOptions, RequestContext: requestContext, }, } @@ -172,11 +176,11 @@ func (m *_ServerErrorReply) SerializeWithWriteBuffer(ctx context.Context, writeB return errors.Wrap(pushErr, "Error pushing for ServerErrorReply") } - // Const Field (errorMarker) - _errorMarkerErr := writeBuffer.WriteByte("errorMarker", 0x21) - if _errorMarkerErr != nil { - return errors.Wrap(_errorMarkerErr, "Error serializing 'errorMarker' field") - } + // Const Field (errorMarker) + _errorMarkerErr := writeBuffer.WriteByte("errorMarker", 0x21) + if _errorMarkerErr != nil { + return errors.Wrap(_errorMarkerErr, "Error serializing 'errorMarker' field") + } if popErr := writeBuffer.PopContext("ServerErrorReply"); popErr != nil { return errors.Wrap(popErr, "Error popping for ServerErrorReply") @@ -186,6 +190,7 @@ func (m *_ServerErrorReply) SerializeWithWriteBuffer(ctx context.Context, writeB return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ServerErrorReply) isServerErrorReply() bool { return true } @@ -200,3 +205,6 @@ func (m *_ServerErrorReply) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/StatusByte.go b/plc4go/protocols/cbus/readwrite/model/StatusByte.go index b5cfe81eede..d865585f9c6 100644 --- a/plc4go/protocols/cbus/readwrite/model/StatusByte.go +++ b/plc4go/protocols/cbus/readwrite/model/StatusByte.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // StatusByte is the corresponding interface of StatusByte type StatusByte interface { @@ -50,12 +52,13 @@ type StatusByteExactly interface { // _StatusByte is the data-structure of this message type _StatusByte struct { - Gav3 GAVState - Gav2 GAVState - Gav1 GAVState - Gav0 GAVState + Gav3 GAVState + Gav2 GAVState + Gav1 GAVState + Gav0 GAVState } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -82,14 +85,15 @@ func (m *_StatusByte) GetGav0() GAVState { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewStatusByte factory function for _StatusByte -func NewStatusByte(gav3 GAVState, gav2 GAVState, gav1 GAVState, gav0 GAVState) *_StatusByte { - return &_StatusByte{Gav3: gav3, Gav2: gav2, Gav1: gav1, Gav0: gav0} +func NewStatusByte( gav3 GAVState , gav2 GAVState , gav1 GAVState , gav0 GAVState ) *_StatusByte { +return &_StatusByte{ Gav3: gav3 , Gav2: gav2 , Gav1: gav1 , Gav0: gav0 } } // Deprecated: use the interface for direct cast func CastStatusByte(structType interface{}) StatusByte { - if casted, ok := structType.(StatusByte); ok { + if casted, ok := structType.(StatusByte); ok { return casted } if casted, ok := structType.(*StatusByte); ok { @@ -120,6 +124,7 @@ func (m *_StatusByte) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_StatusByte) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -141,7 +146,7 @@ func StatusByteParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) if pullErr := readBuffer.PullContext("gav3"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for gav3") } - _gav3, _gav3Err := GAVStateParseWithBuffer(ctx, readBuffer) +_gav3, _gav3Err := GAVStateParseWithBuffer(ctx, readBuffer) if _gav3Err != nil { return nil, errors.Wrap(_gav3Err, "Error parsing 'gav3' field of StatusByte") } @@ -154,7 +159,7 @@ func StatusByteParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) if pullErr := readBuffer.PullContext("gav2"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for gav2") } - _gav2, _gav2Err := GAVStateParseWithBuffer(ctx, readBuffer) +_gav2, _gav2Err := GAVStateParseWithBuffer(ctx, readBuffer) if _gav2Err != nil { return nil, errors.Wrap(_gav2Err, "Error parsing 'gav2' field of StatusByte") } @@ -167,7 +172,7 @@ func StatusByteParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) if pullErr := readBuffer.PullContext("gav1"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for gav1") } - _gav1, _gav1Err := GAVStateParseWithBuffer(ctx, readBuffer) +_gav1, _gav1Err := GAVStateParseWithBuffer(ctx, readBuffer) if _gav1Err != nil { return nil, errors.Wrap(_gav1Err, "Error parsing 'gav1' field of StatusByte") } @@ -180,7 +185,7 @@ func StatusByteParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) if pullErr := readBuffer.PullContext("gav0"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for gav0") } - _gav0, _gav0Err := GAVStateParseWithBuffer(ctx, readBuffer) +_gav0, _gav0Err := GAVStateParseWithBuffer(ctx, readBuffer) if _gav0Err != nil { return nil, errors.Wrap(_gav0Err, "Error parsing 'gav0' field of StatusByte") } @@ -195,11 +200,11 @@ func StatusByteParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) // Create the instance return &_StatusByte{ - Gav3: gav3, - Gav2: gav2, - Gav1: gav1, - Gav0: gav0, - }, nil + Gav3: gav3, + Gav2: gav2, + Gav1: gav1, + Gav0: gav0, + }, nil } func (m *_StatusByte) Serialize() ([]byte, error) { @@ -213,7 +218,7 @@ func (m *_StatusByte) Serialize() ([]byte, error) { func (m *_StatusByte) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("StatusByte"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("StatusByte"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for StatusByte") } @@ -271,6 +276,7 @@ func (m *_StatusByte) SerializeWithWriteBuffer(ctx context.Context, writeBuffer return nil } + func (m *_StatusByte) isStatusByte() bool { return true } @@ -285,3 +291,6 @@ func (m *_StatusByte) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/StatusCoding.go b/plc4go/protocols/cbus/readwrite/model/StatusCoding.go index 94fe070c36f..65ab329e45d 100644 --- a/plc4go/protocols/cbus/readwrite/model/StatusCoding.go +++ b/plc4go/protocols/cbus/readwrite/model/StatusCoding.go @@ -34,18 +34,18 @@ type IStatusCoding interface { utils.Serializable } -const ( +const( StatusCoding_BINARY_BY_THIS_SERIAL_INTERFACE StatusCoding = 0x00 - StatusCoding_BINARY_BY_ELSEWHERE StatusCoding = 0x40 - StatusCoding_LEVEL_BY_THIS_SERIAL_INTERFACE StatusCoding = 0x07 - StatusCoding_LEVEL_BY_ELSEWHERE StatusCoding = 0x47 + StatusCoding_BINARY_BY_ELSEWHERE StatusCoding = 0x40 + StatusCoding_LEVEL_BY_THIS_SERIAL_INTERFACE StatusCoding = 0x07 + StatusCoding_LEVEL_BY_ELSEWHERE StatusCoding = 0x47 ) var StatusCodingValues []StatusCoding func init() { _ = errors.New - StatusCodingValues = []StatusCoding{ + StatusCodingValues = []StatusCoding { StatusCoding_BINARY_BY_THIS_SERIAL_INTERFACE, StatusCoding_BINARY_BY_ELSEWHERE, StatusCoding_LEVEL_BY_THIS_SERIAL_INTERFACE, @@ -55,14 +55,14 @@ func init() { func StatusCodingByValue(value byte) (enum StatusCoding, ok bool) { switch value { - case 0x00: - return StatusCoding_BINARY_BY_THIS_SERIAL_INTERFACE, true - case 0x07: - return StatusCoding_LEVEL_BY_THIS_SERIAL_INTERFACE, true - case 0x40: - return StatusCoding_BINARY_BY_ELSEWHERE, true - case 0x47: - return StatusCoding_LEVEL_BY_ELSEWHERE, true + case 0x00: + return StatusCoding_BINARY_BY_THIS_SERIAL_INTERFACE, true + case 0x07: + return StatusCoding_LEVEL_BY_THIS_SERIAL_INTERFACE, true + case 0x40: + return StatusCoding_BINARY_BY_ELSEWHERE, true + case 0x47: + return StatusCoding_LEVEL_BY_ELSEWHERE, true } return 0, false } @@ -81,13 +81,13 @@ func StatusCodingByName(value string) (enum StatusCoding, ok bool) { return 0, false } -func StatusCodingKnows(value byte) bool { +func StatusCodingKnows(value byte) bool { for _, typeValue := range StatusCodingValues { if byte(typeValue) == value { return true } } - return false + return false; } func CastStatusCoding(structType interface{}) StatusCoding { @@ -155,3 +155,4 @@ func (e StatusCoding) PLC4XEnumName() string { func (e StatusCoding) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/StatusRequest.go b/plc4go/protocols/cbus/readwrite/model/StatusRequest.go index 91ce82b75c7..5b3b517be5d 100644 --- a/plc4go/protocols/cbus/readwrite/model/StatusRequest.go +++ b/plc4go/protocols/cbus/readwrite/model/StatusRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // StatusRequest is the corresponding interface of StatusRequest type StatusRequest interface { @@ -45,7 +47,7 @@ type StatusRequestExactly interface { // _StatusRequest is the data-structure of this message type _StatusRequest struct { _StatusRequestChildRequirements - StatusType byte + StatusType byte } type _StatusRequestChildRequirements interface { @@ -53,6 +55,7 @@ type _StatusRequestChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type StatusRequestParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child StatusRequest, serializeChildFunction func() error) error GetTypeName() string @@ -60,13 +63,12 @@ type StatusRequestParent interface { type StatusRequestChild interface { utils.Serializable - InitializeParent(parent StatusRequest, statusType byte) +InitializeParent(parent StatusRequest , statusType byte ) GetParent() *StatusRequest GetTypeName() string StatusRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,14 +83,15 @@ func (m *_StatusRequest) GetStatusType() byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewStatusRequest factory function for _StatusRequest -func NewStatusRequest(statusType byte) *_StatusRequest { - return &_StatusRequest{StatusType: statusType} +func NewStatusRequest( statusType byte ) *_StatusRequest { +return &_StatusRequest{ StatusType: statusType } } // Deprecated: use the interface for direct cast func CastStatusRequest(structType interface{}) StatusRequest { - if casted, ok := structType.(StatusRequest); ok { + if casted, ok := structType.(StatusRequest); ok { return casted } if casted, ok := structType.(*StatusRequest); ok { @@ -101,6 +104,7 @@ func (m *_StatusRequest) GetTypeName() string { return "StatusRequest" } + func (m *_StatusRequest) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -124,31 +128,31 @@ func StatusRequestParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff currentPos := positionAware.GetPos() _ = currentPos - // Peek Field (statusType) - currentPos = positionAware.GetPos() - statusType, _err := readBuffer.ReadByte("statusType") - if _err != nil { - return nil, errors.Wrap(_err, "Error parsing 'statusType' field of StatusRequest") - } + // Peek Field (statusType) + currentPos = positionAware.GetPos() + statusType, _err := readBuffer.ReadByte("statusType") + if _err != nil { + return nil, errors.Wrap(_err, "Error parsing 'statusType' field of StatusRequest") + } - readBuffer.Reset(currentPos) + readBuffer.Reset(currentPos) // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type StatusRequestChildSerializeRequirement interface { StatusRequest - InitializeParent(StatusRequest, byte) + InitializeParent(StatusRequest, byte) GetParent() StatusRequest } var _childTemp interface{} var _child StatusRequestChildSerializeRequirement var typeSwitchError error switch { - case statusType == 0x7A: // StatusRequestBinaryState - _childTemp, typeSwitchError = StatusRequestBinaryStateParseWithBuffer(ctx, readBuffer) - case statusType == 0xFA: // StatusRequestBinaryStateDeprecated - _childTemp, typeSwitchError = StatusRequestBinaryStateDeprecatedParseWithBuffer(ctx, readBuffer) - case statusType == 0x73: // StatusRequestLevel - _childTemp, typeSwitchError = StatusRequestLevelParseWithBuffer(ctx, readBuffer) +case statusType == 0x7A : // StatusRequestBinaryState + _childTemp, typeSwitchError = StatusRequestBinaryStateParseWithBuffer(ctx, readBuffer, ) +case statusType == 0xFA : // StatusRequestBinaryStateDeprecated + _childTemp, typeSwitchError = StatusRequestBinaryStateDeprecatedParseWithBuffer(ctx, readBuffer, ) +case statusType == 0x73 : // StatusRequestLevel + _childTemp, typeSwitchError = StatusRequestLevelParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [statusType=%v]", statusType) } @@ -162,7 +166,7 @@ func StatusRequestParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff } // Finish initializing - _child.InitializeParent(_child, statusType) +_child.InitializeParent(_child , statusType ) return _child, nil } @@ -172,7 +176,7 @@ func (pm *_StatusRequest) SerializeParent(ctx context.Context, writeBuffer utils _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("StatusRequest"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("StatusRequest"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for StatusRequest") } @@ -187,6 +191,7 @@ func (pm *_StatusRequest) SerializeParent(ctx context.Context, writeBuffer utils return nil } + func (m *_StatusRequest) isStatusRequest() bool { return true } @@ -201,3 +206,6 @@ func (m *_StatusRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/StatusRequestBinaryState.go b/plc4go/protocols/cbus/readwrite/model/StatusRequestBinaryState.go index 737399e4046..f78792111ed 100644 --- a/plc4go/protocols/cbus/readwrite/model/StatusRequestBinaryState.go +++ b/plc4go/protocols/cbus/readwrite/model/StatusRequestBinaryState.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // StatusRequestBinaryState is the corresponding interface of StatusRequestBinaryState type StatusRequestBinaryState interface { @@ -46,12 +48,14 @@ type StatusRequestBinaryStateExactly interface { // _StatusRequestBinaryState is the data-structure of this message type _StatusRequestBinaryState struct { *_StatusRequest - Application ApplicationIdContainer + Application ApplicationIdContainer // Reserved Fields reservedField0 *byte reservedField1 *byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -62,14 +66,12 @@ type _StatusRequestBinaryState struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_StatusRequestBinaryState) InitializeParent(parent StatusRequest, statusType byte) { - m.StatusType = statusType +func (m *_StatusRequestBinaryState) InitializeParent(parent StatusRequest , statusType byte ) { m.StatusType = statusType } -func (m *_StatusRequestBinaryState) GetParent() StatusRequest { +func (m *_StatusRequestBinaryState) GetParent() StatusRequest { return m._StatusRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -84,11 +86,12 @@ func (m *_StatusRequestBinaryState) GetApplication() ApplicationIdContainer { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewStatusRequestBinaryState factory function for _StatusRequestBinaryState -func NewStatusRequestBinaryState(application ApplicationIdContainer, statusType byte) *_StatusRequestBinaryState { +func NewStatusRequestBinaryState( application ApplicationIdContainer , statusType byte ) *_StatusRequestBinaryState { _result := &_StatusRequestBinaryState{ - Application: application, - _StatusRequest: NewStatusRequest(statusType), + Application: application, + _StatusRequest: NewStatusRequest(statusType), } _result._StatusRequest._StatusRequestChildRequirements = _result return _result @@ -96,7 +99,7 @@ func NewStatusRequestBinaryState(application ApplicationIdContainer, statusType // Deprecated: use the interface for direct cast func CastStatusRequestBinaryState(structType interface{}) StatusRequestBinaryState { - if casted, ok := structType.(StatusRequestBinaryState); ok { + if casted, ok := structType.(StatusRequestBinaryState); ok { return casted } if casted, ok := structType.(*StatusRequestBinaryState); ok { @@ -124,6 +127,7 @@ func (m *_StatusRequestBinaryState) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_StatusRequestBinaryState) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,7 +155,7 @@ func StatusRequestBinaryStateParseWithBuffer(ctx context.Context, readBuffer uti if reserved != byte(0x7A) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": byte(0x7A), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -162,7 +166,7 @@ func StatusRequestBinaryStateParseWithBuffer(ctx context.Context, readBuffer uti if pullErr := readBuffer.PullContext("application"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for application") } - _application, _applicationErr := ApplicationIdContainerParseWithBuffer(ctx, readBuffer) +_application, _applicationErr := ApplicationIdContainerParseWithBuffer(ctx, readBuffer) if _applicationErr != nil { return nil, errors.Wrap(_applicationErr, "Error parsing 'application' field of StatusRequestBinaryState") } @@ -181,7 +185,7 @@ func StatusRequestBinaryStateParseWithBuffer(ctx context.Context, readBuffer uti if reserved != byte(0x00) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": byte(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField1 = &reserved @@ -194,8 +198,9 @@ func StatusRequestBinaryStateParseWithBuffer(ctx context.Context, readBuffer uti // Create a partially initialized instance _child := &_StatusRequestBinaryState{ - _StatusRequest: &_StatusRequest{}, - Application: application, + _StatusRequest: &_StatusRequest{ + }, + Application: application, reservedField0: reservedField0, reservedField1: reservedField1, } @@ -219,49 +224,49 @@ func (m *_StatusRequestBinaryState) SerializeWithWriteBuffer(ctx context.Context return errors.Wrap(pushErr, "Error pushing for StatusRequestBinaryState") } - // Reserved Field (reserved) - { - var reserved byte = byte(0x7A) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": byte(0x7A), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteByte("reserved", reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } - } - - // Simple Field (application) - if pushErr := writeBuffer.PushContext("application"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for application") - } - _applicationErr := writeBuffer.WriteSerializable(ctx, m.GetApplication()) - if popErr := writeBuffer.PopContext("application"); popErr != nil { - return errors.Wrap(popErr, "Error popping for application") + // Reserved Field (reserved) + { + var reserved byte = byte(0x7A) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": byte(0x7A), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 } - if _applicationErr != nil { - return errors.Wrap(_applicationErr, "Error serializing 'application' field") + _err := writeBuffer.WriteByte("reserved", reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } - // Reserved Field (reserved) - { - var reserved byte = byte(0x00) - if m.reservedField1 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": byte(0x00), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField1 - } - _err := writeBuffer.WriteByte("reserved", reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + // Simple Field (application) + if pushErr := writeBuffer.PushContext("application"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for application") + } + _applicationErr := writeBuffer.WriteSerializable(ctx, m.GetApplication()) + if popErr := writeBuffer.PopContext("application"); popErr != nil { + return errors.Wrap(popErr, "Error popping for application") + } + if _applicationErr != nil { + return errors.Wrap(_applicationErr, "Error serializing 'application' field") + } + + // Reserved Field (reserved) + { + var reserved byte = byte(0x00) + if m.reservedField1 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": byte(0x00), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField1 + } + _err := writeBuffer.WriteByte("reserved", reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } if popErr := writeBuffer.PopContext("StatusRequestBinaryState"); popErr != nil { return errors.Wrap(popErr, "Error popping for StatusRequestBinaryState") @@ -271,6 +276,7 @@ func (m *_StatusRequestBinaryState) SerializeWithWriteBuffer(ctx context.Context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_StatusRequestBinaryState) isStatusRequestBinaryState() bool { return true } @@ -285,3 +291,6 @@ func (m *_StatusRequestBinaryState) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/StatusRequestBinaryStateDeprecated.go b/plc4go/protocols/cbus/readwrite/model/StatusRequestBinaryStateDeprecated.go index 4c21c0da673..c014ea2d0e0 100644 --- a/plc4go/protocols/cbus/readwrite/model/StatusRequestBinaryStateDeprecated.go +++ b/plc4go/protocols/cbus/readwrite/model/StatusRequestBinaryStateDeprecated.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // StatusRequestBinaryStateDeprecated is the corresponding interface of StatusRequestBinaryStateDeprecated type StatusRequestBinaryStateDeprecated interface { @@ -46,12 +48,14 @@ type StatusRequestBinaryStateDeprecatedExactly interface { // _StatusRequestBinaryStateDeprecated is the data-structure of this message type _StatusRequestBinaryStateDeprecated struct { *_StatusRequest - Application ApplicationIdContainer + Application ApplicationIdContainer // Reserved Fields reservedField0 *byte reservedField1 *byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -62,14 +66,12 @@ type _StatusRequestBinaryStateDeprecated struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_StatusRequestBinaryStateDeprecated) InitializeParent(parent StatusRequest, statusType byte) { - m.StatusType = statusType +func (m *_StatusRequestBinaryStateDeprecated) InitializeParent(parent StatusRequest , statusType byte ) { m.StatusType = statusType } -func (m *_StatusRequestBinaryStateDeprecated) GetParent() StatusRequest { +func (m *_StatusRequestBinaryStateDeprecated) GetParent() StatusRequest { return m._StatusRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -84,11 +86,12 @@ func (m *_StatusRequestBinaryStateDeprecated) GetApplication() ApplicationIdCont /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewStatusRequestBinaryStateDeprecated factory function for _StatusRequestBinaryStateDeprecated -func NewStatusRequestBinaryStateDeprecated(application ApplicationIdContainer, statusType byte) *_StatusRequestBinaryStateDeprecated { +func NewStatusRequestBinaryStateDeprecated( application ApplicationIdContainer , statusType byte ) *_StatusRequestBinaryStateDeprecated { _result := &_StatusRequestBinaryStateDeprecated{ - Application: application, - _StatusRequest: NewStatusRequest(statusType), + Application: application, + _StatusRequest: NewStatusRequest(statusType), } _result._StatusRequest._StatusRequestChildRequirements = _result return _result @@ -96,7 +99,7 @@ func NewStatusRequestBinaryStateDeprecated(application ApplicationIdContainer, s // Deprecated: use the interface for direct cast func CastStatusRequestBinaryStateDeprecated(structType interface{}) StatusRequestBinaryStateDeprecated { - if casted, ok := structType.(StatusRequestBinaryStateDeprecated); ok { + if casted, ok := structType.(StatusRequestBinaryStateDeprecated); ok { return casted } if casted, ok := structType.(*StatusRequestBinaryStateDeprecated); ok { @@ -124,6 +127,7 @@ func (m *_StatusRequestBinaryStateDeprecated) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_StatusRequestBinaryStateDeprecated) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,7 +155,7 @@ func StatusRequestBinaryStateDeprecatedParseWithBuffer(ctx context.Context, read if reserved != byte(0xFA) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": byte(0xFA), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -162,7 +166,7 @@ func StatusRequestBinaryStateDeprecatedParseWithBuffer(ctx context.Context, read if pullErr := readBuffer.PullContext("application"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for application") } - _application, _applicationErr := ApplicationIdContainerParseWithBuffer(ctx, readBuffer) +_application, _applicationErr := ApplicationIdContainerParseWithBuffer(ctx, readBuffer) if _applicationErr != nil { return nil, errors.Wrap(_applicationErr, "Error parsing 'application' field of StatusRequestBinaryStateDeprecated") } @@ -181,7 +185,7 @@ func StatusRequestBinaryStateDeprecatedParseWithBuffer(ctx context.Context, read if reserved != byte(0x00) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": byte(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField1 = &reserved @@ -194,8 +198,9 @@ func StatusRequestBinaryStateDeprecatedParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_StatusRequestBinaryStateDeprecated{ - _StatusRequest: &_StatusRequest{}, - Application: application, + _StatusRequest: &_StatusRequest{ + }, + Application: application, reservedField0: reservedField0, reservedField1: reservedField1, } @@ -219,49 +224,49 @@ func (m *_StatusRequestBinaryStateDeprecated) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for StatusRequestBinaryStateDeprecated") } - // Reserved Field (reserved) - { - var reserved byte = byte(0xFA) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": byte(0xFA), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteByte("reserved", reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } - } - - // Simple Field (application) - if pushErr := writeBuffer.PushContext("application"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for application") - } - _applicationErr := writeBuffer.WriteSerializable(ctx, m.GetApplication()) - if popErr := writeBuffer.PopContext("application"); popErr != nil { - return errors.Wrap(popErr, "Error popping for application") + // Reserved Field (reserved) + { + var reserved byte = byte(0xFA) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": byte(0xFA), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 } - if _applicationErr != nil { - return errors.Wrap(_applicationErr, "Error serializing 'application' field") + _err := writeBuffer.WriteByte("reserved", reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } - // Reserved Field (reserved) - { - var reserved byte = byte(0x00) - if m.reservedField1 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": byte(0x00), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField1 - } - _err := writeBuffer.WriteByte("reserved", reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + // Simple Field (application) + if pushErr := writeBuffer.PushContext("application"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for application") + } + _applicationErr := writeBuffer.WriteSerializable(ctx, m.GetApplication()) + if popErr := writeBuffer.PopContext("application"); popErr != nil { + return errors.Wrap(popErr, "Error popping for application") + } + if _applicationErr != nil { + return errors.Wrap(_applicationErr, "Error serializing 'application' field") + } + + // Reserved Field (reserved) + { + var reserved byte = byte(0x00) + if m.reservedField1 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": byte(0x00), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField1 + } + _err := writeBuffer.WriteByte("reserved", reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } if popErr := writeBuffer.PopContext("StatusRequestBinaryStateDeprecated"); popErr != nil { return errors.Wrap(popErr, "Error popping for StatusRequestBinaryStateDeprecated") @@ -271,6 +276,7 @@ func (m *_StatusRequestBinaryStateDeprecated) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_StatusRequestBinaryStateDeprecated) isStatusRequestBinaryStateDeprecated() bool { return true } @@ -285,3 +291,6 @@ func (m *_StatusRequestBinaryStateDeprecated) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/StatusRequestLevel.go b/plc4go/protocols/cbus/readwrite/model/StatusRequestLevel.go index 6529b80b82c..d5b9304ee10 100644 --- a/plc4go/protocols/cbus/readwrite/model/StatusRequestLevel.go +++ b/plc4go/protocols/cbus/readwrite/model/StatusRequestLevel.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // StatusRequestLevel is the corresponding interface of StatusRequestLevel type StatusRequestLevel interface { @@ -48,13 +50,15 @@ type StatusRequestLevelExactly interface { // _StatusRequestLevel is the data-structure of this message type _StatusRequestLevel struct { *_StatusRequest - Application ApplicationIdContainer - StartingGroupAddressLabel byte + Application ApplicationIdContainer + StartingGroupAddressLabel byte // Reserved Fields reservedField0 *byte reservedField1 *byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -65,14 +69,12 @@ type _StatusRequestLevel struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_StatusRequestLevel) InitializeParent(parent StatusRequest, statusType byte) { - m.StatusType = statusType +func (m *_StatusRequestLevel) InitializeParent(parent StatusRequest , statusType byte ) { m.StatusType = statusType } -func (m *_StatusRequestLevel) GetParent() StatusRequest { +func (m *_StatusRequestLevel) GetParent() StatusRequest { return m._StatusRequest } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -91,12 +93,13 @@ func (m *_StatusRequestLevel) GetStartingGroupAddressLabel() byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewStatusRequestLevel factory function for _StatusRequestLevel -func NewStatusRequestLevel(application ApplicationIdContainer, startingGroupAddressLabel byte, statusType byte) *_StatusRequestLevel { +func NewStatusRequestLevel( application ApplicationIdContainer , startingGroupAddressLabel byte , statusType byte ) *_StatusRequestLevel { _result := &_StatusRequestLevel{ - Application: application, + Application: application, StartingGroupAddressLabel: startingGroupAddressLabel, - _StatusRequest: NewStatusRequest(statusType), + _StatusRequest: NewStatusRequest(statusType), } _result._StatusRequest._StatusRequestChildRequirements = _result return _result @@ -104,7 +107,7 @@ func NewStatusRequestLevel(application ApplicationIdContainer, startingGroupAddr // Deprecated: use the interface for direct cast func CastStatusRequestLevel(structType interface{}) StatusRequestLevel { - if casted, ok := structType.(StatusRequestLevel); ok { + if casted, ok := structType.(StatusRequestLevel); ok { return casted } if casted, ok := structType.(*StatusRequestLevel); ok { @@ -130,11 +133,12 @@ func (m *_StatusRequestLevel) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += 8 // Simple field (startingGroupAddressLabel) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_StatusRequestLevel) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -162,7 +166,7 @@ func StatusRequestLevelParseWithBuffer(ctx context.Context, readBuffer utils.Rea if reserved != byte(0x73) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": byte(0x73), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -179,7 +183,7 @@ func StatusRequestLevelParseWithBuffer(ctx context.Context, readBuffer utils.Rea if reserved != byte(0x07) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": byte(0x07), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField1 = &reserved @@ -190,7 +194,7 @@ func StatusRequestLevelParseWithBuffer(ctx context.Context, readBuffer utils.Rea if pullErr := readBuffer.PullContext("application"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for application") } - _application, _applicationErr := ApplicationIdContainerParseWithBuffer(ctx, readBuffer) +_application, _applicationErr := ApplicationIdContainerParseWithBuffer(ctx, readBuffer) if _applicationErr != nil { return nil, errors.Wrap(_applicationErr, "Error parsing 'application' field of StatusRequestLevel") } @@ -200,14 +204,14 @@ func StatusRequestLevelParseWithBuffer(ctx context.Context, readBuffer utils.Rea } // Simple Field (startingGroupAddressLabel) - _startingGroupAddressLabel, _startingGroupAddressLabelErr := readBuffer.ReadByte("startingGroupAddressLabel") +_startingGroupAddressLabel, _startingGroupAddressLabelErr := readBuffer.ReadByte("startingGroupAddressLabel") if _startingGroupAddressLabelErr != nil { return nil, errors.Wrap(_startingGroupAddressLabelErr, "Error parsing 'startingGroupAddressLabel' field of StatusRequestLevel") } startingGroupAddressLabel := _startingGroupAddressLabel // Validation - if !(bool(bool(bool(bool(bool(bool(bool(bool((startingGroupAddressLabel) == (0x00))) || bool(bool((startingGroupAddressLabel) == (0x20)))) || bool(bool((startingGroupAddressLabel) == (0x40)))) || bool(bool((startingGroupAddressLabel) == (0x60)))) || bool(bool((startingGroupAddressLabel) == (0x80)))) || bool(bool((startingGroupAddressLabel) == (0xA0)))) || bool(bool((startingGroupAddressLabel) == (0xC0)))) || bool(bool((startingGroupAddressLabel) == (0xE0)))) { + if (!(bool(bool(bool(bool(bool(bool(bool(bool((startingGroupAddressLabel) == (0x00))) || bool(bool((startingGroupAddressLabel) == (0x20)))) || bool(bool((startingGroupAddressLabel) == (0x40)))) || bool(bool((startingGroupAddressLabel) == (0x60)))) || bool(bool((startingGroupAddressLabel) == (0x80)))) || bool(bool((startingGroupAddressLabel) == (0xA0)))) || bool(bool((startingGroupAddressLabel) == (0xC0)))) || bool(bool((startingGroupAddressLabel) == (0xE0))))) { return nil, errors.WithStack(utils.ParseValidationError{"invalid label"}) } @@ -217,11 +221,12 @@ func StatusRequestLevelParseWithBuffer(ctx context.Context, readBuffer utils.Rea // Create a partially initialized instance _child := &_StatusRequestLevel{ - _StatusRequest: &_StatusRequest{}, - Application: application, + _StatusRequest: &_StatusRequest{ + }, + Application: application, StartingGroupAddressLabel: startingGroupAddressLabel, - reservedField0: reservedField0, - reservedField1: reservedField1, + reservedField0: reservedField0, + reservedField1: reservedField1, } _child._StatusRequest._StatusRequestChildRequirements = _child return _child, nil @@ -243,56 +248,56 @@ func (m *_StatusRequestLevel) SerializeWithWriteBuffer(ctx context.Context, writ return errors.Wrap(pushErr, "Error pushing for StatusRequestLevel") } - // Reserved Field (reserved) - { - var reserved byte = byte(0x73) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": byte(0x73), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteByte("reserved", reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + // Reserved Field (reserved) + { + var reserved byte = byte(0x73) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": byte(0x73), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 } - - // Reserved Field (reserved) - { - var reserved byte = byte(0x07) - if m.reservedField1 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": byte(0x07), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField1 - } - _err := writeBuffer.WriteByte("reserved", reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + _err := writeBuffer.WriteByte("reserved", reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } - // Simple Field (application) - if pushErr := writeBuffer.PushContext("application"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for application") - } - _applicationErr := writeBuffer.WriteSerializable(ctx, m.GetApplication()) - if popErr := writeBuffer.PopContext("application"); popErr != nil { - return errors.Wrap(popErr, "Error popping for application") + // Reserved Field (reserved) + { + var reserved byte = byte(0x07) + if m.reservedField1 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": byte(0x07), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField1 } - if _applicationErr != nil { - return errors.Wrap(_applicationErr, "Error serializing 'application' field") + _err := writeBuffer.WriteByte("reserved", reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } - // Simple Field (startingGroupAddressLabel) - startingGroupAddressLabel := byte(m.GetStartingGroupAddressLabel()) - _startingGroupAddressLabelErr := writeBuffer.WriteByte("startingGroupAddressLabel", (startingGroupAddressLabel)) - if _startingGroupAddressLabelErr != nil { - return errors.Wrap(_startingGroupAddressLabelErr, "Error serializing 'startingGroupAddressLabel' field") - } + // Simple Field (application) + if pushErr := writeBuffer.PushContext("application"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for application") + } + _applicationErr := writeBuffer.WriteSerializable(ctx, m.GetApplication()) + if popErr := writeBuffer.PopContext("application"); popErr != nil { + return errors.Wrap(popErr, "Error popping for application") + } + if _applicationErr != nil { + return errors.Wrap(_applicationErr, "Error serializing 'application' field") + } + + // Simple Field (startingGroupAddressLabel) + startingGroupAddressLabel := byte(m.GetStartingGroupAddressLabel()) + _startingGroupAddressLabelErr := writeBuffer.WriteByte("startingGroupAddressLabel", (startingGroupAddressLabel)) + if _startingGroupAddressLabelErr != nil { + return errors.Wrap(_startingGroupAddressLabelErr, "Error serializing 'startingGroupAddressLabel' field") + } if popErr := writeBuffer.PopContext("StatusRequestLevel"); popErr != nil { return errors.Wrap(popErr, "Error popping for StatusRequestLevel") @@ -302,6 +307,7 @@ func (m *_StatusRequestLevel) SerializeWithWriteBuffer(ctx context.Context, writ return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_StatusRequestLevel) isStatusRequestLevel() bool { return true } @@ -316,3 +322,6 @@ func (m *_StatusRequestLevel) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/TamperStatus.go b/plc4go/protocols/cbus/readwrite/model/TamperStatus.go index 507bbe51af2..3aee38f4203 100644 --- a/plc4go/protocols/cbus/readwrite/model/TamperStatus.go +++ b/plc4go/protocols/cbus/readwrite/model/TamperStatus.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // TamperStatus is the corresponding interface of TamperStatus type TamperStatus interface { @@ -50,9 +52,10 @@ type TamperStatusExactly interface { // _TamperStatus is the data-structure of this message type _TamperStatus struct { - Status uint8 + Status uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -94,14 +97,15 @@ func (m *_TamperStatus) GetIsTamperActive() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewTamperStatus factory function for _TamperStatus -func NewTamperStatus(status uint8) *_TamperStatus { - return &_TamperStatus{Status: status} +func NewTamperStatus( status uint8 ) *_TamperStatus { +return &_TamperStatus{ Status: status } } // Deprecated: use the interface for direct cast func CastTamperStatus(structType interface{}) TamperStatus { - if casted, ok := structType.(TamperStatus); ok { + if casted, ok := structType.(TamperStatus); ok { return casted } if casted, ok := structType.(*TamperStatus); ok { @@ -118,7 +122,7 @@ func (m *_TamperStatus) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (status) - lengthInBits += 8 + lengthInBits += 8; // A virtual field doesn't have any in- or output. @@ -129,6 +133,7 @@ func (m *_TamperStatus) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_TamperStatus) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -147,7 +152,7 @@ func TamperStatusParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe _ = currentPos // Simple Field (status) - _status, _statusErr := readBuffer.ReadUint8("status", 8) +_status, _statusErr := readBuffer.ReadUint8("status", 8) if _statusErr != nil { return nil, errors.Wrap(_statusErr, "Error parsing 'status' field of TamperStatus") } @@ -174,8 +179,8 @@ func TamperStatusParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe // Create the instance return &_TamperStatus{ - Status: status, - }, nil + Status: status, + }, nil } func (m *_TamperStatus) Serialize() ([]byte, error) { @@ -189,7 +194,7 @@ func (m *_TamperStatus) Serialize() ([]byte, error) { func (m *_TamperStatus) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("TamperStatus"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("TamperStatus"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for TamperStatus") } @@ -218,6 +223,7 @@ func (m *_TamperStatus) SerializeWithWriteBuffer(ctx context.Context, writeBuffe return nil } + func (m *_TamperStatus) isTamperStatus() bool { return true } @@ -232,3 +238,6 @@ func (m *_TamperStatus) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/TelephonyCommandType.go b/plc4go/protocols/cbus/readwrite/model/TelephonyCommandType.go index 9ff760a0085..1857714a192 100644 --- a/plc4go/protocols/cbus/readwrite/model/TelephonyCommandType.go +++ b/plc4go/protocols/cbus/readwrite/model/TelephonyCommandType.go @@ -35,7 +35,7 @@ type ITelephonyCommandType interface { NumberOfArguments() uint8 } -const ( +const( TelephonyCommandType_EVENT TelephonyCommandType = 0x00 ) @@ -43,19 +43,18 @@ var TelephonyCommandTypeValues []TelephonyCommandType func init() { _ = errors.New - TelephonyCommandTypeValues = []TelephonyCommandType{ + TelephonyCommandTypeValues = []TelephonyCommandType { TelephonyCommandType_EVENT, } } + func (e TelephonyCommandType) NumberOfArguments() uint8 { - switch e { - case 0x00: - { /* '0x00' */ - return 0xFF + switch e { + case 0x00: { /* '0x00' */ + return 0xFF } - default: - { + default: { return 0 } } @@ -71,8 +70,8 @@ func TelephonyCommandTypeFirstEnumForFieldNumberOfArguments(value uint8) (Teleph } func TelephonyCommandTypeByValue(value uint8) (enum TelephonyCommandType, ok bool) { switch value { - case 0x00: - return TelephonyCommandType_EVENT, true + case 0x00: + return TelephonyCommandType_EVENT, true } return 0, false } @@ -85,13 +84,13 @@ func TelephonyCommandTypeByName(value string) (enum TelephonyCommandType, ok boo return 0, false } -func TelephonyCommandTypeKnows(value uint8) bool { +func TelephonyCommandTypeKnows(value uint8) bool { for _, typeValue := range TelephonyCommandTypeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastTelephonyCommandType(structType interface{}) TelephonyCommandType { @@ -153,3 +152,4 @@ func (e TelephonyCommandType) PLC4XEnumName() string { func (e TelephonyCommandType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/TelephonyCommandTypeContainer.go b/plc4go/protocols/cbus/readwrite/model/TelephonyCommandTypeContainer.go index 8ca3919920a..e72a9eff69c 100644 --- a/plc4go/protocols/cbus/readwrite/model/TelephonyCommandTypeContainer.go +++ b/plc4go/protocols/cbus/readwrite/model/TelephonyCommandTypeContainer.go @@ -36,18 +36,18 @@ type ITelephonyCommandTypeContainer interface { CommandType() TelephonyCommandType } -const ( - TelephonyCommandTypeContainer_TelephonyCommandLineOnHook TelephonyCommandTypeContainer = 0x09 - TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_0Bytes TelephonyCommandTypeContainer = 0xA0 - TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_1Bytes TelephonyCommandTypeContainer = 0xA1 - TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_2Bytes TelephonyCommandTypeContainer = 0xA2 - TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_3Bytes TelephonyCommandTypeContainer = 0xA3 - TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_4Bytes TelephonyCommandTypeContainer = 0xA4 - TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_5Bytes TelephonyCommandTypeContainer = 0xA5 - TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_6Bytes TelephonyCommandTypeContainer = 0xA6 - TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_7Bytes TelephonyCommandTypeContainer = 0xA7 - TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_8Bytes TelephonyCommandTypeContainer = 0xA8 - TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_9Bytes TelephonyCommandTypeContainer = 0xA9 +const( + TelephonyCommandTypeContainer_TelephonyCommandLineOnHook TelephonyCommandTypeContainer = 0x09 + TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_0Bytes TelephonyCommandTypeContainer = 0xA0 + TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_1Bytes TelephonyCommandTypeContainer = 0xA1 + TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_2Bytes TelephonyCommandTypeContainer = 0xA2 + TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_3Bytes TelephonyCommandTypeContainer = 0xA3 + TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_4Bytes TelephonyCommandTypeContainer = 0xA4 + TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_5Bytes TelephonyCommandTypeContainer = 0xA5 + TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_6Bytes TelephonyCommandTypeContainer = 0xA6 + TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_7Bytes TelephonyCommandTypeContainer = 0xA7 + TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_8Bytes TelephonyCommandTypeContainer = 0xA8 + TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_9Bytes TelephonyCommandTypeContainer = 0xA9 TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_10Bytes TelephonyCommandTypeContainer = 0xAA TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_11Bytes TelephonyCommandTypeContainer = 0xAB TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_12Bytes TelephonyCommandTypeContainer = 0xAC @@ -76,7 +76,7 @@ var TelephonyCommandTypeContainerValues []TelephonyCommandTypeContainer func init() { _ = errors.New - TelephonyCommandTypeContainerValues = []TelephonyCommandTypeContainer{ + TelephonyCommandTypeContainerValues = []TelephonyCommandTypeContainer { TelephonyCommandTypeContainer_TelephonyCommandLineOnHook, TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_0Bytes, TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_1Bytes, @@ -113,142 +113,109 @@ func init() { } } + func (e TelephonyCommandTypeContainer) NumBytes() uint8 { - switch e { - case 0x09: - { /* '0x09' */ - return 1 + switch e { + case 0x09: { /* '0x09' */ + return 1 } - case 0xA0: - { /* '0xA0' */ - return 0 + case 0xA0: { /* '0xA0' */ + return 0 } - case 0xA1: - { /* '0xA1' */ - return 1 + case 0xA1: { /* '0xA1' */ + return 1 } - case 0xA2: - { /* '0xA2' */ - return 2 + case 0xA2: { /* '0xA2' */ + return 2 } - case 0xA3: - { /* '0xA3' */ - return 3 + case 0xA3: { /* '0xA3' */ + return 3 } - case 0xA4: - { /* '0xA4' */ - return 4 + case 0xA4: { /* '0xA4' */ + return 4 } - case 0xA5: - { /* '0xA5' */ - return 5 + case 0xA5: { /* '0xA5' */ + return 5 } - case 0xA6: - { /* '0xA6' */ - return 6 + case 0xA6: { /* '0xA6' */ + return 6 } - case 0xA7: - { /* '0xA7' */ - return 7 + case 0xA7: { /* '0xA7' */ + return 7 } - case 0xA8: - { /* '0xA8' */ - return 8 + case 0xA8: { /* '0xA8' */ + return 8 } - case 0xA9: - { /* '0xA9' */ - return 9 + case 0xA9: { /* '0xA9' */ + return 9 } - case 0xAA: - { /* '0xAA' */ - return 10 + case 0xAA: { /* '0xAA' */ + return 10 } - case 0xAB: - { /* '0xAB' */ - return 11 + case 0xAB: { /* '0xAB' */ + return 11 } - case 0xAC: - { /* '0xAC' */ - return 12 + case 0xAC: { /* '0xAC' */ + return 12 } - case 0xAD: - { /* '0xAD' */ - return 13 + case 0xAD: { /* '0xAD' */ + return 13 } - case 0xAE: - { /* '0xAE' */ - return 14 + case 0xAE: { /* '0xAE' */ + return 14 } - case 0xAF: - { /* '0xAF' */ - return 15 + case 0xAF: { /* '0xAF' */ + return 15 } - case 0xB0: - { /* '0xB0' */ - return 16 + case 0xB0: { /* '0xB0' */ + return 16 } - case 0xB1: - { /* '0xB1' */ - return 17 + case 0xB1: { /* '0xB1' */ + return 17 } - case 0xB2: - { /* '0xB2' */ - return 18 + case 0xB2: { /* '0xB2' */ + return 18 } - case 0xB3: - { /* '0xB3' */ - return 19 + case 0xB3: { /* '0xB3' */ + return 19 } - case 0xB4: - { /* '0xB4' */ - return 20 + case 0xB4: { /* '0xB4' */ + return 20 } - case 0xB5: - { /* '0xB5' */ - return 21 + case 0xB5: { /* '0xB5' */ + return 21 } - case 0xB6: - { /* '0xB6' */ - return 22 + case 0xB6: { /* '0xB6' */ + return 22 } - case 0xB7: - { /* '0xB7' */ - return 23 + case 0xB7: { /* '0xB7' */ + return 23 } - case 0xB8: - { /* '0xB8' */ - return 24 + case 0xB8: { /* '0xB8' */ + return 24 } - case 0xB9: - { /* '0xB9' */ - return 25 + case 0xB9: { /* '0xB9' */ + return 25 } - case 0xBA: - { /* '0xBA' */ - return 26 + case 0xBA: { /* '0xBA' */ + return 26 } - case 0xBB: - { /* '0xBB' */ - return 27 + case 0xBB: { /* '0xBB' */ + return 27 } - case 0xBC: - { /* '0xBC' */ - return 28 + case 0xBC: { /* '0xBC' */ + return 28 } - case 0xBD: - { /* '0xBD' */ - return 29 + case 0xBD: { /* '0xBD' */ + return 29 } - case 0xBE: - { /* '0xBE' */ - return 30 + case 0xBE: { /* '0xBE' */ + return 30 } - case 0xBF: - { /* '0xBF' */ - return 31 + case 0xBF: { /* '0xBF' */ + return 31 } - default: - { + default: { return 0 } } @@ -264,141 +231,107 @@ func TelephonyCommandTypeContainerFirstEnumForFieldNumBytes(value uint8) (Teleph } func (e TelephonyCommandTypeContainer) CommandType() TelephonyCommandType { - switch e { - case 0x09: - { /* '0x09' */ + switch e { + case 0x09: { /* '0x09' */ return TelephonyCommandType_EVENT } - case 0xA0: - { /* '0xA0' */ + case 0xA0: { /* '0xA0' */ return TelephonyCommandType_EVENT } - case 0xA1: - { /* '0xA1' */ + case 0xA1: { /* '0xA1' */ return TelephonyCommandType_EVENT } - case 0xA2: - { /* '0xA2' */ + case 0xA2: { /* '0xA2' */ return TelephonyCommandType_EVENT } - case 0xA3: - { /* '0xA3' */ + case 0xA3: { /* '0xA3' */ return TelephonyCommandType_EVENT } - case 0xA4: - { /* '0xA4' */ + case 0xA4: { /* '0xA4' */ return TelephonyCommandType_EVENT } - case 0xA5: - { /* '0xA5' */ + case 0xA5: { /* '0xA5' */ return TelephonyCommandType_EVENT } - case 0xA6: - { /* '0xA6' */ + case 0xA6: { /* '0xA6' */ return TelephonyCommandType_EVENT } - case 0xA7: - { /* '0xA7' */ + case 0xA7: { /* '0xA7' */ return TelephonyCommandType_EVENT } - case 0xA8: - { /* '0xA8' */ + case 0xA8: { /* '0xA8' */ return TelephonyCommandType_EVENT } - case 0xA9: - { /* '0xA9' */ + case 0xA9: { /* '0xA9' */ return TelephonyCommandType_EVENT } - case 0xAA: - { /* '0xAA' */ + case 0xAA: { /* '0xAA' */ return TelephonyCommandType_EVENT } - case 0xAB: - { /* '0xAB' */ + case 0xAB: { /* '0xAB' */ return TelephonyCommandType_EVENT } - case 0xAC: - { /* '0xAC' */ + case 0xAC: { /* '0xAC' */ return TelephonyCommandType_EVENT } - case 0xAD: - { /* '0xAD' */ + case 0xAD: { /* '0xAD' */ return TelephonyCommandType_EVENT } - case 0xAE: - { /* '0xAE' */ + case 0xAE: { /* '0xAE' */ return TelephonyCommandType_EVENT } - case 0xAF: - { /* '0xAF' */ + case 0xAF: { /* '0xAF' */ return TelephonyCommandType_EVENT } - case 0xB0: - { /* '0xB0' */ + case 0xB0: { /* '0xB0' */ return TelephonyCommandType_EVENT } - case 0xB1: - { /* '0xB1' */ + case 0xB1: { /* '0xB1' */ return TelephonyCommandType_EVENT } - case 0xB2: - { /* '0xB2' */ + case 0xB2: { /* '0xB2' */ return TelephonyCommandType_EVENT } - case 0xB3: - { /* '0xB3' */ + case 0xB3: { /* '0xB3' */ return TelephonyCommandType_EVENT } - case 0xB4: - { /* '0xB4' */ + case 0xB4: { /* '0xB4' */ return TelephonyCommandType_EVENT } - case 0xB5: - { /* '0xB5' */ + case 0xB5: { /* '0xB5' */ return TelephonyCommandType_EVENT } - case 0xB6: - { /* '0xB6' */ + case 0xB6: { /* '0xB6' */ return TelephonyCommandType_EVENT } - case 0xB7: - { /* '0xB7' */ + case 0xB7: { /* '0xB7' */ return TelephonyCommandType_EVENT } - case 0xB8: - { /* '0xB8' */ + case 0xB8: { /* '0xB8' */ return TelephonyCommandType_EVENT } - case 0xB9: - { /* '0xB9' */ + case 0xB9: { /* '0xB9' */ return TelephonyCommandType_EVENT } - case 0xBA: - { /* '0xBA' */ + case 0xBA: { /* '0xBA' */ return TelephonyCommandType_EVENT } - case 0xBB: - { /* '0xBB' */ + case 0xBB: { /* '0xBB' */ return TelephonyCommandType_EVENT } - case 0xBC: - { /* '0xBC' */ + case 0xBC: { /* '0xBC' */ return TelephonyCommandType_EVENT } - case 0xBD: - { /* '0xBD' */ + case 0xBD: { /* '0xBD' */ return TelephonyCommandType_EVENT } - case 0xBE: - { /* '0xBE' */ + case 0xBE: { /* '0xBE' */ return TelephonyCommandType_EVENT } - case 0xBF: - { /* '0xBF' */ + case 0xBF: { /* '0xBF' */ return TelephonyCommandType_EVENT } - default: - { + default: { return 0 } } @@ -414,72 +347,72 @@ func TelephonyCommandTypeContainerFirstEnumForFieldCommandType(value TelephonyCo } func TelephonyCommandTypeContainerByValue(value uint8) (enum TelephonyCommandTypeContainer, ok bool) { switch value { - case 0x09: - return TelephonyCommandTypeContainer_TelephonyCommandLineOnHook, true - case 0xA0: - return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_0Bytes, true - case 0xA1: - return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_1Bytes, true - case 0xA2: - return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_2Bytes, true - case 0xA3: - return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_3Bytes, true - case 0xA4: - return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_4Bytes, true - case 0xA5: - return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_5Bytes, true - case 0xA6: - return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_6Bytes, true - case 0xA7: - return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_7Bytes, true - case 0xA8: - return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_8Bytes, true - case 0xA9: - return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_9Bytes, true - case 0xAA: - return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_10Bytes, true - case 0xAB: - return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_11Bytes, true - case 0xAC: - return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_12Bytes, true - case 0xAD: - return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_13Bytes, true - case 0xAE: - return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_14Bytes, true - case 0xAF: - return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_15Bytes, true - case 0xB0: - return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_16Bytes, true - case 0xB1: - return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_17Bytes, true - case 0xB2: - return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_18Bytes, true - case 0xB3: - return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_19Bytes, true - case 0xB4: - return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_20Bytes, true - case 0xB5: - return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_21Bytes, true - case 0xB6: - return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_22Bytes, true - case 0xB7: - return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_23Bytes, true - case 0xB8: - return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_24Bytes, true - case 0xB9: - return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_25Bytes, true - case 0xBA: - return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_26Bytes, true - case 0xBB: - return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_27Bytes, true - case 0xBC: - return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_28Bytes, true - case 0xBD: - return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_29Bytes, true - case 0xBE: - return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_30Bytes, true - case 0xBF: - return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_31Bytes, true + case 0x09: + return TelephonyCommandTypeContainer_TelephonyCommandLineOnHook, true + case 0xA0: + return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_0Bytes, true + case 0xA1: + return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_1Bytes, true + case 0xA2: + return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_2Bytes, true + case 0xA3: + return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_3Bytes, true + case 0xA4: + return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_4Bytes, true + case 0xA5: + return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_5Bytes, true + case 0xA6: + return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_6Bytes, true + case 0xA7: + return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_7Bytes, true + case 0xA8: + return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_8Bytes, true + case 0xA9: + return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_9Bytes, true + case 0xAA: + return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_10Bytes, true + case 0xAB: + return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_11Bytes, true + case 0xAC: + return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_12Bytes, true + case 0xAD: + return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_13Bytes, true + case 0xAE: + return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_14Bytes, true + case 0xAF: + return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_15Bytes, true + case 0xB0: + return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_16Bytes, true + case 0xB1: + return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_17Bytes, true + case 0xB2: + return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_18Bytes, true + case 0xB3: + return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_19Bytes, true + case 0xB4: + return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_20Bytes, true + case 0xB5: + return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_21Bytes, true + case 0xB6: + return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_22Bytes, true + case 0xB7: + return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_23Bytes, true + case 0xB8: + return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_24Bytes, true + case 0xB9: + return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_25Bytes, true + case 0xBA: + return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_26Bytes, true + case 0xBB: + return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_27Bytes, true + case 0xBC: + return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_28Bytes, true + case 0xBD: + return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_29Bytes, true + case 0xBE: + return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_30Bytes, true + case 0xBF: + return TelephonyCommandTypeContainer_TelephonyCommandLineOffHook_31Bytes, true } return 0, false } @@ -556,13 +489,13 @@ func TelephonyCommandTypeContainerByName(value string) (enum TelephonyCommandTyp return 0, false } -func TelephonyCommandTypeContainerKnows(value uint8) bool { +func TelephonyCommandTypeContainerKnows(value uint8) bool { for _, typeValue := range TelephonyCommandTypeContainerValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastTelephonyCommandTypeContainer(structType interface{}) TelephonyCommandTypeContainer { @@ -688,3 +621,4 @@ func (e TelephonyCommandTypeContainer) PLC4XEnumName() string { func (e TelephonyCommandTypeContainer) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/TelephonyData.go b/plc4go/protocols/cbus/readwrite/model/TelephonyData.go index 7bca7a440d6..1dd64cebb51 100644 --- a/plc4go/protocols/cbus/readwrite/model/TelephonyData.go +++ b/plc4go/protocols/cbus/readwrite/model/TelephonyData.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // TelephonyData is the corresponding interface of TelephonyData type TelephonyData interface { @@ -49,8 +51,8 @@ type TelephonyDataExactly interface { // _TelephonyData is the data-structure of this message type _TelephonyData struct { _TelephonyDataChildRequirements - CommandTypeContainer TelephonyCommandTypeContainer - Argument byte + CommandTypeContainer TelephonyCommandTypeContainer + Argument byte } type _TelephonyDataChildRequirements interface { @@ -58,6 +60,7 @@ type _TelephonyDataChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type TelephonyDataParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child TelephonyData, serializeChildFunction func() error) error GetTypeName() string @@ -65,13 +68,12 @@ type TelephonyDataParent interface { type TelephonyDataChild interface { utils.Serializable - InitializeParent(parent TelephonyData, commandTypeContainer TelephonyCommandTypeContainer, argument byte) +InitializeParent(parent TelephonyData , commandTypeContainer TelephonyCommandTypeContainer , argument byte ) GetParent() *TelephonyData GetTypeName() string TelephonyData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -105,14 +107,15 @@ func (m *_TelephonyData) GetCommandType() TelephonyCommandType { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewTelephonyData factory function for _TelephonyData -func NewTelephonyData(commandTypeContainer TelephonyCommandTypeContainer, argument byte) *_TelephonyData { - return &_TelephonyData{CommandTypeContainer: commandTypeContainer, Argument: argument} +func NewTelephonyData( commandTypeContainer TelephonyCommandTypeContainer , argument byte ) *_TelephonyData { +return &_TelephonyData{ CommandTypeContainer: commandTypeContainer , Argument: argument } } // Deprecated: use the interface for direct cast func CastTelephonyData(structType interface{}) TelephonyData { - if casted, ok := structType.(TelephonyData); ok { + if casted, ok := structType.(TelephonyData); ok { return casted } if casted, ok := structType.(*TelephonyData); ok { @@ -125,6 +128,7 @@ func (m *_TelephonyData) GetTypeName() string { return "TelephonyData" } + func (m *_TelephonyData) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -134,7 +138,7 @@ func (m *_TelephonyData) GetParentLengthInBits(ctx context.Context) uint16 { // A virtual field doesn't have any in- or output. // Simple field (argument) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } @@ -157,7 +161,7 @@ func TelephonyDataParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff _ = currentPos // Validation - if !(KnowsTelephonyCommandTypeContainer(readBuffer)) { + if (!(KnowsTelephonyCommandTypeContainer(readBuffer))) { return nil, errors.WithStack(utils.ParseAssertError{"no command type could be found"}) } @@ -165,7 +169,7 @@ func TelephonyDataParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff if pullErr := readBuffer.PullContext("commandTypeContainer"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for commandTypeContainer") } - _commandTypeContainer, _commandTypeContainerErr := TelephonyCommandTypeContainerParseWithBuffer(ctx, readBuffer) +_commandTypeContainer, _commandTypeContainerErr := TelephonyCommandTypeContainerParseWithBuffer(ctx, readBuffer) if _commandTypeContainerErr != nil { return nil, errors.Wrap(_commandTypeContainerErr, "Error parsing 'commandTypeContainer' field of TelephonyData") } @@ -180,7 +184,7 @@ func TelephonyDataParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff _ = commandType // Simple Field (argument) - _argument, _argumentErr := readBuffer.ReadByte("argument") +_argument, _argumentErr := readBuffer.ReadByte("argument") if _argumentErr != nil { return nil, errors.Wrap(_argumentErr, "Error parsing 'argument' field of TelephonyData") } @@ -189,37 +193,37 @@ func TelephonyDataParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type TelephonyDataChildSerializeRequirement interface { TelephonyData - InitializeParent(TelephonyData, TelephonyCommandTypeContainer, byte) + InitializeParent(TelephonyData, TelephonyCommandTypeContainer, byte) GetParent() TelephonyData } var _childTemp interface{} var _child TelephonyDataChildSerializeRequirement var typeSwitchError error switch { - case commandType == TelephonyCommandType_EVENT && argument == 0x01: // TelephonyDataLineOnHook - _childTemp, typeSwitchError = TelephonyDataLineOnHookParseWithBuffer(ctx, readBuffer) - case commandType == TelephonyCommandType_EVENT && argument == 0x02: // TelephonyDataLineOffHook +case commandType == TelephonyCommandType_EVENT && argument == 0x01 : // TelephonyDataLineOnHook + _childTemp, typeSwitchError = TelephonyDataLineOnHookParseWithBuffer(ctx, readBuffer, ) +case commandType == TelephonyCommandType_EVENT && argument == 0x02 : // TelephonyDataLineOffHook _childTemp, typeSwitchError = TelephonyDataLineOffHookParseWithBuffer(ctx, readBuffer, commandTypeContainer) - case commandType == TelephonyCommandType_EVENT && argument == 0x03: // TelephonyDataDialOutFailure - _childTemp, typeSwitchError = TelephonyDataDialOutFailureParseWithBuffer(ctx, readBuffer) - case commandType == TelephonyCommandType_EVENT && argument == 0x04: // TelephonyDataDialInFailure - _childTemp, typeSwitchError = TelephonyDataDialInFailureParseWithBuffer(ctx, readBuffer) - case commandType == TelephonyCommandType_EVENT && argument == 0x05: // TelephonyDataRinging +case commandType == TelephonyCommandType_EVENT && argument == 0x03 : // TelephonyDataDialOutFailure + _childTemp, typeSwitchError = TelephonyDataDialOutFailureParseWithBuffer(ctx, readBuffer, ) +case commandType == TelephonyCommandType_EVENT && argument == 0x04 : // TelephonyDataDialInFailure + _childTemp, typeSwitchError = TelephonyDataDialInFailureParseWithBuffer(ctx, readBuffer, ) +case commandType == TelephonyCommandType_EVENT && argument == 0x05 : // TelephonyDataRinging _childTemp, typeSwitchError = TelephonyDataRingingParseWithBuffer(ctx, readBuffer, commandTypeContainer) - case commandType == TelephonyCommandType_EVENT && argument == 0x06: // TelephonyDataRecallLastNumber +case commandType == TelephonyCommandType_EVENT && argument == 0x06 : // TelephonyDataRecallLastNumber _childTemp, typeSwitchError = TelephonyDataRecallLastNumberParseWithBuffer(ctx, readBuffer, commandTypeContainer) - case commandType == TelephonyCommandType_EVENT && argument == 0x07: // TelephonyDataInternetConnectionRequestMade - _childTemp, typeSwitchError = TelephonyDataInternetConnectionRequestMadeParseWithBuffer(ctx, readBuffer) - case commandType == TelephonyCommandType_EVENT && argument == 0x80: // TelephonyDataIsolateSecondaryOutlet - _childTemp, typeSwitchError = TelephonyDataIsolateSecondaryOutletParseWithBuffer(ctx, readBuffer) - case commandType == TelephonyCommandType_EVENT && argument == 0x81: // TelephonyDataRecallLastNumberRequest - _childTemp, typeSwitchError = TelephonyDataRecallLastNumberRequestParseWithBuffer(ctx, readBuffer) - case commandType == TelephonyCommandType_EVENT && argument == 0x82: // TelephonyDataRejectIncomingCall - _childTemp, typeSwitchError = TelephonyDataRejectIncomingCallParseWithBuffer(ctx, readBuffer) - case commandType == TelephonyCommandType_EVENT && argument == 0x83: // TelephonyDataDivert +case commandType == TelephonyCommandType_EVENT && argument == 0x07 : // TelephonyDataInternetConnectionRequestMade + _childTemp, typeSwitchError = TelephonyDataInternetConnectionRequestMadeParseWithBuffer(ctx, readBuffer, ) +case commandType == TelephonyCommandType_EVENT && argument == 0x80 : // TelephonyDataIsolateSecondaryOutlet + _childTemp, typeSwitchError = TelephonyDataIsolateSecondaryOutletParseWithBuffer(ctx, readBuffer, ) +case commandType == TelephonyCommandType_EVENT && argument == 0x81 : // TelephonyDataRecallLastNumberRequest + _childTemp, typeSwitchError = TelephonyDataRecallLastNumberRequestParseWithBuffer(ctx, readBuffer, ) +case commandType == TelephonyCommandType_EVENT && argument == 0x82 : // TelephonyDataRejectIncomingCall + _childTemp, typeSwitchError = TelephonyDataRejectIncomingCallParseWithBuffer(ctx, readBuffer, ) +case commandType == TelephonyCommandType_EVENT && argument == 0x83 : // TelephonyDataDivert _childTemp, typeSwitchError = TelephonyDataDivertParseWithBuffer(ctx, readBuffer, commandTypeContainer) - case commandType == TelephonyCommandType_EVENT && argument == 0x84: // TelephonyDataClearDiversion - _childTemp, typeSwitchError = TelephonyDataClearDiversionParseWithBuffer(ctx, readBuffer) +case commandType == TelephonyCommandType_EVENT && argument == 0x84 : // TelephonyDataClearDiversion + _childTemp, typeSwitchError = TelephonyDataClearDiversionParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [commandType=%v, argument=%v]", commandType, argument) } @@ -233,7 +237,7 @@ func TelephonyDataParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff } // Finish initializing - _child.InitializeParent(_child, commandTypeContainer, argument) +_child.InitializeParent(_child , commandTypeContainer , argument ) return _child, nil } @@ -243,7 +247,7 @@ func (pm *_TelephonyData) SerializeParent(ctx context.Context, writeBuffer utils _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("TelephonyData"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("TelephonyData"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for TelephonyData") } @@ -281,6 +285,7 @@ func (pm *_TelephonyData) SerializeParent(ctx context.Context, writeBuffer utils return nil } + func (m *_TelephonyData) isTelephonyData() bool { return true } @@ -295,3 +300,6 @@ func (m *_TelephonyData) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/TelephonyDataClearDiversion.go b/plc4go/protocols/cbus/readwrite/model/TelephonyDataClearDiversion.go index a6c936882a5..d10a676623c 100644 --- a/plc4go/protocols/cbus/readwrite/model/TelephonyDataClearDiversion.go +++ b/plc4go/protocols/cbus/readwrite/model/TelephonyDataClearDiversion.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // TelephonyDataClearDiversion is the corresponding interface of TelephonyDataClearDiversion type TelephonyDataClearDiversion interface { @@ -46,6 +48,8 @@ type _TelephonyDataClearDiversion struct { *_TelephonyData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,19 +60,19 @@ type _TelephonyDataClearDiversion struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_TelephonyDataClearDiversion) InitializeParent(parent TelephonyData, commandTypeContainer TelephonyCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_TelephonyDataClearDiversion) InitializeParent(parent TelephonyData , commandTypeContainer TelephonyCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_TelephonyDataClearDiversion) GetParent() TelephonyData { +func (m *_TelephonyDataClearDiversion) GetParent() TelephonyData { return m._TelephonyData } + // NewTelephonyDataClearDiversion factory function for _TelephonyDataClearDiversion -func NewTelephonyDataClearDiversion(commandTypeContainer TelephonyCommandTypeContainer, argument byte) *_TelephonyDataClearDiversion { +func NewTelephonyDataClearDiversion( commandTypeContainer TelephonyCommandTypeContainer , argument byte ) *_TelephonyDataClearDiversion { _result := &_TelephonyDataClearDiversion{ - _TelephonyData: NewTelephonyData(commandTypeContainer, argument), + _TelephonyData: NewTelephonyData(commandTypeContainer, argument), } _result._TelephonyData._TelephonyDataChildRequirements = _result return _result @@ -76,7 +80,7 @@ func NewTelephonyDataClearDiversion(commandTypeContainer TelephonyCommandTypeCon // Deprecated: use the interface for direct cast func CastTelephonyDataClearDiversion(structType interface{}) TelephonyDataClearDiversion { - if casted, ok := structType.(TelephonyDataClearDiversion); ok { + if casted, ok := structType.(TelephonyDataClearDiversion); ok { return casted } if casted, ok := structType.(*TelephonyDataClearDiversion); ok { @@ -95,6 +99,7 @@ func (m *_TelephonyDataClearDiversion) GetLengthInBits(ctx context.Context) uint return lengthInBits } + func (m *_TelephonyDataClearDiversion) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -118,7 +123,8 @@ func TelephonyDataClearDiversionParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_TelephonyDataClearDiversion{ - _TelephonyData: &_TelephonyData{}, + _TelephonyData: &_TelephonyData{ + }, } _child._TelephonyData._TelephonyDataChildRequirements = _child return _child, nil @@ -148,6 +154,7 @@ func (m *_TelephonyDataClearDiversion) SerializeWithWriteBuffer(ctx context.Cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_TelephonyDataClearDiversion) isTelephonyDataClearDiversion() bool { return true } @@ -162,3 +169,6 @@ func (m *_TelephonyDataClearDiversion) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/TelephonyDataDialInFailure.go b/plc4go/protocols/cbus/readwrite/model/TelephonyDataDialInFailure.go index 3cb51be404b..91d12c7433f 100644 --- a/plc4go/protocols/cbus/readwrite/model/TelephonyDataDialInFailure.go +++ b/plc4go/protocols/cbus/readwrite/model/TelephonyDataDialInFailure.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // TelephonyDataDialInFailure is the corresponding interface of TelephonyDataDialInFailure type TelephonyDataDialInFailure interface { @@ -46,9 +48,11 @@ type TelephonyDataDialInFailureExactly interface { // _TelephonyDataDialInFailure is the data-structure of this message type _TelephonyDataDialInFailure struct { *_TelephonyData - Reason DialInFailureReason + Reason DialInFailureReason } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,15 +63,13 @@ type _TelephonyDataDialInFailure struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_TelephonyDataDialInFailure) InitializeParent(parent TelephonyData, commandTypeContainer TelephonyCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_TelephonyDataDialInFailure) InitializeParent(parent TelephonyData , commandTypeContainer TelephonyCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_TelephonyDataDialInFailure) GetParent() TelephonyData { +func (m *_TelephonyDataDialInFailure) GetParent() TelephonyData { return m._TelephonyData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -82,11 +84,12 @@ func (m *_TelephonyDataDialInFailure) GetReason() DialInFailureReason { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewTelephonyDataDialInFailure factory function for _TelephonyDataDialInFailure -func NewTelephonyDataDialInFailure(reason DialInFailureReason, commandTypeContainer TelephonyCommandTypeContainer, argument byte) *_TelephonyDataDialInFailure { +func NewTelephonyDataDialInFailure( reason DialInFailureReason , commandTypeContainer TelephonyCommandTypeContainer , argument byte ) *_TelephonyDataDialInFailure { _result := &_TelephonyDataDialInFailure{ - Reason: reason, - _TelephonyData: NewTelephonyData(commandTypeContainer, argument), + Reason: reason, + _TelephonyData: NewTelephonyData(commandTypeContainer, argument), } _result._TelephonyData._TelephonyDataChildRequirements = _result return _result @@ -94,7 +97,7 @@ func NewTelephonyDataDialInFailure(reason DialInFailureReason, commandTypeContai // Deprecated: use the interface for direct cast func CastTelephonyDataDialInFailure(structType interface{}) TelephonyDataDialInFailure { - if casted, ok := structType.(TelephonyDataDialInFailure); ok { + if casted, ok := structType.(TelephonyDataDialInFailure); ok { return casted } if casted, ok := structType.(*TelephonyDataDialInFailure); ok { @@ -116,6 +119,7 @@ func (m *_TelephonyDataDialInFailure) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_TelephonyDataDialInFailure) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -137,7 +141,7 @@ func TelephonyDataDialInFailureParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("reason"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for reason") } - _reason, _reasonErr := DialInFailureReasonParseWithBuffer(ctx, readBuffer) +_reason, _reasonErr := DialInFailureReasonParseWithBuffer(ctx, readBuffer) if _reasonErr != nil { return nil, errors.Wrap(_reasonErr, "Error parsing 'reason' field of TelephonyDataDialInFailure") } @@ -152,8 +156,9 @@ func TelephonyDataDialInFailureParseWithBuffer(ctx context.Context, readBuffer u // Create a partially initialized instance _child := &_TelephonyDataDialInFailure{ - _TelephonyData: &_TelephonyData{}, - Reason: reason, + _TelephonyData: &_TelephonyData{ + }, + Reason: reason, } _child._TelephonyData._TelephonyDataChildRequirements = _child return _child, nil @@ -175,17 +180,17 @@ func (m *_TelephonyDataDialInFailure) SerializeWithWriteBuffer(ctx context.Conte return errors.Wrap(pushErr, "Error pushing for TelephonyDataDialInFailure") } - // Simple Field (reason) - if pushErr := writeBuffer.PushContext("reason"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for reason") - } - _reasonErr := writeBuffer.WriteSerializable(ctx, m.GetReason()) - if popErr := writeBuffer.PopContext("reason"); popErr != nil { - return errors.Wrap(popErr, "Error popping for reason") - } - if _reasonErr != nil { - return errors.Wrap(_reasonErr, "Error serializing 'reason' field") - } + // Simple Field (reason) + if pushErr := writeBuffer.PushContext("reason"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for reason") + } + _reasonErr := writeBuffer.WriteSerializable(ctx, m.GetReason()) + if popErr := writeBuffer.PopContext("reason"); popErr != nil { + return errors.Wrap(popErr, "Error popping for reason") + } + if _reasonErr != nil { + return errors.Wrap(_reasonErr, "Error serializing 'reason' field") + } if popErr := writeBuffer.PopContext("TelephonyDataDialInFailure"); popErr != nil { return errors.Wrap(popErr, "Error popping for TelephonyDataDialInFailure") @@ -195,6 +200,7 @@ func (m *_TelephonyDataDialInFailure) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_TelephonyDataDialInFailure) isTelephonyDataDialInFailure() bool { return true } @@ -209,3 +215,6 @@ func (m *_TelephonyDataDialInFailure) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/TelephonyDataDialOutFailure.go b/plc4go/protocols/cbus/readwrite/model/TelephonyDataDialOutFailure.go index 2348072b717..df54f551c83 100644 --- a/plc4go/protocols/cbus/readwrite/model/TelephonyDataDialOutFailure.go +++ b/plc4go/protocols/cbus/readwrite/model/TelephonyDataDialOutFailure.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // TelephonyDataDialOutFailure is the corresponding interface of TelephonyDataDialOutFailure type TelephonyDataDialOutFailure interface { @@ -46,9 +48,11 @@ type TelephonyDataDialOutFailureExactly interface { // _TelephonyDataDialOutFailure is the data-structure of this message type _TelephonyDataDialOutFailure struct { *_TelephonyData - Reason DialOutFailureReason + Reason DialOutFailureReason } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,15 +63,13 @@ type _TelephonyDataDialOutFailure struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_TelephonyDataDialOutFailure) InitializeParent(parent TelephonyData, commandTypeContainer TelephonyCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_TelephonyDataDialOutFailure) InitializeParent(parent TelephonyData , commandTypeContainer TelephonyCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_TelephonyDataDialOutFailure) GetParent() TelephonyData { +func (m *_TelephonyDataDialOutFailure) GetParent() TelephonyData { return m._TelephonyData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -82,11 +84,12 @@ func (m *_TelephonyDataDialOutFailure) GetReason() DialOutFailureReason { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewTelephonyDataDialOutFailure factory function for _TelephonyDataDialOutFailure -func NewTelephonyDataDialOutFailure(reason DialOutFailureReason, commandTypeContainer TelephonyCommandTypeContainer, argument byte) *_TelephonyDataDialOutFailure { +func NewTelephonyDataDialOutFailure( reason DialOutFailureReason , commandTypeContainer TelephonyCommandTypeContainer , argument byte ) *_TelephonyDataDialOutFailure { _result := &_TelephonyDataDialOutFailure{ - Reason: reason, - _TelephonyData: NewTelephonyData(commandTypeContainer, argument), + Reason: reason, + _TelephonyData: NewTelephonyData(commandTypeContainer, argument), } _result._TelephonyData._TelephonyDataChildRequirements = _result return _result @@ -94,7 +97,7 @@ func NewTelephonyDataDialOutFailure(reason DialOutFailureReason, commandTypeCont // Deprecated: use the interface for direct cast func CastTelephonyDataDialOutFailure(structType interface{}) TelephonyDataDialOutFailure { - if casted, ok := structType.(TelephonyDataDialOutFailure); ok { + if casted, ok := structType.(TelephonyDataDialOutFailure); ok { return casted } if casted, ok := structType.(*TelephonyDataDialOutFailure); ok { @@ -116,6 +119,7 @@ func (m *_TelephonyDataDialOutFailure) GetLengthInBits(ctx context.Context) uint return lengthInBits } + func (m *_TelephonyDataDialOutFailure) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -137,7 +141,7 @@ func TelephonyDataDialOutFailureParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("reason"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for reason") } - _reason, _reasonErr := DialOutFailureReasonParseWithBuffer(ctx, readBuffer) +_reason, _reasonErr := DialOutFailureReasonParseWithBuffer(ctx, readBuffer) if _reasonErr != nil { return nil, errors.Wrap(_reasonErr, "Error parsing 'reason' field of TelephonyDataDialOutFailure") } @@ -152,8 +156,9 @@ func TelephonyDataDialOutFailureParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_TelephonyDataDialOutFailure{ - _TelephonyData: &_TelephonyData{}, - Reason: reason, + _TelephonyData: &_TelephonyData{ + }, + Reason: reason, } _child._TelephonyData._TelephonyDataChildRequirements = _child return _child, nil @@ -175,17 +180,17 @@ func (m *_TelephonyDataDialOutFailure) SerializeWithWriteBuffer(ctx context.Cont return errors.Wrap(pushErr, "Error pushing for TelephonyDataDialOutFailure") } - // Simple Field (reason) - if pushErr := writeBuffer.PushContext("reason"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for reason") - } - _reasonErr := writeBuffer.WriteSerializable(ctx, m.GetReason()) - if popErr := writeBuffer.PopContext("reason"); popErr != nil { - return errors.Wrap(popErr, "Error popping for reason") - } - if _reasonErr != nil { - return errors.Wrap(_reasonErr, "Error serializing 'reason' field") - } + // Simple Field (reason) + if pushErr := writeBuffer.PushContext("reason"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for reason") + } + _reasonErr := writeBuffer.WriteSerializable(ctx, m.GetReason()) + if popErr := writeBuffer.PopContext("reason"); popErr != nil { + return errors.Wrap(popErr, "Error popping for reason") + } + if _reasonErr != nil { + return errors.Wrap(_reasonErr, "Error serializing 'reason' field") + } if popErr := writeBuffer.PopContext("TelephonyDataDialOutFailure"); popErr != nil { return errors.Wrap(popErr, "Error popping for TelephonyDataDialOutFailure") @@ -195,6 +200,7 @@ func (m *_TelephonyDataDialOutFailure) SerializeWithWriteBuffer(ctx context.Cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_TelephonyDataDialOutFailure) isTelephonyDataDialOutFailure() bool { return true } @@ -209,3 +215,6 @@ func (m *_TelephonyDataDialOutFailure) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/TelephonyDataDivert.go b/plc4go/protocols/cbus/readwrite/model/TelephonyDataDivert.go index da562e1093c..a77490e405c 100644 --- a/plc4go/protocols/cbus/readwrite/model/TelephonyDataDivert.go +++ b/plc4go/protocols/cbus/readwrite/model/TelephonyDataDivert.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // TelephonyDataDivert is the corresponding interface of TelephonyDataDivert type TelephonyDataDivert interface { @@ -46,9 +48,11 @@ type TelephonyDataDivertExactly interface { // _TelephonyDataDivert is the data-structure of this message type _TelephonyDataDivert struct { *_TelephonyData - Number string + Number string } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,15 +63,13 @@ type _TelephonyDataDivert struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_TelephonyDataDivert) InitializeParent(parent TelephonyData, commandTypeContainer TelephonyCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_TelephonyDataDivert) InitializeParent(parent TelephonyData , commandTypeContainer TelephonyCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_TelephonyDataDivert) GetParent() TelephonyData { +func (m *_TelephonyDataDivert) GetParent() TelephonyData { return m._TelephonyData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -82,11 +84,12 @@ func (m *_TelephonyDataDivert) GetNumber() string { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewTelephonyDataDivert factory function for _TelephonyDataDivert -func NewTelephonyDataDivert(number string, commandTypeContainer TelephonyCommandTypeContainer, argument byte) *_TelephonyDataDivert { +func NewTelephonyDataDivert( number string , commandTypeContainer TelephonyCommandTypeContainer , argument byte ) *_TelephonyDataDivert { _result := &_TelephonyDataDivert{ - Number: number, - _TelephonyData: NewTelephonyData(commandTypeContainer, argument), + Number: number, + _TelephonyData: NewTelephonyData(commandTypeContainer, argument), } _result._TelephonyData._TelephonyDataChildRequirements = _result return _result @@ -94,7 +97,7 @@ func NewTelephonyDataDivert(number string, commandTypeContainer TelephonyCommand // Deprecated: use the interface for direct cast func CastTelephonyDataDivert(structType interface{}) TelephonyDataDivert { - if casted, ok := structType.(TelephonyDataDivert); ok { + if casted, ok := structType.(TelephonyDataDivert); ok { return casted } if casted, ok := structType.(*TelephonyDataDivert); ok { @@ -116,6 +119,7 @@ func (m *_TelephonyDataDivert) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_TelephonyDataDivert) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -134,7 +138,7 @@ func TelephonyDataDivertParseWithBuffer(ctx context.Context, readBuffer utils.Re _ = currentPos // Simple Field (number) - _number, _numberErr := readBuffer.ReadString("number", uint32(((commandTypeContainer.NumBytes())-(1))*(8)), "UTF-8") +_number, _numberErr := readBuffer.ReadString("number", uint32((((commandTypeContainer.NumBytes()) - ((1)))) * ((8))), "UTF-8") if _numberErr != nil { return nil, errors.Wrap(_numberErr, "Error parsing 'number' field of TelephonyDataDivert") } @@ -146,8 +150,9 @@ func TelephonyDataDivertParseWithBuffer(ctx context.Context, readBuffer utils.Re // Create a partially initialized instance _child := &_TelephonyDataDivert{ - _TelephonyData: &_TelephonyData{}, - Number: number, + _TelephonyData: &_TelephonyData{ + }, + Number: number, } _child._TelephonyData._TelephonyDataChildRequirements = _child return _child, nil @@ -169,12 +174,12 @@ func (m *_TelephonyDataDivert) SerializeWithWriteBuffer(ctx context.Context, wri return errors.Wrap(pushErr, "Error pushing for TelephonyDataDivert") } - // Simple Field (number) - number := string(m.GetNumber()) - _numberErr := writeBuffer.WriteString("number", uint32(((m.GetCommandTypeContainer().NumBytes())-(1))*(8)), "UTF-8", (number)) - if _numberErr != nil { - return errors.Wrap(_numberErr, "Error serializing 'number' field") - } + // Simple Field (number) + number := string(m.GetNumber()) + _numberErr := writeBuffer.WriteString("number", uint32((((m.GetCommandTypeContainer().NumBytes()) - ((1)))) * ((8))), "UTF-8", (number)) + if _numberErr != nil { + return errors.Wrap(_numberErr, "Error serializing 'number' field") + } if popErr := writeBuffer.PopContext("TelephonyDataDivert"); popErr != nil { return errors.Wrap(popErr, "Error popping for TelephonyDataDivert") @@ -184,6 +189,7 @@ func (m *_TelephonyDataDivert) SerializeWithWriteBuffer(ctx context.Context, wri return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_TelephonyDataDivert) isTelephonyDataDivert() bool { return true } @@ -198,3 +204,6 @@ func (m *_TelephonyDataDivert) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/TelephonyDataInternetConnectionRequestMade.go b/plc4go/protocols/cbus/readwrite/model/TelephonyDataInternetConnectionRequestMade.go index 62fc0009c9d..6c5dea1a359 100644 --- a/plc4go/protocols/cbus/readwrite/model/TelephonyDataInternetConnectionRequestMade.go +++ b/plc4go/protocols/cbus/readwrite/model/TelephonyDataInternetConnectionRequestMade.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // TelephonyDataInternetConnectionRequestMade is the corresponding interface of TelephonyDataInternetConnectionRequestMade type TelephonyDataInternetConnectionRequestMade interface { @@ -46,6 +48,8 @@ type _TelephonyDataInternetConnectionRequestMade struct { *_TelephonyData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,19 +60,19 @@ type _TelephonyDataInternetConnectionRequestMade struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_TelephonyDataInternetConnectionRequestMade) InitializeParent(parent TelephonyData, commandTypeContainer TelephonyCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_TelephonyDataInternetConnectionRequestMade) InitializeParent(parent TelephonyData , commandTypeContainer TelephonyCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_TelephonyDataInternetConnectionRequestMade) GetParent() TelephonyData { +func (m *_TelephonyDataInternetConnectionRequestMade) GetParent() TelephonyData { return m._TelephonyData } + // NewTelephonyDataInternetConnectionRequestMade factory function for _TelephonyDataInternetConnectionRequestMade -func NewTelephonyDataInternetConnectionRequestMade(commandTypeContainer TelephonyCommandTypeContainer, argument byte) *_TelephonyDataInternetConnectionRequestMade { +func NewTelephonyDataInternetConnectionRequestMade( commandTypeContainer TelephonyCommandTypeContainer , argument byte ) *_TelephonyDataInternetConnectionRequestMade { _result := &_TelephonyDataInternetConnectionRequestMade{ - _TelephonyData: NewTelephonyData(commandTypeContainer, argument), + _TelephonyData: NewTelephonyData(commandTypeContainer, argument), } _result._TelephonyData._TelephonyDataChildRequirements = _result return _result @@ -76,7 +80,7 @@ func NewTelephonyDataInternetConnectionRequestMade(commandTypeContainer Telephon // Deprecated: use the interface for direct cast func CastTelephonyDataInternetConnectionRequestMade(structType interface{}) TelephonyDataInternetConnectionRequestMade { - if casted, ok := structType.(TelephonyDataInternetConnectionRequestMade); ok { + if casted, ok := structType.(TelephonyDataInternetConnectionRequestMade); ok { return casted } if casted, ok := structType.(*TelephonyDataInternetConnectionRequestMade); ok { @@ -95,6 +99,7 @@ func (m *_TelephonyDataInternetConnectionRequestMade) GetLengthInBits(ctx contex return lengthInBits } + func (m *_TelephonyDataInternetConnectionRequestMade) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -118,7 +123,8 @@ func TelephonyDataInternetConnectionRequestMadeParseWithBuffer(ctx context.Conte // Create a partially initialized instance _child := &_TelephonyDataInternetConnectionRequestMade{ - _TelephonyData: &_TelephonyData{}, + _TelephonyData: &_TelephonyData{ + }, } _child._TelephonyData._TelephonyDataChildRequirements = _child return _child, nil @@ -148,6 +154,7 @@ func (m *_TelephonyDataInternetConnectionRequestMade) SerializeWithWriteBuffer(c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_TelephonyDataInternetConnectionRequestMade) isTelephonyDataInternetConnectionRequestMade() bool { return true } @@ -162,3 +169,6 @@ func (m *_TelephonyDataInternetConnectionRequestMade) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/TelephonyDataIsolateSecondaryOutlet.go b/plc4go/protocols/cbus/readwrite/model/TelephonyDataIsolateSecondaryOutlet.go index ef231936d7e..5a5bad020df 100644 --- a/plc4go/protocols/cbus/readwrite/model/TelephonyDataIsolateSecondaryOutlet.go +++ b/plc4go/protocols/cbus/readwrite/model/TelephonyDataIsolateSecondaryOutlet.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // TelephonyDataIsolateSecondaryOutlet is the corresponding interface of TelephonyDataIsolateSecondaryOutlet type TelephonyDataIsolateSecondaryOutlet interface { @@ -50,9 +52,11 @@ type TelephonyDataIsolateSecondaryOutletExactly interface { // _TelephonyDataIsolateSecondaryOutlet is the data-structure of this message type _TelephonyDataIsolateSecondaryOutlet struct { *_TelephonyData - IsolateStatus byte + IsolateStatus byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -63,15 +67,13 @@ type _TelephonyDataIsolateSecondaryOutlet struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_TelephonyDataIsolateSecondaryOutlet) InitializeParent(parent TelephonyData, commandTypeContainer TelephonyCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_TelephonyDataIsolateSecondaryOutlet) InitializeParent(parent TelephonyData , commandTypeContainer TelephonyCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_TelephonyDataIsolateSecondaryOutlet) GetParent() TelephonyData { +func (m *_TelephonyDataIsolateSecondaryOutlet) GetParent() TelephonyData { return m._TelephonyData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -107,11 +109,12 @@ func (m *_TelephonyDataIsolateSecondaryOutlet) GetIsToBeIsolated() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewTelephonyDataIsolateSecondaryOutlet factory function for _TelephonyDataIsolateSecondaryOutlet -func NewTelephonyDataIsolateSecondaryOutlet(isolateStatus byte, commandTypeContainer TelephonyCommandTypeContainer, argument byte) *_TelephonyDataIsolateSecondaryOutlet { +func NewTelephonyDataIsolateSecondaryOutlet( isolateStatus byte , commandTypeContainer TelephonyCommandTypeContainer , argument byte ) *_TelephonyDataIsolateSecondaryOutlet { _result := &_TelephonyDataIsolateSecondaryOutlet{ - IsolateStatus: isolateStatus, - _TelephonyData: NewTelephonyData(commandTypeContainer, argument), + IsolateStatus: isolateStatus, + _TelephonyData: NewTelephonyData(commandTypeContainer, argument), } _result._TelephonyData._TelephonyDataChildRequirements = _result return _result @@ -119,7 +122,7 @@ func NewTelephonyDataIsolateSecondaryOutlet(isolateStatus byte, commandTypeConta // Deprecated: use the interface for direct cast func CastTelephonyDataIsolateSecondaryOutlet(structType interface{}) TelephonyDataIsolateSecondaryOutlet { - if casted, ok := structType.(TelephonyDataIsolateSecondaryOutlet); ok { + if casted, ok := structType.(TelephonyDataIsolateSecondaryOutlet); ok { return casted } if casted, ok := structType.(*TelephonyDataIsolateSecondaryOutlet); ok { @@ -136,7 +139,7 @@ func (m *_TelephonyDataIsolateSecondaryOutlet) GetLengthInBits(ctx context.Conte lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (isolateStatus) - lengthInBits += 8 + lengthInBits += 8; // A virtual field doesn't have any in- or output. @@ -145,6 +148,7 @@ func (m *_TelephonyDataIsolateSecondaryOutlet) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_TelephonyDataIsolateSecondaryOutlet) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -163,7 +167,7 @@ func TelephonyDataIsolateSecondaryOutletParseWithBuffer(ctx context.Context, rea _ = currentPos // Simple Field (isolateStatus) - _isolateStatus, _isolateStatusErr := readBuffer.ReadByte("isolateStatus") +_isolateStatus, _isolateStatusErr := readBuffer.ReadByte("isolateStatus") if _isolateStatusErr != nil { return nil, errors.Wrap(_isolateStatusErr, "Error parsing 'isolateStatus' field of TelephonyDataIsolateSecondaryOutlet") } @@ -185,8 +189,9 @@ func TelephonyDataIsolateSecondaryOutletParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_TelephonyDataIsolateSecondaryOutlet{ - _TelephonyData: &_TelephonyData{}, - IsolateStatus: isolateStatus, + _TelephonyData: &_TelephonyData{ + }, + IsolateStatus: isolateStatus, } _child._TelephonyData._TelephonyDataChildRequirements = _child return _child, nil @@ -208,20 +213,20 @@ func (m *_TelephonyDataIsolateSecondaryOutlet) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for TelephonyDataIsolateSecondaryOutlet") } - // Simple Field (isolateStatus) - isolateStatus := byte(m.GetIsolateStatus()) - _isolateStatusErr := writeBuffer.WriteByte("isolateStatus", (isolateStatus)) - if _isolateStatusErr != nil { - return errors.Wrap(_isolateStatusErr, "Error serializing 'isolateStatus' field") - } - // Virtual field - if _isBehaveNormalErr := writeBuffer.WriteVirtual(ctx, "isBehaveNormal", m.GetIsBehaveNormal()); _isBehaveNormalErr != nil { - return errors.Wrap(_isBehaveNormalErr, "Error serializing 'isBehaveNormal' field") - } - // Virtual field - if _isToBeIsolatedErr := writeBuffer.WriteVirtual(ctx, "isToBeIsolated", m.GetIsToBeIsolated()); _isToBeIsolatedErr != nil { - return errors.Wrap(_isToBeIsolatedErr, "Error serializing 'isToBeIsolated' field") - } + // Simple Field (isolateStatus) + isolateStatus := byte(m.GetIsolateStatus()) + _isolateStatusErr := writeBuffer.WriteByte("isolateStatus", (isolateStatus)) + if _isolateStatusErr != nil { + return errors.Wrap(_isolateStatusErr, "Error serializing 'isolateStatus' field") + } + // Virtual field + if _isBehaveNormalErr := writeBuffer.WriteVirtual(ctx, "isBehaveNormal", m.GetIsBehaveNormal()); _isBehaveNormalErr != nil { + return errors.Wrap(_isBehaveNormalErr, "Error serializing 'isBehaveNormal' field") + } + // Virtual field + if _isToBeIsolatedErr := writeBuffer.WriteVirtual(ctx, "isToBeIsolated", m.GetIsToBeIsolated()); _isToBeIsolatedErr != nil { + return errors.Wrap(_isToBeIsolatedErr, "Error serializing 'isToBeIsolated' field") + } if popErr := writeBuffer.PopContext("TelephonyDataIsolateSecondaryOutlet"); popErr != nil { return errors.Wrap(popErr, "Error popping for TelephonyDataIsolateSecondaryOutlet") @@ -231,6 +236,7 @@ func (m *_TelephonyDataIsolateSecondaryOutlet) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_TelephonyDataIsolateSecondaryOutlet) isTelephonyDataIsolateSecondaryOutlet() bool { return true } @@ -245,3 +251,6 @@ func (m *_TelephonyDataIsolateSecondaryOutlet) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/TelephonyDataLineOffHook.go b/plc4go/protocols/cbus/readwrite/model/TelephonyDataLineOffHook.go index f9b5b09fb61..fc0ceba86d7 100644 --- a/plc4go/protocols/cbus/readwrite/model/TelephonyDataLineOffHook.go +++ b/plc4go/protocols/cbus/readwrite/model/TelephonyDataLineOffHook.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // TelephonyDataLineOffHook is the corresponding interface of TelephonyDataLineOffHook type TelephonyDataLineOffHook interface { @@ -48,10 +50,12 @@ type TelephonyDataLineOffHookExactly interface { // _TelephonyDataLineOffHook is the data-structure of this message type _TelephonyDataLineOffHook struct { *_TelephonyData - Reason LineOffHookReason - Number string + Reason LineOffHookReason + Number string } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -62,15 +66,13 @@ type _TelephonyDataLineOffHook struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_TelephonyDataLineOffHook) InitializeParent(parent TelephonyData, commandTypeContainer TelephonyCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_TelephonyDataLineOffHook) InitializeParent(parent TelephonyData , commandTypeContainer TelephonyCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_TelephonyDataLineOffHook) GetParent() TelephonyData { +func (m *_TelephonyDataLineOffHook) GetParent() TelephonyData { return m._TelephonyData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -89,12 +91,13 @@ func (m *_TelephonyDataLineOffHook) GetNumber() string { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewTelephonyDataLineOffHook factory function for _TelephonyDataLineOffHook -func NewTelephonyDataLineOffHook(reason LineOffHookReason, number string, commandTypeContainer TelephonyCommandTypeContainer, argument byte) *_TelephonyDataLineOffHook { +func NewTelephonyDataLineOffHook( reason LineOffHookReason , number string , commandTypeContainer TelephonyCommandTypeContainer , argument byte ) *_TelephonyDataLineOffHook { _result := &_TelephonyDataLineOffHook{ - Reason: reason, - Number: number, - _TelephonyData: NewTelephonyData(commandTypeContainer, argument), + Reason: reason, + Number: number, + _TelephonyData: NewTelephonyData(commandTypeContainer, argument), } _result._TelephonyData._TelephonyDataChildRequirements = _result return _result @@ -102,7 +105,7 @@ func NewTelephonyDataLineOffHook(reason LineOffHookReason, number string, comman // Deprecated: use the interface for direct cast func CastTelephonyDataLineOffHook(structType interface{}) TelephonyDataLineOffHook { - if casted, ok := structType.(TelephonyDataLineOffHook); ok { + if casted, ok := structType.(TelephonyDataLineOffHook); ok { return casted } if casted, ok := structType.(*TelephonyDataLineOffHook); ok { @@ -127,6 +130,7 @@ func (m *_TelephonyDataLineOffHook) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_TelephonyDataLineOffHook) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -148,7 +152,7 @@ func TelephonyDataLineOffHookParseWithBuffer(ctx context.Context, readBuffer uti if pullErr := readBuffer.PullContext("reason"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for reason") } - _reason, _reasonErr := LineOffHookReasonParseWithBuffer(ctx, readBuffer) +_reason, _reasonErr := LineOffHookReasonParseWithBuffer(ctx, readBuffer) if _reasonErr != nil { return nil, errors.Wrap(_reasonErr, "Error parsing 'reason' field of TelephonyDataLineOffHook") } @@ -158,7 +162,7 @@ func TelephonyDataLineOffHookParseWithBuffer(ctx context.Context, readBuffer uti } // Simple Field (number) - _number, _numberErr := readBuffer.ReadString("number", uint32(((commandTypeContainer.NumBytes())-(2))*(8)), "UTF-8") +_number, _numberErr := readBuffer.ReadString("number", uint32((((commandTypeContainer.NumBytes()) - ((2)))) * ((8))), "UTF-8") if _numberErr != nil { return nil, errors.Wrap(_numberErr, "Error parsing 'number' field of TelephonyDataLineOffHook") } @@ -170,9 +174,10 @@ func TelephonyDataLineOffHookParseWithBuffer(ctx context.Context, readBuffer uti // Create a partially initialized instance _child := &_TelephonyDataLineOffHook{ - _TelephonyData: &_TelephonyData{}, - Reason: reason, - Number: number, + _TelephonyData: &_TelephonyData{ + }, + Reason: reason, + Number: number, } _child._TelephonyData._TelephonyDataChildRequirements = _child return _child, nil @@ -194,24 +199,24 @@ func (m *_TelephonyDataLineOffHook) SerializeWithWriteBuffer(ctx context.Context return errors.Wrap(pushErr, "Error pushing for TelephonyDataLineOffHook") } - // Simple Field (reason) - if pushErr := writeBuffer.PushContext("reason"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for reason") - } - _reasonErr := writeBuffer.WriteSerializable(ctx, m.GetReason()) - if popErr := writeBuffer.PopContext("reason"); popErr != nil { - return errors.Wrap(popErr, "Error popping for reason") - } - if _reasonErr != nil { - return errors.Wrap(_reasonErr, "Error serializing 'reason' field") - } + // Simple Field (reason) + if pushErr := writeBuffer.PushContext("reason"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for reason") + } + _reasonErr := writeBuffer.WriteSerializable(ctx, m.GetReason()) + if popErr := writeBuffer.PopContext("reason"); popErr != nil { + return errors.Wrap(popErr, "Error popping for reason") + } + if _reasonErr != nil { + return errors.Wrap(_reasonErr, "Error serializing 'reason' field") + } - // Simple Field (number) - number := string(m.GetNumber()) - _numberErr := writeBuffer.WriteString("number", uint32(((m.GetCommandTypeContainer().NumBytes())-(2))*(8)), "UTF-8", (number)) - if _numberErr != nil { - return errors.Wrap(_numberErr, "Error serializing 'number' field") - } + // Simple Field (number) + number := string(m.GetNumber()) + _numberErr := writeBuffer.WriteString("number", uint32((((m.GetCommandTypeContainer().NumBytes()) - ((2)))) * ((8))), "UTF-8", (number)) + if _numberErr != nil { + return errors.Wrap(_numberErr, "Error serializing 'number' field") + } if popErr := writeBuffer.PopContext("TelephonyDataLineOffHook"); popErr != nil { return errors.Wrap(popErr, "Error popping for TelephonyDataLineOffHook") @@ -221,6 +226,7 @@ func (m *_TelephonyDataLineOffHook) SerializeWithWriteBuffer(ctx context.Context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_TelephonyDataLineOffHook) isTelephonyDataLineOffHook() bool { return true } @@ -235,3 +241,6 @@ func (m *_TelephonyDataLineOffHook) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/TelephonyDataLineOnHook.go b/plc4go/protocols/cbus/readwrite/model/TelephonyDataLineOnHook.go index 4b7cfd733c6..77462f54586 100644 --- a/plc4go/protocols/cbus/readwrite/model/TelephonyDataLineOnHook.go +++ b/plc4go/protocols/cbus/readwrite/model/TelephonyDataLineOnHook.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // TelephonyDataLineOnHook is the corresponding interface of TelephonyDataLineOnHook type TelephonyDataLineOnHook interface { @@ -46,6 +48,8 @@ type _TelephonyDataLineOnHook struct { *_TelephonyData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,19 +60,19 @@ type _TelephonyDataLineOnHook struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_TelephonyDataLineOnHook) InitializeParent(parent TelephonyData, commandTypeContainer TelephonyCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_TelephonyDataLineOnHook) InitializeParent(parent TelephonyData , commandTypeContainer TelephonyCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_TelephonyDataLineOnHook) GetParent() TelephonyData { +func (m *_TelephonyDataLineOnHook) GetParent() TelephonyData { return m._TelephonyData } + // NewTelephonyDataLineOnHook factory function for _TelephonyDataLineOnHook -func NewTelephonyDataLineOnHook(commandTypeContainer TelephonyCommandTypeContainer, argument byte) *_TelephonyDataLineOnHook { +func NewTelephonyDataLineOnHook( commandTypeContainer TelephonyCommandTypeContainer , argument byte ) *_TelephonyDataLineOnHook { _result := &_TelephonyDataLineOnHook{ - _TelephonyData: NewTelephonyData(commandTypeContainer, argument), + _TelephonyData: NewTelephonyData(commandTypeContainer, argument), } _result._TelephonyData._TelephonyDataChildRequirements = _result return _result @@ -76,7 +80,7 @@ func NewTelephonyDataLineOnHook(commandTypeContainer TelephonyCommandTypeContain // Deprecated: use the interface for direct cast func CastTelephonyDataLineOnHook(structType interface{}) TelephonyDataLineOnHook { - if casted, ok := structType.(TelephonyDataLineOnHook); ok { + if casted, ok := structType.(TelephonyDataLineOnHook); ok { return casted } if casted, ok := structType.(*TelephonyDataLineOnHook); ok { @@ -95,6 +99,7 @@ func (m *_TelephonyDataLineOnHook) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_TelephonyDataLineOnHook) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -118,7 +123,8 @@ func TelephonyDataLineOnHookParseWithBuffer(ctx context.Context, readBuffer util // Create a partially initialized instance _child := &_TelephonyDataLineOnHook{ - _TelephonyData: &_TelephonyData{}, + _TelephonyData: &_TelephonyData{ + }, } _child._TelephonyData._TelephonyDataChildRequirements = _child return _child, nil @@ -148,6 +154,7 @@ func (m *_TelephonyDataLineOnHook) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_TelephonyDataLineOnHook) isTelephonyDataLineOnHook() bool { return true } @@ -162,3 +169,6 @@ func (m *_TelephonyDataLineOnHook) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/TelephonyDataRecallLastNumber.go b/plc4go/protocols/cbus/readwrite/model/TelephonyDataRecallLastNumber.go index 4a0c165c687..5db6ebdfd32 100644 --- a/plc4go/protocols/cbus/readwrite/model/TelephonyDataRecallLastNumber.go +++ b/plc4go/protocols/cbus/readwrite/model/TelephonyDataRecallLastNumber.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // TelephonyDataRecallLastNumber is the corresponding interface of TelephonyDataRecallLastNumber type TelephonyDataRecallLastNumber interface { @@ -52,10 +54,12 @@ type TelephonyDataRecallLastNumberExactly interface { // _TelephonyDataRecallLastNumber is the data-structure of this message type _TelephonyDataRecallLastNumber struct { *_TelephonyData - RecallLastNumberType byte - Number string + RecallLastNumberType byte + Number string } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -66,15 +70,13 @@ type _TelephonyDataRecallLastNumber struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_TelephonyDataRecallLastNumber) InitializeParent(parent TelephonyData, commandTypeContainer TelephonyCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_TelephonyDataRecallLastNumber) InitializeParent(parent TelephonyData , commandTypeContainer TelephonyCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_TelephonyDataRecallLastNumber) GetParent() TelephonyData { +func (m *_TelephonyDataRecallLastNumber) GetParent() TelephonyData { return m._TelephonyData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -114,12 +116,13 @@ func (m *_TelephonyDataRecallLastNumber) GetIsNumberOfLastIncomingCall() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewTelephonyDataRecallLastNumber factory function for _TelephonyDataRecallLastNumber -func NewTelephonyDataRecallLastNumber(recallLastNumberType byte, number string, commandTypeContainer TelephonyCommandTypeContainer, argument byte) *_TelephonyDataRecallLastNumber { +func NewTelephonyDataRecallLastNumber( recallLastNumberType byte , number string , commandTypeContainer TelephonyCommandTypeContainer , argument byte ) *_TelephonyDataRecallLastNumber { _result := &_TelephonyDataRecallLastNumber{ RecallLastNumberType: recallLastNumberType, - Number: number, - _TelephonyData: NewTelephonyData(commandTypeContainer, argument), + Number: number, + _TelephonyData: NewTelephonyData(commandTypeContainer, argument), } _result._TelephonyData._TelephonyDataChildRequirements = _result return _result @@ -127,7 +130,7 @@ func NewTelephonyDataRecallLastNumber(recallLastNumberType byte, number string, // Deprecated: use the interface for direct cast func CastTelephonyDataRecallLastNumber(structType interface{}) TelephonyDataRecallLastNumber { - if casted, ok := structType.(TelephonyDataRecallLastNumber); ok { + if casted, ok := structType.(TelephonyDataRecallLastNumber); ok { return casted } if casted, ok := structType.(*TelephonyDataRecallLastNumber); ok { @@ -144,7 +147,7 @@ func (m *_TelephonyDataRecallLastNumber) GetLengthInBits(ctx context.Context) ui lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (recallLastNumberType) - lengthInBits += 8 + lengthInBits += 8; // A virtual field doesn't have any in- or output. @@ -156,6 +159,7 @@ func (m *_TelephonyDataRecallLastNumber) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_TelephonyDataRecallLastNumber) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -174,7 +178,7 @@ func TelephonyDataRecallLastNumberParseWithBuffer(ctx context.Context, readBuffe _ = currentPos // Simple Field (recallLastNumberType) - _recallLastNumberType, _recallLastNumberTypeErr := readBuffer.ReadByte("recallLastNumberType") +_recallLastNumberType, _recallLastNumberTypeErr := readBuffer.ReadByte("recallLastNumberType") if _recallLastNumberTypeErr != nil { return nil, errors.Wrap(_recallLastNumberTypeErr, "Error parsing 'recallLastNumberType' field of TelephonyDataRecallLastNumber") } @@ -191,7 +195,7 @@ func TelephonyDataRecallLastNumberParseWithBuffer(ctx context.Context, readBuffe _ = isNumberOfLastIncomingCall // Simple Field (number) - _number, _numberErr := readBuffer.ReadString("number", uint32(((commandTypeContainer.NumBytes())-(2))*(8)), "UTF-8") +_number, _numberErr := readBuffer.ReadString("number", uint32((((commandTypeContainer.NumBytes()) - ((2)))) * ((8))), "UTF-8") if _numberErr != nil { return nil, errors.Wrap(_numberErr, "Error parsing 'number' field of TelephonyDataRecallLastNumber") } @@ -203,9 +207,10 @@ func TelephonyDataRecallLastNumberParseWithBuffer(ctx context.Context, readBuffe // Create a partially initialized instance _child := &_TelephonyDataRecallLastNumber{ - _TelephonyData: &_TelephonyData{}, + _TelephonyData: &_TelephonyData{ + }, RecallLastNumberType: recallLastNumberType, - Number: number, + Number: number, } _child._TelephonyData._TelephonyDataChildRequirements = _child return _child, nil @@ -227,27 +232,27 @@ func (m *_TelephonyDataRecallLastNumber) SerializeWithWriteBuffer(ctx context.Co return errors.Wrap(pushErr, "Error pushing for TelephonyDataRecallLastNumber") } - // Simple Field (recallLastNumberType) - recallLastNumberType := byte(m.GetRecallLastNumberType()) - _recallLastNumberTypeErr := writeBuffer.WriteByte("recallLastNumberType", (recallLastNumberType)) - if _recallLastNumberTypeErr != nil { - return errors.Wrap(_recallLastNumberTypeErr, "Error serializing 'recallLastNumberType' field") - } - // Virtual field - if _isNumberOfLastOutgoingCallErr := writeBuffer.WriteVirtual(ctx, "isNumberOfLastOutgoingCall", m.GetIsNumberOfLastOutgoingCall()); _isNumberOfLastOutgoingCallErr != nil { - return errors.Wrap(_isNumberOfLastOutgoingCallErr, "Error serializing 'isNumberOfLastOutgoingCall' field") - } - // Virtual field - if _isNumberOfLastIncomingCallErr := writeBuffer.WriteVirtual(ctx, "isNumberOfLastIncomingCall", m.GetIsNumberOfLastIncomingCall()); _isNumberOfLastIncomingCallErr != nil { - return errors.Wrap(_isNumberOfLastIncomingCallErr, "Error serializing 'isNumberOfLastIncomingCall' field") - } + // Simple Field (recallLastNumberType) + recallLastNumberType := byte(m.GetRecallLastNumberType()) + _recallLastNumberTypeErr := writeBuffer.WriteByte("recallLastNumberType", (recallLastNumberType)) + if _recallLastNumberTypeErr != nil { + return errors.Wrap(_recallLastNumberTypeErr, "Error serializing 'recallLastNumberType' field") + } + // Virtual field + if _isNumberOfLastOutgoingCallErr := writeBuffer.WriteVirtual(ctx, "isNumberOfLastOutgoingCall", m.GetIsNumberOfLastOutgoingCall()); _isNumberOfLastOutgoingCallErr != nil { + return errors.Wrap(_isNumberOfLastOutgoingCallErr, "Error serializing 'isNumberOfLastOutgoingCall' field") + } + // Virtual field + if _isNumberOfLastIncomingCallErr := writeBuffer.WriteVirtual(ctx, "isNumberOfLastIncomingCall", m.GetIsNumberOfLastIncomingCall()); _isNumberOfLastIncomingCallErr != nil { + return errors.Wrap(_isNumberOfLastIncomingCallErr, "Error serializing 'isNumberOfLastIncomingCall' field") + } - // Simple Field (number) - number := string(m.GetNumber()) - _numberErr := writeBuffer.WriteString("number", uint32(((m.GetCommandTypeContainer().NumBytes())-(2))*(8)), "UTF-8", (number)) - if _numberErr != nil { - return errors.Wrap(_numberErr, "Error serializing 'number' field") - } + // Simple Field (number) + number := string(m.GetNumber()) + _numberErr := writeBuffer.WriteString("number", uint32((((m.GetCommandTypeContainer().NumBytes()) - ((2)))) * ((8))), "UTF-8", (number)) + if _numberErr != nil { + return errors.Wrap(_numberErr, "Error serializing 'number' field") + } if popErr := writeBuffer.PopContext("TelephonyDataRecallLastNumber"); popErr != nil { return errors.Wrap(popErr, "Error popping for TelephonyDataRecallLastNumber") @@ -257,6 +262,7 @@ func (m *_TelephonyDataRecallLastNumber) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_TelephonyDataRecallLastNumber) isTelephonyDataRecallLastNumber() bool { return true } @@ -271,3 +277,6 @@ func (m *_TelephonyDataRecallLastNumber) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/TelephonyDataRecallLastNumberRequest.go b/plc4go/protocols/cbus/readwrite/model/TelephonyDataRecallLastNumberRequest.go index bb0f38e886b..bbf1c4eca7f 100644 --- a/plc4go/protocols/cbus/readwrite/model/TelephonyDataRecallLastNumberRequest.go +++ b/plc4go/protocols/cbus/readwrite/model/TelephonyDataRecallLastNumberRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // TelephonyDataRecallLastNumberRequest is the corresponding interface of TelephonyDataRecallLastNumberRequest type TelephonyDataRecallLastNumberRequest interface { @@ -50,9 +52,11 @@ type TelephonyDataRecallLastNumberRequestExactly interface { // _TelephonyDataRecallLastNumberRequest is the data-structure of this message type _TelephonyDataRecallLastNumberRequest struct { *_TelephonyData - RecallLastNumberType byte + RecallLastNumberType byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -63,15 +67,13 @@ type _TelephonyDataRecallLastNumberRequest struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_TelephonyDataRecallLastNumberRequest) InitializeParent(parent TelephonyData, commandTypeContainer TelephonyCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_TelephonyDataRecallLastNumberRequest) InitializeParent(parent TelephonyData , commandTypeContainer TelephonyCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_TelephonyDataRecallLastNumberRequest) GetParent() TelephonyData { +func (m *_TelephonyDataRecallLastNumberRequest) GetParent() TelephonyData { return m._TelephonyData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -107,11 +109,12 @@ func (m *_TelephonyDataRecallLastNumberRequest) GetIsNumberOfLastIncomingCall() /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewTelephonyDataRecallLastNumberRequest factory function for _TelephonyDataRecallLastNumberRequest -func NewTelephonyDataRecallLastNumberRequest(recallLastNumberType byte, commandTypeContainer TelephonyCommandTypeContainer, argument byte) *_TelephonyDataRecallLastNumberRequest { +func NewTelephonyDataRecallLastNumberRequest( recallLastNumberType byte , commandTypeContainer TelephonyCommandTypeContainer , argument byte ) *_TelephonyDataRecallLastNumberRequest { _result := &_TelephonyDataRecallLastNumberRequest{ RecallLastNumberType: recallLastNumberType, - _TelephonyData: NewTelephonyData(commandTypeContainer, argument), + _TelephonyData: NewTelephonyData(commandTypeContainer, argument), } _result._TelephonyData._TelephonyDataChildRequirements = _result return _result @@ -119,7 +122,7 @@ func NewTelephonyDataRecallLastNumberRequest(recallLastNumberType byte, commandT // Deprecated: use the interface for direct cast func CastTelephonyDataRecallLastNumberRequest(structType interface{}) TelephonyDataRecallLastNumberRequest { - if casted, ok := structType.(TelephonyDataRecallLastNumberRequest); ok { + if casted, ok := structType.(TelephonyDataRecallLastNumberRequest); ok { return casted } if casted, ok := structType.(*TelephonyDataRecallLastNumberRequest); ok { @@ -136,7 +139,7 @@ func (m *_TelephonyDataRecallLastNumberRequest) GetLengthInBits(ctx context.Cont lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (recallLastNumberType) - lengthInBits += 8 + lengthInBits += 8; // A virtual field doesn't have any in- or output. @@ -145,6 +148,7 @@ func (m *_TelephonyDataRecallLastNumberRequest) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_TelephonyDataRecallLastNumberRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -163,7 +167,7 @@ func TelephonyDataRecallLastNumberRequestParseWithBuffer(ctx context.Context, re _ = currentPos // Simple Field (recallLastNumberType) - _recallLastNumberType, _recallLastNumberTypeErr := readBuffer.ReadByte("recallLastNumberType") +_recallLastNumberType, _recallLastNumberTypeErr := readBuffer.ReadByte("recallLastNumberType") if _recallLastNumberTypeErr != nil { return nil, errors.Wrap(_recallLastNumberTypeErr, "Error parsing 'recallLastNumberType' field of TelephonyDataRecallLastNumberRequest") } @@ -185,7 +189,8 @@ func TelephonyDataRecallLastNumberRequestParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_TelephonyDataRecallLastNumberRequest{ - _TelephonyData: &_TelephonyData{}, + _TelephonyData: &_TelephonyData{ + }, RecallLastNumberType: recallLastNumberType, } _child._TelephonyData._TelephonyDataChildRequirements = _child @@ -208,20 +213,20 @@ func (m *_TelephonyDataRecallLastNumberRequest) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for TelephonyDataRecallLastNumberRequest") } - // Simple Field (recallLastNumberType) - recallLastNumberType := byte(m.GetRecallLastNumberType()) - _recallLastNumberTypeErr := writeBuffer.WriteByte("recallLastNumberType", (recallLastNumberType)) - if _recallLastNumberTypeErr != nil { - return errors.Wrap(_recallLastNumberTypeErr, "Error serializing 'recallLastNumberType' field") - } - // Virtual field - if _isNumberOfLastOutgoingCallErr := writeBuffer.WriteVirtual(ctx, "isNumberOfLastOutgoingCall", m.GetIsNumberOfLastOutgoingCall()); _isNumberOfLastOutgoingCallErr != nil { - return errors.Wrap(_isNumberOfLastOutgoingCallErr, "Error serializing 'isNumberOfLastOutgoingCall' field") - } - // Virtual field - if _isNumberOfLastIncomingCallErr := writeBuffer.WriteVirtual(ctx, "isNumberOfLastIncomingCall", m.GetIsNumberOfLastIncomingCall()); _isNumberOfLastIncomingCallErr != nil { - return errors.Wrap(_isNumberOfLastIncomingCallErr, "Error serializing 'isNumberOfLastIncomingCall' field") - } + // Simple Field (recallLastNumberType) + recallLastNumberType := byte(m.GetRecallLastNumberType()) + _recallLastNumberTypeErr := writeBuffer.WriteByte("recallLastNumberType", (recallLastNumberType)) + if _recallLastNumberTypeErr != nil { + return errors.Wrap(_recallLastNumberTypeErr, "Error serializing 'recallLastNumberType' field") + } + // Virtual field + if _isNumberOfLastOutgoingCallErr := writeBuffer.WriteVirtual(ctx, "isNumberOfLastOutgoingCall", m.GetIsNumberOfLastOutgoingCall()); _isNumberOfLastOutgoingCallErr != nil { + return errors.Wrap(_isNumberOfLastOutgoingCallErr, "Error serializing 'isNumberOfLastOutgoingCall' field") + } + // Virtual field + if _isNumberOfLastIncomingCallErr := writeBuffer.WriteVirtual(ctx, "isNumberOfLastIncomingCall", m.GetIsNumberOfLastIncomingCall()); _isNumberOfLastIncomingCallErr != nil { + return errors.Wrap(_isNumberOfLastIncomingCallErr, "Error serializing 'isNumberOfLastIncomingCall' field") + } if popErr := writeBuffer.PopContext("TelephonyDataRecallLastNumberRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for TelephonyDataRecallLastNumberRequest") @@ -231,6 +236,7 @@ func (m *_TelephonyDataRecallLastNumberRequest) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_TelephonyDataRecallLastNumberRequest) isTelephonyDataRecallLastNumberRequest() bool { return true } @@ -245,3 +251,6 @@ func (m *_TelephonyDataRecallLastNumberRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/TelephonyDataRejectIncomingCall.go b/plc4go/protocols/cbus/readwrite/model/TelephonyDataRejectIncomingCall.go index 86e665f44cc..25606b6a50e 100644 --- a/plc4go/protocols/cbus/readwrite/model/TelephonyDataRejectIncomingCall.go +++ b/plc4go/protocols/cbus/readwrite/model/TelephonyDataRejectIncomingCall.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // TelephonyDataRejectIncomingCall is the corresponding interface of TelephonyDataRejectIncomingCall type TelephonyDataRejectIncomingCall interface { @@ -46,6 +48,8 @@ type _TelephonyDataRejectIncomingCall struct { *_TelephonyData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,19 +60,19 @@ type _TelephonyDataRejectIncomingCall struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_TelephonyDataRejectIncomingCall) InitializeParent(parent TelephonyData, commandTypeContainer TelephonyCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_TelephonyDataRejectIncomingCall) InitializeParent(parent TelephonyData , commandTypeContainer TelephonyCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_TelephonyDataRejectIncomingCall) GetParent() TelephonyData { +func (m *_TelephonyDataRejectIncomingCall) GetParent() TelephonyData { return m._TelephonyData } + // NewTelephonyDataRejectIncomingCall factory function for _TelephonyDataRejectIncomingCall -func NewTelephonyDataRejectIncomingCall(commandTypeContainer TelephonyCommandTypeContainer, argument byte) *_TelephonyDataRejectIncomingCall { +func NewTelephonyDataRejectIncomingCall( commandTypeContainer TelephonyCommandTypeContainer , argument byte ) *_TelephonyDataRejectIncomingCall { _result := &_TelephonyDataRejectIncomingCall{ - _TelephonyData: NewTelephonyData(commandTypeContainer, argument), + _TelephonyData: NewTelephonyData(commandTypeContainer, argument), } _result._TelephonyData._TelephonyDataChildRequirements = _result return _result @@ -76,7 +80,7 @@ func NewTelephonyDataRejectIncomingCall(commandTypeContainer TelephonyCommandTyp // Deprecated: use the interface for direct cast func CastTelephonyDataRejectIncomingCall(structType interface{}) TelephonyDataRejectIncomingCall { - if casted, ok := structType.(TelephonyDataRejectIncomingCall); ok { + if casted, ok := structType.(TelephonyDataRejectIncomingCall); ok { return casted } if casted, ok := structType.(*TelephonyDataRejectIncomingCall); ok { @@ -95,6 +99,7 @@ func (m *_TelephonyDataRejectIncomingCall) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_TelephonyDataRejectIncomingCall) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -118,7 +123,8 @@ func TelephonyDataRejectIncomingCallParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_TelephonyDataRejectIncomingCall{ - _TelephonyData: &_TelephonyData{}, + _TelephonyData: &_TelephonyData{ + }, } _child._TelephonyData._TelephonyDataChildRequirements = _child return _child, nil @@ -148,6 +154,7 @@ func (m *_TelephonyDataRejectIncomingCall) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_TelephonyDataRejectIncomingCall) isTelephonyDataRejectIncomingCall() bool { return true } @@ -162,3 +169,6 @@ func (m *_TelephonyDataRejectIncomingCall) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/TelephonyDataRinging.go b/plc4go/protocols/cbus/readwrite/model/TelephonyDataRinging.go index bd12f8219f7..460cb3328d9 100644 --- a/plc4go/protocols/cbus/readwrite/model/TelephonyDataRinging.go +++ b/plc4go/protocols/cbus/readwrite/model/TelephonyDataRinging.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // TelephonyDataRinging is the corresponding interface of TelephonyDataRinging type TelephonyDataRinging interface { @@ -46,11 +48,13 @@ type TelephonyDataRingingExactly interface { // _TelephonyDataRinging is the data-structure of this message type _TelephonyDataRinging struct { *_TelephonyData - Number string + Number string // Reserved Fields reservedField0 *byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -61,15 +65,13 @@ type _TelephonyDataRinging struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_TelephonyDataRinging) InitializeParent(parent TelephonyData, commandTypeContainer TelephonyCommandTypeContainer, argument byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_TelephonyDataRinging) InitializeParent(parent TelephonyData , commandTypeContainer TelephonyCommandTypeContainer , argument byte ) { m.CommandTypeContainer = commandTypeContainer m.Argument = argument } -func (m *_TelephonyDataRinging) GetParent() TelephonyData { +func (m *_TelephonyDataRinging) GetParent() TelephonyData { return m._TelephonyData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -84,11 +86,12 @@ func (m *_TelephonyDataRinging) GetNumber() string { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewTelephonyDataRinging factory function for _TelephonyDataRinging -func NewTelephonyDataRinging(number string, commandTypeContainer TelephonyCommandTypeContainer, argument byte) *_TelephonyDataRinging { +func NewTelephonyDataRinging( number string , commandTypeContainer TelephonyCommandTypeContainer , argument byte ) *_TelephonyDataRinging { _result := &_TelephonyDataRinging{ - Number: number, - _TelephonyData: NewTelephonyData(commandTypeContainer, argument), + Number: number, + _TelephonyData: NewTelephonyData(commandTypeContainer, argument), } _result._TelephonyData._TelephonyDataChildRequirements = _result return _result @@ -96,7 +99,7 @@ func NewTelephonyDataRinging(number string, commandTypeContainer TelephonyComman // Deprecated: use the interface for direct cast func CastTelephonyDataRinging(structType interface{}) TelephonyDataRinging { - if casted, ok := structType.(TelephonyDataRinging); ok { + if casted, ok := structType.(TelephonyDataRinging); ok { return casted } if casted, ok := structType.(*TelephonyDataRinging); ok { @@ -121,6 +124,7 @@ func (m *_TelephonyDataRinging) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_TelephonyDataRinging) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -148,7 +152,7 @@ func TelephonyDataRingingParseWithBuffer(ctx context.Context, readBuffer utils.R if reserved != byte(0x01) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": byte(0x01), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -156,7 +160,7 @@ func TelephonyDataRingingParseWithBuffer(ctx context.Context, readBuffer utils.R } // Simple Field (number) - _number, _numberErr := readBuffer.ReadString("number", uint32(((commandTypeContainer.NumBytes())-(2))*(8)), "UTF-8") +_number, _numberErr := readBuffer.ReadString("number", uint32((((commandTypeContainer.NumBytes()) - ((2)))) * ((8))), "UTF-8") if _numberErr != nil { return nil, errors.Wrap(_numberErr, "Error parsing 'number' field of TelephonyDataRinging") } @@ -168,8 +172,9 @@ func TelephonyDataRingingParseWithBuffer(ctx context.Context, readBuffer utils.R // Create a partially initialized instance _child := &_TelephonyDataRinging{ - _TelephonyData: &_TelephonyData{}, - Number: number, + _TelephonyData: &_TelephonyData{ + }, + Number: number, reservedField0: reservedField0, } _child._TelephonyData._TelephonyDataChildRequirements = _child @@ -192,28 +197,28 @@ func (m *_TelephonyDataRinging) SerializeWithWriteBuffer(ctx context.Context, wr return errors.Wrap(pushErr, "Error pushing for TelephonyDataRinging") } - // Reserved Field (reserved) - { - var reserved byte = byte(0x01) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": byte(0x01), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteByte("reserved", reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + // Reserved Field (reserved) + { + var reserved byte = byte(0x01) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": byte(0x01), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 } - - // Simple Field (number) - number := string(m.GetNumber()) - _numberErr := writeBuffer.WriteString("number", uint32(((m.GetCommandTypeContainer().NumBytes())-(2))*(8)), "UTF-8", (number)) - if _numberErr != nil { - return errors.Wrap(_numberErr, "Error serializing 'number' field") + _err := writeBuffer.WriteByte("reserved", reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } + + // Simple Field (number) + number := string(m.GetNumber()) + _numberErr := writeBuffer.WriteString("number", uint32((((m.GetCommandTypeContainer().NumBytes()) - ((2)))) * ((8))), "UTF-8", (number)) + if _numberErr != nil { + return errors.Wrap(_numberErr, "Error serializing 'number' field") + } if popErr := writeBuffer.PopContext("TelephonyDataRinging"); popErr != nil { return errors.Wrap(popErr, "Error popping for TelephonyDataRinging") @@ -223,6 +228,7 @@ func (m *_TelephonyDataRinging) SerializeWithWriteBuffer(ctx context.Context, wr return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_TelephonyDataRinging) isTelephonyDataRinging() bool { return true } @@ -237,3 +243,6 @@ func (m *_TelephonyDataRinging) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/TemperatureBroadcastCommandType.go b/plc4go/protocols/cbus/readwrite/model/TemperatureBroadcastCommandType.go index 35578b3d47d..f18e3a2daaa 100644 --- a/plc4go/protocols/cbus/readwrite/model/TemperatureBroadcastCommandType.go +++ b/plc4go/protocols/cbus/readwrite/model/TemperatureBroadcastCommandType.go @@ -35,7 +35,7 @@ type ITemperatureBroadcastCommandType interface { NumberOfArguments() uint8 } -const ( +const( TemperatureBroadcastCommandType_BROADCAST_EVENT TemperatureBroadcastCommandType = 0x00 ) @@ -43,19 +43,18 @@ var TemperatureBroadcastCommandTypeValues []TemperatureBroadcastCommandType func init() { _ = errors.New - TemperatureBroadcastCommandTypeValues = []TemperatureBroadcastCommandType{ + TemperatureBroadcastCommandTypeValues = []TemperatureBroadcastCommandType { TemperatureBroadcastCommandType_BROADCAST_EVENT, } } + func (e TemperatureBroadcastCommandType) NumberOfArguments() uint8 { - switch e { - case 0x00: - { /* '0x00' */ - return 2 + switch e { + case 0x00: { /* '0x00' */ + return 2 } - default: - { + default: { return 0 } } @@ -71,8 +70,8 @@ func TemperatureBroadcastCommandTypeFirstEnumForFieldNumberOfArguments(value uin } func TemperatureBroadcastCommandTypeByValue(value uint8) (enum TemperatureBroadcastCommandType, ok bool) { switch value { - case 0x00: - return TemperatureBroadcastCommandType_BROADCAST_EVENT, true + case 0x00: + return TemperatureBroadcastCommandType_BROADCAST_EVENT, true } return 0, false } @@ -85,13 +84,13 @@ func TemperatureBroadcastCommandTypeByName(value string) (enum TemperatureBroadc return 0, false } -func TemperatureBroadcastCommandTypeKnows(value uint8) bool { +func TemperatureBroadcastCommandTypeKnows(value uint8) bool { for _, typeValue := range TemperatureBroadcastCommandTypeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastTemperatureBroadcastCommandType(structType interface{}) TemperatureBroadcastCommandType { @@ -153,3 +152,4 @@ func (e TemperatureBroadcastCommandType) PLC4XEnumName() string { func (e TemperatureBroadcastCommandType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/TemperatureBroadcastCommandTypeContainer.go b/plc4go/protocols/cbus/readwrite/model/TemperatureBroadcastCommandTypeContainer.go index 495564db49c..b8ced2da425 100644 --- a/plc4go/protocols/cbus/readwrite/model/TemperatureBroadcastCommandTypeContainer.go +++ b/plc4go/protocols/cbus/readwrite/model/TemperatureBroadcastCommandTypeContainer.go @@ -36,17 +36,17 @@ type ITemperatureBroadcastCommandTypeContainer interface { CommandType() TemperatureBroadcastCommandType } -const ( - TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent0_2Bytes TemperatureBroadcastCommandTypeContainer = 0x02 - TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent1_2Bytes TemperatureBroadcastCommandTypeContainer = 0x0A - TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent2_2Bytes TemperatureBroadcastCommandTypeContainer = 0x12 - TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent3_2Bytes TemperatureBroadcastCommandTypeContainer = 0x1A - TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent4_2Bytes TemperatureBroadcastCommandTypeContainer = 0x22 - TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent5_2Bytes TemperatureBroadcastCommandTypeContainer = 0x2A - TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent6_2Bytes TemperatureBroadcastCommandTypeContainer = 0x32 - TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent7_2Bytes TemperatureBroadcastCommandTypeContainer = 0x3A - TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent8_2Bytes TemperatureBroadcastCommandTypeContainer = 0x42 - TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent9_2Bytes TemperatureBroadcastCommandTypeContainer = 0x4A +const( + TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent0_2Bytes TemperatureBroadcastCommandTypeContainer = 0x02 + TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent1_2Bytes TemperatureBroadcastCommandTypeContainer = 0x0A + TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent2_2Bytes TemperatureBroadcastCommandTypeContainer = 0x12 + TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent3_2Bytes TemperatureBroadcastCommandTypeContainer = 0x1A + TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent4_2Bytes TemperatureBroadcastCommandTypeContainer = 0x22 + TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent5_2Bytes TemperatureBroadcastCommandTypeContainer = 0x2A + TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent6_2Bytes TemperatureBroadcastCommandTypeContainer = 0x32 + TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent7_2Bytes TemperatureBroadcastCommandTypeContainer = 0x3A + TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent8_2Bytes TemperatureBroadcastCommandTypeContainer = 0x42 + TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent9_2Bytes TemperatureBroadcastCommandTypeContainer = 0x4A TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent10_2Bytes TemperatureBroadcastCommandTypeContainer = 0x52 TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent11_2Bytes TemperatureBroadcastCommandTypeContainer = 0x5A TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent12_2Bytes TemperatureBroadcastCommandTypeContainer = 0x62 @@ -59,7 +59,7 @@ var TemperatureBroadcastCommandTypeContainerValues []TemperatureBroadcastCommand func init() { _ = errors.New - TemperatureBroadcastCommandTypeContainerValues = []TemperatureBroadcastCommandTypeContainer{ + TemperatureBroadcastCommandTypeContainerValues = []TemperatureBroadcastCommandTypeContainer { TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent0_2Bytes, TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent1_2Bytes, TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent2_2Bytes, @@ -79,74 +79,58 @@ func init() { } } + func (e TemperatureBroadcastCommandTypeContainer) NumBytes() uint8 { - switch e { - case 0x02: - { /* '0x02' */ - return 2 + switch e { + case 0x02: { /* '0x02' */ + return 2 } - case 0x0A: - { /* '0x0A' */ - return 2 + case 0x0A: { /* '0x0A' */ + return 2 } - case 0x12: - { /* '0x12' */ - return 2 + case 0x12: { /* '0x12' */ + return 2 } - case 0x1A: - { /* '0x1A' */ - return 2 + case 0x1A: { /* '0x1A' */ + return 2 } - case 0x22: - { /* '0x22' */ - return 2 + case 0x22: { /* '0x22' */ + return 2 } - case 0x2A: - { /* '0x2A' */ - return 2 + case 0x2A: { /* '0x2A' */ + return 2 } - case 0x32: - { /* '0x32' */ - return 2 + case 0x32: { /* '0x32' */ + return 2 } - case 0x3A: - { /* '0x3A' */ - return 2 + case 0x3A: { /* '0x3A' */ + return 2 } - case 0x42: - { /* '0x42' */ - return 2 + case 0x42: { /* '0x42' */ + return 2 } - case 0x4A: - { /* '0x4A' */ - return 2 + case 0x4A: { /* '0x4A' */ + return 2 } - case 0x52: - { /* '0x52' */ - return 2 + case 0x52: { /* '0x52' */ + return 2 } - case 0x5A: - { /* '0x5A' */ - return 2 + case 0x5A: { /* '0x5A' */ + return 2 } - case 0x62: - { /* '0x62' */ - return 2 + case 0x62: { /* '0x62' */ + return 2 } - case 0x6A: - { /* '0x6A' */ - return 2 + case 0x6A: { /* '0x6A' */ + return 2 } - case 0x72: - { /* '0x72' */ - return 2 + case 0x72: { /* '0x72' */ + return 2 } - case 0x7A: - { /* '0x7A' */ - return 2 + case 0x7A: { /* '0x7A' */ + return 2 } - default: - { + default: { return 0 } } @@ -162,73 +146,56 @@ func TemperatureBroadcastCommandTypeContainerFirstEnumForFieldNumBytes(value uin } func (e TemperatureBroadcastCommandTypeContainer) CommandType() TemperatureBroadcastCommandType { - switch e { - case 0x02: - { /* '0x02' */ + switch e { + case 0x02: { /* '0x02' */ return TemperatureBroadcastCommandType_BROADCAST_EVENT } - case 0x0A: - { /* '0x0A' */ + case 0x0A: { /* '0x0A' */ return TemperatureBroadcastCommandType_BROADCAST_EVENT } - case 0x12: - { /* '0x12' */ + case 0x12: { /* '0x12' */ return TemperatureBroadcastCommandType_BROADCAST_EVENT } - case 0x1A: - { /* '0x1A' */ + case 0x1A: { /* '0x1A' */ return TemperatureBroadcastCommandType_BROADCAST_EVENT } - case 0x22: - { /* '0x22' */ + case 0x22: { /* '0x22' */ return TemperatureBroadcastCommandType_BROADCAST_EVENT } - case 0x2A: - { /* '0x2A' */ + case 0x2A: { /* '0x2A' */ return TemperatureBroadcastCommandType_BROADCAST_EVENT } - case 0x32: - { /* '0x32' */ + case 0x32: { /* '0x32' */ return TemperatureBroadcastCommandType_BROADCAST_EVENT } - case 0x3A: - { /* '0x3A' */ + case 0x3A: { /* '0x3A' */ return TemperatureBroadcastCommandType_BROADCAST_EVENT } - case 0x42: - { /* '0x42' */ + case 0x42: { /* '0x42' */ return TemperatureBroadcastCommandType_BROADCAST_EVENT } - case 0x4A: - { /* '0x4A' */ + case 0x4A: { /* '0x4A' */ return TemperatureBroadcastCommandType_BROADCAST_EVENT } - case 0x52: - { /* '0x52' */ + case 0x52: { /* '0x52' */ return TemperatureBroadcastCommandType_BROADCAST_EVENT } - case 0x5A: - { /* '0x5A' */ + case 0x5A: { /* '0x5A' */ return TemperatureBroadcastCommandType_BROADCAST_EVENT } - case 0x62: - { /* '0x62' */ + case 0x62: { /* '0x62' */ return TemperatureBroadcastCommandType_BROADCAST_EVENT } - case 0x6A: - { /* '0x6A' */ + case 0x6A: { /* '0x6A' */ return TemperatureBroadcastCommandType_BROADCAST_EVENT } - case 0x72: - { /* '0x72' */ + case 0x72: { /* '0x72' */ return TemperatureBroadcastCommandType_BROADCAST_EVENT } - case 0x7A: - { /* '0x7A' */ + case 0x7A: { /* '0x7A' */ return TemperatureBroadcastCommandType_BROADCAST_EVENT } - default: - { + default: { return 0 } } @@ -244,38 +211,38 @@ func TemperatureBroadcastCommandTypeContainerFirstEnumForFieldCommandType(value } func TemperatureBroadcastCommandTypeContainerByValue(value uint8) (enum TemperatureBroadcastCommandTypeContainer, ok bool) { switch value { - case 0x02: - return TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent0_2Bytes, true - case 0x0A: - return TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent1_2Bytes, true - case 0x12: - return TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent2_2Bytes, true - case 0x1A: - return TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent3_2Bytes, true - case 0x22: - return TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent4_2Bytes, true - case 0x2A: - return TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent5_2Bytes, true - case 0x32: - return TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent6_2Bytes, true - case 0x3A: - return TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent7_2Bytes, true - case 0x42: - return TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent8_2Bytes, true - case 0x4A: - return TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent9_2Bytes, true - case 0x52: - return TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent10_2Bytes, true - case 0x5A: - return TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent11_2Bytes, true - case 0x62: - return TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent12_2Bytes, true - case 0x6A: - return TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent13_2Bytes, true - case 0x72: - return TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent14_2Bytes, true - case 0x7A: - return TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent15_2Bytes, true + case 0x02: + return TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent0_2Bytes, true + case 0x0A: + return TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent1_2Bytes, true + case 0x12: + return TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent2_2Bytes, true + case 0x1A: + return TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent3_2Bytes, true + case 0x22: + return TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent4_2Bytes, true + case 0x2A: + return TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent5_2Bytes, true + case 0x32: + return TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent6_2Bytes, true + case 0x3A: + return TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent7_2Bytes, true + case 0x42: + return TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent8_2Bytes, true + case 0x4A: + return TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent9_2Bytes, true + case 0x52: + return TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent10_2Bytes, true + case 0x5A: + return TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent11_2Bytes, true + case 0x62: + return TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent12_2Bytes, true + case 0x6A: + return TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent13_2Bytes, true + case 0x72: + return TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent14_2Bytes, true + case 0x7A: + return TemperatureBroadcastCommandTypeContainer_TemperatureBroadcastCommandSetBroadcastEvent15_2Bytes, true } return 0, false } @@ -318,13 +285,13 @@ func TemperatureBroadcastCommandTypeContainerByName(value string) (enum Temperat return 0, false } -func TemperatureBroadcastCommandTypeContainerKnows(value uint8) bool { +func TemperatureBroadcastCommandTypeContainerKnows(value uint8) bool { for _, typeValue := range TemperatureBroadcastCommandTypeContainerValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastTemperatureBroadcastCommandTypeContainer(structType interface{}) TemperatureBroadcastCommandTypeContainer { @@ -416,3 +383,4 @@ func (e TemperatureBroadcastCommandTypeContainer) PLC4XEnumName() string { func (e TemperatureBroadcastCommandTypeContainer) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/TemperatureBroadcastData.go b/plc4go/protocols/cbus/readwrite/model/TemperatureBroadcastData.go index 26fc943f2d2..300906ddfbc 100644 --- a/plc4go/protocols/cbus/readwrite/model/TemperatureBroadcastData.go +++ b/plc4go/protocols/cbus/readwrite/model/TemperatureBroadcastData.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // TemperatureBroadcastData is the corresponding interface of TemperatureBroadcastData type TemperatureBroadcastData interface { @@ -52,11 +54,12 @@ type TemperatureBroadcastDataExactly interface { // _TemperatureBroadcastData is the data-structure of this message type _TemperatureBroadcastData struct { - CommandTypeContainer TemperatureBroadcastCommandTypeContainer - TemperatureGroup byte - TemperatureByte byte + CommandTypeContainer TemperatureBroadcastCommandTypeContainer + TemperatureGroup byte + TemperatureByte byte } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -100,14 +103,15 @@ func (m *_TemperatureBroadcastData) GetTemperatureInCelsius() float32 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewTemperatureBroadcastData factory function for _TemperatureBroadcastData -func NewTemperatureBroadcastData(commandTypeContainer TemperatureBroadcastCommandTypeContainer, temperatureGroup byte, temperatureByte byte) *_TemperatureBroadcastData { - return &_TemperatureBroadcastData{CommandTypeContainer: commandTypeContainer, TemperatureGroup: temperatureGroup, TemperatureByte: temperatureByte} +func NewTemperatureBroadcastData( commandTypeContainer TemperatureBroadcastCommandTypeContainer , temperatureGroup byte , temperatureByte byte ) *_TemperatureBroadcastData { +return &_TemperatureBroadcastData{ CommandTypeContainer: commandTypeContainer , TemperatureGroup: temperatureGroup , TemperatureByte: temperatureByte } } // Deprecated: use the interface for direct cast func CastTemperatureBroadcastData(structType interface{}) TemperatureBroadcastData { - if casted, ok := structType.(TemperatureBroadcastData); ok { + if casted, ok := structType.(TemperatureBroadcastData); ok { return casted } if casted, ok := structType.(*TemperatureBroadcastData); ok { @@ -129,16 +133,17 @@ func (m *_TemperatureBroadcastData) GetLengthInBits(ctx context.Context) uint16 // A virtual field doesn't have any in- or output. // Simple field (temperatureGroup) - lengthInBits += 8 + lengthInBits += 8; // Simple field (temperatureByte) - lengthInBits += 8 + lengthInBits += 8; // A virtual field doesn't have any in- or output. return lengthInBits } + func (m *_TemperatureBroadcastData) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -157,7 +162,7 @@ func TemperatureBroadcastDataParseWithBuffer(ctx context.Context, readBuffer uti _ = currentPos // Validation - if !(KnowsTemperatureBroadcastCommandTypeContainer(readBuffer)) { + if (!(KnowsTemperatureBroadcastCommandTypeContainer(readBuffer))) { return nil, errors.WithStack(utils.ParseAssertError{"no command type could be found"}) } @@ -165,7 +170,7 @@ func TemperatureBroadcastDataParseWithBuffer(ctx context.Context, readBuffer uti if pullErr := readBuffer.PullContext("commandTypeContainer"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for commandTypeContainer") } - _commandTypeContainer, _commandTypeContainerErr := TemperatureBroadcastCommandTypeContainerParseWithBuffer(ctx, readBuffer) +_commandTypeContainer, _commandTypeContainerErr := TemperatureBroadcastCommandTypeContainerParseWithBuffer(ctx, readBuffer) if _commandTypeContainerErr != nil { return nil, errors.Wrap(_commandTypeContainerErr, "Error parsing 'commandTypeContainer' field of TemperatureBroadcastData") } @@ -180,14 +185,14 @@ func TemperatureBroadcastDataParseWithBuffer(ctx context.Context, readBuffer uti _ = commandType // Simple Field (temperatureGroup) - _temperatureGroup, _temperatureGroupErr := readBuffer.ReadByte("temperatureGroup") +_temperatureGroup, _temperatureGroupErr := readBuffer.ReadByte("temperatureGroup") if _temperatureGroupErr != nil { return nil, errors.Wrap(_temperatureGroupErr, "Error parsing 'temperatureGroup' field of TemperatureBroadcastData") } temperatureGroup := _temperatureGroup // Simple Field (temperatureByte) - _temperatureByte, _temperatureByteErr := readBuffer.ReadByte("temperatureByte") +_temperatureByte, _temperatureByteErr := readBuffer.ReadByte("temperatureByte") if _temperatureByteErr != nil { return nil, errors.Wrap(_temperatureByteErr, "Error parsing 'temperatureByte' field of TemperatureBroadcastData") } @@ -204,10 +209,10 @@ func TemperatureBroadcastDataParseWithBuffer(ctx context.Context, readBuffer uti // Create the instance return &_TemperatureBroadcastData{ - CommandTypeContainer: commandTypeContainer, - TemperatureGroup: temperatureGroup, - TemperatureByte: temperatureByte, - }, nil + CommandTypeContainer: commandTypeContainer, + TemperatureGroup: temperatureGroup, + TemperatureByte: temperatureByte, + }, nil } func (m *_TemperatureBroadcastData) Serialize() ([]byte, error) { @@ -221,7 +226,7 @@ func (m *_TemperatureBroadcastData) Serialize() ([]byte, error) { func (m *_TemperatureBroadcastData) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("TemperatureBroadcastData"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("TemperatureBroadcastData"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for TemperatureBroadcastData") } @@ -265,6 +270,7 @@ func (m *_TemperatureBroadcastData) SerializeWithWriteBuffer(ctx context.Context return nil } + func (m *_TemperatureBroadcastData) isTemperatureBroadcastData() bool { return true } @@ -279,3 +285,6 @@ func (m *_TemperatureBroadcastData) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/TriggerControlCommandType.go b/plc4go/protocols/cbus/readwrite/model/TriggerControlCommandType.go index 68fe1eba2a8..9dc8000e781 100644 --- a/plc4go/protocols/cbus/readwrite/model/TriggerControlCommandType.go +++ b/plc4go/protocols/cbus/readwrite/model/TriggerControlCommandType.go @@ -35,19 +35,19 @@ type ITriggerControlCommandType interface { NumberOfArguments() uint8 } -const ( - TriggerControlCommandType_TRIGGER_EVENT TriggerControlCommandType = 0x00 - TriggerControlCommandType_TRIGGER_MIN TriggerControlCommandType = 0x01 - TriggerControlCommandType_TRIGGER_MAX TriggerControlCommandType = 0x02 +const( + TriggerControlCommandType_TRIGGER_EVENT TriggerControlCommandType = 0x00 + TriggerControlCommandType_TRIGGER_MIN TriggerControlCommandType = 0x01 + TriggerControlCommandType_TRIGGER_MAX TriggerControlCommandType = 0x02 TriggerControlCommandType_INDICATOR_KILL TriggerControlCommandType = 0x03 - TriggerControlCommandType_LABEL TriggerControlCommandType = 0x04 + TriggerControlCommandType_LABEL TriggerControlCommandType = 0x04 ) var TriggerControlCommandTypeValues []TriggerControlCommandType func init() { _ = errors.New - TriggerControlCommandTypeValues = []TriggerControlCommandType{ + TriggerControlCommandTypeValues = []TriggerControlCommandType { TriggerControlCommandType_TRIGGER_EVENT, TriggerControlCommandType_TRIGGER_MIN, TriggerControlCommandType_TRIGGER_MAX, @@ -56,30 +56,25 @@ func init() { } } + func (e TriggerControlCommandType) NumberOfArguments() uint8 { - switch e { - case 0x00: - { /* '0x00' */ - return 1 + switch e { + case 0x00: { /* '0x00' */ + return 1 } - case 0x01: - { /* '0x01' */ - return 0 + case 0x01: { /* '0x01' */ + return 0 } - case 0x02: - { /* '0x02' */ - return 0 + case 0x02: { /* '0x02' */ + return 0 } - case 0x03: - { /* '0x03' */ - return 0 + case 0x03: { /* '0x03' */ + return 0 } - case 0x04: - { /* '0x04' */ - return 4 + case 0x04: { /* '0x04' */ + return 4 } - default: - { + default: { return 0 } } @@ -95,16 +90,16 @@ func TriggerControlCommandTypeFirstEnumForFieldNumberOfArguments(value uint8) (T } func TriggerControlCommandTypeByValue(value uint8) (enum TriggerControlCommandType, ok bool) { switch value { - case 0x00: - return TriggerControlCommandType_TRIGGER_EVENT, true - case 0x01: - return TriggerControlCommandType_TRIGGER_MIN, true - case 0x02: - return TriggerControlCommandType_TRIGGER_MAX, true - case 0x03: - return TriggerControlCommandType_INDICATOR_KILL, true - case 0x04: - return TriggerControlCommandType_LABEL, true + case 0x00: + return TriggerControlCommandType_TRIGGER_EVENT, true + case 0x01: + return TriggerControlCommandType_TRIGGER_MIN, true + case 0x02: + return TriggerControlCommandType_TRIGGER_MAX, true + case 0x03: + return TriggerControlCommandType_INDICATOR_KILL, true + case 0x04: + return TriggerControlCommandType_LABEL, true } return 0, false } @@ -125,13 +120,13 @@ func TriggerControlCommandTypeByName(value string) (enum TriggerControlCommandTy return 0, false } -func TriggerControlCommandTypeKnows(value uint8) bool { +func TriggerControlCommandTypeKnows(value uint8) bool { for _, typeValue := range TriggerControlCommandTypeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastTriggerControlCommandType(structType interface{}) TriggerControlCommandType { @@ -201,3 +196,4 @@ func (e TriggerControlCommandType) PLC4XEnumName() string { func (e TriggerControlCommandType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/TriggerControlCommandTypeContainer.go b/plc4go/protocols/cbus/readwrite/model/TriggerControlCommandTypeContainer.go index 2c91b377615..23fdef64a7e 100644 --- a/plc4go/protocols/cbus/readwrite/model/TriggerControlCommandTypeContainer.go +++ b/plc4go/protocols/cbus/readwrite/model/TriggerControlCommandTypeContainer.go @@ -36,65 +36,65 @@ type ITriggerControlCommandTypeContainer interface { CommandType() TriggerControlCommandType } -const ( - TriggerControlCommandTypeContainer_TriggerControlCommandTriggerMin_1Bytes TriggerControlCommandTypeContainer = 0x01 - TriggerControlCommandTypeContainer_TriggerControlCommandIndicatorKill_1Bytes TriggerControlCommandTypeContainer = 0x09 - TriggerControlCommandTypeContainer_TriggerControlCommandTriggerMax_1Bytes TriggerControlCommandTypeContainer = 0x79 - TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent0_2Bytes TriggerControlCommandTypeContainer = 0x02 - TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent1_2Bytes TriggerControlCommandTypeContainer = 0x0A - TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent2_2Bytes TriggerControlCommandTypeContainer = 0x12 - TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent3_2Bytes TriggerControlCommandTypeContainer = 0x1A - TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent4_2Bytes TriggerControlCommandTypeContainer = 0x22 - TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent5_2Bytes TriggerControlCommandTypeContainer = 0x2A - TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent6_2Bytes TriggerControlCommandTypeContainer = 0x32 - TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent7_2Bytes TriggerControlCommandTypeContainer = 0x3A - TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent8_2Bytes TriggerControlCommandTypeContainer = 0x42 - TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent9_2Bytes TriggerControlCommandTypeContainer = 0x4A +const( + TriggerControlCommandTypeContainer_TriggerControlCommandTriggerMin_1Bytes TriggerControlCommandTypeContainer = 0x01 + TriggerControlCommandTypeContainer_TriggerControlCommandIndicatorKill_1Bytes TriggerControlCommandTypeContainer = 0x09 + TriggerControlCommandTypeContainer_TriggerControlCommandTriggerMax_1Bytes TriggerControlCommandTypeContainer = 0x79 + TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent0_2Bytes TriggerControlCommandTypeContainer = 0x02 + TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent1_2Bytes TriggerControlCommandTypeContainer = 0x0A + TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent2_2Bytes TriggerControlCommandTypeContainer = 0x12 + TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent3_2Bytes TriggerControlCommandTypeContainer = 0x1A + TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent4_2Bytes TriggerControlCommandTypeContainer = 0x22 + TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent5_2Bytes TriggerControlCommandTypeContainer = 0x2A + TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent6_2Bytes TriggerControlCommandTypeContainer = 0x32 + TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent7_2Bytes TriggerControlCommandTypeContainer = 0x3A + TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent8_2Bytes TriggerControlCommandTypeContainer = 0x42 + TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent9_2Bytes TriggerControlCommandTypeContainer = 0x4A TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent10_2Bytes TriggerControlCommandTypeContainer = 0x52 TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent11_2Bytes TriggerControlCommandTypeContainer = 0x5A TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent12_2Bytes TriggerControlCommandTypeContainer = 0x62 TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent13_2Bytes TriggerControlCommandTypeContainer = 0x6A TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent14_2Bytes TriggerControlCommandTypeContainer = 0x72 TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent15_2Bytes TriggerControlCommandTypeContainer = 0x7A - TriggerControlCommandTypeContainer_TriggerControlCommandLabel_0Bytes TriggerControlCommandTypeContainer = 0xA0 - TriggerControlCommandTypeContainer_TriggerControlCommandLabel_1Bytes TriggerControlCommandTypeContainer = 0xA1 - TriggerControlCommandTypeContainer_TriggerControlCommandLabel_2Bytes TriggerControlCommandTypeContainer = 0xA2 - TriggerControlCommandTypeContainer_TriggerControlCommandLabel_3Bytes TriggerControlCommandTypeContainer = 0xA3 - TriggerControlCommandTypeContainer_TriggerControlCommandLabel_4Bytes TriggerControlCommandTypeContainer = 0xA4 - TriggerControlCommandTypeContainer_TriggerControlCommandLabel_5Bytes TriggerControlCommandTypeContainer = 0xA5 - TriggerControlCommandTypeContainer_TriggerControlCommandLabel_6Bytes TriggerControlCommandTypeContainer = 0xA6 - TriggerControlCommandTypeContainer_TriggerControlCommandLabel_7Bytes TriggerControlCommandTypeContainer = 0xA7 - TriggerControlCommandTypeContainer_TriggerControlCommandLabel_8Bytes TriggerControlCommandTypeContainer = 0xA8 - TriggerControlCommandTypeContainer_TriggerControlCommandLabel_9Bytes TriggerControlCommandTypeContainer = 0xA9 - TriggerControlCommandTypeContainer_TriggerControlCommandLabel_10Bytes TriggerControlCommandTypeContainer = 0xAA - TriggerControlCommandTypeContainer_TriggerControlCommandLabel_11Bytes TriggerControlCommandTypeContainer = 0xAB - TriggerControlCommandTypeContainer_TriggerControlCommandLabel_12Bytes TriggerControlCommandTypeContainer = 0xAC - TriggerControlCommandTypeContainer_TriggerControlCommandLabel_13Bytes TriggerControlCommandTypeContainer = 0xAD - TriggerControlCommandTypeContainer_TriggerControlCommandLabel_14Bytes TriggerControlCommandTypeContainer = 0xAE - TriggerControlCommandTypeContainer_TriggerControlCommandLabel_15Bytes TriggerControlCommandTypeContainer = 0xAF - TriggerControlCommandTypeContainer_TriggerControlCommandLabel_16Bytes TriggerControlCommandTypeContainer = 0xB0 - TriggerControlCommandTypeContainer_TriggerControlCommandLabel_17Bytes TriggerControlCommandTypeContainer = 0xB1 - TriggerControlCommandTypeContainer_TriggerControlCommandLabel_18Bytes TriggerControlCommandTypeContainer = 0xB2 - TriggerControlCommandTypeContainer_TriggerControlCommandLabel_19Bytes TriggerControlCommandTypeContainer = 0xB3 - TriggerControlCommandTypeContainer_TriggerControlCommandLabel_20Bytes TriggerControlCommandTypeContainer = 0xB4 - TriggerControlCommandTypeContainer_TriggerControlCommandLabel_21Bytes TriggerControlCommandTypeContainer = 0xB5 - TriggerControlCommandTypeContainer_TriggerControlCommandLabel_22Bytes TriggerControlCommandTypeContainer = 0xB6 - TriggerControlCommandTypeContainer_TriggerControlCommandLabel_23Bytes TriggerControlCommandTypeContainer = 0xB7 - TriggerControlCommandTypeContainer_TriggerControlCommandLabel_24Bytes TriggerControlCommandTypeContainer = 0xB8 - TriggerControlCommandTypeContainer_TriggerControlCommandLabel_25Bytes TriggerControlCommandTypeContainer = 0xB9 - TriggerControlCommandTypeContainer_TriggerControlCommandLabel_26Bytes TriggerControlCommandTypeContainer = 0xBA - TriggerControlCommandTypeContainer_TriggerControlCommandLabel_27Bytes TriggerControlCommandTypeContainer = 0xBB - TriggerControlCommandTypeContainer_TriggerControlCommandLabel_28Bytes TriggerControlCommandTypeContainer = 0xBC - TriggerControlCommandTypeContainer_TriggerControlCommandLabel_29Bytes TriggerControlCommandTypeContainer = 0xBD - TriggerControlCommandTypeContainer_TriggerControlCommandLabel_30Bytes TriggerControlCommandTypeContainer = 0xBE - TriggerControlCommandTypeContainer_TriggerControlCommandLabel_31Bytes TriggerControlCommandTypeContainer = 0xBF + TriggerControlCommandTypeContainer_TriggerControlCommandLabel_0Bytes TriggerControlCommandTypeContainer = 0xA0 + TriggerControlCommandTypeContainer_TriggerControlCommandLabel_1Bytes TriggerControlCommandTypeContainer = 0xA1 + TriggerControlCommandTypeContainer_TriggerControlCommandLabel_2Bytes TriggerControlCommandTypeContainer = 0xA2 + TriggerControlCommandTypeContainer_TriggerControlCommandLabel_3Bytes TriggerControlCommandTypeContainer = 0xA3 + TriggerControlCommandTypeContainer_TriggerControlCommandLabel_4Bytes TriggerControlCommandTypeContainer = 0xA4 + TriggerControlCommandTypeContainer_TriggerControlCommandLabel_5Bytes TriggerControlCommandTypeContainer = 0xA5 + TriggerControlCommandTypeContainer_TriggerControlCommandLabel_6Bytes TriggerControlCommandTypeContainer = 0xA6 + TriggerControlCommandTypeContainer_TriggerControlCommandLabel_7Bytes TriggerControlCommandTypeContainer = 0xA7 + TriggerControlCommandTypeContainer_TriggerControlCommandLabel_8Bytes TriggerControlCommandTypeContainer = 0xA8 + TriggerControlCommandTypeContainer_TriggerControlCommandLabel_9Bytes TriggerControlCommandTypeContainer = 0xA9 + TriggerControlCommandTypeContainer_TriggerControlCommandLabel_10Bytes TriggerControlCommandTypeContainer = 0xAA + TriggerControlCommandTypeContainer_TriggerControlCommandLabel_11Bytes TriggerControlCommandTypeContainer = 0xAB + TriggerControlCommandTypeContainer_TriggerControlCommandLabel_12Bytes TriggerControlCommandTypeContainer = 0xAC + TriggerControlCommandTypeContainer_TriggerControlCommandLabel_13Bytes TriggerControlCommandTypeContainer = 0xAD + TriggerControlCommandTypeContainer_TriggerControlCommandLabel_14Bytes TriggerControlCommandTypeContainer = 0xAE + TriggerControlCommandTypeContainer_TriggerControlCommandLabel_15Bytes TriggerControlCommandTypeContainer = 0xAF + TriggerControlCommandTypeContainer_TriggerControlCommandLabel_16Bytes TriggerControlCommandTypeContainer = 0xB0 + TriggerControlCommandTypeContainer_TriggerControlCommandLabel_17Bytes TriggerControlCommandTypeContainer = 0xB1 + TriggerControlCommandTypeContainer_TriggerControlCommandLabel_18Bytes TriggerControlCommandTypeContainer = 0xB2 + TriggerControlCommandTypeContainer_TriggerControlCommandLabel_19Bytes TriggerControlCommandTypeContainer = 0xB3 + TriggerControlCommandTypeContainer_TriggerControlCommandLabel_20Bytes TriggerControlCommandTypeContainer = 0xB4 + TriggerControlCommandTypeContainer_TriggerControlCommandLabel_21Bytes TriggerControlCommandTypeContainer = 0xB5 + TriggerControlCommandTypeContainer_TriggerControlCommandLabel_22Bytes TriggerControlCommandTypeContainer = 0xB6 + TriggerControlCommandTypeContainer_TriggerControlCommandLabel_23Bytes TriggerControlCommandTypeContainer = 0xB7 + TriggerControlCommandTypeContainer_TriggerControlCommandLabel_24Bytes TriggerControlCommandTypeContainer = 0xB8 + TriggerControlCommandTypeContainer_TriggerControlCommandLabel_25Bytes TriggerControlCommandTypeContainer = 0xB9 + TriggerControlCommandTypeContainer_TriggerControlCommandLabel_26Bytes TriggerControlCommandTypeContainer = 0xBA + TriggerControlCommandTypeContainer_TriggerControlCommandLabel_27Bytes TriggerControlCommandTypeContainer = 0xBB + TriggerControlCommandTypeContainer_TriggerControlCommandLabel_28Bytes TriggerControlCommandTypeContainer = 0xBC + TriggerControlCommandTypeContainer_TriggerControlCommandLabel_29Bytes TriggerControlCommandTypeContainer = 0xBD + TriggerControlCommandTypeContainer_TriggerControlCommandLabel_30Bytes TriggerControlCommandTypeContainer = 0xBE + TriggerControlCommandTypeContainer_TriggerControlCommandLabel_31Bytes TriggerControlCommandTypeContainer = 0xBF ) var TriggerControlCommandTypeContainerValues []TriggerControlCommandTypeContainer func init() { _ = errors.New - TriggerControlCommandTypeContainerValues = []TriggerControlCommandTypeContainer{ + TriggerControlCommandTypeContainerValues = []TriggerControlCommandTypeContainer { TriggerControlCommandTypeContainer_TriggerControlCommandTriggerMin_1Bytes, TriggerControlCommandTypeContainer_TriggerControlCommandIndicatorKill_1Bytes, TriggerControlCommandTypeContainer_TriggerControlCommandTriggerMax_1Bytes, @@ -149,214 +149,163 @@ func init() { } } + func (e TriggerControlCommandTypeContainer) NumBytes() uint8 { - switch e { - case 0x01: - { /* '0x01' */ - return 1 + switch e { + case 0x01: { /* '0x01' */ + return 1 } - case 0x02: - { /* '0x02' */ - return 2 + case 0x02: { /* '0x02' */ + return 2 } - case 0x09: - { /* '0x09' */ - return 1 + case 0x09: { /* '0x09' */ + return 1 } - case 0x0A: - { /* '0x0A' */ - return 2 + case 0x0A: { /* '0x0A' */ + return 2 } - case 0x12: - { /* '0x12' */ - return 2 + case 0x12: { /* '0x12' */ + return 2 } - case 0x1A: - { /* '0x1A' */ - return 2 + case 0x1A: { /* '0x1A' */ + return 2 } - case 0x22: - { /* '0x22' */ - return 2 + case 0x22: { /* '0x22' */ + return 2 } - case 0x2A: - { /* '0x2A' */ - return 2 + case 0x2A: { /* '0x2A' */ + return 2 } - case 0x32: - { /* '0x32' */ - return 2 + case 0x32: { /* '0x32' */ + return 2 } - case 0x3A: - { /* '0x3A' */ - return 2 + case 0x3A: { /* '0x3A' */ + return 2 } - case 0x42: - { /* '0x42' */ - return 2 + case 0x42: { /* '0x42' */ + return 2 } - case 0x4A: - { /* '0x4A' */ - return 2 + case 0x4A: { /* '0x4A' */ + return 2 } - case 0x52: - { /* '0x52' */ - return 2 + case 0x52: { /* '0x52' */ + return 2 } - case 0x5A: - { /* '0x5A' */ - return 2 + case 0x5A: { /* '0x5A' */ + return 2 } - case 0x62: - { /* '0x62' */ - return 2 + case 0x62: { /* '0x62' */ + return 2 } - case 0x6A: - { /* '0x6A' */ - return 2 + case 0x6A: { /* '0x6A' */ + return 2 } - case 0x72: - { /* '0x72' */ - return 2 + case 0x72: { /* '0x72' */ + return 2 } - case 0x79: - { /* '0x79' */ - return 1 + case 0x79: { /* '0x79' */ + return 1 } - case 0x7A: - { /* '0x7A' */ - return 2 + case 0x7A: { /* '0x7A' */ + return 2 } - case 0xA0: - { /* '0xA0' */ - return 0 + case 0xA0: { /* '0xA0' */ + return 0 } - case 0xA1: - { /* '0xA1' */ - return 1 + case 0xA1: { /* '0xA1' */ + return 1 } - case 0xA2: - { /* '0xA2' */ - return 2 + case 0xA2: { /* '0xA2' */ + return 2 } - case 0xA3: - { /* '0xA3' */ - return 3 + case 0xA3: { /* '0xA3' */ + return 3 } - case 0xA4: - { /* '0xA4' */ - return 4 + case 0xA4: { /* '0xA4' */ + return 4 } - case 0xA5: - { /* '0xA5' */ - return 5 + case 0xA5: { /* '0xA5' */ + return 5 } - case 0xA6: - { /* '0xA6' */ - return 6 + case 0xA6: { /* '0xA6' */ + return 6 } - case 0xA7: - { /* '0xA7' */ - return 7 + case 0xA7: { /* '0xA7' */ + return 7 } - case 0xA8: - { /* '0xA8' */ - return 8 + case 0xA8: { /* '0xA8' */ + return 8 } - case 0xA9: - { /* '0xA9' */ - return 9 + case 0xA9: { /* '0xA9' */ + return 9 } - case 0xAA: - { /* '0xAA' */ - return 10 + case 0xAA: { /* '0xAA' */ + return 10 } - case 0xAB: - { /* '0xAB' */ - return 11 + case 0xAB: { /* '0xAB' */ + return 11 } - case 0xAC: - { /* '0xAC' */ - return 12 + case 0xAC: { /* '0xAC' */ + return 12 } - case 0xAD: - { /* '0xAD' */ - return 13 + case 0xAD: { /* '0xAD' */ + return 13 } - case 0xAE: - { /* '0xAE' */ - return 14 + case 0xAE: { /* '0xAE' */ + return 14 } - case 0xAF: - { /* '0xAF' */ - return 15 + case 0xAF: { /* '0xAF' */ + return 15 } - case 0xB0: - { /* '0xB0' */ - return 16 + case 0xB0: { /* '0xB0' */ + return 16 } - case 0xB1: - { /* '0xB1' */ - return 17 + case 0xB1: { /* '0xB1' */ + return 17 } - case 0xB2: - { /* '0xB2' */ - return 18 + case 0xB2: { /* '0xB2' */ + return 18 } - case 0xB3: - { /* '0xB3' */ - return 19 + case 0xB3: { /* '0xB3' */ + return 19 } - case 0xB4: - { /* '0xB4' */ - return 20 + case 0xB4: { /* '0xB4' */ + return 20 } - case 0xB5: - { /* '0xB5' */ - return 21 + case 0xB5: { /* '0xB5' */ + return 21 } - case 0xB6: - { /* '0xB6' */ - return 22 + case 0xB6: { /* '0xB6' */ + return 22 } - case 0xB7: - { /* '0xB7' */ - return 23 + case 0xB7: { /* '0xB7' */ + return 23 } - case 0xB8: - { /* '0xB8' */ - return 24 + case 0xB8: { /* '0xB8' */ + return 24 } - case 0xB9: - { /* '0xB9' */ - return 25 + case 0xB9: { /* '0xB9' */ + return 25 } - case 0xBA: - { /* '0xBA' */ - return 26 + case 0xBA: { /* '0xBA' */ + return 26 } - case 0xBB: - { /* '0xBB' */ - return 27 + case 0xBB: { /* '0xBB' */ + return 27 } - case 0xBC: - { /* '0xBC' */ - return 28 + case 0xBC: { /* '0xBC' */ + return 28 } - case 0xBD: - { /* '0xBD' */ - return 29 + case 0xBD: { /* '0xBD' */ + return 29 } - case 0xBE: - { /* '0xBE' */ - return 30 + case 0xBE: { /* '0xBE' */ + return 30 } - case 0xBF: - { /* '0xBF' */ - return 31 + case 0xBF: { /* '0xBF' */ + return 31 } - default: - { + default: { return 0 } } @@ -372,213 +321,161 @@ func TriggerControlCommandTypeContainerFirstEnumForFieldNumBytes(value uint8) (T } func (e TriggerControlCommandTypeContainer) CommandType() TriggerControlCommandType { - switch e { - case 0x01: - { /* '0x01' */ + switch e { + case 0x01: { /* '0x01' */ return TriggerControlCommandType_TRIGGER_MIN } - case 0x02: - { /* '0x02' */ + case 0x02: { /* '0x02' */ return TriggerControlCommandType_TRIGGER_EVENT } - case 0x09: - { /* '0x09' */ + case 0x09: { /* '0x09' */ return TriggerControlCommandType_INDICATOR_KILL } - case 0x0A: - { /* '0x0A' */ + case 0x0A: { /* '0x0A' */ return TriggerControlCommandType_TRIGGER_EVENT } - case 0x12: - { /* '0x12' */ + case 0x12: { /* '0x12' */ return TriggerControlCommandType_TRIGGER_EVENT } - case 0x1A: - { /* '0x1A' */ + case 0x1A: { /* '0x1A' */ return TriggerControlCommandType_TRIGGER_EVENT } - case 0x22: - { /* '0x22' */ + case 0x22: { /* '0x22' */ return TriggerControlCommandType_TRIGGER_EVENT } - case 0x2A: - { /* '0x2A' */ + case 0x2A: { /* '0x2A' */ return TriggerControlCommandType_TRIGGER_EVENT } - case 0x32: - { /* '0x32' */ + case 0x32: { /* '0x32' */ return TriggerControlCommandType_TRIGGER_EVENT } - case 0x3A: - { /* '0x3A' */ + case 0x3A: { /* '0x3A' */ return TriggerControlCommandType_TRIGGER_EVENT } - case 0x42: - { /* '0x42' */ + case 0x42: { /* '0x42' */ return TriggerControlCommandType_TRIGGER_EVENT } - case 0x4A: - { /* '0x4A' */ + case 0x4A: { /* '0x4A' */ return TriggerControlCommandType_TRIGGER_EVENT } - case 0x52: - { /* '0x52' */ + case 0x52: { /* '0x52' */ return TriggerControlCommandType_TRIGGER_EVENT } - case 0x5A: - { /* '0x5A' */ + case 0x5A: { /* '0x5A' */ return TriggerControlCommandType_TRIGGER_EVENT } - case 0x62: - { /* '0x62' */ + case 0x62: { /* '0x62' */ return TriggerControlCommandType_TRIGGER_EVENT } - case 0x6A: - { /* '0x6A' */ + case 0x6A: { /* '0x6A' */ return TriggerControlCommandType_TRIGGER_EVENT } - case 0x72: - { /* '0x72' */ + case 0x72: { /* '0x72' */ return TriggerControlCommandType_TRIGGER_EVENT } - case 0x79: - { /* '0x79' */ + case 0x79: { /* '0x79' */ return TriggerControlCommandType_TRIGGER_MAX } - case 0x7A: - { /* '0x7A' */ + case 0x7A: { /* '0x7A' */ return TriggerControlCommandType_TRIGGER_EVENT } - case 0xA0: - { /* '0xA0' */ + case 0xA0: { /* '0xA0' */ return TriggerControlCommandType_LABEL } - case 0xA1: - { /* '0xA1' */ + case 0xA1: { /* '0xA1' */ return TriggerControlCommandType_LABEL } - case 0xA2: - { /* '0xA2' */ + case 0xA2: { /* '0xA2' */ return TriggerControlCommandType_LABEL } - case 0xA3: - { /* '0xA3' */ + case 0xA3: { /* '0xA3' */ return TriggerControlCommandType_LABEL } - case 0xA4: - { /* '0xA4' */ + case 0xA4: { /* '0xA4' */ return TriggerControlCommandType_LABEL } - case 0xA5: - { /* '0xA5' */ + case 0xA5: { /* '0xA5' */ return TriggerControlCommandType_LABEL } - case 0xA6: - { /* '0xA6' */ + case 0xA6: { /* '0xA6' */ return TriggerControlCommandType_LABEL } - case 0xA7: - { /* '0xA7' */ + case 0xA7: { /* '0xA7' */ return TriggerControlCommandType_LABEL } - case 0xA8: - { /* '0xA8' */ + case 0xA8: { /* '0xA8' */ return TriggerControlCommandType_LABEL } - case 0xA9: - { /* '0xA9' */ + case 0xA9: { /* '0xA9' */ return TriggerControlCommandType_LABEL } - case 0xAA: - { /* '0xAA' */ + case 0xAA: { /* '0xAA' */ return TriggerControlCommandType_LABEL } - case 0xAB: - { /* '0xAB' */ + case 0xAB: { /* '0xAB' */ return TriggerControlCommandType_LABEL } - case 0xAC: - { /* '0xAC' */ + case 0xAC: { /* '0xAC' */ return TriggerControlCommandType_LABEL } - case 0xAD: - { /* '0xAD' */ + case 0xAD: { /* '0xAD' */ return TriggerControlCommandType_LABEL } - case 0xAE: - { /* '0xAE' */ + case 0xAE: { /* '0xAE' */ return TriggerControlCommandType_LABEL } - case 0xAF: - { /* '0xAF' */ + case 0xAF: { /* '0xAF' */ return TriggerControlCommandType_LABEL } - case 0xB0: - { /* '0xB0' */ + case 0xB0: { /* '0xB0' */ return TriggerControlCommandType_LABEL } - case 0xB1: - { /* '0xB1' */ + case 0xB1: { /* '0xB1' */ return TriggerControlCommandType_LABEL } - case 0xB2: - { /* '0xB2' */ + case 0xB2: { /* '0xB2' */ return TriggerControlCommandType_LABEL } - case 0xB3: - { /* '0xB3' */ + case 0xB3: { /* '0xB3' */ return TriggerControlCommandType_LABEL } - case 0xB4: - { /* '0xB4' */ + case 0xB4: { /* '0xB4' */ return TriggerControlCommandType_LABEL } - case 0xB5: - { /* '0xB5' */ + case 0xB5: { /* '0xB5' */ return TriggerControlCommandType_LABEL } - case 0xB6: - { /* '0xB6' */ + case 0xB6: { /* '0xB6' */ return TriggerControlCommandType_LABEL } - case 0xB7: - { /* '0xB7' */ + case 0xB7: { /* '0xB7' */ return TriggerControlCommandType_LABEL } - case 0xB8: - { /* '0xB8' */ + case 0xB8: { /* '0xB8' */ return TriggerControlCommandType_LABEL } - case 0xB9: - { /* '0xB9' */ + case 0xB9: { /* '0xB9' */ return TriggerControlCommandType_LABEL } - case 0xBA: - { /* '0xBA' */ + case 0xBA: { /* '0xBA' */ return TriggerControlCommandType_LABEL } - case 0xBB: - { /* '0xBB' */ + case 0xBB: { /* '0xBB' */ return TriggerControlCommandType_LABEL } - case 0xBC: - { /* '0xBC' */ + case 0xBC: { /* '0xBC' */ return TriggerControlCommandType_LABEL } - case 0xBD: - { /* '0xBD' */ + case 0xBD: { /* '0xBD' */ return TriggerControlCommandType_LABEL } - case 0xBE: - { /* '0xBE' */ + case 0xBE: { /* '0xBE' */ return TriggerControlCommandType_LABEL } - case 0xBF: - { /* '0xBF' */ + case 0xBF: { /* '0xBF' */ return TriggerControlCommandType_LABEL } - default: - { + default: { return 0 } } @@ -594,108 +491,108 @@ func TriggerControlCommandTypeContainerFirstEnumForFieldCommandType(value Trigge } func TriggerControlCommandTypeContainerByValue(value uint8) (enum TriggerControlCommandTypeContainer, ok bool) { switch value { - case 0x01: - return TriggerControlCommandTypeContainer_TriggerControlCommandTriggerMin_1Bytes, true - case 0x02: - return TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent0_2Bytes, true - case 0x09: - return TriggerControlCommandTypeContainer_TriggerControlCommandIndicatorKill_1Bytes, true - case 0x0A: - return TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent1_2Bytes, true - case 0x12: - return TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent2_2Bytes, true - case 0x1A: - return TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent3_2Bytes, true - case 0x22: - return TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent4_2Bytes, true - case 0x2A: - return TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent5_2Bytes, true - case 0x32: - return TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent6_2Bytes, true - case 0x3A: - return TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent7_2Bytes, true - case 0x42: - return TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent8_2Bytes, true - case 0x4A: - return TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent9_2Bytes, true - case 0x52: - return TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent10_2Bytes, true - case 0x5A: - return TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent11_2Bytes, true - case 0x62: - return TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent12_2Bytes, true - case 0x6A: - return TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent13_2Bytes, true - case 0x72: - return TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent14_2Bytes, true - case 0x79: - return TriggerControlCommandTypeContainer_TriggerControlCommandTriggerMax_1Bytes, true - case 0x7A: - return TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent15_2Bytes, true - case 0xA0: - return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_0Bytes, true - case 0xA1: - return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_1Bytes, true - case 0xA2: - return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_2Bytes, true - case 0xA3: - return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_3Bytes, true - case 0xA4: - return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_4Bytes, true - case 0xA5: - return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_5Bytes, true - case 0xA6: - return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_6Bytes, true - case 0xA7: - return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_7Bytes, true - case 0xA8: - return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_8Bytes, true - case 0xA9: - return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_9Bytes, true - case 0xAA: - return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_10Bytes, true - case 0xAB: - return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_11Bytes, true - case 0xAC: - return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_12Bytes, true - case 0xAD: - return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_13Bytes, true - case 0xAE: - return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_14Bytes, true - case 0xAF: - return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_15Bytes, true - case 0xB0: - return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_16Bytes, true - case 0xB1: - return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_17Bytes, true - case 0xB2: - return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_18Bytes, true - case 0xB3: - return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_19Bytes, true - case 0xB4: - return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_20Bytes, true - case 0xB5: - return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_21Bytes, true - case 0xB6: - return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_22Bytes, true - case 0xB7: - return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_23Bytes, true - case 0xB8: - return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_24Bytes, true - case 0xB9: - return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_25Bytes, true - case 0xBA: - return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_26Bytes, true - case 0xBB: - return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_27Bytes, true - case 0xBC: - return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_28Bytes, true - case 0xBD: - return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_29Bytes, true - case 0xBE: - return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_30Bytes, true - case 0xBF: - return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_31Bytes, true + case 0x01: + return TriggerControlCommandTypeContainer_TriggerControlCommandTriggerMin_1Bytes, true + case 0x02: + return TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent0_2Bytes, true + case 0x09: + return TriggerControlCommandTypeContainer_TriggerControlCommandIndicatorKill_1Bytes, true + case 0x0A: + return TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent1_2Bytes, true + case 0x12: + return TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent2_2Bytes, true + case 0x1A: + return TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent3_2Bytes, true + case 0x22: + return TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent4_2Bytes, true + case 0x2A: + return TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent5_2Bytes, true + case 0x32: + return TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent6_2Bytes, true + case 0x3A: + return TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent7_2Bytes, true + case 0x42: + return TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent8_2Bytes, true + case 0x4A: + return TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent9_2Bytes, true + case 0x52: + return TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent10_2Bytes, true + case 0x5A: + return TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent11_2Bytes, true + case 0x62: + return TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent12_2Bytes, true + case 0x6A: + return TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent13_2Bytes, true + case 0x72: + return TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent14_2Bytes, true + case 0x79: + return TriggerControlCommandTypeContainer_TriggerControlCommandTriggerMax_1Bytes, true + case 0x7A: + return TriggerControlCommandTypeContainer_TriggerControlCommandTriggerEvent15_2Bytes, true + case 0xA0: + return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_0Bytes, true + case 0xA1: + return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_1Bytes, true + case 0xA2: + return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_2Bytes, true + case 0xA3: + return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_3Bytes, true + case 0xA4: + return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_4Bytes, true + case 0xA5: + return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_5Bytes, true + case 0xA6: + return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_6Bytes, true + case 0xA7: + return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_7Bytes, true + case 0xA8: + return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_8Bytes, true + case 0xA9: + return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_9Bytes, true + case 0xAA: + return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_10Bytes, true + case 0xAB: + return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_11Bytes, true + case 0xAC: + return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_12Bytes, true + case 0xAD: + return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_13Bytes, true + case 0xAE: + return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_14Bytes, true + case 0xAF: + return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_15Bytes, true + case 0xB0: + return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_16Bytes, true + case 0xB1: + return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_17Bytes, true + case 0xB2: + return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_18Bytes, true + case 0xB3: + return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_19Bytes, true + case 0xB4: + return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_20Bytes, true + case 0xB5: + return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_21Bytes, true + case 0xB6: + return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_22Bytes, true + case 0xB7: + return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_23Bytes, true + case 0xB8: + return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_24Bytes, true + case 0xB9: + return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_25Bytes, true + case 0xBA: + return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_26Bytes, true + case 0xBB: + return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_27Bytes, true + case 0xBC: + return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_28Bytes, true + case 0xBD: + return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_29Bytes, true + case 0xBE: + return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_30Bytes, true + case 0xBF: + return TriggerControlCommandTypeContainer_TriggerControlCommandLabel_31Bytes, true } return 0, false } @@ -808,13 +705,13 @@ func TriggerControlCommandTypeContainerByName(value string) (enum TriggerControl return 0, false } -func TriggerControlCommandTypeContainerKnows(value uint8) bool { +func TriggerControlCommandTypeContainerKnows(value uint8) bool { for _, typeValue := range TriggerControlCommandTypeContainerValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastTriggerControlCommandTypeContainer(structType interface{}) TriggerControlCommandTypeContainer { @@ -976,3 +873,4 @@ func (e TriggerControlCommandTypeContainer) PLC4XEnumName() string { func (e TriggerControlCommandTypeContainer) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/TriggerControlData.go b/plc4go/protocols/cbus/readwrite/model/TriggerControlData.go index 36ef190c902..28e8e00d901 100644 --- a/plc4go/protocols/cbus/readwrite/model/TriggerControlData.go +++ b/plc4go/protocols/cbus/readwrite/model/TriggerControlData.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // TriggerControlData is the corresponding interface of TriggerControlData type TriggerControlData interface { @@ -51,8 +53,8 @@ type TriggerControlDataExactly interface { // _TriggerControlData is the data-structure of this message type _TriggerControlData struct { _TriggerControlDataChildRequirements - CommandTypeContainer TriggerControlCommandTypeContainer - TriggerGroup byte + CommandTypeContainer TriggerControlCommandTypeContainer + TriggerGroup byte } type _TriggerControlDataChildRequirements interface { @@ -60,6 +62,7 @@ type _TriggerControlDataChildRequirements interface { GetLengthInBits(ctx context.Context) uint16 } + type TriggerControlDataParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child TriggerControlData, serializeChildFunction func() error) error GetTypeName() string @@ -67,13 +70,12 @@ type TriggerControlDataParent interface { type TriggerControlDataChild interface { utils.Serializable - InitializeParent(parent TriggerControlData, commandTypeContainer TriggerControlCommandTypeContainer, triggerGroup byte) +InitializeParent(parent TriggerControlData , commandTypeContainer TriggerControlCommandTypeContainer , triggerGroup byte ) GetParent() *TriggerControlData GetTypeName() string TriggerControlData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -113,14 +115,15 @@ func (m *_TriggerControlData) GetIsUnused() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewTriggerControlData factory function for _TriggerControlData -func NewTriggerControlData(commandTypeContainer TriggerControlCommandTypeContainer, triggerGroup byte) *_TriggerControlData { - return &_TriggerControlData{CommandTypeContainer: commandTypeContainer, TriggerGroup: triggerGroup} +func NewTriggerControlData( commandTypeContainer TriggerControlCommandTypeContainer , triggerGroup byte ) *_TriggerControlData { +return &_TriggerControlData{ CommandTypeContainer: commandTypeContainer , TriggerGroup: triggerGroup } } // Deprecated: use the interface for direct cast func CastTriggerControlData(structType interface{}) TriggerControlData { - if casted, ok := structType.(TriggerControlData); ok { + if casted, ok := structType.(TriggerControlData); ok { return casted } if casted, ok := structType.(*TriggerControlData); ok { @@ -133,6 +136,7 @@ func (m *_TriggerControlData) GetTypeName() string { return "TriggerControlData" } + func (m *_TriggerControlData) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -142,7 +146,7 @@ func (m *_TriggerControlData) GetParentLengthInBits(ctx context.Context) uint16 // A virtual field doesn't have any in- or output. // Simple field (triggerGroup) - lengthInBits += 8 + lengthInBits += 8; // A virtual field doesn't have any in- or output. @@ -167,7 +171,7 @@ func TriggerControlDataParseWithBuffer(ctx context.Context, readBuffer utils.Rea _ = currentPos // Validation - if !(KnowsTriggerControlCommandTypeContainer(readBuffer)) { + if (!(KnowsTriggerControlCommandTypeContainer(readBuffer))) { return nil, errors.WithStack(utils.ParseAssertError{"no command type could be found"}) } @@ -175,7 +179,7 @@ func TriggerControlDataParseWithBuffer(ctx context.Context, readBuffer utils.Rea if pullErr := readBuffer.PullContext("commandTypeContainer"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for commandTypeContainer") } - _commandTypeContainer, _commandTypeContainerErr := TriggerControlCommandTypeContainerParseWithBuffer(ctx, readBuffer) +_commandTypeContainer, _commandTypeContainerErr := TriggerControlCommandTypeContainerParseWithBuffer(ctx, readBuffer) if _commandTypeContainerErr != nil { return nil, errors.Wrap(_commandTypeContainerErr, "Error parsing 'commandTypeContainer' field of TriggerControlData") } @@ -190,7 +194,7 @@ func TriggerControlDataParseWithBuffer(ctx context.Context, readBuffer utils.Rea _ = commandType // Simple Field (triggerGroup) - _triggerGroup, _triggerGroupErr := readBuffer.ReadByte("triggerGroup") +_triggerGroup, _triggerGroupErr := readBuffer.ReadByte("triggerGroup") if _triggerGroupErr != nil { return nil, errors.Wrap(_triggerGroupErr, "Error parsing 'triggerGroup' field of TriggerControlData") } @@ -204,22 +208,22 @@ func TriggerControlDataParseWithBuffer(ctx context.Context, readBuffer utils.Rea // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type TriggerControlDataChildSerializeRequirement interface { TriggerControlData - InitializeParent(TriggerControlData, TriggerControlCommandTypeContainer, byte) + InitializeParent(TriggerControlData, TriggerControlCommandTypeContainer, byte) GetParent() TriggerControlData } var _childTemp interface{} var _child TriggerControlDataChildSerializeRequirement var typeSwitchError error switch { - case commandType == TriggerControlCommandType_TRIGGER_EVENT: // TriggerControlDataTriggerEvent - _childTemp, typeSwitchError = TriggerControlDataTriggerEventParseWithBuffer(ctx, readBuffer) - case commandType == TriggerControlCommandType_TRIGGER_MIN: // TriggerControlDataTriggerMin - _childTemp, typeSwitchError = TriggerControlDataTriggerMinParseWithBuffer(ctx, readBuffer) - case commandType == TriggerControlCommandType_TRIGGER_MAX: // TriggerControlDataTriggerMax - _childTemp, typeSwitchError = TriggerControlDataTriggerMaxParseWithBuffer(ctx, readBuffer) - case commandType == TriggerControlCommandType_INDICATOR_KILL: // TriggerControlDataIndicatorKill - _childTemp, typeSwitchError = TriggerControlDataIndicatorKillParseWithBuffer(ctx, readBuffer) - case commandType == TriggerControlCommandType_LABEL: // TriggerControlDataLabel +case commandType == TriggerControlCommandType_TRIGGER_EVENT : // TriggerControlDataTriggerEvent + _childTemp, typeSwitchError = TriggerControlDataTriggerEventParseWithBuffer(ctx, readBuffer, ) +case commandType == TriggerControlCommandType_TRIGGER_MIN : // TriggerControlDataTriggerMin + _childTemp, typeSwitchError = TriggerControlDataTriggerMinParseWithBuffer(ctx, readBuffer, ) +case commandType == TriggerControlCommandType_TRIGGER_MAX : // TriggerControlDataTriggerMax + _childTemp, typeSwitchError = TriggerControlDataTriggerMaxParseWithBuffer(ctx, readBuffer, ) +case commandType == TriggerControlCommandType_INDICATOR_KILL : // TriggerControlDataIndicatorKill + _childTemp, typeSwitchError = TriggerControlDataIndicatorKillParseWithBuffer(ctx, readBuffer, ) +case commandType == TriggerControlCommandType_LABEL : // TriggerControlDataLabel _childTemp, typeSwitchError = TriggerControlDataLabelParseWithBuffer(ctx, readBuffer, commandTypeContainer) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [commandType=%v]", commandType) @@ -234,7 +238,7 @@ func TriggerControlDataParseWithBuffer(ctx context.Context, readBuffer utils.Rea } // Finish initializing - _child.InitializeParent(_child, commandTypeContainer, triggerGroup) +_child.InitializeParent(_child , commandTypeContainer , triggerGroup ) return _child, nil } @@ -244,7 +248,7 @@ func (pm *_TriggerControlData) SerializeParent(ctx context.Context, writeBuffer _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("TriggerControlData"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("TriggerControlData"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for TriggerControlData") } @@ -286,6 +290,7 @@ func (pm *_TriggerControlData) SerializeParent(ctx context.Context, writeBuffer return nil } + func (m *_TriggerControlData) isTriggerControlData() bool { return true } @@ -300,3 +305,6 @@ func (m *_TriggerControlData) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/TriggerControlDataIndicatorKill.go b/plc4go/protocols/cbus/readwrite/model/TriggerControlDataIndicatorKill.go index 4b7b9993191..4293ac5404f 100644 --- a/plc4go/protocols/cbus/readwrite/model/TriggerControlDataIndicatorKill.go +++ b/plc4go/protocols/cbus/readwrite/model/TriggerControlDataIndicatorKill.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // TriggerControlDataIndicatorKill is the corresponding interface of TriggerControlDataIndicatorKill type TriggerControlDataIndicatorKill interface { @@ -46,6 +48,8 @@ type _TriggerControlDataIndicatorKill struct { *_TriggerControlData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,19 +60,19 @@ type _TriggerControlDataIndicatorKill struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_TriggerControlDataIndicatorKill) InitializeParent(parent TriggerControlData, commandTypeContainer TriggerControlCommandTypeContainer, triggerGroup byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_TriggerControlDataIndicatorKill) InitializeParent(parent TriggerControlData , commandTypeContainer TriggerControlCommandTypeContainer , triggerGroup byte ) { m.CommandTypeContainer = commandTypeContainer m.TriggerGroup = triggerGroup } -func (m *_TriggerControlDataIndicatorKill) GetParent() TriggerControlData { +func (m *_TriggerControlDataIndicatorKill) GetParent() TriggerControlData { return m._TriggerControlData } + // NewTriggerControlDataIndicatorKill factory function for _TriggerControlDataIndicatorKill -func NewTriggerControlDataIndicatorKill(commandTypeContainer TriggerControlCommandTypeContainer, triggerGroup byte) *_TriggerControlDataIndicatorKill { +func NewTriggerControlDataIndicatorKill( commandTypeContainer TriggerControlCommandTypeContainer , triggerGroup byte ) *_TriggerControlDataIndicatorKill { _result := &_TriggerControlDataIndicatorKill{ - _TriggerControlData: NewTriggerControlData(commandTypeContainer, triggerGroup), + _TriggerControlData: NewTriggerControlData(commandTypeContainer, triggerGroup), } _result._TriggerControlData._TriggerControlDataChildRequirements = _result return _result @@ -76,7 +80,7 @@ func NewTriggerControlDataIndicatorKill(commandTypeContainer TriggerControlComma // Deprecated: use the interface for direct cast func CastTriggerControlDataIndicatorKill(structType interface{}) TriggerControlDataIndicatorKill { - if casted, ok := structType.(TriggerControlDataIndicatorKill); ok { + if casted, ok := structType.(TriggerControlDataIndicatorKill); ok { return casted } if casted, ok := structType.(*TriggerControlDataIndicatorKill); ok { @@ -95,6 +99,7 @@ func (m *_TriggerControlDataIndicatorKill) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_TriggerControlDataIndicatorKill) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -118,7 +123,8 @@ func TriggerControlDataIndicatorKillParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_TriggerControlDataIndicatorKill{ - _TriggerControlData: &_TriggerControlData{}, + _TriggerControlData: &_TriggerControlData{ + }, } _child._TriggerControlData._TriggerControlDataChildRequirements = _child return _child, nil @@ -148,6 +154,7 @@ func (m *_TriggerControlDataIndicatorKill) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_TriggerControlDataIndicatorKill) isTriggerControlDataIndicatorKill() bool { return true } @@ -162,3 +169,6 @@ func (m *_TriggerControlDataIndicatorKill) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/TriggerControlDataLabel.go b/plc4go/protocols/cbus/readwrite/model/TriggerControlDataLabel.go index 82ed99ae10c..2203a444dd7 100644 --- a/plc4go/protocols/cbus/readwrite/model/TriggerControlDataLabel.go +++ b/plc4go/protocols/cbus/readwrite/model/TriggerControlDataLabel.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // TriggerControlDataLabel is the corresponding interface of TriggerControlDataLabel type TriggerControlDataLabel interface { @@ -52,12 +54,14 @@ type TriggerControlDataLabelExactly interface { // _TriggerControlDataLabel is the data-structure of this message type _TriggerControlDataLabel struct { *_TriggerControlData - TriggerControlOptions TriggerControlLabelOptions - ActionSelector byte - Language *Language - Data []byte + TriggerControlOptions TriggerControlLabelOptions + ActionSelector byte + Language *Language + Data []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -68,15 +72,13 @@ type _TriggerControlDataLabel struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_TriggerControlDataLabel) InitializeParent(parent TriggerControlData, commandTypeContainer TriggerControlCommandTypeContainer, triggerGroup byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_TriggerControlDataLabel) InitializeParent(parent TriggerControlData , commandTypeContainer TriggerControlCommandTypeContainer , triggerGroup byte ) { m.CommandTypeContainer = commandTypeContainer m.TriggerGroup = triggerGroup } -func (m *_TriggerControlDataLabel) GetParent() TriggerControlData { +func (m *_TriggerControlDataLabel) GetParent() TriggerControlData { return m._TriggerControlData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -103,14 +105,15 @@ func (m *_TriggerControlDataLabel) GetData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewTriggerControlDataLabel factory function for _TriggerControlDataLabel -func NewTriggerControlDataLabel(triggerControlOptions TriggerControlLabelOptions, actionSelector byte, language *Language, data []byte, commandTypeContainer TriggerControlCommandTypeContainer, triggerGroup byte) *_TriggerControlDataLabel { +func NewTriggerControlDataLabel( triggerControlOptions TriggerControlLabelOptions , actionSelector byte , language *Language , data []byte , commandTypeContainer TriggerControlCommandTypeContainer , triggerGroup byte ) *_TriggerControlDataLabel { _result := &_TriggerControlDataLabel{ TriggerControlOptions: triggerControlOptions, - ActionSelector: actionSelector, - Language: language, - Data: data, - _TriggerControlData: NewTriggerControlData(commandTypeContainer, triggerGroup), + ActionSelector: actionSelector, + Language: language, + Data: data, + _TriggerControlData: NewTriggerControlData(commandTypeContainer, triggerGroup), } _result._TriggerControlData._TriggerControlDataChildRequirements = _result return _result @@ -118,7 +121,7 @@ func NewTriggerControlDataLabel(triggerControlOptions TriggerControlLabelOptions // Deprecated: use the interface for direct cast func CastTriggerControlDataLabel(structType interface{}) TriggerControlDataLabel { - if casted, ok := structType.(TriggerControlDataLabel); ok { + if casted, ok := structType.(TriggerControlDataLabel); ok { return casted } if casted, ok := structType.(*TriggerControlDataLabel); ok { @@ -138,7 +141,7 @@ func (m *_TriggerControlDataLabel) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += m.TriggerControlOptions.GetLengthInBits(ctx) // Simple field (actionSelector) - lengthInBits += 8 + lengthInBits += 8; // Optional Field (language) if m.Language != nil { @@ -153,6 +156,7 @@ func (m *_TriggerControlDataLabel) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_TriggerControlDataLabel) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -174,7 +178,7 @@ func TriggerControlDataLabelParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("triggerControlOptions"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for triggerControlOptions") } - _triggerControlOptions, _triggerControlOptionsErr := TriggerControlLabelOptionsParseWithBuffer(ctx, readBuffer) +_triggerControlOptions, _triggerControlOptionsErr := TriggerControlLabelOptionsParseWithBuffer(ctx, readBuffer) if _triggerControlOptionsErr != nil { return nil, errors.Wrap(_triggerControlOptionsErr, "Error parsing 'triggerControlOptions' field of TriggerControlDataLabel") } @@ -184,7 +188,7 @@ func TriggerControlDataLabelParseWithBuffer(ctx context.Context, readBuffer util } // Simple Field (actionSelector) - _actionSelector, _actionSelectorErr := readBuffer.ReadByte("actionSelector") +_actionSelector, _actionSelectorErr := readBuffer.ReadByte("actionSelector") if _actionSelectorErr != nil { return nil, errors.Wrap(_actionSelectorErr, "Error parsing 'actionSelector' field of TriggerControlDataLabel") } @@ -206,7 +210,7 @@ func TriggerControlDataLabelParseWithBuffer(ctx context.Context, readBuffer util } } // Byte Array field (data) - numberOfBytesdata := int((uint16(commandTypeContainer.NumBytes()) - uint16((utils.InlineIf((bool((triggerControlOptions.GetLabelType()) != (TriggerControlLabelType_LOAD_DYNAMIC_ICON))), func() interface{} { return uint16((uint16(4))) }, func() interface{} { return uint16((uint16(3))) }).(uint16))))) + numberOfBytesdata := int((uint16(commandTypeContainer.NumBytes()) - uint16((utils.InlineIf((bool((triggerControlOptions.GetLabelType()) != (TriggerControlLabelType_LOAD_DYNAMIC_ICON))), func() interface{} {return uint16((uint16(4)))}, func() interface{} {return uint16((uint16(3)))}).(uint16))))) data, _readArrayErr := readBuffer.ReadByteArray("data", numberOfBytesdata) if _readArrayErr != nil { return nil, errors.Wrap(_readArrayErr, "Error parsing 'data' field of TriggerControlDataLabel") @@ -218,11 +222,12 @@ func TriggerControlDataLabelParseWithBuffer(ctx context.Context, readBuffer util // Create a partially initialized instance _child := &_TriggerControlDataLabel{ - _TriggerControlData: &_TriggerControlData{}, + _TriggerControlData: &_TriggerControlData{ + }, TriggerControlOptions: triggerControlOptions, - ActionSelector: actionSelector, - Language: language, - Data: data, + ActionSelector: actionSelector, + Language: language, + Data: data, } _child._TriggerControlData._TriggerControlDataChildRequirements = _child return _child, nil @@ -244,46 +249,46 @@ func (m *_TriggerControlDataLabel) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for TriggerControlDataLabel") } - // Simple Field (triggerControlOptions) - if pushErr := writeBuffer.PushContext("triggerControlOptions"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for triggerControlOptions") - } - _triggerControlOptionsErr := writeBuffer.WriteSerializable(ctx, m.GetTriggerControlOptions()) - if popErr := writeBuffer.PopContext("triggerControlOptions"); popErr != nil { - return errors.Wrap(popErr, "Error popping for triggerControlOptions") - } - if _triggerControlOptionsErr != nil { - return errors.Wrap(_triggerControlOptionsErr, "Error serializing 'triggerControlOptions' field") - } + // Simple Field (triggerControlOptions) + if pushErr := writeBuffer.PushContext("triggerControlOptions"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for triggerControlOptions") + } + _triggerControlOptionsErr := writeBuffer.WriteSerializable(ctx, m.GetTriggerControlOptions()) + if popErr := writeBuffer.PopContext("triggerControlOptions"); popErr != nil { + return errors.Wrap(popErr, "Error popping for triggerControlOptions") + } + if _triggerControlOptionsErr != nil { + return errors.Wrap(_triggerControlOptionsErr, "Error serializing 'triggerControlOptions' field") + } - // Simple Field (actionSelector) - actionSelector := byte(m.GetActionSelector()) - _actionSelectorErr := writeBuffer.WriteByte("actionSelector", (actionSelector)) - if _actionSelectorErr != nil { - return errors.Wrap(_actionSelectorErr, "Error serializing 'actionSelector' field") - } + // Simple Field (actionSelector) + actionSelector := byte(m.GetActionSelector()) + _actionSelectorErr := writeBuffer.WriteByte("actionSelector", (actionSelector)) + if _actionSelectorErr != nil { + return errors.Wrap(_actionSelectorErr, "Error serializing 'actionSelector' field") + } - // Optional Field (language) (Can be skipped, if the value is null) - var language *Language = nil - if m.GetLanguage() != nil { - if pushErr := writeBuffer.PushContext("language"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for language") - } - language = m.GetLanguage() - _languageErr := writeBuffer.WriteSerializable(ctx, language) - if popErr := writeBuffer.PopContext("language"); popErr != nil { - return errors.Wrap(popErr, "Error popping for language") - } - if _languageErr != nil { - return errors.Wrap(_languageErr, "Error serializing 'language' field") - } + // Optional Field (language) (Can be skipped, if the value is null) + var language *Language = nil + if m.GetLanguage() != nil { + if pushErr := writeBuffer.PushContext("language"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for language") } - - // Array Field (data) - // Byte Array field (data) - if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { - return errors.Wrap(err, "Error serializing 'data' field") + language = m.GetLanguage() + _languageErr := writeBuffer.WriteSerializable(ctx, language) + if popErr := writeBuffer.PopContext("language"); popErr != nil { + return errors.Wrap(popErr, "Error popping for language") } + if _languageErr != nil { + return errors.Wrap(_languageErr, "Error serializing 'language' field") + } + } + + // Array Field (data) + // Byte Array field (data) + if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { + return errors.Wrap(err, "Error serializing 'data' field") + } if popErr := writeBuffer.PopContext("TriggerControlDataLabel"); popErr != nil { return errors.Wrap(popErr, "Error popping for TriggerControlDataLabel") @@ -293,6 +298,7 @@ func (m *_TriggerControlDataLabel) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_TriggerControlDataLabel) isTriggerControlDataLabel() bool { return true } @@ -307,3 +313,6 @@ func (m *_TriggerControlDataLabel) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/TriggerControlDataTriggerEvent.go b/plc4go/protocols/cbus/readwrite/model/TriggerControlDataTriggerEvent.go index 7928091c98f..265d515de7f 100644 --- a/plc4go/protocols/cbus/readwrite/model/TriggerControlDataTriggerEvent.go +++ b/plc4go/protocols/cbus/readwrite/model/TriggerControlDataTriggerEvent.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // TriggerControlDataTriggerEvent is the corresponding interface of TriggerControlDataTriggerEvent type TriggerControlDataTriggerEvent interface { @@ -46,9 +48,11 @@ type TriggerControlDataTriggerEventExactly interface { // _TriggerControlDataTriggerEvent is the data-structure of this message type _TriggerControlDataTriggerEvent struct { *_TriggerControlData - ActionSelector byte + ActionSelector byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -59,15 +63,13 @@ type _TriggerControlDataTriggerEvent struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_TriggerControlDataTriggerEvent) InitializeParent(parent TriggerControlData, commandTypeContainer TriggerControlCommandTypeContainer, triggerGroup byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_TriggerControlDataTriggerEvent) InitializeParent(parent TriggerControlData , commandTypeContainer TriggerControlCommandTypeContainer , triggerGroup byte ) { m.CommandTypeContainer = commandTypeContainer m.TriggerGroup = triggerGroup } -func (m *_TriggerControlDataTriggerEvent) GetParent() TriggerControlData { +func (m *_TriggerControlDataTriggerEvent) GetParent() TriggerControlData { return m._TriggerControlData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -82,11 +84,12 @@ func (m *_TriggerControlDataTriggerEvent) GetActionSelector() byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewTriggerControlDataTriggerEvent factory function for _TriggerControlDataTriggerEvent -func NewTriggerControlDataTriggerEvent(actionSelector byte, commandTypeContainer TriggerControlCommandTypeContainer, triggerGroup byte) *_TriggerControlDataTriggerEvent { +func NewTriggerControlDataTriggerEvent( actionSelector byte , commandTypeContainer TriggerControlCommandTypeContainer , triggerGroup byte ) *_TriggerControlDataTriggerEvent { _result := &_TriggerControlDataTriggerEvent{ - ActionSelector: actionSelector, - _TriggerControlData: NewTriggerControlData(commandTypeContainer, triggerGroup), + ActionSelector: actionSelector, + _TriggerControlData: NewTriggerControlData(commandTypeContainer, triggerGroup), } _result._TriggerControlData._TriggerControlDataChildRequirements = _result return _result @@ -94,7 +97,7 @@ func NewTriggerControlDataTriggerEvent(actionSelector byte, commandTypeContainer // Deprecated: use the interface for direct cast func CastTriggerControlDataTriggerEvent(structType interface{}) TriggerControlDataTriggerEvent { - if casted, ok := structType.(TriggerControlDataTriggerEvent); ok { + if casted, ok := structType.(TriggerControlDataTriggerEvent); ok { return casted } if casted, ok := structType.(*TriggerControlDataTriggerEvent); ok { @@ -111,11 +114,12 @@ func (m *_TriggerControlDataTriggerEvent) GetLengthInBits(ctx context.Context) u lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (actionSelector) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_TriggerControlDataTriggerEvent) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -134,7 +138,7 @@ func TriggerControlDataTriggerEventParseWithBuffer(ctx context.Context, readBuff _ = currentPos // Simple Field (actionSelector) - _actionSelector, _actionSelectorErr := readBuffer.ReadByte("actionSelector") +_actionSelector, _actionSelectorErr := readBuffer.ReadByte("actionSelector") if _actionSelectorErr != nil { return nil, errors.Wrap(_actionSelectorErr, "Error parsing 'actionSelector' field of TriggerControlDataTriggerEvent") } @@ -146,8 +150,9 @@ func TriggerControlDataTriggerEventParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_TriggerControlDataTriggerEvent{ - _TriggerControlData: &_TriggerControlData{}, - ActionSelector: actionSelector, + _TriggerControlData: &_TriggerControlData{ + }, + ActionSelector: actionSelector, } _child._TriggerControlData._TriggerControlDataChildRequirements = _child return _child, nil @@ -169,12 +174,12 @@ func (m *_TriggerControlDataTriggerEvent) SerializeWithWriteBuffer(ctx context.C return errors.Wrap(pushErr, "Error pushing for TriggerControlDataTriggerEvent") } - // Simple Field (actionSelector) - actionSelector := byte(m.GetActionSelector()) - _actionSelectorErr := writeBuffer.WriteByte("actionSelector", (actionSelector)) - if _actionSelectorErr != nil { - return errors.Wrap(_actionSelectorErr, "Error serializing 'actionSelector' field") - } + // Simple Field (actionSelector) + actionSelector := byte(m.GetActionSelector()) + _actionSelectorErr := writeBuffer.WriteByte("actionSelector", (actionSelector)) + if _actionSelectorErr != nil { + return errors.Wrap(_actionSelectorErr, "Error serializing 'actionSelector' field") + } if popErr := writeBuffer.PopContext("TriggerControlDataTriggerEvent"); popErr != nil { return errors.Wrap(popErr, "Error popping for TriggerControlDataTriggerEvent") @@ -184,6 +189,7 @@ func (m *_TriggerControlDataTriggerEvent) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_TriggerControlDataTriggerEvent) isTriggerControlDataTriggerEvent() bool { return true } @@ -198,3 +204,6 @@ func (m *_TriggerControlDataTriggerEvent) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/TriggerControlDataTriggerMax.go b/plc4go/protocols/cbus/readwrite/model/TriggerControlDataTriggerMax.go index e42dd7f0730..0db8bbc3f61 100644 --- a/plc4go/protocols/cbus/readwrite/model/TriggerControlDataTriggerMax.go +++ b/plc4go/protocols/cbus/readwrite/model/TriggerControlDataTriggerMax.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // TriggerControlDataTriggerMax is the corresponding interface of TriggerControlDataTriggerMax type TriggerControlDataTriggerMax interface { @@ -46,6 +48,8 @@ type _TriggerControlDataTriggerMax struct { *_TriggerControlData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,19 +60,19 @@ type _TriggerControlDataTriggerMax struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_TriggerControlDataTriggerMax) InitializeParent(parent TriggerControlData, commandTypeContainer TriggerControlCommandTypeContainer, triggerGroup byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_TriggerControlDataTriggerMax) InitializeParent(parent TriggerControlData , commandTypeContainer TriggerControlCommandTypeContainer , triggerGroup byte ) { m.CommandTypeContainer = commandTypeContainer m.TriggerGroup = triggerGroup } -func (m *_TriggerControlDataTriggerMax) GetParent() TriggerControlData { +func (m *_TriggerControlDataTriggerMax) GetParent() TriggerControlData { return m._TriggerControlData } + // NewTriggerControlDataTriggerMax factory function for _TriggerControlDataTriggerMax -func NewTriggerControlDataTriggerMax(commandTypeContainer TriggerControlCommandTypeContainer, triggerGroup byte) *_TriggerControlDataTriggerMax { +func NewTriggerControlDataTriggerMax( commandTypeContainer TriggerControlCommandTypeContainer , triggerGroup byte ) *_TriggerControlDataTriggerMax { _result := &_TriggerControlDataTriggerMax{ - _TriggerControlData: NewTriggerControlData(commandTypeContainer, triggerGroup), + _TriggerControlData: NewTriggerControlData(commandTypeContainer, triggerGroup), } _result._TriggerControlData._TriggerControlDataChildRequirements = _result return _result @@ -76,7 +80,7 @@ func NewTriggerControlDataTriggerMax(commandTypeContainer TriggerControlCommandT // Deprecated: use the interface for direct cast func CastTriggerControlDataTriggerMax(structType interface{}) TriggerControlDataTriggerMax { - if casted, ok := structType.(TriggerControlDataTriggerMax); ok { + if casted, ok := structType.(TriggerControlDataTriggerMax); ok { return casted } if casted, ok := structType.(*TriggerControlDataTriggerMax); ok { @@ -95,6 +99,7 @@ func (m *_TriggerControlDataTriggerMax) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_TriggerControlDataTriggerMax) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -118,7 +123,8 @@ func TriggerControlDataTriggerMaxParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_TriggerControlDataTriggerMax{ - _TriggerControlData: &_TriggerControlData{}, + _TriggerControlData: &_TriggerControlData{ + }, } _child._TriggerControlData._TriggerControlDataChildRequirements = _child return _child, nil @@ -148,6 +154,7 @@ func (m *_TriggerControlDataTriggerMax) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_TriggerControlDataTriggerMax) isTriggerControlDataTriggerMax() bool { return true } @@ -162,3 +169,6 @@ func (m *_TriggerControlDataTriggerMax) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/TriggerControlDataTriggerMin.go b/plc4go/protocols/cbus/readwrite/model/TriggerControlDataTriggerMin.go index 66bdf87e20a..b68caf0df1d 100644 --- a/plc4go/protocols/cbus/readwrite/model/TriggerControlDataTriggerMin.go +++ b/plc4go/protocols/cbus/readwrite/model/TriggerControlDataTriggerMin.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // TriggerControlDataTriggerMin is the corresponding interface of TriggerControlDataTriggerMin type TriggerControlDataTriggerMin interface { @@ -46,6 +48,8 @@ type _TriggerControlDataTriggerMin struct { *_TriggerControlData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. @@ -56,19 +60,19 @@ type _TriggerControlDataTriggerMin struct { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_TriggerControlDataTriggerMin) InitializeParent(parent TriggerControlData, commandTypeContainer TriggerControlCommandTypeContainer, triggerGroup byte) { - m.CommandTypeContainer = commandTypeContainer +func (m *_TriggerControlDataTriggerMin) InitializeParent(parent TriggerControlData , commandTypeContainer TriggerControlCommandTypeContainer , triggerGroup byte ) { m.CommandTypeContainer = commandTypeContainer m.TriggerGroup = triggerGroup } -func (m *_TriggerControlDataTriggerMin) GetParent() TriggerControlData { +func (m *_TriggerControlDataTriggerMin) GetParent() TriggerControlData { return m._TriggerControlData } + // NewTriggerControlDataTriggerMin factory function for _TriggerControlDataTriggerMin -func NewTriggerControlDataTriggerMin(commandTypeContainer TriggerControlCommandTypeContainer, triggerGroup byte) *_TriggerControlDataTriggerMin { +func NewTriggerControlDataTriggerMin( commandTypeContainer TriggerControlCommandTypeContainer , triggerGroup byte ) *_TriggerControlDataTriggerMin { _result := &_TriggerControlDataTriggerMin{ - _TriggerControlData: NewTriggerControlData(commandTypeContainer, triggerGroup), + _TriggerControlData: NewTriggerControlData(commandTypeContainer, triggerGroup), } _result._TriggerControlData._TriggerControlDataChildRequirements = _result return _result @@ -76,7 +80,7 @@ func NewTriggerControlDataTriggerMin(commandTypeContainer TriggerControlCommandT // Deprecated: use the interface for direct cast func CastTriggerControlDataTriggerMin(structType interface{}) TriggerControlDataTriggerMin { - if casted, ok := structType.(TriggerControlDataTriggerMin); ok { + if casted, ok := structType.(TriggerControlDataTriggerMin); ok { return casted } if casted, ok := structType.(*TriggerControlDataTriggerMin); ok { @@ -95,6 +99,7 @@ func (m *_TriggerControlDataTriggerMin) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_TriggerControlDataTriggerMin) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -118,7 +123,8 @@ func TriggerControlDataTriggerMinParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_TriggerControlDataTriggerMin{ - _TriggerControlData: &_TriggerControlData{}, + _TriggerControlData: &_TriggerControlData{ + }, } _child._TriggerControlData._TriggerControlDataChildRequirements = _child return _child, nil @@ -148,6 +154,7 @@ func (m *_TriggerControlDataTriggerMin) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_TriggerControlDataTriggerMin) isTriggerControlDataTriggerMin() bool { return true } @@ -162,3 +169,6 @@ func (m *_TriggerControlDataTriggerMin) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/TriggerControlLabelFlavour.go b/plc4go/protocols/cbus/readwrite/model/TriggerControlLabelFlavour.go index 18454d0af6f..db8dfd7d7cf 100644 --- a/plc4go/protocols/cbus/readwrite/model/TriggerControlLabelFlavour.go +++ b/plc4go/protocols/cbus/readwrite/model/TriggerControlLabelFlavour.go @@ -34,7 +34,7 @@ type ITriggerControlLabelFlavour interface { utils.Serializable } -const ( +const( TriggerControlLabelFlavour_FLAVOUR_0 TriggerControlLabelFlavour = 0 TriggerControlLabelFlavour_FLAVOUR_1 TriggerControlLabelFlavour = 1 TriggerControlLabelFlavour_FLAVOUR_2 TriggerControlLabelFlavour = 2 @@ -45,7 +45,7 @@ var TriggerControlLabelFlavourValues []TriggerControlLabelFlavour func init() { _ = errors.New - TriggerControlLabelFlavourValues = []TriggerControlLabelFlavour{ + TriggerControlLabelFlavourValues = []TriggerControlLabelFlavour { TriggerControlLabelFlavour_FLAVOUR_0, TriggerControlLabelFlavour_FLAVOUR_1, TriggerControlLabelFlavour_FLAVOUR_2, @@ -55,14 +55,14 @@ func init() { func TriggerControlLabelFlavourByValue(value uint8) (enum TriggerControlLabelFlavour, ok bool) { switch value { - case 0: - return TriggerControlLabelFlavour_FLAVOUR_0, true - case 1: - return TriggerControlLabelFlavour_FLAVOUR_1, true - case 2: - return TriggerControlLabelFlavour_FLAVOUR_2, true - case 3: - return TriggerControlLabelFlavour_FLAVOUR_3, true + case 0: + return TriggerControlLabelFlavour_FLAVOUR_0, true + case 1: + return TriggerControlLabelFlavour_FLAVOUR_1, true + case 2: + return TriggerControlLabelFlavour_FLAVOUR_2, true + case 3: + return TriggerControlLabelFlavour_FLAVOUR_3, true } return 0, false } @@ -81,13 +81,13 @@ func TriggerControlLabelFlavourByName(value string) (enum TriggerControlLabelFla return 0, false } -func TriggerControlLabelFlavourKnows(value uint8) bool { +func TriggerControlLabelFlavourKnows(value uint8) bool { for _, typeValue := range TriggerControlLabelFlavourValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastTriggerControlLabelFlavour(structType interface{}) TriggerControlLabelFlavour { @@ -155,3 +155,4 @@ func (e TriggerControlLabelFlavour) PLC4XEnumName() string { func (e TriggerControlLabelFlavour) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/TriggerControlLabelOptions.go b/plc4go/protocols/cbus/readwrite/model/TriggerControlLabelOptions.go index 358032ca685..f293aa6479a 100644 --- a/plc4go/protocols/cbus/readwrite/model/TriggerControlLabelOptions.go +++ b/plc4go/protocols/cbus/readwrite/model/TriggerControlLabelOptions.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // TriggerControlLabelOptions is the corresponding interface of TriggerControlLabelOptions type TriggerControlLabelOptions interface { @@ -46,8 +48,8 @@ type TriggerControlLabelOptionsExactly interface { // _TriggerControlLabelOptions is the data-structure of this message type _TriggerControlLabelOptions struct { - LabelFlavour TriggerControlLabelFlavour - LabelType TriggerControlLabelType + LabelFlavour TriggerControlLabelFlavour + LabelType TriggerControlLabelType // Reserved Fields reservedField0 *bool reservedField1 *bool @@ -55,6 +57,7 @@ type _TriggerControlLabelOptions struct { reservedField3 *bool } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -73,14 +76,15 @@ func (m *_TriggerControlLabelOptions) GetLabelType() TriggerControlLabelType { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewTriggerControlLabelOptions factory function for _TriggerControlLabelOptions -func NewTriggerControlLabelOptions(labelFlavour TriggerControlLabelFlavour, labelType TriggerControlLabelType) *_TriggerControlLabelOptions { - return &_TriggerControlLabelOptions{LabelFlavour: labelFlavour, LabelType: labelType} +func NewTriggerControlLabelOptions( labelFlavour TriggerControlLabelFlavour , labelType TriggerControlLabelType ) *_TriggerControlLabelOptions { +return &_TriggerControlLabelOptions{ LabelFlavour: labelFlavour , LabelType: labelType } } // Deprecated: use the interface for direct cast func CastTriggerControlLabelOptions(structType interface{}) TriggerControlLabelOptions { - if casted, ok := structType.(TriggerControlLabelOptions); ok { + if casted, ok := structType.(TriggerControlLabelOptions); ok { return casted } if casted, ok := structType.(*TriggerControlLabelOptions); ok { @@ -117,6 +121,7 @@ func (m *_TriggerControlLabelOptions) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_TriggerControlLabelOptions) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -144,7 +149,7 @@ func TriggerControlLabelOptionsParseWithBuffer(ctx context.Context, readBuffer u if reserved != bool(false) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -155,7 +160,7 @@ func TriggerControlLabelOptionsParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("labelFlavour"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for labelFlavour") } - _labelFlavour, _labelFlavourErr := TriggerControlLabelFlavourParseWithBuffer(ctx, readBuffer) +_labelFlavour, _labelFlavourErr := TriggerControlLabelFlavourParseWithBuffer(ctx, readBuffer) if _labelFlavourErr != nil { return nil, errors.Wrap(_labelFlavourErr, "Error parsing 'labelFlavour' field of TriggerControlLabelOptions") } @@ -174,7 +179,7 @@ func TriggerControlLabelOptionsParseWithBuffer(ctx context.Context, readBuffer u if reserved != bool(false) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField1 = &reserved @@ -191,7 +196,7 @@ func TriggerControlLabelOptionsParseWithBuffer(ctx context.Context, readBuffer u if reserved != bool(false) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField2 = &reserved @@ -202,7 +207,7 @@ func TriggerControlLabelOptionsParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("labelType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for labelType") } - _labelType, _labelTypeErr := TriggerControlLabelTypeParseWithBuffer(ctx, readBuffer) +_labelType, _labelTypeErr := TriggerControlLabelTypeParseWithBuffer(ctx, readBuffer) if _labelTypeErr != nil { return nil, errors.Wrap(_labelTypeErr, "Error parsing 'labelType' field of TriggerControlLabelOptions") } @@ -221,7 +226,7 @@ func TriggerControlLabelOptionsParseWithBuffer(ctx context.Context, readBuffer u if reserved != bool(false) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField3 = &reserved @@ -234,13 +239,13 @@ func TriggerControlLabelOptionsParseWithBuffer(ctx context.Context, readBuffer u // Create the instance return &_TriggerControlLabelOptions{ - LabelFlavour: labelFlavour, - LabelType: labelType, - reservedField0: reservedField0, - reservedField1: reservedField1, - reservedField2: reservedField2, - reservedField3: reservedField3, - }, nil + LabelFlavour: labelFlavour, + LabelType: labelType, + reservedField0: reservedField0, + reservedField1: reservedField1, + reservedField2: reservedField2, + reservedField3: reservedField3, + }, nil } func (m *_TriggerControlLabelOptions) Serialize() ([]byte, error) { @@ -254,7 +259,7 @@ func (m *_TriggerControlLabelOptions) Serialize() ([]byte, error) { func (m *_TriggerControlLabelOptions) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("TriggerControlLabelOptions"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("TriggerControlLabelOptions"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for TriggerControlLabelOptions") } @@ -264,7 +269,7 @@ func (m *_TriggerControlLabelOptions) SerializeWithWriteBuffer(ctx context.Conte if m.reservedField0 != nil { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Overriding reserved field with unexpected value.") reserved = *m.reservedField0 } @@ -292,7 +297,7 @@ func (m *_TriggerControlLabelOptions) SerializeWithWriteBuffer(ctx context.Conte if m.reservedField1 != nil { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Overriding reserved field with unexpected value.") reserved = *m.reservedField1 } @@ -308,7 +313,7 @@ func (m *_TriggerControlLabelOptions) SerializeWithWriteBuffer(ctx context.Conte if m.reservedField2 != nil { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Overriding reserved field with unexpected value.") reserved = *m.reservedField2 } @@ -336,7 +341,7 @@ func (m *_TriggerControlLabelOptions) SerializeWithWriteBuffer(ctx context.Conte if m.reservedField3 != nil { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": bool(false), - "got value": reserved, + "got value": reserved, }).Msg("Overriding reserved field with unexpected value.") reserved = *m.reservedField3 } @@ -352,6 +357,7 @@ func (m *_TriggerControlLabelOptions) SerializeWithWriteBuffer(ctx context.Conte return nil } + func (m *_TriggerControlLabelOptions) isTriggerControlLabelOptions() bool { return true } @@ -366,3 +372,6 @@ func (m *_TriggerControlLabelOptions) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/TriggerControlLabelType.go b/plc4go/protocols/cbus/readwrite/model/TriggerControlLabelType.go index 297e601e74a..e4fecfe6193 100644 --- a/plc4go/protocols/cbus/readwrite/model/TriggerControlLabelType.go +++ b/plc4go/protocols/cbus/readwrite/model/TriggerControlLabelType.go @@ -34,10 +34,10 @@ type ITriggerControlLabelType interface { utils.Serializable } -const ( - TriggerControlLabelType_TEXT_LABEL TriggerControlLabelType = 0 - TriggerControlLabelType_PREDEFINED_ICON TriggerControlLabelType = 1 - TriggerControlLabelType_LOAD_DYNAMIC_ICON TriggerControlLabelType = 2 +const( + TriggerControlLabelType_TEXT_LABEL TriggerControlLabelType = 0 + TriggerControlLabelType_PREDEFINED_ICON TriggerControlLabelType = 1 + TriggerControlLabelType_LOAD_DYNAMIC_ICON TriggerControlLabelType = 2 TriggerControlLabelType_SET_PREFERRED_LANGUAGE TriggerControlLabelType = 3 ) @@ -45,7 +45,7 @@ var TriggerControlLabelTypeValues []TriggerControlLabelType func init() { _ = errors.New - TriggerControlLabelTypeValues = []TriggerControlLabelType{ + TriggerControlLabelTypeValues = []TriggerControlLabelType { TriggerControlLabelType_TEXT_LABEL, TriggerControlLabelType_PREDEFINED_ICON, TriggerControlLabelType_LOAD_DYNAMIC_ICON, @@ -55,14 +55,14 @@ func init() { func TriggerControlLabelTypeByValue(value uint8) (enum TriggerControlLabelType, ok bool) { switch value { - case 0: - return TriggerControlLabelType_TEXT_LABEL, true - case 1: - return TriggerControlLabelType_PREDEFINED_ICON, true - case 2: - return TriggerControlLabelType_LOAD_DYNAMIC_ICON, true - case 3: - return TriggerControlLabelType_SET_PREFERRED_LANGUAGE, true + case 0: + return TriggerControlLabelType_TEXT_LABEL, true + case 1: + return TriggerControlLabelType_PREDEFINED_ICON, true + case 2: + return TriggerControlLabelType_LOAD_DYNAMIC_ICON, true + case 3: + return TriggerControlLabelType_SET_PREFERRED_LANGUAGE, true } return 0, false } @@ -81,13 +81,13 @@ func TriggerControlLabelTypeByName(value string) (enum TriggerControlLabelType, return 0, false } -func TriggerControlLabelTypeKnows(value uint8) bool { +func TriggerControlLabelTypeKnows(value uint8) bool { for _, typeValue := range TriggerControlLabelTypeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastTriggerControlLabelType(structType interface{}) TriggerControlLabelType { @@ -155,3 +155,4 @@ func (e TriggerControlLabelType) PLC4XEnumName() string { func (e TriggerControlLabelType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/UnitAddress.go b/plc4go/protocols/cbus/readwrite/model/UnitAddress.go index a6c76a3b8da..5d50662c90d 100644 --- a/plc4go/protocols/cbus/readwrite/model/UnitAddress.go +++ b/plc4go/protocols/cbus/readwrite/model/UnitAddress.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // UnitAddress is the corresponding interface of UnitAddress type UnitAddress interface { @@ -44,9 +46,10 @@ type UnitAddressExactly interface { // _UnitAddress is the data-structure of this message type _UnitAddress struct { - Address byte + Address byte } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -61,14 +64,15 @@ func (m *_UnitAddress) GetAddress() byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewUnitAddress factory function for _UnitAddress -func NewUnitAddress(address byte) *_UnitAddress { - return &_UnitAddress{Address: address} +func NewUnitAddress( address byte ) *_UnitAddress { +return &_UnitAddress{ Address: address } } // Deprecated: use the interface for direct cast func CastUnitAddress(structType interface{}) UnitAddress { - if casted, ok := structType.(UnitAddress); ok { + if casted, ok := structType.(UnitAddress); ok { return casted } if casted, ok := structType.(*UnitAddress); ok { @@ -85,11 +89,12 @@ func (m *_UnitAddress) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (address) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_UnitAddress) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -108,7 +113,7 @@ func UnitAddressParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer _ = currentPos // Simple Field (address) - _address, _addressErr := readBuffer.ReadByte("address") +_address, _addressErr := readBuffer.ReadByte("address") if _addressErr != nil { return nil, errors.Wrap(_addressErr, "Error parsing 'address' field of UnitAddress") } @@ -120,8 +125,8 @@ func UnitAddressParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer // Create the instance return &_UnitAddress{ - Address: address, - }, nil + Address: address, + }, nil } func (m *_UnitAddress) Serialize() ([]byte, error) { @@ -135,7 +140,7 @@ func (m *_UnitAddress) Serialize() ([]byte, error) { func (m *_UnitAddress) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("UnitAddress"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("UnitAddress"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for UnitAddress") } @@ -152,6 +157,7 @@ func (m *_UnitAddress) SerializeWithWriteBuffer(ctx context.Context, writeBuffer return nil } + func (m *_UnitAddress) isUnitAddress() bool { return true } @@ -166,3 +172,6 @@ func (m *_UnitAddress) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/UnitStatus.go b/plc4go/protocols/cbus/readwrite/model/UnitStatus.go index f9ef91ce3b7..93578c49cd5 100644 --- a/plc4go/protocols/cbus/readwrite/model/UnitStatus.go +++ b/plc4go/protocols/cbus/readwrite/model/UnitStatus.go @@ -34,9 +34,9 @@ type IUnitStatus interface { utils.Serializable } -const ( - UnitStatus_OK UnitStatus = 0 - UnitStatus_NACK UnitStatus = 1 +const( + UnitStatus_OK UnitStatus = 0 + UnitStatus_NACK UnitStatus = 1 UnitStatus_NO_RESPONSE UnitStatus = 2 ) @@ -44,7 +44,7 @@ var UnitStatusValues []UnitStatus func init() { _ = errors.New - UnitStatusValues = []UnitStatus{ + UnitStatusValues = []UnitStatus { UnitStatus_OK, UnitStatus_NACK, UnitStatus_NO_RESPONSE, @@ -53,12 +53,12 @@ func init() { func UnitStatusByValue(value uint8) (enum UnitStatus, ok bool) { switch value { - case 0: - return UnitStatus_OK, true - case 1: - return UnitStatus_NACK, true - case 2: - return UnitStatus_NO_RESPONSE, true + case 0: + return UnitStatus_OK, true + case 1: + return UnitStatus_NACK, true + case 2: + return UnitStatus_NO_RESPONSE, true } return 0, false } @@ -75,13 +75,13 @@ func UnitStatusByName(value string) (enum UnitStatus, ok bool) { return 0, false } -func UnitStatusKnows(value uint8) bool { +func UnitStatusKnows(value uint8) bool { for _, typeValue := range UnitStatusValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastUnitStatus(structType interface{}) UnitStatus { @@ -147,3 +147,4 @@ func (e UnitStatus) PLC4XEnumName() string { func (e UnitStatus) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/ZoneStatus.go b/plc4go/protocols/cbus/readwrite/model/ZoneStatus.go index 53886371a1b..6506ad1cf6d 100644 --- a/plc4go/protocols/cbus/readwrite/model/ZoneStatus.go +++ b/plc4go/protocols/cbus/readwrite/model/ZoneStatus.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ZoneStatus is the corresponding interface of ZoneStatus type ZoneStatus interface { @@ -44,9 +46,10 @@ type ZoneStatusExactly interface { // _ZoneStatus is the data-structure of this message type _ZoneStatus struct { - Value ZoneStatusTemp + Value ZoneStatusTemp } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -61,14 +64,15 @@ func (m *_ZoneStatus) GetValue() ZoneStatusTemp { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewZoneStatus factory function for _ZoneStatus -func NewZoneStatus(value ZoneStatusTemp) *_ZoneStatus { - return &_ZoneStatus{Value: value} +func NewZoneStatus( value ZoneStatusTemp ) *_ZoneStatus { +return &_ZoneStatus{ Value: value } } // Deprecated: use the interface for direct cast func CastZoneStatus(structType interface{}) ZoneStatus { - if casted, ok := structType.(ZoneStatus); ok { + if casted, ok := structType.(ZoneStatus); ok { return casted } if casted, ok := structType.(*ZoneStatus); ok { @@ -90,6 +94,7 @@ func (m *_ZoneStatus) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_ZoneStatus) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -111,7 +116,7 @@ func ZoneStatusParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) if pullErr := readBuffer.PullContext("value"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for value") } - _value, _valueErr := ZoneStatusTempParseWithBuffer(ctx, readBuffer) +_value, _valueErr := ZoneStatusTempParseWithBuffer(ctx, readBuffer) if _valueErr != nil { return nil, errors.Wrap(_valueErr, "Error parsing 'value' field of ZoneStatus") } @@ -126,8 +131,8 @@ func ZoneStatusParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) // Create the instance return &_ZoneStatus{ - Value: value, - }, nil + Value: value, + }, nil } func (m *_ZoneStatus) Serialize() ([]byte, error) { @@ -141,7 +146,7 @@ func (m *_ZoneStatus) Serialize() ([]byte, error) { func (m *_ZoneStatus) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("ZoneStatus"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("ZoneStatus"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for ZoneStatus") } @@ -163,6 +168,7 @@ func (m *_ZoneStatus) SerializeWithWriteBuffer(ctx context.Context, writeBuffer return nil } + func (m *_ZoneStatus) isZoneStatus() bool { return true } @@ -177,3 +183,6 @@ func (m *_ZoneStatus) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/cbus/readwrite/model/ZoneStatusTemp.go b/plc4go/protocols/cbus/readwrite/model/ZoneStatusTemp.go index d7c254ef410..fede5ec30b9 100644 --- a/plc4go/protocols/cbus/readwrite/model/ZoneStatusTemp.go +++ b/plc4go/protocols/cbus/readwrite/model/ZoneStatusTemp.go @@ -34,18 +34,18 @@ type IZoneStatusTemp interface { utils.Serializable } -const ( - ZoneStatusTemp_ZONE_SEALED ZoneStatusTemp = 0x0 +const( + ZoneStatusTemp_ZONE_SEALED ZoneStatusTemp = 0x0 ZoneStatusTemp_ZONE_UNSEALED ZoneStatusTemp = 0x1 - ZoneStatusTemp_ZONE_OPEN ZoneStatusTemp = 0x2 - ZoneStatusTemp_ZONE_SHORT ZoneStatusTemp = 0x3 + ZoneStatusTemp_ZONE_OPEN ZoneStatusTemp = 0x2 + ZoneStatusTemp_ZONE_SHORT ZoneStatusTemp = 0x3 ) var ZoneStatusTempValues []ZoneStatusTemp func init() { _ = errors.New - ZoneStatusTempValues = []ZoneStatusTemp{ + ZoneStatusTempValues = []ZoneStatusTemp { ZoneStatusTemp_ZONE_SEALED, ZoneStatusTemp_ZONE_UNSEALED, ZoneStatusTemp_ZONE_OPEN, @@ -55,14 +55,14 @@ func init() { func ZoneStatusTempByValue(value uint8) (enum ZoneStatusTemp, ok bool) { switch value { - case 0x0: - return ZoneStatusTemp_ZONE_SEALED, true - case 0x1: - return ZoneStatusTemp_ZONE_UNSEALED, true - case 0x2: - return ZoneStatusTemp_ZONE_OPEN, true - case 0x3: - return ZoneStatusTemp_ZONE_SHORT, true + case 0x0: + return ZoneStatusTemp_ZONE_SEALED, true + case 0x1: + return ZoneStatusTemp_ZONE_UNSEALED, true + case 0x2: + return ZoneStatusTemp_ZONE_OPEN, true + case 0x3: + return ZoneStatusTemp_ZONE_SHORT, true } return 0, false } @@ -81,13 +81,13 @@ func ZoneStatusTempByName(value string) (enum ZoneStatusTemp, ok bool) { return 0, false } -func ZoneStatusTempKnows(value uint8) bool { +func ZoneStatusTempKnows(value uint8) bool { for _, typeValue := range ZoneStatusTempValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastZoneStatusTemp(structType interface{}) ZoneStatusTemp { @@ -155,3 +155,4 @@ func (e ZoneStatusTemp) PLC4XEnumName() string { func (e ZoneStatusTemp) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/cbus/readwrite/model/plc4x_common.go b/plc4go/protocols/cbus/readwrite/model/plc4x_common.go index d2d66e8bdd3..42166d94e68 100644 --- a/plc4go/protocols/cbus/readwrite/model/plc4x_common.go +++ b/plc4go/protocols/cbus/readwrite/model/plc4x_common.go @@ -15,7 +15,7 @@ * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - */ +*/ package model @@ -25,3 +25,4 @@ import "github.com/rs/zerolog/log" // Plc4xModelLog is the Logger used by the Parse/Serialize methods var Plc4xModelLog = &log.Logger + diff --git a/plc4go/protocols/df1/readwrite/XmlParserHelper.go b/plc4go/protocols/df1/readwrite/XmlParserHelper.go index 88e1c4126bb..27edf86d9c6 100644 --- a/plc4go/protocols/df1/readwrite/XmlParserHelper.go +++ b/plc4go/protocols/df1/readwrite/XmlParserHelper.go @@ -21,8 +21,8 @@ package readwrite import ( "context" - "strconv" "strings" + "strconv" "github.com/apache/plc4x/plc4go/protocols/df1/readwrite/model" "github.com/apache/plc4x/plc4go/spi/utils" @@ -43,11 +43,11 @@ func init() { } func (m Df1XmlParserHelper) Parse(typeName string, xmlString string, parserArguments ...string) (interface{}, error) { - switch typeName { - case "DF1Symbol": - return model.DF1SymbolParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "DF1Command": - return model.DF1CommandParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - } - return nil, errors.Errorf("Unsupported type %s", typeName) + switch typeName { + case "DF1Symbol": + return model.DF1SymbolParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "DF1Command": + return model.DF1CommandParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + } + return nil, errors.Errorf("Unsupported type %s", typeName) } diff --git a/plc4go/protocols/df1/readwrite/model/DF1Command.go b/plc4go/protocols/df1/readwrite/model/DF1Command.go index 097da5d09cf..21320163682 100644 --- a/plc4go/protocols/df1/readwrite/model/DF1Command.go +++ b/plc4go/protocols/df1/readwrite/model/DF1Command.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // DF1Command is the corresponding interface of DF1Command type DF1Command interface { @@ -49,8 +51,8 @@ type DF1CommandExactly interface { // _DF1Command is the data-structure of this message type _DF1Command struct { _DF1CommandChildRequirements - Status uint8 - TransactionCounter uint16 + Status uint8 + TransactionCounter uint16 } type _DF1CommandChildRequirements interface { @@ -59,6 +61,7 @@ type _DF1CommandChildRequirements interface { GetCommandCode() uint8 } + type DF1CommandParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child DF1Command, serializeChildFunction func() error) error GetTypeName() string @@ -66,13 +69,12 @@ type DF1CommandParent interface { type DF1CommandChild interface { utils.Serializable - InitializeParent(parent DF1Command, status uint8, transactionCounter uint16) +InitializeParent(parent DF1Command , status uint8 , transactionCounter uint16 ) GetParent() *DF1Command GetTypeName() string DF1Command } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -91,14 +93,15 @@ func (m *_DF1Command) GetTransactionCounter() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewDF1Command factory function for _DF1Command -func NewDF1Command(status uint8, transactionCounter uint16) *_DF1Command { - return &_DF1Command{Status: status, TransactionCounter: transactionCounter} +func NewDF1Command( status uint8 , transactionCounter uint16 ) *_DF1Command { +return &_DF1Command{ Status: status , TransactionCounter: transactionCounter } } // Deprecated: use the interface for direct cast func CastDF1Command(structType interface{}) DF1Command { - if casted, ok := structType.(DF1Command); ok { + if casted, ok := structType.(DF1Command); ok { return casted } if casted, ok := structType.(*DF1Command); ok { @@ -111,16 +114,17 @@ func (m *_DF1Command) GetTypeName() string { return "DF1Command" } + func (m *_DF1Command) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Discriminator Field (commandCode) - lengthInBits += 8 + lengthInBits += 8; // Simple field (status) - lengthInBits += 8 + lengthInBits += 8; // Simple field (transactionCounter) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } @@ -149,14 +153,14 @@ func DF1CommandParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) } // Simple Field (status) - _status, _statusErr := readBuffer.ReadUint8("status", 8) +_status, _statusErr := readBuffer.ReadUint8("status", 8) if _statusErr != nil { return nil, errors.Wrap(_statusErr, "Error parsing 'status' field of DF1Command") } status := _status // Simple Field (transactionCounter) - _transactionCounter, _transactionCounterErr := readBuffer.ReadUint16("transactionCounter", 16) +_transactionCounter, _transactionCounterErr := readBuffer.ReadUint16("transactionCounter", 16) if _transactionCounterErr != nil { return nil, errors.Wrap(_transactionCounterErr, "Error parsing 'transactionCounter' field of DF1Command") } @@ -165,17 +169,17 @@ func DF1CommandParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type DF1CommandChildSerializeRequirement interface { DF1Command - InitializeParent(DF1Command, uint8, uint16) + InitializeParent(DF1Command, uint8, uint16) GetParent() DF1Command } var _childTemp interface{} var _child DF1CommandChildSerializeRequirement var typeSwitchError error switch { - case commandCode == 0x01: // DF1UnprotectedReadRequest - _childTemp, typeSwitchError = DF1UnprotectedReadRequestParseWithBuffer(ctx, readBuffer) - case commandCode == 0x41: // DF1UnprotectedReadResponse - _childTemp, typeSwitchError = DF1UnprotectedReadResponseParseWithBuffer(ctx, readBuffer) +case commandCode == 0x01 : // DF1UnprotectedReadRequest + _childTemp, typeSwitchError = DF1UnprotectedReadRequestParseWithBuffer(ctx, readBuffer, ) +case commandCode == 0x41 : // DF1UnprotectedReadResponse + _childTemp, typeSwitchError = DF1UnprotectedReadResponseParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [commandCode=%v]", commandCode) } @@ -189,7 +193,7 @@ func DF1CommandParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) } // Finish initializing - _child.InitializeParent(_child, status, transactionCounter) +_child.InitializeParent(_child , status , transactionCounter ) return _child, nil } @@ -199,7 +203,7 @@ func (pm *_DF1Command) SerializeParent(ctx context.Context, writeBuffer utils.Wr _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("DF1Command"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("DF1Command"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for DF1Command") } @@ -236,6 +240,7 @@ func (pm *_DF1Command) SerializeParent(ctx context.Context, writeBuffer utils.Wr return nil } + func (m *_DF1Command) isDF1Command() bool { return true } @@ -250,3 +255,6 @@ func (m *_DF1Command) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/df1/readwrite/model/DF1Symbol.go b/plc4go/protocols/df1/readwrite/model/DF1Symbol.go index 8eb730df82d..4710d8fd0d6 100644 --- a/plc4go/protocols/df1/readwrite/model/DF1Symbol.go +++ b/plc4go/protocols/df1/readwrite/model/DF1Symbol.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -27,7 +28,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const DF1Symbol_MESSAGESTART uint8 = 0x10 @@ -58,6 +60,7 @@ type _DF1SymbolChildRequirements interface { GetSymbolType() uint8 } + type DF1SymbolParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child DF1Symbol, serializeChildFunction func() error) error GetTypeName() string @@ -65,13 +68,12 @@ type DF1SymbolParent interface { type DF1SymbolChild interface { utils.Serializable - InitializeParent(parent DF1Symbol) +InitializeParent(parent DF1Symbol ) GetParent() *DF1Symbol GetTypeName() string DF1Symbol } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for const fields. @@ -86,14 +88,15 @@ func (m *_DF1Symbol) GetMessageStart() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewDF1Symbol factory function for _DF1Symbol -func NewDF1Symbol() *_DF1Symbol { - return &_DF1Symbol{} +func NewDF1Symbol( ) *_DF1Symbol { +return &_DF1Symbol{ } } // Deprecated: use the interface for direct cast func CastDF1Symbol(structType interface{}) DF1Symbol { - if casted, ok := structType.(DF1Symbol); ok { + if casted, ok := structType.(DF1Symbol); ok { return casted } if casted, ok := structType.(*DF1Symbol); ok { @@ -106,13 +109,14 @@ func (m *_DF1Symbol) GetTypeName() string { return "DF1Symbol" } + func (m *_DF1Symbol) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Const Field (messageStart) lengthInBits += 8 // Discriminator Field (symbolType) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } @@ -152,19 +156,19 @@ func DF1SymbolParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type DF1SymbolChildSerializeRequirement interface { DF1Symbol - InitializeParent(DF1Symbol) + InitializeParent(DF1Symbol ) GetParent() DF1Symbol } var _childTemp interface{} var _child DF1SymbolChildSerializeRequirement var typeSwitchError error switch { - case symbolType == 0x02: // DF1SymbolMessageFrame - _childTemp, typeSwitchError = DF1SymbolMessageFrameParseWithBuffer(ctx, readBuffer) - case symbolType == 0x06: // DF1SymbolMessageFrameACK - _childTemp, typeSwitchError = DF1SymbolMessageFrameACKParseWithBuffer(ctx, readBuffer) - case symbolType == 0x15: // DF1SymbolMessageFrameNAK - _childTemp, typeSwitchError = DF1SymbolMessageFrameNAKParseWithBuffer(ctx, readBuffer) +case symbolType == 0x02 : // DF1SymbolMessageFrame + _childTemp, typeSwitchError = DF1SymbolMessageFrameParseWithBuffer(ctx, readBuffer, ) +case symbolType == 0x06 : // DF1SymbolMessageFrameACK + _childTemp, typeSwitchError = DF1SymbolMessageFrameACKParseWithBuffer(ctx, readBuffer, ) +case symbolType == 0x15 : // DF1SymbolMessageFrameNAK + _childTemp, typeSwitchError = DF1SymbolMessageFrameNAKParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [symbolType=%v]", symbolType) } @@ -178,7 +182,7 @@ func DF1SymbolParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) } // Finish initializing - _child.InitializeParent(_child) +_child.InitializeParent(_child ) return _child, nil } @@ -188,7 +192,7 @@ func (pm *_DF1Symbol) SerializeParent(ctx context.Context, writeBuffer utils.Wri _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("DF1Symbol"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("DF1Symbol"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for DF1Symbol") } @@ -217,6 +221,7 @@ func (pm *_DF1Symbol) SerializeParent(ctx context.Context, writeBuffer utils.Wri return nil } + func (m *_DF1Symbol) isDF1Symbol() bool { return true } @@ -231,3 +236,6 @@ func (m *_DF1Symbol) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/df1/readwrite/model/DF1SymbolMessageFrame.go b/plc4go/protocols/df1/readwrite/model/DF1SymbolMessageFrame.go index 24c8d34085d..9665ad67e48 100644 --- a/plc4go/protocols/df1/readwrite/model/DF1SymbolMessageFrame.go +++ b/plc4go/protocols/df1/readwrite/model/DF1SymbolMessageFrame.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -27,7 +28,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const DF1SymbolMessageFrame_MESSAGEEND uint8 = 0x10 @@ -56,31 +58,31 @@ type DF1SymbolMessageFrameExactly interface { // _DF1SymbolMessageFrame is the data-structure of this message type _DF1SymbolMessageFrame struct { *_DF1Symbol - DestinationAddress uint8 - SourceAddress uint8 - Command DF1Command + DestinationAddress uint8 + SourceAddress uint8 + Command DF1Command } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_DF1SymbolMessageFrame) GetSymbolType() uint8 { - return 0x02 -} +func (m *_DF1SymbolMessageFrame) GetSymbolType() uint8 { +return 0x02} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_DF1SymbolMessageFrame) InitializeParent(parent DF1Symbol) {} +func (m *_DF1SymbolMessageFrame) InitializeParent(parent DF1Symbol ) {} -func (m *_DF1SymbolMessageFrame) GetParent() DF1Symbol { +func (m *_DF1SymbolMessageFrame) GetParent() DF1Symbol { return m._DF1Symbol } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -120,13 +122,14 @@ func (m *_DF1SymbolMessageFrame) GetEndTransaction() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewDF1SymbolMessageFrame factory function for _DF1SymbolMessageFrame -func NewDF1SymbolMessageFrame(destinationAddress uint8, sourceAddress uint8, command DF1Command) *_DF1SymbolMessageFrame { +func NewDF1SymbolMessageFrame( destinationAddress uint8 , sourceAddress uint8 , command DF1Command ) *_DF1SymbolMessageFrame { _result := &_DF1SymbolMessageFrame{ DestinationAddress: destinationAddress, - SourceAddress: sourceAddress, - Command: command, - _DF1Symbol: NewDF1Symbol(), + SourceAddress: sourceAddress, + Command: command, + _DF1Symbol: NewDF1Symbol(), } _result._DF1Symbol._DF1SymbolChildRequirements = _result return _result @@ -134,7 +137,7 @@ func NewDF1SymbolMessageFrame(destinationAddress uint8, sourceAddress uint8, com // Deprecated: use the interface for direct cast func CastDF1SymbolMessageFrame(structType interface{}) DF1SymbolMessageFrame { - if casted, ok := structType.(DF1SymbolMessageFrame); ok { + if casted, ok := structType.(DF1SymbolMessageFrame); ok { return casted } if casted, ok := structType.(*DF1SymbolMessageFrame); ok { @@ -151,10 +154,10 @@ func (m *_DF1SymbolMessageFrame) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (destinationAddress) - lengthInBits += 8 + lengthInBits += 8; // Simple field (sourceAddress) - lengthInBits += 8 + lengthInBits += 8; // Simple field (command) lengthInBits += m.Command.GetLengthInBits(ctx) @@ -171,6 +174,7 @@ func (m *_DF1SymbolMessageFrame) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_DF1SymbolMessageFrame) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -189,14 +193,14 @@ func DF1SymbolMessageFrameParseWithBuffer(ctx context.Context, readBuffer utils. _ = currentPos // Simple Field (destinationAddress) - _destinationAddress, _destinationAddressErr := readBuffer.ReadUint8("destinationAddress", 8) +_destinationAddress, _destinationAddressErr := readBuffer.ReadUint8("destinationAddress", 8) if _destinationAddressErr != nil { return nil, errors.Wrap(_destinationAddressErr, "Error parsing 'destinationAddress' field of DF1SymbolMessageFrame") } destinationAddress := _destinationAddress // Simple Field (sourceAddress) - _sourceAddress, _sourceAddressErr := readBuffer.ReadUint8("sourceAddress", 8) +_sourceAddress, _sourceAddressErr := readBuffer.ReadUint8("sourceAddress", 8) if _sourceAddressErr != nil { return nil, errors.Wrap(_sourceAddressErr, "Error parsing 'sourceAddress' field of DF1SymbolMessageFrame") } @@ -206,7 +210,7 @@ func DF1SymbolMessageFrameParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("command"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for command") } - _command, _commandErr := DF1CommandParseWithBuffer(ctx, readBuffer) +_command, _commandErr := DF1CommandParseWithBuffer(ctx, readBuffer) if _commandErr != nil { return nil, errors.Wrap(_commandErr, "Error parsing 'command' field of DF1SymbolMessageFrame") } @@ -239,7 +243,7 @@ func DF1SymbolMessageFrameParseWithBuffer(ctx context.Context, readBuffer utils. if _checksumRefErr != nil { return nil, errors.Wrap(_checksumRefErr, "Error parsing 'checksum' field of DF1SymbolMessageFrame") } - checksum, _checksumErr := CrcCheck(destinationAddress, sourceAddress, command) + checksum, _checksumErr:= CrcCheck(destinationAddress, sourceAddress, command) if _checksumErr != nil { return nil, errors.Wrap(_checksumErr, "Checksum verification failed") } @@ -254,10 +258,11 @@ func DF1SymbolMessageFrameParseWithBuffer(ctx context.Context, readBuffer utils. // Create a partially initialized instance _child := &_DF1SymbolMessageFrame{ - _DF1Symbol: &_DF1Symbol{}, + _DF1Symbol: &_DF1Symbol{ + }, DestinationAddress: destinationAddress, - SourceAddress: sourceAddress, - Command: command, + SourceAddress: sourceAddress, + Command: command, } _child._DF1Symbol._DF1SymbolChildRequirements = _child return _child, nil @@ -279,55 +284,55 @@ func (m *_DF1SymbolMessageFrame) SerializeWithWriteBuffer(ctx context.Context, w return errors.Wrap(pushErr, "Error pushing for DF1SymbolMessageFrame") } - // Simple Field (destinationAddress) - destinationAddress := uint8(m.GetDestinationAddress()) - _destinationAddressErr := writeBuffer.WriteUint8("destinationAddress", 8, (destinationAddress)) - if _destinationAddressErr != nil { - return errors.Wrap(_destinationAddressErr, "Error serializing 'destinationAddress' field") - } + // Simple Field (destinationAddress) + destinationAddress := uint8(m.GetDestinationAddress()) + _destinationAddressErr := writeBuffer.WriteUint8("destinationAddress", 8, (destinationAddress)) + if _destinationAddressErr != nil { + return errors.Wrap(_destinationAddressErr, "Error serializing 'destinationAddress' field") + } - // Simple Field (sourceAddress) - sourceAddress := uint8(m.GetSourceAddress()) - _sourceAddressErr := writeBuffer.WriteUint8("sourceAddress", 8, (sourceAddress)) - if _sourceAddressErr != nil { - return errors.Wrap(_sourceAddressErr, "Error serializing 'sourceAddress' field") - } + // Simple Field (sourceAddress) + sourceAddress := uint8(m.GetSourceAddress()) + _sourceAddressErr := writeBuffer.WriteUint8("sourceAddress", 8, (sourceAddress)) + if _sourceAddressErr != nil { + return errors.Wrap(_sourceAddressErr, "Error serializing 'sourceAddress' field") + } - // Simple Field (command) - if pushErr := writeBuffer.PushContext("command"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for command") - } - _commandErr := writeBuffer.WriteSerializable(ctx, m.GetCommand()) - if popErr := writeBuffer.PopContext("command"); popErr != nil { - return errors.Wrap(popErr, "Error popping for command") - } - if _commandErr != nil { - return errors.Wrap(_commandErr, "Error serializing 'command' field") - } + // Simple Field (command) + if pushErr := writeBuffer.PushContext("command"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for command") + } + _commandErr := writeBuffer.WriteSerializable(ctx, m.GetCommand()) + if popErr := writeBuffer.PopContext("command"); popErr != nil { + return errors.Wrap(popErr, "Error popping for command") + } + if _commandErr != nil { + return errors.Wrap(_commandErr, "Error serializing 'command' field") + } - // Const Field (messageEnd) - _messageEndErr := writeBuffer.WriteUint8("messageEnd", 8, 0x10) - if _messageEndErr != nil { - return errors.Wrap(_messageEndErr, "Error serializing 'messageEnd' field") - } + // Const Field (messageEnd) + _messageEndErr := writeBuffer.WriteUint8("messageEnd", 8, 0x10) + if _messageEndErr != nil { + return errors.Wrap(_messageEndErr, "Error serializing 'messageEnd' field") + } - // Const Field (endTransaction) - _endTransactionErr := writeBuffer.WriteUint8("endTransaction", 8, 0x03) - if _endTransactionErr != nil { - return errors.Wrap(_endTransactionErr, "Error serializing 'endTransaction' field") - } + // Const Field (endTransaction) + _endTransactionErr := writeBuffer.WriteUint8("endTransaction", 8, 0x03) + if _endTransactionErr != nil { + return errors.Wrap(_endTransactionErr, "Error serializing 'endTransaction' field") + } - // Checksum Field (checksum) (Calculated) - { - _checksum, _checksumErr := CrcCheck(m.GetDestinationAddress(), m.GetSourceAddress(), m.GetCommand()) - if _checksumErr != nil { - return errors.Wrap(_checksumErr, "Checksum calculation failed") - } - _checksumWriteErr := writeBuffer.WriteUint16("checksum", 16, (_checksum)) - if _checksumWriteErr != nil { - return errors.Wrap(_checksumWriteErr, "Error serializing 'checksum' field") - } + // Checksum Field (checksum) (Calculated) + { + _checksum, _checksumErr := CrcCheck(m.GetDestinationAddress(), m.GetSourceAddress(), m.GetCommand()) + if _checksumErr != nil { + return errors.Wrap(_checksumErr, "Checksum calculation failed") + } + _checksumWriteErr := writeBuffer.WriteUint16("checksum", 16, (_checksum)) + if _checksumWriteErr != nil { + return errors.Wrap(_checksumWriteErr, "Error serializing 'checksum' field") } + } if popErr := writeBuffer.PopContext("DF1SymbolMessageFrame"); popErr != nil { return errors.Wrap(popErr, "Error popping for DF1SymbolMessageFrame") @@ -337,6 +342,7 @@ func (m *_DF1SymbolMessageFrame) SerializeWithWriteBuffer(ctx context.Context, w return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_DF1SymbolMessageFrame) isDF1SymbolMessageFrame() bool { return true } @@ -351,3 +357,6 @@ func (m *_DF1SymbolMessageFrame) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/df1/readwrite/model/DF1SymbolMessageFrameACK.go b/plc4go/protocols/df1/readwrite/model/DF1SymbolMessageFrameACK.go index 571c579b05d..38966b74d7c 100644 --- a/plc4go/protocols/df1/readwrite/model/DF1SymbolMessageFrameACK.go +++ b/plc4go/protocols/df1/readwrite/model/DF1SymbolMessageFrameACK.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // DF1SymbolMessageFrameACK is the corresponding interface of DF1SymbolMessageFrameACK type DF1SymbolMessageFrameACK interface { @@ -47,30 +49,32 @@ type _DF1SymbolMessageFrameACK struct { *_DF1Symbol } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_DF1SymbolMessageFrameACK) GetSymbolType() uint8 { - return 0x06 -} +func (m *_DF1SymbolMessageFrameACK) GetSymbolType() uint8 { +return 0x06} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_DF1SymbolMessageFrameACK) InitializeParent(parent DF1Symbol) {} +func (m *_DF1SymbolMessageFrameACK) InitializeParent(parent DF1Symbol ) {} -func (m *_DF1SymbolMessageFrameACK) GetParent() DF1Symbol { +func (m *_DF1SymbolMessageFrameACK) GetParent() DF1Symbol { return m._DF1Symbol } + // NewDF1SymbolMessageFrameACK factory function for _DF1SymbolMessageFrameACK -func NewDF1SymbolMessageFrameACK() *_DF1SymbolMessageFrameACK { +func NewDF1SymbolMessageFrameACK( ) *_DF1SymbolMessageFrameACK { _result := &_DF1SymbolMessageFrameACK{ - _DF1Symbol: NewDF1Symbol(), + _DF1Symbol: NewDF1Symbol(), } _result._DF1Symbol._DF1SymbolChildRequirements = _result return _result @@ -78,7 +82,7 @@ func NewDF1SymbolMessageFrameACK() *_DF1SymbolMessageFrameACK { // Deprecated: use the interface for direct cast func CastDF1SymbolMessageFrameACK(structType interface{}) DF1SymbolMessageFrameACK { - if casted, ok := structType.(DF1SymbolMessageFrameACK); ok { + if casted, ok := structType.(DF1SymbolMessageFrameACK); ok { return casted } if casted, ok := structType.(*DF1SymbolMessageFrameACK); ok { @@ -97,6 +101,7 @@ func (m *_DF1SymbolMessageFrameACK) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_DF1SymbolMessageFrameACK) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -120,7 +125,8 @@ func DF1SymbolMessageFrameACKParseWithBuffer(ctx context.Context, readBuffer uti // Create a partially initialized instance _child := &_DF1SymbolMessageFrameACK{ - _DF1Symbol: &_DF1Symbol{}, + _DF1Symbol: &_DF1Symbol{ + }, } _child._DF1Symbol._DF1SymbolChildRequirements = _child return _child, nil @@ -150,6 +156,7 @@ func (m *_DF1SymbolMessageFrameACK) SerializeWithWriteBuffer(ctx context.Context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_DF1SymbolMessageFrameACK) isDF1SymbolMessageFrameACK() bool { return true } @@ -164,3 +171,6 @@ func (m *_DF1SymbolMessageFrameACK) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/df1/readwrite/model/DF1SymbolMessageFrameNAK.go b/plc4go/protocols/df1/readwrite/model/DF1SymbolMessageFrameNAK.go index 50d7c39795d..d8921d45aaa 100644 --- a/plc4go/protocols/df1/readwrite/model/DF1SymbolMessageFrameNAK.go +++ b/plc4go/protocols/df1/readwrite/model/DF1SymbolMessageFrameNAK.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // DF1SymbolMessageFrameNAK is the corresponding interface of DF1SymbolMessageFrameNAK type DF1SymbolMessageFrameNAK interface { @@ -47,30 +49,32 @@ type _DF1SymbolMessageFrameNAK struct { *_DF1Symbol } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_DF1SymbolMessageFrameNAK) GetSymbolType() uint8 { - return 0x15 -} +func (m *_DF1SymbolMessageFrameNAK) GetSymbolType() uint8 { +return 0x15} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_DF1SymbolMessageFrameNAK) InitializeParent(parent DF1Symbol) {} +func (m *_DF1SymbolMessageFrameNAK) InitializeParent(parent DF1Symbol ) {} -func (m *_DF1SymbolMessageFrameNAK) GetParent() DF1Symbol { +func (m *_DF1SymbolMessageFrameNAK) GetParent() DF1Symbol { return m._DF1Symbol } + // NewDF1SymbolMessageFrameNAK factory function for _DF1SymbolMessageFrameNAK -func NewDF1SymbolMessageFrameNAK() *_DF1SymbolMessageFrameNAK { +func NewDF1SymbolMessageFrameNAK( ) *_DF1SymbolMessageFrameNAK { _result := &_DF1SymbolMessageFrameNAK{ - _DF1Symbol: NewDF1Symbol(), + _DF1Symbol: NewDF1Symbol(), } _result._DF1Symbol._DF1SymbolChildRequirements = _result return _result @@ -78,7 +82,7 @@ func NewDF1SymbolMessageFrameNAK() *_DF1SymbolMessageFrameNAK { // Deprecated: use the interface for direct cast func CastDF1SymbolMessageFrameNAK(structType interface{}) DF1SymbolMessageFrameNAK { - if casted, ok := structType.(DF1SymbolMessageFrameNAK); ok { + if casted, ok := structType.(DF1SymbolMessageFrameNAK); ok { return casted } if casted, ok := structType.(*DF1SymbolMessageFrameNAK); ok { @@ -97,6 +101,7 @@ func (m *_DF1SymbolMessageFrameNAK) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_DF1SymbolMessageFrameNAK) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -120,7 +125,8 @@ func DF1SymbolMessageFrameNAKParseWithBuffer(ctx context.Context, readBuffer uti // Create a partially initialized instance _child := &_DF1SymbolMessageFrameNAK{ - _DF1Symbol: &_DF1Symbol{}, + _DF1Symbol: &_DF1Symbol{ + }, } _child._DF1Symbol._DF1SymbolChildRequirements = _child return _child, nil @@ -150,6 +156,7 @@ func (m *_DF1SymbolMessageFrameNAK) SerializeWithWriteBuffer(ctx context.Context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_DF1SymbolMessageFrameNAK) isDF1SymbolMessageFrameNAK() bool { return true } @@ -164,3 +171,6 @@ func (m *_DF1SymbolMessageFrameNAK) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/df1/readwrite/model/DF1UnprotectedReadRequest.go b/plc4go/protocols/df1/readwrite/model/DF1UnprotectedReadRequest.go index 7e7b69718cb..60954fc762b 100644 --- a/plc4go/protocols/df1/readwrite/model/DF1UnprotectedReadRequest.go +++ b/plc4go/protocols/df1/readwrite/model/DF1UnprotectedReadRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // DF1UnprotectedReadRequest is the corresponding interface of DF1UnprotectedReadRequest type DF1UnprotectedReadRequest interface { @@ -48,33 +50,32 @@ type DF1UnprotectedReadRequestExactly interface { // _DF1UnprotectedReadRequest is the data-structure of this message type _DF1UnprotectedReadRequest struct { *_DF1Command - Address uint16 - Size uint8 + Address uint16 + Size uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_DF1UnprotectedReadRequest) GetCommandCode() uint8 { - return 0x01 -} +func (m *_DF1UnprotectedReadRequest) GetCommandCode() uint8 { +return 0x01} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_DF1UnprotectedReadRequest) InitializeParent(parent DF1Command, status uint8, transactionCounter uint16) { - m.Status = status +func (m *_DF1UnprotectedReadRequest) InitializeParent(parent DF1Command , status uint8 , transactionCounter uint16 ) { m.Status = status m.TransactionCounter = transactionCounter } -func (m *_DF1UnprotectedReadRequest) GetParent() DF1Command { +func (m *_DF1UnprotectedReadRequest) GetParent() DF1Command { return m._DF1Command } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -93,12 +94,13 @@ func (m *_DF1UnprotectedReadRequest) GetSize() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewDF1UnprotectedReadRequest factory function for _DF1UnprotectedReadRequest -func NewDF1UnprotectedReadRequest(address uint16, size uint8, status uint8, transactionCounter uint16) *_DF1UnprotectedReadRequest { +func NewDF1UnprotectedReadRequest( address uint16 , size uint8 , status uint8 , transactionCounter uint16 ) *_DF1UnprotectedReadRequest { _result := &_DF1UnprotectedReadRequest{ - Address: address, - Size: size, - _DF1Command: NewDF1Command(status, transactionCounter), + Address: address, + Size: size, + _DF1Command: NewDF1Command(status, transactionCounter), } _result._DF1Command._DF1CommandChildRequirements = _result return _result @@ -106,7 +108,7 @@ func NewDF1UnprotectedReadRequest(address uint16, size uint8, status uint8, tran // Deprecated: use the interface for direct cast func CastDF1UnprotectedReadRequest(structType interface{}) DF1UnprotectedReadRequest { - if casted, ok := structType.(DF1UnprotectedReadRequest); ok { + if casted, ok := structType.(DF1UnprotectedReadRequest); ok { return casted } if casted, ok := structType.(*DF1UnprotectedReadRequest); ok { @@ -123,14 +125,15 @@ func (m *_DF1UnprotectedReadRequest) GetLengthInBits(ctx context.Context) uint16 lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (address) - lengthInBits += 16 + lengthInBits += 16; // Simple field (size) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_DF1UnprotectedReadRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -149,14 +152,14 @@ func DF1UnprotectedReadRequestParseWithBuffer(ctx context.Context, readBuffer ut _ = currentPos // Simple Field (address) - _address, _addressErr := readBuffer.ReadUint16("address", 16) +_address, _addressErr := readBuffer.ReadUint16("address", 16) if _addressErr != nil { return nil, errors.Wrap(_addressErr, "Error parsing 'address' field of DF1UnprotectedReadRequest") } address := _address // Simple Field (size) - _size, _sizeErr := readBuffer.ReadUint8("size", 8) +_size, _sizeErr := readBuffer.ReadUint8("size", 8) if _sizeErr != nil { return nil, errors.Wrap(_sizeErr, "Error parsing 'size' field of DF1UnprotectedReadRequest") } @@ -168,9 +171,10 @@ func DF1UnprotectedReadRequestParseWithBuffer(ctx context.Context, readBuffer ut // Create a partially initialized instance _child := &_DF1UnprotectedReadRequest{ - _DF1Command: &_DF1Command{}, - Address: address, - Size: size, + _DF1Command: &_DF1Command{ + }, + Address: address, + Size: size, } _child._DF1Command._DF1CommandChildRequirements = _child return _child, nil @@ -192,19 +196,19 @@ func (m *_DF1UnprotectedReadRequest) SerializeWithWriteBuffer(ctx context.Contex return errors.Wrap(pushErr, "Error pushing for DF1UnprotectedReadRequest") } - // Simple Field (address) - address := uint16(m.GetAddress()) - _addressErr := writeBuffer.WriteUint16("address", 16, (address)) - if _addressErr != nil { - return errors.Wrap(_addressErr, "Error serializing 'address' field") - } + // Simple Field (address) + address := uint16(m.GetAddress()) + _addressErr := writeBuffer.WriteUint16("address", 16, (address)) + if _addressErr != nil { + return errors.Wrap(_addressErr, "Error serializing 'address' field") + } - // Simple Field (size) - size := uint8(m.GetSize()) - _sizeErr := writeBuffer.WriteUint8("size", 8, (size)) - if _sizeErr != nil { - return errors.Wrap(_sizeErr, "Error serializing 'size' field") - } + // Simple Field (size) + size := uint8(m.GetSize()) + _sizeErr := writeBuffer.WriteUint8("size", 8, (size)) + if _sizeErr != nil { + return errors.Wrap(_sizeErr, "Error serializing 'size' field") + } if popErr := writeBuffer.PopContext("DF1UnprotectedReadRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for DF1UnprotectedReadRequest") @@ -214,6 +218,7 @@ func (m *_DF1UnprotectedReadRequest) SerializeWithWriteBuffer(ctx context.Contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_DF1UnprotectedReadRequest) isDF1UnprotectedReadRequest() bool { return true } @@ -228,3 +233,6 @@ func (m *_DF1UnprotectedReadRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/df1/readwrite/model/DF1UnprotectedReadResponse.go b/plc4go/protocols/df1/readwrite/model/DF1UnprotectedReadResponse.go index f6626b96f83..79b5dfad159 100644 --- a/plc4go/protocols/df1/readwrite/model/DF1UnprotectedReadResponse.go +++ b/plc4go/protocols/df1/readwrite/model/DF1UnprotectedReadResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // DF1UnprotectedReadResponse is the corresponding interface of DF1UnprotectedReadResponse type DF1UnprotectedReadResponse interface { @@ -46,32 +48,31 @@ type DF1UnprotectedReadResponseExactly interface { // _DF1UnprotectedReadResponse is the data-structure of this message type _DF1UnprotectedReadResponse struct { *_DF1Command - Data []byte + Data []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_DF1UnprotectedReadResponse) GetCommandCode() uint8 { - return 0x41 -} +func (m *_DF1UnprotectedReadResponse) GetCommandCode() uint8 { +return 0x41} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_DF1UnprotectedReadResponse) InitializeParent(parent DF1Command, status uint8, transactionCounter uint16) { - m.Status = status +func (m *_DF1UnprotectedReadResponse) InitializeParent(parent DF1Command , status uint8 , transactionCounter uint16 ) { m.Status = status m.TransactionCounter = transactionCounter } -func (m *_DF1UnprotectedReadResponse) GetParent() DF1Command { +func (m *_DF1UnprotectedReadResponse) GetParent() DF1Command { return m._DF1Command } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -86,11 +87,12 @@ func (m *_DF1UnprotectedReadResponse) GetData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewDF1UnprotectedReadResponse factory function for _DF1UnprotectedReadResponse -func NewDF1UnprotectedReadResponse(data []byte, status uint8, transactionCounter uint16) *_DF1UnprotectedReadResponse { +func NewDF1UnprotectedReadResponse( data []byte , status uint8 , transactionCounter uint16 ) *_DF1UnprotectedReadResponse { _result := &_DF1UnprotectedReadResponse{ - Data: data, - _DF1Command: NewDF1Command(status, transactionCounter), + Data: data, + _DF1Command: NewDF1Command(status, transactionCounter), } _result._DF1Command._DF1CommandChildRequirements = _result return _result @@ -98,7 +100,7 @@ func NewDF1UnprotectedReadResponse(data []byte, status uint8, transactionCounter // Deprecated: use the interface for direct cast func CastDF1UnprotectedReadResponse(structType interface{}) DF1UnprotectedReadResponse { - if casted, ok := structType.(DF1UnprotectedReadResponse); ok { + if casted, ok := structType.(DF1UnprotectedReadResponse); ok { return casted } if casted, ok := structType.(*DF1UnprotectedReadResponse); ok { @@ -120,6 +122,7 @@ func (m *_DF1UnprotectedReadResponse) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_DF1UnprotectedReadResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -145,8 +148,8 @@ func DF1UnprotectedReadResponseParseWithBuffer(ctx context.Context, readBuffer u { _values := &_dataList _ = _values - for !((bool)(DataTerminate(readBuffer))) { - _dataList = append(_dataList, ((byte)(ReadData(readBuffer)))) + for ;!((bool) (DataTerminate(readBuffer))); { + _dataList = append(_dataList, ((byte) (ReadData(readBuffer)))) } } @@ -161,8 +164,9 @@ func DF1UnprotectedReadResponseParseWithBuffer(ctx context.Context, readBuffer u // Create a partially initialized instance _child := &_DF1UnprotectedReadResponse{ - _DF1Command: &_DF1Command{}, - Data: data, + _DF1Command: &_DF1Command{ + }, + Data: data, } _child._DF1Command._DF1CommandChildRequirements = _child return _child, nil @@ -184,16 +188,16 @@ func (m *_DF1UnprotectedReadResponse) SerializeWithWriteBuffer(ctx context.Conte return errors.Wrap(pushErr, "Error pushing for DF1UnprotectedReadResponse") } - // Manual Array Field (data) - if pushErr := writeBuffer.PushContext("data", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for data") - } - for _, m := range m.GetData() { + // Manual Array Field (data) + if pushErr := writeBuffer.PushContext("data", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for data") + } + for _, m := range m.GetData() { WriteData(writeBuffer, m) - } - if popErr := writeBuffer.PopContext("data", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for data") - } + } + if popErr := writeBuffer.PopContext("data", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for data") + } if popErr := writeBuffer.PopContext("DF1UnprotectedReadResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for DF1UnprotectedReadResponse") @@ -203,6 +207,7 @@ func (m *_DF1UnprotectedReadResponse) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_DF1UnprotectedReadResponse) isDF1UnprotectedReadResponse() bool { return true } @@ -217,3 +222,6 @@ func (m *_DF1UnprotectedReadResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/df1/readwrite/model/plc4x_common.go b/plc4go/protocols/df1/readwrite/model/plc4x_common.go index d2d66e8bdd3..42166d94e68 100644 --- a/plc4go/protocols/df1/readwrite/model/plc4x_common.go +++ b/plc4go/protocols/df1/readwrite/model/plc4x_common.go @@ -15,7 +15,7 @@ * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - */ +*/ package model @@ -25,3 +25,4 @@ import "github.com/rs/zerolog/log" // Plc4xModelLog is the Logger used by the Parse/Serialize methods var Plc4xModelLog = &log.Logger + diff --git a/plc4go/protocols/eip/readwrite/XmlParserHelper.go b/plc4go/protocols/eip/readwrite/XmlParserHelper.go index a78568d7cfe..0e354e671ae 100644 --- a/plc4go/protocols/eip/readwrite/XmlParserHelper.go +++ b/plc4go/protocols/eip/readwrite/XmlParserHelper.go @@ -21,8 +21,8 @@ package readwrite import ( "context" - "strconv" "strings" + "strconv" "github.com/apache/plc4x/plc4go/protocols/eip/readwrite/model" "github.com/apache/plc4x/plc4go/spi/utils" @@ -43,30 +43,30 @@ func init() { } func (m EipXmlParserHelper) Parse(typeName string, xmlString string, parserArguments ...string) (interface{}, error) { - switch typeName { - case "CipService": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 16) - if err != nil { - return nil, err - } - serviceLen := uint16(parsedUint0) - return model.CipServiceParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), serviceLen) - case "EipPacket": - return model.EipPacketParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "Services": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 16) - if err != nil { - return nil, err - } - servicesLen := uint16(parsedUint0) - return model.ServicesParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), servicesLen) - case "CipExchange": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 16) - if err != nil { - return nil, err - } - exchangeLen := uint16(parsedUint0) - return model.CipExchangeParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), exchangeLen) - } - return nil, errors.Errorf("Unsupported type %s", typeName) + switch typeName { + case "CipService": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 16) + if err!=nil { + return nil, err + } + serviceLen := uint16(parsedUint0) + return model.CipServiceParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), serviceLen ) + case "EipPacket": + return model.EipPacketParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "Services": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 16) + if err!=nil { + return nil, err + } + servicesLen := uint16(parsedUint0) + return model.ServicesParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), servicesLen ) + case "CipExchange": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 16) + if err!=nil { + return nil, err + } + exchangeLen := uint16(parsedUint0) + return model.CipExchangeParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), exchangeLen ) + } + return nil, errors.Errorf("Unsupported type %s", typeName) } diff --git a/plc4go/protocols/eip/readwrite/model/CIPDataTypeCode.go b/plc4go/protocols/eip/readwrite/model/CIPDataTypeCode.go index d583bfc35a0..c8b2396bf72 100644 --- a/plc4go/protocols/eip/readwrite/model/CIPDataTypeCode.go +++ b/plc4go/protocols/eip/readwrite/model/CIPDataTypeCode.go @@ -35,23 +35,23 @@ type ICIPDataTypeCode interface { Size() uint8 } -const ( - CIPDataTypeCode_BOOL CIPDataTypeCode = 0x00C1 - CIPDataTypeCode_SINT CIPDataTypeCode = 0x00C2 - CIPDataTypeCode_INT CIPDataTypeCode = 0x00C3 - CIPDataTypeCode_DINT CIPDataTypeCode = 0x00C4 - CIPDataTypeCode_LINT CIPDataTypeCode = 0x00C5 - CIPDataTypeCode_REAL CIPDataTypeCode = 0x00CA - CIPDataTypeCode_DWORD CIPDataTypeCode = 0x00D3 - CIPDataTypeCode_Struct CIPDataTypeCode = 0x02A0 - CIPDataTypeCode_STRING CIPDataTypeCode = 0x02A0 +const( + CIPDataTypeCode_BOOL CIPDataTypeCode = 0X00C1 + CIPDataTypeCode_SINT CIPDataTypeCode = 0X00C2 + CIPDataTypeCode_INT CIPDataTypeCode = 0X00C3 + CIPDataTypeCode_DINT CIPDataTypeCode = 0X00C4 + CIPDataTypeCode_LINT CIPDataTypeCode = 0X00C5 + CIPDataTypeCode_REAL CIPDataTypeCode = 0X00CA + CIPDataTypeCode_DWORD CIPDataTypeCode = 0X00D3 + CIPDataTypeCode_Struct CIPDataTypeCode = 0X02A0 + CIPDataTypeCode_STRING CIPDataTypeCode = 0X02A0 ) var CIPDataTypeCodeValues []CIPDataTypeCode func init() { _ = errors.New - CIPDataTypeCodeValues = []CIPDataTypeCode{ + CIPDataTypeCodeValues = []CIPDataTypeCode { CIPDataTypeCode_BOOL, CIPDataTypeCode_SINT, CIPDataTypeCode_INT, @@ -64,42 +64,34 @@ func init() { } } + func (e CIPDataTypeCode) Size() uint8 { - switch e { - case 0x00C1: - { /* '0X00C1' */ - return 1 + switch e { + case 0X00C1: { /* '0X00C1' */ + return 1 } - case 0x00C2: - { /* '0X00C2' */ - return 1 + case 0X00C2: { /* '0X00C2' */ + return 1 } - case 0x00C3: - { /* '0X00C3' */ - return 2 + case 0X00C3: { /* '0X00C3' */ + return 2 } - case 0x00C4: - { /* '0X00C4' */ - return 4 + case 0X00C4: { /* '0X00C4' */ + return 4 } - case 0x00C5: - { /* '0X00C5' */ - return 8 + case 0X00C5: { /* '0X00C5' */ + return 8 } - case 0x00CA: - { /* '0X00CA' */ - return 4 + case 0X00CA: { /* '0X00CA' */ + return 4 } - case 0x00D3: - { /* '0X00D3' */ - return 4 + case 0X00D3: { /* '0X00D3' */ + return 4 } - case 0x02A0: - { /* '0X02A0' */ - return 88 + case 0X02A0: { /* '0X02A0' */ + return 88 } - default: - { + default: { return 0 } } @@ -115,22 +107,22 @@ func CIPDataTypeCodeFirstEnumForFieldSize(value uint8) (CIPDataTypeCode, error) } func CIPDataTypeCodeByValue(value uint16) (enum CIPDataTypeCode, ok bool) { switch value { - case 0x00C1: - return CIPDataTypeCode_BOOL, true - case 0x00C2: - return CIPDataTypeCode_SINT, true - case 0x00C3: - return CIPDataTypeCode_INT, true - case 0x00C4: - return CIPDataTypeCode_DINT, true - case 0x00C5: - return CIPDataTypeCode_LINT, true - case 0x00CA: - return CIPDataTypeCode_REAL, true - case 0x00D3: - return CIPDataTypeCode_DWORD, true - case 0x02A0: - return CIPDataTypeCode_Struct, true + case 0X00C1: + return CIPDataTypeCode_BOOL, true + case 0X00C2: + return CIPDataTypeCode_SINT, true + case 0X00C3: + return CIPDataTypeCode_INT, true + case 0X00C4: + return CIPDataTypeCode_DINT, true + case 0X00C5: + return CIPDataTypeCode_LINT, true + case 0X00CA: + return CIPDataTypeCode_REAL, true + case 0X00D3: + return CIPDataTypeCode_DWORD, true + case 0X02A0: + return CIPDataTypeCode_Struct, true } return 0, false } @@ -157,13 +149,13 @@ func CIPDataTypeCodeByName(value string) (enum CIPDataTypeCode, ok bool) { return 0, false } -func CIPDataTypeCodeKnows(value uint16) bool { +func CIPDataTypeCodeKnows(value uint16) bool { for _, typeValue := range CIPDataTypeCodeValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastCIPDataTypeCode(structType interface{}) CIPDataTypeCode { @@ -239,3 +231,4 @@ func (e CIPDataTypeCode) PLC4XEnumName() string { func (e CIPDataTypeCode) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/eip/readwrite/model/CIPStructTypeCode.go b/plc4go/protocols/eip/readwrite/model/CIPStructTypeCode.go index 3bbd12409a1..055a1f38eb5 100644 --- a/plc4go/protocols/eip/readwrite/model/CIPStructTypeCode.go +++ b/plc4go/protocols/eip/readwrite/model/CIPStructTypeCode.go @@ -34,7 +34,7 @@ type ICIPStructTypeCode interface { utils.Serializable } -const ( +const( CIPStructTypeCode_STRING CIPStructTypeCode = 0x0FCE ) @@ -42,15 +42,15 @@ var CIPStructTypeCodeValues []CIPStructTypeCode func init() { _ = errors.New - CIPStructTypeCodeValues = []CIPStructTypeCode{ + CIPStructTypeCodeValues = []CIPStructTypeCode { CIPStructTypeCode_STRING, } } func CIPStructTypeCodeByValue(value uint16) (enum CIPStructTypeCode, ok bool) { switch value { - case 0x0FCE: - return CIPStructTypeCode_STRING, true + case 0x0FCE: + return CIPStructTypeCode_STRING, true } return 0, false } @@ -63,13 +63,13 @@ func CIPStructTypeCodeByName(value string) (enum CIPStructTypeCode, ok bool) { return 0, false } -func CIPStructTypeCodeKnows(value uint16) bool { +func CIPStructTypeCodeKnows(value uint16) bool { for _, typeValue := range CIPStructTypeCodeValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastCIPStructTypeCode(structType interface{}) CIPStructTypeCode { @@ -131,3 +131,4 @@ func (e CIPStructTypeCode) PLC4XEnumName() string { func (e CIPStructTypeCode) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/eip/readwrite/model/CipExchange.go b/plc4go/protocols/eip/readwrite/model/CipExchange.go index b6a5b6f53b6..27d16da87fa 100644 --- a/plc4go/protocols/eip/readwrite/model/CipExchange.go +++ b/plc4go/protocols/eip/readwrite/model/CipExchange.go @@ -19,6 +19,7 @@ package model + import ( "context" "fmt" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const CipExchange_ITEMCOUNT uint16 = 0x02 @@ -50,12 +52,13 @@ type CipExchangeExactly interface { // _CipExchange is the data-structure of this message type _CipExchange struct { - Service CipService + Service CipService // Arguments. ExchangeLen uint16 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -91,14 +94,15 @@ func (m *_CipExchange) GetUnconnectedData() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCipExchange factory function for _CipExchange -func NewCipExchange(service CipService, exchangeLen uint16) *_CipExchange { - return &_CipExchange{Service: service, ExchangeLen: exchangeLen} +func NewCipExchange( service CipService , exchangeLen uint16 ) *_CipExchange { +return &_CipExchange{ Service: service , ExchangeLen: exchangeLen } } // Deprecated: use the interface for direct cast func CastCipExchange(structType interface{}) CipExchange { - if casted, ok := structType.(CipExchange); ok { + if casted, ok := structType.(CipExchange); ok { return casted } if casted, ok := structType.(*CipExchange); ok { @@ -132,6 +136,7 @@ func (m *_CipExchange) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_CipExchange) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -187,7 +192,7 @@ func CipExchangeParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer if pullErr := readBuffer.PullContext("service"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for service") } - _service, _serviceErr := CipServiceParseWithBuffer(ctx, readBuffer, uint16(uint16(exchangeLen)-uint16(uint16(10)))) +_service, _serviceErr := CipServiceParseWithBuffer(ctx, readBuffer , uint16( uint16(exchangeLen) - uint16(uint16(10)) ) ) if _serviceErr != nil { return nil, errors.Wrap(_serviceErr, "Error parsing 'service' field of CipExchange") } @@ -202,9 +207,9 @@ func CipExchangeParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer // Create the instance return &_CipExchange{ - ExchangeLen: exchangeLen, - Service: service, - }, nil + ExchangeLen: exchangeLen, + Service: service, + }, nil } func (m *_CipExchange) Serialize() ([]byte, error) { @@ -218,7 +223,7 @@ func (m *_CipExchange) Serialize() ([]byte, error) { func (m *_CipExchange) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("CipExchange"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("CipExchange"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for CipExchange") } @@ -241,7 +246,7 @@ func (m *_CipExchange) SerializeWithWriteBuffer(ctx context.Context, writeBuffer } // Implicit Field (size) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - size := uint16(uint16(uint16(uint16(m.GetLengthInBytes(ctx)))-uint16(uint16(8))) - uint16(uint16(2))) + size := uint16(uint16(uint16(uint16(m.GetLengthInBytes(ctx))) - uint16(uint16(8))) - uint16(uint16(2))) _sizeErr := writeBuffer.WriteUint16("size", 16, (size)) if _sizeErr != nil { return errors.Wrap(_sizeErr, "Error serializing 'size' field") @@ -265,13 +270,13 @@ func (m *_CipExchange) SerializeWithWriteBuffer(ctx context.Context, writeBuffer return nil } + //// // Arguments Getter func (m *_CipExchange) GetExchangeLen() uint16 { return m.ExchangeLen } - // //// @@ -289,3 +294,6 @@ func (m *_CipExchange) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/eip/readwrite/model/CipRRData.go b/plc4go/protocols/eip/readwrite/model/CipRRData.go index 319dc724d65..0d54dd67bc0 100644 --- a/plc4go/protocols/eip/readwrite/model/CipRRData.go +++ b/plc4go/protocols/eip/readwrite/model/CipRRData.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CipRRData is the corresponding interface of CipRRData type CipRRData interface { @@ -47,7 +49,7 @@ type CipRRDataExactly interface { // _CipRRData is the data-structure of this message type _CipRRData struct { *_EipPacket - Exchange CipExchange + Exchange CipExchange // Arguments. PacketLength uint16 @@ -56,31 +58,30 @@ type _CipRRData struct { reservedField1 *uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_CipRRData) GetCommand() uint16 { - return 0x006F -} +func (m *_CipRRData) GetCommand() uint16 { +return 0x006F} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_CipRRData) InitializeParent(parent EipPacket, sessionHandle uint32, status uint32, senderContext []uint8, options uint32) { - m.SessionHandle = sessionHandle +func (m *_CipRRData) InitializeParent(parent EipPacket , sessionHandle uint32 , status uint32 , senderContext []uint8 , options uint32 ) { m.SessionHandle = sessionHandle m.Status = status m.SenderContext = senderContext m.Options = options } -func (m *_CipRRData) GetParent() EipPacket { +func (m *_CipRRData) GetParent() EipPacket { return m._EipPacket } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -95,11 +96,12 @@ func (m *_CipRRData) GetExchange() CipExchange { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCipRRData factory function for _CipRRData -func NewCipRRData(exchange CipExchange, sessionHandle uint32, status uint32, senderContext []uint8, options uint32, packetLength uint16) *_CipRRData { +func NewCipRRData( exchange CipExchange , sessionHandle uint32 , status uint32 , senderContext []uint8 , options uint32 , packetLength uint16 ) *_CipRRData { _result := &_CipRRData{ - Exchange: exchange, - _EipPacket: NewEipPacket(sessionHandle, status, senderContext, options), + Exchange: exchange, + _EipPacket: NewEipPacket(sessionHandle, status, senderContext, options), } _result._EipPacket._EipPacketChildRequirements = _result return _result @@ -107,7 +109,7 @@ func NewCipRRData(exchange CipExchange, sessionHandle uint32, status uint32, sen // Deprecated: use the interface for direct cast func CastCipRRData(structType interface{}) CipRRData { - if casted, ok := structType.(CipRRData); ok { + if casted, ok := structType.(CipRRData); ok { return casted } if casted, ok := structType.(*CipRRData); ok { @@ -135,6 +137,7 @@ func (m *_CipRRData) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_CipRRData) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -162,7 +165,7 @@ func CipRRDataParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, if reserved != uint32(0x00000000) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint32(0x00000000), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -179,7 +182,7 @@ func CipRRDataParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, if reserved != uint16(0x0000) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint16(0x0000), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField1 = &reserved @@ -190,7 +193,7 @@ func CipRRDataParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, if pullErr := readBuffer.PullContext("exchange"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for exchange") } - _exchange, _exchangeErr := CipExchangeParseWithBuffer(ctx, readBuffer, uint16(uint16(packetLength)-uint16(uint16(6)))) +_exchange, _exchangeErr := CipExchangeParseWithBuffer(ctx, readBuffer , uint16( uint16(packetLength) - uint16(uint16(6)) ) ) if _exchangeErr != nil { return nil, errors.Wrap(_exchangeErr, "Error parsing 'exchange' field of CipRRData") } @@ -205,8 +208,9 @@ func CipRRDataParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, // Create a partially initialized instance _child := &_CipRRData{ - _EipPacket: &_EipPacket{}, - Exchange: exchange, + _EipPacket: &_EipPacket{ + }, + Exchange: exchange, reservedField0: reservedField0, reservedField1: reservedField1, } @@ -230,49 +234,49 @@ func (m *_CipRRData) SerializeWithWriteBuffer(ctx context.Context, writeBuffer u return errors.Wrap(pushErr, "Error pushing for CipRRData") } - // Reserved Field (reserved) - { - var reserved uint32 = uint32(0x00000000) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint32(0x00000000), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteUint32("reserved", 32, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + // Reserved Field (reserved) + { + var reserved uint32 = uint32(0x00000000) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint32(0x00000000), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 } - - // Reserved Field (reserved) - { - var reserved uint16 = uint16(0x0000) - if m.reservedField1 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint16(0x0000), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField1 - } - _err := writeBuffer.WriteUint16("reserved", 16, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + _err := writeBuffer.WriteUint32("reserved", 32, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } - // Simple Field (exchange) - if pushErr := writeBuffer.PushContext("exchange"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for exchange") - } - _exchangeErr := writeBuffer.WriteSerializable(ctx, m.GetExchange()) - if popErr := writeBuffer.PopContext("exchange"); popErr != nil { - return errors.Wrap(popErr, "Error popping for exchange") + // Reserved Field (reserved) + { + var reserved uint16 = uint16(0x0000) + if m.reservedField1 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint16(0x0000), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField1 } - if _exchangeErr != nil { - return errors.Wrap(_exchangeErr, "Error serializing 'exchange' field") + _err := writeBuffer.WriteUint16("reserved", 16, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } + + // Simple Field (exchange) + if pushErr := writeBuffer.PushContext("exchange"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for exchange") + } + _exchangeErr := writeBuffer.WriteSerializable(ctx, m.GetExchange()) + if popErr := writeBuffer.PopContext("exchange"); popErr != nil { + return errors.Wrap(popErr, "Error popping for exchange") + } + if _exchangeErr != nil { + return errors.Wrap(_exchangeErr, "Error serializing 'exchange' field") + } if popErr := writeBuffer.PopContext("CipRRData"); popErr != nil { return errors.Wrap(popErr, "Error popping for CipRRData") @@ -282,13 +286,13 @@ func (m *_CipRRData) SerializeWithWriteBuffer(ctx context.Context, writeBuffer u return m.SerializeParent(ctx, writeBuffer, m, ser) } + //// // Arguments Getter func (m *_CipRRData) GetPacketLength() uint16 { return m.PacketLength } - // //// @@ -306,3 +310,6 @@ func (m *_CipRRData) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/eip/readwrite/model/CipReadRequest.go b/plc4go/protocols/eip/readwrite/model/CipReadRequest.go index 023ff0a0fd9..6202dd00960 100644 --- a/plc4go/protocols/eip/readwrite/model/CipReadRequest.go +++ b/plc4go/protocols/eip/readwrite/model/CipReadRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CipReadRequest is the corresponding interface of CipReadRequest type CipReadRequest interface { @@ -50,31 +52,31 @@ type CipReadRequestExactly interface { // _CipReadRequest is the data-structure of this message type _CipReadRequest struct { *_CipService - RequestPathSize int8 - Tag []byte - ElementNb uint16 + RequestPathSize int8 + Tag []byte + ElementNb uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_CipReadRequest) GetService() uint8 { - return 0x4C -} +func (m *_CipReadRequest) GetService() uint8 { +return 0x4C} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_CipReadRequest) InitializeParent(parent CipService) {} +func (m *_CipReadRequest) InitializeParent(parent CipService ) {} -func (m *_CipReadRequest) GetParent() CipService { +func (m *_CipReadRequest) GetParent() CipService { return m._CipService } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -97,13 +99,14 @@ func (m *_CipReadRequest) GetElementNb() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCipReadRequest factory function for _CipReadRequest -func NewCipReadRequest(requestPathSize int8, tag []byte, elementNb uint16, serviceLen uint16) *_CipReadRequest { +func NewCipReadRequest( requestPathSize int8 , tag []byte , elementNb uint16 , serviceLen uint16 ) *_CipReadRequest { _result := &_CipReadRequest{ RequestPathSize: requestPathSize, - Tag: tag, - ElementNb: elementNb, - _CipService: NewCipService(serviceLen), + Tag: tag, + ElementNb: elementNb, + _CipService: NewCipService(serviceLen), } _result._CipService._CipServiceChildRequirements = _result return _result @@ -111,7 +114,7 @@ func NewCipReadRequest(requestPathSize int8, tag []byte, elementNb uint16, servi // Deprecated: use the interface for direct cast func CastCipReadRequest(structType interface{}) CipReadRequest { - if casted, ok := structType.(CipReadRequest); ok { + if casted, ok := structType.(CipReadRequest); ok { return casted } if casted, ok := structType.(*CipReadRequest); ok { @@ -128,7 +131,7 @@ func (m *_CipReadRequest) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (requestPathSize) - lengthInBits += 8 + lengthInBits += 8; // Array field if len(m.Tag) > 0 { @@ -136,11 +139,12 @@ func (m *_CipReadRequest) GetLengthInBits(ctx context.Context) uint16 { } // Simple field (elementNb) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_CipReadRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -159,7 +163,7 @@ func CipReadRequestParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf _ = currentPos // Simple Field (requestPathSize) - _requestPathSize, _requestPathSizeErr := readBuffer.ReadInt8("requestPathSize", 8) +_requestPathSize, _requestPathSizeErr := readBuffer.ReadInt8("requestPathSize", 8) if _requestPathSizeErr != nil { return nil, errors.Wrap(_requestPathSizeErr, "Error parsing 'requestPathSize' field of CipReadRequest") } @@ -172,7 +176,7 @@ func CipReadRequestParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf } // Simple Field (elementNb) - _elementNb, _elementNbErr := readBuffer.ReadUint16("elementNb", 16) +_elementNb, _elementNbErr := readBuffer.ReadUint16("elementNb", 16) if _elementNbErr != nil { return nil, errors.Wrap(_elementNbErr, "Error parsing 'elementNb' field of CipReadRequest") } @@ -188,8 +192,8 @@ func CipReadRequestParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf ServiceLen: serviceLen, }, RequestPathSize: requestPathSize, - Tag: tag, - ElementNb: elementNb, + Tag: tag, + ElementNb: elementNb, } _child._CipService._CipServiceChildRequirements = _child return _child, nil @@ -211,25 +215,25 @@ func (m *_CipReadRequest) SerializeWithWriteBuffer(ctx context.Context, writeBuf return errors.Wrap(pushErr, "Error pushing for CipReadRequest") } - // Simple Field (requestPathSize) - requestPathSize := int8(m.GetRequestPathSize()) - _requestPathSizeErr := writeBuffer.WriteInt8("requestPathSize", 8, (requestPathSize)) - if _requestPathSizeErr != nil { - return errors.Wrap(_requestPathSizeErr, "Error serializing 'requestPathSize' field") - } + // Simple Field (requestPathSize) + requestPathSize := int8(m.GetRequestPathSize()) + _requestPathSizeErr := writeBuffer.WriteInt8("requestPathSize", 8, (requestPathSize)) + if _requestPathSizeErr != nil { + return errors.Wrap(_requestPathSizeErr, "Error serializing 'requestPathSize' field") + } - // Array Field (tag) - // Byte Array field (tag) - if err := writeBuffer.WriteByteArray("tag", m.GetTag()); err != nil { - return errors.Wrap(err, "Error serializing 'tag' field") - } + // Array Field (tag) + // Byte Array field (tag) + if err := writeBuffer.WriteByteArray("tag", m.GetTag()); err != nil { + return errors.Wrap(err, "Error serializing 'tag' field") + } - // Simple Field (elementNb) - elementNb := uint16(m.GetElementNb()) - _elementNbErr := writeBuffer.WriteUint16("elementNb", 16, (elementNb)) - if _elementNbErr != nil { - return errors.Wrap(_elementNbErr, "Error serializing 'elementNb' field") - } + // Simple Field (elementNb) + elementNb := uint16(m.GetElementNb()) + _elementNbErr := writeBuffer.WriteUint16("elementNb", 16, (elementNb)) + if _elementNbErr != nil { + return errors.Wrap(_elementNbErr, "Error serializing 'elementNb' field") + } if popErr := writeBuffer.PopContext("CipReadRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for CipReadRequest") @@ -239,6 +243,7 @@ func (m *_CipReadRequest) SerializeWithWriteBuffer(ctx context.Context, writeBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_CipReadRequest) isCipReadRequest() bool { return true } @@ -253,3 +258,6 @@ func (m *_CipReadRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/eip/readwrite/model/CipReadResponse.go b/plc4go/protocols/eip/readwrite/model/CipReadResponse.go index 54a5cb2f5e2..3f4b581c65e 100644 --- a/plc4go/protocols/eip/readwrite/model/CipReadResponse.go +++ b/plc4go/protocols/eip/readwrite/model/CipReadResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CipReadResponse is the corresponding interface of CipReadResponse type CipReadResponse interface { @@ -52,34 +54,34 @@ type CipReadResponseExactly interface { // _CipReadResponse is the data-structure of this message type _CipReadResponse struct { *_CipService - Status uint8 - ExtStatus uint8 - DataType CIPDataTypeCode - Data []byte + Status uint8 + ExtStatus uint8 + DataType CIPDataTypeCode + Data []byte // Reserved Fields reservedField0 *uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_CipReadResponse) GetService() uint8 { - return 0xCC -} +func (m *_CipReadResponse) GetService() uint8 { +return 0xCC} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_CipReadResponse) InitializeParent(parent CipService) {} +func (m *_CipReadResponse) InitializeParent(parent CipService ) {} -func (m *_CipReadResponse) GetParent() CipService { +func (m *_CipReadResponse) GetParent() CipService { return m._CipService } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -106,14 +108,15 @@ func (m *_CipReadResponse) GetData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCipReadResponse factory function for _CipReadResponse -func NewCipReadResponse(status uint8, extStatus uint8, dataType CIPDataTypeCode, data []byte, serviceLen uint16) *_CipReadResponse { +func NewCipReadResponse( status uint8 , extStatus uint8 , dataType CIPDataTypeCode , data []byte , serviceLen uint16 ) *_CipReadResponse { _result := &_CipReadResponse{ - Status: status, - ExtStatus: extStatus, - DataType: dataType, - Data: data, - _CipService: NewCipService(serviceLen), + Status: status, + ExtStatus: extStatus, + DataType: dataType, + Data: data, + _CipService: NewCipService(serviceLen), } _result._CipService._CipServiceChildRequirements = _result return _result @@ -121,7 +124,7 @@ func NewCipReadResponse(status uint8, extStatus uint8, dataType CIPDataTypeCode, // Deprecated: use the interface for direct cast func CastCipReadResponse(structType interface{}) CipReadResponse { - if casted, ok := structType.(CipReadResponse); ok { + if casted, ok := structType.(CipReadResponse); ok { return casted } if casted, ok := structType.(*CipReadResponse); ok { @@ -141,10 +144,10 @@ func (m *_CipReadResponse) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += 8 // Simple field (status) - lengthInBits += 8 + lengthInBits += 8; // Simple field (extStatus) - lengthInBits += 8 + lengthInBits += 8; // Simple field (dataType) lengthInBits += 16 @@ -157,6 +160,7 @@ func (m *_CipReadResponse) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_CipReadResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -184,7 +188,7 @@ func CipReadResponseParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu if reserved != uint8(0x00) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -192,14 +196,14 @@ func CipReadResponseParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu } // Simple Field (status) - _status, _statusErr := readBuffer.ReadUint8("status", 8) +_status, _statusErr := readBuffer.ReadUint8("status", 8) if _statusErr != nil { return nil, errors.Wrap(_statusErr, "Error parsing 'status' field of CipReadResponse") } status := _status // Simple Field (extStatus) - _extStatus, _extStatusErr := readBuffer.ReadUint8("extStatus", 8) +_extStatus, _extStatusErr := readBuffer.ReadUint8("extStatus", 8) if _extStatusErr != nil { return nil, errors.Wrap(_extStatusErr, "Error parsing 'extStatus' field of CipReadResponse") } @@ -209,7 +213,7 @@ func CipReadResponseParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu if pullErr := readBuffer.PullContext("dataType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for dataType") } - _dataType, _dataTypeErr := CIPDataTypeCodeParseWithBuffer(ctx, readBuffer) +_dataType, _dataTypeErr := CIPDataTypeCodeParseWithBuffer(ctx, readBuffer) if _dataTypeErr != nil { return nil, errors.Wrap(_dataTypeErr, "Error parsing 'dataType' field of CipReadResponse") } @@ -233,10 +237,10 @@ func CipReadResponseParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu _CipService: &_CipService{ ServiceLen: serviceLen, }, - Status: status, - ExtStatus: extStatus, - DataType: dataType, - Data: data, + Status: status, + ExtStatus: extStatus, + DataType: dataType, + Data: data, reservedField0: reservedField0, } _child._CipService._CipServiceChildRequirements = _child @@ -259,53 +263,53 @@ func (m *_CipReadResponse) SerializeWithWriteBuffer(ctx context.Context, writeBu return errors.Wrap(pushErr, "Error pushing for CipReadResponse") } - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0x00) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0x00), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteUint8("reserved", 8, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0x00) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0x00), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 } - - // Simple Field (status) - status := uint8(m.GetStatus()) - _statusErr := writeBuffer.WriteUint8("status", 8, (status)) - if _statusErr != nil { - return errors.Wrap(_statusErr, "Error serializing 'status' field") + _err := writeBuffer.WriteUint8("reserved", 8, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } - // Simple Field (extStatus) - extStatus := uint8(m.GetExtStatus()) - _extStatusErr := writeBuffer.WriteUint8("extStatus", 8, (extStatus)) - if _extStatusErr != nil { - return errors.Wrap(_extStatusErr, "Error serializing 'extStatus' field") - } + // Simple Field (status) + status := uint8(m.GetStatus()) + _statusErr := writeBuffer.WriteUint8("status", 8, (status)) + if _statusErr != nil { + return errors.Wrap(_statusErr, "Error serializing 'status' field") + } - // Simple Field (dataType) - if pushErr := writeBuffer.PushContext("dataType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for dataType") - } - _dataTypeErr := writeBuffer.WriteSerializable(ctx, m.GetDataType()) - if popErr := writeBuffer.PopContext("dataType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for dataType") - } - if _dataTypeErr != nil { - return errors.Wrap(_dataTypeErr, "Error serializing 'dataType' field") - } + // Simple Field (extStatus) + extStatus := uint8(m.GetExtStatus()) + _extStatusErr := writeBuffer.WriteUint8("extStatus", 8, (extStatus)) + if _extStatusErr != nil { + return errors.Wrap(_extStatusErr, "Error serializing 'extStatus' field") + } - // Array Field (data) - // Byte Array field (data) - if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { - return errors.Wrap(err, "Error serializing 'data' field") - } + // Simple Field (dataType) + if pushErr := writeBuffer.PushContext("dataType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for dataType") + } + _dataTypeErr := writeBuffer.WriteSerializable(ctx, m.GetDataType()) + if popErr := writeBuffer.PopContext("dataType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for dataType") + } + if _dataTypeErr != nil { + return errors.Wrap(_dataTypeErr, "Error serializing 'dataType' field") + } + + // Array Field (data) + // Byte Array field (data) + if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { + return errors.Wrap(err, "Error serializing 'data' field") + } if popErr := writeBuffer.PopContext("CipReadResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for CipReadResponse") @@ -315,6 +319,7 @@ func (m *_CipReadResponse) SerializeWithWriteBuffer(ctx context.Context, writeBu return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_CipReadResponse) isCipReadResponse() bool { return true } @@ -329,3 +334,6 @@ func (m *_CipReadResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/eip/readwrite/model/CipService.go b/plc4go/protocols/eip/readwrite/model/CipService.go index 476fd910adf..1f283e69f50 100644 --- a/plc4go/protocols/eip/readwrite/model/CipService.go +++ b/plc4go/protocols/eip/readwrite/model/CipService.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CipService is the corresponding interface of CipService type CipService interface { @@ -56,6 +58,7 @@ type _CipServiceChildRequirements interface { GetService() uint8 } + type CipServiceParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child CipService, serializeChildFunction func() error) error GetTypeName() string @@ -63,21 +66,22 @@ type CipServiceParent interface { type CipServiceChild interface { utils.Serializable - InitializeParent(parent CipService) +InitializeParent(parent CipService ) GetParent() *CipService GetTypeName() string CipService } + // NewCipService factory function for _CipService -func NewCipService(serviceLen uint16) *_CipService { - return &_CipService{ServiceLen: serviceLen} +func NewCipService( serviceLen uint16 ) *_CipService { +return &_CipService{ ServiceLen: serviceLen } } // Deprecated: use the interface for direct cast func CastCipService(structType interface{}) CipService { - if casted, ok := structType.(CipService); ok { + if casted, ok := structType.(CipService); ok { return casted } if casted, ok := structType.(*CipService); ok { @@ -90,10 +94,11 @@ func (m *_CipService) GetTypeName() string { return "CipService" } + func (m *_CipService) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Discriminator Field (service) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } @@ -124,26 +129,26 @@ func CipServiceParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type CipServiceChildSerializeRequirement interface { CipService - InitializeParent(CipService) + InitializeParent(CipService ) GetParent() CipService } var _childTemp interface{} var _child CipServiceChildSerializeRequirement var typeSwitchError error switch { - case service == 0x4C: // CipReadRequest +case service == 0x4C : // CipReadRequest _childTemp, typeSwitchError = CipReadRequestParseWithBuffer(ctx, readBuffer, serviceLen) - case service == 0xCC: // CipReadResponse +case service == 0xCC : // CipReadResponse _childTemp, typeSwitchError = CipReadResponseParseWithBuffer(ctx, readBuffer, serviceLen) - case service == 0x4D: // CipWriteRequest +case service == 0x4D : // CipWriteRequest _childTemp, typeSwitchError = CipWriteRequestParseWithBuffer(ctx, readBuffer, serviceLen) - case service == 0xCD: // CipWriteResponse +case service == 0xCD : // CipWriteResponse _childTemp, typeSwitchError = CipWriteResponseParseWithBuffer(ctx, readBuffer, serviceLen) - case service == 0x0A: // MultipleServiceRequest +case service == 0x0A : // MultipleServiceRequest _childTemp, typeSwitchError = MultipleServiceRequestParseWithBuffer(ctx, readBuffer, serviceLen) - case service == 0x8A: // MultipleServiceResponse +case service == 0x8A : // MultipleServiceResponse _childTemp, typeSwitchError = MultipleServiceResponseParseWithBuffer(ctx, readBuffer, serviceLen) - case service == 0x52: // CipUnconnectedRequest +case service == 0x52 : // CipUnconnectedRequest _childTemp, typeSwitchError = CipUnconnectedRequestParseWithBuffer(ctx, readBuffer, serviceLen) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [service=%v]", service) @@ -158,7 +163,7 @@ func CipServiceParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, } // Finish initializing - _child.InitializeParent(_child) +_child.InitializeParent(_child ) return _child, nil } @@ -168,7 +173,7 @@ func (pm *_CipService) SerializeParent(ctx context.Context, writeBuffer utils.Wr _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("CipService"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("CipService"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for CipService") } @@ -191,13 +196,13 @@ func (pm *_CipService) SerializeParent(ctx context.Context, writeBuffer utils.Wr return nil } + //// // Arguments Getter func (m *_CipService) GetServiceLen() uint16 { return m.ServiceLen } - // //// @@ -215,3 +220,6 @@ func (m *_CipService) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/eip/readwrite/model/CipUnconnectedRequest.go b/plc4go/protocols/eip/readwrite/model/CipUnconnectedRequest.go index 530458ae5c5..0c0825e7f01 100644 --- a/plc4go/protocols/eip/readwrite/model/CipUnconnectedRequest.go +++ b/plc4go/protocols/eip/readwrite/model/CipUnconnectedRequest.go @@ -19,6 +19,7 @@ package model + import ( "context" "fmt" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const CipUnconnectedRequest_ROUTE uint16 = 0x0001 @@ -54,9 +56,9 @@ type CipUnconnectedRequestExactly interface { // _CipUnconnectedRequest is the data-structure of this message type _CipUnconnectedRequest struct { *_CipService - UnconnectedService CipService - BackPlane int8 - Slot int8 + UnconnectedService CipService + BackPlane int8 + Slot int8 // Reserved Fields reservedField0 *uint8 reservedField1 *uint8 @@ -66,26 +68,26 @@ type _CipUnconnectedRequest struct { reservedField5 *uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_CipUnconnectedRequest) GetService() uint8 { - return 0x52 -} +func (m *_CipUnconnectedRequest) GetService() uint8 { +return 0x52} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_CipUnconnectedRequest) InitializeParent(parent CipService) {} +func (m *_CipUnconnectedRequest) InitializeParent(parent CipService ) {} -func (m *_CipUnconnectedRequest) GetParent() CipService { +func (m *_CipUnconnectedRequest) GetParent() CipService { return m._CipService } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -121,13 +123,14 @@ func (m *_CipUnconnectedRequest) GetRoute() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCipUnconnectedRequest factory function for _CipUnconnectedRequest -func NewCipUnconnectedRequest(unconnectedService CipService, backPlane int8, slot int8, serviceLen uint16) *_CipUnconnectedRequest { +func NewCipUnconnectedRequest( unconnectedService CipService , backPlane int8 , slot int8 , serviceLen uint16 ) *_CipUnconnectedRequest { _result := &_CipUnconnectedRequest{ UnconnectedService: unconnectedService, - BackPlane: backPlane, - Slot: slot, - _CipService: NewCipService(serviceLen), + BackPlane: backPlane, + Slot: slot, + _CipService: NewCipService(serviceLen), } _result._CipService._CipServiceChildRequirements = _result return _result @@ -135,7 +138,7 @@ func NewCipUnconnectedRequest(unconnectedService CipService, backPlane int8, slo // Deprecated: use the interface for direct cast func CastCipUnconnectedRequest(structType interface{}) CipUnconnectedRequest { - if casted, ok := structType.(CipUnconnectedRequest); ok { + if casted, ok := structType.(CipUnconnectedRequest); ok { return casted } if casted, ok := structType.(*CipUnconnectedRequest); ok { @@ -179,14 +182,15 @@ func (m *_CipUnconnectedRequest) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += 16 // Simple field (backPlane) - lengthInBits += 8 + lengthInBits += 8; // Simple field (slot) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_CipUnconnectedRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -214,7 +218,7 @@ func CipUnconnectedRequestParseWithBuffer(ctx context.Context, readBuffer utils. if reserved != uint8(0x02) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x02), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -231,7 +235,7 @@ func CipUnconnectedRequestParseWithBuffer(ctx context.Context, readBuffer utils. if reserved != uint8(0x20) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x20), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField1 = &reserved @@ -248,7 +252,7 @@ func CipUnconnectedRequestParseWithBuffer(ctx context.Context, readBuffer utils. if reserved != uint8(0x06) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x06), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField2 = &reserved @@ -265,7 +269,7 @@ func CipUnconnectedRequestParseWithBuffer(ctx context.Context, readBuffer utils. if reserved != uint8(0x24) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x24), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField3 = &reserved @@ -282,7 +286,7 @@ func CipUnconnectedRequestParseWithBuffer(ctx context.Context, readBuffer utils. if reserved != uint8(0x01) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x01), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField4 = &reserved @@ -299,7 +303,7 @@ func CipUnconnectedRequestParseWithBuffer(ctx context.Context, readBuffer utils. if reserved != uint16(0x9D05) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint16(0x9D05), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField5 = &reserved @@ -317,7 +321,7 @@ func CipUnconnectedRequestParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("unconnectedService"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for unconnectedService") } - _unconnectedService, _unconnectedServiceErr := CipServiceParseWithBuffer(ctx, readBuffer, uint16(messageSize)) +_unconnectedService, _unconnectedServiceErr := CipServiceParseWithBuffer(ctx, readBuffer , uint16( messageSize ) ) if _unconnectedServiceErr != nil { return nil, errors.Wrap(_unconnectedServiceErr, "Error parsing 'unconnectedService' field of CipUnconnectedRequest") } @@ -336,14 +340,14 @@ func CipUnconnectedRequestParseWithBuffer(ctx context.Context, readBuffer utils. } // Simple Field (backPlane) - _backPlane, _backPlaneErr := readBuffer.ReadInt8("backPlane", 8) +_backPlane, _backPlaneErr := readBuffer.ReadInt8("backPlane", 8) if _backPlaneErr != nil { return nil, errors.Wrap(_backPlaneErr, "Error parsing 'backPlane' field of CipUnconnectedRequest") } backPlane := _backPlane // Simple Field (slot) - _slot, _slotErr := readBuffer.ReadInt8("slot", 8) +_slot, _slotErr := readBuffer.ReadInt8("slot", 8) if _slotErr != nil { return nil, errors.Wrap(_slotErr, "Error parsing 'slot' field of CipUnconnectedRequest") } @@ -359,14 +363,14 @@ func CipUnconnectedRequestParseWithBuffer(ctx context.Context, readBuffer utils. ServiceLen: serviceLen, }, UnconnectedService: unconnectedService, - BackPlane: backPlane, - Slot: slot, - reservedField0: reservedField0, - reservedField1: reservedField1, - reservedField2: reservedField2, - reservedField3: reservedField3, - reservedField4: reservedField4, - reservedField5: reservedField5, + BackPlane: backPlane, + Slot: slot, + reservedField0: reservedField0, + reservedField1: reservedField1, + reservedField2: reservedField2, + reservedField3: reservedField3, + reservedField4: reservedField4, + reservedField5: reservedField5, } _child._CipService._CipServiceChildRequirements = _child return _child, nil @@ -388,140 +392,140 @@ func (m *_CipUnconnectedRequest) SerializeWithWriteBuffer(ctx context.Context, w return errors.Wrap(pushErr, "Error pushing for CipUnconnectedRequest") } - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0x02) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0x02), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteUint8("reserved", 8, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0x02) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0x02), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 } - - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0x20) - if m.reservedField1 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0x20), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField1 - } - _err := writeBuffer.WriteUint8("reserved", 8, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + _err := writeBuffer.WriteUint8("reserved", 8, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0x06) - if m.reservedField2 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0x06), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField2 - } - _err := writeBuffer.WriteUint8("reserved", 8, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0x20) + if m.reservedField1 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0x20), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField1 } - - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0x24) - if m.reservedField3 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0x24), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField3 - } - _err := writeBuffer.WriteUint8("reserved", 8, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + _err := writeBuffer.WriteUint8("reserved", 8, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0x01) - if m.reservedField4 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0x01), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField4 - } - _err := writeBuffer.WriteUint8("reserved", 8, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0x06) + if m.reservedField2 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0x06), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField2 } - - // Reserved Field (reserved) - { - var reserved uint16 = uint16(0x9D05) - if m.reservedField5 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint16(0x9D05), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField5 - } - _err := writeBuffer.WriteUint16("reserved", 16, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + _err := writeBuffer.WriteUint8("reserved", 8, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } - // Implicit Field (messageSize) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - messageSize := uint16(uint16(uint16(uint16(m.GetLengthInBytes(ctx)))-uint16(uint16(10))) - uint16(uint16(4))) - _messageSizeErr := writeBuffer.WriteUint16("messageSize", 16, (messageSize)) - if _messageSizeErr != nil { - return errors.Wrap(_messageSizeErr, "Error serializing 'messageSize' field") + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0x24) + if m.reservedField3 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0x24), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField3 } - - // Simple Field (unconnectedService) - if pushErr := writeBuffer.PushContext("unconnectedService"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for unconnectedService") + _err := writeBuffer.WriteUint8("reserved", 8, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } - _unconnectedServiceErr := writeBuffer.WriteSerializable(ctx, m.GetUnconnectedService()) - if popErr := writeBuffer.PopContext("unconnectedService"); popErr != nil { - return errors.Wrap(popErr, "Error popping for unconnectedService") + } + + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0x01) + if m.reservedField4 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0x01), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField4 } - if _unconnectedServiceErr != nil { - return errors.Wrap(_unconnectedServiceErr, "Error serializing 'unconnectedService' field") + _err := writeBuffer.WriteUint8("reserved", 8, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } - // Const Field (route) - _routeErr := writeBuffer.WriteUint16("route", 16, 0x0001) - if _routeErr != nil { - return errors.Wrap(_routeErr, "Error serializing 'route' field") + // Reserved Field (reserved) + { + var reserved uint16 = uint16(0x9D05) + if m.reservedField5 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint16(0x9D05), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField5 } - - // Simple Field (backPlane) - backPlane := int8(m.GetBackPlane()) - _backPlaneErr := writeBuffer.WriteInt8("backPlane", 8, (backPlane)) - if _backPlaneErr != nil { - return errors.Wrap(_backPlaneErr, "Error serializing 'backPlane' field") + _err := writeBuffer.WriteUint16("reserved", 16, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } - // Simple Field (slot) - slot := int8(m.GetSlot()) - _slotErr := writeBuffer.WriteInt8("slot", 8, (slot)) - if _slotErr != nil { - return errors.Wrap(_slotErr, "Error serializing 'slot' field") - } + // Implicit Field (messageSize) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) + messageSize := uint16(uint16(uint16(uint16(m.GetLengthInBytes(ctx))) - uint16(uint16(10))) - uint16(uint16(4))) + _messageSizeErr := writeBuffer.WriteUint16("messageSize", 16, (messageSize)) + if _messageSizeErr != nil { + return errors.Wrap(_messageSizeErr, "Error serializing 'messageSize' field") + } + + // Simple Field (unconnectedService) + if pushErr := writeBuffer.PushContext("unconnectedService"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for unconnectedService") + } + _unconnectedServiceErr := writeBuffer.WriteSerializable(ctx, m.GetUnconnectedService()) + if popErr := writeBuffer.PopContext("unconnectedService"); popErr != nil { + return errors.Wrap(popErr, "Error popping for unconnectedService") + } + if _unconnectedServiceErr != nil { + return errors.Wrap(_unconnectedServiceErr, "Error serializing 'unconnectedService' field") + } + + // Const Field (route) + _routeErr := writeBuffer.WriteUint16("route", 16, 0x0001) + if _routeErr != nil { + return errors.Wrap(_routeErr, "Error serializing 'route' field") + } + + // Simple Field (backPlane) + backPlane := int8(m.GetBackPlane()) + _backPlaneErr := writeBuffer.WriteInt8("backPlane", 8, (backPlane)) + if _backPlaneErr != nil { + return errors.Wrap(_backPlaneErr, "Error serializing 'backPlane' field") + } + + // Simple Field (slot) + slot := int8(m.GetSlot()) + _slotErr := writeBuffer.WriteInt8("slot", 8, (slot)) + if _slotErr != nil { + return errors.Wrap(_slotErr, "Error serializing 'slot' field") + } if popErr := writeBuffer.PopContext("CipUnconnectedRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for CipUnconnectedRequest") @@ -531,6 +535,7 @@ func (m *_CipUnconnectedRequest) SerializeWithWriteBuffer(ctx context.Context, w return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_CipUnconnectedRequest) isCipUnconnectedRequest() bool { return true } @@ -545,3 +550,6 @@ func (m *_CipUnconnectedRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/eip/readwrite/model/CipWriteRequest.go b/plc4go/protocols/eip/readwrite/model/CipWriteRequest.go index 616ace819bf..c5ee340062f 100644 --- a/plc4go/protocols/eip/readwrite/model/CipWriteRequest.go +++ b/plc4go/protocols/eip/readwrite/model/CipWriteRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CipWriteRequest is the corresponding interface of CipWriteRequest type CipWriteRequest interface { @@ -54,33 +56,33 @@ type CipWriteRequestExactly interface { // _CipWriteRequest is the data-structure of this message type _CipWriteRequest struct { *_CipService - RequestPathSize int8 - Tag []byte - DataType CIPDataTypeCode - ElementNb uint16 - Data []byte + RequestPathSize int8 + Tag []byte + DataType CIPDataTypeCode + ElementNb uint16 + Data []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_CipWriteRequest) GetService() uint8 { - return 0x4D -} +func (m *_CipWriteRequest) GetService() uint8 { +return 0x4D} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_CipWriteRequest) InitializeParent(parent CipService) {} +func (m *_CipWriteRequest) InitializeParent(parent CipService ) {} -func (m *_CipWriteRequest) GetParent() CipService { +func (m *_CipWriteRequest) GetParent() CipService { return m._CipService } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -111,15 +113,16 @@ func (m *_CipWriteRequest) GetData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCipWriteRequest factory function for _CipWriteRequest -func NewCipWriteRequest(requestPathSize int8, tag []byte, dataType CIPDataTypeCode, elementNb uint16, data []byte, serviceLen uint16) *_CipWriteRequest { +func NewCipWriteRequest( requestPathSize int8 , tag []byte , dataType CIPDataTypeCode , elementNb uint16 , data []byte , serviceLen uint16 ) *_CipWriteRequest { _result := &_CipWriteRequest{ RequestPathSize: requestPathSize, - Tag: tag, - DataType: dataType, - ElementNb: elementNb, - Data: data, - _CipService: NewCipService(serviceLen), + Tag: tag, + DataType: dataType, + ElementNb: elementNb, + Data: data, + _CipService: NewCipService(serviceLen), } _result._CipService._CipServiceChildRequirements = _result return _result @@ -127,7 +130,7 @@ func NewCipWriteRequest(requestPathSize int8, tag []byte, dataType CIPDataTypeCo // Deprecated: use the interface for direct cast func CastCipWriteRequest(structType interface{}) CipWriteRequest { - if casted, ok := structType.(CipWriteRequest); ok { + if casted, ok := structType.(CipWriteRequest); ok { return casted } if casted, ok := structType.(*CipWriteRequest); ok { @@ -144,7 +147,7 @@ func (m *_CipWriteRequest) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (requestPathSize) - lengthInBits += 8 + lengthInBits += 8; // Array field if len(m.Tag) > 0 { @@ -155,7 +158,7 @@ func (m *_CipWriteRequest) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += 16 // Simple field (elementNb) - lengthInBits += 16 + lengthInBits += 16; // Array field if len(m.Data) > 0 { @@ -165,6 +168,7 @@ func (m *_CipWriteRequest) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_CipWriteRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -183,7 +187,7 @@ func CipWriteRequestParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu _ = currentPos // Simple Field (requestPathSize) - _requestPathSize, _requestPathSizeErr := readBuffer.ReadInt8("requestPathSize", 8) +_requestPathSize, _requestPathSizeErr := readBuffer.ReadInt8("requestPathSize", 8) if _requestPathSizeErr != nil { return nil, errors.Wrap(_requestPathSizeErr, "Error parsing 'requestPathSize' field of CipWriteRequest") } @@ -199,7 +203,7 @@ func CipWriteRequestParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu if pullErr := readBuffer.PullContext("dataType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for dataType") } - _dataType, _dataTypeErr := CIPDataTypeCodeParseWithBuffer(ctx, readBuffer) +_dataType, _dataTypeErr := CIPDataTypeCodeParseWithBuffer(ctx, readBuffer) if _dataTypeErr != nil { return nil, errors.Wrap(_dataTypeErr, "Error parsing 'dataType' field of CipWriteRequest") } @@ -209,7 +213,7 @@ func CipWriteRequestParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu } // Simple Field (elementNb) - _elementNb, _elementNbErr := readBuffer.ReadUint16("elementNb", 16) +_elementNb, _elementNbErr := readBuffer.ReadUint16("elementNb", 16) if _elementNbErr != nil { return nil, errors.Wrap(_elementNbErr, "Error parsing 'elementNb' field of CipWriteRequest") } @@ -231,10 +235,10 @@ func CipWriteRequestParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu ServiceLen: serviceLen, }, RequestPathSize: requestPathSize, - Tag: tag, - DataType: dataType, - ElementNb: elementNb, - Data: data, + Tag: tag, + DataType: dataType, + ElementNb: elementNb, + Data: data, } _child._CipService._CipServiceChildRequirements = _child return _child, nil @@ -256,43 +260,43 @@ func (m *_CipWriteRequest) SerializeWithWriteBuffer(ctx context.Context, writeBu return errors.Wrap(pushErr, "Error pushing for CipWriteRequest") } - // Simple Field (requestPathSize) - requestPathSize := int8(m.GetRequestPathSize()) - _requestPathSizeErr := writeBuffer.WriteInt8("requestPathSize", 8, (requestPathSize)) - if _requestPathSizeErr != nil { - return errors.Wrap(_requestPathSizeErr, "Error serializing 'requestPathSize' field") - } + // Simple Field (requestPathSize) + requestPathSize := int8(m.GetRequestPathSize()) + _requestPathSizeErr := writeBuffer.WriteInt8("requestPathSize", 8, (requestPathSize)) + if _requestPathSizeErr != nil { + return errors.Wrap(_requestPathSizeErr, "Error serializing 'requestPathSize' field") + } - // Array Field (tag) - // Byte Array field (tag) - if err := writeBuffer.WriteByteArray("tag", m.GetTag()); err != nil { - return errors.Wrap(err, "Error serializing 'tag' field") - } + // Array Field (tag) + // Byte Array field (tag) + if err := writeBuffer.WriteByteArray("tag", m.GetTag()); err != nil { + return errors.Wrap(err, "Error serializing 'tag' field") + } - // Simple Field (dataType) - if pushErr := writeBuffer.PushContext("dataType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for dataType") - } - _dataTypeErr := writeBuffer.WriteSerializable(ctx, m.GetDataType()) - if popErr := writeBuffer.PopContext("dataType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for dataType") - } - if _dataTypeErr != nil { - return errors.Wrap(_dataTypeErr, "Error serializing 'dataType' field") - } + // Simple Field (dataType) + if pushErr := writeBuffer.PushContext("dataType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for dataType") + } + _dataTypeErr := writeBuffer.WriteSerializable(ctx, m.GetDataType()) + if popErr := writeBuffer.PopContext("dataType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for dataType") + } + if _dataTypeErr != nil { + return errors.Wrap(_dataTypeErr, "Error serializing 'dataType' field") + } - // Simple Field (elementNb) - elementNb := uint16(m.GetElementNb()) - _elementNbErr := writeBuffer.WriteUint16("elementNb", 16, (elementNb)) - if _elementNbErr != nil { - return errors.Wrap(_elementNbErr, "Error serializing 'elementNb' field") - } + // Simple Field (elementNb) + elementNb := uint16(m.GetElementNb()) + _elementNbErr := writeBuffer.WriteUint16("elementNb", 16, (elementNb)) + if _elementNbErr != nil { + return errors.Wrap(_elementNbErr, "Error serializing 'elementNb' field") + } - // Array Field (data) - // Byte Array field (data) - if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { - return errors.Wrap(err, "Error serializing 'data' field") - } + // Array Field (data) + // Byte Array field (data) + if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { + return errors.Wrap(err, "Error serializing 'data' field") + } if popErr := writeBuffer.PopContext("CipWriteRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for CipWriteRequest") @@ -302,6 +306,7 @@ func (m *_CipWriteRequest) SerializeWithWriteBuffer(ctx context.Context, writeBu return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_CipWriteRequest) isCipWriteRequest() bool { return true } @@ -316,3 +321,6 @@ func (m *_CipWriteRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/eip/readwrite/model/CipWriteResponse.go b/plc4go/protocols/eip/readwrite/model/CipWriteResponse.go index e2658b12ad6..b9f88037746 100644 --- a/plc4go/protocols/eip/readwrite/model/CipWriteResponse.go +++ b/plc4go/protocols/eip/readwrite/model/CipWriteResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CipWriteResponse is the corresponding interface of CipWriteResponse type CipWriteResponse interface { @@ -48,32 +50,32 @@ type CipWriteResponseExactly interface { // _CipWriteResponse is the data-structure of this message type _CipWriteResponse struct { *_CipService - Status uint8 - ExtStatus uint8 + Status uint8 + ExtStatus uint8 // Reserved Fields reservedField0 *uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_CipWriteResponse) GetService() uint8 { - return 0xCD -} +func (m *_CipWriteResponse) GetService() uint8 { +return 0xCD} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_CipWriteResponse) InitializeParent(parent CipService) {} +func (m *_CipWriteResponse) InitializeParent(parent CipService ) {} -func (m *_CipWriteResponse) GetParent() CipService { +func (m *_CipWriteResponse) GetParent() CipService { return m._CipService } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,12 +94,13 @@ func (m *_CipWriteResponse) GetExtStatus() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCipWriteResponse factory function for _CipWriteResponse -func NewCipWriteResponse(status uint8, extStatus uint8, serviceLen uint16) *_CipWriteResponse { +func NewCipWriteResponse( status uint8 , extStatus uint8 , serviceLen uint16 ) *_CipWriteResponse { _result := &_CipWriteResponse{ - Status: status, - ExtStatus: extStatus, - _CipService: NewCipService(serviceLen), + Status: status, + ExtStatus: extStatus, + _CipService: NewCipService(serviceLen), } _result._CipService._CipServiceChildRequirements = _result return _result @@ -105,7 +108,7 @@ func NewCipWriteResponse(status uint8, extStatus uint8, serviceLen uint16) *_Cip // Deprecated: use the interface for direct cast func CastCipWriteResponse(structType interface{}) CipWriteResponse { - if casted, ok := structType.(CipWriteResponse); ok { + if casted, ok := structType.(CipWriteResponse); ok { return casted } if casted, ok := structType.(*CipWriteResponse); ok { @@ -125,14 +128,15 @@ func (m *_CipWriteResponse) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += 8 // Simple field (status) - lengthInBits += 8 + lengthInBits += 8; // Simple field (extStatus) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_CipWriteResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -160,7 +164,7 @@ func CipWriteResponseParseWithBuffer(ctx context.Context, readBuffer utils.ReadB if reserved != uint8(0x00) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -168,14 +172,14 @@ func CipWriteResponseParseWithBuffer(ctx context.Context, readBuffer utils.ReadB } // Simple Field (status) - _status, _statusErr := readBuffer.ReadUint8("status", 8) +_status, _statusErr := readBuffer.ReadUint8("status", 8) if _statusErr != nil { return nil, errors.Wrap(_statusErr, "Error parsing 'status' field of CipWriteResponse") } status := _status // Simple Field (extStatus) - _extStatus, _extStatusErr := readBuffer.ReadUint8("extStatus", 8) +_extStatus, _extStatusErr := readBuffer.ReadUint8("extStatus", 8) if _extStatusErr != nil { return nil, errors.Wrap(_extStatusErr, "Error parsing 'extStatus' field of CipWriteResponse") } @@ -190,8 +194,8 @@ func CipWriteResponseParseWithBuffer(ctx context.Context, readBuffer utils.ReadB _CipService: &_CipService{ ServiceLen: serviceLen, }, - Status: status, - ExtStatus: extStatus, + Status: status, + ExtStatus: extStatus, reservedField0: reservedField0, } _child._CipService._CipServiceChildRequirements = _child @@ -214,35 +218,35 @@ func (m *_CipWriteResponse) SerializeWithWriteBuffer(ctx context.Context, writeB return errors.Wrap(pushErr, "Error pushing for CipWriteResponse") } - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0x00) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0x00), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteUint8("reserved", 8, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0x00) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0x00), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 } - - // Simple Field (status) - status := uint8(m.GetStatus()) - _statusErr := writeBuffer.WriteUint8("status", 8, (status)) - if _statusErr != nil { - return errors.Wrap(_statusErr, "Error serializing 'status' field") + _err := writeBuffer.WriteUint8("reserved", 8, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } - // Simple Field (extStatus) - extStatus := uint8(m.GetExtStatus()) - _extStatusErr := writeBuffer.WriteUint8("extStatus", 8, (extStatus)) - if _extStatusErr != nil { - return errors.Wrap(_extStatusErr, "Error serializing 'extStatus' field") - } + // Simple Field (status) + status := uint8(m.GetStatus()) + _statusErr := writeBuffer.WriteUint8("status", 8, (status)) + if _statusErr != nil { + return errors.Wrap(_statusErr, "Error serializing 'status' field") + } + + // Simple Field (extStatus) + extStatus := uint8(m.GetExtStatus()) + _extStatusErr := writeBuffer.WriteUint8("extStatus", 8, (extStatus)) + if _extStatusErr != nil { + return errors.Wrap(_extStatusErr, "Error serializing 'extStatus' field") + } if popErr := writeBuffer.PopContext("CipWriteResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for CipWriteResponse") @@ -252,6 +256,7 @@ func (m *_CipWriteResponse) SerializeWithWriteBuffer(ctx context.Context, writeB return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_CipWriteResponse) isCipWriteResponse() bool { return true } @@ -266,3 +271,6 @@ func (m *_CipWriteResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/eip/readwrite/model/EiPCommand.go b/plc4go/protocols/eip/readwrite/model/EiPCommand.go index 7595660fad2..ed5a1b7b47a 100644 --- a/plc4go/protocols/eip/readwrite/model/EiPCommand.go +++ b/plc4go/protocols/eip/readwrite/model/EiPCommand.go @@ -34,17 +34,17 @@ type IEiPCommand interface { utils.Serializable } -const ( - EiPCommand_RegisterSession EiPCommand = 0x0065 +const( + EiPCommand_RegisterSession EiPCommand = 0x0065 EiPCommand_UnregisterSession EiPCommand = 0x0066 - EiPCommand_SendRRData EiPCommand = 0x006F + EiPCommand_SendRRData EiPCommand = 0x006F ) var EiPCommandValues []EiPCommand func init() { _ = errors.New - EiPCommandValues = []EiPCommand{ + EiPCommandValues = []EiPCommand { EiPCommand_RegisterSession, EiPCommand_UnregisterSession, EiPCommand_SendRRData, @@ -53,12 +53,12 @@ func init() { func EiPCommandByValue(value uint16) (enum EiPCommand, ok bool) { switch value { - case 0x0065: - return EiPCommand_RegisterSession, true - case 0x0066: - return EiPCommand_UnregisterSession, true - case 0x006F: - return EiPCommand_SendRRData, true + case 0x0065: + return EiPCommand_RegisterSession, true + case 0x0066: + return EiPCommand_UnregisterSession, true + case 0x006F: + return EiPCommand_SendRRData, true } return 0, false } @@ -75,13 +75,13 @@ func EiPCommandByName(value string) (enum EiPCommand, ok bool) { return 0, false } -func EiPCommandKnows(value uint16) bool { +func EiPCommandKnows(value uint16) bool { for _, typeValue := range EiPCommandValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastEiPCommand(structType interface{}) EiPCommand { @@ -147,3 +147,4 @@ func (e EiPCommand) PLC4XEnumName() string { func (e EiPCommand) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/eip/readwrite/model/EipConnectionRequest.go b/plc4go/protocols/eip/readwrite/model/EipConnectionRequest.go index fb75f6314b0..b471da8d17c 100644 --- a/plc4go/protocols/eip/readwrite/model/EipConnectionRequest.go +++ b/plc4go/protocols/eip/readwrite/model/EipConnectionRequest.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -27,7 +28,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const EipConnectionRequest_PROTOCOLVERSION uint16 = 0x01 @@ -52,31 +54,30 @@ type _EipConnectionRequest struct { *_EipPacket } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_EipConnectionRequest) GetCommand() uint16 { - return 0x0065 -} +func (m *_EipConnectionRequest) GetCommand() uint16 { +return 0x0065} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_EipConnectionRequest) InitializeParent(parent EipPacket, sessionHandle uint32, status uint32, senderContext []uint8, options uint32) { - m.SessionHandle = sessionHandle +func (m *_EipConnectionRequest) InitializeParent(parent EipPacket , sessionHandle uint32 , status uint32 , senderContext []uint8 , options uint32 ) { m.SessionHandle = sessionHandle m.Status = status m.SenderContext = senderContext m.Options = options } -func (m *_EipConnectionRequest) GetParent() EipPacket { +func (m *_EipConnectionRequest) GetParent() EipPacket { return m._EipPacket } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for const fields. @@ -95,10 +96,11 @@ func (m *_EipConnectionRequest) GetFlags() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewEipConnectionRequest factory function for _EipConnectionRequest -func NewEipConnectionRequest(sessionHandle uint32, status uint32, senderContext []uint8, options uint32) *_EipConnectionRequest { +func NewEipConnectionRequest( sessionHandle uint32 , status uint32 , senderContext []uint8 , options uint32 ) *_EipConnectionRequest { _result := &_EipConnectionRequest{ - _EipPacket: NewEipPacket(sessionHandle, status, senderContext, options), + _EipPacket: NewEipPacket(sessionHandle, status, senderContext, options), } _result._EipPacket._EipPacketChildRequirements = _result return _result @@ -106,7 +108,7 @@ func NewEipConnectionRequest(sessionHandle uint32, status uint32, senderContext // Deprecated: use the interface for direct cast func CastEipConnectionRequest(structType interface{}) EipConnectionRequest { - if casted, ok := structType.(EipConnectionRequest); ok { + if casted, ok := structType.(EipConnectionRequest); ok { return casted } if casted, ok := structType.(*EipConnectionRequest); ok { @@ -131,6 +133,7 @@ func (m *_EipConnectionRequest) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_EipConnectionRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -172,7 +175,8 @@ func EipConnectionRequestParseWithBuffer(ctx context.Context, readBuffer utils.R // Create a partially initialized instance _child := &_EipConnectionRequest{ - _EipPacket: &_EipPacket{}, + _EipPacket: &_EipPacket{ + }, } _child._EipPacket._EipPacketChildRequirements = _child return _child, nil @@ -194,17 +198,17 @@ func (m *_EipConnectionRequest) SerializeWithWriteBuffer(ctx context.Context, wr return errors.Wrap(pushErr, "Error pushing for EipConnectionRequest") } - // Const Field (protocolVersion) - _protocolVersionErr := writeBuffer.WriteUint16("protocolVersion", 16, 0x01) - if _protocolVersionErr != nil { - return errors.Wrap(_protocolVersionErr, "Error serializing 'protocolVersion' field") - } + // Const Field (protocolVersion) + _protocolVersionErr := writeBuffer.WriteUint16("protocolVersion", 16, 0x01) + if _protocolVersionErr != nil { + return errors.Wrap(_protocolVersionErr, "Error serializing 'protocolVersion' field") + } - // Const Field (flags) - _flagsErr := writeBuffer.WriteUint16("flags", 16, 0x00) - if _flagsErr != nil { - return errors.Wrap(_flagsErr, "Error serializing 'flags' field") - } + // Const Field (flags) + _flagsErr := writeBuffer.WriteUint16("flags", 16, 0x00) + if _flagsErr != nil { + return errors.Wrap(_flagsErr, "Error serializing 'flags' field") + } if popErr := writeBuffer.PopContext("EipConnectionRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for EipConnectionRequest") @@ -214,6 +218,7 @@ func (m *_EipConnectionRequest) SerializeWithWriteBuffer(ctx context.Context, wr return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_EipConnectionRequest) isEipConnectionRequest() bool { return true } @@ -228,3 +233,6 @@ func (m *_EipConnectionRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/eip/readwrite/model/EipDisconnectRequest.go b/plc4go/protocols/eip/readwrite/model/EipDisconnectRequest.go index 9e4f7f9ebeb..af966bec030 100644 --- a/plc4go/protocols/eip/readwrite/model/EipDisconnectRequest.go +++ b/plc4go/protocols/eip/readwrite/model/EipDisconnectRequest.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // EipDisconnectRequest is the corresponding interface of EipDisconnectRequest type EipDisconnectRequest interface { @@ -47,35 +49,36 @@ type _EipDisconnectRequest struct { *_EipPacket } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_EipDisconnectRequest) GetCommand() uint16 { - return 0x0066 -} +func (m *_EipDisconnectRequest) GetCommand() uint16 { +return 0x0066} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_EipDisconnectRequest) InitializeParent(parent EipPacket, sessionHandle uint32, status uint32, senderContext []uint8, options uint32) { - m.SessionHandle = sessionHandle +func (m *_EipDisconnectRequest) InitializeParent(parent EipPacket , sessionHandle uint32 , status uint32 , senderContext []uint8 , options uint32 ) { m.SessionHandle = sessionHandle m.Status = status m.SenderContext = senderContext m.Options = options } -func (m *_EipDisconnectRequest) GetParent() EipPacket { +func (m *_EipDisconnectRequest) GetParent() EipPacket { return m._EipPacket } + // NewEipDisconnectRequest factory function for _EipDisconnectRequest -func NewEipDisconnectRequest(sessionHandle uint32, status uint32, senderContext []uint8, options uint32) *_EipDisconnectRequest { +func NewEipDisconnectRequest( sessionHandle uint32 , status uint32 , senderContext []uint8 , options uint32 ) *_EipDisconnectRequest { _result := &_EipDisconnectRequest{ - _EipPacket: NewEipPacket(sessionHandle, status, senderContext, options), + _EipPacket: NewEipPacket(sessionHandle, status, senderContext, options), } _result._EipPacket._EipPacketChildRequirements = _result return _result @@ -83,7 +86,7 @@ func NewEipDisconnectRequest(sessionHandle uint32, status uint32, senderContext // Deprecated: use the interface for direct cast func CastEipDisconnectRequest(structType interface{}) EipDisconnectRequest { - if casted, ok := structType.(EipDisconnectRequest); ok { + if casted, ok := structType.(EipDisconnectRequest); ok { return casted } if casted, ok := structType.(*EipDisconnectRequest); ok { @@ -102,6 +105,7 @@ func (m *_EipDisconnectRequest) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_EipDisconnectRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -125,7 +129,8 @@ func EipDisconnectRequestParseWithBuffer(ctx context.Context, readBuffer utils.R // Create a partially initialized instance _child := &_EipDisconnectRequest{ - _EipPacket: &_EipPacket{}, + _EipPacket: &_EipPacket{ + }, } _child._EipPacket._EipPacketChildRequirements = _child return _child, nil @@ -155,6 +160,7 @@ func (m *_EipDisconnectRequest) SerializeWithWriteBuffer(ctx context.Context, wr return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_EipDisconnectRequest) isEipDisconnectRequest() bool { return true } @@ -169,3 +175,6 @@ func (m *_EipDisconnectRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/eip/readwrite/model/EipPacket.go b/plc4go/protocols/eip/readwrite/model/EipPacket.go index 9c50fbd2577..df3003d4d08 100644 --- a/plc4go/protocols/eip/readwrite/model/EipPacket.go +++ b/plc4go/protocols/eip/readwrite/model/EipPacket.go @@ -19,15 +19,17 @@ package model + import ( "context" "encoding/binary" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // EipPacket is the corresponding interface of EipPacket type EipPacket interface { @@ -55,10 +57,10 @@ type EipPacketExactly interface { // _EipPacket is the data-structure of this message type _EipPacket struct { _EipPacketChildRequirements - SessionHandle uint32 - Status uint32 - SenderContext []uint8 - Options uint32 + SessionHandle uint32 + Status uint32 + SenderContext []uint8 + Options uint32 } type _EipPacketChildRequirements interface { @@ -67,6 +69,7 @@ type _EipPacketChildRequirements interface { GetCommand() uint16 } + type EipPacketParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child EipPacket, serializeChildFunction func() error) error GetTypeName() string @@ -74,13 +77,12 @@ type EipPacketParent interface { type EipPacketChild interface { utils.Serializable - InitializeParent(parent EipPacket, sessionHandle uint32, status uint32, senderContext []uint8, options uint32) +InitializeParent(parent EipPacket , sessionHandle uint32 , status uint32 , senderContext []uint8 , options uint32 ) GetParent() *EipPacket GetTypeName() string EipPacket } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -107,14 +109,15 @@ func (m *_EipPacket) GetOptions() uint32 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewEipPacket factory function for _EipPacket -func NewEipPacket(sessionHandle uint32, status uint32, senderContext []uint8, options uint32) *_EipPacket { - return &_EipPacket{SessionHandle: sessionHandle, Status: status, SenderContext: senderContext, Options: options} +func NewEipPacket( sessionHandle uint32 , status uint32 , senderContext []uint8 , options uint32 ) *_EipPacket { +return &_EipPacket{ SessionHandle: sessionHandle , Status: status , SenderContext: senderContext , Options: options } } // Deprecated: use the interface for direct cast func CastEipPacket(structType interface{}) EipPacket { - if casted, ok := structType.(EipPacket); ok { + if casted, ok := structType.(EipPacket); ok { return casted } if casted, ok := structType.(*EipPacket); ok { @@ -127,27 +130,28 @@ func (m *_EipPacket) GetTypeName() string { return "EipPacket" } + func (m *_EipPacket) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Discriminator Field (command) - lengthInBits += 16 + lengthInBits += 16; // Implicit Field (packetLength) lengthInBits += 16 // Simple field (sessionHandle) - lengthInBits += 32 + lengthInBits += 32; // Simple field (status) - lengthInBits += 32 + lengthInBits += 32; // Array field if len(m.SenderContext) > 0 { lengthInBits += 8 * uint16(len(m.SenderContext)) - } + } // Simple field (options) - lengthInBits += 32 + lengthInBits += 32; return lengthInBits } @@ -183,14 +187,14 @@ func EipPacketParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) } // Simple Field (sessionHandle) - _sessionHandle, _sessionHandleErr := readBuffer.ReadUint32("sessionHandle", 32) +_sessionHandle, _sessionHandleErr := readBuffer.ReadUint32("sessionHandle", 32) if _sessionHandleErr != nil { return nil, errors.Wrap(_sessionHandleErr, "Error parsing 'sessionHandle' field of EipPacket") } sessionHandle := _sessionHandle // Simple Field (status) - _status, _statusErr := readBuffer.ReadUint32("status", 32) +_status, _statusErr := readBuffer.ReadUint32("status", 32) if _statusErr != nil { return nil, errors.Wrap(_statusErr, "Error parsing 'status' field of EipPacket") } @@ -212,7 +216,7 @@ func EipPacketParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := readBuffer.ReadUint8("", 8) +_item, _err := readBuffer.ReadUint8("", 8) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'senderContext' field of EipPacket") } @@ -224,7 +228,7 @@ func EipPacketParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) } // Simple Field (options) - _options, _optionsErr := readBuffer.ReadUint32("options", 32) +_options, _optionsErr := readBuffer.ReadUint32("options", 32) if _optionsErr != nil { return nil, errors.Wrap(_optionsErr, "Error parsing 'options' field of EipPacket") } @@ -233,18 +237,18 @@ func EipPacketParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type EipPacketChildSerializeRequirement interface { EipPacket - InitializeParent(EipPacket, uint32, uint32, []uint8, uint32) + InitializeParent(EipPacket, uint32, uint32, []uint8, uint32) GetParent() EipPacket } var _childTemp interface{} var _child EipPacketChildSerializeRequirement var typeSwitchError error switch { - case command == 0x0065: // EipConnectionRequest - _childTemp, typeSwitchError = EipConnectionRequestParseWithBuffer(ctx, readBuffer) - case command == 0x0066: // EipDisconnectRequest - _childTemp, typeSwitchError = EipDisconnectRequestParseWithBuffer(ctx, readBuffer) - case command == 0x006F: // CipRRData +case command == 0x0065 : // EipConnectionRequest + _childTemp, typeSwitchError = EipConnectionRequestParseWithBuffer(ctx, readBuffer, ) +case command == 0x0066 : // EipDisconnectRequest + _childTemp, typeSwitchError = EipDisconnectRequestParseWithBuffer(ctx, readBuffer, ) +case command == 0x006F : // CipRRData _childTemp, typeSwitchError = CipRRDataParseWithBuffer(ctx, readBuffer, packetLength) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [command=%v]", command) @@ -259,7 +263,7 @@ func EipPacketParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) } // Finish initializing - _child.InitializeParent(_child, sessionHandle, status, senderContext, options) +_child.InitializeParent(_child , sessionHandle , status , senderContext , options ) return _child, nil } @@ -269,7 +273,7 @@ func (pm *_EipPacket) SerializeParent(ctx context.Context, writeBuffer utils.Wri _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("EipPacket"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("EipPacket"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for EipPacket") } @@ -335,6 +339,7 @@ func (pm *_EipPacket) SerializeParent(ctx context.Context, writeBuffer utils.Wri return nil } + func (m *_EipPacket) isEipPacket() bool { return true } @@ -349,3 +354,6 @@ func (m *_EipPacket) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/eip/readwrite/model/MultipleServiceRequest.go b/plc4go/protocols/eip/readwrite/model/MultipleServiceRequest.go index 86192151726..68566db4c5f 100644 --- a/plc4go/protocols/eip/readwrite/model/MultipleServiceRequest.go +++ b/plc4go/protocols/eip/readwrite/model/MultipleServiceRequest.go @@ -19,6 +19,7 @@ package model + import ( "context" "fmt" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const MultipleServiceRequest_REQUESTPATHSIZE int8 = 0x02 @@ -51,29 +53,29 @@ type MultipleServiceRequestExactly interface { // _MultipleServiceRequest is the data-structure of this message type _MultipleServiceRequest struct { *_CipService - Data Services + Data Services } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_MultipleServiceRequest) GetService() uint8 { - return 0x0A -} +func (m *_MultipleServiceRequest) GetService() uint8 { +return 0x0A} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_MultipleServiceRequest) InitializeParent(parent CipService) {} +func (m *_MultipleServiceRequest) InitializeParent(parent CipService ) {} -func (m *_MultipleServiceRequest) GetParent() CipService { +func (m *_MultipleServiceRequest) GetParent() CipService { return m._CipService } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -105,11 +107,12 @@ func (m *_MultipleServiceRequest) GetRequestPath() uint32 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewMultipleServiceRequest factory function for _MultipleServiceRequest -func NewMultipleServiceRequest(data Services, serviceLen uint16) *_MultipleServiceRequest { +func NewMultipleServiceRequest( data Services , serviceLen uint16 ) *_MultipleServiceRequest { _result := &_MultipleServiceRequest{ - Data: data, - _CipService: NewCipService(serviceLen), + Data: data, + _CipService: NewCipService(serviceLen), } _result._CipService._CipServiceChildRequirements = _result return _result @@ -117,7 +120,7 @@ func NewMultipleServiceRequest(data Services, serviceLen uint16) *_MultipleServi // Deprecated: use the interface for direct cast func CastMultipleServiceRequest(structType interface{}) MultipleServiceRequest { - if casted, ok := structType.(MultipleServiceRequest); ok { + if casted, ok := structType.(MultipleServiceRequest); ok { return casted } if casted, ok := structType.(*MultipleServiceRequest); ok { @@ -145,6 +148,7 @@ func (m *_MultipleServiceRequest) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_MultipleServiceRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -184,7 +188,7 @@ func MultipleServiceRequestParseWithBuffer(ctx context.Context, readBuffer utils if pullErr := readBuffer.PullContext("data"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for data") } - _data, _dataErr := ServicesParseWithBuffer(ctx, readBuffer, uint16(uint16(serviceLen)-uint16(uint16(6)))) +_data, _dataErr := ServicesParseWithBuffer(ctx, readBuffer , uint16( uint16(serviceLen) - uint16(uint16(6)) ) ) if _dataErr != nil { return nil, errors.Wrap(_dataErr, "Error parsing 'data' field of MultipleServiceRequest") } @@ -224,29 +228,29 @@ func (m *_MultipleServiceRequest) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for MultipleServiceRequest") } - // Const Field (requestPathSize) - _requestPathSizeErr := writeBuffer.WriteInt8("requestPathSize", 8, 0x02) - if _requestPathSizeErr != nil { - return errors.Wrap(_requestPathSizeErr, "Error serializing 'requestPathSize' field") - } + // Const Field (requestPathSize) + _requestPathSizeErr := writeBuffer.WriteInt8("requestPathSize", 8, 0x02) + if _requestPathSizeErr != nil { + return errors.Wrap(_requestPathSizeErr, "Error serializing 'requestPathSize' field") + } - // Const Field (requestPath) - _requestPathErr := writeBuffer.WriteUint32("requestPath", 32, 0x01240220) - if _requestPathErr != nil { - return errors.Wrap(_requestPathErr, "Error serializing 'requestPath' field") - } + // Const Field (requestPath) + _requestPathErr := writeBuffer.WriteUint32("requestPath", 32, 0x01240220) + if _requestPathErr != nil { + return errors.Wrap(_requestPathErr, "Error serializing 'requestPath' field") + } - // Simple Field (data) - if pushErr := writeBuffer.PushContext("data"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for data") - } - _dataErr := writeBuffer.WriteSerializable(ctx, m.GetData()) - if popErr := writeBuffer.PopContext("data"); popErr != nil { - return errors.Wrap(popErr, "Error popping for data") - } - if _dataErr != nil { - return errors.Wrap(_dataErr, "Error serializing 'data' field") - } + // Simple Field (data) + if pushErr := writeBuffer.PushContext("data"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for data") + } + _dataErr := writeBuffer.WriteSerializable(ctx, m.GetData()) + if popErr := writeBuffer.PopContext("data"); popErr != nil { + return errors.Wrap(popErr, "Error popping for data") + } + if _dataErr != nil { + return errors.Wrap(_dataErr, "Error serializing 'data' field") + } if popErr := writeBuffer.PopContext("MultipleServiceRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for MultipleServiceRequest") @@ -256,6 +260,7 @@ func (m *_MultipleServiceRequest) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_MultipleServiceRequest) isMultipleServiceRequest() bool { return true } @@ -270,3 +275,6 @@ func (m *_MultipleServiceRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/eip/readwrite/model/MultipleServiceResponse.go b/plc4go/protocols/eip/readwrite/model/MultipleServiceResponse.go index d7920bddfae..4f536a11a22 100644 --- a/plc4go/protocols/eip/readwrite/model/MultipleServiceResponse.go +++ b/plc4go/protocols/eip/readwrite/model/MultipleServiceResponse.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // MultipleServiceResponse is the corresponding interface of MultipleServiceResponse type MultipleServiceResponse interface { @@ -55,35 +57,35 @@ type MultipleServiceResponseExactly interface { // _MultipleServiceResponse is the data-structure of this message type _MultipleServiceResponse struct { *_CipService - Status uint8 - ExtStatus uint8 - ServiceNb uint16 - Offsets []uint16 - ServicesData []byte + Status uint8 + ExtStatus uint8 + ServiceNb uint16 + Offsets []uint16 + ServicesData []byte // Reserved Fields reservedField0 *uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_MultipleServiceResponse) GetService() uint8 { - return 0x8A -} +func (m *_MultipleServiceResponse) GetService() uint8 { +return 0x8A} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_MultipleServiceResponse) InitializeParent(parent CipService) {} +func (m *_MultipleServiceResponse) InitializeParent(parent CipService ) {} -func (m *_MultipleServiceResponse) GetParent() CipService { +func (m *_MultipleServiceResponse) GetParent() CipService { return m._CipService } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -114,15 +116,16 @@ func (m *_MultipleServiceResponse) GetServicesData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewMultipleServiceResponse factory function for _MultipleServiceResponse -func NewMultipleServiceResponse(status uint8, extStatus uint8, serviceNb uint16, offsets []uint16, servicesData []byte, serviceLen uint16) *_MultipleServiceResponse { +func NewMultipleServiceResponse( status uint8 , extStatus uint8 , serviceNb uint16 , offsets []uint16 , servicesData []byte , serviceLen uint16 ) *_MultipleServiceResponse { _result := &_MultipleServiceResponse{ - Status: status, - ExtStatus: extStatus, - ServiceNb: serviceNb, - Offsets: offsets, + Status: status, + ExtStatus: extStatus, + ServiceNb: serviceNb, + Offsets: offsets, ServicesData: servicesData, - _CipService: NewCipService(serviceLen), + _CipService: NewCipService(serviceLen), } _result._CipService._CipServiceChildRequirements = _result return _result @@ -130,7 +133,7 @@ func NewMultipleServiceResponse(status uint8, extStatus uint8, serviceNb uint16, // Deprecated: use the interface for direct cast func CastMultipleServiceResponse(structType interface{}) MultipleServiceResponse { - if casted, ok := structType.(MultipleServiceResponse); ok { + if casted, ok := structType.(MultipleServiceResponse); ok { return casted } if casted, ok := structType.(*MultipleServiceResponse); ok { @@ -150,13 +153,13 @@ func (m *_MultipleServiceResponse) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += 8 // Simple field (status) - lengthInBits += 8 + lengthInBits += 8; // Simple field (extStatus) - lengthInBits += 8 + lengthInBits += 8; // Simple field (serviceNb) - lengthInBits += 16 + lengthInBits += 16; // Array field if len(m.Offsets) > 0 { @@ -171,6 +174,7 @@ func (m *_MultipleServiceResponse) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_MultipleServiceResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -198,7 +202,7 @@ func MultipleServiceResponseParseWithBuffer(ctx context.Context, readBuffer util if reserved != uint8(0x0) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x0), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -206,21 +210,21 @@ func MultipleServiceResponseParseWithBuffer(ctx context.Context, readBuffer util } // Simple Field (status) - _status, _statusErr := readBuffer.ReadUint8("status", 8) +_status, _statusErr := readBuffer.ReadUint8("status", 8) if _statusErr != nil { return nil, errors.Wrap(_statusErr, "Error parsing 'status' field of MultipleServiceResponse") } status := _status // Simple Field (extStatus) - _extStatus, _extStatusErr := readBuffer.ReadUint8("extStatus", 8) +_extStatus, _extStatusErr := readBuffer.ReadUint8("extStatus", 8) if _extStatusErr != nil { return nil, errors.Wrap(_extStatusErr, "Error parsing 'extStatus' field of MultipleServiceResponse") } extStatus := _extStatus // Simple Field (serviceNb) - _serviceNb, _serviceNbErr := readBuffer.ReadUint16("serviceNb", 16) +_serviceNb, _serviceNbErr := readBuffer.ReadUint16("serviceNb", 16) if _serviceNbErr != nil { return nil, errors.Wrap(_serviceNbErr, "Error parsing 'serviceNb' field of MultipleServiceResponse") } @@ -242,7 +246,7 @@ func MultipleServiceResponseParseWithBuffer(ctx context.Context, readBuffer util arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := readBuffer.ReadUint16("", 16) +_item, _err := readBuffer.ReadUint16("", 16) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'offsets' field of MultipleServiceResponse") } @@ -253,7 +257,7 @@ func MultipleServiceResponseParseWithBuffer(ctx context.Context, readBuffer util return nil, errors.Wrap(closeErr, "Error closing for offsets") } // Byte Array field (servicesData) - numberOfBytesservicesData := int(uint16(uint16(serviceLen)-uint16(uint16(6))) - uint16((uint16(uint16(2)) * uint16(serviceNb)))) + numberOfBytesservicesData := int(uint16(uint16(serviceLen) - uint16(uint16(6))) - uint16((uint16(uint16(2)) * uint16(serviceNb)))) servicesData, _readArrayErr := readBuffer.ReadByteArray("servicesData", numberOfBytesservicesData) if _readArrayErr != nil { return nil, errors.Wrap(_readArrayErr, "Error parsing 'servicesData' field of MultipleServiceResponse") @@ -268,11 +272,11 @@ func MultipleServiceResponseParseWithBuffer(ctx context.Context, readBuffer util _CipService: &_CipService{ ServiceLen: serviceLen, }, - Status: status, - ExtStatus: extStatus, - ServiceNb: serviceNb, - Offsets: offsets, - ServicesData: servicesData, + Status: status, + ExtStatus: extStatus, + ServiceNb: serviceNb, + Offsets: offsets, + ServicesData: servicesData, reservedField0: reservedField0, } _child._CipService._CipServiceChildRequirements = _child @@ -295,63 +299,63 @@ func (m *_MultipleServiceResponse) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for MultipleServiceResponse") } - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0x0) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0x0), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteUint8("reserved", 8, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0x0) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0x0), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 } - - // Simple Field (status) - status := uint8(m.GetStatus()) - _statusErr := writeBuffer.WriteUint8("status", 8, (status)) - if _statusErr != nil { - return errors.Wrap(_statusErr, "Error serializing 'status' field") + _err := writeBuffer.WriteUint8("reserved", 8, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } - // Simple Field (extStatus) - extStatus := uint8(m.GetExtStatus()) - _extStatusErr := writeBuffer.WriteUint8("extStatus", 8, (extStatus)) - if _extStatusErr != nil { - return errors.Wrap(_extStatusErr, "Error serializing 'extStatus' field") - } + // Simple Field (status) + status := uint8(m.GetStatus()) + _statusErr := writeBuffer.WriteUint8("status", 8, (status)) + if _statusErr != nil { + return errors.Wrap(_statusErr, "Error serializing 'status' field") + } - // Simple Field (serviceNb) - serviceNb := uint16(m.GetServiceNb()) - _serviceNbErr := writeBuffer.WriteUint16("serviceNb", 16, (serviceNb)) - if _serviceNbErr != nil { - return errors.Wrap(_serviceNbErr, "Error serializing 'serviceNb' field") - } + // Simple Field (extStatus) + extStatus := uint8(m.GetExtStatus()) + _extStatusErr := writeBuffer.WriteUint8("extStatus", 8, (extStatus)) + if _extStatusErr != nil { + return errors.Wrap(_extStatusErr, "Error serializing 'extStatus' field") + } - // Array Field (offsets) - if pushErr := writeBuffer.PushContext("offsets", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for offsets") - } - for _curItem, _element := range m.GetOffsets() { - _ = _curItem - _elementErr := writeBuffer.WriteUint16("", 16, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'offsets' field") - } - } - if popErr := writeBuffer.PopContext("offsets", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for offsets") - } + // Simple Field (serviceNb) + serviceNb := uint16(m.GetServiceNb()) + _serviceNbErr := writeBuffer.WriteUint16("serviceNb", 16, (serviceNb)) + if _serviceNbErr != nil { + return errors.Wrap(_serviceNbErr, "Error serializing 'serviceNb' field") + } - // Array Field (servicesData) - // Byte Array field (servicesData) - if err := writeBuffer.WriteByteArray("servicesData", m.GetServicesData()); err != nil { - return errors.Wrap(err, "Error serializing 'servicesData' field") + // Array Field (offsets) + if pushErr := writeBuffer.PushContext("offsets", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for offsets") + } + for _curItem, _element := range m.GetOffsets() { + _ = _curItem + _elementErr := writeBuffer.WriteUint16("", 16, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'offsets' field") } + } + if popErr := writeBuffer.PopContext("offsets", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for offsets") + } + + // Array Field (servicesData) + // Byte Array field (servicesData) + if err := writeBuffer.WriteByteArray("servicesData", m.GetServicesData()); err != nil { + return errors.Wrap(err, "Error serializing 'servicesData' field") + } if popErr := writeBuffer.PopContext("MultipleServiceResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for MultipleServiceResponse") @@ -361,6 +365,7 @@ func (m *_MultipleServiceResponse) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_MultipleServiceResponse) isMultipleServiceResponse() bool { return true } @@ -375,3 +380,6 @@ func (m *_MultipleServiceResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/eip/readwrite/model/Services.go b/plc4go/protocols/eip/readwrite/model/Services.go index 1ab75d1788a..f89857b81fd 100644 --- a/plc4go/protocols/eip/readwrite/model/Services.go +++ b/plc4go/protocols/eip/readwrite/model/Services.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Services is the corresponding interface of Services type Services interface { @@ -49,14 +51,15 @@ type ServicesExactly interface { // _Services is the data-structure of this message type _Services struct { - ServiceNb uint16 - Offsets []uint16 - Services []CipService + ServiceNb uint16 + Offsets []uint16 + Services []CipService // Arguments. ServicesLen uint16 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -79,14 +82,15 @@ func (m *_Services) GetServices() []CipService { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewServices factory function for _Services -func NewServices(serviceNb uint16, offsets []uint16, services []CipService, servicesLen uint16) *_Services { - return &_Services{ServiceNb: serviceNb, Offsets: offsets, Services: services, ServicesLen: servicesLen} +func NewServices( serviceNb uint16 , offsets []uint16 , services []CipService , servicesLen uint16 ) *_Services { +return &_Services{ ServiceNb: serviceNb , Offsets: offsets , Services: services , ServicesLen: servicesLen } } // Deprecated: use the interface for direct cast func CastServices(structType interface{}) Services { - if casted, ok := structType.(Services); ok { + if casted, ok := structType.(Services); ok { return casted } if casted, ok := structType.(*Services); ok { @@ -103,7 +107,7 @@ func (m *_Services) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (serviceNb) - lengthInBits += 16 + lengthInBits += 16; // Array field if len(m.Offsets) > 0 { @@ -116,13 +120,14 @@ func (m *_Services) GetLengthInBits(ctx context.Context) uint16 { arrayCtx := spiContext.CreateArrayContext(ctx, len(m.Services), _curItem) _ = arrayCtx _ = _curItem - lengthInBits += element.(interface{ GetLengthInBits(context.Context) uint16 }).GetLengthInBits(arrayCtx) + lengthInBits += element.(interface{GetLengthInBits(context.Context) uint16}).GetLengthInBits(arrayCtx) } } return lengthInBits } + func (m *_Services) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -141,7 +146,7 @@ func ServicesParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, s _ = currentPos // Simple Field (serviceNb) - _serviceNb, _serviceNbErr := readBuffer.ReadUint16("serviceNb", 16) +_serviceNb, _serviceNbErr := readBuffer.ReadUint16("serviceNb", 16) if _serviceNbErr != nil { return nil, errors.Wrap(_serviceNbErr, "Error parsing 'serviceNb' field of Services") } @@ -163,7 +168,7 @@ func ServicesParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, s arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := readBuffer.ReadUint16("", 16) +_item, _err := readBuffer.ReadUint16("", 16) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'offsets' field of Services") } @@ -190,7 +195,7 @@ func ServicesParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, s arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := CipServiceParseWithBuffer(arrayCtx, readBuffer, uint16(servicesLen)/uint16(serviceNb)) +_item, _err := CipServiceParseWithBuffer(arrayCtx, readBuffer , uint16(servicesLen) / uint16(serviceNb) ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'services' field of Services") } @@ -207,11 +212,11 @@ func ServicesParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, s // Create the instance return &_Services{ - ServicesLen: servicesLen, - ServiceNb: serviceNb, - Offsets: offsets, - Services: services, - }, nil + ServicesLen: servicesLen, + ServiceNb: serviceNb, + Offsets: offsets, + Services: services, + }, nil } func (m *_Services) Serialize() ([]byte, error) { @@ -225,7 +230,7 @@ func (m *_Services) Serialize() ([]byte, error) { func (m *_Services) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("Services"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("Services"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for Services") } @@ -274,13 +279,13 @@ func (m *_Services) SerializeWithWriteBuffer(ctx context.Context, writeBuffer ut return nil } + //// // Arguments Getter func (m *_Services) GetServicesLen() uint16 { return m.ServicesLen } - // //// @@ -298,3 +303,6 @@ func (m *_Services) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/eip/readwrite/model/plc4x_common.go b/plc4go/protocols/eip/readwrite/model/plc4x_common.go index d2d66e8bdd3..42166d94e68 100644 --- a/plc4go/protocols/eip/readwrite/model/plc4x_common.go +++ b/plc4go/protocols/eip/readwrite/model/plc4x_common.go @@ -15,7 +15,7 @@ * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - */ +*/ package model @@ -25,3 +25,4 @@ import "github.com/rs/zerolog/log" // Plc4xModelLog is the Logger used by the Parse/Serialize methods var Plc4xModelLog = &log.Logger + diff --git a/plc4go/protocols/firmata/readwrite/XmlParserHelper.go b/plc4go/protocols/firmata/readwrite/XmlParserHelper.go index aa30398c9ad..8bffe17a11b 100644 --- a/plc4go/protocols/firmata/readwrite/XmlParserHelper.go +++ b/plc4go/protocols/firmata/readwrite/XmlParserHelper.go @@ -21,8 +21,8 @@ package readwrite import ( "context" - "strconv" "strings" + "strconv" "github.com/apache/plc4x/plc4go/protocols/firmata/readwrite/model" "github.com/apache/plc4x/plc4go/spi/utils" @@ -43,16 +43,16 @@ func init() { } func (m FirmataXmlParserHelper) Parse(typeName string, xmlString string, parserArguments ...string) (interface{}, error) { - switch typeName { - case "SysexCommand": - response := parserArguments[0] == "true" - return model.SysexCommandParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), response) - case "FirmataMessage": - response := parserArguments[0] == "true" - return model.FirmataMessageParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), response) - case "FirmataCommand": - response := parserArguments[0] == "true" - return model.FirmataCommandParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), response) - } - return nil, errors.Errorf("Unsupported type %s", typeName) + switch typeName { + case "SysexCommand": + response := parserArguments[0] == "true" + return model.SysexCommandParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), response ) + case "FirmataMessage": + response := parserArguments[0] == "true" + return model.FirmataMessageParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), response ) + case "FirmataCommand": + response := parserArguments[0] == "true" + return model.FirmataCommandParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), response ) + } + return nil, errors.Errorf("Unsupported type %s", typeName) } diff --git a/plc4go/protocols/firmata/readwrite/model/FirmataCommand.go b/plc4go/protocols/firmata/readwrite/model/FirmataCommand.go index 240ade3bfba..8884a099c44 100644 --- a/plc4go/protocols/firmata/readwrite/model/FirmataCommand.go +++ b/plc4go/protocols/firmata/readwrite/model/FirmataCommand.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // FirmataCommand is the corresponding interface of FirmataCommand type FirmataCommand interface { @@ -56,6 +58,7 @@ type _FirmataCommandChildRequirements interface { GetCommandCode() uint8 } + type FirmataCommandParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child FirmataCommand, serializeChildFunction func() error) error GetTypeName() string @@ -63,21 +66,22 @@ type FirmataCommandParent interface { type FirmataCommandChild interface { utils.Serializable - InitializeParent(parent FirmataCommand) +InitializeParent(parent FirmataCommand ) GetParent() *FirmataCommand GetTypeName() string FirmataCommand } + // NewFirmataCommand factory function for _FirmataCommand -func NewFirmataCommand(response bool) *_FirmataCommand { - return &_FirmataCommand{Response: response} +func NewFirmataCommand( response bool ) *_FirmataCommand { +return &_FirmataCommand{ Response: response } } // Deprecated: use the interface for direct cast func CastFirmataCommand(structType interface{}) FirmataCommand { - if casted, ok := structType.(FirmataCommand); ok { + if casted, ok := structType.(FirmataCommand); ok { return casted } if casted, ok := structType.(*FirmataCommand); ok { @@ -90,10 +94,11 @@ func (m *_FirmataCommand) GetTypeName() string { return "FirmataCommand" } + func (m *_FirmataCommand) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Discriminator Field (commandCode) - lengthInBits += 4 + lengthInBits += 4; return lengthInBits } @@ -124,22 +129,22 @@ func FirmataCommandParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type FirmataCommandChildSerializeRequirement interface { FirmataCommand - InitializeParent(FirmataCommand) + InitializeParent(FirmataCommand ) GetParent() FirmataCommand } var _childTemp interface{} var _child FirmataCommandChildSerializeRequirement var typeSwitchError error switch { - case commandCode == 0x0: // FirmataCommandSysex +case commandCode == 0x0 : // FirmataCommandSysex _childTemp, typeSwitchError = FirmataCommandSysexParseWithBuffer(ctx, readBuffer, response) - case commandCode == 0x4: // FirmataCommandSetPinMode +case commandCode == 0x4 : // FirmataCommandSetPinMode _childTemp, typeSwitchError = FirmataCommandSetPinModeParseWithBuffer(ctx, readBuffer, response) - case commandCode == 0x5: // FirmataCommandSetDigitalPinValue +case commandCode == 0x5 : // FirmataCommandSetDigitalPinValue _childTemp, typeSwitchError = FirmataCommandSetDigitalPinValueParseWithBuffer(ctx, readBuffer, response) - case commandCode == 0x9: // FirmataCommandProtocolVersion +case commandCode == 0x9 : // FirmataCommandProtocolVersion _childTemp, typeSwitchError = FirmataCommandProtocolVersionParseWithBuffer(ctx, readBuffer, response) - case commandCode == 0xF: // FirmataCommandSystemReset +case commandCode == 0xF : // FirmataCommandSystemReset _childTemp, typeSwitchError = FirmataCommandSystemResetParseWithBuffer(ctx, readBuffer, response) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [commandCode=%v]", commandCode) @@ -154,7 +159,7 @@ func FirmataCommandParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf } // Finish initializing - _child.InitializeParent(_child) +_child.InitializeParent(_child ) return _child, nil } @@ -164,7 +169,7 @@ func (pm *_FirmataCommand) SerializeParent(ctx context.Context, writeBuffer util _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("FirmataCommand"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("FirmataCommand"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for FirmataCommand") } @@ -187,13 +192,13 @@ func (pm *_FirmataCommand) SerializeParent(ctx context.Context, writeBuffer util return nil } + //// // Arguments Getter func (m *_FirmataCommand) GetResponse() bool { return m.Response } - // //// @@ -211,3 +216,6 @@ func (m *_FirmataCommand) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/firmata/readwrite/model/FirmataCommandProtocolVersion.go b/plc4go/protocols/firmata/readwrite/model/FirmataCommandProtocolVersion.go index 6fdab02b51b..fe4b776dc14 100644 --- a/plc4go/protocols/firmata/readwrite/model/FirmataCommandProtocolVersion.go +++ b/plc4go/protocols/firmata/readwrite/model/FirmataCommandProtocolVersion.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // FirmataCommandProtocolVersion is the corresponding interface of FirmataCommandProtocolVersion type FirmataCommandProtocolVersion interface { @@ -48,30 +50,30 @@ type FirmataCommandProtocolVersionExactly interface { // _FirmataCommandProtocolVersion is the data-structure of this message type _FirmataCommandProtocolVersion struct { *_FirmataCommand - MajorVersion uint8 - MinorVersion uint8 + MajorVersion uint8 + MinorVersion uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_FirmataCommandProtocolVersion) GetCommandCode() uint8 { - return 0x9 -} +func (m *_FirmataCommandProtocolVersion) GetCommandCode() uint8 { +return 0x9} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_FirmataCommandProtocolVersion) InitializeParent(parent FirmataCommand) {} +func (m *_FirmataCommandProtocolVersion) InitializeParent(parent FirmataCommand ) {} -func (m *_FirmataCommandProtocolVersion) GetParent() FirmataCommand { +func (m *_FirmataCommandProtocolVersion) GetParent() FirmataCommand { return m._FirmataCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_FirmataCommandProtocolVersion) GetMinorVersion() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewFirmataCommandProtocolVersion factory function for _FirmataCommandProtocolVersion -func NewFirmataCommandProtocolVersion(majorVersion uint8, minorVersion uint8, response bool) *_FirmataCommandProtocolVersion { +func NewFirmataCommandProtocolVersion( majorVersion uint8 , minorVersion uint8 , response bool ) *_FirmataCommandProtocolVersion { _result := &_FirmataCommandProtocolVersion{ - MajorVersion: majorVersion, - MinorVersion: minorVersion, - _FirmataCommand: NewFirmataCommand(response), + MajorVersion: majorVersion, + MinorVersion: minorVersion, + _FirmataCommand: NewFirmataCommand(response), } _result._FirmataCommand._FirmataCommandChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewFirmataCommandProtocolVersion(majorVersion uint8, minorVersion uint8, re // Deprecated: use the interface for direct cast func CastFirmataCommandProtocolVersion(structType interface{}) FirmataCommandProtocolVersion { - if casted, ok := structType.(FirmataCommandProtocolVersion); ok { + if casted, ok := structType.(FirmataCommandProtocolVersion); ok { return casted } if casted, ok := structType.(*FirmataCommandProtocolVersion); ok { @@ -120,14 +123,15 @@ func (m *_FirmataCommandProtocolVersion) GetLengthInBits(ctx context.Context) ui lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (majorVersion) - lengthInBits += 8 + lengthInBits += 8; // Simple field (minorVersion) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_FirmataCommandProtocolVersion) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -146,14 +150,14 @@ func FirmataCommandProtocolVersionParseWithBuffer(ctx context.Context, readBuffe _ = currentPos // Simple Field (majorVersion) - _majorVersion, _majorVersionErr := readBuffer.ReadUint8("majorVersion", 8) +_majorVersion, _majorVersionErr := readBuffer.ReadUint8("majorVersion", 8) if _majorVersionErr != nil { return nil, errors.Wrap(_majorVersionErr, "Error parsing 'majorVersion' field of FirmataCommandProtocolVersion") } majorVersion := _majorVersion // Simple Field (minorVersion) - _minorVersion, _minorVersionErr := readBuffer.ReadUint8("minorVersion", 8) +_minorVersion, _minorVersionErr := readBuffer.ReadUint8("minorVersion", 8) if _minorVersionErr != nil { return nil, errors.Wrap(_minorVersionErr, "Error parsing 'minorVersion' field of FirmataCommandProtocolVersion") } @@ -191,19 +195,19 @@ func (m *_FirmataCommandProtocolVersion) SerializeWithWriteBuffer(ctx context.Co return errors.Wrap(pushErr, "Error pushing for FirmataCommandProtocolVersion") } - // Simple Field (majorVersion) - majorVersion := uint8(m.GetMajorVersion()) - _majorVersionErr := writeBuffer.WriteUint8("majorVersion", 8, (majorVersion)) - if _majorVersionErr != nil { - return errors.Wrap(_majorVersionErr, "Error serializing 'majorVersion' field") - } + // Simple Field (majorVersion) + majorVersion := uint8(m.GetMajorVersion()) + _majorVersionErr := writeBuffer.WriteUint8("majorVersion", 8, (majorVersion)) + if _majorVersionErr != nil { + return errors.Wrap(_majorVersionErr, "Error serializing 'majorVersion' field") + } - // Simple Field (minorVersion) - minorVersion := uint8(m.GetMinorVersion()) - _minorVersionErr := writeBuffer.WriteUint8("minorVersion", 8, (minorVersion)) - if _minorVersionErr != nil { - return errors.Wrap(_minorVersionErr, "Error serializing 'minorVersion' field") - } + // Simple Field (minorVersion) + minorVersion := uint8(m.GetMinorVersion()) + _minorVersionErr := writeBuffer.WriteUint8("minorVersion", 8, (minorVersion)) + if _minorVersionErr != nil { + return errors.Wrap(_minorVersionErr, "Error serializing 'minorVersion' field") + } if popErr := writeBuffer.PopContext("FirmataCommandProtocolVersion"); popErr != nil { return errors.Wrap(popErr, "Error popping for FirmataCommandProtocolVersion") @@ -213,6 +217,7 @@ func (m *_FirmataCommandProtocolVersion) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_FirmataCommandProtocolVersion) isFirmataCommandProtocolVersion() bool { return true } @@ -227,3 +232,6 @@ func (m *_FirmataCommandProtocolVersion) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/firmata/readwrite/model/FirmataCommandSetDigitalPinValue.go b/plc4go/protocols/firmata/readwrite/model/FirmataCommandSetDigitalPinValue.go index 08a5ddfe630..4bbcc7c5ebd 100644 --- a/plc4go/protocols/firmata/readwrite/model/FirmataCommandSetDigitalPinValue.go +++ b/plc4go/protocols/firmata/readwrite/model/FirmataCommandSetDigitalPinValue.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // FirmataCommandSetDigitalPinValue is the corresponding interface of FirmataCommandSetDigitalPinValue type FirmataCommandSetDigitalPinValue interface { @@ -48,32 +50,32 @@ type FirmataCommandSetDigitalPinValueExactly interface { // _FirmataCommandSetDigitalPinValue is the data-structure of this message type _FirmataCommandSetDigitalPinValue struct { *_FirmataCommand - Pin uint8 - On bool + Pin uint8 + On bool // Reserved Fields reservedField0 *uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_FirmataCommandSetDigitalPinValue) GetCommandCode() uint8 { - return 0x5 -} +func (m *_FirmataCommandSetDigitalPinValue) GetCommandCode() uint8 { +return 0x5} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_FirmataCommandSetDigitalPinValue) InitializeParent(parent FirmataCommand) {} +func (m *_FirmataCommandSetDigitalPinValue) InitializeParent(parent FirmataCommand ) {} -func (m *_FirmataCommandSetDigitalPinValue) GetParent() FirmataCommand { +func (m *_FirmataCommandSetDigitalPinValue) GetParent() FirmataCommand { return m._FirmataCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,12 +94,13 @@ func (m *_FirmataCommandSetDigitalPinValue) GetOn() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewFirmataCommandSetDigitalPinValue factory function for _FirmataCommandSetDigitalPinValue -func NewFirmataCommandSetDigitalPinValue(pin uint8, on bool, response bool) *_FirmataCommandSetDigitalPinValue { +func NewFirmataCommandSetDigitalPinValue( pin uint8 , on bool , response bool ) *_FirmataCommandSetDigitalPinValue { _result := &_FirmataCommandSetDigitalPinValue{ - Pin: pin, - On: on, - _FirmataCommand: NewFirmataCommand(response), + Pin: pin, + On: on, + _FirmataCommand: NewFirmataCommand(response), } _result._FirmataCommand._FirmataCommandChildRequirements = _result return _result @@ -105,7 +108,7 @@ func NewFirmataCommandSetDigitalPinValue(pin uint8, on bool, response bool) *_Fi // Deprecated: use the interface for direct cast func CastFirmataCommandSetDigitalPinValue(structType interface{}) FirmataCommandSetDigitalPinValue { - if casted, ok := structType.(FirmataCommandSetDigitalPinValue); ok { + if casted, ok := structType.(FirmataCommandSetDigitalPinValue); ok { return casted } if casted, ok := structType.(*FirmataCommandSetDigitalPinValue); ok { @@ -122,17 +125,18 @@ func (m *_FirmataCommandSetDigitalPinValue) GetLengthInBits(ctx context.Context) lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (pin) - lengthInBits += 8 + lengthInBits += 8; // Reserved Field (reserved) lengthInBits += 7 // Simple field (on) - lengthInBits += 1 + lengthInBits += 1; return lengthInBits } + func (m *_FirmataCommandSetDigitalPinValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,7 +155,7 @@ func FirmataCommandSetDigitalPinValueParseWithBuffer(ctx context.Context, readBu _ = currentPos // Simple Field (pin) - _pin, _pinErr := readBuffer.ReadUint8("pin", 8) +_pin, _pinErr := readBuffer.ReadUint8("pin", 8) if _pinErr != nil { return nil, errors.Wrap(_pinErr, "Error parsing 'pin' field of FirmataCommandSetDigitalPinValue") } @@ -167,7 +171,7 @@ func FirmataCommandSetDigitalPinValueParseWithBuffer(ctx context.Context, readBu if reserved != uint8(0x00) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -175,7 +179,7 @@ func FirmataCommandSetDigitalPinValueParseWithBuffer(ctx context.Context, readBu } // Simple Field (on) - _on, _onErr := readBuffer.ReadBit("on") +_on, _onErr := readBuffer.ReadBit("on") if _onErr != nil { return nil, errors.Wrap(_onErr, "Error parsing 'on' field of FirmataCommandSetDigitalPinValue") } @@ -190,8 +194,8 @@ func FirmataCommandSetDigitalPinValueParseWithBuffer(ctx context.Context, readBu _FirmataCommand: &_FirmataCommand{ Response: response, }, - Pin: pin, - On: on, + Pin: pin, + On: on, reservedField0: reservedField0, } _child._FirmataCommand._FirmataCommandChildRequirements = _child @@ -214,35 +218,35 @@ func (m *_FirmataCommandSetDigitalPinValue) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for FirmataCommandSetDigitalPinValue") } - // Simple Field (pin) - pin := uint8(m.GetPin()) - _pinErr := writeBuffer.WriteUint8("pin", 8, (pin)) - if _pinErr != nil { - return errors.Wrap(_pinErr, "Error serializing 'pin' field") - } + // Simple Field (pin) + pin := uint8(m.GetPin()) + _pinErr := writeBuffer.WriteUint8("pin", 8, (pin)) + if _pinErr != nil { + return errors.Wrap(_pinErr, "Error serializing 'pin' field") + } - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0x00) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0x00), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteUint8("reserved", 7, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0x00) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0x00), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 } - - // Simple Field (on) - on := bool(m.GetOn()) - _onErr := writeBuffer.WriteBit("on", (on)) - if _onErr != nil { - return errors.Wrap(_onErr, "Error serializing 'on' field") + _err := writeBuffer.WriteUint8("reserved", 7, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } + + // Simple Field (on) + on := bool(m.GetOn()) + _onErr := writeBuffer.WriteBit("on", (on)) + if _onErr != nil { + return errors.Wrap(_onErr, "Error serializing 'on' field") + } if popErr := writeBuffer.PopContext("FirmataCommandSetDigitalPinValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for FirmataCommandSetDigitalPinValue") @@ -252,6 +256,7 @@ func (m *_FirmataCommandSetDigitalPinValue) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_FirmataCommandSetDigitalPinValue) isFirmataCommandSetDigitalPinValue() bool { return true } @@ -266,3 +271,6 @@ func (m *_FirmataCommandSetDigitalPinValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/firmata/readwrite/model/FirmataCommandSetPinMode.go b/plc4go/protocols/firmata/readwrite/model/FirmataCommandSetPinMode.go index af1964d5404..99c3ab9c0dd 100644 --- a/plc4go/protocols/firmata/readwrite/model/FirmataCommandSetPinMode.go +++ b/plc4go/protocols/firmata/readwrite/model/FirmataCommandSetPinMode.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // FirmataCommandSetPinMode is the corresponding interface of FirmataCommandSetPinMode type FirmataCommandSetPinMode interface { @@ -48,30 +50,30 @@ type FirmataCommandSetPinModeExactly interface { // _FirmataCommandSetPinMode is the data-structure of this message type _FirmataCommandSetPinMode struct { *_FirmataCommand - Pin uint8 - Mode PinMode + Pin uint8 + Mode PinMode } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_FirmataCommandSetPinMode) GetCommandCode() uint8 { - return 0x4 -} +func (m *_FirmataCommandSetPinMode) GetCommandCode() uint8 { +return 0x4} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_FirmataCommandSetPinMode) InitializeParent(parent FirmataCommand) {} +func (m *_FirmataCommandSetPinMode) InitializeParent(parent FirmataCommand ) {} -func (m *_FirmataCommandSetPinMode) GetParent() FirmataCommand { +func (m *_FirmataCommandSetPinMode) GetParent() FirmataCommand { return m._FirmataCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_FirmataCommandSetPinMode) GetMode() PinMode { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewFirmataCommandSetPinMode factory function for _FirmataCommandSetPinMode -func NewFirmataCommandSetPinMode(pin uint8, mode PinMode, response bool) *_FirmataCommandSetPinMode { +func NewFirmataCommandSetPinMode( pin uint8 , mode PinMode , response bool ) *_FirmataCommandSetPinMode { _result := &_FirmataCommandSetPinMode{ - Pin: pin, - Mode: mode, - _FirmataCommand: NewFirmataCommand(response), + Pin: pin, + Mode: mode, + _FirmataCommand: NewFirmataCommand(response), } _result._FirmataCommand._FirmataCommandChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewFirmataCommandSetPinMode(pin uint8, mode PinMode, response bool) *_Firma // Deprecated: use the interface for direct cast func CastFirmataCommandSetPinMode(structType interface{}) FirmataCommandSetPinMode { - if casted, ok := structType.(FirmataCommandSetPinMode); ok { + if casted, ok := structType.(FirmataCommandSetPinMode); ok { return casted } if casted, ok := structType.(*FirmataCommandSetPinMode); ok { @@ -120,7 +123,7 @@ func (m *_FirmataCommandSetPinMode) GetLengthInBits(ctx context.Context) uint16 lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (pin) - lengthInBits += 8 + lengthInBits += 8; // Simple field (mode) lengthInBits += 8 @@ -128,6 +131,7 @@ func (m *_FirmataCommandSetPinMode) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_FirmataCommandSetPinMode) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -146,7 +150,7 @@ func FirmataCommandSetPinModeParseWithBuffer(ctx context.Context, readBuffer uti _ = currentPos // Simple Field (pin) - _pin, _pinErr := readBuffer.ReadUint8("pin", 8) +_pin, _pinErr := readBuffer.ReadUint8("pin", 8) if _pinErr != nil { return nil, errors.Wrap(_pinErr, "Error parsing 'pin' field of FirmataCommandSetPinMode") } @@ -156,7 +160,7 @@ func FirmataCommandSetPinModeParseWithBuffer(ctx context.Context, readBuffer uti if pullErr := readBuffer.PullContext("mode"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for mode") } - _mode, _modeErr := PinModeParseWithBuffer(ctx, readBuffer) +_mode, _modeErr := PinModeParseWithBuffer(ctx, readBuffer) if _modeErr != nil { return nil, errors.Wrap(_modeErr, "Error parsing 'mode' field of FirmataCommandSetPinMode") } @@ -174,7 +178,7 @@ func FirmataCommandSetPinModeParseWithBuffer(ctx context.Context, readBuffer uti _FirmataCommand: &_FirmataCommand{ Response: response, }, - Pin: pin, + Pin: pin, Mode: mode, } _child._FirmataCommand._FirmataCommandChildRequirements = _child @@ -197,24 +201,24 @@ func (m *_FirmataCommandSetPinMode) SerializeWithWriteBuffer(ctx context.Context return errors.Wrap(pushErr, "Error pushing for FirmataCommandSetPinMode") } - // Simple Field (pin) - pin := uint8(m.GetPin()) - _pinErr := writeBuffer.WriteUint8("pin", 8, (pin)) - if _pinErr != nil { - return errors.Wrap(_pinErr, "Error serializing 'pin' field") - } + // Simple Field (pin) + pin := uint8(m.GetPin()) + _pinErr := writeBuffer.WriteUint8("pin", 8, (pin)) + if _pinErr != nil { + return errors.Wrap(_pinErr, "Error serializing 'pin' field") + } - // Simple Field (mode) - if pushErr := writeBuffer.PushContext("mode"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for mode") - } - _modeErr := writeBuffer.WriteSerializable(ctx, m.GetMode()) - if popErr := writeBuffer.PopContext("mode"); popErr != nil { - return errors.Wrap(popErr, "Error popping for mode") - } - if _modeErr != nil { - return errors.Wrap(_modeErr, "Error serializing 'mode' field") - } + // Simple Field (mode) + if pushErr := writeBuffer.PushContext("mode"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for mode") + } + _modeErr := writeBuffer.WriteSerializable(ctx, m.GetMode()) + if popErr := writeBuffer.PopContext("mode"); popErr != nil { + return errors.Wrap(popErr, "Error popping for mode") + } + if _modeErr != nil { + return errors.Wrap(_modeErr, "Error serializing 'mode' field") + } if popErr := writeBuffer.PopContext("FirmataCommandSetPinMode"); popErr != nil { return errors.Wrap(popErr, "Error popping for FirmataCommandSetPinMode") @@ -224,6 +228,7 @@ func (m *_FirmataCommandSetPinMode) SerializeWithWriteBuffer(ctx context.Context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_FirmataCommandSetPinMode) isFirmataCommandSetPinMode() bool { return true } @@ -238,3 +243,6 @@ func (m *_FirmataCommandSetPinMode) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/firmata/readwrite/model/FirmataCommandSysex.go b/plc4go/protocols/firmata/readwrite/model/FirmataCommandSysex.go index bc63414b6ff..28ffc81a56b 100644 --- a/plc4go/protocols/firmata/readwrite/model/FirmataCommandSysex.go +++ b/plc4go/protocols/firmata/readwrite/model/FirmataCommandSysex.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // FirmataCommandSysex is the corresponding interface of FirmataCommandSysex type FirmataCommandSysex interface { @@ -46,31 +48,31 @@ type FirmataCommandSysexExactly interface { // _FirmataCommandSysex is the data-structure of this message type _FirmataCommandSysex struct { *_FirmataCommand - Command SysexCommand + Command SysexCommand // Reserved Fields reservedField0 *uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_FirmataCommandSysex) GetCommandCode() uint8 { - return 0x0 -} +func (m *_FirmataCommandSysex) GetCommandCode() uint8 { +return 0x0} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_FirmataCommandSysex) InitializeParent(parent FirmataCommand) {} +func (m *_FirmataCommandSysex) InitializeParent(parent FirmataCommand ) {} -func (m *_FirmataCommandSysex) GetParent() FirmataCommand { +func (m *_FirmataCommandSysex) GetParent() FirmataCommand { return m._FirmataCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -85,11 +87,12 @@ func (m *_FirmataCommandSysex) GetCommand() SysexCommand { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewFirmataCommandSysex factory function for _FirmataCommandSysex -func NewFirmataCommandSysex(command SysexCommand, response bool) *_FirmataCommandSysex { +func NewFirmataCommandSysex( command SysexCommand , response bool ) *_FirmataCommandSysex { _result := &_FirmataCommandSysex{ - Command: command, - _FirmataCommand: NewFirmataCommand(response), + Command: command, + _FirmataCommand: NewFirmataCommand(response), } _result._FirmataCommand._FirmataCommandChildRequirements = _result return _result @@ -97,7 +100,7 @@ func NewFirmataCommandSysex(command SysexCommand, response bool) *_FirmataComman // Deprecated: use the interface for direct cast func CastFirmataCommandSysex(structType interface{}) FirmataCommandSysex { - if casted, ok := structType.(FirmataCommandSysex); ok { + if casted, ok := structType.(FirmataCommandSysex); ok { return casted } if casted, ok := structType.(*FirmataCommandSysex); ok { @@ -122,6 +125,7 @@ func (m *_FirmataCommandSysex) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_FirmataCommandSysex) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -143,7 +147,7 @@ func FirmataCommandSysexParseWithBuffer(ctx context.Context, readBuffer utils.Re if pullErr := readBuffer.PullContext("command"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for command") } - _command, _commandErr := SysexCommandParseWithBuffer(ctx, readBuffer, bool(response)) +_command, _commandErr := SysexCommandParseWithBuffer(ctx, readBuffer , bool( response ) ) if _commandErr != nil { return nil, errors.Wrap(_commandErr, "Error parsing 'command' field of FirmataCommandSysex") } @@ -162,7 +166,7 @@ func FirmataCommandSysexParseWithBuffer(ctx context.Context, readBuffer utils.Re if reserved != uint8(0xF7) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0xF7), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -178,7 +182,7 @@ func FirmataCommandSysexParseWithBuffer(ctx context.Context, readBuffer utils.Re _FirmataCommand: &_FirmataCommand{ Response: response, }, - Command: command, + Command: command, reservedField0: reservedField0, } _child._FirmataCommand._FirmataCommandChildRequirements = _child @@ -201,33 +205,33 @@ func (m *_FirmataCommandSysex) SerializeWithWriteBuffer(ctx context.Context, wri return errors.Wrap(pushErr, "Error pushing for FirmataCommandSysex") } - // Simple Field (command) - if pushErr := writeBuffer.PushContext("command"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for command") - } - _commandErr := writeBuffer.WriteSerializable(ctx, m.GetCommand()) - if popErr := writeBuffer.PopContext("command"); popErr != nil { - return errors.Wrap(popErr, "Error popping for command") - } - if _commandErr != nil { - return errors.Wrap(_commandErr, "Error serializing 'command' field") - } + // Simple Field (command) + if pushErr := writeBuffer.PushContext("command"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for command") + } + _commandErr := writeBuffer.WriteSerializable(ctx, m.GetCommand()) + if popErr := writeBuffer.PopContext("command"); popErr != nil { + return errors.Wrap(popErr, "Error popping for command") + } + if _commandErr != nil { + return errors.Wrap(_commandErr, "Error serializing 'command' field") + } - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0xF7) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0xF7), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteUint8("reserved", 8, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0xF7) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0xF7), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 } + _err := writeBuffer.WriteUint8("reserved", 8, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") + } + } if popErr := writeBuffer.PopContext("FirmataCommandSysex"); popErr != nil { return errors.Wrap(popErr, "Error popping for FirmataCommandSysex") @@ -237,6 +241,7 @@ func (m *_FirmataCommandSysex) SerializeWithWriteBuffer(ctx context.Context, wri return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_FirmataCommandSysex) isFirmataCommandSysex() bool { return true } @@ -251,3 +256,6 @@ func (m *_FirmataCommandSysex) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/firmata/readwrite/model/FirmataCommandSystemReset.go b/plc4go/protocols/firmata/readwrite/model/FirmataCommandSystemReset.go index 393f47104b1..e7a52589c5a 100644 --- a/plc4go/protocols/firmata/readwrite/model/FirmataCommandSystemReset.go +++ b/plc4go/protocols/firmata/readwrite/model/FirmataCommandSystemReset.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // FirmataCommandSystemReset is the corresponding interface of FirmataCommandSystemReset type FirmataCommandSystemReset interface { @@ -46,30 +48,32 @@ type _FirmataCommandSystemReset struct { *_FirmataCommand } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_FirmataCommandSystemReset) GetCommandCode() uint8 { - return 0xF -} +func (m *_FirmataCommandSystemReset) GetCommandCode() uint8 { +return 0xF} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_FirmataCommandSystemReset) InitializeParent(parent FirmataCommand) {} +func (m *_FirmataCommandSystemReset) InitializeParent(parent FirmataCommand ) {} -func (m *_FirmataCommandSystemReset) GetParent() FirmataCommand { +func (m *_FirmataCommandSystemReset) GetParent() FirmataCommand { return m._FirmataCommand } + // NewFirmataCommandSystemReset factory function for _FirmataCommandSystemReset -func NewFirmataCommandSystemReset(response bool) *_FirmataCommandSystemReset { +func NewFirmataCommandSystemReset( response bool ) *_FirmataCommandSystemReset { _result := &_FirmataCommandSystemReset{ - _FirmataCommand: NewFirmataCommand(response), + _FirmataCommand: NewFirmataCommand(response), } _result._FirmataCommand._FirmataCommandChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewFirmataCommandSystemReset(response bool) *_FirmataCommandSystemReset { // Deprecated: use the interface for direct cast func CastFirmataCommandSystemReset(structType interface{}) FirmataCommandSystemReset { - if casted, ok := structType.(FirmataCommandSystemReset); ok { + if casted, ok := structType.(FirmataCommandSystemReset); ok { return casted } if casted, ok := structType.(*FirmataCommandSystemReset); ok { @@ -96,6 +100,7 @@ func (m *_FirmataCommandSystemReset) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_FirmataCommandSystemReset) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_FirmataCommandSystemReset) SerializeWithWriteBuffer(ctx context.Contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_FirmataCommandSystemReset) isFirmataCommandSystemReset() bool { return true } @@ -165,3 +171,6 @@ func (m *_FirmataCommandSystemReset) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/firmata/readwrite/model/FirmataMessage.go b/plc4go/protocols/firmata/readwrite/model/FirmataMessage.go index 032b601955a..130445fb445 100644 --- a/plc4go/protocols/firmata/readwrite/model/FirmataMessage.go +++ b/plc4go/protocols/firmata/readwrite/model/FirmataMessage.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // FirmataMessage is the corresponding interface of FirmataMessage type FirmataMessage interface { @@ -57,6 +59,7 @@ type _FirmataMessageChildRequirements interface { GetMessageType() uint8 } + type FirmataMessageParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child FirmataMessage, serializeChildFunction func() error) error GetTypeName() string @@ -64,21 +67,22 @@ type FirmataMessageParent interface { type FirmataMessageChild interface { utils.Serializable - InitializeParent(parent FirmataMessage) +InitializeParent(parent FirmataMessage ) GetParent() *FirmataMessage GetTypeName() string FirmataMessage } + // NewFirmataMessage factory function for _FirmataMessage -func NewFirmataMessage(response bool) *_FirmataMessage { - return &_FirmataMessage{Response: response} +func NewFirmataMessage( response bool ) *_FirmataMessage { +return &_FirmataMessage{ Response: response } } // Deprecated: use the interface for direct cast func CastFirmataMessage(structType interface{}) FirmataMessage { - if casted, ok := structType.(FirmataMessage); ok { + if casted, ok := structType.(FirmataMessage); ok { return casted } if casted, ok := structType.(*FirmataMessage); ok { @@ -91,10 +95,11 @@ func (m *_FirmataMessage) GetTypeName() string { return "FirmataMessage" } + func (m *_FirmataMessage) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Discriminator Field (messageType) - lengthInBits += 4 + lengthInBits += 4; return lengthInBits } @@ -125,22 +130,22 @@ func FirmataMessageParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type FirmataMessageChildSerializeRequirement interface { FirmataMessage - InitializeParent(FirmataMessage) + InitializeParent(FirmataMessage ) GetParent() FirmataMessage } var _childTemp interface{} var _child FirmataMessageChildSerializeRequirement var typeSwitchError error switch { - case messageType == 0xE: // FirmataMessageAnalogIO +case messageType == 0xE : // FirmataMessageAnalogIO _childTemp, typeSwitchError = FirmataMessageAnalogIOParseWithBuffer(ctx, readBuffer, response) - case messageType == 0x9: // FirmataMessageDigitalIO +case messageType == 0x9 : // FirmataMessageDigitalIO _childTemp, typeSwitchError = FirmataMessageDigitalIOParseWithBuffer(ctx, readBuffer, response) - case messageType == 0xC: // FirmataMessageSubscribeAnalogPinValue +case messageType == 0xC : // FirmataMessageSubscribeAnalogPinValue _childTemp, typeSwitchError = FirmataMessageSubscribeAnalogPinValueParseWithBuffer(ctx, readBuffer, response) - case messageType == 0xD: // FirmataMessageSubscribeDigitalPinValue +case messageType == 0xD : // FirmataMessageSubscribeDigitalPinValue _childTemp, typeSwitchError = FirmataMessageSubscribeDigitalPinValueParseWithBuffer(ctx, readBuffer, response) - case messageType == 0xF: // FirmataMessageCommand +case messageType == 0xF : // FirmataMessageCommand _childTemp, typeSwitchError = FirmataMessageCommandParseWithBuffer(ctx, readBuffer, response) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [messageType=%v]", messageType) @@ -155,7 +160,7 @@ func FirmataMessageParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf } // Finish initializing - _child.InitializeParent(_child) +_child.InitializeParent(_child ) return _child, nil } @@ -165,7 +170,7 @@ func (pm *_FirmataMessage) SerializeParent(ctx context.Context, writeBuffer util _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("FirmataMessage"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("FirmataMessage"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for FirmataMessage") } @@ -188,13 +193,13 @@ func (pm *_FirmataMessage) SerializeParent(ctx context.Context, writeBuffer util return nil } + //// // Arguments Getter func (m *_FirmataMessage) GetResponse() bool { return m.Response } - // //// @@ -212,3 +217,6 @@ func (m *_FirmataMessage) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/firmata/readwrite/model/FirmataMessageAnalogIO.go b/plc4go/protocols/firmata/readwrite/model/FirmataMessageAnalogIO.go index 90d667aaee2..9750516897b 100644 --- a/plc4go/protocols/firmata/readwrite/model/FirmataMessageAnalogIO.go +++ b/plc4go/protocols/firmata/readwrite/model/FirmataMessageAnalogIO.go @@ -19,15 +19,17 @@ package model + import ( "context" "encoding/binary" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // FirmataMessageAnalogIO is the corresponding interface of FirmataMessageAnalogIO type FirmataMessageAnalogIO interface { @@ -50,30 +52,30 @@ type FirmataMessageAnalogIOExactly interface { // _FirmataMessageAnalogIO is the data-structure of this message type _FirmataMessageAnalogIO struct { *_FirmataMessage - Pin uint8 - Data []int8 + Pin uint8 + Data []int8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_FirmataMessageAnalogIO) GetMessageType() uint8 { - return 0xE -} +func (m *_FirmataMessageAnalogIO) GetMessageType() uint8 { +return 0xE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_FirmataMessageAnalogIO) InitializeParent(parent FirmataMessage) {} +func (m *_FirmataMessageAnalogIO) InitializeParent(parent FirmataMessage ) {} -func (m *_FirmataMessageAnalogIO) GetParent() FirmataMessage { +func (m *_FirmataMessageAnalogIO) GetParent() FirmataMessage { return m._FirmataMessage } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,12 +94,13 @@ func (m *_FirmataMessageAnalogIO) GetData() []int8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewFirmataMessageAnalogIO factory function for _FirmataMessageAnalogIO -func NewFirmataMessageAnalogIO(pin uint8, data []int8, response bool) *_FirmataMessageAnalogIO { +func NewFirmataMessageAnalogIO( pin uint8 , data []int8 , response bool ) *_FirmataMessageAnalogIO { _result := &_FirmataMessageAnalogIO{ - Pin: pin, - Data: data, - _FirmataMessage: NewFirmataMessage(response), + Pin: pin, + Data: data, + _FirmataMessage: NewFirmataMessage(response), } _result._FirmataMessage._FirmataMessageChildRequirements = _result return _result @@ -105,7 +108,7 @@ func NewFirmataMessageAnalogIO(pin uint8, data []int8, response bool) *_FirmataM // Deprecated: use the interface for direct cast func CastFirmataMessageAnalogIO(structType interface{}) FirmataMessageAnalogIO { - if casted, ok := structType.(FirmataMessageAnalogIO); ok { + if casted, ok := structType.(FirmataMessageAnalogIO); ok { return casted } if casted, ok := structType.(*FirmataMessageAnalogIO); ok { @@ -122,7 +125,7 @@ func (m *_FirmataMessageAnalogIO) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (pin) - lengthInBits += 4 + lengthInBits += 4; // Array field if len(m.Data) > 0 { @@ -132,6 +135,7 @@ func (m *_FirmataMessageAnalogIO) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_FirmataMessageAnalogIO) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -150,7 +154,7 @@ func FirmataMessageAnalogIOParseWithBuffer(ctx context.Context, readBuffer utils _ = currentPos // Simple Field (pin) - _pin, _pinErr := readBuffer.ReadUint8("pin", 4) +_pin, _pinErr := readBuffer.ReadUint8("pin", 4) if _pinErr != nil { return nil, errors.Wrap(_pinErr, "Error parsing 'pin' field of FirmataMessageAnalogIO") } @@ -172,7 +176,7 @@ func FirmataMessageAnalogIOParseWithBuffer(ctx context.Context, readBuffer utils arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := readBuffer.ReadInt8("", 8) +_item, _err := readBuffer.ReadInt8("", 8) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'data' field of FirmataMessageAnalogIO") } @@ -192,7 +196,7 @@ func FirmataMessageAnalogIOParseWithBuffer(ctx context.Context, readBuffer utils _FirmataMessage: &_FirmataMessage{ Response: response, }, - Pin: pin, + Pin: pin, Data: data, } _child._FirmataMessage._FirmataMessageChildRequirements = _child @@ -215,27 +219,27 @@ func (m *_FirmataMessageAnalogIO) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for FirmataMessageAnalogIO") } - // Simple Field (pin) - pin := uint8(m.GetPin()) - _pinErr := writeBuffer.WriteUint8("pin", 4, (pin)) - if _pinErr != nil { - return errors.Wrap(_pinErr, "Error serializing 'pin' field") - } + // Simple Field (pin) + pin := uint8(m.GetPin()) + _pinErr := writeBuffer.WriteUint8("pin", 4, (pin)) + if _pinErr != nil { + return errors.Wrap(_pinErr, "Error serializing 'pin' field") + } - // Array Field (data) - if pushErr := writeBuffer.PushContext("data", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for data") - } - for _curItem, _element := range m.GetData() { - _ = _curItem - _elementErr := writeBuffer.WriteInt8("", 8, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'data' field") - } - } - if popErr := writeBuffer.PopContext("data", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for data") + // Array Field (data) + if pushErr := writeBuffer.PushContext("data", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for data") + } + for _curItem, _element := range m.GetData() { + _ = _curItem + _elementErr := writeBuffer.WriteInt8("", 8, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'data' field") } + } + if popErr := writeBuffer.PopContext("data", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for data") + } if popErr := writeBuffer.PopContext("FirmataMessageAnalogIO"); popErr != nil { return errors.Wrap(popErr, "Error popping for FirmataMessageAnalogIO") @@ -245,6 +249,7 @@ func (m *_FirmataMessageAnalogIO) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_FirmataMessageAnalogIO) isFirmataMessageAnalogIO() bool { return true } @@ -259,3 +264,6 @@ func (m *_FirmataMessageAnalogIO) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/firmata/readwrite/model/FirmataMessageCommand.go b/plc4go/protocols/firmata/readwrite/model/FirmataMessageCommand.go index 7241f4ab4c6..7c334554cfe 100644 --- a/plc4go/protocols/firmata/readwrite/model/FirmataMessageCommand.go +++ b/plc4go/protocols/firmata/readwrite/model/FirmataMessageCommand.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // FirmataMessageCommand is the corresponding interface of FirmataMessageCommand type FirmataMessageCommand interface { @@ -47,29 +49,29 @@ type FirmataMessageCommandExactly interface { // _FirmataMessageCommand is the data-structure of this message type _FirmataMessageCommand struct { *_FirmataMessage - Command FirmataCommand + Command FirmataCommand } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_FirmataMessageCommand) GetMessageType() uint8 { - return 0xF -} +func (m *_FirmataMessageCommand) GetMessageType() uint8 { +return 0xF} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_FirmataMessageCommand) InitializeParent(parent FirmataMessage) {} +func (m *_FirmataMessageCommand) InitializeParent(parent FirmataMessage ) {} -func (m *_FirmataMessageCommand) GetParent() FirmataMessage { +func (m *_FirmataMessageCommand) GetParent() FirmataMessage { return m._FirmataMessage } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -84,11 +86,12 @@ func (m *_FirmataMessageCommand) GetCommand() FirmataCommand { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewFirmataMessageCommand factory function for _FirmataMessageCommand -func NewFirmataMessageCommand(command FirmataCommand, response bool) *_FirmataMessageCommand { +func NewFirmataMessageCommand( command FirmataCommand , response bool ) *_FirmataMessageCommand { _result := &_FirmataMessageCommand{ - Command: command, - _FirmataMessage: NewFirmataMessage(response), + Command: command, + _FirmataMessage: NewFirmataMessage(response), } _result._FirmataMessage._FirmataMessageChildRequirements = _result return _result @@ -96,7 +99,7 @@ func NewFirmataMessageCommand(command FirmataCommand, response bool) *_FirmataMe // Deprecated: use the interface for direct cast func CastFirmataMessageCommand(structType interface{}) FirmataMessageCommand { - if casted, ok := structType.(FirmataMessageCommand); ok { + if casted, ok := structType.(FirmataMessageCommand); ok { return casted } if casted, ok := structType.(*FirmataMessageCommand); ok { @@ -118,6 +121,7 @@ func (m *_FirmataMessageCommand) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_FirmataMessageCommand) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +143,7 @@ func FirmataMessageCommandParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("command"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for command") } - _command, _commandErr := FirmataCommandParseWithBuffer(ctx, readBuffer, bool(response)) +_command, _commandErr := FirmataCommandParseWithBuffer(ctx, readBuffer , bool( response ) ) if _commandErr != nil { return nil, errors.Wrap(_commandErr, "Error parsing 'command' field of FirmataMessageCommand") } @@ -179,17 +183,17 @@ func (m *_FirmataMessageCommand) SerializeWithWriteBuffer(ctx context.Context, w return errors.Wrap(pushErr, "Error pushing for FirmataMessageCommand") } - // Simple Field (command) - if pushErr := writeBuffer.PushContext("command"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for command") - } - _commandErr := writeBuffer.WriteSerializable(ctx, m.GetCommand()) - if popErr := writeBuffer.PopContext("command"); popErr != nil { - return errors.Wrap(popErr, "Error popping for command") - } - if _commandErr != nil { - return errors.Wrap(_commandErr, "Error serializing 'command' field") - } + // Simple Field (command) + if pushErr := writeBuffer.PushContext("command"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for command") + } + _commandErr := writeBuffer.WriteSerializable(ctx, m.GetCommand()) + if popErr := writeBuffer.PopContext("command"); popErr != nil { + return errors.Wrap(popErr, "Error popping for command") + } + if _commandErr != nil { + return errors.Wrap(_commandErr, "Error serializing 'command' field") + } if popErr := writeBuffer.PopContext("FirmataMessageCommand"); popErr != nil { return errors.Wrap(popErr, "Error popping for FirmataMessageCommand") @@ -199,6 +203,7 @@ func (m *_FirmataMessageCommand) SerializeWithWriteBuffer(ctx context.Context, w return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_FirmataMessageCommand) isFirmataMessageCommand() bool { return true } @@ -213,3 +218,6 @@ func (m *_FirmataMessageCommand) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/firmata/readwrite/model/FirmataMessageDigitalIO.go b/plc4go/protocols/firmata/readwrite/model/FirmataMessageDigitalIO.go index be29916c94f..205f4f11b93 100644 --- a/plc4go/protocols/firmata/readwrite/model/FirmataMessageDigitalIO.go +++ b/plc4go/protocols/firmata/readwrite/model/FirmataMessageDigitalIO.go @@ -19,15 +19,17 @@ package model + import ( "context" "encoding/binary" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // FirmataMessageDigitalIO is the corresponding interface of FirmataMessageDigitalIO type FirmataMessageDigitalIO interface { @@ -50,30 +52,30 @@ type FirmataMessageDigitalIOExactly interface { // _FirmataMessageDigitalIO is the data-structure of this message type _FirmataMessageDigitalIO struct { *_FirmataMessage - PinBlock uint8 - Data []int8 + PinBlock uint8 + Data []int8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_FirmataMessageDigitalIO) GetMessageType() uint8 { - return 0x9 -} +func (m *_FirmataMessageDigitalIO) GetMessageType() uint8 { +return 0x9} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_FirmataMessageDigitalIO) InitializeParent(parent FirmataMessage) {} +func (m *_FirmataMessageDigitalIO) InitializeParent(parent FirmataMessage ) {} -func (m *_FirmataMessageDigitalIO) GetParent() FirmataMessage { +func (m *_FirmataMessageDigitalIO) GetParent() FirmataMessage { return m._FirmataMessage } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,12 +94,13 @@ func (m *_FirmataMessageDigitalIO) GetData() []int8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewFirmataMessageDigitalIO factory function for _FirmataMessageDigitalIO -func NewFirmataMessageDigitalIO(pinBlock uint8, data []int8, response bool) *_FirmataMessageDigitalIO { +func NewFirmataMessageDigitalIO( pinBlock uint8 , data []int8 , response bool ) *_FirmataMessageDigitalIO { _result := &_FirmataMessageDigitalIO{ - PinBlock: pinBlock, - Data: data, - _FirmataMessage: NewFirmataMessage(response), + PinBlock: pinBlock, + Data: data, + _FirmataMessage: NewFirmataMessage(response), } _result._FirmataMessage._FirmataMessageChildRequirements = _result return _result @@ -105,7 +108,7 @@ func NewFirmataMessageDigitalIO(pinBlock uint8, data []int8, response bool) *_Fi // Deprecated: use the interface for direct cast func CastFirmataMessageDigitalIO(structType interface{}) FirmataMessageDigitalIO { - if casted, ok := structType.(FirmataMessageDigitalIO); ok { + if casted, ok := structType.(FirmataMessageDigitalIO); ok { return casted } if casted, ok := structType.(*FirmataMessageDigitalIO); ok { @@ -122,7 +125,7 @@ func (m *_FirmataMessageDigitalIO) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (pinBlock) - lengthInBits += 4 + lengthInBits += 4; // Array field if len(m.Data) > 0 { @@ -132,6 +135,7 @@ func (m *_FirmataMessageDigitalIO) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_FirmataMessageDigitalIO) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -150,7 +154,7 @@ func FirmataMessageDigitalIOParseWithBuffer(ctx context.Context, readBuffer util _ = currentPos // Simple Field (pinBlock) - _pinBlock, _pinBlockErr := readBuffer.ReadUint8("pinBlock", 4) +_pinBlock, _pinBlockErr := readBuffer.ReadUint8("pinBlock", 4) if _pinBlockErr != nil { return nil, errors.Wrap(_pinBlockErr, "Error parsing 'pinBlock' field of FirmataMessageDigitalIO") } @@ -172,7 +176,7 @@ func FirmataMessageDigitalIOParseWithBuffer(ctx context.Context, readBuffer util arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := readBuffer.ReadInt8("", 8) +_item, _err := readBuffer.ReadInt8("", 8) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'data' field of FirmataMessageDigitalIO") } @@ -193,7 +197,7 @@ func FirmataMessageDigitalIOParseWithBuffer(ctx context.Context, readBuffer util Response: response, }, PinBlock: pinBlock, - Data: data, + Data: data, } _child._FirmataMessage._FirmataMessageChildRequirements = _child return _child, nil @@ -215,27 +219,27 @@ func (m *_FirmataMessageDigitalIO) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for FirmataMessageDigitalIO") } - // Simple Field (pinBlock) - pinBlock := uint8(m.GetPinBlock()) - _pinBlockErr := writeBuffer.WriteUint8("pinBlock", 4, (pinBlock)) - if _pinBlockErr != nil { - return errors.Wrap(_pinBlockErr, "Error serializing 'pinBlock' field") - } + // Simple Field (pinBlock) + pinBlock := uint8(m.GetPinBlock()) + _pinBlockErr := writeBuffer.WriteUint8("pinBlock", 4, (pinBlock)) + if _pinBlockErr != nil { + return errors.Wrap(_pinBlockErr, "Error serializing 'pinBlock' field") + } - // Array Field (data) - if pushErr := writeBuffer.PushContext("data", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for data") - } - for _curItem, _element := range m.GetData() { - _ = _curItem - _elementErr := writeBuffer.WriteInt8("", 8, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'data' field") - } - } - if popErr := writeBuffer.PopContext("data", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for data") + // Array Field (data) + if pushErr := writeBuffer.PushContext("data", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for data") + } + for _curItem, _element := range m.GetData() { + _ = _curItem + _elementErr := writeBuffer.WriteInt8("", 8, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'data' field") } + } + if popErr := writeBuffer.PopContext("data", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for data") + } if popErr := writeBuffer.PopContext("FirmataMessageDigitalIO"); popErr != nil { return errors.Wrap(popErr, "Error popping for FirmataMessageDigitalIO") @@ -245,6 +249,7 @@ func (m *_FirmataMessageDigitalIO) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_FirmataMessageDigitalIO) isFirmataMessageDigitalIO() bool { return true } @@ -259,3 +264,6 @@ func (m *_FirmataMessageDigitalIO) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/firmata/readwrite/model/FirmataMessageSubscribeAnalogPinValue.go b/plc4go/protocols/firmata/readwrite/model/FirmataMessageSubscribeAnalogPinValue.go index ee9f5f85947..6996c0c97ee 100644 --- a/plc4go/protocols/firmata/readwrite/model/FirmataMessageSubscribeAnalogPinValue.go +++ b/plc4go/protocols/firmata/readwrite/model/FirmataMessageSubscribeAnalogPinValue.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // FirmataMessageSubscribeAnalogPinValue is the corresponding interface of FirmataMessageSubscribeAnalogPinValue type FirmataMessageSubscribeAnalogPinValue interface { @@ -49,32 +51,32 @@ type FirmataMessageSubscribeAnalogPinValueExactly interface { // _FirmataMessageSubscribeAnalogPinValue is the data-structure of this message type _FirmataMessageSubscribeAnalogPinValue struct { *_FirmataMessage - Pin uint8 - Enable bool + Pin uint8 + Enable bool // Reserved Fields reservedField0 *uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_FirmataMessageSubscribeAnalogPinValue) GetMessageType() uint8 { - return 0xC -} +func (m *_FirmataMessageSubscribeAnalogPinValue) GetMessageType() uint8 { +return 0xC} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_FirmataMessageSubscribeAnalogPinValue) InitializeParent(parent FirmataMessage) {} +func (m *_FirmataMessageSubscribeAnalogPinValue) InitializeParent(parent FirmataMessage ) {} -func (m *_FirmataMessageSubscribeAnalogPinValue) GetParent() FirmataMessage { +func (m *_FirmataMessageSubscribeAnalogPinValue) GetParent() FirmataMessage { return m._FirmataMessage } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -93,12 +95,13 @@ func (m *_FirmataMessageSubscribeAnalogPinValue) GetEnable() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewFirmataMessageSubscribeAnalogPinValue factory function for _FirmataMessageSubscribeAnalogPinValue -func NewFirmataMessageSubscribeAnalogPinValue(pin uint8, enable bool, response bool) *_FirmataMessageSubscribeAnalogPinValue { +func NewFirmataMessageSubscribeAnalogPinValue( pin uint8 , enable bool , response bool ) *_FirmataMessageSubscribeAnalogPinValue { _result := &_FirmataMessageSubscribeAnalogPinValue{ - Pin: pin, - Enable: enable, - _FirmataMessage: NewFirmataMessage(response), + Pin: pin, + Enable: enable, + _FirmataMessage: NewFirmataMessage(response), } _result._FirmataMessage._FirmataMessageChildRequirements = _result return _result @@ -106,7 +109,7 @@ func NewFirmataMessageSubscribeAnalogPinValue(pin uint8, enable bool, response b // Deprecated: use the interface for direct cast func CastFirmataMessageSubscribeAnalogPinValue(structType interface{}) FirmataMessageSubscribeAnalogPinValue { - if casted, ok := structType.(FirmataMessageSubscribeAnalogPinValue); ok { + if casted, ok := structType.(FirmataMessageSubscribeAnalogPinValue); ok { return casted } if casted, ok := structType.(*FirmataMessageSubscribeAnalogPinValue); ok { @@ -123,17 +126,18 @@ func (m *_FirmataMessageSubscribeAnalogPinValue) GetLengthInBits(ctx context.Con lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (pin) - lengthInBits += 4 + lengthInBits += 4; // Reserved Field (reserved) lengthInBits += 7 // Simple field (enable) - lengthInBits += 1 + lengthInBits += 1; return lengthInBits } + func (m *_FirmataMessageSubscribeAnalogPinValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -152,7 +156,7 @@ func FirmataMessageSubscribeAnalogPinValueParseWithBuffer(ctx context.Context, r _ = currentPos // Simple Field (pin) - _pin, _pinErr := readBuffer.ReadUint8("pin", 4) +_pin, _pinErr := readBuffer.ReadUint8("pin", 4) if _pinErr != nil { return nil, errors.Wrap(_pinErr, "Error parsing 'pin' field of FirmataMessageSubscribeAnalogPinValue") } @@ -168,7 +172,7 @@ func FirmataMessageSubscribeAnalogPinValueParseWithBuffer(ctx context.Context, r if reserved != uint8(0x00) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -176,7 +180,7 @@ func FirmataMessageSubscribeAnalogPinValueParseWithBuffer(ctx context.Context, r } // Simple Field (enable) - _enable, _enableErr := readBuffer.ReadBit("enable") +_enable, _enableErr := readBuffer.ReadBit("enable") if _enableErr != nil { return nil, errors.Wrap(_enableErr, "Error parsing 'enable' field of FirmataMessageSubscribeAnalogPinValue") } @@ -191,8 +195,8 @@ func FirmataMessageSubscribeAnalogPinValueParseWithBuffer(ctx context.Context, r _FirmataMessage: &_FirmataMessage{ Response: response, }, - Pin: pin, - Enable: enable, + Pin: pin, + Enable: enable, reservedField0: reservedField0, } _child._FirmataMessage._FirmataMessageChildRequirements = _child @@ -215,35 +219,35 @@ func (m *_FirmataMessageSubscribeAnalogPinValue) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for FirmataMessageSubscribeAnalogPinValue") } - // Simple Field (pin) - pin := uint8(m.GetPin()) - _pinErr := writeBuffer.WriteUint8("pin", 4, (pin)) - if _pinErr != nil { - return errors.Wrap(_pinErr, "Error serializing 'pin' field") - } + // Simple Field (pin) + pin := uint8(m.GetPin()) + _pinErr := writeBuffer.WriteUint8("pin", 4, (pin)) + if _pinErr != nil { + return errors.Wrap(_pinErr, "Error serializing 'pin' field") + } - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0x00) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0x00), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteUint8("reserved", 7, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0x00) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0x00), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 } - - // Simple Field (enable) - enable := bool(m.GetEnable()) - _enableErr := writeBuffer.WriteBit("enable", (enable)) - if _enableErr != nil { - return errors.Wrap(_enableErr, "Error serializing 'enable' field") + _err := writeBuffer.WriteUint8("reserved", 7, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } + + // Simple Field (enable) + enable := bool(m.GetEnable()) + _enableErr := writeBuffer.WriteBit("enable", (enable)) + if _enableErr != nil { + return errors.Wrap(_enableErr, "Error serializing 'enable' field") + } if popErr := writeBuffer.PopContext("FirmataMessageSubscribeAnalogPinValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for FirmataMessageSubscribeAnalogPinValue") @@ -253,6 +257,7 @@ func (m *_FirmataMessageSubscribeAnalogPinValue) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_FirmataMessageSubscribeAnalogPinValue) isFirmataMessageSubscribeAnalogPinValue() bool { return true } @@ -267,3 +272,6 @@ func (m *_FirmataMessageSubscribeAnalogPinValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/firmata/readwrite/model/FirmataMessageSubscribeDigitalPinValue.go b/plc4go/protocols/firmata/readwrite/model/FirmataMessageSubscribeDigitalPinValue.go index 8db65ad0c24..e4a0db9aeb4 100644 --- a/plc4go/protocols/firmata/readwrite/model/FirmataMessageSubscribeDigitalPinValue.go +++ b/plc4go/protocols/firmata/readwrite/model/FirmataMessageSubscribeDigitalPinValue.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // FirmataMessageSubscribeDigitalPinValue is the corresponding interface of FirmataMessageSubscribeDigitalPinValue type FirmataMessageSubscribeDigitalPinValue interface { @@ -49,32 +51,32 @@ type FirmataMessageSubscribeDigitalPinValueExactly interface { // _FirmataMessageSubscribeDigitalPinValue is the data-structure of this message type _FirmataMessageSubscribeDigitalPinValue struct { *_FirmataMessage - Pin uint8 - Enable bool + Pin uint8 + Enable bool // Reserved Fields reservedField0 *uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_FirmataMessageSubscribeDigitalPinValue) GetMessageType() uint8 { - return 0xD -} +func (m *_FirmataMessageSubscribeDigitalPinValue) GetMessageType() uint8 { +return 0xD} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_FirmataMessageSubscribeDigitalPinValue) InitializeParent(parent FirmataMessage) {} +func (m *_FirmataMessageSubscribeDigitalPinValue) InitializeParent(parent FirmataMessage ) {} -func (m *_FirmataMessageSubscribeDigitalPinValue) GetParent() FirmataMessage { +func (m *_FirmataMessageSubscribeDigitalPinValue) GetParent() FirmataMessage { return m._FirmataMessage } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -93,12 +95,13 @@ func (m *_FirmataMessageSubscribeDigitalPinValue) GetEnable() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewFirmataMessageSubscribeDigitalPinValue factory function for _FirmataMessageSubscribeDigitalPinValue -func NewFirmataMessageSubscribeDigitalPinValue(pin uint8, enable bool, response bool) *_FirmataMessageSubscribeDigitalPinValue { +func NewFirmataMessageSubscribeDigitalPinValue( pin uint8 , enable bool , response bool ) *_FirmataMessageSubscribeDigitalPinValue { _result := &_FirmataMessageSubscribeDigitalPinValue{ - Pin: pin, - Enable: enable, - _FirmataMessage: NewFirmataMessage(response), + Pin: pin, + Enable: enable, + _FirmataMessage: NewFirmataMessage(response), } _result._FirmataMessage._FirmataMessageChildRequirements = _result return _result @@ -106,7 +109,7 @@ func NewFirmataMessageSubscribeDigitalPinValue(pin uint8, enable bool, response // Deprecated: use the interface for direct cast func CastFirmataMessageSubscribeDigitalPinValue(structType interface{}) FirmataMessageSubscribeDigitalPinValue { - if casted, ok := structType.(FirmataMessageSubscribeDigitalPinValue); ok { + if casted, ok := structType.(FirmataMessageSubscribeDigitalPinValue); ok { return casted } if casted, ok := structType.(*FirmataMessageSubscribeDigitalPinValue); ok { @@ -123,17 +126,18 @@ func (m *_FirmataMessageSubscribeDigitalPinValue) GetLengthInBits(ctx context.Co lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (pin) - lengthInBits += 4 + lengthInBits += 4; // Reserved Field (reserved) lengthInBits += 7 // Simple field (enable) - lengthInBits += 1 + lengthInBits += 1; return lengthInBits } + func (m *_FirmataMessageSubscribeDigitalPinValue) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -152,7 +156,7 @@ func FirmataMessageSubscribeDigitalPinValueParseWithBuffer(ctx context.Context, _ = currentPos // Simple Field (pin) - _pin, _pinErr := readBuffer.ReadUint8("pin", 4) +_pin, _pinErr := readBuffer.ReadUint8("pin", 4) if _pinErr != nil { return nil, errors.Wrap(_pinErr, "Error parsing 'pin' field of FirmataMessageSubscribeDigitalPinValue") } @@ -168,7 +172,7 @@ func FirmataMessageSubscribeDigitalPinValueParseWithBuffer(ctx context.Context, if reserved != uint8(0x00) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -176,7 +180,7 @@ func FirmataMessageSubscribeDigitalPinValueParseWithBuffer(ctx context.Context, } // Simple Field (enable) - _enable, _enableErr := readBuffer.ReadBit("enable") +_enable, _enableErr := readBuffer.ReadBit("enable") if _enableErr != nil { return nil, errors.Wrap(_enableErr, "Error parsing 'enable' field of FirmataMessageSubscribeDigitalPinValue") } @@ -191,8 +195,8 @@ func FirmataMessageSubscribeDigitalPinValueParseWithBuffer(ctx context.Context, _FirmataMessage: &_FirmataMessage{ Response: response, }, - Pin: pin, - Enable: enable, + Pin: pin, + Enable: enable, reservedField0: reservedField0, } _child._FirmataMessage._FirmataMessageChildRequirements = _child @@ -215,35 +219,35 @@ func (m *_FirmataMessageSubscribeDigitalPinValue) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for FirmataMessageSubscribeDigitalPinValue") } - // Simple Field (pin) - pin := uint8(m.GetPin()) - _pinErr := writeBuffer.WriteUint8("pin", 4, (pin)) - if _pinErr != nil { - return errors.Wrap(_pinErr, "Error serializing 'pin' field") - } + // Simple Field (pin) + pin := uint8(m.GetPin()) + _pinErr := writeBuffer.WriteUint8("pin", 4, (pin)) + if _pinErr != nil { + return errors.Wrap(_pinErr, "Error serializing 'pin' field") + } - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0x00) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0x00), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteUint8("reserved", 7, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0x00) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0x00), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 } - - // Simple Field (enable) - enable := bool(m.GetEnable()) - _enableErr := writeBuffer.WriteBit("enable", (enable)) - if _enableErr != nil { - return errors.Wrap(_enableErr, "Error serializing 'enable' field") + _err := writeBuffer.WriteUint8("reserved", 7, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } + + // Simple Field (enable) + enable := bool(m.GetEnable()) + _enableErr := writeBuffer.WriteBit("enable", (enable)) + if _enableErr != nil { + return errors.Wrap(_enableErr, "Error serializing 'enable' field") + } if popErr := writeBuffer.PopContext("FirmataMessageSubscribeDigitalPinValue"); popErr != nil { return errors.Wrap(popErr, "Error popping for FirmataMessageSubscribeDigitalPinValue") @@ -253,6 +257,7 @@ func (m *_FirmataMessageSubscribeDigitalPinValue) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_FirmataMessageSubscribeDigitalPinValue) isFirmataMessageSubscribeDigitalPinValue() bool { return true } @@ -267,3 +272,6 @@ func (m *_FirmataMessageSubscribeDigitalPinValue) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/firmata/readwrite/model/PinMode.go b/plc4go/protocols/firmata/readwrite/model/PinMode.go index 013a650d8ce..67b746a441a 100644 --- a/plc4go/protocols/firmata/readwrite/model/PinMode.go +++ b/plc4go/protocols/firmata/readwrite/model/PinMode.go @@ -34,26 +34,26 @@ type IPinMode interface { utils.Serializable } -const ( - PinMode_PinModeInput PinMode = 0x0 - PinMode_PinModeOutput PinMode = 0x1 - PinMode_PinModeAnalog PinMode = 0x2 - PinMode_PinModePwm PinMode = 0x3 - PinMode_PinModeServo PinMode = 0x4 - PinMode_PinModeShift PinMode = 0x5 - PinMode_PinModeI2C PinMode = 0x6 +const( + PinMode_PinModeInput PinMode = 0x0 + PinMode_PinModeOutput PinMode = 0x1 + PinMode_PinModeAnalog PinMode = 0x2 + PinMode_PinModePwm PinMode = 0x3 + PinMode_PinModeServo PinMode = 0x4 + PinMode_PinModeShift PinMode = 0x5 + PinMode_PinModeI2C PinMode = 0x6 PinMode_PinModeOneWire PinMode = 0x7 PinMode_PinModeStepper PinMode = 0x8 PinMode_PinModeEncoder PinMode = 0x9 - PinMode_PinModeSerial PinMode = 0xA - PinMode_PinModePullup PinMode = 0xB + PinMode_PinModeSerial PinMode = 0xA + PinMode_PinModePullup PinMode = 0xB ) var PinModeValues []PinMode func init() { _ = errors.New - PinModeValues = []PinMode{ + PinModeValues = []PinMode { PinMode_PinModeInput, PinMode_PinModeOutput, PinMode_PinModeAnalog, @@ -71,30 +71,30 @@ func init() { func PinModeByValue(value uint8) (enum PinMode, ok bool) { switch value { - case 0x0: - return PinMode_PinModeInput, true - case 0x1: - return PinMode_PinModeOutput, true - case 0x2: - return PinMode_PinModeAnalog, true - case 0x3: - return PinMode_PinModePwm, true - case 0x4: - return PinMode_PinModeServo, true - case 0x5: - return PinMode_PinModeShift, true - case 0x6: - return PinMode_PinModeI2C, true - case 0x7: - return PinMode_PinModeOneWire, true - case 0x8: - return PinMode_PinModeStepper, true - case 0x9: - return PinMode_PinModeEncoder, true - case 0xA: - return PinMode_PinModeSerial, true - case 0xB: - return PinMode_PinModePullup, true + case 0x0: + return PinMode_PinModeInput, true + case 0x1: + return PinMode_PinModeOutput, true + case 0x2: + return PinMode_PinModeAnalog, true + case 0x3: + return PinMode_PinModePwm, true + case 0x4: + return PinMode_PinModeServo, true + case 0x5: + return PinMode_PinModeShift, true + case 0x6: + return PinMode_PinModeI2C, true + case 0x7: + return PinMode_PinModeOneWire, true + case 0x8: + return PinMode_PinModeStepper, true + case 0x9: + return PinMode_PinModeEncoder, true + case 0xA: + return PinMode_PinModeSerial, true + case 0xB: + return PinMode_PinModePullup, true } return 0, false } @@ -129,13 +129,13 @@ func PinModeByName(value string) (enum PinMode, ok bool) { return 0, false } -func PinModeKnows(value uint8) bool { +func PinModeKnows(value uint8) bool { for _, typeValue := range PinModeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastPinMode(structType interface{}) PinMode { @@ -219,3 +219,4 @@ func (e PinMode) PLC4XEnumName() string { func (e PinMode) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/firmata/readwrite/model/SysexCommand.go b/plc4go/protocols/firmata/readwrite/model/SysexCommand.go index b8ad4e1b62a..406d4446a1f 100644 --- a/plc4go/protocols/firmata/readwrite/model/SysexCommand.go +++ b/plc4go/protocols/firmata/readwrite/model/SysexCommand.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SysexCommand is the corresponding interface of SysexCommand type SysexCommand interface { @@ -56,6 +58,7 @@ type _SysexCommandChildRequirements interface { GetResponse() bool } + type SysexCommandParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child SysexCommand, serializeChildFunction func() error) error GetTypeName() string @@ -63,21 +66,22 @@ type SysexCommandParent interface { type SysexCommandChild interface { utils.Serializable - InitializeParent(parent SysexCommand) +InitializeParent(parent SysexCommand ) GetParent() *SysexCommand GetTypeName() string SysexCommand } + // NewSysexCommand factory function for _SysexCommand -func NewSysexCommand() *_SysexCommand { - return &_SysexCommand{} +func NewSysexCommand( ) *_SysexCommand { +return &_SysexCommand{ } } // Deprecated: use the interface for direct cast func CastSysexCommand(structType interface{}) SysexCommand { - if casted, ok := structType.(SysexCommand); ok { + if casted, ok := structType.(SysexCommand); ok { return casted } if casted, ok := structType.(*SysexCommand); ok { @@ -90,10 +94,11 @@ func (m *_SysexCommand) GetTypeName() string { return "SysexCommand" } + func (m *_SysexCommand) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Discriminator Field (commandType) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } @@ -124,42 +129,42 @@ func SysexCommandParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type SysexCommandChildSerializeRequirement interface { SysexCommand - InitializeParent(SysexCommand) + InitializeParent(SysexCommand ) GetParent() SysexCommand } var _childTemp interface{} var _child SysexCommandChildSerializeRequirement var typeSwitchError error switch { - case commandType == 0x00: // SysexCommandExtendedId +case commandType == 0x00 : // SysexCommandExtendedId _childTemp, typeSwitchError = SysexCommandExtendedIdParseWithBuffer(ctx, readBuffer, response) - case commandType == 0x69 && response == bool(false): // SysexCommandAnalogMappingQueryRequest +case commandType == 0x69 && response == bool(false) : // SysexCommandAnalogMappingQueryRequest _childTemp, typeSwitchError = SysexCommandAnalogMappingQueryRequestParseWithBuffer(ctx, readBuffer, response) - case commandType == 0x69 && response == bool(true): // SysexCommandAnalogMappingQueryResponse +case commandType == 0x69 && response == bool(true) : // SysexCommandAnalogMappingQueryResponse _childTemp, typeSwitchError = SysexCommandAnalogMappingQueryResponseParseWithBuffer(ctx, readBuffer, response) - case commandType == 0x6A: // SysexCommandAnalogMappingResponse +case commandType == 0x6A : // SysexCommandAnalogMappingResponse _childTemp, typeSwitchError = SysexCommandAnalogMappingResponseParseWithBuffer(ctx, readBuffer, response) - case commandType == 0x6B: // SysexCommandCapabilityQuery +case commandType == 0x6B : // SysexCommandCapabilityQuery _childTemp, typeSwitchError = SysexCommandCapabilityQueryParseWithBuffer(ctx, readBuffer, response) - case commandType == 0x6C: // SysexCommandCapabilityResponse +case commandType == 0x6C : // SysexCommandCapabilityResponse _childTemp, typeSwitchError = SysexCommandCapabilityResponseParseWithBuffer(ctx, readBuffer, response) - case commandType == 0x6D: // SysexCommandPinStateQuery +case commandType == 0x6D : // SysexCommandPinStateQuery _childTemp, typeSwitchError = SysexCommandPinStateQueryParseWithBuffer(ctx, readBuffer, response) - case commandType == 0x6E: // SysexCommandPinStateResponse +case commandType == 0x6E : // SysexCommandPinStateResponse _childTemp, typeSwitchError = SysexCommandPinStateResponseParseWithBuffer(ctx, readBuffer, response) - case commandType == 0x6F: // SysexCommandExtendedAnalog +case commandType == 0x6F : // SysexCommandExtendedAnalog _childTemp, typeSwitchError = SysexCommandExtendedAnalogParseWithBuffer(ctx, readBuffer, response) - case commandType == 0x71: // SysexCommandStringData +case commandType == 0x71 : // SysexCommandStringData _childTemp, typeSwitchError = SysexCommandStringDataParseWithBuffer(ctx, readBuffer, response) - case commandType == 0x79 && response == bool(false): // SysexCommandReportFirmwareRequest +case commandType == 0x79 && response == bool(false) : // SysexCommandReportFirmwareRequest _childTemp, typeSwitchError = SysexCommandReportFirmwareRequestParseWithBuffer(ctx, readBuffer, response) - case commandType == 0x79 && response == bool(true): // SysexCommandReportFirmwareResponse +case commandType == 0x79 && response == bool(true) : // SysexCommandReportFirmwareResponse _childTemp, typeSwitchError = SysexCommandReportFirmwareResponseParseWithBuffer(ctx, readBuffer, response) - case commandType == 0x7A: // SysexCommandSamplingInterval +case commandType == 0x7A : // SysexCommandSamplingInterval _childTemp, typeSwitchError = SysexCommandSamplingIntervalParseWithBuffer(ctx, readBuffer, response) - case commandType == 0x7E: // SysexCommandSysexNonRealtime +case commandType == 0x7E : // SysexCommandSysexNonRealtime _childTemp, typeSwitchError = SysexCommandSysexNonRealtimeParseWithBuffer(ctx, readBuffer, response) - case commandType == 0x7F: // SysexCommandSysexRealtime +case commandType == 0x7F : // SysexCommandSysexRealtime _childTemp, typeSwitchError = SysexCommandSysexRealtimeParseWithBuffer(ctx, readBuffer, response) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [commandType=%v, response=%v]", commandType, response) @@ -174,7 +179,7 @@ func SysexCommandParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe } // Finish initializing - _child.InitializeParent(_child) +_child.InitializeParent(_child ) return _child, nil } @@ -184,7 +189,7 @@ func (pm *_SysexCommand) SerializeParent(ctx context.Context, writeBuffer utils. _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("SysexCommand"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("SysexCommand"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for SysexCommand") } @@ -207,6 +212,7 @@ func (pm *_SysexCommand) SerializeParent(ctx context.Context, writeBuffer utils. return nil } + func (m *_SysexCommand) isSysexCommand() bool { return true } @@ -221,3 +227,6 @@ func (m *_SysexCommand) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/firmata/readwrite/model/SysexCommandAnalogMappingQueryRequest.go b/plc4go/protocols/firmata/readwrite/model/SysexCommandAnalogMappingQueryRequest.go index 69c321cfebd..1b50f83657d 100644 --- a/plc4go/protocols/firmata/readwrite/model/SysexCommandAnalogMappingQueryRequest.go +++ b/plc4go/protocols/firmata/readwrite/model/SysexCommandAnalogMappingQueryRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SysexCommandAnalogMappingQueryRequest is the corresponding interface of SysexCommandAnalogMappingQueryRequest type SysexCommandAnalogMappingQueryRequest interface { @@ -46,34 +48,35 @@ type _SysexCommandAnalogMappingQueryRequest struct { *_SysexCommand } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SysexCommandAnalogMappingQueryRequest) GetCommandType() uint8 { - return 0x69 -} +func (m *_SysexCommandAnalogMappingQueryRequest) GetCommandType() uint8 { +return 0x69} -func (m *_SysexCommandAnalogMappingQueryRequest) GetResponse() bool { - return bool(false) -} +func (m *_SysexCommandAnalogMappingQueryRequest) GetResponse() bool { +return bool(false)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SysexCommandAnalogMappingQueryRequest) InitializeParent(parent SysexCommand) {} +func (m *_SysexCommandAnalogMappingQueryRequest) InitializeParent(parent SysexCommand ) {} -func (m *_SysexCommandAnalogMappingQueryRequest) GetParent() SysexCommand { +func (m *_SysexCommandAnalogMappingQueryRequest) GetParent() SysexCommand { return m._SysexCommand } + // NewSysexCommandAnalogMappingQueryRequest factory function for _SysexCommandAnalogMappingQueryRequest -func NewSysexCommandAnalogMappingQueryRequest() *_SysexCommandAnalogMappingQueryRequest { +func NewSysexCommandAnalogMappingQueryRequest( ) *_SysexCommandAnalogMappingQueryRequest { _result := &_SysexCommandAnalogMappingQueryRequest{ - _SysexCommand: NewSysexCommand(), + _SysexCommand: NewSysexCommand(), } _result._SysexCommand._SysexCommandChildRequirements = _result return _result @@ -81,7 +84,7 @@ func NewSysexCommandAnalogMappingQueryRequest() *_SysexCommandAnalogMappingQuery // Deprecated: use the interface for direct cast func CastSysexCommandAnalogMappingQueryRequest(structType interface{}) SysexCommandAnalogMappingQueryRequest { - if casted, ok := structType.(SysexCommandAnalogMappingQueryRequest); ok { + if casted, ok := structType.(SysexCommandAnalogMappingQueryRequest); ok { return casted } if casted, ok := structType.(*SysexCommandAnalogMappingQueryRequest); ok { @@ -100,6 +103,7 @@ func (m *_SysexCommandAnalogMappingQueryRequest) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_SysexCommandAnalogMappingQueryRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -123,7 +127,8 @@ func SysexCommandAnalogMappingQueryRequestParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_SysexCommandAnalogMappingQueryRequest{ - _SysexCommand: &_SysexCommand{}, + _SysexCommand: &_SysexCommand{ + }, } _child._SysexCommand._SysexCommandChildRequirements = _child return _child, nil @@ -153,6 +158,7 @@ func (m *_SysexCommandAnalogMappingQueryRequest) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SysexCommandAnalogMappingQueryRequest) isSysexCommandAnalogMappingQueryRequest() bool { return true } @@ -167,3 +173,6 @@ func (m *_SysexCommandAnalogMappingQueryRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/firmata/readwrite/model/SysexCommandAnalogMappingQueryResponse.go b/plc4go/protocols/firmata/readwrite/model/SysexCommandAnalogMappingQueryResponse.go index 22dda4d1e1c..d1ac6f8bdce 100644 --- a/plc4go/protocols/firmata/readwrite/model/SysexCommandAnalogMappingQueryResponse.go +++ b/plc4go/protocols/firmata/readwrite/model/SysexCommandAnalogMappingQueryResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SysexCommandAnalogMappingQueryResponse is the corresponding interface of SysexCommandAnalogMappingQueryResponse type SysexCommandAnalogMappingQueryResponse interface { @@ -46,33 +48,32 @@ type SysexCommandAnalogMappingQueryResponseExactly interface { // _SysexCommandAnalogMappingQueryResponse is the data-structure of this message type _SysexCommandAnalogMappingQueryResponse struct { *_SysexCommand - Pin uint8 + Pin uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SysexCommandAnalogMappingQueryResponse) GetCommandType() uint8 { - return 0x69 -} +func (m *_SysexCommandAnalogMappingQueryResponse) GetCommandType() uint8 { +return 0x69} -func (m *_SysexCommandAnalogMappingQueryResponse) GetResponse() bool { - return bool(true) -} +func (m *_SysexCommandAnalogMappingQueryResponse) GetResponse() bool { +return bool(true)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SysexCommandAnalogMappingQueryResponse) InitializeParent(parent SysexCommand) {} +func (m *_SysexCommandAnalogMappingQueryResponse) InitializeParent(parent SysexCommand ) {} -func (m *_SysexCommandAnalogMappingQueryResponse) GetParent() SysexCommand { +func (m *_SysexCommandAnalogMappingQueryResponse) GetParent() SysexCommand { return m._SysexCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -87,11 +88,12 @@ func (m *_SysexCommandAnalogMappingQueryResponse) GetPin() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSysexCommandAnalogMappingQueryResponse factory function for _SysexCommandAnalogMappingQueryResponse -func NewSysexCommandAnalogMappingQueryResponse(pin uint8) *_SysexCommandAnalogMappingQueryResponse { +func NewSysexCommandAnalogMappingQueryResponse( pin uint8 ) *_SysexCommandAnalogMappingQueryResponse { _result := &_SysexCommandAnalogMappingQueryResponse{ - Pin: pin, - _SysexCommand: NewSysexCommand(), + Pin: pin, + _SysexCommand: NewSysexCommand(), } _result._SysexCommand._SysexCommandChildRequirements = _result return _result @@ -99,7 +101,7 @@ func NewSysexCommandAnalogMappingQueryResponse(pin uint8) *_SysexCommandAnalogMa // Deprecated: use the interface for direct cast func CastSysexCommandAnalogMappingQueryResponse(structType interface{}) SysexCommandAnalogMappingQueryResponse { - if casted, ok := structType.(SysexCommandAnalogMappingQueryResponse); ok { + if casted, ok := structType.(SysexCommandAnalogMappingQueryResponse); ok { return casted } if casted, ok := structType.(*SysexCommandAnalogMappingQueryResponse); ok { @@ -116,11 +118,12 @@ func (m *_SysexCommandAnalogMappingQueryResponse) GetLengthInBits(ctx context.Co lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (pin) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_SysexCommandAnalogMappingQueryResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +142,7 @@ func SysexCommandAnalogMappingQueryResponseParseWithBuffer(ctx context.Context, _ = currentPos // Simple Field (pin) - _pin, _pinErr := readBuffer.ReadUint8("pin", 8) +_pin, _pinErr := readBuffer.ReadUint8("pin", 8) if _pinErr != nil { return nil, errors.Wrap(_pinErr, "Error parsing 'pin' field of SysexCommandAnalogMappingQueryResponse") } @@ -151,8 +154,9 @@ func SysexCommandAnalogMappingQueryResponseParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_SysexCommandAnalogMappingQueryResponse{ - _SysexCommand: &_SysexCommand{}, - Pin: pin, + _SysexCommand: &_SysexCommand{ + }, + Pin: pin, } _child._SysexCommand._SysexCommandChildRequirements = _child return _child, nil @@ -174,12 +178,12 @@ func (m *_SysexCommandAnalogMappingQueryResponse) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for SysexCommandAnalogMappingQueryResponse") } - // Simple Field (pin) - pin := uint8(m.GetPin()) - _pinErr := writeBuffer.WriteUint8("pin", 8, (pin)) - if _pinErr != nil { - return errors.Wrap(_pinErr, "Error serializing 'pin' field") - } + // Simple Field (pin) + pin := uint8(m.GetPin()) + _pinErr := writeBuffer.WriteUint8("pin", 8, (pin)) + if _pinErr != nil { + return errors.Wrap(_pinErr, "Error serializing 'pin' field") + } if popErr := writeBuffer.PopContext("SysexCommandAnalogMappingQueryResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for SysexCommandAnalogMappingQueryResponse") @@ -189,6 +193,7 @@ func (m *_SysexCommandAnalogMappingQueryResponse) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SysexCommandAnalogMappingQueryResponse) isSysexCommandAnalogMappingQueryResponse() bool { return true } @@ -203,3 +208,6 @@ func (m *_SysexCommandAnalogMappingQueryResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/firmata/readwrite/model/SysexCommandAnalogMappingResponse.go b/plc4go/protocols/firmata/readwrite/model/SysexCommandAnalogMappingResponse.go index 768c3d117f5..c89e0e4db49 100644 --- a/plc4go/protocols/firmata/readwrite/model/SysexCommandAnalogMappingResponse.go +++ b/plc4go/protocols/firmata/readwrite/model/SysexCommandAnalogMappingResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SysexCommandAnalogMappingResponse is the corresponding interface of SysexCommandAnalogMappingResponse type SysexCommandAnalogMappingResponse interface { @@ -46,34 +48,35 @@ type _SysexCommandAnalogMappingResponse struct { *_SysexCommand } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SysexCommandAnalogMappingResponse) GetCommandType() uint8 { - return 0x6A -} +func (m *_SysexCommandAnalogMappingResponse) GetCommandType() uint8 { +return 0x6A} -func (m *_SysexCommandAnalogMappingResponse) GetResponse() bool { - return false -} +func (m *_SysexCommandAnalogMappingResponse) GetResponse() bool { +return false} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SysexCommandAnalogMappingResponse) InitializeParent(parent SysexCommand) {} +func (m *_SysexCommandAnalogMappingResponse) InitializeParent(parent SysexCommand ) {} -func (m *_SysexCommandAnalogMappingResponse) GetParent() SysexCommand { +func (m *_SysexCommandAnalogMappingResponse) GetParent() SysexCommand { return m._SysexCommand } + // NewSysexCommandAnalogMappingResponse factory function for _SysexCommandAnalogMappingResponse -func NewSysexCommandAnalogMappingResponse() *_SysexCommandAnalogMappingResponse { +func NewSysexCommandAnalogMappingResponse( ) *_SysexCommandAnalogMappingResponse { _result := &_SysexCommandAnalogMappingResponse{ - _SysexCommand: NewSysexCommand(), + _SysexCommand: NewSysexCommand(), } _result._SysexCommand._SysexCommandChildRequirements = _result return _result @@ -81,7 +84,7 @@ func NewSysexCommandAnalogMappingResponse() *_SysexCommandAnalogMappingResponse // Deprecated: use the interface for direct cast func CastSysexCommandAnalogMappingResponse(structType interface{}) SysexCommandAnalogMappingResponse { - if casted, ok := structType.(SysexCommandAnalogMappingResponse); ok { + if casted, ok := structType.(SysexCommandAnalogMappingResponse); ok { return casted } if casted, ok := structType.(*SysexCommandAnalogMappingResponse); ok { @@ -100,6 +103,7 @@ func (m *_SysexCommandAnalogMappingResponse) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_SysexCommandAnalogMappingResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -123,7 +127,8 @@ func SysexCommandAnalogMappingResponseParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_SysexCommandAnalogMappingResponse{ - _SysexCommand: &_SysexCommand{}, + _SysexCommand: &_SysexCommand{ + }, } _child._SysexCommand._SysexCommandChildRequirements = _child return _child, nil @@ -153,6 +158,7 @@ func (m *_SysexCommandAnalogMappingResponse) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SysexCommandAnalogMappingResponse) isSysexCommandAnalogMappingResponse() bool { return true } @@ -167,3 +173,6 @@ func (m *_SysexCommandAnalogMappingResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/firmata/readwrite/model/SysexCommandCapabilityQuery.go b/plc4go/protocols/firmata/readwrite/model/SysexCommandCapabilityQuery.go index 34e603452b2..6592edebaac 100644 --- a/plc4go/protocols/firmata/readwrite/model/SysexCommandCapabilityQuery.go +++ b/plc4go/protocols/firmata/readwrite/model/SysexCommandCapabilityQuery.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SysexCommandCapabilityQuery is the corresponding interface of SysexCommandCapabilityQuery type SysexCommandCapabilityQuery interface { @@ -46,34 +48,35 @@ type _SysexCommandCapabilityQuery struct { *_SysexCommand } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SysexCommandCapabilityQuery) GetCommandType() uint8 { - return 0x6B -} +func (m *_SysexCommandCapabilityQuery) GetCommandType() uint8 { +return 0x6B} -func (m *_SysexCommandCapabilityQuery) GetResponse() bool { - return false -} +func (m *_SysexCommandCapabilityQuery) GetResponse() bool { +return false} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SysexCommandCapabilityQuery) InitializeParent(parent SysexCommand) {} +func (m *_SysexCommandCapabilityQuery) InitializeParent(parent SysexCommand ) {} -func (m *_SysexCommandCapabilityQuery) GetParent() SysexCommand { +func (m *_SysexCommandCapabilityQuery) GetParent() SysexCommand { return m._SysexCommand } + // NewSysexCommandCapabilityQuery factory function for _SysexCommandCapabilityQuery -func NewSysexCommandCapabilityQuery() *_SysexCommandCapabilityQuery { +func NewSysexCommandCapabilityQuery( ) *_SysexCommandCapabilityQuery { _result := &_SysexCommandCapabilityQuery{ - _SysexCommand: NewSysexCommand(), + _SysexCommand: NewSysexCommand(), } _result._SysexCommand._SysexCommandChildRequirements = _result return _result @@ -81,7 +84,7 @@ func NewSysexCommandCapabilityQuery() *_SysexCommandCapabilityQuery { // Deprecated: use the interface for direct cast func CastSysexCommandCapabilityQuery(structType interface{}) SysexCommandCapabilityQuery { - if casted, ok := structType.(SysexCommandCapabilityQuery); ok { + if casted, ok := structType.(SysexCommandCapabilityQuery); ok { return casted } if casted, ok := structType.(*SysexCommandCapabilityQuery); ok { @@ -100,6 +103,7 @@ func (m *_SysexCommandCapabilityQuery) GetLengthInBits(ctx context.Context) uint return lengthInBits } + func (m *_SysexCommandCapabilityQuery) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -123,7 +127,8 @@ func SysexCommandCapabilityQueryParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_SysexCommandCapabilityQuery{ - _SysexCommand: &_SysexCommand{}, + _SysexCommand: &_SysexCommand{ + }, } _child._SysexCommand._SysexCommandChildRequirements = _child return _child, nil @@ -153,6 +158,7 @@ func (m *_SysexCommandCapabilityQuery) SerializeWithWriteBuffer(ctx context.Cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SysexCommandCapabilityQuery) isSysexCommandCapabilityQuery() bool { return true } @@ -167,3 +173,6 @@ func (m *_SysexCommandCapabilityQuery) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/firmata/readwrite/model/SysexCommandCapabilityResponse.go b/plc4go/protocols/firmata/readwrite/model/SysexCommandCapabilityResponse.go index 7ff65d272cb..a8721aeef75 100644 --- a/plc4go/protocols/firmata/readwrite/model/SysexCommandCapabilityResponse.go +++ b/plc4go/protocols/firmata/readwrite/model/SysexCommandCapabilityResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SysexCommandCapabilityResponse is the corresponding interface of SysexCommandCapabilityResponse type SysexCommandCapabilityResponse interface { @@ -46,34 +48,35 @@ type _SysexCommandCapabilityResponse struct { *_SysexCommand } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SysexCommandCapabilityResponse) GetCommandType() uint8 { - return 0x6C -} +func (m *_SysexCommandCapabilityResponse) GetCommandType() uint8 { +return 0x6C} -func (m *_SysexCommandCapabilityResponse) GetResponse() bool { - return false -} +func (m *_SysexCommandCapabilityResponse) GetResponse() bool { +return false} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SysexCommandCapabilityResponse) InitializeParent(parent SysexCommand) {} +func (m *_SysexCommandCapabilityResponse) InitializeParent(parent SysexCommand ) {} -func (m *_SysexCommandCapabilityResponse) GetParent() SysexCommand { +func (m *_SysexCommandCapabilityResponse) GetParent() SysexCommand { return m._SysexCommand } + // NewSysexCommandCapabilityResponse factory function for _SysexCommandCapabilityResponse -func NewSysexCommandCapabilityResponse() *_SysexCommandCapabilityResponse { +func NewSysexCommandCapabilityResponse( ) *_SysexCommandCapabilityResponse { _result := &_SysexCommandCapabilityResponse{ - _SysexCommand: NewSysexCommand(), + _SysexCommand: NewSysexCommand(), } _result._SysexCommand._SysexCommandChildRequirements = _result return _result @@ -81,7 +84,7 @@ func NewSysexCommandCapabilityResponse() *_SysexCommandCapabilityResponse { // Deprecated: use the interface for direct cast func CastSysexCommandCapabilityResponse(structType interface{}) SysexCommandCapabilityResponse { - if casted, ok := structType.(SysexCommandCapabilityResponse); ok { + if casted, ok := structType.(SysexCommandCapabilityResponse); ok { return casted } if casted, ok := structType.(*SysexCommandCapabilityResponse); ok { @@ -100,6 +103,7 @@ func (m *_SysexCommandCapabilityResponse) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_SysexCommandCapabilityResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -123,7 +127,8 @@ func SysexCommandCapabilityResponseParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_SysexCommandCapabilityResponse{ - _SysexCommand: &_SysexCommand{}, + _SysexCommand: &_SysexCommand{ + }, } _child._SysexCommand._SysexCommandChildRequirements = _child return _child, nil @@ -153,6 +158,7 @@ func (m *_SysexCommandCapabilityResponse) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SysexCommandCapabilityResponse) isSysexCommandCapabilityResponse() bool { return true } @@ -167,3 +173,6 @@ func (m *_SysexCommandCapabilityResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/firmata/readwrite/model/SysexCommandExtendedAnalog.go b/plc4go/protocols/firmata/readwrite/model/SysexCommandExtendedAnalog.go index d2a3e6c584a..71e2b17c2a3 100644 --- a/plc4go/protocols/firmata/readwrite/model/SysexCommandExtendedAnalog.go +++ b/plc4go/protocols/firmata/readwrite/model/SysexCommandExtendedAnalog.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SysexCommandExtendedAnalog is the corresponding interface of SysexCommandExtendedAnalog type SysexCommandExtendedAnalog interface { @@ -46,34 +48,35 @@ type _SysexCommandExtendedAnalog struct { *_SysexCommand } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SysexCommandExtendedAnalog) GetCommandType() uint8 { - return 0x6F -} +func (m *_SysexCommandExtendedAnalog) GetCommandType() uint8 { +return 0x6F} -func (m *_SysexCommandExtendedAnalog) GetResponse() bool { - return false -} +func (m *_SysexCommandExtendedAnalog) GetResponse() bool { +return false} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SysexCommandExtendedAnalog) InitializeParent(parent SysexCommand) {} +func (m *_SysexCommandExtendedAnalog) InitializeParent(parent SysexCommand ) {} -func (m *_SysexCommandExtendedAnalog) GetParent() SysexCommand { +func (m *_SysexCommandExtendedAnalog) GetParent() SysexCommand { return m._SysexCommand } + // NewSysexCommandExtendedAnalog factory function for _SysexCommandExtendedAnalog -func NewSysexCommandExtendedAnalog() *_SysexCommandExtendedAnalog { +func NewSysexCommandExtendedAnalog( ) *_SysexCommandExtendedAnalog { _result := &_SysexCommandExtendedAnalog{ - _SysexCommand: NewSysexCommand(), + _SysexCommand: NewSysexCommand(), } _result._SysexCommand._SysexCommandChildRequirements = _result return _result @@ -81,7 +84,7 @@ func NewSysexCommandExtendedAnalog() *_SysexCommandExtendedAnalog { // Deprecated: use the interface for direct cast func CastSysexCommandExtendedAnalog(structType interface{}) SysexCommandExtendedAnalog { - if casted, ok := structType.(SysexCommandExtendedAnalog); ok { + if casted, ok := structType.(SysexCommandExtendedAnalog); ok { return casted } if casted, ok := structType.(*SysexCommandExtendedAnalog); ok { @@ -100,6 +103,7 @@ func (m *_SysexCommandExtendedAnalog) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_SysexCommandExtendedAnalog) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -123,7 +127,8 @@ func SysexCommandExtendedAnalogParseWithBuffer(ctx context.Context, readBuffer u // Create a partially initialized instance _child := &_SysexCommandExtendedAnalog{ - _SysexCommand: &_SysexCommand{}, + _SysexCommand: &_SysexCommand{ + }, } _child._SysexCommand._SysexCommandChildRequirements = _child return _child, nil @@ -153,6 +158,7 @@ func (m *_SysexCommandExtendedAnalog) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SysexCommandExtendedAnalog) isSysexCommandExtendedAnalog() bool { return true } @@ -167,3 +173,6 @@ func (m *_SysexCommandExtendedAnalog) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/firmata/readwrite/model/SysexCommandExtendedId.go b/plc4go/protocols/firmata/readwrite/model/SysexCommandExtendedId.go index 9ed95254bed..5eb6e9d1469 100644 --- a/plc4go/protocols/firmata/readwrite/model/SysexCommandExtendedId.go +++ b/plc4go/protocols/firmata/readwrite/model/SysexCommandExtendedId.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SysexCommandExtendedId is the corresponding interface of SysexCommandExtendedId type SysexCommandExtendedId interface { @@ -47,33 +49,32 @@ type SysexCommandExtendedIdExactly interface { // _SysexCommandExtendedId is the data-structure of this message type _SysexCommandExtendedId struct { *_SysexCommand - Id []int8 + Id []int8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SysexCommandExtendedId) GetCommandType() uint8 { - return 0x00 -} +func (m *_SysexCommandExtendedId) GetCommandType() uint8 { +return 0x00} -func (m *_SysexCommandExtendedId) GetResponse() bool { - return false -} +func (m *_SysexCommandExtendedId) GetResponse() bool { +return false} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SysexCommandExtendedId) InitializeParent(parent SysexCommand) {} +func (m *_SysexCommandExtendedId) InitializeParent(parent SysexCommand ) {} -func (m *_SysexCommandExtendedId) GetParent() SysexCommand { +func (m *_SysexCommandExtendedId) GetParent() SysexCommand { return m._SysexCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -88,11 +89,12 @@ func (m *_SysexCommandExtendedId) GetId() []int8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSysexCommandExtendedId factory function for _SysexCommandExtendedId -func NewSysexCommandExtendedId(id []int8) *_SysexCommandExtendedId { +func NewSysexCommandExtendedId( id []int8 ) *_SysexCommandExtendedId { _result := &_SysexCommandExtendedId{ - Id: id, - _SysexCommand: NewSysexCommand(), + Id: id, + _SysexCommand: NewSysexCommand(), } _result._SysexCommand._SysexCommandChildRequirements = _result return _result @@ -100,7 +102,7 @@ func NewSysexCommandExtendedId(id []int8) *_SysexCommandExtendedId { // Deprecated: use the interface for direct cast func CastSysexCommandExtendedId(structType interface{}) SysexCommandExtendedId { - if casted, ok := structType.(SysexCommandExtendedId); ok { + if casted, ok := structType.(SysexCommandExtendedId); ok { return casted } if casted, ok := structType.(*SysexCommandExtendedId); ok { @@ -124,6 +126,7 @@ func (m *_SysexCommandExtendedId) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_SysexCommandExtendedId) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -157,7 +160,7 @@ func SysexCommandExtendedIdParseWithBuffer(ctx context.Context, readBuffer utils arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := readBuffer.ReadInt8("", 8) +_item, _err := readBuffer.ReadInt8("", 8) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'id' field of SysexCommandExtendedId") } @@ -174,8 +177,9 @@ func SysexCommandExtendedIdParseWithBuffer(ctx context.Context, readBuffer utils // Create a partially initialized instance _child := &_SysexCommandExtendedId{ - _SysexCommand: &_SysexCommand{}, - Id: id, + _SysexCommand: &_SysexCommand{ + }, + Id: id, } _child._SysexCommand._SysexCommandChildRequirements = _child return _child, nil @@ -197,20 +201,20 @@ func (m *_SysexCommandExtendedId) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for SysexCommandExtendedId") } - // Array Field (id) - if pushErr := writeBuffer.PushContext("id", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for id") - } - for _curItem, _element := range m.GetId() { - _ = _curItem - _elementErr := writeBuffer.WriteInt8("", 8, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'id' field") - } - } - if popErr := writeBuffer.PopContext("id", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for id") + // Array Field (id) + if pushErr := writeBuffer.PushContext("id", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for id") + } + for _curItem, _element := range m.GetId() { + _ = _curItem + _elementErr := writeBuffer.WriteInt8("", 8, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'id' field") } + } + if popErr := writeBuffer.PopContext("id", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for id") + } if popErr := writeBuffer.PopContext("SysexCommandExtendedId"); popErr != nil { return errors.Wrap(popErr, "Error popping for SysexCommandExtendedId") @@ -220,6 +224,7 @@ func (m *_SysexCommandExtendedId) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SysexCommandExtendedId) isSysexCommandExtendedId() bool { return true } @@ -234,3 +239,6 @@ func (m *_SysexCommandExtendedId) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/firmata/readwrite/model/SysexCommandPinStateQuery.go b/plc4go/protocols/firmata/readwrite/model/SysexCommandPinStateQuery.go index 9d260b330b7..fdcca1e2516 100644 --- a/plc4go/protocols/firmata/readwrite/model/SysexCommandPinStateQuery.go +++ b/plc4go/protocols/firmata/readwrite/model/SysexCommandPinStateQuery.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SysexCommandPinStateQuery is the corresponding interface of SysexCommandPinStateQuery type SysexCommandPinStateQuery interface { @@ -46,33 +48,32 @@ type SysexCommandPinStateQueryExactly interface { // _SysexCommandPinStateQuery is the data-structure of this message type _SysexCommandPinStateQuery struct { *_SysexCommand - Pin uint8 + Pin uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SysexCommandPinStateQuery) GetCommandType() uint8 { - return 0x6D -} +func (m *_SysexCommandPinStateQuery) GetCommandType() uint8 { +return 0x6D} -func (m *_SysexCommandPinStateQuery) GetResponse() bool { - return false -} +func (m *_SysexCommandPinStateQuery) GetResponse() bool { +return false} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SysexCommandPinStateQuery) InitializeParent(parent SysexCommand) {} +func (m *_SysexCommandPinStateQuery) InitializeParent(parent SysexCommand ) {} -func (m *_SysexCommandPinStateQuery) GetParent() SysexCommand { +func (m *_SysexCommandPinStateQuery) GetParent() SysexCommand { return m._SysexCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -87,11 +88,12 @@ func (m *_SysexCommandPinStateQuery) GetPin() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSysexCommandPinStateQuery factory function for _SysexCommandPinStateQuery -func NewSysexCommandPinStateQuery(pin uint8) *_SysexCommandPinStateQuery { +func NewSysexCommandPinStateQuery( pin uint8 ) *_SysexCommandPinStateQuery { _result := &_SysexCommandPinStateQuery{ - Pin: pin, - _SysexCommand: NewSysexCommand(), + Pin: pin, + _SysexCommand: NewSysexCommand(), } _result._SysexCommand._SysexCommandChildRequirements = _result return _result @@ -99,7 +101,7 @@ func NewSysexCommandPinStateQuery(pin uint8) *_SysexCommandPinStateQuery { // Deprecated: use the interface for direct cast func CastSysexCommandPinStateQuery(structType interface{}) SysexCommandPinStateQuery { - if casted, ok := structType.(SysexCommandPinStateQuery); ok { + if casted, ok := structType.(SysexCommandPinStateQuery); ok { return casted } if casted, ok := structType.(*SysexCommandPinStateQuery); ok { @@ -116,11 +118,12 @@ func (m *_SysexCommandPinStateQuery) GetLengthInBits(ctx context.Context) uint16 lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (pin) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_SysexCommandPinStateQuery) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +142,7 @@ func SysexCommandPinStateQueryParseWithBuffer(ctx context.Context, readBuffer ut _ = currentPos // Simple Field (pin) - _pin, _pinErr := readBuffer.ReadUint8("pin", 8) +_pin, _pinErr := readBuffer.ReadUint8("pin", 8) if _pinErr != nil { return nil, errors.Wrap(_pinErr, "Error parsing 'pin' field of SysexCommandPinStateQuery") } @@ -151,8 +154,9 @@ func SysexCommandPinStateQueryParseWithBuffer(ctx context.Context, readBuffer ut // Create a partially initialized instance _child := &_SysexCommandPinStateQuery{ - _SysexCommand: &_SysexCommand{}, - Pin: pin, + _SysexCommand: &_SysexCommand{ + }, + Pin: pin, } _child._SysexCommand._SysexCommandChildRequirements = _child return _child, nil @@ -174,12 +178,12 @@ func (m *_SysexCommandPinStateQuery) SerializeWithWriteBuffer(ctx context.Contex return errors.Wrap(pushErr, "Error pushing for SysexCommandPinStateQuery") } - // Simple Field (pin) - pin := uint8(m.GetPin()) - _pinErr := writeBuffer.WriteUint8("pin", 8, (pin)) - if _pinErr != nil { - return errors.Wrap(_pinErr, "Error serializing 'pin' field") - } + // Simple Field (pin) + pin := uint8(m.GetPin()) + _pinErr := writeBuffer.WriteUint8("pin", 8, (pin)) + if _pinErr != nil { + return errors.Wrap(_pinErr, "Error serializing 'pin' field") + } if popErr := writeBuffer.PopContext("SysexCommandPinStateQuery"); popErr != nil { return errors.Wrap(popErr, "Error popping for SysexCommandPinStateQuery") @@ -189,6 +193,7 @@ func (m *_SysexCommandPinStateQuery) SerializeWithWriteBuffer(ctx context.Contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SysexCommandPinStateQuery) isSysexCommandPinStateQuery() bool { return true } @@ -203,3 +208,6 @@ func (m *_SysexCommandPinStateQuery) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/firmata/readwrite/model/SysexCommandPinStateResponse.go b/plc4go/protocols/firmata/readwrite/model/SysexCommandPinStateResponse.go index e39ef803f28..e0b8196cdda 100644 --- a/plc4go/protocols/firmata/readwrite/model/SysexCommandPinStateResponse.go +++ b/plc4go/protocols/firmata/readwrite/model/SysexCommandPinStateResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SysexCommandPinStateResponse is the corresponding interface of SysexCommandPinStateResponse type SysexCommandPinStateResponse interface { @@ -50,35 +52,34 @@ type SysexCommandPinStateResponseExactly interface { // _SysexCommandPinStateResponse is the data-structure of this message type _SysexCommandPinStateResponse struct { *_SysexCommand - Pin uint8 - PinMode uint8 - PinState uint8 + Pin uint8 + PinMode uint8 + PinState uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SysexCommandPinStateResponse) GetCommandType() uint8 { - return 0x6E -} +func (m *_SysexCommandPinStateResponse) GetCommandType() uint8 { +return 0x6E} -func (m *_SysexCommandPinStateResponse) GetResponse() bool { - return false -} +func (m *_SysexCommandPinStateResponse) GetResponse() bool { +return false} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SysexCommandPinStateResponse) InitializeParent(parent SysexCommand) {} +func (m *_SysexCommandPinStateResponse) InitializeParent(parent SysexCommand ) {} -func (m *_SysexCommandPinStateResponse) GetParent() SysexCommand { +func (m *_SysexCommandPinStateResponse) GetParent() SysexCommand { return m._SysexCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -101,13 +102,14 @@ func (m *_SysexCommandPinStateResponse) GetPinState() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSysexCommandPinStateResponse factory function for _SysexCommandPinStateResponse -func NewSysexCommandPinStateResponse(pin uint8, pinMode uint8, pinState uint8) *_SysexCommandPinStateResponse { +func NewSysexCommandPinStateResponse( pin uint8 , pinMode uint8 , pinState uint8 ) *_SysexCommandPinStateResponse { _result := &_SysexCommandPinStateResponse{ - Pin: pin, - PinMode: pinMode, - PinState: pinState, - _SysexCommand: NewSysexCommand(), + Pin: pin, + PinMode: pinMode, + PinState: pinState, + _SysexCommand: NewSysexCommand(), } _result._SysexCommand._SysexCommandChildRequirements = _result return _result @@ -115,7 +117,7 @@ func NewSysexCommandPinStateResponse(pin uint8, pinMode uint8, pinState uint8) * // Deprecated: use the interface for direct cast func CastSysexCommandPinStateResponse(structType interface{}) SysexCommandPinStateResponse { - if casted, ok := structType.(SysexCommandPinStateResponse); ok { + if casted, ok := structType.(SysexCommandPinStateResponse); ok { return casted } if casted, ok := structType.(*SysexCommandPinStateResponse); ok { @@ -132,17 +134,18 @@ func (m *_SysexCommandPinStateResponse) GetLengthInBits(ctx context.Context) uin lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (pin) - lengthInBits += 8 + lengthInBits += 8; // Simple field (pinMode) - lengthInBits += 8 + lengthInBits += 8; // Simple field (pinState) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_SysexCommandPinStateResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -161,21 +164,21 @@ func SysexCommandPinStateResponseParseWithBuffer(ctx context.Context, readBuffer _ = currentPos // Simple Field (pin) - _pin, _pinErr := readBuffer.ReadUint8("pin", 8) +_pin, _pinErr := readBuffer.ReadUint8("pin", 8) if _pinErr != nil { return nil, errors.Wrap(_pinErr, "Error parsing 'pin' field of SysexCommandPinStateResponse") } pin := _pin // Simple Field (pinMode) - _pinMode, _pinModeErr := readBuffer.ReadUint8("pinMode", 8) +_pinMode, _pinModeErr := readBuffer.ReadUint8("pinMode", 8) if _pinModeErr != nil { return nil, errors.Wrap(_pinModeErr, "Error parsing 'pinMode' field of SysexCommandPinStateResponse") } pinMode := _pinMode // Simple Field (pinState) - _pinState, _pinStateErr := readBuffer.ReadUint8("pinState", 8) +_pinState, _pinStateErr := readBuffer.ReadUint8("pinState", 8) if _pinStateErr != nil { return nil, errors.Wrap(_pinStateErr, "Error parsing 'pinState' field of SysexCommandPinStateResponse") } @@ -187,10 +190,11 @@ func SysexCommandPinStateResponseParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_SysexCommandPinStateResponse{ - _SysexCommand: &_SysexCommand{}, - Pin: pin, - PinMode: pinMode, - PinState: pinState, + _SysexCommand: &_SysexCommand{ + }, + Pin: pin, + PinMode: pinMode, + PinState: pinState, } _child._SysexCommand._SysexCommandChildRequirements = _child return _child, nil @@ -212,26 +216,26 @@ func (m *_SysexCommandPinStateResponse) SerializeWithWriteBuffer(ctx context.Con return errors.Wrap(pushErr, "Error pushing for SysexCommandPinStateResponse") } - // Simple Field (pin) - pin := uint8(m.GetPin()) - _pinErr := writeBuffer.WriteUint8("pin", 8, (pin)) - if _pinErr != nil { - return errors.Wrap(_pinErr, "Error serializing 'pin' field") - } + // Simple Field (pin) + pin := uint8(m.GetPin()) + _pinErr := writeBuffer.WriteUint8("pin", 8, (pin)) + if _pinErr != nil { + return errors.Wrap(_pinErr, "Error serializing 'pin' field") + } - // Simple Field (pinMode) - pinMode := uint8(m.GetPinMode()) - _pinModeErr := writeBuffer.WriteUint8("pinMode", 8, (pinMode)) - if _pinModeErr != nil { - return errors.Wrap(_pinModeErr, "Error serializing 'pinMode' field") - } + // Simple Field (pinMode) + pinMode := uint8(m.GetPinMode()) + _pinModeErr := writeBuffer.WriteUint8("pinMode", 8, (pinMode)) + if _pinModeErr != nil { + return errors.Wrap(_pinModeErr, "Error serializing 'pinMode' field") + } - // Simple Field (pinState) - pinState := uint8(m.GetPinState()) - _pinStateErr := writeBuffer.WriteUint8("pinState", 8, (pinState)) - if _pinStateErr != nil { - return errors.Wrap(_pinStateErr, "Error serializing 'pinState' field") - } + // Simple Field (pinState) + pinState := uint8(m.GetPinState()) + _pinStateErr := writeBuffer.WriteUint8("pinState", 8, (pinState)) + if _pinStateErr != nil { + return errors.Wrap(_pinStateErr, "Error serializing 'pinState' field") + } if popErr := writeBuffer.PopContext("SysexCommandPinStateResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for SysexCommandPinStateResponse") @@ -241,6 +245,7 @@ func (m *_SysexCommandPinStateResponse) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SysexCommandPinStateResponse) isSysexCommandPinStateResponse() bool { return true } @@ -255,3 +260,6 @@ func (m *_SysexCommandPinStateResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/firmata/readwrite/model/SysexCommandReportFirmwareRequest.go b/plc4go/protocols/firmata/readwrite/model/SysexCommandReportFirmwareRequest.go index efc2bb60cc9..bcdb8120cef 100644 --- a/plc4go/protocols/firmata/readwrite/model/SysexCommandReportFirmwareRequest.go +++ b/plc4go/protocols/firmata/readwrite/model/SysexCommandReportFirmwareRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SysexCommandReportFirmwareRequest is the corresponding interface of SysexCommandReportFirmwareRequest type SysexCommandReportFirmwareRequest interface { @@ -46,34 +48,35 @@ type _SysexCommandReportFirmwareRequest struct { *_SysexCommand } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SysexCommandReportFirmwareRequest) GetCommandType() uint8 { - return 0x79 -} +func (m *_SysexCommandReportFirmwareRequest) GetCommandType() uint8 { +return 0x79} -func (m *_SysexCommandReportFirmwareRequest) GetResponse() bool { - return bool(false) -} +func (m *_SysexCommandReportFirmwareRequest) GetResponse() bool { +return bool(false)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SysexCommandReportFirmwareRequest) InitializeParent(parent SysexCommand) {} +func (m *_SysexCommandReportFirmwareRequest) InitializeParent(parent SysexCommand ) {} -func (m *_SysexCommandReportFirmwareRequest) GetParent() SysexCommand { +func (m *_SysexCommandReportFirmwareRequest) GetParent() SysexCommand { return m._SysexCommand } + // NewSysexCommandReportFirmwareRequest factory function for _SysexCommandReportFirmwareRequest -func NewSysexCommandReportFirmwareRequest() *_SysexCommandReportFirmwareRequest { +func NewSysexCommandReportFirmwareRequest( ) *_SysexCommandReportFirmwareRequest { _result := &_SysexCommandReportFirmwareRequest{ - _SysexCommand: NewSysexCommand(), + _SysexCommand: NewSysexCommand(), } _result._SysexCommand._SysexCommandChildRequirements = _result return _result @@ -81,7 +84,7 @@ func NewSysexCommandReportFirmwareRequest() *_SysexCommandReportFirmwareRequest // Deprecated: use the interface for direct cast func CastSysexCommandReportFirmwareRequest(structType interface{}) SysexCommandReportFirmwareRequest { - if casted, ok := structType.(SysexCommandReportFirmwareRequest); ok { + if casted, ok := structType.(SysexCommandReportFirmwareRequest); ok { return casted } if casted, ok := structType.(*SysexCommandReportFirmwareRequest); ok { @@ -100,6 +103,7 @@ func (m *_SysexCommandReportFirmwareRequest) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_SysexCommandReportFirmwareRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -123,7 +127,8 @@ func SysexCommandReportFirmwareRequestParseWithBuffer(ctx context.Context, readB // Create a partially initialized instance _child := &_SysexCommandReportFirmwareRequest{ - _SysexCommand: &_SysexCommand{}, + _SysexCommand: &_SysexCommand{ + }, } _child._SysexCommand._SysexCommandChildRequirements = _child return _child, nil @@ -153,6 +158,7 @@ func (m *_SysexCommandReportFirmwareRequest) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SysexCommandReportFirmwareRequest) isSysexCommandReportFirmwareRequest() bool { return true } @@ -167,3 +173,6 @@ func (m *_SysexCommandReportFirmwareRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/firmata/readwrite/model/SysexCommandReportFirmwareResponse.go b/plc4go/protocols/firmata/readwrite/model/SysexCommandReportFirmwareResponse.go index 9ad3fa7b6cb..b8d3bf59ebe 100644 --- a/plc4go/protocols/firmata/readwrite/model/SysexCommandReportFirmwareResponse.go +++ b/plc4go/protocols/firmata/readwrite/model/SysexCommandReportFirmwareResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SysexCommandReportFirmwareResponse is the corresponding interface of SysexCommandReportFirmwareResponse type SysexCommandReportFirmwareResponse interface { @@ -50,35 +52,34 @@ type SysexCommandReportFirmwareResponseExactly interface { // _SysexCommandReportFirmwareResponse is the data-structure of this message type _SysexCommandReportFirmwareResponse struct { *_SysexCommand - MajorVersion uint8 - MinorVersion uint8 - FileName []byte + MajorVersion uint8 + MinorVersion uint8 + FileName []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SysexCommandReportFirmwareResponse) GetCommandType() uint8 { - return 0x79 -} +func (m *_SysexCommandReportFirmwareResponse) GetCommandType() uint8 { +return 0x79} -func (m *_SysexCommandReportFirmwareResponse) GetResponse() bool { - return bool(true) -} +func (m *_SysexCommandReportFirmwareResponse) GetResponse() bool { +return bool(true)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SysexCommandReportFirmwareResponse) InitializeParent(parent SysexCommand) {} +func (m *_SysexCommandReportFirmwareResponse) InitializeParent(parent SysexCommand ) {} -func (m *_SysexCommandReportFirmwareResponse) GetParent() SysexCommand { +func (m *_SysexCommandReportFirmwareResponse) GetParent() SysexCommand { return m._SysexCommand } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -101,13 +102,14 @@ func (m *_SysexCommandReportFirmwareResponse) GetFileName() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSysexCommandReportFirmwareResponse factory function for _SysexCommandReportFirmwareResponse -func NewSysexCommandReportFirmwareResponse(majorVersion uint8, minorVersion uint8, fileName []byte) *_SysexCommandReportFirmwareResponse { +func NewSysexCommandReportFirmwareResponse( majorVersion uint8 , minorVersion uint8 , fileName []byte ) *_SysexCommandReportFirmwareResponse { _result := &_SysexCommandReportFirmwareResponse{ - MajorVersion: majorVersion, - MinorVersion: minorVersion, - FileName: fileName, - _SysexCommand: NewSysexCommand(), + MajorVersion: majorVersion, + MinorVersion: minorVersion, + FileName: fileName, + _SysexCommand: NewSysexCommand(), } _result._SysexCommand._SysexCommandChildRequirements = _result return _result @@ -115,7 +117,7 @@ func NewSysexCommandReportFirmwareResponse(majorVersion uint8, minorVersion uint // Deprecated: use the interface for direct cast func CastSysexCommandReportFirmwareResponse(structType interface{}) SysexCommandReportFirmwareResponse { - if casted, ok := structType.(SysexCommandReportFirmwareResponse); ok { + if casted, ok := structType.(SysexCommandReportFirmwareResponse); ok { return casted } if casted, ok := structType.(*SysexCommandReportFirmwareResponse); ok { @@ -132,10 +134,10 @@ func (m *_SysexCommandReportFirmwareResponse) GetLengthInBits(ctx context.Contex lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (majorVersion) - lengthInBits += 8 + lengthInBits += 8; // Simple field (minorVersion) - lengthInBits += 8 + lengthInBits += 8; // Manual Array Field (fileName) lengthInBits += uint16(LengthSysexString(m.GetFileName())) @@ -143,6 +145,7 @@ func (m *_SysexCommandReportFirmwareResponse) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_SysexCommandReportFirmwareResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -161,14 +164,14 @@ func SysexCommandReportFirmwareResponseParseWithBuffer(ctx context.Context, read _ = currentPos // Simple Field (majorVersion) - _majorVersion, _majorVersionErr := readBuffer.ReadUint8("majorVersion", 8) +_majorVersion, _majorVersionErr := readBuffer.ReadUint8("majorVersion", 8) if _majorVersionErr != nil { return nil, errors.Wrap(_majorVersionErr, "Error parsing 'majorVersion' field of SysexCommandReportFirmwareResponse") } majorVersion := _majorVersion // Simple Field (minorVersion) - _minorVersion, _minorVersionErr := readBuffer.ReadUint8("minorVersion", 8) +_minorVersion, _minorVersionErr := readBuffer.ReadUint8("minorVersion", 8) if _minorVersionErr != nil { return nil, errors.Wrap(_minorVersionErr, "Error parsing 'minorVersion' field of SysexCommandReportFirmwareResponse") } @@ -182,8 +185,8 @@ func SysexCommandReportFirmwareResponseParseWithBuffer(ctx context.Context, read { _values := &_fileNameList _ = _values - for !((bool)(IsSysexEnd(readBuffer))) { - _fileNameList = append(_fileNameList, ((byte)(ParseSysexString(readBuffer)))) + for ;!((bool) (IsSysexEnd(readBuffer))); { + _fileNameList = append(_fileNameList, ((byte) (ParseSysexString(readBuffer)))) } } @@ -198,10 +201,11 @@ func SysexCommandReportFirmwareResponseParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_SysexCommandReportFirmwareResponse{ - _SysexCommand: &_SysexCommand{}, - MajorVersion: majorVersion, - MinorVersion: minorVersion, - FileName: fileName, + _SysexCommand: &_SysexCommand{ + }, + MajorVersion: majorVersion, + MinorVersion: minorVersion, + FileName: fileName, } _child._SysexCommand._SysexCommandChildRequirements = _child return _child, nil @@ -223,30 +227,30 @@ func (m *_SysexCommandReportFirmwareResponse) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for SysexCommandReportFirmwareResponse") } - // Simple Field (majorVersion) - majorVersion := uint8(m.GetMajorVersion()) - _majorVersionErr := writeBuffer.WriteUint8("majorVersion", 8, (majorVersion)) - if _majorVersionErr != nil { - return errors.Wrap(_majorVersionErr, "Error serializing 'majorVersion' field") - } + // Simple Field (majorVersion) + majorVersion := uint8(m.GetMajorVersion()) + _majorVersionErr := writeBuffer.WriteUint8("majorVersion", 8, (majorVersion)) + if _majorVersionErr != nil { + return errors.Wrap(_majorVersionErr, "Error serializing 'majorVersion' field") + } - // Simple Field (minorVersion) - minorVersion := uint8(m.GetMinorVersion()) - _minorVersionErr := writeBuffer.WriteUint8("minorVersion", 8, (minorVersion)) - if _minorVersionErr != nil { - return errors.Wrap(_minorVersionErr, "Error serializing 'minorVersion' field") - } + // Simple Field (minorVersion) + minorVersion := uint8(m.GetMinorVersion()) + _minorVersionErr := writeBuffer.WriteUint8("minorVersion", 8, (minorVersion)) + if _minorVersionErr != nil { + return errors.Wrap(_minorVersionErr, "Error serializing 'minorVersion' field") + } - // Manual Array Field (fileName) - if pushErr := writeBuffer.PushContext("fileName", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for fileName") - } - for _, m := range m.GetFileName() { + // Manual Array Field (fileName) + if pushErr := writeBuffer.PushContext("fileName", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for fileName") + } + for _, m := range m.GetFileName() { SerializeSysexString(writeBuffer, m) - } - if popErr := writeBuffer.PopContext("fileName", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for fileName") - } + } + if popErr := writeBuffer.PopContext("fileName", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for fileName") + } if popErr := writeBuffer.PopContext("SysexCommandReportFirmwareResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for SysexCommandReportFirmwareResponse") @@ -256,6 +260,7 @@ func (m *_SysexCommandReportFirmwareResponse) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SysexCommandReportFirmwareResponse) isSysexCommandReportFirmwareResponse() bool { return true } @@ -270,3 +275,6 @@ func (m *_SysexCommandReportFirmwareResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/firmata/readwrite/model/SysexCommandSamplingInterval.go b/plc4go/protocols/firmata/readwrite/model/SysexCommandSamplingInterval.go index f58aa9541a4..6f710d3b0e4 100644 --- a/plc4go/protocols/firmata/readwrite/model/SysexCommandSamplingInterval.go +++ b/plc4go/protocols/firmata/readwrite/model/SysexCommandSamplingInterval.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SysexCommandSamplingInterval is the corresponding interface of SysexCommandSamplingInterval type SysexCommandSamplingInterval interface { @@ -46,34 +48,35 @@ type _SysexCommandSamplingInterval struct { *_SysexCommand } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SysexCommandSamplingInterval) GetCommandType() uint8 { - return 0x7A -} +func (m *_SysexCommandSamplingInterval) GetCommandType() uint8 { +return 0x7A} -func (m *_SysexCommandSamplingInterval) GetResponse() bool { - return false -} +func (m *_SysexCommandSamplingInterval) GetResponse() bool { +return false} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SysexCommandSamplingInterval) InitializeParent(parent SysexCommand) {} +func (m *_SysexCommandSamplingInterval) InitializeParent(parent SysexCommand ) {} -func (m *_SysexCommandSamplingInterval) GetParent() SysexCommand { +func (m *_SysexCommandSamplingInterval) GetParent() SysexCommand { return m._SysexCommand } + // NewSysexCommandSamplingInterval factory function for _SysexCommandSamplingInterval -func NewSysexCommandSamplingInterval() *_SysexCommandSamplingInterval { +func NewSysexCommandSamplingInterval( ) *_SysexCommandSamplingInterval { _result := &_SysexCommandSamplingInterval{ - _SysexCommand: NewSysexCommand(), + _SysexCommand: NewSysexCommand(), } _result._SysexCommand._SysexCommandChildRequirements = _result return _result @@ -81,7 +84,7 @@ func NewSysexCommandSamplingInterval() *_SysexCommandSamplingInterval { // Deprecated: use the interface for direct cast func CastSysexCommandSamplingInterval(structType interface{}) SysexCommandSamplingInterval { - if casted, ok := structType.(SysexCommandSamplingInterval); ok { + if casted, ok := structType.(SysexCommandSamplingInterval); ok { return casted } if casted, ok := structType.(*SysexCommandSamplingInterval); ok { @@ -100,6 +103,7 @@ func (m *_SysexCommandSamplingInterval) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_SysexCommandSamplingInterval) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -123,7 +127,8 @@ func SysexCommandSamplingIntervalParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_SysexCommandSamplingInterval{ - _SysexCommand: &_SysexCommand{}, + _SysexCommand: &_SysexCommand{ + }, } _child._SysexCommand._SysexCommandChildRequirements = _child return _child, nil @@ -153,6 +158,7 @@ func (m *_SysexCommandSamplingInterval) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SysexCommandSamplingInterval) isSysexCommandSamplingInterval() bool { return true } @@ -167,3 +173,6 @@ func (m *_SysexCommandSamplingInterval) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/firmata/readwrite/model/SysexCommandStringData.go b/plc4go/protocols/firmata/readwrite/model/SysexCommandStringData.go index c5c1f2a93e5..6a6d82a0e6e 100644 --- a/plc4go/protocols/firmata/readwrite/model/SysexCommandStringData.go +++ b/plc4go/protocols/firmata/readwrite/model/SysexCommandStringData.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SysexCommandStringData is the corresponding interface of SysexCommandStringData type SysexCommandStringData interface { @@ -46,34 +48,35 @@ type _SysexCommandStringData struct { *_SysexCommand } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SysexCommandStringData) GetCommandType() uint8 { - return 0x71 -} +func (m *_SysexCommandStringData) GetCommandType() uint8 { +return 0x71} -func (m *_SysexCommandStringData) GetResponse() bool { - return false -} +func (m *_SysexCommandStringData) GetResponse() bool { +return false} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SysexCommandStringData) InitializeParent(parent SysexCommand) {} +func (m *_SysexCommandStringData) InitializeParent(parent SysexCommand ) {} -func (m *_SysexCommandStringData) GetParent() SysexCommand { +func (m *_SysexCommandStringData) GetParent() SysexCommand { return m._SysexCommand } + // NewSysexCommandStringData factory function for _SysexCommandStringData -func NewSysexCommandStringData() *_SysexCommandStringData { +func NewSysexCommandStringData( ) *_SysexCommandStringData { _result := &_SysexCommandStringData{ - _SysexCommand: NewSysexCommand(), + _SysexCommand: NewSysexCommand(), } _result._SysexCommand._SysexCommandChildRequirements = _result return _result @@ -81,7 +84,7 @@ func NewSysexCommandStringData() *_SysexCommandStringData { // Deprecated: use the interface for direct cast func CastSysexCommandStringData(structType interface{}) SysexCommandStringData { - if casted, ok := structType.(SysexCommandStringData); ok { + if casted, ok := structType.(SysexCommandStringData); ok { return casted } if casted, ok := structType.(*SysexCommandStringData); ok { @@ -100,6 +103,7 @@ func (m *_SysexCommandStringData) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_SysexCommandStringData) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -123,7 +127,8 @@ func SysexCommandStringDataParseWithBuffer(ctx context.Context, readBuffer utils // Create a partially initialized instance _child := &_SysexCommandStringData{ - _SysexCommand: &_SysexCommand{}, + _SysexCommand: &_SysexCommand{ + }, } _child._SysexCommand._SysexCommandChildRequirements = _child return _child, nil @@ -153,6 +158,7 @@ func (m *_SysexCommandStringData) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SysexCommandStringData) isSysexCommandStringData() bool { return true } @@ -167,3 +173,6 @@ func (m *_SysexCommandStringData) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/firmata/readwrite/model/SysexCommandSysexNonRealtime.go b/plc4go/protocols/firmata/readwrite/model/SysexCommandSysexNonRealtime.go index 4386f998785..5f84e84314d 100644 --- a/plc4go/protocols/firmata/readwrite/model/SysexCommandSysexNonRealtime.go +++ b/plc4go/protocols/firmata/readwrite/model/SysexCommandSysexNonRealtime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SysexCommandSysexNonRealtime is the corresponding interface of SysexCommandSysexNonRealtime type SysexCommandSysexNonRealtime interface { @@ -46,34 +48,35 @@ type _SysexCommandSysexNonRealtime struct { *_SysexCommand } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SysexCommandSysexNonRealtime) GetCommandType() uint8 { - return 0x7E -} +func (m *_SysexCommandSysexNonRealtime) GetCommandType() uint8 { +return 0x7E} -func (m *_SysexCommandSysexNonRealtime) GetResponse() bool { - return false -} +func (m *_SysexCommandSysexNonRealtime) GetResponse() bool { +return false} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SysexCommandSysexNonRealtime) InitializeParent(parent SysexCommand) {} +func (m *_SysexCommandSysexNonRealtime) InitializeParent(parent SysexCommand ) {} -func (m *_SysexCommandSysexNonRealtime) GetParent() SysexCommand { +func (m *_SysexCommandSysexNonRealtime) GetParent() SysexCommand { return m._SysexCommand } + // NewSysexCommandSysexNonRealtime factory function for _SysexCommandSysexNonRealtime -func NewSysexCommandSysexNonRealtime() *_SysexCommandSysexNonRealtime { +func NewSysexCommandSysexNonRealtime( ) *_SysexCommandSysexNonRealtime { _result := &_SysexCommandSysexNonRealtime{ - _SysexCommand: NewSysexCommand(), + _SysexCommand: NewSysexCommand(), } _result._SysexCommand._SysexCommandChildRequirements = _result return _result @@ -81,7 +84,7 @@ func NewSysexCommandSysexNonRealtime() *_SysexCommandSysexNonRealtime { // Deprecated: use the interface for direct cast func CastSysexCommandSysexNonRealtime(structType interface{}) SysexCommandSysexNonRealtime { - if casted, ok := structType.(SysexCommandSysexNonRealtime); ok { + if casted, ok := structType.(SysexCommandSysexNonRealtime); ok { return casted } if casted, ok := structType.(*SysexCommandSysexNonRealtime); ok { @@ -100,6 +103,7 @@ func (m *_SysexCommandSysexNonRealtime) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_SysexCommandSysexNonRealtime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -123,7 +127,8 @@ func SysexCommandSysexNonRealtimeParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_SysexCommandSysexNonRealtime{ - _SysexCommand: &_SysexCommand{}, + _SysexCommand: &_SysexCommand{ + }, } _child._SysexCommand._SysexCommandChildRequirements = _child return _child, nil @@ -153,6 +158,7 @@ func (m *_SysexCommandSysexNonRealtime) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SysexCommandSysexNonRealtime) isSysexCommandSysexNonRealtime() bool { return true } @@ -167,3 +173,6 @@ func (m *_SysexCommandSysexNonRealtime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/firmata/readwrite/model/SysexCommandSysexRealtime.go b/plc4go/protocols/firmata/readwrite/model/SysexCommandSysexRealtime.go index 485dd6682ad..0ae7faf1e1d 100644 --- a/plc4go/protocols/firmata/readwrite/model/SysexCommandSysexRealtime.go +++ b/plc4go/protocols/firmata/readwrite/model/SysexCommandSysexRealtime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SysexCommandSysexRealtime is the corresponding interface of SysexCommandSysexRealtime type SysexCommandSysexRealtime interface { @@ -46,34 +48,35 @@ type _SysexCommandSysexRealtime struct { *_SysexCommand } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SysexCommandSysexRealtime) GetCommandType() uint8 { - return 0x7F -} +func (m *_SysexCommandSysexRealtime) GetCommandType() uint8 { +return 0x7F} -func (m *_SysexCommandSysexRealtime) GetResponse() bool { - return false -} +func (m *_SysexCommandSysexRealtime) GetResponse() bool { +return false} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SysexCommandSysexRealtime) InitializeParent(parent SysexCommand) {} +func (m *_SysexCommandSysexRealtime) InitializeParent(parent SysexCommand ) {} -func (m *_SysexCommandSysexRealtime) GetParent() SysexCommand { +func (m *_SysexCommandSysexRealtime) GetParent() SysexCommand { return m._SysexCommand } + // NewSysexCommandSysexRealtime factory function for _SysexCommandSysexRealtime -func NewSysexCommandSysexRealtime() *_SysexCommandSysexRealtime { +func NewSysexCommandSysexRealtime( ) *_SysexCommandSysexRealtime { _result := &_SysexCommandSysexRealtime{ - _SysexCommand: NewSysexCommand(), + _SysexCommand: NewSysexCommand(), } _result._SysexCommand._SysexCommandChildRequirements = _result return _result @@ -81,7 +84,7 @@ func NewSysexCommandSysexRealtime() *_SysexCommandSysexRealtime { // Deprecated: use the interface for direct cast func CastSysexCommandSysexRealtime(structType interface{}) SysexCommandSysexRealtime { - if casted, ok := structType.(SysexCommandSysexRealtime); ok { + if casted, ok := structType.(SysexCommandSysexRealtime); ok { return casted } if casted, ok := structType.(*SysexCommandSysexRealtime); ok { @@ -100,6 +103,7 @@ func (m *_SysexCommandSysexRealtime) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_SysexCommandSysexRealtime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -123,7 +127,8 @@ func SysexCommandSysexRealtimeParseWithBuffer(ctx context.Context, readBuffer ut // Create a partially initialized instance _child := &_SysexCommandSysexRealtime{ - _SysexCommand: &_SysexCommand{}, + _SysexCommand: &_SysexCommand{ + }, } _child._SysexCommand._SysexCommandChildRequirements = _child return _child, nil @@ -153,6 +158,7 @@ func (m *_SysexCommandSysexRealtime) SerializeWithWriteBuffer(ctx context.Contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SysexCommandSysexRealtime) isSysexCommandSysexRealtime() bool { return true } @@ -167,3 +173,6 @@ func (m *_SysexCommandSysexRealtime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/firmata/readwrite/model/plc4x_common.go b/plc4go/protocols/firmata/readwrite/model/plc4x_common.go index d2d66e8bdd3..42166d94e68 100644 --- a/plc4go/protocols/firmata/readwrite/model/plc4x_common.go +++ b/plc4go/protocols/firmata/readwrite/model/plc4x_common.go @@ -15,7 +15,7 @@ * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - */ +*/ package model @@ -25,3 +25,4 @@ import "github.com/rs/zerolog/log" // Plc4xModelLog is the Logger used by the Parse/Serialize methods var Plc4xModelLog = &log.Logger + diff --git a/plc4go/protocols/knxnetip/readwrite/ParserHelper.go b/plc4go/protocols/knxnetip/readwrite/ParserHelper.go index bf7243c8c14..02099db6323 100644 --- a/plc4go/protocols/knxnetip/readwrite/ParserHelper.go +++ b/plc4go/protocols/knxnetip/readwrite/ParserHelper.go @@ -35,7 +35,7 @@ type KnxnetipParserHelper struct { func (m KnxnetipParserHelper) Parse(typeName string, arguments []string, io utils.ReadBuffer) (interface{}, error) { switch typeName { case "KnxProperty": - propertyType, _ := model.KnxPropertyDataTypeByName(arguments[0]) + propertyType, _ := model.KnxPropertyDataTypeByName(arguments[0]) dataLengthInBytes, err := utils.StrToUint8(arguments[1]) if err != nil { return nil, errors.Wrap(err, "Error parsing") @@ -50,7 +50,7 @@ func (m KnxnetipParserHelper) Parse(typeName string, arguments []string, io util case "ChannelInformation": return model.ChannelInformationParseWithBuffer(context.Background(), io) case "KnxDatapoint": - datapointType, _ := model.KnxDatapointTypeByName(arguments[0]) + datapointType, _ := model.KnxDatapointTypeByName(arguments[0]) return model.KnxDatapointParseWithBuffer(context.Background(), io, datapointType) case "DeviceConfigurationAckDataBlock": return model.DeviceConfigurationAckDataBlockParseWithBuffer(context.Background(), io) @@ -89,7 +89,7 @@ func (m KnxnetipParserHelper) Parse(typeName string, arguments []string, io util case "CEMIAdditionalInformation": return model.CEMIAdditionalInformationParseWithBuffer(context.Background(), io) case "ComObjectTable": - firmwareType, _ := model.FirmwareTypeByName(arguments[0]) + firmwareType, _ := model.FirmwareTypeByName(arguments[0]) return model.ComObjectTableParseWithBuffer(context.Background(), io, firmwareType) case "KnxAddress": return model.KnxAddressParseWithBuffer(context.Background(), io) diff --git a/plc4go/protocols/knxnetip/readwrite/XmlParserHelper.go b/plc4go/protocols/knxnetip/readwrite/XmlParserHelper.go index a0073dce9ef..1f3402f7c7d 100644 --- a/plc4go/protocols/knxnetip/readwrite/XmlParserHelper.go +++ b/plc4go/protocols/knxnetip/readwrite/XmlParserHelper.go @@ -21,8 +21,8 @@ package readwrite import ( "context" - "strconv" "strings" + "strconv" "github.com/apache/plc4x/plc4go/protocols/knxnetip/readwrite/model" "github.com/apache/plc4x/plc4go/spi/utils" @@ -43,114 +43,114 @@ func init() { } func (m KnxnetipXmlParserHelper) Parse(typeName string, xmlString string, parserArguments ...string) (interface{}, error) { - switch typeName { - case "KnxProperty": - propertyType, _ := model.KnxPropertyDataTypeByName(parserArguments[0]) - parsedUint1, err := strconv.ParseUint(parserArguments[1], 10, 8) - if err != nil { - return nil, err - } - dataLengthInBytes := uint8(parsedUint1) - return model.KnxPropertyParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), propertyType, dataLengthInBytes) - case "HPAIControlEndpoint": - return model.HPAIControlEndpointParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "TunnelingResponseDataBlock": - return model.TunnelingResponseDataBlockParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "DeviceDescriptorType2": - return model.DeviceDescriptorType2ParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "ChannelInformation": - return model.ChannelInformationParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "KnxDatapoint": - datapointType, _ := model.KnxDatapointTypeByName(parserArguments[0]) - return model.KnxDatapointParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), datapointType) - case "DeviceConfigurationAckDataBlock": - return model.DeviceConfigurationAckDataBlockParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "ConnectionRequestInformation": - return model.ConnectionRequestInformationParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "Apdu": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - dataLength := uint8(parsedUint0) - return model.ApduParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), dataLength) - case "HPAIDiscoveryEndpoint": - return model.HPAIDiscoveryEndpointParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "ProjectInstallationIdentifier": - return model.ProjectInstallationIdentifierParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "ServiceId": - return model.ServiceIdParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "HPAIDataEndpoint": - return model.HPAIDataEndpointParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "RelativeTimestamp": - return model.RelativeTimestampParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "CEMI": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 16) - if err != nil { - return nil, err - } - size := uint16(parsedUint0) - return model.CEMIParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), size) - case "KnxNetIpMessage": - return model.KnxNetIpMessageParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "DeviceStatus": - return model.DeviceStatusParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "IPAddress": - return model.IPAddressParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "GroupObjectDescriptorRealisationTypeB": - return model.GroupObjectDescriptorRealisationTypeBParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "CEMIAdditionalInformation": - return model.CEMIAdditionalInformationParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "ComObjectTable": - firmwareType, _ := model.FirmwareTypeByName(parserArguments[0]) - return model.ComObjectTableParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), firmwareType) - case "KnxAddress": - return model.KnxAddressParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "ConnectionResponseDataBlock": - return model.ConnectionResponseDataBlockParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "TunnelingRequestDataBlock": - return model.TunnelingRequestDataBlockParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "DIBDeviceInfo": - return model.DIBDeviceInfoParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "DeviceConfigurationRequestDataBlock": - return model.DeviceConfigurationRequestDataBlockParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "DIBSuppSvcFamilies": - return model.DIBSuppSvcFamiliesParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "LDataFrame": - return model.LDataFrameParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "ApduDataExt": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - length := uint8(parsedUint0) - return model.ApduDataExtParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), length) - case "ApduControl": - return model.ApduControlParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "KnxGroupAddress": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 2) - if err != nil { - return nil, err - } - numLevels := uint8(parsedUint0) - return model.KnxGroupAddressParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), numLevels) - case "GroupObjectDescriptorRealisationType6": - return model.GroupObjectDescriptorRealisationType6ParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "GroupObjectDescriptorRealisationType7": - return model.GroupObjectDescriptorRealisationType7ParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "MACAddress": - return model.MACAddressParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "GroupObjectDescriptorRealisationType2": - return model.GroupObjectDescriptorRealisationType2ParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "ApduData": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - dataLength := uint8(parsedUint0) - return model.ApduDataParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), dataLength) - case "GroupObjectDescriptorRealisationType1": - return model.GroupObjectDescriptorRealisationType1ParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - } - return nil, errors.Errorf("Unsupported type %s", typeName) + switch typeName { + case "KnxProperty": + propertyType, _ := model.KnxPropertyDataTypeByName(parserArguments[0]) + parsedUint1, err := strconv.ParseUint(parserArguments[1], 10, 8) + if err!=nil { + return nil, err + } + dataLengthInBytes := uint8(parsedUint1) + return model.KnxPropertyParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), propertyType, dataLengthInBytes ) + case "HPAIControlEndpoint": + return model.HPAIControlEndpointParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "TunnelingResponseDataBlock": + return model.TunnelingResponseDataBlockParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "DeviceDescriptorType2": + return model.DeviceDescriptorType2ParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "ChannelInformation": + return model.ChannelInformationParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "KnxDatapoint": + datapointType, _ := model.KnxDatapointTypeByName(parserArguments[0]) + return model.KnxDatapointParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), datapointType ) + case "DeviceConfigurationAckDataBlock": + return model.DeviceConfigurationAckDataBlockParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "ConnectionRequestInformation": + return model.ConnectionRequestInformationParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "Apdu": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + dataLength := uint8(parsedUint0) + return model.ApduParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), dataLength ) + case "HPAIDiscoveryEndpoint": + return model.HPAIDiscoveryEndpointParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "ProjectInstallationIdentifier": + return model.ProjectInstallationIdentifierParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "ServiceId": + return model.ServiceIdParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "HPAIDataEndpoint": + return model.HPAIDataEndpointParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "RelativeTimestamp": + return model.RelativeTimestampParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "CEMI": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 16) + if err!=nil { + return nil, err + } + size := uint16(parsedUint0) + return model.CEMIParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), size ) + case "KnxNetIpMessage": + return model.KnxNetIpMessageParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "DeviceStatus": + return model.DeviceStatusParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "IPAddress": + return model.IPAddressParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "GroupObjectDescriptorRealisationTypeB": + return model.GroupObjectDescriptorRealisationTypeBParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "CEMIAdditionalInformation": + return model.CEMIAdditionalInformationParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "ComObjectTable": + firmwareType, _ := model.FirmwareTypeByName(parserArguments[0]) + return model.ComObjectTableParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), firmwareType ) + case "KnxAddress": + return model.KnxAddressParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "ConnectionResponseDataBlock": + return model.ConnectionResponseDataBlockParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "TunnelingRequestDataBlock": + return model.TunnelingRequestDataBlockParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "DIBDeviceInfo": + return model.DIBDeviceInfoParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "DeviceConfigurationRequestDataBlock": + return model.DeviceConfigurationRequestDataBlockParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "DIBSuppSvcFamilies": + return model.DIBSuppSvcFamiliesParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "LDataFrame": + return model.LDataFrameParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "ApduDataExt": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + length := uint8(parsedUint0) + return model.ApduDataExtParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), length ) + case "ApduControl": + return model.ApduControlParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "KnxGroupAddress": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 2) + if err!=nil { + return nil, err + } + numLevels := uint8(parsedUint0) + return model.KnxGroupAddressParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), numLevels ) + case "GroupObjectDescriptorRealisationType6": + return model.GroupObjectDescriptorRealisationType6ParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "GroupObjectDescriptorRealisationType7": + return model.GroupObjectDescriptorRealisationType7ParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "MACAddress": + return model.MACAddressParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "GroupObjectDescriptorRealisationType2": + return model.GroupObjectDescriptorRealisationType2ParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "ApduData": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + dataLength := uint8(parsedUint0) + return model.ApduDataParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), dataLength ) + case "GroupObjectDescriptorRealisationType1": + return model.GroupObjectDescriptorRealisationType1ParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + } + return nil, errors.Errorf("Unsupported type %s", typeName) } diff --git a/plc4go/protocols/knxnetip/readwrite/model/AccessLevel.go b/plc4go/protocols/knxnetip/readwrite/model/AccessLevel.go index 5539ed953b0..f3c1e06fc70 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/AccessLevel.go +++ b/plc4go/protocols/knxnetip/readwrite/model/AccessLevel.go @@ -36,11 +36,11 @@ type IAccessLevel interface { NeedsAuthentication() bool } -const ( - AccessLevel_Level0 AccessLevel = 0x0 - AccessLevel_Level1 AccessLevel = 0x1 - AccessLevel_Level2 AccessLevel = 0x2 - AccessLevel_Level3 AccessLevel = 0x3 +const( + AccessLevel_Level0 AccessLevel = 0x0 + AccessLevel_Level1 AccessLevel = 0x1 + AccessLevel_Level2 AccessLevel = 0x2 + AccessLevel_Level3 AccessLevel = 0x3 AccessLevel_Level15 AccessLevel = 0xF ) @@ -48,7 +48,7 @@ var AccessLevelValues []AccessLevel func init() { _ = errors.New - AccessLevelValues = []AccessLevel{ + AccessLevelValues = []AccessLevel { AccessLevel_Level0, AccessLevel_Level1, AccessLevel_Level2, @@ -57,30 +57,25 @@ func init() { } } + func (e AccessLevel) Purpose() string { - switch e { - case 0x0: - { /* '0x0' */ - return "system manufacturer" + switch e { + case 0x0: { /* '0x0' */ + return "system manufacturer" } - case 0x1: - { /* '0x1' */ - return "product manufacturer" + case 0x1: { /* '0x1' */ + return "product manufacturer" } - case 0x2: - { /* '0x2' */ - return "configuration" + case 0x2: { /* '0x2' */ + return "configuration" } - case 0x3: - { /* '0x3' */ - return "end-user" + case 0x3: { /* '0x3' */ + return "end-user" } - case 0xF: - { /* '0xF' */ - return "read access" + case 0xF: { /* '0xF' */ + return "read access" } - default: - { + default: { return "" } } @@ -96,29 +91,23 @@ func AccessLevelFirstEnumForFieldPurpose(value string) (AccessLevel, error) { } func (e AccessLevel) NeedsAuthentication() bool { - switch e { - case 0x0: - { /* '0x0' */ - return true + switch e { + case 0x0: { /* '0x0' */ + return true } - case 0x1: - { /* '0x1' */ - return true + case 0x1: { /* '0x1' */ + return true } - case 0x2: - { /* '0x2' */ - return true + case 0x2: { /* '0x2' */ + return true } - case 0x3: - { /* '0x3' */ - return false + case 0x3: { /* '0x3' */ + return false } - case 0xF: - { /* '0xF' */ - return false + case 0xF: { /* '0xF' */ + return false } - default: - { + default: { return false } } @@ -134,16 +123,16 @@ func AccessLevelFirstEnumForFieldNeedsAuthentication(value bool) (AccessLevel, e } func AccessLevelByValue(value uint8) (enum AccessLevel, ok bool) { switch value { - case 0x0: - return AccessLevel_Level0, true - case 0x1: - return AccessLevel_Level1, true - case 0x2: - return AccessLevel_Level2, true - case 0x3: - return AccessLevel_Level3, true - case 0xF: - return AccessLevel_Level15, true + case 0x0: + return AccessLevel_Level0, true + case 0x1: + return AccessLevel_Level1, true + case 0x2: + return AccessLevel_Level2, true + case 0x3: + return AccessLevel_Level3, true + case 0xF: + return AccessLevel_Level15, true } return 0, false } @@ -164,13 +153,13 @@ func AccessLevelByName(value string) (enum AccessLevel, ok bool) { return 0, false } -func AccessLevelKnows(value uint8) bool { +func AccessLevelKnows(value uint8) bool { for _, typeValue := range AccessLevelValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastAccessLevel(structType interface{}) AccessLevel { @@ -240,3 +229,4 @@ func (e AccessLevel) PLC4XEnumName() string { func (e AccessLevel) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/knxnetip/readwrite/model/Apdu.go b/plc4go/protocols/knxnetip/readwrite/model/Apdu.go index 99797480b26..560ac20d639 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/Apdu.go +++ b/plc4go/protocols/knxnetip/readwrite/model/Apdu.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Apdu is the corresponding interface of Apdu type Apdu interface { @@ -49,8 +51,8 @@ type ApduExactly interface { // _Apdu is the data-structure of this message type _Apdu struct { _ApduChildRequirements - Numbered bool - Counter uint8 + Numbered bool + Counter uint8 // Arguments. DataLength uint8 @@ -62,6 +64,7 @@ type _ApduChildRequirements interface { GetControl() uint8 } + type ApduParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child Apdu, serializeChildFunction func() error) error GetTypeName() string @@ -69,13 +72,12 @@ type ApduParent interface { type ApduChild interface { utils.Serializable - InitializeParent(parent Apdu, numbered bool, counter uint8) +InitializeParent(parent Apdu , numbered bool , counter uint8 ) GetParent() *Apdu GetTypeName() string Apdu } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -94,14 +96,15 @@ func (m *_Apdu) GetCounter() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewApdu factory function for _Apdu -func NewApdu(numbered bool, counter uint8, dataLength uint8) *_Apdu { - return &_Apdu{Numbered: numbered, Counter: counter, DataLength: dataLength} +func NewApdu( numbered bool , counter uint8 , dataLength uint8 ) *_Apdu { +return &_Apdu{ Numbered: numbered , Counter: counter , DataLength: dataLength } } // Deprecated: use the interface for direct cast func CastApdu(structType interface{}) Apdu { - if casted, ok := structType.(Apdu); ok { + if casted, ok := structType.(Apdu); ok { return casted } if casted, ok := structType.(*Apdu); ok { @@ -114,16 +117,17 @@ func (m *_Apdu) GetTypeName() string { return "Apdu" } + func (m *_Apdu) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Discriminator Field (control) - lengthInBits += 1 + lengthInBits += 1; // Simple field (numbered) - lengthInBits += 1 + lengthInBits += 1; // Simple field (counter) - lengthInBits += 4 + lengthInBits += 4; return lengthInBits } @@ -152,14 +156,14 @@ func ApduParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, dataL } // Simple Field (numbered) - _numbered, _numberedErr := readBuffer.ReadBit("numbered") +_numbered, _numberedErr := readBuffer.ReadBit("numbered") if _numberedErr != nil { return nil, errors.Wrap(_numberedErr, "Error parsing 'numbered' field of Apdu") } numbered := _numbered // Simple Field (counter) - _counter, _counterErr := readBuffer.ReadUint8("counter", 4) +_counter, _counterErr := readBuffer.ReadUint8("counter", 4) if _counterErr != nil { return nil, errors.Wrap(_counterErr, "Error parsing 'counter' field of Apdu") } @@ -168,16 +172,16 @@ func ApduParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, dataL // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type ApduChildSerializeRequirement interface { Apdu - InitializeParent(Apdu, bool, uint8) + InitializeParent(Apdu, bool, uint8) GetParent() Apdu } var _childTemp interface{} var _child ApduChildSerializeRequirement var typeSwitchError error switch { - case control == uint8(1): // ApduControlContainer +case control == uint8(1) : // ApduControlContainer _childTemp, typeSwitchError = ApduControlContainerParseWithBuffer(ctx, readBuffer, dataLength) - case control == uint8(0): // ApduDataContainer +case control == uint8(0) : // ApduDataContainer _childTemp, typeSwitchError = ApduDataContainerParseWithBuffer(ctx, readBuffer, dataLength) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [control=%v]", control) @@ -192,7 +196,7 @@ func ApduParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, dataL } // Finish initializing - _child.InitializeParent(_child, numbered, counter) +_child.InitializeParent(_child , numbered , counter ) return _child, nil } @@ -202,7 +206,7 @@ func (pm *_Apdu) SerializeParent(ctx context.Context, writeBuffer utils.WriteBuf _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("Apdu"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("Apdu"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for Apdu") } @@ -239,13 +243,13 @@ func (pm *_Apdu) SerializeParent(ctx context.Context, writeBuffer utils.WriteBuf return nil } + //// // Arguments Getter func (m *_Apdu) GetDataLength() uint8 { return m.DataLength } - // //// @@ -263,3 +267,6 @@ func (m *_Apdu) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduControl.go b/plc4go/protocols/knxnetip/readwrite/model/ApduControl.go index 92ce6bae59d..1fd4ce04f07 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduControl.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduControl.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduControl is the corresponding interface of ApduControl type ApduControl interface { @@ -53,6 +55,7 @@ type _ApduControlChildRequirements interface { GetControlType() uint8 } + type ApduControlParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child ApduControl, serializeChildFunction func() error) error GetTypeName() string @@ -60,21 +63,22 @@ type ApduControlParent interface { type ApduControlChild interface { utils.Serializable - InitializeParent(parent ApduControl) +InitializeParent(parent ApduControl ) GetParent() *ApduControl GetTypeName() string ApduControl } + // NewApduControl factory function for _ApduControl -func NewApduControl() *_ApduControl { - return &_ApduControl{} +func NewApduControl( ) *_ApduControl { +return &_ApduControl{ } } // Deprecated: use the interface for direct cast func CastApduControl(structType interface{}) ApduControl { - if casted, ok := structType.(ApduControl); ok { + if casted, ok := structType.(ApduControl); ok { return casted } if casted, ok := structType.(*ApduControl); ok { @@ -87,10 +91,11 @@ func (m *_ApduControl) GetTypeName() string { return "ApduControl" } + func (m *_ApduControl) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Discriminator Field (controlType) - lengthInBits += 2 + lengthInBits += 2; return lengthInBits } @@ -121,21 +126,21 @@ func ApduControlParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type ApduControlChildSerializeRequirement interface { ApduControl - InitializeParent(ApduControl) + InitializeParent(ApduControl ) GetParent() ApduControl } var _childTemp interface{} var _child ApduControlChildSerializeRequirement var typeSwitchError error switch { - case controlType == 0x0: // ApduControlConnect - _childTemp, typeSwitchError = ApduControlConnectParseWithBuffer(ctx, readBuffer) - case controlType == 0x1: // ApduControlDisconnect - _childTemp, typeSwitchError = ApduControlDisconnectParseWithBuffer(ctx, readBuffer) - case controlType == 0x2: // ApduControlAck - _childTemp, typeSwitchError = ApduControlAckParseWithBuffer(ctx, readBuffer) - case controlType == 0x3: // ApduControlNack - _childTemp, typeSwitchError = ApduControlNackParseWithBuffer(ctx, readBuffer) +case controlType == 0x0 : // ApduControlConnect + _childTemp, typeSwitchError = ApduControlConnectParseWithBuffer(ctx, readBuffer, ) +case controlType == 0x1 : // ApduControlDisconnect + _childTemp, typeSwitchError = ApduControlDisconnectParseWithBuffer(ctx, readBuffer, ) +case controlType == 0x2 : // ApduControlAck + _childTemp, typeSwitchError = ApduControlAckParseWithBuffer(ctx, readBuffer, ) +case controlType == 0x3 : // ApduControlNack + _childTemp, typeSwitchError = ApduControlNackParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [controlType=%v]", controlType) } @@ -149,7 +154,7 @@ func ApduControlParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer } // Finish initializing - _child.InitializeParent(_child) +_child.InitializeParent(_child ) return _child, nil } @@ -159,7 +164,7 @@ func (pm *_ApduControl) SerializeParent(ctx context.Context, writeBuffer utils.W _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("ApduControl"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("ApduControl"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for ApduControl") } @@ -182,6 +187,7 @@ func (pm *_ApduControl) SerializeParent(ctx context.Context, writeBuffer utils.W return nil } + func (m *_ApduControl) isApduControl() bool { return true } @@ -196,3 +202,6 @@ func (m *_ApduControl) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduControlAck.go b/plc4go/protocols/knxnetip/readwrite/model/ApduControlAck.go index ed37bafa885..eefa866f71c 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduControlAck.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduControlAck.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduControlAck is the corresponding interface of ApduControlAck type ApduControlAck interface { @@ -46,30 +48,32 @@ type _ApduControlAck struct { *_ApduControl } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduControlAck) GetControlType() uint8 { - return 0x2 -} +func (m *_ApduControlAck) GetControlType() uint8 { +return 0x2} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduControlAck) InitializeParent(parent ApduControl) {} +func (m *_ApduControlAck) InitializeParent(parent ApduControl ) {} -func (m *_ApduControlAck) GetParent() ApduControl { +func (m *_ApduControlAck) GetParent() ApduControl { return m._ApduControl } + // NewApduControlAck factory function for _ApduControlAck -func NewApduControlAck() *_ApduControlAck { +func NewApduControlAck( ) *_ApduControlAck { _result := &_ApduControlAck{ - _ApduControl: NewApduControl(), + _ApduControl: NewApduControl(), } _result._ApduControl._ApduControlChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduControlAck() *_ApduControlAck { // Deprecated: use the interface for direct cast func CastApduControlAck(structType interface{}) ApduControlAck { - if casted, ok := structType.(ApduControlAck); ok { + if casted, ok := structType.(ApduControlAck); ok { return casted } if casted, ok := structType.(*ApduControlAck); ok { @@ -96,6 +100,7 @@ func (m *_ApduControlAck) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_ApduControlAck) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -119,7 +124,8 @@ func ApduControlAckParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf // Create a partially initialized instance _child := &_ApduControlAck{ - _ApduControl: &_ApduControl{}, + _ApduControl: &_ApduControl{ + }, } _child._ApduControl._ApduControlChildRequirements = _child return _child, nil @@ -149,6 +155,7 @@ func (m *_ApduControlAck) SerializeWithWriteBuffer(ctx context.Context, writeBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduControlAck) isApduControlAck() bool { return true } @@ -163,3 +170,6 @@ func (m *_ApduControlAck) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduControlConnect.go b/plc4go/protocols/knxnetip/readwrite/model/ApduControlConnect.go index ee123a4ff45..a1f856c9928 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduControlConnect.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduControlConnect.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduControlConnect is the corresponding interface of ApduControlConnect type ApduControlConnect interface { @@ -46,30 +48,32 @@ type _ApduControlConnect struct { *_ApduControl } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduControlConnect) GetControlType() uint8 { - return 0x0 -} +func (m *_ApduControlConnect) GetControlType() uint8 { +return 0x0} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduControlConnect) InitializeParent(parent ApduControl) {} +func (m *_ApduControlConnect) InitializeParent(parent ApduControl ) {} -func (m *_ApduControlConnect) GetParent() ApduControl { +func (m *_ApduControlConnect) GetParent() ApduControl { return m._ApduControl } + // NewApduControlConnect factory function for _ApduControlConnect -func NewApduControlConnect() *_ApduControlConnect { +func NewApduControlConnect( ) *_ApduControlConnect { _result := &_ApduControlConnect{ - _ApduControl: NewApduControl(), + _ApduControl: NewApduControl(), } _result._ApduControl._ApduControlChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduControlConnect() *_ApduControlConnect { // Deprecated: use the interface for direct cast func CastApduControlConnect(structType interface{}) ApduControlConnect { - if casted, ok := structType.(ApduControlConnect); ok { + if casted, ok := structType.(ApduControlConnect); ok { return casted } if casted, ok := structType.(*ApduControlConnect); ok { @@ -96,6 +100,7 @@ func (m *_ApduControlConnect) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_ApduControlConnect) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -119,7 +124,8 @@ func ApduControlConnectParseWithBuffer(ctx context.Context, readBuffer utils.Rea // Create a partially initialized instance _child := &_ApduControlConnect{ - _ApduControl: &_ApduControl{}, + _ApduControl: &_ApduControl{ + }, } _child._ApduControl._ApduControlChildRequirements = _child return _child, nil @@ -149,6 +155,7 @@ func (m *_ApduControlConnect) SerializeWithWriteBuffer(ctx context.Context, writ return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduControlConnect) isApduControlConnect() bool { return true } @@ -163,3 +170,6 @@ func (m *_ApduControlConnect) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduControlContainer.go b/plc4go/protocols/knxnetip/readwrite/model/ApduControlContainer.go index 68128e93c43..9db5663547e 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduControlContainer.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduControlContainer.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduControlContainer is the corresponding interface of ApduControlContainer type ApduControlContainer interface { @@ -46,32 +48,31 @@ type ApduControlContainerExactly interface { // _ApduControlContainer is the data-structure of this message type _ApduControlContainer struct { *_Apdu - ControlApdu ApduControl + ControlApdu ApduControl } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduControlContainer) GetControl() uint8 { - return uint8(1) -} +func (m *_ApduControlContainer) GetControl() uint8 { +return uint8(1)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduControlContainer) InitializeParent(parent Apdu, numbered bool, counter uint8) { - m.Numbered = numbered +func (m *_ApduControlContainer) InitializeParent(parent Apdu , numbered bool , counter uint8 ) { m.Numbered = numbered m.Counter = counter } -func (m *_ApduControlContainer) GetParent() Apdu { +func (m *_ApduControlContainer) GetParent() Apdu { return m._Apdu } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -86,11 +87,12 @@ func (m *_ApduControlContainer) GetControlApdu() ApduControl { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewApduControlContainer factory function for _ApduControlContainer -func NewApduControlContainer(controlApdu ApduControl, numbered bool, counter uint8, dataLength uint8) *_ApduControlContainer { +func NewApduControlContainer( controlApdu ApduControl , numbered bool , counter uint8 , dataLength uint8 ) *_ApduControlContainer { _result := &_ApduControlContainer{ ControlApdu: controlApdu, - _Apdu: NewApdu(numbered, counter, dataLength), + _Apdu: NewApdu(numbered, counter, dataLength), } _result._Apdu._ApduChildRequirements = _result return _result @@ -98,7 +100,7 @@ func NewApduControlContainer(controlApdu ApduControl, numbered bool, counter uin // Deprecated: use the interface for direct cast func CastApduControlContainer(structType interface{}) ApduControlContainer { - if casted, ok := structType.(ApduControlContainer); ok { + if casted, ok := structType.(ApduControlContainer); ok { return casted } if casted, ok := structType.(*ApduControlContainer); ok { @@ -120,6 +122,7 @@ func (m *_ApduControlContainer) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_ApduControlContainer) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -141,7 +144,7 @@ func ApduControlContainerParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("controlApdu"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for controlApdu") } - _controlApdu, _controlApduErr := ApduControlParseWithBuffer(ctx, readBuffer) +_controlApdu, _controlApduErr := ApduControlParseWithBuffer(ctx, readBuffer) if _controlApduErr != nil { return nil, errors.Wrap(_controlApduErr, "Error parsing 'controlApdu' field of ApduControlContainer") } @@ -181,17 +184,17 @@ func (m *_ApduControlContainer) SerializeWithWriteBuffer(ctx context.Context, wr return errors.Wrap(pushErr, "Error pushing for ApduControlContainer") } - // Simple Field (controlApdu) - if pushErr := writeBuffer.PushContext("controlApdu"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for controlApdu") - } - _controlApduErr := writeBuffer.WriteSerializable(ctx, m.GetControlApdu()) - if popErr := writeBuffer.PopContext("controlApdu"); popErr != nil { - return errors.Wrap(popErr, "Error popping for controlApdu") - } - if _controlApduErr != nil { - return errors.Wrap(_controlApduErr, "Error serializing 'controlApdu' field") - } + // Simple Field (controlApdu) + if pushErr := writeBuffer.PushContext("controlApdu"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for controlApdu") + } + _controlApduErr := writeBuffer.WriteSerializable(ctx, m.GetControlApdu()) + if popErr := writeBuffer.PopContext("controlApdu"); popErr != nil { + return errors.Wrap(popErr, "Error popping for controlApdu") + } + if _controlApduErr != nil { + return errors.Wrap(_controlApduErr, "Error serializing 'controlApdu' field") + } if popErr := writeBuffer.PopContext("ApduControlContainer"); popErr != nil { return errors.Wrap(popErr, "Error popping for ApduControlContainer") @@ -201,6 +204,7 @@ func (m *_ApduControlContainer) SerializeWithWriteBuffer(ctx context.Context, wr return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduControlContainer) isApduControlContainer() bool { return true } @@ -215,3 +219,6 @@ func (m *_ApduControlContainer) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduControlDisconnect.go b/plc4go/protocols/knxnetip/readwrite/model/ApduControlDisconnect.go index 21bbb87a6f1..b27ea9dc1cd 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduControlDisconnect.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduControlDisconnect.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduControlDisconnect is the corresponding interface of ApduControlDisconnect type ApduControlDisconnect interface { @@ -46,30 +48,32 @@ type _ApduControlDisconnect struct { *_ApduControl } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduControlDisconnect) GetControlType() uint8 { - return 0x1 -} +func (m *_ApduControlDisconnect) GetControlType() uint8 { +return 0x1} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduControlDisconnect) InitializeParent(parent ApduControl) {} +func (m *_ApduControlDisconnect) InitializeParent(parent ApduControl ) {} -func (m *_ApduControlDisconnect) GetParent() ApduControl { +func (m *_ApduControlDisconnect) GetParent() ApduControl { return m._ApduControl } + // NewApduControlDisconnect factory function for _ApduControlDisconnect -func NewApduControlDisconnect() *_ApduControlDisconnect { +func NewApduControlDisconnect( ) *_ApduControlDisconnect { _result := &_ApduControlDisconnect{ - _ApduControl: NewApduControl(), + _ApduControl: NewApduControl(), } _result._ApduControl._ApduControlChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduControlDisconnect() *_ApduControlDisconnect { // Deprecated: use the interface for direct cast func CastApduControlDisconnect(structType interface{}) ApduControlDisconnect { - if casted, ok := structType.(ApduControlDisconnect); ok { + if casted, ok := structType.(ApduControlDisconnect); ok { return casted } if casted, ok := structType.(*ApduControlDisconnect); ok { @@ -96,6 +100,7 @@ func (m *_ApduControlDisconnect) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_ApduControlDisconnect) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -119,7 +124,8 @@ func ApduControlDisconnectParseWithBuffer(ctx context.Context, readBuffer utils. // Create a partially initialized instance _child := &_ApduControlDisconnect{ - _ApduControl: &_ApduControl{}, + _ApduControl: &_ApduControl{ + }, } _child._ApduControl._ApduControlChildRequirements = _child return _child, nil @@ -149,6 +155,7 @@ func (m *_ApduControlDisconnect) SerializeWithWriteBuffer(ctx context.Context, w return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduControlDisconnect) isApduControlDisconnect() bool { return true } @@ -163,3 +170,6 @@ func (m *_ApduControlDisconnect) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduControlNack.go b/plc4go/protocols/knxnetip/readwrite/model/ApduControlNack.go index 66da371bdcd..2e7dfa0c40e 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduControlNack.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduControlNack.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduControlNack is the corresponding interface of ApduControlNack type ApduControlNack interface { @@ -46,30 +48,32 @@ type _ApduControlNack struct { *_ApduControl } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduControlNack) GetControlType() uint8 { - return 0x3 -} +func (m *_ApduControlNack) GetControlType() uint8 { +return 0x3} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduControlNack) InitializeParent(parent ApduControl) {} +func (m *_ApduControlNack) InitializeParent(parent ApduControl ) {} -func (m *_ApduControlNack) GetParent() ApduControl { +func (m *_ApduControlNack) GetParent() ApduControl { return m._ApduControl } + // NewApduControlNack factory function for _ApduControlNack -func NewApduControlNack() *_ApduControlNack { +func NewApduControlNack( ) *_ApduControlNack { _result := &_ApduControlNack{ - _ApduControl: NewApduControl(), + _ApduControl: NewApduControl(), } _result._ApduControl._ApduControlChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduControlNack() *_ApduControlNack { // Deprecated: use the interface for direct cast func CastApduControlNack(structType interface{}) ApduControlNack { - if casted, ok := structType.(ApduControlNack); ok { + if casted, ok := structType.(ApduControlNack); ok { return casted } if casted, ok := structType.(*ApduControlNack); ok { @@ -96,6 +100,7 @@ func (m *_ApduControlNack) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_ApduControlNack) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -119,7 +124,8 @@ func ApduControlNackParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu // Create a partially initialized instance _child := &_ApduControlNack{ - _ApduControl: &_ApduControl{}, + _ApduControl: &_ApduControl{ + }, } _child._ApduControl._ApduControlChildRequirements = _child return _child, nil @@ -149,6 +155,7 @@ func (m *_ApduControlNack) SerializeWithWriteBuffer(ctx context.Context, writeBu return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduControlNack) isApduControlNack() bool { return true } @@ -163,3 +170,6 @@ func (m *_ApduControlNack) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduData.go b/plc4go/protocols/knxnetip/readwrite/model/ApduData.go index d6bc01cee0f..8af8fe8428f 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduData.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduData.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduData is the corresponding interface of ApduData type ApduData interface { @@ -56,6 +58,7 @@ type _ApduDataChildRequirements interface { GetApciType() uint8 } + type ApduDataParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child ApduData, serializeChildFunction func() error) error GetTypeName() string @@ -63,21 +66,22 @@ type ApduDataParent interface { type ApduDataChild interface { utils.Serializable - InitializeParent(parent ApduData) +InitializeParent(parent ApduData ) GetParent() *ApduData GetTypeName() string ApduData } + // NewApduData factory function for _ApduData -func NewApduData(dataLength uint8) *_ApduData { - return &_ApduData{DataLength: dataLength} +func NewApduData( dataLength uint8 ) *_ApduData { +return &_ApduData{ DataLength: dataLength } } // Deprecated: use the interface for direct cast func CastApduData(structType interface{}) ApduData { - if casted, ok := structType.(ApduData); ok { + if casted, ok := structType.(ApduData); ok { return casted } if casted, ok := structType.(*ApduData); ok { @@ -90,10 +94,11 @@ func (m *_ApduData) GetTypeName() string { return "ApduData" } + func (m *_ApduData) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Discriminator Field (apciType) - lengthInBits += 4 + lengthInBits += 4; return lengthInBits } @@ -124,44 +129,44 @@ func ApduDataParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, d // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type ApduDataChildSerializeRequirement interface { ApduData - InitializeParent(ApduData) + InitializeParent(ApduData ) GetParent() ApduData } var _childTemp interface{} var _child ApduDataChildSerializeRequirement var typeSwitchError error switch { - case apciType == 0x0: // ApduDataGroupValueRead +case apciType == 0x0 : // ApduDataGroupValueRead _childTemp, typeSwitchError = ApduDataGroupValueReadParseWithBuffer(ctx, readBuffer, dataLength) - case apciType == 0x1: // ApduDataGroupValueResponse +case apciType == 0x1 : // ApduDataGroupValueResponse _childTemp, typeSwitchError = ApduDataGroupValueResponseParseWithBuffer(ctx, readBuffer, dataLength) - case apciType == 0x2: // ApduDataGroupValueWrite +case apciType == 0x2 : // ApduDataGroupValueWrite _childTemp, typeSwitchError = ApduDataGroupValueWriteParseWithBuffer(ctx, readBuffer, dataLength) - case apciType == 0x3: // ApduDataIndividualAddressWrite +case apciType == 0x3 : // ApduDataIndividualAddressWrite _childTemp, typeSwitchError = ApduDataIndividualAddressWriteParseWithBuffer(ctx, readBuffer, dataLength) - case apciType == 0x4: // ApduDataIndividualAddressRead +case apciType == 0x4 : // ApduDataIndividualAddressRead _childTemp, typeSwitchError = ApduDataIndividualAddressReadParseWithBuffer(ctx, readBuffer, dataLength) - case apciType == 0x5: // ApduDataIndividualAddressResponse +case apciType == 0x5 : // ApduDataIndividualAddressResponse _childTemp, typeSwitchError = ApduDataIndividualAddressResponseParseWithBuffer(ctx, readBuffer, dataLength) - case apciType == 0x6: // ApduDataAdcRead +case apciType == 0x6 : // ApduDataAdcRead _childTemp, typeSwitchError = ApduDataAdcReadParseWithBuffer(ctx, readBuffer, dataLength) - case apciType == 0x7: // ApduDataAdcResponse +case apciType == 0x7 : // ApduDataAdcResponse _childTemp, typeSwitchError = ApduDataAdcResponseParseWithBuffer(ctx, readBuffer, dataLength) - case apciType == 0x8: // ApduDataMemoryRead +case apciType == 0x8 : // ApduDataMemoryRead _childTemp, typeSwitchError = ApduDataMemoryReadParseWithBuffer(ctx, readBuffer, dataLength) - case apciType == 0x9: // ApduDataMemoryResponse +case apciType == 0x9 : // ApduDataMemoryResponse _childTemp, typeSwitchError = ApduDataMemoryResponseParseWithBuffer(ctx, readBuffer, dataLength) - case apciType == 0xA: // ApduDataMemoryWrite +case apciType == 0xA : // ApduDataMemoryWrite _childTemp, typeSwitchError = ApduDataMemoryWriteParseWithBuffer(ctx, readBuffer, dataLength) - case apciType == 0xB: // ApduDataUserMessage +case apciType == 0xB : // ApduDataUserMessage _childTemp, typeSwitchError = ApduDataUserMessageParseWithBuffer(ctx, readBuffer, dataLength) - case apciType == 0xC: // ApduDataDeviceDescriptorRead +case apciType == 0xC : // ApduDataDeviceDescriptorRead _childTemp, typeSwitchError = ApduDataDeviceDescriptorReadParseWithBuffer(ctx, readBuffer, dataLength) - case apciType == 0xD: // ApduDataDeviceDescriptorResponse +case apciType == 0xD : // ApduDataDeviceDescriptorResponse _childTemp, typeSwitchError = ApduDataDeviceDescriptorResponseParseWithBuffer(ctx, readBuffer, dataLength) - case apciType == 0xE: // ApduDataRestart +case apciType == 0xE : // ApduDataRestart _childTemp, typeSwitchError = ApduDataRestartParseWithBuffer(ctx, readBuffer, dataLength) - case apciType == 0xF: // ApduDataOther +case apciType == 0xF : // ApduDataOther _childTemp, typeSwitchError = ApduDataOtherParseWithBuffer(ctx, readBuffer, dataLength) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [apciType=%v]", apciType) @@ -176,7 +181,7 @@ func ApduDataParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, d } // Finish initializing - _child.InitializeParent(_child) +_child.InitializeParent(_child ) return _child, nil } @@ -186,7 +191,7 @@ func (pm *_ApduData) SerializeParent(ctx context.Context, writeBuffer utils.Writ _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("ApduData"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("ApduData"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for ApduData") } @@ -209,13 +214,13 @@ func (pm *_ApduData) SerializeParent(ctx context.Context, writeBuffer utils.Writ return nil } + //// // Arguments Getter func (m *_ApduData) GetDataLength() uint8 { return m.DataLength } - // //// @@ -233,3 +238,6 @@ func (m *_ApduData) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataAdcRead.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataAdcRead.go index 69240308218..feccbf8f841 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataAdcRead.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataAdcRead.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataAdcRead is the corresponding interface of ApduDataAdcRead type ApduDataAdcRead interface { @@ -46,30 +48,32 @@ type _ApduDataAdcRead struct { *_ApduData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataAdcRead) GetApciType() uint8 { - return 0x6 -} +func (m *_ApduDataAdcRead) GetApciType() uint8 { +return 0x6} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataAdcRead) InitializeParent(parent ApduData) {} +func (m *_ApduDataAdcRead) InitializeParent(parent ApduData ) {} -func (m *_ApduDataAdcRead) GetParent() ApduData { +func (m *_ApduDataAdcRead) GetParent() ApduData { return m._ApduData } + // NewApduDataAdcRead factory function for _ApduDataAdcRead -func NewApduDataAdcRead(dataLength uint8) *_ApduDataAdcRead { +func NewApduDataAdcRead( dataLength uint8 ) *_ApduDataAdcRead { _result := &_ApduDataAdcRead{ - _ApduData: NewApduData(dataLength), + _ApduData: NewApduData(dataLength), } _result._ApduData._ApduDataChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataAdcRead(dataLength uint8) *_ApduDataAdcRead { // Deprecated: use the interface for direct cast func CastApduDataAdcRead(structType interface{}) ApduDataAdcRead { - if casted, ok := structType.(ApduDataAdcRead); ok { + if casted, ok := structType.(ApduDataAdcRead); ok { return casted } if casted, ok := structType.(*ApduDataAdcRead); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataAdcRead) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_ApduDataAdcRead) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataAdcRead) SerializeWithWriteBuffer(ctx context.Context, writeBu return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataAdcRead) isApduDataAdcRead() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataAdcRead) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataAdcResponse.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataAdcResponse.go index d73df88ee02..9e47277f893 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataAdcResponse.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataAdcResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataAdcResponse is the corresponding interface of ApduDataAdcResponse type ApduDataAdcResponse interface { @@ -46,30 +48,32 @@ type _ApduDataAdcResponse struct { *_ApduData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataAdcResponse) GetApciType() uint8 { - return 0x7 -} +func (m *_ApduDataAdcResponse) GetApciType() uint8 { +return 0x7} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataAdcResponse) InitializeParent(parent ApduData) {} +func (m *_ApduDataAdcResponse) InitializeParent(parent ApduData ) {} -func (m *_ApduDataAdcResponse) GetParent() ApduData { +func (m *_ApduDataAdcResponse) GetParent() ApduData { return m._ApduData } + // NewApduDataAdcResponse factory function for _ApduDataAdcResponse -func NewApduDataAdcResponse(dataLength uint8) *_ApduDataAdcResponse { +func NewApduDataAdcResponse( dataLength uint8 ) *_ApduDataAdcResponse { _result := &_ApduDataAdcResponse{ - _ApduData: NewApduData(dataLength), + _ApduData: NewApduData(dataLength), } _result._ApduData._ApduDataChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataAdcResponse(dataLength uint8) *_ApduDataAdcResponse { // Deprecated: use the interface for direct cast func CastApduDataAdcResponse(structType interface{}) ApduDataAdcResponse { - if casted, ok := structType.(ApduDataAdcResponse); ok { + if casted, ok := structType.(ApduDataAdcResponse); ok { return casted } if casted, ok := structType.(*ApduDataAdcResponse); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataAdcResponse) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_ApduDataAdcResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataAdcResponse) SerializeWithWriteBuffer(ctx context.Context, wri return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataAdcResponse) isApduDataAdcResponse() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataAdcResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataContainer.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataContainer.go index e914c341db0..7cab58b6006 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataContainer.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataContainer.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataContainer is the corresponding interface of ApduDataContainer type ApduDataContainer interface { @@ -46,32 +48,31 @@ type ApduDataContainerExactly interface { // _ApduDataContainer is the data-structure of this message type _ApduDataContainer struct { *_Apdu - DataApdu ApduData + DataApdu ApduData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataContainer) GetControl() uint8 { - return uint8(0) -} +func (m *_ApduDataContainer) GetControl() uint8 { +return uint8(0)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataContainer) InitializeParent(parent Apdu, numbered bool, counter uint8) { - m.Numbered = numbered +func (m *_ApduDataContainer) InitializeParent(parent Apdu , numbered bool , counter uint8 ) { m.Numbered = numbered m.Counter = counter } -func (m *_ApduDataContainer) GetParent() Apdu { +func (m *_ApduDataContainer) GetParent() Apdu { return m._Apdu } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -86,11 +87,12 @@ func (m *_ApduDataContainer) GetDataApdu() ApduData { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewApduDataContainer factory function for _ApduDataContainer -func NewApduDataContainer(dataApdu ApduData, numbered bool, counter uint8, dataLength uint8) *_ApduDataContainer { +func NewApduDataContainer( dataApdu ApduData , numbered bool , counter uint8 , dataLength uint8 ) *_ApduDataContainer { _result := &_ApduDataContainer{ DataApdu: dataApdu, - _Apdu: NewApdu(numbered, counter, dataLength), + _Apdu: NewApdu(numbered, counter, dataLength), } _result._Apdu._ApduChildRequirements = _result return _result @@ -98,7 +100,7 @@ func NewApduDataContainer(dataApdu ApduData, numbered bool, counter uint8, dataL // Deprecated: use the interface for direct cast func CastApduDataContainer(structType interface{}) ApduDataContainer { - if casted, ok := structType.(ApduDataContainer); ok { + if casted, ok := structType.(ApduDataContainer); ok { return casted } if casted, ok := structType.(*ApduDataContainer); ok { @@ -120,6 +122,7 @@ func (m *_ApduDataContainer) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_ApduDataContainer) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -141,7 +144,7 @@ func ApduDataContainerParseWithBuffer(ctx context.Context, readBuffer utils.Read if pullErr := readBuffer.PullContext("dataApdu"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for dataApdu") } - _dataApdu, _dataApduErr := ApduDataParseWithBuffer(ctx, readBuffer, uint8(dataLength)) +_dataApdu, _dataApduErr := ApduDataParseWithBuffer(ctx, readBuffer , uint8( dataLength ) ) if _dataApduErr != nil { return nil, errors.Wrap(_dataApduErr, "Error parsing 'dataApdu' field of ApduDataContainer") } @@ -181,17 +184,17 @@ func (m *_ApduDataContainer) SerializeWithWriteBuffer(ctx context.Context, write return errors.Wrap(pushErr, "Error pushing for ApduDataContainer") } - // Simple Field (dataApdu) - if pushErr := writeBuffer.PushContext("dataApdu"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for dataApdu") - } - _dataApduErr := writeBuffer.WriteSerializable(ctx, m.GetDataApdu()) - if popErr := writeBuffer.PopContext("dataApdu"); popErr != nil { - return errors.Wrap(popErr, "Error popping for dataApdu") - } - if _dataApduErr != nil { - return errors.Wrap(_dataApduErr, "Error serializing 'dataApdu' field") - } + // Simple Field (dataApdu) + if pushErr := writeBuffer.PushContext("dataApdu"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for dataApdu") + } + _dataApduErr := writeBuffer.WriteSerializable(ctx, m.GetDataApdu()) + if popErr := writeBuffer.PopContext("dataApdu"); popErr != nil { + return errors.Wrap(popErr, "Error popping for dataApdu") + } + if _dataApduErr != nil { + return errors.Wrap(_dataApduErr, "Error serializing 'dataApdu' field") + } if popErr := writeBuffer.PopContext("ApduDataContainer"); popErr != nil { return errors.Wrap(popErr, "Error popping for ApduDataContainer") @@ -201,6 +204,7 @@ func (m *_ApduDataContainer) SerializeWithWriteBuffer(ctx context.Context, write return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataContainer) isApduDataContainer() bool { return true } @@ -215,3 +219,6 @@ func (m *_ApduDataContainer) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataDeviceDescriptorRead.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataDeviceDescriptorRead.go index 25140b857b8..cc9cc07b682 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataDeviceDescriptorRead.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataDeviceDescriptorRead.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataDeviceDescriptorRead is the corresponding interface of ApduDataDeviceDescriptorRead type ApduDataDeviceDescriptorRead interface { @@ -46,29 +48,29 @@ type ApduDataDeviceDescriptorReadExactly interface { // _ApduDataDeviceDescriptorRead is the data-structure of this message type _ApduDataDeviceDescriptorRead struct { *_ApduData - DescriptorType uint8 + DescriptorType uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataDeviceDescriptorRead) GetApciType() uint8 { - return 0xC -} +func (m *_ApduDataDeviceDescriptorRead) GetApciType() uint8 { +return 0xC} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataDeviceDescriptorRead) InitializeParent(parent ApduData) {} +func (m *_ApduDataDeviceDescriptorRead) InitializeParent(parent ApduData ) {} -func (m *_ApduDataDeviceDescriptorRead) GetParent() ApduData { +func (m *_ApduDataDeviceDescriptorRead) GetParent() ApduData { return m._ApduData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_ApduDataDeviceDescriptorRead) GetDescriptorType() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewApduDataDeviceDescriptorRead factory function for _ApduDataDeviceDescriptorRead -func NewApduDataDeviceDescriptorRead(descriptorType uint8, dataLength uint8) *_ApduDataDeviceDescriptorRead { +func NewApduDataDeviceDescriptorRead( descriptorType uint8 , dataLength uint8 ) *_ApduDataDeviceDescriptorRead { _result := &_ApduDataDeviceDescriptorRead{ DescriptorType: descriptorType, - _ApduData: NewApduData(dataLength), + _ApduData: NewApduData(dataLength), } _result._ApduData._ApduDataChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewApduDataDeviceDescriptorRead(descriptorType uint8, dataLength uint8) *_A // Deprecated: use the interface for direct cast func CastApduDataDeviceDescriptorRead(structType interface{}) ApduDataDeviceDescriptorRead { - if casted, ok := structType.(ApduDataDeviceDescriptorRead); ok { + if casted, ok := structType.(ApduDataDeviceDescriptorRead); ok { return casted } if casted, ok := structType.(*ApduDataDeviceDescriptorRead); ok { @@ -112,11 +115,12 @@ func (m *_ApduDataDeviceDescriptorRead) GetLengthInBits(ctx context.Context) uin lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (descriptorType) - lengthInBits += 6 + lengthInBits += 6; return lengthInBits } + func (m *_ApduDataDeviceDescriptorRead) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -135,7 +139,7 @@ func ApduDataDeviceDescriptorReadParseWithBuffer(ctx context.Context, readBuffer _ = currentPos // Simple Field (descriptorType) - _descriptorType, _descriptorTypeErr := readBuffer.ReadUint8("descriptorType", 6) +_descriptorType, _descriptorTypeErr := readBuffer.ReadUint8("descriptorType", 6) if _descriptorTypeErr != nil { return nil, errors.Wrap(_descriptorTypeErr, "Error parsing 'descriptorType' field of ApduDataDeviceDescriptorRead") } @@ -172,12 +176,12 @@ func (m *_ApduDataDeviceDescriptorRead) SerializeWithWriteBuffer(ctx context.Con return errors.Wrap(pushErr, "Error pushing for ApduDataDeviceDescriptorRead") } - // Simple Field (descriptorType) - descriptorType := uint8(m.GetDescriptorType()) - _descriptorTypeErr := writeBuffer.WriteUint8("descriptorType", 6, (descriptorType)) - if _descriptorTypeErr != nil { - return errors.Wrap(_descriptorTypeErr, "Error serializing 'descriptorType' field") - } + // Simple Field (descriptorType) + descriptorType := uint8(m.GetDescriptorType()) + _descriptorTypeErr := writeBuffer.WriteUint8("descriptorType", 6, (descriptorType)) + if _descriptorTypeErr != nil { + return errors.Wrap(_descriptorTypeErr, "Error serializing 'descriptorType' field") + } if popErr := writeBuffer.PopContext("ApduDataDeviceDescriptorRead"); popErr != nil { return errors.Wrap(popErr, "Error popping for ApduDataDeviceDescriptorRead") @@ -187,6 +191,7 @@ func (m *_ApduDataDeviceDescriptorRead) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataDeviceDescriptorRead) isApduDataDeviceDescriptorRead() bool { return true } @@ -201,3 +206,6 @@ func (m *_ApduDataDeviceDescriptorRead) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataDeviceDescriptorResponse.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataDeviceDescriptorResponse.go index 9bcbb42fdad..ffa0920642d 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataDeviceDescriptorResponse.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataDeviceDescriptorResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataDeviceDescriptorResponse is the corresponding interface of ApduDataDeviceDescriptorResponse type ApduDataDeviceDescriptorResponse interface { @@ -48,30 +50,30 @@ type ApduDataDeviceDescriptorResponseExactly interface { // _ApduDataDeviceDescriptorResponse is the data-structure of this message type _ApduDataDeviceDescriptorResponse struct { *_ApduData - DescriptorType uint8 - Data []byte + DescriptorType uint8 + Data []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataDeviceDescriptorResponse) GetApciType() uint8 { - return 0xD -} +func (m *_ApduDataDeviceDescriptorResponse) GetApciType() uint8 { +return 0xD} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataDeviceDescriptorResponse) InitializeParent(parent ApduData) {} +func (m *_ApduDataDeviceDescriptorResponse) InitializeParent(parent ApduData ) {} -func (m *_ApduDataDeviceDescriptorResponse) GetParent() ApduData { +func (m *_ApduDataDeviceDescriptorResponse) GetParent() ApduData { return m._ApduData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_ApduDataDeviceDescriptorResponse) GetData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewApduDataDeviceDescriptorResponse factory function for _ApduDataDeviceDescriptorResponse -func NewApduDataDeviceDescriptorResponse(descriptorType uint8, data []byte, dataLength uint8) *_ApduDataDeviceDescriptorResponse { +func NewApduDataDeviceDescriptorResponse( descriptorType uint8 , data []byte , dataLength uint8 ) *_ApduDataDeviceDescriptorResponse { _result := &_ApduDataDeviceDescriptorResponse{ DescriptorType: descriptorType, - Data: data, - _ApduData: NewApduData(dataLength), + Data: data, + _ApduData: NewApduData(dataLength), } _result._ApduData._ApduDataChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewApduDataDeviceDescriptorResponse(descriptorType uint8, data []byte, data // Deprecated: use the interface for direct cast func CastApduDataDeviceDescriptorResponse(structType interface{}) ApduDataDeviceDescriptorResponse { - if casted, ok := structType.(ApduDataDeviceDescriptorResponse); ok { + if casted, ok := structType.(ApduDataDeviceDescriptorResponse); ok { return casted } if casted, ok := structType.(*ApduDataDeviceDescriptorResponse); ok { @@ -120,7 +123,7 @@ func (m *_ApduDataDeviceDescriptorResponse) GetLengthInBits(ctx context.Context) lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (descriptorType) - lengthInBits += 6 + lengthInBits += 6; // Array field if len(m.Data) > 0 { @@ -130,6 +133,7 @@ func (m *_ApduDataDeviceDescriptorResponse) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_ApduDataDeviceDescriptorResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -148,13 +152,13 @@ func ApduDataDeviceDescriptorResponseParseWithBuffer(ctx context.Context, readBu _ = currentPos // Simple Field (descriptorType) - _descriptorType, _descriptorTypeErr := readBuffer.ReadUint8("descriptorType", 6) +_descriptorType, _descriptorTypeErr := readBuffer.ReadUint8("descriptorType", 6) if _descriptorTypeErr != nil { return nil, errors.Wrap(_descriptorTypeErr, "Error parsing 'descriptorType' field of ApduDataDeviceDescriptorResponse") } descriptorType := _descriptorType // Byte Array field (data) - numberOfBytesdata := int(utils.InlineIf((bool((dataLength) < (1))), func() interface{} { return uint16(uint16(0)) }, func() interface{} { return uint16(uint16(dataLength) - uint16(uint16(1))) }).(uint16)) + numberOfBytesdata := int(utils.InlineIf((bool((dataLength) < ((1)))), func() interface{} {return uint16(uint16(0))}, func() interface{} {return uint16(uint16(dataLength) - uint16(uint16(1)))}).(uint16)) data, _readArrayErr := readBuffer.ReadByteArray("data", numberOfBytesdata) if _readArrayErr != nil { return nil, errors.Wrap(_readArrayErr, "Error parsing 'data' field of ApduDataDeviceDescriptorResponse") @@ -170,7 +174,7 @@ func ApduDataDeviceDescriptorResponseParseWithBuffer(ctx context.Context, readBu DataLength: dataLength, }, DescriptorType: descriptorType, - Data: data, + Data: data, } _child._ApduData._ApduDataChildRequirements = _child return _child, nil @@ -192,18 +196,18 @@ func (m *_ApduDataDeviceDescriptorResponse) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for ApduDataDeviceDescriptorResponse") } - // Simple Field (descriptorType) - descriptorType := uint8(m.GetDescriptorType()) - _descriptorTypeErr := writeBuffer.WriteUint8("descriptorType", 6, (descriptorType)) - if _descriptorTypeErr != nil { - return errors.Wrap(_descriptorTypeErr, "Error serializing 'descriptorType' field") - } + // Simple Field (descriptorType) + descriptorType := uint8(m.GetDescriptorType()) + _descriptorTypeErr := writeBuffer.WriteUint8("descriptorType", 6, (descriptorType)) + if _descriptorTypeErr != nil { + return errors.Wrap(_descriptorTypeErr, "Error serializing 'descriptorType' field") + } - // Array Field (data) - // Byte Array field (data) - if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { - return errors.Wrap(err, "Error serializing 'data' field") - } + // Array Field (data) + // Byte Array field (data) + if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { + return errors.Wrap(err, "Error serializing 'data' field") + } if popErr := writeBuffer.PopContext("ApduDataDeviceDescriptorResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for ApduDataDeviceDescriptorResponse") @@ -213,6 +217,7 @@ func (m *_ApduDataDeviceDescriptorResponse) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataDeviceDescriptorResponse) isApduDataDeviceDescriptorResponse() bool { return true } @@ -227,3 +232,6 @@ func (m *_ApduDataDeviceDescriptorResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExt.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExt.go index 031efe57fc3..e99ab07136b 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExt.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExt.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExt is the corresponding interface of ApduDataExt type ApduDataExt interface { @@ -56,6 +58,7 @@ type _ApduDataExtChildRequirements interface { GetExtApciType() uint8 } + type ApduDataExtParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child ApduDataExt, serializeChildFunction func() error) error GetTypeName() string @@ -63,21 +66,22 @@ type ApduDataExtParent interface { type ApduDataExtChild interface { utils.Serializable - InitializeParent(parent ApduDataExt) +InitializeParent(parent ApduDataExt ) GetParent() *ApduDataExt GetTypeName() string ApduDataExt } + // NewApduDataExt factory function for _ApduDataExt -func NewApduDataExt(length uint8) *_ApduDataExt { - return &_ApduDataExt{Length: length} +func NewApduDataExt( length uint8 ) *_ApduDataExt { +return &_ApduDataExt{ Length: length } } // Deprecated: use the interface for direct cast func CastApduDataExt(structType interface{}) ApduDataExt { - if casted, ok := structType.(ApduDataExt); ok { + if casted, ok := structType.(ApduDataExt); ok { return casted } if casted, ok := structType.(*ApduDataExt); ok { @@ -90,10 +94,11 @@ func (m *_ApduDataExt) GetTypeName() string { return "ApduDataExt" } + func (m *_ApduDataExt) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Discriminator Field (extApciType) - lengthInBits += 6 + lengthInBits += 6; return lengthInBits } @@ -124,94 +129,94 @@ func ApduDataExtParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type ApduDataExtChildSerializeRequirement interface { ApduDataExt - InitializeParent(ApduDataExt) + InitializeParent(ApduDataExt ) GetParent() ApduDataExt } var _childTemp interface{} var _child ApduDataExtChildSerializeRequirement var typeSwitchError error switch { - case extApciType == 0x00: // ApduDataExtOpenRoutingTableRequest +case extApciType == 0x00 : // ApduDataExtOpenRoutingTableRequest _childTemp, typeSwitchError = ApduDataExtOpenRoutingTableRequestParseWithBuffer(ctx, readBuffer, length) - case extApciType == 0x01: // ApduDataExtReadRoutingTableRequest +case extApciType == 0x01 : // ApduDataExtReadRoutingTableRequest _childTemp, typeSwitchError = ApduDataExtReadRoutingTableRequestParseWithBuffer(ctx, readBuffer, length) - case extApciType == 0x02: // ApduDataExtReadRoutingTableResponse +case extApciType == 0x02 : // ApduDataExtReadRoutingTableResponse _childTemp, typeSwitchError = ApduDataExtReadRoutingTableResponseParseWithBuffer(ctx, readBuffer, length) - case extApciType == 0x03: // ApduDataExtWriteRoutingTableRequest +case extApciType == 0x03 : // ApduDataExtWriteRoutingTableRequest _childTemp, typeSwitchError = ApduDataExtWriteRoutingTableRequestParseWithBuffer(ctx, readBuffer, length) - case extApciType == 0x08: // ApduDataExtReadRouterMemoryRequest +case extApciType == 0x08 : // ApduDataExtReadRouterMemoryRequest _childTemp, typeSwitchError = ApduDataExtReadRouterMemoryRequestParseWithBuffer(ctx, readBuffer, length) - case extApciType == 0x09: // ApduDataExtReadRouterMemoryResponse +case extApciType == 0x09 : // ApduDataExtReadRouterMemoryResponse _childTemp, typeSwitchError = ApduDataExtReadRouterMemoryResponseParseWithBuffer(ctx, readBuffer, length) - case extApciType == 0x0A: // ApduDataExtWriteRouterMemoryRequest +case extApciType == 0x0A : // ApduDataExtWriteRouterMemoryRequest _childTemp, typeSwitchError = ApduDataExtWriteRouterMemoryRequestParseWithBuffer(ctx, readBuffer, length) - case extApciType == 0x0D: // ApduDataExtReadRouterStatusRequest +case extApciType == 0x0D : // ApduDataExtReadRouterStatusRequest _childTemp, typeSwitchError = ApduDataExtReadRouterStatusRequestParseWithBuffer(ctx, readBuffer, length) - case extApciType == 0x0E: // ApduDataExtReadRouterStatusResponse +case extApciType == 0x0E : // ApduDataExtReadRouterStatusResponse _childTemp, typeSwitchError = ApduDataExtReadRouterStatusResponseParseWithBuffer(ctx, readBuffer, length) - case extApciType == 0x0F: // ApduDataExtWriteRouterStatusRequest +case extApciType == 0x0F : // ApduDataExtWriteRouterStatusRequest _childTemp, typeSwitchError = ApduDataExtWriteRouterStatusRequestParseWithBuffer(ctx, readBuffer, length) - case extApciType == 0x10: // ApduDataExtMemoryBitWrite +case extApciType == 0x10 : // ApduDataExtMemoryBitWrite _childTemp, typeSwitchError = ApduDataExtMemoryBitWriteParseWithBuffer(ctx, readBuffer, length) - case extApciType == 0x11: // ApduDataExtAuthorizeRequest +case extApciType == 0x11 : // ApduDataExtAuthorizeRequest _childTemp, typeSwitchError = ApduDataExtAuthorizeRequestParseWithBuffer(ctx, readBuffer, length) - case extApciType == 0x12: // ApduDataExtAuthorizeResponse +case extApciType == 0x12 : // ApduDataExtAuthorizeResponse _childTemp, typeSwitchError = ApduDataExtAuthorizeResponseParseWithBuffer(ctx, readBuffer, length) - case extApciType == 0x13: // ApduDataExtKeyWrite +case extApciType == 0x13 : // ApduDataExtKeyWrite _childTemp, typeSwitchError = ApduDataExtKeyWriteParseWithBuffer(ctx, readBuffer, length) - case extApciType == 0x14: // ApduDataExtKeyResponse +case extApciType == 0x14 : // ApduDataExtKeyResponse _childTemp, typeSwitchError = ApduDataExtKeyResponseParseWithBuffer(ctx, readBuffer, length) - case extApciType == 0x15: // ApduDataExtPropertyValueRead +case extApciType == 0x15 : // ApduDataExtPropertyValueRead _childTemp, typeSwitchError = ApduDataExtPropertyValueReadParseWithBuffer(ctx, readBuffer, length) - case extApciType == 0x16: // ApduDataExtPropertyValueResponse +case extApciType == 0x16 : // ApduDataExtPropertyValueResponse _childTemp, typeSwitchError = ApduDataExtPropertyValueResponseParseWithBuffer(ctx, readBuffer, length) - case extApciType == 0x17: // ApduDataExtPropertyValueWrite +case extApciType == 0x17 : // ApduDataExtPropertyValueWrite _childTemp, typeSwitchError = ApduDataExtPropertyValueWriteParseWithBuffer(ctx, readBuffer, length) - case extApciType == 0x18: // ApduDataExtPropertyDescriptionRead +case extApciType == 0x18 : // ApduDataExtPropertyDescriptionRead _childTemp, typeSwitchError = ApduDataExtPropertyDescriptionReadParseWithBuffer(ctx, readBuffer, length) - case extApciType == 0x19: // ApduDataExtPropertyDescriptionResponse +case extApciType == 0x19 : // ApduDataExtPropertyDescriptionResponse _childTemp, typeSwitchError = ApduDataExtPropertyDescriptionResponseParseWithBuffer(ctx, readBuffer, length) - case extApciType == 0x1A: // ApduDataExtNetworkParameterRead +case extApciType == 0x1A : // ApduDataExtNetworkParameterRead _childTemp, typeSwitchError = ApduDataExtNetworkParameterReadParseWithBuffer(ctx, readBuffer, length) - case extApciType == 0x1B: // ApduDataExtNetworkParameterResponse +case extApciType == 0x1B : // ApduDataExtNetworkParameterResponse _childTemp, typeSwitchError = ApduDataExtNetworkParameterResponseParseWithBuffer(ctx, readBuffer, length) - case extApciType == 0x1C: // ApduDataExtIndividualAddressSerialNumberRead +case extApciType == 0x1C : // ApduDataExtIndividualAddressSerialNumberRead _childTemp, typeSwitchError = ApduDataExtIndividualAddressSerialNumberReadParseWithBuffer(ctx, readBuffer, length) - case extApciType == 0x1D: // ApduDataExtIndividualAddressSerialNumberResponse +case extApciType == 0x1D : // ApduDataExtIndividualAddressSerialNumberResponse _childTemp, typeSwitchError = ApduDataExtIndividualAddressSerialNumberResponseParseWithBuffer(ctx, readBuffer, length) - case extApciType == 0x1E: // ApduDataExtIndividualAddressSerialNumberWrite +case extApciType == 0x1E : // ApduDataExtIndividualAddressSerialNumberWrite _childTemp, typeSwitchError = ApduDataExtIndividualAddressSerialNumberWriteParseWithBuffer(ctx, readBuffer, length) - case extApciType == 0x20: // ApduDataExtDomainAddressWrite +case extApciType == 0x20 : // ApduDataExtDomainAddressWrite _childTemp, typeSwitchError = ApduDataExtDomainAddressWriteParseWithBuffer(ctx, readBuffer, length) - case extApciType == 0x21: // ApduDataExtDomainAddressRead +case extApciType == 0x21 : // ApduDataExtDomainAddressRead _childTemp, typeSwitchError = ApduDataExtDomainAddressReadParseWithBuffer(ctx, readBuffer, length) - case extApciType == 0x22: // ApduDataExtDomainAddressResponse +case extApciType == 0x22 : // ApduDataExtDomainAddressResponse _childTemp, typeSwitchError = ApduDataExtDomainAddressResponseParseWithBuffer(ctx, readBuffer, length) - case extApciType == 0x23: // ApduDataExtDomainAddressSelectiveRead +case extApciType == 0x23 : // ApduDataExtDomainAddressSelectiveRead _childTemp, typeSwitchError = ApduDataExtDomainAddressSelectiveReadParseWithBuffer(ctx, readBuffer, length) - case extApciType == 0x24: // ApduDataExtNetworkParameterWrite +case extApciType == 0x24 : // ApduDataExtNetworkParameterWrite _childTemp, typeSwitchError = ApduDataExtNetworkParameterWriteParseWithBuffer(ctx, readBuffer, length) - case extApciType == 0x25: // ApduDataExtLinkRead +case extApciType == 0x25 : // ApduDataExtLinkRead _childTemp, typeSwitchError = ApduDataExtLinkReadParseWithBuffer(ctx, readBuffer, length) - case extApciType == 0x26: // ApduDataExtLinkResponse +case extApciType == 0x26 : // ApduDataExtLinkResponse _childTemp, typeSwitchError = ApduDataExtLinkResponseParseWithBuffer(ctx, readBuffer, length) - case extApciType == 0x27: // ApduDataExtLinkWrite +case extApciType == 0x27 : // ApduDataExtLinkWrite _childTemp, typeSwitchError = ApduDataExtLinkWriteParseWithBuffer(ctx, readBuffer, length) - case extApciType == 0x28: // ApduDataExtGroupPropertyValueRead +case extApciType == 0x28 : // ApduDataExtGroupPropertyValueRead _childTemp, typeSwitchError = ApduDataExtGroupPropertyValueReadParseWithBuffer(ctx, readBuffer, length) - case extApciType == 0x29: // ApduDataExtGroupPropertyValueResponse +case extApciType == 0x29 : // ApduDataExtGroupPropertyValueResponse _childTemp, typeSwitchError = ApduDataExtGroupPropertyValueResponseParseWithBuffer(ctx, readBuffer, length) - case extApciType == 0x2A: // ApduDataExtGroupPropertyValueWrite +case extApciType == 0x2A : // ApduDataExtGroupPropertyValueWrite _childTemp, typeSwitchError = ApduDataExtGroupPropertyValueWriteParseWithBuffer(ctx, readBuffer, length) - case extApciType == 0x2B: // ApduDataExtGroupPropertyValueInfoReport +case extApciType == 0x2B : // ApduDataExtGroupPropertyValueInfoReport _childTemp, typeSwitchError = ApduDataExtGroupPropertyValueInfoReportParseWithBuffer(ctx, readBuffer, length) - case extApciType == 0x2C: // ApduDataExtDomainAddressSerialNumberRead +case extApciType == 0x2C : // ApduDataExtDomainAddressSerialNumberRead _childTemp, typeSwitchError = ApduDataExtDomainAddressSerialNumberReadParseWithBuffer(ctx, readBuffer, length) - case extApciType == 0x2D: // ApduDataExtDomainAddressSerialNumberResponse +case extApciType == 0x2D : // ApduDataExtDomainAddressSerialNumberResponse _childTemp, typeSwitchError = ApduDataExtDomainAddressSerialNumberResponseParseWithBuffer(ctx, readBuffer, length) - case extApciType == 0x2E: // ApduDataExtDomainAddressSerialNumberWrite +case extApciType == 0x2E : // ApduDataExtDomainAddressSerialNumberWrite _childTemp, typeSwitchError = ApduDataExtDomainAddressSerialNumberWriteParseWithBuffer(ctx, readBuffer, length) - case extApciType == 0x30: // ApduDataExtFileStreamInfoReport +case extApciType == 0x30 : // ApduDataExtFileStreamInfoReport _childTemp, typeSwitchError = ApduDataExtFileStreamInfoReportParseWithBuffer(ctx, readBuffer, length) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [extApciType=%v]", extApciType) @@ -226,7 +231,7 @@ func ApduDataExtParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer } // Finish initializing - _child.InitializeParent(_child) +_child.InitializeParent(_child ) return _child, nil } @@ -236,7 +241,7 @@ func (pm *_ApduDataExt) SerializeParent(ctx context.Context, writeBuffer utils.W _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("ApduDataExt"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("ApduDataExt"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for ApduDataExt") } @@ -259,13 +264,13 @@ func (pm *_ApduDataExt) SerializeParent(ctx context.Context, writeBuffer utils.W return nil } + //// // Arguments Getter func (m *_ApduDataExt) GetLength() uint8 { return m.Length } - // //// @@ -283,3 +288,6 @@ func (m *_ApduDataExt) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtAuthorizeRequest.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtAuthorizeRequest.go index 271f6de449d..e10825c7e4a 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtAuthorizeRequest.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtAuthorizeRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtAuthorizeRequest is the corresponding interface of ApduDataExtAuthorizeRequest type ApduDataExtAuthorizeRequest interface { @@ -48,30 +50,30 @@ type ApduDataExtAuthorizeRequestExactly interface { // _ApduDataExtAuthorizeRequest is the data-structure of this message type _ApduDataExtAuthorizeRequest struct { *_ApduDataExt - Level uint8 - Data []byte + Level uint8 + Data []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtAuthorizeRequest) GetExtApciType() uint8 { - return 0x11 -} +func (m *_ApduDataExtAuthorizeRequest) GetExtApciType() uint8 { +return 0x11} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtAuthorizeRequest) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtAuthorizeRequest) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtAuthorizeRequest) GetParent() ApduDataExt { +func (m *_ApduDataExtAuthorizeRequest) GetParent() ApduDataExt { return m._ApduDataExt } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_ApduDataExtAuthorizeRequest) GetData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewApduDataExtAuthorizeRequest factory function for _ApduDataExtAuthorizeRequest -func NewApduDataExtAuthorizeRequest(level uint8, data []byte, length uint8) *_ApduDataExtAuthorizeRequest { +func NewApduDataExtAuthorizeRequest( level uint8 , data []byte , length uint8 ) *_ApduDataExtAuthorizeRequest { _result := &_ApduDataExtAuthorizeRequest{ - Level: level, - Data: data, - _ApduDataExt: NewApduDataExt(length), + Level: level, + Data: data, + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewApduDataExtAuthorizeRequest(level uint8, data []byte, length uint8) *_Ap // Deprecated: use the interface for direct cast func CastApduDataExtAuthorizeRequest(structType interface{}) ApduDataExtAuthorizeRequest { - if casted, ok := structType.(ApduDataExtAuthorizeRequest); ok { + if casted, ok := structType.(ApduDataExtAuthorizeRequest); ok { return casted } if casted, ok := structType.(*ApduDataExtAuthorizeRequest); ok { @@ -120,7 +123,7 @@ func (m *_ApduDataExtAuthorizeRequest) GetLengthInBits(ctx context.Context) uint lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (level) - lengthInBits += 8 + lengthInBits += 8; // Array field if len(m.Data) > 0 { @@ -130,6 +133,7 @@ func (m *_ApduDataExtAuthorizeRequest) GetLengthInBits(ctx context.Context) uint return lengthInBits } + func (m *_ApduDataExtAuthorizeRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -148,7 +152,7 @@ func ApduDataExtAuthorizeRequestParseWithBuffer(ctx context.Context, readBuffer _ = currentPos // Simple Field (level) - _level, _levelErr := readBuffer.ReadUint8("level", 8) +_level, _levelErr := readBuffer.ReadUint8("level", 8) if _levelErr != nil { return nil, errors.Wrap(_levelErr, "Error parsing 'level' field of ApduDataExtAuthorizeRequest") } @@ -170,7 +174,7 @@ func ApduDataExtAuthorizeRequestParseWithBuffer(ctx context.Context, readBuffer Length: length, }, Level: level, - Data: data, + Data: data, } _child._ApduDataExt._ApduDataExtChildRequirements = _child return _child, nil @@ -192,18 +196,18 @@ func (m *_ApduDataExtAuthorizeRequest) SerializeWithWriteBuffer(ctx context.Cont return errors.Wrap(pushErr, "Error pushing for ApduDataExtAuthorizeRequest") } - // Simple Field (level) - level := uint8(m.GetLevel()) - _levelErr := writeBuffer.WriteUint8("level", 8, (level)) - if _levelErr != nil { - return errors.Wrap(_levelErr, "Error serializing 'level' field") - } + // Simple Field (level) + level := uint8(m.GetLevel()) + _levelErr := writeBuffer.WriteUint8("level", 8, (level)) + if _levelErr != nil { + return errors.Wrap(_levelErr, "Error serializing 'level' field") + } - // Array Field (data) - // Byte Array field (data) - if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { - return errors.Wrap(err, "Error serializing 'data' field") - } + // Array Field (data) + // Byte Array field (data) + if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { + return errors.Wrap(err, "Error serializing 'data' field") + } if popErr := writeBuffer.PopContext("ApduDataExtAuthorizeRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for ApduDataExtAuthorizeRequest") @@ -213,6 +217,7 @@ func (m *_ApduDataExtAuthorizeRequest) SerializeWithWriteBuffer(ctx context.Cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtAuthorizeRequest) isApduDataExtAuthorizeRequest() bool { return true } @@ -227,3 +232,6 @@ func (m *_ApduDataExtAuthorizeRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtAuthorizeResponse.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtAuthorizeResponse.go index da28c6dd883..c745a6d7e1d 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtAuthorizeResponse.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtAuthorizeResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtAuthorizeResponse is the corresponding interface of ApduDataExtAuthorizeResponse type ApduDataExtAuthorizeResponse interface { @@ -46,29 +48,29 @@ type ApduDataExtAuthorizeResponseExactly interface { // _ApduDataExtAuthorizeResponse is the data-structure of this message type _ApduDataExtAuthorizeResponse struct { *_ApduDataExt - Level uint8 + Level uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtAuthorizeResponse) GetExtApciType() uint8 { - return 0x12 -} +func (m *_ApduDataExtAuthorizeResponse) GetExtApciType() uint8 { +return 0x12} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtAuthorizeResponse) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtAuthorizeResponse) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtAuthorizeResponse) GetParent() ApduDataExt { +func (m *_ApduDataExtAuthorizeResponse) GetParent() ApduDataExt { return m._ApduDataExt } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_ApduDataExtAuthorizeResponse) GetLevel() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewApduDataExtAuthorizeResponse factory function for _ApduDataExtAuthorizeResponse -func NewApduDataExtAuthorizeResponse(level uint8, length uint8) *_ApduDataExtAuthorizeResponse { +func NewApduDataExtAuthorizeResponse( level uint8 , length uint8 ) *_ApduDataExtAuthorizeResponse { _result := &_ApduDataExtAuthorizeResponse{ - Level: level, - _ApduDataExt: NewApduDataExt(length), + Level: level, + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewApduDataExtAuthorizeResponse(level uint8, length uint8) *_ApduDataExtAut // Deprecated: use the interface for direct cast func CastApduDataExtAuthorizeResponse(structType interface{}) ApduDataExtAuthorizeResponse { - if casted, ok := structType.(ApduDataExtAuthorizeResponse); ok { + if casted, ok := structType.(ApduDataExtAuthorizeResponse); ok { return casted } if casted, ok := structType.(*ApduDataExtAuthorizeResponse); ok { @@ -112,11 +115,12 @@ func (m *_ApduDataExtAuthorizeResponse) GetLengthInBits(ctx context.Context) uin lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (level) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_ApduDataExtAuthorizeResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -135,7 +139,7 @@ func ApduDataExtAuthorizeResponseParseWithBuffer(ctx context.Context, readBuffer _ = currentPos // Simple Field (level) - _level, _levelErr := readBuffer.ReadUint8("level", 8) +_level, _levelErr := readBuffer.ReadUint8("level", 8) if _levelErr != nil { return nil, errors.Wrap(_levelErr, "Error parsing 'level' field of ApduDataExtAuthorizeResponse") } @@ -172,12 +176,12 @@ func (m *_ApduDataExtAuthorizeResponse) SerializeWithWriteBuffer(ctx context.Con return errors.Wrap(pushErr, "Error pushing for ApduDataExtAuthorizeResponse") } - // Simple Field (level) - level := uint8(m.GetLevel()) - _levelErr := writeBuffer.WriteUint8("level", 8, (level)) - if _levelErr != nil { - return errors.Wrap(_levelErr, "Error serializing 'level' field") - } + // Simple Field (level) + level := uint8(m.GetLevel()) + _levelErr := writeBuffer.WriteUint8("level", 8, (level)) + if _levelErr != nil { + return errors.Wrap(_levelErr, "Error serializing 'level' field") + } if popErr := writeBuffer.PopContext("ApduDataExtAuthorizeResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for ApduDataExtAuthorizeResponse") @@ -187,6 +191,7 @@ func (m *_ApduDataExtAuthorizeResponse) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtAuthorizeResponse) isApduDataExtAuthorizeResponse() bool { return true } @@ -201,3 +206,6 @@ func (m *_ApduDataExtAuthorizeResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtDomainAddressRead.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtDomainAddressRead.go index 328c43339a9..d9dcd404655 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtDomainAddressRead.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtDomainAddressRead.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtDomainAddressRead is the corresponding interface of ApduDataExtDomainAddressRead type ApduDataExtDomainAddressRead interface { @@ -46,30 +48,32 @@ type _ApduDataExtDomainAddressRead struct { *_ApduDataExt } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtDomainAddressRead) GetExtApciType() uint8 { - return 0x21 -} +func (m *_ApduDataExtDomainAddressRead) GetExtApciType() uint8 { +return 0x21} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtDomainAddressRead) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtDomainAddressRead) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtDomainAddressRead) GetParent() ApduDataExt { +func (m *_ApduDataExtDomainAddressRead) GetParent() ApduDataExt { return m._ApduDataExt } + // NewApduDataExtDomainAddressRead factory function for _ApduDataExtDomainAddressRead -func NewApduDataExtDomainAddressRead(length uint8) *_ApduDataExtDomainAddressRead { +func NewApduDataExtDomainAddressRead( length uint8 ) *_ApduDataExtDomainAddressRead { _result := &_ApduDataExtDomainAddressRead{ - _ApduDataExt: NewApduDataExt(length), + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataExtDomainAddressRead(length uint8) *_ApduDataExtDomainAddressRea // Deprecated: use the interface for direct cast func CastApduDataExtDomainAddressRead(structType interface{}) ApduDataExtDomainAddressRead { - if casted, ok := structType.(ApduDataExtDomainAddressRead); ok { + if casted, ok := structType.(ApduDataExtDomainAddressRead); ok { return casted } if casted, ok := structType.(*ApduDataExtDomainAddressRead); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataExtDomainAddressRead) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_ApduDataExtDomainAddressRead) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataExtDomainAddressRead) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtDomainAddressRead) isApduDataExtDomainAddressRead() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataExtDomainAddressRead) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtDomainAddressResponse.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtDomainAddressResponse.go index 7a432254cdc..4b98b3c6030 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtDomainAddressResponse.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtDomainAddressResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtDomainAddressResponse is the corresponding interface of ApduDataExtDomainAddressResponse type ApduDataExtDomainAddressResponse interface { @@ -46,30 +48,32 @@ type _ApduDataExtDomainAddressResponse struct { *_ApduDataExt } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtDomainAddressResponse) GetExtApciType() uint8 { - return 0x22 -} +func (m *_ApduDataExtDomainAddressResponse) GetExtApciType() uint8 { +return 0x22} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtDomainAddressResponse) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtDomainAddressResponse) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtDomainAddressResponse) GetParent() ApduDataExt { +func (m *_ApduDataExtDomainAddressResponse) GetParent() ApduDataExt { return m._ApduDataExt } + // NewApduDataExtDomainAddressResponse factory function for _ApduDataExtDomainAddressResponse -func NewApduDataExtDomainAddressResponse(length uint8) *_ApduDataExtDomainAddressResponse { +func NewApduDataExtDomainAddressResponse( length uint8 ) *_ApduDataExtDomainAddressResponse { _result := &_ApduDataExtDomainAddressResponse{ - _ApduDataExt: NewApduDataExt(length), + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataExtDomainAddressResponse(length uint8) *_ApduDataExtDomainAddres // Deprecated: use the interface for direct cast func CastApduDataExtDomainAddressResponse(structType interface{}) ApduDataExtDomainAddressResponse { - if casted, ok := structType.(ApduDataExtDomainAddressResponse); ok { + if casted, ok := structType.(ApduDataExtDomainAddressResponse); ok { return casted } if casted, ok := structType.(*ApduDataExtDomainAddressResponse); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataExtDomainAddressResponse) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_ApduDataExtDomainAddressResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataExtDomainAddressResponse) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtDomainAddressResponse) isApduDataExtDomainAddressResponse() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataExtDomainAddressResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtDomainAddressSelectiveRead.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtDomainAddressSelectiveRead.go index ab76b6a2d9e..fb34a43bdff 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtDomainAddressSelectiveRead.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtDomainAddressSelectiveRead.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtDomainAddressSelectiveRead is the corresponding interface of ApduDataExtDomainAddressSelectiveRead type ApduDataExtDomainAddressSelectiveRead interface { @@ -46,30 +48,32 @@ type _ApduDataExtDomainAddressSelectiveRead struct { *_ApduDataExt } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtDomainAddressSelectiveRead) GetExtApciType() uint8 { - return 0x23 -} +func (m *_ApduDataExtDomainAddressSelectiveRead) GetExtApciType() uint8 { +return 0x23} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtDomainAddressSelectiveRead) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtDomainAddressSelectiveRead) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtDomainAddressSelectiveRead) GetParent() ApduDataExt { +func (m *_ApduDataExtDomainAddressSelectiveRead) GetParent() ApduDataExt { return m._ApduDataExt } + // NewApduDataExtDomainAddressSelectiveRead factory function for _ApduDataExtDomainAddressSelectiveRead -func NewApduDataExtDomainAddressSelectiveRead(length uint8) *_ApduDataExtDomainAddressSelectiveRead { +func NewApduDataExtDomainAddressSelectiveRead( length uint8 ) *_ApduDataExtDomainAddressSelectiveRead { _result := &_ApduDataExtDomainAddressSelectiveRead{ - _ApduDataExt: NewApduDataExt(length), + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataExtDomainAddressSelectiveRead(length uint8) *_ApduDataExtDomainA // Deprecated: use the interface for direct cast func CastApduDataExtDomainAddressSelectiveRead(structType interface{}) ApduDataExtDomainAddressSelectiveRead { - if casted, ok := structType.(ApduDataExtDomainAddressSelectiveRead); ok { + if casted, ok := structType.(ApduDataExtDomainAddressSelectiveRead); ok { return casted } if casted, ok := structType.(*ApduDataExtDomainAddressSelectiveRead); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataExtDomainAddressSelectiveRead) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_ApduDataExtDomainAddressSelectiveRead) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataExtDomainAddressSelectiveRead) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtDomainAddressSelectiveRead) isApduDataExtDomainAddressSelectiveRead() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataExtDomainAddressSelectiveRead) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtDomainAddressSerialNumberRead.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtDomainAddressSerialNumberRead.go index 930231cb5e9..28f375bb783 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtDomainAddressSerialNumberRead.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtDomainAddressSerialNumberRead.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtDomainAddressSerialNumberRead is the corresponding interface of ApduDataExtDomainAddressSerialNumberRead type ApduDataExtDomainAddressSerialNumberRead interface { @@ -46,30 +48,32 @@ type _ApduDataExtDomainAddressSerialNumberRead struct { *_ApduDataExt } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtDomainAddressSerialNumberRead) GetExtApciType() uint8 { - return 0x2C -} +func (m *_ApduDataExtDomainAddressSerialNumberRead) GetExtApciType() uint8 { +return 0x2C} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtDomainAddressSerialNumberRead) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtDomainAddressSerialNumberRead) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtDomainAddressSerialNumberRead) GetParent() ApduDataExt { +func (m *_ApduDataExtDomainAddressSerialNumberRead) GetParent() ApduDataExt { return m._ApduDataExt } + // NewApduDataExtDomainAddressSerialNumberRead factory function for _ApduDataExtDomainAddressSerialNumberRead -func NewApduDataExtDomainAddressSerialNumberRead(length uint8) *_ApduDataExtDomainAddressSerialNumberRead { +func NewApduDataExtDomainAddressSerialNumberRead( length uint8 ) *_ApduDataExtDomainAddressSerialNumberRead { _result := &_ApduDataExtDomainAddressSerialNumberRead{ - _ApduDataExt: NewApduDataExt(length), + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataExtDomainAddressSerialNumberRead(length uint8) *_ApduDataExtDoma // Deprecated: use the interface for direct cast func CastApduDataExtDomainAddressSerialNumberRead(structType interface{}) ApduDataExtDomainAddressSerialNumberRead { - if casted, ok := structType.(ApduDataExtDomainAddressSerialNumberRead); ok { + if casted, ok := structType.(ApduDataExtDomainAddressSerialNumberRead); ok { return casted } if casted, ok := structType.(*ApduDataExtDomainAddressSerialNumberRead); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataExtDomainAddressSerialNumberRead) GetLengthInBits(ctx context. return lengthInBits } + func (m *_ApduDataExtDomainAddressSerialNumberRead) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataExtDomainAddressSerialNumberRead) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtDomainAddressSerialNumberRead) isApduDataExtDomainAddressSerialNumberRead() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataExtDomainAddressSerialNumberRead) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtDomainAddressSerialNumberResponse.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtDomainAddressSerialNumberResponse.go index 026adcd02cd..1afb6113ecd 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtDomainAddressSerialNumberResponse.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtDomainAddressSerialNumberResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtDomainAddressSerialNumberResponse is the corresponding interface of ApduDataExtDomainAddressSerialNumberResponse type ApduDataExtDomainAddressSerialNumberResponse interface { @@ -46,30 +48,32 @@ type _ApduDataExtDomainAddressSerialNumberResponse struct { *_ApduDataExt } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtDomainAddressSerialNumberResponse) GetExtApciType() uint8 { - return 0x2D -} +func (m *_ApduDataExtDomainAddressSerialNumberResponse) GetExtApciType() uint8 { +return 0x2D} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtDomainAddressSerialNumberResponse) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtDomainAddressSerialNumberResponse) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtDomainAddressSerialNumberResponse) GetParent() ApduDataExt { +func (m *_ApduDataExtDomainAddressSerialNumberResponse) GetParent() ApduDataExt { return m._ApduDataExt } + // NewApduDataExtDomainAddressSerialNumberResponse factory function for _ApduDataExtDomainAddressSerialNumberResponse -func NewApduDataExtDomainAddressSerialNumberResponse(length uint8) *_ApduDataExtDomainAddressSerialNumberResponse { +func NewApduDataExtDomainAddressSerialNumberResponse( length uint8 ) *_ApduDataExtDomainAddressSerialNumberResponse { _result := &_ApduDataExtDomainAddressSerialNumberResponse{ - _ApduDataExt: NewApduDataExt(length), + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataExtDomainAddressSerialNumberResponse(length uint8) *_ApduDataExt // Deprecated: use the interface for direct cast func CastApduDataExtDomainAddressSerialNumberResponse(structType interface{}) ApduDataExtDomainAddressSerialNumberResponse { - if casted, ok := structType.(ApduDataExtDomainAddressSerialNumberResponse); ok { + if casted, ok := structType.(ApduDataExtDomainAddressSerialNumberResponse); ok { return casted } if casted, ok := structType.(*ApduDataExtDomainAddressSerialNumberResponse); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataExtDomainAddressSerialNumberResponse) GetLengthInBits(ctx cont return lengthInBits } + func (m *_ApduDataExtDomainAddressSerialNumberResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataExtDomainAddressSerialNumberResponse) SerializeWithWriteBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtDomainAddressSerialNumberResponse) isApduDataExtDomainAddressSerialNumberResponse() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataExtDomainAddressSerialNumberResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtDomainAddressSerialNumberWrite.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtDomainAddressSerialNumberWrite.go index cb204092f5b..8f9ce0c9a45 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtDomainAddressSerialNumberWrite.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtDomainAddressSerialNumberWrite.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtDomainAddressSerialNumberWrite is the corresponding interface of ApduDataExtDomainAddressSerialNumberWrite type ApduDataExtDomainAddressSerialNumberWrite interface { @@ -46,30 +48,32 @@ type _ApduDataExtDomainAddressSerialNumberWrite struct { *_ApduDataExt } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtDomainAddressSerialNumberWrite) GetExtApciType() uint8 { - return 0x2E -} +func (m *_ApduDataExtDomainAddressSerialNumberWrite) GetExtApciType() uint8 { +return 0x2E} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtDomainAddressSerialNumberWrite) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtDomainAddressSerialNumberWrite) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtDomainAddressSerialNumberWrite) GetParent() ApduDataExt { +func (m *_ApduDataExtDomainAddressSerialNumberWrite) GetParent() ApduDataExt { return m._ApduDataExt } + // NewApduDataExtDomainAddressSerialNumberWrite factory function for _ApduDataExtDomainAddressSerialNumberWrite -func NewApduDataExtDomainAddressSerialNumberWrite(length uint8) *_ApduDataExtDomainAddressSerialNumberWrite { +func NewApduDataExtDomainAddressSerialNumberWrite( length uint8 ) *_ApduDataExtDomainAddressSerialNumberWrite { _result := &_ApduDataExtDomainAddressSerialNumberWrite{ - _ApduDataExt: NewApduDataExt(length), + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataExtDomainAddressSerialNumberWrite(length uint8) *_ApduDataExtDom // Deprecated: use the interface for direct cast func CastApduDataExtDomainAddressSerialNumberWrite(structType interface{}) ApduDataExtDomainAddressSerialNumberWrite { - if casted, ok := structType.(ApduDataExtDomainAddressSerialNumberWrite); ok { + if casted, ok := structType.(ApduDataExtDomainAddressSerialNumberWrite); ok { return casted } if casted, ok := structType.(*ApduDataExtDomainAddressSerialNumberWrite); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataExtDomainAddressSerialNumberWrite) GetLengthInBits(ctx context return lengthInBits } + func (m *_ApduDataExtDomainAddressSerialNumberWrite) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataExtDomainAddressSerialNumberWrite) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtDomainAddressSerialNumberWrite) isApduDataExtDomainAddressSerialNumberWrite() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataExtDomainAddressSerialNumberWrite) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtDomainAddressWrite.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtDomainAddressWrite.go index 19b3fddf1f1..640ec6fe686 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtDomainAddressWrite.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtDomainAddressWrite.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtDomainAddressWrite is the corresponding interface of ApduDataExtDomainAddressWrite type ApduDataExtDomainAddressWrite interface { @@ -46,30 +48,32 @@ type _ApduDataExtDomainAddressWrite struct { *_ApduDataExt } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtDomainAddressWrite) GetExtApciType() uint8 { - return 0x20 -} +func (m *_ApduDataExtDomainAddressWrite) GetExtApciType() uint8 { +return 0x20} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtDomainAddressWrite) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtDomainAddressWrite) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtDomainAddressWrite) GetParent() ApduDataExt { +func (m *_ApduDataExtDomainAddressWrite) GetParent() ApduDataExt { return m._ApduDataExt } + // NewApduDataExtDomainAddressWrite factory function for _ApduDataExtDomainAddressWrite -func NewApduDataExtDomainAddressWrite(length uint8) *_ApduDataExtDomainAddressWrite { +func NewApduDataExtDomainAddressWrite( length uint8 ) *_ApduDataExtDomainAddressWrite { _result := &_ApduDataExtDomainAddressWrite{ - _ApduDataExt: NewApduDataExt(length), + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataExtDomainAddressWrite(length uint8) *_ApduDataExtDomainAddressWr // Deprecated: use the interface for direct cast func CastApduDataExtDomainAddressWrite(structType interface{}) ApduDataExtDomainAddressWrite { - if casted, ok := structType.(ApduDataExtDomainAddressWrite); ok { + if casted, ok := structType.(ApduDataExtDomainAddressWrite); ok { return casted } if casted, ok := structType.(*ApduDataExtDomainAddressWrite); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataExtDomainAddressWrite) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_ApduDataExtDomainAddressWrite) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataExtDomainAddressWrite) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtDomainAddressWrite) isApduDataExtDomainAddressWrite() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataExtDomainAddressWrite) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtFileStreamInfoReport.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtFileStreamInfoReport.go index e1aa6061dd0..8c197338cd0 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtFileStreamInfoReport.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtFileStreamInfoReport.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtFileStreamInfoReport is the corresponding interface of ApduDataExtFileStreamInfoReport type ApduDataExtFileStreamInfoReport interface { @@ -46,30 +48,32 @@ type _ApduDataExtFileStreamInfoReport struct { *_ApduDataExt } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtFileStreamInfoReport) GetExtApciType() uint8 { - return 0x30 -} +func (m *_ApduDataExtFileStreamInfoReport) GetExtApciType() uint8 { +return 0x30} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtFileStreamInfoReport) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtFileStreamInfoReport) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtFileStreamInfoReport) GetParent() ApduDataExt { +func (m *_ApduDataExtFileStreamInfoReport) GetParent() ApduDataExt { return m._ApduDataExt } + // NewApduDataExtFileStreamInfoReport factory function for _ApduDataExtFileStreamInfoReport -func NewApduDataExtFileStreamInfoReport(length uint8) *_ApduDataExtFileStreamInfoReport { +func NewApduDataExtFileStreamInfoReport( length uint8 ) *_ApduDataExtFileStreamInfoReport { _result := &_ApduDataExtFileStreamInfoReport{ - _ApduDataExt: NewApduDataExt(length), + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataExtFileStreamInfoReport(length uint8) *_ApduDataExtFileStreamInf // Deprecated: use the interface for direct cast func CastApduDataExtFileStreamInfoReport(structType interface{}) ApduDataExtFileStreamInfoReport { - if casted, ok := structType.(ApduDataExtFileStreamInfoReport); ok { + if casted, ok := structType.(ApduDataExtFileStreamInfoReport); ok { return casted } if casted, ok := structType.(*ApduDataExtFileStreamInfoReport); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataExtFileStreamInfoReport) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_ApduDataExtFileStreamInfoReport) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataExtFileStreamInfoReport) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtFileStreamInfoReport) isApduDataExtFileStreamInfoReport() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataExtFileStreamInfoReport) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtGroupPropertyValueInfoReport.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtGroupPropertyValueInfoReport.go index be6775b3644..8ba1126d1d9 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtGroupPropertyValueInfoReport.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtGroupPropertyValueInfoReport.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtGroupPropertyValueInfoReport is the corresponding interface of ApduDataExtGroupPropertyValueInfoReport type ApduDataExtGroupPropertyValueInfoReport interface { @@ -46,30 +48,32 @@ type _ApduDataExtGroupPropertyValueInfoReport struct { *_ApduDataExt } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtGroupPropertyValueInfoReport) GetExtApciType() uint8 { - return 0x2B -} +func (m *_ApduDataExtGroupPropertyValueInfoReport) GetExtApciType() uint8 { +return 0x2B} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtGroupPropertyValueInfoReport) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtGroupPropertyValueInfoReport) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtGroupPropertyValueInfoReport) GetParent() ApduDataExt { +func (m *_ApduDataExtGroupPropertyValueInfoReport) GetParent() ApduDataExt { return m._ApduDataExt } + // NewApduDataExtGroupPropertyValueInfoReport factory function for _ApduDataExtGroupPropertyValueInfoReport -func NewApduDataExtGroupPropertyValueInfoReport(length uint8) *_ApduDataExtGroupPropertyValueInfoReport { +func NewApduDataExtGroupPropertyValueInfoReport( length uint8 ) *_ApduDataExtGroupPropertyValueInfoReport { _result := &_ApduDataExtGroupPropertyValueInfoReport{ - _ApduDataExt: NewApduDataExt(length), + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataExtGroupPropertyValueInfoReport(length uint8) *_ApduDataExtGroup // Deprecated: use the interface for direct cast func CastApduDataExtGroupPropertyValueInfoReport(structType interface{}) ApduDataExtGroupPropertyValueInfoReport { - if casted, ok := structType.(ApduDataExtGroupPropertyValueInfoReport); ok { + if casted, ok := structType.(ApduDataExtGroupPropertyValueInfoReport); ok { return casted } if casted, ok := structType.(*ApduDataExtGroupPropertyValueInfoReport); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataExtGroupPropertyValueInfoReport) GetLengthInBits(ctx context.C return lengthInBits } + func (m *_ApduDataExtGroupPropertyValueInfoReport) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataExtGroupPropertyValueInfoReport) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtGroupPropertyValueInfoReport) isApduDataExtGroupPropertyValueInfoReport() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataExtGroupPropertyValueInfoReport) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtGroupPropertyValueRead.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtGroupPropertyValueRead.go index 29943fa0b2d..13992a83bc2 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtGroupPropertyValueRead.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtGroupPropertyValueRead.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtGroupPropertyValueRead is the corresponding interface of ApduDataExtGroupPropertyValueRead type ApduDataExtGroupPropertyValueRead interface { @@ -46,30 +48,32 @@ type _ApduDataExtGroupPropertyValueRead struct { *_ApduDataExt } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtGroupPropertyValueRead) GetExtApciType() uint8 { - return 0x28 -} +func (m *_ApduDataExtGroupPropertyValueRead) GetExtApciType() uint8 { +return 0x28} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtGroupPropertyValueRead) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtGroupPropertyValueRead) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtGroupPropertyValueRead) GetParent() ApduDataExt { +func (m *_ApduDataExtGroupPropertyValueRead) GetParent() ApduDataExt { return m._ApduDataExt } + // NewApduDataExtGroupPropertyValueRead factory function for _ApduDataExtGroupPropertyValueRead -func NewApduDataExtGroupPropertyValueRead(length uint8) *_ApduDataExtGroupPropertyValueRead { +func NewApduDataExtGroupPropertyValueRead( length uint8 ) *_ApduDataExtGroupPropertyValueRead { _result := &_ApduDataExtGroupPropertyValueRead{ - _ApduDataExt: NewApduDataExt(length), + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataExtGroupPropertyValueRead(length uint8) *_ApduDataExtGroupProper // Deprecated: use the interface for direct cast func CastApduDataExtGroupPropertyValueRead(structType interface{}) ApduDataExtGroupPropertyValueRead { - if casted, ok := structType.(ApduDataExtGroupPropertyValueRead); ok { + if casted, ok := structType.(ApduDataExtGroupPropertyValueRead); ok { return casted } if casted, ok := structType.(*ApduDataExtGroupPropertyValueRead); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataExtGroupPropertyValueRead) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_ApduDataExtGroupPropertyValueRead) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataExtGroupPropertyValueRead) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtGroupPropertyValueRead) isApduDataExtGroupPropertyValueRead() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataExtGroupPropertyValueRead) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtGroupPropertyValueResponse.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtGroupPropertyValueResponse.go index 3e8c0eab390..67d481094ee 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtGroupPropertyValueResponse.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtGroupPropertyValueResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtGroupPropertyValueResponse is the corresponding interface of ApduDataExtGroupPropertyValueResponse type ApduDataExtGroupPropertyValueResponse interface { @@ -46,30 +48,32 @@ type _ApduDataExtGroupPropertyValueResponse struct { *_ApduDataExt } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtGroupPropertyValueResponse) GetExtApciType() uint8 { - return 0x29 -} +func (m *_ApduDataExtGroupPropertyValueResponse) GetExtApciType() uint8 { +return 0x29} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtGroupPropertyValueResponse) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtGroupPropertyValueResponse) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtGroupPropertyValueResponse) GetParent() ApduDataExt { +func (m *_ApduDataExtGroupPropertyValueResponse) GetParent() ApduDataExt { return m._ApduDataExt } + // NewApduDataExtGroupPropertyValueResponse factory function for _ApduDataExtGroupPropertyValueResponse -func NewApduDataExtGroupPropertyValueResponse(length uint8) *_ApduDataExtGroupPropertyValueResponse { +func NewApduDataExtGroupPropertyValueResponse( length uint8 ) *_ApduDataExtGroupPropertyValueResponse { _result := &_ApduDataExtGroupPropertyValueResponse{ - _ApduDataExt: NewApduDataExt(length), + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataExtGroupPropertyValueResponse(length uint8) *_ApduDataExtGroupPr // Deprecated: use the interface for direct cast func CastApduDataExtGroupPropertyValueResponse(structType interface{}) ApduDataExtGroupPropertyValueResponse { - if casted, ok := structType.(ApduDataExtGroupPropertyValueResponse); ok { + if casted, ok := structType.(ApduDataExtGroupPropertyValueResponse); ok { return casted } if casted, ok := structType.(*ApduDataExtGroupPropertyValueResponse); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataExtGroupPropertyValueResponse) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_ApduDataExtGroupPropertyValueResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataExtGroupPropertyValueResponse) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtGroupPropertyValueResponse) isApduDataExtGroupPropertyValueResponse() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataExtGroupPropertyValueResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtGroupPropertyValueWrite.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtGroupPropertyValueWrite.go index a63e3b306c2..df0e18cd533 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtGroupPropertyValueWrite.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtGroupPropertyValueWrite.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtGroupPropertyValueWrite is the corresponding interface of ApduDataExtGroupPropertyValueWrite type ApduDataExtGroupPropertyValueWrite interface { @@ -46,30 +48,32 @@ type _ApduDataExtGroupPropertyValueWrite struct { *_ApduDataExt } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtGroupPropertyValueWrite) GetExtApciType() uint8 { - return 0x2A -} +func (m *_ApduDataExtGroupPropertyValueWrite) GetExtApciType() uint8 { +return 0x2A} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtGroupPropertyValueWrite) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtGroupPropertyValueWrite) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtGroupPropertyValueWrite) GetParent() ApduDataExt { +func (m *_ApduDataExtGroupPropertyValueWrite) GetParent() ApduDataExt { return m._ApduDataExt } + // NewApduDataExtGroupPropertyValueWrite factory function for _ApduDataExtGroupPropertyValueWrite -func NewApduDataExtGroupPropertyValueWrite(length uint8) *_ApduDataExtGroupPropertyValueWrite { +func NewApduDataExtGroupPropertyValueWrite( length uint8 ) *_ApduDataExtGroupPropertyValueWrite { _result := &_ApduDataExtGroupPropertyValueWrite{ - _ApduDataExt: NewApduDataExt(length), + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataExtGroupPropertyValueWrite(length uint8) *_ApduDataExtGroupPrope // Deprecated: use the interface for direct cast func CastApduDataExtGroupPropertyValueWrite(structType interface{}) ApduDataExtGroupPropertyValueWrite { - if casted, ok := structType.(ApduDataExtGroupPropertyValueWrite); ok { + if casted, ok := structType.(ApduDataExtGroupPropertyValueWrite); ok { return casted } if casted, ok := structType.(*ApduDataExtGroupPropertyValueWrite); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataExtGroupPropertyValueWrite) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_ApduDataExtGroupPropertyValueWrite) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataExtGroupPropertyValueWrite) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtGroupPropertyValueWrite) isApduDataExtGroupPropertyValueWrite() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataExtGroupPropertyValueWrite) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtIndividualAddressSerialNumberRead.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtIndividualAddressSerialNumberRead.go index 2f5bd188812..112a4f7a3f7 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtIndividualAddressSerialNumberRead.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtIndividualAddressSerialNumberRead.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtIndividualAddressSerialNumberRead is the corresponding interface of ApduDataExtIndividualAddressSerialNumberRead type ApduDataExtIndividualAddressSerialNumberRead interface { @@ -46,30 +48,32 @@ type _ApduDataExtIndividualAddressSerialNumberRead struct { *_ApduDataExt } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtIndividualAddressSerialNumberRead) GetExtApciType() uint8 { - return 0x1C -} +func (m *_ApduDataExtIndividualAddressSerialNumberRead) GetExtApciType() uint8 { +return 0x1C} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtIndividualAddressSerialNumberRead) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtIndividualAddressSerialNumberRead) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtIndividualAddressSerialNumberRead) GetParent() ApduDataExt { +func (m *_ApduDataExtIndividualAddressSerialNumberRead) GetParent() ApduDataExt { return m._ApduDataExt } + // NewApduDataExtIndividualAddressSerialNumberRead factory function for _ApduDataExtIndividualAddressSerialNumberRead -func NewApduDataExtIndividualAddressSerialNumberRead(length uint8) *_ApduDataExtIndividualAddressSerialNumberRead { +func NewApduDataExtIndividualAddressSerialNumberRead( length uint8 ) *_ApduDataExtIndividualAddressSerialNumberRead { _result := &_ApduDataExtIndividualAddressSerialNumberRead{ - _ApduDataExt: NewApduDataExt(length), + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataExtIndividualAddressSerialNumberRead(length uint8) *_ApduDataExt // Deprecated: use the interface for direct cast func CastApduDataExtIndividualAddressSerialNumberRead(structType interface{}) ApduDataExtIndividualAddressSerialNumberRead { - if casted, ok := structType.(ApduDataExtIndividualAddressSerialNumberRead); ok { + if casted, ok := structType.(ApduDataExtIndividualAddressSerialNumberRead); ok { return casted } if casted, ok := structType.(*ApduDataExtIndividualAddressSerialNumberRead); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataExtIndividualAddressSerialNumberRead) GetLengthInBits(ctx cont return lengthInBits } + func (m *_ApduDataExtIndividualAddressSerialNumberRead) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataExtIndividualAddressSerialNumberRead) SerializeWithWriteBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtIndividualAddressSerialNumberRead) isApduDataExtIndividualAddressSerialNumberRead() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataExtIndividualAddressSerialNumberRead) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtIndividualAddressSerialNumberResponse.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtIndividualAddressSerialNumberResponse.go index af65e193b0d..c1d594b5e31 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtIndividualAddressSerialNumberResponse.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtIndividualAddressSerialNumberResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtIndividualAddressSerialNumberResponse is the corresponding interface of ApduDataExtIndividualAddressSerialNumberResponse type ApduDataExtIndividualAddressSerialNumberResponse interface { @@ -46,30 +48,32 @@ type _ApduDataExtIndividualAddressSerialNumberResponse struct { *_ApduDataExt } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtIndividualAddressSerialNumberResponse) GetExtApciType() uint8 { - return 0x1D -} +func (m *_ApduDataExtIndividualAddressSerialNumberResponse) GetExtApciType() uint8 { +return 0x1D} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtIndividualAddressSerialNumberResponse) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtIndividualAddressSerialNumberResponse) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtIndividualAddressSerialNumberResponse) GetParent() ApduDataExt { +func (m *_ApduDataExtIndividualAddressSerialNumberResponse) GetParent() ApduDataExt { return m._ApduDataExt } + // NewApduDataExtIndividualAddressSerialNumberResponse factory function for _ApduDataExtIndividualAddressSerialNumberResponse -func NewApduDataExtIndividualAddressSerialNumberResponse(length uint8) *_ApduDataExtIndividualAddressSerialNumberResponse { +func NewApduDataExtIndividualAddressSerialNumberResponse( length uint8 ) *_ApduDataExtIndividualAddressSerialNumberResponse { _result := &_ApduDataExtIndividualAddressSerialNumberResponse{ - _ApduDataExt: NewApduDataExt(length), + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataExtIndividualAddressSerialNumberResponse(length uint8) *_ApduDat // Deprecated: use the interface for direct cast func CastApduDataExtIndividualAddressSerialNumberResponse(structType interface{}) ApduDataExtIndividualAddressSerialNumberResponse { - if casted, ok := structType.(ApduDataExtIndividualAddressSerialNumberResponse); ok { + if casted, ok := structType.(ApduDataExtIndividualAddressSerialNumberResponse); ok { return casted } if casted, ok := structType.(*ApduDataExtIndividualAddressSerialNumberResponse); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataExtIndividualAddressSerialNumberResponse) GetLengthInBits(ctx return lengthInBits } + func (m *_ApduDataExtIndividualAddressSerialNumberResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataExtIndividualAddressSerialNumberResponse) SerializeWithWriteBu return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtIndividualAddressSerialNumberResponse) isApduDataExtIndividualAddressSerialNumberResponse() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataExtIndividualAddressSerialNumberResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtIndividualAddressSerialNumberWrite.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtIndividualAddressSerialNumberWrite.go index 81912a41b28..b946acdb6a7 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtIndividualAddressSerialNumberWrite.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtIndividualAddressSerialNumberWrite.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtIndividualAddressSerialNumberWrite is the corresponding interface of ApduDataExtIndividualAddressSerialNumberWrite type ApduDataExtIndividualAddressSerialNumberWrite interface { @@ -46,30 +48,32 @@ type _ApduDataExtIndividualAddressSerialNumberWrite struct { *_ApduDataExt } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtIndividualAddressSerialNumberWrite) GetExtApciType() uint8 { - return 0x1E -} +func (m *_ApduDataExtIndividualAddressSerialNumberWrite) GetExtApciType() uint8 { +return 0x1E} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtIndividualAddressSerialNumberWrite) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtIndividualAddressSerialNumberWrite) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtIndividualAddressSerialNumberWrite) GetParent() ApduDataExt { +func (m *_ApduDataExtIndividualAddressSerialNumberWrite) GetParent() ApduDataExt { return m._ApduDataExt } + // NewApduDataExtIndividualAddressSerialNumberWrite factory function for _ApduDataExtIndividualAddressSerialNumberWrite -func NewApduDataExtIndividualAddressSerialNumberWrite(length uint8) *_ApduDataExtIndividualAddressSerialNumberWrite { +func NewApduDataExtIndividualAddressSerialNumberWrite( length uint8 ) *_ApduDataExtIndividualAddressSerialNumberWrite { _result := &_ApduDataExtIndividualAddressSerialNumberWrite{ - _ApduDataExt: NewApduDataExt(length), + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataExtIndividualAddressSerialNumberWrite(length uint8) *_ApduDataEx // Deprecated: use the interface for direct cast func CastApduDataExtIndividualAddressSerialNumberWrite(structType interface{}) ApduDataExtIndividualAddressSerialNumberWrite { - if casted, ok := structType.(ApduDataExtIndividualAddressSerialNumberWrite); ok { + if casted, ok := structType.(ApduDataExtIndividualAddressSerialNumberWrite); ok { return casted } if casted, ok := structType.(*ApduDataExtIndividualAddressSerialNumberWrite); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataExtIndividualAddressSerialNumberWrite) GetLengthInBits(ctx con return lengthInBits } + func (m *_ApduDataExtIndividualAddressSerialNumberWrite) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataExtIndividualAddressSerialNumberWrite) SerializeWithWriteBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtIndividualAddressSerialNumberWrite) isApduDataExtIndividualAddressSerialNumberWrite() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataExtIndividualAddressSerialNumberWrite) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtKeyResponse.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtKeyResponse.go index 348e2bcf0f5..312d4b76938 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtKeyResponse.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtKeyResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtKeyResponse is the corresponding interface of ApduDataExtKeyResponse type ApduDataExtKeyResponse interface { @@ -46,30 +48,32 @@ type _ApduDataExtKeyResponse struct { *_ApduDataExt } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtKeyResponse) GetExtApciType() uint8 { - return 0x14 -} +func (m *_ApduDataExtKeyResponse) GetExtApciType() uint8 { +return 0x14} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtKeyResponse) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtKeyResponse) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtKeyResponse) GetParent() ApduDataExt { +func (m *_ApduDataExtKeyResponse) GetParent() ApduDataExt { return m._ApduDataExt } + // NewApduDataExtKeyResponse factory function for _ApduDataExtKeyResponse -func NewApduDataExtKeyResponse(length uint8) *_ApduDataExtKeyResponse { +func NewApduDataExtKeyResponse( length uint8 ) *_ApduDataExtKeyResponse { _result := &_ApduDataExtKeyResponse{ - _ApduDataExt: NewApduDataExt(length), + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataExtKeyResponse(length uint8) *_ApduDataExtKeyResponse { // Deprecated: use the interface for direct cast func CastApduDataExtKeyResponse(structType interface{}) ApduDataExtKeyResponse { - if casted, ok := structType.(ApduDataExtKeyResponse); ok { + if casted, ok := structType.(ApduDataExtKeyResponse); ok { return casted } if casted, ok := structType.(*ApduDataExtKeyResponse); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataExtKeyResponse) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_ApduDataExtKeyResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataExtKeyResponse) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtKeyResponse) isApduDataExtKeyResponse() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataExtKeyResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtKeyWrite.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtKeyWrite.go index 5c24ea8a890..383c03d469f 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtKeyWrite.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtKeyWrite.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtKeyWrite is the corresponding interface of ApduDataExtKeyWrite type ApduDataExtKeyWrite interface { @@ -46,30 +48,32 @@ type _ApduDataExtKeyWrite struct { *_ApduDataExt } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtKeyWrite) GetExtApciType() uint8 { - return 0x13 -} +func (m *_ApduDataExtKeyWrite) GetExtApciType() uint8 { +return 0x13} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtKeyWrite) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtKeyWrite) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtKeyWrite) GetParent() ApduDataExt { +func (m *_ApduDataExtKeyWrite) GetParent() ApduDataExt { return m._ApduDataExt } + // NewApduDataExtKeyWrite factory function for _ApduDataExtKeyWrite -func NewApduDataExtKeyWrite(length uint8) *_ApduDataExtKeyWrite { +func NewApduDataExtKeyWrite( length uint8 ) *_ApduDataExtKeyWrite { _result := &_ApduDataExtKeyWrite{ - _ApduDataExt: NewApduDataExt(length), + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataExtKeyWrite(length uint8) *_ApduDataExtKeyWrite { // Deprecated: use the interface for direct cast func CastApduDataExtKeyWrite(structType interface{}) ApduDataExtKeyWrite { - if casted, ok := structType.(ApduDataExtKeyWrite); ok { + if casted, ok := structType.(ApduDataExtKeyWrite); ok { return casted } if casted, ok := structType.(*ApduDataExtKeyWrite); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataExtKeyWrite) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_ApduDataExtKeyWrite) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataExtKeyWrite) SerializeWithWriteBuffer(ctx context.Context, wri return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtKeyWrite) isApduDataExtKeyWrite() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataExtKeyWrite) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtLinkRead.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtLinkRead.go index 51b7f449a68..ca3fd3b6240 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtLinkRead.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtLinkRead.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtLinkRead is the corresponding interface of ApduDataExtLinkRead type ApduDataExtLinkRead interface { @@ -46,30 +48,32 @@ type _ApduDataExtLinkRead struct { *_ApduDataExt } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtLinkRead) GetExtApciType() uint8 { - return 0x25 -} +func (m *_ApduDataExtLinkRead) GetExtApciType() uint8 { +return 0x25} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtLinkRead) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtLinkRead) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtLinkRead) GetParent() ApduDataExt { +func (m *_ApduDataExtLinkRead) GetParent() ApduDataExt { return m._ApduDataExt } + // NewApduDataExtLinkRead factory function for _ApduDataExtLinkRead -func NewApduDataExtLinkRead(length uint8) *_ApduDataExtLinkRead { +func NewApduDataExtLinkRead( length uint8 ) *_ApduDataExtLinkRead { _result := &_ApduDataExtLinkRead{ - _ApduDataExt: NewApduDataExt(length), + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataExtLinkRead(length uint8) *_ApduDataExtLinkRead { // Deprecated: use the interface for direct cast func CastApduDataExtLinkRead(structType interface{}) ApduDataExtLinkRead { - if casted, ok := structType.(ApduDataExtLinkRead); ok { + if casted, ok := structType.(ApduDataExtLinkRead); ok { return casted } if casted, ok := structType.(*ApduDataExtLinkRead); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataExtLinkRead) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_ApduDataExtLinkRead) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataExtLinkRead) SerializeWithWriteBuffer(ctx context.Context, wri return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtLinkRead) isApduDataExtLinkRead() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataExtLinkRead) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtLinkResponse.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtLinkResponse.go index 1c64d212a51..d872692be1e 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtLinkResponse.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtLinkResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtLinkResponse is the corresponding interface of ApduDataExtLinkResponse type ApduDataExtLinkResponse interface { @@ -46,30 +48,32 @@ type _ApduDataExtLinkResponse struct { *_ApduDataExt } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtLinkResponse) GetExtApciType() uint8 { - return 0x26 -} +func (m *_ApduDataExtLinkResponse) GetExtApciType() uint8 { +return 0x26} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtLinkResponse) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtLinkResponse) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtLinkResponse) GetParent() ApduDataExt { +func (m *_ApduDataExtLinkResponse) GetParent() ApduDataExt { return m._ApduDataExt } + // NewApduDataExtLinkResponse factory function for _ApduDataExtLinkResponse -func NewApduDataExtLinkResponse(length uint8) *_ApduDataExtLinkResponse { +func NewApduDataExtLinkResponse( length uint8 ) *_ApduDataExtLinkResponse { _result := &_ApduDataExtLinkResponse{ - _ApduDataExt: NewApduDataExt(length), + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataExtLinkResponse(length uint8) *_ApduDataExtLinkResponse { // Deprecated: use the interface for direct cast func CastApduDataExtLinkResponse(structType interface{}) ApduDataExtLinkResponse { - if casted, ok := structType.(ApduDataExtLinkResponse); ok { + if casted, ok := structType.(ApduDataExtLinkResponse); ok { return casted } if casted, ok := structType.(*ApduDataExtLinkResponse); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataExtLinkResponse) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_ApduDataExtLinkResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataExtLinkResponse) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtLinkResponse) isApduDataExtLinkResponse() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataExtLinkResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtLinkWrite.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtLinkWrite.go index 349ace1b340..eddfb175bf2 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtLinkWrite.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtLinkWrite.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtLinkWrite is the corresponding interface of ApduDataExtLinkWrite type ApduDataExtLinkWrite interface { @@ -46,30 +48,32 @@ type _ApduDataExtLinkWrite struct { *_ApduDataExt } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtLinkWrite) GetExtApciType() uint8 { - return 0x27 -} +func (m *_ApduDataExtLinkWrite) GetExtApciType() uint8 { +return 0x27} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtLinkWrite) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtLinkWrite) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtLinkWrite) GetParent() ApduDataExt { +func (m *_ApduDataExtLinkWrite) GetParent() ApduDataExt { return m._ApduDataExt } + // NewApduDataExtLinkWrite factory function for _ApduDataExtLinkWrite -func NewApduDataExtLinkWrite(length uint8) *_ApduDataExtLinkWrite { +func NewApduDataExtLinkWrite( length uint8 ) *_ApduDataExtLinkWrite { _result := &_ApduDataExtLinkWrite{ - _ApduDataExt: NewApduDataExt(length), + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataExtLinkWrite(length uint8) *_ApduDataExtLinkWrite { // Deprecated: use the interface for direct cast func CastApduDataExtLinkWrite(structType interface{}) ApduDataExtLinkWrite { - if casted, ok := structType.(ApduDataExtLinkWrite); ok { + if casted, ok := structType.(ApduDataExtLinkWrite); ok { return casted } if casted, ok := structType.(*ApduDataExtLinkWrite); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataExtLinkWrite) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_ApduDataExtLinkWrite) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataExtLinkWrite) SerializeWithWriteBuffer(ctx context.Context, wr return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtLinkWrite) isApduDataExtLinkWrite() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataExtLinkWrite) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtMemoryBitWrite.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtMemoryBitWrite.go index 0f7bc4f1bde..dc96188611d 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtMemoryBitWrite.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtMemoryBitWrite.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtMemoryBitWrite is the corresponding interface of ApduDataExtMemoryBitWrite type ApduDataExtMemoryBitWrite interface { @@ -46,30 +48,32 @@ type _ApduDataExtMemoryBitWrite struct { *_ApduDataExt } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtMemoryBitWrite) GetExtApciType() uint8 { - return 0x10 -} +func (m *_ApduDataExtMemoryBitWrite) GetExtApciType() uint8 { +return 0x10} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtMemoryBitWrite) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtMemoryBitWrite) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtMemoryBitWrite) GetParent() ApduDataExt { +func (m *_ApduDataExtMemoryBitWrite) GetParent() ApduDataExt { return m._ApduDataExt } + // NewApduDataExtMemoryBitWrite factory function for _ApduDataExtMemoryBitWrite -func NewApduDataExtMemoryBitWrite(length uint8) *_ApduDataExtMemoryBitWrite { +func NewApduDataExtMemoryBitWrite( length uint8 ) *_ApduDataExtMemoryBitWrite { _result := &_ApduDataExtMemoryBitWrite{ - _ApduDataExt: NewApduDataExt(length), + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataExtMemoryBitWrite(length uint8) *_ApduDataExtMemoryBitWrite { // Deprecated: use the interface for direct cast func CastApduDataExtMemoryBitWrite(structType interface{}) ApduDataExtMemoryBitWrite { - if casted, ok := structType.(ApduDataExtMemoryBitWrite); ok { + if casted, ok := structType.(ApduDataExtMemoryBitWrite); ok { return casted } if casted, ok := structType.(*ApduDataExtMemoryBitWrite); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataExtMemoryBitWrite) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_ApduDataExtMemoryBitWrite) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataExtMemoryBitWrite) SerializeWithWriteBuffer(ctx context.Contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtMemoryBitWrite) isApduDataExtMemoryBitWrite() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataExtMemoryBitWrite) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtNetworkParameterRead.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtNetworkParameterRead.go index 6b6b04467d1..ff380dde634 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtNetworkParameterRead.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtNetworkParameterRead.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtNetworkParameterRead is the corresponding interface of ApduDataExtNetworkParameterRead type ApduDataExtNetworkParameterRead interface { @@ -46,30 +48,32 @@ type _ApduDataExtNetworkParameterRead struct { *_ApduDataExt } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtNetworkParameterRead) GetExtApciType() uint8 { - return 0x1A -} +func (m *_ApduDataExtNetworkParameterRead) GetExtApciType() uint8 { +return 0x1A} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtNetworkParameterRead) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtNetworkParameterRead) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtNetworkParameterRead) GetParent() ApduDataExt { +func (m *_ApduDataExtNetworkParameterRead) GetParent() ApduDataExt { return m._ApduDataExt } + // NewApduDataExtNetworkParameterRead factory function for _ApduDataExtNetworkParameterRead -func NewApduDataExtNetworkParameterRead(length uint8) *_ApduDataExtNetworkParameterRead { +func NewApduDataExtNetworkParameterRead( length uint8 ) *_ApduDataExtNetworkParameterRead { _result := &_ApduDataExtNetworkParameterRead{ - _ApduDataExt: NewApduDataExt(length), + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataExtNetworkParameterRead(length uint8) *_ApduDataExtNetworkParame // Deprecated: use the interface for direct cast func CastApduDataExtNetworkParameterRead(structType interface{}) ApduDataExtNetworkParameterRead { - if casted, ok := structType.(ApduDataExtNetworkParameterRead); ok { + if casted, ok := structType.(ApduDataExtNetworkParameterRead); ok { return casted } if casted, ok := structType.(*ApduDataExtNetworkParameterRead); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataExtNetworkParameterRead) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_ApduDataExtNetworkParameterRead) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataExtNetworkParameterRead) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtNetworkParameterRead) isApduDataExtNetworkParameterRead() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataExtNetworkParameterRead) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtNetworkParameterResponse.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtNetworkParameterResponse.go index 56b12f28d1b..74dd59b2a9c 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtNetworkParameterResponse.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtNetworkParameterResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtNetworkParameterResponse is the corresponding interface of ApduDataExtNetworkParameterResponse type ApduDataExtNetworkParameterResponse interface { @@ -46,30 +48,32 @@ type _ApduDataExtNetworkParameterResponse struct { *_ApduDataExt } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtNetworkParameterResponse) GetExtApciType() uint8 { - return 0x1B -} +func (m *_ApduDataExtNetworkParameterResponse) GetExtApciType() uint8 { +return 0x1B} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtNetworkParameterResponse) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtNetworkParameterResponse) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtNetworkParameterResponse) GetParent() ApduDataExt { +func (m *_ApduDataExtNetworkParameterResponse) GetParent() ApduDataExt { return m._ApduDataExt } + // NewApduDataExtNetworkParameterResponse factory function for _ApduDataExtNetworkParameterResponse -func NewApduDataExtNetworkParameterResponse(length uint8) *_ApduDataExtNetworkParameterResponse { +func NewApduDataExtNetworkParameterResponse( length uint8 ) *_ApduDataExtNetworkParameterResponse { _result := &_ApduDataExtNetworkParameterResponse{ - _ApduDataExt: NewApduDataExt(length), + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataExtNetworkParameterResponse(length uint8) *_ApduDataExtNetworkPa // Deprecated: use the interface for direct cast func CastApduDataExtNetworkParameterResponse(structType interface{}) ApduDataExtNetworkParameterResponse { - if casted, ok := structType.(ApduDataExtNetworkParameterResponse); ok { + if casted, ok := structType.(ApduDataExtNetworkParameterResponse); ok { return casted } if casted, ok := structType.(*ApduDataExtNetworkParameterResponse); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataExtNetworkParameterResponse) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_ApduDataExtNetworkParameterResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataExtNetworkParameterResponse) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtNetworkParameterResponse) isApduDataExtNetworkParameterResponse() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataExtNetworkParameterResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtNetworkParameterWrite.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtNetworkParameterWrite.go index 63864ad2bfe..4cec0c1707c 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtNetworkParameterWrite.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtNetworkParameterWrite.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtNetworkParameterWrite is the corresponding interface of ApduDataExtNetworkParameterWrite type ApduDataExtNetworkParameterWrite interface { @@ -46,30 +48,32 @@ type _ApduDataExtNetworkParameterWrite struct { *_ApduDataExt } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtNetworkParameterWrite) GetExtApciType() uint8 { - return 0x24 -} +func (m *_ApduDataExtNetworkParameterWrite) GetExtApciType() uint8 { +return 0x24} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtNetworkParameterWrite) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtNetworkParameterWrite) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtNetworkParameterWrite) GetParent() ApduDataExt { +func (m *_ApduDataExtNetworkParameterWrite) GetParent() ApduDataExt { return m._ApduDataExt } + // NewApduDataExtNetworkParameterWrite factory function for _ApduDataExtNetworkParameterWrite -func NewApduDataExtNetworkParameterWrite(length uint8) *_ApduDataExtNetworkParameterWrite { +func NewApduDataExtNetworkParameterWrite( length uint8 ) *_ApduDataExtNetworkParameterWrite { _result := &_ApduDataExtNetworkParameterWrite{ - _ApduDataExt: NewApduDataExt(length), + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataExtNetworkParameterWrite(length uint8) *_ApduDataExtNetworkParam // Deprecated: use the interface for direct cast func CastApduDataExtNetworkParameterWrite(structType interface{}) ApduDataExtNetworkParameterWrite { - if casted, ok := structType.(ApduDataExtNetworkParameterWrite); ok { + if casted, ok := structType.(ApduDataExtNetworkParameterWrite); ok { return casted } if casted, ok := structType.(*ApduDataExtNetworkParameterWrite); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataExtNetworkParameterWrite) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_ApduDataExtNetworkParameterWrite) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataExtNetworkParameterWrite) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtNetworkParameterWrite) isApduDataExtNetworkParameterWrite() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataExtNetworkParameterWrite) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtOpenRoutingTableRequest.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtOpenRoutingTableRequest.go index 013be5a5c5c..3ded819da07 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtOpenRoutingTableRequest.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtOpenRoutingTableRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtOpenRoutingTableRequest is the corresponding interface of ApduDataExtOpenRoutingTableRequest type ApduDataExtOpenRoutingTableRequest interface { @@ -46,30 +48,32 @@ type _ApduDataExtOpenRoutingTableRequest struct { *_ApduDataExt } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtOpenRoutingTableRequest) GetExtApciType() uint8 { - return 0x00 -} +func (m *_ApduDataExtOpenRoutingTableRequest) GetExtApciType() uint8 { +return 0x00} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtOpenRoutingTableRequest) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtOpenRoutingTableRequest) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtOpenRoutingTableRequest) GetParent() ApduDataExt { +func (m *_ApduDataExtOpenRoutingTableRequest) GetParent() ApduDataExt { return m._ApduDataExt } + // NewApduDataExtOpenRoutingTableRequest factory function for _ApduDataExtOpenRoutingTableRequest -func NewApduDataExtOpenRoutingTableRequest(length uint8) *_ApduDataExtOpenRoutingTableRequest { +func NewApduDataExtOpenRoutingTableRequest( length uint8 ) *_ApduDataExtOpenRoutingTableRequest { _result := &_ApduDataExtOpenRoutingTableRequest{ - _ApduDataExt: NewApduDataExt(length), + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataExtOpenRoutingTableRequest(length uint8) *_ApduDataExtOpenRoutin // Deprecated: use the interface for direct cast func CastApduDataExtOpenRoutingTableRequest(structType interface{}) ApduDataExtOpenRoutingTableRequest { - if casted, ok := structType.(ApduDataExtOpenRoutingTableRequest); ok { + if casted, ok := structType.(ApduDataExtOpenRoutingTableRequest); ok { return casted } if casted, ok := structType.(*ApduDataExtOpenRoutingTableRequest); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataExtOpenRoutingTableRequest) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_ApduDataExtOpenRoutingTableRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataExtOpenRoutingTableRequest) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtOpenRoutingTableRequest) isApduDataExtOpenRoutingTableRequest() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataExtOpenRoutingTableRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtPropertyDescriptionRead.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtPropertyDescriptionRead.go index fe4c6ce9712..f834debc80c 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtPropertyDescriptionRead.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtPropertyDescriptionRead.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtPropertyDescriptionRead is the corresponding interface of ApduDataExtPropertyDescriptionRead type ApduDataExtPropertyDescriptionRead interface { @@ -50,31 +52,31 @@ type ApduDataExtPropertyDescriptionReadExactly interface { // _ApduDataExtPropertyDescriptionRead is the data-structure of this message type _ApduDataExtPropertyDescriptionRead struct { *_ApduDataExt - ObjectIndex uint8 - PropertyId uint8 - Index uint8 + ObjectIndex uint8 + PropertyId uint8 + Index uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtPropertyDescriptionRead) GetExtApciType() uint8 { - return 0x18 -} +func (m *_ApduDataExtPropertyDescriptionRead) GetExtApciType() uint8 { +return 0x18} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtPropertyDescriptionRead) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtPropertyDescriptionRead) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtPropertyDescriptionRead) GetParent() ApduDataExt { +func (m *_ApduDataExtPropertyDescriptionRead) GetParent() ApduDataExt { return m._ApduDataExt } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -97,13 +99,14 @@ func (m *_ApduDataExtPropertyDescriptionRead) GetIndex() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewApduDataExtPropertyDescriptionRead factory function for _ApduDataExtPropertyDescriptionRead -func NewApduDataExtPropertyDescriptionRead(objectIndex uint8, propertyId uint8, index uint8, length uint8) *_ApduDataExtPropertyDescriptionRead { +func NewApduDataExtPropertyDescriptionRead( objectIndex uint8 , propertyId uint8 , index uint8 , length uint8 ) *_ApduDataExtPropertyDescriptionRead { _result := &_ApduDataExtPropertyDescriptionRead{ - ObjectIndex: objectIndex, - PropertyId: propertyId, - Index: index, - _ApduDataExt: NewApduDataExt(length), + ObjectIndex: objectIndex, + PropertyId: propertyId, + Index: index, + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -111,7 +114,7 @@ func NewApduDataExtPropertyDescriptionRead(objectIndex uint8, propertyId uint8, // Deprecated: use the interface for direct cast func CastApduDataExtPropertyDescriptionRead(structType interface{}) ApduDataExtPropertyDescriptionRead { - if casted, ok := structType.(ApduDataExtPropertyDescriptionRead); ok { + if casted, ok := structType.(ApduDataExtPropertyDescriptionRead); ok { return casted } if casted, ok := structType.(*ApduDataExtPropertyDescriptionRead); ok { @@ -128,17 +131,18 @@ func (m *_ApduDataExtPropertyDescriptionRead) GetLengthInBits(ctx context.Contex lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (objectIndex) - lengthInBits += 8 + lengthInBits += 8; // Simple field (propertyId) - lengthInBits += 8 + lengthInBits += 8; // Simple field (index) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_ApduDataExtPropertyDescriptionRead) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -157,21 +161,21 @@ func ApduDataExtPropertyDescriptionReadParseWithBuffer(ctx context.Context, read _ = currentPos // Simple Field (objectIndex) - _objectIndex, _objectIndexErr := readBuffer.ReadUint8("objectIndex", 8) +_objectIndex, _objectIndexErr := readBuffer.ReadUint8("objectIndex", 8) if _objectIndexErr != nil { return nil, errors.Wrap(_objectIndexErr, "Error parsing 'objectIndex' field of ApduDataExtPropertyDescriptionRead") } objectIndex := _objectIndex // Simple Field (propertyId) - _propertyId, _propertyIdErr := readBuffer.ReadUint8("propertyId", 8) +_propertyId, _propertyIdErr := readBuffer.ReadUint8("propertyId", 8) if _propertyIdErr != nil { return nil, errors.Wrap(_propertyIdErr, "Error parsing 'propertyId' field of ApduDataExtPropertyDescriptionRead") } propertyId := _propertyId // Simple Field (index) - _index, _indexErr := readBuffer.ReadUint8("index", 8) +_index, _indexErr := readBuffer.ReadUint8("index", 8) if _indexErr != nil { return nil, errors.Wrap(_indexErr, "Error parsing 'index' field of ApduDataExtPropertyDescriptionRead") } @@ -187,8 +191,8 @@ func ApduDataExtPropertyDescriptionReadParseWithBuffer(ctx context.Context, read Length: length, }, ObjectIndex: objectIndex, - PropertyId: propertyId, - Index: index, + PropertyId: propertyId, + Index: index, } _child._ApduDataExt._ApduDataExtChildRequirements = _child return _child, nil @@ -210,26 +214,26 @@ func (m *_ApduDataExtPropertyDescriptionRead) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for ApduDataExtPropertyDescriptionRead") } - // Simple Field (objectIndex) - objectIndex := uint8(m.GetObjectIndex()) - _objectIndexErr := writeBuffer.WriteUint8("objectIndex", 8, (objectIndex)) - if _objectIndexErr != nil { - return errors.Wrap(_objectIndexErr, "Error serializing 'objectIndex' field") - } + // Simple Field (objectIndex) + objectIndex := uint8(m.GetObjectIndex()) + _objectIndexErr := writeBuffer.WriteUint8("objectIndex", 8, (objectIndex)) + if _objectIndexErr != nil { + return errors.Wrap(_objectIndexErr, "Error serializing 'objectIndex' field") + } - // Simple Field (propertyId) - propertyId := uint8(m.GetPropertyId()) - _propertyIdErr := writeBuffer.WriteUint8("propertyId", 8, (propertyId)) - if _propertyIdErr != nil { - return errors.Wrap(_propertyIdErr, "Error serializing 'propertyId' field") - } + // Simple Field (propertyId) + propertyId := uint8(m.GetPropertyId()) + _propertyIdErr := writeBuffer.WriteUint8("propertyId", 8, (propertyId)) + if _propertyIdErr != nil { + return errors.Wrap(_propertyIdErr, "Error serializing 'propertyId' field") + } - // Simple Field (index) - index := uint8(m.GetIndex()) - _indexErr := writeBuffer.WriteUint8("index", 8, (index)) - if _indexErr != nil { - return errors.Wrap(_indexErr, "Error serializing 'index' field") - } + // Simple Field (index) + index := uint8(m.GetIndex()) + _indexErr := writeBuffer.WriteUint8("index", 8, (index)) + if _indexErr != nil { + return errors.Wrap(_indexErr, "Error serializing 'index' field") + } if popErr := writeBuffer.PopContext("ApduDataExtPropertyDescriptionRead"); popErr != nil { return errors.Wrap(popErr, "Error popping for ApduDataExtPropertyDescriptionRead") @@ -239,6 +243,7 @@ func (m *_ApduDataExtPropertyDescriptionRead) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtPropertyDescriptionRead) isApduDataExtPropertyDescriptionRead() bool { return true } @@ -253,3 +258,6 @@ func (m *_ApduDataExtPropertyDescriptionRead) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtPropertyDescriptionResponse.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtPropertyDescriptionResponse.go index 1b0fa63642d..6cd13d4a692 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtPropertyDescriptionResponse.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtPropertyDescriptionResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtPropertyDescriptionResponse is the corresponding interface of ApduDataExtPropertyDescriptionResponse type ApduDataExtPropertyDescriptionResponse interface { @@ -60,39 +62,39 @@ type ApduDataExtPropertyDescriptionResponseExactly interface { // _ApduDataExtPropertyDescriptionResponse is the data-structure of this message type _ApduDataExtPropertyDescriptionResponse struct { *_ApduDataExt - ObjectIndex uint8 - PropertyId uint8 - Index uint8 - WriteEnabled bool - PropertyDataType KnxPropertyDataType - MaxNrOfElements uint16 - ReadLevel AccessLevel - WriteLevel AccessLevel + ObjectIndex uint8 + PropertyId uint8 + Index uint8 + WriteEnabled bool + PropertyDataType KnxPropertyDataType + MaxNrOfElements uint16 + ReadLevel AccessLevel + WriteLevel AccessLevel // Reserved Fields reservedField0 *uint8 reservedField1 *uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtPropertyDescriptionResponse) GetExtApciType() uint8 { - return 0x19 -} +func (m *_ApduDataExtPropertyDescriptionResponse) GetExtApciType() uint8 { +return 0x19} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtPropertyDescriptionResponse) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtPropertyDescriptionResponse) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtPropertyDescriptionResponse) GetParent() ApduDataExt { +func (m *_ApduDataExtPropertyDescriptionResponse) GetParent() ApduDataExt { return m._ApduDataExt } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -135,18 +137,19 @@ func (m *_ApduDataExtPropertyDescriptionResponse) GetWriteLevel() AccessLevel { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewApduDataExtPropertyDescriptionResponse factory function for _ApduDataExtPropertyDescriptionResponse -func NewApduDataExtPropertyDescriptionResponse(objectIndex uint8, propertyId uint8, index uint8, writeEnabled bool, propertyDataType KnxPropertyDataType, maxNrOfElements uint16, readLevel AccessLevel, writeLevel AccessLevel, length uint8) *_ApduDataExtPropertyDescriptionResponse { +func NewApduDataExtPropertyDescriptionResponse( objectIndex uint8 , propertyId uint8 , index uint8 , writeEnabled bool , propertyDataType KnxPropertyDataType , maxNrOfElements uint16 , readLevel AccessLevel , writeLevel AccessLevel , length uint8 ) *_ApduDataExtPropertyDescriptionResponse { _result := &_ApduDataExtPropertyDescriptionResponse{ - ObjectIndex: objectIndex, - PropertyId: propertyId, - Index: index, - WriteEnabled: writeEnabled, + ObjectIndex: objectIndex, + PropertyId: propertyId, + Index: index, + WriteEnabled: writeEnabled, PropertyDataType: propertyDataType, - MaxNrOfElements: maxNrOfElements, - ReadLevel: readLevel, - WriteLevel: writeLevel, - _ApduDataExt: NewApduDataExt(length), + MaxNrOfElements: maxNrOfElements, + ReadLevel: readLevel, + WriteLevel: writeLevel, + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -154,7 +157,7 @@ func NewApduDataExtPropertyDescriptionResponse(objectIndex uint8, propertyId uin // Deprecated: use the interface for direct cast func CastApduDataExtPropertyDescriptionResponse(structType interface{}) ApduDataExtPropertyDescriptionResponse { - if casted, ok := structType.(ApduDataExtPropertyDescriptionResponse); ok { + if casted, ok := structType.(ApduDataExtPropertyDescriptionResponse); ok { return casted } if casted, ok := structType.(*ApduDataExtPropertyDescriptionResponse); ok { @@ -171,16 +174,16 @@ func (m *_ApduDataExtPropertyDescriptionResponse) GetLengthInBits(ctx context.Co lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (objectIndex) - lengthInBits += 8 + lengthInBits += 8; // Simple field (propertyId) - lengthInBits += 8 + lengthInBits += 8; // Simple field (index) - lengthInBits += 8 + lengthInBits += 8; // Simple field (writeEnabled) - lengthInBits += 1 + lengthInBits += 1; // Reserved Field (reserved) lengthInBits += 1 @@ -192,7 +195,7 @@ func (m *_ApduDataExtPropertyDescriptionResponse) GetLengthInBits(ctx context.Co lengthInBits += 4 // Simple field (maxNrOfElements) - lengthInBits += 12 + lengthInBits += 12; // Simple field (readLevel) lengthInBits += 4 @@ -203,6 +206,7 @@ func (m *_ApduDataExtPropertyDescriptionResponse) GetLengthInBits(ctx context.Co return lengthInBits } + func (m *_ApduDataExtPropertyDescriptionResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -221,28 +225,28 @@ func ApduDataExtPropertyDescriptionResponseParseWithBuffer(ctx context.Context, _ = currentPos // Simple Field (objectIndex) - _objectIndex, _objectIndexErr := readBuffer.ReadUint8("objectIndex", 8) +_objectIndex, _objectIndexErr := readBuffer.ReadUint8("objectIndex", 8) if _objectIndexErr != nil { return nil, errors.Wrap(_objectIndexErr, "Error parsing 'objectIndex' field of ApduDataExtPropertyDescriptionResponse") } objectIndex := _objectIndex // Simple Field (propertyId) - _propertyId, _propertyIdErr := readBuffer.ReadUint8("propertyId", 8) +_propertyId, _propertyIdErr := readBuffer.ReadUint8("propertyId", 8) if _propertyIdErr != nil { return nil, errors.Wrap(_propertyIdErr, "Error parsing 'propertyId' field of ApduDataExtPropertyDescriptionResponse") } propertyId := _propertyId // Simple Field (index) - _index, _indexErr := readBuffer.ReadUint8("index", 8) +_index, _indexErr := readBuffer.ReadUint8("index", 8) if _indexErr != nil { return nil, errors.Wrap(_indexErr, "Error parsing 'index' field of ApduDataExtPropertyDescriptionResponse") } index := _index // Simple Field (writeEnabled) - _writeEnabled, _writeEnabledErr := readBuffer.ReadBit("writeEnabled") +_writeEnabled, _writeEnabledErr := readBuffer.ReadBit("writeEnabled") if _writeEnabledErr != nil { return nil, errors.Wrap(_writeEnabledErr, "Error parsing 'writeEnabled' field of ApduDataExtPropertyDescriptionResponse") } @@ -258,7 +262,7 @@ func ApduDataExtPropertyDescriptionResponseParseWithBuffer(ctx context.Context, if reserved != uint8(0x0) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x0), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -269,7 +273,7 @@ func ApduDataExtPropertyDescriptionResponseParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("propertyDataType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for propertyDataType") } - _propertyDataType, _propertyDataTypeErr := KnxPropertyDataTypeParseWithBuffer(ctx, readBuffer) +_propertyDataType, _propertyDataTypeErr := KnxPropertyDataTypeParseWithBuffer(ctx, readBuffer) if _propertyDataTypeErr != nil { return nil, errors.Wrap(_propertyDataTypeErr, "Error parsing 'propertyDataType' field of ApduDataExtPropertyDescriptionResponse") } @@ -288,7 +292,7 @@ func ApduDataExtPropertyDescriptionResponseParseWithBuffer(ctx context.Context, if reserved != uint8(0x0) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x0), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField1 = &reserved @@ -296,7 +300,7 @@ func ApduDataExtPropertyDescriptionResponseParseWithBuffer(ctx context.Context, } // Simple Field (maxNrOfElements) - _maxNrOfElements, _maxNrOfElementsErr := readBuffer.ReadUint16("maxNrOfElements", 12) +_maxNrOfElements, _maxNrOfElementsErr := readBuffer.ReadUint16("maxNrOfElements", 12) if _maxNrOfElementsErr != nil { return nil, errors.Wrap(_maxNrOfElementsErr, "Error parsing 'maxNrOfElements' field of ApduDataExtPropertyDescriptionResponse") } @@ -306,7 +310,7 @@ func ApduDataExtPropertyDescriptionResponseParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("readLevel"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for readLevel") } - _readLevel, _readLevelErr := AccessLevelParseWithBuffer(ctx, readBuffer) +_readLevel, _readLevelErr := AccessLevelParseWithBuffer(ctx, readBuffer) if _readLevelErr != nil { return nil, errors.Wrap(_readLevelErr, "Error parsing 'readLevel' field of ApduDataExtPropertyDescriptionResponse") } @@ -319,7 +323,7 @@ func ApduDataExtPropertyDescriptionResponseParseWithBuffer(ctx context.Context, if pullErr := readBuffer.PullContext("writeLevel"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for writeLevel") } - _writeLevel, _writeLevelErr := AccessLevelParseWithBuffer(ctx, readBuffer) +_writeLevel, _writeLevelErr := AccessLevelParseWithBuffer(ctx, readBuffer) if _writeLevelErr != nil { return nil, errors.Wrap(_writeLevelErr, "Error parsing 'writeLevel' field of ApduDataExtPropertyDescriptionResponse") } @@ -337,16 +341,16 @@ func ApduDataExtPropertyDescriptionResponseParseWithBuffer(ctx context.Context, _ApduDataExt: &_ApduDataExt{ Length: length, }, - ObjectIndex: objectIndex, - PropertyId: propertyId, - Index: index, - WriteEnabled: writeEnabled, + ObjectIndex: objectIndex, + PropertyId: propertyId, + Index: index, + WriteEnabled: writeEnabled, PropertyDataType: propertyDataType, - MaxNrOfElements: maxNrOfElements, - ReadLevel: readLevel, - WriteLevel: writeLevel, - reservedField0: reservedField0, - reservedField1: reservedField1, + MaxNrOfElements: maxNrOfElements, + ReadLevel: readLevel, + WriteLevel: writeLevel, + reservedField0: reservedField0, + reservedField1: reservedField1, } _child._ApduDataExt._ApduDataExtChildRequirements = _child return _child, nil @@ -368,108 +372,108 @@ func (m *_ApduDataExtPropertyDescriptionResponse) SerializeWithWriteBuffer(ctx c return errors.Wrap(pushErr, "Error pushing for ApduDataExtPropertyDescriptionResponse") } - // Simple Field (objectIndex) - objectIndex := uint8(m.GetObjectIndex()) - _objectIndexErr := writeBuffer.WriteUint8("objectIndex", 8, (objectIndex)) - if _objectIndexErr != nil { - return errors.Wrap(_objectIndexErr, "Error serializing 'objectIndex' field") - } - - // Simple Field (propertyId) - propertyId := uint8(m.GetPropertyId()) - _propertyIdErr := writeBuffer.WriteUint8("propertyId", 8, (propertyId)) - if _propertyIdErr != nil { - return errors.Wrap(_propertyIdErr, "Error serializing 'propertyId' field") - } + // Simple Field (objectIndex) + objectIndex := uint8(m.GetObjectIndex()) + _objectIndexErr := writeBuffer.WriteUint8("objectIndex", 8, (objectIndex)) + if _objectIndexErr != nil { + return errors.Wrap(_objectIndexErr, "Error serializing 'objectIndex' field") + } - // Simple Field (index) - index := uint8(m.GetIndex()) - _indexErr := writeBuffer.WriteUint8("index", 8, (index)) - if _indexErr != nil { - return errors.Wrap(_indexErr, "Error serializing 'index' field") - } + // Simple Field (propertyId) + propertyId := uint8(m.GetPropertyId()) + _propertyIdErr := writeBuffer.WriteUint8("propertyId", 8, (propertyId)) + if _propertyIdErr != nil { + return errors.Wrap(_propertyIdErr, "Error serializing 'propertyId' field") + } - // Simple Field (writeEnabled) - writeEnabled := bool(m.GetWriteEnabled()) - _writeEnabledErr := writeBuffer.WriteBit("writeEnabled", (writeEnabled)) - if _writeEnabledErr != nil { - return errors.Wrap(_writeEnabledErr, "Error serializing 'writeEnabled' field") - } + // Simple Field (index) + index := uint8(m.GetIndex()) + _indexErr := writeBuffer.WriteUint8("index", 8, (index)) + if _indexErr != nil { + return errors.Wrap(_indexErr, "Error serializing 'index' field") + } - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0x0) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0x0), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteUint8("reserved", 1, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } - } + // Simple Field (writeEnabled) + writeEnabled := bool(m.GetWriteEnabled()) + _writeEnabledErr := writeBuffer.WriteBit("writeEnabled", (writeEnabled)) + if _writeEnabledErr != nil { + return errors.Wrap(_writeEnabledErr, "Error serializing 'writeEnabled' field") + } - // Simple Field (propertyDataType) - if pushErr := writeBuffer.PushContext("propertyDataType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for propertyDataType") - } - _propertyDataTypeErr := writeBuffer.WriteSerializable(ctx, m.GetPropertyDataType()) - if popErr := writeBuffer.PopContext("propertyDataType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for propertyDataType") - } - if _propertyDataTypeErr != nil { - return errors.Wrap(_propertyDataTypeErr, "Error serializing 'propertyDataType' field") + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0x0) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0x0), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 } - - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0x0) - if m.reservedField1 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0x0), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField1 - } - _err := writeBuffer.WriteUint8("reserved", 4, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + _err := writeBuffer.WriteUint8("reserved", 1, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } - // Simple Field (maxNrOfElements) - maxNrOfElements := uint16(m.GetMaxNrOfElements()) - _maxNrOfElementsErr := writeBuffer.WriteUint16("maxNrOfElements", 12, (maxNrOfElements)) - if _maxNrOfElementsErr != nil { - return errors.Wrap(_maxNrOfElementsErr, "Error serializing 'maxNrOfElements' field") - } + // Simple Field (propertyDataType) + if pushErr := writeBuffer.PushContext("propertyDataType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for propertyDataType") + } + _propertyDataTypeErr := writeBuffer.WriteSerializable(ctx, m.GetPropertyDataType()) + if popErr := writeBuffer.PopContext("propertyDataType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for propertyDataType") + } + if _propertyDataTypeErr != nil { + return errors.Wrap(_propertyDataTypeErr, "Error serializing 'propertyDataType' field") + } - // Simple Field (readLevel) - if pushErr := writeBuffer.PushContext("readLevel"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for readLevel") - } - _readLevelErr := writeBuffer.WriteSerializable(ctx, m.GetReadLevel()) - if popErr := writeBuffer.PopContext("readLevel"); popErr != nil { - return errors.Wrap(popErr, "Error popping for readLevel") + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0x0) + if m.reservedField1 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0x0), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField1 } - if _readLevelErr != nil { - return errors.Wrap(_readLevelErr, "Error serializing 'readLevel' field") + _err := writeBuffer.WriteUint8("reserved", 4, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } - // Simple Field (writeLevel) - if pushErr := writeBuffer.PushContext("writeLevel"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for writeLevel") - } - _writeLevelErr := writeBuffer.WriteSerializable(ctx, m.GetWriteLevel()) - if popErr := writeBuffer.PopContext("writeLevel"); popErr != nil { - return errors.Wrap(popErr, "Error popping for writeLevel") - } - if _writeLevelErr != nil { - return errors.Wrap(_writeLevelErr, "Error serializing 'writeLevel' field") - } + // Simple Field (maxNrOfElements) + maxNrOfElements := uint16(m.GetMaxNrOfElements()) + _maxNrOfElementsErr := writeBuffer.WriteUint16("maxNrOfElements", 12, (maxNrOfElements)) + if _maxNrOfElementsErr != nil { + return errors.Wrap(_maxNrOfElementsErr, "Error serializing 'maxNrOfElements' field") + } + + // Simple Field (readLevel) + if pushErr := writeBuffer.PushContext("readLevel"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for readLevel") + } + _readLevelErr := writeBuffer.WriteSerializable(ctx, m.GetReadLevel()) + if popErr := writeBuffer.PopContext("readLevel"); popErr != nil { + return errors.Wrap(popErr, "Error popping for readLevel") + } + if _readLevelErr != nil { + return errors.Wrap(_readLevelErr, "Error serializing 'readLevel' field") + } + + // Simple Field (writeLevel) + if pushErr := writeBuffer.PushContext("writeLevel"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for writeLevel") + } + _writeLevelErr := writeBuffer.WriteSerializable(ctx, m.GetWriteLevel()) + if popErr := writeBuffer.PopContext("writeLevel"); popErr != nil { + return errors.Wrap(popErr, "Error popping for writeLevel") + } + if _writeLevelErr != nil { + return errors.Wrap(_writeLevelErr, "Error serializing 'writeLevel' field") + } if popErr := writeBuffer.PopContext("ApduDataExtPropertyDescriptionResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for ApduDataExtPropertyDescriptionResponse") @@ -479,6 +483,7 @@ func (m *_ApduDataExtPropertyDescriptionResponse) SerializeWithWriteBuffer(ctx c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtPropertyDescriptionResponse) isApduDataExtPropertyDescriptionResponse() bool { return true } @@ -493,3 +498,6 @@ func (m *_ApduDataExtPropertyDescriptionResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtPropertyValueRead.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtPropertyValueRead.go index 44cef5b71ea..59aff615803 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtPropertyValueRead.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtPropertyValueRead.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtPropertyValueRead is the corresponding interface of ApduDataExtPropertyValueRead type ApduDataExtPropertyValueRead interface { @@ -52,32 +54,32 @@ type ApduDataExtPropertyValueReadExactly interface { // _ApduDataExtPropertyValueRead is the data-structure of this message type _ApduDataExtPropertyValueRead struct { *_ApduDataExt - ObjectIndex uint8 - PropertyId uint8 - Count uint8 - Index uint16 + ObjectIndex uint8 + PropertyId uint8 + Count uint8 + Index uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtPropertyValueRead) GetExtApciType() uint8 { - return 0x15 -} +func (m *_ApduDataExtPropertyValueRead) GetExtApciType() uint8 { +return 0x15} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtPropertyValueRead) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtPropertyValueRead) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtPropertyValueRead) GetParent() ApduDataExt { +func (m *_ApduDataExtPropertyValueRead) GetParent() ApduDataExt { return m._ApduDataExt } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -104,14 +106,15 @@ func (m *_ApduDataExtPropertyValueRead) GetIndex() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewApduDataExtPropertyValueRead factory function for _ApduDataExtPropertyValueRead -func NewApduDataExtPropertyValueRead(objectIndex uint8, propertyId uint8, count uint8, index uint16, length uint8) *_ApduDataExtPropertyValueRead { +func NewApduDataExtPropertyValueRead( objectIndex uint8 , propertyId uint8 , count uint8 , index uint16 , length uint8 ) *_ApduDataExtPropertyValueRead { _result := &_ApduDataExtPropertyValueRead{ - ObjectIndex: objectIndex, - PropertyId: propertyId, - Count: count, - Index: index, - _ApduDataExt: NewApduDataExt(length), + ObjectIndex: objectIndex, + PropertyId: propertyId, + Count: count, + Index: index, + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -119,7 +122,7 @@ func NewApduDataExtPropertyValueRead(objectIndex uint8, propertyId uint8, count // Deprecated: use the interface for direct cast func CastApduDataExtPropertyValueRead(structType interface{}) ApduDataExtPropertyValueRead { - if casted, ok := structType.(ApduDataExtPropertyValueRead); ok { + if casted, ok := structType.(ApduDataExtPropertyValueRead); ok { return casted } if casted, ok := structType.(*ApduDataExtPropertyValueRead); ok { @@ -136,20 +139,21 @@ func (m *_ApduDataExtPropertyValueRead) GetLengthInBits(ctx context.Context) uin lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (objectIndex) - lengthInBits += 8 + lengthInBits += 8; // Simple field (propertyId) - lengthInBits += 8 + lengthInBits += 8; // Simple field (count) - lengthInBits += 4 + lengthInBits += 4; // Simple field (index) - lengthInBits += 12 + lengthInBits += 12; return lengthInBits } + func (m *_ApduDataExtPropertyValueRead) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -168,28 +172,28 @@ func ApduDataExtPropertyValueReadParseWithBuffer(ctx context.Context, readBuffer _ = currentPos // Simple Field (objectIndex) - _objectIndex, _objectIndexErr := readBuffer.ReadUint8("objectIndex", 8) +_objectIndex, _objectIndexErr := readBuffer.ReadUint8("objectIndex", 8) if _objectIndexErr != nil { return nil, errors.Wrap(_objectIndexErr, "Error parsing 'objectIndex' field of ApduDataExtPropertyValueRead") } objectIndex := _objectIndex // Simple Field (propertyId) - _propertyId, _propertyIdErr := readBuffer.ReadUint8("propertyId", 8) +_propertyId, _propertyIdErr := readBuffer.ReadUint8("propertyId", 8) if _propertyIdErr != nil { return nil, errors.Wrap(_propertyIdErr, "Error parsing 'propertyId' field of ApduDataExtPropertyValueRead") } propertyId := _propertyId // Simple Field (count) - _count, _countErr := readBuffer.ReadUint8("count", 4) +_count, _countErr := readBuffer.ReadUint8("count", 4) if _countErr != nil { return nil, errors.Wrap(_countErr, "Error parsing 'count' field of ApduDataExtPropertyValueRead") } count := _count // Simple Field (index) - _index, _indexErr := readBuffer.ReadUint16("index", 12) +_index, _indexErr := readBuffer.ReadUint16("index", 12) if _indexErr != nil { return nil, errors.Wrap(_indexErr, "Error parsing 'index' field of ApduDataExtPropertyValueRead") } @@ -205,9 +209,9 @@ func ApduDataExtPropertyValueReadParseWithBuffer(ctx context.Context, readBuffer Length: length, }, ObjectIndex: objectIndex, - PropertyId: propertyId, - Count: count, - Index: index, + PropertyId: propertyId, + Count: count, + Index: index, } _child._ApduDataExt._ApduDataExtChildRequirements = _child return _child, nil @@ -229,33 +233,33 @@ func (m *_ApduDataExtPropertyValueRead) SerializeWithWriteBuffer(ctx context.Con return errors.Wrap(pushErr, "Error pushing for ApduDataExtPropertyValueRead") } - // Simple Field (objectIndex) - objectIndex := uint8(m.GetObjectIndex()) - _objectIndexErr := writeBuffer.WriteUint8("objectIndex", 8, (objectIndex)) - if _objectIndexErr != nil { - return errors.Wrap(_objectIndexErr, "Error serializing 'objectIndex' field") - } + // Simple Field (objectIndex) + objectIndex := uint8(m.GetObjectIndex()) + _objectIndexErr := writeBuffer.WriteUint8("objectIndex", 8, (objectIndex)) + if _objectIndexErr != nil { + return errors.Wrap(_objectIndexErr, "Error serializing 'objectIndex' field") + } - // Simple Field (propertyId) - propertyId := uint8(m.GetPropertyId()) - _propertyIdErr := writeBuffer.WriteUint8("propertyId", 8, (propertyId)) - if _propertyIdErr != nil { - return errors.Wrap(_propertyIdErr, "Error serializing 'propertyId' field") - } + // Simple Field (propertyId) + propertyId := uint8(m.GetPropertyId()) + _propertyIdErr := writeBuffer.WriteUint8("propertyId", 8, (propertyId)) + if _propertyIdErr != nil { + return errors.Wrap(_propertyIdErr, "Error serializing 'propertyId' field") + } - // Simple Field (count) - count := uint8(m.GetCount()) - _countErr := writeBuffer.WriteUint8("count", 4, (count)) - if _countErr != nil { - return errors.Wrap(_countErr, "Error serializing 'count' field") - } + // Simple Field (count) + count := uint8(m.GetCount()) + _countErr := writeBuffer.WriteUint8("count", 4, (count)) + if _countErr != nil { + return errors.Wrap(_countErr, "Error serializing 'count' field") + } - // Simple Field (index) - index := uint16(m.GetIndex()) - _indexErr := writeBuffer.WriteUint16("index", 12, (index)) - if _indexErr != nil { - return errors.Wrap(_indexErr, "Error serializing 'index' field") - } + // Simple Field (index) + index := uint16(m.GetIndex()) + _indexErr := writeBuffer.WriteUint16("index", 12, (index)) + if _indexErr != nil { + return errors.Wrap(_indexErr, "Error serializing 'index' field") + } if popErr := writeBuffer.PopContext("ApduDataExtPropertyValueRead"); popErr != nil { return errors.Wrap(popErr, "Error popping for ApduDataExtPropertyValueRead") @@ -265,6 +269,7 @@ func (m *_ApduDataExtPropertyValueRead) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtPropertyValueRead) isApduDataExtPropertyValueRead() bool { return true } @@ -279,3 +284,6 @@ func (m *_ApduDataExtPropertyValueRead) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtPropertyValueResponse.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtPropertyValueResponse.go index 646f2758a2f..673278afeb9 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtPropertyValueResponse.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtPropertyValueResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtPropertyValueResponse is the corresponding interface of ApduDataExtPropertyValueResponse type ApduDataExtPropertyValueResponse interface { @@ -54,33 +56,33 @@ type ApduDataExtPropertyValueResponseExactly interface { // _ApduDataExtPropertyValueResponse is the data-structure of this message type _ApduDataExtPropertyValueResponse struct { *_ApduDataExt - ObjectIndex uint8 - PropertyId uint8 - Count uint8 - Index uint16 - Data []byte + ObjectIndex uint8 + PropertyId uint8 + Count uint8 + Index uint16 + Data []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtPropertyValueResponse) GetExtApciType() uint8 { - return 0x16 -} +func (m *_ApduDataExtPropertyValueResponse) GetExtApciType() uint8 { +return 0x16} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtPropertyValueResponse) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtPropertyValueResponse) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtPropertyValueResponse) GetParent() ApduDataExt { +func (m *_ApduDataExtPropertyValueResponse) GetParent() ApduDataExt { return m._ApduDataExt } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -111,15 +113,16 @@ func (m *_ApduDataExtPropertyValueResponse) GetData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewApduDataExtPropertyValueResponse factory function for _ApduDataExtPropertyValueResponse -func NewApduDataExtPropertyValueResponse(objectIndex uint8, propertyId uint8, count uint8, index uint16, data []byte, length uint8) *_ApduDataExtPropertyValueResponse { +func NewApduDataExtPropertyValueResponse( objectIndex uint8 , propertyId uint8 , count uint8 , index uint16 , data []byte , length uint8 ) *_ApduDataExtPropertyValueResponse { _result := &_ApduDataExtPropertyValueResponse{ - ObjectIndex: objectIndex, - PropertyId: propertyId, - Count: count, - Index: index, - Data: data, - _ApduDataExt: NewApduDataExt(length), + ObjectIndex: objectIndex, + PropertyId: propertyId, + Count: count, + Index: index, + Data: data, + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -127,7 +130,7 @@ func NewApduDataExtPropertyValueResponse(objectIndex uint8, propertyId uint8, co // Deprecated: use the interface for direct cast func CastApduDataExtPropertyValueResponse(structType interface{}) ApduDataExtPropertyValueResponse { - if casted, ok := structType.(ApduDataExtPropertyValueResponse); ok { + if casted, ok := structType.(ApduDataExtPropertyValueResponse); ok { return casted } if casted, ok := structType.(*ApduDataExtPropertyValueResponse); ok { @@ -144,16 +147,16 @@ func (m *_ApduDataExtPropertyValueResponse) GetLengthInBits(ctx context.Context) lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (objectIndex) - lengthInBits += 8 + lengthInBits += 8; // Simple field (propertyId) - lengthInBits += 8 + lengthInBits += 8; // Simple field (count) - lengthInBits += 4 + lengthInBits += 4; // Simple field (index) - lengthInBits += 12 + lengthInBits += 12; // Array field if len(m.Data) > 0 { @@ -163,6 +166,7 @@ func (m *_ApduDataExtPropertyValueResponse) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_ApduDataExtPropertyValueResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -181,28 +185,28 @@ func ApduDataExtPropertyValueResponseParseWithBuffer(ctx context.Context, readBu _ = currentPos // Simple Field (objectIndex) - _objectIndex, _objectIndexErr := readBuffer.ReadUint8("objectIndex", 8) +_objectIndex, _objectIndexErr := readBuffer.ReadUint8("objectIndex", 8) if _objectIndexErr != nil { return nil, errors.Wrap(_objectIndexErr, "Error parsing 'objectIndex' field of ApduDataExtPropertyValueResponse") } objectIndex := _objectIndex // Simple Field (propertyId) - _propertyId, _propertyIdErr := readBuffer.ReadUint8("propertyId", 8) +_propertyId, _propertyIdErr := readBuffer.ReadUint8("propertyId", 8) if _propertyIdErr != nil { return nil, errors.Wrap(_propertyIdErr, "Error parsing 'propertyId' field of ApduDataExtPropertyValueResponse") } propertyId := _propertyId // Simple Field (count) - _count, _countErr := readBuffer.ReadUint8("count", 4) +_count, _countErr := readBuffer.ReadUint8("count", 4) if _countErr != nil { return nil, errors.Wrap(_countErr, "Error parsing 'count' field of ApduDataExtPropertyValueResponse") } count := _count // Simple Field (index) - _index, _indexErr := readBuffer.ReadUint16("index", 12) +_index, _indexErr := readBuffer.ReadUint16("index", 12) if _indexErr != nil { return nil, errors.Wrap(_indexErr, "Error parsing 'index' field of ApduDataExtPropertyValueResponse") } @@ -224,10 +228,10 @@ func ApduDataExtPropertyValueResponseParseWithBuffer(ctx context.Context, readBu Length: length, }, ObjectIndex: objectIndex, - PropertyId: propertyId, - Count: count, - Index: index, - Data: data, + PropertyId: propertyId, + Count: count, + Index: index, + Data: data, } _child._ApduDataExt._ApduDataExtChildRequirements = _child return _child, nil @@ -249,39 +253,39 @@ func (m *_ApduDataExtPropertyValueResponse) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for ApduDataExtPropertyValueResponse") } - // Simple Field (objectIndex) - objectIndex := uint8(m.GetObjectIndex()) - _objectIndexErr := writeBuffer.WriteUint8("objectIndex", 8, (objectIndex)) - if _objectIndexErr != nil { - return errors.Wrap(_objectIndexErr, "Error serializing 'objectIndex' field") - } + // Simple Field (objectIndex) + objectIndex := uint8(m.GetObjectIndex()) + _objectIndexErr := writeBuffer.WriteUint8("objectIndex", 8, (objectIndex)) + if _objectIndexErr != nil { + return errors.Wrap(_objectIndexErr, "Error serializing 'objectIndex' field") + } - // Simple Field (propertyId) - propertyId := uint8(m.GetPropertyId()) - _propertyIdErr := writeBuffer.WriteUint8("propertyId", 8, (propertyId)) - if _propertyIdErr != nil { - return errors.Wrap(_propertyIdErr, "Error serializing 'propertyId' field") - } + // Simple Field (propertyId) + propertyId := uint8(m.GetPropertyId()) + _propertyIdErr := writeBuffer.WriteUint8("propertyId", 8, (propertyId)) + if _propertyIdErr != nil { + return errors.Wrap(_propertyIdErr, "Error serializing 'propertyId' field") + } - // Simple Field (count) - count := uint8(m.GetCount()) - _countErr := writeBuffer.WriteUint8("count", 4, (count)) - if _countErr != nil { - return errors.Wrap(_countErr, "Error serializing 'count' field") - } + // Simple Field (count) + count := uint8(m.GetCount()) + _countErr := writeBuffer.WriteUint8("count", 4, (count)) + if _countErr != nil { + return errors.Wrap(_countErr, "Error serializing 'count' field") + } - // Simple Field (index) - index := uint16(m.GetIndex()) - _indexErr := writeBuffer.WriteUint16("index", 12, (index)) - if _indexErr != nil { - return errors.Wrap(_indexErr, "Error serializing 'index' field") - } + // Simple Field (index) + index := uint16(m.GetIndex()) + _indexErr := writeBuffer.WriteUint16("index", 12, (index)) + if _indexErr != nil { + return errors.Wrap(_indexErr, "Error serializing 'index' field") + } - // Array Field (data) - // Byte Array field (data) - if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { - return errors.Wrap(err, "Error serializing 'data' field") - } + // Array Field (data) + // Byte Array field (data) + if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { + return errors.Wrap(err, "Error serializing 'data' field") + } if popErr := writeBuffer.PopContext("ApduDataExtPropertyValueResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for ApduDataExtPropertyValueResponse") @@ -291,6 +295,7 @@ func (m *_ApduDataExtPropertyValueResponse) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtPropertyValueResponse) isApduDataExtPropertyValueResponse() bool { return true } @@ -305,3 +310,6 @@ func (m *_ApduDataExtPropertyValueResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtPropertyValueWrite.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtPropertyValueWrite.go index 6a0d2e8b1fa..5229f4d1379 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtPropertyValueWrite.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtPropertyValueWrite.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtPropertyValueWrite is the corresponding interface of ApduDataExtPropertyValueWrite type ApduDataExtPropertyValueWrite interface { @@ -54,33 +56,33 @@ type ApduDataExtPropertyValueWriteExactly interface { // _ApduDataExtPropertyValueWrite is the data-structure of this message type _ApduDataExtPropertyValueWrite struct { *_ApduDataExt - ObjectIndex uint8 - PropertyId uint8 - Count uint8 - Index uint16 - Data []byte + ObjectIndex uint8 + PropertyId uint8 + Count uint8 + Index uint16 + Data []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtPropertyValueWrite) GetExtApciType() uint8 { - return 0x17 -} +func (m *_ApduDataExtPropertyValueWrite) GetExtApciType() uint8 { +return 0x17} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtPropertyValueWrite) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtPropertyValueWrite) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtPropertyValueWrite) GetParent() ApduDataExt { +func (m *_ApduDataExtPropertyValueWrite) GetParent() ApduDataExt { return m._ApduDataExt } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -111,15 +113,16 @@ func (m *_ApduDataExtPropertyValueWrite) GetData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewApduDataExtPropertyValueWrite factory function for _ApduDataExtPropertyValueWrite -func NewApduDataExtPropertyValueWrite(objectIndex uint8, propertyId uint8, count uint8, index uint16, data []byte, length uint8) *_ApduDataExtPropertyValueWrite { +func NewApduDataExtPropertyValueWrite( objectIndex uint8 , propertyId uint8 , count uint8 , index uint16 , data []byte , length uint8 ) *_ApduDataExtPropertyValueWrite { _result := &_ApduDataExtPropertyValueWrite{ - ObjectIndex: objectIndex, - PropertyId: propertyId, - Count: count, - Index: index, - Data: data, - _ApduDataExt: NewApduDataExt(length), + ObjectIndex: objectIndex, + PropertyId: propertyId, + Count: count, + Index: index, + Data: data, + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -127,7 +130,7 @@ func NewApduDataExtPropertyValueWrite(objectIndex uint8, propertyId uint8, count // Deprecated: use the interface for direct cast func CastApduDataExtPropertyValueWrite(structType interface{}) ApduDataExtPropertyValueWrite { - if casted, ok := structType.(ApduDataExtPropertyValueWrite); ok { + if casted, ok := structType.(ApduDataExtPropertyValueWrite); ok { return casted } if casted, ok := structType.(*ApduDataExtPropertyValueWrite); ok { @@ -144,16 +147,16 @@ func (m *_ApduDataExtPropertyValueWrite) GetLengthInBits(ctx context.Context) ui lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (objectIndex) - lengthInBits += 8 + lengthInBits += 8; // Simple field (propertyId) - lengthInBits += 8 + lengthInBits += 8; // Simple field (count) - lengthInBits += 4 + lengthInBits += 4; // Simple field (index) - lengthInBits += 12 + lengthInBits += 12; // Array field if len(m.Data) > 0 { @@ -163,6 +166,7 @@ func (m *_ApduDataExtPropertyValueWrite) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_ApduDataExtPropertyValueWrite) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -181,28 +185,28 @@ func ApduDataExtPropertyValueWriteParseWithBuffer(ctx context.Context, readBuffe _ = currentPos // Simple Field (objectIndex) - _objectIndex, _objectIndexErr := readBuffer.ReadUint8("objectIndex", 8) +_objectIndex, _objectIndexErr := readBuffer.ReadUint8("objectIndex", 8) if _objectIndexErr != nil { return nil, errors.Wrap(_objectIndexErr, "Error parsing 'objectIndex' field of ApduDataExtPropertyValueWrite") } objectIndex := _objectIndex // Simple Field (propertyId) - _propertyId, _propertyIdErr := readBuffer.ReadUint8("propertyId", 8) +_propertyId, _propertyIdErr := readBuffer.ReadUint8("propertyId", 8) if _propertyIdErr != nil { return nil, errors.Wrap(_propertyIdErr, "Error parsing 'propertyId' field of ApduDataExtPropertyValueWrite") } propertyId := _propertyId // Simple Field (count) - _count, _countErr := readBuffer.ReadUint8("count", 4) +_count, _countErr := readBuffer.ReadUint8("count", 4) if _countErr != nil { return nil, errors.Wrap(_countErr, "Error parsing 'count' field of ApduDataExtPropertyValueWrite") } count := _count // Simple Field (index) - _index, _indexErr := readBuffer.ReadUint16("index", 12) +_index, _indexErr := readBuffer.ReadUint16("index", 12) if _indexErr != nil { return nil, errors.Wrap(_indexErr, "Error parsing 'index' field of ApduDataExtPropertyValueWrite") } @@ -224,10 +228,10 @@ func ApduDataExtPropertyValueWriteParseWithBuffer(ctx context.Context, readBuffe Length: length, }, ObjectIndex: objectIndex, - PropertyId: propertyId, - Count: count, - Index: index, - Data: data, + PropertyId: propertyId, + Count: count, + Index: index, + Data: data, } _child._ApduDataExt._ApduDataExtChildRequirements = _child return _child, nil @@ -249,39 +253,39 @@ func (m *_ApduDataExtPropertyValueWrite) SerializeWithWriteBuffer(ctx context.Co return errors.Wrap(pushErr, "Error pushing for ApduDataExtPropertyValueWrite") } - // Simple Field (objectIndex) - objectIndex := uint8(m.GetObjectIndex()) - _objectIndexErr := writeBuffer.WriteUint8("objectIndex", 8, (objectIndex)) - if _objectIndexErr != nil { - return errors.Wrap(_objectIndexErr, "Error serializing 'objectIndex' field") - } + // Simple Field (objectIndex) + objectIndex := uint8(m.GetObjectIndex()) + _objectIndexErr := writeBuffer.WriteUint8("objectIndex", 8, (objectIndex)) + if _objectIndexErr != nil { + return errors.Wrap(_objectIndexErr, "Error serializing 'objectIndex' field") + } - // Simple Field (propertyId) - propertyId := uint8(m.GetPropertyId()) - _propertyIdErr := writeBuffer.WriteUint8("propertyId", 8, (propertyId)) - if _propertyIdErr != nil { - return errors.Wrap(_propertyIdErr, "Error serializing 'propertyId' field") - } + // Simple Field (propertyId) + propertyId := uint8(m.GetPropertyId()) + _propertyIdErr := writeBuffer.WriteUint8("propertyId", 8, (propertyId)) + if _propertyIdErr != nil { + return errors.Wrap(_propertyIdErr, "Error serializing 'propertyId' field") + } - // Simple Field (count) - count := uint8(m.GetCount()) - _countErr := writeBuffer.WriteUint8("count", 4, (count)) - if _countErr != nil { - return errors.Wrap(_countErr, "Error serializing 'count' field") - } + // Simple Field (count) + count := uint8(m.GetCount()) + _countErr := writeBuffer.WriteUint8("count", 4, (count)) + if _countErr != nil { + return errors.Wrap(_countErr, "Error serializing 'count' field") + } - // Simple Field (index) - index := uint16(m.GetIndex()) - _indexErr := writeBuffer.WriteUint16("index", 12, (index)) - if _indexErr != nil { - return errors.Wrap(_indexErr, "Error serializing 'index' field") - } + // Simple Field (index) + index := uint16(m.GetIndex()) + _indexErr := writeBuffer.WriteUint16("index", 12, (index)) + if _indexErr != nil { + return errors.Wrap(_indexErr, "Error serializing 'index' field") + } - // Array Field (data) - // Byte Array field (data) - if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { - return errors.Wrap(err, "Error serializing 'data' field") - } + // Array Field (data) + // Byte Array field (data) + if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { + return errors.Wrap(err, "Error serializing 'data' field") + } if popErr := writeBuffer.PopContext("ApduDataExtPropertyValueWrite"); popErr != nil { return errors.Wrap(popErr, "Error popping for ApduDataExtPropertyValueWrite") @@ -291,6 +295,7 @@ func (m *_ApduDataExtPropertyValueWrite) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtPropertyValueWrite) isApduDataExtPropertyValueWrite() bool { return true } @@ -305,3 +310,6 @@ func (m *_ApduDataExtPropertyValueWrite) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtReadRouterMemoryRequest.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtReadRouterMemoryRequest.go index d252661079c..80926a16ffd 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtReadRouterMemoryRequest.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtReadRouterMemoryRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtReadRouterMemoryRequest is the corresponding interface of ApduDataExtReadRouterMemoryRequest type ApduDataExtReadRouterMemoryRequest interface { @@ -46,30 +48,32 @@ type _ApduDataExtReadRouterMemoryRequest struct { *_ApduDataExt } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtReadRouterMemoryRequest) GetExtApciType() uint8 { - return 0x08 -} +func (m *_ApduDataExtReadRouterMemoryRequest) GetExtApciType() uint8 { +return 0x08} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtReadRouterMemoryRequest) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtReadRouterMemoryRequest) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtReadRouterMemoryRequest) GetParent() ApduDataExt { +func (m *_ApduDataExtReadRouterMemoryRequest) GetParent() ApduDataExt { return m._ApduDataExt } + // NewApduDataExtReadRouterMemoryRequest factory function for _ApduDataExtReadRouterMemoryRequest -func NewApduDataExtReadRouterMemoryRequest(length uint8) *_ApduDataExtReadRouterMemoryRequest { +func NewApduDataExtReadRouterMemoryRequest( length uint8 ) *_ApduDataExtReadRouterMemoryRequest { _result := &_ApduDataExtReadRouterMemoryRequest{ - _ApduDataExt: NewApduDataExt(length), + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataExtReadRouterMemoryRequest(length uint8) *_ApduDataExtReadRouter // Deprecated: use the interface for direct cast func CastApduDataExtReadRouterMemoryRequest(structType interface{}) ApduDataExtReadRouterMemoryRequest { - if casted, ok := structType.(ApduDataExtReadRouterMemoryRequest); ok { + if casted, ok := structType.(ApduDataExtReadRouterMemoryRequest); ok { return casted } if casted, ok := structType.(*ApduDataExtReadRouterMemoryRequest); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataExtReadRouterMemoryRequest) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_ApduDataExtReadRouterMemoryRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataExtReadRouterMemoryRequest) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtReadRouterMemoryRequest) isApduDataExtReadRouterMemoryRequest() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataExtReadRouterMemoryRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtReadRouterMemoryResponse.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtReadRouterMemoryResponse.go index 20efff4f6a0..7ca4ce0ba38 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtReadRouterMemoryResponse.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtReadRouterMemoryResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtReadRouterMemoryResponse is the corresponding interface of ApduDataExtReadRouterMemoryResponse type ApduDataExtReadRouterMemoryResponse interface { @@ -46,30 +48,32 @@ type _ApduDataExtReadRouterMemoryResponse struct { *_ApduDataExt } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtReadRouterMemoryResponse) GetExtApciType() uint8 { - return 0x09 -} +func (m *_ApduDataExtReadRouterMemoryResponse) GetExtApciType() uint8 { +return 0x09} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtReadRouterMemoryResponse) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtReadRouterMemoryResponse) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtReadRouterMemoryResponse) GetParent() ApduDataExt { +func (m *_ApduDataExtReadRouterMemoryResponse) GetParent() ApduDataExt { return m._ApduDataExt } + // NewApduDataExtReadRouterMemoryResponse factory function for _ApduDataExtReadRouterMemoryResponse -func NewApduDataExtReadRouterMemoryResponse(length uint8) *_ApduDataExtReadRouterMemoryResponse { +func NewApduDataExtReadRouterMemoryResponse( length uint8 ) *_ApduDataExtReadRouterMemoryResponse { _result := &_ApduDataExtReadRouterMemoryResponse{ - _ApduDataExt: NewApduDataExt(length), + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataExtReadRouterMemoryResponse(length uint8) *_ApduDataExtReadRoute // Deprecated: use the interface for direct cast func CastApduDataExtReadRouterMemoryResponse(structType interface{}) ApduDataExtReadRouterMemoryResponse { - if casted, ok := structType.(ApduDataExtReadRouterMemoryResponse); ok { + if casted, ok := structType.(ApduDataExtReadRouterMemoryResponse); ok { return casted } if casted, ok := structType.(*ApduDataExtReadRouterMemoryResponse); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataExtReadRouterMemoryResponse) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_ApduDataExtReadRouterMemoryResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataExtReadRouterMemoryResponse) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtReadRouterMemoryResponse) isApduDataExtReadRouterMemoryResponse() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataExtReadRouterMemoryResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtReadRouterStatusRequest.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtReadRouterStatusRequest.go index bdc462605ee..87c004602bc 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtReadRouterStatusRequest.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtReadRouterStatusRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtReadRouterStatusRequest is the corresponding interface of ApduDataExtReadRouterStatusRequest type ApduDataExtReadRouterStatusRequest interface { @@ -46,30 +48,32 @@ type _ApduDataExtReadRouterStatusRequest struct { *_ApduDataExt } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtReadRouterStatusRequest) GetExtApciType() uint8 { - return 0x0D -} +func (m *_ApduDataExtReadRouterStatusRequest) GetExtApciType() uint8 { +return 0x0D} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtReadRouterStatusRequest) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtReadRouterStatusRequest) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtReadRouterStatusRequest) GetParent() ApduDataExt { +func (m *_ApduDataExtReadRouterStatusRequest) GetParent() ApduDataExt { return m._ApduDataExt } + // NewApduDataExtReadRouterStatusRequest factory function for _ApduDataExtReadRouterStatusRequest -func NewApduDataExtReadRouterStatusRequest(length uint8) *_ApduDataExtReadRouterStatusRequest { +func NewApduDataExtReadRouterStatusRequest( length uint8 ) *_ApduDataExtReadRouterStatusRequest { _result := &_ApduDataExtReadRouterStatusRequest{ - _ApduDataExt: NewApduDataExt(length), + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataExtReadRouterStatusRequest(length uint8) *_ApduDataExtReadRouter // Deprecated: use the interface for direct cast func CastApduDataExtReadRouterStatusRequest(structType interface{}) ApduDataExtReadRouterStatusRequest { - if casted, ok := structType.(ApduDataExtReadRouterStatusRequest); ok { + if casted, ok := structType.(ApduDataExtReadRouterStatusRequest); ok { return casted } if casted, ok := structType.(*ApduDataExtReadRouterStatusRequest); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataExtReadRouterStatusRequest) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_ApduDataExtReadRouterStatusRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataExtReadRouterStatusRequest) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtReadRouterStatusRequest) isApduDataExtReadRouterStatusRequest() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataExtReadRouterStatusRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtReadRouterStatusResponse.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtReadRouterStatusResponse.go index 86b15e9dac9..dd8ee1201cd 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtReadRouterStatusResponse.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtReadRouterStatusResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtReadRouterStatusResponse is the corresponding interface of ApduDataExtReadRouterStatusResponse type ApduDataExtReadRouterStatusResponse interface { @@ -46,30 +48,32 @@ type _ApduDataExtReadRouterStatusResponse struct { *_ApduDataExt } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtReadRouterStatusResponse) GetExtApciType() uint8 { - return 0x0E -} +func (m *_ApduDataExtReadRouterStatusResponse) GetExtApciType() uint8 { +return 0x0E} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtReadRouterStatusResponse) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtReadRouterStatusResponse) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtReadRouterStatusResponse) GetParent() ApduDataExt { +func (m *_ApduDataExtReadRouterStatusResponse) GetParent() ApduDataExt { return m._ApduDataExt } + // NewApduDataExtReadRouterStatusResponse factory function for _ApduDataExtReadRouterStatusResponse -func NewApduDataExtReadRouterStatusResponse(length uint8) *_ApduDataExtReadRouterStatusResponse { +func NewApduDataExtReadRouterStatusResponse( length uint8 ) *_ApduDataExtReadRouterStatusResponse { _result := &_ApduDataExtReadRouterStatusResponse{ - _ApduDataExt: NewApduDataExt(length), + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataExtReadRouterStatusResponse(length uint8) *_ApduDataExtReadRoute // Deprecated: use the interface for direct cast func CastApduDataExtReadRouterStatusResponse(structType interface{}) ApduDataExtReadRouterStatusResponse { - if casted, ok := structType.(ApduDataExtReadRouterStatusResponse); ok { + if casted, ok := structType.(ApduDataExtReadRouterStatusResponse); ok { return casted } if casted, ok := structType.(*ApduDataExtReadRouterStatusResponse); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataExtReadRouterStatusResponse) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_ApduDataExtReadRouterStatusResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataExtReadRouterStatusResponse) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtReadRouterStatusResponse) isApduDataExtReadRouterStatusResponse() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataExtReadRouterStatusResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtReadRoutingTableRequest.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtReadRoutingTableRequest.go index 24373d190a4..10bbfc4d2d3 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtReadRoutingTableRequest.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtReadRoutingTableRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtReadRoutingTableRequest is the corresponding interface of ApduDataExtReadRoutingTableRequest type ApduDataExtReadRoutingTableRequest interface { @@ -46,30 +48,32 @@ type _ApduDataExtReadRoutingTableRequest struct { *_ApduDataExt } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtReadRoutingTableRequest) GetExtApciType() uint8 { - return 0x01 -} +func (m *_ApduDataExtReadRoutingTableRequest) GetExtApciType() uint8 { +return 0x01} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtReadRoutingTableRequest) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtReadRoutingTableRequest) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtReadRoutingTableRequest) GetParent() ApduDataExt { +func (m *_ApduDataExtReadRoutingTableRequest) GetParent() ApduDataExt { return m._ApduDataExt } + // NewApduDataExtReadRoutingTableRequest factory function for _ApduDataExtReadRoutingTableRequest -func NewApduDataExtReadRoutingTableRequest(length uint8) *_ApduDataExtReadRoutingTableRequest { +func NewApduDataExtReadRoutingTableRequest( length uint8 ) *_ApduDataExtReadRoutingTableRequest { _result := &_ApduDataExtReadRoutingTableRequest{ - _ApduDataExt: NewApduDataExt(length), + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataExtReadRoutingTableRequest(length uint8) *_ApduDataExtReadRoutin // Deprecated: use the interface for direct cast func CastApduDataExtReadRoutingTableRequest(structType interface{}) ApduDataExtReadRoutingTableRequest { - if casted, ok := structType.(ApduDataExtReadRoutingTableRequest); ok { + if casted, ok := structType.(ApduDataExtReadRoutingTableRequest); ok { return casted } if casted, ok := structType.(*ApduDataExtReadRoutingTableRequest); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataExtReadRoutingTableRequest) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_ApduDataExtReadRoutingTableRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataExtReadRoutingTableRequest) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtReadRoutingTableRequest) isApduDataExtReadRoutingTableRequest() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataExtReadRoutingTableRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtReadRoutingTableResponse.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtReadRoutingTableResponse.go index c931e2548f8..69617d14524 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtReadRoutingTableResponse.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtReadRoutingTableResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtReadRoutingTableResponse is the corresponding interface of ApduDataExtReadRoutingTableResponse type ApduDataExtReadRoutingTableResponse interface { @@ -46,30 +48,32 @@ type _ApduDataExtReadRoutingTableResponse struct { *_ApduDataExt } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtReadRoutingTableResponse) GetExtApciType() uint8 { - return 0x02 -} +func (m *_ApduDataExtReadRoutingTableResponse) GetExtApciType() uint8 { +return 0x02} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtReadRoutingTableResponse) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtReadRoutingTableResponse) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtReadRoutingTableResponse) GetParent() ApduDataExt { +func (m *_ApduDataExtReadRoutingTableResponse) GetParent() ApduDataExt { return m._ApduDataExt } + // NewApduDataExtReadRoutingTableResponse factory function for _ApduDataExtReadRoutingTableResponse -func NewApduDataExtReadRoutingTableResponse(length uint8) *_ApduDataExtReadRoutingTableResponse { +func NewApduDataExtReadRoutingTableResponse( length uint8 ) *_ApduDataExtReadRoutingTableResponse { _result := &_ApduDataExtReadRoutingTableResponse{ - _ApduDataExt: NewApduDataExt(length), + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataExtReadRoutingTableResponse(length uint8) *_ApduDataExtReadRouti // Deprecated: use the interface for direct cast func CastApduDataExtReadRoutingTableResponse(structType interface{}) ApduDataExtReadRoutingTableResponse { - if casted, ok := structType.(ApduDataExtReadRoutingTableResponse); ok { + if casted, ok := structType.(ApduDataExtReadRoutingTableResponse); ok { return casted } if casted, ok := structType.(*ApduDataExtReadRoutingTableResponse); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataExtReadRoutingTableResponse) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_ApduDataExtReadRoutingTableResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataExtReadRoutingTableResponse) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtReadRoutingTableResponse) isApduDataExtReadRoutingTableResponse() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataExtReadRoutingTableResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtWriteRouterMemoryRequest.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtWriteRouterMemoryRequest.go index 60c5828a189..1dfa4b1425e 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtWriteRouterMemoryRequest.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtWriteRouterMemoryRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtWriteRouterMemoryRequest is the corresponding interface of ApduDataExtWriteRouterMemoryRequest type ApduDataExtWriteRouterMemoryRequest interface { @@ -46,30 +48,32 @@ type _ApduDataExtWriteRouterMemoryRequest struct { *_ApduDataExt } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtWriteRouterMemoryRequest) GetExtApciType() uint8 { - return 0x0A -} +func (m *_ApduDataExtWriteRouterMemoryRequest) GetExtApciType() uint8 { +return 0x0A} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtWriteRouterMemoryRequest) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtWriteRouterMemoryRequest) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtWriteRouterMemoryRequest) GetParent() ApduDataExt { +func (m *_ApduDataExtWriteRouterMemoryRequest) GetParent() ApduDataExt { return m._ApduDataExt } + // NewApduDataExtWriteRouterMemoryRequest factory function for _ApduDataExtWriteRouterMemoryRequest -func NewApduDataExtWriteRouterMemoryRequest(length uint8) *_ApduDataExtWriteRouterMemoryRequest { +func NewApduDataExtWriteRouterMemoryRequest( length uint8 ) *_ApduDataExtWriteRouterMemoryRequest { _result := &_ApduDataExtWriteRouterMemoryRequest{ - _ApduDataExt: NewApduDataExt(length), + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataExtWriteRouterMemoryRequest(length uint8) *_ApduDataExtWriteRout // Deprecated: use the interface for direct cast func CastApduDataExtWriteRouterMemoryRequest(structType interface{}) ApduDataExtWriteRouterMemoryRequest { - if casted, ok := structType.(ApduDataExtWriteRouterMemoryRequest); ok { + if casted, ok := structType.(ApduDataExtWriteRouterMemoryRequest); ok { return casted } if casted, ok := structType.(*ApduDataExtWriteRouterMemoryRequest); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataExtWriteRouterMemoryRequest) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_ApduDataExtWriteRouterMemoryRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataExtWriteRouterMemoryRequest) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtWriteRouterMemoryRequest) isApduDataExtWriteRouterMemoryRequest() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataExtWriteRouterMemoryRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtWriteRouterStatusRequest.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtWriteRouterStatusRequest.go index bf21c365264..6eaaebd71ff 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtWriteRouterStatusRequest.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtWriteRouterStatusRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtWriteRouterStatusRequest is the corresponding interface of ApduDataExtWriteRouterStatusRequest type ApduDataExtWriteRouterStatusRequest interface { @@ -46,30 +48,32 @@ type _ApduDataExtWriteRouterStatusRequest struct { *_ApduDataExt } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtWriteRouterStatusRequest) GetExtApciType() uint8 { - return 0x0F -} +func (m *_ApduDataExtWriteRouterStatusRequest) GetExtApciType() uint8 { +return 0x0F} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtWriteRouterStatusRequest) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtWriteRouterStatusRequest) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtWriteRouterStatusRequest) GetParent() ApduDataExt { +func (m *_ApduDataExtWriteRouterStatusRequest) GetParent() ApduDataExt { return m._ApduDataExt } + // NewApduDataExtWriteRouterStatusRequest factory function for _ApduDataExtWriteRouterStatusRequest -func NewApduDataExtWriteRouterStatusRequest(length uint8) *_ApduDataExtWriteRouterStatusRequest { +func NewApduDataExtWriteRouterStatusRequest( length uint8 ) *_ApduDataExtWriteRouterStatusRequest { _result := &_ApduDataExtWriteRouterStatusRequest{ - _ApduDataExt: NewApduDataExt(length), + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataExtWriteRouterStatusRequest(length uint8) *_ApduDataExtWriteRout // Deprecated: use the interface for direct cast func CastApduDataExtWriteRouterStatusRequest(structType interface{}) ApduDataExtWriteRouterStatusRequest { - if casted, ok := structType.(ApduDataExtWriteRouterStatusRequest); ok { + if casted, ok := structType.(ApduDataExtWriteRouterStatusRequest); ok { return casted } if casted, ok := structType.(*ApduDataExtWriteRouterStatusRequest); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataExtWriteRouterStatusRequest) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_ApduDataExtWriteRouterStatusRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataExtWriteRouterStatusRequest) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtWriteRouterStatusRequest) isApduDataExtWriteRouterStatusRequest() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataExtWriteRouterStatusRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtWriteRoutingTableRequest.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtWriteRoutingTableRequest.go index 0d032810843..c1c20590883 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtWriteRoutingTableRequest.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataExtWriteRoutingTableRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataExtWriteRoutingTableRequest is the corresponding interface of ApduDataExtWriteRoutingTableRequest type ApduDataExtWriteRoutingTableRequest interface { @@ -46,30 +48,32 @@ type _ApduDataExtWriteRoutingTableRequest struct { *_ApduDataExt } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataExtWriteRoutingTableRequest) GetExtApciType() uint8 { - return 0x03 -} +func (m *_ApduDataExtWriteRoutingTableRequest) GetExtApciType() uint8 { +return 0x03} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataExtWriteRoutingTableRequest) InitializeParent(parent ApduDataExt) {} +func (m *_ApduDataExtWriteRoutingTableRequest) InitializeParent(parent ApduDataExt ) {} -func (m *_ApduDataExtWriteRoutingTableRequest) GetParent() ApduDataExt { +func (m *_ApduDataExtWriteRoutingTableRequest) GetParent() ApduDataExt { return m._ApduDataExt } + // NewApduDataExtWriteRoutingTableRequest factory function for _ApduDataExtWriteRoutingTableRequest -func NewApduDataExtWriteRoutingTableRequest(length uint8) *_ApduDataExtWriteRoutingTableRequest { +func NewApduDataExtWriteRoutingTableRequest( length uint8 ) *_ApduDataExtWriteRoutingTableRequest { _result := &_ApduDataExtWriteRoutingTableRequest{ - _ApduDataExt: NewApduDataExt(length), + _ApduDataExt: NewApduDataExt(length), } _result._ApduDataExt._ApduDataExtChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataExtWriteRoutingTableRequest(length uint8) *_ApduDataExtWriteRout // Deprecated: use the interface for direct cast func CastApduDataExtWriteRoutingTableRequest(structType interface{}) ApduDataExtWriteRoutingTableRequest { - if casted, ok := structType.(ApduDataExtWriteRoutingTableRequest); ok { + if casted, ok := structType.(ApduDataExtWriteRoutingTableRequest); ok { return casted } if casted, ok := structType.(*ApduDataExtWriteRoutingTableRequest); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataExtWriteRoutingTableRequest) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_ApduDataExtWriteRoutingTableRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataExtWriteRoutingTableRequest) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataExtWriteRoutingTableRequest) isApduDataExtWriteRoutingTableRequest() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataExtWriteRoutingTableRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataGroupValueRead.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataGroupValueRead.go index e39c6bacd59..4417590322b 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataGroupValueRead.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataGroupValueRead.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataGroupValueRead is the corresponding interface of ApduDataGroupValueRead type ApduDataGroupValueRead interface { @@ -48,30 +50,32 @@ type _ApduDataGroupValueRead struct { reservedField0 *uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataGroupValueRead) GetApciType() uint8 { - return 0x0 -} +func (m *_ApduDataGroupValueRead) GetApciType() uint8 { +return 0x0} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataGroupValueRead) InitializeParent(parent ApduData) {} +func (m *_ApduDataGroupValueRead) InitializeParent(parent ApduData ) {} -func (m *_ApduDataGroupValueRead) GetParent() ApduData { +func (m *_ApduDataGroupValueRead) GetParent() ApduData { return m._ApduData } + // NewApduDataGroupValueRead factory function for _ApduDataGroupValueRead -func NewApduDataGroupValueRead(dataLength uint8) *_ApduDataGroupValueRead { +func NewApduDataGroupValueRead( dataLength uint8 ) *_ApduDataGroupValueRead { _result := &_ApduDataGroupValueRead{ - _ApduData: NewApduData(dataLength), + _ApduData: NewApduData(dataLength), } _result._ApduData._ApduDataChildRequirements = _result return _result @@ -79,7 +83,7 @@ func NewApduDataGroupValueRead(dataLength uint8) *_ApduDataGroupValueRead { // Deprecated: use the interface for direct cast func CastApduDataGroupValueRead(structType interface{}) ApduDataGroupValueRead { - if casted, ok := structType.(ApduDataGroupValueRead); ok { + if casted, ok := structType.(ApduDataGroupValueRead); ok { return casted } if casted, ok := structType.(*ApduDataGroupValueRead); ok { @@ -101,6 +105,7 @@ func (m *_ApduDataGroupValueRead) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_ApduDataGroupValueRead) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -128,7 +133,7 @@ func ApduDataGroupValueReadParseWithBuffer(ctx context.Context, readBuffer utils if reserved != uint8(0x00) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -166,21 +171,21 @@ func (m *_ApduDataGroupValueRead) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for ApduDataGroupValueRead") } - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0x00) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0x00), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteUint8("reserved", 6, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0x00) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0x00), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 } + _err := writeBuffer.WriteUint8("reserved", 6, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") + } + } if popErr := writeBuffer.PopContext("ApduDataGroupValueRead"); popErr != nil { return errors.Wrap(popErr, "Error popping for ApduDataGroupValueRead") @@ -190,6 +195,7 @@ func (m *_ApduDataGroupValueRead) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataGroupValueRead) isApduDataGroupValueRead() bool { return true } @@ -204,3 +210,6 @@ func (m *_ApduDataGroupValueRead) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataGroupValueResponse.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataGroupValueResponse.go index eead85e17e2..8f1120e7acc 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataGroupValueResponse.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataGroupValueResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataGroupValueResponse is the corresponding interface of ApduDataGroupValueResponse type ApduDataGroupValueResponse interface { @@ -48,30 +50,30 @@ type ApduDataGroupValueResponseExactly interface { // _ApduDataGroupValueResponse is the data-structure of this message type _ApduDataGroupValueResponse struct { *_ApduData - DataFirstByte int8 - Data []byte + DataFirstByte int8 + Data []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataGroupValueResponse) GetApciType() uint8 { - return 0x1 -} +func (m *_ApduDataGroupValueResponse) GetApciType() uint8 { +return 0x1} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataGroupValueResponse) InitializeParent(parent ApduData) {} +func (m *_ApduDataGroupValueResponse) InitializeParent(parent ApduData ) {} -func (m *_ApduDataGroupValueResponse) GetParent() ApduData { +func (m *_ApduDataGroupValueResponse) GetParent() ApduData { return m._ApduData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_ApduDataGroupValueResponse) GetData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewApduDataGroupValueResponse factory function for _ApduDataGroupValueResponse -func NewApduDataGroupValueResponse(dataFirstByte int8, data []byte, dataLength uint8) *_ApduDataGroupValueResponse { +func NewApduDataGroupValueResponse( dataFirstByte int8 , data []byte , dataLength uint8 ) *_ApduDataGroupValueResponse { _result := &_ApduDataGroupValueResponse{ DataFirstByte: dataFirstByte, - Data: data, - _ApduData: NewApduData(dataLength), + Data: data, + _ApduData: NewApduData(dataLength), } _result._ApduData._ApduDataChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewApduDataGroupValueResponse(dataFirstByte int8, data []byte, dataLength u // Deprecated: use the interface for direct cast func CastApduDataGroupValueResponse(structType interface{}) ApduDataGroupValueResponse { - if casted, ok := structType.(ApduDataGroupValueResponse); ok { + if casted, ok := structType.(ApduDataGroupValueResponse); ok { return casted } if casted, ok := structType.(*ApduDataGroupValueResponse); ok { @@ -120,7 +123,7 @@ func (m *_ApduDataGroupValueResponse) GetLengthInBits(ctx context.Context) uint1 lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (dataFirstByte) - lengthInBits += 6 + lengthInBits += 6; // Array field if len(m.Data) > 0 { @@ -130,6 +133,7 @@ func (m *_ApduDataGroupValueResponse) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_ApduDataGroupValueResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -148,13 +152,13 @@ func ApduDataGroupValueResponseParseWithBuffer(ctx context.Context, readBuffer u _ = currentPos // Simple Field (dataFirstByte) - _dataFirstByte, _dataFirstByteErr := readBuffer.ReadInt8("dataFirstByte", 6) +_dataFirstByte, _dataFirstByteErr := readBuffer.ReadInt8("dataFirstByte", 6) if _dataFirstByteErr != nil { return nil, errors.Wrap(_dataFirstByteErr, "Error parsing 'dataFirstByte' field of ApduDataGroupValueResponse") } dataFirstByte := _dataFirstByte // Byte Array field (data) - numberOfBytesdata := int(utils.InlineIf((bool((dataLength) < (1))), func() interface{} { return uint16(uint16(0)) }, func() interface{} { return uint16(uint16(dataLength) - uint16(uint16(1))) }).(uint16)) + numberOfBytesdata := int(utils.InlineIf((bool((dataLength) < ((1)))), func() interface{} {return uint16(uint16(0))}, func() interface{} {return uint16(uint16(dataLength) - uint16(uint16(1)))}).(uint16)) data, _readArrayErr := readBuffer.ReadByteArray("data", numberOfBytesdata) if _readArrayErr != nil { return nil, errors.Wrap(_readArrayErr, "Error parsing 'data' field of ApduDataGroupValueResponse") @@ -170,7 +174,7 @@ func ApduDataGroupValueResponseParseWithBuffer(ctx context.Context, readBuffer u DataLength: dataLength, }, DataFirstByte: dataFirstByte, - Data: data, + Data: data, } _child._ApduData._ApduDataChildRequirements = _child return _child, nil @@ -192,18 +196,18 @@ func (m *_ApduDataGroupValueResponse) SerializeWithWriteBuffer(ctx context.Conte return errors.Wrap(pushErr, "Error pushing for ApduDataGroupValueResponse") } - // Simple Field (dataFirstByte) - dataFirstByte := int8(m.GetDataFirstByte()) - _dataFirstByteErr := writeBuffer.WriteInt8("dataFirstByte", 6, (dataFirstByte)) - if _dataFirstByteErr != nil { - return errors.Wrap(_dataFirstByteErr, "Error serializing 'dataFirstByte' field") - } + // Simple Field (dataFirstByte) + dataFirstByte := int8(m.GetDataFirstByte()) + _dataFirstByteErr := writeBuffer.WriteInt8("dataFirstByte", 6, (dataFirstByte)) + if _dataFirstByteErr != nil { + return errors.Wrap(_dataFirstByteErr, "Error serializing 'dataFirstByte' field") + } - // Array Field (data) - // Byte Array field (data) - if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { - return errors.Wrap(err, "Error serializing 'data' field") - } + // Array Field (data) + // Byte Array field (data) + if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { + return errors.Wrap(err, "Error serializing 'data' field") + } if popErr := writeBuffer.PopContext("ApduDataGroupValueResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for ApduDataGroupValueResponse") @@ -213,6 +217,7 @@ func (m *_ApduDataGroupValueResponse) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataGroupValueResponse) isApduDataGroupValueResponse() bool { return true } @@ -227,3 +232,6 @@ func (m *_ApduDataGroupValueResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataGroupValueWrite.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataGroupValueWrite.go index 38e311dfeaf..542b62e7e62 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataGroupValueWrite.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataGroupValueWrite.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataGroupValueWrite is the corresponding interface of ApduDataGroupValueWrite type ApduDataGroupValueWrite interface { @@ -48,30 +50,30 @@ type ApduDataGroupValueWriteExactly interface { // _ApduDataGroupValueWrite is the data-structure of this message type _ApduDataGroupValueWrite struct { *_ApduData - DataFirstByte int8 - Data []byte + DataFirstByte int8 + Data []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataGroupValueWrite) GetApciType() uint8 { - return 0x2 -} +func (m *_ApduDataGroupValueWrite) GetApciType() uint8 { +return 0x2} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataGroupValueWrite) InitializeParent(parent ApduData) {} +func (m *_ApduDataGroupValueWrite) InitializeParent(parent ApduData ) {} -func (m *_ApduDataGroupValueWrite) GetParent() ApduData { +func (m *_ApduDataGroupValueWrite) GetParent() ApduData { return m._ApduData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_ApduDataGroupValueWrite) GetData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewApduDataGroupValueWrite factory function for _ApduDataGroupValueWrite -func NewApduDataGroupValueWrite(dataFirstByte int8, data []byte, dataLength uint8) *_ApduDataGroupValueWrite { +func NewApduDataGroupValueWrite( dataFirstByte int8 , data []byte , dataLength uint8 ) *_ApduDataGroupValueWrite { _result := &_ApduDataGroupValueWrite{ DataFirstByte: dataFirstByte, - Data: data, - _ApduData: NewApduData(dataLength), + Data: data, + _ApduData: NewApduData(dataLength), } _result._ApduData._ApduDataChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewApduDataGroupValueWrite(dataFirstByte int8, data []byte, dataLength uint // Deprecated: use the interface for direct cast func CastApduDataGroupValueWrite(structType interface{}) ApduDataGroupValueWrite { - if casted, ok := structType.(ApduDataGroupValueWrite); ok { + if casted, ok := structType.(ApduDataGroupValueWrite); ok { return casted } if casted, ok := structType.(*ApduDataGroupValueWrite); ok { @@ -120,7 +123,7 @@ func (m *_ApduDataGroupValueWrite) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (dataFirstByte) - lengthInBits += 6 + lengthInBits += 6; // Array field if len(m.Data) > 0 { @@ -130,6 +133,7 @@ func (m *_ApduDataGroupValueWrite) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_ApduDataGroupValueWrite) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -148,13 +152,13 @@ func ApduDataGroupValueWriteParseWithBuffer(ctx context.Context, readBuffer util _ = currentPos // Simple Field (dataFirstByte) - _dataFirstByte, _dataFirstByteErr := readBuffer.ReadInt8("dataFirstByte", 6) +_dataFirstByte, _dataFirstByteErr := readBuffer.ReadInt8("dataFirstByte", 6) if _dataFirstByteErr != nil { return nil, errors.Wrap(_dataFirstByteErr, "Error parsing 'dataFirstByte' field of ApduDataGroupValueWrite") } dataFirstByte := _dataFirstByte // Byte Array field (data) - numberOfBytesdata := int(utils.InlineIf((bool((dataLength) < (1))), func() interface{} { return uint16(uint16(0)) }, func() interface{} { return uint16(uint16(dataLength) - uint16(uint16(1))) }).(uint16)) + numberOfBytesdata := int(utils.InlineIf((bool((dataLength) < ((1)))), func() interface{} {return uint16(uint16(0))}, func() interface{} {return uint16(uint16(dataLength) - uint16(uint16(1)))}).(uint16)) data, _readArrayErr := readBuffer.ReadByteArray("data", numberOfBytesdata) if _readArrayErr != nil { return nil, errors.Wrap(_readArrayErr, "Error parsing 'data' field of ApduDataGroupValueWrite") @@ -170,7 +174,7 @@ func ApduDataGroupValueWriteParseWithBuffer(ctx context.Context, readBuffer util DataLength: dataLength, }, DataFirstByte: dataFirstByte, - Data: data, + Data: data, } _child._ApduData._ApduDataChildRequirements = _child return _child, nil @@ -192,18 +196,18 @@ func (m *_ApduDataGroupValueWrite) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for ApduDataGroupValueWrite") } - // Simple Field (dataFirstByte) - dataFirstByte := int8(m.GetDataFirstByte()) - _dataFirstByteErr := writeBuffer.WriteInt8("dataFirstByte", 6, (dataFirstByte)) - if _dataFirstByteErr != nil { - return errors.Wrap(_dataFirstByteErr, "Error serializing 'dataFirstByte' field") - } + // Simple Field (dataFirstByte) + dataFirstByte := int8(m.GetDataFirstByte()) + _dataFirstByteErr := writeBuffer.WriteInt8("dataFirstByte", 6, (dataFirstByte)) + if _dataFirstByteErr != nil { + return errors.Wrap(_dataFirstByteErr, "Error serializing 'dataFirstByte' field") + } - // Array Field (data) - // Byte Array field (data) - if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { - return errors.Wrap(err, "Error serializing 'data' field") - } + // Array Field (data) + // Byte Array field (data) + if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { + return errors.Wrap(err, "Error serializing 'data' field") + } if popErr := writeBuffer.PopContext("ApduDataGroupValueWrite"); popErr != nil { return errors.Wrap(popErr, "Error popping for ApduDataGroupValueWrite") @@ -213,6 +217,7 @@ func (m *_ApduDataGroupValueWrite) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataGroupValueWrite) isApduDataGroupValueWrite() bool { return true } @@ -227,3 +232,6 @@ func (m *_ApduDataGroupValueWrite) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataIndividualAddressRead.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataIndividualAddressRead.go index 97b44475fa3..eb3a2a0f3ff 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataIndividualAddressRead.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataIndividualAddressRead.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataIndividualAddressRead is the corresponding interface of ApduDataIndividualAddressRead type ApduDataIndividualAddressRead interface { @@ -46,30 +48,32 @@ type _ApduDataIndividualAddressRead struct { *_ApduData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataIndividualAddressRead) GetApciType() uint8 { - return 0x4 -} +func (m *_ApduDataIndividualAddressRead) GetApciType() uint8 { +return 0x4} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataIndividualAddressRead) InitializeParent(parent ApduData) {} +func (m *_ApduDataIndividualAddressRead) InitializeParent(parent ApduData ) {} -func (m *_ApduDataIndividualAddressRead) GetParent() ApduData { +func (m *_ApduDataIndividualAddressRead) GetParent() ApduData { return m._ApduData } + // NewApduDataIndividualAddressRead factory function for _ApduDataIndividualAddressRead -func NewApduDataIndividualAddressRead(dataLength uint8) *_ApduDataIndividualAddressRead { +func NewApduDataIndividualAddressRead( dataLength uint8 ) *_ApduDataIndividualAddressRead { _result := &_ApduDataIndividualAddressRead{ - _ApduData: NewApduData(dataLength), + _ApduData: NewApduData(dataLength), } _result._ApduData._ApduDataChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataIndividualAddressRead(dataLength uint8) *_ApduDataIndividualAddr // Deprecated: use the interface for direct cast func CastApduDataIndividualAddressRead(structType interface{}) ApduDataIndividualAddressRead { - if casted, ok := structType.(ApduDataIndividualAddressRead); ok { + if casted, ok := structType.(ApduDataIndividualAddressRead); ok { return casted } if casted, ok := structType.(*ApduDataIndividualAddressRead); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataIndividualAddressRead) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_ApduDataIndividualAddressRead) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataIndividualAddressRead) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataIndividualAddressRead) isApduDataIndividualAddressRead() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataIndividualAddressRead) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataIndividualAddressResponse.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataIndividualAddressResponse.go index c57d8631fc6..4186dc3c668 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataIndividualAddressResponse.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataIndividualAddressResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataIndividualAddressResponse is the corresponding interface of ApduDataIndividualAddressResponse type ApduDataIndividualAddressResponse interface { @@ -46,30 +48,32 @@ type _ApduDataIndividualAddressResponse struct { *_ApduData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataIndividualAddressResponse) GetApciType() uint8 { - return 0x5 -} +func (m *_ApduDataIndividualAddressResponse) GetApciType() uint8 { +return 0x5} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataIndividualAddressResponse) InitializeParent(parent ApduData) {} +func (m *_ApduDataIndividualAddressResponse) InitializeParent(parent ApduData ) {} -func (m *_ApduDataIndividualAddressResponse) GetParent() ApduData { +func (m *_ApduDataIndividualAddressResponse) GetParent() ApduData { return m._ApduData } + // NewApduDataIndividualAddressResponse factory function for _ApduDataIndividualAddressResponse -func NewApduDataIndividualAddressResponse(dataLength uint8) *_ApduDataIndividualAddressResponse { +func NewApduDataIndividualAddressResponse( dataLength uint8 ) *_ApduDataIndividualAddressResponse { _result := &_ApduDataIndividualAddressResponse{ - _ApduData: NewApduData(dataLength), + _ApduData: NewApduData(dataLength), } _result._ApduData._ApduDataChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataIndividualAddressResponse(dataLength uint8) *_ApduDataIndividual // Deprecated: use the interface for direct cast func CastApduDataIndividualAddressResponse(structType interface{}) ApduDataIndividualAddressResponse { - if casted, ok := structType.(ApduDataIndividualAddressResponse); ok { + if casted, ok := structType.(ApduDataIndividualAddressResponse); ok { return casted } if casted, ok := structType.(*ApduDataIndividualAddressResponse); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataIndividualAddressResponse) GetLengthInBits(ctx context.Context return lengthInBits } + func (m *_ApduDataIndividualAddressResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataIndividualAddressResponse) SerializeWithWriteBuffer(ctx contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataIndividualAddressResponse) isApduDataIndividualAddressResponse() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataIndividualAddressResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataIndividualAddressWrite.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataIndividualAddressWrite.go index df7bfece1bb..ede1c7af4a1 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataIndividualAddressWrite.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataIndividualAddressWrite.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataIndividualAddressWrite is the corresponding interface of ApduDataIndividualAddressWrite type ApduDataIndividualAddressWrite interface { @@ -46,30 +48,32 @@ type _ApduDataIndividualAddressWrite struct { *_ApduData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataIndividualAddressWrite) GetApciType() uint8 { - return 0x3 -} +func (m *_ApduDataIndividualAddressWrite) GetApciType() uint8 { +return 0x3} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataIndividualAddressWrite) InitializeParent(parent ApduData) {} +func (m *_ApduDataIndividualAddressWrite) InitializeParent(parent ApduData ) {} -func (m *_ApduDataIndividualAddressWrite) GetParent() ApduData { +func (m *_ApduDataIndividualAddressWrite) GetParent() ApduData { return m._ApduData } + // NewApduDataIndividualAddressWrite factory function for _ApduDataIndividualAddressWrite -func NewApduDataIndividualAddressWrite(dataLength uint8) *_ApduDataIndividualAddressWrite { +func NewApduDataIndividualAddressWrite( dataLength uint8 ) *_ApduDataIndividualAddressWrite { _result := &_ApduDataIndividualAddressWrite{ - _ApduData: NewApduData(dataLength), + _ApduData: NewApduData(dataLength), } _result._ApduData._ApduDataChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataIndividualAddressWrite(dataLength uint8) *_ApduDataIndividualAdd // Deprecated: use the interface for direct cast func CastApduDataIndividualAddressWrite(structType interface{}) ApduDataIndividualAddressWrite { - if casted, ok := structType.(ApduDataIndividualAddressWrite); ok { + if casted, ok := structType.(ApduDataIndividualAddressWrite); ok { return casted } if casted, ok := structType.(*ApduDataIndividualAddressWrite); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataIndividualAddressWrite) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_ApduDataIndividualAddressWrite) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataIndividualAddressWrite) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataIndividualAddressWrite) isApduDataIndividualAddressWrite() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataIndividualAddressWrite) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataMemoryRead.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataMemoryRead.go index 295fa594428..051533d4b53 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataMemoryRead.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataMemoryRead.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataMemoryRead is the corresponding interface of ApduDataMemoryRead type ApduDataMemoryRead interface { @@ -48,30 +50,30 @@ type ApduDataMemoryReadExactly interface { // _ApduDataMemoryRead is the data-structure of this message type _ApduDataMemoryRead struct { *_ApduData - NumBytes uint8 - Address uint16 + NumBytes uint8 + Address uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataMemoryRead) GetApciType() uint8 { - return 0x8 -} +func (m *_ApduDataMemoryRead) GetApciType() uint8 { +return 0x8} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataMemoryRead) InitializeParent(parent ApduData) {} +func (m *_ApduDataMemoryRead) InitializeParent(parent ApduData ) {} -func (m *_ApduDataMemoryRead) GetParent() ApduData { +func (m *_ApduDataMemoryRead) GetParent() ApduData { return m._ApduData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_ApduDataMemoryRead) GetAddress() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewApduDataMemoryRead factory function for _ApduDataMemoryRead -func NewApduDataMemoryRead(numBytes uint8, address uint16, dataLength uint8) *_ApduDataMemoryRead { +func NewApduDataMemoryRead( numBytes uint8 , address uint16 , dataLength uint8 ) *_ApduDataMemoryRead { _result := &_ApduDataMemoryRead{ - NumBytes: numBytes, - Address: address, - _ApduData: NewApduData(dataLength), + NumBytes: numBytes, + Address: address, + _ApduData: NewApduData(dataLength), } _result._ApduData._ApduDataChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewApduDataMemoryRead(numBytes uint8, address uint16, dataLength uint8) *_A // Deprecated: use the interface for direct cast func CastApduDataMemoryRead(structType interface{}) ApduDataMemoryRead { - if casted, ok := structType.(ApduDataMemoryRead); ok { + if casted, ok := structType.(ApduDataMemoryRead); ok { return casted } if casted, ok := structType.(*ApduDataMemoryRead); ok { @@ -120,14 +123,15 @@ func (m *_ApduDataMemoryRead) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (numBytes) - lengthInBits += 6 + lengthInBits += 6; // Simple field (address) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_ApduDataMemoryRead) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -146,14 +150,14 @@ func ApduDataMemoryReadParseWithBuffer(ctx context.Context, readBuffer utils.Rea _ = currentPos // Simple Field (numBytes) - _numBytes, _numBytesErr := readBuffer.ReadUint8("numBytes", 6) +_numBytes, _numBytesErr := readBuffer.ReadUint8("numBytes", 6) if _numBytesErr != nil { return nil, errors.Wrap(_numBytesErr, "Error parsing 'numBytes' field of ApduDataMemoryRead") } numBytes := _numBytes // Simple Field (address) - _address, _addressErr := readBuffer.ReadUint16("address", 16) +_address, _addressErr := readBuffer.ReadUint16("address", 16) if _addressErr != nil { return nil, errors.Wrap(_addressErr, "Error parsing 'address' field of ApduDataMemoryRead") } @@ -169,7 +173,7 @@ func ApduDataMemoryReadParseWithBuffer(ctx context.Context, readBuffer utils.Rea DataLength: dataLength, }, NumBytes: numBytes, - Address: address, + Address: address, } _child._ApduData._ApduDataChildRequirements = _child return _child, nil @@ -191,19 +195,19 @@ func (m *_ApduDataMemoryRead) SerializeWithWriteBuffer(ctx context.Context, writ return errors.Wrap(pushErr, "Error pushing for ApduDataMemoryRead") } - // Simple Field (numBytes) - numBytes := uint8(m.GetNumBytes()) - _numBytesErr := writeBuffer.WriteUint8("numBytes", 6, (numBytes)) - if _numBytesErr != nil { - return errors.Wrap(_numBytesErr, "Error serializing 'numBytes' field") - } + // Simple Field (numBytes) + numBytes := uint8(m.GetNumBytes()) + _numBytesErr := writeBuffer.WriteUint8("numBytes", 6, (numBytes)) + if _numBytesErr != nil { + return errors.Wrap(_numBytesErr, "Error serializing 'numBytes' field") + } - // Simple Field (address) - address := uint16(m.GetAddress()) - _addressErr := writeBuffer.WriteUint16("address", 16, (address)) - if _addressErr != nil { - return errors.Wrap(_addressErr, "Error serializing 'address' field") - } + // Simple Field (address) + address := uint16(m.GetAddress()) + _addressErr := writeBuffer.WriteUint16("address", 16, (address)) + if _addressErr != nil { + return errors.Wrap(_addressErr, "Error serializing 'address' field") + } if popErr := writeBuffer.PopContext("ApduDataMemoryRead"); popErr != nil { return errors.Wrap(popErr, "Error popping for ApduDataMemoryRead") @@ -213,6 +217,7 @@ func (m *_ApduDataMemoryRead) SerializeWithWriteBuffer(ctx context.Context, writ return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataMemoryRead) isApduDataMemoryRead() bool { return true } @@ -227,3 +232,6 @@ func (m *_ApduDataMemoryRead) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataMemoryResponse.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataMemoryResponse.go index e6ffe0d2f67..7899190c745 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataMemoryResponse.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataMemoryResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataMemoryResponse is the corresponding interface of ApduDataMemoryResponse type ApduDataMemoryResponse interface { @@ -48,30 +50,30 @@ type ApduDataMemoryResponseExactly interface { // _ApduDataMemoryResponse is the data-structure of this message type _ApduDataMemoryResponse struct { *_ApduData - Address uint16 - Data []byte + Address uint16 + Data []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataMemoryResponse) GetApciType() uint8 { - return 0x9 -} +func (m *_ApduDataMemoryResponse) GetApciType() uint8 { +return 0x9} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataMemoryResponse) InitializeParent(parent ApduData) {} +func (m *_ApduDataMemoryResponse) InitializeParent(parent ApduData ) {} -func (m *_ApduDataMemoryResponse) GetParent() ApduData { +func (m *_ApduDataMemoryResponse) GetParent() ApduData { return m._ApduData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_ApduDataMemoryResponse) GetData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewApduDataMemoryResponse factory function for _ApduDataMemoryResponse -func NewApduDataMemoryResponse(address uint16, data []byte, dataLength uint8) *_ApduDataMemoryResponse { +func NewApduDataMemoryResponse( address uint16 , data []byte , dataLength uint8 ) *_ApduDataMemoryResponse { _result := &_ApduDataMemoryResponse{ - Address: address, - Data: data, - _ApduData: NewApduData(dataLength), + Address: address, + Data: data, + _ApduData: NewApduData(dataLength), } _result._ApduData._ApduDataChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewApduDataMemoryResponse(address uint16, data []byte, dataLength uint8) *_ // Deprecated: use the interface for direct cast func CastApduDataMemoryResponse(structType interface{}) ApduDataMemoryResponse { - if casted, ok := structType.(ApduDataMemoryResponse); ok { + if casted, ok := structType.(ApduDataMemoryResponse); ok { return casted } if casted, ok := structType.(*ApduDataMemoryResponse); ok { @@ -123,7 +126,7 @@ func (m *_ApduDataMemoryResponse) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += 6 // Simple field (address) - lengthInBits += 16 + lengthInBits += 16; // Array field if len(m.Data) > 0 { @@ -133,6 +136,7 @@ func (m *_ApduDataMemoryResponse) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_ApduDataMemoryResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -158,7 +162,7 @@ func ApduDataMemoryResponseParseWithBuffer(ctx context.Context, readBuffer utils } // Simple Field (address) - _address, _addressErr := readBuffer.ReadUint16("address", 16) +_address, _addressErr := readBuffer.ReadUint16("address", 16) if _addressErr != nil { return nil, errors.Wrap(_addressErr, "Error parsing 'address' field of ApduDataMemoryResponse") } @@ -180,7 +184,7 @@ func ApduDataMemoryResponseParseWithBuffer(ctx context.Context, readBuffer utils DataLength: dataLength, }, Address: address, - Data: data, + Data: data, } _child._ApduData._ApduDataChildRequirements = _child return _child, nil @@ -202,25 +206,25 @@ func (m *_ApduDataMemoryResponse) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for ApduDataMemoryResponse") } - // Implicit Field (numBytes) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - numBytes := uint8(uint8(len(m.GetData()))) - _numBytesErr := writeBuffer.WriteUint8("numBytes", 6, (numBytes)) - if _numBytesErr != nil { - return errors.Wrap(_numBytesErr, "Error serializing 'numBytes' field") - } + // Implicit Field (numBytes) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) + numBytes := uint8(uint8(len(m.GetData()))) + _numBytesErr := writeBuffer.WriteUint8("numBytes", 6, (numBytes)) + if _numBytesErr != nil { + return errors.Wrap(_numBytesErr, "Error serializing 'numBytes' field") + } - // Simple Field (address) - address := uint16(m.GetAddress()) - _addressErr := writeBuffer.WriteUint16("address", 16, (address)) - if _addressErr != nil { - return errors.Wrap(_addressErr, "Error serializing 'address' field") - } + // Simple Field (address) + address := uint16(m.GetAddress()) + _addressErr := writeBuffer.WriteUint16("address", 16, (address)) + if _addressErr != nil { + return errors.Wrap(_addressErr, "Error serializing 'address' field") + } - // Array Field (data) - // Byte Array field (data) - if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { - return errors.Wrap(err, "Error serializing 'data' field") - } + // Array Field (data) + // Byte Array field (data) + if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { + return errors.Wrap(err, "Error serializing 'data' field") + } if popErr := writeBuffer.PopContext("ApduDataMemoryResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for ApduDataMemoryResponse") @@ -230,6 +234,7 @@ func (m *_ApduDataMemoryResponse) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataMemoryResponse) isApduDataMemoryResponse() bool { return true } @@ -244,3 +249,6 @@ func (m *_ApduDataMemoryResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataMemoryWrite.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataMemoryWrite.go index 63c68a0bd4b..3b1ce50423c 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataMemoryWrite.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataMemoryWrite.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataMemoryWrite is the corresponding interface of ApduDataMemoryWrite type ApduDataMemoryWrite interface { @@ -46,30 +48,32 @@ type _ApduDataMemoryWrite struct { *_ApduData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataMemoryWrite) GetApciType() uint8 { - return 0xA -} +func (m *_ApduDataMemoryWrite) GetApciType() uint8 { +return 0xA} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataMemoryWrite) InitializeParent(parent ApduData) {} +func (m *_ApduDataMemoryWrite) InitializeParent(parent ApduData ) {} -func (m *_ApduDataMemoryWrite) GetParent() ApduData { +func (m *_ApduDataMemoryWrite) GetParent() ApduData { return m._ApduData } + // NewApduDataMemoryWrite factory function for _ApduDataMemoryWrite -func NewApduDataMemoryWrite(dataLength uint8) *_ApduDataMemoryWrite { +func NewApduDataMemoryWrite( dataLength uint8 ) *_ApduDataMemoryWrite { _result := &_ApduDataMemoryWrite{ - _ApduData: NewApduData(dataLength), + _ApduData: NewApduData(dataLength), } _result._ApduData._ApduDataChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataMemoryWrite(dataLength uint8) *_ApduDataMemoryWrite { // Deprecated: use the interface for direct cast func CastApduDataMemoryWrite(structType interface{}) ApduDataMemoryWrite { - if casted, ok := structType.(ApduDataMemoryWrite); ok { + if casted, ok := structType.(ApduDataMemoryWrite); ok { return casted } if casted, ok := structType.(*ApduDataMemoryWrite); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataMemoryWrite) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_ApduDataMemoryWrite) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataMemoryWrite) SerializeWithWriteBuffer(ctx context.Context, wri return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataMemoryWrite) isApduDataMemoryWrite() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataMemoryWrite) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataOther.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataOther.go index 875698d8b4d..b4f593383d2 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataOther.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataOther.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataOther is the corresponding interface of ApduDataOther type ApduDataOther interface { @@ -46,29 +48,29 @@ type ApduDataOtherExactly interface { // _ApduDataOther is the data-structure of this message type _ApduDataOther struct { *_ApduData - ExtendedApdu ApduDataExt + ExtendedApdu ApduDataExt } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataOther) GetApciType() uint8 { - return 0xF -} +func (m *_ApduDataOther) GetApciType() uint8 { +return 0xF} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataOther) InitializeParent(parent ApduData) {} +func (m *_ApduDataOther) InitializeParent(parent ApduData ) {} -func (m *_ApduDataOther) GetParent() ApduData { +func (m *_ApduDataOther) GetParent() ApduData { return m._ApduData } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_ApduDataOther) GetExtendedApdu() ApduDataExt { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewApduDataOther factory function for _ApduDataOther -func NewApduDataOther(extendedApdu ApduDataExt, dataLength uint8) *_ApduDataOther { +func NewApduDataOther( extendedApdu ApduDataExt , dataLength uint8 ) *_ApduDataOther { _result := &_ApduDataOther{ ExtendedApdu: extendedApdu, - _ApduData: NewApduData(dataLength), + _ApduData: NewApduData(dataLength), } _result._ApduData._ApduDataChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewApduDataOther(extendedApdu ApduDataExt, dataLength uint8) *_ApduDataOthe // Deprecated: use the interface for direct cast func CastApduDataOther(structType interface{}) ApduDataOther { - if casted, ok := structType.(ApduDataOther); ok { + if casted, ok := structType.(ApduDataOther); ok { return casted } if casted, ok := structType.(*ApduDataOther); ok { @@ -117,6 +120,7 @@ func (m *_ApduDataOther) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_ApduDataOther) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func ApduDataOtherParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff if pullErr := readBuffer.PullContext("extendedApdu"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for extendedApdu") } - _extendedApdu, _extendedApduErr := ApduDataExtParseWithBuffer(ctx, readBuffer, uint8(dataLength)) +_extendedApdu, _extendedApduErr := ApduDataExtParseWithBuffer(ctx, readBuffer , uint8( dataLength ) ) if _extendedApduErr != nil { return nil, errors.Wrap(_extendedApduErr, "Error parsing 'extendedApdu' field of ApduDataOther") } @@ -178,17 +182,17 @@ func (m *_ApduDataOther) SerializeWithWriteBuffer(ctx context.Context, writeBuff return errors.Wrap(pushErr, "Error pushing for ApduDataOther") } - // Simple Field (extendedApdu) - if pushErr := writeBuffer.PushContext("extendedApdu"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for extendedApdu") - } - _extendedApduErr := writeBuffer.WriteSerializable(ctx, m.GetExtendedApdu()) - if popErr := writeBuffer.PopContext("extendedApdu"); popErr != nil { - return errors.Wrap(popErr, "Error popping for extendedApdu") - } - if _extendedApduErr != nil { - return errors.Wrap(_extendedApduErr, "Error serializing 'extendedApdu' field") - } + // Simple Field (extendedApdu) + if pushErr := writeBuffer.PushContext("extendedApdu"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for extendedApdu") + } + _extendedApduErr := writeBuffer.WriteSerializable(ctx, m.GetExtendedApdu()) + if popErr := writeBuffer.PopContext("extendedApdu"); popErr != nil { + return errors.Wrap(popErr, "Error popping for extendedApdu") + } + if _extendedApduErr != nil { + return errors.Wrap(_extendedApduErr, "Error serializing 'extendedApdu' field") + } if popErr := writeBuffer.PopContext("ApduDataOther"); popErr != nil { return errors.Wrap(popErr, "Error popping for ApduDataOther") @@ -198,6 +202,7 @@ func (m *_ApduDataOther) SerializeWithWriteBuffer(ctx context.Context, writeBuff return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataOther) isApduDataOther() bool { return true } @@ -212,3 +217,6 @@ func (m *_ApduDataOther) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataRestart.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataRestart.go index 49234979c94..39974db04b5 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataRestart.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataRestart.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataRestart is the corresponding interface of ApduDataRestart type ApduDataRestart interface { @@ -46,30 +48,32 @@ type _ApduDataRestart struct { *_ApduData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataRestart) GetApciType() uint8 { - return 0xE -} +func (m *_ApduDataRestart) GetApciType() uint8 { +return 0xE} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataRestart) InitializeParent(parent ApduData) {} +func (m *_ApduDataRestart) InitializeParent(parent ApduData ) {} -func (m *_ApduDataRestart) GetParent() ApduData { +func (m *_ApduDataRestart) GetParent() ApduData { return m._ApduData } + // NewApduDataRestart factory function for _ApduDataRestart -func NewApduDataRestart(dataLength uint8) *_ApduDataRestart { +func NewApduDataRestart( dataLength uint8 ) *_ApduDataRestart { _result := &_ApduDataRestart{ - _ApduData: NewApduData(dataLength), + _ApduData: NewApduData(dataLength), } _result._ApduData._ApduDataChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataRestart(dataLength uint8) *_ApduDataRestart { // Deprecated: use the interface for direct cast func CastApduDataRestart(structType interface{}) ApduDataRestart { - if casted, ok := structType.(ApduDataRestart); ok { + if casted, ok := structType.(ApduDataRestart); ok { return casted } if casted, ok := structType.(*ApduDataRestart); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataRestart) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_ApduDataRestart) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataRestart) SerializeWithWriteBuffer(ctx context.Context, writeBu return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataRestart) isApduDataRestart() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataRestart) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ApduDataUserMessage.go b/plc4go/protocols/knxnetip/readwrite/model/ApduDataUserMessage.go index 54c2d263a13..9794223d0e9 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ApduDataUserMessage.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ApduDataUserMessage.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ApduDataUserMessage is the corresponding interface of ApduDataUserMessage type ApduDataUserMessage interface { @@ -46,30 +48,32 @@ type _ApduDataUserMessage struct { *_ApduData } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ApduDataUserMessage) GetApciType() uint8 { - return 0xB -} +func (m *_ApduDataUserMessage) GetApciType() uint8 { +return 0xB} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ApduDataUserMessage) InitializeParent(parent ApduData) {} +func (m *_ApduDataUserMessage) InitializeParent(parent ApduData ) {} -func (m *_ApduDataUserMessage) GetParent() ApduData { +func (m *_ApduDataUserMessage) GetParent() ApduData { return m._ApduData } + // NewApduDataUserMessage factory function for _ApduDataUserMessage -func NewApduDataUserMessage(dataLength uint8) *_ApduDataUserMessage { +func NewApduDataUserMessage( dataLength uint8 ) *_ApduDataUserMessage { _result := &_ApduDataUserMessage{ - _ApduData: NewApduData(dataLength), + _ApduData: NewApduData(dataLength), } _result._ApduData._ApduDataChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewApduDataUserMessage(dataLength uint8) *_ApduDataUserMessage { // Deprecated: use the interface for direct cast func CastApduDataUserMessage(structType interface{}) ApduDataUserMessage { - if casted, ok := structType.(ApduDataUserMessage); ok { + if casted, ok := structType.(ApduDataUserMessage); ok { return casted } if casted, ok := structType.(*ApduDataUserMessage); ok { @@ -96,6 +100,7 @@ func (m *_ApduDataUserMessage) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_ApduDataUserMessage) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_ApduDataUserMessage) SerializeWithWriteBuffer(ctx context.Context, wri return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ApduDataUserMessage) isApduDataUserMessage() bool { return true } @@ -165,3 +171,6 @@ func (m *_ApduDataUserMessage) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/CEMI.go b/plc4go/protocols/knxnetip/readwrite/model/CEMI.go index 0d79217b047..b6161272e9d 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/CEMI.go +++ b/plc4go/protocols/knxnetip/readwrite/model/CEMI.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CEMI is the corresponding interface of CEMI type CEMI interface { @@ -56,6 +58,7 @@ type _CEMIChildRequirements interface { GetMessageCode() uint8 } + type CEMIParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child CEMI, serializeChildFunction func() error) error GetTypeName() string @@ -63,21 +66,22 @@ type CEMIParent interface { type CEMIChild interface { utils.Serializable - InitializeParent(parent CEMI) +InitializeParent(parent CEMI ) GetParent() *CEMI GetTypeName() string CEMI } + // NewCEMI factory function for _CEMI -func NewCEMI(size uint16) *_CEMI { - return &_CEMI{Size: size} +func NewCEMI( size uint16 ) *_CEMI { +return &_CEMI{ Size: size } } // Deprecated: use the interface for direct cast func CastCEMI(structType interface{}) CEMI { - if casted, ok := structType.(CEMI); ok { + if casted, ok := structType.(CEMI); ok { return casted } if casted, ok := structType.(*CEMI); ok { @@ -90,10 +94,11 @@ func (m *_CEMI) GetTypeName() string { return "CEMI" } + func (m *_CEMI) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Discriminator Field (messageCode) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } @@ -124,58 +129,58 @@ func CEMIParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, size // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type CEMIChildSerializeRequirement interface { CEMI - InitializeParent(CEMI) + InitializeParent(CEMI ) GetParent() CEMI } var _childTemp interface{} var _child CEMIChildSerializeRequirement var typeSwitchError error switch { - case messageCode == 0x2B: // LBusmonInd +case messageCode == 0x2B : // LBusmonInd _childTemp, typeSwitchError = LBusmonIndParseWithBuffer(ctx, readBuffer, size) - case messageCode == 0x11: // LDataReq +case messageCode == 0x11 : // LDataReq _childTemp, typeSwitchError = LDataReqParseWithBuffer(ctx, readBuffer, size) - case messageCode == 0x29: // LDataInd +case messageCode == 0x29 : // LDataInd _childTemp, typeSwitchError = LDataIndParseWithBuffer(ctx, readBuffer, size) - case messageCode == 0x2E: // LDataCon +case messageCode == 0x2E : // LDataCon _childTemp, typeSwitchError = LDataConParseWithBuffer(ctx, readBuffer, size) - case messageCode == 0x10: // LRawReq +case messageCode == 0x10 : // LRawReq _childTemp, typeSwitchError = LRawReqParseWithBuffer(ctx, readBuffer, size) - case messageCode == 0x2D: // LRawInd +case messageCode == 0x2D : // LRawInd _childTemp, typeSwitchError = LRawIndParseWithBuffer(ctx, readBuffer, size) - case messageCode == 0x2F: // LRawCon +case messageCode == 0x2F : // LRawCon _childTemp, typeSwitchError = LRawConParseWithBuffer(ctx, readBuffer, size) - case messageCode == 0x13: // LPollDataReq +case messageCode == 0x13 : // LPollDataReq _childTemp, typeSwitchError = LPollDataReqParseWithBuffer(ctx, readBuffer, size) - case messageCode == 0x25: // LPollDataCon +case messageCode == 0x25 : // LPollDataCon _childTemp, typeSwitchError = LPollDataConParseWithBuffer(ctx, readBuffer, size) - case messageCode == 0x41: // TDataConnectedReq +case messageCode == 0x41 : // TDataConnectedReq _childTemp, typeSwitchError = TDataConnectedReqParseWithBuffer(ctx, readBuffer, size) - case messageCode == 0x89: // TDataConnectedInd +case messageCode == 0x89 : // TDataConnectedInd _childTemp, typeSwitchError = TDataConnectedIndParseWithBuffer(ctx, readBuffer, size) - case messageCode == 0x4A: // TDataIndividualReq +case messageCode == 0x4A : // TDataIndividualReq _childTemp, typeSwitchError = TDataIndividualReqParseWithBuffer(ctx, readBuffer, size) - case messageCode == 0x94: // TDataIndividualInd +case messageCode == 0x94 : // TDataIndividualInd _childTemp, typeSwitchError = TDataIndividualIndParseWithBuffer(ctx, readBuffer, size) - case messageCode == 0xFC: // MPropReadReq +case messageCode == 0xFC : // MPropReadReq _childTemp, typeSwitchError = MPropReadReqParseWithBuffer(ctx, readBuffer, size) - case messageCode == 0xFB: // MPropReadCon +case messageCode == 0xFB : // MPropReadCon _childTemp, typeSwitchError = MPropReadConParseWithBuffer(ctx, readBuffer, size) - case messageCode == 0xF6: // MPropWriteReq +case messageCode == 0xF6 : // MPropWriteReq _childTemp, typeSwitchError = MPropWriteReqParseWithBuffer(ctx, readBuffer, size) - case messageCode == 0xF5: // MPropWriteCon +case messageCode == 0xF5 : // MPropWriteCon _childTemp, typeSwitchError = MPropWriteConParseWithBuffer(ctx, readBuffer, size) - case messageCode == 0xF7: // MPropInfoInd +case messageCode == 0xF7 : // MPropInfoInd _childTemp, typeSwitchError = MPropInfoIndParseWithBuffer(ctx, readBuffer, size) - case messageCode == 0xF8: // MFuncPropCommandReq +case messageCode == 0xF8 : // MFuncPropCommandReq _childTemp, typeSwitchError = MFuncPropCommandReqParseWithBuffer(ctx, readBuffer, size) - case messageCode == 0xF9: // MFuncPropStateReadReq +case messageCode == 0xF9 : // MFuncPropStateReadReq _childTemp, typeSwitchError = MFuncPropStateReadReqParseWithBuffer(ctx, readBuffer, size) - case messageCode == 0xFA: // MFuncPropCon +case messageCode == 0xFA : // MFuncPropCon _childTemp, typeSwitchError = MFuncPropConParseWithBuffer(ctx, readBuffer, size) - case messageCode == 0xF1: // MResetReq +case messageCode == 0xF1 : // MResetReq _childTemp, typeSwitchError = MResetReqParseWithBuffer(ctx, readBuffer, size) - case messageCode == 0xF0: // MResetInd +case messageCode == 0xF0 : // MResetInd _childTemp, typeSwitchError = MResetIndParseWithBuffer(ctx, readBuffer, size) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [messageCode=%v]", messageCode) @@ -190,7 +195,7 @@ func CEMIParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, size } // Finish initializing - _child.InitializeParent(_child) +_child.InitializeParent(_child ) return _child, nil } @@ -200,7 +205,7 @@ func (pm *_CEMI) SerializeParent(ctx context.Context, writeBuffer utils.WriteBuf _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("CEMI"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("CEMI"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for CEMI") } @@ -223,13 +228,13 @@ func (pm *_CEMI) SerializeParent(ctx context.Context, writeBuffer utils.WriteBuf return nil } + //// // Arguments Getter func (m *_CEMI) GetSize() uint16 { return m.Size } - // //// @@ -247,3 +252,6 @@ func (m *_CEMI) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/CEMIAdditionalInformation.go b/plc4go/protocols/knxnetip/readwrite/model/CEMIAdditionalInformation.go index 5cad313f99f..9dade23000b 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/CEMIAdditionalInformation.go +++ b/plc4go/protocols/knxnetip/readwrite/model/CEMIAdditionalInformation.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // CEMIAdditionalInformation is the corresponding interface of CEMIAdditionalInformation type CEMIAdditionalInformation interface { @@ -53,6 +55,7 @@ type _CEMIAdditionalInformationChildRequirements interface { GetAdditionalInformationType() uint8 } + type CEMIAdditionalInformationParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child CEMIAdditionalInformation, serializeChildFunction func() error) error GetTypeName() string @@ -60,21 +63,22 @@ type CEMIAdditionalInformationParent interface { type CEMIAdditionalInformationChild interface { utils.Serializable - InitializeParent(parent CEMIAdditionalInformation) +InitializeParent(parent CEMIAdditionalInformation ) GetParent() *CEMIAdditionalInformation GetTypeName() string CEMIAdditionalInformation } + // NewCEMIAdditionalInformation factory function for _CEMIAdditionalInformation -func NewCEMIAdditionalInformation() *_CEMIAdditionalInformation { - return &_CEMIAdditionalInformation{} +func NewCEMIAdditionalInformation( ) *_CEMIAdditionalInformation { +return &_CEMIAdditionalInformation{ } } // Deprecated: use the interface for direct cast func CastCEMIAdditionalInformation(structType interface{}) CEMIAdditionalInformation { - if casted, ok := structType.(CEMIAdditionalInformation); ok { + if casted, ok := structType.(CEMIAdditionalInformation); ok { return casted } if casted, ok := structType.(*CEMIAdditionalInformation); ok { @@ -87,10 +91,11 @@ func (m *_CEMIAdditionalInformation) GetTypeName() string { return "CEMIAdditionalInformation" } + func (m *_CEMIAdditionalInformation) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Discriminator Field (additionalInformationType) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } @@ -121,17 +126,17 @@ func CEMIAdditionalInformationParseWithBuffer(ctx context.Context, readBuffer ut // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type CEMIAdditionalInformationChildSerializeRequirement interface { CEMIAdditionalInformation - InitializeParent(CEMIAdditionalInformation) + InitializeParent(CEMIAdditionalInformation ) GetParent() CEMIAdditionalInformation } var _childTemp interface{} var _child CEMIAdditionalInformationChildSerializeRequirement var typeSwitchError error switch { - case additionalInformationType == 0x03: // CEMIAdditionalInformationBusmonitorInfo - _childTemp, typeSwitchError = CEMIAdditionalInformationBusmonitorInfoParseWithBuffer(ctx, readBuffer) - case additionalInformationType == 0x04: // CEMIAdditionalInformationRelativeTimestamp - _childTemp, typeSwitchError = CEMIAdditionalInformationRelativeTimestampParseWithBuffer(ctx, readBuffer) +case additionalInformationType == 0x03 : // CEMIAdditionalInformationBusmonitorInfo + _childTemp, typeSwitchError = CEMIAdditionalInformationBusmonitorInfoParseWithBuffer(ctx, readBuffer, ) +case additionalInformationType == 0x04 : // CEMIAdditionalInformationRelativeTimestamp + _childTemp, typeSwitchError = CEMIAdditionalInformationRelativeTimestampParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [additionalInformationType=%v]", additionalInformationType) } @@ -145,7 +150,7 @@ func CEMIAdditionalInformationParseWithBuffer(ctx context.Context, readBuffer ut } // Finish initializing - _child.InitializeParent(_child) +_child.InitializeParent(_child ) return _child, nil } @@ -155,7 +160,7 @@ func (pm *_CEMIAdditionalInformation) SerializeParent(ctx context.Context, write _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("CEMIAdditionalInformation"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("CEMIAdditionalInformation"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for CEMIAdditionalInformation") } @@ -178,6 +183,7 @@ func (pm *_CEMIAdditionalInformation) SerializeParent(ctx context.Context, write return nil } + func (m *_CEMIAdditionalInformation) isCEMIAdditionalInformation() bool { return true } @@ -192,3 +198,6 @@ func (m *_CEMIAdditionalInformation) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/CEMIAdditionalInformationBusmonitorInfo.go b/plc4go/protocols/knxnetip/readwrite/model/CEMIAdditionalInformationBusmonitorInfo.go index 3e363cf08a5..0c5586e8d27 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/CEMIAdditionalInformationBusmonitorInfo.go +++ b/plc4go/protocols/knxnetip/readwrite/model/CEMIAdditionalInformationBusmonitorInfo.go @@ -19,6 +19,7 @@ package model + import ( "context" "fmt" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const CEMIAdditionalInformationBusmonitorInfo_LEN uint8 = uint8(1) @@ -60,35 +62,34 @@ type CEMIAdditionalInformationBusmonitorInfoExactly interface { // _CEMIAdditionalInformationBusmonitorInfo is the data-structure of this message type _CEMIAdditionalInformationBusmonitorInfo struct { *_CEMIAdditionalInformation - FrameErrorFlag bool - BitErrorFlag bool - ParityErrorFlag bool - UnknownFlag bool - LostFlag bool - SequenceNumber uint8 + FrameErrorFlag bool + BitErrorFlag bool + ParityErrorFlag bool + UnknownFlag bool + LostFlag bool + SequenceNumber uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_CEMIAdditionalInformationBusmonitorInfo) GetAdditionalInformationType() uint8 { - return 0x03 -} +func (m *_CEMIAdditionalInformationBusmonitorInfo) GetAdditionalInformationType() uint8 { +return 0x03} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_CEMIAdditionalInformationBusmonitorInfo) InitializeParent(parent CEMIAdditionalInformation) { -} +func (m *_CEMIAdditionalInformationBusmonitorInfo) InitializeParent(parent CEMIAdditionalInformation ) {} -func (m *_CEMIAdditionalInformationBusmonitorInfo) GetParent() CEMIAdditionalInformation { +func (m *_CEMIAdditionalInformationBusmonitorInfo) GetParent() CEMIAdditionalInformation { return m._CEMIAdditionalInformation } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -136,16 +137,17 @@ func (m *_CEMIAdditionalInformationBusmonitorInfo) GetLen() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCEMIAdditionalInformationBusmonitorInfo factory function for _CEMIAdditionalInformationBusmonitorInfo -func NewCEMIAdditionalInformationBusmonitorInfo(frameErrorFlag bool, bitErrorFlag bool, parityErrorFlag bool, unknownFlag bool, lostFlag bool, sequenceNumber uint8) *_CEMIAdditionalInformationBusmonitorInfo { +func NewCEMIAdditionalInformationBusmonitorInfo( frameErrorFlag bool , bitErrorFlag bool , parityErrorFlag bool , unknownFlag bool , lostFlag bool , sequenceNumber uint8 ) *_CEMIAdditionalInformationBusmonitorInfo { _result := &_CEMIAdditionalInformationBusmonitorInfo{ - FrameErrorFlag: frameErrorFlag, - BitErrorFlag: bitErrorFlag, - ParityErrorFlag: parityErrorFlag, - UnknownFlag: unknownFlag, - LostFlag: lostFlag, - SequenceNumber: sequenceNumber, - _CEMIAdditionalInformation: NewCEMIAdditionalInformation(), + FrameErrorFlag: frameErrorFlag, + BitErrorFlag: bitErrorFlag, + ParityErrorFlag: parityErrorFlag, + UnknownFlag: unknownFlag, + LostFlag: lostFlag, + SequenceNumber: sequenceNumber, + _CEMIAdditionalInformation: NewCEMIAdditionalInformation(), } _result._CEMIAdditionalInformation._CEMIAdditionalInformationChildRequirements = _result return _result @@ -153,7 +155,7 @@ func NewCEMIAdditionalInformationBusmonitorInfo(frameErrorFlag bool, bitErrorFla // Deprecated: use the interface for direct cast func CastCEMIAdditionalInformationBusmonitorInfo(structType interface{}) CEMIAdditionalInformationBusmonitorInfo { - if casted, ok := structType.(CEMIAdditionalInformationBusmonitorInfo); ok { + if casted, ok := structType.(CEMIAdditionalInformationBusmonitorInfo); ok { return casted } if casted, ok := structType.(*CEMIAdditionalInformationBusmonitorInfo); ok { @@ -173,26 +175,27 @@ func (m *_CEMIAdditionalInformationBusmonitorInfo) GetLengthInBits(ctx context.C lengthInBits += 8 // Simple field (frameErrorFlag) - lengthInBits += 1 + lengthInBits += 1; // Simple field (bitErrorFlag) - lengthInBits += 1 + lengthInBits += 1; // Simple field (parityErrorFlag) - lengthInBits += 1 + lengthInBits += 1; // Simple field (unknownFlag) - lengthInBits += 1 + lengthInBits += 1; // Simple field (lostFlag) - lengthInBits += 1 + lengthInBits += 1; // Simple field (sequenceNumber) - lengthInBits += 3 + lengthInBits += 3; return lengthInBits } + func (m *_CEMIAdditionalInformationBusmonitorInfo) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -220,42 +223,42 @@ func CEMIAdditionalInformationBusmonitorInfoParseWithBuffer(ctx context.Context, } // Simple Field (frameErrorFlag) - _frameErrorFlag, _frameErrorFlagErr := readBuffer.ReadBit("frameErrorFlag") +_frameErrorFlag, _frameErrorFlagErr := readBuffer.ReadBit("frameErrorFlag") if _frameErrorFlagErr != nil { return nil, errors.Wrap(_frameErrorFlagErr, "Error parsing 'frameErrorFlag' field of CEMIAdditionalInformationBusmonitorInfo") } frameErrorFlag := _frameErrorFlag // Simple Field (bitErrorFlag) - _bitErrorFlag, _bitErrorFlagErr := readBuffer.ReadBit("bitErrorFlag") +_bitErrorFlag, _bitErrorFlagErr := readBuffer.ReadBit("bitErrorFlag") if _bitErrorFlagErr != nil { return nil, errors.Wrap(_bitErrorFlagErr, "Error parsing 'bitErrorFlag' field of CEMIAdditionalInformationBusmonitorInfo") } bitErrorFlag := _bitErrorFlag // Simple Field (parityErrorFlag) - _parityErrorFlag, _parityErrorFlagErr := readBuffer.ReadBit("parityErrorFlag") +_parityErrorFlag, _parityErrorFlagErr := readBuffer.ReadBit("parityErrorFlag") if _parityErrorFlagErr != nil { return nil, errors.Wrap(_parityErrorFlagErr, "Error parsing 'parityErrorFlag' field of CEMIAdditionalInformationBusmonitorInfo") } parityErrorFlag := _parityErrorFlag // Simple Field (unknownFlag) - _unknownFlag, _unknownFlagErr := readBuffer.ReadBit("unknownFlag") +_unknownFlag, _unknownFlagErr := readBuffer.ReadBit("unknownFlag") if _unknownFlagErr != nil { return nil, errors.Wrap(_unknownFlagErr, "Error parsing 'unknownFlag' field of CEMIAdditionalInformationBusmonitorInfo") } unknownFlag := _unknownFlag // Simple Field (lostFlag) - _lostFlag, _lostFlagErr := readBuffer.ReadBit("lostFlag") +_lostFlag, _lostFlagErr := readBuffer.ReadBit("lostFlag") if _lostFlagErr != nil { return nil, errors.Wrap(_lostFlagErr, "Error parsing 'lostFlag' field of CEMIAdditionalInformationBusmonitorInfo") } lostFlag := _lostFlag // Simple Field (sequenceNumber) - _sequenceNumber, _sequenceNumberErr := readBuffer.ReadUint8("sequenceNumber", 3) +_sequenceNumber, _sequenceNumberErr := readBuffer.ReadUint8("sequenceNumber", 3) if _sequenceNumberErr != nil { return nil, errors.Wrap(_sequenceNumberErr, "Error parsing 'sequenceNumber' field of CEMIAdditionalInformationBusmonitorInfo") } @@ -267,13 +270,14 @@ func CEMIAdditionalInformationBusmonitorInfoParseWithBuffer(ctx context.Context, // Create a partially initialized instance _child := &_CEMIAdditionalInformationBusmonitorInfo{ - _CEMIAdditionalInformation: &_CEMIAdditionalInformation{}, - FrameErrorFlag: frameErrorFlag, - BitErrorFlag: bitErrorFlag, - ParityErrorFlag: parityErrorFlag, - UnknownFlag: unknownFlag, - LostFlag: lostFlag, - SequenceNumber: sequenceNumber, + _CEMIAdditionalInformation: &_CEMIAdditionalInformation{ + }, + FrameErrorFlag: frameErrorFlag, + BitErrorFlag: bitErrorFlag, + ParityErrorFlag: parityErrorFlag, + UnknownFlag: unknownFlag, + LostFlag: lostFlag, + SequenceNumber: sequenceNumber, } _child._CEMIAdditionalInformation._CEMIAdditionalInformationChildRequirements = _child return _child, nil @@ -295,53 +299,53 @@ func (m *_CEMIAdditionalInformationBusmonitorInfo) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for CEMIAdditionalInformationBusmonitorInfo") } - // Const Field (len) - _lenErr := writeBuffer.WriteUint8("len", 8, 1) - if _lenErr != nil { - return errors.Wrap(_lenErr, "Error serializing 'len' field") - } + // Const Field (len) + _lenErr := writeBuffer.WriteUint8("len", 8, 1) + if _lenErr != nil { + return errors.Wrap(_lenErr, "Error serializing 'len' field") + } - // Simple Field (frameErrorFlag) - frameErrorFlag := bool(m.GetFrameErrorFlag()) - _frameErrorFlagErr := writeBuffer.WriteBit("frameErrorFlag", (frameErrorFlag)) - if _frameErrorFlagErr != nil { - return errors.Wrap(_frameErrorFlagErr, "Error serializing 'frameErrorFlag' field") - } + // Simple Field (frameErrorFlag) + frameErrorFlag := bool(m.GetFrameErrorFlag()) + _frameErrorFlagErr := writeBuffer.WriteBit("frameErrorFlag", (frameErrorFlag)) + if _frameErrorFlagErr != nil { + return errors.Wrap(_frameErrorFlagErr, "Error serializing 'frameErrorFlag' field") + } - // Simple Field (bitErrorFlag) - bitErrorFlag := bool(m.GetBitErrorFlag()) - _bitErrorFlagErr := writeBuffer.WriteBit("bitErrorFlag", (bitErrorFlag)) - if _bitErrorFlagErr != nil { - return errors.Wrap(_bitErrorFlagErr, "Error serializing 'bitErrorFlag' field") - } + // Simple Field (bitErrorFlag) + bitErrorFlag := bool(m.GetBitErrorFlag()) + _bitErrorFlagErr := writeBuffer.WriteBit("bitErrorFlag", (bitErrorFlag)) + if _bitErrorFlagErr != nil { + return errors.Wrap(_bitErrorFlagErr, "Error serializing 'bitErrorFlag' field") + } - // Simple Field (parityErrorFlag) - parityErrorFlag := bool(m.GetParityErrorFlag()) - _parityErrorFlagErr := writeBuffer.WriteBit("parityErrorFlag", (parityErrorFlag)) - if _parityErrorFlagErr != nil { - return errors.Wrap(_parityErrorFlagErr, "Error serializing 'parityErrorFlag' field") - } + // Simple Field (parityErrorFlag) + parityErrorFlag := bool(m.GetParityErrorFlag()) + _parityErrorFlagErr := writeBuffer.WriteBit("parityErrorFlag", (parityErrorFlag)) + if _parityErrorFlagErr != nil { + return errors.Wrap(_parityErrorFlagErr, "Error serializing 'parityErrorFlag' field") + } - // Simple Field (unknownFlag) - unknownFlag := bool(m.GetUnknownFlag()) - _unknownFlagErr := writeBuffer.WriteBit("unknownFlag", (unknownFlag)) - if _unknownFlagErr != nil { - return errors.Wrap(_unknownFlagErr, "Error serializing 'unknownFlag' field") - } + // Simple Field (unknownFlag) + unknownFlag := bool(m.GetUnknownFlag()) + _unknownFlagErr := writeBuffer.WriteBit("unknownFlag", (unknownFlag)) + if _unknownFlagErr != nil { + return errors.Wrap(_unknownFlagErr, "Error serializing 'unknownFlag' field") + } - // Simple Field (lostFlag) - lostFlag := bool(m.GetLostFlag()) - _lostFlagErr := writeBuffer.WriteBit("lostFlag", (lostFlag)) - if _lostFlagErr != nil { - return errors.Wrap(_lostFlagErr, "Error serializing 'lostFlag' field") - } + // Simple Field (lostFlag) + lostFlag := bool(m.GetLostFlag()) + _lostFlagErr := writeBuffer.WriteBit("lostFlag", (lostFlag)) + if _lostFlagErr != nil { + return errors.Wrap(_lostFlagErr, "Error serializing 'lostFlag' field") + } - // Simple Field (sequenceNumber) - sequenceNumber := uint8(m.GetSequenceNumber()) - _sequenceNumberErr := writeBuffer.WriteUint8("sequenceNumber", 3, (sequenceNumber)) - if _sequenceNumberErr != nil { - return errors.Wrap(_sequenceNumberErr, "Error serializing 'sequenceNumber' field") - } + // Simple Field (sequenceNumber) + sequenceNumber := uint8(m.GetSequenceNumber()) + _sequenceNumberErr := writeBuffer.WriteUint8("sequenceNumber", 3, (sequenceNumber)) + if _sequenceNumberErr != nil { + return errors.Wrap(_sequenceNumberErr, "Error serializing 'sequenceNumber' field") + } if popErr := writeBuffer.PopContext("CEMIAdditionalInformationBusmonitorInfo"); popErr != nil { return errors.Wrap(popErr, "Error popping for CEMIAdditionalInformationBusmonitorInfo") @@ -351,6 +355,7 @@ func (m *_CEMIAdditionalInformationBusmonitorInfo) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_CEMIAdditionalInformationBusmonitorInfo) isCEMIAdditionalInformationBusmonitorInfo() bool { return true } @@ -365,3 +370,6 @@ func (m *_CEMIAdditionalInformationBusmonitorInfo) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/CEMIAdditionalInformationRelativeTimestamp.go b/plc4go/protocols/knxnetip/readwrite/model/CEMIAdditionalInformationRelativeTimestamp.go index 74fb40fb0eb..a0f3869c0db 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/CEMIAdditionalInformationRelativeTimestamp.go +++ b/plc4go/protocols/knxnetip/readwrite/model/CEMIAdditionalInformationRelativeTimestamp.go @@ -19,6 +19,7 @@ package model + import ( "context" "fmt" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const CEMIAdditionalInformationRelativeTimestamp_LEN uint8 = uint8(2) @@ -50,30 +52,29 @@ type CEMIAdditionalInformationRelativeTimestampExactly interface { // _CEMIAdditionalInformationRelativeTimestamp is the data-structure of this message type _CEMIAdditionalInformationRelativeTimestamp struct { *_CEMIAdditionalInformation - RelativeTimestamp RelativeTimestamp + RelativeTimestamp RelativeTimestamp } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_CEMIAdditionalInformationRelativeTimestamp) GetAdditionalInformationType() uint8 { - return 0x04 -} +func (m *_CEMIAdditionalInformationRelativeTimestamp) GetAdditionalInformationType() uint8 { +return 0x04} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_CEMIAdditionalInformationRelativeTimestamp) InitializeParent(parent CEMIAdditionalInformation) { -} +func (m *_CEMIAdditionalInformationRelativeTimestamp) InitializeParent(parent CEMIAdditionalInformation ) {} -func (m *_CEMIAdditionalInformationRelativeTimestamp) GetParent() CEMIAdditionalInformation { +func (m *_CEMIAdditionalInformationRelativeTimestamp) GetParent() CEMIAdditionalInformation { return m._CEMIAdditionalInformation } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -101,11 +102,12 @@ func (m *_CEMIAdditionalInformationRelativeTimestamp) GetLen() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCEMIAdditionalInformationRelativeTimestamp factory function for _CEMIAdditionalInformationRelativeTimestamp -func NewCEMIAdditionalInformationRelativeTimestamp(relativeTimestamp RelativeTimestamp) *_CEMIAdditionalInformationRelativeTimestamp { +func NewCEMIAdditionalInformationRelativeTimestamp( relativeTimestamp RelativeTimestamp ) *_CEMIAdditionalInformationRelativeTimestamp { _result := &_CEMIAdditionalInformationRelativeTimestamp{ - RelativeTimestamp: relativeTimestamp, - _CEMIAdditionalInformation: NewCEMIAdditionalInformation(), + RelativeTimestamp: relativeTimestamp, + _CEMIAdditionalInformation: NewCEMIAdditionalInformation(), } _result._CEMIAdditionalInformation._CEMIAdditionalInformationChildRequirements = _result return _result @@ -113,7 +115,7 @@ func NewCEMIAdditionalInformationRelativeTimestamp(relativeTimestamp RelativeTim // Deprecated: use the interface for direct cast func CastCEMIAdditionalInformationRelativeTimestamp(structType interface{}) CEMIAdditionalInformationRelativeTimestamp { - if casted, ok := structType.(CEMIAdditionalInformationRelativeTimestamp); ok { + if casted, ok := structType.(CEMIAdditionalInformationRelativeTimestamp); ok { return casted } if casted, ok := structType.(*CEMIAdditionalInformationRelativeTimestamp); ok { @@ -138,6 +140,7 @@ func (m *_CEMIAdditionalInformationRelativeTimestamp) GetLengthInBits(ctx contex return lengthInBits } + func (m *_CEMIAdditionalInformationRelativeTimestamp) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -168,7 +171,7 @@ func CEMIAdditionalInformationRelativeTimestampParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("relativeTimestamp"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for relativeTimestamp") } - _relativeTimestamp, _relativeTimestampErr := RelativeTimestampParseWithBuffer(ctx, readBuffer) +_relativeTimestamp, _relativeTimestampErr := RelativeTimestampParseWithBuffer(ctx, readBuffer) if _relativeTimestampErr != nil { return nil, errors.Wrap(_relativeTimestampErr, "Error parsing 'relativeTimestamp' field of CEMIAdditionalInformationRelativeTimestamp") } @@ -183,8 +186,9 @@ func CEMIAdditionalInformationRelativeTimestampParseWithBuffer(ctx context.Conte // Create a partially initialized instance _child := &_CEMIAdditionalInformationRelativeTimestamp{ - _CEMIAdditionalInformation: &_CEMIAdditionalInformation{}, - RelativeTimestamp: relativeTimestamp, + _CEMIAdditionalInformation: &_CEMIAdditionalInformation{ + }, + RelativeTimestamp: relativeTimestamp, } _child._CEMIAdditionalInformation._CEMIAdditionalInformationChildRequirements = _child return _child, nil @@ -206,23 +210,23 @@ func (m *_CEMIAdditionalInformationRelativeTimestamp) SerializeWithWriteBuffer(c return errors.Wrap(pushErr, "Error pushing for CEMIAdditionalInformationRelativeTimestamp") } - // Const Field (len) - _lenErr := writeBuffer.WriteUint8("len", 8, 2) - if _lenErr != nil { - return errors.Wrap(_lenErr, "Error serializing 'len' field") - } + // Const Field (len) + _lenErr := writeBuffer.WriteUint8("len", 8, 2) + if _lenErr != nil { + return errors.Wrap(_lenErr, "Error serializing 'len' field") + } - // Simple Field (relativeTimestamp) - if pushErr := writeBuffer.PushContext("relativeTimestamp"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for relativeTimestamp") - } - _relativeTimestampErr := writeBuffer.WriteSerializable(ctx, m.GetRelativeTimestamp()) - if popErr := writeBuffer.PopContext("relativeTimestamp"); popErr != nil { - return errors.Wrap(popErr, "Error popping for relativeTimestamp") - } - if _relativeTimestampErr != nil { - return errors.Wrap(_relativeTimestampErr, "Error serializing 'relativeTimestamp' field") - } + // Simple Field (relativeTimestamp) + if pushErr := writeBuffer.PushContext("relativeTimestamp"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for relativeTimestamp") + } + _relativeTimestampErr := writeBuffer.WriteSerializable(ctx, m.GetRelativeTimestamp()) + if popErr := writeBuffer.PopContext("relativeTimestamp"); popErr != nil { + return errors.Wrap(popErr, "Error popping for relativeTimestamp") + } + if _relativeTimestampErr != nil { + return errors.Wrap(_relativeTimestampErr, "Error serializing 'relativeTimestamp' field") + } if popErr := writeBuffer.PopContext("CEMIAdditionalInformationRelativeTimestamp"); popErr != nil { return errors.Wrap(popErr, "Error popping for CEMIAdditionalInformationRelativeTimestamp") @@ -232,6 +236,7 @@ func (m *_CEMIAdditionalInformationRelativeTimestamp) SerializeWithWriteBuffer(c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_CEMIAdditionalInformationRelativeTimestamp) isCEMIAdditionalInformationRelativeTimestamp() bool { return true } @@ -246,3 +251,6 @@ func (m *_CEMIAdditionalInformationRelativeTimestamp) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/CEMIPriority.go b/plc4go/protocols/knxnetip/readwrite/model/CEMIPriority.go index 66aa244fc3f..1ecb9d817a1 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/CEMIPriority.go +++ b/plc4go/protocols/knxnetip/readwrite/model/CEMIPriority.go @@ -34,18 +34,18 @@ type ICEMIPriority interface { utils.Serializable } -const ( +const( CEMIPriority_SYSTEM CEMIPriority = 0x0 CEMIPriority_NORMAL CEMIPriority = 0x1 CEMIPriority_URGENT CEMIPriority = 0x2 - CEMIPriority_LOW CEMIPriority = 0x3 + CEMIPriority_LOW CEMIPriority = 0x3 ) var CEMIPriorityValues []CEMIPriority func init() { _ = errors.New - CEMIPriorityValues = []CEMIPriority{ + CEMIPriorityValues = []CEMIPriority { CEMIPriority_SYSTEM, CEMIPriority_NORMAL, CEMIPriority_URGENT, @@ -55,14 +55,14 @@ func init() { func CEMIPriorityByValue(value uint8) (enum CEMIPriority, ok bool) { switch value { - case 0x0: - return CEMIPriority_SYSTEM, true - case 0x1: - return CEMIPriority_NORMAL, true - case 0x2: - return CEMIPriority_URGENT, true - case 0x3: - return CEMIPriority_LOW, true + case 0x0: + return CEMIPriority_SYSTEM, true + case 0x1: + return CEMIPriority_NORMAL, true + case 0x2: + return CEMIPriority_URGENT, true + case 0x3: + return CEMIPriority_LOW, true } return 0, false } @@ -81,13 +81,13 @@ func CEMIPriorityByName(value string) (enum CEMIPriority, ok bool) { return 0, false } -func CEMIPriorityKnows(value uint8) bool { +func CEMIPriorityKnows(value uint8) bool { for _, typeValue := range CEMIPriorityValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastCEMIPriority(structType interface{}) CEMIPriority { @@ -155,3 +155,4 @@ func (e CEMIPriority) PLC4XEnumName() string { func (e CEMIPriority) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ChannelInformation.go b/plc4go/protocols/knxnetip/readwrite/model/ChannelInformation.go index 57858864dab..92f6fff0fd7 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ChannelInformation.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ChannelInformation.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ChannelInformation is the corresponding interface of ChannelInformation type ChannelInformation interface { @@ -46,10 +48,11 @@ type ChannelInformationExactly interface { // _ChannelInformation is the data-structure of this message type _ChannelInformation struct { - NumChannels uint8 - ChannelCode uint16 + NumChannels uint8 + ChannelCode uint16 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -68,14 +71,15 @@ func (m *_ChannelInformation) GetChannelCode() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewChannelInformation factory function for _ChannelInformation -func NewChannelInformation(numChannels uint8, channelCode uint16) *_ChannelInformation { - return &_ChannelInformation{NumChannels: numChannels, ChannelCode: channelCode} +func NewChannelInformation( numChannels uint8 , channelCode uint16 ) *_ChannelInformation { +return &_ChannelInformation{ NumChannels: numChannels , ChannelCode: channelCode } } // Deprecated: use the interface for direct cast func CastChannelInformation(structType interface{}) ChannelInformation { - if casted, ok := structType.(ChannelInformation); ok { + if casted, ok := structType.(ChannelInformation); ok { return casted } if casted, ok := structType.(*ChannelInformation); ok { @@ -92,14 +96,15 @@ func (m *_ChannelInformation) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (numChannels) - lengthInBits += 3 + lengthInBits += 3; // Simple field (channelCode) - lengthInBits += 13 + lengthInBits += 13; return lengthInBits } + func (m *_ChannelInformation) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -118,14 +123,14 @@ func ChannelInformationParseWithBuffer(ctx context.Context, readBuffer utils.Rea _ = currentPos // Simple Field (numChannels) - _numChannels, _numChannelsErr := readBuffer.ReadUint8("numChannels", 3) +_numChannels, _numChannelsErr := readBuffer.ReadUint8("numChannels", 3) if _numChannelsErr != nil { return nil, errors.Wrap(_numChannelsErr, "Error parsing 'numChannels' field of ChannelInformation") } numChannels := _numChannels // Simple Field (channelCode) - _channelCode, _channelCodeErr := readBuffer.ReadUint16("channelCode", 13) +_channelCode, _channelCodeErr := readBuffer.ReadUint16("channelCode", 13) if _channelCodeErr != nil { return nil, errors.Wrap(_channelCodeErr, "Error parsing 'channelCode' field of ChannelInformation") } @@ -137,9 +142,9 @@ func ChannelInformationParseWithBuffer(ctx context.Context, readBuffer utils.Rea // Create the instance return &_ChannelInformation{ - NumChannels: numChannels, - ChannelCode: channelCode, - }, nil + NumChannels: numChannels, + ChannelCode: channelCode, + }, nil } func (m *_ChannelInformation) Serialize() ([]byte, error) { @@ -153,7 +158,7 @@ func (m *_ChannelInformation) Serialize() ([]byte, error) { func (m *_ChannelInformation) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("ChannelInformation"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("ChannelInformation"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for ChannelInformation") } @@ -177,6 +182,7 @@ func (m *_ChannelInformation) SerializeWithWriteBuffer(ctx context.Context, writ return nil } + func (m *_ChannelInformation) isChannelInformation() bool { return true } @@ -191,3 +197,6 @@ func (m *_ChannelInformation) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ComObjectTable.go b/plc4go/protocols/knxnetip/readwrite/model/ComObjectTable.go index 9fe3a331722..96981b80cd3 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ComObjectTable.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ComObjectTable.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ComObjectTable is the corresponding interface of ComObjectTable type ComObjectTable interface { @@ -53,6 +55,7 @@ type _ComObjectTableChildRequirements interface { GetFirmwareType() FirmwareType } + type ComObjectTableParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child ComObjectTable, serializeChildFunction func() error) error GetTypeName() string @@ -60,21 +63,22 @@ type ComObjectTableParent interface { type ComObjectTableChild interface { utils.Serializable - InitializeParent(parent ComObjectTable) +InitializeParent(parent ComObjectTable ) GetParent() *ComObjectTable GetTypeName() string ComObjectTable } + // NewComObjectTable factory function for _ComObjectTable -func NewComObjectTable() *_ComObjectTable { - return &_ComObjectTable{} +func NewComObjectTable( ) *_ComObjectTable { +return &_ComObjectTable{ } } // Deprecated: use the interface for direct cast func CastComObjectTable(structType interface{}) ComObjectTable { - if casted, ok := structType.(ComObjectTable); ok { + if casted, ok := structType.(ComObjectTable); ok { return casted } if casted, ok := structType.(*ComObjectTable); ok { @@ -87,6 +91,7 @@ func (m *_ComObjectTable) GetTypeName() string { return "ComObjectTable" } + func (m *_ComObjectTable) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -113,18 +118,18 @@ func ComObjectTableParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type ComObjectTableChildSerializeRequirement interface { ComObjectTable - InitializeParent(ComObjectTable) + InitializeParent(ComObjectTable ) GetParent() ComObjectTable } var _childTemp interface{} var _child ComObjectTableChildSerializeRequirement var typeSwitchError error switch { - case firmwareType == FirmwareType_SYSTEM_1: // ComObjectTableRealisationType1 +case firmwareType == FirmwareType_SYSTEM_1 : // ComObjectTableRealisationType1 _childTemp, typeSwitchError = ComObjectTableRealisationType1ParseWithBuffer(ctx, readBuffer, firmwareType) - case firmwareType == FirmwareType_SYSTEM_2: // ComObjectTableRealisationType2 +case firmwareType == FirmwareType_SYSTEM_2 : // ComObjectTableRealisationType2 _childTemp, typeSwitchError = ComObjectTableRealisationType2ParseWithBuffer(ctx, readBuffer, firmwareType) - case firmwareType == FirmwareType_SYSTEM_300: // ComObjectTableRealisationType6 +case firmwareType == FirmwareType_SYSTEM_300 : // ComObjectTableRealisationType6 _childTemp, typeSwitchError = ComObjectTableRealisationType6ParseWithBuffer(ctx, readBuffer, firmwareType) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [firmwareType=%v]", firmwareType) @@ -139,7 +144,7 @@ func ComObjectTableParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf } // Finish initializing - _child.InitializeParent(_child) +_child.InitializeParent(_child ) return _child, nil } @@ -149,7 +154,7 @@ func (pm *_ComObjectTable) SerializeParent(ctx context.Context, writeBuffer util _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("ComObjectTable"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("ComObjectTable"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for ComObjectTable") } @@ -164,6 +169,7 @@ func (pm *_ComObjectTable) SerializeParent(ctx context.Context, writeBuffer util return nil } + func (m *_ComObjectTable) isComObjectTable() bool { return true } @@ -178,3 +184,6 @@ func (m *_ComObjectTable) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ComObjectTableAddresses.go b/plc4go/protocols/knxnetip/readwrite/model/ComObjectTableAddresses.go index a705e7366da..6db98485b83 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ComObjectTableAddresses.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ComObjectTableAddresses.go @@ -35,7 +35,7 @@ type IComObjectTableAddresses interface { ComObjectTableAddress() uint16 } -const ( +const( ComObjectTableAddresses_DEV0001914201 ComObjectTableAddresses = 1 ComObjectTableAddresses_DEV0001140C13 ComObjectTableAddresses = 2 ComObjectTableAddresses_DEV0001140B11 ComObjectTableAddresses = 3 @@ -1918,7 +1918,7 @@ var ComObjectTableAddressesValues []ComObjectTableAddresses func init() { _ = errors.New - ComObjectTableAddressesValues = []ComObjectTableAddresses{ + ComObjectTableAddressesValues = []ComObjectTableAddresses { ComObjectTableAddresses_DEV0001914201, ComObjectTableAddresses_DEV0001140C13, ComObjectTableAddresses_DEV0001140B11, @@ -3798,11281 +3798,9405 @@ func init() { } } + func (e ComObjectTableAddresses) ComObjectTableAddress() uint16 { - switch e { - case 1: - { /* '1' */ - return 0x43FE - } - case 10: - { /* '10' */ - return 0x43FE - } - case 100: - { /* '100' */ - return 0x4400 - } - case 1000: - { /* '1000' */ - return 0x43FC - } - case 1001: - { /* '1001' */ - return 0x43FC - } - case 1002: - { /* '1002' */ - return 0x43FC - } - case 1003: - { /* '1003' */ - return 0x43FC - } - case 1004: - { /* '1004' */ - return 0x43FC - } - case 1005: - { /* '1005' */ - return 0x43FC - } - case 1006: - { /* '1006' */ - return 0x43FC - } - case 1007: - { /* '1007' */ - return 0x43FC - } - case 1008: - { /* '1008' */ - return 0x4354 - } - case 1009: - { /* '1009' */ - return 0x43FC - } - case 101: - { /* '101' */ - return 0x4400 - } - case 1010: - { /* '1010' */ - return 0x43FC - } - case 1011: - { /* '1011' */ - return 0x43FC - } - case 1012: - { /* '1012' */ - return 0x43FC - } - case 1013: - { /* '1013' */ - return 0x43FC - } - case 1014: - { /* '1014' */ - return 0x4400 - } - case 1015: - { /* '1015' */ - return 0x43FE - } - case 1016: - { /* '1016' */ - return 0x43FC - } - case 1017: - { /* '1017' */ - return 0x43FC - } - case 1018: - { /* '1018' */ - return 0x43FC - } - case 1019: - { /* '1019' */ - return 0x43FC - } - case 102: - { /* '102' */ - return 0x4400 - } - case 1020: - { /* '1020' */ - return 0x43FC - } - case 1021: - { /* '1021' */ - return 0x4400 - } - case 1022: - { /* '1022' */ - return 0x4400 - } - case 1023: - { /* '1023' */ - return 0x4400 - } - case 1024: - { /* '1024' */ - return 0x43FE - } - case 1025: - { /* '1025' */ - return 0x43FE - } - case 1026: - { /* '1026' */ - return 0x43FE - } - case 1027: - { /* '1027' */ - return 0x43FE - } - case 1028: - { /* '1028' */ - return 0x42A0 - } - case 1029: - { /* '1029' */ - return 0x43FE - } - case 103: - { /* '103' */ - return 0x4400 - } - case 1030: - { /* '1030' */ - return 0x43FE - } - case 1031: - { /* '1031' */ - return 0x43FE - } - case 1032: - { /* '1032' */ - return 0x43FC - } - case 1033: - { /* '1033' */ - return 0x43FC - } - case 1034: - { /* '1034' */ - return 0x43FC - } - case 1035: - { /* '1035' */ - return 0x402C - } - case 1036: - { /* '1036' */ - return 0x402C - } - case 1037: - { /* '1037' */ - return 0x43CE - } - case 1038: - { /* '1038' */ - return 0x43FC - } - case 1039: - { /* '1039' */ - return 0x43FC - } - case 104: - { /* '104' */ - return 0x4052 - } - case 1040: - { /* '1040' */ - return 0x43FC - } - case 1041: - { /* '1041' */ - return 0x43FC - } - case 1042: - { /* '1042' */ - return 0x43FC - } - case 1043: - { /* '1043' */ - return 0x43FC - } - case 1044: - { /* '1044' */ - return 0x43FC - } - case 1045: - { /* '1045' */ - return 0x4334 - } - case 1046: - { /* '1046' */ - return 0x4354 - } - case 1047: - { /* '1047' */ - return 0x4354 - } - case 1048: - { /* '1048' */ - return 0x4354 - } - case 1049: - { /* '1049' */ - return 0x43FC - } - case 105: - { /* '105' */ - return 0x402A - } - case 1050: - { /* '1050' */ - return 0x43FC - } - case 1051: - { /* '1051' */ - return 0x43FC - } - case 1052: - { /* '1052' */ - return 0x43FC - } - case 1053: - { /* '1053' */ - return 0x43FC - } - case 1054: - { /* '1054' */ - return 0x43FC - } - case 1055: - { /* '1055' */ - return 0x43FE - } - case 1056: - { /* '1056' */ - return 0x43FC - } - case 1057: - { /* '1057' */ - return 0x4400 - } - case 1058: - { /* '1058' */ - return 0x4136 - } - case 1059: - { /* '1059' */ - return 0x437E - } - case 106: - { /* '106' */ - return 0x4106 - } - case 1060: - { /* '1060' */ - return 0x439A - } - case 1061: - { /* '1061' */ - return 0x4314 - } - case 1062: - { /* '1062' */ - return 0x431C - } - case 1063: - { /* '1063' */ - return 0x41D8 - } - case 1064: - { /* '1064' */ - return 0x4276 - } - case 1065: - { /* '1065' */ - return 0x4136 - } - case 1066: - { /* '1066' */ - return 0x4266 - } - case 1067: - { /* '1067' */ - return 0x4324 - } - case 1068: - { /* '1068' */ - return 0x4400 - } - case 1069: - { /* '1069' */ - return 0x43FC - } - case 107: - { /* '107' */ - return 0x4106 - } - case 1070: - { /* '1070' */ - return 0x43FC - } - case 1071: - { /* '1071' */ - return 0x43FC - } - case 1072: - { /* '1072' */ - return 0x43FC - } - case 1073: - { /* '1073' */ - return 0x43FC - } - case 1074: - { /* '1074' */ - return 0x43FC - } - case 1075: - { /* '1075' */ - return 0x43FC - } - case 1076: - { /* '1076' */ - return 0x43F4 - } - case 1077: - { /* '1077' */ - return 0x43F4 - } - case 1078: - { /* '1078' */ - return 0x43F4 - } - case 1079: - { /* '1079' */ - return 0x43F4 - } - case 108: - { /* '108' */ - return 0x4106 - } - case 1080: - { /* '1080' */ - return 0x43F4 - } - case 1081: - { /* '1081' */ - return 0x43F4 - } - case 1082: - { /* '1082' */ - return 0x43F4 - } - case 1083: - { /* '1083' */ - return 0x43F4 - } - case 1084: - { /* '1084' */ - return 0x43F4 - } - case 1085: - { /* '1085' */ - return 0x4400 - } - case 1086: - { /* '1086' */ - return 0x4400 - } - case 1087: - { /* '1087' */ - return 0x4400 - } - case 1088: - { /* '1088' */ - return 0x4400 - } - case 1089: - { /* '1089' */ - return 0x4400 - } - case 109: - { /* '109' */ - return 0x4106 - } - case 1090: - { /* '1090' */ - return 0x4400 - } - case 1091: - { /* '1091' */ - return 0x4400 - } - case 1092: - { /* '1092' */ - return 0x4400 - } - case 1093: - { /* '1093' */ - return 0x4400 - } - case 1094: - { /* '1094' */ - return 0x4400 - } - case 1095: - { /* '1095' */ - return 0x43FC - } - case 1096: - { /* '1096' */ - return 0x43F8 - } - case 1097: - { /* '1097' */ - return 0x43F8 - } - case 1098: - { /* '1098' */ - return 0x43FE - } - case 1099: - { /* '1099' */ - return 0x43FE - } - case 11: - { /* '11' */ - return 0x43FE - } - case 110: - { /* '110' */ - return 0x4106 - } - case 1100: - { /* '1100' */ - return 0x43FE - } - case 1101: - { /* '1101' */ - return 0x4258 - } - case 1102: - { /* '1102' */ - return 0x402C - } - case 1103: - { /* '1103' */ - return 0x4400 - } - case 1104: - { /* '1104' */ - return 0x43FE - } - case 1105: - { /* '1105' */ - return 0x43FE - } - case 1106: - { /* '1106' */ - return 0x43FF - } - case 1107: - { /* '1107' */ - return 0x43FF - } - case 1108: - { /* '1108' */ - return 0x43FF - } - case 1109: - { /* '1109' */ - return 0x43FF - } - case 111: - { /* '111' */ - return 0x4106 - } - case 1110: - { /* '1110' */ - return 0x43FF - } - case 1111: - { /* '1111' */ - return 0x43FF + switch e { + case 1: { /* '1' */ + return 0x43FE } - case 1112: - { /* '1112' */ - return 0x43FF + case 10: { /* '10' */ + return 0x43FE } - case 1113: - { /* '1113' */ - return 0x43FF + case 100: { /* '100' */ + return 0x4400 } - case 1114: - { /* '1114' */ - return 0x43FF + case 1000: { /* '1000' */ + return 0x43FC } - case 1115: - { /* '1115' */ - return 0x43FF + case 1001: { /* '1001' */ + return 0x43FC } - case 1116: - { /* '1116' */ - return 0x43FF + case 1002: { /* '1002' */ + return 0x43FC } - case 1117: - { /* '1117' */ - return 0x43FF + case 1003: { /* '1003' */ + return 0x43FC } - case 1118: - { /* '1118' */ - return 0x43FF + case 1004: { /* '1004' */ + return 0x43FC } - case 1119: - { /* '1119' */ - return 0x43FF + case 1005: { /* '1005' */ + return 0x43FC } - case 112: - { /* '112' */ - return 0x4106 + case 1006: { /* '1006' */ + return 0x43FC } - case 1120: - { /* '1120' */ - return 0x43FF + case 1007: { /* '1007' */ + return 0x43FC } - case 1121: - { /* '1121' */ - return 0x43FF + case 1008: { /* '1008' */ + return 0x4354 } - case 1122: - { /* '1122' */ - return 0x43FF + case 1009: { /* '1009' */ + return 0x43FC } - case 1123: - { /* '1123' */ - return 0x4400 + case 101: { /* '101' */ + return 0x4400 } - case 1124: - { /* '1124' */ - return 0x4400 + case 1010: { /* '1010' */ + return 0x43FC } - case 1125: - { /* '1125' */ - return 0x4400 + case 1011: { /* '1011' */ + return 0x43FC } - case 1126: - { /* '1126' */ - return 0x4400 + case 1012: { /* '1012' */ + return 0x43FC } - case 1127: - { /* '1127' */ - return 0x4400 + case 1013: { /* '1013' */ + return 0x43FC } - case 1128: - { /* '1128' */ - return 0x4400 + case 1014: { /* '1014' */ + return 0x4400 } - case 1129: - { /* '1129' */ - return 0x4400 + case 1015: { /* '1015' */ + return 0x43FE } - case 113: - { /* '113' */ - return 0x4106 + case 1016: { /* '1016' */ + return 0x43FC } - case 1130: - { /* '1130' */ - return 0x4400 + case 1017: { /* '1017' */ + return 0x43FC } - case 1131: - { /* '1131' */ - return 0x4400 + case 1018: { /* '1018' */ + return 0x43FC } - case 1132: - { /* '1132' */ - return 0x4400 + case 1019: { /* '1019' */ + return 0x43FC } - case 1133: - { /* '1133' */ - return 0x4400 + case 102: { /* '102' */ + return 0x4400 } - case 1134: - { /* '1134' */ - return 0x4400 + case 1020: { /* '1020' */ + return 0x43FC } - case 1135: - { /* '1135' */ - return 0x4400 + case 1021: { /* '1021' */ + return 0x4400 } - case 1136: - { /* '1136' */ - return 0x4258 + case 1022: { /* '1022' */ + return 0x4400 } - case 1137: - { /* '1137' */ - return 0x4258 + case 1023: { /* '1023' */ + return 0x4400 } - case 1138: - { /* '1138' */ - return 0x425C + case 1024: { /* '1024' */ + return 0x43FE } - case 1139: - { /* '1139' */ - return 0x425C + case 1025: { /* '1025' */ + return 0x43FE } - case 114: - { /* '114' */ - return 0x4106 + case 1026: { /* '1026' */ + return 0x43FE } - case 1140: - { /* '1140' */ - return 0x425C + case 1027: { /* '1027' */ + return 0x43FE } - case 1141: - { /* '1141' */ - return 0x40F4 + case 1028: { /* '1028' */ + return 0x42A0 } - case 1142: - { /* '1142' */ - return 0x4400 + case 1029: { /* '1029' */ + return 0x43FE } - case 1143: - { /* '1143' */ - return 0x4400 + case 103: { /* '103' */ + return 0x4400 } - case 1144: - { /* '1144' */ - return 0x4400 + case 1030: { /* '1030' */ + return 0x43FE } - case 1145: - { /* '1145' */ - return 0x4400 + case 1031: { /* '1031' */ + return 0x43FE } - case 1146: - { /* '1146' */ - return 0x4400 + case 1032: { /* '1032' */ + return 0x43FC } - case 1147: - { /* '1147' */ - return 0x4145 + case 1033: { /* '1033' */ + return 0x43FC } - case 1148: - { /* '1148' */ - return 0x4195 + case 1034: { /* '1034' */ + return 0x43FC } - case 1149: - { /* '1149' */ - return 0x4195 + case 1035: { /* '1035' */ + return 0x402C } - case 115: - { /* '115' */ - return 0x40A6 + case 1036: { /* '1036' */ + return 0x402C } - case 1150: - { /* '1150' */ - return 0x4195 + case 1037: { /* '1037' */ + return 0x43CE } - case 1151: - { /* '1151' */ - return 0x4195 + case 1038: { /* '1038' */ + return 0x43FC } - case 1152: - { /* '1152' */ - return 0x4145 + case 1039: { /* '1039' */ + return 0x43FC } - case 1153: - { /* '1153' */ - return 0x4195 + case 104: { /* '104' */ + return 0x4052 } - case 1154: - { /* '1154' */ - return 0x4195 + case 1040: { /* '1040' */ + return 0x43FC } - case 1155: - { /* '1155' */ - return 0x41E5 + case 1041: { /* '1041' */ + return 0x43FC } - case 1156: - { /* '1156' */ - return 0x4195 + case 1042: { /* '1042' */ + return 0x43FC } - case 1157: - { /* '1157' */ - return 0x43FF + case 1043: { /* '1043' */ + return 0x43FC } - case 1158: - { /* '1158' */ - return 0x41E5 + case 1044: { /* '1044' */ + return 0x43FC } - case 1159: - { /* '1159' */ - return 0x4195 + case 1045: { /* '1045' */ + return 0x4334 } - case 116: - { /* '116' */ - return 0x40A6 + case 1046: { /* '1046' */ + return 0x4354 } - case 1160: - { /* '1160' */ - return 0x4195 + case 1047: { /* '1047' */ + return 0x4354 } - case 1161: - { /* '1161' */ - return 0x4195 + case 1048: { /* '1048' */ + return 0x4354 } - case 1162: - { /* '1162' */ - return 0x4195 + case 1049: { /* '1049' */ + return 0x43FC } - case 1163: - { /* '1163' */ - return 0x4145 + case 105: { /* '105' */ + return 0x402A } - case 1164: - { /* '1164' */ - return 0x4145 + case 1050: { /* '1050' */ + return 0x43FC } - case 1165: - { /* '1165' */ - return 0x4195 + case 1051: { /* '1051' */ + return 0x43FC } - case 1166: - { /* '1166' */ - return 0x4195 + case 1052: { /* '1052' */ + return 0x43FC } - case 1167: - { /* '1167' */ - return 0x41E5 + case 1053: { /* '1053' */ + return 0x43FC } - case 1168: - { /* '1168' */ - return 0x4195 + case 1054: { /* '1054' */ + return 0x43FC } - case 1169: - { /* '1169' */ - return 0x43FF + case 1055: { /* '1055' */ + return 0x43FE } - case 117: - { /* '117' */ - return 0x40A6 + case 1056: { /* '1056' */ + return 0x43FC } - case 1170: - { /* '1170' */ - return 0x41E5 + case 1057: { /* '1057' */ + return 0x4400 } - case 1171: - { /* '1171' */ - return 0x4195 + case 1058: { /* '1058' */ + return 0x4136 } - case 1172: - { /* '1172' */ - return 0x4195 + case 1059: { /* '1059' */ + return 0x437E } - case 1173: - { /* '1173' */ - return 0x4195 + case 106: { /* '106' */ + return 0x4106 } - case 1174: - { /* '1174' */ - return 0x4195 + case 1060: { /* '1060' */ + return 0x439A } - case 1175: - { /* '1175' */ - return 0x4145 + case 1061: { /* '1061' */ + return 0x4314 } - case 1176: - { /* '1176' */ - return 0x41E5 + case 1062: { /* '1062' */ + return 0x431C } - case 1177: - { /* '1177' */ - return 0x4195 + case 1063: { /* '1063' */ + return 0x41D8 } - case 1178: - { /* '1178' */ - return 0x43FF + case 1064: { /* '1064' */ + return 0x4276 } - case 1179: - { /* '1179' */ - return 0x41E5 + case 1065: { /* '1065' */ + return 0x4136 } - case 118: - { /* '118' */ - return 0x40A6 + case 1066: { /* '1066' */ + return 0x4266 } - case 1180: - { /* '1180' */ - return 0x4195 + case 1067: { /* '1067' */ + return 0x4324 } - case 1181: - { /* '1181' */ - return 0x4195 + case 1068: { /* '1068' */ + return 0x4400 } - case 1182: - { /* '1182' */ - return 0x4195 + case 1069: { /* '1069' */ + return 0x43FC } - case 1183: - { /* '1183' */ - return 0x4195 + case 107: { /* '107' */ + return 0x4106 } - case 1184: - { /* '1184' */ - return 0x4145 + case 1070: { /* '1070' */ + return 0x43FC } - case 1185: - { /* '1185' */ - return 0x41E5 + case 1071: { /* '1071' */ + return 0x43FC } - case 1186: - { /* '1186' */ - return 0x4195 + case 1072: { /* '1072' */ + return 0x43FC } - case 1187: - { /* '1187' */ - return 0x43FF + case 1073: { /* '1073' */ + return 0x43FC } - case 1188: - { /* '1188' */ - return 0x41E5 + case 1074: { /* '1074' */ + return 0x43FC } - case 1189: - { /* '1189' */ - return 0x4195 + case 1075: { /* '1075' */ + return 0x43FC } - case 119: - { /* '119' */ - return 0x4086 + case 1076: { /* '1076' */ + return 0x43F4 } - case 1190: - { /* '1190' */ - return 0x4195 + case 1077: { /* '1077' */ + return 0x43F4 } - case 1191: - { /* '1191' */ - return 0x4195 + case 1078: { /* '1078' */ + return 0x43F4 } - case 1192: - { /* '1192' */ - return 0x4195 + case 1079: { /* '1079' */ + return 0x43F4 } - case 1193: - { /* '1193' */ - return 0x41E5 + case 108: { /* '108' */ + return 0x4106 } - case 1194: - { /* '1194' */ - return 0x43FF + case 1080: { /* '1080' */ + return 0x43F4 } - case 1195: - { /* '1195' */ - return 0x43FF + case 1081: { /* '1081' */ + return 0x43F4 } - case 1196: - { /* '1196' */ - return 0x43FF + case 1082: { /* '1082' */ + return 0x43F4 } - case 1197: - { /* '1197' */ - return 0x43FF + case 1083: { /* '1083' */ + return 0x43F4 } - case 1198: - { /* '1198' */ - return 0x43FF + case 1084: { /* '1084' */ + return 0x43F4 } - case 1199: - { /* '1199' */ - return 0x43FF + case 1085: { /* '1085' */ + return 0x4400 } - case 12: - { /* '12' */ - return 0x43FE + case 1086: { /* '1086' */ + return 0x4400 } - case 120: - { /* '120' */ - return 0x4086 + case 1087: { /* '1087' */ + return 0x4400 } - case 1200: - { /* '1200' */ - return 0x43FF + case 1088: { /* '1088' */ + return 0x4400 } - case 1201: - { /* '1201' */ - return 0x43FF + case 1089: { /* '1089' */ + return 0x4400 } - case 1202: - { /* '1202' */ - return 0x43FF + case 109: { /* '109' */ + return 0x4106 } - case 1203: - { /* '1203' */ - return 0x43FF + case 1090: { /* '1090' */ + return 0x4400 } - case 1204: - { /* '1204' */ - return 0x43FF + case 1091: { /* '1091' */ + return 0x4400 } - case 1205: - { /* '1205' */ - return 0x43FF + case 1092: { /* '1092' */ + return 0x4400 } - case 1206: - { /* '1206' */ - return 0x4324 + case 1093: { /* '1093' */ + return 0x4400 } - case 1207: - { /* '1207' */ - return 0x43FF + case 1094: { /* '1094' */ + return 0x4400 } - case 1208: - { /* '1208' */ - return 0x43FF + case 1095: { /* '1095' */ + return 0x43FC } - case 1209: - { /* '1209' */ - return 0x43FF + case 1096: { /* '1096' */ + return 0x43F8 } - case 121: - { /* '121' */ - return 0x40C2 + case 1097: { /* '1097' */ + return 0x43F8 } - case 1210: - { /* '1210' */ - return 0x4194 + case 1098: { /* '1098' */ + return 0x43FE } - case 1211: - { /* '1211' */ - return 0x43FE + case 1099: { /* '1099' */ + return 0x43FE } - case 1212: - { /* '1212' */ - return 0x43FE + case 11: { /* '11' */ + return 0x43FE } - case 1213: - { /* '1213' */ - return 0x4324 + case 110: { /* '110' */ + return 0x4106 } - case 1214: - { /* '1214' */ - return 0x4324 + case 1100: { /* '1100' */ + return 0x43FE } - case 1215: - { /* '1215' */ - return 0x43FE + case 1101: { /* '1101' */ + return 0x4258 } - case 1216: - { /* '1216' */ - return 0x43EC + case 1102: { /* '1102' */ + return 0x402C } - case 1217: - { /* '1217' */ - return 0x41C8 + case 1103: { /* '1103' */ + return 0x4400 } - case 1218: - { /* '1218' */ - return 0x43FE + case 1104: { /* '1104' */ + return 0x43FE } - case 1219: - { /* '1219' */ - return 0x43FF + case 1105: { /* '1105' */ + return 0x43FE } - case 122: - { /* '122' */ - return 0x40C4 + case 1106: { /* '1106' */ + return 0x43FF } - case 1220: - { /* '1220' */ - return 0x43FF + case 1107: { /* '1107' */ + return 0x43FF } - case 1221: - { /* '1221' */ - return 0x43FF + case 1108: { /* '1108' */ + return 0x43FF } - case 1222: - { /* '1222' */ - return 0x43FF + case 1109: { /* '1109' */ + return 0x43FF } - case 1223: - { /* '1223' */ - return 0x4324 + case 111: { /* '111' */ + return 0x4106 } - case 1224: - { /* '1224' */ - return 0x43FF + case 1110: { /* '1110' */ + return 0x43FF } - case 1225: - { /* '1225' */ - return 0x43FF + case 1111: { /* '1111' */ + return 0x43FF } - case 1226: - { /* '1226' */ - return 0x43FF + case 1112: { /* '1112' */ + return 0x43FF } - case 1227: - { /* '1227' */ - return 0x43FF + case 1113: { /* '1113' */ + return 0x43FF } - case 1228: - { /* '1228' */ - return 0x43FF + case 1114: { /* '1114' */ + return 0x43FF } - case 1229: - { /* '1229' */ - return 0x43FF + case 1115: { /* '1115' */ + return 0x43FF } - case 123: - { /* '123' */ - return 0x40C4 + case 1116: { /* '1116' */ + return 0x43FF } - case 1230: - { /* '1230' */ - return 0x43FF + case 1117: { /* '1117' */ + return 0x43FF } - case 1231: - { /* '1231' */ - return 0x43FF + case 1118: { /* '1118' */ + return 0x43FF } - case 1232: - { /* '1232' */ - return 0x43FF + case 1119: { /* '1119' */ + return 0x43FF } - case 1233: - { /* '1233' */ - return 0x43FF + case 112: { /* '112' */ + return 0x4106 } - case 1234: - { /* '1234' */ - return 0x43FF + case 1120: { /* '1120' */ + return 0x43FF } - case 1235: - { /* '1235' */ - return 0x43FF + case 1121: { /* '1121' */ + return 0x43FF } - case 1236: - { /* '1236' */ - return 0x43FF + case 1122: { /* '1122' */ + return 0x43FF } - case 1237: - { /* '1237' */ - return 0x43FF + case 1123: { /* '1123' */ + return 0x4400 } - case 1238: - { /* '1238' */ - return 0x43FF + case 1124: { /* '1124' */ + return 0x4400 } - case 1239: - { /* '1239' */ - return 0x43FF + case 1125: { /* '1125' */ + return 0x4400 } - case 124: - { /* '124' */ - return 0x43FE + case 1126: { /* '1126' */ + return 0x4400 } - case 1240: - { /* '1240' */ - return 0x43FF + case 1127: { /* '1127' */ + return 0x4400 } - case 1241: - { /* '1241' */ - return 0x8700 + case 1128: { /* '1128' */ + return 0x4400 } - case 1242: - { /* '1242' */ - return 0x4324 + case 1129: { /* '1129' */ + return 0x4400 } - case 1243: - { /* '1243' */ - return 0x43FC + case 113: { /* '113' */ + return 0x4106 } - case 1244: - { /* '1244' */ - return 0x4200 + case 1130: { /* '1130' */ + return 0x4400 } - case 1245: - { /* '1245' */ - return 0x4400 + case 1131: { /* '1131' */ + return 0x4400 } - case 1246: - { /* '1246' */ - return 0x43FE + case 1132: { /* '1132' */ + return 0x4400 } - case 1247: - { /* '1247' */ - return 0x4400 + case 1133: { /* '1133' */ + return 0x4400 } - case 1248: - { /* '1248' */ - return 0x4400 + case 1134: { /* '1134' */ + return 0x4400 } - case 1249: - { /* '1249' */ - return 0x4400 + case 1135: { /* '1135' */ + return 0x4400 } - case 125: - { /* '125' */ - return 0x43FE + case 1136: { /* '1136' */ + return 0x4258 } - case 1250: - { /* '1250' */ - return 0x4400 + case 1137: { /* '1137' */ + return 0x4258 } - case 1251: - { /* '1251' */ - return 0x4400 + case 1138: { /* '1138' */ + return 0x425C } - case 1252: - { /* '1252' */ - return 0x4400 + case 1139: { /* '1139' */ + return 0x425C } - case 1253: - { /* '1253' */ - return 0x4400 + case 114: { /* '114' */ + return 0x4106 } - case 1254: - { /* '1254' */ - return 0x4400 + case 1140: { /* '1140' */ + return 0x425C } - case 1255: - { /* '1255' */ - return 0x4400 + case 1141: { /* '1141' */ + return 0x40F4 } - case 1256: - { /* '1256' */ - return 0x4144 + case 1142: { /* '1142' */ + return 0x4400 } - case 1257: - { /* '1257' */ - return 0x4760 + case 1143: { /* '1143' */ + return 0x4400 } - case 1258: - { /* '1258' */ - return 0x4100 + case 1144: { /* '1144' */ + return 0x4400 } - case 1259: - { /* '1259' */ - return 0x4400 + case 1145: { /* '1145' */ + return 0x4400 } - case 126: - { /* '126' */ - return 0x414E + case 1146: { /* '1146' */ + return 0x4400 } - case 1260: - { /* '1260' */ - return 0x46A0 + case 1147: { /* '1147' */ + return 0x4145 } - case 1261: - { /* '1261' */ - return 0x4400 + case 1148: { /* '1148' */ + return 0x4195 } - case 1262: - { /* '1262' */ - return 0x41E4 + case 1149: { /* '1149' */ + return 0x4195 } - case 1263: - { /* '1263' */ - return 0x41E4 + case 115: { /* '115' */ + return 0x40A6 } - case 1264: - { /* '1264' */ - return 0x4400 + case 1150: { /* '1150' */ + return 0x4195 } - case 1265: - { /* '1265' */ - return 0x4400 + case 1151: { /* '1151' */ + return 0x4195 } - case 1266: - { /* '1266' */ - return 0x4400 + case 1152: { /* '1152' */ + return 0x4145 } - case 1267: - { /* '1267' */ - return 0x4400 + case 1153: { /* '1153' */ + return 0x4195 } - case 1268: - { /* '1268' */ - return 0x43FE + case 1154: { /* '1154' */ + return 0x4195 } - case 1269: - { /* '1269' */ - return 0x4324 + case 1155: { /* '1155' */ + return 0x41E5 } - case 127: - { /* '127' */ - return 0x414E + case 1156: { /* '1156' */ + return 0x4195 } - case 1270: - { /* '1270' */ - return 0x4100 + case 1157: { /* '1157' */ + return 0x43FF } - case 1271: - { /* '1271' */ - return 0x4100 + case 1158: { /* '1158' */ + return 0x41E5 } - case 1272: - { /* '1272' */ - return 0x4100 + case 1159: { /* '1159' */ + return 0x4195 } - case 1273: - { /* '1273' */ - return 0x41E4 + case 116: { /* '116' */ + return 0x40A6 } - case 1274: - { /* '1274' */ - return 0x43C4 + case 1160: { /* '1160' */ + return 0x4195 } - case 1275: - { /* '1275' */ - return 0x4760 + case 1161: { /* '1161' */ + return 0x4195 } - case 1276: - { /* '1276' */ - return 0x42E8 + case 1162: { /* '1162' */ + return 0x4195 } - case 1277: - { /* '1277' */ - return 0x4324 + case 1163: { /* '1163' */ + return 0x4145 } - case 1278: - { /* '1278' */ - return 0x42D4 + case 1164: { /* '1164' */ + return 0x4145 } - case 1279: - { /* '1279' */ - return 0x4144 + case 1165: { /* '1165' */ + return 0x4195 } - case 128: - { /* '128' */ - return 0x43FE + case 1166: { /* '1166' */ + return 0x4195 } - case 1280: - { /* '1280' */ - return 0x40CC + case 1167: { /* '1167' */ + return 0x41E5 } - case 1281: - { /* '1281' */ - return 0x41A8 + case 1168: { /* '1168' */ + return 0x4195 } - case 1282: - { /* '1282' */ - return 0x4144 + case 1169: { /* '1169' */ + return 0x43FF } - case 1283: - { /* '1283' */ - return 0x4202 + case 117: { /* '117' */ + return 0x40A6 } - case 1284: - { /* '1284' */ - return 0x4200 + case 1170: { /* '1170' */ + return 0x41E5 } - case 1285: - { /* '1285' */ - return 0x4400 + case 1171: { /* '1171' */ + return 0x4195 } - case 1286: - { /* '1286' */ - return 0x43FC + case 1172: { /* '1172' */ + return 0x4195 } - case 1287: - { /* '1287' */ - return 0x4194 + case 1173: { /* '1173' */ + return 0x4195 } - case 1288: - { /* '1288' */ - return 0x4324 + case 1174: { /* '1174' */ + return 0x4195 } - case 1289: - { /* '1289' */ - return 0x4324 + case 1175: { /* '1175' */ + return 0x4145 } - case 129: - { /* '129' */ - return 0x4400 + case 1176: { /* '1176' */ + return 0x41E5 } - case 1290: - { /* '1290' */ - return 0x4324 + case 1177: { /* '1177' */ + return 0x4195 } - case 1291: - { /* '1291' */ - return 0x4324 + case 1178: { /* '1178' */ + return 0x43FF } - case 1292: - { /* '1292' */ - return 0x4400 + case 1179: { /* '1179' */ + return 0x41E5 } - case 1293: - { /* '1293' */ - return 0x4000 + case 118: { /* '118' */ + return 0x40A6 } - case 1294: - { /* '1294' */ - return 0x4000 + case 1180: { /* '1180' */ + return 0x4195 } - case 1295: - { /* '1295' */ - return 0x4000 + case 1181: { /* '1181' */ + return 0x4195 } - case 1296: - { /* '1296' */ - return 0x4000 + case 1182: { /* '1182' */ + return 0x4195 } - case 1297: - { /* '1297' */ - return 0x4000 + case 1183: { /* '1183' */ + return 0x4195 } - case 1298: - { /* '1298' */ - return 0x4000 + case 1184: { /* '1184' */ + return 0x4145 } - case 1299: - { /* '1299' */ - return 0x4000 + case 1185: { /* '1185' */ + return 0x41E5 } - case 13: - { /* '13' */ - return 0x43FE + case 1186: { /* '1186' */ + return 0x4195 } - case 130: - { /* '130' */ - return 0x4400 + case 1187: { /* '1187' */ + return 0x43FF } - case 1300: - { /* '1300' */ - return 0x4000 + case 1188: { /* '1188' */ + return 0x41E5 } - case 1301: - { /* '1301' */ - return 0x4000 + case 1189: { /* '1189' */ + return 0x4195 } - case 1302: - { /* '1302' */ - return 0x4000 + case 119: { /* '119' */ + return 0x4086 } - case 1303: - { /* '1303' */ - return 0x4000 + case 1190: { /* '1190' */ + return 0x4195 } - case 1304: - { /* '1304' */ - return 0x4000 + case 1191: { /* '1191' */ + return 0x4195 } - case 1305: - { /* '1305' */ - return 0x4000 + case 1192: { /* '1192' */ + return 0x4195 } - case 1306: - { /* '1306' */ - return 0x4000 + case 1193: { /* '1193' */ + return 0x41E5 } - case 1307: - { /* '1307' */ - return 0x4000 + case 1194: { /* '1194' */ + return 0x43FF } - case 1308: - { /* '1308' */ - return 0x4000 + case 1195: { /* '1195' */ + return 0x43FF } - case 1309: - { /* '1309' */ - return 0x4000 + case 1196: { /* '1196' */ + return 0x43FF } - case 131: - { /* '131' */ - return 0x4400 + case 1197: { /* '1197' */ + return 0x43FF } - case 1310: - { /* '1310' */ - return 0x4000 + case 1198: { /* '1198' */ + return 0x43FF } - case 1311: - { /* '1311' */ - return 0x4000 + case 1199: { /* '1199' */ + return 0x43FF } - case 1312: - { /* '1312' */ - return 0x4000 + case 12: { /* '12' */ + return 0x43FE } - case 1313: - { /* '1313' */ - return 0x4000 + case 120: { /* '120' */ + return 0x4086 } - case 1314: - { /* '1314' */ - return 0x4000 + case 1200: { /* '1200' */ + return 0x43FF } - case 1315: - { /* '1315' */ - return 0x4000 + case 1201: { /* '1201' */ + return 0x43FF } - case 1316: - { /* '1316' */ - return 0x4000 + case 1202: { /* '1202' */ + return 0x43FF } - case 1317: - { /* '1317' */ - return 0x4000 + case 1203: { /* '1203' */ + return 0x43FF } - case 1318: - { /* '1318' */ - return 0x4000 + case 1204: { /* '1204' */ + return 0x43FF } - case 1319: - { /* '1319' */ - return 0x4000 + case 1205: { /* '1205' */ + return 0x43FF } - case 132: - { /* '132' */ - return 0x4400 + case 1206: { /* '1206' */ + return 0x4324 } - case 1320: - { /* '1320' */ - return 0x4000 + case 1207: { /* '1207' */ + return 0x43FF } - case 1321: - { /* '1321' */ - return 0x4000 + case 1208: { /* '1208' */ + return 0x43FF } - case 1322: - { /* '1322' */ - return 0x4000 + case 1209: { /* '1209' */ + return 0x43FF } - case 1323: - { /* '1323' */ - return 0x4000 + case 121: { /* '121' */ + return 0x40C2 } - case 1324: - { /* '1324' */ - return 0x4000 + case 1210: { /* '1210' */ + return 0x4194 } - case 1325: - { /* '1325' */ - return 0x4000 + case 1211: { /* '1211' */ + return 0x43FE } - case 1326: - { /* '1326' */ - return 0x4000 + case 1212: { /* '1212' */ + return 0x43FE } - case 1327: - { /* '1327' */ - return 0x4000 + case 1213: { /* '1213' */ + return 0x4324 } - case 1328: - { /* '1328' */ - return 0x4000 + case 1214: { /* '1214' */ + return 0x4324 } - case 1329: - { /* '1329' */ - return 0x4000 + case 1215: { /* '1215' */ + return 0x43FE } - case 133: - { /* '133' */ - return 0x4400 + case 1216: { /* '1216' */ + return 0x43EC } - case 1330: - { /* '1330' */ - return 0x4000 + case 1217: { /* '1217' */ + return 0x41C8 } - case 1331: - { /* '1331' */ - return 0x4000 + case 1218: { /* '1218' */ + return 0x43FE } - case 1332: - { /* '1332' */ - return 0x4000 + case 1219: { /* '1219' */ + return 0x43FF } - case 1333: - { /* '1333' */ - return 0x4000 + case 122: { /* '122' */ + return 0x40C4 } - case 1334: - { /* '1334' */ - return 0x4000 + case 1220: { /* '1220' */ + return 0x43FF } - case 1335: - { /* '1335' */ - return 0x4000 + case 1221: { /* '1221' */ + return 0x43FF } - case 1336: - { /* '1336' */ - return 0x4000 + case 1222: { /* '1222' */ + return 0x43FF } - case 1337: - { /* '1337' */ - return 0x4000 + case 1223: { /* '1223' */ + return 0x4324 } - case 1338: - { /* '1338' */ - return 0x4000 + case 1224: { /* '1224' */ + return 0x43FF } - case 1339: - { /* '1339' */ - return 0x4000 + case 1225: { /* '1225' */ + return 0x43FF } - case 134: - { /* '134' */ - return 0x4400 + case 1226: { /* '1226' */ + return 0x43FF } - case 1340: - { /* '1340' */ - return 0x7000 + case 1227: { /* '1227' */ + return 0x43FF } - case 1341: - { /* '1341' */ - return 0x7000 + case 1228: { /* '1228' */ + return 0x43FF } - case 1342: - { /* '1342' */ - return 0x4000 + case 1229: { /* '1229' */ + return 0x43FF } - case 1343: - { /* '1343' */ - return 0x4000 + case 123: { /* '123' */ + return 0x40C4 } - case 1344: - { /* '1344' */ - return 0x41C8 + case 1230: { /* '1230' */ + return 0x43FF } - case 1345: - { /* '1345' */ - return 0x43FE + case 1231: { /* '1231' */ + return 0x43FF } - case 1346: - { /* '1346' */ - return 0x43FE + case 1232: { /* '1232' */ + return 0x43FF } - case 1347: - { /* '1347' */ - return 0x43FF + case 1233: { /* '1233' */ + return 0x43FF } - case 1348: - { /* '1348' */ - return 0x43FF + case 1234: { /* '1234' */ + return 0x43FF } - case 1349: - { /* '1349' */ - return 0x43FF + case 1235: { /* '1235' */ + return 0x43FF } - case 135: - { /* '135' */ - return 0x4400 + case 1236: { /* '1236' */ + return 0x43FF } - case 1350: - { /* '1350' */ - return 0x43FF + case 1237: { /* '1237' */ + return 0x43FF } - case 1351: - { /* '1351' */ - return 0x43FE + case 1238: { /* '1238' */ + return 0x43FF } - case 1352: - { /* '1352' */ - return 0x43FE + case 1239: { /* '1239' */ + return 0x43FF } - case 1353: - { /* '1353' */ - return 0x43FE + case 124: { /* '124' */ + return 0x43FE } - case 1354: - { /* '1354' */ - return 0x43FE + case 1240: { /* '1240' */ + return 0x43FF } - case 1355: - { /* '1355' */ - return 0x43FF + case 1241: { /* '1241' */ + return 0x8700 } - case 1356: - { /* '1356' */ - return 0x43FF + case 1242: { /* '1242' */ + return 0x4324 } - case 1357: - { /* '1357' */ - return 0x43FF + case 1243: { /* '1243' */ + return 0x43FC } - case 1358: - { /* '1358' */ - return 0x4400 + case 1244: { /* '1244' */ + return 0x4200 } - case 1359: - { /* '1359' */ - return 0x4400 + case 1245: { /* '1245' */ + return 0x4400 } - case 136: - { /* '136' */ - return 0x4400 + case 1246: { /* '1246' */ + return 0x43FE } - case 1360: - { /* '1360' */ - return 0x43FF + case 1247: { /* '1247' */ + return 0x4400 } - case 1361: - { /* '1361' */ - return 0x43FF + case 1248: { /* '1248' */ + return 0x4400 } - case 1362: - { /* '1362' */ - return 0x4400 + case 1249: { /* '1249' */ + return 0x4400 } - case 1363: - { /* '1363' */ - return 0x4400 + case 125: { /* '125' */ + return 0x43FE } - case 1364: - { /* '1364' */ - return 0x43FF + case 1250: { /* '1250' */ + return 0x4400 } - case 1365: - { /* '1365' */ - return 0x43FF + case 1251: { /* '1251' */ + return 0x4400 } - case 1366: - { /* '1366' */ - return 0x43FF + case 1252: { /* '1252' */ + return 0x4400 } - case 1367: - { /* '1367' */ - return 0x4400 + case 1253: { /* '1253' */ + return 0x4400 } - case 1368: - { /* '1368' */ - return 0x4400 + case 1254: { /* '1254' */ + return 0x4400 } - case 1369: - { /* '1369' */ - return 0x4400 + case 1255: { /* '1255' */ + return 0x4400 } - case 137: - { /* '137' */ - return 0x43FE + case 1256: { /* '1256' */ + return 0x4144 } - case 1370: - { /* '1370' */ - return 0x4400 + case 1257: { /* '1257' */ + return 0x4760 } - case 1371: - { /* '1371' */ - return 0x4400 + case 1258: { /* '1258' */ + return 0x4100 } - case 1372: - { /* '1372' */ - return 0x4400 + case 1259: { /* '1259' */ + return 0x4400 } - case 1373: - { /* '1373' */ - return 0x4400 + case 126: { /* '126' */ + return 0x414E } - case 1374: - { /* '1374' */ - return 0x4400 + case 1260: { /* '1260' */ + return 0x46A0 } - case 1375: - { /* '1375' */ - return 0x4400 + case 1261: { /* '1261' */ + return 0x4400 } - case 1376: - { /* '1376' */ - return 0x4400 + case 1262: { /* '1262' */ + return 0x41E4 } - case 1377: - { /* '1377' */ - return 0x4400 + case 1263: { /* '1263' */ + return 0x41E4 } - case 1378: - { /* '1378' */ - return 0x4400 + case 1264: { /* '1264' */ + return 0x4400 } - case 1379: - { /* '1379' */ - return 0x43FE + case 1265: { /* '1265' */ + return 0x4400 } - case 138: - { /* '138' */ - return 0x402C + case 1266: { /* '1266' */ + return 0x4400 } - case 1380: - { /* '1380' */ - return 0x43FE + case 1267: { /* '1267' */ + return 0x4400 } - case 1381: - { /* '1381' */ - return 0x4324 + case 1268: { /* '1268' */ + return 0x43FE } - case 1382: - { /* '1382' */ - return 0x4193 + case 1269: { /* '1269' */ + return 0x4324 } - case 1383: - { /* '1383' */ - return 0x43FE + case 127: { /* '127' */ + return 0x414E } - case 1384: - { /* '1384' */ - return 0x43FE + case 1270: { /* '1270' */ + return 0x4100 } - case 1385: - { /* '1385' */ - return 0x43FE + case 1271: { /* '1271' */ + return 0x4100 } - case 1386: - { /* '1386' */ - return 0x43FF + case 1272: { /* '1272' */ + return 0x4100 } - case 1387: - { /* '1387' */ - return 0x4400 + case 1273: { /* '1273' */ + return 0x41E4 } - case 1388: - { /* '1388' */ - return 0x4400 + case 1274: { /* '1274' */ + return 0x43C4 } - case 1389: - { /* '1389' */ - return 0x4400 + case 1275: { /* '1275' */ + return 0x4760 } - case 139: - { /* '139' */ - return 0x43FE + case 1276: { /* '1276' */ + return 0x42E8 } - case 1390: - { /* '1390' */ - return 0x43FF + case 1277: { /* '1277' */ + return 0x4324 } - case 1391: - { /* '1391' */ - return 0x43FF + case 1278: { /* '1278' */ + return 0x42D4 } - case 1392: - { /* '1392' */ - return 0x4400 + case 1279: { /* '1279' */ + return 0x4144 } - case 1393: - { /* '1393' */ - return 0x4400 + case 128: { /* '128' */ + return 0x43FE } - case 1394: - { /* '1394' */ - return 0x4400 + case 1280: { /* '1280' */ + return 0x40CC } - case 1395: - { /* '1395' */ - return 0x4400 + case 1281: { /* '1281' */ + return 0x41A8 } - case 1396: - { /* '1396' */ - return 0x4400 + case 1282: { /* '1282' */ + return 0x4144 } - case 1397: - { /* '1397' */ - return 0x4400 + case 1283: { /* '1283' */ + return 0x4202 } - case 1398: - { /* '1398' */ - return 0x4400 + case 1284: { /* '1284' */ + return 0x4200 } - case 1399: - { /* '1399' */ - return 0x43FF + case 1285: { /* '1285' */ + return 0x4400 } - case 14: - { /* '14' */ - return 0x43FF + case 1286: { /* '1286' */ + return 0x43FC } - case 140: - { /* '140' */ - return 0x4400 + case 1287: { /* '1287' */ + return 0x4194 } - case 1400: - { /* '1400' */ - return 0x4324 + case 1288: { /* '1288' */ + return 0x4324 } - case 1401: - { /* '1401' */ - return 0x4400 + case 1289: { /* '1289' */ + return 0x4324 } - case 1402: - { /* '1402' */ - return 0x4400 + case 129: { /* '129' */ + return 0x4400 } - case 1403: - { /* '1403' */ - return 0x4400 + case 1290: { /* '1290' */ + return 0x4324 } - case 1404: - { /* '1404' */ - return 0x43FF + case 1291: { /* '1291' */ + return 0x4324 } - case 1405: - { /* '1405' */ - return 0x43FF + case 1292: { /* '1292' */ + return 0x4400 } - case 1406: - { /* '1406' */ - return 0x4400 + case 1293: { /* '1293' */ + return 0x4000 } - case 1407: - { /* '1407' */ - return 0x4400 + case 1294: { /* '1294' */ + return 0x4000 } - case 1408: - { /* '1408' */ - return 0x4400 + case 1295: { /* '1295' */ + return 0x4000 } - case 1409: - { /* '1409' */ - return 0x4400 + case 1296: { /* '1296' */ + return 0x4000 } - case 141: - { /* '141' */ - return 0x43FE + case 1297: { /* '1297' */ + return 0x4000 } - case 1410: - { /* '1410' */ - return 0x43FE + case 1298: { /* '1298' */ + return 0x4000 } - case 1411: - { /* '1411' */ - return 0x43FE + case 1299: { /* '1299' */ + return 0x4000 } - case 1412: - { /* '1412' */ - return 0x43FE + case 13: { /* '13' */ + return 0x43FE } - case 1413: - { /* '1413' */ - return 0x43FE + case 130: { /* '130' */ + return 0x4400 } - case 1414: - { /* '1414' */ - return 0x43FE + case 1300: { /* '1300' */ + return 0x4000 } - case 1415: - { /* '1415' */ - return 0x43FE + case 1301: { /* '1301' */ + return 0x4000 } - case 1416: - { /* '1416' */ - return 0x4400 + case 1302: { /* '1302' */ + return 0x4000 } - case 1417: - { /* '1417' */ - return 0x43FC + case 1303: { /* '1303' */ + return 0x4000 } - case 1418: - { /* '1418' */ - return 0x4400 + case 1304: { /* '1304' */ + return 0x4000 } - case 1419: - { /* '1419' */ - return 0x43FF + case 1305: { /* '1305' */ + return 0x4000 } - case 142: - { /* '142' */ - return 0x4400 + case 1306: { /* '1306' */ + return 0x4000 } - case 1420: - { /* '1420' */ - return 0x43FF + case 1307: { /* '1307' */ + return 0x4000 } - case 1421: - { /* '1421' */ - return 0x4400 + case 1308: { /* '1308' */ + return 0x4000 } - case 1422: - { /* '1422' */ - return 0x4400 + case 1309: { /* '1309' */ + return 0x4000 } - case 1423: - { /* '1423' */ - return 0x43FF + case 131: { /* '131' */ + return 0x4400 } - case 1424: - { /* '1424' */ - return 0x4400 + case 1310: { /* '1310' */ + return 0x4000 } - case 1425: - { /* '1425' */ - return 0x4400 + case 1311: { /* '1311' */ + return 0x4000 } - case 1426: - { /* '1426' */ - return 0x43FF + case 1312: { /* '1312' */ + return 0x4000 } - case 1427: - { /* '1427' */ - return 0x4400 + case 1313: { /* '1313' */ + return 0x4000 } - case 1428: - { /* '1428' */ - return 0x4400 + case 1314: { /* '1314' */ + return 0x4000 } - case 1429: - { /* '1429' */ - return 0x4400 + case 1315: { /* '1315' */ + return 0x4000 } - case 143: - { /* '143' */ - return 0x43CE + case 1316: { /* '1316' */ + return 0x4000 } - case 1430: - { /* '1430' */ - return 0x4400 + case 1317: { /* '1317' */ + return 0x4000 } - case 1431: - { /* '1431' */ - return 0x4400 + case 1318: { /* '1318' */ + return 0x4000 } - case 1432: - { /* '1432' */ - return 0x43FC + case 1319: { /* '1319' */ + return 0x4000 } - case 1433: - { /* '1433' */ - return 0x4000 + case 132: { /* '132' */ + return 0x4400 } - case 1434: - { /* '1434' */ - return 0x43FE + case 1320: { /* '1320' */ + return 0x4000 } - case 1435: - { /* '1435' */ - return 0x4400 + case 1321: { /* '1321' */ + return 0x4000 } - case 1436: - { /* '1436' */ - return 0x4400 + case 1322: { /* '1322' */ + return 0x4000 } - case 1437: - { /* '1437' */ - return 0x43FE + case 1323: { /* '1323' */ + return 0x4000 } - case 1438: - { /* '1438' */ - return 0x43FE + case 1324: { /* '1324' */ + return 0x4000 } - case 1439: - { /* '1439' */ - return 0x43FE + case 1325: { /* '1325' */ + return 0x4000 } - case 144: - { /* '144' */ - return 0x4400 + case 1326: { /* '1326' */ + return 0x4000 } - case 1440: - { /* '1440' */ - return 0x43FC + case 1327: { /* '1327' */ + return 0x4000 } - case 1441: - { /* '1441' */ - return 0x4400 + case 1328: { /* '1328' */ + return 0x4000 } - case 1442: - { /* '1442' */ - return 0x4400 + case 1329: { /* '1329' */ + return 0x4000 } - case 1443: - { /* '1443' */ - return 0x4400 + case 133: { /* '133' */ + return 0x4400 } - case 1444: - { /* '1444' */ - return 0x4400 + case 1330: { /* '1330' */ + return 0x4000 } - case 1445: - { /* '1445' */ - return 0x4400 + case 1331: { /* '1331' */ + return 0x4000 } - case 1446: - { /* '1446' */ - return 0x4400 + case 1332: { /* '1332' */ + return 0x4000 } - case 1447: - { /* '1447' */ - return 0x4400 + case 1333: { /* '1333' */ + return 0x4000 } - case 1448: - { /* '1448' */ - return 0x4400 + case 1334: { /* '1334' */ + return 0x4000 } - case 1449: - { /* '1449' */ - return 0x4400 + case 1335: { /* '1335' */ + return 0x4000 } - case 145: - { /* '145' */ - return 0x4400 + case 1336: { /* '1336' */ + return 0x4000 } - case 1450: - { /* '1450' */ - return 0x4400 + case 1337: { /* '1337' */ + return 0x4000 } - case 1451: - { /* '1451' */ - return 0x43FE + case 1338: { /* '1338' */ + return 0x4000 } - case 1452: - { /* '1452' */ - return 0x43FF + case 1339: { /* '1339' */ + return 0x4000 } - case 1453: - { /* '1453' */ - return 0x4400 + case 134: { /* '134' */ + return 0x4400 } - case 1454: - { /* '1454' */ - return 0x4400 + case 1340: { /* '1340' */ + return 0x7000 } - case 1455: - { /* '1455' */ - return 0x4400 + case 1341: { /* '1341' */ + return 0x7000 } - case 1456: - { /* '1456' */ - return 0x4400 + case 1342: { /* '1342' */ + return 0x4000 } - case 1457: - { /* '1457' */ - return 0x4400 + case 1343: { /* '1343' */ + return 0x4000 } - case 1458: - { /* '1458' */ - return 0x4400 + case 1344: { /* '1344' */ + return 0x41C8 } - case 1459: - { /* '1459' */ - return 0x4400 + case 1345: { /* '1345' */ + return 0x43FE } - case 146: - { /* '146' */ - return 0x4400 + case 1346: { /* '1346' */ + return 0x43FE } - case 1460: - { /* '1460' */ - return 0x4400 + case 1347: { /* '1347' */ + return 0x43FF } - case 1461: - { /* '1461' */ - return 0x4400 + case 1348: { /* '1348' */ + return 0x43FF } - case 1462: - { /* '1462' */ - return 0x4400 + case 1349: { /* '1349' */ + return 0x43FF } - case 1463: - { /* '1463' */ - return 0x4400 + case 135: { /* '135' */ + return 0x4400 } - case 1464: - { /* '1464' */ - return 0x4400 + case 1350: { /* '1350' */ + return 0x43FF } - case 1465: - { /* '1465' */ - return 0x4400 + case 1351: { /* '1351' */ + return 0x43FE } - case 1466: - { /* '1466' */ - return 0x4400 + case 1352: { /* '1352' */ + return 0x43FE } - case 1467: - { /* '1467' */ - return 0x4400 + case 1353: { /* '1353' */ + return 0x43FE } - case 1468: - { /* '1468' */ - return 0x4400 + case 1354: { /* '1354' */ + return 0x43FE } - case 1469: - { /* '1469' */ - return 0x4400 + case 1355: { /* '1355' */ + return 0x43FF } - case 147: - { /* '147' */ - return 0x4400 + case 1356: { /* '1356' */ + return 0x43FF } - case 1470: - { /* '1470' */ - return 0x4400 + case 1357: { /* '1357' */ + return 0x43FF } - case 1471: - { /* '1471' */ - return 0x4400 + case 1358: { /* '1358' */ + return 0x4400 } - case 1472: - { /* '1472' */ - return 0x4400 + case 1359: { /* '1359' */ + return 0x4400 } - case 1473: - { /* '1473' */ - return 0x4400 + case 136: { /* '136' */ + return 0x4400 } - case 1474: - { /* '1474' */ - return 0x4400 + case 1360: { /* '1360' */ + return 0x43FF } - case 1475: - { /* '1475' */ - return 0x4400 + case 1361: { /* '1361' */ + return 0x43FF } - case 1476: - { /* '1476' */ - return 0x4400 + case 1362: { /* '1362' */ + return 0x4400 } - case 1477: - { /* '1477' */ - return 0x4400 + case 1363: { /* '1363' */ + return 0x4400 } - case 1478: - { /* '1478' */ - return 0x48D6 + case 1364: { /* '1364' */ + return 0x43FF } - case 1479: - { /* '1479' */ - return 0x5220 + case 1365: { /* '1365' */ + return 0x43FF } - case 148: - { /* '148' */ - return 0x4400 + case 1366: { /* '1366' */ + return 0x43FF } - case 1480: - { /* '1480' */ - return 0x43FF + case 1367: { /* '1367' */ + return 0x4400 } - case 1481: - { /* '1481' */ - return 0x43FF + case 1368: { /* '1368' */ + return 0x4400 } - case 1482: - { /* '1482' */ - return 0x43FE + case 1369: { /* '1369' */ + return 0x4400 } - case 1483: - { /* '1483' */ - return 0x43FE + case 137: { /* '137' */ + return 0x43FE } - case 1484: - { /* '1484' */ - return 0x45E0 + case 1370: { /* '1370' */ + return 0x4400 } - case 1485: - { /* '1485' */ - return 0x4400 + case 1371: { /* '1371' */ + return 0x4400 } - case 1486: - { /* '1486' */ - return 0x4400 + case 1372: { /* '1372' */ + return 0x4400 } - case 1487: - { /* '1487' */ - return 0x4400 + case 1373: { /* '1373' */ + return 0x4400 } - case 1488: - { /* '1488' */ - return 0x4400 + case 1374: { /* '1374' */ + return 0x4400 } - case 1489: - { /* '1489' */ - return 0x43FE + case 1375: { /* '1375' */ + return 0x4400 } - case 149: - { /* '149' */ - return 0x43FF + case 1376: { /* '1376' */ + return 0x4400 } - case 1490: - { /* '1490' */ - return 0x4400 + case 1377: { /* '1377' */ + return 0x4400 } - case 1491: - { /* '1491' */ - return 0x4400 + case 1378: { /* '1378' */ + return 0x4400 } - case 1492: - { /* '1492' */ - return 0x4400 + case 1379: { /* '1379' */ + return 0x43FE } - case 1493: - { /* '1493' */ - return 0x4400 + case 138: { /* '138' */ + return 0x402C } - case 1494: - { /* '1494' */ - return 0x4400 + case 1380: { /* '1380' */ + return 0x43FE } - case 1495: - { /* '1495' */ - return 0x4400 + case 1381: { /* '1381' */ + return 0x4324 } - case 1496: - { /* '1496' */ - return 0x4400 + case 1382: { /* '1382' */ + return 0x4193 } - case 1497: - { /* '1497' */ - return 0x4400 + case 1383: { /* '1383' */ + return 0x43FE } - case 1498: - { /* '1498' */ - return 0x4400 + case 1384: { /* '1384' */ + return 0x43FE } - case 1499: - { /* '1499' */ - return 0x43FE + case 1385: { /* '1385' */ + return 0x43FE } - case 15: - { /* '15' */ - return 0x43FF + case 1386: { /* '1386' */ + return 0x43FF } - case 150: - { /* '150' */ - return 0x43FF + case 1387: { /* '1387' */ + return 0x4400 } - case 1500: - { /* '1500' */ - return 0x43FE + case 1388: { /* '1388' */ + return 0x4400 } - case 1501: - { /* '1501' */ - return 0x43FE + case 1389: { /* '1389' */ + return 0x4400 } - case 1502: - { /* '1502' */ - return 0x43FE + case 139: { /* '139' */ + return 0x43FE } - case 1503: - { /* '1503' */ - return 0x4400 + case 1390: { /* '1390' */ + return 0x43FF } - case 1504: - { /* '1504' */ - return 0x4400 + case 1391: { /* '1391' */ + return 0x43FF } - case 1505: - { /* '1505' */ - return 0x46A0 + case 1392: { /* '1392' */ + return 0x4400 } - case 1506: - { /* '1506' */ - return 0x4400 + case 1393: { /* '1393' */ + return 0x4400 } - case 1507: - { /* '1507' */ - return 0x4400 + case 1394: { /* '1394' */ + return 0x4400 } - case 1508: - { /* '1508' */ - return 0x4400 + case 1395: { /* '1395' */ + return 0x4400 } - case 1509: - { /* '1509' */ - return 0x4400 + case 1396: { /* '1396' */ + return 0x4400 } - case 151: - { /* '151' */ - return 0x4400 + case 1397: { /* '1397' */ + return 0x4400 } - case 1510: - { /* '1510' */ - return 0x4400 + case 1398: { /* '1398' */ + return 0x4400 } - case 1511: - { /* '1511' */ - return 0x4400 + case 1399: { /* '1399' */ + return 0x43FF } - case 1512: - { /* '1512' */ - return 0x4400 + case 14: { /* '14' */ + return 0x43FF } - case 1513: - { /* '1513' */ - return 0x4400 + case 140: { /* '140' */ + return 0x4400 } - case 1514: - { /* '1514' */ - return 0x4400 + case 1400: { /* '1400' */ + return 0x4324 } - case 1515: - { /* '1515' */ - return 0x4400 + case 1401: { /* '1401' */ + return 0x4400 } - case 1516: - { /* '1516' */ - return 0x4400 + case 1402: { /* '1402' */ + return 0x4400 } - case 1517: - { /* '1517' */ - return 0x4400 + case 1403: { /* '1403' */ + return 0x4400 } - case 1518: - { /* '1518' */ - return 0x4400 + case 1404: { /* '1404' */ + return 0x43FF } - case 1519: - { /* '1519' */ - return 0x4400 + case 1405: { /* '1405' */ + return 0x43FF } - case 152: - { /* '152' */ - return 0x43FE + case 1406: { /* '1406' */ + return 0x4400 } - case 1520: - { /* '1520' */ - return 0x4400 + case 1407: { /* '1407' */ + return 0x4400 } - case 1521: - { /* '1521' */ - return 0x4400 + case 1408: { /* '1408' */ + return 0x4400 } - case 1522: - { /* '1522' */ - return 0x4400 + case 1409: { /* '1409' */ + return 0x4400 } - case 1523: - { /* '1523' */ - return 0x4400 + case 141: { /* '141' */ + return 0x43FE } - case 1524: - { /* '1524' */ - return 0x4400 + case 1410: { /* '1410' */ + return 0x43FE } - case 1525: - { /* '1525' */ - return 0x4100 + case 1411: { /* '1411' */ + return 0x43FE } - case 1526: - { /* '1526' */ - return 0x4200 + case 1412: { /* '1412' */ + return 0x43FE } - case 1527: - { /* '1527' */ - return 0x4400 + case 1413: { /* '1413' */ + return 0x43FE } - case 1528: - { /* '1528' */ - return 0x4400 + case 1414: { /* '1414' */ + return 0x43FE } - case 1529: - { /* '1529' */ - return 0x4400 + case 1415: { /* '1415' */ + return 0x43FE } - case 153: - { /* '153' */ - return 0x4204 + case 1416: { /* '1416' */ + return 0x4400 } - case 1530: - { /* '1530' */ - return 0x4400 + case 1417: { /* '1417' */ + return 0x43FC } - case 1531: - { /* '1531' */ - return 0x43FE + case 1418: { /* '1418' */ + return 0x4400 } - case 1532: - { /* '1532' */ - return 0x43FE + case 1419: { /* '1419' */ + return 0x43FF } - case 1533: - { /* '1533' */ - return 0x43FE + case 142: { /* '142' */ + return 0x4400 } - case 1534: - { /* '1534' */ - return 0x43FE + case 1420: { /* '1420' */ + return 0x43FF } - case 1535: - { /* '1535' */ - return 0x43FE + case 1421: { /* '1421' */ + return 0x4400 } - case 1536: - { /* '1536' */ - return 0x43FE + case 1422: { /* '1422' */ + return 0x4400 } - case 1537: - { /* '1537' */ - return 0x419C + case 1423: { /* '1423' */ + return 0x43FF } - case 1538: - { /* '1538' */ - return 0x419C + case 1424: { /* '1424' */ + return 0x4400 } - case 1539: - { /* '1539' */ - return 0x48D6 + case 1425: { /* '1425' */ + return 0x4400 } - case 154: - { /* '154' */ - return 0x4400 + case 1426: { /* '1426' */ + return 0x43FF } - case 1540: - { /* '1540' */ - return 0x43FE + case 1427: { /* '1427' */ + return 0x4400 } - case 1541: - { /* '1541' */ - return 0x426C + case 1428: { /* '1428' */ + return 0x4400 } - case 1542: - { /* '1542' */ - return 0x426C + case 1429: { /* '1429' */ + return 0x4400 } - case 1543: - { /* '1543' */ - return 0x4204 + case 143: { /* '143' */ + return 0x43CE } - case 1544: - { /* '1544' */ - return 0x43FE + case 1430: { /* '1430' */ + return 0x4400 } - case 1545: - { /* '1545' */ - return 0x43FE + case 1431: { /* '1431' */ + return 0x4400 } - case 1546: - { /* '1546' */ - return 0x43FE + case 1432: { /* '1432' */ + return 0x43FC } - case 1547: - { /* '1547' */ - return 0x43FE + case 1433: { /* '1433' */ + return 0x4000 } - case 1548: - { /* '1548' */ - return 0x43FE + case 1434: { /* '1434' */ + return 0x43FE } - case 1549: - { /* '1549' */ - return 0x43FE + case 1435: { /* '1435' */ + return 0x4400 } - case 155: - { /* '155' */ - return 0x4324 + case 1436: { /* '1436' */ + return 0x4400 } - case 1550: - { /* '1550' */ - return 0x43FE + case 1437: { /* '1437' */ + return 0x43FE } - case 1551: - { /* '1551' */ - return 0x4400 + case 1438: { /* '1438' */ + return 0x43FE } - case 1552: - { /* '1552' */ - return 0x43FC + case 1439: { /* '1439' */ + return 0x43FE } - case 1553: - { /* '1553' */ - return 0x4204 + case 144: { /* '144' */ + return 0x4400 } - case 1554: - { /* '1554' */ - return 0x4400 + case 1440: { /* '1440' */ + return 0x43FC } - case 1555: - { /* '1555' */ - return 0x4400 + case 1441: { /* '1441' */ + return 0x4400 } - case 1556: - { /* '1556' */ - return 0x4400 + case 1442: { /* '1442' */ + return 0x4400 } - case 1557: - { /* '1557' */ - return 0x4324 + case 1443: { /* '1443' */ + return 0x4400 } - case 1558: - { /* '1558' */ - return 0x4400 + case 1444: { /* '1444' */ + return 0x4400 } - case 1559: - { /* '1559' */ - return 0x43FE + case 1445: { /* '1445' */ + return 0x4400 } - case 156: - { /* '156' */ - return 0x4324 + case 1446: { /* '1446' */ + return 0x4400 } - case 1560: - { /* '1560' */ - return 0x43FE + case 1447: { /* '1447' */ + return 0x4400 } - case 1561: - { /* '1561' */ - return 0x43EC + case 1448: { /* '1448' */ + return 0x4400 } - case 1562: - { /* '1562' */ - return 0x43EC + case 1449: { /* '1449' */ + return 0x4400 } - case 1563: - { /* '1563' */ - return 0x43FF + case 145: { /* '145' */ + return 0x4400 } - case 1564: - { /* '1564' */ - return 0x43FF + case 1450: { /* '1450' */ + return 0x4400 } - case 1565: - { /* '1565' */ - return 0x43FF + case 1451: { /* '1451' */ + return 0x43FE } - case 1566: - { /* '1566' */ - return 0x43FF + case 1452: { /* '1452' */ + return 0x43FF } - case 1567: - { /* '1567' */ - return 0x43FF + case 1453: { /* '1453' */ + return 0x4400 } - case 1568: - { /* '1568' */ - return 0x43FF + case 1454: { /* '1454' */ + return 0x4400 } - case 1569: - { /* '1569' */ - return 0x43FF + case 1455: { /* '1455' */ + return 0x4400 } - case 157: - { /* '157' */ - return 0x43FE + case 1456: { /* '1456' */ + return 0x4400 } - case 1570: - { /* '1570' */ - return 0x43FF + case 1457: { /* '1457' */ + return 0x4400 } - case 1571: - { /* '1571' */ - return 0x43FF + case 1458: { /* '1458' */ + return 0x4400 } - case 1572: - { /* '1572' */ - return 0x43FF + case 1459: { /* '1459' */ + return 0x4400 } - case 1573: - { /* '1573' */ - return 0x4324 + case 146: { /* '146' */ + return 0x4400 } - case 1574: - { /* '1574' */ - return 0x41C8 + case 1460: { /* '1460' */ + return 0x4400 } - case 1575: - { /* '1575' */ - return 0x41C8 + case 1461: { /* '1461' */ + return 0x4400 } - case 1576: - { /* '1576' */ - return 0x40F4 + case 1462: { /* '1462' */ + return 0x4400 } - case 1577: - { /* '1577' */ - return 0x40F4 + case 1463: { /* '1463' */ + return 0x4400 } - case 1578: - { /* '1578' */ - return 0x43FF + case 1464: { /* '1464' */ + return 0x4400 } - case 1579: - { /* '1579' */ - return 0x43FE + case 1465: { /* '1465' */ + return 0x4400 } - case 158: - { /* '158' */ - return 0x43FE + case 1466: { /* '1466' */ + return 0x4400 } - case 1580: - { /* '1580' */ - return 0x43FE + case 1467: { /* '1467' */ + return 0x4400 } - case 1581: - { /* '1581' */ - return 0x43FF + case 1468: { /* '1468' */ + return 0x4400 } - case 1582: - { /* '1582' */ - return 0x43FF + case 1469: { /* '1469' */ + return 0x4400 } - case 1583: - { /* '1583' */ - return 0x43FF + case 147: { /* '147' */ + return 0x4400 } - case 1584: - { /* '1584' */ - return 0x43FF + case 1470: { /* '1470' */ + return 0x4400 } - case 1585: - { /* '1585' */ - return 0x43FF + case 1471: { /* '1471' */ + return 0x4400 } - case 1586: - { /* '1586' */ - return 0x43FF + case 1472: { /* '1472' */ + return 0x4400 } - case 1587: - { /* '1587' */ - return 0x43FF + case 1473: { /* '1473' */ + return 0x4400 } - case 1588: - { /* '1588' */ - return 0x43FF + case 1474: { /* '1474' */ + return 0x4400 } - case 1589: - { /* '1589' */ - return 0x43FF + case 1475: { /* '1475' */ + return 0x4400 } - case 159: - { /* '159' */ - return 0x43FF + case 1476: { /* '1476' */ + return 0x4400 } - case 1590: - { /* '1590' */ - return 0x43FF + case 1477: { /* '1477' */ + return 0x4400 } - case 1591: - { /* '1591' */ - return 0x43FF + case 1478: { /* '1478' */ + return 0x48D6 } - case 1592: - { /* '1592' */ - return 0x43FF + case 1479: { /* '1479' */ + return 0x5220 } - case 1593: - { /* '1593' */ - return 0x43FF + case 148: { /* '148' */ + return 0x4400 } - case 1594: - { /* '1594' */ - return 0x43FF + case 1480: { /* '1480' */ + return 0x43FF } - case 1595: - { /* '1595' */ - return 0x43FF + case 1481: { /* '1481' */ + return 0x43FF } - case 1596: - { /* '1596' */ - return 0x4324 + case 1482: { /* '1482' */ + return 0x43FE } - case 1597: - { /* '1597' */ - return 0x43FE + case 1483: { /* '1483' */ + return 0x43FE } - case 1598: - { /* '1598' */ - return 0x43FE + case 1484: { /* '1484' */ + return 0x45E0 } - case 1599: - { /* '1599' */ - return 0x4324 + case 1485: { /* '1485' */ + return 0x4400 } - case 16: - { /* '16' */ - return 0x43FE + case 1486: { /* '1486' */ + return 0x4400 } - case 160: - { /* '160' */ - return 0x4400 + case 1487: { /* '1487' */ + return 0x4400 } - case 1600: - { /* '1600' */ - return 0x43FF + case 1488: { /* '1488' */ + return 0x4400 } - case 1601: - { /* '1601' */ - return 0x43FF + case 1489: { /* '1489' */ + return 0x43FE } - case 1602: - { /* '1602' */ - return 0x43FF + case 149: { /* '149' */ + return 0x43FF } - case 1603: - { /* '1603' */ - return 0x43FF + case 1490: { /* '1490' */ + return 0x4400 } - case 1604: - { /* '1604' */ - return 0x43FF + case 1491: { /* '1491' */ + return 0x4400 } - case 1605: - { /* '1605' */ - return 0x43FF + case 1492: { /* '1492' */ + return 0x4400 } - case 1606: - { /* '1606' */ - return 0x43FF + case 1493: { /* '1493' */ + return 0x4400 } - case 1607: - { /* '1607' */ - return 0x43FF + case 1494: { /* '1494' */ + return 0x4400 } - case 1608: - { /* '1608' */ - return 0x43FF + case 1495: { /* '1495' */ + return 0x4400 } - case 1609: - { /* '1609' */ - return 0x43FF + case 1496: { /* '1496' */ + return 0x4400 } - case 161: - { /* '161' */ - return 0x4400 + case 1497: { /* '1497' */ + return 0x4400 } - case 1610: - { /* '1610' */ - return 0x4195 + case 1498: { /* '1498' */ + return 0x4400 } - case 1611: - { /* '1611' */ - return 0x41E5 + case 1499: { /* '1499' */ + return 0x43FE } - case 1612: - { /* '1612' */ - return 0x4195 + case 15: { /* '15' */ + return 0x43FF } - case 1613: - { /* '1613' */ - return 0x4195 + case 150: { /* '150' */ + return 0x43FF } - case 1614: - { /* '1614' */ - return 0x43FF + case 1500: { /* '1500' */ + return 0x43FE } - case 1615: - { /* '1615' */ - return 0x4195 + case 1501: { /* '1501' */ + return 0x43FE } - case 1616: - { /* '1616' */ - return 0x43FF + case 1502: { /* '1502' */ + return 0x43FE } - case 1617: - { /* '1617' */ - return 0x41E5 + case 1503: { /* '1503' */ + return 0x4400 } - case 1618: - { /* '1618' */ - return 0x43FF + case 1504: { /* '1504' */ + return 0x4400 } - case 1619: - { /* '1619' */ - return 0x43FF + case 1505: { /* '1505' */ + return 0x46A0 } - case 162: - { /* '162' */ - return 0x40F4 + case 1506: { /* '1506' */ + return 0x4400 } - case 1620: - { /* '1620' */ - return 0x4195 + case 1507: { /* '1507' */ + return 0x4400 } - case 1621: - { /* '1621' */ - return 0x4195 + case 1508: { /* '1508' */ + return 0x4400 } - case 1622: - { /* '1622' */ - return 0x43FF + case 1509: { /* '1509' */ + return 0x4400 } - case 1623: - { /* '1623' */ - return 0x4195 + case 151: { /* '151' */ + return 0x4400 } - case 1624: - { /* '1624' */ - return 0x41E5 + case 1510: { /* '1510' */ + return 0x4400 } - case 1625: - { /* '1625' */ - return 0x43FF + case 1511: { /* '1511' */ + return 0x4400 } - case 1626: - { /* '1626' */ - return 0x41E5 + case 1512: { /* '1512' */ + return 0x4400 } - case 1627: - { /* '1627' */ - return 0x43FF + case 1513: { /* '1513' */ + return 0x4400 } - case 1628: - { /* '1628' */ - return 0x43FF + case 1514: { /* '1514' */ + return 0x4400 } - case 1629: - { /* '1629' */ - return 0x43FF + case 1515: { /* '1515' */ + return 0x4400 } - case 163: - { /* '163' */ - return 0x40F4 + case 1516: { /* '1516' */ + return 0x4400 } - case 1630: - { /* '1630' */ - return 0x41E5 + case 1517: { /* '1517' */ + return 0x4400 } - case 1631: - { /* '1631' */ - return 0x43FF + case 1518: { /* '1518' */ + return 0x4400 } - case 1632: - { /* '1632' */ - return 0x43FF + case 1519: { /* '1519' */ + return 0x4400 } - case 1633: - { /* '1633' */ - return 0x43FF + case 152: { /* '152' */ + return 0x43FE } - case 1634: - { /* '1634' */ - return 0x43FF + case 1520: { /* '1520' */ + return 0x4400 } - case 1635: - { /* '1635' */ - return 0x43FF + case 1521: { /* '1521' */ + return 0x4400 } - case 1636: - { /* '1636' */ - return 0x43FF + case 1522: { /* '1522' */ + return 0x4400 } - case 1637: - { /* '1637' */ - return 0x43FF + case 1523: { /* '1523' */ + return 0x4400 } - case 1638: - { /* '1638' */ - return 0x43FF + case 1524: { /* '1524' */ + return 0x4400 } - case 1639: - { /* '1639' */ - return 0x8700 + case 1525: { /* '1525' */ + return 0x4100 } - case 164: - { /* '164' */ - return 0x4400 + case 1526: { /* '1526' */ + return 0x4200 } - case 1640: - { /* '1640' */ - return 0x4094 + case 1527: { /* '1527' */ + return 0x4400 } - case 1641: - { /* '1641' */ - return 0x43FF + case 1528: { /* '1528' */ + return 0x4400 } - case 1642: - { /* '1642' */ - return 0x43FF + case 1529: { /* '1529' */ + return 0x4400 } - case 1643: - { /* '1643' */ - return 0x43FF + case 153: { /* '153' */ + return 0x4204 } - case 1644: - { /* '1644' */ - return 0x4400 + case 1530: { /* '1530' */ + return 0x4400 } - case 1645: - { /* '1645' */ - return 0x43FE + case 1531: { /* '1531' */ + return 0x43FE } - case 1646: - { /* '1646' */ - return 0x43FE + case 1532: { /* '1532' */ + return 0x43FE } - case 1647: - { /* '1647' */ - return 0x43FF + case 1533: { /* '1533' */ + return 0x43FE } - case 1648: - { /* '1648' */ - return 0x4400 + case 1534: { /* '1534' */ + return 0x43FE } - case 1649: - { /* '1649' */ - return 0x4400 + case 1535: { /* '1535' */ + return 0x43FE } - case 165: - { /* '165' */ - return 0x4400 + case 1536: { /* '1536' */ + return 0x43FE } - case 1650: - { /* '1650' */ - return 0x43FE + case 1537: { /* '1537' */ + return 0x419C } - case 1651: - { /* '1651' */ - return 0x43F8 + case 1538: { /* '1538' */ + return 0x419C } - case 1652: - { /* '1652' */ - return 0x4400 + case 1539: { /* '1539' */ + return 0x48D6 } - case 1653: - { /* '1653' */ - return 0x4400 + case 154: { /* '154' */ + return 0x4400 } - case 1654: - { /* '1654' */ - return 0x4400 + case 1540: { /* '1540' */ + return 0x43FE } - case 1655: - { /* '1655' */ - return 0x4400 + case 1541: { /* '1541' */ + return 0x426C } - case 1656: - { /* '1656' */ - return 0x43FF + case 1542: { /* '1542' */ + return 0x426C } - case 1657: - { /* '1657' */ - return 0x43FF + case 1543: { /* '1543' */ + return 0x4204 } - case 1658: - { /* '1658' */ - return 0x4400 + case 1544: { /* '1544' */ + return 0x43FE } - case 1659: - { /* '1659' */ - return 0x4400 + case 1545: { /* '1545' */ + return 0x43FE } - case 166: - { /* '166' */ - return 0x4400 + case 1546: { /* '1546' */ + return 0x43FE } - case 1660: - { /* '1660' */ - return 0x4400 + case 1547: { /* '1547' */ + return 0x43FE } - case 1661: - { /* '1661' */ - return 0x4400 + case 1548: { /* '1548' */ + return 0x43FE } - case 1662: - { /* '1662' */ - return 0x4400 + case 1549: { /* '1549' */ + return 0x43FE } - case 1663: - { /* '1663' */ - return 0x4400 + case 155: { /* '155' */ + return 0x4324 } - case 1664: - { /* '1664' */ - return 0x43FE + case 1550: { /* '1550' */ + return 0x43FE } - case 1665: - { /* '1665' */ - return 0x43F8 + case 1551: { /* '1551' */ + return 0x4400 } - case 1666: - { /* '1666' */ - return 0x4400 + case 1552: { /* '1552' */ + return 0x43FC } - case 1667: - { /* '1667' */ - return 0x4400 + case 1553: { /* '1553' */ + return 0x4204 } - case 1668: - { /* '1668' */ - return 0x4400 + case 1554: { /* '1554' */ + return 0x4400 } - case 1669: - { /* '1669' */ - return 0x4400 + case 1555: { /* '1555' */ + return 0x4400 } - case 167: - { /* '167' */ - return 0x4400 + case 1556: { /* '1556' */ + return 0x4400 } - case 1670: - { /* '1670' */ - return 0x43FE + case 1557: { /* '1557' */ + return 0x4324 } - case 1671: - { /* '1671' */ - return 0x43FE + case 1558: { /* '1558' */ + return 0x4400 } - case 1672: - { /* '1672' */ - return 0x43FE + case 1559: { /* '1559' */ + return 0x43FE } - case 1673: - { /* '1673' */ - return 0x4400 + case 156: { /* '156' */ + return 0x4324 } - case 1674: - { /* '1674' */ - return 0x4400 + case 1560: { /* '1560' */ + return 0x43FE } - case 1675: - { /* '1675' */ - return 0x43FE + case 1561: { /* '1561' */ + return 0x43EC } - case 1676: - { /* '1676' */ - return 0x43FE + case 1562: { /* '1562' */ + return 0x43EC } - case 1677: - { /* '1677' */ - return 0x4400 + case 1563: { /* '1563' */ + return 0x43FF } - case 1678: - { /* '1678' */ - return 0x4400 + case 1564: { /* '1564' */ + return 0x43FF } - case 1679: - { /* '1679' */ - return 0x4400 + case 1565: { /* '1565' */ + return 0x43FF } - case 168: - { /* '168' */ - return 0x40F0 + case 1566: { /* '1566' */ + return 0x43FF } - case 1680: - { /* '1680' */ - return 0x43FF + case 1567: { /* '1567' */ + return 0x43FF } - case 1681: - { /* '1681' */ - return 0x43FE + case 1568: { /* '1568' */ + return 0x43FF } - case 1682: - { /* '1682' */ - return 0x43FE + case 1569: { /* '1569' */ + return 0x43FF } - case 1683: - { /* '1683' */ - return 0x4400 + case 157: { /* '157' */ + return 0x43FE } - case 1684: - { /* '1684' */ - return 0x4400 + case 1570: { /* '1570' */ + return 0x43FF } - case 1685: - { /* '1685' */ - return 0x4400 + case 1571: { /* '1571' */ + return 0x43FF } - case 1686: - { /* '1686' */ - return 0x43FE + case 1572: { /* '1572' */ + return 0x43FF } - case 1687: - { /* '1687' */ - return 0x43FE + case 1573: { /* '1573' */ + return 0x4324 } - case 1688: - { /* '1688' */ - return 0x4400 + case 1574: { /* '1574' */ + return 0x41C8 } - case 1689: - { /* '1689' */ - return 0x4400 + case 1575: { /* '1575' */ + return 0x41C8 } - case 169: - { /* '169' */ - return 0x4324 + case 1576: { /* '1576' */ + return 0x40F4 } - case 1690: - { /* '1690' */ - return 0x43FE + case 1577: { /* '1577' */ + return 0x40F4 } - case 1691: - { /* '1691' */ - return 0x4400 + case 1578: { /* '1578' */ + return 0x43FF } - case 1692: - { /* '1692' */ - return 0x4400 + case 1579: { /* '1579' */ + return 0x43FE } - case 1693: - { /* '1693' */ - return 0x4400 + case 158: { /* '158' */ + return 0x43FE } - case 1694: - { /* '1694' */ - return 0x43FE + case 1580: { /* '1580' */ + return 0x43FE } - case 1695: - { /* '1695' */ - return 0x43FE + case 1581: { /* '1581' */ + return 0x43FF } - case 1696: - { /* '1696' */ - return 0x4400 + case 1582: { /* '1582' */ + return 0x43FF } - case 1697: - { /* '1697' */ - return 0x4400 + case 1583: { /* '1583' */ + return 0x43FF } - case 1698: - { /* '1698' */ - return 0x4324 + case 1584: { /* '1584' */ + return 0x43FF } - case 1699: - { /* '1699' */ - return 0x4400 + case 1585: { /* '1585' */ + return 0x43FF } - case 17: - { /* '17' */ - return 0x43FE + case 1586: { /* '1586' */ + return 0x43FF } - case 170: - { /* '170' */ - return 0x4324 + case 1587: { /* '1587' */ + return 0x43FF } - case 1700: - { /* '1700' */ - return 0x43F4 + case 1588: { /* '1588' */ + return 0x43FF } - case 1701: - { /* '1701' */ - return 0x4400 + case 1589: { /* '1589' */ + return 0x43FF } - case 1702: - { /* '1702' */ - return 0x43F4 + case 159: { /* '159' */ + return 0x43FF } - case 1703: - { /* '1703' */ - return 0x4000 + case 1590: { /* '1590' */ + return 0x43FF } - case 1704: - { /* '1704' */ - return 0x4000 + case 1591: { /* '1591' */ + return 0x43FF } - case 1705: - { /* '1705' */ - return 0x4000 + case 1592: { /* '1592' */ + return 0x43FF } - case 1706: - { /* '1706' */ - return 0x4000 + case 1593: { /* '1593' */ + return 0x43FF } - case 1707: - { /* '1707' */ - return 0x4000 + case 1594: { /* '1594' */ + return 0x43FF } - case 1708: - { /* '1708' */ - return 0x4000 + case 1595: { /* '1595' */ + return 0x43FF } - case 1709: - { /* '1709' */ - return 0x4000 + case 1596: { /* '1596' */ + return 0x4324 } - case 171: - { /* '171' */ - return 0x4324 + case 1597: { /* '1597' */ + return 0x43FE } - case 1710: - { /* '1710' */ - return 0x4000 + case 1598: { /* '1598' */ + return 0x43FE } - case 1711: - { /* '1711' */ - return 0x4000 + case 1599: { /* '1599' */ + return 0x4324 } - case 1712: - { /* '1712' */ - return 0x7000 + case 16: { /* '16' */ + return 0x43FE } - case 1713: - { /* '1713' */ - return 0x7000 + case 160: { /* '160' */ + return 0x4400 } - case 1714: - { /* '1714' */ - return 0x4000 + case 1600: { /* '1600' */ + return 0x43FF } - case 1715: - { /* '1715' */ - return 0x4000 + case 1601: { /* '1601' */ + return 0x43FF } - case 1716: - { /* '1716' */ - return 0x4000 + case 1602: { /* '1602' */ + return 0x43FF } - case 1717: - { /* '1717' */ - return 0x4000 + case 1603: { /* '1603' */ + return 0x43FF } - case 1718: - { /* '1718' */ - return 0x4000 + case 1604: { /* '1604' */ + return 0x43FF } - case 1719: - { /* '1719' */ - return 0x4000 + case 1605: { /* '1605' */ + return 0x43FF } - case 172: - { /* '172' */ - return 0x4324 + case 1606: { /* '1606' */ + return 0x43FF } - case 1720: - { /* '1720' */ - return 0x4000 + case 1607: { /* '1607' */ + return 0x43FF } - case 1721: - { /* '1721' */ - return 0x4000 + case 1608: { /* '1608' */ + return 0x43FF } - case 1722: - { /* '1722' */ - return 0x4000 + case 1609: { /* '1609' */ + return 0x43FF } - case 1723: - { /* '1723' */ - return 0x4000 + case 161: { /* '161' */ + return 0x4400 } - case 1724: - { /* '1724' */ - return 0x4000 + case 1610: { /* '1610' */ + return 0x4195 } - case 1725: - { /* '1725' */ - return 0x4000 + case 1611: { /* '1611' */ + return 0x41E5 } - case 1726: - { /* '1726' */ - return 0x4000 + case 1612: { /* '1612' */ + return 0x4195 } - case 1727: - { /* '1727' */ - return 0x4000 + case 1613: { /* '1613' */ + return 0x4195 } - case 1728: - { /* '1728' */ - return 0x4000 + case 1614: { /* '1614' */ + return 0x43FF } - case 1729: - { /* '1729' */ - return 0x4000 + case 1615: { /* '1615' */ + return 0x4195 } - case 173: - { /* '173' */ - return 0x4284 + case 1616: { /* '1616' */ + return 0x43FF } - case 1730: - { /* '1730' */ - return 0x4000 + case 1617: { /* '1617' */ + return 0x41E5 } - case 1731: - { /* '1731' */ - return 0x4000 + case 1618: { /* '1618' */ + return 0x43FF } - case 1732: - { /* '1732' */ - return 0x4000 + case 1619: { /* '1619' */ + return 0x43FF } - case 1733: - { /* '1733' */ - return 0x4000 + case 162: { /* '162' */ + return 0x40F4 } - case 1734: - { /* '1734' */ - return 0x4000 + case 1620: { /* '1620' */ + return 0x4195 } - case 1735: - { /* '1735' */ - return 0x4000 + case 1621: { /* '1621' */ + return 0x4195 } - case 1736: - { /* '1736' */ - return 0x4000 + case 1622: { /* '1622' */ + return 0x43FF } - case 1737: - { /* '1737' */ - return 0x4000 + case 1623: { /* '1623' */ + return 0x4195 } - case 1738: - { /* '1738' */ - return 0x4000 + case 1624: { /* '1624' */ + return 0x41E5 } - case 1739: - { /* '1739' */ - return 0x4000 + case 1625: { /* '1625' */ + return 0x43FF } - case 174: - { /* '174' */ - return 0x4284 + case 1626: { /* '1626' */ + return 0x41E5 } - case 1740: - { /* '1740' */ - return 0x4000 + case 1627: { /* '1627' */ + return 0x43FF } - case 1741: - { /* '1741' */ - return 0x4000 + case 1628: { /* '1628' */ + return 0x43FF } - case 1742: - { /* '1742' */ - return 0x4000 + case 1629: { /* '1629' */ + return 0x43FF } - case 1743: - { /* '1743' */ - return 0x4000 + case 163: { /* '163' */ + return 0x40F4 } - case 1744: - { /* '1744' */ - return 0x4000 + case 1630: { /* '1630' */ + return 0x41E5 } - case 1745: - { /* '1745' */ - return 0x4000 + case 1631: { /* '1631' */ + return 0x43FF } - case 1746: - { /* '1746' */ - return 0x4000 + case 1632: { /* '1632' */ + return 0x43FF } - case 1747: - { /* '1747' */ - return 0x4000 + case 1633: { /* '1633' */ + return 0x43FF } - case 1748: - { /* '1748' */ - return 0x4000 + case 1634: { /* '1634' */ + return 0x43FF } - case 1749: - { /* '1749' */ - return 0x4000 + case 1635: { /* '1635' */ + return 0x43FF } - case 175: - { /* '175' */ - return 0x4284 + case 1636: { /* '1636' */ + return 0x43FF } - case 1750: - { /* '1750' */ - return 0x4000 + case 1637: { /* '1637' */ + return 0x43FF } - case 1751: - { /* '1751' */ - return 0x4000 + case 1638: { /* '1638' */ + return 0x43FF } - case 1752: - { /* '1752' */ - return 0x4000 + case 1639: { /* '1639' */ + return 0x8700 } - case 1753: - { /* '1753' */ - return 0x4000 + case 164: { /* '164' */ + return 0x4400 } - case 1754: - { /* '1754' */ - return 0x4000 + case 1640: { /* '1640' */ + return 0x4094 } - case 1755: - { /* '1755' */ - return 0x4000 + case 1641: { /* '1641' */ + return 0x43FF } - case 1756: - { /* '1756' */ - return 0x4000 + case 1642: { /* '1642' */ + return 0x43FF } - case 1757: - { /* '1757' */ - return 0x4000 + case 1643: { /* '1643' */ + return 0x43FF } - case 1758: - { /* '1758' */ - return 0x43FE + case 1644: { /* '1644' */ + return 0x4400 } - case 1759: - { /* '1759' */ - return 0x43FE + case 1645: { /* '1645' */ + return 0x43FE } - case 176: - { /* '176' */ - return 0x4324 + case 1646: { /* '1646' */ + return 0x43FE } - case 1760: - { /* '1760' */ - return 0x43FE + case 1647: { /* '1647' */ + return 0x43FF } - case 1761: - { /* '1761' */ - return 0x43FE + case 1648: { /* '1648' */ + return 0x4400 } - case 1762: - { /* '1762' */ - return 0x4400 + case 1649: { /* '1649' */ + return 0x4400 } - case 1763: - { /* '1763' */ - return 0x4400 + case 165: { /* '165' */ + return 0x4400 } - case 1764: - { /* '1764' */ - return 0x43FE + case 1650: { /* '1650' */ + return 0x43FE } - case 1765: - { /* '1765' */ - return 0x43FE + case 1651: { /* '1651' */ + return 0x43F8 } - case 1766: - { /* '1766' */ - return 0x43FE + case 1652: { /* '1652' */ + return 0x4400 } - case 1767: - { /* '1767' */ - return 0x43FF + case 1653: { /* '1653' */ + return 0x4400 } - case 1768: - { /* '1768' */ - return 0x43FF + case 1654: { /* '1654' */ + return 0x4400 } - case 1769: - { /* '1769' */ - return 0x43FE + case 1655: { /* '1655' */ + return 0x4400 } - case 177: - { /* '177' */ - return 0x4324 + case 1656: { /* '1656' */ + return 0x43FF } - case 1770: - { /* '1770' */ - return 0x43FE + case 1657: { /* '1657' */ + return 0x43FF } - case 1771: - { /* '1771' */ - return 0x43FE + case 1658: { /* '1658' */ + return 0x4400 } - case 1772: - { /* '1772' */ - return 0x43FE + case 1659: { /* '1659' */ + return 0x4400 } - case 1773: - { /* '1773' */ - return 0x43FE + case 166: { /* '166' */ + return 0x4400 } - case 1774: - { /* '1774' */ - return 0x43FE + case 1660: { /* '1660' */ + return 0x4400 } - case 1775: - { /* '1775' */ - return 0x43FE + case 1661: { /* '1661' */ + return 0x4400 } - case 1776: - { /* '1776' */ - return 0x43FE + case 1662: { /* '1662' */ + return 0x4400 } - case 1777: - { /* '1777' */ - return 0x43FE + case 1663: { /* '1663' */ + return 0x4400 } - case 1778: - { /* '1778' */ - return 0x43FE + case 1664: { /* '1664' */ + return 0x43FE } - case 1779: - { /* '1779' */ - return 0x43FE + case 1665: { /* '1665' */ + return 0x43F8 } - case 178: - { /* '178' */ - return 0x43FC + case 1666: { /* '1666' */ + return 0x4400 } - case 1780: - { /* '1780' */ - return 0x43FE + case 1667: { /* '1667' */ + return 0x4400 } - case 1781: - { /* '1781' */ - return 0x43FE + case 1668: { /* '1668' */ + return 0x4400 } - case 1782: - { /* '1782' */ - return 0x4324 + case 1669: { /* '1669' */ + return 0x4400 } - case 1783: - { /* '1783' */ - return 0x43FE + case 167: { /* '167' */ + return 0x4400 } - case 1784: - { /* '1784' */ - return 0x43FE + case 1670: { /* '1670' */ + return 0x43FE } - case 1785: - { /* '1785' */ - return 0x4400 + case 1671: { /* '1671' */ + return 0x43FE } - case 1786: - { /* '1786' */ - return 0x4400 + case 1672: { /* '1672' */ + return 0x43FE } - case 1787: - { /* '1787' */ - return 0x43FF + case 1673: { /* '1673' */ + return 0x4400 } - case 1788: - { /* '1788' */ - return 0x4400 + case 1674: { /* '1674' */ + return 0x4400 } - case 1789: - { /* '1789' */ - return 0x43FC + case 1675: { /* '1675' */ + return 0x43FE } - case 179: - { /* '179' */ - return 0x43FC + case 1676: { /* '1676' */ + return 0x43FE } - case 1790: - { /* '1790' */ - return 0x43FC + case 1677: { /* '1677' */ + return 0x4400 } - case 1791: - { /* '1791' */ - return 0x4400 + case 1678: { /* '1678' */ + return 0x4400 } - case 1792: - { /* '1792' */ - return 0x407A + case 1679: { /* '1679' */ + return 0x4400 } - case 1793: - { /* '1793' */ - return 0x407A + case 168: { /* '168' */ + return 0x40F0 } - case 1794: - { /* '1794' */ - return 0x4400 + case 1680: { /* '1680' */ + return 0x43FF } - case 1795: - { /* '1795' */ - return 0x4400 + case 1681: { /* '1681' */ + return 0x43FE } - case 1796: - { /* '1796' */ - return 0x43FE + case 1682: { /* '1682' */ + return 0x43FE } - case 1797: - { /* '1797' */ - return 0x43FE + case 1683: { /* '1683' */ + return 0x4400 } - case 1798: - { /* '1798' */ - return 0x43FE + case 1684: { /* '1684' */ + return 0x4400 } - case 1799: - { /* '1799' */ - return 0x43FE + case 1685: { /* '1685' */ + return 0x4400 } - case 18: - { /* '18' */ - return 0x43FE + case 1686: { /* '1686' */ + return 0x43FE } - case 180: - { /* '180' */ - return 0x43FC + case 1687: { /* '1687' */ + return 0x43FE } - case 1800: - { /* '1800' */ - return 0x43FE + case 1688: { /* '1688' */ + return 0x4400 } - case 1801: - { /* '1801' */ - return 0x43FE + case 1689: { /* '1689' */ + return 0x4400 } - case 1802: - { /* '1802' */ - return 0x43FE + case 169: { /* '169' */ + return 0x4324 } - case 1803: - { /* '1803' */ - return 0x43FE + case 1690: { /* '1690' */ + return 0x43FE } - case 1804: - { /* '1804' */ - return 0x43FE + case 1691: { /* '1691' */ + return 0x4400 } - case 1805: - { /* '1805' */ - return 0x43FE + case 1692: { /* '1692' */ + return 0x4400 } - case 1806: - { /* '1806' */ - return 0x43FE + case 1693: { /* '1693' */ + return 0x4400 } - case 1807: - { /* '1807' */ - return 0x43FE + case 1694: { /* '1694' */ + return 0x43FE } - case 1808: - { /* '1808' */ - return 0x43FE + case 1695: { /* '1695' */ + return 0x43FE } - case 1809: - { /* '1809' */ - return 0x43FE + case 1696: { /* '1696' */ + return 0x4400 } - case 181: - { /* '181' */ - return 0x43FC + case 1697: { /* '1697' */ + return 0x4400 } - case 1810: - { /* '1810' */ - return 0x43FE + case 1698: { /* '1698' */ + return 0x4324 } - case 1811: - { /* '1811' */ - return 0x4400 + case 1699: { /* '1699' */ + return 0x4400 } - case 1812: - { /* '1812' */ - return 0x43FC + case 17: { /* '17' */ + return 0x43FE } - case 1813: - { /* '1813' */ - return 0x4400 + case 170: { /* '170' */ + return 0x4324 } - case 1814: - { /* '1814' */ - return 0x43FE + case 1700: { /* '1700' */ + return 0x43F4 } - case 1815: - { /* '1815' */ - return 0x43FE + case 1701: { /* '1701' */ + return 0x4400 } - case 1816: - { /* '1816' */ - return 0x43FE + case 1702: { /* '1702' */ + return 0x43F4 } - case 1817: - { /* '1817' */ - return 0x43FE + case 1703: { /* '1703' */ + return 0x4000 } - case 1818: - { /* '1818' */ - return 0x43FE + case 1704: { /* '1704' */ + return 0x4000 } - case 1819: - { /* '1819' */ - return 0x43FE + case 1705: { /* '1705' */ + return 0x4000 } - case 182: - { /* '182' */ - return 0x43FC + case 1706: { /* '1706' */ + return 0x4000 } - case 1820: - { /* '1820' */ - return 0x43FE + case 1707: { /* '1707' */ + return 0x4000 } - case 1821: - { /* '1821' */ - return 0x43FE + case 1708: { /* '1708' */ + return 0x4000 } - case 1822: - { /* '1822' */ - return 0x43FE + case 1709: { /* '1709' */ + return 0x4000 } - case 1823: - { /* '1823' */ - return 0x43FE + case 171: { /* '171' */ + return 0x4324 } - case 1824: - { /* '1824' */ - return 0x43FE + case 1710: { /* '1710' */ + return 0x4000 } - case 1825: - { /* '1825' */ - return 0x43FE + case 1711: { /* '1711' */ + return 0x4000 } - case 1826: - { /* '1826' */ - return 0x4400 + case 1712: { /* '1712' */ + return 0x7000 } - case 1827: - { /* '1827' */ - return 0x4400 + case 1713: { /* '1713' */ + return 0x7000 } - case 1828: - { /* '1828' */ - return 0x4400 + case 1714: { /* '1714' */ + return 0x4000 } - case 1829: - { /* '1829' */ - return 0x4400 + case 1715: { /* '1715' */ + return 0x4000 } - case 183: - { /* '183' */ - return 0x43FC + case 1716: { /* '1716' */ + return 0x4000 } - case 1830: - { /* '1830' */ - return 0x4400 + case 1717: { /* '1717' */ + return 0x4000 } - case 1831: - { /* '1831' */ - return 0x4400 + case 1718: { /* '1718' */ + return 0x4000 } - case 1832: - { /* '1832' */ - return 0x4400 + case 1719: { /* '1719' */ + return 0x4000 } - case 1833: - { /* '1833' */ - return 0x4400 + case 172: { /* '172' */ + return 0x4324 } - case 1834: - { /* '1834' */ - return 0x4400 + case 1720: { /* '1720' */ + return 0x4000 } - case 1835: - { /* '1835' */ - return 0x43FE + case 1721: { /* '1721' */ + return 0x4000 } - case 1836: - { /* '1836' */ - return 0x43FE + case 1722: { /* '1722' */ + return 0x4000 } - case 1837: - { /* '1837' */ - return 0x43FE + case 1723: { /* '1723' */ + return 0x4000 } - case 1838: - { /* '1838' */ - return 0x43FE + case 1724: { /* '1724' */ + return 0x4000 } - case 1839: - { /* '1839' */ - return 0x43FE + case 1725: { /* '1725' */ + return 0x4000 } - case 184: - { /* '184' */ - return 0x43FC + case 1726: { /* '1726' */ + return 0x4000 } - case 1840: - { /* '1840' */ - return 0x43FE + case 1727: { /* '1727' */ + return 0x4000 } - case 1841: - { /* '1841' */ - return 0x43FE + case 1728: { /* '1728' */ + return 0x4000 } - case 1842: - { /* '1842' */ - return 0x43FE + case 1729: { /* '1729' */ + return 0x4000 } - case 1843: - { /* '1843' */ - return 0x43FE + case 173: { /* '173' */ + return 0x4284 } - case 1844: - { /* '1844' */ - return 0x43FE + case 1730: { /* '1730' */ + return 0x4000 } - case 1845: - { /* '1845' */ - return 0x43FE + case 1731: { /* '1731' */ + return 0x4000 } - case 1846: - { /* '1846' */ - return 0x43FE + case 1732: { /* '1732' */ + return 0x4000 } - case 1847: - { /* '1847' */ - return 0x43FE + case 1733: { /* '1733' */ + return 0x4000 } - case 1848: - { /* '1848' */ - return 0x43FE + case 1734: { /* '1734' */ + return 0x4000 } - case 1849: - { /* '1849' */ - return 0x43FE + case 1735: { /* '1735' */ + return 0x4000 } - case 185: - { /* '185' */ - return 0x43FC + case 1736: { /* '1736' */ + return 0x4000 } - case 1850: - { /* '1850' */ - return 0x43FE + case 1737: { /* '1737' */ + return 0x4000 } - case 1851: - { /* '1851' */ - return 0x43FE + case 1738: { /* '1738' */ + return 0x4000 } - case 1852: - { /* '1852' */ - return 0x43FE + case 1739: { /* '1739' */ + return 0x4000 } - case 1853: - { /* '1853' */ - return 0x43FE + case 174: { /* '174' */ + return 0x4284 } - case 1854: - { /* '1854' */ - return 0x43FE + case 1740: { /* '1740' */ + return 0x4000 } - case 1855: - { /* '1855' */ - return 0x43FE + case 1741: { /* '1741' */ + return 0x4000 } - case 1856: - { /* '1856' */ - return 0x43FE + case 1742: { /* '1742' */ + return 0x4000 } - case 1857: - { /* '1857' */ - return 0x43FE + case 1743: { /* '1743' */ + return 0x4000 } - case 1858: - { /* '1858' */ - return 0x43FE + case 1744: { /* '1744' */ + return 0x4000 } - case 1859: - { /* '1859' */ - return 0x43FE + case 1745: { /* '1745' */ + return 0x4000 } - case 186: - { /* '186' */ - return 0x43FC + case 1746: { /* '1746' */ + return 0x4000 } - case 1860: - { /* '1860' */ - return 0x43FE + case 1747: { /* '1747' */ + return 0x4000 } - case 1861: - { /* '1861' */ - return 0x43FE + case 1748: { /* '1748' */ + return 0x4000 } - case 1862: - { /* '1862' */ - return 0x43FE + case 1749: { /* '1749' */ + return 0x4000 } - case 1863: - { /* '1863' */ - return 0x43FE + case 175: { /* '175' */ + return 0x4284 } - case 1864: - { /* '1864' */ - return 0x43FE + case 1750: { /* '1750' */ + return 0x4000 } - case 1865: - { /* '1865' */ - return 0x43FE + case 1751: { /* '1751' */ + return 0x4000 } - case 1866: - { /* '1866' */ - return 0x43FE + case 1752: { /* '1752' */ + return 0x4000 } - case 1867: - { /* '1867' */ - return 0x41E5 + case 1753: { /* '1753' */ + return 0x4000 } - case 1868: - { /* '1868' */ - return 0x41E5 + case 1754: { /* '1754' */ + return 0x4000 } - case 1869: - { /* '1869' */ - return 0x43FF + case 1755: { /* '1755' */ + return 0x4000 } - case 187: - { /* '187' */ - return 0x43FC + case 1756: { /* '1756' */ + return 0x4000 } - case 1870: - { /* '1870' */ - return 0x41E5 + case 1757: { /* '1757' */ + return 0x4000 } - case 1871: - { /* '1871' */ - return 0x41E5 + case 1758: { /* '1758' */ + return 0x43FE } - case 1872: - { /* '1872' */ - return 0x43FF + case 1759: { /* '1759' */ + return 0x43FE } - case 1873: - { /* '1873' */ - return 0x41E5 + case 176: { /* '176' */ + return 0x4324 } - case 1874: - { /* '1874' */ - return 0x41E5 + case 1760: { /* '1760' */ + return 0x43FE } - case 1875: - { /* '1875' */ - return 0x41E5 + case 1761: { /* '1761' */ + return 0x43FE } - case 1876: - { /* '1876' */ - return 0x43FE + case 1762: { /* '1762' */ + return 0x4400 } - case 188: - { /* '188' */ - return 0x4324 + case 1763: { /* '1763' */ + return 0x4400 } - case 189: - { /* '189' */ - return 0x425C + case 1764: { /* '1764' */ + return 0x43FE } - case 19: - { /* '19' */ - return 0x43FE + case 1765: { /* '1765' */ + return 0x43FE } - case 190: - { /* '190' */ - return 0x405C + case 1766: { /* '1766' */ + return 0x43FE } - case 191: - { /* '191' */ - return 0x42B0 + case 1767: { /* '1767' */ + return 0x43FF } - case 192: - { /* '192' */ - return 0x4328 + case 1768: { /* '1768' */ + return 0x43FF } - case 193: - { /* '193' */ - return 0x43EC + case 1769: { /* '1769' */ + return 0x43FE } - case 194: - { /* '194' */ - return 0x4400 + case 177: { /* '177' */ + return 0x4324 } - case 195: - { /* '195' */ - return 0x4400 + case 1770: { /* '1770' */ + return 0x43FE } - case 196: - { /* '196' */ - return 0x4400 + case 1771: { /* '1771' */ + return 0x43FE } - case 197: - { /* '197' */ - return 0x4400 + case 1772: { /* '1772' */ + return 0x43FE } - case 198: - { /* '198' */ - return 0x4400 + case 1773: { /* '1773' */ + return 0x43FE } - case 199: - { /* '199' */ - return 0x4400 + case 1774: { /* '1774' */ + return 0x43FE } - case 2: - { /* '2' */ - return 0x4400 + case 1775: { /* '1775' */ + return 0x43FE } - case 20: - { /* '20' */ - return 0x4400 + case 1776: { /* '1776' */ + return 0x43FE } - case 200: - { /* '200' */ - return 0x4400 + case 1777: { /* '1777' */ + return 0x43FE } - case 201: - { /* '201' */ - return 0x4400 + case 1778: { /* '1778' */ + return 0x43FE } - case 202: - { /* '202' */ - return 0x4400 + case 1779: { /* '1779' */ + return 0x43FE } - case 203: - { /* '203' */ - return 0x4400 + case 178: { /* '178' */ + return 0x43FC } - case 204: - { /* '204' */ - return 0x4400 + case 1780: { /* '1780' */ + return 0x43FE } - case 205: - { /* '205' */ - return 0x4400 + case 1781: { /* '1781' */ + return 0x43FE } - case 206: - { /* '206' */ - return 0x4400 + case 1782: { /* '1782' */ + return 0x4324 } - case 207: - { /* '207' */ - return 0x4400 + case 1783: { /* '1783' */ + return 0x43FE } - case 208: - { /* '208' */ - return 0x4400 + case 1784: { /* '1784' */ + return 0x43FE } - case 209: - { /* '209' */ - return 0x4400 + case 1785: { /* '1785' */ + return 0x4400 } - case 21: - { /* '21' */ - return 0x4400 + case 1786: { /* '1786' */ + return 0x4400 } - case 210: - { /* '210' */ - return 0x4400 + case 1787: { /* '1787' */ + return 0x43FF } - case 211: - { /* '211' */ - return 0x4400 + case 1788: { /* '1788' */ + return 0x4400 } - case 212: - { /* '212' */ - return 0x4400 + case 1789: { /* '1789' */ + return 0x43FC } - case 213: - { /* '213' */ - return 0x4400 + case 179: { /* '179' */ + return 0x43FC } - case 214: - { /* '214' */ - return 0x4400 + case 1790: { /* '1790' */ + return 0x43FC } - case 215: - { /* '215' */ - return 0x4400 + case 1791: { /* '1791' */ + return 0x4400 } - case 216: - { /* '216' */ - return 0x4400 + case 1792: { /* '1792' */ + return 0x407A } - case 217: - { /* '217' */ - return 0x4400 + case 1793: { /* '1793' */ + return 0x407A } - case 218: - { /* '218' */ - return 0x4400 + case 1794: { /* '1794' */ + return 0x4400 } - case 219: - { /* '219' */ - return 0x4400 + case 1795: { /* '1795' */ + return 0x4400 } - case 22: - { /* '22' */ - return 0x4400 + case 1796: { /* '1796' */ + return 0x43FE } - case 220: - { /* '220' */ - return 0x4400 + case 1797: { /* '1797' */ + return 0x43FE } - case 221: - { /* '221' */ - return 0x4400 + case 1798: { /* '1798' */ + return 0x43FE } - case 222: - { /* '222' */ - return 0x4400 + case 1799: { /* '1799' */ + return 0x43FE } - case 223: - { /* '223' */ - return 0x4400 + case 18: { /* '18' */ + return 0x43FE } - case 224: - { /* '224' */ - return 0x4400 + case 180: { /* '180' */ + return 0x43FC } - case 225: - { /* '225' */ - return 0x4400 + case 1800: { /* '1800' */ + return 0x43FE } - case 226: - { /* '226' */ - return 0x4400 + case 1801: { /* '1801' */ + return 0x43FE } - case 227: - { /* '227' */ - return 0x4400 + case 1802: { /* '1802' */ + return 0x43FE } - case 228: - { /* '228' */ - return 0x4400 + case 1803: { /* '1803' */ + return 0x43FE } - case 229: - { /* '229' */ - return 0x4400 + case 1804: { /* '1804' */ + return 0x43FE } - case 23: - { /* '23' */ - return 0x4400 + case 1805: { /* '1805' */ + return 0x43FE } - case 230: - { /* '230' */ - return 0x4400 + case 1806: { /* '1806' */ + return 0x43FE } - case 231: - { /* '231' */ - return 0x4400 + case 1807: { /* '1807' */ + return 0x43FE } - case 232: - { /* '232' */ - return 0x4400 + case 1808: { /* '1808' */ + return 0x43FE } - case 233: - { /* '233' */ - return 0x4400 + case 1809: { /* '1809' */ + return 0x43FE } - case 234: - { /* '234' */ - return 0x4400 + case 181: { /* '181' */ + return 0x43FC } - case 235: - { /* '235' */ - return 0x4400 + case 1810: { /* '1810' */ + return 0x43FE } - case 236: - { /* '236' */ - return 0x4400 + case 1811: { /* '1811' */ + return 0x4400 } - case 237: - { /* '237' */ - return 0x4400 + case 1812: { /* '1812' */ + return 0x43FC } - case 238: - { /* '238' */ - return 0x4400 + case 1813: { /* '1813' */ + return 0x4400 } - case 239: - { /* '239' */ - return 0x4400 + case 1814: { /* '1814' */ + return 0x43FE } - case 24: - { /* '24' */ - return 0x4400 + case 1815: { /* '1815' */ + return 0x43FE } - case 240: - { /* '240' */ - return 0x4400 + case 1816: { /* '1816' */ + return 0x43FE } - case 241: - { /* '241' */ - return 0x4400 + case 1817: { /* '1817' */ + return 0x43FE } - case 242: - { /* '242' */ - return 0x4400 + case 1818: { /* '1818' */ + return 0x43FE } - case 243: - { /* '243' */ - return 0x4400 + case 1819: { /* '1819' */ + return 0x43FE } - case 244: - { /* '244' */ - return 0x4400 + case 182: { /* '182' */ + return 0x43FC } - case 245: - { /* '245' */ - return 0x4400 + case 1820: { /* '1820' */ + return 0x43FE } - case 246: - { /* '246' */ - return 0x4400 + case 1821: { /* '1821' */ + return 0x43FE } - case 247: - { /* '247' */ - return 0x4400 + case 1822: { /* '1822' */ + return 0x43FE } - case 248: - { /* '248' */ - return 0x4400 + case 1823: { /* '1823' */ + return 0x43FE } - case 249: - { /* '249' */ - return 0x4400 + case 1824: { /* '1824' */ + return 0x43FE } - case 25: - { /* '25' */ - return 0x4400 + case 1825: { /* '1825' */ + return 0x43FE } - case 250: - { /* '250' */ - return 0x4400 + case 1826: { /* '1826' */ + return 0x4400 } - case 251: - { /* '251' */ - return 0x4400 + case 1827: { /* '1827' */ + return 0x4400 } - case 252: - { /* '252' */ - return 0x4400 + case 1828: { /* '1828' */ + return 0x4400 } - case 253: - { /* '253' */ - return 0x4400 + case 1829: { /* '1829' */ + return 0x4400 } - case 254: - { /* '254' */ - return 0x4400 + case 183: { /* '183' */ + return 0x43FC } - case 255: - { /* '255' */ - return 0x4400 + case 1830: { /* '1830' */ + return 0x4400 } - case 256: - { /* '256' */ - return 0x4400 + case 1831: { /* '1831' */ + return 0x4400 } - case 257: - { /* '257' */ - return 0x4400 + case 1832: { /* '1832' */ + return 0x4400 } - case 258: - { /* '258' */ - return 0x4400 + case 1833: { /* '1833' */ + return 0x4400 } - case 259: - { /* '259' */ - return 0x4400 + case 1834: { /* '1834' */ + return 0x4400 } - case 26: - { /* '26' */ - return 0x4400 + case 1835: { /* '1835' */ + return 0x43FE } - case 260: - { /* '260' */ - return 0x4400 + case 1836: { /* '1836' */ + return 0x43FE } - case 261: - { /* '261' */ - return 0x4400 + case 1837: { /* '1837' */ + return 0x43FE } - case 262: - { /* '262' */ - return 0x4400 + case 1838: { /* '1838' */ + return 0x43FE } - case 263: - { /* '263' */ - return 0x4400 + case 1839: { /* '1839' */ + return 0x43FE } - case 264: - { /* '264' */ - return 0x4400 + case 184: { /* '184' */ + return 0x43FC } - case 265: - { /* '265' */ - return 0x4400 + case 1840: { /* '1840' */ + return 0x43FE } - case 266: - { /* '266' */ - return 0x4400 + case 1841: { /* '1841' */ + return 0x43FE } - case 267: - { /* '267' */ - return 0x4400 + case 1842: { /* '1842' */ + return 0x43FE } - case 268: - { /* '268' */ - return 0x4400 + case 1843: { /* '1843' */ + return 0x43FE } - case 269: - { /* '269' */ - return 0x4400 + case 1844: { /* '1844' */ + return 0x43FE } - case 27: - { /* '27' */ - return 0x43FE + case 1845: { /* '1845' */ + return 0x43FE } - case 270: - { /* '270' */ - return 0x4400 + case 1846: { /* '1846' */ + return 0x43FE } - case 271: - { /* '271' */ - return 0x4400 + case 1847: { /* '1847' */ + return 0x43FE } - case 272: - { /* '272' */ - return 0x4400 + case 1848: { /* '1848' */ + return 0x43FE } - case 273: - { /* '273' */ - return 0x4400 + case 1849: { /* '1849' */ + return 0x43FE } - case 274: - { /* '274' */ - return 0x4400 + case 185: { /* '185' */ + return 0x43FC } - case 275: - { /* '275' */ - return 0x4400 + case 1850: { /* '1850' */ + return 0x43FE } - case 276: - { /* '276' */ - return 0x4400 + case 1851: { /* '1851' */ + return 0x43FE } - case 277: - { /* '277' */ - return 0x4400 + case 1852: { /* '1852' */ + return 0x43FE } - case 278: - { /* '278' */ - return 0x4400 + case 1853: { /* '1853' */ + return 0x43FE } - case 279: - { /* '279' */ - return 0x4400 + case 1854: { /* '1854' */ + return 0x43FE } - case 28: - { /* '28' */ - return 0x4400 + case 1855: { /* '1855' */ + return 0x43FE } - case 280: - { /* '280' */ - return 0x4400 + case 1856: { /* '1856' */ + return 0x43FE } - case 281: - { /* '281' */ - return 0x4400 + case 1857: { /* '1857' */ + return 0x43FE } - case 282: - { /* '282' */ - return 0x4400 + case 1858: { /* '1858' */ + return 0x43FE } - case 283: - { /* '283' */ - return 0x4400 + case 1859: { /* '1859' */ + return 0x43FE } - case 284: - { /* '284' */ - return 0x4400 + case 186: { /* '186' */ + return 0x43FC } - case 285: - { /* '285' */ - return 0x4400 + case 1860: { /* '1860' */ + return 0x43FE } - case 286: - { /* '286' */ - return 0x4400 + case 1861: { /* '1861' */ + return 0x43FE } - case 287: - { /* '287' */ - return 0x4400 + case 1862: { /* '1862' */ + return 0x43FE } - case 288: - { /* '288' */ - return 0x4400 + case 1863: { /* '1863' */ + return 0x43FE } - case 289: - { /* '289' */ - return 0x4400 + case 1864: { /* '1864' */ + return 0x43FE } - case 29: - { /* '29' */ - return 0x43FE + case 1865: { /* '1865' */ + return 0x43FE } - case 290: - { /* '290' */ - return 0x4400 + case 1866: { /* '1866' */ + return 0x43FE } - case 291: - { /* '291' */ - return 0x4400 + case 1867: { /* '1867' */ + return 0x41E5 } - case 292: - { /* '292' */ - return 0x4400 + case 1868: { /* '1868' */ + return 0x41E5 } - case 293: - { /* '293' */ - return 0x4400 + case 1869: { /* '1869' */ + return 0x43FF } - case 294: - { /* '294' */ - return 0x4400 + case 187: { /* '187' */ + return 0x43FC } - case 295: - { /* '295' */ - return 0x4400 + case 1870: { /* '1870' */ + return 0x41E5 } - case 296: - { /* '296' */ - return 0x4400 + case 1871: { /* '1871' */ + return 0x41E5 } - case 297: - { /* '297' */ - return 0x4400 + case 1872: { /* '1872' */ + return 0x43FF } - case 298: - { /* '298' */ - return 0x4400 + case 1873: { /* '1873' */ + return 0x41E5 } - case 299: - { /* '299' */ - return 0x4400 + case 1874: { /* '1874' */ + return 0x41E5 } - case 3: - { /* '3' */ - return 0x4400 + case 1875: { /* '1875' */ + return 0x41E5 } - case 30: - { /* '30' */ - return 0x43FE + case 1876: { /* '1876' */ + return 0x43FE } - case 300: - { /* '300' */ - return 0x4400 + case 188: { /* '188' */ + return 0x4324 } - case 301: - { /* '301' */ - return 0x4400 + case 189: { /* '189' */ + return 0x425C } - case 302: - { /* '302' */ - return 0x4400 + case 19: { /* '19' */ + return 0x43FE } - case 303: - { /* '303' */ - return 0x4400 + case 190: { /* '190' */ + return 0x405C } - case 304: - { /* '304' */ - return 0x4400 + case 191: { /* '191' */ + return 0x42B0 } - case 305: - { /* '305' */ - return 0x4400 + case 192: { /* '192' */ + return 0x4328 } - case 306: - { /* '306' */ - return 0x4400 + case 193: { /* '193' */ + return 0x43EC } - case 307: - { /* '307' */ - return 0x4400 + case 194: { /* '194' */ + return 0x4400 } - case 308: - { /* '308' */ - return 0x4400 + case 195: { /* '195' */ + return 0x4400 } - case 309: - { /* '309' */ - return 0x4400 + case 196: { /* '196' */ + return 0x4400 } - case 31: - { /* '31' */ - return 0x43FE + case 197: { /* '197' */ + return 0x4400 } - case 310: - { /* '310' */ - return 0x4400 + case 198: { /* '198' */ + return 0x4400 } - case 311: - { /* '311' */ - return 0x4400 + case 199: { /* '199' */ + return 0x4400 } - case 312: - { /* '312' */ - return 0x4400 + case 2: { /* '2' */ + return 0x4400 } - case 313: - { /* '313' */ - return 0x4400 + case 20: { /* '20' */ + return 0x4400 } - case 314: - { /* '314' */ - return 0x4400 + case 200: { /* '200' */ + return 0x4400 } - case 315: - { /* '315' */ - return 0x4400 + case 201: { /* '201' */ + return 0x4400 } - case 316: - { /* '316' */ - return 0x4400 + case 202: { /* '202' */ + return 0x4400 } - case 317: - { /* '317' */ - return 0x4400 + case 203: { /* '203' */ + return 0x4400 } - case 318: - { /* '318' */ - return 0x4400 + case 204: { /* '204' */ + return 0x4400 } - case 319: - { /* '319' */ - return 0x4400 + case 205: { /* '205' */ + return 0x4400 } - case 32: - { /* '32' */ - return 0x4324 + case 206: { /* '206' */ + return 0x4400 } - case 320: - { /* '320' */ - return 0x4400 + case 207: { /* '207' */ + return 0x4400 } - case 321: - { /* '321' */ - return 0x4400 + case 208: { /* '208' */ + return 0x4400 } - case 322: - { /* '322' */ - return 0x4400 + case 209: { /* '209' */ + return 0x4400 } - case 323: - { /* '323' */ - return 0x4400 + case 21: { /* '21' */ + return 0x4400 } - case 324: - { /* '324' */ - return 0x4400 + case 210: { /* '210' */ + return 0x4400 } - case 325: - { /* '325' */ - return 0x4400 + case 211: { /* '211' */ + return 0x4400 } - case 326: - { /* '326' */ - return 0x4400 + case 212: { /* '212' */ + return 0x4400 } - case 327: - { /* '327' */ - return 0x4400 + case 213: { /* '213' */ + return 0x4400 } - case 328: - { /* '328' */ - return 0x4400 + case 214: { /* '214' */ + return 0x4400 } - case 329: - { /* '329' */ - return 0x4400 + case 215: { /* '215' */ + return 0x4400 } - case 33: - { /* '33' */ - return 0x4324 + case 216: { /* '216' */ + return 0x4400 } - case 330: - { /* '330' */ - return 0x4400 + case 217: { /* '217' */ + return 0x4400 } - case 331: - { /* '331' */ - return 0x4400 + case 218: { /* '218' */ + return 0x4400 } - case 332: - { /* '332' */ - return 0x4400 + case 219: { /* '219' */ + return 0x4400 } - case 333: - { /* '333' */ - return 0x4400 + case 22: { /* '22' */ + return 0x4400 } - case 334: - { /* '334' */ - return 0x4400 + case 220: { /* '220' */ + return 0x4400 } - case 335: - { /* '335' */ - return 0x4400 + case 221: { /* '221' */ + return 0x4400 } - case 336: - { /* '336' */ - return 0x4400 + case 222: { /* '222' */ + return 0x4400 } - case 337: - { /* '337' */ - return 0x4400 + case 223: { /* '223' */ + return 0x4400 } - case 338: - { /* '338' */ - return 0x4400 + case 224: { /* '224' */ + return 0x4400 } - case 339: - { /* '339' */ - return 0x4400 + case 225: { /* '225' */ + return 0x4400 } - case 34: - { /* '34' */ - return 0x4400 + case 226: { /* '226' */ + return 0x4400 } - case 340: - { /* '340' */ - return 0x4400 + case 227: { /* '227' */ + return 0x4400 } - case 341: - { /* '341' */ - return 0x4400 + case 228: { /* '228' */ + return 0x4400 } - case 342: - { /* '342' */ - return 0x4400 + case 229: { /* '229' */ + return 0x4400 } - case 343: - { /* '343' */ - return 0x4400 + case 23: { /* '23' */ + return 0x4400 } - case 344: - { /* '344' */ - return 0x4400 + case 230: { /* '230' */ + return 0x4400 } - case 345: - { /* '345' */ - return 0x4400 + case 231: { /* '231' */ + return 0x4400 } - case 346: - { /* '346' */ - return 0x4400 + case 232: { /* '232' */ + return 0x4400 } - case 347: - { /* '347' */ - return 0x4400 + case 233: { /* '233' */ + return 0x4400 } - case 348: - { /* '348' */ - return 0x4400 + case 234: { /* '234' */ + return 0x4400 } - case 349: - { /* '349' */ - return 0x4400 + case 235: { /* '235' */ + return 0x4400 } - case 35: - { /* '35' */ - return 0x4400 + case 236: { /* '236' */ + return 0x4400 } - case 350: - { /* '350' */ - return 0x4400 + case 237: { /* '237' */ + return 0x4400 } - case 351: - { /* '351' */ - return 0x4400 + case 238: { /* '238' */ + return 0x4400 } - case 352: - { /* '352' */ - return 0x4400 + case 239: { /* '239' */ + return 0x4400 } - case 353: - { /* '353' */ - return 0x4400 + case 24: { /* '24' */ + return 0x4400 } - case 354: - { /* '354' */ - return 0x4400 + case 240: { /* '240' */ + return 0x4400 } - case 355: - { /* '355' */ - return 0x4400 + case 241: { /* '241' */ + return 0x4400 } - case 356: - { /* '356' */ - return 0x4400 + case 242: { /* '242' */ + return 0x4400 } - case 357: - { /* '357' */ - return 0x4400 + case 243: { /* '243' */ + return 0x4400 } - case 358: - { /* '358' */ - return 0x4400 + case 244: { /* '244' */ + return 0x4400 } - case 359: - { /* '359' */ - return 0x4400 + case 245: { /* '245' */ + return 0x4400 } - case 36: - { /* '36' */ - return 0x4204 + case 246: { /* '246' */ + return 0x4400 } - case 360: - { /* '360' */ - return 0x4400 + case 247: { /* '247' */ + return 0x4400 } - case 361: - { /* '361' */ - return 0x4400 + case 248: { /* '248' */ + return 0x4400 } - case 362: - { /* '362' */ - return 0x4400 + case 249: { /* '249' */ + return 0x4400 } - case 363: - { /* '363' */ - return 0x4400 + case 25: { /* '25' */ + return 0x4400 } - case 364: - { /* '364' */ - return 0x4400 + case 250: { /* '250' */ + return 0x4400 } - case 365: - { /* '365' */ - return 0x4400 + case 251: { /* '251' */ + return 0x4400 } - case 366: - { /* '366' */ - return 0x4400 + case 252: { /* '252' */ + return 0x4400 } - case 367: - { /* '367' */ - return 0x4400 + case 253: { /* '253' */ + return 0x4400 } - case 368: - { /* '368' */ - return 0x4400 + case 254: { /* '254' */ + return 0x4400 } - case 369: - { /* '369' */ - return 0x4400 + case 255: { /* '255' */ + return 0x4400 } - case 37: - { /* '37' */ - return 0x4204 + case 256: { /* '256' */ + return 0x4400 } - case 370: - { /* '370' */ - return 0x4400 + case 257: { /* '257' */ + return 0x4400 } - case 371: - { /* '371' */ - return 0x4400 + case 258: { /* '258' */ + return 0x4400 } - case 372: - { /* '372' */ - return 0x4400 + case 259: { /* '259' */ + return 0x4400 } - case 373: - { /* '373' */ - return 0x4400 + case 26: { /* '26' */ + return 0x4400 } - case 374: - { /* '374' */ - return 0x4400 + case 260: { /* '260' */ + return 0x4400 } - case 375: - { /* '375' */ - return 0x4400 + case 261: { /* '261' */ + return 0x4400 } - case 376: - { /* '376' */ - return 0x4400 + case 262: { /* '262' */ + return 0x4400 } - case 377: - { /* '377' */ - return 0x4400 + case 263: { /* '263' */ + return 0x4400 } - case 378: - { /* '378' */ - return 0x4400 + case 264: { /* '264' */ + return 0x4400 } - case 379: - { /* '379' */ - return 0x4400 + case 265: { /* '265' */ + return 0x4400 } - case 38: - { /* '38' */ - return 0x4400 + case 266: { /* '266' */ + return 0x4400 } - case 380: - { /* '380' */ - return 0x4400 + case 267: { /* '267' */ + return 0x4400 } - case 381: - { /* '381' */ - return 0x4400 + case 268: { /* '268' */ + return 0x4400 } - case 382: - { /* '382' */ - return 0x4400 + case 269: { /* '269' */ + return 0x4400 } - case 383: - { /* '383' */ - return 0x4400 + case 27: { /* '27' */ + return 0x43FE } - case 384: - { /* '384' */ - return 0x4400 + case 270: { /* '270' */ + return 0x4400 } - case 385: - { /* '385' */ - return 0x4400 + case 271: { /* '271' */ + return 0x4400 } - case 386: - { /* '386' */ - return 0x4400 + case 272: { /* '272' */ + return 0x4400 } - case 387: - { /* '387' */ - return 0x4400 + case 273: { /* '273' */ + return 0x4400 } - case 388: - { /* '388' */ - return 0x4400 + case 274: { /* '274' */ + return 0x4400 } - case 389: - { /* '389' */ - return 0x4400 + case 275: { /* '275' */ + return 0x4400 } - case 39: - { /* '39' */ - return 0x43CE + case 276: { /* '276' */ + return 0x4400 } - case 390: - { /* '390' */ - return 0x4400 + case 277: { /* '277' */ + return 0x4400 } - case 391: - { /* '391' */ - return 0x4400 + case 278: { /* '278' */ + return 0x4400 } - case 392: - { /* '392' */ - return 0x4400 + case 279: { /* '279' */ + return 0x4400 } - case 393: - { /* '393' */ - return 0x4400 + case 28: { /* '28' */ + return 0x4400 } - case 394: - { /* '394' */ - return 0x4400 + case 280: { /* '280' */ + return 0x4400 } - case 395: - { /* '395' */ - return 0x4400 + case 281: { /* '281' */ + return 0x4400 } - case 396: - { /* '396' */ - return 0x4400 + case 282: { /* '282' */ + return 0x4400 } - case 397: - { /* '397' */ - return 0x4400 + case 283: { /* '283' */ + return 0x4400 } - case 398: - { /* '398' */ - return 0x4400 + case 284: { /* '284' */ + return 0x4400 } - case 399: - { /* '399' */ - return 0x4400 + case 285: { /* '285' */ + return 0x4400 } - case 4: - { /* '4' */ - return 0x43EC + case 286: { /* '286' */ + return 0x4400 } - case 40: - { /* '40' */ - return 0x43FF + case 287: { /* '287' */ + return 0x4400 } - case 400: - { /* '400' */ - return 0x4400 + case 288: { /* '288' */ + return 0x4400 } - case 401: - { /* '401' */ - return 0x4400 + case 289: { /* '289' */ + return 0x4400 } - case 402: - { /* '402' */ - return 0x4400 + case 29: { /* '29' */ + return 0x43FE } - case 403: - { /* '403' */ - return 0x4400 + case 290: { /* '290' */ + return 0x4400 } - case 404: - { /* '404' */ - return 0x4400 + case 291: { /* '291' */ + return 0x4400 } - case 405: - { /* '405' */ - return 0x4400 + case 292: { /* '292' */ + return 0x4400 } - case 406: - { /* '406' */ - return 0x4400 + case 293: { /* '293' */ + return 0x4400 } - case 407: - { /* '407' */ - return 0x4400 + case 294: { /* '294' */ + return 0x4400 } - case 408: - { /* '408' */ - return 0x4400 + case 295: { /* '295' */ + return 0x4400 } - case 409: - { /* '409' */ - return 0x4400 + case 296: { /* '296' */ + return 0x4400 } - case 41: - { /* '41' */ - return 0x4400 + case 297: { /* '297' */ + return 0x4400 } - case 410: - { /* '410' */ - return 0x4400 + case 298: { /* '298' */ + return 0x4400 } - case 411: - { /* '411' */ - return 0x4400 + case 299: { /* '299' */ + return 0x4400 } - case 412: - { /* '412' */ - return 0x4400 + case 3: { /* '3' */ + return 0x4400 } - case 413: - { /* '413' */ - return 0x4400 + case 30: { /* '30' */ + return 0x43FE } - case 414: - { /* '414' */ - return 0x4080 + case 300: { /* '300' */ + return 0x4400 } - case 415: - { /* '415' */ - return 0x4080 + case 301: { /* '301' */ + return 0x4400 } - case 416: - { /* '416' */ - return 0x4080 + case 302: { /* '302' */ + return 0x4400 } - case 417: - { /* '417' */ - return 0x4400 + case 303: { /* '303' */ + return 0x4400 } - case 418: - { /* '418' */ - return 0x4400 + case 304: { /* '304' */ + return 0x4400 } - case 419: - { /* '419' */ - return 0x4400 + case 305: { /* '305' */ + return 0x4400 } - case 42: - { /* '42' */ - return 0x4400 + case 306: { /* '306' */ + return 0x4400 } - case 420: - { /* '420' */ - return 0x4400 + case 307: { /* '307' */ + return 0x4400 } - case 421: - { /* '421' */ - return 0x4400 + case 308: { /* '308' */ + return 0x4400 } - case 422: - { /* '422' */ - return 0x4400 + case 309: { /* '309' */ + return 0x4400 } - case 423: - { /* '423' */ - return 0x4194 + case 31: { /* '31' */ + return 0x43FE } - case 424: - { /* '424' */ - return 0x4400 + case 310: { /* '310' */ + return 0x4400 } - case 425: - { /* '425' */ - return 0x4400 + case 311: { /* '311' */ + return 0x4400 } - case 426: - { /* '426' */ - return 0x4400 + case 312: { /* '312' */ + return 0x4400 } - case 427: - { /* '427' */ - return 0x4400 + case 313: { /* '313' */ + return 0x4400 } - case 428: - { /* '428' */ - return 0x4400 + case 314: { /* '314' */ + return 0x4400 } - case 429: - { /* '429' */ - return 0x4400 + case 315: { /* '315' */ + return 0x4400 } - case 43: - { /* '43' */ - return 0x4400 + case 316: { /* '316' */ + return 0x4400 } - case 430: - { /* '430' */ - return 0x4400 + case 317: { /* '317' */ + return 0x4400 } - case 431: - { /* '431' */ - return 0x4400 + case 318: { /* '318' */ + return 0x4400 } - case 432: - { /* '432' */ - return 0x4400 + case 319: { /* '319' */ + return 0x4400 } - case 433: - { /* '433' */ - return 0x4400 + case 32: { /* '32' */ + return 0x4324 } - case 434: - { /* '434' */ - return 0x4400 + case 320: { /* '320' */ + return 0x4400 } - case 435: - { /* '435' */ - return 0x4400 + case 321: { /* '321' */ + return 0x4400 } - case 436: - { /* '436' */ - return 0x4400 + case 322: { /* '322' */ + return 0x4400 } - case 437: - { /* '437' */ - return 0x4400 + case 323: { /* '323' */ + return 0x4400 } - case 438: - { /* '438' */ - return 0x4400 + case 324: { /* '324' */ + return 0x4400 } - case 439: - { /* '439' */ - return 0x4400 + case 325: { /* '325' */ + return 0x4400 } - case 44: - { /* '44' */ - return 0x4400 + case 326: { /* '326' */ + return 0x4400 } - case 440: - { /* '440' */ - return 0x4400 + case 327: { /* '327' */ + return 0x4400 } - case 441: - { /* '441' */ - return 0x4400 + case 328: { /* '328' */ + return 0x4400 } - case 442: - { /* '442' */ - return 0x4400 + case 329: { /* '329' */ + return 0x4400 } - case 443: - { /* '443' */ - return 0x4400 + case 33: { /* '33' */ + return 0x4324 } - case 444: - { /* '444' */ - return 0x4400 + case 330: { /* '330' */ + return 0x4400 } - case 445: - { /* '445' */ - return 0x4400 + case 331: { /* '331' */ + return 0x4400 } - case 446: - { /* '446' */ - return 0x4400 + case 332: { /* '332' */ + return 0x4400 } - case 447: - { /* '447' */ - return 0x4400 + case 333: { /* '333' */ + return 0x4400 } - case 448: - { /* '448' */ - return 0x4400 + case 334: { /* '334' */ + return 0x4400 } - case 449: - { /* '449' */ - return 0x4400 + case 335: { /* '335' */ + return 0x4400 } - case 45: - { /* '45' */ - return 0x4400 + case 336: { /* '336' */ + return 0x4400 } - case 450: - { /* '450' */ - return 0x4400 + case 337: { /* '337' */ + return 0x4400 } - case 451: - { /* '451' */ - return 0x4400 + case 338: { /* '338' */ + return 0x4400 } - case 452: - { /* '452' */ - return 0x4400 + case 339: { /* '339' */ + return 0x4400 } - case 453: - { /* '453' */ - return 0x4400 + case 34: { /* '34' */ + return 0x4400 } - case 454: - { /* '454' */ - return 0x4400 + case 340: { /* '340' */ + return 0x4400 } - case 455: - { /* '455' */ - return 0x4400 + case 341: { /* '341' */ + return 0x4400 } - case 456: - { /* '456' */ - return 0x4400 + case 342: { /* '342' */ + return 0x4400 } - case 457: - { /* '457' */ - return 0x4400 + case 343: { /* '343' */ + return 0x4400 } - case 458: - { /* '458' */ - return 0x4400 + case 344: { /* '344' */ + return 0x4400 } - case 459: - { /* '459' */ - return 0x4400 + case 345: { /* '345' */ + return 0x4400 } - case 46: - { /* '46' */ - return 0x4000 + case 346: { /* '346' */ + return 0x4400 } - case 460: - { /* '460' */ - return 0x4400 + case 347: { /* '347' */ + return 0x4400 } - case 461: - { /* '461' */ - return 0x4400 + case 348: { /* '348' */ + return 0x4400 } - case 462: - { /* '462' */ - return 0x4400 + case 349: { /* '349' */ + return 0x4400 } - case 463: - { /* '463' */ - return 0x4400 + case 35: { /* '35' */ + return 0x4400 } - case 464: - { /* '464' */ - return 0x4400 + case 350: { /* '350' */ + return 0x4400 } - case 465: - { /* '465' */ - return 0x4400 + case 351: { /* '351' */ + return 0x4400 } - case 466: - { /* '466' */ - return 0x4400 + case 352: { /* '352' */ + return 0x4400 } - case 467: - { /* '467' */ - return 0x4400 + case 353: { /* '353' */ + return 0x4400 } - case 468: - { /* '468' */ - return 0x4400 + case 354: { /* '354' */ + return 0x4400 } - case 469: - { /* '469' */ - return 0x4400 + case 355: { /* '355' */ + return 0x4400 } - case 47: - { /* '47' */ - return 0x43FE + case 356: { /* '356' */ + return 0x4400 } - case 470: - { /* '470' */ - return 0x4400 + case 357: { /* '357' */ + return 0x4400 } - case 471: - { /* '471' */ - return 0x4400 + case 358: { /* '358' */ + return 0x4400 } - case 472: - { /* '472' */ - return 0x4400 + case 359: { /* '359' */ + return 0x4400 } - case 473: - { /* '473' */ - return 0x4400 + case 36: { /* '36' */ + return 0x4204 } - case 474: - { /* '474' */ - return 0x4400 + case 360: { /* '360' */ + return 0x4400 } - case 475: - { /* '475' */ - return 0x4400 + case 361: { /* '361' */ + return 0x4400 } - case 476: - { /* '476' */ - return 0x4400 + case 362: { /* '362' */ + return 0x4400 } - case 477: - { /* '477' */ - return 0x4400 + case 363: { /* '363' */ + return 0x4400 } - case 478: - { /* '478' */ - return 0x4400 + case 364: { /* '364' */ + return 0x4400 } - case 479: - { /* '479' */ - return 0x4400 + case 365: { /* '365' */ + return 0x4400 } - case 48: - { /* '48' */ - return 0x43FE + case 366: { /* '366' */ + return 0x4400 } - case 480: - { /* '480' */ - return 0x4400 + case 367: { /* '367' */ + return 0x4400 } - case 481: - { /* '481' */ - return 0x4400 + case 368: { /* '368' */ + return 0x4400 } - case 482: - { /* '482' */ - return 0x4400 + case 369: { /* '369' */ + return 0x4400 } - case 483: - { /* '483' */ - return 0x4400 + case 37: { /* '37' */ + return 0x4204 } - case 484: - { /* '484' */ - return 0x4400 + case 370: { /* '370' */ + return 0x4400 } - case 485: - { /* '485' */ - return 0x4400 + case 371: { /* '371' */ + return 0x4400 } - case 486: - { /* '486' */ - return 0x4400 + case 372: { /* '372' */ + return 0x4400 } - case 487: - { /* '487' */ - return 0x4400 + case 373: { /* '373' */ + return 0x4400 } - case 488: - { /* '488' */ - return 0x4400 + case 374: { /* '374' */ + return 0x4400 } - case 489: - { /* '489' */ - return 0x4400 + case 375: { /* '375' */ + return 0x4400 } - case 49: - { /* '49' */ - return 0x4400 + case 376: { /* '376' */ + return 0x4400 } - case 490: - { /* '490' */ - return 0x4400 + case 377: { /* '377' */ + return 0x4400 } - case 491: - { /* '491' */ - return 0x4400 + case 378: { /* '378' */ + return 0x4400 } - case 492: - { /* '492' */ - return 0x4400 + case 379: { /* '379' */ + return 0x4400 } - case 493: - { /* '493' */ - return 0x4400 + case 38: { /* '38' */ + return 0x4400 } - case 494: - { /* '494' */ - return 0x4400 + case 380: { /* '380' */ + return 0x4400 } - case 495: - { /* '495' */ - return 0x4400 + case 381: { /* '381' */ + return 0x4400 } - case 496: - { /* '496' */ - return 0x4400 + case 382: { /* '382' */ + return 0x4400 } - case 497: - { /* '497' */ - return 0x4400 + case 383: { /* '383' */ + return 0x4400 } - case 498: - { /* '498' */ - return 0x4400 + case 384: { /* '384' */ + return 0x4400 } - case 499: - { /* '499' */ - return 0x4400 + case 385: { /* '385' */ + return 0x4400 } - case 5: - { /* '5' */ - return 0x402C + case 386: { /* '386' */ + return 0x4400 } - case 50: - { /* '50' */ - return 0x40F4 + case 387: { /* '387' */ + return 0x4400 } - case 500: - { /* '500' */ - return 0x4400 + case 388: { /* '388' */ + return 0x4400 } - case 501: - { /* '501' */ - return 0x4400 + case 389: { /* '389' */ + return 0x4400 } - case 502: - { /* '502' */ - return 0x4400 + case 39: { /* '39' */ + return 0x43CE } - case 503: - { /* '503' */ - return 0x4400 + case 390: { /* '390' */ + return 0x4400 } - case 504: - { /* '504' */ - return 0x4400 + case 391: { /* '391' */ + return 0x4400 } - case 505: - { /* '505' */ - return 0x4400 + case 392: { /* '392' */ + return 0x4400 } - case 506: - { /* '506' */ - return 0x4400 + case 393: { /* '393' */ + return 0x4400 } - case 507: - { /* '507' */ - return 0x4400 + case 394: { /* '394' */ + return 0x4400 } - case 508: - { /* '508' */ - return 0x4400 + case 395: { /* '395' */ + return 0x4400 } - case 509: - { /* '509' */ - return 0x4400 + case 396: { /* '396' */ + return 0x4400 } - case 51: - { /* '51' */ - return 0x40F4 + case 397: { /* '397' */ + return 0x4400 } - case 510: - { /* '510' */ - return 0x4400 + case 398: { /* '398' */ + return 0x4400 } - case 511: - { /* '511' */ - return 0x4400 + case 399: { /* '399' */ + return 0x4400 } - case 512: - { /* '512' */ - return 0x4400 + case 4: { /* '4' */ + return 0x43EC } - case 513: - { /* '513' */ - return 0x4400 + case 40: { /* '40' */ + return 0x43FF } - case 514: - { /* '514' */ - return 0x4400 + case 400: { /* '400' */ + return 0x4400 } - case 515: - { /* '515' */ - return 0x4400 + case 401: { /* '401' */ + return 0x4400 } - case 516: - { /* '516' */ - return 0x4400 + case 402: { /* '402' */ + return 0x4400 } - case 517: - { /* '517' */ - return 0x4400 + case 403: { /* '403' */ + return 0x4400 } - case 518: - { /* '518' */ - return 0x4400 + case 404: { /* '404' */ + return 0x4400 } - case 519: - { /* '519' */ - return 0x4400 + case 405: { /* '405' */ + return 0x4400 } - case 52: - { /* '52' */ - return 0x402C + case 406: { /* '406' */ + return 0x4400 } - case 520: - { /* '520' */ - return 0x4400 + case 407: { /* '407' */ + return 0x4400 } - case 521: - { /* '521' */ - return 0x4400 + case 408: { /* '408' */ + return 0x4400 } - case 522: - { /* '522' */ - return 0x4400 + case 409: { /* '409' */ + return 0x4400 } - case 523: - { /* '523' */ - return 0x4400 + case 41: { /* '41' */ + return 0x4400 } - case 524: - { /* '524' */ - return 0x4400 + case 410: { /* '410' */ + return 0x4400 } - case 525: - { /* '525' */ - return 0x4400 + case 411: { /* '411' */ + return 0x4400 } - case 526: - { /* '526' */ - return 0x4400 + case 412: { /* '412' */ + return 0x4400 } - case 527: - { /* '527' */ - return 0x4400 + case 413: { /* '413' */ + return 0x4400 } - case 528: - { /* '528' */ - return 0x4400 + case 414: { /* '414' */ + return 0x4080 } - case 529: - { /* '529' */ - return 0x4400 + case 415: { /* '415' */ + return 0x4080 } - case 53: - { /* '53' */ - return 0x43FC + case 416: { /* '416' */ + return 0x4080 } - case 530: - { /* '530' */ - return 0x4400 + case 417: { /* '417' */ + return 0x4400 } - case 531: - { /* '531' */ - return 0x4400 + case 418: { /* '418' */ + return 0x4400 } - case 532: - { /* '532' */ - return 0x4400 + case 419: { /* '419' */ + return 0x4400 } - case 533: - { /* '533' */ - return 0x4400 + case 42: { /* '42' */ + return 0x4400 } - case 534: - { /* '534' */ - return 0x4400 + case 420: { /* '420' */ + return 0x4400 } - case 535: - { /* '535' */ - return 0x4400 + case 421: { /* '421' */ + return 0x4400 } - case 536: - { /* '536' */ - return 0x4400 + case 422: { /* '422' */ + return 0x4400 } - case 537: - { /* '537' */ - return 0x4400 + case 423: { /* '423' */ + return 0x4194 } - case 538: - { /* '538' */ - return 0x4400 + case 424: { /* '424' */ + return 0x4400 } - case 539: - { /* '539' */ - return 0x4400 + case 425: { /* '425' */ + return 0x4400 } - case 54: - { /* '54' */ - return 0x43F0 + case 426: { /* '426' */ + return 0x4400 } - case 540: - { /* '540' */ - return 0x4400 + case 427: { /* '427' */ + return 0x4400 } - case 541: - { /* '541' */ - return 0x4400 + case 428: { /* '428' */ + return 0x4400 } - case 542: - { /* '542' */ - return 0x4400 + case 429: { /* '429' */ + return 0x4400 } - case 543: - { /* '543' */ - return 0x4400 + case 43: { /* '43' */ + return 0x4400 } - case 544: - { /* '544' */ - return 0x43C4 + case 430: { /* '430' */ + return 0x4400 } - case 545: - { /* '545' */ - return 0x42E8 + case 431: { /* '431' */ + return 0x4400 } - case 546: - { /* '546' */ - return 0x4760 + case 432: { /* '432' */ + return 0x4400 } - case 547: - { /* '547' */ - return 0x4100 + case 433: { /* '433' */ + return 0x4400 } - case 548: - { /* '548' */ - return 0x4100 + case 434: { /* '434' */ + return 0x4400 } - case 549: - { /* '549' */ - return 0x4100 + case 435: { /* '435' */ + return 0x4400 } - case 55: - { /* '55' */ - return 0x43EC + case 436: { /* '436' */ + return 0x4400 } - case 550: - { /* '550' */ - return 0x4100 + case 437: { /* '437' */ + return 0x4400 } - case 551: - { /* '551' */ - return 0x4100 + case 438: { /* '438' */ + return 0x4400 } - case 552: - { /* '552' */ - return 0x4100 + case 439: { /* '439' */ + return 0x4400 } - case 553: - { /* '553' */ - return 0x43EC + case 44: { /* '44' */ + return 0x4400 } - case 554: - { /* '554' */ - return 0x40CC + case 440: { /* '440' */ + return 0x4400 } - case 555: - { /* '555' */ - return 0x41A8 + case 441: { /* '441' */ + return 0x4400 } - case 556: - { /* '556' */ - return 0x4144 + case 442: { /* '442' */ + return 0x4400 } - case 557: - { /* '557' */ - return 0x42D4 + case 443: { /* '443' */ + return 0x4400 } - case 558: - { /* '558' */ - return 0x43FC + case 444: { /* '444' */ + return 0x4400 } - case 559: - { /* '559' */ - return 0x4144 + case 445: { /* '445' */ + return 0x4400 } - case 56: - { /* '56' */ - return 0x43EC + case 446: { /* '446' */ + return 0x4400 } - case 560: - { /* '560' */ - return 0x43FC + case 447: { /* '447' */ + return 0x4400 } - case 561: - { /* '561' */ - return 0x4202 + case 448: { /* '448' */ + return 0x4400 } - case 562: - { /* '562' */ - return 0x40F4 + case 449: { /* '449' */ + return 0x4400 } - case 563: - { /* '563' */ - return 0x4064 + case 45: { /* '45' */ + return 0x4400 } - case 564: - { /* '564' */ - return 0x4124 + case 450: { /* '450' */ + return 0x4400 } - case 565: - { /* '565' */ - return 0x40CC + case 451: { /* '451' */ + return 0x4400 } - case 566: - { /* '566' */ - return 0x43EC + case 452: { /* '452' */ + return 0x4400 } - case 567: - { /* '567' */ - return 0x43EC + case 453: { /* '453' */ + return 0x4400 } - case 568: - { /* '568' */ - return 0x43EC + case 454: { /* '454' */ + return 0x4400 } - case 569: - { /* '569' */ - return 0x43EC + case 455: { /* '455' */ + return 0x4400 } - case 57: - { /* '57' */ - return 0x402C + case 456: { /* '456' */ + return 0x4400 } - case 570: - { /* '570' */ - return 0x43EC + case 457: { /* '457' */ + return 0x4400 } - case 571: - { /* '571' */ - return 0x43EC + case 458: { /* '458' */ + return 0x4400 } - case 572: - { /* '572' */ - return 0x4204 + case 459: { /* '459' */ + return 0x4400 } - case 573: - { /* '573' */ - return 0x4204 + case 46: { /* '46' */ + return 0x4000 } - case 574: - { /* '574' */ - return 0x43FE + case 460: { /* '460' */ + return 0x4400 } - case 575: - { /* '575' */ - return 0x43FE + case 461: { /* '461' */ + return 0x4400 } - case 576: - { /* '576' */ - return 0x43FE + case 462: { /* '462' */ + return 0x4400 } - case 577: - { /* '577' */ - return 0x43EC + case 463: { /* '463' */ + return 0x4400 } - case 578: - { /* '578' */ - return 0x43EC + case 464: { /* '464' */ + return 0x4400 } - case 579: - { /* '579' */ - return 0x43EC + case 465: { /* '465' */ + return 0x4400 } - case 58: - { /* '58' */ - return 0x43FC + case 466: { /* '466' */ + return 0x4400 } - case 580: - { /* '580' */ - return 0x43EC + case 467: { /* '467' */ + return 0x4400 } - case 581: - { /* '581' */ - return 0x43EC + case 468: { /* '468' */ + return 0x4400 } - case 582: - { /* '582' */ - return 0x43EC + case 469: { /* '469' */ + return 0x4400 } - case 583: - { /* '583' */ - return 0x43FE + case 47: { /* '47' */ + return 0x43FE } - case 584: - { /* '584' */ - return 0x43FE + case 470: { /* '470' */ + return 0x4400 } - case 585: - { /* '585' */ - return 0x40F4 + case 471: { /* '471' */ + return 0x4400 } - case 586: - { /* '586' */ - return 0x40F4 + case 472: { /* '472' */ + return 0x4400 } - case 587: - { /* '587' */ - return 0x40F4 + case 473: { /* '473' */ + return 0x4400 } - case 588: - { /* '588' */ - return 0x40F4 + case 474: { /* '474' */ + return 0x4400 } - case 589: - { /* '589' */ - return 0x40F4 + case 475: { /* '475' */ + return 0x4400 } - case 59: - { /* '59' */ - return 0x43FC + case 476: { /* '476' */ + return 0x4400 } - case 590: - { /* '590' */ - return 0x40F4 + case 477: { /* '477' */ + return 0x4400 } - case 591: - { /* '591' */ - return 0x40F4 + case 478: { /* '478' */ + return 0x4400 } - case 592: - { /* '592' */ - return 0x43FE + case 479: { /* '479' */ + return 0x4400 } - case 593: - { /* '593' */ - return 0x43FE + case 48: { /* '48' */ + return 0x43FE } - case 594: - { /* '594' */ - return 0x40F4 + case 480: { /* '480' */ + return 0x4400 } - case 595: - { /* '595' */ - return 0x40F4 + case 481: { /* '481' */ + return 0x4400 } - case 596: - { /* '596' */ - return 0x40F4 + case 482: { /* '482' */ + return 0x4400 } - case 597: - { /* '597' */ - return 0x43EC + case 483: { /* '483' */ + return 0x4400 } - case 598: - { /* '598' */ - return 0x43EC + case 484: { /* '484' */ + return 0x4400 } - case 599: - { /* '599' */ - return 0x43EC + case 485: { /* '485' */ + return 0x4400 } - case 6: - { /* '6' */ - return 0x43FE + case 486: { /* '486' */ + return 0x4400 } - case 60: - { /* '60' */ - return 0x43FE + case 487: { /* '487' */ + return 0x4400 } - case 600: - { /* '600' */ - return 0x43EC + case 488: { /* '488' */ + return 0x4400 } - case 601: - { /* '601' */ - return 0x43EC + case 489: { /* '489' */ + return 0x4400 } - case 602: - { /* '602' */ - return 0x43EC + case 49: { /* '49' */ + return 0x4400 } - case 603: - { /* '603' */ - return 0x43EC + case 490: { /* '490' */ + return 0x4400 } - case 604: - { /* '604' */ - return 0x43EC + case 491: { /* '491' */ + return 0x4400 } - case 605: - { /* '605' */ - return 0x43EC + case 492: { /* '492' */ + return 0x4400 } - case 606: - { /* '606' */ - return 0x43EC + case 493: { /* '493' */ + return 0x4400 } - case 607: - { /* '607' */ - return 0x43EC + case 494: { /* '494' */ + return 0x4400 } - case 608: - { /* '608' */ - return 0x43EC + case 495: { /* '495' */ + return 0x4400 } - case 609: - { /* '609' */ - return 0x43EC + case 496: { /* '496' */ + return 0x4400 } - case 61: - { /* '61' */ - return 0x43FC + case 497: { /* '497' */ + return 0x4400 } - case 610: - { /* '610' */ - return 0x43EC + case 498: { /* '498' */ + return 0x4400 } - case 611: - { /* '611' */ - return 0x43EC + case 499: { /* '499' */ + return 0x4400 } - case 612: - { /* '612' */ - return 0x43EC + case 5: { /* '5' */ + return 0x402C } - case 613: - { /* '613' */ - return 0x43EC + case 50: { /* '50' */ + return 0x40F4 } - case 614: - { /* '614' */ - return 0x43EC + case 500: { /* '500' */ + return 0x4400 } - case 615: - { /* '615' */ - return 0x43EC + case 501: { /* '501' */ + return 0x4400 } - case 616: - { /* '616' */ - return 0x43EC + case 502: { /* '502' */ + return 0x4400 } - case 617: - { /* '617' */ - return 0x43EC + case 503: { /* '503' */ + return 0x4400 } - case 618: - { /* '618' */ - return 0x43EC + case 504: { /* '504' */ + return 0x4400 } - case 619: - { /* '619' */ - return 0x43EC + case 505: { /* '505' */ + return 0x4400 } - case 62: - { /* '62' */ - return 0x43FC + case 506: { /* '506' */ + return 0x4400 } - case 620: - { /* '620' */ - return 0x43EC + case 507: { /* '507' */ + return 0x4400 } - case 621: - { /* '621' */ - return 0x43EC + case 508: { /* '508' */ + return 0x4400 } - case 622: - { /* '622' */ - return 0x43EC + case 509: { /* '509' */ + return 0x4400 } - case 623: - { /* '623' */ - return 0x43EC + case 51: { /* '51' */ + return 0x40F4 } - case 624: - { /* '624' */ - return 0x43C4 + case 510: { /* '510' */ + return 0x4400 } - case 625: - { /* '625' */ - return 0x43C4 + case 511: { /* '511' */ + return 0x4400 } - case 626: - { /* '626' */ - return 0x43EC + case 512: { /* '512' */ + return 0x4400 } - case 627: - { /* '627' */ - return 0x43EC + case 513: { /* '513' */ + return 0x4400 } - case 628: - { /* '628' */ - return 0x4400 + case 514: { /* '514' */ + return 0x4400 } - case 629: - { /* '629' */ - return 0x4400 + case 515: { /* '515' */ + return 0x4400 } - case 63: - { /* '63' */ - return 0x4144 + case 516: { /* '516' */ + return 0x4400 } - case 630: - { /* '630' */ - return 0x4400 + case 517: { /* '517' */ + return 0x4400 } - case 631: - { /* '631' */ - return 0x4400 + case 518: { /* '518' */ + return 0x4400 } - case 632: - { /* '632' */ - return 0x4400 + case 519: { /* '519' */ + return 0x4400 } - case 633: - { /* '633' */ - return 0x4400 + case 52: { /* '52' */ + return 0x402C } - case 634: - { /* '634' */ - return 0x4400 + case 520: { /* '520' */ + return 0x4400 } - case 635: - { /* '635' */ - return 0x4400 + case 521: { /* '521' */ + return 0x4400 } - case 636: - { /* '636' */ - return 0x4400 + case 522: { /* '522' */ + return 0x4400 } - case 637: - { /* '637' */ - return 0x0000 + case 523: { /* '523' */ + return 0x4400 } - case 638: - { /* '638' */ - return 0x0000 + case 524: { /* '524' */ + return 0x4400 } - case 639: - { /* '639' */ - return 0x4194 + case 525: { /* '525' */ + return 0x4400 } - case 64: - { /* '64' */ - return 0x4100 + case 526: { /* '526' */ + return 0x4400 } - case 640: - { /* '640' */ - return 0x4194 + case 527: { /* '527' */ + return 0x4400 } - case 641: - { /* '641' */ - return 0x4324 + case 528: { /* '528' */ + return 0x4400 } - case 642: - { /* '642' */ - return 0x4324 + case 529: { /* '529' */ + return 0x4400 } - case 643: - { /* '643' */ - return 0x4324 + case 53: { /* '53' */ + return 0x43FC } - case 644: - { /* '644' */ - return 0x4324 + case 530: { /* '530' */ + return 0x4400 } - case 645: - { /* '645' */ - return 0x4324 + case 531: { /* '531' */ + return 0x4400 } - case 646: - { /* '646' */ - return 0x4324 + case 532: { /* '532' */ + return 0x4400 } - case 647: - { /* '647' */ - return 0x4194 + case 533: { /* '533' */ + return 0x4400 } - case 648: - { /* '648' */ - return 0x4400 + case 534: { /* '534' */ + return 0x4400 } - case 649: - { /* '649' */ - return 0x4400 + case 535: { /* '535' */ + return 0x4400 } - case 65: - { /* '65' */ - return 0x4100 + case 536: { /* '536' */ + return 0x4400 } - case 650: - { /* '650' */ - return 0x4400 + case 537: { /* '537' */ + return 0x4400 } - case 651: - { /* '651' */ - return 0x4324 + case 538: { /* '538' */ + return 0x4400 } - case 652: - { /* '652' */ - return 0x4400 + case 539: { /* '539' */ + return 0x4400 } - case 653: - { /* '653' */ - return 0x4400 + case 54: { /* '54' */ + return 0x43F0 } - case 654: - { /* '654' */ - return 0x4400 + case 540: { /* '540' */ + return 0x4400 } - case 655: - { /* '655' */ - return 0x4324 + case 541: { /* '541' */ + return 0x4400 } - case 656: - { /* '656' */ - return 0x4194 + case 542: { /* '542' */ + return 0x4400 } - case 657: - { /* '657' */ - return 0x4324 + case 543: { /* '543' */ + return 0x4400 } - case 658: - { /* '658' */ - return 0x4324 + case 544: { /* '544' */ + return 0x43C4 } - case 659: - { /* '659' */ - return 0x42BC + case 545: { /* '545' */ + return 0x42E8 } - case 66: - { /* '66' */ - return 0x4100 + case 546: { /* '546' */ + return 0x4760 } - case 660: - { /* '660' */ - return 0x42BC + case 547: { /* '547' */ + return 0x4100 } - case 661: - { /* '661' */ - return 0x43FC + case 548: { /* '548' */ + return 0x4100 } - case 662: - { /* '662' */ - return 0x4136 + case 549: { /* '549' */ + return 0x4100 } - case 663: - { /* '663' */ - return 0x4266 + case 55: { /* '55' */ + return 0x43EC } - case 664: - { /* '664' */ - return 0x437E + case 550: { /* '550' */ + return 0x4100 } - case 665: - { /* '665' */ - return 0x41DE + case 551: { /* '551' */ + return 0x4100 } - case 666: - { /* '666' */ - return 0x41DE + case 552: { /* '552' */ + return 0x4100 } - case 667: - { /* '667' */ - return 0x4276 + case 553: { /* '553' */ + return 0x43EC } - case 668: - { /* '668' */ - return 0x43A6 + case 554: { /* '554' */ + return 0x40CC } - case 669: - { /* '669' */ - return 0x4304 + case 555: { /* '555' */ + return 0x41A8 } - case 67: - { /* '67' */ - return 0x43FC + case 556: { /* '556' */ + return 0x4144 } - case 670: - { /* '670' */ - return 0x437E + case 557: { /* '557' */ + return 0x42D4 } - case 671: - { /* '671' */ - return 0x437E + case 558: { /* '558' */ + return 0x43FC } - case 672: - { /* '672' */ - return 0x4276 + case 559: { /* '559' */ + return 0x4144 } - case 673: - { /* '673' */ - return 0x437E + case 56: { /* '56' */ + return 0x43EC } - case 674: - { /* '674' */ - return 0x439A + case 560: { /* '560' */ + return 0x43FC } - case 675: - { /* '675' */ - return 0x43A6 + case 561: { /* '561' */ + return 0x4202 } - case 676: - { /* '676' */ - return 0x439A + case 562: { /* '562' */ + return 0x40F4 } - case 677: - { /* '677' */ - return 0x439A + case 563: { /* '563' */ + return 0x4064 } - case 678: - { /* '678' */ - return 0x439A + case 564: { /* '564' */ + return 0x4124 } - case 679: - { /* '679' */ - return 0x439A + case 565: { /* '565' */ + return 0x40CC } - case 68: - { /* '68' */ - return 0x43C4 + case 566: { /* '566' */ + return 0x43EC } - case 680: - { /* '680' */ - return 0x439A + case 567: { /* '567' */ + return 0x43EC } - case 681: - { /* '681' */ - return 0x43A6 + case 568: { /* '568' */ + return 0x43EC } - case 682: - { /* '682' */ - return 0x4136 + case 569: { /* '569' */ + return 0x43EC } - case 683: - { /* '683' */ - return 0x4136 + case 57: { /* '57' */ + return 0x402C } - case 684: - { /* '684' */ - return 0x4324 + case 570: { /* '570' */ + return 0x43EC } - case 685: - { /* '685' */ - return 0x43FC + case 571: { /* '571' */ + return 0x43EC } - case 686: - { /* '686' */ - return 0x43FC + case 572: { /* '572' */ + return 0x4204 } - case 687: - { /* '687' */ - return 0x4400 + case 573: { /* '573' */ + return 0x4204 } - case 688: - { /* '688' */ - return 0x4400 + case 574: { /* '574' */ + return 0x43FE } - case 689: - { /* '689' */ - return 0x4314 + case 575: { /* '575' */ + return 0x43FE } - case 69: - { /* '69' */ - return 0x42E8 + case 576: { /* '576' */ + return 0x43FE } - case 690: - { /* '690' */ - return 0x41CC + case 577: { /* '577' */ + return 0x43EC } - case 691: - { /* '691' */ - return 0x43FC + case 578: { /* '578' */ + return 0x43EC } - case 692: - { /* '692' */ - return 0x43FC + case 579: { /* '579' */ + return 0x43EC } - case 693: - { /* '693' */ - return 0x43FC + case 58: { /* '58' */ + return 0x43FC } - case 694: - { /* '694' */ - return 0x43FC + case 580: { /* '580' */ + return 0x43EC } - case 695: - { /* '695' */ - return 0x43FC + case 581: { /* '581' */ + return 0x43EC } - case 696: - { /* '696' */ - return 0x431C + case 582: { /* '582' */ + return 0x43EC } - case 697: - { /* '697' */ - return 0x4238 + case 583: { /* '583' */ + return 0x43FE } - case 698: - { /* '698' */ - return 0x4238 + case 584: { /* '584' */ + return 0x43FE } - case 699: - { /* '699' */ - return 0x41CC + case 585: { /* '585' */ + return 0x40F4 } - case 7: - { /* '7' */ - return 0x43FE + case 586: { /* '586' */ + return 0x40F4 } - case 70: - { /* '70' */ - return 0x4760 + case 587: { /* '587' */ + return 0x40F4 } - case 700: - { /* '700' */ - return 0x41D8 + case 588: { /* '588' */ + return 0x40F4 } - case 701: - { /* '701' */ - return 0x43FC + case 589: { /* '589' */ + return 0x40F4 } - case 702: - { /* '702' */ - return 0x43FC + case 59: { /* '59' */ + return 0x43FC } - case 703: - { /* '703' */ - return 0x43FC + case 590: { /* '590' */ + return 0x40F4 } - case 704: - { /* '704' */ - return 0x43FC + case 591: { /* '591' */ + return 0x40F4 } - case 705: - { /* '705' */ - return 0x43FC + case 592: { /* '592' */ + return 0x43FE } - case 706: - { /* '706' */ - return 0x4244 + case 593: { /* '593' */ + return 0x43FE } - case 707: - { /* '707' */ - return 0x4244 + case 594: { /* '594' */ + return 0x40F4 } - case 708: - { /* '708' */ - return 0x43FC + case 595: { /* '595' */ + return 0x40F4 } - case 709: - { /* '709' */ - return 0x4244 + case 596: { /* '596' */ + return 0x40F4 } - case 71: - { /* '71' */ - return 0x4400 + case 597: { /* '597' */ + return 0x43EC } - case 710: - { /* '710' */ - return 0x43FC + case 598: { /* '598' */ + return 0x43EC } - case 711: - { /* '711' */ - return 0x43FC + case 599: { /* '599' */ + return 0x43EC } - case 712: - { /* '712' */ - return 0x43FC + case 6: { /* '6' */ + return 0x43FE } - case 713: - { /* '713' */ - return 0x4404 + case 60: { /* '60' */ + return 0x43FE } - case 714: - { /* '714' */ - return 0x4404 + case 600: { /* '600' */ + return 0x43EC } - case 715: - { /* '715' */ - return 0x4404 + case 601: { /* '601' */ + return 0x43EC } - case 716: - { /* '716' */ - return 0x43FC + case 602: { /* '602' */ + return 0x43EC } - case 717: - { /* '717' */ - return 0x43FC + case 603: { /* '603' */ + return 0x43EC } - case 718: - { /* '718' */ - return 0x4054 + case 604: { /* '604' */ + return 0x43EC } - case 719: - { /* '719' */ - return 0x4400 + case 605: { /* '605' */ + return 0x43EC } - case 72: - { /* '72' */ - return 0x40CC + case 606: { /* '606' */ + return 0x43EC } - case 720: - { /* '720' */ - return 0x402C + case 607: { /* '607' */ + return 0x43EC } - case 721: - { /* '721' */ - return 0x402C + case 608: { /* '608' */ + return 0x43EC } - case 722: - { /* '722' */ - return 0x43EC + case 609: { /* '609' */ + return 0x43EC } - case 723: - { /* '723' */ - return 0x43EC + case 61: { /* '61' */ + return 0x43FC } - case 724: - { /* '724' */ - return 0x4400 + case 610: { /* '610' */ + return 0x43EC } - case 725: - { /* '725' */ - return 0x4400 + case 611: { /* '611' */ + return 0x43EC } - case 726: - { /* '726' */ - return 0x45E0 + case 612: { /* '612' */ + return 0x43EC } - case 727: - { /* '727' */ - return 0x4402 + case 613: { /* '613' */ + return 0x43EC } - case 728: - { /* '728' */ - return 0x43F2 + case 614: { /* '614' */ + return 0x43EC } - case 729: - { /* '729' */ - return 0x4400 + case 615: { /* '615' */ + return 0x43EC } - case 73: - { /* '73' */ - return 0x4324 + case 616: { /* '616' */ + return 0x43EC } - case 730: - { /* '730' */ - return 0x4400 + case 617: { /* '617' */ + return 0x43EC } - case 731: - { /* '731' */ - return 0x4400 + case 618: { /* '618' */ + return 0x43EC } - case 732: - { /* '732' */ - return 0x43FE + case 619: { /* '619' */ + return 0x43EC } - case 733: - { /* '733' */ - return 0x4400 + case 62: { /* '62' */ + return 0x43FC } - case 734: - { /* '734' */ - return 0x4400 + case 620: { /* '620' */ + return 0x43EC } - case 735: - { /* '735' */ - return 0x4400 + case 621: { /* '621' */ + return 0x43EC } - case 736: - { /* '736' */ - return 0x4400 + case 622: { /* '622' */ + return 0x43EC } - case 737: - { /* '737' */ - return 0x4400 + case 623: { /* '623' */ + return 0x43EC } - case 738: - { /* '738' */ - return 0x4400 + case 624: { /* '624' */ + return 0x43C4 } - case 739: - { /* '739' */ - return 0x4400 + case 625: { /* '625' */ + return 0x43C4 } - case 74: - { /* '74' */ - return 0x41A8 + case 626: { /* '626' */ + return 0x43EC } - case 740: - { /* '740' */ - return 0x4400 + case 627: { /* '627' */ + return 0x43EC } - case 741: - { /* '741' */ - return 0x4400 + case 628: { /* '628' */ + return 0x4400 } - case 742: - { /* '742' */ - return 0x46A0 + case 629: { /* '629' */ + return 0x4400 } - case 743: - { /* '743' */ - return 0x4400 + case 63: { /* '63' */ + return 0x4144 } - case 744: - { /* '744' */ - return 0x4400 + case 630: { /* '630' */ + return 0x4400 } - case 745: - { /* '745' */ - return 0x4400 + case 631: { /* '631' */ + return 0x4400 } - case 746: - { /* '746' */ - return 0x4400 + case 632: { /* '632' */ + return 0x4400 } - case 747: - { /* '747' */ - return 0x4400 + case 633: { /* '633' */ + return 0x4400 } - case 748: - { /* '748' */ - return 0x4326 + case 634: { /* '634' */ + return 0x4400 } - case 749: - { /* '749' */ - return 0x4400 + case 635: { /* '635' */ + return 0x4400 } - case 75: - { /* '75' */ - return 0x43FE + case 636: { /* '636' */ + return 0x4400 } - case 750: - { /* '750' */ - return 0x4400 + case 637: { /* '637' */ + return 0x0000 } - case 751: - { /* '751' */ - return 0x4100 + case 638: { /* '638' */ + return 0x0000 } - case 752: - { /* '752' */ - return 0x4200 + case 639: { /* '639' */ + return 0x4194 } - case 753: - { /* '753' */ - return 0x4400 + case 64: { /* '64' */ + return 0x4100 } - case 754: - { /* '754' */ - return 0x4400 + case 640: { /* '640' */ + return 0x4194 } - case 755: - { /* '755' */ - return 0x4400 + case 641: { /* '641' */ + return 0x4324 } - case 756: - { /* '756' */ - return 0x4400 + case 642: { /* '642' */ + return 0x4324 } - case 757: - { /* '757' */ - return 0x4200 + case 643: { /* '643' */ + return 0x4324 } - case 758: - { /* '758' */ - return 0x43FE + case 644: { /* '644' */ + return 0x4324 } - case 759: - { /* '759' */ - return 0x4400 + case 645: { /* '645' */ + return 0x4324 } - case 76: - { /* '76' */ - return 0x4400 + case 646: { /* '646' */ + return 0x4324 } - case 760: - { /* '760' */ - return 0x4400 + case 647: { /* '647' */ + return 0x4194 } - case 761: - { /* '761' */ - return 0x4400 + case 648: { /* '648' */ + return 0x4400 } - case 762: - { /* '762' */ - return 0x4400 + case 649: { /* '649' */ + return 0x4400 } - case 763: - { /* '763' */ - return 0x4400 + case 65: { /* '65' */ + return 0x4100 } - case 764: - { /* '764' */ - return 0x4400 + case 650: { /* '650' */ + return 0x4400 } - case 765: - { /* '765' */ - return 0x4400 + case 651: { /* '651' */ + return 0x4324 } - case 766: - { /* '766' */ - return 0x4400 + case 652: { /* '652' */ + return 0x4400 } - case 767: - { /* '767' */ - return 0x4400 + case 653: { /* '653' */ + return 0x4400 } - case 768: - { /* '768' */ - return 0x43FE + case 654: { /* '654' */ + return 0x4400 } - case 769: - { /* '769' */ - return 0x43FE + case 655: { /* '655' */ + return 0x4324 } - case 77: - { /* '77' */ - return 0x43FE + case 656: { /* '656' */ + return 0x4194 } - case 770: - { /* '770' */ - return 0x43FE + case 657: { /* '657' */ + return 0x4324 } - case 771: - { /* '771' */ - return 0x43FE + case 658: { /* '658' */ + return 0x4324 } - case 772: - { /* '772' */ - return 0x4400 + case 659: { /* '659' */ + return 0x42BC } - case 773: - { /* '773' */ - return 0x4400 + case 66: { /* '66' */ + return 0x4100 } - case 774: - { /* '774' */ - return 0x4400 + case 660: { /* '660' */ + return 0x42BC } - case 775: - { /* '775' */ - return 0x43FE + case 661: { /* '661' */ + return 0x43FC } - case 776: - { /* '776' */ - return 0x4400 + case 662: { /* '662' */ + return 0x4136 } - case 777: - { /* '777' */ - return 0x4400 + case 663: { /* '663' */ + return 0x4266 } - case 778: - { /* '778' */ - return 0x4400 + case 664: { /* '664' */ + return 0x437E } - case 779: - { /* '779' */ - return 0x4400 + case 665: { /* '665' */ + return 0x41DE } - case 78: - { /* '78' */ - return 0x43FE + case 666: { /* '666' */ + return 0x41DE } - case 780: - { /* '780' */ - return 0x4400 + case 667: { /* '667' */ + return 0x4276 } - case 781: - { /* '781' */ - return 0x4400 + case 668: { /* '668' */ + return 0x43A6 } - case 782: - { /* '782' */ - return 0x4400 + case 669: { /* '669' */ + return 0x4304 } - case 783: - { /* '783' */ - return 0x4400 + case 67: { /* '67' */ + return 0x43FC } - case 784: - { /* '784' */ - return 0x4400 + case 670: { /* '670' */ + return 0x437E } - case 785: - { /* '785' */ - return 0x4400 + case 671: { /* '671' */ + return 0x437E } - case 786: - { /* '786' */ - return 0x4400 + case 672: { /* '672' */ + return 0x4276 } - case 787: - { /* '787' */ - return 0x4400 + case 673: { /* '673' */ + return 0x437E } - case 788: - { /* '788' */ - return 0x4326 + case 674: { /* '674' */ + return 0x439A } - case 789: - { /* '789' */ - return 0x4326 + case 675: { /* '675' */ + return 0x43A6 } - case 79: - { /* '79' */ - return 0x43FE + case 676: { /* '676' */ + return 0x439A } - case 790: - { /* '790' */ - return 0x4400 + case 677: { /* '677' */ + return 0x439A } - case 791: - { /* '791' */ - return 0x4400 + case 678: { /* '678' */ + return 0x439A } - case 792: - { /* '792' */ - return 0x4400 + case 679: { /* '679' */ + return 0x439A } - case 793: - { /* '793' */ - return 0x4EE0 + case 68: { /* '68' */ + return 0x43C4 } - case 794: - { /* '794' */ - return 0x4400 + case 680: { /* '680' */ + return 0x439A } - case 795: - { /* '795' */ - return 0x4400 + case 681: { /* '681' */ + return 0x43A6 } - case 796: - { /* '796' */ - return 0x4400 + case 682: { /* '682' */ + return 0x4136 } - case 797: - { /* '797' */ - return 0x4400 + case 683: { /* '683' */ + return 0x4136 } - case 798: - { /* '798' */ - return 0x4400 + case 684: { /* '684' */ + return 0x4324 } - case 799: - { /* '799' */ - return 0x4400 + case 685: { /* '685' */ + return 0x43FC } - case 8: - { /* '8' */ - return 0x43FE + case 686: { /* '686' */ + return 0x43FC } - case 80: - { /* '80' */ - return 0x43FE + case 687: { /* '687' */ + return 0x4400 } - case 800: - { /* '800' */ - return 0x4400 + case 688: { /* '688' */ + return 0x4400 } - case 801: - { /* '801' */ - return 0x4400 + case 689: { /* '689' */ + return 0x4314 } - case 802: - { /* '802' */ - return 0x4400 + case 69: { /* '69' */ + return 0x42E8 } - case 803: - { /* '803' */ - return 0x4400 + case 690: { /* '690' */ + return 0x41CC } - case 804: - { /* '804' */ - return 0x43FE + case 691: { /* '691' */ + return 0x43FC } - case 805: - { /* '805' */ - return 0x43FE + case 692: { /* '692' */ + return 0x43FC } - case 806: - { /* '806' */ - return 0x4194 + case 693: { /* '693' */ + return 0x43FC } - case 807: - { /* '807' */ - return 0x43FE + case 694: { /* '694' */ + return 0x43FC } - case 808: - { /* '808' */ - return 0x43FE + case 695: { /* '695' */ + return 0x43FC } - case 809: - { /* '809' */ - return 0x43FE + case 696: { /* '696' */ + return 0x431C } - case 81: - { /* '81' */ - return 0x43FE + case 697: { /* '697' */ + return 0x4238 } - case 810: - { /* '810' */ - return 0x43FE + case 698: { /* '698' */ + return 0x4238 } - case 811: - { /* '811' */ - return 0x4400 + case 699: { /* '699' */ + return 0x41CC } - case 812: - { /* '812' */ - return 0x43FC + case 7: { /* '7' */ + return 0x43FE } - case 813: - { /* '813' */ - return 0x43FC + case 70: { /* '70' */ + return 0x4760 } - case 814: - { /* '814' */ - return 0x4338 + case 700: { /* '700' */ + return 0x41D8 } - case 815: - { /* '815' */ - return 0x4338 + case 701: { /* '701' */ + return 0x43FC } - case 816: - { /* '816' */ - return 0x43FC + case 702: { /* '702' */ + return 0x43FC } - case 817: - { /* '817' */ - return 0x42E0 + case 703: { /* '703' */ + return 0x43FC } - case 818: - { /* '818' */ - return 0x42E0 + case 704: { /* '704' */ + return 0x43FC } - case 819: - { /* '819' */ - return 0x42E0 + case 705: { /* '705' */ + return 0x43FC } - case 82: - { /* '82' */ - return 0x43FE + case 706: { /* '706' */ + return 0x4244 } - case 820: - { /* '820' */ - return 0x42E0 + case 707: { /* '707' */ + return 0x4244 } - case 821: - { /* '821' */ - return 0x43FC + case 708: { /* '708' */ + return 0x43FC } - case 822: - { /* '822' */ - return 0x42E0 + case 709: { /* '709' */ + return 0x4244 } - case 823: - { /* '823' */ - return 0x42E0 + case 71: { /* '71' */ + return 0x4400 } - case 824: - { /* '824' */ - return 0x43FC + case 710: { /* '710' */ + return 0x43FC } - case 825: - { /* '825' */ - return 0x42A0 + case 711: { /* '711' */ + return 0x43FC } - case 826: - { /* '826' */ - return 0x42A0 + case 712: { /* '712' */ + return 0x43FC } - case 827: - { /* '827' */ - return 0x42A0 + case 713: { /* '713' */ + return 0x4404 } - case 828: - { /* '828' */ - return 0x42A0 + case 714: { /* '714' */ + return 0x4404 } - case 829: - { /* '829' */ - return 0x42A0 + case 715: { /* '715' */ + return 0x4404 } - case 83: - { /* '83' */ - return 0x43FE + case 716: { /* '716' */ + return 0x43FC } - case 830: - { /* '830' */ - return 0x42A0 + case 717: { /* '717' */ + return 0x43FC } - case 831: - { /* '831' */ - return 0x42A0 + case 718: { /* '718' */ + return 0x4054 } - case 832: - { /* '832' */ - return 0x42A0 + case 719: { /* '719' */ + return 0x4400 } - case 833: - { /* '833' */ - return 0x42E0 + case 72: { /* '72' */ + return 0x40CC } - case 834: - { /* '834' */ - return 0x42E0 + case 720: { /* '720' */ + return 0x402C } - case 835: - { /* '835' */ - return 0x43FC + case 721: { /* '721' */ + return 0x402C } - case 836: - { /* '836' */ - return 0x42E0 + case 722: { /* '722' */ + return 0x43EC } - case 837: - { /* '837' */ - return 0x42E0 + case 723: { /* '723' */ + return 0x43EC } - case 838: - { /* '838' */ - return 0x43FC + case 724: { /* '724' */ + return 0x4400 } - case 839: - { /* '839' */ - return 0x43FC + case 725: { /* '725' */ + return 0x4400 } - case 84: - { /* '84' */ - return 0x43FE + case 726: { /* '726' */ + return 0x45E0 } - case 840: - { /* '840' */ - return 0x43FC + case 727: { /* '727' */ + return 0x4402 } - case 841: - { /* '841' */ - return 0x43FC + case 728: { /* '728' */ + return 0x43F2 } - case 842: - { /* '842' */ - return 0x43FC + case 729: { /* '729' */ + return 0x4400 } - case 843: - { /* '843' */ - return 0x43FC + case 73: { /* '73' */ + return 0x4324 } - case 844: - { /* '844' */ - return 0x42E0 + case 730: { /* '730' */ + return 0x4400 } - case 845: - { /* '845' */ - return 0x42E0 + case 731: { /* '731' */ + return 0x4400 } - case 846: - { /* '846' */ - return 0x43FC + case 732: { /* '732' */ + return 0x43FE } - case 847: - { /* '847' */ - return 0x43FC + case 733: { /* '733' */ + return 0x4400 } - case 848: - { /* '848' */ - return 0x42A0 + case 734: { /* '734' */ + return 0x4400 } - case 849: - { /* '849' */ - return 0x42A0 + case 735: { /* '735' */ + return 0x4400 } - case 85: - { /* '85' */ - return 0x43FE + case 736: { /* '736' */ + return 0x4400 } - case 850: - { /* '850' */ - return 0x42A0 + case 737: { /* '737' */ + return 0x4400 } - case 851: - { /* '851' */ - return 0x42A0 + case 738: { /* '738' */ + return 0x4400 } - case 852: - { /* '852' */ - return 0x42A0 + case 739: { /* '739' */ + return 0x4400 } - case 853: - { /* '853' */ - return 0x42A0 + case 74: { /* '74' */ + return 0x41A8 } - case 854: - { /* '854' */ - return 0x43FC + case 740: { /* '740' */ + return 0x4400 } - case 855: - { /* '855' */ - return 0x43FC + case 741: { /* '741' */ + return 0x4400 } - case 856: - { /* '856' */ - return 0x4390 + case 742: { /* '742' */ + return 0x46A0 } - case 857: - { /* '857' */ - return 0x43FC + case 743: { /* '743' */ + return 0x4400 } - case 858: - { /* '858' */ - return 0x43FC + case 744: { /* '744' */ + return 0x4400 } - case 859: - { /* '859' */ - return 0x43FC + case 745: { /* '745' */ + return 0x4400 } - case 86: - { /* '86' */ - return 0x43FE + case 746: { /* '746' */ + return 0x4400 } - case 860: - { /* '860' */ - return 0x43F4 + case 747: { /* '747' */ + return 0x4400 } - case 861: - { /* '861' */ - return 0x43FC + case 748: { /* '748' */ + return 0x4326 } - case 862: - { /* '862' */ - return 0x43FC + case 749: { /* '749' */ + return 0x4400 } - case 863: - { /* '863' */ - return 0x43FC + case 75: { /* '75' */ + return 0x43FE } - case 864: - { /* '864' */ - return 0x43FC + case 750: { /* '750' */ + return 0x4400 } - case 865: - { /* '865' */ - return 0x4370 + case 751: { /* '751' */ + return 0x4100 } - case 866: - { /* '866' */ - return 0x4370 + case 752: { /* '752' */ + return 0x4200 } - case 867: - { /* '867' */ - return 0x4370 + case 753: { /* '753' */ + return 0x4400 } - case 868: - { /* '868' */ - return 0x439C + case 754: { /* '754' */ + return 0x4400 } - case 869: - { /* '869' */ - return 0x43FC + case 755: { /* '755' */ + return 0x4400 } - case 87: - { /* '87' */ - return 0x4400 + case 756: { /* '756' */ + return 0x4400 } - case 870: - { /* '870' */ - return 0x43FC + case 757: { /* '757' */ + return 0x4200 } - case 871: - { /* '871' */ - return 0x4324 + case 758: { /* '758' */ + return 0x43FE } - case 872: - { /* '872' */ - return 0x4374 + case 759: { /* '759' */ + return 0x4400 } - case 873: - { /* '873' */ - return 0x4374 + case 76: { /* '76' */ + return 0x4400 } - case 874: - { /* '874' */ - return 0x4274 + case 760: { /* '760' */ + return 0x4400 } - case 875: - { /* '875' */ - return 0x43FC + case 761: { /* '761' */ + return 0x4400 } - case 876: - { /* '876' */ - return 0x43FC + case 762: { /* '762' */ + return 0x4400 } - case 877: - { /* '877' */ - return 0x43FC + case 763: { /* '763' */ + return 0x4400 } - case 878: - { /* '878' */ - return 0x43FC + case 764: { /* '764' */ + return 0x4400 } - case 879: - { /* '879' */ - return 0x43FC + case 765: { /* '765' */ + return 0x4400 } - case 88: - { /* '88' */ - return 0x4400 + case 766: { /* '766' */ + return 0x4400 } - case 880: - { /* '880' */ - return 0x43FC + case 767: { /* '767' */ + return 0x4400 } - case 881: - { /* '881' */ - return 0x42A0 + case 768: { /* '768' */ + return 0x43FE } - case 882: - { /* '882' */ - return 0x43FC + case 769: { /* '769' */ + return 0x43FE } - case 883: - { /* '883' */ - return 0x42A0 + case 77: { /* '77' */ + return 0x43FE } - case 884: - { /* '884' */ - return 0x43FC + case 770: { /* '770' */ + return 0x43FE } - case 885: - { /* '885' */ - return 0x43FC + case 771: { /* '771' */ + return 0x43FE } - case 886: - { /* '886' */ - return 0x43FC + case 772: { /* '772' */ + return 0x4400 } - case 887: - { /* '887' */ - return 0x43FC + case 773: { /* '773' */ + return 0x4400 } - case 888: - { /* '888' */ - return 0x43FC + case 774: { /* '774' */ + return 0x4400 } - case 889: - { /* '889' */ - return 0x43FC + case 775: { /* '775' */ + return 0x43FE } - case 89: - { /* '89' */ - return 0x4400 + case 776: { /* '776' */ + return 0x4400 } - case 890: - { /* '890' */ - return 0x43FC + case 777: { /* '777' */ + return 0x4400 } - case 891: - { /* '891' */ - return 0x43FC + case 778: { /* '778' */ + return 0x4400 } - case 892: - { /* '892' */ - return 0x43FC + case 779: { /* '779' */ + return 0x4400 } - case 893: - { /* '893' */ - return 0x43FC + case 78: { /* '78' */ + return 0x43FE } - case 894: - { /* '894' */ - return 0x43FC + case 780: { /* '780' */ + return 0x4400 } - case 895: - { /* '895' */ - return 0x43FC + case 781: { /* '781' */ + return 0x4400 } - case 896: - { /* '896' */ - return 0x43FC + case 782: { /* '782' */ + return 0x4400 } - case 897: - { /* '897' */ - return 0x43FC - } - case 898: - { /* '898' */ - return 0x43FC - } - case 899: - { /* '899' */ - return 0x43FC - } - case 9: - { /* '9' */ - return 0x43FE - } - case 90: - { /* '90' */ - return 0x4400 - } - case 900: - { /* '900' */ - return 0x43FC - } - case 901: - { /* '901' */ - return 0x43FC - } - case 902: - { /* '902' */ - return 0x43FC - } - case 903: - { /* '903' */ - return 0x43FC - } - case 904: - { /* '904' */ - return 0x43FC - } - case 905: - { /* '905' */ - return 0x43FC - } - case 906: - { /* '906' */ - return 0x43FC - } - case 907: - { /* '907' */ - return 0x43FC - } - case 908: - { /* '908' */ - return 0x43FC - } - case 909: - { /* '909' */ - return 0x43FC - } - case 91: - { /* '91' */ - return 0x4400 - } - case 910: - { /* '910' */ - return 0x43FC - } - case 911: - { /* '911' */ - return 0x43FC - } - case 912: - { /* '912' */ - return 0x43FC - } - case 913: - { /* '913' */ - return 0x43FC - } - case 914: - { /* '914' */ - return 0x43FC - } - case 915: - { /* '915' */ - return 0x43FC - } - case 916: - { /* '916' */ - return 0x43FC - } - case 917: - { /* '917' */ - return 0x43FE - } - case 918: - { /* '918' */ - return 0x43FE - } - case 919: - { /* '919' */ - return 0x43FE - } - case 92: - { /* '92' */ - return 0x4400 - } - case 920: - { /* '920' */ - return 0x43FE - } - case 921: - { /* '921' */ - return 0x43FE - } - case 922: - { /* '922' */ - return 0x4324 - } - case 923: - { /* '923' */ - return 0x43FE - } - case 924: - { /* '924' */ - return 0x43FE - } - case 925: - { /* '925' */ - return 0x43FC - } - case 926: - { /* '926' */ - return 0x43FC - } - case 927: - { /* '927' */ - return 0x43FC - } - case 928: - { /* '928' */ - return 0x43FC - } - case 929: - { /* '929' */ - return 0x43FC - } - case 93: - { /* '93' */ - return 0x4400 - } - case 930: - { /* '930' */ - return 0x4388 - } - case 931: - { /* '931' */ - return 0x4400 - } - case 932: - { /* '932' */ - return 0x43FC - } - case 933: - { /* '933' */ - return 0x4400 - } - case 934: - { /* '934' */ - return 0x43FC - } - case 935: - { /* '935' */ - return 0x43FC - } - case 936: - { /* '936' */ - return 0x43FC - } - case 937: - { /* '937' */ - return 0x43FC - } - case 938: - { /* '938' */ - return 0x43FC - } - case 939: - { /* '939' */ - return 0x43FC - } - case 94: - { /* '94' */ - return 0x4400 - } - case 940: - { /* '940' */ - return 0x43FC - } - case 941: - { /* '941' */ - return 0x43FC - } - case 942: - { /* '942' */ - return 0x43FC - } - case 943: - { /* '943' */ - return 0x43FC - } - case 944: - { /* '944' */ - return 0x43FC - } - case 945: - { /* '945' */ - return 0x43FC - } - case 946: - { /* '946' */ - return 0x43FC - } - case 947: - { /* '947' */ - return 0x43FC - } - case 948: - { /* '948' */ - return 0x43FC - } - case 949: - { /* '949' */ - return 0x43FC - } - case 95: - { /* '95' */ - return 0x4400 - } - case 950: - { /* '950' */ - return 0x43FC - } - case 951: - { /* '951' */ - return 0x43FC - } - case 952: - { /* '952' */ - return 0x43FC - } - case 953: - { /* '953' */ - return 0x43FC - } - case 954: - { /* '954' */ - return 0x43FC - } - case 955: - { /* '955' */ - return 0x43FC - } - case 956: - { /* '956' */ - return 0x43FC - } - case 957: - { /* '957' */ - return 0x43FC - } - case 958: - { /* '958' */ - return 0x43FC - } - case 959: - { /* '959' */ - return 0x43FC - } - case 96: - { /* '96' */ - return 0x4400 - } - case 960: - { /* '960' */ - return 0x43FC - } - case 961: - { /* '961' */ - return 0x43FC - } - case 962: - { /* '962' */ - return 0x43FC - } - case 963: - { /* '963' */ - return 0x43FC - } - case 964: - { /* '964' */ - return 0x43FC - } - case 965: - { /* '965' */ - return 0x43FC - } - case 966: - { /* '966' */ - return 0x4400 - } - case 967: - { /* '967' */ - return 0x43FE - } - case 968: - { /* '968' */ - return 0x43FE - } - case 969: - { /* '969' */ - return 0x43FE - } - case 97: - { /* '97' */ - return 0x4400 - } - case 970: - { /* '970' */ - return 0x43FE - } - case 971: - { /* '971' */ - return 0x43FE - } - case 972: - { /* '972' */ - return 0x43FE - } - case 973: - { /* '973' */ - return 0x43FE - } - case 974: - { /* '974' */ - return 0x43FE - } - case 975: - { /* '975' */ - return 0x43FE - } - case 976: - { /* '976' */ - return 0x43FE - } - case 977: - { /* '977' */ - return 0x43FE - } - case 978: - { /* '978' */ - return 0x43FE - } - case 979: - { /* '979' */ - return 0x43FE - } - case 98: - { /* '98' */ - return 0x4400 - } - case 980: - { /* '980' */ - return 0x43FE - } - case 981: - { /* '981' */ - return 0x43FE - } - case 982: - { /* '982' */ - return 0x43FE - } - case 983: - { /* '983' */ - return 0x43FE - } - case 984: - { /* '984' */ - return 0x43FE - } - case 985: - { /* '985' */ - return 0x43FE - } - case 986: - { /* '986' */ - return 0x43FE - } - case 987: - { /* '987' */ - return 0x43FE - } - case 988: - { /* '988' */ - return 0x43FE - } - case 989: - { /* '989' */ - return 0x416C - } - case 99: - { /* '99' */ - return 0x4400 - } - case 990: - { /* '990' */ - return 0x416C - } - case 991: - { /* '991' */ - return 0x416C - } - case 992: - { /* '992' */ - return 0x4400 - } - case 993: - { /* '993' */ - return 0x43FF - } - case 994: - { /* '994' */ - return 0x4324 - } - case 995: - { /* '995' */ - return 0x43FC - } - case 996: - { /* '996' */ - return 0x43FC - } - case 997: - { /* '997' */ - return 0x43FC - } - case 998: - { /* '998' */ - return 0x43FC - } - case 999: - { /* '999' */ - return 0x43FC - } - default: - { - return 0 - } - } -} - -func ComObjectTableAddressesFirstEnumForFieldComObjectTableAddress(value uint16) (ComObjectTableAddresses, error) { - for _, sizeValue := range ComObjectTableAddressesValues { - if sizeValue.ComObjectTableAddress() == value { - return sizeValue, nil - } - } - return 0, errors.Errorf("enum for %v describing ComObjectTableAddress not found", value) -} -func ComObjectTableAddressesByValue(value uint16) (enum ComObjectTableAddresses, ok bool) { - switch value { - case 1: - return ComObjectTableAddresses_DEV0001914201, true - case 10: - return ComObjectTableAddresses_DEV0064181910, true - case 100: - return ComObjectTableAddresses_DEV007112221E, true - case 1000: - return ComObjectTableAddresses_DEV0019E30610, true - case 1001: - return ComObjectTableAddresses_DEV0019E30710, true - case 1002: - return ComObjectTableAddresses_DEV0019E30910, true - case 1003: - return ComObjectTableAddresses_DEV0019E30810, true - case 1004: - return ComObjectTableAddresses_DEV0019E25510, true - case 1005: - return ComObjectTableAddresses_DEV0019E20410, true - case 1006: - return ComObjectTableAddresses_DEV0019E20310, true - case 1007: - return ComObjectTableAddresses_DEV0019E25610, true - case 1008: - return ComObjectTableAddresses_DEV0019512010, true - case 1009: - return ComObjectTableAddresses_DEV0019520C10, true - case 101: - return ComObjectTableAddresses_DEV0071122229, true - case 1010: - return ComObjectTableAddresses_DEV0019520710, true - case 1011: - return ComObjectTableAddresses_DEV0019520210, true - case 1012: - return ComObjectTableAddresses_DEV0019E25010, true - case 1013: - return ComObjectTableAddresses_DEV0019E25110, true - case 1014: - return ComObjectTableAddresses_DEV0019130710, true - case 1015: - return ComObjectTableAddresses_DEV0019272050, true - case 1016: - return ComObjectTableAddresses_DEV0019520910, true - case 1017: - return ComObjectTableAddresses_DEV0019520A10, true - case 1018: - return ComObjectTableAddresses_DEV0019520B10, true - case 1019: - return ComObjectTableAddresses_DEV0019520412, true - case 102: - return ComObjectTableAddresses_DEV0071413314, true - case 1020: - return ComObjectTableAddresses_DEV0019520812, true - case 1021: - return ComObjectTableAddresses_DEV0019512510, true - case 1022: - return ComObjectTableAddresses_DEV0019512410, true - case 1023: - return ComObjectTableAddresses_DEV0019512610, true - case 1024: - return ComObjectTableAddresses_DEV0019511711, true - case 1025: - return ComObjectTableAddresses_DEV0019511811, true - case 1026: - return ComObjectTableAddresses_DEV0019522212, true - case 1027: - return ComObjectTableAddresses_DEV0019FF0716, true - case 1028: - return ComObjectTableAddresses_DEV0019FF1420, true - case 1029: - return ComObjectTableAddresses_DEV0019522112, true - case 103: - return ComObjectTableAddresses_DEV0072300110, true - case 1030: - return ComObjectTableAddresses_DEV0019522011, true - case 1031: - return ComObjectTableAddresses_DEV0019522311, true - case 1032: - return ComObjectTableAddresses_DEV0019E12410, true - case 1033: - return ComObjectTableAddresses_DEV0019000311, true - case 1034: - return ComObjectTableAddresses_DEV0019000411, true - case 1035: - return ComObjectTableAddresses_DEV0019070210, true - case 1036: - return ComObjectTableAddresses_DEV0019070E11, true - case 1037: - return ComObjectTableAddresses_DEV0019724010, true - case 1038: - return ComObjectTableAddresses_DEV0019520610, true - case 1039: - return ComObjectTableAddresses_DEV0019520510, true - case 104: - return ComObjectTableAddresses_DEV0076002101, true - case 1040: - return ComObjectTableAddresses_DEV0019E30B11, true - case 1041: - return ComObjectTableAddresses_DEV0019512710, true - case 1042: - return ComObjectTableAddresses_DEV0019512810, true - case 1043: - return ComObjectTableAddresses_DEV0019512910, true - case 1044: - return ComObjectTableAddresses_DEV0019E30D10, true - case 1045: - return ComObjectTableAddresses_DEV0019512313, true - case 1046: - return ComObjectTableAddresses_DEV0019512213, true - case 1047: - return ComObjectTableAddresses_DEV0019512112, true - case 1048: - return ComObjectTableAddresses_DEV0019512113, true - case 1049: - return ComObjectTableAddresses_DEV0019520D11, true - case 105: - return ComObjectTableAddresses_DEV0076002001, true - case 1050: - return ComObjectTableAddresses_DEV0019E30B12, true - case 1051: - return ComObjectTableAddresses_DEV0019530812, true - case 1052: - return ComObjectTableAddresses_DEV0019530912, true - case 1053: - return ComObjectTableAddresses_DEV0019530612, true - case 1054: - return ComObjectTableAddresses_DEV0019530711, true - case 1055: - return ComObjectTableAddresses_DEV0019494712, true - case 1056: - return ComObjectTableAddresses_DEV0019E30A11, true - case 1057: - return ComObjectTableAddresses_DEV00FB101111, true - case 1058: - return ComObjectTableAddresses_DEV00FB103001, true - case 1059: - return ComObjectTableAddresses_DEV00FB104401, true - case 106: - return ComObjectTableAddresses_DEV0076002A15, true - case 1060: - return ComObjectTableAddresses_DEV00FB124002, true - case 1061: - return ComObjectTableAddresses_DEV00FB104102, true - case 1062: - return ComObjectTableAddresses_DEV00FB104201, true - case 1063: - return ComObjectTableAddresses_DEV00FBF77603, true - case 1064: - return ComObjectTableAddresses_DEV00FB104301, true - case 1065: - return ComObjectTableAddresses_DEV00FB104601, true - case 1066: - return ComObjectTableAddresses_DEV00FB104701, true - case 1067: - return ComObjectTableAddresses_DEV00FB105101, true - case 1068: - return ComObjectTableAddresses_DEV00FC00C000, true - case 1069: - return ComObjectTableAddresses_DEV0103030110, true - case 107: - return ComObjectTableAddresses_DEV0076002815, true - case 1070: - return ComObjectTableAddresses_DEV0103010113, true - case 1071: - return ComObjectTableAddresses_DEV0103090110, true - case 1072: - return ComObjectTableAddresses_DEV0103020111, true - case 1073: - return ComObjectTableAddresses_DEV0103020112, true - case 1074: - return ComObjectTableAddresses_DEV0103040110, true - case 1075: - return ComObjectTableAddresses_DEV0103050111, true - case 1076: - return ComObjectTableAddresses_DEV0107000301, true - case 1077: - return ComObjectTableAddresses_DEV0107000101, true - case 1078: - return ComObjectTableAddresses_DEV0107000201, true - case 1079: - return ComObjectTableAddresses_DEV0107020801, true - case 108: - return ComObjectTableAddresses_DEV0076002215, true - case 1080: - return ComObjectTableAddresses_DEV0107020401, true - case 1081: - return ComObjectTableAddresses_DEV0107020001, true - case 1082: - return ComObjectTableAddresses_DEV010701F801, true - case 1083: - return ComObjectTableAddresses_DEV010701FC01, true - case 1084: - return ComObjectTableAddresses_DEV0107020C01, true - case 1085: - return ComObjectTableAddresses_DEV010F100801, true - case 1086: - return ComObjectTableAddresses_DEV010F100601, true - case 1087: - return ComObjectTableAddresses_DEV010F100401, true - case 1088: - return ComObjectTableAddresses_DEV010F030601, true - case 1089: - return ComObjectTableAddresses_DEV010F010301, true - case 109: - return ComObjectTableAddresses_DEV0076002B15, true - case 1090: - return ComObjectTableAddresses_DEV010F010101, true - case 1091: - return ComObjectTableAddresses_DEV010F010201, true - case 1092: - return ComObjectTableAddresses_DEV010F000302, true - case 1093: - return ComObjectTableAddresses_DEV010F000402, true - case 1094: - return ComObjectTableAddresses_DEV010F000102, true - case 1095: - return ComObjectTableAddresses_DEV011A4B5201, true - case 1096: - return ComObjectTableAddresses_DEV011EBB8211, true - case 1097: - return ComObjectTableAddresses_DEV011E108111, true - case 1098: - return ComObjectTableAddresses_DEV011EBC3011, true - case 1099: - return ComObjectTableAddresses_DEV011EBC2E11, true - case 11: - return ComObjectTableAddresses_DEV0064181810, true - case 110: - return ComObjectTableAddresses_DEV0076002715, true - case 1100: - return ComObjectTableAddresses_DEV011EBC2F11, true - case 1101: - return ComObjectTableAddresses_DEV0123010010, true - case 1102: - return ComObjectTableAddresses_DEV012B010110, true - case 1103: - return ComObjectTableAddresses_DEV001E478010, true - case 1104: - return ComObjectTableAddresses_DEV001E706611, true - case 1105: - return ComObjectTableAddresses_DEV001E706811, true - case 1106: - return ComObjectTableAddresses_DEV001E473012, true - case 1107: - return ComObjectTableAddresses_DEV001E20A011, true - case 1108: - return ComObjectTableAddresses_DEV001E209011, true - case 1109: - return ComObjectTableAddresses_DEV001E209811, true - case 111: - return ComObjectTableAddresses_DEV0076002315, true - case 1110: - return ComObjectTableAddresses_DEV001E208811, true - case 1111: - return ComObjectTableAddresses_DEV001E208011, true - case 1112: - return ComObjectTableAddresses_DEV001E207821, true - case 1113: - return ComObjectTableAddresses_DEV001E20CA12, true - case 1114: - return ComObjectTableAddresses_DEV001E20B312, true - case 1115: - return ComObjectTableAddresses_DEV001E20B012, true - case 1116: - return ComObjectTableAddresses_DEV001E302612, true - case 1117: - return ComObjectTableAddresses_DEV001E302312, true - case 1118: - return ComObjectTableAddresses_DEV001E302012, true - case 1119: - return ComObjectTableAddresses_DEV001E20A811, true - case 112: - return ComObjectTableAddresses_DEV0076002415, true - case 1120: - return ComObjectTableAddresses_DEV001E20C412, true - case 1121: - return ComObjectTableAddresses_DEV001E20C712, true - case 1122: - return ComObjectTableAddresses_DEV001E20AD12, true - case 1123: - return ComObjectTableAddresses_DEV001E443720, true - case 1124: - return ComObjectTableAddresses_DEV001E441821, true - case 1125: - return ComObjectTableAddresses_DEV001E443810, true - case 1126: - return ComObjectTableAddresses_DEV001E140C12, true - case 1127: - return ComObjectTableAddresses_DEV001E471611, true - case 1128: - return ComObjectTableAddresses_DEV001E479024, true - case 1129: - return ComObjectTableAddresses_DEV001E471A11, true - case 113: - return ComObjectTableAddresses_DEV0076002615, true - case 1130: - return ComObjectTableAddresses_DEV001E477A10, true - case 1131: - return ComObjectTableAddresses_DEV001E470A11, true - case 1132: - return ComObjectTableAddresses_DEV001E480B11, true - case 1133: - return ComObjectTableAddresses_DEV001E487B10, true - case 1134: - return ComObjectTableAddresses_DEV001E440411, true - case 1135: - return ComObjectTableAddresses_DEV001E447211, true - case 1136: - return ComObjectTableAddresses_DEV0142010011, true - case 1137: - return ComObjectTableAddresses_DEV0142010010, true - case 1138: - return ComObjectTableAddresses_DEV014F030112, true - case 1139: - return ComObjectTableAddresses_DEV014F030212, true - case 114: - return ComObjectTableAddresses_DEV0076002515, true - case 1140: - return ComObjectTableAddresses_DEV014F030312, true - case 1141: - return ComObjectTableAddresses_DEV0158100122, true - case 1142: - return ComObjectTableAddresses_DEV017A130401, true - case 1143: - return ComObjectTableAddresses_DEV017A130201, true - case 1144: - return ComObjectTableAddresses_DEV017A130801, true - case 1145: - return ComObjectTableAddresses_DEV017A130601, true - case 1146: - return ComObjectTableAddresses_DEV017A300102, true - case 1147: - return ComObjectTableAddresses_DEV000410A411, true - case 1148: - return ComObjectTableAddresses_DEV0004109911, true - case 1149: - return ComObjectTableAddresses_DEV0004109912, true - case 115: - return ComObjectTableAddresses_DEV0076000201, true - case 1150: - return ComObjectTableAddresses_DEV0004109913, true - case 1151: - return ComObjectTableAddresses_DEV0004109914, true - case 1152: - return ComObjectTableAddresses_DEV000410A211, true - case 1153: - return ComObjectTableAddresses_DEV000410FC12, true - case 1154: - return ComObjectTableAddresses_DEV000410FD12, true - case 1155: - return ComObjectTableAddresses_DEV000410B212, true - case 1156: - return ComObjectTableAddresses_DEV0004110B11, true - case 1157: - return ComObjectTableAddresses_DEV0004110711, true - case 1158: - return ComObjectTableAddresses_DEV000410B213, true - case 1159: - return ComObjectTableAddresses_DEV0004109811, true - case 116: - return ComObjectTableAddresses_DEV0076000101, true - case 1160: - return ComObjectTableAddresses_DEV0004109812, true - case 1161: - return ComObjectTableAddresses_DEV0004109813, true - case 1162: - return ComObjectTableAddresses_DEV0004109814, true - case 1163: - return ComObjectTableAddresses_DEV000410A011, true - case 1164: - return ComObjectTableAddresses_DEV000410A111, true - case 1165: - return ComObjectTableAddresses_DEV000410FA12, true - case 1166: - return ComObjectTableAddresses_DEV000410FB12, true - case 1167: - return ComObjectTableAddresses_DEV000410B112, true - case 1168: - return ComObjectTableAddresses_DEV0004110A11, true - case 1169: - return ComObjectTableAddresses_DEV0004110611, true - case 117: - return ComObjectTableAddresses_DEV0076000301, true - case 1170: - return ComObjectTableAddresses_DEV000410B113, true - case 1171: - return ComObjectTableAddresses_DEV0004109A11, true - case 1172: - return ComObjectTableAddresses_DEV0004109A12, true - case 1173: - return ComObjectTableAddresses_DEV0004109A13, true - case 1174: - return ComObjectTableAddresses_DEV0004109A14, true - case 1175: - return ComObjectTableAddresses_DEV000410A311, true - case 1176: - return ComObjectTableAddresses_DEV000410B312, true - case 1177: - return ComObjectTableAddresses_DEV0004110C11, true - case 1178: - return ComObjectTableAddresses_DEV0004110811, true - case 1179: - return ComObjectTableAddresses_DEV000410B313, true - case 118: - return ComObjectTableAddresses_DEV0076000401, true - case 1180: - return ComObjectTableAddresses_DEV0004109B11, true - case 1181: - return ComObjectTableAddresses_DEV0004109B12, true - case 1182: - return ComObjectTableAddresses_DEV0004109B13, true - case 1183: - return ComObjectTableAddresses_DEV0004109B14, true - case 1184: - return ComObjectTableAddresses_DEV000410A511, true - case 1185: - return ComObjectTableAddresses_DEV000410B412, true - case 1186: - return ComObjectTableAddresses_DEV0004110D11, true - case 1187: - return ComObjectTableAddresses_DEV0004110911, true - case 1188: - return ComObjectTableAddresses_DEV000410B413, true - case 1189: - return ComObjectTableAddresses_DEV0004109C11, true - case 119: - return ComObjectTableAddresses_DEV0076002903, true - case 1190: - return ComObjectTableAddresses_DEV0004109C12, true - case 1191: - return ComObjectTableAddresses_DEV0004109C13, true - case 1192: - return ComObjectTableAddresses_DEV0004109C14, true - case 1193: - return ComObjectTableAddresses_DEV000410A611, true - case 1194: - return ComObjectTableAddresses_DEV0004147211, true - case 1195: - return ComObjectTableAddresses_DEV000410FE12, true - case 1196: - return ComObjectTableAddresses_DEV0004209016, true - case 1197: - return ComObjectTableAddresses_DEV000420A011, true - case 1198: - return ComObjectTableAddresses_DEV0004209011, true - case 1199: - return ComObjectTableAddresses_DEV000420CA11, true - case 12: - return ComObjectTableAddresses_DEV0064181710, true - case 120: - return ComObjectTableAddresses_DEV0076002901, true - case 1200: - return ComObjectTableAddresses_DEV0004208012, true - case 1201: - return ComObjectTableAddresses_DEV0004207812, true - case 1202: - return ComObjectTableAddresses_DEV000420BA11, true - case 1203: - return ComObjectTableAddresses_DEV000420B311, true - case 1204: - return ComObjectTableAddresses_DEV0004209811, true - case 1205: - return ComObjectTableAddresses_DEV0004208811, true - case 1206: - return ComObjectTableAddresses_DEV0004B00812, true - case 1207: - return ComObjectTableAddresses_DEV0004302613, true - case 1208: - return ComObjectTableAddresses_DEV0004302313, true - case 1209: - return ComObjectTableAddresses_DEV0004302013, true - case 121: - return ComObjectTableAddresses_DEV007600E503, true - case 1210: - return ComObjectTableAddresses_DEV0004302B12, true - case 1211: - return ComObjectTableAddresses_DEV0004705D11, true - case 1212: - return ComObjectTableAddresses_DEV0004705C11, true - case 1213: - return ComObjectTableAddresses_DEV0004B00713, true - case 1214: - return ComObjectTableAddresses_DEV0004B00A01, true - case 1215: - return ComObjectTableAddresses_DEV0004706611, true - case 1216: - return ComObjectTableAddresses_DEV0004C01410, true - case 1217: - return ComObjectTableAddresses_DEV0004C00102, true - case 1218: - return ComObjectTableAddresses_DEV0004705E11, true - case 1219: - return ComObjectTableAddresses_DEV0004706211, true - case 122: - return ComObjectTableAddresses_DEV0076004002, true - case 1220: - return ComObjectTableAddresses_DEV0004706412, true - case 1221: - return ComObjectTableAddresses_DEV000420C011, true - case 1222: - return ComObjectTableAddresses_DEV000420B011, true - case 1223: - return ComObjectTableAddresses_DEV0004B00911, true - case 1224: - return ComObjectTableAddresses_DEV0004A01211, true - case 1225: - return ComObjectTableAddresses_DEV0004A01112, true - case 1226: - return ComObjectTableAddresses_DEV0004A01111, true - case 1227: - return ComObjectTableAddresses_DEV0004A01212, true - case 1228: - return ComObjectTableAddresses_DEV0004A03312, true - case 1229: - return ComObjectTableAddresses_DEV0004A03212, true - case 123: - return ComObjectTableAddresses_DEV0076004003, true - case 1230: - return ComObjectTableAddresses_DEV0004A01113, true - case 1231: - return ComObjectTableAddresses_DEV0004A01711, true - case 1232: - return ComObjectTableAddresses_DEV000420C711, true - case 1233: - return ComObjectTableAddresses_DEV000420BD11, true - case 1234: - return ComObjectTableAddresses_DEV000420C411, true - case 1235: - return ComObjectTableAddresses_DEV000420A812, true - case 1236: - return ComObjectTableAddresses_DEV000420CD11, true - case 1237: - return ComObjectTableAddresses_DEV000420AD11, true - case 1238: - return ComObjectTableAddresses_DEV000420B611, true - case 1239: - return ComObjectTableAddresses_DEV000420A811, true - case 124: - return ComObjectTableAddresses_DEV0076003402, true - case 1240: - return ComObjectTableAddresses_DEV0004501311, true - case 1241: - return ComObjectTableAddresses_DEV0004501411, true - case 1242: - return ComObjectTableAddresses_DEV0004B01002, true - case 1243: - return ComObjectTableAddresses_DEV0193323C11, true - case 1244: - return ComObjectTableAddresses_DEV0198101110, true - case 1245: - return ComObjectTableAddresses_DEV002C060210, true - case 1246: - return ComObjectTableAddresses_DEV002CA00213, true - case 1247: - return ComObjectTableAddresses_DEV002CA0A611, true - case 1248: - return ComObjectTableAddresses_DEV002CA0A616, true - case 1249: - return ComObjectTableAddresses_DEV002CA07B11, true - case 125: - return ComObjectTableAddresses_DEV0076003401, true - case 1250: - return ComObjectTableAddresses_DEV002C063210, true - case 1251: - return ComObjectTableAddresses_DEV002C063110, true - case 1252: - return ComObjectTableAddresses_DEV002C062E10, true - case 1253: - return ComObjectTableAddresses_DEV002C062C10, true - case 1254: - return ComObjectTableAddresses_DEV002C062D10, true - case 1255: - return ComObjectTableAddresses_DEV002C063310, true - case 1256: - return ComObjectTableAddresses_DEV002C05EB10, true - case 1257: - return ComObjectTableAddresses_DEV002C05F110, true - case 1258: - return ComObjectTableAddresses_DEV002C060E11, true - case 1259: - return ComObjectTableAddresses_DEV002C0B8830, true - case 126: - return ComObjectTableAddresses_DEV007600E908, true - case 1260: - return ComObjectTableAddresses_DEV002CA01811, true - case 1261: - return ComObjectTableAddresses_DEV002CA07033, true - case 1262: - return ComObjectTableAddresses_DEV002C555020, true - case 1263: - return ComObjectTableAddresses_DEV002C556421, true - case 1264: - return ComObjectTableAddresses_DEV002C05F211, true - case 1265: - return ComObjectTableAddresses_DEV002C05F411, true - case 1266: - return ComObjectTableAddresses_DEV002C05E613, true - case 1267: - return ComObjectTableAddresses_DEV002CA07914, true - case 1268: - return ComObjectTableAddresses_DEV002C060A13, true - case 1269: - return ComObjectTableAddresses_DEV002C3A0212, true - case 127: - return ComObjectTableAddresses_DEV007600E907, true - case 1270: - return ComObjectTableAddresses_DEV01C4030110, true - case 1271: - return ComObjectTableAddresses_DEV01C4030210, true - case 1272: - return ComObjectTableAddresses_DEV01C4021210, true - case 1273: - return ComObjectTableAddresses_DEV01C4001010, true - case 1274: - return ComObjectTableAddresses_DEV01C4020610, true - case 1275: - return ComObjectTableAddresses_DEV01C4020910, true - case 1276: - return ComObjectTableAddresses_DEV01C4020810, true - case 1277: - return ComObjectTableAddresses_DEV01C4010710, true - case 1278: - return ComObjectTableAddresses_DEV01C4050210, true - case 1279: - return ComObjectTableAddresses_DEV01C4010810, true - case 128: - return ComObjectTableAddresses_DEV000C181710, true - case 1280: - return ComObjectTableAddresses_DEV01C4020510, true - case 1281: - return ComObjectTableAddresses_DEV01C4040110, true - case 1282: - return ComObjectTableAddresses_DEV01C4040310, true - case 1283: - return ComObjectTableAddresses_DEV01C4040210, true - case 1284: - return ComObjectTableAddresses_DEV01C4101210, true - case 1285: - return ComObjectTableAddresses_DEV01C6093110, true - case 1286: - return ComObjectTableAddresses_DEV01C8003422, true - case 1287: - return ComObjectTableAddresses_DEV01DB000301, true - case 1288: - return ComObjectTableAddresses_DEV01DB000201, true - case 1289: - return ComObjectTableAddresses_DEV01DB000401, true - case 129: - return ComObjectTableAddresses_DEV000C130510, true - case 1290: - return ComObjectTableAddresses_DEV01DB000801, true - case 1291: - return ComObjectTableAddresses_DEV01DB001201, true - case 1292: - return ComObjectTableAddresses_DEV01F6E0E110, true - case 1293: - return ComObjectTableAddresses_DEV0006D00610, true - case 1294: - return ComObjectTableAddresses_DEV0006D01510, true - case 1295: - return ComObjectTableAddresses_DEV0006D00110, true - case 1296: - return ComObjectTableAddresses_DEV0006D00310, true - case 1297: - return ComObjectTableAddresses_DEV0006D03210, true - case 1298: - return ComObjectTableAddresses_DEV0006D03310, true - case 1299: - return ComObjectTableAddresses_DEV0006D02E20, true - case 13: - return ComObjectTableAddresses_DEV0064181610, true - case 130: - return ComObjectTableAddresses_DEV000C130610, true - case 1300: - return ComObjectTableAddresses_DEV0006D02F20, true - case 1301: - return ComObjectTableAddresses_DEV0006D03020, true - case 1302: - return ComObjectTableAddresses_DEV0006D03120, true - case 1303: - return ComObjectTableAddresses_DEV0006D02110, true - case 1304: - return ComObjectTableAddresses_DEV0006D00010, true - case 1305: - return ComObjectTableAddresses_DEV0006D01810, true - case 1306: - return ComObjectTableAddresses_DEV0006D00910, true - case 1307: - return ComObjectTableAddresses_DEV0006D01110, true - case 1308: - return ComObjectTableAddresses_DEV0006D03510, true - case 1309: - return ComObjectTableAddresses_DEV0006D03410, true - case 131: - return ComObjectTableAddresses_DEV000C133610, true - case 1310: - return ComObjectTableAddresses_DEV0006D02410, true - case 1311: - return ComObjectTableAddresses_DEV0006D02510, true - case 1312: - return ComObjectTableAddresses_DEV0006D00810, true - case 1313: - return ComObjectTableAddresses_DEV0006D00710, true - case 1314: - return ComObjectTableAddresses_DEV0006D01310, true - case 1315: - return ComObjectTableAddresses_DEV0006D01410, true - case 1316: - return ComObjectTableAddresses_DEV0006D00210, true - case 1317: - return ComObjectTableAddresses_DEV0006D00510, true - case 1318: - return ComObjectTableAddresses_DEV0006D00410, true - case 1319: - return ComObjectTableAddresses_DEV0006D02210, true - case 132: - return ComObjectTableAddresses_DEV000C133410, true - case 1320: - return ComObjectTableAddresses_DEV0006D02310, true - case 1321: - return ComObjectTableAddresses_DEV0006D01710, true - case 1322: - return ComObjectTableAddresses_DEV0006D01610, true - case 1323: - return ComObjectTableAddresses_DEV0006D01010, true - case 1324: - return ComObjectTableAddresses_DEV0006D01210, true - case 1325: - return ComObjectTableAddresses_DEV0006D04820, true - case 1326: - return ComObjectTableAddresses_DEV0006D04C11, true - case 1327: - return ComObjectTableAddresses_DEV0006D05610, true - case 1328: - return ComObjectTableAddresses_DEV0006D02910, true - case 1329: - return ComObjectTableAddresses_DEV0006D02A10, true - case 133: - return ComObjectTableAddresses_DEV000C133310, true - case 1330: - return ComObjectTableAddresses_DEV0006D02B10, true - case 1331: - return ComObjectTableAddresses_DEV0006D02C10, true - case 1332: - return ComObjectTableAddresses_DEV0006D02810, true - case 1333: - return ComObjectTableAddresses_DEV0006D02610, true - case 1334: - return ComObjectTableAddresses_DEV0006D02710, true - case 1335: - return ComObjectTableAddresses_DEV0006D03610, true - case 1336: - return ComObjectTableAddresses_DEV0006D03710, true - case 1337: - return ComObjectTableAddresses_DEV0006D02D11, true - case 1338: - return ComObjectTableAddresses_DEV0006D03C10, true - case 1339: - return ComObjectTableAddresses_DEV0006D03B10, true - case 134: - return ComObjectTableAddresses_DEV000C133611, true - case 1340: - return ComObjectTableAddresses_DEV0006D03910, true - case 1341: - return ComObjectTableAddresses_DEV0006D03A10, true - case 1342: - return ComObjectTableAddresses_DEV0006D03D11, true - case 1343: - return ComObjectTableAddresses_DEV0006D03E10, true - case 1344: - return ComObjectTableAddresses_DEV0006C00102, true - case 1345: - return ComObjectTableAddresses_DEV0006E05611, true - case 1346: - return ComObjectTableAddresses_DEV0006E05212, true - case 1347: - return ComObjectTableAddresses_DEV000620B011, true - case 1348: - return ComObjectTableAddresses_DEV000620B311, true - case 1349: - return ComObjectTableAddresses_DEV000620C011, true - case 135: - return ComObjectTableAddresses_DEV000C133510, true - case 1350: - return ComObjectTableAddresses_DEV000620BA11, true - case 1351: - return ComObjectTableAddresses_DEV0006705C11, true - case 1352: - return ComObjectTableAddresses_DEV0006705D11, true - case 1353: - return ComObjectTableAddresses_DEV0006E07710, true - case 1354: - return ComObjectTableAddresses_DEV0006E07712, true - case 1355: - return ComObjectTableAddresses_DEV0006706210, true - case 1356: - return ComObjectTableAddresses_DEV0006302611, true - case 1357: - return ComObjectTableAddresses_DEV0006302612, true - case 1358: - return ComObjectTableAddresses_DEV0006E00810, true - case 1359: - return ComObjectTableAddresses_DEV0006E01F01, true - case 136: - return ComObjectTableAddresses_DEV000C130710, true - case 1360: - return ComObjectTableAddresses_DEV0006302311, true - case 1361: - return ComObjectTableAddresses_DEV0006302312, true - case 1362: - return ComObjectTableAddresses_DEV0006E00910, true - case 1363: - return ComObjectTableAddresses_DEV0006E02001, true - case 1364: - return ComObjectTableAddresses_DEV0006302011, true - case 1365: - return ComObjectTableAddresses_DEV0006302012, true - case 1366: - return ComObjectTableAddresses_DEV0006C00C13, true - case 1367: - return ComObjectTableAddresses_DEV0006E00811, true - case 1368: - return ComObjectTableAddresses_DEV0006E00911, true - case 1369: - return ComObjectTableAddresses_DEV0006E01F20, true - case 137: - return ComObjectTableAddresses_DEV000C760210, true - case 1370: - return ComObjectTableAddresses_DEV0006E03410, true - case 1371: - return ComObjectTableAddresses_DEV0006E03110, true - case 1372: - return ComObjectTableAddresses_DEV0006E0A210, true - case 1373: - return ComObjectTableAddresses_DEV0006E0CE10, true - case 1374: - return ComObjectTableAddresses_DEV0006E0A111, true - case 1375: - return ComObjectTableAddresses_DEV0006E0CD11, true - case 1376: - return ComObjectTableAddresses_DEV0006E02020, true - case 1377: - return ComObjectTableAddresses_DEV0006E02D11, true - case 1378: - return ComObjectTableAddresses_DEV0006E03011, true - case 1379: - return ComObjectTableAddresses_DEV0006E0C110, true - case 138: - return ComObjectTableAddresses_DEV000C1BD610, true - case 1380: - return ComObjectTableAddresses_DEV0006E0C510, true - case 1381: - return ComObjectTableAddresses_DEV0006B00A01, true - case 1382: - return ComObjectTableAddresses_DEV0006B00602, true - case 1383: - return ComObjectTableAddresses_DEV0006E0C410, true - case 1384: - return ComObjectTableAddresses_DEV0006E0C312, true - case 1385: - return ComObjectTableAddresses_DEV0006E0C210, true - case 1386: - return ComObjectTableAddresses_DEV0006209016, true - case 1387: - return ComObjectTableAddresses_DEV0006E01A01, true - case 1388: - return ComObjectTableAddresses_DEV0006E09910, true - case 1389: - return ComObjectTableAddresses_DEV0006E03710, true - case 139: - return ComObjectTableAddresses_DEV000C181610, true - case 1390: - return ComObjectTableAddresses_DEV0006209011, true - case 1391: - return ComObjectTableAddresses_DEV000620A011, true - case 1392: - return ComObjectTableAddresses_DEV0006E02410, true - case 1393: - return ComObjectTableAddresses_DEV0006E02301, true - case 1394: - return ComObjectTableAddresses_DEV0006E02510, true - case 1395: - return ComObjectTableAddresses_DEV0006E01B01, true - case 1396: - return ComObjectTableAddresses_DEV0006E01C01, true - case 1397: - return ComObjectTableAddresses_DEV0006E01D01, true - case 1398: - return ComObjectTableAddresses_DEV0006E01E01, true - case 1399: - return ComObjectTableAddresses_DEV0006207812, true - case 14: - return ComObjectTableAddresses_DEV006420C011, true - case 140: - return ComObjectTableAddresses_DEV000C648B10, true - case 1400: - return ComObjectTableAddresses_DEV0006B00811, true - case 1401: - return ComObjectTableAddresses_DEV0006E01001, true - case 1402: - return ComObjectTableAddresses_DEV0006E03610, true - case 1403: - return ComObjectTableAddresses_DEV0006E09810, true - case 1404: - return ComObjectTableAddresses_DEV0006208811, true - case 1405: - return ComObjectTableAddresses_DEV0006209811, true - case 1406: - return ComObjectTableAddresses_DEV0006E02610, true - case 1407: - return ComObjectTableAddresses_DEV0006E02710, true - case 1408: - return ComObjectTableAddresses_DEV0006E02A10, true - case 1409: - return ComObjectTableAddresses_DEV0006E02B10, true - case 141: - return ComObjectTableAddresses_DEV000C480611, true - case 1410: - return ComObjectTableAddresses_DEV0006E00C10, true - case 1411: - return ComObjectTableAddresses_DEV0006010110, true - case 1412: - return ComObjectTableAddresses_DEV0006010210, true - case 1413: - return ComObjectTableAddresses_DEV0006E00B10, true - case 1414: - return ComObjectTableAddresses_DEV0006E09C10, true - case 1415: - return ComObjectTableAddresses_DEV0006E09B10, true - case 1416: - return ComObjectTableAddresses_DEV0006E03510, true - case 1417: - return ComObjectTableAddresses_DEV0006FF1B11, true - case 1418: - return ComObjectTableAddresses_DEV0006E0CF10, true - case 1419: - return ComObjectTableAddresses_DEV000620A812, true - case 142: - return ComObjectTableAddresses_DEV000C482011, true - case 1420: - return ComObjectTableAddresses_DEV000620CD11, true - case 1421: - return ComObjectTableAddresses_DEV0006E00E01, true - case 1422: - return ComObjectTableAddresses_DEV0006E02201, true - case 1423: - return ComObjectTableAddresses_DEV000620AD11, true - case 1424: - return ComObjectTableAddresses_DEV0006E00F01, true - case 1425: - return ComObjectTableAddresses_DEV0006E02101, true - case 1426: - return ComObjectTableAddresses_DEV000620BD11, true - case 1427: - return ComObjectTableAddresses_DEV0006E00D01, true - case 1428: - return ComObjectTableAddresses_DEV0006E03910, true - case 1429: - return ComObjectTableAddresses_DEV0006E02810, true - case 143: - return ComObjectTableAddresses_DEV000C724010, true - case 1430: - return ComObjectTableAddresses_DEV0006E02910, true - case 1431: - return ComObjectTableAddresses_DEV0006E02C10, true - case 1432: - return ComObjectTableAddresses_DEV0006C00403, true - case 1433: - return ComObjectTableAddresses_DEV0006590101, true - case 1434: - return ComObjectTableAddresses_DEV0006E0CC11, true - case 1435: - return ComObjectTableAddresses_DEV0006E09A10, true - case 1436: - return ComObjectTableAddresses_DEV0006E03811, true - case 1437: - return ComObjectTableAddresses_DEV0006E0C710, true - case 1438: - return ComObjectTableAddresses_DEV0006E0C610, true - case 1439: - return ComObjectTableAddresses_DEV0006E05A10, true - case 144: - return ComObjectTableAddresses_DEV000C570211, true - case 1440: - return ComObjectTableAddresses_DEV003D020109, true - case 1441: - return ComObjectTableAddresses_DEV026310BA10, true - case 1442: - return ComObjectTableAddresses_DEV026D010601, true - case 1443: - return ComObjectTableAddresses_DEV026D000402, true - case 1444: - return ComObjectTableAddresses_DEV026D000302, true - case 1445: - return ComObjectTableAddresses_DEV026D000102, true - case 1446: - return ComObjectTableAddresses_DEV026D030601, true - case 1447: - return ComObjectTableAddresses_DEV026D130401, true - case 1448: - return ComObjectTableAddresses_DEV026D130801, true - case 1449: - return ComObjectTableAddresses_DEV026D300102, true - case 145: - return ComObjectTableAddresses_DEV000C570310, true - case 1450: - return ComObjectTableAddresses_DEV026D613813, true - case 1451: - return ComObjectTableAddresses_DEV0007613810, true - case 1452: - return ComObjectTableAddresses_DEV000720C011, true - case 1453: - return ComObjectTableAddresses_DEV0007A05210, true - case 1454: - return ComObjectTableAddresses_DEV0007A08B10, true - case 1455: - return ComObjectTableAddresses_DEV0007A05B32, true - case 1456: - return ComObjectTableAddresses_DEV0007A06932, true - case 1457: - return ComObjectTableAddresses_DEV0007A06D32, true - case 1458: - return ComObjectTableAddresses_DEV0007A08032, true - case 1459: - return ComObjectTableAddresses_DEV0007A09532, true - case 146: - return ComObjectTableAddresses_DEV000C570411, true - case 1460: - return ComObjectTableAddresses_DEV0007A06C32, true - case 1461: - return ComObjectTableAddresses_DEV0007A05E32, true - case 1462: - return ComObjectTableAddresses_DEV0007A08A32, true - case 1463: - return ComObjectTableAddresses_DEV0007A07032, true - case 1464: - return ComObjectTableAddresses_DEV0007A08332, true - case 1465: - return ComObjectTableAddresses_DEV0007A09832, true - case 1466: - return ComObjectTableAddresses_DEV0007A05C32, true - case 1467: - return ComObjectTableAddresses_DEV0007A06A32, true - case 1468: - return ComObjectTableAddresses_DEV0007A08832, true - case 1469: - return ComObjectTableAddresses_DEV0007A06E32, true - case 147: - return ComObjectTableAddresses_DEV000C570110, true - case 1470: - return ComObjectTableAddresses_DEV0007A08132, true - case 1471: - return ComObjectTableAddresses_DEV0007A09632, true - case 1472: - return ComObjectTableAddresses_DEV0007A05D32, true - case 1473: - return ComObjectTableAddresses_DEV0007A06B32, true - case 1474: - return ComObjectTableAddresses_DEV0007A08932, true - case 1475: - return ComObjectTableAddresses_DEV0007A06F32, true - case 1476: - return ComObjectTableAddresses_DEV0007A08232, true - case 1477: - return ComObjectTableAddresses_DEV0007A09732, true - case 1478: - return ComObjectTableAddresses_DEV0007A05713, true - case 1479: - return ComObjectTableAddresses_DEV0007A01911, true - case 148: - return ComObjectTableAddresses_DEV000C570011, true - case 1480: - return ComObjectTableAddresses_DEV000720BD11, true - case 1481: - return ComObjectTableAddresses_DEV000720BA11, true - case 1482: - return ComObjectTableAddresses_DEV0007A03D11, true - case 1483: - return ComObjectTableAddresses_DEV0007FF1115, true - case 1484: - return ComObjectTableAddresses_DEV0007A01511, true - case 1485: - return ComObjectTableAddresses_DEV0007A08411, true - case 1486: - return ComObjectTableAddresses_DEV0007A08511, true - case 1487: - return ComObjectTableAddresses_DEV0007A03422, true - case 1488: - return ComObjectTableAddresses_DEV0007A07213, true - case 1489: - return ComObjectTableAddresses_DEV0007613812, true - case 149: - return ComObjectTableAddresses_DEV000C20BD11, true - case 1490: - return ComObjectTableAddresses_DEV0007A07420, true - case 1491: - return ComObjectTableAddresses_DEV0007A07520, true - case 1492: - return ComObjectTableAddresses_DEV0007A07B12, true - case 1493: - return ComObjectTableAddresses_DEV0007A07C12, true - case 1494: - return ComObjectTableAddresses_DEV0007A07114, true - case 1495: - return ComObjectTableAddresses_DEV0007A09311, true - case 1496: - return ComObjectTableAddresses_DEV0007A09A12, true - case 1497: - return ComObjectTableAddresses_DEV0007A09211, true - case 1498: - return ComObjectTableAddresses_DEV0007A09111, true - case 1499: - return ComObjectTableAddresses_DEV0007632010, true - case 15: - return ComObjectTableAddresses_DEV006420BA11, true - case 150: - return ComObjectTableAddresses_DEV000C20BA11, true - case 1500: - return ComObjectTableAddresses_DEV0007632020, true - case 1501: - return ComObjectTableAddresses_DEV0007632170, true - case 1502: - return ComObjectTableAddresses_DEV0007632040, true - case 1503: - return ComObjectTableAddresses_DEV0007A09013, true - case 1504: - return ComObjectTableAddresses_DEV0007A08F13, true - case 1505: - return ComObjectTableAddresses_DEV0007A01811, true - case 1506: - return ComObjectTableAddresses_DEV0007A05814, true - case 1507: - return ComObjectTableAddresses_DEV0007A04912, true - case 1508: - return ComObjectTableAddresses_DEV0007A04312, true - case 1509: - return ComObjectTableAddresses_DEV0007A04412, true - case 151: - return ComObjectTableAddresses_DEV000C760110, true - case 1510: - return ComObjectTableAddresses_DEV0007A04512, true - case 1511: - return ComObjectTableAddresses_DEV0007A07E10, true - case 1512: - return ComObjectTableAddresses_DEV0007A05510, true - case 1513: - return ComObjectTableAddresses_DEV0007A05910, true - case 1514: - return ComObjectTableAddresses_DEV0007A08711, true - case 1515: - return ComObjectTableAddresses_DEV0007A07914, true - case 1516: - return ComObjectTableAddresses_DEV0007A06114, true - case 1517: - return ComObjectTableAddresses_DEV0007A06714, true - case 1518: - return ComObjectTableAddresses_DEV0007A06214, true - case 1519: - return ComObjectTableAddresses_DEV0007A06514, true - case 152: - return ComObjectTableAddresses_DEV000C705C01, true - case 1520: - return ComObjectTableAddresses_DEV0007A07714, true - case 1521: - return ComObjectTableAddresses_DEV0007A06014, true - case 1522: - return ComObjectTableAddresses_DEV0007A06614, true - case 1523: - return ComObjectTableAddresses_DEV0007A07814, true - case 1524: - return ComObjectTableAddresses_DEV0007A06414, true - case 1525: - return ComObjectTableAddresses_DEV0007A04B10, true - case 1526: - return ComObjectTableAddresses_DEV0007A09B12, true - case 1527: - return ComObjectTableAddresses_DEV0007A04F13, true - case 1528: - return ComObjectTableAddresses_DEV0007A04D13, true - case 1529: - return ComObjectTableAddresses_DEV0007A04C13, true - case 153: - return ComObjectTableAddresses_DEV000CFF2112, true - case 1530: - return ComObjectTableAddresses_DEV0007A04E13, true - case 1531: - return ComObjectTableAddresses_DEV0007A00113, true - case 1532: - return ComObjectTableAddresses_DEV0007A00213, true - case 1533: - return ComObjectTableAddresses_DEV0007A03D12, true - case 1534: - return ComObjectTableAddresses_DEV0048493A1C, true - case 1535: - return ComObjectTableAddresses_DEV0048494712, true - case 1536: - return ComObjectTableAddresses_DEV0048494810, true - case 1537: - return ComObjectTableAddresses_DEV0048855A10, true - case 1538: - return ComObjectTableAddresses_DEV0048855B10, true - case 1539: - return ComObjectTableAddresses_DEV0048A05713, true - case 154: - return ComObjectTableAddresses_DEV000C242313, true - case 1540: - return ComObjectTableAddresses_DEV0048494414, true - case 1541: - return ComObjectTableAddresses_DEV0048824A11, true - case 1542: - return ComObjectTableAddresses_DEV0048824A12, true - case 1543: - return ComObjectTableAddresses_DEV0048770A10, true - case 1544: - return ComObjectTableAddresses_DEV0048494311, true - case 1545: - return ComObjectTableAddresses_DEV0048494513, true - case 1546: - return ComObjectTableAddresses_DEV0048494012, true - case 1547: - return ComObjectTableAddresses_DEV0048494111, true - case 1548: - return ComObjectTableAddresses_DEV0048494210, true - case 1549: - return ComObjectTableAddresses_DEV0048494610, true - case 155: - return ComObjectTableAddresses_DEV000CB00812, true - case 1550: - return ComObjectTableAddresses_DEV0048494910, true - case 1551: - return ComObjectTableAddresses_DEV0048134A10, true - case 1552: - return ComObjectTableAddresses_DEV0048107E12, true - case 1553: - return ComObjectTableAddresses_DEV0048FF2112, true - case 1554: - return ComObjectTableAddresses_DEV0048140A11, true - case 1555: - return ComObjectTableAddresses_DEV0048140B12, true - case 1556: - return ComObjectTableAddresses_DEV0048140C13, true - case 1557: - return ComObjectTableAddresses_DEV0048139A10, true - case 1558: - return ComObjectTableAddresses_DEV0048648B10, true - case 1559: - return ComObjectTableAddresses_DEV0048494013, true - case 156: - return ComObjectTableAddresses_DEV000CB00713, true - case 1560: - return ComObjectTableAddresses_DEV0048494018, true - case 1561: - return ComObjectTableAddresses_DEV004E070031, true - case 1562: - return ComObjectTableAddresses_DEV004E030031, true - case 1563: - return ComObjectTableAddresses_DEV0008A01111, true - case 1564: - return ComObjectTableAddresses_DEV0008A01211, true - case 1565: - return ComObjectTableAddresses_DEV0008A01212, true - case 1566: - return ComObjectTableAddresses_DEV0008A01112, true - case 1567: - return ComObjectTableAddresses_DEV0008A03213, true - case 1568: - return ComObjectTableAddresses_DEV0008A03218, true - case 1569: - return ComObjectTableAddresses_DEV0008A03313, true - case 157: - return ComObjectTableAddresses_DEV000C181910, true - case 1570: - return ComObjectTableAddresses_DEV0008A03318, true - case 1571: - return ComObjectTableAddresses_DEV0008A01113, true - case 1572: - return ComObjectTableAddresses_DEV0008A01711, true - case 1573: - return ComObjectTableAddresses_DEV0008B00911, true - case 1574: - return ComObjectTableAddresses_DEV0008C00102, true - case 1575: - return ComObjectTableAddresses_DEV0008C00101, true - case 1576: - return ComObjectTableAddresses_DEV0008901501, true - case 1577: - return ComObjectTableAddresses_DEV0008901310, true - case 1578: - return ComObjectTableAddresses_DEV000820B011, true - case 1579: - return ComObjectTableAddresses_DEV0008705C11, true - case 158: - return ComObjectTableAddresses_DEV000C181810, true - case 1580: - return ComObjectTableAddresses_DEV0008705D11, true - case 1581: - return ComObjectTableAddresses_DEV0008706211, true - case 1582: - return ComObjectTableAddresses_DEV000820BA11, true - case 1583: - return ComObjectTableAddresses_DEV000820C011, true - case 1584: - return ComObjectTableAddresses_DEV000820B311, true - case 1585: - return ComObjectTableAddresses_DEV0008301A11, true - case 1586: - return ComObjectTableAddresses_DEV0008C00C13, true - case 1587: - return ComObjectTableAddresses_DEV0008302611, true - case 1588: - return ComObjectTableAddresses_DEV0008302311, true - case 1589: - return ComObjectTableAddresses_DEV0008302011, true - case 159: - return ComObjectTableAddresses_DEV000C20C011, true - case 1590: - return ComObjectTableAddresses_DEV0008C00C11, true - case 1591: - return ComObjectTableAddresses_DEV0008302612, true - case 1592: - return ComObjectTableAddresses_DEV0008302312, true - case 1593: - return ComObjectTableAddresses_DEV0008302012, true - case 1594: - return ComObjectTableAddresses_DEV0008C00C15, true - case 1595: - return ComObjectTableAddresses_DEV0008C00C14, true - case 1596: - return ComObjectTableAddresses_DEV0008B00713, true - case 1597: - return ComObjectTableAddresses_DEV0008706611, true - case 1598: - return ComObjectTableAddresses_DEV0008706811, true - case 1599: - return ComObjectTableAddresses_DEV0008B00812, true - case 16: - return ComObjectTableAddresses_DEV0064182010, true - case 160: - return ComObjectTableAddresses_DEV0079002527, true - case 1600: - return ComObjectTableAddresses_DEV0008209016, true - case 1601: - return ComObjectTableAddresses_DEV0008209011, true - case 1602: - return ComObjectTableAddresses_DEV000820A011, true - case 1603: - return ComObjectTableAddresses_DEV0008208811, true - case 1604: - return ComObjectTableAddresses_DEV0008209811, true - case 1605: - return ComObjectTableAddresses_DEV000820CA11, true - case 1606: - return ComObjectTableAddresses_DEV0008208012, true - case 1607: - return ComObjectTableAddresses_DEV0008207812, true - case 1608: - return ComObjectTableAddresses_DEV0008207811, true - case 1609: - return ComObjectTableAddresses_DEV0008208011, true - case 161: - return ComObjectTableAddresses_DEV0079004027, true - case 1610: - return ComObjectTableAddresses_DEV000810D111, true - case 1611: - return ComObjectTableAddresses_DEV000810D511, true - case 1612: - return ComObjectTableAddresses_DEV000810FA12, true - case 1613: - return ComObjectTableAddresses_DEV000810FB12, true - case 1614: - return ComObjectTableAddresses_DEV000810F211, true - case 1615: - return ComObjectTableAddresses_DEV000810D211, true - case 1616: - return ComObjectTableAddresses_DEV000810E211, true - case 1617: - return ComObjectTableAddresses_DEV000810D611, true - case 1618: - return ComObjectTableAddresses_DEV000810F212, true - case 1619: - return ComObjectTableAddresses_DEV000810E212, true - case 162: - return ComObjectTableAddresses_DEV0079000223, true - case 1620: - return ComObjectTableAddresses_DEV000810FC13, true - case 1621: - return ComObjectTableAddresses_DEV000810FD13, true - case 1622: - return ComObjectTableAddresses_DEV000810F311, true - case 1623: - return ComObjectTableAddresses_DEV000810D311, true - case 1624: - return ComObjectTableAddresses_DEV000810D711, true - case 1625: - return ComObjectTableAddresses_DEV000810F312, true - case 1626: - return ComObjectTableAddresses_DEV000810D811, true - case 1627: - return ComObjectTableAddresses_DEV000810E511, true - case 1628: - return ComObjectTableAddresses_DEV000810E512, true - case 1629: - return ComObjectTableAddresses_DEV000810F611, true - case 163: - return ComObjectTableAddresses_DEV0079000123, true - case 1630: - return ComObjectTableAddresses_DEV000810D911, true - case 1631: - return ComObjectTableAddresses_DEV000810F612, true - case 1632: - return ComObjectTableAddresses_DEV000820A812, true - case 1633: - return ComObjectTableAddresses_DEV000820AD11, true - case 1634: - return ComObjectTableAddresses_DEV000820BD11, true - case 1635: - return ComObjectTableAddresses_DEV000820C711, true - case 1636: - return ComObjectTableAddresses_DEV000820CD11, true - case 1637: - return ComObjectTableAddresses_DEV000820C411, true - case 1638: - return ComObjectTableAddresses_DEV000820A811, true - case 1639: - return ComObjectTableAddresses_DEV0008501411, true - case 164: - return ComObjectTableAddresses_DEV0079001427, true - case 1640: - return ComObjectTableAddresses_DEV0008C01602, true - case 1641: - return ComObjectTableAddresses_DEV0008302613, true - case 1642: - return ComObjectTableAddresses_DEV0008302313, true - case 1643: - return ComObjectTableAddresses_DEV0008302013, true - case 1644: - return ComObjectTableAddresses_DEV0009E0ED10, true - case 1645: - return ComObjectTableAddresses_DEV0009207730, true - case 1646: - return ComObjectTableAddresses_DEV0009208F10, true - case 1647: - return ComObjectTableAddresses_DEV0009C00C13, true - case 1648: - return ComObjectTableAddresses_DEV0009209910, true - case 1649: - return ComObjectTableAddresses_DEV0009209A10, true - case 165: - return ComObjectTableAddresses_DEV0079003027, true - case 1650: - return ComObjectTableAddresses_DEV0009207930, true - case 1651: - return ComObjectTableAddresses_DEV0009201720, true - case 1652: - return ComObjectTableAddresses_DEV0009500D01, true - case 1653: - return ComObjectTableAddresses_DEV0009500E01, true - case 1654: - return ComObjectTableAddresses_DEV0009209911, true - case 1655: - return ComObjectTableAddresses_DEV0009209A11, true - case 1656: - return ComObjectTableAddresses_DEV0009C00C12, true - case 1657: - return ComObjectTableAddresses_DEV0009C00C11, true - case 1658: - return ComObjectTableAddresses_DEV0009500D20, true - case 1659: - return ComObjectTableAddresses_DEV0009500E20, true - case 166: - return ComObjectTableAddresses_DEV0079100C13, true - case 1660: - return ComObjectTableAddresses_DEV000920B910, true - case 1661: - return ComObjectTableAddresses_DEV0009E0CE10, true - case 1662: - return ComObjectTableAddresses_DEV0009E0A210, true - case 1663: - return ComObjectTableAddresses_DEV0009501410, true - case 1664: - return ComObjectTableAddresses_DEV0009207830, true - case 1665: - return ComObjectTableAddresses_DEV0009201620, true - case 1666: - return ComObjectTableAddresses_DEV0009E0A111, true - case 1667: - return ComObjectTableAddresses_DEV0009E0CD11, true - case 1668: - return ComObjectTableAddresses_DEV000920B811, true - case 1669: - return ComObjectTableAddresses_DEV000920B611, true - case 167: - return ComObjectTableAddresses_DEV0079101C11, true - case 1670: - return ComObjectTableAddresses_DEV0009207E10, true - case 1671: - return ComObjectTableAddresses_DEV0009207630, true - case 1672: - return ComObjectTableAddresses_DEV0009205910, true - case 1673: - return ComObjectTableAddresses_DEV0009500B01, true - case 1674: - return ComObjectTableAddresses_DEV000920AC10, true - case 1675: - return ComObjectTableAddresses_DEV0009207430, true - case 1676: - return ComObjectTableAddresses_DEV0009204521, true - case 1677: - return ComObjectTableAddresses_DEV0009500A01, true - case 1678: - return ComObjectTableAddresses_DEV0009500001, true - case 1679: - return ComObjectTableAddresses_DEV000920AB10, true - case 168: - return ComObjectTableAddresses_DEV0080707010, true - case 1680: - return ComObjectTableAddresses_DEV000920BF11, true - case 1681: - return ComObjectTableAddresses_DEV0009203510, true - case 1682: - return ComObjectTableAddresses_DEV0009207A30, true - case 1683: - return ComObjectTableAddresses_DEV0009500701, true - case 1684: - return ComObjectTableAddresses_DEV0009501710, true - case 1685: - return ComObjectTableAddresses_DEV000920B310, true - case 1686: - return ComObjectTableAddresses_DEV0009207530, true - case 1687: - return ComObjectTableAddresses_DEV0009203321, true - case 1688: - return ComObjectTableAddresses_DEV0009500C01, true - case 1689: - return ComObjectTableAddresses_DEV000920AD10, true - case 169: - return ComObjectTableAddresses_DEV0080706010, true - case 1690: - return ComObjectTableAddresses_DEV0009207230, true - case 1691: - return ComObjectTableAddresses_DEV0009500801, true - case 1692: - return ComObjectTableAddresses_DEV0009501810, true - case 1693: - return ComObjectTableAddresses_DEV000920B410, true - case 1694: - return ComObjectTableAddresses_DEV0009207330, true - case 1695: - return ComObjectTableAddresses_DEV0009204421, true - case 1696: - return ComObjectTableAddresses_DEV0009500901, true - case 1697: - return ComObjectTableAddresses_DEV000920AA10, true - case 1698: - return ComObjectTableAddresses_DEV0009209D01, true - case 1699: - return ComObjectTableAddresses_DEV000920B010, true - case 17: - return ComObjectTableAddresses_DEV0064182510, true - case 170: - return ComObjectTableAddresses_DEV0080706810, true - case 1700: - return ComObjectTableAddresses_DEV0009E0BE01, true - case 1701: - return ComObjectTableAddresses_DEV000920B110, true - case 1702: - return ComObjectTableAddresses_DEV0009E0BD01, true - case 1703: - return ComObjectTableAddresses_DEV0009D03F10, true - case 1704: - return ComObjectTableAddresses_DEV0009305F10, true - case 1705: - return ComObjectTableAddresses_DEV0009305610, true - case 1706: - return ComObjectTableAddresses_DEV0009D03E10, true - case 1707: - return ComObjectTableAddresses_DEV0009306010, true - case 1708: - return ComObjectTableAddresses_DEV0009306110, true - case 1709: - return ComObjectTableAddresses_DEV0009306310, true - case 171: - return ComObjectTableAddresses_DEV0080705010, true - case 1710: - return ComObjectTableAddresses_DEV0009D03B10, true - case 1711: - return ComObjectTableAddresses_DEV0009D03C10, true - case 1712: - return ComObjectTableAddresses_DEV0009D03910, true - case 1713: - return ComObjectTableAddresses_DEV0009D03A10, true - case 1714: - return ComObjectTableAddresses_DEV0009305411, true - case 1715: - return ComObjectTableAddresses_DEV0009D03D11, true - case 1716: - return ComObjectTableAddresses_DEV0009304B11, true - case 1717: - return ComObjectTableAddresses_DEV0009304C11, true - case 1718: - return ComObjectTableAddresses_DEV0009306220, true - case 1719: - return ComObjectTableAddresses_DEV0009302E10, true - case 172: - return ComObjectTableAddresses_DEV0080703013, true - case 1720: - return ComObjectTableAddresses_DEV0009302F10, true - case 1721: - return ComObjectTableAddresses_DEV0009303010, true - case 1722: - return ComObjectTableAddresses_DEV0009303110, true - case 1723: - return ComObjectTableAddresses_DEV0009306510, true - case 1724: - return ComObjectTableAddresses_DEV0009306610, true - case 1725: - return ComObjectTableAddresses_DEV0009306410, true - case 1726: - return ComObjectTableAddresses_DEV0009401110, true - case 1727: - return ComObjectTableAddresses_DEV0009400610, true - case 1728: - return ComObjectTableAddresses_DEV0009401510, true - case 1729: - return ComObjectTableAddresses_DEV0009402110, true - case 173: - return ComObjectTableAddresses_DEV0080704021, true - case 1730: - return ComObjectTableAddresses_DEV0009400110, true - case 1731: - return ComObjectTableAddresses_DEV0009400910, true - case 1732: - return ComObjectTableAddresses_DEV0009400010, true - case 1733: - return ComObjectTableAddresses_DEV0009401810, true - case 1734: - return ComObjectTableAddresses_DEV0009400310, true - case 1735: - return ComObjectTableAddresses_DEV0009301810, true - case 1736: - return ComObjectTableAddresses_DEV0009301910, true - case 1737: - return ComObjectTableAddresses_DEV0009301A10, true - case 1738: - return ComObjectTableAddresses_DEV0009401210, true - case 1739: - return ComObjectTableAddresses_DEV0009400810, true - case 174: - return ComObjectTableAddresses_DEV0080704022, true - case 1740: - return ComObjectTableAddresses_DEV0009400710, true - case 1741: - return ComObjectTableAddresses_DEV0009401310, true - case 1742: - return ComObjectTableAddresses_DEV0009401410, true - case 1743: - return ComObjectTableAddresses_DEV0009402210, true - case 1744: - return ComObjectTableAddresses_DEV0009402310, true - case 1745: - return ComObjectTableAddresses_DEV0009401710, true - case 1746: - return ComObjectTableAddresses_DEV0009401610, true - case 1747: - return ComObjectTableAddresses_DEV0009400210, true - case 1748: - return ComObjectTableAddresses_DEV0009401010, true - case 1749: - return ComObjectTableAddresses_DEV0009400510, true - case 175: - return ComObjectTableAddresses_DEV0080704020, true - case 1750: - return ComObjectTableAddresses_DEV0009400410, true - case 1751: - return ComObjectTableAddresses_DEV0009D04B20, true - case 1752: - return ComObjectTableAddresses_DEV0009D04920, true - case 1753: - return ComObjectTableAddresses_DEV0009D04A20, true - case 1754: - return ComObjectTableAddresses_DEV0009D04820, true - case 1755: - return ComObjectTableAddresses_DEV0009D04C11, true - case 1756: - return ComObjectTableAddresses_DEV0009D05610, true - case 1757: - return ComObjectTableAddresses_DEV0009305510, true - case 1758: - return ComObjectTableAddresses_DEV0009209810, true - case 1759: - return ComObjectTableAddresses_DEV0009202A10, true - case 176: - return ComObjectTableAddresses_DEV0080701111, true - case 1760: - return ComObjectTableAddresses_DEV0009209510, true - case 1761: - return ComObjectTableAddresses_DEV0009501110, true - case 1762: - return ComObjectTableAddresses_DEV0009209310, true - case 1763: - return ComObjectTableAddresses_DEV0009209410, true - case 1764: - return ComObjectTableAddresses_DEV0009209210, true - case 1765: - return ComObjectTableAddresses_DEV0009501210, true - case 1766: - return ComObjectTableAddresses_DEV0009205411, true - case 1767: - return ComObjectTableAddresses_DEV000920A111, true - case 1768: - return ComObjectTableAddresses_DEV000920A311, true - case 1769: - return ComObjectTableAddresses_DEV0009205112, true - case 177: - return ComObjectTableAddresses_DEV0080701811, true - case 1770: - return ComObjectTableAddresses_DEV0009204110, true - case 1771: - return ComObjectTableAddresses_DEV0009E07710, true - case 1772: - return ComObjectTableAddresses_DEV0009E07712, true - case 1773: - return ComObjectTableAddresses_DEV0009205212, true - case 1774: - return ComObjectTableAddresses_DEV0009205211, true - case 1775: - return ComObjectTableAddresses_DEV0009205311, true - case 1776: - return ComObjectTableAddresses_DEV0009206B10, true - case 1777: - return ComObjectTableAddresses_DEV0009208010, true - case 1778: - return ComObjectTableAddresses_DEV0009206A12, true - case 1779: - return ComObjectTableAddresses_DEV0009206810, true - case 178: - return ComObjectTableAddresses_DEV008020A110, true - case 1780: - return ComObjectTableAddresses_DEV0009208110, true - case 1781: - return ComObjectTableAddresses_DEV0009205511, true - case 1782: - return ComObjectTableAddresses_DEV0009209F01, true - case 1783: - return ComObjectTableAddresses_DEV0009208C10, true - case 1784: - return ComObjectTableAddresses_DEV0009208E10, true - case 1785: - return ComObjectTableAddresses_DEV000920B511, true - case 1786: - return ComObjectTableAddresses_DEV0009501910, true - case 1787: - return ComObjectTableAddresses_DEV000920BE11, true - case 1788: - return ComObjectTableAddresses_DEV0009209710, true - case 1789: - return ComObjectTableAddresses_DEV0009208510, true - case 179: - return ComObjectTableAddresses_DEV008020A210, true - case 1790: - return ComObjectTableAddresses_DEV0009208610, true - case 1791: - return ComObjectTableAddresses_DEV000920BD10, true - case 1792: - return ComObjectTableAddresses_DEV0009500210, true - case 1793: - return ComObjectTableAddresses_DEV0009500310, true - case 1794: - return ComObjectTableAddresses_DEV0009E0BF10, true - case 1795: - return ComObjectTableAddresses_DEV0009E0C010, true - case 1796: - return ComObjectTableAddresses_DEV0009500110, true - case 1797: - return ComObjectTableAddresses_DEV0009209B10, true - case 1798: - return ComObjectTableAddresses_DEV0009207D10, true - case 1799: - return ComObjectTableAddresses_DEV0009202F11, true - case 18: - return ComObjectTableAddresses_DEV0064182610, true - case 180: - return ComObjectTableAddresses_DEV008020A010, true - case 1800: - return ComObjectTableAddresses_DEV0009203011, true - case 1801: - return ComObjectTableAddresses_DEV0009207C10, true - case 1802: - return ComObjectTableAddresses_DEV0009207B10, true - case 1803: - return ComObjectTableAddresses_DEV0009208710, true - case 1804: - return ComObjectTableAddresses_DEV0009E06610, true - case 1805: - return ComObjectTableAddresses_DEV0009E06611, true - case 1806: - return ComObjectTableAddresses_DEV0009E06410, true - case 1807: - return ComObjectTableAddresses_DEV0009E06411, true - case 1808: - return ComObjectTableAddresses_DEV0009E06210, true - case 1809: - return ComObjectTableAddresses_DEV0009E0E910, true - case 181: - return ComObjectTableAddresses_DEV0080207212, true - case 1810: - return ComObjectTableAddresses_DEV0009E0EB10, true - case 1811: - return ComObjectTableAddresses_DEV000920BB10, true - case 1812: - return ComObjectTableAddresses_DEV0009FF1B11, true - case 1813: - return ComObjectTableAddresses_DEV0009E0CF10, true - case 1814: - return ComObjectTableAddresses_DEV0009206C30, true - case 1815: - return ComObjectTableAddresses_DEV0009206D30, true - case 1816: - return ComObjectTableAddresses_DEV0009206E30, true - case 1817: - return ComObjectTableAddresses_DEV0009206F30, true - case 1818: - return ComObjectTableAddresses_DEV0009207130, true - case 1819: - return ComObjectTableAddresses_DEV0009204720, true - case 182: - return ComObjectTableAddresses_DEV0080209111, true - case 1820: - return ComObjectTableAddresses_DEV0009204820, true - case 1821: - return ComObjectTableAddresses_DEV0009204920, true - case 1822: - return ComObjectTableAddresses_DEV0009204A20, true - case 1823: - return ComObjectTableAddresses_DEV0009205A10, true - case 1824: - return ComObjectTableAddresses_DEV0009207030, true - case 1825: - return ComObjectTableAddresses_DEV0009205B10, true - case 1826: - return ComObjectTableAddresses_DEV0009500501, true - case 1827: - return ComObjectTableAddresses_DEV0009501001, true - case 1828: - return ComObjectTableAddresses_DEV0009500601, true - case 1829: - return ComObjectTableAddresses_DEV0009500F01, true - case 183: - return ComObjectTableAddresses_DEV0080204310, true - case 1830: - return ComObjectTableAddresses_DEV0009500401, true - case 1831: - return ComObjectTableAddresses_DEV000920B210, true - case 1832: - return ComObjectTableAddresses_DEV000920AE10, true - case 1833: - return ComObjectTableAddresses_DEV000920BC10, true - case 1834: - return ComObjectTableAddresses_DEV000920AF10, true - case 1835: - return ComObjectTableAddresses_DEV0009207F10, true - case 1836: - return ComObjectTableAddresses_DEV0009208910, true - case 1837: - return ComObjectTableAddresses_DEV0009205710, true - case 1838: - return ComObjectTableAddresses_DEV0009205810, true - case 1839: - return ComObjectTableAddresses_DEV0009203810, true - case 184: - return ComObjectTableAddresses_DEV008020B612, true - case 1840: - return ComObjectTableAddresses_DEV0009203910, true - case 1841: - return ComObjectTableAddresses_DEV0009203E10, true - case 1842: - return ComObjectTableAddresses_DEV0009204B10, true - case 1843: - return ComObjectTableAddresses_DEV0009203F10, true - case 1844: - return ComObjectTableAddresses_DEV0009204C10, true - case 1845: - return ComObjectTableAddresses_DEV0009204010, true - case 1846: - return ComObjectTableAddresses_DEV0009206411, true - case 1847: - return ComObjectTableAddresses_DEV0009205E10, true - case 1848: - return ComObjectTableAddresses_DEV0009206711, true - case 1849: - return ComObjectTableAddresses_DEV000920A710, true - case 185: - return ComObjectTableAddresses_DEV008020B412, true - case 1850: - return ComObjectTableAddresses_DEV000920A610, true - case 1851: - return ComObjectTableAddresses_DEV0009203A10, true - case 1852: - return ComObjectTableAddresses_DEV0009203B10, true - case 1853: - return ComObjectTableAddresses_DEV0009203C10, true - case 1854: - return ComObjectTableAddresses_DEV0009203D10, true - case 1855: - return ComObjectTableAddresses_DEV0009E05E12, true - case 1856: - return ComObjectTableAddresses_DEV0009E0B711, true - case 1857: - return ComObjectTableAddresses_DEV0009E06A12, true - case 1858: - return ComObjectTableAddresses_DEV0009E06E12, true - case 1859: - return ComObjectTableAddresses_DEV0009E0B720, true - case 186: - return ComObjectTableAddresses_DEV008020B512, true - case 1860: - return ComObjectTableAddresses_DEV0009E0E611, true - case 1861: - return ComObjectTableAddresses_DEV0009E0B321, true - case 1862: - return ComObjectTableAddresses_DEV0009E0E512, true - case 1863: - return ComObjectTableAddresses_DEV0009204210, true - case 1864: - return ComObjectTableAddresses_DEV0009208210, true - case 1865: - return ComObjectTableAddresses_DEV0009E07211, true - case 1866: - return ComObjectTableAddresses_DEV0009E0CC11, true - case 1867: - return ComObjectTableAddresses_DEV0009110111, true - case 1868: - return ComObjectTableAddresses_DEV0009110211, true - case 1869: - return ComObjectTableAddresses_DEV000916B212, true - case 187: - return ComObjectTableAddresses_DEV0080208310, true - case 1870: - return ComObjectTableAddresses_DEV0009110212, true - case 1871: - return ComObjectTableAddresses_DEV0009110311, true - case 1872: - return ComObjectTableAddresses_DEV000916B312, true - case 1873: - return ComObjectTableAddresses_DEV0009110312, true - case 1874: - return ComObjectTableAddresses_DEV0009110411, true - case 1875: - return ComObjectTableAddresses_DEV0009110412, true - case 1876: - return ComObjectTableAddresses_DEV0009501615, true - case 188: - return ComObjectTableAddresses_DEV0080702111, true - case 189: - return ComObjectTableAddresses_DEV0080709010, true - case 19: - return ComObjectTableAddresses_DEV0064182910, true - case 190: - return ComObjectTableAddresses_DEV0081FE0111, true - case 191: - return ComObjectTableAddresses_DEV0081FF3131, true - case 192: - return ComObjectTableAddresses_DEV0081F01313, true - case 193: - return ComObjectTableAddresses_DEV0081FF1313, true - case 194: - return ComObjectTableAddresses_DEV0083003020, true - case 195: - return ComObjectTableAddresses_DEV0083003120, true - case 196: - return ComObjectTableAddresses_DEV0083003220, true - case 197: - return ComObjectTableAddresses_DEV0083002C16, true - case 198: - return ComObjectTableAddresses_DEV0083002E16, true - case 199: - return ComObjectTableAddresses_DEV0083002F16, true - case 2: - return ComObjectTableAddresses_DEV0001140C13, true - case 20: - return ComObjectTableAddresses_DEV0064130610, true - case 200: - return ComObjectTableAddresses_DEV0083012F16, true - case 201: - return ComObjectTableAddresses_DEV0083001D13, true - case 202: - return ComObjectTableAddresses_DEV0083001E13, true - case 203: - return ComObjectTableAddresses_DEV0083001B13, true - case 204: - return ComObjectTableAddresses_DEV0083001C13, true - case 205: - return ComObjectTableAddresses_DEV0083003C10, true - case 206: - return ComObjectTableAddresses_DEV0083001C20, true - case 207: - return ComObjectTableAddresses_DEV0083001B22, true - case 208: - return ComObjectTableAddresses_DEV0083001B32, true - case 209: - return ComObjectTableAddresses_DEV0083003B24, true - case 21: - return ComObjectTableAddresses_DEV0064130710, true - case 210: - return ComObjectTableAddresses_DEV0083003B32, true - case 211: - return ComObjectTableAddresses_DEV0083003B33, true - case 212: - return ComObjectTableAddresses_DEV0083003B34, true - case 213: - return ComObjectTableAddresses_DEV0083003B35, true - case 214: - return ComObjectTableAddresses_DEV0083003A24, true - case 215: - return ComObjectTableAddresses_DEV0083003A32, true - case 216: - return ComObjectTableAddresses_DEV0083003A33, true - case 217: - return ComObjectTableAddresses_DEV0083003A34, true - case 218: - return ComObjectTableAddresses_DEV0083003A35, true - case 219: - return ComObjectTableAddresses_DEV0083005824, true - case 22: - return ComObjectTableAddresses_DEV0064133510, true - case 220: - return ComObjectTableAddresses_DEV0083005834, true - case 221: - return ComObjectTableAddresses_DEV0083005835, true - case 222: - return ComObjectTableAddresses_DEV0083002337, true - case 223: - return ComObjectTableAddresses_DEV0083002351, true - case 224: - return ComObjectTableAddresses_DEV0083002352, true - case 225: - return ComObjectTableAddresses_DEV0083002353, true - case 226: - return ComObjectTableAddresses_DEV0083002354, true - case 227: - return ComObjectTableAddresses_DEV0083002838, true - case 228: - return ComObjectTableAddresses_DEV0083002850, true - case 229: - return ComObjectTableAddresses_DEV0083002852, true - case 23: - return ComObjectTableAddresses_DEV0064133310, true - case 230: - return ComObjectTableAddresses_DEV0083002853, true - case 231: - return ComObjectTableAddresses_DEV0083002854, true - case 232: - return ComObjectTableAddresses_DEV0083002855, true - case 233: - return ComObjectTableAddresses_DEV0083002938, true - case 234: - return ComObjectTableAddresses_DEV0083002950, true - case 235: - return ComObjectTableAddresses_DEV0083002952, true - case 236: - return ComObjectTableAddresses_DEV0083002953, true - case 237: - return ComObjectTableAddresses_DEV0083002954, true - case 238: - return ComObjectTableAddresses_DEV0083002955, true - case 239: - return ComObjectTableAddresses_DEV0083002A38, true - case 24: - return ComObjectTableAddresses_DEV0064133410, true - case 240: - return ComObjectTableAddresses_DEV0083002A50, true - case 241: - return ComObjectTableAddresses_DEV0083002A52, true - case 242: - return ComObjectTableAddresses_DEV0083002A53, true - case 243: - return ComObjectTableAddresses_DEV0083002A54, true - case 244: - return ComObjectTableAddresses_DEV0083002A55, true - case 245: - return ComObjectTableAddresses_DEV0083002B38, true - case 246: - return ComObjectTableAddresses_DEV0083002B50, true - case 247: - return ComObjectTableAddresses_DEV0083002B52, true - case 248: - return ComObjectTableAddresses_DEV0083002B53, true - case 249: - return ComObjectTableAddresses_DEV0083002B54, true - case 25: - return ComObjectTableAddresses_DEV0064133610, true - case 250: - return ComObjectTableAddresses_DEV0083002B55, true - case 251: - return ComObjectTableAddresses_DEV0083002339, true - case 252: - return ComObjectTableAddresses_DEV0083002355, true - case 253: - return ComObjectTableAddresses_DEV0083001321, true - case 254: - return ComObjectTableAddresses_DEV0083001332, true - case 255: - return ComObjectTableAddresses_DEV0083001421, true - case 256: - return ComObjectTableAddresses_DEV0083001521, true - case 257: - return ComObjectTableAddresses_DEV0083001621, true - case 258: - return ComObjectTableAddresses_DEV0083000921, true - case 259: - return ComObjectTableAddresses_DEV0083000932, true - case 26: - return ComObjectTableAddresses_DEV0064130510, true - case 260: - return ComObjectTableAddresses_DEV0083000A21, true - case 261: - return ComObjectTableAddresses_DEV0083000B21, true - case 262: - return ComObjectTableAddresses_DEV0083000C21, true - case 263: - return ComObjectTableAddresses_DEV0083000D21, true - case 264: - return ComObjectTableAddresses_DEV0083000821, true - case 265: - return ComObjectTableAddresses_DEV0083000E21, true - case 266: - return ComObjectTableAddresses_DEV0083001921, true - case 267: - return ComObjectTableAddresses_DEV0083001932, true - case 268: - return ComObjectTableAddresses_DEV0083001721, true - case 269: - return ComObjectTableAddresses_DEV0083001732, true - case 27: - return ComObjectTableAddresses_DEV0064480611, true - case 270: - return ComObjectTableAddresses_DEV0083001821, true - case 271: - return ComObjectTableAddresses_DEV0083001832, true - case 272: - return ComObjectTableAddresses_DEV0083001A20, true - case 273: - return ComObjectTableAddresses_DEV0083002320, true - case 274: - return ComObjectTableAddresses_DEV0083004024, true - case 275: - return ComObjectTableAddresses_DEV0083004032, true - case 276: - return ComObjectTableAddresses_DEV0083004033, true - case 277: - return ComObjectTableAddresses_DEV0083004034, true - case 278: - return ComObjectTableAddresses_DEV0083004035, true - case 279: - return ComObjectTableAddresses_DEV0083003D24, true - case 28: - return ComObjectTableAddresses_DEV0064482011, true - case 280: - return ComObjectTableAddresses_DEV0083003D32, true - case 281: - return ComObjectTableAddresses_DEV0083003D33, true - case 282: - return ComObjectTableAddresses_DEV0083003D34, true - case 283: - return ComObjectTableAddresses_DEV0083003E24, true - case 284: - return ComObjectTableAddresses_DEV0083003E32, true - case 285: - return ComObjectTableAddresses_DEV0083003E33, true - case 286: - return ComObjectTableAddresses_DEV0083003E34, true - case 287: - return ComObjectTableAddresses_DEV0083003F24, true - case 288: - return ComObjectTableAddresses_DEV0083003F32, true - case 289: - return ComObjectTableAddresses_DEV0083003F33, true - case 29: - return ComObjectTableAddresses_DEV0064182210, true - case 290: - return ComObjectTableAddresses_DEV0083003F34, true - case 291: - return ComObjectTableAddresses_DEV0083004025, true - case 292: - return ComObjectTableAddresses_DEV0083004036, true - case 293: - return ComObjectTableAddresses_DEV0083003D25, true - case 294: - return ComObjectTableAddresses_DEV0083003D36, true - case 295: - return ComObjectTableAddresses_DEV0083003E25, true - case 296: - return ComObjectTableAddresses_DEV0083003E36, true - case 297: - return ComObjectTableAddresses_DEV0083003F25, true - case 298: - return ComObjectTableAddresses_DEV0083003F36, true - case 299: - return ComObjectTableAddresses_DEV0083001112, true - case 3: - return ComObjectTableAddresses_DEV0001140B11, true - case 30: - return ComObjectTableAddresses_DEV0064182710, true - case 300: - return ComObjectTableAddresses_DEV0083001116, true - case 301: - return ComObjectTableAddresses_DEV0083001117, true - case 302: - return ComObjectTableAddresses_DEV0083001212, true - case 303: - return ComObjectTableAddresses_DEV0083001216, true - case 304: - return ComObjectTableAddresses_DEV0083001217, true - case 305: - return ComObjectTableAddresses_DEV0083005B12, true - case 306: - return ComObjectTableAddresses_DEV0083005B16, true - case 307: - return ComObjectTableAddresses_DEV0083005B17, true - case 308: - return ComObjectTableAddresses_DEV0083005A12, true - case 309: - return ComObjectTableAddresses_DEV0083005A16, true - case 31: - return ComObjectTableAddresses_DEV0064183010, true - case 310: - return ComObjectTableAddresses_DEV0083005A17, true - case 311: - return ComObjectTableAddresses_DEV0083008410, true - case 312: - return ComObjectTableAddresses_DEV0083008510, true - case 313: - return ComObjectTableAddresses_DEV0083008610, true - case 314: - return ComObjectTableAddresses_DEV0083008710, true - case 315: - return ComObjectTableAddresses_DEV0083002515, true - case 316: - return ComObjectTableAddresses_DEV0083002115, true - case 317: - return ComObjectTableAddresses_DEV0083002015, true - case 318: - return ComObjectTableAddresses_DEV0083002415, true - case 319: - return ComObjectTableAddresses_DEV0083002615, true - case 32: - return ComObjectTableAddresses_DEV0064B00812, true - case 320: - return ComObjectTableAddresses_DEV0083002215, true - case 321: - return ComObjectTableAddresses_DEV0083002715, true - case 322: - return ComObjectTableAddresses_DEV0083002315, true - case 323: - return ComObjectTableAddresses_DEV0083008B28, true - case 324: - return ComObjectTableAddresses_DEV0083008B32, true - case 325: - return ComObjectTableAddresses_DEV0083008B33, true - case 326: - return ComObjectTableAddresses_DEV0083008B34, true - case 327: - return ComObjectTableAddresses_DEV0083008B36, true - case 328: - return ComObjectTableAddresses_DEV0083008B37, true - case 329: - return ComObjectTableAddresses_DEV0083008B39, true - case 33: - return ComObjectTableAddresses_DEV0064B00A01, true - case 330: - return ComObjectTableAddresses_DEV0083008A28, true - case 331: - return ComObjectTableAddresses_DEV0083008A32, true - case 332: - return ComObjectTableAddresses_DEV0083008A33, true - case 333: - return ComObjectTableAddresses_DEV0083008A34, true - case 334: - return ComObjectTableAddresses_DEV0083008A36, true - case 335: - return ComObjectTableAddresses_DEV0083008A37, true - case 336: - return ComObjectTableAddresses_DEV0083008A39, true - case 337: - return ComObjectTableAddresses_DEV0083009013, true - case 338: - return ComObjectTableAddresses_DEV0083009016, true - case 339: - return ComObjectTableAddresses_DEV0083009017, true - case 34: - return ComObjectTableAddresses_DEV0064760110, true - case 340: - return ComObjectTableAddresses_DEV0083009018, true - case 341: - return ComObjectTableAddresses_DEV0083009213, true - case 342: - return ComObjectTableAddresses_DEV0083009216, true - case 343: - return ComObjectTableAddresses_DEV0083009217, true - case 344: - return ComObjectTableAddresses_DEV0083009218, true - case 345: - return ComObjectTableAddresses_DEV0083009113, true - case 346: - return ComObjectTableAddresses_DEV0083009116, true - case 347: - return ComObjectTableAddresses_DEV0083009117, true - case 348: - return ComObjectTableAddresses_DEV0083009118, true - case 349: - return ComObjectTableAddresses_DEV0083009313, true - case 35: - return ComObjectTableAddresses_DEV0064242313, true - case 350: - return ComObjectTableAddresses_DEV0083009316, true - case 351: - return ComObjectTableAddresses_DEV0083009317, true - case 352: - return ComObjectTableAddresses_DEV0083009318, true - case 353: - return ComObjectTableAddresses_DEV0083009413, true - case 354: - return ComObjectTableAddresses_DEV0083009416, true - case 355: - return ComObjectTableAddresses_DEV0083009417, true - case 356: - return ComObjectTableAddresses_DEV0083009418, true - case 357: - return ComObjectTableAddresses_DEV0083009513, true - case 358: - return ComObjectTableAddresses_DEV0083009516, true - case 359: - return ComObjectTableAddresses_DEV0083009517, true - case 36: - return ComObjectTableAddresses_DEV0064FF2111, true - case 360: - return ComObjectTableAddresses_DEV0083009518, true - case 361: - return ComObjectTableAddresses_DEV0083009613, true - case 362: - return ComObjectTableAddresses_DEV0083009616, true - case 363: - return ComObjectTableAddresses_DEV0083009617, true - case 364: - return ComObjectTableAddresses_DEV0083009618, true - case 365: - return ComObjectTableAddresses_DEV0083009713, true - case 366: - return ComObjectTableAddresses_DEV0083009716, true - case 367: - return ComObjectTableAddresses_DEV0083009717, true - case 368: - return ComObjectTableAddresses_DEV0083009718, true - case 369: - return ComObjectTableAddresses_DEV0083009A13, true - case 37: - return ComObjectTableAddresses_DEV0064FF2112, true - case 370: - return ComObjectTableAddresses_DEV0083009A18, true - case 371: - return ComObjectTableAddresses_DEV0083009B13, true - case 372: - return ComObjectTableAddresses_DEV0083009B18, true - case 373: - return ComObjectTableAddresses_DEV0083004B20, true - case 374: - return ComObjectTableAddresses_DEV0083004B00, true - case 375: - return ComObjectTableAddresses_DEV0083005514, true - case 376: - return ComObjectTableAddresses_DEV0083006824, true - case 377: - return ComObjectTableAddresses_DEV0083006734, true - case 378: - return ComObjectTableAddresses_DEV0083006748, true - case 379: - return ComObjectTableAddresses_DEV0083006749, true - case 38: - return ComObjectTableAddresses_DEV0064648B10, true - case 380: - return ComObjectTableAddresses_DEV0083006750, true - case 381: - return ComObjectTableAddresses_DEV0083006751, true - case 382: - return ComObjectTableAddresses_DEV0083006434, true - case 383: - return ComObjectTableAddresses_DEV0083006448, true - case 384: - return ComObjectTableAddresses_DEV0083006449, true - case 385: - return ComObjectTableAddresses_DEV0083006450, true - case 386: - return ComObjectTableAddresses_DEV0083006451, true - case 387: - return ComObjectTableAddresses_DEV0083006634, true - case 388: - return ComObjectTableAddresses_DEV0083006648, true - case 389: - return ComObjectTableAddresses_DEV0083006649, true - case 39: - return ComObjectTableAddresses_DEV0064724010, true - case 390: - return ComObjectTableAddresses_DEV0083006650, true - case 391: - return ComObjectTableAddresses_DEV0083006651, true - case 392: - return ComObjectTableAddresses_DEV0083006534, true - case 393: - return ComObjectTableAddresses_DEV0083006548, true - case 394: - return ComObjectTableAddresses_DEV0083006549, true - case 395: - return ComObjectTableAddresses_DEV0083006550, true - case 396: - return ComObjectTableAddresses_DEV0083006551, true - case 397: - return ComObjectTableAddresses_DEV0083006A34, true - case 398: - return ComObjectTableAddresses_DEV0083006A48, true - case 399: - return ComObjectTableAddresses_DEV0083006A49, true - case 4: - return ComObjectTableAddresses_DEV0001803002, true - case 40: - return ComObjectTableAddresses_DEV006420BD11, true - case 400: - return ComObjectTableAddresses_DEV0083006A50, true - case 401: - return ComObjectTableAddresses_DEV0083006A51, true - case 402: - return ComObjectTableAddresses_DEV0083006B34, true - case 403: - return ComObjectTableAddresses_DEV0083006B48, true - case 404: - return ComObjectTableAddresses_DEV0083006B49, true - case 405: - return ComObjectTableAddresses_DEV0083006B50, true - case 406: - return ComObjectTableAddresses_DEV0083006B51, true - case 407: - return ComObjectTableAddresses_DEV0083006934, true - case 408: - return ComObjectTableAddresses_DEV0083006948, true - case 409: - return ComObjectTableAddresses_DEV0083006949, true - case 41: - return ComObjectTableAddresses_DEV0064570011, true - case 410: - return ComObjectTableAddresses_DEV0083006950, true - case 411: - return ComObjectTableAddresses_DEV0083006951, true - case 412: - return ComObjectTableAddresses_DEV0083004F11, true - case 413: - return ComObjectTableAddresses_DEV0083004D13, true - case 414: - return ComObjectTableAddresses_DEV0083004414, true - case 415: - return ComObjectTableAddresses_DEV0083004114, true - case 416: - return ComObjectTableAddresses_DEV0083004514, true - case 417: - return ComObjectTableAddresses_DEV0083004213, true - case 418: - return ComObjectTableAddresses_DEV0083004313, true - case 419: - return ComObjectTableAddresses_DEV0083004C11, true - case 42: - return ComObjectTableAddresses_DEV0064570310, true - case 420: - return ComObjectTableAddresses_DEV0083004913, true - case 421: - return ComObjectTableAddresses_DEV0083004A13, true - case 422: - return ComObjectTableAddresses_DEV0083004712, true - case 423: - return ComObjectTableAddresses_DEV0083004610, true - case 424: - return ComObjectTableAddresses_DEV0083008E12, true - case 425: - return ComObjectTableAddresses_DEV0083004813, true - case 426: - return ComObjectTableAddresses_DEV0083005611, true - case 427: - return ComObjectTableAddresses_DEV0083005710, true - case 428: - return ComObjectTableAddresses_DEV0083005010, true - case 429: - return ComObjectTableAddresses_DEV0083001A10, true - case 43: - return ComObjectTableAddresses_DEV0064570211, true - case 430: - return ComObjectTableAddresses_DEV0083002918, true - case 431: - return ComObjectTableAddresses_DEV0083002818, true - case 432: - return ComObjectTableAddresses_DEV0083006724, true - case 433: - return ComObjectTableAddresses_DEV0083006D42, true - case 434: - return ComObjectTableAddresses_DEV0083006D64, true - case 435: - return ComObjectTableAddresses_DEV0083006D65, true - case 436: - return ComObjectTableAddresses_DEV0083006E42, true - case 437: - return ComObjectTableAddresses_DEV0083006E64, true - case 438: - return ComObjectTableAddresses_DEV0083006D44, true - case 439: - return ComObjectTableAddresses_DEV0083006D66, true - case 44: - return ComObjectTableAddresses_DEV0064570411, true - case 440: - return ComObjectTableAddresses_DEV0083006D67, true - case 441: - return ComObjectTableAddresses_DEV0083006E44, true - case 442: - return ComObjectTableAddresses_DEV0083006E65, true - case 443: - return ComObjectTableAddresses_DEV0083006E66, true - case 444: - return ComObjectTableAddresses_DEV0083006E67, true - case 445: - return ComObjectTableAddresses_DEV0083007342, true - case 446: - return ComObjectTableAddresses_DEV0083007242, true - case 447: - return ComObjectTableAddresses_DEV0083006C42, true - case 448: - return ComObjectTableAddresses_DEV0083006C64, true - case 449: - return ComObjectTableAddresses_DEV0083006C65, true - case 45: - return ComObjectTableAddresses_DEV0064570110, true - case 450: - return ComObjectTableAddresses_DEV0083007542, true - case 451: - return ComObjectTableAddresses_DEV0083007442, true - case 452: - return ComObjectTableAddresses_DEV0083007742, true - case 453: - return ComObjectTableAddresses_DEV0083007642, true - case 454: - return ComObjectTableAddresses_DEV0083007343, true - case 455: - return ComObjectTableAddresses_DEV0083007366, true - case 456: - return ComObjectTableAddresses_DEV0083007243, true - case 457: - return ComObjectTableAddresses_DEV0083007266, true - case 458: - return ComObjectTableAddresses_DEV0083006C43, true - case 459: - return ComObjectTableAddresses_DEV0083006C66, true - case 46: - return ComObjectTableAddresses_DEV0064615022, true - case 460: - return ComObjectTableAddresses_DEV0083007543, true - case 461: - return ComObjectTableAddresses_DEV0083007566, true - case 462: - return ComObjectTableAddresses_DEV0083007443, true - case 463: - return ComObjectTableAddresses_DEV0083007466, true - case 464: - return ComObjectTableAddresses_DEV0083007743, true - case 465: - return ComObjectTableAddresses_DEV0083007766, true - case 466: - return ComObjectTableAddresses_DEV0083007643, true - case 467: - return ComObjectTableAddresses_DEV0083007666, true - case 468: - return ComObjectTableAddresses_DEV008300B031, true - case 469: - return ComObjectTableAddresses_DEV008300B048, true - case 47: - return ComObjectTableAddresses_DEV0064182810, true - case 470: - return ComObjectTableAddresses_DEV008300B131, true - case 471: - return ComObjectTableAddresses_DEV008300B148, true - case 472: - return ComObjectTableAddresses_DEV008300B231, true - case 473: - return ComObjectTableAddresses_DEV008300B248, true - case 474: - return ComObjectTableAddresses_DEV008300B331, true - case 475: - return ComObjectTableAddresses_DEV008300B348, true - case 476: - return ComObjectTableAddresses_DEV008300B032, true - case 477: - return ComObjectTableAddresses_DEV008300B049, true - case 478: - return ComObjectTableAddresses_DEV008300B132, true - case 479: - return ComObjectTableAddresses_DEV008300B149, true - case 48: - return ComObjectTableAddresses_DEV0064183110, true - case 480: - return ComObjectTableAddresses_DEV008300B232, true - case 481: - return ComObjectTableAddresses_DEV008300B249, true - case 482: - return ComObjectTableAddresses_DEV008300B332, true - case 483: - return ComObjectTableAddresses_DEV008300B349, true - case 484: - return ComObjectTableAddresses_DEV008300B431, true - case 485: - return ComObjectTableAddresses_DEV008300B448, true - case 486: - return ComObjectTableAddresses_DEV008300B531, true - case 487: - return ComObjectTableAddresses_DEV008300B548, true - case 488: - return ComObjectTableAddresses_DEV008300B631, true - case 489: - return ComObjectTableAddresses_DEV008300B648, true - case 49: - return ComObjectTableAddresses_DEV0064133611, true - case 490: - return ComObjectTableAddresses_DEV008300B731, true - case 491: - return ComObjectTableAddresses_DEV008300B748, true - case 492: - return ComObjectTableAddresses_DEV008300B432, true - case 493: - return ComObjectTableAddresses_DEV008300B449, true - case 494: - return ComObjectTableAddresses_DEV008300B532, true - case 495: - return ComObjectTableAddresses_DEV008300B549, true - case 496: - return ComObjectTableAddresses_DEV008300B632, true - case 497: - return ComObjectTableAddresses_DEV008300B649, true - case 498: - return ComObjectTableAddresses_DEV008300B732, true - case 499: - return ComObjectTableAddresses_DEV008300B749, true - case 5: - return ComObjectTableAddresses_DEV00641BD610, true - case 50: - return ComObjectTableAddresses_DEV006A000122, true - case 500: - return ComObjectTableAddresses_DEV0083012843, true - case 501: - return ComObjectTableAddresses_DEV0083012865, true - case 502: - return ComObjectTableAddresses_DEV0083012943, true - case 503: - return ComObjectTableAddresses_DEV0083012965, true - case 504: - return ComObjectTableAddresses_DEV008300A421, true - case 505: - return ComObjectTableAddresses_DEV008300A521, true - case 506: - return ComObjectTableAddresses_DEV008300A621, true - case 507: - return ComObjectTableAddresses_DEV0083001432, true - case 508: - return ComObjectTableAddresses_DEV0083001448, true - case 509: - return ComObjectTableAddresses_DEV0083001532, true - case 51: - return ComObjectTableAddresses_DEV006A000222, true - case 510: - return ComObjectTableAddresses_DEV0083001548, true - case 511: - return ComObjectTableAddresses_DEV0083001632, true - case 512: - return ComObjectTableAddresses_DEV0083001648, true - case 513: - return ComObjectTableAddresses_DEV008300A432, true - case 514: - return ComObjectTableAddresses_DEV008300A448, true - case 515: - return ComObjectTableAddresses_DEV008300A449, true - case 516: - return ComObjectTableAddresses_DEV008300A532, true - case 517: - return ComObjectTableAddresses_DEV008300A548, true - case 518: - return ComObjectTableAddresses_DEV008300A632, true - case 519: - return ComObjectTableAddresses_DEV008300A648, true - case 52: - return ComObjectTableAddresses_DEV006A070210, true - case 520: - return ComObjectTableAddresses_DEV0083000F32, true - case 521: - return ComObjectTableAddresses_DEV0083001032, true - case 522: - return ComObjectTableAddresses_DEV0083000632, true - case 523: - return ComObjectTableAddresses_DEV0083009811, true - case 524: - return ComObjectTableAddresses_DEV0083009816, true - case 525: - return ComObjectTableAddresses_DEV0083009911, true - case 526: - return ComObjectTableAddresses_DEV0083009916, true - case 527: - return ComObjectTableAddresses_DEV0083025520, true - case 528: - return ComObjectTableAddresses_DEV0083024710, true - case 529: - return ComObjectTableAddresses_DEV0083005C12, true - case 53: - return ComObjectTableAddresses_DEV006B106D10, true - case 530: - return ComObjectTableAddresses_DEV0083005C16, true - case 531: - return ComObjectTableAddresses_DEV0083005C17, true - case 532: - return ComObjectTableAddresses_DEV0083005D12, true - case 533: - return ComObjectTableAddresses_DEV0083005D16, true - case 534: - return ComObjectTableAddresses_DEV0083005D17, true - case 535: - return ComObjectTableAddresses_DEV0083005E12, true - case 536: - return ComObjectTableAddresses_DEV0083005E16, true - case 537: - return ComObjectTableAddresses_DEV0083005E17, true - case 538: - return ComObjectTableAddresses_DEV0083005F12, true - case 539: - return ComObjectTableAddresses_DEV0083005F16, true - case 54: - return ComObjectTableAddresses_DEV006BFFF713, true - case 540: - return ComObjectTableAddresses_DEV0083005F17, true - case 541: - return ComObjectTableAddresses_DEV0083005413, true - case 542: - return ComObjectTableAddresses_DEV0083005416, true - case 543: - return ComObjectTableAddresses_DEV0083005417, true - case 544: - return ComObjectTableAddresses_DEV0085000520, true - case 545: - return ComObjectTableAddresses_DEV0085000620, true - case 546: - return ComObjectTableAddresses_DEV0085000720, true - case 547: - return ComObjectTableAddresses_DEV0085012210, true - case 548: - return ComObjectTableAddresses_DEV0085011210, true - case 549: - return ComObjectTableAddresses_DEV0085013220, true - case 55: - return ComObjectTableAddresses_DEV006BFF2111, true - case 550: - return ComObjectTableAddresses_DEV0085010210, true - case 551: - return ComObjectTableAddresses_DEV0085000A10, true - case 552: - return ComObjectTableAddresses_DEV0085000B10, true - case 553: - return ComObjectTableAddresses_DEV0085071010, true - case 554: - return ComObjectTableAddresses_DEV008500FB10, true - case 555: - return ComObjectTableAddresses_DEV0085060210, true - case 556: - return ComObjectTableAddresses_DEV0085060110, true - case 557: - return ComObjectTableAddresses_DEV0085000D20, true - case 558: - return ComObjectTableAddresses_DEV008500C810, true - case 559: - return ComObjectTableAddresses_DEV0085040111, true - case 56: - return ComObjectTableAddresses_DEV006BFFF820, true - case 560: - return ComObjectTableAddresses_DEV008500C910, true - case 561: - return ComObjectTableAddresses_DEV0085045020, true - case 562: - return ComObjectTableAddresses_DEV0085070210, true - case 563: - return ComObjectTableAddresses_DEV0085070110, true - case 564: - return ComObjectTableAddresses_DEV0085070310, true - case 565: - return ComObjectTableAddresses_DEV0085000E20, true - case 566: - return ComObjectTableAddresses_DEV0088100010, true - case 567: - return ComObjectTableAddresses_DEV0088100210, true - case 568: - return ComObjectTableAddresses_DEV0088100110, true - case 569: - return ComObjectTableAddresses_DEV0088110010, true - case 57: - return ComObjectTableAddresses_DEV006C070E11, true - case 570: - return ComObjectTableAddresses_DEV0088120412, true - case 571: - return ComObjectTableAddresses_DEV0088120113, true - case 572: - return ComObjectTableAddresses_DEV008B020301, true - case 573: - return ComObjectTableAddresses_DEV008B010610, true - case 574: - return ComObjectTableAddresses_DEV008B030110, true - case 575: - return ComObjectTableAddresses_DEV008B030310, true - case 576: - return ComObjectTableAddresses_DEV008B030210, true - case 577: - return ComObjectTableAddresses_DEV008B031512, true - case 578: - return ComObjectTableAddresses_DEV008B031412, true - case 579: - return ComObjectTableAddresses_DEV008B031312, true - case 58: - return ComObjectTableAddresses_DEV006C011611, true - case 580: - return ComObjectTableAddresses_DEV008B031212, true - case 581: - return ComObjectTableAddresses_DEV008B031112, true - case 582: - return ComObjectTableAddresses_DEV008B031012, true - case 583: - return ComObjectTableAddresses_DEV008B030510, true - case 584: - return ComObjectTableAddresses_DEV008B030410, true - case 585: - return ComObjectTableAddresses_DEV008B020310, true - case 586: - return ComObjectTableAddresses_DEV008B020210, true - case 587: - return ComObjectTableAddresses_DEV008B020110, true - case 588: - return ComObjectTableAddresses_DEV008B010110, true - case 589: - return ComObjectTableAddresses_DEV008B010210, true - case 59: - return ComObjectTableAddresses_DEV006C011511, true - case 590: - return ComObjectTableAddresses_DEV008B010310, true - case 591: - return ComObjectTableAddresses_DEV008B010410, true - case 592: - return ComObjectTableAddresses_DEV008B040110, true - case 593: - return ComObjectTableAddresses_DEV008B040210, true - case 594: - return ComObjectTableAddresses_DEV008B010910, true - case 595: - return ComObjectTableAddresses_DEV008B010710, true - case 596: - return ComObjectTableAddresses_DEV008B010810, true - case 597: - return ComObjectTableAddresses_DEV008B041111, true - case 598: - return ComObjectTableAddresses_DEV008B041211, true - case 599: - return ComObjectTableAddresses_DEV008B041311, true - case 6: - return ComObjectTableAddresses_DEV0064760210, true - case 60: - return ComObjectTableAddresses_DEV006C050002, true - case 600: - return ComObjectTableAddresses_DEV008E596010, true - case 601: - return ComObjectTableAddresses_DEV008E593710, true - case 602: - return ComObjectTableAddresses_DEV008E597710, true - case 603: - return ComObjectTableAddresses_DEV008E598310, true - case 604: - return ComObjectTableAddresses_DEV008E598910, true - case 605: - return ComObjectTableAddresses_DEV008E598920, true - case 606: - return ComObjectTableAddresses_DEV008E598320, true - case 607: - return ComObjectTableAddresses_DEV008E596021, true - case 608: - return ComObjectTableAddresses_DEV008E597721, true - case 609: - return ComObjectTableAddresses_DEV008E587320, true - case 61: - return ComObjectTableAddresses_DEV006C011311, true - case 610: - return ComObjectTableAddresses_DEV008E587020, true - case 611: - return ComObjectTableAddresses_DEV008E587220, true - case 612: - return ComObjectTableAddresses_DEV008E587120, true - case 613: - return ComObjectTableAddresses_DEV008E679910, true - case 614: - return ComObjectTableAddresses_DEV008E618310, true - case 615: - return ComObjectTableAddresses_DEV008E707910, true - case 616: - return ComObjectTableAddresses_DEV008E676610, true - case 617: - return ComObjectTableAddresses_DEV008E794810, true - case 618: - return ComObjectTableAddresses_DEV008E004010, true - case 619: - return ComObjectTableAddresses_DEV008E570910, true - case 62: - return ComObjectTableAddresses_DEV006C011411, true - case 620: - return ComObjectTableAddresses_DEV008E558810, true - case 621: - return ComObjectTableAddresses_DEV008E683410, true - case 622: - return ComObjectTableAddresses_DEV008E707710, true - case 623: - return ComObjectTableAddresses_DEV008E707810, true - case 624: - return ComObjectTableAddresses_DEV008E787310, true - case 625: - return ComObjectTableAddresses_DEV008E787410, true - case 626: - return ComObjectTableAddresses_DEV0091100013, true - case 627: - return ComObjectTableAddresses_DEV0091100110, true - case 628: - return ComObjectTableAddresses_DEV009A200100, true - case 629: - return ComObjectTableAddresses_DEV009A000400, true - case 63: - return ComObjectTableAddresses_DEV000B0A8410, true - case 630: - return ComObjectTableAddresses_DEV009A100400, true - case 631: - return ComObjectTableAddresses_DEV009A200C00, true - case 632: - return ComObjectTableAddresses_DEV009A200E00, true - case 633: - return ComObjectTableAddresses_DEV009A000201, true - case 634: - return ComObjectTableAddresses_DEV009A000300, true - case 635: - return ComObjectTableAddresses_DEV009A00B000, true - case 636: - return ComObjectTableAddresses_DEV009A00C002, true - case 637: - return ComObjectTableAddresses_DEV009E670101, true - case 638: - return ComObjectTableAddresses_DEV009E119311, true - case 639: - return ComObjectTableAddresses_DEV00A0B07101, true - case 64: - return ComObjectTableAddresses_DEV000B0A7E10, true - case 640: - return ComObjectTableAddresses_DEV00A0B07001, true - case 641: - return ComObjectTableAddresses_DEV00A0B07203, true - case 642: - return ComObjectTableAddresses_DEV00A0B02101, true - case 643: - return ComObjectTableAddresses_DEV00A0B02401, true - case 644: - return ComObjectTableAddresses_DEV00A0B02301, true - case 645: - return ComObjectTableAddresses_DEV00A0B02601, true - case 646: - return ComObjectTableAddresses_DEV00A0B02201, true - case 647: - return ComObjectTableAddresses_DEV00A0B01902, true - case 648: - return ComObjectTableAddresses_DEV00A2100C13, true - case 649: - return ComObjectTableAddresses_DEV00A2300110, true - case 65: - return ComObjectTableAddresses_DEV000B0A7F10, true - case 650: - return ComObjectTableAddresses_DEV00A2101C11, true - case 651: - return ComObjectTableAddresses_DEV00A600020A, true - case 652: - return ComObjectTableAddresses_DEV00A6000B10, true - case 653: - return ComObjectTableAddresses_DEV00A6000B06, true - case 654: - return ComObjectTableAddresses_DEV00A6000B16, true - case 655: - return ComObjectTableAddresses_DEV00A6000300, true - case 656: - return ComObjectTableAddresses_DEV00A6000705, true - case 657: - return ComObjectTableAddresses_DEV00A6000605, true - case 658: - return ComObjectTableAddresses_DEV00A6000500, true - case 659: - return ComObjectTableAddresses_DEV00A6000C10, true - case 66: - return ComObjectTableAddresses_DEV000B0A8010, true - case 660: - return ComObjectTableAddresses_DEV00A6000C00, true - case 661: - return ComObjectTableAddresses_DEV00B6455301, true - case 662: - return ComObjectTableAddresses_DEV00B6464101, true - case 663: - return ComObjectTableAddresses_DEV00B6464201, true - case 664: - return ComObjectTableAddresses_DEV00B6464501, true - case 665: - return ComObjectTableAddresses_DEV00B6434201, true - case 666: - return ComObjectTableAddresses_DEV00B6434202, true - case 667: - return ComObjectTableAddresses_DEV00B6454101, true - case 668: - return ComObjectTableAddresses_DEV00B6454201, true - case 669: - return ComObjectTableAddresses_DEV00B6455001, true - case 67: - return ComObjectTableAddresses_DEV000BBF9111, true - case 670: - return ComObjectTableAddresses_DEV00B6453101, true - case 671: - return ComObjectTableAddresses_DEV00B6453102, true - case 672: - return ComObjectTableAddresses_DEV00B6454102, true - case 673: - return ComObjectTableAddresses_DEV00B6454401, true - case 674: - return ComObjectTableAddresses_DEV00B6454402, true - case 675: - return ComObjectTableAddresses_DEV00B6454202, true - case 676: - return ComObjectTableAddresses_DEV00B6453103, true - case 677: - return ComObjectTableAddresses_DEV00B6453201, true - case 678: - return ComObjectTableAddresses_DEV00B6453301, true - case 679: - return ComObjectTableAddresses_DEV00B6453104, true - case 68: - return ComObjectTableAddresses_DEV000B0A7810, true - case 680: - return ComObjectTableAddresses_DEV00B6454403, true - case 681: - return ComObjectTableAddresses_DEV00B6454801, true - case 682: - return ComObjectTableAddresses_DEV00B6414701, true - case 683: - return ComObjectTableAddresses_DEV00B6414201, true - case 684: - return ComObjectTableAddresses_DEV00B6474101, true - case 685: - return ComObjectTableAddresses_DEV00B6474302, true - case 686: - return ComObjectTableAddresses_DEV00B6474602, true - case 687: - return ComObjectTableAddresses_DEV00B6534D01, true - case 688: - return ComObjectTableAddresses_DEV00B6535001, true - case 689: - return ComObjectTableAddresses_DEV00B6455002, true - case 69: - return ComObjectTableAddresses_DEV000B0A7910, true - case 690: - return ComObjectTableAddresses_DEV00B6453701, true - case 691: - return ComObjectTableAddresses_DEV00B6484101, true - case 692: - return ComObjectTableAddresses_DEV00B6484201, true - case 693: - return ComObjectTableAddresses_DEV00B6484202, true - case 694: - return ComObjectTableAddresses_DEV00B6484301, true - case 695: - return ComObjectTableAddresses_DEV00B6484102, true - case 696: - return ComObjectTableAddresses_DEV00B6455101, true - case 697: - return ComObjectTableAddresses_DEV00B6455003, true - case 698: - return ComObjectTableAddresses_DEV00B6455102, true - case 699: - return ComObjectTableAddresses_DEV00B6453702, true - case 7: - return ComObjectTableAddresses_DEV0064182410, true - case 70: - return ComObjectTableAddresses_DEV000B0A7A10, true - case 700: - return ComObjectTableAddresses_DEV00B6453703, true - case 701: - return ComObjectTableAddresses_DEV00B6484302, true - case 702: - return ComObjectTableAddresses_DEV00B6484801, true - case 703: - return ComObjectTableAddresses_DEV00B6484501, true - case 704: - return ComObjectTableAddresses_DEV00B6484203, true - case 705: - return ComObjectTableAddresses_DEV00B6484103, true - case 706: - return ComObjectTableAddresses_DEV00B6455004, true - case 707: - return ComObjectTableAddresses_DEV00B6455103, true - case 708: - return ComObjectTableAddresses_DEV00B6455401, true - case 709: - return ComObjectTableAddresses_DEV00B6455201, true - case 71: - return ComObjectTableAddresses_DEV000BA69915, true - case 710: - return ComObjectTableAddresses_DEV00B6455402, true - case 711: - return ComObjectTableAddresses_DEV00B6455403, true - case 712: - return ComObjectTableAddresses_DEV00B6484802, true - case 713: - return ComObjectTableAddresses_DEV00B603430A, true - case 714: - return ComObjectTableAddresses_DEV00B600010A, true - case 715: - return ComObjectTableAddresses_DEV00B6FF110A, true - case 716: - return ComObjectTableAddresses_DEV00B6434601, true - case 717: - return ComObjectTableAddresses_DEV00B6434602, true - case 718: - return ComObjectTableAddresses_DEV00C5070610, true - case 719: - return ComObjectTableAddresses_DEV00C5070410, true - case 72: - return ComObjectTableAddresses_DEV000B0A8910, true - case 720: - return ComObjectTableAddresses_DEV00C5070210, true - case 721: - return ComObjectTableAddresses_DEV00C5070E11, true - case 722: - return ComObjectTableAddresses_DEV00C5060240, true - case 723: - return ComObjectTableAddresses_DEV00C5062010, true - case 724: - return ComObjectTableAddresses_DEV00C5080230, true - case 725: - return ComObjectTableAddresses_DEV00C5060310, true - case 726: - return ComObjectTableAddresses_DEV0002A01511, true - case 727: - return ComObjectTableAddresses_DEV0002A01112, true - case 728: - return ComObjectTableAddresses_DEV0002FF1140, true - case 729: - return ComObjectTableAddresses_DEV0002A07E10, true - case 73: - return ComObjectTableAddresses_DEV000B0A8310, true - case 730: - return ComObjectTableAddresses_DEV0002A07213, true - case 731: - return ComObjectTableAddresses_DEV0002A04A35, true - case 732: - return ComObjectTableAddresses_DEV0002613812, true - case 733: - return ComObjectTableAddresses_DEV0002A07420, true - case 734: - return ComObjectTableAddresses_DEV0002A07520, true - case 735: - return ComObjectTableAddresses_DEV0002A07B12, true - case 736: - return ComObjectTableAddresses_DEV0002A07C12, true - case 737: - return ComObjectTableAddresses_DEV0002A04312, true - case 738: - return ComObjectTableAddresses_DEV0002A04412, true - case 739: - return ComObjectTableAddresses_DEV0002A04512, true - case 74: - return ComObjectTableAddresses_DEV000B0A8510, true - case 740: - return ComObjectTableAddresses_DEV0002A04912, true - case 741: - return ComObjectTableAddresses_DEV0002A05012, true - case 742: - return ComObjectTableAddresses_DEV0002A01811, true - case 743: - return ComObjectTableAddresses_DEV0002A03E11, true - case 744: - return ComObjectTableAddresses_DEV0002A08711, true - case 745: - return ComObjectTableAddresses_DEV0002A09311, true - case 746: - return ComObjectTableAddresses_DEV0002A01011, true - case 747: - return ComObjectTableAddresses_DEV0002A01622, true - case 748: - return ComObjectTableAddresses_DEV0002A04210, true - case 749: - return ComObjectTableAddresses_DEV0002A0C310, true - case 75: - return ComObjectTableAddresses_DEV000B0A6319, true - case 750: - return ComObjectTableAddresses_DEV0002A0C316, true - case 751: - return ComObjectTableAddresses_DEV0002A04B10, true - case 752: - return ComObjectTableAddresses_DEV0002A09B12, true - case 753: - return ComObjectTableAddresses_DEV0002A04F13, true - case 754: - return ComObjectTableAddresses_DEV0002A04D13, true - case 755: - return ComObjectTableAddresses_DEV0002A04C13, true - case 756: - return ComObjectTableAddresses_DEV0002A04E13, true - case 757: - return ComObjectTableAddresses_DEV0002A09C12, true - case 758: - return ComObjectTableAddresses_DEV0002A03C10, true - case 759: - return ComObjectTableAddresses_DEV0002A0A511, true - case 76: - return ComObjectTableAddresses_DEV000BA6CC10, true - case 760: - return ComObjectTableAddresses_DEV0002A0A516, true - case 761: - return ComObjectTableAddresses_DEV0002A0A514, true - case 762: - return ComObjectTableAddresses_DEV0002A0A513, true - case 763: - return ComObjectTableAddresses_DEV0002A0A512, true - case 764: - return ComObjectTableAddresses_DEV0002A0A611, true - case 765: - return ComObjectTableAddresses_DEV0002A0A616, true - case 766: - return ComObjectTableAddresses_DEV0002A09111, true - case 767: - return ComObjectTableAddresses_DEV0002A09211, true - case 768: - return ComObjectTableAddresses_DEV0002632010, true - case 769: - return ComObjectTableAddresses_DEV0002632020, true - case 77: - return ComObjectTableAddresses_DEV000BA6DD10, true - case 770: - return ComObjectTableAddresses_DEV0002632170, true - case 771: - return ComObjectTableAddresses_DEV0002632040, true - case 772: - return ComObjectTableAddresses_DEV0002A05814, true - case 773: - return ComObjectTableAddresses_DEV0002A07114, true - case 774: - return ComObjectTableAddresses_DEV0002134A10, true - case 775: - return ComObjectTableAddresses_DEV0002A03D12, true - case 776: - return ComObjectTableAddresses_DEV0002A03422, true - case 777: - return ComObjectTableAddresses_DEV0002A03321, true - case 778: - return ComObjectTableAddresses_DEV0002648B10, true - case 779: - return ComObjectTableAddresses_DEV0002A09013, true - case 78: - return ComObjectTableAddresses_DEV000B509E11, true - case 780: - return ComObjectTableAddresses_DEV0002A08F13, true - case 781: - return ComObjectTableAddresses_DEV0002A05510, true - case 782: - return ComObjectTableAddresses_DEV0002A05910, true - case 783: - return ComObjectTableAddresses_DEV0002A05326, true - case 784: - return ComObjectTableAddresses_DEV0002A05428, true - case 785: - return ComObjectTableAddresses_DEV0002A08411, true - case 786: - return ComObjectTableAddresses_DEV0002A08511, true - case 787: - return ComObjectTableAddresses_DEV0002A00F11, true - case 788: - return ComObjectTableAddresses_DEV0002A07310, true - case 789: - return ComObjectTableAddresses_DEV0002A04110, true - case 79: - return ComObjectTableAddresses_DEV000B709E11, true - case 790: - return ComObjectTableAddresses_DEV0002A06414, true - case 791: - return ComObjectTableAddresses_DEV0002A03813, true - case 792: - return ComObjectTableAddresses_DEV0002A07F13, true - case 793: - return ComObjectTableAddresses_DEV0002A01217, true - case 794: - return ComObjectTableAddresses_DEV0002A07914, true - case 795: - return ComObjectTableAddresses_DEV0002A06114, true - case 796: - return ComObjectTableAddresses_DEV0002A06714, true - case 797: - return ComObjectTableAddresses_DEV0002A06214, true - case 798: - return ComObjectTableAddresses_DEV0002A06514, true - case 799: - return ComObjectTableAddresses_DEV0002A07714, true - case 8: - return ComObjectTableAddresses_DEV0064182310, true - case 80: - return ComObjectTableAddresses_DEV000B10DE11, true - case 800: - return ComObjectTableAddresses_DEV0002A06014, true - case 801: - return ComObjectTableAddresses_DEV0002A06614, true - case 802: - return ComObjectTableAddresses_DEV0002A07814, true - case 803: - return ComObjectTableAddresses_DEV0002A09A13, true - case 804: - return ComObjectTableAddresses_DEV0002A00213, true - case 805: - return ComObjectTableAddresses_DEV0002A00113, true - case 806: - return ComObjectTableAddresses_DEV00C8272040, true - case 807: - return ComObjectTableAddresses_DEV00C8272260, true - case 808: - return ComObjectTableAddresses_DEV00C8272060, true - case 809: - return ComObjectTableAddresses_DEV00C8272160, true - case 81: - return ComObjectTableAddresses_DEV000B109E11, true - case 810: - return ComObjectTableAddresses_DEV00C8272050, true - case 811: - return ComObjectTableAddresses_DEV00C910BA10, true - case 812: - return ComObjectTableAddresses_DEV00C9106D10, true - case 813: - return ComObjectTableAddresses_DEV00C9107C20, true - case 814: - return ComObjectTableAddresses_DEV00C9108511, true - case 815: - return ComObjectTableAddresses_DEV00C9108500, true - case 816: - return ComObjectTableAddresses_DEV00C9106210, true - case 817: - return ComObjectTableAddresses_DEV00C9109310, true - case 818: - return ComObjectTableAddresses_DEV00C9109300, true - case 819: - return ComObjectTableAddresses_DEV00C9109210, true - case 82: - return ComObjectTableAddresses_DEV000BB76611, true - case 820: - return ComObjectTableAddresses_DEV00C9109200, true - case 821: - return ComObjectTableAddresses_DEV00C9109810, true - case 822: - return ComObjectTableAddresses_DEV00C9109A10, true - case 823: - return ComObjectTableAddresses_DEV00C9109A00, true - case 824: - return ComObjectTableAddresses_DEV00C910A420, true - case 825: - return ComObjectTableAddresses_DEV00C910A110, true - case 826: - return ComObjectTableAddresses_DEV00C910A100, true - case 827: - return ComObjectTableAddresses_DEV00C910A010, true - case 828: - return ComObjectTableAddresses_DEV00C910A000, true - case 829: - return ComObjectTableAddresses_DEV00C910A310, true - case 83: - return ComObjectTableAddresses_DEV000B10DA11, true - case 830: - return ComObjectTableAddresses_DEV00C910A300, true - case 831: - return ComObjectTableAddresses_DEV00C910A210, true - case 832: - return ComObjectTableAddresses_DEV00C910A200, true - case 833: - return ComObjectTableAddresses_DEV00C9109B10, true - case 834: - return ComObjectTableAddresses_DEV00C9109B00, true - case 835: - return ComObjectTableAddresses_DEV00C9106110, true - case 836: - return ComObjectTableAddresses_DEV00C9109110, true - case 837: - return ComObjectTableAddresses_DEV00C9109100, true - case 838: - return ComObjectTableAddresses_DEV00C9109610, true - case 839: - return ComObjectTableAddresses_DEV00C9109600, true - case 84: - return ComObjectTableAddresses_DEV000BA76111, true - case 840: - return ComObjectTableAddresses_DEV00C9109710, true - case 841: - return ComObjectTableAddresses_DEV00C9109700, true - case 842: - return ComObjectTableAddresses_DEV00C9109510, true - case 843: - return ComObjectTableAddresses_DEV00C9109500, true - case 844: - return ComObjectTableAddresses_DEV00C9109910, true - case 845: - return ComObjectTableAddresses_DEV00C9109900, true - case 846: - return ComObjectTableAddresses_DEV00C9109C10, true - case 847: - return ComObjectTableAddresses_DEV00C9109C00, true - case 848: - return ComObjectTableAddresses_DEV00C910AB10, true - case 849: - return ComObjectTableAddresses_DEV00C910AB00, true - case 85: - return ComObjectTableAddresses_DEV000BAA5611, true - case 850: - return ComObjectTableAddresses_DEV00C910AC10, true - case 851: - return ComObjectTableAddresses_DEV00C910AC00, true - case 852: - return ComObjectTableAddresses_DEV00C910AD10, true - case 853: - return ComObjectTableAddresses_DEV00C910AD00, true - case 854: - return ComObjectTableAddresses_DEV00C910A810, true - case 855: - return ComObjectTableAddresses_DEV00C910B010, true - case 856: - return ComObjectTableAddresses_DEV00C910B310, true - case 857: - return ComObjectTableAddresses_DEV00C9106311, true - case 858: - return ComObjectTableAddresses_DEV00C9106111, true - case 859: - return ComObjectTableAddresses_DEV00C9106510, true - case 86: - return ComObjectTableAddresses_DEV000BBF9222, true - case 860: - return ComObjectTableAddresses_DEV00C910A710, true - case 861: - return ComObjectTableAddresses_DEV00C9107610, true - case 862: - return ComObjectTableAddresses_DEV00C910AF10, true - case 863: - return ComObjectTableAddresses_DEV00C910B510, true - case 864: - return ComObjectTableAddresses_DEV00C910890A, true - case 865: - return ComObjectTableAddresses_DEV00C9FF1012, true - case 866: - return ComObjectTableAddresses_DEV00C9FF0913, true - case 867: - return ComObjectTableAddresses_DEV00C9FF1112, true - case 868: - return ComObjectTableAddresses_DEV00C9100310, true - case 869: - return ComObjectTableAddresses_DEV00C9101110, true - case 87: - return ComObjectTableAddresses_DEV0071123130, true - case 870: - return ComObjectTableAddresses_DEV00C9101010, true - case 871: - return ComObjectTableAddresses_DEV00C9103710, true - case 872: - return ComObjectTableAddresses_DEV00C9101310, true - case 873: - return ComObjectTableAddresses_DEV00C9FF0D12, true - case 874: - return ComObjectTableAddresses_DEV00C9100E10, true - case 875: - return ComObjectTableAddresses_DEV00C9100610, true - case 876: - return ComObjectTableAddresses_DEV00C9100510, true - case 877: - return ComObjectTableAddresses_DEV00C9100710, true - case 878: - return ComObjectTableAddresses_DEV00C9FF1D20, true - case 879: - return ComObjectTableAddresses_DEV00C9FF1C10, true - case 88: - return ComObjectTableAddresses_DEV0071413133, true - case 880: - return ComObjectTableAddresses_DEV00C9100810, true - case 881: - return ComObjectTableAddresses_DEV00C9FF1420, true - case 882: - return ComObjectTableAddresses_DEV00C9100D10, true - case 883: - return ComObjectTableAddresses_DEV00C9101220, true - case 884: - return ComObjectTableAddresses_DEV00C9102330, true - case 885: - return ComObjectTableAddresses_DEV00C9102130, true - case 886: - return ComObjectTableAddresses_DEV00C9102430, true - case 887: - return ComObjectTableAddresses_DEV00C9100831, true - case 888: - return ComObjectTableAddresses_DEV00C9102530, true - case 889: - return ComObjectTableAddresses_DEV00C9100531, true - case 89: - return ComObjectTableAddresses_DEV0071114019, true - case 890: - return ComObjectTableAddresses_DEV00C9102030, true - case 891: - return ComObjectTableAddresses_DEV00C9100731, true - case 892: - return ComObjectTableAddresses_DEV00C9100631, true - case 893: - return ComObjectTableAddresses_DEV00C9102230, true - case 894: - return ComObjectTableAddresses_DEV00C9100632, true - case 895: - return ComObjectTableAddresses_DEV00C9100532, true - case 896: - return ComObjectTableAddresses_DEV00C9100732, true - case 897: - return ComObjectTableAddresses_DEV00C9100832, true - case 898: - return ComObjectTableAddresses_DEV00C9102532, true - case 899: - return ComObjectTableAddresses_DEV00C9102132, true - case 9: - return ComObjectTableAddresses_DEV0064705C01, true - case 90: - return ComObjectTableAddresses_DEV007111306C, true - case 900: - return ComObjectTableAddresses_DEV00C9102332, true - case 901: - return ComObjectTableAddresses_DEV00C9102432, true - case 902: - return ComObjectTableAddresses_DEV00C9102032, true - case 903: - return ComObjectTableAddresses_DEV00C9102232, true - case 904: - return ComObjectTableAddresses_DEV00C9104432, true - case 905: - return ComObjectTableAddresses_DEV00C9100D11, true - case 906: - return ComObjectTableAddresses_DEV00C9100633, true - case 907: - return ComObjectTableAddresses_DEV00C9100533, true - case 908: - return ComObjectTableAddresses_DEV00C9100733, true - case 909: - return ComObjectTableAddresses_DEV00C9100833, true - case 91: - return ComObjectTableAddresses_DEV0071231112, true - case 910: - return ComObjectTableAddresses_DEV00C9102533, true - case 911: - return ComObjectTableAddresses_DEV00C9102133, true - case 912: - return ComObjectTableAddresses_DEV00C9102333, true - case 913: - return ComObjectTableAddresses_DEV00C9102433, true - case 914: - return ComObjectTableAddresses_DEV00C9102033, true - case 915: - return ComObjectTableAddresses_DEV00C9102233, true - case 916: - return ComObjectTableAddresses_DEV00C9104810, true - case 917: - return ComObjectTableAddresses_DEV00C9FF1A11, true - case 918: - return ComObjectTableAddresses_DEV00C9100212, true - case 919: - return ComObjectTableAddresses_DEV00C9FF0A11, true - case 92: - return ComObjectTableAddresses_DEV0071113080, true - case 920: - return ComObjectTableAddresses_DEV00C9FF0C12, true - case 921: - return ComObjectTableAddresses_DEV00C9100112, true - case 922: - return ComObjectTableAddresses_DEV00C9FF1911, true - case 923: - return ComObjectTableAddresses_DEV00C9FF0B12, true - case 924: - return ComObjectTableAddresses_DEV00C9FF0715, true - case 925: - return ComObjectTableAddresses_DEV00C9FF1B10, true - case 926: - return ComObjectTableAddresses_DEV00C9101610, true - case 927: - return ComObjectTableAddresses_DEV00C9FF1B11, true - case 928: - return ComObjectTableAddresses_DEV00C9101611, true - case 929: - return ComObjectTableAddresses_DEV00C9101612, true - case 93: - return ComObjectTableAddresses_DEV0071321212, true - case 930: - return ComObjectTableAddresses_DEV00C9FF0F11, true - case 931: - return ComObjectTableAddresses_DEV00C910B710, true - case 932: - return ComObjectTableAddresses_DEV00C9FF1E30, true - case 933: - return ComObjectTableAddresses_DEV00C9100410, true - case 934: - return ComObjectTableAddresses_DEV00C9106410, true - case 935: - return ComObjectTableAddresses_DEV00C9106710, true - case 936: - return ComObjectTableAddresses_DEV00C9106700, true - case 937: - return ComObjectTableAddresses_DEV00C9106810, true - case 938: - return ComObjectTableAddresses_DEV00C9106800, true - case 939: - return ComObjectTableAddresses_DEV00C9106010, true - case 94: - return ComObjectTableAddresses_DEV0071321113, true - case 940: - return ComObjectTableAddresses_DEV00C9106000, true - case 941: - return ComObjectTableAddresses_DEV00C9106310, true - case 942: - return ComObjectTableAddresses_DEV00C9107110, true - case 943: - return ComObjectTableAddresses_DEV00C9107100, true - case 944: - return ComObjectTableAddresses_DEV00C9107210, true - case 945: - return ComObjectTableAddresses_DEV00C9107200, true - case 946: - return ComObjectTableAddresses_DEV00C9107310, true - case 947: - return ComObjectTableAddresses_DEV00C9107300, true - case 948: - return ComObjectTableAddresses_DEV00C9107010, true - case 949: - return ComObjectTableAddresses_DEV00C9107000, true - case 95: - return ComObjectTableAddresses_DEV0071322212, true - case 950: - return ComObjectTableAddresses_DEV00C9107A20, true - case 951: - return ComObjectTableAddresses_DEV00C9107A00, true - case 952: - return ComObjectTableAddresses_DEV00C9107B20, true - case 953: - return ComObjectTableAddresses_DEV00C9107B00, true - case 954: - return ComObjectTableAddresses_DEV00C9107820, true - case 955: - return ComObjectTableAddresses_DEV00C9107800, true - case 956: - return ComObjectTableAddresses_DEV00C9107920, true - case 957: - return ComObjectTableAddresses_DEV00C9107900, true - case 958: - return ComObjectTableAddresses_DEV00C9104433, true - case 959: - return ComObjectTableAddresses_DEV00C9107C11, true - case 96: - return ComObjectTableAddresses_DEV0071322112, true - case 960: - return ComObjectTableAddresses_DEV00C9106E10, true - case 961: - return ComObjectTableAddresses_DEV00C9107711, true - case 962: - return ComObjectTableAddresses_DEV00C9108310, true - case 963: - return ComObjectTableAddresses_DEV00C9108210, true - case 964: - return ComObjectTableAddresses_DEV00C9108610, true - case 965: - return ComObjectTableAddresses_DEV00C9107D10, true - case 966: - return ComObjectTableAddresses_DEV00CE648B10, true - case 967: - return ComObjectTableAddresses_DEV00CE494513, true - case 968: - return ComObjectTableAddresses_DEV00CE494311, true - case 969: - return ComObjectTableAddresses_DEV00CE494810, true - case 97: - return ComObjectTableAddresses_DEV0071322312, true - case 970: - return ComObjectTableAddresses_DEV00CE494712, true - case 971: - return ComObjectTableAddresses_DEV00CE494012, true - case 972: - return ComObjectTableAddresses_DEV00CE494111, true - case 973: - return ComObjectTableAddresses_DEV00CE494210, true - case 974: - return ComObjectTableAddresses_DEV00CE494610, true - case 975: - return ComObjectTableAddresses_DEV00CE494412, true - case 976: - return ComObjectTableAddresses_DEV00D0660212, true - case 977: - return ComObjectTableAddresses_DEV00E8000A10, true - case 978: - return ComObjectTableAddresses_DEV00E8000B10, true - case 979: - return ComObjectTableAddresses_DEV00E8000910, true - case 98: - return ComObjectTableAddresses_DEV0071122124, true - case 980: - return ComObjectTableAddresses_DEV00E8001112, true - case 981: - return ComObjectTableAddresses_DEV00E8000C14, true - case 982: - return ComObjectTableAddresses_DEV00E8000D13, true - case 983: - return ComObjectTableAddresses_DEV00E8000E12, true - case 984: - return ComObjectTableAddresses_DEV00E8001310, true - case 985: - return ComObjectTableAddresses_DEV00E8001410, true - case 986: - return ComObjectTableAddresses_DEV00E8001510, true - case 987: - return ComObjectTableAddresses_DEV00E8000F10, true - case 988: - return ComObjectTableAddresses_DEV00E8001010, true - case 989: - return ComObjectTableAddresses_DEV00E8000612, true - case 99: - return ComObjectTableAddresses_DEV0071122135, true - case 990: - return ComObjectTableAddresses_DEV00E8000812, true - case 991: - return ComObjectTableAddresses_DEV00E8000712, true - case 992: - return ComObjectTableAddresses_DEV00EE7FFF10, true - case 993: - return ComObjectTableAddresses_DEV00F4501311, true - case 994: - return ComObjectTableAddresses_DEV00F4B00911, true - case 995: - return ComObjectTableAddresses_DEV0019E20111, true - case 996: - return ComObjectTableAddresses_DEV0019E20210, true - case 997: - return ComObjectTableAddresses_DEV0019E30C11, true - case 998: - return ComObjectTableAddresses_DEV0019E11310, true - case 999: - return ComObjectTableAddresses_DEV0019E11210, true + case 783: { /* '783' */ + return 0x4400 + } + case 784: { /* '784' */ + return 0x4400 + } + case 785: { /* '785' */ + return 0x4400 + } + case 786: { /* '786' */ + return 0x4400 + } + case 787: { /* '787' */ + return 0x4400 + } + case 788: { /* '788' */ + return 0x4326 + } + case 789: { /* '789' */ + return 0x4326 + } + case 79: { /* '79' */ + return 0x43FE + } + case 790: { /* '790' */ + return 0x4400 + } + case 791: { /* '791' */ + return 0x4400 + } + case 792: { /* '792' */ + return 0x4400 + } + case 793: { /* '793' */ + return 0x4EE0 + } + case 794: { /* '794' */ + return 0x4400 + } + case 795: { /* '795' */ + return 0x4400 + } + case 796: { /* '796' */ + return 0x4400 + } + case 797: { /* '797' */ + return 0x4400 + } + case 798: { /* '798' */ + return 0x4400 + } + case 799: { /* '799' */ + return 0x4400 + } + case 8: { /* '8' */ + return 0x43FE + } + case 80: { /* '80' */ + return 0x43FE + } + case 800: { /* '800' */ + return 0x4400 + } + case 801: { /* '801' */ + return 0x4400 + } + case 802: { /* '802' */ + return 0x4400 + } + case 803: { /* '803' */ + return 0x4400 + } + case 804: { /* '804' */ + return 0x43FE + } + case 805: { /* '805' */ + return 0x43FE + } + case 806: { /* '806' */ + return 0x4194 + } + case 807: { /* '807' */ + return 0x43FE + } + case 808: { /* '808' */ + return 0x43FE + } + case 809: { /* '809' */ + return 0x43FE + } + case 81: { /* '81' */ + return 0x43FE + } + case 810: { /* '810' */ + return 0x43FE + } + case 811: { /* '811' */ + return 0x4400 + } + case 812: { /* '812' */ + return 0x43FC + } + case 813: { /* '813' */ + return 0x43FC + } + case 814: { /* '814' */ + return 0x4338 + } + case 815: { /* '815' */ + return 0x4338 + } + case 816: { /* '816' */ + return 0x43FC + } + case 817: { /* '817' */ + return 0x42E0 + } + case 818: { /* '818' */ + return 0x42E0 + } + case 819: { /* '819' */ + return 0x42E0 + } + case 82: { /* '82' */ + return 0x43FE + } + case 820: { /* '820' */ + return 0x42E0 + } + case 821: { /* '821' */ + return 0x43FC + } + case 822: { /* '822' */ + return 0x42E0 + } + case 823: { /* '823' */ + return 0x42E0 + } + case 824: { /* '824' */ + return 0x43FC + } + case 825: { /* '825' */ + return 0x42A0 + } + case 826: { /* '826' */ + return 0x42A0 + } + case 827: { /* '827' */ + return 0x42A0 + } + case 828: { /* '828' */ + return 0x42A0 + } + case 829: { /* '829' */ + return 0x42A0 + } + case 83: { /* '83' */ + return 0x43FE + } + case 830: { /* '830' */ + return 0x42A0 + } + case 831: { /* '831' */ + return 0x42A0 + } + case 832: { /* '832' */ + return 0x42A0 + } + case 833: { /* '833' */ + return 0x42E0 + } + case 834: { /* '834' */ + return 0x42E0 + } + case 835: { /* '835' */ + return 0x43FC + } + case 836: { /* '836' */ + return 0x42E0 + } + case 837: { /* '837' */ + return 0x42E0 + } + case 838: { /* '838' */ + return 0x43FC + } + case 839: { /* '839' */ + return 0x43FC + } + case 84: { /* '84' */ + return 0x43FE + } + case 840: { /* '840' */ + return 0x43FC + } + case 841: { /* '841' */ + return 0x43FC + } + case 842: { /* '842' */ + return 0x43FC + } + case 843: { /* '843' */ + return 0x43FC + } + case 844: { /* '844' */ + return 0x42E0 + } + case 845: { /* '845' */ + return 0x42E0 + } + case 846: { /* '846' */ + return 0x43FC + } + case 847: { /* '847' */ + return 0x43FC + } + case 848: { /* '848' */ + return 0x42A0 + } + case 849: { /* '849' */ + return 0x42A0 + } + case 85: { /* '85' */ + return 0x43FE + } + case 850: { /* '850' */ + return 0x42A0 + } + case 851: { /* '851' */ + return 0x42A0 + } + case 852: { /* '852' */ + return 0x42A0 + } + case 853: { /* '853' */ + return 0x42A0 + } + case 854: { /* '854' */ + return 0x43FC + } + case 855: { /* '855' */ + return 0x43FC + } + case 856: { /* '856' */ + return 0x4390 + } + case 857: { /* '857' */ + return 0x43FC + } + case 858: { /* '858' */ + return 0x43FC + } + case 859: { /* '859' */ + return 0x43FC + } + case 86: { /* '86' */ + return 0x43FE + } + case 860: { /* '860' */ + return 0x43F4 + } + case 861: { /* '861' */ + return 0x43FC + } + case 862: { /* '862' */ + return 0x43FC + } + case 863: { /* '863' */ + return 0x43FC + } + case 864: { /* '864' */ + return 0x43FC + } + case 865: { /* '865' */ + return 0x4370 + } + case 866: { /* '866' */ + return 0x4370 + } + case 867: { /* '867' */ + return 0x4370 + } + case 868: { /* '868' */ + return 0x439C + } + case 869: { /* '869' */ + return 0x43FC + } + case 87: { /* '87' */ + return 0x4400 + } + case 870: { /* '870' */ + return 0x43FC + } + case 871: { /* '871' */ + return 0x4324 + } + case 872: { /* '872' */ + return 0x4374 + } + case 873: { /* '873' */ + return 0x4374 + } + case 874: { /* '874' */ + return 0x4274 + } + case 875: { /* '875' */ + return 0x43FC + } + case 876: { /* '876' */ + return 0x43FC + } + case 877: { /* '877' */ + return 0x43FC + } + case 878: { /* '878' */ + return 0x43FC + } + case 879: { /* '879' */ + return 0x43FC + } + case 88: { /* '88' */ + return 0x4400 + } + case 880: { /* '880' */ + return 0x43FC + } + case 881: { /* '881' */ + return 0x42A0 + } + case 882: { /* '882' */ + return 0x43FC + } + case 883: { /* '883' */ + return 0x42A0 + } + case 884: { /* '884' */ + return 0x43FC + } + case 885: { /* '885' */ + return 0x43FC + } + case 886: { /* '886' */ + return 0x43FC + } + case 887: { /* '887' */ + return 0x43FC + } + case 888: { /* '888' */ + return 0x43FC + } + case 889: { /* '889' */ + return 0x43FC + } + case 89: { /* '89' */ + return 0x4400 + } + case 890: { /* '890' */ + return 0x43FC + } + case 891: { /* '891' */ + return 0x43FC + } + case 892: { /* '892' */ + return 0x43FC + } + case 893: { /* '893' */ + return 0x43FC + } + case 894: { /* '894' */ + return 0x43FC + } + case 895: { /* '895' */ + return 0x43FC + } + case 896: { /* '896' */ + return 0x43FC + } + case 897: { /* '897' */ + return 0x43FC + } + case 898: { /* '898' */ + return 0x43FC + } + case 899: { /* '899' */ + return 0x43FC + } + case 9: { /* '9' */ + return 0x43FE + } + case 90: { /* '90' */ + return 0x4400 + } + case 900: { /* '900' */ + return 0x43FC + } + case 901: { /* '901' */ + return 0x43FC + } + case 902: { /* '902' */ + return 0x43FC + } + case 903: { /* '903' */ + return 0x43FC + } + case 904: { /* '904' */ + return 0x43FC + } + case 905: { /* '905' */ + return 0x43FC + } + case 906: { /* '906' */ + return 0x43FC + } + case 907: { /* '907' */ + return 0x43FC + } + case 908: { /* '908' */ + return 0x43FC + } + case 909: { /* '909' */ + return 0x43FC + } + case 91: { /* '91' */ + return 0x4400 + } + case 910: { /* '910' */ + return 0x43FC + } + case 911: { /* '911' */ + return 0x43FC + } + case 912: { /* '912' */ + return 0x43FC + } + case 913: { /* '913' */ + return 0x43FC + } + case 914: { /* '914' */ + return 0x43FC + } + case 915: { /* '915' */ + return 0x43FC + } + case 916: { /* '916' */ + return 0x43FC + } + case 917: { /* '917' */ + return 0x43FE + } + case 918: { /* '918' */ + return 0x43FE + } + case 919: { /* '919' */ + return 0x43FE + } + case 92: { /* '92' */ + return 0x4400 + } + case 920: { /* '920' */ + return 0x43FE + } + case 921: { /* '921' */ + return 0x43FE + } + case 922: { /* '922' */ + return 0x4324 + } + case 923: { /* '923' */ + return 0x43FE + } + case 924: { /* '924' */ + return 0x43FE + } + case 925: { /* '925' */ + return 0x43FC + } + case 926: { /* '926' */ + return 0x43FC + } + case 927: { /* '927' */ + return 0x43FC + } + case 928: { /* '928' */ + return 0x43FC + } + case 929: { /* '929' */ + return 0x43FC + } + case 93: { /* '93' */ + return 0x4400 + } + case 930: { /* '930' */ + return 0x4388 + } + case 931: { /* '931' */ + return 0x4400 + } + case 932: { /* '932' */ + return 0x43FC + } + case 933: { /* '933' */ + return 0x4400 + } + case 934: { /* '934' */ + return 0x43FC + } + case 935: { /* '935' */ + return 0x43FC + } + case 936: { /* '936' */ + return 0x43FC + } + case 937: { /* '937' */ + return 0x43FC + } + case 938: { /* '938' */ + return 0x43FC + } + case 939: { /* '939' */ + return 0x43FC + } + case 94: { /* '94' */ + return 0x4400 + } + case 940: { /* '940' */ + return 0x43FC + } + case 941: { /* '941' */ + return 0x43FC + } + case 942: { /* '942' */ + return 0x43FC + } + case 943: { /* '943' */ + return 0x43FC + } + case 944: { /* '944' */ + return 0x43FC + } + case 945: { /* '945' */ + return 0x43FC + } + case 946: { /* '946' */ + return 0x43FC + } + case 947: { /* '947' */ + return 0x43FC + } + case 948: { /* '948' */ + return 0x43FC + } + case 949: { /* '949' */ + return 0x43FC + } + case 95: { /* '95' */ + return 0x4400 + } + case 950: { /* '950' */ + return 0x43FC + } + case 951: { /* '951' */ + return 0x43FC + } + case 952: { /* '952' */ + return 0x43FC + } + case 953: { /* '953' */ + return 0x43FC + } + case 954: { /* '954' */ + return 0x43FC + } + case 955: { /* '955' */ + return 0x43FC + } + case 956: { /* '956' */ + return 0x43FC + } + case 957: { /* '957' */ + return 0x43FC + } + case 958: { /* '958' */ + return 0x43FC + } + case 959: { /* '959' */ + return 0x43FC + } + case 96: { /* '96' */ + return 0x4400 + } + case 960: { /* '960' */ + return 0x43FC + } + case 961: { /* '961' */ + return 0x43FC + } + case 962: { /* '962' */ + return 0x43FC + } + case 963: { /* '963' */ + return 0x43FC + } + case 964: { /* '964' */ + return 0x43FC + } + case 965: { /* '965' */ + return 0x43FC + } + case 966: { /* '966' */ + return 0x4400 + } + case 967: { /* '967' */ + return 0x43FE + } + case 968: { /* '968' */ + return 0x43FE + } + case 969: { /* '969' */ + return 0x43FE + } + case 97: { /* '97' */ + return 0x4400 + } + case 970: { /* '970' */ + return 0x43FE + } + case 971: { /* '971' */ + return 0x43FE + } + case 972: { /* '972' */ + return 0x43FE + } + case 973: { /* '973' */ + return 0x43FE + } + case 974: { /* '974' */ + return 0x43FE + } + case 975: { /* '975' */ + return 0x43FE + } + case 976: { /* '976' */ + return 0x43FE + } + case 977: { /* '977' */ + return 0x43FE + } + case 978: { /* '978' */ + return 0x43FE + } + case 979: { /* '979' */ + return 0x43FE + } + case 98: { /* '98' */ + return 0x4400 + } + case 980: { /* '980' */ + return 0x43FE + } + case 981: { /* '981' */ + return 0x43FE + } + case 982: { /* '982' */ + return 0x43FE + } + case 983: { /* '983' */ + return 0x43FE + } + case 984: { /* '984' */ + return 0x43FE + } + case 985: { /* '985' */ + return 0x43FE + } + case 986: { /* '986' */ + return 0x43FE + } + case 987: { /* '987' */ + return 0x43FE + } + case 988: { /* '988' */ + return 0x43FE + } + case 989: { /* '989' */ + return 0x416C + } + case 99: { /* '99' */ + return 0x4400 + } + case 990: { /* '990' */ + return 0x416C + } + case 991: { /* '991' */ + return 0x416C + } + case 992: { /* '992' */ + return 0x4400 + } + case 993: { /* '993' */ + return 0x43FF + } + case 994: { /* '994' */ + return 0x4324 + } + case 995: { /* '995' */ + return 0x43FC + } + case 996: { /* '996' */ + return 0x43FC + } + case 997: { /* '997' */ + return 0x43FC + } + case 998: { /* '998' */ + return 0x43FC + } + case 999: { /* '999' */ + return 0x43FC + } + default: { + return 0 + } + } +} + +func ComObjectTableAddressesFirstEnumForFieldComObjectTableAddress(value uint16) (ComObjectTableAddresses, error) { + for _, sizeValue := range ComObjectTableAddressesValues { + if sizeValue.ComObjectTableAddress() == value { + return sizeValue, nil + } + } + return 0, errors.Errorf("enum for %v describing ComObjectTableAddress not found", value) +} +func ComObjectTableAddressesByValue(value uint16) (enum ComObjectTableAddresses, ok bool) { + switch value { + case 1: + return ComObjectTableAddresses_DEV0001914201, true + case 10: + return ComObjectTableAddresses_DEV0064181910, true + case 100: + return ComObjectTableAddresses_DEV007112221E, true + case 1000: + return ComObjectTableAddresses_DEV0019E30610, true + case 1001: + return ComObjectTableAddresses_DEV0019E30710, true + case 1002: + return ComObjectTableAddresses_DEV0019E30910, true + case 1003: + return ComObjectTableAddresses_DEV0019E30810, true + case 1004: + return ComObjectTableAddresses_DEV0019E25510, true + case 1005: + return ComObjectTableAddresses_DEV0019E20410, true + case 1006: + return ComObjectTableAddresses_DEV0019E20310, true + case 1007: + return ComObjectTableAddresses_DEV0019E25610, true + case 1008: + return ComObjectTableAddresses_DEV0019512010, true + case 1009: + return ComObjectTableAddresses_DEV0019520C10, true + case 101: + return ComObjectTableAddresses_DEV0071122229, true + case 1010: + return ComObjectTableAddresses_DEV0019520710, true + case 1011: + return ComObjectTableAddresses_DEV0019520210, true + case 1012: + return ComObjectTableAddresses_DEV0019E25010, true + case 1013: + return ComObjectTableAddresses_DEV0019E25110, true + case 1014: + return ComObjectTableAddresses_DEV0019130710, true + case 1015: + return ComObjectTableAddresses_DEV0019272050, true + case 1016: + return ComObjectTableAddresses_DEV0019520910, true + case 1017: + return ComObjectTableAddresses_DEV0019520A10, true + case 1018: + return ComObjectTableAddresses_DEV0019520B10, true + case 1019: + return ComObjectTableAddresses_DEV0019520412, true + case 102: + return ComObjectTableAddresses_DEV0071413314, true + case 1020: + return ComObjectTableAddresses_DEV0019520812, true + case 1021: + return ComObjectTableAddresses_DEV0019512510, true + case 1022: + return ComObjectTableAddresses_DEV0019512410, true + case 1023: + return ComObjectTableAddresses_DEV0019512610, true + case 1024: + return ComObjectTableAddresses_DEV0019511711, true + case 1025: + return ComObjectTableAddresses_DEV0019511811, true + case 1026: + return ComObjectTableAddresses_DEV0019522212, true + case 1027: + return ComObjectTableAddresses_DEV0019FF0716, true + case 1028: + return ComObjectTableAddresses_DEV0019FF1420, true + case 1029: + return ComObjectTableAddresses_DEV0019522112, true + case 103: + return ComObjectTableAddresses_DEV0072300110, true + case 1030: + return ComObjectTableAddresses_DEV0019522011, true + case 1031: + return ComObjectTableAddresses_DEV0019522311, true + case 1032: + return ComObjectTableAddresses_DEV0019E12410, true + case 1033: + return ComObjectTableAddresses_DEV0019000311, true + case 1034: + return ComObjectTableAddresses_DEV0019000411, true + case 1035: + return ComObjectTableAddresses_DEV0019070210, true + case 1036: + return ComObjectTableAddresses_DEV0019070E11, true + case 1037: + return ComObjectTableAddresses_DEV0019724010, true + case 1038: + return ComObjectTableAddresses_DEV0019520610, true + case 1039: + return ComObjectTableAddresses_DEV0019520510, true + case 104: + return ComObjectTableAddresses_DEV0076002101, true + case 1040: + return ComObjectTableAddresses_DEV0019E30B11, true + case 1041: + return ComObjectTableAddresses_DEV0019512710, true + case 1042: + return ComObjectTableAddresses_DEV0019512810, true + case 1043: + return ComObjectTableAddresses_DEV0019512910, true + case 1044: + return ComObjectTableAddresses_DEV0019E30D10, true + case 1045: + return ComObjectTableAddresses_DEV0019512313, true + case 1046: + return ComObjectTableAddresses_DEV0019512213, true + case 1047: + return ComObjectTableAddresses_DEV0019512112, true + case 1048: + return ComObjectTableAddresses_DEV0019512113, true + case 1049: + return ComObjectTableAddresses_DEV0019520D11, true + case 105: + return ComObjectTableAddresses_DEV0076002001, true + case 1050: + return ComObjectTableAddresses_DEV0019E30B12, true + case 1051: + return ComObjectTableAddresses_DEV0019530812, true + case 1052: + return ComObjectTableAddresses_DEV0019530912, true + case 1053: + return ComObjectTableAddresses_DEV0019530612, true + case 1054: + return ComObjectTableAddresses_DEV0019530711, true + case 1055: + return ComObjectTableAddresses_DEV0019494712, true + case 1056: + return ComObjectTableAddresses_DEV0019E30A11, true + case 1057: + return ComObjectTableAddresses_DEV00FB101111, true + case 1058: + return ComObjectTableAddresses_DEV00FB103001, true + case 1059: + return ComObjectTableAddresses_DEV00FB104401, true + case 106: + return ComObjectTableAddresses_DEV0076002A15, true + case 1060: + return ComObjectTableAddresses_DEV00FB124002, true + case 1061: + return ComObjectTableAddresses_DEV00FB104102, true + case 1062: + return ComObjectTableAddresses_DEV00FB104201, true + case 1063: + return ComObjectTableAddresses_DEV00FBF77603, true + case 1064: + return ComObjectTableAddresses_DEV00FB104301, true + case 1065: + return ComObjectTableAddresses_DEV00FB104601, true + case 1066: + return ComObjectTableAddresses_DEV00FB104701, true + case 1067: + return ComObjectTableAddresses_DEV00FB105101, true + case 1068: + return ComObjectTableAddresses_DEV00FC00C000, true + case 1069: + return ComObjectTableAddresses_DEV0103030110, true + case 107: + return ComObjectTableAddresses_DEV0076002815, true + case 1070: + return ComObjectTableAddresses_DEV0103010113, true + case 1071: + return ComObjectTableAddresses_DEV0103090110, true + case 1072: + return ComObjectTableAddresses_DEV0103020111, true + case 1073: + return ComObjectTableAddresses_DEV0103020112, true + case 1074: + return ComObjectTableAddresses_DEV0103040110, true + case 1075: + return ComObjectTableAddresses_DEV0103050111, true + case 1076: + return ComObjectTableAddresses_DEV0107000301, true + case 1077: + return ComObjectTableAddresses_DEV0107000101, true + case 1078: + return ComObjectTableAddresses_DEV0107000201, true + case 1079: + return ComObjectTableAddresses_DEV0107020801, true + case 108: + return ComObjectTableAddresses_DEV0076002215, true + case 1080: + return ComObjectTableAddresses_DEV0107020401, true + case 1081: + return ComObjectTableAddresses_DEV0107020001, true + case 1082: + return ComObjectTableAddresses_DEV010701F801, true + case 1083: + return ComObjectTableAddresses_DEV010701FC01, true + case 1084: + return ComObjectTableAddresses_DEV0107020C01, true + case 1085: + return ComObjectTableAddresses_DEV010F100801, true + case 1086: + return ComObjectTableAddresses_DEV010F100601, true + case 1087: + return ComObjectTableAddresses_DEV010F100401, true + case 1088: + return ComObjectTableAddresses_DEV010F030601, true + case 1089: + return ComObjectTableAddresses_DEV010F010301, true + case 109: + return ComObjectTableAddresses_DEV0076002B15, true + case 1090: + return ComObjectTableAddresses_DEV010F010101, true + case 1091: + return ComObjectTableAddresses_DEV010F010201, true + case 1092: + return ComObjectTableAddresses_DEV010F000302, true + case 1093: + return ComObjectTableAddresses_DEV010F000402, true + case 1094: + return ComObjectTableAddresses_DEV010F000102, true + case 1095: + return ComObjectTableAddresses_DEV011A4B5201, true + case 1096: + return ComObjectTableAddresses_DEV011EBB8211, true + case 1097: + return ComObjectTableAddresses_DEV011E108111, true + case 1098: + return ComObjectTableAddresses_DEV011EBC3011, true + case 1099: + return ComObjectTableAddresses_DEV011EBC2E11, true + case 11: + return ComObjectTableAddresses_DEV0064181810, true + case 110: + return ComObjectTableAddresses_DEV0076002715, true + case 1100: + return ComObjectTableAddresses_DEV011EBC2F11, true + case 1101: + return ComObjectTableAddresses_DEV0123010010, true + case 1102: + return ComObjectTableAddresses_DEV012B010110, true + case 1103: + return ComObjectTableAddresses_DEV001E478010, true + case 1104: + return ComObjectTableAddresses_DEV001E706611, true + case 1105: + return ComObjectTableAddresses_DEV001E706811, true + case 1106: + return ComObjectTableAddresses_DEV001E473012, true + case 1107: + return ComObjectTableAddresses_DEV001E20A011, true + case 1108: + return ComObjectTableAddresses_DEV001E209011, true + case 1109: + return ComObjectTableAddresses_DEV001E209811, true + case 111: + return ComObjectTableAddresses_DEV0076002315, true + case 1110: + return ComObjectTableAddresses_DEV001E208811, true + case 1111: + return ComObjectTableAddresses_DEV001E208011, true + case 1112: + return ComObjectTableAddresses_DEV001E207821, true + case 1113: + return ComObjectTableAddresses_DEV001E20CA12, true + case 1114: + return ComObjectTableAddresses_DEV001E20B312, true + case 1115: + return ComObjectTableAddresses_DEV001E20B012, true + case 1116: + return ComObjectTableAddresses_DEV001E302612, true + case 1117: + return ComObjectTableAddresses_DEV001E302312, true + case 1118: + return ComObjectTableAddresses_DEV001E302012, true + case 1119: + return ComObjectTableAddresses_DEV001E20A811, true + case 112: + return ComObjectTableAddresses_DEV0076002415, true + case 1120: + return ComObjectTableAddresses_DEV001E20C412, true + case 1121: + return ComObjectTableAddresses_DEV001E20C712, true + case 1122: + return ComObjectTableAddresses_DEV001E20AD12, true + case 1123: + return ComObjectTableAddresses_DEV001E443720, true + case 1124: + return ComObjectTableAddresses_DEV001E441821, true + case 1125: + return ComObjectTableAddresses_DEV001E443810, true + case 1126: + return ComObjectTableAddresses_DEV001E140C12, true + case 1127: + return ComObjectTableAddresses_DEV001E471611, true + case 1128: + return ComObjectTableAddresses_DEV001E479024, true + case 1129: + return ComObjectTableAddresses_DEV001E471A11, true + case 113: + return ComObjectTableAddresses_DEV0076002615, true + case 1130: + return ComObjectTableAddresses_DEV001E477A10, true + case 1131: + return ComObjectTableAddresses_DEV001E470A11, true + case 1132: + return ComObjectTableAddresses_DEV001E480B11, true + case 1133: + return ComObjectTableAddresses_DEV001E487B10, true + case 1134: + return ComObjectTableAddresses_DEV001E440411, true + case 1135: + return ComObjectTableAddresses_DEV001E447211, true + case 1136: + return ComObjectTableAddresses_DEV0142010011, true + case 1137: + return ComObjectTableAddresses_DEV0142010010, true + case 1138: + return ComObjectTableAddresses_DEV014F030112, true + case 1139: + return ComObjectTableAddresses_DEV014F030212, true + case 114: + return ComObjectTableAddresses_DEV0076002515, true + case 1140: + return ComObjectTableAddresses_DEV014F030312, true + case 1141: + return ComObjectTableAddresses_DEV0158100122, true + case 1142: + return ComObjectTableAddresses_DEV017A130401, true + case 1143: + return ComObjectTableAddresses_DEV017A130201, true + case 1144: + return ComObjectTableAddresses_DEV017A130801, true + case 1145: + return ComObjectTableAddresses_DEV017A130601, true + case 1146: + return ComObjectTableAddresses_DEV017A300102, true + case 1147: + return ComObjectTableAddresses_DEV000410A411, true + case 1148: + return ComObjectTableAddresses_DEV0004109911, true + case 1149: + return ComObjectTableAddresses_DEV0004109912, true + case 115: + return ComObjectTableAddresses_DEV0076000201, true + case 1150: + return ComObjectTableAddresses_DEV0004109913, true + case 1151: + return ComObjectTableAddresses_DEV0004109914, true + case 1152: + return ComObjectTableAddresses_DEV000410A211, true + case 1153: + return ComObjectTableAddresses_DEV000410FC12, true + case 1154: + return ComObjectTableAddresses_DEV000410FD12, true + case 1155: + return ComObjectTableAddresses_DEV000410B212, true + case 1156: + return ComObjectTableAddresses_DEV0004110B11, true + case 1157: + return ComObjectTableAddresses_DEV0004110711, true + case 1158: + return ComObjectTableAddresses_DEV000410B213, true + case 1159: + return ComObjectTableAddresses_DEV0004109811, true + case 116: + return ComObjectTableAddresses_DEV0076000101, true + case 1160: + return ComObjectTableAddresses_DEV0004109812, true + case 1161: + return ComObjectTableAddresses_DEV0004109813, true + case 1162: + return ComObjectTableAddresses_DEV0004109814, true + case 1163: + return ComObjectTableAddresses_DEV000410A011, true + case 1164: + return ComObjectTableAddresses_DEV000410A111, true + case 1165: + return ComObjectTableAddresses_DEV000410FA12, true + case 1166: + return ComObjectTableAddresses_DEV000410FB12, true + case 1167: + return ComObjectTableAddresses_DEV000410B112, true + case 1168: + return ComObjectTableAddresses_DEV0004110A11, true + case 1169: + return ComObjectTableAddresses_DEV0004110611, true + case 117: + return ComObjectTableAddresses_DEV0076000301, true + case 1170: + return ComObjectTableAddresses_DEV000410B113, true + case 1171: + return ComObjectTableAddresses_DEV0004109A11, true + case 1172: + return ComObjectTableAddresses_DEV0004109A12, true + case 1173: + return ComObjectTableAddresses_DEV0004109A13, true + case 1174: + return ComObjectTableAddresses_DEV0004109A14, true + case 1175: + return ComObjectTableAddresses_DEV000410A311, true + case 1176: + return ComObjectTableAddresses_DEV000410B312, true + case 1177: + return ComObjectTableAddresses_DEV0004110C11, true + case 1178: + return ComObjectTableAddresses_DEV0004110811, true + case 1179: + return ComObjectTableAddresses_DEV000410B313, true + case 118: + return ComObjectTableAddresses_DEV0076000401, true + case 1180: + return ComObjectTableAddresses_DEV0004109B11, true + case 1181: + return ComObjectTableAddresses_DEV0004109B12, true + case 1182: + return ComObjectTableAddresses_DEV0004109B13, true + case 1183: + return ComObjectTableAddresses_DEV0004109B14, true + case 1184: + return ComObjectTableAddresses_DEV000410A511, true + case 1185: + return ComObjectTableAddresses_DEV000410B412, true + case 1186: + return ComObjectTableAddresses_DEV0004110D11, true + case 1187: + return ComObjectTableAddresses_DEV0004110911, true + case 1188: + return ComObjectTableAddresses_DEV000410B413, true + case 1189: + return ComObjectTableAddresses_DEV0004109C11, true + case 119: + return ComObjectTableAddresses_DEV0076002903, true + case 1190: + return ComObjectTableAddresses_DEV0004109C12, true + case 1191: + return ComObjectTableAddresses_DEV0004109C13, true + case 1192: + return ComObjectTableAddresses_DEV0004109C14, true + case 1193: + return ComObjectTableAddresses_DEV000410A611, true + case 1194: + return ComObjectTableAddresses_DEV0004147211, true + case 1195: + return ComObjectTableAddresses_DEV000410FE12, true + case 1196: + return ComObjectTableAddresses_DEV0004209016, true + case 1197: + return ComObjectTableAddresses_DEV000420A011, true + case 1198: + return ComObjectTableAddresses_DEV0004209011, true + case 1199: + return ComObjectTableAddresses_DEV000420CA11, true + case 12: + return ComObjectTableAddresses_DEV0064181710, true + case 120: + return ComObjectTableAddresses_DEV0076002901, true + case 1200: + return ComObjectTableAddresses_DEV0004208012, true + case 1201: + return ComObjectTableAddresses_DEV0004207812, true + case 1202: + return ComObjectTableAddresses_DEV000420BA11, true + case 1203: + return ComObjectTableAddresses_DEV000420B311, true + case 1204: + return ComObjectTableAddresses_DEV0004209811, true + case 1205: + return ComObjectTableAddresses_DEV0004208811, true + case 1206: + return ComObjectTableAddresses_DEV0004B00812, true + case 1207: + return ComObjectTableAddresses_DEV0004302613, true + case 1208: + return ComObjectTableAddresses_DEV0004302313, true + case 1209: + return ComObjectTableAddresses_DEV0004302013, true + case 121: + return ComObjectTableAddresses_DEV007600E503, true + case 1210: + return ComObjectTableAddresses_DEV0004302B12, true + case 1211: + return ComObjectTableAddresses_DEV0004705D11, true + case 1212: + return ComObjectTableAddresses_DEV0004705C11, true + case 1213: + return ComObjectTableAddresses_DEV0004B00713, true + case 1214: + return ComObjectTableAddresses_DEV0004B00A01, true + case 1215: + return ComObjectTableAddresses_DEV0004706611, true + case 1216: + return ComObjectTableAddresses_DEV0004C01410, true + case 1217: + return ComObjectTableAddresses_DEV0004C00102, true + case 1218: + return ComObjectTableAddresses_DEV0004705E11, true + case 1219: + return ComObjectTableAddresses_DEV0004706211, true + case 122: + return ComObjectTableAddresses_DEV0076004002, true + case 1220: + return ComObjectTableAddresses_DEV0004706412, true + case 1221: + return ComObjectTableAddresses_DEV000420C011, true + case 1222: + return ComObjectTableAddresses_DEV000420B011, true + case 1223: + return ComObjectTableAddresses_DEV0004B00911, true + case 1224: + return ComObjectTableAddresses_DEV0004A01211, true + case 1225: + return ComObjectTableAddresses_DEV0004A01112, true + case 1226: + return ComObjectTableAddresses_DEV0004A01111, true + case 1227: + return ComObjectTableAddresses_DEV0004A01212, true + case 1228: + return ComObjectTableAddresses_DEV0004A03312, true + case 1229: + return ComObjectTableAddresses_DEV0004A03212, true + case 123: + return ComObjectTableAddresses_DEV0076004003, true + case 1230: + return ComObjectTableAddresses_DEV0004A01113, true + case 1231: + return ComObjectTableAddresses_DEV0004A01711, true + case 1232: + return ComObjectTableAddresses_DEV000420C711, true + case 1233: + return ComObjectTableAddresses_DEV000420BD11, true + case 1234: + return ComObjectTableAddresses_DEV000420C411, true + case 1235: + return ComObjectTableAddresses_DEV000420A812, true + case 1236: + return ComObjectTableAddresses_DEV000420CD11, true + case 1237: + return ComObjectTableAddresses_DEV000420AD11, true + case 1238: + return ComObjectTableAddresses_DEV000420B611, true + case 1239: + return ComObjectTableAddresses_DEV000420A811, true + case 124: + return ComObjectTableAddresses_DEV0076003402, true + case 1240: + return ComObjectTableAddresses_DEV0004501311, true + case 1241: + return ComObjectTableAddresses_DEV0004501411, true + case 1242: + return ComObjectTableAddresses_DEV0004B01002, true + case 1243: + return ComObjectTableAddresses_DEV0193323C11, true + case 1244: + return ComObjectTableAddresses_DEV0198101110, true + case 1245: + return ComObjectTableAddresses_DEV002C060210, true + case 1246: + return ComObjectTableAddresses_DEV002CA00213, true + case 1247: + return ComObjectTableAddresses_DEV002CA0A611, true + case 1248: + return ComObjectTableAddresses_DEV002CA0A616, true + case 1249: + return ComObjectTableAddresses_DEV002CA07B11, true + case 125: + return ComObjectTableAddresses_DEV0076003401, true + case 1250: + return ComObjectTableAddresses_DEV002C063210, true + case 1251: + return ComObjectTableAddresses_DEV002C063110, true + case 1252: + return ComObjectTableAddresses_DEV002C062E10, true + case 1253: + return ComObjectTableAddresses_DEV002C062C10, true + case 1254: + return ComObjectTableAddresses_DEV002C062D10, true + case 1255: + return ComObjectTableAddresses_DEV002C063310, true + case 1256: + return ComObjectTableAddresses_DEV002C05EB10, true + case 1257: + return ComObjectTableAddresses_DEV002C05F110, true + case 1258: + return ComObjectTableAddresses_DEV002C060E11, true + case 1259: + return ComObjectTableAddresses_DEV002C0B8830, true + case 126: + return ComObjectTableAddresses_DEV007600E908, true + case 1260: + return ComObjectTableAddresses_DEV002CA01811, true + case 1261: + return ComObjectTableAddresses_DEV002CA07033, true + case 1262: + return ComObjectTableAddresses_DEV002C555020, true + case 1263: + return ComObjectTableAddresses_DEV002C556421, true + case 1264: + return ComObjectTableAddresses_DEV002C05F211, true + case 1265: + return ComObjectTableAddresses_DEV002C05F411, true + case 1266: + return ComObjectTableAddresses_DEV002C05E613, true + case 1267: + return ComObjectTableAddresses_DEV002CA07914, true + case 1268: + return ComObjectTableAddresses_DEV002C060A13, true + case 1269: + return ComObjectTableAddresses_DEV002C3A0212, true + case 127: + return ComObjectTableAddresses_DEV007600E907, true + case 1270: + return ComObjectTableAddresses_DEV01C4030110, true + case 1271: + return ComObjectTableAddresses_DEV01C4030210, true + case 1272: + return ComObjectTableAddresses_DEV01C4021210, true + case 1273: + return ComObjectTableAddresses_DEV01C4001010, true + case 1274: + return ComObjectTableAddresses_DEV01C4020610, true + case 1275: + return ComObjectTableAddresses_DEV01C4020910, true + case 1276: + return ComObjectTableAddresses_DEV01C4020810, true + case 1277: + return ComObjectTableAddresses_DEV01C4010710, true + case 1278: + return ComObjectTableAddresses_DEV01C4050210, true + case 1279: + return ComObjectTableAddresses_DEV01C4010810, true + case 128: + return ComObjectTableAddresses_DEV000C181710, true + case 1280: + return ComObjectTableAddresses_DEV01C4020510, true + case 1281: + return ComObjectTableAddresses_DEV01C4040110, true + case 1282: + return ComObjectTableAddresses_DEV01C4040310, true + case 1283: + return ComObjectTableAddresses_DEV01C4040210, true + case 1284: + return ComObjectTableAddresses_DEV01C4101210, true + case 1285: + return ComObjectTableAddresses_DEV01C6093110, true + case 1286: + return ComObjectTableAddresses_DEV01C8003422, true + case 1287: + return ComObjectTableAddresses_DEV01DB000301, true + case 1288: + return ComObjectTableAddresses_DEV01DB000201, true + case 1289: + return ComObjectTableAddresses_DEV01DB000401, true + case 129: + return ComObjectTableAddresses_DEV000C130510, true + case 1290: + return ComObjectTableAddresses_DEV01DB000801, true + case 1291: + return ComObjectTableAddresses_DEV01DB001201, true + case 1292: + return ComObjectTableAddresses_DEV01F6E0E110, true + case 1293: + return ComObjectTableAddresses_DEV0006D00610, true + case 1294: + return ComObjectTableAddresses_DEV0006D01510, true + case 1295: + return ComObjectTableAddresses_DEV0006D00110, true + case 1296: + return ComObjectTableAddresses_DEV0006D00310, true + case 1297: + return ComObjectTableAddresses_DEV0006D03210, true + case 1298: + return ComObjectTableAddresses_DEV0006D03310, true + case 1299: + return ComObjectTableAddresses_DEV0006D02E20, true + case 13: + return ComObjectTableAddresses_DEV0064181610, true + case 130: + return ComObjectTableAddresses_DEV000C130610, true + case 1300: + return ComObjectTableAddresses_DEV0006D02F20, true + case 1301: + return ComObjectTableAddresses_DEV0006D03020, true + case 1302: + return ComObjectTableAddresses_DEV0006D03120, true + case 1303: + return ComObjectTableAddresses_DEV0006D02110, true + case 1304: + return ComObjectTableAddresses_DEV0006D00010, true + case 1305: + return ComObjectTableAddresses_DEV0006D01810, true + case 1306: + return ComObjectTableAddresses_DEV0006D00910, true + case 1307: + return ComObjectTableAddresses_DEV0006D01110, true + case 1308: + return ComObjectTableAddresses_DEV0006D03510, true + case 1309: + return ComObjectTableAddresses_DEV0006D03410, true + case 131: + return ComObjectTableAddresses_DEV000C133610, true + case 1310: + return ComObjectTableAddresses_DEV0006D02410, true + case 1311: + return ComObjectTableAddresses_DEV0006D02510, true + case 1312: + return ComObjectTableAddresses_DEV0006D00810, true + case 1313: + return ComObjectTableAddresses_DEV0006D00710, true + case 1314: + return ComObjectTableAddresses_DEV0006D01310, true + case 1315: + return ComObjectTableAddresses_DEV0006D01410, true + case 1316: + return ComObjectTableAddresses_DEV0006D00210, true + case 1317: + return ComObjectTableAddresses_DEV0006D00510, true + case 1318: + return ComObjectTableAddresses_DEV0006D00410, true + case 1319: + return ComObjectTableAddresses_DEV0006D02210, true + case 132: + return ComObjectTableAddresses_DEV000C133410, true + case 1320: + return ComObjectTableAddresses_DEV0006D02310, true + case 1321: + return ComObjectTableAddresses_DEV0006D01710, true + case 1322: + return ComObjectTableAddresses_DEV0006D01610, true + case 1323: + return ComObjectTableAddresses_DEV0006D01010, true + case 1324: + return ComObjectTableAddresses_DEV0006D01210, true + case 1325: + return ComObjectTableAddresses_DEV0006D04820, true + case 1326: + return ComObjectTableAddresses_DEV0006D04C11, true + case 1327: + return ComObjectTableAddresses_DEV0006D05610, true + case 1328: + return ComObjectTableAddresses_DEV0006D02910, true + case 1329: + return ComObjectTableAddresses_DEV0006D02A10, true + case 133: + return ComObjectTableAddresses_DEV000C133310, true + case 1330: + return ComObjectTableAddresses_DEV0006D02B10, true + case 1331: + return ComObjectTableAddresses_DEV0006D02C10, true + case 1332: + return ComObjectTableAddresses_DEV0006D02810, true + case 1333: + return ComObjectTableAddresses_DEV0006D02610, true + case 1334: + return ComObjectTableAddresses_DEV0006D02710, true + case 1335: + return ComObjectTableAddresses_DEV0006D03610, true + case 1336: + return ComObjectTableAddresses_DEV0006D03710, true + case 1337: + return ComObjectTableAddresses_DEV0006D02D11, true + case 1338: + return ComObjectTableAddresses_DEV0006D03C10, true + case 1339: + return ComObjectTableAddresses_DEV0006D03B10, true + case 134: + return ComObjectTableAddresses_DEV000C133611, true + case 1340: + return ComObjectTableAddresses_DEV0006D03910, true + case 1341: + return ComObjectTableAddresses_DEV0006D03A10, true + case 1342: + return ComObjectTableAddresses_DEV0006D03D11, true + case 1343: + return ComObjectTableAddresses_DEV0006D03E10, true + case 1344: + return ComObjectTableAddresses_DEV0006C00102, true + case 1345: + return ComObjectTableAddresses_DEV0006E05611, true + case 1346: + return ComObjectTableAddresses_DEV0006E05212, true + case 1347: + return ComObjectTableAddresses_DEV000620B011, true + case 1348: + return ComObjectTableAddresses_DEV000620B311, true + case 1349: + return ComObjectTableAddresses_DEV000620C011, true + case 135: + return ComObjectTableAddresses_DEV000C133510, true + case 1350: + return ComObjectTableAddresses_DEV000620BA11, true + case 1351: + return ComObjectTableAddresses_DEV0006705C11, true + case 1352: + return ComObjectTableAddresses_DEV0006705D11, true + case 1353: + return ComObjectTableAddresses_DEV0006E07710, true + case 1354: + return ComObjectTableAddresses_DEV0006E07712, true + case 1355: + return ComObjectTableAddresses_DEV0006706210, true + case 1356: + return ComObjectTableAddresses_DEV0006302611, true + case 1357: + return ComObjectTableAddresses_DEV0006302612, true + case 1358: + return ComObjectTableAddresses_DEV0006E00810, true + case 1359: + return ComObjectTableAddresses_DEV0006E01F01, true + case 136: + return ComObjectTableAddresses_DEV000C130710, true + case 1360: + return ComObjectTableAddresses_DEV0006302311, true + case 1361: + return ComObjectTableAddresses_DEV0006302312, true + case 1362: + return ComObjectTableAddresses_DEV0006E00910, true + case 1363: + return ComObjectTableAddresses_DEV0006E02001, true + case 1364: + return ComObjectTableAddresses_DEV0006302011, true + case 1365: + return ComObjectTableAddresses_DEV0006302012, true + case 1366: + return ComObjectTableAddresses_DEV0006C00C13, true + case 1367: + return ComObjectTableAddresses_DEV0006E00811, true + case 1368: + return ComObjectTableAddresses_DEV0006E00911, true + case 1369: + return ComObjectTableAddresses_DEV0006E01F20, true + case 137: + return ComObjectTableAddresses_DEV000C760210, true + case 1370: + return ComObjectTableAddresses_DEV0006E03410, true + case 1371: + return ComObjectTableAddresses_DEV0006E03110, true + case 1372: + return ComObjectTableAddresses_DEV0006E0A210, true + case 1373: + return ComObjectTableAddresses_DEV0006E0CE10, true + case 1374: + return ComObjectTableAddresses_DEV0006E0A111, true + case 1375: + return ComObjectTableAddresses_DEV0006E0CD11, true + case 1376: + return ComObjectTableAddresses_DEV0006E02020, true + case 1377: + return ComObjectTableAddresses_DEV0006E02D11, true + case 1378: + return ComObjectTableAddresses_DEV0006E03011, true + case 1379: + return ComObjectTableAddresses_DEV0006E0C110, true + case 138: + return ComObjectTableAddresses_DEV000C1BD610, true + case 1380: + return ComObjectTableAddresses_DEV0006E0C510, true + case 1381: + return ComObjectTableAddresses_DEV0006B00A01, true + case 1382: + return ComObjectTableAddresses_DEV0006B00602, true + case 1383: + return ComObjectTableAddresses_DEV0006E0C410, true + case 1384: + return ComObjectTableAddresses_DEV0006E0C312, true + case 1385: + return ComObjectTableAddresses_DEV0006E0C210, true + case 1386: + return ComObjectTableAddresses_DEV0006209016, true + case 1387: + return ComObjectTableAddresses_DEV0006E01A01, true + case 1388: + return ComObjectTableAddresses_DEV0006E09910, true + case 1389: + return ComObjectTableAddresses_DEV0006E03710, true + case 139: + return ComObjectTableAddresses_DEV000C181610, true + case 1390: + return ComObjectTableAddresses_DEV0006209011, true + case 1391: + return ComObjectTableAddresses_DEV000620A011, true + case 1392: + return ComObjectTableAddresses_DEV0006E02410, true + case 1393: + return ComObjectTableAddresses_DEV0006E02301, true + case 1394: + return ComObjectTableAddresses_DEV0006E02510, true + case 1395: + return ComObjectTableAddresses_DEV0006E01B01, true + case 1396: + return ComObjectTableAddresses_DEV0006E01C01, true + case 1397: + return ComObjectTableAddresses_DEV0006E01D01, true + case 1398: + return ComObjectTableAddresses_DEV0006E01E01, true + case 1399: + return ComObjectTableAddresses_DEV0006207812, true + case 14: + return ComObjectTableAddresses_DEV006420C011, true + case 140: + return ComObjectTableAddresses_DEV000C648B10, true + case 1400: + return ComObjectTableAddresses_DEV0006B00811, true + case 1401: + return ComObjectTableAddresses_DEV0006E01001, true + case 1402: + return ComObjectTableAddresses_DEV0006E03610, true + case 1403: + return ComObjectTableAddresses_DEV0006E09810, true + case 1404: + return ComObjectTableAddresses_DEV0006208811, true + case 1405: + return ComObjectTableAddresses_DEV0006209811, true + case 1406: + return ComObjectTableAddresses_DEV0006E02610, true + case 1407: + return ComObjectTableAddresses_DEV0006E02710, true + case 1408: + return ComObjectTableAddresses_DEV0006E02A10, true + case 1409: + return ComObjectTableAddresses_DEV0006E02B10, true + case 141: + return ComObjectTableAddresses_DEV000C480611, true + case 1410: + return ComObjectTableAddresses_DEV0006E00C10, true + case 1411: + return ComObjectTableAddresses_DEV0006010110, true + case 1412: + return ComObjectTableAddresses_DEV0006010210, true + case 1413: + return ComObjectTableAddresses_DEV0006E00B10, true + case 1414: + return ComObjectTableAddresses_DEV0006E09C10, true + case 1415: + return ComObjectTableAddresses_DEV0006E09B10, true + case 1416: + return ComObjectTableAddresses_DEV0006E03510, true + case 1417: + return ComObjectTableAddresses_DEV0006FF1B11, true + case 1418: + return ComObjectTableAddresses_DEV0006E0CF10, true + case 1419: + return ComObjectTableAddresses_DEV000620A812, true + case 142: + return ComObjectTableAddresses_DEV000C482011, true + case 1420: + return ComObjectTableAddresses_DEV000620CD11, true + case 1421: + return ComObjectTableAddresses_DEV0006E00E01, true + case 1422: + return ComObjectTableAddresses_DEV0006E02201, true + case 1423: + return ComObjectTableAddresses_DEV000620AD11, true + case 1424: + return ComObjectTableAddresses_DEV0006E00F01, true + case 1425: + return ComObjectTableAddresses_DEV0006E02101, true + case 1426: + return ComObjectTableAddresses_DEV000620BD11, true + case 1427: + return ComObjectTableAddresses_DEV0006E00D01, true + case 1428: + return ComObjectTableAddresses_DEV0006E03910, true + case 1429: + return ComObjectTableAddresses_DEV0006E02810, true + case 143: + return ComObjectTableAddresses_DEV000C724010, true + case 1430: + return ComObjectTableAddresses_DEV0006E02910, true + case 1431: + return ComObjectTableAddresses_DEV0006E02C10, true + case 1432: + return ComObjectTableAddresses_DEV0006C00403, true + case 1433: + return ComObjectTableAddresses_DEV0006590101, true + case 1434: + return ComObjectTableAddresses_DEV0006E0CC11, true + case 1435: + return ComObjectTableAddresses_DEV0006E09A10, true + case 1436: + return ComObjectTableAddresses_DEV0006E03811, true + case 1437: + return ComObjectTableAddresses_DEV0006E0C710, true + case 1438: + return ComObjectTableAddresses_DEV0006E0C610, true + case 1439: + return ComObjectTableAddresses_DEV0006E05A10, true + case 144: + return ComObjectTableAddresses_DEV000C570211, true + case 1440: + return ComObjectTableAddresses_DEV003D020109, true + case 1441: + return ComObjectTableAddresses_DEV026310BA10, true + case 1442: + return ComObjectTableAddresses_DEV026D010601, true + case 1443: + return ComObjectTableAddresses_DEV026D000402, true + case 1444: + return ComObjectTableAddresses_DEV026D000302, true + case 1445: + return ComObjectTableAddresses_DEV026D000102, true + case 1446: + return ComObjectTableAddresses_DEV026D030601, true + case 1447: + return ComObjectTableAddresses_DEV026D130401, true + case 1448: + return ComObjectTableAddresses_DEV026D130801, true + case 1449: + return ComObjectTableAddresses_DEV026D300102, true + case 145: + return ComObjectTableAddresses_DEV000C570310, true + case 1450: + return ComObjectTableAddresses_DEV026D613813, true + case 1451: + return ComObjectTableAddresses_DEV0007613810, true + case 1452: + return ComObjectTableAddresses_DEV000720C011, true + case 1453: + return ComObjectTableAddresses_DEV0007A05210, true + case 1454: + return ComObjectTableAddresses_DEV0007A08B10, true + case 1455: + return ComObjectTableAddresses_DEV0007A05B32, true + case 1456: + return ComObjectTableAddresses_DEV0007A06932, true + case 1457: + return ComObjectTableAddresses_DEV0007A06D32, true + case 1458: + return ComObjectTableAddresses_DEV0007A08032, true + case 1459: + return ComObjectTableAddresses_DEV0007A09532, true + case 146: + return ComObjectTableAddresses_DEV000C570411, true + case 1460: + return ComObjectTableAddresses_DEV0007A06C32, true + case 1461: + return ComObjectTableAddresses_DEV0007A05E32, true + case 1462: + return ComObjectTableAddresses_DEV0007A08A32, true + case 1463: + return ComObjectTableAddresses_DEV0007A07032, true + case 1464: + return ComObjectTableAddresses_DEV0007A08332, true + case 1465: + return ComObjectTableAddresses_DEV0007A09832, true + case 1466: + return ComObjectTableAddresses_DEV0007A05C32, true + case 1467: + return ComObjectTableAddresses_DEV0007A06A32, true + case 1468: + return ComObjectTableAddresses_DEV0007A08832, true + case 1469: + return ComObjectTableAddresses_DEV0007A06E32, true + case 147: + return ComObjectTableAddresses_DEV000C570110, true + case 1470: + return ComObjectTableAddresses_DEV0007A08132, true + case 1471: + return ComObjectTableAddresses_DEV0007A09632, true + case 1472: + return ComObjectTableAddresses_DEV0007A05D32, true + case 1473: + return ComObjectTableAddresses_DEV0007A06B32, true + case 1474: + return ComObjectTableAddresses_DEV0007A08932, true + case 1475: + return ComObjectTableAddresses_DEV0007A06F32, true + case 1476: + return ComObjectTableAddresses_DEV0007A08232, true + case 1477: + return ComObjectTableAddresses_DEV0007A09732, true + case 1478: + return ComObjectTableAddresses_DEV0007A05713, true + case 1479: + return ComObjectTableAddresses_DEV0007A01911, true + case 148: + return ComObjectTableAddresses_DEV000C570011, true + case 1480: + return ComObjectTableAddresses_DEV000720BD11, true + case 1481: + return ComObjectTableAddresses_DEV000720BA11, true + case 1482: + return ComObjectTableAddresses_DEV0007A03D11, true + case 1483: + return ComObjectTableAddresses_DEV0007FF1115, true + case 1484: + return ComObjectTableAddresses_DEV0007A01511, true + case 1485: + return ComObjectTableAddresses_DEV0007A08411, true + case 1486: + return ComObjectTableAddresses_DEV0007A08511, true + case 1487: + return ComObjectTableAddresses_DEV0007A03422, true + case 1488: + return ComObjectTableAddresses_DEV0007A07213, true + case 1489: + return ComObjectTableAddresses_DEV0007613812, true + case 149: + return ComObjectTableAddresses_DEV000C20BD11, true + case 1490: + return ComObjectTableAddresses_DEV0007A07420, true + case 1491: + return ComObjectTableAddresses_DEV0007A07520, true + case 1492: + return ComObjectTableAddresses_DEV0007A07B12, true + case 1493: + return ComObjectTableAddresses_DEV0007A07C12, true + case 1494: + return ComObjectTableAddresses_DEV0007A07114, true + case 1495: + return ComObjectTableAddresses_DEV0007A09311, true + case 1496: + return ComObjectTableAddresses_DEV0007A09A12, true + case 1497: + return ComObjectTableAddresses_DEV0007A09211, true + case 1498: + return ComObjectTableAddresses_DEV0007A09111, true + case 1499: + return ComObjectTableAddresses_DEV0007632010, true + case 15: + return ComObjectTableAddresses_DEV006420BA11, true + case 150: + return ComObjectTableAddresses_DEV000C20BA11, true + case 1500: + return ComObjectTableAddresses_DEV0007632020, true + case 1501: + return ComObjectTableAddresses_DEV0007632170, true + case 1502: + return ComObjectTableAddresses_DEV0007632040, true + case 1503: + return ComObjectTableAddresses_DEV0007A09013, true + case 1504: + return ComObjectTableAddresses_DEV0007A08F13, true + case 1505: + return ComObjectTableAddresses_DEV0007A01811, true + case 1506: + return ComObjectTableAddresses_DEV0007A05814, true + case 1507: + return ComObjectTableAddresses_DEV0007A04912, true + case 1508: + return ComObjectTableAddresses_DEV0007A04312, true + case 1509: + return ComObjectTableAddresses_DEV0007A04412, true + case 151: + return ComObjectTableAddresses_DEV000C760110, true + case 1510: + return ComObjectTableAddresses_DEV0007A04512, true + case 1511: + return ComObjectTableAddresses_DEV0007A07E10, true + case 1512: + return ComObjectTableAddresses_DEV0007A05510, true + case 1513: + return ComObjectTableAddresses_DEV0007A05910, true + case 1514: + return ComObjectTableAddresses_DEV0007A08711, true + case 1515: + return ComObjectTableAddresses_DEV0007A07914, true + case 1516: + return ComObjectTableAddresses_DEV0007A06114, true + case 1517: + return ComObjectTableAddresses_DEV0007A06714, true + case 1518: + return ComObjectTableAddresses_DEV0007A06214, true + case 1519: + return ComObjectTableAddresses_DEV0007A06514, true + case 152: + return ComObjectTableAddresses_DEV000C705C01, true + case 1520: + return ComObjectTableAddresses_DEV0007A07714, true + case 1521: + return ComObjectTableAddresses_DEV0007A06014, true + case 1522: + return ComObjectTableAddresses_DEV0007A06614, true + case 1523: + return ComObjectTableAddresses_DEV0007A07814, true + case 1524: + return ComObjectTableAddresses_DEV0007A06414, true + case 1525: + return ComObjectTableAddresses_DEV0007A04B10, true + case 1526: + return ComObjectTableAddresses_DEV0007A09B12, true + case 1527: + return ComObjectTableAddresses_DEV0007A04F13, true + case 1528: + return ComObjectTableAddresses_DEV0007A04D13, true + case 1529: + return ComObjectTableAddresses_DEV0007A04C13, true + case 153: + return ComObjectTableAddresses_DEV000CFF2112, true + case 1530: + return ComObjectTableAddresses_DEV0007A04E13, true + case 1531: + return ComObjectTableAddresses_DEV0007A00113, true + case 1532: + return ComObjectTableAddresses_DEV0007A00213, true + case 1533: + return ComObjectTableAddresses_DEV0007A03D12, true + case 1534: + return ComObjectTableAddresses_DEV0048493A1C, true + case 1535: + return ComObjectTableAddresses_DEV0048494712, true + case 1536: + return ComObjectTableAddresses_DEV0048494810, true + case 1537: + return ComObjectTableAddresses_DEV0048855A10, true + case 1538: + return ComObjectTableAddresses_DEV0048855B10, true + case 1539: + return ComObjectTableAddresses_DEV0048A05713, true + case 154: + return ComObjectTableAddresses_DEV000C242313, true + case 1540: + return ComObjectTableAddresses_DEV0048494414, true + case 1541: + return ComObjectTableAddresses_DEV0048824A11, true + case 1542: + return ComObjectTableAddresses_DEV0048824A12, true + case 1543: + return ComObjectTableAddresses_DEV0048770A10, true + case 1544: + return ComObjectTableAddresses_DEV0048494311, true + case 1545: + return ComObjectTableAddresses_DEV0048494513, true + case 1546: + return ComObjectTableAddresses_DEV0048494012, true + case 1547: + return ComObjectTableAddresses_DEV0048494111, true + case 1548: + return ComObjectTableAddresses_DEV0048494210, true + case 1549: + return ComObjectTableAddresses_DEV0048494610, true + case 155: + return ComObjectTableAddresses_DEV000CB00812, true + case 1550: + return ComObjectTableAddresses_DEV0048494910, true + case 1551: + return ComObjectTableAddresses_DEV0048134A10, true + case 1552: + return ComObjectTableAddresses_DEV0048107E12, true + case 1553: + return ComObjectTableAddresses_DEV0048FF2112, true + case 1554: + return ComObjectTableAddresses_DEV0048140A11, true + case 1555: + return ComObjectTableAddresses_DEV0048140B12, true + case 1556: + return ComObjectTableAddresses_DEV0048140C13, true + case 1557: + return ComObjectTableAddresses_DEV0048139A10, true + case 1558: + return ComObjectTableAddresses_DEV0048648B10, true + case 1559: + return ComObjectTableAddresses_DEV0048494013, true + case 156: + return ComObjectTableAddresses_DEV000CB00713, true + case 1560: + return ComObjectTableAddresses_DEV0048494018, true + case 1561: + return ComObjectTableAddresses_DEV004E070031, true + case 1562: + return ComObjectTableAddresses_DEV004E030031, true + case 1563: + return ComObjectTableAddresses_DEV0008A01111, true + case 1564: + return ComObjectTableAddresses_DEV0008A01211, true + case 1565: + return ComObjectTableAddresses_DEV0008A01212, true + case 1566: + return ComObjectTableAddresses_DEV0008A01112, true + case 1567: + return ComObjectTableAddresses_DEV0008A03213, true + case 1568: + return ComObjectTableAddresses_DEV0008A03218, true + case 1569: + return ComObjectTableAddresses_DEV0008A03313, true + case 157: + return ComObjectTableAddresses_DEV000C181910, true + case 1570: + return ComObjectTableAddresses_DEV0008A03318, true + case 1571: + return ComObjectTableAddresses_DEV0008A01113, true + case 1572: + return ComObjectTableAddresses_DEV0008A01711, true + case 1573: + return ComObjectTableAddresses_DEV0008B00911, true + case 1574: + return ComObjectTableAddresses_DEV0008C00102, true + case 1575: + return ComObjectTableAddresses_DEV0008C00101, true + case 1576: + return ComObjectTableAddresses_DEV0008901501, true + case 1577: + return ComObjectTableAddresses_DEV0008901310, true + case 1578: + return ComObjectTableAddresses_DEV000820B011, true + case 1579: + return ComObjectTableAddresses_DEV0008705C11, true + case 158: + return ComObjectTableAddresses_DEV000C181810, true + case 1580: + return ComObjectTableAddresses_DEV0008705D11, true + case 1581: + return ComObjectTableAddresses_DEV0008706211, true + case 1582: + return ComObjectTableAddresses_DEV000820BA11, true + case 1583: + return ComObjectTableAddresses_DEV000820C011, true + case 1584: + return ComObjectTableAddresses_DEV000820B311, true + case 1585: + return ComObjectTableAddresses_DEV0008301A11, true + case 1586: + return ComObjectTableAddresses_DEV0008C00C13, true + case 1587: + return ComObjectTableAddresses_DEV0008302611, true + case 1588: + return ComObjectTableAddresses_DEV0008302311, true + case 1589: + return ComObjectTableAddresses_DEV0008302011, true + case 159: + return ComObjectTableAddresses_DEV000C20C011, true + case 1590: + return ComObjectTableAddresses_DEV0008C00C11, true + case 1591: + return ComObjectTableAddresses_DEV0008302612, true + case 1592: + return ComObjectTableAddresses_DEV0008302312, true + case 1593: + return ComObjectTableAddresses_DEV0008302012, true + case 1594: + return ComObjectTableAddresses_DEV0008C00C15, true + case 1595: + return ComObjectTableAddresses_DEV0008C00C14, true + case 1596: + return ComObjectTableAddresses_DEV0008B00713, true + case 1597: + return ComObjectTableAddresses_DEV0008706611, true + case 1598: + return ComObjectTableAddresses_DEV0008706811, true + case 1599: + return ComObjectTableAddresses_DEV0008B00812, true + case 16: + return ComObjectTableAddresses_DEV0064182010, true + case 160: + return ComObjectTableAddresses_DEV0079002527, true + case 1600: + return ComObjectTableAddresses_DEV0008209016, true + case 1601: + return ComObjectTableAddresses_DEV0008209011, true + case 1602: + return ComObjectTableAddresses_DEV000820A011, true + case 1603: + return ComObjectTableAddresses_DEV0008208811, true + case 1604: + return ComObjectTableAddresses_DEV0008209811, true + case 1605: + return ComObjectTableAddresses_DEV000820CA11, true + case 1606: + return ComObjectTableAddresses_DEV0008208012, true + case 1607: + return ComObjectTableAddresses_DEV0008207812, true + case 1608: + return ComObjectTableAddresses_DEV0008207811, true + case 1609: + return ComObjectTableAddresses_DEV0008208011, true + case 161: + return ComObjectTableAddresses_DEV0079004027, true + case 1610: + return ComObjectTableAddresses_DEV000810D111, true + case 1611: + return ComObjectTableAddresses_DEV000810D511, true + case 1612: + return ComObjectTableAddresses_DEV000810FA12, true + case 1613: + return ComObjectTableAddresses_DEV000810FB12, true + case 1614: + return ComObjectTableAddresses_DEV000810F211, true + case 1615: + return ComObjectTableAddresses_DEV000810D211, true + case 1616: + return ComObjectTableAddresses_DEV000810E211, true + case 1617: + return ComObjectTableAddresses_DEV000810D611, true + case 1618: + return ComObjectTableAddresses_DEV000810F212, true + case 1619: + return ComObjectTableAddresses_DEV000810E212, true + case 162: + return ComObjectTableAddresses_DEV0079000223, true + case 1620: + return ComObjectTableAddresses_DEV000810FC13, true + case 1621: + return ComObjectTableAddresses_DEV000810FD13, true + case 1622: + return ComObjectTableAddresses_DEV000810F311, true + case 1623: + return ComObjectTableAddresses_DEV000810D311, true + case 1624: + return ComObjectTableAddresses_DEV000810D711, true + case 1625: + return ComObjectTableAddresses_DEV000810F312, true + case 1626: + return ComObjectTableAddresses_DEV000810D811, true + case 1627: + return ComObjectTableAddresses_DEV000810E511, true + case 1628: + return ComObjectTableAddresses_DEV000810E512, true + case 1629: + return ComObjectTableAddresses_DEV000810F611, true + case 163: + return ComObjectTableAddresses_DEV0079000123, true + case 1630: + return ComObjectTableAddresses_DEV000810D911, true + case 1631: + return ComObjectTableAddresses_DEV000810F612, true + case 1632: + return ComObjectTableAddresses_DEV000820A812, true + case 1633: + return ComObjectTableAddresses_DEV000820AD11, true + case 1634: + return ComObjectTableAddresses_DEV000820BD11, true + case 1635: + return ComObjectTableAddresses_DEV000820C711, true + case 1636: + return ComObjectTableAddresses_DEV000820CD11, true + case 1637: + return ComObjectTableAddresses_DEV000820C411, true + case 1638: + return ComObjectTableAddresses_DEV000820A811, true + case 1639: + return ComObjectTableAddresses_DEV0008501411, true + case 164: + return ComObjectTableAddresses_DEV0079001427, true + case 1640: + return ComObjectTableAddresses_DEV0008C01602, true + case 1641: + return ComObjectTableAddresses_DEV0008302613, true + case 1642: + return ComObjectTableAddresses_DEV0008302313, true + case 1643: + return ComObjectTableAddresses_DEV0008302013, true + case 1644: + return ComObjectTableAddresses_DEV0009E0ED10, true + case 1645: + return ComObjectTableAddresses_DEV0009207730, true + case 1646: + return ComObjectTableAddresses_DEV0009208F10, true + case 1647: + return ComObjectTableAddresses_DEV0009C00C13, true + case 1648: + return ComObjectTableAddresses_DEV0009209910, true + case 1649: + return ComObjectTableAddresses_DEV0009209A10, true + case 165: + return ComObjectTableAddresses_DEV0079003027, true + case 1650: + return ComObjectTableAddresses_DEV0009207930, true + case 1651: + return ComObjectTableAddresses_DEV0009201720, true + case 1652: + return ComObjectTableAddresses_DEV0009500D01, true + case 1653: + return ComObjectTableAddresses_DEV0009500E01, true + case 1654: + return ComObjectTableAddresses_DEV0009209911, true + case 1655: + return ComObjectTableAddresses_DEV0009209A11, true + case 1656: + return ComObjectTableAddresses_DEV0009C00C12, true + case 1657: + return ComObjectTableAddresses_DEV0009C00C11, true + case 1658: + return ComObjectTableAddresses_DEV0009500D20, true + case 1659: + return ComObjectTableAddresses_DEV0009500E20, true + case 166: + return ComObjectTableAddresses_DEV0079100C13, true + case 1660: + return ComObjectTableAddresses_DEV000920B910, true + case 1661: + return ComObjectTableAddresses_DEV0009E0CE10, true + case 1662: + return ComObjectTableAddresses_DEV0009E0A210, true + case 1663: + return ComObjectTableAddresses_DEV0009501410, true + case 1664: + return ComObjectTableAddresses_DEV0009207830, true + case 1665: + return ComObjectTableAddresses_DEV0009201620, true + case 1666: + return ComObjectTableAddresses_DEV0009E0A111, true + case 1667: + return ComObjectTableAddresses_DEV0009E0CD11, true + case 1668: + return ComObjectTableAddresses_DEV000920B811, true + case 1669: + return ComObjectTableAddresses_DEV000920B611, true + case 167: + return ComObjectTableAddresses_DEV0079101C11, true + case 1670: + return ComObjectTableAddresses_DEV0009207E10, true + case 1671: + return ComObjectTableAddresses_DEV0009207630, true + case 1672: + return ComObjectTableAddresses_DEV0009205910, true + case 1673: + return ComObjectTableAddresses_DEV0009500B01, true + case 1674: + return ComObjectTableAddresses_DEV000920AC10, true + case 1675: + return ComObjectTableAddresses_DEV0009207430, true + case 1676: + return ComObjectTableAddresses_DEV0009204521, true + case 1677: + return ComObjectTableAddresses_DEV0009500A01, true + case 1678: + return ComObjectTableAddresses_DEV0009500001, true + case 1679: + return ComObjectTableAddresses_DEV000920AB10, true + case 168: + return ComObjectTableAddresses_DEV0080707010, true + case 1680: + return ComObjectTableAddresses_DEV000920BF11, true + case 1681: + return ComObjectTableAddresses_DEV0009203510, true + case 1682: + return ComObjectTableAddresses_DEV0009207A30, true + case 1683: + return ComObjectTableAddresses_DEV0009500701, true + case 1684: + return ComObjectTableAddresses_DEV0009501710, true + case 1685: + return ComObjectTableAddresses_DEV000920B310, true + case 1686: + return ComObjectTableAddresses_DEV0009207530, true + case 1687: + return ComObjectTableAddresses_DEV0009203321, true + case 1688: + return ComObjectTableAddresses_DEV0009500C01, true + case 1689: + return ComObjectTableAddresses_DEV000920AD10, true + case 169: + return ComObjectTableAddresses_DEV0080706010, true + case 1690: + return ComObjectTableAddresses_DEV0009207230, true + case 1691: + return ComObjectTableAddresses_DEV0009500801, true + case 1692: + return ComObjectTableAddresses_DEV0009501810, true + case 1693: + return ComObjectTableAddresses_DEV000920B410, true + case 1694: + return ComObjectTableAddresses_DEV0009207330, true + case 1695: + return ComObjectTableAddresses_DEV0009204421, true + case 1696: + return ComObjectTableAddresses_DEV0009500901, true + case 1697: + return ComObjectTableAddresses_DEV000920AA10, true + case 1698: + return ComObjectTableAddresses_DEV0009209D01, true + case 1699: + return ComObjectTableAddresses_DEV000920B010, true + case 17: + return ComObjectTableAddresses_DEV0064182510, true + case 170: + return ComObjectTableAddresses_DEV0080706810, true + case 1700: + return ComObjectTableAddresses_DEV0009E0BE01, true + case 1701: + return ComObjectTableAddresses_DEV000920B110, true + case 1702: + return ComObjectTableAddresses_DEV0009E0BD01, true + case 1703: + return ComObjectTableAddresses_DEV0009D03F10, true + case 1704: + return ComObjectTableAddresses_DEV0009305F10, true + case 1705: + return ComObjectTableAddresses_DEV0009305610, true + case 1706: + return ComObjectTableAddresses_DEV0009D03E10, true + case 1707: + return ComObjectTableAddresses_DEV0009306010, true + case 1708: + return ComObjectTableAddresses_DEV0009306110, true + case 1709: + return ComObjectTableAddresses_DEV0009306310, true + case 171: + return ComObjectTableAddresses_DEV0080705010, true + case 1710: + return ComObjectTableAddresses_DEV0009D03B10, true + case 1711: + return ComObjectTableAddresses_DEV0009D03C10, true + case 1712: + return ComObjectTableAddresses_DEV0009D03910, true + case 1713: + return ComObjectTableAddresses_DEV0009D03A10, true + case 1714: + return ComObjectTableAddresses_DEV0009305411, true + case 1715: + return ComObjectTableAddresses_DEV0009D03D11, true + case 1716: + return ComObjectTableAddresses_DEV0009304B11, true + case 1717: + return ComObjectTableAddresses_DEV0009304C11, true + case 1718: + return ComObjectTableAddresses_DEV0009306220, true + case 1719: + return ComObjectTableAddresses_DEV0009302E10, true + case 172: + return ComObjectTableAddresses_DEV0080703013, true + case 1720: + return ComObjectTableAddresses_DEV0009302F10, true + case 1721: + return ComObjectTableAddresses_DEV0009303010, true + case 1722: + return ComObjectTableAddresses_DEV0009303110, true + case 1723: + return ComObjectTableAddresses_DEV0009306510, true + case 1724: + return ComObjectTableAddresses_DEV0009306610, true + case 1725: + return ComObjectTableAddresses_DEV0009306410, true + case 1726: + return ComObjectTableAddresses_DEV0009401110, true + case 1727: + return ComObjectTableAddresses_DEV0009400610, true + case 1728: + return ComObjectTableAddresses_DEV0009401510, true + case 1729: + return ComObjectTableAddresses_DEV0009402110, true + case 173: + return ComObjectTableAddresses_DEV0080704021, true + case 1730: + return ComObjectTableAddresses_DEV0009400110, true + case 1731: + return ComObjectTableAddresses_DEV0009400910, true + case 1732: + return ComObjectTableAddresses_DEV0009400010, true + case 1733: + return ComObjectTableAddresses_DEV0009401810, true + case 1734: + return ComObjectTableAddresses_DEV0009400310, true + case 1735: + return ComObjectTableAddresses_DEV0009301810, true + case 1736: + return ComObjectTableAddresses_DEV0009301910, true + case 1737: + return ComObjectTableAddresses_DEV0009301A10, true + case 1738: + return ComObjectTableAddresses_DEV0009401210, true + case 1739: + return ComObjectTableAddresses_DEV0009400810, true + case 174: + return ComObjectTableAddresses_DEV0080704022, true + case 1740: + return ComObjectTableAddresses_DEV0009400710, true + case 1741: + return ComObjectTableAddresses_DEV0009401310, true + case 1742: + return ComObjectTableAddresses_DEV0009401410, true + case 1743: + return ComObjectTableAddresses_DEV0009402210, true + case 1744: + return ComObjectTableAddresses_DEV0009402310, true + case 1745: + return ComObjectTableAddresses_DEV0009401710, true + case 1746: + return ComObjectTableAddresses_DEV0009401610, true + case 1747: + return ComObjectTableAddresses_DEV0009400210, true + case 1748: + return ComObjectTableAddresses_DEV0009401010, true + case 1749: + return ComObjectTableAddresses_DEV0009400510, true + case 175: + return ComObjectTableAddresses_DEV0080704020, true + case 1750: + return ComObjectTableAddresses_DEV0009400410, true + case 1751: + return ComObjectTableAddresses_DEV0009D04B20, true + case 1752: + return ComObjectTableAddresses_DEV0009D04920, true + case 1753: + return ComObjectTableAddresses_DEV0009D04A20, true + case 1754: + return ComObjectTableAddresses_DEV0009D04820, true + case 1755: + return ComObjectTableAddresses_DEV0009D04C11, true + case 1756: + return ComObjectTableAddresses_DEV0009D05610, true + case 1757: + return ComObjectTableAddresses_DEV0009305510, true + case 1758: + return ComObjectTableAddresses_DEV0009209810, true + case 1759: + return ComObjectTableAddresses_DEV0009202A10, true + case 176: + return ComObjectTableAddresses_DEV0080701111, true + case 1760: + return ComObjectTableAddresses_DEV0009209510, true + case 1761: + return ComObjectTableAddresses_DEV0009501110, true + case 1762: + return ComObjectTableAddresses_DEV0009209310, true + case 1763: + return ComObjectTableAddresses_DEV0009209410, true + case 1764: + return ComObjectTableAddresses_DEV0009209210, true + case 1765: + return ComObjectTableAddresses_DEV0009501210, true + case 1766: + return ComObjectTableAddresses_DEV0009205411, true + case 1767: + return ComObjectTableAddresses_DEV000920A111, true + case 1768: + return ComObjectTableAddresses_DEV000920A311, true + case 1769: + return ComObjectTableAddresses_DEV0009205112, true + case 177: + return ComObjectTableAddresses_DEV0080701811, true + case 1770: + return ComObjectTableAddresses_DEV0009204110, true + case 1771: + return ComObjectTableAddresses_DEV0009E07710, true + case 1772: + return ComObjectTableAddresses_DEV0009E07712, true + case 1773: + return ComObjectTableAddresses_DEV0009205212, true + case 1774: + return ComObjectTableAddresses_DEV0009205211, true + case 1775: + return ComObjectTableAddresses_DEV0009205311, true + case 1776: + return ComObjectTableAddresses_DEV0009206B10, true + case 1777: + return ComObjectTableAddresses_DEV0009208010, true + case 1778: + return ComObjectTableAddresses_DEV0009206A12, true + case 1779: + return ComObjectTableAddresses_DEV0009206810, true + case 178: + return ComObjectTableAddresses_DEV008020A110, true + case 1780: + return ComObjectTableAddresses_DEV0009208110, true + case 1781: + return ComObjectTableAddresses_DEV0009205511, true + case 1782: + return ComObjectTableAddresses_DEV0009209F01, true + case 1783: + return ComObjectTableAddresses_DEV0009208C10, true + case 1784: + return ComObjectTableAddresses_DEV0009208E10, true + case 1785: + return ComObjectTableAddresses_DEV000920B511, true + case 1786: + return ComObjectTableAddresses_DEV0009501910, true + case 1787: + return ComObjectTableAddresses_DEV000920BE11, true + case 1788: + return ComObjectTableAddresses_DEV0009209710, true + case 1789: + return ComObjectTableAddresses_DEV0009208510, true + case 179: + return ComObjectTableAddresses_DEV008020A210, true + case 1790: + return ComObjectTableAddresses_DEV0009208610, true + case 1791: + return ComObjectTableAddresses_DEV000920BD10, true + case 1792: + return ComObjectTableAddresses_DEV0009500210, true + case 1793: + return ComObjectTableAddresses_DEV0009500310, true + case 1794: + return ComObjectTableAddresses_DEV0009E0BF10, true + case 1795: + return ComObjectTableAddresses_DEV0009E0C010, true + case 1796: + return ComObjectTableAddresses_DEV0009500110, true + case 1797: + return ComObjectTableAddresses_DEV0009209B10, true + case 1798: + return ComObjectTableAddresses_DEV0009207D10, true + case 1799: + return ComObjectTableAddresses_DEV0009202F11, true + case 18: + return ComObjectTableAddresses_DEV0064182610, true + case 180: + return ComObjectTableAddresses_DEV008020A010, true + case 1800: + return ComObjectTableAddresses_DEV0009203011, true + case 1801: + return ComObjectTableAddresses_DEV0009207C10, true + case 1802: + return ComObjectTableAddresses_DEV0009207B10, true + case 1803: + return ComObjectTableAddresses_DEV0009208710, true + case 1804: + return ComObjectTableAddresses_DEV0009E06610, true + case 1805: + return ComObjectTableAddresses_DEV0009E06611, true + case 1806: + return ComObjectTableAddresses_DEV0009E06410, true + case 1807: + return ComObjectTableAddresses_DEV0009E06411, true + case 1808: + return ComObjectTableAddresses_DEV0009E06210, true + case 1809: + return ComObjectTableAddresses_DEV0009E0E910, true + case 181: + return ComObjectTableAddresses_DEV0080207212, true + case 1810: + return ComObjectTableAddresses_DEV0009E0EB10, true + case 1811: + return ComObjectTableAddresses_DEV000920BB10, true + case 1812: + return ComObjectTableAddresses_DEV0009FF1B11, true + case 1813: + return ComObjectTableAddresses_DEV0009E0CF10, true + case 1814: + return ComObjectTableAddresses_DEV0009206C30, true + case 1815: + return ComObjectTableAddresses_DEV0009206D30, true + case 1816: + return ComObjectTableAddresses_DEV0009206E30, true + case 1817: + return ComObjectTableAddresses_DEV0009206F30, true + case 1818: + return ComObjectTableAddresses_DEV0009207130, true + case 1819: + return ComObjectTableAddresses_DEV0009204720, true + case 182: + return ComObjectTableAddresses_DEV0080209111, true + case 1820: + return ComObjectTableAddresses_DEV0009204820, true + case 1821: + return ComObjectTableAddresses_DEV0009204920, true + case 1822: + return ComObjectTableAddresses_DEV0009204A20, true + case 1823: + return ComObjectTableAddresses_DEV0009205A10, true + case 1824: + return ComObjectTableAddresses_DEV0009207030, true + case 1825: + return ComObjectTableAddresses_DEV0009205B10, true + case 1826: + return ComObjectTableAddresses_DEV0009500501, true + case 1827: + return ComObjectTableAddresses_DEV0009501001, true + case 1828: + return ComObjectTableAddresses_DEV0009500601, true + case 1829: + return ComObjectTableAddresses_DEV0009500F01, true + case 183: + return ComObjectTableAddresses_DEV0080204310, true + case 1830: + return ComObjectTableAddresses_DEV0009500401, true + case 1831: + return ComObjectTableAddresses_DEV000920B210, true + case 1832: + return ComObjectTableAddresses_DEV000920AE10, true + case 1833: + return ComObjectTableAddresses_DEV000920BC10, true + case 1834: + return ComObjectTableAddresses_DEV000920AF10, true + case 1835: + return ComObjectTableAddresses_DEV0009207F10, true + case 1836: + return ComObjectTableAddresses_DEV0009208910, true + case 1837: + return ComObjectTableAddresses_DEV0009205710, true + case 1838: + return ComObjectTableAddresses_DEV0009205810, true + case 1839: + return ComObjectTableAddresses_DEV0009203810, true + case 184: + return ComObjectTableAddresses_DEV008020B612, true + case 1840: + return ComObjectTableAddresses_DEV0009203910, true + case 1841: + return ComObjectTableAddresses_DEV0009203E10, true + case 1842: + return ComObjectTableAddresses_DEV0009204B10, true + case 1843: + return ComObjectTableAddresses_DEV0009203F10, true + case 1844: + return ComObjectTableAddresses_DEV0009204C10, true + case 1845: + return ComObjectTableAddresses_DEV0009204010, true + case 1846: + return ComObjectTableAddresses_DEV0009206411, true + case 1847: + return ComObjectTableAddresses_DEV0009205E10, true + case 1848: + return ComObjectTableAddresses_DEV0009206711, true + case 1849: + return ComObjectTableAddresses_DEV000920A710, true + case 185: + return ComObjectTableAddresses_DEV008020B412, true + case 1850: + return ComObjectTableAddresses_DEV000920A610, true + case 1851: + return ComObjectTableAddresses_DEV0009203A10, true + case 1852: + return ComObjectTableAddresses_DEV0009203B10, true + case 1853: + return ComObjectTableAddresses_DEV0009203C10, true + case 1854: + return ComObjectTableAddresses_DEV0009203D10, true + case 1855: + return ComObjectTableAddresses_DEV0009E05E12, true + case 1856: + return ComObjectTableAddresses_DEV0009E0B711, true + case 1857: + return ComObjectTableAddresses_DEV0009E06A12, true + case 1858: + return ComObjectTableAddresses_DEV0009E06E12, true + case 1859: + return ComObjectTableAddresses_DEV0009E0B720, true + case 186: + return ComObjectTableAddresses_DEV008020B512, true + case 1860: + return ComObjectTableAddresses_DEV0009E0E611, true + case 1861: + return ComObjectTableAddresses_DEV0009E0B321, true + case 1862: + return ComObjectTableAddresses_DEV0009E0E512, true + case 1863: + return ComObjectTableAddresses_DEV0009204210, true + case 1864: + return ComObjectTableAddresses_DEV0009208210, true + case 1865: + return ComObjectTableAddresses_DEV0009E07211, true + case 1866: + return ComObjectTableAddresses_DEV0009E0CC11, true + case 1867: + return ComObjectTableAddresses_DEV0009110111, true + case 1868: + return ComObjectTableAddresses_DEV0009110211, true + case 1869: + return ComObjectTableAddresses_DEV000916B212, true + case 187: + return ComObjectTableAddresses_DEV0080208310, true + case 1870: + return ComObjectTableAddresses_DEV0009110212, true + case 1871: + return ComObjectTableAddresses_DEV0009110311, true + case 1872: + return ComObjectTableAddresses_DEV000916B312, true + case 1873: + return ComObjectTableAddresses_DEV0009110312, true + case 1874: + return ComObjectTableAddresses_DEV0009110411, true + case 1875: + return ComObjectTableAddresses_DEV0009110412, true + case 1876: + return ComObjectTableAddresses_DEV0009501615, true + case 188: + return ComObjectTableAddresses_DEV0080702111, true + case 189: + return ComObjectTableAddresses_DEV0080709010, true + case 19: + return ComObjectTableAddresses_DEV0064182910, true + case 190: + return ComObjectTableAddresses_DEV0081FE0111, true + case 191: + return ComObjectTableAddresses_DEV0081FF3131, true + case 192: + return ComObjectTableAddresses_DEV0081F01313, true + case 193: + return ComObjectTableAddresses_DEV0081FF1313, true + case 194: + return ComObjectTableAddresses_DEV0083003020, true + case 195: + return ComObjectTableAddresses_DEV0083003120, true + case 196: + return ComObjectTableAddresses_DEV0083003220, true + case 197: + return ComObjectTableAddresses_DEV0083002C16, true + case 198: + return ComObjectTableAddresses_DEV0083002E16, true + case 199: + return ComObjectTableAddresses_DEV0083002F16, true + case 2: + return ComObjectTableAddresses_DEV0001140C13, true + case 20: + return ComObjectTableAddresses_DEV0064130610, true + case 200: + return ComObjectTableAddresses_DEV0083012F16, true + case 201: + return ComObjectTableAddresses_DEV0083001D13, true + case 202: + return ComObjectTableAddresses_DEV0083001E13, true + case 203: + return ComObjectTableAddresses_DEV0083001B13, true + case 204: + return ComObjectTableAddresses_DEV0083001C13, true + case 205: + return ComObjectTableAddresses_DEV0083003C10, true + case 206: + return ComObjectTableAddresses_DEV0083001C20, true + case 207: + return ComObjectTableAddresses_DEV0083001B22, true + case 208: + return ComObjectTableAddresses_DEV0083001B32, true + case 209: + return ComObjectTableAddresses_DEV0083003B24, true + case 21: + return ComObjectTableAddresses_DEV0064130710, true + case 210: + return ComObjectTableAddresses_DEV0083003B32, true + case 211: + return ComObjectTableAddresses_DEV0083003B33, true + case 212: + return ComObjectTableAddresses_DEV0083003B34, true + case 213: + return ComObjectTableAddresses_DEV0083003B35, true + case 214: + return ComObjectTableAddresses_DEV0083003A24, true + case 215: + return ComObjectTableAddresses_DEV0083003A32, true + case 216: + return ComObjectTableAddresses_DEV0083003A33, true + case 217: + return ComObjectTableAddresses_DEV0083003A34, true + case 218: + return ComObjectTableAddresses_DEV0083003A35, true + case 219: + return ComObjectTableAddresses_DEV0083005824, true + case 22: + return ComObjectTableAddresses_DEV0064133510, true + case 220: + return ComObjectTableAddresses_DEV0083005834, true + case 221: + return ComObjectTableAddresses_DEV0083005835, true + case 222: + return ComObjectTableAddresses_DEV0083002337, true + case 223: + return ComObjectTableAddresses_DEV0083002351, true + case 224: + return ComObjectTableAddresses_DEV0083002352, true + case 225: + return ComObjectTableAddresses_DEV0083002353, true + case 226: + return ComObjectTableAddresses_DEV0083002354, true + case 227: + return ComObjectTableAddresses_DEV0083002838, true + case 228: + return ComObjectTableAddresses_DEV0083002850, true + case 229: + return ComObjectTableAddresses_DEV0083002852, true + case 23: + return ComObjectTableAddresses_DEV0064133310, true + case 230: + return ComObjectTableAddresses_DEV0083002853, true + case 231: + return ComObjectTableAddresses_DEV0083002854, true + case 232: + return ComObjectTableAddresses_DEV0083002855, true + case 233: + return ComObjectTableAddresses_DEV0083002938, true + case 234: + return ComObjectTableAddresses_DEV0083002950, true + case 235: + return ComObjectTableAddresses_DEV0083002952, true + case 236: + return ComObjectTableAddresses_DEV0083002953, true + case 237: + return ComObjectTableAddresses_DEV0083002954, true + case 238: + return ComObjectTableAddresses_DEV0083002955, true + case 239: + return ComObjectTableAddresses_DEV0083002A38, true + case 24: + return ComObjectTableAddresses_DEV0064133410, true + case 240: + return ComObjectTableAddresses_DEV0083002A50, true + case 241: + return ComObjectTableAddresses_DEV0083002A52, true + case 242: + return ComObjectTableAddresses_DEV0083002A53, true + case 243: + return ComObjectTableAddresses_DEV0083002A54, true + case 244: + return ComObjectTableAddresses_DEV0083002A55, true + case 245: + return ComObjectTableAddresses_DEV0083002B38, true + case 246: + return ComObjectTableAddresses_DEV0083002B50, true + case 247: + return ComObjectTableAddresses_DEV0083002B52, true + case 248: + return ComObjectTableAddresses_DEV0083002B53, true + case 249: + return ComObjectTableAddresses_DEV0083002B54, true + case 25: + return ComObjectTableAddresses_DEV0064133610, true + case 250: + return ComObjectTableAddresses_DEV0083002B55, true + case 251: + return ComObjectTableAddresses_DEV0083002339, true + case 252: + return ComObjectTableAddresses_DEV0083002355, true + case 253: + return ComObjectTableAddresses_DEV0083001321, true + case 254: + return ComObjectTableAddresses_DEV0083001332, true + case 255: + return ComObjectTableAddresses_DEV0083001421, true + case 256: + return ComObjectTableAddresses_DEV0083001521, true + case 257: + return ComObjectTableAddresses_DEV0083001621, true + case 258: + return ComObjectTableAddresses_DEV0083000921, true + case 259: + return ComObjectTableAddresses_DEV0083000932, true + case 26: + return ComObjectTableAddresses_DEV0064130510, true + case 260: + return ComObjectTableAddresses_DEV0083000A21, true + case 261: + return ComObjectTableAddresses_DEV0083000B21, true + case 262: + return ComObjectTableAddresses_DEV0083000C21, true + case 263: + return ComObjectTableAddresses_DEV0083000D21, true + case 264: + return ComObjectTableAddresses_DEV0083000821, true + case 265: + return ComObjectTableAddresses_DEV0083000E21, true + case 266: + return ComObjectTableAddresses_DEV0083001921, true + case 267: + return ComObjectTableAddresses_DEV0083001932, true + case 268: + return ComObjectTableAddresses_DEV0083001721, true + case 269: + return ComObjectTableAddresses_DEV0083001732, true + case 27: + return ComObjectTableAddresses_DEV0064480611, true + case 270: + return ComObjectTableAddresses_DEV0083001821, true + case 271: + return ComObjectTableAddresses_DEV0083001832, true + case 272: + return ComObjectTableAddresses_DEV0083001A20, true + case 273: + return ComObjectTableAddresses_DEV0083002320, true + case 274: + return ComObjectTableAddresses_DEV0083004024, true + case 275: + return ComObjectTableAddresses_DEV0083004032, true + case 276: + return ComObjectTableAddresses_DEV0083004033, true + case 277: + return ComObjectTableAddresses_DEV0083004034, true + case 278: + return ComObjectTableAddresses_DEV0083004035, true + case 279: + return ComObjectTableAddresses_DEV0083003D24, true + case 28: + return ComObjectTableAddresses_DEV0064482011, true + case 280: + return ComObjectTableAddresses_DEV0083003D32, true + case 281: + return ComObjectTableAddresses_DEV0083003D33, true + case 282: + return ComObjectTableAddresses_DEV0083003D34, true + case 283: + return ComObjectTableAddresses_DEV0083003E24, true + case 284: + return ComObjectTableAddresses_DEV0083003E32, true + case 285: + return ComObjectTableAddresses_DEV0083003E33, true + case 286: + return ComObjectTableAddresses_DEV0083003E34, true + case 287: + return ComObjectTableAddresses_DEV0083003F24, true + case 288: + return ComObjectTableAddresses_DEV0083003F32, true + case 289: + return ComObjectTableAddresses_DEV0083003F33, true + case 29: + return ComObjectTableAddresses_DEV0064182210, true + case 290: + return ComObjectTableAddresses_DEV0083003F34, true + case 291: + return ComObjectTableAddresses_DEV0083004025, true + case 292: + return ComObjectTableAddresses_DEV0083004036, true + case 293: + return ComObjectTableAddresses_DEV0083003D25, true + case 294: + return ComObjectTableAddresses_DEV0083003D36, true + case 295: + return ComObjectTableAddresses_DEV0083003E25, true + case 296: + return ComObjectTableAddresses_DEV0083003E36, true + case 297: + return ComObjectTableAddresses_DEV0083003F25, true + case 298: + return ComObjectTableAddresses_DEV0083003F36, true + case 299: + return ComObjectTableAddresses_DEV0083001112, true + case 3: + return ComObjectTableAddresses_DEV0001140B11, true + case 30: + return ComObjectTableAddresses_DEV0064182710, true + case 300: + return ComObjectTableAddresses_DEV0083001116, true + case 301: + return ComObjectTableAddresses_DEV0083001117, true + case 302: + return ComObjectTableAddresses_DEV0083001212, true + case 303: + return ComObjectTableAddresses_DEV0083001216, true + case 304: + return ComObjectTableAddresses_DEV0083001217, true + case 305: + return ComObjectTableAddresses_DEV0083005B12, true + case 306: + return ComObjectTableAddresses_DEV0083005B16, true + case 307: + return ComObjectTableAddresses_DEV0083005B17, true + case 308: + return ComObjectTableAddresses_DEV0083005A12, true + case 309: + return ComObjectTableAddresses_DEV0083005A16, true + case 31: + return ComObjectTableAddresses_DEV0064183010, true + case 310: + return ComObjectTableAddresses_DEV0083005A17, true + case 311: + return ComObjectTableAddresses_DEV0083008410, true + case 312: + return ComObjectTableAddresses_DEV0083008510, true + case 313: + return ComObjectTableAddresses_DEV0083008610, true + case 314: + return ComObjectTableAddresses_DEV0083008710, true + case 315: + return ComObjectTableAddresses_DEV0083002515, true + case 316: + return ComObjectTableAddresses_DEV0083002115, true + case 317: + return ComObjectTableAddresses_DEV0083002015, true + case 318: + return ComObjectTableAddresses_DEV0083002415, true + case 319: + return ComObjectTableAddresses_DEV0083002615, true + case 32: + return ComObjectTableAddresses_DEV0064B00812, true + case 320: + return ComObjectTableAddresses_DEV0083002215, true + case 321: + return ComObjectTableAddresses_DEV0083002715, true + case 322: + return ComObjectTableAddresses_DEV0083002315, true + case 323: + return ComObjectTableAddresses_DEV0083008B28, true + case 324: + return ComObjectTableAddresses_DEV0083008B32, true + case 325: + return ComObjectTableAddresses_DEV0083008B33, true + case 326: + return ComObjectTableAddresses_DEV0083008B34, true + case 327: + return ComObjectTableAddresses_DEV0083008B36, true + case 328: + return ComObjectTableAddresses_DEV0083008B37, true + case 329: + return ComObjectTableAddresses_DEV0083008B39, true + case 33: + return ComObjectTableAddresses_DEV0064B00A01, true + case 330: + return ComObjectTableAddresses_DEV0083008A28, true + case 331: + return ComObjectTableAddresses_DEV0083008A32, true + case 332: + return ComObjectTableAddresses_DEV0083008A33, true + case 333: + return ComObjectTableAddresses_DEV0083008A34, true + case 334: + return ComObjectTableAddresses_DEV0083008A36, true + case 335: + return ComObjectTableAddresses_DEV0083008A37, true + case 336: + return ComObjectTableAddresses_DEV0083008A39, true + case 337: + return ComObjectTableAddresses_DEV0083009013, true + case 338: + return ComObjectTableAddresses_DEV0083009016, true + case 339: + return ComObjectTableAddresses_DEV0083009017, true + case 34: + return ComObjectTableAddresses_DEV0064760110, true + case 340: + return ComObjectTableAddresses_DEV0083009018, true + case 341: + return ComObjectTableAddresses_DEV0083009213, true + case 342: + return ComObjectTableAddresses_DEV0083009216, true + case 343: + return ComObjectTableAddresses_DEV0083009217, true + case 344: + return ComObjectTableAddresses_DEV0083009218, true + case 345: + return ComObjectTableAddresses_DEV0083009113, true + case 346: + return ComObjectTableAddresses_DEV0083009116, true + case 347: + return ComObjectTableAddresses_DEV0083009117, true + case 348: + return ComObjectTableAddresses_DEV0083009118, true + case 349: + return ComObjectTableAddresses_DEV0083009313, true + case 35: + return ComObjectTableAddresses_DEV0064242313, true + case 350: + return ComObjectTableAddresses_DEV0083009316, true + case 351: + return ComObjectTableAddresses_DEV0083009317, true + case 352: + return ComObjectTableAddresses_DEV0083009318, true + case 353: + return ComObjectTableAddresses_DEV0083009413, true + case 354: + return ComObjectTableAddresses_DEV0083009416, true + case 355: + return ComObjectTableAddresses_DEV0083009417, true + case 356: + return ComObjectTableAddresses_DEV0083009418, true + case 357: + return ComObjectTableAddresses_DEV0083009513, true + case 358: + return ComObjectTableAddresses_DEV0083009516, true + case 359: + return ComObjectTableAddresses_DEV0083009517, true + case 36: + return ComObjectTableAddresses_DEV0064FF2111, true + case 360: + return ComObjectTableAddresses_DEV0083009518, true + case 361: + return ComObjectTableAddresses_DEV0083009613, true + case 362: + return ComObjectTableAddresses_DEV0083009616, true + case 363: + return ComObjectTableAddresses_DEV0083009617, true + case 364: + return ComObjectTableAddresses_DEV0083009618, true + case 365: + return ComObjectTableAddresses_DEV0083009713, true + case 366: + return ComObjectTableAddresses_DEV0083009716, true + case 367: + return ComObjectTableAddresses_DEV0083009717, true + case 368: + return ComObjectTableAddresses_DEV0083009718, true + case 369: + return ComObjectTableAddresses_DEV0083009A13, true + case 37: + return ComObjectTableAddresses_DEV0064FF2112, true + case 370: + return ComObjectTableAddresses_DEV0083009A18, true + case 371: + return ComObjectTableAddresses_DEV0083009B13, true + case 372: + return ComObjectTableAddresses_DEV0083009B18, true + case 373: + return ComObjectTableAddresses_DEV0083004B20, true + case 374: + return ComObjectTableAddresses_DEV0083004B00, true + case 375: + return ComObjectTableAddresses_DEV0083005514, true + case 376: + return ComObjectTableAddresses_DEV0083006824, true + case 377: + return ComObjectTableAddresses_DEV0083006734, true + case 378: + return ComObjectTableAddresses_DEV0083006748, true + case 379: + return ComObjectTableAddresses_DEV0083006749, true + case 38: + return ComObjectTableAddresses_DEV0064648B10, true + case 380: + return ComObjectTableAddresses_DEV0083006750, true + case 381: + return ComObjectTableAddresses_DEV0083006751, true + case 382: + return ComObjectTableAddresses_DEV0083006434, true + case 383: + return ComObjectTableAddresses_DEV0083006448, true + case 384: + return ComObjectTableAddresses_DEV0083006449, true + case 385: + return ComObjectTableAddresses_DEV0083006450, true + case 386: + return ComObjectTableAddresses_DEV0083006451, true + case 387: + return ComObjectTableAddresses_DEV0083006634, true + case 388: + return ComObjectTableAddresses_DEV0083006648, true + case 389: + return ComObjectTableAddresses_DEV0083006649, true + case 39: + return ComObjectTableAddresses_DEV0064724010, true + case 390: + return ComObjectTableAddresses_DEV0083006650, true + case 391: + return ComObjectTableAddresses_DEV0083006651, true + case 392: + return ComObjectTableAddresses_DEV0083006534, true + case 393: + return ComObjectTableAddresses_DEV0083006548, true + case 394: + return ComObjectTableAddresses_DEV0083006549, true + case 395: + return ComObjectTableAddresses_DEV0083006550, true + case 396: + return ComObjectTableAddresses_DEV0083006551, true + case 397: + return ComObjectTableAddresses_DEV0083006A34, true + case 398: + return ComObjectTableAddresses_DEV0083006A48, true + case 399: + return ComObjectTableAddresses_DEV0083006A49, true + case 4: + return ComObjectTableAddresses_DEV0001803002, true + case 40: + return ComObjectTableAddresses_DEV006420BD11, true + case 400: + return ComObjectTableAddresses_DEV0083006A50, true + case 401: + return ComObjectTableAddresses_DEV0083006A51, true + case 402: + return ComObjectTableAddresses_DEV0083006B34, true + case 403: + return ComObjectTableAddresses_DEV0083006B48, true + case 404: + return ComObjectTableAddresses_DEV0083006B49, true + case 405: + return ComObjectTableAddresses_DEV0083006B50, true + case 406: + return ComObjectTableAddresses_DEV0083006B51, true + case 407: + return ComObjectTableAddresses_DEV0083006934, true + case 408: + return ComObjectTableAddresses_DEV0083006948, true + case 409: + return ComObjectTableAddresses_DEV0083006949, true + case 41: + return ComObjectTableAddresses_DEV0064570011, true + case 410: + return ComObjectTableAddresses_DEV0083006950, true + case 411: + return ComObjectTableAddresses_DEV0083006951, true + case 412: + return ComObjectTableAddresses_DEV0083004F11, true + case 413: + return ComObjectTableAddresses_DEV0083004D13, true + case 414: + return ComObjectTableAddresses_DEV0083004414, true + case 415: + return ComObjectTableAddresses_DEV0083004114, true + case 416: + return ComObjectTableAddresses_DEV0083004514, true + case 417: + return ComObjectTableAddresses_DEV0083004213, true + case 418: + return ComObjectTableAddresses_DEV0083004313, true + case 419: + return ComObjectTableAddresses_DEV0083004C11, true + case 42: + return ComObjectTableAddresses_DEV0064570310, true + case 420: + return ComObjectTableAddresses_DEV0083004913, true + case 421: + return ComObjectTableAddresses_DEV0083004A13, true + case 422: + return ComObjectTableAddresses_DEV0083004712, true + case 423: + return ComObjectTableAddresses_DEV0083004610, true + case 424: + return ComObjectTableAddresses_DEV0083008E12, true + case 425: + return ComObjectTableAddresses_DEV0083004813, true + case 426: + return ComObjectTableAddresses_DEV0083005611, true + case 427: + return ComObjectTableAddresses_DEV0083005710, true + case 428: + return ComObjectTableAddresses_DEV0083005010, true + case 429: + return ComObjectTableAddresses_DEV0083001A10, true + case 43: + return ComObjectTableAddresses_DEV0064570211, true + case 430: + return ComObjectTableAddresses_DEV0083002918, true + case 431: + return ComObjectTableAddresses_DEV0083002818, true + case 432: + return ComObjectTableAddresses_DEV0083006724, true + case 433: + return ComObjectTableAddresses_DEV0083006D42, true + case 434: + return ComObjectTableAddresses_DEV0083006D64, true + case 435: + return ComObjectTableAddresses_DEV0083006D65, true + case 436: + return ComObjectTableAddresses_DEV0083006E42, true + case 437: + return ComObjectTableAddresses_DEV0083006E64, true + case 438: + return ComObjectTableAddresses_DEV0083006D44, true + case 439: + return ComObjectTableAddresses_DEV0083006D66, true + case 44: + return ComObjectTableAddresses_DEV0064570411, true + case 440: + return ComObjectTableAddresses_DEV0083006D67, true + case 441: + return ComObjectTableAddresses_DEV0083006E44, true + case 442: + return ComObjectTableAddresses_DEV0083006E65, true + case 443: + return ComObjectTableAddresses_DEV0083006E66, true + case 444: + return ComObjectTableAddresses_DEV0083006E67, true + case 445: + return ComObjectTableAddresses_DEV0083007342, true + case 446: + return ComObjectTableAddresses_DEV0083007242, true + case 447: + return ComObjectTableAddresses_DEV0083006C42, true + case 448: + return ComObjectTableAddresses_DEV0083006C64, true + case 449: + return ComObjectTableAddresses_DEV0083006C65, true + case 45: + return ComObjectTableAddresses_DEV0064570110, true + case 450: + return ComObjectTableAddresses_DEV0083007542, true + case 451: + return ComObjectTableAddresses_DEV0083007442, true + case 452: + return ComObjectTableAddresses_DEV0083007742, true + case 453: + return ComObjectTableAddresses_DEV0083007642, true + case 454: + return ComObjectTableAddresses_DEV0083007343, true + case 455: + return ComObjectTableAddresses_DEV0083007366, true + case 456: + return ComObjectTableAddresses_DEV0083007243, true + case 457: + return ComObjectTableAddresses_DEV0083007266, true + case 458: + return ComObjectTableAddresses_DEV0083006C43, true + case 459: + return ComObjectTableAddresses_DEV0083006C66, true + case 46: + return ComObjectTableAddresses_DEV0064615022, true + case 460: + return ComObjectTableAddresses_DEV0083007543, true + case 461: + return ComObjectTableAddresses_DEV0083007566, true + case 462: + return ComObjectTableAddresses_DEV0083007443, true + case 463: + return ComObjectTableAddresses_DEV0083007466, true + case 464: + return ComObjectTableAddresses_DEV0083007743, true + case 465: + return ComObjectTableAddresses_DEV0083007766, true + case 466: + return ComObjectTableAddresses_DEV0083007643, true + case 467: + return ComObjectTableAddresses_DEV0083007666, true + case 468: + return ComObjectTableAddresses_DEV008300B031, true + case 469: + return ComObjectTableAddresses_DEV008300B048, true + case 47: + return ComObjectTableAddresses_DEV0064182810, true + case 470: + return ComObjectTableAddresses_DEV008300B131, true + case 471: + return ComObjectTableAddresses_DEV008300B148, true + case 472: + return ComObjectTableAddresses_DEV008300B231, true + case 473: + return ComObjectTableAddresses_DEV008300B248, true + case 474: + return ComObjectTableAddresses_DEV008300B331, true + case 475: + return ComObjectTableAddresses_DEV008300B348, true + case 476: + return ComObjectTableAddresses_DEV008300B032, true + case 477: + return ComObjectTableAddresses_DEV008300B049, true + case 478: + return ComObjectTableAddresses_DEV008300B132, true + case 479: + return ComObjectTableAddresses_DEV008300B149, true + case 48: + return ComObjectTableAddresses_DEV0064183110, true + case 480: + return ComObjectTableAddresses_DEV008300B232, true + case 481: + return ComObjectTableAddresses_DEV008300B249, true + case 482: + return ComObjectTableAddresses_DEV008300B332, true + case 483: + return ComObjectTableAddresses_DEV008300B349, true + case 484: + return ComObjectTableAddresses_DEV008300B431, true + case 485: + return ComObjectTableAddresses_DEV008300B448, true + case 486: + return ComObjectTableAddresses_DEV008300B531, true + case 487: + return ComObjectTableAddresses_DEV008300B548, true + case 488: + return ComObjectTableAddresses_DEV008300B631, true + case 489: + return ComObjectTableAddresses_DEV008300B648, true + case 49: + return ComObjectTableAddresses_DEV0064133611, true + case 490: + return ComObjectTableAddresses_DEV008300B731, true + case 491: + return ComObjectTableAddresses_DEV008300B748, true + case 492: + return ComObjectTableAddresses_DEV008300B432, true + case 493: + return ComObjectTableAddresses_DEV008300B449, true + case 494: + return ComObjectTableAddresses_DEV008300B532, true + case 495: + return ComObjectTableAddresses_DEV008300B549, true + case 496: + return ComObjectTableAddresses_DEV008300B632, true + case 497: + return ComObjectTableAddresses_DEV008300B649, true + case 498: + return ComObjectTableAddresses_DEV008300B732, true + case 499: + return ComObjectTableAddresses_DEV008300B749, true + case 5: + return ComObjectTableAddresses_DEV00641BD610, true + case 50: + return ComObjectTableAddresses_DEV006A000122, true + case 500: + return ComObjectTableAddresses_DEV0083012843, true + case 501: + return ComObjectTableAddresses_DEV0083012865, true + case 502: + return ComObjectTableAddresses_DEV0083012943, true + case 503: + return ComObjectTableAddresses_DEV0083012965, true + case 504: + return ComObjectTableAddresses_DEV008300A421, true + case 505: + return ComObjectTableAddresses_DEV008300A521, true + case 506: + return ComObjectTableAddresses_DEV008300A621, true + case 507: + return ComObjectTableAddresses_DEV0083001432, true + case 508: + return ComObjectTableAddresses_DEV0083001448, true + case 509: + return ComObjectTableAddresses_DEV0083001532, true + case 51: + return ComObjectTableAddresses_DEV006A000222, true + case 510: + return ComObjectTableAddresses_DEV0083001548, true + case 511: + return ComObjectTableAddresses_DEV0083001632, true + case 512: + return ComObjectTableAddresses_DEV0083001648, true + case 513: + return ComObjectTableAddresses_DEV008300A432, true + case 514: + return ComObjectTableAddresses_DEV008300A448, true + case 515: + return ComObjectTableAddresses_DEV008300A449, true + case 516: + return ComObjectTableAddresses_DEV008300A532, true + case 517: + return ComObjectTableAddresses_DEV008300A548, true + case 518: + return ComObjectTableAddresses_DEV008300A632, true + case 519: + return ComObjectTableAddresses_DEV008300A648, true + case 52: + return ComObjectTableAddresses_DEV006A070210, true + case 520: + return ComObjectTableAddresses_DEV0083000F32, true + case 521: + return ComObjectTableAddresses_DEV0083001032, true + case 522: + return ComObjectTableAddresses_DEV0083000632, true + case 523: + return ComObjectTableAddresses_DEV0083009811, true + case 524: + return ComObjectTableAddresses_DEV0083009816, true + case 525: + return ComObjectTableAddresses_DEV0083009911, true + case 526: + return ComObjectTableAddresses_DEV0083009916, true + case 527: + return ComObjectTableAddresses_DEV0083025520, true + case 528: + return ComObjectTableAddresses_DEV0083024710, true + case 529: + return ComObjectTableAddresses_DEV0083005C12, true + case 53: + return ComObjectTableAddresses_DEV006B106D10, true + case 530: + return ComObjectTableAddresses_DEV0083005C16, true + case 531: + return ComObjectTableAddresses_DEV0083005C17, true + case 532: + return ComObjectTableAddresses_DEV0083005D12, true + case 533: + return ComObjectTableAddresses_DEV0083005D16, true + case 534: + return ComObjectTableAddresses_DEV0083005D17, true + case 535: + return ComObjectTableAddresses_DEV0083005E12, true + case 536: + return ComObjectTableAddresses_DEV0083005E16, true + case 537: + return ComObjectTableAddresses_DEV0083005E17, true + case 538: + return ComObjectTableAddresses_DEV0083005F12, true + case 539: + return ComObjectTableAddresses_DEV0083005F16, true + case 54: + return ComObjectTableAddresses_DEV006BFFF713, true + case 540: + return ComObjectTableAddresses_DEV0083005F17, true + case 541: + return ComObjectTableAddresses_DEV0083005413, true + case 542: + return ComObjectTableAddresses_DEV0083005416, true + case 543: + return ComObjectTableAddresses_DEV0083005417, true + case 544: + return ComObjectTableAddresses_DEV0085000520, true + case 545: + return ComObjectTableAddresses_DEV0085000620, true + case 546: + return ComObjectTableAddresses_DEV0085000720, true + case 547: + return ComObjectTableAddresses_DEV0085012210, true + case 548: + return ComObjectTableAddresses_DEV0085011210, true + case 549: + return ComObjectTableAddresses_DEV0085013220, true + case 55: + return ComObjectTableAddresses_DEV006BFF2111, true + case 550: + return ComObjectTableAddresses_DEV0085010210, true + case 551: + return ComObjectTableAddresses_DEV0085000A10, true + case 552: + return ComObjectTableAddresses_DEV0085000B10, true + case 553: + return ComObjectTableAddresses_DEV0085071010, true + case 554: + return ComObjectTableAddresses_DEV008500FB10, true + case 555: + return ComObjectTableAddresses_DEV0085060210, true + case 556: + return ComObjectTableAddresses_DEV0085060110, true + case 557: + return ComObjectTableAddresses_DEV0085000D20, true + case 558: + return ComObjectTableAddresses_DEV008500C810, true + case 559: + return ComObjectTableAddresses_DEV0085040111, true + case 56: + return ComObjectTableAddresses_DEV006BFFF820, true + case 560: + return ComObjectTableAddresses_DEV008500C910, true + case 561: + return ComObjectTableAddresses_DEV0085045020, true + case 562: + return ComObjectTableAddresses_DEV0085070210, true + case 563: + return ComObjectTableAddresses_DEV0085070110, true + case 564: + return ComObjectTableAddresses_DEV0085070310, true + case 565: + return ComObjectTableAddresses_DEV0085000E20, true + case 566: + return ComObjectTableAddresses_DEV0088100010, true + case 567: + return ComObjectTableAddresses_DEV0088100210, true + case 568: + return ComObjectTableAddresses_DEV0088100110, true + case 569: + return ComObjectTableAddresses_DEV0088110010, true + case 57: + return ComObjectTableAddresses_DEV006C070E11, true + case 570: + return ComObjectTableAddresses_DEV0088120412, true + case 571: + return ComObjectTableAddresses_DEV0088120113, true + case 572: + return ComObjectTableAddresses_DEV008B020301, true + case 573: + return ComObjectTableAddresses_DEV008B010610, true + case 574: + return ComObjectTableAddresses_DEV008B030110, true + case 575: + return ComObjectTableAddresses_DEV008B030310, true + case 576: + return ComObjectTableAddresses_DEV008B030210, true + case 577: + return ComObjectTableAddresses_DEV008B031512, true + case 578: + return ComObjectTableAddresses_DEV008B031412, true + case 579: + return ComObjectTableAddresses_DEV008B031312, true + case 58: + return ComObjectTableAddresses_DEV006C011611, true + case 580: + return ComObjectTableAddresses_DEV008B031212, true + case 581: + return ComObjectTableAddresses_DEV008B031112, true + case 582: + return ComObjectTableAddresses_DEV008B031012, true + case 583: + return ComObjectTableAddresses_DEV008B030510, true + case 584: + return ComObjectTableAddresses_DEV008B030410, true + case 585: + return ComObjectTableAddresses_DEV008B020310, true + case 586: + return ComObjectTableAddresses_DEV008B020210, true + case 587: + return ComObjectTableAddresses_DEV008B020110, true + case 588: + return ComObjectTableAddresses_DEV008B010110, true + case 589: + return ComObjectTableAddresses_DEV008B010210, true + case 59: + return ComObjectTableAddresses_DEV006C011511, true + case 590: + return ComObjectTableAddresses_DEV008B010310, true + case 591: + return ComObjectTableAddresses_DEV008B010410, true + case 592: + return ComObjectTableAddresses_DEV008B040110, true + case 593: + return ComObjectTableAddresses_DEV008B040210, true + case 594: + return ComObjectTableAddresses_DEV008B010910, true + case 595: + return ComObjectTableAddresses_DEV008B010710, true + case 596: + return ComObjectTableAddresses_DEV008B010810, true + case 597: + return ComObjectTableAddresses_DEV008B041111, true + case 598: + return ComObjectTableAddresses_DEV008B041211, true + case 599: + return ComObjectTableAddresses_DEV008B041311, true + case 6: + return ComObjectTableAddresses_DEV0064760210, true + case 60: + return ComObjectTableAddresses_DEV006C050002, true + case 600: + return ComObjectTableAddresses_DEV008E596010, true + case 601: + return ComObjectTableAddresses_DEV008E593710, true + case 602: + return ComObjectTableAddresses_DEV008E597710, true + case 603: + return ComObjectTableAddresses_DEV008E598310, true + case 604: + return ComObjectTableAddresses_DEV008E598910, true + case 605: + return ComObjectTableAddresses_DEV008E598920, true + case 606: + return ComObjectTableAddresses_DEV008E598320, true + case 607: + return ComObjectTableAddresses_DEV008E596021, true + case 608: + return ComObjectTableAddresses_DEV008E597721, true + case 609: + return ComObjectTableAddresses_DEV008E587320, true + case 61: + return ComObjectTableAddresses_DEV006C011311, true + case 610: + return ComObjectTableAddresses_DEV008E587020, true + case 611: + return ComObjectTableAddresses_DEV008E587220, true + case 612: + return ComObjectTableAddresses_DEV008E587120, true + case 613: + return ComObjectTableAddresses_DEV008E679910, true + case 614: + return ComObjectTableAddresses_DEV008E618310, true + case 615: + return ComObjectTableAddresses_DEV008E707910, true + case 616: + return ComObjectTableAddresses_DEV008E676610, true + case 617: + return ComObjectTableAddresses_DEV008E794810, true + case 618: + return ComObjectTableAddresses_DEV008E004010, true + case 619: + return ComObjectTableAddresses_DEV008E570910, true + case 62: + return ComObjectTableAddresses_DEV006C011411, true + case 620: + return ComObjectTableAddresses_DEV008E558810, true + case 621: + return ComObjectTableAddresses_DEV008E683410, true + case 622: + return ComObjectTableAddresses_DEV008E707710, true + case 623: + return ComObjectTableAddresses_DEV008E707810, true + case 624: + return ComObjectTableAddresses_DEV008E787310, true + case 625: + return ComObjectTableAddresses_DEV008E787410, true + case 626: + return ComObjectTableAddresses_DEV0091100013, true + case 627: + return ComObjectTableAddresses_DEV0091100110, true + case 628: + return ComObjectTableAddresses_DEV009A200100, true + case 629: + return ComObjectTableAddresses_DEV009A000400, true + case 63: + return ComObjectTableAddresses_DEV000B0A8410, true + case 630: + return ComObjectTableAddresses_DEV009A100400, true + case 631: + return ComObjectTableAddresses_DEV009A200C00, true + case 632: + return ComObjectTableAddresses_DEV009A200E00, true + case 633: + return ComObjectTableAddresses_DEV009A000201, true + case 634: + return ComObjectTableAddresses_DEV009A000300, true + case 635: + return ComObjectTableAddresses_DEV009A00B000, true + case 636: + return ComObjectTableAddresses_DEV009A00C002, true + case 637: + return ComObjectTableAddresses_DEV009E670101, true + case 638: + return ComObjectTableAddresses_DEV009E119311, true + case 639: + return ComObjectTableAddresses_DEV00A0B07101, true + case 64: + return ComObjectTableAddresses_DEV000B0A7E10, true + case 640: + return ComObjectTableAddresses_DEV00A0B07001, true + case 641: + return ComObjectTableAddresses_DEV00A0B07203, true + case 642: + return ComObjectTableAddresses_DEV00A0B02101, true + case 643: + return ComObjectTableAddresses_DEV00A0B02401, true + case 644: + return ComObjectTableAddresses_DEV00A0B02301, true + case 645: + return ComObjectTableAddresses_DEV00A0B02601, true + case 646: + return ComObjectTableAddresses_DEV00A0B02201, true + case 647: + return ComObjectTableAddresses_DEV00A0B01902, true + case 648: + return ComObjectTableAddresses_DEV00A2100C13, true + case 649: + return ComObjectTableAddresses_DEV00A2300110, true + case 65: + return ComObjectTableAddresses_DEV000B0A7F10, true + case 650: + return ComObjectTableAddresses_DEV00A2101C11, true + case 651: + return ComObjectTableAddresses_DEV00A600020A, true + case 652: + return ComObjectTableAddresses_DEV00A6000B10, true + case 653: + return ComObjectTableAddresses_DEV00A6000B06, true + case 654: + return ComObjectTableAddresses_DEV00A6000B16, true + case 655: + return ComObjectTableAddresses_DEV00A6000300, true + case 656: + return ComObjectTableAddresses_DEV00A6000705, true + case 657: + return ComObjectTableAddresses_DEV00A6000605, true + case 658: + return ComObjectTableAddresses_DEV00A6000500, true + case 659: + return ComObjectTableAddresses_DEV00A6000C10, true + case 66: + return ComObjectTableAddresses_DEV000B0A8010, true + case 660: + return ComObjectTableAddresses_DEV00A6000C00, true + case 661: + return ComObjectTableAddresses_DEV00B6455301, true + case 662: + return ComObjectTableAddresses_DEV00B6464101, true + case 663: + return ComObjectTableAddresses_DEV00B6464201, true + case 664: + return ComObjectTableAddresses_DEV00B6464501, true + case 665: + return ComObjectTableAddresses_DEV00B6434201, true + case 666: + return ComObjectTableAddresses_DEV00B6434202, true + case 667: + return ComObjectTableAddresses_DEV00B6454101, true + case 668: + return ComObjectTableAddresses_DEV00B6454201, true + case 669: + return ComObjectTableAddresses_DEV00B6455001, true + case 67: + return ComObjectTableAddresses_DEV000BBF9111, true + case 670: + return ComObjectTableAddresses_DEV00B6453101, true + case 671: + return ComObjectTableAddresses_DEV00B6453102, true + case 672: + return ComObjectTableAddresses_DEV00B6454102, true + case 673: + return ComObjectTableAddresses_DEV00B6454401, true + case 674: + return ComObjectTableAddresses_DEV00B6454402, true + case 675: + return ComObjectTableAddresses_DEV00B6454202, true + case 676: + return ComObjectTableAddresses_DEV00B6453103, true + case 677: + return ComObjectTableAddresses_DEV00B6453201, true + case 678: + return ComObjectTableAddresses_DEV00B6453301, true + case 679: + return ComObjectTableAddresses_DEV00B6453104, true + case 68: + return ComObjectTableAddresses_DEV000B0A7810, true + case 680: + return ComObjectTableAddresses_DEV00B6454403, true + case 681: + return ComObjectTableAddresses_DEV00B6454801, true + case 682: + return ComObjectTableAddresses_DEV00B6414701, true + case 683: + return ComObjectTableAddresses_DEV00B6414201, true + case 684: + return ComObjectTableAddresses_DEV00B6474101, true + case 685: + return ComObjectTableAddresses_DEV00B6474302, true + case 686: + return ComObjectTableAddresses_DEV00B6474602, true + case 687: + return ComObjectTableAddresses_DEV00B6534D01, true + case 688: + return ComObjectTableAddresses_DEV00B6535001, true + case 689: + return ComObjectTableAddresses_DEV00B6455002, true + case 69: + return ComObjectTableAddresses_DEV000B0A7910, true + case 690: + return ComObjectTableAddresses_DEV00B6453701, true + case 691: + return ComObjectTableAddresses_DEV00B6484101, true + case 692: + return ComObjectTableAddresses_DEV00B6484201, true + case 693: + return ComObjectTableAddresses_DEV00B6484202, true + case 694: + return ComObjectTableAddresses_DEV00B6484301, true + case 695: + return ComObjectTableAddresses_DEV00B6484102, true + case 696: + return ComObjectTableAddresses_DEV00B6455101, true + case 697: + return ComObjectTableAddresses_DEV00B6455003, true + case 698: + return ComObjectTableAddresses_DEV00B6455102, true + case 699: + return ComObjectTableAddresses_DEV00B6453702, true + case 7: + return ComObjectTableAddresses_DEV0064182410, true + case 70: + return ComObjectTableAddresses_DEV000B0A7A10, true + case 700: + return ComObjectTableAddresses_DEV00B6453703, true + case 701: + return ComObjectTableAddresses_DEV00B6484302, true + case 702: + return ComObjectTableAddresses_DEV00B6484801, true + case 703: + return ComObjectTableAddresses_DEV00B6484501, true + case 704: + return ComObjectTableAddresses_DEV00B6484203, true + case 705: + return ComObjectTableAddresses_DEV00B6484103, true + case 706: + return ComObjectTableAddresses_DEV00B6455004, true + case 707: + return ComObjectTableAddresses_DEV00B6455103, true + case 708: + return ComObjectTableAddresses_DEV00B6455401, true + case 709: + return ComObjectTableAddresses_DEV00B6455201, true + case 71: + return ComObjectTableAddresses_DEV000BA69915, true + case 710: + return ComObjectTableAddresses_DEV00B6455402, true + case 711: + return ComObjectTableAddresses_DEV00B6455403, true + case 712: + return ComObjectTableAddresses_DEV00B6484802, true + case 713: + return ComObjectTableAddresses_DEV00B603430A, true + case 714: + return ComObjectTableAddresses_DEV00B600010A, true + case 715: + return ComObjectTableAddresses_DEV00B6FF110A, true + case 716: + return ComObjectTableAddresses_DEV00B6434601, true + case 717: + return ComObjectTableAddresses_DEV00B6434602, true + case 718: + return ComObjectTableAddresses_DEV00C5070610, true + case 719: + return ComObjectTableAddresses_DEV00C5070410, true + case 72: + return ComObjectTableAddresses_DEV000B0A8910, true + case 720: + return ComObjectTableAddresses_DEV00C5070210, true + case 721: + return ComObjectTableAddresses_DEV00C5070E11, true + case 722: + return ComObjectTableAddresses_DEV00C5060240, true + case 723: + return ComObjectTableAddresses_DEV00C5062010, true + case 724: + return ComObjectTableAddresses_DEV00C5080230, true + case 725: + return ComObjectTableAddresses_DEV00C5060310, true + case 726: + return ComObjectTableAddresses_DEV0002A01511, true + case 727: + return ComObjectTableAddresses_DEV0002A01112, true + case 728: + return ComObjectTableAddresses_DEV0002FF1140, true + case 729: + return ComObjectTableAddresses_DEV0002A07E10, true + case 73: + return ComObjectTableAddresses_DEV000B0A8310, true + case 730: + return ComObjectTableAddresses_DEV0002A07213, true + case 731: + return ComObjectTableAddresses_DEV0002A04A35, true + case 732: + return ComObjectTableAddresses_DEV0002613812, true + case 733: + return ComObjectTableAddresses_DEV0002A07420, true + case 734: + return ComObjectTableAddresses_DEV0002A07520, true + case 735: + return ComObjectTableAddresses_DEV0002A07B12, true + case 736: + return ComObjectTableAddresses_DEV0002A07C12, true + case 737: + return ComObjectTableAddresses_DEV0002A04312, true + case 738: + return ComObjectTableAddresses_DEV0002A04412, true + case 739: + return ComObjectTableAddresses_DEV0002A04512, true + case 74: + return ComObjectTableAddresses_DEV000B0A8510, true + case 740: + return ComObjectTableAddresses_DEV0002A04912, true + case 741: + return ComObjectTableAddresses_DEV0002A05012, true + case 742: + return ComObjectTableAddresses_DEV0002A01811, true + case 743: + return ComObjectTableAddresses_DEV0002A03E11, true + case 744: + return ComObjectTableAddresses_DEV0002A08711, true + case 745: + return ComObjectTableAddresses_DEV0002A09311, true + case 746: + return ComObjectTableAddresses_DEV0002A01011, true + case 747: + return ComObjectTableAddresses_DEV0002A01622, true + case 748: + return ComObjectTableAddresses_DEV0002A04210, true + case 749: + return ComObjectTableAddresses_DEV0002A0C310, true + case 75: + return ComObjectTableAddresses_DEV000B0A6319, true + case 750: + return ComObjectTableAddresses_DEV0002A0C316, true + case 751: + return ComObjectTableAddresses_DEV0002A04B10, true + case 752: + return ComObjectTableAddresses_DEV0002A09B12, true + case 753: + return ComObjectTableAddresses_DEV0002A04F13, true + case 754: + return ComObjectTableAddresses_DEV0002A04D13, true + case 755: + return ComObjectTableAddresses_DEV0002A04C13, true + case 756: + return ComObjectTableAddresses_DEV0002A04E13, true + case 757: + return ComObjectTableAddresses_DEV0002A09C12, true + case 758: + return ComObjectTableAddresses_DEV0002A03C10, true + case 759: + return ComObjectTableAddresses_DEV0002A0A511, true + case 76: + return ComObjectTableAddresses_DEV000BA6CC10, true + case 760: + return ComObjectTableAddresses_DEV0002A0A516, true + case 761: + return ComObjectTableAddresses_DEV0002A0A514, true + case 762: + return ComObjectTableAddresses_DEV0002A0A513, true + case 763: + return ComObjectTableAddresses_DEV0002A0A512, true + case 764: + return ComObjectTableAddresses_DEV0002A0A611, true + case 765: + return ComObjectTableAddresses_DEV0002A0A616, true + case 766: + return ComObjectTableAddresses_DEV0002A09111, true + case 767: + return ComObjectTableAddresses_DEV0002A09211, true + case 768: + return ComObjectTableAddresses_DEV0002632010, true + case 769: + return ComObjectTableAddresses_DEV0002632020, true + case 77: + return ComObjectTableAddresses_DEV000BA6DD10, true + case 770: + return ComObjectTableAddresses_DEV0002632170, true + case 771: + return ComObjectTableAddresses_DEV0002632040, true + case 772: + return ComObjectTableAddresses_DEV0002A05814, true + case 773: + return ComObjectTableAddresses_DEV0002A07114, true + case 774: + return ComObjectTableAddresses_DEV0002134A10, true + case 775: + return ComObjectTableAddresses_DEV0002A03D12, true + case 776: + return ComObjectTableAddresses_DEV0002A03422, true + case 777: + return ComObjectTableAddresses_DEV0002A03321, true + case 778: + return ComObjectTableAddresses_DEV0002648B10, true + case 779: + return ComObjectTableAddresses_DEV0002A09013, true + case 78: + return ComObjectTableAddresses_DEV000B509E11, true + case 780: + return ComObjectTableAddresses_DEV0002A08F13, true + case 781: + return ComObjectTableAddresses_DEV0002A05510, true + case 782: + return ComObjectTableAddresses_DEV0002A05910, true + case 783: + return ComObjectTableAddresses_DEV0002A05326, true + case 784: + return ComObjectTableAddresses_DEV0002A05428, true + case 785: + return ComObjectTableAddresses_DEV0002A08411, true + case 786: + return ComObjectTableAddresses_DEV0002A08511, true + case 787: + return ComObjectTableAddresses_DEV0002A00F11, true + case 788: + return ComObjectTableAddresses_DEV0002A07310, true + case 789: + return ComObjectTableAddresses_DEV0002A04110, true + case 79: + return ComObjectTableAddresses_DEV000B709E11, true + case 790: + return ComObjectTableAddresses_DEV0002A06414, true + case 791: + return ComObjectTableAddresses_DEV0002A03813, true + case 792: + return ComObjectTableAddresses_DEV0002A07F13, true + case 793: + return ComObjectTableAddresses_DEV0002A01217, true + case 794: + return ComObjectTableAddresses_DEV0002A07914, true + case 795: + return ComObjectTableAddresses_DEV0002A06114, true + case 796: + return ComObjectTableAddresses_DEV0002A06714, true + case 797: + return ComObjectTableAddresses_DEV0002A06214, true + case 798: + return ComObjectTableAddresses_DEV0002A06514, true + case 799: + return ComObjectTableAddresses_DEV0002A07714, true + case 8: + return ComObjectTableAddresses_DEV0064182310, true + case 80: + return ComObjectTableAddresses_DEV000B10DE11, true + case 800: + return ComObjectTableAddresses_DEV0002A06014, true + case 801: + return ComObjectTableAddresses_DEV0002A06614, true + case 802: + return ComObjectTableAddresses_DEV0002A07814, true + case 803: + return ComObjectTableAddresses_DEV0002A09A13, true + case 804: + return ComObjectTableAddresses_DEV0002A00213, true + case 805: + return ComObjectTableAddresses_DEV0002A00113, true + case 806: + return ComObjectTableAddresses_DEV00C8272040, true + case 807: + return ComObjectTableAddresses_DEV00C8272260, true + case 808: + return ComObjectTableAddresses_DEV00C8272060, true + case 809: + return ComObjectTableAddresses_DEV00C8272160, true + case 81: + return ComObjectTableAddresses_DEV000B109E11, true + case 810: + return ComObjectTableAddresses_DEV00C8272050, true + case 811: + return ComObjectTableAddresses_DEV00C910BA10, true + case 812: + return ComObjectTableAddresses_DEV00C9106D10, true + case 813: + return ComObjectTableAddresses_DEV00C9107C20, true + case 814: + return ComObjectTableAddresses_DEV00C9108511, true + case 815: + return ComObjectTableAddresses_DEV00C9108500, true + case 816: + return ComObjectTableAddresses_DEV00C9106210, true + case 817: + return ComObjectTableAddresses_DEV00C9109310, true + case 818: + return ComObjectTableAddresses_DEV00C9109300, true + case 819: + return ComObjectTableAddresses_DEV00C9109210, true + case 82: + return ComObjectTableAddresses_DEV000BB76611, true + case 820: + return ComObjectTableAddresses_DEV00C9109200, true + case 821: + return ComObjectTableAddresses_DEV00C9109810, true + case 822: + return ComObjectTableAddresses_DEV00C9109A10, true + case 823: + return ComObjectTableAddresses_DEV00C9109A00, true + case 824: + return ComObjectTableAddresses_DEV00C910A420, true + case 825: + return ComObjectTableAddresses_DEV00C910A110, true + case 826: + return ComObjectTableAddresses_DEV00C910A100, true + case 827: + return ComObjectTableAddresses_DEV00C910A010, true + case 828: + return ComObjectTableAddresses_DEV00C910A000, true + case 829: + return ComObjectTableAddresses_DEV00C910A310, true + case 83: + return ComObjectTableAddresses_DEV000B10DA11, true + case 830: + return ComObjectTableAddresses_DEV00C910A300, true + case 831: + return ComObjectTableAddresses_DEV00C910A210, true + case 832: + return ComObjectTableAddresses_DEV00C910A200, true + case 833: + return ComObjectTableAddresses_DEV00C9109B10, true + case 834: + return ComObjectTableAddresses_DEV00C9109B00, true + case 835: + return ComObjectTableAddresses_DEV00C9106110, true + case 836: + return ComObjectTableAddresses_DEV00C9109110, true + case 837: + return ComObjectTableAddresses_DEV00C9109100, true + case 838: + return ComObjectTableAddresses_DEV00C9109610, true + case 839: + return ComObjectTableAddresses_DEV00C9109600, true + case 84: + return ComObjectTableAddresses_DEV000BA76111, true + case 840: + return ComObjectTableAddresses_DEV00C9109710, true + case 841: + return ComObjectTableAddresses_DEV00C9109700, true + case 842: + return ComObjectTableAddresses_DEV00C9109510, true + case 843: + return ComObjectTableAddresses_DEV00C9109500, true + case 844: + return ComObjectTableAddresses_DEV00C9109910, true + case 845: + return ComObjectTableAddresses_DEV00C9109900, true + case 846: + return ComObjectTableAddresses_DEV00C9109C10, true + case 847: + return ComObjectTableAddresses_DEV00C9109C00, true + case 848: + return ComObjectTableAddresses_DEV00C910AB10, true + case 849: + return ComObjectTableAddresses_DEV00C910AB00, true + case 85: + return ComObjectTableAddresses_DEV000BAA5611, true + case 850: + return ComObjectTableAddresses_DEV00C910AC10, true + case 851: + return ComObjectTableAddresses_DEV00C910AC00, true + case 852: + return ComObjectTableAddresses_DEV00C910AD10, true + case 853: + return ComObjectTableAddresses_DEV00C910AD00, true + case 854: + return ComObjectTableAddresses_DEV00C910A810, true + case 855: + return ComObjectTableAddresses_DEV00C910B010, true + case 856: + return ComObjectTableAddresses_DEV00C910B310, true + case 857: + return ComObjectTableAddresses_DEV00C9106311, true + case 858: + return ComObjectTableAddresses_DEV00C9106111, true + case 859: + return ComObjectTableAddresses_DEV00C9106510, true + case 86: + return ComObjectTableAddresses_DEV000BBF9222, true + case 860: + return ComObjectTableAddresses_DEV00C910A710, true + case 861: + return ComObjectTableAddresses_DEV00C9107610, true + case 862: + return ComObjectTableAddresses_DEV00C910AF10, true + case 863: + return ComObjectTableAddresses_DEV00C910B510, true + case 864: + return ComObjectTableAddresses_DEV00C910890A, true + case 865: + return ComObjectTableAddresses_DEV00C9FF1012, true + case 866: + return ComObjectTableAddresses_DEV00C9FF0913, true + case 867: + return ComObjectTableAddresses_DEV00C9FF1112, true + case 868: + return ComObjectTableAddresses_DEV00C9100310, true + case 869: + return ComObjectTableAddresses_DEV00C9101110, true + case 87: + return ComObjectTableAddresses_DEV0071123130, true + case 870: + return ComObjectTableAddresses_DEV00C9101010, true + case 871: + return ComObjectTableAddresses_DEV00C9103710, true + case 872: + return ComObjectTableAddresses_DEV00C9101310, true + case 873: + return ComObjectTableAddresses_DEV00C9FF0D12, true + case 874: + return ComObjectTableAddresses_DEV00C9100E10, true + case 875: + return ComObjectTableAddresses_DEV00C9100610, true + case 876: + return ComObjectTableAddresses_DEV00C9100510, true + case 877: + return ComObjectTableAddresses_DEV00C9100710, true + case 878: + return ComObjectTableAddresses_DEV00C9FF1D20, true + case 879: + return ComObjectTableAddresses_DEV00C9FF1C10, true + case 88: + return ComObjectTableAddresses_DEV0071413133, true + case 880: + return ComObjectTableAddresses_DEV00C9100810, true + case 881: + return ComObjectTableAddresses_DEV00C9FF1420, true + case 882: + return ComObjectTableAddresses_DEV00C9100D10, true + case 883: + return ComObjectTableAddresses_DEV00C9101220, true + case 884: + return ComObjectTableAddresses_DEV00C9102330, true + case 885: + return ComObjectTableAddresses_DEV00C9102130, true + case 886: + return ComObjectTableAddresses_DEV00C9102430, true + case 887: + return ComObjectTableAddresses_DEV00C9100831, true + case 888: + return ComObjectTableAddresses_DEV00C9102530, true + case 889: + return ComObjectTableAddresses_DEV00C9100531, true + case 89: + return ComObjectTableAddresses_DEV0071114019, true + case 890: + return ComObjectTableAddresses_DEV00C9102030, true + case 891: + return ComObjectTableAddresses_DEV00C9100731, true + case 892: + return ComObjectTableAddresses_DEV00C9100631, true + case 893: + return ComObjectTableAddresses_DEV00C9102230, true + case 894: + return ComObjectTableAddresses_DEV00C9100632, true + case 895: + return ComObjectTableAddresses_DEV00C9100532, true + case 896: + return ComObjectTableAddresses_DEV00C9100732, true + case 897: + return ComObjectTableAddresses_DEV00C9100832, true + case 898: + return ComObjectTableAddresses_DEV00C9102532, true + case 899: + return ComObjectTableAddresses_DEV00C9102132, true + case 9: + return ComObjectTableAddresses_DEV0064705C01, true + case 90: + return ComObjectTableAddresses_DEV007111306C, true + case 900: + return ComObjectTableAddresses_DEV00C9102332, true + case 901: + return ComObjectTableAddresses_DEV00C9102432, true + case 902: + return ComObjectTableAddresses_DEV00C9102032, true + case 903: + return ComObjectTableAddresses_DEV00C9102232, true + case 904: + return ComObjectTableAddresses_DEV00C9104432, true + case 905: + return ComObjectTableAddresses_DEV00C9100D11, true + case 906: + return ComObjectTableAddresses_DEV00C9100633, true + case 907: + return ComObjectTableAddresses_DEV00C9100533, true + case 908: + return ComObjectTableAddresses_DEV00C9100733, true + case 909: + return ComObjectTableAddresses_DEV00C9100833, true + case 91: + return ComObjectTableAddresses_DEV0071231112, true + case 910: + return ComObjectTableAddresses_DEV00C9102533, true + case 911: + return ComObjectTableAddresses_DEV00C9102133, true + case 912: + return ComObjectTableAddresses_DEV00C9102333, true + case 913: + return ComObjectTableAddresses_DEV00C9102433, true + case 914: + return ComObjectTableAddresses_DEV00C9102033, true + case 915: + return ComObjectTableAddresses_DEV00C9102233, true + case 916: + return ComObjectTableAddresses_DEV00C9104810, true + case 917: + return ComObjectTableAddresses_DEV00C9FF1A11, true + case 918: + return ComObjectTableAddresses_DEV00C9100212, true + case 919: + return ComObjectTableAddresses_DEV00C9FF0A11, true + case 92: + return ComObjectTableAddresses_DEV0071113080, true + case 920: + return ComObjectTableAddresses_DEV00C9FF0C12, true + case 921: + return ComObjectTableAddresses_DEV00C9100112, true + case 922: + return ComObjectTableAddresses_DEV00C9FF1911, true + case 923: + return ComObjectTableAddresses_DEV00C9FF0B12, true + case 924: + return ComObjectTableAddresses_DEV00C9FF0715, true + case 925: + return ComObjectTableAddresses_DEV00C9FF1B10, true + case 926: + return ComObjectTableAddresses_DEV00C9101610, true + case 927: + return ComObjectTableAddresses_DEV00C9FF1B11, true + case 928: + return ComObjectTableAddresses_DEV00C9101611, true + case 929: + return ComObjectTableAddresses_DEV00C9101612, true + case 93: + return ComObjectTableAddresses_DEV0071321212, true + case 930: + return ComObjectTableAddresses_DEV00C9FF0F11, true + case 931: + return ComObjectTableAddresses_DEV00C910B710, true + case 932: + return ComObjectTableAddresses_DEV00C9FF1E30, true + case 933: + return ComObjectTableAddresses_DEV00C9100410, true + case 934: + return ComObjectTableAddresses_DEV00C9106410, true + case 935: + return ComObjectTableAddresses_DEV00C9106710, true + case 936: + return ComObjectTableAddresses_DEV00C9106700, true + case 937: + return ComObjectTableAddresses_DEV00C9106810, true + case 938: + return ComObjectTableAddresses_DEV00C9106800, true + case 939: + return ComObjectTableAddresses_DEV00C9106010, true + case 94: + return ComObjectTableAddresses_DEV0071321113, true + case 940: + return ComObjectTableAddresses_DEV00C9106000, true + case 941: + return ComObjectTableAddresses_DEV00C9106310, true + case 942: + return ComObjectTableAddresses_DEV00C9107110, true + case 943: + return ComObjectTableAddresses_DEV00C9107100, true + case 944: + return ComObjectTableAddresses_DEV00C9107210, true + case 945: + return ComObjectTableAddresses_DEV00C9107200, true + case 946: + return ComObjectTableAddresses_DEV00C9107310, true + case 947: + return ComObjectTableAddresses_DEV00C9107300, true + case 948: + return ComObjectTableAddresses_DEV00C9107010, true + case 949: + return ComObjectTableAddresses_DEV00C9107000, true + case 95: + return ComObjectTableAddresses_DEV0071322212, true + case 950: + return ComObjectTableAddresses_DEV00C9107A20, true + case 951: + return ComObjectTableAddresses_DEV00C9107A00, true + case 952: + return ComObjectTableAddresses_DEV00C9107B20, true + case 953: + return ComObjectTableAddresses_DEV00C9107B00, true + case 954: + return ComObjectTableAddresses_DEV00C9107820, true + case 955: + return ComObjectTableAddresses_DEV00C9107800, true + case 956: + return ComObjectTableAddresses_DEV00C9107920, true + case 957: + return ComObjectTableAddresses_DEV00C9107900, true + case 958: + return ComObjectTableAddresses_DEV00C9104433, true + case 959: + return ComObjectTableAddresses_DEV00C9107C11, true + case 96: + return ComObjectTableAddresses_DEV0071322112, true + case 960: + return ComObjectTableAddresses_DEV00C9106E10, true + case 961: + return ComObjectTableAddresses_DEV00C9107711, true + case 962: + return ComObjectTableAddresses_DEV00C9108310, true + case 963: + return ComObjectTableAddresses_DEV00C9108210, true + case 964: + return ComObjectTableAddresses_DEV00C9108610, true + case 965: + return ComObjectTableAddresses_DEV00C9107D10, true + case 966: + return ComObjectTableAddresses_DEV00CE648B10, true + case 967: + return ComObjectTableAddresses_DEV00CE494513, true + case 968: + return ComObjectTableAddresses_DEV00CE494311, true + case 969: + return ComObjectTableAddresses_DEV00CE494810, true + case 97: + return ComObjectTableAddresses_DEV0071322312, true + case 970: + return ComObjectTableAddresses_DEV00CE494712, true + case 971: + return ComObjectTableAddresses_DEV00CE494012, true + case 972: + return ComObjectTableAddresses_DEV00CE494111, true + case 973: + return ComObjectTableAddresses_DEV00CE494210, true + case 974: + return ComObjectTableAddresses_DEV00CE494610, true + case 975: + return ComObjectTableAddresses_DEV00CE494412, true + case 976: + return ComObjectTableAddresses_DEV00D0660212, true + case 977: + return ComObjectTableAddresses_DEV00E8000A10, true + case 978: + return ComObjectTableAddresses_DEV00E8000B10, true + case 979: + return ComObjectTableAddresses_DEV00E8000910, true + case 98: + return ComObjectTableAddresses_DEV0071122124, true + case 980: + return ComObjectTableAddresses_DEV00E8001112, true + case 981: + return ComObjectTableAddresses_DEV00E8000C14, true + case 982: + return ComObjectTableAddresses_DEV00E8000D13, true + case 983: + return ComObjectTableAddresses_DEV00E8000E12, true + case 984: + return ComObjectTableAddresses_DEV00E8001310, true + case 985: + return ComObjectTableAddresses_DEV00E8001410, true + case 986: + return ComObjectTableAddresses_DEV00E8001510, true + case 987: + return ComObjectTableAddresses_DEV00E8000F10, true + case 988: + return ComObjectTableAddresses_DEV00E8001010, true + case 989: + return ComObjectTableAddresses_DEV00E8000612, true + case 99: + return ComObjectTableAddresses_DEV0071122135, true + case 990: + return ComObjectTableAddresses_DEV00E8000812, true + case 991: + return ComObjectTableAddresses_DEV00E8000712, true + case 992: + return ComObjectTableAddresses_DEV00EE7FFF10, true + case 993: + return ComObjectTableAddresses_DEV00F4501311, true + case 994: + return ComObjectTableAddresses_DEV00F4B00911, true + case 995: + return ComObjectTableAddresses_DEV0019E20111, true + case 996: + return ComObjectTableAddresses_DEV0019E20210, true + case 997: + return ComObjectTableAddresses_DEV0019E30C11, true + case 998: + return ComObjectTableAddresses_DEV0019E11310, true + case 999: + return ComObjectTableAddresses_DEV0019E11210, true } return 0, false } @@ -18835,13 +16959,13 @@ func ComObjectTableAddressesByName(value string) (enum ComObjectTableAddresses, return 0, false } -func ComObjectTableAddressesKnows(value uint16) bool { +func ComObjectTableAddressesKnows(value uint16) bool { for _, typeValue := range ComObjectTableAddressesValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastComObjectTableAddresses(structType interface{}) ComObjectTableAddresses { @@ -22653,3 +20777,4 @@ func (e ComObjectTableAddresses) PLC4XEnumName() string { func (e ComObjectTableAddresses) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ComObjectTableRealisationType1.go b/plc4go/protocols/knxnetip/readwrite/model/ComObjectTableRealisationType1.go index 814921c9993..86b8f8cec99 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ComObjectTableRealisationType1.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ComObjectTableRealisationType1.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ComObjectTableRealisationType1 is the corresponding interface of ComObjectTableRealisationType1 type ComObjectTableRealisationType1 interface { @@ -51,31 +53,31 @@ type ComObjectTableRealisationType1Exactly interface { // _ComObjectTableRealisationType1 is the data-structure of this message type _ComObjectTableRealisationType1 struct { *_ComObjectTable - NumEntries uint8 - RamFlagsTablePointer uint8 - ComObjectDescriptors []GroupObjectDescriptorRealisationType1 + NumEntries uint8 + RamFlagsTablePointer uint8 + ComObjectDescriptors []GroupObjectDescriptorRealisationType1 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ComObjectTableRealisationType1) GetFirmwareType() FirmwareType { - return FirmwareType_SYSTEM_1 -} +func (m *_ComObjectTableRealisationType1) GetFirmwareType() FirmwareType { +return FirmwareType_SYSTEM_1} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ComObjectTableRealisationType1) InitializeParent(parent ComObjectTable) {} +func (m *_ComObjectTableRealisationType1) InitializeParent(parent ComObjectTable ) {} -func (m *_ComObjectTableRealisationType1) GetParent() ComObjectTable { +func (m *_ComObjectTableRealisationType1) GetParent() ComObjectTable { return m._ComObjectTable } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,13 +100,14 @@ func (m *_ComObjectTableRealisationType1) GetComObjectDescriptors() []GroupObjec /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewComObjectTableRealisationType1 factory function for _ComObjectTableRealisationType1 -func NewComObjectTableRealisationType1(numEntries uint8, ramFlagsTablePointer uint8, comObjectDescriptors []GroupObjectDescriptorRealisationType1) *_ComObjectTableRealisationType1 { +func NewComObjectTableRealisationType1( numEntries uint8 , ramFlagsTablePointer uint8 , comObjectDescriptors []GroupObjectDescriptorRealisationType1 ) *_ComObjectTableRealisationType1 { _result := &_ComObjectTableRealisationType1{ - NumEntries: numEntries, + NumEntries: numEntries, RamFlagsTablePointer: ramFlagsTablePointer, ComObjectDescriptors: comObjectDescriptors, - _ComObjectTable: NewComObjectTable(), + _ComObjectTable: NewComObjectTable(), } _result._ComObjectTable._ComObjectTableChildRequirements = _result return _result @@ -112,7 +115,7 @@ func NewComObjectTableRealisationType1(numEntries uint8, ramFlagsTablePointer ui // Deprecated: use the interface for direct cast func CastComObjectTableRealisationType1(structType interface{}) ComObjectTableRealisationType1 { - if casted, ok := structType.(ComObjectTableRealisationType1); ok { + if casted, ok := structType.(ComObjectTableRealisationType1); ok { return casted } if casted, ok := structType.(*ComObjectTableRealisationType1); ok { @@ -129,10 +132,10 @@ func (m *_ComObjectTableRealisationType1) GetLengthInBits(ctx context.Context) u lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (numEntries) - lengthInBits += 8 + lengthInBits += 8; // Simple field (ramFlagsTablePointer) - lengthInBits += 8 + lengthInBits += 8; // Array field if len(m.ComObjectDescriptors) > 0 { @@ -140,13 +143,14 @@ func (m *_ComObjectTableRealisationType1) GetLengthInBits(ctx context.Context) u arrayCtx := spiContext.CreateArrayContext(ctx, len(m.ComObjectDescriptors), _curItem) _ = arrayCtx _ = _curItem - lengthInBits += element.(interface{ GetLengthInBits(context.Context) uint16 }).GetLengthInBits(arrayCtx) + lengthInBits += element.(interface{GetLengthInBits(context.Context) uint16}).GetLengthInBits(arrayCtx) } } return lengthInBits } + func (m *_ComObjectTableRealisationType1) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,14 +169,14 @@ func ComObjectTableRealisationType1ParseWithBuffer(ctx context.Context, readBuff _ = currentPos // Simple Field (numEntries) - _numEntries, _numEntriesErr := readBuffer.ReadUint8("numEntries", 8) +_numEntries, _numEntriesErr := readBuffer.ReadUint8("numEntries", 8) if _numEntriesErr != nil { return nil, errors.Wrap(_numEntriesErr, "Error parsing 'numEntries' field of ComObjectTableRealisationType1") } numEntries := _numEntries // Simple Field (ramFlagsTablePointer) - _ramFlagsTablePointer, _ramFlagsTablePointerErr := readBuffer.ReadUint8("ramFlagsTablePointer", 8) +_ramFlagsTablePointer, _ramFlagsTablePointerErr := readBuffer.ReadUint8("ramFlagsTablePointer", 8) if _ramFlagsTablePointerErr != nil { return nil, errors.Wrap(_ramFlagsTablePointerErr, "Error parsing 'ramFlagsTablePointer' field of ComObjectTableRealisationType1") } @@ -194,7 +198,7 @@ func ComObjectTableRealisationType1ParseWithBuffer(ctx context.Context, readBuff arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := GroupObjectDescriptorRealisationType1ParseWithBuffer(arrayCtx, readBuffer) +_item, _err := GroupObjectDescriptorRealisationType1ParseWithBuffer(arrayCtx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'comObjectDescriptors' field of ComObjectTableRealisationType1") } @@ -211,8 +215,9 @@ func ComObjectTableRealisationType1ParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_ComObjectTableRealisationType1{ - _ComObjectTable: &_ComObjectTable{}, - NumEntries: numEntries, + _ComObjectTable: &_ComObjectTable{ + }, + NumEntries: numEntries, RamFlagsTablePointer: ramFlagsTablePointer, ComObjectDescriptors: comObjectDescriptors, } @@ -236,36 +241,36 @@ func (m *_ComObjectTableRealisationType1) SerializeWithWriteBuffer(ctx context.C return errors.Wrap(pushErr, "Error pushing for ComObjectTableRealisationType1") } - // Simple Field (numEntries) - numEntries := uint8(m.GetNumEntries()) - _numEntriesErr := writeBuffer.WriteUint8("numEntries", 8, (numEntries)) - if _numEntriesErr != nil { - return errors.Wrap(_numEntriesErr, "Error serializing 'numEntries' field") - } + // Simple Field (numEntries) + numEntries := uint8(m.GetNumEntries()) + _numEntriesErr := writeBuffer.WriteUint8("numEntries", 8, (numEntries)) + if _numEntriesErr != nil { + return errors.Wrap(_numEntriesErr, "Error serializing 'numEntries' field") + } - // Simple Field (ramFlagsTablePointer) - ramFlagsTablePointer := uint8(m.GetRamFlagsTablePointer()) - _ramFlagsTablePointerErr := writeBuffer.WriteUint8("ramFlagsTablePointer", 8, (ramFlagsTablePointer)) - if _ramFlagsTablePointerErr != nil { - return errors.Wrap(_ramFlagsTablePointerErr, "Error serializing 'ramFlagsTablePointer' field") - } + // Simple Field (ramFlagsTablePointer) + ramFlagsTablePointer := uint8(m.GetRamFlagsTablePointer()) + _ramFlagsTablePointerErr := writeBuffer.WriteUint8("ramFlagsTablePointer", 8, (ramFlagsTablePointer)) + if _ramFlagsTablePointerErr != nil { + return errors.Wrap(_ramFlagsTablePointerErr, "Error serializing 'ramFlagsTablePointer' field") + } - // Array Field (comObjectDescriptors) - if pushErr := writeBuffer.PushContext("comObjectDescriptors", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for comObjectDescriptors") - } - for _curItem, _element := range m.GetComObjectDescriptors() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetComObjectDescriptors()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'comObjectDescriptors' field") - } - } - if popErr := writeBuffer.PopContext("comObjectDescriptors", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for comObjectDescriptors") + // Array Field (comObjectDescriptors) + if pushErr := writeBuffer.PushContext("comObjectDescriptors", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for comObjectDescriptors") + } + for _curItem, _element := range m.GetComObjectDescriptors() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetComObjectDescriptors()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'comObjectDescriptors' field") } + } + if popErr := writeBuffer.PopContext("comObjectDescriptors", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for comObjectDescriptors") + } if popErr := writeBuffer.PopContext("ComObjectTableRealisationType1"); popErr != nil { return errors.Wrap(popErr, "Error popping for ComObjectTableRealisationType1") @@ -275,6 +280,7 @@ func (m *_ComObjectTableRealisationType1) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ComObjectTableRealisationType1) isComObjectTableRealisationType1() bool { return true } @@ -289,3 +295,6 @@ func (m *_ComObjectTableRealisationType1) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ComObjectTableRealisationType2.go b/plc4go/protocols/knxnetip/readwrite/model/ComObjectTableRealisationType2.go index c419be593c9..bfe93f5a7b8 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ComObjectTableRealisationType2.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ComObjectTableRealisationType2.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ComObjectTableRealisationType2 is the corresponding interface of ComObjectTableRealisationType2 type ComObjectTableRealisationType2 interface { @@ -51,31 +53,31 @@ type ComObjectTableRealisationType2Exactly interface { // _ComObjectTableRealisationType2 is the data-structure of this message type _ComObjectTableRealisationType2 struct { *_ComObjectTable - NumEntries uint8 - RamFlagsTablePointer uint8 - ComObjectDescriptors []GroupObjectDescriptorRealisationType2 + NumEntries uint8 + RamFlagsTablePointer uint8 + ComObjectDescriptors []GroupObjectDescriptorRealisationType2 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ComObjectTableRealisationType2) GetFirmwareType() FirmwareType { - return FirmwareType_SYSTEM_2 -} +func (m *_ComObjectTableRealisationType2) GetFirmwareType() FirmwareType { +return FirmwareType_SYSTEM_2} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ComObjectTableRealisationType2) InitializeParent(parent ComObjectTable) {} +func (m *_ComObjectTableRealisationType2) InitializeParent(parent ComObjectTable ) {} -func (m *_ComObjectTableRealisationType2) GetParent() ComObjectTable { +func (m *_ComObjectTableRealisationType2) GetParent() ComObjectTable { return m._ComObjectTable } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,13 +100,14 @@ func (m *_ComObjectTableRealisationType2) GetComObjectDescriptors() []GroupObjec /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewComObjectTableRealisationType2 factory function for _ComObjectTableRealisationType2 -func NewComObjectTableRealisationType2(numEntries uint8, ramFlagsTablePointer uint8, comObjectDescriptors []GroupObjectDescriptorRealisationType2) *_ComObjectTableRealisationType2 { +func NewComObjectTableRealisationType2( numEntries uint8 , ramFlagsTablePointer uint8 , comObjectDescriptors []GroupObjectDescriptorRealisationType2 ) *_ComObjectTableRealisationType2 { _result := &_ComObjectTableRealisationType2{ - NumEntries: numEntries, + NumEntries: numEntries, RamFlagsTablePointer: ramFlagsTablePointer, ComObjectDescriptors: comObjectDescriptors, - _ComObjectTable: NewComObjectTable(), + _ComObjectTable: NewComObjectTable(), } _result._ComObjectTable._ComObjectTableChildRequirements = _result return _result @@ -112,7 +115,7 @@ func NewComObjectTableRealisationType2(numEntries uint8, ramFlagsTablePointer ui // Deprecated: use the interface for direct cast func CastComObjectTableRealisationType2(structType interface{}) ComObjectTableRealisationType2 { - if casted, ok := structType.(ComObjectTableRealisationType2); ok { + if casted, ok := structType.(ComObjectTableRealisationType2); ok { return casted } if casted, ok := structType.(*ComObjectTableRealisationType2); ok { @@ -129,10 +132,10 @@ func (m *_ComObjectTableRealisationType2) GetLengthInBits(ctx context.Context) u lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (numEntries) - lengthInBits += 8 + lengthInBits += 8; // Simple field (ramFlagsTablePointer) - lengthInBits += 8 + lengthInBits += 8; // Array field if len(m.ComObjectDescriptors) > 0 { @@ -140,13 +143,14 @@ func (m *_ComObjectTableRealisationType2) GetLengthInBits(ctx context.Context) u arrayCtx := spiContext.CreateArrayContext(ctx, len(m.ComObjectDescriptors), _curItem) _ = arrayCtx _ = _curItem - lengthInBits += element.(interface{ GetLengthInBits(context.Context) uint16 }).GetLengthInBits(arrayCtx) + lengthInBits += element.(interface{GetLengthInBits(context.Context) uint16}).GetLengthInBits(arrayCtx) } } return lengthInBits } + func (m *_ComObjectTableRealisationType2) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,14 +169,14 @@ func ComObjectTableRealisationType2ParseWithBuffer(ctx context.Context, readBuff _ = currentPos // Simple Field (numEntries) - _numEntries, _numEntriesErr := readBuffer.ReadUint8("numEntries", 8) +_numEntries, _numEntriesErr := readBuffer.ReadUint8("numEntries", 8) if _numEntriesErr != nil { return nil, errors.Wrap(_numEntriesErr, "Error parsing 'numEntries' field of ComObjectTableRealisationType2") } numEntries := _numEntries // Simple Field (ramFlagsTablePointer) - _ramFlagsTablePointer, _ramFlagsTablePointerErr := readBuffer.ReadUint8("ramFlagsTablePointer", 8) +_ramFlagsTablePointer, _ramFlagsTablePointerErr := readBuffer.ReadUint8("ramFlagsTablePointer", 8) if _ramFlagsTablePointerErr != nil { return nil, errors.Wrap(_ramFlagsTablePointerErr, "Error parsing 'ramFlagsTablePointer' field of ComObjectTableRealisationType2") } @@ -194,7 +198,7 @@ func ComObjectTableRealisationType2ParseWithBuffer(ctx context.Context, readBuff arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := GroupObjectDescriptorRealisationType2ParseWithBuffer(arrayCtx, readBuffer) +_item, _err := GroupObjectDescriptorRealisationType2ParseWithBuffer(arrayCtx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'comObjectDescriptors' field of ComObjectTableRealisationType2") } @@ -211,8 +215,9 @@ func ComObjectTableRealisationType2ParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_ComObjectTableRealisationType2{ - _ComObjectTable: &_ComObjectTable{}, - NumEntries: numEntries, + _ComObjectTable: &_ComObjectTable{ + }, + NumEntries: numEntries, RamFlagsTablePointer: ramFlagsTablePointer, ComObjectDescriptors: comObjectDescriptors, } @@ -236,36 +241,36 @@ func (m *_ComObjectTableRealisationType2) SerializeWithWriteBuffer(ctx context.C return errors.Wrap(pushErr, "Error pushing for ComObjectTableRealisationType2") } - // Simple Field (numEntries) - numEntries := uint8(m.GetNumEntries()) - _numEntriesErr := writeBuffer.WriteUint8("numEntries", 8, (numEntries)) - if _numEntriesErr != nil { - return errors.Wrap(_numEntriesErr, "Error serializing 'numEntries' field") - } + // Simple Field (numEntries) + numEntries := uint8(m.GetNumEntries()) + _numEntriesErr := writeBuffer.WriteUint8("numEntries", 8, (numEntries)) + if _numEntriesErr != nil { + return errors.Wrap(_numEntriesErr, "Error serializing 'numEntries' field") + } - // Simple Field (ramFlagsTablePointer) - ramFlagsTablePointer := uint8(m.GetRamFlagsTablePointer()) - _ramFlagsTablePointerErr := writeBuffer.WriteUint8("ramFlagsTablePointer", 8, (ramFlagsTablePointer)) - if _ramFlagsTablePointerErr != nil { - return errors.Wrap(_ramFlagsTablePointerErr, "Error serializing 'ramFlagsTablePointer' field") - } + // Simple Field (ramFlagsTablePointer) + ramFlagsTablePointer := uint8(m.GetRamFlagsTablePointer()) + _ramFlagsTablePointerErr := writeBuffer.WriteUint8("ramFlagsTablePointer", 8, (ramFlagsTablePointer)) + if _ramFlagsTablePointerErr != nil { + return errors.Wrap(_ramFlagsTablePointerErr, "Error serializing 'ramFlagsTablePointer' field") + } - // Array Field (comObjectDescriptors) - if pushErr := writeBuffer.PushContext("comObjectDescriptors", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for comObjectDescriptors") - } - for _curItem, _element := range m.GetComObjectDescriptors() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetComObjectDescriptors()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'comObjectDescriptors' field") - } - } - if popErr := writeBuffer.PopContext("comObjectDescriptors", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for comObjectDescriptors") + // Array Field (comObjectDescriptors) + if pushErr := writeBuffer.PushContext("comObjectDescriptors", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for comObjectDescriptors") + } + for _curItem, _element := range m.GetComObjectDescriptors() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetComObjectDescriptors()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'comObjectDescriptors' field") } + } + if popErr := writeBuffer.PopContext("comObjectDescriptors", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for comObjectDescriptors") + } if popErr := writeBuffer.PopContext("ComObjectTableRealisationType2"); popErr != nil { return errors.Wrap(popErr, "Error popping for ComObjectTableRealisationType2") @@ -275,6 +280,7 @@ func (m *_ComObjectTableRealisationType2) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ComObjectTableRealisationType2) isComObjectTableRealisationType2() bool { return true } @@ -289,3 +295,6 @@ func (m *_ComObjectTableRealisationType2) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ComObjectTableRealisationType6.go b/plc4go/protocols/knxnetip/readwrite/model/ComObjectTableRealisationType6.go index bf2a3e0d5ac..ca24956e88e 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ComObjectTableRealisationType6.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ComObjectTableRealisationType6.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ComObjectTableRealisationType6 is the corresponding interface of ComObjectTableRealisationType6 type ComObjectTableRealisationType6 interface { @@ -46,29 +48,29 @@ type ComObjectTableRealisationType6Exactly interface { // _ComObjectTableRealisationType6 is the data-structure of this message type _ComObjectTableRealisationType6 struct { *_ComObjectTable - ComObjectDescriptors GroupObjectDescriptorRealisationType6 + ComObjectDescriptors GroupObjectDescriptorRealisationType6 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ComObjectTableRealisationType6) GetFirmwareType() FirmwareType { - return FirmwareType_SYSTEM_300 -} +func (m *_ComObjectTableRealisationType6) GetFirmwareType() FirmwareType { +return FirmwareType_SYSTEM_300} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ComObjectTableRealisationType6) InitializeParent(parent ComObjectTable) {} +func (m *_ComObjectTableRealisationType6) InitializeParent(parent ComObjectTable ) {} -func (m *_ComObjectTableRealisationType6) GetParent() ComObjectTable { +func (m *_ComObjectTableRealisationType6) GetParent() ComObjectTable { return m._ComObjectTable } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_ComObjectTableRealisationType6) GetComObjectDescriptors() GroupObjectD /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewComObjectTableRealisationType6 factory function for _ComObjectTableRealisationType6 -func NewComObjectTableRealisationType6(comObjectDescriptors GroupObjectDescriptorRealisationType6) *_ComObjectTableRealisationType6 { +func NewComObjectTableRealisationType6( comObjectDescriptors GroupObjectDescriptorRealisationType6 ) *_ComObjectTableRealisationType6 { _result := &_ComObjectTableRealisationType6{ ComObjectDescriptors: comObjectDescriptors, - _ComObjectTable: NewComObjectTable(), + _ComObjectTable: NewComObjectTable(), } _result._ComObjectTable._ComObjectTableChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewComObjectTableRealisationType6(comObjectDescriptors GroupObjectDescripto // Deprecated: use the interface for direct cast func CastComObjectTableRealisationType6(structType interface{}) ComObjectTableRealisationType6 { - if casted, ok := structType.(ComObjectTableRealisationType6); ok { + if casted, ok := structType.(ComObjectTableRealisationType6); ok { return casted } if casted, ok := structType.(*ComObjectTableRealisationType6); ok { @@ -117,6 +120,7 @@ func (m *_ComObjectTableRealisationType6) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_ComObjectTableRealisationType6) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func ComObjectTableRealisationType6ParseWithBuffer(ctx context.Context, readBuff if pullErr := readBuffer.PullContext("comObjectDescriptors"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for comObjectDescriptors") } - _comObjectDescriptors, _comObjectDescriptorsErr := GroupObjectDescriptorRealisationType6ParseWithBuffer(ctx, readBuffer) +_comObjectDescriptors, _comObjectDescriptorsErr := GroupObjectDescriptorRealisationType6ParseWithBuffer(ctx, readBuffer) if _comObjectDescriptorsErr != nil { return nil, errors.Wrap(_comObjectDescriptorsErr, "Error parsing 'comObjectDescriptors' field of ComObjectTableRealisationType6") } @@ -153,7 +157,8 @@ func ComObjectTableRealisationType6ParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_ComObjectTableRealisationType6{ - _ComObjectTable: &_ComObjectTable{}, + _ComObjectTable: &_ComObjectTable{ + }, ComObjectDescriptors: comObjectDescriptors, } _child._ComObjectTable._ComObjectTableChildRequirements = _child @@ -176,17 +181,17 @@ func (m *_ComObjectTableRealisationType6) SerializeWithWriteBuffer(ctx context.C return errors.Wrap(pushErr, "Error pushing for ComObjectTableRealisationType6") } - // Simple Field (comObjectDescriptors) - if pushErr := writeBuffer.PushContext("comObjectDescriptors"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for comObjectDescriptors") - } - _comObjectDescriptorsErr := writeBuffer.WriteSerializable(ctx, m.GetComObjectDescriptors()) - if popErr := writeBuffer.PopContext("comObjectDescriptors"); popErr != nil { - return errors.Wrap(popErr, "Error popping for comObjectDescriptors") - } - if _comObjectDescriptorsErr != nil { - return errors.Wrap(_comObjectDescriptorsErr, "Error serializing 'comObjectDescriptors' field") - } + // Simple Field (comObjectDescriptors) + if pushErr := writeBuffer.PushContext("comObjectDescriptors"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for comObjectDescriptors") + } + _comObjectDescriptorsErr := writeBuffer.WriteSerializable(ctx, m.GetComObjectDescriptors()) + if popErr := writeBuffer.PopContext("comObjectDescriptors"); popErr != nil { + return errors.Wrap(popErr, "Error popping for comObjectDescriptors") + } + if _comObjectDescriptorsErr != nil { + return errors.Wrap(_comObjectDescriptorsErr, "Error serializing 'comObjectDescriptors' field") + } if popErr := writeBuffer.PopContext("ComObjectTableRealisationType6"); popErr != nil { return errors.Wrap(popErr, "Error popping for ComObjectTableRealisationType6") @@ -196,6 +201,7 @@ func (m *_ComObjectTableRealisationType6) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ComObjectTableRealisationType6) isComObjectTableRealisationType6() bool { return true } @@ -210,3 +216,6 @@ func (m *_ComObjectTableRealisationType6) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ComObjectValueType.go b/plc4go/protocols/knxnetip/readwrite/model/ComObjectValueType.go index 720f28f3c64..7708aa55226 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ComObjectValueType.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ComObjectValueType.go @@ -35,20 +35,20 @@ type IComObjectValueType interface { SizeInBytes() uint8 } -const ( - ComObjectValueType_BIT1 ComObjectValueType = 0x00 - ComObjectValueType_BIT2 ComObjectValueType = 0x01 - ComObjectValueType_BIT3 ComObjectValueType = 0x02 - ComObjectValueType_BIT4 ComObjectValueType = 0x03 - ComObjectValueType_BIT5 ComObjectValueType = 0x04 - ComObjectValueType_BIT6 ComObjectValueType = 0x05 - ComObjectValueType_BIT7 ComObjectValueType = 0x06 - ComObjectValueType_BYTE1 ComObjectValueType = 0x07 - ComObjectValueType_BYTE2 ComObjectValueType = 0x08 - ComObjectValueType_BYTE3 ComObjectValueType = 0x09 - ComObjectValueType_BYTE4 ComObjectValueType = 0x0A - ComObjectValueType_BYTE6 ComObjectValueType = 0x0B - ComObjectValueType_BYTE8 ComObjectValueType = 0x0C +const( + ComObjectValueType_BIT1 ComObjectValueType = 0x00 + ComObjectValueType_BIT2 ComObjectValueType = 0x01 + ComObjectValueType_BIT3 ComObjectValueType = 0x02 + ComObjectValueType_BIT4 ComObjectValueType = 0x03 + ComObjectValueType_BIT5 ComObjectValueType = 0x04 + ComObjectValueType_BIT6 ComObjectValueType = 0x05 + ComObjectValueType_BIT7 ComObjectValueType = 0x06 + ComObjectValueType_BYTE1 ComObjectValueType = 0x07 + ComObjectValueType_BYTE2 ComObjectValueType = 0x08 + ComObjectValueType_BYTE3 ComObjectValueType = 0x09 + ComObjectValueType_BYTE4 ComObjectValueType = 0x0A + ComObjectValueType_BYTE6 ComObjectValueType = 0x0B + ComObjectValueType_BYTE8 ComObjectValueType = 0x0C ComObjectValueType_BYTE10 ComObjectValueType = 0x0D ComObjectValueType_BYTE14 ComObjectValueType = 0x0E ) @@ -57,7 +57,7 @@ var ComObjectValueTypeValues []ComObjectValueType func init() { _ = errors.New - ComObjectValueTypeValues = []ComObjectValueType{ + ComObjectValueTypeValues = []ComObjectValueType { ComObjectValueType_BIT1, ComObjectValueType_BIT2, ComObjectValueType_BIT3, @@ -76,70 +76,55 @@ func init() { } } + func (e ComObjectValueType) SizeInBytes() uint8 { - switch e { - case 0x00: - { /* '0x00' */ - return 1 + switch e { + case 0x00: { /* '0x00' */ + return 1 } - case 0x01: - { /* '0x01' */ - return 1 + case 0x01: { /* '0x01' */ + return 1 } - case 0x02: - { /* '0x02' */ - return 1 + case 0x02: { /* '0x02' */ + return 1 } - case 0x03: - { /* '0x03' */ - return 1 + case 0x03: { /* '0x03' */ + return 1 } - case 0x04: - { /* '0x04' */ - return 1 + case 0x04: { /* '0x04' */ + return 1 } - case 0x05: - { /* '0x05' */ - return 1 + case 0x05: { /* '0x05' */ + return 1 } - case 0x06: - { /* '0x06' */ - return 1 + case 0x06: { /* '0x06' */ + return 1 } - case 0x07: - { /* '0x07' */ - return 1 + case 0x07: { /* '0x07' */ + return 1 } - case 0x08: - { /* '0x08' */ - return 2 + case 0x08: { /* '0x08' */ + return 2 } - case 0x09: - { /* '0x09' */ - return 3 + case 0x09: { /* '0x09' */ + return 3 } - case 0x0A: - { /* '0x0A' */ - return 4 + case 0x0A: { /* '0x0A' */ + return 4 } - case 0x0B: - { /* '0x0B' */ - return 6 + case 0x0B: { /* '0x0B' */ + return 6 } - case 0x0C: - { /* '0x0C' */ - return 8 + case 0x0C: { /* '0x0C' */ + return 8 } - case 0x0D: - { /* '0x0D' */ - return 10 + case 0x0D: { /* '0x0D' */ + return 10 } - case 0x0E: - { /* '0x0E' */ - return 14 + case 0x0E: { /* '0x0E' */ + return 14 } - default: - { + default: { return 0 } } @@ -155,36 +140,36 @@ func ComObjectValueTypeFirstEnumForFieldSizeInBytes(value uint8) (ComObjectValue } func ComObjectValueTypeByValue(value uint8) (enum ComObjectValueType, ok bool) { switch value { - case 0x00: - return ComObjectValueType_BIT1, true - case 0x01: - return ComObjectValueType_BIT2, true - case 0x02: - return ComObjectValueType_BIT3, true - case 0x03: - return ComObjectValueType_BIT4, true - case 0x04: - return ComObjectValueType_BIT5, true - case 0x05: - return ComObjectValueType_BIT6, true - case 0x06: - return ComObjectValueType_BIT7, true - case 0x07: - return ComObjectValueType_BYTE1, true - case 0x08: - return ComObjectValueType_BYTE2, true - case 0x09: - return ComObjectValueType_BYTE3, true - case 0x0A: - return ComObjectValueType_BYTE4, true - case 0x0B: - return ComObjectValueType_BYTE6, true - case 0x0C: - return ComObjectValueType_BYTE8, true - case 0x0D: - return ComObjectValueType_BYTE10, true - case 0x0E: - return ComObjectValueType_BYTE14, true + case 0x00: + return ComObjectValueType_BIT1, true + case 0x01: + return ComObjectValueType_BIT2, true + case 0x02: + return ComObjectValueType_BIT3, true + case 0x03: + return ComObjectValueType_BIT4, true + case 0x04: + return ComObjectValueType_BIT5, true + case 0x05: + return ComObjectValueType_BIT6, true + case 0x06: + return ComObjectValueType_BIT7, true + case 0x07: + return ComObjectValueType_BYTE1, true + case 0x08: + return ComObjectValueType_BYTE2, true + case 0x09: + return ComObjectValueType_BYTE3, true + case 0x0A: + return ComObjectValueType_BYTE4, true + case 0x0B: + return ComObjectValueType_BYTE6, true + case 0x0C: + return ComObjectValueType_BYTE8, true + case 0x0D: + return ComObjectValueType_BYTE10, true + case 0x0E: + return ComObjectValueType_BYTE14, true } return 0, false } @@ -225,13 +210,13 @@ func ComObjectValueTypeByName(value string) (enum ComObjectValueType, ok bool) { return 0, false } -func ComObjectValueTypeKnows(value uint8) bool { +func ComObjectValueTypeKnows(value uint8) bool { for _, typeValue := range ComObjectValueTypeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastComObjectValueType(structType interface{}) ComObjectValueType { @@ -321,3 +306,4 @@ func (e ComObjectValueType) PLC4XEnumName() string { func (e ComObjectValueType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ConnectionRequest.go b/plc4go/protocols/knxnetip/readwrite/model/ConnectionRequest.go index d2962dd0758..64114eb30e6 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ConnectionRequest.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ConnectionRequest.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ConnectionRequest is the corresponding interface of ConnectionRequest type ConnectionRequest interface { @@ -51,31 +53,31 @@ type ConnectionRequestExactly interface { // _ConnectionRequest is the data-structure of this message type _ConnectionRequest struct { *_KnxNetIpMessage - HpaiDiscoveryEndpoint HPAIDiscoveryEndpoint - HpaiDataEndpoint HPAIDataEndpoint - ConnectionRequestInformation ConnectionRequestInformation + HpaiDiscoveryEndpoint HPAIDiscoveryEndpoint + HpaiDataEndpoint HPAIDataEndpoint + ConnectionRequestInformation ConnectionRequestInformation } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ConnectionRequest) GetMsgType() uint16 { - return 0x0205 -} +func (m *_ConnectionRequest) GetMsgType() uint16 { +return 0x0205} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ConnectionRequest) InitializeParent(parent KnxNetIpMessage) {} +func (m *_ConnectionRequest) InitializeParent(parent KnxNetIpMessage ) {} -func (m *_ConnectionRequest) GetParent() KnxNetIpMessage { +func (m *_ConnectionRequest) GetParent() KnxNetIpMessage { return m._KnxNetIpMessage } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,13 +100,14 @@ func (m *_ConnectionRequest) GetConnectionRequestInformation() ConnectionRequest /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewConnectionRequest factory function for _ConnectionRequest -func NewConnectionRequest(hpaiDiscoveryEndpoint HPAIDiscoveryEndpoint, hpaiDataEndpoint HPAIDataEndpoint, connectionRequestInformation ConnectionRequestInformation) *_ConnectionRequest { +func NewConnectionRequest( hpaiDiscoveryEndpoint HPAIDiscoveryEndpoint , hpaiDataEndpoint HPAIDataEndpoint , connectionRequestInformation ConnectionRequestInformation ) *_ConnectionRequest { _result := &_ConnectionRequest{ - HpaiDiscoveryEndpoint: hpaiDiscoveryEndpoint, - HpaiDataEndpoint: hpaiDataEndpoint, + HpaiDiscoveryEndpoint: hpaiDiscoveryEndpoint, + HpaiDataEndpoint: hpaiDataEndpoint, ConnectionRequestInformation: connectionRequestInformation, - _KnxNetIpMessage: NewKnxNetIpMessage(), + _KnxNetIpMessage: NewKnxNetIpMessage(), } _result._KnxNetIpMessage._KnxNetIpMessageChildRequirements = _result return _result @@ -112,7 +115,7 @@ func NewConnectionRequest(hpaiDiscoveryEndpoint HPAIDiscoveryEndpoint, hpaiDataE // Deprecated: use the interface for direct cast func CastConnectionRequest(structType interface{}) ConnectionRequest { - if casted, ok := structType.(ConnectionRequest); ok { + if casted, ok := structType.(ConnectionRequest); ok { return casted } if casted, ok := structType.(*ConnectionRequest); ok { @@ -140,6 +143,7 @@ func (m *_ConnectionRequest) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_ConnectionRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -161,7 +165,7 @@ func ConnectionRequestParseWithBuffer(ctx context.Context, readBuffer utils.Read if pullErr := readBuffer.PullContext("hpaiDiscoveryEndpoint"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for hpaiDiscoveryEndpoint") } - _hpaiDiscoveryEndpoint, _hpaiDiscoveryEndpointErr := HPAIDiscoveryEndpointParseWithBuffer(ctx, readBuffer) +_hpaiDiscoveryEndpoint, _hpaiDiscoveryEndpointErr := HPAIDiscoveryEndpointParseWithBuffer(ctx, readBuffer) if _hpaiDiscoveryEndpointErr != nil { return nil, errors.Wrap(_hpaiDiscoveryEndpointErr, "Error parsing 'hpaiDiscoveryEndpoint' field of ConnectionRequest") } @@ -174,7 +178,7 @@ func ConnectionRequestParseWithBuffer(ctx context.Context, readBuffer utils.Read if pullErr := readBuffer.PullContext("hpaiDataEndpoint"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for hpaiDataEndpoint") } - _hpaiDataEndpoint, _hpaiDataEndpointErr := HPAIDataEndpointParseWithBuffer(ctx, readBuffer) +_hpaiDataEndpoint, _hpaiDataEndpointErr := HPAIDataEndpointParseWithBuffer(ctx, readBuffer) if _hpaiDataEndpointErr != nil { return nil, errors.Wrap(_hpaiDataEndpointErr, "Error parsing 'hpaiDataEndpoint' field of ConnectionRequest") } @@ -187,7 +191,7 @@ func ConnectionRequestParseWithBuffer(ctx context.Context, readBuffer utils.Read if pullErr := readBuffer.PullContext("connectionRequestInformation"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for connectionRequestInformation") } - _connectionRequestInformation, _connectionRequestInformationErr := ConnectionRequestInformationParseWithBuffer(ctx, readBuffer) +_connectionRequestInformation, _connectionRequestInformationErr := ConnectionRequestInformationParseWithBuffer(ctx, readBuffer) if _connectionRequestInformationErr != nil { return nil, errors.Wrap(_connectionRequestInformationErr, "Error parsing 'connectionRequestInformation' field of ConnectionRequest") } @@ -202,9 +206,10 @@ func ConnectionRequestParseWithBuffer(ctx context.Context, readBuffer utils.Read // Create a partially initialized instance _child := &_ConnectionRequest{ - _KnxNetIpMessage: &_KnxNetIpMessage{}, - HpaiDiscoveryEndpoint: hpaiDiscoveryEndpoint, - HpaiDataEndpoint: hpaiDataEndpoint, + _KnxNetIpMessage: &_KnxNetIpMessage{ + }, + HpaiDiscoveryEndpoint: hpaiDiscoveryEndpoint, + HpaiDataEndpoint: hpaiDataEndpoint, ConnectionRequestInformation: connectionRequestInformation, } _child._KnxNetIpMessage._KnxNetIpMessageChildRequirements = _child @@ -227,41 +232,41 @@ func (m *_ConnectionRequest) SerializeWithWriteBuffer(ctx context.Context, write return errors.Wrap(pushErr, "Error pushing for ConnectionRequest") } - // Simple Field (hpaiDiscoveryEndpoint) - if pushErr := writeBuffer.PushContext("hpaiDiscoveryEndpoint"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for hpaiDiscoveryEndpoint") - } - _hpaiDiscoveryEndpointErr := writeBuffer.WriteSerializable(ctx, m.GetHpaiDiscoveryEndpoint()) - if popErr := writeBuffer.PopContext("hpaiDiscoveryEndpoint"); popErr != nil { - return errors.Wrap(popErr, "Error popping for hpaiDiscoveryEndpoint") - } - if _hpaiDiscoveryEndpointErr != nil { - return errors.Wrap(_hpaiDiscoveryEndpointErr, "Error serializing 'hpaiDiscoveryEndpoint' field") - } + // Simple Field (hpaiDiscoveryEndpoint) + if pushErr := writeBuffer.PushContext("hpaiDiscoveryEndpoint"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for hpaiDiscoveryEndpoint") + } + _hpaiDiscoveryEndpointErr := writeBuffer.WriteSerializable(ctx, m.GetHpaiDiscoveryEndpoint()) + if popErr := writeBuffer.PopContext("hpaiDiscoveryEndpoint"); popErr != nil { + return errors.Wrap(popErr, "Error popping for hpaiDiscoveryEndpoint") + } + if _hpaiDiscoveryEndpointErr != nil { + return errors.Wrap(_hpaiDiscoveryEndpointErr, "Error serializing 'hpaiDiscoveryEndpoint' field") + } - // Simple Field (hpaiDataEndpoint) - if pushErr := writeBuffer.PushContext("hpaiDataEndpoint"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for hpaiDataEndpoint") - } - _hpaiDataEndpointErr := writeBuffer.WriteSerializable(ctx, m.GetHpaiDataEndpoint()) - if popErr := writeBuffer.PopContext("hpaiDataEndpoint"); popErr != nil { - return errors.Wrap(popErr, "Error popping for hpaiDataEndpoint") - } - if _hpaiDataEndpointErr != nil { - return errors.Wrap(_hpaiDataEndpointErr, "Error serializing 'hpaiDataEndpoint' field") - } + // Simple Field (hpaiDataEndpoint) + if pushErr := writeBuffer.PushContext("hpaiDataEndpoint"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for hpaiDataEndpoint") + } + _hpaiDataEndpointErr := writeBuffer.WriteSerializable(ctx, m.GetHpaiDataEndpoint()) + if popErr := writeBuffer.PopContext("hpaiDataEndpoint"); popErr != nil { + return errors.Wrap(popErr, "Error popping for hpaiDataEndpoint") + } + if _hpaiDataEndpointErr != nil { + return errors.Wrap(_hpaiDataEndpointErr, "Error serializing 'hpaiDataEndpoint' field") + } - // Simple Field (connectionRequestInformation) - if pushErr := writeBuffer.PushContext("connectionRequestInformation"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for connectionRequestInformation") - } - _connectionRequestInformationErr := writeBuffer.WriteSerializable(ctx, m.GetConnectionRequestInformation()) - if popErr := writeBuffer.PopContext("connectionRequestInformation"); popErr != nil { - return errors.Wrap(popErr, "Error popping for connectionRequestInformation") - } - if _connectionRequestInformationErr != nil { - return errors.Wrap(_connectionRequestInformationErr, "Error serializing 'connectionRequestInformation' field") - } + // Simple Field (connectionRequestInformation) + if pushErr := writeBuffer.PushContext("connectionRequestInformation"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for connectionRequestInformation") + } + _connectionRequestInformationErr := writeBuffer.WriteSerializable(ctx, m.GetConnectionRequestInformation()) + if popErr := writeBuffer.PopContext("connectionRequestInformation"); popErr != nil { + return errors.Wrap(popErr, "Error popping for connectionRequestInformation") + } + if _connectionRequestInformationErr != nil { + return errors.Wrap(_connectionRequestInformationErr, "Error serializing 'connectionRequestInformation' field") + } if popErr := writeBuffer.PopContext("ConnectionRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for ConnectionRequest") @@ -271,6 +276,7 @@ func (m *_ConnectionRequest) SerializeWithWriteBuffer(ctx context.Context, write return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ConnectionRequest) isConnectionRequest() bool { return true } @@ -285,3 +291,6 @@ func (m *_ConnectionRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ConnectionRequestInformation.go b/plc4go/protocols/knxnetip/readwrite/model/ConnectionRequestInformation.go index 043a45d52e9..baecff240c8 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ConnectionRequestInformation.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ConnectionRequestInformation.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ConnectionRequestInformation is the corresponding interface of ConnectionRequestInformation type ConnectionRequestInformation interface { @@ -53,6 +55,7 @@ type _ConnectionRequestInformationChildRequirements interface { GetConnectionType() uint8 } + type ConnectionRequestInformationParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child ConnectionRequestInformation, serializeChildFunction func() error) error GetTypeName() string @@ -60,21 +63,22 @@ type ConnectionRequestInformationParent interface { type ConnectionRequestInformationChild interface { utils.Serializable - InitializeParent(parent ConnectionRequestInformation) +InitializeParent(parent ConnectionRequestInformation ) GetParent() *ConnectionRequestInformation GetTypeName() string ConnectionRequestInformation } + // NewConnectionRequestInformation factory function for _ConnectionRequestInformation -func NewConnectionRequestInformation() *_ConnectionRequestInformation { - return &_ConnectionRequestInformation{} +func NewConnectionRequestInformation( ) *_ConnectionRequestInformation { +return &_ConnectionRequestInformation{ } } // Deprecated: use the interface for direct cast func CastConnectionRequestInformation(structType interface{}) ConnectionRequestInformation { - if casted, ok := structType.(ConnectionRequestInformation); ok { + if casted, ok := structType.(ConnectionRequestInformation); ok { return casted } if casted, ok := structType.(*ConnectionRequestInformation); ok { @@ -87,13 +91,14 @@ func (m *_ConnectionRequestInformation) GetTypeName() string { return "ConnectionRequestInformation" } + func (m *_ConnectionRequestInformation) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Implicit Field (structureLength) lengthInBits += 8 // Discriminator Field (connectionType) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } @@ -131,17 +136,17 @@ func ConnectionRequestInformationParseWithBuffer(ctx context.Context, readBuffer // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type ConnectionRequestInformationChildSerializeRequirement interface { ConnectionRequestInformation - InitializeParent(ConnectionRequestInformation) + InitializeParent(ConnectionRequestInformation ) GetParent() ConnectionRequestInformation } var _childTemp interface{} var _child ConnectionRequestInformationChildSerializeRequirement var typeSwitchError error switch { - case connectionType == 0x03: // ConnectionRequestInformationDeviceManagement - _childTemp, typeSwitchError = ConnectionRequestInformationDeviceManagementParseWithBuffer(ctx, readBuffer) - case connectionType == 0x04: // ConnectionRequestInformationTunnelConnection - _childTemp, typeSwitchError = ConnectionRequestInformationTunnelConnectionParseWithBuffer(ctx, readBuffer) +case connectionType == 0x03 : // ConnectionRequestInformationDeviceManagement + _childTemp, typeSwitchError = ConnectionRequestInformationDeviceManagementParseWithBuffer(ctx, readBuffer, ) +case connectionType == 0x04 : // ConnectionRequestInformationTunnelConnection + _childTemp, typeSwitchError = ConnectionRequestInformationTunnelConnectionParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [connectionType=%v]", connectionType) } @@ -155,7 +160,7 @@ func ConnectionRequestInformationParseWithBuffer(ctx context.Context, readBuffer } // Finish initializing - _child.InitializeParent(_child) +_child.InitializeParent(_child ) return _child, nil } @@ -165,7 +170,7 @@ func (pm *_ConnectionRequestInformation) SerializeParent(ctx context.Context, wr _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("ConnectionRequestInformation"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("ConnectionRequestInformation"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for ConnectionRequestInformation") } @@ -195,6 +200,7 @@ func (pm *_ConnectionRequestInformation) SerializeParent(ctx context.Context, wr return nil } + func (m *_ConnectionRequestInformation) isConnectionRequestInformation() bool { return true } @@ -209,3 +215,6 @@ func (m *_ConnectionRequestInformation) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ConnectionRequestInformationDeviceManagement.go b/plc4go/protocols/knxnetip/readwrite/model/ConnectionRequestInformationDeviceManagement.go index 609ba28da53..8f6a22aaae1 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ConnectionRequestInformationDeviceManagement.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ConnectionRequestInformationDeviceManagement.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ConnectionRequestInformationDeviceManagement is the corresponding interface of ConnectionRequestInformationDeviceManagement type ConnectionRequestInformationDeviceManagement interface { @@ -46,31 +48,32 @@ type _ConnectionRequestInformationDeviceManagement struct { *_ConnectionRequestInformation } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ConnectionRequestInformationDeviceManagement) GetConnectionType() uint8 { - return 0x03 -} +func (m *_ConnectionRequestInformationDeviceManagement) GetConnectionType() uint8 { +return 0x03} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ConnectionRequestInformationDeviceManagement) InitializeParent(parent ConnectionRequestInformation) { -} +func (m *_ConnectionRequestInformationDeviceManagement) InitializeParent(parent ConnectionRequestInformation ) {} -func (m *_ConnectionRequestInformationDeviceManagement) GetParent() ConnectionRequestInformation { +func (m *_ConnectionRequestInformationDeviceManagement) GetParent() ConnectionRequestInformation { return m._ConnectionRequestInformation } + // NewConnectionRequestInformationDeviceManagement factory function for _ConnectionRequestInformationDeviceManagement -func NewConnectionRequestInformationDeviceManagement() *_ConnectionRequestInformationDeviceManagement { +func NewConnectionRequestInformationDeviceManagement( ) *_ConnectionRequestInformationDeviceManagement { _result := &_ConnectionRequestInformationDeviceManagement{ - _ConnectionRequestInformation: NewConnectionRequestInformation(), + _ConnectionRequestInformation: NewConnectionRequestInformation(), } _result._ConnectionRequestInformation._ConnectionRequestInformationChildRequirements = _result return _result @@ -78,7 +81,7 @@ func NewConnectionRequestInformationDeviceManagement() *_ConnectionRequestInform // Deprecated: use the interface for direct cast func CastConnectionRequestInformationDeviceManagement(structType interface{}) ConnectionRequestInformationDeviceManagement { - if casted, ok := structType.(ConnectionRequestInformationDeviceManagement); ok { + if casted, ok := structType.(ConnectionRequestInformationDeviceManagement); ok { return casted } if casted, ok := structType.(*ConnectionRequestInformationDeviceManagement); ok { @@ -97,6 +100,7 @@ func (m *_ConnectionRequestInformationDeviceManagement) GetLengthInBits(ctx cont return lengthInBits } + func (m *_ConnectionRequestInformationDeviceManagement) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -120,7 +124,8 @@ func ConnectionRequestInformationDeviceManagementParseWithBuffer(ctx context.Con // Create a partially initialized instance _child := &_ConnectionRequestInformationDeviceManagement{ - _ConnectionRequestInformation: &_ConnectionRequestInformation{}, + _ConnectionRequestInformation: &_ConnectionRequestInformation{ + }, } _child._ConnectionRequestInformation._ConnectionRequestInformationChildRequirements = _child return _child, nil @@ -150,6 +155,7 @@ func (m *_ConnectionRequestInformationDeviceManagement) SerializeWithWriteBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ConnectionRequestInformationDeviceManagement) isConnectionRequestInformationDeviceManagement() bool { return true } @@ -164,3 +170,6 @@ func (m *_ConnectionRequestInformationDeviceManagement) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ConnectionRequestInformationTunnelConnection.go b/plc4go/protocols/knxnetip/readwrite/model/ConnectionRequestInformationTunnelConnection.go index 1a35b06a8ba..8f822b54292 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ConnectionRequestInformationTunnelConnection.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ConnectionRequestInformationTunnelConnection.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ConnectionRequestInformationTunnelConnection is the corresponding interface of ConnectionRequestInformationTunnelConnection type ConnectionRequestInformationTunnelConnection interface { @@ -46,32 +48,31 @@ type ConnectionRequestInformationTunnelConnectionExactly interface { // _ConnectionRequestInformationTunnelConnection is the data-structure of this message type _ConnectionRequestInformationTunnelConnection struct { *_ConnectionRequestInformation - KnxLayer KnxLayer + KnxLayer KnxLayer // Reserved Fields reservedField0 *uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ConnectionRequestInformationTunnelConnection) GetConnectionType() uint8 { - return 0x04 -} +func (m *_ConnectionRequestInformationTunnelConnection) GetConnectionType() uint8 { +return 0x04} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ConnectionRequestInformationTunnelConnection) InitializeParent(parent ConnectionRequestInformation) { -} +func (m *_ConnectionRequestInformationTunnelConnection) InitializeParent(parent ConnectionRequestInformation ) {} -func (m *_ConnectionRequestInformationTunnelConnection) GetParent() ConnectionRequestInformation { +func (m *_ConnectionRequestInformationTunnelConnection) GetParent() ConnectionRequestInformation { return m._ConnectionRequestInformation } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -86,11 +87,12 @@ func (m *_ConnectionRequestInformationTunnelConnection) GetKnxLayer() KnxLayer { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewConnectionRequestInformationTunnelConnection factory function for _ConnectionRequestInformationTunnelConnection -func NewConnectionRequestInformationTunnelConnection(knxLayer KnxLayer) *_ConnectionRequestInformationTunnelConnection { +func NewConnectionRequestInformationTunnelConnection( knxLayer KnxLayer ) *_ConnectionRequestInformationTunnelConnection { _result := &_ConnectionRequestInformationTunnelConnection{ - KnxLayer: knxLayer, - _ConnectionRequestInformation: NewConnectionRequestInformation(), + KnxLayer: knxLayer, + _ConnectionRequestInformation: NewConnectionRequestInformation(), } _result._ConnectionRequestInformation._ConnectionRequestInformationChildRequirements = _result return _result @@ -98,7 +100,7 @@ func NewConnectionRequestInformationTunnelConnection(knxLayer KnxLayer) *_Connec // Deprecated: use the interface for direct cast func CastConnectionRequestInformationTunnelConnection(structType interface{}) ConnectionRequestInformationTunnelConnection { - if casted, ok := structType.(ConnectionRequestInformationTunnelConnection); ok { + if casted, ok := structType.(ConnectionRequestInformationTunnelConnection); ok { return casted } if casted, ok := structType.(*ConnectionRequestInformationTunnelConnection); ok { @@ -123,6 +125,7 @@ func (m *_ConnectionRequestInformationTunnelConnection) GetLengthInBits(ctx cont return lengthInBits } + func (m *_ConnectionRequestInformationTunnelConnection) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -144,7 +147,7 @@ func ConnectionRequestInformationTunnelConnectionParseWithBuffer(ctx context.Con if pullErr := readBuffer.PullContext("knxLayer"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for knxLayer") } - _knxLayer, _knxLayerErr := KnxLayerParseWithBuffer(ctx, readBuffer) +_knxLayer, _knxLayerErr := KnxLayerParseWithBuffer(ctx, readBuffer) if _knxLayerErr != nil { return nil, errors.Wrap(_knxLayerErr, "Error parsing 'knxLayer' field of ConnectionRequestInformationTunnelConnection") } @@ -163,7 +166,7 @@ func ConnectionRequestInformationTunnelConnectionParseWithBuffer(ctx context.Con if reserved != uint8(0x00) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -176,9 +179,10 @@ func ConnectionRequestInformationTunnelConnectionParseWithBuffer(ctx context.Con // Create a partially initialized instance _child := &_ConnectionRequestInformationTunnelConnection{ - _ConnectionRequestInformation: &_ConnectionRequestInformation{}, - KnxLayer: knxLayer, - reservedField0: reservedField0, + _ConnectionRequestInformation: &_ConnectionRequestInformation{ + }, + KnxLayer: knxLayer, + reservedField0: reservedField0, } _child._ConnectionRequestInformation._ConnectionRequestInformationChildRequirements = _child return _child, nil @@ -200,33 +204,33 @@ func (m *_ConnectionRequestInformationTunnelConnection) SerializeWithWriteBuffer return errors.Wrap(pushErr, "Error pushing for ConnectionRequestInformationTunnelConnection") } - // Simple Field (knxLayer) - if pushErr := writeBuffer.PushContext("knxLayer"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for knxLayer") - } - _knxLayerErr := writeBuffer.WriteSerializable(ctx, m.GetKnxLayer()) - if popErr := writeBuffer.PopContext("knxLayer"); popErr != nil { - return errors.Wrap(popErr, "Error popping for knxLayer") - } - if _knxLayerErr != nil { - return errors.Wrap(_knxLayerErr, "Error serializing 'knxLayer' field") - } + // Simple Field (knxLayer) + if pushErr := writeBuffer.PushContext("knxLayer"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for knxLayer") + } + _knxLayerErr := writeBuffer.WriteSerializable(ctx, m.GetKnxLayer()) + if popErr := writeBuffer.PopContext("knxLayer"); popErr != nil { + return errors.Wrap(popErr, "Error popping for knxLayer") + } + if _knxLayerErr != nil { + return errors.Wrap(_knxLayerErr, "Error serializing 'knxLayer' field") + } - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0x00) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0x00), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteUint8("reserved", 8, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0x00) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0x00), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 } + _err := writeBuffer.WriteUint8("reserved", 8, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") + } + } if popErr := writeBuffer.PopContext("ConnectionRequestInformationTunnelConnection"); popErr != nil { return errors.Wrap(popErr, "Error popping for ConnectionRequestInformationTunnelConnection") @@ -236,6 +240,7 @@ func (m *_ConnectionRequestInformationTunnelConnection) SerializeWithWriteBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ConnectionRequestInformationTunnelConnection) isConnectionRequestInformationTunnelConnection() bool { return true } @@ -250,3 +255,6 @@ func (m *_ConnectionRequestInformationTunnelConnection) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ConnectionResponse.go b/plc4go/protocols/knxnetip/readwrite/model/ConnectionResponse.go index 589a88d5479..e55db8c28dd 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ConnectionResponse.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ConnectionResponse.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -27,7 +28,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ConnectionResponse is the corresponding interface of ConnectionResponse type ConnectionResponse interface { @@ -54,32 +56,32 @@ type ConnectionResponseExactly interface { // _ConnectionResponse is the data-structure of this message type _ConnectionResponse struct { *_KnxNetIpMessage - CommunicationChannelId uint8 - Status Status - HpaiDataEndpoint HPAIDataEndpoint - ConnectionResponseDataBlock ConnectionResponseDataBlock + CommunicationChannelId uint8 + Status Status + HpaiDataEndpoint HPAIDataEndpoint + ConnectionResponseDataBlock ConnectionResponseDataBlock } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ConnectionResponse) GetMsgType() uint16 { - return 0x0206 -} +func (m *_ConnectionResponse) GetMsgType() uint16 { +return 0x0206} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ConnectionResponse) InitializeParent(parent KnxNetIpMessage) {} +func (m *_ConnectionResponse) InitializeParent(parent KnxNetIpMessage ) {} -func (m *_ConnectionResponse) GetParent() KnxNetIpMessage { +func (m *_ConnectionResponse) GetParent() KnxNetIpMessage { return m._KnxNetIpMessage } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -106,14 +108,15 @@ func (m *_ConnectionResponse) GetConnectionResponseDataBlock() ConnectionRespons /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewConnectionResponse factory function for _ConnectionResponse -func NewConnectionResponse(communicationChannelId uint8, status Status, hpaiDataEndpoint HPAIDataEndpoint, connectionResponseDataBlock ConnectionResponseDataBlock) *_ConnectionResponse { +func NewConnectionResponse( communicationChannelId uint8 , status Status , hpaiDataEndpoint HPAIDataEndpoint , connectionResponseDataBlock ConnectionResponseDataBlock ) *_ConnectionResponse { _result := &_ConnectionResponse{ - CommunicationChannelId: communicationChannelId, - Status: status, - HpaiDataEndpoint: hpaiDataEndpoint, + CommunicationChannelId: communicationChannelId, + Status: status, + HpaiDataEndpoint: hpaiDataEndpoint, ConnectionResponseDataBlock: connectionResponseDataBlock, - _KnxNetIpMessage: NewKnxNetIpMessage(), + _KnxNetIpMessage: NewKnxNetIpMessage(), } _result._KnxNetIpMessage._KnxNetIpMessageChildRequirements = _result return _result @@ -121,7 +124,7 @@ func NewConnectionResponse(communicationChannelId uint8, status Status, hpaiData // Deprecated: use the interface for direct cast func CastConnectionResponse(structType interface{}) ConnectionResponse { - if casted, ok := structType.(ConnectionResponse); ok { + if casted, ok := structType.(ConnectionResponse); ok { return casted } if casted, ok := structType.(*ConnectionResponse); ok { @@ -138,7 +141,7 @@ func (m *_ConnectionResponse) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (communicationChannelId) - lengthInBits += 8 + lengthInBits += 8; // Simple field (status) lengthInBits += 8 @@ -156,6 +159,7 @@ func (m *_ConnectionResponse) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_ConnectionResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -174,7 +178,7 @@ func ConnectionResponseParseWithBuffer(ctx context.Context, readBuffer utils.Rea _ = currentPos // Simple Field (communicationChannelId) - _communicationChannelId, _communicationChannelIdErr := readBuffer.ReadUint8("communicationChannelId", 8) +_communicationChannelId, _communicationChannelIdErr := readBuffer.ReadUint8("communicationChannelId", 8) if _communicationChannelIdErr != nil { return nil, errors.Wrap(_communicationChannelIdErr, "Error parsing 'communicationChannelId' field of ConnectionResponse") } @@ -184,7 +188,7 @@ func ConnectionResponseParseWithBuffer(ctx context.Context, readBuffer utils.Rea if pullErr := readBuffer.PullContext("status"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for status") } - _status, _statusErr := StatusParseWithBuffer(ctx, readBuffer) +_status, _statusErr := StatusParseWithBuffer(ctx, readBuffer) if _statusErr != nil { return nil, errors.Wrap(_statusErr, "Error parsing 'status' field of ConnectionResponse") } @@ -200,7 +204,7 @@ func ConnectionResponseParseWithBuffer(ctx context.Context, readBuffer utils.Rea if pullErr := readBuffer.PullContext("hpaiDataEndpoint"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for hpaiDataEndpoint") } - _val, _err := HPAIDataEndpointParseWithBuffer(ctx, readBuffer) +_val, _err := HPAIDataEndpointParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -222,7 +226,7 @@ func ConnectionResponseParseWithBuffer(ctx context.Context, readBuffer utils.Rea if pullErr := readBuffer.PullContext("connectionResponseDataBlock"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for connectionResponseDataBlock") } - _val, _err := ConnectionResponseDataBlockParseWithBuffer(ctx, readBuffer) +_val, _err := ConnectionResponseDataBlockParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -243,10 +247,11 @@ func ConnectionResponseParseWithBuffer(ctx context.Context, readBuffer utils.Rea // Create a partially initialized instance _child := &_ConnectionResponse{ - _KnxNetIpMessage: &_KnxNetIpMessage{}, - CommunicationChannelId: communicationChannelId, - Status: status, - HpaiDataEndpoint: hpaiDataEndpoint, + _KnxNetIpMessage: &_KnxNetIpMessage{ + }, + CommunicationChannelId: communicationChannelId, + Status: status, + HpaiDataEndpoint: hpaiDataEndpoint, ConnectionResponseDataBlock: connectionResponseDataBlock, } _child._KnxNetIpMessage._KnxNetIpMessageChildRequirements = _child @@ -269,56 +274,56 @@ func (m *_ConnectionResponse) SerializeWithWriteBuffer(ctx context.Context, writ return errors.Wrap(pushErr, "Error pushing for ConnectionResponse") } - // Simple Field (communicationChannelId) - communicationChannelId := uint8(m.GetCommunicationChannelId()) - _communicationChannelIdErr := writeBuffer.WriteUint8("communicationChannelId", 8, (communicationChannelId)) - if _communicationChannelIdErr != nil { - return errors.Wrap(_communicationChannelIdErr, "Error serializing 'communicationChannelId' field") - } + // Simple Field (communicationChannelId) + communicationChannelId := uint8(m.GetCommunicationChannelId()) + _communicationChannelIdErr := writeBuffer.WriteUint8("communicationChannelId", 8, (communicationChannelId)) + if _communicationChannelIdErr != nil { + return errors.Wrap(_communicationChannelIdErr, "Error serializing 'communicationChannelId' field") + } - // Simple Field (status) - if pushErr := writeBuffer.PushContext("status"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for status") + // Simple Field (status) + if pushErr := writeBuffer.PushContext("status"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for status") + } + _statusErr := writeBuffer.WriteSerializable(ctx, m.GetStatus()) + if popErr := writeBuffer.PopContext("status"); popErr != nil { + return errors.Wrap(popErr, "Error popping for status") + } + if _statusErr != nil { + return errors.Wrap(_statusErr, "Error serializing 'status' field") + } + + // Optional Field (hpaiDataEndpoint) (Can be skipped, if the value is null) + var hpaiDataEndpoint HPAIDataEndpoint = nil + if m.GetHpaiDataEndpoint() != nil { + if pushErr := writeBuffer.PushContext("hpaiDataEndpoint"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for hpaiDataEndpoint") } - _statusErr := writeBuffer.WriteSerializable(ctx, m.GetStatus()) - if popErr := writeBuffer.PopContext("status"); popErr != nil { - return errors.Wrap(popErr, "Error popping for status") + hpaiDataEndpoint = m.GetHpaiDataEndpoint() + _hpaiDataEndpointErr := writeBuffer.WriteSerializable(ctx, hpaiDataEndpoint) + if popErr := writeBuffer.PopContext("hpaiDataEndpoint"); popErr != nil { + return errors.Wrap(popErr, "Error popping for hpaiDataEndpoint") } - if _statusErr != nil { - return errors.Wrap(_statusErr, "Error serializing 'status' field") + if _hpaiDataEndpointErr != nil { + return errors.Wrap(_hpaiDataEndpointErr, "Error serializing 'hpaiDataEndpoint' field") } + } - // Optional Field (hpaiDataEndpoint) (Can be skipped, if the value is null) - var hpaiDataEndpoint HPAIDataEndpoint = nil - if m.GetHpaiDataEndpoint() != nil { - if pushErr := writeBuffer.PushContext("hpaiDataEndpoint"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for hpaiDataEndpoint") - } - hpaiDataEndpoint = m.GetHpaiDataEndpoint() - _hpaiDataEndpointErr := writeBuffer.WriteSerializable(ctx, hpaiDataEndpoint) - if popErr := writeBuffer.PopContext("hpaiDataEndpoint"); popErr != nil { - return errors.Wrap(popErr, "Error popping for hpaiDataEndpoint") - } - if _hpaiDataEndpointErr != nil { - return errors.Wrap(_hpaiDataEndpointErr, "Error serializing 'hpaiDataEndpoint' field") - } + // Optional Field (connectionResponseDataBlock) (Can be skipped, if the value is null) + var connectionResponseDataBlock ConnectionResponseDataBlock = nil + if m.GetConnectionResponseDataBlock() != nil { + if pushErr := writeBuffer.PushContext("connectionResponseDataBlock"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for connectionResponseDataBlock") } - - // Optional Field (connectionResponseDataBlock) (Can be skipped, if the value is null) - var connectionResponseDataBlock ConnectionResponseDataBlock = nil - if m.GetConnectionResponseDataBlock() != nil { - if pushErr := writeBuffer.PushContext("connectionResponseDataBlock"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for connectionResponseDataBlock") - } - connectionResponseDataBlock = m.GetConnectionResponseDataBlock() - _connectionResponseDataBlockErr := writeBuffer.WriteSerializable(ctx, connectionResponseDataBlock) - if popErr := writeBuffer.PopContext("connectionResponseDataBlock"); popErr != nil { - return errors.Wrap(popErr, "Error popping for connectionResponseDataBlock") - } - if _connectionResponseDataBlockErr != nil { - return errors.Wrap(_connectionResponseDataBlockErr, "Error serializing 'connectionResponseDataBlock' field") - } + connectionResponseDataBlock = m.GetConnectionResponseDataBlock() + _connectionResponseDataBlockErr := writeBuffer.WriteSerializable(ctx, connectionResponseDataBlock) + if popErr := writeBuffer.PopContext("connectionResponseDataBlock"); popErr != nil { + return errors.Wrap(popErr, "Error popping for connectionResponseDataBlock") } + if _connectionResponseDataBlockErr != nil { + return errors.Wrap(_connectionResponseDataBlockErr, "Error serializing 'connectionResponseDataBlock' field") + } + } if popErr := writeBuffer.PopContext("ConnectionResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for ConnectionResponse") @@ -328,6 +333,7 @@ func (m *_ConnectionResponse) SerializeWithWriteBuffer(ctx context.Context, writ return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ConnectionResponse) isConnectionResponse() bool { return true } @@ -342,3 +348,6 @@ func (m *_ConnectionResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ConnectionResponseDataBlock.go b/plc4go/protocols/knxnetip/readwrite/model/ConnectionResponseDataBlock.go index b4003b0185f..4d6d873a53c 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ConnectionResponseDataBlock.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ConnectionResponseDataBlock.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ConnectionResponseDataBlock is the corresponding interface of ConnectionResponseDataBlock type ConnectionResponseDataBlock interface { @@ -53,6 +55,7 @@ type _ConnectionResponseDataBlockChildRequirements interface { GetConnectionType() uint8 } + type ConnectionResponseDataBlockParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child ConnectionResponseDataBlock, serializeChildFunction func() error) error GetTypeName() string @@ -60,21 +63,22 @@ type ConnectionResponseDataBlockParent interface { type ConnectionResponseDataBlockChild interface { utils.Serializable - InitializeParent(parent ConnectionResponseDataBlock) +InitializeParent(parent ConnectionResponseDataBlock ) GetParent() *ConnectionResponseDataBlock GetTypeName() string ConnectionResponseDataBlock } + // NewConnectionResponseDataBlock factory function for _ConnectionResponseDataBlock -func NewConnectionResponseDataBlock() *_ConnectionResponseDataBlock { - return &_ConnectionResponseDataBlock{} +func NewConnectionResponseDataBlock( ) *_ConnectionResponseDataBlock { +return &_ConnectionResponseDataBlock{ } } // Deprecated: use the interface for direct cast func CastConnectionResponseDataBlock(structType interface{}) ConnectionResponseDataBlock { - if casted, ok := structType.(ConnectionResponseDataBlock); ok { + if casted, ok := structType.(ConnectionResponseDataBlock); ok { return casted } if casted, ok := structType.(*ConnectionResponseDataBlock); ok { @@ -87,13 +91,14 @@ func (m *_ConnectionResponseDataBlock) GetTypeName() string { return "ConnectionResponseDataBlock" } + func (m *_ConnectionResponseDataBlock) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Implicit Field (structureLength) lengthInBits += 8 // Discriminator Field (connectionType) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } @@ -131,17 +136,17 @@ func ConnectionResponseDataBlockParseWithBuffer(ctx context.Context, readBuffer // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type ConnectionResponseDataBlockChildSerializeRequirement interface { ConnectionResponseDataBlock - InitializeParent(ConnectionResponseDataBlock) + InitializeParent(ConnectionResponseDataBlock ) GetParent() ConnectionResponseDataBlock } var _childTemp interface{} var _child ConnectionResponseDataBlockChildSerializeRequirement var typeSwitchError error switch { - case connectionType == 0x03: // ConnectionResponseDataBlockDeviceManagement - _childTemp, typeSwitchError = ConnectionResponseDataBlockDeviceManagementParseWithBuffer(ctx, readBuffer) - case connectionType == 0x04: // ConnectionResponseDataBlockTunnelConnection - _childTemp, typeSwitchError = ConnectionResponseDataBlockTunnelConnectionParseWithBuffer(ctx, readBuffer) +case connectionType == 0x03 : // ConnectionResponseDataBlockDeviceManagement + _childTemp, typeSwitchError = ConnectionResponseDataBlockDeviceManagementParseWithBuffer(ctx, readBuffer, ) +case connectionType == 0x04 : // ConnectionResponseDataBlockTunnelConnection + _childTemp, typeSwitchError = ConnectionResponseDataBlockTunnelConnectionParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [connectionType=%v]", connectionType) } @@ -155,7 +160,7 @@ func ConnectionResponseDataBlockParseWithBuffer(ctx context.Context, readBuffer } // Finish initializing - _child.InitializeParent(_child) +_child.InitializeParent(_child ) return _child, nil } @@ -165,7 +170,7 @@ func (pm *_ConnectionResponseDataBlock) SerializeParent(ctx context.Context, wri _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("ConnectionResponseDataBlock"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("ConnectionResponseDataBlock"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for ConnectionResponseDataBlock") } @@ -195,6 +200,7 @@ func (pm *_ConnectionResponseDataBlock) SerializeParent(ctx context.Context, wri return nil } + func (m *_ConnectionResponseDataBlock) isConnectionResponseDataBlock() bool { return true } @@ -209,3 +215,6 @@ func (m *_ConnectionResponseDataBlock) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ConnectionResponseDataBlockDeviceManagement.go b/plc4go/protocols/knxnetip/readwrite/model/ConnectionResponseDataBlockDeviceManagement.go index cfa5ee11175..dc0b7947529 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ConnectionResponseDataBlockDeviceManagement.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ConnectionResponseDataBlockDeviceManagement.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ConnectionResponseDataBlockDeviceManagement is the corresponding interface of ConnectionResponseDataBlockDeviceManagement type ConnectionResponseDataBlockDeviceManagement interface { @@ -46,31 +48,32 @@ type _ConnectionResponseDataBlockDeviceManagement struct { *_ConnectionResponseDataBlock } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ConnectionResponseDataBlockDeviceManagement) GetConnectionType() uint8 { - return 0x03 -} +func (m *_ConnectionResponseDataBlockDeviceManagement) GetConnectionType() uint8 { +return 0x03} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ConnectionResponseDataBlockDeviceManagement) InitializeParent(parent ConnectionResponseDataBlock) { -} +func (m *_ConnectionResponseDataBlockDeviceManagement) InitializeParent(parent ConnectionResponseDataBlock ) {} -func (m *_ConnectionResponseDataBlockDeviceManagement) GetParent() ConnectionResponseDataBlock { +func (m *_ConnectionResponseDataBlockDeviceManagement) GetParent() ConnectionResponseDataBlock { return m._ConnectionResponseDataBlock } + // NewConnectionResponseDataBlockDeviceManagement factory function for _ConnectionResponseDataBlockDeviceManagement -func NewConnectionResponseDataBlockDeviceManagement() *_ConnectionResponseDataBlockDeviceManagement { +func NewConnectionResponseDataBlockDeviceManagement( ) *_ConnectionResponseDataBlockDeviceManagement { _result := &_ConnectionResponseDataBlockDeviceManagement{ - _ConnectionResponseDataBlock: NewConnectionResponseDataBlock(), + _ConnectionResponseDataBlock: NewConnectionResponseDataBlock(), } _result._ConnectionResponseDataBlock._ConnectionResponseDataBlockChildRequirements = _result return _result @@ -78,7 +81,7 @@ func NewConnectionResponseDataBlockDeviceManagement() *_ConnectionResponseDataBl // Deprecated: use the interface for direct cast func CastConnectionResponseDataBlockDeviceManagement(structType interface{}) ConnectionResponseDataBlockDeviceManagement { - if casted, ok := structType.(ConnectionResponseDataBlockDeviceManagement); ok { + if casted, ok := structType.(ConnectionResponseDataBlockDeviceManagement); ok { return casted } if casted, ok := structType.(*ConnectionResponseDataBlockDeviceManagement); ok { @@ -97,6 +100,7 @@ func (m *_ConnectionResponseDataBlockDeviceManagement) GetLengthInBits(ctx conte return lengthInBits } + func (m *_ConnectionResponseDataBlockDeviceManagement) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -120,7 +124,8 @@ func ConnectionResponseDataBlockDeviceManagementParseWithBuffer(ctx context.Cont // Create a partially initialized instance _child := &_ConnectionResponseDataBlockDeviceManagement{ - _ConnectionResponseDataBlock: &_ConnectionResponseDataBlock{}, + _ConnectionResponseDataBlock: &_ConnectionResponseDataBlock{ + }, } _child._ConnectionResponseDataBlock._ConnectionResponseDataBlockChildRequirements = _child return _child, nil @@ -150,6 +155,7 @@ func (m *_ConnectionResponseDataBlockDeviceManagement) SerializeWithWriteBuffer( return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ConnectionResponseDataBlockDeviceManagement) isConnectionResponseDataBlockDeviceManagement() bool { return true } @@ -164,3 +170,6 @@ func (m *_ConnectionResponseDataBlockDeviceManagement) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ConnectionResponseDataBlockTunnelConnection.go b/plc4go/protocols/knxnetip/readwrite/model/ConnectionResponseDataBlockTunnelConnection.go index d2713ed4d39..47fd37f9f64 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ConnectionResponseDataBlockTunnelConnection.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ConnectionResponseDataBlockTunnelConnection.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ConnectionResponseDataBlockTunnelConnection is the corresponding interface of ConnectionResponseDataBlockTunnelConnection type ConnectionResponseDataBlockTunnelConnection interface { @@ -46,30 +48,29 @@ type ConnectionResponseDataBlockTunnelConnectionExactly interface { // _ConnectionResponseDataBlockTunnelConnection is the data-structure of this message type _ConnectionResponseDataBlockTunnelConnection struct { *_ConnectionResponseDataBlock - KnxAddress KnxAddress + KnxAddress KnxAddress } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ConnectionResponseDataBlockTunnelConnection) GetConnectionType() uint8 { - return 0x04 -} +func (m *_ConnectionResponseDataBlockTunnelConnection) GetConnectionType() uint8 { +return 0x04} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ConnectionResponseDataBlockTunnelConnection) InitializeParent(parent ConnectionResponseDataBlock) { -} +func (m *_ConnectionResponseDataBlockTunnelConnection) InitializeParent(parent ConnectionResponseDataBlock ) {} -func (m *_ConnectionResponseDataBlockTunnelConnection) GetParent() ConnectionResponseDataBlock { +func (m *_ConnectionResponseDataBlockTunnelConnection) GetParent() ConnectionResponseDataBlock { return m._ConnectionResponseDataBlock } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -84,11 +85,12 @@ func (m *_ConnectionResponseDataBlockTunnelConnection) GetKnxAddress() KnxAddres /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewConnectionResponseDataBlockTunnelConnection factory function for _ConnectionResponseDataBlockTunnelConnection -func NewConnectionResponseDataBlockTunnelConnection(knxAddress KnxAddress) *_ConnectionResponseDataBlockTunnelConnection { +func NewConnectionResponseDataBlockTunnelConnection( knxAddress KnxAddress ) *_ConnectionResponseDataBlockTunnelConnection { _result := &_ConnectionResponseDataBlockTunnelConnection{ - KnxAddress: knxAddress, - _ConnectionResponseDataBlock: NewConnectionResponseDataBlock(), + KnxAddress: knxAddress, + _ConnectionResponseDataBlock: NewConnectionResponseDataBlock(), } _result._ConnectionResponseDataBlock._ConnectionResponseDataBlockChildRequirements = _result return _result @@ -96,7 +98,7 @@ func NewConnectionResponseDataBlockTunnelConnection(knxAddress KnxAddress) *_Con // Deprecated: use the interface for direct cast func CastConnectionResponseDataBlockTunnelConnection(structType interface{}) ConnectionResponseDataBlockTunnelConnection { - if casted, ok := structType.(ConnectionResponseDataBlockTunnelConnection); ok { + if casted, ok := structType.(ConnectionResponseDataBlockTunnelConnection); ok { return casted } if casted, ok := structType.(*ConnectionResponseDataBlockTunnelConnection); ok { @@ -118,6 +120,7 @@ func (m *_ConnectionResponseDataBlockTunnelConnection) GetLengthInBits(ctx conte return lengthInBits } + func (m *_ConnectionResponseDataBlockTunnelConnection) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +142,7 @@ func ConnectionResponseDataBlockTunnelConnectionParseWithBuffer(ctx context.Cont if pullErr := readBuffer.PullContext("knxAddress"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for knxAddress") } - _knxAddress, _knxAddressErr := KnxAddressParseWithBuffer(ctx, readBuffer) +_knxAddress, _knxAddressErr := KnxAddressParseWithBuffer(ctx, readBuffer) if _knxAddressErr != nil { return nil, errors.Wrap(_knxAddressErr, "Error parsing 'knxAddress' field of ConnectionResponseDataBlockTunnelConnection") } @@ -154,8 +157,9 @@ func ConnectionResponseDataBlockTunnelConnectionParseWithBuffer(ctx context.Cont // Create a partially initialized instance _child := &_ConnectionResponseDataBlockTunnelConnection{ - _ConnectionResponseDataBlock: &_ConnectionResponseDataBlock{}, - KnxAddress: knxAddress, + _ConnectionResponseDataBlock: &_ConnectionResponseDataBlock{ + }, + KnxAddress: knxAddress, } _child._ConnectionResponseDataBlock._ConnectionResponseDataBlockChildRequirements = _child return _child, nil @@ -177,17 +181,17 @@ func (m *_ConnectionResponseDataBlockTunnelConnection) SerializeWithWriteBuffer( return errors.Wrap(pushErr, "Error pushing for ConnectionResponseDataBlockTunnelConnection") } - // Simple Field (knxAddress) - if pushErr := writeBuffer.PushContext("knxAddress"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for knxAddress") - } - _knxAddressErr := writeBuffer.WriteSerializable(ctx, m.GetKnxAddress()) - if popErr := writeBuffer.PopContext("knxAddress"); popErr != nil { - return errors.Wrap(popErr, "Error popping for knxAddress") - } - if _knxAddressErr != nil { - return errors.Wrap(_knxAddressErr, "Error serializing 'knxAddress' field") - } + // Simple Field (knxAddress) + if pushErr := writeBuffer.PushContext("knxAddress"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for knxAddress") + } + _knxAddressErr := writeBuffer.WriteSerializable(ctx, m.GetKnxAddress()) + if popErr := writeBuffer.PopContext("knxAddress"); popErr != nil { + return errors.Wrap(popErr, "Error popping for knxAddress") + } + if _knxAddressErr != nil { + return errors.Wrap(_knxAddressErr, "Error serializing 'knxAddress' field") + } if popErr := writeBuffer.PopContext("ConnectionResponseDataBlockTunnelConnection"); popErr != nil { return errors.Wrap(popErr, "Error popping for ConnectionResponseDataBlockTunnelConnection") @@ -197,6 +201,7 @@ func (m *_ConnectionResponseDataBlockTunnelConnection) SerializeWithWriteBuffer( return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ConnectionResponseDataBlockTunnelConnection) isConnectionResponseDataBlockTunnelConnection() bool { return true } @@ -211,3 +216,6 @@ func (m *_ConnectionResponseDataBlockTunnelConnection) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ConnectionStateRequest.go b/plc4go/protocols/knxnetip/readwrite/model/ConnectionStateRequest.go index 509c91c6bcd..ada930b4754 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ConnectionStateRequest.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ConnectionStateRequest.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ConnectionStateRequest is the corresponding interface of ConnectionStateRequest type ConnectionStateRequest interface { @@ -49,32 +51,32 @@ type ConnectionStateRequestExactly interface { // _ConnectionStateRequest is the data-structure of this message type _ConnectionStateRequest struct { *_KnxNetIpMessage - CommunicationChannelId uint8 - HpaiControlEndpoint HPAIControlEndpoint + CommunicationChannelId uint8 + HpaiControlEndpoint HPAIControlEndpoint // Reserved Fields reservedField0 *uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ConnectionStateRequest) GetMsgType() uint16 { - return 0x0207 -} +func (m *_ConnectionStateRequest) GetMsgType() uint16 { +return 0x0207} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ConnectionStateRequest) InitializeParent(parent KnxNetIpMessage) {} +func (m *_ConnectionStateRequest) InitializeParent(parent KnxNetIpMessage ) {} -func (m *_ConnectionStateRequest) GetParent() KnxNetIpMessage { +func (m *_ConnectionStateRequest) GetParent() KnxNetIpMessage { return m._KnxNetIpMessage } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -93,12 +95,13 @@ func (m *_ConnectionStateRequest) GetHpaiControlEndpoint() HPAIControlEndpoint { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewConnectionStateRequest factory function for _ConnectionStateRequest -func NewConnectionStateRequest(communicationChannelId uint8, hpaiControlEndpoint HPAIControlEndpoint) *_ConnectionStateRequest { +func NewConnectionStateRequest( communicationChannelId uint8 , hpaiControlEndpoint HPAIControlEndpoint ) *_ConnectionStateRequest { _result := &_ConnectionStateRequest{ CommunicationChannelId: communicationChannelId, - HpaiControlEndpoint: hpaiControlEndpoint, - _KnxNetIpMessage: NewKnxNetIpMessage(), + HpaiControlEndpoint: hpaiControlEndpoint, + _KnxNetIpMessage: NewKnxNetIpMessage(), } _result._KnxNetIpMessage._KnxNetIpMessageChildRequirements = _result return _result @@ -106,7 +109,7 @@ func NewConnectionStateRequest(communicationChannelId uint8, hpaiControlEndpoint // Deprecated: use the interface for direct cast func CastConnectionStateRequest(structType interface{}) ConnectionStateRequest { - if casted, ok := structType.(ConnectionStateRequest); ok { + if casted, ok := structType.(ConnectionStateRequest); ok { return casted } if casted, ok := structType.(*ConnectionStateRequest); ok { @@ -123,7 +126,7 @@ func (m *_ConnectionStateRequest) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (communicationChannelId) - lengthInBits += 8 + lengthInBits += 8; // Reserved Field (reserved) lengthInBits += 8 @@ -134,6 +137,7 @@ func (m *_ConnectionStateRequest) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_ConnectionStateRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -152,7 +156,7 @@ func ConnectionStateRequestParseWithBuffer(ctx context.Context, readBuffer utils _ = currentPos // Simple Field (communicationChannelId) - _communicationChannelId, _communicationChannelIdErr := readBuffer.ReadUint8("communicationChannelId", 8) +_communicationChannelId, _communicationChannelIdErr := readBuffer.ReadUint8("communicationChannelId", 8) if _communicationChannelIdErr != nil { return nil, errors.Wrap(_communicationChannelIdErr, "Error parsing 'communicationChannelId' field of ConnectionStateRequest") } @@ -168,7 +172,7 @@ func ConnectionStateRequestParseWithBuffer(ctx context.Context, readBuffer utils if reserved != uint8(0x00) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -179,7 +183,7 @@ func ConnectionStateRequestParseWithBuffer(ctx context.Context, readBuffer utils if pullErr := readBuffer.PullContext("hpaiControlEndpoint"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for hpaiControlEndpoint") } - _hpaiControlEndpoint, _hpaiControlEndpointErr := HPAIControlEndpointParseWithBuffer(ctx, readBuffer) +_hpaiControlEndpoint, _hpaiControlEndpointErr := HPAIControlEndpointParseWithBuffer(ctx, readBuffer) if _hpaiControlEndpointErr != nil { return nil, errors.Wrap(_hpaiControlEndpointErr, "Error parsing 'hpaiControlEndpoint' field of ConnectionStateRequest") } @@ -194,10 +198,11 @@ func ConnectionStateRequestParseWithBuffer(ctx context.Context, readBuffer utils // Create a partially initialized instance _child := &_ConnectionStateRequest{ - _KnxNetIpMessage: &_KnxNetIpMessage{}, + _KnxNetIpMessage: &_KnxNetIpMessage{ + }, CommunicationChannelId: communicationChannelId, - HpaiControlEndpoint: hpaiControlEndpoint, - reservedField0: reservedField0, + HpaiControlEndpoint: hpaiControlEndpoint, + reservedField0: reservedField0, } _child._KnxNetIpMessage._KnxNetIpMessageChildRequirements = _child return _child, nil @@ -219,40 +224,40 @@ func (m *_ConnectionStateRequest) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for ConnectionStateRequest") } - // Simple Field (communicationChannelId) - communicationChannelId := uint8(m.GetCommunicationChannelId()) - _communicationChannelIdErr := writeBuffer.WriteUint8("communicationChannelId", 8, (communicationChannelId)) - if _communicationChannelIdErr != nil { - return errors.Wrap(_communicationChannelIdErr, "Error serializing 'communicationChannelId' field") - } - - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0x00) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0x00), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteUint8("reserved", 8, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } - } + // Simple Field (communicationChannelId) + communicationChannelId := uint8(m.GetCommunicationChannelId()) + _communicationChannelIdErr := writeBuffer.WriteUint8("communicationChannelId", 8, (communicationChannelId)) + if _communicationChannelIdErr != nil { + return errors.Wrap(_communicationChannelIdErr, "Error serializing 'communicationChannelId' field") + } - // Simple Field (hpaiControlEndpoint) - if pushErr := writeBuffer.PushContext("hpaiControlEndpoint"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for hpaiControlEndpoint") - } - _hpaiControlEndpointErr := writeBuffer.WriteSerializable(ctx, m.GetHpaiControlEndpoint()) - if popErr := writeBuffer.PopContext("hpaiControlEndpoint"); popErr != nil { - return errors.Wrap(popErr, "Error popping for hpaiControlEndpoint") + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0x00) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0x00), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 } - if _hpaiControlEndpointErr != nil { - return errors.Wrap(_hpaiControlEndpointErr, "Error serializing 'hpaiControlEndpoint' field") + _err := writeBuffer.WriteUint8("reserved", 8, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } + + // Simple Field (hpaiControlEndpoint) + if pushErr := writeBuffer.PushContext("hpaiControlEndpoint"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for hpaiControlEndpoint") + } + _hpaiControlEndpointErr := writeBuffer.WriteSerializable(ctx, m.GetHpaiControlEndpoint()) + if popErr := writeBuffer.PopContext("hpaiControlEndpoint"); popErr != nil { + return errors.Wrap(popErr, "Error popping for hpaiControlEndpoint") + } + if _hpaiControlEndpointErr != nil { + return errors.Wrap(_hpaiControlEndpointErr, "Error serializing 'hpaiControlEndpoint' field") + } if popErr := writeBuffer.PopContext("ConnectionStateRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for ConnectionStateRequest") @@ -262,6 +267,7 @@ func (m *_ConnectionStateRequest) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ConnectionStateRequest) isConnectionStateRequest() bool { return true } @@ -276,3 +282,6 @@ func (m *_ConnectionStateRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ConnectionStateResponse.go b/plc4go/protocols/knxnetip/readwrite/model/ConnectionStateResponse.go index 64b20bc6a48..c6e042d4ef0 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ConnectionStateResponse.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ConnectionStateResponse.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ConnectionStateResponse is the corresponding interface of ConnectionStateResponse type ConnectionStateResponse interface { @@ -49,30 +51,30 @@ type ConnectionStateResponseExactly interface { // _ConnectionStateResponse is the data-structure of this message type _ConnectionStateResponse struct { *_KnxNetIpMessage - CommunicationChannelId uint8 - Status Status + CommunicationChannelId uint8 + Status Status } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ConnectionStateResponse) GetMsgType() uint16 { - return 0x0208 -} +func (m *_ConnectionStateResponse) GetMsgType() uint16 { +return 0x0208} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ConnectionStateResponse) InitializeParent(parent KnxNetIpMessage) {} +func (m *_ConnectionStateResponse) InitializeParent(parent KnxNetIpMessage ) {} -func (m *_ConnectionStateResponse) GetParent() KnxNetIpMessage { +func (m *_ConnectionStateResponse) GetParent() KnxNetIpMessage { return m._KnxNetIpMessage } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -91,12 +93,13 @@ func (m *_ConnectionStateResponse) GetStatus() Status { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewConnectionStateResponse factory function for _ConnectionStateResponse -func NewConnectionStateResponse(communicationChannelId uint8, status Status) *_ConnectionStateResponse { +func NewConnectionStateResponse( communicationChannelId uint8 , status Status ) *_ConnectionStateResponse { _result := &_ConnectionStateResponse{ CommunicationChannelId: communicationChannelId, - Status: status, - _KnxNetIpMessage: NewKnxNetIpMessage(), + Status: status, + _KnxNetIpMessage: NewKnxNetIpMessage(), } _result._KnxNetIpMessage._KnxNetIpMessageChildRequirements = _result return _result @@ -104,7 +107,7 @@ func NewConnectionStateResponse(communicationChannelId uint8, status Status) *_C // Deprecated: use the interface for direct cast func CastConnectionStateResponse(structType interface{}) ConnectionStateResponse { - if casted, ok := structType.(ConnectionStateResponse); ok { + if casted, ok := structType.(ConnectionStateResponse); ok { return casted } if casted, ok := structType.(*ConnectionStateResponse); ok { @@ -121,7 +124,7 @@ func (m *_ConnectionStateResponse) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (communicationChannelId) - lengthInBits += 8 + lengthInBits += 8; // Simple field (status) lengthInBits += 8 @@ -129,6 +132,7 @@ func (m *_ConnectionStateResponse) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_ConnectionStateResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -147,7 +151,7 @@ func ConnectionStateResponseParseWithBuffer(ctx context.Context, readBuffer util _ = currentPos // Simple Field (communicationChannelId) - _communicationChannelId, _communicationChannelIdErr := readBuffer.ReadUint8("communicationChannelId", 8) +_communicationChannelId, _communicationChannelIdErr := readBuffer.ReadUint8("communicationChannelId", 8) if _communicationChannelIdErr != nil { return nil, errors.Wrap(_communicationChannelIdErr, "Error parsing 'communicationChannelId' field of ConnectionStateResponse") } @@ -157,7 +161,7 @@ func ConnectionStateResponseParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("status"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for status") } - _status, _statusErr := StatusParseWithBuffer(ctx, readBuffer) +_status, _statusErr := StatusParseWithBuffer(ctx, readBuffer) if _statusErr != nil { return nil, errors.Wrap(_statusErr, "Error parsing 'status' field of ConnectionStateResponse") } @@ -172,9 +176,10 @@ func ConnectionStateResponseParseWithBuffer(ctx context.Context, readBuffer util // Create a partially initialized instance _child := &_ConnectionStateResponse{ - _KnxNetIpMessage: &_KnxNetIpMessage{}, + _KnxNetIpMessage: &_KnxNetIpMessage{ + }, CommunicationChannelId: communicationChannelId, - Status: status, + Status: status, } _child._KnxNetIpMessage._KnxNetIpMessageChildRequirements = _child return _child, nil @@ -196,24 +201,24 @@ func (m *_ConnectionStateResponse) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for ConnectionStateResponse") } - // Simple Field (communicationChannelId) - communicationChannelId := uint8(m.GetCommunicationChannelId()) - _communicationChannelIdErr := writeBuffer.WriteUint8("communicationChannelId", 8, (communicationChannelId)) - if _communicationChannelIdErr != nil { - return errors.Wrap(_communicationChannelIdErr, "Error serializing 'communicationChannelId' field") - } + // Simple Field (communicationChannelId) + communicationChannelId := uint8(m.GetCommunicationChannelId()) + _communicationChannelIdErr := writeBuffer.WriteUint8("communicationChannelId", 8, (communicationChannelId)) + if _communicationChannelIdErr != nil { + return errors.Wrap(_communicationChannelIdErr, "Error serializing 'communicationChannelId' field") + } - // Simple Field (status) - if pushErr := writeBuffer.PushContext("status"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for status") - } - _statusErr := writeBuffer.WriteSerializable(ctx, m.GetStatus()) - if popErr := writeBuffer.PopContext("status"); popErr != nil { - return errors.Wrap(popErr, "Error popping for status") - } - if _statusErr != nil { - return errors.Wrap(_statusErr, "Error serializing 'status' field") - } + // Simple Field (status) + if pushErr := writeBuffer.PushContext("status"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for status") + } + _statusErr := writeBuffer.WriteSerializable(ctx, m.GetStatus()) + if popErr := writeBuffer.PopContext("status"); popErr != nil { + return errors.Wrap(popErr, "Error popping for status") + } + if _statusErr != nil { + return errors.Wrap(_statusErr, "Error serializing 'status' field") + } if popErr := writeBuffer.PopContext("ConnectionStateResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for ConnectionStateResponse") @@ -223,6 +228,7 @@ func (m *_ConnectionStateResponse) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ConnectionStateResponse) isConnectionStateResponse() bool { return true } @@ -237,3 +243,6 @@ func (m *_ConnectionStateResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/DIBDeviceInfo.go b/plc4go/protocols/knxnetip/readwrite/model/DIBDeviceInfo.go index 3fc1e883ee4..b7e58d271d7 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/DIBDeviceInfo.go +++ b/plc4go/protocols/knxnetip/readwrite/model/DIBDeviceInfo.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // DIBDeviceInfo is the corresponding interface of DIBDeviceInfo type DIBDeviceInfo interface { @@ -60,17 +62,18 @@ type DIBDeviceInfoExactly interface { // _DIBDeviceInfo is the data-structure of this message type _DIBDeviceInfo struct { - DescriptionType uint8 - KnxMedium KnxMedium - DeviceStatus DeviceStatus - KnxAddress KnxAddress - ProjectInstallationIdentifier ProjectInstallationIdentifier - KnxNetIpDeviceSerialNumber []byte - KnxNetIpDeviceMulticastAddress IPAddress - KnxNetIpDeviceMacAddress MACAddress - DeviceFriendlyName []byte + DescriptionType uint8 + KnxMedium KnxMedium + DeviceStatus DeviceStatus + KnxAddress KnxAddress + ProjectInstallationIdentifier ProjectInstallationIdentifier + KnxNetIpDeviceSerialNumber []byte + KnxNetIpDeviceMulticastAddress IPAddress + KnxNetIpDeviceMacAddress MACAddress + DeviceFriendlyName []byte } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -117,14 +120,15 @@ func (m *_DIBDeviceInfo) GetDeviceFriendlyName() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewDIBDeviceInfo factory function for _DIBDeviceInfo -func NewDIBDeviceInfo(descriptionType uint8, knxMedium KnxMedium, deviceStatus DeviceStatus, knxAddress KnxAddress, projectInstallationIdentifier ProjectInstallationIdentifier, knxNetIpDeviceSerialNumber []byte, knxNetIpDeviceMulticastAddress IPAddress, knxNetIpDeviceMacAddress MACAddress, deviceFriendlyName []byte) *_DIBDeviceInfo { - return &_DIBDeviceInfo{DescriptionType: descriptionType, KnxMedium: knxMedium, DeviceStatus: deviceStatus, KnxAddress: knxAddress, ProjectInstallationIdentifier: projectInstallationIdentifier, KnxNetIpDeviceSerialNumber: knxNetIpDeviceSerialNumber, KnxNetIpDeviceMulticastAddress: knxNetIpDeviceMulticastAddress, KnxNetIpDeviceMacAddress: knxNetIpDeviceMacAddress, DeviceFriendlyName: deviceFriendlyName} +func NewDIBDeviceInfo( descriptionType uint8 , knxMedium KnxMedium , deviceStatus DeviceStatus , knxAddress KnxAddress , projectInstallationIdentifier ProjectInstallationIdentifier , knxNetIpDeviceSerialNumber []byte , knxNetIpDeviceMulticastAddress IPAddress , knxNetIpDeviceMacAddress MACAddress , deviceFriendlyName []byte ) *_DIBDeviceInfo { +return &_DIBDeviceInfo{ DescriptionType: descriptionType , KnxMedium: knxMedium , DeviceStatus: deviceStatus , KnxAddress: knxAddress , ProjectInstallationIdentifier: projectInstallationIdentifier , KnxNetIpDeviceSerialNumber: knxNetIpDeviceSerialNumber , KnxNetIpDeviceMulticastAddress: knxNetIpDeviceMulticastAddress , KnxNetIpDeviceMacAddress: knxNetIpDeviceMacAddress , DeviceFriendlyName: deviceFriendlyName } } // Deprecated: use the interface for direct cast func CastDIBDeviceInfo(structType interface{}) DIBDeviceInfo { - if casted, ok := structType.(DIBDeviceInfo); ok { + if casted, ok := structType.(DIBDeviceInfo); ok { return casted } if casted, ok := structType.(*DIBDeviceInfo); ok { @@ -144,7 +148,7 @@ func (m *_DIBDeviceInfo) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += 8 // Simple field (descriptionType) - lengthInBits += 8 + lengthInBits += 8; // Simple field (knxMedium) lengthInBits += 8 @@ -177,6 +181,7 @@ func (m *_DIBDeviceInfo) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_DIBDeviceInfo) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -202,7 +207,7 @@ func DIBDeviceInfoParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff } // Simple Field (descriptionType) - _descriptionType, _descriptionTypeErr := readBuffer.ReadUint8("descriptionType", 8) +_descriptionType, _descriptionTypeErr := readBuffer.ReadUint8("descriptionType", 8) if _descriptionTypeErr != nil { return nil, errors.Wrap(_descriptionTypeErr, "Error parsing 'descriptionType' field of DIBDeviceInfo") } @@ -212,7 +217,7 @@ func DIBDeviceInfoParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff if pullErr := readBuffer.PullContext("knxMedium"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for knxMedium") } - _knxMedium, _knxMediumErr := KnxMediumParseWithBuffer(ctx, readBuffer) +_knxMedium, _knxMediumErr := KnxMediumParseWithBuffer(ctx, readBuffer) if _knxMediumErr != nil { return nil, errors.Wrap(_knxMediumErr, "Error parsing 'knxMedium' field of DIBDeviceInfo") } @@ -225,7 +230,7 @@ func DIBDeviceInfoParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff if pullErr := readBuffer.PullContext("deviceStatus"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for deviceStatus") } - _deviceStatus, _deviceStatusErr := DeviceStatusParseWithBuffer(ctx, readBuffer) +_deviceStatus, _deviceStatusErr := DeviceStatusParseWithBuffer(ctx, readBuffer) if _deviceStatusErr != nil { return nil, errors.Wrap(_deviceStatusErr, "Error parsing 'deviceStatus' field of DIBDeviceInfo") } @@ -238,7 +243,7 @@ func DIBDeviceInfoParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff if pullErr := readBuffer.PullContext("knxAddress"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for knxAddress") } - _knxAddress, _knxAddressErr := KnxAddressParseWithBuffer(ctx, readBuffer) +_knxAddress, _knxAddressErr := KnxAddressParseWithBuffer(ctx, readBuffer) if _knxAddressErr != nil { return nil, errors.Wrap(_knxAddressErr, "Error parsing 'knxAddress' field of DIBDeviceInfo") } @@ -251,7 +256,7 @@ func DIBDeviceInfoParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff if pullErr := readBuffer.PullContext("projectInstallationIdentifier"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for projectInstallationIdentifier") } - _projectInstallationIdentifier, _projectInstallationIdentifierErr := ProjectInstallationIdentifierParseWithBuffer(ctx, readBuffer) +_projectInstallationIdentifier, _projectInstallationIdentifierErr := ProjectInstallationIdentifierParseWithBuffer(ctx, readBuffer) if _projectInstallationIdentifierErr != nil { return nil, errors.Wrap(_projectInstallationIdentifierErr, "Error parsing 'projectInstallationIdentifier' field of DIBDeviceInfo") } @@ -270,7 +275,7 @@ func DIBDeviceInfoParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff if pullErr := readBuffer.PullContext("knxNetIpDeviceMulticastAddress"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for knxNetIpDeviceMulticastAddress") } - _knxNetIpDeviceMulticastAddress, _knxNetIpDeviceMulticastAddressErr := IPAddressParseWithBuffer(ctx, readBuffer) +_knxNetIpDeviceMulticastAddress, _knxNetIpDeviceMulticastAddressErr := IPAddressParseWithBuffer(ctx, readBuffer) if _knxNetIpDeviceMulticastAddressErr != nil { return nil, errors.Wrap(_knxNetIpDeviceMulticastAddressErr, "Error parsing 'knxNetIpDeviceMulticastAddress' field of DIBDeviceInfo") } @@ -283,7 +288,7 @@ func DIBDeviceInfoParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff if pullErr := readBuffer.PullContext("knxNetIpDeviceMacAddress"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for knxNetIpDeviceMacAddress") } - _knxNetIpDeviceMacAddress, _knxNetIpDeviceMacAddressErr := MACAddressParseWithBuffer(ctx, readBuffer) +_knxNetIpDeviceMacAddress, _knxNetIpDeviceMacAddressErr := MACAddressParseWithBuffer(ctx, readBuffer) if _knxNetIpDeviceMacAddressErr != nil { return nil, errors.Wrap(_knxNetIpDeviceMacAddressErr, "Error parsing 'knxNetIpDeviceMacAddress' field of DIBDeviceInfo") } @@ -304,16 +309,16 @@ func DIBDeviceInfoParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff // Create the instance return &_DIBDeviceInfo{ - DescriptionType: descriptionType, - KnxMedium: knxMedium, - DeviceStatus: deviceStatus, - KnxAddress: knxAddress, - ProjectInstallationIdentifier: projectInstallationIdentifier, - KnxNetIpDeviceSerialNumber: knxNetIpDeviceSerialNumber, - KnxNetIpDeviceMulticastAddress: knxNetIpDeviceMulticastAddress, - KnxNetIpDeviceMacAddress: knxNetIpDeviceMacAddress, - DeviceFriendlyName: deviceFriendlyName, - }, nil + DescriptionType: descriptionType, + KnxMedium: knxMedium, + DeviceStatus: deviceStatus, + KnxAddress: knxAddress, + ProjectInstallationIdentifier: projectInstallationIdentifier, + KnxNetIpDeviceSerialNumber: knxNetIpDeviceSerialNumber, + KnxNetIpDeviceMulticastAddress: knxNetIpDeviceMulticastAddress, + KnxNetIpDeviceMacAddress: knxNetIpDeviceMacAddress, + DeviceFriendlyName: deviceFriendlyName, + }, nil } func (m *_DIBDeviceInfo) Serialize() ([]byte, error) { @@ -327,7 +332,7 @@ func (m *_DIBDeviceInfo) Serialize() ([]byte, error) { func (m *_DIBDeviceInfo) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("DIBDeviceInfo"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("DIBDeviceInfo"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for DIBDeviceInfo") } @@ -435,6 +440,7 @@ func (m *_DIBDeviceInfo) SerializeWithWriteBuffer(ctx context.Context, writeBuff return nil } + func (m *_DIBDeviceInfo) isDIBDeviceInfo() bool { return true } @@ -449,3 +455,6 @@ func (m *_DIBDeviceInfo) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/DIBSuppSvcFamilies.go b/plc4go/protocols/knxnetip/readwrite/model/DIBSuppSvcFamilies.go index 0d0a8d560b0..46785f087e7 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/DIBSuppSvcFamilies.go +++ b/plc4go/protocols/knxnetip/readwrite/model/DIBSuppSvcFamilies.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // DIBSuppSvcFamilies is the corresponding interface of DIBSuppSvcFamilies type DIBSuppSvcFamilies interface { @@ -47,10 +49,11 @@ type DIBSuppSvcFamiliesExactly interface { // _DIBSuppSvcFamilies is the data-structure of this message type _DIBSuppSvcFamilies struct { - DescriptionType uint8 - ServiceIds []ServiceId + DescriptionType uint8 + ServiceIds []ServiceId } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -69,14 +72,15 @@ func (m *_DIBSuppSvcFamilies) GetServiceIds() []ServiceId { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewDIBSuppSvcFamilies factory function for _DIBSuppSvcFamilies -func NewDIBSuppSvcFamilies(descriptionType uint8, serviceIds []ServiceId) *_DIBSuppSvcFamilies { - return &_DIBSuppSvcFamilies{DescriptionType: descriptionType, ServiceIds: serviceIds} +func NewDIBSuppSvcFamilies( descriptionType uint8 , serviceIds []ServiceId ) *_DIBSuppSvcFamilies { +return &_DIBSuppSvcFamilies{ DescriptionType: descriptionType , ServiceIds: serviceIds } } // Deprecated: use the interface for direct cast func CastDIBSuppSvcFamilies(structType interface{}) DIBSuppSvcFamilies { - if casted, ok := structType.(DIBSuppSvcFamilies); ok { + if casted, ok := structType.(DIBSuppSvcFamilies); ok { return casted } if casted, ok := structType.(*DIBSuppSvcFamilies); ok { @@ -96,7 +100,7 @@ func (m *_DIBSuppSvcFamilies) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += 8 // Simple field (descriptionType) - lengthInBits += 8 + lengthInBits += 8; // Array field if len(m.ServiceIds) > 0 { @@ -108,6 +112,7 @@ func (m *_DIBSuppSvcFamilies) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_DIBSuppSvcFamilies) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -133,7 +138,7 @@ func DIBSuppSvcFamiliesParseWithBuffer(ctx context.Context, readBuffer utils.Rea } // Simple Field (descriptionType) - _descriptionType, _descriptionTypeErr := readBuffer.ReadUint8("descriptionType", 8) +_descriptionType, _descriptionTypeErr := readBuffer.ReadUint8("descriptionType", 8) if _descriptionTypeErr != nil { return nil, errors.Wrap(_descriptionTypeErr, "Error parsing 'descriptionType' field of DIBSuppSvcFamilies") } @@ -148,8 +153,8 @@ func DIBSuppSvcFamiliesParseWithBuffer(ctx context.Context, readBuffer utils.Rea { _serviceIdsLength := uint16(structureLength) - uint16(uint16(2)) _serviceIdsEndPos := positionAware.GetPos() + uint16(_serviceIdsLength) - for positionAware.GetPos() < _serviceIdsEndPos { - _item, _err := ServiceIdParseWithBuffer(ctx, readBuffer) + for ;positionAware.GetPos() < _serviceIdsEndPos; { +_item, _err := ServiceIdParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'serviceIds' field of DIBSuppSvcFamilies") } @@ -166,9 +171,9 @@ func DIBSuppSvcFamiliesParseWithBuffer(ctx context.Context, readBuffer utils.Rea // Create the instance return &_DIBSuppSvcFamilies{ - DescriptionType: descriptionType, - ServiceIds: serviceIds, - }, nil + DescriptionType: descriptionType, + ServiceIds: serviceIds, + }, nil } func (m *_DIBSuppSvcFamilies) Serialize() ([]byte, error) { @@ -182,7 +187,7 @@ func (m *_DIBSuppSvcFamilies) Serialize() ([]byte, error) { func (m *_DIBSuppSvcFamilies) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("DIBSuppSvcFamilies"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("DIBSuppSvcFamilies"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for DIBSuppSvcFamilies") } @@ -223,6 +228,7 @@ func (m *_DIBSuppSvcFamilies) SerializeWithWriteBuffer(ctx context.Context, writ return nil } + func (m *_DIBSuppSvcFamilies) isDIBSuppSvcFamilies() bool { return true } @@ -237,3 +243,6 @@ func (m *_DIBSuppSvcFamilies) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/DescriptionRequest.go b/plc4go/protocols/knxnetip/readwrite/model/DescriptionRequest.go index 97e6bf3b941..ae2fe5fafa2 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/DescriptionRequest.go +++ b/plc4go/protocols/knxnetip/readwrite/model/DescriptionRequest.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // DescriptionRequest is the corresponding interface of DescriptionRequest type DescriptionRequest interface { @@ -47,29 +49,29 @@ type DescriptionRequestExactly interface { // _DescriptionRequest is the data-structure of this message type _DescriptionRequest struct { *_KnxNetIpMessage - HpaiControlEndpoint HPAIControlEndpoint + HpaiControlEndpoint HPAIControlEndpoint } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_DescriptionRequest) GetMsgType() uint16 { - return 0x0203 -} +func (m *_DescriptionRequest) GetMsgType() uint16 { +return 0x0203} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_DescriptionRequest) InitializeParent(parent KnxNetIpMessage) {} +func (m *_DescriptionRequest) InitializeParent(parent KnxNetIpMessage ) {} -func (m *_DescriptionRequest) GetParent() KnxNetIpMessage { +func (m *_DescriptionRequest) GetParent() KnxNetIpMessage { return m._KnxNetIpMessage } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -84,11 +86,12 @@ func (m *_DescriptionRequest) GetHpaiControlEndpoint() HPAIControlEndpoint { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewDescriptionRequest factory function for _DescriptionRequest -func NewDescriptionRequest(hpaiControlEndpoint HPAIControlEndpoint) *_DescriptionRequest { +func NewDescriptionRequest( hpaiControlEndpoint HPAIControlEndpoint ) *_DescriptionRequest { _result := &_DescriptionRequest{ HpaiControlEndpoint: hpaiControlEndpoint, - _KnxNetIpMessage: NewKnxNetIpMessage(), + _KnxNetIpMessage: NewKnxNetIpMessage(), } _result._KnxNetIpMessage._KnxNetIpMessageChildRequirements = _result return _result @@ -96,7 +99,7 @@ func NewDescriptionRequest(hpaiControlEndpoint HPAIControlEndpoint) *_Descriptio // Deprecated: use the interface for direct cast func CastDescriptionRequest(structType interface{}) DescriptionRequest { - if casted, ok := structType.(DescriptionRequest); ok { + if casted, ok := structType.(DescriptionRequest); ok { return casted } if casted, ok := structType.(*DescriptionRequest); ok { @@ -118,6 +121,7 @@ func (m *_DescriptionRequest) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_DescriptionRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +143,7 @@ func DescriptionRequestParseWithBuffer(ctx context.Context, readBuffer utils.Rea if pullErr := readBuffer.PullContext("hpaiControlEndpoint"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for hpaiControlEndpoint") } - _hpaiControlEndpoint, _hpaiControlEndpointErr := HPAIControlEndpointParseWithBuffer(ctx, readBuffer) +_hpaiControlEndpoint, _hpaiControlEndpointErr := HPAIControlEndpointParseWithBuffer(ctx, readBuffer) if _hpaiControlEndpointErr != nil { return nil, errors.Wrap(_hpaiControlEndpointErr, "Error parsing 'hpaiControlEndpoint' field of DescriptionRequest") } @@ -154,7 +158,8 @@ func DescriptionRequestParseWithBuffer(ctx context.Context, readBuffer utils.Rea // Create a partially initialized instance _child := &_DescriptionRequest{ - _KnxNetIpMessage: &_KnxNetIpMessage{}, + _KnxNetIpMessage: &_KnxNetIpMessage{ + }, HpaiControlEndpoint: hpaiControlEndpoint, } _child._KnxNetIpMessage._KnxNetIpMessageChildRequirements = _child @@ -177,17 +182,17 @@ func (m *_DescriptionRequest) SerializeWithWriteBuffer(ctx context.Context, writ return errors.Wrap(pushErr, "Error pushing for DescriptionRequest") } - // Simple Field (hpaiControlEndpoint) - if pushErr := writeBuffer.PushContext("hpaiControlEndpoint"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for hpaiControlEndpoint") - } - _hpaiControlEndpointErr := writeBuffer.WriteSerializable(ctx, m.GetHpaiControlEndpoint()) - if popErr := writeBuffer.PopContext("hpaiControlEndpoint"); popErr != nil { - return errors.Wrap(popErr, "Error popping for hpaiControlEndpoint") - } - if _hpaiControlEndpointErr != nil { - return errors.Wrap(_hpaiControlEndpointErr, "Error serializing 'hpaiControlEndpoint' field") - } + // Simple Field (hpaiControlEndpoint) + if pushErr := writeBuffer.PushContext("hpaiControlEndpoint"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for hpaiControlEndpoint") + } + _hpaiControlEndpointErr := writeBuffer.WriteSerializable(ctx, m.GetHpaiControlEndpoint()) + if popErr := writeBuffer.PopContext("hpaiControlEndpoint"); popErr != nil { + return errors.Wrap(popErr, "Error popping for hpaiControlEndpoint") + } + if _hpaiControlEndpointErr != nil { + return errors.Wrap(_hpaiControlEndpointErr, "Error serializing 'hpaiControlEndpoint' field") + } if popErr := writeBuffer.PopContext("DescriptionRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for DescriptionRequest") @@ -197,6 +202,7 @@ func (m *_DescriptionRequest) SerializeWithWriteBuffer(ctx context.Context, writ return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_DescriptionRequest) isDescriptionRequest() bool { return true } @@ -211,3 +217,6 @@ func (m *_DescriptionRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/DescriptionResponse.go b/plc4go/protocols/knxnetip/readwrite/model/DescriptionResponse.go index 1203db7a19d..7909e85e928 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/DescriptionResponse.go +++ b/plc4go/protocols/knxnetip/readwrite/model/DescriptionResponse.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // DescriptionResponse is the corresponding interface of DescriptionResponse type DescriptionResponse interface { @@ -49,30 +51,30 @@ type DescriptionResponseExactly interface { // _DescriptionResponse is the data-structure of this message type _DescriptionResponse struct { *_KnxNetIpMessage - DibDeviceInfo DIBDeviceInfo - DibSuppSvcFamilies DIBSuppSvcFamilies + DibDeviceInfo DIBDeviceInfo + DibSuppSvcFamilies DIBSuppSvcFamilies } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_DescriptionResponse) GetMsgType() uint16 { - return 0x0204 -} +func (m *_DescriptionResponse) GetMsgType() uint16 { +return 0x0204} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_DescriptionResponse) InitializeParent(parent KnxNetIpMessage) {} +func (m *_DescriptionResponse) InitializeParent(parent KnxNetIpMessage ) {} -func (m *_DescriptionResponse) GetParent() KnxNetIpMessage { +func (m *_DescriptionResponse) GetParent() KnxNetIpMessage { return m._KnxNetIpMessage } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -91,12 +93,13 @@ func (m *_DescriptionResponse) GetDibSuppSvcFamilies() DIBSuppSvcFamilies { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewDescriptionResponse factory function for _DescriptionResponse -func NewDescriptionResponse(dibDeviceInfo DIBDeviceInfo, dibSuppSvcFamilies DIBSuppSvcFamilies) *_DescriptionResponse { +func NewDescriptionResponse( dibDeviceInfo DIBDeviceInfo , dibSuppSvcFamilies DIBSuppSvcFamilies ) *_DescriptionResponse { _result := &_DescriptionResponse{ - DibDeviceInfo: dibDeviceInfo, + DibDeviceInfo: dibDeviceInfo, DibSuppSvcFamilies: dibSuppSvcFamilies, - _KnxNetIpMessage: NewKnxNetIpMessage(), + _KnxNetIpMessage: NewKnxNetIpMessage(), } _result._KnxNetIpMessage._KnxNetIpMessageChildRequirements = _result return _result @@ -104,7 +107,7 @@ func NewDescriptionResponse(dibDeviceInfo DIBDeviceInfo, dibSuppSvcFamilies DIBS // Deprecated: use the interface for direct cast func CastDescriptionResponse(structType interface{}) DescriptionResponse { - if casted, ok := structType.(DescriptionResponse); ok { + if casted, ok := structType.(DescriptionResponse); ok { return casted } if casted, ok := structType.(*DescriptionResponse); ok { @@ -129,6 +132,7 @@ func (m *_DescriptionResponse) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_DescriptionResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -150,7 +154,7 @@ func DescriptionResponseParseWithBuffer(ctx context.Context, readBuffer utils.Re if pullErr := readBuffer.PullContext("dibDeviceInfo"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for dibDeviceInfo") } - _dibDeviceInfo, _dibDeviceInfoErr := DIBDeviceInfoParseWithBuffer(ctx, readBuffer) +_dibDeviceInfo, _dibDeviceInfoErr := DIBDeviceInfoParseWithBuffer(ctx, readBuffer) if _dibDeviceInfoErr != nil { return nil, errors.Wrap(_dibDeviceInfoErr, "Error parsing 'dibDeviceInfo' field of DescriptionResponse") } @@ -163,7 +167,7 @@ func DescriptionResponseParseWithBuffer(ctx context.Context, readBuffer utils.Re if pullErr := readBuffer.PullContext("dibSuppSvcFamilies"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for dibSuppSvcFamilies") } - _dibSuppSvcFamilies, _dibSuppSvcFamiliesErr := DIBSuppSvcFamiliesParseWithBuffer(ctx, readBuffer) +_dibSuppSvcFamilies, _dibSuppSvcFamiliesErr := DIBSuppSvcFamiliesParseWithBuffer(ctx, readBuffer) if _dibSuppSvcFamiliesErr != nil { return nil, errors.Wrap(_dibSuppSvcFamiliesErr, "Error parsing 'dibSuppSvcFamilies' field of DescriptionResponse") } @@ -178,8 +182,9 @@ func DescriptionResponseParseWithBuffer(ctx context.Context, readBuffer utils.Re // Create a partially initialized instance _child := &_DescriptionResponse{ - _KnxNetIpMessage: &_KnxNetIpMessage{}, - DibDeviceInfo: dibDeviceInfo, + _KnxNetIpMessage: &_KnxNetIpMessage{ + }, + DibDeviceInfo: dibDeviceInfo, DibSuppSvcFamilies: dibSuppSvcFamilies, } _child._KnxNetIpMessage._KnxNetIpMessageChildRequirements = _child @@ -202,29 +207,29 @@ func (m *_DescriptionResponse) SerializeWithWriteBuffer(ctx context.Context, wri return errors.Wrap(pushErr, "Error pushing for DescriptionResponse") } - // Simple Field (dibDeviceInfo) - if pushErr := writeBuffer.PushContext("dibDeviceInfo"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for dibDeviceInfo") - } - _dibDeviceInfoErr := writeBuffer.WriteSerializable(ctx, m.GetDibDeviceInfo()) - if popErr := writeBuffer.PopContext("dibDeviceInfo"); popErr != nil { - return errors.Wrap(popErr, "Error popping for dibDeviceInfo") - } - if _dibDeviceInfoErr != nil { - return errors.Wrap(_dibDeviceInfoErr, "Error serializing 'dibDeviceInfo' field") - } + // Simple Field (dibDeviceInfo) + if pushErr := writeBuffer.PushContext("dibDeviceInfo"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for dibDeviceInfo") + } + _dibDeviceInfoErr := writeBuffer.WriteSerializable(ctx, m.GetDibDeviceInfo()) + if popErr := writeBuffer.PopContext("dibDeviceInfo"); popErr != nil { + return errors.Wrap(popErr, "Error popping for dibDeviceInfo") + } + if _dibDeviceInfoErr != nil { + return errors.Wrap(_dibDeviceInfoErr, "Error serializing 'dibDeviceInfo' field") + } - // Simple Field (dibSuppSvcFamilies) - if pushErr := writeBuffer.PushContext("dibSuppSvcFamilies"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for dibSuppSvcFamilies") - } - _dibSuppSvcFamiliesErr := writeBuffer.WriteSerializable(ctx, m.GetDibSuppSvcFamilies()) - if popErr := writeBuffer.PopContext("dibSuppSvcFamilies"); popErr != nil { - return errors.Wrap(popErr, "Error popping for dibSuppSvcFamilies") - } - if _dibSuppSvcFamiliesErr != nil { - return errors.Wrap(_dibSuppSvcFamiliesErr, "Error serializing 'dibSuppSvcFamilies' field") - } + // Simple Field (dibSuppSvcFamilies) + if pushErr := writeBuffer.PushContext("dibSuppSvcFamilies"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for dibSuppSvcFamilies") + } + _dibSuppSvcFamiliesErr := writeBuffer.WriteSerializable(ctx, m.GetDibSuppSvcFamilies()) + if popErr := writeBuffer.PopContext("dibSuppSvcFamilies"); popErr != nil { + return errors.Wrap(popErr, "Error popping for dibSuppSvcFamilies") + } + if _dibSuppSvcFamiliesErr != nil { + return errors.Wrap(_dibSuppSvcFamiliesErr, "Error serializing 'dibSuppSvcFamilies' field") + } if popErr := writeBuffer.PopContext("DescriptionResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for DescriptionResponse") @@ -234,6 +239,7 @@ func (m *_DescriptionResponse) SerializeWithWriteBuffer(ctx context.Context, wri return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_DescriptionResponse) isDescriptionResponse() bool { return true } @@ -248,3 +254,6 @@ func (m *_DescriptionResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/DeviceConfigurationAck.go b/plc4go/protocols/knxnetip/readwrite/model/DeviceConfigurationAck.go index f35d642a38c..189d058581b 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/DeviceConfigurationAck.go +++ b/plc4go/protocols/knxnetip/readwrite/model/DeviceConfigurationAck.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // DeviceConfigurationAck is the corresponding interface of DeviceConfigurationAck type DeviceConfigurationAck interface { @@ -47,29 +49,29 @@ type DeviceConfigurationAckExactly interface { // _DeviceConfigurationAck is the data-structure of this message type _DeviceConfigurationAck struct { *_KnxNetIpMessage - DeviceConfigurationAckDataBlock DeviceConfigurationAckDataBlock + DeviceConfigurationAckDataBlock DeviceConfigurationAckDataBlock } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_DeviceConfigurationAck) GetMsgType() uint16 { - return 0x0311 -} +func (m *_DeviceConfigurationAck) GetMsgType() uint16 { +return 0x0311} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_DeviceConfigurationAck) InitializeParent(parent KnxNetIpMessage) {} +func (m *_DeviceConfigurationAck) InitializeParent(parent KnxNetIpMessage ) {} -func (m *_DeviceConfigurationAck) GetParent() KnxNetIpMessage { +func (m *_DeviceConfigurationAck) GetParent() KnxNetIpMessage { return m._KnxNetIpMessage } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -84,11 +86,12 @@ func (m *_DeviceConfigurationAck) GetDeviceConfigurationAckDataBlock() DeviceCon /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewDeviceConfigurationAck factory function for _DeviceConfigurationAck -func NewDeviceConfigurationAck(deviceConfigurationAckDataBlock DeviceConfigurationAckDataBlock) *_DeviceConfigurationAck { +func NewDeviceConfigurationAck( deviceConfigurationAckDataBlock DeviceConfigurationAckDataBlock ) *_DeviceConfigurationAck { _result := &_DeviceConfigurationAck{ DeviceConfigurationAckDataBlock: deviceConfigurationAckDataBlock, - _KnxNetIpMessage: NewKnxNetIpMessage(), + _KnxNetIpMessage: NewKnxNetIpMessage(), } _result._KnxNetIpMessage._KnxNetIpMessageChildRequirements = _result return _result @@ -96,7 +99,7 @@ func NewDeviceConfigurationAck(deviceConfigurationAckDataBlock DeviceConfigurati // Deprecated: use the interface for direct cast func CastDeviceConfigurationAck(structType interface{}) DeviceConfigurationAck { - if casted, ok := structType.(DeviceConfigurationAck); ok { + if casted, ok := structType.(DeviceConfigurationAck); ok { return casted } if casted, ok := structType.(*DeviceConfigurationAck); ok { @@ -118,6 +121,7 @@ func (m *_DeviceConfigurationAck) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_DeviceConfigurationAck) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +143,7 @@ func DeviceConfigurationAckParseWithBuffer(ctx context.Context, readBuffer utils if pullErr := readBuffer.PullContext("deviceConfigurationAckDataBlock"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for deviceConfigurationAckDataBlock") } - _deviceConfigurationAckDataBlock, _deviceConfigurationAckDataBlockErr := DeviceConfigurationAckDataBlockParseWithBuffer(ctx, readBuffer) +_deviceConfigurationAckDataBlock, _deviceConfigurationAckDataBlockErr := DeviceConfigurationAckDataBlockParseWithBuffer(ctx, readBuffer) if _deviceConfigurationAckDataBlockErr != nil { return nil, errors.Wrap(_deviceConfigurationAckDataBlockErr, "Error parsing 'deviceConfigurationAckDataBlock' field of DeviceConfigurationAck") } @@ -154,7 +158,8 @@ func DeviceConfigurationAckParseWithBuffer(ctx context.Context, readBuffer utils // Create a partially initialized instance _child := &_DeviceConfigurationAck{ - _KnxNetIpMessage: &_KnxNetIpMessage{}, + _KnxNetIpMessage: &_KnxNetIpMessage{ + }, DeviceConfigurationAckDataBlock: deviceConfigurationAckDataBlock, } _child._KnxNetIpMessage._KnxNetIpMessageChildRequirements = _child @@ -177,17 +182,17 @@ func (m *_DeviceConfigurationAck) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for DeviceConfigurationAck") } - // Simple Field (deviceConfigurationAckDataBlock) - if pushErr := writeBuffer.PushContext("deviceConfigurationAckDataBlock"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for deviceConfigurationAckDataBlock") - } - _deviceConfigurationAckDataBlockErr := writeBuffer.WriteSerializable(ctx, m.GetDeviceConfigurationAckDataBlock()) - if popErr := writeBuffer.PopContext("deviceConfigurationAckDataBlock"); popErr != nil { - return errors.Wrap(popErr, "Error popping for deviceConfigurationAckDataBlock") - } - if _deviceConfigurationAckDataBlockErr != nil { - return errors.Wrap(_deviceConfigurationAckDataBlockErr, "Error serializing 'deviceConfigurationAckDataBlock' field") - } + // Simple Field (deviceConfigurationAckDataBlock) + if pushErr := writeBuffer.PushContext("deviceConfigurationAckDataBlock"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for deviceConfigurationAckDataBlock") + } + _deviceConfigurationAckDataBlockErr := writeBuffer.WriteSerializable(ctx, m.GetDeviceConfigurationAckDataBlock()) + if popErr := writeBuffer.PopContext("deviceConfigurationAckDataBlock"); popErr != nil { + return errors.Wrap(popErr, "Error popping for deviceConfigurationAckDataBlock") + } + if _deviceConfigurationAckDataBlockErr != nil { + return errors.Wrap(_deviceConfigurationAckDataBlockErr, "Error serializing 'deviceConfigurationAckDataBlock' field") + } if popErr := writeBuffer.PopContext("DeviceConfigurationAck"); popErr != nil { return errors.Wrap(popErr, "Error popping for DeviceConfigurationAck") @@ -197,6 +202,7 @@ func (m *_DeviceConfigurationAck) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_DeviceConfigurationAck) isDeviceConfigurationAck() bool { return true } @@ -211,3 +217,6 @@ func (m *_DeviceConfigurationAck) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/DeviceConfigurationAckDataBlock.go b/plc4go/protocols/knxnetip/readwrite/model/DeviceConfigurationAckDataBlock.go index 7a445a443eb..629874f0783 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/DeviceConfigurationAckDataBlock.go +++ b/plc4go/protocols/knxnetip/readwrite/model/DeviceConfigurationAckDataBlock.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // DeviceConfigurationAckDataBlock is the corresponding interface of DeviceConfigurationAckDataBlock type DeviceConfigurationAckDataBlock interface { @@ -48,11 +50,12 @@ type DeviceConfigurationAckDataBlockExactly interface { // _DeviceConfigurationAckDataBlock is the data-structure of this message type _DeviceConfigurationAckDataBlock struct { - CommunicationChannelId uint8 - SequenceCounter uint8 - Status Status + CommunicationChannelId uint8 + SequenceCounter uint8 + Status Status } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -75,14 +78,15 @@ func (m *_DeviceConfigurationAckDataBlock) GetStatus() Status { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewDeviceConfigurationAckDataBlock factory function for _DeviceConfigurationAckDataBlock -func NewDeviceConfigurationAckDataBlock(communicationChannelId uint8, sequenceCounter uint8, status Status) *_DeviceConfigurationAckDataBlock { - return &_DeviceConfigurationAckDataBlock{CommunicationChannelId: communicationChannelId, SequenceCounter: sequenceCounter, Status: status} +func NewDeviceConfigurationAckDataBlock( communicationChannelId uint8 , sequenceCounter uint8 , status Status ) *_DeviceConfigurationAckDataBlock { +return &_DeviceConfigurationAckDataBlock{ CommunicationChannelId: communicationChannelId , SequenceCounter: sequenceCounter , Status: status } } // Deprecated: use the interface for direct cast func CastDeviceConfigurationAckDataBlock(structType interface{}) DeviceConfigurationAckDataBlock { - if casted, ok := structType.(DeviceConfigurationAckDataBlock); ok { + if casted, ok := structType.(DeviceConfigurationAckDataBlock); ok { return casted } if casted, ok := structType.(*DeviceConfigurationAckDataBlock); ok { @@ -102,10 +106,10 @@ func (m *_DeviceConfigurationAckDataBlock) GetLengthInBits(ctx context.Context) lengthInBits += 8 // Simple field (communicationChannelId) - lengthInBits += 8 + lengthInBits += 8; // Simple field (sequenceCounter) - lengthInBits += 8 + lengthInBits += 8; // Simple field (status) lengthInBits += 8 @@ -113,6 +117,7 @@ func (m *_DeviceConfigurationAckDataBlock) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_DeviceConfigurationAckDataBlock) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,14 +143,14 @@ func DeviceConfigurationAckDataBlockParseWithBuffer(ctx context.Context, readBuf } // Simple Field (communicationChannelId) - _communicationChannelId, _communicationChannelIdErr := readBuffer.ReadUint8("communicationChannelId", 8) +_communicationChannelId, _communicationChannelIdErr := readBuffer.ReadUint8("communicationChannelId", 8) if _communicationChannelIdErr != nil { return nil, errors.Wrap(_communicationChannelIdErr, "Error parsing 'communicationChannelId' field of DeviceConfigurationAckDataBlock") } communicationChannelId := _communicationChannelId // Simple Field (sequenceCounter) - _sequenceCounter, _sequenceCounterErr := readBuffer.ReadUint8("sequenceCounter", 8) +_sequenceCounter, _sequenceCounterErr := readBuffer.ReadUint8("sequenceCounter", 8) if _sequenceCounterErr != nil { return nil, errors.Wrap(_sequenceCounterErr, "Error parsing 'sequenceCounter' field of DeviceConfigurationAckDataBlock") } @@ -155,7 +160,7 @@ func DeviceConfigurationAckDataBlockParseWithBuffer(ctx context.Context, readBuf if pullErr := readBuffer.PullContext("status"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for status") } - _status, _statusErr := StatusParseWithBuffer(ctx, readBuffer) +_status, _statusErr := StatusParseWithBuffer(ctx, readBuffer) if _statusErr != nil { return nil, errors.Wrap(_statusErr, "Error parsing 'status' field of DeviceConfigurationAckDataBlock") } @@ -170,10 +175,10 @@ func DeviceConfigurationAckDataBlockParseWithBuffer(ctx context.Context, readBuf // Create the instance return &_DeviceConfigurationAckDataBlock{ - CommunicationChannelId: communicationChannelId, - SequenceCounter: sequenceCounter, - Status: status, - }, nil + CommunicationChannelId: communicationChannelId, + SequenceCounter: sequenceCounter, + Status: status, + }, nil } func (m *_DeviceConfigurationAckDataBlock) Serialize() ([]byte, error) { @@ -187,7 +192,7 @@ func (m *_DeviceConfigurationAckDataBlock) Serialize() ([]byte, error) { func (m *_DeviceConfigurationAckDataBlock) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("DeviceConfigurationAckDataBlock"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("DeviceConfigurationAckDataBlock"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for DeviceConfigurationAckDataBlock") } @@ -230,6 +235,7 @@ func (m *_DeviceConfigurationAckDataBlock) SerializeWithWriteBuffer(ctx context. return nil } + func (m *_DeviceConfigurationAckDataBlock) isDeviceConfigurationAckDataBlock() bool { return true } @@ -244,3 +250,6 @@ func (m *_DeviceConfigurationAckDataBlock) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/DeviceConfigurationRequest.go b/plc4go/protocols/knxnetip/readwrite/model/DeviceConfigurationRequest.go index d5077d9c89a..6217e9435ff 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/DeviceConfigurationRequest.go +++ b/plc4go/protocols/knxnetip/readwrite/model/DeviceConfigurationRequest.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // DeviceConfigurationRequest is the corresponding interface of DeviceConfigurationRequest type DeviceConfigurationRequest interface { @@ -49,33 +51,33 @@ type DeviceConfigurationRequestExactly interface { // _DeviceConfigurationRequest is the data-structure of this message type _DeviceConfigurationRequest struct { *_KnxNetIpMessage - DeviceConfigurationRequestDataBlock DeviceConfigurationRequestDataBlock - Cemi CEMI + DeviceConfigurationRequestDataBlock DeviceConfigurationRequestDataBlock + Cemi CEMI // Arguments. TotalLength uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_DeviceConfigurationRequest) GetMsgType() uint16 { - return 0x0310 -} +func (m *_DeviceConfigurationRequest) GetMsgType() uint16 { +return 0x0310} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_DeviceConfigurationRequest) InitializeParent(parent KnxNetIpMessage) {} +func (m *_DeviceConfigurationRequest) InitializeParent(parent KnxNetIpMessage ) {} -func (m *_DeviceConfigurationRequest) GetParent() KnxNetIpMessage { +func (m *_DeviceConfigurationRequest) GetParent() KnxNetIpMessage { return m._KnxNetIpMessage } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -94,12 +96,13 @@ func (m *_DeviceConfigurationRequest) GetCemi() CEMI { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewDeviceConfigurationRequest factory function for _DeviceConfigurationRequest -func NewDeviceConfigurationRequest(deviceConfigurationRequestDataBlock DeviceConfigurationRequestDataBlock, cemi CEMI, totalLength uint16) *_DeviceConfigurationRequest { +func NewDeviceConfigurationRequest( deviceConfigurationRequestDataBlock DeviceConfigurationRequestDataBlock , cemi CEMI , totalLength uint16 ) *_DeviceConfigurationRequest { _result := &_DeviceConfigurationRequest{ DeviceConfigurationRequestDataBlock: deviceConfigurationRequestDataBlock, - Cemi: cemi, - _KnxNetIpMessage: NewKnxNetIpMessage(), + Cemi: cemi, + _KnxNetIpMessage: NewKnxNetIpMessage(), } _result._KnxNetIpMessage._KnxNetIpMessageChildRequirements = _result return _result @@ -107,7 +110,7 @@ func NewDeviceConfigurationRequest(deviceConfigurationRequestDataBlock DeviceCon // Deprecated: use the interface for direct cast func CastDeviceConfigurationRequest(structType interface{}) DeviceConfigurationRequest { - if casted, ok := structType.(DeviceConfigurationRequest); ok { + if casted, ok := structType.(DeviceConfigurationRequest); ok { return casted } if casted, ok := structType.(*DeviceConfigurationRequest); ok { @@ -132,6 +135,7 @@ func (m *_DeviceConfigurationRequest) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_DeviceConfigurationRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -153,7 +157,7 @@ func DeviceConfigurationRequestParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("deviceConfigurationRequestDataBlock"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for deviceConfigurationRequestDataBlock") } - _deviceConfigurationRequestDataBlock, _deviceConfigurationRequestDataBlockErr := DeviceConfigurationRequestDataBlockParseWithBuffer(ctx, readBuffer) +_deviceConfigurationRequestDataBlock, _deviceConfigurationRequestDataBlockErr := DeviceConfigurationRequestDataBlockParseWithBuffer(ctx, readBuffer) if _deviceConfigurationRequestDataBlockErr != nil { return nil, errors.Wrap(_deviceConfigurationRequestDataBlockErr, "Error parsing 'deviceConfigurationRequestDataBlock' field of DeviceConfigurationRequest") } @@ -166,7 +170,7 @@ func DeviceConfigurationRequestParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("cemi"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for cemi") } - _cemi, _cemiErr := CEMIParseWithBuffer(ctx, readBuffer, uint16(uint16(totalLength)-uint16((uint16(uint16(6))+uint16(deviceConfigurationRequestDataBlock.GetLengthInBytes(ctx)))))) +_cemi, _cemiErr := CEMIParseWithBuffer(ctx, readBuffer , uint16( uint16(totalLength) - uint16((uint16(uint16(6)) + uint16(deviceConfigurationRequestDataBlock.GetLengthInBytes(ctx)))) ) ) if _cemiErr != nil { return nil, errors.Wrap(_cemiErr, "Error parsing 'cemi' field of DeviceConfigurationRequest") } @@ -181,9 +185,10 @@ func DeviceConfigurationRequestParseWithBuffer(ctx context.Context, readBuffer u // Create a partially initialized instance _child := &_DeviceConfigurationRequest{ - _KnxNetIpMessage: &_KnxNetIpMessage{}, + _KnxNetIpMessage: &_KnxNetIpMessage{ + }, DeviceConfigurationRequestDataBlock: deviceConfigurationRequestDataBlock, - Cemi: cemi, + Cemi: cemi, } _child._KnxNetIpMessage._KnxNetIpMessageChildRequirements = _child return _child, nil @@ -205,29 +210,29 @@ func (m *_DeviceConfigurationRequest) SerializeWithWriteBuffer(ctx context.Conte return errors.Wrap(pushErr, "Error pushing for DeviceConfigurationRequest") } - // Simple Field (deviceConfigurationRequestDataBlock) - if pushErr := writeBuffer.PushContext("deviceConfigurationRequestDataBlock"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for deviceConfigurationRequestDataBlock") - } - _deviceConfigurationRequestDataBlockErr := writeBuffer.WriteSerializable(ctx, m.GetDeviceConfigurationRequestDataBlock()) - if popErr := writeBuffer.PopContext("deviceConfigurationRequestDataBlock"); popErr != nil { - return errors.Wrap(popErr, "Error popping for deviceConfigurationRequestDataBlock") - } - if _deviceConfigurationRequestDataBlockErr != nil { - return errors.Wrap(_deviceConfigurationRequestDataBlockErr, "Error serializing 'deviceConfigurationRequestDataBlock' field") - } + // Simple Field (deviceConfigurationRequestDataBlock) + if pushErr := writeBuffer.PushContext("deviceConfigurationRequestDataBlock"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for deviceConfigurationRequestDataBlock") + } + _deviceConfigurationRequestDataBlockErr := writeBuffer.WriteSerializable(ctx, m.GetDeviceConfigurationRequestDataBlock()) + if popErr := writeBuffer.PopContext("deviceConfigurationRequestDataBlock"); popErr != nil { + return errors.Wrap(popErr, "Error popping for deviceConfigurationRequestDataBlock") + } + if _deviceConfigurationRequestDataBlockErr != nil { + return errors.Wrap(_deviceConfigurationRequestDataBlockErr, "Error serializing 'deviceConfigurationRequestDataBlock' field") + } - // Simple Field (cemi) - if pushErr := writeBuffer.PushContext("cemi"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for cemi") - } - _cemiErr := writeBuffer.WriteSerializable(ctx, m.GetCemi()) - if popErr := writeBuffer.PopContext("cemi"); popErr != nil { - return errors.Wrap(popErr, "Error popping for cemi") - } - if _cemiErr != nil { - return errors.Wrap(_cemiErr, "Error serializing 'cemi' field") - } + // Simple Field (cemi) + if pushErr := writeBuffer.PushContext("cemi"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for cemi") + } + _cemiErr := writeBuffer.WriteSerializable(ctx, m.GetCemi()) + if popErr := writeBuffer.PopContext("cemi"); popErr != nil { + return errors.Wrap(popErr, "Error popping for cemi") + } + if _cemiErr != nil { + return errors.Wrap(_cemiErr, "Error serializing 'cemi' field") + } if popErr := writeBuffer.PopContext("DeviceConfigurationRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for DeviceConfigurationRequest") @@ -237,13 +242,13 @@ func (m *_DeviceConfigurationRequest) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + //// // Arguments Getter func (m *_DeviceConfigurationRequest) GetTotalLength() uint16 { return m.TotalLength } - // //// @@ -261,3 +266,6 @@ func (m *_DeviceConfigurationRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/DeviceConfigurationRequestDataBlock.go b/plc4go/protocols/knxnetip/readwrite/model/DeviceConfigurationRequestDataBlock.go index 4e6fa6f0983..cfffa2dc9fb 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/DeviceConfigurationRequestDataBlock.go +++ b/plc4go/protocols/knxnetip/readwrite/model/DeviceConfigurationRequestDataBlock.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // DeviceConfigurationRequestDataBlock is the corresponding interface of DeviceConfigurationRequestDataBlock type DeviceConfigurationRequestDataBlock interface { @@ -46,12 +48,13 @@ type DeviceConfigurationRequestDataBlockExactly interface { // _DeviceConfigurationRequestDataBlock is the data-structure of this message type _DeviceConfigurationRequestDataBlock struct { - CommunicationChannelId uint8 - SequenceCounter uint8 + CommunicationChannelId uint8 + SequenceCounter uint8 // Reserved Fields reservedField0 *uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -70,14 +73,15 @@ func (m *_DeviceConfigurationRequestDataBlock) GetSequenceCounter() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewDeviceConfigurationRequestDataBlock factory function for _DeviceConfigurationRequestDataBlock -func NewDeviceConfigurationRequestDataBlock(communicationChannelId uint8, sequenceCounter uint8) *_DeviceConfigurationRequestDataBlock { - return &_DeviceConfigurationRequestDataBlock{CommunicationChannelId: communicationChannelId, SequenceCounter: sequenceCounter} +func NewDeviceConfigurationRequestDataBlock( communicationChannelId uint8 , sequenceCounter uint8 ) *_DeviceConfigurationRequestDataBlock { +return &_DeviceConfigurationRequestDataBlock{ CommunicationChannelId: communicationChannelId , SequenceCounter: sequenceCounter } } // Deprecated: use the interface for direct cast func CastDeviceConfigurationRequestDataBlock(structType interface{}) DeviceConfigurationRequestDataBlock { - if casted, ok := structType.(DeviceConfigurationRequestDataBlock); ok { + if casted, ok := structType.(DeviceConfigurationRequestDataBlock); ok { return casted } if casted, ok := structType.(*DeviceConfigurationRequestDataBlock); ok { @@ -97,10 +101,10 @@ func (m *_DeviceConfigurationRequestDataBlock) GetLengthInBits(ctx context.Conte lengthInBits += 8 // Simple field (communicationChannelId) - lengthInBits += 8 + lengthInBits += 8; // Simple field (sequenceCounter) - lengthInBits += 8 + lengthInBits += 8; // Reserved Field (reserved) lengthInBits += 8 @@ -108,6 +112,7 @@ func (m *_DeviceConfigurationRequestDataBlock) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_DeviceConfigurationRequestDataBlock) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -133,14 +138,14 @@ func DeviceConfigurationRequestDataBlockParseWithBuffer(ctx context.Context, rea } // Simple Field (communicationChannelId) - _communicationChannelId, _communicationChannelIdErr := readBuffer.ReadUint8("communicationChannelId", 8) +_communicationChannelId, _communicationChannelIdErr := readBuffer.ReadUint8("communicationChannelId", 8) if _communicationChannelIdErr != nil { return nil, errors.Wrap(_communicationChannelIdErr, "Error parsing 'communicationChannelId' field of DeviceConfigurationRequestDataBlock") } communicationChannelId := _communicationChannelId // Simple Field (sequenceCounter) - _sequenceCounter, _sequenceCounterErr := readBuffer.ReadUint8("sequenceCounter", 8) +_sequenceCounter, _sequenceCounterErr := readBuffer.ReadUint8("sequenceCounter", 8) if _sequenceCounterErr != nil { return nil, errors.Wrap(_sequenceCounterErr, "Error parsing 'sequenceCounter' field of DeviceConfigurationRequestDataBlock") } @@ -156,7 +161,7 @@ func DeviceConfigurationRequestDataBlockParseWithBuffer(ctx context.Context, rea if reserved != uint8(0x00) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -169,10 +174,10 @@ func DeviceConfigurationRequestDataBlockParseWithBuffer(ctx context.Context, rea // Create the instance return &_DeviceConfigurationRequestDataBlock{ - CommunicationChannelId: communicationChannelId, - SequenceCounter: sequenceCounter, - reservedField0: reservedField0, - }, nil + CommunicationChannelId: communicationChannelId, + SequenceCounter: sequenceCounter, + reservedField0: reservedField0, + }, nil } func (m *_DeviceConfigurationRequestDataBlock) Serialize() ([]byte, error) { @@ -186,7 +191,7 @@ func (m *_DeviceConfigurationRequestDataBlock) Serialize() ([]byte, error) { func (m *_DeviceConfigurationRequestDataBlock) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("DeviceConfigurationRequestDataBlock"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("DeviceConfigurationRequestDataBlock"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for DeviceConfigurationRequestDataBlock") } @@ -217,7 +222,7 @@ func (m *_DeviceConfigurationRequestDataBlock) SerializeWithWriteBuffer(ctx cont if m.reservedField0 != nil { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Overriding reserved field with unexpected value.") reserved = *m.reservedField0 } @@ -233,6 +238,7 @@ func (m *_DeviceConfigurationRequestDataBlock) SerializeWithWriteBuffer(ctx cont return nil } + func (m *_DeviceConfigurationRequestDataBlock) isDeviceConfigurationRequestDataBlock() bool { return true } @@ -247,3 +253,6 @@ func (m *_DeviceConfigurationRequestDataBlock) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/DeviceDescriptor.go b/plc4go/protocols/knxnetip/readwrite/model/DeviceDescriptor.go index b52e182259e..93b3ddd1df7 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/DeviceDescriptor.go +++ b/plc4go/protocols/knxnetip/readwrite/model/DeviceDescriptor.go @@ -36,43 +36,43 @@ type IDeviceDescriptor interface { MediumType() DeviceDescriptorMediumType } -const ( - DeviceDescriptor_TP1_BCU_1_SYSTEM_1_0 DeviceDescriptor = 0x0010 - DeviceDescriptor_TP1_BCU_1_SYSTEM_1_1 DeviceDescriptor = 0x0011 - DeviceDescriptor_TP1_BCU_1_SYSTEM_1_2 DeviceDescriptor = 0x0012 - DeviceDescriptor_TP1_BCU_1_SYSTEM_1_3 DeviceDescriptor = 0x0013 - DeviceDescriptor_TP1_BCU_2_SYSTEM_2_0 DeviceDescriptor = 0x0020 - DeviceDescriptor_TP1_BCU_2_SYSTEM_2_1 DeviceDescriptor = 0x0021 - DeviceDescriptor_TP1_BCU_2_SYSTEM_2_5 DeviceDescriptor = 0x0025 - DeviceDescriptor_TP1_SYSTEM_300 DeviceDescriptor = 0x0300 - DeviceDescriptor_TP1_BIM_M112_0 DeviceDescriptor = 0x0700 - DeviceDescriptor_TP1_BIM_M112_1 DeviceDescriptor = 0x0701 - DeviceDescriptor_TP1_BIM_M112_5 DeviceDescriptor = 0x0705 - DeviceDescriptor_TP1_SYSTEM_B DeviceDescriptor = 0x07B0 - DeviceDescriptor_TP1_IR_DECODER_0 DeviceDescriptor = 0x0810 - DeviceDescriptor_TP1_IR_DECODER_1 DeviceDescriptor = 0x0811 - DeviceDescriptor_TP1_COUPLER_0 DeviceDescriptor = 0x0910 - DeviceDescriptor_TP1_COUPLER_1 DeviceDescriptor = 0x0911 - DeviceDescriptor_TP1_COUPLER_2 DeviceDescriptor = 0x0912 - DeviceDescriptor_TP1_KNXNETIP_ROUTER DeviceDescriptor = 0x091A - DeviceDescriptor_TP1_NONE_D DeviceDescriptor = 0x0AFD - DeviceDescriptor_TP1_NONE_E DeviceDescriptor = 0x0AFE - DeviceDescriptor_PL110_BCU_1_2 DeviceDescriptor = 0x1012 - DeviceDescriptor_PL110_BCU_1_3 DeviceDescriptor = 0x1013 - DeviceDescriptor_PL110_SYSTEM_B DeviceDescriptor = 0x17B0 - DeviceDescriptor_PL110_MEDIA_COUPLER_PL_TP DeviceDescriptor = 0x1900 - DeviceDescriptor_RF_BI_DIRECTIONAL_DEVICES DeviceDescriptor = 0x2010 +const( + DeviceDescriptor_TP1_BCU_1_SYSTEM_1_0 DeviceDescriptor = 0x0010 + DeviceDescriptor_TP1_BCU_1_SYSTEM_1_1 DeviceDescriptor = 0x0011 + DeviceDescriptor_TP1_BCU_1_SYSTEM_1_2 DeviceDescriptor = 0x0012 + DeviceDescriptor_TP1_BCU_1_SYSTEM_1_3 DeviceDescriptor = 0x0013 + DeviceDescriptor_TP1_BCU_2_SYSTEM_2_0 DeviceDescriptor = 0x0020 + DeviceDescriptor_TP1_BCU_2_SYSTEM_2_1 DeviceDescriptor = 0x0021 + DeviceDescriptor_TP1_BCU_2_SYSTEM_2_5 DeviceDescriptor = 0x0025 + DeviceDescriptor_TP1_SYSTEM_300 DeviceDescriptor = 0x0300 + DeviceDescriptor_TP1_BIM_M112_0 DeviceDescriptor = 0x0700 + DeviceDescriptor_TP1_BIM_M112_1 DeviceDescriptor = 0x0701 + DeviceDescriptor_TP1_BIM_M112_5 DeviceDescriptor = 0x0705 + DeviceDescriptor_TP1_SYSTEM_B DeviceDescriptor = 0x07B0 + DeviceDescriptor_TP1_IR_DECODER_0 DeviceDescriptor = 0x0810 + DeviceDescriptor_TP1_IR_DECODER_1 DeviceDescriptor = 0x0811 + DeviceDescriptor_TP1_COUPLER_0 DeviceDescriptor = 0x0910 + DeviceDescriptor_TP1_COUPLER_1 DeviceDescriptor = 0x0911 + DeviceDescriptor_TP1_COUPLER_2 DeviceDescriptor = 0x0912 + DeviceDescriptor_TP1_KNXNETIP_ROUTER DeviceDescriptor = 0x091A + DeviceDescriptor_TP1_NONE_D DeviceDescriptor = 0x0AFD + DeviceDescriptor_TP1_NONE_E DeviceDescriptor = 0x0AFE + DeviceDescriptor_PL110_BCU_1_2 DeviceDescriptor = 0x1012 + DeviceDescriptor_PL110_BCU_1_3 DeviceDescriptor = 0x1013 + DeviceDescriptor_PL110_SYSTEM_B DeviceDescriptor = 0x17B0 + DeviceDescriptor_PL110_MEDIA_COUPLER_PL_TP DeviceDescriptor = 0x1900 + DeviceDescriptor_RF_BI_DIRECTIONAL_DEVICES DeviceDescriptor = 0x2010 DeviceDescriptor_RF_UNI_DIRECTIONAL_DEVICES DeviceDescriptor = 0x2110 - DeviceDescriptor_TP0_BCU_1 DeviceDescriptor = 0x3012 - DeviceDescriptor_PL132_BCU_1 DeviceDescriptor = 0x4012 - DeviceDescriptor_KNX_IP_SYSTEM7 DeviceDescriptor = 0x5705 + DeviceDescriptor_TP0_BCU_1 DeviceDescriptor = 0x3012 + DeviceDescriptor_PL132_BCU_1 DeviceDescriptor = 0x4012 + DeviceDescriptor_KNX_IP_SYSTEM7 DeviceDescriptor = 0x5705 ) var DeviceDescriptorValues []DeviceDescriptor func init() { _ = errors.New - DeviceDescriptorValues = []DeviceDescriptor{ + DeviceDescriptorValues = []DeviceDescriptor { DeviceDescriptor_TP1_BCU_1_SYSTEM_1_0, DeviceDescriptor_TP1_BCU_1_SYSTEM_1_1, DeviceDescriptor_TP1_BCU_1_SYSTEM_1_2, @@ -105,126 +105,97 @@ func init() { } } + func (e DeviceDescriptor) FirmwareType() FirmwareType { - switch e { - case 0x0010: - { /* '0x0010' */ + switch e { + case 0x0010: { /* '0x0010' */ return FirmwareType_SYSTEM_1 } - case 0x0011: - { /* '0x0011' */ + case 0x0011: { /* '0x0011' */ return FirmwareType_SYSTEM_1 } - case 0x0012: - { /* '0x0012' */ + case 0x0012: { /* '0x0012' */ return FirmwareType_SYSTEM_1 } - case 0x0013: - { /* '0x0013' */ + case 0x0013: { /* '0x0013' */ return FirmwareType_SYSTEM_1 } - case 0x0020: - { /* '0x0020' */ + case 0x0020: { /* '0x0020' */ return FirmwareType_SYSTEM_2 } - case 0x0021: - { /* '0x0021' */ + case 0x0021: { /* '0x0021' */ return FirmwareType_SYSTEM_2 } - case 0x0025: - { /* '0x0025' */ + case 0x0025: { /* '0x0025' */ return FirmwareType_SYSTEM_2 } - case 0x0300: - { /* '0x0300' */ + case 0x0300: { /* '0x0300' */ return FirmwareType_SYSTEM_300 } - case 0x0700: - { /* '0x0700' */ + case 0x0700: { /* '0x0700' */ return FirmwareType_SYSTEM_7 } - case 0x0701: - { /* '0x0701' */ + case 0x0701: { /* '0x0701' */ return FirmwareType_SYSTEM_7 } - case 0x0705: - { /* '0x0705' */ + case 0x0705: { /* '0x0705' */ return FirmwareType_SYSTEM_7 } - case 0x07B0: - { /* '0x07B0' */ + case 0x07B0: { /* '0x07B0' */ return FirmwareType_SYSTEM_B } - case 0x0810: - { /* '0x0810' */ + case 0x0810: { /* '0x0810' */ return FirmwareType_IR_DECODER } - case 0x0811: - { /* '0x0811' */ + case 0x0811: { /* '0x0811' */ return FirmwareType_IR_DECODER } - case 0x0910: - { /* '0x0910' */ + case 0x0910: { /* '0x0910' */ return FirmwareType_COUPLER } - case 0x0911: - { /* '0x0911' */ + case 0x0911: { /* '0x0911' */ return FirmwareType_COUPLER } - case 0x0912: - { /* '0x0912' */ + case 0x0912: { /* '0x0912' */ return FirmwareType_COUPLER } - case 0x091A: - { /* '0x091A' */ + case 0x091A: { /* '0x091A' */ return FirmwareType_COUPLER } - case 0x0AFD: - { /* '0x0AFD' */ + case 0x0AFD: { /* '0x0AFD' */ return FirmwareType_NONE } - case 0x0AFE: - { /* '0x0AFE' */ + case 0x0AFE: { /* '0x0AFE' */ return FirmwareType_NONE } - case 0x1012: - { /* '0x1012' */ + case 0x1012: { /* '0x1012' */ return FirmwareType_SYSTEM_1 } - case 0x1013: - { /* '0x1013' */ + case 0x1013: { /* '0x1013' */ return FirmwareType_SYSTEM_1 } - case 0x17B0: - { /* '0x17B0' */ + case 0x17B0: { /* '0x17B0' */ return FirmwareType_SYSTEM_B } - case 0x1900: - { /* '0x1900' */ + case 0x1900: { /* '0x1900' */ return FirmwareType_MEDIA_COUPLER_PL_TP } - case 0x2010: - { /* '0x2010' */ + case 0x2010: { /* '0x2010' */ return FirmwareType_RF_BI_DIRECTIONAL_DEVICES } - case 0x2110: - { /* '0x2110' */ + case 0x2110: { /* '0x2110' */ return FirmwareType_RF_UNI_DIRECTIONAL_DEVICES } - case 0x3012: - { /* '0x3012' */ + case 0x3012: { /* '0x3012' */ return FirmwareType_SYSTEM_1 } - case 0x4012: - { /* '0x4012' */ + case 0x4012: { /* '0x4012' */ return FirmwareType_SYSTEM_1 } - case 0x5705: - { /* '0x5705' */ + case 0x5705: { /* '0x5705' */ return FirmwareType_SYSTEM_7 } - default: - { + default: { return 0 } } @@ -240,125 +211,95 @@ func DeviceDescriptorFirstEnumForFieldFirmwareType(value FirmwareType) (DeviceDe } func (e DeviceDescriptor) MediumType() DeviceDescriptorMediumType { - switch e { - case 0x0010: - { /* '0x0010' */ + switch e { + case 0x0010: { /* '0x0010' */ return DeviceDescriptorMediumType_TP1 } - case 0x0011: - { /* '0x0011' */ + case 0x0011: { /* '0x0011' */ return DeviceDescriptorMediumType_TP1 } - case 0x0012: - { /* '0x0012' */ + case 0x0012: { /* '0x0012' */ return DeviceDescriptorMediumType_TP1 } - case 0x0013: - { /* '0x0013' */ + case 0x0013: { /* '0x0013' */ return DeviceDescriptorMediumType_TP1 } - case 0x0020: - { /* '0x0020' */ + case 0x0020: { /* '0x0020' */ return DeviceDescriptorMediumType_TP1 } - case 0x0021: - { /* '0x0021' */ + case 0x0021: { /* '0x0021' */ return DeviceDescriptorMediumType_TP1 } - case 0x0025: - { /* '0x0025' */ + case 0x0025: { /* '0x0025' */ return DeviceDescriptorMediumType_TP1 } - case 0x0300: - { /* '0x0300' */ + case 0x0300: { /* '0x0300' */ return DeviceDescriptorMediumType_TP1 } - case 0x0700: - { /* '0x0700' */ + case 0x0700: { /* '0x0700' */ return DeviceDescriptorMediumType_TP1 } - case 0x0701: - { /* '0x0701' */ + case 0x0701: { /* '0x0701' */ return DeviceDescriptorMediumType_TP1 } - case 0x0705: - { /* '0x0705' */ + case 0x0705: { /* '0x0705' */ return DeviceDescriptorMediumType_TP1 } - case 0x07B0: - { /* '0x07B0' */ + case 0x07B0: { /* '0x07B0' */ return DeviceDescriptorMediumType_TP1 } - case 0x0810: - { /* '0x0810' */ + case 0x0810: { /* '0x0810' */ return DeviceDescriptorMediumType_TP1 } - case 0x0811: - { /* '0x0811' */ + case 0x0811: { /* '0x0811' */ return DeviceDescriptorMediumType_TP1 } - case 0x0910: - { /* '0x0910' */ + case 0x0910: { /* '0x0910' */ return DeviceDescriptorMediumType_TP1 } - case 0x0911: - { /* '0x0911' */ + case 0x0911: { /* '0x0911' */ return DeviceDescriptorMediumType_TP1 } - case 0x0912: - { /* '0x0912' */ + case 0x0912: { /* '0x0912' */ return DeviceDescriptorMediumType_TP1 } - case 0x091A: - { /* '0x091A' */ + case 0x091A: { /* '0x091A' */ return DeviceDescriptorMediumType_TP1 } - case 0x0AFD: - { /* '0x0AFD' */ + case 0x0AFD: { /* '0x0AFD' */ return DeviceDescriptorMediumType_TP1 } - case 0x0AFE: - { /* '0x0AFE' */ + case 0x0AFE: { /* '0x0AFE' */ return DeviceDescriptorMediumType_TP1 } - case 0x1012: - { /* '0x1012' */ + case 0x1012: { /* '0x1012' */ return DeviceDescriptorMediumType_PL110 } - case 0x1013: - { /* '0x1013' */ + case 0x1013: { /* '0x1013' */ return DeviceDescriptorMediumType_PL110 } - case 0x17B0: - { /* '0x17B0' */ + case 0x17B0: { /* '0x17B0' */ return DeviceDescriptorMediumType_PL110 } - case 0x1900: - { /* '0x1900' */ + case 0x1900: { /* '0x1900' */ return DeviceDescriptorMediumType_PL110 } - case 0x2010: - { /* '0x2010' */ + case 0x2010: { /* '0x2010' */ return DeviceDescriptorMediumType_RF } - case 0x2110: - { /* '0x2110' */ + case 0x2110: { /* '0x2110' */ return DeviceDescriptorMediumType_RF } - case 0x3012: - { /* '0x3012' */ + case 0x3012: { /* '0x3012' */ return DeviceDescriptorMediumType_TP0 } - case 0x4012: - { /* '0x4012' */ + case 0x4012: { /* '0x4012' */ return DeviceDescriptorMediumType_PL132 } - case 0x5705: - { /* '0x5705' */ + case 0x5705: { /* '0x5705' */ return DeviceDescriptorMediumType_KNX_IP } - default: - { + default: { return 0 } } @@ -374,64 +315,64 @@ func DeviceDescriptorFirstEnumForFieldMediumType(value DeviceDescriptorMediumTyp } func DeviceDescriptorByValue(value uint16) (enum DeviceDescriptor, ok bool) { switch value { - case 0x0010: - return DeviceDescriptor_TP1_BCU_1_SYSTEM_1_0, true - case 0x0011: - return DeviceDescriptor_TP1_BCU_1_SYSTEM_1_1, true - case 0x0012: - return DeviceDescriptor_TP1_BCU_1_SYSTEM_1_2, true - case 0x0013: - return DeviceDescriptor_TP1_BCU_1_SYSTEM_1_3, true - case 0x0020: - return DeviceDescriptor_TP1_BCU_2_SYSTEM_2_0, true - case 0x0021: - return DeviceDescriptor_TP1_BCU_2_SYSTEM_2_1, true - case 0x0025: - return DeviceDescriptor_TP1_BCU_2_SYSTEM_2_5, true - case 0x0300: - return DeviceDescriptor_TP1_SYSTEM_300, true - case 0x0700: - return DeviceDescriptor_TP1_BIM_M112_0, true - case 0x0701: - return DeviceDescriptor_TP1_BIM_M112_1, true - case 0x0705: - return DeviceDescriptor_TP1_BIM_M112_5, true - case 0x07B0: - return DeviceDescriptor_TP1_SYSTEM_B, true - case 0x0810: - return DeviceDescriptor_TP1_IR_DECODER_0, true - case 0x0811: - return DeviceDescriptor_TP1_IR_DECODER_1, true - case 0x0910: - return DeviceDescriptor_TP1_COUPLER_0, true - case 0x0911: - return DeviceDescriptor_TP1_COUPLER_1, true - case 0x0912: - return DeviceDescriptor_TP1_COUPLER_2, true - case 0x091A: - return DeviceDescriptor_TP1_KNXNETIP_ROUTER, true - case 0x0AFD: - return DeviceDescriptor_TP1_NONE_D, true - case 0x0AFE: - return DeviceDescriptor_TP1_NONE_E, true - case 0x1012: - return DeviceDescriptor_PL110_BCU_1_2, true - case 0x1013: - return DeviceDescriptor_PL110_BCU_1_3, true - case 0x17B0: - return DeviceDescriptor_PL110_SYSTEM_B, true - case 0x1900: - return DeviceDescriptor_PL110_MEDIA_COUPLER_PL_TP, true - case 0x2010: - return DeviceDescriptor_RF_BI_DIRECTIONAL_DEVICES, true - case 0x2110: - return DeviceDescriptor_RF_UNI_DIRECTIONAL_DEVICES, true - case 0x3012: - return DeviceDescriptor_TP0_BCU_1, true - case 0x4012: - return DeviceDescriptor_PL132_BCU_1, true - case 0x5705: - return DeviceDescriptor_KNX_IP_SYSTEM7, true + case 0x0010: + return DeviceDescriptor_TP1_BCU_1_SYSTEM_1_0, true + case 0x0011: + return DeviceDescriptor_TP1_BCU_1_SYSTEM_1_1, true + case 0x0012: + return DeviceDescriptor_TP1_BCU_1_SYSTEM_1_2, true + case 0x0013: + return DeviceDescriptor_TP1_BCU_1_SYSTEM_1_3, true + case 0x0020: + return DeviceDescriptor_TP1_BCU_2_SYSTEM_2_0, true + case 0x0021: + return DeviceDescriptor_TP1_BCU_2_SYSTEM_2_1, true + case 0x0025: + return DeviceDescriptor_TP1_BCU_2_SYSTEM_2_5, true + case 0x0300: + return DeviceDescriptor_TP1_SYSTEM_300, true + case 0x0700: + return DeviceDescriptor_TP1_BIM_M112_0, true + case 0x0701: + return DeviceDescriptor_TP1_BIM_M112_1, true + case 0x0705: + return DeviceDescriptor_TP1_BIM_M112_5, true + case 0x07B0: + return DeviceDescriptor_TP1_SYSTEM_B, true + case 0x0810: + return DeviceDescriptor_TP1_IR_DECODER_0, true + case 0x0811: + return DeviceDescriptor_TP1_IR_DECODER_1, true + case 0x0910: + return DeviceDescriptor_TP1_COUPLER_0, true + case 0x0911: + return DeviceDescriptor_TP1_COUPLER_1, true + case 0x0912: + return DeviceDescriptor_TP1_COUPLER_2, true + case 0x091A: + return DeviceDescriptor_TP1_KNXNETIP_ROUTER, true + case 0x0AFD: + return DeviceDescriptor_TP1_NONE_D, true + case 0x0AFE: + return DeviceDescriptor_TP1_NONE_E, true + case 0x1012: + return DeviceDescriptor_PL110_BCU_1_2, true + case 0x1013: + return DeviceDescriptor_PL110_BCU_1_3, true + case 0x17B0: + return DeviceDescriptor_PL110_SYSTEM_B, true + case 0x1900: + return DeviceDescriptor_PL110_MEDIA_COUPLER_PL_TP, true + case 0x2010: + return DeviceDescriptor_RF_BI_DIRECTIONAL_DEVICES, true + case 0x2110: + return DeviceDescriptor_RF_UNI_DIRECTIONAL_DEVICES, true + case 0x3012: + return DeviceDescriptor_TP0_BCU_1, true + case 0x4012: + return DeviceDescriptor_PL132_BCU_1, true + case 0x5705: + return DeviceDescriptor_KNX_IP_SYSTEM7, true } return 0, false } @@ -500,13 +441,13 @@ func DeviceDescriptorByName(value string) (enum DeviceDescriptor, ok bool) { return 0, false } -func DeviceDescriptorKnows(value uint16) bool { +func DeviceDescriptorKnows(value uint16) bool { for _, typeValue := range DeviceDescriptorValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastDeviceDescriptor(structType interface{}) DeviceDescriptor { @@ -624,3 +565,4 @@ func (e DeviceDescriptor) PLC4XEnumName() string { func (e DeviceDescriptor) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/knxnetip/readwrite/model/DeviceDescriptorMediumType.go b/plc4go/protocols/knxnetip/readwrite/model/DeviceDescriptorMediumType.go index 2312ee0ebdf..306b67aee99 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/DeviceDescriptorMediumType.go +++ b/plc4go/protocols/knxnetip/readwrite/model/DeviceDescriptorMediumType.go @@ -34,12 +34,12 @@ type IDeviceDescriptorMediumType interface { utils.Serializable } -const ( - DeviceDescriptorMediumType_TP1 DeviceDescriptorMediumType = 0x0 - DeviceDescriptorMediumType_PL110 DeviceDescriptorMediumType = 0x1 - DeviceDescriptorMediumType_RF DeviceDescriptorMediumType = 0x2 - DeviceDescriptorMediumType_TP0 DeviceDescriptorMediumType = 0x3 - DeviceDescriptorMediumType_PL132 DeviceDescriptorMediumType = 0x4 +const( + DeviceDescriptorMediumType_TP1 DeviceDescriptorMediumType = 0x0 + DeviceDescriptorMediumType_PL110 DeviceDescriptorMediumType = 0x1 + DeviceDescriptorMediumType_RF DeviceDescriptorMediumType = 0x2 + DeviceDescriptorMediumType_TP0 DeviceDescriptorMediumType = 0x3 + DeviceDescriptorMediumType_PL132 DeviceDescriptorMediumType = 0x4 DeviceDescriptorMediumType_KNX_IP DeviceDescriptorMediumType = 0x5 ) @@ -47,7 +47,7 @@ var DeviceDescriptorMediumTypeValues []DeviceDescriptorMediumType func init() { _ = errors.New - DeviceDescriptorMediumTypeValues = []DeviceDescriptorMediumType{ + DeviceDescriptorMediumTypeValues = []DeviceDescriptorMediumType { DeviceDescriptorMediumType_TP1, DeviceDescriptorMediumType_PL110, DeviceDescriptorMediumType_RF, @@ -59,18 +59,18 @@ func init() { func DeviceDescriptorMediumTypeByValue(value uint8) (enum DeviceDescriptorMediumType, ok bool) { switch value { - case 0x0: - return DeviceDescriptorMediumType_TP1, true - case 0x1: - return DeviceDescriptorMediumType_PL110, true - case 0x2: - return DeviceDescriptorMediumType_RF, true - case 0x3: - return DeviceDescriptorMediumType_TP0, true - case 0x4: - return DeviceDescriptorMediumType_PL132, true - case 0x5: - return DeviceDescriptorMediumType_KNX_IP, true + case 0x0: + return DeviceDescriptorMediumType_TP1, true + case 0x1: + return DeviceDescriptorMediumType_PL110, true + case 0x2: + return DeviceDescriptorMediumType_RF, true + case 0x3: + return DeviceDescriptorMediumType_TP0, true + case 0x4: + return DeviceDescriptorMediumType_PL132, true + case 0x5: + return DeviceDescriptorMediumType_KNX_IP, true } return 0, false } @@ -93,13 +93,13 @@ func DeviceDescriptorMediumTypeByName(value string) (enum DeviceDescriptorMedium return 0, false } -func DeviceDescriptorMediumTypeKnows(value uint8) bool { +func DeviceDescriptorMediumTypeKnows(value uint8) bool { for _, typeValue := range DeviceDescriptorMediumTypeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastDeviceDescriptorMediumType(structType interface{}) DeviceDescriptorMediumType { @@ -171,3 +171,4 @@ func (e DeviceDescriptorMediumType) PLC4XEnumName() string { func (e DeviceDescriptorMediumType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/knxnetip/readwrite/model/DeviceDescriptorType2.go b/plc4go/protocols/knxnetip/readwrite/model/DeviceDescriptorType2.go index 94620dc7f26..af9895616bb 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/DeviceDescriptorType2.go +++ b/plc4go/protocols/knxnetip/readwrite/model/DeviceDescriptorType2.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // DeviceDescriptorType2 is the corresponding interface of DeviceDescriptorType2 type DeviceDescriptorType2 interface { @@ -62,18 +64,19 @@ type DeviceDescriptorType2Exactly interface { // _DeviceDescriptorType2 is the data-structure of this message type _DeviceDescriptorType2 struct { - ManufacturerId uint16 - DeviceType uint16 - Version uint8 - ReadSupported bool - WriteSupported bool - LogicalTagBase uint8 - ChannelInfo1 ChannelInformation - ChannelInfo2 ChannelInformation - ChannelInfo3 ChannelInformation - ChannelInfo4 ChannelInformation + ManufacturerId uint16 + DeviceType uint16 + Version uint8 + ReadSupported bool + WriteSupported bool + LogicalTagBase uint8 + ChannelInfo1 ChannelInformation + ChannelInfo2 ChannelInformation + ChannelInfo3 ChannelInformation + ChannelInfo4 ChannelInformation } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -124,14 +127,15 @@ func (m *_DeviceDescriptorType2) GetChannelInfo4() ChannelInformation { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewDeviceDescriptorType2 factory function for _DeviceDescriptorType2 -func NewDeviceDescriptorType2(manufacturerId uint16, deviceType uint16, version uint8, readSupported bool, writeSupported bool, logicalTagBase uint8, channelInfo1 ChannelInformation, channelInfo2 ChannelInformation, channelInfo3 ChannelInformation, channelInfo4 ChannelInformation) *_DeviceDescriptorType2 { - return &_DeviceDescriptorType2{ManufacturerId: manufacturerId, DeviceType: deviceType, Version: version, ReadSupported: readSupported, WriteSupported: writeSupported, LogicalTagBase: logicalTagBase, ChannelInfo1: channelInfo1, ChannelInfo2: channelInfo2, ChannelInfo3: channelInfo3, ChannelInfo4: channelInfo4} +func NewDeviceDescriptorType2( manufacturerId uint16 , deviceType uint16 , version uint8 , readSupported bool , writeSupported bool , logicalTagBase uint8 , channelInfo1 ChannelInformation , channelInfo2 ChannelInformation , channelInfo3 ChannelInformation , channelInfo4 ChannelInformation ) *_DeviceDescriptorType2 { +return &_DeviceDescriptorType2{ ManufacturerId: manufacturerId , DeviceType: deviceType , Version: version , ReadSupported: readSupported , WriteSupported: writeSupported , LogicalTagBase: logicalTagBase , ChannelInfo1: channelInfo1 , ChannelInfo2: channelInfo2 , ChannelInfo3: channelInfo3 , ChannelInfo4: channelInfo4 } } // Deprecated: use the interface for direct cast func CastDeviceDescriptorType2(structType interface{}) DeviceDescriptorType2 { - if casted, ok := structType.(DeviceDescriptorType2); ok { + if casted, ok := structType.(DeviceDescriptorType2); ok { return casted } if casted, ok := structType.(*DeviceDescriptorType2); ok { @@ -148,22 +152,22 @@ func (m *_DeviceDescriptorType2) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (manufacturerId) - lengthInBits += 16 + lengthInBits += 16; // Simple field (deviceType) - lengthInBits += 16 + lengthInBits += 16; // Simple field (version) - lengthInBits += 8 + lengthInBits += 8; // Simple field (readSupported) - lengthInBits += 1 + lengthInBits += 1; // Simple field (writeSupported) - lengthInBits += 1 + lengthInBits += 1; // Simple field (logicalTagBase) - lengthInBits += 6 + lengthInBits += 6; // Simple field (channelInfo1) lengthInBits += m.ChannelInfo1.GetLengthInBits(ctx) @@ -180,6 +184,7 @@ func (m *_DeviceDescriptorType2) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_DeviceDescriptorType2) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -198,42 +203,42 @@ func DeviceDescriptorType2ParseWithBuffer(ctx context.Context, readBuffer utils. _ = currentPos // Simple Field (manufacturerId) - _manufacturerId, _manufacturerIdErr := readBuffer.ReadUint16("manufacturerId", 16) +_manufacturerId, _manufacturerIdErr := readBuffer.ReadUint16("manufacturerId", 16) if _manufacturerIdErr != nil { return nil, errors.Wrap(_manufacturerIdErr, "Error parsing 'manufacturerId' field of DeviceDescriptorType2") } manufacturerId := _manufacturerId // Simple Field (deviceType) - _deviceType, _deviceTypeErr := readBuffer.ReadUint16("deviceType", 16) +_deviceType, _deviceTypeErr := readBuffer.ReadUint16("deviceType", 16) if _deviceTypeErr != nil { return nil, errors.Wrap(_deviceTypeErr, "Error parsing 'deviceType' field of DeviceDescriptorType2") } deviceType := _deviceType // Simple Field (version) - _version, _versionErr := readBuffer.ReadUint8("version", 8) +_version, _versionErr := readBuffer.ReadUint8("version", 8) if _versionErr != nil { return nil, errors.Wrap(_versionErr, "Error parsing 'version' field of DeviceDescriptorType2") } version := _version // Simple Field (readSupported) - _readSupported, _readSupportedErr := readBuffer.ReadBit("readSupported") +_readSupported, _readSupportedErr := readBuffer.ReadBit("readSupported") if _readSupportedErr != nil { return nil, errors.Wrap(_readSupportedErr, "Error parsing 'readSupported' field of DeviceDescriptorType2") } readSupported := _readSupported // Simple Field (writeSupported) - _writeSupported, _writeSupportedErr := readBuffer.ReadBit("writeSupported") +_writeSupported, _writeSupportedErr := readBuffer.ReadBit("writeSupported") if _writeSupportedErr != nil { return nil, errors.Wrap(_writeSupportedErr, "Error parsing 'writeSupported' field of DeviceDescriptorType2") } writeSupported := _writeSupported // Simple Field (logicalTagBase) - _logicalTagBase, _logicalTagBaseErr := readBuffer.ReadUint8("logicalTagBase", 6) +_logicalTagBase, _logicalTagBaseErr := readBuffer.ReadUint8("logicalTagBase", 6) if _logicalTagBaseErr != nil { return nil, errors.Wrap(_logicalTagBaseErr, "Error parsing 'logicalTagBase' field of DeviceDescriptorType2") } @@ -243,7 +248,7 @@ func DeviceDescriptorType2ParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("channelInfo1"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for channelInfo1") } - _channelInfo1, _channelInfo1Err := ChannelInformationParseWithBuffer(ctx, readBuffer) +_channelInfo1, _channelInfo1Err := ChannelInformationParseWithBuffer(ctx, readBuffer) if _channelInfo1Err != nil { return nil, errors.Wrap(_channelInfo1Err, "Error parsing 'channelInfo1' field of DeviceDescriptorType2") } @@ -256,7 +261,7 @@ func DeviceDescriptorType2ParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("channelInfo2"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for channelInfo2") } - _channelInfo2, _channelInfo2Err := ChannelInformationParseWithBuffer(ctx, readBuffer) +_channelInfo2, _channelInfo2Err := ChannelInformationParseWithBuffer(ctx, readBuffer) if _channelInfo2Err != nil { return nil, errors.Wrap(_channelInfo2Err, "Error parsing 'channelInfo2' field of DeviceDescriptorType2") } @@ -269,7 +274,7 @@ func DeviceDescriptorType2ParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("channelInfo3"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for channelInfo3") } - _channelInfo3, _channelInfo3Err := ChannelInformationParseWithBuffer(ctx, readBuffer) +_channelInfo3, _channelInfo3Err := ChannelInformationParseWithBuffer(ctx, readBuffer) if _channelInfo3Err != nil { return nil, errors.Wrap(_channelInfo3Err, "Error parsing 'channelInfo3' field of DeviceDescriptorType2") } @@ -282,7 +287,7 @@ func DeviceDescriptorType2ParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("channelInfo4"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for channelInfo4") } - _channelInfo4, _channelInfo4Err := ChannelInformationParseWithBuffer(ctx, readBuffer) +_channelInfo4, _channelInfo4Err := ChannelInformationParseWithBuffer(ctx, readBuffer) if _channelInfo4Err != nil { return nil, errors.Wrap(_channelInfo4Err, "Error parsing 'channelInfo4' field of DeviceDescriptorType2") } @@ -297,17 +302,17 @@ func DeviceDescriptorType2ParseWithBuffer(ctx context.Context, readBuffer utils. // Create the instance return &_DeviceDescriptorType2{ - ManufacturerId: manufacturerId, - DeviceType: deviceType, - Version: version, - ReadSupported: readSupported, - WriteSupported: writeSupported, - LogicalTagBase: logicalTagBase, - ChannelInfo1: channelInfo1, - ChannelInfo2: channelInfo2, - ChannelInfo3: channelInfo3, - ChannelInfo4: channelInfo4, - }, nil + ManufacturerId: manufacturerId, + DeviceType: deviceType, + Version: version, + ReadSupported: readSupported, + WriteSupported: writeSupported, + LogicalTagBase: logicalTagBase, + ChannelInfo1: channelInfo1, + ChannelInfo2: channelInfo2, + ChannelInfo3: channelInfo3, + ChannelInfo4: channelInfo4, + }, nil } func (m *_DeviceDescriptorType2) Serialize() ([]byte, error) { @@ -321,7 +326,7 @@ func (m *_DeviceDescriptorType2) Serialize() ([]byte, error) { func (m *_DeviceDescriptorType2) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("DeviceDescriptorType2"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("DeviceDescriptorType2"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for DeviceDescriptorType2") } @@ -421,6 +426,7 @@ func (m *_DeviceDescriptorType2) SerializeWithWriteBuffer(ctx context.Context, w return nil } + func (m *_DeviceDescriptorType2) isDeviceDescriptorType2() bool { return true } @@ -435,3 +441,6 @@ func (m *_DeviceDescriptorType2) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/DeviceStatus.go b/plc4go/protocols/knxnetip/readwrite/model/DeviceStatus.go index 6e7aea451e4..140331c1039 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/DeviceStatus.go +++ b/plc4go/protocols/knxnetip/readwrite/model/DeviceStatus.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // DeviceStatus is the corresponding interface of DeviceStatus type DeviceStatus interface { @@ -44,11 +46,12 @@ type DeviceStatusExactly interface { // _DeviceStatus is the data-structure of this message type _DeviceStatus struct { - ProgramMode bool + ProgramMode bool // Reserved Fields reservedField0 *uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -63,14 +66,15 @@ func (m *_DeviceStatus) GetProgramMode() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewDeviceStatus factory function for _DeviceStatus -func NewDeviceStatus(programMode bool) *_DeviceStatus { - return &_DeviceStatus{ProgramMode: programMode} +func NewDeviceStatus( programMode bool ) *_DeviceStatus { +return &_DeviceStatus{ ProgramMode: programMode } } // Deprecated: use the interface for direct cast func CastDeviceStatus(structType interface{}) DeviceStatus { - if casted, ok := structType.(DeviceStatus); ok { + if casted, ok := structType.(DeviceStatus); ok { return casted } if casted, ok := structType.(*DeviceStatus); ok { @@ -90,11 +94,12 @@ func (m *_DeviceStatus) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += 7 // Simple field (programMode) - lengthInBits += 1 + lengthInBits += 1; return lengthInBits } + func (m *_DeviceStatus) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +127,7 @@ func DeviceStatusParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe if reserved != uint8(0x00) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -130,7 +135,7 @@ func DeviceStatusParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe } // Simple Field (programMode) - _programMode, _programModeErr := readBuffer.ReadBit("programMode") +_programMode, _programModeErr := readBuffer.ReadBit("programMode") if _programModeErr != nil { return nil, errors.Wrap(_programModeErr, "Error parsing 'programMode' field of DeviceStatus") } @@ -142,9 +147,9 @@ func DeviceStatusParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe // Create the instance return &_DeviceStatus{ - ProgramMode: programMode, - reservedField0: reservedField0, - }, nil + ProgramMode: programMode, + reservedField0: reservedField0, + }, nil } func (m *_DeviceStatus) Serialize() ([]byte, error) { @@ -158,7 +163,7 @@ func (m *_DeviceStatus) Serialize() ([]byte, error) { func (m *_DeviceStatus) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("DeviceStatus"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("DeviceStatus"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for DeviceStatus") } @@ -168,7 +173,7 @@ func (m *_DeviceStatus) SerializeWithWriteBuffer(ctx context.Context, writeBuffe if m.reservedField0 != nil { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Overriding reserved field with unexpected value.") reserved = *m.reservedField0 } @@ -191,6 +196,7 @@ func (m *_DeviceStatus) SerializeWithWriteBuffer(ctx context.Context, writeBuffe return nil } + func (m *_DeviceStatus) isDeviceStatus() bool { return true } @@ -205,3 +211,6 @@ func (m *_DeviceStatus) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/DisconnectRequest.go b/plc4go/protocols/knxnetip/readwrite/model/DisconnectRequest.go index 97932a8554a..32d7ac59d41 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/DisconnectRequest.go +++ b/plc4go/protocols/knxnetip/readwrite/model/DisconnectRequest.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // DisconnectRequest is the corresponding interface of DisconnectRequest type DisconnectRequest interface { @@ -49,32 +51,32 @@ type DisconnectRequestExactly interface { // _DisconnectRequest is the data-structure of this message type _DisconnectRequest struct { *_KnxNetIpMessage - CommunicationChannelId uint8 - HpaiControlEndpoint HPAIControlEndpoint + CommunicationChannelId uint8 + HpaiControlEndpoint HPAIControlEndpoint // Reserved Fields reservedField0 *uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_DisconnectRequest) GetMsgType() uint16 { - return 0x0209 -} +func (m *_DisconnectRequest) GetMsgType() uint16 { +return 0x0209} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_DisconnectRequest) InitializeParent(parent KnxNetIpMessage) {} +func (m *_DisconnectRequest) InitializeParent(parent KnxNetIpMessage ) {} -func (m *_DisconnectRequest) GetParent() KnxNetIpMessage { +func (m *_DisconnectRequest) GetParent() KnxNetIpMessage { return m._KnxNetIpMessage } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -93,12 +95,13 @@ func (m *_DisconnectRequest) GetHpaiControlEndpoint() HPAIControlEndpoint { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewDisconnectRequest factory function for _DisconnectRequest -func NewDisconnectRequest(communicationChannelId uint8, hpaiControlEndpoint HPAIControlEndpoint) *_DisconnectRequest { +func NewDisconnectRequest( communicationChannelId uint8 , hpaiControlEndpoint HPAIControlEndpoint ) *_DisconnectRequest { _result := &_DisconnectRequest{ CommunicationChannelId: communicationChannelId, - HpaiControlEndpoint: hpaiControlEndpoint, - _KnxNetIpMessage: NewKnxNetIpMessage(), + HpaiControlEndpoint: hpaiControlEndpoint, + _KnxNetIpMessage: NewKnxNetIpMessage(), } _result._KnxNetIpMessage._KnxNetIpMessageChildRequirements = _result return _result @@ -106,7 +109,7 @@ func NewDisconnectRequest(communicationChannelId uint8, hpaiControlEndpoint HPAI // Deprecated: use the interface for direct cast func CastDisconnectRequest(structType interface{}) DisconnectRequest { - if casted, ok := structType.(DisconnectRequest); ok { + if casted, ok := structType.(DisconnectRequest); ok { return casted } if casted, ok := structType.(*DisconnectRequest); ok { @@ -123,7 +126,7 @@ func (m *_DisconnectRequest) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (communicationChannelId) - lengthInBits += 8 + lengthInBits += 8; // Reserved Field (reserved) lengthInBits += 8 @@ -134,6 +137,7 @@ func (m *_DisconnectRequest) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_DisconnectRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -152,7 +156,7 @@ func DisconnectRequestParseWithBuffer(ctx context.Context, readBuffer utils.Read _ = currentPos // Simple Field (communicationChannelId) - _communicationChannelId, _communicationChannelIdErr := readBuffer.ReadUint8("communicationChannelId", 8) +_communicationChannelId, _communicationChannelIdErr := readBuffer.ReadUint8("communicationChannelId", 8) if _communicationChannelIdErr != nil { return nil, errors.Wrap(_communicationChannelIdErr, "Error parsing 'communicationChannelId' field of DisconnectRequest") } @@ -168,7 +172,7 @@ func DisconnectRequestParseWithBuffer(ctx context.Context, readBuffer utils.Read if reserved != uint8(0x00) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -179,7 +183,7 @@ func DisconnectRequestParseWithBuffer(ctx context.Context, readBuffer utils.Read if pullErr := readBuffer.PullContext("hpaiControlEndpoint"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for hpaiControlEndpoint") } - _hpaiControlEndpoint, _hpaiControlEndpointErr := HPAIControlEndpointParseWithBuffer(ctx, readBuffer) +_hpaiControlEndpoint, _hpaiControlEndpointErr := HPAIControlEndpointParseWithBuffer(ctx, readBuffer) if _hpaiControlEndpointErr != nil { return nil, errors.Wrap(_hpaiControlEndpointErr, "Error parsing 'hpaiControlEndpoint' field of DisconnectRequest") } @@ -194,10 +198,11 @@ func DisconnectRequestParseWithBuffer(ctx context.Context, readBuffer utils.Read // Create a partially initialized instance _child := &_DisconnectRequest{ - _KnxNetIpMessage: &_KnxNetIpMessage{}, + _KnxNetIpMessage: &_KnxNetIpMessage{ + }, CommunicationChannelId: communicationChannelId, - HpaiControlEndpoint: hpaiControlEndpoint, - reservedField0: reservedField0, + HpaiControlEndpoint: hpaiControlEndpoint, + reservedField0: reservedField0, } _child._KnxNetIpMessage._KnxNetIpMessageChildRequirements = _child return _child, nil @@ -219,40 +224,40 @@ func (m *_DisconnectRequest) SerializeWithWriteBuffer(ctx context.Context, write return errors.Wrap(pushErr, "Error pushing for DisconnectRequest") } - // Simple Field (communicationChannelId) - communicationChannelId := uint8(m.GetCommunicationChannelId()) - _communicationChannelIdErr := writeBuffer.WriteUint8("communicationChannelId", 8, (communicationChannelId)) - if _communicationChannelIdErr != nil { - return errors.Wrap(_communicationChannelIdErr, "Error serializing 'communicationChannelId' field") - } - - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0x00) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0x00), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteUint8("reserved", 8, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } - } + // Simple Field (communicationChannelId) + communicationChannelId := uint8(m.GetCommunicationChannelId()) + _communicationChannelIdErr := writeBuffer.WriteUint8("communicationChannelId", 8, (communicationChannelId)) + if _communicationChannelIdErr != nil { + return errors.Wrap(_communicationChannelIdErr, "Error serializing 'communicationChannelId' field") + } - // Simple Field (hpaiControlEndpoint) - if pushErr := writeBuffer.PushContext("hpaiControlEndpoint"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for hpaiControlEndpoint") - } - _hpaiControlEndpointErr := writeBuffer.WriteSerializable(ctx, m.GetHpaiControlEndpoint()) - if popErr := writeBuffer.PopContext("hpaiControlEndpoint"); popErr != nil { - return errors.Wrap(popErr, "Error popping for hpaiControlEndpoint") + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0x00) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0x00), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 } - if _hpaiControlEndpointErr != nil { - return errors.Wrap(_hpaiControlEndpointErr, "Error serializing 'hpaiControlEndpoint' field") + _err := writeBuffer.WriteUint8("reserved", 8, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } + + // Simple Field (hpaiControlEndpoint) + if pushErr := writeBuffer.PushContext("hpaiControlEndpoint"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for hpaiControlEndpoint") + } + _hpaiControlEndpointErr := writeBuffer.WriteSerializable(ctx, m.GetHpaiControlEndpoint()) + if popErr := writeBuffer.PopContext("hpaiControlEndpoint"); popErr != nil { + return errors.Wrap(popErr, "Error popping for hpaiControlEndpoint") + } + if _hpaiControlEndpointErr != nil { + return errors.Wrap(_hpaiControlEndpointErr, "Error serializing 'hpaiControlEndpoint' field") + } if popErr := writeBuffer.PopContext("DisconnectRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for DisconnectRequest") @@ -262,6 +267,7 @@ func (m *_DisconnectRequest) SerializeWithWriteBuffer(ctx context.Context, write return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_DisconnectRequest) isDisconnectRequest() bool { return true } @@ -276,3 +282,6 @@ func (m *_DisconnectRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/DisconnectResponse.go b/plc4go/protocols/knxnetip/readwrite/model/DisconnectResponse.go index 267807bdbab..989b4b23806 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/DisconnectResponse.go +++ b/plc4go/protocols/knxnetip/readwrite/model/DisconnectResponse.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // DisconnectResponse is the corresponding interface of DisconnectResponse type DisconnectResponse interface { @@ -49,30 +51,30 @@ type DisconnectResponseExactly interface { // _DisconnectResponse is the data-structure of this message type _DisconnectResponse struct { *_KnxNetIpMessage - CommunicationChannelId uint8 - Status Status + CommunicationChannelId uint8 + Status Status } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_DisconnectResponse) GetMsgType() uint16 { - return 0x020A -} +func (m *_DisconnectResponse) GetMsgType() uint16 { +return 0x020A} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_DisconnectResponse) InitializeParent(parent KnxNetIpMessage) {} +func (m *_DisconnectResponse) InitializeParent(parent KnxNetIpMessage ) {} -func (m *_DisconnectResponse) GetParent() KnxNetIpMessage { +func (m *_DisconnectResponse) GetParent() KnxNetIpMessage { return m._KnxNetIpMessage } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -91,12 +93,13 @@ func (m *_DisconnectResponse) GetStatus() Status { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewDisconnectResponse factory function for _DisconnectResponse -func NewDisconnectResponse(communicationChannelId uint8, status Status) *_DisconnectResponse { +func NewDisconnectResponse( communicationChannelId uint8 , status Status ) *_DisconnectResponse { _result := &_DisconnectResponse{ CommunicationChannelId: communicationChannelId, - Status: status, - _KnxNetIpMessage: NewKnxNetIpMessage(), + Status: status, + _KnxNetIpMessage: NewKnxNetIpMessage(), } _result._KnxNetIpMessage._KnxNetIpMessageChildRequirements = _result return _result @@ -104,7 +107,7 @@ func NewDisconnectResponse(communicationChannelId uint8, status Status) *_Discon // Deprecated: use the interface for direct cast func CastDisconnectResponse(structType interface{}) DisconnectResponse { - if casted, ok := structType.(DisconnectResponse); ok { + if casted, ok := structType.(DisconnectResponse); ok { return casted } if casted, ok := structType.(*DisconnectResponse); ok { @@ -121,7 +124,7 @@ func (m *_DisconnectResponse) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (communicationChannelId) - lengthInBits += 8 + lengthInBits += 8; // Simple field (status) lengthInBits += 8 @@ -129,6 +132,7 @@ func (m *_DisconnectResponse) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_DisconnectResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -147,7 +151,7 @@ func DisconnectResponseParseWithBuffer(ctx context.Context, readBuffer utils.Rea _ = currentPos // Simple Field (communicationChannelId) - _communicationChannelId, _communicationChannelIdErr := readBuffer.ReadUint8("communicationChannelId", 8) +_communicationChannelId, _communicationChannelIdErr := readBuffer.ReadUint8("communicationChannelId", 8) if _communicationChannelIdErr != nil { return nil, errors.Wrap(_communicationChannelIdErr, "Error parsing 'communicationChannelId' field of DisconnectResponse") } @@ -157,7 +161,7 @@ func DisconnectResponseParseWithBuffer(ctx context.Context, readBuffer utils.Rea if pullErr := readBuffer.PullContext("status"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for status") } - _status, _statusErr := StatusParseWithBuffer(ctx, readBuffer) +_status, _statusErr := StatusParseWithBuffer(ctx, readBuffer) if _statusErr != nil { return nil, errors.Wrap(_statusErr, "Error parsing 'status' field of DisconnectResponse") } @@ -172,9 +176,10 @@ func DisconnectResponseParseWithBuffer(ctx context.Context, readBuffer utils.Rea // Create a partially initialized instance _child := &_DisconnectResponse{ - _KnxNetIpMessage: &_KnxNetIpMessage{}, + _KnxNetIpMessage: &_KnxNetIpMessage{ + }, CommunicationChannelId: communicationChannelId, - Status: status, + Status: status, } _child._KnxNetIpMessage._KnxNetIpMessageChildRequirements = _child return _child, nil @@ -196,24 +201,24 @@ func (m *_DisconnectResponse) SerializeWithWriteBuffer(ctx context.Context, writ return errors.Wrap(pushErr, "Error pushing for DisconnectResponse") } - // Simple Field (communicationChannelId) - communicationChannelId := uint8(m.GetCommunicationChannelId()) - _communicationChannelIdErr := writeBuffer.WriteUint8("communicationChannelId", 8, (communicationChannelId)) - if _communicationChannelIdErr != nil { - return errors.Wrap(_communicationChannelIdErr, "Error serializing 'communicationChannelId' field") - } + // Simple Field (communicationChannelId) + communicationChannelId := uint8(m.GetCommunicationChannelId()) + _communicationChannelIdErr := writeBuffer.WriteUint8("communicationChannelId", 8, (communicationChannelId)) + if _communicationChannelIdErr != nil { + return errors.Wrap(_communicationChannelIdErr, "Error serializing 'communicationChannelId' field") + } - // Simple Field (status) - if pushErr := writeBuffer.PushContext("status"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for status") - } - _statusErr := writeBuffer.WriteSerializable(ctx, m.GetStatus()) - if popErr := writeBuffer.PopContext("status"); popErr != nil { - return errors.Wrap(popErr, "Error popping for status") - } - if _statusErr != nil { - return errors.Wrap(_statusErr, "Error serializing 'status' field") - } + // Simple Field (status) + if pushErr := writeBuffer.PushContext("status"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for status") + } + _statusErr := writeBuffer.WriteSerializable(ctx, m.GetStatus()) + if popErr := writeBuffer.PopContext("status"); popErr != nil { + return errors.Wrap(popErr, "Error popping for status") + } + if _statusErr != nil { + return errors.Wrap(_statusErr, "Error serializing 'status' field") + } if popErr := writeBuffer.PopContext("DisconnectResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for DisconnectResponse") @@ -223,6 +228,7 @@ func (m *_DisconnectResponse) SerializeWithWriteBuffer(ctx context.Context, writ return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_DisconnectResponse) isDisconnectResponse() bool { return true } @@ -237,3 +243,6 @@ func (m *_DisconnectResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/FirmwareType.go b/plc4go/protocols/knxnetip/readwrite/model/FirmwareType.go index 180dca4dbaa..a014ee138c8 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/FirmwareType.go +++ b/plc4go/protocols/knxnetip/readwrite/model/FirmwareType.go @@ -34,30 +34,30 @@ type IFirmwareType interface { utils.Serializable } -const ( - FirmwareType_SYSTEM_1 FirmwareType = 0x0010 - FirmwareType_SYSTEM_2 FirmwareType = 0x0020 - FirmwareType_SYSTEM_300 FirmwareType = 0x0300 - FirmwareType_SYSTEM_7 FirmwareType = 0x0700 - FirmwareType_SYSTEM_B FirmwareType = 0x07B0 - FirmwareType_IR_DECODER FirmwareType = 0x0810 - FirmwareType_COUPLER FirmwareType = 0x0910 - FirmwareType_NONE FirmwareType = 0x0AF0 - FirmwareType_SYSTEM_1_PL110 FirmwareType = 0x10B0 - FirmwareType_SYSTEM_B_PL110 FirmwareType = 0x17B0 - FirmwareType_MEDIA_COUPLER_PL_TP FirmwareType = 0x1900 - FirmwareType_RF_BI_DIRECTIONAL_DEVICES FirmwareType = 0x2000 +const( + FirmwareType_SYSTEM_1 FirmwareType = 0x0010 + FirmwareType_SYSTEM_2 FirmwareType = 0x0020 + FirmwareType_SYSTEM_300 FirmwareType = 0x0300 + FirmwareType_SYSTEM_7 FirmwareType = 0x0700 + FirmwareType_SYSTEM_B FirmwareType = 0x07B0 + FirmwareType_IR_DECODER FirmwareType = 0x0810 + FirmwareType_COUPLER FirmwareType = 0x0910 + FirmwareType_NONE FirmwareType = 0x0AF0 + FirmwareType_SYSTEM_1_PL110 FirmwareType = 0x10B0 + FirmwareType_SYSTEM_B_PL110 FirmwareType = 0x17B0 + FirmwareType_MEDIA_COUPLER_PL_TP FirmwareType = 0x1900 + FirmwareType_RF_BI_DIRECTIONAL_DEVICES FirmwareType = 0x2000 FirmwareType_RF_UNI_DIRECTIONAL_DEVICES FirmwareType = 0x2100 - FirmwareType_SYSTEM_1_TP0 FirmwareType = 0x3000 - FirmwareType_SYSTEM_1_PL132 FirmwareType = 0x4000 - FirmwareType_SYSTEM_7_KNX_NET_IP FirmwareType = 0x5700 + FirmwareType_SYSTEM_1_TP0 FirmwareType = 0x3000 + FirmwareType_SYSTEM_1_PL132 FirmwareType = 0x4000 + FirmwareType_SYSTEM_7_KNX_NET_IP FirmwareType = 0x5700 ) var FirmwareTypeValues []FirmwareType func init() { _ = errors.New - FirmwareTypeValues = []FirmwareType{ + FirmwareTypeValues = []FirmwareType { FirmwareType_SYSTEM_1, FirmwareType_SYSTEM_2, FirmwareType_SYSTEM_300, @@ -79,38 +79,38 @@ func init() { func FirmwareTypeByValue(value uint16) (enum FirmwareType, ok bool) { switch value { - case 0x0010: - return FirmwareType_SYSTEM_1, true - case 0x0020: - return FirmwareType_SYSTEM_2, true - case 0x0300: - return FirmwareType_SYSTEM_300, true - case 0x0700: - return FirmwareType_SYSTEM_7, true - case 0x07B0: - return FirmwareType_SYSTEM_B, true - case 0x0810: - return FirmwareType_IR_DECODER, true - case 0x0910: - return FirmwareType_COUPLER, true - case 0x0AF0: - return FirmwareType_NONE, true - case 0x10B0: - return FirmwareType_SYSTEM_1_PL110, true - case 0x17B0: - return FirmwareType_SYSTEM_B_PL110, true - case 0x1900: - return FirmwareType_MEDIA_COUPLER_PL_TP, true - case 0x2000: - return FirmwareType_RF_BI_DIRECTIONAL_DEVICES, true - case 0x2100: - return FirmwareType_RF_UNI_DIRECTIONAL_DEVICES, true - case 0x3000: - return FirmwareType_SYSTEM_1_TP0, true - case 0x4000: - return FirmwareType_SYSTEM_1_PL132, true - case 0x5700: - return FirmwareType_SYSTEM_7_KNX_NET_IP, true + case 0x0010: + return FirmwareType_SYSTEM_1, true + case 0x0020: + return FirmwareType_SYSTEM_2, true + case 0x0300: + return FirmwareType_SYSTEM_300, true + case 0x0700: + return FirmwareType_SYSTEM_7, true + case 0x07B0: + return FirmwareType_SYSTEM_B, true + case 0x0810: + return FirmwareType_IR_DECODER, true + case 0x0910: + return FirmwareType_COUPLER, true + case 0x0AF0: + return FirmwareType_NONE, true + case 0x10B0: + return FirmwareType_SYSTEM_1_PL110, true + case 0x17B0: + return FirmwareType_SYSTEM_B_PL110, true + case 0x1900: + return FirmwareType_MEDIA_COUPLER_PL_TP, true + case 0x2000: + return FirmwareType_RF_BI_DIRECTIONAL_DEVICES, true + case 0x2100: + return FirmwareType_RF_UNI_DIRECTIONAL_DEVICES, true + case 0x3000: + return FirmwareType_SYSTEM_1_TP0, true + case 0x4000: + return FirmwareType_SYSTEM_1_PL132, true + case 0x5700: + return FirmwareType_SYSTEM_7_KNX_NET_IP, true } return 0, false } @@ -153,13 +153,13 @@ func FirmwareTypeByName(value string) (enum FirmwareType, ok bool) { return 0, false } -func FirmwareTypeKnows(value uint16) bool { +func FirmwareTypeKnows(value uint16) bool { for _, typeValue := range FirmwareTypeValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastFirmwareType(structType interface{}) FirmwareType { @@ -251,3 +251,4 @@ func (e FirmwareType) PLC4XEnumName() string { func (e FirmwareType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/knxnetip/readwrite/model/GroupObjectDescriptorRealisationType1.go b/plc4go/protocols/knxnetip/readwrite/model/GroupObjectDescriptorRealisationType1.go index 98537bb372e..21d86955055 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/GroupObjectDescriptorRealisationType1.go +++ b/plc4go/protocols/knxnetip/readwrite/model/GroupObjectDescriptorRealisationType1.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // GroupObjectDescriptorRealisationType1 is the corresponding interface of GroupObjectDescriptorRealisationType1 type GroupObjectDescriptorRealisationType1 interface { @@ -58,18 +60,19 @@ type GroupObjectDescriptorRealisationType1Exactly interface { // _GroupObjectDescriptorRealisationType1 is the data-structure of this message type _GroupObjectDescriptorRealisationType1 struct { - DataPointer uint8 - TransmitEnable bool - SegmentSelectorEnable bool - WriteEnable bool - ReadEnable bool - CommunicationEnable bool - Priority CEMIPriority - ValueType ComObjectValueType + DataPointer uint8 + TransmitEnable bool + SegmentSelectorEnable bool + WriteEnable bool + ReadEnable bool + CommunicationEnable bool + Priority CEMIPriority + ValueType ComObjectValueType // Reserved Fields reservedField0 *uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -112,14 +115,15 @@ func (m *_GroupObjectDescriptorRealisationType1) GetValueType() ComObjectValueTy /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewGroupObjectDescriptorRealisationType1 factory function for _GroupObjectDescriptorRealisationType1 -func NewGroupObjectDescriptorRealisationType1(dataPointer uint8, transmitEnable bool, segmentSelectorEnable bool, writeEnable bool, readEnable bool, communicationEnable bool, priority CEMIPriority, valueType ComObjectValueType) *_GroupObjectDescriptorRealisationType1 { - return &_GroupObjectDescriptorRealisationType1{DataPointer: dataPointer, TransmitEnable: transmitEnable, SegmentSelectorEnable: segmentSelectorEnable, WriteEnable: writeEnable, ReadEnable: readEnable, CommunicationEnable: communicationEnable, Priority: priority, ValueType: valueType} +func NewGroupObjectDescriptorRealisationType1( dataPointer uint8 , transmitEnable bool , segmentSelectorEnable bool , writeEnable bool , readEnable bool , communicationEnable bool , priority CEMIPriority , valueType ComObjectValueType ) *_GroupObjectDescriptorRealisationType1 { +return &_GroupObjectDescriptorRealisationType1{ DataPointer: dataPointer , TransmitEnable: transmitEnable , SegmentSelectorEnable: segmentSelectorEnable , WriteEnable: writeEnable , ReadEnable: readEnable , CommunicationEnable: communicationEnable , Priority: priority , ValueType: valueType } } // Deprecated: use the interface for direct cast func CastGroupObjectDescriptorRealisationType1(structType interface{}) GroupObjectDescriptorRealisationType1 { - if casted, ok := structType.(GroupObjectDescriptorRealisationType1); ok { + if casted, ok := structType.(GroupObjectDescriptorRealisationType1); ok { return casted } if casted, ok := structType.(*GroupObjectDescriptorRealisationType1); ok { @@ -136,25 +140,25 @@ func (m *_GroupObjectDescriptorRealisationType1) GetLengthInBits(ctx context.Con lengthInBits := uint16(0) // Simple field (dataPointer) - lengthInBits += 8 + lengthInBits += 8; // Reserved Field (reserved) lengthInBits += 1 // Simple field (transmitEnable) - lengthInBits += 1 + lengthInBits += 1; // Simple field (segmentSelectorEnable) - lengthInBits += 1 + lengthInBits += 1; // Simple field (writeEnable) - lengthInBits += 1 + lengthInBits += 1; // Simple field (readEnable) - lengthInBits += 1 + lengthInBits += 1; // Simple field (communicationEnable) - lengthInBits += 1 + lengthInBits += 1; // Simple field (priority) lengthInBits += 2 @@ -165,6 +169,7 @@ func (m *_GroupObjectDescriptorRealisationType1) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_GroupObjectDescriptorRealisationType1) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -183,7 +188,7 @@ func GroupObjectDescriptorRealisationType1ParseWithBuffer(ctx context.Context, r _ = currentPos // Simple Field (dataPointer) - _dataPointer, _dataPointerErr := readBuffer.ReadUint8("dataPointer", 8) +_dataPointer, _dataPointerErr := readBuffer.ReadUint8("dataPointer", 8) if _dataPointerErr != nil { return nil, errors.Wrap(_dataPointerErr, "Error parsing 'dataPointer' field of GroupObjectDescriptorRealisationType1") } @@ -199,7 +204,7 @@ func GroupObjectDescriptorRealisationType1ParseWithBuffer(ctx context.Context, r if reserved != uint8(0x1) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x1), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -207,35 +212,35 @@ func GroupObjectDescriptorRealisationType1ParseWithBuffer(ctx context.Context, r } // Simple Field (transmitEnable) - _transmitEnable, _transmitEnableErr := readBuffer.ReadBit("transmitEnable") +_transmitEnable, _transmitEnableErr := readBuffer.ReadBit("transmitEnable") if _transmitEnableErr != nil { return nil, errors.Wrap(_transmitEnableErr, "Error parsing 'transmitEnable' field of GroupObjectDescriptorRealisationType1") } transmitEnable := _transmitEnable // Simple Field (segmentSelectorEnable) - _segmentSelectorEnable, _segmentSelectorEnableErr := readBuffer.ReadBit("segmentSelectorEnable") +_segmentSelectorEnable, _segmentSelectorEnableErr := readBuffer.ReadBit("segmentSelectorEnable") if _segmentSelectorEnableErr != nil { return nil, errors.Wrap(_segmentSelectorEnableErr, "Error parsing 'segmentSelectorEnable' field of GroupObjectDescriptorRealisationType1") } segmentSelectorEnable := _segmentSelectorEnable // Simple Field (writeEnable) - _writeEnable, _writeEnableErr := readBuffer.ReadBit("writeEnable") +_writeEnable, _writeEnableErr := readBuffer.ReadBit("writeEnable") if _writeEnableErr != nil { return nil, errors.Wrap(_writeEnableErr, "Error parsing 'writeEnable' field of GroupObjectDescriptorRealisationType1") } writeEnable := _writeEnable // Simple Field (readEnable) - _readEnable, _readEnableErr := readBuffer.ReadBit("readEnable") +_readEnable, _readEnableErr := readBuffer.ReadBit("readEnable") if _readEnableErr != nil { return nil, errors.Wrap(_readEnableErr, "Error parsing 'readEnable' field of GroupObjectDescriptorRealisationType1") } readEnable := _readEnable // Simple Field (communicationEnable) - _communicationEnable, _communicationEnableErr := readBuffer.ReadBit("communicationEnable") +_communicationEnable, _communicationEnableErr := readBuffer.ReadBit("communicationEnable") if _communicationEnableErr != nil { return nil, errors.Wrap(_communicationEnableErr, "Error parsing 'communicationEnable' field of GroupObjectDescriptorRealisationType1") } @@ -245,7 +250,7 @@ func GroupObjectDescriptorRealisationType1ParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("priority"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for priority") } - _priority, _priorityErr := CEMIPriorityParseWithBuffer(ctx, readBuffer) +_priority, _priorityErr := CEMIPriorityParseWithBuffer(ctx, readBuffer) if _priorityErr != nil { return nil, errors.Wrap(_priorityErr, "Error parsing 'priority' field of GroupObjectDescriptorRealisationType1") } @@ -258,7 +263,7 @@ func GroupObjectDescriptorRealisationType1ParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("valueType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for valueType") } - _valueType, _valueTypeErr := ComObjectValueTypeParseWithBuffer(ctx, readBuffer) +_valueType, _valueTypeErr := ComObjectValueTypeParseWithBuffer(ctx, readBuffer) if _valueTypeErr != nil { return nil, errors.Wrap(_valueTypeErr, "Error parsing 'valueType' field of GroupObjectDescriptorRealisationType1") } @@ -273,16 +278,16 @@ func GroupObjectDescriptorRealisationType1ParseWithBuffer(ctx context.Context, r // Create the instance return &_GroupObjectDescriptorRealisationType1{ - DataPointer: dataPointer, - TransmitEnable: transmitEnable, - SegmentSelectorEnable: segmentSelectorEnable, - WriteEnable: writeEnable, - ReadEnable: readEnable, - CommunicationEnable: communicationEnable, - Priority: priority, - ValueType: valueType, - reservedField0: reservedField0, - }, nil + DataPointer: dataPointer, + TransmitEnable: transmitEnable, + SegmentSelectorEnable: segmentSelectorEnable, + WriteEnable: writeEnable, + ReadEnable: readEnable, + CommunicationEnable: communicationEnable, + Priority: priority, + ValueType: valueType, + reservedField0: reservedField0, + }, nil } func (m *_GroupObjectDescriptorRealisationType1) Serialize() ([]byte, error) { @@ -296,7 +301,7 @@ func (m *_GroupObjectDescriptorRealisationType1) Serialize() ([]byte, error) { func (m *_GroupObjectDescriptorRealisationType1) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("GroupObjectDescriptorRealisationType1"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("GroupObjectDescriptorRealisationType1"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for GroupObjectDescriptorRealisationType1") } @@ -313,7 +318,7 @@ func (m *_GroupObjectDescriptorRealisationType1) SerializeWithWriteBuffer(ctx co if m.reservedField0 != nil { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x1), - "got value": reserved, + "got value": reserved, }).Msg("Overriding reserved field with unexpected value.") reserved = *m.reservedField0 } @@ -388,6 +393,7 @@ func (m *_GroupObjectDescriptorRealisationType1) SerializeWithWriteBuffer(ctx co return nil } + func (m *_GroupObjectDescriptorRealisationType1) isGroupObjectDescriptorRealisationType1() bool { return true } @@ -402,3 +408,6 @@ func (m *_GroupObjectDescriptorRealisationType1) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/GroupObjectDescriptorRealisationType2.go b/plc4go/protocols/knxnetip/readwrite/model/GroupObjectDescriptorRealisationType2.go index a628c9c1a93..b27f412ca60 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/GroupObjectDescriptorRealisationType2.go +++ b/plc4go/protocols/knxnetip/readwrite/model/GroupObjectDescriptorRealisationType2.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // GroupObjectDescriptorRealisationType2 is the corresponding interface of GroupObjectDescriptorRealisationType2 type GroupObjectDescriptorRealisationType2 interface { @@ -60,17 +62,18 @@ type GroupObjectDescriptorRealisationType2Exactly interface { // _GroupObjectDescriptorRealisationType2 is the data-structure of this message type _GroupObjectDescriptorRealisationType2 struct { - DataPointer uint8 - UpdateEnable bool - TransmitEnable bool - SegmentSelectorEnable bool - WriteEnable bool - ReadEnable bool - CommunicationEnable bool - Priority CEMIPriority - ValueType ComObjectValueType + DataPointer uint8 + UpdateEnable bool + TransmitEnable bool + SegmentSelectorEnable bool + WriteEnable bool + ReadEnable bool + CommunicationEnable bool + Priority CEMIPriority + ValueType ComObjectValueType } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -117,14 +120,15 @@ func (m *_GroupObjectDescriptorRealisationType2) GetValueType() ComObjectValueTy /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewGroupObjectDescriptorRealisationType2 factory function for _GroupObjectDescriptorRealisationType2 -func NewGroupObjectDescriptorRealisationType2(dataPointer uint8, updateEnable bool, transmitEnable bool, segmentSelectorEnable bool, writeEnable bool, readEnable bool, communicationEnable bool, priority CEMIPriority, valueType ComObjectValueType) *_GroupObjectDescriptorRealisationType2 { - return &_GroupObjectDescriptorRealisationType2{DataPointer: dataPointer, UpdateEnable: updateEnable, TransmitEnable: transmitEnable, SegmentSelectorEnable: segmentSelectorEnable, WriteEnable: writeEnable, ReadEnable: readEnable, CommunicationEnable: communicationEnable, Priority: priority, ValueType: valueType} +func NewGroupObjectDescriptorRealisationType2( dataPointer uint8 , updateEnable bool , transmitEnable bool , segmentSelectorEnable bool , writeEnable bool , readEnable bool , communicationEnable bool , priority CEMIPriority , valueType ComObjectValueType ) *_GroupObjectDescriptorRealisationType2 { +return &_GroupObjectDescriptorRealisationType2{ DataPointer: dataPointer , UpdateEnable: updateEnable , TransmitEnable: transmitEnable , SegmentSelectorEnable: segmentSelectorEnable , WriteEnable: writeEnable , ReadEnable: readEnable , CommunicationEnable: communicationEnable , Priority: priority , ValueType: valueType } } // Deprecated: use the interface for direct cast func CastGroupObjectDescriptorRealisationType2(structType interface{}) GroupObjectDescriptorRealisationType2 { - if casted, ok := structType.(GroupObjectDescriptorRealisationType2); ok { + if casted, ok := structType.(GroupObjectDescriptorRealisationType2); ok { return casted } if casted, ok := structType.(*GroupObjectDescriptorRealisationType2); ok { @@ -141,25 +145,25 @@ func (m *_GroupObjectDescriptorRealisationType2) GetLengthInBits(ctx context.Con lengthInBits := uint16(0) // Simple field (dataPointer) - lengthInBits += 8 + lengthInBits += 8; // Simple field (updateEnable) - lengthInBits += 1 + lengthInBits += 1; // Simple field (transmitEnable) - lengthInBits += 1 + lengthInBits += 1; // Simple field (segmentSelectorEnable) - lengthInBits += 1 + lengthInBits += 1; // Simple field (writeEnable) - lengthInBits += 1 + lengthInBits += 1; // Simple field (readEnable) - lengthInBits += 1 + lengthInBits += 1; // Simple field (communicationEnable) - lengthInBits += 1 + lengthInBits += 1; // Simple field (priority) lengthInBits += 2 @@ -170,6 +174,7 @@ func (m *_GroupObjectDescriptorRealisationType2) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_GroupObjectDescriptorRealisationType2) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -188,49 +193,49 @@ func GroupObjectDescriptorRealisationType2ParseWithBuffer(ctx context.Context, r _ = currentPos // Simple Field (dataPointer) - _dataPointer, _dataPointerErr := readBuffer.ReadUint8("dataPointer", 8) +_dataPointer, _dataPointerErr := readBuffer.ReadUint8("dataPointer", 8) if _dataPointerErr != nil { return nil, errors.Wrap(_dataPointerErr, "Error parsing 'dataPointer' field of GroupObjectDescriptorRealisationType2") } dataPointer := _dataPointer // Simple Field (updateEnable) - _updateEnable, _updateEnableErr := readBuffer.ReadBit("updateEnable") +_updateEnable, _updateEnableErr := readBuffer.ReadBit("updateEnable") if _updateEnableErr != nil { return nil, errors.Wrap(_updateEnableErr, "Error parsing 'updateEnable' field of GroupObjectDescriptorRealisationType2") } updateEnable := _updateEnable // Simple Field (transmitEnable) - _transmitEnable, _transmitEnableErr := readBuffer.ReadBit("transmitEnable") +_transmitEnable, _transmitEnableErr := readBuffer.ReadBit("transmitEnable") if _transmitEnableErr != nil { return nil, errors.Wrap(_transmitEnableErr, "Error parsing 'transmitEnable' field of GroupObjectDescriptorRealisationType2") } transmitEnable := _transmitEnable // Simple Field (segmentSelectorEnable) - _segmentSelectorEnable, _segmentSelectorEnableErr := readBuffer.ReadBit("segmentSelectorEnable") +_segmentSelectorEnable, _segmentSelectorEnableErr := readBuffer.ReadBit("segmentSelectorEnable") if _segmentSelectorEnableErr != nil { return nil, errors.Wrap(_segmentSelectorEnableErr, "Error parsing 'segmentSelectorEnable' field of GroupObjectDescriptorRealisationType2") } segmentSelectorEnable := _segmentSelectorEnable // Simple Field (writeEnable) - _writeEnable, _writeEnableErr := readBuffer.ReadBit("writeEnable") +_writeEnable, _writeEnableErr := readBuffer.ReadBit("writeEnable") if _writeEnableErr != nil { return nil, errors.Wrap(_writeEnableErr, "Error parsing 'writeEnable' field of GroupObjectDescriptorRealisationType2") } writeEnable := _writeEnable // Simple Field (readEnable) - _readEnable, _readEnableErr := readBuffer.ReadBit("readEnable") +_readEnable, _readEnableErr := readBuffer.ReadBit("readEnable") if _readEnableErr != nil { return nil, errors.Wrap(_readEnableErr, "Error parsing 'readEnable' field of GroupObjectDescriptorRealisationType2") } readEnable := _readEnable // Simple Field (communicationEnable) - _communicationEnable, _communicationEnableErr := readBuffer.ReadBit("communicationEnable") +_communicationEnable, _communicationEnableErr := readBuffer.ReadBit("communicationEnable") if _communicationEnableErr != nil { return nil, errors.Wrap(_communicationEnableErr, "Error parsing 'communicationEnable' field of GroupObjectDescriptorRealisationType2") } @@ -240,7 +245,7 @@ func GroupObjectDescriptorRealisationType2ParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("priority"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for priority") } - _priority, _priorityErr := CEMIPriorityParseWithBuffer(ctx, readBuffer) +_priority, _priorityErr := CEMIPriorityParseWithBuffer(ctx, readBuffer) if _priorityErr != nil { return nil, errors.Wrap(_priorityErr, "Error parsing 'priority' field of GroupObjectDescriptorRealisationType2") } @@ -253,7 +258,7 @@ func GroupObjectDescriptorRealisationType2ParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("valueType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for valueType") } - _valueType, _valueTypeErr := ComObjectValueTypeParseWithBuffer(ctx, readBuffer) +_valueType, _valueTypeErr := ComObjectValueTypeParseWithBuffer(ctx, readBuffer) if _valueTypeErr != nil { return nil, errors.Wrap(_valueTypeErr, "Error parsing 'valueType' field of GroupObjectDescriptorRealisationType2") } @@ -268,16 +273,16 @@ func GroupObjectDescriptorRealisationType2ParseWithBuffer(ctx context.Context, r // Create the instance return &_GroupObjectDescriptorRealisationType2{ - DataPointer: dataPointer, - UpdateEnable: updateEnable, - TransmitEnable: transmitEnable, - SegmentSelectorEnable: segmentSelectorEnable, - WriteEnable: writeEnable, - ReadEnable: readEnable, - CommunicationEnable: communicationEnable, - Priority: priority, - ValueType: valueType, - }, nil + DataPointer: dataPointer, + UpdateEnable: updateEnable, + TransmitEnable: transmitEnable, + SegmentSelectorEnable: segmentSelectorEnable, + WriteEnable: writeEnable, + ReadEnable: readEnable, + CommunicationEnable: communicationEnable, + Priority: priority, + ValueType: valueType, + }, nil } func (m *_GroupObjectDescriptorRealisationType2) Serialize() ([]byte, error) { @@ -291,7 +296,7 @@ func (m *_GroupObjectDescriptorRealisationType2) Serialize() ([]byte, error) { func (m *_GroupObjectDescriptorRealisationType2) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("GroupObjectDescriptorRealisationType2"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("GroupObjectDescriptorRealisationType2"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for GroupObjectDescriptorRealisationType2") } @@ -374,6 +379,7 @@ func (m *_GroupObjectDescriptorRealisationType2) SerializeWithWriteBuffer(ctx co return nil } + func (m *_GroupObjectDescriptorRealisationType2) isGroupObjectDescriptorRealisationType2() bool { return true } @@ -388,3 +394,6 @@ func (m *_GroupObjectDescriptorRealisationType2) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/GroupObjectDescriptorRealisationType6.go b/plc4go/protocols/knxnetip/readwrite/model/GroupObjectDescriptorRealisationType6.go index 6811cd2a832..d19862b6b86 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/GroupObjectDescriptorRealisationType6.go +++ b/plc4go/protocols/knxnetip/readwrite/model/GroupObjectDescriptorRealisationType6.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // GroupObjectDescriptorRealisationType6 is the corresponding interface of GroupObjectDescriptorRealisationType6 type GroupObjectDescriptorRealisationType6 interface { @@ -44,14 +46,17 @@ type GroupObjectDescriptorRealisationType6Exactly interface { type _GroupObjectDescriptorRealisationType6 struct { } + + + // NewGroupObjectDescriptorRealisationType6 factory function for _GroupObjectDescriptorRealisationType6 -func NewGroupObjectDescriptorRealisationType6() *_GroupObjectDescriptorRealisationType6 { - return &_GroupObjectDescriptorRealisationType6{} +func NewGroupObjectDescriptorRealisationType6( ) *_GroupObjectDescriptorRealisationType6 { +return &_GroupObjectDescriptorRealisationType6{ } } // Deprecated: use the interface for direct cast func CastGroupObjectDescriptorRealisationType6(structType interface{}) GroupObjectDescriptorRealisationType6 { - if casted, ok := structType.(GroupObjectDescriptorRealisationType6); ok { + if casted, ok := structType.(GroupObjectDescriptorRealisationType6); ok { return casted } if casted, ok := structType.(*GroupObjectDescriptorRealisationType6); ok { @@ -70,6 +75,7 @@ func (m *_GroupObjectDescriptorRealisationType6) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_GroupObjectDescriptorRealisationType6) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -92,7 +98,8 @@ func GroupObjectDescriptorRealisationType6ParseWithBuffer(ctx context.Context, r } // Create the instance - return &_GroupObjectDescriptorRealisationType6{}, nil + return &_GroupObjectDescriptorRealisationType6{ + }, nil } func (m *_GroupObjectDescriptorRealisationType6) Serialize() ([]byte, error) { @@ -106,7 +113,7 @@ func (m *_GroupObjectDescriptorRealisationType6) Serialize() ([]byte, error) { func (m *_GroupObjectDescriptorRealisationType6) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("GroupObjectDescriptorRealisationType6"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("GroupObjectDescriptorRealisationType6"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for GroupObjectDescriptorRealisationType6") } @@ -116,6 +123,7 @@ func (m *_GroupObjectDescriptorRealisationType6) SerializeWithWriteBuffer(ctx co return nil } + func (m *_GroupObjectDescriptorRealisationType6) isGroupObjectDescriptorRealisationType6() bool { return true } @@ -130,3 +138,6 @@ func (m *_GroupObjectDescriptorRealisationType6) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/GroupObjectDescriptorRealisationType7.go b/plc4go/protocols/knxnetip/readwrite/model/GroupObjectDescriptorRealisationType7.go index 13c8f53218a..7f36475378e 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/GroupObjectDescriptorRealisationType7.go +++ b/plc4go/protocols/knxnetip/readwrite/model/GroupObjectDescriptorRealisationType7.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // GroupObjectDescriptorRealisationType7 is the corresponding interface of GroupObjectDescriptorRealisationType7 type GroupObjectDescriptorRealisationType7 interface { @@ -60,17 +62,18 @@ type GroupObjectDescriptorRealisationType7Exactly interface { // _GroupObjectDescriptorRealisationType7 is the data-structure of this message type _GroupObjectDescriptorRealisationType7 struct { - DataAddress uint16 - UpdateEnable bool - TransmitEnable bool - SegmentSelectorEnable bool - WriteEnable bool - ReadEnable bool - CommunicationEnable bool - Priority CEMIPriority - ValueType ComObjectValueType + DataAddress uint16 + UpdateEnable bool + TransmitEnable bool + SegmentSelectorEnable bool + WriteEnable bool + ReadEnable bool + CommunicationEnable bool + Priority CEMIPriority + ValueType ComObjectValueType } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -117,14 +120,15 @@ func (m *_GroupObjectDescriptorRealisationType7) GetValueType() ComObjectValueTy /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewGroupObjectDescriptorRealisationType7 factory function for _GroupObjectDescriptorRealisationType7 -func NewGroupObjectDescriptorRealisationType7(dataAddress uint16, updateEnable bool, transmitEnable bool, segmentSelectorEnable bool, writeEnable bool, readEnable bool, communicationEnable bool, priority CEMIPriority, valueType ComObjectValueType) *_GroupObjectDescriptorRealisationType7 { - return &_GroupObjectDescriptorRealisationType7{DataAddress: dataAddress, UpdateEnable: updateEnable, TransmitEnable: transmitEnable, SegmentSelectorEnable: segmentSelectorEnable, WriteEnable: writeEnable, ReadEnable: readEnable, CommunicationEnable: communicationEnable, Priority: priority, ValueType: valueType} +func NewGroupObjectDescriptorRealisationType7( dataAddress uint16 , updateEnable bool , transmitEnable bool , segmentSelectorEnable bool , writeEnable bool , readEnable bool , communicationEnable bool , priority CEMIPriority , valueType ComObjectValueType ) *_GroupObjectDescriptorRealisationType7 { +return &_GroupObjectDescriptorRealisationType7{ DataAddress: dataAddress , UpdateEnable: updateEnable , TransmitEnable: transmitEnable , SegmentSelectorEnable: segmentSelectorEnable , WriteEnable: writeEnable , ReadEnable: readEnable , CommunicationEnable: communicationEnable , Priority: priority , ValueType: valueType } } // Deprecated: use the interface for direct cast func CastGroupObjectDescriptorRealisationType7(structType interface{}) GroupObjectDescriptorRealisationType7 { - if casted, ok := structType.(GroupObjectDescriptorRealisationType7); ok { + if casted, ok := structType.(GroupObjectDescriptorRealisationType7); ok { return casted } if casted, ok := structType.(*GroupObjectDescriptorRealisationType7); ok { @@ -141,25 +145,25 @@ func (m *_GroupObjectDescriptorRealisationType7) GetLengthInBits(ctx context.Con lengthInBits := uint16(0) // Simple field (dataAddress) - lengthInBits += 16 + lengthInBits += 16; // Simple field (updateEnable) - lengthInBits += 1 + lengthInBits += 1; // Simple field (transmitEnable) - lengthInBits += 1 + lengthInBits += 1; // Simple field (segmentSelectorEnable) - lengthInBits += 1 + lengthInBits += 1; // Simple field (writeEnable) - lengthInBits += 1 + lengthInBits += 1; // Simple field (readEnable) - lengthInBits += 1 + lengthInBits += 1; // Simple field (communicationEnable) - lengthInBits += 1 + lengthInBits += 1; // Simple field (priority) lengthInBits += 2 @@ -170,6 +174,7 @@ func (m *_GroupObjectDescriptorRealisationType7) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_GroupObjectDescriptorRealisationType7) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -188,49 +193,49 @@ func GroupObjectDescriptorRealisationType7ParseWithBuffer(ctx context.Context, r _ = currentPos // Simple Field (dataAddress) - _dataAddress, _dataAddressErr := readBuffer.ReadUint16("dataAddress", 16) +_dataAddress, _dataAddressErr := readBuffer.ReadUint16("dataAddress", 16) if _dataAddressErr != nil { return nil, errors.Wrap(_dataAddressErr, "Error parsing 'dataAddress' field of GroupObjectDescriptorRealisationType7") } dataAddress := _dataAddress // Simple Field (updateEnable) - _updateEnable, _updateEnableErr := readBuffer.ReadBit("updateEnable") +_updateEnable, _updateEnableErr := readBuffer.ReadBit("updateEnable") if _updateEnableErr != nil { return nil, errors.Wrap(_updateEnableErr, "Error parsing 'updateEnable' field of GroupObjectDescriptorRealisationType7") } updateEnable := _updateEnable // Simple Field (transmitEnable) - _transmitEnable, _transmitEnableErr := readBuffer.ReadBit("transmitEnable") +_transmitEnable, _transmitEnableErr := readBuffer.ReadBit("transmitEnable") if _transmitEnableErr != nil { return nil, errors.Wrap(_transmitEnableErr, "Error parsing 'transmitEnable' field of GroupObjectDescriptorRealisationType7") } transmitEnable := _transmitEnable // Simple Field (segmentSelectorEnable) - _segmentSelectorEnable, _segmentSelectorEnableErr := readBuffer.ReadBit("segmentSelectorEnable") +_segmentSelectorEnable, _segmentSelectorEnableErr := readBuffer.ReadBit("segmentSelectorEnable") if _segmentSelectorEnableErr != nil { return nil, errors.Wrap(_segmentSelectorEnableErr, "Error parsing 'segmentSelectorEnable' field of GroupObjectDescriptorRealisationType7") } segmentSelectorEnable := _segmentSelectorEnable // Simple Field (writeEnable) - _writeEnable, _writeEnableErr := readBuffer.ReadBit("writeEnable") +_writeEnable, _writeEnableErr := readBuffer.ReadBit("writeEnable") if _writeEnableErr != nil { return nil, errors.Wrap(_writeEnableErr, "Error parsing 'writeEnable' field of GroupObjectDescriptorRealisationType7") } writeEnable := _writeEnable // Simple Field (readEnable) - _readEnable, _readEnableErr := readBuffer.ReadBit("readEnable") +_readEnable, _readEnableErr := readBuffer.ReadBit("readEnable") if _readEnableErr != nil { return nil, errors.Wrap(_readEnableErr, "Error parsing 'readEnable' field of GroupObjectDescriptorRealisationType7") } readEnable := _readEnable // Simple Field (communicationEnable) - _communicationEnable, _communicationEnableErr := readBuffer.ReadBit("communicationEnable") +_communicationEnable, _communicationEnableErr := readBuffer.ReadBit("communicationEnable") if _communicationEnableErr != nil { return nil, errors.Wrap(_communicationEnableErr, "Error parsing 'communicationEnable' field of GroupObjectDescriptorRealisationType7") } @@ -240,7 +245,7 @@ func GroupObjectDescriptorRealisationType7ParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("priority"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for priority") } - _priority, _priorityErr := CEMIPriorityParseWithBuffer(ctx, readBuffer) +_priority, _priorityErr := CEMIPriorityParseWithBuffer(ctx, readBuffer) if _priorityErr != nil { return nil, errors.Wrap(_priorityErr, "Error parsing 'priority' field of GroupObjectDescriptorRealisationType7") } @@ -253,7 +258,7 @@ func GroupObjectDescriptorRealisationType7ParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("valueType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for valueType") } - _valueType, _valueTypeErr := ComObjectValueTypeParseWithBuffer(ctx, readBuffer) +_valueType, _valueTypeErr := ComObjectValueTypeParseWithBuffer(ctx, readBuffer) if _valueTypeErr != nil { return nil, errors.Wrap(_valueTypeErr, "Error parsing 'valueType' field of GroupObjectDescriptorRealisationType7") } @@ -268,16 +273,16 @@ func GroupObjectDescriptorRealisationType7ParseWithBuffer(ctx context.Context, r // Create the instance return &_GroupObjectDescriptorRealisationType7{ - DataAddress: dataAddress, - UpdateEnable: updateEnable, - TransmitEnable: transmitEnable, - SegmentSelectorEnable: segmentSelectorEnable, - WriteEnable: writeEnable, - ReadEnable: readEnable, - CommunicationEnable: communicationEnable, - Priority: priority, - ValueType: valueType, - }, nil + DataAddress: dataAddress, + UpdateEnable: updateEnable, + TransmitEnable: transmitEnable, + SegmentSelectorEnable: segmentSelectorEnable, + WriteEnable: writeEnable, + ReadEnable: readEnable, + CommunicationEnable: communicationEnable, + Priority: priority, + ValueType: valueType, + }, nil } func (m *_GroupObjectDescriptorRealisationType7) Serialize() ([]byte, error) { @@ -291,7 +296,7 @@ func (m *_GroupObjectDescriptorRealisationType7) Serialize() ([]byte, error) { func (m *_GroupObjectDescriptorRealisationType7) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("GroupObjectDescriptorRealisationType7"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("GroupObjectDescriptorRealisationType7"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for GroupObjectDescriptorRealisationType7") } @@ -374,6 +379,7 @@ func (m *_GroupObjectDescriptorRealisationType7) SerializeWithWriteBuffer(ctx co return nil } + func (m *_GroupObjectDescriptorRealisationType7) isGroupObjectDescriptorRealisationType7() bool { return true } @@ -388,3 +394,6 @@ func (m *_GroupObjectDescriptorRealisationType7) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/GroupObjectDescriptorRealisationTypeB.go b/plc4go/protocols/knxnetip/readwrite/model/GroupObjectDescriptorRealisationTypeB.go index 7091cf0f290..8192d971c4e 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/GroupObjectDescriptorRealisationTypeB.go +++ b/plc4go/protocols/knxnetip/readwrite/model/GroupObjectDescriptorRealisationTypeB.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // GroupObjectDescriptorRealisationTypeB is the corresponding interface of GroupObjectDescriptorRealisationTypeB type GroupObjectDescriptorRealisationTypeB interface { @@ -58,16 +60,17 @@ type GroupObjectDescriptorRealisationTypeBExactly interface { // _GroupObjectDescriptorRealisationTypeB is the data-structure of this message type _GroupObjectDescriptorRealisationTypeB struct { - UpdateEnable bool - TransmitEnable bool - SegmentSelectorEnable bool - WriteEnable bool - ReadEnable bool - CommunicationEnable bool - Priority CEMIPriority - ValueType ComObjectValueType + UpdateEnable bool + TransmitEnable bool + SegmentSelectorEnable bool + WriteEnable bool + ReadEnable bool + CommunicationEnable bool + Priority CEMIPriority + ValueType ComObjectValueType } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -110,14 +113,15 @@ func (m *_GroupObjectDescriptorRealisationTypeB) GetValueType() ComObjectValueTy /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewGroupObjectDescriptorRealisationTypeB factory function for _GroupObjectDescriptorRealisationTypeB -func NewGroupObjectDescriptorRealisationTypeB(updateEnable bool, transmitEnable bool, segmentSelectorEnable bool, writeEnable bool, readEnable bool, communicationEnable bool, priority CEMIPriority, valueType ComObjectValueType) *_GroupObjectDescriptorRealisationTypeB { - return &_GroupObjectDescriptorRealisationTypeB{UpdateEnable: updateEnable, TransmitEnable: transmitEnable, SegmentSelectorEnable: segmentSelectorEnable, WriteEnable: writeEnable, ReadEnable: readEnable, CommunicationEnable: communicationEnable, Priority: priority, ValueType: valueType} +func NewGroupObjectDescriptorRealisationTypeB( updateEnable bool , transmitEnable bool , segmentSelectorEnable bool , writeEnable bool , readEnable bool , communicationEnable bool , priority CEMIPriority , valueType ComObjectValueType ) *_GroupObjectDescriptorRealisationTypeB { +return &_GroupObjectDescriptorRealisationTypeB{ UpdateEnable: updateEnable , TransmitEnable: transmitEnable , SegmentSelectorEnable: segmentSelectorEnable , WriteEnable: writeEnable , ReadEnable: readEnable , CommunicationEnable: communicationEnable , Priority: priority , ValueType: valueType } } // Deprecated: use the interface for direct cast func CastGroupObjectDescriptorRealisationTypeB(structType interface{}) GroupObjectDescriptorRealisationTypeB { - if casted, ok := structType.(GroupObjectDescriptorRealisationTypeB); ok { + if casted, ok := structType.(GroupObjectDescriptorRealisationTypeB); ok { return casted } if casted, ok := structType.(*GroupObjectDescriptorRealisationTypeB); ok { @@ -134,22 +138,22 @@ func (m *_GroupObjectDescriptorRealisationTypeB) GetLengthInBits(ctx context.Con lengthInBits := uint16(0) // Simple field (updateEnable) - lengthInBits += 1 + lengthInBits += 1; // Simple field (transmitEnable) - lengthInBits += 1 + lengthInBits += 1; // Simple field (segmentSelectorEnable) - lengthInBits += 1 + lengthInBits += 1; // Simple field (writeEnable) - lengthInBits += 1 + lengthInBits += 1; // Simple field (readEnable) - lengthInBits += 1 + lengthInBits += 1; // Simple field (communicationEnable) - lengthInBits += 1 + lengthInBits += 1; // Simple field (priority) lengthInBits += 2 @@ -160,6 +164,7 @@ func (m *_GroupObjectDescriptorRealisationTypeB) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_GroupObjectDescriptorRealisationTypeB) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -178,42 +183,42 @@ func GroupObjectDescriptorRealisationTypeBParseWithBuffer(ctx context.Context, r _ = currentPos // Simple Field (updateEnable) - _updateEnable, _updateEnableErr := readBuffer.ReadBit("updateEnable") +_updateEnable, _updateEnableErr := readBuffer.ReadBit("updateEnable") if _updateEnableErr != nil { return nil, errors.Wrap(_updateEnableErr, "Error parsing 'updateEnable' field of GroupObjectDescriptorRealisationTypeB") } updateEnable := _updateEnable // Simple Field (transmitEnable) - _transmitEnable, _transmitEnableErr := readBuffer.ReadBit("transmitEnable") +_transmitEnable, _transmitEnableErr := readBuffer.ReadBit("transmitEnable") if _transmitEnableErr != nil { return nil, errors.Wrap(_transmitEnableErr, "Error parsing 'transmitEnable' field of GroupObjectDescriptorRealisationTypeB") } transmitEnable := _transmitEnable // Simple Field (segmentSelectorEnable) - _segmentSelectorEnable, _segmentSelectorEnableErr := readBuffer.ReadBit("segmentSelectorEnable") +_segmentSelectorEnable, _segmentSelectorEnableErr := readBuffer.ReadBit("segmentSelectorEnable") if _segmentSelectorEnableErr != nil { return nil, errors.Wrap(_segmentSelectorEnableErr, "Error parsing 'segmentSelectorEnable' field of GroupObjectDescriptorRealisationTypeB") } segmentSelectorEnable := _segmentSelectorEnable // Simple Field (writeEnable) - _writeEnable, _writeEnableErr := readBuffer.ReadBit("writeEnable") +_writeEnable, _writeEnableErr := readBuffer.ReadBit("writeEnable") if _writeEnableErr != nil { return nil, errors.Wrap(_writeEnableErr, "Error parsing 'writeEnable' field of GroupObjectDescriptorRealisationTypeB") } writeEnable := _writeEnable // Simple Field (readEnable) - _readEnable, _readEnableErr := readBuffer.ReadBit("readEnable") +_readEnable, _readEnableErr := readBuffer.ReadBit("readEnable") if _readEnableErr != nil { return nil, errors.Wrap(_readEnableErr, "Error parsing 'readEnable' field of GroupObjectDescriptorRealisationTypeB") } readEnable := _readEnable // Simple Field (communicationEnable) - _communicationEnable, _communicationEnableErr := readBuffer.ReadBit("communicationEnable") +_communicationEnable, _communicationEnableErr := readBuffer.ReadBit("communicationEnable") if _communicationEnableErr != nil { return nil, errors.Wrap(_communicationEnableErr, "Error parsing 'communicationEnable' field of GroupObjectDescriptorRealisationTypeB") } @@ -223,7 +228,7 @@ func GroupObjectDescriptorRealisationTypeBParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("priority"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for priority") } - _priority, _priorityErr := CEMIPriorityParseWithBuffer(ctx, readBuffer) +_priority, _priorityErr := CEMIPriorityParseWithBuffer(ctx, readBuffer) if _priorityErr != nil { return nil, errors.Wrap(_priorityErr, "Error parsing 'priority' field of GroupObjectDescriptorRealisationTypeB") } @@ -236,7 +241,7 @@ func GroupObjectDescriptorRealisationTypeBParseWithBuffer(ctx context.Context, r if pullErr := readBuffer.PullContext("valueType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for valueType") } - _valueType, _valueTypeErr := ComObjectValueTypeParseWithBuffer(ctx, readBuffer) +_valueType, _valueTypeErr := ComObjectValueTypeParseWithBuffer(ctx, readBuffer) if _valueTypeErr != nil { return nil, errors.Wrap(_valueTypeErr, "Error parsing 'valueType' field of GroupObjectDescriptorRealisationTypeB") } @@ -251,15 +256,15 @@ func GroupObjectDescriptorRealisationTypeBParseWithBuffer(ctx context.Context, r // Create the instance return &_GroupObjectDescriptorRealisationTypeB{ - UpdateEnable: updateEnable, - TransmitEnable: transmitEnable, - SegmentSelectorEnable: segmentSelectorEnable, - WriteEnable: writeEnable, - ReadEnable: readEnable, - CommunicationEnable: communicationEnable, - Priority: priority, - ValueType: valueType, - }, nil + UpdateEnable: updateEnable, + TransmitEnable: transmitEnable, + SegmentSelectorEnable: segmentSelectorEnable, + WriteEnable: writeEnable, + ReadEnable: readEnable, + CommunicationEnable: communicationEnable, + Priority: priority, + ValueType: valueType, + }, nil } func (m *_GroupObjectDescriptorRealisationTypeB) Serialize() ([]byte, error) { @@ -273,7 +278,7 @@ func (m *_GroupObjectDescriptorRealisationTypeB) Serialize() ([]byte, error) { func (m *_GroupObjectDescriptorRealisationTypeB) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("GroupObjectDescriptorRealisationTypeB"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("GroupObjectDescriptorRealisationTypeB"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for GroupObjectDescriptorRealisationTypeB") } @@ -349,6 +354,7 @@ func (m *_GroupObjectDescriptorRealisationTypeB) SerializeWithWriteBuffer(ctx co return nil } + func (m *_GroupObjectDescriptorRealisationTypeB) isGroupObjectDescriptorRealisationTypeB() bool { return true } @@ -363,3 +369,6 @@ func (m *_GroupObjectDescriptorRealisationTypeB) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/HPAIControlEndpoint.go b/plc4go/protocols/knxnetip/readwrite/model/HPAIControlEndpoint.go index efc1907596f..231d217a3b2 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/HPAIControlEndpoint.go +++ b/plc4go/protocols/knxnetip/readwrite/model/HPAIControlEndpoint.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // HPAIControlEndpoint is the corresponding interface of HPAIControlEndpoint type HPAIControlEndpoint interface { @@ -48,11 +50,12 @@ type HPAIControlEndpointExactly interface { // _HPAIControlEndpoint is the data-structure of this message type _HPAIControlEndpoint struct { - HostProtocolCode HostProtocolCode - IpAddress IPAddress - IpPort uint16 + HostProtocolCode HostProtocolCode + IpAddress IPAddress + IpPort uint16 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -75,14 +78,15 @@ func (m *_HPAIControlEndpoint) GetIpPort() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewHPAIControlEndpoint factory function for _HPAIControlEndpoint -func NewHPAIControlEndpoint(hostProtocolCode HostProtocolCode, ipAddress IPAddress, ipPort uint16) *_HPAIControlEndpoint { - return &_HPAIControlEndpoint{HostProtocolCode: hostProtocolCode, IpAddress: ipAddress, IpPort: ipPort} +func NewHPAIControlEndpoint( hostProtocolCode HostProtocolCode , ipAddress IPAddress , ipPort uint16 ) *_HPAIControlEndpoint { +return &_HPAIControlEndpoint{ HostProtocolCode: hostProtocolCode , IpAddress: ipAddress , IpPort: ipPort } } // Deprecated: use the interface for direct cast func CastHPAIControlEndpoint(structType interface{}) HPAIControlEndpoint { - if casted, ok := structType.(HPAIControlEndpoint); ok { + if casted, ok := structType.(HPAIControlEndpoint); ok { return casted } if casted, ok := structType.(*HPAIControlEndpoint); ok { @@ -108,11 +112,12 @@ func (m *_HPAIControlEndpoint) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += m.IpAddress.GetLengthInBits(ctx) // Simple field (ipPort) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_HPAIControlEndpoint) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -141,7 +146,7 @@ func HPAIControlEndpointParseWithBuffer(ctx context.Context, readBuffer utils.Re if pullErr := readBuffer.PullContext("hostProtocolCode"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for hostProtocolCode") } - _hostProtocolCode, _hostProtocolCodeErr := HostProtocolCodeParseWithBuffer(ctx, readBuffer) +_hostProtocolCode, _hostProtocolCodeErr := HostProtocolCodeParseWithBuffer(ctx, readBuffer) if _hostProtocolCodeErr != nil { return nil, errors.Wrap(_hostProtocolCodeErr, "Error parsing 'hostProtocolCode' field of HPAIControlEndpoint") } @@ -154,7 +159,7 @@ func HPAIControlEndpointParseWithBuffer(ctx context.Context, readBuffer utils.Re if pullErr := readBuffer.PullContext("ipAddress"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for ipAddress") } - _ipAddress, _ipAddressErr := IPAddressParseWithBuffer(ctx, readBuffer) +_ipAddress, _ipAddressErr := IPAddressParseWithBuffer(ctx, readBuffer) if _ipAddressErr != nil { return nil, errors.Wrap(_ipAddressErr, "Error parsing 'ipAddress' field of HPAIControlEndpoint") } @@ -164,7 +169,7 @@ func HPAIControlEndpointParseWithBuffer(ctx context.Context, readBuffer utils.Re } // Simple Field (ipPort) - _ipPort, _ipPortErr := readBuffer.ReadUint16("ipPort", 16) +_ipPort, _ipPortErr := readBuffer.ReadUint16("ipPort", 16) if _ipPortErr != nil { return nil, errors.Wrap(_ipPortErr, "Error parsing 'ipPort' field of HPAIControlEndpoint") } @@ -176,10 +181,10 @@ func HPAIControlEndpointParseWithBuffer(ctx context.Context, readBuffer utils.Re // Create the instance return &_HPAIControlEndpoint{ - HostProtocolCode: hostProtocolCode, - IpAddress: ipAddress, - IpPort: ipPort, - }, nil + HostProtocolCode: hostProtocolCode, + IpAddress: ipAddress, + IpPort: ipPort, + }, nil } func (m *_HPAIControlEndpoint) Serialize() ([]byte, error) { @@ -193,7 +198,7 @@ func (m *_HPAIControlEndpoint) Serialize() ([]byte, error) { func (m *_HPAIControlEndpoint) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("HPAIControlEndpoint"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("HPAIControlEndpoint"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for HPAIControlEndpoint") } @@ -241,6 +246,7 @@ func (m *_HPAIControlEndpoint) SerializeWithWriteBuffer(ctx context.Context, wri return nil } + func (m *_HPAIControlEndpoint) isHPAIControlEndpoint() bool { return true } @@ -255,3 +261,6 @@ func (m *_HPAIControlEndpoint) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/HPAIDataEndpoint.go b/plc4go/protocols/knxnetip/readwrite/model/HPAIDataEndpoint.go index 0d37f5ac646..a7edd1f8c1f 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/HPAIDataEndpoint.go +++ b/plc4go/protocols/knxnetip/readwrite/model/HPAIDataEndpoint.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // HPAIDataEndpoint is the corresponding interface of HPAIDataEndpoint type HPAIDataEndpoint interface { @@ -48,11 +50,12 @@ type HPAIDataEndpointExactly interface { // _HPAIDataEndpoint is the data-structure of this message type _HPAIDataEndpoint struct { - HostProtocolCode HostProtocolCode - IpAddress IPAddress - IpPort uint16 + HostProtocolCode HostProtocolCode + IpAddress IPAddress + IpPort uint16 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -75,14 +78,15 @@ func (m *_HPAIDataEndpoint) GetIpPort() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewHPAIDataEndpoint factory function for _HPAIDataEndpoint -func NewHPAIDataEndpoint(hostProtocolCode HostProtocolCode, ipAddress IPAddress, ipPort uint16) *_HPAIDataEndpoint { - return &_HPAIDataEndpoint{HostProtocolCode: hostProtocolCode, IpAddress: ipAddress, IpPort: ipPort} +func NewHPAIDataEndpoint( hostProtocolCode HostProtocolCode , ipAddress IPAddress , ipPort uint16 ) *_HPAIDataEndpoint { +return &_HPAIDataEndpoint{ HostProtocolCode: hostProtocolCode , IpAddress: ipAddress , IpPort: ipPort } } // Deprecated: use the interface for direct cast func CastHPAIDataEndpoint(structType interface{}) HPAIDataEndpoint { - if casted, ok := structType.(HPAIDataEndpoint); ok { + if casted, ok := structType.(HPAIDataEndpoint); ok { return casted } if casted, ok := structType.(*HPAIDataEndpoint); ok { @@ -108,11 +112,12 @@ func (m *_HPAIDataEndpoint) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += m.IpAddress.GetLengthInBits(ctx) // Simple field (ipPort) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_HPAIDataEndpoint) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -141,7 +146,7 @@ func HPAIDataEndpointParseWithBuffer(ctx context.Context, readBuffer utils.ReadB if pullErr := readBuffer.PullContext("hostProtocolCode"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for hostProtocolCode") } - _hostProtocolCode, _hostProtocolCodeErr := HostProtocolCodeParseWithBuffer(ctx, readBuffer) +_hostProtocolCode, _hostProtocolCodeErr := HostProtocolCodeParseWithBuffer(ctx, readBuffer) if _hostProtocolCodeErr != nil { return nil, errors.Wrap(_hostProtocolCodeErr, "Error parsing 'hostProtocolCode' field of HPAIDataEndpoint") } @@ -154,7 +159,7 @@ func HPAIDataEndpointParseWithBuffer(ctx context.Context, readBuffer utils.ReadB if pullErr := readBuffer.PullContext("ipAddress"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for ipAddress") } - _ipAddress, _ipAddressErr := IPAddressParseWithBuffer(ctx, readBuffer) +_ipAddress, _ipAddressErr := IPAddressParseWithBuffer(ctx, readBuffer) if _ipAddressErr != nil { return nil, errors.Wrap(_ipAddressErr, "Error parsing 'ipAddress' field of HPAIDataEndpoint") } @@ -164,7 +169,7 @@ func HPAIDataEndpointParseWithBuffer(ctx context.Context, readBuffer utils.ReadB } // Simple Field (ipPort) - _ipPort, _ipPortErr := readBuffer.ReadUint16("ipPort", 16) +_ipPort, _ipPortErr := readBuffer.ReadUint16("ipPort", 16) if _ipPortErr != nil { return nil, errors.Wrap(_ipPortErr, "Error parsing 'ipPort' field of HPAIDataEndpoint") } @@ -176,10 +181,10 @@ func HPAIDataEndpointParseWithBuffer(ctx context.Context, readBuffer utils.ReadB // Create the instance return &_HPAIDataEndpoint{ - HostProtocolCode: hostProtocolCode, - IpAddress: ipAddress, - IpPort: ipPort, - }, nil + HostProtocolCode: hostProtocolCode, + IpAddress: ipAddress, + IpPort: ipPort, + }, nil } func (m *_HPAIDataEndpoint) Serialize() ([]byte, error) { @@ -193,7 +198,7 @@ func (m *_HPAIDataEndpoint) Serialize() ([]byte, error) { func (m *_HPAIDataEndpoint) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("HPAIDataEndpoint"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("HPAIDataEndpoint"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for HPAIDataEndpoint") } @@ -241,6 +246,7 @@ func (m *_HPAIDataEndpoint) SerializeWithWriteBuffer(ctx context.Context, writeB return nil } + func (m *_HPAIDataEndpoint) isHPAIDataEndpoint() bool { return true } @@ -255,3 +261,6 @@ func (m *_HPAIDataEndpoint) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/HPAIDiscoveryEndpoint.go b/plc4go/protocols/knxnetip/readwrite/model/HPAIDiscoveryEndpoint.go index c68bb2ece69..c76c90f7026 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/HPAIDiscoveryEndpoint.go +++ b/plc4go/protocols/knxnetip/readwrite/model/HPAIDiscoveryEndpoint.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // HPAIDiscoveryEndpoint is the corresponding interface of HPAIDiscoveryEndpoint type HPAIDiscoveryEndpoint interface { @@ -48,11 +50,12 @@ type HPAIDiscoveryEndpointExactly interface { // _HPAIDiscoveryEndpoint is the data-structure of this message type _HPAIDiscoveryEndpoint struct { - HostProtocolCode HostProtocolCode - IpAddress IPAddress - IpPort uint16 + HostProtocolCode HostProtocolCode + IpAddress IPAddress + IpPort uint16 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -75,14 +78,15 @@ func (m *_HPAIDiscoveryEndpoint) GetIpPort() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewHPAIDiscoveryEndpoint factory function for _HPAIDiscoveryEndpoint -func NewHPAIDiscoveryEndpoint(hostProtocolCode HostProtocolCode, ipAddress IPAddress, ipPort uint16) *_HPAIDiscoveryEndpoint { - return &_HPAIDiscoveryEndpoint{HostProtocolCode: hostProtocolCode, IpAddress: ipAddress, IpPort: ipPort} +func NewHPAIDiscoveryEndpoint( hostProtocolCode HostProtocolCode , ipAddress IPAddress , ipPort uint16 ) *_HPAIDiscoveryEndpoint { +return &_HPAIDiscoveryEndpoint{ HostProtocolCode: hostProtocolCode , IpAddress: ipAddress , IpPort: ipPort } } // Deprecated: use the interface for direct cast func CastHPAIDiscoveryEndpoint(structType interface{}) HPAIDiscoveryEndpoint { - if casted, ok := structType.(HPAIDiscoveryEndpoint); ok { + if casted, ok := structType.(HPAIDiscoveryEndpoint); ok { return casted } if casted, ok := structType.(*HPAIDiscoveryEndpoint); ok { @@ -108,11 +112,12 @@ func (m *_HPAIDiscoveryEndpoint) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += m.IpAddress.GetLengthInBits(ctx) // Simple field (ipPort) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_HPAIDiscoveryEndpoint) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -141,7 +146,7 @@ func HPAIDiscoveryEndpointParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("hostProtocolCode"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for hostProtocolCode") } - _hostProtocolCode, _hostProtocolCodeErr := HostProtocolCodeParseWithBuffer(ctx, readBuffer) +_hostProtocolCode, _hostProtocolCodeErr := HostProtocolCodeParseWithBuffer(ctx, readBuffer) if _hostProtocolCodeErr != nil { return nil, errors.Wrap(_hostProtocolCodeErr, "Error parsing 'hostProtocolCode' field of HPAIDiscoveryEndpoint") } @@ -154,7 +159,7 @@ func HPAIDiscoveryEndpointParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("ipAddress"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for ipAddress") } - _ipAddress, _ipAddressErr := IPAddressParseWithBuffer(ctx, readBuffer) +_ipAddress, _ipAddressErr := IPAddressParseWithBuffer(ctx, readBuffer) if _ipAddressErr != nil { return nil, errors.Wrap(_ipAddressErr, "Error parsing 'ipAddress' field of HPAIDiscoveryEndpoint") } @@ -164,7 +169,7 @@ func HPAIDiscoveryEndpointParseWithBuffer(ctx context.Context, readBuffer utils. } // Simple Field (ipPort) - _ipPort, _ipPortErr := readBuffer.ReadUint16("ipPort", 16) +_ipPort, _ipPortErr := readBuffer.ReadUint16("ipPort", 16) if _ipPortErr != nil { return nil, errors.Wrap(_ipPortErr, "Error parsing 'ipPort' field of HPAIDiscoveryEndpoint") } @@ -176,10 +181,10 @@ func HPAIDiscoveryEndpointParseWithBuffer(ctx context.Context, readBuffer utils. // Create the instance return &_HPAIDiscoveryEndpoint{ - HostProtocolCode: hostProtocolCode, - IpAddress: ipAddress, - IpPort: ipPort, - }, nil + HostProtocolCode: hostProtocolCode, + IpAddress: ipAddress, + IpPort: ipPort, + }, nil } func (m *_HPAIDiscoveryEndpoint) Serialize() ([]byte, error) { @@ -193,7 +198,7 @@ func (m *_HPAIDiscoveryEndpoint) Serialize() ([]byte, error) { func (m *_HPAIDiscoveryEndpoint) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("HPAIDiscoveryEndpoint"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("HPAIDiscoveryEndpoint"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for HPAIDiscoveryEndpoint") } @@ -241,6 +246,7 @@ func (m *_HPAIDiscoveryEndpoint) SerializeWithWriteBuffer(ctx context.Context, w return nil } + func (m *_HPAIDiscoveryEndpoint) isHPAIDiscoveryEndpoint() bool { return true } @@ -255,3 +261,6 @@ func (m *_HPAIDiscoveryEndpoint) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/HostProtocolCode.go b/plc4go/protocols/knxnetip/readwrite/model/HostProtocolCode.go index e782fa518c3..1461fa6c1ba 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/HostProtocolCode.go +++ b/plc4go/protocols/knxnetip/readwrite/model/HostProtocolCode.go @@ -34,7 +34,7 @@ type IHostProtocolCode interface { utils.Serializable } -const ( +const( HostProtocolCode_IPV4_UDP HostProtocolCode = 0x01 HostProtocolCode_IPV4_TCP HostProtocolCode = 0x02 ) @@ -43,7 +43,7 @@ var HostProtocolCodeValues []HostProtocolCode func init() { _ = errors.New - HostProtocolCodeValues = []HostProtocolCode{ + HostProtocolCodeValues = []HostProtocolCode { HostProtocolCode_IPV4_UDP, HostProtocolCode_IPV4_TCP, } @@ -51,10 +51,10 @@ func init() { func HostProtocolCodeByValue(value uint8) (enum HostProtocolCode, ok bool) { switch value { - case 0x01: - return HostProtocolCode_IPV4_UDP, true - case 0x02: - return HostProtocolCode_IPV4_TCP, true + case 0x01: + return HostProtocolCode_IPV4_UDP, true + case 0x02: + return HostProtocolCode_IPV4_TCP, true } return 0, false } @@ -69,13 +69,13 @@ func HostProtocolCodeByName(value string) (enum HostProtocolCode, ok bool) { return 0, false } -func HostProtocolCodeKnows(value uint8) bool { +func HostProtocolCodeKnows(value uint8) bool { for _, typeValue := range HostProtocolCodeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastHostProtocolCode(structType interface{}) HostProtocolCode { @@ -139,3 +139,4 @@ func (e HostProtocolCode) PLC4XEnumName() string { func (e HostProtocolCode) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/knxnetip/readwrite/model/IPAddress.go b/plc4go/protocols/knxnetip/readwrite/model/IPAddress.go index 4ceb8a8feb8..b078f350df3 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/IPAddress.go +++ b/plc4go/protocols/knxnetip/readwrite/model/IPAddress.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // IPAddress is the corresponding interface of IPAddress type IPAddress interface { @@ -44,9 +46,10 @@ type IPAddressExactly interface { // _IPAddress is the data-structure of this message type _IPAddress struct { - Addr []byte + Addr []byte } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -61,14 +64,15 @@ func (m *_IPAddress) GetAddr() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewIPAddress factory function for _IPAddress -func NewIPAddress(addr []byte) *_IPAddress { - return &_IPAddress{Addr: addr} +func NewIPAddress( addr []byte ) *_IPAddress { +return &_IPAddress{ Addr: addr } } // Deprecated: use the interface for direct cast func CastIPAddress(structType interface{}) IPAddress { - if casted, ok := structType.(IPAddress); ok { + if casted, ok := structType.(IPAddress); ok { return casted } if casted, ok := structType.(*IPAddress); ok { @@ -92,6 +96,7 @@ func (m *_IPAddress) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_IPAddress) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -121,8 +126,8 @@ func IPAddressParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) // Create the instance return &_IPAddress{ - Addr: addr, - }, nil + Addr: addr, + }, nil } func (m *_IPAddress) Serialize() ([]byte, error) { @@ -136,7 +141,7 @@ func (m *_IPAddress) Serialize() ([]byte, error) { func (m *_IPAddress) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("IPAddress"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("IPAddress"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for IPAddress") } @@ -152,6 +157,7 @@ func (m *_IPAddress) SerializeWithWriteBuffer(ctx context.Context, writeBuffer u return nil } + func (m *_IPAddress) isIPAddress() bool { return true } @@ -166,3 +172,6 @@ func (m *_IPAddress) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/KnxAddress.go b/plc4go/protocols/knxnetip/readwrite/model/KnxAddress.go index ca0c84869d5..72a879d351b 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/KnxAddress.go +++ b/plc4go/protocols/knxnetip/readwrite/model/KnxAddress.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // KnxAddress is the corresponding interface of KnxAddress type KnxAddress interface { @@ -48,11 +50,12 @@ type KnxAddressExactly interface { // _KnxAddress is the data-structure of this message type _KnxAddress struct { - MainGroup uint8 - MiddleGroup uint8 - SubGroup uint8 + MainGroup uint8 + MiddleGroup uint8 + SubGroup uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -75,14 +78,15 @@ func (m *_KnxAddress) GetSubGroup() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewKnxAddress factory function for _KnxAddress -func NewKnxAddress(mainGroup uint8, middleGroup uint8, subGroup uint8) *_KnxAddress { - return &_KnxAddress{MainGroup: mainGroup, MiddleGroup: middleGroup, SubGroup: subGroup} +func NewKnxAddress( mainGroup uint8 , middleGroup uint8 , subGroup uint8 ) *_KnxAddress { +return &_KnxAddress{ MainGroup: mainGroup , MiddleGroup: middleGroup , SubGroup: subGroup } } // Deprecated: use the interface for direct cast func CastKnxAddress(structType interface{}) KnxAddress { - if casted, ok := structType.(KnxAddress); ok { + if casted, ok := structType.(KnxAddress); ok { return casted } if casted, ok := structType.(*KnxAddress); ok { @@ -99,17 +103,18 @@ func (m *_KnxAddress) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (mainGroup) - lengthInBits += 4 + lengthInBits += 4; // Simple field (middleGroup) - lengthInBits += 4 + lengthInBits += 4; // Simple field (subGroup) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_KnxAddress) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -128,21 +133,21 @@ func KnxAddressParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) _ = currentPos // Simple Field (mainGroup) - _mainGroup, _mainGroupErr := readBuffer.ReadUint8("mainGroup", 4) +_mainGroup, _mainGroupErr := readBuffer.ReadUint8("mainGroup", 4) if _mainGroupErr != nil { return nil, errors.Wrap(_mainGroupErr, "Error parsing 'mainGroup' field of KnxAddress") } mainGroup := _mainGroup // Simple Field (middleGroup) - _middleGroup, _middleGroupErr := readBuffer.ReadUint8("middleGroup", 4) +_middleGroup, _middleGroupErr := readBuffer.ReadUint8("middleGroup", 4) if _middleGroupErr != nil { return nil, errors.Wrap(_middleGroupErr, "Error parsing 'middleGroup' field of KnxAddress") } middleGroup := _middleGroup // Simple Field (subGroup) - _subGroup, _subGroupErr := readBuffer.ReadUint8("subGroup", 8) +_subGroup, _subGroupErr := readBuffer.ReadUint8("subGroup", 8) if _subGroupErr != nil { return nil, errors.Wrap(_subGroupErr, "Error parsing 'subGroup' field of KnxAddress") } @@ -154,10 +159,10 @@ func KnxAddressParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) // Create the instance return &_KnxAddress{ - MainGroup: mainGroup, - MiddleGroup: middleGroup, - SubGroup: subGroup, - }, nil + MainGroup: mainGroup, + MiddleGroup: middleGroup, + SubGroup: subGroup, + }, nil } func (m *_KnxAddress) Serialize() ([]byte, error) { @@ -171,7 +176,7 @@ func (m *_KnxAddress) Serialize() ([]byte, error) { func (m *_KnxAddress) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("KnxAddress"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("KnxAddress"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for KnxAddress") } @@ -202,6 +207,7 @@ func (m *_KnxAddress) SerializeWithWriteBuffer(ctx context.Context, writeBuffer return nil } + func (m *_KnxAddress) isKnxAddress() bool { return true } @@ -216,3 +222,6 @@ func (m *_KnxAddress) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/KnxDatapoint.go b/plc4go/protocols/knxnetip/readwrite/model/KnxDatapoint.go index 5987c98400c..40569ed3f83 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/KnxDatapoint.go +++ b/plc4go/protocols/knxnetip/readwrite/model/KnxDatapoint.go @@ -19,16 +19,17 @@ package model + import ( "context" - api "github.com/apache/plc4x/plc4go/pkg/api/values" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/apache/plc4x/plc4go/spi/values" "github.com/pkg/errors" + api "github.com/apache/plc4x/plc4go/pkg/api/values" ) -// Code generated by code-generation. DO NOT EDIT. - + // Code generated by code-generation. DO NOT EDIT. + func KnxDatapointParse(ctx context.Context, theBytes []byte, datapointType KnxDatapointType) (api.PlcValue, error) { return KnxDatapointParseWithBuffer(ctx, utils.NewReadBufferByteBased(theBytes), datapointType) } @@ -36,7542 +37,7542 @@ func KnxDatapointParse(ctx context.Context, theBytes []byte, datapointType KnxDa func KnxDatapointParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, datapointType KnxDatapointType) (api.PlcValue, error) { readBuffer.PullContext("KnxDatapoint") switch { - case datapointType == KnxDatapointType_BOOL: // BOOL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadBit("value") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcBOOL(value), nil - case datapointType == KnxDatapointType_BYTE: // BYTE - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcBYTE(value), nil - case datapointType == KnxDatapointType_WORD: // WORD - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint16("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcWORD(value), nil - case datapointType == KnxDatapointType_DWORD: // DWORD - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcDWORD(value), nil - case datapointType == KnxDatapointType_LWORD: // LWORD - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint64("value", 64) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcLWORD(value), nil - case datapointType == KnxDatapointType_USINT: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_SINT: // SINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcSINT(value), nil - case datapointType == KnxDatapointType_UINT: // UINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint16("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUINT(value), nil - case datapointType == KnxDatapointType_INT: // INT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt16("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcINT(value), nil - case datapointType == KnxDatapointType_UDINT: // UDINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUDINT(value), nil - case datapointType == KnxDatapointType_DINT: // DINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcDINT(value), nil - case datapointType == KnxDatapointType_ULINT: // ULINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint64("value", 64) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcULINT(value), nil - case datapointType == KnxDatapointType_LINT: // LINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt64("value", 64) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcLINT(value), nil - case datapointType == KnxDatapointType_REAL: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_LREAL: // LREAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat64("value", 64) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcLREAL(value), nil - case datapointType == KnxDatapointType_CHAR: // CHAR - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadString("value", uint32(8), "UTF-8") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcCHAR(value), nil - case datapointType == KnxDatapointType_WCHAR: // WCHAR - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadString("value", uint32(16), "UTF-16") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcWCHAR(value), nil - case datapointType == KnxDatapointType_TIME: // TIME - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (milliseconds) - milliseconds, _millisecondsErr := readBuffer.ReadUint32("milliseconds", 32) - if _millisecondsErr != nil { - return nil, errors.Wrap(_millisecondsErr, "Error parsing 'milliseconds' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcTIMEFromMilliseconds(milliseconds), nil - case datapointType == KnxDatapointType_LTIME: // LTIME - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (nanoseconds) - nanoseconds, _nanosecondsErr := readBuffer.ReadUint64("nanoseconds", 64) - if _nanosecondsErr != nil { - return nil, errors.Wrap(_nanosecondsErr, "Error parsing 'nanoseconds' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcLTIMEFromNanoseconds(nanoseconds), nil - case datapointType == KnxDatapointType_DATE: // DATE - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (secondsSinceEpoch) - secondsSinceEpoch, _secondsSinceEpochErr := readBuffer.ReadUint32("secondsSinceEpoch", 32) - if _secondsSinceEpochErr != nil { - return nil, errors.Wrap(_secondsSinceEpochErr, "Error parsing 'secondsSinceEpoch' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcDATEFromSecondsSinceEpoch(uint32(secondsSinceEpoch)), nil - case datapointType == KnxDatapointType_TIME_OF_DAY: // TIME_OF_DAY - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (millisecondsSinceMidnight) - millisecondsSinceMidnight, _millisecondsSinceMidnightErr := readBuffer.ReadUint32("millisecondsSinceMidnight", 32) - if _millisecondsSinceMidnightErr != nil { - return nil, errors.Wrap(_millisecondsSinceMidnightErr, "Error parsing 'millisecondsSinceMidnight' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcTIME_OF_DAYFromMillisecondsSinceMidnight(millisecondsSinceMidnight), nil - case datapointType == KnxDatapointType_TOD: // TIME_OF_DAY - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (millisecondsSinceMidnight) - millisecondsSinceMidnight, _millisecondsSinceMidnightErr := readBuffer.ReadUint32("millisecondsSinceMidnight", 32) - if _millisecondsSinceMidnightErr != nil { - return nil, errors.Wrap(_millisecondsSinceMidnightErr, "Error parsing 'millisecondsSinceMidnight' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcTIME_OF_DAYFromMillisecondsSinceMidnight(millisecondsSinceMidnight), nil - case datapointType == KnxDatapointType_DATE_AND_TIME: // DATE_AND_TIME - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (year) - year, _yearErr := readBuffer.ReadUint16("year", 16) - if _yearErr != nil { - return nil, errors.Wrap(_yearErr, "Error parsing 'year' field") - } - - // Simple Field (month) - month, _monthErr := readBuffer.ReadUint8("month", 8) - if _monthErr != nil { - return nil, errors.Wrap(_monthErr, "Error parsing 'month' field") - } - - // Simple Field (day) - day, _dayErr := readBuffer.ReadUint8("day", 8) - if _dayErr != nil { - return nil, errors.Wrap(_dayErr, "Error parsing 'day' field") - } - - // Simple Field (dayOfWeek) - _, _dayOfWeekErr := readBuffer.ReadUint8("dayOfWeek", 8) - if _dayOfWeekErr != nil { - return nil, errors.Wrap(_dayOfWeekErr, "Error parsing 'dayOfWeek' field") - } - - // Simple Field (hour) - hour, _hourErr := readBuffer.ReadUint8("hour", 8) - if _hourErr != nil { - return nil, errors.Wrap(_hourErr, "Error parsing 'hour' field") - } - - // Simple Field (minutes) - minutes, _minutesErr := readBuffer.ReadUint8("minutes", 8) - if _minutesErr != nil { - return nil, errors.Wrap(_minutesErr, "Error parsing 'minutes' field") - } - - // Simple Field (seconds) - seconds, _secondsErr := readBuffer.ReadUint8("seconds", 8) - if _secondsErr != nil { - return nil, errors.Wrap(_secondsErr, "Error parsing 'seconds' field") - } - - // Simple Field (nanoseconds) - nanoseconds, _nanosecondsErr := readBuffer.ReadUint32("nanoseconds", 32) - if _nanosecondsErr != nil { - return nil, errors.Wrap(_nanosecondsErr, "Error parsing 'nanoseconds' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcDATA_AND_TIMEFromSegments(uint32(year), uint32(month), uint32(day), uint32(hour), uint32(minutes), uint32(seconds), uint32(nanoseconds)), nil - case datapointType == KnxDatapointType_DT: // DATE_AND_TIME - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (year) - year, _yearErr := readBuffer.ReadUint16("year", 16) - if _yearErr != nil { - return nil, errors.Wrap(_yearErr, "Error parsing 'year' field") - } - - // Simple Field (month) - month, _monthErr := readBuffer.ReadUint8("month", 8) - if _monthErr != nil { - return nil, errors.Wrap(_monthErr, "Error parsing 'month' field") - } - - // Simple Field (day) - day, _dayErr := readBuffer.ReadUint8("day", 8) - if _dayErr != nil { - return nil, errors.Wrap(_dayErr, "Error parsing 'day' field") - } - - // Simple Field (dayOfWeek) - _, _dayOfWeekErr := readBuffer.ReadUint8("dayOfWeek", 8) - if _dayOfWeekErr != nil { - return nil, errors.Wrap(_dayOfWeekErr, "Error parsing 'dayOfWeek' field") - } - - // Simple Field (hour) - hour, _hourErr := readBuffer.ReadUint8("hour", 8) - if _hourErr != nil { - return nil, errors.Wrap(_hourErr, "Error parsing 'hour' field") - } - - // Simple Field (minutes) - minutes, _minutesErr := readBuffer.ReadUint8("minutes", 8) - if _minutesErr != nil { - return nil, errors.Wrap(_minutesErr, "Error parsing 'minutes' field") - } - - // Simple Field (seconds) - seconds, _secondsErr := readBuffer.ReadUint8("seconds", 8) - if _secondsErr != nil { - return nil, errors.Wrap(_secondsErr, "Error parsing 'seconds' field") - } - - // Simple Field (nanoseconds) - nanoseconds, _nanosecondsErr := readBuffer.ReadUint32("nanoseconds", 32) - if _nanosecondsErr != nil { - return nil, errors.Wrap(_nanosecondsErr, "Error parsing 'nanoseconds' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcDATA_AND_TIMEFromSegments(uint32(year), uint32(month), uint32(day), uint32(hour), uint32(minutes), uint32(seconds), uint32(nanoseconds)), nil - case datapointType == KnxDatapointType_DPT_Switch: // BOOL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadBit("value") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcBOOL(value), nil - case datapointType == KnxDatapointType_DPT_Bool: // BOOL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadBit("value") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcBOOL(value), nil - case datapointType == KnxDatapointType_DPT_Enable: // BOOL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadBit("value") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcBOOL(value), nil - case datapointType == KnxDatapointType_DPT_Ramp: // BOOL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadBit("value") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcBOOL(value), nil - case datapointType == KnxDatapointType_DPT_Alarm: // BOOL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadBit("value") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcBOOL(value), nil - case datapointType == KnxDatapointType_DPT_BinaryValue: // BOOL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadBit("value") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcBOOL(value), nil - case datapointType == KnxDatapointType_DPT_Step: // BOOL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadBit("value") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcBOOL(value), nil - case datapointType == KnxDatapointType_DPT_UpDown: // BOOL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadBit("value") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcBOOL(value), nil - case datapointType == KnxDatapointType_DPT_OpenClose: // BOOL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadBit("value") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcBOOL(value), nil - case datapointType == KnxDatapointType_DPT_Start: // BOOL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadBit("value") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcBOOL(value), nil - case datapointType == KnxDatapointType_DPT_State: // BOOL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadBit("value") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcBOOL(value), nil - case datapointType == KnxDatapointType_DPT_Invert: // BOOL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadBit("value") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcBOOL(value), nil - case datapointType == KnxDatapointType_DPT_DimSendStyle: // BOOL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadBit("value") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcBOOL(value), nil - case datapointType == KnxDatapointType_DPT_InputSource: // BOOL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadBit("value") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcBOOL(value), nil - case datapointType == KnxDatapointType_DPT_Reset: // BOOL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadBit("value") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcBOOL(value), nil - case datapointType == KnxDatapointType_DPT_Ack: // BOOL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadBit("value") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcBOOL(value), nil - case datapointType == KnxDatapointType_DPT_Trigger: // BOOL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadBit("value") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcBOOL(value), nil - case datapointType == KnxDatapointType_DPT_Occupancy: // BOOL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadBit("value") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcBOOL(value), nil - case datapointType == KnxDatapointType_DPT_Window_Door: // BOOL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadBit("value") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcBOOL(value), nil - case datapointType == KnxDatapointType_DPT_LogicalFunction: // BOOL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadBit("value") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcBOOL(value), nil - case datapointType == KnxDatapointType_DPT_Scene_AB: // BOOL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadBit("value") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcBOOL(value), nil - case datapointType == KnxDatapointType_DPT_ShutterBlinds_Mode: // BOOL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadBit("value") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcBOOL(value), nil - case datapointType == KnxDatapointType_DPT_DayNight: // BOOL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadBit("value") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcBOOL(value), nil - case datapointType == KnxDatapointType_DPT_Heat_Cool: // BOOL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadBit("value") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcBOOL(value), nil - case datapointType == KnxDatapointType_DPT_Switch_Control: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 6); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (control) - control, _controlErr := readBuffer.ReadBit("control") - if _controlErr != nil { - return nil, errors.Wrap(_controlErr, "Error parsing 'control' field") - } - _map["Struct"] = values.NewPlcBOOL(control) - - // Simple Field (on) - on, _onErr := readBuffer.ReadBit("on") - if _onErr != nil { - return nil, errors.Wrap(_onErr, "Error parsing 'on' field") - } - _map["Struct"] = values.NewPlcBOOL(on) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_Bool_Control: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 6); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (control) - control, _controlErr := readBuffer.ReadBit("control") - if _controlErr != nil { - return nil, errors.Wrap(_controlErr, "Error parsing 'control' field") - } - _map["Struct"] = values.NewPlcBOOL(control) - - // Simple Field (valueTrue) - valueTrue, _valueTrueErr := readBuffer.ReadBit("valueTrue") - if _valueTrueErr != nil { - return nil, errors.Wrap(_valueTrueErr, "Error parsing 'valueTrue' field") - } - _map["Struct"] = values.NewPlcBOOL(valueTrue) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_Enable_Control: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 6); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (control) - control, _controlErr := readBuffer.ReadBit("control") - if _controlErr != nil { - return nil, errors.Wrap(_controlErr, "Error parsing 'control' field") - } - _map["Struct"] = values.NewPlcBOOL(control) - - // Simple Field (enable) - enable, _enableErr := readBuffer.ReadBit("enable") - if _enableErr != nil { - return nil, errors.Wrap(_enableErr, "Error parsing 'enable' field") - } - _map["Struct"] = values.NewPlcBOOL(enable) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_Ramp_Control: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 6); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (control) - control, _controlErr := readBuffer.ReadBit("control") - if _controlErr != nil { - return nil, errors.Wrap(_controlErr, "Error parsing 'control' field") - } - _map["Struct"] = values.NewPlcBOOL(control) - - // Simple Field (ramp) - ramp, _rampErr := readBuffer.ReadBit("ramp") - if _rampErr != nil { - return nil, errors.Wrap(_rampErr, "Error parsing 'ramp' field") - } - _map["Struct"] = values.NewPlcBOOL(ramp) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_Alarm_Control: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 6); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (control) - control, _controlErr := readBuffer.ReadBit("control") - if _controlErr != nil { - return nil, errors.Wrap(_controlErr, "Error parsing 'control' field") - } - _map["Struct"] = values.NewPlcBOOL(control) - - // Simple Field (alarm) - alarm, _alarmErr := readBuffer.ReadBit("alarm") - if _alarmErr != nil { - return nil, errors.Wrap(_alarmErr, "Error parsing 'alarm' field") - } - _map["Struct"] = values.NewPlcBOOL(alarm) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_BinaryValue_Control: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 6); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (control) - control, _controlErr := readBuffer.ReadBit("control") - if _controlErr != nil { - return nil, errors.Wrap(_controlErr, "Error parsing 'control' field") - } - _map["Struct"] = values.NewPlcBOOL(control) - - // Simple Field (high) - high, _highErr := readBuffer.ReadBit("high") - if _highErr != nil { - return nil, errors.Wrap(_highErr, "Error parsing 'high' field") - } - _map["Struct"] = values.NewPlcBOOL(high) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_Step_Control: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 6); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (control) - control, _controlErr := readBuffer.ReadBit("control") - if _controlErr != nil { - return nil, errors.Wrap(_controlErr, "Error parsing 'control' field") - } - _map["Struct"] = values.NewPlcBOOL(control) - - // Simple Field (increase) - increase, _increaseErr := readBuffer.ReadBit("increase") - if _increaseErr != nil { - return nil, errors.Wrap(_increaseErr, "Error parsing 'increase' field") - } - _map["Struct"] = values.NewPlcBOOL(increase) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_Direction1_Control: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 6); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (control) - control, _controlErr := readBuffer.ReadBit("control") - if _controlErr != nil { - return nil, errors.Wrap(_controlErr, "Error parsing 'control' field") - } - _map["Struct"] = values.NewPlcBOOL(control) - - // Simple Field (down) - down, _downErr := readBuffer.ReadBit("down") - if _downErr != nil { - return nil, errors.Wrap(_downErr, "Error parsing 'down' field") - } - _map["Struct"] = values.NewPlcBOOL(down) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_Direction2_Control: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 6); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (control) - control, _controlErr := readBuffer.ReadBit("control") - if _controlErr != nil { - return nil, errors.Wrap(_controlErr, "Error parsing 'control' field") - } - _map["Struct"] = values.NewPlcBOOL(control) - - // Simple Field (close) - close, _closeErr := readBuffer.ReadBit("close") - if _closeErr != nil { - return nil, errors.Wrap(_closeErr, "Error parsing 'close' field") - } - _map["Struct"] = values.NewPlcBOOL(close) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_Start_Control: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 6); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (control) - control, _controlErr := readBuffer.ReadBit("control") - if _controlErr != nil { - return nil, errors.Wrap(_controlErr, "Error parsing 'control' field") - } - _map["Struct"] = values.NewPlcBOOL(control) - - // Simple Field (start) - start, _startErr := readBuffer.ReadBit("start") - if _startErr != nil { - return nil, errors.Wrap(_startErr, "Error parsing 'start' field") - } - _map["Struct"] = values.NewPlcBOOL(start) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_State_Control: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 6); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (control) - control, _controlErr := readBuffer.ReadBit("control") - if _controlErr != nil { - return nil, errors.Wrap(_controlErr, "Error parsing 'control' field") - } - _map["Struct"] = values.NewPlcBOOL(control) - - // Simple Field (active) - active, _activeErr := readBuffer.ReadBit("active") - if _activeErr != nil { - return nil, errors.Wrap(_activeErr, "Error parsing 'active' field") - } - _map["Struct"] = values.NewPlcBOOL(active) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_Invert_Control: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 6); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (control) - control, _controlErr := readBuffer.ReadBit("control") - if _controlErr != nil { - return nil, errors.Wrap(_controlErr, "Error parsing 'control' field") - } - _map["Struct"] = values.NewPlcBOOL(control) - - // Simple Field (inverted) - inverted, _invertedErr := readBuffer.ReadBit("inverted") - if _invertedErr != nil { - return nil, errors.Wrap(_invertedErr, "Error parsing 'inverted' field") - } - _map["Struct"] = values.NewPlcBOOL(inverted) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_Control_Dimming: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (increase) - increase, _increaseErr := readBuffer.ReadBit("increase") - if _increaseErr != nil { - return nil, errors.Wrap(_increaseErr, "Error parsing 'increase' field") - } - _map["Struct"] = values.NewPlcBOOL(increase) - - // Simple Field (stepcode) - stepcode, _stepcodeErr := readBuffer.ReadUint8("stepcode", 3) - if _stepcodeErr != nil { - return nil, errors.Wrap(_stepcodeErr, "Error parsing 'stepcode' field") - } - _map["Struct"] = values.NewPlcUSINT(stepcode) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_Control_Blinds: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (down) - down, _downErr := readBuffer.ReadBit("down") - if _downErr != nil { - return nil, errors.Wrap(_downErr, "Error parsing 'down' field") - } - _map["Struct"] = values.NewPlcBOOL(down) - - // Simple Field (stepcode) - stepcode, _stepcodeErr := readBuffer.ReadUint8("stepcode", 3) - if _stepcodeErr != nil { - return nil, errors.Wrap(_stepcodeErr, "Error parsing 'stepcode' field") - } - _map["Struct"] = values.NewPlcUSINT(stepcode) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_Char_ASCII: // STRING - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadString("value", uint32(8), "ASCII") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcSTRING(value), nil - case datapointType == KnxDatapointType_DPT_Char_8859_1: // STRING - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadString("value", uint32(8), "ISO-8859-1") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcSTRING(value), nil - case datapointType == KnxDatapointType_DPT_Scaling: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_Angle: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_Percent_U8: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_DecimalFactor: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_Tariff: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_Value_1_Ucount: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_FanStage: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_Percent_V8: // SINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcSINT(value), nil - case datapointType == KnxDatapointType_DPT_Value_1_Count: // SINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcSINT(value), nil - case datapointType == KnxDatapointType_DPT_Status_Mode3: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (statusA) - statusA, _statusAErr := readBuffer.ReadBit("statusA") - if _statusAErr != nil { - return nil, errors.Wrap(_statusAErr, "Error parsing 'statusA' field") - } - _map["Struct"] = values.NewPlcBOOL(statusA) - - // Simple Field (statusB) - statusB, _statusBErr := readBuffer.ReadBit("statusB") - if _statusBErr != nil { - return nil, errors.Wrap(_statusBErr, "Error parsing 'statusB' field") - } - _map["Struct"] = values.NewPlcBOOL(statusB) - - // Simple Field (statusC) - statusC, _statusCErr := readBuffer.ReadBit("statusC") - if _statusCErr != nil { - return nil, errors.Wrap(_statusCErr, "Error parsing 'statusC' field") - } - _map["Struct"] = values.NewPlcBOOL(statusC) - - // Simple Field (statusD) - statusD, _statusDErr := readBuffer.ReadBit("statusD") - if _statusDErr != nil { - return nil, errors.Wrap(_statusDErr, "Error parsing 'statusD' field") - } - _map["Struct"] = values.NewPlcBOOL(statusD) - - // Simple Field (statusE) - statusE, _statusEErr := readBuffer.ReadBit("statusE") - if _statusEErr != nil { - return nil, errors.Wrap(_statusEErr, "Error parsing 'statusE' field") - } - _map["Struct"] = values.NewPlcBOOL(statusE) - - // Simple Field (mode) - mode, _modeErr := readBuffer.ReadUint8("mode", 3) - if _modeErr != nil { - return nil, errors.Wrap(_modeErr, "Error parsing 'mode' field") - } - _map["Struct"] = values.NewPlcUSINT(mode) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_Value_2_Ucount: // UINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint16("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUINT(value), nil - case datapointType == KnxDatapointType_DPT_TimePeriodMsec: // UINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint16("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUINT(value), nil - case datapointType == KnxDatapointType_DPT_TimePeriod10Msec: // UINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint16("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUINT(value), nil - case datapointType == KnxDatapointType_DPT_TimePeriod100Msec: // UINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint16("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUINT(value), nil - case datapointType == KnxDatapointType_DPT_TimePeriodSec: // UINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint16("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUINT(value), nil - case datapointType == KnxDatapointType_DPT_TimePeriodMin: // UINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint16("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUINT(value), nil - case datapointType == KnxDatapointType_DPT_TimePeriodHrs: // UINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint16("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUINT(value), nil - case datapointType == KnxDatapointType_DPT_PropDataType: // UINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint16("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUINT(value), nil - case datapointType == KnxDatapointType_DPT_Length_mm: // UINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint16("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUINT(value), nil - case datapointType == KnxDatapointType_DPT_UElCurrentmA: // UINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint16("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUINT(value), nil - case datapointType == KnxDatapointType_DPT_Brightness: // UINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint16("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUINT(value), nil - case datapointType == KnxDatapointType_DPT_Absolute_Colour_Temperature: // UINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint16("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUINT(value), nil - case datapointType == KnxDatapointType_DPT_Value_2_Count: // INT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt16("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcINT(value), nil - case datapointType == KnxDatapointType_DPT_DeltaTimeMsec: // INT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt16("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcINT(value), nil - case datapointType == KnxDatapointType_DPT_DeltaTime10Msec: // INT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt16("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcINT(value), nil - case datapointType == KnxDatapointType_DPT_DeltaTime100Msec: // INT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt16("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcINT(value), nil - case datapointType == KnxDatapointType_DPT_DeltaTimeSec: // INT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt16("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcINT(value), nil - case datapointType == KnxDatapointType_DPT_DeltaTimeMin: // INT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt16("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcINT(value), nil - case datapointType == KnxDatapointType_DPT_DeltaTimeHrs: // INT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt16("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcINT(value), nil - case datapointType == KnxDatapointType_DPT_Percent_V16: // INT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt16("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcINT(value), nil - case datapointType == KnxDatapointType_DPT_Rotation_Angle: // INT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt16("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcINT(value), nil - case datapointType == KnxDatapointType_DPT_Length_m: // INT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt16("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcINT(value), nil - case datapointType == KnxDatapointType_DPT_Value_Temp: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Tempd: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Tempa: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Lux: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Wsp: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Pres: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Humidity: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_AirQuality: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_AirFlow: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Time1: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Time2: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Volt: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Curr: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_PowerDensity: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_KelvinPerPercent: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Power: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Volume_Flow: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Rain_Amount: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Temp_F: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Wsp_kmh: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Absolute_Humidity: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Concentration_ygm3: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_TimeOfDay: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (day) - day, _dayErr := readBuffer.ReadUint8("day", 3) - if _dayErr != nil { - return nil, errors.Wrap(_dayErr, "Error parsing 'day' field") - } - _map["Struct"] = values.NewPlcUSINT(day) - - // Simple Field (hour) - hour, _hourErr := readBuffer.ReadUint8("hour", 5) - if _hourErr != nil { - return nil, errors.Wrap(_hourErr, "Error parsing 'hour' field") - } - _map["Struct"] = values.NewPlcUSINT(hour) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 2); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (minutes) - minutes, _minutesErr := readBuffer.ReadUint8("minutes", 6) - if _minutesErr != nil { - return nil, errors.Wrap(_minutesErr, "Error parsing 'minutes' field") - } - _map["Struct"] = values.NewPlcUSINT(minutes) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 2); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (seconds) - seconds, _secondsErr := readBuffer.ReadUint8("seconds", 6) - if _secondsErr != nil { - return nil, errors.Wrap(_secondsErr, "Error parsing 'seconds' field") - } - _map["Struct"] = values.NewPlcUSINT(seconds) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_Date: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 3); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (dayOfMonth) - dayOfMonth, _dayOfMonthErr := readBuffer.ReadUint8("dayOfMonth", 5) - if _dayOfMonthErr != nil { - return nil, errors.Wrap(_dayOfMonthErr, "Error parsing 'dayOfMonth' field") - } - _map["Struct"] = values.NewPlcUSINT(dayOfMonth) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (month) - month, _monthErr := readBuffer.ReadUint8("month", 4) - if _monthErr != nil { - return nil, errors.Wrap(_monthErr, "Error parsing 'month' field") - } - _map["Struct"] = values.NewPlcUSINT(month) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 1); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (year) - year, _yearErr := readBuffer.ReadUint8("year", 7) - if _yearErr != nil { - return nil, errors.Wrap(_yearErr, "Error parsing 'year' field") - } - _map["Struct"] = values.NewPlcUSINT(year) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_Value_4_Ucount: // UDINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUDINT(value), nil - case datapointType == KnxDatapointType_DPT_LongTimePeriod_Sec: // UDINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUDINT(value), nil - case datapointType == KnxDatapointType_DPT_LongTimePeriod_Min: // UDINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUDINT(value), nil - case datapointType == KnxDatapointType_DPT_LongTimePeriod_Hrs: // UDINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUDINT(value), nil - case datapointType == KnxDatapointType_DPT_VolumeLiquid_Litre: // UDINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUDINT(value), nil - case datapointType == KnxDatapointType_DPT_Volume_m_3: // UDINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUDINT(value), nil - case datapointType == KnxDatapointType_DPT_Value_4_Count: // DINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcDINT(value), nil - case datapointType == KnxDatapointType_DPT_FlowRate_m3h: // DINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcDINT(value), nil - case datapointType == KnxDatapointType_DPT_ActiveEnergy: // DINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcDINT(value), nil - case datapointType == KnxDatapointType_DPT_ApparantEnergy: // DINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcDINT(value), nil - case datapointType == KnxDatapointType_DPT_ReactiveEnergy: // DINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcDINT(value), nil - case datapointType == KnxDatapointType_DPT_ActiveEnergy_kWh: // DINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcDINT(value), nil - case datapointType == KnxDatapointType_DPT_ApparantEnergy_kVAh: // DINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcDINT(value), nil - case datapointType == KnxDatapointType_DPT_ReactiveEnergy_kVARh: // DINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcDINT(value), nil - case datapointType == KnxDatapointType_DPT_ActiveEnergy_MWh: // DINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcDINT(value), nil - case datapointType == KnxDatapointType_DPT_LongDeltaTimeSec: // DINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcDINT(value), nil - case datapointType == KnxDatapointType_DPT_DeltaVolumeLiquid_Litre: // DINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcDINT(value), nil - case datapointType == KnxDatapointType_DPT_DeltaVolume_m_3: // DINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcDINT(value), nil - case datapointType == KnxDatapointType_DPT_Value_Acceleration: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Acceleration_Angular: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Activation_Energy: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Activity: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Mol: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Amplitude: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_AngleRad: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_AngleDeg: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Angular_Momentum: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Angular_Velocity: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Area: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Capacitance: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Charge_DensitySurface: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Charge_DensityVolume: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Compressibility: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Conductance: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Electrical_Conductivity: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Density: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Electric_Charge: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Electric_Current: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Electric_CurrentDensity: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Electric_DipoleMoment: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Electric_Displacement: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Electric_FieldStrength: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Electric_Flux: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Electric_FluxDensity: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Electric_Polarization: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Electric_Potential: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Electric_PotentialDifference: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_ElectromagneticMoment: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Electromotive_Force: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Energy: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Force: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Frequency: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Angular_Frequency: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Heat_Capacity: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Heat_FlowRate: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Heat_Quantity: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Impedance: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Length: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Light_Quantity: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Luminance: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Luminous_Flux: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Luminous_Intensity: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Magnetic_FieldStrength: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Magnetic_Flux: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Magnetic_FluxDensity: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Magnetic_Moment: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Magnetic_Polarization: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Magnetization: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_MagnetomotiveForce: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Mass: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_MassFlux: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Momentum: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Phase_AngleRad: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Phase_AngleDeg: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Power: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Power_Factor: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Pressure: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Reactance: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Resistance: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Resistivity: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_SelfInductance: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_SolidAngle: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Sound_Intensity: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Speed: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Stress: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Surface_Tension: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Common_Temperature: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Absolute_Temperature: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_TemperatureDifference: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Thermal_Capacity: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Thermal_Conductivity: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_ThermoelectricPower: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Time: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Torque: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Volume: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Volume_Flux: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Weight: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_Work: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Value_ApparentPower: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Volume_Flux_Meter: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Volume_Flux_ls: // REAL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcREAL(value), nil - case datapointType == KnxDatapointType_DPT_Access_Data: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (hurz) - hurz, _hurzErr := readBuffer.ReadUint8("hurz", 4) - if _hurzErr != nil { - return nil, errors.Wrap(_hurzErr, "Error parsing 'hurz' field") - } - _map["Struct"] = values.NewPlcUSINT(hurz) - - // Simple Field (value1) - value1, _value1Err := readBuffer.ReadUint8("value1", 4) - if _value1Err != nil { - return nil, errors.Wrap(_value1Err, "Error parsing 'value1' field") - } - _map["Struct"] = values.NewPlcUSINT(value1) - - // Simple Field (value2) - value2, _value2Err := readBuffer.ReadUint8("value2", 4) - if _value2Err != nil { - return nil, errors.Wrap(_value2Err, "Error parsing 'value2' field") - } - _map["Struct"] = values.NewPlcUSINT(value2) - - // Simple Field (value3) - value3, _value3Err := readBuffer.ReadUint8("value3", 4) - if _value3Err != nil { - return nil, errors.Wrap(_value3Err, "Error parsing 'value3' field") - } - _map["Struct"] = values.NewPlcUSINT(value3) - - // Simple Field (value4) - value4, _value4Err := readBuffer.ReadUint8("value4", 4) - if _value4Err != nil { - return nil, errors.Wrap(_value4Err, "Error parsing 'value4' field") - } - _map["Struct"] = values.NewPlcUSINT(value4) - - // Simple Field (value5) - value5, _value5Err := readBuffer.ReadUint8("value5", 4) - if _value5Err != nil { - return nil, errors.Wrap(_value5Err, "Error parsing 'value5' field") - } - _map["Struct"] = values.NewPlcUSINT(value5) - - // Simple Field (detectionError) - detectionError, _detectionErrorErr := readBuffer.ReadBit("detectionError") - if _detectionErrorErr != nil { - return nil, errors.Wrap(_detectionErrorErr, "Error parsing 'detectionError' field") - } - _map["Struct"] = values.NewPlcBOOL(detectionError) - - // Simple Field (permission) - permission, _permissionErr := readBuffer.ReadBit("permission") - if _permissionErr != nil { - return nil, errors.Wrap(_permissionErr, "Error parsing 'permission' field") - } - _map["Struct"] = values.NewPlcBOOL(permission) - - // Simple Field (readDirection) - readDirection, _readDirectionErr := readBuffer.ReadBit("readDirection") - if _readDirectionErr != nil { - return nil, errors.Wrap(_readDirectionErr, "Error parsing 'readDirection' field") - } - _map["Struct"] = values.NewPlcBOOL(readDirection) - - // Simple Field (encryptionOfAccessInformation) - encryptionOfAccessInformation, _encryptionOfAccessInformationErr := readBuffer.ReadBit("encryptionOfAccessInformation") - if _encryptionOfAccessInformationErr != nil { - return nil, errors.Wrap(_encryptionOfAccessInformationErr, "Error parsing 'encryptionOfAccessInformation' field") - } - _map["Struct"] = values.NewPlcBOOL(encryptionOfAccessInformation) - - // Simple Field (indexOfAccessIdentificationCode) - indexOfAccessIdentificationCode, _indexOfAccessIdentificationCodeErr := readBuffer.ReadUint8("indexOfAccessIdentificationCode", 4) - if _indexOfAccessIdentificationCodeErr != nil { - return nil, errors.Wrap(_indexOfAccessIdentificationCodeErr, "Error parsing 'indexOfAccessIdentificationCode' field") - } - _map["Struct"] = values.NewPlcUSINT(indexOfAccessIdentificationCode) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_String_ASCII: // STRING - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadString("value", uint32(112), "ASCII") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcSTRING(value), nil - case datapointType == KnxDatapointType_DPT_String_8859_1: // STRING - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadString("value", uint32(112), "ISO-8859-1") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcSTRING(value), nil - case datapointType == KnxDatapointType_DPT_SceneNumber: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 2); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 6) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_SceneControl: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (learnTheSceneCorrespondingToTheFieldSceneNumber) - learnTheSceneCorrespondingToTheFieldSceneNumber, _learnTheSceneCorrespondingToTheFieldSceneNumberErr := readBuffer.ReadBit("learnTheSceneCorrespondingToTheFieldSceneNumber") - if _learnTheSceneCorrespondingToTheFieldSceneNumberErr != nil { - return nil, errors.Wrap(_learnTheSceneCorrespondingToTheFieldSceneNumberErr, "Error parsing 'learnTheSceneCorrespondingToTheFieldSceneNumber' field") - } - _map["Struct"] = values.NewPlcBOOL(learnTheSceneCorrespondingToTheFieldSceneNumber) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 1); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (sceneNumber) - sceneNumber, _sceneNumberErr := readBuffer.ReadUint8("sceneNumber", 6) - if _sceneNumberErr != nil { - return nil, errors.Wrap(_sceneNumberErr, "Error parsing 'sceneNumber' field") - } - _map["Struct"] = values.NewPlcUSINT(sceneNumber) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_DateTime: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (year) - year, _yearErr := readBuffer.ReadUint8("year", 8) - if _yearErr != nil { - return nil, errors.Wrap(_yearErr, "Error parsing 'year' field") - } - _map["Struct"] = values.NewPlcUSINT(year) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (month) - month, _monthErr := readBuffer.ReadUint8("month", 4) - if _monthErr != nil { - return nil, errors.Wrap(_monthErr, "Error parsing 'month' field") - } - _map["Struct"] = values.NewPlcUSINT(month) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 3); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (dayofmonth) - dayofmonth, _dayofmonthErr := readBuffer.ReadUint8("dayofmonth", 5) - if _dayofmonthErr != nil { - return nil, errors.Wrap(_dayofmonthErr, "Error parsing 'dayofmonth' field") - } - _map["Struct"] = values.NewPlcUSINT(dayofmonth) - - // Simple Field (dayofweek) - dayofweek, _dayofweekErr := readBuffer.ReadUint8("dayofweek", 3) - if _dayofweekErr != nil { - return nil, errors.Wrap(_dayofweekErr, "Error parsing 'dayofweek' field") - } - _map["Struct"] = values.NewPlcUSINT(dayofweek) - - // Simple Field (hourofday) - hourofday, _hourofdayErr := readBuffer.ReadUint8("hourofday", 5) - if _hourofdayErr != nil { - return nil, errors.Wrap(_hourofdayErr, "Error parsing 'hourofday' field") - } - _map["Struct"] = values.NewPlcUSINT(hourofday) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 2); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (minutes) - minutes, _minutesErr := readBuffer.ReadUint8("minutes", 6) - if _minutesErr != nil { - return nil, errors.Wrap(_minutesErr, "Error parsing 'minutes' field") - } - _map["Struct"] = values.NewPlcUSINT(minutes) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 2); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (seconds) - seconds, _secondsErr := readBuffer.ReadUint8("seconds", 6) - if _secondsErr != nil { - return nil, errors.Wrap(_secondsErr, "Error parsing 'seconds' field") - } - _map["Struct"] = values.NewPlcUSINT(seconds) - - // Simple Field (fault) - fault, _faultErr := readBuffer.ReadBit("fault") - if _faultErr != nil { - return nil, errors.Wrap(_faultErr, "Error parsing 'fault' field") - } - _map["Struct"] = values.NewPlcBOOL(fault) - - // Simple Field (workingDay) - workingDay, _workingDayErr := readBuffer.ReadBit("workingDay") - if _workingDayErr != nil { - return nil, errors.Wrap(_workingDayErr, "Error parsing 'workingDay' field") - } - _map["Struct"] = values.NewPlcBOOL(workingDay) - - // Simple Field (noWd) - noWd, _noWdErr := readBuffer.ReadBit("noWd") - if _noWdErr != nil { - return nil, errors.Wrap(_noWdErr, "Error parsing 'noWd' field") - } - _map["Struct"] = values.NewPlcBOOL(noWd) - - // Simple Field (noYear) - noYear, _noYearErr := readBuffer.ReadBit("noYear") - if _noYearErr != nil { - return nil, errors.Wrap(_noYearErr, "Error parsing 'noYear' field") - } - _map["Struct"] = values.NewPlcBOOL(noYear) - - // Simple Field (noDate) - noDate, _noDateErr := readBuffer.ReadBit("noDate") - if _noDateErr != nil { - return nil, errors.Wrap(_noDateErr, "Error parsing 'noDate' field") - } - _map["Struct"] = values.NewPlcBOOL(noDate) - - // Simple Field (noDayOfWeek) - noDayOfWeek, _noDayOfWeekErr := readBuffer.ReadBit("noDayOfWeek") - if _noDayOfWeekErr != nil { - return nil, errors.Wrap(_noDayOfWeekErr, "Error parsing 'noDayOfWeek' field") - } - _map["Struct"] = values.NewPlcBOOL(noDayOfWeek) - - // Simple Field (noTime) - noTime, _noTimeErr := readBuffer.ReadBit("noTime") - if _noTimeErr != nil { - return nil, errors.Wrap(_noTimeErr, "Error parsing 'noTime' field") - } - _map["Struct"] = values.NewPlcBOOL(noTime) - - // Simple Field (standardSummerTime) - standardSummerTime, _standardSummerTimeErr := readBuffer.ReadBit("standardSummerTime") - if _standardSummerTimeErr != nil { - return nil, errors.Wrap(_standardSummerTimeErr, "Error parsing 'standardSummerTime' field") - } - _map["Struct"] = values.NewPlcBOOL(standardSummerTime) - - // Simple Field (qualityOfClock) - qualityOfClock, _qualityOfClockErr := readBuffer.ReadBit("qualityOfClock") - if _qualityOfClockErr != nil { - return nil, errors.Wrap(_qualityOfClockErr, "Error parsing 'qualityOfClock' field") - } - _map["Struct"] = values.NewPlcBOOL(qualityOfClock) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_SCLOMode: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_BuildingMode: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_OccMode: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_Priority: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_LightApplicationMode: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_ApplicationArea: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_AlarmClassType: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_PSUMode: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_ErrorClass_System: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_ErrorClass_HVAC: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_Time_Delay: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_Beaufort_Wind_Force_Scale: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_SensorSelect: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_ActuatorConnectType: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_Cloud_Cover: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_PowerReturnMode: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_FuelType: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_BurnerType: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_HVACMode: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_DHWMode: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_LoadPriority: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_HVACContrMode: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_HVACEmergMode: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_ChangeoverMode: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_ValveMode: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_DamperMode: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_HeaterMode: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_FanMode: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_MasterSlaveMode: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_StatusRoomSetp: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_Metering_DeviceType: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_HumDehumMode: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_EnableHCStage: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_ADAType: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_BackupMode: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_StartSynchronization: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_Behaviour_Lock_Unlock: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_Behaviour_Bus_Power_Up_Down: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_DALI_Fade_Time: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_BlinkingMode: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_LightControlMode: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_SwitchPBModel: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_PBAction: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_DimmPBModel: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_SwitchOnMode: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_LoadTypeSet: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_LoadTypeDetected: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_Converter_Test_Control: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_SABExcept_Behaviour: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_SABBehaviour_Lock_Unlock: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_SSSBMode: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_BlindsControlMode: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_CommMode: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_AddInfoTypes: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_RF_ModeSelect: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_RF_FilterSelect: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_StatusGen: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 3); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (alarmStatusOfCorrespondingDatapointIsNotAcknowledged) - alarmStatusOfCorrespondingDatapointIsNotAcknowledged, _alarmStatusOfCorrespondingDatapointIsNotAcknowledgedErr := readBuffer.ReadBit("alarmStatusOfCorrespondingDatapointIsNotAcknowledged") - if _alarmStatusOfCorrespondingDatapointIsNotAcknowledgedErr != nil { - return nil, errors.Wrap(_alarmStatusOfCorrespondingDatapointIsNotAcknowledgedErr, "Error parsing 'alarmStatusOfCorrespondingDatapointIsNotAcknowledged' field") - } - _map["Struct"] = values.NewPlcBOOL(alarmStatusOfCorrespondingDatapointIsNotAcknowledged) - - // Simple Field (correspondingDatapointIsInAlarm) - correspondingDatapointIsInAlarm, _correspondingDatapointIsInAlarmErr := readBuffer.ReadBit("correspondingDatapointIsInAlarm") - if _correspondingDatapointIsInAlarmErr != nil { - return nil, errors.Wrap(_correspondingDatapointIsInAlarmErr, "Error parsing 'correspondingDatapointIsInAlarm' field") - } - _map["Struct"] = values.NewPlcBOOL(correspondingDatapointIsInAlarm) - - // Simple Field (correspondingDatapointMainValueIsOverridden) - correspondingDatapointMainValueIsOverridden, _correspondingDatapointMainValueIsOverriddenErr := readBuffer.ReadBit("correspondingDatapointMainValueIsOverridden") - if _correspondingDatapointMainValueIsOverriddenErr != nil { - return nil, errors.Wrap(_correspondingDatapointMainValueIsOverriddenErr, "Error parsing 'correspondingDatapointMainValueIsOverridden' field") - } - _map["Struct"] = values.NewPlcBOOL(correspondingDatapointMainValueIsOverridden) - - // Simple Field (correspondingDatapointMainValueIsCorruptedDueToFailure) - correspondingDatapointMainValueIsCorruptedDueToFailure, _correspondingDatapointMainValueIsCorruptedDueToFailureErr := readBuffer.ReadBit("correspondingDatapointMainValueIsCorruptedDueToFailure") - if _correspondingDatapointMainValueIsCorruptedDueToFailureErr != nil { - return nil, errors.Wrap(_correspondingDatapointMainValueIsCorruptedDueToFailureErr, "Error parsing 'correspondingDatapointMainValueIsCorruptedDueToFailure' field") - } - _map["Struct"] = values.NewPlcBOOL(correspondingDatapointMainValueIsCorruptedDueToFailure) - - // Simple Field (correspondingDatapointValueIsOutOfService) - correspondingDatapointValueIsOutOfService, _correspondingDatapointValueIsOutOfServiceErr := readBuffer.ReadBit("correspondingDatapointValueIsOutOfService") - if _correspondingDatapointValueIsOutOfServiceErr != nil { - return nil, errors.Wrap(_correspondingDatapointValueIsOutOfServiceErr, "Error parsing 'correspondingDatapointValueIsOutOfService' field") - } - _map["Struct"] = values.NewPlcBOOL(correspondingDatapointValueIsOutOfService) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_Device_Control: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 5); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (verifyModeIsOn) - verifyModeIsOn, _verifyModeIsOnErr := readBuffer.ReadBit("verifyModeIsOn") - if _verifyModeIsOnErr != nil { - return nil, errors.Wrap(_verifyModeIsOnErr, "Error parsing 'verifyModeIsOn' field") - } - _map["Struct"] = values.NewPlcBOOL(verifyModeIsOn) - - // Simple Field (aDatagramWithTheOwnIndividualAddressAsSourceAddressHasBeenReceived) - aDatagramWithTheOwnIndividualAddressAsSourceAddressHasBeenReceived, _aDatagramWithTheOwnIndividualAddressAsSourceAddressHasBeenReceivedErr := readBuffer.ReadBit("aDatagramWithTheOwnIndividualAddressAsSourceAddressHasBeenReceived") - if _aDatagramWithTheOwnIndividualAddressAsSourceAddressHasBeenReceivedErr != nil { - return nil, errors.Wrap(_aDatagramWithTheOwnIndividualAddressAsSourceAddressHasBeenReceivedErr, "Error parsing 'aDatagramWithTheOwnIndividualAddressAsSourceAddressHasBeenReceived' field") - } - _map["Struct"] = values.NewPlcBOOL(aDatagramWithTheOwnIndividualAddressAsSourceAddressHasBeenReceived) - - // Simple Field (theUserApplicationIsStopped) - theUserApplicationIsStopped, _theUserApplicationIsStoppedErr := readBuffer.ReadBit("theUserApplicationIsStopped") - if _theUserApplicationIsStoppedErr != nil { - return nil, errors.Wrap(_theUserApplicationIsStoppedErr, "Error parsing 'theUserApplicationIsStopped' field") - } - _map["Struct"] = values.NewPlcBOOL(theUserApplicationIsStopped) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_ForceSign: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (roomhmax) - roomhmax, _roomhmaxErr := readBuffer.ReadBit("roomhmax") - if _roomhmaxErr != nil { - return nil, errors.Wrap(_roomhmaxErr, "Error parsing 'roomhmax' field") - } - _map["Struct"] = values.NewPlcBOOL(roomhmax) - - // Simple Field (roomhconf) - roomhconf, _roomhconfErr := readBuffer.ReadBit("roomhconf") - if _roomhconfErr != nil { - return nil, errors.Wrap(_roomhconfErr, "Error parsing 'roomhconf' field") - } - _map["Struct"] = values.NewPlcBOOL(roomhconf) - - // Simple Field (dhwlegio) - dhwlegio, _dhwlegioErr := readBuffer.ReadBit("dhwlegio") - if _dhwlegioErr != nil { - return nil, errors.Wrap(_dhwlegioErr, "Error parsing 'dhwlegio' field") - } - _map["Struct"] = values.NewPlcBOOL(dhwlegio) - - // Simple Field (dhwnorm) - dhwnorm, _dhwnormErr := readBuffer.ReadBit("dhwnorm") - if _dhwnormErr != nil { - return nil, errors.Wrap(_dhwnormErr, "Error parsing 'dhwnorm' field") - } - _map["Struct"] = values.NewPlcBOOL(dhwnorm) - - // Simple Field (overrun) - overrun, _overrunErr := readBuffer.ReadBit("overrun") - if _overrunErr != nil { - return nil, errors.Wrap(_overrunErr, "Error parsing 'overrun' field") - } - _map["Struct"] = values.NewPlcBOOL(overrun) - - // Simple Field (oversupply) - oversupply, _oversupplyErr := readBuffer.ReadBit("oversupply") - if _oversupplyErr != nil { - return nil, errors.Wrap(_oversupplyErr, "Error parsing 'oversupply' field") - } - _map["Struct"] = values.NewPlcBOOL(oversupply) - - // Simple Field (protection) - protection, _protectionErr := readBuffer.ReadBit("protection") - if _protectionErr != nil { - return nil, errors.Wrap(_protectionErr, "Error parsing 'protection' field") - } - _map["Struct"] = values.NewPlcBOOL(protection) - - // Simple Field (forcerequest) - forcerequest, _forcerequestErr := readBuffer.ReadBit("forcerequest") - if _forcerequestErr != nil { - return nil, errors.Wrap(_forcerequestErr, "Error parsing 'forcerequest' field") - } - _map["Struct"] = values.NewPlcBOOL(forcerequest) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_ForceSignCool: // BOOL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadBit("value") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcBOOL(value), nil - case datapointType == KnxDatapointType_DPT_StatusRHC: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (summermode) - summermode, _summermodeErr := readBuffer.ReadBit("summermode") - if _summermodeErr != nil { - return nil, errors.Wrap(_summermodeErr, "Error parsing 'summermode' field") - } - _map["Struct"] = values.NewPlcBOOL(summermode) - - // Simple Field (statusstopoptim) - statusstopoptim, _statusstopoptimErr := readBuffer.ReadBit("statusstopoptim") - if _statusstopoptimErr != nil { - return nil, errors.Wrap(_statusstopoptimErr, "Error parsing 'statusstopoptim' field") - } - _map["Struct"] = values.NewPlcBOOL(statusstopoptim) - - // Simple Field (statusstartoptim) - statusstartoptim, _statusstartoptimErr := readBuffer.ReadBit("statusstartoptim") - if _statusstartoptimErr != nil { - return nil, errors.Wrap(_statusstartoptimErr, "Error parsing 'statusstartoptim' field") - } - _map["Struct"] = values.NewPlcBOOL(statusstartoptim) - - // Simple Field (statusmorningboost) - statusmorningboost, _statusmorningboostErr := readBuffer.ReadBit("statusmorningboost") - if _statusmorningboostErr != nil { - return nil, errors.Wrap(_statusmorningboostErr, "Error parsing 'statusmorningboost' field") - } - _map["Struct"] = values.NewPlcBOOL(statusmorningboost) - - // Simple Field (tempreturnlimit) - tempreturnlimit, _tempreturnlimitErr := readBuffer.ReadBit("tempreturnlimit") - if _tempreturnlimitErr != nil { - return nil, errors.Wrap(_tempreturnlimitErr, "Error parsing 'tempreturnlimit' field") - } - _map["Struct"] = values.NewPlcBOOL(tempreturnlimit) - - // Simple Field (tempflowlimit) - tempflowlimit, _tempflowlimitErr := readBuffer.ReadBit("tempflowlimit") - if _tempflowlimitErr != nil { - return nil, errors.Wrap(_tempflowlimitErr, "Error parsing 'tempflowlimit' field") - } - _map["Struct"] = values.NewPlcBOOL(tempflowlimit) - - // Simple Field (satuseco) - satuseco, _satusecoErr := readBuffer.ReadBit("satuseco") - if _satusecoErr != nil { - return nil, errors.Wrap(_satusecoErr, "Error parsing 'satuseco' field") - } - _map["Struct"] = values.NewPlcBOOL(satuseco) - - // Simple Field (fault) - fault, _faultErr := readBuffer.ReadBit("fault") - if _faultErr != nil { - return nil, errors.Wrap(_faultErr, "Error parsing 'fault' field") - } - _map["Struct"] = values.NewPlcBOOL(fault) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_StatusSDHWC: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 5); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (solarloadsufficient) - solarloadsufficient, _solarloadsufficientErr := readBuffer.ReadBit("solarloadsufficient") - if _solarloadsufficientErr != nil { - return nil, errors.Wrap(_solarloadsufficientErr, "Error parsing 'solarloadsufficient' field") - } - _map["Struct"] = values.NewPlcBOOL(solarloadsufficient) - - // Simple Field (sdhwloadactive) - sdhwloadactive, _sdhwloadactiveErr := readBuffer.ReadBit("sdhwloadactive") - if _sdhwloadactiveErr != nil { - return nil, errors.Wrap(_sdhwloadactiveErr, "Error parsing 'sdhwloadactive' field") - } - _map["Struct"] = values.NewPlcBOOL(sdhwloadactive) - - // Simple Field (fault) - fault, _faultErr := readBuffer.ReadBit("fault") - if _faultErr != nil { - return nil, errors.Wrap(_faultErr, "Error parsing 'fault' field") - } - _map["Struct"] = values.NewPlcBOOL(fault) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_FuelTypeSet: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 5); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (solidstate) - solidstate, _solidstateErr := readBuffer.ReadBit("solidstate") - if _solidstateErr != nil { - return nil, errors.Wrap(_solidstateErr, "Error parsing 'solidstate' field") - } - _map["Struct"] = values.NewPlcBOOL(solidstate) - - // Simple Field (gas) - gas, _gasErr := readBuffer.ReadBit("gas") - if _gasErr != nil { - return nil, errors.Wrap(_gasErr, "Error parsing 'gas' field") - } - _map["Struct"] = values.NewPlcBOOL(gas) - - // Simple Field (oil) - oil, _oilErr := readBuffer.ReadBit("oil") - if _oilErr != nil { - return nil, errors.Wrap(_oilErr, "Error parsing 'oil' field") - } - _map["Struct"] = values.NewPlcBOOL(oil) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_StatusRCC: // BOOL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadBit("value") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcBOOL(value), nil - case datapointType == KnxDatapointType_DPT_StatusAHU: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (cool) - cool, _coolErr := readBuffer.ReadBit("cool") - if _coolErr != nil { - return nil, errors.Wrap(_coolErr, "Error parsing 'cool' field") - } - _map["Struct"] = values.NewPlcBOOL(cool) - - // Simple Field (heat) - heat, _heatErr := readBuffer.ReadBit("heat") - if _heatErr != nil { - return nil, errors.Wrap(_heatErr, "Error parsing 'heat' field") - } - _map["Struct"] = values.NewPlcBOOL(heat) - - // Simple Field (fanactive) - fanactive, _fanactiveErr := readBuffer.ReadBit("fanactive") - if _fanactiveErr != nil { - return nil, errors.Wrap(_fanactiveErr, "Error parsing 'fanactive' field") - } - _map["Struct"] = values.NewPlcBOOL(fanactive) - - // Simple Field (fault) - fault, _faultErr := readBuffer.ReadBit("fault") - if _faultErr != nil { - return nil, errors.Wrap(_faultErr, "Error parsing 'fault' field") - } - _map["Struct"] = values.NewPlcBOOL(fault) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_CombinedStatus_RTSM: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 3); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (statusOfHvacModeUser) - statusOfHvacModeUser, _statusOfHvacModeUserErr := readBuffer.ReadBit("statusOfHvacModeUser") - if _statusOfHvacModeUserErr != nil { - return nil, errors.Wrap(_statusOfHvacModeUserErr, "Error parsing 'statusOfHvacModeUser' field") - } - _map["Struct"] = values.NewPlcBOOL(statusOfHvacModeUser) - - // Simple Field (statusOfComfortProlongationUser) - statusOfComfortProlongationUser, _statusOfComfortProlongationUserErr := readBuffer.ReadBit("statusOfComfortProlongationUser") - if _statusOfComfortProlongationUserErr != nil { - return nil, errors.Wrap(_statusOfComfortProlongationUserErr, "Error parsing 'statusOfComfortProlongationUser' field") - } - _map["Struct"] = values.NewPlcBOOL(statusOfComfortProlongationUser) - - // Simple Field (effectiveValueOfTheComfortPushButton) - effectiveValueOfTheComfortPushButton, _effectiveValueOfTheComfortPushButtonErr := readBuffer.ReadBit("effectiveValueOfTheComfortPushButton") - if _effectiveValueOfTheComfortPushButtonErr != nil { - return nil, errors.Wrap(_effectiveValueOfTheComfortPushButtonErr, "Error parsing 'effectiveValueOfTheComfortPushButton' field") - } - _map["Struct"] = values.NewPlcBOOL(effectiveValueOfTheComfortPushButton) - - // Simple Field (effectiveValueOfThePresenceStatus) - effectiveValueOfThePresenceStatus, _effectiveValueOfThePresenceStatusErr := readBuffer.ReadBit("effectiveValueOfThePresenceStatus") - if _effectiveValueOfThePresenceStatusErr != nil { - return nil, errors.Wrap(_effectiveValueOfThePresenceStatusErr, "Error parsing 'effectiveValueOfThePresenceStatus' field") - } - _map["Struct"] = values.NewPlcBOOL(effectiveValueOfThePresenceStatus) - - // Simple Field (effectiveValueOfTheWindowStatus) - effectiveValueOfTheWindowStatus, _effectiveValueOfTheWindowStatusErr := readBuffer.ReadBit("effectiveValueOfTheWindowStatus") - if _effectiveValueOfTheWindowStatusErr != nil { - return nil, errors.Wrap(_effectiveValueOfTheWindowStatusErr, "Error parsing 'effectiveValueOfTheWindowStatus' field") - } - _map["Struct"] = values.NewPlcBOOL(effectiveValueOfTheWindowStatus) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_LightActuatorErrorInfo: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 1); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (overheat) - overheat, _overheatErr := readBuffer.ReadBit("overheat") - if _overheatErr != nil { - return nil, errors.Wrap(_overheatErr, "Error parsing 'overheat' field") - } - _map["Struct"] = values.NewPlcBOOL(overheat) - - // Simple Field (lampfailure) - lampfailure, _lampfailureErr := readBuffer.ReadBit("lampfailure") - if _lampfailureErr != nil { - return nil, errors.Wrap(_lampfailureErr, "Error parsing 'lampfailure' field") - } - _map["Struct"] = values.NewPlcBOOL(lampfailure) - - // Simple Field (defectiveload) - defectiveload, _defectiveloadErr := readBuffer.ReadBit("defectiveload") - if _defectiveloadErr != nil { - return nil, errors.Wrap(_defectiveloadErr, "Error parsing 'defectiveload' field") - } - _map["Struct"] = values.NewPlcBOOL(defectiveload) - - // Simple Field (underload) - underload, _underloadErr := readBuffer.ReadBit("underload") - if _underloadErr != nil { - return nil, errors.Wrap(_underloadErr, "Error parsing 'underload' field") - } - _map["Struct"] = values.NewPlcBOOL(underload) - - // Simple Field (overcurrent) - overcurrent, _overcurrentErr := readBuffer.ReadBit("overcurrent") - if _overcurrentErr != nil { - return nil, errors.Wrap(_overcurrentErr, "Error parsing 'overcurrent' field") - } - _map["Struct"] = values.NewPlcBOOL(overcurrent) - - // Simple Field (undervoltage) - undervoltage, _undervoltageErr := readBuffer.ReadBit("undervoltage") - if _undervoltageErr != nil { - return nil, errors.Wrap(_undervoltageErr, "Error parsing 'undervoltage' field") - } - _map["Struct"] = values.NewPlcBOOL(undervoltage) - - // Simple Field (loaddetectionerror) - loaddetectionerror, _loaddetectionerrorErr := readBuffer.ReadBit("loaddetectionerror") - if _loaddetectionerrorErr != nil { - return nil, errors.Wrap(_loaddetectionerrorErr, "Error parsing 'loaddetectionerror' field") - } - _map["Struct"] = values.NewPlcBOOL(loaddetectionerror) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_RF_ModeInfo: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 5); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (bibatSlave) - bibatSlave, _bibatSlaveErr := readBuffer.ReadBit("bibatSlave") - if _bibatSlaveErr != nil { - return nil, errors.Wrap(_bibatSlaveErr, "Error parsing 'bibatSlave' field") - } - _map["Struct"] = values.NewPlcBOOL(bibatSlave) - - // Simple Field (bibatMaster) - bibatMaster, _bibatMasterErr := readBuffer.ReadBit("bibatMaster") - if _bibatMasterErr != nil { - return nil, errors.Wrap(_bibatMasterErr, "Error parsing 'bibatMaster' field") - } - _map["Struct"] = values.NewPlcBOOL(bibatMaster) - - // Simple Field (asynchronous) - asynchronous, _asynchronousErr := readBuffer.ReadBit("asynchronous") - if _asynchronousErr != nil { - return nil, errors.Wrap(_asynchronousErr, "Error parsing 'asynchronous' field") - } - _map["Struct"] = values.NewPlcBOOL(asynchronous) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_RF_FilterInfo: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 5); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (doa) - doa, _doaErr := readBuffer.ReadBit("doa") - if _doaErr != nil { - return nil, errors.Wrap(_doaErr, "Error parsing 'doa' field") - } - _map["Struct"] = values.NewPlcBOOL(doa) - - // Simple Field (knxSn) - knxSn, _knxSnErr := readBuffer.ReadBit("knxSn") - if _knxSnErr != nil { - return nil, errors.Wrap(_knxSnErr, "Error parsing 'knxSn' field") - } - _map["Struct"] = values.NewPlcBOOL(knxSn) - - // Simple Field (doaAndKnxSn) - doaAndKnxSn, _doaAndKnxSnErr := readBuffer.ReadBit("doaAndKnxSn") - if _doaAndKnxSnErr != nil { - return nil, errors.Wrap(_doaAndKnxSnErr, "Error parsing 'doaAndKnxSn' field") - } - _map["Struct"] = values.NewPlcBOOL(doaAndKnxSn) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_Channel_Activation_8: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (activationStateOfChannel1) - activationStateOfChannel1, _activationStateOfChannel1Err := readBuffer.ReadBit("activationStateOfChannel1") - if _activationStateOfChannel1Err != nil { - return nil, errors.Wrap(_activationStateOfChannel1Err, "Error parsing 'activationStateOfChannel1' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel1) - - // Simple Field (activationStateOfChannel2) - activationStateOfChannel2, _activationStateOfChannel2Err := readBuffer.ReadBit("activationStateOfChannel2") - if _activationStateOfChannel2Err != nil { - return nil, errors.Wrap(_activationStateOfChannel2Err, "Error parsing 'activationStateOfChannel2' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel2) - - // Simple Field (activationStateOfChannel3) - activationStateOfChannel3, _activationStateOfChannel3Err := readBuffer.ReadBit("activationStateOfChannel3") - if _activationStateOfChannel3Err != nil { - return nil, errors.Wrap(_activationStateOfChannel3Err, "Error parsing 'activationStateOfChannel3' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel3) - - // Simple Field (activationStateOfChannel4) - activationStateOfChannel4, _activationStateOfChannel4Err := readBuffer.ReadBit("activationStateOfChannel4") - if _activationStateOfChannel4Err != nil { - return nil, errors.Wrap(_activationStateOfChannel4Err, "Error parsing 'activationStateOfChannel4' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel4) - - // Simple Field (activationStateOfChannel5) - activationStateOfChannel5, _activationStateOfChannel5Err := readBuffer.ReadBit("activationStateOfChannel5") - if _activationStateOfChannel5Err != nil { - return nil, errors.Wrap(_activationStateOfChannel5Err, "Error parsing 'activationStateOfChannel5' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel5) - - // Simple Field (activationStateOfChannel6) - activationStateOfChannel6, _activationStateOfChannel6Err := readBuffer.ReadBit("activationStateOfChannel6") - if _activationStateOfChannel6Err != nil { - return nil, errors.Wrap(_activationStateOfChannel6Err, "Error parsing 'activationStateOfChannel6' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel6) - - // Simple Field (activationStateOfChannel7) - activationStateOfChannel7, _activationStateOfChannel7Err := readBuffer.ReadBit("activationStateOfChannel7") - if _activationStateOfChannel7Err != nil { - return nil, errors.Wrap(_activationStateOfChannel7Err, "Error parsing 'activationStateOfChannel7' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel7) - - // Simple Field (activationStateOfChannel8) - activationStateOfChannel8, _activationStateOfChannel8Err := readBuffer.ReadBit("activationStateOfChannel8") - if _activationStateOfChannel8Err != nil { - return nil, errors.Wrap(_activationStateOfChannel8Err, "Error parsing 'activationStateOfChannel8' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel8) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_StatusDHWC: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (tempoptimshiftactive) - tempoptimshiftactive, _tempoptimshiftactiveErr := readBuffer.ReadBit("tempoptimshiftactive") - if _tempoptimshiftactiveErr != nil { - return nil, errors.Wrap(_tempoptimshiftactiveErr, "Error parsing 'tempoptimshiftactive' field") - } - _map["Struct"] = values.NewPlcBOOL(tempoptimshiftactive) - - // Simple Field (solarenergysupport) - solarenergysupport, _solarenergysupportErr := readBuffer.ReadBit("solarenergysupport") - if _solarenergysupportErr != nil { - return nil, errors.Wrap(_solarenergysupportErr, "Error parsing 'solarenergysupport' field") - } - _map["Struct"] = values.NewPlcBOOL(solarenergysupport) - - // Simple Field (solarenergyonly) - solarenergyonly, _solarenergyonlyErr := readBuffer.ReadBit("solarenergyonly") - if _solarenergyonlyErr != nil { - return nil, errors.Wrap(_solarenergyonlyErr, "Error parsing 'solarenergyonly' field") - } - _map["Struct"] = values.NewPlcBOOL(solarenergyonly) - - // Simple Field (otherenergysourceactive) - otherenergysourceactive, _otherenergysourceactiveErr := readBuffer.ReadBit("otherenergysourceactive") - if _otherenergysourceactiveErr != nil { - return nil, errors.Wrap(_otherenergysourceactiveErr, "Error parsing 'otherenergysourceactive' field") - } - _map["Struct"] = values.NewPlcBOOL(otherenergysourceactive) - - // Simple Field (dhwpushactive) - dhwpushactive, _dhwpushactiveErr := readBuffer.ReadBit("dhwpushactive") - if _dhwpushactiveErr != nil { - return nil, errors.Wrap(_dhwpushactiveErr, "Error parsing 'dhwpushactive' field") - } - _map["Struct"] = values.NewPlcBOOL(dhwpushactive) - - // Simple Field (legioprotactive) - legioprotactive, _legioprotactiveErr := readBuffer.ReadBit("legioprotactive") - if _legioprotactiveErr != nil { - return nil, errors.Wrap(_legioprotactiveErr, "Error parsing 'legioprotactive' field") - } - _map["Struct"] = values.NewPlcBOOL(legioprotactive) - - // Simple Field (dhwloadactive) - dhwloadactive, _dhwloadactiveErr := readBuffer.ReadBit("dhwloadactive") - if _dhwloadactiveErr != nil { - return nil, errors.Wrap(_dhwloadactiveErr, "Error parsing 'dhwloadactive' field") - } - _map["Struct"] = values.NewPlcBOOL(dhwloadactive) - - // Simple Field (fault) - fault, _faultErr := readBuffer.ReadBit("fault") - if _faultErr != nil { - return nil, errors.Wrap(_faultErr, "Error parsing 'fault' field") - } - _map["Struct"] = values.NewPlcBOOL(fault) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_StatusRHCC: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 1); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (overheatalarm) - overheatalarm, _overheatalarmErr := readBuffer.ReadBit("overheatalarm") - if _overheatalarmErr != nil { - return nil, errors.Wrap(_overheatalarmErr, "Error parsing 'overheatalarm' field") - } - _map["Struct"] = values.NewPlcBOOL(overheatalarm) - - // Simple Field (frostalarm) - frostalarm, _frostalarmErr := readBuffer.ReadBit("frostalarm") - if _frostalarmErr != nil { - return nil, errors.Wrap(_frostalarmErr, "Error parsing 'frostalarm' field") - } - _map["Struct"] = values.NewPlcBOOL(frostalarm) - - // Simple Field (dewpointstatus) - dewpointstatus, _dewpointstatusErr := readBuffer.ReadBit("dewpointstatus") - if _dewpointstatusErr != nil { - return nil, errors.Wrap(_dewpointstatusErr, "Error parsing 'dewpointstatus' field") - } - _map["Struct"] = values.NewPlcBOOL(dewpointstatus) - - // Simple Field (coolingdisabled) - coolingdisabled, _coolingdisabledErr := readBuffer.ReadBit("coolingdisabled") - if _coolingdisabledErr != nil { - return nil, errors.Wrap(_coolingdisabledErr, "Error parsing 'coolingdisabled' field") - } - _map["Struct"] = values.NewPlcBOOL(coolingdisabled) - - // Simple Field (statusprecool) - statusprecool, _statusprecoolErr := readBuffer.ReadBit("statusprecool") - if _statusprecoolErr != nil { - return nil, errors.Wrap(_statusprecoolErr, "Error parsing 'statusprecool' field") - } - _map["Struct"] = values.NewPlcBOOL(statusprecool) - - // Simple Field (statusecoc) - statusecoc, _statusecocErr := readBuffer.ReadBit("statusecoc") - if _statusecocErr != nil { - return nil, errors.Wrap(_statusecocErr, "Error parsing 'statusecoc' field") - } - _map["Struct"] = values.NewPlcBOOL(statusecoc) - - // Simple Field (heatcoolmode) - heatcoolmode, _heatcoolmodeErr := readBuffer.ReadBit("heatcoolmode") - if _heatcoolmodeErr != nil { - return nil, errors.Wrap(_heatcoolmodeErr, "Error parsing 'heatcoolmode' field") - } - _map["Struct"] = values.NewPlcBOOL(heatcoolmode) - - // Simple Field (heatingdiabled) - heatingdiabled, _heatingdiabledErr := readBuffer.ReadBit("heatingdiabled") - if _heatingdiabledErr != nil { - return nil, errors.Wrap(_heatingdiabledErr, "Error parsing 'heatingdiabled' field") - } - _map["Struct"] = values.NewPlcBOOL(heatingdiabled) - - // Simple Field (statusstopoptim) - statusstopoptim, _statusstopoptimErr := readBuffer.ReadBit("statusstopoptim") - if _statusstopoptimErr != nil { - return nil, errors.Wrap(_statusstopoptimErr, "Error parsing 'statusstopoptim' field") - } - _map["Struct"] = values.NewPlcBOOL(statusstopoptim) - - // Simple Field (statusstartoptim) - statusstartoptim, _statusstartoptimErr := readBuffer.ReadBit("statusstartoptim") - if _statusstartoptimErr != nil { - return nil, errors.Wrap(_statusstartoptimErr, "Error parsing 'statusstartoptim' field") - } - _map["Struct"] = values.NewPlcBOOL(statusstartoptim) - - // Simple Field (statusmorningboosth) - statusmorningboosth, _statusmorningboosthErr := readBuffer.ReadBit("statusmorningboosth") - if _statusmorningboosthErr != nil { - return nil, errors.Wrap(_statusmorningboosthErr, "Error parsing 'statusmorningboosth' field") - } - _map["Struct"] = values.NewPlcBOOL(statusmorningboosth) - - // Simple Field (tempflowreturnlimit) - tempflowreturnlimit, _tempflowreturnlimitErr := readBuffer.ReadBit("tempflowreturnlimit") - if _tempflowreturnlimitErr != nil { - return nil, errors.Wrap(_tempflowreturnlimitErr, "Error parsing 'tempflowreturnlimit' field") - } - _map["Struct"] = values.NewPlcBOOL(tempflowreturnlimit) - - // Simple Field (tempflowlimit) - tempflowlimit, _tempflowlimitErr := readBuffer.ReadBit("tempflowlimit") - if _tempflowlimitErr != nil { - return nil, errors.Wrap(_tempflowlimitErr, "Error parsing 'tempflowlimit' field") - } - _map["Struct"] = values.NewPlcBOOL(tempflowlimit) - - // Simple Field (statusecoh) - statusecoh, _statusecohErr := readBuffer.ReadBit("statusecoh") - if _statusecohErr != nil { - return nil, errors.Wrap(_statusecohErr, "Error parsing 'statusecoh' field") - } - _map["Struct"] = values.NewPlcBOOL(statusecoh) - - // Simple Field (fault) - fault, _faultErr := readBuffer.ReadBit("fault") - if _faultErr != nil { - return nil, errors.Wrap(_faultErr, "Error parsing 'fault' field") - } - _map["Struct"] = values.NewPlcBOOL(fault) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_CombinedStatus_HVA: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (calibrationMode) - calibrationMode, _calibrationModeErr := readBuffer.ReadBit("calibrationMode") - if _calibrationModeErr != nil { - return nil, errors.Wrap(_calibrationModeErr, "Error parsing 'calibrationMode' field") - } - _map["Struct"] = values.NewPlcBOOL(calibrationMode) - - // Simple Field (lockedPosition) - lockedPosition, _lockedPositionErr := readBuffer.ReadBit("lockedPosition") - if _lockedPositionErr != nil { - return nil, errors.Wrap(_lockedPositionErr, "Error parsing 'lockedPosition' field") - } - _map["Struct"] = values.NewPlcBOOL(lockedPosition) - - // Simple Field (forcedPosition) - forcedPosition, _forcedPositionErr := readBuffer.ReadBit("forcedPosition") - if _forcedPositionErr != nil { - return nil, errors.Wrap(_forcedPositionErr, "Error parsing 'forcedPosition' field") - } - _map["Struct"] = values.NewPlcBOOL(forcedPosition) - - // Simple Field (manuaOperationOverridden) - manuaOperationOverridden, _manuaOperationOverriddenErr := readBuffer.ReadBit("manuaOperationOverridden") - if _manuaOperationOverriddenErr != nil { - return nil, errors.Wrap(_manuaOperationOverriddenErr, "Error parsing 'manuaOperationOverridden' field") - } - _map["Struct"] = values.NewPlcBOOL(manuaOperationOverridden) - - // Simple Field (serviceMode) - serviceMode, _serviceModeErr := readBuffer.ReadBit("serviceMode") - if _serviceModeErr != nil { - return nil, errors.Wrap(_serviceModeErr, "Error parsing 'serviceMode' field") - } - _map["Struct"] = values.NewPlcBOOL(serviceMode) - - // Simple Field (valveKick) - valveKick, _valveKickErr := readBuffer.ReadBit("valveKick") - if _valveKickErr != nil { - return nil, errors.Wrap(_valveKickErr, "Error parsing 'valveKick' field") - } - _map["Struct"] = values.NewPlcBOOL(valveKick) - - // Simple Field (overload) - overload, _overloadErr := readBuffer.ReadBit("overload") - if _overloadErr != nil { - return nil, errors.Wrap(_overloadErr, "Error parsing 'overload' field") - } - _map["Struct"] = values.NewPlcBOOL(overload) - - // Simple Field (shortCircuit) - shortCircuit, _shortCircuitErr := readBuffer.ReadBit("shortCircuit") - if _shortCircuitErr != nil { - return nil, errors.Wrap(_shortCircuitErr, "Error parsing 'shortCircuit' field") - } - _map["Struct"] = values.NewPlcBOOL(shortCircuit) - - // Simple Field (currentValvePosition) - currentValvePosition, _currentValvePositionErr := readBuffer.ReadBit("currentValvePosition") - if _currentValvePositionErr != nil { - return nil, errors.Wrap(_currentValvePositionErr, "Error parsing 'currentValvePosition' field") - } - _map["Struct"] = values.NewPlcBOOL(currentValvePosition) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_CombinedStatus_RTC: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (coolingModeEnabled) - coolingModeEnabled, _coolingModeEnabledErr := readBuffer.ReadBit("coolingModeEnabled") - if _coolingModeEnabledErr != nil { - return nil, errors.Wrap(_coolingModeEnabledErr, "Error parsing 'coolingModeEnabled' field") - } - _map["Struct"] = values.NewPlcBOOL(coolingModeEnabled) - - // Simple Field (heatingModeEnabled) - heatingModeEnabled, _heatingModeEnabledErr := readBuffer.ReadBit("heatingModeEnabled") - if _heatingModeEnabledErr != nil { - return nil, errors.Wrap(_heatingModeEnabledErr, "Error parsing 'heatingModeEnabled' field") - } - _map["Struct"] = values.NewPlcBOOL(heatingModeEnabled) - - // Simple Field (additionalHeatingCoolingStage2Stage) - additionalHeatingCoolingStage2Stage, _additionalHeatingCoolingStage2StageErr := readBuffer.ReadBit("additionalHeatingCoolingStage2Stage") - if _additionalHeatingCoolingStage2StageErr != nil { - return nil, errors.Wrap(_additionalHeatingCoolingStage2StageErr, "Error parsing 'additionalHeatingCoolingStage2Stage' field") - } - _map["Struct"] = values.NewPlcBOOL(additionalHeatingCoolingStage2Stage) - - // Simple Field (controllerInactive) - controllerInactive, _controllerInactiveErr := readBuffer.ReadBit("controllerInactive") - if _controllerInactiveErr != nil { - return nil, errors.Wrap(_controllerInactiveErr, "Error parsing 'controllerInactive' field") - } - _map["Struct"] = values.NewPlcBOOL(controllerInactive) - - // Simple Field (overheatAlarm) - overheatAlarm, _overheatAlarmErr := readBuffer.ReadBit("overheatAlarm") - if _overheatAlarmErr != nil { - return nil, errors.Wrap(_overheatAlarmErr, "Error parsing 'overheatAlarm' field") - } - _map["Struct"] = values.NewPlcBOOL(overheatAlarm) - - // Simple Field (frostAlarm) - frostAlarm, _frostAlarmErr := readBuffer.ReadBit("frostAlarm") - if _frostAlarmErr != nil { - return nil, errors.Wrap(_frostAlarmErr, "Error parsing 'frostAlarm' field") - } - _map["Struct"] = values.NewPlcBOOL(frostAlarm) - - // Simple Field (dewPointStatus) - dewPointStatus, _dewPointStatusErr := readBuffer.ReadBit("dewPointStatus") - if _dewPointStatusErr != nil { - return nil, errors.Wrap(_dewPointStatusErr, "Error parsing 'dewPointStatus' field") - } - _map["Struct"] = values.NewPlcBOOL(dewPointStatus) - - // Simple Field (activeMode) - activeMode, _activeModeErr := readBuffer.ReadBit("activeMode") - if _activeModeErr != nil { - return nil, errors.Wrap(_activeModeErr, "Error parsing 'activeMode' field") - } - _map["Struct"] = values.NewPlcBOOL(activeMode) - - // Simple Field (generalFailureInformation) - generalFailureInformation, _generalFailureInformationErr := readBuffer.ReadBit("generalFailureInformation") - if _generalFailureInformationErr != nil { - return nil, errors.Wrap(_generalFailureInformationErr, "Error parsing 'generalFailureInformation' field") - } - _map["Struct"] = values.NewPlcBOOL(generalFailureInformation) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_Media: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint16("reserved", 10); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (knxIp) - knxIp, _knxIpErr := readBuffer.ReadBit("knxIp") - if _knxIpErr != nil { - return nil, errors.Wrap(_knxIpErr, "Error parsing 'knxIp' field") - } - _map["Struct"] = values.NewPlcBOOL(knxIp) - - // Simple Field (rf) - rf, _rfErr := readBuffer.ReadBit("rf") - if _rfErr != nil { - return nil, errors.Wrap(_rfErr, "Error parsing 'rf' field") - } - _map["Struct"] = values.NewPlcBOOL(rf) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 1); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (pl110) - pl110, _pl110Err := readBuffer.ReadBit("pl110") - if _pl110Err != nil { - return nil, errors.Wrap(_pl110Err, "Error parsing 'pl110' field") - } - _map["Struct"] = values.NewPlcBOOL(pl110) - - // Simple Field (tp1) - tp1, _tp1Err := readBuffer.ReadBit("tp1") - if _tp1Err != nil { - return nil, errors.Wrap(_tp1Err, "Error parsing 'tp1' field") - } - _map["Struct"] = values.NewPlcBOOL(tp1) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 1); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_Channel_Activation_16: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (activationStateOfChannel1) - activationStateOfChannel1, _activationStateOfChannel1Err := readBuffer.ReadBit("activationStateOfChannel1") - if _activationStateOfChannel1Err != nil { - return nil, errors.Wrap(_activationStateOfChannel1Err, "Error parsing 'activationStateOfChannel1' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel1) - - // Simple Field (activationStateOfChannel2) - activationStateOfChannel2, _activationStateOfChannel2Err := readBuffer.ReadBit("activationStateOfChannel2") - if _activationStateOfChannel2Err != nil { - return nil, errors.Wrap(_activationStateOfChannel2Err, "Error parsing 'activationStateOfChannel2' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel2) - - // Simple Field (activationStateOfChannel3) - activationStateOfChannel3, _activationStateOfChannel3Err := readBuffer.ReadBit("activationStateOfChannel3") - if _activationStateOfChannel3Err != nil { - return nil, errors.Wrap(_activationStateOfChannel3Err, "Error parsing 'activationStateOfChannel3' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel3) - - // Simple Field (activationStateOfChannel4) - activationStateOfChannel4, _activationStateOfChannel4Err := readBuffer.ReadBit("activationStateOfChannel4") - if _activationStateOfChannel4Err != nil { - return nil, errors.Wrap(_activationStateOfChannel4Err, "Error parsing 'activationStateOfChannel4' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel4) - - // Simple Field (activationStateOfChannel5) - activationStateOfChannel5, _activationStateOfChannel5Err := readBuffer.ReadBit("activationStateOfChannel5") - if _activationStateOfChannel5Err != nil { - return nil, errors.Wrap(_activationStateOfChannel5Err, "Error parsing 'activationStateOfChannel5' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel5) - - // Simple Field (activationStateOfChannel6) - activationStateOfChannel6, _activationStateOfChannel6Err := readBuffer.ReadBit("activationStateOfChannel6") - if _activationStateOfChannel6Err != nil { - return nil, errors.Wrap(_activationStateOfChannel6Err, "Error parsing 'activationStateOfChannel6' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel6) - - // Simple Field (activationStateOfChannel7) - activationStateOfChannel7, _activationStateOfChannel7Err := readBuffer.ReadBit("activationStateOfChannel7") - if _activationStateOfChannel7Err != nil { - return nil, errors.Wrap(_activationStateOfChannel7Err, "Error parsing 'activationStateOfChannel7' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel7) - - // Simple Field (activationStateOfChannel8) - activationStateOfChannel8, _activationStateOfChannel8Err := readBuffer.ReadBit("activationStateOfChannel8") - if _activationStateOfChannel8Err != nil { - return nil, errors.Wrap(_activationStateOfChannel8Err, "Error parsing 'activationStateOfChannel8' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel8) - - // Simple Field (activationStateOfChannel9) - activationStateOfChannel9, _activationStateOfChannel9Err := readBuffer.ReadBit("activationStateOfChannel9") - if _activationStateOfChannel9Err != nil { - return nil, errors.Wrap(_activationStateOfChannel9Err, "Error parsing 'activationStateOfChannel9' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel9) - - // Simple Field (activationStateOfChannel10) - activationStateOfChannel10, _activationStateOfChannel10Err := readBuffer.ReadBit("activationStateOfChannel10") - if _activationStateOfChannel10Err != nil { - return nil, errors.Wrap(_activationStateOfChannel10Err, "Error parsing 'activationStateOfChannel10' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel10) - - // Simple Field (activationStateOfChannel11) - activationStateOfChannel11, _activationStateOfChannel11Err := readBuffer.ReadBit("activationStateOfChannel11") - if _activationStateOfChannel11Err != nil { - return nil, errors.Wrap(_activationStateOfChannel11Err, "Error parsing 'activationStateOfChannel11' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel11) - - // Simple Field (activationStateOfChannel12) - activationStateOfChannel12, _activationStateOfChannel12Err := readBuffer.ReadBit("activationStateOfChannel12") - if _activationStateOfChannel12Err != nil { - return nil, errors.Wrap(_activationStateOfChannel12Err, "Error parsing 'activationStateOfChannel12' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel12) - - // Simple Field (activationStateOfChannel13) - activationStateOfChannel13, _activationStateOfChannel13Err := readBuffer.ReadBit("activationStateOfChannel13") - if _activationStateOfChannel13Err != nil { - return nil, errors.Wrap(_activationStateOfChannel13Err, "Error parsing 'activationStateOfChannel13' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel13) - - // Simple Field (activationStateOfChannel14) - activationStateOfChannel14, _activationStateOfChannel14Err := readBuffer.ReadBit("activationStateOfChannel14") - if _activationStateOfChannel14Err != nil { - return nil, errors.Wrap(_activationStateOfChannel14Err, "Error parsing 'activationStateOfChannel14' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel14) - - // Simple Field (activationStateOfChannel15) - activationStateOfChannel15, _activationStateOfChannel15Err := readBuffer.ReadBit("activationStateOfChannel15") - if _activationStateOfChannel15Err != nil { - return nil, errors.Wrap(_activationStateOfChannel15Err, "Error parsing 'activationStateOfChannel15' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel15) - - // Simple Field (activationStateOfChannel16) - activationStateOfChannel16, _activationStateOfChannel16Err := readBuffer.ReadBit("activationStateOfChannel16") - if _activationStateOfChannel16Err != nil { - return nil, errors.Wrap(_activationStateOfChannel16Err, "Error parsing 'activationStateOfChannel16' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel16) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_OnOffAction: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 6); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 2) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_Alarm_Reaction: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 6); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 2) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_UpDown_Action: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 6); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 2) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_HVAC_PB_Action: // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 6); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 2) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcUSINT(value), nil - case datapointType == KnxDatapointType_DPT_DoubleNibble: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (busy) - busy, _busyErr := readBuffer.ReadUint8("busy", 4) - if _busyErr != nil { - return nil, errors.Wrap(_busyErr, "Error parsing 'busy' field") - } - _map["Struct"] = values.NewPlcUSINT(busy) - - // Simple Field (nak) - nak, _nakErr := readBuffer.ReadUint8("nak", 4) - if _nakErr != nil { - return nil, errors.Wrap(_nakErr, "Error parsing 'nak' field") - } - _map["Struct"] = values.NewPlcUSINT(nak) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_SceneInfo: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 1); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (sceneIsInactive) - sceneIsInactive, _sceneIsInactiveErr := readBuffer.ReadBit("sceneIsInactive") - if _sceneIsInactiveErr != nil { - return nil, errors.Wrap(_sceneIsInactiveErr, "Error parsing 'sceneIsInactive' field") - } - _map["Struct"] = values.NewPlcBOOL(sceneIsInactive) - - // Simple Field (scenenumber) - scenenumber, _scenenumberErr := readBuffer.ReadUint8("scenenumber", 6) - if _scenenumberErr != nil { - return nil, errors.Wrap(_scenenumberErr, "Error parsing 'scenenumber' field") - } - _map["Struct"] = values.NewPlcUSINT(scenenumber) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_CombinedInfoOnOff: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (maskBitInfoOnOffOutput16) - maskBitInfoOnOffOutput16, _maskBitInfoOnOffOutput16Err := readBuffer.ReadBit("maskBitInfoOnOffOutput16") - if _maskBitInfoOnOffOutput16Err != nil { - return nil, errors.Wrap(_maskBitInfoOnOffOutput16Err, "Error parsing 'maskBitInfoOnOffOutput16' field") - } - _map["Struct"] = values.NewPlcBOOL(maskBitInfoOnOffOutput16) - - // Simple Field (maskBitInfoOnOffOutput15) - maskBitInfoOnOffOutput15, _maskBitInfoOnOffOutput15Err := readBuffer.ReadBit("maskBitInfoOnOffOutput15") - if _maskBitInfoOnOffOutput15Err != nil { - return nil, errors.Wrap(_maskBitInfoOnOffOutput15Err, "Error parsing 'maskBitInfoOnOffOutput15' field") - } - _map["Struct"] = values.NewPlcBOOL(maskBitInfoOnOffOutput15) - - // Simple Field (maskBitInfoOnOffOutput14) - maskBitInfoOnOffOutput14, _maskBitInfoOnOffOutput14Err := readBuffer.ReadBit("maskBitInfoOnOffOutput14") - if _maskBitInfoOnOffOutput14Err != nil { - return nil, errors.Wrap(_maskBitInfoOnOffOutput14Err, "Error parsing 'maskBitInfoOnOffOutput14' field") - } - _map["Struct"] = values.NewPlcBOOL(maskBitInfoOnOffOutput14) - - // Simple Field (maskBitInfoOnOffOutput13) - maskBitInfoOnOffOutput13, _maskBitInfoOnOffOutput13Err := readBuffer.ReadBit("maskBitInfoOnOffOutput13") - if _maskBitInfoOnOffOutput13Err != nil { - return nil, errors.Wrap(_maskBitInfoOnOffOutput13Err, "Error parsing 'maskBitInfoOnOffOutput13' field") - } - _map["Struct"] = values.NewPlcBOOL(maskBitInfoOnOffOutput13) - - // Simple Field (maskBitInfoOnOffOutput12) - maskBitInfoOnOffOutput12, _maskBitInfoOnOffOutput12Err := readBuffer.ReadBit("maskBitInfoOnOffOutput12") - if _maskBitInfoOnOffOutput12Err != nil { - return nil, errors.Wrap(_maskBitInfoOnOffOutput12Err, "Error parsing 'maskBitInfoOnOffOutput12' field") - } - _map["Struct"] = values.NewPlcBOOL(maskBitInfoOnOffOutput12) - - // Simple Field (maskBitInfoOnOffOutput11) - maskBitInfoOnOffOutput11, _maskBitInfoOnOffOutput11Err := readBuffer.ReadBit("maskBitInfoOnOffOutput11") - if _maskBitInfoOnOffOutput11Err != nil { - return nil, errors.Wrap(_maskBitInfoOnOffOutput11Err, "Error parsing 'maskBitInfoOnOffOutput11' field") - } - _map["Struct"] = values.NewPlcBOOL(maskBitInfoOnOffOutput11) - - // Simple Field (maskBitInfoOnOffOutput10) - maskBitInfoOnOffOutput10, _maskBitInfoOnOffOutput10Err := readBuffer.ReadBit("maskBitInfoOnOffOutput10") - if _maskBitInfoOnOffOutput10Err != nil { - return nil, errors.Wrap(_maskBitInfoOnOffOutput10Err, "Error parsing 'maskBitInfoOnOffOutput10' field") - } - _map["Struct"] = values.NewPlcBOOL(maskBitInfoOnOffOutput10) - - // Simple Field (maskBitInfoOnOffOutput9) - maskBitInfoOnOffOutput9, _maskBitInfoOnOffOutput9Err := readBuffer.ReadBit("maskBitInfoOnOffOutput9") - if _maskBitInfoOnOffOutput9Err != nil { - return nil, errors.Wrap(_maskBitInfoOnOffOutput9Err, "Error parsing 'maskBitInfoOnOffOutput9' field") - } - _map["Struct"] = values.NewPlcBOOL(maskBitInfoOnOffOutput9) - - // Simple Field (maskBitInfoOnOffOutput8) - maskBitInfoOnOffOutput8, _maskBitInfoOnOffOutput8Err := readBuffer.ReadBit("maskBitInfoOnOffOutput8") - if _maskBitInfoOnOffOutput8Err != nil { - return nil, errors.Wrap(_maskBitInfoOnOffOutput8Err, "Error parsing 'maskBitInfoOnOffOutput8' field") - } - _map["Struct"] = values.NewPlcBOOL(maskBitInfoOnOffOutput8) - - // Simple Field (maskBitInfoOnOffOutput7) - maskBitInfoOnOffOutput7, _maskBitInfoOnOffOutput7Err := readBuffer.ReadBit("maskBitInfoOnOffOutput7") - if _maskBitInfoOnOffOutput7Err != nil { - return nil, errors.Wrap(_maskBitInfoOnOffOutput7Err, "Error parsing 'maskBitInfoOnOffOutput7' field") - } - _map["Struct"] = values.NewPlcBOOL(maskBitInfoOnOffOutput7) - - // Simple Field (maskBitInfoOnOffOutput6) - maskBitInfoOnOffOutput6, _maskBitInfoOnOffOutput6Err := readBuffer.ReadBit("maskBitInfoOnOffOutput6") - if _maskBitInfoOnOffOutput6Err != nil { - return nil, errors.Wrap(_maskBitInfoOnOffOutput6Err, "Error parsing 'maskBitInfoOnOffOutput6' field") - } - _map["Struct"] = values.NewPlcBOOL(maskBitInfoOnOffOutput6) - - // Simple Field (maskBitInfoOnOffOutput5) - maskBitInfoOnOffOutput5, _maskBitInfoOnOffOutput5Err := readBuffer.ReadBit("maskBitInfoOnOffOutput5") - if _maskBitInfoOnOffOutput5Err != nil { - return nil, errors.Wrap(_maskBitInfoOnOffOutput5Err, "Error parsing 'maskBitInfoOnOffOutput5' field") - } - _map["Struct"] = values.NewPlcBOOL(maskBitInfoOnOffOutput5) - - // Simple Field (maskBitInfoOnOffOutput4) - maskBitInfoOnOffOutput4, _maskBitInfoOnOffOutput4Err := readBuffer.ReadBit("maskBitInfoOnOffOutput4") - if _maskBitInfoOnOffOutput4Err != nil { - return nil, errors.Wrap(_maskBitInfoOnOffOutput4Err, "Error parsing 'maskBitInfoOnOffOutput4' field") - } - _map["Struct"] = values.NewPlcBOOL(maskBitInfoOnOffOutput4) - - // Simple Field (maskBitInfoOnOffOutput3) - maskBitInfoOnOffOutput3, _maskBitInfoOnOffOutput3Err := readBuffer.ReadBit("maskBitInfoOnOffOutput3") - if _maskBitInfoOnOffOutput3Err != nil { - return nil, errors.Wrap(_maskBitInfoOnOffOutput3Err, "Error parsing 'maskBitInfoOnOffOutput3' field") - } - _map["Struct"] = values.NewPlcBOOL(maskBitInfoOnOffOutput3) - - // Simple Field (maskBitInfoOnOffOutput2) - maskBitInfoOnOffOutput2, _maskBitInfoOnOffOutput2Err := readBuffer.ReadBit("maskBitInfoOnOffOutput2") - if _maskBitInfoOnOffOutput2Err != nil { - return nil, errors.Wrap(_maskBitInfoOnOffOutput2Err, "Error parsing 'maskBitInfoOnOffOutput2' field") - } - _map["Struct"] = values.NewPlcBOOL(maskBitInfoOnOffOutput2) - - // Simple Field (maskBitInfoOnOffOutput1) - maskBitInfoOnOffOutput1, _maskBitInfoOnOffOutput1Err := readBuffer.ReadBit("maskBitInfoOnOffOutput1") - if _maskBitInfoOnOffOutput1Err != nil { - return nil, errors.Wrap(_maskBitInfoOnOffOutput1Err, "Error parsing 'maskBitInfoOnOffOutput1' field") - } - _map["Struct"] = values.NewPlcBOOL(maskBitInfoOnOffOutput1) - - // Simple Field (infoOnOffOutput16) - infoOnOffOutput16, _infoOnOffOutput16Err := readBuffer.ReadBit("infoOnOffOutput16") - if _infoOnOffOutput16Err != nil { - return nil, errors.Wrap(_infoOnOffOutput16Err, "Error parsing 'infoOnOffOutput16' field") - } - _map["Struct"] = values.NewPlcBOOL(infoOnOffOutput16) - - // Simple Field (infoOnOffOutput15) - infoOnOffOutput15, _infoOnOffOutput15Err := readBuffer.ReadBit("infoOnOffOutput15") - if _infoOnOffOutput15Err != nil { - return nil, errors.Wrap(_infoOnOffOutput15Err, "Error parsing 'infoOnOffOutput15' field") - } - _map["Struct"] = values.NewPlcBOOL(infoOnOffOutput15) - - // Simple Field (infoOnOffOutput14) - infoOnOffOutput14, _infoOnOffOutput14Err := readBuffer.ReadBit("infoOnOffOutput14") - if _infoOnOffOutput14Err != nil { - return nil, errors.Wrap(_infoOnOffOutput14Err, "Error parsing 'infoOnOffOutput14' field") - } - _map["Struct"] = values.NewPlcBOOL(infoOnOffOutput14) - - // Simple Field (infoOnOffOutput13) - infoOnOffOutput13, _infoOnOffOutput13Err := readBuffer.ReadBit("infoOnOffOutput13") - if _infoOnOffOutput13Err != nil { - return nil, errors.Wrap(_infoOnOffOutput13Err, "Error parsing 'infoOnOffOutput13' field") - } - _map["Struct"] = values.NewPlcBOOL(infoOnOffOutput13) - - // Simple Field (infoOnOffOutput12) - infoOnOffOutput12, _infoOnOffOutput12Err := readBuffer.ReadBit("infoOnOffOutput12") - if _infoOnOffOutput12Err != nil { - return nil, errors.Wrap(_infoOnOffOutput12Err, "Error parsing 'infoOnOffOutput12' field") - } - _map["Struct"] = values.NewPlcBOOL(infoOnOffOutput12) - - // Simple Field (infoOnOffOutput11) - infoOnOffOutput11, _infoOnOffOutput11Err := readBuffer.ReadBit("infoOnOffOutput11") - if _infoOnOffOutput11Err != nil { - return nil, errors.Wrap(_infoOnOffOutput11Err, "Error parsing 'infoOnOffOutput11' field") - } - _map["Struct"] = values.NewPlcBOOL(infoOnOffOutput11) - - // Simple Field (infoOnOffOutput10) - infoOnOffOutput10, _infoOnOffOutput10Err := readBuffer.ReadBit("infoOnOffOutput10") - if _infoOnOffOutput10Err != nil { - return nil, errors.Wrap(_infoOnOffOutput10Err, "Error parsing 'infoOnOffOutput10' field") - } - _map["Struct"] = values.NewPlcBOOL(infoOnOffOutput10) - - // Simple Field (infoOnOffOutput9) - infoOnOffOutput9, _infoOnOffOutput9Err := readBuffer.ReadBit("infoOnOffOutput9") - if _infoOnOffOutput9Err != nil { - return nil, errors.Wrap(_infoOnOffOutput9Err, "Error parsing 'infoOnOffOutput9' field") - } - _map["Struct"] = values.NewPlcBOOL(infoOnOffOutput9) - - // Simple Field (infoOnOffOutput8) - infoOnOffOutput8, _infoOnOffOutput8Err := readBuffer.ReadBit("infoOnOffOutput8") - if _infoOnOffOutput8Err != nil { - return nil, errors.Wrap(_infoOnOffOutput8Err, "Error parsing 'infoOnOffOutput8' field") - } - _map["Struct"] = values.NewPlcBOOL(infoOnOffOutput8) - - // Simple Field (infoOnOffOutput7) - infoOnOffOutput7, _infoOnOffOutput7Err := readBuffer.ReadBit("infoOnOffOutput7") - if _infoOnOffOutput7Err != nil { - return nil, errors.Wrap(_infoOnOffOutput7Err, "Error parsing 'infoOnOffOutput7' field") - } - _map["Struct"] = values.NewPlcBOOL(infoOnOffOutput7) - - // Simple Field (infoOnOffOutput6) - infoOnOffOutput6, _infoOnOffOutput6Err := readBuffer.ReadBit("infoOnOffOutput6") - if _infoOnOffOutput6Err != nil { - return nil, errors.Wrap(_infoOnOffOutput6Err, "Error parsing 'infoOnOffOutput6' field") - } - _map["Struct"] = values.NewPlcBOOL(infoOnOffOutput6) - - // Simple Field (infoOnOffOutput5) - infoOnOffOutput5, _infoOnOffOutput5Err := readBuffer.ReadBit("infoOnOffOutput5") - if _infoOnOffOutput5Err != nil { - return nil, errors.Wrap(_infoOnOffOutput5Err, "Error parsing 'infoOnOffOutput5' field") - } - _map["Struct"] = values.NewPlcBOOL(infoOnOffOutput5) - - // Simple Field (infoOnOffOutput4) - infoOnOffOutput4, _infoOnOffOutput4Err := readBuffer.ReadBit("infoOnOffOutput4") - if _infoOnOffOutput4Err != nil { - return nil, errors.Wrap(_infoOnOffOutput4Err, "Error parsing 'infoOnOffOutput4' field") - } - _map["Struct"] = values.NewPlcBOOL(infoOnOffOutput4) - - // Simple Field (infoOnOffOutput3) - infoOnOffOutput3, _infoOnOffOutput3Err := readBuffer.ReadBit("infoOnOffOutput3") - if _infoOnOffOutput3Err != nil { - return nil, errors.Wrap(_infoOnOffOutput3Err, "Error parsing 'infoOnOffOutput3' field") - } - _map["Struct"] = values.NewPlcBOOL(infoOnOffOutput3) - - // Simple Field (infoOnOffOutput2) - infoOnOffOutput2, _infoOnOffOutput2Err := readBuffer.ReadBit("infoOnOffOutput2") - if _infoOnOffOutput2Err != nil { - return nil, errors.Wrap(_infoOnOffOutput2Err, "Error parsing 'infoOnOffOutput2' field") - } - _map["Struct"] = values.NewPlcBOOL(infoOnOffOutput2) - - // Simple Field (infoOnOffOutput1) - infoOnOffOutput1, _infoOnOffOutput1Err := readBuffer.ReadBit("infoOnOffOutput1") - if _infoOnOffOutput1Err != nil { - return nil, errors.Wrap(_infoOnOffOutput1Err, "Error parsing 'infoOnOffOutput1' field") - } - _map["Struct"] = values.NewPlcBOOL(infoOnOffOutput1) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_ActiveEnergy_V64: // LINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt64("value", 64) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcLINT(value), nil - case datapointType == KnxDatapointType_DPT_ApparantEnergy_V64: // LINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt64("value", 64) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcLINT(value), nil - case datapointType == KnxDatapointType_DPT_ReactiveEnergy_V64: // LINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt64("value", 64) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcLINT(value), nil - case datapointType == KnxDatapointType_DPT_Channel_Activation_24: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (activationStateOfChannel1) - activationStateOfChannel1, _activationStateOfChannel1Err := readBuffer.ReadBit("activationStateOfChannel1") - if _activationStateOfChannel1Err != nil { - return nil, errors.Wrap(_activationStateOfChannel1Err, "Error parsing 'activationStateOfChannel1' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel1) - - // Simple Field (activationStateOfChannel2) - activationStateOfChannel2, _activationStateOfChannel2Err := readBuffer.ReadBit("activationStateOfChannel2") - if _activationStateOfChannel2Err != nil { - return nil, errors.Wrap(_activationStateOfChannel2Err, "Error parsing 'activationStateOfChannel2' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel2) - - // Simple Field (activationStateOfChannel3) - activationStateOfChannel3, _activationStateOfChannel3Err := readBuffer.ReadBit("activationStateOfChannel3") - if _activationStateOfChannel3Err != nil { - return nil, errors.Wrap(_activationStateOfChannel3Err, "Error parsing 'activationStateOfChannel3' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel3) - - // Simple Field (activationStateOfChannel4) - activationStateOfChannel4, _activationStateOfChannel4Err := readBuffer.ReadBit("activationStateOfChannel4") - if _activationStateOfChannel4Err != nil { - return nil, errors.Wrap(_activationStateOfChannel4Err, "Error parsing 'activationStateOfChannel4' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel4) - - // Simple Field (activationStateOfChannel5) - activationStateOfChannel5, _activationStateOfChannel5Err := readBuffer.ReadBit("activationStateOfChannel5") - if _activationStateOfChannel5Err != nil { - return nil, errors.Wrap(_activationStateOfChannel5Err, "Error parsing 'activationStateOfChannel5' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel5) - - // Simple Field (activationStateOfChannel6) - activationStateOfChannel6, _activationStateOfChannel6Err := readBuffer.ReadBit("activationStateOfChannel6") - if _activationStateOfChannel6Err != nil { - return nil, errors.Wrap(_activationStateOfChannel6Err, "Error parsing 'activationStateOfChannel6' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel6) - - // Simple Field (activationStateOfChannel7) - activationStateOfChannel7, _activationStateOfChannel7Err := readBuffer.ReadBit("activationStateOfChannel7") - if _activationStateOfChannel7Err != nil { - return nil, errors.Wrap(_activationStateOfChannel7Err, "Error parsing 'activationStateOfChannel7' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel7) - - // Simple Field (activationStateOfChannel8) - activationStateOfChannel8, _activationStateOfChannel8Err := readBuffer.ReadBit("activationStateOfChannel8") - if _activationStateOfChannel8Err != nil { - return nil, errors.Wrap(_activationStateOfChannel8Err, "Error parsing 'activationStateOfChannel8' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel8) - - // Simple Field (activationStateOfChannel9) - activationStateOfChannel9, _activationStateOfChannel9Err := readBuffer.ReadBit("activationStateOfChannel9") - if _activationStateOfChannel9Err != nil { - return nil, errors.Wrap(_activationStateOfChannel9Err, "Error parsing 'activationStateOfChannel9' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel9) - - // Simple Field (activationStateOfChannel10) - activationStateOfChannel10, _activationStateOfChannel10Err := readBuffer.ReadBit("activationStateOfChannel10") - if _activationStateOfChannel10Err != nil { - return nil, errors.Wrap(_activationStateOfChannel10Err, "Error parsing 'activationStateOfChannel10' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel10) - - // Simple Field (activationStateOfChannel11) - activationStateOfChannel11, _activationStateOfChannel11Err := readBuffer.ReadBit("activationStateOfChannel11") - if _activationStateOfChannel11Err != nil { - return nil, errors.Wrap(_activationStateOfChannel11Err, "Error parsing 'activationStateOfChannel11' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel11) - - // Simple Field (activationStateOfChannel12) - activationStateOfChannel12, _activationStateOfChannel12Err := readBuffer.ReadBit("activationStateOfChannel12") - if _activationStateOfChannel12Err != nil { - return nil, errors.Wrap(_activationStateOfChannel12Err, "Error parsing 'activationStateOfChannel12' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel12) - - // Simple Field (activationStateOfChannel13) - activationStateOfChannel13, _activationStateOfChannel13Err := readBuffer.ReadBit("activationStateOfChannel13") - if _activationStateOfChannel13Err != nil { - return nil, errors.Wrap(_activationStateOfChannel13Err, "Error parsing 'activationStateOfChannel13' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel13) - - // Simple Field (activationStateOfChannel14) - activationStateOfChannel14, _activationStateOfChannel14Err := readBuffer.ReadBit("activationStateOfChannel14") - if _activationStateOfChannel14Err != nil { - return nil, errors.Wrap(_activationStateOfChannel14Err, "Error parsing 'activationStateOfChannel14' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel14) - - // Simple Field (activationStateOfChannel15) - activationStateOfChannel15, _activationStateOfChannel15Err := readBuffer.ReadBit("activationStateOfChannel15") - if _activationStateOfChannel15Err != nil { - return nil, errors.Wrap(_activationStateOfChannel15Err, "Error parsing 'activationStateOfChannel15' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel15) - - // Simple Field (activationStateOfChannel16) - activationStateOfChannel16, _activationStateOfChannel16Err := readBuffer.ReadBit("activationStateOfChannel16") - if _activationStateOfChannel16Err != nil { - return nil, errors.Wrap(_activationStateOfChannel16Err, "Error parsing 'activationStateOfChannel16' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel16) - - // Simple Field (activationStateOfChannel17) - activationStateOfChannel17, _activationStateOfChannel17Err := readBuffer.ReadBit("activationStateOfChannel17") - if _activationStateOfChannel17Err != nil { - return nil, errors.Wrap(_activationStateOfChannel17Err, "Error parsing 'activationStateOfChannel17' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel17) - - // Simple Field (activationStateOfChannel18) - activationStateOfChannel18, _activationStateOfChannel18Err := readBuffer.ReadBit("activationStateOfChannel18") - if _activationStateOfChannel18Err != nil { - return nil, errors.Wrap(_activationStateOfChannel18Err, "Error parsing 'activationStateOfChannel18' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel18) - - // Simple Field (activationStateOfChannel19) - activationStateOfChannel19, _activationStateOfChannel19Err := readBuffer.ReadBit("activationStateOfChannel19") - if _activationStateOfChannel19Err != nil { - return nil, errors.Wrap(_activationStateOfChannel19Err, "Error parsing 'activationStateOfChannel19' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel19) - - // Simple Field (activationStateOfChannel20) - activationStateOfChannel20, _activationStateOfChannel20Err := readBuffer.ReadBit("activationStateOfChannel20") - if _activationStateOfChannel20Err != nil { - return nil, errors.Wrap(_activationStateOfChannel20Err, "Error parsing 'activationStateOfChannel20' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel20) - - // Simple Field (activationStateOfChannel21) - activationStateOfChannel21, _activationStateOfChannel21Err := readBuffer.ReadBit("activationStateOfChannel21") - if _activationStateOfChannel21Err != nil { - return nil, errors.Wrap(_activationStateOfChannel21Err, "Error parsing 'activationStateOfChannel21' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel21) - - // Simple Field (activationStateOfChannel22) - activationStateOfChannel22, _activationStateOfChannel22Err := readBuffer.ReadBit("activationStateOfChannel22") - if _activationStateOfChannel22Err != nil { - return nil, errors.Wrap(_activationStateOfChannel22Err, "Error parsing 'activationStateOfChannel22' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel22) - - // Simple Field (activationStateOfChannel23) - activationStateOfChannel23, _activationStateOfChannel23Err := readBuffer.ReadBit("activationStateOfChannel23") - if _activationStateOfChannel23Err != nil { - return nil, errors.Wrap(_activationStateOfChannel23Err, "Error parsing 'activationStateOfChannel23' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel23) - - // Simple Field (activationStateOfChannel24) - activationStateOfChannel24, _activationStateOfChannel24Err := readBuffer.ReadBit("activationStateOfChannel24") - if _activationStateOfChannel24Err != nil { - return nil, errors.Wrap(_activationStateOfChannel24Err, "Error parsing 'activationStateOfChannel24' field") - } - _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel24) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_HVACModeNext: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (delayTimeMin) - delayTimeMin, _delayTimeMinErr := readBuffer.ReadUint16("delayTimeMin", 16) - if _delayTimeMinErr != nil { - return nil, errors.Wrap(_delayTimeMinErr, "Error parsing 'delayTimeMin' field") - } - _map["Struct"] = values.NewPlcUINT(delayTimeMin) - - // Simple Field (hvacMode) - hvacMode, _hvacModeErr := readBuffer.ReadUint8("hvacMode", 8) - if _hvacModeErr != nil { - return nil, errors.Wrap(_hvacModeErr, "Error parsing 'hvacMode' field") - } - _map["Struct"] = values.NewPlcUSINT(hvacMode) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_DHWModeNext: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (delayTimeMin) - delayTimeMin, _delayTimeMinErr := readBuffer.ReadUint16("delayTimeMin", 16) - if _delayTimeMinErr != nil { - return nil, errors.Wrap(_delayTimeMinErr, "Error parsing 'delayTimeMin' field") - } - _map["Struct"] = values.NewPlcUINT(delayTimeMin) - - // Simple Field (dhwMode) - dhwMode, _dhwModeErr := readBuffer.ReadUint8("dhwMode", 8) - if _dhwModeErr != nil { - return nil, errors.Wrap(_dhwModeErr, "Error parsing 'dhwMode' field") - } - _map["Struct"] = values.NewPlcUSINT(dhwMode) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_OccModeNext: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (delayTimeMin) - delayTimeMin, _delayTimeMinErr := readBuffer.ReadUint16("delayTimeMin", 16) - if _delayTimeMinErr != nil { - return nil, errors.Wrap(_delayTimeMinErr, "Error parsing 'delayTimeMin' field") - } - _map["Struct"] = values.NewPlcUINT(delayTimeMin) - - // Simple Field (occupancyMode) - occupancyMode, _occupancyModeErr := readBuffer.ReadUint8("occupancyMode", 8) - if _occupancyModeErr != nil { - return nil, errors.Wrap(_occupancyModeErr, "Error parsing 'occupancyMode' field") - } - _map["Struct"] = values.NewPlcUSINT(occupancyMode) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_BuildingModeNext: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (delayTimeMin) - delayTimeMin, _delayTimeMinErr := readBuffer.ReadUint16("delayTimeMin", 16) - if _delayTimeMinErr != nil { - return nil, errors.Wrap(_delayTimeMinErr, "Error parsing 'delayTimeMin' field") - } - _map["Struct"] = values.NewPlcUINT(delayTimeMin) - - // Simple Field (buildingMode) - buildingMode, _buildingModeErr := readBuffer.ReadUint8("buildingMode", 8) - if _buildingModeErr != nil { - return nil, errors.Wrap(_buildingModeErr, "Error parsing 'buildingMode' field") - } - _map["Struct"] = values.NewPlcUSINT(buildingMode) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_StatusLightingActuator: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (validactualvalue) - validactualvalue, _validactualvalueErr := readBuffer.ReadBit("validactualvalue") - if _validactualvalueErr != nil { - return nil, errors.Wrap(_validactualvalueErr, "Error parsing 'validactualvalue' field") - } - _map["Struct"] = values.NewPlcBOOL(validactualvalue) - - // Simple Field (locked) - locked, _lockedErr := readBuffer.ReadBit("locked") - if _lockedErr != nil { - return nil, errors.Wrap(_lockedErr, "Error parsing 'locked' field") - } - _map["Struct"] = values.NewPlcBOOL(locked) - - // Simple Field (forced) - forced, _forcedErr := readBuffer.ReadBit("forced") - if _forcedErr != nil { - return nil, errors.Wrap(_forcedErr, "Error parsing 'forced' field") - } - _map["Struct"] = values.NewPlcBOOL(forced) - - // Simple Field (nightmodeactive) - nightmodeactive, _nightmodeactiveErr := readBuffer.ReadBit("nightmodeactive") - if _nightmodeactiveErr != nil { - return nil, errors.Wrap(_nightmodeactiveErr, "Error parsing 'nightmodeactive' field") - } - _map["Struct"] = values.NewPlcBOOL(nightmodeactive) - - // Simple Field (staircaselightingFunction) - staircaselightingFunction, _staircaselightingFunctionErr := readBuffer.ReadBit("staircaselightingFunction") - if _staircaselightingFunctionErr != nil { - return nil, errors.Wrap(_staircaselightingFunctionErr, "Error parsing 'staircaselightingFunction' field") - } - _map["Struct"] = values.NewPlcBOOL(staircaselightingFunction) - - // Simple Field (dimming) - dimming, _dimmingErr := readBuffer.ReadBit("dimming") - if _dimmingErr != nil { - return nil, errors.Wrap(_dimmingErr, "Error parsing 'dimming' field") - } - _map["Struct"] = values.NewPlcBOOL(dimming) - - // Simple Field (localoverride) - localoverride, _localoverrideErr := readBuffer.ReadBit("localoverride") - if _localoverrideErr != nil { - return nil, errors.Wrap(_localoverrideErr, "Error parsing 'localoverride' field") - } - _map["Struct"] = values.NewPlcBOOL(localoverride) - - // Simple Field (failure) - failure, _failureErr := readBuffer.ReadBit("failure") - if _failureErr != nil { - return nil, errors.Wrap(_failureErr, "Error parsing 'failure' field") - } - _map["Struct"] = values.NewPlcBOOL(failure) - - // Simple Field (actualvalue) - actualvalue, _actualvalueErr := readBuffer.ReadUint8("actualvalue", 8) - if _actualvalueErr != nil { - return nil, errors.Wrap(_actualvalueErr, "Error parsing 'actualvalue' field") - } - _map["Struct"] = values.NewPlcUSINT(actualvalue) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_Version: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (magicNumber) - magicNumber, _magicNumberErr := readBuffer.ReadUint8("magicNumber", 5) - if _magicNumberErr != nil { - return nil, errors.Wrap(_magicNumberErr, "Error parsing 'magicNumber' field") - } - _map["Struct"] = values.NewPlcUSINT(magicNumber) - - // Simple Field (versionNumber) - versionNumber, _versionNumberErr := readBuffer.ReadUint8("versionNumber", 5) - if _versionNumberErr != nil { - return nil, errors.Wrap(_versionNumberErr, "Error parsing 'versionNumber' field") - } - _map["Struct"] = values.NewPlcUSINT(versionNumber) - - // Simple Field (revisionNumber) - revisionNumber, _revisionNumberErr := readBuffer.ReadUint8("revisionNumber", 6) - if _revisionNumberErr != nil { - return nil, errors.Wrap(_revisionNumberErr, "Error parsing 'revisionNumber' field") - } - _map["Struct"] = values.NewPlcUSINT(revisionNumber) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_AlarmInfo: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (logNumber) - logNumber, _logNumberErr := readBuffer.ReadUint8("logNumber", 8) - if _logNumberErr != nil { - return nil, errors.Wrap(_logNumberErr, "Error parsing 'logNumber' field") - } - _map["Struct"] = values.NewPlcUSINT(logNumber) - - // Simple Field (alarmPriority) - alarmPriority, _alarmPriorityErr := readBuffer.ReadUint8("alarmPriority", 8) - if _alarmPriorityErr != nil { - return nil, errors.Wrap(_alarmPriorityErr, "Error parsing 'alarmPriority' field") - } - _map["Struct"] = values.NewPlcUSINT(alarmPriority) - - // Simple Field (applicationArea) - applicationArea, _applicationAreaErr := readBuffer.ReadUint8("applicationArea", 8) - if _applicationAreaErr != nil { - return nil, errors.Wrap(_applicationAreaErr, "Error parsing 'applicationArea' field") - } - _map["Struct"] = values.NewPlcUSINT(applicationArea) - - // Simple Field (errorClass) - errorClass, _errorClassErr := readBuffer.ReadUint8("errorClass", 8) - if _errorClassErr != nil { - return nil, errors.Wrap(_errorClassErr, "Error parsing 'errorClass' field") - } - _map["Struct"] = values.NewPlcUSINT(errorClass) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (errorcodeSup) - errorcodeSup, _errorcodeSupErr := readBuffer.ReadBit("errorcodeSup") - if _errorcodeSupErr != nil { - return nil, errors.Wrap(_errorcodeSupErr, "Error parsing 'errorcodeSup' field") - } - _map["Struct"] = values.NewPlcBOOL(errorcodeSup) - - // Simple Field (alarmtextSup) - alarmtextSup, _alarmtextSupErr := readBuffer.ReadBit("alarmtextSup") - if _alarmtextSupErr != nil { - return nil, errors.Wrap(_alarmtextSupErr, "Error parsing 'alarmtextSup' field") - } - _map["Struct"] = values.NewPlcBOOL(alarmtextSup) - - // Simple Field (timestampSup) - timestampSup, _timestampSupErr := readBuffer.ReadBit("timestampSup") - if _timestampSupErr != nil { - return nil, errors.Wrap(_timestampSupErr, "Error parsing 'timestampSup' field") - } - _map["Struct"] = values.NewPlcBOOL(timestampSup) - - // Simple Field (ackSup) - ackSup, _ackSupErr := readBuffer.ReadBit("ackSup") - if _ackSupErr != nil { - return nil, errors.Wrap(_ackSupErr, "Error parsing 'ackSup' field") - } - _map["Struct"] = values.NewPlcBOOL(ackSup) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 5); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (locked) - locked, _lockedErr := readBuffer.ReadBit("locked") - if _lockedErr != nil { - return nil, errors.Wrap(_lockedErr, "Error parsing 'locked' field") - } - _map["Struct"] = values.NewPlcBOOL(locked) - - // Simple Field (alarmunack) - alarmunack, _alarmunackErr := readBuffer.ReadBit("alarmunack") - if _alarmunackErr != nil { - return nil, errors.Wrap(_alarmunackErr, "Error parsing 'alarmunack' field") - } - _map["Struct"] = values.NewPlcBOOL(alarmunack) - - // Simple Field (inalarm) - inalarm, _inalarmErr := readBuffer.ReadBit("inalarm") - if _inalarmErr != nil { - return nil, errors.Wrap(_inalarmErr, "Error parsing 'inalarm' field") - } - _map["Struct"] = values.NewPlcBOOL(inalarm) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_TempRoomSetpSetF16_3: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (tempsetpcomf) - tempsetpcomf, _tempsetpcomfErr := readBuffer.ReadFloat32("tempsetpcomf", 16) - if _tempsetpcomfErr != nil { - return nil, errors.Wrap(_tempsetpcomfErr, "Error parsing 'tempsetpcomf' field") - } - _map["Struct"] = values.NewPlcREAL(tempsetpcomf) - - // Simple Field (tempsetpstdby) - tempsetpstdby, _tempsetpstdbyErr := readBuffer.ReadFloat32("tempsetpstdby", 16) - if _tempsetpstdbyErr != nil { - return nil, errors.Wrap(_tempsetpstdbyErr, "Error parsing 'tempsetpstdby' field") - } - _map["Struct"] = values.NewPlcREAL(tempsetpstdby) - - // Simple Field (tempsetpeco) - tempsetpeco, _tempsetpecoErr := readBuffer.ReadFloat32("tempsetpeco", 16) - if _tempsetpecoErr != nil { - return nil, errors.Wrap(_tempsetpecoErr, "Error parsing 'tempsetpeco' field") - } - _map["Struct"] = values.NewPlcREAL(tempsetpeco) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_TempRoomSetpSetShiftF16_3: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (tempsetpshiftcomf) - tempsetpshiftcomf, _tempsetpshiftcomfErr := readBuffer.ReadFloat32("tempsetpshiftcomf", 16) - if _tempsetpshiftcomfErr != nil { - return nil, errors.Wrap(_tempsetpshiftcomfErr, "Error parsing 'tempsetpshiftcomf' field") - } - _map["Struct"] = values.NewPlcREAL(tempsetpshiftcomf) - - // Simple Field (tempsetpshiftstdby) - tempsetpshiftstdby, _tempsetpshiftstdbyErr := readBuffer.ReadFloat32("tempsetpshiftstdby", 16) - if _tempsetpshiftstdbyErr != nil { - return nil, errors.Wrap(_tempsetpshiftstdbyErr, "Error parsing 'tempsetpshiftstdby' field") - } - _map["Struct"] = values.NewPlcREAL(tempsetpshiftstdby) - - // Simple Field (tempsetpshifteco) - tempsetpshifteco, _tempsetpshiftecoErr := readBuffer.ReadFloat32("tempsetpshifteco", 16) - if _tempsetpshiftecoErr != nil { - return nil, errors.Wrap(_tempsetpshiftecoErr, "Error parsing 'tempsetpshifteco' field") - } - _map["Struct"] = values.NewPlcREAL(tempsetpshifteco) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_Scaling_Speed: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (timePeriod) - timePeriod, _timePeriodErr := readBuffer.ReadUint16("timePeriod", 16) - if _timePeriodErr != nil { - return nil, errors.Wrap(_timePeriodErr, "Error parsing 'timePeriod' field") - } - _map["Struct"] = values.NewPlcUINT(timePeriod) - - // Simple Field (percent) - percent, _percentErr := readBuffer.ReadUint8("percent", 8) - if _percentErr != nil { - return nil, errors.Wrap(_percentErr, "Error parsing 'percent' field") - } - _map["Struct"] = values.NewPlcUSINT(percent) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_Scaling_Step_Time: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (timePeriod) - timePeriod, _timePeriodErr := readBuffer.ReadUint16("timePeriod", 16) - if _timePeriodErr != nil { - return nil, errors.Wrap(_timePeriodErr, "Error parsing 'timePeriod' field") - } - _map["Struct"] = values.NewPlcUINT(timePeriod) - - // Simple Field (percent) - percent, _percentErr := readBuffer.ReadUint8("percent", 8) - if _percentErr != nil { - return nil, errors.Wrap(_percentErr, "Error parsing 'percent' field") - } - _map["Struct"] = values.NewPlcUSINT(percent) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_MeteringValue: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (countval) - countval, _countvalErr := readBuffer.ReadInt32("countval", 32) - if _countvalErr != nil { - return nil, errors.Wrap(_countvalErr, "Error parsing 'countval' field") - } - _map["Struct"] = values.NewPlcDINT(countval) - - // Simple Field (valinffield) - valinffield, _valinffieldErr := readBuffer.ReadUint8("valinffield", 8) - if _valinffieldErr != nil { - return nil, errors.Wrap(_valinffieldErr, "Error parsing 'valinffield' field") - } - _map["Struct"] = values.NewPlcUSINT(valinffield) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 3); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (alarmunack) - alarmunack, _alarmunackErr := readBuffer.ReadBit("alarmunack") - if _alarmunackErr != nil { - return nil, errors.Wrap(_alarmunackErr, "Error parsing 'alarmunack' field") - } - _map["Struct"] = values.NewPlcBOOL(alarmunack) - - // Simple Field (inalarm) - inalarm, _inalarmErr := readBuffer.ReadBit("inalarm") - if _inalarmErr != nil { - return nil, errors.Wrap(_inalarmErr, "Error parsing 'inalarm' field") - } - _map["Struct"] = values.NewPlcBOOL(inalarm) - - // Simple Field (overridden) - overridden, _overriddenErr := readBuffer.ReadBit("overridden") - if _overriddenErr != nil { - return nil, errors.Wrap(_overriddenErr, "Error parsing 'overridden' field") - } - _map["Struct"] = values.NewPlcBOOL(overridden) - - // Simple Field (fault) - fault, _faultErr := readBuffer.ReadBit("fault") - if _faultErr != nil { - return nil, errors.Wrap(_faultErr, "Error parsing 'fault' field") - } - _map["Struct"] = values.NewPlcBOOL(fault) - - // Simple Field (outofservice) - outofservice, _outofserviceErr := readBuffer.ReadBit("outofservice") - if _outofserviceErr != nil { - return nil, errors.Wrap(_outofserviceErr, "Error parsing 'outofservice' field") - } - _map["Struct"] = values.NewPlcBOOL(outofservice) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_MBus_Address: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (manufactid) - manufactid, _manufactidErr := readBuffer.ReadUint16("manufactid", 16) - if _manufactidErr != nil { - return nil, errors.Wrap(_manufactidErr, "Error parsing 'manufactid' field") - } - _map["Struct"] = values.NewPlcUINT(manufactid) - - // Simple Field (identnumber) - identnumber, _identnumberErr := readBuffer.ReadUint32("identnumber", 32) - if _identnumberErr != nil { - return nil, errors.Wrap(_identnumberErr, "Error parsing 'identnumber' field") - } - _map["Struct"] = values.NewPlcUDINT(identnumber) - - // Simple Field (version) - version, _versionErr := readBuffer.ReadUint8("version", 8) - if _versionErr != nil { - return nil, errors.Wrap(_versionErr, "Error parsing 'version' field") - } - _map["Struct"] = values.NewPlcUSINT(version) - - // Simple Field (medium) - medium, _mediumErr := readBuffer.ReadUint8("medium", 8) - if _mediumErr != nil { - return nil, errors.Wrap(_mediumErr, "Error parsing 'medium' field") - } - _map["Struct"] = values.NewPlcUSINT(medium) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_Colour_RGB: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (r) - r, _rErr := readBuffer.ReadUint8("r", 8) - if _rErr != nil { - return nil, errors.Wrap(_rErr, "Error parsing 'r' field") - } - _map["Struct"] = values.NewPlcUSINT(r) - - // Simple Field (g) - g, _gErr := readBuffer.ReadUint8("g", 8) - if _gErr != nil { - return nil, errors.Wrap(_gErr, "Error parsing 'g' field") - } - _map["Struct"] = values.NewPlcUSINT(g) - - // Simple Field (b) - b, _bErr := readBuffer.ReadUint8("b", 8) - if _bErr != nil { - return nil, errors.Wrap(_bErr, "Error parsing 'b' field") - } - _map["Struct"] = values.NewPlcUSINT(b) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_LanguageCodeAlpha2_ASCII: // STRING - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadString("value", uint32(16), "ASCII") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcSTRING(value), nil - case datapointType == KnxDatapointType_DPT_Tariff_ActiveEnergy: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (activeelectricalenergy) - activeelectricalenergy, _activeelectricalenergyErr := readBuffer.ReadInt32("activeelectricalenergy", 32) - if _activeelectricalenergyErr != nil { - return nil, errors.Wrap(_activeelectricalenergyErr, "Error parsing 'activeelectricalenergy' field") - } - _map["Struct"] = values.NewPlcDINT(activeelectricalenergy) - - // Simple Field (tariff) - tariff, _tariffErr := readBuffer.ReadUint8("tariff", 8) - if _tariffErr != nil { - return nil, errors.Wrap(_tariffErr, "Error parsing 'tariff' field") - } - _map["Struct"] = values.NewPlcUSINT(tariff) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 6); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (electricalengergyvalidity) - electricalengergyvalidity, _electricalengergyvalidityErr := readBuffer.ReadBit("electricalengergyvalidity") - if _electricalengergyvalidityErr != nil { - return nil, errors.Wrap(_electricalengergyvalidityErr, "Error parsing 'electricalengergyvalidity' field") - } - _map["Struct"] = values.NewPlcBOOL(electricalengergyvalidity) - - // Simple Field (tariffvalidity) - tariffvalidity, _tariffvalidityErr := readBuffer.ReadBit("tariffvalidity") - if _tariffvalidityErr != nil { - return nil, errors.Wrap(_tariffvalidityErr, "Error parsing 'tariffvalidity' field") - } - _map["Struct"] = values.NewPlcBOOL(tariffvalidity) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_Prioritised_Mode_Control: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (deactivationOfPriority) - deactivationOfPriority, _deactivationOfPriorityErr := readBuffer.ReadBit("deactivationOfPriority") - if _deactivationOfPriorityErr != nil { - return nil, errors.Wrap(_deactivationOfPriorityErr, "Error parsing 'deactivationOfPriority' field") - } - _map["Struct"] = values.NewPlcBOOL(deactivationOfPriority) - - // Simple Field (priorityLevel) - priorityLevel, _priorityLevelErr := readBuffer.ReadUint8("priorityLevel", 3) - if _priorityLevelErr != nil { - return nil, errors.Wrap(_priorityLevelErr, "Error parsing 'priorityLevel' field") - } - _map["Struct"] = values.NewPlcUSINT(priorityLevel) - - // Simple Field (modeLevel) - modeLevel, _modeLevelErr := readBuffer.ReadUint8("modeLevel", 4) - if _modeLevelErr != nil { - return nil, errors.Wrap(_modeLevelErr, "Error parsing 'modeLevel' field") - } - _map["Struct"] = values.NewPlcUSINT(modeLevel) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_DALI_Control_Gear_Diagnostic: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 5); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (convertorError) - convertorError, _convertorErrorErr := readBuffer.ReadBit("convertorError") - if _convertorErrorErr != nil { - return nil, errors.Wrap(_convertorErrorErr, "Error parsing 'convertorError' field") - } - _map["Struct"] = values.NewPlcBOOL(convertorError) - - // Simple Field (ballastFailure) - ballastFailure, _ballastFailureErr := readBuffer.ReadBit("ballastFailure") - if _ballastFailureErr != nil { - return nil, errors.Wrap(_ballastFailureErr, "Error parsing 'ballastFailure' field") - } - _map["Struct"] = values.NewPlcBOOL(ballastFailure) - - // Simple Field (lampFailure) - lampFailure, _lampFailureErr := readBuffer.ReadBit("lampFailure") - if _lampFailureErr != nil { - return nil, errors.Wrap(_lampFailureErr, "Error parsing 'lampFailure' field") - } - _map["Struct"] = values.NewPlcBOOL(lampFailure) - - // Simple Field (readOrResponse) - readOrResponse, _readOrResponseErr := readBuffer.ReadBit("readOrResponse") - if _readOrResponseErr != nil { - return nil, errors.Wrap(_readOrResponseErr, "Error parsing 'readOrResponse' field") - } - _map["Struct"] = values.NewPlcBOOL(readOrResponse) - - // Simple Field (addressIndicator) - addressIndicator, _addressIndicatorErr := readBuffer.ReadBit("addressIndicator") - if _addressIndicatorErr != nil { - return nil, errors.Wrap(_addressIndicatorErr, "Error parsing 'addressIndicator' field") - } - _map["Struct"] = values.NewPlcBOOL(addressIndicator) - - // Simple Field (daliDeviceAddressOrDaliGroupAddress) - daliDeviceAddressOrDaliGroupAddress, _daliDeviceAddressOrDaliGroupAddressErr := readBuffer.ReadUint8("daliDeviceAddressOrDaliGroupAddress", 6) - if _daliDeviceAddressOrDaliGroupAddressErr != nil { - return nil, errors.Wrap(_daliDeviceAddressOrDaliGroupAddressErr, "Error parsing 'daliDeviceAddressOrDaliGroupAddress' field") - } - _map["Struct"] = values.NewPlcUSINT(daliDeviceAddressOrDaliGroupAddress) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_DALI_Diagnostics: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (ballastFailure) - ballastFailure, _ballastFailureErr := readBuffer.ReadBit("ballastFailure") - if _ballastFailureErr != nil { - return nil, errors.Wrap(_ballastFailureErr, "Error parsing 'ballastFailure' field") - } - _map["Struct"] = values.NewPlcBOOL(ballastFailure) - - // Simple Field (lampFailure) - lampFailure, _lampFailureErr := readBuffer.ReadBit("lampFailure") - if _lampFailureErr != nil { - return nil, errors.Wrap(_lampFailureErr, "Error parsing 'lampFailure' field") - } - _map["Struct"] = values.NewPlcBOOL(lampFailure) - - // Simple Field (deviceAddress) - deviceAddress, _deviceAddressErr := readBuffer.ReadUint8("deviceAddress", 6) - if _deviceAddressErr != nil { - return nil, errors.Wrap(_deviceAddressErr, "Error parsing 'deviceAddress' field") - } - _map["Struct"] = values.NewPlcUSINT(deviceAddress) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_CombinedPosition: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (heightPosition) - heightPosition, _heightPositionErr := readBuffer.ReadUint8("heightPosition", 8) - if _heightPositionErr != nil { - return nil, errors.Wrap(_heightPositionErr, "Error parsing 'heightPosition' field") - } - _map["Struct"] = values.NewPlcUSINT(heightPosition) - - // Simple Field (slatsPosition) - slatsPosition, _slatsPositionErr := readBuffer.ReadUint8("slatsPosition", 8) - if _slatsPositionErr != nil { - return nil, errors.Wrap(_slatsPositionErr, "Error parsing 'slatsPosition' field") - } - _map["Struct"] = values.NewPlcUSINT(slatsPosition) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 6); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (validityHeightPosition) - validityHeightPosition, _validityHeightPositionErr := readBuffer.ReadBit("validityHeightPosition") - if _validityHeightPositionErr != nil { - return nil, errors.Wrap(_validityHeightPositionErr, "Error parsing 'validityHeightPosition' field") - } - _map["Struct"] = values.NewPlcBOOL(validityHeightPosition) - - // Simple Field (validitySlatsPosition) - validitySlatsPosition, _validitySlatsPositionErr := readBuffer.ReadBit("validitySlatsPosition") - if _validitySlatsPositionErr != nil { - return nil, errors.Wrap(_validitySlatsPositionErr, "Error parsing 'validitySlatsPosition' field") - } - _map["Struct"] = values.NewPlcBOOL(validitySlatsPosition) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_StatusSAB: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (heightPosition) - heightPosition, _heightPositionErr := readBuffer.ReadUint8("heightPosition", 8) - if _heightPositionErr != nil { - return nil, errors.Wrap(_heightPositionErr, "Error parsing 'heightPosition' field") - } - _map["Struct"] = values.NewPlcUSINT(heightPosition) - - // Simple Field (slatsPosition) - slatsPosition, _slatsPositionErr := readBuffer.ReadUint8("slatsPosition", 8) - if _slatsPositionErr != nil { - return nil, errors.Wrap(_slatsPositionErr, "Error parsing 'slatsPosition' field") - } - _map["Struct"] = values.NewPlcUSINT(slatsPosition) - - // Simple Field (upperEndPosReached) - upperEndPosReached, _upperEndPosReachedErr := readBuffer.ReadBit("upperEndPosReached") - if _upperEndPosReachedErr != nil { - return nil, errors.Wrap(_upperEndPosReachedErr, "Error parsing 'upperEndPosReached' field") - } - _map["Struct"] = values.NewPlcBOOL(upperEndPosReached) - - // Simple Field (lowerEndPosReached) - lowerEndPosReached, _lowerEndPosReachedErr := readBuffer.ReadBit("lowerEndPosReached") - if _lowerEndPosReachedErr != nil { - return nil, errors.Wrap(_lowerEndPosReachedErr, "Error parsing 'lowerEndPosReached' field") - } - _map["Struct"] = values.NewPlcBOOL(lowerEndPosReached) - - // Simple Field (lowerPredefPosReachedTypHeight100PercentSlatsAngle100Percent) - lowerPredefPosReachedTypHeight100PercentSlatsAngle100Percent, _lowerPredefPosReachedTypHeight100PercentSlatsAngle100PercentErr := readBuffer.ReadBit("lowerPredefPosReachedTypHeight100PercentSlatsAngle100Percent") - if _lowerPredefPosReachedTypHeight100PercentSlatsAngle100PercentErr != nil { - return nil, errors.Wrap(_lowerPredefPosReachedTypHeight100PercentSlatsAngle100PercentErr, "Error parsing 'lowerPredefPosReachedTypHeight100PercentSlatsAngle100Percent' field") - } - _map["Struct"] = values.NewPlcBOOL(lowerPredefPosReachedTypHeight100PercentSlatsAngle100Percent) - - // Simple Field (targetPosDrive) - targetPosDrive, _targetPosDriveErr := readBuffer.ReadBit("targetPosDrive") - if _targetPosDriveErr != nil { - return nil, errors.Wrap(_targetPosDriveErr, "Error parsing 'targetPosDrive' field") - } - _map["Struct"] = values.NewPlcBOOL(targetPosDrive) - - // Simple Field (restrictionOfTargetHeightPosPosCanNotBeReached) - restrictionOfTargetHeightPosPosCanNotBeReached, _restrictionOfTargetHeightPosPosCanNotBeReachedErr := readBuffer.ReadBit("restrictionOfTargetHeightPosPosCanNotBeReached") - if _restrictionOfTargetHeightPosPosCanNotBeReachedErr != nil { - return nil, errors.Wrap(_restrictionOfTargetHeightPosPosCanNotBeReachedErr, "Error parsing 'restrictionOfTargetHeightPosPosCanNotBeReached' field") - } - _map["Struct"] = values.NewPlcBOOL(restrictionOfTargetHeightPosPosCanNotBeReached) - - // Simple Field (restrictionOfSlatsHeightPosPosCanNotBeReached) - restrictionOfSlatsHeightPosPosCanNotBeReached, _restrictionOfSlatsHeightPosPosCanNotBeReachedErr := readBuffer.ReadBit("restrictionOfSlatsHeightPosPosCanNotBeReached") - if _restrictionOfSlatsHeightPosPosCanNotBeReachedErr != nil { - return nil, errors.Wrap(_restrictionOfSlatsHeightPosPosCanNotBeReachedErr, "Error parsing 'restrictionOfSlatsHeightPosPosCanNotBeReached' field") - } - _map["Struct"] = values.NewPlcBOOL(restrictionOfSlatsHeightPosPosCanNotBeReached) - - // Simple Field (atLeastOneOfTheInputsWindRainFrostAlarmIsInAlarm) - atLeastOneOfTheInputsWindRainFrostAlarmIsInAlarm, _atLeastOneOfTheInputsWindRainFrostAlarmIsInAlarmErr := readBuffer.ReadBit("atLeastOneOfTheInputsWindRainFrostAlarmIsInAlarm") - if _atLeastOneOfTheInputsWindRainFrostAlarmIsInAlarmErr != nil { - return nil, errors.Wrap(_atLeastOneOfTheInputsWindRainFrostAlarmIsInAlarmErr, "Error parsing 'atLeastOneOfTheInputsWindRainFrostAlarmIsInAlarm' field") - } - _map["Struct"] = values.NewPlcBOOL(atLeastOneOfTheInputsWindRainFrostAlarmIsInAlarm) - - // Simple Field (upDownPositionIsForcedByMoveupdownforcedInput) - upDownPositionIsForcedByMoveupdownforcedInput, _upDownPositionIsForcedByMoveupdownforcedInputErr := readBuffer.ReadBit("upDownPositionIsForcedByMoveupdownforcedInput") - if _upDownPositionIsForcedByMoveupdownforcedInputErr != nil { - return nil, errors.Wrap(_upDownPositionIsForcedByMoveupdownforcedInputErr, "Error parsing 'upDownPositionIsForcedByMoveupdownforcedInput' field") - } - _map["Struct"] = values.NewPlcBOOL(upDownPositionIsForcedByMoveupdownforcedInput) - - // Simple Field (movementIsLockedEGByDevicelockedInput) - movementIsLockedEGByDevicelockedInput, _movementIsLockedEGByDevicelockedInputErr := readBuffer.ReadBit("movementIsLockedEGByDevicelockedInput") - if _movementIsLockedEGByDevicelockedInputErr != nil { - return nil, errors.Wrap(_movementIsLockedEGByDevicelockedInputErr, "Error parsing 'movementIsLockedEGByDevicelockedInput' field") - } - _map["Struct"] = values.NewPlcBOOL(movementIsLockedEGByDevicelockedInput) - - // Simple Field (actuatorSetvalueIsLocallyOverriddenEGViaALocalUserInterface) - actuatorSetvalueIsLocallyOverriddenEGViaALocalUserInterface, _actuatorSetvalueIsLocallyOverriddenEGViaALocalUserInterfaceErr := readBuffer.ReadBit("actuatorSetvalueIsLocallyOverriddenEGViaALocalUserInterface") - if _actuatorSetvalueIsLocallyOverriddenEGViaALocalUserInterfaceErr != nil { - return nil, errors.Wrap(_actuatorSetvalueIsLocallyOverriddenEGViaALocalUserInterfaceErr, "Error parsing 'actuatorSetvalueIsLocallyOverriddenEGViaALocalUserInterface' field") - } - _map["Struct"] = values.NewPlcBOOL(actuatorSetvalueIsLocallyOverriddenEGViaALocalUserInterface) - - // Simple Field (generalFailureOfTheActuatorOrTheDrive) - generalFailureOfTheActuatorOrTheDrive, _generalFailureOfTheActuatorOrTheDriveErr := readBuffer.ReadBit("generalFailureOfTheActuatorOrTheDrive") - if _generalFailureOfTheActuatorOrTheDriveErr != nil { - return nil, errors.Wrap(_generalFailureOfTheActuatorOrTheDriveErr, "Error parsing 'generalFailureOfTheActuatorOrTheDrive' field") - } - _map["Struct"] = values.NewPlcBOOL(generalFailureOfTheActuatorOrTheDrive) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 3); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (validityHeightPos) - validityHeightPos, _validityHeightPosErr := readBuffer.ReadBit("validityHeightPos") - if _validityHeightPosErr != nil { - return nil, errors.Wrap(_validityHeightPosErr, "Error parsing 'validityHeightPos' field") - } - _map["Struct"] = values.NewPlcBOOL(validityHeightPos) - - // Simple Field (validitySlatsPos) - validitySlatsPos, _validitySlatsPosErr := readBuffer.ReadBit("validitySlatsPos") - if _validitySlatsPosErr != nil { - return nil, errors.Wrap(_validitySlatsPosErr, "Error parsing 'validitySlatsPos' field") - } - _map["Struct"] = values.NewPlcBOOL(validitySlatsPos) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_Colour_xyY: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (xAxis) - xAxis, _xAxisErr := readBuffer.ReadUint16("xAxis", 16) - if _xAxisErr != nil { - return nil, errors.Wrap(_xAxisErr, "Error parsing 'xAxis' field") - } - _map["Struct"] = values.NewPlcUINT(xAxis) - - // Simple Field (yAxis) - yAxis, _yAxisErr := readBuffer.ReadUint16("yAxis", 16) - if _yAxisErr != nil { - return nil, errors.Wrap(_yAxisErr, "Error parsing 'yAxis' field") - } - _map["Struct"] = values.NewPlcUINT(yAxis) - - // Simple Field (brightness) - brightness, _brightnessErr := readBuffer.ReadUint8("brightness", 8) - if _brightnessErr != nil { - return nil, errors.Wrap(_brightnessErr, "Error parsing 'brightness' field") - } - _map["Struct"] = values.NewPlcUSINT(brightness) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 6); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (validityXy) - validityXy, _validityXyErr := readBuffer.ReadBit("validityXy") - if _validityXyErr != nil { - return nil, errors.Wrap(_validityXyErr, "Error parsing 'validityXy' field") - } - _map["Struct"] = values.NewPlcBOOL(validityXy) - - // Simple Field (validityBrightness) - validityBrightness, _validityBrightnessErr := readBuffer.ReadBit("validityBrightness") - if _validityBrightnessErr != nil { - return nil, errors.Wrap(_validityBrightnessErr, "Error parsing 'validityBrightness' field") - } - _map["Struct"] = values.NewPlcBOOL(validityBrightness) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_Converter_Status: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (converterModeAccordingToTheDaliConverterStateMachine) - converterModeAccordingToTheDaliConverterStateMachine, _converterModeAccordingToTheDaliConverterStateMachineErr := readBuffer.ReadUint8("converterModeAccordingToTheDaliConverterStateMachine", 4) - if _converterModeAccordingToTheDaliConverterStateMachineErr != nil { - return nil, errors.Wrap(_converterModeAccordingToTheDaliConverterStateMachineErr, "Error parsing 'converterModeAccordingToTheDaliConverterStateMachine' field") - } - _map["Struct"] = values.NewPlcUSINT(converterModeAccordingToTheDaliConverterStateMachine) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 2); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (hardwiredSwitchIsActive) - hardwiredSwitchIsActive, _hardwiredSwitchIsActiveErr := readBuffer.ReadBit("hardwiredSwitchIsActive") - if _hardwiredSwitchIsActiveErr != nil { - return nil, errors.Wrap(_hardwiredSwitchIsActiveErr, "Error parsing 'hardwiredSwitchIsActive' field") - } - _map["Struct"] = values.NewPlcBOOL(hardwiredSwitchIsActive) - - // Simple Field (hardwiredInhibitIsActive) - hardwiredInhibitIsActive, _hardwiredInhibitIsActiveErr := readBuffer.ReadBit("hardwiredInhibitIsActive") - if _hardwiredInhibitIsActiveErr != nil { - return nil, errors.Wrap(_hardwiredInhibitIsActiveErr, "Error parsing 'hardwiredInhibitIsActive' field") - } - _map["Struct"] = values.NewPlcBOOL(hardwiredInhibitIsActive) - - // Simple Field (functionTestPending) - functionTestPending, _functionTestPendingErr := readBuffer.ReadUint8("functionTestPending", 2) - if _functionTestPendingErr != nil { - return nil, errors.Wrap(_functionTestPendingErr, "Error parsing 'functionTestPending' field") - } - _map["Struct"] = values.NewPlcUSINT(functionTestPending) - - // Simple Field (durationTestPending) - durationTestPending, _durationTestPendingErr := readBuffer.ReadUint8("durationTestPending", 2) - if _durationTestPendingErr != nil { - return nil, errors.Wrap(_durationTestPendingErr, "Error parsing 'durationTestPending' field") - } - _map["Struct"] = values.NewPlcUSINT(durationTestPending) - - // Simple Field (partialDurationTestPending) - partialDurationTestPending, _partialDurationTestPendingErr := readBuffer.ReadUint8("partialDurationTestPending", 2) - if _partialDurationTestPendingErr != nil { - return nil, errors.Wrap(_partialDurationTestPendingErr, "Error parsing 'partialDurationTestPending' field") - } - _map["Struct"] = values.NewPlcUSINT(partialDurationTestPending) - - // Simple Field (converterFailure) - converterFailure, _converterFailureErr := readBuffer.ReadUint8("converterFailure", 2) - if _converterFailureErr != nil { - return nil, errors.Wrap(_converterFailureErr, "Error parsing 'converterFailure' field") - } - _map["Struct"] = values.NewPlcUSINT(converterFailure) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_Converter_Test_Result: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (ltrf) - ltrf, _ltrfErr := readBuffer.ReadUint8("ltrf", 4) - if _ltrfErr != nil { - return nil, errors.Wrap(_ltrfErr, "Error parsing 'ltrf' field") - } - _map["Struct"] = values.NewPlcUSINT(ltrf) - - // Simple Field (ltrd) - ltrd, _ltrdErr := readBuffer.ReadUint8("ltrd", 4) - if _ltrdErr != nil { - return nil, errors.Wrap(_ltrdErr, "Error parsing 'ltrd' field") - } - _map["Struct"] = values.NewPlcUSINT(ltrd) - - // Simple Field (ltrp) - ltrp, _ltrpErr := readBuffer.ReadUint8("ltrp", 4) - if _ltrpErr != nil { - return nil, errors.Wrap(_ltrpErr, "Error parsing 'ltrp' field") - } - _map["Struct"] = values.NewPlcUSINT(ltrp) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (sf) - sf, _sfErr := readBuffer.ReadUint8("sf", 2) - if _sfErr != nil { - return nil, errors.Wrap(_sfErr, "Error parsing 'sf' field") - } - _map["Struct"] = values.NewPlcUSINT(sf) - - // Simple Field (sd) - sd, _sdErr := readBuffer.ReadUint8("sd", 2) - if _sdErr != nil { - return nil, errors.Wrap(_sdErr, "Error parsing 'sd' field") - } - _map["Struct"] = values.NewPlcUSINT(sd) - - // Simple Field (sp) - sp, _spErr := readBuffer.ReadUint8("sp", 2) - if _spErr != nil { - return nil, errors.Wrap(_spErr, "Error parsing 'sp' field") - } - _map["Struct"] = values.NewPlcUSINT(sp) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 2); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (ldtr) - ldtr, _ldtrErr := readBuffer.ReadUint16("ldtr", 16) - if _ldtrErr != nil { - return nil, errors.Wrap(_ldtrErr, "Error parsing 'ldtr' field") - } - _map["Struct"] = values.NewPlcUINT(ldtr) - - // Simple Field (lpdtr) - lpdtr, _lpdtrErr := readBuffer.ReadUint8("lpdtr", 8) - if _lpdtrErr != nil { - return nil, errors.Wrap(_lpdtrErr, "Error parsing 'lpdtr' field") - } - _map["Struct"] = values.NewPlcUSINT(lpdtr) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_Battery_Info: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 5); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (batteryFailure) - batteryFailure, _batteryFailureErr := readBuffer.ReadBit("batteryFailure") - if _batteryFailureErr != nil { - return nil, errors.Wrap(_batteryFailureErr, "Error parsing 'batteryFailure' field") - } - _map["Struct"] = values.NewPlcBOOL(batteryFailure) - - // Simple Field (batteryDurationFailure) - batteryDurationFailure, _batteryDurationFailureErr := readBuffer.ReadBit("batteryDurationFailure") - if _batteryDurationFailureErr != nil { - return nil, errors.Wrap(_batteryDurationFailureErr, "Error parsing 'batteryDurationFailure' field") - } - _map["Struct"] = values.NewPlcBOOL(batteryDurationFailure) - - // Simple Field (batteryFullyCharged) - batteryFullyCharged, _batteryFullyChargedErr := readBuffer.ReadBit("batteryFullyCharged") - if _batteryFullyChargedErr != nil { - return nil, errors.Wrap(_batteryFullyChargedErr, "Error parsing 'batteryFullyCharged' field") - } - _map["Struct"] = values.NewPlcBOOL(batteryFullyCharged) - - // Simple Field (batteryChargeLevel) - batteryChargeLevel, _batteryChargeLevelErr := readBuffer.ReadUint8("batteryChargeLevel", 8) - if _batteryChargeLevelErr != nil { - return nil, errors.Wrap(_batteryChargeLevelErr, "Error parsing 'batteryChargeLevel' field") - } - _map["Struct"] = values.NewPlcUSINT(batteryChargeLevel) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_Brightness_Colour_Temperature_Transition: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (ms) - ms, _msErr := readBuffer.ReadUint16("ms", 16) - if _msErr != nil { - return nil, errors.Wrap(_msErr, "Error parsing 'ms' field") - } - _map["Struct"] = values.NewPlcUINT(ms) - - // Simple Field (temperatureK) - temperatureK, _temperatureKErr := readBuffer.ReadUint16("temperatureK", 16) - if _temperatureKErr != nil { - return nil, errors.Wrap(_temperatureKErr, "Error parsing 'temperatureK' field") - } - _map["Struct"] = values.NewPlcUINT(temperatureK) - - // Simple Field (percent) - percent, _percentErr := readBuffer.ReadUint8("percent", 8) - if _percentErr != nil { - return nil, errors.Wrap(_percentErr, "Error parsing 'percent' field") - } - _map["Struct"] = values.NewPlcUSINT(percent) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 5); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (validityOfTheTimePeriod) - validityOfTheTimePeriod, _validityOfTheTimePeriodErr := readBuffer.ReadBit("validityOfTheTimePeriod") - if _validityOfTheTimePeriodErr != nil { - return nil, errors.Wrap(_validityOfTheTimePeriodErr, "Error parsing 'validityOfTheTimePeriod' field") - } - _map["Struct"] = values.NewPlcBOOL(validityOfTheTimePeriod) - - // Simple Field (validityOfTheAbsoluteColourTemperature) - validityOfTheAbsoluteColourTemperature, _validityOfTheAbsoluteColourTemperatureErr := readBuffer.ReadBit("validityOfTheAbsoluteColourTemperature") - if _validityOfTheAbsoluteColourTemperatureErr != nil { - return nil, errors.Wrap(_validityOfTheAbsoluteColourTemperatureErr, "Error parsing 'validityOfTheAbsoluteColourTemperature' field") - } - _map["Struct"] = values.NewPlcBOOL(validityOfTheAbsoluteColourTemperature) - - // Simple Field (validityOfTheAbsoluteBrightness) - validityOfTheAbsoluteBrightness, _validityOfTheAbsoluteBrightnessErr := readBuffer.ReadBit("validityOfTheAbsoluteBrightness") - if _validityOfTheAbsoluteBrightnessErr != nil { - return nil, errors.Wrap(_validityOfTheAbsoluteBrightnessErr, "Error parsing 'validityOfTheAbsoluteBrightness' field") - } - _map["Struct"] = values.NewPlcBOOL(validityOfTheAbsoluteBrightness) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_Brightness_Colour_Temperature_Control: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (cct) - cct, _cctErr := readBuffer.ReadBit("cct") - if _cctErr != nil { - return nil, errors.Wrap(_cctErr, "Error parsing 'cct' field") - } - _map["Struct"] = values.NewPlcBOOL(cct) - - // Simple Field (stepCodeColourTemperature) - stepCodeColourTemperature, _stepCodeColourTemperatureErr := readBuffer.ReadUint8("stepCodeColourTemperature", 3) - if _stepCodeColourTemperatureErr != nil { - return nil, errors.Wrap(_stepCodeColourTemperatureErr, "Error parsing 'stepCodeColourTemperature' field") - } - _map["Struct"] = values.NewPlcUSINT(stepCodeColourTemperature) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (cb) - cb, _cbErr := readBuffer.ReadBit("cb") - if _cbErr != nil { - return nil, errors.Wrap(_cbErr, "Error parsing 'cb' field") - } - _map["Struct"] = values.NewPlcBOOL(cb) - - // Simple Field (stepCodeBrightness) - stepCodeBrightness, _stepCodeBrightnessErr := readBuffer.ReadUint8("stepCodeBrightness", 3) - if _stepCodeBrightnessErr != nil { - return nil, errors.Wrap(_stepCodeBrightnessErr, "Error parsing 'stepCodeBrightness' field") - } - _map["Struct"] = values.NewPlcUSINT(stepCodeBrightness) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 6); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (cctAndStepCodeColourValidity) - cctAndStepCodeColourValidity, _cctAndStepCodeColourValidityErr := readBuffer.ReadBit("cctAndStepCodeColourValidity") - if _cctAndStepCodeColourValidityErr != nil { - return nil, errors.Wrap(_cctAndStepCodeColourValidityErr, "Error parsing 'cctAndStepCodeColourValidity' field") - } - _map["Struct"] = values.NewPlcBOOL(cctAndStepCodeColourValidity) - - // Simple Field (cbAndStepCodeBrightnessValidity) - cbAndStepCodeBrightnessValidity, _cbAndStepCodeBrightnessValidityErr := readBuffer.ReadBit("cbAndStepCodeBrightnessValidity") - if _cbAndStepCodeBrightnessValidityErr != nil { - return nil, errors.Wrap(_cbAndStepCodeBrightnessValidityErr, "Error parsing 'cbAndStepCodeBrightnessValidity' field") - } - _map["Struct"] = values.NewPlcBOOL(cbAndStepCodeBrightnessValidity) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_Colour_RGBW: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (colourLevelRed) - colourLevelRed, _colourLevelRedErr := readBuffer.ReadUint8("colourLevelRed", 8) - if _colourLevelRedErr != nil { - return nil, errors.Wrap(_colourLevelRedErr, "Error parsing 'colourLevelRed' field") - } - _map["Struct"] = values.NewPlcUSINT(colourLevelRed) - - // Simple Field (colourLevelGreen) - colourLevelGreen, _colourLevelGreenErr := readBuffer.ReadUint8("colourLevelGreen", 8) - if _colourLevelGreenErr != nil { - return nil, errors.Wrap(_colourLevelGreenErr, "Error parsing 'colourLevelGreen' field") - } - _map["Struct"] = values.NewPlcUSINT(colourLevelGreen) - - // Simple Field (colourLevelBlue) - colourLevelBlue, _colourLevelBlueErr := readBuffer.ReadUint8("colourLevelBlue", 8) - if _colourLevelBlueErr != nil { - return nil, errors.Wrap(_colourLevelBlueErr, "Error parsing 'colourLevelBlue' field") - } - _map["Struct"] = values.NewPlcUSINT(colourLevelBlue) - - // Simple Field (colourLevelWhite) - colourLevelWhite, _colourLevelWhiteErr := readBuffer.ReadUint8("colourLevelWhite", 8) - if _colourLevelWhiteErr != nil { - return nil, errors.Wrap(_colourLevelWhiteErr, "Error parsing 'colourLevelWhite' field") - } - _map["Struct"] = values.NewPlcUSINT(colourLevelWhite) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (mr) - mr, _mrErr := readBuffer.ReadBit("mr") - if _mrErr != nil { - return nil, errors.Wrap(_mrErr, "Error parsing 'mr' field") - } - _map["Struct"] = values.NewPlcBOOL(mr) - - // Simple Field (mg) - mg, _mgErr := readBuffer.ReadBit("mg") - if _mgErr != nil { - return nil, errors.Wrap(_mgErr, "Error parsing 'mg' field") - } - _map["Struct"] = values.NewPlcBOOL(mg) - - // Simple Field (mb) - mb, _mbErr := readBuffer.ReadBit("mb") - if _mbErr != nil { - return nil, errors.Wrap(_mbErr, "Error parsing 'mb' field") - } - _map["Struct"] = values.NewPlcBOOL(mb) - - // Simple Field (mw) - mw, _mwErr := readBuffer.ReadBit("mw") - if _mwErr != nil { - return nil, errors.Wrap(_mwErr, "Error parsing 'mw' field") - } - _map["Struct"] = values.NewPlcBOOL(mw) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_Relative_Control_RGBW: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (maskcw) - maskcw, _maskcwErr := readBuffer.ReadBit("maskcw") - if _maskcwErr != nil { - return nil, errors.Wrap(_maskcwErr, "Error parsing 'maskcw' field") - } - _map["Struct"] = values.NewPlcBOOL(maskcw) - - // Simple Field (maskcb) - maskcb, _maskcbErr := readBuffer.ReadBit("maskcb") - if _maskcbErr != nil { - return nil, errors.Wrap(_maskcbErr, "Error parsing 'maskcb' field") - } - _map["Struct"] = values.NewPlcBOOL(maskcb) - - // Simple Field (maskcg) - maskcg, _maskcgErr := readBuffer.ReadBit("maskcg") - if _maskcgErr != nil { - return nil, errors.Wrap(_maskcgErr, "Error parsing 'maskcg' field") - } - _map["Struct"] = values.NewPlcBOOL(maskcg) - - // Simple Field (maskcr) - maskcr, _maskcrErr := readBuffer.ReadBit("maskcr") - if _maskcrErr != nil { - return nil, errors.Wrap(_maskcrErr, "Error parsing 'maskcr' field") - } - _map["Struct"] = values.NewPlcBOOL(maskcr) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (cw) - cw, _cwErr := readBuffer.ReadBit("cw") - if _cwErr != nil { - return nil, errors.Wrap(_cwErr, "Error parsing 'cw' field") - } - _map["Struct"] = values.NewPlcBOOL(cw) - - // Simple Field (stepCodeColourWhite) - stepCodeColourWhite, _stepCodeColourWhiteErr := readBuffer.ReadUint8("stepCodeColourWhite", 3) - if _stepCodeColourWhiteErr != nil { - return nil, errors.Wrap(_stepCodeColourWhiteErr, "Error parsing 'stepCodeColourWhite' field") - } - _map["Struct"] = values.NewPlcUSINT(stepCodeColourWhite) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (cb) - cb, _cbErr := readBuffer.ReadBit("cb") - if _cbErr != nil { - return nil, errors.Wrap(_cbErr, "Error parsing 'cb' field") - } - _map["Struct"] = values.NewPlcBOOL(cb) - - // Simple Field (stepCodeColourBlue) - stepCodeColourBlue, _stepCodeColourBlueErr := readBuffer.ReadUint8("stepCodeColourBlue", 3) - if _stepCodeColourBlueErr != nil { - return nil, errors.Wrap(_stepCodeColourBlueErr, "Error parsing 'stepCodeColourBlue' field") - } - _map["Struct"] = values.NewPlcUSINT(stepCodeColourBlue) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (cg) - cg, _cgErr := readBuffer.ReadBit("cg") - if _cgErr != nil { - return nil, errors.Wrap(_cgErr, "Error parsing 'cg' field") - } - _map["Struct"] = values.NewPlcBOOL(cg) - - // Simple Field (stepCodeColourGreen) - stepCodeColourGreen, _stepCodeColourGreenErr := readBuffer.ReadUint8("stepCodeColourGreen", 3) - if _stepCodeColourGreenErr != nil { - return nil, errors.Wrap(_stepCodeColourGreenErr, "Error parsing 'stepCodeColourGreen' field") - } - _map["Struct"] = values.NewPlcUSINT(stepCodeColourGreen) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (cr) - cr, _crErr := readBuffer.ReadBit("cr") - if _crErr != nil { - return nil, errors.Wrap(_crErr, "Error parsing 'cr' field") - } - _map["Struct"] = values.NewPlcBOOL(cr) - - // Simple Field (stepCodeColourRed) - stepCodeColourRed, _stepCodeColourRedErr := readBuffer.ReadUint8("stepCodeColourRed", 3) - if _stepCodeColourRedErr != nil { - return nil, errors.Wrap(_stepCodeColourRedErr, "Error parsing 'stepCodeColourRed' field") - } - _map["Struct"] = values.NewPlcUSINT(stepCodeColourRed) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_Relative_Control_RGB: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (cb) - cb, _cbErr := readBuffer.ReadBit("cb") - if _cbErr != nil { - return nil, errors.Wrap(_cbErr, "Error parsing 'cb' field") - } - _map["Struct"] = values.NewPlcBOOL(cb) - - // Simple Field (stepCodeColourBlue) - stepCodeColourBlue, _stepCodeColourBlueErr := readBuffer.ReadUint8("stepCodeColourBlue", 3) - if _stepCodeColourBlueErr != nil { - return nil, errors.Wrap(_stepCodeColourBlueErr, "Error parsing 'stepCodeColourBlue' field") - } - _map["Struct"] = values.NewPlcUSINT(stepCodeColourBlue) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (cg) - cg, _cgErr := readBuffer.ReadBit("cg") - if _cgErr != nil { - return nil, errors.Wrap(_cgErr, "Error parsing 'cg' field") - } - _map["Struct"] = values.NewPlcBOOL(cg) - - // Simple Field (stepCodeColourGreen) - stepCodeColourGreen, _stepCodeColourGreenErr := readBuffer.ReadUint8("stepCodeColourGreen", 3) - if _stepCodeColourGreenErr != nil { - return nil, errors.Wrap(_stepCodeColourGreenErr, "Error parsing 'stepCodeColourGreen' field") - } - _map["Struct"] = values.NewPlcUSINT(stepCodeColourGreen) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (cr) - cr, _crErr := readBuffer.ReadBit("cr") - if _crErr != nil { - return nil, errors.Wrap(_crErr, "Error parsing 'cr' field") - } - _map["Struct"] = values.NewPlcBOOL(cr) - - // Simple Field (stepCodeColourRed) - stepCodeColourRed, _stepCodeColourRedErr := readBuffer.ReadUint8("stepCodeColourRed", 3) - if _stepCodeColourRedErr != nil { - return nil, errors.Wrap(_stepCodeColourRedErr, "Error parsing 'stepCodeColourRed' field") - } - _map["Struct"] = values.NewPlcUSINT(stepCodeColourRed) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_GeographicalLocation: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (longitude) - longitude, _longitudeErr := readBuffer.ReadFloat32("longitude", 32) - if _longitudeErr != nil { - return nil, errors.Wrap(_longitudeErr, "Error parsing 'longitude' field") - } - _map["Struct"] = values.NewPlcREAL(longitude) - - // Simple Field (latitude) - latitude, _latitudeErr := readBuffer.ReadFloat32("latitude", 32) - if _latitudeErr != nil { - return nil, errors.Wrap(_latitudeErr, "Error parsing 'latitude' field") - } - _map["Struct"] = values.NewPlcREAL(latitude) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_TempRoomSetpSetF16_4: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (roomTemperatureSetpointComfort) - roomTemperatureSetpointComfort, _roomTemperatureSetpointComfortErr := readBuffer.ReadFloat32("roomTemperatureSetpointComfort", 16) - if _roomTemperatureSetpointComfortErr != nil { - return nil, errors.Wrap(_roomTemperatureSetpointComfortErr, "Error parsing 'roomTemperatureSetpointComfort' field") - } - _map["Struct"] = values.NewPlcREAL(roomTemperatureSetpointComfort) - - // Simple Field (roomTemperatureSetpointStandby) - roomTemperatureSetpointStandby, _roomTemperatureSetpointStandbyErr := readBuffer.ReadFloat32("roomTemperatureSetpointStandby", 16) - if _roomTemperatureSetpointStandbyErr != nil { - return nil, errors.Wrap(_roomTemperatureSetpointStandbyErr, "Error parsing 'roomTemperatureSetpointStandby' field") - } - _map["Struct"] = values.NewPlcREAL(roomTemperatureSetpointStandby) - - // Simple Field (roomTemperatureSetpointEconomy) - roomTemperatureSetpointEconomy, _roomTemperatureSetpointEconomyErr := readBuffer.ReadFloat32("roomTemperatureSetpointEconomy", 16) - if _roomTemperatureSetpointEconomyErr != nil { - return nil, errors.Wrap(_roomTemperatureSetpointEconomyErr, "Error parsing 'roomTemperatureSetpointEconomy' field") - } - _map["Struct"] = values.NewPlcREAL(roomTemperatureSetpointEconomy) - - // Simple Field (roomTemperatureSetpointBuildingProtection) - roomTemperatureSetpointBuildingProtection, _roomTemperatureSetpointBuildingProtectionErr := readBuffer.ReadFloat32("roomTemperatureSetpointBuildingProtection", 16) - if _roomTemperatureSetpointBuildingProtectionErr != nil { - return nil, errors.Wrap(_roomTemperatureSetpointBuildingProtectionErr, "Error parsing 'roomTemperatureSetpointBuildingProtection' field") - } - _map["Struct"] = values.NewPlcREAL(roomTemperatureSetpointBuildingProtection) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil - case datapointType == KnxDatapointType_DPT_TempRoomSetpSetShiftF16_4: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (roomTemperatureSetpointShiftComfort) - roomTemperatureSetpointShiftComfort, _roomTemperatureSetpointShiftComfortErr := readBuffer.ReadFloat32("roomTemperatureSetpointShiftComfort", 16) - if _roomTemperatureSetpointShiftComfortErr != nil { - return nil, errors.Wrap(_roomTemperatureSetpointShiftComfortErr, "Error parsing 'roomTemperatureSetpointShiftComfort' field") - } - _map["Struct"] = values.NewPlcREAL(roomTemperatureSetpointShiftComfort) - - // Simple Field (roomTemperatureSetpointShiftStandby) - roomTemperatureSetpointShiftStandby, _roomTemperatureSetpointShiftStandbyErr := readBuffer.ReadFloat32("roomTemperatureSetpointShiftStandby", 16) - if _roomTemperatureSetpointShiftStandbyErr != nil { - return nil, errors.Wrap(_roomTemperatureSetpointShiftStandbyErr, "Error parsing 'roomTemperatureSetpointShiftStandby' field") - } - _map["Struct"] = values.NewPlcREAL(roomTemperatureSetpointShiftStandby) - - // Simple Field (roomTemperatureSetpointShiftEconomy) - roomTemperatureSetpointShiftEconomy, _roomTemperatureSetpointShiftEconomyErr := readBuffer.ReadFloat32("roomTemperatureSetpointShiftEconomy", 16) - if _roomTemperatureSetpointShiftEconomyErr != nil { - return nil, errors.Wrap(_roomTemperatureSetpointShiftEconomyErr, "Error parsing 'roomTemperatureSetpointShiftEconomy' field") - } - _map["Struct"] = values.NewPlcREAL(roomTemperatureSetpointShiftEconomy) - - // Simple Field (roomTemperatureSetpointShiftBuildingProtection) - roomTemperatureSetpointShiftBuildingProtection, _roomTemperatureSetpointShiftBuildingProtectionErr := readBuffer.ReadFloat32("roomTemperatureSetpointShiftBuildingProtection", 16) - if _roomTemperatureSetpointShiftBuildingProtectionErr != nil { - return nil, errors.Wrap(_roomTemperatureSetpointShiftBuildingProtectionErr, "Error parsing 'roomTemperatureSetpointShiftBuildingProtection' field") - } - _map["Struct"] = values.NewPlcREAL(roomTemperatureSetpointShiftBuildingProtection) - readBuffer.CloseContext("KnxDatapoint") - return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_BOOL : // BOOL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadBit("value") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcBOOL(value), nil +case datapointType == KnxDatapointType_BYTE : // BYTE + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcBYTE(value), nil +case datapointType == KnxDatapointType_WORD : // WORD + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint16("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcWORD(value), nil +case datapointType == KnxDatapointType_DWORD : // DWORD + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcDWORD(value), nil +case datapointType == KnxDatapointType_LWORD : // LWORD + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint64("value", 64) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcLWORD(value), nil +case datapointType == KnxDatapointType_USINT : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_SINT : // SINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcSINT(value), nil +case datapointType == KnxDatapointType_UINT : // UINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint16("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUINT(value), nil +case datapointType == KnxDatapointType_INT : // INT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt16("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcINT(value), nil +case datapointType == KnxDatapointType_UDINT : // UDINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUDINT(value), nil +case datapointType == KnxDatapointType_DINT : // DINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcDINT(value), nil +case datapointType == KnxDatapointType_ULINT : // ULINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint64("value", 64) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcULINT(value), nil +case datapointType == KnxDatapointType_LINT : // LINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt64("value", 64) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcLINT(value), nil +case datapointType == KnxDatapointType_REAL : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_LREAL : // LREAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat64("value", 64) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcLREAL(value), nil +case datapointType == KnxDatapointType_CHAR : // CHAR + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadString("value", uint32(8), "UTF-8") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcCHAR(value), nil +case datapointType == KnxDatapointType_WCHAR : // WCHAR + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadString("value", uint32(16), "UTF-16") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcWCHAR(value), nil +case datapointType == KnxDatapointType_TIME : // TIME + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (milliseconds) + milliseconds, _millisecondsErr := readBuffer.ReadUint32("milliseconds", 32) + if _millisecondsErr != nil { + return nil, errors.Wrap(_millisecondsErr, "Error parsing 'milliseconds' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcTIMEFromMilliseconds(milliseconds), nil +case datapointType == KnxDatapointType_LTIME : // LTIME + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (nanoseconds) + nanoseconds, _nanosecondsErr := readBuffer.ReadUint64("nanoseconds", 64) + if _nanosecondsErr != nil { + return nil, errors.Wrap(_nanosecondsErr, "Error parsing 'nanoseconds' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcLTIMEFromNanoseconds(nanoseconds), nil +case datapointType == KnxDatapointType_DATE : // DATE + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (secondsSinceEpoch) + secondsSinceEpoch, _secondsSinceEpochErr := readBuffer.ReadUint32("secondsSinceEpoch", 32) + if _secondsSinceEpochErr != nil { + return nil, errors.Wrap(_secondsSinceEpochErr, "Error parsing 'secondsSinceEpoch' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcDATEFromSecondsSinceEpoch(uint32(secondsSinceEpoch)), nil +case datapointType == KnxDatapointType_TIME_OF_DAY : // TIME_OF_DAY + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (millisecondsSinceMidnight) + millisecondsSinceMidnight, _millisecondsSinceMidnightErr := readBuffer.ReadUint32("millisecondsSinceMidnight", 32) + if _millisecondsSinceMidnightErr != nil { + return nil, errors.Wrap(_millisecondsSinceMidnightErr, "Error parsing 'millisecondsSinceMidnight' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcTIME_OF_DAYFromMillisecondsSinceMidnight(millisecondsSinceMidnight), nil +case datapointType == KnxDatapointType_TOD : // TIME_OF_DAY + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (millisecondsSinceMidnight) + millisecondsSinceMidnight, _millisecondsSinceMidnightErr := readBuffer.ReadUint32("millisecondsSinceMidnight", 32) + if _millisecondsSinceMidnightErr != nil { + return nil, errors.Wrap(_millisecondsSinceMidnightErr, "Error parsing 'millisecondsSinceMidnight' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcTIME_OF_DAYFromMillisecondsSinceMidnight(millisecondsSinceMidnight), nil +case datapointType == KnxDatapointType_DATE_AND_TIME : // DATE_AND_TIME + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (year) + year, _yearErr := readBuffer.ReadUint16("year", 16) + if _yearErr != nil { + return nil, errors.Wrap(_yearErr, "Error parsing 'year' field") + } + + // Simple Field (month) + month, _monthErr := readBuffer.ReadUint8("month", 8) + if _monthErr != nil { + return nil, errors.Wrap(_monthErr, "Error parsing 'month' field") + } + + // Simple Field (day) + day, _dayErr := readBuffer.ReadUint8("day", 8) + if _dayErr != nil { + return nil, errors.Wrap(_dayErr, "Error parsing 'day' field") + } + + // Simple Field (dayOfWeek) + _, _dayOfWeekErr := readBuffer.ReadUint8("dayOfWeek", 8) + if _dayOfWeekErr != nil { + return nil, errors.Wrap(_dayOfWeekErr, "Error parsing 'dayOfWeek' field") + } + + // Simple Field (hour) + hour, _hourErr := readBuffer.ReadUint8("hour", 8) + if _hourErr != nil { + return nil, errors.Wrap(_hourErr, "Error parsing 'hour' field") + } + + // Simple Field (minutes) + minutes, _minutesErr := readBuffer.ReadUint8("minutes", 8) + if _minutesErr != nil { + return nil, errors.Wrap(_minutesErr, "Error parsing 'minutes' field") + } + + // Simple Field (seconds) + seconds, _secondsErr := readBuffer.ReadUint8("seconds", 8) + if _secondsErr != nil { + return nil, errors.Wrap(_secondsErr, "Error parsing 'seconds' field") + } + + // Simple Field (nanoseconds) + nanoseconds, _nanosecondsErr := readBuffer.ReadUint32("nanoseconds", 32) + if _nanosecondsErr != nil { + return nil, errors.Wrap(_nanosecondsErr, "Error parsing 'nanoseconds' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcDATA_AND_TIMEFromSegments(uint32(year), uint32(month), uint32(day), uint32(hour), uint32(minutes), uint32(seconds), uint32(nanoseconds)), nil +case datapointType == KnxDatapointType_DT : // DATE_AND_TIME + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (year) + year, _yearErr := readBuffer.ReadUint16("year", 16) + if _yearErr != nil { + return nil, errors.Wrap(_yearErr, "Error parsing 'year' field") + } + + // Simple Field (month) + month, _monthErr := readBuffer.ReadUint8("month", 8) + if _monthErr != nil { + return nil, errors.Wrap(_monthErr, "Error parsing 'month' field") + } + + // Simple Field (day) + day, _dayErr := readBuffer.ReadUint8("day", 8) + if _dayErr != nil { + return nil, errors.Wrap(_dayErr, "Error parsing 'day' field") + } + + // Simple Field (dayOfWeek) + _, _dayOfWeekErr := readBuffer.ReadUint8("dayOfWeek", 8) + if _dayOfWeekErr != nil { + return nil, errors.Wrap(_dayOfWeekErr, "Error parsing 'dayOfWeek' field") + } + + // Simple Field (hour) + hour, _hourErr := readBuffer.ReadUint8("hour", 8) + if _hourErr != nil { + return nil, errors.Wrap(_hourErr, "Error parsing 'hour' field") + } + + // Simple Field (minutes) + minutes, _minutesErr := readBuffer.ReadUint8("minutes", 8) + if _minutesErr != nil { + return nil, errors.Wrap(_minutesErr, "Error parsing 'minutes' field") + } + + // Simple Field (seconds) + seconds, _secondsErr := readBuffer.ReadUint8("seconds", 8) + if _secondsErr != nil { + return nil, errors.Wrap(_secondsErr, "Error parsing 'seconds' field") + } + + // Simple Field (nanoseconds) + nanoseconds, _nanosecondsErr := readBuffer.ReadUint32("nanoseconds", 32) + if _nanosecondsErr != nil { + return nil, errors.Wrap(_nanosecondsErr, "Error parsing 'nanoseconds' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcDATA_AND_TIMEFromSegments(uint32(year), uint32(month), uint32(day), uint32(hour), uint32(minutes), uint32(seconds), uint32(nanoseconds)), nil +case datapointType == KnxDatapointType_DPT_Switch : // BOOL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadBit("value") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcBOOL(value), nil +case datapointType == KnxDatapointType_DPT_Bool : // BOOL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadBit("value") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcBOOL(value), nil +case datapointType == KnxDatapointType_DPT_Enable : // BOOL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadBit("value") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcBOOL(value), nil +case datapointType == KnxDatapointType_DPT_Ramp : // BOOL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadBit("value") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcBOOL(value), nil +case datapointType == KnxDatapointType_DPT_Alarm : // BOOL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadBit("value") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcBOOL(value), nil +case datapointType == KnxDatapointType_DPT_BinaryValue : // BOOL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadBit("value") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcBOOL(value), nil +case datapointType == KnxDatapointType_DPT_Step : // BOOL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadBit("value") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcBOOL(value), nil +case datapointType == KnxDatapointType_DPT_UpDown : // BOOL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadBit("value") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcBOOL(value), nil +case datapointType == KnxDatapointType_DPT_OpenClose : // BOOL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadBit("value") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcBOOL(value), nil +case datapointType == KnxDatapointType_DPT_Start : // BOOL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadBit("value") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcBOOL(value), nil +case datapointType == KnxDatapointType_DPT_State : // BOOL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadBit("value") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcBOOL(value), nil +case datapointType == KnxDatapointType_DPT_Invert : // BOOL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadBit("value") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcBOOL(value), nil +case datapointType == KnxDatapointType_DPT_DimSendStyle : // BOOL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadBit("value") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcBOOL(value), nil +case datapointType == KnxDatapointType_DPT_InputSource : // BOOL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadBit("value") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcBOOL(value), nil +case datapointType == KnxDatapointType_DPT_Reset : // BOOL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadBit("value") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcBOOL(value), nil +case datapointType == KnxDatapointType_DPT_Ack : // BOOL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadBit("value") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcBOOL(value), nil +case datapointType == KnxDatapointType_DPT_Trigger : // BOOL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadBit("value") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcBOOL(value), nil +case datapointType == KnxDatapointType_DPT_Occupancy : // BOOL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadBit("value") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcBOOL(value), nil +case datapointType == KnxDatapointType_DPT_Window_Door : // BOOL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadBit("value") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcBOOL(value), nil +case datapointType == KnxDatapointType_DPT_LogicalFunction : // BOOL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadBit("value") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcBOOL(value), nil +case datapointType == KnxDatapointType_DPT_Scene_AB : // BOOL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadBit("value") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcBOOL(value), nil +case datapointType == KnxDatapointType_DPT_ShutterBlinds_Mode : // BOOL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadBit("value") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcBOOL(value), nil +case datapointType == KnxDatapointType_DPT_DayNight : // BOOL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadBit("value") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcBOOL(value), nil +case datapointType == KnxDatapointType_DPT_Heat_Cool : // BOOL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadBit("value") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcBOOL(value), nil +case datapointType == KnxDatapointType_DPT_Switch_Control : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 6); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (control) + control, _controlErr := readBuffer.ReadBit("control") + if _controlErr != nil { + return nil, errors.Wrap(_controlErr, "Error parsing 'control' field") + } + _map["Struct"] = values.NewPlcBOOL(control) + + // Simple Field (on) + on, _onErr := readBuffer.ReadBit("on") + if _onErr != nil { + return nil, errors.Wrap(_onErr, "Error parsing 'on' field") + } + _map["Struct"] = values.NewPlcBOOL(on) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_Bool_Control : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 6); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (control) + control, _controlErr := readBuffer.ReadBit("control") + if _controlErr != nil { + return nil, errors.Wrap(_controlErr, "Error parsing 'control' field") + } + _map["Struct"] = values.NewPlcBOOL(control) + + // Simple Field (valueTrue) + valueTrue, _valueTrueErr := readBuffer.ReadBit("valueTrue") + if _valueTrueErr != nil { + return nil, errors.Wrap(_valueTrueErr, "Error parsing 'valueTrue' field") + } + _map["Struct"] = values.NewPlcBOOL(valueTrue) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_Enable_Control : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 6); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (control) + control, _controlErr := readBuffer.ReadBit("control") + if _controlErr != nil { + return nil, errors.Wrap(_controlErr, "Error parsing 'control' field") + } + _map["Struct"] = values.NewPlcBOOL(control) + + // Simple Field (enable) + enable, _enableErr := readBuffer.ReadBit("enable") + if _enableErr != nil { + return nil, errors.Wrap(_enableErr, "Error parsing 'enable' field") + } + _map["Struct"] = values.NewPlcBOOL(enable) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_Ramp_Control : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 6); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (control) + control, _controlErr := readBuffer.ReadBit("control") + if _controlErr != nil { + return nil, errors.Wrap(_controlErr, "Error parsing 'control' field") + } + _map["Struct"] = values.NewPlcBOOL(control) + + // Simple Field (ramp) + ramp, _rampErr := readBuffer.ReadBit("ramp") + if _rampErr != nil { + return nil, errors.Wrap(_rampErr, "Error parsing 'ramp' field") + } + _map["Struct"] = values.NewPlcBOOL(ramp) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_Alarm_Control : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 6); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (control) + control, _controlErr := readBuffer.ReadBit("control") + if _controlErr != nil { + return nil, errors.Wrap(_controlErr, "Error parsing 'control' field") + } + _map["Struct"] = values.NewPlcBOOL(control) + + // Simple Field (alarm) + alarm, _alarmErr := readBuffer.ReadBit("alarm") + if _alarmErr != nil { + return nil, errors.Wrap(_alarmErr, "Error parsing 'alarm' field") + } + _map["Struct"] = values.NewPlcBOOL(alarm) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_BinaryValue_Control : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 6); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (control) + control, _controlErr := readBuffer.ReadBit("control") + if _controlErr != nil { + return nil, errors.Wrap(_controlErr, "Error parsing 'control' field") + } + _map["Struct"] = values.NewPlcBOOL(control) + + // Simple Field (high) + high, _highErr := readBuffer.ReadBit("high") + if _highErr != nil { + return nil, errors.Wrap(_highErr, "Error parsing 'high' field") + } + _map["Struct"] = values.NewPlcBOOL(high) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_Step_Control : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 6); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (control) + control, _controlErr := readBuffer.ReadBit("control") + if _controlErr != nil { + return nil, errors.Wrap(_controlErr, "Error parsing 'control' field") + } + _map["Struct"] = values.NewPlcBOOL(control) + + // Simple Field (increase) + increase, _increaseErr := readBuffer.ReadBit("increase") + if _increaseErr != nil { + return nil, errors.Wrap(_increaseErr, "Error parsing 'increase' field") + } + _map["Struct"] = values.NewPlcBOOL(increase) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_Direction1_Control : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 6); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (control) + control, _controlErr := readBuffer.ReadBit("control") + if _controlErr != nil { + return nil, errors.Wrap(_controlErr, "Error parsing 'control' field") + } + _map["Struct"] = values.NewPlcBOOL(control) + + // Simple Field (down) + down, _downErr := readBuffer.ReadBit("down") + if _downErr != nil { + return nil, errors.Wrap(_downErr, "Error parsing 'down' field") + } + _map["Struct"] = values.NewPlcBOOL(down) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_Direction2_Control : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 6); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (control) + control, _controlErr := readBuffer.ReadBit("control") + if _controlErr != nil { + return nil, errors.Wrap(_controlErr, "Error parsing 'control' field") + } + _map["Struct"] = values.NewPlcBOOL(control) + + // Simple Field (close) + close, _closeErr := readBuffer.ReadBit("close") + if _closeErr != nil { + return nil, errors.Wrap(_closeErr, "Error parsing 'close' field") + } + _map["Struct"] = values.NewPlcBOOL(close) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_Start_Control : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 6); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (control) + control, _controlErr := readBuffer.ReadBit("control") + if _controlErr != nil { + return nil, errors.Wrap(_controlErr, "Error parsing 'control' field") + } + _map["Struct"] = values.NewPlcBOOL(control) + + // Simple Field (start) + start, _startErr := readBuffer.ReadBit("start") + if _startErr != nil { + return nil, errors.Wrap(_startErr, "Error parsing 'start' field") + } + _map["Struct"] = values.NewPlcBOOL(start) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_State_Control : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 6); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (control) + control, _controlErr := readBuffer.ReadBit("control") + if _controlErr != nil { + return nil, errors.Wrap(_controlErr, "Error parsing 'control' field") + } + _map["Struct"] = values.NewPlcBOOL(control) + + // Simple Field (active) + active, _activeErr := readBuffer.ReadBit("active") + if _activeErr != nil { + return nil, errors.Wrap(_activeErr, "Error parsing 'active' field") + } + _map["Struct"] = values.NewPlcBOOL(active) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_Invert_Control : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 6); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (control) + control, _controlErr := readBuffer.ReadBit("control") + if _controlErr != nil { + return nil, errors.Wrap(_controlErr, "Error parsing 'control' field") + } + _map["Struct"] = values.NewPlcBOOL(control) + + // Simple Field (inverted) + inverted, _invertedErr := readBuffer.ReadBit("inverted") + if _invertedErr != nil { + return nil, errors.Wrap(_invertedErr, "Error parsing 'inverted' field") + } + _map["Struct"] = values.NewPlcBOOL(inverted) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_Control_Dimming : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (increase) + increase, _increaseErr := readBuffer.ReadBit("increase") + if _increaseErr != nil { + return nil, errors.Wrap(_increaseErr, "Error parsing 'increase' field") + } + _map["Struct"] = values.NewPlcBOOL(increase) + + // Simple Field (stepcode) + stepcode, _stepcodeErr := readBuffer.ReadUint8("stepcode", 3) + if _stepcodeErr != nil { + return nil, errors.Wrap(_stepcodeErr, "Error parsing 'stepcode' field") + } + _map["Struct"] = values.NewPlcUSINT(stepcode) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_Control_Blinds : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (down) + down, _downErr := readBuffer.ReadBit("down") + if _downErr != nil { + return nil, errors.Wrap(_downErr, "Error parsing 'down' field") + } + _map["Struct"] = values.NewPlcBOOL(down) + + // Simple Field (stepcode) + stepcode, _stepcodeErr := readBuffer.ReadUint8("stepcode", 3) + if _stepcodeErr != nil { + return nil, errors.Wrap(_stepcodeErr, "Error parsing 'stepcode' field") + } + _map["Struct"] = values.NewPlcUSINT(stepcode) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_Char_ASCII : // STRING + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadString("value", uint32(8), "ASCII") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcSTRING(value), nil +case datapointType == KnxDatapointType_DPT_Char_8859_1 : // STRING + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadString("value", uint32(8), "ISO-8859-1") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcSTRING(value), nil +case datapointType == KnxDatapointType_DPT_Scaling : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_Angle : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_Percent_U8 : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_DecimalFactor : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_Tariff : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_Value_1_Ucount : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_FanStage : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_Percent_V8 : // SINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcSINT(value), nil +case datapointType == KnxDatapointType_DPT_Value_1_Count : // SINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcSINT(value), nil +case datapointType == KnxDatapointType_DPT_Status_Mode3 : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (statusA) + statusA, _statusAErr := readBuffer.ReadBit("statusA") + if _statusAErr != nil { + return nil, errors.Wrap(_statusAErr, "Error parsing 'statusA' field") + } + _map["Struct"] = values.NewPlcBOOL(statusA) + + // Simple Field (statusB) + statusB, _statusBErr := readBuffer.ReadBit("statusB") + if _statusBErr != nil { + return nil, errors.Wrap(_statusBErr, "Error parsing 'statusB' field") + } + _map["Struct"] = values.NewPlcBOOL(statusB) + + // Simple Field (statusC) + statusC, _statusCErr := readBuffer.ReadBit("statusC") + if _statusCErr != nil { + return nil, errors.Wrap(_statusCErr, "Error parsing 'statusC' field") + } + _map["Struct"] = values.NewPlcBOOL(statusC) + + // Simple Field (statusD) + statusD, _statusDErr := readBuffer.ReadBit("statusD") + if _statusDErr != nil { + return nil, errors.Wrap(_statusDErr, "Error parsing 'statusD' field") + } + _map["Struct"] = values.NewPlcBOOL(statusD) + + // Simple Field (statusE) + statusE, _statusEErr := readBuffer.ReadBit("statusE") + if _statusEErr != nil { + return nil, errors.Wrap(_statusEErr, "Error parsing 'statusE' field") + } + _map["Struct"] = values.NewPlcBOOL(statusE) + + // Simple Field (mode) + mode, _modeErr := readBuffer.ReadUint8("mode", 3) + if _modeErr != nil { + return nil, errors.Wrap(_modeErr, "Error parsing 'mode' field") + } + _map["Struct"] = values.NewPlcUSINT(mode) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_Value_2_Ucount : // UINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint16("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUINT(value), nil +case datapointType == KnxDatapointType_DPT_TimePeriodMsec : // UINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint16("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUINT(value), nil +case datapointType == KnxDatapointType_DPT_TimePeriod10Msec : // UINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint16("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUINT(value), nil +case datapointType == KnxDatapointType_DPT_TimePeriod100Msec : // UINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint16("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUINT(value), nil +case datapointType == KnxDatapointType_DPT_TimePeriodSec : // UINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint16("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUINT(value), nil +case datapointType == KnxDatapointType_DPT_TimePeriodMin : // UINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint16("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUINT(value), nil +case datapointType == KnxDatapointType_DPT_TimePeriodHrs : // UINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint16("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUINT(value), nil +case datapointType == KnxDatapointType_DPT_PropDataType : // UINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint16("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUINT(value), nil +case datapointType == KnxDatapointType_DPT_Length_mm : // UINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint16("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUINT(value), nil +case datapointType == KnxDatapointType_DPT_UElCurrentmA : // UINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint16("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUINT(value), nil +case datapointType == KnxDatapointType_DPT_Brightness : // UINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint16("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUINT(value), nil +case datapointType == KnxDatapointType_DPT_Absolute_Colour_Temperature : // UINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint16("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUINT(value), nil +case datapointType == KnxDatapointType_DPT_Value_2_Count : // INT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt16("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcINT(value), nil +case datapointType == KnxDatapointType_DPT_DeltaTimeMsec : // INT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt16("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcINT(value), nil +case datapointType == KnxDatapointType_DPT_DeltaTime10Msec : // INT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt16("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcINT(value), nil +case datapointType == KnxDatapointType_DPT_DeltaTime100Msec : // INT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt16("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcINT(value), nil +case datapointType == KnxDatapointType_DPT_DeltaTimeSec : // INT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt16("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcINT(value), nil +case datapointType == KnxDatapointType_DPT_DeltaTimeMin : // INT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt16("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcINT(value), nil +case datapointType == KnxDatapointType_DPT_DeltaTimeHrs : // INT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt16("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcINT(value), nil +case datapointType == KnxDatapointType_DPT_Percent_V16 : // INT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt16("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcINT(value), nil +case datapointType == KnxDatapointType_DPT_Rotation_Angle : // INT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt16("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcINT(value), nil +case datapointType == KnxDatapointType_DPT_Length_m : // INT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt16("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcINT(value), nil +case datapointType == KnxDatapointType_DPT_Value_Temp : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Tempd : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Tempa : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Lux : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Wsp : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Pres : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Humidity : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_AirQuality : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_AirFlow : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Time1 : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Time2 : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Volt : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Curr : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_PowerDensity : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_KelvinPerPercent : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Power : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Volume_Flow : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Rain_Amount : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Temp_F : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Wsp_kmh : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Absolute_Humidity : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Concentration_ygm3 : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_TimeOfDay : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (day) + day, _dayErr := readBuffer.ReadUint8("day", 3) + if _dayErr != nil { + return nil, errors.Wrap(_dayErr, "Error parsing 'day' field") + } + _map["Struct"] = values.NewPlcUSINT(day) + + // Simple Field (hour) + hour, _hourErr := readBuffer.ReadUint8("hour", 5) + if _hourErr != nil { + return nil, errors.Wrap(_hourErr, "Error parsing 'hour' field") + } + _map["Struct"] = values.NewPlcUSINT(hour) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 2); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (minutes) + minutes, _minutesErr := readBuffer.ReadUint8("minutes", 6) + if _minutesErr != nil { + return nil, errors.Wrap(_minutesErr, "Error parsing 'minutes' field") + } + _map["Struct"] = values.NewPlcUSINT(minutes) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 2); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (seconds) + seconds, _secondsErr := readBuffer.ReadUint8("seconds", 6) + if _secondsErr != nil { + return nil, errors.Wrap(_secondsErr, "Error parsing 'seconds' field") + } + _map["Struct"] = values.NewPlcUSINT(seconds) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_Date : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 3); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (dayOfMonth) + dayOfMonth, _dayOfMonthErr := readBuffer.ReadUint8("dayOfMonth", 5) + if _dayOfMonthErr != nil { + return nil, errors.Wrap(_dayOfMonthErr, "Error parsing 'dayOfMonth' field") + } + _map["Struct"] = values.NewPlcUSINT(dayOfMonth) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (month) + month, _monthErr := readBuffer.ReadUint8("month", 4) + if _monthErr != nil { + return nil, errors.Wrap(_monthErr, "Error parsing 'month' field") + } + _map["Struct"] = values.NewPlcUSINT(month) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 1); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (year) + year, _yearErr := readBuffer.ReadUint8("year", 7) + if _yearErr != nil { + return nil, errors.Wrap(_yearErr, "Error parsing 'year' field") + } + _map["Struct"] = values.NewPlcUSINT(year) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_Value_4_Ucount : // UDINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUDINT(value), nil +case datapointType == KnxDatapointType_DPT_LongTimePeriod_Sec : // UDINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUDINT(value), nil +case datapointType == KnxDatapointType_DPT_LongTimePeriod_Min : // UDINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUDINT(value), nil +case datapointType == KnxDatapointType_DPT_LongTimePeriod_Hrs : // UDINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUDINT(value), nil +case datapointType == KnxDatapointType_DPT_VolumeLiquid_Litre : // UDINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUDINT(value), nil +case datapointType == KnxDatapointType_DPT_Volume_m_3 : // UDINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUDINT(value), nil +case datapointType == KnxDatapointType_DPT_Value_4_Count : // DINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcDINT(value), nil +case datapointType == KnxDatapointType_DPT_FlowRate_m3h : // DINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcDINT(value), nil +case datapointType == KnxDatapointType_DPT_ActiveEnergy : // DINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcDINT(value), nil +case datapointType == KnxDatapointType_DPT_ApparantEnergy : // DINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcDINT(value), nil +case datapointType == KnxDatapointType_DPT_ReactiveEnergy : // DINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcDINT(value), nil +case datapointType == KnxDatapointType_DPT_ActiveEnergy_kWh : // DINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcDINT(value), nil +case datapointType == KnxDatapointType_DPT_ApparantEnergy_kVAh : // DINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcDINT(value), nil +case datapointType == KnxDatapointType_DPT_ReactiveEnergy_kVARh : // DINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcDINT(value), nil +case datapointType == KnxDatapointType_DPT_ActiveEnergy_MWh : // DINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcDINT(value), nil +case datapointType == KnxDatapointType_DPT_LongDeltaTimeSec : // DINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcDINT(value), nil +case datapointType == KnxDatapointType_DPT_DeltaVolumeLiquid_Litre : // DINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcDINT(value), nil +case datapointType == KnxDatapointType_DPT_DeltaVolume_m_3 : // DINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcDINT(value), nil +case datapointType == KnxDatapointType_DPT_Value_Acceleration : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Acceleration_Angular : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Activation_Energy : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Activity : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Mol : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Amplitude : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_AngleRad : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_AngleDeg : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Angular_Momentum : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Angular_Velocity : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Area : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Capacitance : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Charge_DensitySurface : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Charge_DensityVolume : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Compressibility : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Conductance : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Electrical_Conductivity : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Density : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Electric_Charge : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Electric_Current : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Electric_CurrentDensity : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Electric_DipoleMoment : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Electric_Displacement : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Electric_FieldStrength : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Electric_Flux : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Electric_FluxDensity : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Electric_Polarization : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Electric_Potential : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Electric_PotentialDifference : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_ElectromagneticMoment : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Electromotive_Force : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Energy : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Force : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Frequency : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Angular_Frequency : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Heat_Capacity : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Heat_FlowRate : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Heat_Quantity : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Impedance : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Length : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Light_Quantity : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Luminance : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Luminous_Flux : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Luminous_Intensity : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Magnetic_FieldStrength : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Magnetic_Flux : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Magnetic_FluxDensity : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Magnetic_Moment : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Magnetic_Polarization : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Magnetization : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_MagnetomotiveForce : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Mass : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_MassFlux : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Momentum : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Phase_AngleRad : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Phase_AngleDeg : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Power : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Power_Factor : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Pressure : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Reactance : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Resistance : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Resistivity : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_SelfInductance : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_SolidAngle : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Sound_Intensity : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Speed : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Stress : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Surface_Tension : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Common_Temperature : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Absolute_Temperature : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_TemperatureDifference : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Thermal_Capacity : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Thermal_Conductivity : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_ThermoelectricPower : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Time : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Torque : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Volume : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Volume_Flux : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Weight : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_Work : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Value_ApparentPower : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Volume_Flux_Meter : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Volume_Flux_ls : // REAL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcREAL(value), nil +case datapointType == KnxDatapointType_DPT_Access_Data : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (hurz) + hurz, _hurzErr := readBuffer.ReadUint8("hurz", 4) + if _hurzErr != nil { + return nil, errors.Wrap(_hurzErr, "Error parsing 'hurz' field") + } + _map["Struct"] = values.NewPlcUSINT(hurz) + + // Simple Field (value1) + value1, _value1Err := readBuffer.ReadUint8("value1", 4) + if _value1Err != nil { + return nil, errors.Wrap(_value1Err, "Error parsing 'value1' field") + } + _map["Struct"] = values.NewPlcUSINT(value1) + + // Simple Field (value2) + value2, _value2Err := readBuffer.ReadUint8("value2", 4) + if _value2Err != nil { + return nil, errors.Wrap(_value2Err, "Error parsing 'value2' field") + } + _map["Struct"] = values.NewPlcUSINT(value2) + + // Simple Field (value3) + value3, _value3Err := readBuffer.ReadUint8("value3", 4) + if _value3Err != nil { + return nil, errors.Wrap(_value3Err, "Error parsing 'value3' field") + } + _map["Struct"] = values.NewPlcUSINT(value3) + + // Simple Field (value4) + value4, _value4Err := readBuffer.ReadUint8("value4", 4) + if _value4Err != nil { + return nil, errors.Wrap(_value4Err, "Error parsing 'value4' field") + } + _map["Struct"] = values.NewPlcUSINT(value4) + + // Simple Field (value5) + value5, _value5Err := readBuffer.ReadUint8("value5", 4) + if _value5Err != nil { + return nil, errors.Wrap(_value5Err, "Error parsing 'value5' field") + } + _map["Struct"] = values.NewPlcUSINT(value5) + + // Simple Field (detectionError) + detectionError, _detectionErrorErr := readBuffer.ReadBit("detectionError") + if _detectionErrorErr != nil { + return nil, errors.Wrap(_detectionErrorErr, "Error parsing 'detectionError' field") + } + _map["Struct"] = values.NewPlcBOOL(detectionError) + + // Simple Field (permission) + permission, _permissionErr := readBuffer.ReadBit("permission") + if _permissionErr != nil { + return nil, errors.Wrap(_permissionErr, "Error parsing 'permission' field") + } + _map["Struct"] = values.NewPlcBOOL(permission) + + // Simple Field (readDirection) + readDirection, _readDirectionErr := readBuffer.ReadBit("readDirection") + if _readDirectionErr != nil { + return nil, errors.Wrap(_readDirectionErr, "Error parsing 'readDirection' field") + } + _map["Struct"] = values.NewPlcBOOL(readDirection) + + // Simple Field (encryptionOfAccessInformation) + encryptionOfAccessInformation, _encryptionOfAccessInformationErr := readBuffer.ReadBit("encryptionOfAccessInformation") + if _encryptionOfAccessInformationErr != nil { + return nil, errors.Wrap(_encryptionOfAccessInformationErr, "Error parsing 'encryptionOfAccessInformation' field") + } + _map["Struct"] = values.NewPlcBOOL(encryptionOfAccessInformation) + + // Simple Field (indexOfAccessIdentificationCode) + indexOfAccessIdentificationCode, _indexOfAccessIdentificationCodeErr := readBuffer.ReadUint8("indexOfAccessIdentificationCode", 4) + if _indexOfAccessIdentificationCodeErr != nil { + return nil, errors.Wrap(_indexOfAccessIdentificationCodeErr, "Error parsing 'indexOfAccessIdentificationCode' field") + } + _map["Struct"] = values.NewPlcUSINT(indexOfAccessIdentificationCode) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_String_ASCII : // STRING + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadString("value", uint32(112), "ASCII") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcSTRING(value), nil +case datapointType == KnxDatapointType_DPT_String_8859_1 : // STRING + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadString("value", uint32(112), "ISO-8859-1") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcSTRING(value), nil +case datapointType == KnxDatapointType_DPT_SceneNumber : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 2); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 6) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_SceneControl : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (learnTheSceneCorrespondingToTheFieldSceneNumber) + learnTheSceneCorrespondingToTheFieldSceneNumber, _learnTheSceneCorrespondingToTheFieldSceneNumberErr := readBuffer.ReadBit("learnTheSceneCorrespondingToTheFieldSceneNumber") + if _learnTheSceneCorrespondingToTheFieldSceneNumberErr != nil { + return nil, errors.Wrap(_learnTheSceneCorrespondingToTheFieldSceneNumberErr, "Error parsing 'learnTheSceneCorrespondingToTheFieldSceneNumber' field") + } + _map["Struct"] = values.NewPlcBOOL(learnTheSceneCorrespondingToTheFieldSceneNumber) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 1); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (sceneNumber) + sceneNumber, _sceneNumberErr := readBuffer.ReadUint8("sceneNumber", 6) + if _sceneNumberErr != nil { + return nil, errors.Wrap(_sceneNumberErr, "Error parsing 'sceneNumber' field") + } + _map["Struct"] = values.NewPlcUSINT(sceneNumber) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_DateTime : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (year) + year, _yearErr := readBuffer.ReadUint8("year", 8) + if _yearErr != nil { + return nil, errors.Wrap(_yearErr, "Error parsing 'year' field") + } + _map["Struct"] = values.NewPlcUSINT(year) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (month) + month, _monthErr := readBuffer.ReadUint8("month", 4) + if _monthErr != nil { + return nil, errors.Wrap(_monthErr, "Error parsing 'month' field") + } + _map["Struct"] = values.NewPlcUSINT(month) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 3); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (dayofmonth) + dayofmonth, _dayofmonthErr := readBuffer.ReadUint8("dayofmonth", 5) + if _dayofmonthErr != nil { + return nil, errors.Wrap(_dayofmonthErr, "Error parsing 'dayofmonth' field") + } + _map["Struct"] = values.NewPlcUSINT(dayofmonth) + + // Simple Field (dayofweek) + dayofweek, _dayofweekErr := readBuffer.ReadUint8("dayofweek", 3) + if _dayofweekErr != nil { + return nil, errors.Wrap(_dayofweekErr, "Error parsing 'dayofweek' field") + } + _map["Struct"] = values.NewPlcUSINT(dayofweek) + + // Simple Field (hourofday) + hourofday, _hourofdayErr := readBuffer.ReadUint8("hourofday", 5) + if _hourofdayErr != nil { + return nil, errors.Wrap(_hourofdayErr, "Error parsing 'hourofday' field") + } + _map["Struct"] = values.NewPlcUSINT(hourofday) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 2); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (minutes) + minutes, _minutesErr := readBuffer.ReadUint8("minutes", 6) + if _minutesErr != nil { + return nil, errors.Wrap(_minutesErr, "Error parsing 'minutes' field") + } + _map["Struct"] = values.NewPlcUSINT(minutes) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 2); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (seconds) + seconds, _secondsErr := readBuffer.ReadUint8("seconds", 6) + if _secondsErr != nil { + return nil, errors.Wrap(_secondsErr, "Error parsing 'seconds' field") + } + _map["Struct"] = values.NewPlcUSINT(seconds) + + // Simple Field (fault) + fault, _faultErr := readBuffer.ReadBit("fault") + if _faultErr != nil { + return nil, errors.Wrap(_faultErr, "Error parsing 'fault' field") + } + _map["Struct"] = values.NewPlcBOOL(fault) + + // Simple Field (workingDay) + workingDay, _workingDayErr := readBuffer.ReadBit("workingDay") + if _workingDayErr != nil { + return nil, errors.Wrap(_workingDayErr, "Error parsing 'workingDay' field") + } + _map["Struct"] = values.NewPlcBOOL(workingDay) + + // Simple Field (noWd) + noWd, _noWdErr := readBuffer.ReadBit("noWd") + if _noWdErr != nil { + return nil, errors.Wrap(_noWdErr, "Error parsing 'noWd' field") + } + _map["Struct"] = values.NewPlcBOOL(noWd) + + // Simple Field (noYear) + noYear, _noYearErr := readBuffer.ReadBit("noYear") + if _noYearErr != nil { + return nil, errors.Wrap(_noYearErr, "Error parsing 'noYear' field") + } + _map["Struct"] = values.NewPlcBOOL(noYear) + + // Simple Field (noDate) + noDate, _noDateErr := readBuffer.ReadBit("noDate") + if _noDateErr != nil { + return nil, errors.Wrap(_noDateErr, "Error parsing 'noDate' field") + } + _map["Struct"] = values.NewPlcBOOL(noDate) + + // Simple Field (noDayOfWeek) + noDayOfWeek, _noDayOfWeekErr := readBuffer.ReadBit("noDayOfWeek") + if _noDayOfWeekErr != nil { + return nil, errors.Wrap(_noDayOfWeekErr, "Error parsing 'noDayOfWeek' field") + } + _map["Struct"] = values.NewPlcBOOL(noDayOfWeek) + + // Simple Field (noTime) + noTime, _noTimeErr := readBuffer.ReadBit("noTime") + if _noTimeErr != nil { + return nil, errors.Wrap(_noTimeErr, "Error parsing 'noTime' field") + } + _map["Struct"] = values.NewPlcBOOL(noTime) + + // Simple Field (standardSummerTime) + standardSummerTime, _standardSummerTimeErr := readBuffer.ReadBit("standardSummerTime") + if _standardSummerTimeErr != nil { + return nil, errors.Wrap(_standardSummerTimeErr, "Error parsing 'standardSummerTime' field") + } + _map["Struct"] = values.NewPlcBOOL(standardSummerTime) + + // Simple Field (qualityOfClock) + qualityOfClock, _qualityOfClockErr := readBuffer.ReadBit("qualityOfClock") + if _qualityOfClockErr != nil { + return nil, errors.Wrap(_qualityOfClockErr, "Error parsing 'qualityOfClock' field") + } + _map["Struct"] = values.NewPlcBOOL(qualityOfClock) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_SCLOMode : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_BuildingMode : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_OccMode : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_Priority : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_LightApplicationMode : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_ApplicationArea : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_AlarmClassType : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_PSUMode : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_ErrorClass_System : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_ErrorClass_HVAC : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_Time_Delay : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_Beaufort_Wind_Force_Scale : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_SensorSelect : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_ActuatorConnectType : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_Cloud_Cover : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_PowerReturnMode : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_FuelType : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_BurnerType : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_HVACMode : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_DHWMode : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_LoadPriority : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_HVACContrMode : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_HVACEmergMode : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_ChangeoverMode : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_ValveMode : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_DamperMode : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_HeaterMode : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_FanMode : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_MasterSlaveMode : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_StatusRoomSetp : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_Metering_DeviceType : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_HumDehumMode : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_EnableHCStage : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_ADAType : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_BackupMode : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_StartSynchronization : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_Behaviour_Lock_Unlock : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_Behaviour_Bus_Power_Up_Down : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_DALI_Fade_Time : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_BlinkingMode : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_LightControlMode : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_SwitchPBModel : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_PBAction : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_DimmPBModel : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_SwitchOnMode : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_LoadTypeSet : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_LoadTypeDetected : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_Converter_Test_Control : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_SABExcept_Behaviour : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_SABBehaviour_Lock_Unlock : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_SSSBMode : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_BlindsControlMode : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_CommMode : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_AddInfoTypes : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_RF_ModeSelect : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_RF_FilterSelect : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_StatusGen : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 3); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (alarmStatusOfCorrespondingDatapointIsNotAcknowledged) + alarmStatusOfCorrespondingDatapointIsNotAcknowledged, _alarmStatusOfCorrespondingDatapointIsNotAcknowledgedErr := readBuffer.ReadBit("alarmStatusOfCorrespondingDatapointIsNotAcknowledged") + if _alarmStatusOfCorrespondingDatapointIsNotAcknowledgedErr != nil { + return nil, errors.Wrap(_alarmStatusOfCorrespondingDatapointIsNotAcknowledgedErr, "Error parsing 'alarmStatusOfCorrespondingDatapointIsNotAcknowledged' field") + } + _map["Struct"] = values.NewPlcBOOL(alarmStatusOfCorrespondingDatapointIsNotAcknowledged) + + // Simple Field (correspondingDatapointIsInAlarm) + correspondingDatapointIsInAlarm, _correspondingDatapointIsInAlarmErr := readBuffer.ReadBit("correspondingDatapointIsInAlarm") + if _correspondingDatapointIsInAlarmErr != nil { + return nil, errors.Wrap(_correspondingDatapointIsInAlarmErr, "Error parsing 'correspondingDatapointIsInAlarm' field") + } + _map["Struct"] = values.NewPlcBOOL(correspondingDatapointIsInAlarm) + + // Simple Field (correspondingDatapointMainValueIsOverridden) + correspondingDatapointMainValueIsOverridden, _correspondingDatapointMainValueIsOverriddenErr := readBuffer.ReadBit("correspondingDatapointMainValueIsOverridden") + if _correspondingDatapointMainValueIsOverriddenErr != nil { + return nil, errors.Wrap(_correspondingDatapointMainValueIsOverriddenErr, "Error parsing 'correspondingDatapointMainValueIsOverridden' field") + } + _map["Struct"] = values.NewPlcBOOL(correspondingDatapointMainValueIsOverridden) + + // Simple Field (correspondingDatapointMainValueIsCorruptedDueToFailure) + correspondingDatapointMainValueIsCorruptedDueToFailure, _correspondingDatapointMainValueIsCorruptedDueToFailureErr := readBuffer.ReadBit("correspondingDatapointMainValueIsCorruptedDueToFailure") + if _correspondingDatapointMainValueIsCorruptedDueToFailureErr != nil { + return nil, errors.Wrap(_correspondingDatapointMainValueIsCorruptedDueToFailureErr, "Error parsing 'correspondingDatapointMainValueIsCorruptedDueToFailure' field") + } + _map["Struct"] = values.NewPlcBOOL(correspondingDatapointMainValueIsCorruptedDueToFailure) + + // Simple Field (correspondingDatapointValueIsOutOfService) + correspondingDatapointValueIsOutOfService, _correspondingDatapointValueIsOutOfServiceErr := readBuffer.ReadBit("correspondingDatapointValueIsOutOfService") + if _correspondingDatapointValueIsOutOfServiceErr != nil { + return nil, errors.Wrap(_correspondingDatapointValueIsOutOfServiceErr, "Error parsing 'correspondingDatapointValueIsOutOfService' field") + } + _map["Struct"] = values.NewPlcBOOL(correspondingDatapointValueIsOutOfService) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_Device_Control : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 5); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (verifyModeIsOn) + verifyModeIsOn, _verifyModeIsOnErr := readBuffer.ReadBit("verifyModeIsOn") + if _verifyModeIsOnErr != nil { + return nil, errors.Wrap(_verifyModeIsOnErr, "Error parsing 'verifyModeIsOn' field") + } + _map["Struct"] = values.NewPlcBOOL(verifyModeIsOn) + + // Simple Field (aDatagramWithTheOwnIndividualAddressAsSourceAddressHasBeenReceived) + aDatagramWithTheOwnIndividualAddressAsSourceAddressHasBeenReceived, _aDatagramWithTheOwnIndividualAddressAsSourceAddressHasBeenReceivedErr := readBuffer.ReadBit("aDatagramWithTheOwnIndividualAddressAsSourceAddressHasBeenReceived") + if _aDatagramWithTheOwnIndividualAddressAsSourceAddressHasBeenReceivedErr != nil { + return nil, errors.Wrap(_aDatagramWithTheOwnIndividualAddressAsSourceAddressHasBeenReceivedErr, "Error parsing 'aDatagramWithTheOwnIndividualAddressAsSourceAddressHasBeenReceived' field") + } + _map["Struct"] = values.NewPlcBOOL(aDatagramWithTheOwnIndividualAddressAsSourceAddressHasBeenReceived) + + // Simple Field (theUserApplicationIsStopped) + theUserApplicationIsStopped, _theUserApplicationIsStoppedErr := readBuffer.ReadBit("theUserApplicationIsStopped") + if _theUserApplicationIsStoppedErr != nil { + return nil, errors.Wrap(_theUserApplicationIsStoppedErr, "Error parsing 'theUserApplicationIsStopped' field") + } + _map["Struct"] = values.NewPlcBOOL(theUserApplicationIsStopped) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_ForceSign : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (roomhmax) + roomhmax, _roomhmaxErr := readBuffer.ReadBit("roomhmax") + if _roomhmaxErr != nil { + return nil, errors.Wrap(_roomhmaxErr, "Error parsing 'roomhmax' field") + } + _map["Struct"] = values.NewPlcBOOL(roomhmax) + + // Simple Field (roomhconf) + roomhconf, _roomhconfErr := readBuffer.ReadBit("roomhconf") + if _roomhconfErr != nil { + return nil, errors.Wrap(_roomhconfErr, "Error parsing 'roomhconf' field") + } + _map["Struct"] = values.NewPlcBOOL(roomhconf) + + // Simple Field (dhwlegio) + dhwlegio, _dhwlegioErr := readBuffer.ReadBit("dhwlegio") + if _dhwlegioErr != nil { + return nil, errors.Wrap(_dhwlegioErr, "Error parsing 'dhwlegio' field") + } + _map["Struct"] = values.NewPlcBOOL(dhwlegio) + + // Simple Field (dhwnorm) + dhwnorm, _dhwnormErr := readBuffer.ReadBit("dhwnorm") + if _dhwnormErr != nil { + return nil, errors.Wrap(_dhwnormErr, "Error parsing 'dhwnorm' field") + } + _map["Struct"] = values.NewPlcBOOL(dhwnorm) + + // Simple Field (overrun) + overrun, _overrunErr := readBuffer.ReadBit("overrun") + if _overrunErr != nil { + return nil, errors.Wrap(_overrunErr, "Error parsing 'overrun' field") + } + _map["Struct"] = values.NewPlcBOOL(overrun) + + // Simple Field (oversupply) + oversupply, _oversupplyErr := readBuffer.ReadBit("oversupply") + if _oversupplyErr != nil { + return nil, errors.Wrap(_oversupplyErr, "Error parsing 'oversupply' field") + } + _map["Struct"] = values.NewPlcBOOL(oversupply) + + // Simple Field (protection) + protection, _protectionErr := readBuffer.ReadBit("protection") + if _protectionErr != nil { + return nil, errors.Wrap(_protectionErr, "Error parsing 'protection' field") + } + _map["Struct"] = values.NewPlcBOOL(protection) + + // Simple Field (forcerequest) + forcerequest, _forcerequestErr := readBuffer.ReadBit("forcerequest") + if _forcerequestErr != nil { + return nil, errors.Wrap(_forcerequestErr, "Error parsing 'forcerequest' field") + } + _map["Struct"] = values.NewPlcBOOL(forcerequest) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_ForceSignCool : // BOOL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadBit("value") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcBOOL(value), nil +case datapointType == KnxDatapointType_DPT_StatusRHC : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (summermode) + summermode, _summermodeErr := readBuffer.ReadBit("summermode") + if _summermodeErr != nil { + return nil, errors.Wrap(_summermodeErr, "Error parsing 'summermode' field") + } + _map["Struct"] = values.NewPlcBOOL(summermode) + + // Simple Field (statusstopoptim) + statusstopoptim, _statusstopoptimErr := readBuffer.ReadBit("statusstopoptim") + if _statusstopoptimErr != nil { + return nil, errors.Wrap(_statusstopoptimErr, "Error parsing 'statusstopoptim' field") + } + _map["Struct"] = values.NewPlcBOOL(statusstopoptim) + + // Simple Field (statusstartoptim) + statusstartoptim, _statusstartoptimErr := readBuffer.ReadBit("statusstartoptim") + if _statusstartoptimErr != nil { + return nil, errors.Wrap(_statusstartoptimErr, "Error parsing 'statusstartoptim' field") + } + _map["Struct"] = values.NewPlcBOOL(statusstartoptim) + + // Simple Field (statusmorningboost) + statusmorningboost, _statusmorningboostErr := readBuffer.ReadBit("statusmorningboost") + if _statusmorningboostErr != nil { + return nil, errors.Wrap(_statusmorningboostErr, "Error parsing 'statusmorningboost' field") + } + _map["Struct"] = values.NewPlcBOOL(statusmorningboost) + + // Simple Field (tempreturnlimit) + tempreturnlimit, _tempreturnlimitErr := readBuffer.ReadBit("tempreturnlimit") + if _tempreturnlimitErr != nil { + return nil, errors.Wrap(_tempreturnlimitErr, "Error parsing 'tempreturnlimit' field") + } + _map["Struct"] = values.NewPlcBOOL(tempreturnlimit) + + // Simple Field (tempflowlimit) + tempflowlimit, _tempflowlimitErr := readBuffer.ReadBit("tempflowlimit") + if _tempflowlimitErr != nil { + return nil, errors.Wrap(_tempflowlimitErr, "Error parsing 'tempflowlimit' field") + } + _map["Struct"] = values.NewPlcBOOL(tempflowlimit) + + // Simple Field (satuseco) + satuseco, _satusecoErr := readBuffer.ReadBit("satuseco") + if _satusecoErr != nil { + return nil, errors.Wrap(_satusecoErr, "Error parsing 'satuseco' field") + } + _map["Struct"] = values.NewPlcBOOL(satuseco) + + // Simple Field (fault) + fault, _faultErr := readBuffer.ReadBit("fault") + if _faultErr != nil { + return nil, errors.Wrap(_faultErr, "Error parsing 'fault' field") + } + _map["Struct"] = values.NewPlcBOOL(fault) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_StatusSDHWC : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 5); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (solarloadsufficient) + solarloadsufficient, _solarloadsufficientErr := readBuffer.ReadBit("solarloadsufficient") + if _solarloadsufficientErr != nil { + return nil, errors.Wrap(_solarloadsufficientErr, "Error parsing 'solarloadsufficient' field") + } + _map["Struct"] = values.NewPlcBOOL(solarloadsufficient) + + // Simple Field (sdhwloadactive) + sdhwloadactive, _sdhwloadactiveErr := readBuffer.ReadBit("sdhwloadactive") + if _sdhwloadactiveErr != nil { + return nil, errors.Wrap(_sdhwloadactiveErr, "Error parsing 'sdhwloadactive' field") + } + _map["Struct"] = values.NewPlcBOOL(sdhwloadactive) + + // Simple Field (fault) + fault, _faultErr := readBuffer.ReadBit("fault") + if _faultErr != nil { + return nil, errors.Wrap(_faultErr, "Error parsing 'fault' field") + } + _map["Struct"] = values.NewPlcBOOL(fault) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_FuelTypeSet : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 5); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (solidstate) + solidstate, _solidstateErr := readBuffer.ReadBit("solidstate") + if _solidstateErr != nil { + return nil, errors.Wrap(_solidstateErr, "Error parsing 'solidstate' field") + } + _map["Struct"] = values.NewPlcBOOL(solidstate) + + // Simple Field (gas) + gas, _gasErr := readBuffer.ReadBit("gas") + if _gasErr != nil { + return nil, errors.Wrap(_gasErr, "Error parsing 'gas' field") + } + _map["Struct"] = values.NewPlcBOOL(gas) + + // Simple Field (oil) + oil, _oilErr := readBuffer.ReadBit("oil") + if _oilErr != nil { + return nil, errors.Wrap(_oilErr, "Error parsing 'oil' field") + } + _map["Struct"] = values.NewPlcBOOL(oil) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_StatusRCC : // BOOL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadBit("value") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcBOOL(value), nil +case datapointType == KnxDatapointType_DPT_StatusAHU : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (cool) + cool, _coolErr := readBuffer.ReadBit("cool") + if _coolErr != nil { + return nil, errors.Wrap(_coolErr, "Error parsing 'cool' field") + } + _map["Struct"] = values.NewPlcBOOL(cool) + + // Simple Field (heat) + heat, _heatErr := readBuffer.ReadBit("heat") + if _heatErr != nil { + return nil, errors.Wrap(_heatErr, "Error parsing 'heat' field") + } + _map["Struct"] = values.NewPlcBOOL(heat) + + // Simple Field (fanactive) + fanactive, _fanactiveErr := readBuffer.ReadBit("fanactive") + if _fanactiveErr != nil { + return nil, errors.Wrap(_fanactiveErr, "Error parsing 'fanactive' field") + } + _map["Struct"] = values.NewPlcBOOL(fanactive) + + // Simple Field (fault) + fault, _faultErr := readBuffer.ReadBit("fault") + if _faultErr != nil { + return nil, errors.Wrap(_faultErr, "Error parsing 'fault' field") + } + _map["Struct"] = values.NewPlcBOOL(fault) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_CombinedStatus_RTSM : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 3); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (statusOfHvacModeUser) + statusOfHvacModeUser, _statusOfHvacModeUserErr := readBuffer.ReadBit("statusOfHvacModeUser") + if _statusOfHvacModeUserErr != nil { + return nil, errors.Wrap(_statusOfHvacModeUserErr, "Error parsing 'statusOfHvacModeUser' field") + } + _map["Struct"] = values.NewPlcBOOL(statusOfHvacModeUser) + + // Simple Field (statusOfComfortProlongationUser) + statusOfComfortProlongationUser, _statusOfComfortProlongationUserErr := readBuffer.ReadBit("statusOfComfortProlongationUser") + if _statusOfComfortProlongationUserErr != nil { + return nil, errors.Wrap(_statusOfComfortProlongationUserErr, "Error parsing 'statusOfComfortProlongationUser' field") + } + _map["Struct"] = values.NewPlcBOOL(statusOfComfortProlongationUser) + + // Simple Field (effectiveValueOfTheComfortPushButton) + effectiveValueOfTheComfortPushButton, _effectiveValueOfTheComfortPushButtonErr := readBuffer.ReadBit("effectiveValueOfTheComfortPushButton") + if _effectiveValueOfTheComfortPushButtonErr != nil { + return nil, errors.Wrap(_effectiveValueOfTheComfortPushButtonErr, "Error parsing 'effectiveValueOfTheComfortPushButton' field") + } + _map["Struct"] = values.NewPlcBOOL(effectiveValueOfTheComfortPushButton) + + // Simple Field (effectiveValueOfThePresenceStatus) + effectiveValueOfThePresenceStatus, _effectiveValueOfThePresenceStatusErr := readBuffer.ReadBit("effectiveValueOfThePresenceStatus") + if _effectiveValueOfThePresenceStatusErr != nil { + return nil, errors.Wrap(_effectiveValueOfThePresenceStatusErr, "Error parsing 'effectiveValueOfThePresenceStatus' field") + } + _map["Struct"] = values.NewPlcBOOL(effectiveValueOfThePresenceStatus) + + // Simple Field (effectiveValueOfTheWindowStatus) + effectiveValueOfTheWindowStatus, _effectiveValueOfTheWindowStatusErr := readBuffer.ReadBit("effectiveValueOfTheWindowStatus") + if _effectiveValueOfTheWindowStatusErr != nil { + return nil, errors.Wrap(_effectiveValueOfTheWindowStatusErr, "Error parsing 'effectiveValueOfTheWindowStatus' field") + } + _map["Struct"] = values.NewPlcBOOL(effectiveValueOfTheWindowStatus) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_LightActuatorErrorInfo : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 1); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (overheat) + overheat, _overheatErr := readBuffer.ReadBit("overheat") + if _overheatErr != nil { + return nil, errors.Wrap(_overheatErr, "Error parsing 'overheat' field") + } + _map["Struct"] = values.NewPlcBOOL(overheat) + + // Simple Field (lampfailure) + lampfailure, _lampfailureErr := readBuffer.ReadBit("lampfailure") + if _lampfailureErr != nil { + return nil, errors.Wrap(_lampfailureErr, "Error parsing 'lampfailure' field") + } + _map["Struct"] = values.NewPlcBOOL(lampfailure) + + // Simple Field (defectiveload) + defectiveload, _defectiveloadErr := readBuffer.ReadBit("defectiveload") + if _defectiveloadErr != nil { + return nil, errors.Wrap(_defectiveloadErr, "Error parsing 'defectiveload' field") + } + _map["Struct"] = values.NewPlcBOOL(defectiveload) + + // Simple Field (underload) + underload, _underloadErr := readBuffer.ReadBit("underload") + if _underloadErr != nil { + return nil, errors.Wrap(_underloadErr, "Error parsing 'underload' field") + } + _map["Struct"] = values.NewPlcBOOL(underload) + + // Simple Field (overcurrent) + overcurrent, _overcurrentErr := readBuffer.ReadBit("overcurrent") + if _overcurrentErr != nil { + return nil, errors.Wrap(_overcurrentErr, "Error parsing 'overcurrent' field") + } + _map["Struct"] = values.NewPlcBOOL(overcurrent) + + // Simple Field (undervoltage) + undervoltage, _undervoltageErr := readBuffer.ReadBit("undervoltage") + if _undervoltageErr != nil { + return nil, errors.Wrap(_undervoltageErr, "Error parsing 'undervoltage' field") + } + _map["Struct"] = values.NewPlcBOOL(undervoltage) + + // Simple Field (loaddetectionerror) + loaddetectionerror, _loaddetectionerrorErr := readBuffer.ReadBit("loaddetectionerror") + if _loaddetectionerrorErr != nil { + return nil, errors.Wrap(_loaddetectionerrorErr, "Error parsing 'loaddetectionerror' field") + } + _map["Struct"] = values.NewPlcBOOL(loaddetectionerror) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_RF_ModeInfo : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 5); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (bibatSlave) + bibatSlave, _bibatSlaveErr := readBuffer.ReadBit("bibatSlave") + if _bibatSlaveErr != nil { + return nil, errors.Wrap(_bibatSlaveErr, "Error parsing 'bibatSlave' field") + } + _map["Struct"] = values.NewPlcBOOL(bibatSlave) + + // Simple Field (bibatMaster) + bibatMaster, _bibatMasterErr := readBuffer.ReadBit("bibatMaster") + if _bibatMasterErr != nil { + return nil, errors.Wrap(_bibatMasterErr, "Error parsing 'bibatMaster' field") + } + _map["Struct"] = values.NewPlcBOOL(bibatMaster) + + // Simple Field (asynchronous) + asynchronous, _asynchronousErr := readBuffer.ReadBit("asynchronous") + if _asynchronousErr != nil { + return nil, errors.Wrap(_asynchronousErr, "Error parsing 'asynchronous' field") + } + _map["Struct"] = values.NewPlcBOOL(asynchronous) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_RF_FilterInfo : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 5); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (doa) + doa, _doaErr := readBuffer.ReadBit("doa") + if _doaErr != nil { + return nil, errors.Wrap(_doaErr, "Error parsing 'doa' field") + } + _map["Struct"] = values.NewPlcBOOL(doa) + + // Simple Field (knxSn) + knxSn, _knxSnErr := readBuffer.ReadBit("knxSn") + if _knxSnErr != nil { + return nil, errors.Wrap(_knxSnErr, "Error parsing 'knxSn' field") + } + _map["Struct"] = values.NewPlcBOOL(knxSn) + + // Simple Field (doaAndKnxSn) + doaAndKnxSn, _doaAndKnxSnErr := readBuffer.ReadBit("doaAndKnxSn") + if _doaAndKnxSnErr != nil { + return nil, errors.Wrap(_doaAndKnxSnErr, "Error parsing 'doaAndKnxSn' field") + } + _map["Struct"] = values.NewPlcBOOL(doaAndKnxSn) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_Channel_Activation_8 : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (activationStateOfChannel1) + activationStateOfChannel1, _activationStateOfChannel1Err := readBuffer.ReadBit("activationStateOfChannel1") + if _activationStateOfChannel1Err != nil { + return nil, errors.Wrap(_activationStateOfChannel1Err, "Error parsing 'activationStateOfChannel1' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel1) + + // Simple Field (activationStateOfChannel2) + activationStateOfChannel2, _activationStateOfChannel2Err := readBuffer.ReadBit("activationStateOfChannel2") + if _activationStateOfChannel2Err != nil { + return nil, errors.Wrap(_activationStateOfChannel2Err, "Error parsing 'activationStateOfChannel2' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel2) + + // Simple Field (activationStateOfChannel3) + activationStateOfChannel3, _activationStateOfChannel3Err := readBuffer.ReadBit("activationStateOfChannel3") + if _activationStateOfChannel3Err != nil { + return nil, errors.Wrap(_activationStateOfChannel3Err, "Error parsing 'activationStateOfChannel3' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel3) + + // Simple Field (activationStateOfChannel4) + activationStateOfChannel4, _activationStateOfChannel4Err := readBuffer.ReadBit("activationStateOfChannel4") + if _activationStateOfChannel4Err != nil { + return nil, errors.Wrap(_activationStateOfChannel4Err, "Error parsing 'activationStateOfChannel4' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel4) + + // Simple Field (activationStateOfChannel5) + activationStateOfChannel5, _activationStateOfChannel5Err := readBuffer.ReadBit("activationStateOfChannel5") + if _activationStateOfChannel5Err != nil { + return nil, errors.Wrap(_activationStateOfChannel5Err, "Error parsing 'activationStateOfChannel5' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel5) + + // Simple Field (activationStateOfChannel6) + activationStateOfChannel6, _activationStateOfChannel6Err := readBuffer.ReadBit("activationStateOfChannel6") + if _activationStateOfChannel6Err != nil { + return nil, errors.Wrap(_activationStateOfChannel6Err, "Error parsing 'activationStateOfChannel6' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel6) + + // Simple Field (activationStateOfChannel7) + activationStateOfChannel7, _activationStateOfChannel7Err := readBuffer.ReadBit("activationStateOfChannel7") + if _activationStateOfChannel7Err != nil { + return nil, errors.Wrap(_activationStateOfChannel7Err, "Error parsing 'activationStateOfChannel7' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel7) + + // Simple Field (activationStateOfChannel8) + activationStateOfChannel8, _activationStateOfChannel8Err := readBuffer.ReadBit("activationStateOfChannel8") + if _activationStateOfChannel8Err != nil { + return nil, errors.Wrap(_activationStateOfChannel8Err, "Error parsing 'activationStateOfChannel8' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel8) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_StatusDHWC : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (tempoptimshiftactive) + tempoptimshiftactive, _tempoptimshiftactiveErr := readBuffer.ReadBit("tempoptimshiftactive") + if _tempoptimshiftactiveErr != nil { + return nil, errors.Wrap(_tempoptimshiftactiveErr, "Error parsing 'tempoptimshiftactive' field") + } + _map["Struct"] = values.NewPlcBOOL(tempoptimshiftactive) + + // Simple Field (solarenergysupport) + solarenergysupport, _solarenergysupportErr := readBuffer.ReadBit("solarenergysupport") + if _solarenergysupportErr != nil { + return nil, errors.Wrap(_solarenergysupportErr, "Error parsing 'solarenergysupport' field") + } + _map["Struct"] = values.NewPlcBOOL(solarenergysupport) + + // Simple Field (solarenergyonly) + solarenergyonly, _solarenergyonlyErr := readBuffer.ReadBit("solarenergyonly") + if _solarenergyonlyErr != nil { + return nil, errors.Wrap(_solarenergyonlyErr, "Error parsing 'solarenergyonly' field") + } + _map["Struct"] = values.NewPlcBOOL(solarenergyonly) + + // Simple Field (otherenergysourceactive) + otherenergysourceactive, _otherenergysourceactiveErr := readBuffer.ReadBit("otherenergysourceactive") + if _otherenergysourceactiveErr != nil { + return nil, errors.Wrap(_otherenergysourceactiveErr, "Error parsing 'otherenergysourceactive' field") + } + _map["Struct"] = values.NewPlcBOOL(otherenergysourceactive) + + // Simple Field (dhwpushactive) + dhwpushactive, _dhwpushactiveErr := readBuffer.ReadBit("dhwpushactive") + if _dhwpushactiveErr != nil { + return nil, errors.Wrap(_dhwpushactiveErr, "Error parsing 'dhwpushactive' field") + } + _map["Struct"] = values.NewPlcBOOL(dhwpushactive) + + // Simple Field (legioprotactive) + legioprotactive, _legioprotactiveErr := readBuffer.ReadBit("legioprotactive") + if _legioprotactiveErr != nil { + return nil, errors.Wrap(_legioprotactiveErr, "Error parsing 'legioprotactive' field") + } + _map["Struct"] = values.NewPlcBOOL(legioprotactive) + + // Simple Field (dhwloadactive) + dhwloadactive, _dhwloadactiveErr := readBuffer.ReadBit("dhwloadactive") + if _dhwloadactiveErr != nil { + return nil, errors.Wrap(_dhwloadactiveErr, "Error parsing 'dhwloadactive' field") + } + _map["Struct"] = values.NewPlcBOOL(dhwloadactive) + + // Simple Field (fault) + fault, _faultErr := readBuffer.ReadBit("fault") + if _faultErr != nil { + return nil, errors.Wrap(_faultErr, "Error parsing 'fault' field") + } + _map["Struct"] = values.NewPlcBOOL(fault) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_StatusRHCC : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 1); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (overheatalarm) + overheatalarm, _overheatalarmErr := readBuffer.ReadBit("overheatalarm") + if _overheatalarmErr != nil { + return nil, errors.Wrap(_overheatalarmErr, "Error parsing 'overheatalarm' field") + } + _map["Struct"] = values.NewPlcBOOL(overheatalarm) + + // Simple Field (frostalarm) + frostalarm, _frostalarmErr := readBuffer.ReadBit("frostalarm") + if _frostalarmErr != nil { + return nil, errors.Wrap(_frostalarmErr, "Error parsing 'frostalarm' field") + } + _map["Struct"] = values.NewPlcBOOL(frostalarm) + + // Simple Field (dewpointstatus) + dewpointstatus, _dewpointstatusErr := readBuffer.ReadBit("dewpointstatus") + if _dewpointstatusErr != nil { + return nil, errors.Wrap(_dewpointstatusErr, "Error parsing 'dewpointstatus' field") + } + _map["Struct"] = values.NewPlcBOOL(dewpointstatus) + + // Simple Field (coolingdisabled) + coolingdisabled, _coolingdisabledErr := readBuffer.ReadBit("coolingdisabled") + if _coolingdisabledErr != nil { + return nil, errors.Wrap(_coolingdisabledErr, "Error parsing 'coolingdisabled' field") + } + _map["Struct"] = values.NewPlcBOOL(coolingdisabled) + + // Simple Field (statusprecool) + statusprecool, _statusprecoolErr := readBuffer.ReadBit("statusprecool") + if _statusprecoolErr != nil { + return nil, errors.Wrap(_statusprecoolErr, "Error parsing 'statusprecool' field") + } + _map["Struct"] = values.NewPlcBOOL(statusprecool) + + // Simple Field (statusecoc) + statusecoc, _statusecocErr := readBuffer.ReadBit("statusecoc") + if _statusecocErr != nil { + return nil, errors.Wrap(_statusecocErr, "Error parsing 'statusecoc' field") + } + _map["Struct"] = values.NewPlcBOOL(statusecoc) + + // Simple Field (heatcoolmode) + heatcoolmode, _heatcoolmodeErr := readBuffer.ReadBit("heatcoolmode") + if _heatcoolmodeErr != nil { + return nil, errors.Wrap(_heatcoolmodeErr, "Error parsing 'heatcoolmode' field") + } + _map["Struct"] = values.NewPlcBOOL(heatcoolmode) + + // Simple Field (heatingdiabled) + heatingdiabled, _heatingdiabledErr := readBuffer.ReadBit("heatingdiabled") + if _heatingdiabledErr != nil { + return nil, errors.Wrap(_heatingdiabledErr, "Error parsing 'heatingdiabled' field") + } + _map["Struct"] = values.NewPlcBOOL(heatingdiabled) + + // Simple Field (statusstopoptim) + statusstopoptim, _statusstopoptimErr := readBuffer.ReadBit("statusstopoptim") + if _statusstopoptimErr != nil { + return nil, errors.Wrap(_statusstopoptimErr, "Error parsing 'statusstopoptim' field") + } + _map["Struct"] = values.NewPlcBOOL(statusstopoptim) + + // Simple Field (statusstartoptim) + statusstartoptim, _statusstartoptimErr := readBuffer.ReadBit("statusstartoptim") + if _statusstartoptimErr != nil { + return nil, errors.Wrap(_statusstartoptimErr, "Error parsing 'statusstartoptim' field") + } + _map["Struct"] = values.NewPlcBOOL(statusstartoptim) + + // Simple Field (statusmorningboosth) + statusmorningboosth, _statusmorningboosthErr := readBuffer.ReadBit("statusmorningboosth") + if _statusmorningboosthErr != nil { + return nil, errors.Wrap(_statusmorningboosthErr, "Error parsing 'statusmorningboosth' field") + } + _map["Struct"] = values.NewPlcBOOL(statusmorningboosth) + + // Simple Field (tempflowreturnlimit) + tempflowreturnlimit, _tempflowreturnlimitErr := readBuffer.ReadBit("tempflowreturnlimit") + if _tempflowreturnlimitErr != nil { + return nil, errors.Wrap(_tempflowreturnlimitErr, "Error parsing 'tempflowreturnlimit' field") + } + _map["Struct"] = values.NewPlcBOOL(tempflowreturnlimit) + + // Simple Field (tempflowlimit) + tempflowlimit, _tempflowlimitErr := readBuffer.ReadBit("tempflowlimit") + if _tempflowlimitErr != nil { + return nil, errors.Wrap(_tempflowlimitErr, "Error parsing 'tempflowlimit' field") + } + _map["Struct"] = values.NewPlcBOOL(tempflowlimit) + + // Simple Field (statusecoh) + statusecoh, _statusecohErr := readBuffer.ReadBit("statusecoh") + if _statusecohErr != nil { + return nil, errors.Wrap(_statusecohErr, "Error parsing 'statusecoh' field") + } + _map["Struct"] = values.NewPlcBOOL(statusecoh) + + // Simple Field (fault) + fault, _faultErr := readBuffer.ReadBit("fault") + if _faultErr != nil { + return nil, errors.Wrap(_faultErr, "Error parsing 'fault' field") + } + _map["Struct"] = values.NewPlcBOOL(fault) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_CombinedStatus_HVA : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (calibrationMode) + calibrationMode, _calibrationModeErr := readBuffer.ReadBit("calibrationMode") + if _calibrationModeErr != nil { + return nil, errors.Wrap(_calibrationModeErr, "Error parsing 'calibrationMode' field") + } + _map["Struct"] = values.NewPlcBOOL(calibrationMode) + + // Simple Field (lockedPosition) + lockedPosition, _lockedPositionErr := readBuffer.ReadBit("lockedPosition") + if _lockedPositionErr != nil { + return nil, errors.Wrap(_lockedPositionErr, "Error parsing 'lockedPosition' field") + } + _map["Struct"] = values.NewPlcBOOL(lockedPosition) + + // Simple Field (forcedPosition) + forcedPosition, _forcedPositionErr := readBuffer.ReadBit("forcedPosition") + if _forcedPositionErr != nil { + return nil, errors.Wrap(_forcedPositionErr, "Error parsing 'forcedPosition' field") + } + _map["Struct"] = values.NewPlcBOOL(forcedPosition) + + // Simple Field (manuaOperationOverridden) + manuaOperationOverridden, _manuaOperationOverriddenErr := readBuffer.ReadBit("manuaOperationOverridden") + if _manuaOperationOverriddenErr != nil { + return nil, errors.Wrap(_manuaOperationOverriddenErr, "Error parsing 'manuaOperationOverridden' field") + } + _map["Struct"] = values.NewPlcBOOL(manuaOperationOverridden) + + // Simple Field (serviceMode) + serviceMode, _serviceModeErr := readBuffer.ReadBit("serviceMode") + if _serviceModeErr != nil { + return nil, errors.Wrap(_serviceModeErr, "Error parsing 'serviceMode' field") + } + _map["Struct"] = values.NewPlcBOOL(serviceMode) + + // Simple Field (valveKick) + valveKick, _valveKickErr := readBuffer.ReadBit("valveKick") + if _valveKickErr != nil { + return nil, errors.Wrap(_valveKickErr, "Error parsing 'valveKick' field") + } + _map["Struct"] = values.NewPlcBOOL(valveKick) + + // Simple Field (overload) + overload, _overloadErr := readBuffer.ReadBit("overload") + if _overloadErr != nil { + return nil, errors.Wrap(_overloadErr, "Error parsing 'overload' field") + } + _map["Struct"] = values.NewPlcBOOL(overload) + + // Simple Field (shortCircuit) + shortCircuit, _shortCircuitErr := readBuffer.ReadBit("shortCircuit") + if _shortCircuitErr != nil { + return nil, errors.Wrap(_shortCircuitErr, "Error parsing 'shortCircuit' field") + } + _map["Struct"] = values.NewPlcBOOL(shortCircuit) + + // Simple Field (currentValvePosition) + currentValvePosition, _currentValvePositionErr := readBuffer.ReadBit("currentValvePosition") + if _currentValvePositionErr != nil { + return nil, errors.Wrap(_currentValvePositionErr, "Error parsing 'currentValvePosition' field") + } + _map["Struct"] = values.NewPlcBOOL(currentValvePosition) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_CombinedStatus_RTC : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (coolingModeEnabled) + coolingModeEnabled, _coolingModeEnabledErr := readBuffer.ReadBit("coolingModeEnabled") + if _coolingModeEnabledErr != nil { + return nil, errors.Wrap(_coolingModeEnabledErr, "Error parsing 'coolingModeEnabled' field") + } + _map["Struct"] = values.NewPlcBOOL(coolingModeEnabled) + + // Simple Field (heatingModeEnabled) + heatingModeEnabled, _heatingModeEnabledErr := readBuffer.ReadBit("heatingModeEnabled") + if _heatingModeEnabledErr != nil { + return nil, errors.Wrap(_heatingModeEnabledErr, "Error parsing 'heatingModeEnabled' field") + } + _map["Struct"] = values.NewPlcBOOL(heatingModeEnabled) + + // Simple Field (additionalHeatingCoolingStage2Stage) + additionalHeatingCoolingStage2Stage, _additionalHeatingCoolingStage2StageErr := readBuffer.ReadBit("additionalHeatingCoolingStage2Stage") + if _additionalHeatingCoolingStage2StageErr != nil { + return nil, errors.Wrap(_additionalHeatingCoolingStage2StageErr, "Error parsing 'additionalHeatingCoolingStage2Stage' field") + } + _map["Struct"] = values.NewPlcBOOL(additionalHeatingCoolingStage2Stage) + + // Simple Field (controllerInactive) + controllerInactive, _controllerInactiveErr := readBuffer.ReadBit("controllerInactive") + if _controllerInactiveErr != nil { + return nil, errors.Wrap(_controllerInactiveErr, "Error parsing 'controllerInactive' field") + } + _map["Struct"] = values.NewPlcBOOL(controllerInactive) + + // Simple Field (overheatAlarm) + overheatAlarm, _overheatAlarmErr := readBuffer.ReadBit("overheatAlarm") + if _overheatAlarmErr != nil { + return nil, errors.Wrap(_overheatAlarmErr, "Error parsing 'overheatAlarm' field") + } + _map["Struct"] = values.NewPlcBOOL(overheatAlarm) + + // Simple Field (frostAlarm) + frostAlarm, _frostAlarmErr := readBuffer.ReadBit("frostAlarm") + if _frostAlarmErr != nil { + return nil, errors.Wrap(_frostAlarmErr, "Error parsing 'frostAlarm' field") + } + _map["Struct"] = values.NewPlcBOOL(frostAlarm) + + // Simple Field (dewPointStatus) + dewPointStatus, _dewPointStatusErr := readBuffer.ReadBit("dewPointStatus") + if _dewPointStatusErr != nil { + return nil, errors.Wrap(_dewPointStatusErr, "Error parsing 'dewPointStatus' field") + } + _map["Struct"] = values.NewPlcBOOL(dewPointStatus) + + // Simple Field (activeMode) + activeMode, _activeModeErr := readBuffer.ReadBit("activeMode") + if _activeModeErr != nil { + return nil, errors.Wrap(_activeModeErr, "Error parsing 'activeMode' field") + } + _map["Struct"] = values.NewPlcBOOL(activeMode) + + // Simple Field (generalFailureInformation) + generalFailureInformation, _generalFailureInformationErr := readBuffer.ReadBit("generalFailureInformation") + if _generalFailureInformationErr != nil { + return nil, errors.Wrap(_generalFailureInformationErr, "Error parsing 'generalFailureInformation' field") + } + _map["Struct"] = values.NewPlcBOOL(generalFailureInformation) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_Media : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint16("reserved", 10); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (knxIp) + knxIp, _knxIpErr := readBuffer.ReadBit("knxIp") + if _knxIpErr != nil { + return nil, errors.Wrap(_knxIpErr, "Error parsing 'knxIp' field") + } + _map["Struct"] = values.NewPlcBOOL(knxIp) + + // Simple Field (rf) + rf, _rfErr := readBuffer.ReadBit("rf") + if _rfErr != nil { + return nil, errors.Wrap(_rfErr, "Error parsing 'rf' field") + } + _map["Struct"] = values.NewPlcBOOL(rf) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 1); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (pl110) + pl110, _pl110Err := readBuffer.ReadBit("pl110") + if _pl110Err != nil { + return nil, errors.Wrap(_pl110Err, "Error parsing 'pl110' field") + } + _map["Struct"] = values.NewPlcBOOL(pl110) + + // Simple Field (tp1) + tp1, _tp1Err := readBuffer.ReadBit("tp1") + if _tp1Err != nil { + return nil, errors.Wrap(_tp1Err, "Error parsing 'tp1' field") + } + _map["Struct"] = values.NewPlcBOOL(tp1) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 1); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_Channel_Activation_16 : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (activationStateOfChannel1) + activationStateOfChannel1, _activationStateOfChannel1Err := readBuffer.ReadBit("activationStateOfChannel1") + if _activationStateOfChannel1Err != nil { + return nil, errors.Wrap(_activationStateOfChannel1Err, "Error parsing 'activationStateOfChannel1' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel1) + + // Simple Field (activationStateOfChannel2) + activationStateOfChannel2, _activationStateOfChannel2Err := readBuffer.ReadBit("activationStateOfChannel2") + if _activationStateOfChannel2Err != nil { + return nil, errors.Wrap(_activationStateOfChannel2Err, "Error parsing 'activationStateOfChannel2' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel2) + + // Simple Field (activationStateOfChannel3) + activationStateOfChannel3, _activationStateOfChannel3Err := readBuffer.ReadBit("activationStateOfChannel3") + if _activationStateOfChannel3Err != nil { + return nil, errors.Wrap(_activationStateOfChannel3Err, "Error parsing 'activationStateOfChannel3' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel3) + + // Simple Field (activationStateOfChannel4) + activationStateOfChannel4, _activationStateOfChannel4Err := readBuffer.ReadBit("activationStateOfChannel4") + if _activationStateOfChannel4Err != nil { + return nil, errors.Wrap(_activationStateOfChannel4Err, "Error parsing 'activationStateOfChannel4' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel4) + + // Simple Field (activationStateOfChannel5) + activationStateOfChannel5, _activationStateOfChannel5Err := readBuffer.ReadBit("activationStateOfChannel5") + if _activationStateOfChannel5Err != nil { + return nil, errors.Wrap(_activationStateOfChannel5Err, "Error parsing 'activationStateOfChannel5' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel5) + + // Simple Field (activationStateOfChannel6) + activationStateOfChannel6, _activationStateOfChannel6Err := readBuffer.ReadBit("activationStateOfChannel6") + if _activationStateOfChannel6Err != nil { + return nil, errors.Wrap(_activationStateOfChannel6Err, "Error parsing 'activationStateOfChannel6' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel6) + + // Simple Field (activationStateOfChannel7) + activationStateOfChannel7, _activationStateOfChannel7Err := readBuffer.ReadBit("activationStateOfChannel7") + if _activationStateOfChannel7Err != nil { + return nil, errors.Wrap(_activationStateOfChannel7Err, "Error parsing 'activationStateOfChannel7' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel7) + + // Simple Field (activationStateOfChannel8) + activationStateOfChannel8, _activationStateOfChannel8Err := readBuffer.ReadBit("activationStateOfChannel8") + if _activationStateOfChannel8Err != nil { + return nil, errors.Wrap(_activationStateOfChannel8Err, "Error parsing 'activationStateOfChannel8' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel8) + + // Simple Field (activationStateOfChannel9) + activationStateOfChannel9, _activationStateOfChannel9Err := readBuffer.ReadBit("activationStateOfChannel9") + if _activationStateOfChannel9Err != nil { + return nil, errors.Wrap(_activationStateOfChannel9Err, "Error parsing 'activationStateOfChannel9' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel9) + + // Simple Field (activationStateOfChannel10) + activationStateOfChannel10, _activationStateOfChannel10Err := readBuffer.ReadBit("activationStateOfChannel10") + if _activationStateOfChannel10Err != nil { + return nil, errors.Wrap(_activationStateOfChannel10Err, "Error parsing 'activationStateOfChannel10' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel10) + + // Simple Field (activationStateOfChannel11) + activationStateOfChannel11, _activationStateOfChannel11Err := readBuffer.ReadBit("activationStateOfChannel11") + if _activationStateOfChannel11Err != nil { + return nil, errors.Wrap(_activationStateOfChannel11Err, "Error parsing 'activationStateOfChannel11' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel11) + + // Simple Field (activationStateOfChannel12) + activationStateOfChannel12, _activationStateOfChannel12Err := readBuffer.ReadBit("activationStateOfChannel12") + if _activationStateOfChannel12Err != nil { + return nil, errors.Wrap(_activationStateOfChannel12Err, "Error parsing 'activationStateOfChannel12' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel12) + + // Simple Field (activationStateOfChannel13) + activationStateOfChannel13, _activationStateOfChannel13Err := readBuffer.ReadBit("activationStateOfChannel13") + if _activationStateOfChannel13Err != nil { + return nil, errors.Wrap(_activationStateOfChannel13Err, "Error parsing 'activationStateOfChannel13' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel13) + + // Simple Field (activationStateOfChannel14) + activationStateOfChannel14, _activationStateOfChannel14Err := readBuffer.ReadBit("activationStateOfChannel14") + if _activationStateOfChannel14Err != nil { + return nil, errors.Wrap(_activationStateOfChannel14Err, "Error parsing 'activationStateOfChannel14' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel14) + + // Simple Field (activationStateOfChannel15) + activationStateOfChannel15, _activationStateOfChannel15Err := readBuffer.ReadBit("activationStateOfChannel15") + if _activationStateOfChannel15Err != nil { + return nil, errors.Wrap(_activationStateOfChannel15Err, "Error parsing 'activationStateOfChannel15' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel15) + + // Simple Field (activationStateOfChannel16) + activationStateOfChannel16, _activationStateOfChannel16Err := readBuffer.ReadBit("activationStateOfChannel16") + if _activationStateOfChannel16Err != nil { + return nil, errors.Wrap(_activationStateOfChannel16Err, "Error parsing 'activationStateOfChannel16' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel16) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_OnOffAction : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 6); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 2) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_Alarm_Reaction : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 6); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 2) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_UpDown_Action : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 6); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 2) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_HVAC_PB_Action : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 6); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 2) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcUSINT(value), nil +case datapointType == KnxDatapointType_DPT_DoubleNibble : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (busy) + busy, _busyErr := readBuffer.ReadUint8("busy", 4) + if _busyErr != nil { + return nil, errors.Wrap(_busyErr, "Error parsing 'busy' field") + } + _map["Struct"] = values.NewPlcUSINT(busy) + + // Simple Field (nak) + nak, _nakErr := readBuffer.ReadUint8("nak", 4) + if _nakErr != nil { + return nil, errors.Wrap(_nakErr, "Error parsing 'nak' field") + } + _map["Struct"] = values.NewPlcUSINT(nak) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_SceneInfo : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 1); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (sceneIsInactive) + sceneIsInactive, _sceneIsInactiveErr := readBuffer.ReadBit("sceneIsInactive") + if _sceneIsInactiveErr != nil { + return nil, errors.Wrap(_sceneIsInactiveErr, "Error parsing 'sceneIsInactive' field") + } + _map["Struct"] = values.NewPlcBOOL(sceneIsInactive) + + // Simple Field (scenenumber) + scenenumber, _scenenumberErr := readBuffer.ReadUint8("scenenumber", 6) + if _scenenumberErr != nil { + return nil, errors.Wrap(_scenenumberErr, "Error parsing 'scenenumber' field") + } + _map["Struct"] = values.NewPlcUSINT(scenenumber) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_CombinedInfoOnOff : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (maskBitInfoOnOffOutput16) + maskBitInfoOnOffOutput16, _maskBitInfoOnOffOutput16Err := readBuffer.ReadBit("maskBitInfoOnOffOutput16") + if _maskBitInfoOnOffOutput16Err != nil { + return nil, errors.Wrap(_maskBitInfoOnOffOutput16Err, "Error parsing 'maskBitInfoOnOffOutput16' field") + } + _map["Struct"] = values.NewPlcBOOL(maskBitInfoOnOffOutput16) + + // Simple Field (maskBitInfoOnOffOutput15) + maskBitInfoOnOffOutput15, _maskBitInfoOnOffOutput15Err := readBuffer.ReadBit("maskBitInfoOnOffOutput15") + if _maskBitInfoOnOffOutput15Err != nil { + return nil, errors.Wrap(_maskBitInfoOnOffOutput15Err, "Error parsing 'maskBitInfoOnOffOutput15' field") + } + _map["Struct"] = values.NewPlcBOOL(maskBitInfoOnOffOutput15) + + // Simple Field (maskBitInfoOnOffOutput14) + maskBitInfoOnOffOutput14, _maskBitInfoOnOffOutput14Err := readBuffer.ReadBit("maskBitInfoOnOffOutput14") + if _maskBitInfoOnOffOutput14Err != nil { + return nil, errors.Wrap(_maskBitInfoOnOffOutput14Err, "Error parsing 'maskBitInfoOnOffOutput14' field") + } + _map["Struct"] = values.NewPlcBOOL(maskBitInfoOnOffOutput14) + + // Simple Field (maskBitInfoOnOffOutput13) + maskBitInfoOnOffOutput13, _maskBitInfoOnOffOutput13Err := readBuffer.ReadBit("maskBitInfoOnOffOutput13") + if _maskBitInfoOnOffOutput13Err != nil { + return nil, errors.Wrap(_maskBitInfoOnOffOutput13Err, "Error parsing 'maskBitInfoOnOffOutput13' field") + } + _map["Struct"] = values.NewPlcBOOL(maskBitInfoOnOffOutput13) + + // Simple Field (maskBitInfoOnOffOutput12) + maskBitInfoOnOffOutput12, _maskBitInfoOnOffOutput12Err := readBuffer.ReadBit("maskBitInfoOnOffOutput12") + if _maskBitInfoOnOffOutput12Err != nil { + return nil, errors.Wrap(_maskBitInfoOnOffOutput12Err, "Error parsing 'maskBitInfoOnOffOutput12' field") + } + _map["Struct"] = values.NewPlcBOOL(maskBitInfoOnOffOutput12) + + // Simple Field (maskBitInfoOnOffOutput11) + maskBitInfoOnOffOutput11, _maskBitInfoOnOffOutput11Err := readBuffer.ReadBit("maskBitInfoOnOffOutput11") + if _maskBitInfoOnOffOutput11Err != nil { + return nil, errors.Wrap(_maskBitInfoOnOffOutput11Err, "Error parsing 'maskBitInfoOnOffOutput11' field") + } + _map["Struct"] = values.NewPlcBOOL(maskBitInfoOnOffOutput11) + + // Simple Field (maskBitInfoOnOffOutput10) + maskBitInfoOnOffOutput10, _maskBitInfoOnOffOutput10Err := readBuffer.ReadBit("maskBitInfoOnOffOutput10") + if _maskBitInfoOnOffOutput10Err != nil { + return nil, errors.Wrap(_maskBitInfoOnOffOutput10Err, "Error parsing 'maskBitInfoOnOffOutput10' field") + } + _map["Struct"] = values.NewPlcBOOL(maskBitInfoOnOffOutput10) + + // Simple Field (maskBitInfoOnOffOutput9) + maskBitInfoOnOffOutput9, _maskBitInfoOnOffOutput9Err := readBuffer.ReadBit("maskBitInfoOnOffOutput9") + if _maskBitInfoOnOffOutput9Err != nil { + return nil, errors.Wrap(_maskBitInfoOnOffOutput9Err, "Error parsing 'maskBitInfoOnOffOutput9' field") + } + _map["Struct"] = values.NewPlcBOOL(maskBitInfoOnOffOutput9) + + // Simple Field (maskBitInfoOnOffOutput8) + maskBitInfoOnOffOutput8, _maskBitInfoOnOffOutput8Err := readBuffer.ReadBit("maskBitInfoOnOffOutput8") + if _maskBitInfoOnOffOutput8Err != nil { + return nil, errors.Wrap(_maskBitInfoOnOffOutput8Err, "Error parsing 'maskBitInfoOnOffOutput8' field") + } + _map["Struct"] = values.NewPlcBOOL(maskBitInfoOnOffOutput8) + + // Simple Field (maskBitInfoOnOffOutput7) + maskBitInfoOnOffOutput7, _maskBitInfoOnOffOutput7Err := readBuffer.ReadBit("maskBitInfoOnOffOutput7") + if _maskBitInfoOnOffOutput7Err != nil { + return nil, errors.Wrap(_maskBitInfoOnOffOutput7Err, "Error parsing 'maskBitInfoOnOffOutput7' field") + } + _map["Struct"] = values.NewPlcBOOL(maskBitInfoOnOffOutput7) + + // Simple Field (maskBitInfoOnOffOutput6) + maskBitInfoOnOffOutput6, _maskBitInfoOnOffOutput6Err := readBuffer.ReadBit("maskBitInfoOnOffOutput6") + if _maskBitInfoOnOffOutput6Err != nil { + return nil, errors.Wrap(_maskBitInfoOnOffOutput6Err, "Error parsing 'maskBitInfoOnOffOutput6' field") + } + _map["Struct"] = values.NewPlcBOOL(maskBitInfoOnOffOutput6) + + // Simple Field (maskBitInfoOnOffOutput5) + maskBitInfoOnOffOutput5, _maskBitInfoOnOffOutput5Err := readBuffer.ReadBit("maskBitInfoOnOffOutput5") + if _maskBitInfoOnOffOutput5Err != nil { + return nil, errors.Wrap(_maskBitInfoOnOffOutput5Err, "Error parsing 'maskBitInfoOnOffOutput5' field") + } + _map["Struct"] = values.NewPlcBOOL(maskBitInfoOnOffOutput5) + + // Simple Field (maskBitInfoOnOffOutput4) + maskBitInfoOnOffOutput4, _maskBitInfoOnOffOutput4Err := readBuffer.ReadBit("maskBitInfoOnOffOutput4") + if _maskBitInfoOnOffOutput4Err != nil { + return nil, errors.Wrap(_maskBitInfoOnOffOutput4Err, "Error parsing 'maskBitInfoOnOffOutput4' field") + } + _map["Struct"] = values.NewPlcBOOL(maskBitInfoOnOffOutput4) + + // Simple Field (maskBitInfoOnOffOutput3) + maskBitInfoOnOffOutput3, _maskBitInfoOnOffOutput3Err := readBuffer.ReadBit("maskBitInfoOnOffOutput3") + if _maskBitInfoOnOffOutput3Err != nil { + return nil, errors.Wrap(_maskBitInfoOnOffOutput3Err, "Error parsing 'maskBitInfoOnOffOutput3' field") + } + _map["Struct"] = values.NewPlcBOOL(maskBitInfoOnOffOutput3) + + // Simple Field (maskBitInfoOnOffOutput2) + maskBitInfoOnOffOutput2, _maskBitInfoOnOffOutput2Err := readBuffer.ReadBit("maskBitInfoOnOffOutput2") + if _maskBitInfoOnOffOutput2Err != nil { + return nil, errors.Wrap(_maskBitInfoOnOffOutput2Err, "Error parsing 'maskBitInfoOnOffOutput2' field") + } + _map["Struct"] = values.NewPlcBOOL(maskBitInfoOnOffOutput2) + + // Simple Field (maskBitInfoOnOffOutput1) + maskBitInfoOnOffOutput1, _maskBitInfoOnOffOutput1Err := readBuffer.ReadBit("maskBitInfoOnOffOutput1") + if _maskBitInfoOnOffOutput1Err != nil { + return nil, errors.Wrap(_maskBitInfoOnOffOutput1Err, "Error parsing 'maskBitInfoOnOffOutput1' field") + } + _map["Struct"] = values.NewPlcBOOL(maskBitInfoOnOffOutput1) + + // Simple Field (infoOnOffOutput16) + infoOnOffOutput16, _infoOnOffOutput16Err := readBuffer.ReadBit("infoOnOffOutput16") + if _infoOnOffOutput16Err != nil { + return nil, errors.Wrap(_infoOnOffOutput16Err, "Error parsing 'infoOnOffOutput16' field") + } + _map["Struct"] = values.NewPlcBOOL(infoOnOffOutput16) + + // Simple Field (infoOnOffOutput15) + infoOnOffOutput15, _infoOnOffOutput15Err := readBuffer.ReadBit("infoOnOffOutput15") + if _infoOnOffOutput15Err != nil { + return nil, errors.Wrap(_infoOnOffOutput15Err, "Error parsing 'infoOnOffOutput15' field") + } + _map["Struct"] = values.NewPlcBOOL(infoOnOffOutput15) + + // Simple Field (infoOnOffOutput14) + infoOnOffOutput14, _infoOnOffOutput14Err := readBuffer.ReadBit("infoOnOffOutput14") + if _infoOnOffOutput14Err != nil { + return nil, errors.Wrap(_infoOnOffOutput14Err, "Error parsing 'infoOnOffOutput14' field") + } + _map["Struct"] = values.NewPlcBOOL(infoOnOffOutput14) + + // Simple Field (infoOnOffOutput13) + infoOnOffOutput13, _infoOnOffOutput13Err := readBuffer.ReadBit("infoOnOffOutput13") + if _infoOnOffOutput13Err != nil { + return nil, errors.Wrap(_infoOnOffOutput13Err, "Error parsing 'infoOnOffOutput13' field") + } + _map["Struct"] = values.NewPlcBOOL(infoOnOffOutput13) + + // Simple Field (infoOnOffOutput12) + infoOnOffOutput12, _infoOnOffOutput12Err := readBuffer.ReadBit("infoOnOffOutput12") + if _infoOnOffOutput12Err != nil { + return nil, errors.Wrap(_infoOnOffOutput12Err, "Error parsing 'infoOnOffOutput12' field") + } + _map["Struct"] = values.NewPlcBOOL(infoOnOffOutput12) + + // Simple Field (infoOnOffOutput11) + infoOnOffOutput11, _infoOnOffOutput11Err := readBuffer.ReadBit("infoOnOffOutput11") + if _infoOnOffOutput11Err != nil { + return nil, errors.Wrap(_infoOnOffOutput11Err, "Error parsing 'infoOnOffOutput11' field") + } + _map["Struct"] = values.NewPlcBOOL(infoOnOffOutput11) + + // Simple Field (infoOnOffOutput10) + infoOnOffOutput10, _infoOnOffOutput10Err := readBuffer.ReadBit("infoOnOffOutput10") + if _infoOnOffOutput10Err != nil { + return nil, errors.Wrap(_infoOnOffOutput10Err, "Error parsing 'infoOnOffOutput10' field") + } + _map["Struct"] = values.NewPlcBOOL(infoOnOffOutput10) + + // Simple Field (infoOnOffOutput9) + infoOnOffOutput9, _infoOnOffOutput9Err := readBuffer.ReadBit("infoOnOffOutput9") + if _infoOnOffOutput9Err != nil { + return nil, errors.Wrap(_infoOnOffOutput9Err, "Error parsing 'infoOnOffOutput9' field") + } + _map["Struct"] = values.NewPlcBOOL(infoOnOffOutput9) + + // Simple Field (infoOnOffOutput8) + infoOnOffOutput8, _infoOnOffOutput8Err := readBuffer.ReadBit("infoOnOffOutput8") + if _infoOnOffOutput8Err != nil { + return nil, errors.Wrap(_infoOnOffOutput8Err, "Error parsing 'infoOnOffOutput8' field") + } + _map["Struct"] = values.NewPlcBOOL(infoOnOffOutput8) + + // Simple Field (infoOnOffOutput7) + infoOnOffOutput7, _infoOnOffOutput7Err := readBuffer.ReadBit("infoOnOffOutput7") + if _infoOnOffOutput7Err != nil { + return nil, errors.Wrap(_infoOnOffOutput7Err, "Error parsing 'infoOnOffOutput7' field") + } + _map["Struct"] = values.NewPlcBOOL(infoOnOffOutput7) + + // Simple Field (infoOnOffOutput6) + infoOnOffOutput6, _infoOnOffOutput6Err := readBuffer.ReadBit("infoOnOffOutput6") + if _infoOnOffOutput6Err != nil { + return nil, errors.Wrap(_infoOnOffOutput6Err, "Error parsing 'infoOnOffOutput6' field") + } + _map["Struct"] = values.NewPlcBOOL(infoOnOffOutput6) + + // Simple Field (infoOnOffOutput5) + infoOnOffOutput5, _infoOnOffOutput5Err := readBuffer.ReadBit("infoOnOffOutput5") + if _infoOnOffOutput5Err != nil { + return nil, errors.Wrap(_infoOnOffOutput5Err, "Error parsing 'infoOnOffOutput5' field") + } + _map["Struct"] = values.NewPlcBOOL(infoOnOffOutput5) + + // Simple Field (infoOnOffOutput4) + infoOnOffOutput4, _infoOnOffOutput4Err := readBuffer.ReadBit("infoOnOffOutput4") + if _infoOnOffOutput4Err != nil { + return nil, errors.Wrap(_infoOnOffOutput4Err, "Error parsing 'infoOnOffOutput4' field") + } + _map["Struct"] = values.NewPlcBOOL(infoOnOffOutput4) + + // Simple Field (infoOnOffOutput3) + infoOnOffOutput3, _infoOnOffOutput3Err := readBuffer.ReadBit("infoOnOffOutput3") + if _infoOnOffOutput3Err != nil { + return nil, errors.Wrap(_infoOnOffOutput3Err, "Error parsing 'infoOnOffOutput3' field") + } + _map["Struct"] = values.NewPlcBOOL(infoOnOffOutput3) + + // Simple Field (infoOnOffOutput2) + infoOnOffOutput2, _infoOnOffOutput2Err := readBuffer.ReadBit("infoOnOffOutput2") + if _infoOnOffOutput2Err != nil { + return nil, errors.Wrap(_infoOnOffOutput2Err, "Error parsing 'infoOnOffOutput2' field") + } + _map["Struct"] = values.NewPlcBOOL(infoOnOffOutput2) + + // Simple Field (infoOnOffOutput1) + infoOnOffOutput1, _infoOnOffOutput1Err := readBuffer.ReadBit("infoOnOffOutput1") + if _infoOnOffOutput1Err != nil { + return nil, errors.Wrap(_infoOnOffOutput1Err, "Error parsing 'infoOnOffOutput1' field") + } + _map["Struct"] = values.NewPlcBOOL(infoOnOffOutput1) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_ActiveEnergy_V64 : // LINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt64("value", 64) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcLINT(value), nil +case datapointType == KnxDatapointType_DPT_ApparantEnergy_V64 : // LINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt64("value", 64) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcLINT(value), nil +case datapointType == KnxDatapointType_DPT_ReactiveEnergy_V64 : // LINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt64("value", 64) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcLINT(value), nil +case datapointType == KnxDatapointType_DPT_Channel_Activation_24 : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (activationStateOfChannel1) + activationStateOfChannel1, _activationStateOfChannel1Err := readBuffer.ReadBit("activationStateOfChannel1") + if _activationStateOfChannel1Err != nil { + return nil, errors.Wrap(_activationStateOfChannel1Err, "Error parsing 'activationStateOfChannel1' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel1) + + // Simple Field (activationStateOfChannel2) + activationStateOfChannel2, _activationStateOfChannel2Err := readBuffer.ReadBit("activationStateOfChannel2") + if _activationStateOfChannel2Err != nil { + return nil, errors.Wrap(_activationStateOfChannel2Err, "Error parsing 'activationStateOfChannel2' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel2) + + // Simple Field (activationStateOfChannel3) + activationStateOfChannel3, _activationStateOfChannel3Err := readBuffer.ReadBit("activationStateOfChannel3") + if _activationStateOfChannel3Err != nil { + return nil, errors.Wrap(_activationStateOfChannel3Err, "Error parsing 'activationStateOfChannel3' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel3) + + // Simple Field (activationStateOfChannel4) + activationStateOfChannel4, _activationStateOfChannel4Err := readBuffer.ReadBit("activationStateOfChannel4") + if _activationStateOfChannel4Err != nil { + return nil, errors.Wrap(_activationStateOfChannel4Err, "Error parsing 'activationStateOfChannel4' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel4) + + // Simple Field (activationStateOfChannel5) + activationStateOfChannel5, _activationStateOfChannel5Err := readBuffer.ReadBit("activationStateOfChannel5") + if _activationStateOfChannel5Err != nil { + return nil, errors.Wrap(_activationStateOfChannel5Err, "Error parsing 'activationStateOfChannel5' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel5) + + // Simple Field (activationStateOfChannel6) + activationStateOfChannel6, _activationStateOfChannel6Err := readBuffer.ReadBit("activationStateOfChannel6") + if _activationStateOfChannel6Err != nil { + return nil, errors.Wrap(_activationStateOfChannel6Err, "Error parsing 'activationStateOfChannel6' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel6) + + // Simple Field (activationStateOfChannel7) + activationStateOfChannel7, _activationStateOfChannel7Err := readBuffer.ReadBit("activationStateOfChannel7") + if _activationStateOfChannel7Err != nil { + return nil, errors.Wrap(_activationStateOfChannel7Err, "Error parsing 'activationStateOfChannel7' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel7) + + // Simple Field (activationStateOfChannel8) + activationStateOfChannel8, _activationStateOfChannel8Err := readBuffer.ReadBit("activationStateOfChannel8") + if _activationStateOfChannel8Err != nil { + return nil, errors.Wrap(_activationStateOfChannel8Err, "Error parsing 'activationStateOfChannel8' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel8) + + // Simple Field (activationStateOfChannel9) + activationStateOfChannel9, _activationStateOfChannel9Err := readBuffer.ReadBit("activationStateOfChannel9") + if _activationStateOfChannel9Err != nil { + return nil, errors.Wrap(_activationStateOfChannel9Err, "Error parsing 'activationStateOfChannel9' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel9) + + // Simple Field (activationStateOfChannel10) + activationStateOfChannel10, _activationStateOfChannel10Err := readBuffer.ReadBit("activationStateOfChannel10") + if _activationStateOfChannel10Err != nil { + return nil, errors.Wrap(_activationStateOfChannel10Err, "Error parsing 'activationStateOfChannel10' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel10) + + // Simple Field (activationStateOfChannel11) + activationStateOfChannel11, _activationStateOfChannel11Err := readBuffer.ReadBit("activationStateOfChannel11") + if _activationStateOfChannel11Err != nil { + return nil, errors.Wrap(_activationStateOfChannel11Err, "Error parsing 'activationStateOfChannel11' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel11) + + // Simple Field (activationStateOfChannel12) + activationStateOfChannel12, _activationStateOfChannel12Err := readBuffer.ReadBit("activationStateOfChannel12") + if _activationStateOfChannel12Err != nil { + return nil, errors.Wrap(_activationStateOfChannel12Err, "Error parsing 'activationStateOfChannel12' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel12) + + // Simple Field (activationStateOfChannel13) + activationStateOfChannel13, _activationStateOfChannel13Err := readBuffer.ReadBit("activationStateOfChannel13") + if _activationStateOfChannel13Err != nil { + return nil, errors.Wrap(_activationStateOfChannel13Err, "Error parsing 'activationStateOfChannel13' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel13) + + // Simple Field (activationStateOfChannel14) + activationStateOfChannel14, _activationStateOfChannel14Err := readBuffer.ReadBit("activationStateOfChannel14") + if _activationStateOfChannel14Err != nil { + return nil, errors.Wrap(_activationStateOfChannel14Err, "Error parsing 'activationStateOfChannel14' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel14) + + // Simple Field (activationStateOfChannel15) + activationStateOfChannel15, _activationStateOfChannel15Err := readBuffer.ReadBit("activationStateOfChannel15") + if _activationStateOfChannel15Err != nil { + return nil, errors.Wrap(_activationStateOfChannel15Err, "Error parsing 'activationStateOfChannel15' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel15) + + // Simple Field (activationStateOfChannel16) + activationStateOfChannel16, _activationStateOfChannel16Err := readBuffer.ReadBit("activationStateOfChannel16") + if _activationStateOfChannel16Err != nil { + return nil, errors.Wrap(_activationStateOfChannel16Err, "Error parsing 'activationStateOfChannel16' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel16) + + // Simple Field (activationStateOfChannel17) + activationStateOfChannel17, _activationStateOfChannel17Err := readBuffer.ReadBit("activationStateOfChannel17") + if _activationStateOfChannel17Err != nil { + return nil, errors.Wrap(_activationStateOfChannel17Err, "Error parsing 'activationStateOfChannel17' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel17) + + // Simple Field (activationStateOfChannel18) + activationStateOfChannel18, _activationStateOfChannel18Err := readBuffer.ReadBit("activationStateOfChannel18") + if _activationStateOfChannel18Err != nil { + return nil, errors.Wrap(_activationStateOfChannel18Err, "Error parsing 'activationStateOfChannel18' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel18) + + // Simple Field (activationStateOfChannel19) + activationStateOfChannel19, _activationStateOfChannel19Err := readBuffer.ReadBit("activationStateOfChannel19") + if _activationStateOfChannel19Err != nil { + return nil, errors.Wrap(_activationStateOfChannel19Err, "Error parsing 'activationStateOfChannel19' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel19) + + // Simple Field (activationStateOfChannel20) + activationStateOfChannel20, _activationStateOfChannel20Err := readBuffer.ReadBit("activationStateOfChannel20") + if _activationStateOfChannel20Err != nil { + return nil, errors.Wrap(_activationStateOfChannel20Err, "Error parsing 'activationStateOfChannel20' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel20) + + // Simple Field (activationStateOfChannel21) + activationStateOfChannel21, _activationStateOfChannel21Err := readBuffer.ReadBit("activationStateOfChannel21") + if _activationStateOfChannel21Err != nil { + return nil, errors.Wrap(_activationStateOfChannel21Err, "Error parsing 'activationStateOfChannel21' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel21) + + // Simple Field (activationStateOfChannel22) + activationStateOfChannel22, _activationStateOfChannel22Err := readBuffer.ReadBit("activationStateOfChannel22") + if _activationStateOfChannel22Err != nil { + return nil, errors.Wrap(_activationStateOfChannel22Err, "Error parsing 'activationStateOfChannel22' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel22) + + // Simple Field (activationStateOfChannel23) + activationStateOfChannel23, _activationStateOfChannel23Err := readBuffer.ReadBit("activationStateOfChannel23") + if _activationStateOfChannel23Err != nil { + return nil, errors.Wrap(_activationStateOfChannel23Err, "Error parsing 'activationStateOfChannel23' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel23) + + // Simple Field (activationStateOfChannel24) + activationStateOfChannel24, _activationStateOfChannel24Err := readBuffer.ReadBit("activationStateOfChannel24") + if _activationStateOfChannel24Err != nil { + return nil, errors.Wrap(_activationStateOfChannel24Err, "Error parsing 'activationStateOfChannel24' field") + } + _map["Struct"] = values.NewPlcBOOL(activationStateOfChannel24) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_HVACModeNext : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (delayTimeMin) + delayTimeMin, _delayTimeMinErr := readBuffer.ReadUint16("delayTimeMin", 16) + if _delayTimeMinErr != nil { + return nil, errors.Wrap(_delayTimeMinErr, "Error parsing 'delayTimeMin' field") + } + _map["Struct"] = values.NewPlcUINT(delayTimeMin) + + // Simple Field (hvacMode) + hvacMode, _hvacModeErr := readBuffer.ReadUint8("hvacMode", 8) + if _hvacModeErr != nil { + return nil, errors.Wrap(_hvacModeErr, "Error parsing 'hvacMode' field") + } + _map["Struct"] = values.NewPlcUSINT(hvacMode) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_DHWModeNext : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (delayTimeMin) + delayTimeMin, _delayTimeMinErr := readBuffer.ReadUint16("delayTimeMin", 16) + if _delayTimeMinErr != nil { + return nil, errors.Wrap(_delayTimeMinErr, "Error parsing 'delayTimeMin' field") + } + _map["Struct"] = values.NewPlcUINT(delayTimeMin) + + // Simple Field (dhwMode) + dhwMode, _dhwModeErr := readBuffer.ReadUint8("dhwMode", 8) + if _dhwModeErr != nil { + return nil, errors.Wrap(_dhwModeErr, "Error parsing 'dhwMode' field") + } + _map["Struct"] = values.NewPlcUSINT(dhwMode) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_OccModeNext : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (delayTimeMin) + delayTimeMin, _delayTimeMinErr := readBuffer.ReadUint16("delayTimeMin", 16) + if _delayTimeMinErr != nil { + return nil, errors.Wrap(_delayTimeMinErr, "Error parsing 'delayTimeMin' field") + } + _map["Struct"] = values.NewPlcUINT(delayTimeMin) + + // Simple Field (occupancyMode) + occupancyMode, _occupancyModeErr := readBuffer.ReadUint8("occupancyMode", 8) + if _occupancyModeErr != nil { + return nil, errors.Wrap(_occupancyModeErr, "Error parsing 'occupancyMode' field") + } + _map["Struct"] = values.NewPlcUSINT(occupancyMode) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_BuildingModeNext : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (delayTimeMin) + delayTimeMin, _delayTimeMinErr := readBuffer.ReadUint16("delayTimeMin", 16) + if _delayTimeMinErr != nil { + return nil, errors.Wrap(_delayTimeMinErr, "Error parsing 'delayTimeMin' field") + } + _map["Struct"] = values.NewPlcUINT(delayTimeMin) + + // Simple Field (buildingMode) + buildingMode, _buildingModeErr := readBuffer.ReadUint8("buildingMode", 8) + if _buildingModeErr != nil { + return nil, errors.Wrap(_buildingModeErr, "Error parsing 'buildingMode' field") + } + _map["Struct"] = values.NewPlcUSINT(buildingMode) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_StatusLightingActuator : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (validactualvalue) + validactualvalue, _validactualvalueErr := readBuffer.ReadBit("validactualvalue") + if _validactualvalueErr != nil { + return nil, errors.Wrap(_validactualvalueErr, "Error parsing 'validactualvalue' field") + } + _map["Struct"] = values.NewPlcBOOL(validactualvalue) + + // Simple Field (locked) + locked, _lockedErr := readBuffer.ReadBit("locked") + if _lockedErr != nil { + return nil, errors.Wrap(_lockedErr, "Error parsing 'locked' field") + } + _map["Struct"] = values.NewPlcBOOL(locked) + + // Simple Field (forced) + forced, _forcedErr := readBuffer.ReadBit("forced") + if _forcedErr != nil { + return nil, errors.Wrap(_forcedErr, "Error parsing 'forced' field") + } + _map["Struct"] = values.NewPlcBOOL(forced) + + // Simple Field (nightmodeactive) + nightmodeactive, _nightmodeactiveErr := readBuffer.ReadBit("nightmodeactive") + if _nightmodeactiveErr != nil { + return nil, errors.Wrap(_nightmodeactiveErr, "Error parsing 'nightmodeactive' field") + } + _map["Struct"] = values.NewPlcBOOL(nightmodeactive) + + // Simple Field (staircaselightingFunction) + staircaselightingFunction, _staircaselightingFunctionErr := readBuffer.ReadBit("staircaselightingFunction") + if _staircaselightingFunctionErr != nil { + return nil, errors.Wrap(_staircaselightingFunctionErr, "Error parsing 'staircaselightingFunction' field") + } + _map["Struct"] = values.NewPlcBOOL(staircaselightingFunction) + + // Simple Field (dimming) + dimming, _dimmingErr := readBuffer.ReadBit("dimming") + if _dimmingErr != nil { + return nil, errors.Wrap(_dimmingErr, "Error parsing 'dimming' field") + } + _map["Struct"] = values.NewPlcBOOL(dimming) + + // Simple Field (localoverride) + localoverride, _localoverrideErr := readBuffer.ReadBit("localoverride") + if _localoverrideErr != nil { + return nil, errors.Wrap(_localoverrideErr, "Error parsing 'localoverride' field") + } + _map["Struct"] = values.NewPlcBOOL(localoverride) + + // Simple Field (failure) + failure, _failureErr := readBuffer.ReadBit("failure") + if _failureErr != nil { + return nil, errors.Wrap(_failureErr, "Error parsing 'failure' field") + } + _map["Struct"] = values.NewPlcBOOL(failure) + + // Simple Field (actualvalue) + actualvalue, _actualvalueErr := readBuffer.ReadUint8("actualvalue", 8) + if _actualvalueErr != nil { + return nil, errors.Wrap(_actualvalueErr, "Error parsing 'actualvalue' field") + } + _map["Struct"] = values.NewPlcUSINT(actualvalue) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_Version : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (magicNumber) + magicNumber, _magicNumberErr := readBuffer.ReadUint8("magicNumber", 5) + if _magicNumberErr != nil { + return nil, errors.Wrap(_magicNumberErr, "Error parsing 'magicNumber' field") + } + _map["Struct"] = values.NewPlcUSINT(magicNumber) + + // Simple Field (versionNumber) + versionNumber, _versionNumberErr := readBuffer.ReadUint8("versionNumber", 5) + if _versionNumberErr != nil { + return nil, errors.Wrap(_versionNumberErr, "Error parsing 'versionNumber' field") + } + _map["Struct"] = values.NewPlcUSINT(versionNumber) + + // Simple Field (revisionNumber) + revisionNumber, _revisionNumberErr := readBuffer.ReadUint8("revisionNumber", 6) + if _revisionNumberErr != nil { + return nil, errors.Wrap(_revisionNumberErr, "Error parsing 'revisionNumber' field") + } + _map["Struct"] = values.NewPlcUSINT(revisionNumber) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_AlarmInfo : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (logNumber) + logNumber, _logNumberErr := readBuffer.ReadUint8("logNumber", 8) + if _logNumberErr != nil { + return nil, errors.Wrap(_logNumberErr, "Error parsing 'logNumber' field") + } + _map["Struct"] = values.NewPlcUSINT(logNumber) + + // Simple Field (alarmPriority) + alarmPriority, _alarmPriorityErr := readBuffer.ReadUint8("alarmPriority", 8) + if _alarmPriorityErr != nil { + return nil, errors.Wrap(_alarmPriorityErr, "Error parsing 'alarmPriority' field") + } + _map["Struct"] = values.NewPlcUSINT(alarmPriority) + + // Simple Field (applicationArea) + applicationArea, _applicationAreaErr := readBuffer.ReadUint8("applicationArea", 8) + if _applicationAreaErr != nil { + return nil, errors.Wrap(_applicationAreaErr, "Error parsing 'applicationArea' field") + } + _map["Struct"] = values.NewPlcUSINT(applicationArea) + + // Simple Field (errorClass) + errorClass, _errorClassErr := readBuffer.ReadUint8("errorClass", 8) + if _errorClassErr != nil { + return nil, errors.Wrap(_errorClassErr, "Error parsing 'errorClass' field") + } + _map["Struct"] = values.NewPlcUSINT(errorClass) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (errorcodeSup) + errorcodeSup, _errorcodeSupErr := readBuffer.ReadBit("errorcodeSup") + if _errorcodeSupErr != nil { + return nil, errors.Wrap(_errorcodeSupErr, "Error parsing 'errorcodeSup' field") + } + _map["Struct"] = values.NewPlcBOOL(errorcodeSup) + + // Simple Field (alarmtextSup) + alarmtextSup, _alarmtextSupErr := readBuffer.ReadBit("alarmtextSup") + if _alarmtextSupErr != nil { + return nil, errors.Wrap(_alarmtextSupErr, "Error parsing 'alarmtextSup' field") + } + _map["Struct"] = values.NewPlcBOOL(alarmtextSup) + + // Simple Field (timestampSup) + timestampSup, _timestampSupErr := readBuffer.ReadBit("timestampSup") + if _timestampSupErr != nil { + return nil, errors.Wrap(_timestampSupErr, "Error parsing 'timestampSup' field") + } + _map["Struct"] = values.NewPlcBOOL(timestampSup) + + // Simple Field (ackSup) + ackSup, _ackSupErr := readBuffer.ReadBit("ackSup") + if _ackSupErr != nil { + return nil, errors.Wrap(_ackSupErr, "Error parsing 'ackSup' field") + } + _map["Struct"] = values.NewPlcBOOL(ackSup) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 5); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (locked) + locked, _lockedErr := readBuffer.ReadBit("locked") + if _lockedErr != nil { + return nil, errors.Wrap(_lockedErr, "Error parsing 'locked' field") + } + _map["Struct"] = values.NewPlcBOOL(locked) + + // Simple Field (alarmunack) + alarmunack, _alarmunackErr := readBuffer.ReadBit("alarmunack") + if _alarmunackErr != nil { + return nil, errors.Wrap(_alarmunackErr, "Error parsing 'alarmunack' field") + } + _map["Struct"] = values.NewPlcBOOL(alarmunack) + + // Simple Field (inalarm) + inalarm, _inalarmErr := readBuffer.ReadBit("inalarm") + if _inalarmErr != nil { + return nil, errors.Wrap(_inalarmErr, "Error parsing 'inalarm' field") + } + _map["Struct"] = values.NewPlcBOOL(inalarm) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_TempRoomSetpSetF16_3 : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (tempsetpcomf) + tempsetpcomf, _tempsetpcomfErr := readBuffer.ReadFloat32("tempsetpcomf", 16) + if _tempsetpcomfErr != nil { + return nil, errors.Wrap(_tempsetpcomfErr, "Error parsing 'tempsetpcomf' field") + } + _map["Struct"] = values.NewPlcREAL(tempsetpcomf) + + // Simple Field (tempsetpstdby) + tempsetpstdby, _tempsetpstdbyErr := readBuffer.ReadFloat32("tempsetpstdby", 16) + if _tempsetpstdbyErr != nil { + return nil, errors.Wrap(_tempsetpstdbyErr, "Error parsing 'tempsetpstdby' field") + } + _map["Struct"] = values.NewPlcREAL(tempsetpstdby) + + // Simple Field (tempsetpeco) + tempsetpeco, _tempsetpecoErr := readBuffer.ReadFloat32("tempsetpeco", 16) + if _tempsetpecoErr != nil { + return nil, errors.Wrap(_tempsetpecoErr, "Error parsing 'tempsetpeco' field") + } + _map["Struct"] = values.NewPlcREAL(tempsetpeco) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_TempRoomSetpSetShiftF16_3 : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (tempsetpshiftcomf) + tempsetpshiftcomf, _tempsetpshiftcomfErr := readBuffer.ReadFloat32("tempsetpshiftcomf", 16) + if _tempsetpshiftcomfErr != nil { + return nil, errors.Wrap(_tempsetpshiftcomfErr, "Error parsing 'tempsetpshiftcomf' field") + } + _map["Struct"] = values.NewPlcREAL(tempsetpshiftcomf) + + // Simple Field (tempsetpshiftstdby) + tempsetpshiftstdby, _tempsetpshiftstdbyErr := readBuffer.ReadFloat32("tempsetpshiftstdby", 16) + if _tempsetpshiftstdbyErr != nil { + return nil, errors.Wrap(_tempsetpshiftstdbyErr, "Error parsing 'tempsetpshiftstdby' field") + } + _map["Struct"] = values.NewPlcREAL(tempsetpshiftstdby) + + // Simple Field (tempsetpshifteco) + tempsetpshifteco, _tempsetpshiftecoErr := readBuffer.ReadFloat32("tempsetpshifteco", 16) + if _tempsetpshiftecoErr != nil { + return nil, errors.Wrap(_tempsetpshiftecoErr, "Error parsing 'tempsetpshifteco' field") + } + _map["Struct"] = values.NewPlcREAL(tempsetpshifteco) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_Scaling_Speed : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (timePeriod) + timePeriod, _timePeriodErr := readBuffer.ReadUint16("timePeriod", 16) + if _timePeriodErr != nil { + return nil, errors.Wrap(_timePeriodErr, "Error parsing 'timePeriod' field") + } + _map["Struct"] = values.NewPlcUINT(timePeriod) + + // Simple Field (percent) + percent, _percentErr := readBuffer.ReadUint8("percent", 8) + if _percentErr != nil { + return nil, errors.Wrap(_percentErr, "Error parsing 'percent' field") + } + _map["Struct"] = values.NewPlcUSINT(percent) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_Scaling_Step_Time : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (timePeriod) + timePeriod, _timePeriodErr := readBuffer.ReadUint16("timePeriod", 16) + if _timePeriodErr != nil { + return nil, errors.Wrap(_timePeriodErr, "Error parsing 'timePeriod' field") + } + _map["Struct"] = values.NewPlcUINT(timePeriod) + + // Simple Field (percent) + percent, _percentErr := readBuffer.ReadUint8("percent", 8) + if _percentErr != nil { + return nil, errors.Wrap(_percentErr, "Error parsing 'percent' field") + } + _map["Struct"] = values.NewPlcUSINT(percent) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_MeteringValue : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (countval) + countval, _countvalErr := readBuffer.ReadInt32("countval", 32) + if _countvalErr != nil { + return nil, errors.Wrap(_countvalErr, "Error parsing 'countval' field") + } + _map["Struct"] = values.NewPlcDINT(countval) + + // Simple Field (valinffield) + valinffield, _valinffieldErr := readBuffer.ReadUint8("valinffield", 8) + if _valinffieldErr != nil { + return nil, errors.Wrap(_valinffieldErr, "Error parsing 'valinffield' field") + } + _map["Struct"] = values.NewPlcUSINT(valinffield) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 3); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (alarmunack) + alarmunack, _alarmunackErr := readBuffer.ReadBit("alarmunack") + if _alarmunackErr != nil { + return nil, errors.Wrap(_alarmunackErr, "Error parsing 'alarmunack' field") + } + _map["Struct"] = values.NewPlcBOOL(alarmunack) + + // Simple Field (inalarm) + inalarm, _inalarmErr := readBuffer.ReadBit("inalarm") + if _inalarmErr != nil { + return nil, errors.Wrap(_inalarmErr, "Error parsing 'inalarm' field") + } + _map["Struct"] = values.NewPlcBOOL(inalarm) + + // Simple Field (overridden) + overridden, _overriddenErr := readBuffer.ReadBit("overridden") + if _overriddenErr != nil { + return nil, errors.Wrap(_overriddenErr, "Error parsing 'overridden' field") + } + _map["Struct"] = values.NewPlcBOOL(overridden) + + // Simple Field (fault) + fault, _faultErr := readBuffer.ReadBit("fault") + if _faultErr != nil { + return nil, errors.Wrap(_faultErr, "Error parsing 'fault' field") + } + _map["Struct"] = values.NewPlcBOOL(fault) + + // Simple Field (outofservice) + outofservice, _outofserviceErr := readBuffer.ReadBit("outofservice") + if _outofserviceErr != nil { + return nil, errors.Wrap(_outofserviceErr, "Error parsing 'outofservice' field") + } + _map["Struct"] = values.NewPlcBOOL(outofservice) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_MBus_Address : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (manufactid) + manufactid, _manufactidErr := readBuffer.ReadUint16("manufactid", 16) + if _manufactidErr != nil { + return nil, errors.Wrap(_manufactidErr, "Error parsing 'manufactid' field") + } + _map["Struct"] = values.NewPlcUINT(manufactid) + + // Simple Field (identnumber) + identnumber, _identnumberErr := readBuffer.ReadUint32("identnumber", 32) + if _identnumberErr != nil { + return nil, errors.Wrap(_identnumberErr, "Error parsing 'identnumber' field") + } + _map["Struct"] = values.NewPlcUDINT(identnumber) + + // Simple Field (version) + version, _versionErr := readBuffer.ReadUint8("version", 8) + if _versionErr != nil { + return nil, errors.Wrap(_versionErr, "Error parsing 'version' field") + } + _map["Struct"] = values.NewPlcUSINT(version) + + // Simple Field (medium) + medium, _mediumErr := readBuffer.ReadUint8("medium", 8) + if _mediumErr != nil { + return nil, errors.Wrap(_mediumErr, "Error parsing 'medium' field") + } + _map["Struct"] = values.NewPlcUSINT(medium) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_Colour_RGB : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (r) + r, _rErr := readBuffer.ReadUint8("r", 8) + if _rErr != nil { + return nil, errors.Wrap(_rErr, "Error parsing 'r' field") + } + _map["Struct"] = values.NewPlcUSINT(r) + + // Simple Field (g) + g, _gErr := readBuffer.ReadUint8("g", 8) + if _gErr != nil { + return nil, errors.Wrap(_gErr, "Error parsing 'g' field") + } + _map["Struct"] = values.NewPlcUSINT(g) + + // Simple Field (b) + b, _bErr := readBuffer.ReadUint8("b", 8) + if _bErr != nil { + return nil, errors.Wrap(_bErr, "Error parsing 'b' field") + } + _map["Struct"] = values.NewPlcUSINT(b) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_LanguageCodeAlpha2_ASCII : // STRING + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadString("value", uint32(16), "ASCII") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcSTRING(value), nil +case datapointType == KnxDatapointType_DPT_Tariff_ActiveEnergy : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (activeelectricalenergy) + activeelectricalenergy, _activeelectricalenergyErr := readBuffer.ReadInt32("activeelectricalenergy", 32) + if _activeelectricalenergyErr != nil { + return nil, errors.Wrap(_activeelectricalenergyErr, "Error parsing 'activeelectricalenergy' field") + } + _map["Struct"] = values.NewPlcDINT(activeelectricalenergy) + + // Simple Field (tariff) + tariff, _tariffErr := readBuffer.ReadUint8("tariff", 8) + if _tariffErr != nil { + return nil, errors.Wrap(_tariffErr, "Error parsing 'tariff' field") + } + _map["Struct"] = values.NewPlcUSINT(tariff) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 6); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (electricalengergyvalidity) + electricalengergyvalidity, _electricalengergyvalidityErr := readBuffer.ReadBit("electricalengergyvalidity") + if _electricalengergyvalidityErr != nil { + return nil, errors.Wrap(_electricalengergyvalidityErr, "Error parsing 'electricalengergyvalidity' field") + } + _map["Struct"] = values.NewPlcBOOL(electricalengergyvalidity) + + // Simple Field (tariffvalidity) + tariffvalidity, _tariffvalidityErr := readBuffer.ReadBit("tariffvalidity") + if _tariffvalidityErr != nil { + return nil, errors.Wrap(_tariffvalidityErr, "Error parsing 'tariffvalidity' field") + } + _map["Struct"] = values.NewPlcBOOL(tariffvalidity) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_Prioritised_Mode_Control : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (deactivationOfPriority) + deactivationOfPriority, _deactivationOfPriorityErr := readBuffer.ReadBit("deactivationOfPriority") + if _deactivationOfPriorityErr != nil { + return nil, errors.Wrap(_deactivationOfPriorityErr, "Error parsing 'deactivationOfPriority' field") + } + _map["Struct"] = values.NewPlcBOOL(deactivationOfPriority) + + // Simple Field (priorityLevel) + priorityLevel, _priorityLevelErr := readBuffer.ReadUint8("priorityLevel", 3) + if _priorityLevelErr != nil { + return nil, errors.Wrap(_priorityLevelErr, "Error parsing 'priorityLevel' field") + } + _map["Struct"] = values.NewPlcUSINT(priorityLevel) + + // Simple Field (modeLevel) + modeLevel, _modeLevelErr := readBuffer.ReadUint8("modeLevel", 4) + if _modeLevelErr != nil { + return nil, errors.Wrap(_modeLevelErr, "Error parsing 'modeLevel' field") + } + _map["Struct"] = values.NewPlcUSINT(modeLevel) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_DALI_Control_Gear_Diagnostic : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 5); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (convertorError) + convertorError, _convertorErrorErr := readBuffer.ReadBit("convertorError") + if _convertorErrorErr != nil { + return nil, errors.Wrap(_convertorErrorErr, "Error parsing 'convertorError' field") + } + _map["Struct"] = values.NewPlcBOOL(convertorError) + + // Simple Field (ballastFailure) + ballastFailure, _ballastFailureErr := readBuffer.ReadBit("ballastFailure") + if _ballastFailureErr != nil { + return nil, errors.Wrap(_ballastFailureErr, "Error parsing 'ballastFailure' field") + } + _map["Struct"] = values.NewPlcBOOL(ballastFailure) + + // Simple Field (lampFailure) + lampFailure, _lampFailureErr := readBuffer.ReadBit("lampFailure") + if _lampFailureErr != nil { + return nil, errors.Wrap(_lampFailureErr, "Error parsing 'lampFailure' field") + } + _map["Struct"] = values.NewPlcBOOL(lampFailure) + + // Simple Field (readOrResponse) + readOrResponse, _readOrResponseErr := readBuffer.ReadBit("readOrResponse") + if _readOrResponseErr != nil { + return nil, errors.Wrap(_readOrResponseErr, "Error parsing 'readOrResponse' field") + } + _map["Struct"] = values.NewPlcBOOL(readOrResponse) + + // Simple Field (addressIndicator) + addressIndicator, _addressIndicatorErr := readBuffer.ReadBit("addressIndicator") + if _addressIndicatorErr != nil { + return nil, errors.Wrap(_addressIndicatorErr, "Error parsing 'addressIndicator' field") + } + _map["Struct"] = values.NewPlcBOOL(addressIndicator) + + // Simple Field (daliDeviceAddressOrDaliGroupAddress) + daliDeviceAddressOrDaliGroupAddress, _daliDeviceAddressOrDaliGroupAddressErr := readBuffer.ReadUint8("daliDeviceAddressOrDaliGroupAddress", 6) + if _daliDeviceAddressOrDaliGroupAddressErr != nil { + return nil, errors.Wrap(_daliDeviceAddressOrDaliGroupAddressErr, "Error parsing 'daliDeviceAddressOrDaliGroupAddress' field") + } + _map["Struct"] = values.NewPlcUSINT(daliDeviceAddressOrDaliGroupAddress) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_DALI_Diagnostics : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (ballastFailure) + ballastFailure, _ballastFailureErr := readBuffer.ReadBit("ballastFailure") + if _ballastFailureErr != nil { + return nil, errors.Wrap(_ballastFailureErr, "Error parsing 'ballastFailure' field") + } + _map["Struct"] = values.NewPlcBOOL(ballastFailure) + + // Simple Field (lampFailure) + lampFailure, _lampFailureErr := readBuffer.ReadBit("lampFailure") + if _lampFailureErr != nil { + return nil, errors.Wrap(_lampFailureErr, "Error parsing 'lampFailure' field") + } + _map["Struct"] = values.NewPlcBOOL(lampFailure) + + // Simple Field (deviceAddress) + deviceAddress, _deviceAddressErr := readBuffer.ReadUint8("deviceAddress", 6) + if _deviceAddressErr != nil { + return nil, errors.Wrap(_deviceAddressErr, "Error parsing 'deviceAddress' field") + } + _map["Struct"] = values.NewPlcUSINT(deviceAddress) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_CombinedPosition : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (heightPosition) + heightPosition, _heightPositionErr := readBuffer.ReadUint8("heightPosition", 8) + if _heightPositionErr != nil { + return nil, errors.Wrap(_heightPositionErr, "Error parsing 'heightPosition' field") + } + _map["Struct"] = values.NewPlcUSINT(heightPosition) + + // Simple Field (slatsPosition) + slatsPosition, _slatsPositionErr := readBuffer.ReadUint8("slatsPosition", 8) + if _slatsPositionErr != nil { + return nil, errors.Wrap(_slatsPositionErr, "Error parsing 'slatsPosition' field") + } + _map["Struct"] = values.NewPlcUSINT(slatsPosition) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 6); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (validityHeightPosition) + validityHeightPosition, _validityHeightPositionErr := readBuffer.ReadBit("validityHeightPosition") + if _validityHeightPositionErr != nil { + return nil, errors.Wrap(_validityHeightPositionErr, "Error parsing 'validityHeightPosition' field") + } + _map["Struct"] = values.NewPlcBOOL(validityHeightPosition) + + // Simple Field (validitySlatsPosition) + validitySlatsPosition, _validitySlatsPositionErr := readBuffer.ReadBit("validitySlatsPosition") + if _validitySlatsPositionErr != nil { + return nil, errors.Wrap(_validitySlatsPositionErr, "Error parsing 'validitySlatsPosition' field") + } + _map["Struct"] = values.NewPlcBOOL(validitySlatsPosition) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_StatusSAB : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (heightPosition) + heightPosition, _heightPositionErr := readBuffer.ReadUint8("heightPosition", 8) + if _heightPositionErr != nil { + return nil, errors.Wrap(_heightPositionErr, "Error parsing 'heightPosition' field") + } + _map["Struct"] = values.NewPlcUSINT(heightPosition) + + // Simple Field (slatsPosition) + slatsPosition, _slatsPositionErr := readBuffer.ReadUint8("slatsPosition", 8) + if _slatsPositionErr != nil { + return nil, errors.Wrap(_slatsPositionErr, "Error parsing 'slatsPosition' field") + } + _map["Struct"] = values.NewPlcUSINT(slatsPosition) + + // Simple Field (upperEndPosReached) + upperEndPosReached, _upperEndPosReachedErr := readBuffer.ReadBit("upperEndPosReached") + if _upperEndPosReachedErr != nil { + return nil, errors.Wrap(_upperEndPosReachedErr, "Error parsing 'upperEndPosReached' field") + } + _map["Struct"] = values.NewPlcBOOL(upperEndPosReached) + + // Simple Field (lowerEndPosReached) + lowerEndPosReached, _lowerEndPosReachedErr := readBuffer.ReadBit("lowerEndPosReached") + if _lowerEndPosReachedErr != nil { + return nil, errors.Wrap(_lowerEndPosReachedErr, "Error parsing 'lowerEndPosReached' field") + } + _map["Struct"] = values.NewPlcBOOL(lowerEndPosReached) + + // Simple Field (lowerPredefPosReachedTypHeight100PercentSlatsAngle100Percent) + lowerPredefPosReachedTypHeight100PercentSlatsAngle100Percent, _lowerPredefPosReachedTypHeight100PercentSlatsAngle100PercentErr := readBuffer.ReadBit("lowerPredefPosReachedTypHeight100PercentSlatsAngle100Percent") + if _lowerPredefPosReachedTypHeight100PercentSlatsAngle100PercentErr != nil { + return nil, errors.Wrap(_lowerPredefPosReachedTypHeight100PercentSlatsAngle100PercentErr, "Error parsing 'lowerPredefPosReachedTypHeight100PercentSlatsAngle100Percent' field") + } + _map["Struct"] = values.NewPlcBOOL(lowerPredefPosReachedTypHeight100PercentSlatsAngle100Percent) + + // Simple Field (targetPosDrive) + targetPosDrive, _targetPosDriveErr := readBuffer.ReadBit("targetPosDrive") + if _targetPosDriveErr != nil { + return nil, errors.Wrap(_targetPosDriveErr, "Error parsing 'targetPosDrive' field") + } + _map["Struct"] = values.NewPlcBOOL(targetPosDrive) + + // Simple Field (restrictionOfTargetHeightPosPosCanNotBeReached) + restrictionOfTargetHeightPosPosCanNotBeReached, _restrictionOfTargetHeightPosPosCanNotBeReachedErr := readBuffer.ReadBit("restrictionOfTargetHeightPosPosCanNotBeReached") + if _restrictionOfTargetHeightPosPosCanNotBeReachedErr != nil { + return nil, errors.Wrap(_restrictionOfTargetHeightPosPosCanNotBeReachedErr, "Error parsing 'restrictionOfTargetHeightPosPosCanNotBeReached' field") + } + _map["Struct"] = values.NewPlcBOOL(restrictionOfTargetHeightPosPosCanNotBeReached) + + // Simple Field (restrictionOfSlatsHeightPosPosCanNotBeReached) + restrictionOfSlatsHeightPosPosCanNotBeReached, _restrictionOfSlatsHeightPosPosCanNotBeReachedErr := readBuffer.ReadBit("restrictionOfSlatsHeightPosPosCanNotBeReached") + if _restrictionOfSlatsHeightPosPosCanNotBeReachedErr != nil { + return nil, errors.Wrap(_restrictionOfSlatsHeightPosPosCanNotBeReachedErr, "Error parsing 'restrictionOfSlatsHeightPosPosCanNotBeReached' field") + } + _map["Struct"] = values.NewPlcBOOL(restrictionOfSlatsHeightPosPosCanNotBeReached) + + // Simple Field (atLeastOneOfTheInputsWindRainFrostAlarmIsInAlarm) + atLeastOneOfTheInputsWindRainFrostAlarmIsInAlarm, _atLeastOneOfTheInputsWindRainFrostAlarmIsInAlarmErr := readBuffer.ReadBit("atLeastOneOfTheInputsWindRainFrostAlarmIsInAlarm") + if _atLeastOneOfTheInputsWindRainFrostAlarmIsInAlarmErr != nil { + return nil, errors.Wrap(_atLeastOneOfTheInputsWindRainFrostAlarmIsInAlarmErr, "Error parsing 'atLeastOneOfTheInputsWindRainFrostAlarmIsInAlarm' field") + } + _map["Struct"] = values.NewPlcBOOL(atLeastOneOfTheInputsWindRainFrostAlarmIsInAlarm) + + // Simple Field (upDownPositionIsForcedByMoveupdownforcedInput) + upDownPositionIsForcedByMoveupdownforcedInput, _upDownPositionIsForcedByMoveupdownforcedInputErr := readBuffer.ReadBit("upDownPositionIsForcedByMoveupdownforcedInput") + if _upDownPositionIsForcedByMoveupdownforcedInputErr != nil { + return nil, errors.Wrap(_upDownPositionIsForcedByMoveupdownforcedInputErr, "Error parsing 'upDownPositionIsForcedByMoveupdownforcedInput' field") + } + _map["Struct"] = values.NewPlcBOOL(upDownPositionIsForcedByMoveupdownforcedInput) + + // Simple Field (movementIsLockedEGByDevicelockedInput) + movementIsLockedEGByDevicelockedInput, _movementIsLockedEGByDevicelockedInputErr := readBuffer.ReadBit("movementIsLockedEGByDevicelockedInput") + if _movementIsLockedEGByDevicelockedInputErr != nil { + return nil, errors.Wrap(_movementIsLockedEGByDevicelockedInputErr, "Error parsing 'movementIsLockedEGByDevicelockedInput' field") + } + _map["Struct"] = values.NewPlcBOOL(movementIsLockedEGByDevicelockedInput) + + // Simple Field (actuatorSetvalueIsLocallyOverriddenEGViaALocalUserInterface) + actuatorSetvalueIsLocallyOverriddenEGViaALocalUserInterface, _actuatorSetvalueIsLocallyOverriddenEGViaALocalUserInterfaceErr := readBuffer.ReadBit("actuatorSetvalueIsLocallyOverriddenEGViaALocalUserInterface") + if _actuatorSetvalueIsLocallyOverriddenEGViaALocalUserInterfaceErr != nil { + return nil, errors.Wrap(_actuatorSetvalueIsLocallyOverriddenEGViaALocalUserInterfaceErr, "Error parsing 'actuatorSetvalueIsLocallyOverriddenEGViaALocalUserInterface' field") + } + _map["Struct"] = values.NewPlcBOOL(actuatorSetvalueIsLocallyOverriddenEGViaALocalUserInterface) + + // Simple Field (generalFailureOfTheActuatorOrTheDrive) + generalFailureOfTheActuatorOrTheDrive, _generalFailureOfTheActuatorOrTheDriveErr := readBuffer.ReadBit("generalFailureOfTheActuatorOrTheDrive") + if _generalFailureOfTheActuatorOrTheDriveErr != nil { + return nil, errors.Wrap(_generalFailureOfTheActuatorOrTheDriveErr, "Error parsing 'generalFailureOfTheActuatorOrTheDrive' field") + } + _map["Struct"] = values.NewPlcBOOL(generalFailureOfTheActuatorOrTheDrive) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 3); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (validityHeightPos) + validityHeightPos, _validityHeightPosErr := readBuffer.ReadBit("validityHeightPos") + if _validityHeightPosErr != nil { + return nil, errors.Wrap(_validityHeightPosErr, "Error parsing 'validityHeightPos' field") + } + _map["Struct"] = values.NewPlcBOOL(validityHeightPos) + + // Simple Field (validitySlatsPos) + validitySlatsPos, _validitySlatsPosErr := readBuffer.ReadBit("validitySlatsPos") + if _validitySlatsPosErr != nil { + return nil, errors.Wrap(_validitySlatsPosErr, "Error parsing 'validitySlatsPos' field") + } + _map["Struct"] = values.NewPlcBOOL(validitySlatsPos) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_Colour_xyY : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (xAxis) + xAxis, _xAxisErr := readBuffer.ReadUint16("xAxis", 16) + if _xAxisErr != nil { + return nil, errors.Wrap(_xAxisErr, "Error parsing 'xAxis' field") + } + _map["Struct"] = values.NewPlcUINT(xAxis) + + // Simple Field (yAxis) + yAxis, _yAxisErr := readBuffer.ReadUint16("yAxis", 16) + if _yAxisErr != nil { + return nil, errors.Wrap(_yAxisErr, "Error parsing 'yAxis' field") + } + _map["Struct"] = values.NewPlcUINT(yAxis) + + // Simple Field (brightness) + brightness, _brightnessErr := readBuffer.ReadUint8("brightness", 8) + if _brightnessErr != nil { + return nil, errors.Wrap(_brightnessErr, "Error parsing 'brightness' field") + } + _map["Struct"] = values.NewPlcUSINT(brightness) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 6); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (validityXy) + validityXy, _validityXyErr := readBuffer.ReadBit("validityXy") + if _validityXyErr != nil { + return nil, errors.Wrap(_validityXyErr, "Error parsing 'validityXy' field") + } + _map["Struct"] = values.NewPlcBOOL(validityXy) + + // Simple Field (validityBrightness) + validityBrightness, _validityBrightnessErr := readBuffer.ReadBit("validityBrightness") + if _validityBrightnessErr != nil { + return nil, errors.Wrap(_validityBrightnessErr, "Error parsing 'validityBrightness' field") + } + _map["Struct"] = values.NewPlcBOOL(validityBrightness) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_Converter_Status : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (converterModeAccordingToTheDaliConverterStateMachine) + converterModeAccordingToTheDaliConverterStateMachine, _converterModeAccordingToTheDaliConverterStateMachineErr := readBuffer.ReadUint8("converterModeAccordingToTheDaliConverterStateMachine", 4) + if _converterModeAccordingToTheDaliConverterStateMachineErr != nil { + return nil, errors.Wrap(_converterModeAccordingToTheDaliConverterStateMachineErr, "Error parsing 'converterModeAccordingToTheDaliConverterStateMachine' field") + } + _map["Struct"] = values.NewPlcUSINT(converterModeAccordingToTheDaliConverterStateMachine) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 2); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (hardwiredSwitchIsActive) + hardwiredSwitchIsActive, _hardwiredSwitchIsActiveErr := readBuffer.ReadBit("hardwiredSwitchIsActive") + if _hardwiredSwitchIsActiveErr != nil { + return nil, errors.Wrap(_hardwiredSwitchIsActiveErr, "Error parsing 'hardwiredSwitchIsActive' field") + } + _map["Struct"] = values.NewPlcBOOL(hardwiredSwitchIsActive) + + // Simple Field (hardwiredInhibitIsActive) + hardwiredInhibitIsActive, _hardwiredInhibitIsActiveErr := readBuffer.ReadBit("hardwiredInhibitIsActive") + if _hardwiredInhibitIsActiveErr != nil { + return nil, errors.Wrap(_hardwiredInhibitIsActiveErr, "Error parsing 'hardwiredInhibitIsActive' field") + } + _map["Struct"] = values.NewPlcBOOL(hardwiredInhibitIsActive) + + // Simple Field (functionTestPending) + functionTestPending, _functionTestPendingErr := readBuffer.ReadUint8("functionTestPending", 2) + if _functionTestPendingErr != nil { + return nil, errors.Wrap(_functionTestPendingErr, "Error parsing 'functionTestPending' field") + } + _map["Struct"] = values.NewPlcUSINT(functionTestPending) + + // Simple Field (durationTestPending) + durationTestPending, _durationTestPendingErr := readBuffer.ReadUint8("durationTestPending", 2) + if _durationTestPendingErr != nil { + return nil, errors.Wrap(_durationTestPendingErr, "Error parsing 'durationTestPending' field") + } + _map["Struct"] = values.NewPlcUSINT(durationTestPending) + + // Simple Field (partialDurationTestPending) + partialDurationTestPending, _partialDurationTestPendingErr := readBuffer.ReadUint8("partialDurationTestPending", 2) + if _partialDurationTestPendingErr != nil { + return nil, errors.Wrap(_partialDurationTestPendingErr, "Error parsing 'partialDurationTestPending' field") + } + _map["Struct"] = values.NewPlcUSINT(partialDurationTestPending) + + // Simple Field (converterFailure) + converterFailure, _converterFailureErr := readBuffer.ReadUint8("converterFailure", 2) + if _converterFailureErr != nil { + return nil, errors.Wrap(_converterFailureErr, "Error parsing 'converterFailure' field") + } + _map["Struct"] = values.NewPlcUSINT(converterFailure) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_Converter_Test_Result : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (ltrf) + ltrf, _ltrfErr := readBuffer.ReadUint8("ltrf", 4) + if _ltrfErr != nil { + return nil, errors.Wrap(_ltrfErr, "Error parsing 'ltrf' field") + } + _map["Struct"] = values.NewPlcUSINT(ltrf) + + // Simple Field (ltrd) + ltrd, _ltrdErr := readBuffer.ReadUint8("ltrd", 4) + if _ltrdErr != nil { + return nil, errors.Wrap(_ltrdErr, "Error parsing 'ltrd' field") + } + _map["Struct"] = values.NewPlcUSINT(ltrd) + + // Simple Field (ltrp) + ltrp, _ltrpErr := readBuffer.ReadUint8("ltrp", 4) + if _ltrpErr != nil { + return nil, errors.Wrap(_ltrpErr, "Error parsing 'ltrp' field") + } + _map["Struct"] = values.NewPlcUSINT(ltrp) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (sf) + sf, _sfErr := readBuffer.ReadUint8("sf", 2) + if _sfErr != nil { + return nil, errors.Wrap(_sfErr, "Error parsing 'sf' field") + } + _map["Struct"] = values.NewPlcUSINT(sf) + + // Simple Field (sd) + sd, _sdErr := readBuffer.ReadUint8("sd", 2) + if _sdErr != nil { + return nil, errors.Wrap(_sdErr, "Error parsing 'sd' field") + } + _map["Struct"] = values.NewPlcUSINT(sd) + + // Simple Field (sp) + sp, _spErr := readBuffer.ReadUint8("sp", 2) + if _spErr != nil { + return nil, errors.Wrap(_spErr, "Error parsing 'sp' field") + } + _map["Struct"] = values.NewPlcUSINT(sp) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 2); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (ldtr) + ldtr, _ldtrErr := readBuffer.ReadUint16("ldtr", 16) + if _ldtrErr != nil { + return nil, errors.Wrap(_ldtrErr, "Error parsing 'ldtr' field") + } + _map["Struct"] = values.NewPlcUINT(ldtr) + + // Simple Field (lpdtr) + lpdtr, _lpdtrErr := readBuffer.ReadUint8("lpdtr", 8) + if _lpdtrErr != nil { + return nil, errors.Wrap(_lpdtrErr, "Error parsing 'lpdtr' field") + } + _map["Struct"] = values.NewPlcUSINT(lpdtr) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_Battery_Info : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 5); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (batteryFailure) + batteryFailure, _batteryFailureErr := readBuffer.ReadBit("batteryFailure") + if _batteryFailureErr != nil { + return nil, errors.Wrap(_batteryFailureErr, "Error parsing 'batteryFailure' field") + } + _map["Struct"] = values.NewPlcBOOL(batteryFailure) + + // Simple Field (batteryDurationFailure) + batteryDurationFailure, _batteryDurationFailureErr := readBuffer.ReadBit("batteryDurationFailure") + if _batteryDurationFailureErr != nil { + return nil, errors.Wrap(_batteryDurationFailureErr, "Error parsing 'batteryDurationFailure' field") + } + _map["Struct"] = values.NewPlcBOOL(batteryDurationFailure) + + // Simple Field (batteryFullyCharged) + batteryFullyCharged, _batteryFullyChargedErr := readBuffer.ReadBit("batteryFullyCharged") + if _batteryFullyChargedErr != nil { + return nil, errors.Wrap(_batteryFullyChargedErr, "Error parsing 'batteryFullyCharged' field") + } + _map["Struct"] = values.NewPlcBOOL(batteryFullyCharged) + + // Simple Field (batteryChargeLevel) + batteryChargeLevel, _batteryChargeLevelErr := readBuffer.ReadUint8("batteryChargeLevel", 8) + if _batteryChargeLevelErr != nil { + return nil, errors.Wrap(_batteryChargeLevelErr, "Error parsing 'batteryChargeLevel' field") + } + _map["Struct"] = values.NewPlcUSINT(batteryChargeLevel) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_Brightness_Colour_Temperature_Transition : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (ms) + ms, _msErr := readBuffer.ReadUint16("ms", 16) + if _msErr != nil { + return nil, errors.Wrap(_msErr, "Error parsing 'ms' field") + } + _map["Struct"] = values.NewPlcUINT(ms) + + // Simple Field (temperatureK) + temperatureK, _temperatureKErr := readBuffer.ReadUint16("temperatureK", 16) + if _temperatureKErr != nil { + return nil, errors.Wrap(_temperatureKErr, "Error parsing 'temperatureK' field") + } + _map["Struct"] = values.NewPlcUINT(temperatureK) + + // Simple Field (percent) + percent, _percentErr := readBuffer.ReadUint8("percent", 8) + if _percentErr != nil { + return nil, errors.Wrap(_percentErr, "Error parsing 'percent' field") + } + _map["Struct"] = values.NewPlcUSINT(percent) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 5); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (validityOfTheTimePeriod) + validityOfTheTimePeriod, _validityOfTheTimePeriodErr := readBuffer.ReadBit("validityOfTheTimePeriod") + if _validityOfTheTimePeriodErr != nil { + return nil, errors.Wrap(_validityOfTheTimePeriodErr, "Error parsing 'validityOfTheTimePeriod' field") + } + _map["Struct"] = values.NewPlcBOOL(validityOfTheTimePeriod) + + // Simple Field (validityOfTheAbsoluteColourTemperature) + validityOfTheAbsoluteColourTemperature, _validityOfTheAbsoluteColourTemperatureErr := readBuffer.ReadBit("validityOfTheAbsoluteColourTemperature") + if _validityOfTheAbsoluteColourTemperatureErr != nil { + return nil, errors.Wrap(_validityOfTheAbsoluteColourTemperatureErr, "Error parsing 'validityOfTheAbsoluteColourTemperature' field") + } + _map["Struct"] = values.NewPlcBOOL(validityOfTheAbsoluteColourTemperature) + + // Simple Field (validityOfTheAbsoluteBrightness) + validityOfTheAbsoluteBrightness, _validityOfTheAbsoluteBrightnessErr := readBuffer.ReadBit("validityOfTheAbsoluteBrightness") + if _validityOfTheAbsoluteBrightnessErr != nil { + return nil, errors.Wrap(_validityOfTheAbsoluteBrightnessErr, "Error parsing 'validityOfTheAbsoluteBrightness' field") + } + _map["Struct"] = values.NewPlcBOOL(validityOfTheAbsoluteBrightness) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_Brightness_Colour_Temperature_Control : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (cct) + cct, _cctErr := readBuffer.ReadBit("cct") + if _cctErr != nil { + return nil, errors.Wrap(_cctErr, "Error parsing 'cct' field") + } + _map["Struct"] = values.NewPlcBOOL(cct) + + // Simple Field (stepCodeColourTemperature) + stepCodeColourTemperature, _stepCodeColourTemperatureErr := readBuffer.ReadUint8("stepCodeColourTemperature", 3) + if _stepCodeColourTemperatureErr != nil { + return nil, errors.Wrap(_stepCodeColourTemperatureErr, "Error parsing 'stepCodeColourTemperature' field") + } + _map["Struct"] = values.NewPlcUSINT(stepCodeColourTemperature) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (cb) + cb, _cbErr := readBuffer.ReadBit("cb") + if _cbErr != nil { + return nil, errors.Wrap(_cbErr, "Error parsing 'cb' field") + } + _map["Struct"] = values.NewPlcBOOL(cb) + + // Simple Field (stepCodeBrightness) + stepCodeBrightness, _stepCodeBrightnessErr := readBuffer.ReadUint8("stepCodeBrightness", 3) + if _stepCodeBrightnessErr != nil { + return nil, errors.Wrap(_stepCodeBrightnessErr, "Error parsing 'stepCodeBrightness' field") + } + _map["Struct"] = values.NewPlcUSINT(stepCodeBrightness) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 6); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (cctAndStepCodeColourValidity) + cctAndStepCodeColourValidity, _cctAndStepCodeColourValidityErr := readBuffer.ReadBit("cctAndStepCodeColourValidity") + if _cctAndStepCodeColourValidityErr != nil { + return nil, errors.Wrap(_cctAndStepCodeColourValidityErr, "Error parsing 'cctAndStepCodeColourValidity' field") + } + _map["Struct"] = values.NewPlcBOOL(cctAndStepCodeColourValidity) + + // Simple Field (cbAndStepCodeBrightnessValidity) + cbAndStepCodeBrightnessValidity, _cbAndStepCodeBrightnessValidityErr := readBuffer.ReadBit("cbAndStepCodeBrightnessValidity") + if _cbAndStepCodeBrightnessValidityErr != nil { + return nil, errors.Wrap(_cbAndStepCodeBrightnessValidityErr, "Error parsing 'cbAndStepCodeBrightnessValidity' field") + } + _map["Struct"] = values.NewPlcBOOL(cbAndStepCodeBrightnessValidity) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_Colour_RGBW : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (colourLevelRed) + colourLevelRed, _colourLevelRedErr := readBuffer.ReadUint8("colourLevelRed", 8) + if _colourLevelRedErr != nil { + return nil, errors.Wrap(_colourLevelRedErr, "Error parsing 'colourLevelRed' field") + } + _map["Struct"] = values.NewPlcUSINT(colourLevelRed) + + // Simple Field (colourLevelGreen) + colourLevelGreen, _colourLevelGreenErr := readBuffer.ReadUint8("colourLevelGreen", 8) + if _colourLevelGreenErr != nil { + return nil, errors.Wrap(_colourLevelGreenErr, "Error parsing 'colourLevelGreen' field") + } + _map["Struct"] = values.NewPlcUSINT(colourLevelGreen) + + // Simple Field (colourLevelBlue) + colourLevelBlue, _colourLevelBlueErr := readBuffer.ReadUint8("colourLevelBlue", 8) + if _colourLevelBlueErr != nil { + return nil, errors.Wrap(_colourLevelBlueErr, "Error parsing 'colourLevelBlue' field") + } + _map["Struct"] = values.NewPlcUSINT(colourLevelBlue) + + // Simple Field (colourLevelWhite) + colourLevelWhite, _colourLevelWhiteErr := readBuffer.ReadUint8("colourLevelWhite", 8) + if _colourLevelWhiteErr != nil { + return nil, errors.Wrap(_colourLevelWhiteErr, "Error parsing 'colourLevelWhite' field") + } + _map["Struct"] = values.NewPlcUSINT(colourLevelWhite) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (mr) + mr, _mrErr := readBuffer.ReadBit("mr") + if _mrErr != nil { + return nil, errors.Wrap(_mrErr, "Error parsing 'mr' field") + } + _map["Struct"] = values.NewPlcBOOL(mr) + + // Simple Field (mg) + mg, _mgErr := readBuffer.ReadBit("mg") + if _mgErr != nil { + return nil, errors.Wrap(_mgErr, "Error parsing 'mg' field") + } + _map["Struct"] = values.NewPlcBOOL(mg) + + // Simple Field (mb) + mb, _mbErr := readBuffer.ReadBit("mb") + if _mbErr != nil { + return nil, errors.Wrap(_mbErr, "Error parsing 'mb' field") + } + _map["Struct"] = values.NewPlcBOOL(mb) + + // Simple Field (mw) + mw, _mwErr := readBuffer.ReadBit("mw") + if _mwErr != nil { + return nil, errors.Wrap(_mwErr, "Error parsing 'mw' field") + } + _map["Struct"] = values.NewPlcBOOL(mw) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_Relative_Control_RGBW : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (maskcw) + maskcw, _maskcwErr := readBuffer.ReadBit("maskcw") + if _maskcwErr != nil { + return nil, errors.Wrap(_maskcwErr, "Error parsing 'maskcw' field") + } + _map["Struct"] = values.NewPlcBOOL(maskcw) + + // Simple Field (maskcb) + maskcb, _maskcbErr := readBuffer.ReadBit("maskcb") + if _maskcbErr != nil { + return nil, errors.Wrap(_maskcbErr, "Error parsing 'maskcb' field") + } + _map["Struct"] = values.NewPlcBOOL(maskcb) + + // Simple Field (maskcg) + maskcg, _maskcgErr := readBuffer.ReadBit("maskcg") + if _maskcgErr != nil { + return nil, errors.Wrap(_maskcgErr, "Error parsing 'maskcg' field") + } + _map["Struct"] = values.NewPlcBOOL(maskcg) + + // Simple Field (maskcr) + maskcr, _maskcrErr := readBuffer.ReadBit("maskcr") + if _maskcrErr != nil { + return nil, errors.Wrap(_maskcrErr, "Error parsing 'maskcr' field") + } + _map["Struct"] = values.NewPlcBOOL(maskcr) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (cw) + cw, _cwErr := readBuffer.ReadBit("cw") + if _cwErr != nil { + return nil, errors.Wrap(_cwErr, "Error parsing 'cw' field") + } + _map["Struct"] = values.NewPlcBOOL(cw) + + // Simple Field (stepCodeColourWhite) + stepCodeColourWhite, _stepCodeColourWhiteErr := readBuffer.ReadUint8("stepCodeColourWhite", 3) + if _stepCodeColourWhiteErr != nil { + return nil, errors.Wrap(_stepCodeColourWhiteErr, "Error parsing 'stepCodeColourWhite' field") + } + _map["Struct"] = values.NewPlcUSINT(stepCodeColourWhite) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (cb) + cb, _cbErr := readBuffer.ReadBit("cb") + if _cbErr != nil { + return nil, errors.Wrap(_cbErr, "Error parsing 'cb' field") + } + _map["Struct"] = values.NewPlcBOOL(cb) + + // Simple Field (stepCodeColourBlue) + stepCodeColourBlue, _stepCodeColourBlueErr := readBuffer.ReadUint8("stepCodeColourBlue", 3) + if _stepCodeColourBlueErr != nil { + return nil, errors.Wrap(_stepCodeColourBlueErr, "Error parsing 'stepCodeColourBlue' field") + } + _map["Struct"] = values.NewPlcUSINT(stepCodeColourBlue) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (cg) + cg, _cgErr := readBuffer.ReadBit("cg") + if _cgErr != nil { + return nil, errors.Wrap(_cgErr, "Error parsing 'cg' field") + } + _map["Struct"] = values.NewPlcBOOL(cg) + + // Simple Field (stepCodeColourGreen) + stepCodeColourGreen, _stepCodeColourGreenErr := readBuffer.ReadUint8("stepCodeColourGreen", 3) + if _stepCodeColourGreenErr != nil { + return nil, errors.Wrap(_stepCodeColourGreenErr, "Error parsing 'stepCodeColourGreen' field") + } + _map["Struct"] = values.NewPlcUSINT(stepCodeColourGreen) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (cr) + cr, _crErr := readBuffer.ReadBit("cr") + if _crErr != nil { + return nil, errors.Wrap(_crErr, "Error parsing 'cr' field") + } + _map["Struct"] = values.NewPlcBOOL(cr) + + // Simple Field (stepCodeColourRed) + stepCodeColourRed, _stepCodeColourRedErr := readBuffer.ReadUint8("stepCodeColourRed", 3) + if _stepCodeColourRedErr != nil { + return nil, errors.Wrap(_stepCodeColourRedErr, "Error parsing 'stepCodeColourRed' field") + } + _map["Struct"] = values.NewPlcUSINT(stepCodeColourRed) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_Relative_Control_RGB : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (cb) + cb, _cbErr := readBuffer.ReadBit("cb") + if _cbErr != nil { + return nil, errors.Wrap(_cbErr, "Error parsing 'cb' field") + } + _map["Struct"] = values.NewPlcBOOL(cb) + + // Simple Field (stepCodeColourBlue) + stepCodeColourBlue, _stepCodeColourBlueErr := readBuffer.ReadUint8("stepCodeColourBlue", 3) + if _stepCodeColourBlueErr != nil { + return nil, errors.Wrap(_stepCodeColourBlueErr, "Error parsing 'stepCodeColourBlue' field") + } + _map["Struct"] = values.NewPlcUSINT(stepCodeColourBlue) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (cg) + cg, _cgErr := readBuffer.ReadBit("cg") + if _cgErr != nil { + return nil, errors.Wrap(_cgErr, "Error parsing 'cg' field") + } + _map["Struct"] = values.NewPlcBOOL(cg) + + // Simple Field (stepCodeColourGreen) + stepCodeColourGreen, _stepCodeColourGreenErr := readBuffer.ReadUint8("stepCodeColourGreen", 3) + if _stepCodeColourGreenErr != nil { + return nil, errors.Wrap(_stepCodeColourGreenErr, "Error parsing 'stepCodeColourGreen' field") + } + _map["Struct"] = values.NewPlcUSINT(stepCodeColourGreen) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (cr) + cr, _crErr := readBuffer.ReadBit("cr") + if _crErr != nil { + return nil, errors.Wrap(_crErr, "Error parsing 'cr' field") + } + _map["Struct"] = values.NewPlcBOOL(cr) + + // Simple Field (stepCodeColourRed) + stepCodeColourRed, _stepCodeColourRedErr := readBuffer.ReadUint8("stepCodeColourRed", 3) + if _stepCodeColourRedErr != nil { + return nil, errors.Wrap(_stepCodeColourRedErr, "Error parsing 'stepCodeColourRed' field") + } + _map["Struct"] = values.NewPlcUSINT(stepCodeColourRed) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_GeographicalLocation : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (longitude) + longitude, _longitudeErr := readBuffer.ReadFloat32("longitude", 32) + if _longitudeErr != nil { + return nil, errors.Wrap(_longitudeErr, "Error parsing 'longitude' field") + } + _map["Struct"] = values.NewPlcREAL(longitude) + + // Simple Field (latitude) + latitude, _latitudeErr := readBuffer.ReadFloat32("latitude", 32) + if _latitudeErr != nil { + return nil, errors.Wrap(_latitudeErr, "Error parsing 'latitude' field") + } + _map["Struct"] = values.NewPlcREAL(latitude) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_TempRoomSetpSetF16_4 : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (roomTemperatureSetpointComfort) + roomTemperatureSetpointComfort, _roomTemperatureSetpointComfortErr := readBuffer.ReadFloat32("roomTemperatureSetpointComfort", 16) + if _roomTemperatureSetpointComfortErr != nil { + return nil, errors.Wrap(_roomTemperatureSetpointComfortErr, "Error parsing 'roomTemperatureSetpointComfort' field") + } + _map["Struct"] = values.NewPlcREAL(roomTemperatureSetpointComfort) + + // Simple Field (roomTemperatureSetpointStandby) + roomTemperatureSetpointStandby, _roomTemperatureSetpointStandbyErr := readBuffer.ReadFloat32("roomTemperatureSetpointStandby", 16) + if _roomTemperatureSetpointStandbyErr != nil { + return nil, errors.Wrap(_roomTemperatureSetpointStandbyErr, "Error parsing 'roomTemperatureSetpointStandby' field") + } + _map["Struct"] = values.NewPlcREAL(roomTemperatureSetpointStandby) + + // Simple Field (roomTemperatureSetpointEconomy) + roomTemperatureSetpointEconomy, _roomTemperatureSetpointEconomyErr := readBuffer.ReadFloat32("roomTemperatureSetpointEconomy", 16) + if _roomTemperatureSetpointEconomyErr != nil { + return nil, errors.Wrap(_roomTemperatureSetpointEconomyErr, "Error parsing 'roomTemperatureSetpointEconomy' field") + } + _map["Struct"] = values.NewPlcREAL(roomTemperatureSetpointEconomy) + + // Simple Field (roomTemperatureSetpointBuildingProtection) + roomTemperatureSetpointBuildingProtection, _roomTemperatureSetpointBuildingProtectionErr := readBuffer.ReadFloat32("roomTemperatureSetpointBuildingProtection", 16) + if _roomTemperatureSetpointBuildingProtectionErr != nil { + return nil, errors.Wrap(_roomTemperatureSetpointBuildingProtectionErr, "Error parsing 'roomTemperatureSetpointBuildingProtection' field") + } + _map["Struct"] = values.NewPlcREAL(roomTemperatureSetpointBuildingProtection) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil +case datapointType == KnxDatapointType_DPT_TempRoomSetpSetShiftF16_4 : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (roomTemperatureSetpointShiftComfort) + roomTemperatureSetpointShiftComfort, _roomTemperatureSetpointShiftComfortErr := readBuffer.ReadFloat32("roomTemperatureSetpointShiftComfort", 16) + if _roomTemperatureSetpointShiftComfortErr != nil { + return nil, errors.Wrap(_roomTemperatureSetpointShiftComfortErr, "Error parsing 'roomTemperatureSetpointShiftComfort' field") + } + _map["Struct"] = values.NewPlcREAL(roomTemperatureSetpointShiftComfort) + + // Simple Field (roomTemperatureSetpointShiftStandby) + roomTemperatureSetpointShiftStandby, _roomTemperatureSetpointShiftStandbyErr := readBuffer.ReadFloat32("roomTemperatureSetpointShiftStandby", 16) + if _roomTemperatureSetpointShiftStandbyErr != nil { + return nil, errors.Wrap(_roomTemperatureSetpointShiftStandbyErr, "Error parsing 'roomTemperatureSetpointShiftStandby' field") + } + _map["Struct"] = values.NewPlcREAL(roomTemperatureSetpointShiftStandby) + + // Simple Field (roomTemperatureSetpointShiftEconomy) + roomTemperatureSetpointShiftEconomy, _roomTemperatureSetpointShiftEconomyErr := readBuffer.ReadFloat32("roomTemperatureSetpointShiftEconomy", 16) + if _roomTemperatureSetpointShiftEconomyErr != nil { + return nil, errors.Wrap(_roomTemperatureSetpointShiftEconomyErr, "Error parsing 'roomTemperatureSetpointShiftEconomy' field") + } + _map["Struct"] = values.NewPlcREAL(roomTemperatureSetpointShiftEconomy) + + // Simple Field (roomTemperatureSetpointShiftBuildingProtection) + roomTemperatureSetpointShiftBuildingProtection, _roomTemperatureSetpointShiftBuildingProtectionErr := readBuffer.ReadFloat32("roomTemperatureSetpointShiftBuildingProtection", 16) + if _roomTemperatureSetpointShiftBuildingProtectionErr != nil { + return nil, errors.Wrap(_roomTemperatureSetpointShiftBuildingProtectionErr, "Error parsing 'roomTemperatureSetpointShiftBuildingProtection' field") + } + _map["Struct"] = values.NewPlcREAL(roomTemperatureSetpointShiftBuildingProtection) + readBuffer.CloseContext("KnxDatapoint") + return values.NewPlcStruct(_map), nil } - // TODO: add more info which type it is actually + // TODO: add more info which type it is actually return nil, errors.New("unsupported type") } @@ -7585,5522 +7586,5524 @@ func KnxDatapointSerialize(value api.PlcValue, datapointType KnxDatapointType) ( func KnxDatapointSerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer, value api.PlcValue, datapointType KnxDatapointType) error { m := struct { - DatapointType KnxDatapointType + DatapointType KnxDatapointType }{ - DatapointType: datapointType, + DatapointType: datapointType, } _ = m writeBuffer.PushContext("KnxDatapoint") switch { - case datapointType == KnxDatapointType_BOOL: // BOOL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_BYTE: // BYTE - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_WORD: // WORD - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DWORD: // DWORD - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint32("value", 32, value.GetUint32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_LWORD: // LWORD - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint64("value", 64, value.GetUint64()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_USINT: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_SINT: // SINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteInt8("value", 8, value.GetInt8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_UINT: // UINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_INT: // INT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteInt16("value", 16, value.GetInt16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_UDINT: // UDINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint32("value", 32, value.GetUint32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DINT: // DINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteInt32("value", 32, value.GetInt32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_ULINT: // ULINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint64("value", 64, value.GetUint64()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_LINT: // LINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteInt64("value", 64, value.GetInt64()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_REAL: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_LREAL: // LREAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat64("value", 64, value.GetFloat64()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_CHAR: // CHAR - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteString("value", uint32(8), "UTF-8", value.GetString()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_WCHAR: // WCHAR - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteString("value", uint32(16), "UTF-16", value.GetString()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_TIME: // TIME - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (milliseconds) - if _err := writeBuffer.WriteUint32("milliseconds", 32, value.(values.PlcTIME).GetMilliseconds()); _err != nil { - return errors.Wrap(_err, "Error serializing 'milliseconds' field") - } - case datapointType == KnxDatapointType_LTIME: // LTIME - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (nanoseconds) - if _err := writeBuffer.WriteUint64("nanoseconds", 64, value.(values.PlcLTIME).GetNanoseconds()); _err != nil { - return errors.Wrap(_err, "Error serializing 'nanoseconds' field") - } - case datapointType == KnxDatapointType_DATE: // DATE - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (secondsSinceEpoch) - if _err := writeBuffer.WriteUint32("secondsSinceEpoch", 32, value.(values.PlcDATE).GetSecondsSinceEpoch()); _err != nil { - return errors.Wrap(_err, "Error serializing 'secondsSinceEpoch' field") - } - case datapointType == KnxDatapointType_TIME_OF_DAY: // TIME_OF_DAY - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (millisecondsSinceMidnight) - if _err := writeBuffer.WriteUint32("millisecondsSinceMidnight", 32, value.(values.PlcTIME_OF_DAY).GetMillisecondsSinceMidnight()); _err != nil { - return errors.Wrap(_err, "Error serializing 'millisecondsSinceMidnight' field") - } - case datapointType == KnxDatapointType_TOD: // TIME_OF_DAY - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (millisecondsSinceMidnight) - if _err := writeBuffer.WriteUint32("millisecondsSinceMidnight", 32, value.(values.PlcTIME_OF_DAY).GetMillisecondsSinceMidnight()); _err != nil { - return errors.Wrap(_err, "Error serializing 'millisecondsSinceMidnight' field") - } - case datapointType == KnxDatapointType_DATE_AND_TIME: // DATE_AND_TIME - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (year) - if _err := writeBuffer.WriteUint16("year", 16, value.(values.PlcDATE_AND_TIME).GetYear()); _err != nil { - return errors.Wrap(_err, "Error serializing 'year' field") - } - - // Simple Field (month) - if _err := writeBuffer.WriteUint8("month", 8, value.(values.PlcDATE_AND_TIME).GetMonth()); _err != nil { - return errors.Wrap(_err, "Error serializing 'month' field") - } - - // Simple Field (day) - if _err := writeBuffer.WriteUint8("day", 8, value.(values.PlcDATE_AND_TIME).GetDay()); _err != nil { - return errors.Wrap(_err, "Error serializing 'day' field") - } - - // Simple Field (dayOfWeek) - if _err := writeBuffer.WriteUint8("dayOfWeek", 8, value.(values.PlcDATE_AND_TIME).GetDayOfWeek()); _err != nil { - return errors.Wrap(_err, "Error serializing 'dayOfWeek' field") - } - - // Simple Field (hour) - if _err := writeBuffer.WriteUint8("hour", 8, value.(values.PlcDATE_AND_TIME).GetHour()); _err != nil { - return errors.Wrap(_err, "Error serializing 'hour' field") - } - - // Simple Field (minutes) - if _err := writeBuffer.WriteUint8("minutes", 8, value.(values.PlcDATE_AND_TIME).GetMinutes()); _err != nil { - return errors.Wrap(_err, "Error serializing 'minutes' field") - } - - // Simple Field (seconds) - if _err := writeBuffer.WriteUint8("seconds", 8, value.(values.PlcDATE_AND_TIME).GetSeconds()); _err != nil { - return errors.Wrap(_err, "Error serializing 'seconds' field") - } - - // Simple Field (nanoseconds) - if _err := writeBuffer.WriteUint32("nanoseconds", 32, value.(values.PlcDATE_AND_TIME).GetNanoseconds()); _err != nil { - return errors.Wrap(_err, "Error serializing 'nanoseconds' field") - } - case datapointType == KnxDatapointType_DT: // DATE_AND_TIME - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (year) - if _err := writeBuffer.WriteUint16("year", 16, value.(values.PlcDATE_AND_TIME).GetYear()); _err != nil { - return errors.Wrap(_err, "Error serializing 'year' field") - } - - // Simple Field (month) - if _err := writeBuffer.WriteUint8("month", 8, value.(values.PlcDATE_AND_TIME).GetMonth()); _err != nil { - return errors.Wrap(_err, "Error serializing 'month' field") - } - - // Simple Field (day) - if _err := writeBuffer.WriteUint8("day", 8, value.(values.PlcDATE_AND_TIME).GetDay()); _err != nil { - return errors.Wrap(_err, "Error serializing 'day' field") - } - - // Simple Field (dayOfWeek) - if _err := writeBuffer.WriteUint8("dayOfWeek", 8, value.(values.PlcDATE_AND_TIME).GetDayOfWeek()); _err != nil { - return errors.Wrap(_err, "Error serializing 'dayOfWeek' field") - } - - // Simple Field (hour) - if _err := writeBuffer.WriteUint8("hour", 8, value.(values.PlcDATE_AND_TIME).GetHour()); _err != nil { - return errors.Wrap(_err, "Error serializing 'hour' field") - } - - // Simple Field (minutes) - if _err := writeBuffer.WriteUint8("minutes", 8, value.(values.PlcDATE_AND_TIME).GetMinutes()); _err != nil { - return errors.Wrap(_err, "Error serializing 'minutes' field") - } - - // Simple Field (seconds) - if _err := writeBuffer.WriteUint8("seconds", 8, value.(values.PlcDATE_AND_TIME).GetSeconds()); _err != nil { - return errors.Wrap(_err, "Error serializing 'seconds' field") - } - - // Simple Field (nanoseconds) - if _err := writeBuffer.WriteUint32("nanoseconds", 32, value.(values.PlcDATE_AND_TIME).GetNanoseconds()); _err != nil { - return errors.Wrap(_err, "Error serializing 'nanoseconds' field") - } - case datapointType == KnxDatapointType_DPT_Switch: // BOOL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Bool: // BOOL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Enable: // BOOL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Ramp: // BOOL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Alarm: // BOOL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_BinaryValue: // BOOL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Step: // BOOL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_UpDown: // BOOL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_OpenClose: // BOOL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Start: // BOOL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_State: // BOOL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Invert: // BOOL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_DimSendStyle: // BOOL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_InputSource: // BOOL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Reset: // BOOL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Ack: // BOOL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Trigger: // BOOL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Occupancy: // BOOL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Window_Door: // BOOL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_LogicalFunction: // BOOL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Scene_AB: // BOOL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_ShutterBlinds_Mode: // BOOL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_DayNight: // BOOL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Heat_Cool: // BOOL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Switch_Control: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 6, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (control) - if _err := writeBuffer.WriteBit("control", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'control' field") - } - - // Simple Field (on) - if _err := writeBuffer.WriteBit("on", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'on' field") - } - case datapointType == KnxDatapointType_DPT_Bool_Control: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 6, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (control) - if _err := writeBuffer.WriteBit("control", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'control' field") - } - - // Simple Field (valueTrue) - if _err := writeBuffer.WriteBit("valueTrue", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'valueTrue' field") - } - case datapointType == KnxDatapointType_DPT_Enable_Control: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 6, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (control) - if _err := writeBuffer.WriteBit("control", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'control' field") - } - - // Simple Field (enable) - if _err := writeBuffer.WriteBit("enable", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'enable' field") - } - case datapointType == KnxDatapointType_DPT_Ramp_Control: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 6, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (control) - if _err := writeBuffer.WriteBit("control", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'control' field") - } - - // Simple Field (ramp) - if _err := writeBuffer.WriteBit("ramp", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'ramp' field") - } - case datapointType == KnxDatapointType_DPT_Alarm_Control: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 6, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (control) - if _err := writeBuffer.WriteBit("control", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'control' field") - } - - // Simple Field (alarm) - if _err := writeBuffer.WriteBit("alarm", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'alarm' field") - } - case datapointType == KnxDatapointType_DPT_BinaryValue_Control: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 6, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (control) - if _err := writeBuffer.WriteBit("control", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'control' field") - } - - // Simple Field (high) - if _err := writeBuffer.WriteBit("high", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'high' field") - } - case datapointType == KnxDatapointType_DPT_Step_Control: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 6, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (control) - if _err := writeBuffer.WriteBit("control", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'control' field") - } - - // Simple Field (increase) - if _err := writeBuffer.WriteBit("increase", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'increase' field") - } - case datapointType == KnxDatapointType_DPT_Direction1_Control: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 6, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (control) - if _err := writeBuffer.WriteBit("control", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'control' field") - } - - // Simple Field (down) - if _err := writeBuffer.WriteBit("down", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'down' field") - } - case datapointType == KnxDatapointType_DPT_Direction2_Control: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 6, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (control) - if _err := writeBuffer.WriteBit("control", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'control' field") - } - - // Simple Field (close) - if _err := writeBuffer.WriteBit("close", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'close' field") - } - case datapointType == KnxDatapointType_DPT_Start_Control: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 6, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (control) - if _err := writeBuffer.WriteBit("control", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'control' field") - } - - // Simple Field (start) - if _err := writeBuffer.WriteBit("start", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'start' field") - } - case datapointType == KnxDatapointType_DPT_State_Control: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 6, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (control) - if _err := writeBuffer.WriteBit("control", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'control' field") - } - - // Simple Field (active) - if _err := writeBuffer.WriteBit("active", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'active' field") - } - case datapointType == KnxDatapointType_DPT_Invert_Control: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 6, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (control) - if _err := writeBuffer.WriteBit("control", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'control' field") - } - - // Simple Field (inverted) - if _err := writeBuffer.WriteBit("inverted", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'inverted' field") - } - case datapointType == KnxDatapointType_DPT_Control_Dimming: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (increase) - if _err := writeBuffer.WriteBit("increase", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'increase' field") - } - - // Simple Field (stepcode) - if _err := writeBuffer.WriteUint8("stepcode", 3, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'stepcode' field") - } - case datapointType == KnxDatapointType_DPT_Control_Blinds: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (down) - if _err := writeBuffer.WriteBit("down", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'down' field") - } - - // Simple Field (stepcode) - if _err := writeBuffer.WriteUint8("stepcode", 3, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'stepcode' field") - } - case datapointType == KnxDatapointType_DPT_Char_ASCII: // STRING - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteString("value", uint32(8), "ASCII", value.GetString()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Char_8859_1: // STRING - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteString("value", uint32(8), "ISO-8859-1", value.GetString()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Scaling: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Angle: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Percent_U8: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_DecimalFactor: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Tariff: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_1_Ucount: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_FanStage: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Percent_V8: // SINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteInt8("value", 8, value.GetInt8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_1_Count: // SINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteInt8("value", 8, value.GetInt8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Status_Mode3: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (statusA) - if _err := writeBuffer.WriteBit("statusA", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'statusA' field") - } - - // Simple Field (statusB) - if _err := writeBuffer.WriteBit("statusB", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'statusB' field") - } - - // Simple Field (statusC) - if _err := writeBuffer.WriteBit("statusC", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'statusC' field") - } - - // Simple Field (statusD) - if _err := writeBuffer.WriteBit("statusD", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'statusD' field") - } - - // Simple Field (statusE) - if _err := writeBuffer.WriteBit("statusE", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'statusE' field") - } - - // Simple Field (mode) - if _err := writeBuffer.WriteUint8("mode", 3, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'mode' field") - } - case datapointType == KnxDatapointType_DPT_Value_2_Ucount: // UINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_TimePeriodMsec: // UINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_TimePeriod10Msec: // UINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_TimePeriod100Msec: // UINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_TimePeriodSec: // UINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_TimePeriodMin: // UINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_TimePeriodHrs: // UINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_PropDataType: // UINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Length_mm: // UINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_UElCurrentmA: // UINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Brightness: // UINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Absolute_Colour_Temperature: // UINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_2_Count: // INT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteInt16("value", 16, value.GetInt16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_DeltaTimeMsec: // INT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteInt16("value", 16, value.GetInt16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_DeltaTime10Msec: // INT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteInt16("value", 16, value.GetInt16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_DeltaTime100Msec: // INT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteInt16("value", 16, value.GetInt16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_DeltaTimeSec: // INT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteInt16("value", 16, value.GetInt16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_DeltaTimeMin: // INT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteInt16("value", 16, value.GetInt16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_DeltaTimeHrs: // INT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteInt16("value", 16, value.GetInt16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Percent_V16: // INT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteInt16("value", 16, value.GetInt16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Rotation_Angle: // INT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteInt16("value", 16, value.GetInt16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Length_m: // INT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteInt16("value", 16, value.GetInt16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Temp: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Tempd: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Tempa: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Lux: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Wsp: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Pres: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Humidity: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_AirQuality: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_AirFlow: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Time1: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Time2: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Volt: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Curr: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_PowerDensity: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_KelvinPerPercent: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Power: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Volume_Flow: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Rain_Amount: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Temp_F: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Wsp_kmh: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Absolute_Humidity: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Concentration_ygm3: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_TimeOfDay: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (day) - if _err := writeBuffer.WriteUint8("day", 3, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'day' field") - } - - // Simple Field (hour) - if _err := writeBuffer.WriteUint8("hour", 5, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'hour' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 2, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (minutes) - if _err := writeBuffer.WriteUint8("minutes", 6, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'minutes' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 2, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (seconds) - if _err := writeBuffer.WriteUint8("seconds", 6, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'seconds' field") - } - case datapointType == KnxDatapointType_DPT_Date: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 3, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (dayOfMonth) - if _err := writeBuffer.WriteUint8("dayOfMonth", 5, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'dayOfMonth' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (month) - if _err := writeBuffer.WriteUint8("month", 4, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'month' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 1, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (year) - if _err := writeBuffer.WriteUint8("year", 7, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'year' field") - } - case datapointType == KnxDatapointType_DPT_Value_4_Ucount: // UDINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint32("value", 32, value.GetUint32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_LongTimePeriod_Sec: // UDINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint32("value", 32, value.GetUint32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_LongTimePeriod_Min: // UDINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint32("value", 32, value.GetUint32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_LongTimePeriod_Hrs: // UDINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint32("value", 32, value.GetUint32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_VolumeLiquid_Litre: // UDINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint32("value", 32, value.GetUint32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Volume_m_3: // UDINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint32("value", 32, value.GetUint32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_4_Count: // DINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteInt32("value", 32, value.GetInt32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_FlowRate_m3h: // DINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteInt32("value", 32, value.GetInt32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_ActiveEnergy: // DINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteInt32("value", 32, value.GetInt32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_ApparantEnergy: // DINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteInt32("value", 32, value.GetInt32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_ReactiveEnergy: // DINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteInt32("value", 32, value.GetInt32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_ActiveEnergy_kWh: // DINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteInt32("value", 32, value.GetInt32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_ApparantEnergy_kVAh: // DINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteInt32("value", 32, value.GetInt32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_ReactiveEnergy_kVARh: // DINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteInt32("value", 32, value.GetInt32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_ActiveEnergy_MWh: // DINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteInt32("value", 32, value.GetInt32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_LongDeltaTimeSec: // DINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteInt32("value", 32, value.GetInt32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_DeltaVolumeLiquid_Litre: // DINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteInt32("value", 32, value.GetInt32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_DeltaVolume_m_3: // DINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteInt32("value", 32, value.GetInt32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Acceleration: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Acceleration_Angular: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Activation_Energy: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Activity: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Mol: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Amplitude: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_AngleRad: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_AngleDeg: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Angular_Momentum: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Angular_Velocity: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Area: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Capacitance: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Charge_DensitySurface: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Charge_DensityVolume: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Compressibility: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Conductance: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Electrical_Conductivity: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Density: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Electric_Charge: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Electric_Current: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Electric_CurrentDensity: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Electric_DipoleMoment: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Electric_Displacement: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Electric_FieldStrength: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Electric_Flux: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Electric_FluxDensity: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Electric_Polarization: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Electric_Potential: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Electric_PotentialDifference: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_ElectromagneticMoment: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Electromotive_Force: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Energy: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Force: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Frequency: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Angular_Frequency: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Heat_Capacity: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Heat_FlowRate: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Heat_Quantity: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Impedance: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Length: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Light_Quantity: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Luminance: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Luminous_Flux: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Luminous_Intensity: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Magnetic_FieldStrength: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Magnetic_Flux: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Magnetic_FluxDensity: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Magnetic_Moment: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Magnetic_Polarization: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Magnetization: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_MagnetomotiveForce: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Mass: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_MassFlux: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Momentum: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Phase_AngleRad: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Phase_AngleDeg: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Power: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Power_Factor: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Pressure: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Reactance: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Resistance: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Resistivity: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_SelfInductance: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_SolidAngle: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Sound_Intensity: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Speed: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Stress: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Surface_Tension: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Common_Temperature: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Absolute_Temperature: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_TemperatureDifference: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Thermal_Capacity: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Thermal_Conductivity: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_ThermoelectricPower: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Time: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Torque: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Volume: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Volume_Flux: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Weight: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_Work: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Value_ApparentPower: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Volume_Flux_Meter: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Volume_Flux_ls: // REAL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Access_Data: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (hurz) - if _err := writeBuffer.WriteUint8("hurz", 4, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'hurz' field") - } - - // Simple Field (value1) - if _err := writeBuffer.WriteUint8("value1", 4, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value1' field") - } - - // Simple Field (value2) - if _err := writeBuffer.WriteUint8("value2", 4, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value2' field") - } - - // Simple Field (value3) - if _err := writeBuffer.WriteUint8("value3", 4, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value3' field") - } - - // Simple Field (value4) - if _err := writeBuffer.WriteUint8("value4", 4, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value4' field") - } - - // Simple Field (value5) - if _err := writeBuffer.WriteUint8("value5", 4, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value5' field") - } - - // Simple Field (detectionError) - if _err := writeBuffer.WriteBit("detectionError", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'detectionError' field") - } - - // Simple Field (permission) - if _err := writeBuffer.WriteBit("permission", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'permission' field") - } - - // Simple Field (readDirection) - if _err := writeBuffer.WriteBit("readDirection", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'readDirection' field") - } - - // Simple Field (encryptionOfAccessInformation) - if _err := writeBuffer.WriteBit("encryptionOfAccessInformation", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'encryptionOfAccessInformation' field") - } - - // Simple Field (indexOfAccessIdentificationCode) - if _err := writeBuffer.WriteUint8("indexOfAccessIdentificationCode", 4, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'indexOfAccessIdentificationCode' field") - } - case datapointType == KnxDatapointType_DPT_String_ASCII: // STRING - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteString("value", uint32(112), "ASCII", value.GetString()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_String_8859_1: // STRING - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteString("value", uint32(112), "ISO-8859-1", value.GetString()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_SceneNumber: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 2, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 6, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_SceneControl: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (learnTheSceneCorrespondingToTheFieldSceneNumber) - if _err := writeBuffer.WriteBit("learnTheSceneCorrespondingToTheFieldSceneNumber", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'learnTheSceneCorrespondingToTheFieldSceneNumber' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 1, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (sceneNumber) - if _err := writeBuffer.WriteUint8("sceneNumber", 6, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'sceneNumber' field") - } - case datapointType == KnxDatapointType_DPT_DateTime: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (year) - if _err := writeBuffer.WriteUint8("year", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'year' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (month) - if _err := writeBuffer.WriteUint8("month", 4, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'month' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 3, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (dayofmonth) - if _err := writeBuffer.WriteUint8("dayofmonth", 5, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'dayofmonth' field") - } - - // Simple Field (dayofweek) - if _err := writeBuffer.WriteUint8("dayofweek", 3, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'dayofweek' field") - } - - // Simple Field (hourofday) - if _err := writeBuffer.WriteUint8("hourofday", 5, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'hourofday' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 2, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (minutes) - if _err := writeBuffer.WriteUint8("minutes", 6, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'minutes' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 2, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (seconds) - if _err := writeBuffer.WriteUint8("seconds", 6, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'seconds' field") - } - - // Simple Field (fault) - if _err := writeBuffer.WriteBit("fault", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'fault' field") - } - - // Simple Field (workingDay) - if _err := writeBuffer.WriteBit("workingDay", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'workingDay' field") - } - - // Simple Field (noWd) - if _err := writeBuffer.WriteBit("noWd", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'noWd' field") - } - - // Simple Field (noYear) - if _err := writeBuffer.WriteBit("noYear", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'noYear' field") - } - - // Simple Field (noDate) - if _err := writeBuffer.WriteBit("noDate", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'noDate' field") - } - - // Simple Field (noDayOfWeek) - if _err := writeBuffer.WriteBit("noDayOfWeek", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'noDayOfWeek' field") - } - - // Simple Field (noTime) - if _err := writeBuffer.WriteBit("noTime", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'noTime' field") - } - - // Simple Field (standardSummerTime) - if _err := writeBuffer.WriteBit("standardSummerTime", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'standardSummerTime' field") - } - - // Simple Field (qualityOfClock) - if _err := writeBuffer.WriteBit("qualityOfClock", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'qualityOfClock' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - case datapointType == KnxDatapointType_DPT_SCLOMode: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_BuildingMode: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_OccMode: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Priority: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_LightApplicationMode: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_ApplicationArea: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_AlarmClassType: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_PSUMode: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_ErrorClass_System: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_ErrorClass_HVAC: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Time_Delay: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Beaufort_Wind_Force_Scale: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_SensorSelect: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_ActuatorConnectType: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Cloud_Cover: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_PowerReturnMode: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_FuelType: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_BurnerType: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_HVACMode: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_DHWMode: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_LoadPriority: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_HVACContrMode: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_HVACEmergMode: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_ChangeoverMode: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_ValveMode: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_DamperMode: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_HeaterMode: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_FanMode: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_MasterSlaveMode: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_StatusRoomSetp: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Metering_DeviceType: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_HumDehumMode: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_EnableHCStage: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_ADAType: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_BackupMode: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_StartSynchronization: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Behaviour_Lock_Unlock: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Behaviour_Bus_Power_Up_Down: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_DALI_Fade_Time: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_BlinkingMode: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_LightControlMode: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_SwitchPBModel: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_PBAction: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_DimmPBModel: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_SwitchOnMode: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_LoadTypeSet: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_LoadTypeDetected: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Converter_Test_Control: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_SABExcept_Behaviour: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_SABBehaviour_Lock_Unlock: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_SSSBMode: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_BlindsControlMode: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_CommMode: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_AddInfoTypes: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_RF_ModeSelect: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_RF_FilterSelect: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_StatusGen: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 3, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (alarmStatusOfCorrespondingDatapointIsNotAcknowledged) - if _err := writeBuffer.WriteBit("alarmStatusOfCorrespondingDatapointIsNotAcknowledged", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'alarmStatusOfCorrespondingDatapointIsNotAcknowledged' field") - } - - // Simple Field (correspondingDatapointIsInAlarm) - if _err := writeBuffer.WriteBit("correspondingDatapointIsInAlarm", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'correspondingDatapointIsInAlarm' field") - } - - // Simple Field (correspondingDatapointMainValueIsOverridden) - if _err := writeBuffer.WriteBit("correspondingDatapointMainValueIsOverridden", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'correspondingDatapointMainValueIsOverridden' field") - } - - // Simple Field (correspondingDatapointMainValueIsCorruptedDueToFailure) - if _err := writeBuffer.WriteBit("correspondingDatapointMainValueIsCorruptedDueToFailure", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'correspondingDatapointMainValueIsCorruptedDueToFailure' field") - } - - // Simple Field (correspondingDatapointValueIsOutOfService) - if _err := writeBuffer.WriteBit("correspondingDatapointValueIsOutOfService", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'correspondingDatapointValueIsOutOfService' field") - } - case datapointType == KnxDatapointType_DPT_Device_Control: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 5, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (verifyModeIsOn) - if _err := writeBuffer.WriteBit("verifyModeIsOn", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'verifyModeIsOn' field") - } - - // Simple Field (aDatagramWithTheOwnIndividualAddressAsSourceAddressHasBeenReceived) - if _err := writeBuffer.WriteBit("aDatagramWithTheOwnIndividualAddressAsSourceAddressHasBeenReceived", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'aDatagramWithTheOwnIndividualAddressAsSourceAddressHasBeenReceived' field") - } - - // Simple Field (theUserApplicationIsStopped) - if _err := writeBuffer.WriteBit("theUserApplicationIsStopped", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'theUserApplicationIsStopped' field") - } - case datapointType == KnxDatapointType_DPT_ForceSign: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (roomhmax) - if _err := writeBuffer.WriteBit("roomhmax", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'roomhmax' field") - } - - // Simple Field (roomhconf) - if _err := writeBuffer.WriteBit("roomhconf", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'roomhconf' field") - } - - // Simple Field (dhwlegio) - if _err := writeBuffer.WriteBit("dhwlegio", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'dhwlegio' field") - } - - // Simple Field (dhwnorm) - if _err := writeBuffer.WriteBit("dhwnorm", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'dhwnorm' field") - } - - // Simple Field (overrun) - if _err := writeBuffer.WriteBit("overrun", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'overrun' field") - } - - // Simple Field (oversupply) - if _err := writeBuffer.WriteBit("oversupply", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'oversupply' field") - } - - // Simple Field (protection) - if _err := writeBuffer.WriteBit("protection", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'protection' field") - } - - // Simple Field (forcerequest) - if _err := writeBuffer.WriteBit("forcerequest", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'forcerequest' field") - } - case datapointType == KnxDatapointType_DPT_ForceSignCool: // BOOL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_StatusRHC: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (summermode) - if _err := writeBuffer.WriteBit("summermode", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'summermode' field") - } - - // Simple Field (statusstopoptim) - if _err := writeBuffer.WriteBit("statusstopoptim", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'statusstopoptim' field") - } - - // Simple Field (statusstartoptim) - if _err := writeBuffer.WriteBit("statusstartoptim", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'statusstartoptim' field") - } - - // Simple Field (statusmorningboost) - if _err := writeBuffer.WriteBit("statusmorningboost", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'statusmorningboost' field") - } - - // Simple Field (tempreturnlimit) - if _err := writeBuffer.WriteBit("tempreturnlimit", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'tempreturnlimit' field") - } - - // Simple Field (tempflowlimit) - if _err := writeBuffer.WriteBit("tempflowlimit", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'tempflowlimit' field") - } - - // Simple Field (satuseco) - if _err := writeBuffer.WriteBit("satuseco", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'satuseco' field") - } - - // Simple Field (fault) - if _err := writeBuffer.WriteBit("fault", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'fault' field") - } - case datapointType == KnxDatapointType_DPT_StatusSDHWC: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 5, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (solarloadsufficient) - if _err := writeBuffer.WriteBit("solarloadsufficient", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'solarloadsufficient' field") - } - - // Simple Field (sdhwloadactive) - if _err := writeBuffer.WriteBit("sdhwloadactive", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'sdhwloadactive' field") - } - - // Simple Field (fault) - if _err := writeBuffer.WriteBit("fault", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'fault' field") - } - case datapointType == KnxDatapointType_DPT_FuelTypeSet: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 5, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (solidstate) - if _err := writeBuffer.WriteBit("solidstate", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'solidstate' field") - } - - // Simple Field (gas) - if _err := writeBuffer.WriteBit("gas", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'gas' field") - } - - // Simple Field (oil) - if _err := writeBuffer.WriteBit("oil", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'oil' field") - } - case datapointType == KnxDatapointType_DPT_StatusRCC: // BOOL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_StatusAHU: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (cool) - if _err := writeBuffer.WriteBit("cool", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'cool' field") - } - - // Simple Field (heat) - if _err := writeBuffer.WriteBit("heat", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'heat' field") - } - - // Simple Field (fanactive) - if _err := writeBuffer.WriteBit("fanactive", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'fanactive' field") - } - - // Simple Field (fault) - if _err := writeBuffer.WriteBit("fault", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'fault' field") - } - case datapointType == KnxDatapointType_DPT_CombinedStatus_RTSM: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 3, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (statusOfHvacModeUser) - if _err := writeBuffer.WriteBit("statusOfHvacModeUser", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'statusOfHvacModeUser' field") - } - - // Simple Field (statusOfComfortProlongationUser) - if _err := writeBuffer.WriteBit("statusOfComfortProlongationUser", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'statusOfComfortProlongationUser' field") - } - - // Simple Field (effectiveValueOfTheComfortPushButton) - if _err := writeBuffer.WriteBit("effectiveValueOfTheComfortPushButton", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'effectiveValueOfTheComfortPushButton' field") - } - - // Simple Field (effectiveValueOfThePresenceStatus) - if _err := writeBuffer.WriteBit("effectiveValueOfThePresenceStatus", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'effectiveValueOfThePresenceStatus' field") - } - - // Simple Field (effectiveValueOfTheWindowStatus) - if _err := writeBuffer.WriteBit("effectiveValueOfTheWindowStatus", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'effectiveValueOfTheWindowStatus' field") - } - case datapointType == KnxDatapointType_DPT_LightActuatorErrorInfo: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 1, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (overheat) - if _err := writeBuffer.WriteBit("overheat", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'overheat' field") - } - - // Simple Field (lampfailure) - if _err := writeBuffer.WriteBit("lampfailure", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'lampfailure' field") - } - - // Simple Field (defectiveload) - if _err := writeBuffer.WriteBit("defectiveload", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'defectiveload' field") - } - - // Simple Field (underload) - if _err := writeBuffer.WriteBit("underload", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'underload' field") - } - - // Simple Field (overcurrent) - if _err := writeBuffer.WriteBit("overcurrent", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'overcurrent' field") - } - - // Simple Field (undervoltage) - if _err := writeBuffer.WriteBit("undervoltage", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'undervoltage' field") - } - - // Simple Field (loaddetectionerror) - if _err := writeBuffer.WriteBit("loaddetectionerror", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'loaddetectionerror' field") - } - case datapointType == KnxDatapointType_DPT_RF_ModeInfo: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 5, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (bibatSlave) - if _err := writeBuffer.WriteBit("bibatSlave", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'bibatSlave' field") - } - - // Simple Field (bibatMaster) - if _err := writeBuffer.WriteBit("bibatMaster", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'bibatMaster' field") - } - - // Simple Field (asynchronous) - if _err := writeBuffer.WriteBit("asynchronous", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'asynchronous' field") - } - case datapointType == KnxDatapointType_DPT_RF_FilterInfo: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 5, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (doa) - if _err := writeBuffer.WriteBit("doa", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'doa' field") - } - - // Simple Field (knxSn) - if _err := writeBuffer.WriteBit("knxSn", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'knxSn' field") - } - - // Simple Field (doaAndKnxSn) - if _err := writeBuffer.WriteBit("doaAndKnxSn", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'doaAndKnxSn' field") - } - case datapointType == KnxDatapointType_DPT_Channel_Activation_8: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (activationStateOfChannel1) - if _err := writeBuffer.WriteBit("activationStateOfChannel1", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel1' field") - } - - // Simple Field (activationStateOfChannel2) - if _err := writeBuffer.WriteBit("activationStateOfChannel2", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel2' field") - } - - // Simple Field (activationStateOfChannel3) - if _err := writeBuffer.WriteBit("activationStateOfChannel3", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel3' field") - } - - // Simple Field (activationStateOfChannel4) - if _err := writeBuffer.WriteBit("activationStateOfChannel4", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel4' field") - } - - // Simple Field (activationStateOfChannel5) - if _err := writeBuffer.WriteBit("activationStateOfChannel5", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel5' field") - } - - // Simple Field (activationStateOfChannel6) - if _err := writeBuffer.WriteBit("activationStateOfChannel6", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel6' field") - } - - // Simple Field (activationStateOfChannel7) - if _err := writeBuffer.WriteBit("activationStateOfChannel7", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel7' field") - } - - // Simple Field (activationStateOfChannel8) - if _err := writeBuffer.WriteBit("activationStateOfChannel8", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel8' field") - } - case datapointType == KnxDatapointType_DPT_StatusDHWC: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (tempoptimshiftactive) - if _err := writeBuffer.WriteBit("tempoptimshiftactive", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'tempoptimshiftactive' field") - } - - // Simple Field (solarenergysupport) - if _err := writeBuffer.WriteBit("solarenergysupport", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'solarenergysupport' field") - } - - // Simple Field (solarenergyonly) - if _err := writeBuffer.WriteBit("solarenergyonly", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'solarenergyonly' field") - } - - // Simple Field (otherenergysourceactive) - if _err := writeBuffer.WriteBit("otherenergysourceactive", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'otherenergysourceactive' field") - } - - // Simple Field (dhwpushactive) - if _err := writeBuffer.WriteBit("dhwpushactive", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'dhwpushactive' field") - } - - // Simple Field (legioprotactive) - if _err := writeBuffer.WriteBit("legioprotactive", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'legioprotactive' field") - } - - // Simple Field (dhwloadactive) - if _err := writeBuffer.WriteBit("dhwloadactive", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'dhwloadactive' field") - } - - // Simple Field (fault) - if _err := writeBuffer.WriteBit("fault", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'fault' field") - } - case datapointType == KnxDatapointType_DPT_StatusRHCC: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 1, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (overheatalarm) - if _err := writeBuffer.WriteBit("overheatalarm", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'overheatalarm' field") - } - - // Simple Field (frostalarm) - if _err := writeBuffer.WriteBit("frostalarm", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'frostalarm' field") - } - - // Simple Field (dewpointstatus) - if _err := writeBuffer.WriteBit("dewpointstatus", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'dewpointstatus' field") - } - - // Simple Field (coolingdisabled) - if _err := writeBuffer.WriteBit("coolingdisabled", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'coolingdisabled' field") - } - - // Simple Field (statusprecool) - if _err := writeBuffer.WriteBit("statusprecool", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'statusprecool' field") - } - - // Simple Field (statusecoc) - if _err := writeBuffer.WriteBit("statusecoc", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'statusecoc' field") - } - - // Simple Field (heatcoolmode) - if _err := writeBuffer.WriteBit("heatcoolmode", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'heatcoolmode' field") - } - - // Simple Field (heatingdiabled) - if _err := writeBuffer.WriteBit("heatingdiabled", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'heatingdiabled' field") - } - - // Simple Field (statusstopoptim) - if _err := writeBuffer.WriteBit("statusstopoptim", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'statusstopoptim' field") - } - - // Simple Field (statusstartoptim) - if _err := writeBuffer.WriteBit("statusstartoptim", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'statusstartoptim' field") - } - - // Simple Field (statusmorningboosth) - if _err := writeBuffer.WriteBit("statusmorningboosth", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'statusmorningboosth' field") - } - - // Simple Field (tempflowreturnlimit) - if _err := writeBuffer.WriteBit("tempflowreturnlimit", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'tempflowreturnlimit' field") - } - - // Simple Field (tempflowlimit) - if _err := writeBuffer.WriteBit("tempflowlimit", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'tempflowlimit' field") - } - - // Simple Field (statusecoh) - if _err := writeBuffer.WriteBit("statusecoh", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'statusecoh' field") - } - - // Simple Field (fault) - if _err := writeBuffer.WriteBit("fault", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'fault' field") - } - case datapointType == KnxDatapointType_DPT_CombinedStatus_HVA: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (calibrationMode) - if _err := writeBuffer.WriteBit("calibrationMode", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'calibrationMode' field") - } - - // Simple Field (lockedPosition) - if _err := writeBuffer.WriteBit("lockedPosition", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'lockedPosition' field") - } - - // Simple Field (forcedPosition) - if _err := writeBuffer.WriteBit("forcedPosition", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'forcedPosition' field") - } - - // Simple Field (manuaOperationOverridden) - if _err := writeBuffer.WriteBit("manuaOperationOverridden", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'manuaOperationOverridden' field") - } - - // Simple Field (serviceMode) - if _err := writeBuffer.WriteBit("serviceMode", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'serviceMode' field") - } - - // Simple Field (valveKick) - if _err := writeBuffer.WriteBit("valveKick", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'valveKick' field") - } - - // Simple Field (overload) - if _err := writeBuffer.WriteBit("overload", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'overload' field") - } - - // Simple Field (shortCircuit) - if _err := writeBuffer.WriteBit("shortCircuit", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'shortCircuit' field") - } - - // Simple Field (currentValvePosition) - if _err := writeBuffer.WriteBit("currentValvePosition", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'currentValvePosition' field") - } - case datapointType == KnxDatapointType_DPT_CombinedStatus_RTC: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (coolingModeEnabled) - if _err := writeBuffer.WriteBit("coolingModeEnabled", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'coolingModeEnabled' field") - } - - // Simple Field (heatingModeEnabled) - if _err := writeBuffer.WriteBit("heatingModeEnabled", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'heatingModeEnabled' field") - } - - // Simple Field (additionalHeatingCoolingStage2Stage) - if _err := writeBuffer.WriteBit("additionalHeatingCoolingStage2Stage", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'additionalHeatingCoolingStage2Stage' field") - } - - // Simple Field (controllerInactive) - if _err := writeBuffer.WriteBit("controllerInactive", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'controllerInactive' field") - } - - // Simple Field (overheatAlarm) - if _err := writeBuffer.WriteBit("overheatAlarm", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'overheatAlarm' field") - } - - // Simple Field (frostAlarm) - if _err := writeBuffer.WriteBit("frostAlarm", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'frostAlarm' field") - } - - // Simple Field (dewPointStatus) - if _err := writeBuffer.WriteBit("dewPointStatus", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'dewPointStatus' field") - } - - // Simple Field (activeMode) - if _err := writeBuffer.WriteBit("activeMode", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activeMode' field") - } - - // Simple Field (generalFailureInformation) - if _err := writeBuffer.WriteBit("generalFailureInformation", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'generalFailureInformation' field") - } - case datapointType == KnxDatapointType_DPT_Media: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint16("reserved", 10, uint16(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (knxIp) - if _err := writeBuffer.WriteBit("knxIp", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'knxIp' field") - } - - // Simple Field (rf) - if _err := writeBuffer.WriteBit("rf", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'rf' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 1, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (pl110) - if _err := writeBuffer.WriteBit("pl110", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'pl110' field") - } - - // Simple Field (tp1) - if _err := writeBuffer.WriteBit("tp1", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'tp1' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 1, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - case datapointType == KnxDatapointType_DPT_Channel_Activation_16: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (activationStateOfChannel1) - if _err := writeBuffer.WriteBit("activationStateOfChannel1", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel1' field") - } - - // Simple Field (activationStateOfChannel2) - if _err := writeBuffer.WriteBit("activationStateOfChannel2", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel2' field") - } - - // Simple Field (activationStateOfChannel3) - if _err := writeBuffer.WriteBit("activationStateOfChannel3", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel3' field") - } - - // Simple Field (activationStateOfChannel4) - if _err := writeBuffer.WriteBit("activationStateOfChannel4", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel4' field") - } - - // Simple Field (activationStateOfChannel5) - if _err := writeBuffer.WriteBit("activationStateOfChannel5", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel5' field") - } - - // Simple Field (activationStateOfChannel6) - if _err := writeBuffer.WriteBit("activationStateOfChannel6", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel6' field") - } - - // Simple Field (activationStateOfChannel7) - if _err := writeBuffer.WriteBit("activationStateOfChannel7", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel7' field") - } - - // Simple Field (activationStateOfChannel8) - if _err := writeBuffer.WriteBit("activationStateOfChannel8", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel8' field") - } - - // Simple Field (activationStateOfChannel9) - if _err := writeBuffer.WriteBit("activationStateOfChannel9", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel9' field") - } - - // Simple Field (activationStateOfChannel10) - if _err := writeBuffer.WriteBit("activationStateOfChannel10", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel10' field") - } - - // Simple Field (activationStateOfChannel11) - if _err := writeBuffer.WriteBit("activationStateOfChannel11", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel11' field") - } - - // Simple Field (activationStateOfChannel12) - if _err := writeBuffer.WriteBit("activationStateOfChannel12", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel12' field") - } - - // Simple Field (activationStateOfChannel13) - if _err := writeBuffer.WriteBit("activationStateOfChannel13", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel13' field") - } - - // Simple Field (activationStateOfChannel14) - if _err := writeBuffer.WriteBit("activationStateOfChannel14", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel14' field") - } - - // Simple Field (activationStateOfChannel15) - if _err := writeBuffer.WriteBit("activationStateOfChannel15", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel15' field") - } - - // Simple Field (activationStateOfChannel16) - if _err := writeBuffer.WriteBit("activationStateOfChannel16", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel16' field") - } - case datapointType == KnxDatapointType_DPT_OnOffAction: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 6, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 2, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Alarm_Reaction: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 6, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 2, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_UpDown_Action: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 6, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 2, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_HVAC_PB_Action: // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 6, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 2, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_DoubleNibble: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (busy) - if _err := writeBuffer.WriteUint8("busy", 4, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'busy' field") - } - - // Simple Field (nak) - if _err := writeBuffer.WriteUint8("nak", 4, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'nak' field") - } - case datapointType == KnxDatapointType_DPT_SceneInfo: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 1, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (sceneIsInactive) - if _err := writeBuffer.WriteBit("sceneIsInactive", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'sceneIsInactive' field") - } - - // Simple Field (scenenumber) - if _err := writeBuffer.WriteUint8("scenenumber", 6, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'scenenumber' field") - } - case datapointType == KnxDatapointType_DPT_CombinedInfoOnOff: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (maskBitInfoOnOffOutput16) - if _err := writeBuffer.WriteBit("maskBitInfoOnOffOutput16", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'maskBitInfoOnOffOutput16' field") - } - - // Simple Field (maskBitInfoOnOffOutput15) - if _err := writeBuffer.WriteBit("maskBitInfoOnOffOutput15", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'maskBitInfoOnOffOutput15' field") - } - - // Simple Field (maskBitInfoOnOffOutput14) - if _err := writeBuffer.WriteBit("maskBitInfoOnOffOutput14", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'maskBitInfoOnOffOutput14' field") - } - - // Simple Field (maskBitInfoOnOffOutput13) - if _err := writeBuffer.WriteBit("maskBitInfoOnOffOutput13", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'maskBitInfoOnOffOutput13' field") - } - - // Simple Field (maskBitInfoOnOffOutput12) - if _err := writeBuffer.WriteBit("maskBitInfoOnOffOutput12", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'maskBitInfoOnOffOutput12' field") - } - - // Simple Field (maskBitInfoOnOffOutput11) - if _err := writeBuffer.WriteBit("maskBitInfoOnOffOutput11", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'maskBitInfoOnOffOutput11' field") - } - - // Simple Field (maskBitInfoOnOffOutput10) - if _err := writeBuffer.WriteBit("maskBitInfoOnOffOutput10", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'maskBitInfoOnOffOutput10' field") - } - - // Simple Field (maskBitInfoOnOffOutput9) - if _err := writeBuffer.WriteBit("maskBitInfoOnOffOutput9", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'maskBitInfoOnOffOutput9' field") - } - - // Simple Field (maskBitInfoOnOffOutput8) - if _err := writeBuffer.WriteBit("maskBitInfoOnOffOutput8", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'maskBitInfoOnOffOutput8' field") - } - - // Simple Field (maskBitInfoOnOffOutput7) - if _err := writeBuffer.WriteBit("maskBitInfoOnOffOutput7", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'maskBitInfoOnOffOutput7' field") - } - - // Simple Field (maskBitInfoOnOffOutput6) - if _err := writeBuffer.WriteBit("maskBitInfoOnOffOutput6", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'maskBitInfoOnOffOutput6' field") - } - - // Simple Field (maskBitInfoOnOffOutput5) - if _err := writeBuffer.WriteBit("maskBitInfoOnOffOutput5", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'maskBitInfoOnOffOutput5' field") - } - - // Simple Field (maskBitInfoOnOffOutput4) - if _err := writeBuffer.WriteBit("maskBitInfoOnOffOutput4", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'maskBitInfoOnOffOutput4' field") - } - - // Simple Field (maskBitInfoOnOffOutput3) - if _err := writeBuffer.WriteBit("maskBitInfoOnOffOutput3", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'maskBitInfoOnOffOutput3' field") - } - - // Simple Field (maskBitInfoOnOffOutput2) - if _err := writeBuffer.WriteBit("maskBitInfoOnOffOutput2", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'maskBitInfoOnOffOutput2' field") - } - - // Simple Field (maskBitInfoOnOffOutput1) - if _err := writeBuffer.WriteBit("maskBitInfoOnOffOutput1", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'maskBitInfoOnOffOutput1' field") - } - - // Simple Field (infoOnOffOutput16) - if _err := writeBuffer.WriteBit("infoOnOffOutput16", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'infoOnOffOutput16' field") - } - - // Simple Field (infoOnOffOutput15) - if _err := writeBuffer.WriteBit("infoOnOffOutput15", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'infoOnOffOutput15' field") - } - - // Simple Field (infoOnOffOutput14) - if _err := writeBuffer.WriteBit("infoOnOffOutput14", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'infoOnOffOutput14' field") - } - - // Simple Field (infoOnOffOutput13) - if _err := writeBuffer.WriteBit("infoOnOffOutput13", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'infoOnOffOutput13' field") - } - - // Simple Field (infoOnOffOutput12) - if _err := writeBuffer.WriteBit("infoOnOffOutput12", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'infoOnOffOutput12' field") - } - - // Simple Field (infoOnOffOutput11) - if _err := writeBuffer.WriteBit("infoOnOffOutput11", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'infoOnOffOutput11' field") - } - - // Simple Field (infoOnOffOutput10) - if _err := writeBuffer.WriteBit("infoOnOffOutput10", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'infoOnOffOutput10' field") - } - - // Simple Field (infoOnOffOutput9) - if _err := writeBuffer.WriteBit("infoOnOffOutput9", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'infoOnOffOutput9' field") - } - - // Simple Field (infoOnOffOutput8) - if _err := writeBuffer.WriteBit("infoOnOffOutput8", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'infoOnOffOutput8' field") - } - - // Simple Field (infoOnOffOutput7) - if _err := writeBuffer.WriteBit("infoOnOffOutput7", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'infoOnOffOutput7' field") - } - - // Simple Field (infoOnOffOutput6) - if _err := writeBuffer.WriteBit("infoOnOffOutput6", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'infoOnOffOutput6' field") - } - - // Simple Field (infoOnOffOutput5) - if _err := writeBuffer.WriteBit("infoOnOffOutput5", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'infoOnOffOutput5' field") - } - - // Simple Field (infoOnOffOutput4) - if _err := writeBuffer.WriteBit("infoOnOffOutput4", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'infoOnOffOutput4' field") - } - - // Simple Field (infoOnOffOutput3) - if _err := writeBuffer.WriteBit("infoOnOffOutput3", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'infoOnOffOutput3' field") - } - - // Simple Field (infoOnOffOutput2) - if _err := writeBuffer.WriteBit("infoOnOffOutput2", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'infoOnOffOutput2' field") - } - - // Simple Field (infoOnOffOutput1) - if _err := writeBuffer.WriteBit("infoOnOffOutput1", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'infoOnOffOutput1' field") - } - case datapointType == KnxDatapointType_DPT_ActiveEnergy_V64: // LINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteInt64("value", 64, value.GetInt64()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_ApparantEnergy_V64: // LINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteInt64("value", 64, value.GetInt64()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_ReactiveEnergy_V64: // LINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteInt64("value", 64, value.GetInt64()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Channel_Activation_24: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (activationStateOfChannel1) - if _err := writeBuffer.WriteBit("activationStateOfChannel1", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel1' field") - } - - // Simple Field (activationStateOfChannel2) - if _err := writeBuffer.WriteBit("activationStateOfChannel2", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel2' field") - } - - // Simple Field (activationStateOfChannel3) - if _err := writeBuffer.WriteBit("activationStateOfChannel3", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel3' field") - } - - // Simple Field (activationStateOfChannel4) - if _err := writeBuffer.WriteBit("activationStateOfChannel4", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel4' field") - } - - // Simple Field (activationStateOfChannel5) - if _err := writeBuffer.WriteBit("activationStateOfChannel5", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel5' field") - } - - // Simple Field (activationStateOfChannel6) - if _err := writeBuffer.WriteBit("activationStateOfChannel6", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel6' field") - } - - // Simple Field (activationStateOfChannel7) - if _err := writeBuffer.WriteBit("activationStateOfChannel7", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel7' field") - } - - // Simple Field (activationStateOfChannel8) - if _err := writeBuffer.WriteBit("activationStateOfChannel8", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel8' field") - } - - // Simple Field (activationStateOfChannel9) - if _err := writeBuffer.WriteBit("activationStateOfChannel9", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel9' field") - } - - // Simple Field (activationStateOfChannel10) - if _err := writeBuffer.WriteBit("activationStateOfChannel10", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel10' field") - } - - // Simple Field (activationStateOfChannel11) - if _err := writeBuffer.WriteBit("activationStateOfChannel11", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel11' field") - } - - // Simple Field (activationStateOfChannel12) - if _err := writeBuffer.WriteBit("activationStateOfChannel12", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel12' field") - } - - // Simple Field (activationStateOfChannel13) - if _err := writeBuffer.WriteBit("activationStateOfChannel13", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel13' field") - } - - // Simple Field (activationStateOfChannel14) - if _err := writeBuffer.WriteBit("activationStateOfChannel14", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel14' field") - } - - // Simple Field (activationStateOfChannel15) - if _err := writeBuffer.WriteBit("activationStateOfChannel15", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel15' field") - } - - // Simple Field (activationStateOfChannel16) - if _err := writeBuffer.WriteBit("activationStateOfChannel16", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel16' field") - } - - // Simple Field (activationStateOfChannel17) - if _err := writeBuffer.WriteBit("activationStateOfChannel17", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel17' field") - } - - // Simple Field (activationStateOfChannel18) - if _err := writeBuffer.WriteBit("activationStateOfChannel18", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel18' field") - } - - // Simple Field (activationStateOfChannel19) - if _err := writeBuffer.WriteBit("activationStateOfChannel19", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel19' field") - } - - // Simple Field (activationStateOfChannel20) - if _err := writeBuffer.WriteBit("activationStateOfChannel20", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel20' field") - } - - // Simple Field (activationStateOfChannel21) - if _err := writeBuffer.WriteBit("activationStateOfChannel21", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel21' field") - } - - // Simple Field (activationStateOfChannel22) - if _err := writeBuffer.WriteBit("activationStateOfChannel22", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel22' field") - } - - // Simple Field (activationStateOfChannel23) - if _err := writeBuffer.WriteBit("activationStateOfChannel23", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel23' field") - } - - // Simple Field (activationStateOfChannel24) - if _err := writeBuffer.WriteBit("activationStateOfChannel24", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activationStateOfChannel24' field") - } - case datapointType == KnxDatapointType_DPT_HVACModeNext: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (delayTimeMin) - if _err := writeBuffer.WriteUint16("delayTimeMin", 16, value.GetUint16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'delayTimeMin' field") - } - - // Simple Field (hvacMode) - if _err := writeBuffer.WriteUint8("hvacMode", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'hvacMode' field") - } - case datapointType == KnxDatapointType_DPT_DHWModeNext: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (delayTimeMin) - if _err := writeBuffer.WriteUint16("delayTimeMin", 16, value.GetUint16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'delayTimeMin' field") - } - - // Simple Field (dhwMode) - if _err := writeBuffer.WriteUint8("dhwMode", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'dhwMode' field") - } - case datapointType == KnxDatapointType_DPT_OccModeNext: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (delayTimeMin) - if _err := writeBuffer.WriteUint16("delayTimeMin", 16, value.GetUint16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'delayTimeMin' field") - } - - // Simple Field (occupancyMode) - if _err := writeBuffer.WriteUint8("occupancyMode", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'occupancyMode' field") - } - case datapointType == KnxDatapointType_DPT_BuildingModeNext: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (delayTimeMin) - if _err := writeBuffer.WriteUint16("delayTimeMin", 16, value.GetUint16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'delayTimeMin' field") - } - - // Simple Field (buildingMode) - if _err := writeBuffer.WriteUint8("buildingMode", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'buildingMode' field") - } - case datapointType == KnxDatapointType_DPT_StatusLightingActuator: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (validactualvalue) - if _err := writeBuffer.WriteBit("validactualvalue", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'validactualvalue' field") - } - - // Simple Field (locked) - if _err := writeBuffer.WriteBit("locked", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'locked' field") - } - - // Simple Field (forced) - if _err := writeBuffer.WriteBit("forced", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'forced' field") - } - - // Simple Field (nightmodeactive) - if _err := writeBuffer.WriteBit("nightmodeactive", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'nightmodeactive' field") - } - - // Simple Field (staircaselightingFunction) - if _err := writeBuffer.WriteBit("staircaselightingFunction", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'staircaselightingFunction' field") - } - - // Simple Field (dimming) - if _err := writeBuffer.WriteBit("dimming", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'dimming' field") - } - - // Simple Field (localoverride) - if _err := writeBuffer.WriteBit("localoverride", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'localoverride' field") - } - - // Simple Field (failure) - if _err := writeBuffer.WriteBit("failure", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'failure' field") - } - - // Simple Field (actualvalue) - if _err := writeBuffer.WriteUint8("actualvalue", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'actualvalue' field") - } - case datapointType == KnxDatapointType_DPT_Version: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (magicNumber) - if _err := writeBuffer.WriteUint8("magicNumber", 5, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'magicNumber' field") - } - - // Simple Field (versionNumber) - if _err := writeBuffer.WriteUint8("versionNumber", 5, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'versionNumber' field") - } - - // Simple Field (revisionNumber) - if _err := writeBuffer.WriteUint8("revisionNumber", 6, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'revisionNumber' field") - } - case datapointType == KnxDatapointType_DPT_AlarmInfo: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (logNumber) - if _err := writeBuffer.WriteUint8("logNumber", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'logNumber' field") - } - - // Simple Field (alarmPriority) - if _err := writeBuffer.WriteUint8("alarmPriority", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'alarmPriority' field") - } - - // Simple Field (applicationArea) - if _err := writeBuffer.WriteUint8("applicationArea", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'applicationArea' field") - } - - // Simple Field (errorClass) - if _err := writeBuffer.WriteUint8("errorClass", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'errorClass' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (errorcodeSup) - if _err := writeBuffer.WriteBit("errorcodeSup", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'errorcodeSup' field") - } - - // Simple Field (alarmtextSup) - if _err := writeBuffer.WriteBit("alarmtextSup", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'alarmtextSup' field") - } - - // Simple Field (timestampSup) - if _err := writeBuffer.WriteBit("timestampSup", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'timestampSup' field") - } - - // Simple Field (ackSup) - if _err := writeBuffer.WriteBit("ackSup", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'ackSup' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 5, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (locked) - if _err := writeBuffer.WriteBit("locked", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'locked' field") - } - - // Simple Field (alarmunack) - if _err := writeBuffer.WriteBit("alarmunack", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'alarmunack' field") - } - - // Simple Field (inalarm) - if _err := writeBuffer.WriteBit("inalarm", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'inalarm' field") - } - case datapointType == KnxDatapointType_DPT_TempRoomSetpSetF16_3: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (tempsetpcomf) - if _err := writeBuffer.WriteFloat32("tempsetpcomf", 16, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'tempsetpcomf' field") - } - - // Simple Field (tempsetpstdby) - if _err := writeBuffer.WriteFloat32("tempsetpstdby", 16, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'tempsetpstdby' field") - } - - // Simple Field (tempsetpeco) - if _err := writeBuffer.WriteFloat32("tempsetpeco", 16, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'tempsetpeco' field") - } - case datapointType == KnxDatapointType_DPT_TempRoomSetpSetShiftF16_3: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (tempsetpshiftcomf) - if _err := writeBuffer.WriteFloat32("tempsetpshiftcomf", 16, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'tempsetpshiftcomf' field") - } - - // Simple Field (tempsetpshiftstdby) - if _err := writeBuffer.WriteFloat32("tempsetpshiftstdby", 16, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'tempsetpshiftstdby' field") - } - - // Simple Field (tempsetpshifteco) - if _err := writeBuffer.WriteFloat32("tempsetpshifteco", 16, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'tempsetpshifteco' field") - } - case datapointType == KnxDatapointType_DPT_Scaling_Speed: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (timePeriod) - if _err := writeBuffer.WriteUint16("timePeriod", 16, value.GetUint16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'timePeriod' field") - } - - // Simple Field (percent) - if _err := writeBuffer.WriteUint8("percent", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'percent' field") - } - case datapointType == KnxDatapointType_DPT_Scaling_Step_Time: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (timePeriod) - if _err := writeBuffer.WriteUint16("timePeriod", 16, value.GetUint16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'timePeriod' field") - } - - // Simple Field (percent) - if _err := writeBuffer.WriteUint8("percent", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'percent' field") - } - case datapointType == KnxDatapointType_DPT_MeteringValue: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (countval) - if _err := writeBuffer.WriteInt32("countval", 32, value.GetInt32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'countval' field") - } - - // Simple Field (valinffield) - if _err := writeBuffer.WriteUint8("valinffield", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'valinffield' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 3, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (alarmunack) - if _err := writeBuffer.WriteBit("alarmunack", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'alarmunack' field") - } - - // Simple Field (inalarm) - if _err := writeBuffer.WriteBit("inalarm", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'inalarm' field") - } - - // Simple Field (overridden) - if _err := writeBuffer.WriteBit("overridden", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'overridden' field") - } - - // Simple Field (fault) - if _err := writeBuffer.WriteBit("fault", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'fault' field") - } - - // Simple Field (outofservice) - if _err := writeBuffer.WriteBit("outofservice", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'outofservice' field") - } - case datapointType == KnxDatapointType_DPT_MBus_Address: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (manufactid) - if _err := writeBuffer.WriteUint16("manufactid", 16, value.GetUint16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'manufactid' field") - } - - // Simple Field (identnumber) - if _err := writeBuffer.WriteUint32("identnumber", 32, value.GetUint32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'identnumber' field") - } - - // Simple Field (version) - if _err := writeBuffer.WriteUint8("version", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'version' field") - } - - // Simple Field (medium) - if _err := writeBuffer.WriteUint8("medium", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'medium' field") - } - case datapointType == KnxDatapointType_DPT_Colour_RGB: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (r) - if _err := writeBuffer.WriteUint8("r", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'r' field") - } - - // Simple Field (g) - if _err := writeBuffer.WriteUint8("g", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'g' field") - } - - // Simple Field (b) - if _err := writeBuffer.WriteUint8("b", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'b' field") - } - case datapointType == KnxDatapointType_DPT_LanguageCodeAlpha2_ASCII: // STRING - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteString("value", uint32(16), "ASCII", value.GetString()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case datapointType == KnxDatapointType_DPT_Tariff_ActiveEnergy: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (activeelectricalenergy) - if _err := writeBuffer.WriteInt32("activeelectricalenergy", 32, value.GetInt32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'activeelectricalenergy' field") - } - - // Simple Field (tariff) - if _err := writeBuffer.WriteUint8("tariff", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'tariff' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 6, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (electricalengergyvalidity) - if _err := writeBuffer.WriteBit("electricalengergyvalidity", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'electricalengergyvalidity' field") - } - - // Simple Field (tariffvalidity) - if _err := writeBuffer.WriteBit("tariffvalidity", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'tariffvalidity' field") - } - case datapointType == KnxDatapointType_DPT_Prioritised_Mode_Control: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (deactivationOfPriority) - if _err := writeBuffer.WriteBit("deactivationOfPriority", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'deactivationOfPriority' field") - } - - // Simple Field (priorityLevel) - if _err := writeBuffer.WriteUint8("priorityLevel", 3, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'priorityLevel' field") - } - - // Simple Field (modeLevel) - if _err := writeBuffer.WriteUint8("modeLevel", 4, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'modeLevel' field") - } - case datapointType == KnxDatapointType_DPT_DALI_Control_Gear_Diagnostic: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 5, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (convertorError) - if _err := writeBuffer.WriteBit("convertorError", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'convertorError' field") - } - - // Simple Field (ballastFailure) - if _err := writeBuffer.WriteBit("ballastFailure", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'ballastFailure' field") - } - - // Simple Field (lampFailure) - if _err := writeBuffer.WriteBit("lampFailure", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'lampFailure' field") - } - - // Simple Field (readOrResponse) - if _err := writeBuffer.WriteBit("readOrResponse", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'readOrResponse' field") - } - - // Simple Field (addressIndicator) - if _err := writeBuffer.WriteBit("addressIndicator", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'addressIndicator' field") - } - - // Simple Field (daliDeviceAddressOrDaliGroupAddress) - if _err := writeBuffer.WriteUint8("daliDeviceAddressOrDaliGroupAddress", 6, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'daliDeviceAddressOrDaliGroupAddress' field") - } - case datapointType == KnxDatapointType_DPT_DALI_Diagnostics: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (ballastFailure) - if _err := writeBuffer.WriteBit("ballastFailure", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'ballastFailure' field") - } - - // Simple Field (lampFailure) - if _err := writeBuffer.WriteBit("lampFailure", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'lampFailure' field") - } - - // Simple Field (deviceAddress) - if _err := writeBuffer.WriteUint8("deviceAddress", 6, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'deviceAddress' field") - } - case datapointType == KnxDatapointType_DPT_CombinedPosition: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (heightPosition) - if _err := writeBuffer.WriteUint8("heightPosition", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'heightPosition' field") - } - - // Simple Field (slatsPosition) - if _err := writeBuffer.WriteUint8("slatsPosition", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'slatsPosition' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 6, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (validityHeightPosition) - if _err := writeBuffer.WriteBit("validityHeightPosition", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'validityHeightPosition' field") - } - - // Simple Field (validitySlatsPosition) - if _err := writeBuffer.WriteBit("validitySlatsPosition", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'validitySlatsPosition' field") - } - case datapointType == KnxDatapointType_DPT_StatusSAB: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (heightPosition) - if _err := writeBuffer.WriteUint8("heightPosition", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'heightPosition' field") - } - - // Simple Field (slatsPosition) - if _err := writeBuffer.WriteUint8("slatsPosition", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'slatsPosition' field") - } - - // Simple Field (upperEndPosReached) - if _err := writeBuffer.WriteBit("upperEndPosReached", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'upperEndPosReached' field") - } - - // Simple Field (lowerEndPosReached) - if _err := writeBuffer.WriteBit("lowerEndPosReached", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'lowerEndPosReached' field") - } - - // Simple Field (lowerPredefPosReachedTypHeight100PercentSlatsAngle100Percent) - if _err := writeBuffer.WriteBit("lowerPredefPosReachedTypHeight100PercentSlatsAngle100Percent", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'lowerPredefPosReachedTypHeight100PercentSlatsAngle100Percent' field") - } - - // Simple Field (targetPosDrive) - if _err := writeBuffer.WriteBit("targetPosDrive", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'targetPosDrive' field") - } - - // Simple Field (restrictionOfTargetHeightPosPosCanNotBeReached) - if _err := writeBuffer.WriteBit("restrictionOfTargetHeightPosPosCanNotBeReached", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'restrictionOfTargetHeightPosPosCanNotBeReached' field") - } - - // Simple Field (restrictionOfSlatsHeightPosPosCanNotBeReached) - if _err := writeBuffer.WriteBit("restrictionOfSlatsHeightPosPosCanNotBeReached", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'restrictionOfSlatsHeightPosPosCanNotBeReached' field") - } - - // Simple Field (atLeastOneOfTheInputsWindRainFrostAlarmIsInAlarm) - if _err := writeBuffer.WriteBit("atLeastOneOfTheInputsWindRainFrostAlarmIsInAlarm", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'atLeastOneOfTheInputsWindRainFrostAlarmIsInAlarm' field") - } - - // Simple Field (upDownPositionIsForcedByMoveupdownforcedInput) - if _err := writeBuffer.WriteBit("upDownPositionIsForcedByMoveupdownforcedInput", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'upDownPositionIsForcedByMoveupdownforcedInput' field") - } - - // Simple Field (movementIsLockedEGByDevicelockedInput) - if _err := writeBuffer.WriteBit("movementIsLockedEGByDevicelockedInput", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'movementIsLockedEGByDevicelockedInput' field") - } - - // Simple Field (actuatorSetvalueIsLocallyOverriddenEGViaALocalUserInterface) - if _err := writeBuffer.WriteBit("actuatorSetvalueIsLocallyOverriddenEGViaALocalUserInterface", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'actuatorSetvalueIsLocallyOverriddenEGViaALocalUserInterface' field") - } - - // Simple Field (generalFailureOfTheActuatorOrTheDrive) - if _err := writeBuffer.WriteBit("generalFailureOfTheActuatorOrTheDrive", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'generalFailureOfTheActuatorOrTheDrive' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 3, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (validityHeightPos) - if _err := writeBuffer.WriteBit("validityHeightPos", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'validityHeightPos' field") - } - - // Simple Field (validitySlatsPos) - if _err := writeBuffer.WriteBit("validitySlatsPos", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'validitySlatsPos' field") - } - case datapointType == KnxDatapointType_DPT_Colour_xyY: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (xAxis) - if _err := writeBuffer.WriteUint16("xAxis", 16, value.GetUint16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'xAxis' field") - } - - // Simple Field (yAxis) - if _err := writeBuffer.WriteUint16("yAxis", 16, value.GetUint16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'yAxis' field") - } - - // Simple Field (brightness) - if _err := writeBuffer.WriteUint8("brightness", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'brightness' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 6, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (validityXy) - if _err := writeBuffer.WriteBit("validityXy", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'validityXy' field") - } - - // Simple Field (validityBrightness) - if _err := writeBuffer.WriteBit("validityBrightness", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'validityBrightness' field") - } - case datapointType == KnxDatapointType_DPT_Converter_Status: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (converterModeAccordingToTheDaliConverterStateMachine) - if _err := writeBuffer.WriteUint8("converterModeAccordingToTheDaliConverterStateMachine", 4, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'converterModeAccordingToTheDaliConverterStateMachine' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 2, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (hardwiredSwitchIsActive) - if _err := writeBuffer.WriteBit("hardwiredSwitchIsActive", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'hardwiredSwitchIsActive' field") - } - - // Simple Field (hardwiredInhibitIsActive) - if _err := writeBuffer.WriteBit("hardwiredInhibitIsActive", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'hardwiredInhibitIsActive' field") - } - - // Simple Field (functionTestPending) - if _err := writeBuffer.WriteUint8("functionTestPending", 2, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'functionTestPending' field") - } - - // Simple Field (durationTestPending) - if _err := writeBuffer.WriteUint8("durationTestPending", 2, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'durationTestPending' field") - } - - // Simple Field (partialDurationTestPending) - if _err := writeBuffer.WriteUint8("partialDurationTestPending", 2, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'partialDurationTestPending' field") - } - - // Simple Field (converterFailure) - if _err := writeBuffer.WriteUint8("converterFailure", 2, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'converterFailure' field") - } - case datapointType == KnxDatapointType_DPT_Converter_Test_Result: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (ltrf) - if _err := writeBuffer.WriteUint8("ltrf", 4, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'ltrf' field") - } - - // Simple Field (ltrd) - if _err := writeBuffer.WriteUint8("ltrd", 4, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'ltrd' field") - } - - // Simple Field (ltrp) - if _err := writeBuffer.WriteUint8("ltrp", 4, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'ltrp' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (sf) - if _err := writeBuffer.WriteUint8("sf", 2, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'sf' field") - } - - // Simple Field (sd) - if _err := writeBuffer.WriteUint8("sd", 2, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'sd' field") - } - - // Simple Field (sp) - if _err := writeBuffer.WriteUint8("sp", 2, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'sp' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 2, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (ldtr) - if _err := writeBuffer.WriteUint16("ldtr", 16, value.GetUint16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'ldtr' field") - } - - // Simple Field (lpdtr) - if _err := writeBuffer.WriteUint8("lpdtr", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'lpdtr' field") - } - case datapointType == KnxDatapointType_DPT_Battery_Info: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 5, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (batteryFailure) - if _err := writeBuffer.WriteBit("batteryFailure", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'batteryFailure' field") - } - - // Simple Field (batteryDurationFailure) - if _err := writeBuffer.WriteBit("batteryDurationFailure", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'batteryDurationFailure' field") - } - - // Simple Field (batteryFullyCharged) - if _err := writeBuffer.WriteBit("batteryFullyCharged", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'batteryFullyCharged' field") - } - - // Simple Field (batteryChargeLevel) - if _err := writeBuffer.WriteUint8("batteryChargeLevel", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'batteryChargeLevel' field") - } - case datapointType == KnxDatapointType_DPT_Brightness_Colour_Temperature_Transition: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (ms) - if _err := writeBuffer.WriteUint16("ms", 16, value.GetUint16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'ms' field") - } - - // Simple Field (temperatureK) - if _err := writeBuffer.WriteUint16("temperatureK", 16, value.GetUint16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'temperatureK' field") - } - - // Simple Field (percent) - if _err := writeBuffer.WriteUint8("percent", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'percent' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 5, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (validityOfTheTimePeriod) - if _err := writeBuffer.WriteBit("validityOfTheTimePeriod", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'validityOfTheTimePeriod' field") - } - - // Simple Field (validityOfTheAbsoluteColourTemperature) - if _err := writeBuffer.WriteBit("validityOfTheAbsoluteColourTemperature", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'validityOfTheAbsoluteColourTemperature' field") - } - - // Simple Field (validityOfTheAbsoluteBrightness) - if _err := writeBuffer.WriteBit("validityOfTheAbsoluteBrightness", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'validityOfTheAbsoluteBrightness' field") - } - case datapointType == KnxDatapointType_DPT_Brightness_Colour_Temperature_Control: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (cct) - if _err := writeBuffer.WriteBit("cct", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'cct' field") - } - - // Simple Field (stepCodeColourTemperature) - if _err := writeBuffer.WriteUint8("stepCodeColourTemperature", 3, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'stepCodeColourTemperature' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (cb) - if _err := writeBuffer.WriteBit("cb", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'cb' field") - } - - // Simple Field (stepCodeBrightness) - if _err := writeBuffer.WriteUint8("stepCodeBrightness", 3, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'stepCodeBrightness' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 6, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (cctAndStepCodeColourValidity) - if _err := writeBuffer.WriteBit("cctAndStepCodeColourValidity", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'cctAndStepCodeColourValidity' field") - } - - // Simple Field (cbAndStepCodeBrightnessValidity) - if _err := writeBuffer.WriteBit("cbAndStepCodeBrightnessValidity", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'cbAndStepCodeBrightnessValidity' field") - } - case datapointType == KnxDatapointType_DPT_Colour_RGBW: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (colourLevelRed) - if _err := writeBuffer.WriteUint8("colourLevelRed", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'colourLevelRed' field") - } - - // Simple Field (colourLevelGreen) - if _err := writeBuffer.WriteUint8("colourLevelGreen", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'colourLevelGreen' field") - } - - // Simple Field (colourLevelBlue) - if _err := writeBuffer.WriteUint8("colourLevelBlue", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'colourLevelBlue' field") - } - - // Simple Field (colourLevelWhite) - if _err := writeBuffer.WriteUint8("colourLevelWhite", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'colourLevelWhite' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (mr) - if _err := writeBuffer.WriteBit("mr", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'mr' field") - } - - // Simple Field (mg) - if _err := writeBuffer.WriteBit("mg", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'mg' field") - } - - // Simple Field (mb) - if _err := writeBuffer.WriteBit("mb", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'mb' field") - } - - // Simple Field (mw) - if _err := writeBuffer.WriteBit("mw", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'mw' field") - } - case datapointType == KnxDatapointType_DPT_Relative_Control_RGBW: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (maskcw) - if _err := writeBuffer.WriteBit("maskcw", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'maskcw' field") - } - - // Simple Field (maskcb) - if _err := writeBuffer.WriteBit("maskcb", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'maskcb' field") - } - - // Simple Field (maskcg) - if _err := writeBuffer.WriteBit("maskcg", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'maskcg' field") - } - - // Simple Field (maskcr) - if _err := writeBuffer.WriteBit("maskcr", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'maskcr' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (cw) - if _err := writeBuffer.WriteBit("cw", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'cw' field") - } - - // Simple Field (stepCodeColourWhite) - if _err := writeBuffer.WriteUint8("stepCodeColourWhite", 3, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'stepCodeColourWhite' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (cb) - if _err := writeBuffer.WriteBit("cb", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'cb' field") - } - - // Simple Field (stepCodeColourBlue) - if _err := writeBuffer.WriteUint8("stepCodeColourBlue", 3, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'stepCodeColourBlue' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (cg) - if _err := writeBuffer.WriteBit("cg", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'cg' field") - } - - // Simple Field (stepCodeColourGreen) - if _err := writeBuffer.WriteUint8("stepCodeColourGreen", 3, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'stepCodeColourGreen' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (cr) - if _err := writeBuffer.WriteBit("cr", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'cr' field") - } - - // Simple Field (stepCodeColourRed) - if _err := writeBuffer.WriteUint8("stepCodeColourRed", 3, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'stepCodeColourRed' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - case datapointType == KnxDatapointType_DPT_Relative_Control_RGB: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (cb) - if _err := writeBuffer.WriteBit("cb", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'cb' field") - } - - // Simple Field (stepCodeColourBlue) - if _err := writeBuffer.WriteUint8("stepCodeColourBlue", 3, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'stepCodeColourBlue' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (cg) - if _err := writeBuffer.WriteBit("cg", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'cg' field") - } - - // Simple Field (stepCodeColourGreen) - if _err := writeBuffer.WriteUint8("stepCodeColourGreen", 3, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'stepCodeColourGreen' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (cr) - if _err := writeBuffer.WriteBit("cr", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'cr' field") - } - - // Simple Field (stepCodeColourRed) - if _err := writeBuffer.WriteUint8("stepCodeColourRed", 3, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'stepCodeColourRed' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - case datapointType == KnxDatapointType_DPT_GeographicalLocation: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (longitude) - if _err := writeBuffer.WriteFloat32("longitude", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'longitude' field") - } - - // Simple Field (latitude) - if _err := writeBuffer.WriteFloat32("latitude", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'latitude' field") - } - case datapointType == KnxDatapointType_DPT_TempRoomSetpSetF16_4: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (roomTemperatureSetpointComfort) - if _err := writeBuffer.WriteFloat32("roomTemperatureSetpointComfort", 16, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'roomTemperatureSetpointComfort' field") - } - - // Simple Field (roomTemperatureSetpointStandby) - if _err := writeBuffer.WriteFloat32("roomTemperatureSetpointStandby", 16, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'roomTemperatureSetpointStandby' field") - } - - // Simple Field (roomTemperatureSetpointEconomy) - if _err := writeBuffer.WriteFloat32("roomTemperatureSetpointEconomy", 16, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'roomTemperatureSetpointEconomy' field") - } - - // Simple Field (roomTemperatureSetpointBuildingProtection) - if _err := writeBuffer.WriteFloat32("roomTemperatureSetpointBuildingProtection", 16, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'roomTemperatureSetpointBuildingProtection' field") - } - case datapointType == KnxDatapointType_DPT_TempRoomSetpSetShiftF16_4: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (roomTemperatureSetpointShiftComfort) - if _err := writeBuffer.WriteFloat32("roomTemperatureSetpointShiftComfort", 16, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'roomTemperatureSetpointShiftComfort' field") - } - - // Simple Field (roomTemperatureSetpointShiftStandby) - if _err := writeBuffer.WriteFloat32("roomTemperatureSetpointShiftStandby", 16, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'roomTemperatureSetpointShiftStandby' field") - } - - // Simple Field (roomTemperatureSetpointShiftEconomy) - if _err := writeBuffer.WriteFloat32("roomTemperatureSetpointShiftEconomy", 16, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'roomTemperatureSetpointShiftEconomy' field") - } - - // Simple Field (roomTemperatureSetpointShiftBuildingProtection) - if _err := writeBuffer.WriteFloat32("roomTemperatureSetpointShiftBuildingProtection", 16, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'roomTemperatureSetpointShiftBuildingProtection' field") - } - default: - // TODO: add more info which type it is actually - return errors.New("unsupported type") +case datapointType == KnxDatapointType_BOOL : // BOOL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_BYTE : // BYTE + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_WORD : // WORD + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DWORD : // DWORD + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint32("value", 32, value.GetUint32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_LWORD : // LWORD + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint64("value", 64, value.GetUint64()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_USINT : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_SINT : // SINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteInt8("value", 8, value.GetInt8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_UINT : // UINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_INT : // INT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteInt16("value", 16, value.GetInt16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_UDINT : // UDINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint32("value", 32, value.GetUint32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DINT : // DINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteInt32("value", 32, value.GetInt32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_ULINT : // ULINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint64("value", 64, value.GetUint64()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_LINT : // LINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteInt64("value", 64, value.GetInt64()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_REAL : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_LREAL : // LREAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat64("value", 64, value.GetFloat64()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_CHAR : // CHAR + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteString("value", uint32(8), "UTF-8", value.GetString()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_WCHAR : // WCHAR + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteString("value", uint32(16), "UTF-16", value.GetString()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_TIME : // TIME + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (milliseconds) + if _err := writeBuffer.WriteUint32("milliseconds", 32, value.(values.PlcTIME).GetMilliseconds()); _err != nil { + return errors.Wrap(_err, "Error serializing 'milliseconds' field") + } +case datapointType == KnxDatapointType_LTIME : // LTIME + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (nanoseconds) + if _err := writeBuffer.WriteUint64("nanoseconds", 64, value.(values.PlcLTIME).GetNanoseconds()); _err != nil { + return errors.Wrap(_err, "Error serializing 'nanoseconds' field") + } +case datapointType == KnxDatapointType_DATE : // DATE + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (secondsSinceEpoch) + if _err := writeBuffer.WriteUint32("secondsSinceEpoch", 32, value.(values.PlcDATE).GetSecondsSinceEpoch()); _err != nil { + return errors.Wrap(_err, "Error serializing 'secondsSinceEpoch' field") + } +case datapointType == KnxDatapointType_TIME_OF_DAY : // TIME_OF_DAY + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (millisecondsSinceMidnight) + if _err := writeBuffer.WriteUint32("millisecondsSinceMidnight", 32, value.(values.PlcTIME_OF_DAY).GetMillisecondsSinceMidnight()); _err != nil { + return errors.Wrap(_err, "Error serializing 'millisecondsSinceMidnight' field") + } +case datapointType == KnxDatapointType_TOD : // TIME_OF_DAY + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (millisecondsSinceMidnight) + if _err := writeBuffer.WriteUint32("millisecondsSinceMidnight", 32, value.(values.PlcTIME_OF_DAY).GetMillisecondsSinceMidnight()); _err != nil { + return errors.Wrap(_err, "Error serializing 'millisecondsSinceMidnight' field") + } +case datapointType == KnxDatapointType_DATE_AND_TIME : // DATE_AND_TIME + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (year) + if _err := writeBuffer.WriteUint16("year", 16, value.(values.PlcDATE_AND_TIME).GetYear()); _err != nil { + return errors.Wrap(_err, "Error serializing 'year' field") + } + + // Simple Field (month) + if _err := writeBuffer.WriteUint8("month", 8, value.(values.PlcDATE_AND_TIME).GetMonth()); _err != nil { + return errors.Wrap(_err, "Error serializing 'month' field") + } + + // Simple Field (day) + if _err := writeBuffer.WriteUint8("day", 8, value.(values.PlcDATE_AND_TIME).GetDay()); _err != nil { + return errors.Wrap(_err, "Error serializing 'day' field") + } + + // Simple Field (dayOfWeek) + if _err := writeBuffer.WriteUint8("dayOfWeek", 8, value.(values.PlcDATE_AND_TIME).GetDayOfWeek()); _err != nil { + return errors.Wrap(_err, "Error serializing 'dayOfWeek' field") + } + + // Simple Field (hour) + if _err := writeBuffer.WriteUint8("hour", 8, value.(values.PlcDATE_AND_TIME).GetHour()); _err != nil { + return errors.Wrap(_err, "Error serializing 'hour' field") + } + + // Simple Field (minutes) + if _err := writeBuffer.WriteUint8("minutes", 8, value.(values.PlcDATE_AND_TIME).GetMinutes()); _err != nil { + return errors.Wrap(_err, "Error serializing 'minutes' field") + } + + // Simple Field (seconds) + if _err := writeBuffer.WriteUint8("seconds", 8, value.(values.PlcDATE_AND_TIME).GetSeconds()); _err != nil { + return errors.Wrap(_err, "Error serializing 'seconds' field") + } + + // Simple Field (nanoseconds) + if _err := writeBuffer.WriteUint32("nanoseconds", 32, value.(values.PlcDATE_AND_TIME).GetNanoseconds()); _err != nil { + return errors.Wrap(_err, "Error serializing 'nanoseconds' field") + } +case datapointType == KnxDatapointType_DT : // DATE_AND_TIME + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (year) + if _err := writeBuffer.WriteUint16("year", 16, value.(values.PlcDATE_AND_TIME).GetYear()); _err != nil { + return errors.Wrap(_err, "Error serializing 'year' field") + } + + // Simple Field (month) + if _err := writeBuffer.WriteUint8("month", 8, value.(values.PlcDATE_AND_TIME).GetMonth()); _err != nil { + return errors.Wrap(_err, "Error serializing 'month' field") + } + + // Simple Field (day) + if _err := writeBuffer.WriteUint8("day", 8, value.(values.PlcDATE_AND_TIME).GetDay()); _err != nil { + return errors.Wrap(_err, "Error serializing 'day' field") + } + + // Simple Field (dayOfWeek) + if _err := writeBuffer.WriteUint8("dayOfWeek", 8, value.(values.PlcDATE_AND_TIME).GetDayOfWeek()); _err != nil { + return errors.Wrap(_err, "Error serializing 'dayOfWeek' field") + } + + // Simple Field (hour) + if _err := writeBuffer.WriteUint8("hour", 8, value.(values.PlcDATE_AND_TIME).GetHour()); _err != nil { + return errors.Wrap(_err, "Error serializing 'hour' field") + } + + // Simple Field (minutes) + if _err := writeBuffer.WriteUint8("minutes", 8, value.(values.PlcDATE_AND_TIME).GetMinutes()); _err != nil { + return errors.Wrap(_err, "Error serializing 'minutes' field") + } + + // Simple Field (seconds) + if _err := writeBuffer.WriteUint8("seconds", 8, value.(values.PlcDATE_AND_TIME).GetSeconds()); _err != nil { + return errors.Wrap(_err, "Error serializing 'seconds' field") + } + + // Simple Field (nanoseconds) + if _err := writeBuffer.WriteUint32("nanoseconds", 32, value.(values.PlcDATE_AND_TIME).GetNanoseconds()); _err != nil { + return errors.Wrap(_err, "Error serializing 'nanoseconds' field") + } +case datapointType == KnxDatapointType_DPT_Switch : // BOOL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Bool : // BOOL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Enable : // BOOL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Ramp : // BOOL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Alarm : // BOOL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_BinaryValue : // BOOL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Step : // BOOL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_UpDown : // BOOL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_OpenClose : // BOOL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Start : // BOOL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_State : // BOOL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Invert : // BOOL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_DimSendStyle : // BOOL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_InputSource : // BOOL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Reset : // BOOL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Ack : // BOOL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Trigger : // BOOL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Occupancy : // BOOL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Window_Door : // BOOL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_LogicalFunction : // BOOL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Scene_AB : // BOOL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_ShutterBlinds_Mode : // BOOL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_DayNight : // BOOL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Heat_Cool : // BOOL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Switch_Control : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 6, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (control) + if _err := writeBuffer.WriteBit("control", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'control' field") + } + + // Simple Field (on) + if _err := writeBuffer.WriteBit("on", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'on' field") + } +case datapointType == KnxDatapointType_DPT_Bool_Control : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 6, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (control) + if _err := writeBuffer.WriteBit("control", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'control' field") + } + + // Simple Field (valueTrue) + if _err := writeBuffer.WriteBit("valueTrue", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'valueTrue' field") + } +case datapointType == KnxDatapointType_DPT_Enable_Control : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 6, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (control) + if _err := writeBuffer.WriteBit("control", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'control' field") + } + + // Simple Field (enable) + if _err := writeBuffer.WriteBit("enable", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'enable' field") + } +case datapointType == KnxDatapointType_DPT_Ramp_Control : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 6, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (control) + if _err := writeBuffer.WriteBit("control", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'control' field") + } + + // Simple Field (ramp) + if _err := writeBuffer.WriteBit("ramp", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'ramp' field") + } +case datapointType == KnxDatapointType_DPT_Alarm_Control : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 6, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (control) + if _err := writeBuffer.WriteBit("control", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'control' field") + } + + // Simple Field (alarm) + if _err := writeBuffer.WriteBit("alarm", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'alarm' field") + } +case datapointType == KnxDatapointType_DPT_BinaryValue_Control : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 6, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (control) + if _err := writeBuffer.WriteBit("control", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'control' field") + } + + // Simple Field (high) + if _err := writeBuffer.WriteBit("high", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'high' field") + } +case datapointType == KnxDatapointType_DPT_Step_Control : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 6, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (control) + if _err := writeBuffer.WriteBit("control", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'control' field") + } + + // Simple Field (increase) + if _err := writeBuffer.WriteBit("increase", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'increase' field") + } +case datapointType == KnxDatapointType_DPT_Direction1_Control : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 6, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (control) + if _err := writeBuffer.WriteBit("control", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'control' field") + } + + // Simple Field (down) + if _err := writeBuffer.WriteBit("down", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'down' field") + } +case datapointType == KnxDatapointType_DPT_Direction2_Control : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 6, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (control) + if _err := writeBuffer.WriteBit("control", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'control' field") + } + + // Simple Field (close) + if _err := writeBuffer.WriteBit("close", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'close' field") + } +case datapointType == KnxDatapointType_DPT_Start_Control : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 6, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (control) + if _err := writeBuffer.WriteBit("control", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'control' field") + } + + // Simple Field (start) + if _err := writeBuffer.WriteBit("start", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'start' field") + } +case datapointType == KnxDatapointType_DPT_State_Control : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 6, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (control) + if _err := writeBuffer.WriteBit("control", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'control' field") + } + + // Simple Field (active) + if _err := writeBuffer.WriteBit("active", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'active' field") + } +case datapointType == KnxDatapointType_DPT_Invert_Control : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 6, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (control) + if _err := writeBuffer.WriteBit("control", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'control' field") + } + + // Simple Field (inverted) + if _err := writeBuffer.WriteBit("inverted", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'inverted' field") + } +case datapointType == KnxDatapointType_DPT_Control_Dimming : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (increase) + if _err := writeBuffer.WriteBit("increase", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'increase' field") + } + + // Simple Field (stepcode) + if _err := writeBuffer.WriteUint8("stepcode", 3, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'stepcode' field") + } +case datapointType == KnxDatapointType_DPT_Control_Blinds : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (down) + if _err := writeBuffer.WriteBit("down", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'down' field") + } + + // Simple Field (stepcode) + if _err := writeBuffer.WriteUint8("stepcode", 3, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'stepcode' field") + } +case datapointType == KnxDatapointType_DPT_Char_ASCII : // STRING + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteString("value", uint32(8), "ASCII", value.GetString()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Char_8859_1 : // STRING + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteString("value", uint32(8), "ISO-8859-1", value.GetString()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Scaling : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Angle : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Percent_U8 : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_DecimalFactor : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Tariff : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_1_Ucount : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_FanStage : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Percent_V8 : // SINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteInt8("value", 8, value.GetInt8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_1_Count : // SINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteInt8("value", 8, value.GetInt8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Status_Mode3 : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (statusA) + if _err := writeBuffer.WriteBit("statusA", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'statusA' field") + } + + // Simple Field (statusB) + if _err := writeBuffer.WriteBit("statusB", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'statusB' field") + } + + // Simple Field (statusC) + if _err := writeBuffer.WriteBit("statusC", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'statusC' field") + } + + // Simple Field (statusD) + if _err := writeBuffer.WriteBit("statusD", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'statusD' field") + } + + // Simple Field (statusE) + if _err := writeBuffer.WriteBit("statusE", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'statusE' field") + } + + // Simple Field (mode) + if _err := writeBuffer.WriteUint8("mode", 3, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'mode' field") + } +case datapointType == KnxDatapointType_DPT_Value_2_Ucount : // UINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_TimePeriodMsec : // UINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_TimePeriod10Msec : // UINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_TimePeriod100Msec : // UINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_TimePeriodSec : // UINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_TimePeriodMin : // UINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_TimePeriodHrs : // UINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_PropDataType : // UINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Length_mm : // UINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_UElCurrentmA : // UINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Brightness : // UINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Absolute_Colour_Temperature : // UINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_2_Count : // INT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteInt16("value", 16, value.GetInt16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_DeltaTimeMsec : // INT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteInt16("value", 16, value.GetInt16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_DeltaTime10Msec : // INT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteInt16("value", 16, value.GetInt16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_DeltaTime100Msec : // INT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteInt16("value", 16, value.GetInt16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_DeltaTimeSec : // INT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteInt16("value", 16, value.GetInt16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_DeltaTimeMin : // INT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteInt16("value", 16, value.GetInt16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_DeltaTimeHrs : // INT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteInt16("value", 16, value.GetInt16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Percent_V16 : // INT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteInt16("value", 16, value.GetInt16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Rotation_Angle : // INT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteInt16("value", 16, value.GetInt16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Length_m : // INT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteInt16("value", 16, value.GetInt16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Temp : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Tempd : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Tempa : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Lux : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Wsp : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Pres : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Humidity : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_AirQuality : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_AirFlow : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Time1 : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Time2 : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Volt : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Curr : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_PowerDensity : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_KelvinPerPercent : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Power : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Volume_Flow : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Rain_Amount : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Temp_F : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Wsp_kmh : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Absolute_Humidity : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Concentration_ygm3 : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_TimeOfDay : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (day) + if _err := writeBuffer.WriteUint8("day", 3, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'day' field") + } + + // Simple Field (hour) + if _err := writeBuffer.WriteUint8("hour", 5, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'hour' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 2, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (minutes) + if _err := writeBuffer.WriteUint8("minutes", 6, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'minutes' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 2, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (seconds) + if _err := writeBuffer.WriteUint8("seconds", 6, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'seconds' field") + } +case datapointType == KnxDatapointType_DPT_Date : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 3, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (dayOfMonth) + if _err := writeBuffer.WriteUint8("dayOfMonth", 5, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'dayOfMonth' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (month) + if _err := writeBuffer.WriteUint8("month", 4, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'month' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 1, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (year) + if _err := writeBuffer.WriteUint8("year", 7, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'year' field") + } +case datapointType == KnxDatapointType_DPT_Value_4_Ucount : // UDINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint32("value", 32, value.GetUint32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_LongTimePeriod_Sec : // UDINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint32("value", 32, value.GetUint32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_LongTimePeriod_Min : // UDINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint32("value", 32, value.GetUint32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_LongTimePeriod_Hrs : // UDINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint32("value", 32, value.GetUint32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_VolumeLiquid_Litre : // UDINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint32("value", 32, value.GetUint32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Volume_m_3 : // UDINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint32("value", 32, value.GetUint32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_4_Count : // DINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteInt32("value", 32, value.GetInt32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_FlowRate_m3h : // DINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteInt32("value", 32, value.GetInt32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_ActiveEnergy : // DINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteInt32("value", 32, value.GetInt32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_ApparantEnergy : // DINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteInt32("value", 32, value.GetInt32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_ReactiveEnergy : // DINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteInt32("value", 32, value.GetInt32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_ActiveEnergy_kWh : // DINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteInt32("value", 32, value.GetInt32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_ApparantEnergy_kVAh : // DINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteInt32("value", 32, value.GetInt32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_ReactiveEnergy_kVARh : // DINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteInt32("value", 32, value.GetInt32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_ActiveEnergy_MWh : // DINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteInt32("value", 32, value.GetInt32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_LongDeltaTimeSec : // DINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteInt32("value", 32, value.GetInt32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_DeltaVolumeLiquid_Litre : // DINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteInt32("value", 32, value.GetInt32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_DeltaVolume_m_3 : // DINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteInt32("value", 32, value.GetInt32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Acceleration : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Acceleration_Angular : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Activation_Energy : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Activity : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Mol : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Amplitude : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_AngleRad : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_AngleDeg : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Angular_Momentum : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Angular_Velocity : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Area : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Capacitance : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Charge_DensitySurface : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Charge_DensityVolume : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Compressibility : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Conductance : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Electrical_Conductivity : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Density : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Electric_Charge : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Electric_Current : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Electric_CurrentDensity : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Electric_DipoleMoment : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Electric_Displacement : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Electric_FieldStrength : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Electric_Flux : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Electric_FluxDensity : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Electric_Polarization : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Electric_Potential : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Electric_PotentialDifference : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_ElectromagneticMoment : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Electromotive_Force : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Energy : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Force : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Frequency : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Angular_Frequency : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Heat_Capacity : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Heat_FlowRate : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Heat_Quantity : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Impedance : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Length : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Light_Quantity : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Luminance : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Luminous_Flux : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Luminous_Intensity : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Magnetic_FieldStrength : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Magnetic_Flux : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Magnetic_FluxDensity : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Magnetic_Moment : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Magnetic_Polarization : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Magnetization : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_MagnetomotiveForce : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Mass : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_MassFlux : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Momentum : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Phase_AngleRad : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Phase_AngleDeg : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Power : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Power_Factor : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Pressure : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Reactance : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Resistance : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Resistivity : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_SelfInductance : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_SolidAngle : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Sound_Intensity : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Speed : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Stress : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Surface_Tension : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Common_Temperature : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Absolute_Temperature : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_TemperatureDifference : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Thermal_Capacity : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Thermal_Conductivity : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_ThermoelectricPower : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Time : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Torque : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Volume : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Volume_Flux : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Weight : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_Work : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Value_ApparentPower : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Volume_Flux_Meter : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Volume_Flux_ls : // REAL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Access_Data : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (hurz) + if _err := writeBuffer.WriteUint8("hurz", 4, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'hurz' field") + } + + // Simple Field (value1) + if _err := writeBuffer.WriteUint8("value1", 4, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value1' field") + } + + // Simple Field (value2) + if _err := writeBuffer.WriteUint8("value2", 4, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value2' field") + } + + // Simple Field (value3) + if _err := writeBuffer.WriteUint8("value3", 4, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value3' field") + } + + // Simple Field (value4) + if _err := writeBuffer.WriteUint8("value4", 4, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value4' field") + } + + // Simple Field (value5) + if _err := writeBuffer.WriteUint8("value5", 4, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value5' field") + } + + // Simple Field (detectionError) + if _err := writeBuffer.WriteBit("detectionError", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'detectionError' field") + } + + // Simple Field (permission) + if _err := writeBuffer.WriteBit("permission", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'permission' field") + } + + // Simple Field (readDirection) + if _err := writeBuffer.WriteBit("readDirection", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'readDirection' field") + } + + // Simple Field (encryptionOfAccessInformation) + if _err := writeBuffer.WriteBit("encryptionOfAccessInformation", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'encryptionOfAccessInformation' field") + } + + // Simple Field (indexOfAccessIdentificationCode) + if _err := writeBuffer.WriteUint8("indexOfAccessIdentificationCode", 4, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'indexOfAccessIdentificationCode' field") + } +case datapointType == KnxDatapointType_DPT_String_ASCII : // STRING + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteString("value", uint32(112), "ASCII", value.GetString()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_String_8859_1 : // STRING + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteString("value", uint32(112), "ISO-8859-1", value.GetString()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_SceneNumber : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 2, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 6, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_SceneControl : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (learnTheSceneCorrespondingToTheFieldSceneNumber) + if _err := writeBuffer.WriteBit("learnTheSceneCorrespondingToTheFieldSceneNumber", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'learnTheSceneCorrespondingToTheFieldSceneNumber' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 1, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (sceneNumber) + if _err := writeBuffer.WriteUint8("sceneNumber", 6, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'sceneNumber' field") + } +case datapointType == KnxDatapointType_DPT_DateTime : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (year) + if _err := writeBuffer.WriteUint8("year", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'year' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (month) + if _err := writeBuffer.WriteUint8("month", 4, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'month' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 3, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (dayofmonth) + if _err := writeBuffer.WriteUint8("dayofmonth", 5, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'dayofmonth' field") + } + + // Simple Field (dayofweek) + if _err := writeBuffer.WriteUint8("dayofweek", 3, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'dayofweek' field") + } + + // Simple Field (hourofday) + if _err := writeBuffer.WriteUint8("hourofday", 5, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'hourofday' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 2, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (minutes) + if _err := writeBuffer.WriteUint8("minutes", 6, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'minutes' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 2, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (seconds) + if _err := writeBuffer.WriteUint8("seconds", 6, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'seconds' field") + } + + // Simple Field (fault) + if _err := writeBuffer.WriteBit("fault", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'fault' field") + } + + // Simple Field (workingDay) + if _err := writeBuffer.WriteBit("workingDay", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'workingDay' field") + } + + // Simple Field (noWd) + if _err := writeBuffer.WriteBit("noWd", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'noWd' field") + } + + // Simple Field (noYear) + if _err := writeBuffer.WriteBit("noYear", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'noYear' field") + } + + // Simple Field (noDate) + if _err := writeBuffer.WriteBit("noDate", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'noDate' field") + } + + // Simple Field (noDayOfWeek) + if _err := writeBuffer.WriteBit("noDayOfWeek", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'noDayOfWeek' field") + } + + // Simple Field (noTime) + if _err := writeBuffer.WriteBit("noTime", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'noTime' field") + } + + // Simple Field (standardSummerTime) + if _err := writeBuffer.WriteBit("standardSummerTime", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'standardSummerTime' field") + } + + // Simple Field (qualityOfClock) + if _err := writeBuffer.WriteBit("qualityOfClock", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'qualityOfClock' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } +case datapointType == KnxDatapointType_DPT_SCLOMode : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_BuildingMode : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_OccMode : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Priority : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_LightApplicationMode : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_ApplicationArea : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_AlarmClassType : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_PSUMode : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_ErrorClass_System : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_ErrorClass_HVAC : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Time_Delay : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Beaufort_Wind_Force_Scale : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_SensorSelect : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_ActuatorConnectType : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Cloud_Cover : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_PowerReturnMode : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_FuelType : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_BurnerType : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_HVACMode : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_DHWMode : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_LoadPriority : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_HVACContrMode : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_HVACEmergMode : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_ChangeoverMode : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_ValveMode : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_DamperMode : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_HeaterMode : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_FanMode : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_MasterSlaveMode : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_StatusRoomSetp : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Metering_DeviceType : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_HumDehumMode : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_EnableHCStage : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_ADAType : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_BackupMode : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_StartSynchronization : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Behaviour_Lock_Unlock : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Behaviour_Bus_Power_Up_Down : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_DALI_Fade_Time : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_BlinkingMode : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_LightControlMode : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_SwitchPBModel : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_PBAction : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_DimmPBModel : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_SwitchOnMode : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_LoadTypeSet : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_LoadTypeDetected : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Converter_Test_Control : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_SABExcept_Behaviour : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_SABBehaviour_Lock_Unlock : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_SSSBMode : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_BlindsControlMode : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_CommMode : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_AddInfoTypes : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_RF_ModeSelect : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_RF_FilterSelect : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_StatusGen : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 3, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (alarmStatusOfCorrespondingDatapointIsNotAcknowledged) + if _err := writeBuffer.WriteBit("alarmStatusOfCorrespondingDatapointIsNotAcknowledged", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'alarmStatusOfCorrespondingDatapointIsNotAcknowledged' field") + } + + // Simple Field (correspondingDatapointIsInAlarm) + if _err := writeBuffer.WriteBit("correspondingDatapointIsInAlarm", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'correspondingDatapointIsInAlarm' field") + } + + // Simple Field (correspondingDatapointMainValueIsOverridden) + if _err := writeBuffer.WriteBit("correspondingDatapointMainValueIsOverridden", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'correspondingDatapointMainValueIsOverridden' field") + } + + // Simple Field (correspondingDatapointMainValueIsCorruptedDueToFailure) + if _err := writeBuffer.WriteBit("correspondingDatapointMainValueIsCorruptedDueToFailure", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'correspondingDatapointMainValueIsCorruptedDueToFailure' field") + } + + // Simple Field (correspondingDatapointValueIsOutOfService) + if _err := writeBuffer.WriteBit("correspondingDatapointValueIsOutOfService", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'correspondingDatapointValueIsOutOfService' field") + } +case datapointType == KnxDatapointType_DPT_Device_Control : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 5, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (verifyModeIsOn) + if _err := writeBuffer.WriteBit("verifyModeIsOn", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'verifyModeIsOn' field") + } + + // Simple Field (aDatagramWithTheOwnIndividualAddressAsSourceAddressHasBeenReceived) + if _err := writeBuffer.WriteBit("aDatagramWithTheOwnIndividualAddressAsSourceAddressHasBeenReceived", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'aDatagramWithTheOwnIndividualAddressAsSourceAddressHasBeenReceived' field") + } + + // Simple Field (theUserApplicationIsStopped) + if _err := writeBuffer.WriteBit("theUserApplicationIsStopped", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'theUserApplicationIsStopped' field") + } +case datapointType == KnxDatapointType_DPT_ForceSign : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (roomhmax) + if _err := writeBuffer.WriteBit("roomhmax", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'roomhmax' field") + } + + // Simple Field (roomhconf) + if _err := writeBuffer.WriteBit("roomhconf", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'roomhconf' field") + } + + // Simple Field (dhwlegio) + if _err := writeBuffer.WriteBit("dhwlegio", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'dhwlegio' field") + } + + // Simple Field (dhwnorm) + if _err := writeBuffer.WriteBit("dhwnorm", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'dhwnorm' field") + } + + // Simple Field (overrun) + if _err := writeBuffer.WriteBit("overrun", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'overrun' field") + } + + // Simple Field (oversupply) + if _err := writeBuffer.WriteBit("oversupply", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'oversupply' field") + } + + // Simple Field (protection) + if _err := writeBuffer.WriteBit("protection", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'protection' field") + } + + // Simple Field (forcerequest) + if _err := writeBuffer.WriteBit("forcerequest", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'forcerequest' field") + } +case datapointType == KnxDatapointType_DPT_ForceSignCool : // BOOL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_StatusRHC : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (summermode) + if _err := writeBuffer.WriteBit("summermode", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'summermode' field") + } + + // Simple Field (statusstopoptim) + if _err := writeBuffer.WriteBit("statusstopoptim", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'statusstopoptim' field") + } + + // Simple Field (statusstartoptim) + if _err := writeBuffer.WriteBit("statusstartoptim", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'statusstartoptim' field") + } + + // Simple Field (statusmorningboost) + if _err := writeBuffer.WriteBit("statusmorningboost", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'statusmorningboost' field") + } + + // Simple Field (tempreturnlimit) + if _err := writeBuffer.WriteBit("tempreturnlimit", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'tempreturnlimit' field") + } + + // Simple Field (tempflowlimit) + if _err := writeBuffer.WriteBit("tempflowlimit", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'tempflowlimit' field") + } + + // Simple Field (satuseco) + if _err := writeBuffer.WriteBit("satuseco", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'satuseco' field") + } + + // Simple Field (fault) + if _err := writeBuffer.WriteBit("fault", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'fault' field") + } +case datapointType == KnxDatapointType_DPT_StatusSDHWC : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 5, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (solarloadsufficient) + if _err := writeBuffer.WriteBit("solarloadsufficient", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'solarloadsufficient' field") + } + + // Simple Field (sdhwloadactive) + if _err := writeBuffer.WriteBit("sdhwloadactive", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'sdhwloadactive' field") + } + + // Simple Field (fault) + if _err := writeBuffer.WriteBit("fault", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'fault' field") + } +case datapointType == KnxDatapointType_DPT_FuelTypeSet : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 5, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (solidstate) + if _err := writeBuffer.WriteBit("solidstate", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'solidstate' field") + } + + // Simple Field (gas) + if _err := writeBuffer.WriteBit("gas", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'gas' field") + } + + // Simple Field (oil) + if _err := writeBuffer.WriteBit("oil", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'oil' field") + } +case datapointType == KnxDatapointType_DPT_StatusRCC : // BOOL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_StatusAHU : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (cool) + if _err := writeBuffer.WriteBit("cool", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'cool' field") + } + + // Simple Field (heat) + if _err := writeBuffer.WriteBit("heat", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'heat' field") + } + + // Simple Field (fanactive) + if _err := writeBuffer.WriteBit("fanactive", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'fanactive' field") + } + + // Simple Field (fault) + if _err := writeBuffer.WriteBit("fault", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'fault' field") + } +case datapointType == KnxDatapointType_DPT_CombinedStatus_RTSM : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 3, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (statusOfHvacModeUser) + if _err := writeBuffer.WriteBit("statusOfHvacModeUser", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'statusOfHvacModeUser' field") + } + + // Simple Field (statusOfComfortProlongationUser) + if _err := writeBuffer.WriteBit("statusOfComfortProlongationUser", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'statusOfComfortProlongationUser' field") + } + + // Simple Field (effectiveValueOfTheComfortPushButton) + if _err := writeBuffer.WriteBit("effectiveValueOfTheComfortPushButton", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'effectiveValueOfTheComfortPushButton' field") + } + + // Simple Field (effectiveValueOfThePresenceStatus) + if _err := writeBuffer.WriteBit("effectiveValueOfThePresenceStatus", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'effectiveValueOfThePresenceStatus' field") + } + + // Simple Field (effectiveValueOfTheWindowStatus) + if _err := writeBuffer.WriteBit("effectiveValueOfTheWindowStatus", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'effectiveValueOfTheWindowStatus' field") + } +case datapointType == KnxDatapointType_DPT_LightActuatorErrorInfo : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 1, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (overheat) + if _err := writeBuffer.WriteBit("overheat", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'overheat' field") + } + + // Simple Field (lampfailure) + if _err := writeBuffer.WriteBit("lampfailure", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'lampfailure' field") + } + + // Simple Field (defectiveload) + if _err := writeBuffer.WriteBit("defectiveload", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'defectiveload' field") + } + + // Simple Field (underload) + if _err := writeBuffer.WriteBit("underload", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'underload' field") + } + + // Simple Field (overcurrent) + if _err := writeBuffer.WriteBit("overcurrent", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'overcurrent' field") + } + + // Simple Field (undervoltage) + if _err := writeBuffer.WriteBit("undervoltage", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'undervoltage' field") + } + + // Simple Field (loaddetectionerror) + if _err := writeBuffer.WriteBit("loaddetectionerror", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'loaddetectionerror' field") + } +case datapointType == KnxDatapointType_DPT_RF_ModeInfo : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 5, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (bibatSlave) + if _err := writeBuffer.WriteBit("bibatSlave", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'bibatSlave' field") + } + + // Simple Field (bibatMaster) + if _err := writeBuffer.WriteBit("bibatMaster", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'bibatMaster' field") + } + + // Simple Field (asynchronous) + if _err := writeBuffer.WriteBit("asynchronous", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'asynchronous' field") + } +case datapointType == KnxDatapointType_DPT_RF_FilterInfo : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 5, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (doa) + if _err := writeBuffer.WriteBit("doa", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'doa' field") + } + + // Simple Field (knxSn) + if _err := writeBuffer.WriteBit("knxSn", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'knxSn' field") + } + + // Simple Field (doaAndKnxSn) + if _err := writeBuffer.WriteBit("doaAndKnxSn", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'doaAndKnxSn' field") + } +case datapointType == KnxDatapointType_DPT_Channel_Activation_8 : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (activationStateOfChannel1) + if _err := writeBuffer.WriteBit("activationStateOfChannel1", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel1' field") + } + + // Simple Field (activationStateOfChannel2) + if _err := writeBuffer.WriteBit("activationStateOfChannel2", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel2' field") + } + + // Simple Field (activationStateOfChannel3) + if _err := writeBuffer.WriteBit("activationStateOfChannel3", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel3' field") + } + + // Simple Field (activationStateOfChannel4) + if _err := writeBuffer.WriteBit("activationStateOfChannel4", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel4' field") + } + + // Simple Field (activationStateOfChannel5) + if _err := writeBuffer.WriteBit("activationStateOfChannel5", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel5' field") + } + + // Simple Field (activationStateOfChannel6) + if _err := writeBuffer.WriteBit("activationStateOfChannel6", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel6' field") + } + + // Simple Field (activationStateOfChannel7) + if _err := writeBuffer.WriteBit("activationStateOfChannel7", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel7' field") + } + + // Simple Field (activationStateOfChannel8) + if _err := writeBuffer.WriteBit("activationStateOfChannel8", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel8' field") + } +case datapointType == KnxDatapointType_DPT_StatusDHWC : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (tempoptimshiftactive) + if _err := writeBuffer.WriteBit("tempoptimshiftactive", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'tempoptimshiftactive' field") + } + + // Simple Field (solarenergysupport) + if _err := writeBuffer.WriteBit("solarenergysupport", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'solarenergysupport' field") + } + + // Simple Field (solarenergyonly) + if _err := writeBuffer.WriteBit("solarenergyonly", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'solarenergyonly' field") + } + + // Simple Field (otherenergysourceactive) + if _err := writeBuffer.WriteBit("otherenergysourceactive", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'otherenergysourceactive' field") + } + + // Simple Field (dhwpushactive) + if _err := writeBuffer.WriteBit("dhwpushactive", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'dhwpushactive' field") + } + + // Simple Field (legioprotactive) + if _err := writeBuffer.WriteBit("legioprotactive", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'legioprotactive' field") + } + + // Simple Field (dhwloadactive) + if _err := writeBuffer.WriteBit("dhwloadactive", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'dhwloadactive' field") + } + + // Simple Field (fault) + if _err := writeBuffer.WriteBit("fault", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'fault' field") + } +case datapointType == KnxDatapointType_DPT_StatusRHCC : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 1, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (overheatalarm) + if _err := writeBuffer.WriteBit("overheatalarm", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'overheatalarm' field") + } + + // Simple Field (frostalarm) + if _err := writeBuffer.WriteBit("frostalarm", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'frostalarm' field") + } + + // Simple Field (dewpointstatus) + if _err := writeBuffer.WriteBit("dewpointstatus", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'dewpointstatus' field") + } + + // Simple Field (coolingdisabled) + if _err := writeBuffer.WriteBit("coolingdisabled", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'coolingdisabled' field") + } + + // Simple Field (statusprecool) + if _err := writeBuffer.WriteBit("statusprecool", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'statusprecool' field") + } + + // Simple Field (statusecoc) + if _err := writeBuffer.WriteBit("statusecoc", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'statusecoc' field") + } + + // Simple Field (heatcoolmode) + if _err := writeBuffer.WriteBit("heatcoolmode", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'heatcoolmode' field") + } + + // Simple Field (heatingdiabled) + if _err := writeBuffer.WriteBit("heatingdiabled", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'heatingdiabled' field") + } + + // Simple Field (statusstopoptim) + if _err := writeBuffer.WriteBit("statusstopoptim", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'statusstopoptim' field") + } + + // Simple Field (statusstartoptim) + if _err := writeBuffer.WriteBit("statusstartoptim", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'statusstartoptim' field") + } + + // Simple Field (statusmorningboosth) + if _err := writeBuffer.WriteBit("statusmorningboosth", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'statusmorningboosth' field") + } + + // Simple Field (tempflowreturnlimit) + if _err := writeBuffer.WriteBit("tempflowreturnlimit", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'tempflowreturnlimit' field") + } + + // Simple Field (tempflowlimit) + if _err := writeBuffer.WriteBit("tempflowlimit", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'tempflowlimit' field") + } + + // Simple Field (statusecoh) + if _err := writeBuffer.WriteBit("statusecoh", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'statusecoh' field") + } + + // Simple Field (fault) + if _err := writeBuffer.WriteBit("fault", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'fault' field") + } +case datapointType == KnxDatapointType_DPT_CombinedStatus_HVA : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (calibrationMode) + if _err := writeBuffer.WriteBit("calibrationMode", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'calibrationMode' field") + } + + // Simple Field (lockedPosition) + if _err := writeBuffer.WriteBit("lockedPosition", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'lockedPosition' field") + } + + // Simple Field (forcedPosition) + if _err := writeBuffer.WriteBit("forcedPosition", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'forcedPosition' field") + } + + // Simple Field (manuaOperationOverridden) + if _err := writeBuffer.WriteBit("manuaOperationOverridden", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'manuaOperationOverridden' field") + } + + // Simple Field (serviceMode) + if _err := writeBuffer.WriteBit("serviceMode", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'serviceMode' field") + } + + // Simple Field (valveKick) + if _err := writeBuffer.WriteBit("valveKick", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'valveKick' field") + } + + // Simple Field (overload) + if _err := writeBuffer.WriteBit("overload", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'overload' field") + } + + // Simple Field (shortCircuit) + if _err := writeBuffer.WriteBit("shortCircuit", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'shortCircuit' field") + } + + // Simple Field (currentValvePosition) + if _err := writeBuffer.WriteBit("currentValvePosition", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'currentValvePosition' field") + } +case datapointType == KnxDatapointType_DPT_CombinedStatus_RTC : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (coolingModeEnabled) + if _err := writeBuffer.WriteBit("coolingModeEnabled", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'coolingModeEnabled' field") + } + + // Simple Field (heatingModeEnabled) + if _err := writeBuffer.WriteBit("heatingModeEnabled", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'heatingModeEnabled' field") + } + + // Simple Field (additionalHeatingCoolingStage2Stage) + if _err := writeBuffer.WriteBit("additionalHeatingCoolingStage2Stage", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'additionalHeatingCoolingStage2Stage' field") + } + + // Simple Field (controllerInactive) + if _err := writeBuffer.WriteBit("controllerInactive", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'controllerInactive' field") + } + + // Simple Field (overheatAlarm) + if _err := writeBuffer.WriteBit("overheatAlarm", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'overheatAlarm' field") + } + + // Simple Field (frostAlarm) + if _err := writeBuffer.WriteBit("frostAlarm", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'frostAlarm' field") + } + + // Simple Field (dewPointStatus) + if _err := writeBuffer.WriteBit("dewPointStatus", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'dewPointStatus' field") + } + + // Simple Field (activeMode) + if _err := writeBuffer.WriteBit("activeMode", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activeMode' field") + } + + // Simple Field (generalFailureInformation) + if _err := writeBuffer.WriteBit("generalFailureInformation", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'generalFailureInformation' field") + } +case datapointType == KnxDatapointType_DPT_Media : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint16("reserved", 10, uint16(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (knxIp) + if _err := writeBuffer.WriteBit("knxIp", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'knxIp' field") + } + + // Simple Field (rf) + if _err := writeBuffer.WriteBit("rf", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'rf' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 1, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (pl110) + if _err := writeBuffer.WriteBit("pl110", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'pl110' field") + } + + // Simple Field (tp1) + if _err := writeBuffer.WriteBit("tp1", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'tp1' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 1, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } +case datapointType == KnxDatapointType_DPT_Channel_Activation_16 : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (activationStateOfChannel1) + if _err := writeBuffer.WriteBit("activationStateOfChannel1", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel1' field") + } + + // Simple Field (activationStateOfChannel2) + if _err := writeBuffer.WriteBit("activationStateOfChannel2", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel2' field") + } + + // Simple Field (activationStateOfChannel3) + if _err := writeBuffer.WriteBit("activationStateOfChannel3", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel3' field") + } + + // Simple Field (activationStateOfChannel4) + if _err := writeBuffer.WriteBit("activationStateOfChannel4", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel4' field") + } + + // Simple Field (activationStateOfChannel5) + if _err := writeBuffer.WriteBit("activationStateOfChannel5", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel5' field") + } + + // Simple Field (activationStateOfChannel6) + if _err := writeBuffer.WriteBit("activationStateOfChannel6", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel6' field") + } + + // Simple Field (activationStateOfChannel7) + if _err := writeBuffer.WriteBit("activationStateOfChannel7", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel7' field") + } + + // Simple Field (activationStateOfChannel8) + if _err := writeBuffer.WriteBit("activationStateOfChannel8", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel8' field") + } + + // Simple Field (activationStateOfChannel9) + if _err := writeBuffer.WriteBit("activationStateOfChannel9", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel9' field") + } + + // Simple Field (activationStateOfChannel10) + if _err := writeBuffer.WriteBit("activationStateOfChannel10", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel10' field") + } + + // Simple Field (activationStateOfChannel11) + if _err := writeBuffer.WriteBit("activationStateOfChannel11", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel11' field") + } + + // Simple Field (activationStateOfChannel12) + if _err := writeBuffer.WriteBit("activationStateOfChannel12", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel12' field") + } + + // Simple Field (activationStateOfChannel13) + if _err := writeBuffer.WriteBit("activationStateOfChannel13", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel13' field") + } + + // Simple Field (activationStateOfChannel14) + if _err := writeBuffer.WriteBit("activationStateOfChannel14", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel14' field") + } + + // Simple Field (activationStateOfChannel15) + if _err := writeBuffer.WriteBit("activationStateOfChannel15", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel15' field") + } + + // Simple Field (activationStateOfChannel16) + if _err := writeBuffer.WriteBit("activationStateOfChannel16", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel16' field") + } +case datapointType == KnxDatapointType_DPT_OnOffAction : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 6, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 2, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Alarm_Reaction : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 6, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 2, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_UpDown_Action : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 6, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 2, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_HVAC_PB_Action : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 6, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 2, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_DoubleNibble : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (busy) + if _err := writeBuffer.WriteUint8("busy", 4, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'busy' field") + } + + // Simple Field (nak) + if _err := writeBuffer.WriteUint8("nak", 4, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'nak' field") + } +case datapointType == KnxDatapointType_DPT_SceneInfo : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 1, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (sceneIsInactive) + if _err := writeBuffer.WriteBit("sceneIsInactive", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'sceneIsInactive' field") + } + + // Simple Field (scenenumber) + if _err := writeBuffer.WriteUint8("scenenumber", 6, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'scenenumber' field") + } +case datapointType == KnxDatapointType_DPT_CombinedInfoOnOff : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (maskBitInfoOnOffOutput16) + if _err := writeBuffer.WriteBit("maskBitInfoOnOffOutput16", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'maskBitInfoOnOffOutput16' field") + } + + // Simple Field (maskBitInfoOnOffOutput15) + if _err := writeBuffer.WriteBit("maskBitInfoOnOffOutput15", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'maskBitInfoOnOffOutput15' field") + } + + // Simple Field (maskBitInfoOnOffOutput14) + if _err := writeBuffer.WriteBit("maskBitInfoOnOffOutput14", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'maskBitInfoOnOffOutput14' field") + } + + // Simple Field (maskBitInfoOnOffOutput13) + if _err := writeBuffer.WriteBit("maskBitInfoOnOffOutput13", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'maskBitInfoOnOffOutput13' field") + } + + // Simple Field (maskBitInfoOnOffOutput12) + if _err := writeBuffer.WriteBit("maskBitInfoOnOffOutput12", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'maskBitInfoOnOffOutput12' field") + } + + // Simple Field (maskBitInfoOnOffOutput11) + if _err := writeBuffer.WriteBit("maskBitInfoOnOffOutput11", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'maskBitInfoOnOffOutput11' field") + } + + // Simple Field (maskBitInfoOnOffOutput10) + if _err := writeBuffer.WriteBit("maskBitInfoOnOffOutput10", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'maskBitInfoOnOffOutput10' field") + } + + // Simple Field (maskBitInfoOnOffOutput9) + if _err := writeBuffer.WriteBit("maskBitInfoOnOffOutput9", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'maskBitInfoOnOffOutput9' field") + } + + // Simple Field (maskBitInfoOnOffOutput8) + if _err := writeBuffer.WriteBit("maskBitInfoOnOffOutput8", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'maskBitInfoOnOffOutput8' field") + } + + // Simple Field (maskBitInfoOnOffOutput7) + if _err := writeBuffer.WriteBit("maskBitInfoOnOffOutput7", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'maskBitInfoOnOffOutput7' field") + } + + // Simple Field (maskBitInfoOnOffOutput6) + if _err := writeBuffer.WriteBit("maskBitInfoOnOffOutput6", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'maskBitInfoOnOffOutput6' field") + } + + // Simple Field (maskBitInfoOnOffOutput5) + if _err := writeBuffer.WriteBit("maskBitInfoOnOffOutput5", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'maskBitInfoOnOffOutput5' field") + } + + // Simple Field (maskBitInfoOnOffOutput4) + if _err := writeBuffer.WriteBit("maskBitInfoOnOffOutput4", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'maskBitInfoOnOffOutput4' field") + } + + // Simple Field (maskBitInfoOnOffOutput3) + if _err := writeBuffer.WriteBit("maskBitInfoOnOffOutput3", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'maskBitInfoOnOffOutput3' field") + } + + // Simple Field (maskBitInfoOnOffOutput2) + if _err := writeBuffer.WriteBit("maskBitInfoOnOffOutput2", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'maskBitInfoOnOffOutput2' field") + } + + // Simple Field (maskBitInfoOnOffOutput1) + if _err := writeBuffer.WriteBit("maskBitInfoOnOffOutput1", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'maskBitInfoOnOffOutput1' field") + } + + // Simple Field (infoOnOffOutput16) + if _err := writeBuffer.WriteBit("infoOnOffOutput16", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'infoOnOffOutput16' field") + } + + // Simple Field (infoOnOffOutput15) + if _err := writeBuffer.WriteBit("infoOnOffOutput15", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'infoOnOffOutput15' field") + } + + // Simple Field (infoOnOffOutput14) + if _err := writeBuffer.WriteBit("infoOnOffOutput14", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'infoOnOffOutput14' field") + } + + // Simple Field (infoOnOffOutput13) + if _err := writeBuffer.WriteBit("infoOnOffOutput13", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'infoOnOffOutput13' field") + } + + // Simple Field (infoOnOffOutput12) + if _err := writeBuffer.WriteBit("infoOnOffOutput12", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'infoOnOffOutput12' field") + } + + // Simple Field (infoOnOffOutput11) + if _err := writeBuffer.WriteBit("infoOnOffOutput11", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'infoOnOffOutput11' field") + } + + // Simple Field (infoOnOffOutput10) + if _err := writeBuffer.WriteBit("infoOnOffOutput10", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'infoOnOffOutput10' field") + } + + // Simple Field (infoOnOffOutput9) + if _err := writeBuffer.WriteBit("infoOnOffOutput9", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'infoOnOffOutput9' field") + } + + // Simple Field (infoOnOffOutput8) + if _err := writeBuffer.WriteBit("infoOnOffOutput8", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'infoOnOffOutput8' field") + } + + // Simple Field (infoOnOffOutput7) + if _err := writeBuffer.WriteBit("infoOnOffOutput7", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'infoOnOffOutput7' field") + } + + // Simple Field (infoOnOffOutput6) + if _err := writeBuffer.WriteBit("infoOnOffOutput6", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'infoOnOffOutput6' field") + } + + // Simple Field (infoOnOffOutput5) + if _err := writeBuffer.WriteBit("infoOnOffOutput5", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'infoOnOffOutput5' field") + } + + // Simple Field (infoOnOffOutput4) + if _err := writeBuffer.WriteBit("infoOnOffOutput4", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'infoOnOffOutput4' field") + } + + // Simple Field (infoOnOffOutput3) + if _err := writeBuffer.WriteBit("infoOnOffOutput3", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'infoOnOffOutput3' field") + } + + // Simple Field (infoOnOffOutput2) + if _err := writeBuffer.WriteBit("infoOnOffOutput2", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'infoOnOffOutput2' field") + } + + // Simple Field (infoOnOffOutput1) + if _err := writeBuffer.WriteBit("infoOnOffOutput1", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'infoOnOffOutput1' field") + } +case datapointType == KnxDatapointType_DPT_ActiveEnergy_V64 : // LINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteInt64("value", 64, value.GetInt64()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_ApparantEnergy_V64 : // LINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteInt64("value", 64, value.GetInt64()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_ReactiveEnergy_V64 : // LINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteInt64("value", 64, value.GetInt64()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Channel_Activation_24 : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (activationStateOfChannel1) + if _err := writeBuffer.WriteBit("activationStateOfChannel1", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel1' field") + } + + // Simple Field (activationStateOfChannel2) + if _err := writeBuffer.WriteBit("activationStateOfChannel2", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel2' field") + } + + // Simple Field (activationStateOfChannel3) + if _err := writeBuffer.WriteBit("activationStateOfChannel3", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel3' field") + } + + // Simple Field (activationStateOfChannel4) + if _err := writeBuffer.WriteBit("activationStateOfChannel4", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel4' field") + } + + // Simple Field (activationStateOfChannel5) + if _err := writeBuffer.WriteBit("activationStateOfChannel5", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel5' field") + } + + // Simple Field (activationStateOfChannel6) + if _err := writeBuffer.WriteBit("activationStateOfChannel6", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel6' field") + } + + // Simple Field (activationStateOfChannel7) + if _err := writeBuffer.WriteBit("activationStateOfChannel7", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel7' field") + } + + // Simple Field (activationStateOfChannel8) + if _err := writeBuffer.WriteBit("activationStateOfChannel8", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel8' field") + } + + // Simple Field (activationStateOfChannel9) + if _err := writeBuffer.WriteBit("activationStateOfChannel9", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel9' field") + } + + // Simple Field (activationStateOfChannel10) + if _err := writeBuffer.WriteBit("activationStateOfChannel10", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel10' field") + } + + // Simple Field (activationStateOfChannel11) + if _err := writeBuffer.WriteBit("activationStateOfChannel11", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel11' field") + } + + // Simple Field (activationStateOfChannel12) + if _err := writeBuffer.WriteBit("activationStateOfChannel12", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel12' field") + } + + // Simple Field (activationStateOfChannel13) + if _err := writeBuffer.WriteBit("activationStateOfChannel13", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel13' field") + } + + // Simple Field (activationStateOfChannel14) + if _err := writeBuffer.WriteBit("activationStateOfChannel14", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel14' field") + } + + // Simple Field (activationStateOfChannel15) + if _err := writeBuffer.WriteBit("activationStateOfChannel15", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel15' field") + } + + // Simple Field (activationStateOfChannel16) + if _err := writeBuffer.WriteBit("activationStateOfChannel16", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel16' field") + } + + // Simple Field (activationStateOfChannel17) + if _err := writeBuffer.WriteBit("activationStateOfChannel17", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel17' field") + } + + // Simple Field (activationStateOfChannel18) + if _err := writeBuffer.WriteBit("activationStateOfChannel18", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel18' field") + } + + // Simple Field (activationStateOfChannel19) + if _err := writeBuffer.WriteBit("activationStateOfChannel19", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel19' field") + } + + // Simple Field (activationStateOfChannel20) + if _err := writeBuffer.WriteBit("activationStateOfChannel20", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel20' field") + } + + // Simple Field (activationStateOfChannel21) + if _err := writeBuffer.WriteBit("activationStateOfChannel21", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel21' field") + } + + // Simple Field (activationStateOfChannel22) + if _err := writeBuffer.WriteBit("activationStateOfChannel22", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel22' field") + } + + // Simple Field (activationStateOfChannel23) + if _err := writeBuffer.WriteBit("activationStateOfChannel23", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel23' field") + } + + // Simple Field (activationStateOfChannel24) + if _err := writeBuffer.WriteBit("activationStateOfChannel24", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activationStateOfChannel24' field") + } +case datapointType == KnxDatapointType_DPT_HVACModeNext : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (delayTimeMin) + if _err := writeBuffer.WriteUint16("delayTimeMin", 16, value.GetUint16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'delayTimeMin' field") + } + + // Simple Field (hvacMode) + if _err := writeBuffer.WriteUint8("hvacMode", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'hvacMode' field") + } +case datapointType == KnxDatapointType_DPT_DHWModeNext : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (delayTimeMin) + if _err := writeBuffer.WriteUint16("delayTimeMin", 16, value.GetUint16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'delayTimeMin' field") + } + + // Simple Field (dhwMode) + if _err := writeBuffer.WriteUint8("dhwMode", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'dhwMode' field") + } +case datapointType == KnxDatapointType_DPT_OccModeNext : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (delayTimeMin) + if _err := writeBuffer.WriteUint16("delayTimeMin", 16, value.GetUint16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'delayTimeMin' field") + } + + // Simple Field (occupancyMode) + if _err := writeBuffer.WriteUint8("occupancyMode", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'occupancyMode' field") + } +case datapointType == KnxDatapointType_DPT_BuildingModeNext : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (delayTimeMin) + if _err := writeBuffer.WriteUint16("delayTimeMin", 16, value.GetUint16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'delayTimeMin' field") + } + + // Simple Field (buildingMode) + if _err := writeBuffer.WriteUint8("buildingMode", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'buildingMode' field") + } +case datapointType == KnxDatapointType_DPT_StatusLightingActuator : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (validactualvalue) + if _err := writeBuffer.WriteBit("validactualvalue", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'validactualvalue' field") + } + + // Simple Field (locked) + if _err := writeBuffer.WriteBit("locked", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'locked' field") + } + + // Simple Field (forced) + if _err := writeBuffer.WriteBit("forced", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'forced' field") + } + + // Simple Field (nightmodeactive) + if _err := writeBuffer.WriteBit("nightmodeactive", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'nightmodeactive' field") + } + + // Simple Field (staircaselightingFunction) + if _err := writeBuffer.WriteBit("staircaselightingFunction", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'staircaselightingFunction' field") + } + + // Simple Field (dimming) + if _err := writeBuffer.WriteBit("dimming", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'dimming' field") + } + + // Simple Field (localoverride) + if _err := writeBuffer.WriteBit("localoverride", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'localoverride' field") + } + + // Simple Field (failure) + if _err := writeBuffer.WriteBit("failure", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'failure' field") + } + + // Simple Field (actualvalue) + if _err := writeBuffer.WriteUint8("actualvalue", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'actualvalue' field") + } +case datapointType == KnxDatapointType_DPT_Version : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (magicNumber) + if _err := writeBuffer.WriteUint8("magicNumber", 5, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'magicNumber' field") + } + + // Simple Field (versionNumber) + if _err := writeBuffer.WriteUint8("versionNumber", 5, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'versionNumber' field") + } + + // Simple Field (revisionNumber) + if _err := writeBuffer.WriteUint8("revisionNumber", 6, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'revisionNumber' field") + } +case datapointType == KnxDatapointType_DPT_AlarmInfo : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (logNumber) + if _err := writeBuffer.WriteUint8("logNumber", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'logNumber' field") + } + + // Simple Field (alarmPriority) + if _err := writeBuffer.WriteUint8("alarmPriority", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'alarmPriority' field") + } + + // Simple Field (applicationArea) + if _err := writeBuffer.WriteUint8("applicationArea", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'applicationArea' field") + } + + // Simple Field (errorClass) + if _err := writeBuffer.WriteUint8("errorClass", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'errorClass' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (errorcodeSup) + if _err := writeBuffer.WriteBit("errorcodeSup", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'errorcodeSup' field") + } + + // Simple Field (alarmtextSup) + if _err := writeBuffer.WriteBit("alarmtextSup", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'alarmtextSup' field") + } + + // Simple Field (timestampSup) + if _err := writeBuffer.WriteBit("timestampSup", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'timestampSup' field") + } + + // Simple Field (ackSup) + if _err := writeBuffer.WriteBit("ackSup", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'ackSup' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 5, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (locked) + if _err := writeBuffer.WriteBit("locked", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'locked' field") + } + + // Simple Field (alarmunack) + if _err := writeBuffer.WriteBit("alarmunack", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'alarmunack' field") + } + + // Simple Field (inalarm) + if _err := writeBuffer.WriteBit("inalarm", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'inalarm' field") + } +case datapointType == KnxDatapointType_DPT_TempRoomSetpSetF16_3 : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (tempsetpcomf) + if _err := writeBuffer.WriteFloat32("tempsetpcomf", 16, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'tempsetpcomf' field") + } + + // Simple Field (tempsetpstdby) + if _err := writeBuffer.WriteFloat32("tempsetpstdby", 16, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'tempsetpstdby' field") + } + + // Simple Field (tempsetpeco) + if _err := writeBuffer.WriteFloat32("tempsetpeco", 16, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'tempsetpeco' field") + } +case datapointType == KnxDatapointType_DPT_TempRoomSetpSetShiftF16_3 : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (tempsetpshiftcomf) + if _err := writeBuffer.WriteFloat32("tempsetpshiftcomf", 16, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'tempsetpshiftcomf' field") + } + + // Simple Field (tempsetpshiftstdby) + if _err := writeBuffer.WriteFloat32("tempsetpshiftstdby", 16, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'tempsetpshiftstdby' field") + } + + // Simple Field (tempsetpshifteco) + if _err := writeBuffer.WriteFloat32("tempsetpshifteco", 16, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'tempsetpshifteco' field") + } +case datapointType == KnxDatapointType_DPT_Scaling_Speed : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (timePeriod) + if _err := writeBuffer.WriteUint16("timePeriod", 16, value.GetUint16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'timePeriod' field") + } + + // Simple Field (percent) + if _err := writeBuffer.WriteUint8("percent", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'percent' field") + } +case datapointType == KnxDatapointType_DPT_Scaling_Step_Time : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (timePeriod) + if _err := writeBuffer.WriteUint16("timePeriod", 16, value.GetUint16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'timePeriod' field") + } + + // Simple Field (percent) + if _err := writeBuffer.WriteUint8("percent", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'percent' field") + } +case datapointType == KnxDatapointType_DPT_MeteringValue : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (countval) + if _err := writeBuffer.WriteInt32("countval", 32, value.GetInt32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'countval' field") + } + + // Simple Field (valinffield) + if _err := writeBuffer.WriteUint8("valinffield", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'valinffield' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 3, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (alarmunack) + if _err := writeBuffer.WriteBit("alarmunack", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'alarmunack' field") + } + + // Simple Field (inalarm) + if _err := writeBuffer.WriteBit("inalarm", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'inalarm' field") + } + + // Simple Field (overridden) + if _err := writeBuffer.WriteBit("overridden", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'overridden' field") + } + + // Simple Field (fault) + if _err := writeBuffer.WriteBit("fault", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'fault' field") + } + + // Simple Field (outofservice) + if _err := writeBuffer.WriteBit("outofservice", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'outofservice' field") + } +case datapointType == KnxDatapointType_DPT_MBus_Address : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (manufactid) + if _err := writeBuffer.WriteUint16("manufactid", 16, value.GetUint16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'manufactid' field") + } + + // Simple Field (identnumber) + if _err := writeBuffer.WriteUint32("identnumber", 32, value.GetUint32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'identnumber' field") + } + + // Simple Field (version) + if _err := writeBuffer.WriteUint8("version", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'version' field") + } + + // Simple Field (medium) + if _err := writeBuffer.WriteUint8("medium", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'medium' field") + } +case datapointType == KnxDatapointType_DPT_Colour_RGB : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (r) + if _err := writeBuffer.WriteUint8("r", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'r' field") + } + + // Simple Field (g) + if _err := writeBuffer.WriteUint8("g", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'g' field") + } + + // Simple Field (b) + if _err := writeBuffer.WriteUint8("b", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'b' field") + } +case datapointType == KnxDatapointType_DPT_LanguageCodeAlpha2_ASCII : // STRING + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteString("value", uint32(16), "ASCII", value.GetString()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case datapointType == KnxDatapointType_DPT_Tariff_ActiveEnergy : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (activeelectricalenergy) + if _err := writeBuffer.WriteInt32("activeelectricalenergy", 32, value.GetInt32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'activeelectricalenergy' field") + } + + // Simple Field (tariff) + if _err := writeBuffer.WriteUint8("tariff", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'tariff' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 6, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (electricalengergyvalidity) + if _err := writeBuffer.WriteBit("electricalengergyvalidity", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'electricalengergyvalidity' field") + } + + // Simple Field (tariffvalidity) + if _err := writeBuffer.WriteBit("tariffvalidity", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'tariffvalidity' field") + } +case datapointType == KnxDatapointType_DPT_Prioritised_Mode_Control : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (deactivationOfPriority) + if _err := writeBuffer.WriteBit("deactivationOfPriority", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'deactivationOfPriority' field") + } + + // Simple Field (priorityLevel) + if _err := writeBuffer.WriteUint8("priorityLevel", 3, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'priorityLevel' field") + } + + // Simple Field (modeLevel) + if _err := writeBuffer.WriteUint8("modeLevel", 4, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'modeLevel' field") + } +case datapointType == KnxDatapointType_DPT_DALI_Control_Gear_Diagnostic : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 5, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (convertorError) + if _err := writeBuffer.WriteBit("convertorError", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'convertorError' field") + } + + // Simple Field (ballastFailure) + if _err := writeBuffer.WriteBit("ballastFailure", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'ballastFailure' field") + } + + // Simple Field (lampFailure) + if _err := writeBuffer.WriteBit("lampFailure", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'lampFailure' field") + } + + // Simple Field (readOrResponse) + if _err := writeBuffer.WriteBit("readOrResponse", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'readOrResponse' field") + } + + // Simple Field (addressIndicator) + if _err := writeBuffer.WriteBit("addressIndicator", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'addressIndicator' field") + } + + // Simple Field (daliDeviceAddressOrDaliGroupAddress) + if _err := writeBuffer.WriteUint8("daliDeviceAddressOrDaliGroupAddress", 6, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'daliDeviceAddressOrDaliGroupAddress' field") + } +case datapointType == KnxDatapointType_DPT_DALI_Diagnostics : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (ballastFailure) + if _err := writeBuffer.WriteBit("ballastFailure", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'ballastFailure' field") + } + + // Simple Field (lampFailure) + if _err := writeBuffer.WriteBit("lampFailure", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'lampFailure' field") + } + + // Simple Field (deviceAddress) + if _err := writeBuffer.WriteUint8("deviceAddress", 6, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'deviceAddress' field") + } +case datapointType == KnxDatapointType_DPT_CombinedPosition : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (heightPosition) + if _err := writeBuffer.WriteUint8("heightPosition", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'heightPosition' field") + } + + // Simple Field (slatsPosition) + if _err := writeBuffer.WriteUint8("slatsPosition", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'slatsPosition' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 6, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (validityHeightPosition) + if _err := writeBuffer.WriteBit("validityHeightPosition", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'validityHeightPosition' field") + } + + // Simple Field (validitySlatsPosition) + if _err := writeBuffer.WriteBit("validitySlatsPosition", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'validitySlatsPosition' field") + } +case datapointType == KnxDatapointType_DPT_StatusSAB : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (heightPosition) + if _err := writeBuffer.WriteUint8("heightPosition", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'heightPosition' field") + } + + // Simple Field (slatsPosition) + if _err := writeBuffer.WriteUint8("slatsPosition", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'slatsPosition' field") + } + + // Simple Field (upperEndPosReached) + if _err := writeBuffer.WriteBit("upperEndPosReached", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'upperEndPosReached' field") + } + + // Simple Field (lowerEndPosReached) + if _err := writeBuffer.WriteBit("lowerEndPosReached", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'lowerEndPosReached' field") + } + + // Simple Field (lowerPredefPosReachedTypHeight100PercentSlatsAngle100Percent) + if _err := writeBuffer.WriteBit("lowerPredefPosReachedTypHeight100PercentSlatsAngle100Percent", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'lowerPredefPosReachedTypHeight100PercentSlatsAngle100Percent' field") + } + + // Simple Field (targetPosDrive) + if _err := writeBuffer.WriteBit("targetPosDrive", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'targetPosDrive' field") + } + + // Simple Field (restrictionOfTargetHeightPosPosCanNotBeReached) + if _err := writeBuffer.WriteBit("restrictionOfTargetHeightPosPosCanNotBeReached", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'restrictionOfTargetHeightPosPosCanNotBeReached' field") + } + + // Simple Field (restrictionOfSlatsHeightPosPosCanNotBeReached) + if _err := writeBuffer.WriteBit("restrictionOfSlatsHeightPosPosCanNotBeReached", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'restrictionOfSlatsHeightPosPosCanNotBeReached' field") + } + + // Simple Field (atLeastOneOfTheInputsWindRainFrostAlarmIsInAlarm) + if _err := writeBuffer.WriteBit("atLeastOneOfTheInputsWindRainFrostAlarmIsInAlarm", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'atLeastOneOfTheInputsWindRainFrostAlarmIsInAlarm' field") + } + + // Simple Field (upDownPositionIsForcedByMoveupdownforcedInput) + if _err := writeBuffer.WriteBit("upDownPositionIsForcedByMoveupdownforcedInput", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'upDownPositionIsForcedByMoveupdownforcedInput' field") + } + + // Simple Field (movementIsLockedEGByDevicelockedInput) + if _err := writeBuffer.WriteBit("movementIsLockedEGByDevicelockedInput", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'movementIsLockedEGByDevicelockedInput' field") + } + + // Simple Field (actuatorSetvalueIsLocallyOverriddenEGViaALocalUserInterface) + if _err := writeBuffer.WriteBit("actuatorSetvalueIsLocallyOverriddenEGViaALocalUserInterface", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'actuatorSetvalueIsLocallyOverriddenEGViaALocalUserInterface' field") + } + + // Simple Field (generalFailureOfTheActuatorOrTheDrive) + if _err := writeBuffer.WriteBit("generalFailureOfTheActuatorOrTheDrive", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'generalFailureOfTheActuatorOrTheDrive' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 3, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (validityHeightPos) + if _err := writeBuffer.WriteBit("validityHeightPos", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'validityHeightPos' field") + } + + // Simple Field (validitySlatsPos) + if _err := writeBuffer.WriteBit("validitySlatsPos", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'validitySlatsPos' field") + } +case datapointType == KnxDatapointType_DPT_Colour_xyY : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (xAxis) + if _err := writeBuffer.WriteUint16("xAxis", 16, value.GetUint16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'xAxis' field") + } + + // Simple Field (yAxis) + if _err := writeBuffer.WriteUint16("yAxis", 16, value.GetUint16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'yAxis' field") + } + + // Simple Field (brightness) + if _err := writeBuffer.WriteUint8("brightness", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'brightness' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 6, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (validityXy) + if _err := writeBuffer.WriteBit("validityXy", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'validityXy' field") + } + + // Simple Field (validityBrightness) + if _err := writeBuffer.WriteBit("validityBrightness", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'validityBrightness' field") + } +case datapointType == KnxDatapointType_DPT_Converter_Status : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (converterModeAccordingToTheDaliConverterStateMachine) + if _err := writeBuffer.WriteUint8("converterModeAccordingToTheDaliConverterStateMachine", 4, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'converterModeAccordingToTheDaliConverterStateMachine' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 2, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (hardwiredSwitchIsActive) + if _err := writeBuffer.WriteBit("hardwiredSwitchIsActive", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'hardwiredSwitchIsActive' field") + } + + // Simple Field (hardwiredInhibitIsActive) + if _err := writeBuffer.WriteBit("hardwiredInhibitIsActive", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'hardwiredInhibitIsActive' field") + } + + // Simple Field (functionTestPending) + if _err := writeBuffer.WriteUint8("functionTestPending", 2, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'functionTestPending' field") + } + + // Simple Field (durationTestPending) + if _err := writeBuffer.WriteUint8("durationTestPending", 2, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'durationTestPending' field") + } + + // Simple Field (partialDurationTestPending) + if _err := writeBuffer.WriteUint8("partialDurationTestPending", 2, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'partialDurationTestPending' field") + } + + // Simple Field (converterFailure) + if _err := writeBuffer.WriteUint8("converterFailure", 2, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'converterFailure' field") + } +case datapointType == KnxDatapointType_DPT_Converter_Test_Result : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (ltrf) + if _err := writeBuffer.WriteUint8("ltrf", 4, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'ltrf' field") + } + + // Simple Field (ltrd) + if _err := writeBuffer.WriteUint8("ltrd", 4, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'ltrd' field") + } + + // Simple Field (ltrp) + if _err := writeBuffer.WriteUint8("ltrp", 4, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'ltrp' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (sf) + if _err := writeBuffer.WriteUint8("sf", 2, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'sf' field") + } + + // Simple Field (sd) + if _err := writeBuffer.WriteUint8("sd", 2, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'sd' field") + } + + // Simple Field (sp) + if _err := writeBuffer.WriteUint8("sp", 2, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'sp' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 2, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (ldtr) + if _err := writeBuffer.WriteUint16("ldtr", 16, value.GetUint16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'ldtr' field") + } + + // Simple Field (lpdtr) + if _err := writeBuffer.WriteUint8("lpdtr", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'lpdtr' field") + } +case datapointType == KnxDatapointType_DPT_Battery_Info : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 5, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (batteryFailure) + if _err := writeBuffer.WriteBit("batteryFailure", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'batteryFailure' field") + } + + // Simple Field (batteryDurationFailure) + if _err := writeBuffer.WriteBit("batteryDurationFailure", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'batteryDurationFailure' field") + } + + // Simple Field (batteryFullyCharged) + if _err := writeBuffer.WriteBit("batteryFullyCharged", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'batteryFullyCharged' field") + } + + // Simple Field (batteryChargeLevel) + if _err := writeBuffer.WriteUint8("batteryChargeLevel", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'batteryChargeLevel' field") + } +case datapointType == KnxDatapointType_DPT_Brightness_Colour_Temperature_Transition : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (ms) + if _err := writeBuffer.WriteUint16("ms", 16, value.GetUint16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'ms' field") + } + + // Simple Field (temperatureK) + if _err := writeBuffer.WriteUint16("temperatureK", 16, value.GetUint16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'temperatureK' field") + } + + // Simple Field (percent) + if _err := writeBuffer.WriteUint8("percent", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'percent' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 5, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (validityOfTheTimePeriod) + if _err := writeBuffer.WriteBit("validityOfTheTimePeriod", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'validityOfTheTimePeriod' field") + } + + // Simple Field (validityOfTheAbsoluteColourTemperature) + if _err := writeBuffer.WriteBit("validityOfTheAbsoluteColourTemperature", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'validityOfTheAbsoluteColourTemperature' field") + } + + // Simple Field (validityOfTheAbsoluteBrightness) + if _err := writeBuffer.WriteBit("validityOfTheAbsoluteBrightness", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'validityOfTheAbsoluteBrightness' field") + } +case datapointType == KnxDatapointType_DPT_Brightness_Colour_Temperature_Control : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (cct) + if _err := writeBuffer.WriteBit("cct", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'cct' field") + } + + // Simple Field (stepCodeColourTemperature) + if _err := writeBuffer.WriteUint8("stepCodeColourTemperature", 3, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'stepCodeColourTemperature' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (cb) + if _err := writeBuffer.WriteBit("cb", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'cb' field") + } + + // Simple Field (stepCodeBrightness) + if _err := writeBuffer.WriteUint8("stepCodeBrightness", 3, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'stepCodeBrightness' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 6, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (cctAndStepCodeColourValidity) + if _err := writeBuffer.WriteBit("cctAndStepCodeColourValidity", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'cctAndStepCodeColourValidity' field") + } + + // Simple Field (cbAndStepCodeBrightnessValidity) + if _err := writeBuffer.WriteBit("cbAndStepCodeBrightnessValidity", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'cbAndStepCodeBrightnessValidity' field") + } +case datapointType == KnxDatapointType_DPT_Colour_RGBW : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (colourLevelRed) + if _err := writeBuffer.WriteUint8("colourLevelRed", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'colourLevelRed' field") + } + + // Simple Field (colourLevelGreen) + if _err := writeBuffer.WriteUint8("colourLevelGreen", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'colourLevelGreen' field") + } + + // Simple Field (colourLevelBlue) + if _err := writeBuffer.WriteUint8("colourLevelBlue", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'colourLevelBlue' field") + } + + // Simple Field (colourLevelWhite) + if _err := writeBuffer.WriteUint8("colourLevelWhite", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'colourLevelWhite' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (mr) + if _err := writeBuffer.WriteBit("mr", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'mr' field") + } + + // Simple Field (mg) + if _err := writeBuffer.WriteBit("mg", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'mg' field") + } + + // Simple Field (mb) + if _err := writeBuffer.WriteBit("mb", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'mb' field") + } + + // Simple Field (mw) + if _err := writeBuffer.WriteBit("mw", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'mw' field") + } +case datapointType == KnxDatapointType_DPT_Relative_Control_RGBW : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (maskcw) + if _err := writeBuffer.WriteBit("maskcw", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'maskcw' field") + } + + // Simple Field (maskcb) + if _err := writeBuffer.WriteBit("maskcb", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'maskcb' field") + } + + // Simple Field (maskcg) + if _err := writeBuffer.WriteBit("maskcg", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'maskcg' field") + } + + // Simple Field (maskcr) + if _err := writeBuffer.WriteBit("maskcr", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'maskcr' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (cw) + if _err := writeBuffer.WriteBit("cw", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'cw' field") + } + + // Simple Field (stepCodeColourWhite) + if _err := writeBuffer.WriteUint8("stepCodeColourWhite", 3, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'stepCodeColourWhite' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (cb) + if _err := writeBuffer.WriteBit("cb", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'cb' field") + } + + // Simple Field (stepCodeColourBlue) + if _err := writeBuffer.WriteUint8("stepCodeColourBlue", 3, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'stepCodeColourBlue' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (cg) + if _err := writeBuffer.WriteBit("cg", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'cg' field") + } + + // Simple Field (stepCodeColourGreen) + if _err := writeBuffer.WriteUint8("stepCodeColourGreen", 3, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'stepCodeColourGreen' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (cr) + if _err := writeBuffer.WriteBit("cr", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'cr' field") + } + + // Simple Field (stepCodeColourRed) + if _err := writeBuffer.WriteUint8("stepCodeColourRed", 3, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'stepCodeColourRed' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } +case datapointType == KnxDatapointType_DPT_Relative_Control_RGB : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (cb) + if _err := writeBuffer.WriteBit("cb", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'cb' field") + } + + // Simple Field (stepCodeColourBlue) + if _err := writeBuffer.WriteUint8("stepCodeColourBlue", 3, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'stepCodeColourBlue' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (cg) + if _err := writeBuffer.WriteBit("cg", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'cg' field") + } + + // Simple Field (stepCodeColourGreen) + if _err := writeBuffer.WriteUint8("stepCodeColourGreen", 3, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'stepCodeColourGreen' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (cr) + if _err := writeBuffer.WriteBit("cr", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'cr' field") + } + + // Simple Field (stepCodeColourRed) + if _err := writeBuffer.WriteUint8("stepCodeColourRed", 3, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'stepCodeColourRed' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } +case datapointType == KnxDatapointType_DPT_GeographicalLocation : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (longitude) + if _err := writeBuffer.WriteFloat32("longitude", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'longitude' field") + } + + // Simple Field (latitude) + if _err := writeBuffer.WriteFloat32("latitude", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'latitude' field") + } +case datapointType == KnxDatapointType_DPT_TempRoomSetpSetF16_4 : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (roomTemperatureSetpointComfort) + if _err := writeBuffer.WriteFloat32("roomTemperatureSetpointComfort", 16, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'roomTemperatureSetpointComfort' field") + } + + // Simple Field (roomTemperatureSetpointStandby) + if _err := writeBuffer.WriteFloat32("roomTemperatureSetpointStandby", 16, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'roomTemperatureSetpointStandby' field") + } + + // Simple Field (roomTemperatureSetpointEconomy) + if _err := writeBuffer.WriteFloat32("roomTemperatureSetpointEconomy", 16, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'roomTemperatureSetpointEconomy' field") + } + + // Simple Field (roomTemperatureSetpointBuildingProtection) + if _err := writeBuffer.WriteFloat32("roomTemperatureSetpointBuildingProtection", 16, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'roomTemperatureSetpointBuildingProtection' field") + } +case datapointType == KnxDatapointType_DPT_TempRoomSetpSetShiftF16_4 : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (roomTemperatureSetpointShiftComfort) + if _err := writeBuffer.WriteFloat32("roomTemperatureSetpointShiftComfort", 16, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'roomTemperatureSetpointShiftComfort' field") + } + + // Simple Field (roomTemperatureSetpointShiftStandby) + if _err := writeBuffer.WriteFloat32("roomTemperatureSetpointShiftStandby", 16, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'roomTemperatureSetpointShiftStandby' field") + } + + // Simple Field (roomTemperatureSetpointShiftEconomy) + if _err := writeBuffer.WriteFloat32("roomTemperatureSetpointShiftEconomy", 16, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'roomTemperatureSetpointShiftEconomy' field") + } + + // Simple Field (roomTemperatureSetpointShiftBuildingProtection) + if _err := writeBuffer.WriteFloat32("roomTemperatureSetpointShiftBuildingProtection", 16, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'roomTemperatureSetpointShiftBuildingProtection' field") + } + default: + // TODO: add more info which type it is actually + return errors.New("unsupported type") } writeBuffer.PopContext("KnxDatapoint") return nil } + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/KnxDatapointMainType.go b/plc4go/protocols/knxnetip/readwrite/model/KnxDatapointMainType.go index e28dc2282a5..8c0f2a44997 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/KnxDatapointMainType.go +++ b/plc4go/protocols/knxnetip/readwrite/model/KnxDatapointMainType.go @@ -37,75 +37,75 @@ type IKnxDatapointMainType interface { SizeInBits() uint8 } -const ( - KnxDatapointMainType_DPT_UNKNOWN KnxDatapointMainType = 0 - KnxDatapointMainType_DPT_64_BIT_SET KnxDatapointMainType = 1 - KnxDatapointMainType_DPT_8_BYTE_UNSIGNED_VALUE KnxDatapointMainType = 2 - KnxDatapointMainType_DPT_8_BYTE_SIGNED_VALUE KnxDatapointMainType = 3 - KnxDatapointMainType_DPT_12_BYTE_SIGNED_VALUE KnxDatapointMainType = 4 - KnxDatapointMainType_DPT_8_BYTE_FLOAT_VALUE KnxDatapointMainType = 5 - KnxDatapointMainType_DPT_1_BIT KnxDatapointMainType = 6 - KnxDatapointMainType_DPT_1_BIT_CONTROLLED KnxDatapointMainType = 7 - KnxDatapointMainType_DPT_3_BIT_CONTROLLED KnxDatapointMainType = 8 - KnxDatapointMainType_DPT_CHARACTER KnxDatapointMainType = 9 - KnxDatapointMainType_DPT_8_BIT_UNSIGNED_VALUE KnxDatapointMainType = 10 - KnxDatapointMainType_DPT_8_BIT_SIGNED_VALUE KnxDatapointMainType = 11 - KnxDatapointMainType_DPT_2_BYTE_UNSIGNED_VALUE KnxDatapointMainType = 12 - KnxDatapointMainType_DPT_2_BYTE_SIGNED_VALUE KnxDatapointMainType = 13 - KnxDatapointMainType_DPT_2_BYTE_FLOAT_VALUE KnxDatapointMainType = 14 - KnxDatapointMainType_DPT_TIME KnxDatapointMainType = 15 - KnxDatapointMainType_DPT_DATE KnxDatapointMainType = 16 - KnxDatapointMainType_DPT_4_BYTE_UNSIGNED_VALUE KnxDatapointMainType = 17 - KnxDatapointMainType_DPT_4_BYTE_SIGNED_VALUE KnxDatapointMainType = 18 - KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE KnxDatapointMainType = 19 - KnxDatapointMainType_DPT_ENTRANCE_ACCESS KnxDatapointMainType = 20 - KnxDatapointMainType_DPT_CHARACTER_STRING KnxDatapointMainType = 21 - KnxDatapointMainType_DPT_SCENE_NUMBER KnxDatapointMainType = 22 - KnxDatapointMainType_DPT_SCENE_CONTROL KnxDatapointMainType = 23 - KnxDatapointMainType_DPT_DATE_TIME KnxDatapointMainType = 24 - KnxDatapointMainType_DPT_1_BYTE KnxDatapointMainType = 25 - KnxDatapointMainType_DPT_8_BIT_SET KnxDatapointMainType = 26 - KnxDatapointMainType_DPT_16_BIT_SET KnxDatapointMainType = 27 - KnxDatapointMainType_DPT_2_BIT_SET KnxDatapointMainType = 28 - KnxDatapointMainType_DPT_2_NIBBLE_SET KnxDatapointMainType = 29 - KnxDatapointMainType_DPT_8_BIT_SET_2 KnxDatapointMainType = 30 - KnxDatapointMainType_DPT_32_BIT_SET KnxDatapointMainType = 31 - KnxDatapointMainType_DPT_ELECTRICAL_ENERGY KnxDatapointMainType = 32 - KnxDatapointMainType_DPT_24_TIMES_CHANNEL_ACTIVATION KnxDatapointMainType = 33 - KnxDatapointMainType_DPT_16_BIT_UNSIGNED_VALUE_AND_8_BIT_ENUM KnxDatapointMainType = 34 - KnxDatapointMainType_DPT_8_BIT_UNSIGNED_VALUE_AND_8_BIT_ENUM KnxDatapointMainType = 35 - KnxDatapointMainType_DPT_DATAPOINT_TYPE_VERSION KnxDatapointMainType = 36 - KnxDatapointMainType_DPT_ALARM_INFO KnxDatapointMainType = 37 - KnxDatapointMainType_DPT_3X_2_BYTE_FLOAT_VALUE KnxDatapointMainType = 38 - KnxDatapointMainType_DPT_SCALING_SPEED KnxDatapointMainType = 39 - KnxDatapointMainType_DPT_4_1_1_BYTE_COMBINED_INFORMATION KnxDatapointMainType = 40 - KnxDatapointMainType_DPT_MBUS_ADDRESS KnxDatapointMainType = 41 - KnxDatapointMainType_DPT_3_BYTE_COLOUR_RGB KnxDatapointMainType = 42 - KnxDatapointMainType_DPT_LANGUAGE_CODE_ISO_639_1 KnxDatapointMainType = 43 +const( + KnxDatapointMainType_DPT_UNKNOWN KnxDatapointMainType = 0 + KnxDatapointMainType_DPT_64_BIT_SET KnxDatapointMainType = 1 + KnxDatapointMainType_DPT_8_BYTE_UNSIGNED_VALUE KnxDatapointMainType = 2 + KnxDatapointMainType_DPT_8_BYTE_SIGNED_VALUE KnxDatapointMainType = 3 + KnxDatapointMainType_DPT_12_BYTE_SIGNED_VALUE KnxDatapointMainType = 4 + KnxDatapointMainType_DPT_8_BYTE_FLOAT_VALUE KnxDatapointMainType = 5 + KnxDatapointMainType_DPT_1_BIT KnxDatapointMainType = 6 + KnxDatapointMainType_DPT_1_BIT_CONTROLLED KnxDatapointMainType = 7 + KnxDatapointMainType_DPT_3_BIT_CONTROLLED KnxDatapointMainType = 8 + KnxDatapointMainType_DPT_CHARACTER KnxDatapointMainType = 9 + KnxDatapointMainType_DPT_8_BIT_UNSIGNED_VALUE KnxDatapointMainType = 10 + KnxDatapointMainType_DPT_8_BIT_SIGNED_VALUE KnxDatapointMainType = 11 + KnxDatapointMainType_DPT_2_BYTE_UNSIGNED_VALUE KnxDatapointMainType = 12 + KnxDatapointMainType_DPT_2_BYTE_SIGNED_VALUE KnxDatapointMainType = 13 + KnxDatapointMainType_DPT_2_BYTE_FLOAT_VALUE KnxDatapointMainType = 14 + KnxDatapointMainType_DPT_TIME KnxDatapointMainType = 15 + KnxDatapointMainType_DPT_DATE KnxDatapointMainType = 16 + KnxDatapointMainType_DPT_4_BYTE_UNSIGNED_VALUE KnxDatapointMainType = 17 + KnxDatapointMainType_DPT_4_BYTE_SIGNED_VALUE KnxDatapointMainType = 18 + KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE KnxDatapointMainType = 19 + KnxDatapointMainType_DPT_ENTRANCE_ACCESS KnxDatapointMainType = 20 + KnxDatapointMainType_DPT_CHARACTER_STRING KnxDatapointMainType = 21 + KnxDatapointMainType_DPT_SCENE_NUMBER KnxDatapointMainType = 22 + KnxDatapointMainType_DPT_SCENE_CONTROL KnxDatapointMainType = 23 + KnxDatapointMainType_DPT_DATE_TIME KnxDatapointMainType = 24 + KnxDatapointMainType_DPT_1_BYTE KnxDatapointMainType = 25 + KnxDatapointMainType_DPT_8_BIT_SET KnxDatapointMainType = 26 + KnxDatapointMainType_DPT_16_BIT_SET KnxDatapointMainType = 27 + KnxDatapointMainType_DPT_2_BIT_SET KnxDatapointMainType = 28 + KnxDatapointMainType_DPT_2_NIBBLE_SET KnxDatapointMainType = 29 + KnxDatapointMainType_DPT_8_BIT_SET_2 KnxDatapointMainType = 30 + KnxDatapointMainType_DPT_32_BIT_SET KnxDatapointMainType = 31 + KnxDatapointMainType_DPT_ELECTRICAL_ENERGY KnxDatapointMainType = 32 + KnxDatapointMainType_DPT_24_TIMES_CHANNEL_ACTIVATION KnxDatapointMainType = 33 + KnxDatapointMainType_DPT_16_BIT_UNSIGNED_VALUE_AND_8_BIT_ENUM KnxDatapointMainType = 34 + KnxDatapointMainType_DPT_8_BIT_UNSIGNED_VALUE_AND_8_BIT_ENUM KnxDatapointMainType = 35 + KnxDatapointMainType_DPT_DATAPOINT_TYPE_VERSION KnxDatapointMainType = 36 + KnxDatapointMainType_DPT_ALARM_INFO KnxDatapointMainType = 37 + KnxDatapointMainType_DPT_3X_2_BYTE_FLOAT_VALUE KnxDatapointMainType = 38 + KnxDatapointMainType_DPT_SCALING_SPEED KnxDatapointMainType = 39 + KnxDatapointMainType_DPT_4_1_1_BYTE_COMBINED_INFORMATION KnxDatapointMainType = 40 + KnxDatapointMainType_DPT_MBUS_ADDRESS KnxDatapointMainType = 41 + KnxDatapointMainType_DPT_3_BYTE_COLOUR_RGB KnxDatapointMainType = 42 + KnxDatapointMainType_DPT_LANGUAGE_CODE_ISO_639_1 KnxDatapointMainType = 43 KnxDatapointMainType_DPT_SIGNED_VALUE_WITH_CLASSIFICATION_AND_VALIDITY KnxDatapointMainType = 44 - KnxDatapointMainType_DPT_PRIORITISED_MODE_CONTROL KnxDatapointMainType = 45 - KnxDatapointMainType_DPT_CONFIGURATION_DIAGNOSTICS_16_BIT KnxDatapointMainType = 46 - KnxDatapointMainType_DPT_CONFIGURATION_DIAGNOSTICS_8_BIT KnxDatapointMainType = 47 - KnxDatapointMainType_DPT_POSITIONS KnxDatapointMainType = 48 - KnxDatapointMainType_DPT_STATUS_32_BIT KnxDatapointMainType = 49 - KnxDatapointMainType_DPT_STATUS_48_BIT KnxDatapointMainType = 50 - KnxDatapointMainType_DPT_CONVERTER_STATUS KnxDatapointMainType = 51 - KnxDatapointMainType_DPT_CONVERTER_TEST_RESULT KnxDatapointMainType = 52 - KnxDatapointMainType_DPT_BATTERY_INFORMATION KnxDatapointMainType = 53 - KnxDatapointMainType_DPT_BRIGHTNESS_COLOUR_TEMPERATURE_TRANSITION KnxDatapointMainType = 54 - KnxDatapointMainType_DPT_STATUS_24_BIT KnxDatapointMainType = 55 - KnxDatapointMainType_DPT_COLOUR_RGBW KnxDatapointMainType = 56 - KnxDatapointMainType_DPT_RELATIVE_CONTROL_RGBW KnxDatapointMainType = 57 - KnxDatapointMainType_DPT_RELATIVE_CONTROL_RGB KnxDatapointMainType = 58 - KnxDatapointMainType_DPT_F32F32 KnxDatapointMainType = 59 - KnxDatapointMainType_DPT_F16F16F16F16 KnxDatapointMainType = 60 + KnxDatapointMainType_DPT_PRIORITISED_MODE_CONTROL KnxDatapointMainType = 45 + KnxDatapointMainType_DPT_CONFIGURATION_DIAGNOSTICS_16_BIT KnxDatapointMainType = 46 + KnxDatapointMainType_DPT_CONFIGURATION_DIAGNOSTICS_8_BIT KnxDatapointMainType = 47 + KnxDatapointMainType_DPT_POSITIONS KnxDatapointMainType = 48 + KnxDatapointMainType_DPT_STATUS_32_BIT KnxDatapointMainType = 49 + KnxDatapointMainType_DPT_STATUS_48_BIT KnxDatapointMainType = 50 + KnxDatapointMainType_DPT_CONVERTER_STATUS KnxDatapointMainType = 51 + KnxDatapointMainType_DPT_CONVERTER_TEST_RESULT KnxDatapointMainType = 52 + KnxDatapointMainType_DPT_BATTERY_INFORMATION KnxDatapointMainType = 53 + KnxDatapointMainType_DPT_BRIGHTNESS_COLOUR_TEMPERATURE_TRANSITION KnxDatapointMainType = 54 + KnxDatapointMainType_DPT_STATUS_24_BIT KnxDatapointMainType = 55 + KnxDatapointMainType_DPT_COLOUR_RGBW KnxDatapointMainType = 56 + KnxDatapointMainType_DPT_RELATIVE_CONTROL_RGBW KnxDatapointMainType = 57 + KnxDatapointMainType_DPT_RELATIVE_CONTROL_RGB KnxDatapointMainType = 58 + KnxDatapointMainType_DPT_F32F32 KnxDatapointMainType = 59 + KnxDatapointMainType_DPT_F16F16F16F16 KnxDatapointMainType = 60 ) var KnxDatapointMainTypeValues []KnxDatapointMainType func init() { _ = errors.New - KnxDatapointMainTypeValues = []KnxDatapointMainType{ + KnxDatapointMainTypeValues = []KnxDatapointMainType { KnxDatapointMainType_DPT_UNKNOWN, KnxDatapointMainType_DPT_64_BIT_SET, KnxDatapointMainType_DPT_8_BYTE_UNSIGNED_VALUE, @@ -170,254 +170,193 @@ func init() { } } + func (e KnxDatapointMainType) Number() uint16 { - switch e { - case 0: - { /* '0' */ - return 0 + switch e { + case 0: { /* '0' */ + return 0 } - case 1: - { /* '1' */ - return 0 + case 1: { /* '1' */ + return 0 } - case 10: - { /* '10' */ - return 5 + case 10: { /* '10' */ + return 5 } - case 11: - { /* '11' */ - return 6 + case 11: { /* '11' */ + return 6 } - case 12: - { /* '12' */ - return 7 + case 12: { /* '12' */ + return 7 } - case 13: - { /* '13' */ - return 8 + case 13: { /* '13' */ + return 8 } - case 14: - { /* '14' */ - return 9 + case 14: { /* '14' */ + return 9 } - case 15: - { /* '15' */ - return 10 + case 15: { /* '15' */ + return 10 } - case 16: - { /* '16' */ - return 11 + case 16: { /* '16' */ + return 11 } - case 17: - { /* '17' */ - return 12 + case 17: { /* '17' */ + return 12 } - case 18: - { /* '18' */ - return 13 + case 18: { /* '18' */ + return 13 } - case 19: - { /* '19' */ - return 14 + case 19: { /* '19' */ + return 14 } - case 2: - { /* '2' */ - return 0 + case 2: { /* '2' */ + return 0 } - case 20: - { /* '20' */ - return 15 + case 20: { /* '20' */ + return 15 } - case 21: - { /* '21' */ - return 16 + case 21: { /* '21' */ + return 16 } - case 22: - { /* '22' */ - return 17 + case 22: { /* '22' */ + return 17 } - case 23: - { /* '23' */ - return 18 + case 23: { /* '23' */ + return 18 } - case 24: - { /* '24' */ - return 19 + case 24: { /* '24' */ + return 19 } - case 25: - { /* '25' */ - return 20 + case 25: { /* '25' */ + return 20 } - case 26: - { /* '26' */ - return 21 + case 26: { /* '26' */ + return 21 } - case 27: - { /* '27' */ - return 22 + case 27: { /* '27' */ + return 22 } - case 28: - { /* '28' */ - return 23 + case 28: { /* '28' */ + return 23 } - case 29: - { /* '29' */ - return 25 + case 29: { /* '29' */ + return 25 } - case 3: - { /* '3' */ - return 0 + case 3: { /* '3' */ + return 0 } - case 30: - { /* '30' */ - return 26 + case 30: { /* '30' */ + return 26 } - case 31: - { /* '31' */ - return 27 + case 31: { /* '31' */ + return 27 } - case 32: - { /* '32' */ - return 29 + case 32: { /* '32' */ + return 29 } - case 33: - { /* '33' */ - return 30 + case 33: { /* '33' */ + return 30 } - case 34: - { /* '34' */ - return 206 + case 34: { /* '34' */ + return 206 } - case 35: - { /* '35' */ - return 207 + case 35: { /* '35' */ + return 207 } - case 36: - { /* '36' */ - return 217 + case 36: { /* '36' */ + return 217 } - case 37: - { /* '37' */ - return 219 + case 37: { /* '37' */ + return 219 } - case 38: - { /* '38' */ - return 222 + case 38: { /* '38' */ + return 222 } - case 39: - { /* '39' */ - return 225 + case 39: { /* '39' */ + return 225 } - case 4: - { /* '4' */ - return 0 + case 4: { /* '4' */ + return 0 } - case 40: - { /* '40' */ - return 229 + case 40: { /* '40' */ + return 229 } - case 41: - { /* '41' */ - return 230 + case 41: { /* '41' */ + return 230 } - case 42: - { /* '42' */ - return 232 + case 42: { /* '42' */ + return 232 } - case 43: - { /* '43' */ - return 234 + case 43: { /* '43' */ + return 234 } - case 44: - { /* '44' */ - return 235 + case 44: { /* '44' */ + return 235 } - case 45: - { /* '45' */ - return 236 + case 45: { /* '45' */ + return 236 } - case 46: - { /* '46' */ - return 237 + case 46: { /* '46' */ + return 237 } - case 47: - { /* '47' */ - return 238 + case 47: { /* '47' */ + return 238 } - case 48: - { /* '48' */ - return 240 + case 48: { /* '48' */ + return 240 } - case 49: - { /* '49' */ - return 241 + case 49: { /* '49' */ + return 241 } - case 5: - { /* '5' */ - return 0 + case 5: { /* '5' */ + return 0 } - case 50: - { /* '50' */ - return 242 + case 50: { /* '50' */ + return 242 } - case 51: - { /* '51' */ - return 244 + case 51: { /* '51' */ + return 244 } - case 52: - { /* '52' */ - return 245 + case 52: { /* '52' */ + return 245 } - case 53: - { /* '53' */ - return 246 + case 53: { /* '53' */ + return 246 } - case 54: - { /* '54' */ - return 249 + case 54: { /* '54' */ + return 249 } - case 55: - { /* '55' */ - return 250 + case 55: { /* '55' */ + return 250 } - case 56: - { /* '56' */ - return 251 + case 56: { /* '56' */ + return 251 } - case 57: - { /* '57' */ - return 252 + case 57: { /* '57' */ + return 252 } - case 58: - { /* '58' */ - return 254 + case 58: { /* '58' */ + return 254 } - case 59: - { /* '59' */ - return 255 + case 59: { /* '59' */ + return 255 } - case 6: - { /* '6' */ - return 1 + case 6: { /* '6' */ + return 1 } - case 60: - { /* '60' */ - return 275 + case 60: { /* '60' */ + return 275 } - case 7: - { /* '7' */ - return 2 + case 7: { /* '7' */ + return 2 } - case 8: - { /* '8' */ - return 3 + case 8: { /* '8' */ + return 3 } - case 9: - { /* '9' */ - return 4 + case 9: { /* '9' */ + return 4 } - default: - { + default: { return 0 } } @@ -433,253 +372,191 @@ func KnxDatapointMainTypeFirstEnumForFieldNumber(value uint16) (KnxDatapointMain } func (e KnxDatapointMainType) Name() string { - switch e { - case 0: - { /* '0' */ - return "Unknown Datapoint Type" + switch e { + case 0: { /* '0' */ + return "Unknown Datapoint Type" } - case 1: - { /* '1' */ - return "Unknown Datapoint Type" + case 1: { /* '1' */ + return "Unknown Datapoint Type" } - case 10: - { /* '10' */ - return "8-bit unsigned value" + case 10: { /* '10' */ + return "8-bit unsigned value" } - case 11: - { /* '11' */ - return "8-bit signed value" + case 11: { /* '11' */ + return "8-bit signed value" } - case 12: - { /* '12' */ - return "2-byte unsigned value" + case 12: { /* '12' */ + return "2-byte unsigned value" } - case 13: - { /* '13' */ - return "2-byte signed value" + case 13: { /* '13' */ + return "2-byte signed value" } - case 14: - { /* '14' */ - return "2-byte float value" + case 14: { /* '14' */ + return "2-byte float value" } - case 15: - { /* '15' */ - return "time" + case 15: { /* '15' */ + return "time" } - case 16: - { /* '16' */ - return "date" + case 16: { /* '16' */ + return "date" } - case 17: - { /* '17' */ - return "4-byte unsigned value" + case 17: { /* '17' */ + return "4-byte unsigned value" } - case 18: - { /* '18' */ - return "4-byte signed value" + case 18: { /* '18' */ + return "4-byte signed value" } - case 19: - { /* '19' */ - return "4-byte float value" + case 19: { /* '19' */ + return "4-byte float value" } - case 2: - { /* '2' */ - return "Unknown Datapoint Type" + case 2: { /* '2' */ + return "Unknown Datapoint Type" } - case 20: - { /* '20' */ - return "entrance access" + case 20: { /* '20' */ + return "entrance access" } - case 21: - { /* '21' */ - return "character string" + case 21: { /* '21' */ + return "character string" } - case 22: - { /* '22' */ - return "scene number" + case 22: { /* '22' */ + return "scene number" } - case 23: - { /* '23' */ - return "scene control" + case 23: { /* '23' */ + return "scene control" } - case 24: - { /* '24' */ - return "Date Time" + case 24: { /* '24' */ + return "Date Time" } - case 25: - { /* '25' */ - return "1-byte" + case 25: { /* '25' */ + return "1-byte" } - case 26: - { /* '26' */ - return "8-bit set" + case 26: { /* '26' */ + return "8-bit set" } - case 27: - { /* '27' */ - return "16-bit set" + case 27: { /* '27' */ + return "16-bit set" } - case 28: - { /* '28' */ - return "2-bit set" + case 28: { /* '28' */ + return "2-bit set" } - case 29: - { /* '29' */ - return "2-nibble set" + case 29: { /* '29' */ + return "2-nibble set" } - case 3: - { /* '3' */ - return "Unknown Datapoint Type" + case 3: { /* '3' */ + return "Unknown Datapoint Type" } - case 30: - { /* '30' */ - return "8-bit set" + case 30: { /* '30' */ + return "8-bit set" } - case 31: - { /* '31' */ - return "32-bit set" + case 31: { /* '31' */ + return "32-bit set" } - case 32: - { /* '32' */ - return "electrical energy" + case 32: { /* '32' */ + return "electrical energy" } - case 33: - { /* '33' */ - return "24 times channel activation" + case 33: { /* '33' */ + return "24 times channel activation" } - case 34: - { /* '34' */ - return "16-bit unsigned value & 8-bit enum" + case 34: { /* '34' */ + return "16-bit unsigned value & 8-bit enum" } - case 35: - { /* '35' */ - return "8-bit unsigned value & 8-bit enum" + case 35: { /* '35' */ + return "8-bit unsigned value & 8-bit enum" } - case 36: - { /* '36' */ - return "datapoint type version" + case 36: { /* '36' */ + return "datapoint type version" } - case 37: - { /* '37' */ - return "alarm info" + case 37: { /* '37' */ + return "alarm info" } - case 38: - { /* '38' */ - return "3x 2-byte float value" + case 38: { /* '38' */ + return "3x 2-byte float value" } - case 39: - { /* '39' */ - return "scaling speed" + case 39: { /* '39' */ + return "scaling speed" } - case 4: - { /* '4' */ - return "Unknown Datapoint Type" + case 4: { /* '4' */ + return "Unknown Datapoint Type" } - case 40: - { /* '40' */ - return "4-1-1 byte combined information" + case 40: { /* '40' */ + return "4-1-1 byte combined information" } - case 41: - { /* '41' */ - return "MBus address" + case 41: { /* '41' */ + return "MBus address" } - case 42: - { /* '42' */ - return "3-byte colour RGB" + case 42: { /* '42' */ + return "3-byte colour RGB" } - case 43: - { /* '43' */ - return "language code ISO 639-1" + case 43: { /* '43' */ + return "language code ISO 639-1" } - case 44: - { /* '44' */ - return "Signed value with classification and validity" + case 44: { /* '44' */ + return "Signed value with classification and validity" } - case 45: - { /* '45' */ - return "Prioritised Mode Control" + case 45: { /* '45' */ + return "Prioritised Mode Control" } - case 46: - { /* '46' */ - return "configuration/ diagnostics" + case 46: { /* '46' */ + return "configuration/ diagnostics" } - case 47: - { /* '47' */ - return "configuration/ diagnostics" + case 47: { /* '47' */ + return "configuration/ diagnostics" } - case 48: - { /* '48' */ - return "positions" + case 48: { /* '48' */ + return "positions" } - case 49: - { /* '49' */ - return "status" + case 49: { /* '49' */ + return "status" } - case 5: - { /* '5' */ - return "Unknown Datapoint Type" + case 5: { /* '5' */ + return "Unknown Datapoint Type" } - case 50: - { /* '50' */ - return "status" + case 50: { /* '50' */ + return "status" } - case 51: - { /* '51' */ - return "Converter Status" + case 51: { /* '51' */ + return "Converter Status" } - case 52: - { /* '52' */ - return "Converter test result" + case 52: { /* '52' */ + return "Converter test result" } - case 53: - { /* '53' */ - return "Battery Information" + case 53: { /* '53' */ + return "Battery Information" } - case 54: - { /* '54' */ - return "brightness colour temperature transition" + case 54: { /* '54' */ + return "brightness colour temperature transition" } - case 55: - { /* '55' */ - return "status" + case 55: { /* '55' */ + return "status" } - case 56: - { /* '56' */ - return "Colour RGBW" + case 56: { /* '56' */ + return "Colour RGBW" } - case 57: - { /* '57' */ - return "Relative Control RGBW" + case 57: { /* '57' */ + return "Relative Control RGBW" } - case 58: - { /* '58' */ - return "Relative Control RGB" + case 58: { /* '58' */ + return "Relative Control RGB" } - case 59: - { /* '59' */ - return "F32F32" + case 59: { /* '59' */ + return "F32F32" } - case 6: - { /* '6' */ - return "1-bit" + case 6: { /* '6' */ + return "1-bit" } - case 60: - { /* '60' */ - return "F16F16F16F16" + case 60: { /* '60' */ + return "F16F16F16F16" } - case 7: - { /* '7' */ - return "1-bit controlled" + case 7: { /* '7' */ + return "1-bit controlled" } - case 8: - { /* '8' */ - return "3-bit controlled" + case 8: { /* '8' */ + return "3-bit controlled" } - case 9: - { /* '9' */ - return "character" + case 9: { /* '9' */ + return "character" } - default: - { + default: { return "" } } @@ -695,253 +572,191 @@ func KnxDatapointMainTypeFirstEnumForFieldName(value string) (KnxDatapointMainTy } func (e KnxDatapointMainType) SizeInBits() uint8 { - switch e { - case 0: - { /* '0' */ - return 0 + switch e { + case 0: { /* '0' */ + return 0 } - case 1: - { /* '1' */ - return 64 + case 1: { /* '1' */ + return 64 } - case 10: - { /* '10' */ - return 8 + case 10: { /* '10' */ + return 8 } - case 11: - { /* '11' */ - return 8 + case 11: { /* '11' */ + return 8 } - case 12: - { /* '12' */ - return 16 + case 12: { /* '12' */ + return 16 } - case 13: - { /* '13' */ - return 16 + case 13: { /* '13' */ + return 16 } - case 14: - { /* '14' */ - return 16 + case 14: { /* '14' */ + return 16 } - case 15: - { /* '15' */ - return 24 + case 15: { /* '15' */ + return 24 } - case 16: - { /* '16' */ - return 24 + case 16: { /* '16' */ + return 24 } - case 17: - { /* '17' */ - return 32 + case 17: { /* '17' */ + return 32 } - case 18: - { /* '18' */ - return 32 + case 18: { /* '18' */ + return 32 } - case 19: - { /* '19' */ - return 32 + case 19: { /* '19' */ + return 32 } - case 2: - { /* '2' */ - return 64 + case 2: { /* '2' */ + return 64 } - case 20: - { /* '20' */ - return 32 + case 20: { /* '20' */ + return 32 } - case 21: - { /* '21' */ - return 112 + case 21: { /* '21' */ + return 112 } - case 22: - { /* '22' */ - return 8 + case 22: { /* '22' */ + return 8 } - case 23: - { /* '23' */ - return 8 + case 23: { /* '23' */ + return 8 } - case 24: - { /* '24' */ - return 64 + case 24: { /* '24' */ + return 64 } - case 25: - { /* '25' */ - return 8 + case 25: { /* '25' */ + return 8 } - case 26: - { /* '26' */ - return 8 + case 26: { /* '26' */ + return 8 } - case 27: - { /* '27' */ - return 16 + case 27: { /* '27' */ + return 16 } - case 28: - { /* '28' */ - return 2 + case 28: { /* '28' */ + return 2 } - case 29: - { /* '29' */ - return 8 + case 29: { /* '29' */ + return 8 } - case 3: - { /* '3' */ - return 64 + case 3: { /* '3' */ + return 64 } - case 30: - { /* '30' */ - return 8 + case 30: { /* '30' */ + return 8 } - case 31: - { /* '31' */ - return 32 + case 31: { /* '31' */ + return 32 } - case 32: - { /* '32' */ - return 64 + case 32: { /* '32' */ + return 64 } - case 33: - { /* '33' */ - return 24 + case 33: { /* '33' */ + return 24 } - case 34: - { /* '34' */ - return 24 + case 34: { /* '34' */ + return 24 } - case 35: - { /* '35' */ - return 16 + case 35: { /* '35' */ + return 16 } - case 36: - { /* '36' */ - return 16 + case 36: { /* '36' */ + return 16 } - case 37: - { /* '37' */ - return 48 + case 37: { /* '37' */ + return 48 } - case 38: - { /* '38' */ - return 48 + case 38: { /* '38' */ + return 48 } - case 39: - { /* '39' */ - return 24 + case 39: { /* '39' */ + return 24 } - case 4: - { /* '4' */ - return 96 + case 4: { /* '4' */ + return 96 } - case 40: - { /* '40' */ - return 48 + case 40: { /* '40' */ + return 48 } - case 41: - { /* '41' */ - return 64 + case 41: { /* '41' */ + return 64 } - case 42: - { /* '42' */ - return 24 + case 42: { /* '42' */ + return 24 } - case 43: - { /* '43' */ - return 16 + case 43: { /* '43' */ + return 16 } - case 44: - { /* '44' */ - return 48 + case 44: { /* '44' */ + return 48 } - case 45: - { /* '45' */ - return 8 + case 45: { /* '45' */ + return 8 } - case 46: - { /* '46' */ - return 16 + case 46: { /* '46' */ + return 16 } - case 47: - { /* '47' */ - return 8 + case 47: { /* '47' */ + return 8 } - case 48: - { /* '48' */ - return 24 + case 48: { /* '48' */ + return 24 } - case 49: - { /* '49' */ - return 32 + case 49: { /* '49' */ + return 32 } - case 5: - { /* '5' */ - return 64 + case 5: { /* '5' */ + return 64 } - case 50: - { /* '50' */ - return 48 + case 50: { /* '50' */ + return 48 } - case 51: - { /* '51' */ - return 16 + case 51: { /* '51' */ + return 16 } - case 52: - { /* '52' */ - return 48 + case 52: { /* '52' */ + return 48 } - case 53: - { /* '53' */ - return 16 + case 53: { /* '53' */ + return 16 } - case 54: - { /* '54' */ - return 48 + case 54: { /* '54' */ + return 48 } - case 55: - { /* '55' */ - return 24 + case 55: { /* '55' */ + return 24 } - case 56: - { /* '56' */ - return 48 + case 56: { /* '56' */ + return 48 } - case 57: - { /* '57' */ - return 40 + case 57: { /* '57' */ + return 40 } - case 58: - { /* '58' */ - return 24 + case 58: { /* '58' */ + return 24 } - case 59: - { /* '59' */ - return 64 + case 59: { /* '59' */ + return 64 } - case 6: - { /* '6' */ - return 1 + case 6: { /* '6' */ + return 1 } - case 60: - { /* '60' */ - return 64 + case 60: { /* '60' */ + return 64 } - case 7: - { /* '7' */ - return 2 + case 7: { /* '7' */ + return 2 } - case 8: - { /* '8' */ - return 4 + case 8: { /* '8' */ + return 4 } - case 9: - { /* '9' */ - return 8 + case 9: { /* '9' */ + return 8 } - default: - { + default: { return 0 } } @@ -957,128 +772,128 @@ func KnxDatapointMainTypeFirstEnumForFieldSizeInBits(value uint8) (KnxDatapointM } func KnxDatapointMainTypeByValue(value uint16) (enum KnxDatapointMainType, ok bool) { switch value { - case 0: - return KnxDatapointMainType_DPT_UNKNOWN, true - case 1: - return KnxDatapointMainType_DPT_64_BIT_SET, true - case 10: - return KnxDatapointMainType_DPT_8_BIT_UNSIGNED_VALUE, true - case 11: - return KnxDatapointMainType_DPT_8_BIT_SIGNED_VALUE, true - case 12: - return KnxDatapointMainType_DPT_2_BYTE_UNSIGNED_VALUE, true - case 13: - return KnxDatapointMainType_DPT_2_BYTE_SIGNED_VALUE, true - case 14: - return KnxDatapointMainType_DPT_2_BYTE_FLOAT_VALUE, true - case 15: - return KnxDatapointMainType_DPT_TIME, true - case 16: - return KnxDatapointMainType_DPT_DATE, true - case 17: - return KnxDatapointMainType_DPT_4_BYTE_UNSIGNED_VALUE, true - case 18: - return KnxDatapointMainType_DPT_4_BYTE_SIGNED_VALUE, true - case 19: - return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE, true - case 2: - return KnxDatapointMainType_DPT_8_BYTE_UNSIGNED_VALUE, true - case 20: - return KnxDatapointMainType_DPT_ENTRANCE_ACCESS, true - case 21: - return KnxDatapointMainType_DPT_CHARACTER_STRING, true - case 22: - return KnxDatapointMainType_DPT_SCENE_NUMBER, true - case 23: - return KnxDatapointMainType_DPT_SCENE_CONTROL, true - case 24: - return KnxDatapointMainType_DPT_DATE_TIME, true - case 25: - return KnxDatapointMainType_DPT_1_BYTE, true - case 26: - return KnxDatapointMainType_DPT_8_BIT_SET, true - case 27: - return KnxDatapointMainType_DPT_16_BIT_SET, true - case 28: - return KnxDatapointMainType_DPT_2_BIT_SET, true - case 29: - return KnxDatapointMainType_DPT_2_NIBBLE_SET, true - case 3: - return KnxDatapointMainType_DPT_8_BYTE_SIGNED_VALUE, true - case 30: - return KnxDatapointMainType_DPT_8_BIT_SET_2, true - case 31: - return KnxDatapointMainType_DPT_32_BIT_SET, true - case 32: - return KnxDatapointMainType_DPT_ELECTRICAL_ENERGY, true - case 33: - return KnxDatapointMainType_DPT_24_TIMES_CHANNEL_ACTIVATION, true - case 34: - return KnxDatapointMainType_DPT_16_BIT_UNSIGNED_VALUE_AND_8_BIT_ENUM, true - case 35: - return KnxDatapointMainType_DPT_8_BIT_UNSIGNED_VALUE_AND_8_BIT_ENUM, true - case 36: - return KnxDatapointMainType_DPT_DATAPOINT_TYPE_VERSION, true - case 37: - return KnxDatapointMainType_DPT_ALARM_INFO, true - case 38: - return KnxDatapointMainType_DPT_3X_2_BYTE_FLOAT_VALUE, true - case 39: - return KnxDatapointMainType_DPT_SCALING_SPEED, true - case 4: - return KnxDatapointMainType_DPT_12_BYTE_SIGNED_VALUE, true - case 40: - return KnxDatapointMainType_DPT_4_1_1_BYTE_COMBINED_INFORMATION, true - case 41: - return KnxDatapointMainType_DPT_MBUS_ADDRESS, true - case 42: - return KnxDatapointMainType_DPT_3_BYTE_COLOUR_RGB, true - case 43: - return KnxDatapointMainType_DPT_LANGUAGE_CODE_ISO_639_1, true - case 44: - return KnxDatapointMainType_DPT_SIGNED_VALUE_WITH_CLASSIFICATION_AND_VALIDITY, true - case 45: - return KnxDatapointMainType_DPT_PRIORITISED_MODE_CONTROL, true - case 46: - return KnxDatapointMainType_DPT_CONFIGURATION_DIAGNOSTICS_16_BIT, true - case 47: - return KnxDatapointMainType_DPT_CONFIGURATION_DIAGNOSTICS_8_BIT, true - case 48: - return KnxDatapointMainType_DPT_POSITIONS, true - case 49: - return KnxDatapointMainType_DPT_STATUS_32_BIT, true - case 5: - return KnxDatapointMainType_DPT_8_BYTE_FLOAT_VALUE, true - case 50: - return KnxDatapointMainType_DPT_STATUS_48_BIT, true - case 51: - return KnxDatapointMainType_DPT_CONVERTER_STATUS, true - case 52: - return KnxDatapointMainType_DPT_CONVERTER_TEST_RESULT, true - case 53: - return KnxDatapointMainType_DPT_BATTERY_INFORMATION, true - case 54: - return KnxDatapointMainType_DPT_BRIGHTNESS_COLOUR_TEMPERATURE_TRANSITION, true - case 55: - return KnxDatapointMainType_DPT_STATUS_24_BIT, true - case 56: - return KnxDatapointMainType_DPT_COLOUR_RGBW, true - case 57: - return KnxDatapointMainType_DPT_RELATIVE_CONTROL_RGBW, true - case 58: - return KnxDatapointMainType_DPT_RELATIVE_CONTROL_RGB, true - case 59: - return KnxDatapointMainType_DPT_F32F32, true - case 6: - return KnxDatapointMainType_DPT_1_BIT, true - case 60: - return KnxDatapointMainType_DPT_F16F16F16F16, true - case 7: - return KnxDatapointMainType_DPT_1_BIT_CONTROLLED, true - case 8: - return KnxDatapointMainType_DPT_3_BIT_CONTROLLED, true - case 9: - return KnxDatapointMainType_DPT_CHARACTER, true + case 0: + return KnxDatapointMainType_DPT_UNKNOWN, true + case 1: + return KnxDatapointMainType_DPT_64_BIT_SET, true + case 10: + return KnxDatapointMainType_DPT_8_BIT_UNSIGNED_VALUE, true + case 11: + return KnxDatapointMainType_DPT_8_BIT_SIGNED_VALUE, true + case 12: + return KnxDatapointMainType_DPT_2_BYTE_UNSIGNED_VALUE, true + case 13: + return KnxDatapointMainType_DPT_2_BYTE_SIGNED_VALUE, true + case 14: + return KnxDatapointMainType_DPT_2_BYTE_FLOAT_VALUE, true + case 15: + return KnxDatapointMainType_DPT_TIME, true + case 16: + return KnxDatapointMainType_DPT_DATE, true + case 17: + return KnxDatapointMainType_DPT_4_BYTE_UNSIGNED_VALUE, true + case 18: + return KnxDatapointMainType_DPT_4_BYTE_SIGNED_VALUE, true + case 19: + return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE, true + case 2: + return KnxDatapointMainType_DPT_8_BYTE_UNSIGNED_VALUE, true + case 20: + return KnxDatapointMainType_DPT_ENTRANCE_ACCESS, true + case 21: + return KnxDatapointMainType_DPT_CHARACTER_STRING, true + case 22: + return KnxDatapointMainType_DPT_SCENE_NUMBER, true + case 23: + return KnxDatapointMainType_DPT_SCENE_CONTROL, true + case 24: + return KnxDatapointMainType_DPT_DATE_TIME, true + case 25: + return KnxDatapointMainType_DPT_1_BYTE, true + case 26: + return KnxDatapointMainType_DPT_8_BIT_SET, true + case 27: + return KnxDatapointMainType_DPT_16_BIT_SET, true + case 28: + return KnxDatapointMainType_DPT_2_BIT_SET, true + case 29: + return KnxDatapointMainType_DPT_2_NIBBLE_SET, true + case 3: + return KnxDatapointMainType_DPT_8_BYTE_SIGNED_VALUE, true + case 30: + return KnxDatapointMainType_DPT_8_BIT_SET_2, true + case 31: + return KnxDatapointMainType_DPT_32_BIT_SET, true + case 32: + return KnxDatapointMainType_DPT_ELECTRICAL_ENERGY, true + case 33: + return KnxDatapointMainType_DPT_24_TIMES_CHANNEL_ACTIVATION, true + case 34: + return KnxDatapointMainType_DPT_16_BIT_UNSIGNED_VALUE_AND_8_BIT_ENUM, true + case 35: + return KnxDatapointMainType_DPT_8_BIT_UNSIGNED_VALUE_AND_8_BIT_ENUM, true + case 36: + return KnxDatapointMainType_DPT_DATAPOINT_TYPE_VERSION, true + case 37: + return KnxDatapointMainType_DPT_ALARM_INFO, true + case 38: + return KnxDatapointMainType_DPT_3X_2_BYTE_FLOAT_VALUE, true + case 39: + return KnxDatapointMainType_DPT_SCALING_SPEED, true + case 4: + return KnxDatapointMainType_DPT_12_BYTE_SIGNED_VALUE, true + case 40: + return KnxDatapointMainType_DPT_4_1_1_BYTE_COMBINED_INFORMATION, true + case 41: + return KnxDatapointMainType_DPT_MBUS_ADDRESS, true + case 42: + return KnxDatapointMainType_DPT_3_BYTE_COLOUR_RGB, true + case 43: + return KnxDatapointMainType_DPT_LANGUAGE_CODE_ISO_639_1, true + case 44: + return KnxDatapointMainType_DPT_SIGNED_VALUE_WITH_CLASSIFICATION_AND_VALIDITY, true + case 45: + return KnxDatapointMainType_DPT_PRIORITISED_MODE_CONTROL, true + case 46: + return KnxDatapointMainType_DPT_CONFIGURATION_DIAGNOSTICS_16_BIT, true + case 47: + return KnxDatapointMainType_DPT_CONFIGURATION_DIAGNOSTICS_8_BIT, true + case 48: + return KnxDatapointMainType_DPT_POSITIONS, true + case 49: + return KnxDatapointMainType_DPT_STATUS_32_BIT, true + case 5: + return KnxDatapointMainType_DPT_8_BYTE_FLOAT_VALUE, true + case 50: + return KnxDatapointMainType_DPT_STATUS_48_BIT, true + case 51: + return KnxDatapointMainType_DPT_CONVERTER_STATUS, true + case 52: + return KnxDatapointMainType_DPT_CONVERTER_TEST_RESULT, true + case 53: + return KnxDatapointMainType_DPT_BATTERY_INFORMATION, true + case 54: + return KnxDatapointMainType_DPT_BRIGHTNESS_COLOUR_TEMPERATURE_TRANSITION, true + case 55: + return KnxDatapointMainType_DPT_STATUS_24_BIT, true + case 56: + return KnxDatapointMainType_DPT_COLOUR_RGBW, true + case 57: + return KnxDatapointMainType_DPT_RELATIVE_CONTROL_RGBW, true + case 58: + return KnxDatapointMainType_DPT_RELATIVE_CONTROL_RGB, true + case 59: + return KnxDatapointMainType_DPT_F32F32, true + case 6: + return KnxDatapointMainType_DPT_1_BIT, true + case 60: + return KnxDatapointMainType_DPT_F16F16F16F16, true + case 7: + return KnxDatapointMainType_DPT_1_BIT_CONTROLLED, true + case 8: + return KnxDatapointMainType_DPT_3_BIT_CONTROLLED, true + case 9: + return KnxDatapointMainType_DPT_CHARACTER, true } return 0, false } @@ -1211,13 +1026,13 @@ func KnxDatapointMainTypeByName(value string) (enum KnxDatapointMainType, ok boo return 0, false } -func KnxDatapointMainTypeKnows(value uint16) bool { +func KnxDatapointMainTypeKnows(value uint16) bool { for _, typeValue := range KnxDatapointMainTypeValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastKnxDatapointMainType(structType interface{}) KnxDatapointMainType { @@ -1399,3 +1214,4 @@ func (e KnxDatapointMainType) PLC4XEnumName() string { func (e KnxDatapointMainType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/knxnetip/readwrite/model/KnxDatapointType.go b/plc4go/protocols/knxnetip/readwrite/model/KnxDatapointType.go index 62eb51f9b81..45032159e02 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/KnxDatapointType.go +++ b/plc4go/protocols/knxnetip/readwrite/model/KnxDatapointType.go @@ -37,364 +37,364 @@ type IKnxDatapointType interface { DatapointMainType() KnxDatapointMainType } -const ( - KnxDatapointType_DPT_UNKNOWN KnxDatapointType = 0 - KnxDatapointType_BOOL KnxDatapointType = 1 - KnxDatapointType_BYTE KnxDatapointType = 2 - KnxDatapointType_WORD KnxDatapointType = 3 - KnxDatapointType_DWORD KnxDatapointType = 4 - KnxDatapointType_LWORD KnxDatapointType = 5 - KnxDatapointType_USINT KnxDatapointType = 6 - KnxDatapointType_SINT KnxDatapointType = 7 - KnxDatapointType_UINT KnxDatapointType = 8 - KnxDatapointType_INT KnxDatapointType = 9 - KnxDatapointType_UDINT KnxDatapointType = 10 - KnxDatapointType_DINT KnxDatapointType = 11 - KnxDatapointType_ULINT KnxDatapointType = 12 - KnxDatapointType_LINT KnxDatapointType = 13 - KnxDatapointType_REAL KnxDatapointType = 14 - KnxDatapointType_LREAL KnxDatapointType = 15 - KnxDatapointType_CHAR KnxDatapointType = 16 - KnxDatapointType_WCHAR KnxDatapointType = 17 - KnxDatapointType_STRING KnxDatapointType = 18 - KnxDatapointType_WSTRING KnxDatapointType = 19 - KnxDatapointType_TIME KnxDatapointType = 20 - KnxDatapointType_LTIME KnxDatapointType = 21 - KnxDatapointType_DATE KnxDatapointType = 22 - KnxDatapointType_TIME_OF_DAY KnxDatapointType = 23 - KnxDatapointType_TOD KnxDatapointType = 24 - KnxDatapointType_DATE_AND_TIME KnxDatapointType = 25 - KnxDatapointType_DT KnxDatapointType = 26 - KnxDatapointType_DPT_Switch KnxDatapointType = 27 - KnxDatapointType_DPT_Bool KnxDatapointType = 28 - KnxDatapointType_DPT_Enable KnxDatapointType = 29 - KnxDatapointType_DPT_Ramp KnxDatapointType = 30 - KnxDatapointType_DPT_Alarm KnxDatapointType = 31 - KnxDatapointType_DPT_BinaryValue KnxDatapointType = 32 - KnxDatapointType_DPT_Step KnxDatapointType = 33 - KnxDatapointType_DPT_UpDown KnxDatapointType = 34 - KnxDatapointType_DPT_OpenClose KnxDatapointType = 35 - KnxDatapointType_DPT_Start KnxDatapointType = 36 - KnxDatapointType_DPT_State KnxDatapointType = 37 - KnxDatapointType_DPT_Invert KnxDatapointType = 38 - KnxDatapointType_DPT_DimSendStyle KnxDatapointType = 39 - KnxDatapointType_DPT_InputSource KnxDatapointType = 40 - KnxDatapointType_DPT_Reset KnxDatapointType = 41 - KnxDatapointType_DPT_Ack KnxDatapointType = 42 - KnxDatapointType_DPT_Trigger KnxDatapointType = 43 - KnxDatapointType_DPT_Occupancy KnxDatapointType = 44 - KnxDatapointType_DPT_Window_Door KnxDatapointType = 45 - KnxDatapointType_DPT_LogicalFunction KnxDatapointType = 46 - KnxDatapointType_DPT_Scene_AB KnxDatapointType = 47 - KnxDatapointType_DPT_ShutterBlinds_Mode KnxDatapointType = 48 - KnxDatapointType_DPT_DayNight KnxDatapointType = 49 - KnxDatapointType_DPT_Heat_Cool KnxDatapointType = 50 - KnxDatapointType_DPT_Switch_Control KnxDatapointType = 51 - KnxDatapointType_DPT_Bool_Control KnxDatapointType = 52 - KnxDatapointType_DPT_Enable_Control KnxDatapointType = 53 - KnxDatapointType_DPT_Ramp_Control KnxDatapointType = 54 - KnxDatapointType_DPT_Alarm_Control KnxDatapointType = 55 - KnxDatapointType_DPT_BinaryValue_Control KnxDatapointType = 56 - KnxDatapointType_DPT_Step_Control KnxDatapointType = 57 - KnxDatapointType_DPT_Direction1_Control KnxDatapointType = 58 - KnxDatapointType_DPT_Direction2_Control KnxDatapointType = 59 - KnxDatapointType_DPT_Start_Control KnxDatapointType = 60 - KnxDatapointType_DPT_State_Control KnxDatapointType = 61 - KnxDatapointType_DPT_Invert_Control KnxDatapointType = 62 - KnxDatapointType_DPT_Control_Dimming KnxDatapointType = 63 - KnxDatapointType_DPT_Control_Blinds KnxDatapointType = 64 - KnxDatapointType_DPT_Char_ASCII KnxDatapointType = 65 - KnxDatapointType_DPT_Char_8859_1 KnxDatapointType = 66 - KnxDatapointType_DPT_Scaling KnxDatapointType = 67 - KnxDatapointType_DPT_Angle KnxDatapointType = 68 - KnxDatapointType_DPT_Percent_U8 KnxDatapointType = 69 - KnxDatapointType_DPT_DecimalFactor KnxDatapointType = 70 - KnxDatapointType_DPT_Tariff KnxDatapointType = 71 - KnxDatapointType_DPT_Value_1_Ucount KnxDatapointType = 72 - KnxDatapointType_DPT_FanStage KnxDatapointType = 73 - KnxDatapointType_DPT_Percent_V8 KnxDatapointType = 74 - KnxDatapointType_DPT_Value_1_Count KnxDatapointType = 75 - KnxDatapointType_DPT_Status_Mode3 KnxDatapointType = 76 - KnxDatapointType_DPT_Value_2_Ucount KnxDatapointType = 77 - KnxDatapointType_DPT_TimePeriodMsec KnxDatapointType = 78 - KnxDatapointType_DPT_TimePeriod10Msec KnxDatapointType = 79 - KnxDatapointType_DPT_TimePeriod100Msec KnxDatapointType = 80 - KnxDatapointType_DPT_TimePeriodSec KnxDatapointType = 81 - KnxDatapointType_DPT_TimePeriodMin KnxDatapointType = 82 - KnxDatapointType_DPT_TimePeriodHrs KnxDatapointType = 83 - KnxDatapointType_DPT_PropDataType KnxDatapointType = 84 - KnxDatapointType_DPT_Length_mm KnxDatapointType = 85 - KnxDatapointType_DPT_UElCurrentmA KnxDatapointType = 86 - KnxDatapointType_DPT_Brightness KnxDatapointType = 87 - KnxDatapointType_DPT_Absolute_Colour_Temperature KnxDatapointType = 88 - KnxDatapointType_DPT_Value_2_Count KnxDatapointType = 89 - KnxDatapointType_DPT_DeltaTimeMsec KnxDatapointType = 90 - KnxDatapointType_DPT_DeltaTime10Msec KnxDatapointType = 91 - KnxDatapointType_DPT_DeltaTime100Msec KnxDatapointType = 92 - KnxDatapointType_DPT_DeltaTimeSec KnxDatapointType = 93 - KnxDatapointType_DPT_DeltaTimeMin KnxDatapointType = 94 - KnxDatapointType_DPT_DeltaTimeHrs KnxDatapointType = 95 - KnxDatapointType_DPT_Percent_V16 KnxDatapointType = 96 - KnxDatapointType_DPT_Rotation_Angle KnxDatapointType = 97 - KnxDatapointType_DPT_Length_m KnxDatapointType = 98 - KnxDatapointType_DPT_Value_Temp KnxDatapointType = 99 - KnxDatapointType_DPT_Value_Tempd KnxDatapointType = 100 - KnxDatapointType_DPT_Value_Tempa KnxDatapointType = 101 - KnxDatapointType_DPT_Value_Lux KnxDatapointType = 102 - KnxDatapointType_DPT_Value_Wsp KnxDatapointType = 103 - KnxDatapointType_DPT_Value_Pres KnxDatapointType = 104 - KnxDatapointType_DPT_Value_Humidity KnxDatapointType = 105 - KnxDatapointType_DPT_Value_AirQuality KnxDatapointType = 106 - KnxDatapointType_DPT_Value_AirFlow KnxDatapointType = 107 - KnxDatapointType_DPT_Value_Time1 KnxDatapointType = 108 - KnxDatapointType_DPT_Value_Time2 KnxDatapointType = 109 - KnxDatapointType_DPT_Value_Volt KnxDatapointType = 110 - KnxDatapointType_DPT_Value_Curr KnxDatapointType = 111 - KnxDatapointType_DPT_PowerDensity KnxDatapointType = 112 - KnxDatapointType_DPT_KelvinPerPercent KnxDatapointType = 113 - KnxDatapointType_DPT_Power KnxDatapointType = 114 - KnxDatapointType_DPT_Value_Volume_Flow KnxDatapointType = 115 - KnxDatapointType_DPT_Rain_Amount KnxDatapointType = 116 - KnxDatapointType_DPT_Value_Temp_F KnxDatapointType = 117 - KnxDatapointType_DPT_Value_Wsp_kmh KnxDatapointType = 118 - KnxDatapointType_DPT_Value_Absolute_Humidity KnxDatapointType = 119 - KnxDatapointType_DPT_Concentration_ygm3 KnxDatapointType = 120 - KnxDatapointType_DPT_TimeOfDay KnxDatapointType = 121 - KnxDatapointType_DPT_Date KnxDatapointType = 122 - KnxDatapointType_DPT_Value_4_Ucount KnxDatapointType = 123 - KnxDatapointType_DPT_LongTimePeriod_Sec KnxDatapointType = 124 - KnxDatapointType_DPT_LongTimePeriod_Min KnxDatapointType = 125 - KnxDatapointType_DPT_LongTimePeriod_Hrs KnxDatapointType = 126 - KnxDatapointType_DPT_VolumeLiquid_Litre KnxDatapointType = 127 - KnxDatapointType_DPT_Volume_m_3 KnxDatapointType = 128 - KnxDatapointType_DPT_Value_4_Count KnxDatapointType = 129 - KnxDatapointType_DPT_FlowRate_m3h KnxDatapointType = 130 - KnxDatapointType_DPT_ActiveEnergy KnxDatapointType = 131 - KnxDatapointType_DPT_ApparantEnergy KnxDatapointType = 132 - KnxDatapointType_DPT_ReactiveEnergy KnxDatapointType = 133 - KnxDatapointType_DPT_ActiveEnergy_kWh KnxDatapointType = 134 - KnxDatapointType_DPT_ApparantEnergy_kVAh KnxDatapointType = 135 - KnxDatapointType_DPT_ReactiveEnergy_kVARh KnxDatapointType = 136 - KnxDatapointType_DPT_ActiveEnergy_MWh KnxDatapointType = 137 - KnxDatapointType_DPT_LongDeltaTimeSec KnxDatapointType = 138 - KnxDatapointType_DPT_DeltaVolumeLiquid_Litre KnxDatapointType = 139 - KnxDatapointType_DPT_DeltaVolume_m_3 KnxDatapointType = 140 - KnxDatapointType_DPT_Value_Acceleration KnxDatapointType = 141 - KnxDatapointType_DPT_Value_Acceleration_Angular KnxDatapointType = 142 - KnxDatapointType_DPT_Value_Activation_Energy KnxDatapointType = 143 - KnxDatapointType_DPT_Value_Activity KnxDatapointType = 144 - KnxDatapointType_DPT_Value_Mol KnxDatapointType = 145 - KnxDatapointType_DPT_Value_Amplitude KnxDatapointType = 146 - KnxDatapointType_DPT_Value_AngleRad KnxDatapointType = 147 - KnxDatapointType_DPT_Value_AngleDeg KnxDatapointType = 148 - KnxDatapointType_DPT_Value_Angular_Momentum KnxDatapointType = 149 - KnxDatapointType_DPT_Value_Angular_Velocity KnxDatapointType = 150 - KnxDatapointType_DPT_Value_Area KnxDatapointType = 151 - KnxDatapointType_DPT_Value_Capacitance KnxDatapointType = 152 - KnxDatapointType_DPT_Value_Charge_DensitySurface KnxDatapointType = 153 - KnxDatapointType_DPT_Value_Charge_DensityVolume KnxDatapointType = 154 - KnxDatapointType_DPT_Value_Compressibility KnxDatapointType = 155 - KnxDatapointType_DPT_Value_Conductance KnxDatapointType = 156 - KnxDatapointType_DPT_Value_Electrical_Conductivity KnxDatapointType = 157 - KnxDatapointType_DPT_Value_Density KnxDatapointType = 158 - KnxDatapointType_DPT_Value_Electric_Charge KnxDatapointType = 159 - KnxDatapointType_DPT_Value_Electric_Current KnxDatapointType = 160 - KnxDatapointType_DPT_Value_Electric_CurrentDensity KnxDatapointType = 161 - KnxDatapointType_DPT_Value_Electric_DipoleMoment KnxDatapointType = 162 - KnxDatapointType_DPT_Value_Electric_Displacement KnxDatapointType = 163 - KnxDatapointType_DPT_Value_Electric_FieldStrength KnxDatapointType = 164 - KnxDatapointType_DPT_Value_Electric_Flux KnxDatapointType = 165 - KnxDatapointType_DPT_Value_Electric_FluxDensity KnxDatapointType = 166 - KnxDatapointType_DPT_Value_Electric_Polarization KnxDatapointType = 167 - KnxDatapointType_DPT_Value_Electric_Potential KnxDatapointType = 168 - KnxDatapointType_DPT_Value_Electric_PotentialDifference KnxDatapointType = 169 - KnxDatapointType_DPT_Value_ElectromagneticMoment KnxDatapointType = 170 - KnxDatapointType_DPT_Value_Electromotive_Force KnxDatapointType = 171 - KnxDatapointType_DPT_Value_Energy KnxDatapointType = 172 - KnxDatapointType_DPT_Value_Force KnxDatapointType = 173 - KnxDatapointType_DPT_Value_Frequency KnxDatapointType = 174 - KnxDatapointType_DPT_Value_Angular_Frequency KnxDatapointType = 175 - KnxDatapointType_DPT_Value_Heat_Capacity KnxDatapointType = 176 - KnxDatapointType_DPT_Value_Heat_FlowRate KnxDatapointType = 177 - KnxDatapointType_DPT_Value_Heat_Quantity KnxDatapointType = 178 - KnxDatapointType_DPT_Value_Impedance KnxDatapointType = 179 - KnxDatapointType_DPT_Value_Length KnxDatapointType = 180 - KnxDatapointType_DPT_Value_Light_Quantity KnxDatapointType = 181 - KnxDatapointType_DPT_Value_Luminance KnxDatapointType = 182 - KnxDatapointType_DPT_Value_Luminous_Flux KnxDatapointType = 183 - KnxDatapointType_DPT_Value_Luminous_Intensity KnxDatapointType = 184 - KnxDatapointType_DPT_Value_Magnetic_FieldStrength KnxDatapointType = 185 - KnxDatapointType_DPT_Value_Magnetic_Flux KnxDatapointType = 186 - KnxDatapointType_DPT_Value_Magnetic_FluxDensity KnxDatapointType = 187 - KnxDatapointType_DPT_Value_Magnetic_Moment KnxDatapointType = 188 - KnxDatapointType_DPT_Value_Magnetic_Polarization KnxDatapointType = 189 - KnxDatapointType_DPT_Value_Magnetization KnxDatapointType = 190 - KnxDatapointType_DPT_Value_MagnetomotiveForce KnxDatapointType = 191 - KnxDatapointType_DPT_Value_Mass KnxDatapointType = 192 - KnxDatapointType_DPT_Value_MassFlux KnxDatapointType = 193 - KnxDatapointType_DPT_Value_Momentum KnxDatapointType = 194 - KnxDatapointType_DPT_Value_Phase_AngleRad KnxDatapointType = 195 - KnxDatapointType_DPT_Value_Phase_AngleDeg KnxDatapointType = 196 - KnxDatapointType_DPT_Value_Power KnxDatapointType = 197 - KnxDatapointType_DPT_Value_Power_Factor KnxDatapointType = 198 - KnxDatapointType_DPT_Value_Pressure KnxDatapointType = 199 - KnxDatapointType_DPT_Value_Reactance KnxDatapointType = 200 - KnxDatapointType_DPT_Value_Resistance KnxDatapointType = 201 - KnxDatapointType_DPT_Value_Resistivity KnxDatapointType = 202 - KnxDatapointType_DPT_Value_SelfInductance KnxDatapointType = 203 - KnxDatapointType_DPT_Value_SolidAngle KnxDatapointType = 204 - KnxDatapointType_DPT_Value_Sound_Intensity KnxDatapointType = 205 - KnxDatapointType_DPT_Value_Speed KnxDatapointType = 206 - KnxDatapointType_DPT_Value_Stress KnxDatapointType = 207 - KnxDatapointType_DPT_Value_Surface_Tension KnxDatapointType = 208 - KnxDatapointType_DPT_Value_Common_Temperature KnxDatapointType = 209 - KnxDatapointType_DPT_Value_Absolute_Temperature KnxDatapointType = 210 - KnxDatapointType_DPT_Value_TemperatureDifference KnxDatapointType = 211 - KnxDatapointType_DPT_Value_Thermal_Capacity KnxDatapointType = 212 - KnxDatapointType_DPT_Value_Thermal_Conductivity KnxDatapointType = 213 - KnxDatapointType_DPT_Value_ThermoelectricPower KnxDatapointType = 214 - KnxDatapointType_DPT_Value_Time KnxDatapointType = 215 - KnxDatapointType_DPT_Value_Torque KnxDatapointType = 216 - KnxDatapointType_DPT_Value_Volume KnxDatapointType = 217 - KnxDatapointType_DPT_Value_Volume_Flux KnxDatapointType = 218 - KnxDatapointType_DPT_Value_Weight KnxDatapointType = 219 - KnxDatapointType_DPT_Value_Work KnxDatapointType = 220 - KnxDatapointType_DPT_Value_ApparentPower KnxDatapointType = 221 - KnxDatapointType_DPT_Volume_Flux_Meter KnxDatapointType = 222 - KnxDatapointType_DPT_Volume_Flux_ls KnxDatapointType = 223 - KnxDatapointType_DPT_Access_Data KnxDatapointType = 224 - KnxDatapointType_DPT_String_ASCII KnxDatapointType = 225 - KnxDatapointType_DPT_String_8859_1 KnxDatapointType = 226 - KnxDatapointType_DPT_SceneNumber KnxDatapointType = 227 - KnxDatapointType_DPT_SceneControl KnxDatapointType = 228 - KnxDatapointType_DPT_DateTime KnxDatapointType = 229 - KnxDatapointType_DPT_SCLOMode KnxDatapointType = 230 - KnxDatapointType_DPT_BuildingMode KnxDatapointType = 231 - KnxDatapointType_DPT_OccMode KnxDatapointType = 232 - KnxDatapointType_DPT_Priority KnxDatapointType = 233 - KnxDatapointType_DPT_LightApplicationMode KnxDatapointType = 234 - KnxDatapointType_DPT_ApplicationArea KnxDatapointType = 235 - KnxDatapointType_DPT_AlarmClassType KnxDatapointType = 236 - KnxDatapointType_DPT_PSUMode KnxDatapointType = 237 - KnxDatapointType_DPT_ErrorClass_System KnxDatapointType = 238 - KnxDatapointType_DPT_ErrorClass_HVAC KnxDatapointType = 239 - KnxDatapointType_DPT_Time_Delay KnxDatapointType = 240 - KnxDatapointType_DPT_Beaufort_Wind_Force_Scale KnxDatapointType = 241 - KnxDatapointType_DPT_SensorSelect KnxDatapointType = 242 - KnxDatapointType_DPT_ActuatorConnectType KnxDatapointType = 243 - KnxDatapointType_DPT_Cloud_Cover KnxDatapointType = 244 - KnxDatapointType_DPT_PowerReturnMode KnxDatapointType = 245 - KnxDatapointType_DPT_FuelType KnxDatapointType = 246 - KnxDatapointType_DPT_BurnerType KnxDatapointType = 247 - KnxDatapointType_DPT_HVACMode KnxDatapointType = 248 - KnxDatapointType_DPT_DHWMode KnxDatapointType = 249 - KnxDatapointType_DPT_LoadPriority KnxDatapointType = 250 - KnxDatapointType_DPT_HVACContrMode KnxDatapointType = 251 - KnxDatapointType_DPT_HVACEmergMode KnxDatapointType = 252 - KnxDatapointType_DPT_ChangeoverMode KnxDatapointType = 253 - KnxDatapointType_DPT_ValveMode KnxDatapointType = 254 - KnxDatapointType_DPT_DamperMode KnxDatapointType = 255 - KnxDatapointType_DPT_HeaterMode KnxDatapointType = 256 - KnxDatapointType_DPT_FanMode KnxDatapointType = 257 - KnxDatapointType_DPT_MasterSlaveMode KnxDatapointType = 258 - KnxDatapointType_DPT_StatusRoomSetp KnxDatapointType = 259 - KnxDatapointType_DPT_Metering_DeviceType KnxDatapointType = 260 - KnxDatapointType_DPT_HumDehumMode KnxDatapointType = 261 - KnxDatapointType_DPT_EnableHCStage KnxDatapointType = 262 - KnxDatapointType_DPT_ADAType KnxDatapointType = 263 - KnxDatapointType_DPT_BackupMode KnxDatapointType = 264 - KnxDatapointType_DPT_StartSynchronization KnxDatapointType = 265 - KnxDatapointType_DPT_Behaviour_Lock_Unlock KnxDatapointType = 266 - KnxDatapointType_DPT_Behaviour_Bus_Power_Up_Down KnxDatapointType = 267 - KnxDatapointType_DPT_DALI_Fade_Time KnxDatapointType = 268 - KnxDatapointType_DPT_BlinkingMode KnxDatapointType = 269 - KnxDatapointType_DPT_LightControlMode KnxDatapointType = 270 - KnxDatapointType_DPT_SwitchPBModel KnxDatapointType = 271 - KnxDatapointType_DPT_PBAction KnxDatapointType = 272 - KnxDatapointType_DPT_DimmPBModel KnxDatapointType = 273 - KnxDatapointType_DPT_SwitchOnMode KnxDatapointType = 274 - KnxDatapointType_DPT_LoadTypeSet KnxDatapointType = 275 - KnxDatapointType_DPT_LoadTypeDetected KnxDatapointType = 276 - KnxDatapointType_DPT_Converter_Test_Control KnxDatapointType = 277 - KnxDatapointType_DPT_SABExcept_Behaviour KnxDatapointType = 278 - KnxDatapointType_DPT_SABBehaviour_Lock_Unlock KnxDatapointType = 279 - KnxDatapointType_DPT_SSSBMode KnxDatapointType = 280 - KnxDatapointType_DPT_BlindsControlMode KnxDatapointType = 281 - KnxDatapointType_DPT_CommMode KnxDatapointType = 282 - KnxDatapointType_DPT_AddInfoTypes KnxDatapointType = 283 - KnxDatapointType_DPT_RF_ModeSelect KnxDatapointType = 284 - KnxDatapointType_DPT_RF_FilterSelect KnxDatapointType = 285 - KnxDatapointType_DPT_StatusGen KnxDatapointType = 286 - KnxDatapointType_DPT_Device_Control KnxDatapointType = 287 - KnxDatapointType_DPT_ForceSign KnxDatapointType = 288 - KnxDatapointType_DPT_ForceSignCool KnxDatapointType = 289 - KnxDatapointType_DPT_StatusRHC KnxDatapointType = 290 - KnxDatapointType_DPT_StatusSDHWC KnxDatapointType = 291 - KnxDatapointType_DPT_FuelTypeSet KnxDatapointType = 292 - KnxDatapointType_DPT_StatusRCC KnxDatapointType = 293 - KnxDatapointType_DPT_StatusAHU KnxDatapointType = 294 - KnxDatapointType_DPT_CombinedStatus_RTSM KnxDatapointType = 295 - KnxDatapointType_DPT_LightActuatorErrorInfo KnxDatapointType = 296 - KnxDatapointType_DPT_RF_ModeInfo KnxDatapointType = 297 - KnxDatapointType_DPT_RF_FilterInfo KnxDatapointType = 298 - KnxDatapointType_DPT_Channel_Activation_8 KnxDatapointType = 299 - KnxDatapointType_DPT_StatusDHWC KnxDatapointType = 300 - KnxDatapointType_DPT_StatusRHCC KnxDatapointType = 301 - KnxDatapointType_DPT_CombinedStatus_HVA KnxDatapointType = 302 - KnxDatapointType_DPT_CombinedStatus_RTC KnxDatapointType = 303 - KnxDatapointType_DPT_Media KnxDatapointType = 304 - KnxDatapointType_DPT_Channel_Activation_16 KnxDatapointType = 305 - KnxDatapointType_DPT_OnOffAction KnxDatapointType = 306 - KnxDatapointType_DPT_Alarm_Reaction KnxDatapointType = 307 - KnxDatapointType_DPT_UpDown_Action KnxDatapointType = 308 - KnxDatapointType_DPT_HVAC_PB_Action KnxDatapointType = 309 - KnxDatapointType_DPT_DoubleNibble KnxDatapointType = 310 - KnxDatapointType_DPT_SceneInfo KnxDatapointType = 311 - KnxDatapointType_DPT_CombinedInfoOnOff KnxDatapointType = 312 - KnxDatapointType_DPT_ActiveEnergy_V64 KnxDatapointType = 313 - KnxDatapointType_DPT_ApparantEnergy_V64 KnxDatapointType = 314 - KnxDatapointType_DPT_ReactiveEnergy_V64 KnxDatapointType = 315 - KnxDatapointType_DPT_Channel_Activation_24 KnxDatapointType = 316 - KnxDatapointType_DPT_HVACModeNext KnxDatapointType = 317 - KnxDatapointType_DPT_DHWModeNext KnxDatapointType = 318 - KnxDatapointType_DPT_OccModeNext KnxDatapointType = 319 - KnxDatapointType_DPT_BuildingModeNext KnxDatapointType = 320 - KnxDatapointType_DPT_StatusLightingActuator KnxDatapointType = 321 - KnxDatapointType_DPT_Version KnxDatapointType = 322 - KnxDatapointType_DPT_AlarmInfo KnxDatapointType = 323 - KnxDatapointType_DPT_TempRoomSetpSetF16_3 KnxDatapointType = 324 - KnxDatapointType_DPT_TempRoomSetpSetShiftF16_3 KnxDatapointType = 325 - KnxDatapointType_DPT_Scaling_Speed KnxDatapointType = 326 - KnxDatapointType_DPT_Scaling_Step_Time KnxDatapointType = 327 - KnxDatapointType_DPT_MeteringValue KnxDatapointType = 328 - KnxDatapointType_DPT_MBus_Address KnxDatapointType = 329 - KnxDatapointType_DPT_Colour_RGB KnxDatapointType = 330 - KnxDatapointType_DPT_LanguageCodeAlpha2_ASCII KnxDatapointType = 331 - KnxDatapointType_DPT_Tariff_ActiveEnergy KnxDatapointType = 332 - KnxDatapointType_DPT_Prioritised_Mode_Control KnxDatapointType = 333 - KnxDatapointType_DPT_DALI_Control_Gear_Diagnostic KnxDatapointType = 334 - KnxDatapointType_DPT_DALI_Diagnostics KnxDatapointType = 335 - KnxDatapointType_DPT_CombinedPosition KnxDatapointType = 336 - KnxDatapointType_DPT_StatusSAB KnxDatapointType = 337 - KnxDatapointType_DPT_Colour_xyY KnxDatapointType = 338 - KnxDatapointType_DPT_Converter_Status KnxDatapointType = 339 - KnxDatapointType_DPT_Converter_Test_Result KnxDatapointType = 340 - KnxDatapointType_DPT_Battery_Info KnxDatapointType = 341 +const( + KnxDatapointType_DPT_UNKNOWN KnxDatapointType = 0 + KnxDatapointType_BOOL KnxDatapointType = 1 + KnxDatapointType_BYTE KnxDatapointType = 2 + KnxDatapointType_WORD KnxDatapointType = 3 + KnxDatapointType_DWORD KnxDatapointType = 4 + KnxDatapointType_LWORD KnxDatapointType = 5 + KnxDatapointType_USINT KnxDatapointType = 6 + KnxDatapointType_SINT KnxDatapointType = 7 + KnxDatapointType_UINT KnxDatapointType = 8 + KnxDatapointType_INT KnxDatapointType = 9 + KnxDatapointType_UDINT KnxDatapointType = 10 + KnxDatapointType_DINT KnxDatapointType = 11 + KnxDatapointType_ULINT KnxDatapointType = 12 + KnxDatapointType_LINT KnxDatapointType = 13 + KnxDatapointType_REAL KnxDatapointType = 14 + KnxDatapointType_LREAL KnxDatapointType = 15 + KnxDatapointType_CHAR KnxDatapointType = 16 + KnxDatapointType_WCHAR KnxDatapointType = 17 + KnxDatapointType_STRING KnxDatapointType = 18 + KnxDatapointType_WSTRING KnxDatapointType = 19 + KnxDatapointType_TIME KnxDatapointType = 20 + KnxDatapointType_LTIME KnxDatapointType = 21 + KnxDatapointType_DATE KnxDatapointType = 22 + KnxDatapointType_TIME_OF_DAY KnxDatapointType = 23 + KnxDatapointType_TOD KnxDatapointType = 24 + KnxDatapointType_DATE_AND_TIME KnxDatapointType = 25 + KnxDatapointType_DT KnxDatapointType = 26 + KnxDatapointType_DPT_Switch KnxDatapointType = 27 + KnxDatapointType_DPT_Bool KnxDatapointType = 28 + KnxDatapointType_DPT_Enable KnxDatapointType = 29 + KnxDatapointType_DPT_Ramp KnxDatapointType = 30 + KnxDatapointType_DPT_Alarm KnxDatapointType = 31 + KnxDatapointType_DPT_BinaryValue KnxDatapointType = 32 + KnxDatapointType_DPT_Step KnxDatapointType = 33 + KnxDatapointType_DPT_UpDown KnxDatapointType = 34 + KnxDatapointType_DPT_OpenClose KnxDatapointType = 35 + KnxDatapointType_DPT_Start KnxDatapointType = 36 + KnxDatapointType_DPT_State KnxDatapointType = 37 + KnxDatapointType_DPT_Invert KnxDatapointType = 38 + KnxDatapointType_DPT_DimSendStyle KnxDatapointType = 39 + KnxDatapointType_DPT_InputSource KnxDatapointType = 40 + KnxDatapointType_DPT_Reset KnxDatapointType = 41 + KnxDatapointType_DPT_Ack KnxDatapointType = 42 + KnxDatapointType_DPT_Trigger KnxDatapointType = 43 + KnxDatapointType_DPT_Occupancy KnxDatapointType = 44 + KnxDatapointType_DPT_Window_Door KnxDatapointType = 45 + KnxDatapointType_DPT_LogicalFunction KnxDatapointType = 46 + KnxDatapointType_DPT_Scene_AB KnxDatapointType = 47 + KnxDatapointType_DPT_ShutterBlinds_Mode KnxDatapointType = 48 + KnxDatapointType_DPT_DayNight KnxDatapointType = 49 + KnxDatapointType_DPT_Heat_Cool KnxDatapointType = 50 + KnxDatapointType_DPT_Switch_Control KnxDatapointType = 51 + KnxDatapointType_DPT_Bool_Control KnxDatapointType = 52 + KnxDatapointType_DPT_Enable_Control KnxDatapointType = 53 + KnxDatapointType_DPT_Ramp_Control KnxDatapointType = 54 + KnxDatapointType_DPT_Alarm_Control KnxDatapointType = 55 + KnxDatapointType_DPT_BinaryValue_Control KnxDatapointType = 56 + KnxDatapointType_DPT_Step_Control KnxDatapointType = 57 + KnxDatapointType_DPT_Direction1_Control KnxDatapointType = 58 + KnxDatapointType_DPT_Direction2_Control KnxDatapointType = 59 + KnxDatapointType_DPT_Start_Control KnxDatapointType = 60 + KnxDatapointType_DPT_State_Control KnxDatapointType = 61 + KnxDatapointType_DPT_Invert_Control KnxDatapointType = 62 + KnxDatapointType_DPT_Control_Dimming KnxDatapointType = 63 + KnxDatapointType_DPT_Control_Blinds KnxDatapointType = 64 + KnxDatapointType_DPT_Char_ASCII KnxDatapointType = 65 + KnxDatapointType_DPT_Char_8859_1 KnxDatapointType = 66 + KnxDatapointType_DPT_Scaling KnxDatapointType = 67 + KnxDatapointType_DPT_Angle KnxDatapointType = 68 + KnxDatapointType_DPT_Percent_U8 KnxDatapointType = 69 + KnxDatapointType_DPT_DecimalFactor KnxDatapointType = 70 + KnxDatapointType_DPT_Tariff KnxDatapointType = 71 + KnxDatapointType_DPT_Value_1_Ucount KnxDatapointType = 72 + KnxDatapointType_DPT_FanStage KnxDatapointType = 73 + KnxDatapointType_DPT_Percent_V8 KnxDatapointType = 74 + KnxDatapointType_DPT_Value_1_Count KnxDatapointType = 75 + KnxDatapointType_DPT_Status_Mode3 KnxDatapointType = 76 + KnxDatapointType_DPT_Value_2_Ucount KnxDatapointType = 77 + KnxDatapointType_DPT_TimePeriodMsec KnxDatapointType = 78 + KnxDatapointType_DPT_TimePeriod10Msec KnxDatapointType = 79 + KnxDatapointType_DPT_TimePeriod100Msec KnxDatapointType = 80 + KnxDatapointType_DPT_TimePeriodSec KnxDatapointType = 81 + KnxDatapointType_DPT_TimePeriodMin KnxDatapointType = 82 + KnxDatapointType_DPT_TimePeriodHrs KnxDatapointType = 83 + KnxDatapointType_DPT_PropDataType KnxDatapointType = 84 + KnxDatapointType_DPT_Length_mm KnxDatapointType = 85 + KnxDatapointType_DPT_UElCurrentmA KnxDatapointType = 86 + KnxDatapointType_DPT_Brightness KnxDatapointType = 87 + KnxDatapointType_DPT_Absolute_Colour_Temperature KnxDatapointType = 88 + KnxDatapointType_DPT_Value_2_Count KnxDatapointType = 89 + KnxDatapointType_DPT_DeltaTimeMsec KnxDatapointType = 90 + KnxDatapointType_DPT_DeltaTime10Msec KnxDatapointType = 91 + KnxDatapointType_DPT_DeltaTime100Msec KnxDatapointType = 92 + KnxDatapointType_DPT_DeltaTimeSec KnxDatapointType = 93 + KnxDatapointType_DPT_DeltaTimeMin KnxDatapointType = 94 + KnxDatapointType_DPT_DeltaTimeHrs KnxDatapointType = 95 + KnxDatapointType_DPT_Percent_V16 KnxDatapointType = 96 + KnxDatapointType_DPT_Rotation_Angle KnxDatapointType = 97 + KnxDatapointType_DPT_Length_m KnxDatapointType = 98 + KnxDatapointType_DPT_Value_Temp KnxDatapointType = 99 + KnxDatapointType_DPT_Value_Tempd KnxDatapointType = 100 + KnxDatapointType_DPT_Value_Tempa KnxDatapointType = 101 + KnxDatapointType_DPT_Value_Lux KnxDatapointType = 102 + KnxDatapointType_DPT_Value_Wsp KnxDatapointType = 103 + KnxDatapointType_DPT_Value_Pres KnxDatapointType = 104 + KnxDatapointType_DPT_Value_Humidity KnxDatapointType = 105 + KnxDatapointType_DPT_Value_AirQuality KnxDatapointType = 106 + KnxDatapointType_DPT_Value_AirFlow KnxDatapointType = 107 + KnxDatapointType_DPT_Value_Time1 KnxDatapointType = 108 + KnxDatapointType_DPT_Value_Time2 KnxDatapointType = 109 + KnxDatapointType_DPT_Value_Volt KnxDatapointType = 110 + KnxDatapointType_DPT_Value_Curr KnxDatapointType = 111 + KnxDatapointType_DPT_PowerDensity KnxDatapointType = 112 + KnxDatapointType_DPT_KelvinPerPercent KnxDatapointType = 113 + KnxDatapointType_DPT_Power KnxDatapointType = 114 + KnxDatapointType_DPT_Value_Volume_Flow KnxDatapointType = 115 + KnxDatapointType_DPT_Rain_Amount KnxDatapointType = 116 + KnxDatapointType_DPT_Value_Temp_F KnxDatapointType = 117 + KnxDatapointType_DPT_Value_Wsp_kmh KnxDatapointType = 118 + KnxDatapointType_DPT_Value_Absolute_Humidity KnxDatapointType = 119 + KnxDatapointType_DPT_Concentration_ygm3 KnxDatapointType = 120 + KnxDatapointType_DPT_TimeOfDay KnxDatapointType = 121 + KnxDatapointType_DPT_Date KnxDatapointType = 122 + KnxDatapointType_DPT_Value_4_Ucount KnxDatapointType = 123 + KnxDatapointType_DPT_LongTimePeriod_Sec KnxDatapointType = 124 + KnxDatapointType_DPT_LongTimePeriod_Min KnxDatapointType = 125 + KnxDatapointType_DPT_LongTimePeriod_Hrs KnxDatapointType = 126 + KnxDatapointType_DPT_VolumeLiquid_Litre KnxDatapointType = 127 + KnxDatapointType_DPT_Volume_m_3 KnxDatapointType = 128 + KnxDatapointType_DPT_Value_4_Count KnxDatapointType = 129 + KnxDatapointType_DPT_FlowRate_m3h KnxDatapointType = 130 + KnxDatapointType_DPT_ActiveEnergy KnxDatapointType = 131 + KnxDatapointType_DPT_ApparantEnergy KnxDatapointType = 132 + KnxDatapointType_DPT_ReactiveEnergy KnxDatapointType = 133 + KnxDatapointType_DPT_ActiveEnergy_kWh KnxDatapointType = 134 + KnxDatapointType_DPT_ApparantEnergy_kVAh KnxDatapointType = 135 + KnxDatapointType_DPT_ReactiveEnergy_kVARh KnxDatapointType = 136 + KnxDatapointType_DPT_ActiveEnergy_MWh KnxDatapointType = 137 + KnxDatapointType_DPT_LongDeltaTimeSec KnxDatapointType = 138 + KnxDatapointType_DPT_DeltaVolumeLiquid_Litre KnxDatapointType = 139 + KnxDatapointType_DPT_DeltaVolume_m_3 KnxDatapointType = 140 + KnxDatapointType_DPT_Value_Acceleration KnxDatapointType = 141 + KnxDatapointType_DPT_Value_Acceleration_Angular KnxDatapointType = 142 + KnxDatapointType_DPT_Value_Activation_Energy KnxDatapointType = 143 + KnxDatapointType_DPT_Value_Activity KnxDatapointType = 144 + KnxDatapointType_DPT_Value_Mol KnxDatapointType = 145 + KnxDatapointType_DPT_Value_Amplitude KnxDatapointType = 146 + KnxDatapointType_DPT_Value_AngleRad KnxDatapointType = 147 + KnxDatapointType_DPT_Value_AngleDeg KnxDatapointType = 148 + KnxDatapointType_DPT_Value_Angular_Momentum KnxDatapointType = 149 + KnxDatapointType_DPT_Value_Angular_Velocity KnxDatapointType = 150 + KnxDatapointType_DPT_Value_Area KnxDatapointType = 151 + KnxDatapointType_DPT_Value_Capacitance KnxDatapointType = 152 + KnxDatapointType_DPT_Value_Charge_DensitySurface KnxDatapointType = 153 + KnxDatapointType_DPT_Value_Charge_DensityVolume KnxDatapointType = 154 + KnxDatapointType_DPT_Value_Compressibility KnxDatapointType = 155 + KnxDatapointType_DPT_Value_Conductance KnxDatapointType = 156 + KnxDatapointType_DPT_Value_Electrical_Conductivity KnxDatapointType = 157 + KnxDatapointType_DPT_Value_Density KnxDatapointType = 158 + KnxDatapointType_DPT_Value_Electric_Charge KnxDatapointType = 159 + KnxDatapointType_DPT_Value_Electric_Current KnxDatapointType = 160 + KnxDatapointType_DPT_Value_Electric_CurrentDensity KnxDatapointType = 161 + KnxDatapointType_DPT_Value_Electric_DipoleMoment KnxDatapointType = 162 + KnxDatapointType_DPT_Value_Electric_Displacement KnxDatapointType = 163 + KnxDatapointType_DPT_Value_Electric_FieldStrength KnxDatapointType = 164 + KnxDatapointType_DPT_Value_Electric_Flux KnxDatapointType = 165 + KnxDatapointType_DPT_Value_Electric_FluxDensity KnxDatapointType = 166 + KnxDatapointType_DPT_Value_Electric_Polarization KnxDatapointType = 167 + KnxDatapointType_DPT_Value_Electric_Potential KnxDatapointType = 168 + KnxDatapointType_DPT_Value_Electric_PotentialDifference KnxDatapointType = 169 + KnxDatapointType_DPT_Value_ElectromagneticMoment KnxDatapointType = 170 + KnxDatapointType_DPT_Value_Electromotive_Force KnxDatapointType = 171 + KnxDatapointType_DPT_Value_Energy KnxDatapointType = 172 + KnxDatapointType_DPT_Value_Force KnxDatapointType = 173 + KnxDatapointType_DPT_Value_Frequency KnxDatapointType = 174 + KnxDatapointType_DPT_Value_Angular_Frequency KnxDatapointType = 175 + KnxDatapointType_DPT_Value_Heat_Capacity KnxDatapointType = 176 + KnxDatapointType_DPT_Value_Heat_FlowRate KnxDatapointType = 177 + KnxDatapointType_DPT_Value_Heat_Quantity KnxDatapointType = 178 + KnxDatapointType_DPT_Value_Impedance KnxDatapointType = 179 + KnxDatapointType_DPT_Value_Length KnxDatapointType = 180 + KnxDatapointType_DPT_Value_Light_Quantity KnxDatapointType = 181 + KnxDatapointType_DPT_Value_Luminance KnxDatapointType = 182 + KnxDatapointType_DPT_Value_Luminous_Flux KnxDatapointType = 183 + KnxDatapointType_DPT_Value_Luminous_Intensity KnxDatapointType = 184 + KnxDatapointType_DPT_Value_Magnetic_FieldStrength KnxDatapointType = 185 + KnxDatapointType_DPT_Value_Magnetic_Flux KnxDatapointType = 186 + KnxDatapointType_DPT_Value_Magnetic_FluxDensity KnxDatapointType = 187 + KnxDatapointType_DPT_Value_Magnetic_Moment KnxDatapointType = 188 + KnxDatapointType_DPT_Value_Magnetic_Polarization KnxDatapointType = 189 + KnxDatapointType_DPT_Value_Magnetization KnxDatapointType = 190 + KnxDatapointType_DPT_Value_MagnetomotiveForce KnxDatapointType = 191 + KnxDatapointType_DPT_Value_Mass KnxDatapointType = 192 + KnxDatapointType_DPT_Value_MassFlux KnxDatapointType = 193 + KnxDatapointType_DPT_Value_Momentum KnxDatapointType = 194 + KnxDatapointType_DPT_Value_Phase_AngleRad KnxDatapointType = 195 + KnxDatapointType_DPT_Value_Phase_AngleDeg KnxDatapointType = 196 + KnxDatapointType_DPT_Value_Power KnxDatapointType = 197 + KnxDatapointType_DPT_Value_Power_Factor KnxDatapointType = 198 + KnxDatapointType_DPT_Value_Pressure KnxDatapointType = 199 + KnxDatapointType_DPT_Value_Reactance KnxDatapointType = 200 + KnxDatapointType_DPT_Value_Resistance KnxDatapointType = 201 + KnxDatapointType_DPT_Value_Resistivity KnxDatapointType = 202 + KnxDatapointType_DPT_Value_SelfInductance KnxDatapointType = 203 + KnxDatapointType_DPT_Value_SolidAngle KnxDatapointType = 204 + KnxDatapointType_DPT_Value_Sound_Intensity KnxDatapointType = 205 + KnxDatapointType_DPT_Value_Speed KnxDatapointType = 206 + KnxDatapointType_DPT_Value_Stress KnxDatapointType = 207 + KnxDatapointType_DPT_Value_Surface_Tension KnxDatapointType = 208 + KnxDatapointType_DPT_Value_Common_Temperature KnxDatapointType = 209 + KnxDatapointType_DPT_Value_Absolute_Temperature KnxDatapointType = 210 + KnxDatapointType_DPT_Value_TemperatureDifference KnxDatapointType = 211 + KnxDatapointType_DPT_Value_Thermal_Capacity KnxDatapointType = 212 + KnxDatapointType_DPT_Value_Thermal_Conductivity KnxDatapointType = 213 + KnxDatapointType_DPT_Value_ThermoelectricPower KnxDatapointType = 214 + KnxDatapointType_DPT_Value_Time KnxDatapointType = 215 + KnxDatapointType_DPT_Value_Torque KnxDatapointType = 216 + KnxDatapointType_DPT_Value_Volume KnxDatapointType = 217 + KnxDatapointType_DPT_Value_Volume_Flux KnxDatapointType = 218 + KnxDatapointType_DPT_Value_Weight KnxDatapointType = 219 + KnxDatapointType_DPT_Value_Work KnxDatapointType = 220 + KnxDatapointType_DPT_Value_ApparentPower KnxDatapointType = 221 + KnxDatapointType_DPT_Volume_Flux_Meter KnxDatapointType = 222 + KnxDatapointType_DPT_Volume_Flux_ls KnxDatapointType = 223 + KnxDatapointType_DPT_Access_Data KnxDatapointType = 224 + KnxDatapointType_DPT_String_ASCII KnxDatapointType = 225 + KnxDatapointType_DPT_String_8859_1 KnxDatapointType = 226 + KnxDatapointType_DPT_SceneNumber KnxDatapointType = 227 + KnxDatapointType_DPT_SceneControl KnxDatapointType = 228 + KnxDatapointType_DPT_DateTime KnxDatapointType = 229 + KnxDatapointType_DPT_SCLOMode KnxDatapointType = 230 + KnxDatapointType_DPT_BuildingMode KnxDatapointType = 231 + KnxDatapointType_DPT_OccMode KnxDatapointType = 232 + KnxDatapointType_DPT_Priority KnxDatapointType = 233 + KnxDatapointType_DPT_LightApplicationMode KnxDatapointType = 234 + KnxDatapointType_DPT_ApplicationArea KnxDatapointType = 235 + KnxDatapointType_DPT_AlarmClassType KnxDatapointType = 236 + KnxDatapointType_DPT_PSUMode KnxDatapointType = 237 + KnxDatapointType_DPT_ErrorClass_System KnxDatapointType = 238 + KnxDatapointType_DPT_ErrorClass_HVAC KnxDatapointType = 239 + KnxDatapointType_DPT_Time_Delay KnxDatapointType = 240 + KnxDatapointType_DPT_Beaufort_Wind_Force_Scale KnxDatapointType = 241 + KnxDatapointType_DPT_SensorSelect KnxDatapointType = 242 + KnxDatapointType_DPT_ActuatorConnectType KnxDatapointType = 243 + KnxDatapointType_DPT_Cloud_Cover KnxDatapointType = 244 + KnxDatapointType_DPT_PowerReturnMode KnxDatapointType = 245 + KnxDatapointType_DPT_FuelType KnxDatapointType = 246 + KnxDatapointType_DPT_BurnerType KnxDatapointType = 247 + KnxDatapointType_DPT_HVACMode KnxDatapointType = 248 + KnxDatapointType_DPT_DHWMode KnxDatapointType = 249 + KnxDatapointType_DPT_LoadPriority KnxDatapointType = 250 + KnxDatapointType_DPT_HVACContrMode KnxDatapointType = 251 + KnxDatapointType_DPT_HVACEmergMode KnxDatapointType = 252 + KnxDatapointType_DPT_ChangeoverMode KnxDatapointType = 253 + KnxDatapointType_DPT_ValveMode KnxDatapointType = 254 + KnxDatapointType_DPT_DamperMode KnxDatapointType = 255 + KnxDatapointType_DPT_HeaterMode KnxDatapointType = 256 + KnxDatapointType_DPT_FanMode KnxDatapointType = 257 + KnxDatapointType_DPT_MasterSlaveMode KnxDatapointType = 258 + KnxDatapointType_DPT_StatusRoomSetp KnxDatapointType = 259 + KnxDatapointType_DPT_Metering_DeviceType KnxDatapointType = 260 + KnxDatapointType_DPT_HumDehumMode KnxDatapointType = 261 + KnxDatapointType_DPT_EnableHCStage KnxDatapointType = 262 + KnxDatapointType_DPT_ADAType KnxDatapointType = 263 + KnxDatapointType_DPT_BackupMode KnxDatapointType = 264 + KnxDatapointType_DPT_StartSynchronization KnxDatapointType = 265 + KnxDatapointType_DPT_Behaviour_Lock_Unlock KnxDatapointType = 266 + KnxDatapointType_DPT_Behaviour_Bus_Power_Up_Down KnxDatapointType = 267 + KnxDatapointType_DPT_DALI_Fade_Time KnxDatapointType = 268 + KnxDatapointType_DPT_BlinkingMode KnxDatapointType = 269 + KnxDatapointType_DPT_LightControlMode KnxDatapointType = 270 + KnxDatapointType_DPT_SwitchPBModel KnxDatapointType = 271 + KnxDatapointType_DPT_PBAction KnxDatapointType = 272 + KnxDatapointType_DPT_DimmPBModel KnxDatapointType = 273 + KnxDatapointType_DPT_SwitchOnMode KnxDatapointType = 274 + KnxDatapointType_DPT_LoadTypeSet KnxDatapointType = 275 + KnxDatapointType_DPT_LoadTypeDetected KnxDatapointType = 276 + KnxDatapointType_DPT_Converter_Test_Control KnxDatapointType = 277 + KnxDatapointType_DPT_SABExcept_Behaviour KnxDatapointType = 278 + KnxDatapointType_DPT_SABBehaviour_Lock_Unlock KnxDatapointType = 279 + KnxDatapointType_DPT_SSSBMode KnxDatapointType = 280 + KnxDatapointType_DPT_BlindsControlMode KnxDatapointType = 281 + KnxDatapointType_DPT_CommMode KnxDatapointType = 282 + KnxDatapointType_DPT_AddInfoTypes KnxDatapointType = 283 + KnxDatapointType_DPT_RF_ModeSelect KnxDatapointType = 284 + KnxDatapointType_DPT_RF_FilterSelect KnxDatapointType = 285 + KnxDatapointType_DPT_StatusGen KnxDatapointType = 286 + KnxDatapointType_DPT_Device_Control KnxDatapointType = 287 + KnxDatapointType_DPT_ForceSign KnxDatapointType = 288 + KnxDatapointType_DPT_ForceSignCool KnxDatapointType = 289 + KnxDatapointType_DPT_StatusRHC KnxDatapointType = 290 + KnxDatapointType_DPT_StatusSDHWC KnxDatapointType = 291 + KnxDatapointType_DPT_FuelTypeSet KnxDatapointType = 292 + KnxDatapointType_DPT_StatusRCC KnxDatapointType = 293 + KnxDatapointType_DPT_StatusAHU KnxDatapointType = 294 + KnxDatapointType_DPT_CombinedStatus_RTSM KnxDatapointType = 295 + KnxDatapointType_DPT_LightActuatorErrorInfo KnxDatapointType = 296 + KnxDatapointType_DPT_RF_ModeInfo KnxDatapointType = 297 + KnxDatapointType_DPT_RF_FilterInfo KnxDatapointType = 298 + KnxDatapointType_DPT_Channel_Activation_8 KnxDatapointType = 299 + KnxDatapointType_DPT_StatusDHWC KnxDatapointType = 300 + KnxDatapointType_DPT_StatusRHCC KnxDatapointType = 301 + KnxDatapointType_DPT_CombinedStatus_HVA KnxDatapointType = 302 + KnxDatapointType_DPT_CombinedStatus_RTC KnxDatapointType = 303 + KnxDatapointType_DPT_Media KnxDatapointType = 304 + KnxDatapointType_DPT_Channel_Activation_16 KnxDatapointType = 305 + KnxDatapointType_DPT_OnOffAction KnxDatapointType = 306 + KnxDatapointType_DPT_Alarm_Reaction KnxDatapointType = 307 + KnxDatapointType_DPT_UpDown_Action KnxDatapointType = 308 + KnxDatapointType_DPT_HVAC_PB_Action KnxDatapointType = 309 + KnxDatapointType_DPT_DoubleNibble KnxDatapointType = 310 + KnxDatapointType_DPT_SceneInfo KnxDatapointType = 311 + KnxDatapointType_DPT_CombinedInfoOnOff KnxDatapointType = 312 + KnxDatapointType_DPT_ActiveEnergy_V64 KnxDatapointType = 313 + KnxDatapointType_DPT_ApparantEnergy_V64 KnxDatapointType = 314 + KnxDatapointType_DPT_ReactiveEnergy_V64 KnxDatapointType = 315 + KnxDatapointType_DPT_Channel_Activation_24 KnxDatapointType = 316 + KnxDatapointType_DPT_HVACModeNext KnxDatapointType = 317 + KnxDatapointType_DPT_DHWModeNext KnxDatapointType = 318 + KnxDatapointType_DPT_OccModeNext KnxDatapointType = 319 + KnxDatapointType_DPT_BuildingModeNext KnxDatapointType = 320 + KnxDatapointType_DPT_StatusLightingActuator KnxDatapointType = 321 + KnxDatapointType_DPT_Version KnxDatapointType = 322 + KnxDatapointType_DPT_AlarmInfo KnxDatapointType = 323 + KnxDatapointType_DPT_TempRoomSetpSetF16_3 KnxDatapointType = 324 + KnxDatapointType_DPT_TempRoomSetpSetShiftF16_3 KnxDatapointType = 325 + KnxDatapointType_DPT_Scaling_Speed KnxDatapointType = 326 + KnxDatapointType_DPT_Scaling_Step_Time KnxDatapointType = 327 + KnxDatapointType_DPT_MeteringValue KnxDatapointType = 328 + KnxDatapointType_DPT_MBus_Address KnxDatapointType = 329 + KnxDatapointType_DPT_Colour_RGB KnxDatapointType = 330 + KnxDatapointType_DPT_LanguageCodeAlpha2_ASCII KnxDatapointType = 331 + KnxDatapointType_DPT_Tariff_ActiveEnergy KnxDatapointType = 332 + KnxDatapointType_DPT_Prioritised_Mode_Control KnxDatapointType = 333 + KnxDatapointType_DPT_DALI_Control_Gear_Diagnostic KnxDatapointType = 334 + KnxDatapointType_DPT_DALI_Diagnostics KnxDatapointType = 335 + KnxDatapointType_DPT_CombinedPosition KnxDatapointType = 336 + KnxDatapointType_DPT_StatusSAB KnxDatapointType = 337 + KnxDatapointType_DPT_Colour_xyY KnxDatapointType = 338 + KnxDatapointType_DPT_Converter_Status KnxDatapointType = 339 + KnxDatapointType_DPT_Converter_Test_Result KnxDatapointType = 340 + KnxDatapointType_DPT_Battery_Info KnxDatapointType = 341 KnxDatapointType_DPT_Brightness_Colour_Temperature_Transition KnxDatapointType = 342 - KnxDatapointType_DPT_Brightness_Colour_Temperature_Control KnxDatapointType = 343 - KnxDatapointType_DPT_Colour_RGBW KnxDatapointType = 344 - KnxDatapointType_DPT_Relative_Control_RGBW KnxDatapointType = 345 - KnxDatapointType_DPT_Relative_Control_RGB KnxDatapointType = 346 - KnxDatapointType_DPT_GeographicalLocation KnxDatapointType = 347 - KnxDatapointType_DPT_TempRoomSetpSetF16_4 KnxDatapointType = 348 - KnxDatapointType_DPT_TempRoomSetpSetShiftF16_4 KnxDatapointType = 349 + KnxDatapointType_DPT_Brightness_Colour_Temperature_Control KnxDatapointType = 343 + KnxDatapointType_DPT_Colour_RGBW KnxDatapointType = 344 + KnxDatapointType_DPT_Relative_Control_RGBW KnxDatapointType = 345 + KnxDatapointType_DPT_Relative_Control_RGB KnxDatapointType = 346 + KnxDatapointType_DPT_GeographicalLocation KnxDatapointType = 347 + KnxDatapointType_DPT_TempRoomSetpSetF16_4 KnxDatapointType = 348 + KnxDatapointType_DPT_TempRoomSetpSetShiftF16_4 KnxDatapointType = 349 ) var KnxDatapointTypeValues []KnxDatapointType func init() { _ = errors.New - KnxDatapointTypeValues = []KnxDatapointType{ + KnxDatapointTypeValues = []KnxDatapointType { KnxDatapointType_DPT_UNKNOWN, KnxDatapointType_BOOL, KnxDatapointType_BYTE, @@ -748,1410 +748,1060 @@ func init() { } } + func (e KnxDatapointType) Number() uint16 { - switch e { - case 0: - { /* '0' */ - return 0 + switch e { + case 0: { /* '0' */ + return 0 } - case 1: - { /* '1' */ - return 0 + case 1: { /* '1' */ + return 0 } - case 10: - { /* '10' */ - return 0 + case 10: { /* '10' */ + return 0 } - case 100: - { /* '100' */ - return 2 + case 100: { /* '100' */ + return 2 } - case 101: - { /* '101' */ - return 3 + case 101: { /* '101' */ + return 3 } - case 102: - { /* '102' */ - return 4 + case 102: { /* '102' */ + return 4 } - case 103: - { /* '103' */ - return 5 + case 103: { /* '103' */ + return 5 } - case 104: - { /* '104' */ - return 6 + case 104: { /* '104' */ + return 6 } - case 105: - { /* '105' */ - return 7 + case 105: { /* '105' */ + return 7 } - case 106: - { /* '106' */ - return 8 + case 106: { /* '106' */ + return 8 } - case 107: - { /* '107' */ - return 9 + case 107: { /* '107' */ + return 9 } - case 108: - { /* '108' */ - return 10 + case 108: { /* '108' */ + return 10 } - case 109: - { /* '109' */ - return 11 + case 109: { /* '109' */ + return 11 } - case 11: - { /* '11' */ - return 0 + case 11: { /* '11' */ + return 0 } - case 110: - { /* '110' */ - return 20 + case 110: { /* '110' */ + return 20 } - case 111: - { /* '111' */ - return 21 + case 111: { /* '111' */ + return 21 } - case 112: - { /* '112' */ - return 22 + case 112: { /* '112' */ + return 22 } - case 113: - { /* '113' */ - return 23 + case 113: { /* '113' */ + return 23 } - case 114: - { /* '114' */ - return 24 + case 114: { /* '114' */ + return 24 } - case 115: - { /* '115' */ - return 25 + case 115: { /* '115' */ + return 25 } - case 116: - { /* '116' */ - return 26 + case 116: { /* '116' */ + return 26 } - case 117: - { /* '117' */ - return 27 + case 117: { /* '117' */ + return 27 } - case 118: - { /* '118' */ - return 28 + case 118: { /* '118' */ + return 28 } - case 119: - { /* '119' */ - return 29 + case 119: { /* '119' */ + return 29 } - case 12: - { /* '12' */ - return 0 + case 12: { /* '12' */ + return 0 } - case 120: - { /* '120' */ - return 30 + case 120: { /* '120' */ + return 30 } - case 121: - { /* '121' */ - return 1 + case 121: { /* '121' */ + return 1 } - case 122: - { /* '122' */ - return 1 + case 122: { /* '122' */ + return 1 } - case 123: - { /* '123' */ - return 1 + case 123: { /* '123' */ + return 1 } - case 124: - { /* '124' */ - return 100 + case 124: { /* '124' */ + return 100 } - case 125: - { /* '125' */ - return 101 + case 125: { /* '125' */ + return 101 } - case 126: - { /* '126' */ - return 102 + case 126: { /* '126' */ + return 102 } - case 127: - { /* '127' */ - return 1200 + case 127: { /* '127' */ + return 1200 } - case 128: - { /* '128' */ - return 1201 + case 128: { /* '128' */ + return 1201 } - case 129: - { /* '129' */ - return 1 + case 129: { /* '129' */ + return 1 } - case 13: - { /* '13' */ - return 0 + case 13: { /* '13' */ + return 0 } - case 130: - { /* '130' */ - return 2 + case 130: { /* '130' */ + return 2 } - case 131: - { /* '131' */ - return 10 + case 131: { /* '131' */ + return 10 } - case 132: - { /* '132' */ - return 11 + case 132: { /* '132' */ + return 11 } - case 133: - { /* '133' */ - return 12 + case 133: { /* '133' */ + return 12 } - case 134: - { /* '134' */ - return 13 + case 134: { /* '134' */ + return 13 } - case 135: - { /* '135' */ - return 14 + case 135: { /* '135' */ + return 14 } - case 136: - { /* '136' */ - return 15 + case 136: { /* '136' */ + return 15 } - case 137: - { /* '137' */ - return 16 + case 137: { /* '137' */ + return 16 } - case 138: - { /* '138' */ - return 100 + case 138: { /* '138' */ + return 100 } - case 139: - { /* '139' */ - return 1200 + case 139: { /* '139' */ + return 1200 } - case 14: - { /* '14' */ - return 0 + case 14: { /* '14' */ + return 0 } - case 140: - { /* '140' */ - return 1201 + case 140: { /* '140' */ + return 1201 } - case 141: - { /* '141' */ - return 0 + case 141: { /* '141' */ + return 0 } - case 142: - { /* '142' */ - return 1 + case 142: { /* '142' */ + return 1 } - case 143: - { /* '143' */ - return 2 + case 143: { /* '143' */ + return 2 } - case 144: - { /* '144' */ - return 3 + case 144: { /* '144' */ + return 3 } - case 145: - { /* '145' */ - return 4 + case 145: { /* '145' */ + return 4 } - case 146: - { /* '146' */ - return 5 + case 146: { /* '146' */ + return 5 } - case 147: - { /* '147' */ - return 6 + case 147: { /* '147' */ + return 6 } - case 148: - { /* '148' */ - return 7 + case 148: { /* '148' */ + return 7 } - case 149: - { /* '149' */ - return 8 + case 149: { /* '149' */ + return 8 } - case 15: - { /* '15' */ - return 0 + case 15: { /* '15' */ + return 0 } - case 150: - { /* '150' */ - return 9 + case 150: { /* '150' */ + return 9 } - case 151: - { /* '151' */ - return 10 + case 151: { /* '151' */ + return 10 } - case 152: - { /* '152' */ - return 11 + case 152: { /* '152' */ + return 11 } - case 153: - { /* '153' */ - return 12 + case 153: { /* '153' */ + return 12 } - case 154: - { /* '154' */ - return 13 + case 154: { /* '154' */ + return 13 } - case 155: - { /* '155' */ - return 14 + case 155: { /* '155' */ + return 14 } - case 156: - { /* '156' */ - return 15 + case 156: { /* '156' */ + return 15 } - case 157: - { /* '157' */ - return 16 + case 157: { /* '157' */ + return 16 } - case 158: - { /* '158' */ - return 17 + case 158: { /* '158' */ + return 17 } - case 159: - { /* '159' */ - return 18 + case 159: { /* '159' */ + return 18 } - case 16: - { /* '16' */ - return 0 + case 16: { /* '16' */ + return 0 } - case 160: - { /* '160' */ - return 19 + case 160: { /* '160' */ + return 19 } - case 161: - { /* '161' */ - return 20 + case 161: { /* '161' */ + return 20 } - case 162: - { /* '162' */ - return 21 + case 162: { /* '162' */ + return 21 } - case 163: - { /* '163' */ - return 22 + case 163: { /* '163' */ + return 22 } - case 164: - { /* '164' */ - return 23 + case 164: { /* '164' */ + return 23 } - case 165: - { /* '165' */ - return 24 + case 165: { /* '165' */ + return 24 } - case 166: - { /* '166' */ - return 25 + case 166: { /* '166' */ + return 25 } - case 167: - { /* '167' */ - return 26 + case 167: { /* '167' */ + return 26 } - case 168: - { /* '168' */ - return 27 + case 168: { /* '168' */ + return 27 } - case 169: - { /* '169' */ - return 28 + case 169: { /* '169' */ + return 28 } - case 17: - { /* '17' */ - return 0 + case 17: { /* '17' */ + return 0 } - case 170: - { /* '170' */ - return 29 + case 170: { /* '170' */ + return 29 } - case 171: - { /* '171' */ - return 30 + case 171: { /* '171' */ + return 30 } - case 172: - { /* '172' */ - return 31 + case 172: { /* '172' */ + return 31 } - case 173: - { /* '173' */ - return 32 + case 173: { /* '173' */ + return 32 } - case 174: - { /* '174' */ - return 33 + case 174: { /* '174' */ + return 33 } - case 175: - { /* '175' */ - return 34 + case 175: { /* '175' */ + return 34 } - case 176: - { /* '176' */ - return 35 + case 176: { /* '176' */ + return 35 } - case 177: - { /* '177' */ - return 36 + case 177: { /* '177' */ + return 36 } - case 178: - { /* '178' */ - return 37 + case 178: { /* '178' */ + return 37 } - case 179: - { /* '179' */ - return 38 + case 179: { /* '179' */ + return 38 } - case 18: - { /* '18' */ - return 0 + case 18: { /* '18' */ + return 0 } - case 180: - { /* '180' */ - return 39 + case 180: { /* '180' */ + return 39 } - case 181: - { /* '181' */ - return 40 + case 181: { /* '181' */ + return 40 } - case 182: - { /* '182' */ - return 41 + case 182: { /* '182' */ + return 41 } - case 183: - { /* '183' */ - return 42 + case 183: { /* '183' */ + return 42 } - case 184: - { /* '184' */ - return 43 + case 184: { /* '184' */ + return 43 } - case 185: - { /* '185' */ - return 44 + case 185: { /* '185' */ + return 44 } - case 186: - { /* '186' */ - return 45 + case 186: { /* '186' */ + return 45 } - case 187: - { /* '187' */ - return 46 + case 187: { /* '187' */ + return 46 } - case 188: - { /* '188' */ - return 47 + case 188: { /* '188' */ + return 47 } - case 189: - { /* '189' */ - return 48 + case 189: { /* '189' */ + return 48 } - case 19: - { /* '19' */ - return 0 + case 19: { /* '19' */ + return 0 } - case 190: - { /* '190' */ - return 49 + case 190: { /* '190' */ + return 49 } - case 191: - { /* '191' */ - return 50 + case 191: { /* '191' */ + return 50 } - case 192: - { /* '192' */ - return 51 + case 192: { /* '192' */ + return 51 } - case 193: - { /* '193' */ - return 52 + case 193: { /* '193' */ + return 52 } - case 194: - { /* '194' */ - return 53 + case 194: { /* '194' */ + return 53 } - case 195: - { /* '195' */ - return 54 + case 195: { /* '195' */ + return 54 } - case 196: - { /* '196' */ - return 55 + case 196: { /* '196' */ + return 55 } - case 197: - { /* '197' */ - return 56 + case 197: { /* '197' */ + return 56 } - case 198: - { /* '198' */ - return 57 + case 198: { /* '198' */ + return 57 } - case 199: - { /* '199' */ - return 58 + case 199: { /* '199' */ + return 58 } - case 2: - { /* '2' */ - return 0 + case 2: { /* '2' */ + return 0 } - case 20: - { /* '20' */ - return 0 + case 20: { /* '20' */ + return 0 } - case 200: - { /* '200' */ - return 59 + case 200: { /* '200' */ + return 59 } - case 201: - { /* '201' */ - return 60 + case 201: { /* '201' */ + return 60 } - case 202: - { /* '202' */ - return 61 + case 202: { /* '202' */ + return 61 } - case 203: - { /* '203' */ - return 62 + case 203: { /* '203' */ + return 62 } - case 204: - { /* '204' */ - return 63 + case 204: { /* '204' */ + return 63 } - case 205: - { /* '205' */ - return 64 + case 205: { /* '205' */ + return 64 } - case 206: - { /* '206' */ - return 65 + case 206: { /* '206' */ + return 65 } - case 207: - { /* '207' */ - return 66 + case 207: { /* '207' */ + return 66 } - case 208: - { /* '208' */ - return 67 + case 208: { /* '208' */ + return 67 } - case 209: - { /* '209' */ - return 68 + case 209: { /* '209' */ + return 68 } - case 21: - { /* '21' */ - return 0 + case 21: { /* '21' */ + return 0 } - case 210: - { /* '210' */ - return 69 + case 210: { /* '210' */ + return 69 } - case 211: - { /* '211' */ - return 70 + case 211: { /* '211' */ + return 70 } - case 212: - { /* '212' */ - return 71 + case 212: { /* '212' */ + return 71 } - case 213: - { /* '213' */ - return 72 + case 213: { /* '213' */ + return 72 } - case 214: - { /* '214' */ - return 73 + case 214: { /* '214' */ + return 73 } - case 215: - { /* '215' */ - return 74 + case 215: { /* '215' */ + return 74 } - case 216: - { /* '216' */ - return 75 + case 216: { /* '216' */ + return 75 } - case 217: - { /* '217' */ - return 76 + case 217: { /* '217' */ + return 76 } - case 218: - { /* '218' */ - return 77 + case 218: { /* '218' */ + return 77 } - case 219: - { /* '219' */ - return 78 + case 219: { /* '219' */ + return 78 } - case 22: - { /* '22' */ - return 0 + case 22: { /* '22' */ + return 0 } - case 220: - { /* '220' */ - return 79 + case 220: { /* '220' */ + return 79 } - case 221: - { /* '221' */ - return 80 + case 221: { /* '221' */ + return 80 } - case 222: - { /* '222' */ - return 1200 + case 222: { /* '222' */ + return 1200 } - case 223: - { /* '223' */ - return 1201 + case 223: { /* '223' */ + return 1201 } - case 224: - { /* '224' */ - return 0 + case 224: { /* '224' */ + return 0 } - case 225: - { /* '225' */ - return 0 + case 225: { /* '225' */ + return 0 } - case 226: - { /* '226' */ - return 1 + case 226: { /* '226' */ + return 1 } - case 227: - { /* '227' */ - return 1 + case 227: { /* '227' */ + return 1 } - case 228: - { /* '228' */ - return 1 + case 228: { /* '228' */ + return 1 } - case 229: - { /* '229' */ - return 1 + case 229: { /* '229' */ + return 1 } - case 23: - { /* '23' */ - return 0 + case 23: { /* '23' */ + return 0 } - case 230: - { /* '230' */ - return 1 + case 230: { /* '230' */ + return 1 } - case 231: - { /* '231' */ - return 2 + case 231: { /* '231' */ + return 2 } - case 232: - { /* '232' */ - return 3 + case 232: { /* '232' */ + return 3 } - case 233: - { /* '233' */ - return 4 + case 233: { /* '233' */ + return 4 } - case 234: - { /* '234' */ - return 5 + case 234: { /* '234' */ + return 5 } - case 235: - { /* '235' */ - return 6 + case 235: { /* '235' */ + return 6 } - case 236: - { /* '236' */ - return 7 + case 236: { /* '236' */ + return 7 } - case 237: - { /* '237' */ - return 8 + case 237: { /* '237' */ + return 8 } - case 238: - { /* '238' */ - return 11 + case 238: { /* '238' */ + return 11 } - case 239: - { /* '239' */ - return 12 + case 239: { /* '239' */ + return 12 } - case 24: - { /* '24' */ - return 0 + case 24: { /* '24' */ + return 0 } - case 240: - { /* '240' */ - return 13 + case 240: { /* '240' */ + return 13 } - case 241: - { /* '241' */ - return 14 + case 241: { /* '241' */ + return 14 } - case 242: - { /* '242' */ - return 17 + case 242: { /* '242' */ + return 17 } - case 243: - { /* '243' */ - return 20 + case 243: { /* '243' */ + return 20 } - case 244: - { /* '244' */ - return 21 + case 244: { /* '244' */ + return 21 } - case 245: - { /* '245' */ - return 22 + case 245: { /* '245' */ + return 22 } - case 246: - { /* '246' */ - return 100 + case 246: { /* '246' */ + return 100 } - case 247: - { /* '247' */ - return 101 + case 247: { /* '247' */ + return 101 } - case 248: - { /* '248' */ - return 102 + case 248: { /* '248' */ + return 102 } - case 249: - { /* '249' */ - return 103 + case 249: { /* '249' */ + return 103 } - case 25: - { /* '25' */ - return 0 + case 25: { /* '25' */ + return 0 } - case 250: - { /* '250' */ - return 104 + case 250: { /* '250' */ + return 104 } - case 251: - { /* '251' */ - return 105 + case 251: { /* '251' */ + return 105 } - case 252: - { /* '252' */ - return 106 + case 252: { /* '252' */ + return 106 } - case 253: - { /* '253' */ - return 107 + case 253: { /* '253' */ + return 107 } - case 254: - { /* '254' */ - return 108 + case 254: { /* '254' */ + return 108 } - case 255: - { /* '255' */ - return 109 + case 255: { /* '255' */ + return 109 } - case 256: - { /* '256' */ - return 110 + case 256: { /* '256' */ + return 110 } - case 257: - { /* '257' */ - return 111 + case 257: { /* '257' */ + return 111 } - case 258: - { /* '258' */ - return 112 + case 258: { /* '258' */ + return 112 } - case 259: - { /* '259' */ - return 113 + case 259: { /* '259' */ + return 113 } - case 26: - { /* '26' */ - return 0 + case 26: { /* '26' */ + return 0 } - case 260: - { /* '260' */ - return 114 + case 260: { /* '260' */ + return 114 } - case 261: - { /* '261' */ - return 115 + case 261: { /* '261' */ + return 115 } - case 262: - { /* '262' */ - return 116 + case 262: { /* '262' */ + return 116 } - case 263: - { /* '263' */ - return 120 + case 263: { /* '263' */ + return 120 } - case 264: - { /* '264' */ - return 121 + case 264: { /* '264' */ + return 121 } - case 265: - { /* '265' */ - return 122 + case 265: { /* '265' */ + return 122 } - case 266: - { /* '266' */ - return 600 + case 266: { /* '266' */ + return 600 } - case 267: - { /* '267' */ - return 601 + case 267: { /* '267' */ + return 601 } - case 268: - { /* '268' */ - return 602 + case 268: { /* '268' */ + return 602 } - case 269: - { /* '269' */ - return 603 + case 269: { /* '269' */ + return 603 } - case 27: - { /* '27' */ - return 1 + case 27: { /* '27' */ + return 1 } - case 270: - { /* '270' */ - return 604 + case 270: { /* '270' */ + return 604 } - case 271: - { /* '271' */ - return 605 + case 271: { /* '271' */ + return 605 } - case 272: - { /* '272' */ - return 606 + case 272: { /* '272' */ + return 606 } - case 273: - { /* '273' */ - return 607 + case 273: { /* '273' */ + return 607 } - case 274: - { /* '274' */ - return 608 + case 274: { /* '274' */ + return 608 } - case 275: - { /* '275' */ - return 609 + case 275: { /* '275' */ + return 609 } - case 276: - { /* '276' */ - return 610 + case 276: { /* '276' */ + return 610 } - case 277: - { /* '277' */ - return 611 + case 277: { /* '277' */ + return 611 } - case 278: - { /* '278' */ - return 801 + case 278: { /* '278' */ + return 801 } - case 279: - { /* '279' */ - return 802 + case 279: { /* '279' */ + return 802 } - case 28: - { /* '28' */ - return 2 + case 28: { /* '28' */ + return 2 } - case 280: - { /* '280' */ - return 803 + case 280: { /* '280' */ + return 803 } - case 281: - { /* '281' */ - return 804 + case 281: { /* '281' */ + return 804 } - case 282: - { /* '282' */ - return 1000 + case 282: { /* '282' */ + return 1000 } - case 283: - { /* '283' */ - return 1001 + case 283: { /* '283' */ + return 1001 } - case 284: - { /* '284' */ - return 1002 + case 284: { /* '284' */ + return 1002 } - case 285: - { /* '285' */ - return 1003 + case 285: { /* '285' */ + return 1003 } - case 286: - { /* '286' */ - return 1 + case 286: { /* '286' */ + return 1 } - case 287: - { /* '287' */ - return 2 + case 287: { /* '287' */ + return 2 } - case 288: - { /* '288' */ - return 100 + case 288: { /* '288' */ + return 100 } - case 289: - { /* '289' */ - return 101 + case 289: { /* '289' */ + return 101 } - case 29: - { /* '29' */ - return 3 + case 29: { /* '29' */ + return 3 } - case 290: - { /* '290' */ - return 102 + case 290: { /* '290' */ + return 102 } - case 291: - { /* '291' */ - return 103 + case 291: { /* '291' */ + return 103 } - case 292: - { /* '292' */ - return 104 + case 292: { /* '292' */ + return 104 } - case 293: - { /* '293' */ - return 105 + case 293: { /* '293' */ + return 105 } - case 294: - { /* '294' */ - return 106 + case 294: { /* '294' */ + return 106 } - case 295: - { /* '295' */ - return 107 + case 295: { /* '295' */ + return 107 } - case 296: - { /* '296' */ - return 601 + case 296: { /* '296' */ + return 601 } - case 297: - { /* '297' */ - return 1000 + case 297: { /* '297' */ + return 1000 } - case 298: - { /* '298' */ - return 1001 + case 298: { /* '298' */ + return 1001 } - case 299: - { /* '299' */ - return 1010 + case 299: { /* '299' */ + return 1010 } - case 3: - { /* '3' */ - return 0 + case 3: { /* '3' */ + return 0 } - case 30: - { /* '30' */ - return 4 + case 30: { /* '30' */ + return 4 } - case 300: - { /* '300' */ - return 100 + case 300: { /* '300' */ + return 100 } - case 301: - { /* '301' */ - return 101 + case 301: { /* '301' */ + return 101 } - case 302: - { /* '302' */ - return 102 + case 302: { /* '302' */ + return 102 } - case 303: - { /* '303' */ - return 103 + case 303: { /* '303' */ + return 103 } - case 304: - { /* '304' */ - return 1000 + case 304: { /* '304' */ + return 1000 } - case 305: - { /* '305' */ - return 1010 + case 305: { /* '305' */ + return 1010 } - case 306: - { /* '306' */ - return 1 + case 306: { /* '306' */ + return 1 } - case 307: - { /* '307' */ - return 2 + case 307: { /* '307' */ + return 2 } - case 308: - { /* '308' */ - return 3 + case 308: { /* '308' */ + return 3 } - case 309: - { /* '309' */ - return 102 + case 309: { /* '309' */ + return 102 } - case 31: - { /* '31' */ - return 5 + case 31: { /* '31' */ + return 5 } - case 310: - { /* '310' */ - return 1000 + case 310: { /* '310' */ + return 1000 } - case 311: - { /* '311' */ - return 1 + case 311: { /* '311' */ + return 1 } - case 312: - { /* '312' */ - return 1 + case 312: { /* '312' */ + return 1 } - case 313: - { /* '313' */ - return 10 + case 313: { /* '313' */ + return 10 } - case 314: - { /* '314' */ - return 11 + case 314: { /* '314' */ + return 11 } - case 315: - { /* '315' */ - return 12 + case 315: { /* '315' */ + return 12 } - case 316: - { /* '316' */ - return 1010 + case 316: { /* '316' */ + return 1010 } - case 317: - { /* '317' */ - return 100 + case 317: { /* '317' */ + return 100 } - case 318: - { /* '318' */ - return 102 + case 318: { /* '318' */ + return 102 } - case 319: - { /* '319' */ - return 104 + case 319: { /* '319' */ + return 104 } - case 32: - { /* '32' */ - return 6 + case 32: { /* '32' */ + return 6 } - case 320: - { /* '320' */ - return 105 + case 320: { /* '320' */ + return 105 } - case 321: - { /* '321' */ - return 600 + case 321: { /* '321' */ + return 600 } - case 322: - { /* '322' */ - return 1 + case 322: { /* '322' */ + return 1 } - case 323: - { /* '323' */ - return 1 + case 323: { /* '323' */ + return 1 } - case 324: - { /* '324' */ - return 100 + case 324: { /* '324' */ + return 100 } - case 325: - { /* '325' */ - return 101 + case 325: { /* '325' */ + return 101 } - case 326: - { /* '326' */ - return 1 + case 326: { /* '326' */ + return 1 } - case 327: - { /* '327' */ - return 2 + case 327: { /* '327' */ + return 2 } - case 328: - { /* '328' */ - return 1 + case 328: { /* '328' */ + return 1 } - case 329: - { /* '329' */ - return 1000 + case 329: { /* '329' */ + return 1000 } - case 33: - { /* '33' */ - return 7 + case 33: { /* '33' */ + return 7 } - case 330: - { /* '330' */ - return 600 + case 330: { /* '330' */ + return 600 } - case 331: - { /* '331' */ - return 1 + case 331: { /* '331' */ + return 1 } - case 332: - { /* '332' */ - return 1 + case 332: { /* '332' */ + return 1 } - case 333: - { /* '333' */ - return 1 + case 333: { /* '333' */ + return 1 } - case 334: - { /* '334' */ - return 600 + case 334: { /* '334' */ + return 600 } - case 335: - { /* '335' */ - return 600 + case 335: { /* '335' */ + return 600 } - case 336: - { /* '336' */ - return 800 + case 336: { /* '336' */ + return 800 } - case 337: - { /* '337' */ - return 800 + case 337: { /* '337' */ + return 800 } - case 338: - { /* '338' */ - return 600 + case 338: { /* '338' */ + return 600 } - case 339: - { /* '339' */ - return 600 + case 339: { /* '339' */ + return 600 } - case 34: - { /* '34' */ - return 8 + case 34: { /* '34' */ + return 8 } - case 340: - { /* '340' */ - return 600 + case 340: { /* '340' */ + return 600 } - case 341: - { /* '341' */ - return 600 + case 341: { /* '341' */ + return 600 } - case 342: - { /* '342' */ - return 600 + case 342: { /* '342' */ + return 600 } - case 343: - { /* '343' */ - return 600 + case 343: { /* '343' */ + return 600 } - case 344: - { /* '344' */ - return 600 + case 344: { /* '344' */ + return 600 } - case 345: - { /* '345' */ - return 600 + case 345: { /* '345' */ + return 600 } - case 346: - { /* '346' */ - return 600 + case 346: { /* '346' */ + return 600 } - case 347: - { /* '347' */ - return 1 + case 347: { /* '347' */ + return 1 } - case 348: - { /* '348' */ - return 100 + case 348: { /* '348' */ + return 100 } - case 349: - { /* '349' */ - return 101 + case 349: { /* '349' */ + return 101 } - case 35: - { /* '35' */ - return 9 + case 35: { /* '35' */ + return 9 } - case 36: - { /* '36' */ - return 10 + case 36: { /* '36' */ + return 10 } - case 37: - { /* '37' */ - return 11 + case 37: { /* '37' */ + return 11 } - case 38: - { /* '38' */ - return 12 + case 38: { /* '38' */ + return 12 } - case 39: - { /* '39' */ - return 13 + case 39: { /* '39' */ + return 13 } - case 4: - { /* '4' */ - return 0 + case 4: { /* '4' */ + return 0 } - case 40: - { /* '40' */ - return 14 + case 40: { /* '40' */ + return 14 } - case 41: - { /* '41' */ - return 15 + case 41: { /* '41' */ + return 15 } - case 42: - { /* '42' */ - return 16 + case 42: { /* '42' */ + return 16 } - case 43: - { /* '43' */ - return 17 + case 43: { /* '43' */ + return 17 } - case 44: - { /* '44' */ - return 18 + case 44: { /* '44' */ + return 18 } - case 45: - { /* '45' */ - return 19 + case 45: { /* '45' */ + return 19 } - case 46: - { /* '46' */ - return 21 + case 46: { /* '46' */ + return 21 } - case 47: - { /* '47' */ - return 22 + case 47: { /* '47' */ + return 22 } - case 48: - { /* '48' */ - return 23 + case 48: { /* '48' */ + return 23 } - case 49: - { /* '49' */ - return 24 + case 49: { /* '49' */ + return 24 } - case 5: - { /* '5' */ - return 0 + case 5: { /* '5' */ + return 0 } - case 50: - { /* '50' */ - return 100 + case 50: { /* '50' */ + return 100 } - case 51: - { /* '51' */ - return 1 + case 51: { /* '51' */ + return 1 } - case 52: - { /* '52' */ - return 2 + case 52: { /* '52' */ + return 2 } - case 53: - { /* '53' */ - return 3 + case 53: { /* '53' */ + return 3 } - case 54: - { /* '54' */ - return 4 + case 54: { /* '54' */ + return 4 } - case 55: - { /* '55' */ - return 5 + case 55: { /* '55' */ + return 5 } - case 56: - { /* '56' */ - return 6 + case 56: { /* '56' */ + return 6 } - case 57: - { /* '57' */ - return 7 + case 57: { /* '57' */ + return 7 } - case 58: - { /* '58' */ - return 8 + case 58: { /* '58' */ + return 8 } - case 59: - { /* '59' */ - return 9 + case 59: { /* '59' */ + return 9 } - case 6: - { /* '6' */ - return 0 + case 6: { /* '6' */ + return 0 } - case 60: - { /* '60' */ - return 10 + case 60: { /* '60' */ + return 10 } - case 61: - { /* '61' */ - return 11 + case 61: { /* '61' */ + return 11 } - case 62: - { /* '62' */ - return 12 + case 62: { /* '62' */ + return 12 } - case 63: - { /* '63' */ - return 7 + case 63: { /* '63' */ + return 7 } - case 64: - { /* '64' */ - return 8 + case 64: { /* '64' */ + return 8 } - case 65: - { /* '65' */ - return 1 + case 65: { /* '65' */ + return 1 } - case 66: - { /* '66' */ - return 2 + case 66: { /* '66' */ + return 2 } - case 67: - { /* '67' */ - return 1 + case 67: { /* '67' */ + return 1 } - case 68: - { /* '68' */ - return 3 + case 68: { /* '68' */ + return 3 } - case 69: - { /* '69' */ - return 4 + case 69: { /* '69' */ + return 4 } - case 7: - { /* '7' */ - return 0 + case 7: { /* '7' */ + return 0 } - case 70: - { /* '70' */ - return 5 + case 70: { /* '70' */ + return 5 } - case 71: - { /* '71' */ - return 6 + case 71: { /* '71' */ + return 6 } - case 72: - { /* '72' */ - return 10 + case 72: { /* '72' */ + return 10 } - case 73: - { /* '73' */ - return 100 + case 73: { /* '73' */ + return 100 } - case 74: - { /* '74' */ - return 1 + case 74: { /* '74' */ + return 1 } - case 75: - { /* '75' */ - return 10 + case 75: { /* '75' */ + return 10 } - case 76: - { /* '76' */ - return 20 + case 76: { /* '76' */ + return 20 } - case 77: - { /* '77' */ - return 1 + case 77: { /* '77' */ + return 1 } - case 78: - { /* '78' */ - return 2 + case 78: { /* '78' */ + return 2 } - case 79: - { /* '79' */ - return 3 + case 79: { /* '79' */ + return 3 } - case 8: - { /* '8' */ - return 0 + case 8: { /* '8' */ + return 0 } - case 80: - { /* '80' */ - return 4 + case 80: { /* '80' */ + return 4 } - case 81: - { /* '81' */ - return 5 + case 81: { /* '81' */ + return 5 } - case 82: - { /* '82' */ - return 6 + case 82: { /* '82' */ + return 6 } - case 83: - { /* '83' */ - return 7 + case 83: { /* '83' */ + return 7 } - case 84: - { /* '84' */ - return 10 + case 84: { /* '84' */ + return 10 } - case 85: - { /* '85' */ - return 11 + case 85: { /* '85' */ + return 11 } - case 86: - { /* '86' */ - return 12 + case 86: { /* '86' */ + return 12 } - case 87: - { /* '87' */ - return 13 + case 87: { /* '87' */ + return 13 } - case 88: - { /* '88' */ - return 600 + case 88: { /* '88' */ + return 600 } - case 89: - { /* '89' */ - return 1 + case 89: { /* '89' */ + return 1 } - case 9: - { /* '9' */ - return 0 + case 9: { /* '9' */ + return 0 } - case 90: - { /* '90' */ - return 2 + case 90: { /* '90' */ + return 2 } - case 91: - { /* '91' */ - return 3 + case 91: { /* '91' */ + return 3 } - case 92: - { /* '92' */ - return 4 + case 92: { /* '92' */ + return 4 } - case 93: - { /* '93' */ - return 5 + case 93: { /* '93' */ + return 5 } - case 94: - { /* '94' */ - return 6 + case 94: { /* '94' */ + return 6 } - case 95: - { /* '95' */ - return 7 + case 95: { /* '95' */ + return 7 } - case 96: - { /* '96' */ - return 10 + case 96: { /* '96' */ + return 10 } - case 97: - { /* '97' */ - return 11 + case 97: { /* '97' */ + return 11 } - case 98: - { /* '98' */ - return 12 + case 98: { /* '98' */ + return 12 } - case 99: - { /* '99' */ - return 1 + case 99: { /* '99' */ + return 1 } - default: - { + default: { return 0 } } @@ -2167,1409 +1817,1058 @@ func KnxDatapointTypeFirstEnumForFieldNumber(value uint16) (KnxDatapointType, er } func (e KnxDatapointType) Name() string { - switch e { - case 0: - { /* '0' */ - return "Unknown Datapoint Subtype" + switch e { + case 0: { /* '0' */ + return "Unknown Datapoint Subtype" } - case 1: - { /* '1' */ - return "BOOL" + case 1: { /* '1' */ + return "BOOL" } - case 10: - { /* '10' */ - return "UDINT" + case 10: { /* '10' */ + return "UDINT" } - case 100: - { /* '100' */ - return "temperature difference (K)" + case 100: { /* '100' */ + return "temperature difference (K)" } - case 101: - { /* '101' */ - return "kelvin/hour (K/h)" + case 101: { /* '101' */ + return "kelvin/hour (K/h)" } - case 102: - { /* '102' */ - return "lux (Lux)" + case 102: { /* '102' */ + return "lux (Lux)" } - case 103: - { /* '103' */ - return "speed (m/s)" + case 103: { /* '103' */ + return "speed (m/s)" } - case 104: - { /* '104' */ - return "pressure (Pa)" + case 104: { /* '104' */ + return "pressure (Pa)" } - case 105: - { /* '105' */ - return "humidity (%)" + case 105: { /* '105' */ + return "humidity (%)" } - case 106: - { /* '106' */ - return "parts/million (ppm)" + case 106: { /* '106' */ + return "parts/million (ppm)" } - case 107: - { /* '107' */ - return "air flow (m³/h)" + case 107: { /* '107' */ + return "air flow (m³/h)" } - case 108: - { /* '108' */ - return "time (s)" + case 108: { /* '108' */ + return "time (s)" } - case 109: - { /* '109' */ - return "time (ms)" + case 109: { /* '109' */ + return "time (ms)" } - case 11: - { /* '11' */ - return "DINT" + case 11: { /* '11' */ + return "DINT" } - case 110: - { /* '110' */ - return "voltage (mV)" + case 110: { /* '110' */ + return "voltage (mV)" } - case 111: - { /* '111' */ - return "current (mA)" + case 111: { /* '111' */ + return "current (mA)" } - case 112: - { /* '112' */ - return "power density (W/m²)" + case 112: { /* '112' */ + return "power density (W/m²)" } - case 113: - { /* '113' */ - return "kelvin/percent (K/%)" + case 113: { /* '113' */ + return "kelvin/percent (K/%)" } - case 114: - { /* '114' */ - return "power (kW)" + case 114: { /* '114' */ + return "power (kW)" } - case 115: - { /* '115' */ - return "volume flow (l/h)" + case 115: { /* '115' */ + return "volume flow (l/h)" } - case 116: - { /* '116' */ - return "rain amount (l/m²)" + case 116: { /* '116' */ + return "rain amount (l/m²)" } - case 117: - { /* '117' */ - return "temperature (°F)" + case 117: { /* '117' */ + return "temperature (°F)" } - case 118: - { /* '118' */ - return "wind speed (km/h)" + case 118: { /* '118' */ + return "wind speed (km/h)" } - case 119: - { /* '119' */ - return "absolute humidity (g/m³)" + case 119: { /* '119' */ + return "absolute humidity (g/m³)" } - case 12: - { /* '12' */ - return "ULINT" + case 12: { /* '12' */ + return "ULINT" } - case 120: - { /* '120' */ - return "concentration (µg/m³)" + case 120: { /* '120' */ + return "concentration (µg/m³)" } - case 121: - { /* '121' */ - return "time of day" + case 121: { /* '121' */ + return "time of day" } - case 122: - { /* '122' */ - return "date" + case 122: { /* '122' */ + return "date" } - case 123: - { /* '123' */ - return "counter pulses (unsigned)" + case 123: { /* '123' */ + return "counter pulses (unsigned)" } - case 124: - { /* '124' */ - return "counter timesec (s)" + case 124: { /* '124' */ + return "counter timesec (s)" } - case 125: - { /* '125' */ - return "counter timemin (min)" + case 125: { /* '125' */ + return "counter timemin (min)" } - case 126: - { /* '126' */ - return "counter timehrs (h)" + case 126: { /* '126' */ + return "counter timehrs (h)" } - case 127: - { /* '127' */ - return "volume liquid (l)" + case 127: { /* '127' */ + return "volume liquid (l)" } - case 128: - { /* '128' */ - return "volume (m³)" + case 128: { /* '128' */ + return "volume (m³)" } - case 129: - { /* '129' */ - return "counter pulses (signed)" + case 129: { /* '129' */ + return "counter pulses (signed)" } - case 13: - { /* '13' */ - return "LINT" + case 13: { /* '13' */ + return "LINT" } - case 130: - { /* '130' */ - return "flow rate (m³/h)" + case 130: { /* '130' */ + return "flow rate (m³/h)" } - case 131: - { /* '131' */ - return "active energy (Wh)" + case 131: { /* '131' */ + return "active energy (Wh)" } - case 132: - { /* '132' */ - return "apparant energy (VAh)" + case 132: { /* '132' */ + return "apparant energy (VAh)" } - case 133: - { /* '133' */ - return "reactive energy (VARh)" + case 133: { /* '133' */ + return "reactive energy (VARh)" } - case 134: - { /* '134' */ - return "active energy (kWh)" + case 134: { /* '134' */ + return "active energy (kWh)" } - case 135: - { /* '135' */ - return "apparant energy (kVAh)" + case 135: { /* '135' */ + return "apparant energy (kVAh)" } - case 136: - { /* '136' */ - return "reactive energy (kVARh)" + case 136: { /* '136' */ + return "reactive energy (kVARh)" } - case 137: - { /* '137' */ - return "active energy (MWh)" + case 137: { /* '137' */ + return "active energy (MWh)" } - case 138: - { /* '138' */ - return "time lag (s)" + case 138: { /* '138' */ + return "time lag (s)" } - case 139: - { /* '139' */ - return "delta volume liquid (l)" + case 139: { /* '139' */ + return "delta volume liquid (l)" } - case 14: - { /* '14' */ - return "REAL" + case 14: { /* '14' */ + return "REAL" } - case 140: - { /* '140' */ - return "delta volume (m³)" + case 140: { /* '140' */ + return "delta volume (m³)" } - case 141: - { /* '141' */ - return "acceleration (m/s²)" + case 141: { /* '141' */ + return "acceleration (m/s²)" } - case 142: - { /* '142' */ - return "angular acceleration (rad/s²)" + case 142: { /* '142' */ + return "angular acceleration (rad/s²)" } - case 143: - { /* '143' */ - return "activation energy (J/mol)" + case 143: { /* '143' */ + return "activation energy (J/mol)" } - case 144: - { /* '144' */ - return "radioactive activity (1/s)" + case 144: { /* '144' */ + return "radioactive activity (1/s)" } - case 145: - { /* '145' */ - return "amount of substance (mol)" + case 145: { /* '145' */ + return "amount of substance (mol)" } - case 146: - { /* '146' */ - return "amplitude" + case 146: { /* '146' */ + return "amplitude" } - case 147: - { /* '147' */ - return "angle (radiant)" + case 147: { /* '147' */ + return "angle (radiant)" } - case 148: - { /* '148' */ - return "angle (degree)" + case 148: { /* '148' */ + return "angle (degree)" } - case 149: - { /* '149' */ - return "angular momentum (Js)" + case 149: { /* '149' */ + return "angular momentum (Js)" } - case 15: - { /* '15' */ - return "LREAL" + case 15: { /* '15' */ + return "LREAL" } - case 150: - { /* '150' */ - return "angular velocity (rad/s)" + case 150: { /* '150' */ + return "angular velocity (rad/s)" } - case 151: - { /* '151' */ - return "area (m*m)" + case 151: { /* '151' */ + return "area (m*m)" } - case 152: - { /* '152' */ - return "capacitance (F)" + case 152: { /* '152' */ + return "capacitance (F)" } - case 153: - { /* '153' */ - return "flux density (C/m²)" + case 153: { /* '153' */ + return "flux density (C/m²)" } - case 154: - { /* '154' */ - return "charge density (C/m³)" + case 154: { /* '154' */ + return "charge density (C/m³)" } - case 155: - { /* '155' */ - return "compressibility (m²/N)" + case 155: { /* '155' */ + return "compressibility (m²/N)" } - case 156: - { /* '156' */ - return "conductance (S)" + case 156: { /* '156' */ + return "conductance (S)" } - case 157: - { /* '157' */ - return "conductivity (S/m)" + case 157: { /* '157' */ + return "conductivity (S/m)" } - case 158: - { /* '158' */ - return "density (kg/m³)" + case 158: { /* '158' */ + return "density (kg/m³)" } - case 159: - { /* '159' */ - return "electric charge (C)" + case 159: { /* '159' */ + return "electric charge (C)" } - case 16: - { /* '16' */ - return "CHAR" + case 16: { /* '16' */ + return "CHAR" } - case 160: - { /* '160' */ - return "electric current (A)" + case 160: { /* '160' */ + return "electric current (A)" } - case 161: - { /* '161' */ - return "electric current density (A/m²)" + case 161: { /* '161' */ + return "electric current density (A/m²)" } - case 162: - { /* '162' */ - return "electric dipole moment (Cm)" + case 162: { /* '162' */ + return "electric dipole moment (Cm)" } - case 163: - { /* '163' */ - return "electric displacement (C/m²)" + case 163: { /* '163' */ + return "electric displacement (C/m²)" } - case 164: - { /* '164' */ - return "electric field strength (V/m)" + case 164: { /* '164' */ + return "electric field strength (V/m)" } - case 165: - { /* '165' */ - return "electric flux (C)" + case 165: { /* '165' */ + return "electric flux (C)" } - case 166: - { /* '166' */ - return "electric flux density (C/m²)" + case 166: { /* '166' */ + return "electric flux density (C/m²)" } - case 167: - { /* '167' */ - return "electric polarization (C/m²)" + case 167: { /* '167' */ + return "electric polarization (C/m²)" } - case 168: - { /* '168' */ - return "electric potential (V)" + case 168: { /* '168' */ + return "electric potential (V)" } - case 169: - { /* '169' */ - return "electric potential difference (V)" + case 169: { /* '169' */ + return "electric potential difference (V)" } - case 17: - { /* '17' */ - return "WCHAR" + case 17: { /* '17' */ + return "WCHAR" } - case 170: - { /* '170' */ - return "electromagnetic moment (Am²)" + case 170: { /* '170' */ + return "electromagnetic moment (Am²)" } - case 171: - { /* '171' */ - return "electromotive force (V)" + case 171: { /* '171' */ + return "electromotive force (V)" } - case 172: - { /* '172' */ - return "energy (J)" + case 172: { /* '172' */ + return "energy (J)" } - case 173: - { /* '173' */ - return "force (N)" + case 173: { /* '173' */ + return "force (N)" } - case 174: - { /* '174' */ - return "frequency (Hz)" + case 174: { /* '174' */ + return "frequency (Hz)" } - case 175: - { /* '175' */ - return "angular frequency (rad/s)" + case 175: { /* '175' */ + return "angular frequency (rad/s)" } - case 176: - { /* '176' */ - return "heat capacity (J/K)" + case 176: { /* '176' */ + return "heat capacity (J/K)" } - case 177: - { /* '177' */ - return "heat flow rate (W)" + case 177: { /* '177' */ + return "heat flow rate (W)" } - case 178: - { /* '178' */ - return "heat quantity" + case 178: { /* '178' */ + return "heat quantity" } - case 179: - { /* '179' */ - return "impedance (Ω)" + case 179: { /* '179' */ + return "impedance (Ω)" } - case 18: - { /* '18' */ - return "STRING" + case 18: { /* '18' */ + return "STRING" } - case 180: - { /* '180' */ - return "length (m)" + case 180: { /* '180' */ + return "length (m)" } - case 181: - { /* '181' */ - return "light quantity (J)" + case 181: { /* '181' */ + return "light quantity (J)" } - case 182: - { /* '182' */ - return "luminance (cd/m²)" + case 182: { /* '182' */ + return "luminance (cd/m²)" } - case 183: - { /* '183' */ - return "luminous flux (lm)" + case 183: { /* '183' */ + return "luminous flux (lm)" } - case 184: - { /* '184' */ - return "luminous intensity (cd)" + case 184: { /* '184' */ + return "luminous intensity (cd)" } - case 185: - { /* '185' */ - return "magnetic field strength (A/m)" + case 185: { /* '185' */ + return "magnetic field strength (A/m)" } - case 186: - { /* '186' */ - return "magnetic flux (Wb)" + case 186: { /* '186' */ + return "magnetic flux (Wb)" } - case 187: - { /* '187' */ - return "magnetic flux density (T)" + case 187: { /* '187' */ + return "magnetic flux density (T)" } - case 188: - { /* '188' */ - return "magnetic moment (Am²)" + case 188: { /* '188' */ + return "magnetic moment (Am²)" } - case 189: - { /* '189' */ - return "magnetic polarization (T)" + case 189: { /* '189' */ + return "magnetic polarization (T)" } - case 19: - { /* '19' */ - return "WSTRING" + case 19: { /* '19' */ + return "WSTRING" } - case 190: - { /* '190' */ - return "magnetization (A/m)" + case 190: { /* '190' */ + return "magnetization (A/m)" } - case 191: - { /* '191' */ - return "magnetomotive force (A)" + case 191: { /* '191' */ + return "magnetomotive force (A)" } - case 192: - { /* '192' */ - return "mass (kg)" + case 192: { /* '192' */ + return "mass (kg)" } - case 193: - { /* '193' */ - return "mass flux (kg/s)" + case 193: { /* '193' */ + return "mass flux (kg/s)" } - case 194: - { /* '194' */ - return "momentum (N/s)" + case 194: { /* '194' */ + return "momentum (N/s)" } - case 195: - { /* '195' */ - return "phase angle (rad)" + case 195: { /* '195' */ + return "phase angle (rad)" } - case 196: - { /* '196' */ - return "phase angle (°)" + case 196: { /* '196' */ + return "phase angle (°)" } - case 197: - { /* '197' */ - return "power (W)" + case 197: { /* '197' */ + return "power (W)" } - case 198: - { /* '198' */ - return "power factor (cos Φ)" + case 198: { /* '198' */ + return "power factor (cos Φ)" } - case 199: - { /* '199' */ - return "pressure (Pa)" + case 199: { /* '199' */ + return "pressure (Pa)" } - case 2: - { /* '2' */ - return "BYTE" + case 2: { /* '2' */ + return "BYTE" } - case 20: - { /* '20' */ - return "TIME" + case 20: { /* '20' */ + return "TIME" } - case 200: - { /* '200' */ - return "reactance (Ω)" + case 200: { /* '200' */ + return "reactance (Ω)" } - case 201: - { /* '201' */ - return "resistance (Ω)" + case 201: { /* '201' */ + return "resistance (Ω)" } - case 202: - { /* '202' */ - return "resistivity (Ωm)" + case 202: { /* '202' */ + return "resistivity (Ωm)" } - case 203: - { /* '203' */ - return "self inductance (H)" + case 203: { /* '203' */ + return "self inductance (H)" } - case 204: - { /* '204' */ - return "solid angle (sr)" + case 204: { /* '204' */ + return "solid angle (sr)" } - case 205: - { /* '205' */ - return "sound intensity (W/m²)" + case 205: { /* '205' */ + return "sound intensity (W/m²)" } - case 206: - { /* '206' */ - return "speed (m/s)" + case 206: { /* '206' */ + return "speed (m/s)" } - case 207: - { /* '207' */ - return "stress (Pa)" + case 207: { /* '207' */ + return "stress (Pa)" } - case 208: - { /* '208' */ - return "surface tension (N/m)" + case 208: { /* '208' */ + return "surface tension (N/m)" } - case 209: - { /* '209' */ - return "temperature (°C)" + case 209: { /* '209' */ + return "temperature (°C)" } - case 21: - { /* '21' */ - return "LTIME" + case 21: { /* '21' */ + return "LTIME" } - case 210: - { /* '210' */ - return "temperature absolute (K)" + case 210: { /* '210' */ + return "temperature absolute (K)" } - case 211: - { /* '211' */ - return "temperature difference (K)" + case 211: { /* '211' */ + return "temperature difference (K)" } - case 212: - { /* '212' */ - return "thermal capacity (J/K)" + case 212: { /* '212' */ + return "thermal capacity (J/K)" } - case 213: - { /* '213' */ - return "thermal conductivity (W/mK)" + case 213: { /* '213' */ + return "thermal conductivity (W/mK)" } - case 214: - { /* '214' */ - return "thermoelectric power (V/K)" + case 214: { /* '214' */ + return "thermoelectric power (V/K)" } - case 215: - { /* '215' */ - return "time (s)" + case 215: { /* '215' */ + return "time (s)" } - case 216: - { /* '216' */ - return "torque (Nm)" + case 216: { /* '216' */ + return "torque (Nm)" } - case 217: - { /* '217' */ - return "volume (m³)" + case 217: { /* '217' */ + return "volume (m³)" } - case 218: - { /* '218' */ - return "volume flux (m³/s)" + case 218: { /* '218' */ + return "volume flux (m³/s)" } - case 219: - { /* '219' */ - return "weight (N)" + case 219: { /* '219' */ + return "weight (N)" } - case 22: - { /* '22' */ - return "DATE" + case 22: { /* '22' */ + return "DATE" } - case 220: - { /* '220' */ - return "work (J)" + case 220: { /* '220' */ + return "work (J)" } - case 221: - { /* '221' */ - return "apparent power (VA)" + case 221: { /* '221' */ + return "apparent power (VA)" } - case 222: - { /* '222' */ - return "volume flux for meters (m³/h)" + case 222: { /* '222' */ + return "volume flux for meters (m³/h)" } - case 223: - { /* '223' */ - return "volume flux for meters (1/ls)" + case 223: { /* '223' */ + return "volume flux for meters (1/ls)" } - case 224: - { /* '224' */ - return "entrance access" + case 224: { /* '224' */ + return "entrance access" } - case 225: - { /* '225' */ - return "Character String (ASCII)" + case 225: { /* '225' */ + return "Character String (ASCII)" } - case 226: - { /* '226' */ - return "Character String (ISO 8859-1)" + case 226: { /* '226' */ + return "Character String (ISO 8859-1)" } - case 227: - { /* '227' */ - return "scene number" + case 227: { /* '227' */ + return "scene number" } - case 228: - { /* '228' */ - return "scene control" + case 228: { /* '228' */ + return "scene control" } - case 229: - { /* '229' */ - return "date time" + case 229: { /* '229' */ + return "date time" } - case 23: - { /* '23' */ - return "TIME_OF_DAY" + case 23: { /* '23' */ + return "TIME_OF_DAY" } - case 230: - { /* '230' */ - return "SCLO mode" + case 230: { /* '230' */ + return "SCLO mode" } - case 231: - { /* '231' */ - return "building mode" + case 231: { /* '231' */ + return "building mode" } - case 232: - { /* '232' */ - return "occupied" + case 232: { /* '232' */ + return "occupied" } - case 233: - { /* '233' */ - return "priority" + case 233: { /* '233' */ + return "priority" } - case 234: - { /* '234' */ - return "light application mode" + case 234: { /* '234' */ + return "light application mode" } - case 235: - { /* '235' */ - return "light application area" + case 235: { /* '235' */ + return "light application area" } - case 236: - { /* '236' */ - return "alarm class" + case 236: { /* '236' */ + return "alarm class" } - case 237: - { /* '237' */ - return "PSU mode" + case 237: { /* '237' */ + return "PSU mode" } - case 238: - { /* '238' */ - return "system error class" + case 238: { /* '238' */ + return "system error class" } - case 239: - { /* '239' */ - return "HVAC error class" + case 239: { /* '239' */ + return "HVAC error class" } - case 24: - { /* '24' */ - return "TOD" + case 24: { /* '24' */ + return "TOD" } - case 240: - { /* '240' */ - return "time delay" + case 240: { /* '240' */ + return "time delay" } - case 241: - { /* '241' */ - return "wind force scale (0..12)" + case 241: { /* '241' */ + return "wind force scale (0..12)" } - case 242: - { /* '242' */ - return "sensor mode" + case 242: { /* '242' */ + return "sensor mode" } - case 243: - { /* '243' */ - return "actuator connect type" + case 243: { /* '243' */ + return "actuator connect type" } - case 244: - { /* '244' */ - return "cloud cover" + case 244: { /* '244' */ + return "cloud cover" } - case 245: - { /* '245' */ - return "power return mode" + case 245: { /* '245' */ + return "power return mode" } - case 246: - { /* '246' */ - return "fuel type" + case 246: { /* '246' */ + return "fuel type" } - case 247: - { /* '247' */ - return "burner type" + case 247: { /* '247' */ + return "burner type" } - case 248: - { /* '248' */ - return "HVAC mode" + case 248: { /* '248' */ + return "HVAC mode" } - case 249: - { /* '249' */ - return "DHW mode" + case 249: { /* '249' */ + return "DHW mode" } - case 25: - { /* '25' */ - return "DATE_AND_TIME" + case 25: { /* '25' */ + return "DATE_AND_TIME" } - case 250: - { /* '250' */ - return "load priority" + case 250: { /* '250' */ + return "load priority" } - case 251: - { /* '251' */ - return "HVAC control mode" + case 251: { /* '251' */ + return "HVAC control mode" } - case 252: - { /* '252' */ - return "HVAC emergency mode" + case 252: { /* '252' */ + return "HVAC emergency mode" } - case 253: - { /* '253' */ - return "changeover mode" + case 253: { /* '253' */ + return "changeover mode" } - case 254: - { /* '254' */ - return "valve mode" + case 254: { /* '254' */ + return "valve mode" } - case 255: - { /* '255' */ - return "damper mode" + case 255: { /* '255' */ + return "damper mode" } - case 256: - { /* '256' */ - return "heater mode" + case 256: { /* '256' */ + return "heater mode" } - case 257: - { /* '257' */ - return "fan mode" + case 257: { /* '257' */ + return "fan mode" } - case 258: - { /* '258' */ - return "master/slave mode" + case 258: { /* '258' */ + return "master/slave mode" } - case 259: - { /* '259' */ - return "status room setpoint" + case 259: { /* '259' */ + return "status room setpoint" } - case 26: - { /* '26' */ - return "DT" + case 26: { /* '26' */ + return "DT" } - case 260: - { /* '260' */ - return "metering device type" + case 260: { /* '260' */ + return "metering device type" } - case 261: - { /* '261' */ - return "hum dehum mode" + case 261: { /* '261' */ + return "hum dehum mode" } - case 262: - { /* '262' */ - return "enable H/C stage" + case 262: { /* '262' */ + return "enable H/C stage" } - case 263: - { /* '263' */ - return "ADA type" + case 263: { /* '263' */ + return "ADA type" } - case 264: - { /* '264' */ - return "backup mode" + case 264: { /* '264' */ + return "backup mode" } - case 265: - { /* '265' */ - return "start syncronization type" + case 265: { /* '265' */ + return "start syncronization type" } - case 266: - { /* '266' */ - return "behavior lock/unlock" + case 266: { /* '266' */ + return "behavior lock/unlock" } - case 267: - { /* '267' */ - return "behavior bus power up/down" + case 267: { /* '267' */ + return "behavior bus power up/down" } - case 268: - { /* '268' */ - return "dali fade time" + case 268: { /* '268' */ + return "dali fade time" } - case 269: - { /* '269' */ - return "blink mode" + case 269: { /* '269' */ + return "blink mode" } - case 27: - { /* '27' */ - return "switch" + case 27: { /* '27' */ + return "switch" } - case 270: - { /* '270' */ - return "light control mode" + case 270: { /* '270' */ + return "light control mode" } - case 271: - { /* '271' */ - return "PB switch mode" + case 271: { /* '271' */ + return "PB switch mode" } - case 272: - { /* '272' */ - return "PB action mode" + case 272: { /* '272' */ + return "PB action mode" } - case 273: - { /* '273' */ - return "PB dimm mode" + case 273: { /* '273' */ + return "PB dimm mode" } - case 274: - { /* '274' */ - return "switch on mode" + case 274: { /* '274' */ + return "switch on mode" } - case 275: - { /* '275' */ - return "load type" + case 275: { /* '275' */ + return "load type" } - case 276: - { /* '276' */ - return "load type detection" + case 276: { /* '276' */ + return "load type detection" } - case 277: - { /* '277' */ - return "converter test control" + case 277: { /* '277' */ + return "converter test control" } - case 278: - { /* '278' */ - return "SAB except behavior" + case 278: { /* '278' */ + return "SAB except behavior" } - case 279: - { /* '279' */ - return "SAB behavior on lock/unlock" + case 279: { /* '279' */ + return "SAB behavior on lock/unlock" } - case 28: - { /* '28' */ - return "boolean" + case 28: { /* '28' */ + return "boolean" } - case 280: - { /* '280' */ - return "SSSB mode" + case 280: { /* '280' */ + return "SSSB mode" } - case 281: - { /* '281' */ - return "blinds control mode" + case 281: { /* '281' */ + return "blinds control mode" } - case 282: - { /* '282' */ - return "communication mode" + case 282: { /* '282' */ + return "communication mode" } - case 283: - { /* '283' */ - return "additional information type" + case 283: { /* '283' */ + return "additional information type" } - case 284: - { /* '284' */ - return "RF mode selection" + case 284: { /* '284' */ + return "RF mode selection" } - case 285: - { /* '285' */ - return "RF filter mode selection" + case 285: { /* '285' */ + return "RF filter mode selection" } - case 286: - { /* '286' */ - return "general status" + case 286: { /* '286' */ + return "general status" } - case 287: - { /* '287' */ - return "device control" + case 287: { /* '287' */ + return "device control" } - case 288: - { /* '288' */ - return "forcing signal" + case 288: { /* '288' */ + return "forcing signal" } - case 289: - { /* '289' */ - return "forcing signal cool" + case 289: { /* '289' */ + return "forcing signal cool" } - case 29: - { /* '29' */ - return "enable" + case 29: { /* '29' */ + return "enable" } - case 290: - { /* '290' */ - return "room heating controller status" + case 290: { /* '290' */ + return "room heating controller status" } - case 291: - { /* '291' */ - return "solar DHW controller status" + case 291: { /* '291' */ + return "solar DHW controller status" } - case 292: - { /* '292' */ - return "fuel type set" + case 292: { /* '292' */ + return "fuel type set" } - case 293: - { /* '293' */ - return "room cooling controller status" + case 293: { /* '293' */ + return "room cooling controller status" } - case 294: - { /* '294' */ - return "ventilation controller status" + case 294: { /* '294' */ + return "ventilation controller status" } - case 295: - { /* '295' */ - return "combined status RTSM" + case 295: { /* '295' */ + return "combined status RTSM" } - case 296: - { /* '296' */ - return "lighting actuator error information" + case 296: { /* '296' */ + return "lighting actuator error information" } - case 297: - { /* '297' */ - return "RF communication mode info" + case 297: { /* '297' */ + return "RF communication mode info" } - case 298: - { /* '298' */ - return "cEMI server supported RF filtering modes" + case 298: { /* '298' */ + return "cEMI server supported RF filtering modes" } - case 299: - { /* '299' */ - return "channel activation for 8 channels" + case 299: { /* '299' */ + return "channel activation for 8 channels" } - case 3: - { /* '3' */ - return "WORD" + case 3: { /* '3' */ + return "WORD" } - case 30: - { /* '30' */ - return "ramp" + case 30: { /* '30' */ + return "ramp" } - case 300: - { /* '300' */ - return "DHW controller status" + case 300: { /* '300' */ + return "DHW controller status" } - case 301: - { /* '301' */ - return "RHCC status" + case 301: { /* '301' */ + return "RHCC status" } - case 302: - { /* '302' */ - return "combined status HVA" + case 302: { /* '302' */ + return "combined status HVA" } - case 303: - { /* '303' */ - return "combined status RTC" + case 303: { /* '303' */ + return "combined status RTC" } - case 304: - { /* '304' */ - return "media" + case 304: { /* '304' */ + return "media" } - case 305: - { /* '305' */ - return "channel activation for 16 channels" + case 305: { /* '305' */ + return "channel activation for 16 channels" } - case 306: - { /* '306' */ - return "on/off action" + case 306: { /* '306' */ + return "on/off action" } - case 307: - { /* '307' */ - return "alarm reaction" + case 307: { /* '307' */ + return "alarm reaction" } - case 308: - { /* '308' */ - return "up/down action" + case 308: { /* '308' */ + return "up/down action" } - case 309: - { /* '309' */ - return "HVAC push button action" + case 309: { /* '309' */ + return "HVAC push button action" } - case 31: - { /* '31' */ - return "alarm" + case 31: { /* '31' */ + return "alarm" } - case 310: - { /* '310' */ - return "busy/nak repetitions" + case 310: { /* '310' */ + return "busy/nak repetitions" } - case 311: - { /* '311' */ - return "scene information" + case 311: { /* '311' */ + return "scene information" } - case 312: - { /* '312' */ - return "bit-combined info on/off" + case 312: { /* '312' */ + return "bit-combined info on/off" } - case 313: - { /* '313' */ - return "active energy (Wh)" + case 313: { /* '313' */ + return "active energy (Wh)" } - case 314: - { /* '314' */ - return "apparant energy (VAh)" + case 314: { /* '314' */ + return "apparant energy (VAh)" } - case 315: - { /* '315' */ - return "reactive energy (VARh)" + case 315: { /* '315' */ + return "reactive energy (VARh)" } - case 316: - { /* '316' */ - return "activation state 0..23" + case 316: { /* '316' */ + return "activation state 0..23" } - case 317: - { /* '317' */ - return "time delay & HVAC mode" + case 317: { /* '317' */ + return "time delay & HVAC mode" } - case 318: - { /* '318' */ - return "time delay & DHW mode" + case 318: { /* '318' */ + return "time delay & DHW mode" } - case 319: - { /* '319' */ - return "time delay & occupancy mode" + case 319: { /* '319' */ + return "time delay & occupancy mode" } - case 32: - { /* '32' */ - return "binary value" + case 32: { /* '32' */ + return "binary value" } - case 320: - { /* '320' */ - return "time delay & building mode" + case 320: { /* '320' */ + return "time delay & building mode" } - case 321: - { /* '321' */ - return "Status Lighting Actuator" + case 321: { /* '321' */ + return "Status Lighting Actuator" } - case 322: - { /* '322' */ - return "DPT version" + case 322: { /* '322' */ + return "DPT version" } - case 323: - { /* '323' */ - return "alarm info" + case 323: { /* '323' */ + return "alarm info" } - case 324: - { /* '324' */ - return "room temperature setpoint" + case 324: { /* '324' */ + return "room temperature setpoint" } - case 325: - { /* '325' */ - return "room temperature setpoint shift" + case 325: { /* '325' */ + return "room temperature setpoint shift" } - case 326: - { /* '326' */ - return "scaling speed" + case 326: { /* '326' */ + return "scaling speed" } - case 327: - { /* '327' */ - return "scaling step time" + case 327: { /* '327' */ + return "scaling step time" } - case 328: - { /* '328' */ - return "metering value (value,encoding,cmd)" + case 328: { /* '328' */ + return "metering value (value,encoding,cmd)" } - case 329: - { /* '329' */ - return "MBus address" + case 329: { /* '329' */ + return "MBus address" } - case 33: - { /* '33' */ - return "step" + case 33: { /* '33' */ + return "step" } - case 330: - { /* '330' */ - return "RGB value 3x(0..255)" + case 330: { /* '330' */ + return "RGB value 3x(0..255)" } - case 331: - { /* '331' */ - return "language code (ASCII)" + case 331: { /* '331' */ + return "language code (ASCII)" } - case 332: - { /* '332' */ - return "electrical energy with tariff" + case 332: { /* '332' */ + return "electrical energy with tariff" } - case 333: - { /* '333' */ - return "priority control" + case 333: { /* '333' */ + return "priority control" } - case 334: - { /* '334' */ - return "diagnostic value" + case 334: { /* '334' */ + return "diagnostic value" } - case 335: - { /* '335' */ - return "diagnostic value" + case 335: { /* '335' */ + return "diagnostic value" } - case 336: - { /* '336' */ - return "combined position" + case 336: { /* '336' */ + return "combined position" } - case 337: - { /* '337' */ - return "status sunblind & shutter actuator" + case 337: { /* '337' */ + return "status sunblind & shutter actuator" } - case 338: - { /* '338' */ - return "colour xyY" + case 338: { /* '338' */ + return "colour xyY" } - case 339: - { /* '339' */ - return "DALI converter status" + case 339: { /* '339' */ + return "DALI converter status" } - case 34: - { /* '34' */ - return "up/down" + case 34: { /* '34' */ + return "up/down" } - case 340: - { /* '340' */ - return "DALI converter test result" + case 340: { /* '340' */ + return "DALI converter test result" } - case 341: - { /* '341' */ - return "Battery Information" + case 341: { /* '341' */ + return "Battery Information" } - case 342: - { /* '342' */ - return "brightness colour temperature transition" + case 342: { /* '342' */ + return "brightness colour temperature transition" } - case 343: - { /* '343' */ - return "brightness colour temperature control" + case 343: { /* '343' */ + return "brightness colour temperature control" } - case 344: - { /* '344' */ - return "RGBW value 4x(0..100%)" + case 344: { /* '344' */ + return "RGBW value 4x(0..100%)" } - case 345: - { /* '345' */ - return "RGBW relative control" + case 345: { /* '345' */ + return "RGBW relative control" } - case 346: - { /* '346' */ - return "RGB relative control" + case 346: { /* '346' */ + return "RGB relative control" } - case 347: - { /* '347' */ - return "geographical location (longitude and latitude) expressed in degrees" + case 347: { /* '347' */ + return "geographical location (longitude and latitude) expressed in degrees" } - case 348: - { /* '348' */ - return "Temperature setpoint setting for 4 HVAC Modes" + case 348: { /* '348' */ + return "Temperature setpoint setting for 4 HVAC Modes" } - case 349: - { /* '349' */ - return "Temperature setpoint shift setting for 4 HVAC Modes" + case 349: { /* '349' */ + return "Temperature setpoint shift setting for 4 HVAC Modes" } - case 35: - { /* '35' */ - return "open/close" + case 35: { /* '35' */ + return "open/close" } - case 36: - { /* '36' */ - return "start/stop" + case 36: { /* '36' */ + return "start/stop" } - case 37: - { /* '37' */ - return "state" + case 37: { /* '37' */ + return "state" } - case 38: - { /* '38' */ - return "invert" + case 38: { /* '38' */ + return "invert" } - case 39: - { /* '39' */ - return "dim send style" + case 39: { /* '39' */ + return "dim send style" } - case 4: - { /* '4' */ - return "DWORD" + case 4: { /* '4' */ + return "DWORD" } - case 40: - { /* '40' */ - return "input source" + case 40: { /* '40' */ + return "input source" } - case 41: - { /* '41' */ - return "reset" + case 41: { /* '41' */ + return "reset" } - case 42: - { /* '42' */ - return "acknowledge" + case 42: { /* '42' */ + return "acknowledge" } - case 43: - { /* '43' */ - return "trigger" + case 43: { /* '43' */ + return "trigger" } - case 44: - { /* '44' */ - return "occupancy" + case 44: { /* '44' */ + return "occupancy" } - case 45: - { /* '45' */ - return "window/door" + case 45: { /* '45' */ + return "window/door" } - case 46: - { /* '46' */ - return "logical function" + case 46: { /* '46' */ + return "logical function" } - case 47: - { /* '47' */ - return "scene" + case 47: { /* '47' */ + return "scene" } - case 48: - { /* '48' */ - return "shutter/blinds mode" + case 48: { /* '48' */ + return "shutter/blinds mode" } - case 49: - { /* '49' */ - return "day/night" + case 49: { /* '49' */ + return "day/night" } - case 5: - { /* '5' */ - return "LWORD" + case 5: { /* '5' */ + return "LWORD" } - case 50: - { /* '50' */ - return "cooling/heating" + case 50: { /* '50' */ + return "cooling/heating" } - case 51: - { /* '51' */ - return "switch control" + case 51: { /* '51' */ + return "switch control" } - case 52: - { /* '52' */ - return "boolean control" + case 52: { /* '52' */ + return "boolean control" } - case 53: - { /* '53' */ - return "enable control" + case 53: { /* '53' */ + return "enable control" } - case 54: - { /* '54' */ - return "ramp control" + case 54: { /* '54' */ + return "ramp control" } - case 55: - { /* '55' */ - return "alarm control" + case 55: { /* '55' */ + return "alarm control" } - case 56: - { /* '56' */ - return "binary value control" + case 56: { /* '56' */ + return "binary value control" } - case 57: - { /* '57' */ - return "step control" + case 57: { /* '57' */ + return "step control" } - case 58: - { /* '58' */ - return "direction control 1" + case 58: { /* '58' */ + return "direction control 1" } - case 59: - { /* '59' */ - return "direction control 2" + case 59: { /* '59' */ + return "direction control 2" } - case 6: - { /* '6' */ - return "USINT" + case 6: { /* '6' */ + return "USINT" } - case 60: - { /* '60' */ - return "start control" + case 60: { /* '60' */ + return "start control" } - case 61: - { /* '61' */ - return "state control" + case 61: { /* '61' */ + return "state control" } - case 62: - { /* '62' */ - return "invert control" + case 62: { /* '62' */ + return "invert control" } - case 63: - { /* '63' */ - return "dimming control" + case 63: { /* '63' */ + return "dimming control" } - case 64: - { /* '64' */ - return "blind control" + case 64: { /* '64' */ + return "blind control" } - case 65: - { /* '65' */ - return "character (ASCII)" + case 65: { /* '65' */ + return "character (ASCII)" } - case 66: - { /* '66' */ - return "character (ISO 8859-1)" + case 66: { /* '66' */ + return "character (ISO 8859-1)" } - case 67: - { /* '67' */ - return "percentage (0..100%)" + case 67: { /* '67' */ + return "percentage (0..100%)" } - case 68: - { /* '68' */ - return "angle (degrees)" + case 68: { /* '68' */ + return "angle (degrees)" } - case 69: - { /* '69' */ - return "percentage (0..255%)" + case 69: { /* '69' */ + return "percentage (0..255%)" } - case 7: - { /* '7' */ - return "SINT" + case 7: { /* '7' */ + return "SINT" } - case 70: - { /* '70' */ - return "ratio (0..255)" + case 70: { /* '70' */ + return "ratio (0..255)" } - case 71: - { /* '71' */ - return "tariff (0..255)" + case 71: { /* '71' */ + return "tariff (0..255)" } - case 72: - { /* '72' */ - return "counter pulses (0..255)" + case 72: { /* '72' */ + return "counter pulses (0..255)" } - case 73: - { /* '73' */ - return "fan stage (0..255)" + case 73: { /* '73' */ + return "fan stage (0..255)" } - case 74: - { /* '74' */ - return "percentage (-128..127%)" + case 74: { /* '74' */ + return "percentage (-128..127%)" } - case 75: - { /* '75' */ - return "counter pulses (-128..127)" + case 75: { /* '75' */ + return "counter pulses (-128..127)" } - case 76: - { /* '76' */ - return "status with mode" + case 76: { /* '76' */ + return "status with mode" } - case 77: - { /* '77' */ - return "pulses" + case 77: { /* '77' */ + return "pulses" } - case 78: - { /* '78' */ - return "time (ms)" + case 78: { /* '78' */ + return "time (ms)" } - case 79: - { /* '79' */ - return "time (10 ms)" + case 79: { /* '79' */ + return "time (10 ms)" } - case 8: - { /* '8' */ - return "UINT" + case 8: { /* '8' */ + return "UINT" } - case 80: - { /* '80' */ - return "time (100 ms)" + case 80: { /* '80' */ + return "time (100 ms)" } - case 81: - { /* '81' */ - return "time (s)" + case 81: { /* '81' */ + return "time (s)" } - case 82: - { /* '82' */ - return "time (min)" + case 82: { /* '82' */ + return "time (min)" } - case 83: - { /* '83' */ - return "time (h)" + case 83: { /* '83' */ + return "time (h)" } - case 84: - { /* '84' */ - return "property data type" + case 84: { /* '84' */ + return "property data type" } - case 85: - { /* '85' */ - return "length (mm)" + case 85: { /* '85' */ + return "length (mm)" } - case 86: - { /* '86' */ - return "current (mA)" + case 86: { /* '86' */ + return "current (mA)" } - case 87: - { /* '87' */ - return "brightness (lux)" + case 87: { /* '87' */ + return "brightness (lux)" } - case 88: - { /* '88' */ - return "absolute colour temperature (K)" + case 88: { /* '88' */ + return "absolute colour temperature (K)" } - case 89: - { /* '89' */ - return "pulses difference" + case 89: { /* '89' */ + return "pulses difference" } - case 9: - { /* '9' */ - return "INT" + case 9: { /* '9' */ + return "INT" } - case 90: - { /* '90' */ - return "time lag (ms)" + case 90: { /* '90' */ + return "time lag (ms)" } - case 91: - { /* '91' */ - return "time lag(10 ms)" + case 91: { /* '91' */ + return "time lag(10 ms)" } - case 92: - { /* '92' */ - return "time lag (100 ms)" + case 92: { /* '92' */ + return "time lag (100 ms)" } - case 93: - { /* '93' */ - return "time lag (s)" + case 93: { /* '93' */ + return "time lag (s)" } - case 94: - { /* '94' */ - return "time lag (min)" + case 94: { /* '94' */ + return "time lag (min)" } - case 95: - { /* '95' */ - return "time lag (h)" + case 95: { /* '95' */ + return "time lag (h)" } - case 96: - { /* '96' */ - return "percentage difference (%)" + case 96: { /* '96' */ + return "percentage difference (%)" } - case 97: - { /* '97' */ - return "rotation angle (°)" + case 97: { /* '97' */ + return "rotation angle (°)" } - case 98: - { /* '98' */ - return "length (m)" + case 98: { /* '98' */ + return "length (m)" } - case 99: - { /* '99' */ - return "temperature (°C)" + case 99: { /* '99' */ + return "temperature (°C)" } - default: - { + default: { return "" } } @@ -3585,1409 +2884,1058 @@ func KnxDatapointTypeFirstEnumForFieldName(value string) (KnxDatapointType, erro } func (e KnxDatapointType) DatapointMainType() KnxDatapointMainType { - switch e { - case 0: - { /* '0' */ + switch e { + case 0: { /* '0' */ return KnxDatapointMainType_DPT_UNKNOWN } - case 1: - { /* '1' */ + case 1: { /* '1' */ return KnxDatapointMainType_DPT_1_BIT } - case 10: - { /* '10' */ + case 10: { /* '10' */ return KnxDatapointMainType_DPT_4_BYTE_UNSIGNED_VALUE } - case 100: - { /* '100' */ + case 100: { /* '100' */ return KnxDatapointMainType_DPT_2_BYTE_FLOAT_VALUE } - case 101: - { /* '101' */ + case 101: { /* '101' */ return KnxDatapointMainType_DPT_2_BYTE_FLOAT_VALUE } - case 102: - { /* '102' */ + case 102: { /* '102' */ return KnxDatapointMainType_DPT_2_BYTE_FLOAT_VALUE } - case 103: - { /* '103' */ + case 103: { /* '103' */ return KnxDatapointMainType_DPT_2_BYTE_FLOAT_VALUE } - case 104: - { /* '104' */ + case 104: { /* '104' */ return KnxDatapointMainType_DPT_2_BYTE_FLOAT_VALUE } - case 105: - { /* '105' */ + case 105: { /* '105' */ return KnxDatapointMainType_DPT_2_BYTE_FLOAT_VALUE } - case 106: - { /* '106' */ + case 106: { /* '106' */ return KnxDatapointMainType_DPT_2_BYTE_FLOAT_VALUE } - case 107: - { /* '107' */ + case 107: { /* '107' */ return KnxDatapointMainType_DPT_2_BYTE_FLOAT_VALUE } - case 108: - { /* '108' */ + case 108: { /* '108' */ return KnxDatapointMainType_DPT_2_BYTE_FLOAT_VALUE } - case 109: - { /* '109' */ + case 109: { /* '109' */ return KnxDatapointMainType_DPT_2_BYTE_FLOAT_VALUE } - case 11: - { /* '11' */ + case 11: { /* '11' */ return KnxDatapointMainType_DPT_4_BYTE_SIGNED_VALUE } - case 110: - { /* '110' */ + case 110: { /* '110' */ return KnxDatapointMainType_DPT_2_BYTE_FLOAT_VALUE } - case 111: - { /* '111' */ + case 111: { /* '111' */ return KnxDatapointMainType_DPT_2_BYTE_FLOAT_VALUE } - case 112: - { /* '112' */ + case 112: { /* '112' */ return KnxDatapointMainType_DPT_2_BYTE_FLOAT_VALUE } - case 113: - { /* '113' */ + case 113: { /* '113' */ return KnxDatapointMainType_DPT_2_BYTE_FLOAT_VALUE } - case 114: - { /* '114' */ + case 114: { /* '114' */ return KnxDatapointMainType_DPT_2_BYTE_FLOAT_VALUE } - case 115: - { /* '115' */ + case 115: { /* '115' */ return KnxDatapointMainType_DPT_2_BYTE_FLOAT_VALUE } - case 116: - { /* '116' */ + case 116: { /* '116' */ return KnxDatapointMainType_DPT_2_BYTE_FLOAT_VALUE } - case 117: - { /* '117' */ + case 117: { /* '117' */ return KnxDatapointMainType_DPT_2_BYTE_FLOAT_VALUE } - case 118: - { /* '118' */ + case 118: { /* '118' */ return KnxDatapointMainType_DPT_2_BYTE_FLOAT_VALUE } - case 119: - { /* '119' */ + case 119: { /* '119' */ return KnxDatapointMainType_DPT_2_BYTE_FLOAT_VALUE } - case 12: - { /* '12' */ + case 12: { /* '12' */ return KnxDatapointMainType_DPT_8_BYTE_UNSIGNED_VALUE } - case 120: - { /* '120' */ + case 120: { /* '120' */ return KnxDatapointMainType_DPT_2_BYTE_FLOAT_VALUE } - case 121: - { /* '121' */ + case 121: { /* '121' */ return KnxDatapointMainType_DPT_TIME } - case 122: - { /* '122' */ + case 122: { /* '122' */ return KnxDatapointMainType_DPT_DATE } - case 123: - { /* '123' */ + case 123: { /* '123' */ return KnxDatapointMainType_DPT_4_BYTE_UNSIGNED_VALUE } - case 124: - { /* '124' */ + case 124: { /* '124' */ return KnxDatapointMainType_DPT_4_BYTE_UNSIGNED_VALUE } - case 125: - { /* '125' */ + case 125: { /* '125' */ return KnxDatapointMainType_DPT_4_BYTE_UNSIGNED_VALUE } - case 126: - { /* '126' */ + case 126: { /* '126' */ return KnxDatapointMainType_DPT_4_BYTE_UNSIGNED_VALUE } - case 127: - { /* '127' */ + case 127: { /* '127' */ return KnxDatapointMainType_DPT_4_BYTE_UNSIGNED_VALUE } - case 128: - { /* '128' */ + case 128: { /* '128' */ return KnxDatapointMainType_DPT_4_BYTE_UNSIGNED_VALUE } - case 129: - { /* '129' */ + case 129: { /* '129' */ return KnxDatapointMainType_DPT_4_BYTE_SIGNED_VALUE } - case 13: - { /* '13' */ + case 13: { /* '13' */ return KnxDatapointMainType_DPT_8_BYTE_SIGNED_VALUE } - case 130: - { /* '130' */ + case 130: { /* '130' */ return KnxDatapointMainType_DPT_4_BYTE_SIGNED_VALUE } - case 131: - { /* '131' */ + case 131: { /* '131' */ return KnxDatapointMainType_DPT_4_BYTE_SIGNED_VALUE } - case 132: - { /* '132' */ + case 132: { /* '132' */ return KnxDatapointMainType_DPT_4_BYTE_SIGNED_VALUE } - case 133: - { /* '133' */ + case 133: { /* '133' */ return KnxDatapointMainType_DPT_4_BYTE_SIGNED_VALUE } - case 134: - { /* '134' */ + case 134: { /* '134' */ return KnxDatapointMainType_DPT_4_BYTE_SIGNED_VALUE } - case 135: - { /* '135' */ + case 135: { /* '135' */ return KnxDatapointMainType_DPT_4_BYTE_SIGNED_VALUE } - case 136: - { /* '136' */ + case 136: { /* '136' */ return KnxDatapointMainType_DPT_4_BYTE_SIGNED_VALUE } - case 137: - { /* '137' */ + case 137: { /* '137' */ return KnxDatapointMainType_DPT_4_BYTE_SIGNED_VALUE } - case 138: - { /* '138' */ + case 138: { /* '138' */ return KnxDatapointMainType_DPT_4_BYTE_SIGNED_VALUE } - case 139: - { /* '139' */ + case 139: { /* '139' */ return KnxDatapointMainType_DPT_4_BYTE_SIGNED_VALUE } - case 14: - { /* '14' */ + case 14: { /* '14' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 140: - { /* '140' */ + case 140: { /* '140' */ return KnxDatapointMainType_DPT_4_BYTE_SIGNED_VALUE } - case 141: - { /* '141' */ + case 141: { /* '141' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 142: - { /* '142' */ + case 142: { /* '142' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 143: - { /* '143' */ + case 143: { /* '143' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 144: - { /* '144' */ + case 144: { /* '144' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 145: - { /* '145' */ + case 145: { /* '145' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 146: - { /* '146' */ + case 146: { /* '146' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 147: - { /* '147' */ + case 147: { /* '147' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 148: - { /* '148' */ + case 148: { /* '148' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 149: - { /* '149' */ + case 149: { /* '149' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 15: - { /* '15' */ + case 15: { /* '15' */ return KnxDatapointMainType_DPT_8_BYTE_FLOAT_VALUE } - case 150: - { /* '150' */ + case 150: { /* '150' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 151: - { /* '151' */ + case 151: { /* '151' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 152: - { /* '152' */ + case 152: { /* '152' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 153: - { /* '153' */ + case 153: { /* '153' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 154: - { /* '154' */ + case 154: { /* '154' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 155: - { /* '155' */ + case 155: { /* '155' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 156: - { /* '156' */ + case 156: { /* '156' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 157: - { /* '157' */ + case 157: { /* '157' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 158: - { /* '158' */ + case 158: { /* '158' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 159: - { /* '159' */ + case 159: { /* '159' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 16: - { /* '16' */ + case 16: { /* '16' */ return KnxDatapointMainType_DPT_CHARACTER } - case 160: - { /* '160' */ + case 160: { /* '160' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 161: - { /* '161' */ + case 161: { /* '161' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 162: - { /* '162' */ + case 162: { /* '162' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 163: - { /* '163' */ + case 163: { /* '163' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 164: - { /* '164' */ + case 164: { /* '164' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 165: - { /* '165' */ + case 165: { /* '165' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 166: - { /* '166' */ + case 166: { /* '166' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 167: - { /* '167' */ + case 167: { /* '167' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 168: - { /* '168' */ + case 168: { /* '168' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 169: - { /* '169' */ + case 169: { /* '169' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 17: - { /* '17' */ + case 17: { /* '17' */ return KnxDatapointMainType_DPT_2_BYTE_UNSIGNED_VALUE } - case 170: - { /* '170' */ + case 170: { /* '170' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 171: - { /* '171' */ + case 171: { /* '171' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 172: - { /* '172' */ + case 172: { /* '172' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 173: - { /* '173' */ + case 173: { /* '173' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 174: - { /* '174' */ + case 174: { /* '174' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 175: - { /* '175' */ + case 175: { /* '175' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 176: - { /* '176' */ + case 176: { /* '176' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 177: - { /* '177' */ + case 177: { /* '177' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 178: - { /* '178' */ + case 178: { /* '178' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 179: - { /* '179' */ + case 179: { /* '179' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 18: - { /* '18' */ + case 18: { /* '18' */ return KnxDatapointMainType_DPT_UNKNOWN } - case 180: - { /* '180' */ + case 180: { /* '180' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 181: - { /* '181' */ + case 181: { /* '181' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 182: - { /* '182' */ + case 182: { /* '182' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 183: - { /* '183' */ + case 183: { /* '183' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 184: - { /* '184' */ + case 184: { /* '184' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 185: - { /* '185' */ + case 185: { /* '185' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 186: - { /* '186' */ + case 186: { /* '186' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 187: - { /* '187' */ + case 187: { /* '187' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 188: - { /* '188' */ + case 188: { /* '188' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 189: - { /* '189' */ + case 189: { /* '189' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 19: - { /* '19' */ + case 19: { /* '19' */ return KnxDatapointMainType_DPT_UNKNOWN } - case 190: - { /* '190' */ + case 190: { /* '190' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 191: - { /* '191' */ + case 191: { /* '191' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 192: - { /* '192' */ + case 192: { /* '192' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 193: - { /* '193' */ + case 193: { /* '193' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 194: - { /* '194' */ + case 194: { /* '194' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 195: - { /* '195' */ + case 195: { /* '195' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 196: - { /* '196' */ + case 196: { /* '196' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 197: - { /* '197' */ + case 197: { /* '197' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 198: - { /* '198' */ + case 198: { /* '198' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 199: - { /* '199' */ + case 199: { /* '199' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 2: - { /* '2' */ + case 2: { /* '2' */ return KnxDatapointMainType_DPT_8_BIT_SET } - case 20: - { /* '20' */ + case 20: { /* '20' */ return KnxDatapointMainType_DPT_4_BYTE_UNSIGNED_VALUE } - case 200: - { /* '200' */ + case 200: { /* '200' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 201: - { /* '201' */ + case 201: { /* '201' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 202: - { /* '202' */ + case 202: { /* '202' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 203: - { /* '203' */ + case 203: { /* '203' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 204: - { /* '204' */ + case 204: { /* '204' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 205: - { /* '205' */ + case 205: { /* '205' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 206: - { /* '206' */ + case 206: { /* '206' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 207: - { /* '207' */ + case 207: { /* '207' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 208: - { /* '208' */ + case 208: { /* '208' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 209: - { /* '209' */ + case 209: { /* '209' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 21: - { /* '21' */ + case 21: { /* '21' */ return KnxDatapointMainType_DPT_8_BYTE_UNSIGNED_VALUE } - case 210: - { /* '210' */ + case 210: { /* '210' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 211: - { /* '211' */ + case 211: { /* '211' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 212: - { /* '212' */ + case 212: { /* '212' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 213: - { /* '213' */ + case 213: { /* '213' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 214: - { /* '214' */ + case 214: { /* '214' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 215: - { /* '215' */ + case 215: { /* '215' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 216: - { /* '216' */ + case 216: { /* '216' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 217: - { /* '217' */ + case 217: { /* '217' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 218: - { /* '218' */ + case 218: { /* '218' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 219: - { /* '219' */ + case 219: { /* '219' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 22: - { /* '22' */ + case 22: { /* '22' */ return KnxDatapointMainType_DPT_2_BYTE_UNSIGNED_VALUE } - case 220: - { /* '220' */ + case 220: { /* '220' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 221: - { /* '221' */ + case 221: { /* '221' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 222: - { /* '222' */ + case 222: { /* '222' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 223: - { /* '223' */ + case 223: { /* '223' */ return KnxDatapointMainType_DPT_4_BYTE_FLOAT_VALUE } - case 224: - { /* '224' */ + case 224: { /* '224' */ return KnxDatapointMainType_DPT_ENTRANCE_ACCESS } - case 225: - { /* '225' */ + case 225: { /* '225' */ return KnxDatapointMainType_DPT_CHARACTER_STRING } - case 226: - { /* '226' */ + case 226: { /* '226' */ return KnxDatapointMainType_DPT_CHARACTER_STRING } - case 227: - { /* '227' */ + case 227: { /* '227' */ return KnxDatapointMainType_DPT_SCENE_NUMBER } - case 228: - { /* '228' */ + case 228: { /* '228' */ return KnxDatapointMainType_DPT_SCENE_CONTROL } - case 229: - { /* '229' */ + case 229: { /* '229' */ return KnxDatapointMainType_DPT_DATE_TIME } - case 23: - { /* '23' */ + case 23: { /* '23' */ return KnxDatapointMainType_DPT_4_BYTE_UNSIGNED_VALUE } - case 230: - { /* '230' */ + case 230: { /* '230' */ return KnxDatapointMainType_DPT_1_BYTE } - case 231: - { /* '231' */ + case 231: { /* '231' */ return KnxDatapointMainType_DPT_1_BYTE } - case 232: - { /* '232' */ + case 232: { /* '232' */ return KnxDatapointMainType_DPT_1_BYTE } - case 233: - { /* '233' */ + case 233: { /* '233' */ return KnxDatapointMainType_DPT_1_BYTE } - case 234: - { /* '234' */ + case 234: { /* '234' */ return KnxDatapointMainType_DPT_1_BYTE } - case 235: - { /* '235' */ + case 235: { /* '235' */ return KnxDatapointMainType_DPT_1_BYTE } - case 236: - { /* '236' */ + case 236: { /* '236' */ return KnxDatapointMainType_DPT_1_BYTE } - case 237: - { /* '237' */ + case 237: { /* '237' */ return KnxDatapointMainType_DPT_1_BYTE } - case 238: - { /* '238' */ + case 238: { /* '238' */ return KnxDatapointMainType_DPT_1_BYTE } - case 239: - { /* '239' */ + case 239: { /* '239' */ return KnxDatapointMainType_DPT_1_BYTE } - case 24: - { /* '24' */ + case 24: { /* '24' */ return KnxDatapointMainType_DPT_4_BYTE_UNSIGNED_VALUE } - case 240: - { /* '240' */ + case 240: { /* '240' */ return KnxDatapointMainType_DPT_1_BYTE } - case 241: - { /* '241' */ + case 241: { /* '241' */ return KnxDatapointMainType_DPT_1_BYTE } - case 242: - { /* '242' */ + case 242: { /* '242' */ return KnxDatapointMainType_DPT_1_BYTE } - case 243: - { /* '243' */ + case 243: { /* '243' */ return KnxDatapointMainType_DPT_1_BYTE } - case 244: - { /* '244' */ + case 244: { /* '244' */ return KnxDatapointMainType_DPT_1_BYTE } - case 245: - { /* '245' */ + case 245: { /* '245' */ return KnxDatapointMainType_DPT_1_BYTE } - case 246: - { /* '246' */ + case 246: { /* '246' */ return KnxDatapointMainType_DPT_1_BYTE } - case 247: - { /* '247' */ + case 247: { /* '247' */ return KnxDatapointMainType_DPT_1_BYTE } - case 248: - { /* '248' */ + case 248: { /* '248' */ return KnxDatapointMainType_DPT_1_BYTE } - case 249: - { /* '249' */ + case 249: { /* '249' */ return KnxDatapointMainType_DPT_1_BYTE } - case 25: - { /* '25' */ + case 25: { /* '25' */ return KnxDatapointMainType_DPT_12_BYTE_SIGNED_VALUE } - case 250: - { /* '250' */ + case 250: { /* '250' */ return KnxDatapointMainType_DPT_1_BYTE } - case 251: - { /* '251' */ + case 251: { /* '251' */ return KnxDatapointMainType_DPT_1_BYTE } - case 252: - { /* '252' */ + case 252: { /* '252' */ return KnxDatapointMainType_DPT_1_BYTE } - case 253: - { /* '253' */ + case 253: { /* '253' */ return KnxDatapointMainType_DPT_1_BYTE } - case 254: - { /* '254' */ + case 254: { /* '254' */ return KnxDatapointMainType_DPT_1_BYTE } - case 255: - { /* '255' */ + case 255: { /* '255' */ return KnxDatapointMainType_DPT_1_BYTE } - case 256: - { /* '256' */ + case 256: { /* '256' */ return KnxDatapointMainType_DPT_1_BYTE } - case 257: - { /* '257' */ + case 257: { /* '257' */ return KnxDatapointMainType_DPT_1_BYTE } - case 258: - { /* '258' */ + case 258: { /* '258' */ return KnxDatapointMainType_DPT_1_BYTE } - case 259: - { /* '259' */ + case 259: { /* '259' */ return KnxDatapointMainType_DPT_1_BYTE } - case 26: - { /* '26' */ + case 26: { /* '26' */ return KnxDatapointMainType_DPT_12_BYTE_SIGNED_VALUE } - case 260: - { /* '260' */ + case 260: { /* '260' */ return KnxDatapointMainType_DPT_1_BYTE } - case 261: - { /* '261' */ + case 261: { /* '261' */ return KnxDatapointMainType_DPT_1_BYTE } - case 262: - { /* '262' */ + case 262: { /* '262' */ return KnxDatapointMainType_DPT_1_BYTE } - case 263: - { /* '263' */ + case 263: { /* '263' */ return KnxDatapointMainType_DPT_1_BYTE } - case 264: - { /* '264' */ + case 264: { /* '264' */ return KnxDatapointMainType_DPT_1_BYTE } - case 265: - { /* '265' */ + case 265: { /* '265' */ return KnxDatapointMainType_DPT_1_BYTE } - case 266: - { /* '266' */ + case 266: { /* '266' */ return KnxDatapointMainType_DPT_1_BYTE } - case 267: - { /* '267' */ + case 267: { /* '267' */ return KnxDatapointMainType_DPT_1_BYTE } - case 268: - { /* '268' */ + case 268: { /* '268' */ return KnxDatapointMainType_DPT_1_BYTE } - case 269: - { /* '269' */ + case 269: { /* '269' */ return KnxDatapointMainType_DPT_1_BYTE } - case 27: - { /* '27' */ + case 27: { /* '27' */ return KnxDatapointMainType_DPT_1_BIT } - case 270: - { /* '270' */ + case 270: { /* '270' */ return KnxDatapointMainType_DPT_1_BYTE } - case 271: - { /* '271' */ + case 271: { /* '271' */ return KnxDatapointMainType_DPT_1_BYTE } - case 272: - { /* '272' */ + case 272: { /* '272' */ return KnxDatapointMainType_DPT_1_BYTE } - case 273: - { /* '273' */ + case 273: { /* '273' */ return KnxDatapointMainType_DPT_1_BYTE } - case 274: - { /* '274' */ + case 274: { /* '274' */ return KnxDatapointMainType_DPT_1_BYTE } - case 275: - { /* '275' */ + case 275: { /* '275' */ return KnxDatapointMainType_DPT_1_BYTE } - case 276: - { /* '276' */ + case 276: { /* '276' */ return KnxDatapointMainType_DPT_1_BYTE } - case 277: - { /* '277' */ + case 277: { /* '277' */ return KnxDatapointMainType_DPT_1_BYTE } - case 278: - { /* '278' */ + case 278: { /* '278' */ return KnxDatapointMainType_DPT_1_BYTE } - case 279: - { /* '279' */ + case 279: { /* '279' */ return KnxDatapointMainType_DPT_1_BYTE } - case 28: - { /* '28' */ + case 28: { /* '28' */ return KnxDatapointMainType_DPT_1_BIT } - case 280: - { /* '280' */ + case 280: { /* '280' */ return KnxDatapointMainType_DPT_1_BYTE } - case 281: - { /* '281' */ + case 281: { /* '281' */ return KnxDatapointMainType_DPT_1_BYTE } - case 282: - { /* '282' */ + case 282: { /* '282' */ return KnxDatapointMainType_DPT_1_BYTE } - case 283: - { /* '283' */ + case 283: { /* '283' */ return KnxDatapointMainType_DPT_1_BYTE } - case 284: - { /* '284' */ + case 284: { /* '284' */ return KnxDatapointMainType_DPT_1_BYTE } - case 285: - { /* '285' */ + case 285: { /* '285' */ return KnxDatapointMainType_DPT_1_BYTE } - case 286: - { /* '286' */ + case 286: { /* '286' */ return KnxDatapointMainType_DPT_8_BIT_SET } - case 287: - { /* '287' */ + case 287: { /* '287' */ return KnxDatapointMainType_DPT_8_BIT_SET } - case 288: - { /* '288' */ + case 288: { /* '288' */ return KnxDatapointMainType_DPT_8_BIT_SET } - case 289: - { /* '289' */ + case 289: { /* '289' */ return KnxDatapointMainType_DPT_8_BIT_SET } - case 29: - { /* '29' */ + case 29: { /* '29' */ return KnxDatapointMainType_DPT_1_BIT } - case 290: - { /* '290' */ + case 290: { /* '290' */ return KnxDatapointMainType_DPT_8_BIT_SET } - case 291: - { /* '291' */ + case 291: { /* '291' */ return KnxDatapointMainType_DPT_8_BIT_SET } - case 292: - { /* '292' */ + case 292: { /* '292' */ return KnxDatapointMainType_DPT_8_BIT_SET } - case 293: - { /* '293' */ + case 293: { /* '293' */ return KnxDatapointMainType_DPT_8_BIT_SET } - case 294: - { /* '294' */ + case 294: { /* '294' */ return KnxDatapointMainType_DPT_8_BIT_SET } - case 295: - { /* '295' */ + case 295: { /* '295' */ return KnxDatapointMainType_DPT_8_BIT_SET } - case 296: - { /* '296' */ + case 296: { /* '296' */ return KnxDatapointMainType_DPT_8_BIT_SET } - case 297: - { /* '297' */ + case 297: { /* '297' */ return KnxDatapointMainType_DPT_8_BIT_SET } - case 298: - { /* '298' */ + case 298: { /* '298' */ return KnxDatapointMainType_DPT_8_BIT_SET } - case 299: - { /* '299' */ + case 299: { /* '299' */ return KnxDatapointMainType_DPT_8_BIT_SET } - case 3: - { /* '3' */ + case 3: { /* '3' */ return KnxDatapointMainType_DPT_16_BIT_SET } - case 30: - { /* '30' */ + case 30: { /* '30' */ return KnxDatapointMainType_DPT_1_BIT } - case 300: - { /* '300' */ + case 300: { /* '300' */ return KnxDatapointMainType_DPT_16_BIT_SET } - case 301: - { /* '301' */ + case 301: { /* '301' */ return KnxDatapointMainType_DPT_16_BIT_SET } - case 302: - { /* '302' */ + case 302: { /* '302' */ return KnxDatapointMainType_DPT_16_BIT_SET } - case 303: - { /* '303' */ + case 303: { /* '303' */ return KnxDatapointMainType_DPT_16_BIT_SET } - case 304: - { /* '304' */ + case 304: { /* '304' */ return KnxDatapointMainType_DPT_16_BIT_SET } - case 305: - { /* '305' */ + case 305: { /* '305' */ return KnxDatapointMainType_DPT_16_BIT_SET } - case 306: - { /* '306' */ + case 306: { /* '306' */ return KnxDatapointMainType_DPT_2_BIT_SET } - case 307: - { /* '307' */ + case 307: { /* '307' */ return KnxDatapointMainType_DPT_2_BIT_SET } - case 308: - { /* '308' */ + case 308: { /* '308' */ return KnxDatapointMainType_DPT_2_BIT_SET } - case 309: - { /* '309' */ + case 309: { /* '309' */ return KnxDatapointMainType_DPT_2_BIT_SET } - case 31: - { /* '31' */ + case 31: { /* '31' */ return KnxDatapointMainType_DPT_1_BIT } - case 310: - { /* '310' */ + case 310: { /* '310' */ return KnxDatapointMainType_DPT_2_NIBBLE_SET } - case 311: - { /* '311' */ + case 311: { /* '311' */ return KnxDatapointMainType_DPT_8_BIT_SET_2 } - case 312: - { /* '312' */ + case 312: { /* '312' */ return KnxDatapointMainType_DPT_32_BIT_SET } - case 313: - { /* '313' */ + case 313: { /* '313' */ return KnxDatapointMainType_DPT_ELECTRICAL_ENERGY } - case 314: - { /* '314' */ + case 314: { /* '314' */ return KnxDatapointMainType_DPT_ELECTRICAL_ENERGY } - case 315: - { /* '315' */ + case 315: { /* '315' */ return KnxDatapointMainType_DPT_ELECTRICAL_ENERGY } - case 316: - { /* '316' */ + case 316: { /* '316' */ return KnxDatapointMainType_DPT_24_TIMES_CHANNEL_ACTIVATION } - case 317: - { /* '317' */ + case 317: { /* '317' */ return KnxDatapointMainType_DPT_16_BIT_UNSIGNED_VALUE_AND_8_BIT_ENUM } - case 318: - { /* '318' */ + case 318: { /* '318' */ return KnxDatapointMainType_DPT_16_BIT_UNSIGNED_VALUE_AND_8_BIT_ENUM } - case 319: - { /* '319' */ + case 319: { /* '319' */ return KnxDatapointMainType_DPT_16_BIT_UNSIGNED_VALUE_AND_8_BIT_ENUM } - case 32: - { /* '32' */ + case 32: { /* '32' */ return KnxDatapointMainType_DPT_1_BIT } - case 320: - { /* '320' */ + case 320: { /* '320' */ return KnxDatapointMainType_DPT_16_BIT_UNSIGNED_VALUE_AND_8_BIT_ENUM } - case 321: - { /* '321' */ + case 321: { /* '321' */ return KnxDatapointMainType_DPT_8_BIT_UNSIGNED_VALUE_AND_8_BIT_ENUM } - case 322: - { /* '322' */ + case 322: { /* '322' */ return KnxDatapointMainType_DPT_DATAPOINT_TYPE_VERSION } - case 323: - { /* '323' */ + case 323: { /* '323' */ return KnxDatapointMainType_DPT_ALARM_INFO } - case 324: - { /* '324' */ + case 324: { /* '324' */ return KnxDatapointMainType_DPT_3X_2_BYTE_FLOAT_VALUE } - case 325: - { /* '325' */ + case 325: { /* '325' */ return KnxDatapointMainType_DPT_3X_2_BYTE_FLOAT_VALUE } - case 326: - { /* '326' */ + case 326: { /* '326' */ return KnxDatapointMainType_DPT_SCALING_SPEED } - case 327: - { /* '327' */ + case 327: { /* '327' */ return KnxDatapointMainType_DPT_SCALING_SPEED } - case 328: - { /* '328' */ + case 328: { /* '328' */ return KnxDatapointMainType_DPT_4_1_1_BYTE_COMBINED_INFORMATION } - case 329: - { /* '329' */ + case 329: { /* '329' */ return KnxDatapointMainType_DPT_MBUS_ADDRESS } - case 33: - { /* '33' */ + case 33: { /* '33' */ return KnxDatapointMainType_DPT_1_BIT } - case 330: - { /* '330' */ + case 330: { /* '330' */ return KnxDatapointMainType_DPT_3_BYTE_COLOUR_RGB } - case 331: - { /* '331' */ + case 331: { /* '331' */ return KnxDatapointMainType_DPT_LANGUAGE_CODE_ISO_639_1 } - case 332: - { /* '332' */ + case 332: { /* '332' */ return KnxDatapointMainType_DPT_SIGNED_VALUE_WITH_CLASSIFICATION_AND_VALIDITY } - case 333: - { /* '333' */ + case 333: { /* '333' */ return KnxDatapointMainType_DPT_PRIORITISED_MODE_CONTROL } - case 334: - { /* '334' */ + case 334: { /* '334' */ return KnxDatapointMainType_DPT_CONFIGURATION_DIAGNOSTICS_16_BIT } - case 335: - { /* '335' */ + case 335: { /* '335' */ return KnxDatapointMainType_DPT_CONFIGURATION_DIAGNOSTICS_8_BIT } - case 336: - { /* '336' */ + case 336: { /* '336' */ return KnxDatapointMainType_DPT_POSITIONS } - case 337: - { /* '337' */ + case 337: { /* '337' */ return KnxDatapointMainType_DPT_STATUS_32_BIT } - case 338: - { /* '338' */ + case 338: { /* '338' */ return KnxDatapointMainType_DPT_STATUS_48_BIT } - case 339: - { /* '339' */ + case 339: { /* '339' */ return KnxDatapointMainType_DPT_CONVERTER_STATUS } - case 34: - { /* '34' */ + case 34: { /* '34' */ return KnxDatapointMainType_DPT_1_BIT } - case 340: - { /* '340' */ + case 340: { /* '340' */ return KnxDatapointMainType_DPT_CONVERTER_TEST_RESULT } - case 341: - { /* '341' */ + case 341: { /* '341' */ return KnxDatapointMainType_DPT_BATTERY_INFORMATION } - case 342: - { /* '342' */ + case 342: { /* '342' */ return KnxDatapointMainType_DPT_BRIGHTNESS_COLOUR_TEMPERATURE_TRANSITION } - case 343: - { /* '343' */ + case 343: { /* '343' */ return KnxDatapointMainType_DPT_STATUS_24_BIT } - case 344: - { /* '344' */ + case 344: { /* '344' */ return KnxDatapointMainType_DPT_COLOUR_RGBW } - case 345: - { /* '345' */ + case 345: { /* '345' */ return KnxDatapointMainType_DPT_RELATIVE_CONTROL_RGBW } - case 346: - { /* '346' */ + case 346: { /* '346' */ return KnxDatapointMainType_DPT_RELATIVE_CONTROL_RGB } - case 347: - { /* '347' */ + case 347: { /* '347' */ return KnxDatapointMainType_DPT_F32F32 } - case 348: - { /* '348' */ + case 348: { /* '348' */ return KnxDatapointMainType_DPT_F16F16F16F16 } - case 349: - { /* '349' */ + case 349: { /* '349' */ return KnxDatapointMainType_DPT_F16F16F16F16 } - case 35: - { /* '35' */ + case 35: { /* '35' */ return KnxDatapointMainType_DPT_1_BIT } - case 36: - { /* '36' */ + case 36: { /* '36' */ return KnxDatapointMainType_DPT_1_BIT } - case 37: - { /* '37' */ + case 37: { /* '37' */ return KnxDatapointMainType_DPT_1_BIT } - case 38: - { /* '38' */ + case 38: { /* '38' */ return KnxDatapointMainType_DPT_1_BIT } - case 39: - { /* '39' */ + case 39: { /* '39' */ return KnxDatapointMainType_DPT_1_BIT } - case 4: - { /* '4' */ + case 4: { /* '4' */ return KnxDatapointMainType_DPT_32_BIT_SET } - case 40: - { /* '40' */ + case 40: { /* '40' */ return KnxDatapointMainType_DPT_1_BIT } - case 41: - { /* '41' */ + case 41: { /* '41' */ return KnxDatapointMainType_DPT_1_BIT } - case 42: - { /* '42' */ + case 42: { /* '42' */ return KnxDatapointMainType_DPT_1_BIT } - case 43: - { /* '43' */ + case 43: { /* '43' */ return KnxDatapointMainType_DPT_1_BIT } - case 44: - { /* '44' */ + case 44: { /* '44' */ return KnxDatapointMainType_DPT_1_BIT } - case 45: - { /* '45' */ + case 45: { /* '45' */ return KnxDatapointMainType_DPT_1_BIT } - case 46: - { /* '46' */ + case 46: { /* '46' */ return KnxDatapointMainType_DPT_1_BIT } - case 47: - { /* '47' */ + case 47: { /* '47' */ return KnxDatapointMainType_DPT_1_BIT } - case 48: - { /* '48' */ + case 48: { /* '48' */ return KnxDatapointMainType_DPT_1_BIT } - case 49: - { /* '49' */ + case 49: { /* '49' */ return KnxDatapointMainType_DPT_1_BIT } - case 5: - { /* '5' */ + case 5: { /* '5' */ return KnxDatapointMainType_DPT_64_BIT_SET } - case 50: - { /* '50' */ + case 50: { /* '50' */ return KnxDatapointMainType_DPT_1_BIT } - case 51: - { /* '51' */ + case 51: { /* '51' */ return KnxDatapointMainType_DPT_1_BIT_CONTROLLED } - case 52: - { /* '52' */ + case 52: { /* '52' */ return KnxDatapointMainType_DPT_1_BIT_CONTROLLED } - case 53: - { /* '53' */ + case 53: { /* '53' */ return KnxDatapointMainType_DPT_1_BIT_CONTROLLED } - case 54: - { /* '54' */ + case 54: { /* '54' */ return KnxDatapointMainType_DPT_1_BIT_CONTROLLED } - case 55: - { /* '55' */ + case 55: { /* '55' */ return KnxDatapointMainType_DPT_1_BIT_CONTROLLED } - case 56: - { /* '56' */ + case 56: { /* '56' */ return KnxDatapointMainType_DPT_1_BIT_CONTROLLED } - case 57: - { /* '57' */ + case 57: { /* '57' */ return KnxDatapointMainType_DPT_1_BIT_CONTROLLED } - case 58: - { /* '58' */ + case 58: { /* '58' */ return KnxDatapointMainType_DPT_1_BIT_CONTROLLED } - case 59: - { /* '59' */ + case 59: { /* '59' */ return KnxDatapointMainType_DPT_1_BIT_CONTROLLED } - case 6: - { /* '6' */ + case 6: { /* '6' */ return KnxDatapointMainType_DPT_8_BIT_UNSIGNED_VALUE } - case 60: - { /* '60' */ + case 60: { /* '60' */ return KnxDatapointMainType_DPT_1_BIT_CONTROLLED } - case 61: - { /* '61' */ + case 61: { /* '61' */ return KnxDatapointMainType_DPT_1_BIT_CONTROLLED } - case 62: - { /* '62' */ + case 62: { /* '62' */ return KnxDatapointMainType_DPT_1_BIT_CONTROLLED } - case 63: - { /* '63' */ + case 63: { /* '63' */ return KnxDatapointMainType_DPT_3_BIT_CONTROLLED } - case 64: - { /* '64' */ + case 64: { /* '64' */ return KnxDatapointMainType_DPT_3_BIT_CONTROLLED } - case 65: - { /* '65' */ + case 65: { /* '65' */ return KnxDatapointMainType_DPT_CHARACTER } - case 66: - { /* '66' */ + case 66: { /* '66' */ return KnxDatapointMainType_DPT_CHARACTER } - case 67: - { /* '67' */ + case 67: { /* '67' */ return KnxDatapointMainType_DPT_8_BIT_UNSIGNED_VALUE } - case 68: - { /* '68' */ + case 68: { /* '68' */ return KnxDatapointMainType_DPT_8_BIT_UNSIGNED_VALUE } - case 69: - { /* '69' */ + case 69: { /* '69' */ return KnxDatapointMainType_DPT_8_BIT_UNSIGNED_VALUE } - case 7: - { /* '7' */ + case 7: { /* '7' */ return KnxDatapointMainType_DPT_8_BIT_SIGNED_VALUE } - case 70: - { /* '70' */ + case 70: { /* '70' */ return KnxDatapointMainType_DPT_8_BIT_UNSIGNED_VALUE } - case 71: - { /* '71' */ + case 71: { /* '71' */ return KnxDatapointMainType_DPT_8_BIT_UNSIGNED_VALUE } - case 72: - { /* '72' */ + case 72: { /* '72' */ return KnxDatapointMainType_DPT_8_BIT_UNSIGNED_VALUE } - case 73: - { /* '73' */ + case 73: { /* '73' */ return KnxDatapointMainType_DPT_8_BIT_UNSIGNED_VALUE } - case 74: - { /* '74' */ + case 74: { /* '74' */ return KnxDatapointMainType_DPT_8_BIT_SIGNED_VALUE } - case 75: - { /* '75' */ + case 75: { /* '75' */ return KnxDatapointMainType_DPT_8_BIT_SIGNED_VALUE } - case 76: - { /* '76' */ + case 76: { /* '76' */ return KnxDatapointMainType_DPT_8_BIT_SIGNED_VALUE } - case 77: - { /* '77' */ + case 77: { /* '77' */ return KnxDatapointMainType_DPT_2_BYTE_UNSIGNED_VALUE } - case 78: - { /* '78' */ + case 78: { /* '78' */ return KnxDatapointMainType_DPT_2_BYTE_UNSIGNED_VALUE } - case 79: - { /* '79' */ + case 79: { /* '79' */ return KnxDatapointMainType_DPT_2_BYTE_UNSIGNED_VALUE } - case 8: - { /* '8' */ + case 8: { /* '8' */ return KnxDatapointMainType_DPT_2_BYTE_UNSIGNED_VALUE } - case 80: - { /* '80' */ + case 80: { /* '80' */ return KnxDatapointMainType_DPT_2_BYTE_UNSIGNED_VALUE } - case 81: - { /* '81' */ + case 81: { /* '81' */ return KnxDatapointMainType_DPT_2_BYTE_UNSIGNED_VALUE } - case 82: - { /* '82' */ + case 82: { /* '82' */ return KnxDatapointMainType_DPT_2_BYTE_UNSIGNED_VALUE } - case 83: - { /* '83' */ + case 83: { /* '83' */ return KnxDatapointMainType_DPT_2_BYTE_UNSIGNED_VALUE } - case 84: - { /* '84' */ + case 84: { /* '84' */ return KnxDatapointMainType_DPT_2_BYTE_UNSIGNED_VALUE } - case 85: - { /* '85' */ + case 85: { /* '85' */ return KnxDatapointMainType_DPT_2_BYTE_UNSIGNED_VALUE } - case 86: - { /* '86' */ + case 86: { /* '86' */ return KnxDatapointMainType_DPT_2_BYTE_UNSIGNED_VALUE } - case 87: - { /* '87' */ + case 87: { /* '87' */ return KnxDatapointMainType_DPT_2_BYTE_UNSIGNED_VALUE } - case 88: - { /* '88' */ + case 88: { /* '88' */ return KnxDatapointMainType_DPT_2_BYTE_UNSIGNED_VALUE } - case 89: - { /* '89' */ + case 89: { /* '89' */ return KnxDatapointMainType_DPT_2_BYTE_SIGNED_VALUE } - case 9: - { /* '9' */ + case 9: { /* '9' */ return KnxDatapointMainType_DPT_2_BYTE_SIGNED_VALUE } - case 90: - { /* '90' */ + case 90: { /* '90' */ return KnxDatapointMainType_DPT_2_BYTE_SIGNED_VALUE } - case 91: - { /* '91' */ + case 91: { /* '91' */ return KnxDatapointMainType_DPT_2_BYTE_SIGNED_VALUE } - case 92: - { /* '92' */ + case 92: { /* '92' */ return KnxDatapointMainType_DPT_2_BYTE_SIGNED_VALUE } - case 93: - { /* '93' */ + case 93: { /* '93' */ return KnxDatapointMainType_DPT_2_BYTE_SIGNED_VALUE } - case 94: - { /* '94' */ + case 94: { /* '94' */ return KnxDatapointMainType_DPT_2_BYTE_SIGNED_VALUE } - case 95: - { /* '95' */ + case 95: { /* '95' */ return KnxDatapointMainType_DPT_2_BYTE_SIGNED_VALUE } - case 96: - { /* '96' */ + case 96: { /* '96' */ return KnxDatapointMainType_DPT_2_BYTE_SIGNED_VALUE } - case 97: - { /* '97' */ + case 97: { /* '97' */ return KnxDatapointMainType_DPT_2_BYTE_SIGNED_VALUE } - case 98: - { /* '98' */ + case 98: { /* '98' */ return KnxDatapointMainType_DPT_2_BYTE_SIGNED_VALUE } - case 99: - { /* '99' */ + case 99: { /* '99' */ return KnxDatapointMainType_DPT_2_BYTE_FLOAT_VALUE } - default: - { + default: { return 0 } } @@ -5003,706 +3951,706 @@ func KnxDatapointTypeFirstEnumForFieldDatapointMainType(value KnxDatapointMainTy } func KnxDatapointTypeByValue(value uint32) (enum KnxDatapointType, ok bool) { switch value { - case 0: - return KnxDatapointType_DPT_UNKNOWN, true - case 1: - return KnxDatapointType_BOOL, true - case 10: - return KnxDatapointType_UDINT, true - case 100: - return KnxDatapointType_DPT_Value_Tempd, true - case 101: - return KnxDatapointType_DPT_Value_Tempa, true - case 102: - return KnxDatapointType_DPT_Value_Lux, true - case 103: - return KnxDatapointType_DPT_Value_Wsp, true - case 104: - return KnxDatapointType_DPT_Value_Pres, true - case 105: - return KnxDatapointType_DPT_Value_Humidity, true - case 106: - return KnxDatapointType_DPT_Value_AirQuality, true - case 107: - return KnxDatapointType_DPT_Value_AirFlow, true - case 108: - return KnxDatapointType_DPT_Value_Time1, true - case 109: - return KnxDatapointType_DPT_Value_Time2, true - case 11: - return KnxDatapointType_DINT, true - case 110: - return KnxDatapointType_DPT_Value_Volt, true - case 111: - return KnxDatapointType_DPT_Value_Curr, true - case 112: - return KnxDatapointType_DPT_PowerDensity, true - case 113: - return KnxDatapointType_DPT_KelvinPerPercent, true - case 114: - return KnxDatapointType_DPT_Power, true - case 115: - return KnxDatapointType_DPT_Value_Volume_Flow, true - case 116: - return KnxDatapointType_DPT_Rain_Amount, true - case 117: - return KnxDatapointType_DPT_Value_Temp_F, true - case 118: - return KnxDatapointType_DPT_Value_Wsp_kmh, true - case 119: - return KnxDatapointType_DPT_Value_Absolute_Humidity, true - case 12: - return KnxDatapointType_ULINT, true - case 120: - return KnxDatapointType_DPT_Concentration_ygm3, true - case 121: - return KnxDatapointType_DPT_TimeOfDay, true - case 122: - return KnxDatapointType_DPT_Date, true - case 123: - return KnxDatapointType_DPT_Value_4_Ucount, true - case 124: - return KnxDatapointType_DPT_LongTimePeriod_Sec, true - case 125: - return KnxDatapointType_DPT_LongTimePeriod_Min, true - case 126: - return KnxDatapointType_DPT_LongTimePeriod_Hrs, true - case 127: - return KnxDatapointType_DPT_VolumeLiquid_Litre, true - case 128: - return KnxDatapointType_DPT_Volume_m_3, true - case 129: - return KnxDatapointType_DPT_Value_4_Count, true - case 13: - return KnxDatapointType_LINT, true - case 130: - return KnxDatapointType_DPT_FlowRate_m3h, true - case 131: - return KnxDatapointType_DPT_ActiveEnergy, true - case 132: - return KnxDatapointType_DPT_ApparantEnergy, true - case 133: - return KnxDatapointType_DPT_ReactiveEnergy, true - case 134: - return KnxDatapointType_DPT_ActiveEnergy_kWh, true - case 135: - return KnxDatapointType_DPT_ApparantEnergy_kVAh, true - case 136: - return KnxDatapointType_DPT_ReactiveEnergy_kVARh, true - case 137: - return KnxDatapointType_DPT_ActiveEnergy_MWh, true - case 138: - return KnxDatapointType_DPT_LongDeltaTimeSec, true - case 139: - return KnxDatapointType_DPT_DeltaVolumeLiquid_Litre, true - case 14: - return KnxDatapointType_REAL, true - case 140: - return KnxDatapointType_DPT_DeltaVolume_m_3, true - case 141: - return KnxDatapointType_DPT_Value_Acceleration, true - case 142: - return KnxDatapointType_DPT_Value_Acceleration_Angular, true - case 143: - return KnxDatapointType_DPT_Value_Activation_Energy, true - case 144: - return KnxDatapointType_DPT_Value_Activity, true - case 145: - return KnxDatapointType_DPT_Value_Mol, true - case 146: - return KnxDatapointType_DPT_Value_Amplitude, true - case 147: - return KnxDatapointType_DPT_Value_AngleRad, true - case 148: - return KnxDatapointType_DPT_Value_AngleDeg, true - case 149: - return KnxDatapointType_DPT_Value_Angular_Momentum, true - case 15: - return KnxDatapointType_LREAL, true - case 150: - return KnxDatapointType_DPT_Value_Angular_Velocity, true - case 151: - return KnxDatapointType_DPT_Value_Area, true - case 152: - return KnxDatapointType_DPT_Value_Capacitance, true - case 153: - return KnxDatapointType_DPT_Value_Charge_DensitySurface, true - case 154: - return KnxDatapointType_DPT_Value_Charge_DensityVolume, true - case 155: - return KnxDatapointType_DPT_Value_Compressibility, true - case 156: - return KnxDatapointType_DPT_Value_Conductance, true - case 157: - return KnxDatapointType_DPT_Value_Electrical_Conductivity, true - case 158: - return KnxDatapointType_DPT_Value_Density, true - case 159: - return KnxDatapointType_DPT_Value_Electric_Charge, true - case 16: - return KnxDatapointType_CHAR, true - case 160: - return KnxDatapointType_DPT_Value_Electric_Current, true - case 161: - return KnxDatapointType_DPT_Value_Electric_CurrentDensity, true - case 162: - return KnxDatapointType_DPT_Value_Electric_DipoleMoment, true - case 163: - return KnxDatapointType_DPT_Value_Electric_Displacement, true - case 164: - return KnxDatapointType_DPT_Value_Electric_FieldStrength, true - case 165: - return KnxDatapointType_DPT_Value_Electric_Flux, true - case 166: - return KnxDatapointType_DPT_Value_Electric_FluxDensity, true - case 167: - return KnxDatapointType_DPT_Value_Electric_Polarization, true - case 168: - return KnxDatapointType_DPT_Value_Electric_Potential, true - case 169: - return KnxDatapointType_DPT_Value_Electric_PotentialDifference, true - case 17: - return KnxDatapointType_WCHAR, true - case 170: - return KnxDatapointType_DPT_Value_ElectromagneticMoment, true - case 171: - return KnxDatapointType_DPT_Value_Electromotive_Force, true - case 172: - return KnxDatapointType_DPT_Value_Energy, true - case 173: - return KnxDatapointType_DPT_Value_Force, true - case 174: - return KnxDatapointType_DPT_Value_Frequency, true - case 175: - return KnxDatapointType_DPT_Value_Angular_Frequency, true - case 176: - return KnxDatapointType_DPT_Value_Heat_Capacity, true - case 177: - return KnxDatapointType_DPT_Value_Heat_FlowRate, true - case 178: - return KnxDatapointType_DPT_Value_Heat_Quantity, true - case 179: - return KnxDatapointType_DPT_Value_Impedance, true - case 18: - return KnxDatapointType_STRING, true - case 180: - return KnxDatapointType_DPT_Value_Length, true - case 181: - return KnxDatapointType_DPT_Value_Light_Quantity, true - case 182: - return KnxDatapointType_DPT_Value_Luminance, true - case 183: - return KnxDatapointType_DPT_Value_Luminous_Flux, true - case 184: - return KnxDatapointType_DPT_Value_Luminous_Intensity, true - case 185: - return KnxDatapointType_DPT_Value_Magnetic_FieldStrength, true - case 186: - return KnxDatapointType_DPT_Value_Magnetic_Flux, true - case 187: - return KnxDatapointType_DPT_Value_Magnetic_FluxDensity, true - case 188: - return KnxDatapointType_DPT_Value_Magnetic_Moment, true - case 189: - return KnxDatapointType_DPT_Value_Magnetic_Polarization, true - case 19: - return KnxDatapointType_WSTRING, true - case 190: - return KnxDatapointType_DPT_Value_Magnetization, true - case 191: - return KnxDatapointType_DPT_Value_MagnetomotiveForce, true - case 192: - return KnxDatapointType_DPT_Value_Mass, true - case 193: - return KnxDatapointType_DPT_Value_MassFlux, true - case 194: - return KnxDatapointType_DPT_Value_Momentum, true - case 195: - return KnxDatapointType_DPT_Value_Phase_AngleRad, true - case 196: - return KnxDatapointType_DPT_Value_Phase_AngleDeg, true - case 197: - return KnxDatapointType_DPT_Value_Power, true - case 198: - return KnxDatapointType_DPT_Value_Power_Factor, true - case 199: - return KnxDatapointType_DPT_Value_Pressure, true - case 2: - return KnxDatapointType_BYTE, true - case 20: - return KnxDatapointType_TIME, true - case 200: - return KnxDatapointType_DPT_Value_Reactance, true - case 201: - return KnxDatapointType_DPT_Value_Resistance, true - case 202: - return KnxDatapointType_DPT_Value_Resistivity, true - case 203: - return KnxDatapointType_DPT_Value_SelfInductance, true - case 204: - return KnxDatapointType_DPT_Value_SolidAngle, true - case 205: - return KnxDatapointType_DPT_Value_Sound_Intensity, true - case 206: - return KnxDatapointType_DPT_Value_Speed, true - case 207: - return KnxDatapointType_DPT_Value_Stress, true - case 208: - return KnxDatapointType_DPT_Value_Surface_Tension, true - case 209: - return KnxDatapointType_DPT_Value_Common_Temperature, true - case 21: - return KnxDatapointType_LTIME, true - case 210: - return KnxDatapointType_DPT_Value_Absolute_Temperature, true - case 211: - return KnxDatapointType_DPT_Value_TemperatureDifference, true - case 212: - return KnxDatapointType_DPT_Value_Thermal_Capacity, true - case 213: - return KnxDatapointType_DPT_Value_Thermal_Conductivity, true - case 214: - return KnxDatapointType_DPT_Value_ThermoelectricPower, true - case 215: - return KnxDatapointType_DPT_Value_Time, true - case 216: - return KnxDatapointType_DPT_Value_Torque, true - case 217: - return KnxDatapointType_DPT_Value_Volume, true - case 218: - return KnxDatapointType_DPT_Value_Volume_Flux, true - case 219: - return KnxDatapointType_DPT_Value_Weight, true - case 22: - return KnxDatapointType_DATE, true - case 220: - return KnxDatapointType_DPT_Value_Work, true - case 221: - return KnxDatapointType_DPT_Value_ApparentPower, true - case 222: - return KnxDatapointType_DPT_Volume_Flux_Meter, true - case 223: - return KnxDatapointType_DPT_Volume_Flux_ls, true - case 224: - return KnxDatapointType_DPT_Access_Data, true - case 225: - return KnxDatapointType_DPT_String_ASCII, true - case 226: - return KnxDatapointType_DPT_String_8859_1, true - case 227: - return KnxDatapointType_DPT_SceneNumber, true - case 228: - return KnxDatapointType_DPT_SceneControl, true - case 229: - return KnxDatapointType_DPT_DateTime, true - case 23: - return KnxDatapointType_TIME_OF_DAY, true - case 230: - return KnxDatapointType_DPT_SCLOMode, true - case 231: - return KnxDatapointType_DPT_BuildingMode, true - case 232: - return KnxDatapointType_DPT_OccMode, true - case 233: - return KnxDatapointType_DPT_Priority, true - case 234: - return KnxDatapointType_DPT_LightApplicationMode, true - case 235: - return KnxDatapointType_DPT_ApplicationArea, true - case 236: - return KnxDatapointType_DPT_AlarmClassType, true - case 237: - return KnxDatapointType_DPT_PSUMode, true - case 238: - return KnxDatapointType_DPT_ErrorClass_System, true - case 239: - return KnxDatapointType_DPT_ErrorClass_HVAC, true - case 24: - return KnxDatapointType_TOD, true - case 240: - return KnxDatapointType_DPT_Time_Delay, true - case 241: - return KnxDatapointType_DPT_Beaufort_Wind_Force_Scale, true - case 242: - return KnxDatapointType_DPT_SensorSelect, true - case 243: - return KnxDatapointType_DPT_ActuatorConnectType, true - case 244: - return KnxDatapointType_DPT_Cloud_Cover, true - case 245: - return KnxDatapointType_DPT_PowerReturnMode, true - case 246: - return KnxDatapointType_DPT_FuelType, true - case 247: - return KnxDatapointType_DPT_BurnerType, true - case 248: - return KnxDatapointType_DPT_HVACMode, true - case 249: - return KnxDatapointType_DPT_DHWMode, true - case 25: - return KnxDatapointType_DATE_AND_TIME, true - case 250: - return KnxDatapointType_DPT_LoadPriority, true - case 251: - return KnxDatapointType_DPT_HVACContrMode, true - case 252: - return KnxDatapointType_DPT_HVACEmergMode, true - case 253: - return KnxDatapointType_DPT_ChangeoverMode, true - case 254: - return KnxDatapointType_DPT_ValveMode, true - case 255: - return KnxDatapointType_DPT_DamperMode, true - case 256: - return KnxDatapointType_DPT_HeaterMode, true - case 257: - return KnxDatapointType_DPT_FanMode, true - case 258: - return KnxDatapointType_DPT_MasterSlaveMode, true - case 259: - return KnxDatapointType_DPT_StatusRoomSetp, true - case 26: - return KnxDatapointType_DT, true - case 260: - return KnxDatapointType_DPT_Metering_DeviceType, true - case 261: - return KnxDatapointType_DPT_HumDehumMode, true - case 262: - return KnxDatapointType_DPT_EnableHCStage, true - case 263: - return KnxDatapointType_DPT_ADAType, true - case 264: - return KnxDatapointType_DPT_BackupMode, true - case 265: - return KnxDatapointType_DPT_StartSynchronization, true - case 266: - return KnxDatapointType_DPT_Behaviour_Lock_Unlock, true - case 267: - return KnxDatapointType_DPT_Behaviour_Bus_Power_Up_Down, true - case 268: - return KnxDatapointType_DPT_DALI_Fade_Time, true - case 269: - return KnxDatapointType_DPT_BlinkingMode, true - case 27: - return KnxDatapointType_DPT_Switch, true - case 270: - return KnxDatapointType_DPT_LightControlMode, true - case 271: - return KnxDatapointType_DPT_SwitchPBModel, true - case 272: - return KnxDatapointType_DPT_PBAction, true - case 273: - return KnxDatapointType_DPT_DimmPBModel, true - case 274: - return KnxDatapointType_DPT_SwitchOnMode, true - case 275: - return KnxDatapointType_DPT_LoadTypeSet, true - case 276: - return KnxDatapointType_DPT_LoadTypeDetected, true - case 277: - return KnxDatapointType_DPT_Converter_Test_Control, true - case 278: - return KnxDatapointType_DPT_SABExcept_Behaviour, true - case 279: - return KnxDatapointType_DPT_SABBehaviour_Lock_Unlock, true - case 28: - return KnxDatapointType_DPT_Bool, true - case 280: - return KnxDatapointType_DPT_SSSBMode, true - case 281: - return KnxDatapointType_DPT_BlindsControlMode, true - case 282: - return KnxDatapointType_DPT_CommMode, true - case 283: - return KnxDatapointType_DPT_AddInfoTypes, true - case 284: - return KnxDatapointType_DPT_RF_ModeSelect, true - case 285: - return KnxDatapointType_DPT_RF_FilterSelect, true - case 286: - return KnxDatapointType_DPT_StatusGen, true - case 287: - return KnxDatapointType_DPT_Device_Control, true - case 288: - return KnxDatapointType_DPT_ForceSign, true - case 289: - return KnxDatapointType_DPT_ForceSignCool, true - case 29: - return KnxDatapointType_DPT_Enable, true - case 290: - return KnxDatapointType_DPT_StatusRHC, true - case 291: - return KnxDatapointType_DPT_StatusSDHWC, true - case 292: - return KnxDatapointType_DPT_FuelTypeSet, true - case 293: - return KnxDatapointType_DPT_StatusRCC, true - case 294: - return KnxDatapointType_DPT_StatusAHU, true - case 295: - return KnxDatapointType_DPT_CombinedStatus_RTSM, true - case 296: - return KnxDatapointType_DPT_LightActuatorErrorInfo, true - case 297: - return KnxDatapointType_DPT_RF_ModeInfo, true - case 298: - return KnxDatapointType_DPT_RF_FilterInfo, true - case 299: - return KnxDatapointType_DPT_Channel_Activation_8, true - case 3: - return KnxDatapointType_WORD, true - case 30: - return KnxDatapointType_DPT_Ramp, true - case 300: - return KnxDatapointType_DPT_StatusDHWC, true - case 301: - return KnxDatapointType_DPT_StatusRHCC, true - case 302: - return KnxDatapointType_DPT_CombinedStatus_HVA, true - case 303: - return KnxDatapointType_DPT_CombinedStatus_RTC, true - case 304: - return KnxDatapointType_DPT_Media, true - case 305: - return KnxDatapointType_DPT_Channel_Activation_16, true - case 306: - return KnxDatapointType_DPT_OnOffAction, true - case 307: - return KnxDatapointType_DPT_Alarm_Reaction, true - case 308: - return KnxDatapointType_DPT_UpDown_Action, true - case 309: - return KnxDatapointType_DPT_HVAC_PB_Action, true - case 31: - return KnxDatapointType_DPT_Alarm, true - case 310: - return KnxDatapointType_DPT_DoubleNibble, true - case 311: - return KnxDatapointType_DPT_SceneInfo, true - case 312: - return KnxDatapointType_DPT_CombinedInfoOnOff, true - case 313: - return KnxDatapointType_DPT_ActiveEnergy_V64, true - case 314: - return KnxDatapointType_DPT_ApparantEnergy_V64, true - case 315: - return KnxDatapointType_DPT_ReactiveEnergy_V64, true - case 316: - return KnxDatapointType_DPT_Channel_Activation_24, true - case 317: - return KnxDatapointType_DPT_HVACModeNext, true - case 318: - return KnxDatapointType_DPT_DHWModeNext, true - case 319: - return KnxDatapointType_DPT_OccModeNext, true - case 32: - return KnxDatapointType_DPT_BinaryValue, true - case 320: - return KnxDatapointType_DPT_BuildingModeNext, true - case 321: - return KnxDatapointType_DPT_StatusLightingActuator, true - case 322: - return KnxDatapointType_DPT_Version, true - case 323: - return KnxDatapointType_DPT_AlarmInfo, true - case 324: - return KnxDatapointType_DPT_TempRoomSetpSetF16_3, true - case 325: - return KnxDatapointType_DPT_TempRoomSetpSetShiftF16_3, true - case 326: - return KnxDatapointType_DPT_Scaling_Speed, true - case 327: - return KnxDatapointType_DPT_Scaling_Step_Time, true - case 328: - return KnxDatapointType_DPT_MeteringValue, true - case 329: - return KnxDatapointType_DPT_MBus_Address, true - case 33: - return KnxDatapointType_DPT_Step, true - case 330: - return KnxDatapointType_DPT_Colour_RGB, true - case 331: - return KnxDatapointType_DPT_LanguageCodeAlpha2_ASCII, true - case 332: - return KnxDatapointType_DPT_Tariff_ActiveEnergy, true - case 333: - return KnxDatapointType_DPT_Prioritised_Mode_Control, true - case 334: - return KnxDatapointType_DPT_DALI_Control_Gear_Diagnostic, true - case 335: - return KnxDatapointType_DPT_DALI_Diagnostics, true - case 336: - return KnxDatapointType_DPT_CombinedPosition, true - case 337: - return KnxDatapointType_DPT_StatusSAB, true - case 338: - return KnxDatapointType_DPT_Colour_xyY, true - case 339: - return KnxDatapointType_DPT_Converter_Status, true - case 34: - return KnxDatapointType_DPT_UpDown, true - case 340: - return KnxDatapointType_DPT_Converter_Test_Result, true - case 341: - return KnxDatapointType_DPT_Battery_Info, true - case 342: - return KnxDatapointType_DPT_Brightness_Colour_Temperature_Transition, true - case 343: - return KnxDatapointType_DPT_Brightness_Colour_Temperature_Control, true - case 344: - return KnxDatapointType_DPT_Colour_RGBW, true - case 345: - return KnxDatapointType_DPT_Relative_Control_RGBW, true - case 346: - return KnxDatapointType_DPT_Relative_Control_RGB, true - case 347: - return KnxDatapointType_DPT_GeographicalLocation, true - case 348: - return KnxDatapointType_DPT_TempRoomSetpSetF16_4, true - case 349: - return KnxDatapointType_DPT_TempRoomSetpSetShiftF16_4, true - case 35: - return KnxDatapointType_DPT_OpenClose, true - case 36: - return KnxDatapointType_DPT_Start, true - case 37: - return KnxDatapointType_DPT_State, true - case 38: - return KnxDatapointType_DPT_Invert, true - case 39: - return KnxDatapointType_DPT_DimSendStyle, true - case 4: - return KnxDatapointType_DWORD, true - case 40: - return KnxDatapointType_DPT_InputSource, true - case 41: - return KnxDatapointType_DPT_Reset, true - case 42: - return KnxDatapointType_DPT_Ack, true - case 43: - return KnxDatapointType_DPT_Trigger, true - case 44: - return KnxDatapointType_DPT_Occupancy, true - case 45: - return KnxDatapointType_DPT_Window_Door, true - case 46: - return KnxDatapointType_DPT_LogicalFunction, true - case 47: - return KnxDatapointType_DPT_Scene_AB, true - case 48: - return KnxDatapointType_DPT_ShutterBlinds_Mode, true - case 49: - return KnxDatapointType_DPT_DayNight, true - case 5: - return KnxDatapointType_LWORD, true - case 50: - return KnxDatapointType_DPT_Heat_Cool, true - case 51: - return KnxDatapointType_DPT_Switch_Control, true - case 52: - return KnxDatapointType_DPT_Bool_Control, true - case 53: - return KnxDatapointType_DPT_Enable_Control, true - case 54: - return KnxDatapointType_DPT_Ramp_Control, true - case 55: - return KnxDatapointType_DPT_Alarm_Control, true - case 56: - return KnxDatapointType_DPT_BinaryValue_Control, true - case 57: - return KnxDatapointType_DPT_Step_Control, true - case 58: - return KnxDatapointType_DPT_Direction1_Control, true - case 59: - return KnxDatapointType_DPT_Direction2_Control, true - case 6: - return KnxDatapointType_USINT, true - case 60: - return KnxDatapointType_DPT_Start_Control, true - case 61: - return KnxDatapointType_DPT_State_Control, true - case 62: - return KnxDatapointType_DPT_Invert_Control, true - case 63: - return KnxDatapointType_DPT_Control_Dimming, true - case 64: - return KnxDatapointType_DPT_Control_Blinds, true - case 65: - return KnxDatapointType_DPT_Char_ASCII, true - case 66: - return KnxDatapointType_DPT_Char_8859_1, true - case 67: - return KnxDatapointType_DPT_Scaling, true - case 68: - return KnxDatapointType_DPT_Angle, true - case 69: - return KnxDatapointType_DPT_Percent_U8, true - case 7: - return KnxDatapointType_SINT, true - case 70: - return KnxDatapointType_DPT_DecimalFactor, true - case 71: - return KnxDatapointType_DPT_Tariff, true - case 72: - return KnxDatapointType_DPT_Value_1_Ucount, true - case 73: - return KnxDatapointType_DPT_FanStage, true - case 74: - return KnxDatapointType_DPT_Percent_V8, true - case 75: - return KnxDatapointType_DPT_Value_1_Count, true - case 76: - return KnxDatapointType_DPT_Status_Mode3, true - case 77: - return KnxDatapointType_DPT_Value_2_Ucount, true - case 78: - return KnxDatapointType_DPT_TimePeriodMsec, true - case 79: - return KnxDatapointType_DPT_TimePeriod10Msec, true - case 8: - return KnxDatapointType_UINT, true - case 80: - return KnxDatapointType_DPT_TimePeriod100Msec, true - case 81: - return KnxDatapointType_DPT_TimePeriodSec, true - case 82: - return KnxDatapointType_DPT_TimePeriodMin, true - case 83: - return KnxDatapointType_DPT_TimePeriodHrs, true - case 84: - return KnxDatapointType_DPT_PropDataType, true - case 85: - return KnxDatapointType_DPT_Length_mm, true - case 86: - return KnxDatapointType_DPT_UElCurrentmA, true - case 87: - return KnxDatapointType_DPT_Brightness, true - case 88: - return KnxDatapointType_DPT_Absolute_Colour_Temperature, true - case 89: - return KnxDatapointType_DPT_Value_2_Count, true - case 9: - return KnxDatapointType_INT, true - case 90: - return KnxDatapointType_DPT_DeltaTimeMsec, true - case 91: - return KnxDatapointType_DPT_DeltaTime10Msec, true - case 92: - return KnxDatapointType_DPT_DeltaTime100Msec, true - case 93: - return KnxDatapointType_DPT_DeltaTimeSec, true - case 94: - return KnxDatapointType_DPT_DeltaTimeMin, true - case 95: - return KnxDatapointType_DPT_DeltaTimeHrs, true - case 96: - return KnxDatapointType_DPT_Percent_V16, true - case 97: - return KnxDatapointType_DPT_Rotation_Angle, true - case 98: - return KnxDatapointType_DPT_Length_m, true - case 99: - return KnxDatapointType_DPT_Value_Temp, true + case 0: + return KnxDatapointType_DPT_UNKNOWN, true + case 1: + return KnxDatapointType_BOOL, true + case 10: + return KnxDatapointType_UDINT, true + case 100: + return KnxDatapointType_DPT_Value_Tempd, true + case 101: + return KnxDatapointType_DPT_Value_Tempa, true + case 102: + return KnxDatapointType_DPT_Value_Lux, true + case 103: + return KnxDatapointType_DPT_Value_Wsp, true + case 104: + return KnxDatapointType_DPT_Value_Pres, true + case 105: + return KnxDatapointType_DPT_Value_Humidity, true + case 106: + return KnxDatapointType_DPT_Value_AirQuality, true + case 107: + return KnxDatapointType_DPT_Value_AirFlow, true + case 108: + return KnxDatapointType_DPT_Value_Time1, true + case 109: + return KnxDatapointType_DPT_Value_Time2, true + case 11: + return KnxDatapointType_DINT, true + case 110: + return KnxDatapointType_DPT_Value_Volt, true + case 111: + return KnxDatapointType_DPT_Value_Curr, true + case 112: + return KnxDatapointType_DPT_PowerDensity, true + case 113: + return KnxDatapointType_DPT_KelvinPerPercent, true + case 114: + return KnxDatapointType_DPT_Power, true + case 115: + return KnxDatapointType_DPT_Value_Volume_Flow, true + case 116: + return KnxDatapointType_DPT_Rain_Amount, true + case 117: + return KnxDatapointType_DPT_Value_Temp_F, true + case 118: + return KnxDatapointType_DPT_Value_Wsp_kmh, true + case 119: + return KnxDatapointType_DPT_Value_Absolute_Humidity, true + case 12: + return KnxDatapointType_ULINT, true + case 120: + return KnxDatapointType_DPT_Concentration_ygm3, true + case 121: + return KnxDatapointType_DPT_TimeOfDay, true + case 122: + return KnxDatapointType_DPT_Date, true + case 123: + return KnxDatapointType_DPT_Value_4_Ucount, true + case 124: + return KnxDatapointType_DPT_LongTimePeriod_Sec, true + case 125: + return KnxDatapointType_DPT_LongTimePeriod_Min, true + case 126: + return KnxDatapointType_DPT_LongTimePeriod_Hrs, true + case 127: + return KnxDatapointType_DPT_VolumeLiquid_Litre, true + case 128: + return KnxDatapointType_DPT_Volume_m_3, true + case 129: + return KnxDatapointType_DPT_Value_4_Count, true + case 13: + return KnxDatapointType_LINT, true + case 130: + return KnxDatapointType_DPT_FlowRate_m3h, true + case 131: + return KnxDatapointType_DPT_ActiveEnergy, true + case 132: + return KnxDatapointType_DPT_ApparantEnergy, true + case 133: + return KnxDatapointType_DPT_ReactiveEnergy, true + case 134: + return KnxDatapointType_DPT_ActiveEnergy_kWh, true + case 135: + return KnxDatapointType_DPT_ApparantEnergy_kVAh, true + case 136: + return KnxDatapointType_DPT_ReactiveEnergy_kVARh, true + case 137: + return KnxDatapointType_DPT_ActiveEnergy_MWh, true + case 138: + return KnxDatapointType_DPT_LongDeltaTimeSec, true + case 139: + return KnxDatapointType_DPT_DeltaVolumeLiquid_Litre, true + case 14: + return KnxDatapointType_REAL, true + case 140: + return KnxDatapointType_DPT_DeltaVolume_m_3, true + case 141: + return KnxDatapointType_DPT_Value_Acceleration, true + case 142: + return KnxDatapointType_DPT_Value_Acceleration_Angular, true + case 143: + return KnxDatapointType_DPT_Value_Activation_Energy, true + case 144: + return KnxDatapointType_DPT_Value_Activity, true + case 145: + return KnxDatapointType_DPT_Value_Mol, true + case 146: + return KnxDatapointType_DPT_Value_Amplitude, true + case 147: + return KnxDatapointType_DPT_Value_AngleRad, true + case 148: + return KnxDatapointType_DPT_Value_AngleDeg, true + case 149: + return KnxDatapointType_DPT_Value_Angular_Momentum, true + case 15: + return KnxDatapointType_LREAL, true + case 150: + return KnxDatapointType_DPT_Value_Angular_Velocity, true + case 151: + return KnxDatapointType_DPT_Value_Area, true + case 152: + return KnxDatapointType_DPT_Value_Capacitance, true + case 153: + return KnxDatapointType_DPT_Value_Charge_DensitySurface, true + case 154: + return KnxDatapointType_DPT_Value_Charge_DensityVolume, true + case 155: + return KnxDatapointType_DPT_Value_Compressibility, true + case 156: + return KnxDatapointType_DPT_Value_Conductance, true + case 157: + return KnxDatapointType_DPT_Value_Electrical_Conductivity, true + case 158: + return KnxDatapointType_DPT_Value_Density, true + case 159: + return KnxDatapointType_DPT_Value_Electric_Charge, true + case 16: + return KnxDatapointType_CHAR, true + case 160: + return KnxDatapointType_DPT_Value_Electric_Current, true + case 161: + return KnxDatapointType_DPT_Value_Electric_CurrentDensity, true + case 162: + return KnxDatapointType_DPT_Value_Electric_DipoleMoment, true + case 163: + return KnxDatapointType_DPT_Value_Electric_Displacement, true + case 164: + return KnxDatapointType_DPT_Value_Electric_FieldStrength, true + case 165: + return KnxDatapointType_DPT_Value_Electric_Flux, true + case 166: + return KnxDatapointType_DPT_Value_Electric_FluxDensity, true + case 167: + return KnxDatapointType_DPT_Value_Electric_Polarization, true + case 168: + return KnxDatapointType_DPT_Value_Electric_Potential, true + case 169: + return KnxDatapointType_DPT_Value_Electric_PotentialDifference, true + case 17: + return KnxDatapointType_WCHAR, true + case 170: + return KnxDatapointType_DPT_Value_ElectromagneticMoment, true + case 171: + return KnxDatapointType_DPT_Value_Electromotive_Force, true + case 172: + return KnxDatapointType_DPT_Value_Energy, true + case 173: + return KnxDatapointType_DPT_Value_Force, true + case 174: + return KnxDatapointType_DPT_Value_Frequency, true + case 175: + return KnxDatapointType_DPT_Value_Angular_Frequency, true + case 176: + return KnxDatapointType_DPT_Value_Heat_Capacity, true + case 177: + return KnxDatapointType_DPT_Value_Heat_FlowRate, true + case 178: + return KnxDatapointType_DPT_Value_Heat_Quantity, true + case 179: + return KnxDatapointType_DPT_Value_Impedance, true + case 18: + return KnxDatapointType_STRING, true + case 180: + return KnxDatapointType_DPT_Value_Length, true + case 181: + return KnxDatapointType_DPT_Value_Light_Quantity, true + case 182: + return KnxDatapointType_DPT_Value_Luminance, true + case 183: + return KnxDatapointType_DPT_Value_Luminous_Flux, true + case 184: + return KnxDatapointType_DPT_Value_Luminous_Intensity, true + case 185: + return KnxDatapointType_DPT_Value_Magnetic_FieldStrength, true + case 186: + return KnxDatapointType_DPT_Value_Magnetic_Flux, true + case 187: + return KnxDatapointType_DPT_Value_Magnetic_FluxDensity, true + case 188: + return KnxDatapointType_DPT_Value_Magnetic_Moment, true + case 189: + return KnxDatapointType_DPT_Value_Magnetic_Polarization, true + case 19: + return KnxDatapointType_WSTRING, true + case 190: + return KnxDatapointType_DPT_Value_Magnetization, true + case 191: + return KnxDatapointType_DPT_Value_MagnetomotiveForce, true + case 192: + return KnxDatapointType_DPT_Value_Mass, true + case 193: + return KnxDatapointType_DPT_Value_MassFlux, true + case 194: + return KnxDatapointType_DPT_Value_Momentum, true + case 195: + return KnxDatapointType_DPT_Value_Phase_AngleRad, true + case 196: + return KnxDatapointType_DPT_Value_Phase_AngleDeg, true + case 197: + return KnxDatapointType_DPT_Value_Power, true + case 198: + return KnxDatapointType_DPT_Value_Power_Factor, true + case 199: + return KnxDatapointType_DPT_Value_Pressure, true + case 2: + return KnxDatapointType_BYTE, true + case 20: + return KnxDatapointType_TIME, true + case 200: + return KnxDatapointType_DPT_Value_Reactance, true + case 201: + return KnxDatapointType_DPT_Value_Resistance, true + case 202: + return KnxDatapointType_DPT_Value_Resistivity, true + case 203: + return KnxDatapointType_DPT_Value_SelfInductance, true + case 204: + return KnxDatapointType_DPT_Value_SolidAngle, true + case 205: + return KnxDatapointType_DPT_Value_Sound_Intensity, true + case 206: + return KnxDatapointType_DPT_Value_Speed, true + case 207: + return KnxDatapointType_DPT_Value_Stress, true + case 208: + return KnxDatapointType_DPT_Value_Surface_Tension, true + case 209: + return KnxDatapointType_DPT_Value_Common_Temperature, true + case 21: + return KnxDatapointType_LTIME, true + case 210: + return KnxDatapointType_DPT_Value_Absolute_Temperature, true + case 211: + return KnxDatapointType_DPT_Value_TemperatureDifference, true + case 212: + return KnxDatapointType_DPT_Value_Thermal_Capacity, true + case 213: + return KnxDatapointType_DPT_Value_Thermal_Conductivity, true + case 214: + return KnxDatapointType_DPT_Value_ThermoelectricPower, true + case 215: + return KnxDatapointType_DPT_Value_Time, true + case 216: + return KnxDatapointType_DPT_Value_Torque, true + case 217: + return KnxDatapointType_DPT_Value_Volume, true + case 218: + return KnxDatapointType_DPT_Value_Volume_Flux, true + case 219: + return KnxDatapointType_DPT_Value_Weight, true + case 22: + return KnxDatapointType_DATE, true + case 220: + return KnxDatapointType_DPT_Value_Work, true + case 221: + return KnxDatapointType_DPT_Value_ApparentPower, true + case 222: + return KnxDatapointType_DPT_Volume_Flux_Meter, true + case 223: + return KnxDatapointType_DPT_Volume_Flux_ls, true + case 224: + return KnxDatapointType_DPT_Access_Data, true + case 225: + return KnxDatapointType_DPT_String_ASCII, true + case 226: + return KnxDatapointType_DPT_String_8859_1, true + case 227: + return KnxDatapointType_DPT_SceneNumber, true + case 228: + return KnxDatapointType_DPT_SceneControl, true + case 229: + return KnxDatapointType_DPT_DateTime, true + case 23: + return KnxDatapointType_TIME_OF_DAY, true + case 230: + return KnxDatapointType_DPT_SCLOMode, true + case 231: + return KnxDatapointType_DPT_BuildingMode, true + case 232: + return KnxDatapointType_DPT_OccMode, true + case 233: + return KnxDatapointType_DPT_Priority, true + case 234: + return KnxDatapointType_DPT_LightApplicationMode, true + case 235: + return KnxDatapointType_DPT_ApplicationArea, true + case 236: + return KnxDatapointType_DPT_AlarmClassType, true + case 237: + return KnxDatapointType_DPT_PSUMode, true + case 238: + return KnxDatapointType_DPT_ErrorClass_System, true + case 239: + return KnxDatapointType_DPT_ErrorClass_HVAC, true + case 24: + return KnxDatapointType_TOD, true + case 240: + return KnxDatapointType_DPT_Time_Delay, true + case 241: + return KnxDatapointType_DPT_Beaufort_Wind_Force_Scale, true + case 242: + return KnxDatapointType_DPT_SensorSelect, true + case 243: + return KnxDatapointType_DPT_ActuatorConnectType, true + case 244: + return KnxDatapointType_DPT_Cloud_Cover, true + case 245: + return KnxDatapointType_DPT_PowerReturnMode, true + case 246: + return KnxDatapointType_DPT_FuelType, true + case 247: + return KnxDatapointType_DPT_BurnerType, true + case 248: + return KnxDatapointType_DPT_HVACMode, true + case 249: + return KnxDatapointType_DPT_DHWMode, true + case 25: + return KnxDatapointType_DATE_AND_TIME, true + case 250: + return KnxDatapointType_DPT_LoadPriority, true + case 251: + return KnxDatapointType_DPT_HVACContrMode, true + case 252: + return KnxDatapointType_DPT_HVACEmergMode, true + case 253: + return KnxDatapointType_DPT_ChangeoverMode, true + case 254: + return KnxDatapointType_DPT_ValveMode, true + case 255: + return KnxDatapointType_DPT_DamperMode, true + case 256: + return KnxDatapointType_DPT_HeaterMode, true + case 257: + return KnxDatapointType_DPT_FanMode, true + case 258: + return KnxDatapointType_DPT_MasterSlaveMode, true + case 259: + return KnxDatapointType_DPT_StatusRoomSetp, true + case 26: + return KnxDatapointType_DT, true + case 260: + return KnxDatapointType_DPT_Metering_DeviceType, true + case 261: + return KnxDatapointType_DPT_HumDehumMode, true + case 262: + return KnxDatapointType_DPT_EnableHCStage, true + case 263: + return KnxDatapointType_DPT_ADAType, true + case 264: + return KnxDatapointType_DPT_BackupMode, true + case 265: + return KnxDatapointType_DPT_StartSynchronization, true + case 266: + return KnxDatapointType_DPT_Behaviour_Lock_Unlock, true + case 267: + return KnxDatapointType_DPT_Behaviour_Bus_Power_Up_Down, true + case 268: + return KnxDatapointType_DPT_DALI_Fade_Time, true + case 269: + return KnxDatapointType_DPT_BlinkingMode, true + case 27: + return KnxDatapointType_DPT_Switch, true + case 270: + return KnxDatapointType_DPT_LightControlMode, true + case 271: + return KnxDatapointType_DPT_SwitchPBModel, true + case 272: + return KnxDatapointType_DPT_PBAction, true + case 273: + return KnxDatapointType_DPT_DimmPBModel, true + case 274: + return KnxDatapointType_DPT_SwitchOnMode, true + case 275: + return KnxDatapointType_DPT_LoadTypeSet, true + case 276: + return KnxDatapointType_DPT_LoadTypeDetected, true + case 277: + return KnxDatapointType_DPT_Converter_Test_Control, true + case 278: + return KnxDatapointType_DPT_SABExcept_Behaviour, true + case 279: + return KnxDatapointType_DPT_SABBehaviour_Lock_Unlock, true + case 28: + return KnxDatapointType_DPT_Bool, true + case 280: + return KnxDatapointType_DPT_SSSBMode, true + case 281: + return KnxDatapointType_DPT_BlindsControlMode, true + case 282: + return KnxDatapointType_DPT_CommMode, true + case 283: + return KnxDatapointType_DPT_AddInfoTypes, true + case 284: + return KnxDatapointType_DPT_RF_ModeSelect, true + case 285: + return KnxDatapointType_DPT_RF_FilterSelect, true + case 286: + return KnxDatapointType_DPT_StatusGen, true + case 287: + return KnxDatapointType_DPT_Device_Control, true + case 288: + return KnxDatapointType_DPT_ForceSign, true + case 289: + return KnxDatapointType_DPT_ForceSignCool, true + case 29: + return KnxDatapointType_DPT_Enable, true + case 290: + return KnxDatapointType_DPT_StatusRHC, true + case 291: + return KnxDatapointType_DPT_StatusSDHWC, true + case 292: + return KnxDatapointType_DPT_FuelTypeSet, true + case 293: + return KnxDatapointType_DPT_StatusRCC, true + case 294: + return KnxDatapointType_DPT_StatusAHU, true + case 295: + return KnxDatapointType_DPT_CombinedStatus_RTSM, true + case 296: + return KnxDatapointType_DPT_LightActuatorErrorInfo, true + case 297: + return KnxDatapointType_DPT_RF_ModeInfo, true + case 298: + return KnxDatapointType_DPT_RF_FilterInfo, true + case 299: + return KnxDatapointType_DPT_Channel_Activation_8, true + case 3: + return KnxDatapointType_WORD, true + case 30: + return KnxDatapointType_DPT_Ramp, true + case 300: + return KnxDatapointType_DPT_StatusDHWC, true + case 301: + return KnxDatapointType_DPT_StatusRHCC, true + case 302: + return KnxDatapointType_DPT_CombinedStatus_HVA, true + case 303: + return KnxDatapointType_DPT_CombinedStatus_RTC, true + case 304: + return KnxDatapointType_DPT_Media, true + case 305: + return KnxDatapointType_DPT_Channel_Activation_16, true + case 306: + return KnxDatapointType_DPT_OnOffAction, true + case 307: + return KnxDatapointType_DPT_Alarm_Reaction, true + case 308: + return KnxDatapointType_DPT_UpDown_Action, true + case 309: + return KnxDatapointType_DPT_HVAC_PB_Action, true + case 31: + return KnxDatapointType_DPT_Alarm, true + case 310: + return KnxDatapointType_DPT_DoubleNibble, true + case 311: + return KnxDatapointType_DPT_SceneInfo, true + case 312: + return KnxDatapointType_DPT_CombinedInfoOnOff, true + case 313: + return KnxDatapointType_DPT_ActiveEnergy_V64, true + case 314: + return KnxDatapointType_DPT_ApparantEnergy_V64, true + case 315: + return KnxDatapointType_DPT_ReactiveEnergy_V64, true + case 316: + return KnxDatapointType_DPT_Channel_Activation_24, true + case 317: + return KnxDatapointType_DPT_HVACModeNext, true + case 318: + return KnxDatapointType_DPT_DHWModeNext, true + case 319: + return KnxDatapointType_DPT_OccModeNext, true + case 32: + return KnxDatapointType_DPT_BinaryValue, true + case 320: + return KnxDatapointType_DPT_BuildingModeNext, true + case 321: + return KnxDatapointType_DPT_StatusLightingActuator, true + case 322: + return KnxDatapointType_DPT_Version, true + case 323: + return KnxDatapointType_DPT_AlarmInfo, true + case 324: + return KnxDatapointType_DPT_TempRoomSetpSetF16_3, true + case 325: + return KnxDatapointType_DPT_TempRoomSetpSetShiftF16_3, true + case 326: + return KnxDatapointType_DPT_Scaling_Speed, true + case 327: + return KnxDatapointType_DPT_Scaling_Step_Time, true + case 328: + return KnxDatapointType_DPT_MeteringValue, true + case 329: + return KnxDatapointType_DPT_MBus_Address, true + case 33: + return KnxDatapointType_DPT_Step, true + case 330: + return KnxDatapointType_DPT_Colour_RGB, true + case 331: + return KnxDatapointType_DPT_LanguageCodeAlpha2_ASCII, true + case 332: + return KnxDatapointType_DPT_Tariff_ActiveEnergy, true + case 333: + return KnxDatapointType_DPT_Prioritised_Mode_Control, true + case 334: + return KnxDatapointType_DPT_DALI_Control_Gear_Diagnostic, true + case 335: + return KnxDatapointType_DPT_DALI_Diagnostics, true + case 336: + return KnxDatapointType_DPT_CombinedPosition, true + case 337: + return KnxDatapointType_DPT_StatusSAB, true + case 338: + return KnxDatapointType_DPT_Colour_xyY, true + case 339: + return KnxDatapointType_DPT_Converter_Status, true + case 34: + return KnxDatapointType_DPT_UpDown, true + case 340: + return KnxDatapointType_DPT_Converter_Test_Result, true + case 341: + return KnxDatapointType_DPT_Battery_Info, true + case 342: + return KnxDatapointType_DPT_Brightness_Colour_Temperature_Transition, true + case 343: + return KnxDatapointType_DPT_Brightness_Colour_Temperature_Control, true + case 344: + return KnxDatapointType_DPT_Colour_RGBW, true + case 345: + return KnxDatapointType_DPT_Relative_Control_RGBW, true + case 346: + return KnxDatapointType_DPT_Relative_Control_RGB, true + case 347: + return KnxDatapointType_DPT_GeographicalLocation, true + case 348: + return KnxDatapointType_DPT_TempRoomSetpSetF16_4, true + case 349: + return KnxDatapointType_DPT_TempRoomSetpSetShiftF16_4, true + case 35: + return KnxDatapointType_DPT_OpenClose, true + case 36: + return KnxDatapointType_DPT_Start, true + case 37: + return KnxDatapointType_DPT_State, true + case 38: + return KnxDatapointType_DPT_Invert, true + case 39: + return KnxDatapointType_DPT_DimSendStyle, true + case 4: + return KnxDatapointType_DWORD, true + case 40: + return KnxDatapointType_DPT_InputSource, true + case 41: + return KnxDatapointType_DPT_Reset, true + case 42: + return KnxDatapointType_DPT_Ack, true + case 43: + return KnxDatapointType_DPT_Trigger, true + case 44: + return KnxDatapointType_DPT_Occupancy, true + case 45: + return KnxDatapointType_DPT_Window_Door, true + case 46: + return KnxDatapointType_DPT_LogicalFunction, true + case 47: + return KnxDatapointType_DPT_Scene_AB, true + case 48: + return KnxDatapointType_DPT_ShutterBlinds_Mode, true + case 49: + return KnxDatapointType_DPT_DayNight, true + case 5: + return KnxDatapointType_LWORD, true + case 50: + return KnxDatapointType_DPT_Heat_Cool, true + case 51: + return KnxDatapointType_DPT_Switch_Control, true + case 52: + return KnxDatapointType_DPT_Bool_Control, true + case 53: + return KnxDatapointType_DPT_Enable_Control, true + case 54: + return KnxDatapointType_DPT_Ramp_Control, true + case 55: + return KnxDatapointType_DPT_Alarm_Control, true + case 56: + return KnxDatapointType_DPT_BinaryValue_Control, true + case 57: + return KnxDatapointType_DPT_Step_Control, true + case 58: + return KnxDatapointType_DPT_Direction1_Control, true + case 59: + return KnxDatapointType_DPT_Direction2_Control, true + case 6: + return KnxDatapointType_USINT, true + case 60: + return KnxDatapointType_DPT_Start_Control, true + case 61: + return KnxDatapointType_DPT_State_Control, true + case 62: + return KnxDatapointType_DPT_Invert_Control, true + case 63: + return KnxDatapointType_DPT_Control_Dimming, true + case 64: + return KnxDatapointType_DPT_Control_Blinds, true + case 65: + return KnxDatapointType_DPT_Char_ASCII, true + case 66: + return KnxDatapointType_DPT_Char_8859_1, true + case 67: + return KnxDatapointType_DPT_Scaling, true + case 68: + return KnxDatapointType_DPT_Angle, true + case 69: + return KnxDatapointType_DPT_Percent_U8, true + case 7: + return KnxDatapointType_SINT, true + case 70: + return KnxDatapointType_DPT_DecimalFactor, true + case 71: + return KnxDatapointType_DPT_Tariff, true + case 72: + return KnxDatapointType_DPT_Value_1_Ucount, true + case 73: + return KnxDatapointType_DPT_FanStage, true + case 74: + return KnxDatapointType_DPT_Percent_V8, true + case 75: + return KnxDatapointType_DPT_Value_1_Count, true + case 76: + return KnxDatapointType_DPT_Status_Mode3, true + case 77: + return KnxDatapointType_DPT_Value_2_Ucount, true + case 78: + return KnxDatapointType_DPT_TimePeriodMsec, true + case 79: + return KnxDatapointType_DPT_TimePeriod10Msec, true + case 8: + return KnxDatapointType_UINT, true + case 80: + return KnxDatapointType_DPT_TimePeriod100Msec, true + case 81: + return KnxDatapointType_DPT_TimePeriodSec, true + case 82: + return KnxDatapointType_DPT_TimePeriodMin, true + case 83: + return KnxDatapointType_DPT_TimePeriodHrs, true + case 84: + return KnxDatapointType_DPT_PropDataType, true + case 85: + return KnxDatapointType_DPT_Length_mm, true + case 86: + return KnxDatapointType_DPT_UElCurrentmA, true + case 87: + return KnxDatapointType_DPT_Brightness, true + case 88: + return KnxDatapointType_DPT_Absolute_Colour_Temperature, true + case 89: + return KnxDatapointType_DPT_Value_2_Count, true + case 9: + return KnxDatapointType_INT, true + case 90: + return KnxDatapointType_DPT_DeltaTimeMsec, true + case 91: + return KnxDatapointType_DPT_DeltaTime10Msec, true + case 92: + return KnxDatapointType_DPT_DeltaTime100Msec, true + case 93: + return KnxDatapointType_DPT_DeltaTimeSec, true + case 94: + return KnxDatapointType_DPT_DeltaTimeMin, true + case 95: + return KnxDatapointType_DPT_DeltaTimeHrs, true + case 96: + return KnxDatapointType_DPT_Percent_V16, true + case 97: + return KnxDatapointType_DPT_Rotation_Angle, true + case 98: + return KnxDatapointType_DPT_Length_m, true + case 99: + return KnxDatapointType_DPT_Value_Temp, true } return 0, false } @@ -6413,13 +5361,13 @@ func KnxDatapointTypeByName(value string) (enum KnxDatapointType, ok bool) { return 0, false } -func KnxDatapointTypeKnows(value uint32) bool { +func KnxDatapointTypeKnows(value uint32) bool { for _, typeValue := range KnxDatapointTypeValues { if uint32(typeValue) == value { return true } } - return false + return false; } func CastKnxDatapointType(structType interface{}) KnxDatapointType { @@ -7179,3 +6127,4 @@ func (e KnxDatapointType) PLC4XEnumName() string { func (e KnxDatapointType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/knxnetip/readwrite/model/KnxGroupAddress.go b/plc4go/protocols/knxnetip/readwrite/model/KnxGroupAddress.go index bf58ee04a49..33207fc3891 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/KnxGroupAddress.go +++ b/plc4go/protocols/knxnetip/readwrite/model/KnxGroupAddress.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // KnxGroupAddress is the corresponding interface of KnxGroupAddress type KnxGroupAddress interface { @@ -53,6 +55,7 @@ type _KnxGroupAddressChildRequirements interface { GetNumLevels() uint8 } + type KnxGroupAddressParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child KnxGroupAddress, serializeChildFunction func() error) error GetTypeName() string @@ -60,21 +63,22 @@ type KnxGroupAddressParent interface { type KnxGroupAddressChild interface { utils.Serializable - InitializeParent(parent KnxGroupAddress) +InitializeParent(parent KnxGroupAddress ) GetParent() *KnxGroupAddress GetTypeName() string KnxGroupAddress } + // NewKnxGroupAddress factory function for _KnxGroupAddress -func NewKnxGroupAddress() *_KnxGroupAddress { - return &_KnxGroupAddress{} +func NewKnxGroupAddress( ) *_KnxGroupAddress { +return &_KnxGroupAddress{ } } // Deprecated: use the interface for direct cast func CastKnxGroupAddress(structType interface{}) KnxGroupAddress { - if casted, ok := structType.(KnxGroupAddress); ok { + if casted, ok := structType.(KnxGroupAddress); ok { return casted } if casted, ok := structType.(*KnxGroupAddress); ok { @@ -87,6 +91,7 @@ func (m *_KnxGroupAddress) GetTypeName() string { return "KnxGroupAddress" } + func (m *_KnxGroupAddress) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -113,18 +118,18 @@ func KnxGroupAddressParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type KnxGroupAddressChildSerializeRequirement interface { KnxGroupAddress - InitializeParent(KnxGroupAddress) + InitializeParent(KnxGroupAddress ) GetParent() KnxGroupAddress } var _childTemp interface{} var _child KnxGroupAddressChildSerializeRequirement var typeSwitchError error switch { - case numLevels == uint8(1): // KnxGroupAddressFreeLevel +case numLevels == uint8(1) : // KnxGroupAddressFreeLevel _childTemp, typeSwitchError = KnxGroupAddressFreeLevelParseWithBuffer(ctx, readBuffer, numLevels) - case numLevels == uint8(2): // KnxGroupAddress2Level +case numLevels == uint8(2) : // KnxGroupAddress2Level _childTemp, typeSwitchError = KnxGroupAddress2LevelParseWithBuffer(ctx, readBuffer, numLevels) - case numLevels == uint8(3): // KnxGroupAddress3Level +case numLevels == uint8(3) : // KnxGroupAddress3Level _childTemp, typeSwitchError = KnxGroupAddress3LevelParseWithBuffer(ctx, readBuffer, numLevels) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [numLevels=%v]", numLevels) @@ -139,7 +144,7 @@ func KnxGroupAddressParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu } // Finish initializing - _child.InitializeParent(_child) +_child.InitializeParent(_child ) return _child, nil } @@ -149,7 +154,7 @@ func (pm *_KnxGroupAddress) SerializeParent(ctx context.Context, writeBuffer uti _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("KnxGroupAddress"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("KnxGroupAddress"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for KnxGroupAddress") } @@ -164,6 +169,7 @@ func (pm *_KnxGroupAddress) SerializeParent(ctx context.Context, writeBuffer uti return nil } + func (m *_KnxGroupAddress) isKnxGroupAddress() bool { return true } @@ -178,3 +184,6 @@ func (m *_KnxGroupAddress) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/KnxGroupAddress2Level.go b/plc4go/protocols/knxnetip/readwrite/model/KnxGroupAddress2Level.go index a4117243f5b..50e0343d9e2 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/KnxGroupAddress2Level.go +++ b/plc4go/protocols/knxnetip/readwrite/model/KnxGroupAddress2Level.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // KnxGroupAddress2Level is the corresponding interface of KnxGroupAddress2Level type KnxGroupAddress2Level interface { @@ -48,30 +50,30 @@ type KnxGroupAddress2LevelExactly interface { // _KnxGroupAddress2Level is the data-structure of this message type _KnxGroupAddress2Level struct { *_KnxGroupAddress - MainGroup uint8 - SubGroup uint16 + MainGroup uint8 + SubGroup uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_KnxGroupAddress2Level) GetNumLevels() uint8 { - return uint8(2) -} +func (m *_KnxGroupAddress2Level) GetNumLevels() uint8 { +return uint8(2)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_KnxGroupAddress2Level) InitializeParent(parent KnxGroupAddress) {} +func (m *_KnxGroupAddress2Level) InitializeParent(parent KnxGroupAddress ) {} -func (m *_KnxGroupAddress2Level) GetParent() KnxGroupAddress { +func (m *_KnxGroupAddress2Level) GetParent() KnxGroupAddress { return m._KnxGroupAddress } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -90,12 +92,13 @@ func (m *_KnxGroupAddress2Level) GetSubGroup() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewKnxGroupAddress2Level factory function for _KnxGroupAddress2Level -func NewKnxGroupAddress2Level(mainGroup uint8, subGroup uint16) *_KnxGroupAddress2Level { +func NewKnxGroupAddress2Level( mainGroup uint8 , subGroup uint16 ) *_KnxGroupAddress2Level { _result := &_KnxGroupAddress2Level{ - MainGroup: mainGroup, - SubGroup: subGroup, - _KnxGroupAddress: NewKnxGroupAddress(), + MainGroup: mainGroup, + SubGroup: subGroup, + _KnxGroupAddress: NewKnxGroupAddress(), } _result._KnxGroupAddress._KnxGroupAddressChildRequirements = _result return _result @@ -103,7 +106,7 @@ func NewKnxGroupAddress2Level(mainGroup uint8, subGroup uint16) *_KnxGroupAddres // Deprecated: use the interface for direct cast func CastKnxGroupAddress2Level(structType interface{}) KnxGroupAddress2Level { - if casted, ok := structType.(KnxGroupAddress2Level); ok { + if casted, ok := structType.(KnxGroupAddress2Level); ok { return casted } if casted, ok := structType.(*KnxGroupAddress2Level); ok { @@ -120,14 +123,15 @@ func (m *_KnxGroupAddress2Level) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (mainGroup) - lengthInBits += 5 + lengthInBits += 5; // Simple field (subGroup) - lengthInBits += 11 + lengthInBits += 11; return lengthInBits } + func (m *_KnxGroupAddress2Level) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -146,14 +150,14 @@ func KnxGroupAddress2LevelParseWithBuffer(ctx context.Context, readBuffer utils. _ = currentPos // Simple Field (mainGroup) - _mainGroup, _mainGroupErr := readBuffer.ReadUint8("mainGroup", 5) +_mainGroup, _mainGroupErr := readBuffer.ReadUint8("mainGroup", 5) if _mainGroupErr != nil { return nil, errors.Wrap(_mainGroupErr, "Error parsing 'mainGroup' field of KnxGroupAddress2Level") } mainGroup := _mainGroup // Simple Field (subGroup) - _subGroup, _subGroupErr := readBuffer.ReadUint16("subGroup", 11) +_subGroup, _subGroupErr := readBuffer.ReadUint16("subGroup", 11) if _subGroupErr != nil { return nil, errors.Wrap(_subGroupErr, "Error parsing 'subGroup' field of KnxGroupAddress2Level") } @@ -165,9 +169,10 @@ func KnxGroupAddress2LevelParseWithBuffer(ctx context.Context, readBuffer utils. // Create a partially initialized instance _child := &_KnxGroupAddress2Level{ - _KnxGroupAddress: &_KnxGroupAddress{}, - MainGroup: mainGroup, - SubGroup: subGroup, + _KnxGroupAddress: &_KnxGroupAddress{ + }, + MainGroup: mainGroup, + SubGroup: subGroup, } _child._KnxGroupAddress._KnxGroupAddressChildRequirements = _child return _child, nil @@ -189,19 +194,19 @@ func (m *_KnxGroupAddress2Level) SerializeWithWriteBuffer(ctx context.Context, w return errors.Wrap(pushErr, "Error pushing for KnxGroupAddress2Level") } - // Simple Field (mainGroup) - mainGroup := uint8(m.GetMainGroup()) - _mainGroupErr := writeBuffer.WriteUint8("mainGroup", 5, (mainGroup)) - if _mainGroupErr != nil { - return errors.Wrap(_mainGroupErr, "Error serializing 'mainGroup' field") - } + // Simple Field (mainGroup) + mainGroup := uint8(m.GetMainGroup()) + _mainGroupErr := writeBuffer.WriteUint8("mainGroup", 5, (mainGroup)) + if _mainGroupErr != nil { + return errors.Wrap(_mainGroupErr, "Error serializing 'mainGroup' field") + } - // Simple Field (subGroup) - subGroup := uint16(m.GetSubGroup()) - _subGroupErr := writeBuffer.WriteUint16("subGroup", 11, (subGroup)) - if _subGroupErr != nil { - return errors.Wrap(_subGroupErr, "Error serializing 'subGroup' field") - } + // Simple Field (subGroup) + subGroup := uint16(m.GetSubGroup()) + _subGroupErr := writeBuffer.WriteUint16("subGroup", 11, (subGroup)) + if _subGroupErr != nil { + return errors.Wrap(_subGroupErr, "Error serializing 'subGroup' field") + } if popErr := writeBuffer.PopContext("KnxGroupAddress2Level"); popErr != nil { return errors.Wrap(popErr, "Error popping for KnxGroupAddress2Level") @@ -211,6 +216,7 @@ func (m *_KnxGroupAddress2Level) SerializeWithWriteBuffer(ctx context.Context, w return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_KnxGroupAddress2Level) isKnxGroupAddress2Level() bool { return true } @@ -225,3 +231,6 @@ func (m *_KnxGroupAddress2Level) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/KnxGroupAddress3Level.go b/plc4go/protocols/knxnetip/readwrite/model/KnxGroupAddress3Level.go index 006aad2cca1..116cacd3d5f 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/KnxGroupAddress3Level.go +++ b/plc4go/protocols/knxnetip/readwrite/model/KnxGroupAddress3Level.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // KnxGroupAddress3Level is the corresponding interface of KnxGroupAddress3Level type KnxGroupAddress3Level interface { @@ -50,31 +52,31 @@ type KnxGroupAddress3LevelExactly interface { // _KnxGroupAddress3Level is the data-structure of this message type _KnxGroupAddress3Level struct { *_KnxGroupAddress - MainGroup uint8 - MiddleGroup uint8 - SubGroup uint8 + MainGroup uint8 + MiddleGroup uint8 + SubGroup uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_KnxGroupAddress3Level) GetNumLevels() uint8 { - return uint8(3) -} +func (m *_KnxGroupAddress3Level) GetNumLevels() uint8 { +return uint8(3)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_KnxGroupAddress3Level) InitializeParent(parent KnxGroupAddress) {} +func (m *_KnxGroupAddress3Level) InitializeParent(parent KnxGroupAddress ) {} -func (m *_KnxGroupAddress3Level) GetParent() KnxGroupAddress { +func (m *_KnxGroupAddress3Level) GetParent() KnxGroupAddress { return m._KnxGroupAddress } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -97,13 +99,14 @@ func (m *_KnxGroupAddress3Level) GetSubGroup() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewKnxGroupAddress3Level factory function for _KnxGroupAddress3Level -func NewKnxGroupAddress3Level(mainGroup uint8, middleGroup uint8, subGroup uint8) *_KnxGroupAddress3Level { +func NewKnxGroupAddress3Level( mainGroup uint8 , middleGroup uint8 , subGroup uint8 ) *_KnxGroupAddress3Level { _result := &_KnxGroupAddress3Level{ - MainGroup: mainGroup, - MiddleGroup: middleGroup, - SubGroup: subGroup, - _KnxGroupAddress: NewKnxGroupAddress(), + MainGroup: mainGroup, + MiddleGroup: middleGroup, + SubGroup: subGroup, + _KnxGroupAddress: NewKnxGroupAddress(), } _result._KnxGroupAddress._KnxGroupAddressChildRequirements = _result return _result @@ -111,7 +114,7 @@ func NewKnxGroupAddress3Level(mainGroup uint8, middleGroup uint8, subGroup uint8 // Deprecated: use the interface for direct cast func CastKnxGroupAddress3Level(structType interface{}) KnxGroupAddress3Level { - if casted, ok := structType.(KnxGroupAddress3Level); ok { + if casted, ok := structType.(KnxGroupAddress3Level); ok { return casted } if casted, ok := structType.(*KnxGroupAddress3Level); ok { @@ -128,17 +131,18 @@ func (m *_KnxGroupAddress3Level) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (mainGroup) - lengthInBits += 5 + lengthInBits += 5; // Simple field (middleGroup) - lengthInBits += 3 + lengthInBits += 3; // Simple field (subGroup) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_KnxGroupAddress3Level) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -157,21 +161,21 @@ func KnxGroupAddress3LevelParseWithBuffer(ctx context.Context, readBuffer utils. _ = currentPos // Simple Field (mainGroup) - _mainGroup, _mainGroupErr := readBuffer.ReadUint8("mainGroup", 5) +_mainGroup, _mainGroupErr := readBuffer.ReadUint8("mainGroup", 5) if _mainGroupErr != nil { return nil, errors.Wrap(_mainGroupErr, "Error parsing 'mainGroup' field of KnxGroupAddress3Level") } mainGroup := _mainGroup // Simple Field (middleGroup) - _middleGroup, _middleGroupErr := readBuffer.ReadUint8("middleGroup", 3) +_middleGroup, _middleGroupErr := readBuffer.ReadUint8("middleGroup", 3) if _middleGroupErr != nil { return nil, errors.Wrap(_middleGroupErr, "Error parsing 'middleGroup' field of KnxGroupAddress3Level") } middleGroup := _middleGroup // Simple Field (subGroup) - _subGroup, _subGroupErr := readBuffer.ReadUint8("subGroup", 8) +_subGroup, _subGroupErr := readBuffer.ReadUint8("subGroup", 8) if _subGroupErr != nil { return nil, errors.Wrap(_subGroupErr, "Error parsing 'subGroup' field of KnxGroupAddress3Level") } @@ -183,10 +187,11 @@ func KnxGroupAddress3LevelParseWithBuffer(ctx context.Context, readBuffer utils. // Create a partially initialized instance _child := &_KnxGroupAddress3Level{ - _KnxGroupAddress: &_KnxGroupAddress{}, - MainGroup: mainGroup, - MiddleGroup: middleGroup, - SubGroup: subGroup, + _KnxGroupAddress: &_KnxGroupAddress{ + }, + MainGroup: mainGroup, + MiddleGroup: middleGroup, + SubGroup: subGroup, } _child._KnxGroupAddress._KnxGroupAddressChildRequirements = _child return _child, nil @@ -208,26 +213,26 @@ func (m *_KnxGroupAddress3Level) SerializeWithWriteBuffer(ctx context.Context, w return errors.Wrap(pushErr, "Error pushing for KnxGroupAddress3Level") } - // Simple Field (mainGroup) - mainGroup := uint8(m.GetMainGroup()) - _mainGroupErr := writeBuffer.WriteUint8("mainGroup", 5, (mainGroup)) - if _mainGroupErr != nil { - return errors.Wrap(_mainGroupErr, "Error serializing 'mainGroup' field") - } + // Simple Field (mainGroup) + mainGroup := uint8(m.GetMainGroup()) + _mainGroupErr := writeBuffer.WriteUint8("mainGroup", 5, (mainGroup)) + if _mainGroupErr != nil { + return errors.Wrap(_mainGroupErr, "Error serializing 'mainGroup' field") + } - // Simple Field (middleGroup) - middleGroup := uint8(m.GetMiddleGroup()) - _middleGroupErr := writeBuffer.WriteUint8("middleGroup", 3, (middleGroup)) - if _middleGroupErr != nil { - return errors.Wrap(_middleGroupErr, "Error serializing 'middleGroup' field") - } + // Simple Field (middleGroup) + middleGroup := uint8(m.GetMiddleGroup()) + _middleGroupErr := writeBuffer.WriteUint8("middleGroup", 3, (middleGroup)) + if _middleGroupErr != nil { + return errors.Wrap(_middleGroupErr, "Error serializing 'middleGroup' field") + } - // Simple Field (subGroup) - subGroup := uint8(m.GetSubGroup()) - _subGroupErr := writeBuffer.WriteUint8("subGroup", 8, (subGroup)) - if _subGroupErr != nil { - return errors.Wrap(_subGroupErr, "Error serializing 'subGroup' field") - } + // Simple Field (subGroup) + subGroup := uint8(m.GetSubGroup()) + _subGroupErr := writeBuffer.WriteUint8("subGroup", 8, (subGroup)) + if _subGroupErr != nil { + return errors.Wrap(_subGroupErr, "Error serializing 'subGroup' field") + } if popErr := writeBuffer.PopContext("KnxGroupAddress3Level"); popErr != nil { return errors.Wrap(popErr, "Error popping for KnxGroupAddress3Level") @@ -237,6 +242,7 @@ func (m *_KnxGroupAddress3Level) SerializeWithWriteBuffer(ctx context.Context, w return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_KnxGroupAddress3Level) isKnxGroupAddress3Level() bool { return true } @@ -251,3 +257,6 @@ func (m *_KnxGroupAddress3Level) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/KnxGroupAddressFreeLevel.go b/plc4go/protocols/knxnetip/readwrite/model/KnxGroupAddressFreeLevel.go index a27bb3158ba..f255d1a229e 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/KnxGroupAddressFreeLevel.go +++ b/plc4go/protocols/knxnetip/readwrite/model/KnxGroupAddressFreeLevel.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // KnxGroupAddressFreeLevel is the corresponding interface of KnxGroupAddressFreeLevel type KnxGroupAddressFreeLevel interface { @@ -46,29 +48,29 @@ type KnxGroupAddressFreeLevelExactly interface { // _KnxGroupAddressFreeLevel is the data-structure of this message type _KnxGroupAddressFreeLevel struct { *_KnxGroupAddress - SubGroup uint16 + SubGroup uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_KnxGroupAddressFreeLevel) GetNumLevels() uint8 { - return uint8(1) -} +func (m *_KnxGroupAddressFreeLevel) GetNumLevels() uint8 { +return uint8(1)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_KnxGroupAddressFreeLevel) InitializeParent(parent KnxGroupAddress) {} +func (m *_KnxGroupAddressFreeLevel) InitializeParent(parent KnxGroupAddress ) {} -func (m *_KnxGroupAddressFreeLevel) GetParent() KnxGroupAddress { +func (m *_KnxGroupAddressFreeLevel) GetParent() KnxGroupAddress { return m._KnxGroupAddress } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_KnxGroupAddressFreeLevel) GetSubGroup() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewKnxGroupAddressFreeLevel factory function for _KnxGroupAddressFreeLevel -func NewKnxGroupAddressFreeLevel(subGroup uint16) *_KnxGroupAddressFreeLevel { +func NewKnxGroupAddressFreeLevel( subGroup uint16 ) *_KnxGroupAddressFreeLevel { _result := &_KnxGroupAddressFreeLevel{ - SubGroup: subGroup, - _KnxGroupAddress: NewKnxGroupAddress(), + SubGroup: subGroup, + _KnxGroupAddress: NewKnxGroupAddress(), } _result._KnxGroupAddress._KnxGroupAddressChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewKnxGroupAddressFreeLevel(subGroup uint16) *_KnxGroupAddressFreeLevel { // Deprecated: use the interface for direct cast func CastKnxGroupAddressFreeLevel(structType interface{}) KnxGroupAddressFreeLevel { - if casted, ok := structType.(KnxGroupAddressFreeLevel); ok { + if casted, ok := structType.(KnxGroupAddressFreeLevel); ok { return casted } if casted, ok := structType.(*KnxGroupAddressFreeLevel); ok { @@ -112,11 +115,12 @@ func (m *_KnxGroupAddressFreeLevel) GetLengthInBits(ctx context.Context) uint16 lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (subGroup) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_KnxGroupAddressFreeLevel) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -135,7 +139,7 @@ func KnxGroupAddressFreeLevelParseWithBuffer(ctx context.Context, readBuffer uti _ = currentPos // Simple Field (subGroup) - _subGroup, _subGroupErr := readBuffer.ReadUint16("subGroup", 16) +_subGroup, _subGroupErr := readBuffer.ReadUint16("subGroup", 16) if _subGroupErr != nil { return nil, errors.Wrap(_subGroupErr, "Error parsing 'subGroup' field of KnxGroupAddressFreeLevel") } @@ -147,8 +151,9 @@ func KnxGroupAddressFreeLevelParseWithBuffer(ctx context.Context, readBuffer uti // Create a partially initialized instance _child := &_KnxGroupAddressFreeLevel{ - _KnxGroupAddress: &_KnxGroupAddress{}, - SubGroup: subGroup, + _KnxGroupAddress: &_KnxGroupAddress{ + }, + SubGroup: subGroup, } _child._KnxGroupAddress._KnxGroupAddressChildRequirements = _child return _child, nil @@ -170,12 +175,12 @@ func (m *_KnxGroupAddressFreeLevel) SerializeWithWriteBuffer(ctx context.Context return errors.Wrap(pushErr, "Error pushing for KnxGroupAddressFreeLevel") } - // Simple Field (subGroup) - subGroup := uint16(m.GetSubGroup()) - _subGroupErr := writeBuffer.WriteUint16("subGroup", 16, (subGroup)) - if _subGroupErr != nil { - return errors.Wrap(_subGroupErr, "Error serializing 'subGroup' field") - } + // Simple Field (subGroup) + subGroup := uint16(m.GetSubGroup()) + _subGroupErr := writeBuffer.WriteUint16("subGroup", 16, (subGroup)) + if _subGroupErr != nil { + return errors.Wrap(_subGroupErr, "Error serializing 'subGroup' field") + } if popErr := writeBuffer.PopContext("KnxGroupAddressFreeLevel"); popErr != nil { return errors.Wrap(popErr, "Error popping for KnxGroupAddressFreeLevel") @@ -185,6 +190,7 @@ func (m *_KnxGroupAddressFreeLevel) SerializeWithWriteBuffer(ctx context.Context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_KnxGroupAddressFreeLevel) isKnxGroupAddressFreeLevel() bool { return true } @@ -199,3 +205,6 @@ func (m *_KnxGroupAddressFreeLevel) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/KnxInterfaceObjectProperty.go b/plc4go/protocols/knxnetip/readwrite/model/KnxInterfaceObjectProperty.go index 11a759bb0a5..c2e7c5f3a7a 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/KnxInterfaceObjectProperty.go +++ b/plc4go/protocols/knxnetip/readwrite/model/KnxInterfaceObjectProperty.go @@ -38,230 +38,230 @@ type IKnxInterfaceObjectProperty interface { ObjectType() KnxInterfaceObjectType } -const ( - KnxInterfaceObjectProperty_PID_UNKNOWN KnxInterfaceObjectProperty = 0 - KnxInterfaceObjectProperty_PID_GENERAL_OBJECT_TYPE KnxInterfaceObjectProperty = 1 - KnxInterfaceObjectProperty_PID_GENERAL_OBJECT_NAME KnxInterfaceObjectProperty = 2 - KnxInterfaceObjectProperty_PID_GENERAL_SEMAPHOR KnxInterfaceObjectProperty = 3 - KnxInterfaceObjectProperty_PID_GENERAL_GROUP_OBJECT_REFERENCE KnxInterfaceObjectProperty = 4 - KnxInterfaceObjectProperty_PID_GENERAL_LOAD_STATE_CONTROL KnxInterfaceObjectProperty = 5 - KnxInterfaceObjectProperty_PID_GENERAL_RUN_STATE_CONTROL KnxInterfaceObjectProperty = 6 - KnxInterfaceObjectProperty_PID_GENERAL_TABLE_REFERENCE KnxInterfaceObjectProperty = 7 - KnxInterfaceObjectProperty_PID_GENERAL_SERVICE_CONTROL KnxInterfaceObjectProperty = 8 - KnxInterfaceObjectProperty_PID_GENERAL_FIRMWARE_REVISION KnxInterfaceObjectProperty = 9 - KnxInterfaceObjectProperty_PID_GENERAL_SERVICES_SUPPORTED KnxInterfaceObjectProperty = 10 - KnxInterfaceObjectProperty_PID_GENERAL_SERIAL_NUMBER KnxInterfaceObjectProperty = 11 - KnxInterfaceObjectProperty_PID_GENERAL_MANUFACTURER_ID KnxInterfaceObjectProperty = 12 - KnxInterfaceObjectProperty_PID_GENERAL_PROGRAM_VERSION KnxInterfaceObjectProperty = 13 - KnxInterfaceObjectProperty_PID_GENERAL_DEVICE_CONTROL KnxInterfaceObjectProperty = 14 - KnxInterfaceObjectProperty_PID_GENERAL_ORDER_INFO KnxInterfaceObjectProperty = 15 - KnxInterfaceObjectProperty_PID_GENERAL_PEI_TYPE KnxInterfaceObjectProperty = 16 - KnxInterfaceObjectProperty_PID_GENERAL_PORT_CONFIGURATION KnxInterfaceObjectProperty = 17 - KnxInterfaceObjectProperty_PID_GENERAL_POLL_GROUP_SETTINGS KnxInterfaceObjectProperty = 18 - KnxInterfaceObjectProperty_PID_GENERAL_MANUFACTURER_DATA KnxInterfaceObjectProperty = 19 - KnxInterfaceObjectProperty_PID_GENERAL_ENABLE KnxInterfaceObjectProperty = 20 - KnxInterfaceObjectProperty_PID_GENERAL_DESCRIPTION KnxInterfaceObjectProperty = 21 - KnxInterfaceObjectProperty_PID_GENERAL_FILE KnxInterfaceObjectProperty = 22 - KnxInterfaceObjectProperty_PID_GENERAL_TABLE KnxInterfaceObjectProperty = 23 - KnxInterfaceObjectProperty_PID_GENERAL_ENROL KnxInterfaceObjectProperty = 24 - KnxInterfaceObjectProperty_PID_GENERAL_VERSION KnxInterfaceObjectProperty = 25 - KnxInterfaceObjectProperty_PID_GENERAL_GROUP_OBJECT_LINK KnxInterfaceObjectProperty = 26 - KnxInterfaceObjectProperty_PID_GENERAL_MCB_TABLE KnxInterfaceObjectProperty = 27 - KnxInterfaceObjectProperty_PID_GENERAL_ERROR_CODE KnxInterfaceObjectProperty = 28 - KnxInterfaceObjectProperty_PID_GENERAL_OBJECT_INDEX KnxInterfaceObjectProperty = 29 - KnxInterfaceObjectProperty_PID_GENERAL_DOWNLOAD_COUNTER KnxInterfaceObjectProperty = 30 - KnxInterfaceObjectProperty_PID_DEVICE_ROUTING_COUNT KnxInterfaceObjectProperty = 31 - KnxInterfaceObjectProperty_PID_DEVICE_MAX_RETRY_COUNT KnxInterfaceObjectProperty = 32 - KnxInterfaceObjectProperty_PID_DEVICE_ERROR_FLAGS KnxInterfaceObjectProperty = 33 - KnxInterfaceObjectProperty_PID_DEVICE_PROGMODE KnxInterfaceObjectProperty = 34 - KnxInterfaceObjectProperty_PID_DEVICE_PRODUCT_ID KnxInterfaceObjectProperty = 35 - KnxInterfaceObjectProperty_PID_DEVICE_MAX_APDULENGTH KnxInterfaceObjectProperty = 36 - KnxInterfaceObjectProperty_PID_DEVICE_SUBNET_ADDR KnxInterfaceObjectProperty = 37 - KnxInterfaceObjectProperty_PID_DEVICE_DEVICE_ADDR KnxInterfaceObjectProperty = 38 - KnxInterfaceObjectProperty_PID_DEVICE_PB_CONFIG KnxInterfaceObjectProperty = 39 - KnxInterfaceObjectProperty_PID_DEVICE_ADDR_REPORT KnxInterfaceObjectProperty = 40 - KnxInterfaceObjectProperty_PID_DEVICE_ADDR_CHECK KnxInterfaceObjectProperty = 41 - KnxInterfaceObjectProperty_PID_DEVICE_OBJECT_VALUE KnxInterfaceObjectProperty = 42 - KnxInterfaceObjectProperty_PID_DEVICE_OBJECTLINK KnxInterfaceObjectProperty = 43 - KnxInterfaceObjectProperty_PID_DEVICE_APPLICATION KnxInterfaceObjectProperty = 44 - KnxInterfaceObjectProperty_PID_DEVICE_PARAMETER KnxInterfaceObjectProperty = 45 - KnxInterfaceObjectProperty_PID_DEVICE_OBJECTADDRESS KnxInterfaceObjectProperty = 46 - KnxInterfaceObjectProperty_PID_DEVICE_PSU_TYPE KnxInterfaceObjectProperty = 47 - KnxInterfaceObjectProperty_PID_DEVICE_PSU_STATUS KnxInterfaceObjectProperty = 48 - KnxInterfaceObjectProperty_PID_DEVICE_PSU_ENABLE KnxInterfaceObjectProperty = 49 - KnxInterfaceObjectProperty_PID_DEVICE_DOMAIN_ADDRESS KnxInterfaceObjectProperty = 50 - KnxInterfaceObjectProperty_PID_DEVICE_IO_LIST KnxInterfaceObjectProperty = 51 - KnxInterfaceObjectProperty_PID_DEVICE_MGT_DESCRIPTOR_01 KnxInterfaceObjectProperty = 52 - KnxInterfaceObjectProperty_PID_DEVICE_PL110_PARAM KnxInterfaceObjectProperty = 53 - KnxInterfaceObjectProperty_PID_DEVICE_RF_REPEAT_COUNTER KnxInterfaceObjectProperty = 54 - KnxInterfaceObjectProperty_PID_DEVICE_RECEIVE_BLOCK_TABLE KnxInterfaceObjectProperty = 55 - KnxInterfaceObjectProperty_PID_DEVICE_RANDOM_PAUSE_TABLE KnxInterfaceObjectProperty = 56 - KnxInterfaceObjectProperty_PID_DEVICE_RECEIVE_BLOCK_NR KnxInterfaceObjectProperty = 57 - KnxInterfaceObjectProperty_PID_DEVICE_HARDWARE_TYPE KnxInterfaceObjectProperty = 58 - KnxInterfaceObjectProperty_PID_DEVICE_RETRANSMITTER_NUMBER KnxInterfaceObjectProperty = 59 - KnxInterfaceObjectProperty_PID_DEVICE_SERIAL_NR_TABLE KnxInterfaceObjectProperty = 60 - KnxInterfaceObjectProperty_PID_DEVICE_BIBATMASTER_ADDRESS KnxInterfaceObjectProperty = 61 - KnxInterfaceObjectProperty_PID_DEVICE_RF_DOMAIN_ADDRESS KnxInterfaceObjectProperty = 62 - KnxInterfaceObjectProperty_PID_DEVICE_DEVICE_DESCRIPTOR KnxInterfaceObjectProperty = 63 - KnxInterfaceObjectProperty_PID_DEVICE_METERING_FILTER_TABLE KnxInterfaceObjectProperty = 64 - KnxInterfaceObjectProperty_PID_DEVICE_GROUP_TELEGR_RATE_LIMIT_TIME_BASE KnxInterfaceObjectProperty = 65 - KnxInterfaceObjectProperty_PID_DEVICE_GROUP_TELEGR_RATE_LIMIT_NO_OF_TELEGR KnxInterfaceObjectProperty = 66 - KnxInterfaceObjectProperty_PID_GROUP_OBJECT_TABLE_GRPOBJTABLE KnxInterfaceObjectProperty = 67 - KnxInterfaceObjectProperty_PID_GROUP_OBJECT_TABLE_EXT_GRPOBJREFERENCE KnxInterfaceObjectProperty = 68 - KnxInterfaceObjectProperty_PID_ROUTER_LINE_STATUS KnxInterfaceObjectProperty = 69 - KnxInterfaceObjectProperty_PID_ROUTER_MAIN_LCCONFIG KnxInterfaceObjectProperty = 70 - KnxInterfaceObjectProperty_PID_ROUTER_SUB_LCCONFIG KnxInterfaceObjectProperty = 71 - KnxInterfaceObjectProperty_PID_ROUTER_MAIN_LCGRPCONFIG KnxInterfaceObjectProperty = 72 - KnxInterfaceObjectProperty_PID_ROUTER_SUB_LCGRPCONFIG KnxInterfaceObjectProperty = 73 - KnxInterfaceObjectProperty_PID_ROUTER_ROUTETABLE_CONTROL KnxInterfaceObjectProperty = 74 - KnxInterfaceObjectProperty_PID_ROUTER_COUPL_SERV_CONTROL KnxInterfaceObjectProperty = 75 - KnxInterfaceObjectProperty_PID_ROUTER_MAX_ROUTER_APDU_LENGTH KnxInterfaceObjectProperty = 76 - KnxInterfaceObjectProperty_PID_ROUTER_MEDIUM KnxInterfaceObjectProperty = 77 - KnxInterfaceObjectProperty_PID_ROUTER_FILTER_TABLE_USE KnxInterfaceObjectProperty = 78 - KnxInterfaceObjectProperty_PID_ROUTER_RF_ENABLE_SBC KnxInterfaceObjectProperty = 79 - KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_PROJECT_INSTALLATION_ID KnxInterfaceObjectProperty = 80 - KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_KNX_INDIVIDUAL_ADDRESS KnxInterfaceObjectProperty = 81 - KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_ADDITIONAL_INDIVIDUAL_ADDRESSES KnxInterfaceObjectProperty = 82 - KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_CURRENT_IP_ASSIGNMENT_METHOD KnxInterfaceObjectProperty = 83 - KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_IP_ASSIGNMENT_METHOD KnxInterfaceObjectProperty = 84 - KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_IP_CAPABILITIES KnxInterfaceObjectProperty = 85 - KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_CURRENT_IP_ADDRESS KnxInterfaceObjectProperty = 86 - KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_CURRENT_SUBNET_MASK KnxInterfaceObjectProperty = 87 - KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_CURRENT_DEFAULT_GATEWAY KnxInterfaceObjectProperty = 88 - KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_IP_ADDRESS KnxInterfaceObjectProperty = 89 - KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_SUBNET_MASK KnxInterfaceObjectProperty = 90 - KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_DEFAULT_GATEWAY KnxInterfaceObjectProperty = 91 - KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_DHCP_BOOTP_SERVER KnxInterfaceObjectProperty = 92 - KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_MAC_ADDRESS KnxInterfaceObjectProperty = 93 - KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_SYSTEM_SETUP_MULTICAST_ADDRESS KnxInterfaceObjectProperty = 94 - KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_ROUTING_MULTICAST_ADDRESS KnxInterfaceObjectProperty = 95 - KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_TTL KnxInterfaceObjectProperty = 96 - KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_KNXNETIP_DEVICE_CAPABILITIES KnxInterfaceObjectProperty = 97 - KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_KNXNETIP_DEVICE_STATE KnxInterfaceObjectProperty = 98 - KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_KNXNETIP_ROUTING_CAPABILITIES KnxInterfaceObjectProperty = 99 - KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_PRIORITY_FIFO_ENABLED KnxInterfaceObjectProperty = 100 - KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_QUEUE_OVERFLOW_TO_IP KnxInterfaceObjectProperty = 101 - KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_QUEUE_OVERFLOW_TO_KNX KnxInterfaceObjectProperty = 102 - KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_MSG_TRANSMIT_TO_IP KnxInterfaceObjectProperty = 103 - KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_MSG_TRANSMIT_TO_KNX KnxInterfaceObjectProperty = 104 - KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_FRIENDLY_NAME KnxInterfaceObjectProperty = 105 - KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_BACKBONE_KEY KnxInterfaceObjectProperty = 106 - KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_DEVICE_AUTHENTICATION_CODE KnxInterfaceObjectProperty = 107 - KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_PASSWORD_HASHES KnxInterfaceObjectProperty = 108 - KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_SECURED_SERVICE_FAMILIES KnxInterfaceObjectProperty = 109 - KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_MULTICAST_LATENCY_TOLERANCE KnxInterfaceObjectProperty = 110 - KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_SYNC_LATENCY_FRACTION KnxInterfaceObjectProperty = 111 - KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_TUNNELLING_USERS KnxInterfaceObjectProperty = 112 - KnxInterfaceObjectProperty_PID_SECURITY_SECURITY_MODE KnxInterfaceObjectProperty = 113 - KnxInterfaceObjectProperty_PID_SECURITY_P2P_KEY_TABLE KnxInterfaceObjectProperty = 114 - KnxInterfaceObjectProperty_PID_SECURITY_GRP_KEY_TABLE KnxInterfaceObjectProperty = 115 - KnxInterfaceObjectProperty_PID_SECURITY_SECURITY_INDIVIDUAL_ADDRESS_TABLE KnxInterfaceObjectProperty = 116 - KnxInterfaceObjectProperty_PID_SECURITY_SECURITY_FAILURES_LOG KnxInterfaceObjectProperty = 117 - KnxInterfaceObjectProperty_PID_SECURITY_SKI_TOOL KnxInterfaceObjectProperty = 118 - KnxInterfaceObjectProperty_PID_SECURITY_SECURITY_REPORT KnxInterfaceObjectProperty = 119 - KnxInterfaceObjectProperty_PID_SECURITY_SECURITY_REPORT_CONTROL KnxInterfaceObjectProperty = 120 - KnxInterfaceObjectProperty_PID_SECURITY_SEQUENCE_NUMBER_SENDING KnxInterfaceObjectProperty = 121 - KnxInterfaceObjectProperty_PID_SECURITY_ZONE_KEYS_TABLE KnxInterfaceObjectProperty = 122 - KnxInterfaceObjectProperty_PID_SECURITY_GO_SECURITY_FLAGS KnxInterfaceObjectProperty = 123 - KnxInterfaceObjectProperty_PID_RF_MEDIUM_RF_MULTI_TYPE KnxInterfaceObjectProperty = 124 - KnxInterfaceObjectProperty_PID_RF_MEDIUM_RF_DOMAIN_ADDRESS KnxInterfaceObjectProperty = 125 - KnxInterfaceObjectProperty_PID_RF_MEDIUM_RF_RETRANSMITTER KnxInterfaceObjectProperty = 126 - KnxInterfaceObjectProperty_PID_RF_MEDIUM_SECURITY_REPORT_CONTROL KnxInterfaceObjectProperty = 127 - KnxInterfaceObjectProperty_PID_RF_MEDIUM_RF_FILTERING_MODE_SELECT KnxInterfaceObjectProperty = 128 - KnxInterfaceObjectProperty_PID_RF_MEDIUM_RF_BIDIR_TIMEOUT KnxInterfaceObjectProperty = 129 - KnxInterfaceObjectProperty_PID_RF_MEDIUM_RF_DIAG_SA_FILTER_TABLE KnxInterfaceObjectProperty = 130 - KnxInterfaceObjectProperty_PID_RF_MEDIUM_RF_DIAG_QUALITY_TABLE KnxInterfaceObjectProperty = 131 - KnxInterfaceObjectProperty_PID_RF_MEDIUM_RF_DIAG_PROBE KnxInterfaceObjectProperty = 132 - KnxInterfaceObjectProperty_PID_INDOOR_BRIGHTNESS_SENSOR_CHANGE_OF_VALUE KnxInterfaceObjectProperty = 133 - KnxInterfaceObjectProperty_PID_INDOOR_BRIGHTNESS_SENSOR_REPETITION_TIME KnxInterfaceObjectProperty = 134 - KnxInterfaceObjectProperty_PID_INDOOR_LUMINANCE_SENSOR_CHANGE_OF_VALUE KnxInterfaceObjectProperty = 135 - KnxInterfaceObjectProperty_PID_INDOOR_LUMINANCE_SENSOR_REPETITION_TIME KnxInterfaceObjectProperty = 136 - KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_ON_DELAY KnxInterfaceObjectProperty = 137 - KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_OFF_DELAY KnxInterfaceObjectProperty = 138 - KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_TIMED_ON_DURATION KnxInterfaceObjectProperty = 139 - KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_PREWARNING_DURATION KnxInterfaceObjectProperty = 140 - KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_TRANSMISSION_CYCLE_TIME KnxInterfaceObjectProperty = 141 - KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_BUS_POWER_UP_MESSAGE_DELAY KnxInterfaceObjectProperty = 142 - KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_BEHAVIOUR_AT_LOCKING KnxInterfaceObjectProperty = 143 - KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_BEHAVIOUR_AT_UNLOCKING KnxInterfaceObjectProperty = 144 - KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_BEHAVIOUR_BUS_POWER_UP KnxInterfaceObjectProperty = 145 - KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_BEHAVIOUR_BUS_POWER_DOWN KnxInterfaceObjectProperty = 146 - KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_INVERT_OUTPUT_STATE KnxInterfaceObjectProperty = 147 - KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_TIMED_ON_RETRIGGER_FUNCTION KnxInterfaceObjectProperty = 148 - KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_MANUAL_OFF_ENABLE KnxInterfaceObjectProperty = 149 - KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_INVERT_LOCK_DEVICE KnxInterfaceObjectProperty = 150 - KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_LOCK_STATE KnxInterfaceObjectProperty = 151 - KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_UNLOCK_STATE KnxInterfaceObjectProperty = 152 - KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_STATE_FOR_SCENE_NUMBER KnxInterfaceObjectProperty = 153 - KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_STORAGE_FUNCTION_FOR_SCENE KnxInterfaceObjectProperty = 154 - KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_BUS_POWER_UP_STATE KnxInterfaceObjectProperty = 155 - KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_BEHAVIOUR_BUS_POWER_UP_2 KnxInterfaceObjectProperty = 156 - KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_ON_DELAY KnxInterfaceObjectProperty = 157 - KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_OFF_DELAY KnxInterfaceObjectProperty = 158 - KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_SWITCH_OFF_BRIGHTNESS_DELAY_TIME KnxInterfaceObjectProperty = 159 - KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_TIMED_ON_DURATION KnxInterfaceObjectProperty = 160 - KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_PREWARNING_DURATION KnxInterfaceObjectProperty = 161 - KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_TRANSMISSION_CYCLE_TIME KnxInterfaceObjectProperty = 162 - KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_BUS_POWER_UP_MESSAGE_DELAY KnxInterfaceObjectProperty = 163 - KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_DIMMING_SPEED KnxInterfaceObjectProperty = 164 - KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_DIMMING_STEP_TIME KnxInterfaceObjectProperty = 165 - KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_DIMMING_SPEED_FOR_SWITCH_ON_SET_VALUE KnxInterfaceObjectProperty = 166 - KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_DIMMING_SPEED_FOR_SWITCH_OFF KnxInterfaceObjectProperty = 167 +const( + KnxInterfaceObjectProperty_PID_UNKNOWN KnxInterfaceObjectProperty = 0 + KnxInterfaceObjectProperty_PID_GENERAL_OBJECT_TYPE KnxInterfaceObjectProperty = 1 + KnxInterfaceObjectProperty_PID_GENERAL_OBJECT_NAME KnxInterfaceObjectProperty = 2 + KnxInterfaceObjectProperty_PID_GENERAL_SEMAPHOR KnxInterfaceObjectProperty = 3 + KnxInterfaceObjectProperty_PID_GENERAL_GROUP_OBJECT_REFERENCE KnxInterfaceObjectProperty = 4 + KnxInterfaceObjectProperty_PID_GENERAL_LOAD_STATE_CONTROL KnxInterfaceObjectProperty = 5 + KnxInterfaceObjectProperty_PID_GENERAL_RUN_STATE_CONTROL KnxInterfaceObjectProperty = 6 + KnxInterfaceObjectProperty_PID_GENERAL_TABLE_REFERENCE KnxInterfaceObjectProperty = 7 + KnxInterfaceObjectProperty_PID_GENERAL_SERVICE_CONTROL KnxInterfaceObjectProperty = 8 + KnxInterfaceObjectProperty_PID_GENERAL_FIRMWARE_REVISION KnxInterfaceObjectProperty = 9 + KnxInterfaceObjectProperty_PID_GENERAL_SERVICES_SUPPORTED KnxInterfaceObjectProperty = 10 + KnxInterfaceObjectProperty_PID_GENERAL_SERIAL_NUMBER KnxInterfaceObjectProperty = 11 + KnxInterfaceObjectProperty_PID_GENERAL_MANUFACTURER_ID KnxInterfaceObjectProperty = 12 + KnxInterfaceObjectProperty_PID_GENERAL_PROGRAM_VERSION KnxInterfaceObjectProperty = 13 + KnxInterfaceObjectProperty_PID_GENERAL_DEVICE_CONTROL KnxInterfaceObjectProperty = 14 + KnxInterfaceObjectProperty_PID_GENERAL_ORDER_INFO KnxInterfaceObjectProperty = 15 + KnxInterfaceObjectProperty_PID_GENERAL_PEI_TYPE KnxInterfaceObjectProperty = 16 + KnxInterfaceObjectProperty_PID_GENERAL_PORT_CONFIGURATION KnxInterfaceObjectProperty = 17 + KnxInterfaceObjectProperty_PID_GENERAL_POLL_GROUP_SETTINGS KnxInterfaceObjectProperty = 18 + KnxInterfaceObjectProperty_PID_GENERAL_MANUFACTURER_DATA KnxInterfaceObjectProperty = 19 + KnxInterfaceObjectProperty_PID_GENERAL_ENABLE KnxInterfaceObjectProperty = 20 + KnxInterfaceObjectProperty_PID_GENERAL_DESCRIPTION KnxInterfaceObjectProperty = 21 + KnxInterfaceObjectProperty_PID_GENERAL_FILE KnxInterfaceObjectProperty = 22 + KnxInterfaceObjectProperty_PID_GENERAL_TABLE KnxInterfaceObjectProperty = 23 + KnxInterfaceObjectProperty_PID_GENERAL_ENROL KnxInterfaceObjectProperty = 24 + KnxInterfaceObjectProperty_PID_GENERAL_VERSION KnxInterfaceObjectProperty = 25 + KnxInterfaceObjectProperty_PID_GENERAL_GROUP_OBJECT_LINK KnxInterfaceObjectProperty = 26 + KnxInterfaceObjectProperty_PID_GENERAL_MCB_TABLE KnxInterfaceObjectProperty = 27 + KnxInterfaceObjectProperty_PID_GENERAL_ERROR_CODE KnxInterfaceObjectProperty = 28 + KnxInterfaceObjectProperty_PID_GENERAL_OBJECT_INDEX KnxInterfaceObjectProperty = 29 + KnxInterfaceObjectProperty_PID_GENERAL_DOWNLOAD_COUNTER KnxInterfaceObjectProperty = 30 + KnxInterfaceObjectProperty_PID_DEVICE_ROUTING_COUNT KnxInterfaceObjectProperty = 31 + KnxInterfaceObjectProperty_PID_DEVICE_MAX_RETRY_COUNT KnxInterfaceObjectProperty = 32 + KnxInterfaceObjectProperty_PID_DEVICE_ERROR_FLAGS KnxInterfaceObjectProperty = 33 + KnxInterfaceObjectProperty_PID_DEVICE_PROGMODE KnxInterfaceObjectProperty = 34 + KnxInterfaceObjectProperty_PID_DEVICE_PRODUCT_ID KnxInterfaceObjectProperty = 35 + KnxInterfaceObjectProperty_PID_DEVICE_MAX_APDULENGTH KnxInterfaceObjectProperty = 36 + KnxInterfaceObjectProperty_PID_DEVICE_SUBNET_ADDR KnxInterfaceObjectProperty = 37 + KnxInterfaceObjectProperty_PID_DEVICE_DEVICE_ADDR KnxInterfaceObjectProperty = 38 + KnxInterfaceObjectProperty_PID_DEVICE_PB_CONFIG KnxInterfaceObjectProperty = 39 + KnxInterfaceObjectProperty_PID_DEVICE_ADDR_REPORT KnxInterfaceObjectProperty = 40 + KnxInterfaceObjectProperty_PID_DEVICE_ADDR_CHECK KnxInterfaceObjectProperty = 41 + KnxInterfaceObjectProperty_PID_DEVICE_OBJECT_VALUE KnxInterfaceObjectProperty = 42 + KnxInterfaceObjectProperty_PID_DEVICE_OBJECTLINK KnxInterfaceObjectProperty = 43 + KnxInterfaceObjectProperty_PID_DEVICE_APPLICATION KnxInterfaceObjectProperty = 44 + KnxInterfaceObjectProperty_PID_DEVICE_PARAMETER KnxInterfaceObjectProperty = 45 + KnxInterfaceObjectProperty_PID_DEVICE_OBJECTADDRESS KnxInterfaceObjectProperty = 46 + KnxInterfaceObjectProperty_PID_DEVICE_PSU_TYPE KnxInterfaceObjectProperty = 47 + KnxInterfaceObjectProperty_PID_DEVICE_PSU_STATUS KnxInterfaceObjectProperty = 48 + KnxInterfaceObjectProperty_PID_DEVICE_PSU_ENABLE KnxInterfaceObjectProperty = 49 + KnxInterfaceObjectProperty_PID_DEVICE_DOMAIN_ADDRESS KnxInterfaceObjectProperty = 50 + KnxInterfaceObjectProperty_PID_DEVICE_IO_LIST KnxInterfaceObjectProperty = 51 + KnxInterfaceObjectProperty_PID_DEVICE_MGT_DESCRIPTOR_01 KnxInterfaceObjectProperty = 52 + KnxInterfaceObjectProperty_PID_DEVICE_PL110_PARAM KnxInterfaceObjectProperty = 53 + KnxInterfaceObjectProperty_PID_DEVICE_RF_REPEAT_COUNTER KnxInterfaceObjectProperty = 54 + KnxInterfaceObjectProperty_PID_DEVICE_RECEIVE_BLOCK_TABLE KnxInterfaceObjectProperty = 55 + KnxInterfaceObjectProperty_PID_DEVICE_RANDOM_PAUSE_TABLE KnxInterfaceObjectProperty = 56 + KnxInterfaceObjectProperty_PID_DEVICE_RECEIVE_BLOCK_NR KnxInterfaceObjectProperty = 57 + KnxInterfaceObjectProperty_PID_DEVICE_HARDWARE_TYPE KnxInterfaceObjectProperty = 58 + KnxInterfaceObjectProperty_PID_DEVICE_RETRANSMITTER_NUMBER KnxInterfaceObjectProperty = 59 + KnxInterfaceObjectProperty_PID_DEVICE_SERIAL_NR_TABLE KnxInterfaceObjectProperty = 60 + KnxInterfaceObjectProperty_PID_DEVICE_BIBATMASTER_ADDRESS KnxInterfaceObjectProperty = 61 + KnxInterfaceObjectProperty_PID_DEVICE_RF_DOMAIN_ADDRESS KnxInterfaceObjectProperty = 62 + KnxInterfaceObjectProperty_PID_DEVICE_DEVICE_DESCRIPTOR KnxInterfaceObjectProperty = 63 + KnxInterfaceObjectProperty_PID_DEVICE_METERING_FILTER_TABLE KnxInterfaceObjectProperty = 64 + KnxInterfaceObjectProperty_PID_DEVICE_GROUP_TELEGR_RATE_LIMIT_TIME_BASE KnxInterfaceObjectProperty = 65 + KnxInterfaceObjectProperty_PID_DEVICE_GROUP_TELEGR_RATE_LIMIT_NO_OF_TELEGR KnxInterfaceObjectProperty = 66 + KnxInterfaceObjectProperty_PID_GROUP_OBJECT_TABLE_GRPOBJTABLE KnxInterfaceObjectProperty = 67 + KnxInterfaceObjectProperty_PID_GROUP_OBJECT_TABLE_EXT_GRPOBJREFERENCE KnxInterfaceObjectProperty = 68 + KnxInterfaceObjectProperty_PID_ROUTER_LINE_STATUS KnxInterfaceObjectProperty = 69 + KnxInterfaceObjectProperty_PID_ROUTER_MAIN_LCCONFIG KnxInterfaceObjectProperty = 70 + KnxInterfaceObjectProperty_PID_ROUTER_SUB_LCCONFIG KnxInterfaceObjectProperty = 71 + KnxInterfaceObjectProperty_PID_ROUTER_MAIN_LCGRPCONFIG KnxInterfaceObjectProperty = 72 + KnxInterfaceObjectProperty_PID_ROUTER_SUB_LCGRPCONFIG KnxInterfaceObjectProperty = 73 + KnxInterfaceObjectProperty_PID_ROUTER_ROUTETABLE_CONTROL KnxInterfaceObjectProperty = 74 + KnxInterfaceObjectProperty_PID_ROUTER_COUPL_SERV_CONTROL KnxInterfaceObjectProperty = 75 + KnxInterfaceObjectProperty_PID_ROUTER_MAX_ROUTER_APDU_LENGTH KnxInterfaceObjectProperty = 76 + KnxInterfaceObjectProperty_PID_ROUTER_MEDIUM KnxInterfaceObjectProperty = 77 + KnxInterfaceObjectProperty_PID_ROUTER_FILTER_TABLE_USE KnxInterfaceObjectProperty = 78 + KnxInterfaceObjectProperty_PID_ROUTER_RF_ENABLE_SBC KnxInterfaceObjectProperty = 79 + KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_PROJECT_INSTALLATION_ID KnxInterfaceObjectProperty = 80 + KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_KNX_INDIVIDUAL_ADDRESS KnxInterfaceObjectProperty = 81 + KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_ADDITIONAL_INDIVIDUAL_ADDRESSES KnxInterfaceObjectProperty = 82 + KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_CURRENT_IP_ASSIGNMENT_METHOD KnxInterfaceObjectProperty = 83 + KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_IP_ASSIGNMENT_METHOD KnxInterfaceObjectProperty = 84 + KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_IP_CAPABILITIES KnxInterfaceObjectProperty = 85 + KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_CURRENT_IP_ADDRESS KnxInterfaceObjectProperty = 86 + KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_CURRENT_SUBNET_MASK KnxInterfaceObjectProperty = 87 + KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_CURRENT_DEFAULT_GATEWAY KnxInterfaceObjectProperty = 88 + KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_IP_ADDRESS KnxInterfaceObjectProperty = 89 + KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_SUBNET_MASK KnxInterfaceObjectProperty = 90 + KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_DEFAULT_GATEWAY KnxInterfaceObjectProperty = 91 + KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_DHCP_BOOTP_SERVER KnxInterfaceObjectProperty = 92 + KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_MAC_ADDRESS KnxInterfaceObjectProperty = 93 + KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_SYSTEM_SETUP_MULTICAST_ADDRESS KnxInterfaceObjectProperty = 94 + KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_ROUTING_MULTICAST_ADDRESS KnxInterfaceObjectProperty = 95 + KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_TTL KnxInterfaceObjectProperty = 96 + KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_KNXNETIP_DEVICE_CAPABILITIES KnxInterfaceObjectProperty = 97 + KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_KNXNETIP_DEVICE_STATE KnxInterfaceObjectProperty = 98 + KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_KNXNETIP_ROUTING_CAPABILITIES KnxInterfaceObjectProperty = 99 + KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_PRIORITY_FIFO_ENABLED KnxInterfaceObjectProperty = 100 + KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_QUEUE_OVERFLOW_TO_IP KnxInterfaceObjectProperty = 101 + KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_QUEUE_OVERFLOW_TO_KNX KnxInterfaceObjectProperty = 102 + KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_MSG_TRANSMIT_TO_IP KnxInterfaceObjectProperty = 103 + KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_MSG_TRANSMIT_TO_KNX KnxInterfaceObjectProperty = 104 + KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_FRIENDLY_NAME KnxInterfaceObjectProperty = 105 + KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_BACKBONE_KEY KnxInterfaceObjectProperty = 106 + KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_DEVICE_AUTHENTICATION_CODE KnxInterfaceObjectProperty = 107 + KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_PASSWORD_HASHES KnxInterfaceObjectProperty = 108 + KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_SECURED_SERVICE_FAMILIES KnxInterfaceObjectProperty = 109 + KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_MULTICAST_LATENCY_TOLERANCE KnxInterfaceObjectProperty = 110 + KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_SYNC_LATENCY_FRACTION KnxInterfaceObjectProperty = 111 + KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_TUNNELLING_USERS KnxInterfaceObjectProperty = 112 + KnxInterfaceObjectProperty_PID_SECURITY_SECURITY_MODE KnxInterfaceObjectProperty = 113 + KnxInterfaceObjectProperty_PID_SECURITY_P2P_KEY_TABLE KnxInterfaceObjectProperty = 114 + KnxInterfaceObjectProperty_PID_SECURITY_GRP_KEY_TABLE KnxInterfaceObjectProperty = 115 + KnxInterfaceObjectProperty_PID_SECURITY_SECURITY_INDIVIDUAL_ADDRESS_TABLE KnxInterfaceObjectProperty = 116 + KnxInterfaceObjectProperty_PID_SECURITY_SECURITY_FAILURES_LOG KnxInterfaceObjectProperty = 117 + KnxInterfaceObjectProperty_PID_SECURITY_SKI_TOOL KnxInterfaceObjectProperty = 118 + KnxInterfaceObjectProperty_PID_SECURITY_SECURITY_REPORT KnxInterfaceObjectProperty = 119 + KnxInterfaceObjectProperty_PID_SECURITY_SECURITY_REPORT_CONTROL KnxInterfaceObjectProperty = 120 + KnxInterfaceObjectProperty_PID_SECURITY_SEQUENCE_NUMBER_SENDING KnxInterfaceObjectProperty = 121 + KnxInterfaceObjectProperty_PID_SECURITY_ZONE_KEYS_TABLE KnxInterfaceObjectProperty = 122 + KnxInterfaceObjectProperty_PID_SECURITY_GO_SECURITY_FLAGS KnxInterfaceObjectProperty = 123 + KnxInterfaceObjectProperty_PID_RF_MEDIUM_RF_MULTI_TYPE KnxInterfaceObjectProperty = 124 + KnxInterfaceObjectProperty_PID_RF_MEDIUM_RF_DOMAIN_ADDRESS KnxInterfaceObjectProperty = 125 + KnxInterfaceObjectProperty_PID_RF_MEDIUM_RF_RETRANSMITTER KnxInterfaceObjectProperty = 126 + KnxInterfaceObjectProperty_PID_RF_MEDIUM_SECURITY_REPORT_CONTROL KnxInterfaceObjectProperty = 127 + KnxInterfaceObjectProperty_PID_RF_MEDIUM_RF_FILTERING_MODE_SELECT KnxInterfaceObjectProperty = 128 + KnxInterfaceObjectProperty_PID_RF_MEDIUM_RF_BIDIR_TIMEOUT KnxInterfaceObjectProperty = 129 + KnxInterfaceObjectProperty_PID_RF_MEDIUM_RF_DIAG_SA_FILTER_TABLE KnxInterfaceObjectProperty = 130 + KnxInterfaceObjectProperty_PID_RF_MEDIUM_RF_DIAG_QUALITY_TABLE KnxInterfaceObjectProperty = 131 + KnxInterfaceObjectProperty_PID_RF_MEDIUM_RF_DIAG_PROBE KnxInterfaceObjectProperty = 132 + KnxInterfaceObjectProperty_PID_INDOOR_BRIGHTNESS_SENSOR_CHANGE_OF_VALUE KnxInterfaceObjectProperty = 133 + KnxInterfaceObjectProperty_PID_INDOOR_BRIGHTNESS_SENSOR_REPETITION_TIME KnxInterfaceObjectProperty = 134 + KnxInterfaceObjectProperty_PID_INDOOR_LUMINANCE_SENSOR_CHANGE_OF_VALUE KnxInterfaceObjectProperty = 135 + KnxInterfaceObjectProperty_PID_INDOOR_LUMINANCE_SENSOR_REPETITION_TIME KnxInterfaceObjectProperty = 136 + KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_ON_DELAY KnxInterfaceObjectProperty = 137 + KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_OFF_DELAY KnxInterfaceObjectProperty = 138 + KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_TIMED_ON_DURATION KnxInterfaceObjectProperty = 139 + KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_PREWARNING_DURATION KnxInterfaceObjectProperty = 140 + KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_TRANSMISSION_CYCLE_TIME KnxInterfaceObjectProperty = 141 + KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_BUS_POWER_UP_MESSAGE_DELAY KnxInterfaceObjectProperty = 142 + KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_BEHAVIOUR_AT_LOCKING KnxInterfaceObjectProperty = 143 + KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_BEHAVIOUR_AT_UNLOCKING KnxInterfaceObjectProperty = 144 + KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_BEHAVIOUR_BUS_POWER_UP KnxInterfaceObjectProperty = 145 + KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_BEHAVIOUR_BUS_POWER_DOWN KnxInterfaceObjectProperty = 146 + KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_INVERT_OUTPUT_STATE KnxInterfaceObjectProperty = 147 + KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_TIMED_ON_RETRIGGER_FUNCTION KnxInterfaceObjectProperty = 148 + KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_MANUAL_OFF_ENABLE KnxInterfaceObjectProperty = 149 + KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_INVERT_LOCK_DEVICE KnxInterfaceObjectProperty = 150 + KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_LOCK_STATE KnxInterfaceObjectProperty = 151 + KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_UNLOCK_STATE KnxInterfaceObjectProperty = 152 + KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_STATE_FOR_SCENE_NUMBER KnxInterfaceObjectProperty = 153 + KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_STORAGE_FUNCTION_FOR_SCENE KnxInterfaceObjectProperty = 154 + KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_BUS_POWER_UP_STATE KnxInterfaceObjectProperty = 155 + KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_BEHAVIOUR_BUS_POWER_UP_2 KnxInterfaceObjectProperty = 156 + KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_ON_DELAY KnxInterfaceObjectProperty = 157 + KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_OFF_DELAY KnxInterfaceObjectProperty = 158 + KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_SWITCH_OFF_BRIGHTNESS_DELAY_TIME KnxInterfaceObjectProperty = 159 + KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_TIMED_ON_DURATION KnxInterfaceObjectProperty = 160 + KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_PREWARNING_DURATION KnxInterfaceObjectProperty = 161 + KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_TRANSMISSION_CYCLE_TIME KnxInterfaceObjectProperty = 162 + KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_BUS_POWER_UP_MESSAGE_DELAY KnxInterfaceObjectProperty = 163 + KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_DIMMING_SPEED KnxInterfaceObjectProperty = 164 + KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_DIMMING_STEP_TIME KnxInterfaceObjectProperty = 165 + KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_DIMMING_SPEED_FOR_SWITCH_ON_SET_VALUE KnxInterfaceObjectProperty = 166 + KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_DIMMING_SPEED_FOR_SWITCH_OFF KnxInterfaceObjectProperty = 167 KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_DIMMING_STEP_TIME_FOR_SWITCH_ON_SET_VALUE KnxInterfaceObjectProperty = 168 - KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_DIMMING_STEP_TIME_FOR_SWITCH_OFF KnxInterfaceObjectProperty = 169 - KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_SWITCFH_OFF_BRIGHTNESS KnxInterfaceObjectProperty = 170 - KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_MINIMUM_SET_VALUE KnxInterfaceObjectProperty = 171 - KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_MAXIMUM_SET_VALUE KnxInterfaceObjectProperty = 172 - KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_SWITCH_ON_SET_VALUE KnxInterfaceObjectProperty = 173 - KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_DIMM_MODE_SELECTION KnxInterfaceObjectProperty = 174 - KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_RELATIV_OFF_ENABLE KnxInterfaceObjectProperty = 175 - KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_MEMORY_FUNCTION KnxInterfaceObjectProperty = 176 - KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_TIMED_ON_RETRIGGER_FUNCTION KnxInterfaceObjectProperty = 177 - KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_MANUAL_OFF_ENABLE KnxInterfaceObjectProperty = 178 - KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_INVERT_LOCK_DEVICE KnxInterfaceObjectProperty = 179 - KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_BEHAVIOUR_AT_LOCKING KnxInterfaceObjectProperty = 180 - KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_BEHAVIOUR_AT_UNLOCKING KnxInterfaceObjectProperty = 181 - KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_LOCK_SETVALUE KnxInterfaceObjectProperty = 182 - KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_UNLOCK_SETVALUE KnxInterfaceObjectProperty = 183 - KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_BIGHTNESS_FOR_SCENE KnxInterfaceObjectProperty = 184 - KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_STORAGE_FUNCTION_FOR_SCENE KnxInterfaceObjectProperty = 185 - KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_DELTA_DIMMING_VALUE KnxInterfaceObjectProperty = 186 - KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_BEHAVIOUR_BUS_POWER_UP KnxInterfaceObjectProperty = 187 - KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_BEHAVIOUR_BUS_POWER_UP_SET_VALUE KnxInterfaceObjectProperty = 188 - KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_BEHAVIOUR_BUS_POWER_DOWN KnxInterfaceObjectProperty = 189 - KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_BUS_POWER_DOWN_SET_VALUE KnxInterfaceObjectProperty = 190 - KnxInterfaceObjectProperty_PID_DIMMING_SENSOR_BASIC_ON_OFF_ACTION KnxInterfaceObjectProperty = 191 - KnxInterfaceObjectProperty_PID_DIMMING_SENSOR_BASIC_ENABLE_TOGGLE_MODE KnxInterfaceObjectProperty = 192 - KnxInterfaceObjectProperty_PID_DIMMING_SENSOR_BASIC_ABSOLUTE_SETVALUE KnxInterfaceObjectProperty = 193 - KnxInterfaceObjectProperty_PID_SWITCHING_SENSOR_BASIC_ON_OFF_ACTION KnxInterfaceObjectProperty = 194 - KnxInterfaceObjectProperty_PID_SWITCHING_SENSOR_BASIC_ENABLE_TOGGLE_MODE KnxInterfaceObjectProperty = 195 - KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_REVERSION_PAUSE_TIME KnxInterfaceObjectProperty = 196 - KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_MOVE_UP_DOWN_TIME KnxInterfaceObjectProperty = 197 - KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_SLAT_STEP_TIME KnxInterfaceObjectProperty = 198 - KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_MOVE_PRESET_POSITION_TIME KnxInterfaceObjectProperty = 199 - KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_MOVE_TO_PRESET_POSITION_IN_PERCENT KnxInterfaceObjectProperty = 200 - KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_MOVE_TO_PRESET_POSITION_LENGTH KnxInterfaceObjectProperty = 201 - KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_PRESET_SLAT_POSITION_PERCENT KnxInterfaceObjectProperty = 202 - KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_PRESET_SLAT_POSITION_ANGLE KnxInterfaceObjectProperty = 203 - KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_REACTION_WIND_ALARM KnxInterfaceObjectProperty = 204 - KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_HEARTBEAT_WIND_ALARM KnxInterfaceObjectProperty = 205 - KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_REACTION_ON_RAIN_ALARM KnxInterfaceObjectProperty = 206 - KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_HEARTBEAT_RAIN_ALARM KnxInterfaceObjectProperty = 207 - KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_REACTION_FROST_ALARM KnxInterfaceObjectProperty = 208 - KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_HEARTBEAT_FROST_ALARM KnxInterfaceObjectProperty = 209 - KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_MAX_SLAT_MOVE_TIME KnxInterfaceObjectProperty = 210 - KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_ENABLE_BLINDS_MODE KnxInterfaceObjectProperty = 211 - KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_STORAGE_FUNCTIONS_FOR_SCENE KnxInterfaceObjectProperty = 212 - KnxInterfaceObjectProperty_PID_SUNBLIND_SENSOR_BASIC_ENABLE_BLINDS_MODE KnxInterfaceObjectProperty = 213 - KnxInterfaceObjectProperty_PID_SUNBLIND_SENSOR_BASIC_UP_DOWN_ACTION KnxInterfaceObjectProperty = 214 - KnxInterfaceObjectProperty_PID_SUNBLIND_SENSOR_BASIC_ENABLE_TOGGLE_MODE KnxInterfaceObjectProperty = 215 + KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_DIMMING_STEP_TIME_FOR_SWITCH_OFF KnxInterfaceObjectProperty = 169 + KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_SWITCFH_OFF_BRIGHTNESS KnxInterfaceObjectProperty = 170 + KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_MINIMUM_SET_VALUE KnxInterfaceObjectProperty = 171 + KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_MAXIMUM_SET_VALUE KnxInterfaceObjectProperty = 172 + KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_SWITCH_ON_SET_VALUE KnxInterfaceObjectProperty = 173 + KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_DIMM_MODE_SELECTION KnxInterfaceObjectProperty = 174 + KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_RELATIV_OFF_ENABLE KnxInterfaceObjectProperty = 175 + KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_MEMORY_FUNCTION KnxInterfaceObjectProperty = 176 + KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_TIMED_ON_RETRIGGER_FUNCTION KnxInterfaceObjectProperty = 177 + KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_MANUAL_OFF_ENABLE KnxInterfaceObjectProperty = 178 + KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_INVERT_LOCK_DEVICE KnxInterfaceObjectProperty = 179 + KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_BEHAVIOUR_AT_LOCKING KnxInterfaceObjectProperty = 180 + KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_BEHAVIOUR_AT_UNLOCKING KnxInterfaceObjectProperty = 181 + KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_LOCK_SETVALUE KnxInterfaceObjectProperty = 182 + KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_UNLOCK_SETVALUE KnxInterfaceObjectProperty = 183 + KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_BIGHTNESS_FOR_SCENE KnxInterfaceObjectProperty = 184 + KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_STORAGE_FUNCTION_FOR_SCENE KnxInterfaceObjectProperty = 185 + KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_DELTA_DIMMING_VALUE KnxInterfaceObjectProperty = 186 + KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_BEHAVIOUR_BUS_POWER_UP KnxInterfaceObjectProperty = 187 + KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_BEHAVIOUR_BUS_POWER_UP_SET_VALUE KnxInterfaceObjectProperty = 188 + KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_BEHAVIOUR_BUS_POWER_DOWN KnxInterfaceObjectProperty = 189 + KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_BUS_POWER_DOWN_SET_VALUE KnxInterfaceObjectProperty = 190 + KnxInterfaceObjectProperty_PID_DIMMING_SENSOR_BASIC_ON_OFF_ACTION KnxInterfaceObjectProperty = 191 + KnxInterfaceObjectProperty_PID_DIMMING_SENSOR_BASIC_ENABLE_TOGGLE_MODE KnxInterfaceObjectProperty = 192 + KnxInterfaceObjectProperty_PID_DIMMING_SENSOR_BASIC_ABSOLUTE_SETVALUE KnxInterfaceObjectProperty = 193 + KnxInterfaceObjectProperty_PID_SWITCHING_SENSOR_BASIC_ON_OFF_ACTION KnxInterfaceObjectProperty = 194 + KnxInterfaceObjectProperty_PID_SWITCHING_SENSOR_BASIC_ENABLE_TOGGLE_MODE KnxInterfaceObjectProperty = 195 + KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_REVERSION_PAUSE_TIME KnxInterfaceObjectProperty = 196 + KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_MOVE_UP_DOWN_TIME KnxInterfaceObjectProperty = 197 + KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_SLAT_STEP_TIME KnxInterfaceObjectProperty = 198 + KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_MOVE_PRESET_POSITION_TIME KnxInterfaceObjectProperty = 199 + KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_MOVE_TO_PRESET_POSITION_IN_PERCENT KnxInterfaceObjectProperty = 200 + KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_MOVE_TO_PRESET_POSITION_LENGTH KnxInterfaceObjectProperty = 201 + KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_PRESET_SLAT_POSITION_PERCENT KnxInterfaceObjectProperty = 202 + KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_PRESET_SLAT_POSITION_ANGLE KnxInterfaceObjectProperty = 203 + KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_REACTION_WIND_ALARM KnxInterfaceObjectProperty = 204 + KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_HEARTBEAT_WIND_ALARM KnxInterfaceObjectProperty = 205 + KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_REACTION_ON_RAIN_ALARM KnxInterfaceObjectProperty = 206 + KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_HEARTBEAT_RAIN_ALARM KnxInterfaceObjectProperty = 207 + KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_REACTION_FROST_ALARM KnxInterfaceObjectProperty = 208 + KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_HEARTBEAT_FROST_ALARM KnxInterfaceObjectProperty = 209 + KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_MAX_SLAT_MOVE_TIME KnxInterfaceObjectProperty = 210 + KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_ENABLE_BLINDS_MODE KnxInterfaceObjectProperty = 211 + KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_STORAGE_FUNCTIONS_FOR_SCENE KnxInterfaceObjectProperty = 212 + KnxInterfaceObjectProperty_PID_SUNBLIND_SENSOR_BASIC_ENABLE_BLINDS_MODE KnxInterfaceObjectProperty = 213 + KnxInterfaceObjectProperty_PID_SUNBLIND_SENSOR_BASIC_UP_DOWN_ACTION KnxInterfaceObjectProperty = 214 + KnxInterfaceObjectProperty_PID_SUNBLIND_SENSOR_BASIC_ENABLE_TOGGLE_MODE KnxInterfaceObjectProperty = 215 ) var KnxInterfaceObjectPropertyValues []KnxInterfaceObjectProperty func init() { _ = errors.New - KnxInterfaceObjectPropertyValues = []KnxInterfaceObjectProperty{ + KnxInterfaceObjectPropertyValues = []KnxInterfaceObjectProperty { KnxInterfaceObjectProperty_PID_UNKNOWN, KnxInterfaceObjectProperty_PID_GENERAL_OBJECT_TYPE, KnxInterfaceObjectProperty_PID_GENERAL_OBJECT_NAME, @@ -481,874 +481,658 @@ func init() { } } + func (e KnxInterfaceObjectProperty) PropertyDataType() KnxPropertyDataType { - switch e { - case 0: - { /* '0' */ + switch e { + case 0: { /* '0' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 1: - { /* '1' */ + case 1: { /* '1' */ return KnxPropertyDataType_PDT_UNSIGNED_INT } - case 10: - { /* '10' */ + case 10: { /* '10' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 100: - { /* '100' */ + case 100: { /* '100' */ return KnxPropertyDataType_PDT_BINARY_INFORMATION } - case 101: - { /* '101' */ + case 101: { /* '101' */ return KnxPropertyDataType_PDT_UNSIGNED_INT } - case 102: - { /* '102' */ + case 102: { /* '102' */ return KnxPropertyDataType_PDT_UNSIGNED_INT } - case 103: - { /* '103' */ + case 103: { /* '103' */ return KnxPropertyDataType_PDT_UNSIGNED_LONG } - case 104: - { /* '104' */ + case 104: { /* '104' */ return KnxPropertyDataType_PDT_UNSIGNED_LONG } - case 105: - { /* '105' */ + case 105: { /* '105' */ return KnxPropertyDataType_PDT_UNSIGNED_CHAR } - case 106: - { /* '106' */ + case 106: { /* '106' */ return KnxPropertyDataType_PDT_GENERIC_16 } - case 107: - { /* '107' */ + case 107: { /* '107' */ return KnxPropertyDataType_PDT_GENERIC_16 } - case 108: - { /* '108' */ + case 108: { /* '108' */ return KnxPropertyDataType_PDT_GENERIC_16 } - case 109: - { /* '109' */ + case 109: { /* '109' */ return KnxPropertyDataType_PDT_FUNCTION } - case 11: - { /* '11' */ + case 11: { /* '11' */ return KnxPropertyDataType_PDT_GENERIC_06 } - case 110: - { /* '110' */ + case 110: { /* '110' */ return KnxPropertyDataType_PDT_UNSIGNED_INT } - case 111: - { /* '111' */ + case 111: { /* '111' */ return KnxPropertyDataType_PDT_SCALING } - case 112: - { /* '112' */ + case 112: { /* '112' */ return KnxPropertyDataType_PDT_GENERIC_02 } - case 113: - { /* '113' */ + case 113: { /* '113' */ return KnxPropertyDataType_PDT_FUNCTION } - case 114: - { /* '114' */ + case 114: { /* '114' */ return KnxPropertyDataType_PDT_GENERIC_18 } - case 115: - { /* '115' */ + case 115: { /* '115' */ return KnxPropertyDataType_PDT_GENERIC_18 } - case 116: - { /* '116' */ + case 116: { /* '116' */ return KnxPropertyDataType_PDT_GENERIC_08 } - case 117: - { /* '117' */ + case 117: { /* '117' */ return KnxPropertyDataType_PDT_FUNCTION } - case 118: - { /* '118' */ + case 118: { /* '118' */ return KnxPropertyDataType_PDT_GENERIC_16 } - case 119: - { /* '119' */ + case 119: { /* '119' */ return KnxPropertyDataType_PDT_BITSET8 } - case 12: - { /* '12' */ + case 12: { /* '12' */ return KnxPropertyDataType_PDT_UNSIGNED_INT } - case 120: - { /* '120' */ + case 120: { /* '120' */ return KnxPropertyDataType_PDT_BINARY_INFORMATION } - case 121: - { /* '121' */ + case 121: { /* '121' */ return KnxPropertyDataType_PDT_GENERIC_06 } - case 122: - { /* '122' */ + case 122: { /* '122' */ return KnxPropertyDataType_PDT_GENERIC_19 } - case 123: - { /* '123' */ + case 123: { /* '123' */ return KnxPropertyDataType_PDT_GENERIC_01 } - case 124: - { /* '124' */ + case 124: { /* '124' */ return KnxPropertyDataType_PDT_GENERIC_01 } - case 125: - { /* '125' */ + case 125: { /* '125' */ return KnxPropertyDataType_PDT_GENERIC_06 } - case 126: - { /* '126' */ + case 126: { /* '126' */ return KnxPropertyDataType_PDT_BINARY_INFORMATION } - case 127: - { /* '127' */ + case 127: { /* '127' */ return KnxPropertyDataType_PDT_BINARY_INFORMATION } - case 128: - { /* '128' */ + case 128: { /* '128' */ return KnxPropertyDataType_PDT_BITSET8 } - case 129: - { /* '129' */ + case 129: { /* '129' */ return KnxPropertyDataType_PDT_FUNCTION } - case 13: - { /* '13' */ + case 13: { /* '13' */ return KnxPropertyDataType_PDT_GENERIC_05 } - case 130: - { /* '130' */ + case 130: { /* '130' */ return KnxPropertyDataType_PDT_GENERIC_03 } - case 131: - { /* '131' */ + case 131: { /* '131' */ return KnxPropertyDataType_PDT_GENERIC_04 } - case 132: - { /* '132' */ + case 132: { /* '132' */ return KnxPropertyDataType_PDT_FUNCTION } - case 133: - { /* '133' */ + case 133: { /* '133' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 134: - { /* '134' */ + case 134: { /* '134' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 135: - { /* '135' */ + case 135: { /* '135' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 136: - { /* '136' */ + case 136: { /* '136' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 137: - { /* '137' */ + case 137: { /* '137' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 138: - { /* '138' */ + case 138: { /* '138' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 139: - { /* '139' */ + case 139: { /* '139' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 14: - { /* '14' */ + case 14: { /* '14' */ return KnxPropertyDataType_PDT_BITSET8 } - case 140: - { /* '140' */ + case 140: { /* '140' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 141: - { /* '141' */ + case 141: { /* '141' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 142: - { /* '142' */ + case 142: { /* '142' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 143: - { /* '143' */ + case 143: { /* '143' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 144: - { /* '144' */ + case 144: { /* '144' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 145: - { /* '145' */ + case 145: { /* '145' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 146: - { /* '146' */ + case 146: { /* '146' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 147: - { /* '147' */ + case 147: { /* '147' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 148: - { /* '148' */ + case 148: { /* '148' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 149: - { /* '149' */ + case 149: { /* '149' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 15: - { /* '15' */ + case 15: { /* '15' */ return KnxPropertyDataType_PDT_GENERIC_10 } - case 150: - { /* '150' */ + case 150: { /* '150' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 151: - { /* '151' */ + case 151: { /* '151' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 152: - { /* '152' */ + case 152: { /* '152' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 153: - { /* '153' */ + case 153: { /* '153' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 154: - { /* '154' */ + case 154: { /* '154' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 155: - { /* '155' */ + case 155: { /* '155' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 156: - { /* '156' */ + case 156: { /* '156' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 157: - { /* '157' */ + case 157: { /* '157' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 158: - { /* '158' */ + case 158: { /* '158' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 159: - { /* '159' */ + case 159: { /* '159' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 16: - { /* '16' */ + case 16: { /* '16' */ return KnxPropertyDataType_PDT_UNSIGNED_CHAR } - case 160: - { /* '160' */ + case 160: { /* '160' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 161: - { /* '161' */ + case 161: { /* '161' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 162: - { /* '162' */ + case 162: { /* '162' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 163: - { /* '163' */ + case 163: { /* '163' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 164: - { /* '164' */ + case 164: { /* '164' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 165: - { /* '165' */ + case 165: { /* '165' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 166: - { /* '166' */ + case 166: { /* '166' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 167: - { /* '167' */ + case 167: { /* '167' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 168: - { /* '168' */ + case 168: { /* '168' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 169: - { /* '169' */ + case 169: { /* '169' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 17: - { /* '17' */ + case 17: { /* '17' */ return KnxPropertyDataType_PDT_UNSIGNED_CHAR } - case 170: - { /* '170' */ + case 170: { /* '170' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 171: - { /* '171' */ + case 171: { /* '171' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 172: - { /* '172' */ + case 172: { /* '172' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 173: - { /* '173' */ + case 173: { /* '173' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 174: - { /* '174' */ + case 174: { /* '174' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 175: - { /* '175' */ + case 175: { /* '175' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 176: - { /* '176' */ + case 176: { /* '176' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 177: - { /* '177' */ + case 177: { /* '177' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 178: - { /* '178' */ + case 178: { /* '178' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 179: - { /* '179' */ + case 179: { /* '179' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 18: - { /* '18' */ + case 18: { /* '18' */ return KnxPropertyDataType_PDT_POLL_GROUP_SETTINGS } - case 180: - { /* '180' */ + case 180: { /* '180' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 181: - { /* '181' */ + case 181: { /* '181' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 182: - { /* '182' */ + case 182: { /* '182' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 183: - { /* '183' */ + case 183: { /* '183' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 184: - { /* '184' */ + case 184: { /* '184' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 185: - { /* '185' */ + case 185: { /* '185' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 186: - { /* '186' */ + case 186: { /* '186' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 187: - { /* '187' */ + case 187: { /* '187' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 188: - { /* '188' */ + case 188: { /* '188' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 189: - { /* '189' */ + case 189: { /* '189' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 19: - { /* '19' */ + case 19: { /* '19' */ return KnxPropertyDataType_PDT_GENERIC_04 } - case 190: - { /* '190' */ + case 190: { /* '190' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 191: - { /* '191' */ + case 191: { /* '191' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 192: - { /* '192' */ + case 192: { /* '192' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 193: - { /* '193' */ + case 193: { /* '193' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 194: - { /* '194' */ + case 194: { /* '194' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 195: - { /* '195' */ + case 195: { /* '195' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 196: - { /* '196' */ + case 196: { /* '196' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 197: - { /* '197' */ + case 197: { /* '197' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 198: - { /* '198' */ + case 198: { /* '198' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 199: - { /* '199' */ + case 199: { /* '199' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 2: - { /* '2' */ + case 2: { /* '2' */ return KnxPropertyDataType_PDT_UNSIGNED_CHAR } - case 20: - { /* '20' */ + case 20: { /* '20' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 200: - { /* '200' */ + case 200: { /* '200' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 201: - { /* '201' */ + case 201: { /* '201' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 202: - { /* '202' */ + case 202: { /* '202' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 203: - { /* '203' */ + case 203: { /* '203' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 204: - { /* '204' */ + case 204: { /* '204' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 205: - { /* '205' */ + case 205: { /* '205' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 206: - { /* '206' */ + case 206: { /* '206' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 207: - { /* '207' */ + case 207: { /* '207' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 208: - { /* '208' */ + case 208: { /* '208' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 209: - { /* '209' */ + case 209: { /* '209' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 21: - { /* '21' */ + case 21: { /* '21' */ return KnxPropertyDataType_PDT_UNSIGNED_CHAR } - case 210: - { /* '210' */ + case 210: { /* '210' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 211: - { /* '211' */ + case 211: { /* '211' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 212: - { /* '212' */ + case 212: { /* '212' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 213: - { /* '213' */ + case 213: { /* '213' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 214: - { /* '214' */ + case 214: { /* '214' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 215: - { /* '215' */ + case 215: { /* '215' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 22: - { /* '22' */ + case 22: { /* '22' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 23: - { /* '23' */ + case 23: { /* '23' */ return KnxPropertyDataType_PDT_UNSIGNED_INT } - case 24: - { /* '24' */ + case 24: { /* '24' */ return KnxPropertyDataType_PDT_FUNCTION } - case 25: - { /* '25' */ + case 25: { /* '25' */ return KnxPropertyDataType_PDT_VERSION } - case 26: - { /* '26' */ + case 26: { /* '26' */ return KnxPropertyDataType_PDT_FUNCTION } - case 27: - { /* '27' */ + case 27: { /* '27' */ return KnxPropertyDataType_PDT_GENERIC_08 } - case 28: - { /* '28' */ + case 28: { /* '28' */ return KnxPropertyDataType_PDT_GENERIC_01 } - case 29: - { /* '29' */ + case 29: { /* '29' */ return KnxPropertyDataType_PDT_UNSIGNED_CHAR } - case 3: - { /* '3' */ + case 3: { /* '3' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 30: - { /* '30' */ + case 30: { /* '30' */ return KnxPropertyDataType_PDT_UNSIGNED_CHAR } - case 31: - { /* '31' */ + case 31: { /* '31' */ return KnxPropertyDataType_PDT_UNSIGNED_CHAR } - case 32: - { /* '32' */ + case 32: { /* '32' */ return KnxPropertyDataType_PDT_GENERIC_01 } - case 33: - { /* '33' */ + case 33: { /* '33' */ return KnxPropertyDataType_PDT_UNSIGNED_CHAR } - case 34: - { /* '34' */ + case 34: { /* '34' */ return KnxPropertyDataType_PDT_BITSET8 } - case 35: - { /* '35' */ + case 35: { /* '35' */ return KnxPropertyDataType_PDT_GENERIC_10 } - case 36: - { /* '36' */ + case 36: { /* '36' */ return KnxPropertyDataType_PDT_UNSIGNED_INT } - case 37: - { /* '37' */ + case 37: { /* '37' */ return KnxPropertyDataType_PDT_UNSIGNED_CHAR } - case 38: - { /* '38' */ + case 38: { /* '38' */ return KnxPropertyDataType_PDT_UNSIGNED_CHAR } - case 39: - { /* '39' */ + case 39: { /* '39' */ return KnxPropertyDataType_PDT_GENERIC_04 } - case 4: - { /* '4' */ + case 4: { /* '4' */ return KnxPropertyDataType_PDT_UNKNOWN } - case 40: - { /* '40' */ + case 40: { /* '40' */ return KnxPropertyDataType_PDT_GENERIC_06 } - case 41: - { /* '41' */ + case 41: { /* '41' */ return KnxPropertyDataType_PDT_GENERIC_01 } - case 42: - { /* '42' */ + case 42: { /* '42' */ return KnxPropertyDataType_PDT_FUNCTION } - case 43: - { /* '43' */ + case 43: { /* '43' */ return KnxPropertyDataType_PDT_FUNCTION } - case 44: - { /* '44' */ + case 44: { /* '44' */ return KnxPropertyDataType_PDT_FUNCTION } - case 45: - { /* '45' */ + case 45: { /* '45' */ return KnxPropertyDataType_PDT_FUNCTION } - case 46: - { /* '46' */ + case 46: { /* '46' */ return KnxPropertyDataType_PDT_FUNCTION } - case 47: - { /* '47' */ + case 47: { /* '47' */ return KnxPropertyDataType_PDT_UNSIGNED_INT } - case 48: - { /* '48' */ + case 48: { /* '48' */ return KnxPropertyDataType_PDT_BINARY_INFORMATION } - case 49: - { /* '49' */ + case 49: { /* '49' */ return KnxPropertyDataType_PDT_ENUM8 } - case 5: - { /* '5' */ + case 5: { /* '5' */ return KnxPropertyDataType_PDT_CONTROL } - case 50: - { /* '50' */ + case 50: { /* '50' */ return KnxPropertyDataType_PDT_UNSIGNED_INT } - case 51: - { /* '51' */ + case 51: { /* '51' */ return KnxPropertyDataType_PDT_UNSIGNED_INT } - case 52: - { /* '52' */ + case 52: { /* '52' */ return KnxPropertyDataType_PDT_GENERIC_10 } - case 53: - { /* '53' */ + case 53: { /* '53' */ return KnxPropertyDataType_PDT_GENERIC_01 } - case 54: - { /* '54' */ + case 54: { /* '54' */ return KnxPropertyDataType_PDT_UNSIGNED_CHAR } - case 55: - { /* '55' */ + case 55: { /* '55' */ return KnxPropertyDataType_PDT_UNSIGNED_CHAR } - case 56: - { /* '56' */ + case 56: { /* '56' */ return KnxPropertyDataType_PDT_UNSIGNED_CHAR } - case 57: - { /* '57' */ + case 57: { /* '57' */ return KnxPropertyDataType_PDT_UNSIGNED_CHAR } - case 58: - { /* '58' */ + case 58: { /* '58' */ return KnxPropertyDataType_PDT_GENERIC_06 } - case 59: - { /* '59' */ + case 59: { /* '59' */ return KnxPropertyDataType_PDT_UNSIGNED_CHAR } - case 6: - { /* '6' */ + case 6: { /* '6' */ return KnxPropertyDataType_PDT_CONTROL } - case 60: - { /* '60' */ + case 60: { /* '60' */ return KnxPropertyDataType_PDT_GENERIC_06 } - case 61: - { /* '61' */ + case 61: { /* '61' */ return KnxPropertyDataType_PDT_UNSIGNED_INT } - case 62: - { /* '62' */ + case 62: { /* '62' */ return KnxPropertyDataType_PDT_GENERIC_06 } - case 63: - { /* '63' */ + case 63: { /* '63' */ return KnxPropertyDataType_PDT_GENERIC_02 } - case 64: - { /* '64' */ + case 64: { /* '64' */ return KnxPropertyDataType_PDT_GENERIC_08 } - case 65: - { /* '65' */ + case 65: { /* '65' */ return KnxPropertyDataType_PDT_UNSIGNED_INT } - case 66: - { /* '66' */ + case 66: { /* '66' */ return KnxPropertyDataType_PDT_UNSIGNED_INT } - case 67: - { /* '67' */ + case 67: { /* '67' */ return KnxPropertyDataType_PDT_GENERIC_06 } - case 68: - { /* '68' */ + case 68: { /* '68' */ return KnxPropertyDataType_PDT_GENERIC_08 } - case 69: - { /* '69' */ + case 69: { /* '69' */ return KnxPropertyDataType_PDT_GENERIC_01 } - case 7: - { /* '7' */ + case 7: { /* '7' */ return KnxPropertyDataType_PDT_UNSIGNED_INT } - case 70: - { /* '70' */ + case 70: { /* '70' */ return KnxPropertyDataType_PDT_GENERIC_01 } - case 71: - { /* '71' */ + case 71: { /* '71' */ return KnxPropertyDataType_PDT_GENERIC_01 } - case 72: - { /* '72' */ + case 72: { /* '72' */ return KnxPropertyDataType_PDT_GENERIC_01 } - case 73: - { /* '73' */ + case 73: { /* '73' */ return KnxPropertyDataType_PDT_GENERIC_01 } - case 74: - { /* '74' */ + case 74: { /* '74' */ return KnxPropertyDataType_PDT_FUNCTION } - case 75: - { /* '75' */ + case 75: { /* '75' */ return KnxPropertyDataType_PDT_GENERIC_01 } - case 76: - { /* '76' */ + case 76: { /* '76' */ return KnxPropertyDataType_PDT_UNSIGNED_INT } - case 77: - { /* '77' */ + case 77: { /* '77' */ return KnxPropertyDataType_PDT_ENUM8 } - case 78: - { /* '78' */ + case 78: { /* '78' */ return KnxPropertyDataType_PDT_BINARY_INFORMATION } - case 79: - { /* '79' */ + case 79: { /* '79' */ return KnxPropertyDataType_PDT_FUNCTION } - case 8: - { /* '8' */ + case 8: { /* '8' */ return KnxPropertyDataType_PDT_UNSIGNED_INT } - case 80: - { /* '80' */ + case 80: { /* '80' */ return KnxPropertyDataType_PDT_UNSIGNED_INT } - case 81: - { /* '81' */ + case 81: { /* '81' */ return KnxPropertyDataType_PDT_UNSIGNED_INT } - case 82: - { /* '82' */ + case 82: { /* '82' */ return KnxPropertyDataType_PDT_UNSIGNED_INT } - case 83: - { /* '83' */ + case 83: { /* '83' */ return KnxPropertyDataType_PDT_UNSIGNED_CHAR } - case 84: - { /* '84' */ + case 84: { /* '84' */ return KnxPropertyDataType_PDT_UNSIGNED_CHAR } - case 85: - { /* '85' */ + case 85: { /* '85' */ return KnxPropertyDataType_PDT_BITSET8 } - case 86: - { /* '86' */ + case 86: { /* '86' */ return KnxPropertyDataType_PDT_UNSIGNED_LONG } - case 87: - { /* '87' */ + case 87: { /* '87' */ return KnxPropertyDataType_PDT_UNSIGNED_LONG } - case 88: - { /* '88' */ + case 88: { /* '88' */ return KnxPropertyDataType_PDT_UNSIGNED_LONG } - case 89: - { /* '89' */ + case 89: { /* '89' */ return KnxPropertyDataType_PDT_UNSIGNED_LONG } - case 9: - { /* '9' */ + case 9: { /* '9' */ return KnxPropertyDataType_PDT_UNSIGNED_CHAR } - case 90: - { /* '90' */ + case 90: { /* '90' */ return KnxPropertyDataType_PDT_UNSIGNED_LONG } - case 91: - { /* '91' */ + case 91: { /* '91' */ return KnxPropertyDataType_PDT_UNSIGNED_LONG } - case 92: - { /* '92' */ + case 92: { /* '92' */ return KnxPropertyDataType_PDT_UNSIGNED_LONG } - case 93: - { /* '93' */ + case 93: { /* '93' */ return KnxPropertyDataType_PDT_GENERIC_06 } - case 94: - { /* '94' */ + case 94: { /* '94' */ return KnxPropertyDataType_PDT_UNSIGNED_LONG } - case 95: - { /* '95' */ + case 95: { /* '95' */ return KnxPropertyDataType_PDT_UNSIGNED_LONG } - case 96: - { /* '96' */ + case 96: { /* '96' */ return KnxPropertyDataType_PDT_UNSIGNED_CHAR } - case 97: - { /* '97' */ + case 97: { /* '97' */ return KnxPropertyDataType_PDT_BITSET16 } - case 98: - { /* '98' */ + case 98: { /* '98' */ return KnxPropertyDataType_PDT_UNSIGNED_CHAR } - case 99: - { /* '99' */ + case 99: { /* '99' */ return KnxPropertyDataType_PDT_UNSIGNED_CHAR } - default: - { + default: { return 0 } } @@ -1364,873 +1148,656 @@ func KnxInterfaceObjectPropertyFirstEnumForFieldPropertyDataType(value KnxProper } func (e KnxInterfaceObjectProperty) Name() string { - switch e { - case 0: - { /* '0' */ - return "Unknown Interface Object Property" + switch e { + case 0: { /* '0' */ + return "Unknown Interface Object Property" } - case 1: - { /* '1' */ - return "Interface Object Type" + case 1: { /* '1' */ + return "Interface Object Type" } - case 10: - { /* '10' */ - return "Services Supported" + case 10: { /* '10' */ + return "Services Supported" } - case 100: - { /* '100' */ - return "" + case 100: { /* '100' */ + return "" } - case 101: - { /* '101' */ - return "" + case 101: { /* '101' */ + return "" } - case 102: - { /* '102' */ - return "" + case 102: { /* '102' */ + return "" } - case 103: - { /* '103' */ - return "" + case 103: { /* '103' */ + return "" } - case 104: - { /* '104' */ - return "" + case 104: { /* '104' */ + return "" } - case 105: - { /* '105' */ - return "" + case 105: { /* '105' */ + return "" } - case 106: - { /* '106' */ - return "" + case 106: { /* '106' */ + return "" } - case 107: - { /* '107' */ - return "" + case 107: { /* '107' */ + return "" } - case 108: - { /* '108' */ - return "" + case 108: { /* '108' */ + return "" } - case 109: - { /* '109' */ - return "" + case 109: { /* '109' */ + return "" } - case 11: - { /* '11' */ - return "KNX Serial Number" + case 11: { /* '11' */ + return "KNX Serial Number" } - case 110: - { /* '110' */ - return "" + case 110: { /* '110' */ + return "" } - case 111: - { /* '111' */ - return "" + case 111: { /* '111' */ + return "" } - case 112: - { /* '112' */ - return "" + case 112: { /* '112' */ + return "" } - case 113: - { /* '113' */ - return "" + case 113: { /* '113' */ + return "" } - case 114: - { /* '114' */ - return "" + case 114: { /* '114' */ + return "" } - case 115: - { /* '115' */ - return "" + case 115: { /* '115' */ + return "" } - case 116: - { /* '116' */ - return "" + case 116: { /* '116' */ + return "" } - case 117: - { /* '117' */ - return "" + case 117: { /* '117' */ + return "" } - case 118: - { /* '118' */ - return "" + case 118: { /* '118' */ + return "" } - case 119: - { /* '119' */ - return "" + case 119: { /* '119' */ + return "" } - case 12: - { /* '12' */ - return "Manufacturer Identifier" + case 12: { /* '12' */ + return "Manufacturer Identifier" } - case 120: - { /* '120' */ - return "" + case 120: { /* '120' */ + return "" } - case 121: - { /* '121' */ - return "" + case 121: { /* '121' */ + return "" } - case 122: - { /* '122' */ - return "" + case 122: { /* '122' */ + return "" } - case 123: - { /* '123' */ - return "" + case 123: { /* '123' */ + return "" } - case 124: - { /* '124' */ - return "" + case 124: { /* '124' */ + return "" } - case 125: - { /* '125' */ - return "" + case 125: { /* '125' */ + return "" } - case 126: - { /* '126' */ - return "" + case 126: { /* '126' */ + return "" } - case 127: - { /* '127' */ - return "" + case 127: { /* '127' */ + return "" } - case 128: - { /* '128' */ - return "" + case 128: { /* '128' */ + return "" } - case 129: - { /* '129' */ - return "" + case 129: { /* '129' */ + return "" } - case 13: - { /* '13' */ - return "Application Version" + case 13: { /* '13' */ + return "Application Version" } - case 130: - { /* '130' */ - return "" + case 130: { /* '130' */ + return "" } - case 131: - { /* '131' */ - return "" + case 131: { /* '131' */ + return "" } - case 132: - { /* '132' */ - return "" + case 132: { /* '132' */ + return "" } - case 133: - { /* '133' */ - return "" + case 133: { /* '133' */ + return "" } - case 134: - { /* '134' */ - return "" + case 134: { /* '134' */ + return "" } - case 135: - { /* '135' */ - return "" + case 135: { /* '135' */ + return "" } - case 136: - { /* '136' */ - return "" + case 136: { /* '136' */ + return "" } - case 137: - { /* '137' */ - return "" + case 137: { /* '137' */ + return "" } - case 138: - { /* '138' */ - return "" + case 138: { /* '138' */ + return "" } - case 139: - { /* '139' */ - return "" + case 139: { /* '139' */ + return "" } - case 14: - { /* '14' */ - return "Device Control" + case 14: { /* '14' */ + return "Device Control" } - case 140: - { /* '140' */ - return "" + case 140: { /* '140' */ + return "" } - case 141: - { /* '141' */ - return "" + case 141: { /* '141' */ + return "" } - case 142: - { /* '142' */ - return "" + case 142: { /* '142' */ + return "" } - case 143: - { /* '143' */ - return "" + case 143: { /* '143' */ + return "" } - case 144: - { /* '144' */ - return "" + case 144: { /* '144' */ + return "" } - case 145: - { /* '145' */ - return "" + case 145: { /* '145' */ + return "" } - case 146: - { /* '146' */ - return "" + case 146: { /* '146' */ + return "" } - case 147: - { /* '147' */ - return "" + case 147: { /* '147' */ + return "" } - case 148: - { /* '148' */ - return "" + case 148: { /* '148' */ + return "" } - case 149: - { /* '149' */ - return "" + case 149: { /* '149' */ + return "" } - case 15: - { /* '15' */ - return "Order Info" + case 15: { /* '15' */ + return "Order Info" } - case 150: - { /* '150' */ - return "" + case 150: { /* '150' */ + return "" } - case 151: - { /* '151' */ - return "" + case 151: { /* '151' */ + return "" } - case 152: - { /* '152' */ - return "" + case 152: { /* '152' */ + return "" } - case 153: - { /* '153' */ - return "" + case 153: { /* '153' */ + return "" } - case 154: - { /* '154' */ - return "" + case 154: { /* '154' */ + return "" } - case 155: - { /* '155' */ - return "" + case 155: { /* '155' */ + return "" } - case 156: - { /* '156' */ - return "" + case 156: { /* '156' */ + return "" } - case 157: - { /* '157' */ - return "" + case 157: { /* '157' */ + return "" } - case 158: - { /* '158' */ - return "" + case 158: { /* '158' */ + return "" } - case 159: - { /* '159' */ - return "" + case 159: { /* '159' */ + return "" } - case 16: - { /* '16' */ - return "PEI Type" + case 16: { /* '16' */ + return "PEI Type" } - case 160: - { /* '160' */ - return "" + case 160: { /* '160' */ + return "" } - case 161: - { /* '161' */ - return "" + case 161: { /* '161' */ + return "" } - case 162: - { /* '162' */ - return "" + case 162: { /* '162' */ + return "" } - case 163: - { /* '163' */ - return "" + case 163: { /* '163' */ + return "" } - case 164: - { /* '164' */ - return "" + case 164: { /* '164' */ + return "" } - case 165: - { /* '165' */ - return "" + case 165: { /* '165' */ + return "" } - case 166: - { /* '166' */ - return "" + case 166: { /* '166' */ + return "" } - case 167: - { /* '167' */ - return "" + case 167: { /* '167' */ + return "" } - case 168: - { /* '168' */ - return "" + case 168: { /* '168' */ + return "" } - case 169: - { /* '169' */ - return "" + case 169: { /* '169' */ + return "" } - case 17: - { /* '17' */ - return "PortADDR" + case 17: { /* '17' */ + return "PortADDR" } - case 170: - { /* '170' */ - return "" + case 170: { /* '170' */ + return "" } - case 171: - { /* '171' */ - return "" + case 171: { /* '171' */ + return "" } - case 172: - { /* '172' */ - return "" + case 172: { /* '172' */ + return "" } - case 173: - { /* '173' */ - return "" + case 173: { /* '173' */ + return "" } - case 174: - { /* '174' */ - return "" + case 174: { /* '174' */ + return "" } - case 175: - { /* '175' */ - return "" + case 175: { /* '175' */ + return "" } - case 176: - { /* '176' */ - return "" + case 176: { /* '176' */ + return "" } - case 177: - { /* '177' */ - return "" + case 177: { /* '177' */ + return "" } - case 178: - { /* '178' */ - return "" + case 178: { /* '178' */ + return "" } - case 179: - { /* '179' */ - return "" + case 179: { /* '179' */ + return "" } - case 18: - { /* '18' */ - return "Polling Group Settings" + case 18: { /* '18' */ + return "Polling Group Settings" } - case 180: - { /* '180' */ - return "" + case 180: { /* '180' */ + return "" } - case 181: - { /* '181' */ - return "" + case 181: { /* '181' */ + return "" } - case 182: - { /* '182' */ - return "" + case 182: { /* '182' */ + return "" } - case 183: - { /* '183' */ - return "" + case 183: { /* '183' */ + return "" } - case 184: - { /* '184' */ - return "" + case 184: { /* '184' */ + return "" } - case 185: - { /* '185' */ - return "" + case 185: { /* '185' */ + return "" } - case 186: - { /* '186' */ - return "" + case 186: { /* '186' */ + return "" } - case 187: - { /* '187' */ - return "" + case 187: { /* '187' */ + return "" } - case 188: - { /* '188' */ - return "" + case 188: { /* '188' */ + return "" } - case 189: - { /* '189' */ - return "" + case 189: { /* '189' */ + return "" } - case 19: - { /* '19' */ - return "Manufacturer Data" + case 19: { /* '19' */ + return "Manufacturer Data" } - case 190: - { /* '190' */ - return "" + case 190: { /* '190' */ + return "" } - case 191: - { /* '191' */ - return "" + case 191: { /* '191' */ + return "" } - case 192: - { /* '192' */ - return "" + case 192: { /* '192' */ + return "" } - case 193: - { /* '193' */ - return "" + case 193: { /* '193' */ + return "" } - case 194: - { /* '194' */ - return "" + case 194: { /* '194' */ + return "" } - case 195: - { /* '195' */ - return "" + case 195: { /* '195' */ + return "" } - case 196: - { /* '196' */ - return "" + case 196: { /* '196' */ + return "" } - case 197: - { /* '197' */ - return "" + case 197: { /* '197' */ + return "" } - case 198: - { /* '198' */ - return "" + case 198: { /* '198' */ + return "" } - case 199: - { /* '199' */ - return "" + case 199: { /* '199' */ + return "" } - case 2: - { /* '2' */ - return "Interface Object Name" + case 2: { /* '2' */ + return "Interface Object Name" } - case 20: - { /* '20' */ - return "" + case 20: { /* '20' */ + return "" } - case 200: - { /* '200' */ - return "" + case 200: { /* '200' */ + return "" } - case 201: - { /* '201' */ - return "" + case 201: { /* '201' */ + return "" } - case 202: - { /* '202' */ - return "" + case 202: { /* '202' */ + return "" } - case 203: - { /* '203' */ - return "" + case 203: { /* '203' */ + return "" } - case 204: - { /* '204' */ - return "" + case 204: { /* '204' */ + return "" } - case 205: - { /* '205' */ - return "" + case 205: { /* '205' */ + return "" } - case 206: - { /* '206' */ - return "" + case 206: { /* '206' */ + return "" } - case 207: - { /* '207' */ - return "" + case 207: { /* '207' */ + return "" } - case 208: - { /* '208' */ - return "" + case 208: { /* '208' */ + return "" } - case 209: - { /* '209' */ - return "" + case 209: { /* '209' */ + return "" } - case 21: - { /* '21' */ - return "Description" + case 21: { /* '21' */ + return "Description" } - case 210: - { /* '210' */ - return "" + case 210: { /* '210' */ + return "" } - case 211: - { /* '211' */ - return "" + case 211: { /* '211' */ + return "" } - case 212: - { /* '212' */ - return "" + case 212: { /* '212' */ + return "" } - case 213: - { /* '213' */ - return "" + case 213: { /* '213' */ + return "" } - case 214: - { /* '214' */ - return "" + case 214: { /* '214' */ + return "" } - case 215: - { /* '215' */ - return "" + case 215: { /* '215' */ + return "" } - case 22: - { /* '22' */ - return "" + case 22: { /* '22' */ + return "" } - case 23: - { /* '23' */ - return "Table" + case 23: { /* '23' */ + return "Table" } - case 24: - { /* '24' */ - return "Interface Object Link" + case 24: { /* '24' */ + return "Interface Object Link" } - case 25: - { /* '25' */ - return "Version" + case 25: { /* '25' */ + return "Version" } - case 26: - { /* '26' */ - return "Group Address Assignment" + case 26: { /* '26' */ + return "Group Address Assignment" } - case 27: - { /* '27' */ - return "Memory Control Table" + case 27: { /* '27' */ + return "Memory Control Table" } - case 28: - { /* '28' */ - return "Error Code" + case 28: { /* '28' */ + return "Error Code" } - case 29: - { /* '29' */ - return "Object Index" + case 29: { /* '29' */ + return "Object Index" } - case 3: - { /* '3' */ - return "Semaphor" + case 3: { /* '3' */ + return "Semaphor" } - case 30: - { /* '30' */ - return "Download Counter" + case 30: { /* '30' */ + return "Download Counter" } - case 31: - { /* '31' */ - return "Routing Count" + case 31: { /* '31' */ + return "Routing Count" } - case 32: - { /* '32' */ - return "Maximum Retry Count" + case 32: { /* '32' */ + return "Maximum Retry Count" } - case 33: - { /* '33' */ - return "Error Flags" + case 33: { /* '33' */ + return "Error Flags" } - case 34: - { /* '34' */ - return "Programming Mode" + case 34: { /* '34' */ + return "Programming Mode" } - case 35: - { /* '35' */ - return "Product Identification" + case 35: { /* '35' */ + return "Product Identification" } - case 36: - { /* '36' */ - return "Max. APDU-Length" + case 36: { /* '36' */ + return "Max. APDU-Length" } - case 37: - { /* '37' */ - return "Subnetwork Address" + case 37: { /* '37' */ + return "Subnetwork Address" } - case 38: - { /* '38' */ - return "Device Address" + case 38: { /* '38' */ + return "Device Address" } - case 39: - { /* '39' */ - return "Config Link" + case 39: { /* '39' */ + return "Config Link" } - case 4: - { /* '4' */ - return "Group Object Reference" + case 4: { /* '4' */ + return "Group Object Reference" } - case 40: - { /* '40' */ - return "" + case 40: { /* '40' */ + return "" } - case 41: - { /* '41' */ - return "" + case 41: { /* '41' */ + return "" } - case 42: - { /* '42' */ - return "" + case 42: { /* '42' */ + return "" } - case 43: - { /* '43' */ - return "" + case 43: { /* '43' */ + return "" } - case 44: - { /* '44' */ - return "" + case 44: { /* '44' */ + return "" } - case 45: - { /* '45' */ - return "" + case 45: { /* '45' */ + return "" } - case 46: - { /* '46' */ - return "" + case 46: { /* '46' */ + return "" } - case 47: - { /* '47' */ - return "" + case 47: { /* '47' */ + return "" } - case 48: - { /* '48' */ - return "" + case 48: { /* '48' */ + return "" } - case 49: - { /* '49' */ - return "" + case 49: { /* '49' */ + return "" } - case 5: - { /* '5' */ - return "Load Control" + case 5: { /* '5' */ + return "Load Control" } - case 50: - { /* '50' */ - return "Domain Address" + case 50: { /* '50' */ + return "Domain Address" } - case 51: - { /* '51' */ - return "" + case 51: { /* '51' */ + return "" } - case 52: - { /* '52' */ - return "Management Descriptor 1" + case 52: { /* '52' */ + return "Management Descriptor 1" } - case 53: - { /* '53' */ - return "PL110 Parameters" + case 53: { /* '53' */ + return "PL110 Parameters" } - case 54: - { /* '54' */ - return "" + case 54: { /* '54' */ + return "" } - case 55: - { /* '55' */ - return "" + case 55: { /* '55' */ + return "" } - case 56: - { /* '56' */ - return "" + case 56: { /* '56' */ + return "" } - case 57: - { /* '57' */ - return "" + case 57: { /* '57' */ + return "" } - case 58: - { /* '58' */ - return "Hardware Type" + case 58: { /* '58' */ + return "Hardware Type" } - case 59: - { /* '59' */ - return "" + case 59: { /* '59' */ + return "" } - case 6: - { /* '6' */ - return "Run Control" + case 6: { /* '6' */ + return "Run Control" } - case 60: - { /* '60' */ - return "" + case 60: { /* '60' */ + return "" } - case 61: - { /* '61' */ - return "" + case 61: { /* '61' */ + return "" } - case 62: - { /* '62' */ - return "RF Domain Address" + case 62: { /* '62' */ + return "RF Domain Address" } - case 63: - { /* '63' */ - return "" + case 63: { /* '63' */ + return "" } - case 64: - { /* '64' */ - return "" + case 64: { /* '64' */ + return "" } - case 65: - { /* '65' */ - return "" + case 65: { /* '65' */ + return "" } - case 66: - { /* '66' */ - return "" + case 66: { /* '66' */ + return "" } - case 67: - { /* '67' */ - return "" + case 67: { /* '67' */ + return "" } - case 68: - { /* '68' */ - return "" + case 68: { /* '68' */ + return "" } - case 69: - { /* '69' */ - return "" + case 69: { /* '69' */ + return "" } - case 7: - { /* '7' */ - return "Table Reference" + case 7: { /* '7' */ + return "Table Reference" } - case 70: - { /* '70' */ - return "" + case 70: { /* '70' */ + return "" } - case 71: - { /* '71' */ - return "" + case 71: { /* '71' */ + return "" } - case 72: - { /* '72' */ - return "" + case 72: { /* '72' */ + return "" } - case 73: - { /* '73' */ - return "" + case 73: { /* '73' */ + return "" } - case 74: - { /* '74' */ - return "" + case 74: { /* '74' */ + return "" } - case 75: - { /* '75' */ - return "" + case 75: { /* '75' */ + return "" } - case 76: - { /* '76' */ - return "" + case 76: { /* '76' */ + return "" } - case 77: - { /* '77' */ - return "" + case 77: { /* '77' */ + return "" } - case 78: - { /* '78' */ - return "" + case 78: { /* '78' */ + return "" } - case 79: - { /* '79' */ - return "" + case 79: { /* '79' */ + return "" } - case 8: - { /* '8' */ - return "Service Control" + case 8: { /* '8' */ + return "Service Control" } - case 80: - { /* '80' */ - return "Project Installation Identification" + case 80: { /* '80' */ + return "Project Installation Identification" } - case 81: - { /* '81' */ - return "KNX Individual Address" + case 81: { /* '81' */ + return "KNX Individual Address" } - case 82: - { /* '82' */ - return "Additional Individual Addresses" + case 82: { /* '82' */ + return "Additional Individual Addresses" } - case 83: - { /* '83' */ - return "" + case 83: { /* '83' */ + return "" } - case 84: - { /* '84' */ - return "" + case 84: { /* '84' */ + return "" } - case 85: - { /* '85' */ - return "" + case 85: { /* '85' */ + return "" } - case 86: - { /* '86' */ - return "" + case 86: { /* '86' */ + return "" } - case 87: - { /* '87' */ - return "" + case 87: { /* '87' */ + return "" } - case 88: - { /* '88' */ - return "" + case 88: { /* '88' */ + return "" } - case 89: - { /* '89' */ - return "" + case 89: { /* '89' */ + return "" } - case 9: - { /* '9' */ - return "Firmware Revision" + case 9: { /* '9' */ + return "Firmware Revision" } - case 90: - { /* '90' */ - return "" + case 90: { /* '90' */ + return "" } - case 91: - { /* '91' */ - return "" + case 91: { /* '91' */ + return "" } - case 92: - { /* '92' */ - return "" + case 92: { /* '92' */ + return "" } - case 93: - { /* '93' */ - return "" + case 93: { /* '93' */ + return "" } - case 94: - { /* '94' */ - return "" + case 94: { /* '94' */ + return "" } - case 95: - { /* '95' */ - return "" + case 95: { /* '95' */ + return "" } - case 96: - { /* '96' */ - return "" + case 96: { /* '96' */ + return "" } - case 97: - { /* '97' */ - return "" + case 97: { /* '97' */ + return "" } - case 98: - { /* '98' */ - return "" + case 98: { /* '98' */ + return "" } - case 99: - { /* '99' */ - return "" + case 99: { /* '99' */ + return "" } - default: - { + default: { return "" } } @@ -2246,873 +1813,656 @@ func KnxInterfaceObjectPropertyFirstEnumForFieldName(value string) (KnxInterface } func (e KnxInterfaceObjectProperty) PropertyId() uint8 { - switch e { - case 0: - { /* '0' */ - return 0 + switch e { + case 0: { /* '0' */ + return 0 } - case 1: - { /* '1' */ - return 1 + case 1: { /* '1' */ + return 1 } - case 10: - { /* '10' */ - return 10 + case 10: { /* '10' */ + return 10 } - case 100: - { /* '100' */ - return 71 + case 100: { /* '100' */ + return 71 } - case 101: - { /* '101' */ - return 72 + case 101: { /* '101' */ + return 72 } - case 102: - { /* '102' */ - return 73 + case 102: { /* '102' */ + return 73 } - case 103: - { /* '103' */ - return 74 + case 103: { /* '103' */ + return 74 } - case 104: - { /* '104' */ - return 75 + case 104: { /* '104' */ + return 75 } - case 105: - { /* '105' */ - return 76 + case 105: { /* '105' */ + return 76 } - case 106: - { /* '106' */ - return 91 + case 106: { /* '106' */ + return 91 } - case 107: - { /* '107' */ - return 92 + case 107: { /* '107' */ + return 92 } - case 108: - { /* '108' */ - return 93 + case 108: { /* '108' */ + return 93 } - case 109: - { /* '109' */ - return 94 + case 109: { /* '109' */ + return 94 } - case 11: - { /* '11' */ - return 11 + case 11: { /* '11' */ + return 11 } - case 110: - { /* '110' */ - return 95 + case 110: { /* '110' */ + return 95 } - case 111: - { /* '111' */ - return 96 + case 111: { /* '111' */ + return 96 } - case 112: - { /* '112' */ - return 97 + case 112: { /* '112' */ + return 97 } - case 113: - { /* '113' */ - return 51 + case 113: { /* '113' */ + return 51 } - case 114: - { /* '114' */ - return 52 + case 114: { /* '114' */ + return 52 } - case 115: - { /* '115' */ - return 53 + case 115: { /* '115' */ + return 53 } - case 116: - { /* '116' */ - return 54 + case 116: { /* '116' */ + return 54 } - case 117: - { /* '117' */ - return 55 + case 117: { /* '117' */ + return 55 } - case 118: - { /* '118' */ - return 56 + case 118: { /* '118' */ + return 56 } - case 119: - { /* '119' */ - return 57 + case 119: { /* '119' */ + return 57 } - case 12: - { /* '12' */ - return 12 + case 12: { /* '12' */ + return 12 } - case 120: - { /* '120' */ - return 58 + case 120: { /* '120' */ + return 58 } - case 121: - { /* '121' */ - return 59 + case 121: { /* '121' */ + return 59 } - case 122: - { /* '122' */ - return 60 + case 122: { /* '122' */ + return 60 } - case 123: - { /* '123' */ - return 61 + case 123: { /* '123' */ + return 61 } - case 124: - { /* '124' */ - return 51 + case 124: { /* '124' */ + return 51 } - case 125: - { /* '125' */ - return 56 + case 125: { /* '125' */ + return 56 } - case 126: - { /* '126' */ - return 57 + case 126: { /* '126' */ + return 57 } - case 127: - { /* '127' */ - return 58 + case 127: { /* '127' */ + return 58 } - case 128: - { /* '128' */ - return 59 + case 128: { /* '128' */ + return 59 } - case 129: - { /* '129' */ - return 60 + case 129: { /* '129' */ + return 60 } - case 13: - { /* '13' */ - return 13 + case 13: { /* '13' */ + return 13 } - case 130: - { /* '130' */ - return 61 + case 130: { /* '130' */ + return 61 } - case 131: - { /* '131' */ - return 62 + case 131: { /* '131' */ + return 62 } - case 132: - { /* '132' */ - return 63 + case 132: { /* '132' */ + return 63 } - case 133: - { /* '133' */ - return 110 + case 133: { /* '133' */ + return 110 } - case 134: - { /* '134' */ - return 111 + case 134: { /* '134' */ + return 111 } - case 135: - { /* '135' */ - return 110 + case 135: { /* '135' */ + return 110 } - case 136: - { /* '136' */ - return 111 + case 136: { /* '136' */ + return 111 } - case 137: - { /* '137' */ - return 101 + case 137: { /* '137' */ + return 101 } - case 138: - { /* '138' */ - return 102 + case 138: { /* '138' */ + return 102 } - case 139: - { /* '139' */ - return 103 + case 139: { /* '139' */ + return 103 } - case 14: - { /* '14' */ - return 14 + case 14: { /* '14' */ + return 14 } - case 140: - { /* '140' */ - return 104 + case 140: { /* '140' */ + return 104 } - case 141: - { /* '141' */ - return 105 + case 141: { /* '141' */ + return 105 } - case 142: - { /* '142' */ - return 106 + case 142: { /* '142' */ + return 106 } - case 143: - { /* '143' */ - return 107 + case 143: { /* '143' */ + return 107 } - case 144: - { /* '144' */ - return 108 + case 144: { /* '144' */ + return 108 } - case 145: - { /* '145' */ - return 109 + case 145: { /* '145' */ + return 109 } - case 146: - { /* '146' */ - return 110 + case 146: { /* '146' */ + return 110 } - case 147: - { /* '147' */ - return 111 + case 147: { /* '147' */ + return 111 } - case 148: - { /* '148' */ - return 112 + case 148: { /* '148' */ + return 112 } - case 149: - { /* '149' */ - return 113 + case 149: { /* '149' */ + return 113 } - case 15: - { /* '15' */ - return 15 + case 15: { /* '15' */ + return 15 } - case 150: - { /* '150' */ - return 114 + case 150: { /* '150' */ + return 114 } - case 151: - { /* '151' */ - return 115 + case 151: { /* '151' */ + return 115 } - case 152: - { /* '152' */ - return 116 + case 152: { /* '152' */ + return 116 } - case 153: - { /* '153' */ - return 117 + case 153: { /* '153' */ + return 117 } - case 154: - { /* '154' */ - return 118 + case 154: { /* '154' */ + return 118 } - case 155: - { /* '155' */ - return 119 + case 155: { /* '155' */ + return 119 } - case 156: - { /* '156' */ - return 120 + case 156: { /* '156' */ + return 120 } - case 157: - { /* '157' */ - return 101 + case 157: { /* '157' */ + return 101 } - case 158: - { /* '158' */ - return 102 + case 158: { /* '158' */ + return 102 } - case 159: - { /* '159' */ - return 103 + case 159: { /* '159' */ + return 103 } - case 16: - { /* '16' */ - return 16 + case 16: { /* '16' */ + return 16 } - case 160: - { /* '160' */ - return 104 + case 160: { /* '160' */ + return 104 } - case 161: - { /* '161' */ - return 105 + case 161: { /* '161' */ + return 105 } - case 162: - { /* '162' */ - return 106 + case 162: { /* '162' */ + return 106 } - case 163: - { /* '163' */ - return 107 + case 163: { /* '163' */ + return 107 } - case 164: - { /* '164' */ - return 108 + case 164: { /* '164' */ + return 108 } - case 165: - { /* '165' */ - return 109 + case 165: { /* '165' */ + return 109 } - case 166: - { /* '166' */ - return 110 + case 166: { /* '166' */ + return 110 } - case 167: - { /* '167' */ - return 111 + case 167: { /* '167' */ + return 111 } - case 168: - { /* '168' */ - return 112 + case 168: { /* '168' */ + return 112 } - case 169: - { /* '169' */ - return 113 + case 169: { /* '169' */ + return 113 } - case 17: - { /* '17' */ - return 17 + case 17: { /* '17' */ + return 17 } - case 170: - { /* '170' */ - return 114 + case 170: { /* '170' */ + return 114 } - case 171: - { /* '171' */ - return 115 + case 171: { /* '171' */ + return 115 } - case 172: - { /* '172' */ - return 116 + case 172: { /* '172' */ + return 116 } - case 173: - { /* '173' */ - return 117 + case 173: { /* '173' */ + return 117 } - case 174: - { /* '174' */ - return 118 + case 174: { /* '174' */ + return 118 } - case 175: - { /* '175' */ - return 119 + case 175: { /* '175' */ + return 119 } - case 176: - { /* '176' */ - return 120 + case 176: { /* '176' */ + return 120 } - case 177: - { /* '177' */ - return 121 + case 177: { /* '177' */ + return 121 } - case 178: - { /* '178' */ - return 122 + case 178: { /* '178' */ + return 122 } - case 179: - { /* '179' */ - return 123 + case 179: { /* '179' */ + return 123 } - case 18: - { /* '18' */ - return 18 + case 18: { /* '18' */ + return 18 } - case 180: - { /* '180' */ - return 124 + case 180: { /* '180' */ + return 124 } - case 181: - { /* '181' */ - return 125 + case 181: { /* '181' */ + return 125 } - case 182: - { /* '182' */ - return 126 + case 182: { /* '182' */ + return 126 } - case 183: - { /* '183' */ - return 127 + case 183: { /* '183' */ + return 127 } - case 184: - { /* '184' */ - return 128 + case 184: { /* '184' */ + return 128 } - case 185: - { /* '185' */ - return 129 + case 185: { /* '185' */ + return 129 } - case 186: - { /* '186' */ - return 130 + case 186: { /* '186' */ + return 130 } - case 187: - { /* '187' */ - return 131 + case 187: { /* '187' */ + return 131 } - case 188: - { /* '188' */ - return 132 + case 188: { /* '188' */ + return 132 } - case 189: - { /* '189' */ - return 133 + case 189: { /* '189' */ + return 133 } - case 19: - { /* '19' */ - return 19 + case 19: { /* '19' */ + return 19 } - case 190: - { /* '190' */ - return 134 + case 190: { /* '190' */ + return 134 } - case 191: - { /* '191' */ - return 51 + case 191: { /* '191' */ + return 51 } - case 192: - { /* '192' */ - return 52 + case 192: { /* '192' */ + return 52 } - case 193: - { /* '193' */ - return 53 + case 193: { /* '193' */ + return 53 } - case 194: - { /* '194' */ - return 51 + case 194: { /* '194' */ + return 51 } - case 195: - { /* '195' */ - return 52 + case 195: { /* '195' */ + return 52 } - case 196: - { /* '196' */ - return 51 + case 196: { /* '196' */ + return 51 } - case 197: - { /* '197' */ - return 52 + case 197: { /* '197' */ + return 52 } - case 198: - { /* '198' */ - return 53 + case 198: { /* '198' */ + return 53 } - case 199: - { /* '199' */ - return 54 + case 199: { /* '199' */ + return 54 } - case 2: - { /* '2' */ - return 2 + case 2: { /* '2' */ + return 2 } - case 20: - { /* '20' */ - return 20 + case 20: { /* '20' */ + return 20 } - case 200: - { /* '200' */ - return 55 + case 200: { /* '200' */ + return 55 } - case 201: - { /* '201' */ - return 57 + case 201: { /* '201' */ + return 57 } - case 202: - { /* '202' */ - return 58 + case 202: { /* '202' */ + return 58 } - case 203: - { /* '203' */ - return 60 + case 203: { /* '203' */ + return 60 } - case 204: - { /* '204' */ - return 61 + case 204: { /* '204' */ + return 61 } - case 205: - { /* '205' */ - return 62 + case 205: { /* '205' */ + return 62 } - case 206: - { /* '206' */ - return 63 + case 206: { /* '206' */ + return 63 } - case 207: - { /* '207' */ - return 64 + case 207: { /* '207' */ + return 64 } - case 208: - { /* '208' */ - return 65 + case 208: { /* '208' */ + return 65 } - case 209: - { /* '209' */ - return 66 + case 209: { /* '209' */ + return 66 } - case 21: - { /* '21' */ - return 21 + case 21: { /* '21' */ + return 21 } - case 210: - { /* '210' */ - return 67 + case 210: { /* '210' */ + return 67 } - case 211: - { /* '211' */ - return 68 + case 211: { /* '211' */ + return 68 } - case 212: - { /* '212' */ - return 69 + case 212: { /* '212' */ + return 69 } - case 213: - { /* '213' */ - return 51 + case 213: { /* '213' */ + return 51 } - case 214: - { /* '214' */ - return 52 + case 214: { /* '214' */ + return 52 } - case 215: - { /* '215' */ - return 53 + case 215: { /* '215' */ + return 53 } - case 22: - { /* '22' */ - return 22 + case 22: { /* '22' */ + return 22 } - case 23: - { /* '23' */ - return 23 + case 23: { /* '23' */ + return 23 } - case 24: - { /* '24' */ - return 24 + case 24: { /* '24' */ + return 24 } - case 25: - { /* '25' */ - return 25 + case 25: { /* '25' */ + return 25 } - case 26: - { /* '26' */ - return 26 + case 26: { /* '26' */ + return 26 } - case 27: - { /* '27' */ - return 27 + case 27: { /* '27' */ + return 27 } - case 28: - { /* '28' */ - return 28 + case 28: { /* '28' */ + return 28 } - case 29: - { /* '29' */ - return 29 + case 29: { /* '29' */ + return 29 } - case 3: - { /* '3' */ - return 3 + case 3: { /* '3' */ + return 3 } - case 30: - { /* '30' */ - return 30 + case 30: { /* '30' */ + return 30 } - case 31: - { /* '31' */ - return 51 + case 31: { /* '31' */ + return 51 } - case 32: - { /* '32' */ - return 52 + case 32: { /* '32' */ + return 52 } - case 33: - { /* '33' */ - return 53 + case 33: { /* '33' */ + return 53 } - case 34: - { /* '34' */ - return 54 + case 34: { /* '34' */ + return 54 } - case 35: - { /* '35' */ - return 55 + case 35: { /* '35' */ + return 55 } - case 36: - { /* '36' */ - return 56 + case 36: { /* '36' */ + return 56 } - case 37: - { /* '37' */ - return 57 + case 37: { /* '37' */ + return 57 } - case 38: - { /* '38' */ - return 58 + case 38: { /* '38' */ + return 58 } - case 39: - { /* '39' */ - return 59 + case 39: { /* '39' */ + return 59 } - case 4: - { /* '4' */ - return 4 + case 4: { /* '4' */ + return 4 } - case 40: - { /* '40' */ - return 60 + case 40: { /* '40' */ + return 60 } - case 41: - { /* '41' */ - return 61 + case 41: { /* '41' */ + return 61 } - case 42: - { /* '42' */ - return 62 + case 42: { /* '42' */ + return 62 } - case 43: - { /* '43' */ - return 63 + case 43: { /* '43' */ + return 63 } - case 44: - { /* '44' */ - return 64 + case 44: { /* '44' */ + return 64 } - case 45: - { /* '45' */ - return 65 + case 45: { /* '45' */ + return 65 } - case 46: - { /* '46' */ - return 66 + case 46: { /* '46' */ + return 66 } - case 47: - { /* '47' */ - return 67 + case 47: { /* '47' */ + return 67 } - case 48: - { /* '48' */ - return 68 + case 48: { /* '48' */ + return 68 } - case 49: - { /* '49' */ - return 69 + case 49: { /* '49' */ + return 69 } - case 5: - { /* '5' */ - return 5 + case 5: { /* '5' */ + return 5 } - case 50: - { /* '50' */ - return 70 + case 50: { /* '50' */ + return 70 } - case 51: - { /* '51' */ - return 71 + case 51: { /* '51' */ + return 71 } - case 52: - { /* '52' */ - return 72 + case 52: { /* '52' */ + return 72 } - case 53: - { /* '53' */ - return 73 + case 53: { /* '53' */ + return 73 } - case 54: - { /* '54' */ - return 74 + case 54: { /* '54' */ + return 74 } - case 55: - { /* '55' */ - return 75 + case 55: { /* '55' */ + return 75 } - case 56: - { /* '56' */ - return 76 + case 56: { /* '56' */ + return 76 } - case 57: - { /* '57' */ - return 77 + case 57: { /* '57' */ + return 77 } - case 58: - { /* '58' */ - return 78 + case 58: { /* '58' */ + return 78 } - case 59: - { /* '59' */ - return 79 + case 59: { /* '59' */ + return 79 } - case 6: - { /* '6' */ - return 6 + case 6: { /* '6' */ + return 6 } - case 60: - { /* '60' */ - return 80 + case 60: { /* '60' */ + return 80 } - case 61: - { /* '61' */ - return 81 + case 61: { /* '61' */ + return 81 } - case 62: - { /* '62' */ - return 82 + case 62: { /* '62' */ + return 82 } - case 63: - { /* '63' */ - return 83 + case 63: { /* '63' */ + return 83 } - case 64: - { /* '64' */ - return 84 + case 64: { /* '64' */ + return 84 } - case 65: - { /* '65' */ - return 85 + case 65: { /* '65' */ + return 85 } - case 66: - { /* '66' */ - return 86 + case 66: { /* '66' */ + return 86 } - case 67: - { /* '67' */ - return 51 + case 67: { /* '67' */ + return 51 } - case 68: - { /* '68' */ - return 52 + case 68: { /* '68' */ + return 52 } - case 69: - { /* '69' */ - return 51 + case 69: { /* '69' */ + return 51 } - case 7: - { /* '7' */ - return 7 + case 7: { /* '7' */ + return 7 } - case 70: - { /* '70' */ - return 52 + case 70: { /* '70' */ + return 52 } - case 71: - { /* '71' */ - return 53 + case 71: { /* '71' */ + return 53 } - case 72: - { /* '72' */ - return 54 + case 72: { /* '72' */ + return 54 } - case 73: - { /* '73' */ - return 55 + case 73: { /* '73' */ + return 55 } - case 74: - { /* '74' */ - return 56 + case 74: { /* '74' */ + return 56 } - case 75: - { /* '75' */ - return 57 + case 75: { /* '75' */ + return 57 } - case 76: - { /* '76' */ - return 58 + case 76: { /* '76' */ + return 58 } - case 77: - { /* '77' */ - return 63 + case 77: { /* '77' */ + return 63 } - case 78: - { /* '78' */ - return 67 + case 78: { /* '78' */ + return 67 } - case 79: - { /* '79' */ - return 112 + case 79: { /* '79' */ + return 112 } - case 8: - { /* '8' */ - return 8 + case 8: { /* '8' */ + return 8 } - case 80: - { /* '80' */ - return 51 + case 80: { /* '80' */ + return 51 } - case 81: - { /* '81' */ - return 52 + case 81: { /* '81' */ + return 52 } - case 82: - { /* '82' */ - return 53 + case 82: { /* '82' */ + return 53 } - case 83: - { /* '83' */ - return 54 + case 83: { /* '83' */ + return 54 } - case 84: - { /* '84' */ - return 55 + case 84: { /* '84' */ + return 55 } - case 85: - { /* '85' */ - return 56 + case 85: { /* '85' */ + return 56 } - case 86: - { /* '86' */ - return 57 + case 86: { /* '86' */ + return 57 } - case 87: - { /* '87' */ - return 58 + case 87: { /* '87' */ + return 58 } - case 88: - { /* '88' */ - return 59 + case 88: { /* '88' */ + return 59 } - case 89: - { /* '89' */ - return 60 + case 89: { /* '89' */ + return 60 } - case 9: - { /* '9' */ - return 9 + case 9: { /* '9' */ + return 9 } - case 90: - { /* '90' */ - return 61 + case 90: { /* '90' */ + return 61 } - case 91: - { /* '91' */ - return 62 + case 91: { /* '91' */ + return 62 } - case 92: - { /* '92' */ - return 63 + case 92: { /* '92' */ + return 63 } - case 93: - { /* '93' */ - return 64 + case 93: { /* '93' */ + return 64 } - case 94: - { /* '94' */ - return 65 + case 94: { /* '94' */ + return 65 } - case 95: - { /* '95' */ - return 66 + case 95: { /* '95' */ + return 66 } - case 96: - { /* '96' */ - return 67 + case 96: { /* '96' */ + return 67 } - case 97: - { /* '97' */ - return 68 + case 97: { /* '97' */ + return 68 } - case 98: - { /* '98' */ - return 69 + case 98: { /* '98' */ + return 69 } - case 99: - { /* '99' */ - return 70 + case 99: { /* '99' */ + return 70 } - default: - { + default: { return 0 } } @@ -3128,873 +2478,656 @@ func KnxInterfaceObjectPropertyFirstEnumForFieldPropertyId(value uint8) (KnxInte } func (e KnxInterfaceObjectProperty) ObjectType() KnxInterfaceObjectType { - switch e { - case 0: - { /* '0' */ + switch e { + case 0: { /* '0' */ return KnxInterfaceObjectType_OT_UNKNOWN } - case 1: - { /* '1' */ + case 1: { /* '1' */ return KnxInterfaceObjectType_OT_GENERAL } - case 10: - { /* '10' */ + case 10: { /* '10' */ return KnxInterfaceObjectType_OT_GENERAL } - case 100: - { /* '100' */ + case 100: { /* '100' */ return KnxInterfaceObjectType_OT_KNXIP_PARAMETER } - case 101: - { /* '101' */ + case 101: { /* '101' */ return KnxInterfaceObjectType_OT_KNXIP_PARAMETER } - case 102: - { /* '102' */ + case 102: { /* '102' */ return KnxInterfaceObjectType_OT_KNXIP_PARAMETER } - case 103: - { /* '103' */ + case 103: { /* '103' */ return KnxInterfaceObjectType_OT_KNXIP_PARAMETER } - case 104: - { /* '104' */ + case 104: { /* '104' */ return KnxInterfaceObjectType_OT_KNXIP_PARAMETER } - case 105: - { /* '105' */ + case 105: { /* '105' */ return KnxInterfaceObjectType_OT_KNXIP_PARAMETER } - case 106: - { /* '106' */ + case 106: { /* '106' */ return KnxInterfaceObjectType_OT_KNXIP_PARAMETER } - case 107: - { /* '107' */ + case 107: { /* '107' */ return KnxInterfaceObjectType_OT_KNXIP_PARAMETER } - case 108: - { /* '108' */ + case 108: { /* '108' */ return KnxInterfaceObjectType_OT_KNXIP_PARAMETER } - case 109: - { /* '109' */ + case 109: { /* '109' */ return KnxInterfaceObjectType_OT_KNXIP_PARAMETER } - case 11: - { /* '11' */ + case 11: { /* '11' */ return KnxInterfaceObjectType_OT_GENERAL } - case 110: - { /* '110' */ + case 110: { /* '110' */ return KnxInterfaceObjectType_OT_KNXIP_PARAMETER } - case 111: - { /* '111' */ + case 111: { /* '111' */ return KnxInterfaceObjectType_OT_KNXIP_PARAMETER } - case 112: - { /* '112' */ + case 112: { /* '112' */ return KnxInterfaceObjectType_OT_KNXIP_PARAMETER } - case 113: - { /* '113' */ + case 113: { /* '113' */ return KnxInterfaceObjectType_OT_SECURITY } - case 114: - { /* '114' */ + case 114: { /* '114' */ return KnxInterfaceObjectType_OT_SECURITY } - case 115: - { /* '115' */ + case 115: { /* '115' */ return KnxInterfaceObjectType_OT_SECURITY } - case 116: - { /* '116' */ + case 116: { /* '116' */ return KnxInterfaceObjectType_OT_SECURITY } - case 117: - { /* '117' */ + case 117: { /* '117' */ return KnxInterfaceObjectType_OT_SECURITY } - case 118: - { /* '118' */ + case 118: { /* '118' */ return KnxInterfaceObjectType_OT_SECURITY } - case 119: - { /* '119' */ + case 119: { /* '119' */ return KnxInterfaceObjectType_OT_SECURITY } - case 12: - { /* '12' */ + case 12: { /* '12' */ return KnxInterfaceObjectType_OT_GENERAL } - case 120: - { /* '120' */ + case 120: { /* '120' */ return KnxInterfaceObjectType_OT_SECURITY } - case 121: - { /* '121' */ + case 121: { /* '121' */ return KnxInterfaceObjectType_OT_SECURITY } - case 122: - { /* '122' */ + case 122: { /* '122' */ return KnxInterfaceObjectType_OT_SECURITY } - case 123: - { /* '123' */ + case 123: { /* '123' */ return KnxInterfaceObjectType_OT_SECURITY } - case 124: - { /* '124' */ + case 124: { /* '124' */ return KnxInterfaceObjectType_OT_RF_MEDIUM } - case 125: - { /* '125' */ + case 125: { /* '125' */ return KnxInterfaceObjectType_OT_RF_MEDIUM } - case 126: - { /* '126' */ + case 126: { /* '126' */ return KnxInterfaceObjectType_OT_RF_MEDIUM } - case 127: - { /* '127' */ + case 127: { /* '127' */ return KnxInterfaceObjectType_OT_RF_MEDIUM } - case 128: - { /* '128' */ + case 128: { /* '128' */ return KnxInterfaceObjectType_OT_RF_MEDIUM } - case 129: - { /* '129' */ + case 129: { /* '129' */ return KnxInterfaceObjectType_OT_RF_MEDIUM } - case 13: - { /* '13' */ + case 13: { /* '13' */ return KnxInterfaceObjectType_OT_GENERAL } - case 130: - { /* '130' */ + case 130: { /* '130' */ return KnxInterfaceObjectType_OT_RF_MEDIUM } - case 131: - { /* '131' */ + case 131: { /* '131' */ return KnxInterfaceObjectType_OT_RF_MEDIUM } - case 132: - { /* '132' */ + case 132: { /* '132' */ return KnxInterfaceObjectType_OT_RF_MEDIUM } - case 133: - { /* '133' */ + case 133: { /* '133' */ return KnxInterfaceObjectType_OT_INDOOR_BRIGHTNESS_SENSOR } - case 134: - { /* '134' */ + case 134: { /* '134' */ return KnxInterfaceObjectType_OT_INDOOR_BRIGHTNESS_SENSOR } - case 135: - { /* '135' */ + case 135: { /* '135' */ return KnxInterfaceObjectType_OT_INDOOR_LUMINANCE_SENSOR } - case 136: - { /* '136' */ + case 136: { /* '136' */ return KnxInterfaceObjectType_OT_INDOOR_LUMINANCE_SENSOR } - case 137: - { /* '137' */ + case 137: { /* '137' */ return KnxInterfaceObjectType_OT_LIGHT_SWITCHING_ACTUATOR_BASIC } - case 138: - { /* '138' */ + case 138: { /* '138' */ return KnxInterfaceObjectType_OT_LIGHT_SWITCHING_ACTUATOR_BASIC } - case 139: - { /* '139' */ + case 139: { /* '139' */ return KnxInterfaceObjectType_OT_LIGHT_SWITCHING_ACTUATOR_BASIC } - case 14: - { /* '14' */ + case 14: { /* '14' */ return KnxInterfaceObjectType_OT_GENERAL } - case 140: - { /* '140' */ + case 140: { /* '140' */ return KnxInterfaceObjectType_OT_LIGHT_SWITCHING_ACTUATOR_BASIC } - case 141: - { /* '141' */ + case 141: { /* '141' */ return KnxInterfaceObjectType_OT_LIGHT_SWITCHING_ACTUATOR_BASIC } - case 142: - { /* '142' */ + case 142: { /* '142' */ return KnxInterfaceObjectType_OT_LIGHT_SWITCHING_ACTUATOR_BASIC } - case 143: - { /* '143' */ + case 143: { /* '143' */ return KnxInterfaceObjectType_OT_LIGHT_SWITCHING_ACTUATOR_BASIC } - case 144: - { /* '144' */ + case 144: { /* '144' */ return KnxInterfaceObjectType_OT_LIGHT_SWITCHING_ACTUATOR_BASIC } - case 145: - { /* '145' */ + case 145: { /* '145' */ return KnxInterfaceObjectType_OT_LIGHT_SWITCHING_ACTUATOR_BASIC } - case 146: - { /* '146' */ + case 146: { /* '146' */ return KnxInterfaceObjectType_OT_LIGHT_SWITCHING_ACTUATOR_BASIC } - case 147: - { /* '147' */ + case 147: { /* '147' */ return KnxInterfaceObjectType_OT_LIGHT_SWITCHING_ACTUATOR_BASIC } - case 148: - { /* '148' */ + case 148: { /* '148' */ return KnxInterfaceObjectType_OT_LIGHT_SWITCHING_ACTUATOR_BASIC } - case 149: - { /* '149' */ + case 149: { /* '149' */ return KnxInterfaceObjectType_OT_LIGHT_SWITCHING_ACTUATOR_BASIC } - case 15: - { /* '15' */ + case 15: { /* '15' */ return KnxInterfaceObjectType_OT_GENERAL } - case 150: - { /* '150' */ + case 150: { /* '150' */ return KnxInterfaceObjectType_OT_LIGHT_SWITCHING_ACTUATOR_BASIC } - case 151: - { /* '151' */ + case 151: { /* '151' */ return KnxInterfaceObjectType_OT_LIGHT_SWITCHING_ACTUATOR_BASIC } - case 152: - { /* '152' */ + case 152: { /* '152' */ return KnxInterfaceObjectType_OT_LIGHT_SWITCHING_ACTUATOR_BASIC } - case 153: - { /* '153' */ + case 153: { /* '153' */ return KnxInterfaceObjectType_OT_LIGHT_SWITCHING_ACTUATOR_BASIC } - case 154: - { /* '154' */ + case 154: { /* '154' */ return KnxInterfaceObjectType_OT_LIGHT_SWITCHING_ACTUATOR_BASIC } - case 155: - { /* '155' */ + case 155: { /* '155' */ return KnxInterfaceObjectType_OT_LIGHT_SWITCHING_ACTUATOR_BASIC } - case 156: - { /* '156' */ + case 156: { /* '156' */ return KnxInterfaceObjectType_OT_LIGHT_SWITCHING_ACTUATOR_BASIC } - case 157: - { /* '157' */ + case 157: { /* '157' */ return KnxInterfaceObjectType_OT_DIMMING_ACTUATOR_BASIC } - case 158: - { /* '158' */ + case 158: { /* '158' */ return KnxInterfaceObjectType_OT_DIMMING_ACTUATOR_BASIC } - case 159: - { /* '159' */ + case 159: { /* '159' */ return KnxInterfaceObjectType_OT_DIMMING_ACTUATOR_BASIC } - case 16: - { /* '16' */ + case 16: { /* '16' */ return KnxInterfaceObjectType_OT_GENERAL } - case 160: - { /* '160' */ + case 160: { /* '160' */ return KnxInterfaceObjectType_OT_DIMMING_ACTUATOR_BASIC } - case 161: - { /* '161' */ + case 161: { /* '161' */ return KnxInterfaceObjectType_OT_DIMMING_ACTUATOR_BASIC } - case 162: - { /* '162' */ + case 162: { /* '162' */ return KnxInterfaceObjectType_OT_DIMMING_ACTUATOR_BASIC } - case 163: - { /* '163' */ + case 163: { /* '163' */ return KnxInterfaceObjectType_OT_DIMMING_ACTUATOR_BASIC } - case 164: - { /* '164' */ + case 164: { /* '164' */ return KnxInterfaceObjectType_OT_DIMMING_ACTUATOR_BASIC } - case 165: - { /* '165' */ + case 165: { /* '165' */ return KnxInterfaceObjectType_OT_DIMMING_ACTUATOR_BASIC } - case 166: - { /* '166' */ + case 166: { /* '166' */ return KnxInterfaceObjectType_OT_DIMMING_ACTUATOR_BASIC } - case 167: - { /* '167' */ + case 167: { /* '167' */ return KnxInterfaceObjectType_OT_DIMMING_ACTUATOR_BASIC } - case 168: - { /* '168' */ + case 168: { /* '168' */ return KnxInterfaceObjectType_OT_DIMMING_ACTUATOR_BASIC } - case 169: - { /* '169' */ + case 169: { /* '169' */ return KnxInterfaceObjectType_OT_DIMMING_ACTUATOR_BASIC } - case 17: - { /* '17' */ + case 17: { /* '17' */ return KnxInterfaceObjectType_OT_GENERAL } - case 170: - { /* '170' */ + case 170: { /* '170' */ return KnxInterfaceObjectType_OT_DIMMING_ACTUATOR_BASIC } - case 171: - { /* '171' */ + case 171: { /* '171' */ return KnxInterfaceObjectType_OT_DIMMING_ACTUATOR_BASIC } - case 172: - { /* '172' */ + case 172: { /* '172' */ return KnxInterfaceObjectType_OT_DIMMING_ACTUATOR_BASIC } - case 173: - { /* '173' */ + case 173: { /* '173' */ return KnxInterfaceObjectType_OT_DIMMING_ACTUATOR_BASIC } - case 174: - { /* '174' */ + case 174: { /* '174' */ return KnxInterfaceObjectType_OT_DIMMING_ACTUATOR_BASIC } - case 175: - { /* '175' */ + case 175: { /* '175' */ return KnxInterfaceObjectType_OT_DIMMING_ACTUATOR_BASIC } - case 176: - { /* '176' */ + case 176: { /* '176' */ return KnxInterfaceObjectType_OT_DIMMING_ACTUATOR_BASIC } - case 177: - { /* '177' */ + case 177: { /* '177' */ return KnxInterfaceObjectType_OT_DIMMING_ACTUATOR_BASIC } - case 178: - { /* '178' */ + case 178: { /* '178' */ return KnxInterfaceObjectType_OT_DIMMING_ACTUATOR_BASIC } - case 179: - { /* '179' */ + case 179: { /* '179' */ return KnxInterfaceObjectType_OT_DIMMING_ACTUATOR_BASIC } - case 18: - { /* '18' */ + case 18: { /* '18' */ return KnxInterfaceObjectType_OT_GENERAL } - case 180: - { /* '180' */ + case 180: { /* '180' */ return KnxInterfaceObjectType_OT_DIMMING_ACTUATOR_BASIC } - case 181: - { /* '181' */ + case 181: { /* '181' */ return KnxInterfaceObjectType_OT_DIMMING_ACTUATOR_BASIC } - case 182: - { /* '182' */ + case 182: { /* '182' */ return KnxInterfaceObjectType_OT_DIMMING_ACTUATOR_BASIC } - case 183: - { /* '183' */ + case 183: { /* '183' */ return KnxInterfaceObjectType_OT_DIMMING_ACTUATOR_BASIC } - case 184: - { /* '184' */ + case 184: { /* '184' */ return KnxInterfaceObjectType_OT_DIMMING_ACTUATOR_BASIC } - case 185: - { /* '185' */ + case 185: { /* '185' */ return KnxInterfaceObjectType_OT_DIMMING_ACTUATOR_BASIC } - case 186: - { /* '186' */ + case 186: { /* '186' */ return KnxInterfaceObjectType_OT_DIMMING_ACTUATOR_BASIC } - case 187: - { /* '187' */ + case 187: { /* '187' */ return KnxInterfaceObjectType_OT_DIMMING_ACTUATOR_BASIC } - case 188: - { /* '188' */ + case 188: { /* '188' */ return KnxInterfaceObjectType_OT_DIMMING_ACTUATOR_BASIC } - case 189: - { /* '189' */ + case 189: { /* '189' */ return KnxInterfaceObjectType_OT_DIMMING_ACTUATOR_BASIC } - case 19: - { /* '19' */ + case 19: { /* '19' */ return KnxInterfaceObjectType_OT_GENERAL } - case 190: - { /* '190' */ + case 190: { /* '190' */ return KnxInterfaceObjectType_OT_DIMMING_ACTUATOR_BASIC } - case 191: - { /* '191' */ + case 191: { /* '191' */ return KnxInterfaceObjectType_OT_DIMMING_SENSOR_BASIC } - case 192: - { /* '192' */ + case 192: { /* '192' */ return KnxInterfaceObjectType_OT_DIMMING_SENSOR_BASIC } - case 193: - { /* '193' */ + case 193: { /* '193' */ return KnxInterfaceObjectType_OT_DIMMING_SENSOR_BASIC } - case 194: - { /* '194' */ + case 194: { /* '194' */ return KnxInterfaceObjectType_OT_SWITCHING_SENSOR_BASIC } - case 195: - { /* '195' */ + case 195: { /* '195' */ return KnxInterfaceObjectType_OT_SWITCHING_SENSOR_BASIC } - case 196: - { /* '196' */ + case 196: { /* '196' */ return KnxInterfaceObjectType_OT_SUNBLIND_ACTUATOR_BASIC } - case 197: - { /* '197' */ + case 197: { /* '197' */ return KnxInterfaceObjectType_OT_SUNBLIND_ACTUATOR_BASIC } - case 198: - { /* '198' */ + case 198: { /* '198' */ return KnxInterfaceObjectType_OT_SUNBLIND_ACTUATOR_BASIC } - case 199: - { /* '199' */ + case 199: { /* '199' */ return KnxInterfaceObjectType_OT_SUNBLIND_ACTUATOR_BASIC } - case 2: - { /* '2' */ + case 2: { /* '2' */ return KnxInterfaceObjectType_OT_GENERAL } - case 20: - { /* '20' */ + case 20: { /* '20' */ return KnxInterfaceObjectType_OT_GENERAL } - case 200: - { /* '200' */ + case 200: { /* '200' */ return KnxInterfaceObjectType_OT_SUNBLIND_ACTUATOR_BASIC } - case 201: - { /* '201' */ + case 201: { /* '201' */ return KnxInterfaceObjectType_OT_SUNBLIND_ACTUATOR_BASIC } - case 202: - { /* '202' */ + case 202: { /* '202' */ return KnxInterfaceObjectType_OT_SUNBLIND_ACTUATOR_BASIC } - case 203: - { /* '203' */ + case 203: { /* '203' */ return KnxInterfaceObjectType_OT_SUNBLIND_ACTUATOR_BASIC } - case 204: - { /* '204' */ + case 204: { /* '204' */ return KnxInterfaceObjectType_OT_SUNBLIND_ACTUATOR_BASIC } - case 205: - { /* '205' */ + case 205: { /* '205' */ return KnxInterfaceObjectType_OT_SUNBLIND_ACTUATOR_BASIC } - case 206: - { /* '206' */ + case 206: { /* '206' */ return KnxInterfaceObjectType_OT_SUNBLIND_ACTUATOR_BASIC } - case 207: - { /* '207' */ + case 207: { /* '207' */ return KnxInterfaceObjectType_OT_SUNBLIND_ACTUATOR_BASIC } - case 208: - { /* '208' */ + case 208: { /* '208' */ return KnxInterfaceObjectType_OT_SUNBLIND_ACTUATOR_BASIC } - case 209: - { /* '209' */ + case 209: { /* '209' */ return KnxInterfaceObjectType_OT_SUNBLIND_ACTUATOR_BASIC } - case 21: - { /* '21' */ + case 21: { /* '21' */ return KnxInterfaceObjectType_OT_GENERAL } - case 210: - { /* '210' */ + case 210: { /* '210' */ return KnxInterfaceObjectType_OT_SUNBLIND_ACTUATOR_BASIC } - case 211: - { /* '211' */ + case 211: { /* '211' */ return KnxInterfaceObjectType_OT_SUNBLIND_ACTUATOR_BASIC } - case 212: - { /* '212' */ + case 212: { /* '212' */ return KnxInterfaceObjectType_OT_SUNBLIND_ACTUATOR_BASIC } - case 213: - { /* '213' */ + case 213: { /* '213' */ return KnxInterfaceObjectType_OT_SUNBLIND_SENSOR_BASIC } - case 214: - { /* '214' */ + case 214: { /* '214' */ return KnxInterfaceObjectType_OT_SUNBLIND_SENSOR_BASIC } - case 215: - { /* '215' */ + case 215: { /* '215' */ return KnxInterfaceObjectType_OT_SUNBLIND_SENSOR_BASIC } - case 22: - { /* '22' */ + case 22: { /* '22' */ return KnxInterfaceObjectType_OT_GENERAL } - case 23: - { /* '23' */ + case 23: { /* '23' */ return KnxInterfaceObjectType_OT_GENERAL } - case 24: - { /* '24' */ + case 24: { /* '24' */ return KnxInterfaceObjectType_OT_GENERAL } - case 25: - { /* '25' */ + case 25: { /* '25' */ return KnxInterfaceObjectType_OT_GENERAL } - case 26: - { /* '26' */ + case 26: { /* '26' */ return KnxInterfaceObjectType_OT_GENERAL } - case 27: - { /* '27' */ + case 27: { /* '27' */ return KnxInterfaceObjectType_OT_GENERAL } - case 28: - { /* '28' */ + case 28: { /* '28' */ return KnxInterfaceObjectType_OT_GENERAL } - case 29: - { /* '29' */ + case 29: { /* '29' */ return KnxInterfaceObjectType_OT_GENERAL } - case 3: - { /* '3' */ + case 3: { /* '3' */ return KnxInterfaceObjectType_OT_GENERAL } - case 30: - { /* '30' */ + case 30: { /* '30' */ return KnxInterfaceObjectType_OT_GENERAL } - case 31: - { /* '31' */ + case 31: { /* '31' */ return KnxInterfaceObjectType_OT_DEVICE } - case 32: - { /* '32' */ + case 32: { /* '32' */ return KnxInterfaceObjectType_OT_DEVICE } - case 33: - { /* '33' */ + case 33: { /* '33' */ return KnxInterfaceObjectType_OT_DEVICE } - case 34: - { /* '34' */ + case 34: { /* '34' */ return KnxInterfaceObjectType_OT_DEVICE } - case 35: - { /* '35' */ + case 35: { /* '35' */ return KnxInterfaceObjectType_OT_DEVICE } - case 36: - { /* '36' */ + case 36: { /* '36' */ return KnxInterfaceObjectType_OT_DEVICE } - case 37: - { /* '37' */ + case 37: { /* '37' */ return KnxInterfaceObjectType_OT_DEVICE } - case 38: - { /* '38' */ + case 38: { /* '38' */ return KnxInterfaceObjectType_OT_DEVICE } - case 39: - { /* '39' */ + case 39: { /* '39' */ return KnxInterfaceObjectType_OT_DEVICE } - case 4: - { /* '4' */ + case 4: { /* '4' */ return KnxInterfaceObjectType_OT_GENERAL } - case 40: - { /* '40' */ + case 40: { /* '40' */ return KnxInterfaceObjectType_OT_DEVICE } - case 41: - { /* '41' */ + case 41: { /* '41' */ return KnxInterfaceObjectType_OT_DEVICE } - case 42: - { /* '42' */ + case 42: { /* '42' */ return KnxInterfaceObjectType_OT_DEVICE } - case 43: - { /* '43' */ + case 43: { /* '43' */ return KnxInterfaceObjectType_OT_DEVICE } - case 44: - { /* '44' */ + case 44: { /* '44' */ return KnxInterfaceObjectType_OT_DEVICE } - case 45: - { /* '45' */ + case 45: { /* '45' */ return KnxInterfaceObjectType_OT_DEVICE } - case 46: - { /* '46' */ + case 46: { /* '46' */ return KnxInterfaceObjectType_OT_DEVICE } - case 47: - { /* '47' */ + case 47: { /* '47' */ return KnxInterfaceObjectType_OT_DEVICE } - case 48: - { /* '48' */ + case 48: { /* '48' */ return KnxInterfaceObjectType_OT_DEVICE } - case 49: - { /* '49' */ + case 49: { /* '49' */ return KnxInterfaceObjectType_OT_DEVICE } - case 5: - { /* '5' */ + case 5: { /* '5' */ return KnxInterfaceObjectType_OT_GENERAL } - case 50: - { /* '50' */ + case 50: { /* '50' */ return KnxInterfaceObjectType_OT_DEVICE } - case 51: - { /* '51' */ + case 51: { /* '51' */ return KnxInterfaceObjectType_OT_DEVICE } - case 52: - { /* '52' */ + case 52: { /* '52' */ return KnxInterfaceObjectType_OT_DEVICE } - case 53: - { /* '53' */ + case 53: { /* '53' */ return KnxInterfaceObjectType_OT_DEVICE } - case 54: - { /* '54' */ + case 54: { /* '54' */ return KnxInterfaceObjectType_OT_DEVICE } - case 55: - { /* '55' */ + case 55: { /* '55' */ return KnxInterfaceObjectType_OT_DEVICE } - case 56: - { /* '56' */ + case 56: { /* '56' */ return KnxInterfaceObjectType_OT_DEVICE } - case 57: - { /* '57' */ + case 57: { /* '57' */ return KnxInterfaceObjectType_OT_DEVICE } - case 58: - { /* '58' */ + case 58: { /* '58' */ return KnxInterfaceObjectType_OT_DEVICE } - case 59: - { /* '59' */ + case 59: { /* '59' */ return KnxInterfaceObjectType_OT_DEVICE } - case 6: - { /* '6' */ + case 6: { /* '6' */ return KnxInterfaceObjectType_OT_GENERAL } - case 60: - { /* '60' */ + case 60: { /* '60' */ return KnxInterfaceObjectType_OT_DEVICE } - case 61: - { /* '61' */ + case 61: { /* '61' */ return KnxInterfaceObjectType_OT_DEVICE } - case 62: - { /* '62' */ + case 62: { /* '62' */ return KnxInterfaceObjectType_OT_DEVICE } - case 63: - { /* '63' */ + case 63: { /* '63' */ return KnxInterfaceObjectType_OT_DEVICE } - case 64: - { /* '64' */ + case 64: { /* '64' */ return KnxInterfaceObjectType_OT_DEVICE } - case 65: - { /* '65' */ + case 65: { /* '65' */ return KnxInterfaceObjectType_OT_DEVICE } - case 66: - { /* '66' */ + case 66: { /* '66' */ return KnxInterfaceObjectType_OT_DEVICE } - case 67: - { /* '67' */ + case 67: { /* '67' */ return KnxInterfaceObjectType_OT_GROUP_OBJECT_TABLE } - case 68: - { /* '68' */ + case 68: { /* '68' */ return KnxInterfaceObjectType_OT_GROUP_OBJECT_TABLE } - case 69: - { /* '69' */ + case 69: { /* '69' */ return KnxInterfaceObjectType_OT_ROUTER } - case 7: - { /* '7' */ + case 7: { /* '7' */ return KnxInterfaceObjectType_OT_GENERAL } - case 70: - { /* '70' */ + case 70: { /* '70' */ return KnxInterfaceObjectType_OT_ROUTER } - case 71: - { /* '71' */ + case 71: { /* '71' */ return KnxInterfaceObjectType_OT_ROUTER } - case 72: - { /* '72' */ + case 72: { /* '72' */ return KnxInterfaceObjectType_OT_ROUTER } - case 73: - { /* '73' */ + case 73: { /* '73' */ return KnxInterfaceObjectType_OT_ROUTER } - case 74: - { /* '74' */ + case 74: { /* '74' */ return KnxInterfaceObjectType_OT_ROUTER } - case 75: - { /* '75' */ + case 75: { /* '75' */ return KnxInterfaceObjectType_OT_ROUTER } - case 76: - { /* '76' */ + case 76: { /* '76' */ return KnxInterfaceObjectType_OT_ROUTER } - case 77: - { /* '77' */ + case 77: { /* '77' */ return KnxInterfaceObjectType_OT_ROUTER } - case 78: - { /* '78' */ + case 78: { /* '78' */ return KnxInterfaceObjectType_OT_ROUTER } - case 79: - { /* '79' */ + case 79: { /* '79' */ return KnxInterfaceObjectType_OT_ROUTER } - case 8: - { /* '8' */ + case 8: { /* '8' */ return KnxInterfaceObjectType_OT_GENERAL } - case 80: - { /* '80' */ + case 80: { /* '80' */ return KnxInterfaceObjectType_OT_KNXIP_PARAMETER } - case 81: - { /* '81' */ + case 81: { /* '81' */ return KnxInterfaceObjectType_OT_KNXIP_PARAMETER } - case 82: - { /* '82' */ + case 82: { /* '82' */ return KnxInterfaceObjectType_OT_KNXIP_PARAMETER } - case 83: - { /* '83' */ + case 83: { /* '83' */ return KnxInterfaceObjectType_OT_KNXIP_PARAMETER } - case 84: - { /* '84' */ + case 84: { /* '84' */ return KnxInterfaceObjectType_OT_KNXIP_PARAMETER } - case 85: - { /* '85' */ + case 85: { /* '85' */ return KnxInterfaceObjectType_OT_KNXIP_PARAMETER } - case 86: - { /* '86' */ + case 86: { /* '86' */ return KnxInterfaceObjectType_OT_KNXIP_PARAMETER } - case 87: - { /* '87' */ + case 87: { /* '87' */ return KnxInterfaceObjectType_OT_KNXIP_PARAMETER } - case 88: - { /* '88' */ + case 88: { /* '88' */ return KnxInterfaceObjectType_OT_KNXIP_PARAMETER } - case 89: - { /* '89' */ + case 89: { /* '89' */ return KnxInterfaceObjectType_OT_KNXIP_PARAMETER } - case 9: - { /* '9' */ + case 9: { /* '9' */ return KnxInterfaceObjectType_OT_GENERAL } - case 90: - { /* '90' */ + case 90: { /* '90' */ return KnxInterfaceObjectType_OT_KNXIP_PARAMETER } - case 91: - { /* '91' */ + case 91: { /* '91' */ return KnxInterfaceObjectType_OT_KNXIP_PARAMETER } - case 92: - { /* '92' */ + case 92: { /* '92' */ return KnxInterfaceObjectType_OT_KNXIP_PARAMETER } - case 93: - { /* '93' */ + case 93: { /* '93' */ return KnxInterfaceObjectType_OT_KNXIP_PARAMETER } - case 94: - { /* '94' */ + case 94: { /* '94' */ return KnxInterfaceObjectType_OT_KNXIP_PARAMETER } - case 95: - { /* '95' */ + case 95: { /* '95' */ return KnxInterfaceObjectType_OT_KNXIP_PARAMETER } - case 96: - { /* '96' */ + case 96: { /* '96' */ return KnxInterfaceObjectType_OT_KNXIP_PARAMETER } - case 97: - { /* '97' */ + case 97: { /* '97' */ return KnxInterfaceObjectType_OT_KNXIP_PARAMETER } - case 98: - { /* '98' */ + case 98: { /* '98' */ return KnxInterfaceObjectType_OT_KNXIP_PARAMETER } - case 99: - { /* '99' */ + case 99: { /* '99' */ return KnxInterfaceObjectType_OT_KNXIP_PARAMETER } - default: - { + default: { return 0 } } @@ -4010,438 +3143,438 @@ func KnxInterfaceObjectPropertyFirstEnumForFieldObjectType(value KnxInterfaceObj } func KnxInterfaceObjectPropertyByValue(value uint32) (enum KnxInterfaceObjectProperty, ok bool) { switch value { - case 0: - return KnxInterfaceObjectProperty_PID_UNKNOWN, true - case 1: - return KnxInterfaceObjectProperty_PID_GENERAL_OBJECT_TYPE, true - case 10: - return KnxInterfaceObjectProperty_PID_GENERAL_SERVICES_SUPPORTED, true - case 100: - return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_PRIORITY_FIFO_ENABLED, true - case 101: - return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_QUEUE_OVERFLOW_TO_IP, true - case 102: - return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_QUEUE_OVERFLOW_TO_KNX, true - case 103: - return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_MSG_TRANSMIT_TO_IP, true - case 104: - return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_MSG_TRANSMIT_TO_KNX, true - case 105: - return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_FRIENDLY_NAME, true - case 106: - return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_BACKBONE_KEY, true - case 107: - return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_DEVICE_AUTHENTICATION_CODE, true - case 108: - return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_PASSWORD_HASHES, true - case 109: - return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_SECURED_SERVICE_FAMILIES, true - case 11: - return KnxInterfaceObjectProperty_PID_GENERAL_SERIAL_NUMBER, true - case 110: - return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_MULTICAST_LATENCY_TOLERANCE, true - case 111: - return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_SYNC_LATENCY_FRACTION, true - case 112: - return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_TUNNELLING_USERS, true - case 113: - return KnxInterfaceObjectProperty_PID_SECURITY_SECURITY_MODE, true - case 114: - return KnxInterfaceObjectProperty_PID_SECURITY_P2P_KEY_TABLE, true - case 115: - return KnxInterfaceObjectProperty_PID_SECURITY_GRP_KEY_TABLE, true - case 116: - return KnxInterfaceObjectProperty_PID_SECURITY_SECURITY_INDIVIDUAL_ADDRESS_TABLE, true - case 117: - return KnxInterfaceObjectProperty_PID_SECURITY_SECURITY_FAILURES_LOG, true - case 118: - return KnxInterfaceObjectProperty_PID_SECURITY_SKI_TOOL, true - case 119: - return KnxInterfaceObjectProperty_PID_SECURITY_SECURITY_REPORT, true - case 12: - return KnxInterfaceObjectProperty_PID_GENERAL_MANUFACTURER_ID, true - case 120: - return KnxInterfaceObjectProperty_PID_SECURITY_SECURITY_REPORT_CONTROL, true - case 121: - return KnxInterfaceObjectProperty_PID_SECURITY_SEQUENCE_NUMBER_SENDING, true - case 122: - return KnxInterfaceObjectProperty_PID_SECURITY_ZONE_KEYS_TABLE, true - case 123: - return KnxInterfaceObjectProperty_PID_SECURITY_GO_SECURITY_FLAGS, true - case 124: - return KnxInterfaceObjectProperty_PID_RF_MEDIUM_RF_MULTI_TYPE, true - case 125: - return KnxInterfaceObjectProperty_PID_RF_MEDIUM_RF_DOMAIN_ADDRESS, true - case 126: - return KnxInterfaceObjectProperty_PID_RF_MEDIUM_RF_RETRANSMITTER, true - case 127: - return KnxInterfaceObjectProperty_PID_RF_MEDIUM_SECURITY_REPORT_CONTROL, true - case 128: - return KnxInterfaceObjectProperty_PID_RF_MEDIUM_RF_FILTERING_MODE_SELECT, true - case 129: - return KnxInterfaceObjectProperty_PID_RF_MEDIUM_RF_BIDIR_TIMEOUT, true - case 13: - return KnxInterfaceObjectProperty_PID_GENERAL_PROGRAM_VERSION, true - case 130: - return KnxInterfaceObjectProperty_PID_RF_MEDIUM_RF_DIAG_SA_FILTER_TABLE, true - case 131: - return KnxInterfaceObjectProperty_PID_RF_MEDIUM_RF_DIAG_QUALITY_TABLE, true - case 132: - return KnxInterfaceObjectProperty_PID_RF_MEDIUM_RF_DIAG_PROBE, true - case 133: - return KnxInterfaceObjectProperty_PID_INDOOR_BRIGHTNESS_SENSOR_CHANGE_OF_VALUE, true - case 134: - return KnxInterfaceObjectProperty_PID_INDOOR_BRIGHTNESS_SENSOR_REPETITION_TIME, true - case 135: - return KnxInterfaceObjectProperty_PID_INDOOR_LUMINANCE_SENSOR_CHANGE_OF_VALUE, true - case 136: - return KnxInterfaceObjectProperty_PID_INDOOR_LUMINANCE_SENSOR_REPETITION_TIME, true - case 137: - return KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_ON_DELAY, true - case 138: - return KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_OFF_DELAY, true - case 139: - return KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_TIMED_ON_DURATION, true - case 14: - return KnxInterfaceObjectProperty_PID_GENERAL_DEVICE_CONTROL, true - case 140: - return KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_PREWARNING_DURATION, true - case 141: - return KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_TRANSMISSION_CYCLE_TIME, true - case 142: - return KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_BUS_POWER_UP_MESSAGE_DELAY, true - case 143: - return KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_BEHAVIOUR_AT_LOCKING, true - case 144: - return KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_BEHAVIOUR_AT_UNLOCKING, true - case 145: - return KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_BEHAVIOUR_BUS_POWER_UP, true - case 146: - return KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_BEHAVIOUR_BUS_POWER_DOWN, true - case 147: - return KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_INVERT_OUTPUT_STATE, true - case 148: - return KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_TIMED_ON_RETRIGGER_FUNCTION, true - case 149: - return KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_MANUAL_OFF_ENABLE, true - case 15: - return KnxInterfaceObjectProperty_PID_GENERAL_ORDER_INFO, true - case 150: - return KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_INVERT_LOCK_DEVICE, true - case 151: - return KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_LOCK_STATE, true - case 152: - return KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_UNLOCK_STATE, true - case 153: - return KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_STATE_FOR_SCENE_NUMBER, true - case 154: - return KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_STORAGE_FUNCTION_FOR_SCENE, true - case 155: - return KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_BUS_POWER_UP_STATE, true - case 156: - return KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_BEHAVIOUR_BUS_POWER_UP_2, true - case 157: - return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_ON_DELAY, true - case 158: - return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_OFF_DELAY, true - case 159: - return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_SWITCH_OFF_BRIGHTNESS_DELAY_TIME, true - case 16: - return KnxInterfaceObjectProperty_PID_GENERAL_PEI_TYPE, true - case 160: - return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_TIMED_ON_DURATION, true - case 161: - return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_PREWARNING_DURATION, true - case 162: - return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_TRANSMISSION_CYCLE_TIME, true - case 163: - return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_BUS_POWER_UP_MESSAGE_DELAY, true - case 164: - return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_DIMMING_SPEED, true - case 165: - return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_DIMMING_STEP_TIME, true - case 166: - return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_DIMMING_SPEED_FOR_SWITCH_ON_SET_VALUE, true - case 167: - return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_DIMMING_SPEED_FOR_SWITCH_OFF, true - case 168: - return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_DIMMING_STEP_TIME_FOR_SWITCH_ON_SET_VALUE, true - case 169: - return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_DIMMING_STEP_TIME_FOR_SWITCH_OFF, true - case 17: - return KnxInterfaceObjectProperty_PID_GENERAL_PORT_CONFIGURATION, true - case 170: - return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_SWITCFH_OFF_BRIGHTNESS, true - case 171: - return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_MINIMUM_SET_VALUE, true - case 172: - return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_MAXIMUM_SET_VALUE, true - case 173: - return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_SWITCH_ON_SET_VALUE, true - case 174: - return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_DIMM_MODE_SELECTION, true - case 175: - return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_RELATIV_OFF_ENABLE, true - case 176: - return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_MEMORY_FUNCTION, true - case 177: - return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_TIMED_ON_RETRIGGER_FUNCTION, true - case 178: - return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_MANUAL_OFF_ENABLE, true - case 179: - return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_INVERT_LOCK_DEVICE, true - case 18: - return KnxInterfaceObjectProperty_PID_GENERAL_POLL_GROUP_SETTINGS, true - case 180: - return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_BEHAVIOUR_AT_LOCKING, true - case 181: - return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_BEHAVIOUR_AT_UNLOCKING, true - case 182: - return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_LOCK_SETVALUE, true - case 183: - return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_UNLOCK_SETVALUE, true - case 184: - return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_BIGHTNESS_FOR_SCENE, true - case 185: - return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_STORAGE_FUNCTION_FOR_SCENE, true - case 186: - return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_DELTA_DIMMING_VALUE, true - case 187: - return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_BEHAVIOUR_BUS_POWER_UP, true - case 188: - return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_BEHAVIOUR_BUS_POWER_UP_SET_VALUE, true - case 189: - return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_BEHAVIOUR_BUS_POWER_DOWN, true - case 19: - return KnxInterfaceObjectProperty_PID_GENERAL_MANUFACTURER_DATA, true - case 190: - return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_BUS_POWER_DOWN_SET_VALUE, true - case 191: - return KnxInterfaceObjectProperty_PID_DIMMING_SENSOR_BASIC_ON_OFF_ACTION, true - case 192: - return KnxInterfaceObjectProperty_PID_DIMMING_SENSOR_BASIC_ENABLE_TOGGLE_MODE, true - case 193: - return KnxInterfaceObjectProperty_PID_DIMMING_SENSOR_BASIC_ABSOLUTE_SETVALUE, true - case 194: - return KnxInterfaceObjectProperty_PID_SWITCHING_SENSOR_BASIC_ON_OFF_ACTION, true - case 195: - return KnxInterfaceObjectProperty_PID_SWITCHING_SENSOR_BASIC_ENABLE_TOGGLE_MODE, true - case 196: - return KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_REVERSION_PAUSE_TIME, true - case 197: - return KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_MOVE_UP_DOWN_TIME, true - case 198: - return KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_SLAT_STEP_TIME, true - case 199: - return KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_MOVE_PRESET_POSITION_TIME, true - case 2: - return KnxInterfaceObjectProperty_PID_GENERAL_OBJECT_NAME, true - case 20: - return KnxInterfaceObjectProperty_PID_GENERAL_ENABLE, true - case 200: - return KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_MOVE_TO_PRESET_POSITION_IN_PERCENT, true - case 201: - return KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_MOVE_TO_PRESET_POSITION_LENGTH, true - case 202: - return KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_PRESET_SLAT_POSITION_PERCENT, true - case 203: - return KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_PRESET_SLAT_POSITION_ANGLE, true - case 204: - return KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_REACTION_WIND_ALARM, true - case 205: - return KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_HEARTBEAT_WIND_ALARM, true - case 206: - return KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_REACTION_ON_RAIN_ALARM, true - case 207: - return KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_HEARTBEAT_RAIN_ALARM, true - case 208: - return KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_REACTION_FROST_ALARM, true - case 209: - return KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_HEARTBEAT_FROST_ALARM, true - case 21: - return KnxInterfaceObjectProperty_PID_GENERAL_DESCRIPTION, true - case 210: - return KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_MAX_SLAT_MOVE_TIME, true - case 211: - return KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_ENABLE_BLINDS_MODE, true - case 212: - return KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_STORAGE_FUNCTIONS_FOR_SCENE, true - case 213: - return KnxInterfaceObjectProperty_PID_SUNBLIND_SENSOR_BASIC_ENABLE_BLINDS_MODE, true - case 214: - return KnxInterfaceObjectProperty_PID_SUNBLIND_SENSOR_BASIC_UP_DOWN_ACTION, true - case 215: - return KnxInterfaceObjectProperty_PID_SUNBLIND_SENSOR_BASIC_ENABLE_TOGGLE_MODE, true - case 22: - return KnxInterfaceObjectProperty_PID_GENERAL_FILE, true - case 23: - return KnxInterfaceObjectProperty_PID_GENERAL_TABLE, true - case 24: - return KnxInterfaceObjectProperty_PID_GENERAL_ENROL, true - case 25: - return KnxInterfaceObjectProperty_PID_GENERAL_VERSION, true - case 26: - return KnxInterfaceObjectProperty_PID_GENERAL_GROUP_OBJECT_LINK, true - case 27: - return KnxInterfaceObjectProperty_PID_GENERAL_MCB_TABLE, true - case 28: - return KnxInterfaceObjectProperty_PID_GENERAL_ERROR_CODE, true - case 29: - return KnxInterfaceObjectProperty_PID_GENERAL_OBJECT_INDEX, true - case 3: - return KnxInterfaceObjectProperty_PID_GENERAL_SEMAPHOR, true - case 30: - return KnxInterfaceObjectProperty_PID_GENERAL_DOWNLOAD_COUNTER, true - case 31: - return KnxInterfaceObjectProperty_PID_DEVICE_ROUTING_COUNT, true - case 32: - return KnxInterfaceObjectProperty_PID_DEVICE_MAX_RETRY_COUNT, true - case 33: - return KnxInterfaceObjectProperty_PID_DEVICE_ERROR_FLAGS, true - case 34: - return KnxInterfaceObjectProperty_PID_DEVICE_PROGMODE, true - case 35: - return KnxInterfaceObjectProperty_PID_DEVICE_PRODUCT_ID, true - case 36: - return KnxInterfaceObjectProperty_PID_DEVICE_MAX_APDULENGTH, true - case 37: - return KnxInterfaceObjectProperty_PID_DEVICE_SUBNET_ADDR, true - case 38: - return KnxInterfaceObjectProperty_PID_DEVICE_DEVICE_ADDR, true - case 39: - return KnxInterfaceObjectProperty_PID_DEVICE_PB_CONFIG, true - case 4: - return KnxInterfaceObjectProperty_PID_GENERAL_GROUP_OBJECT_REFERENCE, true - case 40: - return KnxInterfaceObjectProperty_PID_DEVICE_ADDR_REPORT, true - case 41: - return KnxInterfaceObjectProperty_PID_DEVICE_ADDR_CHECK, true - case 42: - return KnxInterfaceObjectProperty_PID_DEVICE_OBJECT_VALUE, true - case 43: - return KnxInterfaceObjectProperty_PID_DEVICE_OBJECTLINK, true - case 44: - return KnxInterfaceObjectProperty_PID_DEVICE_APPLICATION, true - case 45: - return KnxInterfaceObjectProperty_PID_DEVICE_PARAMETER, true - case 46: - return KnxInterfaceObjectProperty_PID_DEVICE_OBJECTADDRESS, true - case 47: - return KnxInterfaceObjectProperty_PID_DEVICE_PSU_TYPE, true - case 48: - return KnxInterfaceObjectProperty_PID_DEVICE_PSU_STATUS, true - case 49: - return KnxInterfaceObjectProperty_PID_DEVICE_PSU_ENABLE, true - case 5: - return KnxInterfaceObjectProperty_PID_GENERAL_LOAD_STATE_CONTROL, true - case 50: - return KnxInterfaceObjectProperty_PID_DEVICE_DOMAIN_ADDRESS, true - case 51: - return KnxInterfaceObjectProperty_PID_DEVICE_IO_LIST, true - case 52: - return KnxInterfaceObjectProperty_PID_DEVICE_MGT_DESCRIPTOR_01, true - case 53: - return KnxInterfaceObjectProperty_PID_DEVICE_PL110_PARAM, true - case 54: - return KnxInterfaceObjectProperty_PID_DEVICE_RF_REPEAT_COUNTER, true - case 55: - return KnxInterfaceObjectProperty_PID_DEVICE_RECEIVE_BLOCK_TABLE, true - case 56: - return KnxInterfaceObjectProperty_PID_DEVICE_RANDOM_PAUSE_TABLE, true - case 57: - return KnxInterfaceObjectProperty_PID_DEVICE_RECEIVE_BLOCK_NR, true - case 58: - return KnxInterfaceObjectProperty_PID_DEVICE_HARDWARE_TYPE, true - case 59: - return KnxInterfaceObjectProperty_PID_DEVICE_RETRANSMITTER_NUMBER, true - case 6: - return KnxInterfaceObjectProperty_PID_GENERAL_RUN_STATE_CONTROL, true - case 60: - return KnxInterfaceObjectProperty_PID_DEVICE_SERIAL_NR_TABLE, true - case 61: - return KnxInterfaceObjectProperty_PID_DEVICE_BIBATMASTER_ADDRESS, true - case 62: - return KnxInterfaceObjectProperty_PID_DEVICE_RF_DOMAIN_ADDRESS, true - case 63: - return KnxInterfaceObjectProperty_PID_DEVICE_DEVICE_DESCRIPTOR, true - case 64: - return KnxInterfaceObjectProperty_PID_DEVICE_METERING_FILTER_TABLE, true - case 65: - return KnxInterfaceObjectProperty_PID_DEVICE_GROUP_TELEGR_RATE_LIMIT_TIME_BASE, true - case 66: - return KnxInterfaceObjectProperty_PID_DEVICE_GROUP_TELEGR_RATE_LIMIT_NO_OF_TELEGR, true - case 67: - return KnxInterfaceObjectProperty_PID_GROUP_OBJECT_TABLE_GRPOBJTABLE, true - case 68: - return KnxInterfaceObjectProperty_PID_GROUP_OBJECT_TABLE_EXT_GRPOBJREFERENCE, true - case 69: - return KnxInterfaceObjectProperty_PID_ROUTER_LINE_STATUS, true - case 7: - return KnxInterfaceObjectProperty_PID_GENERAL_TABLE_REFERENCE, true - case 70: - return KnxInterfaceObjectProperty_PID_ROUTER_MAIN_LCCONFIG, true - case 71: - return KnxInterfaceObjectProperty_PID_ROUTER_SUB_LCCONFIG, true - case 72: - return KnxInterfaceObjectProperty_PID_ROUTER_MAIN_LCGRPCONFIG, true - case 73: - return KnxInterfaceObjectProperty_PID_ROUTER_SUB_LCGRPCONFIG, true - case 74: - return KnxInterfaceObjectProperty_PID_ROUTER_ROUTETABLE_CONTROL, true - case 75: - return KnxInterfaceObjectProperty_PID_ROUTER_COUPL_SERV_CONTROL, true - case 76: - return KnxInterfaceObjectProperty_PID_ROUTER_MAX_ROUTER_APDU_LENGTH, true - case 77: - return KnxInterfaceObjectProperty_PID_ROUTER_MEDIUM, true - case 78: - return KnxInterfaceObjectProperty_PID_ROUTER_FILTER_TABLE_USE, true - case 79: - return KnxInterfaceObjectProperty_PID_ROUTER_RF_ENABLE_SBC, true - case 8: - return KnxInterfaceObjectProperty_PID_GENERAL_SERVICE_CONTROL, true - case 80: - return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_PROJECT_INSTALLATION_ID, true - case 81: - return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_KNX_INDIVIDUAL_ADDRESS, true - case 82: - return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_ADDITIONAL_INDIVIDUAL_ADDRESSES, true - case 83: - return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_CURRENT_IP_ASSIGNMENT_METHOD, true - case 84: - return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_IP_ASSIGNMENT_METHOD, true - case 85: - return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_IP_CAPABILITIES, true - case 86: - return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_CURRENT_IP_ADDRESS, true - case 87: - return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_CURRENT_SUBNET_MASK, true - case 88: - return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_CURRENT_DEFAULT_GATEWAY, true - case 89: - return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_IP_ADDRESS, true - case 9: - return KnxInterfaceObjectProperty_PID_GENERAL_FIRMWARE_REVISION, true - case 90: - return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_SUBNET_MASK, true - case 91: - return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_DEFAULT_GATEWAY, true - case 92: - return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_DHCP_BOOTP_SERVER, true - case 93: - return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_MAC_ADDRESS, true - case 94: - return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_SYSTEM_SETUP_MULTICAST_ADDRESS, true - case 95: - return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_ROUTING_MULTICAST_ADDRESS, true - case 96: - return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_TTL, true - case 97: - return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_KNXNETIP_DEVICE_CAPABILITIES, true - case 98: - return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_KNXNETIP_DEVICE_STATE, true - case 99: - return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_KNXNETIP_ROUTING_CAPABILITIES, true + case 0: + return KnxInterfaceObjectProperty_PID_UNKNOWN, true + case 1: + return KnxInterfaceObjectProperty_PID_GENERAL_OBJECT_TYPE, true + case 10: + return KnxInterfaceObjectProperty_PID_GENERAL_SERVICES_SUPPORTED, true + case 100: + return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_PRIORITY_FIFO_ENABLED, true + case 101: + return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_QUEUE_OVERFLOW_TO_IP, true + case 102: + return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_QUEUE_OVERFLOW_TO_KNX, true + case 103: + return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_MSG_TRANSMIT_TO_IP, true + case 104: + return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_MSG_TRANSMIT_TO_KNX, true + case 105: + return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_FRIENDLY_NAME, true + case 106: + return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_BACKBONE_KEY, true + case 107: + return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_DEVICE_AUTHENTICATION_CODE, true + case 108: + return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_PASSWORD_HASHES, true + case 109: + return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_SECURED_SERVICE_FAMILIES, true + case 11: + return KnxInterfaceObjectProperty_PID_GENERAL_SERIAL_NUMBER, true + case 110: + return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_MULTICAST_LATENCY_TOLERANCE, true + case 111: + return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_SYNC_LATENCY_FRACTION, true + case 112: + return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_TUNNELLING_USERS, true + case 113: + return KnxInterfaceObjectProperty_PID_SECURITY_SECURITY_MODE, true + case 114: + return KnxInterfaceObjectProperty_PID_SECURITY_P2P_KEY_TABLE, true + case 115: + return KnxInterfaceObjectProperty_PID_SECURITY_GRP_KEY_TABLE, true + case 116: + return KnxInterfaceObjectProperty_PID_SECURITY_SECURITY_INDIVIDUAL_ADDRESS_TABLE, true + case 117: + return KnxInterfaceObjectProperty_PID_SECURITY_SECURITY_FAILURES_LOG, true + case 118: + return KnxInterfaceObjectProperty_PID_SECURITY_SKI_TOOL, true + case 119: + return KnxInterfaceObjectProperty_PID_SECURITY_SECURITY_REPORT, true + case 12: + return KnxInterfaceObjectProperty_PID_GENERAL_MANUFACTURER_ID, true + case 120: + return KnxInterfaceObjectProperty_PID_SECURITY_SECURITY_REPORT_CONTROL, true + case 121: + return KnxInterfaceObjectProperty_PID_SECURITY_SEQUENCE_NUMBER_SENDING, true + case 122: + return KnxInterfaceObjectProperty_PID_SECURITY_ZONE_KEYS_TABLE, true + case 123: + return KnxInterfaceObjectProperty_PID_SECURITY_GO_SECURITY_FLAGS, true + case 124: + return KnxInterfaceObjectProperty_PID_RF_MEDIUM_RF_MULTI_TYPE, true + case 125: + return KnxInterfaceObjectProperty_PID_RF_MEDIUM_RF_DOMAIN_ADDRESS, true + case 126: + return KnxInterfaceObjectProperty_PID_RF_MEDIUM_RF_RETRANSMITTER, true + case 127: + return KnxInterfaceObjectProperty_PID_RF_MEDIUM_SECURITY_REPORT_CONTROL, true + case 128: + return KnxInterfaceObjectProperty_PID_RF_MEDIUM_RF_FILTERING_MODE_SELECT, true + case 129: + return KnxInterfaceObjectProperty_PID_RF_MEDIUM_RF_BIDIR_TIMEOUT, true + case 13: + return KnxInterfaceObjectProperty_PID_GENERAL_PROGRAM_VERSION, true + case 130: + return KnxInterfaceObjectProperty_PID_RF_MEDIUM_RF_DIAG_SA_FILTER_TABLE, true + case 131: + return KnxInterfaceObjectProperty_PID_RF_MEDIUM_RF_DIAG_QUALITY_TABLE, true + case 132: + return KnxInterfaceObjectProperty_PID_RF_MEDIUM_RF_DIAG_PROBE, true + case 133: + return KnxInterfaceObjectProperty_PID_INDOOR_BRIGHTNESS_SENSOR_CHANGE_OF_VALUE, true + case 134: + return KnxInterfaceObjectProperty_PID_INDOOR_BRIGHTNESS_SENSOR_REPETITION_TIME, true + case 135: + return KnxInterfaceObjectProperty_PID_INDOOR_LUMINANCE_SENSOR_CHANGE_OF_VALUE, true + case 136: + return KnxInterfaceObjectProperty_PID_INDOOR_LUMINANCE_SENSOR_REPETITION_TIME, true + case 137: + return KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_ON_DELAY, true + case 138: + return KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_OFF_DELAY, true + case 139: + return KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_TIMED_ON_DURATION, true + case 14: + return KnxInterfaceObjectProperty_PID_GENERAL_DEVICE_CONTROL, true + case 140: + return KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_PREWARNING_DURATION, true + case 141: + return KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_TRANSMISSION_CYCLE_TIME, true + case 142: + return KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_BUS_POWER_UP_MESSAGE_DELAY, true + case 143: + return KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_BEHAVIOUR_AT_LOCKING, true + case 144: + return KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_BEHAVIOUR_AT_UNLOCKING, true + case 145: + return KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_BEHAVIOUR_BUS_POWER_UP, true + case 146: + return KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_BEHAVIOUR_BUS_POWER_DOWN, true + case 147: + return KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_INVERT_OUTPUT_STATE, true + case 148: + return KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_TIMED_ON_RETRIGGER_FUNCTION, true + case 149: + return KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_MANUAL_OFF_ENABLE, true + case 15: + return KnxInterfaceObjectProperty_PID_GENERAL_ORDER_INFO, true + case 150: + return KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_INVERT_LOCK_DEVICE, true + case 151: + return KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_LOCK_STATE, true + case 152: + return KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_UNLOCK_STATE, true + case 153: + return KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_STATE_FOR_SCENE_NUMBER, true + case 154: + return KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_STORAGE_FUNCTION_FOR_SCENE, true + case 155: + return KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_BUS_POWER_UP_STATE, true + case 156: + return KnxInterfaceObjectProperty_PID_LIGHT_SWITCHING_ACTUATOR_BASIC_BEHAVIOUR_BUS_POWER_UP_2, true + case 157: + return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_ON_DELAY, true + case 158: + return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_OFF_DELAY, true + case 159: + return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_SWITCH_OFF_BRIGHTNESS_DELAY_TIME, true + case 16: + return KnxInterfaceObjectProperty_PID_GENERAL_PEI_TYPE, true + case 160: + return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_TIMED_ON_DURATION, true + case 161: + return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_PREWARNING_DURATION, true + case 162: + return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_TRANSMISSION_CYCLE_TIME, true + case 163: + return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_BUS_POWER_UP_MESSAGE_DELAY, true + case 164: + return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_DIMMING_SPEED, true + case 165: + return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_DIMMING_STEP_TIME, true + case 166: + return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_DIMMING_SPEED_FOR_SWITCH_ON_SET_VALUE, true + case 167: + return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_DIMMING_SPEED_FOR_SWITCH_OFF, true + case 168: + return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_DIMMING_STEP_TIME_FOR_SWITCH_ON_SET_VALUE, true + case 169: + return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_DIMMING_STEP_TIME_FOR_SWITCH_OFF, true + case 17: + return KnxInterfaceObjectProperty_PID_GENERAL_PORT_CONFIGURATION, true + case 170: + return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_SWITCFH_OFF_BRIGHTNESS, true + case 171: + return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_MINIMUM_SET_VALUE, true + case 172: + return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_MAXIMUM_SET_VALUE, true + case 173: + return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_SWITCH_ON_SET_VALUE, true + case 174: + return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_DIMM_MODE_SELECTION, true + case 175: + return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_RELATIV_OFF_ENABLE, true + case 176: + return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_MEMORY_FUNCTION, true + case 177: + return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_TIMED_ON_RETRIGGER_FUNCTION, true + case 178: + return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_MANUAL_OFF_ENABLE, true + case 179: + return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_INVERT_LOCK_DEVICE, true + case 18: + return KnxInterfaceObjectProperty_PID_GENERAL_POLL_GROUP_SETTINGS, true + case 180: + return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_BEHAVIOUR_AT_LOCKING, true + case 181: + return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_BEHAVIOUR_AT_UNLOCKING, true + case 182: + return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_LOCK_SETVALUE, true + case 183: + return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_UNLOCK_SETVALUE, true + case 184: + return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_BIGHTNESS_FOR_SCENE, true + case 185: + return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_STORAGE_FUNCTION_FOR_SCENE, true + case 186: + return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_DELTA_DIMMING_VALUE, true + case 187: + return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_BEHAVIOUR_BUS_POWER_UP, true + case 188: + return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_BEHAVIOUR_BUS_POWER_UP_SET_VALUE, true + case 189: + return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_BEHAVIOUR_BUS_POWER_DOWN, true + case 19: + return KnxInterfaceObjectProperty_PID_GENERAL_MANUFACTURER_DATA, true + case 190: + return KnxInterfaceObjectProperty_PID_DIMMING_ACTUATOR_BASIC_BUS_POWER_DOWN_SET_VALUE, true + case 191: + return KnxInterfaceObjectProperty_PID_DIMMING_SENSOR_BASIC_ON_OFF_ACTION, true + case 192: + return KnxInterfaceObjectProperty_PID_DIMMING_SENSOR_BASIC_ENABLE_TOGGLE_MODE, true + case 193: + return KnxInterfaceObjectProperty_PID_DIMMING_SENSOR_BASIC_ABSOLUTE_SETVALUE, true + case 194: + return KnxInterfaceObjectProperty_PID_SWITCHING_SENSOR_BASIC_ON_OFF_ACTION, true + case 195: + return KnxInterfaceObjectProperty_PID_SWITCHING_SENSOR_BASIC_ENABLE_TOGGLE_MODE, true + case 196: + return KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_REVERSION_PAUSE_TIME, true + case 197: + return KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_MOVE_UP_DOWN_TIME, true + case 198: + return KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_SLAT_STEP_TIME, true + case 199: + return KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_MOVE_PRESET_POSITION_TIME, true + case 2: + return KnxInterfaceObjectProperty_PID_GENERAL_OBJECT_NAME, true + case 20: + return KnxInterfaceObjectProperty_PID_GENERAL_ENABLE, true + case 200: + return KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_MOVE_TO_PRESET_POSITION_IN_PERCENT, true + case 201: + return KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_MOVE_TO_PRESET_POSITION_LENGTH, true + case 202: + return KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_PRESET_SLAT_POSITION_PERCENT, true + case 203: + return KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_PRESET_SLAT_POSITION_ANGLE, true + case 204: + return KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_REACTION_WIND_ALARM, true + case 205: + return KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_HEARTBEAT_WIND_ALARM, true + case 206: + return KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_REACTION_ON_RAIN_ALARM, true + case 207: + return KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_HEARTBEAT_RAIN_ALARM, true + case 208: + return KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_REACTION_FROST_ALARM, true + case 209: + return KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_HEARTBEAT_FROST_ALARM, true + case 21: + return KnxInterfaceObjectProperty_PID_GENERAL_DESCRIPTION, true + case 210: + return KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_MAX_SLAT_MOVE_TIME, true + case 211: + return KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_ENABLE_BLINDS_MODE, true + case 212: + return KnxInterfaceObjectProperty_PID_SUNBLIND_ACTUATOR_BASIC_STORAGE_FUNCTIONS_FOR_SCENE, true + case 213: + return KnxInterfaceObjectProperty_PID_SUNBLIND_SENSOR_BASIC_ENABLE_BLINDS_MODE, true + case 214: + return KnxInterfaceObjectProperty_PID_SUNBLIND_SENSOR_BASIC_UP_DOWN_ACTION, true + case 215: + return KnxInterfaceObjectProperty_PID_SUNBLIND_SENSOR_BASIC_ENABLE_TOGGLE_MODE, true + case 22: + return KnxInterfaceObjectProperty_PID_GENERAL_FILE, true + case 23: + return KnxInterfaceObjectProperty_PID_GENERAL_TABLE, true + case 24: + return KnxInterfaceObjectProperty_PID_GENERAL_ENROL, true + case 25: + return KnxInterfaceObjectProperty_PID_GENERAL_VERSION, true + case 26: + return KnxInterfaceObjectProperty_PID_GENERAL_GROUP_OBJECT_LINK, true + case 27: + return KnxInterfaceObjectProperty_PID_GENERAL_MCB_TABLE, true + case 28: + return KnxInterfaceObjectProperty_PID_GENERAL_ERROR_CODE, true + case 29: + return KnxInterfaceObjectProperty_PID_GENERAL_OBJECT_INDEX, true + case 3: + return KnxInterfaceObjectProperty_PID_GENERAL_SEMAPHOR, true + case 30: + return KnxInterfaceObjectProperty_PID_GENERAL_DOWNLOAD_COUNTER, true + case 31: + return KnxInterfaceObjectProperty_PID_DEVICE_ROUTING_COUNT, true + case 32: + return KnxInterfaceObjectProperty_PID_DEVICE_MAX_RETRY_COUNT, true + case 33: + return KnxInterfaceObjectProperty_PID_DEVICE_ERROR_FLAGS, true + case 34: + return KnxInterfaceObjectProperty_PID_DEVICE_PROGMODE, true + case 35: + return KnxInterfaceObjectProperty_PID_DEVICE_PRODUCT_ID, true + case 36: + return KnxInterfaceObjectProperty_PID_DEVICE_MAX_APDULENGTH, true + case 37: + return KnxInterfaceObjectProperty_PID_DEVICE_SUBNET_ADDR, true + case 38: + return KnxInterfaceObjectProperty_PID_DEVICE_DEVICE_ADDR, true + case 39: + return KnxInterfaceObjectProperty_PID_DEVICE_PB_CONFIG, true + case 4: + return KnxInterfaceObjectProperty_PID_GENERAL_GROUP_OBJECT_REFERENCE, true + case 40: + return KnxInterfaceObjectProperty_PID_DEVICE_ADDR_REPORT, true + case 41: + return KnxInterfaceObjectProperty_PID_DEVICE_ADDR_CHECK, true + case 42: + return KnxInterfaceObjectProperty_PID_DEVICE_OBJECT_VALUE, true + case 43: + return KnxInterfaceObjectProperty_PID_DEVICE_OBJECTLINK, true + case 44: + return KnxInterfaceObjectProperty_PID_DEVICE_APPLICATION, true + case 45: + return KnxInterfaceObjectProperty_PID_DEVICE_PARAMETER, true + case 46: + return KnxInterfaceObjectProperty_PID_DEVICE_OBJECTADDRESS, true + case 47: + return KnxInterfaceObjectProperty_PID_DEVICE_PSU_TYPE, true + case 48: + return KnxInterfaceObjectProperty_PID_DEVICE_PSU_STATUS, true + case 49: + return KnxInterfaceObjectProperty_PID_DEVICE_PSU_ENABLE, true + case 5: + return KnxInterfaceObjectProperty_PID_GENERAL_LOAD_STATE_CONTROL, true + case 50: + return KnxInterfaceObjectProperty_PID_DEVICE_DOMAIN_ADDRESS, true + case 51: + return KnxInterfaceObjectProperty_PID_DEVICE_IO_LIST, true + case 52: + return KnxInterfaceObjectProperty_PID_DEVICE_MGT_DESCRIPTOR_01, true + case 53: + return KnxInterfaceObjectProperty_PID_DEVICE_PL110_PARAM, true + case 54: + return KnxInterfaceObjectProperty_PID_DEVICE_RF_REPEAT_COUNTER, true + case 55: + return KnxInterfaceObjectProperty_PID_DEVICE_RECEIVE_BLOCK_TABLE, true + case 56: + return KnxInterfaceObjectProperty_PID_DEVICE_RANDOM_PAUSE_TABLE, true + case 57: + return KnxInterfaceObjectProperty_PID_DEVICE_RECEIVE_BLOCK_NR, true + case 58: + return KnxInterfaceObjectProperty_PID_DEVICE_HARDWARE_TYPE, true + case 59: + return KnxInterfaceObjectProperty_PID_DEVICE_RETRANSMITTER_NUMBER, true + case 6: + return KnxInterfaceObjectProperty_PID_GENERAL_RUN_STATE_CONTROL, true + case 60: + return KnxInterfaceObjectProperty_PID_DEVICE_SERIAL_NR_TABLE, true + case 61: + return KnxInterfaceObjectProperty_PID_DEVICE_BIBATMASTER_ADDRESS, true + case 62: + return KnxInterfaceObjectProperty_PID_DEVICE_RF_DOMAIN_ADDRESS, true + case 63: + return KnxInterfaceObjectProperty_PID_DEVICE_DEVICE_DESCRIPTOR, true + case 64: + return KnxInterfaceObjectProperty_PID_DEVICE_METERING_FILTER_TABLE, true + case 65: + return KnxInterfaceObjectProperty_PID_DEVICE_GROUP_TELEGR_RATE_LIMIT_TIME_BASE, true + case 66: + return KnxInterfaceObjectProperty_PID_DEVICE_GROUP_TELEGR_RATE_LIMIT_NO_OF_TELEGR, true + case 67: + return KnxInterfaceObjectProperty_PID_GROUP_OBJECT_TABLE_GRPOBJTABLE, true + case 68: + return KnxInterfaceObjectProperty_PID_GROUP_OBJECT_TABLE_EXT_GRPOBJREFERENCE, true + case 69: + return KnxInterfaceObjectProperty_PID_ROUTER_LINE_STATUS, true + case 7: + return KnxInterfaceObjectProperty_PID_GENERAL_TABLE_REFERENCE, true + case 70: + return KnxInterfaceObjectProperty_PID_ROUTER_MAIN_LCCONFIG, true + case 71: + return KnxInterfaceObjectProperty_PID_ROUTER_SUB_LCCONFIG, true + case 72: + return KnxInterfaceObjectProperty_PID_ROUTER_MAIN_LCGRPCONFIG, true + case 73: + return KnxInterfaceObjectProperty_PID_ROUTER_SUB_LCGRPCONFIG, true + case 74: + return KnxInterfaceObjectProperty_PID_ROUTER_ROUTETABLE_CONTROL, true + case 75: + return KnxInterfaceObjectProperty_PID_ROUTER_COUPL_SERV_CONTROL, true + case 76: + return KnxInterfaceObjectProperty_PID_ROUTER_MAX_ROUTER_APDU_LENGTH, true + case 77: + return KnxInterfaceObjectProperty_PID_ROUTER_MEDIUM, true + case 78: + return KnxInterfaceObjectProperty_PID_ROUTER_FILTER_TABLE_USE, true + case 79: + return KnxInterfaceObjectProperty_PID_ROUTER_RF_ENABLE_SBC, true + case 8: + return KnxInterfaceObjectProperty_PID_GENERAL_SERVICE_CONTROL, true + case 80: + return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_PROJECT_INSTALLATION_ID, true + case 81: + return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_KNX_INDIVIDUAL_ADDRESS, true + case 82: + return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_ADDITIONAL_INDIVIDUAL_ADDRESSES, true + case 83: + return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_CURRENT_IP_ASSIGNMENT_METHOD, true + case 84: + return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_IP_ASSIGNMENT_METHOD, true + case 85: + return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_IP_CAPABILITIES, true + case 86: + return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_CURRENT_IP_ADDRESS, true + case 87: + return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_CURRENT_SUBNET_MASK, true + case 88: + return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_CURRENT_DEFAULT_GATEWAY, true + case 89: + return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_IP_ADDRESS, true + case 9: + return KnxInterfaceObjectProperty_PID_GENERAL_FIRMWARE_REVISION, true + case 90: + return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_SUBNET_MASK, true + case 91: + return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_DEFAULT_GATEWAY, true + case 92: + return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_DHCP_BOOTP_SERVER, true + case 93: + return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_MAC_ADDRESS, true + case 94: + return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_SYSTEM_SETUP_MULTICAST_ADDRESS, true + case 95: + return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_ROUTING_MULTICAST_ADDRESS, true + case 96: + return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_TTL, true + case 97: + return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_KNXNETIP_DEVICE_CAPABILITIES, true + case 98: + return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_KNXNETIP_DEVICE_STATE, true + case 99: + return KnxInterfaceObjectProperty_PID_KNXIP_PARAMETER_KNXNETIP_ROUTING_CAPABILITIES, true } return 0, false } @@ -4884,13 +4017,13 @@ func KnxInterfaceObjectPropertyByName(value string) (enum KnxInterfaceObjectProp return 0, false } -func KnxInterfaceObjectPropertyKnows(value uint32) bool { +func KnxInterfaceObjectPropertyKnows(value uint32) bool { for _, typeValue := range KnxInterfaceObjectPropertyValues { if uint32(typeValue) == value { return true } } - return false + return false; } func CastKnxInterfaceObjectProperty(structType interface{}) KnxInterfaceObjectProperty { @@ -5382,3 +4515,4 @@ func (e KnxInterfaceObjectProperty) PLC4XEnumName() string { func (e KnxInterfaceObjectProperty) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/knxnetip/readwrite/model/KnxInterfaceObjectType.go b/plc4go/protocols/knxnetip/readwrite/model/KnxInterfaceObjectType.go index 3192e8a1c10..60b624d053b 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/KnxInterfaceObjectType.go +++ b/plc4go/protocols/knxnetip/readwrite/model/KnxInterfaceObjectType.go @@ -36,39 +36,39 @@ type IKnxInterfaceObjectType interface { Name() string } -const ( - KnxInterfaceObjectType_OT_UNKNOWN KnxInterfaceObjectType = 0 - KnxInterfaceObjectType_OT_GENERAL KnxInterfaceObjectType = 1 - KnxInterfaceObjectType_OT_DEVICE KnxInterfaceObjectType = 2 - KnxInterfaceObjectType_OT_ADDRESS_TABLE KnxInterfaceObjectType = 3 - KnxInterfaceObjectType_OT_ASSOCIATION_TABLE KnxInterfaceObjectType = 4 - KnxInterfaceObjectType_OT_APPLICATION_PROGRAM KnxInterfaceObjectType = 5 - KnxInterfaceObjectType_OT_INTERACE_PROGRAM KnxInterfaceObjectType = 6 - KnxInterfaceObjectType_OT_EIBOBJECT_ASSOCIATATION_TABLE KnxInterfaceObjectType = 7 - KnxInterfaceObjectType_OT_ROUTER KnxInterfaceObjectType = 8 - KnxInterfaceObjectType_OT_LTE_ADDRESS_ROUTING_TABLE KnxInterfaceObjectType = 9 - KnxInterfaceObjectType_OT_CEMI_SERVER KnxInterfaceObjectType = 10 - KnxInterfaceObjectType_OT_GROUP_OBJECT_TABLE KnxInterfaceObjectType = 11 - KnxInterfaceObjectType_OT_POLLING_MASTER KnxInterfaceObjectType = 12 - KnxInterfaceObjectType_OT_KNXIP_PARAMETER KnxInterfaceObjectType = 13 - KnxInterfaceObjectType_OT_FILE_SERVER KnxInterfaceObjectType = 14 - KnxInterfaceObjectType_OT_SECURITY KnxInterfaceObjectType = 15 - KnxInterfaceObjectType_OT_RF_MEDIUM KnxInterfaceObjectType = 16 - KnxInterfaceObjectType_OT_INDOOR_BRIGHTNESS_SENSOR KnxInterfaceObjectType = 17 - KnxInterfaceObjectType_OT_INDOOR_LUMINANCE_SENSOR KnxInterfaceObjectType = 18 +const( + KnxInterfaceObjectType_OT_UNKNOWN KnxInterfaceObjectType = 0 + KnxInterfaceObjectType_OT_GENERAL KnxInterfaceObjectType = 1 + KnxInterfaceObjectType_OT_DEVICE KnxInterfaceObjectType = 2 + KnxInterfaceObjectType_OT_ADDRESS_TABLE KnxInterfaceObjectType = 3 + KnxInterfaceObjectType_OT_ASSOCIATION_TABLE KnxInterfaceObjectType = 4 + KnxInterfaceObjectType_OT_APPLICATION_PROGRAM KnxInterfaceObjectType = 5 + KnxInterfaceObjectType_OT_INTERACE_PROGRAM KnxInterfaceObjectType = 6 + KnxInterfaceObjectType_OT_EIBOBJECT_ASSOCIATATION_TABLE KnxInterfaceObjectType = 7 + KnxInterfaceObjectType_OT_ROUTER KnxInterfaceObjectType = 8 + KnxInterfaceObjectType_OT_LTE_ADDRESS_ROUTING_TABLE KnxInterfaceObjectType = 9 + KnxInterfaceObjectType_OT_CEMI_SERVER KnxInterfaceObjectType = 10 + KnxInterfaceObjectType_OT_GROUP_OBJECT_TABLE KnxInterfaceObjectType = 11 + KnxInterfaceObjectType_OT_POLLING_MASTER KnxInterfaceObjectType = 12 + KnxInterfaceObjectType_OT_KNXIP_PARAMETER KnxInterfaceObjectType = 13 + KnxInterfaceObjectType_OT_FILE_SERVER KnxInterfaceObjectType = 14 + KnxInterfaceObjectType_OT_SECURITY KnxInterfaceObjectType = 15 + KnxInterfaceObjectType_OT_RF_MEDIUM KnxInterfaceObjectType = 16 + KnxInterfaceObjectType_OT_INDOOR_BRIGHTNESS_SENSOR KnxInterfaceObjectType = 17 + KnxInterfaceObjectType_OT_INDOOR_LUMINANCE_SENSOR KnxInterfaceObjectType = 18 KnxInterfaceObjectType_OT_LIGHT_SWITCHING_ACTUATOR_BASIC KnxInterfaceObjectType = 19 - KnxInterfaceObjectType_OT_DIMMING_ACTUATOR_BASIC KnxInterfaceObjectType = 20 - KnxInterfaceObjectType_OT_DIMMING_SENSOR_BASIC KnxInterfaceObjectType = 21 - KnxInterfaceObjectType_OT_SWITCHING_SENSOR_BASIC KnxInterfaceObjectType = 22 - KnxInterfaceObjectType_OT_SUNBLIND_ACTUATOR_BASIC KnxInterfaceObjectType = 23 - KnxInterfaceObjectType_OT_SUNBLIND_SENSOR_BASIC KnxInterfaceObjectType = 24 + KnxInterfaceObjectType_OT_DIMMING_ACTUATOR_BASIC KnxInterfaceObjectType = 20 + KnxInterfaceObjectType_OT_DIMMING_SENSOR_BASIC KnxInterfaceObjectType = 21 + KnxInterfaceObjectType_OT_SWITCHING_SENSOR_BASIC KnxInterfaceObjectType = 22 + KnxInterfaceObjectType_OT_SUNBLIND_ACTUATOR_BASIC KnxInterfaceObjectType = 23 + KnxInterfaceObjectType_OT_SUNBLIND_SENSOR_BASIC KnxInterfaceObjectType = 24 ) var KnxInterfaceObjectTypeValues []KnxInterfaceObjectType func init() { _ = errors.New - KnxInterfaceObjectTypeValues = []KnxInterfaceObjectType{ + KnxInterfaceObjectTypeValues = []KnxInterfaceObjectType { KnxInterfaceObjectType_OT_UNKNOWN, KnxInterfaceObjectType_OT_GENERAL, KnxInterfaceObjectType_OT_DEVICE, @@ -97,110 +97,85 @@ func init() { } } + func (e KnxInterfaceObjectType) Code() string { - switch e { - case 0: - { /* '0' */ - return "U" + switch e { + case 0: { /* '0' */ + return "U" } - case 1: - { /* '1' */ - return "G" + case 1: { /* '1' */ + return "G" } - case 10: - { /* '10' */ - return "8" + case 10: { /* '10' */ + return "8" } - case 11: - { /* '11' */ - return "9" + case 11: { /* '11' */ + return "9" } - case 12: - { /* '12' */ - return "10" + case 12: { /* '12' */ + return "10" } - case 13: - { /* '13' */ - return "11" + case 13: { /* '13' */ + return "11" } - case 14: - { /* '14' */ - return "13" + case 14: { /* '14' */ + return "13" } - case 15: - { /* '15' */ - return "17" + case 15: { /* '15' */ + return "17" } - case 16: - { /* '16' */ - return "19" + case 16: { /* '16' */ + return "19" } - case 17: - { /* '17' */ - return "409" + case 17: { /* '17' */ + return "409" } - case 18: - { /* '18' */ - return "410" + case 18: { /* '18' */ + return "410" } - case 19: - { /* '19' */ - return "417" + case 19: { /* '19' */ + return "417" } - case 2: - { /* '2' */ - return "0" + case 2: { /* '2' */ + return "0" } - case 20: - { /* '20' */ - return "418" + case 20: { /* '20' */ + return "418" } - case 21: - { /* '21' */ - return "420" + case 21: { /* '21' */ + return "420" } - case 22: - { /* '22' */ - return "421" + case 22: { /* '22' */ + return "421" } - case 23: - { /* '23' */ - return "800" + case 23: { /* '23' */ + return "800" } - case 24: - { /* '24' */ - return "801" + case 24: { /* '24' */ + return "801" } - case 3: - { /* '3' */ - return "1" + case 3: { /* '3' */ + return "1" } - case 4: - { /* '4' */ - return "2" + case 4: { /* '4' */ + return "2" } - case 5: - { /* '5' */ - return "3" + case 5: { /* '5' */ + return "3" } - case 6: - { /* '6' */ - return "4" + case 6: { /* '6' */ + return "4" } - case 7: - { /* '7' */ - return "5" + case 7: { /* '7' */ + return "5" } - case 8: - { /* '8' */ - return "6" + case 8: { /* '8' */ + return "6" } - case 9: - { /* '9' */ - return "7" + case 9: { /* '9' */ + return "7" } - default: - { + default: { return "" } } @@ -216,109 +191,83 @@ func KnxInterfaceObjectTypeFirstEnumForFieldCode(value string) (KnxInterfaceObje } func (e KnxInterfaceObjectType) Name() string { - switch e { - case 0: - { /* '0' */ - return "Unknown Interface Object Type" + switch e { + case 0: { /* '0' */ + return "Unknown Interface Object Type" } - case 1: - { /* '1' */ - return "General Interface Object Type" + case 1: { /* '1' */ + return "General Interface Object Type" } - case 10: - { /* '10' */ - return "cEMI Server Object" + case 10: { /* '10' */ + return "cEMI Server Object" } - case 11: - { /* '11' */ - return "Group Object Table Object" + case 11: { /* '11' */ + return "Group Object Table Object" } - case 12: - { /* '12' */ - return "Polling Master" + case 12: { /* '12' */ + return "Polling Master" } - case 13: - { /* '13' */ - return "KNXnet/IP Parameter Object" + case 13: { /* '13' */ + return "KNXnet/IP Parameter Object" } - case 14: - { /* '14' */ - return "File Server Object" + case 14: { /* '14' */ + return "File Server Object" } - case 15: - { /* '15' */ - return "Security Object" + case 15: { /* '15' */ + return "Security Object" } - case 16: - { /* '16' */ - return "RF Medium Object" + case 16: { /* '16' */ + return "RF Medium Object" } - case 17: - { /* '17' */ - return "Indoor Brightness Sensor" + case 17: { /* '17' */ + return "Indoor Brightness Sensor" } - case 18: - { /* '18' */ - return "Indoor Luminance Sensor" + case 18: { /* '18' */ + return "Indoor Luminance Sensor" } - case 19: - { /* '19' */ - return "Light Switching Actuator Basic" + case 19: { /* '19' */ + return "Light Switching Actuator Basic" } - case 2: - { /* '2' */ - return "Device Object" + case 2: { /* '2' */ + return "Device Object" } - case 20: - { /* '20' */ - return "Dimming Actuator Basic" + case 20: { /* '20' */ + return "Dimming Actuator Basic" } - case 21: - { /* '21' */ - return "Dimming Sensor Basic" + case 21: { /* '21' */ + return "Dimming Sensor Basic" } - case 22: - { /* '22' */ - return "Switching Sensor Basic" + case 22: { /* '22' */ + return "Switching Sensor Basic" } - case 23: - { /* '23' */ - return "Sunblind Actuator Basic" + case 23: { /* '23' */ + return "Sunblind Actuator Basic" } - case 24: - { /* '24' */ - return "Sunblind Sensor Basic" + case 24: { /* '24' */ + return "Sunblind Sensor Basic" } - case 3: - { /* '3' */ - return "Addresstable Object" + case 3: { /* '3' */ + return "Addresstable Object" } - case 4: - { /* '4' */ - return "Associationtable Object" + case 4: { /* '4' */ + return "Associationtable Object" } - case 5: - { /* '5' */ - return "Applicationprogram Object" + case 5: { /* '5' */ + return "Applicationprogram Object" } - case 6: - { /* '6' */ - return "Interfaceprogram Object" + case 6: { /* '6' */ + return "Interfaceprogram Object" } - case 7: - { /* '7' */ - return "KNX-Object Associationtable Object" + case 7: { /* '7' */ + return "KNX-Object Associationtable Object" } - case 8: - { /* '8' */ - return "Router Object" + case 8: { /* '8' */ + return "Router Object" } - case 9: - { /* '9' */ - return "LTE Address Routing Table Object" + case 9: { /* '9' */ + return "LTE Address Routing Table Object" } - default: - { + default: { return "" } } @@ -334,56 +283,56 @@ func KnxInterfaceObjectTypeFirstEnumForFieldName(value string) (KnxInterfaceObje } func KnxInterfaceObjectTypeByValue(value uint16) (enum KnxInterfaceObjectType, ok bool) { switch value { - case 0: - return KnxInterfaceObjectType_OT_UNKNOWN, true - case 1: - return KnxInterfaceObjectType_OT_GENERAL, true - case 10: - return KnxInterfaceObjectType_OT_CEMI_SERVER, true - case 11: - return KnxInterfaceObjectType_OT_GROUP_OBJECT_TABLE, true - case 12: - return KnxInterfaceObjectType_OT_POLLING_MASTER, true - case 13: - return KnxInterfaceObjectType_OT_KNXIP_PARAMETER, true - case 14: - return KnxInterfaceObjectType_OT_FILE_SERVER, true - case 15: - return KnxInterfaceObjectType_OT_SECURITY, true - case 16: - return KnxInterfaceObjectType_OT_RF_MEDIUM, true - case 17: - return KnxInterfaceObjectType_OT_INDOOR_BRIGHTNESS_SENSOR, true - case 18: - return KnxInterfaceObjectType_OT_INDOOR_LUMINANCE_SENSOR, true - case 19: - return KnxInterfaceObjectType_OT_LIGHT_SWITCHING_ACTUATOR_BASIC, true - case 2: - return KnxInterfaceObjectType_OT_DEVICE, true - case 20: - return KnxInterfaceObjectType_OT_DIMMING_ACTUATOR_BASIC, true - case 21: - return KnxInterfaceObjectType_OT_DIMMING_SENSOR_BASIC, true - case 22: - return KnxInterfaceObjectType_OT_SWITCHING_SENSOR_BASIC, true - case 23: - return KnxInterfaceObjectType_OT_SUNBLIND_ACTUATOR_BASIC, true - case 24: - return KnxInterfaceObjectType_OT_SUNBLIND_SENSOR_BASIC, true - case 3: - return KnxInterfaceObjectType_OT_ADDRESS_TABLE, true - case 4: - return KnxInterfaceObjectType_OT_ASSOCIATION_TABLE, true - case 5: - return KnxInterfaceObjectType_OT_APPLICATION_PROGRAM, true - case 6: - return KnxInterfaceObjectType_OT_INTERACE_PROGRAM, true - case 7: - return KnxInterfaceObjectType_OT_EIBOBJECT_ASSOCIATATION_TABLE, true - case 8: - return KnxInterfaceObjectType_OT_ROUTER, true - case 9: - return KnxInterfaceObjectType_OT_LTE_ADDRESS_ROUTING_TABLE, true + case 0: + return KnxInterfaceObjectType_OT_UNKNOWN, true + case 1: + return KnxInterfaceObjectType_OT_GENERAL, true + case 10: + return KnxInterfaceObjectType_OT_CEMI_SERVER, true + case 11: + return KnxInterfaceObjectType_OT_GROUP_OBJECT_TABLE, true + case 12: + return KnxInterfaceObjectType_OT_POLLING_MASTER, true + case 13: + return KnxInterfaceObjectType_OT_KNXIP_PARAMETER, true + case 14: + return KnxInterfaceObjectType_OT_FILE_SERVER, true + case 15: + return KnxInterfaceObjectType_OT_SECURITY, true + case 16: + return KnxInterfaceObjectType_OT_RF_MEDIUM, true + case 17: + return KnxInterfaceObjectType_OT_INDOOR_BRIGHTNESS_SENSOR, true + case 18: + return KnxInterfaceObjectType_OT_INDOOR_LUMINANCE_SENSOR, true + case 19: + return KnxInterfaceObjectType_OT_LIGHT_SWITCHING_ACTUATOR_BASIC, true + case 2: + return KnxInterfaceObjectType_OT_DEVICE, true + case 20: + return KnxInterfaceObjectType_OT_DIMMING_ACTUATOR_BASIC, true + case 21: + return KnxInterfaceObjectType_OT_DIMMING_SENSOR_BASIC, true + case 22: + return KnxInterfaceObjectType_OT_SWITCHING_SENSOR_BASIC, true + case 23: + return KnxInterfaceObjectType_OT_SUNBLIND_ACTUATOR_BASIC, true + case 24: + return KnxInterfaceObjectType_OT_SUNBLIND_SENSOR_BASIC, true + case 3: + return KnxInterfaceObjectType_OT_ADDRESS_TABLE, true + case 4: + return KnxInterfaceObjectType_OT_ASSOCIATION_TABLE, true + case 5: + return KnxInterfaceObjectType_OT_APPLICATION_PROGRAM, true + case 6: + return KnxInterfaceObjectType_OT_INTERACE_PROGRAM, true + case 7: + return KnxInterfaceObjectType_OT_EIBOBJECT_ASSOCIATATION_TABLE, true + case 8: + return KnxInterfaceObjectType_OT_ROUTER, true + case 9: + return KnxInterfaceObjectType_OT_LTE_ADDRESS_ROUTING_TABLE, true } return 0, false } @@ -444,13 +393,13 @@ func KnxInterfaceObjectTypeByName(value string) (enum KnxInterfaceObjectType, ok return 0, false } -func KnxInterfaceObjectTypeKnows(value uint16) bool { +func KnxInterfaceObjectTypeKnows(value uint16) bool { for _, typeValue := range KnxInterfaceObjectTypeValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastKnxInterfaceObjectType(structType interface{}) KnxInterfaceObjectType { @@ -560,3 +509,4 @@ func (e KnxInterfaceObjectType) PLC4XEnumName() string { func (e KnxInterfaceObjectType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/knxnetip/readwrite/model/KnxLayer.go b/plc4go/protocols/knxnetip/readwrite/model/KnxLayer.go index 8cbe3072100..c3ca098c5a2 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/KnxLayer.go +++ b/plc4go/protocols/knxnetip/readwrite/model/KnxLayer.go @@ -34,9 +34,9 @@ type IKnxLayer interface { utils.Serializable } -const ( +const( KnxLayer_TUNNEL_LINK_LAYER KnxLayer = 0x02 - KnxLayer_TUNNEL_RAW KnxLayer = 0x04 + KnxLayer_TUNNEL_RAW KnxLayer = 0x04 KnxLayer_TUNNEL_BUSMONITOR KnxLayer = 0x80 ) @@ -44,7 +44,7 @@ var KnxLayerValues []KnxLayer func init() { _ = errors.New - KnxLayerValues = []KnxLayer{ + KnxLayerValues = []KnxLayer { KnxLayer_TUNNEL_LINK_LAYER, KnxLayer_TUNNEL_RAW, KnxLayer_TUNNEL_BUSMONITOR, @@ -53,12 +53,12 @@ func init() { func KnxLayerByValue(value uint8) (enum KnxLayer, ok bool) { switch value { - case 0x02: - return KnxLayer_TUNNEL_LINK_LAYER, true - case 0x04: - return KnxLayer_TUNNEL_RAW, true - case 0x80: - return KnxLayer_TUNNEL_BUSMONITOR, true + case 0x02: + return KnxLayer_TUNNEL_LINK_LAYER, true + case 0x04: + return KnxLayer_TUNNEL_RAW, true + case 0x80: + return KnxLayer_TUNNEL_BUSMONITOR, true } return 0, false } @@ -75,13 +75,13 @@ func KnxLayerByName(value string) (enum KnxLayer, ok bool) { return 0, false } -func KnxLayerKnows(value uint8) bool { +func KnxLayerKnows(value uint8) bool { for _, typeValue := range KnxLayerValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastKnxLayer(structType interface{}) KnxLayer { @@ -147,3 +147,4 @@ func (e KnxLayer) PLC4XEnumName() string { func (e KnxLayer) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/knxnetip/readwrite/model/KnxManufacturer.go b/plc4go/protocols/knxnetip/readwrite/model/KnxManufacturer.go index ec9a1cddb89..dd3c6bf1a19 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/KnxManufacturer.go +++ b/plc4go/protocols/knxnetip/readwrite/model/KnxManufacturer.go @@ -36,630 +36,630 @@ type IKnxManufacturer interface { Name() string } -const ( - KnxManufacturer_M_UNKNOWN KnxManufacturer = 0 - KnxManufacturer_M_SIEMENS KnxManufacturer = 1 - KnxManufacturer_M_ABB KnxManufacturer = 2 - KnxManufacturer_M_ALBRECHT_JUNG KnxManufacturer = 3 - KnxManufacturer_M_BTICINO KnxManufacturer = 4 - KnxManufacturer_M_BERKER KnxManufacturer = 5 - KnxManufacturer_M_BUSCH_JAEGER_ELEKTRO KnxManufacturer = 6 - KnxManufacturer_M_GIRA_GIERSIEPEN KnxManufacturer = 7 - KnxManufacturer_M_HAGER_ELECTRO KnxManufacturer = 8 - KnxManufacturer_M_INSTA_GMBH KnxManufacturer = 9 - KnxManufacturer_M_LEGRAND_APPAREILLAGE_ELECTRIQUE KnxManufacturer = 10 - KnxManufacturer_M_MERTEN KnxManufacturer = 11 - KnxManufacturer_M_ABB_SPA_SACE_DIVISION KnxManufacturer = 12 - KnxManufacturer_M_SIEDLE_AND_SOEHNE KnxManufacturer = 13 - KnxManufacturer_M_EBERLE KnxManufacturer = 14 - KnxManufacturer_M_GEWISS KnxManufacturer = 15 - KnxManufacturer_M_ALBERT_ACKERMANN KnxManufacturer = 16 - KnxManufacturer_M_SCHUPA_GMBH KnxManufacturer = 17 - KnxManufacturer_M_ABB_SCHWEIZ KnxManufacturer = 18 - KnxManufacturer_M_FELLER KnxManufacturer = 19 - KnxManufacturer_M_GLAMOX_AS KnxManufacturer = 20 - KnxManufacturer_M_DEHN_AND_SOEHNE KnxManufacturer = 21 - KnxManufacturer_M_CRABTREE KnxManufacturer = 22 - KnxManufacturer_M_EVOKNX KnxManufacturer = 23 - KnxManufacturer_M_PAUL_HOCHKOEPPER KnxManufacturer = 24 - KnxManufacturer_M_ALTENBURGER_ELECTRONIC KnxManufacturer = 25 - KnxManufacturer_M_GRAESSLIN KnxManufacturer = 26 - KnxManufacturer_M_SIMON_42 KnxManufacturer = 27 - KnxManufacturer_M_VIMAR KnxManufacturer = 28 - KnxManufacturer_M_MOELLER_GEBAEUDEAUTOMATION_KG KnxManufacturer = 29 - KnxManufacturer_M_ELTAKO KnxManufacturer = 30 - KnxManufacturer_M_BOSCH_SIEMENS_HAUSHALTSGERAETE KnxManufacturer = 31 - KnxManufacturer_M_RITTO_GMBHANDCO_KG KnxManufacturer = 32 - KnxManufacturer_M_POWER_CONTROLS KnxManufacturer = 33 - KnxManufacturer_M_ZUMTOBEL KnxManufacturer = 34 - KnxManufacturer_M_PHOENIX_CONTACT KnxManufacturer = 35 - KnxManufacturer_M_WAGO_KONTAKTTECHNIK KnxManufacturer = 36 - KnxManufacturer_M_KNXPRESSO KnxManufacturer = 37 - KnxManufacturer_M_WIELAND_ELECTRIC KnxManufacturer = 38 - KnxManufacturer_M_HERMANN_KLEINHUIS KnxManufacturer = 39 - KnxManufacturer_M_STIEBEL_ELTRON KnxManufacturer = 40 - KnxManufacturer_M_TEHALIT KnxManufacturer = 41 - KnxManufacturer_M_THEBEN_AG KnxManufacturer = 42 - KnxManufacturer_M_WILHELM_RUTENBECK KnxManufacturer = 43 - KnxManufacturer_M_WINKHAUS KnxManufacturer = 44 - KnxManufacturer_M_ROBERT_BOSCH KnxManufacturer = 45 - KnxManufacturer_M_SOMFY KnxManufacturer = 46 - KnxManufacturer_M_WOERTZ KnxManufacturer = 47 - KnxManufacturer_M_VIESSMANN_WERKE KnxManufacturer = 48 - KnxManufacturer_M_IMI_HYDRONIC_ENGINEERING KnxManufacturer = 49 - KnxManufacturer_M_JOH__VAILLANT KnxManufacturer = 50 - KnxManufacturer_M_AMP_DEUTSCHLAND KnxManufacturer = 51 - KnxManufacturer_M_BOSCH_THERMOTECHNIK_GMBH KnxManufacturer = 52 - KnxManufacturer_M_SEF___ECOTEC KnxManufacturer = 53 - KnxManufacturer_M_DORMA_GMBH_Plus_CO__KG KnxManufacturer = 54 - KnxManufacturer_M_WINDOWMASTER_AS KnxManufacturer = 55 - KnxManufacturer_M_WALTHER_WERKE KnxManufacturer = 56 - KnxManufacturer_M_ORAS KnxManufacturer = 57 - KnxManufacturer_M_DAETWYLER KnxManufacturer = 58 - KnxManufacturer_M_ELECTRAK KnxManufacturer = 59 - KnxManufacturer_M_TECHEM KnxManufacturer = 60 - KnxManufacturer_M_SCHNEIDER_ELECTRIC_INDUSTRIES_SAS KnxManufacturer = 61 - KnxManufacturer_M_WHD_WILHELM_HUBER_Plus_SOEHNE KnxManufacturer = 62 - KnxManufacturer_M_BISCHOFF_ELEKTRONIK KnxManufacturer = 63 - KnxManufacturer_M_JEPAZ KnxManufacturer = 64 - KnxManufacturer_M_RTS_AUTOMATION KnxManufacturer = 65 - KnxManufacturer_M_EIBMARKT_GMBH KnxManufacturer = 66 - KnxManufacturer_M_WAREMA_RENKHOFF_SE KnxManufacturer = 67 - KnxManufacturer_M_EELECTRON KnxManufacturer = 68 - KnxManufacturer_M_BELDEN_WIRE_AND_CABLE_B_V_ KnxManufacturer = 69 - KnxManufacturer_M_BECKER_ANTRIEBE_GMBH KnxManufacturer = 70 - KnxManufacturer_M_J_STEHLEPlusSOEHNE_GMBH KnxManufacturer = 71 - KnxManufacturer_M_AGFEO KnxManufacturer = 72 - KnxManufacturer_M_ZENNIO KnxManufacturer = 73 - KnxManufacturer_M_TAPKO_TECHNOLOGIES KnxManufacturer = 74 - KnxManufacturer_M_HDL KnxManufacturer = 75 - KnxManufacturer_M_UPONOR KnxManufacturer = 76 - KnxManufacturer_M_SE_LIGHTMANAGEMENT_AG KnxManufacturer = 77 - KnxManufacturer_M_ARCUS_EDS KnxManufacturer = 78 - KnxManufacturer_M_INTESIS KnxManufacturer = 79 - KnxManufacturer_M_HERHOLDT_CONTROLS_SRL KnxManufacturer = 80 - KnxManufacturer_M_NIKO_ZUBLIN KnxManufacturer = 81 - KnxManufacturer_M_DURABLE_TECHNOLOGIES KnxManufacturer = 82 - KnxManufacturer_M_INNOTEAM KnxManufacturer = 83 - KnxManufacturer_M_ISE_GMBH KnxManufacturer = 84 - KnxManufacturer_M_TEAM_FOR_TRONICS KnxManufacturer = 85 - KnxManufacturer_M_CIAT KnxManufacturer = 86 - KnxManufacturer_M_REMEHA_BV KnxManufacturer = 87 - KnxManufacturer_M_ESYLUX KnxManufacturer = 88 - KnxManufacturer_M_BASALTE KnxManufacturer = 89 - KnxManufacturer_M_VESTAMATIC KnxManufacturer = 90 - KnxManufacturer_M_MDT_TECHNOLOGIES KnxManufacturer = 91 - KnxManufacturer_M_WARENDORFER_KUECHEN_GMBH KnxManufacturer = 92 - KnxManufacturer_M_VIDEO_STAR KnxManufacturer = 93 - KnxManufacturer_M_SITEK KnxManufacturer = 94 - KnxManufacturer_M_CONTROLTRONIC KnxManufacturer = 95 - KnxManufacturer_M_FUNCTION_TECHNOLOGY KnxManufacturer = 96 - KnxManufacturer_M_AMX KnxManufacturer = 97 - KnxManufacturer_M_ELDAT KnxManufacturer = 98 - KnxManufacturer_M_PANASONIC KnxManufacturer = 99 - KnxManufacturer_M_PULSE_TECHNOLOGIES KnxManufacturer = 100 - KnxManufacturer_M_CRESTRON KnxManufacturer = 101 - KnxManufacturer_M_STEINEL_PROFESSIONAL KnxManufacturer = 102 - KnxManufacturer_M_BILTON_LED_LIGHTING KnxManufacturer = 103 - KnxManufacturer_M_DENRO_AG KnxManufacturer = 104 - KnxManufacturer_M_GEPRO KnxManufacturer = 105 - KnxManufacturer_M_PREUSSEN_AUTOMATION KnxManufacturer = 106 - KnxManufacturer_M_ZOPPAS_INDUSTRIES KnxManufacturer = 107 - KnxManufacturer_M_MACTECH KnxManufacturer = 108 - KnxManufacturer_M_TECHNO_TREND KnxManufacturer = 109 - KnxManufacturer_M_FS_CABLES KnxManufacturer = 110 - KnxManufacturer_M_DELTA_DORE KnxManufacturer = 111 - KnxManufacturer_M_EISSOUND KnxManufacturer = 112 - KnxManufacturer_M_CISCO KnxManufacturer = 113 - KnxManufacturer_M_DINUY KnxManufacturer = 114 - KnxManufacturer_M_IKNIX KnxManufacturer = 115 - KnxManufacturer_M_RADEMACHER_GERAETE_ELEKTRONIK_GMBH KnxManufacturer = 116 - KnxManufacturer_M_EGI_ELECTROACUSTICA_GENERAL_IBERICA KnxManufacturer = 117 - KnxManufacturer_M_BES___INGENIUM KnxManufacturer = 118 - KnxManufacturer_M_ELABNET KnxManufacturer = 119 - KnxManufacturer_M_BLUMOTIX KnxManufacturer = 120 - KnxManufacturer_M_HUNTER_DOUGLAS KnxManufacturer = 121 - KnxManufacturer_M_APRICUM KnxManufacturer = 122 - KnxManufacturer_M_TIANSU_AUTOMATION KnxManufacturer = 123 - KnxManufacturer_M_BUBENDORFF KnxManufacturer = 124 - KnxManufacturer_M_MBS_GMBH KnxManufacturer = 125 - KnxManufacturer_M_ENERTEX_BAYERN_GMBH KnxManufacturer = 126 - KnxManufacturer_M_BMS KnxManufacturer = 127 - KnxManufacturer_M_SINAPSI KnxManufacturer = 128 - KnxManufacturer_M_EMBEDDED_SYSTEMS_SIA KnxManufacturer = 129 - KnxManufacturer_M_KNX1 KnxManufacturer = 130 - KnxManufacturer_M_TOKKA KnxManufacturer = 131 - KnxManufacturer_M_NANOSENSE KnxManufacturer = 132 - KnxManufacturer_M_PEAR_AUTOMATION_GMBH KnxManufacturer = 133 - KnxManufacturer_M_DGA KnxManufacturer = 134 - KnxManufacturer_M_LUTRON KnxManufacturer = 135 - KnxManufacturer_M_AIRZONE___ALTRA KnxManufacturer = 136 - KnxManufacturer_M_LITHOSS_DESIGN_SWITCHES KnxManufacturer = 137 - KnxManufacturer_M_THREEATEL KnxManufacturer = 138 - KnxManufacturer_M_PHILIPS_CONTROLS KnxManufacturer = 139 - KnxManufacturer_M_VELUX_AS KnxManufacturer = 140 - KnxManufacturer_M_LOYTEC KnxManufacturer = 141 - KnxManufacturer_M_EKINEX_S_P_A_ KnxManufacturer = 142 - KnxManufacturer_M_SIRLAN_TECHNOLOGIES KnxManufacturer = 143 - KnxManufacturer_M_PROKNX_SAS KnxManufacturer = 144 - KnxManufacturer_M_IT_GMBH KnxManufacturer = 145 - KnxManufacturer_M_RENSON KnxManufacturer = 146 - KnxManufacturer_M_HEP_GROUP KnxManufacturer = 147 - KnxManufacturer_M_BALMART KnxManufacturer = 148 - KnxManufacturer_M_GFS_GMBH KnxManufacturer = 149 - KnxManufacturer_M_SCHENKER_STOREN_AG KnxManufacturer = 150 - KnxManufacturer_M_ALGODUE_ELETTRONICA_S_R_L_ KnxManufacturer = 151 - KnxManufacturer_M_ABB_FRANCE KnxManufacturer = 152 - KnxManufacturer_M_MAINTRONIC KnxManufacturer = 153 - KnxManufacturer_M_VANTAGE KnxManufacturer = 154 - KnxManufacturer_M_FORESIS KnxManufacturer = 155 - KnxManufacturer_M_RESEARCH_AND_PRODUCTION_ASSOCIATION_SEM KnxManufacturer = 156 - KnxManufacturer_M_WEINZIERL_ENGINEERING_GMBH KnxManufacturer = 157 - KnxManufacturer_M_MOEHLENHOFF_WAERMETECHNIK_GMBH KnxManufacturer = 158 - KnxManufacturer_M_PKC_GROUP_OYJ KnxManufacturer = 159 - KnxManufacturer_M_B_E_G_ KnxManufacturer = 160 - KnxManufacturer_M_ELSNER_ELEKTRONIK_GMBH KnxManufacturer = 161 - KnxManufacturer_M_SIEMENS_BUILDING_TECHNOLOGIES_HKCHINA_LTD_ KnxManufacturer = 162 - KnxManufacturer_M_EUTRAC KnxManufacturer = 163 - KnxManufacturer_M_GUSTAV_HENSEL_GMBH_AND_CO__KG KnxManufacturer = 164 - KnxManufacturer_M_GARO_AB KnxManufacturer = 165 - KnxManufacturer_M_WALDMANN_LICHTTECHNIK KnxManufacturer = 166 - KnxManufacturer_M_SCHUECO KnxManufacturer = 167 - KnxManufacturer_M_EMU KnxManufacturer = 168 - KnxManufacturer_M_JNET_SYSTEMS_AG KnxManufacturer = 169 - KnxManufacturer_M_TOTAL_SOLUTION_GMBH KnxManufacturer = 170 - KnxManufacturer_M_O_Y_L__ELECTRONICS KnxManufacturer = 171 - KnxManufacturer_M_GALAX_SYSTEM KnxManufacturer = 172 - KnxManufacturer_M_DISCH KnxManufacturer = 173 - KnxManufacturer_M_AUCOTEAM KnxManufacturer = 174 - KnxManufacturer_M_LUXMATE_CONTROLS KnxManufacturer = 175 - KnxManufacturer_M_DANFOSS KnxManufacturer = 176 - KnxManufacturer_M_AST_GMBH KnxManufacturer = 177 - KnxManufacturer_M_WILA_LEUCHTEN KnxManufacturer = 178 - KnxManufacturer_M_BPlusB_AUTOMATIONS__UND_STEUERUNGSTECHNIK KnxManufacturer = 179 - KnxManufacturer_M_LINGG_AND_JANKE KnxManufacturer = 180 - KnxManufacturer_M_SAUTER KnxManufacturer = 181 - KnxManufacturer_M_SIMU KnxManufacturer = 182 - KnxManufacturer_M_THEBEN_HTS_AG KnxManufacturer = 183 - KnxManufacturer_M_AMANN_GMBH KnxManufacturer = 184 - KnxManufacturer_M_BERG_ENERGIEKONTROLLSYSTEME_GMBH KnxManufacturer = 185 - KnxManufacturer_M_HUEPPE_FORM_SONNENSCHUTZSYSTEME_GMBH KnxManufacturer = 186 - KnxManufacturer_M_OVENTROP_KG KnxManufacturer = 187 - KnxManufacturer_M_GRIESSER_AG KnxManufacturer = 188 - KnxManufacturer_M_IPAS_GMBH KnxManufacturer = 189 - KnxManufacturer_M_ELERO_GMBH KnxManufacturer = 190 - KnxManufacturer_M_ARDAN_PRODUCTION_AND_INDUSTRIAL_CONTROLS_LTD_ KnxManufacturer = 191 - KnxManufacturer_M_METEC_MESSTECHNIK_GMBH KnxManufacturer = 192 - KnxManufacturer_M_ELKA_ELEKTRONIK_GMBH KnxManufacturer = 193 - KnxManufacturer_M_ELEKTROANLAGEN_D__NAGEL KnxManufacturer = 194 - KnxManufacturer_M_TRIDONIC_BAUELEMENTE_GMBH KnxManufacturer = 195 - KnxManufacturer_M_STENGLER_GESELLSCHAFT KnxManufacturer = 196 - KnxManufacturer_M_SCHNEIDER_ELECTRIC_MG KnxManufacturer = 197 - KnxManufacturer_M_KNX_ASSOCIATION KnxManufacturer = 198 - KnxManufacturer_M_VIVO KnxManufacturer = 199 - KnxManufacturer_M_HUGO_MUELLER_GMBH_AND_CO_KG KnxManufacturer = 200 - KnxManufacturer_M_SIEMENS_HVAC KnxManufacturer = 201 - KnxManufacturer_M_APT KnxManufacturer = 202 - KnxManufacturer_M_HIGHDOM KnxManufacturer = 203 - KnxManufacturer_M_TOP_SERVICES KnxManufacturer = 204 - KnxManufacturer_M_AMBIHOME KnxManufacturer = 205 - KnxManufacturer_M_DATEC_ELECTRONIC_AG KnxManufacturer = 206 - KnxManufacturer_M_ABUS_SECURITY_CENTER KnxManufacturer = 207 - KnxManufacturer_M_LITE_PUTER KnxManufacturer = 208 - KnxManufacturer_M_TANTRON_ELECTRONIC KnxManufacturer = 209 - KnxManufacturer_M_INTERRA KnxManufacturer = 210 - KnxManufacturer_M_DKX_TECH KnxManufacturer = 211 - KnxManufacturer_M_VIATRON KnxManufacturer = 212 - KnxManufacturer_M_NAUTIBUS KnxManufacturer = 213 - KnxManufacturer_M_ON_SEMICONDUCTOR KnxManufacturer = 214 - KnxManufacturer_M_LONGCHUANG KnxManufacturer = 215 - KnxManufacturer_M_AIR_ON_AG KnxManufacturer = 216 - KnxManufacturer_M_IB_COMPANY_GMBH KnxManufacturer = 217 - KnxManufacturer_M_SATION_FACTORY KnxManufacturer = 218 - KnxManufacturer_M_AGENTILO_GMBH KnxManufacturer = 219 - KnxManufacturer_M_MAKEL_ELEKTRIK KnxManufacturer = 220 - KnxManufacturer_M_HELIOS_VENTILATOREN KnxManufacturer = 221 - KnxManufacturer_M_OTTO_SOLUTIONS_PTE_LTD KnxManufacturer = 222 - KnxManufacturer_M_AIRMASTER KnxManufacturer = 223 - KnxManufacturer_M_VALLOX_GMBH KnxManufacturer = 224 - KnxManufacturer_M_DALITEK KnxManufacturer = 225 - KnxManufacturer_M_ASIN KnxManufacturer = 226 - KnxManufacturer_M_BRIDGES_INTELLIGENCE_TECHNOLOGY_INC_ KnxManufacturer = 227 - KnxManufacturer_M_ARBONIA KnxManufacturer = 228 - KnxManufacturer_M_KERMI KnxManufacturer = 229 - KnxManufacturer_M_PROLUX KnxManufacturer = 230 - KnxManufacturer_M_CLICHOME KnxManufacturer = 231 - KnxManufacturer_M_COMMAX KnxManufacturer = 232 - KnxManufacturer_M_EAE KnxManufacturer = 233 - KnxManufacturer_M_TENSE KnxManufacturer = 234 - KnxManufacturer_M_SEYOUNG_ELECTRONICS KnxManufacturer = 235 - KnxManufacturer_M_LIFEDOMUS KnxManufacturer = 236 - KnxManufacturer_M_EUROTRONIC_TECHNOLOGY_GMBH KnxManufacturer = 237 - KnxManufacturer_M_TCI KnxManufacturer = 238 - KnxManufacturer_M_RISHUN_ELECTRONIC KnxManufacturer = 239 - KnxManufacturer_M_ZIPATO KnxManufacturer = 240 - KnxManufacturer_M_CM_SECURITY_GMBH_AND_CO_KG KnxManufacturer = 241 - KnxManufacturer_M_QING_CABLES KnxManufacturer = 242 - KnxManufacturer_M_LABIO KnxManufacturer = 243 - KnxManufacturer_M_COSTER_TECNOLOGIE_ELETTRONICHE_S_P_A_ KnxManufacturer = 244 - KnxManufacturer_M_E_G_E KnxManufacturer = 245 - KnxManufacturer_M_NETXAUTOMATION KnxManufacturer = 246 - KnxManufacturer_M_TECALOR KnxManufacturer = 247 - KnxManufacturer_M_URMET_ELECTRONICS_HUIZHOU_LTD_ KnxManufacturer = 248 - KnxManufacturer_M_PEIYING_BUILDING_CONTROL KnxManufacturer = 249 - KnxManufacturer_M_BPT_S_P_A__A_SOCIO_UNICO KnxManufacturer = 250 - KnxManufacturer_M_KANONTEC___KANONBUS KnxManufacturer = 251 - KnxManufacturer_M_ISER_TECH KnxManufacturer = 252 - KnxManufacturer_M_FINELINE KnxManufacturer = 253 - KnxManufacturer_M_CP_ELECTRONICS_LTD KnxManufacturer = 254 - KnxManufacturer_M_NIKO_SERVODAN_AS KnxManufacturer = 255 - KnxManufacturer_M_SIMON_309 KnxManufacturer = 256 - KnxManufacturer_M_GM_MODULAR_PVT__LTD_ KnxManufacturer = 257 - KnxManufacturer_M_FU_CHENG_INTELLIGENCE KnxManufacturer = 258 - KnxManufacturer_M_NEXKON KnxManufacturer = 259 - KnxManufacturer_M_FEEL_S_R_L KnxManufacturer = 260 - KnxManufacturer_M_NOT_ASSIGNED_314 KnxManufacturer = 261 - KnxManufacturer_M_SHENZHEN_FANHAI_SANJIANG_ELECTRONICS_CO___LTD_ KnxManufacturer = 262 - KnxManufacturer_M_JIUZHOU_GREEBLE KnxManufacturer = 263 - KnxManufacturer_M_AUMUELLER_AUMATIC_GMBH KnxManufacturer = 264 - KnxManufacturer_M_ETMAN_ELECTRIC KnxManufacturer = 265 - KnxManufacturer_M_BLACK_NOVA KnxManufacturer = 266 - KnxManufacturer_M_ZIDATECH_AG KnxManufacturer = 267 - KnxManufacturer_M_IDGS_BVBA KnxManufacturer = 268 - KnxManufacturer_M_DAKANIMO KnxManufacturer = 269 - KnxManufacturer_M_TREBOR_AUTOMATION_AB KnxManufacturer = 270 - KnxManufacturer_M_SATEL_SP__Z_O_O_ KnxManufacturer = 271 - KnxManufacturer_M_RUSSOUND__INC_ KnxManufacturer = 272 - KnxManufacturer_M_MIDEA_HEATING_AND_VENTILATING_EQUIPMENT_CO_LTD KnxManufacturer = 273 - KnxManufacturer_M_CONSORZIO_TERRANUOVA KnxManufacturer = 274 - KnxManufacturer_M_WOLF_HEIZTECHNIK_GMBH KnxManufacturer = 275 - KnxManufacturer_M_SONTEC KnxManufacturer = 276 - KnxManufacturer_M_BELCOM_CABLES_LTD_ KnxManufacturer = 277 +const( + KnxManufacturer_M_UNKNOWN KnxManufacturer = 0 + KnxManufacturer_M_SIEMENS KnxManufacturer = 1 + KnxManufacturer_M_ABB KnxManufacturer = 2 + KnxManufacturer_M_ALBRECHT_JUNG KnxManufacturer = 3 + KnxManufacturer_M_BTICINO KnxManufacturer = 4 + KnxManufacturer_M_BERKER KnxManufacturer = 5 + KnxManufacturer_M_BUSCH_JAEGER_ELEKTRO KnxManufacturer = 6 + KnxManufacturer_M_GIRA_GIERSIEPEN KnxManufacturer = 7 + KnxManufacturer_M_HAGER_ELECTRO KnxManufacturer = 8 + KnxManufacturer_M_INSTA_GMBH KnxManufacturer = 9 + KnxManufacturer_M_LEGRAND_APPAREILLAGE_ELECTRIQUE KnxManufacturer = 10 + KnxManufacturer_M_MERTEN KnxManufacturer = 11 + KnxManufacturer_M_ABB_SPA_SACE_DIVISION KnxManufacturer = 12 + KnxManufacturer_M_SIEDLE_AND_SOEHNE KnxManufacturer = 13 + KnxManufacturer_M_EBERLE KnxManufacturer = 14 + KnxManufacturer_M_GEWISS KnxManufacturer = 15 + KnxManufacturer_M_ALBERT_ACKERMANN KnxManufacturer = 16 + KnxManufacturer_M_SCHUPA_GMBH KnxManufacturer = 17 + KnxManufacturer_M_ABB_SCHWEIZ KnxManufacturer = 18 + KnxManufacturer_M_FELLER KnxManufacturer = 19 + KnxManufacturer_M_GLAMOX_AS KnxManufacturer = 20 + KnxManufacturer_M_DEHN_AND_SOEHNE KnxManufacturer = 21 + KnxManufacturer_M_CRABTREE KnxManufacturer = 22 + KnxManufacturer_M_EVOKNX KnxManufacturer = 23 + KnxManufacturer_M_PAUL_HOCHKOEPPER KnxManufacturer = 24 + KnxManufacturer_M_ALTENBURGER_ELECTRONIC KnxManufacturer = 25 + KnxManufacturer_M_GRAESSLIN KnxManufacturer = 26 + KnxManufacturer_M_SIMON_42 KnxManufacturer = 27 + KnxManufacturer_M_VIMAR KnxManufacturer = 28 + KnxManufacturer_M_MOELLER_GEBAEUDEAUTOMATION_KG KnxManufacturer = 29 + KnxManufacturer_M_ELTAKO KnxManufacturer = 30 + KnxManufacturer_M_BOSCH_SIEMENS_HAUSHALTSGERAETE KnxManufacturer = 31 + KnxManufacturer_M_RITTO_GMBHANDCO_KG KnxManufacturer = 32 + KnxManufacturer_M_POWER_CONTROLS KnxManufacturer = 33 + KnxManufacturer_M_ZUMTOBEL KnxManufacturer = 34 + KnxManufacturer_M_PHOENIX_CONTACT KnxManufacturer = 35 + KnxManufacturer_M_WAGO_KONTAKTTECHNIK KnxManufacturer = 36 + KnxManufacturer_M_KNXPRESSO KnxManufacturer = 37 + KnxManufacturer_M_WIELAND_ELECTRIC KnxManufacturer = 38 + KnxManufacturer_M_HERMANN_KLEINHUIS KnxManufacturer = 39 + KnxManufacturer_M_STIEBEL_ELTRON KnxManufacturer = 40 + KnxManufacturer_M_TEHALIT KnxManufacturer = 41 + KnxManufacturer_M_THEBEN_AG KnxManufacturer = 42 + KnxManufacturer_M_WILHELM_RUTENBECK KnxManufacturer = 43 + KnxManufacturer_M_WINKHAUS KnxManufacturer = 44 + KnxManufacturer_M_ROBERT_BOSCH KnxManufacturer = 45 + KnxManufacturer_M_SOMFY KnxManufacturer = 46 + KnxManufacturer_M_WOERTZ KnxManufacturer = 47 + KnxManufacturer_M_VIESSMANN_WERKE KnxManufacturer = 48 + KnxManufacturer_M_IMI_HYDRONIC_ENGINEERING KnxManufacturer = 49 + KnxManufacturer_M_JOH__VAILLANT KnxManufacturer = 50 + KnxManufacturer_M_AMP_DEUTSCHLAND KnxManufacturer = 51 + KnxManufacturer_M_BOSCH_THERMOTECHNIK_GMBH KnxManufacturer = 52 + KnxManufacturer_M_SEF___ECOTEC KnxManufacturer = 53 + KnxManufacturer_M_DORMA_GMBH_Plus_CO__KG KnxManufacturer = 54 + KnxManufacturer_M_WINDOWMASTER_AS KnxManufacturer = 55 + KnxManufacturer_M_WALTHER_WERKE KnxManufacturer = 56 + KnxManufacturer_M_ORAS KnxManufacturer = 57 + KnxManufacturer_M_DAETWYLER KnxManufacturer = 58 + KnxManufacturer_M_ELECTRAK KnxManufacturer = 59 + KnxManufacturer_M_TECHEM KnxManufacturer = 60 + KnxManufacturer_M_SCHNEIDER_ELECTRIC_INDUSTRIES_SAS KnxManufacturer = 61 + KnxManufacturer_M_WHD_WILHELM_HUBER_Plus_SOEHNE KnxManufacturer = 62 + KnxManufacturer_M_BISCHOFF_ELEKTRONIK KnxManufacturer = 63 + KnxManufacturer_M_JEPAZ KnxManufacturer = 64 + KnxManufacturer_M_RTS_AUTOMATION KnxManufacturer = 65 + KnxManufacturer_M_EIBMARKT_GMBH KnxManufacturer = 66 + KnxManufacturer_M_WAREMA_RENKHOFF_SE KnxManufacturer = 67 + KnxManufacturer_M_EELECTRON KnxManufacturer = 68 + KnxManufacturer_M_BELDEN_WIRE_AND_CABLE_B_V_ KnxManufacturer = 69 + KnxManufacturer_M_BECKER_ANTRIEBE_GMBH KnxManufacturer = 70 + KnxManufacturer_M_J_STEHLEPlusSOEHNE_GMBH KnxManufacturer = 71 + KnxManufacturer_M_AGFEO KnxManufacturer = 72 + KnxManufacturer_M_ZENNIO KnxManufacturer = 73 + KnxManufacturer_M_TAPKO_TECHNOLOGIES KnxManufacturer = 74 + KnxManufacturer_M_HDL KnxManufacturer = 75 + KnxManufacturer_M_UPONOR KnxManufacturer = 76 + KnxManufacturer_M_SE_LIGHTMANAGEMENT_AG KnxManufacturer = 77 + KnxManufacturer_M_ARCUS_EDS KnxManufacturer = 78 + KnxManufacturer_M_INTESIS KnxManufacturer = 79 + KnxManufacturer_M_HERHOLDT_CONTROLS_SRL KnxManufacturer = 80 + KnxManufacturer_M_NIKO_ZUBLIN KnxManufacturer = 81 + KnxManufacturer_M_DURABLE_TECHNOLOGIES KnxManufacturer = 82 + KnxManufacturer_M_INNOTEAM KnxManufacturer = 83 + KnxManufacturer_M_ISE_GMBH KnxManufacturer = 84 + KnxManufacturer_M_TEAM_FOR_TRONICS KnxManufacturer = 85 + KnxManufacturer_M_CIAT KnxManufacturer = 86 + KnxManufacturer_M_REMEHA_BV KnxManufacturer = 87 + KnxManufacturer_M_ESYLUX KnxManufacturer = 88 + KnxManufacturer_M_BASALTE KnxManufacturer = 89 + KnxManufacturer_M_VESTAMATIC KnxManufacturer = 90 + KnxManufacturer_M_MDT_TECHNOLOGIES KnxManufacturer = 91 + KnxManufacturer_M_WARENDORFER_KUECHEN_GMBH KnxManufacturer = 92 + KnxManufacturer_M_VIDEO_STAR KnxManufacturer = 93 + KnxManufacturer_M_SITEK KnxManufacturer = 94 + KnxManufacturer_M_CONTROLTRONIC KnxManufacturer = 95 + KnxManufacturer_M_FUNCTION_TECHNOLOGY KnxManufacturer = 96 + KnxManufacturer_M_AMX KnxManufacturer = 97 + KnxManufacturer_M_ELDAT KnxManufacturer = 98 + KnxManufacturer_M_PANASONIC KnxManufacturer = 99 + KnxManufacturer_M_PULSE_TECHNOLOGIES KnxManufacturer = 100 + KnxManufacturer_M_CRESTRON KnxManufacturer = 101 + KnxManufacturer_M_STEINEL_PROFESSIONAL KnxManufacturer = 102 + KnxManufacturer_M_BILTON_LED_LIGHTING KnxManufacturer = 103 + KnxManufacturer_M_DENRO_AG KnxManufacturer = 104 + KnxManufacturer_M_GEPRO KnxManufacturer = 105 + KnxManufacturer_M_PREUSSEN_AUTOMATION KnxManufacturer = 106 + KnxManufacturer_M_ZOPPAS_INDUSTRIES KnxManufacturer = 107 + KnxManufacturer_M_MACTECH KnxManufacturer = 108 + KnxManufacturer_M_TECHNO_TREND KnxManufacturer = 109 + KnxManufacturer_M_FS_CABLES KnxManufacturer = 110 + KnxManufacturer_M_DELTA_DORE KnxManufacturer = 111 + KnxManufacturer_M_EISSOUND KnxManufacturer = 112 + KnxManufacturer_M_CISCO KnxManufacturer = 113 + KnxManufacturer_M_DINUY KnxManufacturer = 114 + KnxManufacturer_M_IKNIX KnxManufacturer = 115 + KnxManufacturer_M_RADEMACHER_GERAETE_ELEKTRONIK_GMBH KnxManufacturer = 116 + KnxManufacturer_M_EGI_ELECTROACUSTICA_GENERAL_IBERICA KnxManufacturer = 117 + KnxManufacturer_M_BES___INGENIUM KnxManufacturer = 118 + KnxManufacturer_M_ELABNET KnxManufacturer = 119 + KnxManufacturer_M_BLUMOTIX KnxManufacturer = 120 + KnxManufacturer_M_HUNTER_DOUGLAS KnxManufacturer = 121 + KnxManufacturer_M_APRICUM KnxManufacturer = 122 + KnxManufacturer_M_TIANSU_AUTOMATION KnxManufacturer = 123 + KnxManufacturer_M_BUBENDORFF KnxManufacturer = 124 + KnxManufacturer_M_MBS_GMBH KnxManufacturer = 125 + KnxManufacturer_M_ENERTEX_BAYERN_GMBH KnxManufacturer = 126 + KnxManufacturer_M_BMS KnxManufacturer = 127 + KnxManufacturer_M_SINAPSI KnxManufacturer = 128 + KnxManufacturer_M_EMBEDDED_SYSTEMS_SIA KnxManufacturer = 129 + KnxManufacturer_M_KNX1 KnxManufacturer = 130 + KnxManufacturer_M_TOKKA KnxManufacturer = 131 + KnxManufacturer_M_NANOSENSE KnxManufacturer = 132 + KnxManufacturer_M_PEAR_AUTOMATION_GMBH KnxManufacturer = 133 + KnxManufacturer_M_DGA KnxManufacturer = 134 + KnxManufacturer_M_LUTRON KnxManufacturer = 135 + KnxManufacturer_M_AIRZONE___ALTRA KnxManufacturer = 136 + KnxManufacturer_M_LITHOSS_DESIGN_SWITCHES KnxManufacturer = 137 + KnxManufacturer_M_THREEATEL KnxManufacturer = 138 + KnxManufacturer_M_PHILIPS_CONTROLS KnxManufacturer = 139 + KnxManufacturer_M_VELUX_AS KnxManufacturer = 140 + KnxManufacturer_M_LOYTEC KnxManufacturer = 141 + KnxManufacturer_M_EKINEX_S_P_A_ KnxManufacturer = 142 + KnxManufacturer_M_SIRLAN_TECHNOLOGIES KnxManufacturer = 143 + KnxManufacturer_M_PROKNX_SAS KnxManufacturer = 144 + KnxManufacturer_M_IT_GMBH KnxManufacturer = 145 + KnxManufacturer_M_RENSON KnxManufacturer = 146 + KnxManufacturer_M_HEP_GROUP KnxManufacturer = 147 + KnxManufacturer_M_BALMART KnxManufacturer = 148 + KnxManufacturer_M_GFS_GMBH KnxManufacturer = 149 + KnxManufacturer_M_SCHENKER_STOREN_AG KnxManufacturer = 150 + KnxManufacturer_M_ALGODUE_ELETTRONICA_S_R_L_ KnxManufacturer = 151 + KnxManufacturer_M_ABB_FRANCE KnxManufacturer = 152 + KnxManufacturer_M_MAINTRONIC KnxManufacturer = 153 + KnxManufacturer_M_VANTAGE KnxManufacturer = 154 + KnxManufacturer_M_FORESIS KnxManufacturer = 155 + KnxManufacturer_M_RESEARCH_AND_PRODUCTION_ASSOCIATION_SEM KnxManufacturer = 156 + KnxManufacturer_M_WEINZIERL_ENGINEERING_GMBH KnxManufacturer = 157 + KnxManufacturer_M_MOEHLENHOFF_WAERMETECHNIK_GMBH KnxManufacturer = 158 + KnxManufacturer_M_PKC_GROUP_OYJ KnxManufacturer = 159 + KnxManufacturer_M_B_E_G_ KnxManufacturer = 160 + KnxManufacturer_M_ELSNER_ELEKTRONIK_GMBH KnxManufacturer = 161 + KnxManufacturer_M_SIEMENS_BUILDING_TECHNOLOGIES_HKCHINA_LTD_ KnxManufacturer = 162 + KnxManufacturer_M_EUTRAC KnxManufacturer = 163 + KnxManufacturer_M_GUSTAV_HENSEL_GMBH_AND_CO__KG KnxManufacturer = 164 + KnxManufacturer_M_GARO_AB KnxManufacturer = 165 + KnxManufacturer_M_WALDMANN_LICHTTECHNIK KnxManufacturer = 166 + KnxManufacturer_M_SCHUECO KnxManufacturer = 167 + KnxManufacturer_M_EMU KnxManufacturer = 168 + KnxManufacturer_M_JNET_SYSTEMS_AG KnxManufacturer = 169 + KnxManufacturer_M_TOTAL_SOLUTION_GMBH KnxManufacturer = 170 + KnxManufacturer_M_O_Y_L__ELECTRONICS KnxManufacturer = 171 + KnxManufacturer_M_GALAX_SYSTEM KnxManufacturer = 172 + KnxManufacturer_M_DISCH KnxManufacturer = 173 + KnxManufacturer_M_AUCOTEAM KnxManufacturer = 174 + KnxManufacturer_M_LUXMATE_CONTROLS KnxManufacturer = 175 + KnxManufacturer_M_DANFOSS KnxManufacturer = 176 + KnxManufacturer_M_AST_GMBH KnxManufacturer = 177 + KnxManufacturer_M_WILA_LEUCHTEN KnxManufacturer = 178 + KnxManufacturer_M_BPlusB_AUTOMATIONS__UND_STEUERUNGSTECHNIK KnxManufacturer = 179 + KnxManufacturer_M_LINGG_AND_JANKE KnxManufacturer = 180 + KnxManufacturer_M_SAUTER KnxManufacturer = 181 + KnxManufacturer_M_SIMU KnxManufacturer = 182 + KnxManufacturer_M_THEBEN_HTS_AG KnxManufacturer = 183 + KnxManufacturer_M_AMANN_GMBH KnxManufacturer = 184 + KnxManufacturer_M_BERG_ENERGIEKONTROLLSYSTEME_GMBH KnxManufacturer = 185 + KnxManufacturer_M_HUEPPE_FORM_SONNENSCHUTZSYSTEME_GMBH KnxManufacturer = 186 + KnxManufacturer_M_OVENTROP_KG KnxManufacturer = 187 + KnxManufacturer_M_GRIESSER_AG KnxManufacturer = 188 + KnxManufacturer_M_IPAS_GMBH KnxManufacturer = 189 + KnxManufacturer_M_ELERO_GMBH KnxManufacturer = 190 + KnxManufacturer_M_ARDAN_PRODUCTION_AND_INDUSTRIAL_CONTROLS_LTD_ KnxManufacturer = 191 + KnxManufacturer_M_METEC_MESSTECHNIK_GMBH KnxManufacturer = 192 + KnxManufacturer_M_ELKA_ELEKTRONIK_GMBH KnxManufacturer = 193 + KnxManufacturer_M_ELEKTROANLAGEN_D__NAGEL KnxManufacturer = 194 + KnxManufacturer_M_TRIDONIC_BAUELEMENTE_GMBH KnxManufacturer = 195 + KnxManufacturer_M_STENGLER_GESELLSCHAFT KnxManufacturer = 196 + KnxManufacturer_M_SCHNEIDER_ELECTRIC_MG KnxManufacturer = 197 + KnxManufacturer_M_KNX_ASSOCIATION KnxManufacturer = 198 + KnxManufacturer_M_VIVO KnxManufacturer = 199 + KnxManufacturer_M_HUGO_MUELLER_GMBH_AND_CO_KG KnxManufacturer = 200 + KnxManufacturer_M_SIEMENS_HVAC KnxManufacturer = 201 + KnxManufacturer_M_APT KnxManufacturer = 202 + KnxManufacturer_M_HIGHDOM KnxManufacturer = 203 + KnxManufacturer_M_TOP_SERVICES KnxManufacturer = 204 + KnxManufacturer_M_AMBIHOME KnxManufacturer = 205 + KnxManufacturer_M_DATEC_ELECTRONIC_AG KnxManufacturer = 206 + KnxManufacturer_M_ABUS_SECURITY_CENTER KnxManufacturer = 207 + KnxManufacturer_M_LITE_PUTER KnxManufacturer = 208 + KnxManufacturer_M_TANTRON_ELECTRONIC KnxManufacturer = 209 + KnxManufacturer_M_INTERRA KnxManufacturer = 210 + KnxManufacturer_M_DKX_TECH KnxManufacturer = 211 + KnxManufacturer_M_VIATRON KnxManufacturer = 212 + KnxManufacturer_M_NAUTIBUS KnxManufacturer = 213 + KnxManufacturer_M_ON_SEMICONDUCTOR KnxManufacturer = 214 + KnxManufacturer_M_LONGCHUANG KnxManufacturer = 215 + KnxManufacturer_M_AIR_ON_AG KnxManufacturer = 216 + KnxManufacturer_M_IB_COMPANY_GMBH KnxManufacturer = 217 + KnxManufacturer_M_SATION_FACTORY KnxManufacturer = 218 + KnxManufacturer_M_AGENTILO_GMBH KnxManufacturer = 219 + KnxManufacturer_M_MAKEL_ELEKTRIK KnxManufacturer = 220 + KnxManufacturer_M_HELIOS_VENTILATOREN KnxManufacturer = 221 + KnxManufacturer_M_OTTO_SOLUTIONS_PTE_LTD KnxManufacturer = 222 + KnxManufacturer_M_AIRMASTER KnxManufacturer = 223 + KnxManufacturer_M_VALLOX_GMBH KnxManufacturer = 224 + KnxManufacturer_M_DALITEK KnxManufacturer = 225 + KnxManufacturer_M_ASIN KnxManufacturer = 226 + KnxManufacturer_M_BRIDGES_INTELLIGENCE_TECHNOLOGY_INC_ KnxManufacturer = 227 + KnxManufacturer_M_ARBONIA KnxManufacturer = 228 + KnxManufacturer_M_KERMI KnxManufacturer = 229 + KnxManufacturer_M_PROLUX KnxManufacturer = 230 + KnxManufacturer_M_CLICHOME KnxManufacturer = 231 + KnxManufacturer_M_COMMAX KnxManufacturer = 232 + KnxManufacturer_M_EAE KnxManufacturer = 233 + KnxManufacturer_M_TENSE KnxManufacturer = 234 + KnxManufacturer_M_SEYOUNG_ELECTRONICS KnxManufacturer = 235 + KnxManufacturer_M_LIFEDOMUS KnxManufacturer = 236 + KnxManufacturer_M_EUROTRONIC_TECHNOLOGY_GMBH KnxManufacturer = 237 + KnxManufacturer_M_TCI KnxManufacturer = 238 + KnxManufacturer_M_RISHUN_ELECTRONIC KnxManufacturer = 239 + KnxManufacturer_M_ZIPATO KnxManufacturer = 240 + KnxManufacturer_M_CM_SECURITY_GMBH_AND_CO_KG KnxManufacturer = 241 + KnxManufacturer_M_QING_CABLES KnxManufacturer = 242 + KnxManufacturer_M_LABIO KnxManufacturer = 243 + KnxManufacturer_M_COSTER_TECNOLOGIE_ELETTRONICHE_S_P_A_ KnxManufacturer = 244 + KnxManufacturer_M_E_G_E KnxManufacturer = 245 + KnxManufacturer_M_NETXAUTOMATION KnxManufacturer = 246 + KnxManufacturer_M_TECALOR KnxManufacturer = 247 + KnxManufacturer_M_URMET_ELECTRONICS_HUIZHOU_LTD_ KnxManufacturer = 248 + KnxManufacturer_M_PEIYING_BUILDING_CONTROL KnxManufacturer = 249 + KnxManufacturer_M_BPT_S_P_A__A_SOCIO_UNICO KnxManufacturer = 250 + KnxManufacturer_M_KANONTEC___KANONBUS KnxManufacturer = 251 + KnxManufacturer_M_ISER_TECH KnxManufacturer = 252 + KnxManufacturer_M_FINELINE KnxManufacturer = 253 + KnxManufacturer_M_CP_ELECTRONICS_LTD KnxManufacturer = 254 + KnxManufacturer_M_NIKO_SERVODAN_AS KnxManufacturer = 255 + KnxManufacturer_M_SIMON_309 KnxManufacturer = 256 + KnxManufacturer_M_GM_MODULAR_PVT__LTD_ KnxManufacturer = 257 + KnxManufacturer_M_FU_CHENG_INTELLIGENCE KnxManufacturer = 258 + KnxManufacturer_M_NEXKON KnxManufacturer = 259 + KnxManufacturer_M_FEEL_S_R_L KnxManufacturer = 260 + KnxManufacturer_M_NOT_ASSIGNED_314 KnxManufacturer = 261 + KnxManufacturer_M_SHENZHEN_FANHAI_SANJIANG_ELECTRONICS_CO___LTD_ KnxManufacturer = 262 + KnxManufacturer_M_JIUZHOU_GREEBLE KnxManufacturer = 263 + KnxManufacturer_M_AUMUELLER_AUMATIC_GMBH KnxManufacturer = 264 + KnxManufacturer_M_ETMAN_ELECTRIC KnxManufacturer = 265 + KnxManufacturer_M_BLACK_NOVA KnxManufacturer = 266 + KnxManufacturer_M_ZIDATECH_AG KnxManufacturer = 267 + KnxManufacturer_M_IDGS_BVBA KnxManufacturer = 268 + KnxManufacturer_M_DAKANIMO KnxManufacturer = 269 + KnxManufacturer_M_TREBOR_AUTOMATION_AB KnxManufacturer = 270 + KnxManufacturer_M_SATEL_SP__Z_O_O_ KnxManufacturer = 271 + KnxManufacturer_M_RUSSOUND__INC_ KnxManufacturer = 272 + KnxManufacturer_M_MIDEA_HEATING_AND_VENTILATING_EQUIPMENT_CO_LTD KnxManufacturer = 273 + KnxManufacturer_M_CONSORZIO_TERRANUOVA KnxManufacturer = 274 + KnxManufacturer_M_WOLF_HEIZTECHNIK_GMBH KnxManufacturer = 275 + KnxManufacturer_M_SONTEC KnxManufacturer = 276 + KnxManufacturer_M_BELCOM_CABLES_LTD_ KnxManufacturer = 277 KnxManufacturer_M_GUANGZHOU_SEAWIN_ELECTRICAL_TECHNOLOGIES_CO___LTD_ KnxManufacturer = 278 - KnxManufacturer_M_ACREL KnxManufacturer = 279 - KnxManufacturer_M_KWC_AQUAROTTER_GMBH KnxManufacturer = 280 - KnxManufacturer_M_ORION_SYSTEMS KnxManufacturer = 281 - KnxManufacturer_M_SCHRACK_TECHNIK_GMBH KnxManufacturer = 282 - KnxManufacturer_M_INSPRID KnxManufacturer = 283 - KnxManufacturer_M_SUNRICHER KnxManufacturer = 284 - KnxManufacturer_M_MENRED_AUTOMATION_SYSTEMSHANGHAI_CO__LTD_ KnxManufacturer = 285 - KnxManufacturer_M_AUREX KnxManufacturer = 286 - KnxManufacturer_M_JOSEF_BARTHELME_GMBH_AND_CO__KG KnxManufacturer = 287 - KnxManufacturer_M_ARCHITECTURE_NUMERIQUE KnxManufacturer = 288 - KnxManufacturer_M_UP_GROUP KnxManufacturer = 289 - KnxManufacturer_M_TEKNOS_AVINNO KnxManufacturer = 290 - KnxManufacturer_M_NINGBO_DOOYA_MECHANIC_AND_ELECTRONIC_TECHNOLOGY KnxManufacturer = 291 - KnxManufacturer_M_THERMOKON_SENSORTECHNIK_GMBH KnxManufacturer = 292 - KnxManufacturer_M_BELIMO_AUTOMATION_AG KnxManufacturer = 293 - KnxManufacturer_M_ZEHNDER_GROUP_INTERNATIONAL_AG KnxManufacturer = 294 - KnxManufacturer_M_SKS_KINKEL_ELEKTRONIK KnxManufacturer = 295 - KnxManufacturer_M_ECE_WURMITZER_GMBH KnxManufacturer = 296 - KnxManufacturer_M_LARS KnxManufacturer = 297 - KnxManufacturer_M_URC KnxManufacturer = 298 - KnxManufacturer_M_LIGHTCONTROL KnxManufacturer = 299 - KnxManufacturer_M_SHENZHEN_YM KnxManufacturer = 300 - KnxManufacturer_M_MEAN_WELL_ENTERPRISES_CO__LTD_ KnxManufacturer = 301 - KnxManufacturer_M_OSIX KnxManufacturer = 302 - KnxManufacturer_M_AYPRO_TECHNOLOGY KnxManufacturer = 303 - KnxManufacturer_M_HEFEI_ECOLITE_SOFTWARE KnxManufacturer = 304 - KnxManufacturer_M_ENNO KnxManufacturer = 305 - KnxManufacturer_M_OHOSURE KnxManufacturer = 306 - KnxManufacturer_M_GAREFOWL KnxManufacturer = 307 - KnxManufacturer_M_GEZE KnxManufacturer = 308 - KnxManufacturer_M_LG_ELECTRONICS_INC_ KnxManufacturer = 309 - KnxManufacturer_M_SMC_INTERIORS KnxManufacturer = 310 - KnxManufacturer_M_NOT_ASSIGNED_364 KnxManufacturer = 311 - KnxManufacturer_M_SCS_CABLE KnxManufacturer = 312 - KnxManufacturer_M_HOVAL KnxManufacturer = 313 - KnxManufacturer_M_CANST KnxManufacturer = 314 - KnxManufacturer_M_HANGZHOU_BERLIN KnxManufacturer = 315 - KnxManufacturer_M_EVN_LICHTTECHNIK KnxManufacturer = 316 - KnxManufacturer_M_RUTEC KnxManufacturer = 317 - KnxManufacturer_M_FINDER KnxManufacturer = 318 - KnxManufacturer_M_FUJITSU_GENERAL_LIMITED KnxManufacturer = 319 - KnxManufacturer_M_ZF_FRIEDRICHSHAFEN_AG KnxManufacturer = 320 - KnxManufacturer_M_CREALED KnxManufacturer = 321 - KnxManufacturer_M_MILES_MAGIC_AUTOMATION_PRIVATE_LIMITED KnxManufacturer = 322 - KnxManufacturer_M_EPlus KnxManufacturer = 323 - KnxManufacturer_M_ITALCOND KnxManufacturer = 324 - KnxManufacturer_M_SATION KnxManufacturer = 325 - KnxManufacturer_M_NEWBEST KnxManufacturer = 326 - KnxManufacturer_M_GDS_DIGITAL_SYSTEMS KnxManufacturer = 327 - KnxManufacturer_M_IDDERO KnxManufacturer = 328 - KnxManufacturer_M_MBNLED KnxManufacturer = 329 - KnxManufacturer_M_VITRUM KnxManufacturer = 330 - KnxManufacturer_M_EKEY_BIOMETRIC_SYSTEMS_GMBH KnxManufacturer = 331 - KnxManufacturer_M_AMC KnxManufacturer = 332 - KnxManufacturer_M_TRILUX_GMBH_AND_CO__KG KnxManufacturer = 333 - KnxManufacturer_M_WEXCEDO KnxManufacturer = 334 - KnxManufacturer_M_VEMER_SPA KnxManufacturer = 335 - KnxManufacturer_M_ALEXANDER_BUERKLE_GMBH_AND_CO_KG KnxManufacturer = 336 - KnxManufacturer_M_CITRON KnxManufacturer = 337 - KnxManufacturer_M_SHENZHEN_HEGUANG KnxManufacturer = 338 - KnxManufacturer_M_NOT_ASSIGNED_392 KnxManufacturer = 339 - KnxManufacturer_M_TRANE_B_V_B_A KnxManufacturer = 340 - KnxManufacturer_M_CAREL KnxManufacturer = 341 - KnxManufacturer_M_PROLITE_CONTROLS KnxManufacturer = 342 - KnxManufacturer_M_BOSMER KnxManufacturer = 343 - KnxManufacturer_M_EUCHIPS KnxManufacturer = 344 - KnxManufacturer_M_CONNECT_THINKA_CONNECT KnxManufacturer = 345 - KnxManufacturer_M_PEAKNX_A_DOGAWIST_COMPANY KnxManufacturer = 346 - KnxManufacturer_M_ACEMATIC KnxManufacturer = 347 - KnxManufacturer_M_ELAUSYS KnxManufacturer = 348 - KnxManufacturer_M_ITK_ENGINEERING_AG KnxManufacturer = 349 - KnxManufacturer_M_INTEGRA_METERING_AG KnxManufacturer = 350 - KnxManufacturer_M_FMS_HOSPITALITY_PTE_LTD KnxManufacturer = 351 - KnxManufacturer_M_NUVO KnxManufacturer = 352 - KnxManufacturer_M_U__LUX_GMBH KnxManufacturer = 353 - KnxManufacturer_M_BRUMBERG_LEUCHTEN KnxManufacturer = 354 - KnxManufacturer_M_LIME KnxManufacturer = 355 - KnxManufacturer_M_GREAT_EMPIRE_INTERNATIONAL_GROUP_CO___LTD_ KnxManufacturer = 356 - KnxManufacturer_M_KAVOSHPISHRO_ASIA KnxManufacturer = 357 - KnxManufacturer_M_V2_SPA KnxManufacturer = 358 - KnxManufacturer_M_JOHNSON_CONTROLS KnxManufacturer = 359 - KnxManufacturer_M_ARKUD KnxManufacturer = 360 - KnxManufacturer_M_IRIDIUM_LTD_ KnxManufacturer = 361 - KnxManufacturer_M_BSMART KnxManufacturer = 362 - KnxManufacturer_M_BAB_TECHNOLOGIE_GMBH KnxManufacturer = 363 - KnxManufacturer_M_NICE_SPA KnxManufacturer = 364 - KnxManufacturer_M_REDFISH_GROUP_PTY_LTD KnxManufacturer = 365 - KnxManufacturer_M_SABIANA_SPA KnxManufacturer = 366 - KnxManufacturer_M_UBEE_INTERACTIVE_EUROPE KnxManufacturer = 367 - KnxManufacturer_M_REXEL KnxManufacturer = 368 - KnxManufacturer_M_GES_TEKNIK_A_S_ KnxManufacturer = 369 - KnxManufacturer_M_AVE_S_P_A_ KnxManufacturer = 370 - KnxManufacturer_M_ZHUHAI_LTECH_TECHNOLOGY_CO___LTD_ KnxManufacturer = 371 - KnxManufacturer_M_ARCOM KnxManufacturer = 372 - KnxManufacturer_M_VIA_TECHNOLOGIES__INC_ KnxManufacturer = 373 - KnxManufacturer_M_FEELSMART_ KnxManufacturer = 374 - KnxManufacturer_M_SUPCON KnxManufacturer = 375 - KnxManufacturer_M_MANIC KnxManufacturer = 376 - KnxManufacturer_M_TDE_GMBH KnxManufacturer = 377 - KnxManufacturer_M_NANJING_SHUFAN_INFORMATION_TECHNOLOGY_CO__LTD_ KnxManufacturer = 378 - KnxManufacturer_M_EWTECH KnxManufacturer = 379 - KnxManufacturer_M_KLUGER_AUTOMATION_GMBH KnxManufacturer = 380 - KnxManufacturer_M_JOONGANG_CONTROL KnxManufacturer = 381 - KnxManufacturer_M_GREENCONTROLS_TECHNOLOGY_SDN__BHD_ KnxManufacturer = 382 - KnxManufacturer_M_IME_S_P_A_ KnxManufacturer = 383 - KnxManufacturer_M_SICHUAN_HAODING KnxManufacturer = 384 - KnxManufacturer_M_MINDJAGA_LTD_ KnxManufacturer = 385 - KnxManufacturer_M_RUILI_SMART_CONTROL KnxManufacturer = 386 - KnxManufacturer_M_CODESYS_GMBH KnxManufacturer = 387 - KnxManufacturer_M_MOORGEN_DEUTSCHLAND_GMBH KnxManufacturer = 388 - KnxManufacturer_M_CULLMANN_TECH KnxManufacturer = 389 - KnxManufacturer_M_EYRISE_B_V KnxManufacturer = 390 - KnxManufacturer_M_ABEGO KnxManufacturer = 391 - KnxManufacturer_M_MYGEKKO KnxManufacturer = 392 - KnxManufacturer_M_ERGO3_SARL KnxManufacturer = 393 - KnxManufacturer_M_STMICROELECTRONICS_INTERNATIONAL_N_V_ KnxManufacturer = 394 - KnxManufacturer_M_CJC_SYSTEMS KnxManufacturer = 395 - KnxManufacturer_M_SUDOKU KnxManufacturer = 396 - KnxManufacturer_M_AZ_E_LITE_PTE_LTD KnxManufacturer = 397 - KnxManufacturer_M_ARLIGHT KnxManufacturer = 398 - KnxManufacturer_M_GRUENBECK_WASSERAUFBEREITUNG_GMBH KnxManufacturer = 399 - KnxManufacturer_M_MODULE_ELECTRONIC KnxManufacturer = 400 - KnxManufacturer_M_KOPLAT KnxManufacturer = 401 - KnxManufacturer_M_GUANGZHOU_LETOUR_LIFE_TECHNOLOGY_CO___LTD KnxManufacturer = 402 - KnxManufacturer_M_ILEVIA KnxManufacturer = 403 - KnxManufacturer_M_LN_SYSTEMTEQ KnxManufacturer = 404 - KnxManufacturer_M_HISENSE_SMARTHOME KnxManufacturer = 405 - KnxManufacturer_M_FLINK_AUTOMATION_SYSTEM KnxManufacturer = 406 - KnxManufacturer_M_XXTER_BV KnxManufacturer = 407 - KnxManufacturer_M_LYNXUS_TECHNOLOGY KnxManufacturer = 408 - KnxManufacturer_M_ROBOT_S_A_ KnxManufacturer = 409 - KnxManufacturer_M_SHENZHEN_ATTE_SMART_LIFE_CO__LTD_ KnxManufacturer = 410 - KnxManufacturer_M_NOBLESSE KnxManufacturer = 411 - KnxManufacturer_M_ADVANCED_DEVICES KnxManufacturer = 412 - KnxManufacturer_M_ATRINA_BUILDING_AUTOMATION_CO__LTD KnxManufacturer = 413 - KnxManufacturer_M_GUANGDONG_DAMING_LAFFEY_ELECTRIC_CO___LTD_ KnxManufacturer = 414 - KnxManufacturer_M_WESTERSTRAND_URFABRIK_AB KnxManufacturer = 415 - KnxManufacturer_M_CONTROL4_CORPORATE KnxManufacturer = 416 - KnxManufacturer_M_ONTROL KnxManufacturer = 417 - KnxManufacturer_M_STARNET KnxManufacturer = 418 - KnxManufacturer_M_BETA_CAVI KnxManufacturer = 419 - KnxManufacturer_M_EASEMORE KnxManufacturer = 420 - KnxManufacturer_M_VIVALDI_SRL KnxManufacturer = 421 - KnxManufacturer_M_GREE_ELECTRIC_APPLIANCES_INC__OF_ZHUHAI KnxManufacturer = 422 - KnxManufacturer_M_HWISCON KnxManufacturer = 423 - KnxManufacturer_M_SHANGHAI_ELECON_INTELLIGENT_TECHNOLOGY_CO___LTD_ KnxManufacturer = 424 - KnxManufacturer_M_KAMPMANN KnxManufacturer = 425 - KnxManufacturer_M_IMPOLUX_GMBH_LEDIMAX KnxManufacturer = 426 - KnxManufacturer_M_EVAUX KnxManufacturer = 427 - KnxManufacturer_M_WEBRO_CABLES_AND_CONNECTORS_LIMITED KnxManufacturer = 428 - KnxManufacturer_M_SHANGHAI_E_TECH_SOLUTION KnxManufacturer = 429 - KnxManufacturer_M_GUANGZHOU_HOKO_ELECTRIC_CO__LTD_ KnxManufacturer = 430 - KnxManufacturer_M_LAMMIN_HIGH_TECH_CO__LTD KnxManufacturer = 431 - KnxManufacturer_M_SHENZHEN_MERRYTEK_TECHNOLOGY_CO___LTD KnxManufacturer = 432 - KnxManufacturer_M_I_LUXUS KnxManufacturer = 433 - KnxManufacturer_M_ELMOS_SEMICONDUCTOR_AG KnxManufacturer = 434 - KnxManufacturer_M_EMCOM_TECHNOLOGY_INC KnxManufacturer = 435 - KnxManufacturer_M_PROJECT_INNOVATIONS_GMBH KnxManufacturer = 436 - KnxManufacturer_M_ITC KnxManufacturer = 437 + KnxManufacturer_M_ACREL KnxManufacturer = 279 + KnxManufacturer_M_KWC_AQUAROTTER_GMBH KnxManufacturer = 280 + KnxManufacturer_M_ORION_SYSTEMS KnxManufacturer = 281 + KnxManufacturer_M_SCHRACK_TECHNIK_GMBH KnxManufacturer = 282 + KnxManufacturer_M_INSPRID KnxManufacturer = 283 + KnxManufacturer_M_SUNRICHER KnxManufacturer = 284 + KnxManufacturer_M_MENRED_AUTOMATION_SYSTEMSHANGHAI_CO__LTD_ KnxManufacturer = 285 + KnxManufacturer_M_AUREX KnxManufacturer = 286 + KnxManufacturer_M_JOSEF_BARTHELME_GMBH_AND_CO__KG KnxManufacturer = 287 + KnxManufacturer_M_ARCHITECTURE_NUMERIQUE KnxManufacturer = 288 + KnxManufacturer_M_UP_GROUP KnxManufacturer = 289 + KnxManufacturer_M_TEKNOS_AVINNO KnxManufacturer = 290 + KnxManufacturer_M_NINGBO_DOOYA_MECHANIC_AND_ELECTRONIC_TECHNOLOGY KnxManufacturer = 291 + KnxManufacturer_M_THERMOKON_SENSORTECHNIK_GMBH KnxManufacturer = 292 + KnxManufacturer_M_BELIMO_AUTOMATION_AG KnxManufacturer = 293 + KnxManufacturer_M_ZEHNDER_GROUP_INTERNATIONAL_AG KnxManufacturer = 294 + KnxManufacturer_M_SKS_KINKEL_ELEKTRONIK KnxManufacturer = 295 + KnxManufacturer_M_ECE_WURMITZER_GMBH KnxManufacturer = 296 + KnxManufacturer_M_LARS KnxManufacturer = 297 + KnxManufacturer_M_URC KnxManufacturer = 298 + KnxManufacturer_M_LIGHTCONTROL KnxManufacturer = 299 + KnxManufacturer_M_SHENZHEN_YM KnxManufacturer = 300 + KnxManufacturer_M_MEAN_WELL_ENTERPRISES_CO__LTD_ KnxManufacturer = 301 + KnxManufacturer_M_OSIX KnxManufacturer = 302 + KnxManufacturer_M_AYPRO_TECHNOLOGY KnxManufacturer = 303 + KnxManufacturer_M_HEFEI_ECOLITE_SOFTWARE KnxManufacturer = 304 + KnxManufacturer_M_ENNO KnxManufacturer = 305 + KnxManufacturer_M_OHOSURE KnxManufacturer = 306 + KnxManufacturer_M_GAREFOWL KnxManufacturer = 307 + KnxManufacturer_M_GEZE KnxManufacturer = 308 + KnxManufacturer_M_LG_ELECTRONICS_INC_ KnxManufacturer = 309 + KnxManufacturer_M_SMC_INTERIORS KnxManufacturer = 310 + KnxManufacturer_M_NOT_ASSIGNED_364 KnxManufacturer = 311 + KnxManufacturer_M_SCS_CABLE KnxManufacturer = 312 + KnxManufacturer_M_HOVAL KnxManufacturer = 313 + KnxManufacturer_M_CANST KnxManufacturer = 314 + KnxManufacturer_M_HANGZHOU_BERLIN KnxManufacturer = 315 + KnxManufacturer_M_EVN_LICHTTECHNIK KnxManufacturer = 316 + KnxManufacturer_M_RUTEC KnxManufacturer = 317 + KnxManufacturer_M_FINDER KnxManufacturer = 318 + KnxManufacturer_M_FUJITSU_GENERAL_LIMITED KnxManufacturer = 319 + KnxManufacturer_M_ZF_FRIEDRICHSHAFEN_AG KnxManufacturer = 320 + KnxManufacturer_M_CREALED KnxManufacturer = 321 + KnxManufacturer_M_MILES_MAGIC_AUTOMATION_PRIVATE_LIMITED KnxManufacturer = 322 + KnxManufacturer_M_EPlus KnxManufacturer = 323 + KnxManufacturer_M_ITALCOND KnxManufacturer = 324 + KnxManufacturer_M_SATION KnxManufacturer = 325 + KnxManufacturer_M_NEWBEST KnxManufacturer = 326 + KnxManufacturer_M_GDS_DIGITAL_SYSTEMS KnxManufacturer = 327 + KnxManufacturer_M_IDDERO KnxManufacturer = 328 + KnxManufacturer_M_MBNLED KnxManufacturer = 329 + KnxManufacturer_M_VITRUM KnxManufacturer = 330 + KnxManufacturer_M_EKEY_BIOMETRIC_SYSTEMS_GMBH KnxManufacturer = 331 + KnxManufacturer_M_AMC KnxManufacturer = 332 + KnxManufacturer_M_TRILUX_GMBH_AND_CO__KG KnxManufacturer = 333 + KnxManufacturer_M_WEXCEDO KnxManufacturer = 334 + KnxManufacturer_M_VEMER_SPA KnxManufacturer = 335 + KnxManufacturer_M_ALEXANDER_BUERKLE_GMBH_AND_CO_KG KnxManufacturer = 336 + KnxManufacturer_M_CITRON KnxManufacturer = 337 + KnxManufacturer_M_SHENZHEN_HEGUANG KnxManufacturer = 338 + KnxManufacturer_M_NOT_ASSIGNED_392 KnxManufacturer = 339 + KnxManufacturer_M_TRANE_B_V_B_A KnxManufacturer = 340 + KnxManufacturer_M_CAREL KnxManufacturer = 341 + KnxManufacturer_M_PROLITE_CONTROLS KnxManufacturer = 342 + KnxManufacturer_M_BOSMER KnxManufacturer = 343 + KnxManufacturer_M_EUCHIPS KnxManufacturer = 344 + KnxManufacturer_M_CONNECT_THINKA_CONNECT KnxManufacturer = 345 + KnxManufacturer_M_PEAKNX_A_DOGAWIST_COMPANY KnxManufacturer = 346 + KnxManufacturer_M_ACEMATIC KnxManufacturer = 347 + KnxManufacturer_M_ELAUSYS KnxManufacturer = 348 + KnxManufacturer_M_ITK_ENGINEERING_AG KnxManufacturer = 349 + KnxManufacturer_M_INTEGRA_METERING_AG KnxManufacturer = 350 + KnxManufacturer_M_FMS_HOSPITALITY_PTE_LTD KnxManufacturer = 351 + KnxManufacturer_M_NUVO KnxManufacturer = 352 + KnxManufacturer_M_U__LUX_GMBH KnxManufacturer = 353 + KnxManufacturer_M_BRUMBERG_LEUCHTEN KnxManufacturer = 354 + KnxManufacturer_M_LIME KnxManufacturer = 355 + KnxManufacturer_M_GREAT_EMPIRE_INTERNATIONAL_GROUP_CO___LTD_ KnxManufacturer = 356 + KnxManufacturer_M_KAVOSHPISHRO_ASIA KnxManufacturer = 357 + KnxManufacturer_M_V2_SPA KnxManufacturer = 358 + KnxManufacturer_M_JOHNSON_CONTROLS KnxManufacturer = 359 + KnxManufacturer_M_ARKUD KnxManufacturer = 360 + KnxManufacturer_M_IRIDIUM_LTD_ KnxManufacturer = 361 + KnxManufacturer_M_BSMART KnxManufacturer = 362 + KnxManufacturer_M_BAB_TECHNOLOGIE_GMBH KnxManufacturer = 363 + KnxManufacturer_M_NICE_SPA KnxManufacturer = 364 + KnxManufacturer_M_REDFISH_GROUP_PTY_LTD KnxManufacturer = 365 + KnxManufacturer_M_SABIANA_SPA KnxManufacturer = 366 + KnxManufacturer_M_UBEE_INTERACTIVE_EUROPE KnxManufacturer = 367 + KnxManufacturer_M_REXEL KnxManufacturer = 368 + KnxManufacturer_M_GES_TEKNIK_A_S_ KnxManufacturer = 369 + KnxManufacturer_M_AVE_S_P_A_ KnxManufacturer = 370 + KnxManufacturer_M_ZHUHAI_LTECH_TECHNOLOGY_CO___LTD_ KnxManufacturer = 371 + KnxManufacturer_M_ARCOM KnxManufacturer = 372 + KnxManufacturer_M_VIA_TECHNOLOGIES__INC_ KnxManufacturer = 373 + KnxManufacturer_M_FEELSMART_ KnxManufacturer = 374 + KnxManufacturer_M_SUPCON KnxManufacturer = 375 + KnxManufacturer_M_MANIC KnxManufacturer = 376 + KnxManufacturer_M_TDE_GMBH KnxManufacturer = 377 + KnxManufacturer_M_NANJING_SHUFAN_INFORMATION_TECHNOLOGY_CO__LTD_ KnxManufacturer = 378 + KnxManufacturer_M_EWTECH KnxManufacturer = 379 + KnxManufacturer_M_KLUGER_AUTOMATION_GMBH KnxManufacturer = 380 + KnxManufacturer_M_JOONGANG_CONTROL KnxManufacturer = 381 + KnxManufacturer_M_GREENCONTROLS_TECHNOLOGY_SDN__BHD_ KnxManufacturer = 382 + KnxManufacturer_M_IME_S_P_A_ KnxManufacturer = 383 + KnxManufacturer_M_SICHUAN_HAODING KnxManufacturer = 384 + KnxManufacturer_M_MINDJAGA_LTD_ KnxManufacturer = 385 + KnxManufacturer_M_RUILI_SMART_CONTROL KnxManufacturer = 386 + KnxManufacturer_M_CODESYS_GMBH KnxManufacturer = 387 + KnxManufacturer_M_MOORGEN_DEUTSCHLAND_GMBH KnxManufacturer = 388 + KnxManufacturer_M_CULLMANN_TECH KnxManufacturer = 389 + KnxManufacturer_M_EYRISE_B_V KnxManufacturer = 390 + KnxManufacturer_M_ABEGO KnxManufacturer = 391 + KnxManufacturer_M_MYGEKKO KnxManufacturer = 392 + KnxManufacturer_M_ERGO3_SARL KnxManufacturer = 393 + KnxManufacturer_M_STMICROELECTRONICS_INTERNATIONAL_N_V_ KnxManufacturer = 394 + KnxManufacturer_M_CJC_SYSTEMS KnxManufacturer = 395 + KnxManufacturer_M_SUDOKU KnxManufacturer = 396 + KnxManufacturer_M_AZ_E_LITE_PTE_LTD KnxManufacturer = 397 + KnxManufacturer_M_ARLIGHT KnxManufacturer = 398 + KnxManufacturer_M_GRUENBECK_WASSERAUFBEREITUNG_GMBH KnxManufacturer = 399 + KnxManufacturer_M_MODULE_ELECTRONIC KnxManufacturer = 400 + KnxManufacturer_M_KOPLAT KnxManufacturer = 401 + KnxManufacturer_M_GUANGZHOU_LETOUR_LIFE_TECHNOLOGY_CO___LTD KnxManufacturer = 402 + KnxManufacturer_M_ILEVIA KnxManufacturer = 403 + KnxManufacturer_M_LN_SYSTEMTEQ KnxManufacturer = 404 + KnxManufacturer_M_HISENSE_SMARTHOME KnxManufacturer = 405 + KnxManufacturer_M_FLINK_AUTOMATION_SYSTEM KnxManufacturer = 406 + KnxManufacturer_M_XXTER_BV KnxManufacturer = 407 + KnxManufacturer_M_LYNXUS_TECHNOLOGY KnxManufacturer = 408 + KnxManufacturer_M_ROBOT_S_A_ KnxManufacturer = 409 + KnxManufacturer_M_SHENZHEN_ATTE_SMART_LIFE_CO__LTD_ KnxManufacturer = 410 + KnxManufacturer_M_NOBLESSE KnxManufacturer = 411 + KnxManufacturer_M_ADVANCED_DEVICES KnxManufacturer = 412 + KnxManufacturer_M_ATRINA_BUILDING_AUTOMATION_CO__LTD KnxManufacturer = 413 + KnxManufacturer_M_GUANGDONG_DAMING_LAFFEY_ELECTRIC_CO___LTD_ KnxManufacturer = 414 + KnxManufacturer_M_WESTERSTRAND_URFABRIK_AB KnxManufacturer = 415 + KnxManufacturer_M_CONTROL4_CORPORATE KnxManufacturer = 416 + KnxManufacturer_M_ONTROL KnxManufacturer = 417 + KnxManufacturer_M_STARNET KnxManufacturer = 418 + KnxManufacturer_M_BETA_CAVI KnxManufacturer = 419 + KnxManufacturer_M_EASEMORE KnxManufacturer = 420 + KnxManufacturer_M_VIVALDI_SRL KnxManufacturer = 421 + KnxManufacturer_M_GREE_ELECTRIC_APPLIANCES_INC__OF_ZHUHAI KnxManufacturer = 422 + KnxManufacturer_M_HWISCON KnxManufacturer = 423 + KnxManufacturer_M_SHANGHAI_ELECON_INTELLIGENT_TECHNOLOGY_CO___LTD_ KnxManufacturer = 424 + KnxManufacturer_M_KAMPMANN KnxManufacturer = 425 + KnxManufacturer_M_IMPOLUX_GMBH_LEDIMAX KnxManufacturer = 426 + KnxManufacturer_M_EVAUX KnxManufacturer = 427 + KnxManufacturer_M_WEBRO_CABLES_AND_CONNECTORS_LIMITED KnxManufacturer = 428 + KnxManufacturer_M_SHANGHAI_E_TECH_SOLUTION KnxManufacturer = 429 + KnxManufacturer_M_GUANGZHOU_HOKO_ELECTRIC_CO__LTD_ KnxManufacturer = 430 + KnxManufacturer_M_LAMMIN_HIGH_TECH_CO__LTD KnxManufacturer = 431 + KnxManufacturer_M_SHENZHEN_MERRYTEK_TECHNOLOGY_CO___LTD KnxManufacturer = 432 + KnxManufacturer_M_I_LUXUS KnxManufacturer = 433 + KnxManufacturer_M_ELMOS_SEMICONDUCTOR_AG KnxManufacturer = 434 + KnxManufacturer_M_EMCOM_TECHNOLOGY_INC KnxManufacturer = 435 + KnxManufacturer_M_PROJECT_INNOVATIONS_GMBH KnxManufacturer = 436 + KnxManufacturer_M_ITC KnxManufacturer = 437 KnxManufacturer_M_ABB_LV_INSTALLATION_MATERIALS_COMPANY_LTD__BEIJING KnxManufacturer = 438 - KnxManufacturer_M_MAICO KnxManufacturer = 439 - KnxManufacturer_M_ELAN_SRL KnxManufacturer = 440 - KnxManufacturer_M_MINHHA_TECHNOLOGY_CO__LTD KnxManufacturer = 441 - KnxManufacturer_M_ZHEJIANG_TIANJIE_INDUSTRIAL_CORP_ KnxManufacturer = 442 - KnxManufacturer_M_IAUTOMATION_PTY_LIMITED KnxManufacturer = 443 - KnxManufacturer_M_EXTRON KnxManufacturer = 444 - KnxManufacturer_M_FREEDOMPRO KnxManufacturer = 445 - KnxManufacturer_M_ONEHOME KnxManufacturer = 446 - KnxManufacturer_M_EOS_SAUNATECHNIK_GMBH KnxManufacturer = 447 - KnxManufacturer_M_KUSATEK_GMBH KnxManufacturer = 448 - KnxManufacturer_M_EISBAER_SCADA KnxManufacturer = 449 - KnxManufacturer_M_AUTOMATISMI_BENINCA_S_P_A_ KnxManufacturer = 450 - KnxManufacturer_M_BLENDOM KnxManufacturer = 451 - KnxManufacturer_M_MADEL_AIR_TECHNICAL_DIFFUSION KnxManufacturer = 452 - KnxManufacturer_M_NIKO KnxManufacturer = 453 - KnxManufacturer_M_BOSCH_REXROTH_AG KnxManufacturer = 454 - KnxManufacturer_M_CANDM_PRODUCTS KnxManufacturer = 455 - KnxManufacturer_M_HOERMANN_KG_VERKAUFSGESELLSCHAFT KnxManufacturer = 456 - KnxManufacturer_M_SHANGHAI_RAJAYASA_CO__LTD KnxManufacturer = 457 - KnxManufacturer_M_SUZUKI KnxManufacturer = 458 - KnxManufacturer_M_SILENT_GLISS_INTERNATIONAL_LTD_ KnxManufacturer = 459 - KnxManufacturer_M_BEE_CONTROLS_ADGSC_GROUP KnxManufacturer = 460 - KnxManufacturer_M_XDTECGMBH KnxManufacturer = 461 - KnxManufacturer_M_OSRAM KnxManufacturer = 462 - KnxManufacturer_M_LEBENOR KnxManufacturer = 463 - KnxManufacturer_M_AUTOMANENG KnxManufacturer = 464 - KnxManufacturer_M_HONEYWELL_AUTOMATION_SOLUTION_CONTROLCHINA KnxManufacturer = 465 - KnxManufacturer_M_HANGZHOU_BINTHEN_INTELLIGENCE_TECHNOLOGY_CO__LTD KnxManufacturer = 466 - KnxManufacturer_M_ETA_HEIZTECHNIK KnxManufacturer = 467 - KnxManufacturer_M_DIVUS_GMBH KnxManufacturer = 468 - KnxManufacturer_M_NANJING_TAIJIESAI_INTELLIGENT_TECHNOLOGY_CO__LTD_ KnxManufacturer = 469 - KnxManufacturer_M_LUNATONE KnxManufacturer = 470 - KnxManufacturer_M_ZHEJIANG_SCTECH_BUILDING_INTELLIGENT KnxManufacturer = 471 - KnxManufacturer_M_FOSHAN_QITE_TECHNOLOGY_CO___LTD_ KnxManufacturer = 472 - KnxManufacturer_M_NOKE KnxManufacturer = 473 - KnxManufacturer_M_LANDCOM KnxManufacturer = 474 - KnxManufacturer_M_STORK_AS KnxManufacturer = 475 - KnxManufacturer_M_HANGZHOU_SHENDU_TECHNOLOGY_CO___LTD_ KnxManufacturer = 476 - KnxManufacturer_M_COOLAUTOMATION KnxManufacturer = 477 - KnxManufacturer_M_APRSTERN KnxManufacturer = 478 - KnxManufacturer_M_SONNEN KnxManufacturer = 479 - KnxManufacturer_M_DNAKE KnxManufacturer = 480 - KnxManufacturer_M_NEUBERGER_GEBAEUDEAUTOMATION_GMBH KnxManufacturer = 481 - KnxManufacturer_M_STILIGER KnxManufacturer = 482 - KnxManufacturer_M_BERGHOF_AUTOMATION_GMBH KnxManufacturer = 483 - KnxManufacturer_M_TOTAL_AUTOMATION_AND_CONTROLS_GMBH KnxManufacturer = 484 - KnxManufacturer_M_DOVIT KnxManufacturer = 485 - KnxManufacturer_M_INSTALIGHTING_GMBH KnxManufacturer = 486 - KnxManufacturer_M_UNI_TEC KnxManufacturer = 487 - KnxManufacturer_M_CASATUNES KnxManufacturer = 488 - KnxManufacturer_M_EMT KnxManufacturer = 489 - KnxManufacturer_M_SENFFICIENT KnxManufacturer = 490 - KnxManufacturer_M_AUROLITE_ELECTRICAL_PANYU_GUANGZHOU_LIMITED KnxManufacturer = 491 - KnxManufacturer_M_ABB_XIAMEN_SMART_TECHNOLOGY_CO___LTD_ KnxManufacturer = 492 - KnxManufacturer_M_SAMSON_ELECTRIC_WIRE KnxManufacturer = 493 - KnxManufacturer_M_T_TOUCHING KnxManufacturer = 494 - KnxManufacturer_M_CORE_SMART_HOME KnxManufacturer = 495 - KnxManufacturer_M_GREENCONNECT_SOLUTIONS_SA KnxManufacturer = 496 - KnxManufacturer_M_ELETTRONICA_CONDUTTORI KnxManufacturer = 497 - KnxManufacturer_M_MKFC KnxManufacturer = 498 - KnxManufacturer_M_AUTOMATIONPlus KnxManufacturer = 499 - KnxManufacturer_M_BLUE_AND_RED KnxManufacturer = 500 - KnxManufacturer_M_FROGBLUE KnxManufacturer = 501 - KnxManufacturer_M_SAVESOR KnxManufacturer = 502 - KnxManufacturer_M_APP_TECH KnxManufacturer = 503 - KnxManufacturer_M_SENSORTEC_AG KnxManufacturer = 504 - KnxManufacturer_M_NYSA_TECHNOLOGY_AND_SOLUTIONS KnxManufacturer = 505 - KnxManufacturer_M_FARADITE KnxManufacturer = 506 - KnxManufacturer_M_OPTIMUS KnxManufacturer = 507 - KnxManufacturer_M_KTS_S_R_L_ KnxManufacturer = 508 - KnxManufacturer_M_RAMCRO_SPA KnxManufacturer = 509 - KnxManufacturer_M_WUHAN_WISECREATE_UNIVERSE_TECHNOLOGY_CO___LTD KnxManufacturer = 510 - KnxManufacturer_M_BEMI_SMART_HOME_LTD KnxManufacturer = 511 - KnxManufacturer_M_ARDOMUS KnxManufacturer = 512 - KnxManufacturer_M_CHANGXING KnxManufacturer = 513 - KnxManufacturer_M_E_CONTROLS KnxManufacturer = 514 - KnxManufacturer_M_AIB_TECHNOLOGY KnxManufacturer = 515 - KnxManufacturer_M_NVC KnxManufacturer = 516 - KnxManufacturer_M_KBOX KnxManufacturer = 517 - KnxManufacturer_M_CNS KnxManufacturer = 518 - KnxManufacturer_M_TYBA KnxManufacturer = 519 - KnxManufacturer_M_ATREL KnxManufacturer = 520 - KnxManufacturer_M_SIMON_ELECTRIC_CHINA_CO___LTD KnxManufacturer = 521 - KnxManufacturer_M_KORDZ_GROUP KnxManufacturer = 522 - KnxManufacturer_M_ND_ELECTRIC KnxManufacturer = 523 - KnxManufacturer_M_CONTROLIUM KnxManufacturer = 524 - KnxManufacturer_M_FAMO_GMBH_AND_CO__KG KnxManufacturer = 525 - KnxManufacturer_M_CDN_SMART KnxManufacturer = 526 - KnxManufacturer_M_HESTON KnxManufacturer = 527 - KnxManufacturer_M_ESLA_CONEXIONES_S_L_ KnxManufacturer = 528 - KnxManufacturer_M_WEISHAUPT KnxManufacturer = 529 - KnxManufacturer_M_ASTRUM_TECHNOLOGY KnxManufacturer = 530 - KnxManufacturer_M_WUERTH_ELEKTRONIK_STELVIO_KONTEK_S_P_A_ KnxManufacturer = 531 - KnxManufacturer_M_NANOTECO_CORPORATION KnxManufacturer = 532 - KnxManufacturer_M_NIETIAN KnxManufacturer = 533 - KnxManufacturer_M_SUMSIR KnxManufacturer = 534 - KnxManufacturer_M_ORBIS_TECNOLOGIA_ELECTRICA_SA KnxManufacturer = 535 - KnxManufacturer_M_NANJING_ZHONGYI_IOT_TECHNOLOGY_CO___LTD_ KnxManufacturer = 536 - KnxManufacturer_M_ANLIPS KnxManufacturer = 537 - KnxManufacturer_M_GUANGDONG_PAK_CORPORATION_CO___LTD KnxManufacturer = 538 - KnxManufacturer_M_BVK_TECHNOLOGY KnxManufacturer = 539 - KnxManufacturer_M_SOLOMIO_SRL KnxManufacturer = 540 - KnxManufacturer_M_DOMOTICA_LABS KnxManufacturer = 541 - KnxManufacturer_M_NVC_INTERNATIONAL KnxManufacturer = 542 - KnxManufacturer_M_BA KnxManufacturer = 543 - KnxManufacturer_M_IRIS_CERAMICA_GROUP KnxManufacturer = 544 - KnxManufacturer_M_WIREEO KnxManufacturer = 545 - KnxManufacturer_M_NVCLIGHTING KnxManufacturer = 546 - KnxManufacturer_M_JINAN_TIAN_DA_SHENG_INFORMATION_TECHNOLOGY_CO_ KnxManufacturer = 547 - KnxManufacturer_M_ARMITI_TRADING KnxManufacturer = 548 - KnxManufacturer_M_ELEK KnxManufacturer = 549 - KnxManufacturer_M_ACCORDIA_SA KnxManufacturer = 550 - KnxManufacturer_M_OURICAN KnxManufacturer = 551 - KnxManufacturer_M_INLIWOSE KnxManufacturer = 552 - KnxManufacturer_M_BOSCH_SHANGHAI_SMART_LIFE_TECHNOLOGY_LTD_ KnxManufacturer = 553 - KnxManufacturer_M_SHK_KNX KnxManufacturer = 554 - KnxManufacturer_M_AMPIO KnxManufacturer = 555 - KnxManufacturer_M_MINGXING_WISDOM KnxManufacturer = 556 - KnxManufacturer_M_ALTEN_SW_GMBH KnxManufacturer = 557 - KnxManufacturer_M_V_Y_C_SRL KnxManufacturer = 558 - KnxManufacturer_M_TERMINUS_GROUP KnxManufacturer = 559 - KnxManufacturer_M_WONDERFUL_CITY_TECHNOLOGY KnxManufacturer = 560 - KnxManufacturer_M_QBICTECHNOLOGY KnxManufacturer = 561 - KnxManufacturer_M_EMBEDDED_AUTOMATION_EQUIPMENT_SHANGHAI_LIMITED KnxManufacturer = 562 - KnxManufacturer_M_ONEWORK KnxManufacturer = 563 - KnxManufacturer_M_PL_LINK KnxManufacturer = 564 - KnxManufacturer_M_FASEL_GMBH_ELEKTRONIK KnxManufacturer = 565 - KnxManufacturer_M_GOLDENHOME_SMART KnxManufacturer = 566 - KnxManufacturer_M_GOLDMEDAL KnxManufacturer = 567 - KnxManufacturer_M_CannX KnxManufacturer = 568 - KnxManufacturer_M_EGI___EARTH_GOODNESS KnxManufacturer = 569 - KnxManufacturer_M_VIEGA_GMBH_AND_CO__KG KnxManufacturer = 570 - KnxManufacturer_M_FREDON_DIGITAL_BUILDINGS KnxManufacturer = 571 - KnxManufacturer_M_HELUKABEL_THAILAND_CO__LTD_ KnxManufacturer = 572 - KnxManufacturer_M_ACE_TECHNOLOGY KnxManufacturer = 573 - KnxManufacturer_M_MEX_ELECTRIC_TECHNOLOGY_SHANGHAI_CO___LTD KnxManufacturer = 574 - KnxManufacturer_M_SUMAMO KnxManufacturer = 575 - KnxManufacturer_M_SVIT KnxManufacturer = 576 - KnxManufacturer_M_TECGET KnxManufacturer = 577 - KnxManufacturer_M_XEROPOINT KnxManufacturer = 578 - KnxManufacturer_M_HONEYWELL_BUILDING_TECHNOLOGIES KnxManufacturer = 579 - KnxManufacturer_M_COMFORTCLICK KnxManufacturer = 580 - KnxManufacturer_M_DORBAS_ELECTRIC KnxManufacturer = 581 - KnxManufacturer_M_REMKO_GMBH_AND_CO__KG KnxManufacturer = 582 - KnxManufacturer_M_SHENZHEN_CONGXUN_INTELLIGENT_TECHNOLOGY_CO___LTD KnxManufacturer = 583 - KnxManufacturer_M_ANDAS KnxManufacturer = 584 - KnxManufacturer_M_HEFEI_CHUANG_YUE_INTELLIGENT_TECHNOLOGY_CO__LTD KnxManufacturer = 585 - KnxManufacturer_M_LARFE KnxManufacturer = 586 - KnxManufacturer_M_DONGGUAN_MUHCCI_ELECTRICAL KnxManufacturer = 587 - KnxManufacturer_M_STEC KnxManufacturer = 588 - KnxManufacturer_M_ARIGO_SOFTWARE_GMBH KnxManufacturer = 589 - KnxManufacturer_M_FEISHELEC KnxManufacturer = 590 - KnxManufacturer_M_GORDIC KnxManufacturer = 591 - KnxManufacturer_M_DELTA_ELECTRONICS KnxManufacturer = 592 - KnxManufacturer_M_SHANGHAI_LEWIN_INTELLIGENT_TECHNOLOGY_CO__LTD_ KnxManufacturer = 593 - KnxManufacturer_M_KG_POWER KnxManufacturer = 594 - KnxManufacturer_M_ZHEJIANG_MOORGEN_INTELLIGENT_TECHNOLOGY_CO___LTD KnxManufacturer = 595 - KnxManufacturer_M_GUANGDONG_KANWAY KnxManufacturer = 596 - KnxManufacturer_M_RAMIREZ_ENGINEERING_GMBH KnxManufacturer = 597 - KnxManufacturer_M_ZHONGSHAN_TAIYANG_IMPANDEXP__CO_LTD KnxManufacturer = 598 - KnxManufacturer_M_VIHAN_ELECTRIC_PVT_LTD KnxManufacturer = 599 - KnxManufacturer_M_SPLENDID_MINDS_GMBH KnxManufacturer = 600 - KnxManufacturer_M_ESTADA KnxManufacturer = 601 - KnxManufacturer_M_ZHONGYUNXINZHIKONGGUJITUANYOUXIANGONGSI KnxManufacturer = 602 - KnxManufacturer_M_STUHL_REGELSYSTEME_GMBH KnxManufacturer = 603 - KnxManufacturer_M_SHENZHEN_GLUCK_TECHNOLOGY_CO___LTD KnxManufacturer = 604 - KnxManufacturer_M_GAIMEX KnxManufacturer = 605 - KnxManufacturer_M_B3_INTERNATIONAL_S_R_L KnxManufacturer = 606 - KnxManufacturer_M_MM_ELECTRO KnxManufacturer = 607 - KnxManufacturer_M_CASCODA KnxManufacturer = 608 - KnxManufacturer_M_XIAMEN_INTRETECH_INC_ KnxManufacturer = 609 - KnxManufacturer_M_KILOELEC_TECHNOLOGY KnxManufacturer = 610 - KnxManufacturer_M_INYX KnxManufacturer = 611 - KnxManufacturer_M_SMART_BUILDING_SERVICES_GMBH KnxManufacturer = 612 - KnxManufacturer_M_BSS_GMBH KnxManufacturer = 613 - KnxManufacturer_M_ABB___RESERVED KnxManufacturer = 614 - KnxManufacturer_M_BUSCH_JAEGER_ELEKTRO___RESERVED KnxManufacturer = 615 + KnxManufacturer_M_MAICO KnxManufacturer = 439 + KnxManufacturer_M_ELAN_SRL KnxManufacturer = 440 + KnxManufacturer_M_MINHHA_TECHNOLOGY_CO__LTD KnxManufacturer = 441 + KnxManufacturer_M_ZHEJIANG_TIANJIE_INDUSTRIAL_CORP_ KnxManufacturer = 442 + KnxManufacturer_M_IAUTOMATION_PTY_LIMITED KnxManufacturer = 443 + KnxManufacturer_M_EXTRON KnxManufacturer = 444 + KnxManufacturer_M_FREEDOMPRO KnxManufacturer = 445 + KnxManufacturer_M_ONEHOME KnxManufacturer = 446 + KnxManufacturer_M_EOS_SAUNATECHNIK_GMBH KnxManufacturer = 447 + KnxManufacturer_M_KUSATEK_GMBH KnxManufacturer = 448 + KnxManufacturer_M_EISBAER_SCADA KnxManufacturer = 449 + KnxManufacturer_M_AUTOMATISMI_BENINCA_S_P_A_ KnxManufacturer = 450 + KnxManufacturer_M_BLENDOM KnxManufacturer = 451 + KnxManufacturer_M_MADEL_AIR_TECHNICAL_DIFFUSION KnxManufacturer = 452 + KnxManufacturer_M_NIKO KnxManufacturer = 453 + KnxManufacturer_M_BOSCH_REXROTH_AG KnxManufacturer = 454 + KnxManufacturer_M_CANDM_PRODUCTS KnxManufacturer = 455 + KnxManufacturer_M_HOERMANN_KG_VERKAUFSGESELLSCHAFT KnxManufacturer = 456 + KnxManufacturer_M_SHANGHAI_RAJAYASA_CO__LTD KnxManufacturer = 457 + KnxManufacturer_M_SUZUKI KnxManufacturer = 458 + KnxManufacturer_M_SILENT_GLISS_INTERNATIONAL_LTD_ KnxManufacturer = 459 + KnxManufacturer_M_BEE_CONTROLS_ADGSC_GROUP KnxManufacturer = 460 + KnxManufacturer_M_XDTECGMBH KnxManufacturer = 461 + KnxManufacturer_M_OSRAM KnxManufacturer = 462 + KnxManufacturer_M_LEBENOR KnxManufacturer = 463 + KnxManufacturer_M_AUTOMANENG KnxManufacturer = 464 + KnxManufacturer_M_HONEYWELL_AUTOMATION_SOLUTION_CONTROLCHINA KnxManufacturer = 465 + KnxManufacturer_M_HANGZHOU_BINTHEN_INTELLIGENCE_TECHNOLOGY_CO__LTD KnxManufacturer = 466 + KnxManufacturer_M_ETA_HEIZTECHNIK KnxManufacturer = 467 + KnxManufacturer_M_DIVUS_GMBH KnxManufacturer = 468 + KnxManufacturer_M_NANJING_TAIJIESAI_INTELLIGENT_TECHNOLOGY_CO__LTD_ KnxManufacturer = 469 + KnxManufacturer_M_LUNATONE KnxManufacturer = 470 + KnxManufacturer_M_ZHEJIANG_SCTECH_BUILDING_INTELLIGENT KnxManufacturer = 471 + KnxManufacturer_M_FOSHAN_QITE_TECHNOLOGY_CO___LTD_ KnxManufacturer = 472 + KnxManufacturer_M_NOKE KnxManufacturer = 473 + KnxManufacturer_M_LANDCOM KnxManufacturer = 474 + KnxManufacturer_M_STORK_AS KnxManufacturer = 475 + KnxManufacturer_M_HANGZHOU_SHENDU_TECHNOLOGY_CO___LTD_ KnxManufacturer = 476 + KnxManufacturer_M_COOLAUTOMATION KnxManufacturer = 477 + KnxManufacturer_M_APRSTERN KnxManufacturer = 478 + KnxManufacturer_M_SONNEN KnxManufacturer = 479 + KnxManufacturer_M_DNAKE KnxManufacturer = 480 + KnxManufacturer_M_NEUBERGER_GEBAEUDEAUTOMATION_GMBH KnxManufacturer = 481 + KnxManufacturer_M_STILIGER KnxManufacturer = 482 + KnxManufacturer_M_BERGHOF_AUTOMATION_GMBH KnxManufacturer = 483 + KnxManufacturer_M_TOTAL_AUTOMATION_AND_CONTROLS_GMBH KnxManufacturer = 484 + KnxManufacturer_M_DOVIT KnxManufacturer = 485 + KnxManufacturer_M_INSTALIGHTING_GMBH KnxManufacturer = 486 + KnxManufacturer_M_UNI_TEC KnxManufacturer = 487 + KnxManufacturer_M_CASATUNES KnxManufacturer = 488 + KnxManufacturer_M_EMT KnxManufacturer = 489 + KnxManufacturer_M_SENFFICIENT KnxManufacturer = 490 + KnxManufacturer_M_AUROLITE_ELECTRICAL_PANYU_GUANGZHOU_LIMITED KnxManufacturer = 491 + KnxManufacturer_M_ABB_XIAMEN_SMART_TECHNOLOGY_CO___LTD_ KnxManufacturer = 492 + KnxManufacturer_M_SAMSON_ELECTRIC_WIRE KnxManufacturer = 493 + KnxManufacturer_M_T_TOUCHING KnxManufacturer = 494 + KnxManufacturer_M_CORE_SMART_HOME KnxManufacturer = 495 + KnxManufacturer_M_GREENCONNECT_SOLUTIONS_SA KnxManufacturer = 496 + KnxManufacturer_M_ELETTRONICA_CONDUTTORI KnxManufacturer = 497 + KnxManufacturer_M_MKFC KnxManufacturer = 498 + KnxManufacturer_M_AUTOMATIONPlus KnxManufacturer = 499 + KnxManufacturer_M_BLUE_AND_RED KnxManufacturer = 500 + KnxManufacturer_M_FROGBLUE KnxManufacturer = 501 + KnxManufacturer_M_SAVESOR KnxManufacturer = 502 + KnxManufacturer_M_APP_TECH KnxManufacturer = 503 + KnxManufacturer_M_SENSORTEC_AG KnxManufacturer = 504 + KnxManufacturer_M_NYSA_TECHNOLOGY_AND_SOLUTIONS KnxManufacturer = 505 + KnxManufacturer_M_FARADITE KnxManufacturer = 506 + KnxManufacturer_M_OPTIMUS KnxManufacturer = 507 + KnxManufacturer_M_KTS_S_R_L_ KnxManufacturer = 508 + KnxManufacturer_M_RAMCRO_SPA KnxManufacturer = 509 + KnxManufacturer_M_WUHAN_WISECREATE_UNIVERSE_TECHNOLOGY_CO___LTD KnxManufacturer = 510 + KnxManufacturer_M_BEMI_SMART_HOME_LTD KnxManufacturer = 511 + KnxManufacturer_M_ARDOMUS KnxManufacturer = 512 + KnxManufacturer_M_CHANGXING KnxManufacturer = 513 + KnxManufacturer_M_E_CONTROLS KnxManufacturer = 514 + KnxManufacturer_M_AIB_TECHNOLOGY KnxManufacturer = 515 + KnxManufacturer_M_NVC KnxManufacturer = 516 + KnxManufacturer_M_KBOX KnxManufacturer = 517 + KnxManufacturer_M_CNS KnxManufacturer = 518 + KnxManufacturer_M_TYBA KnxManufacturer = 519 + KnxManufacturer_M_ATREL KnxManufacturer = 520 + KnxManufacturer_M_SIMON_ELECTRIC_CHINA_CO___LTD KnxManufacturer = 521 + KnxManufacturer_M_KORDZ_GROUP KnxManufacturer = 522 + KnxManufacturer_M_ND_ELECTRIC KnxManufacturer = 523 + KnxManufacturer_M_CONTROLIUM KnxManufacturer = 524 + KnxManufacturer_M_FAMO_GMBH_AND_CO__KG KnxManufacturer = 525 + KnxManufacturer_M_CDN_SMART KnxManufacturer = 526 + KnxManufacturer_M_HESTON KnxManufacturer = 527 + KnxManufacturer_M_ESLA_CONEXIONES_S_L_ KnxManufacturer = 528 + KnxManufacturer_M_WEISHAUPT KnxManufacturer = 529 + KnxManufacturer_M_ASTRUM_TECHNOLOGY KnxManufacturer = 530 + KnxManufacturer_M_WUERTH_ELEKTRONIK_STELVIO_KONTEK_S_P_A_ KnxManufacturer = 531 + KnxManufacturer_M_NANOTECO_CORPORATION KnxManufacturer = 532 + KnxManufacturer_M_NIETIAN KnxManufacturer = 533 + KnxManufacturer_M_SUMSIR KnxManufacturer = 534 + KnxManufacturer_M_ORBIS_TECNOLOGIA_ELECTRICA_SA KnxManufacturer = 535 + KnxManufacturer_M_NANJING_ZHONGYI_IOT_TECHNOLOGY_CO___LTD_ KnxManufacturer = 536 + KnxManufacturer_M_ANLIPS KnxManufacturer = 537 + KnxManufacturer_M_GUANGDONG_PAK_CORPORATION_CO___LTD KnxManufacturer = 538 + KnxManufacturer_M_BVK_TECHNOLOGY KnxManufacturer = 539 + KnxManufacturer_M_SOLOMIO_SRL KnxManufacturer = 540 + KnxManufacturer_M_DOMOTICA_LABS KnxManufacturer = 541 + KnxManufacturer_M_NVC_INTERNATIONAL KnxManufacturer = 542 + KnxManufacturer_M_BA KnxManufacturer = 543 + KnxManufacturer_M_IRIS_CERAMICA_GROUP KnxManufacturer = 544 + KnxManufacturer_M_WIREEO KnxManufacturer = 545 + KnxManufacturer_M_NVCLIGHTING KnxManufacturer = 546 + KnxManufacturer_M_JINAN_TIAN_DA_SHENG_INFORMATION_TECHNOLOGY_CO_ KnxManufacturer = 547 + KnxManufacturer_M_ARMITI_TRADING KnxManufacturer = 548 + KnxManufacturer_M_ELEK KnxManufacturer = 549 + KnxManufacturer_M_ACCORDIA_SA KnxManufacturer = 550 + KnxManufacturer_M_OURICAN KnxManufacturer = 551 + KnxManufacturer_M_INLIWOSE KnxManufacturer = 552 + KnxManufacturer_M_BOSCH_SHANGHAI_SMART_LIFE_TECHNOLOGY_LTD_ KnxManufacturer = 553 + KnxManufacturer_M_SHK_KNX KnxManufacturer = 554 + KnxManufacturer_M_AMPIO KnxManufacturer = 555 + KnxManufacturer_M_MINGXING_WISDOM KnxManufacturer = 556 + KnxManufacturer_M_ALTEN_SW_GMBH KnxManufacturer = 557 + KnxManufacturer_M_V_Y_C_SRL KnxManufacturer = 558 + KnxManufacturer_M_TERMINUS_GROUP KnxManufacturer = 559 + KnxManufacturer_M_WONDERFUL_CITY_TECHNOLOGY KnxManufacturer = 560 + KnxManufacturer_M_QBICTECHNOLOGY KnxManufacturer = 561 + KnxManufacturer_M_EMBEDDED_AUTOMATION_EQUIPMENT_SHANGHAI_LIMITED KnxManufacturer = 562 + KnxManufacturer_M_ONEWORK KnxManufacturer = 563 + KnxManufacturer_M_PL_LINK KnxManufacturer = 564 + KnxManufacturer_M_FASEL_GMBH_ELEKTRONIK KnxManufacturer = 565 + KnxManufacturer_M_GOLDENHOME_SMART KnxManufacturer = 566 + KnxManufacturer_M_GOLDMEDAL KnxManufacturer = 567 + KnxManufacturer_M_CannX KnxManufacturer = 568 + KnxManufacturer_M_EGI___EARTH_GOODNESS KnxManufacturer = 569 + KnxManufacturer_M_VIEGA_GMBH_AND_CO__KG KnxManufacturer = 570 + KnxManufacturer_M_FREDON_DIGITAL_BUILDINGS KnxManufacturer = 571 + KnxManufacturer_M_HELUKABEL_THAILAND_CO__LTD_ KnxManufacturer = 572 + KnxManufacturer_M_ACE_TECHNOLOGY KnxManufacturer = 573 + KnxManufacturer_M_MEX_ELECTRIC_TECHNOLOGY_SHANGHAI_CO___LTD KnxManufacturer = 574 + KnxManufacturer_M_SUMAMO KnxManufacturer = 575 + KnxManufacturer_M_SVIT KnxManufacturer = 576 + KnxManufacturer_M_TECGET KnxManufacturer = 577 + KnxManufacturer_M_XEROPOINT KnxManufacturer = 578 + KnxManufacturer_M_HONEYWELL_BUILDING_TECHNOLOGIES KnxManufacturer = 579 + KnxManufacturer_M_COMFORTCLICK KnxManufacturer = 580 + KnxManufacturer_M_DORBAS_ELECTRIC KnxManufacturer = 581 + KnxManufacturer_M_REMKO_GMBH_AND_CO__KG KnxManufacturer = 582 + KnxManufacturer_M_SHENZHEN_CONGXUN_INTELLIGENT_TECHNOLOGY_CO___LTD KnxManufacturer = 583 + KnxManufacturer_M_ANDAS KnxManufacturer = 584 + KnxManufacturer_M_HEFEI_CHUANG_YUE_INTELLIGENT_TECHNOLOGY_CO__LTD KnxManufacturer = 585 + KnxManufacturer_M_LARFE KnxManufacturer = 586 + KnxManufacturer_M_DONGGUAN_MUHCCI_ELECTRICAL KnxManufacturer = 587 + KnxManufacturer_M_STEC KnxManufacturer = 588 + KnxManufacturer_M_ARIGO_SOFTWARE_GMBH KnxManufacturer = 589 + KnxManufacturer_M_FEISHELEC KnxManufacturer = 590 + KnxManufacturer_M_GORDIC KnxManufacturer = 591 + KnxManufacturer_M_DELTA_ELECTRONICS KnxManufacturer = 592 + KnxManufacturer_M_SHANGHAI_LEWIN_INTELLIGENT_TECHNOLOGY_CO__LTD_ KnxManufacturer = 593 + KnxManufacturer_M_KG_POWER KnxManufacturer = 594 + KnxManufacturer_M_ZHEJIANG_MOORGEN_INTELLIGENT_TECHNOLOGY_CO___LTD KnxManufacturer = 595 + KnxManufacturer_M_GUANGDONG_KANWAY KnxManufacturer = 596 + KnxManufacturer_M_RAMIREZ_ENGINEERING_GMBH KnxManufacturer = 597 + KnxManufacturer_M_ZHONGSHAN_TAIYANG_IMPANDEXP__CO_LTD KnxManufacturer = 598 + KnxManufacturer_M_VIHAN_ELECTRIC_PVT_LTD KnxManufacturer = 599 + KnxManufacturer_M_SPLENDID_MINDS_GMBH KnxManufacturer = 600 + KnxManufacturer_M_ESTADA KnxManufacturer = 601 + KnxManufacturer_M_ZHONGYUNXINZHIKONGGUJITUANYOUXIANGONGSI KnxManufacturer = 602 + KnxManufacturer_M_STUHL_REGELSYSTEME_GMBH KnxManufacturer = 603 + KnxManufacturer_M_SHENZHEN_GLUCK_TECHNOLOGY_CO___LTD KnxManufacturer = 604 + KnxManufacturer_M_GAIMEX KnxManufacturer = 605 + KnxManufacturer_M_B3_INTERNATIONAL_S_R_L KnxManufacturer = 606 + KnxManufacturer_M_MM_ELECTRO KnxManufacturer = 607 + KnxManufacturer_M_CASCODA KnxManufacturer = 608 + KnxManufacturer_M_XIAMEN_INTRETECH_INC_ KnxManufacturer = 609 + KnxManufacturer_M_KILOELEC_TECHNOLOGY KnxManufacturer = 610 + KnxManufacturer_M_INYX KnxManufacturer = 611 + KnxManufacturer_M_SMART_BUILDING_SERVICES_GMBH KnxManufacturer = 612 + KnxManufacturer_M_BSS_GMBH KnxManufacturer = 613 + KnxManufacturer_M_ABB___RESERVED KnxManufacturer = 614 + KnxManufacturer_M_BUSCH_JAEGER_ELEKTRO___RESERVED KnxManufacturer = 615 ) var KnxManufacturerValues []KnxManufacturer func init() { _ = errors.New - KnxManufacturerValues = []KnxManufacturer{ + KnxManufacturerValues = []KnxManufacturer { KnxManufacturer_M_UNKNOWN, KnxManufacturer_M_SIEMENS, KnxManufacturer_M_ABB, @@ -1279,2474 +1279,1858 @@ func init() { } } + func (e KnxManufacturer) Number() uint16 { - switch e { - case 0: - { /* '0' */ - return 0 + switch e { + case 0: { /* '0' */ + return 0 } - case 1: - { /* '1' */ - return 1 + case 1: { /* '1' */ + return 1 } - case 10: - { /* '10' */ - return 11 + case 10: { /* '10' */ + return 11 } - case 100: - { /* '100' */ - return 140 + case 100: { /* '100' */ + return 140 } - case 101: - { /* '101' */ - return 141 + case 101: { /* '101' */ + return 141 } - case 102: - { /* '102' */ - return 142 + case 102: { /* '102' */ + return 142 } - case 103: - { /* '103' */ - return 143 + case 103: { /* '103' */ + return 143 } - case 104: - { /* '104' */ - return 144 + case 104: { /* '104' */ + return 144 } - case 105: - { /* '105' */ - return 145 + case 105: { /* '105' */ + return 145 } - case 106: - { /* '106' */ - return 146 + case 106: { /* '106' */ + return 146 } - case 107: - { /* '107' */ - return 147 + case 107: { /* '107' */ + return 147 } - case 108: - { /* '108' */ - return 148 + case 108: { /* '108' */ + return 148 } - case 109: - { /* '109' */ - return 149 + case 109: { /* '109' */ + return 149 } - case 11: - { /* '11' */ - return 12 + case 11: { /* '11' */ + return 12 } - case 110: - { /* '110' */ - return 150 + case 110: { /* '110' */ + return 150 } - case 111: - { /* '111' */ - return 151 + case 111: { /* '111' */ + return 151 } - case 112: - { /* '112' */ - return 152 + case 112: { /* '112' */ + return 152 } - case 113: - { /* '113' */ - return 153 + case 113: { /* '113' */ + return 153 } - case 114: - { /* '114' */ - return 154 + case 114: { /* '114' */ + return 154 } - case 115: - { /* '115' */ - return 155 + case 115: { /* '115' */ + return 155 } - case 116: - { /* '116' */ - return 156 + case 116: { /* '116' */ + return 156 } - case 117: - { /* '117' */ - return 157 + case 117: { /* '117' */ + return 157 } - case 118: - { /* '118' */ - return 158 + case 118: { /* '118' */ + return 158 } - case 119: - { /* '119' */ - return 159 + case 119: { /* '119' */ + return 159 } - case 12: - { /* '12' */ - return 14 + case 12: { /* '12' */ + return 14 } - case 120: - { /* '120' */ - return 160 + case 120: { /* '120' */ + return 160 } - case 121: - { /* '121' */ - return 161 + case 121: { /* '121' */ + return 161 } - case 122: - { /* '122' */ - return 162 + case 122: { /* '122' */ + return 162 } - case 123: - { /* '123' */ - return 163 + case 123: { /* '123' */ + return 163 } - case 124: - { /* '124' */ - return 164 + case 124: { /* '124' */ + return 164 } - case 125: - { /* '125' */ - return 165 + case 125: { /* '125' */ + return 165 } - case 126: - { /* '126' */ - return 166 + case 126: { /* '126' */ + return 166 } - case 127: - { /* '127' */ - return 167 + case 127: { /* '127' */ + return 167 } - case 128: - { /* '128' */ - return 168 + case 128: { /* '128' */ + return 168 } - case 129: - { /* '129' */ - return 169 + case 129: { /* '129' */ + return 169 } - case 13: - { /* '13' */ - return 22 + case 13: { /* '13' */ + return 22 } - case 130: - { /* '130' */ - return 170 + case 130: { /* '130' */ + return 170 } - case 131: - { /* '131' */ - return 171 + case 131: { /* '131' */ + return 171 } - case 132: - { /* '132' */ - return 172 + case 132: { /* '132' */ + return 172 } - case 133: - { /* '133' */ - return 173 + case 133: { /* '133' */ + return 173 } - case 134: - { /* '134' */ - return 174 + case 134: { /* '134' */ + return 174 } - case 135: - { /* '135' */ - return 175 + case 135: { /* '135' */ + return 175 } - case 136: - { /* '136' */ - return 176 + case 136: { /* '136' */ + return 176 } - case 137: - { /* '137' */ - return 177 + case 137: { /* '137' */ + return 177 } - case 138: - { /* '138' */ - return 178 + case 138: { /* '138' */ + return 178 } - case 139: - { /* '139' */ - return 179 + case 139: { /* '139' */ + return 179 } - case 14: - { /* '14' */ - return 24 + case 14: { /* '14' */ + return 24 } - case 140: - { /* '140' */ - return 180 + case 140: { /* '140' */ + return 180 } - case 141: - { /* '141' */ - return 181 + case 141: { /* '141' */ + return 181 } - case 142: - { /* '142' */ - return 182 + case 142: { /* '142' */ + return 182 } - case 143: - { /* '143' */ - return 183 + case 143: { /* '143' */ + return 183 } - case 144: - { /* '144' */ - return 184 + case 144: { /* '144' */ + return 184 } - case 145: - { /* '145' */ - return 185 + case 145: { /* '145' */ + return 185 } - case 146: - { /* '146' */ - return 186 + case 146: { /* '146' */ + return 186 } - case 147: - { /* '147' */ - return 187 + case 147: { /* '147' */ + return 187 } - case 148: - { /* '148' */ - return 188 + case 148: { /* '148' */ + return 188 } - case 149: - { /* '149' */ - return 189 + case 149: { /* '149' */ + return 189 } - case 15: - { /* '15' */ - return 25 + case 15: { /* '15' */ + return 25 } - case 150: - { /* '150' */ - return 190 + case 150: { /* '150' */ + return 190 } - case 151: - { /* '151' */ - return 191 + case 151: { /* '151' */ + return 191 } - case 152: - { /* '152' */ - return 192 + case 152: { /* '152' */ + return 192 } - case 153: - { /* '153' */ - return 193 + case 153: { /* '153' */ + return 193 } - case 154: - { /* '154' */ - return 194 + case 154: { /* '154' */ + return 194 } - case 155: - { /* '155' */ - return 195 + case 155: { /* '155' */ + return 195 } - case 156: - { /* '156' */ - return 196 + case 156: { /* '156' */ + return 196 } - case 157: - { /* '157' */ - return 197 + case 157: { /* '157' */ + return 197 } - case 158: - { /* '158' */ - return 198 + case 158: { /* '158' */ + return 198 } - case 159: - { /* '159' */ - return 199 + case 159: { /* '159' */ + return 199 } - case 16: - { /* '16' */ - return 27 + case 16: { /* '16' */ + return 27 } - case 160: - { /* '160' */ - return 200 + case 160: { /* '160' */ + return 200 } - case 161: - { /* '161' */ - return 201 + case 161: { /* '161' */ + return 201 } - case 162: - { /* '162' */ - return 202 + case 162: { /* '162' */ + return 202 } - case 163: - { /* '163' */ - return 204 + case 163: { /* '163' */ + return 204 } - case 164: - { /* '164' */ - return 205 + case 164: { /* '164' */ + return 205 } - case 165: - { /* '165' */ - return 206 + case 165: { /* '165' */ + return 206 } - case 166: - { /* '166' */ - return 207 + case 166: { /* '166' */ + return 207 } - case 167: - { /* '167' */ - return 208 + case 167: { /* '167' */ + return 208 } - case 168: - { /* '168' */ - return 209 + case 168: { /* '168' */ + return 209 } - case 169: - { /* '169' */ - return 210 + case 169: { /* '169' */ + return 210 } - case 17: - { /* '17' */ - return 28 + case 17: { /* '17' */ + return 28 } - case 170: - { /* '170' */ - return 211 + case 170: { /* '170' */ + return 211 } - case 171: - { /* '171' */ - return 214 + case 171: { /* '171' */ + return 214 } - case 172: - { /* '172' */ - return 215 + case 172: { /* '172' */ + return 215 } - case 173: - { /* '173' */ - return 216 + case 173: { /* '173' */ + return 216 } - case 174: - { /* '174' */ - return 217 + case 174: { /* '174' */ + return 217 } - case 175: - { /* '175' */ - return 218 + case 175: { /* '175' */ + return 218 } - case 176: - { /* '176' */ - return 219 + case 176: { /* '176' */ + return 219 } - case 177: - { /* '177' */ - return 220 + case 177: { /* '177' */ + return 220 } - case 178: - { /* '178' */ - return 222 + case 178: { /* '178' */ + return 222 } - case 179: - { /* '179' */ - return 223 + case 179: { /* '179' */ + return 223 } - case 18: - { /* '18' */ - return 29 + case 18: { /* '18' */ + return 29 } - case 180: - { /* '180' */ - return 225 + case 180: { /* '180' */ + return 225 } - case 181: - { /* '181' */ - return 227 + case 181: { /* '181' */ + return 227 } - case 182: - { /* '182' */ - return 228 + case 182: { /* '182' */ + return 228 } - case 183: - { /* '183' */ - return 232 + case 183: { /* '183' */ + return 232 } - case 184: - { /* '184' */ - return 233 + case 184: { /* '184' */ + return 233 } - case 185: - { /* '185' */ - return 234 + case 185: { /* '185' */ + return 234 } - case 186: - { /* '186' */ - return 235 + case 186: { /* '186' */ + return 235 } - case 187: - { /* '187' */ - return 237 + case 187: { /* '187' */ + return 237 } - case 188: - { /* '188' */ - return 238 + case 188: { /* '188' */ + return 238 } - case 189: - { /* '189' */ - return 239 + case 189: { /* '189' */ + return 239 } - case 19: - { /* '19' */ - return 30 + case 19: { /* '19' */ + return 30 } - case 190: - { /* '190' */ - return 240 + case 190: { /* '190' */ + return 240 } - case 191: - { /* '191' */ - return 241 + case 191: { /* '191' */ + return 241 } - case 192: - { /* '192' */ - return 242 + case 192: { /* '192' */ + return 242 } - case 193: - { /* '193' */ - return 244 + case 193: { /* '193' */ + return 244 } - case 194: - { /* '194' */ - return 245 + case 194: { /* '194' */ + return 245 } - case 195: - { /* '195' */ - return 246 + case 195: { /* '195' */ + return 246 } - case 196: - { /* '196' */ - return 248 + case 196: { /* '196' */ + return 248 } - case 197: - { /* '197' */ - return 249 + case 197: { /* '197' */ + return 249 } - case 198: - { /* '198' */ - return 250 + case 198: { /* '198' */ + return 250 } - case 199: - { /* '199' */ - return 251 + case 199: { /* '199' */ + return 251 } - case 2: - { /* '2' */ - return 2 + case 2: { /* '2' */ + return 2 } - case 20: - { /* '20' */ - return 31 + case 20: { /* '20' */ + return 31 } - case 200: - { /* '200' */ - return 252 + case 200: { /* '200' */ + return 252 } - case 201: - { /* '201' */ - return 253 + case 201: { /* '201' */ + return 253 } - case 202: - { /* '202' */ - return 254 + case 202: { /* '202' */ + return 254 } - case 203: - { /* '203' */ - return 256 + case 203: { /* '203' */ + return 256 } - case 204: - { /* '204' */ - return 257 + case 204: { /* '204' */ + return 257 } - case 205: - { /* '205' */ - return 258 + case 205: { /* '205' */ + return 258 } - case 206: - { /* '206' */ - return 259 + case 206: { /* '206' */ + return 259 } - case 207: - { /* '207' */ - return 260 + case 207: { /* '207' */ + return 260 } - case 208: - { /* '208' */ - return 261 + case 208: { /* '208' */ + return 261 } - case 209: - { /* '209' */ - return 262 + case 209: { /* '209' */ + return 262 } - case 21: - { /* '21' */ - return 32 + case 21: { /* '21' */ + return 32 } - case 210: - { /* '210' */ - return 263 + case 210: { /* '210' */ + return 263 } - case 211: - { /* '211' */ - return 264 + case 211: { /* '211' */ + return 264 } - case 212: - { /* '212' */ - return 265 + case 212: { /* '212' */ + return 265 } - case 213: - { /* '213' */ - return 266 + case 213: { /* '213' */ + return 266 } - case 214: - { /* '214' */ - return 267 + case 214: { /* '214' */ + return 267 } - case 215: - { /* '215' */ - return 268 + case 215: { /* '215' */ + return 268 } - case 216: - { /* '216' */ - return 269 + case 216: { /* '216' */ + return 269 } - case 217: - { /* '217' */ - return 270 + case 217: { /* '217' */ + return 270 } - case 218: - { /* '218' */ - return 271 + case 218: { /* '218' */ + return 271 } - case 219: - { /* '219' */ - return 272 + case 219: { /* '219' */ + return 272 } - case 22: - { /* '22' */ - return 33 + case 22: { /* '22' */ + return 33 } - case 220: - { /* '220' */ - return 273 + case 220: { /* '220' */ + return 273 } - case 221: - { /* '221' */ - return 274 + case 221: { /* '221' */ + return 274 } - case 222: - { /* '222' */ - return 275 + case 222: { /* '222' */ + return 275 } - case 223: - { /* '223' */ - return 276 + case 223: { /* '223' */ + return 276 } - case 224: - { /* '224' */ - return 277 + case 224: { /* '224' */ + return 277 } - case 225: - { /* '225' */ - return 278 + case 225: { /* '225' */ + return 278 } - case 226: - { /* '226' */ - return 279 + case 226: { /* '226' */ + return 279 } - case 227: - { /* '227' */ - return 280 + case 227: { /* '227' */ + return 280 } - case 228: - { /* '228' */ - return 281 + case 228: { /* '228' */ + return 281 } - case 229: - { /* '229' */ - return 282 + case 229: { /* '229' */ + return 282 } - case 23: - { /* '23' */ - return 34 + case 23: { /* '23' */ + return 34 } - case 230: - { /* '230' */ - return 283 + case 230: { /* '230' */ + return 283 } - case 231: - { /* '231' */ - return 284 + case 231: { /* '231' */ + return 284 } - case 232: - { /* '232' */ - return 285 + case 232: { /* '232' */ + return 285 } - case 233: - { /* '233' */ - return 286 + case 233: { /* '233' */ + return 286 } - case 234: - { /* '234' */ - return 287 + case 234: { /* '234' */ + return 287 } - case 235: - { /* '235' */ - return 288 + case 235: { /* '235' */ + return 288 } - case 236: - { /* '236' */ - return 289 + case 236: { /* '236' */ + return 289 } - case 237: - { /* '237' */ - return 290 + case 237: { /* '237' */ + return 290 } - case 238: - { /* '238' */ - return 291 + case 238: { /* '238' */ + return 291 } - case 239: - { /* '239' */ - return 292 + case 239: { /* '239' */ + return 292 } - case 24: - { /* '24' */ - return 36 + case 24: { /* '24' */ + return 36 } - case 240: - { /* '240' */ - return 293 + case 240: { /* '240' */ + return 293 } - case 241: - { /* '241' */ - return 294 + case 241: { /* '241' */ + return 294 } - case 242: - { /* '242' */ - return 295 + case 242: { /* '242' */ + return 295 } - case 243: - { /* '243' */ - return 296 + case 243: { /* '243' */ + return 296 } - case 244: - { /* '244' */ - return 297 + case 244: { /* '244' */ + return 297 } - case 245: - { /* '245' */ - return 298 + case 245: { /* '245' */ + return 298 } - case 246: - { /* '246' */ - return 299 + case 246: { /* '246' */ + return 299 } - case 247: - { /* '247' */ - return 300 + case 247: { /* '247' */ + return 300 } - case 248: - { /* '248' */ - return 301 + case 248: { /* '248' */ + return 301 } - case 249: - { /* '249' */ - return 302 + case 249: { /* '249' */ + return 302 } - case 25: - { /* '25' */ - return 37 + case 25: { /* '25' */ + return 37 } - case 250: - { /* '250' */ - return 303 + case 250: { /* '250' */ + return 303 } - case 251: - { /* '251' */ - return 304 + case 251: { /* '251' */ + return 304 } - case 252: - { /* '252' */ - return 305 + case 252: { /* '252' */ + return 305 } - case 253: - { /* '253' */ - return 306 + case 253: { /* '253' */ + return 306 } - case 254: - { /* '254' */ - return 307 + case 254: { /* '254' */ + return 307 } - case 255: - { /* '255' */ - return 308 + case 255: { /* '255' */ + return 308 } - case 256: - { /* '256' */ - return 309 + case 256: { /* '256' */ + return 309 } - case 257: - { /* '257' */ - return 310 + case 257: { /* '257' */ + return 310 } - case 258: - { /* '258' */ - return 311 + case 258: { /* '258' */ + return 311 } - case 259: - { /* '259' */ - return 312 + case 259: { /* '259' */ + return 312 } - case 26: - { /* '26' */ - return 41 + case 26: { /* '26' */ + return 41 } - case 260: - { /* '260' */ - return 313 + case 260: { /* '260' */ + return 313 } - case 261: - { /* '261' */ - return 314 + case 261: { /* '261' */ + return 314 } - case 262: - { /* '262' */ - return 315 + case 262: { /* '262' */ + return 315 } - case 263: - { /* '263' */ - return 316 + case 263: { /* '263' */ + return 316 } - case 264: - { /* '264' */ - return 317 + case 264: { /* '264' */ + return 317 } - case 265: - { /* '265' */ - return 318 + case 265: { /* '265' */ + return 318 } - case 266: - { /* '266' */ - return 319 + case 266: { /* '266' */ + return 319 } - case 267: - { /* '267' */ - return 320 + case 267: { /* '267' */ + return 320 } - case 268: - { /* '268' */ - return 321 + case 268: { /* '268' */ + return 321 } - case 269: - { /* '269' */ - return 322 + case 269: { /* '269' */ + return 322 } - case 27: - { /* '27' */ - return 42 + case 27: { /* '27' */ + return 42 } - case 270: - { /* '270' */ - return 323 + case 270: { /* '270' */ + return 323 } - case 271: - { /* '271' */ - return 324 + case 271: { /* '271' */ + return 324 } - case 272: - { /* '272' */ - return 325 + case 272: { /* '272' */ + return 325 } - case 273: - { /* '273' */ - return 326 + case 273: { /* '273' */ + return 326 } - case 274: - { /* '274' */ - return 327 + case 274: { /* '274' */ + return 327 } - case 275: - { /* '275' */ - return 328 + case 275: { /* '275' */ + return 328 } - case 276: - { /* '276' */ - return 329 + case 276: { /* '276' */ + return 329 } - case 277: - { /* '277' */ - return 330 + case 277: { /* '277' */ + return 330 } - case 278: - { /* '278' */ - return 331 + case 278: { /* '278' */ + return 331 } - case 279: - { /* '279' */ - return 332 + case 279: { /* '279' */ + return 332 } - case 28: - { /* '28' */ - return 44 + case 28: { /* '28' */ + return 44 } - case 280: - { /* '280' */ - return 333 + case 280: { /* '280' */ + return 333 } - case 281: - { /* '281' */ - return 334 + case 281: { /* '281' */ + return 334 } - case 282: - { /* '282' */ - return 335 + case 282: { /* '282' */ + return 335 } - case 283: - { /* '283' */ - return 336 + case 283: { /* '283' */ + return 336 } - case 284: - { /* '284' */ - return 337 + case 284: { /* '284' */ + return 337 } - case 285: - { /* '285' */ - return 338 + case 285: { /* '285' */ + return 338 } - case 286: - { /* '286' */ - return 339 + case 286: { /* '286' */ + return 339 } - case 287: - { /* '287' */ - return 340 + case 287: { /* '287' */ + return 340 } - case 288: - { /* '288' */ - return 341 + case 288: { /* '288' */ + return 341 } - case 289: - { /* '289' */ - return 342 + case 289: { /* '289' */ + return 342 } - case 29: - { /* '29' */ - return 45 + case 29: { /* '29' */ + return 45 } - case 290: - { /* '290' */ - return 343 + case 290: { /* '290' */ + return 343 } - case 291: - { /* '291' */ - return 344 + case 291: { /* '291' */ + return 344 } - case 292: - { /* '292' */ - return 345 + case 292: { /* '292' */ + return 345 } - case 293: - { /* '293' */ - return 346 + case 293: { /* '293' */ + return 346 } - case 294: - { /* '294' */ - return 347 + case 294: { /* '294' */ + return 347 } - case 295: - { /* '295' */ - return 348 + case 295: { /* '295' */ + return 348 } - case 296: - { /* '296' */ - return 349 + case 296: { /* '296' */ + return 349 } - case 297: - { /* '297' */ - return 350 + case 297: { /* '297' */ + return 350 } - case 298: - { /* '298' */ - return 351 + case 298: { /* '298' */ + return 351 } - case 299: - { /* '299' */ - return 352 + case 299: { /* '299' */ + return 352 } - case 3: - { /* '3' */ - return 4 + case 3: { /* '3' */ + return 4 } - case 30: - { /* '30' */ - return 46 + case 30: { /* '30' */ + return 46 } - case 300: - { /* '300' */ - return 353 + case 300: { /* '300' */ + return 353 } - case 301: - { /* '301' */ - return 354 + case 301: { /* '301' */ + return 354 } - case 302: - { /* '302' */ - return 355 + case 302: { /* '302' */ + return 355 } - case 303: - { /* '303' */ - return 356 + case 303: { /* '303' */ + return 356 } - case 304: - { /* '304' */ - return 357 + case 304: { /* '304' */ + return 357 } - case 305: - { /* '305' */ - return 358 + case 305: { /* '305' */ + return 358 } - case 306: - { /* '306' */ - return 359 + case 306: { /* '306' */ + return 359 } - case 307: - { /* '307' */ - return 360 + case 307: { /* '307' */ + return 360 } - case 308: - { /* '308' */ - return 361 + case 308: { /* '308' */ + return 361 } - case 309: - { /* '309' */ - return 362 + case 309: { /* '309' */ + return 362 } - case 31: - { /* '31' */ - return 49 + case 31: { /* '31' */ + return 49 } - case 310: - { /* '310' */ - return 363 + case 310: { /* '310' */ + return 363 } - case 311: - { /* '311' */ - return 364 + case 311: { /* '311' */ + return 364 } - case 312: - { /* '312' */ - return 365 + case 312: { /* '312' */ + return 365 } - case 313: - { /* '313' */ - return 366 + case 313: { /* '313' */ + return 366 } - case 314: - { /* '314' */ - return 367 + case 314: { /* '314' */ + return 367 } - case 315: - { /* '315' */ - return 368 + case 315: { /* '315' */ + return 368 } - case 316: - { /* '316' */ - return 369 + case 316: { /* '316' */ + return 369 } - case 317: - { /* '317' */ - return 370 + case 317: { /* '317' */ + return 370 } - case 318: - { /* '318' */ - return 371 + case 318: { /* '318' */ + return 371 } - case 319: - { /* '319' */ - return 372 + case 319: { /* '319' */ + return 372 } - case 32: - { /* '32' */ - return 52 + case 32: { /* '32' */ + return 52 } - case 320: - { /* '320' */ - return 373 + case 320: { /* '320' */ + return 373 } - case 321: - { /* '321' */ - return 374 + case 321: { /* '321' */ + return 374 } - case 322: - { /* '322' */ - return 375 + case 322: { /* '322' */ + return 375 } - case 323: - { /* '323' */ - return 376 + case 323: { /* '323' */ + return 376 } - case 324: - { /* '324' */ - return 377 + case 324: { /* '324' */ + return 377 } - case 325: - { /* '325' */ - return 378 + case 325: { /* '325' */ + return 378 } - case 326: - { /* '326' */ - return 379 + case 326: { /* '326' */ + return 379 } - case 327: - { /* '327' */ - return 380 + case 327: { /* '327' */ + return 380 } - case 328: - { /* '328' */ - return 381 + case 328: { /* '328' */ + return 381 } - case 329: - { /* '329' */ - return 382 + case 329: { /* '329' */ + return 382 } - case 33: - { /* '33' */ - return 53 + case 33: { /* '33' */ + return 53 } - case 330: - { /* '330' */ - return 383 + case 330: { /* '330' */ + return 383 } - case 331: - { /* '331' */ - return 384 + case 331: { /* '331' */ + return 384 } - case 332: - { /* '332' */ - return 385 + case 332: { /* '332' */ + return 385 } - case 333: - { /* '333' */ - return 386 + case 333: { /* '333' */ + return 386 } - case 334: - { /* '334' */ - return 387 + case 334: { /* '334' */ + return 387 } - case 335: - { /* '335' */ - return 388 + case 335: { /* '335' */ + return 388 } - case 336: - { /* '336' */ - return 389 + case 336: { /* '336' */ + return 389 } - case 337: - { /* '337' */ - return 390 + case 337: { /* '337' */ + return 390 } - case 338: - { /* '338' */ - return 391 + case 338: { /* '338' */ + return 391 } - case 339: - { /* '339' */ - return 392 + case 339: { /* '339' */ + return 392 } - case 34: - { /* '34' */ - return 55 + case 34: { /* '34' */ + return 55 } - case 340: - { /* '340' */ - return 393 + case 340: { /* '340' */ + return 393 } - case 341: - { /* '341' */ - return 394 + case 341: { /* '341' */ + return 394 } - case 342: - { /* '342' */ - return 395 + case 342: { /* '342' */ + return 395 } - case 343: - { /* '343' */ - return 396 + case 343: { /* '343' */ + return 396 } - case 344: - { /* '344' */ - return 397 + case 344: { /* '344' */ + return 397 } - case 345: - { /* '345' */ - return 398 + case 345: { /* '345' */ + return 398 } - case 346: - { /* '346' */ - return 399 + case 346: { /* '346' */ + return 399 } - case 347: - { /* '347' */ - return 400 + case 347: { /* '347' */ + return 400 } - case 348: - { /* '348' */ - return 401 + case 348: { /* '348' */ + return 401 } - case 349: - { /* '349' */ - return 402 + case 349: { /* '349' */ + return 402 } - case 35: - { /* '35' */ - return 57 + case 35: { /* '35' */ + return 57 } - case 350: - { /* '350' */ - return 403 + case 350: { /* '350' */ + return 403 } - case 351: - { /* '351' */ - return 404 + case 351: { /* '351' */ + return 404 } - case 352: - { /* '352' */ - return 405 + case 352: { /* '352' */ + return 405 } - case 353: - { /* '353' */ - return 406 + case 353: { /* '353' */ + return 406 } - case 354: - { /* '354' */ - return 407 + case 354: { /* '354' */ + return 407 } - case 355: - { /* '355' */ - return 408 + case 355: { /* '355' */ + return 408 } - case 356: - { /* '356' */ - return 409 + case 356: { /* '356' */ + return 409 } - case 357: - { /* '357' */ - return 410 + case 357: { /* '357' */ + return 410 } - case 358: - { /* '358' */ - return 411 + case 358: { /* '358' */ + return 411 } - case 359: - { /* '359' */ - return 412 + case 359: { /* '359' */ + return 412 } - case 36: - { /* '36' */ - return 61 + case 36: { /* '36' */ + return 61 } - case 360: - { /* '360' */ - return 413 + case 360: { /* '360' */ + return 413 } - case 361: - { /* '361' */ - return 414 + case 361: { /* '361' */ + return 414 } - case 362: - { /* '362' */ - return 415 + case 362: { /* '362' */ + return 415 } - case 363: - { /* '363' */ - return 416 + case 363: { /* '363' */ + return 416 } - case 364: - { /* '364' */ - return 417 + case 364: { /* '364' */ + return 417 } - case 365: - { /* '365' */ - return 418 + case 365: { /* '365' */ + return 418 } - case 366: - { /* '366' */ - return 419 + case 366: { /* '366' */ + return 419 } - case 367: - { /* '367' */ - return 420 + case 367: { /* '367' */ + return 420 } - case 368: - { /* '368' */ - return 421 + case 368: { /* '368' */ + return 421 } - case 369: - { /* '369' */ - return 422 + case 369: { /* '369' */ + return 422 } - case 37: - { /* '37' */ - return 62 + case 37: { /* '37' */ + return 62 } - case 370: - { /* '370' */ - return 423 + case 370: { /* '370' */ + return 423 } - case 371: - { /* '371' */ - return 424 + case 371: { /* '371' */ + return 424 } - case 372: - { /* '372' */ - return 425 + case 372: { /* '372' */ + return 425 } - case 373: - { /* '373' */ - return 426 + case 373: { /* '373' */ + return 426 } - case 374: - { /* '374' */ - return 427 + case 374: { /* '374' */ + return 427 } - case 375: - { /* '375' */ - return 428 + case 375: { /* '375' */ + return 428 } - case 376: - { /* '376' */ - return 429 + case 376: { /* '376' */ + return 429 } - case 377: - { /* '377' */ - return 430 + case 377: { /* '377' */ + return 430 } - case 378: - { /* '378' */ - return 431 + case 378: { /* '378' */ + return 431 } - case 379: - { /* '379' */ - return 432 + case 379: { /* '379' */ + return 432 } - case 38: - { /* '38' */ - return 66 + case 38: { /* '38' */ + return 66 } - case 380: - { /* '380' */ - return 433 + case 380: { /* '380' */ + return 433 } - case 381: - { /* '381' */ - return 434 + case 381: { /* '381' */ + return 434 } - case 382: - { /* '382' */ - return 435 + case 382: { /* '382' */ + return 435 } - case 383: - { /* '383' */ - return 436 + case 383: { /* '383' */ + return 436 } - case 384: - { /* '384' */ - return 437 + case 384: { /* '384' */ + return 437 } - case 385: - { /* '385' */ - return 438 + case 385: { /* '385' */ + return 438 } - case 386: - { /* '386' */ - return 439 + case 386: { /* '386' */ + return 439 } - case 387: - { /* '387' */ - return 440 + case 387: { /* '387' */ + return 440 } - case 388: - { /* '388' */ - return 441 + case 388: { /* '388' */ + return 441 } - case 389: - { /* '389' */ - return 442 + case 389: { /* '389' */ + return 442 } - case 39: - { /* '39' */ - return 67 + case 39: { /* '39' */ + return 67 } - case 390: - { /* '390' */ - return 443 + case 390: { /* '390' */ + return 443 } - case 391: - { /* '391' */ - return 444 + case 391: { /* '391' */ + return 444 } - case 392: - { /* '392' */ - return 445 + case 392: { /* '392' */ + return 445 } - case 393: - { /* '393' */ - return 446 + case 393: { /* '393' */ + return 446 } - case 394: - { /* '394' */ - return 447 + case 394: { /* '394' */ + return 447 } - case 395: - { /* '395' */ - return 448 + case 395: { /* '395' */ + return 448 } - case 396: - { /* '396' */ - return 449 + case 396: { /* '396' */ + return 449 } - case 397: - { /* '397' */ - return 451 + case 397: { /* '397' */ + return 451 } - case 398: - { /* '398' */ - return 452 + case 398: { /* '398' */ + return 452 } - case 399: - { /* '399' */ - return 453 + case 399: { /* '399' */ + return 453 } - case 4: - { /* '4' */ - return 5 + case 4: { /* '4' */ + return 5 } - case 40: - { /* '40' */ - return 69 + case 40: { /* '40' */ + return 69 } - case 400: - { /* '400' */ - return 454 + case 400: { /* '400' */ + return 454 } - case 401: - { /* '401' */ - return 455 + case 401: { /* '401' */ + return 455 } - case 402: - { /* '402' */ - return 456 + case 402: { /* '402' */ + return 456 } - case 403: - { /* '403' */ - return 457 + case 403: { /* '403' */ + return 457 } - case 404: - { /* '404' */ - return 458 + case 404: { /* '404' */ + return 458 } - case 405: - { /* '405' */ - return 459 + case 405: { /* '405' */ + return 459 } - case 406: - { /* '406' */ - return 460 + case 406: { /* '406' */ + return 460 } - case 407: - { /* '407' */ - return 461 + case 407: { /* '407' */ + return 461 } - case 408: - { /* '408' */ - return 462 + case 408: { /* '408' */ + return 462 } - case 409: - { /* '409' */ - return 463 + case 409: { /* '409' */ + return 463 } - case 41: - { /* '41' */ - return 71 + case 41: { /* '41' */ + return 71 } - case 410: - { /* '410' */ - return 464 + case 410: { /* '410' */ + return 464 } - case 411: - { /* '411' */ - return 465 + case 411: { /* '411' */ + return 465 } - case 412: - { /* '412' */ - return 466 + case 412: { /* '412' */ + return 466 } - case 413: - { /* '413' */ - return 467 + case 413: { /* '413' */ + return 467 } - case 414: - { /* '414' */ - return 468 + case 414: { /* '414' */ + return 468 } - case 415: - { /* '415' */ - return 469 + case 415: { /* '415' */ + return 469 } - case 416: - { /* '416' */ - return 470 + case 416: { /* '416' */ + return 470 } - case 417: - { /* '417' */ - return 471 + case 417: { /* '417' */ + return 471 } - case 418: - { /* '418' */ - return 472 + case 418: { /* '418' */ + return 472 } - case 419: - { /* '419' */ - return 473 + case 419: { /* '419' */ + return 473 } - case 42: - { /* '42' */ - return 72 + case 42: { /* '42' */ + return 72 } - case 420: - { /* '420' */ - return 474 + case 420: { /* '420' */ + return 474 } - case 421: - { /* '421' */ - return 475 + case 421: { /* '421' */ + return 475 } - case 422: - { /* '422' */ - return 476 + case 422: { /* '422' */ + return 476 } - case 423: - { /* '423' */ - return 477 + case 423: { /* '423' */ + return 477 } - case 424: - { /* '424' */ - return 478 + case 424: { /* '424' */ + return 478 } - case 425: - { /* '425' */ - return 479 + case 425: { /* '425' */ + return 479 } - case 426: - { /* '426' */ - return 480 + case 426: { /* '426' */ + return 480 } - case 427: - { /* '427' */ - return 481 + case 427: { /* '427' */ + return 481 } - case 428: - { /* '428' */ - return 482 + case 428: { /* '428' */ + return 482 } - case 429: - { /* '429' */ - return 483 + case 429: { /* '429' */ + return 483 } - case 43: - { /* '43' */ - return 73 + case 43: { /* '43' */ + return 73 } - case 430: - { /* '430' */ - return 484 + case 430: { /* '430' */ + return 484 } - case 431: - { /* '431' */ - return 485 + case 431: { /* '431' */ + return 485 } - case 432: - { /* '432' */ - return 486 + case 432: { /* '432' */ + return 486 } - case 433: - { /* '433' */ - return 487 + case 433: { /* '433' */ + return 487 } - case 434: - { /* '434' */ - return 488 + case 434: { /* '434' */ + return 488 } - case 435: - { /* '435' */ - return 489 + case 435: { /* '435' */ + return 489 } - case 436: - { /* '436' */ - return 490 + case 436: { /* '436' */ + return 490 } - case 437: - { /* '437' */ - return 491 + case 437: { /* '437' */ + return 491 } - case 438: - { /* '438' */ - return 492 + case 438: { /* '438' */ + return 492 } - case 439: - { /* '439' */ - return 493 + case 439: { /* '439' */ + return 493 } - case 44: - { /* '44' */ - return 75 + case 44: { /* '44' */ + return 75 } - case 440: - { /* '440' */ - return 495 + case 440: { /* '440' */ + return 495 } - case 441: - { /* '441' */ - return 496 + case 441: { /* '441' */ + return 496 } - case 442: - { /* '442' */ - return 497 + case 442: { /* '442' */ + return 497 } - case 443: - { /* '443' */ - return 498 + case 443: { /* '443' */ + return 498 } - case 444: - { /* '444' */ - return 499 + case 444: { /* '444' */ + return 499 } - case 445: - { /* '445' */ - return 500 + case 445: { /* '445' */ + return 500 } - case 446: - { /* '446' */ - return 501 + case 446: { /* '446' */ + return 501 } - case 447: - { /* '447' */ - return 502 + case 447: { /* '447' */ + return 502 } - case 448: - { /* '448' */ - return 503 + case 448: { /* '448' */ + return 503 } - case 449: - { /* '449' */ - return 504 + case 449: { /* '449' */ + return 504 } - case 45: - { /* '45' */ - return 76 + case 45: { /* '45' */ + return 76 } - case 450: - { /* '450' */ - return 505 + case 450: { /* '450' */ + return 505 } - case 451: - { /* '451' */ - return 506 + case 451: { /* '451' */ + return 506 } - case 452: - { /* '452' */ - return 507 + case 452: { /* '452' */ + return 507 } - case 453: - { /* '453' */ - return 508 + case 453: { /* '453' */ + return 508 } - case 454: - { /* '454' */ - return 509 + case 454: { /* '454' */ + return 509 } - case 455: - { /* '455' */ - return 512 + case 455: { /* '455' */ + return 512 } - case 456: - { /* '456' */ - return 513 + case 456: { /* '456' */ + return 513 } - case 457: - { /* '457' */ - return 514 + case 457: { /* '457' */ + return 514 } - case 458: - { /* '458' */ - return 515 + case 458: { /* '458' */ + return 515 } - case 459: - { /* '459' */ - return 516 + case 459: { /* '459' */ + return 516 } - case 46: - { /* '46' */ - return 78 + case 46: { /* '46' */ + return 78 } - case 460: - { /* '460' */ - return 517 + case 460: { /* '460' */ + return 517 } - case 461: - { /* '461' */ - return 518 + case 461: { /* '461' */ + return 518 } - case 462: - { /* '462' */ - return 519 + case 462: { /* '462' */ + return 519 } - case 463: - { /* '463' */ - return 520 + case 463: { /* '463' */ + return 520 } - case 464: - { /* '464' */ - return 521 + case 464: { /* '464' */ + return 521 } - case 465: - { /* '465' */ - return 522 + case 465: { /* '465' */ + return 522 } - case 466: - { /* '466' */ - return 523 + case 466: { /* '466' */ + return 523 } - case 467: - { /* '467' */ - return 524 + case 467: { /* '467' */ + return 524 } - case 468: - { /* '468' */ - return 525 + case 468: { /* '468' */ + return 525 } - case 469: - { /* '469' */ - return 526 + case 469: { /* '469' */ + return 526 } - case 47: - { /* '47' */ - return 80 + case 47: { /* '47' */ + return 80 } - case 470: - { /* '470' */ - return 527 + case 470: { /* '470' */ + return 527 } - case 471: - { /* '471' */ - return 528 + case 471: { /* '471' */ + return 528 } - case 472: - { /* '472' */ - return 529 + case 472: { /* '472' */ + return 529 } - case 473: - { /* '473' */ - return 530 + case 473: { /* '473' */ + return 530 } - case 474: - { /* '474' */ - return 531 + case 474: { /* '474' */ + return 531 } - case 475: - { /* '475' */ - return 532 + case 475: { /* '475' */ + return 532 } - case 476: - { /* '476' */ - return 533 + case 476: { /* '476' */ + return 533 } - case 477: - { /* '477' */ - return 534 + case 477: { /* '477' */ + return 534 } - case 478: - { /* '478' */ - return 535 + case 478: { /* '478' */ + return 535 } - case 479: - { /* '479' */ - return 536 + case 479: { /* '479' */ + return 536 } - case 48: - { /* '48' */ - return 81 + case 48: { /* '48' */ + return 81 } - case 480: - { /* '480' */ - return 537 + case 480: { /* '480' */ + return 537 } - case 481: - { /* '481' */ - return 538 + case 481: { /* '481' */ + return 538 } - case 482: - { /* '482' */ - return 539 + case 482: { /* '482' */ + return 539 } - case 483: - { /* '483' */ - return 540 + case 483: { /* '483' */ + return 540 } - case 484: - { /* '484' */ - return 541 + case 484: { /* '484' */ + return 541 } - case 485: - { /* '485' */ - return 542 + case 485: { /* '485' */ + return 542 } - case 486: - { /* '486' */ - return 543 + case 486: { /* '486' */ + return 543 } - case 487: - { /* '487' */ - return 544 + case 487: { /* '487' */ + return 544 } - case 488: - { /* '488' */ - return 545 + case 488: { /* '488' */ + return 545 } - case 489: - { /* '489' */ - return 546 + case 489: { /* '489' */ + return 546 } - case 49: - { /* '49' */ - return 82 + case 49: { /* '49' */ + return 82 } - case 490: - { /* '490' */ - return 547 + case 490: { /* '490' */ + return 547 } - case 491: - { /* '491' */ - return 548 + case 491: { /* '491' */ + return 548 } - case 492: - { /* '492' */ - return 549 + case 492: { /* '492' */ + return 549 } - case 493: - { /* '493' */ - return 550 + case 493: { /* '493' */ + return 550 } - case 494: - { /* '494' */ - return 551 + case 494: { /* '494' */ + return 551 } - case 495: - { /* '495' */ - return 552 + case 495: { /* '495' */ + return 552 } - case 496: - { /* '496' */ - return 553 + case 496: { /* '496' */ + return 553 } - case 497: - { /* '497' */ - return 554 + case 497: { /* '497' */ + return 554 } - case 498: - { /* '498' */ - return 555 + case 498: { /* '498' */ + return 555 } - case 499: - { /* '499' */ - return 556 + case 499: { /* '499' */ + return 556 } - case 5: - { /* '5' */ - return 6 + case 5: { /* '5' */ + return 6 } - case 50: - { /* '50' */ - return 83 + case 50: { /* '50' */ + return 83 } - case 500: - { /* '500' */ - return 557 + case 500: { /* '500' */ + return 557 } - case 501: - { /* '501' */ - return 558 + case 501: { /* '501' */ + return 558 } - case 502: - { /* '502' */ - return 559 + case 502: { /* '502' */ + return 559 } - case 503: - { /* '503' */ - return 560 + case 503: { /* '503' */ + return 560 } - case 504: - { /* '504' */ - return 561 + case 504: { /* '504' */ + return 561 } - case 505: - { /* '505' */ - return 562 + case 505: { /* '505' */ + return 562 } - case 506: - { /* '506' */ - return 563 + case 506: { /* '506' */ + return 563 } - case 507: - { /* '507' */ - return 564 + case 507: { /* '507' */ + return 564 } - case 508: - { /* '508' */ - return 565 + case 508: { /* '508' */ + return 565 } - case 509: - { /* '509' */ - return 566 + case 509: { /* '509' */ + return 566 } - case 51: - { /* '51' */ - return 85 + case 51: { /* '51' */ + return 85 } - case 510: - { /* '510' */ - return 567 + case 510: { /* '510' */ + return 567 } - case 511: - { /* '511' */ - return 568 + case 511: { /* '511' */ + return 568 } - case 512: - { /* '512' */ - return 569 + case 512: { /* '512' */ + return 569 } - case 513: - { /* '513' */ - return 570 + case 513: { /* '513' */ + return 570 } - case 514: - { /* '514' */ - return 571 + case 514: { /* '514' */ + return 571 } - case 515: - { /* '515' */ - return 572 + case 515: { /* '515' */ + return 572 } - case 516: - { /* '516' */ - return 573 + case 516: { /* '516' */ + return 573 } - case 517: - { /* '517' */ - return 574 + case 517: { /* '517' */ + return 574 } - case 518: - { /* '518' */ - return 575 + case 518: { /* '518' */ + return 575 } - case 519: - { /* '519' */ - return 576 + case 519: { /* '519' */ + return 576 } - case 52: - { /* '52' */ - return 89 + case 52: { /* '52' */ + return 89 } - case 520: - { /* '520' */ - return 577 + case 520: { /* '520' */ + return 577 } - case 521: - { /* '521' */ - return 578 + case 521: { /* '521' */ + return 578 } - case 522: - { /* '522' */ - return 579 + case 522: { /* '522' */ + return 579 } - case 523: - { /* '523' */ - return 580 + case 523: { /* '523' */ + return 580 } - case 524: - { /* '524' */ - return 581 + case 524: { /* '524' */ + return 581 } - case 525: - { /* '525' */ - return 582 + case 525: { /* '525' */ + return 582 } - case 526: - { /* '526' */ - return 583 + case 526: { /* '526' */ + return 583 } - case 527: - { /* '527' */ - return 584 + case 527: { /* '527' */ + return 584 } - case 528: - { /* '528' */ - return 585 + case 528: { /* '528' */ + return 585 } - case 529: - { /* '529' */ - return 586 + case 529: { /* '529' */ + return 586 } - case 53: - { /* '53' */ - return 90 + case 53: { /* '53' */ + return 90 } - case 530: - { /* '530' */ - return 587 + case 530: { /* '530' */ + return 587 } - case 531: - { /* '531' */ - return 588 + case 531: { /* '531' */ + return 588 } - case 532: - { /* '532' */ - return 589 + case 532: { /* '532' */ + return 589 } - case 533: - { /* '533' */ - return 590 + case 533: { /* '533' */ + return 590 } - case 534: - { /* '534' */ - return 591 + case 534: { /* '534' */ + return 591 } - case 535: - { /* '535' */ - return 592 + case 535: { /* '535' */ + return 592 } - case 536: - { /* '536' */ - return 593 + case 536: { /* '536' */ + return 593 } - case 537: - { /* '537' */ - return 594 + case 537: { /* '537' */ + return 594 } - case 538: - { /* '538' */ - return 595 + case 538: { /* '538' */ + return 595 } - case 539: - { /* '539' */ - return 596 + case 539: { /* '539' */ + return 596 } - case 54: - { /* '54' */ - return 92 + case 54: { /* '54' */ + return 92 } - case 540: - { /* '540' */ - return 597 + case 540: { /* '540' */ + return 597 } - case 541: - { /* '541' */ - return 598 + case 541: { /* '541' */ + return 598 } - case 542: - { /* '542' */ - return 599 + case 542: { /* '542' */ + return 599 } - case 543: - { /* '543' */ - return 600 + case 543: { /* '543' */ + return 600 } - case 544: - { /* '544' */ - return 601 + case 544: { /* '544' */ + return 601 } - case 545: - { /* '545' */ - return 602 + case 545: { /* '545' */ + return 602 } - case 546: - { /* '546' */ - return 603 + case 546: { /* '546' */ + return 603 } - case 547: - { /* '547' */ - return 604 + case 547: { /* '547' */ + return 604 } - case 548: - { /* '548' */ - return 605 + case 548: { /* '548' */ + return 605 } - case 549: - { /* '549' */ - return 606 + case 549: { /* '549' */ + return 606 } - case 55: - { /* '55' */ - return 93 + case 55: { /* '55' */ + return 93 } - case 550: - { /* '550' */ - return 607 + case 550: { /* '550' */ + return 607 } - case 551: - { /* '551' */ - return 608 + case 551: { /* '551' */ + return 608 } - case 552: - { /* '552' */ - return 609 + case 552: { /* '552' */ + return 609 } - case 553: - { /* '553' */ - return 610 + case 553: { /* '553' */ + return 610 } - case 554: - { /* '554' */ - return 611 + case 554: { /* '554' */ + return 611 } - case 555: - { /* '555' */ - return 612 + case 555: { /* '555' */ + return 612 } - case 556: - { /* '556' */ - return 613 + case 556: { /* '556' */ + return 613 } - case 557: - { /* '557' */ - return 614 + case 557: { /* '557' */ + return 614 } - case 558: - { /* '558' */ - return 615 + case 558: { /* '558' */ + return 615 } - case 559: - { /* '559' */ - return 616 + case 559: { /* '559' */ + return 616 } - case 56: - { /* '56' */ - return 94 + case 56: { /* '56' */ + return 94 } - case 560: - { /* '560' */ - return 617 + case 560: { /* '560' */ + return 617 } - case 561: - { /* '561' */ - return 618 + case 561: { /* '561' */ + return 618 } - case 562: - { /* '562' */ - return 619 + case 562: { /* '562' */ + return 619 } - case 563: - { /* '563' */ - return 620 + case 563: { /* '563' */ + return 620 } - case 564: - { /* '564' */ - return 621 + case 564: { /* '564' */ + return 621 } - case 565: - { /* '565' */ - return 622 + case 565: { /* '565' */ + return 622 } - case 566: - { /* '566' */ - return 623 + case 566: { /* '566' */ + return 623 } - case 567: - { /* '567' */ - return 624 + case 567: { /* '567' */ + return 624 } - case 568: - { /* '568' */ - return 625 + case 568: { /* '568' */ + return 625 } - case 569: - { /* '569' */ - return 627 + case 569: { /* '569' */ + return 627 } - case 57: - { /* '57' */ - return 95 + case 57: { /* '57' */ + return 95 } - case 570: - { /* '570' */ - return 628 + case 570: { /* '570' */ + return 628 } - case 571: - { /* '571' */ - return 629 + case 571: { /* '571' */ + return 629 } - case 572: - { /* '572' */ - return 630 + case 572: { /* '572' */ + return 630 } - case 573: - { /* '573' */ - return 631 + case 573: { /* '573' */ + return 631 } - case 574: - { /* '574' */ - return 632 + case 574: { /* '574' */ + return 632 } - case 575: - { /* '575' */ - return 633 + case 575: { /* '575' */ + return 633 } - case 576: - { /* '576' */ - return 634 + case 576: { /* '576' */ + return 634 } - case 577: - { /* '577' */ - return 635 + case 577: { /* '577' */ + return 635 } - case 578: - { /* '578' */ - return 636 + case 578: { /* '578' */ + return 636 } - case 579: - { /* '579' */ - return 637 + case 579: { /* '579' */ + return 637 } - case 58: - { /* '58' */ - return 97 + case 58: { /* '58' */ + return 97 } - case 580: - { /* '580' */ - return 638 + case 580: { /* '580' */ + return 638 } - case 581: - { /* '581' */ - return 639 + case 581: { /* '581' */ + return 639 } - case 582: - { /* '582' */ - return 640 + case 582: { /* '582' */ + return 640 } - case 583: - { /* '583' */ - return 641 + case 583: { /* '583' */ + return 641 } - case 584: - { /* '584' */ - return 642 + case 584: { /* '584' */ + return 642 } - case 585: - { /* '585' */ - return 643 + case 585: { /* '585' */ + return 643 } - case 586: - { /* '586' */ - return 644 + case 586: { /* '586' */ + return 644 } - case 587: - { /* '587' */ - return 645 + case 587: { /* '587' */ + return 645 } - case 588: - { /* '588' */ - return 646 + case 588: { /* '588' */ + return 646 } - case 589: - { /* '589' */ - return 647 + case 589: { /* '589' */ + return 647 } - case 59: - { /* '59' */ - return 98 + case 59: { /* '59' */ + return 98 } - case 590: - { /* '590' */ - return 648 + case 590: { /* '590' */ + return 648 } - case 591: - { /* '591' */ - return 649 + case 591: { /* '591' */ + return 649 } - case 592: - { /* '592' */ - return 650 + case 592: { /* '592' */ + return 650 } - case 593: - { /* '593' */ - return 651 + case 593: { /* '593' */ + return 651 } - case 594: - { /* '594' */ - return 652 + case 594: { /* '594' */ + return 652 } - case 595: - { /* '595' */ - return 653 + case 595: { /* '595' */ + return 653 } - case 596: - { /* '596' */ - return 654 + case 596: { /* '596' */ + return 654 } - case 597: - { /* '597' */ - return 656 + case 597: { /* '597' */ + return 656 } - case 598: - { /* '598' */ - return 657 + case 598: { /* '598' */ + return 657 } - case 599: - { /* '599' */ - return 658 + case 599: { /* '599' */ + return 658 } - case 6: - { /* '6' */ - return 7 + case 6: { /* '6' */ + return 7 } - case 60: - { /* '60' */ - return 99 + case 60: { /* '60' */ + return 99 } - case 600: - { /* '600' */ - return 659 + case 600: { /* '600' */ + return 659 } - case 601: - { /* '601' */ - return 660 + case 601: { /* '601' */ + return 660 } - case 602: - { /* '602' */ - return 661 + case 602: { /* '602' */ + return 661 } - case 603: - { /* '603' */ - return 662 + case 603: { /* '603' */ + return 662 } - case 604: - { /* '604' */ - return 663 + case 604: { /* '604' */ + return 663 } - case 605: - { /* '605' */ - return 664 + case 605: { /* '605' */ + return 664 } - case 606: - { /* '606' */ - return 665 + case 606: { /* '606' */ + return 665 } - case 607: - { /* '607' */ - return 666 + case 607: { /* '607' */ + return 666 } - case 608: - { /* '608' */ - return 667 + case 608: { /* '608' */ + return 667 } - case 609: - { /* '609' */ - return 668 + case 609: { /* '609' */ + return 668 } - case 61: - { /* '61' */ - return 100 + case 61: { /* '61' */ + return 100 } - case 610: - { /* '610' */ - return 669 + case 610: { /* '610' */ + return 669 } - case 611: - { /* '611' */ - return 670 + case 611: { /* '611' */ + return 670 } - case 612: - { /* '612' */ - return 671 + case 612: { /* '612' */ + return 671 } - case 613: - { /* '613' */ - return 672 + case 613: { /* '613' */ + return 672 } - case 614: - { /* '614' */ - return 43954 + case 614: { /* '614' */ + return 43954 } - case 615: - { /* '615' */ - return 43959 + case 615: { /* '615' */ + return 43959 } - case 62: - { /* '62' */ - return 101 + case 62: { /* '62' */ + return 101 } - case 63: - { /* '63' */ - return 102 + case 63: { /* '63' */ + return 102 } - case 64: - { /* '64' */ - return 104 + case 64: { /* '64' */ + return 104 } - case 65: - { /* '65' */ - return 105 + case 65: { /* '65' */ + return 105 } - case 66: - { /* '66' */ - return 106 + case 66: { /* '66' */ + return 106 } - case 67: - { /* '67' */ - return 107 + case 67: { /* '67' */ + return 107 } - case 68: - { /* '68' */ - return 108 + case 68: { /* '68' */ + return 108 } - case 69: - { /* '69' */ - return 109 + case 69: { /* '69' */ + return 109 } - case 7: - { /* '7' */ - return 8 + case 7: { /* '7' */ + return 8 } - case 70: - { /* '70' */ - return 110 + case 70: { /* '70' */ + return 110 } - case 71: - { /* '71' */ - return 111 + case 71: { /* '71' */ + return 111 } - case 72: - { /* '72' */ - return 112 + case 72: { /* '72' */ + return 112 } - case 73: - { /* '73' */ - return 113 + case 73: { /* '73' */ + return 113 } - case 74: - { /* '74' */ - return 114 + case 74: { /* '74' */ + return 114 } - case 75: - { /* '75' */ - return 115 + case 75: { /* '75' */ + return 115 } - case 76: - { /* '76' */ - return 116 + case 76: { /* '76' */ + return 116 } - case 77: - { /* '77' */ - return 117 + case 77: { /* '77' */ + return 117 } - case 78: - { /* '78' */ - return 118 + case 78: { /* '78' */ + return 118 } - case 79: - { /* '79' */ - return 119 + case 79: { /* '79' */ + return 119 } - case 8: - { /* '8' */ - return 9 + case 8: { /* '8' */ + return 9 } - case 80: - { /* '80' */ - return 120 + case 80: { /* '80' */ + return 120 } - case 81: - { /* '81' */ - return 121 + case 81: { /* '81' */ + return 121 } - case 82: - { /* '82' */ - return 122 + case 82: { /* '82' */ + return 122 } - case 83: - { /* '83' */ - return 123 + case 83: { /* '83' */ + return 123 } - case 84: - { /* '84' */ - return 124 + case 84: { /* '84' */ + return 124 } - case 85: - { /* '85' */ - return 125 + case 85: { /* '85' */ + return 125 } - case 86: - { /* '86' */ - return 126 + case 86: { /* '86' */ + return 126 } - case 87: - { /* '87' */ - return 127 + case 87: { /* '87' */ + return 127 } - case 88: - { /* '88' */ - return 128 + case 88: { /* '88' */ + return 128 } - case 89: - { /* '89' */ - return 129 + case 89: { /* '89' */ + return 129 } - case 9: - { /* '9' */ - return 10 + case 9: { /* '9' */ + return 10 } - case 90: - { /* '90' */ - return 130 + case 90: { /* '90' */ + return 130 } - case 91: - { /* '91' */ - return 131 + case 91: { /* '91' */ + return 131 } - case 92: - { /* '92' */ - return 132 + case 92: { /* '92' */ + return 132 } - case 93: - { /* '93' */ - return 133 + case 93: { /* '93' */ + return 133 } - case 94: - { /* '94' */ - return 134 + case 94: { /* '94' */ + return 134 } - case 95: - { /* '95' */ - return 135 + case 95: { /* '95' */ + return 135 } - case 96: - { /* '96' */ - return 136 + case 96: { /* '96' */ + return 136 } - case 97: - { /* '97' */ - return 137 + case 97: { /* '97' */ + return 137 } - case 98: - { /* '98' */ - return 138 + case 98: { /* '98' */ + return 138 } - case 99: - { /* '99' */ - return 139 + case 99: { /* '99' */ + return 139 } - default: - { + default: { return 0 } } @@ -3762,3720 +3146,3103 @@ func KnxManufacturerFirstEnumForFieldNumber(value uint16) (KnxManufacturer, erro } func (e KnxManufacturer) Name() string { - switch e { - case 0: - { /* '0' */ - return "Unknown Manufacturer" - } - case 1: - { /* '1' */ - return "Siemens" - } - case 10: - { /* '10' */ - return "LEGRAND Appareillage électrique" - } - case 100: - { /* '100' */ - return "Pulse Technologies" - } - case 101: - { /* '101' */ - return "Crestron" - } - case 102: - { /* '102' */ - return "STEINEL professional" - } - case 103: - { /* '103' */ - return "BILTON LED Lighting" - } - case 104: - { /* '104' */ - return "denro AG" - } - case 105: - { /* '105' */ - return "GePro" - } - case 106: - { /* '106' */ - return "preussen automation" - } - case 107: - { /* '107' */ - return "Zoppas Industries" - } - case 108: - { /* '108' */ - return "MACTECH" - } - case 109: - { /* '109' */ - return "TECHNO-TREND" - } - case 11: - { /* '11' */ - return "Merten" - } - case 110: - { /* '110' */ - return "FS Cables" - } - case 111: - { /* '111' */ - return "Delta Dore" - } - case 112: - { /* '112' */ - return "Eissound" - } - case 113: - { /* '113' */ - return "Cisco" - } - case 114: - { /* '114' */ - return "Dinuy" - } - case 115: - { /* '115' */ - return "iKNiX" - } - case 116: - { /* '116' */ - return "Rademacher Geräte-Elektronik GmbH" - } - case 117: - { /* '117' */ - return "EGi Electroacustica General Iberica" - } - case 118: - { /* '118' */ - return "Bes – Ingenium" - } - case 119: - { /* '119' */ - return "ElabNET" - } - case 12: - { /* '12' */ - return "ABB SpA-SACE Division" - } - case 120: - { /* '120' */ - return "Blumotix" - } - case 121: - { /* '121' */ - return "Hunter Douglas" - } - case 122: - { /* '122' */ - return "APRICUM" - } - case 123: - { /* '123' */ - return "TIANSU Automation" - } - case 124: - { /* '124' */ - return "Bubendorff" - } - case 125: - { /* '125' */ - return "MBS GmbH" - } - case 126: - { /* '126' */ - return "Enertex Bayern GmbH" - } - case 127: - { /* '127' */ - return "BMS" - } - case 128: - { /* '128' */ - return "Sinapsi" - } - case 129: - { /* '129' */ - return "Embedded Systems SIA" - } - case 13: - { /* '13' */ - return "Siedle & Söhne" - } - case 130: - { /* '130' */ - return "KNX1" - } - case 131: - { /* '131' */ - return "Tokka" - } - case 132: - { /* '132' */ - return "NanoSense" - } - case 133: - { /* '133' */ - return "PEAR Automation GmbH" - } - case 134: - { /* '134' */ - return "DGA" - } - case 135: - { /* '135' */ - return "Lutron" - } - case 136: - { /* '136' */ - return "AIRZONE – ALTRA" - } - case 137: - { /* '137' */ - return "Lithoss Design Switches" - } - case 138: - { /* '138' */ - return "3ATEL" - } - case 139: - { /* '139' */ - return "Philips Controls" - } - case 14: - { /* '14' */ - return "Eberle" - } - case 140: - { /* '140' */ - return "VELUX A/S" - } - case 141: - { /* '141' */ - return "LOYTEC" - } - case 142: - { /* '142' */ - return "Ekinex S.p.A." - } - case 143: - { /* '143' */ - return "SIRLAN Technologies" - } - case 144: - { /* '144' */ - return "ProKNX SAS" - } - case 145: - { /* '145' */ - return "IT GmbH" - } - case 146: - { /* '146' */ - return "RENSON" - } - case 147: - { /* '147' */ - return "HEP Group" - } - case 148: - { /* '148' */ - return "Balmart" - } - case 149: - { /* '149' */ - return "GFS GmbH" - } - case 15: - { /* '15' */ - return "GEWISS" - } - case 150: - { /* '150' */ - return "Schenker Storen AG" - } - case 151: - { /* '151' */ - return "Algodue Elettronica S.r.L." - } - case 152: - { /* '152' */ - return "ABB France" - } - case 153: - { /* '153' */ - return "maintronic" - } - case 154: - { /* '154' */ - return "Vantage" - } - case 155: - { /* '155' */ - return "Foresis" - } - case 156: - { /* '156' */ - return "Research & Production Association SEM" - } - case 157: - { /* '157' */ - return "Weinzierl Engineering GmbH" - } - case 158: - { /* '158' */ - return "Möhlenhoff Wärmetechnik GmbH" - } - case 159: - { /* '159' */ - return "PKC-GROUP Oyj" - } - case 16: - { /* '16' */ - return "Albert Ackermann" - } - case 160: - { /* '160' */ - return "B.E.G." - } - case 161: - { /* '161' */ - return "Elsner Elektronik GmbH" - } - case 162: - { /* '162' */ - return "Siemens Building Technologies (HK/China) Ltd." - } - case 163: - { /* '163' */ - return "Eutrac" - } - case 164: - { /* '164' */ - return "Gustav Hensel GmbH & Co. KG" - } - case 165: - { /* '165' */ - return "GARO AB" - } - case 166: - { /* '166' */ - return "Waldmann Lichttechnik" - } - case 167: - { /* '167' */ - return "SCHÜCO" - } - case 168: - { /* '168' */ - return "EMU" - } - case 169: - { /* '169' */ - return "JNet Systems AG" - } - case 17: - { /* '17' */ - return "Schupa GmbH" - } - case 170: - { /* '170' */ - return "Total Solution GmbH" - } - case 171: - { /* '171' */ - return "O.Y.L. Electronics" - } - case 172: - { /* '172' */ - return "Galax System" - } - case 173: - { /* '173' */ - return "Disch" - } - case 174: - { /* '174' */ - return "Aucoteam" - } - case 175: - { /* '175' */ - return "Luxmate Controls" - } - case 176: - { /* '176' */ - return "Danfoss" - } - case 177: - { /* '177' */ - return "AST GmbH" - } - case 178: - { /* '178' */ - return "WILA Leuchten" - } - case 179: - { /* '179' */ - return "b+b Automations- und Steuerungstechnik" - } - case 18: - { /* '18' */ - return "ABB SCHWEIZ" - } - case 180: - { /* '180' */ - return "Lingg & Janke" - } - case 181: - { /* '181' */ - return "Sauter" - } - case 182: - { /* '182' */ - return "SIMU" - } - case 183: - { /* '183' */ - return "Theben HTS AG" - } - case 184: - { /* '184' */ - return "Amann GmbH" - } - case 185: - { /* '185' */ - return "BERG Energiekontrollsysteme GmbH" - } - case 186: - { /* '186' */ - return "Hüppe Form Sonnenschutzsysteme GmbH" - } - case 187: - { /* '187' */ - return "Oventrop KG" - } - case 188: - { /* '188' */ - return "Griesser AG" - } - case 189: - { /* '189' */ - return "IPAS GmbH" - } - case 19: - { /* '19' */ - return "Feller" - } - case 190: - { /* '190' */ - return "elero GmbH" - } - case 191: - { /* '191' */ - return "Ardan Production and Industrial Controls Ltd." - } - case 192: - { /* '192' */ - return "Metec Meßtechnik GmbH" - } - case 193: - { /* '193' */ - return "ELKA-Elektronik GmbH" - } - case 194: - { /* '194' */ - return "ELEKTROANLAGEN D. NAGEL" - } - case 195: - { /* '195' */ - return "Tridonic Bauelemente GmbH" - } - case 196: - { /* '196' */ - return "Stengler Gesellschaft" - } - case 197: - { /* '197' */ - return "Schneider Electric (MG)" - } - case 198: - { /* '198' */ - return "KNX Association" - } - case 199: - { /* '199' */ - return "VIVO" - } - case 2: - { /* '2' */ - return "ABB" - } - case 20: - { /* '20' */ - return "Glamox AS" - } - case 200: - { /* '200' */ - return "Hugo Müller GmbH & Co KG" - } - case 201: - { /* '201' */ - return "Siemens HVAC" - } - case 202: - { /* '202' */ - return "APT" - } - case 203: - { /* '203' */ - return "HighDom" - } - case 204: - { /* '204' */ - return "Top Services" - } - case 205: - { /* '205' */ - return "ambiHome" - } - case 206: - { /* '206' */ - return "DATEC electronic AG" - } - case 207: - { /* '207' */ - return "ABUS Security-Center" - } - case 208: - { /* '208' */ - return "Lite-Puter" - } - case 209: - { /* '209' */ - return "Tantron Electronic" - } - case 21: - { /* '21' */ - return "DEHN & SÖHNE" + switch e { + case 0: { /* '0' */ + return "Unknown Manufacturer" } - case 210: - { /* '210' */ - return "Interra" + case 1: { /* '1' */ + return "Siemens" } - case 211: - { /* '211' */ - return "DKX Tech" + case 10: { /* '10' */ + return "LEGRAND Appareillage électrique" } - case 212: - { /* '212' */ - return "Viatron" + case 100: { /* '100' */ + return "Pulse Technologies" } - case 213: - { /* '213' */ - return "Nautibus" + case 101: { /* '101' */ + return "Crestron" } - case 214: - { /* '214' */ - return "ON Semiconductor" + case 102: { /* '102' */ + return "STEINEL professional" } - case 215: - { /* '215' */ - return "Longchuang" + case 103: { /* '103' */ + return "BILTON LED Lighting" } - case 216: - { /* '216' */ - return "Air-On AG" + case 104: { /* '104' */ + return "denro AG" } - case 217: - { /* '217' */ - return "ib-company GmbH" + case 105: { /* '105' */ + return "GePro" } - case 218: - { /* '218' */ - return "Sation Factory" + case 106: { /* '106' */ + return "preussen automation" } - case 219: - { /* '219' */ - return "Agentilo GmbH" + case 107: { /* '107' */ + return "Zoppas Industries" } - case 22: - { /* '22' */ - return "CRABTREE" + case 108: { /* '108' */ + return "MACTECH" } - case 220: - { /* '220' */ - return "Makel Elektrik" + case 109: { /* '109' */ + return "TECHNO-TREND" } - case 221: - { /* '221' */ - return "Helios Ventilatoren" + case 11: { /* '11' */ + return "Merten" } - case 222: - { /* '222' */ - return "Otto Solutions Pte Ltd" + case 110: { /* '110' */ + return "FS Cables" } - case 223: - { /* '223' */ - return "Airmaster" + case 111: { /* '111' */ + return "Delta Dore" } - case 224: - { /* '224' */ - return "Vallox GmbH" + case 112: { /* '112' */ + return "Eissound" } - case 225: - { /* '225' */ - return "Dalitek" + case 113: { /* '113' */ + return "Cisco" } - case 226: - { /* '226' */ - return "ASIN" + case 114: { /* '114' */ + return "Dinuy" } - case 227: - { /* '227' */ - return "Bridges Intelligence Technology Inc." + case 115: { /* '115' */ + return "iKNiX" } - case 228: - { /* '228' */ - return "ARBONIA" + case 116: { /* '116' */ + return "Rademacher Geräte-Elektronik GmbH" } - case 229: - { /* '229' */ - return "KERMI" + case 117: { /* '117' */ + return "EGi Electroacustica General Iberica" } - case 23: - { /* '23' */ - return "eVoKNX" + case 118: { /* '118' */ + return "Bes – Ingenium" } - case 230: - { /* '230' */ - return "PROLUX" + case 119: { /* '119' */ + return "ElabNET" } - case 231: - { /* '231' */ - return "ClicHome" + case 12: { /* '12' */ + return "ABB SpA-SACE Division" } - case 232: - { /* '232' */ - return "COMMAX" + case 120: { /* '120' */ + return "Blumotix" } - case 233: - { /* '233' */ - return "EAE" + case 121: { /* '121' */ + return "Hunter Douglas" } - case 234: - { /* '234' */ - return "Tense" + case 122: { /* '122' */ + return "APRICUM" } - case 235: - { /* '235' */ - return "Seyoung Electronics" + case 123: { /* '123' */ + return "TIANSU Automation" } - case 236: - { /* '236' */ - return "Lifedomus" + case 124: { /* '124' */ + return "Bubendorff" } - case 237: - { /* '237' */ - return "EUROtronic Technology GmbH" + case 125: { /* '125' */ + return "MBS GmbH" } - case 238: - { /* '238' */ - return "tci" + case 126: { /* '126' */ + return "Enertex Bayern GmbH" } - case 239: - { /* '239' */ - return "Rishun Electronic" + case 127: { /* '127' */ + return "BMS" } - case 24: - { /* '24' */ - return "Paul Hochköpper" + case 128: { /* '128' */ + return "Sinapsi" } - case 240: - { /* '240' */ - return "Zipato" + case 129: { /* '129' */ + return "Embedded Systems SIA" } - case 241: - { /* '241' */ - return "cm-security GmbH & Co KG" + case 13: { /* '13' */ + return "Siedle & Söhne" } - case 242: - { /* '242' */ - return "Qing Cables" + case 130: { /* '130' */ + return "KNX1" } - case 243: - { /* '243' */ - return "LABIO" + case 131: { /* '131' */ + return "Tokka" } - case 244: - { /* '244' */ - return "Coster Tecnologie Elettroniche S.p.A." + case 132: { /* '132' */ + return "NanoSense" } - case 245: - { /* '245' */ - return "E.G.E" + case 133: { /* '133' */ + return "PEAR Automation GmbH" } - case 246: - { /* '246' */ - return "NETxAutomation" + case 134: { /* '134' */ + return "DGA" } - case 247: - { /* '247' */ - return "tecalor" + case 135: { /* '135' */ + return "Lutron" } - case 248: - { /* '248' */ - return "Urmet Electronics (Huizhou) Ltd." + case 136: { /* '136' */ + return "AIRZONE – ALTRA" } - case 249: - { /* '249' */ - return "Peiying Building Control" + case 137: { /* '137' */ + return "Lithoss Design Switches" } - case 25: - { /* '25' */ - return "Altenburger Electronic" + case 138: { /* '138' */ + return "3ATEL" } - case 250: - { /* '250' */ - return "BPT S.p.A. a Socio Unico" + case 139: { /* '139' */ + return "Philips Controls" } - case 251: - { /* '251' */ - return "Kanontec - KanonBUS" + case 14: { /* '14' */ + return "Eberle" } - case 252: - { /* '252' */ - return "ISER Tech" + case 140: { /* '140' */ + return "VELUX A/S" } - case 253: - { /* '253' */ - return "Fineline" + case 141: { /* '141' */ + return "LOYTEC" } - case 254: - { /* '254' */ - return "CP Electronics Ltd" + case 142: { /* '142' */ + return "Ekinex S.p.A." } - case 255: - { /* '255' */ - return "Niko-Servodan A/S" + case 143: { /* '143' */ + return "SIRLAN Technologies" } - case 256: - { /* '256' */ - return "Simon" + case 144: { /* '144' */ + return "ProKNX SAS" } - case 257: - { /* '257' */ - return "GM modular pvt. Ltd." + case 145: { /* '145' */ + return "IT GmbH" } - case 258: - { /* '258' */ - return "FU CHENG Intelligence" + case 146: { /* '146' */ + return "RENSON" } - case 259: - { /* '259' */ - return "NexKon" + case 147: { /* '147' */ + return "HEP Group" } - case 26: - { /* '26' */ - return "Grässlin" + case 148: { /* '148' */ + return "Balmart" } - case 260: - { /* '260' */ - return "FEEL s.r.l" + case 149: { /* '149' */ + return "GFS GmbH" } - case 261: - { /* '261' */ - return "Not Assigned" + case 15: { /* '15' */ + return "GEWISS" } - case 262: - { /* '262' */ - return "Shenzhen Fanhai Sanjiang Electronics Co., Ltd." + case 150: { /* '150' */ + return "Schenker Storen AG" } - case 263: - { /* '263' */ - return "Jiuzhou Greeble" + case 151: { /* '151' */ + return "Algodue Elettronica S.r.L." } - case 264: - { /* '264' */ - return "Aumüller Aumatic GmbH" + case 152: { /* '152' */ + return "ABB France" } - case 265: - { /* '265' */ - return "Etman Electric" + case 153: { /* '153' */ + return "maintronic" } - case 266: - { /* '266' */ - return "Black Nova" + case 154: { /* '154' */ + return "Vantage" } - case 267: - { /* '267' */ - return "ZidaTech AG" + case 155: { /* '155' */ + return "Foresis" } - case 268: - { /* '268' */ - return "IDGS bvba" + case 156: { /* '156' */ + return "Research & Production Association SEM" } - case 269: - { /* '269' */ - return "dakanimo" + case 157: { /* '157' */ + return "Weinzierl Engineering GmbH" } - case 27: - { /* '27' */ - return "Simon" + case 158: { /* '158' */ + return "Möhlenhoff Wärmetechnik GmbH" } - case 270: - { /* '270' */ - return "Trebor Automation AB" + case 159: { /* '159' */ + return "PKC-GROUP Oyj" } - case 271: - { /* '271' */ - return "Satel sp. z o.o." + case 16: { /* '16' */ + return "Albert Ackermann" } - case 272: - { /* '272' */ - return "Russound, Inc." + case 160: { /* '160' */ + return "B.E.G." } - case 273: - { /* '273' */ - return "Midea Heating & Ventilating Equipment CO LTD" + case 161: { /* '161' */ + return "Elsner Elektronik GmbH" } - case 274: - { /* '274' */ - return "Consorzio Terranuova" + case 162: { /* '162' */ + return "Siemens Building Technologies (HK/China) Ltd." } - case 275: - { /* '275' */ - return "Wolf Heiztechnik GmbH" + case 163: { /* '163' */ + return "Eutrac" } - case 276: - { /* '276' */ - return "SONTEC" + case 164: { /* '164' */ + return "Gustav Hensel GmbH & Co. KG" } - case 277: - { /* '277' */ - return "Belcom Cables Ltd." + case 165: { /* '165' */ + return "GARO AB" } - case 278: - { /* '278' */ - return "Guangzhou SeaWin Electrical Technologies Co., Ltd." + case 166: { /* '166' */ + return "Waldmann Lichttechnik" } - case 279: - { /* '279' */ - return "Acrel" + case 167: { /* '167' */ + return "SCHÜCO" } - case 28: - { /* '28' */ - return "VIMAR" + case 168: { /* '168' */ + return "EMU" } - case 280: - { /* '280' */ - return "KWC Aquarotter GmbH" + case 169: { /* '169' */ + return "JNet Systems AG" } - case 281: - { /* '281' */ - return "Orion Systems" + case 17: { /* '17' */ + return "Schupa GmbH" } - case 282: - { /* '282' */ - return "Schrack Technik GmbH" + case 170: { /* '170' */ + return "Total Solution GmbH" } - case 283: - { /* '283' */ - return "INSPRID" + case 171: { /* '171' */ + return "O.Y.L. Electronics" } - case 284: - { /* '284' */ - return "Sunricher" + case 172: { /* '172' */ + return "Galax System" } - case 285: - { /* '285' */ - return "Menred automation system(shanghai) Co.,Ltd." + case 173: { /* '173' */ + return "Disch" } - case 286: - { /* '286' */ - return "Aurex" + case 174: { /* '174' */ + return "Aucoteam" } - case 287: - { /* '287' */ - return "Josef Barthelme GmbH & Co. KG" + case 175: { /* '175' */ + return "Luxmate Controls" } - case 288: - { /* '288' */ - return "Architecture Numerique" + case 176: { /* '176' */ + return "Danfoss" } - case 289: - { /* '289' */ - return "UP GROUP" + case 177: { /* '177' */ + return "AST GmbH" } - case 29: - { /* '29' */ - return "Moeller Gebäudeautomation KG" + case 178: { /* '178' */ + return "WILA Leuchten" } - case 290: - { /* '290' */ - return "Teknos-Avinno" + case 179: { /* '179' */ + return "b+b Automations- und Steuerungstechnik" } - case 291: - { /* '291' */ - return "Ningbo Dooya Mechanic & Electronic Technology" + case 18: { /* '18' */ + return "ABB SCHWEIZ" } - case 292: - { /* '292' */ - return "Thermokon Sensortechnik GmbH" + case 180: { /* '180' */ + return "Lingg & Janke" } - case 293: - { /* '293' */ - return "BELIMO Automation AG" + case 181: { /* '181' */ + return "Sauter" } - case 294: - { /* '294' */ - return "Zehnder Group International AG" + case 182: { /* '182' */ + return "SIMU" } - case 295: - { /* '295' */ - return "sks Kinkel Elektronik" + case 183: { /* '183' */ + return "Theben HTS AG" } - case 296: - { /* '296' */ - return "ECE Wurmitzer GmbH" + case 184: { /* '184' */ + return "Amann GmbH" } - case 297: - { /* '297' */ - return "LARS" + case 185: { /* '185' */ + return "BERG Energiekontrollsysteme GmbH" } - case 298: - { /* '298' */ - return "URC" + case 186: { /* '186' */ + return "Hüppe Form Sonnenschutzsysteme GmbH" } - case 299: - { /* '299' */ - return "LightControl" + case 187: { /* '187' */ + return "Oventrop KG" } - case 3: - { /* '3' */ - return "Albrecht Jung" + case 188: { /* '188' */ + return "Griesser AG" } - case 30: - { /* '30' */ - return "Eltako" + case 189: { /* '189' */ + return "IPAS GmbH" } - case 300: - { /* '300' */ - return "ShenZhen YM" + case 19: { /* '19' */ + return "Feller" } - case 301: - { /* '301' */ - return "MEAN WELL Enterprises Co. Ltd." + case 190: { /* '190' */ + return "elero GmbH" } - case 302: - { /* '302' */ - return "OSix" + case 191: { /* '191' */ + return "Ardan Production and Industrial Controls Ltd." } - case 303: - { /* '303' */ - return "AYPRO Technology" + case 192: { /* '192' */ + return "Metec Meßtechnik GmbH" } - case 304: - { /* '304' */ - return "Hefei Ecolite Software" + case 193: { /* '193' */ + return "ELKA-Elektronik GmbH" } - case 305: - { /* '305' */ - return "Enno" + case 194: { /* '194' */ + return "ELEKTROANLAGEN D. NAGEL" } - case 306: - { /* '306' */ - return "OHOSURE" + case 195: { /* '195' */ + return "Tridonic Bauelemente GmbH" } - case 307: - { /* '307' */ - return "Garefowl" + case 196: { /* '196' */ + return "Stengler Gesellschaft" } - case 308: - { /* '308' */ - return "GEZE" + case 197: { /* '197' */ + return "Schneider Electric (MG)" } - case 309: - { /* '309' */ - return "LG Electronics Inc." + case 198: { /* '198' */ + return "KNX Association" } - case 31: - { /* '31' */ - return "Bosch-Siemens Haushaltsgeräte" + case 199: { /* '199' */ + return "VIVO" } - case 310: - { /* '310' */ - return "SMC interiors" + case 2: { /* '2' */ + return "ABB" } - case 311: - { /* '311' */ - return "Not Assigned" + case 20: { /* '20' */ + return "Glamox AS" } - case 312: - { /* '312' */ - return "SCS Cable" + case 200: { /* '200' */ + return "Hugo Müller GmbH & Co KG" } - case 313: - { /* '313' */ - return "Hoval" + case 201: { /* '201' */ + return "Siemens HVAC" } - case 314: - { /* '314' */ - return "CANST" + case 202: { /* '202' */ + return "APT" } - case 315: - { /* '315' */ - return "HangZhou Berlin" + case 203: { /* '203' */ + return "HighDom" } - case 316: - { /* '316' */ - return "EVN-Lichttechnik" + case 204: { /* '204' */ + return "Top Services" } - case 317: - { /* '317' */ - return "rutec" + case 205: { /* '205' */ + return "ambiHome" } - case 318: - { /* '318' */ - return "Finder" + case 206: { /* '206' */ + return "DATEC electronic AG" } - case 319: - { /* '319' */ - return "Fujitsu General Limited" + case 207: { /* '207' */ + return "ABUS Security-Center" } - case 32: - { /* '32' */ - return "RITTO GmbH&Co.KG" + case 208: { /* '208' */ + return "Lite-Puter" } - case 320: - { /* '320' */ - return "ZF Friedrichshafen AG" + case 209: { /* '209' */ + return "Tantron Electronic" } - case 321: - { /* '321' */ - return "Crealed" + case 21: { /* '21' */ + return "DEHN & SÖHNE" } - case 322: - { /* '322' */ - return "Miles Magic Automation Private Limited" + case 210: { /* '210' */ + return "Interra" } - case 323: - { /* '323' */ - return "E+" + case 211: { /* '211' */ + return "DKX Tech" } - case 324: - { /* '324' */ - return "Italcond" + case 212: { /* '212' */ + return "Viatron" } - case 325: - { /* '325' */ - return "SATION" + case 213: { /* '213' */ + return "Nautibus" } - case 326: - { /* '326' */ - return "NewBest" + case 214: { /* '214' */ + return "ON Semiconductor" } - case 327: - { /* '327' */ - return "GDS DIGITAL SYSTEMS" + case 215: { /* '215' */ + return "Longchuang" } - case 328: - { /* '328' */ - return "Iddero" + case 216: { /* '216' */ + return "Air-On AG" } - case 329: - { /* '329' */ - return "MBNLED" + case 217: { /* '217' */ + return "ib-company GmbH" } - case 33: - { /* '33' */ - return "Power Controls" + case 218: { /* '218' */ + return "Sation Factory" } - case 330: - { /* '330' */ - return "VITRUM" + case 219: { /* '219' */ + return "Agentilo GmbH" } - case 331: - { /* '331' */ - return "ekey biometric systems GmbH" + case 22: { /* '22' */ + return "CRABTREE" } - case 332: - { /* '332' */ - return "AMC" + case 220: { /* '220' */ + return "Makel Elektrik" } - case 333: - { /* '333' */ - return "TRILUX GmbH & Co. KG" + case 221: { /* '221' */ + return "Helios Ventilatoren" } - case 334: - { /* '334' */ - return "WExcedo" + case 222: { /* '222' */ + return "Otto Solutions Pte Ltd" } - case 335: - { /* '335' */ - return "VEMER SPA" + case 223: { /* '223' */ + return "Airmaster" } - case 336: - { /* '336' */ - return "Alexander Bürkle GmbH & Co KG" + case 224: { /* '224' */ + return "Vallox GmbH" } - case 337: - { /* '337' */ - return "Citron" + case 225: { /* '225' */ + return "Dalitek" } - case 338: - { /* '338' */ - return "Shenzhen HeGuang" + case 226: { /* '226' */ + return "ASIN" } - case 339: - { /* '339' */ - return "Not Assigned" + case 227: { /* '227' */ + return "Bridges Intelligence Technology Inc." } - case 34: - { /* '34' */ - return "ZUMTOBEL" + case 228: { /* '228' */ + return "ARBONIA" } - case 340: - { /* '340' */ - return "TRANE B.V.B.A" + case 229: { /* '229' */ + return "KERMI" } - case 341: - { /* '341' */ - return "CAREL" + case 23: { /* '23' */ + return "eVoKNX" } - case 342: - { /* '342' */ - return "Prolite Controls" + case 230: { /* '230' */ + return "PROLUX" } - case 343: - { /* '343' */ - return "BOSMER" + case 231: { /* '231' */ + return "ClicHome" } - case 344: - { /* '344' */ - return "EUCHIPS" + case 232: { /* '232' */ + return "COMMAX" } - case 345: - { /* '345' */ - return "connect (Thinka connect)" + case 233: { /* '233' */ + return "EAE" } - case 346: - { /* '346' */ - return "PEAKnx a DOGAWIST company" + case 234: { /* '234' */ + return "Tense" } - case 347: - { /* '347' */ - return "ACEMATIC" + case 235: { /* '235' */ + return "Seyoung Electronics" } - case 348: - { /* '348' */ - return "ELAUSYS" + case 236: { /* '236' */ + return "Lifedomus" } - case 349: - { /* '349' */ - return "ITK Engineering AG" + case 237: { /* '237' */ + return "EUROtronic Technology GmbH" } - case 35: - { /* '35' */ - return "Phoenix Contact" + case 238: { /* '238' */ + return "tci" } - case 350: - { /* '350' */ - return "INTEGRA METERING AG" + case 239: { /* '239' */ + return "Rishun Electronic" } - case 351: - { /* '351' */ - return "FMS Hospitality Pte Ltd" + case 24: { /* '24' */ + return "Paul Hochköpper" } - case 352: - { /* '352' */ - return "Nuvo" + case 240: { /* '240' */ + return "Zipato" } - case 353: - { /* '353' */ - return "u::Lux GmbH" + case 241: { /* '241' */ + return "cm-security GmbH & Co KG" } - case 354: - { /* '354' */ - return "Brumberg Leuchten" + case 242: { /* '242' */ + return "Qing Cables" } - case 355: - { /* '355' */ - return "Lime" + case 243: { /* '243' */ + return "LABIO" } - case 356: - { /* '356' */ - return "Great Empire International Group Co., Ltd." + case 244: { /* '244' */ + return "Coster Tecnologie Elettroniche S.p.A." } - case 357: - { /* '357' */ - return "Kavoshpishro Asia" + case 245: { /* '245' */ + return "E.G.E" } - case 358: - { /* '358' */ - return "V2 SpA" + case 246: { /* '246' */ + return "NETxAutomation" } - case 359: - { /* '359' */ - return "Johnson Controls" + case 247: { /* '247' */ + return "tecalor" } - case 36: - { /* '36' */ - return "WAGO Kontakttechnik" + case 248: { /* '248' */ + return "Urmet Electronics (Huizhou) Ltd." } - case 360: - { /* '360' */ - return "Arkud" + case 249: { /* '249' */ + return "Peiying Building Control" } - case 361: - { /* '361' */ - return "Iridium Ltd." + case 25: { /* '25' */ + return "Altenburger Electronic" } - case 362: - { /* '362' */ - return "bsmart" + case 250: { /* '250' */ + return "BPT S.p.A. a Socio Unico" } - case 363: - { /* '363' */ - return "BAB TECHNOLOGIE GmbH" + case 251: { /* '251' */ + return "Kanontec - KanonBUS" } - case 364: - { /* '364' */ - return "NICE Spa" + case 252: { /* '252' */ + return "ISER Tech" } - case 365: - { /* '365' */ - return "Redfish Group Pty Ltd" + case 253: { /* '253' */ + return "Fineline" } - case 366: - { /* '366' */ - return "SABIANA spa" + case 254: { /* '254' */ + return "CP Electronics Ltd" } - case 367: - { /* '367' */ - return "Ubee Interactive Europe" + case 255: { /* '255' */ + return "Niko-Servodan A/S" } - case 368: - { /* '368' */ - return "Rexel" + case 256: { /* '256' */ + return "Simon" } - case 369: - { /* '369' */ - return "Ges Teknik A.S." + case 257: { /* '257' */ + return "GM modular pvt. Ltd." } - case 37: - { /* '37' */ - return "knXpresso" + case 258: { /* '258' */ + return "FU CHENG Intelligence" } - case 370: - { /* '370' */ - return "Ave S.p.A." + case 259: { /* '259' */ + return "NexKon" } - case 371: - { /* '371' */ - return "Zhuhai Ltech Technology Co., Ltd." + case 26: { /* '26' */ + return "Grässlin" } - case 372: - { /* '372' */ - return "ARCOM" + case 260: { /* '260' */ + return "FEEL s.r.l" } - case 373: - { /* '373' */ - return "VIA Technologies, Inc." + case 261: { /* '261' */ + return "Not Assigned" } - case 374: - { /* '374' */ - return "FEELSMART." + case 262: { /* '262' */ + return "Shenzhen Fanhai Sanjiang Electronics Co., Ltd." } - case 375: - { /* '375' */ - return "SUPCON" + case 263: { /* '263' */ + return "Jiuzhou Greeble" } - case 376: - { /* '376' */ - return "MANIC" + case 264: { /* '264' */ + return "Aumüller Aumatic GmbH" } - case 377: - { /* '377' */ - return "TDE GmbH" + case 265: { /* '265' */ + return "Etman Electric" } - case 378: - { /* '378' */ - return "Nanjing Shufan Information technology Co.,Ltd." + case 266: { /* '266' */ + return "Black Nova" } - case 379: - { /* '379' */ - return "EWTech" + case 267: { /* '267' */ + return "ZidaTech AG" } - case 38: - { /* '38' */ - return "Wieland Electric" + case 268: { /* '268' */ + return "IDGS bvba" } - case 380: - { /* '380' */ - return "Kluger Automation GmbH" + case 269: { /* '269' */ + return "dakanimo" } - case 381: - { /* '381' */ - return "JoongAng Control" + case 27: { /* '27' */ + return "Simon" } - case 382: - { /* '382' */ - return "GreenControls Technology Sdn. Bhd." + case 270: { /* '270' */ + return "Trebor Automation AB" } - case 383: - { /* '383' */ - return "IME S.p.a." + case 271: { /* '271' */ + return "Satel sp. z o.o." } - case 384: - { /* '384' */ - return "SiChuan HaoDing" + case 272: { /* '272' */ + return "Russound, Inc." } - case 385: - { /* '385' */ - return "Mindjaga Ltd." + case 273: { /* '273' */ + return "Midea Heating & Ventilating Equipment CO LTD" } - case 386: - { /* '386' */ - return "RuiLi Smart Control" + case 274: { /* '274' */ + return "Consorzio Terranuova" } - case 387: - { /* '387' */ - return "CODESYS GmbH" + case 275: { /* '275' */ + return "Wolf Heiztechnik GmbH" } - case 388: - { /* '388' */ - return "Moorgen Deutschland GmbH" + case 276: { /* '276' */ + return "SONTEC" } - case 389: - { /* '389' */ - return "CULLMANN TECH" + case 277: { /* '277' */ + return "Belcom Cables Ltd." } - case 39: - { /* '39' */ - return "Hermann Kleinhuis" + case 278: { /* '278' */ + return "Guangzhou SeaWin Electrical Technologies Co., Ltd." } - case 390: - { /* '390' */ - return "eyrise B.V" + case 279: { /* '279' */ + return "Acrel" } - case 391: - { /* '391' */ - return "ABEGO" + case 28: { /* '28' */ + return "VIMAR" } - case 392: - { /* '392' */ - return "myGEKKO" + case 280: { /* '280' */ + return "KWC Aquarotter GmbH" } - case 393: - { /* '393' */ - return "Ergo3 Sarl" + case 281: { /* '281' */ + return "Orion Systems" } - case 394: - { /* '394' */ - return "STmicroelectronics International N.V." + case 282: { /* '282' */ + return "Schrack Technik GmbH" } - case 395: - { /* '395' */ - return "cjc systems" + case 283: { /* '283' */ + return "INSPRID" } - case 396: - { /* '396' */ - return "Sudoku" + case 284: { /* '284' */ + return "Sunricher" } - case 397: - { /* '397' */ - return "AZ e-lite Pte Ltd" + case 285: { /* '285' */ + return "Menred automation system(shanghai) Co.,Ltd." } - case 398: - { /* '398' */ - return "Arlight" + case 286: { /* '286' */ + return "Aurex" } - case 399: - { /* '399' */ - return "Grünbeck Wasseraufbereitung GmbH" + case 287: { /* '287' */ + return "Josef Barthelme GmbH & Co. KG" } - case 4: - { /* '4' */ - return "Bticino" + case 288: { /* '288' */ + return "Architecture Numerique" } - case 40: - { /* '40' */ - return "Stiebel Eltron" + case 289: { /* '289' */ + return "UP GROUP" } - case 400: - { /* '400' */ - return "Module Electronic" + case 29: { /* '29' */ + return "Moeller Gebäudeautomation KG" } - case 401: - { /* '401' */ - return "KOPLAT" + case 290: { /* '290' */ + return "Teknos-Avinno" } - case 402: - { /* '402' */ - return "Guangzhou Letour Life Technology Co., Ltd" + case 291: { /* '291' */ + return "Ningbo Dooya Mechanic & Electronic Technology" } - case 403: - { /* '403' */ - return "ILEVIA" + case 292: { /* '292' */ + return "Thermokon Sensortechnik GmbH" } - case 404: - { /* '404' */ - return "LN SYSTEMTEQ" + case 293: { /* '293' */ + return "BELIMO Automation AG" } - case 405: - { /* '405' */ - return "Hisense SmartHome" + case 294: { /* '294' */ + return "Zehnder Group International AG" } - case 406: - { /* '406' */ - return "Flink Automation System" + case 295: { /* '295' */ + return "sks Kinkel Elektronik" } - case 407: - { /* '407' */ - return "xxter bv" + case 296: { /* '296' */ + return "ECE Wurmitzer GmbH" } - case 408: - { /* '408' */ - return "lynxus technology" + case 297: { /* '297' */ + return "LARS" } - case 409: - { /* '409' */ - return "ROBOT S.A." + case 298: { /* '298' */ + return "URC" } - case 41: - { /* '41' */ - return "Tehalit" + case 299: { /* '299' */ + return "LightControl" } - case 410: - { /* '410' */ - return "Shenzhen Atte Smart Life Co.,Ltd." + case 3: { /* '3' */ + return "Albrecht Jung" } - case 411: - { /* '411' */ - return "Noblesse" + case 30: { /* '30' */ + return "Eltako" } - case 412: - { /* '412' */ - return "Advanced Devices" + case 300: { /* '300' */ + return "ShenZhen YM" } - case 413: - { /* '413' */ - return "Atrina Building Automation Co. Ltd" + case 301: { /* '301' */ + return "MEAN WELL Enterprises Co. Ltd." } - case 414: - { /* '414' */ - return "Guangdong Daming Laffey electric Co., Ltd." + case 302: { /* '302' */ + return "OSix" } - case 415: - { /* '415' */ - return "Westerstrand Urfabrik AB" + case 303: { /* '303' */ + return "AYPRO Technology" } - case 416: - { /* '416' */ - return "Control4 Corporate" + case 304: { /* '304' */ + return "Hefei Ecolite Software" } - case 417: - { /* '417' */ - return "Ontrol" + case 305: { /* '305' */ + return "Enno" } - case 418: - { /* '418' */ - return "Starnet" + case 306: { /* '306' */ + return "OHOSURE" } - case 419: - { /* '419' */ - return "BETA CAVI" + case 307: { /* '307' */ + return "Garefowl" } - case 42: - { /* '42' */ - return "Theben AG" + case 308: { /* '308' */ + return "GEZE" } - case 420: - { /* '420' */ - return "EaseMore" + case 309: { /* '309' */ + return "LG Electronics Inc." } - case 421: - { /* '421' */ - return "Vivaldi srl" + case 31: { /* '31' */ + return "Bosch-Siemens Haushaltsgeräte" } - case 422: - { /* '422' */ - return "Gree Electric Appliances,Inc. of Zhuhai" + case 310: { /* '310' */ + return "SMC interiors" } - case 423: - { /* '423' */ - return "HWISCON" + case 311: { /* '311' */ + return "Not Assigned" } - case 424: - { /* '424' */ - return "Shanghai ELECON Intelligent Technology Co., Ltd." + case 312: { /* '312' */ + return "SCS Cable" } - case 425: - { /* '425' */ - return "Kampmann" + case 313: { /* '313' */ + return "Hoval" } - case 426: - { /* '426' */ - return "Impolux GmbH / LEDIMAX" + case 314: { /* '314' */ + return "CANST" } - case 427: - { /* '427' */ - return "Evaux" + case 315: { /* '315' */ + return "HangZhou Berlin" } - case 428: - { /* '428' */ - return "Webro Cables & Connectors Limited" + case 316: { /* '316' */ + return "EVN-Lichttechnik" } - case 429: - { /* '429' */ - return "Shanghai E-tech Solution" + case 317: { /* '317' */ + return "rutec" } - case 43: - { /* '43' */ - return "Wilhelm Rutenbeck" + case 318: { /* '318' */ + return "Finder" } - case 430: - { /* '430' */ - return "Guangzhou HOKO Electric Co.,Ltd." + case 319: { /* '319' */ + return "Fujitsu General Limited" } - case 431: - { /* '431' */ - return "LAMMIN HIGH TECH CO.,LTD" + case 32: { /* '32' */ + return "RITTO GmbH&Co.KG" } - case 432: - { /* '432' */ - return "Shenzhen Merrytek Technology Co., Ltd" + case 320: { /* '320' */ + return "ZF Friedrichshafen AG" } - case 433: - { /* '433' */ - return "I-Luxus" + case 321: { /* '321' */ + return "Crealed" } - case 434: - { /* '434' */ - return "Elmos Semiconductor AG" + case 322: { /* '322' */ + return "Miles Magic Automation Private Limited" } - case 435: - { /* '435' */ - return "EmCom Technology Inc" + case 323: { /* '323' */ + return "E+" } - case 436: - { /* '436' */ - return "project innovations GmbH" + case 324: { /* '324' */ + return "Italcond" } - case 437: - { /* '437' */ - return "Itc" + case 325: { /* '325' */ + return "SATION" } - case 438: - { /* '438' */ - return "ABB LV Installation Materials Company Ltd, Beijing" + case 326: { /* '326' */ + return "NewBest" } - case 439: - { /* '439' */ - return "Maico" + case 327: { /* '327' */ + return "GDS DIGITAL SYSTEMS" } - case 44: - { /* '44' */ - return "Winkhaus" + case 328: { /* '328' */ + return "Iddero" } - case 440: - { /* '440' */ - return "ELAN SRL" + case 329: { /* '329' */ + return "MBNLED" } - case 441: - { /* '441' */ - return "MinhHa Technology co.,Ltd" + case 33: { /* '33' */ + return "Power Controls" } - case 442: - { /* '442' */ - return "Zhejiang Tianjie Industrial CORP." + case 330: { /* '330' */ + return "VITRUM" } - case 443: - { /* '443' */ - return "iAutomation Pty Limited" + case 331: { /* '331' */ + return "ekey biometric systems GmbH" } - case 444: - { /* '444' */ - return "Extron" + case 332: { /* '332' */ + return "AMC" } - case 445: - { /* '445' */ - return "Freedompro" + case 333: { /* '333' */ + return "TRILUX GmbH & Co. KG" } - case 446: - { /* '446' */ - return "1Home" + case 334: { /* '334' */ + return "WExcedo" } - case 447: - { /* '447' */ - return "EOS Saunatechnik GmbH" + case 335: { /* '335' */ + return "VEMER SPA" } - case 448: - { /* '448' */ - return "KUSATEK GmbH" + case 336: { /* '336' */ + return "Alexander Bürkle GmbH & Co KG" } - case 449: - { /* '449' */ - return "EisBär Scada" + case 337: { /* '337' */ + return "Citron" } - case 45: - { /* '45' */ - return "Robert Bosch" + case 338: { /* '338' */ + return "Shenzhen HeGuang" } - case 450: - { /* '450' */ - return "AUTOMATISMI BENINCA S.P.A." + case 339: { /* '339' */ + return "Not Assigned" } - case 451: - { /* '451' */ - return "Blendom" + case 34: { /* '34' */ + return "ZUMTOBEL" } - case 452: - { /* '452' */ - return "Madel Air Technical diffusion" + case 340: { /* '340' */ + return "TRANE B.V.B.A" } - case 453: - { /* '453' */ - return "NIKO" + case 341: { /* '341' */ + return "CAREL" } - case 454: - { /* '454' */ - return "Bosch Rexroth AG" + case 342: { /* '342' */ + return "Prolite Controls" } - case 455: - { /* '455' */ - return "C&M Products" + case 343: { /* '343' */ + return "BOSMER" } - case 456: - { /* '456' */ - return "Hörmann KG Verkaufsgesellschaft" + case 344: { /* '344' */ + return "EUCHIPS" } - case 457: - { /* '457' */ - return "Shanghai Rajayasa co.,LTD" + case 345: { /* '345' */ + return "connect (Thinka connect)" } - case 458: - { /* '458' */ - return "SUZUKI" + case 346: { /* '346' */ + return "PEAKnx a DOGAWIST company" } - case 459: - { /* '459' */ - return "Silent Gliss International Ltd." + case 347: { /* '347' */ + return "ACEMATIC" } - case 46: - { /* '46' */ - return "Somfy" + case 348: { /* '348' */ + return "ELAUSYS" } - case 460: - { /* '460' */ - return "BEE Controls (ADGSC Group)" + case 349: { /* '349' */ + return "ITK Engineering AG" } - case 461: - { /* '461' */ - return "xDTecGmbH" + case 35: { /* '35' */ + return "Phoenix Contact" } - case 462: - { /* '462' */ - return "OSRAM" + case 350: { /* '350' */ + return "INTEGRA METERING AG" } - case 463: - { /* '463' */ - return "Lebenor" + case 351: { /* '351' */ + return "FMS Hospitality Pte Ltd" } - case 464: - { /* '464' */ - return "automaneng" + case 352: { /* '352' */ + return "Nuvo" } - case 465: - { /* '465' */ - return "Honeywell Automation Solution control(China)" + case 353: { /* '353' */ + return "u::Lux GmbH" } - case 466: - { /* '466' */ - return "Hangzhou binthen Intelligence Technology Co.,Ltd" + case 354: { /* '354' */ + return "Brumberg Leuchten" } - case 467: - { /* '467' */ - return "ETA Heiztechnik" + case 355: { /* '355' */ + return "Lime" } - case 468: - { /* '468' */ - return "DIVUS GmbH" + case 356: { /* '356' */ + return "Great Empire International Group Co., Ltd." } - case 469: - { /* '469' */ - return "Nanjing Taijiesai Intelligent Technology Co. Ltd." + case 357: { /* '357' */ + return "Kavoshpishro Asia" } - case 47: - { /* '47' */ - return "Woertz" + case 358: { /* '358' */ + return "V2 SpA" } - case 470: - { /* '470' */ - return "Lunatone" + case 359: { /* '359' */ + return "Johnson Controls" } - case 471: - { /* '471' */ - return "ZHEJIANG SCTECH BUILDING INTELLIGENT" + case 36: { /* '36' */ + return "WAGO Kontakttechnik" } - case 472: - { /* '472' */ - return "Foshan Qite Technology Co., Ltd." + case 360: { /* '360' */ + return "Arkud" } - case 473: - { /* '473' */ - return "NOKE" + case 361: { /* '361' */ + return "Iridium Ltd." } - case 474: - { /* '474' */ - return "LANDCOM" + case 362: { /* '362' */ + return "bsmart" } - case 475: - { /* '475' */ - return "Stork AS" + case 363: { /* '363' */ + return "BAB TECHNOLOGIE GmbH" } - case 476: - { /* '476' */ - return "Hangzhou Shendu Technology Co., Ltd." + case 364: { /* '364' */ + return "NICE Spa" } - case 477: - { /* '477' */ - return "CoolAutomation" + case 365: { /* '365' */ + return "Redfish Group Pty Ltd" } - case 478: - { /* '478' */ - return "Aprstern" + case 366: { /* '366' */ + return "SABIANA spa" } - case 479: - { /* '479' */ - return "sonnen" + case 367: { /* '367' */ + return "Ubee Interactive Europe" } - case 48: - { /* '48' */ - return "Viessmann Werke" + case 368: { /* '368' */ + return "Rexel" } - case 480: - { /* '480' */ - return "DNAKE" + case 369: { /* '369' */ + return "Ges Teknik A.S." } - case 481: - { /* '481' */ - return "Neuberger Gebäudeautomation GmbH" + case 37: { /* '37' */ + return "knXpresso" } - case 482: - { /* '482' */ - return "Stiliger" + case 370: { /* '370' */ + return "Ave S.p.A." } - case 483: - { /* '483' */ - return "Berghof Automation GmbH" + case 371: { /* '371' */ + return "Zhuhai Ltech Technology Co., Ltd." } - case 484: - { /* '484' */ - return "Total Automation and controls GmbH" + case 372: { /* '372' */ + return "ARCOM" } - case 485: - { /* '485' */ - return "dovit" + case 373: { /* '373' */ + return "VIA Technologies, Inc." } - case 486: - { /* '486' */ - return "Instalighting GmbH" + case 374: { /* '374' */ + return "FEELSMART." } - case 487: - { /* '487' */ - return "UNI-TEC" + case 375: { /* '375' */ + return "SUPCON" } - case 488: - { /* '488' */ - return "CasaTunes" + case 376: { /* '376' */ + return "MANIC" } - case 489: - { /* '489' */ - return "EMT" + case 377: { /* '377' */ + return "TDE GmbH" } - case 49: - { /* '49' */ - return "IMI Hydronic Engineering" + case 378: { /* '378' */ + return "Nanjing Shufan Information technology Co.,Ltd." } - case 490: - { /* '490' */ - return "Senfficient" + case 379: { /* '379' */ + return "EWTech" } - case 491: - { /* '491' */ - return "Aurolite electrical panyu guangzhou limited" + case 38: { /* '38' */ + return "Wieland Electric" } - case 492: - { /* '492' */ - return "ABB Xiamen Smart Technology Co., Ltd." + case 380: { /* '380' */ + return "Kluger Automation GmbH" } - case 493: - { /* '493' */ - return "Samson Electric Wire" + case 381: { /* '381' */ + return "JoongAng Control" } - case 494: - { /* '494' */ - return "T-Touching" + case 382: { /* '382' */ + return "GreenControls Technology Sdn. Bhd." } - case 495: - { /* '495' */ - return "Core Smart Home" + case 383: { /* '383' */ + return "IME S.p.a." } - case 496: - { /* '496' */ - return "GreenConnect Solutions SA" + case 384: { /* '384' */ + return "SiChuan HaoDing" } - case 497: - { /* '497' */ - return "ELETTRONICA CONDUTTORI" + case 385: { /* '385' */ + return "Mindjaga Ltd." } - case 498: - { /* '498' */ - return "MKFC" + case 386: { /* '386' */ + return "RuiLi Smart Control" } - case 499: - { /* '499' */ - return "Automation+" + case 387: { /* '387' */ + return "CODESYS GmbH" } - case 5: - { /* '5' */ - return "Berker" + case 388: { /* '388' */ + return "Moorgen Deutschland GmbH" } - case 50: - { /* '50' */ - return "Joh. Vaillant" + case 389: { /* '389' */ + return "CULLMANN TECH" } - case 500: - { /* '500' */ - return "blue and red" + case 39: { /* '39' */ + return "Hermann Kleinhuis" } - case 501: - { /* '501' */ - return "frogblue" + case 390: { /* '390' */ + return "eyrise B.V" } - case 502: - { /* '502' */ - return "SAVESOR" + case 391: { /* '391' */ + return "ABEGO" } - case 503: - { /* '503' */ - return "App Tech" + case 392: { /* '392' */ + return "myGEKKO" } - case 504: - { /* '504' */ - return "sensortec AG" + case 393: { /* '393' */ + return "Ergo3 Sarl" } - case 505: - { /* '505' */ - return "nysa technology & solutions" + case 394: { /* '394' */ + return "STmicroelectronics International N.V." } - case 506: - { /* '506' */ - return "FARADITE" + case 395: { /* '395' */ + return "cjc systems" } - case 507: - { /* '507' */ - return "Optimus" + case 396: { /* '396' */ + return "Sudoku" } - case 508: - { /* '508' */ - return "KTS s.r.l." + case 397: { /* '397' */ + return "AZ e-lite Pte Ltd" } - case 509: - { /* '509' */ - return "Ramcro SPA" + case 398: { /* '398' */ + return "Arlight" } - case 51: - { /* '51' */ - return "AMP Deutschland" + case 399: { /* '399' */ + return "Grünbeck Wasseraufbereitung GmbH" } - case 510: - { /* '510' */ - return "Wuhan WiseCreate Universe Technology Co., Ltd" + case 4: { /* '4' */ + return "Bticino" } - case 511: - { /* '511' */ - return "BEMI Smart Home Ltd" + case 40: { /* '40' */ + return "Stiebel Eltron" } - case 512: - { /* '512' */ - return "Ardomus" + case 400: { /* '400' */ + return "Module Electronic" } - case 513: - { /* '513' */ - return "ChangXing" + case 401: { /* '401' */ + return "KOPLAT" } - case 514: - { /* '514' */ - return "E-Controls" + case 402: { /* '402' */ + return "Guangzhou Letour Life Technology Co., Ltd" } - case 515: - { /* '515' */ - return "AIB Technology" + case 403: { /* '403' */ + return "ILEVIA" } - case 516: - { /* '516' */ - return "NVC" + case 404: { /* '404' */ + return "LN SYSTEMTEQ" } - case 517: - { /* '517' */ - return "Kbox" + case 405: { /* '405' */ + return "Hisense SmartHome" } - case 518: - { /* '518' */ - return "CNS" + case 406: { /* '406' */ + return "Flink Automation System" } - case 519: - { /* '519' */ - return "Tyba" + case 407: { /* '407' */ + return "xxter bv" } - case 52: - { /* '52' */ - return "Bosch Thermotechnik GmbH" + case 408: { /* '408' */ + return "lynxus technology" } - case 520: - { /* '520' */ - return "Atrel" + case 409: { /* '409' */ + return "ROBOT S.A." } - case 521: - { /* '521' */ - return "Simon Electric (China) Co., LTD" + case 41: { /* '41' */ + return "Tehalit" } - case 522: - { /* '522' */ - return "Kordz Group" + case 410: { /* '410' */ + return "Shenzhen Atte Smart Life Co.,Ltd." } - case 523: - { /* '523' */ - return "ND Electric" + case 411: { /* '411' */ + return "Noblesse" } - case 524: - { /* '524' */ - return "Controlium" + case 412: { /* '412' */ + return "Advanced Devices" } - case 525: - { /* '525' */ - return "FAMO GmbH & Co. KG" + case 413: { /* '413' */ + return "Atrina Building Automation Co. Ltd" } - case 526: - { /* '526' */ - return "CDN Smart" + case 414: { /* '414' */ + return "Guangdong Daming Laffey electric Co., Ltd." } - case 527: - { /* '527' */ - return "Heston" + case 415: { /* '415' */ + return "Westerstrand Urfabrik AB" } - case 528: - { /* '528' */ - return "ESLA CONEXIONES S.L." + case 416: { /* '416' */ + return "Control4 Corporate" } - case 529: - { /* '529' */ - return "Weishaupt" + case 417: { /* '417' */ + return "Ontrol" } - case 53: - { /* '53' */ - return "SEF - ECOTEC" + case 418: { /* '418' */ + return "Starnet" } - case 530: - { /* '530' */ - return "ASTRUM TECHNOLOGY" + case 419: { /* '419' */ + return "BETA CAVI" } - case 531: - { /* '531' */ - return "WUERTH ELEKTRONIK STELVIO KONTEK S.p.A." + case 42: { /* '42' */ + return "Theben AG" } - case 532: - { /* '532' */ - return "NANOTECO corporation" + case 420: { /* '420' */ + return "EaseMore" } - case 533: - { /* '533' */ - return "Nietian" + case 421: { /* '421' */ + return "Vivaldi srl" } - case 534: - { /* '534' */ - return "Sumsir" + case 422: { /* '422' */ + return "Gree Electric Appliances,Inc. of Zhuhai" } - case 535: - { /* '535' */ - return "ORBIS TECNOLOGIA ELECTRICA SA" + case 423: { /* '423' */ + return "HWISCON" } - case 536: - { /* '536' */ - return "Nanjing Zhongyi IoT Technology Co., Ltd." + case 424: { /* '424' */ + return "Shanghai ELECON Intelligent Technology Co., Ltd." } - case 537: - { /* '537' */ - return "Anlips" + case 425: { /* '425' */ + return "Kampmann" } - case 538: - { /* '538' */ - return "GUANGDONG PAK CORPORATION CO., LTD" + case 426: { /* '426' */ + return "Impolux GmbH / LEDIMAX" } - case 539: - { /* '539' */ - return "BVK Technology" + case 427: { /* '427' */ + return "Evaux" } - case 54: - { /* '54' */ - return "DORMA GmbH + Co. KG" + case 428: { /* '428' */ + return "Webro Cables & Connectors Limited" } - case 540: - { /* '540' */ - return "Solomio srl" + case 429: { /* '429' */ + return "Shanghai E-tech Solution" } - case 541: - { /* '541' */ - return "Domotica Labs" + case 43: { /* '43' */ + return "Wilhelm Rutenbeck" } - case 542: - { /* '542' */ - return "NVC International" + case 430: { /* '430' */ + return "Guangzhou HOKO Electric Co.,Ltd." } - case 543: - { /* '543' */ - return "BA" + case 431: { /* '431' */ + return "LAMMIN HIGH TECH CO.,LTD" } - case 544: - { /* '544' */ - return "Iris Ceramica Group" + case 432: { /* '432' */ + return "Shenzhen Merrytek Technology Co., Ltd" } - case 545: - { /* '545' */ - return "Wireeo" + case 433: { /* '433' */ + return "I-Luxus" } - case 546: - { /* '546' */ - return "nvclighting" + case 434: { /* '434' */ + return "Elmos Semiconductor AG" } - case 547: - { /* '547' */ - return "Jinan Tian Da Sheng Information Technology Co." + case 435: { /* '435' */ + return "EmCom Technology Inc" } - case 548: - { /* '548' */ - return "Armiti trading" + case 436: { /* '436' */ + return "project innovations GmbH" } - case 549: - { /* '549' */ - return "ELEK" - } - case 55: - { /* '55' */ - return "WindowMaster A/S" - } - case 550: - { /* '550' */ - return "Accordia sa" - } - case 551: - { /* '551' */ - return "OURICAN" - } - case 552: - { /* '552' */ - return "INLIWOSE" - } - case 553: - { /* '553' */ - return "Bosch (Shanghai) Smart Life Technology Ltd." - } - case 554: - { /* '554' */ - return "SHK KNX" - } - case 555: - { /* '555' */ - return "Ampio" - } - case 556: - { /* '556' */ - return "Mingxing Wisdom" - } - case 557: - { /* '557' */ - return "ALTEN SW GmbH" - } - case 558: - { /* '558' */ - return "V.Y.C.srl" - } - case 559: - { /* '559' */ - return "TERMINUS GROUP" - } - case 56: - { /* '56' */ - return "Walther Werke" - } - case 560: - { /* '560' */ - return "Wonderful City Technology" - } - case 561: - { /* '561' */ - return "QbicTechnology" - } - case 562: - { /* '562' */ - return "Embedded Automation Equipment (Shanghai) Limited" - } - case 563: - { /* '563' */ - return "onework" - } - case 564: - { /* '564' */ - return "PL LINK" - } - case 565: - { /* '565' */ - return "Fasel GmbH Elektronik" - } - case 566: - { /* '566' */ - return "GoldenHome Smart" - } - case 567: - { /* '567' */ - return "Goldmedal" - } - case 568: - { /* '568' */ - return "Can'nX" - } - case 569: - { /* '569' */ - return "EGI - Earth Goodness" - } - case 57: - { /* '57' */ - return "ORAS" - } - case 570: - { /* '570' */ - return "Viega GmbH & Co. KG" - } - case 571: - { /* '571' */ - return "Fredon Digital Buildings" - } - case 572: - { /* '572' */ - return "Helukabel (Thailand) Co.,Ltd." - } - case 573: - { /* '573' */ - return "ACE Technology" - } - case 574: - { /* '574' */ - return "MEX Electric Technology (Shanghai) Co., Ltd" - } - case 575: - { /* '575' */ - return "SUMAMO" - } - case 576: - { /* '576' */ - return "SVIT" - } - case 577: - { /* '577' */ - return "tecget" - } - case 578: - { /* '578' */ - return "Xeropoint" - } - case 579: - { /* '579' */ - return "Honeywell Building Technologies" - } - case 58: - { /* '58' */ - return "Dätwyler" - } - case 580: - { /* '580' */ - return "ComfortClick" - } - case 581: - { /* '581' */ - return "DORBAS ELECTRIC" - } - case 582: - { /* '582' */ - return "REMKO GmbH & Co. KG" - } - case 583: - { /* '583' */ - return "Shenzhen Congxun Intelligent Technology Co., LTD" - } - case 584: - { /* '584' */ - return "ANDAS" - } - case 585: - { /* '585' */ - return "Hefei Chuang Yue Intelligent Technology Co.,LTD" - } - case 586: - { /* '586' */ - return "Larfe" - } - case 587: - { /* '587' */ - return "Dongguan Muhcci Electrical" - } - case 588: - { /* '588' */ - return "STEC" - } - case 589: - { /* '589' */ - return "ARIGO Software GmbH" - } - case 59: - { /* '59' */ - return "Electrak" - } - case 590: - { /* '590' */ - return "Feishelec" - } - case 591: - { /* '591' */ - return "GORDIC" - } - case 592: - { /* '592' */ - return "Delta Electronics" - } - case 593: - { /* '593' */ - return "Shanghai Lewin Intelligent Technology Co.,Ltd." - } - case 594: - { /* '594' */ - return "KG-POWER" - } - case 595: - { /* '595' */ - return "Zhejiang Moorgen Intelligent Technology Co., Ltd" - } - case 596: - { /* '596' */ - return "Guangdong Kanway" - } - case 597: - { /* '597' */ - return "RAMIREZ Engineering GmbH" - } - case 598: - { /* '598' */ - return "Zhongshan Taiyang IMP&EXP. CO LTD" - } - case 599: - { /* '599' */ - return "Vihan electric pvt ltd" - } - case 6: - { /* '6' */ - return "Busch-Jaeger Elektro" - } - case 60: - { /* '60' */ - return "Techem" - } - case 600: - { /* '600' */ - return "Splendid Minds GmbH" - } - case 601: - { /* '601' */ - return "Estada" - } - case 602: - { /* '602' */ - return "zhongyunxinzhikonggujituanyouxiangongsi" - } - case 603: - { /* '603' */ - return "Stuhl Regelsysteme GmbH" - } - case 604: - { /* '604' */ - return "Shenzhen Gluck Technology Co., LTD" - } - case 605: - { /* '605' */ - return "Gaimex" - } - case 606: - { /* '606' */ - return "B3 International S.R.L" - } - case 607: - { /* '607' */ - return "MM Electro" - } - case 608: - { /* '608' */ - return "CASCODA" - } - case 609: - { /* '609' */ - return "Xiamen Intretech Inc." - } - case 61: - { /* '61' */ - return "Schneider Electric Industries SAS" - } - case 610: - { /* '610' */ - return "KiloElec Technology" - } - case 611: - { /* '611' */ - return "Inyx" - } - case 612: - { /* '612' */ - return "Smart Building Services GmbH" - } - case 613: - { /* '613' */ - return "BSS GmbH" - } - case 614: - { /* '614' */ - return "ABB - reserved" - } - case 615: - { /* '615' */ - return "Busch-Jaeger Elektro - reserved" - } - case 62: - { /* '62' */ - return "WHD Wilhelm Huber + Söhne" - } - case 63: - { /* '63' */ - return "Bischoff Elektronik" - } - case 64: - { /* '64' */ - return "JEPAZ" - } - case 65: - { /* '65' */ - return "RTS Automation" - } - case 66: - { /* '66' */ - return "EIBMARKT GmbH" - } - case 67: - { /* '67' */ - return "WAREMA Renkhoff SE" - } - case 68: - { /* '68' */ - return "Eelectron" - } - case 69: - { /* '69' */ - return "Belden Wire & Cable B.V." - } - case 7: - { /* '7' */ - return "GIRA Giersiepen" - } - case 70: - { /* '70' */ - return "Becker-Antriebe GmbH" - } - case 71: - { /* '71' */ - return "J.Stehle+Söhne GmbH" - } - case 72: - { /* '72' */ - return "AGFEO" - } - case 73: - { /* '73' */ - return "Zennio" - } - case 74: - { /* '74' */ - return "TAPKO Technologies" - } - case 75: - { /* '75' */ - return "HDL" - } - case 76: - { /* '76' */ - return "Uponor" - } - case 77: - { /* '77' */ - return "se Lightmanagement AG" - } - case 78: - { /* '78' */ - return "Arcus-eds" - } - case 79: - { /* '79' */ - return "Intesis" - } - case 8: - { /* '8' */ - return "Hager Electro" - } - case 80: - { /* '80' */ - return "Herholdt Controls srl" - } - case 81: - { /* '81' */ - return "Niko-Zublin" - } - case 82: - { /* '82' */ - return "Durable Technologies" - } - case 83: - { /* '83' */ - return "Innoteam" - } - case 84: - { /* '84' */ - return "ise GmbH" - } - case 85: - { /* '85' */ - return "TEAM FOR TRONICS" - } - case 86: - { /* '86' */ - return "CIAT" - } - case 87: - { /* '87' */ - return "Remeha BV" - } - case 88: - { /* '88' */ - return "ESYLUX" - } - case 89: - { /* '89' */ - return "BASALTE" - } - case 9: - { /* '9' */ - return "Insta GmbH" - } - case 90: - { /* '90' */ - return "Vestamatic" - } - case 91: - { /* '91' */ - return "MDT technologies" - } - case 92: - { /* '92' */ - return "Warendorfer Küchen GmbH" - } - case 93: - { /* '93' */ - return "Video-Star" - } - case 94: - { /* '94' */ - return "Sitek" - } - case 95: - { /* '95' */ - return "CONTROLtronic" - } - case 96: - { /* '96' */ - return "function Technology" - } - case 97: - { /* '97' */ - return "AMX" - } - case 98: - { /* '98' */ - return "ELDAT" - } - case 99: - { /* '99' */ - return "Panasonic" - } - default: - { - return "" - } - } -} - -func KnxManufacturerFirstEnumForFieldName(value string) (KnxManufacturer, error) { - for _, sizeValue := range KnxManufacturerValues { - if sizeValue.Name() == value { - return sizeValue, nil - } - } - return 0, errors.Errorf("enum for %v describing Name not found", value) -} -func KnxManufacturerByValue(value uint16) (enum KnxManufacturer, ok bool) { - switch value { - case 0: - return KnxManufacturer_M_UNKNOWN, true - case 1: - return KnxManufacturer_M_SIEMENS, true - case 10: - return KnxManufacturer_M_LEGRAND_APPAREILLAGE_ELECTRIQUE, true - case 100: - return KnxManufacturer_M_PULSE_TECHNOLOGIES, true - case 101: - return KnxManufacturer_M_CRESTRON, true - case 102: - return KnxManufacturer_M_STEINEL_PROFESSIONAL, true - case 103: - return KnxManufacturer_M_BILTON_LED_LIGHTING, true - case 104: - return KnxManufacturer_M_DENRO_AG, true - case 105: - return KnxManufacturer_M_GEPRO, true - case 106: - return KnxManufacturer_M_PREUSSEN_AUTOMATION, true - case 107: - return KnxManufacturer_M_ZOPPAS_INDUSTRIES, true - case 108: - return KnxManufacturer_M_MACTECH, true - case 109: - return KnxManufacturer_M_TECHNO_TREND, true - case 11: - return KnxManufacturer_M_MERTEN, true - case 110: - return KnxManufacturer_M_FS_CABLES, true - case 111: - return KnxManufacturer_M_DELTA_DORE, true - case 112: - return KnxManufacturer_M_EISSOUND, true - case 113: - return KnxManufacturer_M_CISCO, true - case 114: - return KnxManufacturer_M_DINUY, true - case 115: - return KnxManufacturer_M_IKNIX, true - case 116: - return KnxManufacturer_M_RADEMACHER_GERAETE_ELEKTRONIK_GMBH, true - case 117: - return KnxManufacturer_M_EGI_ELECTROACUSTICA_GENERAL_IBERICA, true - case 118: - return KnxManufacturer_M_BES___INGENIUM, true - case 119: - return KnxManufacturer_M_ELABNET, true - case 12: - return KnxManufacturer_M_ABB_SPA_SACE_DIVISION, true - case 120: - return KnxManufacturer_M_BLUMOTIX, true - case 121: - return KnxManufacturer_M_HUNTER_DOUGLAS, true - case 122: - return KnxManufacturer_M_APRICUM, true - case 123: - return KnxManufacturer_M_TIANSU_AUTOMATION, true - case 124: - return KnxManufacturer_M_BUBENDORFF, true - case 125: - return KnxManufacturer_M_MBS_GMBH, true - case 126: - return KnxManufacturer_M_ENERTEX_BAYERN_GMBH, true - case 127: - return KnxManufacturer_M_BMS, true - case 128: - return KnxManufacturer_M_SINAPSI, true - case 129: - return KnxManufacturer_M_EMBEDDED_SYSTEMS_SIA, true - case 13: - return KnxManufacturer_M_SIEDLE_AND_SOEHNE, true - case 130: - return KnxManufacturer_M_KNX1, true - case 131: - return KnxManufacturer_M_TOKKA, true - case 132: - return KnxManufacturer_M_NANOSENSE, true - case 133: - return KnxManufacturer_M_PEAR_AUTOMATION_GMBH, true - case 134: - return KnxManufacturer_M_DGA, true - case 135: - return KnxManufacturer_M_LUTRON, true - case 136: - return KnxManufacturer_M_AIRZONE___ALTRA, true - case 137: - return KnxManufacturer_M_LITHOSS_DESIGN_SWITCHES, true - case 138: - return KnxManufacturer_M_THREEATEL, true - case 139: - return KnxManufacturer_M_PHILIPS_CONTROLS, true - case 14: - return KnxManufacturer_M_EBERLE, true - case 140: - return KnxManufacturer_M_VELUX_AS, true - case 141: - return KnxManufacturer_M_LOYTEC, true - case 142: - return KnxManufacturer_M_EKINEX_S_P_A_, true - case 143: - return KnxManufacturer_M_SIRLAN_TECHNOLOGIES, true - case 144: - return KnxManufacturer_M_PROKNX_SAS, true - case 145: - return KnxManufacturer_M_IT_GMBH, true - case 146: - return KnxManufacturer_M_RENSON, true - case 147: - return KnxManufacturer_M_HEP_GROUP, true - case 148: - return KnxManufacturer_M_BALMART, true - case 149: - return KnxManufacturer_M_GFS_GMBH, true - case 15: - return KnxManufacturer_M_GEWISS, true - case 150: - return KnxManufacturer_M_SCHENKER_STOREN_AG, true - case 151: - return KnxManufacturer_M_ALGODUE_ELETTRONICA_S_R_L_, true - case 152: - return KnxManufacturer_M_ABB_FRANCE, true - case 153: - return KnxManufacturer_M_MAINTRONIC, true - case 154: - return KnxManufacturer_M_VANTAGE, true - case 155: - return KnxManufacturer_M_FORESIS, true - case 156: - return KnxManufacturer_M_RESEARCH_AND_PRODUCTION_ASSOCIATION_SEM, true - case 157: - return KnxManufacturer_M_WEINZIERL_ENGINEERING_GMBH, true - case 158: - return KnxManufacturer_M_MOEHLENHOFF_WAERMETECHNIK_GMBH, true - case 159: - return KnxManufacturer_M_PKC_GROUP_OYJ, true - case 16: - return KnxManufacturer_M_ALBERT_ACKERMANN, true - case 160: - return KnxManufacturer_M_B_E_G_, true - case 161: - return KnxManufacturer_M_ELSNER_ELEKTRONIK_GMBH, true - case 162: - return KnxManufacturer_M_SIEMENS_BUILDING_TECHNOLOGIES_HKCHINA_LTD_, true - case 163: - return KnxManufacturer_M_EUTRAC, true - case 164: - return KnxManufacturer_M_GUSTAV_HENSEL_GMBH_AND_CO__KG, true - case 165: - return KnxManufacturer_M_GARO_AB, true - case 166: - return KnxManufacturer_M_WALDMANN_LICHTTECHNIK, true - case 167: - return KnxManufacturer_M_SCHUECO, true - case 168: - return KnxManufacturer_M_EMU, true - case 169: - return KnxManufacturer_M_JNET_SYSTEMS_AG, true - case 17: - return KnxManufacturer_M_SCHUPA_GMBH, true - case 170: - return KnxManufacturer_M_TOTAL_SOLUTION_GMBH, true - case 171: - return KnxManufacturer_M_O_Y_L__ELECTRONICS, true - case 172: - return KnxManufacturer_M_GALAX_SYSTEM, true - case 173: - return KnxManufacturer_M_DISCH, true - case 174: - return KnxManufacturer_M_AUCOTEAM, true - case 175: - return KnxManufacturer_M_LUXMATE_CONTROLS, true - case 176: - return KnxManufacturer_M_DANFOSS, true - case 177: - return KnxManufacturer_M_AST_GMBH, true - case 178: - return KnxManufacturer_M_WILA_LEUCHTEN, true - case 179: - return KnxManufacturer_M_BPlusB_AUTOMATIONS__UND_STEUERUNGSTECHNIK, true - case 18: - return KnxManufacturer_M_ABB_SCHWEIZ, true - case 180: - return KnxManufacturer_M_LINGG_AND_JANKE, true - case 181: - return KnxManufacturer_M_SAUTER, true - case 182: - return KnxManufacturer_M_SIMU, true - case 183: - return KnxManufacturer_M_THEBEN_HTS_AG, true - case 184: - return KnxManufacturer_M_AMANN_GMBH, true - case 185: - return KnxManufacturer_M_BERG_ENERGIEKONTROLLSYSTEME_GMBH, true - case 186: - return KnxManufacturer_M_HUEPPE_FORM_SONNENSCHUTZSYSTEME_GMBH, true - case 187: - return KnxManufacturer_M_OVENTROP_KG, true - case 188: - return KnxManufacturer_M_GRIESSER_AG, true - case 189: - return KnxManufacturer_M_IPAS_GMBH, true - case 19: - return KnxManufacturer_M_FELLER, true - case 190: - return KnxManufacturer_M_ELERO_GMBH, true - case 191: - return KnxManufacturer_M_ARDAN_PRODUCTION_AND_INDUSTRIAL_CONTROLS_LTD_, true - case 192: - return KnxManufacturer_M_METEC_MESSTECHNIK_GMBH, true - case 193: - return KnxManufacturer_M_ELKA_ELEKTRONIK_GMBH, true - case 194: - return KnxManufacturer_M_ELEKTROANLAGEN_D__NAGEL, true - case 195: - return KnxManufacturer_M_TRIDONIC_BAUELEMENTE_GMBH, true - case 196: - return KnxManufacturer_M_STENGLER_GESELLSCHAFT, true - case 197: - return KnxManufacturer_M_SCHNEIDER_ELECTRIC_MG, true - case 198: - return KnxManufacturer_M_KNX_ASSOCIATION, true - case 199: - return KnxManufacturer_M_VIVO, true - case 2: - return KnxManufacturer_M_ABB, true - case 20: - return KnxManufacturer_M_GLAMOX_AS, true - case 200: - return KnxManufacturer_M_HUGO_MUELLER_GMBH_AND_CO_KG, true - case 201: - return KnxManufacturer_M_SIEMENS_HVAC, true - case 202: - return KnxManufacturer_M_APT, true - case 203: - return KnxManufacturer_M_HIGHDOM, true - case 204: - return KnxManufacturer_M_TOP_SERVICES, true - case 205: - return KnxManufacturer_M_AMBIHOME, true - case 206: - return KnxManufacturer_M_DATEC_ELECTRONIC_AG, true - case 207: - return KnxManufacturer_M_ABUS_SECURITY_CENTER, true - case 208: - return KnxManufacturer_M_LITE_PUTER, true - case 209: - return KnxManufacturer_M_TANTRON_ELECTRONIC, true - case 21: - return KnxManufacturer_M_DEHN_AND_SOEHNE, true - case 210: - return KnxManufacturer_M_INTERRA, true - case 211: - return KnxManufacturer_M_DKX_TECH, true - case 212: - return KnxManufacturer_M_VIATRON, true - case 213: - return KnxManufacturer_M_NAUTIBUS, true - case 214: - return KnxManufacturer_M_ON_SEMICONDUCTOR, true - case 215: - return KnxManufacturer_M_LONGCHUANG, true - case 216: - return KnxManufacturer_M_AIR_ON_AG, true - case 217: - return KnxManufacturer_M_IB_COMPANY_GMBH, true - case 218: - return KnxManufacturer_M_SATION_FACTORY, true - case 219: - return KnxManufacturer_M_AGENTILO_GMBH, true - case 22: - return KnxManufacturer_M_CRABTREE, true - case 220: - return KnxManufacturer_M_MAKEL_ELEKTRIK, true - case 221: - return KnxManufacturer_M_HELIOS_VENTILATOREN, true - case 222: - return KnxManufacturer_M_OTTO_SOLUTIONS_PTE_LTD, true - case 223: - return KnxManufacturer_M_AIRMASTER, true - case 224: - return KnxManufacturer_M_VALLOX_GMBH, true - case 225: - return KnxManufacturer_M_DALITEK, true - case 226: - return KnxManufacturer_M_ASIN, true - case 227: - return KnxManufacturer_M_BRIDGES_INTELLIGENCE_TECHNOLOGY_INC_, true - case 228: - return KnxManufacturer_M_ARBONIA, true - case 229: - return KnxManufacturer_M_KERMI, true - case 23: - return KnxManufacturer_M_EVOKNX, true - case 230: - return KnxManufacturer_M_PROLUX, true - case 231: - return KnxManufacturer_M_CLICHOME, true - case 232: - return KnxManufacturer_M_COMMAX, true - case 233: - return KnxManufacturer_M_EAE, true - case 234: - return KnxManufacturer_M_TENSE, true - case 235: - return KnxManufacturer_M_SEYOUNG_ELECTRONICS, true - case 236: - return KnxManufacturer_M_LIFEDOMUS, true - case 237: - return KnxManufacturer_M_EUROTRONIC_TECHNOLOGY_GMBH, true - case 238: - return KnxManufacturer_M_TCI, true - case 239: - return KnxManufacturer_M_RISHUN_ELECTRONIC, true - case 24: - return KnxManufacturer_M_PAUL_HOCHKOEPPER, true - case 240: - return KnxManufacturer_M_ZIPATO, true - case 241: - return KnxManufacturer_M_CM_SECURITY_GMBH_AND_CO_KG, true - case 242: - return KnxManufacturer_M_QING_CABLES, true - case 243: - return KnxManufacturer_M_LABIO, true - case 244: - return KnxManufacturer_M_COSTER_TECNOLOGIE_ELETTRONICHE_S_P_A_, true - case 245: - return KnxManufacturer_M_E_G_E, true - case 246: - return KnxManufacturer_M_NETXAUTOMATION, true - case 247: - return KnxManufacturer_M_TECALOR, true - case 248: - return KnxManufacturer_M_URMET_ELECTRONICS_HUIZHOU_LTD_, true - case 249: - return KnxManufacturer_M_PEIYING_BUILDING_CONTROL, true - case 25: - return KnxManufacturer_M_ALTENBURGER_ELECTRONIC, true - case 250: - return KnxManufacturer_M_BPT_S_P_A__A_SOCIO_UNICO, true - case 251: - return KnxManufacturer_M_KANONTEC___KANONBUS, true - case 252: - return KnxManufacturer_M_ISER_TECH, true - case 253: - return KnxManufacturer_M_FINELINE, true - case 254: - return KnxManufacturer_M_CP_ELECTRONICS_LTD, true - case 255: - return KnxManufacturer_M_NIKO_SERVODAN_AS, true - case 256: - return KnxManufacturer_M_SIMON_309, true - case 257: - return KnxManufacturer_M_GM_MODULAR_PVT__LTD_, true - case 258: - return KnxManufacturer_M_FU_CHENG_INTELLIGENCE, true - case 259: - return KnxManufacturer_M_NEXKON, true - case 26: - return KnxManufacturer_M_GRAESSLIN, true - case 260: - return KnxManufacturer_M_FEEL_S_R_L, true - case 261: - return KnxManufacturer_M_NOT_ASSIGNED_314, true - case 262: - return KnxManufacturer_M_SHENZHEN_FANHAI_SANJIANG_ELECTRONICS_CO___LTD_, true - case 263: - return KnxManufacturer_M_JIUZHOU_GREEBLE, true - case 264: - return KnxManufacturer_M_AUMUELLER_AUMATIC_GMBH, true - case 265: - return KnxManufacturer_M_ETMAN_ELECTRIC, true - case 266: - return KnxManufacturer_M_BLACK_NOVA, true - case 267: - return KnxManufacturer_M_ZIDATECH_AG, true - case 268: - return KnxManufacturer_M_IDGS_BVBA, true - case 269: - return KnxManufacturer_M_DAKANIMO, true - case 27: - return KnxManufacturer_M_SIMON_42, true - case 270: - return KnxManufacturer_M_TREBOR_AUTOMATION_AB, true - case 271: - return KnxManufacturer_M_SATEL_SP__Z_O_O_, true - case 272: - return KnxManufacturer_M_RUSSOUND__INC_, true - case 273: - return KnxManufacturer_M_MIDEA_HEATING_AND_VENTILATING_EQUIPMENT_CO_LTD, true - case 274: - return KnxManufacturer_M_CONSORZIO_TERRANUOVA, true - case 275: - return KnxManufacturer_M_WOLF_HEIZTECHNIK_GMBH, true - case 276: - return KnxManufacturer_M_SONTEC, true - case 277: - return KnxManufacturer_M_BELCOM_CABLES_LTD_, true - case 278: - return KnxManufacturer_M_GUANGZHOU_SEAWIN_ELECTRICAL_TECHNOLOGIES_CO___LTD_, true - case 279: - return KnxManufacturer_M_ACREL, true - case 28: - return KnxManufacturer_M_VIMAR, true - case 280: - return KnxManufacturer_M_KWC_AQUAROTTER_GMBH, true - case 281: - return KnxManufacturer_M_ORION_SYSTEMS, true - case 282: - return KnxManufacturer_M_SCHRACK_TECHNIK_GMBH, true - case 283: - return KnxManufacturer_M_INSPRID, true - case 284: - return KnxManufacturer_M_SUNRICHER, true - case 285: - return KnxManufacturer_M_MENRED_AUTOMATION_SYSTEMSHANGHAI_CO__LTD_, true - case 286: - return KnxManufacturer_M_AUREX, true - case 287: - return KnxManufacturer_M_JOSEF_BARTHELME_GMBH_AND_CO__KG, true - case 288: - return KnxManufacturer_M_ARCHITECTURE_NUMERIQUE, true - case 289: - return KnxManufacturer_M_UP_GROUP, true - case 29: - return KnxManufacturer_M_MOELLER_GEBAEUDEAUTOMATION_KG, true - case 290: - return KnxManufacturer_M_TEKNOS_AVINNO, true - case 291: - return KnxManufacturer_M_NINGBO_DOOYA_MECHANIC_AND_ELECTRONIC_TECHNOLOGY, true - case 292: - return KnxManufacturer_M_THERMOKON_SENSORTECHNIK_GMBH, true - case 293: - return KnxManufacturer_M_BELIMO_AUTOMATION_AG, true - case 294: - return KnxManufacturer_M_ZEHNDER_GROUP_INTERNATIONAL_AG, true - case 295: - return KnxManufacturer_M_SKS_KINKEL_ELEKTRONIK, true - case 296: - return KnxManufacturer_M_ECE_WURMITZER_GMBH, true - case 297: - return KnxManufacturer_M_LARS, true - case 298: - return KnxManufacturer_M_URC, true - case 299: - return KnxManufacturer_M_LIGHTCONTROL, true - case 3: - return KnxManufacturer_M_ALBRECHT_JUNG, true - case 30: - return KnxManufacturer_M_ELTAKO, true - case 300: - return KnxManufacturer_M_SHENZHEN_YM, true - case 301: - return KnxManufacturer_M_MEAN_WELL_ENTERPRISES_CO__LTD_, true - case 302: - return KnxManufacturer_M_OSIX, true - case 303: - return KnxManufacturer_M_AYPRO_TECHNOLOGY, true - case 304: - return KnxManufacturer_M_HEFEI_ECOLITE_SOFTWARE, true - case 305: - return KnxManufacturer_M_ENNO, true - case 306: - return KnxManufacturer_M_OHOSURE, true - case 307: - return KnxManufacturer_M_GAREFOWL, true - case 308: - return KnxManufacturer_M_GEZE, true - case 309: - return KnxManufacturer_M_LG_ELECTRONICS_INC_, true - case 31: - return KnxManufacturer_M_BOSCH_SIEMENS_HAUSHALTSGERAETE, true - case 310: - return KnxManufacturer_M_SMC_INTERIORS, true - case 311: - return KnxManufacturer_M_NOT_ASSIGNED_364, true - case 312: - return KnxManufacturer_M_SCS_CABLE, true - case 313: - return KnxManufacturer_M_HOVAL, true - case 314: - return KnxManufacturer_M_CANST, true - case 315: - return KnxManufacturer_M_HANGZHOU_BERLIN, true - case 316: - return KnxManufacturer_M_EVN_LICHTTECHNIK, true - case 317: - return KnxManufacturer_M_RUTEC, true - case 318: - return KnxManufacturer_M_FINDER, true - case 319: - return KnxManufacturer_M_FUJITSU_GENERAL_LIMITED, true - case 32: - return KnxManufacturer_M_RITTO_GMBHANDCO_KG, true - case 320: - return KnxManufacturer_M_ZF_FRIEDRICHSHAFEN_AG, true - case 321: - return KnxManufacturer_M_CREALED, true - case 322: - return KnxManufacturer_M_MILES_MAGIC_AUTOMATION_PRIVATE_LIMITED, true - case 323: - return KnxManufacturer_M_EPlus, true - case 324: - return KnxManufacturer_M_ITALCOND, true - case 325: - return KnxManufacturer_M_SATION, true - case 326: - return KnxManufacturer_M_NEWBEST, true - case 327: - return KnxManufacturer_M_GDS_DIGITAL_SYSTEMS, true - case 328: - return KnxManufacturer_M_IDDERO, true - case 329: - return KnxManufacturer_M_MBNLED, true - case 33: - return KnxManufacturer_M_POWER_CONTROLS, true - case 330: - return KnxManufacturer_M_VITRUM, true - case 331: - return KnxManufacturer_M_EKEY_BIOMETRIC_SYSTEMS_GMBH, true - case 332: - return KnxManufacturer_M_AMC, true - case 333: - return KnxManufacturer_M_TRILUX_GMBH_AND_CO__KG, true - case 334: - return KnxManufacturer_M_WEXCEDO, true - case 335: - return KnxManufacturer_M_VEMER_SPA, true - case 336: - return KnxManufacturer_M_ALEXANDER_BUERKLE_GMBH_AND_CO_KG, true - case 337: - return KnxManufacturer_M_CITRON, true - case 338: - return KnxManufacturer_M_SHENZHEN_HEGUANG, true - case 339: - return KnxManufacturer_M_NOT_ASSIGNED_392, true - case 34: - return KnxManufacturer_M_ZUMTOBEL, true - case 340: - return KnxManufacturer_M_TRANE_B_V_B_A, true - case 341: - return KnxManufacturer_M_CAREL, true - case 342: - return KnxManufacturer_M_PROLITE_CONTROLS, true - case 343: - return KnxManufacturer_M_BOSMER, true - case 344: - return KnxManufacturer_M_EUCHIPS, true - case 345: - return KnxManufacturer_M_CONNECT_THINKA_CONNECT, true - case 346: - return KnxManufacturer_M_PEAKNX_A_DOGAWIST_COMPANY, true - case 347: - return KnxManufacturer_M_ACEMATIC, true - case 348: - return KnxManufacturer_M_ELAUSYS, true - case 349: - return KnxManufacturer_M_ITK_ENGINEERING_AG, true - case 35: - return KnxManufacturer_M_PHOENIX_CONTACT, true - case 350: - return KnxManufacturer_M_INTEGRA_METERING_AG, true - case 351: - return KnxManufacturer_M_FMS_HOSPITALITY_PTE_LTD, true - case 352: - return KnxManufacturer_M_NUVO, true - case 353: - return KnxManufacturer_M_U__LUX_GMBH, true - case 354: - return KnxManufacturer_M_BRUMBERG_LEUCHTEN, true - case 355: - return KnxManufacturer_M_LIME, true - case 356: - return KnxManufacturer_M_GREAT_EMPIRE_INTERNATIONAL_GROUP_CO___LTD_, true - case 357: - return KnxManufacturer_M_KAVOSHPISHRO_ASIA, true - case 358: - return KnxManufacturer_M_V2_SPA, true - case 359: - return KnxManufacturer_M_JOHNSON_CONTROLS, true - case 36: - return KnxManufacturer_M_WAGO_KONTAKTTECHNIK, true - case 360: - return KnxManufacturer_M_ARKUD, true - case 361: - return KnxManufacturer_M_IRIDIUM_LTD_, true - case 362: - return KnxManufacturer_M_BSMART, true - case 363: - return KnxManufacturer_M_BAB_TECHNOLOGIE_GMBH, true - case 364: - return KnxManufacturer_M_NICE_SPA, true - case 365: - return KnxManufacturer_M_REDFISH_GROUP_PTY_LTD, true - case 366: - return KnxManufacturer_M_SABIANA_SPA, true - case 367: - return KnxManufacturer_M_UBEE_INTERACTIVE_EUROPE, true - case 368: - return KnxManufacturer_M_REXEL, true - case 369: - return KnxManufacturer_M_GES_TEKNIK_A_S_, true - case 37: - return KnxManufacturer_M_KNXPRESSO, true - case 370: - return KnxManufacturer_M_AVE_S_P_A_, true - case 371: - return KnxManufacturer_M_ZHUHAI_LTECH_TECHNOLOGY_CO___LTD_, true - case 372: - return KnxManufacturer_M_ARCOM, true - case 373: - return KnxManufacturer_M_VIA_TECHNOLOGIES__INC_, true - case 374: - return KnxManufacturer_M_FEELSMART_, true - case 375: - return KnxManufacturer_M_SUPCON, true - case 376: - return KnxManufacturer_M_MANIC, true - case 377: - return KnxManufacturer_M_TDE_GMBH, true - case 378: - return KnxManufacturer_M_NANJING_SHUFAN_INFORMATION_TECHNOLOGY_CO__LTD_, true - case 379: - return KnxManufacturer_M_EWTECH, true - case 38: - return KnxManufacturer_M_WIELAND_ELECTRIC, true - case 380: - return KnxManufacturer_M_KLUGER_AUTOMATION_GMBH, true - case 381: - return KnxManufacturer_M_JOONGANG_CONTROL, true - case 382: - return KnxManufacturer_M_GREENCONTROLS_TECHNOLOGY_SDN__BHD_, true - case 383: - return KnxManufacturer_M_IME_S_P_A_, true - case 384: - return KnxManufacturer_M_SICHUAN_HAODING, true - case 385: - return KnxManufacturer_M_MINDJAGA_LTD_, true - case 386: - return KnxManufacturer_M_RUILI_SMART_CONTROL, true - case 387: - return KnxManufacturer_M_CODESYS_GMBH, true - case 388: - return KnxManufacturer_M_MOORGEN_DEUTSCHLAND_GMBH, true - case 389: - return KnxManufacturer_M_CULLMANN_TECH, true - case 39: - return KnxManufacturer_M_HERMANN_KLEINHUIS, true - case 390: - return KnxManufacturer_M_EYRISE_B_V, true - case 391: - return KnxManufacturer_M_ABEGO, true - case 392: - return KnxManufacturer_M_MYGEKKO, true - case 393: - return KnxManufacturer_M_ERGO3_SARL, true - case 394: - return KnxManufacturer_M_STMICROELECTRONICS_INTERNATIONAL_N_V_, true - case 395: - return KnxManufacturer_M_CJC_SYSTEMS, true - case 396: - return KnxManufacturer_M_SUDOKU, true - case 397: - return KnxManufacturer_M_AZ_E_LITE_PTE_LTD, true - case 398: - return KnxManufacturer_M_ARLIGHT, true - case 399: - return KnxManufacturer_M_GRUENBECK_WASSERAUFBEREITUNG_GMBH, true - case 4: - return KnxManufacturer_M_BTICINO, true - case 40: - return KnxManufacturer_M_STIEBEL_ELTRON, true - case 400: - return KnxManufacturer_M_MODULE_ELECTRONIC, true - case 401: - return KnxManufacturer_M_KOPLAT, true - case 402: - return KnxManufacturer_M_GUANGZHOU_LETOUR_LIFE_TECHNOLOGY_CO___LTD, true - case 403: - return KnxManufacturer_M_ILEVIA, true - case 404: - return KnxManufacturer_M_LN_SYSTEMTEQ, true - case 405: - return KnxManufacturer_M_HISENSE_SMARTHOME, true - case 406: - return KnxManufacturer_M_FLINK_AUTOMATION_SYSTEM, true - case 407: - return KnxManufacturer_M_XXTER_BV, true - case 408: - return KnxManufacturer_M_LYNXUS_TECHNOLOGY, true - case 409: - return KnxManufacturer_M_ROBOT_S_A_, true - case 41: - return KnxManufacturer_M_TEHALIT, true - case 410: - return KnxManufacturer_M_SHENZHEN_ATTE_SMART_LIFE_CO__LTD_, true - case 411: - return KnxManufacturer_M_NOBLESSE, true - case 412: - return KnxManufacturer_M_ADVANCED_DEVICES, true - case 413: - return KnxManufacturer_M_ATRINA_BUILDING_AUTOMATION_CO__LTD, true - case 414: - return KnxManufacturer_M_GUANGDONG_DAMING_LAFFEY_ELECTRIC_CO___LTD_, true - case 415: - return KnxManufacturer_M_WESTERSTRAND_URFABRIK_AB, true - case 416: - return KnxManufacturer_M_CONTROL4_CORPORATE, true - case 417: - return KnxManufacturer_M_ONTROL, true - case 418: - return KnxManufacturer_M_STARNET, true - case 419: - return KnxManufacturer_M_BETA_CAVI, true - case 42: - return KnxManufacturer_M_THEBEN_AG, true - case 420: - return KnxManufacturer_M_EASEMORE, true - case 421: - return KnxManufacturer_M_VIVALDI_SRL, true - case 422: - return KnxManufacturer_M_GREE_ELECTRIC_APPLIANCES_INC__OF_ZHUHAI, true - case 423: - return KnxManufacturer_M_HWISCON, true - case 424: - return KnxManufacturer_M_SHANGHAI_ELECON_INTELLIGENT_TECHNOLOGY_CO___LTD_, true - case 425: - return KnxManufacturer_M_KAMPMANN, true - case 426: - return KnxManufacturer_M_IMPOLUX_GMBH_LEDIMAX, true - case 427: - return KnxManufacturer_M_EVAUX, true - case 428: - return KnxManufacturer_M_WEBRO_CABLES_AND_CONNECTORS_LIMITED, true - case 429: - return KnxManufacturer_M_SHANGHAI_E_TECH_SOLUTION, true - case 43: - return KnxManufacturer_M_WILHELM_RUTENBECK, true - case 430: - return KnxManufacturer_M_GUANGZHOU_HOKO_ELECTRIC_CO__LTD_, true - case 431: - return KnxManufacturer_M_LAMMIN_HIGH_TECH_CO__LTD, true - case 432: - return KnxManufacturer_M_SHENZHEN_MERRYTEK_TECHNOLOGY_CO___LTD, true - case 433: - return KnxManufacturer_M_I_LUXUS, true - case 434: - return KnxManufacturer_M_ELMOS_SEMICONDUCTOR_AG, true - case 435: - return KnxManufacturer_M_EMCOM_TECHNOLOGY_INC, true - case 436: - return KnxManufacturer_M_PROJECT_INNOVATIONS_GMBH, true - case 437: - return KnxManufacturer_M_ITC, true - case 438: - return KnxManufacturer_M_ABB_LV_INSTALLATION_MATERIALS_COMPANY_LTD__BEIJING, true - case 439: - return KnxManufacturer_M_MAICO, true - case 44: - return KnxManufacturer_M_WINKHAUS, true - case 440: - return KnxManufacturer_M_ELAN_SRL, true - case 441: - return KnxManufacturer_M_MINHHA_TECHNOLOGY_CO__LTD, true - case 442: - return KnxManufacturer_M_ZHEJIANG_TIANJIE_INDUSTRIAL_CORP_, true - case 443: - return KnxManufacturer_M_IAUTOMATION_PTY_LIMITED, true - case 444: - return KnxManufacturer_M_EXTRON, true - case 445: - return KnxManufacturer_M_FREEDOMPRO, true - case 446: - return KnxManufacturer_M_ONEHOME, true - case 447: - return KnxManufacturer_M_EOS_SAUNATECHNIK_GMBH, true - case 448: - return KnxManufacturer_M_KUSATEK_GMBH, true - case 449: - return KnxManufacturer_M_EISBAER_SCADA, true - case 45: - return KnxManufacturer_M_ROBERT_BOSCH, true - case 450: - return KnxManufacturer_M_AUTOMATISMI_BENINCA_S_P_A_, true - case 451: - return KnxManufacturer_M_BLENDOM, true - case 452: - return KnxManufacturer_M_MADEL_AIR_TECHNICAL_DIFFUSION, true - case 453: - return KnxManufacturer_M_NIKO, true - case 454: - return KnxManufacturer_M_BOSCH_REXROTH_AG, true - case 455: - return KnxManufacturer_M_CANDM_PRODUCTS, true - case 456: - return KnxManufacturer_M_HOERMANN_KG_VERKAUFSGESELLSCHAFT, true - case 457: - return KnxManufacturer_M_SHANGHAI_RAJAYASA_CO__LTD, true - case 458: - return KnxManufacturer_M_SUZUKI, true - case 459: - return KnxManufacturer_M_SILENT_GLISS_INTERNATIONAL_LTD_, true - case 46: - return KnxManufacturer_M_SOMFY, true - case 460: - return KnxManufacturer_M_BEE_CONTROLS_ADGSC_GROUP, true - case 461: - return KnxManufacturer_M_XDTECGMBH, true - case 462: - return KnxManufacturer_M_OSRAM, true - case 463: - return KnxManufacturer_M_LEBENOR, true - case 464: - return KnxManufacturer_M_AUTOMANENG, true - case 465: - return KnxManufacturer_M_HONEYWELL_AUTOMATION_SOLUTION_CONTROLCHINA, true - case 466: - return KnxManufacturer_M_HANGZHOU_BINTHEN_INTELLIGENCE_TECHNOLOGY_CO__LTD, true - case 467: - return KnxManufacturer_M_ETA_HEIZTECHNIK, true - case 468: - return KnxManufacturer_M_DIVUS_GMBH, true - case 469: - return KnxManufacturer_M_NANJING_TAIJIESAI_INTELLIGENT_TECHNOLOGY_CO__LTD_, true - case 47: - return KnxManufacturer_M_WOERTZ, true - case 470: - return KnxManufacturer_M_LUNATONE, true - case 471: - return KnxManufacturer_M_ZHEJIANG_SCTECH_BUILDING_INTELLIGENT, true - case 472: - return KnxManufacturer_M_FOSHAN_QITE_TECHNOLOGY_CO___LTD_, true - case 473: - return KnxManufacturer_M_NOKE, true - case 474: - return KnxManufacturer_M_LANDCOM, true - case 475: - return KnxManufacturer_M_STORK_AS, true - case 476: - return KnxManufacturer_M_HANGZHOU_SHENDU_TECHNOLOGY_CO___LTD_, true - case 477: - return KnxManufacturer_M_COOLAUTOMATION, true - case 478: - return KnxManufacturer_M_APRSTERN, true - case 479: - return KnxManufacturer_M_SONNEN, true - case 48: - return KnxManufacturer_M_VIESSMANN_WERKE, true - case 480: - return KnxManufacturer_M_DNAKE, true - case 481: - return KnxManufacturer_M_NEUBERGER_GEBAEUDEAUTOMATION_GMBH, true - case 482: - return KnxManufacturer_M_STILIGER, true - case 483: - return KnxManufacturer_M_BERGHOF_AUTOMATION_GMBH, true - case 484: - return KnxManufacturer_M_TOTAL_AUTOMATION_AND_CONTROLS_GMBH, true - case 485: - return KnxManufacturer_M_DOVIT, true - case 486: - return KnxManufacturer_M_INSTALIGHTING_GMBH, true - case 487: - return KnxManufacturer_M_UNI_TEC, true - case 488: - return KnxManufacturer_M_CASATUNES, true - case 489: - return KnxManufacturer_M_EMT, true - case 49: - return KnxManufacturer_M_IMI_HYDRONIC_ENGINEERING, true - case 490: - return KnxManufacturer_M_SENFFICIENT, true - case 491: - return KnxManufacturer_M_AUROLITE_ELECTRICAL_PANYU_GUANGZHOU_LIMITED, true - case 492: - return KnxManufacturer_M_ABB_XIAMEN_SMART_TECHNOLOGY_CO___LTD_, true - case 493: - return KnxManufacturer_M_SAMSON_ELECTRIC_WIRE, true - case 494: - return KnxManufacturer_M_T_TOUCHING, true - case 495: - return KnxManufacturer_M_CORE_SMART_HOME, true - case 496: - return KnxManufacturer_M_GREENCONNECT_SOLUTIONS_SA, true - case 497: - return KnxManufacturer_M_ELETTRONICA_CONDUTTORI, true - case 498: - return KnxManufacturer_M_MKFC, true - case 499: - return KnxManufacturer_M_AUTOMATIONPlus, true - case 5: - return KnxManufacturer_M_BERKER, true - case 50: - return KnxManufacturer_M_JOH__VAILLANT, true - case 500: - return KnxManufacturer_M_BLUE_AND_RED, true - case 501: - return KnxManufacturer_M_FROGBLUE, true - case 502: - return KnxManufacturer_M_SAVESOR, true - case 503: - return KnxManufacturer_M_APP_TECH, true - case 504: - return KnxManufacturer_M_SENSORTEC_AG, true - case 505: - return KnxManufacturer_M_NYSA_TECHNOLOGY_AND_SOLUTIONS, true - case 506: - return KnxManufacturer_M_FARADITE, true - case 507: - return KnxManufacturer_M_OPTIMUS, true - case 508: - return KnxManufacturer_M_KTS_S_R_L_, true - case 509: - return KnxManufacturer_M_RAMCRO_SPA, true - case 51: - return KnxManufacturer_M_AMP_DEUTSCHLAND, true - case 510: - return KnxManufacturer_M_WUHAN_WISECREATE_UNIVERSE_TECHNOLOGY_CO___LTD, true - case 511: - return KnxManufacturer_M_BEMI_SMART_HOME_LTD, true - case 512: - return KnxManufacturer_M_ARDOMUS, true - case 513: - return KnxManufacturer_M_CHANGXING, true - case 514: - return KnxManufacturer_M_E_CONTROLS, true - case 515: - return KnxManufacturer_M_AIB_TECHNOLOGY, true - case 516: - return KnxManufacturer_M_NVC, true - case 517: - return KnxManufacturer_M_KBOX, true - case 518: - return KnxManufacturer_M_CNS, true - case 519: - return KnxManufacturer_M_TYBA, true - case 52: - return KnxManufacturer_M_BOSCH_THERMOTECHNIK_GMBH, true - case 520: - return KnxManufacturer_M_ATREL, true - case 521: - return KnxManufacturer_M_SIMON_ELECTRIC_CHINA_CO___LTD, true - case 522: - return KnxManufacturer_M_KORDZ_GROUP, true - case 523: - return KnxManufacturer_M_ND_ELECTRIC, true - case 524: - return KnxManufacturer_M_CONTROLIUM, true - case 525: - return KnxManufacturer_M_FAMO_GMBH_AND_CO__KG, true - case 526: - return KnxManufacturer_M_CDN_SMART, true - case 527: - return KnxManufacturer_M_HESTON, true - case 528: - return KnxManufacturer_M_ESLA_CONEXIONES_S_L_, true - case 529: - return KnxManufacturer_M_WEISHAUPT, true - case 53: - return KnxManufacturer_M_SEF___ECOTEC, true - case 530: - return KnxManufacturer_M_ASTRUM_TECHNOLOGY, true - case 531: - return KnxManufacturer_M_WUERTH_ELEKTRONIK_STELVIO_KONTEK_S_P_A_, true - case 532: - return KnxManufacturer_M_NANOTECO_CORPORATION, true - case 533: - return KnxManufacturer_M_NIETIAN, true - case 534: - return KnxManufacturer_M_SUMSIR, true - case 535: - return KnxManufacturer_M_ORBIS_TECNOLOGIA_ELECTRICA_SA, true - case 536: - return KnxManufacturer_M_NANJING_ZHONGYI_IOT_TECHNOLOGY_CO___LTD_, true - case 537: - return KnxManufacturer_M_ANLIPS, true - case 538: - return KnxManufacturer_M_GUANGDONG_PAK_CORPORATION_CO___LTD, true - case 539: - return KnxManufacturer_M_BVK_TECHNOLOGY, true - case 54: - return KnxManufacturer_M_DORMA_GMBH_Plus_CO__KG, true - case 540: - return KnxManufacturer_M_SOLOMIO_SRL, true - case 541: - return KnxManufacturer_M_DOMOTICA_LABS, true - case 542: - return KnxManufacturer_M_NVC_INTERNATIONAL, true - case 543: - return KnxManufacturer_M_BA, true - case 544: - return KnxManufacturer_M_IRIS_CERAMICA_GROUP, true - case 545: - return KnxManufacturer_M_WIREEO, true - case 546: - return KnxManufacturer_M_NVCLIGHTING, true - case 547: - return KnxManufacturer_M_JINAN_TIAN_DA_SHENG_INFORMATION_TECHNOLOGY_CO_, true - case 548: - return KnxManufacturer_M_ARMITI_TRADING, true - case 549: - return KnxManufacturer_M_ELEK, true - case 55: - return KnxManufacturer_M_WINDOWMASTER_AS, true - case 550: - return KnxManufacturer_M_ACCORDIA_SA, true - case 551: - return KnxManufacturer_M_OURICAN, true - case 552: - return KnxManufacturer_M_INLIWOSE, true - case 553: - return KnxManufacturer_M_BOSCH_SHANGHAI_SMART_LIFE_TECHNOLOGY_LTD_, true - case 554: - return KnxManufacturer_M_SHK_KNX, true - case 555: - return KnxManufacturer_M_AMPIO, true - case 556: - return KnxManufacturer_M_MINGXING_WISDOM, true - case 557: - return KnxManufacturer_M_ALTEN_SW_GMBH, true - case 558: - return KnxManufacturer_M_V_Y_C_SRL, true - case 559: - return KnxManufacturer_M_TERMINUS_GROUP, true - case 56: - return KnxManufacturer_M_WALTHER_WERKE, true - case 560: - return KnxManufacturer_M_WONDERFUL_CITY_TECHNOLOGY, true - case 561: - return KnxManufacturer_M_QBICTECHNOLOGY, true - case 562: - return KnxManufacturer_M_EMBEDDED_AUTOMATION_EQUIPMENT_SHANGHAI_LIMITED, true - case 563: - return KnxManufacturer_M_ONEWORK, true - case 564: - return KnxManufacturer_M_PL_LINK, true - case 565: - return KnxManufacturer_M_FASEL_GMBH_ELEKTRONIK, true - case 566: - return KnxManufacturer_M_GOLDENHOME_SMART, true - case 567: - return KnxManufacturer_M_GOLDMEDAL, true - case 568: - return KnxManufacturer_M_CannX, true - case 569: - return KnxManufacturer_M_EGI___EARTH_GOODNESS, true - case 57: - return KnxManufacturer_M_ORAS, true - case 570: - return KnxManufacturer_M_VIEGA_GMBH_AND_CO__KG, true - case 571: - return KnxManufacturer_M_FREDON_DIGITAL_BUILDINGS, true - case 572: - return KnxManufacturer_M_HELUKABEL_THAILAND_CO__LTD_, true - case 573: - return KnxManufacturer_M_ACE_TECHNOLOGY, true - case 574: - return KnxManufacturer_M_MEX_ELECTRIC_TECHNOLOGY_SHANGHAI_CO___LTD, true - case 575: - return KnxManufacturer_M_SUMAMO, true - case 576: - return KnxManufacturer_M_SVIT, true - case 577: - return KnxManufacturer_M_TECGET, true - case 578: - return KnxManufacturer_M_XEROPOINT, true - case 579: - return KnxManufacturer_M_HONEYWELL_BUILDING_TECHNOLOGIES, true - case 58: - return KnxManufacturer_M_DAETWYLER, true - case 580: - return KnxManufacturer_M_COMFORTCLICK, true - case 581: - return KnxManufacturer_M_DORBAS_ELECTRIC, true - case 582: - return KnxManufacturer_M_REMKO_GMBH_AND_CO__KG, true - case 583: - return KnxManufacturer_M_SHENZHEN_CONGXUN_INTELLIGENT_TECHNOLOGY_CO___LTD, true - case 584: - return KnxManufacturer_M_ANDAS, true - case 585: - return KnxManufacturer_M_HEFEI_CHUANG_YUE_INTELLIGENT_TECHNOLOGY_CO__LTD, true - case 586: - return KnxManufacturer_M_LARFE, true - case 587: - return KnxManufacturer_M_DONGGUAN_MUHCCI_ELECTRICAL, true - case 588: - return KnxManufacturer_M_STEC, true - case 589: - return KnxManufacturer_M_ARIGO_SOFTWARE_GMBH, true - case 59: - return KnxManufacturer_M_ELECTRAK, true - case 590: - return KnxManufacturer_M_FEISHELEC, true - case 591: - return KnxManufacturer_M_GORDIC, true - case 592: - return KnxManufacturer_M_DELTA_ELECTRONICS, true - case 593: - return KnxManufacturer_M_SHANGHAI_LEWIN_INTELLIGENT_TECHNOLOGY_CO__LTD_, true - case 594: - return KnxManufacturer_M_KG_POWER, true - case 595: - return KnxManufacturer_M_ZHEJIANG_MOORGEN_INTELLIGENT_TECHNOLOGY_CO___LTD, true - case 596: - return KnxManufacturer_M_GUANGDONG_KANWAY, true - case 597: - return KnxManufacturer_M_RAMIREZ_ENGINEERING_GMBH, true - case 598: - return KnxManufacturer_M_ZHONGSHAN_TAIYANG_IMPANDEXP__CO_LTD, true - case 599: - return KnxManufacturer_M_VIHAN_ELECTRIC_PVT_LTD, true - case 6: - return KnxManufacturer_M_BUSCH_JAEGER_ELEKTRO, true - case 60: - return KnxManufacturer_M_TECHEM, true - case 600: - return KnxManufacturer_M_SPLENDID_MINDS_GMBH, true - case 601: - return KnxManufacturer_M_ESTADA, true - case 602: - return KnxManufacturer_M_ZHONGYUNXINZHIKONGGUJITUANYOUXIANGONGSI, true - case 603: - return KnxManufacturer_M_STUHL_REGELSYSTEME_GMBH, true - case 604: - return KnxManufacturer_M_SHENZHEN_GLUCK_TECHNOLOGY_CO___LTD, true - case 605: - return KnxManufacturer_M_GAIMEX, true - case 606: - return KnxManufacturer_M_B3_INTERNATIONAL_S_R_L, true - case 607: - return KnxManufacturer_M_MM_ELECTRO, true - case 608: - return KnxManufacturer_M_CASCODA, true - case 609: - return KnxManufacturer_M_XIAMEN_INTRETECH_INC_, true - case 61: - return KnxManufacturer_M_SCHNEIDER_ELECTRIC_INDUSTRIES_SAS, true - case 610: - return KnxManufacturer_M_KILOELEC_TECHNOLOGY, true - case 611: - return KnxManufacturer_M_INYX, true - case 612: - return KnxManufacturer_M_SMART_BUILDING_SERVICES_GMBH, true - case 613: - return KnxManufacturer_M_BSS_GMBH, true - case 614: - return KnxManufacturer_M_ABB___RESERVED, true - case 615: - return KnxManufacturer_M_BUSCH_JAEGER_ELEKTRO___RESERVED, true - case 62: - return KnxManufacturer_M_WHD_WILHELM_HUBER_Plus_SOEHNE, true - case 63: - return KnxManufacturer_M_BISCHOFF_ELEKTRONIK, true - case 64: - return KnxManufacturer_M_JEPAZ, true - case 65: - return KnxManufacturer_M_RTS_AUTOMATION, true - case 66: - return KnxManufacturer_M_EIBMARKT_GMBH, true - case 67: - return KnxManufacturer_M_WAREMA_RENKHOFF_SE, true - case 68: - return KnxManufacturer_M_EELECTRON, true - case 69: - return KnxManufacturer_M_BELDEN_WIRE_AND_CABLE_B_V_, true - case 7: - return KnxManufacturer_M_GIRA_GIERSIEPEN, true - case 70: - return KnxManufacturer_M_BECKER_ANTRIEBE_GMBH, true - case 71: - return KnxManufacturer_M_J_STEHLEPlusSOEHNE_GMBH, true - case 72: - return KnxManufacturer_M_AGFEO, true - case 73: - return KnxManufacturer_M_ZENNIO, true - case 74: - return KnxManufacturer_M_TAPKO_TECHNOLOGIES, true - case 75: - return KnxManufacturer_M_HDL, true - case 76: - return KnxManufacturer_M_UPONOR, true - case 77: - return KnxManufacturer_M_SE_LIGHTMANAGEMENT_AG, true - case 78: - return KnxManufacturer_M_ARCUS_EDS, true - case 79: - return KnxManufacturer_M_INTESIS, true - case 8: - return KnxManufacturer_M_HAGER_ELECTRO, true - case 80: - return KnxManufacturer_M_HERHOLDT_CONTROLS_SRL, true - case 81: - return KnxManufacturer_M_NIKO_ZUBLIN, true - case 82: - return KnxManufacturer_M_DURABLE_TECHNOLOGIES, true - case 83: - return KnxManufacturer_M_INNOTEAM, true - case 84: - return KnxManufacturer_M_ISE_GMBH, true - case 85: - return KnxManufacturer_M_TEAM_FOR_TRONICS, true - case 86: - return KnxManufacturer_M_CIAT, true - case 87: - return KnxManufacturer_M_REMEHA_BV, true - case 88: - return KnxManufacturer_M_ESYLUX, true - case 89: - return KnxManufacturer_M_BASALTE, true - case 9: - return KnxManufacturer_M_INSTA_GMBH, true - case 90: - return KnxManufacturer_M_VESTAMATIC, true - case 91: - return KnxManufacturer_M_MDT_TECHNOLOGIES, true - case 92: - return KnxManufacturer_M_WARENDORFER_KUECHEN_GMBH, true - case 93: - return KnxManufacturer_M_VIDEO_STAR, true - case 94: - return KnxManufacturer_M_SITEK, true - case 95: - return KnxManufacturer_M_CONTROLTRONIC, true - case 96: - return KnxManufacturer_M_FUNCTION_TECHNOLOGY, true - case 97: - return KnxManufacturer_M_AMX, true - case 98: - return KnxManufacturer_M_ELDAT, true - case 99: - return KnxManufacturer_M_PANASONIC, true + case 437: { /* '437' */ + return "Itc" + } + case 438: { /* '438' */ + return "ABB LV Installation Materials Company Ltd, Beijing" + } + case 439: { /* '439' */ + return "Maico" + } + case 44: { /* '44' */ + return "Winkhaus" + } + case 440: { /* '440' */ + return "ELAN SRL" + } + case 441: { /* '441' */ + return "MinhHa Technology co.,Ltd" + } + case 442: { /* '442' */ + return "Zhejiang Tianjie Industrial CORP." + } + case 443: { /* '443' */ + return "iAutomation Pty Limited" + } + case 444: { /* '444' */ + return "Extron" + } + case 445: { /* '445' */ + return "Freedompro" + } + case 446: { /* '446' */ + return "1Home" + } + case 447: { /* '447' */ + return "EOS Saunatechnik GmbH" + } + case 448: { /* '448' */ + return "KUSATEK GmbH" + } + case 449: { /* '449' */ + return "EisBär Scada" + } + case 45: { /* '45' */ + return "Robert Bosch" + } + case 450: { /* '450' */ + return "AUTOMATISMI BENINCA S.P.A." + } + case 451: { /* '451' */ + return "Blendom" + } + case 452: { /* '452' */ + return "Madel Air Technical diffusion" + } + case 453: { /* '453' */ + return "NIKO" + } + case 454: { /* '454' */ + return "Bosch Rexroth AG" + } + case 455: { /* '455' */ + return "C&M Products" + } + case 456: { /* '456' */ + return "Hörmann KG Verkaufsgesellschaft" + } + case 457: { /* '457' */ + return "Shanghai Rajayasa co.,LTD" + } + case 458: { /* '458' */ + return "SUZUKI" + } + case 459: { /* '459' */ + return "Silent Gliss International Ltd." + } + case 46: { /* '46' */ + return "Somfy" + } + case 460: { /* '460' */ + return "BEE Controls (ADGSC Group)" + } + case 461: { /* '461' */ + return "xDTecGmbH" + } + case 462: { /* '462' */ + return "OSRAM" + } + case 463: { /* '463' */ + return "Lebenor" + } + case 464: { /* '464' */ + return "automaneng" + } + case 465: { /* '465' */ + return "Honeywell Automation Solution control(China)" + } + case 466: { /* '466' */ + return "Hangzhou binthen Intelligence Technology Co.,Ltd" + } + case 467: { /* '467' */ + return "ETA Heiztechnik" + } + case 468: { /* '468' */ + return "DIVUS GmbH" + } + case 469: { /* '469' */ + return "Nanjing Taijiesai Intelligent Technology Co. Ltd." + } + case 47: { /* '47' */ + return "Woertz" + } + case 470: { /* '470' */ + return "Lunatone" + } + case 471: { /* '471' */ + return "ZHEJIANG SCTECH BUILDING INTELLIGENT" + } + case 472: { /* '472' */ + return "Foshan Qite Technology Co., Ltd." + } + case 473: { /* '473' */ + return "NOKE" + } + case 474: { /* '474' */ + return "LANDCOM" + } + case 475: { /* '475' */ + return "Stork AS" + } + case 476: { /* '476' */ + return "Hangzhou Shendu Technology Co., Ltd." + } + case 477: { /* '477' */ + return "CoolAutomation" + } + case 478: { /* '478' */ + return "Aprstern" + } + case 479: { /* '479' */ + return "sonnen" + } + case 48: { /* '48' */ + return "Viessmann Werke" + } + case 480: { /* '480' */ + return "DNAKE" + } + case 481: { /* '481' */ + return "Neuberger Gebäudeautomation GmbH" + } + case 482: { /* '482' */ + return "Stiliger" + } + case 483: { /* '483' */ + return "Berghof Automation GmbH" + } + case 484: { /* '484' */ + return "Total Automation and controls GmbH" + } + case 485: { /* '485' */ + return "dovit" + } + case 486: { /* '486' */ + return "Instalighting GmbH" + } + case 487: { /* '487' */ + return "UNI-TEC" + } + case 488: { /* '488' */ + return "CasaTunes" + } + case 489: { /* '489' */ + return "EMT" + } + case 49: { /* '49' */ + return "IMI Hydronic Engineering" + } + case 490: { /* '490' */ + return "Senfficient" + } + case 491: { /* '491' */ + return "Aurolite electrical panyu guangzhou limited" + } + case 492: { /* '492' */ + return "ABB Xiamen Smart Technology Co., Ltd." + } + case 493: { /* '493' */ + return "Samson Electric Wire" + } + case 494: { /* '494' */ + return "T-Touching" + } + case 495: { /* '495' */ + return "Core Smart Home" + } + case 496: { /* '496' */ + return "GreenConnect Solutions SA" + } + case 497: { /* '497' */ + return "ELETTRONICA CONDUTTORI" + } + case 498: { /* '498' */ + return "MKFC" + } + case 499: { /* '499' */ + return "Automation+" + } + case 5: { /* '5' */ + return "Berker" + } + case 50: { /* '50' */ + return "Joh. Vaillant" + } + case 500: { /* '500' */ + return "blue and red" + } + case 501: { /* '501' */ + return "frogblue" + } + case 502: { /* '502' */ + return "SAVESOR" + } + case 503: { /* '503' */ + return "App Tech" + } + case 504: { /* '504' */ + return "sensortec AG" + } + case 505: { /* '505' */ + return "nysa technology & solutions" + } + case 506: { /* '506' */ + return "FARADITE" + } + case 507: { /* '507' */ + return "Optimus" + } + case 508: { /* '508' */ + return "KTS s.r.l." + } + case 509: { /* '509' */ + return "Ramcro SPA" + } + case 51: { /* '51' */ + return "AMP Deutschland" + } + case 510: { /* '510' */ + return "Wuhan WiseCreate Universe Technology Co., Ltd" + } + case 511: { /* '511' */ + return "BEMI Smart Home Ltd" + } + case 512: { /* '512' */ + return "Ardomus" + } + case 513: { /* '513' */ + return "ChangXing" + } + case 514: { /* '514' */ + return "E-Controls" + } + case 515: { /* '515' */ + return "AIB Technology" + } + case 516: { /* '516' */ + return "NVC" + } + case 517: { /* '517' */ + return "Kbox" + } + case 518: { /* '518' */ + return "CNS" + } + case 519: { /* '519' */ + return "Tyba" + } + case 52: { /* '52' */ + return "Bosch Thermotechnik GmbH" + } + case 520: { /* '520' */ + return "Atrel" + } + case 521: { /* '521' */ + return "Simon Electric (China) Co., LTD" + } + case 522: { /* '522' */ + return "Kordz Group" + } + case 523: { /* '523' */ + return "ND Electric" + } + case 524: { /* '524' */ + return "Controlium" + } + case 525: { /* '525' */ + return "FAMO GmbH & Co. KG" + } + case 526: { /* '526' */ + return "CDN Smart" + } + case 527: { /* '527' */ + return "Heston" + } + case 528: { /* '528' */ + return "ESLA CONEXIONES S.L." + } + case 529: { /* '529' */ + return "Weishaupt" + } + case 53: { /* '53' */ + return "SEF - ECOTEC" + } + case 530: { /* '530' */ + return "ASTRUM TECHNOLOGY" + } + case 531: { /* '531' */ + return "WUERTH ELEKTRONIK STELVIO KONTEK S.p.A." + } + case 532: { /* '532' */ + return "NANOTECO corporation" + } + case 533: { /* '533' */ + return "Nietian" + } + case 534: { /* '534' */ + return "Sumsir" + } + case 535: { /* '535' */ + return "ORBIS TECNOLOGIA ELECTRICA SA" + } + case 536: { /* '536' */ + return "Nanjing Zhongyi IoT Technology Co., Ltd." + } + case 537: { /* '537' */ + return "Anlips" + } + case 538: { /* '538' */ + return "GUANGDONG PAK CORPORATION CO., LTD" + } + case 539: { /* '539' */ + return "BVK Technology" + } + case 54: { /* '54' */ + return "DORMA GmbH + Co. KG" + } + case 540: { /* '540' */ + return "Solomio srl" + } + case 541: { /* '541' */ + return "Domotica Labs" + } + case 542: { /* '542' */ + return "NVC International" + } + case 543: { /* '543' */ + return "BA" + } + case 544: { /* '544' */ + return "Iris Ceramica Group" + } + case 545: { /* '545' */ + return "Wireeo" + } + case 546: { /* '546' */ + return "nvclighting" + } + case 547: { /* '547' */ + return "Jinan Tian Da Sheng Information Technology Co." + } + case 548: { /* '548' */ + return "Armiti trading" + } + case 549: { /* '549' */ + return "ELEK" + } + case 55: { /* '55' */ + return "WindowMaster A/S" + } + case 550: { /* '550' */ + return "Accordia sa" + } + case 551: { /* '551' */ + return "OURICAN" + } + case 552: { /* '552' */ + return "INLIWOSE" + } + case 553: { /* '553' */ + return "Bosch (Shanghai) Smart Life Technology Ltd." + } + case 554: { /* '554' */ + return "SHK KNX" + } + case 555: { /* '555' */ + return "Ampio" + } + case 556: { /* '556' */ + return "Mingxing Wisdom" + } + case 557: { /* '557' */ + return "ALTEN SW GmbH" + } + case 558: { /* '558' */ + return "V.Y.C.srl" + } + case 559: { /* '559' */ + return "TERMINUS GROUP" + } + case 56: { /* '56' */ + return "Walther Werke" + } + case 560: { /* '560' */ + return "Wonderful City Technology" + } + case 561: { /* '561' */ + return "QbicTechnology" + } + case 562: { /* '562' */ + return "Embedded Automation Equipment (Shanghai) Limited" + } + case 563: { /* '563' */ + return "onework" + } + case 564: { /* '564' */ + return "PL LINK" + } + case 565: { /* '565' */ + return "Fasel GmbH Elektronik" + } + case 566: { /* '566' */ + return "GoldenHome Smart" + } + case 567: { /* '567' */ + return "Goldmedal" + } + case 568: { /* '568' */ + return "Can'nX" + } + case 569: { /* '569' */ + return "EGI - Earth Goodness" + } + case 57: { /* '57' */ + return "ORAS" + } + case 570: { /* '570' */ + return "Viega GmbH & Co. KG" + } + case 571: { /* '571' */ + return "Fredon Digital Buildings" + } + case 572: { /* '572' */ + return "Helukabel (Thailand) Co.,Ltd." + } + case 573: { /* '573' */ + return "ACE Technology" + } + case 574: { /* '574' */ + return "MEX Electric Technology (Shanghai) Co., Ltd" + } + case 575: { /* '575' */ + return "SUMAMO" + } + case 576: { /* '576' */ + return "SVIT" + } + case 577: { /* '577' */ + return "tecget" + } + case 578: { /* '578' */ + return "Xeropoint" + } + case 579: { /* '579' */ + return "Honeywell Building Technologies" + } + case 58: { /* '58' */ + return "Dätwyler" + } + case 580: { /* '580' */ + return "ComfortClick" + } + case 581: { /* '581' */ + return "DORBAS ELECTRIC" + } + case 582: { /* '582' */ + return "REMKO GmbH & Co. KG" + } + case 583: { /* '583' */ + return "Shenzhen Congxun Intelligent Technology Co., LTD" + } + case 584: { /* '584' */ + return "ANDAS" + } + case 585: { /* '585' */ + return "Hefei Chuang Yue Intelligent Technology Co.,LTD" + } + case 586: { /* '586' */ + return "Larfe" + } + case 587: { /* '587' */ + return "Dongguan Muhcci Electrical" + } + case 588: { /* '588' */ + return "STEC" + } + case 589: { /* '589' */ + return "ARIGO Software GmbH" + } + case 59: { /* '59' */ + return "Electrak" + } + case 590: { /* '590' */ + return "Feishelec" + } + case 591: { /* '591' */ + return "GORDIC" + } + case 592: { /* '592' */ + return "Delta Electronics" + } + case 593: { /* '593' */ + return "Shanghai Lewin Intelligent Technology Co.,Ltd." + } + case 594: { /* '594' */ + return "KG-POWER" + } + case 595: { /* '595' */ + return "Zhejiang Moorgen Intelligent Technology Co., Ltd" + } + case 596: { /* '596' */ + return "Guangdong Kanway" + } + case 597: { /* '597' */ + return "RAMIREZ Engineering GmbH" + } + case 598: { /* '598' */ + return "Zhongshan Taiyang IMP&EXP. CO LTD" + } + case 599: { /* '599' */ + return "Vihan electric pvt ltd" + } + case 6: { /* '6' */ + return "Busch-Jaeger Elektro" + } + case 60: { /* '60' */ + return "Techem" + } + case 600: { /* '600' */ + return "Splendid Minds GmbH" + } + case 601: { /* '601' */ + return "Estada" + } + case 602: { /* '602' */ + return "zhongyunxinzhikonggujituanyouxiangongsi" + } + case 603: { /* '603' */ + return "Stuhl Regelsysteme GmbH" + } + case 604: { /* '604' */ + return "Shenzhen Gluck Technology Co., LTD" + } + case 605: { /* '605' */ + return "Gaimex" + } + case 606: { /* '606' */ + return "B3 International S.R.L" + } + case 607: { /* '607' */ + return "MM Electro" + } + case 608: { /* '608' */ + return "CASCODA" + } + case 609: { /* '609' */ + return "Xiamen Intretech Inc." + } + case 61: { /* '61' */ + return "Schneider Electric Industries SAS" + } + case 610: { /* '610' */ + return "KiloElec Technology" + } + case 611: { /* '611' */ + return "Inyx" + } + case 612: { /* '612' */ + return "Smart Building Services GmbH" + } + case 613: { /* '613' */ + return "BSS GmbH" + } + case 614: { /* '614' */ + return "ABB - reserved" + } + case 615: { /* '615' */ + return "Busch-Jaeger Elektro - reserved" + } + case 62: { /* '62' */ + return "WHD Wilhelm Huber + Söhne" + } + case 63: { /* '63' */ + return "Bischoff Elektronik" + } + case 64: { /* '64' */ + return "JEPAZ" + } + case 65: { /* '65' */ + return "RTS Automation" + } + case 66: { /* '66' */ + return "EIBMARKT GmbH" + } + case 67: { /* '67' */ + return "WAREMA Renkhoff SE" + } + case 68: { /* '68' */ + return "Eelectron" + } + case 69: { /* '69' */ + return "Belden Wire & Cable B.V." + } + case 7: { /* '7' */ + return "GIRA Giersiepen" + } + case 70: { /* '70' */ + return "Becker-Antriebe GmbH" + } + case 71: { /* '71' */ + return "J.Stehle+Söhne GmbH" + } + case 72: { /* '72' */ + return "AGFEO" + } + case 73: { /* '73' */ + return "Zennio" + } + case 74: { /* '74' */ + return "TAPKO Technologies" + } + case 75: { /* '75' */ + return "HDL" + } + case 76: { /* '76' */ + return "Uponor" + } + case 77: { /* '77' */ + return "se Lightmanagement AG" + } + case 78: { /* '78' */ + return "Arcus-eds" + } + case 79: { /* '79' */ + return "Intesis" + } + case 8: { /* '8' */ + return "Hager Electro" + } + case 80: { /* '80' */ + return "Herholdt Controls srl" + } + case 81: { /* '81' */ + return "Niko-Zublin" + } + case 82: { /* '82' */ + return "Durable Technologies" + } + case 83: { /* '83' */ + return "Innoteam" + } + case 84: { /* '84' */ + return "ise GmbH" + } + case 85: { /* '85' */ + return "TEAM FOR TRONICS" + } + case 86: { /* '86' */ + return "CIAT" + } + case 87: { /* '87' */ + return "Remeha BV" + } + case 88: { /* '88' */ + return "ESYLUX" + } + case 89: { /* '89' */ + return "BASALTE" + } + case 9: { /* '9' */ + return "Insta GmbH" + } + case 90: { /* '90' */ + return "Vestamatic" + } + case 91: { /* '91' */ + return "MDT technologies" + } + case 92: { /* '92' */ + return "Warendorfer Küchen GmbH" + } + case 93: { /* '93' */ + return "Video-Star" + } + case 94: { /* '94' */ + return "Sitek" + } + case 95: { /* '95' */ + return "CONTROLtronic" + } + case 96: { /* '96' */ + return "function Technology" + } + case 97: { /* '97' */ + return "AMX" + } + case 98: { /* '98' */ + return "ELDAT" + } + case 99: { /* '99' */ + return "Panasonic" + } + default: { + return "" + } + } +} + +func KnxManufacturerFirstEnumForFieldName(value string) (KnxManufacturer, error) { + for _, sizeValue := range KnxManufacturerValues { + if sizeValue.Name() == value { + return sizeValue, nil + } + } + return 0, errors.Errorf("enum for %v describing Name not found", value) +} +func KnxManufacturerByValue(value uint16) (enum KnxManufacturer, ok bool) { + switch value { + case 0: + return KnxManufacturer_M_UNKNOWN, true + case 1: + return KnxManufacturer_M_SIEMENS, true + case 10: + return KnxManufacturer_M_LEGRAND_APPAREILLAGE_ELECTRIQUE, true + case 100: + return KnxManufacturer_M_PULSE_TECHNOLOGIES, true + case 101: + return KnxManufacturer_M_CRESTRON, true + case 102: + return KnxManufacturer_M_STEINEL_PROFESSIONAL, true + case 103: + return KnxManufacturer_M_BILTON_LED_LIGHTING, true + case 104: + return KnxManufacturer_M_DENRO_AG, true + case 105: + return KnxManufacturer_M_GEPRO, true + case 106: + return KnxManufacturer_M_PREUSSEN_AUTOMATION, true + case 107: + return KnxManufacturer_M_ZOPPAS_INDUSTRIES, true + case 108: + return KnxManufacturer_M_MACTECH, true + case 109: + return KnxManufacturer_M_TECHNO_TREND, true + case 11: + return KnxManufacturer_M_MERTEN, true + case 110: + return KnxManufacturer_M_FS_CABLES, true + case 111: + return KnxManufacturer_M_DELTA_DORE, true + case 112: + return KnxManufacturer_M_EISSOUND, true + case 113: + return KnxManufacturer_M_CISCO, true + case 114: + return KnxManufacturer_M_DINUY, true + case 115: + return KnxManufacturer_M_IKNIX, true + case 116: + return KnxManufacturer_M_RADEMACHER_GERAETE_ELEKTRONIK_GMBH, true + case 117: + return KnxManufacturer_M_EGI_ELECTROACUSTICA_GENERAL_IBERICA, true + case 118: + return KnxManufacturer_M_BES___INGENIUM, true + case 119: + return KnxManufacturer_M_ELABNET, true + case 12: + return KnxManufacturer_M_ABB_SPA_SACE_DIVISION, true + case 120: + return KnxManufacturer_M_BLUMOTIX, true + case 121: + return KnxManufacturer_M_HUNTER_DOUGLAS, true + case 122: + return KnxManufacturer_M_APRICUM, true + case 123: + return KnxManufacturer_M_TIANSU_AUTOMATION, true + case 124: + return KnxManufacturer_M_BUBENDORFF, true + case 125: + return KnxManufacturer_M_MBS_GMBH, true + case 126: + return KnxManufacturer_M_ENERTEX_BAYERN_GMBH, true + case 127: + return KnxManufacturer_M_BMS, true + case 128: + return KnxManufacturer_M_SINAPSI, true + case 129: + return KnxManufacturer_M_EMBEDDED_SYSTEMS_SIA, true + case 13: + return KnxManufacturer_M_SIEDLE_AND_SOEHNE, true + case 130: + return KnxManufacturer_M_KNX1, true + case 131: + return KnxManufacturer_M_TOKKA, true + case 132: + return KnxManufacturer_M_NANOSENSE, true + case 133: + return KnxManufacturer_M_PEAR_AUTOMATION_GMBH, true + case 134: + return KnxManufacturer_M_DGA, true + case 135: + return KnxManufacturer_M_LUTRON, true + case 136: + return KnxManufacturer_M_AIRZONE___ALTRA, true + case 137: + return KnxManufacturer_M_LITHOSS_DESIGN_SWITCHES, true + case 138: + return KnxManufacturer_M_THREEATEL, true + case 139: + return KnxManufacturer_M_PHILIPS_CONTROLS, true + case 14: + return KnxManufacturer_M_EBERLE, true + case 140: + return KnxManufacturer_M_VELUX_AS, true + case 141: + return KnxManufacturer_M_LOYTEC, true + case 142: + return KnxManufacturer_M_EKINEX_S_P_A_, true + case 143: + return KnxManufacturer_M_SIRLAN_TECHNOLOGIES, true + case 144: + return KnxManufacturer_M_PROKNX_SAS, true + case 145: + return KnxManufacturer_M_IT_GMBH, true + case 146: + return KnxManufacturer_M_RENSON, true + case 147: + return KnxManufacturer_M_HEP_GROUP, true + case 148: + return KnxManufacturer_M_BALMART, true + case 149: + return KnxManufacturer_M_GFS_GMBH, true + case 15: + return KnxManufacturer_M_GEWISS, true + case 150: + return KnxManufacturer_M_SCHENKER_STOREN_AG, true + case 151: + return KnxManufacturer_M_ALGODUE_ELETTRONICA_S_R_L_, true + case 152: + return KnxManufacturer_M_ABB_FRANCE, true + case 153: + return KnxManufacturer_M_MAINTRONIC, true + case 154: + return KnxManufacturer_M_VANTAGE, true + case 155: + return KnxManufacturer_M_FORESIS, true + case 156: + return KnxManufacturer_M_RESEARCH_AND_PRODUCTION_ASSOCIATION_SEM, true + case 157: + return KnxManufacturer_M_WEINZIERL_ENGINEERING_GMBH, true + case 158: + return KnxManufacturer_M_MOEHLENHOFF_WAERMETECHNIK_GMBH, true + case 159: + return KnxManufacturer_M_PKC_GROUP_OYJ, true + case 16: + return KnxManufacturer_M_ALBERT_ACKERMANN, true + case 160: + return KnxManufacturer_M_B_E_G_, true + case 161: + return KnxManufacturer_M_ELSNER_ELEKTRONIK_GMBH, true + case 162: + return KnxManufacturer_M_SIEMENS_BUILDING_TECHNOLOGIES_HKCHINA_LTD_, true + case 163: + return KnxManufacturer_M_EUTRAC, true + case 164: + return KnxManufacturer_M_GUSTAV_HENSEL_GMBH_AND_CO__KG, true + case 165: + return KnxManufacturer_M_GARO_AB, true + case 166: + return KnxManufacturer_M_WALDMANN_LICHTTECHNIK, true + case 167: + return KnxManufacturer_M_SCHUECO, true + case 168: + return KnxManufacturer_M_EMU, true + case 169: + return KnxManufacturer_M_JNET_SYSTEMS_AG, true + case 17: + return KnxManufacturer_M_SCHUPA_GMBH, true + case 170: + return KnxManufacturer_M_TOTAL_SOLUTION_GMBH, true + case 171: + return KnxManufacturer_M_O_Y_L__ELECTRONICS, true + case 172: + return KnxManufacturer_M_GALAX_SYSTEM, true + case 173: + return KnxManufacturer_M_DISCH, true + case 174: + return KnxManufacturer_M_AUCOTEAM, true + case 175: + return KnxManufacturer_M_LUXMATE_CONTROLS, true + case 176: + return KnxManufacturer_M_DANFOSS, true + case 177: + return KnxManufacturer_M_AST_GMBH, true + case 178: + return KnxManufacturer_M_WILA_LEUCHTEN, true + case 179: + return KnxManufacturer_M_BPlusB_AUTOMATIONS__UND_STEUERUNGSTECHNIK, true + case 18: + return KnxManufacturer_M_ABB_SCHWEIZ, true + case 180: + return KnxManufacturer_M_LINGG_AND_JANKE, true + case 181: + return KnxManufacturer_M_SAUTER, true + case 182: + return KnxManufacturer_M_SIMU, true + case 183: + return KnxManufacturer_M_THEBEN_HTS_AG, true + case 184: + return KnxManufacturer_M_AMANN_GMBH, true + case 185: + return KnxManufacturer_M_BERG_ENERGIEKONTROLLSYSTEME_GMBH, true + case 186: + return KnxManufacturer_M_HUEPPE_FORM_SONNENSCHUTZSYSTEME_GMBH, true + case 187: + return KnxManufacturer_M_OVENTROP_KG, true + case 188: + return KnxManufacturer_M_GRIESSER_AG, true + case 189: + return KnxManufacturer_M_IPAS_GMBH, true + case 19: + return KnxManufacturer_M_FELLER, true + case 190: + return KnxManufacturer_M_ELERO_GMBH, true + case 191: + return KnxManufacturer_M_ARDAN_PRODUCTION_AND_INDUSTRIAL_CONTROLS_LTD_, true + case 192: + return KnxManufacturer_M_METEC_MESSTECHNIK_GMBH, true + case 193: + return KnxManufacturer_M_ELKA_ELEKTRONIK_GMBH, true + case 194: + return KnxManufacturer_M_ELEKTROANLAGEN_D__NAGEL, true + case 195: + return KnxManufacturer_M_TRIDONIC_BAUELEMENTE_GMBH, true + case 196: + return KnxManufacturer_M_STENGLER_GESELLSCHAFT, true + case 197: + return KnxManufacturer_M_SCHNEIDER_ELECTRIC_MG, true + case 198: + return KnxManufacturer_M_KNX_ASSOCIATION, true + case 199: + return KnxManufacturer_M_VIVO, true + case 2: + return KnxManufacturer_M_ABB, true + case 20: + return KnxManufacturer_M_GLAMOX_AS, true + case 200: + return KnxManufacturer_M_HUGO_MUELLER_GMBH_AND_CO_KG, true + case 201: + return KnxManufacturer_M_SIEMENS_HVAC, true + case 202: + return KnxManufacturer_M_APT, true + case 203: + return KnxManufacturer_M_HIGHDOM, true + case 204: + return KnxManufacturer_M_TOP_SERVICES, true + case 205: + return KnxManufacturer_M_AMBIHOME, true + case 206: + return KnxManufacturer_M_DATEC_ELECTRONIC_AG, true + case 207: + return KnxManufacturer_M_ABUS_SECURITY_CENTER, true + case 208: + return KnxManufacturer_M_LITE_PUTER, true + case 209: + return KnxManufacturer_M_TANTRON_ELECTRONIC, true + case 21: + return KnxManufacturer_M_DEHN_AND_SOEHNE, true + case 210: + return KnxManufacturer_M_INTERRA, true + case 211: + return KnxManufacturer_M_DKX_TECH, true + case 212: + return KnxManufacturer_M_VIATRON, true + case 213: + return KnxManufacturer_M_NAUTIBUS, true + case 214: + return KnxManufacturer_M_ON_SEMICONDUCTOR, true + case 215: + return KnxManufacturer_M_LONGCHUANG, true + case 216: + return KnxManufacturer_M_AIR_ON_AG, true + case 217: + return KnxManufacturer_M_IB_COMPANY_GMBH, true + case 218: + return KnxManufacturer_M_SATION_FACTORY, true + case 219: + return KnxManufacturer_M_AGENTILO_GMBH, true + case 22: + return KnxManufacturer_M_CRABTREE, true + case 220: + return KnxManufacturer_M_MAKEL_ELEKTRIK, true + case 221: + return KnxManufacturer_M_HELIOS_VENTILATOREN, true + case 222: + return KnxManufacturer_M_OTTO_SOLUTIONS_PTE_LTD, true + case 223: + return KnxManufacturer_M_AIRMASTER, true + case 224: + return KnxManufacturer_M_VALLOX_GMBH, true + case 225: + return KnxManufacturer_M_DALITEK, true + case 226: + return KnxManufacturer_M_ASIN, true + case 227: + return KnxManufacturer_M_BRIDGES_INTELLIGENCE_TECHNOLOGY_INC_, true + case 228: + return KnxManufacturer_M_ARBONIA, true + case 229: + return KnxManufacturer_M_KERMI, true + case 23: + return KnxManufacturer_M_EVOKNX, true + case 230: + return KnxManufacturer_M_PROLUX, true + case 231: + return KnxManufacturer_M_CLICHOME, true + case 232: + return KnxManufacturer_M_COMMAX, true + case 233: + return KnxManufacturer_M_EAE, true + case 234: + return KnxManufacturer_M_TENSE, true + case 235: + return KnxManufacturer_M_SEYOUNG_ELECTRONICS, true + case 236: + return KnxManufacturer_M_LIFEDOMUS, true + case 237: + return KnxManufacturer_M_EUROTRONIC_TECHNOLOGY_GMBH, true + case 238: + return KnxManufacturer_M_TCI, true + case 239: + return KnxManufacturer_M_RISHUN_ELECTRONIC, true + case 24: + return KnxManufacturer_M_PAUL_HOCHKOEPPER, true + case 240: + return KnxManufacturer_M_ZIPATO, true + case 241: + return KnxManufacturer_M_CM_SECURITY_GMBH_AND_CO_KG, true + case 242: + return KnxManufacturer_M_QING_CABLES, true + case 243: + return KnxManufacturer_M_LABIO, true + case 244: + return KnxManufacturer_M_COSTER_TECNOLOGIE_ELETTRONICHE_S_P_A_, true + case 245: + return KnxManufacturer_M_E_G_E, true + case 246: + return KnxManufacturer_M_NETXAUTOMATION, true + case 247: + return KnxManufacturer_M_TECALOR, true + case 248: + return KnxManufacturer_M_URMET_ELECTRONICS_HUIZHOU_LTD_, true + case 249: + return KnxManufacturer_M_PEIYING_BUILDING_CONTROL, true + case 25: + return KnxManufacturer_M_ALTENBURGER_ELECTRONIC, true + case 250: + return KnxManufacturer_M_BPT_S_P_A__A_SOCIO_UNICO, true + case 251: + return KnxManufacturer_M_KANONTEC___KANONBUS, true + case 252: + return KnxManufacturer_M_ISER_TECH, true + case 253: + return KnxManufacturer_M_FINELINE, true + case 254: + return KnxManufacturer_M_CP_ELECTRONICS_LTD, true + case 255: + return KnxManufacturer_M_NIKO_SERVODAN_AS, true + case 256: + return KnxManufacturer_M_SIMON_309, true + case 257: + return KnxManufacturer_M_GM_MODULAR_PVT__LTD_, true + case 258: + return KnxManufacturer_M_FU_CHENG_INTELLIGENCE, true + case 259: + return KnxManufacturer_M_NEXKON, true + case 26: + return KnxManufacturer_M_GRAESSLIN, true + case 260: + return KnxManufacturer_M_FEEL_S_R_L, true + case 261: + return KnxManufacturer_M_NOT_ASSIGNED_314, true + case 262: + return KnxManufacturer_M_SHENZHEN_FANHAI_SANJIANG_ELECTRONICS_CO___LTD_, true + case 263: + return KnxManufacturer_M_JIUZHOU_GREEBLE, true + case 264: + return KnxManufacturer_M_AUMUELLER_AUMATIC_GMBH, true + case 265: + return KnxManufacturer_M_ETMAN_ELECTRIC, true + case 266: + return KnxManufacturer_M_BLACK_NOVA, true + case 267: + return KnxManufacturer_M_ZIDATECH_AG, true + case 268: + return KnxManufacturer_M_IDGS_BVBA, true + case 269: + return KnxManufacturer_M_DAKANIMO, true + case 27: + return KnxManufacturer_M_SIMON_42, true + case 270: + return KnxManufacturer_M_TREBOR_AUTOMATION_AB, true + case 271: + return KnxManufacturer_M_SATEL_SP__Z_O_O_, true + case 272: + return KnxManufacturer_M_RUSSOUND__INC_, true + case 273: + return KnxManufacturer_M_MIDEA_HEATING_AND_VENTILATING_EQUIPMENT_CO_LTD, true + case 274: + return KnxManufacturer_M_CONSORZIO_TERRANUOVA, true + case 275: + return KnxManufacturer_M_WOLF_HEIZTECHNIK_GMBH, true + case 276: + return KnxManufacturer_M_SONTEC, true + case 277: + return KnxManufacturer_M_BELCOM_CABLES_LTD_, true + case 278: + return KnxManufacturer_M_GUANGZHOU_SEAWIN_ELECTRICAL_TECHNOLOGIES_CO___LTD_, true + case 279: + return KnxManufacturer_M_ACREL, true + case 28: + return KnxManufacturer_M_VIMAR, true + case 280: + return KnxManufacturer_M_KWC_AQUAROTTER_GMBH, true + case 281: + return KnxManufacturer_M_ORION_SYSTEMS, true + case 282: + return KnxManufacturer_M_SCHRACK_TECHNIK_GMBH, true + case 283: + return KnxManufacturer_M_INSPRID, true + case 284: + return KnxManufacturer_M_SUNRICHER, true + case 285: + return KnxManufacturer_M_MENRED_AUTOMATION_SYSTEMSHANGHAI_CO__LTD_, true + case 286: + return KnxManufacturer_M_AUREX, true + case 287: + return KnxManufacturer_M_JOSEF_BARTHELME_GMBH_AND_CO__KG, true + case 288: + return KnxManufacturer_M_ARCHITECTURE_NUMERIQUE, true + case 289: + return KnxManufacturer_M_UP_GROUP, true + case 29: + return KnxManufacturer_M_MOELLER_GEBAEUDEAUTOMATION_KG, true + case 290: + return KnxManufacturer_M_TEKNOS_AVINNO, true + case 291: + return KnxManufacturer_M_NINGBO_DOOYA_MECHANIC_AND_ELECTRONIC_TECHNOLOGY, true + case 292: + return KnxManufacturer_M_THERMOKON_SENSORTECHNIK_GMBH, true + case 293: + return KnxManufacturer_M_BELIMO_AUTOMATION_AG, true + case 294: + return KnxManufacturer_M_ZEHNDER_GROUP_INTERNATIONAL_AG, true + case 295: + return KnxManufacturer_M_SKS_KINKEL_ELEKTRONIK, true + case 296: + return KnxManufacturer_M_ECE_WURMITZER_GMBH, true + case 297: + return KnxManufacturer_M_LARS, true + case 298: + return KnxManufacturer_M_URC, true + case 299: + return KnxManufacturer_M_LIGHTCONTROL, true + case 3: + return KnxManufacturer_M_ALBRECHT_JUNG, true + case 30: + return KnxManufacturer_M_ELTAKO, true + case 300: + return KnxManufacturer_M_SHENZHEN_YM, true + case 301: + return KnxManufacturer_M_MEAN_WELL_ENTERPRISES_CO__LTD_, true + case 302: + return KnxManufacturer_M_OSIX, true + case 303: + return KnxManufacturer_M_AYPRO_TECHNOLOGY, true + case 304: + return KnxManufacturer_M_HEFEI_ECOLITE_SOFTWARE, true + case 305: + return KnxManufacturer_M_ENNO, true + case 306: + return KnxManufacturer_M_OHOSURE, true + case 307: + return KnxManufacturer_M_GAREFOWL, true + case 308: + return KnxManufacturer_M_GEZE, true + case 309: + return KnxManufacturer_M_LG_ELECTRONICS_INC_, true + case 31: + return KnxManufacturer_M_BOSCH_SIEMENS_HAUSHALTSGERAETE, true + case 310: + return KnxManufacturer_M_SMC_INTERIORS, true + case 311: + return KnxManufacturer_M_NOT_ASSIGNED_364, true + case 312: + return KnxManufacturer_M_SCS_CABLE, true + case 313: + return KnxManufacturer_M_HOVAL, true + case 314: + return KnxManufacturer_M_CANST, true + case 315: + return KnxManufacturer_M_HANGZHOU_BERLIN, true + case 316: + return KnxManufacturer_M_EVN_LICHTTECHNIK, true + case 317: + return KnxManufacturer_M_RUTEC, true + case 318: + return KnxManufacturer_M_FINDER, true + case 319: + return KnxManufacturer_M_FUJITSU_GENERAL_LIMITED, true + case 32: + return KnxManufacturer_M_RITTO_GMBHANDCO_KG, true + case 320: + return KnxManufacturer_M_ZF_FRIEDRICHSHAFEN_AG, true + case 321: + return KnxManufacturer_M_CREALED, true + case 322: + return KnxManufacturer_M_MILES_MAGIC_AUTOMATION_PRIVATE_LIMITED, true + case 323: + return KnxManufacturer_M_EPlus, true + case 324: + return KnxManufacturer_M_ITALCOND, true + case 325: + return KnxManufacturer_M_SATION, true + case 326: + return KnxManufacturer_M_NEWBEST, true + case 327: + return KnxManufacturer_M_GDS_DIGITAL_SYSTEMS, true + case 328: + return KnxManufacturer_M_IDDERO, true + case 329: + return KnxManufacturer_M_MBNLED, true + case 33: + return KnxManufacturer_M_POWER_CONTROLS, true + case 330: + return KnxManufacturer_M_VITRUM, true + case 331: + return KnxManufacturer_M_EKEY_BIOMETRIC_SYSTEMS_GMBH, true + case 332: + return KnxManufacturer_M_AMC, true + case 333: + return KnxManufacturer_M_TRILUX_GMBH_AND_CO__KG, true + case 334: + return KnxManufacturer_M_WEXCEDO, true + case 335: + return KnxManufacturer_M_VEMER_SPA, true + case 336: + return KnxManufacturer_M_ALEXANDER_BUERKLE_GMBH_AND_CO_KG, true + case 337: + return KnxManufacturer_M_CITRON, true + case 338: + return KnxManufacturer_M_SHENZHEN_HEGUANG, true + case 339: + return KnxManufacturer_M_NOT_ASSIGNED_392, true + case 34: + return KnxManufacturer_M_ZUMTOBEL, true + case 340: + return KnxManufacturer_M_TRANE_B_V_B_A, true + case 341: + return KnxManufacturer_M_CAREL, true + case 342: + return KnxManufacturer_M_PROLITE_CONTROLS, true + case 343: + return KnxManufacturer_M_BOSMER, true + case 344: + return KnxManufacturer_M_EUCHIPS, true + case 345: + return KnxManufacturer_M_CONNECT_THINKA_CONNECT, true + case 346: + return KnxManufacturer_M_PEAKNX_A_DOGAWIST_COMPANY, true + case 347: + return KnxManufacturer_M_ACEMATIC, true + case 348: + return KnxManufacturer_M_ELAUSYS, true + case 349: + return KnxManufacturer_M_ITK_ENGINEERING_AG, true + case 35: + return KnxManufacturer_M_PHOENIX_CONTACT, true + case 350: + return KnxManufacturer_M_INTEGRA_METERING_AG, true + case 351: + return KnxManufacturer_M_FMS_HOSPITALITY_PTE_LTD, true + case 352: + return KnxManufacturer_M_NUVO, true + case 353: + return KnxManufacturer_M_U__LUX_GMBH, true + case 354: + return KnxManufacturer_M_BRUMBERG_LEUCHTEN, true + case 355: + return KnxManufacturer_M_LIME, true + case 356: + return KnxManufacturer_M_GREAT_EMPIRE_INTERNATIONAL_GROUP_CO___LTD_, true + case 357: + return KnxManufacturer_M_KAVOSHPISHRO_ASIA, true + case 358: + return KnxManufacturer_M_V2_SPA, true + case 359: + return KnxManufacturer_M_JOHNSON_CONTROLS, true + case 36: + return KnxManufacturer_M_WAGO_KONTAKTTECHNIK, true + case 360: + return KnxManufacturer_M_ARKUD, true + case 361: + return KnxManufacturer_M_IRIDIUM_LTD_, true + case 362: + return KnxManufacturer_M_BSMART, true + case 363: + return KnxManufacturer_M_BAB_TECHNOLOGIE_GMBH, true + case 364: + return KnxManufacturer_M_NICE_SPA, true + case 365: + return KnxManufacturer_M_REDFISH_GROUP_PTY_LTD, true + case 366: + return KnxManufacturer_M_SABIANA_SPA, true + case 367: + return KnxManufacturer_M_UBEE_INTERACTIVE_EUROPE, true + case 368: + return KnxManufacturer_M_REXEL, true + case 369: + return KnxManufacturer_M_GES_TEKNIK_A_S_, true + case 37: + return KnxManufacturer_M_KNXPRESSO, true + case 370: + return KnxManufacturer_M_AVE_S_P_A_, true + case 371: + return KnxManufacturer_M_ZHUHAI_LTECH_TECHNOLOGY_CO___LTD_, true + case 372: + return KnxManufacturer_M_ARCOM, true + case 373: + return KnxManufacturer_M_VIA_TECHNOLOGIES__INC_, true + case 374: + return KnxManufacturer_M_FEELSMART_, true + case 375: + return KnxManufacturer_M_SUPCON, true + case 376: + return KnxManufacturer_M_MANIC, true + case 377: + return KnxManufacturer_M_TDE_GMBH, true + case 378: + return KnxManufacturer_M_NANJING_SHUFAN_INFORMATION_TECHNOLOGY_CO__LTD_, true + case 379: + return KnxManufacturer_M_EWTECH, true + case 38: + return KnxManufacturer_M_WIELAND_ELECTRIC, true + case 380: + return KnxManufacturer_M_KLUGER_AUTOMATION_GMBH, true + case 381: + return KnxManufacturer_M_JOONGANG_CONTROL, true + case 382: + return KnxManufacturer_M_GREENCONTROLS_TECHNOLOGY_SDN__BHD_, true + case 383: + return KnxManufacturer_M_IME_S_P_A_, true + case 384: + return KnxManufacturer_M_SICHUAN_HAODING, true + case 385: + return KnxManufacturer_M_MINDJAGA_LTD_, true + case 386: + return KnxManufacturer_M_RUILI_SMART_CONTROL, true + case 387: + return KnxManufacturer_M_CODESYS_GMBH, true + case 388: + return KnxManufacturer_M_MOORGEN_DEUTSCHLAND_GMBH, true + case 389: + return KnxManufacturer_M_CULLMANN_TECH, true + case 39: + return KnxManufacturer_M_HERMANN_KLEINHUIS, true + case 390: + return KnxManufacturer_M_EYRISE_B_V, true + case 391: + return KnxManufacturer_M_ABEGO, true + case 392: + return KnxManufacturer_M_MYGEKKO, true + case 393: + return KnxManufacturer_M_ERGO3_SARL, true + case 394: + return KnxManufacturer_M_STMICROELECTRONICS_INTERNATIONAL_N_V_, true + case 395: + return KnxManufacturer_M_CJC_SYSTEMS, true + case 396: + return KnxManufacturer_M_SUDOKU, true + case 397: + return KnxManufacturer_M_AZ_E_LITE_PTE_LTD, true + case 398: + return KnxManufacturer_M_ARLIGHT, true + case 399: + return KnxManufacturer_M_GRUENBECK_WASSERAUFBEREITUNG_GMBH, true + case 4: + return KnxManufacturer_M_BTICINO, true + case 40: + return KnxManufacturer_M_STIEBEL_ELTRON, true + case 400: + return KnxManufacturer_M_MODULE_ELECTRONIC, true + case 401: + return KnxManufacturer_M_KOPLAT, true + case 402: + return KnxManufacturer_M_GUANGZHOU_LETOUR_LIFE_TECHNOLOGY_CO___LTD, true + case 403: + return KnxManufacturer_M_ILEVIA, true + case 404: + return KnxManufacturer_M_LN_SYSTEMTEQ, true + case 405: + return KnxManufacturer_M_HISENSE_SMARTHOME, true + case 406: + return KnxManufacturer_M_FLINK_AUTOMATION_SYSTEM, true + case 407: + return KnxManufacturer_M_XXTER_BV, true + case 408: + return KnxManufacturer_M_LYNXUS_TECHNOLOGY, true + case 409: + return KnxManufacturer_M_ROBOT_S_A_, true + case 41: + return KnxManufacturer_M_TEHALIT, true + case 410: + return KnxManufacturer_M_SHENZHEN_ATTE_SMART_LIFE_CO__LTD_, true + case 411: + return KnxManufacturer_M_NOBLESSE, true + case 412: + return KnxManufacturer_M_ADVANCED_DEVICES, true + case 413: + return KnxManufacturer_M_ATRINA_BUILDING_AUTOMATION_CO__LTD, true + case 414: + return KnxManufacturer_M_GUANGDONG_DAMING_LAFFEY_ELECTRIC_CO___LTD_, true + case 415: + return KnxManufacturer_M_WESTERSTRAND_URFABRIK_AB, true + case 416: + return KnxManufacturer_M_CONTROL4_CORPORATE, true + case 417: + return KnxManufacturer_M_ONTROL, true + case 418: + return KnxManufacturer_M_STARNET, true + case 419: + return KnxManufacturer_M_BETA_CAVI, true + case 42: + return KnxManufacturer_M_THEBEN_AG, true + case 420: + return KnxManufacturer_M_EASEMORE, true + case 421: + return KnxManufacturer_M_VIVALDI_SRL, true + case 422: + return KnxManufacturer_M_GREE_ELECTRIC_APPLIANCES_INC__OF_ZHUHAI, true + case 423: + return KnxManufacturer_M_HWISCON, true + case 424: + return KnxManufacturer_M_SHANGHAI_ELECON_INTELLIGENT_TECHNOLOGY_CO___LTD_, true + case 425: + return KnxManufacturer_M_KAMPMANN, true + case 426: + return KnxManufacturer_M_IMPOLUX_GMBH_LEDIMAX, true + case 427: + return KnxManufacturer_M_EVAUX, true + case 428: + return KnxManufacturer_M_WEBRO_CABLES_AND_CONNECTORS_LIMITED, true + case 429: + return KnxManufacturer_M_SHANGHAI_E_TECH_SOLUTION, true + case 43: + return KnxManufacturer_M_WILHELM_RUTENBECK, true + case 430: + return KnxManufacturer_M_GUANGZHOU_HOKO_ELECTRIC_CO__LTD_, true + case 431: + return KnxManufacturer_M_LAMMIN_HIGH_TECH_CO__LTD, true + case 432: + return KnxManufacturer_M_SHENZHEN_MERRYTEK_TECHNOLOGY_CO___LTD, true + case 433: + return KnxManufacturer_M_I_LUXUS, true + case 434: + return KnxManufacturer_M_ELMOS_SEMICONDUCTOR_AG, true + case 435: + return KnxManufacturer_M_EMCOM_TECHNOLOGY_INC, true + case 436: + return KnxManufacturer_M_PROJECT_INNOVATIONS_GMBH, true + case 437: + return KnxManufacturer_M_ITC, true + case 438: + return KnxManufacturer_M_ABB_LV_INSTALLATION_MATERIALS_COMPANY_LTD__BEIJING, true + case 439: + return KnxManufacturer_M_MAICO, true + case 44: + return KnxManufacturer_M_WINKHAUS, true + case 440: + return KnxManufacturer_M_ELAN_SRL, true + case 441: + return KnxManufacturer_M_MINHHA_TECHNOLOGY_CO__LTD, true + case 442: + return KnxManufacturer_M_ZHEJIANG_TIANJIE_INDUSTRIAL_CORP_, true + case 443: + return KnxManufacturer_M_IAUTOMATION_PTY_LIMITED, true + case 444: + return KnxManufacturer_M_EXTRON, true + case 445: + return KnxManufacturer_M_FREEDOMPRO, true + case 446: + return KnxManufacturer_M_ONEHOME, true + case 447: + return KnxManufacturer_M_EOS_SAUNATECHNIK_GMBH, true + case 448: + return KnxManufacturer_M_KUSATEK_GMBH, true + case 449: + return KnxManufacturer_M_EISBAER_SCADA, true + case 45: + return KnxManufacturer_M_ROBERT_BOSCH, true + case 450: + return KnxManufacturer_M_AUTOMATISMI_BENINCA_S_P_A_, true + case 451: + return KnxManufacturer_M_BLENDOM, true + case 452: + return KnxManufacturer_M_MADEL_AIR_TECHNICAL_DIFFUSION, true + case 453: + return KnxManufacturer_M_NIKO, true + case 454: + return KnxManufacturer_M_BOSCH_REXROTH_AG, true + case 455: + return KnxManufacturer_M_CANDM_PRODUCTS, true + case 456: + return KnxManufacturer_M_HOERMANN_KG_VERKAUFSGESELLSCHAFT, true + case 457: + return KnxManufacturer_M_SHANGHAI_RAJAYASA_CO__LTD, true + case 458: + return KnxManufacturer_M_SUZUKI, true + case 459: + return KnxManufacturer_M_SILENT_GLISS_INTERNATIONAL_LTD_, true + case 46: + return KnxManufacturer_M_SOMFY, true + case 460: + return KnxManufacturer_M_BEE_CONTROLS_ADGSC_GROUP, true + case 461: + return KnxManufacturer_M_XDTECGMBH, true + case 462: + return KnxManufacturer_M_OSRAM, true + case 463: + return KnxManufacturer_M_LEBENOR, true + case 464: + return KnxManufacturer_M_AUTOMANENG, true + case 465: + return KnxManufacturer_M_HONEYWELL_AUTOMATION_SOLUTION_CONTROLCHINA, true + case 466: + return KnxManufacturer_M_HANGZHOU_BINTHEN_INTELLIGENCE_TECHNOLOGY_CO__LTD, true + case 467: + return KnxManufacturer_M_ETA_HEIZTECHNIK, true + case 468: + return KnxManufacturer_M_DIVUS_GMBH, true + case 469: + return KnxManufacturer_M_NANJING_TAIJIESAI_INTELLIGENT_TECHNOLOGY_CO__LTD_, true + case 47: + return KnxManufacturer_M_WOERTZ, true + case 470: + return KnxManufacturer_M_LUNATONE, true + case 471: + return KnxManufacturer_M_ZHEJIANG_SCTECH_BUILDING_INTELLIGENT, true + case 472: + return KnxManufacturer_M_FOSHAN_QITE_TECHNOLOGY_CO___LTD_, true + case 473: + return KnxManufacturer_M_NOKE, true + case 474: + return KnxManufacturer_M_LANDCOM, true + case 475: + return KnxManufacturer_M_STORK_AS, true + case 476: + return KnxManufacturer_M_HANGZHOU_SHENDU_TECHNOLOGY_CO___LTD_, true + case 477: + return KnxManufacturer_M_COOLAUTOMATION, true + case 478: + return KnxManufacturer_M_APRSTERN, true + case 479: + return KnxManufacturer_M_SONNEN, true + case 48: + return KnxManufacturer_M_VIESSMANN_WERKE, true + case 480: + return KnxManufacturer_M_DNAKE, true + case 481: + return KnxManufacturer_M_NEUBERGER_GEBAEUDEAUTOMATION_GMBH, true + case 482: + return KnxManufacturer_M_STILIGER, true + case 483: + return KnxManufacturer_M_BERGHOF_AUTOMATION_GMBH, true + case 484: + return KnxManufacturer_M_TOTAL_AUTOMATION_AND_CONTROLS_GMBH, true + case 485: + return KnxManufacturer_M_DOVIT, true + case 486: + return KnxManufacturer_M_INSTALIGHTING_GMBH, true + case 487: + return KnxManufacturer_M_UNI_TEC, true + case 488: + return KnxManufacturer_M_CASATUNES, true + case 489: + return KnxManufacturer_M_EMT, true + case 49: + return KnxManufacturer_M_IMI_HYDRONIC_ENGINEERING, true + case 490: + return KnxManufacturer_M_SENFFICIENT, true + case 491: + return KnxManufacturer_M_AUROLITE_ELECTRICAL_PANYU_GUANGZHOU_LIMITED, true + case 492: + return KnxManufacturer_M_ABB_XIAMEN_SMART_TECHNOLOGY_CO___LTD_, true + case 493: + return KnxManufacturer_M_SAMSON_ELECTRIC_WIRE, true + case 494: + return KnxManufacturer_M_T_TOUCHING, true + case 495: + return KnxManufacturer_M_CORE_SMART_HOME, true + case 496: + return KnxManufacturer_M_GREENCONNECT_SOLUTIONS_SA, true + case 497: + return KnxManufacturer_M_ELETTRONICA_CONDUTTORI, true + case 498: + return KnxManufacturer_M_MKFC, true + case 499: + return KnxManufacturer_M_AUTOMATIONPlus, true + case 5: + return KnxManufacturer_M_BERKER, true + case 50: + return KnxManufacturer_M_JOH__VAILLANT, true + case 500: + return KnxManufacturer_M_BLUE_AND_RED, true + case 501: + return KnxManufacturer_M_FROGBLUE, true + case 502: + return KnxManufacturer_M_SAVESOR, true + case 503: + return KnxManufacturer_M_APP_TECH, true + case 504: + return KnxManufacturer_M_SENSORTEC_AG, true + case 505: + return KnxManufacturer_M_NYSA_TECHNOLOGY_AND_SOLUTIONS, true + case 506: + return KnxManufacturer_M_FARADITE, true + case 507: + return KnxManufacturer_M_OPTIMUS, true + case 508: + return KnxManufacturer_M_KTS_S_R_L_, true + case 509: + return KnxManufacturer_M_RAMCRO_SPA, true + case 51: + return KnxManufacturer_M_AMP_DEUTSCHLAND, true + case 510: + return KnxManufacturer_M_WUHAN_WISECREATE_UNIVERSE_TECHNOLOGY_CO___LTD, true + case 511: + return KnxManufacturer_M_BEMI_SMART_HOME_LTD, true + case 512: + return KnxManufacturer_M_ARDOMUS, true + case 513: + return KnxManufacturer_M_CHANGXING, true + case 514: + return KnxManufacturer_M_E_CONTROLS, true + case 515: + return KnxManufacturer_M_AIB_TECHNOLOGY, true + case 516: + return KnxManufacturer_M_NVC, true + case 517: + return KnxManufacturer_M_KBOX, true + case 518: + return KnxManufacturer_M_CNS, true + case 519: + return KnxManufacturer_M_TYBA, true + case 52: + return KnxManufacturer_M_BOSCH_THERMOTECHNIK_GMBH, true + case 520: + return KnxManufacturer_M_ATREL, true + case 521: + return KnxManufacturer_M_SIMON_ELECTRIC_CHINA_CO___LTD, true + case 522: + return KnxManufacturer_M_KORDZ_GROUP, true + case 523: + return KnxManufacturer_M_ND_ELECTRIC, true + case 524: + return KnxManufacturer_M_CONTROLIUM, true + case 525: + return KnxManufacturer_M_FAMO_GMBH_AND_CO__KG, true + case 526: + return KnxManufacturer_M_CDN_SMART, true + case 527: + return KnxManufacturer_M_HESTON, true + case 528: + return KnxManufacturer_M_ESLA_CONEXIONES_S_L_, true + case 529: + return KnxManufacturer_M_WEISHAUPT, true + case 53: + return KnxManufacturer_M_SEF___ECOTEC, true + case 530: + return KnxManufacturer_M_ASTRUM_TECHNOLOGY, true + case 531: + return KnxManufacturer_M_WUERTH_ELEKTRONIK_STELVIO_KONTEK_S_P_A_, true + case 532: + return KnxManufacturer_M_NANOTECO_CORPORATION, true + case 533: + return KnxManufacturer_M_NIETIAN, true + case 534: + return KnxManufacturer_M_SUMSIR, true + case 535: + return KnxManufacturer_M_ORBIS_TECNOLOGIA_ELECTRICA_SA, true + case 536: + return KnxManufacturer_M_NANJING_ZHONGYI_IOT_TECHNOLOGY_CO___LTD_, true + case 537: + return KnxManufacturer_M_ANLIPS, true + case 538: + return KnxManufacturer_M_GUANGDONG_PAK_CORPORATION_CO___LTD, true + case 539: + return KnxManufacturer_M_BVK_TECHNOLOGY, true + case 54: + return KnxManufacturer_M_DORMA_GMBH_Plus_CO__KG, true + case 540: + return KnxManufacturer_M_SOLOMIO_SRL, true + case 541: + return KnxManufacturer_M_DOMOTICA_LABS, true + case 542: + return KnxManufacturer_M_NVC_INTERNATIONAL, true + case 543: + return KnxManufacturer_M_BA, true + case 544: + return KnxManufacturer_M_IRIS_CERAMICA_GROUP, true + case 545: + return KnxManufacturer_M_WIREEO, true + case 546: + return KnxManufacturer_M_NVCLIGHTING, true + case 547: + return KnxManufacturer_M_JINAN_TIAN_DA_SHENG_INFORMATION_TECHNOLOGY_CO_, true + case 548: + return KnxManufacturer_M_ARMITI_TRADING, true + case 549: + return KnxManufacturer_M_ELEK, true + case 55: + return KnxManufacturer_M_WINDOWMASTER_AS, true + case 550: + return KnxManufacturer_M_ACCORDIA_SA, true + case 551: + return KnxManufacturer_M_OURICAN, true + case 552: + return KnxManufacturer_M_INLIWOSE, true + case 553: + return KnxManufacturer_M_BOSCH_SHANGHAI_SMART_LIFE_TECHNOLOGY_LTD_, true + case 554: + return KnxManufacturer_M_SHK_KNX, true + case 555: + return KnxManufacturer_M_AMPIO, true + case 556: + return KnxManufacturer_M_MINGXING_WISDOM, true + case 557: + return KnxManufacturer_M_ALTEN_SW_GMBH, true + case 558: + return KnxManufacturer_M_V_Y_C_SRL, true + case 559: + return KnxManufacturer_M_TERMINUS_GROUP, true + case 56: + return KnxManufacturer_M_WALTHER_WERKE, true + case 560: + return KnxManufacturer_M_WONDERFUL_CITY_TECHNOLOGY, true + case 561: + return KnxManufacturer_M_QBICTECHNOLOGY, true + case 562: + return KnxManufacturer_M_EMBEDDED_AUTOMATION_EQUIPMENT_SHANGHAI_LIMITED, true + case 563: + return KnxManufacturer_M_ONEWORK, true + case 564: + return KnxManufacturer_M_PL_LINK, true + case 565: + return KnxManufacturer_M_FASEL_GMBH_ELEKTRONIK, true + case 566: + return KnxManufacturer_M_GOLDENHOME_SMART, true + case 567: + return KnxManufacturer_M_GOLDMEDAL, true + case 568: + return KnxManufacturer_M_CannX, true + case 569: + return KnxManufacturer_M_EGI___EARTH_GOODNESS, true + case 57: + return KnxManufacturer_M_ORAS, true + case 570: + return KnxManufacturer_M_VIEGA_GMBH_AND_CO__KG, true + case 571: + return KnxManufacturer_M_FREDON_DIGITAL_BUILDINGS, true + case 572: + return KnxManufacturer_M_HELUKABEL_THAILAND_CO__LTD_, true + case 573: + return KnxManufacturer_M_ACE_TECHNOLOGY, true + case 574: + return KnxManufacturer_M_MEX_ELECTRIC_TECHNOLOGY_SHANGHAI_CO___LTD, true + case 575: + return KnxManufacturer_M_SUMAMO, true + case 576: + return KnxManufacturer_M_SVIT, true + case 577: + return KnxManufacturer_M_TECGET, true + case 578: + return KnxManufacturer_M_XEROPOINT, true + case 579: + return KnxManufacturer_M_HONEYWELL_BUILDING_TECHNOLOGIES, true + case 58: + return KnxManufacturer_M_DAETWYLER, true + case 580: + return KnxManufacturer_M_COMFORTCLICK, true + case 581: + return KnxManufacturer_M_DORBAS_ELECTRIC, true + case 582: + return KnxManufacturer_M_REMKO_GMBH_AND_CO__KG, true + case 583: + return KnxManufacturer_M_SHENZHEN_CONGXUN_INTELLIGENT_TECHNOLOGY_CO___LTD, true + case 584: + return KnxManufacturer_M_ANDAS, true + case 585: + return KnxManufacturer_M_HEFEI_CHUANG_YUE_INTELLIGENT_TECHNOLOGY_CO__LTD, true + case 586: + return KnxManufacturer_M_LARFE, true + case 587: + return KnxManufacturer_M_DONGGUAN_MUHCCI_ELECTRICAL, true + case 588: + return KnxManufacturer_M_STEC, true + case 589: + return KnxManufacturer_M_ARIGO_SOFTWARE_GMBH, true + case 59: + return KnxManufacturer_M_ELECTRAK, true + case 590: + return KnxManufacturer_M_FEISHELEC, true + case 591: + return KnxManufacturer_M_GORDIC, true + case 592: + return KnxManufacturer_M_DELTA_ELECTRONICS, true + case 593: + return KnxManufacturer_M_SHANGHAI_LEWIN_INTELLIGENT_TECHNOLOGY_CO__LTD_, true + case 594: + return KnxManufacturer_M_KG_POWER, true + case 595: + return KnxManufacturer_M_ZHEJIANG_MOORGEN_INTELLIGENT_TECHNOLOGY_CO___LTD, true + case 596: + return KnxManufacturer_M_GUANGDONG_KANWAY, true + case 597: + return KnxManufacturer_M_RAMIREZ_ENGINEERING_GMBH, true + case 598: + return KnxManufacturer_M_ZHONGSHAN_TAIYANG_IMPANDEXP__CO_LTD, true + case 599: + return KnxManufacturer_M_VIHAN_ELECTRIC_PVT_LTD, true + case 6: + return KnxManufacturer_M_BUSCH_JAEGER_ELEKTRO, true + case 60: + return KnxManufacturer_M_TECHEM, true + case 600: + return KnxManufacturer_M_SPLENDID_MINDS_GMBH, true + case 601: + return KnxManufacturer_M_ESTADA, true + case 602: + return KnxManufacturer_M_ZHONGYUNXINZHIKONGGUJITUANYOUXIANGONGSI, true + case 603: + return KnxManufacturer_M_STUHL_REGELSYSTEME_GMBH, true + case 604: + return KnxManufacturer_M_SHENZHEN_GLUCK_TECHNOLOGY_CO___LTD, true + case 605: + return KnxManufacturer_M_GAIMEX, true + case 606: + return KnxManufacturer_M_B3_INTERNATIONAL_S_R_L, true + case 607: + return KnxManufacturer_M_MM_ELECTRO, true + case 608: + return KnxManufacturer_M_CASCODA, true + case 609: + return KnxManufacturer_M_XIAMEN_INTRETECH_INC_, true + case 61: + return KnxManufacturer_M_SCHNEIDER_ELECTRIC_INDUSTRIES_SAS, true + case 610: + return KnxManufacturer_M_KILOELEC_TECHNOLOGY, true + case 611: + return KnxManufacturer_M_INYX, true + case 612: + return KnxManufacturer_M_SMART_BUILDING_SERVICES_GMBH, true + case 613: + return KnxManufacturer_M_BSS_GMBH, true + case 614: + return KnxManufacturer_M_ABB___RESERVED, true + case 615: + return KnxManufacturer_M_BUSCH_JAEGER_ELEKTRO___RESERVED, true + case 62: + return KnxManufacturer_M_WHD_WILHELM_HUBER_Plus_SOEHNE, true + case 63: + return KnxManufacturer_M_BISCHOFF_ELEKTRONIK, true + case 64: + return KnxManufacturer_M_JEPAZ, true + case 65: + return KnxManufacturer_M_RTS_AUTOMATION, true + case 66: + return KnxManufacturer_M_EIBMARKT_GMBH, true + case 67: + return KnxManufacturer_M_WAREMA_RENKHOFF_SE, true + case 68: + return KnxManufacturer_M_EELECTRON, true + case 69: + return KnxManufacturer_M_BELDEN_WIRE_AND_CABLE_B_V_, true + case 7: + return KnxManufacturer_M_GIRA_GIERSIEPEN, true + case 70: + return KnxManufacturer_M_BECKER_ANTRIEBE_GMBH, true + case 71: + return KnxManufacturer_M_J_STEHLEPlusSOEHNE_GMBH, true + case 72: + return KnxManufacturer_M_AGFEO, true + case 73: + return KnxManufacturer_M_ZENNIO, true + case 74: + return KnxManufacturer_M_TAPKO_TECHNOLOGIES, true + case 75: + return KnxManufacturer_M_HDL, true + case 76: + return KnxManufacturer_M_UPONOR, true + case 77: + return KnxManufacturer_M_SE_LIGHTMANAGEMENT_AG, true + case 78: + return KnxManufacturer_M_ARCUS_EDS, true + case 79: + return KnxManufacturer_M_INTESIS, true + case 8: + return KnxManufacturer_M_HAGER_ELECTRO, true + case 80: + return KnxManufacturer_M_HERHOLDT_CONTROLS_SRL, true + case 81: + return KnxManufacturer_M_NIKO_ZUBLIN, true + case 82: + return KnxManufacturer_M_DURABLE_TECHNOLOGIES, true + case 83: + return KnxManufacturer_M_INNOTEAM, true + case 84: + return KnxManufacturer_M_ISE_GMBH, true + case 85: + return KnxManufacturer_M_TEAM_FOR_TRONICS, true + case 86: + return KnxManufacturer_M_CIAT, true + case 87: + return KnxManufacturer_M_REMEHA_BV, true + case 88: + return KnxManufacturer_M_ESYLUX, true + case 89: + return KnxManufacturer_M_BASALTE, true + case 9: + return KnxManufacturer_M_INSTA_GMBH, true + case 90: + return KnxManufacturer_M_VESTAMATIC, true + case 91: + return KnxManufacturer_M_MDT_TECHNOLOGIES, true + case 92: + return KnxManufacturer_M_WARENDORFER_KUECHEN_GMBH, true + case 93: + return KnxManufacturer_M_VIDEO_STAR, true + case 94: + return KnxManufacturer_M_SITEK, true + case 95: + return KnxManufacturer_M_CONTROLTRONIC, true + case 96: + return KnxManufacturer_M_FUNCTION_TECHNOLOGY, true + case 97: + return KnxManufacturer_M_AMX, true + case 98: + return KnxManufacturer_M_ELDAT, true + case 99: + return KnxManufacturer_M_PANASONIC, true } return 0, false } @@ -8718,13 +7485,13 @@ func KnxManufacturerByName(value string) (enum KnxManufacturer, ok bool) { return 0, false } -func KnxManufacturerKnows(value uint16) bool { +func KnxManufacturerKnows(value uint16) bool { for _, typeValue := range KnxManufacturerValues { if uint16(typeValue) == value { return true } } - return false + return false; } func CastKnxManufacturer(structType interface{}) KnxManufacturer { @@ -10016,3 +8783,4 @@ func (e KnxManufacturer) PLC4XEnumName() string { func (e KnxManufacturer) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/knxnetip/readwrite/model/KnxMedium.go b/plc4go/protocols/knxnetip/readwrite/model/KnxMedium.go index 7bafd0df40c..b80f08aad46 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/KnxMedium.go +++ b/plc4go/protocols/knxnetip/readwrite/model/KnxMedium.go @@ -34,20 +34,20 @@ type IKnxMedium interface { utils.Serializable } -const ( +const( KnxMedium_MEDIUM_RESERVED_1 KnxMedium = 0x01 - KnxMedium_MEDIUM_TP1 KnxMedium = 0x02 - KnxMedium_MEDIUM_PL110 KnxMedium = 0x04 + KnxMedium_MEDIUM_TP1 KnxMedium = 0x02 + KnxMedium_MEDIUM_PL110 KnxMedium = 0x04 KnxMedium_MEDIUM_RESERVED_2 KnxMedium = 0x08 - KnxMedium_MEDIUM_RF KnxMedium = 0x10 - KnxMedium_MEDIUM_KNX_IP KnxMedium = 0x20 + KnxMedium_MEDIUM_RF KnxMedium = 0x10 + KnxMedium_MEDIUM_KNX_IP KnxMedium = 0x20 ) var KnxMediumValues []KnxMedium func init() { _ = errors.New - KnxMediumValues = []KnxMedium{ + KnxMediumValues = []KnxMedium { KnxMedium_MEDIUM_RESERVED_1, KnxMedium_MEDIUM_TP1, KnxMedium_MEDIUM_PL110, @@ -59,18 +59,18 @@ func init() { func KnxMediumByValue(value uint8) (enum KnxMedium, ok bool) { switch value { - case 0x01: - return KnxMedium_MEDIUM_RESERVED_1, true - case 0x02: - return KnxMedium_MEDIUM_TP1, true - case 0x04: - return KnxMedium_MEDIUM_PL110, true - case 0x08: - return KnxMedium_MEDIUM_RESERVED_2, true - case 0x10: - return KnxMedium_MEDIUM_RF, true - case 0x20: - return KnxMedium_MEDIUM_KNX_IP, true + case 0x01: + return KnxMedium_MEDIUM_RESERVED_1, true + case 0x02: + return KnxMedium_MEDIUM_TP1, true + case 0x04: + return KnxMedium_MEDIUM_PL110, true + case 0x08: + return KnxMedium_MEDIUM_RESERVED_2, true + case 0x10: + return KnxMedium_MEDIUM_RF, true + case 0x20: + return KnxMedium_MEDIUM_KNX_IP, true } return 0, false } @@ -93,13 +93,13 @@ func KnxMediumByName(value string) (enum KnxMedium, ok bool) { return 0, false } -func KnxMediumKnows(value uint8) bool { +func KnxMediumKnows(value uint8) bool { for _, typeValue := range KnxMediumValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastKnxMedium(structType interface{}) KnxMedium { @@ -171,3 +171,4 @@ func (e KnxMedium) PLC4XEnumName() string { func (e KnxMedium) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/knxnetip/readwrite/model/KnxNetIpCore.go b/plc4go/protocols/knxnetip/readwrite/model/KnxNetIpCore.go index fc45db2f33e..79ebea5bcf8 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/KnxNetIpCore.go +++ b/plc4go/protocols/knxnetip/readwrite/model/KnxNetIpCore.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // KnxNetIpCore is the corresponding interface of KnxNetIpCore type KnxNetIpCore interface { @@ -46,29 +48,29 @@ type KnxNetIpCoreExactly interface { // _KnxNetIpCore is the data-structure of this message type _KnxNetIpCore struct { *_ServiceId - Version uint8 + Version uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_KnxNetIpCore) GetServiceType() uint8 { - return 0x02 -} +func (m *_KnxNetIpCore) GetServiceType() uint8 { +return 0x02} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_KnxNetIpCore) InitializeParent(parent ServiceId) {} +func (m *_KnxNetIpCore) InitializeParent(parent ServiceId ) {} -func (m *_KnxNetIpCore) GetParent() ServiceId { +func (m *_KnxNetIpCore) GetParent() ServiceId { return m._ServiceId } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_KnxNetIpCore) GetVersion() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewKnxNetIpCore factory function for _KnxNetIpCore -func NewKnxNetIpCore(version uint8) *_KnxNetIpCore { +func NewKnxNetIpCore( version uint8 ) *_KnxNetIpCore { _result := &_KnxNetIpCore{ - Version: version, - _ServiceId: NewServiceId(), + Version: version, + _ServiceId: NewServiceId(), } _result._ServiceId._ServiceIdChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewKnxNetIpCore(version uint8) *_KnxNetIpCore { // Deprecated: use the interface for direct cast func CastKnxNetIpCore(structType interface{}) KnxNetIpCore { - if casted, ok := structType.(KnxNetIpCore); ok { + if casted, ok := structType.(KnxNetIpCore); ok { return casted } if casted, ok := structType.(*KnxNetIpCore); ok { @@ -112,11 +115,12 @@ func (m *_KnxNetIpCore) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (version) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_KnxNetIpCore) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -135,7 +139,7 @@ func KnxNetIpCoreParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe _ = currentPos // Simple Field (version) - _version, _versionErr := readBuffer.ReadUint8("version", 8) +_version, _versionErr := readBuffer.ReadUint8("version", 8) if _versionErr != nil { return nil, errors.Wrap(_versionErr, "Error parsing 'version' field of KnxNetIpCore") } @@ -147,8 +151,9 @@ func KnxNetIpCoreParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe // Create a partially initialized instance _child := &_KnxNetIpCore{ - _ServiceId: &_ServiceId{}, - Version: version, + _ServiceId: &_ServiceId{ + }, + Version: version, } _child._ServiceId._ServiceIdChildRequirements = _child return _child, nil @@ -170,12 +175,12 @@ func (m *_KnxNetIpCore) SerializeWithWriteBuffer(ctx context.Context, writeBuffe return errors.Wrap(pushErr, "Error pushing for KnxNetIpCore") } - // Simple Field (version) - version := uint8(m.GetVersion()) - _versionErr := writeBuffer.WriteUint8("version", 8, (version)) - if _versionErr != nil { - return errors.Wrap(_versionErr, "Error serializing 'version' field") - } + // Simple Field (version) + version := uint8(m.GetVersion()) + _versionErr := writeBuffer.WriteUint8("version", 8, (version)) + if _versionErr != nil { + return errors.Wrap(_versionErr, "Error serializing 'version' field") + } if popErr := writeBuffer.PopContext("KnxNetIpCore"); popErr != nil { return errors.Wrap(popErr, "Error popping for KnxNetIpCore") @@ -185,6 +190,7 @@ func (m *_KnxNetIpCore) SerializeWithWriteBuffer(ctx context.Context, writeBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_KnxNetIpCore) isKnxNetIpCore() bool { return true } @@ -199,3 +205,6 @@ func (m *_KnxNetIpCore) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/KnxNetIpDeviceManagement.go b/plc4go/protocols/knxnetip/readwrite/model/KnxNetIpDeviceManagement.go index ba82e2300ae..53c44b7a048 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/KnxNetIpDeviceManagement.go +++ b/plc4go/protocols/knxnetip/readwrite/model/KnxNetIpDeviceManagement.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // KnxNetIpDeviceManagement is the corresponding interface of KnxNetIpDeviceManagement type KnxNetIpDeviceManagement interface { @@ -46,29 +48,29 @@ type KnxNetIpDeviceManagementExactly interface { // _KnxNetIpDeviceManagement is the data-structure of this message type _KnxNetIpDeviceManagement struct { *_ServiceId - Version uint8 + Version uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_KnxNetIpDeviceManagement) GetServiceType() uint8 { - return 0x03 -} +func (m *_KnxNetIpDeviceManagement) GetServiceType() uint8 { +return 0x03} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_KnxNetIpDeviceManagement) InitializeParent(parent ServiceId) {} +func (m *_KnxNetIpDeviceManagement) InitializeParent(parent ServiceId ) {} -func (m *_KnxNetIpDeviceManagement) GetParent() ServiceId { +func (m *_KnxNetIpDeviceManagement) GetParent() ServiceId { return m._ServiceId } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_KnxNetIpDeviceManagement) GetVersion() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewKnxNetIpDeviceManagement factory function for _KnxNetIpDeviceManagement -func NewKnxNetIpDeviceManagement(version uint8) *_KnxNetIpDeviceManagement { +func NewKnxNetIpDeviceManagement( version uint8 ) *_KnxNetIpDeviceManagement { _result := &_KnxNetIpDeviceManagement{ - Version: version, - _ServiceId: NewServiceId(), + Version: version, + _ServiceId: NewServiceId(), } _result._ServiceId._ServiceIdChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewKnxNetIpDeviceManagement(version uint8) *_KnxNetIpDeviceManagement { // Deprecated: use the interface for direct cast func CastKnxNetIpDeviceManagement(structType interface{}) KnxNetIpDeviceManagement { - if casted, ok := structType.(KnxNetIpDeviceManagement); ok { + if casted, ok := structType.(KnxNetIpDeviceManagement); ok { return casted } if casted, ok := structType.(*KnxNetIpDeviceManagement); ok { @@ -112,11 +115,12 @@ func (m *_KnxNetIpDeviceManagement) GetLengthInBits(ctx context.Context) uint16 lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (version) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_KnxNetIpDeviceManagement) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -135,7 +139,7 @@ func KnxNetIpDeviceManagementParseWithBuffer(ctx context.Context, readBuffer uti _ = currentPos // Simple Field (version) - _version, _versionErr := readBuffer.ReadUint8("version", 8) +_version, _versionErr := readBuffer.ReadUint8("version", 8) if _versionErr != nil { return nil, errors.Wrap(_versionErr, "Error parsing 'version' field of KnxNetIpDeviceManagement") } @@ -147,8 +151,9 @@ func KnxNetIpDeviceManagementParseWithBuffer(ctx context.Context, readBuffer uti // Create a partially initialized instance _child := &_KnxNetIpDeviceManagement{ - _ServiceId: &_ServiceId{}, - Version: version, + _ServiceId: &_ServiceId{ + }, + Version: version, } _child._ServiceId._ServiceIdChildRequirements = _child return _child, nil @@ -170,12 +175,12 @@ func (m *_KnxNetIpDeviceManagement) SerializeWithWriteBuffer(ctx context.Context return errors.Wrap(pushErr, "Error pushing for KnxNetIpDeviceManagement") } - // Simple Field (version) - version := uint8(m.GetVersion()) - _versionErr := writeBuffer.WriteUint8("version", 8, (version)) - if _versionErr != nil { - return errors.Wrap(_versionErr, "Error serializing 'version' field") - } + // Simple Field (version) + version := uint8(m.GetVersion()) + _versionErr := writeBuffer.WriteUint8("version", 8, (version)) + if _versionErr != nil { + return errors.Wrap(_versionErr, "Error serializing 'version' field") + } if popErr := writeBuffer.PopContext("KnxNetIpDeviceManagement"); popErr != nil { return errors.Wrap(popErr, "Error popping for KnxNetIpDeviceManagement") @@ -185,6 +190,7 @@ func (m *_KnxNetIpDeviceManagement) SerializeWithWriteBuffer(ctx context.Context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_KnxNetIpDeviceManagement) isKnxNetIpDeviceManagement() bool { return true } @@ -199,3 +205,6 @@ func (m *_KnxNetIpDeviceManagement) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/KnxNetIpMessage.go b/plc4go/protocols/knxnetip/readwrite/model/KnxNetIpMessage.go index 961fa8efa66..f28326ad3f6 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/KnxNetIpMessage.go +++ b/plc4go/protocols/knxnetip/readwrite/model/KnxNetIpMessage.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -27,7 +28,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const KnxNetIpMessage_PROTOCOLVERSION uint8 = 0x10 @@ -58,6 +60,7 @@ type _KnxNetIpMessageChildRequirements interface { GetMsgType() uint16 } + type KnxNetIpMessageParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child KnxNetIpMessage, serializeChildFunction func() error) error GetTypeName() string @@ -65,13 +68,12 @@ type KnxNetIpMessageParent interface { type KnxNetIpMessageChild interface { utils.Serializable - InitializeParent(parent KnxNetIpMessage) +InitializeParent(parent KnxNetIpMessage ) GetParent() *KnxNetIpMessage GetTypeName() string KnxNetIpMessage } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for const fields. @@ -86,14 +88,15 @@ func (m *_KnxNetIpMessage) GetProtocolVersion() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewKnxNetIpMessage factory function for _KnxNetIpMessage -func NewKnxNetIpMessage() *_KnxNetIpMessage { - return &_KnxNetIpMessage{} +func NewKnxNetIpMessage( ) *_KnxNetIpMessage { +return &_KnxNetIpMessage{ } } // Deprecated: use the interface for direct cast func CastKnxNetIpMessage(structType interface{}) KnxNetIpMessage { - if casted, ok := structType.(KnxNetIpMessage); ok { + if casted, ok := structType.(KnxNetIpMessage); ok { return casted } if casted, ok := structType.(*KnxNetIpMessage); ok { @@ -106,6 +109,7 @@ func (m *_KnxNetIpMessage) GetTypeName() string { return "KnxNetIpMessage" } + func (m *_KnxNetIpMessage) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -115,7 +119,7 @@ func (m *_KnxNetIpMessage) GetParentLengthInBits(ctx context.Context) uint16 { // Const Field (protocolVersion) lengthInBits += 8 // Discriminator Field (msgType) - lengthInBits += 16 + lengthInBits += 16; // Implicit Field (totalLength) lengthInBits += 16 @@ -172,45 +176,45 @@ func KnxNetIpMessageParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type KnxNetIpMessageChildSerializeRequirement interface { KnxNetIpMessage - InitializeParent(KnxNetIpMessage) + InitializeParent(KnxNetIpMessage ) GetParent() KnxNetIpMessage } var _childTemp interface{} var _child KnxNetIpMessageChildSerializeRequirement var typeSwitchError error switch { - case msgType == 0x0201: // SearchRequest - _childTemp, typeSwitchError = SearchRequestParseWithBuffer(ctx, readBuffer) - case msgType == 0x0202: // SearchResponse - _childTemp, typeSwitchError = SearchResponseParseWithBuffer(ctx, readBuffer) - case msgType == 0x0203: // DescriptionRequest - _childTemp, typeSwitchError = DescriptionRequestParseWithBuffer(ctx, readBuffer) - case msgType == 0x0204: // DescriptionResponse - _childTemp, typeSwitchError = DescriptionResponseParseWithBuffer(ctx, readBuffer) - case msgType == 0x0205: // ConnectionRequest - _childTemp, typeSwitchError = ConnectionRequestParseWithBuffer(ctx, readBuffer) - case msgType == 0x0206: // ConnectionResponse - _childTemp, typeSwitchError = ConnectionResponseParseWithBuffer(ctx, readBuffer) - case msgType == 0x0207: // ConnectionStateRequest - _childTemp, typeSwitchError = ConnectionStateRequestParseWithBuffer(ctx, readBuffer) - case msgType == 0x0208: // ConnectionStateResponse - _childTemp, typeSwitchError = ConnectionStateResponseParseWithBuffer(ctx, readBuffer) - case msgType == 0x0209: // DisconnectRequest - _childTemp, typeSwitchError = DisconnectRequestParseWithBuffer(ctx, readBuffer) - case msgType == 0x020A: // DisconnectResponse - _childTemp, typeSwitchError = DisconnectResponseParseWithBuffer(ctx, readBuffer) - case msgType == 0x020B: // UnknownMessage +case msgType == 0x0201 : // SearchRequest + _childTemp, typeSwitchError = SearchRequestParseWithBuffer(ctx, readBuffer, ) +case msgType == 0x0202 : // SearchResponse + _childTemp, typeSwitchError = SearchResponseParseWithBuffer(ctx, readBuffer, ) +case msgType == 0x0203 : // DescriptionRequest + _childTemp, typeSwitchError = DescriptionRequestParseWithBuffer(ctx, readBuffer, ) +case msgType == 0x0204 : // DescriptionResponse + _childTemp, typeSwitchError = DescriptionResponseParseWithBuffer(ctx, readBuffer, ) +case msgType == 0x0205 : // ConnectionRequest + _childTemp, typeSwitchError = ConnectionRequestParseWithBuffer(ctx, readBuffer, ) +case msgType == 0x0206 : // ConnectionResponse + _childTemp, typeSwitchError = ConnectionResponseParseWithBuffer(ctx, readBuffer, ) +case msgType == 0x0207 : // ConnectionStateRequest + _childTemp, typeSwitchError = ConnectionStateRequestParseWithBuffer(ctx, readBuffer, ) +case msgType == 0x0208 : // ConnectionStateResponse + _childTemp, typeSwitchError = ConnectionStateResponseParseWithBuffer(ctx, readBuffer, ) +case msgType == 0x0209 : // DisconnectRequest + _childTemp, typeSwitchError = DisconnectRequestParseWithBuffer(ctx, readBuffer, ) +case msgType == 0x020A : // DisconnectResponse + _childTemp, typeSwitchError = DisconnectResponseParseWithBuffer(ctx, readBuffer, ) +case msgType == 0x020B : // UnknownMessage _childTemp, typeSwitchError = UnknownMessageParseWithBuffer(ctx, readBuffer, totalLength) - case msgType == 0x0310: // DeviceConfigurationRequest +case msgType == 0x0310 : // DeviceConfigurationRequest _childTemp, typeSwitchError = DeviceConfigurationRequestParseWithBuffer(ctx, readBuffer, totalLength) - case msgType == 0x0311: // DeviceConfigurationAck - _childTemp, typeSwitchError = DeviceConfigurationAckParseWithBuffer(ctx, readBuffer) - case msgType == 0x0420: // TunnelingRequest +case msgType == 0x0311 : // DeviceConfigurationAck + _childTemp, typeSwitchError = DeviceConfigurationAckParseWithBuffer(ctx, readBuffer, ) +case msgType == 0x0420 : // TunnelingRequest _childTemp, typeSwitchError = TunnelingRequestParseWithBuffer(ctx, readBuffer, totalLength) - case msgType == 0x0421: // TunnelingResponse - _childTemp, typeSwitchError = TunnelingResponseParseWithBuffer(ctx, readBuffer) - case msgType == 0x0530: // RoutingIndication - _childTemp, typeSwitchError = RoutingIndicationParseWithBuffer(ctx, readBuffer) +case msgType == 0x0421 : // TunnelingResponse + _childTemp, typeSwitchError = TunnelingResponseParseWithBuffer(ctx, readBuffer, ) +case msgType == 0x0530 : // RoutingIndication + _childTemp, typeSwitchError = RoutingIndicationParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [msgType=%v]", msgType) } @@ -224,7 +228,7 @@ func KnxNetIpMessageParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu } // Finish initializing - _child.InitializeParent(_child) +_child.InitializeParent(_child ) return _child, nil } @@ -234,7 +238,7 @@ func (pm *_KnxNetIpMessage) SerializeParent(ctx context.Context, writeBuffer uti _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("KnxNetIpMessage"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("KnxNetIpMessage"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for KnxNetIpMessage") } @@ -277,6 +281,7 @@ func (pm *_KnxNetIpMessage) SerializeParent(ctx context.Context, writeBuffer uti return nil } + func (m *_KnxNetIpMessage) isKnxNetIpMessage() bool { return true } @@ -291,3 +296,6 @@ func (m *_KnxNetIpMessage) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/KnxNetIpRouting.go b/plc4go/protocols/knxnetip/readwrite/model/KnxNetIpRouting.go index 97c03fc6f93..72512ec9d75 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/KnxNetIpRouting.go +++ b/plc4go/protocols/knxnetip/readwrite/model/KnxNetIpRouting.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // KnxNetIpRouting is the corresponding interface of KnxNetIpRouting type KnxNetIpRouting interface { @@ -46,29 +48,29 @@ type KnxNetIpRoutingExactly interface { // _KnxNetIpRouting is the data-structure of this message type _KnxNetIpRouting struct { *_ServiceId - Version uint8 + Version uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_KnxNetIpRouting) GetServiceType() uint8 { - return 0x05 -} +func (m *_KnxNetIpRouting) GetServiceType() uint8 { +return 0x05} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_KnxNetIpRouting) InitializeParent(parent ServiceId) {} +func (m *_KnxNetIpRouting) InitializeParent(parent ServiceId ) {} -func (m *_KnxNetIpRouting) GetParent() ServiceId { +func (m *_KnxNetIpRouting) GetParent() ServiceId { return m._ServiceId } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_KnxNetIpRouting) GetVersion() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewKnxNetIpRouting factory function for _KnxNetIpRouting -func NewKnxNetIpRouting(version uint8) *_KnxNetIpRouting { +func NewKnxNetIpRouting( version uint8 ) *_KnxNetIpRouting { _result := &_KnxNetIpRouting{ - Version: version, - _ServiceId: NewServiceId(), + Version: version, + _ServiceId: NewServiceId(), } _result._ServiceId._ServiceIdChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewKnxNetIpRouting(version uint8) *_KnxNetIpRouting { // Deprecated: use the interface for direct cast func CastKnxNetIpRouting(structType interface{}) KnxNetIpRouting { - if casted, ok := structType.(KnxNetIpRouting); ok { + if casted, ok := structType.(KnxNetIpRouting); ok { return casted } if casted, ok := structType.(*KnxNetIpRouting); ok { @@ -112,11 +115,12 @@ func (m *_KnxNetIpRouting) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (version) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_KnxNetIpRouting) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -135,7 +139,7 @@ func KnxNetIpRoutingParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu _ = currentPos // Simple Field (version) - _version, _versionErr := readBuffer.ReadUint8("version", 8) +_version, _versionErr := readBuffer.ReadUint8("version", 8) if _versionErr != nil { return nil, errors.Wrap(_versionErr, "Error parsing 'version' field of KnxNetIpRouting") } @@ -147,8 +151,9 @@ func KnxNetIpRoutingParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu // Create a partially initialized instance _child := &_KnxNetIpRouting{ - _ServiceId: &_ServiceId{}, - Version: version, + _ServiceId: &_ServiceId{ + }, + Version: version, } _child._ServiceId._ServiceIdChildRequirements = _child return _child, nil @@ -170,12 +175,12 @@ func (m *_KnxNetIpRouting) SerializeWithWriteBuffer(ctx context.Context, writeBu return errors.Wrap(pushErr, "Error pushing for KnxNetIpRouting") } - // Simple Field (version) - version := uint8(m.GetVersion()) - _versionErr := writeBuffer.WriteUint8("version", 8, (version)) - if _versionErr != nil { - return errors.Wrap(_versionErr, "Error serializing 'version' field") - } + // Simple Field (version) + version := uint8(m.GetVersion()) + _versionErr := writeBuffer.WriteUint8("version", 8, (version)) + if _versionErr != nil { + return errors.Wrap(_versionErr, "Error serializing 'version' field") + } if popErr := writeBuffer.PopContext("KnxNetIpRouting"); popErr != nil { return errors.Wrap(popErr, "Error popping for KnxNetIpRouting") @@ -185,6 +190,7 @@ func (m *_KnxNetIpRouting) SerializeWithWriteBuffer(ctx context.Context, writeBu return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_KnxNetIpRouting) isKnxNetIpRouting() bool { return true } @@ -199,3 +205,6 @@ func (m *_KnxNetIpRouting) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/KnxNetIpTunneling.go b/plc4go/protocols/knxnetip/readwrite/model/KnxNetIpTunneling.go index bf1b94359fe..618383293df 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/KnxNetIpTunneling.go +++ b/plc4go/protocols/knxnetip/readwrite/model/KnxNetIpTunneling.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // KnxNetIpTunneling is the corresponding interface of KnxNetIpTunneling type KnxNetIpTunneling interface { @@ -46,29 +48,29 @@ type KnxNetIpTunnelingExactly interface { // _KnxNetIpTunneling is the data-structure of this message type _KnxNetIpTunneling struct { *_ServiceId - Version uint8 + Version uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_KnxNetIpTunneling) GetServiceType() uint8 { - return 0x04 -} +func (m *_KnxNetIpTunneling) GetServiceType() uint8 { +return 0x04} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_KnxNetIpTunneling) InitializeParent(parent ServiceId) {} +func (m *_KnxNetIpTunneling) InitializeParent(parent ServiceId ) {} -func (m *_KnxNetIpTunneling) GetParent() ServiceId { +func (m *_KnxNetIpTunneling) GetParent() ServiceId { return m._ServiceId } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_KnxNetIpTunneling) GetVersion() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewKnxNetIpTunneling factory function for _KnxNetIpTunneling -func NewKnxNetIpTunneling(version uint8) *_KnxNetIpTunneling { +func NewKnxNetIpTunneling( version uint8 ) *_KnxNetIpTunneling { _result := &_KnxNetIpTunneling{ - Version: version, - _ServiceId: NewServiceId(), + Version: version, + _ServiceId: NewServiceId(), } _result._ServiceId._ServiceIdChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewKnxNetIpTunneling(version uint8) *_KnxNetIpTunneling { // Deprecated: use the interface for direct cast func CastKnxNetIpTunneling(structType interface{}) KnxNetIpTunneling { - if casted, ok := structType.(KnxNetIpTunneling); ok { + if casted, ok := structType.(KnxNetIpTunneling); ok { return casted } if casted, ok := structType.(*KnxNetIpTunneling); ok { @@ -112,11 +115,12 @@ func (m *_KnxNetIpTunneling) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (version) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_KnxNetIpTunneling) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -135,7 +139,7 @@ func KnxNetIpTunnelingParseWithBuffer(ctx context.Context, readBuffer utils.Read _ = currentPos // Simple Field (version) - _version, _versionErr := readBuffer.ReadUint8("version", 8) +_version, _versionErr := readBuffer.ReadUint8("version", 8) if _versionErr != nil { return nil, errors.Wrap(_versionErr, "Error parsing 'version' field of KnxNetIpTunneling") } @@ -147,8 +151,9 @@ func KnxNetIpTunnelingParseWithBuffer(ctx context.Context, readBuffer utils.Read // Create a partially initialized instance _child := &_KnxNetIpTunneling{ - _ServiceId: &_ServiceId{}, - Version: version, + _ServiceId: &_ServiceId{ + }, + Version: version, } _child._ServiceId._ServiceIdChildRequirements = _child return _child, nil @@ -170,12 +175,12 @@ func (m *_KnxNetIpTunneling) SerializeWithWriteBuffer(ctx context.Context, write return errors.Wrap(pushErr, "Error pushing for KnxNetIpTunneling") } - // Simple Field (version) - version := uint8(m.GetVersion()) - _versionErr := writeBuffer.WriteUint8("version", 8, (version)) - if _versionErr != nil { - return errors.Wrap(_versionErr, "Error serializing 'version' field") - } + // Simple Field (version) + version := uint8(m.GetVersion()) + _versionErr := writeBuffer.WriteUint8("version", 8, (version)) + if _versionErr != nil { + return errors.Wrap(_versionErr, "Error serializing 'version' field") + } if popErr := writeBuffer.PopContext("KnxNetIpTunneling"); popErr != nil { return errors.Wrap(popErr, "Error popping for KnxNetIpTunneling") @@ -185,6 +190,7 @@ func (m *_KnxNetIpTunneling) SerializeWithWriteBuffer(ctx context.Context, write return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_KnxNetIpTunneling) isKnxNetIpTunneling() bool { return true } @@ -199,3 +205,6 @@ func (m *_KnxNetIpTunneling) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/KnxNetObjectServer.go b/plc4go/protocols/knxnetip/readwrite/model/KnxNetObjectServer.go index 0ec1e3907b9..14af5c15173 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/KnxNetObjectServer.go +++ b/plc4go/protocols/knxnetip/readwrite/model/KnxNetObjectServer.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // KnxNetObjectServer is the corresponding interface of KnxNetObjectServer type KnxNetObjectServer interface { @@ -46,29 +48,29 @@ type KnxNetObjectServerExactly interface { // _KnxNetObjectServer is the data-structure of this message type _KnxNetObjectServer struct { *_ServiceId - Version uint8 + Version uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_KnxNetObjectServer) GetServiceType() uint8 { - return 0x08 -} +func (m *_KnxNetObjectServer) GetServiceType() uint8 { +return 0x08} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_KnxNetObjectServer) InitializeParent(parent ServiceId) {} +func (m *_KnxNetObjectServer) InitializeParent(parent ServiceId ) {} -func (m *_KnxNetObjectServer) GetParent() ServiceId { +func (m *_KnxNetObjectServer) GetParent() ServiceId { return m._ServiceId } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_KnxNetObjectServer) GetVersion() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewKnxNetObjectServer factory function for _KnxNetObjectServer -func NewKnxNetObjectServer(version uint8) *_KnxNetObjectServer { +func NewKnxNetObjectServer( version uint8 ) *_KnxNetObjectServer { _result := &_KnxNetObjectServer{ - Version: version, - _ServiceId: NewServiceId(), + Version: version, + _ServiceId: NewServiceId(), } _result._ServiceId._ServiceIdChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewKnxNetObjectServer(version uint8) *_KnxNetObjectServer { // Deprecated: use the interface for direct cast func CastKnxNetObjectServer(structType interface{}) KnxNetObjectServer { - if casted, ok := structType.(KnxNetObjectServer); ok { + if casted, ok := structType.(KnxNetObjectServer); ok { return casted } if casted, ok := structType.(*KnxNetObjectServer); ok { @@ -112,11 +115,12 @@ func (m *_KnxNetObjectServer) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (version) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_KnxNetObjectServer) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -135,7 +139,7 @@ func KnxNetObjectServerParseWithBuffer(ctx context.Context, readBuffer utils.Rea _ = currentPos // Simple Field (version) - _version, _versionErr := readBuffer.ReadUint8("version", 8) +_version, _versionErr := readBuffer.ReadUint8("version", 8) if _versionErr != nil { return nil, errors.Wrap(_versionErr, "Error parsing 'version' field of KnxNetObjectServer") } @@ -147,8 +151,9 @@ func KnxNetObjectServerParseWithBuffer(ctx context.Context, readBuffer utils.Rea // Create a partially initialized instance _child := &_KnxNetObjectServer{ - _ServiceId: &_ServiceId{}, - Version: version, + _ServiceId: &_ServiceId{ + }, + Version: version, } _child._ServiceId._ServiceIdChildRequirements = _child return _child, nil @@ -170,12 +175,12 @@ func (m *_KnxNetObjectServer) SerializeWithWriteBuffer(ctx context.Context, writ return errors.Wrap(pushErr, "Error pushing for KnxNetObjectServer") } - // Simple Field (version) - version := uint8(m.GetVersion()) - _versionErr := writeBuffer.WriteUint8("version", 8, (version)) - if _versionErr != nil { - return errors.Wrap(_versionErr, "Error serializing 'version' field") - } + // Simple Field (version) + version := uint8(m.GetVersion()) + _versionErr := writeBuffer.WriteUint8("version", 8, (version)) + if _versionErr != nil { + return errors.Wrap(_versionErr, "Error serializing 'version' field") + } if popErr := writeBuffer.PopContext("KnxNetObjectServer"); popErr != nil { return errors.Wrap(popErr, "Error popping for KnxNetObjectServer") @@ -185,6 +190,7 @@ func (m *_KnxNetObjectServer) SerializeWithWriteBuffer(ctx context.Context, writ return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_KnxNetObjectServer) isKnxNetObjectServer() bool { return true } @@ -199,3 +205,6 @@ func (m *_KnxNetObjectServer) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/KnxNetRemoteConfigurationAndDiagnosis.go b/plc4go/protocols/knxnetip/readwrite/model/KnxNetRemoteConfigurationAndDiagnosis.go index ec1efaf0728..9d3a69ee2db 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/KnxNetRemoteConfigurationAndDiagnosis.go +++ b/plc4go/protocols/knxnetip/readwrite/model/KnxNetRemoteConfigurationAndDiagnosis.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // KnxNetRemoteConfigurationAndDiagnosis is the corresponding interface of KnxNetRemoteConfigurationAndDiagnosis type KnxNetRemoteConfigurationAndDiagnosis interface { @@ -46,29 +48,29 @@ type KnxNetRemoteConfigurationAndDiagnosisExactly interface { // _KnxNetRemoteConfigurationAndDiagnosis is the data-structure of this message type _KnxNetRemoteConfigurationAndDiagnosis struct { *_ServiceId - Version uint8 + Version uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_KnxNetRemoteConfigurationAndDiagnosis) GetServiceType() uint8 { - return 0x07 -} +func (m *_KnxNetRemoteConfigurationAndDiagnosis) GetServiceType() uint8 { +return 0x07} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_KnxNetRemoteConfigurationAndDiagnosis) InitializeParent(parent ServiceId) {} +func (m *_KnxNetRemoteConfigurationAndDiagnosis) InitializeParent(parent ServiceId ) {} -func (m *_KnxNetRemoteConfigurationAndDiagnosis) GetParent() ServiceId { +func (m *_KnxNetRemoteConfigurationAndDiagnosis) GetParent() ServiceId { return m._ServiceId } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_KnxNetRemoteConfigurationAndDiagnosis) GetVersion() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewKnxNetRemoteConfigurationAndDiagnosis factory function for _KnxNetRemoteConfigurationAndDiagnosis -func NewKnxNetRemoteConfigurationAndDiagnosis(version uint8) *_KnxNetRemoteConfigurationAndDiagnosis { +func NewKnxNetRemoteConfigurationAndDiagnosis( version uint8 ) *_KnxNetRemoteConfigurationAndDiagnosis { _result := &_KnxNetRemoteConfigurationAndDiagnosis{ - Version: version, - _ServiceId: NewServiceId(), + Version: version, + _ServiceId: NewServiceId(), } _result._ServiceId._ServiceIdChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewKnxNetRemoteConfigurationAndDiagnosis(version uint8) *_KnxNetRemoteConfi // Deprecated: use the interface for direct cast func CastKnxNetRemoteConfigurationAndDiagnosis(structType interface{}) KnxNetRemoteConfigurationAndDiagnosis { - if casted, ok := structType.(KnxNetRemoteConfigurationAndDiagnosis); ok { + if casted, ok := structType.(KnxNetRemoteConfigurationAndDiagnosis); ok { return casted } if casted, ok := structType.(*KnxNetRemoteConfigurationAndDiagnosis); ok { @@ -112,11 +115,12 @@ func (m *_KnxNetRemoteConfigurationAndDiagnosis) GetLengthInBits(ctx context.Con lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (version) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_KnxNetRemoteConfigurationAndDiagnosis) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -135,7 +139,7 @@ func KnxNetRemoteConfigurationAndDiagnosisParseWithBuffer(ctx context.Context, r _ = currentPos // Simple Field (version) - _version, _versionErr := readBuffer.ReadUint8("version", 8) +_version, _versionErr := readBuffer.ReadUint8("version", 8) if _versionErr != nil { return nil, errors.Wrap(_versionErr, "Error parsing 'version' field of KnxNetRemoteConfigurationAndDiagnosis") } @@ -147,8 +151,9 @@ func KnxNetRemoteConfigurationAndDiagnosisParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_KnxNetRemoteConfigurationAndDiagnosis{ - _ServiceId: &_ServiceId{}, - Version: version, + _ServiceId: &_ServiceId{ + }, + Version: version, } _child._ServiceId._ServiceIdChildRequirements = _child return _child, nil @@ -170,12 +175,12 @@ func (m *_KnxNetRemoteConfigurationAndDiagnosis) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for KnxNetRemoteConfigurationAndDiagnosis") } - // Simple Field (version) - version := uint8(m.GetVersion()) - _versionErr := writeBuffer.WriteUint8("version", 8, (version)) - if _versionErr != nil { - return errors.Wrap(_versionErr, "Error serializing 'version' field") - } + // Simple Field (version) + version := uint8(m.GetVersion()) + _versionErr := writeBuffer.WriteUint8("version", 8, (version)) + if _versionErr != nil { + return errors.Wrap(_versionErr, "Error serializing 'version' field") + } if popErr := writeBuffer.PopContext("KnxNetRemoteConfigurationAndDiagnosis"); popErr != nil { return errors.Wrap(popErr, "Error popping for KnxNetRemoteConfigurationAndDiagnosis") @@ -185,6 +190,7 @@ func (m *_KnxNetRemoteConfigurationAndDiagnosis) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_KnxNetRemoteConfigurationAndDiagnosis) isKnxNetRemoteConfigurationAndDiagnosis() bool { return true } @@ -199,3 +205,6 @@ func (m *_KnxNetRemoteConfigurationAndDiagnosis) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/KnxNetRemoteLogging.go b/plc4go/protocols/knxnetip/readwrite/model/KnxNetRemoteLogging.go index 23a94c3eb3a..414eaa8f56e 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/KnxNetRemoteLogging.go +++ b/plc4go/protocols/knxnetip/readwrite/model/KnxNetRemoteLogging.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // KnxNetRemoteLogging is the corresponding interface of KnxNetRemoteLogging type KnxNetRemoteLogging interface { @@ -46,29 +48,29 @@ type KnxNetRemoteLoggingExactly interface { // _KnxNetRemoteLogging is the data-structure of this message type _KnxNetRemoteLogging struct { *_ServiceId - Version uint8 + Version uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_KnxNetRemoteLogging) GetServiceType() uint8 { - return 0x06 -} +func (m *_KnxNetRemoteLogging) GetServiceType() uint8 { +return 0x06} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_KnxNetRemoteLogging) InitializeParent(parent ServiceId) {} +func (m *_KnxNetRemoteLogging) InitializeParent(parent ServiceId ) {} -func (m *_KnxNetRemoteLogging) GetParent() ServiceId { +func (m *_KnxNetRemoteLogging) GetParent() ServiceId { return m._ServiceId } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_KnxNetRemoteLogging) GetVersion() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewKnxNetRemoteLogging factory function for _KnxNetRemoteLogging -func NewKnxNetRemoteLogging(version uint8) *_KnxNetRemoteLogging { +func NewKnxNetRemoteLogging( version uint8 ) *_KnxNetRemoteLogging { _result := &_KnxNetRemoteLogging{ - Version: version, - _ServiceId: NewServiceId(), + Version: version, + _ServiceId: NewServiceId(), } _result._ServiceId._ServiceIdChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewKnxNetRemoteLogging(version uint8) *_KnxNetRemoteLogging { // Deprecated: use the interface for direct cast func CastKnxNetRemoteLogging(structType interface{}) KnxNetRemoteLogging { - if casted, ok := structType.(KnxNetRemoteLogging); ok { + if casted, ok := structType.(KnxNetRemoteLogging); ok { return casted } if casted, ok := structType.(*KnxNetRemoteLogging); ok { @@ -112,11 +115,12 @@ func (m *_KnxNetRemoteLogging) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (version) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_KnxNetRemoteLogging) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -135,7 +139,7 @@ func KnxNetRemoteLoggingParseWithBuffer(ctx context.Context, readBuffer utils.Re _ = currentPos // Simple Field (version) - _version, _versionErr := readBuffer.ReadUint8("version", 8) +_version, _versionErr := readBuffer.ReadUint8("version", 8) if _versionErr != nil { return nil, errors.Wrap(_versionErr, "Error parsing 'version' field of KnxNetRemoteLogging") } @@ -147,8 +151,9 @@ func KnxNetRemoteLoggingParseWithBuffer(ctx context.Context, readBuffer utils.Re // Create a partially initialized instance _child := &_KnxNetRemoteLogging{ - _ServiceId: &_ServiceId{}, - Version: version, + _ServiceId: &_ServiceId{ + }, + Version: version, } _child._ServiceId._ServiceIdChildRequirements = _child return _child, nil @@ -170,12 +175,12 @@ func (m *_KnxNetRemoteLogging) SerializeWithWriteBuffer(ctx context.Context, wri return errors.Wrap(pushErr, "Error pushing for KnxNetRemoteLogging") } - // Simple Field (version) - version := uint8(m.GetVersion()) - _versionErr := writeBuffer.WriteUint8("version", 8, (version)) - if _versionErr != nil { - return errors.Wrap(_versionErr, "Error serializing 'version' field") - } + // Simple Field (version) + version := uint8(m.GetVersion()) + _versionErr := writeBuffer.WriteUint8("version", 8, (version)) + if _versionErr != nil { + return errors.Wrap(_versionErr, "Error serializing 'version' field") + } if popErr := writeBuffer.PopContext("KnxNetRemoteLogging"); popErr != nil { return errors.Wrap(popErr, "Error popping for KnxNetRemoteLogging") @@ -185,6 +190,7 @@ func (m *_KnxNetRemoteLogging) SerializeWithWriteBuffer(ctx context.Context, wri return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_KnxNetRemoteLogging) isKnxNetRemoteLogging() bool { return true } @@ -199,3 +205,6 @@ func (m *_KnxNetRemoteLogging) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/KnxProperty.go b/plc4go/protocols/knxnetip/readwrite/model/KnxProperty.go index 148e4be487c..9dcc5283aca 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/KnxProperty.go +++ b/plc4go/protocols/knxnetip/readwrite/model/KnxProperty.go @@ -19,16 +19,17 @@ package model + import ( "context" - api "github.com/apache/plc4x/plc4go/pkg/api/values" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/apache/plc4x/plc4go/spi/values" "github.com/pkg/errors" + api "github.com/apache/plc4x/plc4go/pkg/api/values" ) -// Code generated by code-generation. DO NOT EDIT. - + // Code generated by code-generation. DO NOT EDIT. + func KnxPropertyParse(ctx context.Context, theBytes []byte, propertyType KnxPropertyDataType, dataLengthInBytes uint8) (api.PlcValue, error) { return KnxPropertyParseWithBuffer(ctx, utils.NewReadBufferByteBased(theBytes), propertyType, dataLengthInBytes) } @@ -36,808 +37,808 @@ func KnxPropertyParse(ctx context.Context, theBytes []byte, propertyType KnxProp func KnxPropertyParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, propertyType KnxPropertyDataType, dataLengthInBytes uint8) (api.PlcValue, error) { readBuffer.PullContext("KnxProperty") switch { - case propertyType == KnxPropertyDataType_PDT_CONTROL: // BOOL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadBit("value") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxProperty") - return values.NewPlcBOOL(value), nil - case propertyType == KnxPropertyDataType_PDT_CHAR: // SINT - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxProperty") - return values.NewPlcSINT(value), nil - case propertyType == KnxPropertyDataType_PDT_UNSIGNED_CHAR: // USINT - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxProperty") - return values.NewPlcUSINT(value), nil - case propertyType == KnxPropertyDataType_PDT_INT: // INT - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt16("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxProperty") - return values.NewPlcINT(value), nil - case propertyType == KnxPropertyDataType_PDT_UNSIGNED_INT && dataLengthInBytes == uint8(4): // UDINT - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxProperty") - return values.NewPlcUDINT(value), nil - case propertyType == KnxPropertyDataType_PDT_UNSIGNED_INT: // UINT - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint16("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxProperty") - return values.NewPlcUINT(value), nil - case propertyType == KnxPropertyDataType_PDT_KNX_FLOAT: // REAL - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxProperty") - return values.NewPlcREAL(value), nil - case propertyType == KnxPropertyDataType_PDT_DATE: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 3); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (dayOfMonth) - dayOfMonth, _dayOfMonthErr := readBuffer.ReadUint8("dayOfMonth", 5) - if _dayOfMonthErr != nil { - return nil, errors.Wrap(_dayOfMonthErr, "Error parsing 'dayOfMonth' field") - } - _map["Struct"] = values.NewPlcUSINT(dayOfMonth) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (month) - month, _monthErr := readBuffer.ReadUint8("month", 4) - if _monthErr != nil { - return nil, errors.Wrap(_monthErr, "Error parsing 'month' field") - } - _map["Struct"] = values.NewPlcUSINT(month) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 1); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (year) - year, _yearErr := readBuffer.ReadUint8("year", 7) - if _yearErr != nil { - return nil, errors.Wrap(_yearErr, "Error parsing 'year' field") - } - _map["Struct"] = values.NewPlcUSINT(year) - readBuffer.CloseContext("KnxProperty") - return values.NewPlcStruct(_map), nil - case propertyType == KnxPropertyDataType_PDT_TIME: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Simple Field (day) - day, _dayErr := readBuffer.ReadUint8("day", 3) - if _dayErr != nil { - return nil, errors.Wrap(_dayErr, "Error parsing 'day' field") - } - _map["Struct"] = values.NewPlcUSINT(day) - - // Simple Field (hour) - hour, _hourErr := readBuffer.ReadUint8("hour", 5) - if _hourErr != nil { - return nil, errors.Wrap(_hourErr, "Error parsing 'hour' field") - } - _map["Struct"] = values.NewPlcUSINT(hour) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 2); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (minutes) - minutes, _minutesErr := readBuffer.ReadUint8("minutes", 6) - if _minutesErr != nil { - return nil, errors.Wrap(_minutesErr, "Error parsing 'minutes' field") - } - _map["Struct"] = values.NewPlcUSINT(minutes) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 2); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (seconds) - seconds, _secondsErr := readBuffer.ReadUint8("seconds", 6) - if _secondsErr != nil { - return nil, errors.Wrap(_secondsErr, "Error parsing 'seconds' field") - } - _map["Struct"] = values.NewPlcUSINT(seconds) - readBuffer.CloseContext("KnxProperty") - return values.NewPlcStruct(_map), nil - case propertyType == KnxPropertyDataType_PDT_LONG: // DINT - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxProperty") - return values.NewPlcDINT(value), nil - case propertyType == KnxPropertyDataType_PDT_UNSIGNED_LONG: // UDINT - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxProperty") - return values.NewPlcUDINT(value), nil - case propertyType == KnxPropertyDataType_PDT_FLOAT: // REAL - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxProperty") - return values.NewPlcREAL(value), nil - case propertyType == KnxPropertyDataType_PDT_DOUBLE: // LREAL - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat64("value", 64) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxProperty") - return values.NewPlcLREAL(value), nil - case propertyType == KnxPropertyDataType_PDT_CHAR_BLOCK: // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int((10)); i++ { - _item, _itemErr := readBuffer.ReadByte("value") - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcBYTE(_item)) - } - readBuffer.CloseContext("KnxProperty") - return values.NewPlcList(value), nil - case propertyType == KnxPropertyDataType_PDT_POLL_GROUP_SETTINGS: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Array Field (groupAddress) - var groupAddress []api.PlcValue - for i := 0; i < int((2)); i++ { - _item, _itemErr := readBuffer.ReadByte("groupAddress") - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - groupAddress = append(groupAddress, values.NewPlcBYTE(_item)) - } - - // Simple Field (disable) - disable, _disableErr := readBuffer.ReadBit("disable") - if _disableErr != nil { - return nil, errors.Wrap(_disableErr, "Error parsing 'disable' field") - } - _map["Struct"] = values.NewPlcBOOL(disable) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 3); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (pollingSoftNr) - pollingSoftNr, _pollingSoftNrErr := readBuffer.ReadUint8("pollingSoftNr", 4) - if _pollingSoftNrErr != nil { - return nil, errors.Wrap(_pollingSoftNrErr, "Error parsing 'pollingSoftNr' field") - } - _map["Struct"] = values.NewPlcUSINT(pollingSoftNr) - readBuffer.CloseContext("KnxProperty") - return values.NewPlcStruct(_map), nil - case propertyType == KnxPropertyDataType_PDT_SHORT_CHAR_BLOCK: // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int((5)); i++ { - _item, _itemErr := readBuffer.ReadByte("value") - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcBYTE(_item)) - } - readBuffer.CloseContext("KnxProperty") - return values.NewPlcList(value), nil - case propertyType == KnxPropertyDataType_PDT_DATE_TIME: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Simple Field (year) - year, _yearErr := readBuffer.ReadUint8("year", 8) - if _yearErr != nil { - return nil, errors.Wrap(_yearErr, "Error parsing 'year' field") - } - _map["Struct"] = values.NewPlcUSINT(year) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (month) - month, _monthErr := readBuffer.ReadUint8("month", 4) - if _monthErr != nil { - return nil, errors.Wrap(_monthErr, "Error parsing 'month' field") - } - _map["Struct"] = values.NewPlcUSINT(month) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 3); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (dayofmonth) - dayofmonth, _dayofmonthErr := readBuffer.ReadUint8("dayofmonth", 5) - if _dayofmonthErr != nil { - return nil, errors.Wrap(_dayofmonthErr, "Error parsing 'dayofmonth' field") - } - _map["Struct"] = values.NewPlcUSINT(dayofmonth) - - // Simple Field (dayofweek) - dayofweek, _dayofweekErr := readBuffer.ReadUint8("dayofweek", 3) - if _dayofweekErr != nil { - return nil, errors.Wrap(_dayofweekErr, "Error parsing 'dayofweek' field") - } - _map["Struct"] = values.NewPlcUSINT(dayofweek) - - // Simple Field (hourofday) - hourofday, _hourofdayErr := readBuffer.ReadUint8("hourofday", 5) - if _hourofdayErr != nil { - return nil, errors.Wrap(_hourofdayErr, "Error parsing 'hourofday' field") - } - _map["Struct"] = values.NewPlcUSINT(hourofday) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 2); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (minutes) - minutes, _minutesErr := readBuffer.ReadUint8("minutes", 6) - if _minutesErr != nil { - return nil, errors.Wrap(_minutesErr, "Error parsing 'minutes' field") - } - _map["Struct"] = values.NewPlcUSINT(minutes) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 2); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (seconds) - seconds, _secondsErr := readBuffer.ReadUint8("seconds", 6) - if _secondsErr != nil { - return nil, errors.Wrap(_secondsErr, "Error parsing 'seconds' field") - } - _map["Struct"] = values.NewPlcUSINT(seconds) - - // Simple Field (fault) - fault, _faultErr := readBuffer.ReadBit("fault") - if _faultErr != nil { - return nil, errors.Wrap(_faultErr, "Error parsing 'fault' field") - } - _map["Struct"] = values.NewPlcBOOL(fault) - - // Simple Field (workingDay) - workingDay, _workingDayErr := readBuffer.ReadBit("workingDay") - if _workingDayErr != nil { - return nil, errors.Wrap(_workingDayErr, "Error parsing 'workingDay' field") - } - _map["Struct"] = values.NewPlcBOOL(workingDay) - - // Simple Field (noWd) - noWd, _noWdErr := readBuffer.ReadBit("noWd") - if _noWdErr != nil { - return nil, errors.Wrap(_noWdErr, "Error parsing 'noWd' field") - } - _map["Struct"] = values.NewPlcBOOL(noWd) - - // Simple Field (noYear) - noYear, _noYearErr := readBuffer.ReadBit("noYear") - if _noYearErr != nil { - return nil, errors.Wrap(_noYearErr, "Error parsing 'noYear' field") - } - _map["Struct"] = values.NewPlcBOOL(noYear) - - // Simple Field (noDate) - noDate, _noDateErr := readBuffer.ReadBit("noDate") - if _noDateErr != nil { - return nil, errors.Wrap(_noDateErr, "Error parsing 'noDate' field") - } - _map["Struct"] = values.NewPlcBOOL(noDate) - - // Simple Field (noDayOfWeek) - noDayOfWeek, _noDayOfWeekErr := readBuffer.ReadBit("noDayOfWeek") - if _noDayOfWeekErr != nil { - return nil, errors.Wrap(_noDayOfWeekErr, "Error parsing 'noDayOfWeek' field") - } - _map["Struct"] = values.NewPlcBOOL(noDayOfWeek) - - // Simple Field (noTime) - noTime, _noTimeErr := readBuffer.ReadBit("noTime") - if _noTimeErr != nil { - return nil, errors.Wrap(_noTimeErr, "Error parsing 'noTime' field") - } - _map["Struct"] = values.NewPlcBOOL(noTime) - - // Simple Field (standardSummerTime) - standardSummerTime, _standardSummerTimeErr := readBuffer.ReadBit("standardSummerTime") - if _standardSummerTimeErr != nil { - return nil, errors.Wrap(_standardSummerTimeErr, "Error parsing 'standardSummerTime' field") - } - _map["Struct"] = values.NewPlcBOOL(standardSummerTime) - - // Simple Field (qualityOfClock) - qualityOfClock, _qualityOfClockErr := readBuffer.ReadBit("qualityOfClock") - if _qualityOfClockErr != nil { - return nil, errors.Wrap(_qualityOfClockErr, "Error parsing 'qualityOfClock' field") - } - _map["Struct"] = values.NewPlcBOOL(qualityOfClock) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - readBuffer.CloseContext("KnxProperty") - return values.NewPlcStruct(_map), nil - case propertyType == KnxPropertyDataType_PDT_GENERIC_01: // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int((1)); i++ { - _item, _itemErr := readBuffer.ReadByte("value") - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcBYTE(_item)) - } - readBuffer.CloseContext("KnxProperty") - return values.NewPlcList(value), nil - case propertyType == KnxPropertyDataType_PDT_GENERIC_02: // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int((2)); i++ { - _item, _itemErr := readBuffer.ReadByte("value") - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcBYTE(_item)) - } - readBuffer.CloseContext("KnxProperty") - return values.NewPlcList(value), nil - case propertyType == KnxPropertyDataType_PDT_GENERIC_03: // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int((3)); i++ { - _item, _itemErr := readBuffer.ReadByte("value") - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcBYTE(_item)) - } - readBuffer.CloseContext("KnxProperty") - return values.NewPlcList(value), nil - case propertyType == KnxPropertyDataType_PDT_GENERIC_04: // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int((4)); i++ { - _item, _itemErr := readBuffer.ReadByte("value") - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcBYTE(_item)) - } - readBuffer.CloseContext("KnxProperty") - return values.NewPlcList(value), nil - case propertyType == KnxPropertyDataType_PDT_GENERIC_05: // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int((5)); i++ { - _item, _itemErr := readBuffer.ReadByte("value") - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcBYTE(_item)) - } - readBuffer.CloseContext("KnxProperty") - return values.NewPlcList(value), nil - case propertyType == KnxPropertyDataType_PDT_GENERIC_06: // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int((6)); i++ { - _item, _itemErr := readBuffer.ReadByte("value") - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcBYTE(_item)) - } - readBuffer.CloseContext("KnxProperty") - return values.NewPlcList(value), nil - case propertyType == KnxPropertyDataType_PDT_GENERIC_07: // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int((7)); i++ { - _item, _itemErr := readBuffer.ReadByte("value") - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcBYTE(_item)) - } - readBuffer.CloseContext("KnxProperty") - return values.NewPlcList(value), nil - case propertyType == KnxPropertyDataType_PDT_GENERIC_08: // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int((8)); i++ { - _item, _itemErr := readBuffer.ReadByte("value") - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcBYTE(_item)) - } - readBuffer.CloseContext("KnxProperty") - return values.NewPlcList(value), nil - case propertyType == KnxPropertyDataType_PDT_GENERIC_09: // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int((9)); i++ { - _item, _itemErr := readBuffer.ReadByte("value") - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcBYTE(_item)) - } - readBuffer.CloseContext("KnxProperty") - return values.NewPlcList(value), nil - case propertyType == KnxPropertyDataType_PDT_GENERIC_10: // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int((10)); i++ { - _item, _itemErr := readBuffer.ReadByte("value") - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcBYTE(_item)) - } - readBuffer.CloseContext("KnxProperty") - return values.NewPlcList(value), nil - case propertyType == KnxPropertyDataType_PDT_GENERIC_11: // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int((11)); i++ { - _item, _itemErr := readBuffer.ReadByte("value") - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcBYTE(_item)) - } - readBuffer.CloseContext("KnxProperty") - return values.NewPlcList(value), nil - case propertyType == KnxPropertyDataType_PDT_GENERIC_12: // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int((12)); i++ { - _item, _itemErr := readBuffer.ReadByte("value") - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcBYTE(_item)) - } - readBuffer.CloseContext("KnxProperty") - return values.NewPlcList(value), nil - case propertyType == KnxPropertyDataType_PDT_GENERIC_13: // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int((13)); i++ { - _item, _itemErr := readBuffer.ReadByte("value") - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcBYTE(_item)) - } - readBuffer.CloseContext("KnxProperty") - return values.NewPlcList(value), nil - case propertyType == KnxPropertyDataType_PDT_GENERIC_14: // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int((14)); i++ { - _item, _itemErr := readBuffer.ReadByte("value") - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcBYTE(_item)) - } - readBuffer.CloseContext("KnxProperty") - return values.NewPlcList(value), nil - case propertyType == KnxPropertyDataType_PDT_GENERIC_15: // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int((15)); i++ { - _item, _itemErr := readBuffer.ReadByte("value") - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcBYTE(_item)) - } - readBuffer.CloseContext("KnxProperty") - return values.NewPlcList(value), nil - case propertyType == KnxPropertyDataType_PDT_GENERIC_16: // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int((16)); i++ { - _item, _itemErr := readBuffer.ReadByte("value") - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcBYTE(_item)) - } - readBuffer.CloseContext("KnxProperty") - return values.NewPlcList(value), nil - case propertyType == KnxPropertyDataType_PDT_GENERIC_17: // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int((17)); i++ { - _item, _itemErr := readBuffer.ReadByte("value") - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcBYTE(_item)) - } - readBuffer.CloseContext("KnxProperty") - return values.NewPlcList(value), nil - case propertyType == KnxPropertyDataType_PDT_GENERIC_18: // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int((18)); i++ { - _item, _itemErr := readBuffer.ReadByte("value") - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcBYTE(_item)) - } - readBuffer.CloseContext("KnxProperty") - return values.NewPlcList(value), nil - case propertyType == KnxPropertyDataType_PDT_GENERIC_19: // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int((19)); i++ { - _item, _itemErr := readBuffer.ReadByte("value") - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcBYTE(_item)) - } - readBuffer.CloseContext("KnxProperty") - return values.NewPlcList(value), nil - case propertyType == KnxPropertyDataType_PDT_GENERIC_20: // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int((20)); i++ { - _item, _itemErr := readBuffer.ReadByte("value") - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcBYTE(_item)) - } - readBuffer.CloseContext("KnxProperty") - return values.NewPlcList(value), nil - case propertyType == KnxPropertyDataType_PDT_VERSION: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Simple Field (magicNumber) - magicNumber, _magicNumberErr := readBuffer.ReadUint8("magicNumber", 5) - if _magicNumberErr != nil { - return nil, errors.Wrap(_magicNumberErr, "Error parsing 'magicNumber' field") - } - _map["Struct"] = values.NewPlcUSINT(magicNumber) - - // Simple Field (versionNumber) - versionNumber, _versionNumberErr := readBuffer.ReadUint8("versionNumber", 5) - if _versionNumberErr != nil { - return nil, errors.Wrap(_versionNumberErr, "Error parsing 'versionNumber' field") - } - _map["Struct"] = values.NewPlcUSINT(versionNumber) - - // Simple Field (revisionNumber) - revisionNumber, _revisionNumberErr := readBuffer.ReadUint8("revisionNumber", 6) - if _revisionNumberErr != nil { - return nil, errors.Wrap(_revisionNumberErr, "Error parsing 'revisionNumber' field") - } - _map["Struct"] = values.NewPlcUSINT(revisionNumber) - readBuffer.CloseContext("KnxProperty") - return values.NewPlcStruct(_map), nil - case propertyType == KnxPropertyDataType_PDT_ALARM_INFO: // Struct - // Struct - _map := map[string]api.PlcValue{} - - // Simple Field (logNumber) - logNumber, _logNumberErr := readBuffer.ReadUint8("logNumber", 8) - if _logNumberErr != nil { - return nil, errors.Wrap(_logNumberErr, "Error parsing 'logNumber' field") - } - _map["Struct"] = values.NewPlcUSINT(logNumber) - - // Simple Field (alarmPriority) - alarmPriority, _alarmPriorityErr := readBuffer.ReadUint8("alarmPriority", 8) - if _alarmPriorityErr != nil { - return nil, errors.Wrap(_alarmPriorityErr, "Error parsing 'alarmPriority' field") - } - _map["Struct"] = values.NewPlcUSINT(alarmPriority) - - // Simple Field (applicationArea) - applicationArea, _applicationAreaErr := readBuffer.ReadUint8("applicationArea", 8) - if _applicationAreaErr != nil { - return nil, errors.Wrap(_applicationAreaErr, "Error parsing 'applicationArea' field") - } - _map["Struct"] = values.NewPlcUSINT(applicationArea) - - // Simple Field (errorClass) - errorClass, _errorClassErr := readBuffer.ReadUint8("errorClass", 8) - if _errorClassErr != nil { - return nil, errors.Wrap(_errorClassErr, "Error parsing 'errorClass' field") - } - _map["Struct"] = values.NewPlcUSINT(errorClass) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (errorcodeSup) - errorcodeSup, _errorcodeSupErr := readBuffer.ReadBit("errorcodeSup") - if _errorcodeSupErr != nil { - return nil, errors.Wrap(_errorcodeSupErr, "Error parsing 'errorcodeSup' field") - } - _map["Struct"] = values.NewPlcBOOL(errorcodeSup) - - // Simple Field (alarmtextSup) - alarmtextSup, _alarmtextSupErr := readBuffer.ReadBit("alarmtextSup") - if _alarmtextSupErr != nil { - return nil, errors.Wrap(_alarmtextSupErr, "Error parsing 'alarmtextSup' field") - } - _map["Struct"] = values.NewPlcBOOL(alarmtextSup) - - // Simple Field (timestampSup) - timestampSup, _timestampSupErr := readBuffer.ReadBit("timestampSup") - if _timestampSupErr != nil { - return nil, errors.Wrap(_timestampSupErr, "Error parsing 'timestampSup' field") - } - _map["Struct"] = values.NewPlcBOOL(timestampSup) - - // Simple Field (ackSup) - ackSup, _ackSupErr := readBuffer.ReadBit("ackSup") - if _ackSupErr != nil { - return nil, errors.Wrap(_ackSupErr, "Error parsing 'ackSup' field") - } - _map["Struct"] = values.NewPlcBOOL(ackSup) - - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 5); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (locked) - locked, _lockedErr := readBuffer.ReadBit("locked") - if _lockedErr != nil { - return nil, errors.Wrap(_lockedErr, "Error parsing 'locked' field") - } - _map["Struct"] = values.NewPlcBOOL(locked) - - // Simple Field (alarmunack) - alarmunack, _alarmunackErr := readBuffer.ReadBit("alarmunack") - if _alarmunackErr != nil { - return nil, errors.Wrap(_alarmunackErr, "Error parsing 'alarmunack' field") - } - _map["Struct"] = values.NewPlcBOOL(alarmunack) - - // Simple Field (inalarm) - inalarm, _inalarmErr := readBuffer.ReadBit("inalarm") - if _inalarmErr != nil { - return nil, errors.Wrap(_inalarmErr, "Error parsing 'inalarm' field") - } - _map["Struct"] = values.NewPlcBOOL(inalarm) - readBuffer.CloseContext("KnxProperty") - return values.NewPlcStruct(_map), nil - case propertyType == KnxPropertyDataType_PDT_BINARY_INFORMATION: // BOOL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } - - // Simple Field (value) - value, _valueErr := readBuffer.ReadBit("value") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxProperty") - return values.NewPlcBOOL(value), nil - case propertyType == KnxPropertyDataType_PDT_BITSET8: // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int((8)); i++ { - _item, _itemErr := readBuffer.ReadBit("value") - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcBOOL(_item)) - } - readBuffer.CloseContext("KnxProperty") - return values.NewPlcList(value), nil - case propertyType == KnxPropertyDataType_PDT_BITSET16: // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int((16)); i++ { - _item, _itemErr := readBuffer.ReadBit("value") - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcBOOL(_item)) - } - readBuffer.CloseContext("KnxProperty") - return values.NewPlcList(value), nil - case propertyType == KnxPropertyDataType_PDT_ENUM8: // USINT - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxProperty") - return values.NewPlcUSINT(value), nil - case propertyType == KnxPropertyDataType_PDT_SCALING: // USINT - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("KnxProperty") - return values.NewPlcUSINT(value), nil - default: // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int(dataLengthInBytes); i++ { - _item, _itemErr := readBuffer.ReadByte("value") - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcBYTE(_item)) - } - readBuffer.CloseContext("KnxProperty") - return values.NewPlcList(value), nil +case propertyType == KnxPropertyDataType_PDT_CONTROL : // BOOL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadBit("value") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxProperty") + return values.NewPlcBOOL(value), nil +case propertyType == KnxPropertyDataType_PDT_CHAR : // SINT + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxProperty") + return values.NewPlcSINT(value), nil +case propertyType == KnxPropertyDataType_PDT_UNSIGNED_CHAR : // USINT + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxProperty") + return values.NewPlcUSINT(value), nil +case propertyType == KnxPropertyDataType_PDT_INT : // INT + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt16("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxProperty") + return values.NewPlcINT(value), nil +case propertyType == KnxPropertyDataType_PDT_UNSIGNED_INT && dataLengthInBytes == uint8(4) : // UDINT + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxProperty") + return values.NewPlcUDINT(value), nil +case propertyType == KnxPropertyDataType_PDT_UNSIGNED_INT : // UINT + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint16("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxProperty") + return values.NewPlcUINT(value), nil +case propertyType == KnxPropertyDataType_PDT_KNX_FLOAT : // REAL + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxProperty") + return values.NewPlcREAL(value), nil +case propertyType == KnxPropertyDataType_PDT_DATE : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 3); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (dayOfMonth) + dayOfMonth, _dayOfMonthErr := readBuffer.ReadUint8("dayOfMonth", 5) + if _dayOfMonthErr != nil { + return nil, errors.Wrap(_dayOfMonthErr, "Error parsing 'dayOfMonth' field") + } + _map["Struct"] = values.NewPlcUSINT(dayOfMonth) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (month) + month, _monthErr := readBuffer.ReadUint8("month", 4) + if _monthErr != nil { + return nil, errors.Wrap(_monthErr, "Error parsing 'month' field") + } + _map["Struct"] = values.NewPlcUSINT(month) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 1); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (year) + year, _yearErr := readBuffer.ReadUint8("year", 7) + if _yearErr != nil { + return nil, errors.Wrap(_yearErr, "Error parsing 'year' field") + } + _map["Struct"] = values.NewPlcUSINT(year) + readBuffer.CloseContext("KnxProperty") + return values.NewPlcStruct(_map), nil +case propertyType == KnxPropertyDataType_PDT_TIME : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Simple Field (day) + day, _dayErr := readBuffer.ReadUint8("day", 3) + if _dayErr != nil { + return nil, errors.Wrap(_dayErr, "Error parsing 'day' field") + } + _map["Struct"] = values.NewPlcUSINT(day) + + // Simple Field (hour) + hour, _hourErr := readBuffer.ReadUint8("hour", 5) + if _hourErr != nil { + return nil, errors.Wrap(_hourErr, "Error parsing 'hour' field") + } + _map["Struct"] = values.NewPlcUSINT(hour) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 2); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (minutes) + minutes, _minutesErr := readBuffer.ReadUint8("minutes", 6) + if _minutesErr != nil { + return nil, errors.Wrap(_minutesErr, "Error parsing 'minutes' field") + } + _map["Struct"] = values.NewPlcUSINT(minutes) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 2); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (seconds) + seconds, _secondsErr := readBuffer.ReadUint8("seconds", 6) + if _secondsErr != nil { + return nil, errors.Wrap(_secondsErr, "Error parsing 'seconds' field") + } + _map["Struct"] = values.NewPlcUSINT(seconds) + readBuffer.CloseContext("KnxProperty") + return values.NewPlcStruct(_map), nil +case propertyType == KnxPropertyDataType_PDT_LONG : // DINT + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxProperty") + return values.NewPlcDINT(value), nil +case propertyType == KnxPropertyDataType_PDT_UNSIGNED_LONG : // UDINT + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxProperty") + return values.NewPlcUDINT(value), nil +case propertyType == KnxPropertyDataType_PDT_FLOAT : // REAL + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxProperty") + return values.NewPlcREAL(value), nil +case propertyType == KnxPropertyDataType_PDT_DOUBLE : // LREAL + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat64("value", 64) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxProperty") + return values.NewPlcLREAL(value), nil +case propertyType == KnxPropertyDataType_PDT_CHAR_BLOCK : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int((10)); i++ { + _item, _itemErr := readBuffer.ReadByte("value") + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcBYTE(_item)) + } + readBuffer.CloseContext("KnxProperty") + return values.NewPlcList(value), nil +case propertyType == KnxPropertyDataType_PDT_POLL_GROUP_SETTINGS : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Array Field (groupAddress) + var groupAddress []api.PlcValue + for i := 0; i < int((2)); i++ { + _item, _itemErr := readBuffer.ReadByte("groupAddress") + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + groupAddress = append(groupAddress, values.NewPlcBYTE(_item)) + } + + // Simple Field (disable) + disable, _disableErr := readBuffer.ReadBit("disable") + if _disableErr != nil { + return nil, errors.Wrap(_disableErr, "Error parsing 'disable' field") + } + _map["Struct"] = values.NewPlcBOOL(disable) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 3); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (pollingSoftNr) + pollingSoftNr, _pollingSoftNrErr := readBuffer.ReadUint8("pollingSoftNr", 4) + if _pollingSoftNrErr != nil { + return nil, errors.Wrap(_pollingSoftNrErr, "Error parsing 'pollingSoftNr' field") + } + _map["Struct"] = values.NewPlcUSINT(pollingSoftNr) + readBuffer.CloseContext("KnxProperty") + return values.NewPlcStruct(_map), nil +case propertyType == KnxPropertyDataType_PDT_SHORT_CHAR_BLOCK : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int((5)); i++ { + _item, _itemErr := readBuffer.ReadByte("value") + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcBYTE(_item)) + } + readBuffer.CloseContext("KnxProperty") + return values.NewPlcList(value), nil +case propertyType == KnxPropertyDataType_PDT_DATE_TIME : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Simple Field (year) + year, _yearErr := readBuffer.ReadUint8("year", 8) + if _yearErr != nil { + return nil, errors.Wrap(_yearErr, "Error parsing 'year' field") + } + _map["Struct"] = values.NewPlcUSINT(year) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (month) + month, _monthErr := readBuffer.ReadUint8("month", 4) + if _monthErr != nil { + return nil, errors.Wrap(_monthErr, "Error parsing 'month' field") + } + _map["Struct"] = values.NewPlcUSINT(month) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 3); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (dayofmonth) + dayofmonth, _dayofmonthErr := readBuffer.ReadUint8("dayofmonth", 5) + if _dayofmonthErr != nil { + return nil, errors.Wrap(_dayofmonthErr, "Error parsing 'dayofmonth' field") + } + _map["Struct"] = values.NewPlcUSINT(dayofmonth) + + // Simple Field (dayofweek) + dayofweek, _dayofweekErr := readBuffer.ReadUint8("dayofweek", 3) + if _dayofweekErr != nil { + return nil, errors.Wrap(_dayofweekErr, "Error parsing 'dayofweek' field") + } + _map["Struct"] = values.NewPlcUSINT(dayofweek) + + // Simple Field (hourofday) + hourofday, _hourofdayErr := readBuffer.ReadUint8("hourofday", 5) + if _hourofdayErr != nil { + return nil, errors.Wrap(_hourofdayErr, "Error parsing 'hourofday' field") + } + _map["Struct"] = values.NewPlcUSINT(hourofday) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 2); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (minutes) + minutes, _minutesErr := readBuffer.ReadUint8("minutes", 6) + if _minutesErr != nil { + return nil, errors.Wrap(_minutesErr, "Error parsing 'minutes' field") + } + _map["Struct"] = values.NewPlcUSINT(minutes) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 2); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (seconds) + seconds, _secondsErr := readBuffer.ReadUint8("seconds", 6) + if _secondsErr != nil { + return nil, errors.Wrap(_secondsErr, "Error parsing 'seconds' field") + } + _map["Struct"] = values.NewPlcUSINT(seconds) + + // Simple Field (fault) + fault, _faultErr := readBuffer.ReadBit("fault") + if _faultErr != nil { + return nil, errors.Wrap(_faultErr, "Error parsing 'fault' field") + } + _map["Struct"] = values.NewPlcBOOL(fault) + + // Simple Field (workingDay) + workingDay, _workingDayErr := readBuffer.ReadBit("workingDay") + if _workingDayErr != nil { + return nil, errors.Wrap(_workingDayErr, "Error parsing 'workingDay' field") + } + _map["Struct"] = values.NewPlcBOOL(workingDay) + + // Simple Field (noWd) + noWd, _noWdErr := readBuffer.ReadBit("noWd") + if _noWdErr != nil { + return nil, errors.Wrap(_noWdErr, "Error parsing 'noWd' field") + } + _map["Struct"] = values.NewPlcBOOL(noWd) + + // Simple Field (noYear) + noYear, _noYearErr := readBuffer.ReadBit("noYear") + if _noYearErr != nil { + return nil, errors.Wrap(_noYearErr, "Error parsing 'noYear' field") + } + _map["Struct"] = values.NewPlcBOOL(noYear) + + // Simple Field (noDate) + noDate, _noDateErr := readBuffer.ReadBit("noDate") + if _noDateErr != nil { + return nil, errors.Wrap(_noDateErr, "Error parsing 'noDate' field") + } + _map["Struct"] = values.NewPlcBOOL(noDate) + + // Simple Field (noDayOfWeek) + noDayOfWeek, _noDayOfWeekErr := readBuffer.ReadBit("noDayOfWeek") + if _noDayOfWeekErr != nil { + return nil, errors.Wrap(_noDayOfWeekErr, "Error parsing 'noDayOfWeek' field") + } + _map["Struct"] = values.NewPlcBOOL(noDayOfWeek) + + // Simple Field (noTime) + noTime, _noTimeErr := readBuffer.ReadBit("noTime") + if _noTimeErr != nil { + return nil, errors.Wrap(_noTimeErr, "Error parsing 'noTime' field") + } + _map["Struct"] = values.NewPlcBOOL(noTime) + + // Simple Field (standardSummerTime) + standardSummerTime, _standardSummerTimeErr := readBuffer.ReadBit("standardSummerTime") + if _standardSummerTimeErr != nil { + return nil, errors.Wrap(_standardSummerTimeErr, "Error parsing 'standardSummerTime' field") + } + _map["Struct"] = values.NewPlcBOOL(standardSummerTime) + + // Simple Field (qualityOfClock) + qualityOfClock, _qualityOfClockErr := readBuffer.ReadBit("qualityOfClock") + if _qualityOfClockErr != nil { + return nil, errors.Wrap(_qualityOfClockErr, "Error parsing 'qualityOfClock' field") + } + _map["Struct"] = values.NewPlcBOOL(qualityOfClock) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + readBuffer.CloseContext("KnxProperty") + return values.NewPlcStruct(_map), nil +case propertyType == KnxPropertyDataType_PDT_GENERIC_01 : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int((1)); i++ { + _item, _itemErr := readBuffer.ReadByte("value") + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcBYTE(_item)) + } + readBuffer.CloseContext("KnxProperty") + return values.NewPlcList(value), nil +case propertyType == KnxPropertyDataType_PDT_GENERIC_02 : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int((2)); i++ { + _item, _itemErr := readBuffer.ReadByte("value") + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcBYTE(_item)) + } + readBuffer.CloseContext("KnxProperty") + return values.NewPlcList(value), nil +case propertyType == KnxPropertyDataType_PDT_GENERIC_03 : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int((3)); i++ { + _item, _itemErr := readBuffer.ReadByte("value") + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcBYTE(_item)) + } + readBuffer.CloseContext("KnxProperty") + return values.NewPlcList(value), nil +case propertyType == KnxPropertyDataType_PDT_GENERIC_04 : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int((4)); i++ { + _item, _itemErr := readBuffer.ReadByte("value") + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcBYTE(_item)) + } + readBuffer.CloseContext("KnxProperty") + return values.NewPlcList(value), nil +case propertyType == KnxPropertyDataType_PDT_GENERIC_05 : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int((5)); i++ { + _item, _itemErr := readBuffer.ReadByte("value") + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcBYTE(_item)) + } + readBuffer.CloseContext("KnxProperty") + return values.NewPlcList(value), nil +case propertyType == KnxPropertyDataType_PDT_GENERIC_06 : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int((6)); i++ { + _item, _itemErr := readBuffer.ReadByte("value") + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcBYTE(_item)) + } + readBuffer.CloseContext("KnxProperty") + return values.NewPlcList(value), nil +case propertyType == KnxPropertyDataType_PDT_GENERIC_07 : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int((7)); i++ { + _item, _itemErr := readBuffer.ReadByte("value") + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcBYTE(_item)) + } + readBuffer.CloseContext("KnxProperty") + return values.NewPlcList(value), nil +case propertyType == KnxPropertyDataType_PDT_GENERIC_08 : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int((8)); i++ { + _item, _itemErr := readBuffer.ReadByte("value") + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcBYTE(_item)) + } + readBuffer.CloseContext("KnxProperty") + return values.NewPlcList(value), nil +case propertyType == KnxPropertyDataType_PDT_GENERIC_09 : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int((9)); i++ { + _item, _itemErr := readBuffer.ReadByte("value") + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcBYTE(_item)) + } + readBuffer.CloseContext("KnxProperty") + return values.NewPlcList(value), nil +case propertyType == KnxPropertyDataType_PDT_GENERIC_10 : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int((10)); i++ { + _item, _itemErr := readBuffer.ReadByte("value") + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcBYTE(_item)) + } + readBuffer.CloseContext("KnxProperty") + return values.NewPlcList(value), nil +case propertyType == KnxPropertyDataType_PDT_GENERIC_11 : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int((11)); i++ { + _item, _itemErr := readBuffer.ReadByte("value") + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcBYTE(_item)) + } + readBuffer.CloseContext("KnxProperty") + return values.NewPlcList(value), nil +case propertyType == KnxPropertyDataType_PDT_GENERIC_12 : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int((12)); i++ { + _item, _itemErr := readBuffer.ReadByte("value") + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcBYTE(_item)) + } + readBuffer.CloseContext("KnxProperty") + return values.NewPlcList(value), nil +case propertyType == KnxPropertyDataType_PDT_GENERIC_13 : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int((13)); i++ { + _item, _itemErr := readBuffer.ReadByte("value") + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcBYTE(_item)) + } + readBuffer.CloseContext("KnxProperty") + return values.NewPlcList(value), nil +case propertyType == KnxPropertyDataType_PDT_GENERIC_14 : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int((14)); i++ { + _item, _itemErr := readBuffer.ReadByte("value") + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcBYTE(_item)) + } + readBuffer.CloseContext("KnxProperty") + return values.NewPlcList(value), nil +case propertyType == KnxPropertyDataType_PDT_GENERIC_15 : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int((15)); i++ { + _item, _itemErr := readBuffer.ReadByte("value") + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcBYTE(_item)) + } + readBuffer.CloseContext("KnxProperty") + return values.NewPlcList(value), nil +case propertyType == KnxPropertyDataType_PDT_GENERIC_16 : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int((16)); i++ { + _item, _itemErr := readBuffer.ReadByte("value") + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcBYTE(_item)) + } + readBuffer.CloseContext("KnxProperty") + return values.NewPlcList(value), nil +case propertyType == KnxPropertyDataType_PDT_GENERIC_17 : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int((17)); i++ { + _item, _itemErr := readBuffer.ReadByte("value") + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcBYTE(_item)) + } + readBuffer.CloseContext("KnxProperty") + return values.NewPlcList(value), nil +case propertyType == KnxPropertyDataType_PDT_GENERIC_18 : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int((18)); i++ { + _item, _itemErr := readBuffer.ReadByte("value") + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcBYTE(_item)) + } + readBuffer.CloseContext("KnxProperty") + return values.NewPlcList(value), nil +case propertyType == KnxPropertyDataType_PDT_GENERIC_19 : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int((19)); i++ { + _item, _itemErr := readBuffer.ReadByte("value") + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcBYTE(_item)) + } + readBuffer.CloseContext("KnxProperty") + return values.NewPlcList(value), nil +case propertyType == KnxPropertyDataType_PDT_GENERIC_20 : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int((20)); i++ { + _item, _itemErr := readBuffer.ReadByte("value") + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcBYTE(_item)) + } + readBuffer.CloseContext("KnxProperty") + return values.NewPlcList(value), nil +case propertyType == KnxPropertyDataType_PDT_VERSION : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Simple Field (magicNumber) + magicNumber, _magicNumberErr := readBuffer.ReadUint8("magicNumber", 5) + if _magicNumberErr != nil { + return nil, errors.Wrap(_magicNumberErr, "Error parsing 'magicNumber' field") + } + _map["Struct"] = values.NewPlcUSINT(magicNumber) + + // Simple Field (versionNumber) + versionNumber, _versionNumberErr := readBuffer.ReadUint8("versionNumber", 5) + if _versionNumberErr != nil { + return nil, errors.Wrap(_versionNumberErr, "Error parsing 'versionNumber' field") + } + _map["Struct"] = values.NewPlcUSINT(versionNumber) + + // Simple Field (revisionNumber) + revisionNumber, _revisionNumberErr := readBuffer.ReadUint8("revisionNumber", 6) + if _revisionNumberErr != nil { + return nil, errors.Wrap(_revisionNumberErr, "Error parsing 'revisionNumber' field") + } + _map["Struct"] = values.NewPlcUSINT(revisionNumber) + readBuffer.CloseContext("KnxProperty") + return values.NewPlcStruct(_map), nil +case propertyType == KnxPropertyDataType_PDT_ALARM_INFO : // Struct + // Struct + _map := map[string]api.PlcValue{} + + // Simple Field (logNumber) + logNumber, _logNumberErr := readBuffer.ReadUint8("logNumber", 8) + if _logNumberErr != nil { + return nil, errors.Wrap(_logNumberErr, "Error parsing 'logNumber' field") + } + _map["Struct"] = values.NewPlcUSINT(logNumber) + + // Simple Field (alarmPriority) + alarmPriority, _alarmPriorityErr := readBuffer.ReadUint8("alarmPriority", 8) + if _alarmPriorityErr != nil { + return nil, errors.Wrap(_alarmPriorityErr, "Error parsing 'alarmPriority' field") + } + _map["Struct"] = values.NewPlcUSINT(alarmPriority) + + // Simple Field (applicationArea) + applicationArea, _applicationAreaErr := readBuffer.ReadUint8("applicationArea", 8) + if _applicationAreaErr != nil { + return nil, errors.Wrap(_applicationAreaErr, "Error parsing 'applicationArea' field") + } + _map["Struct"] = values.NewPlcUSINT(applicationArea) + + // Simple Field (errorClass) + errorClass, _errorClassErr := readBuffer.ReadUint8("errorClass", 8) + if _errorClassErr != nil { + return nil, errors.Wrap(_errorClassErr, "Error parsing 'errorClass' field") + } + _map["Struct"] = values.NewPlcUSINT(errorClass) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 4); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (errorcodeSup) + errorcodeSup, _errorcodeSupErr := readBuffer.ReadBit("errorcodeSup") + if _errorcodeSupErr != nil { + return nil, errors.Wrap(_errorcodeSupErr, "Error parsing 'errorcodeSup' field") + } + _map["Struct"] = values.NewPlcBOOL(errorcodeSup) + + // Simple Field (alarmtextSup) + alarmtextSup, _alarmtextSupErr := readBuffer.ReadBit("alarmtextSup") + if _alarmtextSupErr != nil { + return nil, errors.Wrap(_alarmtextSupErr, "Error parsing 'alarmtextSup' field") + } + _map["Struct"] = values.NewPlcBOOL(alarmtextSup) + + // Simple Field (timestampSup) + timestampSup, _timestampSupErr := readBuffer.ReadBit("timestampSup") + if _timestampSupErr != nil { + return nil, errors.Wrap(_timestampSupErr, "Error parsing 'timestampSup' field") + } + _map["Struct"] = values.NewPlcBOOL(timestampSup) + + // Simple Field (ackSup) + ackSup, _ackSupErr := readBuffer.ReadBit("ackSup") + if _ackSupErr != nil { + return nil, errors.Wrap(_ackSupErr, "Error parsing 'ackSup' field") + } + _map["Struct"] = values.NewPlcBOOL(ackSup) + + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 5); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (locked) + locked, _lockedErr := readBuffer.ReadBit("locked") + if _lockedErr != nil { + return nil, errors.Wrap(_lockedErr, "Error parsing 'locked' field") + } + _map["Struct"] = values.NewPlcBOOL(locked) + + // Simple Field (alarmunack) + alarmunack, _alarmunackErr := readBuffer.ReadBit("alarmunack") + if _alarmunackErr != nil { + return nil, errors.Wrap(_alarmunackErr, "Error parsing 'alarmunack' field") + } + _map["Struct"] = values.NewPlcBOOL(alarmunack) + + // Simple Field (inalarm) + inalarm, _inalarmErr := readBuffer.ReadBit("inalarm") + if _inalarmErr != nil { + return nil, errors.Wrap(_inalarmErr, "Error parsing 'inalarm' field") + } + _map["Struct"] = values.NewPlcBOOL(inalarm) + readBuffer.CloseContext("KnxProperty") + return values.NewPlcStruct(_map), nil +case propertyType == KnxPropertyDataType_PDT_BINARY_INFORMATION : // BOOL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } + + // Simple Field (value) + value, _valueErr := readBuffer.ReadBit("value") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxProperty") + return values.NewPlcBOOL(value), nil +case propertyType == KnxPropertyDataType_PDT_BITSET8 : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int((8)); i++ { + _item, _itemErr := readBuffer.ReadBit("value") + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcBOOL(_item)) + } + readBuffer.CloseContext("KnxProperty") + return values.NewPlcList(value), nil +case propertyType == KnxPropertyDataType_PDT_BITSET16 : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int((16)); i++ { + _item, _itemErr := readBuffer.ReadBit("value") + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcBOOL(_item)) + } + readBuffer.CloseContext("KnxProperty") + return values.NewPlcList(value), nil +case propertyType == KnxPropertyDataType_PDT_ENUM8 : // USINT + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxProperty") + return values.NewPlcUSINT(value), nil +case propertyType == KnxPropertyDataType_PDT_SCALING : // USINT + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("KnxProperty") + return values.NewPlcUSINT(value), nil +default : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int(dataLengthInBytes); i++ { + _item, _itemErr := readBuffer.ReadByte("value") + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcBYTE(_item)) + } + readBuffer.CloseContext("KnxProperty") + return values.NewPlcList(value), nil } - // TODO: add more info which type it is actually + // TODO: add more info which type it is actually return nil, errors.New("unsupported type") } @@ -851,565 +852,567 @@ func KnxPropertySerialize(value api.PlcValue, propertyType KnxPropertyDataType, func KnxPropertySerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer, value api.PlcValue, propertyType KnxPropertyDataType, dataLengthInBytes uint8) error { m := struct { - PropertyType KnxPropertyDataType - DataLengthInBytes uint8 + PropertyType KnxPropertyDataType + DataLengthInBytes uint8 }{ - PropertyType: propertyType, - DataLengthInBytes: dataLengthInBytes, + PropertyType: propertyType, + DataLengthInBytes: dataLengthInBytes, } _ = m writeBuffer.PushContext("KnxProperty") switch { - case propertyType == KnxPropertyDataType_PDT_CONTROL: // BOOL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case propertyType == KnxPropertyDataType_PDT_CHAR: // SINT - // Simple Field (value) - if _err := writeBuffer.WriteInt8("value", 8, value.GetInt8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case propertyType == KnxPropertyDataType_PDT_UNSIGNED_CHAR: // USINT - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case propertyType == KnxPropertyDataType_PDT_INT: // INT - // Simple Field (value) - if _err := writeBuffer.WriteInt16("value", 16, value.GetInt16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case propertyType == KnxPropertyDataType_PDT_UNSIGNED_INT && dataLengthInBytes == uint8(4): // UDINT - // Simple Field (value) - if _err := writeBuffer.WriteUint32("value", 32, value.GetUint32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case propertyType == KnxPropertyDataType_PDT_UNSIGNED_INT: // UINT - // Simple Field (value) - if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case propertyType == KnxPropertyDataType_PDT_KNX_FLOAT: // REAL - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case propertyType == KnxPropertyDataType_PDT_DATE: // Struct - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 3, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (dayOfMonth) - if _err := writeBuffer.WriteUint8("dayOfMonth", 5, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'dayOfMonth' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (month) - if _err := writeBuffer.WriteUint8("month", 4, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'month' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 1, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (year) - if _err := writeBuffer.WriteUint8("year", 7, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'year' field") - } - case propertyType == KnxPropertyDataType_PDT_TIME: // Struct - // Simple Field (day) - if _err := writeBuffer.WriteUint8("day", 3, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'day' field") - } - - // Simple Field (hour) - if _err := writeBuffer.WriteUint8("hour", 5, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'hour' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 2, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (minutes) - if _err := writeBuffer.WriteUint8("minutes", 6, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'minutes' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 2, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (seconds) - if _err := writeBuffer.WriteUint8("seconds", 6, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'seconds' field") - } - case propertyType == KnxPropertyDataType_PDT_LONG: // DINT - // Simple Field (value) - if _err := writeBuffer.WriteInt32("value", 32, value.GetInt32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case propertyType == KnxPropertyDataType_PDT_UNSIGNED_LONG: // UDINT - // Simple Field (value) - if _err := writeBuffer.WriteUint32("value", 32, value.GetUint32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case propertyType == KnxPropertyDataType_PDT_FLOAT: // REAL - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case propertyType == KnxPropertyDataType_PDT_DOUBLE: // LREAL - // Simple Field (value) - if _err := writeBuffer.WriteFloat64("value", 64, value.GetFloat64()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case propertyType == KnxPropertyDataType_PDT_CHAR_BLOCK: // List - // Array Field (value) - for i := uint32(0); i < uint32((10)); i++ { - _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case propertyType == KnxPropertyDataType_PDT_POLL_GROUP_SETTINGS: // Struct - // Array Field (groupAddress) - for i := uint32(0); i < uint32((2)); i++ { - groupAddress := value.GetValue("groupAddress") - _itemErr := writeBuffer.WriteByte("", groupAddress.GetIndex(i).GetByte()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - - // Simple Field (disable) - if _err := writeBuffer.WriteBit("disable", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'disable' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 3, uint8(0x0)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (pollingSoftNr) - if _err := writeBuffer.WriteUint8("pollingSoftNr", 4, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'pollingSoftNr' field") - } - case propertyType == KnxPropertyDataType_PDT_SHORT_CHAR_BLOCK: // List - // Array Field (value) - for i := uint32(0); i < uint32((5)); i++ { - _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case propertyType == KnxPropertyDataType_PDT_DATE_TIME: // Struct - // Simple Field (year) - if _err := writeBuffer.WriteUint8("year", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'year' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (month) - if _err := writeBuffer.WriteUint8("month", 4, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'month' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 3, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (dayofmonth) - if _err := writeBuffer.WriteUint8("dayofmonth", 5, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'dayofmonth' field") - } - - // Simple Field (dayofweek) - if _err := writeBuffer.WriteUint8("dayofweek", 3, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'dayofweek' field") - } - - // Simple Field (hourofday) - if _err := writeBuffer.WriteUint8("hourofday", 5, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'hourofday' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 2, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (minutes) - if _err := writeBuffer.WriteUint8("minutes", 6, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'minutes' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 2, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (seconds) - if _err := writeBuffer.WriteUint8("seconds", 6, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'seconds' field") - } - - // Simple Field (fault) - if _err := writeBuffer.WriteBit("fault", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'fault' field") - } - - // Simple Field (workingDay) - if _err := writeBuffer.WriteBit("workingDay", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'workingDay' field") - } - - // Simple Field (noWd) - if _err := writeBuffer.WriteBit("noWd", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'noWd' field") - } - - // Simple Field (noYear) - if _err := writeBuffer.WriteBit("noYear", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'noYear' field") - } - - // Simple Field (noDate) - if _err := writeBuffer.WriteBit("noDate", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'noDate' field") - } - - // Simple Field (noDayOfWeek) - if _err := writeBuffer.WriteBit("noDayOfWeek", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'noDayOfWeek' field") - } - - // Simple Field (noTime) - if _err := writeBuffer.WriteBit("noTime", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'noTime' field") - } - - // Simple Field (standardSummerTime) - if _err := writeBuffer.WriteBit("standardSummerTime", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'standardSummerTime' field") - } - - // Simple Field (qualityOfClock) - if _err := writeBuffer.WriteBit("qualityOfClock", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'qualityOfClock' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - case propertyType == KnxPropertyDataType_PDT_GENERIC_01: // List - // Array Field (value) - for i := uint32(0); i < uint32((1)); i++ { - _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case propertyType == KnxPropertyDataType_PDT_GENERIC_02: // List - // Array Field (value) - for i := uint32(0); i < uint32((2)); i++ { - _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case propertyType == KnxPropertyDataType_PDT_GENERIC_03: // List - // Array Field (value) - for i := uint32(0); i < uint32((3)); i++ { - _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case propertyType == KnxPropertyDataType_PDT_GENERIC_04: // List - // Array Field (value) - for i := uint32(0); i < uint32((4)); i++ { - _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case propertyType == KnxPropertyDataType_PDT_GENERIC_05: // List - // Array Field (value) - for i := uint32(0); i < uint32((5)); i++ { - _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case propertyType == KnxPropertyDataType_PDT_GENERIC_06: // List - // Array Field (value) - for i := uint32(0); i < uint32((6)); i++ { - _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case propertyType == KnxPropertyDataType_PDT_GENERIC_07: // List - // Array Field (value) - for i := uint32(0); i < uint32((7)); i++ { - _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case propertyType == KnxPropertyDataType_PDT_GENERIC_08: // List - // Array Field (value) - for i := uint32(0); i < uint32((8)); i++ { - _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case propertyType == KnxPropertyDataType_PDT_GENERIC_09: // List - // Array Field (value) - for i := uint32(0); i < uint32((9)); i++ { - _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case propertyType == KnxPropertyDataType_PDT_GENERIC_10: // List - // Array Field (value) - for i := uint32(0); i < uint32((10)); i++ { - _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case propertyType == KnxPropertyDataType_PDT_GENERIC_11: // List - // Array Field (value) - for i := uint32(0); i < uint32((11)); i++ { - _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case propertyType == KnxPropertyDataType_PDT_GENERIC_12: // List - // Array Field (value) - for i := uint32(0); i < uint32((12)); i++ { - _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case propertyType == KnxPropertyDataType_PDT_GENERIC_13: // List - // Array Field (value) - for i := uint32(0); i < uint32((13)); i++ { - _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case propertyType == KnxPropertyDataType_PDT_GENERIC_14: // List - // Array Field (value) - for i := uint32(0); i < uint32((14)); i++ { - _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case propertyType == KnxPropertyDataType_PDT_GENERIC_15: // List - // Array Field (value) - for i := uint32(0); i < uint32((15)); i++ { - _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case propertyType == KnxPropertyDataType_PDT_GENERIC_16: // List - // Array Field (value) - for i := uint32(0); i < uint32((16)); i++ { - _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case propertyType == KnxPropertyDataType_PDT_GENERIC_17: // List - // Array Field (value) - for i := uint32(0); i < uint32((17)); i++ { - _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case propertyType == KnxPropertyDataType_PDT_GENERIC_18: // List - // Array Field (value) - for i := uint32(0); i < uint32((18)); i++ { - _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case propertyType == KnxPropertyDataType_PDT_GENERIC_19: // List - // Array Field (value) - for i := uint32(0); i < uint32((19)); i++ { - _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case propertyType == KnxPropertyDataType_PDT_GENERIC_20: // List - // Array Field (value) - for i := uint32(0); i < uint32((20)); i++ { - _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case propertyType == KnxPropertyDataType_PDT_VERSION: // Struct - // Simple Field (magicNumber) - if _err := writeBuffer.WriteUint8("magicNumber", 5, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'magicNumber' field") - } - - // Simple Field (versionNumber) - if _err := writeBuffer.WriteUint8("versionNumber", 5, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'versionNumber' field") - } - - // Simple Field (revisionNumber) - if _err := writeBuffer.WriteUint8("revisionNumber", 6, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'revisionNumber' field") - } - case propertyType == KnxPropertyDataType_PDT_ALARM_INFO: // Struct - // Simple Field (logNumber) - if _err := writeBuffer.WriteUint8("logNumber", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'logNumber' field") - } - - // Simple Field (alarmPriority) - if _err := writeBuffer.WriteUint8("alarmPriority", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'alarmPriority' field") - } - - // Simple Field (applicationArea) - if _err := writeBuffer.WriteUint8("applicationArea", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'applicationArea' field") - } - - // Simple Field (errorClass) - if _err := writeBuffer.WriteUint8("errorClass", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'errorClass' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (errorcodeSup) - if _err := writeBuffer.WriteBit("errorcodeSup", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'errorcodeSup' field") - } - - // Simple Field (alarmtextSup) - if _err := writeBuffer.WriteBit("alarmtextSup", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'alarmtextSup' field") - } - - // Simple Field (timestampSup) - if _err := writeBuffer.WriteBit("timestampSup", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'timestampSup' field") - } - - // Simple Field (ackSup) - if _err := writeBuffer.WriteBit("ackSup", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'ackSup' field") - } - - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 5, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (locked) - if _err := writeBuffer.WriteBit("locked", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'locked' field") - } - - // Simple Field (alarmunack) - if _err := writeBuffer.WriteBit("alarmunack", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'alarmunack' field") - } - - // Simple Field (inalarm) - if _err := writeBuffer.WriteBit("inalarm", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'inalarm' field") - } - case propertyType == KnxPropertyDataType_PDT_BINARY_INFORMATION: // BOOL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } - - // Simple Field (value) - if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case propertyType == KnxPropertyDataType_PDT_BITSET8: // List - // Array Field (value) - for i := uint32(0); i < uint32((8)); i++ { - _itemErr := writeBuffer.WriteBit("", value.GetIndex(i).GetBool()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case propertyType == KnxPropertyDataType_PDT_BITSET16: // List - // Array Field (value) - for i := uint32(0); i < uint32((16)); i++ { - _itemErr := writeBuffer.WriteBit("", value.GetIndex(i).GetBool()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case propertyType == KnxPropertyDataType_PDT_ENUM8: // USINT - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case propertyType == KnxPropertyDataType_PDT_SCALING: // USINT - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - default: // List - // Array Field (value) - for i := uint32(0); i < uint32(m.DataLengthInBytes); i++ { - _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } +case propertyType == KnxPropertyDataType_PDT_CONTROL : // BOOL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case propertyType == KnxPropertyDataType_PDT_CHAR : // SINT + // Simple Field (value) + if _err := writeBuffer.WriteInt8("value", 8, value.GetInt8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case propertyType == KnxPropertyDataType_PDT_UNSIGNED_CHAR : // USINT + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case propertyType == KnxPropertyDataType_PDT_INT : // INT + // Simple Field (value) + if _err := writeBuffer.WriteInt16("value", 16, value.GetInt16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case propertyType == KnxPropertyDataType_PDT_UNSIGNED_INT && dataLengthInBytes == uint8(4) : // UDINT + // Simple Field (value) + if _err := writeBuffer.WriteUint32("value", 32, value.GetUint32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case propertyType == KnxPropertyDataType_PDT_UNSIGNED_INT : // UINT + // Simple Field (value) + if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case propertyType == KnxPropertyDataType_PDT_KNX_FLOAT : // REAL + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 16, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case propertyType == KnxPropertyDataType_PDT_DATE : // Struct + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 3, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (dayOfMonth) + if _err := writeBuffer.WriteUint8("dayOfMonth", 5, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'dayOfMonth' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (month) + if _err := writeBuffer.WriteUint8("month", 4, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'month' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 1, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (year) + if _err := writeBuffer.WriteUint8("year", 7, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'year' field") + } +case propertyType == KnxPropertyDataType_PDT_TIME : // Struct + // Simple Field (day) + if _err := writeBuffer.WriteUint8("day", 3, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'day' field") + } + + // Simple Field (hour) + if _err := writeBuffer.WriteUint8("hour", 5, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'hour' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 2, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (minutes) + if _err := writeBuffer.WriteUint8("minutes", 6, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'minutes' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 2, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (seconds) + if _err := writeBuffer.WriteUint8("seconds", 6, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'seconds' field") + } +case propertyType == KnxPropertyDataType_PDT_LONG : // DINT + // Simple Field (value) + if _err := writeBuffer.WriteInt32("value", 32, value.GetInt32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case propertyType == KnxPropertyDataType_PDT_UNSIGNED_LONG : // UDINT + // Simple Field (value) + if _err := writeBuffer.WriteUint32("value", 32, value.GetUint32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case propertyType == KnxPropertyDataType_PDT_FLOAT : // REAL + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case propertyType == KnxPropertyDataType_PDT_DOUBLE : // LREAL + // Simple Field (value) + if _err := writeBuffer.WriteFloat64("value", 64, value.GetFloat64()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case propertyType == KnxPropertyDataType_PDT_CHAR_BLOCK : // List + // Array Field (value) + for i := uint32(0); i < uint32((10)); i++ { + _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case propertyType == KnxPropertyDataType_PDT_POLL_GROUP_SETTINGS : // Struct + // Array Field (groupAddress) + for i := uint32(0); i < uint32((2)); i++ { + groupAddress := value.GetValue("groupAddress") + _itemErr := writeBuffer.WriteByte("", groupAddress.GetIndex(i).GetByte()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } + + // Simple Field (disable) + if _err := writeBuffer.WriteBit("disable", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'disable' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 3, uint8(0x0)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (pollingSoftNr) + if _err := writeBuffer.WriteUint8("pollingSoftNr", 4, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'pollingSoftNr' field") + } +case propertyType == KnxPropertyDataType_PDT_SHORT_CHAR_BLOCK : // List + // Array Field (value) + for i := uint32(0); i < uint32((5)); i++ { + _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case propertyType == KnxPropertyDataType_PDT_DATE_TIME : // Struct + // Simple Field (year) + if _err := writeBuffer.WriteUint8("year", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'year' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (month) + if _err := writeBuffer.WriteUint8("month", 4, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'month' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 3, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (dayofmonth) + if _err := writeBuffer.WriteUint8("dayofmonth", 5, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'dayofmonth' field") + } + + // Simple Field (dayofweek) + if _err := writeBuffer.WriteUint8("dayofweek", 3, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'dayofweek' field") + } + + // Simple Field (hourofday) + if _err := writeBuffer.WriteUint8("hourofday", 5, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'hourofday' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 2, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (minutes) + if _err := writeBuffer.WriteUint8("minutes", 6, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'minutes' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 2, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (seconds) + if _err := writeBuffer.WriteUint8("seconds", 6, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'seconds' field") + } + + // Simple Field (fault) + if _err := writeBuffer.WriteBit("fault", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'fault' field") + } + + // Simple Field (workingDay) + if _err := writeBuffer.WriteBit("workingDay", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'workingDay' field") + } + + // Simple Field (noWd) + if _err := writeBuffer.WriteBit("noWd", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'noWd' field") + } + + // Simple Field (noYear) + if _err := writeBuffer.WriteBit("noYear", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'noYear' field") + } + + // Simple Field (noDate) + if _err := writeBuffer.WriteBit("noDate", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'noDate' field") + } + + // Simple Field (noDayOfWeek) + if _err := writeBuffer.WriteBit("noDayOfWeek", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'noDayOfWeek' field") + } + + // Simple Field (noTime) + if _err := writeBuffer.WriteBit("noTime", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'noTime' field") + } + + // Simple Field (standardSummerTime) + if _err := writeBuffer.WriteBit("standardSummerTime", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'standardSummerTime' field") + } + + // Simple Field (qualityOfClock) + if _err := writeBuffer.WriteBit("qualityOfClock", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'qualityOfClock' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } +case propertyType == KnxPropertyDataType_PDT_GENERIC_01 : // List + // Array Field (value) + for i := uint32(0); i < uint32((1)); i++ { + _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case propertyType == KnxPropertyDataType_PDT_GENERIC_02 : // List + // Array Field (value) + for i := uint32(0); i < uint32((2)); i++ { + _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case propertyType == KnxPropertyDataType_PDT_GENERIC_03 : // List + // Array Field (value) + for i := uint32(0); i < uint32((3)); i++ { + _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case propertyType == KnxPropertyDataType_PDT_GENERIC_04 : // List + // Array Field (value) + for i := uint32(0); i < uint32((4)); i++ { + _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case propertyType == KnxPropertyDataType_PDT_GENERIC_05 : // List + // Array Field (value) + for i := uint32(0); i < uint32((5)); i++ { + _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case propertyType == KnxPropertyDataType_PDT_GENERIC_06 : // List + // Array Field (value) + for i := uint32(0); i < uint32((6)); i++ { + _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case propertyType == KnxPropertyDataType_PDT_GENERIC_07 : // List + // Array Field (value) + for i := uint32(0); i < uint32((7)); i++ { + _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case propertyType == KnxPropertyDataType_PDT_GENERIC_08 : // List + // Array Field (value) + for i := uint32(0); i < uint32((8)); i++ { + _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case propertyType == KnxPropertyDataType_PDT_GENERIC_09 : // List + // Array Field (value) + for i := uint32(0); i < uint32((9)); i++ { + _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case propertyType == KnxPropertyDataType_PDT_GENERIC_10 : // List + // Array Field (value) + for i := uint32(0); i < uint32((10)); i++ { + _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case propertyType == KnxPropertyDataType_PDT_GENERIC_11 : // List + // Array Field (value) + for i := uint32(0); i < uint32((11)); i++ { + _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case propertyType == KnxPropertyDataType_PDT_GENERIC_12 : // List + // Array Field (value) + for i := uint32(0); i < uint32((12)); i++ { + _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case propertyType == KnxPropertyDataType_PDT_GENERIC_13 : // List + // Array Field (value) + for i := uint32(0); i < uint32((13)); i++ { + _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case propertyType == KnxPropertyDataType_PDT_GENERIC_14 : // List + // Array Field (value) + for i := uint32(0); i < uint32((14)); i++ { + _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case propertyType == KnxPropertyDataType_PDT_GENERIC_15 : // List + // Array Field (value) + for i := uint32(0); i < uint32((15)); i++ { + _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case propertyType == KnxPropertyDataType_PDT_GENERIC_16 : // List + // Array Field (value) + for i := uint32(0); i < uint32((16)); i++ { + _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case propertyType == KnxPropertyDataType_PDT_GENERIC_17 : // List + // Array Field (value) + for i := uint32(0); i < uint32((17)); i++ { + _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case propertyType == KnxPropertyDataType_PDT_GENERIC_18 : // List + // Array Field (value) + for i := uint32(0); i < uint32((18)); i++ { + _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case propertyType == KnxPropertyDataType_PDT_GENERIC_19 : // List + // Array Field (value) + for i := uint32(0); i < uint32((19)); i++ { + _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case propertyType == KnxPropertyDataType_PDT_GENERIC_20 : // List + // Array Field (value) + for i := uint32(0); i < uint32((20)); i++ { + _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case propertyType == KnxPropertyDataType_PDT_VERSION : // Struct + // Simple Field (magicNumber) + if _err := writeBuffer.WriteUint8("magicNumber", 5, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'magicNumber' field") + } + + // Simple Field (versionNumber) + if _err := writeBuffer.WriteUint8("versionNumber", 5, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'versionNumber' field") + } + + // Simple Field (revisionNumber) + if _err := writeBuffer.WriteUint8("revisionNumber", 6, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'revisionNumber' field") + } +case propertyType == KnxPropertyDataType_PDT_ALARM_INFO : // Struct + // Simple Field (logNumber) + if _err := writeBuffer.WriteUint8("logNumber", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'logNumber' field") + } + + // Simple Field (alarmPriority) + if _err := writeBuffer.WriteUint8("alarmPriority", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'alarmPriority' field") + } + + // Simple Field (applicationArea) + if _err := writeBuffer.WriteUint8("applicationArea", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'applicationArea' field") + } + + // Simple Field (errorClass) + if _err := writeBuffer.WriteUint8("errorClass", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'errorClass' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 4, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (errorcodeSup) + if _err := writeBuffer.WriteBit("errorcodeSup", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'errorcodeSup' field") + } + + // Simple Field (alarmtextSup) + if _err := writeBuffer.WriteBit("alarmtextSup", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'alarmtextSup' field") + } + + // Simple Field (timestampSup) + if _err := writeBuffer.WriteBit("timestampSup", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'timestampSup' field") + } + + // Simple Field (ackSup) + if _err := writeBuffer.WriteBit("ackSup", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'ackSup' field") + } + + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 5, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (locked) + if _err := writeBuffer.WriteBit("locked", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'locked' field") + } + + // Simple Field (alarmunack) + if _err := writeBuffer.WriteBit("alarmunack", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'alarmunack' field") + } + + // Simple Field (inalarm) + if _err := writeBuffer.WriteBit("inalarm", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'inalarm' field") + } +case propertyType == KnxPropertyDataType_PDT_BINARY_INFORMATION : // BOOL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } + + // Simple Field (value) + if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case propertyType == KnxPropertyDataType_PDT_BITSET8 : // List + // Array Field (value) + for i := uint32(0); i < uint32((8)); i++ { + _itemErr := writeBuffer.WriteBit("", value.GetIndex(i).GetBool()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case propertyType == KnxPropertyDataType_PDT_BITSET16 : // List + // Array Field (value) + for i := uint32(0); i < uint32((16)); i++ { + _itemErr := writeBuffer.WriteBit("", value.GetIndex(i).GetBool()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case propertyType == KnxPropertyDataType_PDT_ENUM8 : // USINT + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case propertyType == KnxPropertyDataType_PDT_SCALING : // USINT + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +default : // List + // Array Field (value) + for i := uint32(0); i < uint32(m.DataLengthInBytes); i++ { + _itemErr := writeBuffer.WriteByte("", value.GetIndex(i).GetByte()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } } writeBuffer.PopContext("KnxProperty") return nil } + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/KnxPropertyDataType.go b/plc4go/protocols/knxnetip/readwrite/model/KnxPropertyDataType.go index 92bd85bea4c..ba2d0e55469 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/KnxPropertyDataType.go +++ b/plc4go/protocols/knxnetip/readwrite/model/KnxPropertyDataType.go @@ -37,64 +37,64 @@ type IKnxPropertyDataType interface { Name() string } -const ( - KnxPropertyDataType_PDT_UNKNOWN KnxPropertyDataType = 0 - KnxPropertyDataType_PDT_CONTROL KnxPropertyDataType = 1 - KnxPropertyDataType_PDT_CHAR KnxPropertyDataType = 2 - KnxPropertyDataType_PDT_UNSIGNED_CHAR KnxPropertyDataType = 3 - KnxPropertyDataType_PDT_INT KnxPropertyDataType = 4 - KnxPropertyDataType_PDT_UNSIGNED_INT KnxPropertyDataType = 5 - KnxPropertyDataType_PDT_KNX_FLOAT KnxPropertyDataType = 6 - KnxPropertyDataType_PDT_DATE KnxPropertyDataType = 7 - KnxPropertyDataType_PDT_TIME KnxPropertyDataType = 8 - KnxPropertyDataType_PDT_LONG KnxPropertyDataType = 9 - KnxPropertyDataType_PDT_UNSIGNED_LONG KnxPropertyDataType = 10 - KnxPropertyDataType_PDT_FLOAT KnxPropertyDataType = 11 - KnxPropertyDataType_PDT_DOUBLE KnxPropertyDataType = 12 - KnxPropertyDataType_PDT_CHAR_BLOCK KnxPropertyDataType = 13 +const( + KnxPropertyDataType_PDT_UNKNOWN KnxPropertyDataType = 0 + KnxPropertyDataType_PDT_CONTROL KnxPropertyDataType = 1 + KnxPropertyDataType_PDT_CHAR KnxPropertyDataType = 2 + KnxPropertyDataType_PDT_UNSIGNED_CHAR KnxPropertyDataType = 3 + KnxPropertyDataType_PDT_INT KnxPropertyDataType = 4 + KnxPropertyDataType_PDT_UNSIGNED_INT KnxPropertyDataType = 5 + KnxPropertyDataType_PDT_KNX_FLOAT KnxPropertyDataType = 6 + KnxPropertyDataType_PDT_DATE KnxPropertyDataType = 7 + KnxPropertyDataType_PDT_TIME KnxPropertyDataType = 8 + KnxPropertyDataType_PDT_LONG KnxPropertyDataType = 9 + KnxPropertyDataType_PDT_UNSIGNED_LONG KnxPropertyDataType = 10 + KnxPropertyDataType_PDT_FLOAT KnxPropertyDataType = 11 + KnxPropertyDataType_PDT_DOUBLE KnxPropertyDataType = 12 + KnxPropertyDataType_PDT_CHAR_BLOCK KnxPropertyDataType = 13 KnxPropertyDataType_PDT_POLL_GROUP_SETTINGS KnxPropertyDataType = 14 - KnxPropertyDataType_PDT_SHORT_CHAR_BLOCK KnxPropertyDataType = 15 - KnxPropertyDataType_PDT_DATE_TIME KnxPropertyDataType = 16 - KnxPropertyDataType_PDT_VARIABLE_LENGTH KnxPropertyDataType = 17 - KnxPropertyDataType_PDT_GENERIC_01 KnxPropertyDataType = 18 - KnxPropertyDataType_PDT_GENERIC_02 KnxPropertyDataType = 19 - KnxPropertyDataType_PDT_GENERIC_03 KnxPropertyDataType = 20 - KnxPropertyDataType_PDT_GENERIC_04 KnxPropertyDataType = 21 - KnxPropertyDataType_PDT_GENERIC_05 KnxPropertyDataType = 22 - KnxPropertyDataType_PDT_GENERIC_06 KnxPropertyDataType = 23 - KnxPropertyDataType_PDT_GENERIC_07 KnxPropertyDataType = 24 - KnxPropertyDataType_PDT_GENERIC_08 KnxPropertyDataType = 25 - KnxPropertyDataType_PDT_GENERIC_09 KnxPropertyDataType = 26 - KnxPropertyDataType_PDT_GENERIC_10 KnxPropertyDataType = 27 - KnxPropertyDataType_PDT_GENERIC_11 KnxPropertyDataType = 28 - KnxPropertyDataType_PDT_GENERIC_12 KnxPropertyDataType = 29 - KnxPropertyDataType_PDT_GENERIC_13 KnxPropertyDataType = 30 - KnxPropertyDataType_PDT_GENERIC_14 KnxPropertyDataType = 31 - KnxPropertyDataType_PDT_GENERIC_15 KnxPropertyDataType = 32 - KnxPropertyDataType_PDT_GENERIC_16 KnxPropertyDataType = 33 - KnxPropertyDataType_PDT_GENERIC_17 KnxPropertyDataType = 34 - KnxPropertyDataType_PDT_GENERIC_18 KnxPropertyDataType = 35 - KnxPropertyDataType_PDT_GENERIC_19 KnxPropertyDataType = 36 - KnxPropertyDataType_PDT_GENERIC_20 KnxPropertyDataType = 37 - KnxPropertyDataType_PDT_UTF_8 KnxPropertyDataType = 38 - KnxPropertyDataType_PDT_VERSION KnxPropertyDataType = 39 - KnxPropertyDataType_PDT_ALARM_INFO KnxPropertyDataType = 40 - KnxPropertyDataType_PDT_BINARY_INFORMATION KnxPropertyDataType = 41 - KnxPropertyDataType_PDT_BITSET8 KnxPropertyDataType = 42 - KnxPropertyDataType_PDT_BITSET16 KnxPropertyDataType = 43 - KnxPropertyDataType_PDT_ENUM8 KnxPropertyDataType = 44 - KnxPropertyDataType_PDT_SCALING KnxPropertyDataType = 45 - KnxPropertyDataType_PDT_NE_VL KnxPropertyDataType = 46 - KnxPropertyDataType_PDT_NE_FL KnxPropertyDataType = 47 - KnxPropertyDataType_PDT_FUNCTION KnxPropertyDataType = 48 - KnxPropertyDataType_PDT_ESCAPE KnxPropertyDataType = 49 + KnxPropertyDataType_PDT_SHORT_CHAR_BLOCK KnxPropertyDataType = 15 + KnxPropertyDataType_PDT_DATE_TIME KnxPropertyDataType = 16 + KnxPropertyDataType_PDT_VARIABLE_LENGTH KnxPropertyDataType = 17 + KnxPropertyDataType_PDT_GENERIC_01 KnxPropertyDataType = 18 + KnxPropertyDataType_PDT_GENERIC_02 KnxPropertyDataType = 19 + KnxPropertyDataType_PDT_GENERIC_03 KnxPropertyDataType = 20 + KnxPropertyDataType_PDT_GENERIC_04 KnxPropertyDataType = 21 + KnxPropertyDataType_PDT_GENERIC_05 KnxPropertyDataType = 22 + KnxPropertyDataType_PDT_GENERIC_06 KnxPropertyDataType = 23 + KnxPropertyDataType_PDT_GENERIC_07 KnxPropertyDataType = 24 + KnxPropertyDataType_PDT_GENERIC_08 KnxPropertyDataType = 25 + KnxPropertyDataType_PDT_GENERIC_09 KnxPropertyDataType = 26 + KnxPropertyDataType_PDT_GENERIC_10 KnxPropertyDataType = 27 + KnxPropertyDataType_PDT_GENERIC_11 KnxPropertyDataType = 28 + KnxPropertyDataType_PDT_GENERIC_12 KnxPropertyDataType = 29 + KnxPropertyDataType_PDT_GENERIC_13 KnxPropertyDataType = 30 + KnxPropertyDataType_PDT_GENERIC_14 KnxPropertyDataType = 31 + KnxPropertyDataType_PDT_GENERIC_15 KnxPropertyDataType = 32 + KnxPropertyDataType_PDT_GENERIC_16 KnxPropertyDataType = 33 + KnxPropertyDataType_PDT_GENERIC_17 KnxPropertyDataType = 34 + KnxPropertyDataType_PDT_GENERIC_18 KnxPropertyDataType = 35 + KnxPropertyDataType_PDT_GENERIC_19 KnxPropertyDataType = 36 + KnxPropertyDataType_PDT_GENERIC_20 KnxPropertyDataType = 37 + KnxPropertyDataType_PDT_UTF_8 KnxPropertyDataType = 38 + KnxPropertyDataType_PDT_VERSION KnxPropertyDataType = 39 + KnxPropertyDataType_PDT_ALARM_INFO KnxPropertyDataType = 40 + KnxPropertyDataType_PDT_BINARY_INFORMATION KnxPropertyDataType = 41 + KnxPropertyDataType_PDT_BITSET8 KnxPropertyDataType = 42 + KnxPropertyDataType_PDT_BITSET16 KnxPropertyDataType = 43 + KnxPropertyDataType_PDT_ENUM8 KnxPropertyDataType = 44 + KnxPropertyDataType_PDT_SCALING KnxPropertyDataType = 45 + KnxPropertyDataType_PDT_NE_VL KnxPropertyDataType = 46 + KnxPropertyDataType_PDT_NE_FL KnxPropertyDataType = 47 + KnxPropertyDataType_PDT_FUNCTION KnxPropertyDataType = 48 + KnxPropertyDataType_PDT_ESCAPE KnxPropertyDataType = 49 ) var KnxPropertyDataTypeValues []KnxPropertyDataType func init() { _ = errors.New - KnxPropertyDataTypeValues = []KnxPropertyDataType{ + KnxPropertyDataTypeValues = []KnxPropertyDataType { KnxPropertyDataType_PDT_UNKNOWN, KnxPropertyDataType_PDT_CONTROL, KnxPropertyDataType_PDT_CHAR, @@ -148,210 +148,160 @@ func init() { } } + func (e KnxPropertyDataType) Number() uint8 { - switch e { - case 0: - { /* '0' */ - return 0 + switch e { + case 0: { /* '0' */ + return 0 } - case 1: - { /* '1' */ - return 0 + case 1: { /* '1' */ + return 0 } - case 10: - { /* '10' */ - return 9 + case 10: { /* '10' */ + return 9 } - case 11: - { /* '11' */ - return 10 + case 11: { /* '11' */ + return 10 } - case 12: - { /* '12' */ - return 11 + case 12: { /* '12' */ + return 11 } - case 13: - { /* '13' */ - return 12 + case 13: { /* '13' */ + return 12 } - case 14: - { /* '14' */ - return 13 + case 14: { /* '14' */ + return 13 } - case 15: - { /* '15' */ - return 14 + case 15: { /* '15' */ + return 14 } - case 16: - { /* '16' */ - return 15 + case 16: { /* '16' */ + return 15 } - case 17: - { /* '17' */ - return 16 + case 17: { /* '17' */ + return 16 } - case 18: - { /* '18' */ - return 17 + case 18: { /* '18' */ + return 17 } - case 19: - { /* '19' */ - return 18 + case 19: { /* '19' */ + return 18 } - case 2: - { /* '2' */ - return 1 + case 2: { /* '2' */ + return 1 } - case 20: - { /* '20' */ - return 19 + case 20: { /* '20' */ + return 19 } - case 21: - { /* '21' */ - return 20 + case 21: { /* '21' */ + return 20 } - case 22: - { /* '22' */ - return 21 + case 22: { /* '22' */ + return 21 } - case 23: - { /* '23' */ - return 22 + case 23: { /* '23' */ + return 22 } - case 24: - { /* '24' */ - return 23 + case 24: { /* '24' */ + return 23 } - case 25: - { /* '25' */ - return 24 + case 25: { /* '25' */ + return 24 } - case 26: - { /* '26' */ - return 25 + case 26: { /* '26' */ + return 25 } - case 27: - { /* '27' */ - return 26 + case 27: { /* '27' */ + return 26 } - case 28: - { /* '28' */ - return 27 + case 28: { /* '28' */ + return 27 } - case 29: - { /* '29' */ - return 28 + case 29: { /* '29' */ + return 28 } - case 3: - { /* '3' */ - return 2 + case 3: { /* '3' */ + return 2 } - case 30: - { /* '30' */ - return 29 + case 30: { /* '30' */ + return 29 } - case 31: - { /* '31' */ - return 30 + case 31: { /* '31' */ + return 30 } - case 32: - { /* '32' */ - return 31 + case 32: { /* '32' */ + return 31 } - case 33: - { /* '33' */ - return 32 + case 33: { /* '33' */ + return 32 } - case 34: - { /* '34' */ - return 33 + case 34: { /* '34' */ + return 33 } - case 35: - { /* '35' */ - return 34 + case 35: { /* '35' */ + return 34 } - case 36: - { /* '36' */ - return 35 + case 36: { /* '36' */ + return 35 } - case 37: - { /* '37' */ - return 36 + case 37: { /* '37' */ + return 36 } - case 38: - { /* '38' */ - return 47 + case 38: { /* '38' */ + return 47 } - case 39: - { /* '39' */ - return 48 + case 39: { /* '39' */ + return 48 } - case 4: - { /* '4' */ - return 3 + case 4: { /* '4' */ + return 3 } - case 40: - { /* '40' */ - return 49 + case 40: { /* '40' */ + return 49 } - case 41: - { /* '41' */ - return 50 + case 41: { /* '41' */ + return 50 } - case 42: - { /* '42' */ - return 51 + case 42: { /* '42' */ + return 51 } - case 43: - { /* '43' */ - return 52 + case 43: { /* '43' */ + return 52 } - case 44: - { /* '44' */ - return 53 + case 44: { /* '44' */ + return 53 } - case 45: - { /* '45' */ - return 54 + case 45: { /* '45' */ + return 54 } - case 46: - { /* '46' */ - return 60 + case 46: { /* '46' */ + return 60 } - case 47: - { /* '47' */ - return 61 + case 47: { /* '47' */ + return 61 } - case 48: - { /* '48' */ - return 62 + case 48: { /* '48' */ + return 62 } - case 49: - { /* '49' */ - return 63 + case 49: { /* '49' */ + return 63 } - case 5: - { /* '5' */ - return 4 + case 5: { /* '5' */ + return 4 } - case 6: - { /* '6' */ - return 5 + case 6: { /* '6' */ + return 5 } - case 7: - { /* '7' */ - return 6 + case 7: { /* '7' */ + return 6 } - case 8: - { /* '8' */ - return 7 + case 8: { /* '8' */ + return 7 } - case 9: - { /* '9' */ - return 8 + case 9: { /* '9' */ + return 8 } - default: - { + default: { return 0 } } @@ -367,209 +317,158 @@ func KnxPropertyDataTypeFirstEnumForFieldNumber(value uint8) (KnxPropertyDataTyp } func (e KnxPropertyDataType) SizeInBytes() uint8 { - switch e { - case 0: - { /* '0' */ - return 0 + switch e { + case 0: { /* '0' */ + return 0 } - case 1: - { /* '1' */ - return 10 + case 1: { /* '1' */ + return 10 } - case 10: - { /* '10' */ - return 4 + case 10: { /* '10' */ + return 4 } - case 11: - { /* '11' */ - return 4 + case 11: { /* '11' */ + return 4 } - case 12: - { /* '12' */ - return 8 + case 12: { /* '12' */ + return 8 } - case 13: - { /* '13' */ - return 10 + case 13: { /* '13' */ + return 10 } - case 14: - { /* '14' */ - return 3 + case 14: { /* '14' */ + return 3 } - case 15: - { /* '15' */ - return 5 + case 15: { /* '15' */ + return 5 } - case 16: - { /* '16' */ - return 8 + case 16: { /* '16' */ + return 8 } - case 17: - { /* '17' */ - return 0 + case 17: { /* '17' */ + return 0 } - case 18: - { /* '18' */ - return 1 + case 18: { /* '18' */ + return 1 } - case 19: - { /* '19' */ - return 2 + case 19: { /* '19' */ + return 2 } - case 2: - { /* '2' */ - return 1 + case 2: { /* '2' */ + return 1 } - case 20: - { /* '20' */ - return 3 + case 20: { /* '20' */ + return 3 } - case 21: - { /* '21' */ - return 4 + case 21: { /* '21' */ + return 4 } - case 22: - { /* '22' */ - return 5 + case 22: { /* '22' */ + return 5 } - case 23: - { /* '23' */ - return 6 + case 23: { /* '23' */ + return 6 } - case 24: - { /* '24' */ - return 7 + case 24: { /* '24' */ + return 7 } - case 25: - { /* '25' */ - return 8 + case 25: { /* '25' */ + return 8 } - case 26: - { /* '26' */ - return 9 + case 26: { /* '26' */ + return 9 } - case 27: - { /* '27' */ - return 10 + case 27: { /* '27' */ + return 10 } - case 28: - { /* '28' */ - return 11 + case 28: { /* '28' */ + return 11 } - case 29: - { /* '29' */ - return 12 + case 29: { /* '29' */ + return 12 } - case 3: - { /* '3' */ - return 1 + case 3: { /* '3' */ + return 1 } - case 30: - { /* '30' */ - return 13 + case 30: { /* '30' */ + return 13 } - case 31: - { /* '31' */ - return 14 + case 31: { /* '31' */ + return 14 } - case 32: - { /* '32' */ - return 15 + case 32: { /* '32' */ + return 15 } - case 33: - { /* '33' */ - return 16 + case 33: { /* '33' */ + return 16 } - case 34: - { /* '34' */ - return 17 + case 34: { /* '34' */ + return 17 } - case 35: - { /* '35' */ - return 18 + case 35: { /* '35' */ + return 18 } - case 36: - { /* '36' */ - return 19 + case 36: { /* '36' */ + return 19 } - case 37: - { /* '37' */ - return 20 + case 37: { /* '37' */ + return 20 } - case 38: - { /* '38' */ - return 0 + case 38: { /* '38' */ + return 0 } - case 39: - { /* '39' */ - return 2 + case 39: { /* '39' */ + return 2 } - case 4: - { /* '4' */ - return 2 + case 4: { /* '4' */ + return 2 } - case 40: - { /* '40' */ - return 6 + case 40: { /* '40' */ + return 6 } - case 41: - { /* '41' */ - return 1 + case 41: { /* '41' */ + return 1 } - case 42: - { /* '42' */ - return 1 + case 42: { /* '42' */ + return 1 } - case 43: - { /* '43' */ - return 2 + case 43: { /* '43' */ + return 2 } - case 44: - { /* '44' */ - return 1 + case 44: { /* '44' */ + return 1 } - case 45: - { /* '45' */ - return 1 + case 45: { /* '45' */ + return 1 } - case 46: - { /* '46' */ - return 0 + case 46: { /* '46' */ + return 0 } - case 47: - { /* '47' */ - return 0 + case 47: { /* '47' */ + return 0 } - case 48: - { /* '48' */ - return 0 + case 48: { /* '48' */ + return 0 } - case 49: - { /* '49' */ - return 0 + case 49: { /* '49' */ + return 0 } - case 5: - { /* '5' */ - return 2 + case 5: { /* '5' */ + return 2 } - case 6: - { /* '6' */ - return 2 + case 6: { /* '6' */ + return 2 } - case 7: - { /* '7' */ - return 3 + case 7: { /* '7' */ + return 3 } - case 8: - { /* '8' */ - return 3 + case 8: { /* '8' */ + return 3 } - case 9: - { /* '9' */ - return 4 + case 9: { /* '9' */ + return 4 } - default: - { + default: { return 0 } } @@ -585,209 +484,158 @@ func KnxPropertyDataTypeFirstEnumForFieldSizeInBytes(value uint8) (KnxPropertyDa } func (e KnxPropertyDataType) Name() string { - switch e { - case 0: - { /* '0' */ - return "Unknown Property Data Type" + switch e { + case 0: { /* '0' */ + return "Unknown Property Data Type" } - case 1: - { /* '1' */ - return "PDT_CONTROL" + case 1: { /* '1' */ + return "PDT_CONTROL" } - case 10: - { /* '10' */ - return "PDT_UNSIGNED_LONG" + case 10: { /* '10' */ + return "PDT_UNSIGNED_LONG" } - case 11: - { /* '11' */ - return "PDT_FLOAT" + case 11: { /* '11' */ + return "PDT_FLOAT" } - case 12: - { /* '12' */ - return "PDT_DOUBLE" + case 12: { /* '12' */ + return "PDT_DOUBLE" } - case 13: - { /* '13' */ - return "PDT_CHAR_BLOCK" + case 13: { /* '13' */ + return "PDT_CHAR_BLOCK" } - case 14: - { /* '14' */ - return "PDT_POLL_GROUP_SETTINGS" + case 14: { /* '14' */ + return "PDT_POLL_GROUP_SETTINGS" } - case 15: - { /* '15' */ - return "PDT_SHORT_CHAR_BLOCK" + case 15: { /* '15' */ + return "PDT_SHORT_CHAR_BLOCK" } - case 16: - { /* '16' */ - return "PDT_DATE_TIME" + case 16: { /* '16' */ + return "PDT_DATE_TIME" } - case 17: - { /* '17' */ - return "PDT_VARIABLE_LENGTH" + case 17: { /* '17' */ + return "PDT_VARIABLE_LENGTH" } - case 18: - { /* '18' */ - return "PDT_GENERIC_01" + case 18: { /* '18' */ + return "PDT_GENERIC_01" } - case 19: - { /* '19' */ - return "PDT_GENERIC_02" + case 19: { /* '19' */ + return "PDT_GENERIC_02" } - case 2: - { /* '2' */ - return "PDT_CHAR" + case 2: { /* '2' */ + return "PDT_CHAR" } - case 20: - { /* '20' */ - return "PDT_GENERIC_03" + case 20: { /* '20' */ + return "PDT_GENERIC_03" } - case 21: - { /* '21' */ - return "PDT_GENERIC_04" + case 21: { /* '21' */ + return "PDT_GENERIC_04" } - case 22: - { /* '22' */ - return "PDT_GENERIC_05" + case 22: { /* '22' */ + return "PDT_GENERIC_05" } - case 23: - { /* '23' */ - return "PDT_GENERIC_06" + case 23: { /* '23' */ + return "PDT_GENERIC_06" } - case 24: - { /* '24' */ - return "PDT_GENERIC_07" + case 24: { /* '24' */ + return "PDT_GENERIC_07" } - case 25: - { /* '25' */ - return "PDT_GENERIC_08" + case 25: { /* '25' */ + return "PDT_GENERIC_08" } - case 26: - { /* '26' */ - return "PDT_GENERIC_09" + case 26: { /* '26' */ + return "PDT_GENERIC_09" } - case 27: - { /* '27' */ - return "PDT_GENERIC_10" + case 27: { /* '27' */ + return "PDT_GENERIC_10" } - case 28: - { /* '28' */ - return "PDT_GENERIC_11" + case 28: { /* '28' */ + return "PDT_GENERIC_11" } - case 29: - { /* '29' */ - return "PDT_GENERIC_12" + case 29: { /* '29' */ + return "PDT_GENERIC_12" } - case 3: - { /* '3' */ - return "PDT_UNSIGNED_CHAR" + case 3: { /* '3' */ + return "PDT_UNSIGNED_CHAR" } - case 30: - { /* '30' */ - return "PDT_GENERIC_13" + case 30: { /* '30' */ + return "PDT_GENERIC_13" } - case 31: - { /* '31' */ - return "PDT_GENERIC_14" + case 31: { /* '31' */ + return "PDT_GENERIC_14" } - case 32: - { /* '32' */ - return "PDT_GENERIC_15" + case 32: { /* '32' */ + return "PDT_GENERIC_15" } - case 33: - { /* '33' */ - return "PDT_GENERIC_16" + case 33: { /* '33' */ + return "PDT_GENERIC_16" } - case 34: - { /* '34' */ - return "PDT_GENERIC_17" + case 34: { /* '34' */ + return "PDT_GENERIC_17" } - case 35: - { /* '35' */ - return "PDT_GENERIC_18" + case 35: { /* '35' */ + return "PDT_GENERIC_18" } - case 36: - { /* '36' */ - return "PDT_GENERIC_19" + case 36: { /* '36' */ + return "PDT_GENERIC_19" } - case 37: - { /* '37' */ - return "PDT_GENERIC_20" + case 37: { /* '37' */ + return "PDT_GENERIC_20" } - case 38: - { /* '38' */ - return "PDT_UTF-8" + case 38: { /* '38' */ + return "PDT_UTF-8" } - case 39: - { /* '39' */ - return "PDT_VERSION" + case 39: { /* '39' */ + return "PDT_VERSION" } - case 4: - { /* '4' */ - return "PDT_INT" + case 4: { /* '4' */ + return "PDT_INT" } - case 40: - { /* '40' */ - return "PDT_ALARM_INFO" + case 40: { /* '40' */ + return "PDT_ALARM_INFO" } - case 41: - { /* '41' */ - return "PDT_BINARY_INFORMATION" + case 41: { /* '41' */ + return "PDT_BINARY_INFORMATION" } - case 42: - { /* '42' */ - return "PDT_BITSET8" + case 42: { /* '42' */ + return "PDT_BITSET8" } - case 43: - { /* '43' */ - return "PDT_BITSET16" + case 43: { /* '43' */ + return "PDT_BITSET16" } - case 44: - { /* '44' */ - return "PDT_ENUM8" + case 44: { /* '44' */ + return "PDT_ENUM8" } - case 45: - { /* '45' */ - return "PDT_SCALING" + case 45: { /* '45' */ + return "PDT_SCALING" } - case 46: - { /* '46' */ - return "PDT_NE_VL" + case 46: { /* '46' */ + return "PDT_NE_VL" } - case 47: - { /* '47' */ - return "PDT_NE_FL" + case 47: { /* '47' */ + return "PDT_NE_FL" } - case 48: - { /* '48' */ - return "PDT_FUNCTION" + case 48: { /* '48' */ + return "PDT_FUNCTION" } - case 49: - { /* '49' */ - return "PDT_ESCAPE" + case 49: { /* '49' */ + return "PDT_ESCAPE" } - case 5: - { /* '5' */ - return "PDT_UNSIGNED_INT" + case 5: { /* '5' */ + return "PDT_UNSIGNED_INT" } - case 6: - { /* '6' */ - return "PDT_KNX_FLOAT" + case 6: { /* '6' */ + return "PDT_KNX_FLOAT" } - case 7: - { /* '7' */ - return "PDT_DATE" + case 7: { /* '7' */ + return "PDT_DATE" } - case 8: - { /* '8' */ - return "PDT_TIME" + case 8: { /* '8' */ + return "PDT_TIME" } - case 9: - { /* '9' */ - return "PDT_LONG" + case 9: { /* '9' */ + return "PDT_LONG" } - default: - { + default: { return "" } } @@ -803,106 +651,106 @@ func KnxPropertyDataTypeFirstEnumForFieldName(value string) (KnxPropertyDataType } func KnxPropertyDataTypeByValue(value uint8) (enum KnxPropertyDataType, ok bool) { switch value { - case 0: - return KnxPropertyDataType_PDT_UNKNOWN, true - case 1: - return KnxPropertyDataType_PDT_CONTROL, true - case 10: - return KnxPropertyDataType_PDT_UNSIGNED_LONG, true - case 11: - return KnxPropertyDataType_PDT_FLOAT, true - case 12: - return KnxPropertyDataType_PDT_DOUBLE, true - case 13: - return KnxPropertyDataType_PDT_CHAR_BLOCK, true - case 14: - return KnxPropertyDataType_PDT_POLL_GROUP_SETTINGS, true - case 15: - return KnxPropertyDataType_PDT_SHORT_CHAR_BLOCK, true - case 16: - return KnxPropertyDataType_PDT_DATE_TIME, true - case 17: - return KnxPropertyDataType_PDT_VARIABLE_LENGTH, true - case 18: - return KnxPropertyDataType_PDT_GENERIC_01, true - case 19: - return KnxPropertyDataType_PDT_GENERIC_02, true - case 2: - return KnxPropertyDataType_PDT_CHAR, true - case 20: - return KnxPropertyDataType_PDT_GENERIC_03, true - case 21: - return KnxPropertyDataType_PDT_GENERIC_04, true - case 22: - return KnxPropertyDataType_PDT_GENERIC_05, true - case 23: - return KnxPropertyDataType_PDT_GENERIC_06, true - case 24: - return KnxPropertyDataType_PDT_GENERIC_07, true - case 25: - return KnxPropertyDataType_PDT_GENERIC_08, true - case 26: - return KnxPropertyDataType_PDT_GENERIC_09, true - case 27: - return KnxPropertyDataType_PDT_GENERIC_10, true - case 28: - return KnxPropertyDataType_PDT_GENERIC_11, true - case 29: - return KnxPropertyDataType_PDT_GENERIC_12, true - case 3: - return KnxPropertyDataType_PDT_UNSIGNED_CHAR, true - case 30: - return KnxPropertyDataType_PDT_GENERIC_13, true - case 31: - return KnxPropertyDataType_PDT_GENERIC_14, true - case 32: - return KnxPropertyDataType_PDT_GENERIC_15, true - case 33: - return KnxPropertyDataType_PDT_GENERIC_16, true - case 34: - return KnxPropertyDataType_PDT_GENERIC_17, true - case 35: - return KnxPropertyDataType_PDT_GENERIC_18, true - case 36: - return KnxPropertyDataType_PDT_GENERIC_19, true - case 37: - return KnxPropertyDataType_PDT_GENERIC_20, true - case 38: - return KnxPropertyDataType_PDT_UTF_8, true - case 39: - return KnxPropertyDataType_PDT_VERSION, true - case 4: - return KnxPropertyDataType_PDT_INT, true - case 40: - return KnxPropertyDataType_PDT_ALARM_INFO, true - case 41: - return KnxPropertyDataType_PDT_BINARY_INFORMATION, true - case 42: - return KnxPropertyDataType_PDT_BITSET8, true - case 43: - return KnxPropertyDataType_PDT_BITSET16, true - case 44: - return KnxPropertyDataType_PDT_ENUM8, true - case 45: - return KnxPropertyDataType_PDT_SCALING, true - case 46: - return KnxPropertyDataType_PDT_NE_VL, true - case 47: - return KnxPropertyDataType_PDT_NE_FL, true - case 48: - return KnxPropertyDataType_PDT_FUNCTION, true - case 49: - return KnxPropertyDataType_PDT_ESCAPE, true - case 5: - return KnxPropertyDataType_PDT_UNSIGNED_INT, true - case 6: - return KnxPropertyDataType_PDT_KNX_FLOAT, true - case 7: - return KnxPropertyDataType_PDT_DATE, true - case 8: - return KnxPropertyDataType_PDT_TIME, true - case 9: - return KnxPropertyDataType_PDT_LONG, true + case 0: + return KnxPropertyDataType_PDT_UNKNOWN, true + case 1: + return KnxPropertyDataType_PDT_CONTROL, true + case 10: + return KnxPropertyDataType_PDT_UNSIGNED_LONG, true + case 11: + return KnxPropertyDataType_PDT_FLOAT, true + case 12: + return KnxPropertyDataType_PDT_DOUBLE, true + case 13: + return KnxPropertyDataType_PDT_CHAR_BLOCK, true + case 14: + return KnxPropertyDataType_PDT_POLL_GROUP_SETTINGS, true + case 15: + return KnxPropertyDataType_PDT_SHORT_CHAR_BLOCK, true + case 16: + return KnxPropertyDataType_PDT_DATE_TIME, true + case 17: + return KnxPropertyDataType_PDT_VARIABLE_LENGTH, true + case 18: + return KnxPropertyDataType_PDT_GENERIC_01, true + case 19: + return KnxPropertyDataType_PDT_GENERIC_02, true + case 2: + return KnxPropertyDataType_PDT_CHAR, true + case 20: + return KnxPropertyDataType_PDT_GENERIC_03, true + case 21: + return KnxPropertyDataType_PDT_GENERIC_04, true + case 22: + return KnxPropertyDataType_PDT_GENERIC_05, true + case 23: + return KnxPropertyDataType_PDT_GENERIC_06, true + case 24: + return KnxPropertyDataType_PDT_GENERIC_07, true + case 25: + return KnxPropertyDataType_PDT_GENERIC_08, true + case 26: + return KnxPropertyDataType_PDT_GENERIC_09, true + case 27: + return KnxPropertyDataType_PDT_GENERIC_10, true + case 28: + return KnxPropertyDataType_PDT_GENERIC_11, true + case 29: + return KnxPropertyDataType_PDT_GENERIC_12, true + case 3: + return KnxPropertyDataType_PDT_UNSIGNED_CHAR, true + case 30: + return KnxPropertyDataType_PDT_GENERIC_13, true + case 31: + return KnxPropertyDataType_PDT_GENERIC_14, true + case 32: + return KnxPropertyDataType_PDT_GENERIC_15, true + case 33: + return KnxPropertyDataType_PDT_GENERIC_16, true + case 34: + return KnxPropertyDataType_PDT_GENERIC_17, true + case 35: + return KnxPropertyDataType_PDT_GENERIC_18, true + case 36: + return KnxPropertyDataType_PDT_GENERIC_19, true + case 37: + return KnxPropertyDataType_PDT_GENERIC_20, true + case 38: + return KnxPropertyDataType_PDT_UTF_8, true + case 39: + return KnxPropertyDataType_PDT_VERSION, true + case 4: + return KnxPropertyDataType_PDT_INT, true + case 40: + return KnxPropertyDataType_PDT_ALARM_INFO, true + case 41: + return KnxPropertyDataType_PDT_BINARY_INFORMATION, true + case 42: + return KnxPropertyDataType_PDT_BITSET8, true + case 43: + return KnxPropertyDataType_PDT_BITSET16, true + case 44: + return KnxPropertyDataType_PDT_ENUM8, true + case 45: + return KnxPropertyDataType_PDT_SCALING, true + case 46: + return KnxPropertyDataType_PDT_NE_VL, true + case 47: + return KnxPropertyDataType_PDT_NE_FL, true + case 48: + return KnxPropertyDataType_PDT_FUNCTION, true + case 49: + return KnxPropertyDataType_PDT_ESCAPE, true + case 5: + return KnxPropertyDataType_PDT_UNSIGNED_INT, true + case 6: + return KnxPropertyDataType_PDT_KNX_FLOAT, true + case 7: + return KnxPropertyDataType_PDT_DATE, true + case 8: + return KnxPropertyDataType_PDT_TIME, true + case 9: + return KnxPropertyDataType_PDT_LONG, true } return 0, false } @@ -1013,13 +861,13 @@ func KnxPropertyDataTypeByName(value string) (enum KnxPropertyDataType, ok bool) return 0, false } -func KnxPropertyDataTypeKnows(value uint8) bool { +func KnxPropertyDataTypeKnows(value uint8) bool { for _, typeValue := range KnxPropertyDataTypeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastKnxPropertyDataType(structType interface{}) KnxPropertyDataType { @@ -1179,3 +1027,4 @@ func (e KnxPropertyDataType) PLC4XEnumName() string { func (e KnxPropertyDataType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/knxnetip/readwrite/model/LBusmonInd.go b/plc4go/protocols/knxnetip/readwrite/model/LBusmonInd.go index 1e8e525b144..81b0d9dd24a 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/LBusmonInd.go +++ b/plc4go/protocols/knxnetip/readwrite/model/LBusmonInd.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // LBusmonInd is the corresponding interface of LBusmonInd type LBusmonInd interface { @@ -53,32 +55,32 @@ type LBusmonIndExactly interface { // _LBusmonInd is the data-structure of this message type _LBusmonInd struct { *_CEMI - AdditionalInformationLength uint8 - AdditionalInformation []CEMIAdditionalInformation - DataFrame LDataFrame - Crc *uint8 + AdditionalInformationLength uint8 + AdditionalInformation []CEMIAdditionalInformation + DataFrame LDataFrame + Crc *uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_LBusmonInd) GetMessageCode() uint8 { - return 0x2B -} +func (m *_LBusmonInd) GetMessageCode() uint8 { +return 0x2B} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_LBusmonInd) InitializeParent(parent CEMI) {} +func (m *_LBusmonInd) InitializeParent(parent CEMI ) {} -func (m *_LBusmonInd) GetParent() CEMI { +func (m *_LBusmonInd) GetParent() CEMI { return m._CEMI } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -105,14 +107,15 @@ func (m *_LBusmonInd) GetCrc() *uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewLBusmonInd factory function for _LBusmonInd -func NewLBusmonInd(additionalInformationLength uint8, additionalInformation []CEMIAdditionalInformation, dataFrame LDataFrame, crc *uint8, size uint16) *_LBusmonInd { +func NewLBusmonInd( additionalInformationLength uint8 , additionalInformation []CEMIAdditionalInformation , dataFrame LDataFrame , crc *uint8 , size uint16 ) *_LBusmonInd { _result := &_LBusmonInd{ AdditionalInformationLength: additionalInformationLength, - AdditionalInformation: additionalInformation, - DataFrame: dataFrame, - Crc: crc, - _CEMI: NewCEMI(size), + AdditionalInformation: additionalInformation, + DataFrame: dataFrame, + Crc: crc, + _CEMI: NewCEMI(size), } _result._CEMI._CEMIChildRequirements = _result return _result @@ -120,7 +123,7 @@ func NewLBusmonInd(additionalInformationLength uint8, additionalInformation []CE // Deprecated: use the interface for direct cast func CastLBusmonInd(structType interface{}) LBusmonInd { - if casted, ok := structType.(LBusmonInd); ok { + if casted, ok := structType.(LBusmonInd); ok { return casted } if casted, ok := structType.(*LBusmonInd); ok { @@ -137,7 +140,7 @@ func (m *_LBusmonInd) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (additionalInformationLength) - lengthInBits += 8 + lengthInBits += 8; // Array field if len(m.AdditionalInformation) > 0 { @@ -157,6 +160,7 @@ func (m *_LBusmonInd) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_LBusmonInd) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -175,7 +179,7 @@ func LBusmonIndParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, _ = currentPos // Simple Field (additionalInformationLength) - _additionalInformationLength, _additionalInformationLengthErr := readBuffer.ReadUint8("additionalInformationLength", 8) +_additionalInformationLength, _additionalInformationLengthErr := readBuffer.ReadUint8("additionalInformationLength", 8) if _additionalInformationLengthErr != nil { return nil, errors.Wrap(_additionalInformationLengthErr, "Error parsing 'additionalInformationLength' field of LBusmonInd") } @@ -190,8 +194,8 @@ func LBusmonIndParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, { _additionalInformationLength := additionalInformationLength _additionalInformationEndPos := positionAware.GetPos() + uint16(_additionalInformationLength) - for positionAware.GetPos() < _additionalInformationEndPos { - _item, _err := CEMIAdditionalInformationParseWithBuffer(ctx, readBuffer) + for ;positionAware.GetPos() < _additionalInformationEndPos; { +_item, _err := CEMIAdditionalInformationParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'additionalInformation' field of LBusmonInd") } @@ -206,7 +210,7 @@ func LBusmonIndParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, if pullErr := readBuffer.PullContext("dataFrame"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for dataFrame") } - _dataFrame, _dataFrameErr := LDataFrameParseWithBuffer(ctx, readBuffer) +_dataFrame, _dataFrameErr := LDataFrameParseWithBuffer(ctx, readBuffer) if _dataFrameErr != nil { return nil, errors.Wrap(_dataFrameErr, "Error parsing 'dataFrame' field of LBusmonInd") } @@ -235,9 +239,9 @@ func LBusmonIndParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, Size: size, }, AdditionalInformationLength: additionalInformationLength, - AdditionalInformation: additionalInformation, - DataFrame: dataFrame, - Crc: crc, + AdditionalInformation: additionalInformation, + DataFrame: dataFrame, + Crc: crc, } _child._CEMI._CEMIChildRequirements = _child return _child, nil @@ -259,51 +263,51 @@ func (m *_LBusmonInd) SerializeWithWriteBuffer(ctx context.Context, writeBuffer return errors.Wrap(pushErr, "Error pushing for LBusmonInd") } - // Simple Field (additionalInformationLength) - additionalInformationLength := uint8(m.GetAdditionalInformationLength()) - _additionalInformationLengthErr := writeBuffer.WriteUint8("additionalInformationLength", 8, (additionalInformationLength)) - if _additionalInformationLengthErr != nil { - return errors.Wrap(_additionalInformationLengthErr, "Error serializing 'additionalInformationLength' field") - } + // Simple Field (additionalInformationLength) + additionalInformationLength := uint8(m.GetAdditionalInformationLength()) + _additionalInformationLengthErr := writeBuffer.WriteUint8("additionalInformationLength", 8, (additionalInformationLength)) + if _additionalInformationLengthErr != nil { + return errors.Wrap(_additionalInformationLengthErr, "Error serializing 'additionalInformationLength' field") + } - // Array Field (additionalInformation) - if pushErr := writeBuffer.PushContext("additionalInformation", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for additionalInformation") - } - for _curItem, _element := range m.GetAdditionalInformation() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAdditionalInformation()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'additionalInformation' field") - } - } - if popErr := writeBuffer.PopContext("additionalInformation", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for additionalInformation") + // Array Field (additionalInformation) + if pushErr := writeBuffer.PushContext("additionalInformation", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for additionalInformation") + } + for _curItem, _element := range m.GetAdditionalInformation() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAdditionalInformation()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'additionalInformation' field") } + } + if popErr := writeBuffer.PopContext("additionalInformation", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for additionalInformation") + } - // Simple Field (dataFrame) - if pushErr := writeBuffer.PushContext("dataFrame"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for dataFrame") - } - _dataFrameErr := writeBuffer.WriteSerializable(ctx, m.GetDataFrame()) - if popErr := writeBuffer.PopContext("dataFrame"); popErr != nil { - return errors.Wrap(popErr, "Error popping for dataFrame") - } - if _dataFrameErr != nil { - return errors.Wrap(_dataFrameErr, "Error serializing 'dataFrame' field") - } + // Simple Field (dataFrame) + if pushErr := writeBuffer.PushContext("dataFrame"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for dataFrame") + } + _dataFrameErr := writeBuffer.WriteSerializable(ctx, m.GetDataFrame()) + if popErr := writeBuffer.PopContext("dataFrame"); popErr != nil { + return errors.Wrap(popErr, "Error popping for dataFrame") + } + if _dataFrameErr != nil { + return errors.Wrap(_dataFrameErr, "Error serializing 'dataFrame' field") + } - // Optional Field (crc) (Can be skipped, if the value is null) - var crc *uint8 = nil - if m.GetCrc() != nil { - crc = m.GetCrc() - _crcErr := writeBuffer.WriteUint8("crc", 8, *(crc)) - if _crcErr != nil { - return errors.Wrap(_crcErr, "Error serializing 'crc' field") - } + // Optional Field (crc) (Can be skipped, if the value is null) + var crc *uint8 = nil + if m.GetCrc() != nil { + crc = m.GetCrc() + _crcErr := writeBuffer.WriteUint8("crc", 8, *(crc)) + if _crcErr != nil { + return errors.Wrap(_crcErr, "Error serializing 'crc' field") } + } if popErr := writeBuffer.PopContext("LBusmonInd"); popErr != nil { return errors.Wrap(popErr, "Error popping for LBusmonInd") @@ -313,6 +317,7 @@ func (m *_LBusmonInd) SerializeWithWriteBuffer(ctx context.Context, writeBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_LBusmonInd) isLBusmonInd() bool { return true } @@ -327,3 +332,6 @@ func (m *_LBusmonInd) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/LDataCon.go b/plc4go/protocols/knxnetip/readwrite/model/LDataCon.go index d2582282076..fe101eddc91 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/LDataCon.go +++ b/plc4go/protocols/knxnetip/readwrite/model/LDataCon.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // LDataCon is the corresponding interface of LDataCon type LDataCon interface { @@ -51,31 +53,31 @@ type LDataConExactly interface { // _LDataCon is the data-structure of this message type _LDataCon struct { *_CEMI - AdditionalInformationLength uint8 - AdditionalInformation []CEMIAdditionalInformation - DataFrame LDataFrame + AdditionalInformationLength uint8 + AdditionalInformation []CEMIAdditionalInformation + DataFrame LDataFrame } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_LDataCon) GetMessageCode() uint8 { - return 0x2E -} +func (m *_LDataCon) GetMessageCode() uint8 { +return 0x2E} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_LDataCon) InitializeParent(parent CEMI) {} +func (m *_LDataCon) InitializeParent(parent CEMI ) {} -func (m *_LDataCon) GetParent() CEMI { +func (m *_LDataCon) GetParent() CEMI { return m._CEMI } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,13 +100,14 @@ func (m *_LDataCon) GetDataFrame() LDataFrame { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewLDataCon factory function for _LDataCon -func NewLDataCon(additionalInformationLength uint8, additionalInformation []CEMIAdditionalInformation, dataFrame LDataFrame, size uint16) *_LDataCon { +func NewLDataCon( additionalInformationLength uint8 , additionalInformation []CEMIAdditionalInformation , dataFrame LDataFrame , size uint16 ) *_LDataCon { _result := &_LDataCon{ AdditionalInformationLength: additionalInformationLength, - AdditionalInformation: additionalInformation, - DataFrame: dataFrame, - _CEMI: NewCEMI(size), + AdditionalInformation: additionalInformation, + DataFrame: dataFrame, + _CEMI: NewCEMI(size), } _result._CEMI._CEMIChildRequirements = _result return _result @@ -112,7 +115,7 @@ func NewLDataCon(additionalInformationLength uint8, additionalInformation []CEMI // Deprecated: use the interface for direct cast func CastLDataCon(structType interface{}) LDataCon { - if casted, ok := structType.(LDataCon); ok { + if casted, ok := structType.(LDataCon); ok { return casted } if casted, ok := structType.(*LDataCon); ok { @@ -129,7 +132,7 @@ func (m *_LDataCon) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (additionalInformationLength) - lengthInBits += 8 + lengthInBits += 8; // Array field if len(m.AdditionalInformation) > 0 { @@ -144,6 +147,7 @@ func (m *_LDataCon) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_LDataCon) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -162,7 +166,7 @@ func LDataConParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, s _ = currentPos // Simple Field (additionalInformationLength) - _additionalInformationLength, _additionalInformationLengthErr := readBuffer.ReadUint8("additionalInformationLength", 8) +_additionalInformationLength, _additionalInformationLengthErr := readBuffer.ReadUint8("additionalInformationLength", 8) if _additionalInformationLengthErr != nil { return nil, errors.Wrap(_additionalInformationLengthErr, "Error parsing 'additionalInformationLength' field of LDataCon") } @@ -177,8 +181,8 @@ func LDataConParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, s { _additionalInformationLength := additionalInformationLength _additionalInformationEndPos := positionAware.GetPos() + uint16(_additionalInformationLength) - for positionAware.GetPos() < _additionalInformationEndPos { - _item, _err := CEMIAdditionalInformationParseWithBuffer(ctx, readBuffer) + for ;positionAware.GetPos() < _additionalInformationEndPos; { +_item, _err := CEMIAdditionalInformationParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'additionalInformation' field of LDataCon") } @@ -193,7 +197,7 @@ func LDataConParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, s if pullErr := readBuffer.PullContext("dataFrame"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for dataFrame") } - _dataFrame, _dataFrameErr := LDataFrameParseWithBuffer(ctx, readBuffer) +_dataFrame, _dataFrameErr := LDataFrameParseWithBuffer(ctx, readBuffer) if _dataFrameErr != nil { return nil, errors.Wrap(_dataFrameErr, "Error parsing 'dataFrame' field of LDataCon") } @@ -212,8 +216,8 @@ func LDataConParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, s Size: size, }, AdditionalInformationLength: additionalInformationLength, - AdditionalInformation: additionalInformation, - DataFrame: dataFrame, + AdditionalInformation: additionalInformation, + DataFrame: dataFrame, } _child._CEMI._CEMIChildRequirements = _child return _child, nil @@ -235,41 +239,41 @@ func (m *_LDataCon) SerializeWithWriteBuffer(ctx context.Context, writeBuffer ut return errors.Wrap(pushErr, "Error pushing for LDataCon") } - // Simple Field (additionalInformationLength) - additionalInformationLength := uint8(m.GetAdditionalInformationLength()) - _additionalInformationLengthErr := writeBuffer.WriteUint8("additionalInformationLength", 8, (additionalInformationLength)) - if _additionalInformationLengthErr != nil { - return errors.Wrap(_additionalInformationLengthErr, "Error serializing 'additionalInformationLength' field") - } + // Simple Field (additionalInformationLength) + additionalInformationLength := uint8(m.GetAdditionalInformationLength()) + _additionalInformationLengthErr := writeBuffer.WriteUint8("additionalInformationLength", 8, (additionalInformationLength)) + if _additionalInformationLengthErr != nil { + return errors.Wrap(_additionalInformationLengthErr, "Error serializing 'additionalInformationLength' field") + } - // Array Field (additionalInformation) - if pushErr := writeBuffer.PushContext("additionalInformation", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for additionalInformation") - } - for _curItem, _element := range m.GetAdditionalInformation() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAdditionalInformation()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'additionalInformation' field") - } - } - if popErr := writeBuffer.PopContext("additionalInformation", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for additionalInformation") + // Array Field (additionalInformation) + if pushErr := writeBuffer.PushContext("additionalInformation", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for additionalInformation") + } + for _curItem, _element := range m.GetAdditionalInformation() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAdditionalInformation()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'additionalInformation' field") } + } + if popErr := writeBuffer.PopContext("additionalInformation", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for additionalInformation") + } - // Simple Field (dataFrame) - if pushErr := writeBuffer.PushContext("dataFrame"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for dataFrame") - } - _dataFrameErr := writeBuffer.WriteSerializable(ctx, m.GetDataFrame()) - if popErr := writeBuffer.PopContext("dataFrame"); popErr != nil { - return errors.Wrap(popErr, "Error popping for dataFrame") - } - if _dataFrameErr != nil { - return errors.Wrap(_dataFrameErr, "Error serializing 'dataFrame' field") - } + // Simple Field (dataFrame) + if pushErr := writeBuffer.PushContext("dataFrame"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for dataFrame") + } + _dataFrameErr := writeBuffer.WriteSerializable(ctx, m.GetDataFrame()) + if popErr := writeBuffer.PopContext("dataFrame"); popErr != nil { + return errors.Wrap(popErr, "Error popping for dataFrame") + } + if _dataFrameErr != nil { + return errors.Wrap(_dataFrameErr, "Error serializing 'dataFrame' field") + } if popErr := writeBuffer.PopContext("LDataCon"); popErr != nil { return errors.Wrap(popErr, "Error popping for LDataCon") @@ -279,6 +283,7 @@ func (m *_LDataCon) SerializeWithWriteBuffer(ctx context.Context, writeBuffer ut return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_LDataCon) isLDataCon() bool { return true } @@ -293,3 +298,6 @@ func (m *_LDataCon) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/LDataExtended.go b/plc4go/protocols/knxnetip/readwrite/model/LDataExtended.go index 6e21d641e58..89b14dc3432 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/LDataExtended.go +++ b/plc4go/protocols/knxnetip/readwrite/model/LDataExtended.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // LDataExtended is the corresponding interface of LDataExtended type LDataExtended interface { @@ -56,44 +58,42 @@ type LDataExtendedExactly interface { // _LDataExtended is the data-structure of this message type _LDataExtended struct { *_LDataFrame - GroupAddress bool - HopCount uint8 - ExtendedFrameFormat uint8 - SourceAddress KnxAddress - DestinationAddress []byte - Apdu Apdu + GroupAddress bool + HopCount uint8 + ExtendedFrameFormat uint8 + SourceAddress KnxAddress + DestinationAddress []byte + Apdu Apdu } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_LDataExtended) GetNotAckFrame() bool { - return bool(true) -} +func (m *_LDataExtended) GetNotAckFrame() bool { +return bool(true)} -func (m *_LDataExtended) GetPolling() bool { - return bool(false) -} +func (m *_LDataExtended) GetPolling() bool { +return bool(false)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_LDataExtended) InitializeParent(parent LDataFrame, frameType bool, notRepeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) { - m.FrameType = frameType +func (m *_LDataExtended) InitializeParent(parent LDataFrame , frameType bool , notRepeated bool , priority CEMIPriority , acknowledgeRequested bool , errorFlag bool ) { m.FrameType = frameType m.NotRepeated = notRepeated m.Priority = priority m.AcknowledgeRequested = acknowledgeRequested m.ErrorFlag = errorFlag } -func (m *_LDataExtended) GetParent() LDataFrame { +func (m *_LDataExtended) GetParent() LDataFrame { return m._LDataFrame } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -128,16 +128,17 @@ func (m *_LDataExtended) GetApdu() Apdu { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewLDataExtended factory function for _LDataExtended -func NewLDataExtended(groupAddress bool, hopCount uint8, extendedFrameFormat uint8, sourceAddress KnxAddress, destinationAddress []byte, apdu Apdu, frameType bool, notRepeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *_LDataExtended { +func NewLDataExtended( groupAddress bool , hopCount uint8 , extendedFrameFormat uint8 , sourceAddress KnxAddress , destinationAddress []byte , apdu Apdu , frameType bool , notRepeated bool , priority CEMIPriority , acknowledgeRequested bool , errorFlag bool ) *_LDataExtended { _result := &_LDataExtended{ - GroupAddress: groupAddress, - HopCount: hopCount, + GroupAddress: groupAddress, + HopCount: hopCount, ExtendedFrameFormat: extendedFrameFormat, - SourceAddress: sourceAddress, - DestinationAddress: destinationAddress, - Apdu: apdu, - _LDataFrame: NewLDataFrame(frameType, notRepeated, priority, acknowledgeRequested, errorFlag), + SourceAddress: sourceAddress, + DestinationAddress: destinationAddress, + Apdu: apdu, + _LDataFrame: NewLDataFrame(frameType, notRepeated, priority, acknowledgeRequested, errorFlag), } _result._LDataFrame._LDataFrameChildRequirements = _result return _result @@ -145,7 +146,7 @@ func NewLDataExtended(groupAddress bool, hopCount uint8, extendedFrameFormat uin // Deprecated: use the interface for direct cast func CastLDataExtended(structType interface{}) LDataExtended { - if casted, ok := structType.(LDataExtended); ok { + if casted, ok := structType.(LDataExtended); ok { return casted } if casted, ok := structType.(*LDataExtended); ok { @@ -162,13 +163,13 @@ func (m *_LDataExtended) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (groupAddress) - lengthInBits += 1 + lengthInBits += 1; // Simple field (hopCount) - lengthInBits += 3 + lengthInBits += 3; // Simple field (extendedFrameFormat) - lengthInBits += 4 + lengthInBits += 4; // Simple field (sourceAddress) lengthInBits += m.SourceAddress.GetLengthInBits(ctx) @@ -187,6 +188,7 @@ func (m *_LDataExtended) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_LDataExtended) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -205,21 +207,21 @@ func LDataExtendedParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff _ = currentPos // Simple Field (groupAddress) - _groupAddress, _groupAddressErr := readBuffer.ReadBit("groupAddress") +_groupAddress, _groupAddressErr := readBuffer.ReadBit("groupAddress") if _groupAddressErr != nil { return nil, errors.Wrap(_groupAddressErr, "Error parsing 'groupAddress' field of LDataExtended") } groupAddress := _groupAddress // Simple Field (hopCount) - _hopCount, _hopCountErr := readBuffer.ReadUint8("hopCount", 3) +_hopCount, _hopCountErr := readBuffer.ReadUint8("hopCount", 3) if _hopCountErr != nil { return nil, errors.Wrap(_hopCountErr, "Error parsing 'hopCount' field of LDataExtended") } hopCount := _hopCount // Simple Field (extendedFrameFormat) - _extendedFrameFormat, _extendedFrameFormatErr := readBuffer.ReadUint8("extendedFrameFormat", 4) +_extendedFrameFormat, _extendedFrameFormatErr := readBuffer.ReadUint8("extendedFrameFormat", 4) if _extendedFrameFormatErr != nil { return nil, errors.Wrap(_extendedFrameFormatErr, "Error parsing 'extendedFrameFormat' field of LDataExtended") } @@ -229,7 +231,7 @@ func LDataExtendedParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff if pullErr := readBuffer.PullContext("sourceAddress"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for sourceAddress") } - _sourceAddress, _sourceAddressErr := KnxAddressParseWithBuffer(ctx, readBuffer) +_sourceAddress, _sourceAddressErr := KnxAddressParseWithBuffer(ctx, readBuffer) if _sourceAddressErr != nil { return nil, errors.Wrap(_sourceAddressErr, "Error parsing 'sourceAddress' field of LDataExtended") } @@ -255,7 +257,7 @@ func LDataExtendedParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff if pullErr := readBuffer.PullContext("apdu"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for apdu") } - _apdu, _apduErr := ApduParseWithBuffer(ctx, readBuffer, uint8(dataLength)) +_apdu, _apduErr := ApduParseWithBuffer(ctx, readBuffer , uint8( dataLength ) ) if _apduErr != nil { return nil, errors.Wrap(_apduErr, "Error parsing 'apdu' field of LDataExtended") } @@ -270,13 +272,14 @@ func LDataExtendedParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff // Create a partially initialized instance _child := &_LDataExtended{ - _LDataFrame: &_LDataFrame{}, - GroupAddress: groupAddress, - HopCount: hopCount, + _LDataFrame: &_LDataFrame{ + }, + GroupAddress: groupAddress, + HopCount: hopCount, ExtendedFrameFormat: extendedFrameFormat, - SourceAddress: sourceAddress, - DestinationAddress: destinationAddress, - Apdu: apdu, + SourceAddress: sourceAddress, + DestinationAddress: destinationAddress, + Apdu: apdu, } _child._LDataFrame._LDataFrameChildRequirements = _child return _child, nil @@ -298,63 +301,63 @@ func (m *_LDataExtended) SerializeWithWriteBuffer(ctx context.Context, writeBuff return errors.Wrap(pushErr, "Error pushing for LDataExtended") } - // Simple Field (groupAddress) - groupAddress := bool(m.GetGroupAddress()) - _groupAddressErr := writeBuffer.WriteBit("groupAddress", (groupAddress)) - if _groupAddressErr != nil { - return errors.Wrap(_groupAddressErr, "Error serializing 'groupAddress' field") - } + // Simple Field (groupAddress) + groupAddress := bool(m.GetGroupAddress()) + _groupAddressErr := writeBuffer.WriteBit("groupAddress", (groupAddress)) + if _groupAddressErr != nil { + return errors.Wrap(_groupAddressErr, "Error serializing 'groupAddress' field") + } - // Simple Field (hopCount) - hopCount := uint8(m.GetHopCount()) - _hopCountErr := writeBuffer.WriteUint8("hopCount", 3, (hopCount)) - if _hopCountErr != nil { - return errors.Wrap(_hopCountErr, "Error serializing 'hopCount' field") - } + // Simple Field (hopCount) + hopCount := uint8(m.GetHopCount()) + _hopCountErr := writeBuffer.WriteUint8("hopCount", 3, (hopCount)) + if _hopCountErr != nil { + return errors.Wrap(_hopCountErr, "Error serializing 'hopCount' field") + } - // Simple Field (extendedFrameFormat) - extendedFrameFormat := uint8(m.GetExtendedFrameFormat()) - _extendedFrameFormatErr := writeBuffer.WriteUint8("extendedFrameFormat", 4, (extendedFrameFormat)) - if _extendedFrameFormatErr != nil { - return errors.Wrap(_extendedFrameFormatErr, "Error serializing 'extendedFrameFormat' field") - } + // Simple Field (extendedFrameFormat) + extendedFrameFormat := uint8(m.GetExtendedFrameFormat()) + _extendedFrameFormatErr := writeBuffer.WriteUint8("extendedFrameFormat", 4, (extendedFrameFormat)) + if _extendedFrameFormatErr != nil { + return errors.Wrap(_extendedFrameFormatErr, "Error serializing 'extendedFrameFormat' field") + } - // Simple Field (sourceAddress) - if pushErr := writeBuffer.PushContext("sourceAddress"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for sourceAddress") - } - _sourceAddressErr := writeBuffer.WriteSerializable(ctx, m.GetSourceAddress()) - if popErr := writeBuffer.PopContext("sourceAddress"); popErr != nil { - return errors.Wrap(popErr, "Error popping for sourceAddress") - } - if _sourceAddressErr != nil { - return errors.Wrap(_sourceAddressErr, "Error serializing 'sourceAddress' field") - } + // Simple Field (sourceAddress) + if pushErr := writeBuffer.PushContext("sourceAddress"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for sourceAddress") + } + _sourceAddressErr := writeBuffer.WriteSerializable(ctx, m.GetSourceAddress()) + if popErr := writeBuffer.PopContext("sourceAddress"); popErr != nil { + return errors.Wrap(popErr, "Error popping for sourceAddress") + } + if _sourceAddressErr != nil { + return errors.Wrap(_sourceAddressErr, "Error serializing 'sourceAddress' field") + } - // Array Field (destinationAddress) - // Byte Array field (destinationAddress) - if err := writeBuffer.WriteByteArray("destinationAddress", m.GetDestinationAddress()); err != nil { - return errors.Wrap(err, "Error serializing 'destinationAddress' field") - } + // Array Field (destinationAddress) + // Byte Array field (destinationAddress) + if err := writeBuffer.WriteByteArray("destinationAddress", m.GetDestinationAddress()); err != nil { + return errors.Wrap(err, "Error serializing 'destinationAddress' field") + } - // Implicit Field (dataLength) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - dataLength := uint8(uint8(m.GetApdu().GetLengthInBytes(ctx)) - uint8(uint8(1))) - _dataLengthErr := writeBuffer.WriteUint8("dataLength", 8, (dataLength)) - if _dataLengthErr != nil { - return errors.Wrap(_dataLengthErr, "Error serializing 'dataLength' field") - } + // Implicit Field (dataLength) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) + dataLength := uint8(uint8(m.GetApdu().GetLengthInBytes(ctx)) - uint8(uint8(1))) + _dataLengthErr := writeBuffer.WriteUint8("dataLength", 8, (dataLength)) + if _dataLengthErr != nil { + return errors.Wrap(_dataLengthErr, "Error serializing 'dataLength' field") + } - // Simple Field (apdu) - if pushErr := writeBuffer.PushContext("apdu"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for apdu") - } - _apduErr := writeBuffer.WriteSerializable(ctx, m.GetApdu()) - if popErr := writeBuffer.PopContext("apdu"); popErr != nil { - return errors.Wrap(popErr, "Error popping for apdu") - } - if _apduErr != nil { - return errors.Wrap(_apduErr, "Error serializing 'apdu' field") - } + // Simple Field (apdu) + if pushErr := writeBuffer.PushContext("apdu"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for apdu") + } + _apduErr := writeBuffer.WriteSerializable(ctx, m.GetApdu()) + if popErr := writeBuffer.PopContext("apdu"); popErr != nil { + return errors.Wrap(popErr, "Error popping for apdu") + } + if _apduErr != nil { + return errors.Wrap(_apduErr, "Error serializing 'apdu' field") + } if popErr := writeBuffer.PopContext("LDataExtended"); popErr != nil { return errors.Wrap(popErr, "Error popping for LDataExtended") @@ -364,6 +367,7 @@ func (m *_LDataExtended) SerializeWithWriteBuffer(ctx context.Context, writeBuff return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_LDataExtended) isLDataExtended() bool { return true } @@ -378,3 +382,6 @@ func (m *_LDataExtended) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/LDataFrame.go b/plc4go/protocols/knxnetip/readwrite/model/LDataFrame.go index 00654462226..faa3aaab037 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/LDataFrame.go +++ b/plc4go/protocols/knxnetip/readwrite/model/LDataFrame.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // LDataFrame is the corresponding interface of LDataFrame type LDataFrame interface { @@ -57,11 +59,11 @@ type LDataFrameExactly interface { // _LDataFrame is the data-structure of this message type _LDataFrame struct { _LDataFrameChildRequirements - FrameType bool - NotRepeated bool - Priority CEMIPriority - AcknowledgeRequested bool - ErrorFlag bool + FrameType bool + NotRepeated bool + Priority CEMIPriority + AcknowledgeRequested bool + ErrorFlag bool } type _LDataFrameChildRequirements interface { @@ -71,6 +73,7 @@ type _LDataFrameChildRequirements interface { GetPolling() bool } + type LDataFrameParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child LDataFrame, serializeChildFunction func() error) error GetTypeName() string @@ -78,13 +81,12 @@ type LDataFrameParent interface { type LDataFrameChild interface { utils.Serializable - InitializeParent(parent LDataFrame, frameType bool, notRepeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) +InitializeParent(parent LDataFrame , frameType bool , notRepeated bool , priority CEMIPriority , acknowledgeRequested bool , errorFlag bool ) GetParent() *LDataFrame GetTypeName() string LDataFrame } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -115,14 +117,15 @@ func (m *_LDataFrame) GetErrorFlag() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewLDataFrame factory function for _LDataFrame -func NewLDataFrame(frameType bool, notRepeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *_LDataFrame { - return &_LDataFrame{FrameType: frameType, NotRepeated: notRepeated, Priority: priority, AcknowledgeRequested: acknowledgeRequested, ErrorFlag: errorFlag} +func NewLDataFrame( frameType bool , notRepeated bool , priority CEMIPriority , acknowledgeRequested bool , errorFlag bool ) *_LDataFrame { +return &_LDataFrame{ FrameType: frameType , NotRepeated: notRepeated , Priority: priority , AcknowledgeRequested: acknowledgeRequested , ErrorFlag: errorFlag } } // Deprecated: use the interface for direct cast func CastLDataFrame(structType interface{}) LDataFrame { - if casted, ok := structType.(LDataFrame); ok { + if casted, ok := structType.(LDataFrame); ok { return casted } if casted, ok := structType.(*LDataFrame); ok { @@ -135,27 +138,28 @@ func (m *_LDataFrame) GetTypeName() string { return "LDataFrame" } + func (m *_LDataFrame) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (frameType) - lengthInBits += 1 + lengthInBits += 1; // Discriminator Field (polling) - lengthInBits += 1 + lengthInBits += 1; // Simple field (notRepeated) - lengthInBits += 1 + lengthInBits += 1; // Discriminator Field (notAckFrame) - lengthInBits += 1 + lengthInBits += 1; // Simple field (priority) lengthInBits += 2 // Simple field (acknowledgeRequested) - lengthInBits += 1 + lengthInBits += 1; // Simple field (errorFlag) - lengthInBits += 1 + lengthInBits += 1; return lengthInBits } @@ -178,7 +182,7 @@ func LDataFrameParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) _ = currentPos // Simple Field (frameType) - _frameType, _frameTypeErr := readBuffer.ReadBit("frameType") +_frameType, _frameTypeErr := readBuffer.ReadBit("frameType") if _frameTypeErr != nil { return nil, errors.Wrap(_frameTypeErr, "Error parsing 'frameType' field of LDataFrame") } @@ -191,7 +195,7 @@ func LDataFrameParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) } // Simple Field (notRepeated) - _notRepeated, _notRepeatedErr := readBuffer.ReadBit("notRepeated") +_notRepeated, _notRepeatedErr := readBuffer.ReadBit("notRepeated") if _notRepeatedErr != nil { return nil, errors.Wrap(_notRepeatedErr, "Error parsing 'notRepeated' field of LDataFrame") } @@ -207,7 +211,7 @@ func LDataFrameParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) if pullErr := readBuffer.PullContext("priority"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for priority") } - _priority, _priorityErr := CEMIPriorityParseWithBuffer(ctx, readBuffer) +_priority, _priorityErr := CEMIPriorityParseWithBuffer(ctx, readBuffer) if _priorityErr != nil { return nil, errors.Wrap(_priorityErr, "Error parsing 'priority' field of LDataFrame") } @@ -217,14 +221,14 @@ func LDataFrameParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) } // Simple Field (acknowledgeRequested) - _acknowledgeRequested, _acknowledgeRequestedErr := readBuffer.ReadBit("acknowledgeRequested") +_acknowledgeRequested, _acknowledgeRequestedErr := readBuffer.ReadBit("acknowledgeRequested") if _acknowledgeRequestedErr != nil { return nil, errors.Wrap(_acknowledgeRequestedErr, "Error parsing 'acknowledgeRequested' field of LDataFrame") } acknowledgeRequested := _acknowledgeRequested // Simple Field (errorFlag) - _errorFlag, _errorFlagErr := readBuffer.ReadBit("errorFlag") +_errorFlag, _errorFlagErr := readBuffer.ReadBit("errorFlag") if _errorFlagErr != nil { return nil, errors.Wrap(_errorFlagErr, "Error parsing 'errorFlag' field of LDataFrame") } @@ -233,19 +237,19 @@ func LDataFrameParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type LDataFrameChildSerializeRequirement interface { LDataFrame - InitializeParent(LDataFrame, bool, bool, CEMIPriority, bool, bool) + InitializeParent(LDataFrame, bool, bool, CEMIPriority, bool, bool) GetParent() LDataFrame } var _childTemp interface{} var _child LDataFrameChildSerializeRequirement var typeSwitchError error switch { - case notAckFrame == bool(true) && polling == bool(false): // LDataExtended - _childTemp, typeSwitchError = LDataExtendedParseWithBuffer(ctx, readBuffer) - case notAckFrame == bool(true) && polling == bool(true): // LPollData - _childTemp, typeSwitchError = LPollDataParseWithBuffer(ctx, readBuffer) - case notAckFrame == bool(false): // LDataFrameACK - _childTemp, typeSwitchError = LDataFrameACKParseWithBuffer(ctx, readBuffer) +case notAckFrame == bool(true) && polling == bool(false) : // LDataExtended + _childTemp, typeSwitchError = LDataExtendedParseWithBuffer(ctx, readBuffer, ) +case notAckFrame == bool(true) && polling == bool(true) : // LPollData + _childTemp, typeSwitchError = LPollDataParseWithBuffer(ctx, readBuffer, ) +case notAckFrame == bool(false) : // LDataFrameACK + _childTemp, typeSwitchError = LDataFrameACKParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [notAckFrame=%v, polling=%v]", notAckFrame, polling) } @@ -259,7 +263,7 @@ func LDataFrameParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) } // Finish initializing - _child.InitializeParent(_child, frameType, notRepeated, priority, acknowledgeRequested, errorFlag) +_child.InitializeParent(_child , frameType , notRepeated , priority , acknowledgeRequested , errorFlag ) return _child, nil } @@ -269,7 +273,7 @@ func (pm *_LDataFrame) SerializeParent(ctx context.Context, writeBuffer utils.Wr _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("LDataFrame"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("LDataFrame"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for LDataFrame") } @@ -340,6 +344,7 @@ func (pm *_LDataFrame) SerializeParent(ctx context.Context, writeBuffer utils.Wr return nil } + func (m *_LDataFrame) isLDataFrame() bool { return true } @@ -354,3 +359,6 @@ func (m *_LDataFrame) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/LDataFrameACK.go b/plc4go/protocols/knxnetip/readwrite/model/LDataFrameACK.go index d395e7ce15b..1a1649d760a 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/LDataFrameACK.go +++ b/plc4go/protocols/knxnetip/readwrite/model/LDataFrameACK.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // LDataFrameACK is the corresponding interface of LDataFrameACK type LDataFrameACK interface { @@ -46,40 +48,40 @@ type _LDataFrameACK struct { *_LDataFrame } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_LDataFrameACK) GetNotAckFrame() bool { - return bool(false) -} +func (m *_LDataFrameACK) GetNotAckFrame() bool { +return bool(false)} -func (m *_LDataFrameACK) GetPolling() bool { - return false -} +func (m *_LDataFrameACK) GetPolling() bool { +return false} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_LDataFrameACK) InitializeParent(parent LDataFrame, frameType bool, notRepeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) { - m.FrameType = frameType +func (m *_LDataFrameACK) InitializeParent(parent LDataFrame , frameType bool , notRepeated bool , priority CEMIPriority , acknowledgeRequested bool , errorFlag bool ) { m.FrameType = frameType m.NotRepeated = notRepeated m.Priority = priority m.AcknowledgeRequested = acknowledgeRequested m.ErrorFlag = errorFlag } -func (m *_LDataFrameACK) GetParent() LDataFrame { +func (m *_LDataFrameACK) GetParent() LDataFrame { return m._LDataFrame } + // NewLDataFrameACK factory function for _LDataFrameACK -func NewLDataFrameACK(frameType bool, notRepeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *_LDataFrameACK { +func NewLDataFrameACK( frameType bool , notRepeated bool , priority CEMIPriority , acknowledgeRequested bool , errorFlag bool ) *_LDataFrameACK { _result := &_LDataFrameACK{ - _LDataFrame: NewLDataFrame(frameType, notRepeated, priority, acknowledgeRequested, errorFlag), + _LDataFrame: NewLDataFrame(frameType, notRepeated, priority, acknowledgeRequested, errorFlag), } _result._LDataFrame._LDataFrameChildRequirements = _result return _result @@ -87,7 +89,7 @@ func NewLDataFrameACK(frameType bool, notRepeated bool, priority CEMIPriority, a // Deprecated: use the interface for direct cast func CastLDataFrameACK(structType interface{}) LDataFrameACK { - if casted, ok := structType.(LDataFrameACK); ok { + if casted, ok := structType.(LDataFrameACK); ok { return casted } if casted, ok := structType.(*LDataFrameACK); ok { @@ -106,6 +108,7 @@ func (m *_LDataFrameACK) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_LDataFrameACK) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -129,7 +132,8 @@ func LDataFrameACKParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff // Create a partially initialized instance _child := &_LDataFrameACK{ - _LDataFrame: &_LDataFrame{}, + _LDataFrame: &_LDataFrame{ + }, } _child._LDataFrame._LDataFrameChildRequirements = _child return _child, nil @@ -159,6 +163,7 @@ func (m *_LDataFrameACK) SerializeWithWriteBuffer(ctx context.Context, writeBuff return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_LDataFrameACK) isLDataFrameACK() bool { return true } @@ -173,3 +178,6 @@ func (m *_LDataFrameACK) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/LDataInd.go b/plc4go/protocols/knxnetip/readwrite/model/LDataInd.go index 0b810713601..ab39c76acee 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/LDataInd.go +++ b/plc4go/protocols/knxnetip/readwrite/model/LDataInd.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // LDataInd is the corresponding interface of LDataInd type LDataInd interface { @@ -51,31 +53,31 @@ type LDataIndExactly interface { // _LDataInd is the data-structure of this message type _LDataInd struct { *_CEMI - AdditionalInformationLength uint8 - AdditionalInformation []CEMIAdditionalInformation - DataFrame LDataFrame + AdditionalInformationLength uint8 + AdditionalInformation []CEMIAdditionalInformation + DataFrame LDataFrame } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_LDataInd) GetMessageCode() uint8 { - return 0x29 -} +func (m *_LDataInd) GetMessageCode() uint8 { +return 0x29} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_LDataInd) InitializeParent(parent CEMI) {} +func (m *_LDataInd) InitializeParent(parent CEMI ) {} -func (m *_LDataInd) GetParent() CEMI { +func (m *_LDataInd) GetParent() CEMI { return m._CEMI } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,13 +100,14 @@ func (m *_LDataInd) GetDataFrame() LDataFrame { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewLDataInd factory function for _LDataInd -func NewLDataInd(additionalInformationLength uint8, additionalInformation []CEMIAdditionalInformation, dataFrame LDataFrame, size uint16) *_LDataInd { +func NewLDataInd( additionalInformationLength uint8 , additionalInformation []CEMIAdditionalInformation , dataFrame LDataFrame , size uint16 ) *_LDataInd { _result := &_LDataInd{ AdditionalInformationLength: additionalInformationLength, - AdditionalInformation: additionalInformation, - DataFrame: dataFrame, - _CEMI: NewCEMI(size), + AdditionalInformation: additionalInformation, + DataFrame: dataFrame, + _CEMI: NewCEMI(size), } _result._CEMI._CEMIChildRequirements = _result return _result @@ -112,7 +115,7 @@ func NewLDataInd(additionalInformationLength uint8, additionalInformation []CEMI // Deprecated: use the interface for direct cast func CastLDataInd(structType interface{}) LDataInd { - if casted, ok := structType.(LDataInd); ok { + if casted, ok := structType.(LDataInd); ok { return casted } if casted, ok := structType.(*LDataInd); ok { @@ -129,7 +132,7 @@ func (m *_LDataInd) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (additionalInformationLength) - lengthInBits += 8 + lengthInBits += 8; // Array field if len(m.AdditionalInformation) > 0 { @@ -144,6 +147,7 @@ func (m *_LDataInd) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_LDataInd) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -162,7 +166,7 @@ func LDataIndParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, s _ = currentPos // Simple Field (additionalInformationLength) - _additionalInformationLength, _additionalInformationLengthErr := readBuffer.ReadUint8("additionalInformationLength", 8) +_additionalInformationLength, _additionalInformationLengthErr := readBuffer.ReadUint8("additionalInformationLength", 8) if _additionalInformationLengthErr != nil { return nil, errors.Wrap(_additionalInformationLengthErr, "Error parsing 'additionalInformationLength' field of LDataInd") } @@ -177,8 +181,8 @@ func LDataIndParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, s { _additionalInformationLength := additionalInformationLength _additionalInformationEndPos := positionAware.GetPos() + uint16(_additionalInformationLength) - for positionAware.GetPos() < _additionalInformationEndPos { - _item, _err := CEMIAdditionalInformationParseWithBuffer(ctx, readBuffer) + for ;positionAware.GetPos() < _additionalInformationEndPos; { +_item, _err := CEMIAdditionalInformationParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'additionalInformation' field of LDataInd") } @@ -193,7 +197,7 @@ func LDataIndParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, s if pullErr := readBuffer.PullContext("dataFrame"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for dataFrame") } - _dataFrame, _dataFrameErr := LDataFrameParseWithBuffer(ctx, readBuffer) +_dataFrame, _dataFrameErr := LDataFrameParseWithBuffer(ctx, readBuffer) if _dataFrameErr != nil { return nil, errors.Wrap(_dataFrameErr, "Error parsing 'dataFrame' field of LDataInd") } @@ -212,8 +216,8 @@ func LDataIndParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, s Size: size, }, AdditionalInformationLength: additionalInformationLength, - AdditionalInformation: additionalInformation, - DataFrame: dataFrame, + AdditionalInformation: additionalInformation, + DataFrame: dataFrame, } _child._CEMI._CEMIChildRequirements = _child return _child, nil @@ -235,41 +239,41 @@ func (m *_LDataInd) SerializeWithWriteBuffer(ctx context.Context, writeBuffer ut return errors.Wrap(pushErr, "Error pushing for LDataInd") } - // Simple Field (additionalInformationLength) - additionalInformationLength := uint8(m.GetAdditionalInformationLength()) - _additionalInformationLengthErr := writeBuffer.WriteUint8("additionalInformationLength", 8, (additionalInformationLength)) - if _additionalInformationLengthErr != nil { - return errors.Wrap(_additionalInformationLengthErr, "Error serializing 'additionalInformationLength' field") - } + // Simple Field (additionalInformationLength) + additionalInformationLength := uint8(m.GetAdditionalInformationLength()) + _additionalInformationLengthErr := writeBuffer.WriteUint8("additionalInformationLength", 8, (additionalInformationLength)) + if _additionalInformationLengthErr != nil { + return errors.Wrap(_additionalInformationLengthErr, "Error serializing 'additionalInformationLength' field") + } - // Array Field (additionalInformation) - if pushErr := writeBuffer.PushContext("additionalInformation", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for additionalInformation") - } - for _curItem, _element := range m.GetAdditionalInformation() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAdditionalInformation()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'additionalInformation' field") - } - } - if popErr := writeBuffer.PopContext("additionalInformation", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for additionalInformation") + // Array Field (additionalInformation) + if pushErr := writeBuffer.PushContext("additionalInformation", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for additionalInformation") + } + for _curItem, _element := range m.GetAdditionalInformation() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAdditionalInformation()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'additionalInformation' field") } + } + if popErr := writeBuffer.PopContext("additionalInformation", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for additionalInformation") + } - // Simple Field (dataFrame) - if pushErr := writeBuffer.PushContext("dataFrame"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for dataFrame") - } - _dataFrameErr := writeBuffer.WriteSerializable(ctx, m.GetDataFrame()) - if popErr := writeBuffer.PopContext("dataFrame"); popErr != nil { - return errors.Wrap(popErr, "Error popping for dataFrame") - } - if _dataFrameErr != nil { - return errors.Wrap(_dataFrameErr, "Error serializing 'dataFrame' field") - } + // Simple Field (dataFrame) + if pushErr := writeBuffer.PushContext("dataFrame"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for dataFrame") + } + _dataFrameErr := writeBuffer.WriteSerializable(ctx, m.GetDataFrame()) + if popErr := writeBuffer.PopContext("dataFrame"); popErr != nil { + return errors.Wrap(popErr, "Error popping for dataFrame") + } + if _dataFrameErr != nil { + return errors.Wrap(_dataFrameErr, "Error serializing 'dataFrame' field") + } if popErr := writeBuffer.PopContext("LDataInd"); popErr != nil { return errors.Wrap(popErr, "Error popping for LDataInd") @@ -279,6 +283,7 @@ func (m *_LDataInd) SerializeWithWriteBuffer(ctx context.Context, writeBuffer ut return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_LDataInd) isLDataInd() bool { return true } @@ -293,3 +298,6 @@ func (m *_LDataInd) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/LDataReq.go b/plc4go/protocols/knxnetip/readwrite/model/LDataReq.go index 8cf22f87476..cd0047b87f6 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/LDataReq.go +++ b/plc4go/protocols/knxnetip/readwrite/model/LDataReq.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // LDataReq is the corresponding interface of LDataReq type LDataReq interface { @@ -51,31 +53,31 @@ type LDataReqExactly interface { // _LDataReq is the data-structure of this message type _LDataReq struct { *_CEMI - AdditionalInformationLength uint8 - AdditionalInformation []CEMIAdditionalInformation - DataFrame LDataFrame + AdditionalInformationLength uint8 + AdditionalInformation []CEMIAdditionalInformation + DataFrame LDataFrame } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_LDataReq) GetMessageCode() uint8 { - return 0x11 -} +func (m *_LDataReq) GetMessageCode() uint8 { +return 0x11} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_LDataReq) InitializeParent(parent CEMI) {} +func (m *_LDataReq) InitializeParent(parent CEMI ) {} -func (m *_LDataReq) GetParent() CEMI { +func (m *_LDataReq) GetParent() CEMI { return m._CEMI } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,13 +100,14 @@ func (m *_LDataReq) GetDataFrame() LDataFrame { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewLDataReq factory function for _LDataReq -func NewLDataReq(additionalInformationLength uint8, additionalInformation []CEMIAdditionalInformation, dataFrame LDataFrame, size uint16) *_LDataReq { +func NewLDataReq( additionalInformationLength uint8 , additionalInformation []CEMIAdditionalInformation , dataFrame LDataFrame , size uint16 ) *_LDataReq { _result := &_LDataReq{ AdditionalInformationLength: additionalInformationLength, - AdditionalInformation: additionalInformation, - DataFrame: dataFrame, - _CEMI: NewCEMI(size), + AdditionalInformation: additionalInformation, + DataFrame: dataFrame, + _CEMI: NewCEMI(size), } _result._CEMI._CEMIChildRequirements = _result return _result @@ -112,7 +115,7 @@ func NewLDataReq(additionalInformationLength uint8, additionalInformation []CEMI // Deprecated: use the interface for direct cast func CastLDataReq(structType interface{}) LDataReq { - if casted, ok := structType.(LDataReq); ok { + if casted, ok := structType.(LDataReq); ok { return casted } if casted, ok := structType.(*LDataReq); ok { @@ -129,7 +132,7 @@ func (m *_LDataReq) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (additionalInformationLength) - lengthInBits += 8 + lengthInBits += 8; // Array field if len(m.AdditionalInformation) > 0 { @@ -144,6 +147,7 @@ func (m *_LDataReq) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_LDataReq) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -162,7 +166,7 @@ func LDataReqParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, s _ = currentPos // Simple Field (additionalInformationLength) - _additionalInformationLength, _additionalInformationLengthErr := readBuffer.ReadUint8("additionalInformationLength", 8) +_additionalInformationLength, _additionalInformationLengthErr := readBuffer.ReadUint8("additionalInformationLength", 8) if _additionalInformationLengthErr != nil { return nil, errors.Wrap(_additionalInformationLengthErr, "Error parsing 'additionalInformationLength' field of LDataReq") } @@ -177,8 +181,8 @@ func LDataReqParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, s { _additionalInformationLength := additionalInformationLength _additionalInformationEndPos := positionAware.GetPos() + uint16(_additionalInformationLength) - for positionAware.GetPos() < _additionalInformationEndPos { - _item, _err := CEMIAdditionalInformationParseWithBuffer(ctx, readBuffer) + for ;positionAware.GetPos() < _additionalInformationEndPos; { +_item, _err := CEMIAdditionalInformationParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'additionalInformation' field of LDataReq") } @@ -193,7 +197,7 @@ func LDataReqParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, s if pullErr := readBuffer.PullContext("dataFrame"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for dataFrame") } - _dataFrame, _dataFrameErr := LDataFrameParseWithBuffer(ctx, readBuffer) +_dataFrame, _dataFrameErr := LDataFrameParseWithBuffer(ctx, readBuffer) if _dataFrameErr != nil { return nil, errors.Wrap(_dataFrameErr, "Error parsing 'dataFrame' field of LDataReq") } @@ -212,8 +216,8 @@ func LDataReqParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, s Size: size, }, AdditionalInformationLength: additionalInformationLength, - AdditionalInformation: additionalInformation, - DataFrame: dataFrame, + AdditionalInformation: additionalInformation, + DataFrame: dataFrame, } _child._CEMI._CEMIChildRequirements = _child return _child, nil @@ -235,41 +239,41 @@ func (m *_LDataReq) SerializeWithWriteBuffer(ctx context.Context, writeBuffer ut return errors.Wrap(pushErr, "Error pushing for LDataReq") } - // Simple Field (additionalInformationLength) - additionalInformationLength := uint8(m.GetAdditionalInformationLength()) - _additionalInformationLengthErr := writeBuffer.WriteUint8("additionalInformationLength", 8, (additionalInformationLength)) - if _additionalInformationLengthErr != nil { - return errors.Wrap(_additionalInformationLengthErr, "Error serializing 'additionalInformationLength' field") - } + // Simple Field (additionalInformationLength) + additionalInformationLength := uint8(m.GetAdditionalInformationLength()) + _additionalInformationLengthErr := writeBuffer.WriteUint8("additionalInformationLength", 8, (additionalInformationLength)) + if _additionalInformationLengthErr != nil { + return errors.Wrap(_additionalInformationLengthErr, "Error serializing 'additionalInformationLength' field") + } - // Array Field (additionalInformation) - if pushErr := writeBuffer.PushContext("additionalInformation", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for additionalInformation") - } - for _curItem, _element := range m.GetAdditionalInformation() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAdditionalInformation()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'additionalInformation' field") - } - } - if popErr := writeBuffer.PopContext("additionalInformation", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for additionalInformation") + // Array Field (additionalInformation) + if pushErr := writeBuffer.PushContext("additionalInformation", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for additionalInformation") + } + for _curItem, _element := range m.GetAdditionalInformation() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetAdditionalInformation()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'additionalInformation' field") } + } + if popErr := writeBuffer.PopContext("additionalInformation", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for additionalInformation") + } - // Simple Field (dataFrame) - if pushErr := writeBuffer.PushContext("dataFrame"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for dataFrame") - } - _dataFrameErr := writeBuffer.WriteSerializable(ctx, m.GetDataFrame()) - if popErr := writeBuffer.PopContext("dataFrame"); popErr != nil { - return errors.Wrap(popErr, "Error popping for dataFrame") - } - if _dataFrameErr != nil { - return errors.Wrap(_dataFrameErr, "Error serializing 'dataFrame' field") - } + // Simple Field (dataFrame) + if pushErr := writeBuffer.PushContext("dataFrame"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for dataFrame") + } + _dataFrameErr := writeBuffer.WriteSerializable(ctx, m.GetDataFrame()) + if popErr := writeBuffer.PopContext("dataFrame"); popErr != nil { + return errors.Wrap(popErr, "Error popping for dataFrame") + } + if _dataFrameErr != nil { + return errors.Wrap(_dataFrameErr, "Error serializing 'dataFrame' field") + } if popErr := writeBuffer.PopContext("LDataReq"); popErr != nil { return errors.Wrap(popErr, "Error popping for LDataReq") @@ -279,6 +283,7 @@ func (m *_LDataReq) SerializeWithWriteBuffer(ctx context.Context, writeBuffer ut return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_LDataReq) isLDataReq() bool { return true } @@ -293,3 +298,6 @@ func (m *_LDataReq) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/LPollData.go b/plc4go/protocols/knxnetip/readwrite/model/LPollData.go index c65f83c000f..5dbd93069d7 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/LPollData.go +++ b/plc4go/protocols/knxnetip/readwrite/model/LPollData.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // LPollData is the corresponding interface of LPollData type LPollData interface { @@ -50,43 +52,41 @@ type LPollDataExactly interface { // _LPollData is the data-structure of this message type _LPollData struct { *_LDataFrame - SourceAddress KnxAddress - TargetAddress []byte - NumberExpectedPollData uint8 + SourceAddress KnxAddress + TargetAddress []byte + NumberExpectedPollData uint8 // Reserved Fields reservedField0 *uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_LPollData) GetNotAckFrame() bool { - return bool(true) -} +func (m *_LPollData) GetNotAckFrame() bool { +return bool(true)} -func (m *_LPollData) GetPolling() bool { - return bool(true) -} +func (m *_LPollData) GetPolling() bool { +return bool(true)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_LPollData) InitializeParent(parent LDataFrame, frameType bool, notRepeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) { - m.FrameType = frameType +func (m *_LPollData) InitializeParent(parent LDataFrame , frameType bool , notRepeated bool , priority CEMIPriority , acknowledgeRequested bool , errorFlag bool ) { m.FrameType = frameType m.NotRepeated = notRepeated m.Priority = priority m.AcknowledgeRequested = acknowledgeRequested m.ErrorFlag = errorFlag } -func (m *_LPollData) GetParent() LDataFrame { +func (m *_LPollData) GetParent() LDataFrame { return m._LDataFrame } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -109,13 +109,14 @@ func (m *_LPollData) GetNumberExpectedPollData() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewLPollData factory function for _LPollData -func NewLPollData(sourceAddress KnxAddress, targetAddress []byte, numberExpectedPollData uint8, frameType bool, notRepeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *_LPollData { +func NewLPollData( sourceAddress KnxAddress , targetAddress []byte , numberExpectedPollData uint8 , frameType bool , notRepeated bool , priority CEMIPriority , acknowledgeRequested bool , errorFlag bool ) *_LPollData { _result := &_LPollData{ - SourceAddress: sourceAddress, - TargetAddress: targetAddress, + SourceAddress: sourceAddress, + TargetAddress: targetAddress, NumberExpectedPollData: numberExpectedPollData, - _LDataFrame: NewLDataFrame(frameType, notRepeated, priority, acknowledgeRequested, errorFlag), + _LDataFrame: NewLDataFrame(frameType, notRepeated, priority, acknowledgeRequested, errorFlag), } _result._LDataFrame._LDataFrameChildRequirements = _result return _result @@ -123,7 +124,7 @@ func NewLPollData(sourceAddress KnxAddress, targetAddress []byte, numberExpected // Deprecated: use the interface for direct cast func CastLPollData(structType interface{}) LPollData { - if casted, ok := structType.(LPollData); ok { + if casted, ok := structType.(LPollData); ok { return casted } if casted, ok := structType.(*LPollData); ok { @@ -151,11 +152,12 @@ func (m *_LPollData) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += 4 // Simple field (numberExpectedPollData) - lengthInBits += 6 + lengthInBits += 6; return lengthInBits } + func (m *_LPollData) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -177,7 +179,7 @@ func LPollDataParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) if pullErr := readBuffer.PullContext("sourceAddress"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for sourceAddress") } - _sourceAddress, _sourceAddressErr := KnxAddressParseWithBuffer(ctx, readBuffer) +_sourceAddress, _sourceAddressErr := KnxAddressParseWithBuffer(ctx, readBuffer) if _sourceAddressErr != nil { return nil, errors.Wrap(_sourceAddressErr, "Error parsing 'sourceAddress' field of LPollData") } @@ -202,7 +204,7 @@ func LPollDataParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) if reserved != uint8(0x00) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -210,7 +212,7 @@ func LPollDataParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) } // Simple Field (numberExpectedPollData) - _numberExpectedPollData, _numberExpectedPollDataErr := readBuffer.ReadUint8("numberExpectedPollData", 6) +_numberExpectedPollData, _numberExpectedPollDataErr := readBuffer.ReadUint8("numberExpectedPollData", 6) if _numberExpectedPollDataErr != nil { return nil, errors.Wrap(_numberExpectedPollDataErr, "Error parsing 'numberExpectedPollData' field of LPollData") } @@ -222,11 +224,12 @@ func LPollDataParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) // Create a partially initialized instance _child := &_LPollData{ - _LDataFrame: &_LDataFrame{}, - SourceAddress: sourceAddress, - TargetAddress: targetAddress, + _LDataFrame: &_LDataFrame{ + }, + SourceAddress: sourceAddress, + TargetAddress: targetAddress, NumberExpectedPollData: numberExpectedPollData, - reservedField0: reservedField0, + reservedField0: reservedField0, } _child._LDataFrame._LDataFrameChildRequirements = _child return _child, nil @@ -248,46 +251,46 @@ func (m *_LPollData) SerializeWithWriteBuffer(ctx context.Context, writeBuffer u return errors.Wrap(pushErr, "Error pushing for LPollData") } - // Simple Field (sourceAddress) - if pushErr := writeBuffer.PushContext("sourceAddress"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for sourceAddress") - } - _sourceAddressErr := writeBuffer.WriteSerializable(ctx, m.GetSourceAddress()) - if popErr := writeBuffer.PopContext("sourceAddress"); popErr != nil { - return errors.Wrap(popErr, "Error popping for sourceAddress") - } - if _sourceAddressErr != nil { - return errors.Wrap(_sourceAddressErr, "Error serializing 'sourceAddress' field") - } + // Simple Field (sourceAddress) + if pushErr := writeBuffer.PushContext("sourceAddress"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for sourceAddress") + } + _sourceAddressErr := writeBuffer.WriteSerializable(ctx, m.GetSourceAddress()) + if popErr := writeBuffer.PopContext("sourceAddress"); popErr != nil { + return errors.Wrap(popErr, "Error popping for sourceAddress") + } + if _sourceAddressErr != nil { + return errors.Wrap(_sourceAddressErr, "Error serializing 'sourceAddress' field") + } - // Array Field (targetAddress) - // Byte Array field (targetAddress) - if err := writeBuffer.WriteByteArray("targetAddress", m.GetTargetAddress()); err != nil { - return errors.Wrap(err, "Error serializing 'targetAddress' field") - } + // Array Field (targetAddress) + // Byte Array field (targetAddress) + if err := writeBuffer.WriteByteArray("targetAddress", m.GetTargetAddress()); err != nil { + return errors.Wrap(err, "Error serializing 'targetAddress' field") + } - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0x00) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0x00), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteUint8("reserved", 4, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0x00) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0x00), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 } - - // Simple Field (numberExpectedPollData) - numberExpectedPollData := uint8(m.GetNumberExpectedPollData()) - _numberExpectedPollDataErr := writeBuffer.WriteUint8("numberExpectedPollData", 6, (numberExpectedPollData)) - if _numberExpectedPollDataErr != nil { - return errors.Wrap(_numberExpectedPollDataErr, "Error serializing 'numberExpectedPollData' field") + _err := writeBuffer.WriteUint8("reserved", 4, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } + + // Simple Field (numberExpectedPollData) + numberExpectedPollData := uint8(m.GetNumberExpectedPollData()) + _numberExpectedPollDataErr := writeBuffer.WriteUint8("numberExpectedPollData", 6, (numberExpectedPollData)) + if _numberExpectedPollDataErr != nil { + return errors.Wrap(_numberExpectedPollDataErr, "Error serializing 'numberExpectedPollData' field") + } if popErr := writeBuffer.PopContext("LPollData"); popErr != nil { return errors.Wrap(popErr, "Error popping for LPollData") @@ -297,6 +300,7 @@ func (m *_LPollData) SerializeWithWriteBuffer(ctx context.Context, writeBuffer u return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_LPollData) isLPollData() bool { return true } @@ -311,3 +315,6 @@ func (m *_LPollData) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/LPollDataCon.go b/plc4go/protocols/knxnetip/readwrite/model/LPollDataCon.go index f0a7ae0c03d..5619d01da87 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/LPollDataCon.go +++ b/plc4go/protocols/knxnetip/readwrite/model/LPollDataCon.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // LPollDataCon is the corresponding interface of LPollDataCon type LPollDataCon interface { @@ -46,30 +48,32 @@ type _LPollDataCon struct { *_CEMI } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_LPollDataCon) GetMessageCode() uint8 { - return 0x25 -} +func (m *_LPollDataCon) GetMessageCode() uint8 { +return 0x25} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_LPollDataCon) InitializeParent(parent CEMI) {} +func (m *_LPollDataCon) InitializeParent(parent CEMI ) {} -func (m *_LPollDataCon) GetParent() CEMI { +func (m *_LPollDataCon) GetParent() CEMI { return m._CEMI } + // NewLPollDataCon factory function for _LPollDataCon -func NewLPollDataCon(size uint16) *_LPollDataCon { +func NewLPollDataCon( size uint16 ) *_LPollDataCon { _result := &_LPollDataCon{ - _CEMI: NewCEMI(size), + _CEMI: NewCEMI(size), } _result._CEMI._CEMIChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewLPollDataCon(size uint16) *_LPollDataCon { // Deprecated: use the interface for direct cast func CastLPollDataCon(structType interface{}) LPollDataCon { - if casted, ok := structType.(LPollDataCon); ok { + if casted, ok := structType.(LPollDataCon); ok { return casted } if casted, ok := structType.(*LPollDataCon); ok { @@ -96,6 +100,7 @@ func (m *_LPollDataCon) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_LPollDataCon) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_LPollDataCon) SerializeWithWriteBuffer(ctx context.Context, writeBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_LPollDataCon) isLPollDataCon() bool { return true } @@ -165,3 +171,6 @@ func (m *_LPollDataCon) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/LPollDataReq.go b/plc4go/protocols/knxnetip/readwrite/model/LPollDataReq.go index 210659fefa5..4a1a77dcb13 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/LPollDataReq.go +++ b/plc4go/protocols/knxnetip/readwrite/model/LPollDataReq.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // LPollDataReq is the corresponding interface of LPollDataReq type LPollDataReq interface { @@ -46,30 +48,32 @@ type _LPollDataReq struct { *_CEMI } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_LPollDataReq) GetMessageCode() uint8 { - return 0x13 -} +func (m *_LPollDataReq) GetMessageCode() uint8 { +return 0x13} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_LPollDataReq) InitializeParent(parent CEMI) {} +func (m *_LPollDataReq) InitializeParent(parent CEMI ) {} -func (m *_LPollDataReq) GetParent() CEMI { +func (m *_LPollDataReq) GetParent() CEMI { return m._CEMI } + // NewLPollDataReq factory function for _LPollDataReq -func NewLPollDataReq(size uint16) *_LPollDataReq { +func NewLPollDataReq( size uint16 ) *_LPollDataReq { _result := &_LPollDataReq{ - _CEMI: NewCEMI(size), + _CEMI: NewCEMI(size), } _result._CEMI._CEMIChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewLPollDataReq(size uint16) *_LPollDataReq { // Deprecated: use the interface for direct cast func CastLPollDataReq(structType interface{}) LPollDataReq { - if casted, ok := structType.(LPollDataReq); ok { + if casted, ok := structType.(LPollDataReq); ok { return casted } if casted, ok := structType.(*LPollDataReq); ok { @@ -96,6 +100,7 @@ func (m *_LPollDataReq) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_LPollDataReq) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_LPollDataReq) SerializeWithWriteBuffer(ctx context.Context, writeBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_LPollDataReq) isLPollDataReq() bool { return true } @@ -165,3 +171,6 @@ func (m *_LPollDataReq) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/LRawCon.go b/plc4go/protocols/knxnetip/readwrite/model/LRawCon.go index 500297f9edf..05640e3d479 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/LRawCon.go +++ b/plc4go/protocols/knxnetip/readwrite/model/LRawCon.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // LRawCon is the corresponding interface of LRawCon type LRawCon interface { @@ -46,30 +48,32 @@ type _LRawCon struct { *_CEMI } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_LRawCon) GetMessageCode() uint8 { - return 0x2F -} +func (m *_LRawCon) GetMessageCode() uint8 { +return 0x2F} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_LRawCon) InitializeParent(parent CEMI) {} +func (m *_LRawCon) InitializeParent(parent CEMI ) {} -func (m *_LRawCon) GetParent() CEMI { +func (m *_LRawCon) GetParent() CEMI { return m._CEMI } + // NewLRawCon factory function for _LRawCon -func NewLRawCon(size uint16) *_LRawCon { +func NewLRawCon( size uint16 ) *_LRawCon { _result := &_LRawCon{ - _CEMI: NewCEMI(size), + _CEMI: NewCEMI(size), } _result._CEMI._CEMIChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewLRawCon(size uint16) *_LRawCon { // Deprecated: use the interface for direct cast func CastLRawCon(structType interface{}) LRawCon { - if casted, ok := structType.(LRawCon); ok { + if casted, ok := structType.(LRawCon); ok { return casted } if casted, ok := structType.(*LRawCon); ok { @@ -96,6 +100,7 @@ func (m *_LRawCon) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_LRawCon) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_LRawCon) SerializeWithWriteBuffer(ctx context.Context, writeBuffer uti return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_LRawCon) isLRawCon() bool { return true } @@ -165,3 +171,6 @@ func (m *_LRawCon) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/LRawInd.go b/plc4go/protocols/knxnetip/readwrite/model/LRawInd.go index fed8a9c7d89..f7cfd41f591 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/LRawInd.go +++ b/plc4go/protocols/knxnetip/readwrite/model/LRawInd.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // LRawInd is the corresponding interface of LRawInd type LRawInd interface { @@ -46,30 +48,32 @@ type _LRawInd struct { *_CEMI } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_LRawInd) GetMessageCode() uint8 { - return 0x2D -} +func (m *_LRawInd) GetMessageCode() uint8 { +return 0x2D} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_LRawInd) InitializeParent(parent CEMI) {} +func (m *_LRawInd) InitializeParent(parent CEMI ) {} -func (m *_LRawInd) GetParent() CEMI { +func (m *_LRawInd) GetParent() CEMI { return m._CEMI } + // NewLRawInd factory function for _LRawInd -func NewLRawInd(size uint16) *_LRawInd { +func NewLRawInd( size uint16 ) *_LRawInd { _result := &_LRawInd{ - _CEMI: NewCEMI(size), + _CEMI: NewCEMI(size), } _result._CEMI._CEMIChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewLRawInd(size uint16) *_LRawInd { // Deprecated: use the interface for direct cast func CastLRawInd(structType interface{}) LRawInd { - if casted, ok := structType.(LRawInd); ok { + if casted, ok := structType.(LRawInd); ok { return casted } if casted, ok := structType.(*LRawInd); ok { @@ -96,6 +100,7 @@ func (m *_LRawInd) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_LRawInd) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_LRawInd) SerializeWithWriteBuffer(ctx context.Context, writeBuffer uti return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_LRawInd) isLRawInd() bool { return true } @@ -165,3 +171,6 @@ func (m *_LRawInd) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/LRawReq.go b/plc4go/protocols/knxnetip/readwrite/model/LRawReq.go index 11e48ca62d2..573810994b6 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/LRawReq.go +++ b/plc4go/protocols/knxnetip/readwrite/model/LRawReq.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // LRawReq is the corresponding interface of LRawReq type LRawReq interface { @@ -46,30 +48,32 @@ type _LRawReq struct { *_CEMI } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_LRawReq) GetMessageCode() uint8 { - return 0x10 -} +func (m *_LRawReq) GetMessageCode() uint8 { +return 0x10} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_LRawReq) InitializeParent(parent CEMI) {} +func (m *_LRawReq) InitializeParent(parent CEMI ) {} -func (m *_LRawReq) GetParent() CEMI { +func (m *_LRawReq) GetParent() CEMI { return m._CEMI } + // NewLRawReq factory function for _LRawReq -func NewLRawReq(size uint16) *_LRawReq { +func NewLRawReq( size uint16 ) *_LRawReq { _result := &_LRawReq{ - _CEMI: NewCEMI(size), + _CEMI: NewCEMI(size), } _result._CEMI._CEMIChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewLRawReq(size uint16) *_LRawReq { // Deprecated: use the interface for direct cast func CastLRawReq(structType interface{}) LRawReq { - if casted, ok := structType.(LRawReq); ok { + if casted, ok := structType.(LRawReq); ok { return casted } if casted, ok := structType.(*LRawReq); ok { @@ -96,6 +100,7 @@ func (m *_LRawReq) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_LRawReq) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_LRawReq) SerializeWithWriteBuffer(ctx context.Context, writeBuffer uti return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_LRawReq) isLRawReq() bool { return true } @@ -165,3 +171,6 @@ func (m *_LRawReq) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/MACAddress.go b/plc4go/protocols/knxnetip/readwrite/model/MACAddress.go index 75040b03f41..d262f3e8bfb 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/MACAddress.go +++ b/plc4go/protocols/knxnetip/readwrite/model/MACAddress.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // MACAddress is the corresponding interface of MACAddress type MACAddress interface { @@ -44,9 +46,10 @@ type MACAddressExactly interface { // _MACAddress is the data-structure of this message type _MACAddress struct { - Addr []byte + Addr []byte } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -61,14 +64,15 @@ func (m *_MACAddress) GetAddr() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewMACAddress factory function for _MACAddress -func NewMACAddress(addr []byte) *_MACAddress { - return &_MACAddress{Addr: addr} +func NewMACAddress( addr []byte ) *_MACAddress { +return &_MACAddress{ Addr: addr } } // Deprecated: use the interface for direct cast func CastMACAddress(structType interface{}) MACAddress { - if casted, ok := structType.(MACAddress); ok { + if casted, ok := structType.(MACAddress); ok { return casted } if casted, ok := structType.(*MACAddress); ok { @@ -92,6 +96,7 @@ func (m *_MACAddress) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_MACAddress) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -121,8 +126,8 @@ func MACAddressParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) // Create the instance return &_MACAddress{ - Addr: addr, - }, nil + Addr: addr, + }, nil } func (m *_MACAddress) Serialize() ([]byte, error) { @@ -136,7 +141,7 @@ func (m *_MACAddress) Serialize() ([]byte, error) { func (m *_MACAddress) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("MACAddress"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("MACAddress"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for MACAddress") } @@ -152,6 +157,7 @@ func (m *_MACAddress) SerializeWithWriteBuffer(ctx context.Context, writeBuffer return nil } + func (m *_MACAddress) isMACAddress() bool { return true } @@ -166,3 +172,6 @@ func (m *_MACAddress) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/MFuncPropCommandReq.go b/plc4go/protocols/knxnetip/readwrite/model/MFuncPropCommandReq.go index c2197b3a6a3..e9f769b7a41 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/MFuncPropCommandReq.go +++ b/plc4go/protocols/knxnetip/readwrite/model/MFuncPropCommandReq.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // MFuncPropCommandReq is the corresponding interface of MFuncPropCommandReq type MFuncPropCommandReq interface { @@ -46,30 +48,32 @@ type _MFuncPropCommandReq struct { *_CEMI } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_MFuncPropCommandReq) GetMessageCode() uint8 { - return 0xF8 -} +func (m *_MFuncPropCommandReq) GetMessageCode() uint8 { +return 0xF8} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_MFuncPropCommandReq) InitializeParent(parent CEMI) {} +func (m *_MFuncPropCommandReq) InitializeParent(parent CEMI ) {} -func (m *_MFuncPropCommandReq) GetParent() CEMI { +func (m *_MFuncPropCommandReq) GetParent() CEMI { return m._CEMI } + // NewMFuncPropCommandReq factory function for _MFuncPropCommandReq -func NewMFuncPropCommandReq(size uint16) *_MFuncPropCommandReq { +func NewMFuncPropCommandReq( size uint16 ) *_MFuncPropCommandReq { _result := &_MFuncPropCommandReq{ - _CEMI: NewCEMI(size), + _CEMI: NewCEMI(size), } _result._CEMI._CEMIChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewMFuncPropCommandReq(size uint16) *_MFuncPropCommandReq { // Deprecated: use the interface for direct cast func CastMFuncPropCommandReq(structType interface{}) MFuncPropCommandReq { - if casted, ok := structType.(MFuncPropCommandReq); ok { + if casted, ok := structType.(MFuncPropCommandReq); ok { return casted } if casted, ok := structType.(*MFuncPropCommandReq); ok { @@ -96,6 +100,7 @@ func (m *_MFuncPropCommandReq) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_MFuncPropCommandReq) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_MFuncPropCommandReq) SerializeWithWriteBuffer(ctx context.Context, wri return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_MFuncPropCommandReq) isMFuncPropCommandReq() bool { return true } @@ -165,3 +171,6 @@ func (m *_MFuncPropCommandReq) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/MFuncPropCon.go b/plc4go/protocols/knxnetip/readwrite/model/MFuncPropCon.go index 01c553cdd99..4dc22903e1d 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/MFuncPropCon.go +++ b/plc4go/protocols/knxnetip/readwrite/model/MFuncPropCon.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // MFuncPropCon is the corresponding interface of MFuncPropCon type MFuncPropCon interface { @@ -46,30 +48,32 @@ type _MFuncPropCon struct { *_CEMI } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_MFuncPropCon) GetMessageCode() uint8 { - return 0xFA -} +func (m *_MFuncPropCon) GetMessageCode() uint8 { +return 0xFA} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_MFuncPropCon) InitializeParent(parent CEMI) {} +func (m *_MFuncPropCon) InitializeParent(parent CEMI ) {} -func (m *_MFuncPropCon) GetParent() CEMI { +func (m *_MFuncPropCon) GetParent() CEMI { return m._CEMI } + // NewMFuncPropCon factory function for _MFuncPropCon -func NewMFuncPropCon(size uint16) *_MFuncPropCon { +func NewMFuncPropCon( size uint16 ) *_MFuncPropCon { _result := &_MFuncPropCon{ - _CEMI: NewCEMI(size), + _CEMI: NewCEMI(size), } _result._CEMI._CEMIChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewMFuncPropCon(size uint16) *_MFuncPropCon { // Deprecated: use the interface for direct cast func CastMFuncPropCon(structType interface{}) MFuncPropCon { - if casted, ok := structType.(MFuncPropCon); ok { + if casted, ok := structType.(MFuncPropCon); ok { return casted } if casted, ok := structType.(*MFuncPropCon); ok { @@ -96,6 +100,7 @@ func (m *_MFuncPropCon) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_MFuncPropCon) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_MFuncPropCon) SerializeWithWriteBuffer(ctx context.Context, writeBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_MFuncPropCon) isMFuncPropCon() bool { return true } @@ -165,3 +171,6 @@ func (m *_MFuncPropCon) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/MFuncPropStateReadReq.go b/plc4go/protocols/knxnetip/readwrite/model/MFuncPropStateReadReq.go index 347816a9b4f..448012a42a0 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/MFuncPropStateReadReq.go +++ b/plc4go/protocols/knxnetip/readwrite/model/MFuncPropStateReadReq.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // MFuncPropStateReadReq is the corresponding interface of MFuncPropStateReadReq type MFuncPropStateReadReq interface { @@ -46,30 +48,32 @@ type _MFuncPropStateReadReq struct { *_CEMI } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_MFuncPropStateReadReq) GetMessageCode() uint8 { - return 0xF9 -} +func (m *_MFuncPropStateReadReq) GetMessageCode() uint8 { +return 0xF9} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_MFuncPropStateReadReq) InitializeParent(parent CEMI) {} +func (m *_MFuncPropStateReadReq) InitializeParent(parent CEMI ) {} -func (m *_MFuncPropStateReadReq) GetParent() CEMI { +func (m *_MFuncPropStateReadReq) GetParent() CEMI { return m._CEMI } + // NewMFuncPropStateReadReq factory function for _MFuncPropStateReadReq -func NewMFuncPropStateReadReq(size uint16) *_MFuncPropStateReadReq { +func NewMFuncPropStateReadReq( size uint16 ) *_MFuncPropStateReadReq { _result := &_MFuncPropStateReadReq{ - _CEMI: NewCEMI(size), + _CEMI: NewCEMI(size), } _result._CEMI._CEMIChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewMFuncPropStateReadReq(size uint16) *_MFuncPropStateReadReq { // Deprecated: use the interface for direct cast func CastMFuncPropStateReadReq(structType interface{}) MFuncPropStateReadReq { - if casted, ok := structType.(MFuncPropStateReadReq); ok { + if casted, ok := structType.(MFuncPropStateReadReq); ok { return casted } if casted, ok := structType.(*MFuncPropStateReadReq); ok { @@ -96,6 +100,7 @@ func (m *_MFuncPropStateReadReq) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_MFuncPropStateReadReq) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_MFuncPropStateReadReq) SerializeWithWriteBuffer(ctx context.Context, w return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_MFuncPropStateReadReq) isMFuncPropStateReadReq() bool { return true } @@ -165,3 +171,6 @@ func (m *_MFuncPropStateReadReq) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/MPropInfoInd.go b/plc4go/protocols/knxnetip/readwrite/model/MPropInfoInd.go index 8d695f0fa1d..12477b6e182 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/MPropInfoInd.go +++ b/plc4go/protocols/knxnetip/readwrite/model/MPropInfoInd.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // MPropInfoInd is the corresponding interface of MPropInfoInd type MPropInfoInd interface { @@ -46,30 +48,32 @@ type _MPropInfoInd struct { *_CEMI } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_MPropInfoInd) GetMessageCode() uint8 { - return 0xF7 -} +func (m *_MPropInfoInd) GetMessageCode() uint8 { +return 0xF7} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_MPropInfoInd) InitializeParent(parent CEMI) {} +func (m *_MPropInfoInd) InitializeParent(parent CEMI ) {} -func (m *_MPropInfoInd) GetParent() CEMI { +func (m *_MPropInfoInd) GetParent() CEMI { return m._CEMI } + // NewMPropInfoInd factory function for _MPropInfoInd -func NewMPropInfoInd(size uint16) *_MPropInfoInd { +func NewMPropInfoInd( size uint16 ) *_MPropInfoInd { _result := &_MPropInfoInd{ - _CEMI: NewCEMI(size), + _CEMI: NewCEMI(size), } _result._CEMI._CEMIChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewMPropInfoInd(size uint16) *_MPropInfoInd { // Deprecated: use the interface for direct cast func CastMPropInfoInd(structType interface{}) MPropInfoInd { - if casted, ok := structType.(MPropInfoInd); ok { + if casted, ok := structType.(MPropInfoInd); ok { return casted } if casted, ok := structType.(*MPropInfoInd); ok { @@ -96,6 +100,7 @@ func (m *_MPropInfoInd) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_MPropInfoInd) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_MPropInfoInd) SerializeWithWriteBuffer(ctx context.Context, writeBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_MPropInfoInd) isMPropInfoInd() bool { return true } @@ -165,3 +171,6 @@ func (m *_MPropInfoInd) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/MPropReadCon.go b/plc4go/protocols/knxnetip/readwrite/model/MPropReadCon.go index 833d95bfd53..0aac8024c62 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/MPropReadCon.go +++ b/plc4go/protocols/knxnetip/readwrite/model/MPropReadCon.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // MPropReadCon is the corresponding interface of MPropReadCon type MPropReadCon interface { @@ -56,34 +58,34 @@ type MPropReadConExactly interface { // _MPropReadCon is the data-structure of this message type _MPropReadCon struct { *_CEMI - InterfaceObjectType uint16 - ObjectInstance uint8 - PropertyId uint8 - NumberOfElements uint8 - StartIndex uint16 - Data uint16 + InterfaceObjectType uint16 + ObjectInstance uint8 + PropertyId uint8 + NumberOfElements uint8 + StartIndex uint16 + Data uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_MPropReadCon) GetMessageCode() uint8 { - return 0xFB -} +func (m *_MPropReadCon) GetMessageCode() uint8 { +return 0xFB} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_MPropReadCon) InitializeParent(parent CEMI) {} +func (m *_MPropReadCon) InitializeParent(parent CEMI ) {} -func (m *_MPropReadCon) GetParent() CEMI { +func (m *_MPropReadCon) GetParent() CEMI { return m._CEMI } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -118,16 +120,17 @@ func (m *_MPropReadCon) GetData() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewMPropReadCon factory function for _MPropReadCon -func NewMPropReadCon(interfaceObjectType uint16, objectInstance uint8, propertyId uint8, numberOfElements uint8, startIndex uint16, data uint16, size uint16) *_MPropReadCon { +func NewMPropReadCon( interfaceObjectType uint16 , objectInstance uint8 , propertyId uint8 , numberOfElements uint8 , startIndex uint16 , data uint16 , size uint16 ) *_MPropReadCon { _result := &_MPropReadCon{ InterfaceObjectType: interfaceObjectType, - ObjectInstance: objectInstance, - PropertyId: propertyId, - NumberOfElements: numberOfElements, - StartIndex: startIndex, - Data: data, - _CEMI: NewCEMI(size), + ObjectInstance: objectInstance, + PropertyId: propertyId, + NumberOfElements: numberOfElements, + StartIndex: startIndex, + Data: data, + _CEMI: NewCEMI(size), } _result._CEMI._CEMIChildRequirements = _result return _result @@ -135,7 +138,7 @@ func NewMPropReadCon(interfaceObjectType uint16, objectInstance uint8, propertyI // Deprecated: use the interface for direct cast func CastMPropReadCon(structType interface{}) MPropReadCon { - if casted, ok := structType.(MPropReadCon); ok { + if casted, ok := structType.(MPropReadCon); ok { return casted } if casted, ok := structType.(*MPropReadCon); ok { @@ -152,26 +155,27 @@ func (m *_MPropReadCon) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (interfaceObjectType) - lengthInBits += 16 + lengthInBits += 16; // Simple field (objectInstance) - lengthInBits += 8 + lengthInBits += 8; // Simple field (propertyId) - lengthInBits += 8 + lengthInBits += 8; // Simple field (numberOfElements) - lengthInBits += 4 + lengthInBits += 4; // Simple field (startIndex) - lengthInBits += 12 + lengthInBits += 12; // Simple field (data) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_MPropReadCon) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -190,42 +194,42 @@ func MPropReadConParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe _ = currentPos // Simple Field (interfaceObjectType) - _interfaceObjectType, _interfaceObjectTypeErr := readBuffer.ReadUint16("interfaceObjectType", 16) +_interfaceObjectType, _interfaceObjectTypeErr := readBuffer.ReadUint16("interfaceObjectType", 16) if _interfaceObjectTypeErr != nil { return nil, errors.Wrap(_interfaceObjectTypeErr, "Error parsing 'interfaceObjectType' field of MPropReadCon") } interfaceObjectType := _interfaceObjectType // Simple Field (objectInstance) - _objectInstance, _objectInstanceErr := readBuffer.ReadUint8("objectInstance", 8) +_objectInstance, _objectInstanceErr := readBuffer.ReadUint8("objectInstance", 8) if _objectInstanceErr != nil { return nil, errors.Wrap(_objectInstanceErr, "Error parsing 'objectInstance' field of MPropReadCon") } objectInstance := _objectInstance // Simple Field (propertyId) - _propertyId, _propertyIdErr := readBuffer.ReadUint8("propertyId", 8) +_propertyId, _propertyIdErr := readBuffer.ReadUint8("propertyId", 8) if _propertyIdErr != nil { return nil, errors.Wrap(_propertyIdErr, "Error parsing 'propertyId' field of MPropReadCon") } propertyId := _propertyId // Simple Field (numberOfElements) - _numberOfElements, _numberOfElementsErr := readBuffer.ReadUint8("numberOfElements", 4) +_numberOfElements, _numberOfElementsErr := readBuffer.ReadUint8("numberOfElements", 4) if _numberOfElementsErr != nil { return nil, errors.Wrap(_numberOfElementsErr, "Error parsing 'numberOfElements' field of MPropReadCon") } numberOfElements := _numberOfElements // Simple Field (startIndex) - _startIndex, _startIndexErr := readBuffer.ReadUint16("startIndex", 12) +_startIndex, _startIndexErr := readBuffer.ReadUint16("startIndex", 12) if _startIndexErr != nil { return nil, errors.Wrap(_startIndexErr, "Error parsing 'startIndex' field of MPropReadCon") } startIndex := _startIndex // Simple Field (data) - _data, _dataErr := readBuffer.ReadUint16("data", 16) +_data, _dataErr := readBuffer.ReadUint16("data", 16) if _dataErr != nil { return nil, errors.Wrap(_dataErr, "Error parsing 'data' field of MPropReadCon") } @@ -241,11 +245,11 @@ func MPropReadConParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe Size: size, }, InterfaceObjectType: interfaceObjectType, - ObjectInstance: objectInstance, - PropertyId: propertyId, - NumberOfElements: numberOfElements, - StartIndex: startIndex, - Data: data, + ObjectInstance: objectInstance, + PropertyId: propertyId, + NumberOfElements: numberOfElements, + StartIndex: startIndex, + Data: data, } _child._CEMI._CEMIChildRequirements = _child return _child, nil @@ -267,47 +271,47 @@ func (m *_MPropReadCon) SerializeWithWriteBuffer(ctx context.Context, writeBuffe return errors.Wrap(pushErr, "Error pushing for MPropReadCon") } - // Simple Field (interfaceObjectType) - interfaceObjectType := uint16(m.GetInterfaceObjectType()) - _interfaceObjectTypeErr := writeBuffer.WriteUint16("interfaceObjectType", 16, (interfaceObjectType)) - if _interfaceObjectTypeErr != nil { - return errors.Wrap(_interfaceObjectTypeErr, "Error serializing 'interfaceObjectType' field") - } + // Simple Field (interfaceObjectType) + interfaceObjectType := uint16(m.GetInterfaceObjectType()) + _interfaceObjectTypeErr := writeBuffer.WriteUint16("interfaceObjectType", 16, (interfaceObjectType)) + if _interfaceObjectTypeErr != nil { + return errors.Wrap(_interfaceObjectTypeErr, "Error serializing 'interfaceObjectType' field") + } - // Simple Field (objectInstance) - objectInstance := uint8(m.GetObjectInstance()) - _objectInstanceErr := writeBuffer.WriteUint8("objectInstance", 8, (objectInstance)) - if _objectInstanceErr != nil { - return errors.Wrap(_objectInstanceErr, "Error serializing 'objectInstance' field") - } + // Simple Field (objectInstance) + objectInstance := uint8(m.GetObjectInstance()) + _objectInstanceErr := writeBuffer.WriteUint8("objectInstance", 8, (objectInstance)) + if _objectInstanceErr != nil { + return errors.Wrap(_objectInstanceErr, "Error serializing 'objectInstance' field") + } - // Simple Field (propertyId) - propertyId := uint8(m.GetPropertyId()) - _propertyIdErr := writeBuffer.WriteUint8("propertyId", 8, (propertyId)) - if _propertyIdErr != nil { - return errors.Wrap(_propertyIdErr, "Error serializing 'propertyId' field") - } + // Simple Field (propertyId) + propertyId := uint8(m.GetPropertyId()) + _propertyIdErr := writeBuffer.WriteUint8("propertyId", 8, (propertyId)) + if _propertyIdErr != nil { + return errors.Wrap(_propertyIdErr, "Error serializing 'propertyId' field") + } - // Simple Field (numberOfElements) - numberOfElements := uint8(m.GetNumberOfElements()) - _numberOfElementsErr := writeBuffer.WriteUint8("numberOfElements", 4, (numberOfElements)) - if _numberOfElementsErr != nil { - return errors.Wrap(_numberOfElementsErr, "Error serializing 'numberOfElements' field") - } + // Simple Field (numberOfElements) + numberOfElements := uint8(m.GetNumberOfElements()) + _numberOfElementsErr := writeBuffer.WriteUint8("numberOfElements", 4, (numberOfElements)) + if _numberOfElementsErr != nil { + return errors.Wrap(_numberOfElementsErr, "Error serializing 'numberOfElements' field") + } - // Simple Field (startIndex) - startIndex := uint16(m.GetStartIndex()) - _startIndexErr := writeBuffer.WriteUint16("startIndex", 12, (startIndex)) - if _startIndexErr != nil { - return errors.Wrap(_startIndexErr, "Error serializing 'startIndex' field") - } + // Simple Field (startIndex) + startIndex := uint16(m.GetStartIndex()) + _startIndexErr := writeBuffer.WriteUint16("startIndex", 12, (startIndex)) + if _startIndexErr != nil { + return errors.Wrap(_startIndexErr, "Error serializing 'startIndex' field") + } - // Simple Field (data) - data := uint16(m.GetData()) - _dataErr := writeBuffer.WriteUint16("data", 16, (data)) - if _dataErr != nil { - return errors.Wrap(_dataErr, "Error serializing 'data' field") - } + // Simple Field (data) + data := uint16(m.GetData()) + _dataErr := writeBuffer.WriteUint16("data", 16, (data)) + if _dataErr != nil { + return errors.Wrap(_dataErr, "Error serializing 'data' field") + } if popErr := writeBuffer.PopContext("MPropReadCon"); popErr != nil { return errors.Wrap(popErr, "Error popping for MPropReadCon") @@ -317,6 +321,7 @@ func (m *_MPropReadCon) SerializeWithWriteBuffer(ctx context.Context, writeBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_MPropReadCon) isMPropReadCon() bool { return true } @@ -331,3 +336,6 @@ func (m *_MPropReadCon) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/MPropReadReq.go b/plc4go/protocols/knxnetip/readwrite/model/MPropReadReq.go index 65c83a4cf77..5e6f6af029a 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/MPropReadReq.go +++ b/plc4go/protocols/knxnetip/readwrite/model/MPropReadReq.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // MPropReadReq is the corresponding interface of MPropReadReq type MPropReadReq interface { @@ -54,33 +56,33 @@ type MPropReadReqExactly interface { // _MPropReadReq is the data-structure of this message type _MPropReadReq struct { *_CEMI - InterfaceObjectType uint16 - ObjectInstance uint8 - PropertyId uint8 - NumberOfElements uint8 - StartIndex uint16 + InterfaceObjectType uint16 + ObjectInstance uint8 + PropertyId uint8 + NumberOfElements uint8 + StartIndex uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_MPropReadReq) GetMessageCode() uint8 { - return 0xFC -} +func (m *_MPropReadReq) GetMessageCode() uint8 { +return 0xFC} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_MPropReadReq) InitializeParent(parent CEMI) {} +func (m *_MPropReadReq) InitializeParent(parent CEMI ) {} -func (m *_MPropReadReq) GetParent() CEMI { +func (m *_MPropReadReq) GetParent() CEMI { return m._CEMI } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -111,15 +113,16 @@ func (m *_MPropReadReq) GetStartIndex() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewMPropReadReq factory function for _MPropReadReq -func NewMPropReadReq(interfaceObjectType uint16, objectInstance uint8, propertyId uint8, numberOfElements uint8, startIndex uint16, size uint16) *_MPropReadReq { +func NewMPropReadReq( interfaceObjectType uint16 , objectInstance uint8 , propertyId uint8 , numberOfElements uint8 , startIndex uint16 , size uint16 ) *_MPropReadReq { _result := &_MPropReadReq{ InterfaceObjectType: interfaceObjectType, - ObjectInstance: objectInstance, - PropertyId: propertyId, - NumberOfElements: numberOfElements, - StartIndex: startIndex, - _CEMI: NewCEMI(size), + ObjectInstance: objectInstance, + PropertyId: propertyId, + NumberOfElements: numberOfElements, + StartIndex: startIndex, + _CEMI: NewCEMI(size), } _result._CEMI._CEMIChildRequirements = _result return _result @@ -127,7 +130,7 @@ func NewMPropReadReq(interfaceObjectType uint16, objectInstance uint8, propertyI // Deprecated: use the interface for direct cast func CastMPropReadReq(structType interface{}) MPropReadReq { - if casted, ok := structType.(MPropReadReq); ok { + if casted, ok := structType.(MPropReadReq); ok { return casted } if casted, ok := structType.(*MPropReadReq); ok { @@ -144,23 +147,24 @@ func (m *_MPropReadReq) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (interfaceObjectType) - lengthInBits += 16 + lengthInBits += 16; // Simple field (objectInstance) - lengthInBits += 8 + lengthInBits += 8; // Simple field (propertyId) - lengthInBits += 8 + lengthInBits += 8; // Simple field (numberOfElements) - lengthInBits += 4 + lengthInBits += 4; // Simple field (startIndex) - lengthInBits += 12 + lengthInBits += 12; return lengthInBits } + func (m *_MPropReadReq) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -179,35 +183,35 @@ func MPropReadReqParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe _ = currentPos // Simple Field (interfaceObjectType) - _interfaceObjectType, _interfaceObjectTypeErr := readBuffer.ReadUint16("interfaceObjectType", 16) +_interfaceObjectType, _interfaceObjectTypeErr := readBuffer.ReadUint16("interfaceObjectType", 16) if _interfaceObjectTypeErr != nil { return nil, errors.Wrap(_interfaceObjectTypeErr, "Error parsing 'interfaceObjectType' field of MPropReadReq") } interfaceObjectType := _interfaceObjectType // Simple Field (objectInstance) - _objectInstance, _objectInstanceErr := readBuffer.ReadUint8("objectInstance", 8) +_objectInstance, _objectInstanceErr := readBuffer.ReadUint8("objectInstance", 8) if _objectInstanceErr != nil { return nil, errors.Wrap(_objectInstanceErr, "Error parsing 'objectInstance' field of MPropReadReq") } objectInstance := _objectInstance // Simple Field (propertyId) - _propertyId, _propertyIdErr := readBuffer.ReadUint8("propertyId", 8) +_propertyId, _propertyIdErr := readBuffer.ReadUint8("propertyId", 8) if _propertyIdErr != nil { return nil, errors.Wrap(_propertyIdErr, "Error parsing 'propertyId' field of MPropReadReq") } propertyId := _propertyId // Simple Field (numberOfElements) - _numberOfElements, _numberOfElementsErr := readBuffer.ReadUint8("numberOfElements", 4) +_numberOfElements, _numberOfElementsErr := readBuffer.ReadUint8("numberOfElements", 4) if _numberOfElementsErr != nil { return nil, errors.Wrap(_numberOfElementsErr, "Error parsing 'numberOfElements' field of MPropReadReq") } numberOfElements := _numberOfElements // Simple Field (startIndex) - _startIndex, _startIndexErr := readBuffer.ReadUint16("startIndex", 12) +_startIndex, _startIndexErr := readBuffer.ReadUint16("startIndex", 12) if _startIndexErr != nil { return nil, errors.Wrap(_startIndexErr, "Error parsing 'startIndex' field of MPropReadReq") } @@ -223,10 +227,10 @@ func MPropReadReqParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe Size: size, }, InterfaceObjectType: interfaceObjectType, - ObjectInstance: objectInstance, - PropertyId: propertyId, - NumberOfElements: numberOfElements, - StartIndex: startIndex, + ObjectInstance: objectInstance, + PropertyId: propertyId, + NumberOfElements: numberOfElements, + StartIndex: startIndex, } _child._CEMI._CEMIChildRequirements = _child return _child, nil @@ -248,40 +252,40 @@ func (m *_MPropReadReq) SerializeWithWriteBuffer(ctx context.Context, writeBuffe return errors.Wrap(pushErr, "Error pushing for MPropReadReq") } - // Simple Field (interfaceObjectType) - interfaceObjectType := uint16(m.GetInterfaceObjectType()) - _interfaceObjectTypeErr := writeBuffer.WriteUint16("interfaceObjectType", 16, (interfaceObjectType)) - if _interfaceObjectTypeErr != nil { - return errors.Wrap(_interfaceObjectTypeErr, "Error serializing 'interfaceObjectType' field") - } + // Simple Field (interfaceObjectType) + interfaceObjectType := uint16(m.GetInterfaceObjectType()) + _interfaceObjectTypeErr := writeBuffer.WriteUint16("interfaceObjectType", 16, (interfaceObjectType)) + if _interfaceObjectTypeErr != nil { + return errors.Wrap(_interfaceObjectTypeErr, "Error serializing 'interfaceObjectType' field") + } - // Simple Field (objectInstance) - objectInstance := uint8(m.GetObjectInstance()) - _objectInstanceErr := writeBuffer.WriteUint8("objectInstance", 8, (objectInstance)) - if _objectInstanceErr != nil { - return errors.Wrap(_objectInstanceErr, "Error serializing 'objectInstance' field") - } + // Simple Field (objectInstance) + objectInstance := uint8(m.GetObjectInstance()) + _objectInstanceErr := writeBuffer.WriteUint8("objectInstance", 8, (objectInstance)) + if _objectInstanceErr != nil { + return errors.Wrap(_objectInstanceErr, "Error serializing 'objectInstance' field") + } - // Simple Field (propertyId) - propertyId := uint8(m.GetPropertyId()) - _propertyIdErr := writeBuffer.WriteUint8("propertyId", 8, (propertyId)) - if _propertyIdErr != nil { - return errors.Wrap(_propertyIdErr, "Error serializing 'propertyId' field") - } + // Simple Field (propertyId) + propertyId := uint8(m.GetPropertyId()) + _propertyIdErr := writeBuffer.WriteUint8("propertyId", 8, (propertyId)) + if _propertyIdErr != nil { + return errors.Wrap(_propertyIdErr, "Error serializing 'propertyId' field") + } - // Simple Field (numberOfElements) - numberOfElements := uint8(m.GetNumberOfElements()) - _numberOfElementsErr := writeBuffer.WriteUint8("numberOfElements", 4, (numberOfElements)) - if _numberOfElementsErr != nil { - return errors.Wrap(_numberOfElementsErr, "Error serializing 'numberOfElements' field") - } + // Simple Field (numberOfElements) + numberOfElements := uint8(m.GetNumberOfElements()) + _numberOfElementsErr := writeBuffer.WriteUint8("numberOfElements", 4, (numberOfElements)) + if _numberOfElementsErr != nil { + return errors.Wrap(_numberOfElementsErr, "Error serializing 'numberOfElements' field") + } - // Simple Field (startIndex) - startIndex := uint16(m.GetStartIndex()) - _startIndexErr := writeBuffer.WriteUint16("startIndex", 12, (startIndex)) - if _startIndexErr != nil { - return errors.Wrap(_startIndexErr, "Error serializing 'startIndex' field") - } + // Simple Field (startIndex) + startIndex := uint16(m.GetStartIndex()) + _startIndexErr := writeBuffer.WriteUint16("startIndex", 12, (startIndex)) + if _startIndexErr != nil { + return errors.Wrap(_startIndexErr, "Error serializing 'startIndex' field") + } if popErr := writeBuffer.PopContext("MPropReadReq"); popErr != nil { return errors.Wrap(popErr, "Error popping for MPropReadReq") @@ -291,6 +295,7 @@ func (m *_MPropReadReq) SerializeWithWriteBuffer(ctx context.Context, writeBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_MPropReadReq) isMPropReadReq() bool { return true } @@ -305,3 +310,6 @@ func (m *_MPropReadReq) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/MPropWriteCon.go b/plc4go/protocols/knxnetip/readwrite/model/MPropWriteCon.go index 796dc1b1791..f9a556d5a7e 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/MPropWriteCon.go +++ b/plc4go/protocols/knxnetip/readwrite/model/MPropWriteCon.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // MPropWriteCon is the corresponding interface of MPropWriteCon type MPropWriteCon interface { @@ -46,30 +48,32 @@ type _MPropWriteCon struct { *_CEMI } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_MPropWriteCon) GetMessageCode() uint8 { - return 0xF5 -} +func (m *_MPropWriteCon) GetMessageCode() uint8 { +return 0xF5} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_MPropWriteCon) InitializeParent(parent CEMI) {} +func (m *_MPropWriteCon) InitializeParent(parent CEMI ) {} -func (m *_MPropWriteCon) GetParent() CEMI { +func (m *_MPropWriteCon) GetParent() CEMI { return m._CEMI } + // NewMPropWriteCon factory function for _MPropWriteCon -func NewMPropWriteCon(size uint16) *_MPropWriteCon { +func NewMPropWriteCon( size uint16 ) *_MPropWriteCon { _result := &_MPropWriteCon{ - _CEMI: NewCEMI(size), + _CEMI: NewCEMI(size), } _result._CEMI._CEMIChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewMPropWriteCon(size uint16) *_MPropWriteCon { // Deprecated: use the interface for direct cast func CastMPropWriteCon(structType interface{}) MPropWriteCon { - if casted, ok := structType.(MPropWriteCon); ok { + if casted, ok := structType.(MPropWriteCon); ok { return casted } if casted, ok := structType.(*MPropWriteCon); ok { @@ -96,6 +100,7 @@ func (m *_MPropWriteCon) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_MPropWriteCon) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_MPropWriteCon) SerializeWithWriteBuffer(ctx context.Context, writeBuff return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_MPropWriteCon) isMPropWriteCon() bool { return true } @@ -165,3 +171,6 @@ func (m *_MPropWriteCon) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/MPropWriteReq.go b/plc4go/protocols/knxnetip/readwrite/model/MPropWriteReq.go index 6b00829908b..5358cc4666d 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/MPropWriteReq.go +++ b/plc4go/protocols/knxnetip/readwrite/model/MPropWriteReq.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // MPropWriteReq is the corresponding interface of MPropWriteReq type MPropWriteReq interface { @@ -46,30 +48,32 @@ type _MPropWriteReq struct { *_CEMI } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_MPropWriteReq) GetMessageCode() uint8 { - return 0xF6 -} +func (m *_MPropWriteReq) GetMessageCode() uint8 { +return 0xF6} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_MPropWriteReq) InitializeParent(parent CEMI) {} +func (m *_MPropWriteReq) InitializeParent(parent CEMI ) {} -func (m *_MPropWriteReq) GetParent() CEMI { +func (m *_MPropWriteReq) GetParent() CEMI { return m._CEMI } + // NewMPropWriteReq factory function for _MPropWriteReq -func NewMPropWriteReq(size uint16) *_MPropWriteReq { +func NewMPropWriteReq( size uint16 ) *_MPropWriteReq { _result := &_MPropWriteReq{ - _CEMI: NewCEMI(size), + _CEMI: NewCEMI(size), } _result._CEMI._CEMIChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewMPropWriteReq(size uint16) *_MPropWriteReq { // Deprecated: use the interface for direct cast func CastMPropWriteReq(structType interface{}) MPropWriteReq { - if casted, ok := structType.(MPropWriteReq); ok { + if casted, ok := structType.(MPropWriteReq); ok { return casted } if casted, ok := structType.(*MPropWriteReq); ok { @@ -96,6 +100,7 @@ func (m *_MPropWriteReq) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_MPropWriteReq) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_MPropWriteReq) SerializeWithWriteBuffer(ctx context.Context, writeBuff return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_MPropWriteReq) isMPropWriteReq() bool { return true } @@ -165,3 +171,6 @@ func (m *_MPropWriteReq) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/MResetInd.go b/plc4go/protocols/knxnetip/readwrite/model/MResetInd.go index c5da86e48d3..97510f473fb 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/MResetInd.go +++ b/plc4go/protocols/knxnetip/readwrite/model/MResetInd.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // MResetInd is the corresponding interface of MResetInd type MResetInd interface { @@ -46,30 +48,32 @@ type _MResetInd struct { *_CEMI } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_MResetInd) GetMessageCode() uint8 { - return 0xF0 -} +func (m *_MResetInd) GetMessageCode() uint8 { +return 0xF0} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_MResetInd) InitializeParent(parent CEMI) {} +func (m *_MResetInd) InitializeParent(parent CEMI ) {} -func (m *_MResetInd) GetParent() CEMI { +func (m *_MResetInd) GetParent() CEMI { return m._CEMI } + // NewMResetInd factory function for _MResetInd -func NewMResetInd(size uint16) *_MResetInd { +func NewMResetInd( size uint16 ) *_MResetInd { _result := &_MResetInd{ - _CEMI: NewCEMI(size), + _CEMI: NewCEMI(size), } _result._CEMI._CEMIChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewMResetInd(size uint16) *_MResetInd { // Deprecated: use the interface for direct cast func CastMResetInd(structType interface{}) MResetInd { - if casted, ok := structType.(MResetInd); ok { + if casted, ok := structType.(MResetInd); ok { return casted } if casted, ok := structType.(*MResetInd); ok { @@ -96,6 +100,7 @@ func (m *_MResetInd) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_MResetInd) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_MResetInd) SerializeWithWriteBuffer(ctx context.Context, writeBuffer u return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_MResetInd) isMResetInd() bool { return true } @@ -165,3 +171,6 @@ func (m *_MResetInd) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/MResetReq.go b/plc4go/protocols/knxnetip/readwrite/model/MResetReq.go index 4e8618f5b0e..71105ddae2a 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/MResetReq.go +++ b/plc4go/protocols/knxnetip/readwrite/model/MResetReq.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // MResetReq is the corresponding interface of MResetReq type MResetReq interface { @@ -46,30 +48,32 @@ type _MResetReq struct { *_CEMI } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_MResetReq) GetMessageCode() uint8 { - return 0xF1 -} +func (m *_MResetReq) GetMessageCode() uint8 { +return 0xF1} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_MResetReq) InitializeParent(parent CEMI) {} +func (m *_MResetReq) InitializeParent(parent CEMI ) {} -func (m *_MResetReq) GetParent() CEMI { +func (m *_MResetReq) GetParent() CEMI { return m._CEMI } + // NewMResetReq factory function for _MResetReq -func NewMResetReq(size uint16) *_MResetReq { +func NewMResetReq( size uint16 ) *_MResetReq { _result := &_MResetReq{ - _CEMI: NewCEMI(size), + _CEMI: NewCEMI(size), } _result._CEMI._CEMIChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewMResetReq(size uint16) *_MResetReq { // Deprecated: use the interface for direct cast func CastMResetReq(structType interface{}) MResetReq { - if casted, ok := structType.(MResetReq); ok { + if casted, ok := structType.(MResetReq); ok { return casted } if casted, ok := structType.(*MResetReq); ok { @@ -96,6 +100,7 @@ func (m *_MResetReq) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_MResetReq) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_MResetReq) SerializeWithWriteBuffer(ctx context.Context, writeBuffer u return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_MResetReq) isMResetReq() bool { return true } @@ -165,3 +171,6 @@ func (m *_MResetReq) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ProjectInstallationIdentifier.go b/plc4go/protocols/knxnetip/readwrite/model/ProjectInstallationIdentifier.go index 60d0475ff23..edbd7b9a1c7 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ProjectInstallationIdentifier.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ProjectInstallationIdentifier.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ProjectInstallationIdentifier is the corresponding interface of ProjectInstallationIdentifier type ProjectInstallationIdentifier interface { @@ -46,10 +48,11 @@ type ProjectInstallationIdentifierExactly interface { // _ProjectInstallationIdentifier is the data-structure of this message type _ProjectInstallationIdentifier struct { - ProjectNumber uint8 - InstallationNumber uint8 + ProjectNumber uint8 + InstallationNumber uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -68,14 +71,15 @@ func (m *_ProjectInstallationIdentifier) GetInstallationNumber() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewProjectInstallationIdentifier factory function for _ProjectInstallationIdentifier -func NewProjectInstallationIdentifier(projectNumber uint8, installationNumber uint8) *_ProjectInstallationIdentifier { - return &_ProjectInstallationIdentifier{ProjectNumber: projectNumber, InstallationNumber: installationNumber} +func NewProjectInstallationIdentifier( projectNumber uint8 , installationNumber uint8 ) *_ProjectInstallationIdentifier { +return &_ProjectInstallationIdentifier{ ProjectNumber: projectNumber , InstallationNumber: installationNumber } } // Deprecated: use the interface for direct cast func CastProjectInstallationIdentifier(structType interface{}) ProjectInstallationIdentifier { - if casted, ok := structType.(ProjectInstallationIdentifier); ok { + if casted, ok := structType.(ProjectInstallationIdentifier); ok { return casted } if casted, ok := structType.(*ProjectInstallationIdentifier); ok { @@ -92,14 +96,15 @@ func (m *_ProjectInstallationIdentifier) GetLengthInBits(ctx context.Context) ui lengthInBits := uint16(0) // Simple field (projectNumber) - lengthInBits += 8 + lengthInBits += 8; // Simple field (installationNumber) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_ProjectInstallationIdentifier) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -118,14 +123,14 @@ func ProjectInstallationIdentifierParseWithBuffer(ctx context.Context, readBuffe _ = currentPos // Simple Field (projectNumber) - _projectNumber, _projectNumberErr := readBuffer.ReadUint8("projectNumber", 8) +_projectNumber, _projectNumberErr := readBuffer.ReadUint8("projectNumber", 8) if _projectNumberErr != nil { return nil, errors.Wrap(_projectNumberErr, "Error parsing 'projectNumber' field of ProjectInstallationIdentifier") } projectNumber := _projectNumber // Simple Field (installationNumber) - _installationNumber, _installationNumberErr := readBuffer.ReadUint8("installationNumber", 8) +_installationNumber, _installationNumberErr := readBuffer.ReadUint8("installationNumber", 8) if _installationNumberErr != nil { return nil, errors.Wrap(_installationNumberErr, "Error parsing 'installationNumber' field of ProjectInstallationIdentifier") } @@ -137,9 +142,9 @@ func ProjectInstallationIdentifierParseWithBuffer(ctx context.Context, readBuffe // Create the instance return &_ProjectInstallationIdentifier{ - ProjectNumber: projectNumber, - InstallationNumber: installationNumber, - }, nil + ProjectNumber: projectNumber, + InstallationNumber: installationNumber, + }, nil } func (m *_ProjectInstallationIdentifier) Serialize() ([]byte, error) { @@ -153,7 +158,7 @@ func (m *_ProjectInstallationIdentifier) Serialize() ([]byte, error) { func (m *_ProjectInstallationIdentifier) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("ProjectInstallationIdentifier"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("ProjectInstallationIdentifier"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for ProjectInstallationIdentifier") } @@ -177,6 +182,7 @@ func (m *_ProjectInstallationIdentifier) SerializeWithWriteBuffer(ctx context.Co return nil } + func (m *_ProjectInstallationIdentifier) isProjectInstallationIdentifier() bool { return true } @@ -191,3 +197,6 @@ func (m *_ProjectInstallationIdentifier) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/RelativeTimestamp.go b/plc4go/protocols/knxnetip/readwrite/model/RelativeTimestamp.go index 88d446f98cc..7a453337c4c 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/RelativeTimestamp.go +++ b/plc4go/protocols/knxnetip/readwrite/model/RelativeTimestamp.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // RelativeTimestamp is the corresponding interface of RelativeTimestamp type RelativeTimestamp interface { @@ -44,9 +46,10 @@ type RelativeTimestampExactly interface { // _RelativeTimestamp is the data-structure of this message type _RelativeTimestamp struct { - Timestamp uint16 + Timestamp uint16 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -61,14 +64,15 @@ func (m *_RelativeTimestamp) GetTimestamp() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewRelativeTimestamp factory function for _RelativeTimestamp -func NewRelativeTimestamp(timestamp uint16) *_RelativeTimestamp { - return &_RelativeTimestamp{Timestamp: timestamp} +func NewRelativeTimestamp( timestamp uint16 ) *_RelativeTimestamp { +return &_RelativeTimestamp{ Timestamp: timestamp } } // Deprecated: use the interface for direct cast func CastRelativeTimestamp(structType interface{}) RelativeTimestamp { - if casted, ok := structType.(RelativeTimestamp); ok { + if casted, ok := structType.(RelativeTimestamp); ok { return casted } if casted, ok := structType.(*RelativeTimestamp); ok { @@ -85,11 +89,12 @@ func (m *_RelativeTimestamp) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (timestamp) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_RelativeTimestamp) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -108,7 +113,7 @@ func RelativeTimestampParseWithBuffer(ctx context.Context, readBuffer utils.Read _ = currentPos // Simple Field (timestamp) - _timestamp, _timestampErr := readBuffer.ReadUint16("timestamp", 16) +_timestamp, _timestampErr := readBuffer.ReadUint16("timestamp", 16) if _timestampErr != nil { return nil, errors.Wrap(_timestampErr, "Error parsing 'timestamp' field of RelativeTimestamp") } @@ -120,8 +125,8 @@ func RelativeTimestampParseWithBuffer(ctx context.Context, readBuffer utils.Read // Create the instance return &_RelativeTimestamp{ - Timestamp: timestamp, - }, nil + Timestamp: timestamp, + }, nil } func (m *_RelativeTimestamp) Serialize() ([]byte, error) { @@ -135,7 +140,7 @@ func (m *_RelativeTimestamp) Serialize() ([]byte, error) { func (m *_RelativeTimestamp) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("RelativeTimestamp"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("RelativeTimestamp"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for RelativeTimestamp") } @@ -152,6 +157,7 @@ func (m *_RelativeTimestamp) SerializeWithWriteBuffer(ctx context.Context, write return nil } + func (m *_RelativeTimestamp) isRelativeTimestamp() bool { return true } @@ -166,3 +172,6 @@ func (m *_RelativeTimestamp) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/RoutingIndication.go b/plc4go/protocols/knxnetip/readwrite/model/RoutingIndication.go index 222865a2974..84b61dfbee2 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/RoutingIndication.go +++ b/plc4go/protocols/knxnetip/readwrite/model/RoutingIndication.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // RoutingIndication is the corresponding interface of RoutingIndication type RoutingIndication interface { @@ -47,30 +49,32 @@ type _RoutingIndication struct { *_KnxNetIpMessage } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_RoutingIndication) GetMsgType() uint16 { - return 0x0530 -} +func (m *_RoutingIndication) GetMsgType() uint16 { +return 0x0530} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_RoutingIndication) InitializeParent(parent KnxNetIpMessage) {} +func (m *_RoutingIndication) InitializeParent(parent KnxNetIpMessage ) {} -func (m *_RoutingIndication) GetParent() KnxNetIpMessage { +func (m *_RoutingIndication) GetParent() KnxNetIpMessage { return m._KnxNetIpMessage } + // NewRoutingIndication factory function for _RoutingIndication -func NewRoutingIndication() *_RoutingIndication { +func NewRoutingIndication( ) *_RoutingIndication { _result := &_RoutingIndication{ - _KnxNetIpMessage: NewKnxNetIpMessage(), + _KnxNetIpMessage: NewKnxNetIpMessage(), } _result._KnxNetIpMessage._KnxNetIpMessageChildRequirements = _result return _result @@ -78,7 +82,7 @@ func NewRoutingIndication() *_RoutingIndication { // Deprecated: use the interface for direct cast func CastRoutingIndication(structType interface{}) RoutingIndication { - if casted, ok := structType.(RoutingIndication); ok { + if casted, ok := structType.(RoutingIndication); ok { return casted } if casted, ok := structType.(*RoutingIndication); ok { @@ -97,6 +101,7 @@ func (m *_RoutingIndication) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_RoutingIndication) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -120,7 +125,8 @@ func RoutingIndicationParseWithBuffer(ctx context.Context, readBuffer utils.Read // Create a partially initialized instance _child := &_RoutingIndication{ - _KnxNetIpMessage: &_KnxNetIpMessage{}, + _KnxNetIpMessage: &_KnxNetIpMessage{ + }, } _child._KnxNetIpMessage._KnxNetIpMessageChildRequirements = _child return _child, nil @@ -150,6 +156,7 @@ func (m *_RoutingIndication) SerializeWithWriteBuffer(ctx context.Context, write return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_RoutingIndication) isRoutingIndication() bool { return true } @@ -164,3 +171,6 @@ func (m *_RoutingIndication) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/SearchRequest.go b/plc4go/protocols/knxnetip/readwrite/model/SearchRequest.go index e43b7abb533..938226e7277 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/SearchRequest.go +++ b/plc4go/protocols/knxnetip/readwrite/model/SearchRequest.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SearchRequest is the corresponding interface of SearchRequest type SearchRequest interface { @@ -47,29 +49,29 @@ type SearchRequestExactly interface { // _SearchRequest is the data-structure of this message type _SearchRequest struct { *_KnxNetIpMessage - HpaiIDiscoveryEndpoint HPAIDiscoveryEndpoint + HpaiIDiscoveryEndpoint HPAIDiscoveryEndpoint } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SearchRequest) GetMsgType() uint16 { - return 0x0201 -} +func (m *_SearchRequest) GetMsgType() uint16 { +return 0x0201} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SearchRequest) InitializeParent(parent KnxNetIpMessage) {} +func (m *_SearchRequest) InitializeParent(parent KnxNetIpMessage ) {} -func (m *_SearchRequest) GetParent() KnxNetIpMessage { +func (m *_SearchRequest) GetParent() KnxNetIpMessage { return m._KnxNetIpMessage } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -84,11 +86,12 @@ func (m *_SearchRequest) GetHpaiIDiscoveryEndpoint() HPAIDiscoveryEndpoint { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSearchRequest factory function for _SearchRequest -func NewSearchRequest(hpaiIDiscoveryEndpoint HPAIDiscoveryEndpoint) *_SearchRequest { +func NewSearchRequest( hpaiIDiscoveryEndpoint HPAIDiscoveryEndpoint ) *_SearchRequest { _result := &_SearchRequest{ HpaiIDiscoveryEndpoint: hpaiIDiscoveryEndpoint, - _KnxNetIpMessage: NewKnxNetIpMessage(), + _KnxNetIpMessage: NewKnxNetIpMessage(), } _result._KnxNetIpMessage._KnxNetIpMessageChildRequirements = _result return _result @@ -96,7 +99,7 @@ func NewSearchRequest(hpaiIDiscoveryEndpoint HPAIDiscoveryEndpoint) *_SearchRequ // Deprecated: use the interface for direct cast func CastSearchRequest(structType interface{}) SearchRequest { - if casted, ok := structType.(SearchRequest); ok { + if casted, ok := structType.(SearchRequest); ok { return casted } if casted, ok := structType.(*SearchRequest); ok { @@ -118,6 +121,7 @@ func (m *_SearchRequest) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_SearchRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +143,7 @@ func SearchRequestParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff if pullErr := readBuffer.PullContext("hpaiIDiscoveryEndpoint"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for hpaiIDiscoveryEndpoint") } - _hpaiIDiscoveryEndpoint, _hpaiIDiscoveryEndpointErr := HPAIDiscoveryEndpointParseWithBuffer(ctx, readBuffer) +_hpaiIDiscoveryEndpoint, _hpaiIDiscoveryEndpointErr := HPAIDiscoveryEndpointParseWithBuffer(ctx, readBuffer) if _hpaiIDiscoveryEndpointErr != nil { return nil, errors.Wrap(_hpaiIDiscoveryEndpointErr, "Error parsing 'hpaiIDiscoveryEndpoint' field of SearchRequest") } @@ -154,7 +158,8 @@ func SearchRequestParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff // Create a partially initialized instance _child := &_SearchRequest{ - _KnxNetIpMessage: &_KnxNetIpMessage{}, + _KnxNetIpMessage: &_KnxNetIpMessage{ + }, HpaiIDiscoveryEndpoint: hpaiIDiscoveryEndpoint, } _child._KnxNetIpMessage._KnxNetIpMessageChildRequirements = _child @@ -177,17 +182,17 @@ func (m *_SearchRequest) SerializeWithWriteBuffer(ctx context.Context, writeBuff return errors.Wrap(pushErr, "Error pushing for SearchRequest") } - // Simple Field (hpaiIDiscoveryEndpoint) - if pushErr := writeBuffer.PushContext("hpaiIDiscoveryEndpoint"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for hpaiIDiscoveryEndpoint") - } - _hpaiIDiscoveryEndpointErr := writeBuffer.WriteSerializable(ctx, m.GetHpaiIDiscoveryEndpoint()) - if popErr := writeBuffer.PopContext("hpaiIDiscoveryEndpoint"); popErr != nil { - return errors.Wrap(popErr, "Error popping for hpaiIDiscoveryEndpoint") - } - if _hpaiIDiscoveryEndpointErr != nil { - return errors.Wrap(_hpaiIDiscoveryEndpointErr, "Error serializing 'hpaiIDiscoveryEndpoint' field") - } + // Simple Field (hpaiIDiscoveryEndpoint) + if pushErr := writeBuffer.PushContext("hpaiIDiscoveryEndpoint"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for hpaiIDiscoveryEndpoint") + } + _hpaiIDiscoveryEndpointErr := writeBuffer.WriteSerializable(ctx, m.GetHpaiIDiscoveryEndpoint()) + if popErr := writeBuffer.PopContext("hpaiIDiscoveryEndpoint"); popErr != nil { + return errors.Wrap(popErr, "Error popping for hpaiIDiscoveryEndpoint") + } + if _hpaiIDiscoveryEndpointErr != nil { + return errors.Wrap(_hpaiIDiscoveryEndpointErr, "Error serializing 'hpaiIDiscoveryEndpoint' field") + } if popErr := writeBuffer.PopContext("SearchRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for SearchRequest") @@ -197,6 +202,7 @@ func (m *_SearchRequest) SerializeWithWriteBuffer(ctx context.Context, writeBuff return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SearchRequest) isSearchRequest() bool { return true } @@ -211,3 +217,6 @@ func (m *_SearchRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/SearchResponse.go b/plc4go/protocols/knxnetip/readwrite/model/SearchResponse.go index 950d13c5d1d..dc210e0e283 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/SearchResponse.go +++ b/plc4go/protocols/knxnetip/readwrite/model/SearchResponse.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SearchResponse is the corresponding interface of SearchResponse type SearchResponse interface { @@ -51,31 +53,31 @@ type SearchResponseExactly interface { // _SearchResponse is the data-structure of this message type _SearchResponse struct { *_KnxNetIpMessage - HpaiControlEndpoint HPAIControlEndpoint - DibDeviceInfo DIBDeviceInfo - DibSuppSvcFamilies DIBSuppSvcFamilies + HpaiControlEndpoint HPAIControlEndpoint + DibDeviceInfo DIBDeviceInfo + DibSuppSvcFamilies DIBSuppSvcFamilies } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_SearchResponse) GetMsgType() uint16 { - return 0x0202 -} +func (m *_SearchResponse) GetMsgType() uint16 { +return 0x0202} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_SearchResponse) InitializeParent(parent KnxNetIpMessage) {} +func (m *_SearchResponse) InitializeParent(parent KnxNetIpMessage ) {} -func (m *_SearchResponse) GetParent() KnxNetIpMessage { +func (m *_SearchResponse) GetParent() KnxNetIpMessage { return m._KnxNetIpMessage } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,13 +100,14 @@ func (m *_SearchResponse) GetDibSuppSvcFamilies() DIBSuppSvcFamilies { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSearchResponse factory function for _SearchResponse -func NewSearchResponse(hpaiControlEndpoint HPAIControlEndpoint, dibDeviceInfo DIBDeviceInfo, dibSuppSvcFamilies DIBSuppSvcFamilies) *_SearchResponse { +func NewSearchResponse( hpaiControlEndpoint HPAIControlEndpoint , dibDeviceInfo DIBDeviceInfo , dibSuppSvcFamilies DIBSuppSvcFamilies ) *_SearchResponse { _result := &_SearchResponse{ HpaiControlEndpoint: hpaiControlEndpoint, - DibDeviceInfo: dibDeviceInfo, - DibSuppSvcFamilies: dibSuppSvcFamilies, - _KnxNetIpMessage: NewKnxNetIpMessage(), + DibDeviceInfo: dibDeviceInfo, + DibSuppSvcFamilies: dibSuppSvcFamilies, + _KnxNetIpMessage: NewKnxNetIpMessage(), } _result._KnxNetIpMessage._KnxNetIpMessageChildRequirements = _result return _result @@ -112,7 +115,7 @@ func NewSearchResponse(hpaiControlEndpoint HPAIControlEndpoint, dibDeviceInfo DI // Deprecated: use the interface for direct cast func CastSearchResponse(structType interface{}) SearchResponse { - if casted, ok := structType.(SearchResponse); ok { + if casted, ok := structType.(SearchResponse); ok { return casted } if casted, ok := structType.(*SearchResponse); ok { @@ -140,6 +143,7 @@ func (m *_SearchResponse) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_SearchResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -161,7 +165,7 @@ func SearchResponseParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf if pullErr := readBuffer.PullContext("hpaiControlEndpoint"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for hpaiControlEndpoint") } - _hpaiControlEndpoint, _hpaiControlEndpointErr := HPAIControlEndpointParseWithBuffer(ctx, readBuffer) +_hpaiControlEndpoint, _hpaiControlEndpointErr := HPAIControlEndpointParseWithBuffer(ctx, readBuffer) if _hpaiControlEndpointErr != nil { return nil, errors.Wrap(_hpaiControlEndpointErr, "Error parsing 'hpaiControlEndpoint' field of SearchResponse") } @@ -174,7 +178,7 @@ func SearchResponseParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf if pullErr := readBuffer.PullContext("dibDeviceInfo"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for dibDeviceInfo") } - _dibDeviceInfo, _dibDeviceInfoErr := DIBDeviceInfoParseWithBuffer(ctx, readBuffer) +_dibDeviceInfo, _dibDeviceInfoErr := DIBDeviceInfoParseWithBuffer(ctx, readBuffer) if _dibDeviceInfoErr != nil { return nil, errors.Wrap(_dibDeviceInfoErr, "Error parsing 'dibDeviceInfo' field of SearchResponse") } @@ -187,7 +191,7 @@ func SearchResponseParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf if pullErr := readBuffer.PullContext("dibSuppSvcFamilies"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for dibSuppSvcFamilies") } - _dibSuppSvcFamilies, _dibSuppSvcFamiliesErr := DIBSuppSvcFamiliesParseWithBuffer(ctx, readBuffer) +_dibSuppSvcFamilies, _dibSuppSvcFamiliesErr := DIBSuppSvcFamiliesParseWithBuffer(ctx, readBuffer) if _dibSuppSvcFamiliesErr != nil { return nil, errors.Wrap(_dibSuppSvcFamiliesErr, "Error parsing 'dibSuppSvcFamilies' field of SearchResponse") } @@ -202,10 +206,11 @@ func SearchResponseParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf // Create a partially initialized instance _child := &_SearchResponse{ - _KnxNetIpMessage: &_KnxNetIpMessage{}, + _KnxNetIpMessage: &_KnxNetIpMessage{ + }, HpaiControlEndpoint: hpaiControlEndpoint, - DibDeviceInfo: dibDeviceInfo, - DibSuppSvcFamilies: dibSuppSvcFamilies, + DibDeviceInfo: dibDeviceInfo, + DibSuppSvcFamilies: dibSuppSvcFamilies, } _child._KnxNetIpMessage._KnxNetIpMessageChildRequirements = _child return _child, nil @@ -227,41 +232,41 @@ func (m *_SearchResponse) SerializeWithWriteBuffer(ctx context.Context, writeBuf return errors.Wrap(pushErr, "Error pushing for SearchResponse") } - // Simple Field (hpaiControlEndpoint) - if pushErr := writeBuffer.PushContext("hpaiControlEndpoint"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for hpaiControlEndpoint") - } - _hpaiControlEndpointErr := writeBuffer.WriteSerializable(ctx, m.GetHpaiControlEndpoint()) - if popErr := writeBuffer.PopContext("hpaiControlEndpoint"); popErr != nil { - return errors.Wrap(popErr, "Error popping for hpaiControlEndpoint") - } - if _hpaiControlEndpointErr != nil { - return errors.Wrap(_hpaiControlEndpointErr, "Error serializing 'hpaiControlEndpoint' field") - } + // Simple Field (hpaiControlEndpoint) + if pushErr := writeBuffer.PushContext("hpaiControlEndpoint"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for hpaiControlEndpoint") + } + _hpaiControlEndpointErr := writeBuffer.WriteSerializable(ctx, m.GetHpaiControlEndpoint()) + if popErr := writeBuffer.PopContext("hpaiControlEndpoint"); popErr != nil { + return errors.Wrap(popErr, "Error popping for hpaiControlEndpoint") + } + if _hpaiControlEndpointErr != nil { + return errors.Wrap(_hpaiControlEndpointErr, "Error serializing 'hpaiControlEndpoint' field") + } - // Simple Field (dibDeviceInfo) - if pushErr := writeBuffer.PushContext("dibDeviceInfo"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for dibDeviceInfo") - } - _dibDeviceInfoErr := writeBuffer.WriteSerializable(ctx, m.GetDibDeviceInfo()) - if popErr := writeBuffer.PopContext("dibDeviceInfo"); popErr != nil { - return errors.Wrap(popErr, "Error popping for dibDeviceInfo") - } - if _dibDeviceInfoErr != nil { - return errors.Wrap(_dibDeviceInfoErr, "Error serializing 'dibDeviceInfo' field") - } + // Simple Field (dibDeviceInfo) + if pushErr := writeBuffer.PushContext("dibDeviceInfo"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for dibDeviceInfo") + } + _dibDeviceInfoErr := writeBuffer.WriteSerializable(ctx, m.GetDibDeviceInfo()) + if popErr := writeBuffer.PopContext("dibDeviceInfo"); popErr != nil { + return errors.Wrap(popErr, "Error popping for dibDeviceInfo") + } + if _dibDeviceInfoErr != nil { + return errors.Wrap(_dibDeviceInfoErr, "Error serializing 'dibDeviceInfo' field") + } - // Simple Field (dibSuppSvcFamilies) - if pushErr := writeBuffer.PushContext("dibSuppSvcFamilies"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for dibSuppSvcFamilies") - } - _dibSuppSvcFamiliesErr := writeBuffer.WriteSerializable(ctx, m.GetDibSuppSvcFamilies()) - if popErr := writeBuffer.PopContext("dibSuppSvcFamilies"); popErr != nil { - return errors.Wrap(popErr, "Error popping for dibSuppSvcFamilies") - } - if _dibSuppSvcFamiliesErr != nil { - return errors.Wrap(_dibSuppSvcFamiliesErr, "Error serializing 'dibSuppSvcFamilies' field") - } + // Simple Field (dibSuppSvcFamilies) + if pushErr := writeBuffer.PushContext("dibSuppSvcFamilies"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for dibSuppSvcFamilies") + } + _dibSuppSvcFamiliesErr := writeBuffer.WriteSerializable(ctx, m.GetDibSuppSvcFamilies()) + if popErr := writeBuffer.PopContext("dibSuppSvcFamilies"); popErr != nil { + return errors.Wrap(popErr, "Error popping for dibSuppSvcFamilies") + } + if _dibSuppSvcFamiliesErr != nil { + return errors.Wrap(_dibSuppSvcFamiliesErr, "Error serializing 'dibSuppSvcFamilies' field") + } if popErr := writeBuffer.PopContext("SearchResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for SearchResponse") @@ -271,6 +276,7 @@ func (m *_SearchResponse) SerializeWithWriteBuffer(ctx context.Context, writeBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_SearchResponse) isSearchResponse() bool { return true } @@ -285,3 +291,6 @@ func (m *_SearchResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/ServiceId.go b/plc4go/protocols/knxnetip/readwrite/model/ServiceId.go index b672d065a21..b9bc9a7cacf 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/ServiceId.go +++ b/plc4go/protocols/knxnetip/readwrite/model/ServiceId.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ServiceId is the corresponding interface of ServiceId type ServiceId interface { @@ -53,6 +55,7 @@ type _ServiceIdChildRequirements interface { GetServiceType() uint8 } + type ServiceIdParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child ServiceId, serializeChildFunction func() error) error GetTypeName() string @@ -60,21 +63,22 @@ type ServiceIdParent interface { type ServiceIdChild interface { utils.Serializable - InitializeParent(parent ServiceId) +InitializeParent(parent ServiceId ) GetParent() *ServiceId GetTypeName() string ServiceId } + // NewServiceId factory function for _ServiceId -func NewServiceId() *_ServiceId { - return &_ServiceId{} +func NewServiceId( ) *_ServiceId { +return &_ServiceId{ } } // Deprecated: use the interface for direct cast func CastServiceId(structType interface{}) ServiceId { - if casted, ok := structType.(ServiceId); ok { + if casted, ok := structType.(ServiceId); ok { return casted } if casted, ok := structType.(*ServiceId); ok { @@ -87,10 +91,11 @@ func (m *_ServiceId) GetTypeName() string { return "ServiceId" } + func (m *_ServiceId) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Discriminator Field (serviceType) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } @@ -121,27 +126,27 @@ func ServiceIdParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type ServiceIdChildSerializeRequirement interface { ServiceId - InitializeParent(ServiceId) + InitializeParent(ServiceId ) GetParent() ServiceId } var _childTemp interface{} var _child ServiceIdChildSerializeRequirement var typeSwitchError error switch { - case serviceType == 0x02: // KnxNetIpCore - _childTemp, typeSwitchError = KnxNetIpCoreParseWithBuffer(ctx, readBuffer) - case serviceType == 0x03: // KnxNetIpDeviceManagement - _childTemp, typeSwitchError = KnxNetIpDeviceManagementParseWithBuffer(ctx, readBuffer) - case serviceType == 0x04: // KnxNetIpTunneling - _childTemp, typeSwitchError = KnxNetIpTunnelingParseWithBuffer(ctx, readBuffer) - case serviceType == 0x05: // KnxNetIpRouting - _childTemp, typeSwitchError = KnxNetIpRoutingParseWithBuffer(ctx, readBuffer) - case serviceType == 0x06: // KnxNetRemoteLogging - _childTemp, typeSwitchError = KnxNetRemoteLoggingParseWithBuffer(ctx, readBuffer) - case serviceType == 0x07: // KnxNetRemoteConfigurationAndDiagnosis - _childTemp, typeSwitchError = KnxNetRemoteConfigurationAndDiagnosisParseWithBuffer(ctx, readBuffer) - case serviceType == 0x08: // KnxNetObjectServer - _childTemp, typeSwitchError = KnxNetObjectServerParseWithBuffer(ctx, readBuffer) +case serviceType == 0x02 : // KnxNetIpCore + _childTemp, typeSwitchError = KnxNetIpCoreParseWithBuffer(ctx, readBuffer, ) +case serviceType == 0x03 : // KnxNetIpDeviceManagement + _childTemp, typeSwitchError = KnxNetIpDeviceManagementParseWithBuffer(ctx, readBuffer, ) +case serviceType == 0x04 : // KnxNetIpTunneling + _childTemp, typeSwitchError = KnxNetIpTunnelingParseWithBuffer(ctx, readBuffer, ) +case serviceType == 0x05 : // KnxNetIpRouting + _childTemp, typeSwitchError = KnxNetIpRoutingParseWithBuffer(ctx, readBuffer, ) +case serviceType == 0x06 : // KnxNetRemoteLogging + _childTemp, typeSwitchError = KnxNetRemoteLoggingParseWithBuffer(ctx, readBuffer, ) +case serviceType == 0x07 : // KnxNetRemoteConfigurationAndDiagnosis + _childTemp, typeSwitchError = KnxNetRemoteConfigurationAndDiagnosisParseWithBuffer(ctx, readBuffer, ) +case serviceType == 0x08 : // KnxNetObjectServer + _childTemp, typeSwitchError = KnxNetObjectServerParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [serviceType=%v]", serviceType) } @@ -155,7 +160,7 @@ func ServiceIdParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) } // Finish initializing - _child.InitializeParent(_child) +_child.InitializeParent(_child ) return _child, nil } @@ -165,7 +170,7 @@ func (pm *_ServiceId) SerializeParent(ctx context.Context, writeBuffer utils.Wri _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("ServiceId"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("ServiceId"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for ServiceId") } @@ -188,6 +193,7 @@ func (pm *_ServiceId) SerializeParent(ctx context.Context, writeBuffer utils.Wri return nil } + func (m *_ServiceId) isServiceId() bool { return true } @@ -202,3 +208,6 @@ func (m *_ServiceId) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/Status.go b/plc4go/protocols/knxnetip/readwrite/model/Status.go index 9769083e30d..6cab6b7eec3 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/Status.go +++ b/plc4go/protocols/knxnetip/readwrite/model/Status.go @@ -34,26 +34,26 @@ type IStatus interface { utils.Serializable } -const ( - Status_NO_ERROR Status = 0x00 - Status_PROTOCOL_TYPE_NOT_SUPPORTED Status = 0x01 - Status_UNSUPPORTED_PROTOCOL_VERSION Status = 0x02 - Status_OUT_OF_ORDER_SEQUENCE_NUMBER Status = 0x04 - Status_INVALID_CONNECTION_ID Status = 0x21 - Status_CONNECTION_TYPE_NOT_SUPPORTED Status = 0x22 +const( + Status_NO_ERROR Status = 0x00 + Status_PROTOCOL_TYPE_NOT_SUPPORTED Status = 0x01 + Status_UNSUPPORTED_PROTOCOL_VERSION Status = 0x02 + Status_OUT_OF_ORDER_SEQUENCE_NUMBER Status = 0x04 + Status_INVALID_CONNECTION_ID Status = 0x21 + Status_CONNECTION_TYPE_NOT_SUPPORTED Status = 0x22 Status_CONNECTION_OPTION_NOT_SUPPORTED Status = 0x23 - Status_NO_MORE_CONNECTIONS Status = 0x24 - Status_NO_MORE_UNIQUE_CONNECTIONS Status = 0x25 - Status_DATA_CONNECTION Status = 0x26 - Status_KNX_CONNECTION Status = 0x27 - Status_TUNNELLING_LAYER_NOT_SUPPORTED Status = 0x29 + Status_NO_MORE_CONNECTIONS Status = 0x24 + Status_NO_MORE_UNIQUE_CONNECTIONS Status = 0x25 + Status_DATA_CONNECTION Status = 0x26 + Status_KNX_CONNECTION Status = 0x27 + Status_TUNNELLING_LAYER_NOT_SUPPORTED Status = 0x29 ) var StatusValues []Status func init() { _ = errors.New - StatusValues = []Status{ + StatusValues = []Status { Status_NO_ERROR, Status_PROTOCOL_TYPE_NOT_SUPPORTED, Status_UNSUPPORTED_PROTOCOL_VERSION, @@ -71,30 +71,30 @@ func init() { func StatusByValue(value uint8) (enum Status, ok bool) { switch value { - case 0x00: - return Status_NO_ERROR, true - case 0x01: - return Status_PROTOCOL_TYPE_NOT_SUPPORTED, true - case 0x02: - return Status_UNSUPPORTED_PROTOCOL_VERSION, true - case 0x04: - return Status_OUT_OF_ORDER_SEQUENCE_NUMBER, true - case 0x21: - return Status_INVALID_CONNECTION_ID, true - case 0x22: - return Status_CONNECTION_TYPE_NOT_SUPPORTED, true - case 0x23: - return Status_CONNECTION_OPTION_NOT_SUPPORTED, true - case 0x24: - return Status_NO_MORE_CONNECTIONS, true - case 0x25: - return Status_NO_MORE_UNIQUE_CONNECTIONS, true - case 0x26: - return Status_DATA_CONNECTION, true - case 0x27: - return Status_KNX_CONNECTION, true - case 0x29: - return Status_TUNNELLING_LAYER_NOT_SUPPORTED, true + case 0x00: + return Status_NO_ERROR, true + case 0x01: + return Status_PROTOCOL_TYPE_NOT_SUPPORTED, true + case 0x02: + return Status_UNSUPPORTED_PROTOCOL_VERSION, true + case 0x04: + return Status_OUT_OF_ORDER_SEQUENCE_NUMBER, true + case 0x21: + return Status_INVALID_CONNECTION_ID, true + case 0x22: + return Status_CONNECTION_TYPE_NOT_SUPPORTED, true + case 0x23: + return Status_CONNECTION_OPTION_NOT_SUPPORTED, true + case 0x24: + return Status_NO_MORE_CONNECTIONS, true + case 0x25: + return Status_NO_MORE_UNIQUE_CONNECTIONS, true + case 0x26: + return Status_DATA_CONNECTION, true + case 0x27: + return Status_KNX_CONNECTION, true + case 0x29: + return Status_TUNNELLING_LAYER_NOT_SUPPORTED, true } return 0, false } @@ -129,13 +129,13 @@ func StatusByName(value string) (enum Status, ok bool) { return 0, false } -func StatusKnows(value uint8) bool { +func StatusKnows(value uint8) bool { for _, typeValue := range StatusValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastStatus(structType interface{}) Status { @@ -219,3 +219,4 @@ func (e Status) PLC4XEnumName() string { func (e Status) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/knxnetip/readwrite/model/SupportedPhysicalMedia.go b/plc4go/protocols/knxnetip/readwrite/model/SupportedPhysicalMedia.go index d1934f34075..731059a88a1 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/SupportedPhysicalMedia.go +++ b/plc4go/protocols/knxnetip/readwrite/model/SupportedPhysicalMedia.go @@ -36,35 +36,35 @@ type ISupportedPhysicalMedia interface { Description() string } -const ( - SupportedPhysicalMedia_OTHER SupportedPhysicalMedia = 0x00 - SupportedPhysicalMedia_OIL_METER SupportedPhysicalMedia = 0x01 - SupportedPhysicalMedia_ELECTRICITY_METER SupportedPhysicalMedia = 0x02 - SupportedPhysicalMedia_GAS_METER SupportedPhysicalMedia = 0x03 - SupportedPhysicalMedia_HEAT_METER SupportedPhysicalMedia = 0x04 - SupportedPhysicalMedia_STEAM_METER SupportedPhysicalMedia = 0x05 - SupportedPhysicalMedia_WARM_WATER_METER SupportedPhysicalMedia = 0x06 - SupportedPhysicalMedia_WATER_METER SupportedPhysicalMedia = 0x07 - SupportedPhysicalMedia_HEAT_COST_ALLOCATOR SupportedPhysicalMedia = 0x08 - SupportedPhysicalMedia_COMPRESSED_AIR SupportedPhysicalMedia = 0x09 - SupportedPhysicalMedia_COOLING_LOAD_METER_INLET SupportedPhysicalMedia = 0x0A +const( + SupportedPhysicalMedia_OTHER SupportedPhysicalMedia = 0x00 + SupportedPhysicalMedia_OIL_METER SupportedPhysicalMedia = 0x01 + SupportedPhysicalMedia_ELECTRICITY_METER SupportedPhysicalMedia = 0x02 + SupportedPhysicalMedia_GAS_METER SupportedPhysicalMedia = 0x03 + SupportedPhysicalMedia_HEAT_METER SupportedPhysicalMedia = 0x04 + SupportedPhysicalMedia_STEAM_METER SupportedPhysicalMedia = 0x05 + SupportedPhysicalMedia_WARM_WATER_METER SupportedPhysicalMedia = 0x06 + SupportedPhysicalMedia_WATER_METER SupportedPhysicalMedia = 0x07 + SupportedPhysicalMedia_HEAT_COST_ALLOCATOR SupportedPhysicalMedia = 0x08 + SupportedPhysicalMedia_COMPRESSED_AIR SupportedPhysicalMedia = 0x09 + SupportedPhysicalMedia_COOLING_LOAD_METER_INLET SupportedPhysicalMedia = 0x0A SupportedPhysicalMedia_COOLING_LOAD_METER_OUTLET SupportedPhysicalMedia = 0x0B - SupportedPhysicalMedia_HEAT_INLET SupportedPhysicalMedia = 0x0C - SupportedPhysicalMedia_HEAT_AND_COOL SupportedPhysicalMedia = 0x0D - SupportedPhysicalMedia_BUS_OR_SYSTEM SupportedPhysicalMedia = 0x0E - SupportedPhysicalMedia_UNKNOWN_DEVICE_TYPE SupportedPhysicalMedia = 0x0F - SupportedPhysicalMedia_BREAKER SupportedPhysicalMedia = 0x20 - SupportedPhysicalMedia_VALVE SupportedPhysicalMedia = 0x21 - SupportedPhysicalMedia_WASTE_WATER_METER SupportedPhysicalMedia = 0x28 - SupportedPhysicalMedia_GARBAGE SupportedPhysicalMedia = 0x29 - SupportedPhysicalMedia_RADIO_CONVERTER SupportedPhysicalMedia = 0x37 + SupportedPhysicalMedia_HEAT_INLET SupportedPhysicalMedia = 0x0C + SupportedPhysicalMedia_HEAT_AND_COOL SupportedPhysicalMedia = 0x0D + SupportedPhysicalMedia_BUS_OR_SYSTEM SupportedPhysicalMedia = 0x0E + SupportedPhysicalMedia_UNKNOWN_DEVICE_TYPE SupportedPhysicalMedia = 0x0F + SupportedPhysicalMedia_BREAKER SupportedPhysicalMedia = 0x20 + SupportedPhysicalMedia_VALVE SupportedPhysicalMedia = 0x21 + SupportedPhysicalMedia_WASTE_WATER_METER SupportedPhysicalMedia = 0x28 + SupportedPhysicalMedia_GARBAGE SupportedPhysicalMedia = 0x29 + SupportedPhysicalMedia_RADIO_CONVERTER SupportedPhysicalMedia = 0x37 ) var SupportedPhysicalMediaValues []SupportedPhysicalMedia func init() { _ = errors.New - SupportedPhysicalMediaValues = []SupportedPhysicalMedia{ + SupportedPhysicalMediaValues = []SupportedPhysicalMedia { SupportedPhysicalMedia_OTHER, SupportedPhysicalMedia_OIL_METER, SupportedPhysicalMedia_ELECTRICITY_METER, @@ -89,94 +89,73 @@ func init() { } } + func (e SupportedPhysicalMedia) KnxSupport() bool { - switch e { - case 0x00: - { /* '0x00' */ - return true + switch e { + case 0x00: { /* '0x00' */ + return true } - case 0x01: - { /* '0x01' */ - return true + case 0x01: { /* '0x01' */ + return true } - case 0x02: - { /* '0x02' */ - return true + case 0x02: { /* '0x02' */ + return true } - case 0x03: - { /* '0x03' */ - return true + case 0x03: { /* '0x03' */ + return true } - case 0x04: - { /* '0x04' */ - return true + case 0x04: { /* '0x04' */ + return true } - case 0x05: - { /* '0x05' */ - return true + case 0x05: { /* '0x05' */ + return true } - case 0x06: - { /* '0x06' */ - return true + case 0x06: { /* '0x06' */ + return true } - case 0x07: - { /* '0x07' */ - return true + case 0x07: { /* '0x07' */ + return true } - case 0x08: - { /* '0x08' */ - return true + case 0x08: { /* '0x08' */ + return true } - case 0x09: - { /* '0x09' */ - return false + case 0x09: { /* '0x09' */ + return false } - case 0x0A: - { /* '0x0A' */ - return true + case 0x0A: { /* '0x0A' */ + return true } - case 0x0B: - { /* '0x0B' */ - return true + case 0x0B: { /* '0x0B' */ + return true } - case 0x0C: - { /* '0x0C' */ - return true + case 0x0C: { /* '0x0C' */ + return true } - case 0x0D: - { /* '0x0D' */ - return true + case 0x0D: { /* '0x0D' */ + return true } - case 0x0E: - { /* '0x0E' */ - return false + case 0x0E: { /* '0x0E' */ + return false } - case 0x0F: - { /* '0x0F' */ - return false + case 0x0F: { /* '0x0F' */ + return false } - case 0x20: - { /* '0x20' */ - return true + case 0x20: { /* '0x20' */ + return true } - case 0x21: - { /* '0x21' */ - return true + case 0x21: { /* '0x21' */ + return true } - case 0x28: - { /* '0x28' */ - return true + case 0x28: { /* '0x28' */ + return true } - case 0x29: - { /* '0x29' */ - return true + case 0x29: { /* '0x29' */ + return true } - case 0x37: - { /* '0x37' */ - return false + case 0x37: { /* '0x37' */ + return false } - default: - { + default: { return false } } @@ -192,93 +171,71 @@ func SupportedPhysicalMediaFirstEnumForFieldKnxSupport(value bool) (SupportedPhy } func (e SupportedPhysicalMedia) Description() string { - switch e { - case 0x00: - { /* '0x00' */ - return "used_for_undefined_physical_medium" + switch e { + case 0x00: { /* '0x00' */ + return "used_for_undefined_physical_medium" } - case 0x01: - { /* '0x01' */ - return "measures_volume_of_oil" + case 0x01: { /* '0x01' */ + return "measures_volume_of_oil" } - case 0x02: - { /* '0x02' */ - return "measures_electric_energy" + case 0x02: { /* '0x02' */ + return "measures_electric_energy" } - case 0x03: - { /* '0x03' */ - return "measures_volume_of_gaseous_energy" + case 0x03: { /* '0x03' */ + return "measures_volume_of_gaseous_energy" } - case 0x04: - { /* '0x04' */ - return "heat_energy_measured_in_outlet_pipe" + case 0x04: { /* '0x04' */ + return "heat_energy_measured_in_outlet_pipe" } - case 0x05: - { /* '0x05' */ - return "measures_weight_of_hot_steam" + case 0x05: { /* '0x05' */ + return "measures_weight_of_hot_steam" } - case 0x06: - { /* '0x06' */ - return "measured_heated_water_volume" + case 0x06: { /* '0x06' */ + return "measured_heated_water_volume" } - case 0x07: - { /* '0x07' */ - return "measured_water_volume" + case 0x07: { /* '0x07' */ + return "measured_water_volume" } - case 0x08: - { /* '0x08' */ - return "measured_relative_cumulated_heat_consumption" + case 0x08: { /* '0x08' */ + return "measured_relative_cumulated_heat_consumption" } - case 0x09: - { /* '0x09' */ - return "measures_weight_of_compressed_air" + case 0x09: { /* '0x09' */ + return "measures_weight_of_compressed_air" } - case 0x0A: - { /* '0x0A' */ - return "cooling_energy_measured_in_inlet_pipe" + case 0x0A: { /* '0x0A' */ + return "cooling_energy_measured_in_inlet_pipe" } - case 0x0B: - { /* '0x0B' */ - return "cooling_energy_measured_in_outlet_pipe" + case 0x0B: { /* '0x0B' */ + return "cooling_energy_measured_in_outlet_pipe" } - case 0x0C: - { /* '0x0C' */ - return "heat_energy_measured_in_inlet_pipe" + case 0x0C: { /* '0x0C' */ + return "heat_energy_measured_in_inlet_pipe" } - case 0x0D: - { /* '0x0D' */ - return "measures_both_heat_and_cool" + case 0x0D: { /* '0x0D' */ + return "measures_both_heat_and_cool" } - case 0x0E: - { /* '0x0E' */ - return "no_meter" + case 0x0E: { /* '0x0E' */ + return "no_meter" } - case 0x0F: - { /* '0x0F' */ - return "used_for_undefined_physical_medium" + case 0x0F: { /* '0x0F' */ + return "used_for_undefined_physical_medium" } - case 0x20: - { /* '0x20' */ - return "status_of_electric_energy_supply" + case 0x20: { /* '0x20' */ + return "status_of_electric_energy_supply" } - case 0x21: - { /* '0x21' */ - return "status_of_supply_of_Gas_or_water" + case 0x21: { /* '0x21' */ + return "status_of_supply_of_Gas_or_water" } - case 0x28: - { /* '0x28' */ - return "measured_volume_of_disposed_water" + case 0x28: { /* '0x28' */ + return "measured_volume_of_disposed_water" } - case 0x29: - { /* '0x29' */ - return "measured_weight_of_disposed_rubbish" + case 0x29: { /* '0x29' */ + return "measured_weight_of_disposed_rubbish" } - case 0x37: - { /* '0x37' */ - return "enables_the_radio_transmission_of_a_meter_without_a_radio_interface" + case 0x37: { /* '0x37' */ + return "enables_the_radio_transmission_of_a_meter_without_a_radio_interface" } - default: - { + default: { return "" } } @@ -294,48 +251,48 @@ func SupportedPhysicalMediaFirstEnumForFieldDescription(value string) (Supported } func SupportedPhysicalMediaByValue(value uint8) (enum SupportedPhysicalMedia, ok bool) { switch value { - case 0x00: - return SupportedPhysicalMedia_OTHER, true - case 0x01: - return SupportedPhysicalMedia_OIL_METER, true - case 0x02: - return SupportedPhysicalMedia_ELECTRICITY_METER, true - case 0x03: - return SupportedPhysicalMedia_GAS_METER, true - case 0x04: - return SupportedPhysicalMedia_HEAT_METER, true - case 0x05: - return SupportedPhysicalMedia_STEAM_METER, true - case 0x06: - return SupportedPhysicalMedia_WARM_WATER_METER, true - case 0x07: - return SupportedPhysicalMedia_WATER_METER, true - case 0x08: - return SupportedPhysicalMedia_HEAT_COST_ALLOCATOR, true - case 0x09: - return SupportedPhysicalMedia_COMPRESSED_AIR, true - case 0x0A: - return SupportedPhysicalMedia_COOLING_LOAD_METER_INLET, true - case 0x0B: - return SupportedPhysicalMedia_COOLING_LOAD_METER_OUTLET, true - case 0x0C: - return SupportedPhysicalMedia_HEAT_INLET, true - case 0x0D: - return SupportedPhysicalMedia_HEAT_AND_COOL, true - case 0x0E: - return SupportedPhysicalMedia_BUS_OR_SYSTEM, true - case 0x0F: - return SupportedPhysicalMedia_UNKNOWN_DEVICE_TYPE, true - case 0x20: - return SupportedPhysicalMedia_BREAKER, true - case 0x21: - return SupportedPhysicalMedia_VALVE, true - case 0x28: - return SupportedPhysicalMedia_WASTE_WATER_METER, true - case 0x29: - return SupportedPhysicalMedia_GARBAGE, true - case 0x37: - return SupportedPhysicalMedia_RADIO_CONVERTER, true + case 0x00: + return SupportedPhysicalMedia_OTHER, true + case 0x01: + return SupportedPhysicalMedia_OIL_METER, true + case 0x02: + return SupportedPhysicalMedia_ELECTRICITY_METER, true + case 0x03: + return SupportedPhysicalMedia_GAS_METER, true + case 0x04: + return SupportedPhysicalMedia_HEAT_METER, true + case 0x05: + return SupportedPhysicalMedia_STEAM_METER, true + case 0x06: + return SupportedPhysicalMedia_WARM_WATER_METER, true + case 0x07: + return SupportedPhysicalMedia_WATER_METER, true + case 0x08: + return SupportedPhysicalMedia_HEAT_COST_ALLOCATOR, true + case 0x09: + return SupportedPhysicalMedia_COMPRESSED_AIR, true + case 0x0A: + return SupportedPhysicalMedia_COOLING_LOAD_METER_INLET, true + case 0x0B: + return SupportedPhysicalMedia_COOLING_LOAD_METER_OUTLET, true + case 0x0C: + return SupportedPhysicalMedia_HEAT_INLET, true + case 0x0D: + return SupportedPhysicalMedia_HEAT_AND_COOL, true + case 0x0E: + return SupportedPhysicalMedia_BUS_OR_SYSTEM, true + case 0x0F: + return SupportedPhysicalMedia_UNKNOWN_DEVICE_TYPE, true + case 0x20: + return SupportedPhysicalMedia_BREAKER, true + case 0x21: + return SupportedPhysicalMedia_VALVE, true + case 0x28: + return SupportedPhysicalMedia_WASTE_WATER_METER, true + case 0x29: + return SupportedPhysicalMedia_GARBAGE, true + case 0x37: + return SupportedPhysicalMedia_RADIO_CONVERTER, true } return 0, false } @@ -388,13 +345,13 @@ func SupportedPhysicalMediaByName(value string) (enum SupportedPhysicalMedia, ok return 0, false } -func SupportedPhysicalMediaKnows(value uint8) bool { +func SupportedPhysicalMediaKnows(value uint8) bool { for _, typeValue := range SupportedPhysicalMediaValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastSupportedPhysicalMedia(structType interface{}) SupportedPhysicalMedia { @@ -496,3 +453,4 @@ func (e SupportedPhysicalMedia) PLC4XEnumName() string { func (e SupportedPhysicalMedia) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/knxnetip/readwrite/model/TDataConnectedInd.go b/plc4go/protocols/knxnetip/readwrite/model/TDataConnectedInd.go index 31bf0798f8e..095700620b4 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/TDataConnectedInd.go +++ b/plc4go/protocols/knxnetip/readwrite/model/TDataConnectedInd.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // TDataConnectedInd is the corresponding interface of TDataConnectedInd type TDataConnectedInd interface { @@ -46,30 +48,32 @@ type _TDataConnectedInd struct { *_CEMI } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_TDataConnectedInd) GetMessageCode() uint8 { - return 0x89 -} +func (m *_TDataConnectedInd) GetMessageCode() uint8 { +return 0x89} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_TDataConnectedInd) InitializeParent(parent CEMI) {} +func (m *_TDataConnectedInd) InitializeParent(parent CEMI ) {} -func (m *_TDataConnectedInd) GetParent() CEMI { +func (m *_TDataConnectedInd) GetParent() CEMI { return m._CEMI } + // NewTDataConnectedInd factory function for _TDataConnectedInd -func NewTDataConnectedInd(size uint16) *_TDataConnectedInd { +func NewTDataConnectedInd( size uint16 ) *_TDataConnectedInd { _result := &_TDataConnectedInd{ - _CEMI: NewCEMI(size), + _CEMI: NewCEMI(size), } _result._CEMI._CEMIChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewTDataConnectedInd(size uint16) *_TDataConnectedInd { // Deprecated: use the interface for direct cast func CastTDataConnectedInd(structType interface{}) TDataConnectedInd { - if casted, ok := structType.(TDataConnectedInd); ok { + if casted, ok := structType.(TDataConnectedInd); ok { return casted } if casted, ok := structType.(*TDataConnectedInd); ok { @@ -96,6 +100,7 @@ func (m *_TDataConnectedInd) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_TDataConnectedInd) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_TDataConnectedInd) SerializeWithWriteBuffer(ctx context.Context, write return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_TDataConnectedInd) isTDataConnectedInd() bool { return true } @@ -165,3 +171,6 @@ func (m *_TDataConnectedInd) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/TDataConnectedReq.go b/plc4go/protocols/knxnetip/readwrite/model/TDataConnectedReq.go index 4c5e0c15db7..08ebe801646 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/TDataConnectedReq.go +++ b/plc4go/protocols/knxnetip/readwrite/model/TDataConnectedReq.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // TDataConnectedReq is the corresponding interface of TDataConnectedReq type TDataConnectedReq interface { @@ -46,30 +48,32 @@ type _TDataConnectedReq struct { *_CEMI } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_TDataConnectedReq) GetMessageCode() uint8 { - return 0x41 -} +func (m *_TDataConnectedReq) GetMessageCode() uint8 { +return 0x41} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_TDataConnectedReq) InitializeParent(parent CEMI) {} +func (m *_TDataConnectedReq) InitializeParent(parent CEMI ) {} -func (m *_TDataConnectedReq) GetParent() CEMI { +func (m *_TDataConnectedReq) GetParent() CEMI { return m._CEMI } + // NewTDataConnectedReq factory function for _TDataConnectedReq -func NewTDataConnectedReq(size uint16) *_TDataConnectedReq { +func NewTDataConnectedReq( size uint16 ) *_TDataConnectedReq { _result := &_TDataConnectedReq{ - _CEMI: NewCEMI(size), + _CEMI: NewCEMI(size), } _result._CEMI._CEMIChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewTDataConnectedReq(size uint16) *_TDataConnectedReq { // Deprecated: use the interface for direct cast func CastTDataConnectedReq(structType interface{}) TDataConnectedReq { - if casted, ok := structType.(TDataConnectedReq); ok { + if casted, ok := structType.(TDataConnectedReq); ok { return casted } if casted, ok := structType.(*TDataConnectedReq); ok { @@ -96,6 +100,7 @@ func (m *_TDataConnectedReq) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_TDataConnectedReq) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_TDataConnectedReq) SerializeWithWriteBuffer(ctx context.Context, write return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_TDataConnectedReq) isTDataConnectedReq() bool { return true } @@ -165,3 +171,6 @@ func (m *_TDataConnectedReq) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/TDataIndividualInd.go b/plc4go/protocols/knxnetip/readwrite/model/TDataIndividualInd.go index a41d3c51aa2..81bffd026d3 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/TDataIndividualInd.go +++ b/plc4go/protocols/knxnetip/readwrite/model/TDataIndividualInd.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // TDataIndividualInd is the corresponding interface of TDataIndividualInd type TDataIndividualInd interface { @@ -46,30 +48,32 @@ type _TDataIndividualInd struct { *_CEMI } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_TDataIndividualInd) GetMessageCode() uint8 { - return 0x94 -} +func (m *_TDataIndividualInd) GetMessageCode() uint8 { +return 0x94} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_TDataIndividualInd) InitializeParent(parent CEMI) {} +func (m *_TDataIndividualInd) InitializeParent(parent CEMI ) {} -func (m *_TDataIndividualInd) GetParent() CEMI { +func (m *_TDataIndividualInd) GetParent() CEMI { return m._CEMI } + // NewTDataIndividualInd factory function for _TDataIndividualInd -func NewTDataIndividualInd(size uint16) *_TDataIndividualInd { +func NewTDataIndividualInd( size uint16 ) *_TDataIndividualInd { _result := &_TDataIndividualInd{ - _CEMI: NewCEMI(size), + _CEMI: NewCEMI(size), } _result._CEMI._CEMIChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewTDataIndividualInd(size uint16) *_TDataIndividualInd { // Deprecated: use the interface for direct cast func CastTDataIndividualInd(structType interface{}) TDataIndividualInd { - if casted, ok := structType.(TDataIndividualInd); ok { + if casted, ok := structType.(TDataIndividualInd); ok { return casted } if casted, ok := structType.(*TDataIndividualInd); ok { @@ -96,6 +100,7 @@ func (m *_TDataIndividualInd) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_TDataIndividualInd) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_TDataIndividualInd) SerializeWithWriteBuffer(ctx context.Context, writ return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_TDataIndividualInd) isTDataIndividualInd() bool { return true } @@ -165,3 +171,6 @@ func (m *_TDataIndividualInd) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/TDataIndividualReq.go b/plc4go/protocols/knxnetip/readwrite/model/TDataIndividualReq.go index bd4e3310f0b..168ed45d6a5 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/TDataIndividualReq.go +++ b/plc4go/protocols/knxnetip/readwrite/model/TDataIndividualReq.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // TDataIndividualReq is the corresponding interface of TDataIndividualReq type TDataIndividualReq interface { @@ -46,30 +48,32 @@ type _TDataIndividualReq struct { *_CEMI } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_TDataIndividualReq) GetMessageCode() uint8 { - return 0x4A -} +func (m *_TDataIndividualReq) GetMessageCode() uint8 { +return 0x4A} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_TDataIndividualReq) InitializeParent(parent CEMI) {} +func (m *_TDataIndividualReq) InitializeParent(parent CEMI ) {} -func (m *_TDataIndividualReq) GetParent() CEMI { +func (m *_TDataIndividualReq) GetParent() CEMI { return m._CEMI } + // NewTDataIndividualReq factory function for _TDataIndividualReq -func NewTDataIndividualReq(size uint16) *_TDataIndividualReq { +func NewTDataIndividualReq( size uint16 ) *_TDataIndividualReq { _result := &_TDataIndividualReq{ - _CEMI: NewCEMI(size), + _CEMI: NewCEMI(size), } _result._CEMI._CEMIChildRequirements = _result return _result @@ -77,7 +81,7 @@ func NewTDataIndividualReq(size uint16) *_TDataIndividualReq { // Deprecated: use the interface for direct cast func CastTDataIndividualReq(structType interface{}) TDataIndividualReq { - if casted, ok := structType.(TDataIndividualReq); ok { + if casted, ok := structType.(TDataIndividualReq); ok { return casted } if casted, ok := structType.(*TDataIndividualReq); ok { @@ -96,6 +100,7 @@ func (m *_TDataIndividualReq) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_TDataIndividualReq) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -151,6 +156,7 @@ func (m *_TDataIndividualReq) SerializeWithWriteBuffer(ctx context.Context, writ return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_TDataIndividualReq) isTDataIndividualReq() bool { return true } @@ -165,3 +171,6 @@ func (m *_TDataIndividualReq) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/TunnelingRequest.go b/plc4go/protocols/knxnetip/readwrite/model/TunnelingRequest.go index 75f989da0c9..7226d8387c3 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/TunnelingRequest.go +++ b/plc4go/protocols/knxnetip/readwrite/model/TunnelingRequest.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // TunnelingRequest is the corresponding interface of TunnelingRequest type TunnelingRequest interface { @@ -49,33 +51,33 @@ type TunnelingRequestExactly interface { // _TunnelingRequest is the data-structure of this message type _TunnelingRequest struct { *_KnxNetIpMessage - TunnelingRequestDataBlock TunnelingRequestDataBlock - Cemi CEMI + TunnelingRequestDataBlock TunnelingRequestDataBlock + Cemi CEMI // Arguments. TotalLength uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_TunnelingRequest) GetMsgType() uint16 { - return 0x0420 -} +func (m *_TunnelingRequest) GetMsgType() uint16 { +return 0x0420} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_TunnelingRequest) InitializeParent(parent KnxNetIpMessage) {} +func (m *_TunnelingRequest) InitializeParent(parent KnxNetIpMessage ) {} -func (m *_TunnelingRequest) GetParent() KnxNetIpMessage { +func (m *_TunnelingRequest) GetParent() KnxNetIpMessage { return m._KnxNetIpMessage } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -94,12 +96,13 @@ func (m *_TunnelingRequest) GetCemi() CEMI { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewTunnelingRequest factory function for _TunnelingRequest -func NewTunnelingRequest(tunnelingRequestDataBlock TunnelingRequestDataBlock, cemi CEMI, totalLength uint16) *_TunnelingRequest { +func NewTunnelingRequest( tunnelingRequestDataBlock TunnelingRequestDataBlock , cemi CEMI , totalLength uint16 ) *_TunnelingRequest { _result := &_TunnelingRequest{ TunnelingRequestDataBlock: tunnelingRequestDataBlock, - Cemi: cemi, - _KnxNetIpMessage: NewKnxNetIpMessage(), + Cemi: cemi, + _KnxNetIpMessage: NewKnxNetIpMessage(), } _result._KnxNetIpMessage._KnxNetIpMessageChildRequirements = _result return _result @@ -107,7 +110,7 @@ func NewTunnelingRequest(tunnelingRequestDataBlock TunnelingRequestDataBlock, ce // Deprecated: use the interface for direct cast func CastTunnelingRequest(structType interface{}) TunnelingRequest { - if casted, ok := structType.(TunnelingRequest); ok { + if casted, ok := structType.(TunnelingRequest); ok { return casted } if casted, ok := structType.(*TunnelingRequest); ok { @@ -132,6 +135,7 @@ func (m *_TunnelingRequest) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_TunnelingRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -153,7 +157,7 @@ func TunnelingRequestParseWithBuffer(ctx context.Context, readBuffer utils.ReadB if pullErr := readBuffer.PullContext("tunnelingRequestDataBlock"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for tunnelingRequestDataBlock") } - _tunnelingRequestDataBlock, _tunnelingRequestDataBlockErr := TunnelingRequestDataBlockParseWithBuffer(ctx, readBuffer) +_tunnelingRequestDataBlock, _tunnelingRequestDataBlockErr := TunnelingRequestDataBlockParseWithBuffer(ctx, readBuffer) if _tunnelingRequestDataBlockErr != nil { return nil, errors.Wrap(_tunnelingRequestDataBlockErr, "Error parsing 'tunnelingRequestDataBlock' field of TunnelingRequest") } @@ -166,7 +170,7 @@ func TunnelingRequestParseWithBuffer(ctx context.Context, readBuffer utils.ReadB if pullErr := readBuffer.PullContext("cemi"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for cemi") } - _cemi, _cemiErr := CEMIParseWithBuffer(ctx, readBuffer, uint16(uint16(totalLength)-uint16((uint16(uint16(6))+uint16(tunnelingRequestDataBlock.GetLengthInBytes(ctx)))))) +_cemi, _cemiErr := CEMIParseWithBuffer(ctx, readBuffer , uint16( uint16(totalLength) - uint16((uint16(uint16(6)) + uint16(tunnelingRequestDataBlock.GetLengthInBytes(ctx)))) ) ) if _cemiErr != nil { return nil, errors.Wrap(_cemiErr, "Error parsing 'cemi' field of TunnelingRequest") } @@ -181,9 +185,10 @@ func TunnelingRequestParseWithBuffer(ctx context.Context, readBuffer utils.ReadB // Create a partially initialized instance _child := &_TunnelingRequest{ - _KnxNetIpMessage: &_KnxNetIpMessage{}, + _KnxNetIpMessage: &_KnxNetIpMessage{ + }, TunnelingRequestDataBlock: tunnelingRequestDataBlock, - Cemi: cemi, + Cemi: cemi, } _child._KnxNetIpMessage._KnxNetIpMessageChildRequirements = _child return _child, nil @@ -205,29 +210,29 @@ func (m *_TunnelingRequest) SerializeWithWriteBuffer(ctx context.Context, writeB return errors.Wrap(pushErr, "Error pushing for TunnelingRequest") } - // Simple Field (tunnelingRequestDataBlock) - if pushErr := writeBuffer.PushContext("tunnelingRequestDataBlock"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for tunnelingRequestDataBlock") - } - _tunnelingRequestDataBlockErr := writeBuffer.WriteSerializable(ctx, m.GetTunnelingRequestDataBlock()) - if popErr := writeBuffer.PopContext("tunnelingRequestDataBlock"); popErr != nil { - return errors.Wrap(popErr, "Error popping for tunnelingRequestDataBlock") - } - if _tunnelingRequestDataBlockErr != nil { - return errors.Wrap(_tunnelingRequestDataBlockErr, "Error serializing 'tunnelingRequestDataBlock' field") - } + // Simple Field (tunnelingRequestDataBlock) + if pushErr := writeBuffer.PushContext("tunnelingRequestDataBlock"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for tunnelingRequestDataBlock") + } + _tunnelingRequestDataBlockErr := writeBuffer.WriteSerializable(ctx, m.GetTunnelingRequestDataBlock()) + if popErr := writeBuffer.PopContext("tunnelingRequestDataBlock"); popErr != nil { + return errors.Wrap(popErr, "Error popping for tunnelingRequestDataBlock") + } + if _tunnelingRequestDataBlockErr != nil { + return errors.Wrap(_tunnelingRequestDataBlockErr, "Error serializing 'tunnelingRequestDataBlock' field") + } - // Simple Field (cemi) - if pushErr := writeBuffer.PushContext("cemi"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for cemi") - } - _cemiErr := writeBuffer.WriteSerializable(ctx, m.GetCemi()) - if popErr := writeBuffer.PopContext("cemi"); popErr != nil { - return errors.Wrap(popErr, "Error popping for cemi") - } - if _cemiErr != nil { - return errors.Wrap(_cemiErr, "Error serializing 'cemi' field") - } + // Simple Field (cemi) + if pushErr := writeBuffer.PushContext("cemi"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for cemi") + } + _cemiErr := writeBuffer.WriteSerializable(ctx, m.GetCemi()) + if popErr := writeBuffer.PopContext("cemi"); popErr != nil { + return errors.Wrap(popErr, "Error popping for cemi") + } + if _cemiErr != nil { + return errors.Wrap(_cemiErr, "Error serializing 'cemi' field") + } if popErr := writeBuffer.PopContext("TunnelingRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for TunnelingRequest") @@ -237,13 +242,13 @@ func (m *_TunnelingRequest) SerializeWithWriteBuffer(ctx context.Context, writeB return m.SerializeParent(ctx, writeBuffer, m, ser) } + //// // Arguments Getter func (m *_TunnelingRequest) GetTotalLength() uint16 { return m.TotalLength } - // //// @@ -261,3 +266,6 @@ func (m *_TunnelingRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/TunnelingRequestDataBlock.go b/plc4go/protocols/knxnetip/readwrite/model/TunnelingRequestDataBlock.go index 7deef2e994c..72629df6e90 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/TunnelingRequestDataBlock.go +++ b/plc4go/protocols/knxnetip/readwrite/model/TunnelingRequestDataBlock.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // TunnelingRequestDataBlock is the corresponding interface of TunnelingRequestDataBlock type TunnelingRequestDataBlock interface { @@ -46,12 +48,13 @@ type TunnelingRequestDataBlockExactly interface { // _TunnelingRequestDataBlock is the data-structure of this message type _TunnelingRequestDataBlock struct { - CommunicationChannelId uint8 - SequenceCounter uint8 + CommunicationChannelId uint8 + SequenceCounter uint8 // Reserved Fields reservedField0 *uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -70,14 +73,15 @@ func (m *_TunnelingRequestDataBlock) GetSequenceCounter() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewTunnelingRequestDataBlock factory function for _TunnelingRequestDataBlock -func NewTunnelingRequestDataBlock(communicationChannelId uint8, sequenceCounter uint8) *_TunnelingRequestDataBlock { - return &_TunnelingRequestDataBlock{CommunicationChannelId: communicationChannelId, SequenceCounter: sequenceCounter} +func NewTunnelingRequestDataBlock( communicationChannelId uint8 , sequenceCounter uint8 ) *_TunnelingRequestDataBlock { +return &_TunnelingRequestDataBlock{ CommunicationChannelId: communicationChannelId , SequenceCounter: sequenceCounter } } // Deprecated: use the interface for direct cast func CastTunnelingRequestDataBlock(structType interface{}) TunnelingRequestDataBlock { - if casted, ok := structType.(TunnelingRequestDataBlock); ok { + if casted, ok := structType.(TunnelingRequestDataBlock); ok { return casted } if casted, ok := structType.(*TunnelingRequestDataBlock); ok { @@ -97,10 +101,10 @@ func (m *_TunnelingRequestDataBlock) GetLengthInBits(ctx context.Context) uint16 lengthInBits += 8 // Simple field (communicationChannelId) - lengthInBits += 8 + lengthInBits += 8; // Simple field (sequenceCounter) - lengthInBits += 8 + lengthInBits += 8; // Reserved Field (reserved) lengthInBits += 8 @@ -108,6 +112,7 @@ func (m *_TunnelingRequestDataBlock) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_TunnelingRequestDataBlock) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -133,14 +138,14 @@ func TunnelingRequestDataBlockParseWithBuffer(ctx context.Context, readBuffer ut } // Simple Field (communicationChannelId) - _communicationChannelId, _communicationChannelIdErr := readBuffer.ReadUint8("communicationChannelId", 8) +_communicationChannelId, _communicationChannelIdErr := readBuffer.ReadUint8("communicationChannelId", 8) if _communicationChannelIdErr != nil { return nil, errors.Wrap(_communicationChannelIdErr, "Error parsing 'communicationChannelId' field of TunnelingRequestDataBlock") } communicationChannelId := _communicationChannelId // Simple Field (sequenceCounter) - _sequenceCounter, _sequenceCounterErr := readBuffer.ReadUint8("sequenceCounter", 8) +_sequenceCounter, _sequenceCounterErr := readBuffer.ReadUint8("sequenceCounter", 8) if _sequenceCounterErr != nil { return nil, errors.Wrap(_sequenceCounterErr, "Error parsing 'sequenceCounter' field of TunnelingRequestDataBlock") } @@ -156,7 +161,7 @@ func TunnelingRequestDataBlockParseWithBuffer(ctx context.Context, readBuffer ut if reserved != uint8(0x00) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -169,10 +174,10 @@ func TunnelingRequestDataBlockParseWithBuffer(ctx context.Context, readBuffer ut // Create the instance return &_TunnelingRequestDataBlock{ - CommunicationChannelId: communicationChannelId, - SequenceCounter: sequenceCounter, - reservedField0: reservedField0, - }, nil + CommunicationChannelId: communicationChannelId, + SequenceCounter: sequenceCounter, + reservedField0: reservedField0, + }, nil } func (m *_TunnelingRequestDataBlock) Serialize() ([]byte, error) { @@ -186,7 +191,7 @@ func (m *_TunnelingRequestDataBlock) Serialize() ([]byte, error) { func (m *_TunnelingRequestDataBlock) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("TunnelingRequestDataBlock"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("TunnelingRequestDataBlock"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for TunnelingRequestDataBlock") } @@ -217,7 +222,7 @@ func (m *_TunnelingRequestDataBlock) SerializeWithWriteBuffer(ctx context.Contex if m.reservedField0 != nil { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Overriding reserved field with unexpected value.") reserved = *m.reservedField0 } @@ -233,6 +238,7 @@ func (m *_TunnelingRequestDataBlock) SerializeWithWriteBuffer(ctx context.Contex return nil } + func (m *_TunnelingRequestDataBlock) isTunnelingRequestDataBlock() bool { return true } @@ -247,3 +253,6 @@ func (m *_TunnelingRequestDataBlock) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/TunnelingResponse.go b/plc4go/protocols/knxnetip/readwrite/model/TunnelingResponse.go index 647eff45949..db0bd4b66bc 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/TunnelingResponse.go +++ b/plc4go/protocols/knxnetip/readwrite/model/TunnelingResponse.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // TunnelingResponse is the corresponding interface of TunnelingResponse type TunnelingResponse interface { @@ -47,29 +49,29 @@ type TunnelingResponseExactly interface { // _TunnelingResponse is the data-structure of this message type _TunnelingResponse struct { *_KnxNetIpMessage - TunnelingResponseDataBlock TunnelingResponseDataBlock + TunnelingResponseDataBlock TunnelingResponseDataBlock } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_TunnelingResponse) GetMsgType() uint16 { - return 0x0421 -} +func (m *_TunnelingResponse) GetMsgType() uint16 { +return 0x0421} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_TunnelingResponse) InitializeParent(parent KnxNetIpMessage) {} +func (m *_TunnelingResponse) InitializeParent(parent KnxNetIpMessage ) {} -func (m *_TunnelingResponse) GetParent() KnxNetIpMessage { +func (m *_TunnelingResponse) GetParent() KnxNetIpMessage { return m._KnxNetIpMessage } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -84,11 +86,12 @@ func (m *_TunnelingResponse) GetTunnelingResponseDataBlock() TunnelingResponseDa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewTunnelingResponse factory function for _TunnelingResponse -func NewTunnelingResponse(tunnelingResponseDataBlock TunnelingResponseDataBlock) *_TunnelingResponse { +func NewTunnelingResponse( tunnelingResponseDataBlock TunnelingResponseDataBlock ) *_TunnelingResponse { _result := &_TunnelingResponse{ TunnelingResponseDataBlock: tunnelingResponseDataBlock, - _KnxNetIpMessage: NewKnxNetIpMessage(), + _KnxNetIpMessage: NewKnxNetIpMessage(), } _result._KnxNetIpMessage._KnxNetIpMessageChildRequirements = _result return _result @@ -96,7 +99,7 @@ func NewTunnelingResponse(tunnelingResponseDataBlock TunnelingResponseDataBlock) // Deprecated: use the interface for direct cast func CastTunnelingResponse(structType interface{}) TunnelingResponse { - if casted, ok := structType.(TunnelingResponse); ok { + if casted, ok := structType.(TunnelingResponse); ok { return casted } if casted, ok := structType.(*TunnelingResponse); ok { @@ -118,6 +121,7 @@ func (m *_TunnelingResponse) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_TunnelingResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +143,7 @@ func TunnelingResponseParseWithBuffer(ctx context.Context, readBuffer utils.Read if pullErr := readBuffer.PullContext("tunnelingResponseDataBlock"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for tunnelingResponseDataBlock") } - _tunnelingResponseDataBlock, _tunnelingResponseDataBlockErr := TunnelingResponseDataBlockParseWithBuffer(ctx, readBuffer) +_tunnelingResponseDataBlock, _tunnelingResponseDataBlockErr := TunnelingResponseDataBlockParseWithBuffer(ctx, readBuffer) if _tunnelingResponseDataBlockErr != nil { return nil, errors.Wrap(_tunnelingResponseDataBlockErr, "Error parsing 'tunnelingResponseDataBlock' field of TunnelingResponse") } @@ -154,7 +158,8 @@ func TunnelingResponseParseWithBuffer(ctx context.Context, readBuffer utils.Read // Create a partially initialized instance _child := &_TunnelingResponse{ - _KnxNetIpMessage: &_KnxNetIpMessage{}, + _KnxNetIpMessage: &_KnxNetIpMessage{ + }, TunnelingResponseDataBlock: tunnelingResponseDataBlock, } _child._KnxNetIpMessage._KnxNetIpMessageChildRequirements = _child @@ -177,17 +182,17 @@ func (m *_TunnelingResponse) SerializeWithWriteBuffer(ctx context.Context, write return errors.Wrap(pushErr, "Error pushing for TunnelingResponse") } - // Simple Field (tunnelingResponseDataBlock) - if pushErr := writeBuffer.PushContext("tunnelingResponseDataBlock"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for tunnelingResponseDataBlock") - } - _tunnelingResponseDataBlockErr := writeBuffer.WriteSerializable(ctx, m.GetTunnelingResponseDataBlock()) - if popErr := writeBuffer.PopContext("tunnelingResponseDataBlock"); popErr != nil { - return errors.Wrap(popErr, "Error popping for tunnelingResponseDataBlock") - } - if _tunnelingResponseDataBlockErr != nil { - return errors.Wrap(_tunnelingResponseDataBlockErr, "Error serializing 'tunnelingResponseDataBlock' field") - } + // Simple Field (tunnelingResponseDataBlock) + if pushErr := writeBuffer.PushContext("tunnelingResponseDataBlock"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for tunnelingResponseDataBlock") + } + _tunnelingResponseDataBlockErr := writeBuffer.WriteSerializable(ctx, m.GetTunnelingResponseDataBlock()) + if popErr := writeBuffer.PopContext("tunnelingResponseDataBlock"); popErr != nil { + return errors.Wrap(popErr, "Error popping for tunnelingResponseDataBlock") + } + if _tunnelingResponseDataBlockErr != nil { + return errors.Wrap(_tunnelingResponseDataBlockErr, "Error serializing 'tunnelingResponseDataBlock' field") + } if popErr := writeBuffer.PopContext("TunnelingResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for TunnelingResponse") @@ -197,6 +202,7 @@ func (m *_TunnelingResponse) SerializeWithWriteBuffer(ctx context.Context, write return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_TunnelingResponse) isTunnelingResponse() bool { return true } @@ -211,3 +217,6 @@ func (m *_TunnelingResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/TunnelingResponseDataBlock.go b/plc4go/protocols/knxnetip/readwrite/model/TunnelingResponseDataBlock.go index bc968b29992..685e44098be 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/TunnelingResponseDataBlock.go +++ b/plc4go/protocols/knxnetip/readwrite/model/TunnelingResponseDataBlock.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // TunnelingResponseDataBlock is the corresponding interface of TunnelingResponseDataBlock type TunnelingResponseDataBlock interface { @@ -48,11 +50,12 @@ type TunnelingResponseDataBlockExactly interface { // _TunnelingResponseDataBlock is the data-structure of this message type _TunnelingResponseDataBlock struct { - CommunicationChannelId uint8 - SequenceCounter uint8 - Status Status + CommunicationChannelId uint8 + SequenceCounter uint8 + Status Status } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -75,14 +78,15 @@ func (m *_TunnelingResponseDataBlock) GetStatus() Status { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewTunnelingResponseDataBlock factory function for _TunnelingResponseDataBlock -func NewTunnelingResponseDataBlock(communicationChannelId uint8, sequenceCounter uint8, status Status) *_TunnelingResponseDataBlock { - return &_TunnelingResponseDataBlock{CommunicationChannelId: communicationChannelId, SequenceCounter: sequenceCounter, Status: status} +func NewTunnelingResponseDataBlock( communicationChannelId uint8 , sequenceCounter uint8 , status Status ) *_TunnelingResponseDataBlock { +return &_TunnelingResponseDataBlock{ CommunicationChannelId: communicationChannelId , SequenceCounter: sequenceCounter , Status: status } } // Deprecated: use the interface for direct cast func CastTunnelingResponseDataBlock(structType interface{}) TunnelingResponseDataBlock { - if casted, ok := structType.(TunnelingResponseDataBlock); ok { + if casted, ok := structType.(TunnelingResponseDataBlock); ok { return casted } if casted, ok := structType.(*TunnelingResponseDataBlock); ok { @@ -102,10 +106,10 @@ func (m *_TunnelingResponseDataBlock) GetLengthInBits(ctx context.Context) uint1 lengthInBits += 8 // Simple field (communicationChannelId) - lengthInBits += 8 + lengthInBits += 8; // Simple field (sequenceCounter) - lengthInBits += 8 + lengthInBits += 8; // Simple field (status) lengthInBits += 8 @@ -113,6 +117,7 @@ func (m *_TunnelingResponseDataBlock) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_TunnelingResponseDataBlock) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,14 +143,14 @@ func TunnelingResponseDataBlockParseWithBuffer(ctx context.Context, readBuffer u } // Simple Field (communicationChannelId) - _communicationChannelId, _communicationChannelIdErr := readBuffer.ReadUint8("communicationChannelId", 8) +_communicationChannelId, _communicationChannelIdErr := readBuffer.ReadUint8("communicationChannelId", 8) if _communicationChannelIdErr != nil { return nil, errors.Wrap(_communicationChannelIdErr, "Error parsing 'communicationChannelId' field of TunnelingResponseDataBlock") } communicationChannelId := _communicationChannelId // Simple Field (sequenceCounter) - _sequenceCounter, _sequenceCounterErr := readBuffer.ReadUint8("sequenceCounter", 8) +_sequenceCounter, _sequenceCounterErr := readBuffer.ReadUint8("sequenceCounter", 8) if _sequenceCounterErr != nil { return nil, errors.Wrap(_sequenceCounterErr, "Error parsing 'sequenceCounter' field of TunnelingResponseDataBlock") } @@ -155,7 +160,7 @@ func TunnelingResponseDataBlockParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("status"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for status") } - _status, _statusErr := StatusParseWithBuffer(ctx, readBuffer) +_status, _statusErr := StatusParseWithBuffer(ctx, readBuffer) if _statusErr != nil { return nil, errors.Wrap(_statusErr, "Error parsing 'status' field of TunnelingResponseDataBlock") } @@ -170,10 +175,10 @@ func TunnelingResponseDataBlockParseWithBuffer(ctx context.Context, readBuffer u // Create the instance return &_TunnelingResponseDataBlock{ - CommunicationChannelId: communicationChannelId, - SequenceCounter: sequenceCounter, - Status: status, - }, nil + CommunicationChannelId: communicationChannelId, + SequenceCounter: sequenceCounter, + Status: status, + }, nil } func (m *_TunnelingResponseDataBlock) Serialize() ([]byte, error) { @@ -187,7 +192,7 @@ func (m *_TunnelingResponseDataBlock) Serialize() ([]byte, error) { func (m *_TunnelingResponseDataBlock) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("TunnelingResponseDataBlock"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("TunnelingResponseDataBlock"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for TunnelingResponseDataBlock") } @@ -230,6 +235,7 @@ func (m *_TunnelingResponseDataBlock) SerializeWithWriteBuffer(ctx context.Conte return nil } + func (m *_TunnelingResponseDataBlock) isTunnelingResponseDataBlock() bool { return true } @@ -244,3 +250,6 @@ func (m *_TunnelingResponseDataBlock) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/UnknownMessage.go b/plc4go/protocols/knxnetip/readwrite/model/UnknownMessage.go index e7a65e978fc..9b99625a59d 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/UnknownMessage.go +++ b/plc4go/protocols/knxnetip/readwrite/model/UnknownMessage.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // UnknownMessage is the corresponding interface of UnknownMessage type UnknownMessage interface { @@ -47,32 +49,32 @@ type UnknownMessageExactly interface { // _UnknownMessage is the data-structure of this message type _UnknownMessage struct { *_KnxNetIpMessage - UnknownData []byte + UnknownData []byte // Arguments. TotalLength uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_UnknownMessage) GetMsgType() uint16 { - return 0x020B -} +func (m *_UnknownMessage) GetMsgType() uint16 { +return 0x020B} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_UnknownMessage) InitializeParent(parent KnxNetIpMessage) {} +func (m *_UnknownMessage) InitializeParent(parent KnxNetIpMessage ) {} -func (m *_UnknownMessage) GetParent() KnxNetIpMessage { +func (m *_UnknownMessage) GetParent() KnxNetIpMessage { return m._KnxNetIpMessage } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -87,11 +89,12 @@ func (m *_UnknownMessage) GetUnknownData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewUnknownMessage factory function for _UnknownMessage -func NewUnknownMessage(unknownData []byte, totalLength uint16) *_UnknownMessage { +func NewUnknownMessage( unknownData []byte , totalLength uint16 ) *_UnknownMessage { _result := &_UnknownMessage{ - UnknownData: unknownData, - _KnxNetIpMessage: NewKnxNetIpMessage(), + UnknownData: unknownData, + _KnxNetIpMessage: NewKnxNetIpMessage(), } _result._KnxNetIpMessage._KnxNetIpMessageChildRequirements = _result return _result @@ -99,7 +102,7 @@ func NewUnknownMessage(unknownData []byte, totalLength uint16) *_UnknownMessage // Deprecated: use the interface for direct cast func CastUnknownMessage(structType interface{}) UnknownMessage { - if casted, ok := structType.(UnknownMessage); ok { + if casted, ok := structType.(UnknownMessage); ok { return casted } if casted, ok := structType.(*UnknownMessage); ok { @@ -123,6 +126,7 @@ func (m *_UnknownMessage) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_UnknownMessage) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -152,8 +156,9 @@ func UnknownMessageParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf // Create a partially initialized instance _child := &_UnknownMessage{ - _KnxNetIpMessage: &_KnxNetIpMessage{}, - UnknownData: unknownData, + _KnxNetIpMessage: &_KnxNetIpMessage{ + }, + UnknownData: unknownData, } _child._KnxNetIpMessage._KnxNetIpMessageChildRequirements = _child return _child, nil @@ -175,11 +180,11 @@ func (m *_UnknownMessage) SerializeWithWriteBuffer(ctx context.Context, writeBuf return errors.Wrap(pushErr, "Error pushing for UnknownMessage") } - // Array Field (unknownData) - // Byte Array field (unknownData) - if err := writeBuffer.WriteByteArray("unknownData", m.GetUnknownData()); err != nil { - return errors.Wrap(err, "Error serializing 'unknownData' field") - } + // Array Field (unknownData) + // Byte Array field (unknownData) + if err := writeBuffer.WriteByteArray("unknownData", m.GetUnknownData()); err != nil { + return errors.Wrap(err, "Error serializing 'unknownData' field") + } if popErr := writeBuffer.PopContext("UnknownMessage"); popErr != nil { return errors.Wrap(popErr, "Error popping for UnknownMessage") @@ -189,13 +194,13 @@ func (m *_UnknownMessage) SerializeWithWriteBuffer(ctx context.Context, writeBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + //// // Arguments Getter func (m *_UnknownMessage) GetTotalLength() uint16 { return m.TotalLength } - // //// @@ -213,3 +218,6 @@ func (m *_UnknownMessage) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/knxnetip/readwrite/model/plc4x_common.go b/plc4go/protocols/knxnetip/readwrite/model/plc4x_common.go index d2d66e8bdd3..42166d94e68 100644 --- a/plc4go/protocols/knxnetip/readwrite/model/plc4x_common.go +++ b/plc4go/protocols/knxnetip/readwrite/model/plc4x_common.go @@ -15,7 +15,7 @@ * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - */ +*/ package model @@ -25,3 +25,4 @@ import "github.com/rs/zerolog/log" // Plc4xModelLog is the Logger used by the Parse/Serialize methods var Plc4xModelLog = &log.Logger + diff --git a/plc4go/protocols/modbus/readwrite/ParserHelper.go b/plc4go/protocols/modbus/readwrite/ParserHelper.go index 5a954056b04..a722604f36a 100644 --- a/plc4go/protocols/modbus/readwrite/ParserHelper.go +++ b/plc4go/protocols/modbus/readwrite/ParserHelper.go @@ -37,7 +37,7 @@ func (m ModbusParserHelper) Parse(typeName string, arguments []string, io utils. case "ModbusPDUWriteFileRecordRequestItem": return model.ModbusPDUWriteFileRecordRequestItemParseWithBuffer(context.Background(), io) case "DataItem": - dataType, _ := model.ModbusDataTypeByName(arguments[0]) + dataType, _ := model.ModbusDataTypeByName(arguments[0]) numberOfValues, err := utils.StrToUint16(arguments[1]) if err != nil { return nil, errors.Wrap(err, "Error parsing") @@ -60,7 +60,7 @@ func (m ModbusParserHelper) Parse(typeName string, arguments []string, io utils. case "ModbusPDUReadFileRecordRequestItem": return model.ModbusPDUReadFileRecordRequestItemParseWithBuffer(context.Background(), io) case "ModbusADU": - driverType, _ := model.DriverTypeByName(arguments[0]) + driverType, _ := model.DriverTypeByName(arguments[0]) response, err := utils.StrToBool(arguments[1]) if err != nil { return nil, errors.Wrap(err, "Error parsing") diff --git a/plc4go/protocols/modbus/readwrite/XmlParserHelper.go b/plc4go/protocols/modbus/readwrite/XmlParserHelper.go index 160d93e2306..c35c3154f48 100644 --- a/plc4go/protocols/modbus/readwrite/XmlParserHelper.go +++ b/plc4go/protocols/modbus/readwrite/XmlParserHelper.go @@ -21,8 +21,8 @@ package readwrite import ( "context" - "strconv" "strings" + "strconv" "github.com/apache/plc4x/plc4go/protocols/modbus/readwrite/model" "github.com/apache/plc4x/plc4go/spi/utils" @@ -43,34 +43,34 @@ func init() { } func (m ModbusXmlParserHelper) Parse(typeName string, xmlString string, parserArguments ...string) (interface{}, error) { - switch typeName { - case "ModbusPDUWriteFileRecordRequestItem": - return model.ModbusPDUWriteFileRecordRequestItemParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "DataItem": - dataType, _ := model.ModbusDataTypeByName(parserArguments[0]) - parsedUint1, err := strconv.ParseUint(parserArguments[1], 10, 16) - if err != nil { - return nil, err - } - numberOfValues := uint16(parsedUint1) - return model.DataItemParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), dataType, numberOfValues) - case "ModbusPDUReadFileRecordResponseItem": - return model.ModbusPDUReadFileRecordResponseItemParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "ModbusDeviceInformationObject": - return model.ModbusDeviceInformationObjectParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "ModbusConstants": - return model.ModbusConstantsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "ModbusPDUWriteFileRecordResponseItem": - return model.ModbusPDUWriteFileRecordResponseItemParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "ModbusPDU": - response := parserArguments[0] == "true" - return model.ModbusPDUParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), response) - case "ModbusPDUReadFileRecordRequestItem": - return model.ModbusPDUReadFileRecordRequestItemParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "ModbusADU": - driverType, _ := model.DriverTypeByName(parserArguments[0]) - response := parserArguments[1] == "true" - return model.ModbusADUParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), driverType, response) - } - return nil, errors.Errorf("Unsupported type %s", typeName) + switch typeName { + case "ModbusPDUWriteFileRecordRequestItem": + return model.ModbusPDUWriteFileRecordRequestItemParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "DataItem": + dataType, _ := model.ModbusDataTypeByName(parserArguments[0]) + parsedUint1, err := strconv.ParseUint(parserArguments[1], 10, 16) + if err!=nil { + return nil, err + } + numberOfValues := uint16(parsedUint1) + return model.DataItemParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), dataType, numberOfValues ) + case "ModbusPDUReadFileRecordResponseItem": + return model.ModbusPDUReadFileRecordResponseItemParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "ModbusDeviceInformationObject": + return model.ModbusDeviceInformationObjectParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "ModbusConstants": + return model.ModbusConstantsParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "ModbusPDUWriteFileRecordResponseItem": + return model.ModbusPDUWriteFileRecordResponseItemParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "ModbusPDU": + response := parserArguments[0] == "true" + return model.ModbusPDUParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), response ) + case "ModbusPDUReadFileRecordRequestItem": + return model.ModbusPDUReadFileRecordRequestItemParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "ModbusADU": + driverType, _ := model.DriverTypeByName(parserArguments[0]) + response := parserArguments[1] == "true" + return model.ModbusADUParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), driverType, response ) + } + return nil, errors.Errorf("Unsupported type %s", typeName) } diff --git a/plc4go/protocols/modbus/readwrite/model/DataItem.go b/plc4go/protocols/modbus/readwrite/model/DataItem.go index c59086a3734..456215f36c3 100644 --- a/plc4go/protocols/modbus/readwrite/model/DataItem.go +++ b/plc4go/protocols/modbus/readwrite/model/DataItem.go @@ -19,16 +19,17 @@ package model + import ( "context" - api "github.com/apache/plc4x/plc4go/pkg/api/values" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/apache/plc4x/plc4go/spi/values" "github.com/pkg/errors" + api "github.com/apache/plc4x/plc4go/pkg/api/values" ) -// Code generated by code-generation. DO NOT EDIT. - + // Code generated by code-generation. DO NOT EDIT. + func DataItemParse(ctx context.Context, theBytes []byte, dataType ModbusDataType, numberOfValues uint16) (api.PlcValue, error) { return DataItemParseWithBuffer(ctx, utils.NewReadBufferByteBased(theBytes), dataType, numberOfValues) } @@ -36,332 +37,332 @@ func DataItemParse(ctx context.Context, theBytes []byte, dataType ModbusDataType func DataItemParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, dataType ModbusDataType, numberOfValues uint16) (api.PlcValue, error) { readBuffer.PullContext("DataItem") switch { - case dataType == ModbusDataType_BOOL && numberOfValues == uint16(1): // BOOL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint16("reserved", 15); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } +case dataType == ModbusDataType_BOOL && numberOfValues == uint16(1) : // BOOL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint16("reserved", 15); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } - // Simple Field (value) - value, _valueErr := readBuffer.ReadBit("value") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcBOOL(value), nil - case dataType == ModbusDataType_BOOL: // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int(numberOfValues); i++ { - _item, _itemErr := readBuffer.ReadBit("value") - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcBOOL(_item)) - } - readBuffer.CloseContext("DataItem") - return values.NewPlcList(value), nil - case dataType == ModbusDataType_BYTE && numberOfValues == uint16(1): // BYTE - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } + // Simple Field (value) + value, _valueErr := readBuffer.ReadBit("value") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcBOOL(value), nil +case dataType == ModbusDataType_BOOL : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int(numberOfValues); i++ { + _item, _itemErr := readBuffer.ReadBit("value") + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcBOOL(_item)) + } + readBuffer.CloseContext("DataItem") + return values.NewPlcList(value), nil +case dataType == ModbusDataType_BYTE && numberOfValues == uint16(1) : // BYTE + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcBYTE(value), nil - case dataType == ModbusDataType_BYTE: // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int((numberOfValues)*(8)); i++ { - _item, _itemErr := readBuffer.ReadBit("value") - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcBOOL(_item)) - } - readBuffer.CloseContext("DataItem") - return values.NewPlcList(value), nil - case dataType == ModbusDataType_WORD: // WORD - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint16("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcWORD(value), nil - case dataType == ModbusDataType_DWORD: // DWORD - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcDWORD(value), nil - case dataType == ModbusDataType_LWORD: // LWORD - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint64("value", 64) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcLWORD(value), nil - case dataType == ModbusDataType_SINT && numberOfValues == uint16(1): // SINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcBYTE(value), nil +case dataType == ModbusDataType_BYTE : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int((numberOfValues) * ((8))); i++ { + _item, _itemErr := readBuffer.ReadBit("value") + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcBOOL(_item)) + } + readBuffer.CloseContext("DataItem") + return values.NewPlcList(value), nil +case dataType == ModbusDataType_WORD : // WORD + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint16("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcWORD(value), nil +case dataType == ModbusDataType_DWORD : // DWORD + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcDWORD(value), nil +case dataType == ModbusDataType_LWORD : // LWORD + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint64("value", 64) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcLWORD(value), nil +case dataType == ModbusDataType_SINT && numberOfValues == uint16(1) : // SINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcSINT(value), nil - case dataType == ModbusDataType_SINT: // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int(numberOfValues); i++ { - _item, _itemErr := readBuffer.ReadInt8("value", 8) - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcSINT(_item)) - } - readBuffer.CloseContext("DataItem") - return values.NewPlcList(value), nil - case dataType == ModbusDataType_INT && numberOfValues == uint16(1): // INT - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt16("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcINT(value), nil - case dataType == ModbusDataType_INT: // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int(numberOfValues); i++ { - _item, _itemErr := readBuffer.ReadInt16("value", 16) - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcINT(_item)) - } - readBuffer.CloseContext("DataItem") - return values.NewPlcList(value), nil - case dataType == ModbusDataType_DINT && numberOfValues == uint16(1): // DINT - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcDINT(value), nil - case dataType == ModbusDataType_DINT: // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int(numberOfValues); i++ { - _item, _itemErr := readBuffer.ReadInt32("value", 32) - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcDINT(_item)) - } - readBuffer.CloseContext("DataItem") - return values.NewPlcList(value), nil - case dataType == ModbusDataType_LINT && numberOfValues == uint16(1): // LINT - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt64("value", 64) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcLINT(value), nil - case dataType == ModbusDataType_LINT: // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int(numberOfValues); i++ { - _item, _itemErr := readBuffer.ReadInt64("value", 64) - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcLINT(_item)) - } - readBuffer.CloseContext("DataItem") - return values.NewPlcList(value), nil - case dataType == ModbusDataType_USINT && numberOfValues == uint16(1): // USINT - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcSINT(value), nil +case dataType == ModbusDataType_SINT : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int(numberOfValues); i++ { + _item, _itemErr := readBuffer.ReadInt8("value", 8) + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcSINT(_item)) + } + readBuffer.CloseContext("DataItem") + return values.NewPlcList(value), nil +case dataType == ModbusDataType_INT && numberOfValues == uint16(1) : // INT + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt16("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcINT(value), nil +case dataType == ModbusDataType_INT : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int(numberOfValues); i++ { + _item, _itemErr := readBuffer.ReadInt16("value", 16) + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcINT(_item)) + } + readBuffer.CloseContext("DataItem") + return values.NewPlcList(value), nil +case dataType == ModbusDataType_DINT && numberOfValues == uint16(1) : // DINT + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcDINT(value), nil +case dataType == ModbusDataType_DINT : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int(numberOfValues); i++ { + _item, _itemErr := readBuffer.ReadInt32("value", 32) + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcDINT(_item)) + } + readBuffer.CloseContext("DataItem") + return values.NewPlcList(value), nil +case dataType == ModbusDataType_LINT && numberOfValues == uint16(1) : // LINT + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt64("value", 64) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcLINT(value), nil +case dataType == ModbusDataType_LINT : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int(numberOfValues); i++ { + _item, _itemErr := readBuffer.ReadInt64("value", 64) + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcLINT(_item)) + } + readBuffer.CloseContext("DataItem") + return values.NewPlcList(value), nil +case dataType == ModbusDataType_USINT && numberOfValues == uint16(1) : // USINT + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 8); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcUSINT(value), nil - case dataType == ModbusDataType_USINT: // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int(numberOfValues); i++ { - _item, _itemErr := readBuffer.ReadUint8("value", 8) - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcUSINT(_item)) - } - readBuffer.CloseContext("DataItem") - return values.NewPlcList(value), nil - case dataType == ModbusDataType_UINT && numberOfValues == uint16(1): // UINT - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint16("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcUINT(value), nil - case dataType == ModbusDataType_UINT: // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int(numberOfValues); i++ { - _item, _itemErr := readBuffer.ReadUint16("value", 16) - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcUINT(_item)) - } - readBuffer.CloseContext("DataItem") - return values.NewPlcList(value), nil - case dataType == ModbusDataType_UDINT && numberOfValues == uint16(1): // UDINT - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcUDINT(value), nil - case dataType == ModbusDataType_UDINT: // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int(numberOfValues); i++ { - _item, _itemErr := readBuffer.ReadUint32("value", 32) - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcUDINT(_item)) - } - readBuffer.CloseContext("DataItem") - return values.NewPlcList(value), nil - case dataType == ModbusDataType_ULINT && numberOfValues == uint16(1): // ULINT - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint64("value", 64) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcULINT(value), nil - case dataType == ModbusDataType_ULINT: // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int(numberOfValues); i++ { - _item, _itemErr := readBuffer.ReadUint64("value", 64) - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcULINT(_item)) - } - readBuffer.CloseContext("DataItem") - return values.NewPlcList(value), nil - case dataType == ModbusDataType_REAL && numberOfValues == uint16(1): // REAL - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcREAL(value), nil - case dataType == ModbusDataType_REAL: // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int(numberOfValues); i++ { - _item, _itemErr := readBuffer.ReadFloat32("value", 32) - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcREAL(_item)) - } - readBuffer.CloseContext("DataItem") - return values.NewPlcList(value), nil - case dataType == ModbusDataType_LREAL && numberOfValues == uint16(1): // LREAL - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat64("value", 64) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcLREAL(value), nil - case dataType == ModbusDataType_LREAL: // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int(numberOfValues); i++ { - _item, _itemErr := readBuffer.ReadFloat64("value", 64) - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcLREAL(_item)) - } - readBuffer.CloseContext("DataItem") - return values.NewPlcList(value), nil - case dataType == ModbusDataType_CHAR && numberOfValues == uint16(1): // CHAR - // Simple Field (value) - value, _valueErr := readBuffer.ReadString("value", uint32(8), "UTF-8") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcCHAR(value), nil - case dataType == ModbusDataType_CHAR: // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int(numberOfValues); i++ { - _item, _itemErr := readBuffer.ReadString("value", uint32(8), "UTF-8") - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcSTRING(_item)) - } - readBuffer.CloseContext("DataItem") - return values.NewPlcList(value), nil - case dataType == ModbusDataType_WCHAR && numberOfValues == uint16(1): // WCHAR - // Simple Field (value) - value, _valueErr := readBuffer.ReadString("value", uint32(16), "UTF-16") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcWCHAR(value), nil - case dataType == ModbusDataType_WCHAR: // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int(numberOfValues); i++ { - _item, _itemErr := readBuffer.ReadString("value", uint32(16), "UTF-16") - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcSTRING(_item)) - } - readBuffer.CloseContext("DataItem") - return values.NewPlcList(value), nil + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcUSINT(value), nil +case dataType == ModbusDataType_USINT : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int(numberOfValues); i++ { + _item, _itemErr := readBuffer.ReadUint8("value", 8) + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcUSINT(_item)) + } + readBuffer.CloseContext("DataItem") + return values.NewPlcList(value), nil +case dataType == ModbusDataType_UINT && numberOfValues == uint16(1) : // UINT + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint16("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcUINT(value), nil +case dataType == ModbusDataType_UINT : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int(numberOfValues); i++ { + _item, _itemErr := readBuffer.ReadUint16("value", 16) + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcUINT(_item)) + } + readBuffer.CloseContext("DataItem") + return values.NewPlcList(value), nil +case dataType == ModbusDataType_UDINT && numberOfValues == uint16(1) : // UDINT + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcUDINT(value), nil +case dataType == ModbusDataType_UDINT : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int(numberOfValues); i++ { + _item, _itemErr := readBuffer.ReadUint32("value", 32) + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcUDINT(_item)) + } + readBuffer.CloseContext("DataItem") + return values.NewPlcList(value), nil +case dataType == ModbusDataType_ULINT && numberOfValues == uint16(1) : // ULINT + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint64("value", 64) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcULINT(value), nil +case dataType == ModbusDataType_ULINT : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int(numberOfValues); i++ { + _item, _itemErr := readBuffer.ReadUint64("value", 64) + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcULINT(_item)) + } + readBuffer.CloseContext("DataItem") + return values.NewPlcList(value), nil +case dataType == ModbusDataType_REAL && numberOfValues == uint16(1) : // REAL + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcREAL(value), nil +case dataType == ModbusDataType_REAL : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int(numberOfValues); i++ { + _item, _itemErr := readBuffer.ReadFloat32("value", 32) + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcREAL(_item)) + } + readBuffer.CloseContext("DataItem") + return values.NewPlcList(value), nil +case dataType == ModbusDataType_LREAL && numberOfValues == uint16(1) : // LREAL + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat64("value", 64) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcLREAL(value), nil +case dataType == ModbusDataType_LREAL : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int(numberOfValues); i++ { + _item, _itemErr := readBuffer.ReadFloat64("value", 64) + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcLREAL(_item)) + } + readBuffer.CloseContext("DataItem") + return values.NewPlcList(value), nil +case dataType == ModbusDataType_CHAR && numberOfValues == uint16(1) : // CHAR + // Simple Field (value) + value, _valueErr := readBuffer.ReadString("value", uint32(8), "UTF-8") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcCHAR(value), nil +case dataType == ModbusDataType_CHAR : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int(numberOfValues); i++ { + _item, _itemErr := readBuffer.ReadString("value", uint32(8), "UTF-8") + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcSTRING(_item)) + } + readBuffer.CloseContext("DataItem") + return values.NewPlcList(value), nil +case dataType == ModbusDataType_WCHAR && numberOfValues == uint16(1) : // WCHAR + // Simple Field (value) + value, _valueErr := readBuffer.ReadString("value", uint32(16), "UTF-16") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcWCHAR(value), nil +case dataType == ModbusDataType_WCHAR : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int(numberOfValues); i++ { + _item, _itemErr := readBuffer.ReadString("value", uint32(16), "UTF-16") + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcSTRING(_item)) + } + readBuffer.CloseContext("DataItem") + return values.NewPlcList(value), nil } - // TODO: add more info which type it is actually + // TODO: add more info which type it is actually return nil, errors.New("unsupported type") } @@ -375,236 +376,238 @@ func DataItemSerialize(value api.PlcValue, dataType ModbusDataType, numberOfValu func DataItemSerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer, value api.PlcValue, dataType ModbusDataType, numberOfValues uint16) error { m := struct { - DataType ModbusDataType - NumberOfValues uint16 + DataType ModbusDataType + NumberOfValues uint16 }{ - DataType: dataType, - NumberOfValues: numberOfValues, + DataType: dataType, + NumberOfValues: numberOfValues, } _ = m writeBuffer.PushContext("DataItem") switch { - case dataType == ModbusDataType_BOOL && numberOfValues == uint16(1): // BOOL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint16("reserved", 15, uint16(0x0000)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } +case dataType == ModbusDataType_BOOL && numberOfValues == uint16(1) : // BOOL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint16("reserved", 15, uint16(0x0000)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } - // Simple Field (value) - if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataType == ModbusDataType_BOOL: // List - // Array Field (value) - for i := uint32(0); i < uint32(m.NumberOfValues); i++ { - _itemErr := writeBuffer.WriteBit("", value.GetIndex(i).GetBool()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case dataType == ModbusDataType_BYTE && numberOfValues == uint16(1): // BYTE - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } + // Simple Field (value) + if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataType == ModbusDataType_BOOL : // List + // Array Field (value) + for i := uint32(0); i < uint32(m.NumberOfValues); i++ { + _itemErr := writeBuffer.WriteBit("", value.GetIndex(i).GetBool()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case dataType == ModbusDataType_BYTE && numberOfValues == uint16(1) : // BYTE + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataType == ModbusDataType_BYTE: // List - // Array Field (value) - for i := uint32(0); i < uint32((m.NumberOfValues)*(8)); i++ { - _itemErr := writeBuffer.WriteBit("", value.GetIndex(i).GetBool()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case dataType == ModbusDataType_WORD: // WORD - // Simple Field (value) - if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataType == ModbusDataType_DWORD: // DWORD - // Simple Field (value) - if _err := writeBuffer.WriteUint32("value", 32, value.GetUint32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataType == ModbusDataType_LWORD: // LWORD - // Simple Field (value) - if _err := writeBuffer.WriteUint64("value", 64, value.GetUint64()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataType == ModbusDataType_SINT && numberOfValues == uint16(1): // SINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataType == ModbusDataType_BYTE : // List + // Array Field (value) + for i := uint32(0); i < uint32((m.NumberOfValues) * ((8))); i++ { + _itemErr := writeBuffer.WriteBit("", value.GetIndex(i).GetBool()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case dataType == ModbusDataType_WORD : // WORD + // Simple Field (value) + if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataType == ModbusDataType_DWORD : // DWORD + // Simple Field (value) + if _err := writeBuffer.WriteUint32("value", 32, value.GetUint32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataType == ModbusDataType_LWORD : // LWORD + // Simple Field (value) + if _err := writeBuffer.WriteUint64("value", 64, value.GetUint64()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataType == ModbusDataType_SINT && numberOfValues == uint16(1) : // SINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } - // Simple Field (value) - if _err := writeBuffer.WriteInt8("value", 8, value.GetInt8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataType == ModbusDataType_SINT: // List - // Array Field (value) - for i := uint32(0); i < uint32(m.NumberOfValues); i++ { - _itemErr := writeBuffer.WriteInt8("", 8, value.GetIndex(i).GetInt8()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case dataType == ModbusDataType_INT && numberOfValues == uint16(1): // INT - // Simple Field (value) - if _err := writeBuffer.WriteInt16("value", 16, value.GetInt16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataType == ModbusDataType_INT: // List - // Array Field (value) - for i := uint32(0); i < uint32(m.NumberOfValues); i++ { - _itemErr := writeBuffer.WriteInt16("", 16, value.GetIndex(i).GetInt16()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case dataType == ModbusDataType_DINT && numberOfValues == uint16(1): // DINT - // Simple Field (value) - if _err := writeBuffer.WriteInt32("value", 32, value.GetInt32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataType == ModbusDataType_DINT: // List - // Array Field (value) - for i := uint32(0); i < uint32(m.NumberOfValues); i++ { - _itemErr := writeBuffer.WriteInt32("", 32, value.GetIndex(i).GetInt32()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case dataType == ModbusDataType_LINT && numberOfValues == uint16(1): // LINT - // Simple Field (value) - if _err := writeBuffer.WriteInt64("value", 64, value.GetInt64()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataType == ModbusDataType_LINT: // List - // Array Field (value) - for i := uint32(0); i < uint32(m.NumberOfValues); i++ { - _itemErr := writeBuffer.WriteInt64("", 64, value.GetIndex(i).GetInt64()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case dataType == ModbusDataType_USINT && numberOfValues == uint16(1): // USINT - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } + // Simple Field (value) + if _err := writeBuffer.WriteInt8("value", 8, value.GetInt8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataType == ModbusDataType_SINT : // List + // Array Field (value) + for i := uint32(0); i < uint32(m.NumberOfValues); i++ { + _itemErr := writeBuffer.WriteInt8("", 8, value.GetIndex(i).GetInt8()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case dataType == ModbusDataType_INT && numberOfValues == uint16(1) : // INT + // Simple Field (value) + if _err := writeBuffer.WriteInt16("value", 16, value.GetInt16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataType == ModbusDataType_INT : // List + // Array Field (value) + for i := uint32(0); i < uint32(m.NumberOfValues); i++ { + _itemErr := writeBuffer.WriteInt16("", 16, value.GetIndex(i).GetInt16()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case dataType == ModbusDataType_DINT && numberOfValues == uint16(1) : // DINT + // Simple Field (value) + if _err := writeBuffer.WriteInt32("value", 32, value.GetInt32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataType == ModbusDataType_DINT : // List + // Array Field (value) + for i := uint32(0); i < uint32(m.NumberOfValues); i++ { + _itemErr := writeBuffer.WriteInt32("", 32, value.GetIndex(i).GetInt32()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case dataType == ModbusDataType_LINT && numberOfValues == uint16(1) : // LINT + // Simple Field (value) + if _err := writeBuffer.WriteInt64("value", 64, value.GetInt64()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataType == ModbusDataType_LINT : // List + // Array Field (value) + for i := uint32(0); i < uint32(m.NumberOfValues); i++ { + _itemErr := writeBuffer.WriteInt64("", 64, value.GetIndex(i).GetInt64()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case dataType == ModbusDataType_USINT && numberOfValues == uint16(1) : // USINT + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 8, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataType == ModbusDataType_USINT: // List - // Array Field (value) - for i := uint32(0); i < uint32(m.NumberOfValues); i++ { - _itemErr := writeBuffer.WriteUint8("", 8, value.GetIndex(i).GetUint8()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case dataType == ModbusDataType_UINT && numberOfValues == uint16(1): // UINT - // Simple Field (value) - if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataType == ModbusDataType_UINT: // List - // Array Field (value) - for i := uint32(0); i < uint32(m.NumberOfValues); i++ { - _itemErr := writeBuffer.WriteUint16("", 16, value.GetIndex(i).GetUint16()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case dataType == ModbusDataType_UDINT && numberOfValues == uint16(1): // UDINT - // Simple Field (value) - if _err := writeBuffer.WriteUint32("value", 32, value.GetUint32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataType == ModbusDataType_UDINT: // List - // Array Field (value) - for i := uint32(0); i < uint32(m.NumberOfValues); i++ { - _itemErr := writeBuffer.WriteUint32("", 32, value.GetIndex(i).GetUint32()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case dataType == ModbusDataType_ULINT && numberOfValues == uint16(1): // ULINT - // Simple Field (value) - if _err := writeBuffer.WriteUint64("value", 64, value.GetUint64()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataType == ModbusDataType_ULINT: // List - // Array Field (value) - for i := uint32(0); i < uint32(m.NumberOfValues); i++ { - _itemErr := writeBuffer.WriteUint64("", 64, value.GetIndex(i).GetUint64()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case dataType == ModbusDataType_REAL && numberOfValues == uint16(1): // REAL - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataType == ModbusDataType_REAL: // List - // Array Field (value) - for i := uint32(0); i < uint32(m.NumberOfValues); i++ { - _itemErr := writeBuffer.WriteFloat32("", 32, value.GetIndex(i).GetFloat32()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case dataType == ModbusDataType_LREAL && numberOfValues == uint16(1): // LREAL - // Simple Field (value) - if _err := writeBuffer.WriteFloat64("value", 64, value.GetFloat64()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataType == ModbusDataType_LREAL: // List - // Array Field (value) - for i := uint32(0); i < uint32(m.NumberOfValues); i++ { - _itemErr := writeBuffer.WriteFloat64("", 64, value.GetIndex(i).GetFloat64()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case dataType == ModbusDataType_CHAR && numberOfValues == uint16(1): // CHAR - // Simple Field (value) - if _err := writeBuffer.WriteString("value", uint32(8), "UTF-8", value.GetString()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataType == ModbusDataType_CHAR: // List - // Array Field (value) - for i := uint32(0); i < uint32(m.NumberOfValues); i++ { - _itemErr := writeBuffer.WriteString("", uint32(8), "UTF-8", value.GetIndex(i).GetString()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case dataType == ModbusDataType_WCHAR && numberOfValues == uint16(1): // WCHAR - // Simple Field (value) - if _err := writeBuffer.WriteString("value", uint32(16), "UTF-16", value.GetString()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataType == ModbusDataType_WCHAR: // List - // Array Field (value) - for i := uint32(0); i < uint32(m.NumberOfValues); i++ { - _itemErr := writeBuffer.WriteString("", uint32(16), "UTF-16", value.GetIndex(i).GetString()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - default: - // TODO: add more info which type it is actually - return errors.New("unsupported type") + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataType == ModbusDataType_USINT : // List + // Array Field (value) + for i := uint32(0); i < uint32(m.NumberOfValues); i++ { + _itemErr := writeBuffer.WriteUint8("", 8, value.GetIndex(i).GetUint8()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case dataType == ModbusDataType_UINT && numberOfValues == uint16(1) : // UINT + // Simple Field (value) + if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataType == ModbusDataType_UINT : // List + // Array Field (value) + for i := uint32(0); i < uint32(m.NumberOfValues); i++ { + _itemErr := writeBuffer.WriteUint16("", 16, value.GetIndex(i).GetUint16()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case dataType == ModbusDataType_UDINT && numberOfValues == uint16(1) : // UDINT + // Simple Field (value) + if _err := writeBuffer.WriteUint32("value", 32, value.GetUint32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataType == ModbusDataType_UDINT : // List + // Array Field (value) + for i := uint32(0); i < uint32(m.NumberOfValues); i++ { + _itemErr := writeBuffer.WriteUint32("", 32, value.GetIndex(i).GetUint32()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case dataType == ModbusDataType_ULINT && numberOfValues == uint16(1) : // ULINT + // Simple Field (value) + if _err := writeBuffer.WriteUint64("value", 64, value.GetUint64()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataType == ModbusDataType_ULINT : // List + // Array Field (value) + for i := uint32(0); i < uint32(m.NumberOfValues); i++ { + _itemErr := writeBuffer.WriteUint64("", 64, value.GetIndex(i).GetUint64()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case dataType == ModbusDataType_REAL && numberOfValues == uint16(1) : // REAL + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataType == ModbusDataType_REAL : // List + // Array Field (value) + for i := uint32(0); i < uint32(m.NumberOfValues); i++ { + _itemErr := writeBuffer.WriteFloat32("", 32, value.GetIndex(i).GetFloat32()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case dataType == ModbusDataType_LREAL && numberOfValues == uint16(1) : // LREAL + // Simple Field (value) + if _err := writeBuffer.WriteFloat64("value", 64, value.GetFloat64()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataType == ModbusDataType_LREAL : // List + // Array Field (value) + for i := uint32(0); i < uint32(m.NumberOfValues); i++ { + _itemErr := writeBuffer.WriteFloat64("", 64, value.GetIndex(i).GetFloat64()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case dataType == ModbusDataType_CHAR && numberOfValues == uint16(1) : // CHAR + // Simple Field (value) + if _err := writeBuffer.WriteString("value", uint32(8), "UTF-8", value.GetString()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataType == ModbusDataType_CHAR : // List + // Array Field (value) + for i := uint32(0); i < uint32(m.NumberOfValues); i++ { + _itemErr := writeBuffer.WriteString("", uint32(8), "UTF-8", value.GetIndex(i).GetString()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case dataType == ModbusDataType_WCHAR && numberOfValues == uint16(1) : // WCHAR + // Simple Field (value) + if _err := writeBuffer.WriteString("value", uint32(16), "UTF-16", value.GetString()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataType == ModbusDataType_WCHAR : // List + // Array Field (value) + for i := uint32(0); i < uint32(m.NumberOfValues); i++ { + _itemErr := writeBuffer.WriteString("", uint32(16), "UTF-16", value.GetIndex(i).GetString()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } + default: + // TODO: add more info which type it is actually + return errors.New("unsupported type") } writeBuffer.PopContext("DataItem") return nil } + + diff --git a/plc4go/protocols/modbus/readwrite/model/DriverType.go b/plc4go/protocols/modbus/readwrite/model/DriverType.go index bc1141509d1..a08b2767f8d 100644 --- a/plc4go/protocols/modbus/readwrite/model/DriverType.go +++ b/plc4go/protocols/modbus/readwrite/model/DriverType.go @@ -34,9 +34,9 @@ type IDriverType interface { utils.Serializable } -const ( - DriverType_MODBUS_TCP DriverType = 0x01 - DriverType_MODBUS_RTU DriverType = 0x02 +const( + DriverType_MODBUS_TCP DriverType = 0x01 + DriverType_MODBUS_RTU DriverType = 0x02 DriverType_MODBUS_ASCII DriverType = 0x03 ) @@ -44,7 +44,7 @@ var DriverTypeValues []DriverType func init() { _ = errors.New - DriverTypeValues = []DriverType{ + DriverTypeValues = []DriverType { DriverType_MODBUS_TCP, DriverType_MODBUS_RTU, DriverType_MODBUS_ASCII, @@ -53,12 +53,12 @@ func init() { func DriverTypeByValue(value uint32) (enum DriverType, ok bool) { switch value { - case 0x01: - return DriverType_MODBUS_TCP, true - case 0x02: - return DriverType_MODBUS_RTU, true - case 0x03: - return DriverType_MODBUS_ASCII, true + case 0x01: + return DriverType_MODBUS_TCP, true + case 0x02: + return DriverType_MODBUS_RTU, true + case 0x03: + return DriverType_MODBUS_ASCII, true } return 0, false } @@ -75,13 +75,13 @@ func DriverTypeByName(value string) (enum DriverType, ok bool) { return 0, false } -func DriverTypeKnows(value uint32) bool { +func DriverTypeKnows(value uint32) bool { for _, typeValue := range DriverTypeValues { if uint32(typeValue) == value { return true } } - return false + return false; } func CastDriverType(structType interface{}) DriverType { @@ -147,3 +147,4 @@ func (e DriverType) PLC4XEnumName() string { func (e DriverType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusADU.go b/plc4go/protocols/modbus/readwrite/model/ModbusADU.go index 5b6d59d8f2f..cd34b21cc71 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusADU.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusADU.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusADU is the corresponding interface of ModbusADU type ModbusADU interface { @@ -57,6 +59,7 @@ type _ModbusADUChildRequirements interface { GetDriverType() DriverType } + type ModbusADUParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child ModbusADU, serializeChildFunction func() error) error GetTypeName() string @@ -64,21 +67,22 @@ type ModbusADUParent interface { type ModbusADUChild interface { utils.Serializable - InitializeParent(parent ModbusADU) +InitializeParent(parent ModbusADU ) GetParent() *ModbusADU GetTypeName() string ModbusADU } + // NewModbusADU factory function for _ModbusADU -func NewModbusADU(response bool) *_ModbusADU { - return &_ModbusADU{Response: response} +func NewModbusADU( response bool ) *_ModbusADU { +return &_ModbusADU{ Response: response } } // Deprecated: use the interface for direct cast func CastModbusADU(structType interface{}) ModbusADU { - if casted, ok := structType.(ModbusADU); ok { + if casted, ok := structType.(ModbusADU); ok { return casted } if casted, ok := structType.(*ModbusADU); ok { @@ -91,6 +95,7 @@ func (m *_ModbusADU) GetTypeName() string { return "ModbusADU" } + func (m *_ModbusADU) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -117,18 +122,18 @@ func ModbusADUParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type ModbusADUChildSerializeRequirement interface { ModbusADU - InitializeParent(ModbusADU) + InitializeParent(ModbusADU ) GetParent() ModbusADU } var _childTemp interface{} var _child ModbusADUChildSerializeRequirement var typeSwitchError error switch { - case driverType == DriverType_MODBUS_TCP: // ModbusTcpADU +case driverType == DriverType_MODBUS_TCP : // ModbusTcpADU _childTemp, typeSwitchError = ModbusTcpADUParseWithBuffer(ctx, readBuffer, driverType, response) - case driverType == DriverType_MODBUS_RTU: // ModbusRtuADU +case driverType == DriverType_MODBUS_RTU : // ModbusRtuADU _childTemp, typeSwitchError = ModbusRtuADUParseWithBuffer(ctx, readBuffer, driverType, response) - case driverType == DriverType_MODBUS_ASCII: // ModbusAsciiADU +case driverType == DriverType_MODBUS_ASCII : // ModbusAsciiADU _childTemp, typeSwitchError = ModbusAsciiADUParseWithBuffer(ctx, readBuffer, driverType, response) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [driverType=%v]", driverType) @@ -143,7 +148,7 @@ func ModbusADUParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, } // Finish initializing - _child.InitializeParent(_child) +_child.InitializeParent(_child ) return _child, nil } @@ -153,7 +158,7 @@ func (pm *_ModbusADU) SerializeParent(ctx context.Context, writeBuffer utils.Wri _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("ModbusADU"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("ModbusADU"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for ModbusADU") } @@ -168,13 +173,13 @@ func (pm *_ModbusADU) SerializeParent(ctx context.Context, writeBuffer utils.Wri return nil } + //// // Arguments Getter func (m *_ModbusADU) GetResponse() bool { return m.Response } - // //// @@ -192,3 +197,6 @@ func (m *_ModbusADU) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusAsciiADU.go b/plc4go/protocols/modbus/readwrite/model/ModbusAsciiADU.go index 4288e12d905..88e5f510779 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusAsciiADU.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusAsciiADU.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusAsciiADU is the corresponding interface of ModbusAsciiADU type ModbusAsciiADU interface { @@ -49,30 +51,30 @@ type ModbusAsciiADUExactly interface { // _ModbusAsciiADU is the data-structure of this message type _ModbusAsciiADU struct { *_ModbusADU - Address uint8 - Pdu ModbusPDU + Address uint8 + Pdu ModbusPDU } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusAsciiADU) GetDriverType() DriverType { - return DriverType_MODBUS_ASCII -} +func (m *_ModbusAsciiADU) GetDriverType() DriverType { +return DriverType_MODBUS_ASCII} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusAsciiADU) InitializeParent(parent ModbusADU) {} +func (m *_ModbusAsciiADU) InitializeParent(parent ModbusADU ) {} -func (m *_ModbusAsciiADU) GetParent() ModbusADU { +func (m *_ModbusAsciiADU) GetParent() ModbusADU { return m._ModbusADU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -91,12 +93,13 @@ func (m *_ModbusAsciiADU) GetPdu() ModbusPDU { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusAsciiADU factory function for _ModbusAsciiADU -func NewModbusAsciiADU(address uint8, pdu ModbusPDU, response bool) *_ModbusAsciiADU { +func NewModbusAsciiADU( address uint8 , pdu ModbusPDU , response bool ) *_ModbusAsciiADU { _result := &_ModbusAsciiADU{ - Address: address, - Pdu: pdu, - _ModbusADU: NewModbusADU(response), + Address: address, + Pdu: pdu, + _ModbusADU: NewModbusADU(response), } _result._ModbusADU._ModbusADUChildRequirements = _result return _result @@ -104,7 +107,7 @@ func NewModbusAsciiADU(address uint8, pdu ModbusPDU, response bool) *_ModbusAsci // Deprecated: use the interface for direct cast func CastModbusAsciiADU(structType interface{}) ModbusAsciiADU { - if casted, ok := structType.(ModbusAsciiADU); ok { + if casted, ok := structType.(ModbusAsciiADU); ok { return casted } if casted, ok := structType.(*ModbusAsciiADU); ok { @@ -121,7 +124,7 @@ func (m *_ModbusAsciiADU) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (address) - lengthInBits += 8 + lengthInBits += 8; // Simple field (pdu) lengthInBits += m.Pdu.GetLengthInBits(ctx) @@ -132,6 +135,7 @@ func (m *_ModbusAsciiADU) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_ModbusAsciiADU) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -150,7 +154,7 @@ func ModbusAsciiADUParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf _ = currentPos // Simple Field (address) - _address, _addressErr := readBuffer.ReadUint8("address", 8) +_address, _addressErr := readBuffer.ReadUint8("address", 8) if _addressErr != nil { return nil, errors.Wrap(_addressErr, "Error parsing 'address' field of ModbusAsciiADU") } @@ -160,7 +164,7 @@ func ModbusAsciiADUParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf if pullErr := readBuffer.PullContext("pdu"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for pdu") } - _pdu, _pduErr := ModbusPDUParseWithBuffer(ctx, readBuffer, bool(response)) +_pdu, _pduErr := ModbusPDUParseWithBuffer(ctx, readBuffer , bool( response ) ) if _pduErr != nil { return nil, errors.Wrap(_pduErr, "Error parsing 'pdu' field of ModbusAsciiADU") } @@ -175,7 +179,7 @@ func ModbusAsciiADUParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf if _checksumRefErr != nil { return nil, errors.Wrap(_checksumRefErr, "Error parsing 'checksum' field of ModbusAsciiADU") } - checksum, _checksumErr := AsciiLrcCheck(address, pdu) + checksum, _checksumErr:= AsciiLrcCheck(address, pdu) if _checksumErr != nil { return nil, errors.Wrap(_checksumErr, "Checksum verification failed") } @@ -194,7 +198,7 @@ func ModbusAsciiADUParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf Response: response, }, Address: address, - Pdu: pdu, + Pdu: pdu, } _child._ModbusADU._ModbusADUChildRequirements = _child return _child, nil @@ -216,36 +220,36 @@ func (m *_ModbusAsciiADU) SerializeWithWriteBuffer(ctx context.Context, writeBuf return errors.Wrap(pushErr, "Error pushing for ModbusAsciiADU") } - // Simple Field (address) - address := uint8(m.GetAddress()) - _addressErr := writeBuffer.WriteUint8("address", 8, (address)) - if _addressErr != nil { - return errors.Wrap(_addressErr, "Error serializing 'address' field") - } + // Simple Field (address) + address := uint8(m.GetAddress()) + _addressErr := writeBuffer.WriteUint8("address", 8, (address)) + if _addressErr != nil { + return errors.Wrap(_addressErr, "Error serializing 'address' field") + } - // Simple Field (pdu) - if pushErr := writeBuffer.PushContext("pdu"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for pdu") - } - _pduErr := writeBuffer.WriteSerializable(ctx, m.GetPdu()) - if popErr := writeBuffer.PopContext("pdu"); popErr != nil { - return errors.Wrap(popErr, "Error popping for pdu") - } - if _pduErr != nil { - return errors.Wrap(_pduErr, "Error serializing 'pdu' field") - } + // Simple Field (pdu) + if pushErr := writeBuffer.PushContext("pdu"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for pdu") + } + _pduErr := writeBuffer.WriteSerializable(ctx, m.GetPdu()) + if popErr := writeBuffer.PopContext("pdu"); popErr != nil { + return errors.Wrap(popErr, "Error popping for pdu") + } + if _pduErr != nil { + return errors.Wrap(_pduErr, "Error serializing 'pdu' field") + } - // Checksum Field (checksum) (Calculated) - { - _checksum, _checksumErr := AsciiLrcCheck(m.GetAddress(), m.GetPdu()) - if _checksumErr != nil { - return errors.Wrap(_checksumErr, "Checksum calculation failed") - } - _checksumWriteErr := writeBuffer.WriteUint8("checksum", 8, (_checksum)) - if _checksumWriteErr != nil { - return errors.Wrap(_checksumWriteErr, "Error serializing 'checksum' field") - } + // Checksum Field (checksum) (Calculated) + { + _checksum, _checksumErr := AsciiLrcCheck(m.GetAddress(), m.GetPdu()) + if _checksumErr != nil { + return errors.Wrap(_checksumErr, "Checksum calculation failed") + } + _checksumWriteErr := writeBuffer.WriteUint8("checksum", 8, (_checksum)) + if _checksumWriteErr != nil { + return errors.Wrap(_checksumWriteErr, "Error serializing 'checksum' field") } + } if popErr := writeBuffer.PopContext("ModbusAsciiADU"); popErr != nil { return errors.Wrap(popErr, "Error popping for ModbusAsciiADU") @@ -255,6 +259,7 @@ func (m *_ModbusAsciiADU) SerializeWithWriteBuffer(ctx context.Context, writeBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusAsciiADU) isModbusAsciiADU() bool { return true } @@ -269,3 +274,6 @@ func (m *_ModbusAsciiADU) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusConstants.go b/plc4go/protocols/modbus/readwrite/model/ModbusConstants.go index 4826ae71cf8..8d99d5e0a27 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusConstants.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusConstants.go @@ -19,6 +19,7 @@ package model + import ( "context" "fmt" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const ModbusConstants_MODBUSTCPDEFAULTPORT uint16 = uint16(502) @@ -48,6 +50,7 @@ type ModbusConstantsExactly interface { type _ModbusConstants struct { } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for const fields. @@ -62,14 +65,15 @@ func (m *_ModbusConstants) GetModbusTcpDefaultPort() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusConstants factory function for _ModbusConstants -func NewModbusConstants() *_ModbusConstants { - return &_ModbusConstants{} +func NewModbusConstants( ) *_ModbusConstants { +return &_ModbusConstants{ } } // Deprecated: use the interface for direct cast func CastModbusConstants(structType interface{}) ModbusConstants { - if casted, ok := structType.(ModbusConstants); ok { + if casted, ok := structType.(ModbusConstants); ok { return casted } if casted, ok := structType.(*ModbusConstants); ok { @@ -91,6 +95,7 @@ func (m *_ModbusConstants) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_ModbusConstants) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -122,7 +127,8 @@ func ModbusConstantsParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu } // Create the instance - return &_ModbusConstants{}, nil + return &_ModbusConstants{ + }, nil } func (m *_ModbusConstants) Serialize() ([]byte, error) { @@ -136,7 +142,7 @@ func (m *_ModbusConstants) Serialize() ([]byte, error) { func (m *_ModbusConstants) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("ModbusConstants"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("ModbusConstants"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for ModbusConstants") } @@ -152,6 +158,7 @@ func (m *_ModbusConstants) SerializeWithWriteBuffer(ctx context.Context, writeBu return nil } + func (m *_ModbusConstants) isModbusConstants() bool { return true } @@ -166,3 +173,6 @@ func (m *_ModbusConstants) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusDataType.go b/plc4go/protocols/modbus/readwrite/model/ModbusDataType.go index bfa22e23333..8f85c8bcf45 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusDataType.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusDataType.go @@ -35,41 +35,41 @@ type IModbusDataType interface { DataTypeSize() uint8 } -const ( - ModbusDataType_BOOL ModbusDataType = 1 - ModbusDataType_BYTE ModbusDataType = 2 - ModbusDataType_WORD ModbusDataType = 3 - ModbusDataType_DWORD ModbusDataType = 4 - ModbusDataType_LWORD ModbusDataType = 5 - ModbusDataType_SINT ModbusDataType = 6 - ModbusDataType_INT ModbusDataType = 7 - ModbusDataType_DINT ModbusDataType = 8 - ModbusDataType_LINT ModbusDataType = 9 - ModbusDataType_USINT ModbusDataType = 10 - ModbusDataType_UINT ModbusDataType = 11 - ModbusDataType_UDINT ModbusDataType = 12 - ModbusDataType_ULINT ModbusDataType = 13 - ModbusDataType_REAL ModbusDataType = 14 - ModbusDataType_LREAL ModbusDataType = 15 - ModbusDataType_TIME ModbusDataType = 16 - ModbusDataType_LTIME ModbusDataType = 17 - ModbusDataType_DATE ModbusDataType = 18 - ModbusDataType_LDATE ModbusDataType = 19 - ModbusDataType_TIME_OF_DAY ModbusDataType = 20 - ModbusDataType_LTIME_OF_DAY ModbusDataType = 21 - ModbusDataType_DATE_AND_TIME ModbusDataType = 22 +const( + ModbusDataType_BOOL ModbusDataType = 1 + ModbusDataType_BYTE ModbusDataType = 2 + ModbusDataType_WORD ModbusDataType = 3 + ModbusDataType_DWORD ModbusDataType = 4 + ModbusDataType_LWORD ModbusDataType = 5 + ModbusDataType_SINT ModbusDataType = 6 + ModbusDataType_INT ModbusDataType = 7 + ModbusDataType_DINT ModbusDataType = 8 + ModbusDataType_LINT ModbusDataType = 9 + ModbusDataType_USINT ModbusDataType = 10 + ModbusDataType_UINT ModbusDataType = 11 + ModbusDataType_UDINT ModbusDataType = 12 + ModbusDataType_ULINT ModbusDataType = 13 + ModbusDataType_REAL ModbusDataType = 14 + ModbusDataType_LREAL ModbusDataType = 15 + ModbusDataType_TIME ModbusDataType = 16 + ModbusDataType_LTIME ModbusDataType = 17 + ModbusDataType_DATE ModbusDataType = 18 + ModbusDataType_LDATE ModbusDataType = 19 + ModbusDataType_TIME_OF_DAY ModbusDataType = 20 + ModbusDataType_LTIME_OF_DAY ModbusDataType = 21 + ModbusDataType_DATE_AND_TIME ModbusDataType = 22 ModbusDataType_LDATE_AND_TIME ModbusDataType = 23 - ModbusDataType_CHAR ModbusDataType = 24 - ModbusDataType_WCHAR ModbusDataType = 25 - ModbusDataType_STRING ModbusDataType = 26 - ModbusDataType_WSTRING ModbusDataType = 27 + ModbusDataType_CHAR ModbusDataType = 24 + ModbusDataType_WCHAR ModbusDataType = 25 + ModbusDataType_STRING ModbusDataType = 26 + ModbusDataType_WSTRING ModbusDataType = 27 ) var ModbusDataTypeValues []ModbusDataType func init() { _ = errors.New - ModbusDataTypeValues = []ModbusDataType{ + ModbusDataTypeValues = []ModbusDataType { ModbusDataType_BOOL, ModbusDataType_BYTE, ModbusDataType_WORD, @@ -100,118 +100,91 @@ func init() { } } + func (e ModbusDataType) DataTypeSize() uint8 { - switch e { - case 1: - { /* '1' */ - return 2 + switch e { + case 1: { /* '1' */ + return 2 } - case 10: - { /* '10' */ - return 2 + case 10: { /* '10' */ + return 2 } - case 11: - { /* '11' */ - return 2 + case 11: { /* '11' */ + return 2 } - case 12: - { /* '12' */ - return 4 + case 12: { /* '12' */ + return 4 } - case 13: - { /* '13' */ - return 8 + case 13: { /* '13' */ + return 8 } - case 14: - { /* '14' */ - return 4 + case 14: { /* '14' */ + return 4 } - case 15: - { /* '15' */ - return 8 + case 15: { /* '15' */ + return 8 } - case 16: - { /* '16' */ - return 8 + case 16: { /* '16' */ + return 8 } - case 17: - { /* '17' */ - return 8 + case 17: { /* '17' */ + return 8 } - case 18: - { /* '18' */ - return 8 + case 18: { /* '18' */ + return 8 } - case 19: - { /* '19' */ - return 8 + case 19: { /* '19' */ + return 8 } - case 2: - { /* '2' */ - return 2 + case 2: { /* '2' */ + return 2 } - case 20: - { /* '20' */ - return 8 + case 20: { /* '20' */ + return 8 } - case 21: - { /* '21' */ - return 8 + case 21: { /* '21' */ + return 8 } - case 22: - { /* '22' */ - return 8 + case 22: { /* '22' */ + return 8 } - case 23: - { /* '23' */ - return 8 + case 23: { /* '23' */ + return 8 } - case 24: - { /* '24' */ - return 1 + case 24: { /* '24' */ + return 1 } - case 25: - { /* '25' */ - return 2 + case 25: { /* '25' */ + return 2 } - case 26: - { /* '26' */ - return 1 + case 26: { /* '26' */ + return 1 } - case 27: - { /* '27' */ - return 2 + case 27: { /* '27' */ + return 2 } - case 3: - { /* '3' */ - return 2 + case 3: { /* '3' */ + return 2 } - case 4: - { /* '4' */ - return 4 + case 4: { /* '4' */ + return 4 } - case 5: - { /* '5' */ - return 8 + case 5: { /* '5' */ + return 8 } - case 6: - { /* '6' */ - return 2 + case 6: { /* '6' */ + return 2 } - case 7: - { /* '7' */ - return 2 + case 7: { /* '7' */ + return 2 } - case 8: - { /* '8' */ - return 4 + case 8: { /* '8' */ + return 4 } - case 9: - { /* '9' */ - return 8 + case 9: { /* '9' */ + return 8 } - default: - { + default: { return 0 } } @@ -227,60 +200,60 @@ func ModbusDataTypeFirstEnumForFieldDataTypeSize(value uint8) (ModbusDataType, e } func ModbusDataTypeByValue(value uint8) (enum ModbusDataType, ok bool) { switch value { - case 1: - return ModbusDataType_BOOL, true - case 10: - return ModbusDataType_USINT, true - case 11: - return ModbusDataType_UINT, true - case 12: - return ModbusDataType_UDINT, true - case 13: - return ModbusDataType_ULINT, true - case 14: - return ModbusDataType_REAL, true - case 15: - return ModbusDataType_LREAL, true - case 16: - return ModbusDataType_TIME, true - case 17: - return ModbusDataType_LTIME, true - case 18: - return ModbusDataType_DATE, true - case 19: - return ModbusDataType_LDATE, true - case 2: - return ModbusDataType_BYTE, true - case 20: - return ModbusDataType_TIME_OF_DAY, true - case 21: - return ModbusDataType_LTIME_OF_DAY, true - case 22: - return ModbusDataType_DATE_AND_TIME, true - case 23: - return ModbusDataType_LDATE_AND_TIME, true - case 24: - return ModbusDataType_CHAR, true - case 25: - return ModbusDataType_WCHAR, true - case 26: - return ModbusDataType_STRING, true - case 27: - return ModbusDataType_WSTRING, true - case 3: - return ModbusDataType_WORD, true - case 4: - return ModbusDataType_DWORD, true - case 5: - return ModbusDataType_LWORD, true - case 6: - return ModbusDataType_SINT, true - case 7: - return ModbusDataType_INT, true - case 8: - return ModbusDataType_DINT, true - case 9: - return ModbusDataType_LINT, true + case 1: + return ModbusDataType_BOOL, true + case 10: + return ModbusDataType_USINT, true + case 11: + return ModbusDataType_UINT, true + case 12: + return ModbusDataType_UDINT, true + case 13: + return ModbusDataType_ULINT, true + case 14: + return ModbusDataType_REAL, true + case 15: + return ModbusDataType_LREAL, true + case 16: + return ModbusDataType_TIME, true + case 17: + return ModbusDataType_LTIME, true + case 18: + return ModbusDataType_DATE, true + case 19: + return ModbusDataType_LDATE, true + case 2: + return ModbusDataType_BYTE, true + case 20: + return ModbusDataType_TIME_OF_DAY, true + case 21: + return ModbusDataType_LTIME_OF_DAY, true + case 22: + return ModbusDataType_DATE_AND_TIME, true + case 23: + return ModbusDataType_LDATE_AND_TIME, true + case 24: + return ModbusDataType_CHAR, true + case 25: + return ModbusDataType_WCHAR, true + case 26: + return ModbusDataType_STRING, true + case 27: + return ModbusDataType_WSTRING, true + case 3: + return ModbusDataType_WORD, true + case 4: + return ModbusDataType_DWORD, true + case 5: + return ModbusDataType_LWORD, true + case 6: + return ModbusDataType_SINT, true + case 7: + return ModbusDataType_INT, true + case 8: + return ModbusDataType_DINT, true + case 9: + return ModbusDataType_LINT, true } return 0, false } @@ -345,13 +318,13 @@ func ModbusDataTypeByName(value string) (enum ModbusDataType, ok bool) { return 0, false } -func ModbusDataTypeKnows(value uint8) bool { +func ModbusDataTypeKnows(value uint8) bool { for _, typeValue := range ModbusDataTypeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastModbusDataType(structType interface{}) ModbusDataType { @@ -465,3 +438,4 @@ func (e ModbusDataType) PLC4XEnumName() string { func (e ModbusDataType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusDeviceInformationConformityLevel.go b/plc4go/protocols/modbus/readwrite/model/ModbusDeviceInformationConformityLevel.go index 55bc11dd07e..32f96af3235 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusDeviceInformationConformityLevel.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusDeviceInformationConformityLevel.go @@ -34,9 +34,9 @@ type IModbusDeviceInformationConformityLevel interface { utils.Serializable } -const ( - ModbusDeviceInformationConformityLevel_BASIC_STREAM_ONLY ModbusDeviceInformationConformityLevel = 0x01 - ModbusDeviceInformationConformityLevel_REGULAR_STREAM_ONLY ModbusDeviceInformationConformityLevel = 0x02 +const( + ModbusDeviceInformationConformityLevel_BASIC_STREAM_ONLY ModbusDeviceInformationConformityLevel = 0x01 + ModbusDeviceInformationConformityLevel_REGULAR_STREAM_ONLY ModbusDeviceInformationConformityLevel = 0x02 ModbusDeviceInformationConformityLevel_EXTENDED_STREAM_ONLY ModbusDeviceInformationConformityLevel = 0x03 ) @@ -44,7 +44,7 @@ var ModbusDeviceInformationConformityLevelValues []ModbusDeviceInformationConfor func init() { _ = errors.New - ModbusDeviceInformationConformityLevelValues = []ModbusDeviceInformationConformityLevel{ + ModbusDeviceInformationConformityLevelValues = []ModbusDeviceInformationConformityLevel { ModbusDeviceInformationConformityLevel_BASIC_STREAM_ONLY, ModbusDeviceInformationConformityLevel_REGULAR_STREAM_ONLY, ModbusDeviceInformationConformityLevel_EXTENDED_STREAM_ONLY, @@ -53,12 +53,12 @@ func init() { func ModbusDeviceInformationConformityLevelByValue(value uint8) (enum ModbusDeviceInformationConformityLevel, ok bool) { switch value { - case 0x01: - return ModbusDeviceInformationConformityLevel_BASIC_STREAM_ONLY, true - case 0x02: - return ModbusDeviceInformationConformityLevel_REGULAR_STREAM_ONLY, true - case 0x03: - return ModbusDeviceInformationConformityLevel_EXTENDED_STREAM_ONLY, true + case 0x01: + return ModbusDeviceInformationConformityLevel_BASIC_STREAM_ONLY, true + case 0x02: + return ModbusDeviceInformationConformityLevel_REGULAR_STREAM_ONLY, true + case 0x03: + return ModbusDeviceInformationConformityLevel_EXTENDED_STREAM_ONLY, true } return 0, false } @@ -75,13 +75,13 @@ func ModbusDeviceInformationConformityLevelByName(value string) (enum ModbusDevi return 0, false } -func ModbusDeviceInformationConformityLevelKnows(value uint8) bool { +func ModbusDeviceInformationConformityLevelKnows(value uint8) bool { for _, typeValue := range ModbusDeviceInformationConformityLevelValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastModbusDeviceInformationConformityLevel(structType interface{}) ModbusDeviceInformationConformityLevel { @@ -147,3 +147,4 @@ func (e ModbusDeviceInformationConformityLevel) PLC4XEnumName() string { func (e ModbusDeviceInformationConformityLevel) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusDeviceInformationLevel.go b/plc4go/protocols/modbus/readwrite/model/ModbusDeviceInformationLevel.go index 9da45f4a9b3..463c0d4eafa 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusDeviceInformationLevel.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusDeviceInformationLevel.go @@ -34,10 +34,10 @@ type IModbusDeviceInformationLevel interface { utils.Serializable } -const ( - ModbusDeviceInformationLevel_BASIC ModbusDeviceInformationLevel = 0x01 - ModbusDeviceInformationLevel_REGULAR ModbusDeviceInformationLevel = 0x02 - ModbusDeviceInformationLevel_EXTENDED ModbusDeviceInformationLevel = 0x03 +const( + ModbusDeviceInformationLevel_BASIC ModbusDeviceInformationLevel = 0x01 + ModbusDeviceInformationLevel_REGULAR ModbusDeviceInformationLevel = 0x02 + ModbusDeviceInformationLevel_EXTENDED ModbusDeviceInformationLevel = 0x03 ModbusDeviceInformationLevel_INDIVIDUAL ModbusDeviceInformationLevel = 0x04 ) @@ -45,7 +45,7 @@ var ModbusDeviceInformationLevelValues []ModbusDeviceInformationLevel func init() { _ = errors.New - ModbusDeviceInformationLevelValues = []ModbusDeviceInformationLevel{ + ModbusDeviceInformationLevelValues = []ModbusDeviceInformationLevel { ModbusDeviceInformationLevel_BASIC, ModbusDeviceInformationLevel_REGULAR, ModbusDeviceInformationLevel_EXTENDED, @@ -55,14 +55,14 @@ func init() { func ModbusDeviceInformationLevelByValue(value uint8) (enum ModbusDeviceInformationLevel, ok bool) { switch value { - case 0x01: - return ModbusDeviceInformationLevel_BASIC, true - case 0x02: - return ModbusDeviceInformationLevel_REGULAR, true - case 0x03: - return ModbusDeviceInformationLevel_EXTENDED, true - case 0x04: - return ModbusDeviceInformationLevel_INDIVIDUAL, true + case 0x01: + return ModbusDeviceInformationLevel_BASIC, true + case 0x02: + return ModbusDeviceInformationLevel_REGULAR, true + case 0x03: + return ModbusDeviceInformationLevel_EXTENDED, true + case 0x04: + return ModbusDeviceInformationLevel_INDIVIDUAL, true } return 0, false } @@ -81,13 +81,13 @@ func ModbusDeviceInformationLevelByName(value string) (enum ModbusDeviceInformat return 0, false } -func ModbusDeviceInformationLevelKnows(value uint8) bool { +func ModbusDeviceInformationLevelKnows(value uint8) bool { for _, typeValue := range ModbusDeviceInformationLevelValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastModbusDeviceInformationLevel(structType interface{}) ModbusDeviceInformationLevel { @@ -155,3 +155,4 @@ func (e ModbusDeviceInformationLevel) PLC4XEnumName() string { func (e ModbusDeviceInformationLevel) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusDeviceInformationMoreFollows.go b/plc4go/protocols/modbus/readwrite/model/ModbusDeviceInformationMoreFollows.go index be913db0087..ec27f97047c 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusDeviceInformationMoreFollows.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusDeviceInformationMoreFollows.go @@ -34,16 +34,16 @@ type IModbusDeviceInformationMoreFollows interface { utils.Serializable } -const ( +const( ModbusDeviceInformationMoreFollows_NO_MORE_OBJECTS_AVAILABLE ModbusDeviceInformationMoreFollows = 0x00 - ModbusDeviceInformationMoreFollows_MORE_OBJECTS_AVAILABLE ModbusDeviceInformationMoreFollows = 0xFF + ModbusDeviceInformationMoreFollows_MORE_OBJECTS_AVAILABLE ModbusDeviceInformationMoreFollows = 0xFF ) var ModbusDeviceInformationMoreFollowsValues []ModbusDeviceInformationMoreFollows func init() { _ = errors.New - ModbusDeviceInformationMoreFollowsValues = []ModbusDeviceInformationMoreFollows{ + ModbusDeviceInformationMoreFollowsValues = []ModbusDeviceInformationMoreFollows { ModbusDeviceInformationMoreFollows_NO_MORE_OBJECTS_AVAILABLE, ModbusDeviceInformationMoreFollows_MORE_OBJECTS_AVAILABLE, } @@ -51,10 +51,10 @@ func init() { func ModbusDeviceInformationMoreFollowsByValue(value uint8) (enum ModbusDeviceInformationMoreFollows, ok bool) { switch value { - case 0x00: - return ModbusDeviceInformationMoreFollows_NO_MORE_OBJECTS_AVAILABLE, true - case 0xFF: - return ModbusDeviceInformationMoreFollows_MORE_OBJECTS_AVAILABLE, true + case 0x00: + return ModbusDeviceInformationMoreFollows_NO_MORE_OBJECTS_AVAILABLE, true + case 0xFF: + return ModbusDeviceInformationMoreFollows_MORE_OBJECTS_AVAILABLE, true } return 0, false } @@ -69,13 +69,13 @@ func ModbusDeviceInformationMoreFollowsByName(value string) (enum ModbusDeviceIn return 0, false } -func ModbusDeviceInformationMoreFollowsKnows(value uint8) bool { +func ModbusDeviceInformationMoreFollowsKnows(value uint8) bool { for _, typeValue := range ModbusDeviceInformationMoreFollowsValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastModbusDeviceInformationMoreFollows(structType interface{}) ModbusDeviceInformationMoreFollows { @@ -139,3 +139,4 @@ func (e ModbusDeviceInformationMoreFollows) PLC4XEnumName() string { func (e ModbusDeviceInformationMoreFollows) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusDeviceInformationObject.go b/plc4go/protocols/modbus/readwrite/model/ModbusDeviceInformationObject.go index 7b619a0380c..520142618b0 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusDeviceInformationObject.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusDeviceInformationObject.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusDeviceInformationObject is the corresponding interface of ModbusDeviceInformationObject type ModbusDeviceInformationObject interface { @@ -46,10 +48,11 @@ type ModbusDeviceInformationObjectExactly interface { // _ModbusDeviceInformationObject is the data-structure of this message type _ModbusDeviceInformationObject struct { - ObjectId uint8 - Data []byte + ObjectId uint8 + Data []byte } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -68,14 +71,15 @@ func (m *_ModbusDeviceInformationObject) GetData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusDeviceInformationObject factory function for _ModbusDeviceInformationObject -func NewModbusDeviceInformationObject(objectId uint8, data []byte) *_ModbusDeviceInformationObject { - return &_ModbusDeviceInformationObject{ObjectId: objectId, Data: data} +func NewModbusDeviceInformationObject( objectId uint8 , data []byte ) *_ModbusDeviceInformationObject { +return &_ModbusDeviceInformationObject{ ObjectId: objectId , Data: data } } // Deprecated: use the interface for direct cast func CastModbusDeviceInformationObject(structType interface{}) ModbusDeviceInformationObject { - if casted, ok := structType.(ModbusDeviceInformationObject); ok { + if casted, ok := structType.(ModbusDeviceInformationObject); ok { return casted } if casted, ok := structType.(*ModbusDeviceInformationObject); ok { @@ -92,7 +96,7 @@ func (m *_ModbusDeviceInformationObject) GetLengthInBits(ctx context.Context) ui lengthInBits := uint16(0) // Simple field (objectId) - lengthInBits += 8 + lengthInBits += 8; // Implicit Field (objectLength) lengthInBits += 8 @@ -105,6 +109,7 @@ func (m *_ModbusDeviceInformationObject) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_ModbusDeviceInformationObject) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -123,7 +128,7 @@ func ModbusDeviceInformationObjectParseWithBuffer(ctx context.Context, readBuffe _ = currentPos // Simple Field (objectId) - _objectId, _objectIdErr := readBuffer.ReadUint8("objectId", 8) +_objectId, _objectIdErr := readBuffer.ReadUint8("objectId", 8) if _objectIdErr != nil { return nil, errors.Wrap(_objectIdErr, "Error parsing 'objectId' field of ModbusDeviceInformationObject") } @@ -148,9 +153,9 @@ func ModbusDeviceInformationObjectParseWithBuffer(ctx context.Context, readBuffe // Create the instance return &_ModbusDeviceInformationObject{ - ObjectId: objectId, - Data: data, - }, nil + ObjectId: objectId, + Data: data, + }, nil } func (m *_ModbusDeviceInformationObject) Serialize() ([]byte, error) { @@ -164,7 +169,7 @@ func (m *_ModbusDeviceInformationObject) Serialize() ([]byte, error) { func (m *_ModbusDeviceInformationObject) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("ModbusDeviceInformationObject"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("ModbusDeviceInformationObject"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for ModbusDeviceInformationObject") } @@ -194,6 +199,7 @@ func (m *_ModbusDeviceInformationObject) SerializeWithWriteBuffer(ctx context.Co return nil } + func (m *_ModbusDeviceInformationObject) isModbusDeviceInformationObject() bool { return true } @@ -208,3 +214,6 @@ func (m *_ModbusDeviceInformationObject) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusErrorCode.go b/plc4go/protocols/modbus/readwrite/model/ModbusErrorCode.go index 4f10f4d6dcf..3e314caf023 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusErrorCode.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusErrorCode.go @@ -34,16 +34,16 @@ type IModbusErrorCode interface { utils.Serializable } -const ( - ModbusErrorCode_ILLEGAL_FUNCTION ModbusErrorCode = 1 - ModbusErrorCode_ILLEGAL_DATA_ADDRESS ModbusErrorCode = 2 - ModbusErrorCode_ILLEGAL_DATA_VALUE ModbusErrorCode = 3 - ModbusErrorCode_SLAVE_DEVICE_FAILURE ModbusErrorCode = 4 - ModbusErrorCode_ACKNOWLEDGE ModbusErrorCode = 5 - ModbusErrorCode_SLAVE_DEVICE_BUSY ModbusErrorCode = 6 - ModbusErrorCode_NEGATIVE_ACKNOWLEDGE ModbusErrorCode = 7 - ModbusErrorCode_MEMORY_PARITY_ERROR ModbusErrorCode = 8 - ModbusErrorCode_GATEWAY_PATH_UNAVAILABLE ModbusErrorCode = 10 +const( + ModbusErrorCode_ILLEGAL_FUNCTION ModbusErrorCode = 1 + ModbusErrorCode_ILLEGAL_DATA_ADDRESS ModbusErrorCode = 2 + ModbusErrorCode_ILLEGAL_DATA_VALUE ModbusErrorCode = 3 + ModbusErrorCode_SLAVE_DEVICE_FAILURE ModbusErrorCode = 4 + ModbusErrorCode_ACKNOWLEDGE ModbusErrorCode = 5 + ModbusErrorCode_SLAVE_DEVICE_BUSY ModbusErrorCode = 6 + ModbusErrorCode_NEGATIVE_ACKNOWLEDGE ModbusErrorCode = 7 + ModbusErrorCode_MEMORY_PARITY_ERROR ModbusErrorCode = 8 + ModbusErrorCode_GATEWAY_PATH_UNAVAILABLE ModbusErrorCode = 10 ModbusErrorCode_GATEWAY_TARGET_DEVICE_FAILED_TO_RESPOND ModbusErrorCode = 11 ) @@ -51,7 +51,7 @@ var ModbusErrorCodeValues []ModbusErrorCode func init() { _ = errors.New - ModbusErrorCodeValues = []ModbusErrorCode{ + ModbusErrorCodeValues = []ModbusErrorCode { ModbusErrorCode_ILLEGAL_FUNCTION, ModbusErrorCode_ILLEGAL_DATA_ADDRESS, ModbusErrorCode_ILLEGAL_DATA_VALUE, @@ -67,26 +67,26 @@ func init() { func ModbusErrorCodeByValue(value uint8) (enum ModbusErrorCode, ok bool) { switch value { - case 1: - return ModbusErrorCode_ILLEGAL_FUNCTION, true - case 10: - return ModbusErrorCode_GATEWAY_PATH_UNAVAILABLE, true - case 11: - return ModbusErrorCode_GATEWAY_TARGET_DEVICE_FAILED_TO_RESPOND, true - case 2: - return ModbusErrorCode_ILLEGAL_DATA_ADDRESS, true - case 3: - return ModbusErrorCode_ILLEGAL_DATA_VALUE, true - case 4: - return ModbusErrorCode_SLAVE_DEVICE_FAILURE, true - case 5: - return ModbusErrorCode_ACKNOWLEDGE, true - case 6: - return ModbusErrorCode_SLAVE_DEVICE_BUSY, true - case 7: - return ModbusErrorCode_NEGATIVE_ACKNOWLEDGE, true - case 8: - return ModbusErrorCode_MEMORY_PARITY_ERROR, true + case 1: + return ModbusErrorCode_ILLEGAL_FUNCTION, true + case 10: + return ModbusErrorCode_GATEWAY_PATH_UNAVAILABLE, true + case 11: + return ModbusErrorCode_GATEWAY_TARGET_DEVICE_FAILED_TO_RESPOND, true + case 2: + return ModbusErrorCode_ILLEGAL_DATA_ADDRESS, true + case 3: + return ModbusErrorCode_ILLEGAL_DATA_VALUE, true + case 4: + return ModbusErrorCode_SLAVE_DEVICE_FAILURE, true + case 5: + return ModbusErrorCode_ACKNOWLEDGE, true + case 6: + return ModbusErrorCode_SLAVE_DEVICE_BUSY, true + case 7: + return ModbusErrorCode_NEGATIVE_ACKNOWLEDGE, true + case 8: + return ModbusErrorCode_MEMORY_PARITY_ERROR, true } return 0, false } @@ -117,13 +117,13 @@ func ModbusErrorCodeByName(value string) (enum ModbusErrorCode, ok bool) { return 0, false } -func ModbusErrorCodeKnows(value uint8) bool { +func ModbusErrorCodeKnows(value uint8) bool { for _, typeValue := range ModbusErrorCodeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastModbusErrorCode(structType interface{}) ModbusErrorCode { @@ -203,3 +203,4 @@ func (e ModbusErrorCode) PLC4XEnumName() string { func (e ModbusErrorCode) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDU.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDU.go index 87311001ae0..f7e9fb49dbb 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDU.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDU.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDU is the corresponding interface of ModbusPDU type ModbusPDU interface { @@ -59,6 +61,7 @@ type _ModbusPDUChildRequirements interface { GetResponse() bool } + type ModbusPDUParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child ModbusPDU, serializeChildFunction func() error) error GetTypeName() string @@ -66,21 +69,22 @@ type ModbusPDUParent interface { type ModbusPDUChild interface { utils.Serializable - InitializeParent(parent ModbusPDU) +InitializeParent(parent ModbusPDU ) GetParent() *ModbusPDU GetTypeName() string ModbusPDU } + // NewModbusPDU factory function for _ModbusPDU -func NewModbusPDU() *_ModbusPDU { - return &_ModbusPDU{} +func NewModbusPDU( ) *_ModbusPDU { +return &_ModbusPDU{ } } // Deprecated: use the interface for direct cast func CastModbusPDU(structType interface{}) ModbusPDU { - if casted, ok := structType.(ModbusPDU); ok { + if casted, ok := structType.(ModbusPDU); ok { return casted } if casted, ok := structType.(*ModbusPDU); ok { @@ -93,12 +97,13 @@ func (m *_ModbusPDU) GetTypeName() string { return "ModbusPDU" } + func (m *_ModbusPDU) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Discriminator Field (errorFlag) - lengthInBits += 1 + lengthInBits += 1; // Discriminator Field (functionFlag) - lengthInBits += 7 + lengthInBits += 7; return lengthInBits } @@ -135,90 +140,90 @@ func ModbusPDUParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type ModbusPDUChildSerializeRequirement interface { ModbusPDU - InitializeParent(ModbusPDU) + InitializeParent(ModbusPDU ) GetParent() ModbusPDU } var _childTemp interface{} var _child ModbusPDUChildSerializeRequirement var typeSwitchError error switch { - case errorFlag == bool(true): // ModbusPDUError +case errorFlag == bool(true) : // ModbusPDUError _childTemp, typeSwitchError = ModbusPDUErrorParseWithBuffer(ctx, readBuffer, response) - case errorFlag == bool(false) && functionFlag == 0x02 && response == bool(false): // ModbusPDUReadDiscreteInputsRequest +case errorFlag == bool(false) && functionFlag == 0x02 && response == bool(false) : // ModbusPDUReadDiscreteInputsRequest _childTemp, typeSwitchError = ModbusPDUReadDiscreteInputsRequestParseWithBuffer(ctx, readBuffer, response) - case errorFlag == bool(false) && functionFlag == 0x02 && response == bool(true): // ModbusPDUReadDiscreteInputsResponse +case errorFlag == bool(false) && functionFlag == 0x02 && response == bool(true) : // ModbusPDUReadDiscreteInputsResponse _childTemp, typeSwitchError = ModbusPDUReadDiscreteInputsResponseParseWithBuffer(ctx, readBuffer, response) - case errorFlag == bool(false) && functionFlag == 0x01 && response == bool(false): // ModbusPDUReadCoilsRequest +case errorFlag == bool(false) && functionFlag == 0x01 && response == bool(false) : // ModbusPDUReadCoilsRequest _childTemp, typeSwitchError = ModbusPDUReadCoilsRequestParseWithBuffer(ctx, readBuffer, response) - case errorFlag == bool(false) && functionFlag == 0x01 && response == bool(true): // ModbusPDUReadCoilsResponse +case errorFlag == bool(false) && functionFlag == 0x01 && response == bool(true) : // ModbusPDUReadCoilsResponse _childTemp, typeSwitchError = ModbusPDUReadCoilsResponseParseWithBuffer(ctx, readBuffer, response) - case errorFlag == bool(false) && functionFlag == 0x05 && response == bool(false): // ModbusPDUWriteSingleCoilRequest +case errorFlag == bool(false) && functionFlag == 0x05 && response == bool(false) : // ModbusPDUWriteSingleCoilRequest _childTemp, typeSwitchError = ModbusPDUWriteSingleCoilRequestParseWithBuffer(ctx, readBuffer, response) - case errorFlag == bool(false) && functionFlag == 0x05 && response == bool(true): // ModbusPDUWriteSingleCoilResponse +case errorFlag == bool(false) && functionFlag == 0x05 && response == bool(true) : // ModbusPDUWriteSingleCoilResponse _childTemp, typeSwitchError = ModbusPDUWriteSingleCoilResponseParseWithBuffer(ctx, readBuffer, response) - case errorFlag == bool(false) && functionFlag == 0x0F && response == bool(false): // ModbusPDUWriteMultipleCoilsRequest +case errorFlag == bool(false) && functionFlag == 0x0F && response == bool(false) : // ModbusPDUWriteMultipleCoilsRequest _childTemp, typeSwitchError = ModbusPDUWriteMultipleCoilsRequestParseWithBuffer(ctx, readBuffer, response) - case errorFlag == bool(false) && functionFlag == 0x0F && response == bool(true): // ModbusPDUWriteMultipleCoilsResponse +case errorFlag == bool(false) && functionFlag == 0x0F && response == bool(true) : // ModbusPDUWriteMultipleCoilsResponse _childTemp, typeSwitchError = ModbusPDUWriteMultipleCoilsResponseParseWithBuffer(ctx, readBuffer, response) - case errorFlag == bool(false) && functionFlag == 0x04 && response == bool(false): // ModbusPDUReadInputRegistersRequest +case errorFlag == bool(false) && functionFlag == 0x04 && response == bool(false) : // ModbusPDUReadInputRegistersRequest _childTemp, typeSwitchError = ModbusPDUReadInputRegistersRequestParseWithBuffer(ctx, readBuffer, response) - case errorFlag == bool(false) && functionFlag == 0x04 && response == bool(true): // ModbusPDUReadInputRegistersResponse +case errorFlag == bool(false) && functionFlag == 0x04 && response == bool(true) : // ModbusPDUReadInputRegistersResponse _childTemp, typeSwitchError = ModbusPDUReadInputRegistersResponseParseWithBuffer(ctx, readBuffer, response) - case errorFlag == bool(false) && functionFlag == 0x03 && response == bool(false): // ModbusPDUReadHoldingRegistersRequest +case errorFlag == bool(false) && functionFlag == 0x03 && response == bool(false) : // ModbusPDUReadHoldingRegistersRequest _childTemp, typeSwitchError = ModbusPDUReadHoldingRegistersRequestParseWithBuffer(ctx, readBuffer, response) - case errorFlag == bool(false) && functionFlag == 0x03 && response == bool(true): // ModbusPDUReadHoldingRegistersResponse +case errorFlag == bool(false) && functionFlag == 0x03 && response == bool(true) : // ModbusPDUReadHoldingRegistersResponse _childTemp, typeSwitchError = ModbusPDUReadHoldingRegistersResponseParseWithBuffer(ctx, readBuffer, response) - case errorFlag == bool(false) && functionFlag == 0x06 && response == bool(false): // ModbusPDUWriteSingleRegisterRequest +case errorFlag == bool(false) && functionFlag == 0x06 && response == bool(false) : // ModbusPDUWriteSingleRegisterRequest _childTemp, typeSwitchError = ModbusPDUWriteSingleRegisterRequestParseWithBuffer(ctx, readBuffer, response) - case errorFlag == bool(false) && functionFlag == 0x06 && response == bool(true): // ModbusPDUWriteSingleRegisterResponse +case errorFlag == bool(false) && functionFlag == 0x06 && response == bool(true) : // ModbusPDUWriteSingleRegisterResponse _childTemp, typeSwitchError = ModbusPDUWriteSingleRegisterResponseParseWithBuffer(ctx, readBuffer, response) - case errorFlag == bool(false) && functionFlag == 0x10 && response == bool(false): // ModbusPDUWriteMultipleHoldingRegistersRequest +case errorFlag == bool(false) && functionFlag == 0x10 && response == bool(false) : // ModbusPDUWriteMultipleHoldingRegistersRequest _childTemp, typeSwitchError = ModbusPDUWriteMultipleHoldingRegistersRequestParseWithBuffer(ctx, readBuffer, response) - case errorFlag == bool(false) && functionFlag == 0x10 && response == bool(true): // ModbusPDUWriteMultipleHoldingRegistersResponse +case errorFlag == bool(false) && functionFlag == 0x10 && response == bool(true) : // ModbusPDUWriteMultipleHoldingRegistersResponse _childTemp, typeSwitchError = ModbusPDUWriteMultipleHoldingRegistersResponseParseWithBuffer(ctx, readBuffer, response) - case errorFlag == bool(false) && functionFlag == 0x17 && response == bool(false): // ModbusPDUReadWriteMultipleHoldingRegistersRequest +case errorFlag == bool(false) && functionFlag == 0x17 && response == bool(false) : // ModbusPDUReadWriteMultipleHoldingRegistersRequest _childTemp, typeSwitchError = ModbusPDUReadWriteMultipleHoldingRegistersRequestParseWithBuffer(ctx, readBuffer, response) - case errorFlag == bool(false) && functionFlag == 0x17 && response == bool(true): // ModbusPDUReadWriteMultipleHoldingRegistersResponse +case errorFlag == bool(false) && functionFlag == 0x17 && response == bool(true) : // ModbusPDUReadWriteMultipleHoldingRegistersResponse _childTemp, typeSwitchError = ModbusPDUReadWriteMultipleHoldingRegistersResponseParseWithBuffer(ctx, readBuffer, response) - case errorFlag == bool(false) && functionFlag == 0x16 && response == bool(false): // ModbusPDUMaskWriteHoldingRegisterRequest +case errorFlag == bool(false) && functionFlag == 0x16 && response == bool(false) : // ModbusPDUMaskWriteHoldingRegisterRequest _childTemp, typeSwitchError = ModbusPDUMaskWriteHoldingRegisterRequestParseWithBuffer(ctx, readBuffer, response) - case errorFlag == bool(false) && functionFlag == 0x16 && response == bool(true): // ModbusPDUMaskWriteHoldingRegisterResponse +case errorFlag == bool(false) && functionFlag == 0x16 && response == bool(true) : // ModbusPDUMaskWriteHoldingRegisterResponse _childTemp, typeSwitchError = ModbusPDUMaskWriteHoldingRegisterResponseParseWithBuffer(ctx, readBuffer, response) - case errorFlag == bool(false) && functionFlag == 0x18 && response == bool(false): // ModbusPDUReadFifoQueueRequest +case errorFlag == bool(false) && functionFlag == 0x18 && response == bool(false) : // ModbusPDUReadFifoQueueRequest _childTemp, typeSwitchError = ModbusPDUReadFifoQueueRequestParseWithBuffer(ctx, readBuffer, response) - case errorFlag == bool(false) && functionFlag == 0x18 && response == bool(true): // ModbusPDUReadFifoQueueResponse +case errorFlag == bool(false) && functionFlag == 0x18 && response == bool(true) : // ModbusPDUReadFifoQueueResponse _childTemp, typeSwitchError = ModbusPDUReadFifoQueueResponseParseWithBuffer(ctx, readBuffer, response) - case errorFlag == bool(false) && functionFlag == 0x14 && response == bool(false): // ModbusPDUReadFileRecordRequest +case errorFlag == bool(false) && functionFlag == 0x14 && response == bool(false) : // ModbusPDUReadFileRecordRequest _childTemp, typeSwitchError = ModbusPDUReadFileRecordRequestParseWithBuffer(ctx, readBuffer, response) - case errorFlag == bool(false) && functionFlag == 0x14 && response == bool(true): // ModbusPDUReadFileRecordResponse +case errorFlag == bool(false) && functionFlag == 0x14 && response == bool(true) : // ModbusPDUReadFileRecordResponse _childTemp, typeSwitchError = ModbusPDUReadFileRecordResponseParseWithBuffer(ctx, readBuffer, response) - case errorFlag == bool(false) && functionFlag == 0x15 && response == bool(false): // ModbusPDUWriteFileRecordRequest +case errorFlag == bool(false) && functionFlag == 0x15 && response == bool(false) : // ModbusPDUWriteFileRecordRequest _childTemp, typeSwitchError = ModbusPDUWriteFileRecordRequestParseWithBuffer(ctx, readBuffer, response) - case errorFlag == bool(false) && functionFlag == 0x15 && response == bool(true): // ModbusPDUWriteFileRecordResponse +case errorFlag == bool(false) && functionFlag == 0x15 && response == bool(true) : // ModbusPDUWriteFileRecordResponse _childTemp, typeSwitchError = ModbusPDUWriteFileRecordResponseParseWithBuffer(ctx, readBuffer, response) - case errorFlag == bool(false) && functionFlag == 0x07 && response == bool(false): // ModbusPDUReadExceptionStatusRequest +case errorFlag == bool(false) && functionFlag == 0x07 && response == bool(false) : // ModbusPDUReadExceptionStatusRequest _childTemp, typeSwitchError = ModbusPDUReadExceptionStatusRequestParseWithBuffer(ctx, readBuffer, response) - case errorFlag == bool(false) && functionFlag == 0x07 && response == bool(true): // ModbusPDUReadExceptionStatusResponse +case errorFlag == bool(false) && functionFlag == 0x07 && response == bool(true) : // ModbusPDUReadExceptionStatusResponse _childTemp, typeSwitchError = ModbusPDUReadExceptionStatusResponseParseWithBuffer(ctx, readBuffer, response) - case errorFlag == bool(false) && functionFlag == 0x08 && response == bool(false): // ModbusPDUDiagnosticRequest +case errorFlag == bool(false) && functionFlag == 0x08 && response == bool(false) : // ModbusPDUDiagnosticRequest _childTemp, typeSwitchError = ModbusPDUDiagnosticRequestParseWithBuffer(ctx, readBuffer, response) - case errorFlag == bool(false) && functionFlag == 0x08 && response == bool(true): // ModbusPDUDiagnosticResponse +case errorFlag == bool(false) && functionFlag == 0x08 && response == bool(true) : // ModbusPDUDiagnosticResponse _childTemp, typeSwitchError = ModbusPDUDiagnosticResponseParseWithBuffer(ctx, readBuffer, response) - case errorFlag == bool(false) && functionFlag == 0x0B && response == bool(false): // ModbusPDUGetComEventCounterRequest +case errorFlag == bool(false) && functionFlag == 0x0B && response == bool(false) : // ModbusPDUGetComEventCounterRequest _childTemp, typeSwitchError = ModbusPDUGetComEventCounterRequestParseWithBuffer(ctx, readBuffer, response) - case errorFlag == bool(false) && functionFlag == 0x0B && response == bool(true): // ModbusPDUGetComEventCounterResponse +case errorFlag == bool(false) && functionFlag == 0x0B && response == bool(true) : // ModbusPDUGetComEventCounterResponse _childTemp, typeSwitchError = ModbusPDUGetComEventCounterResponseParseWithBuffer(ctx, readBuffer, response) - case errorFlag == bool(false) && functionFlag == 0x0C && response == bool(false): // ModbusPDUGetComEventLogRequest +case errorFlag == bool(false) && functionFlag == 0x0C && response == bool(false) : // ModbusPDUGetComEventLogRequest _childTemp, typeSwitchError = ModbusPDUGetComEventLogRequestParseWithBuffer(ctx, readBuffer, response) - case errorFlag == bool(false) && functionFlag == 0x0C && response == bool(true): // ModbusPDUGetComEventLogResponse +case errorFlag == bool(false) && functionFlag == 0x0C && response == bool(true) : // ModbusPDUGetComEventLogResponse _childTemp, typeSwitchError = ModbusPDUGetComEventLogResponseParseWithBuffer(ctx, readBuffer, response) - case errorFlag == bool(false) && functionFlag == 0x11 && response == bool(false): // ModbusPDUReportServerIdRequest +case errorFlag == bool(false) && functionFlag == 0x11 && response == bool(false) : // ModbusPDUReportServerIdRequest _childTemp, typeSwitchError = ModbusPDUReportServerIdRequestParseWithBuffer(ctx, readBuffer, response) - case errorFlag == bool(false) && functionFlag == 0x11 && response == bool(true): // ModbusPDUReportServerIdResponse +case errorFlag == bool(false) && functionFlag == 0x11 && response == bool(true) : // ModbusPDUReportServerIdResponse _childTemp, typeSwitchError = ModbusPDUReportServerIdResponseParseWithBuffer(ctx, readBuffer, response) - case errorFlag == bool(false) && functionFlag == 0x2B && response == bool(false): // ModbusPDUReadDeviceIdentificationRequest +case errorFlag == bool(false) && functionFlag == 0x2B && response == bool(false) : // ModbusPDUReadDeviceIdentificationRequest _childTemp, typeSwitchError = ModbusPDUReadDeviceIdentificationRequestParseWithBuffer(ctx, readBuffer, response) - case errorFlag == bool(false) && functionFlag == 0x2B && response == bool(true): // ModbusPDUReadDeviceIdentificationResponse +case errorFlag == bool(false) && functionFlag == 0x2B && response == bool(true) : // ModbusPDUReadDeviceIdentificationResponse _childTemp, typeSwitchError = ModbusPDUReadDeviceIdentificationResponseParseWithBuffer(ctx, readBuffer, response) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [errorFlag=%v, functionFlag=%v, response=%v]", errorFlag, functionFlag, response) @@ -233,7 +238,7 @@ func ModbusPDUParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, } // Finish initializing - _child.InitializeParent(_child) +_child.InitializeParent(_child ) return _child, nil } @@ -243,7 +248,7 @@ func (pm *_ModbusPDU) SerializeParent(ctx context.Context, writeBuffer utils.Wri _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("ModbusPDU"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("ModbusPDU"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for ModbusPDU") } @@ -274,6 +279,7 @@ func (pm *_ModbusPDU) SerializeParent(ctx context.Context, writeBuffer utils.Wri return nil } + func (m *_ModbusPDU) isModbusPDU() bool { return true } @@ -288,3 +294,6 @@ func (m *_ModbusPDU) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUDiagnosticRequest.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUDiagnosticRequest.go index 3bed1f42fb4..c109bbc2e21 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUDiagnosticRequest.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUDiagnosticRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUDiagnosticRequest is the corresponding interface of ModbusPDUDiagnosticRequest type ModbusPDUDiagnosticRequest interface { @@ -48,38 +50,36 @@ type ModbusPDUDiagnosticRequestExactly interface { // _ModbusPDUDiagnosticRequest is the data-structure of this message type _ModbusPDUDiagnosticRequest struct { *_ModbusPDU - SubFunction uint16 - Data uint16 + SubFunction uint16 + Data uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusPDUDiagnosticRequest) GetErrorFlag() bool { - return bool(false) -} +func (m *_ModbusPDUDiagnosticRequest) GetErrorFlag() bool { +return bool(false)} -func (m *_ModbusPDUDiagnosticRequest) GetFunctionFlag() uint8 { - return 0x08 -} +func (m *_ModbusPDUDiagnosticRequest) GetFunctionFlag() uint8 { +return 0x08} -func (m *_ModbusPDUDiagnosticRequest) GetResponse() bool { - return bool(false) -} +func (m *_ModbusPDUDiagnosticRequest) GetResponse() bool { +return bool(false)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusPDUDiagnosticRequest) InitializeParent(parent ModbusPDU) {} +func (m *_ModbusPDUDiagnosticRequest) InitializeParent(parent ModbusPDU ) {} -func (m *_ModbusPDUDiagnosticRequest) GetParent() ModbusPDU { +func (m *_ModbusPDUDiagnosticRequest) GetParent() ModbusPDU { return m._ModbusPDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,12 +98,13 @@ func (m *_ModbusPDUDiagnosticRequest) GetData() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusPDUDiagnosticRequest factory function for _ModbusPDUDiagnosticRequest -func NewModbusPDUDiagnosticRequest(subFunction uint16, data uint16) *_ModbusPDUDiagnosticRequest { +func NewModbusPDUDiagnosticRequest( subFunction uint16 , data uint16 ) *_ModbusPDUDiagnosticRequest { _result := &_ModbusPDUDiagnosticRequest{ SubFunction: subFunction, - Data: data, - _ModbusPDU: NewModbusPDU(), + Data: data, + _ModbusPDU: NewModbusPDU(), } _result._ModbusPDU._ModbusPDUChildRequirements = _result return _result @@ -111,7 +112,7 @@ func NewModbusPDUDiagnosticRequest(subFunction uint16, data uint16) *_ModbusPDUD // Deprecated: use the interface for direct cast func CastModbusPDUDiagnosticRequest(structType interface{}) ModbusPDUDiagnosticRequest { - if casted, ok := structType.(ModbusPDUDiagnosticRequest); ok { + if casted, ok := structType.(ModbusPDUDiagnosticRequest); ok { return casted } if casted, ok := structType.(*ModbusPDUDiagnosticRequest); ok { @@ -128,14 +129,15 @@ func (m *_ModbusPDUDiagnosticRequest) GetLengthInBits(ctx context.Context) uint1 lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (subFunction) - lengthInBits += 16 + lengthInBits += 16; // Simple field (data) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_ModbusPDUDiagnosticRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,14 +156,14 @@ func ModbusPDUDiagnosticRequestParseWithBuffer(ctx context.Context, readBuffer u _ = currentPos // Simple Field (subFunction) - _subFunction, _subFunctionErr := readBuffer.ReadUint16("subFunction", 16) +_subFunction, _subFunctionErr := readBuffer.ReadUint16("subFunction", 16) if _subFunctionErr != nil { return nil, errors.Wrap(_subFunctionErr, "Error parsing 'subFunction' field of ModbusPDUDiagnosticRequest") } subFunction := _subFunction // Simple Field (data) - _data, _dataErr := readBuffer.ReadUint16("data", 16) +_data, _dataErr := readBuffer.ReadUint16("data", 16) if _dataErr != nil { return nil, errors.Wrap(_dataErr, "Error parsing 'data' field of ModbusPDUDiagnosticRequest") } @@ -173,9 +175,10 @@ func ModbusPDUDiagnosticRequestParseWithBuffer(ctx context.Context, readBuffer u // Create a partially initialized instance _child := &_ModbusPDUDiagnosticRequest{ - _ModbusPDU: &_ModbusPDU{}, + _ModbusPDU: &_ModbusPDU{ + }, SubFunction: subFunction, - Data: data, + Data: data, } _child._ModbusPDU._ModbusPDUChildRequirements = _child return _child, nil @@ -197,19 +200,19 @@ func (m *_ModbusPDUDiagnosticRequest) SerializeWithWriteBuffer(ctx context.Conte return errors.Wrap(pushErr, "Error pushing for ModbusPDUDiagnosticRequest") } - // Simple Field (subFunction) - subFunction := uint16(m.GetSubFunction()) - _subFunctionErr := writeBuffer.WriteUint16("subFunction", 16, (subFunction)) - if _subFunctionErr != nil { - return errors.Wrap(_subFunctionErr, "Error serializing 'subFunction' field") - } + // Simple Field (subFunction) + subFunction := uint16(m.GetSubFunction()) + _subFunctionErr := writeBuffer.WriteUint16("subFunction", 16, (subFunction)) + if _subFunctionErr != nil { + return errors.Wrap(_subFunctionErr, "Error serializing 'subFunction' field") + } - // Simple Field (data) - data := uint16(m.GetData()) - _dataErr := writeBuffer.WriteUint16("data", 16, (data)) - if _dataErr != nil { - return errors.Wrap(_dataErr, "Error serializing 'data' field") - } + // Simple Field (data) + data := uint16(m.GetData()) + _dataErr := writeBuffer.WriteUint16("data", 16, (data)) + if _dataErr != nil { + return errors.Wrap(_dataErr, "Error serializing 'data' field") + } if popErr := writeBuffer.PopContext("ModbusPDUDiagnosticRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for ModbusPDUDiagnosticRequest") @@ -219,6 +222,7 @@ func (m *_ModbusPDUDiagnosticRequest) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusPDUDiagnosticRequest) isModbusPDUDiagnosticRequest() bool { return true } @@ -233,3 +237,6 @@ func (m *_ModbusPDUDiagnosticRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUDiagnosticResponse.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUDiagnosticResponse.go index e8ca12c1764..d78528b9d87 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUDiagnosticResponse.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUDiagnosticResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUDiagnosticResponse is the corresponding interface of ModbusPDUDiagnosticResponse type ModbusPDUDiagnosticResponse interface { @@ -48,38 +50,36 @@ type ModbusPDUDiagnosticResponseExactly interface { // _ModbusPDUDiagnosticResponse is the data-structure of this message type _ModbusPDUDiagnosticResponse struct { *_ModbusPDU - SubFunction uint16 - Data uint16 + SubFunction uint16 + Data uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusPDUDiagnosticResponse) GetErrorFlag() bool { - return bool(false) -} +func (m *_ModbusPDUDiagnosticResponse) GetErrorFlag() bool { +return bool(false)} -func (m *_ModbusPDUDiagnosticResponse) GetFunctionFlag() uint8 { - return 0x08 -} +func (m *_ModbusPDUDiagnosticResponse) GetFunctionFlag() uint8 { +return 0x08} -func (m *_ModbusPDUDiagnosticResponse) GetResponse() bool { - return bool(true) -} +func (m *_ModbusPDUDiagnosticResponse) GetResponse() bool { +return bool(true)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusPDUDiagnosticResponse) InitializeParent(parent ModbusPDU) {} +func (m *_ModbusPDUDiagnosticResponse) InitializeParent(parent ModbusPDU ) {} -func (m *_ModbusPDUDiagnosticResponse) GetParent() ModbusPDU { +func (m *_ModbusPDUDiagnosticResponse) GetParent() ModbusPDU { return m._ModbusPDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,12 +98,13 @@ func (m *_ModbusPDUDiagnosticResponse) GetData() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusPDUDiagnosticResponse factory function for _ModbusPDUDiagnosticResponse -func NewModbusPDUDiagnosticResponse(subFunction uint16, data uint16) *_ModbusPDUDiagnosticResponse { +func NewModbusPDUDiagnosticResponse( subFunction uint16 , data uint16 ) *_ModbusPDUDiagnosticResponse { _result := &_ModbusPDUDiagnosticResponse{ SubFunction: subFunction, - Data: data, - _ModbusPDU: NewModbusPDU(), + Data: data, + _ModbusPDU: NewModbusPDU(), } _result._ModbusPDU._ModbusPDUChildRequirements = _result return _result @@ -111,7 +112,7 @@ func NewModbusPDUDiagnosticResponse(subFunction uint16, data uint16) *_ModbusPDU // Deprecated: use the interface for direct cast func CastModbusPDUDiagnosticResponse(structType interface{}) ModbusPDUDiagnosticResponse { - if casted, ok := structType.(ModbusPDUDiagnosticResponse); ok { + if casted, ok := structType.(ModbusPDUDiagnosticResponse); ok { return casted } if casted, ok := structType.(*ModbusPDUDiagnosticResponse); ok { @@ -128,14 +129,15 @@ func (m *_ModbusPDUDiagnosticResponse) GetLengthInBits(ctx context.Context) uint lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (subFunction) - lengthInBits += 16 + lengthInBits += 16; // Simple field (data) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_ModbusPDUDiagnosticResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,14 +156,14 @@ func ModbusPDUDiagnosticResponseParseWithBuffer(ctx context.Context, readBuffer _ = currentPos // Simple Field (subFunction) - _subFunction, _subFunctionErr := readBuffer.ReadUint16("subFunction", 16) +_subFunction, _subFunctionErr := readBuffer.ReadUint16("subFunction", 16) if _subFunctionErr != nil { return nil, errors.Wrap(_subFunctionErr, "Error parsing 'subFunction' field of ModbusPDUDiagnosticResponse") } subFunction := _subFunction // Simple Field (data) - _data, _dataErr := readBuffer.ReadUint16("data", 16) +_data, _dataErr := readBuffer.ReadUint16("data", 16) if _dataErr != nil { return nil, errors.Wrap(_dataErr, "Error parsing 'data' field of ModbusPDUDiagnosticResponse") } @@ -173,9 +175,10 @@ func ModbusPDUDiagnosticResponseParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_ModbusPDUDiagnosticResponse{ - _ModbusPDU: &_ModbusPDU{}, + _ModbusPDU: &_ModbusPDU{ + }, SubFunction: subFunction, - Data: data, + Data: data, } _child._ModbusPDU._ModbusPDUChildRequirements = _child return _child, nil @@ -197,19 +200,19 @@ func (m *_ModbusPDUDiagnosticResponse) SerializeWithWriteBuffer(ctx context.Cont return errors.Wrap(pushErr, "Error pushing for ModbusPDUDiagnosticResponse") } - // Simple Field (subFunction) - subFunction := uint16(m.GetSubFunction()) - _subFunctionErr := writeBuffer.WriteUint16("subFunction", 16, (subFunction)) - if _subFunctionErr != nil { - return errors.Wrap(_subFunctionErr, "Error serializing 'subFunction' field") - } + // Simple Field (subFunction) + subFunction := uint16(m.GetSubFunction()) + _subFunctionErr := writeBuffer.WriteUint16("subFunction", 16, (subFunction)) + if _subFunctionErr != nil { + return errors.Wrap(_subFunctionErr, "Error serializing 'subFunction' field") + } - // Simple Field (data) - data := uint16(m.GetData()) - _dataErr := writeBuffer.WriteUint16("data", 16, (data)) - if _dataErr != nil { - return errors.Wrap(_dataErr, "Error serializing 'data' field") - } + // Simple Field (data) + data := uint16(m.GetData()) + _dataErr := writeBuffer.WriteUint16("data", 16, (data)) + if _dataErr != nil { + return errors.Wrap(_dataErr, "Error serializing 'data' field") + } if popErr := writeBuffer.PopContext("ModbusPDUDiagnosticResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for ModbusPDUDiagnosticResponse") @@ -219,6 +222,7 @@ func (m *_ModbusPDUDiagnosticResponse) SerializeWithWriteBuffer(ctx context.Cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusPDUDiagnosticResponse) isModbusPDUDiagnosticResponse() bool { return true } @@ -233,3 +237,6 @@ func (m *_ModbusPDUDiagnosticResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUError.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUError.go index cf20e0f196c..b3e20172316 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUError.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUError.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUError is the corresponding interface of ModbusPDUError type ModbusPDUError interface { @@ -46,37 +48,35 @@ type ModbusPDUErrorExactly interface { // _ModbusPDUError is the data-structure of this message type _ModbusPDUError struct { *_ModbusPDU - ExceptionCode ModbusErrorCode + ExceptionCode ModbusErrorCode } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusPDUError) GetErrorFlag() bool { - return bool(true) -} +func (m *_ModbusPDUError) GetErrorFlag() bool { +return bool(true)} -func (m *_ModbusPDUError) GetFunctionFlag() uint8 { - return 0 -} +func (m *_ModbusPDUError) GetFunctionFlag() uint8 { +return 0} -func (m *_ModbusPDUError) GetResponse() bool { - return false -} +func (m *_ModbusPDUError) GetResponse() bool { +return false} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusPDUError) InitializeParent(parent ModbusPDU) {} +func (m *_ModbusPDUError) InitializeParent(parent ModbusPDU ) {} -func (m *_ModbusPDUError) GetParent() ModbusPDU { +func (m *_ModbusPDUError) GetParent() ModbusPDU { return m._ModbusPDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -91,11 +91,12 @@ func (m *_ModbusPDUError) GetExceptionCode() ModbusErrorCode { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusPDUError factory function for _ModbusPDUError -func NewModbusPDUError(exceptionCode ModbusErrorCode) *_ModbusPDUError { +func NewModbusPDUError( exceptionCode ModbusErrorCode ) *_ModbusPDUError { _result := &_ModbusPDUError{ ExceptionCode: exceptionCode, - _ModbusPDU: NewModbusPDU(), + _ModbusPDU: NewModbusPDU(), } _result._ModbusPDU._ModbusPDUChildRequirements = _result return _result @@ -103,7 +104,7 @@ func NewModbusPDUError(exceptionCode ModbusErrorCode) *_ModbusPDUError { // Deprecated: use the interface for direct cast func CastModbusPDUError(structType interface{}) ModbusPDUError { - if casted, ok := structType.(ModbusPDUError); ok { + if casted, ok := structType.(ModbusPDUError); ok { return casted } if casted, ok := structType.(*ModbusPDUError); ok { @@ -125,6 +126,7 @@ func (m *_ModbusPDUError) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_ModbusPDUError) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -146,7 +148,7 @@ func ModbusPDUErrorParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf if pullErr := readBuffer.PullContext("exceptionCode"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for exceptionCode") } - _exceptionCode, _exceptionCodeErr := ModbusErrorCodeParseWithBuffer(ctx, readBuffer) +_exceptionCode, _exceptionCodeErr := ModbusErrorCodeParseWithBuffer(ctx, readBuffer) if _exceptionCodeErr != nil { return nil, errors.Wrap(_exceptionCodeErr, "Error parsing 'exceptionCode' field of ModbusPDUError") } @@ -161,7 +163,8 @@ func ModbusPDUErrorParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf // Create a partially initialized instance _child := &_ModbusPDUError{ - _ModbusPDU: &_ModbusPDU{}, + _ModbusPDU: &_ModbusPDU{ + }, ExceptionCode: exceptionCode, } _child._ModbusPDU._ModbusPDUChildRequirements = _child @@ -184,17 +187,17 @@ func (m *_ModbusPDUError) SerializeWithWriteBuffer(ctx context.Context, writeBuf return errors.Wrap(pushErr, "Error pushing for ModbusPDUError") } - // Simple Field (exceptionCode) - if pushErr := writeBuffer.PushContext("exceptionCode"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for exceptionCode") - } - _exceptionCodeErr := writeBuffer.WriteSerializable(ctx, m.GetExceptionCode()) - if popErr := writeBuffer.PopContext("exceptionCode"); popErr != nil { - return errors.Wrap(popErr, "Error popping for exceptionCode") - } - if _exceptionCodeErr != nil { - return errors.Wrap(_exceptionCodeErr, "Error serializing 'exceptionCode' field") - } + // Simple Field (exceptionCode) + if pushErr := writeBuffer.PushContext("exceptionCode"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for exceptionCode") + } + _exceptionCodeErr := writeBuffer.WriteSerializable(ctx, m.GetExceptionCode()) + if popErr := writeBuffer.PopContext("exceptionCode"); popErr != nil { + return errors.Wrap(popErr, "Error popping for exceptionCode") + } + if _exceptionCodeErr != nil { + return errors.Wrap(_exceptionCodeErr, "Error serializing 'exceptionCode' field") + } if popErr := writeBuffer.PopContext("ModbusPDUError"); popErr != nil { return errors.Wrap(popErr, "Error popping for ModbusPDUError") @@ -204,6 +207,7 @@ func (m *_ModbusPDUError) SerializeWithWriteBuffer(ctx context.Context, writeBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusPDUError) isModbusPDUError() bool { return true } @@ -218,3 +222,6 @@ func (m *_ModbusPDUError) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUGetComEventCounterRequest.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUGetComEventCounterRequest.go index 9130e62c570..c57c5511830 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUGetComEventCounterRequest.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUGetComEventCounterRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUGetComEventCounterRequest is the corresponding interface of ModbusPDUGetComEventCounterRequest type ModbusPDUGetComEventCounterRequest interface { @@ -46,38 +48,38 @@ type _ModbusPDUGetComEventCounterRequest struct { *_ModbusPDU } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusPDUGetComEventCounterRequest) GetErrorFlag() bool { - return bool(false) -} +func (m *_ModbusPDUGetComEventCounterRequest) GetErrorFlag() bool { +return bool(false)} -func (m *_ModbusPDUGetComEventCounterRequest) GetFunctionFlag() uint8 { - return 0x0B -} +func (m *_ModbusPDUGetComEventCounterRequest) GetFunctionFlag() uint8 { +return 0x0B} -func (m *_ModbusPDUGetComEventCounterRequest) GetResponse() bool { - return bool(false) -} +func (m *_ModbusPDUGetComEventCounterRequest) GetResponse() bool { +return bool(false)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusPDUGetComEventCounterRequest) InitializeParent(parent ModbusPDU) {} +func (m *_ModbusPDUGetComEventCounterRequest) InitializeParent(parent ModbusPDU ) {} -func (m *_ModbusPDUGetComEventCounterRequest) GetParent() ModbusPDU { +func (m *_ModbusPDUGetComEventCounterRequest) GetParent() ModbusPDU { return m._ModbusPDU } + // NewModbusPDUGetComEventCounterRequest factory function for _ModbusPDUGetComEventCounterRequest -func NewModbusPDUGetComEventCounterRequest() *_ModbusPDUGetComEventCounterRequest { +func NewModbusPDUGetComEventCounterRequest( ) *_ModbusPDUGetComEventCounterRequest { _result := &_ModbusPDUGetComEventCounterRequest{ - _ModbusPDU: NewModbusPDU(), + _ModbusPDU: NewModbusPDU(), } _result._ModbusPDU._ModbusPDUChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewModbusPDUGetComEventCounterRequest() *_ModbusPDUGetComEventCounterReques // Deprecated: use the interface for direct cast func CastModbusPDUGetComEventCounterRequest(structType interface{}) ModbusPDUGetComEventCounterRequest { - if casted, ok := structType.(ModbusPDUGetComEventCounterRequest); ok { + if casted, ok := structType.(ModbusPDUGetComEventCounterRequest); ok { return casted } if casted, ok := structType.(*ModbusPDUGetComEventCounterRequest); ok { @@ -104,6 +106,7 @@ func (m *_ModbusPDUGetComEventCounterRequest) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_ModbusPDUGetComEventCounterRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -127,7 +130,8 @@ func ModbusPDUGetComEventCounterRequestParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_ModbusPDUGetComEventCounterRequest{ - _ModbusPDU: &_ModbusPDU{}, + _ModbusPDU: &_ModbusPDU{ + }, } _child._ModbusPDU._ModbusPDUChildRequirements = _child return _child, nil @@ -157,6 +161,7 @@ func (m *_ModbusPDUGetComEventCounterRequest) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusPDUGetComEventCounterRequest) isModbusPDUGetComEventCounterRequest() bool { return true } @@ -171,3 +176,6 @@ func (m *_ModbusPDUGetComEventCounterRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUGetComEventCounterResponse.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUGetComEventCounterResponse.go index 9f4a8e37e9e..fc2997173e2 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUGetComEventCounterResponse.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUGetComEventCounterResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUGetComEventCounterResponse is the corresponding interface of ModbusPDUGetComEventCounterResponse type ModbusPDUGetComEventCounterResponse interface { @@ -48,38 +50,36 @@ type ModbusPDUGetComEventCounterResponseExactly interface { // _ModbusPDUGetComEventCounterResponse is the data-structure of this message type _ModbusPDUGetComEventCounterResponse struct { *_ModbusPDU - Status uint16 - EventCount uint16 + Status uint16 + EventCount uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusPDUGetComEventCounterResponse) GetErrorFlag() bool { - return bool(false) -} +func (m *_ModbusPDUGetComEventCounterResponse) GetErrorFlag() bool { +return bool(false)} -func (m *_ModbusPDUGetComEventCounterResponse) GetFunctionFlag() uint8 { - return 0x0B -} +func (m *_ModbusPDUGetComEventCounterResponse) GetFunctionFlag() uint8 { +return 0x0B} -func (m *_ModbusPDUGetComEventCounterResponse) GetResponse() bool { - return bool(true) -} +func (m *_ModbusPDUGetComEventCounterResponse) GetResponse() bool { +return bool(true)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusPDUGetComEventCounterResponse) InitializeParent(parent ModbusPDU) {} +func (m *_ModbusPDUGetComEventCounterResponse) InitializeParent(parent ModbusPDU ) {} -func (m *_ModbusPDUGetComEventCounterResponse) GetParent() ModbusPDU { +func (m *_ModbusPDUGetComEventCounterResponse) GetParent() ModbusPDU { return m._ModbusPDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,12 +98,13 @@ func (m *_ModbusPDUGetComEventCounterResponse) GetEventCount() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusPDUGetComEventCounterResponse factory function for _ModbusPDUGetComEventCounterResponse -func NewModbusPDUGetComEventCounterResponse(status uint16, eventCount uint16) *_ModbusPDUGetComEventCounterResponse { +func NewModbusPDUGetComEventCounterResponse( status uint16 , eventCount uint16 ) *_ModbusPDUGetComEventCounterResponse { _result := &_ModbusPDUGetComEventCounterResponse{ - Status: status, + Status: status, EventCount: eventCount, - _ModbusPDU: NewModbusPDU(), + _ModbusPDU: NewModbusPDU(), } _result._ModbusPDU._ModbusPDUChildRequirements = _result return _result @@ -111,7 +112,7 @@ func NewModbusPDUGetComEventCounterResponse(status uint16, eventCount uint16) *_ // Deprecated: use the interface for direct cast func CastModbusPDUGetComEventCounterResponse(structType interface{}) ModbusPDUGetComEventCounterResponse { - if casted, ok := structType.(ModbusPDUGetComEventCounterResponse); ok { + if casted, ok := structType.(ModbusPDUGetComEventCounterResponse); ok { return casted } if casted, ok := structType.(*ModbusPDUGetComEventCounterResponse); ok { @@ -128,14 +129,15 @@ func (m *_ModbusPDUGetComEventCounterResponse) GetLengthInBits(ctx context.Conte lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (status) - lengthInBits += 16 + lengthInBits += 16; // Simple field (eventCount) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_ModbusPDUGetComEventCounterResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,14 +156,14 @@ func ModbusPDUGetComEventCounterResponseParseWithBuffer(ctx context.Context, rea _ = currentPos // Simple Field (status) - _status, _statusErr := readBuffer.ReadUint16("status", 16) +_status, _statusErr := readBuffer.ReadUint16("status", 16) if _statusErr != nil { return nil, errors.Wrap(_statusErr, "Error parsing 'status' field of ModbusPDUGetComEventCounterResponse") } status := _status // Simple Field (eventCount) - _eventCount, _eventCountErr := readBuffer.ReadUint16("eventCount", 16) +_eventCount, _eventCountErr := readBuffer.ReadUint16("eventCount", 16) if _eventCountErr != nil { return nil, errors.Wrap(_eventCountErr, "Error parsing 'eventCount' field of ModbusPDUGetComEventCounterResponse") } @@ -173,8 +175,9 @@ func ModbusPDUGetComEventCounterResponseParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_ModbusPDUGetComEventCounterResponse{ - _ModbusPDU: &_ModbusPDU{}, - Status: status, + _ModbusPDU: &_ModbusPDU{ + }, + Status: status, EventCount: eventCount, } _child._ModbusPDU._ModbusPDUChildRequirements = _child @@ -197,19 +200,19 @@ func (m *_ModbusPDUGetComEventCounterResponse) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for ModbusPDUGetComEventCounterResponse") } - // Simple Field (status) - status := uint16(m.GetStatus()) - _statusErr := writeBuffer.WriteUint16("status", 16, (status)) - if _statusErr != nil { - return errors.Wrap(_statusErr, "Error serializing 'status' field") - } + // Simple Field (status) + status := uint16(m.GetStatus()) + _statusErr := writeBuffer.WriteUint16("status", 16, (status)) + if _statusErr != nil { + return errors.Wrap(_statusErr, "Error serializing 'status' field") + } - // Simple Field (eventCount) - eventCount := uint16(m.GetEventCount()) - _eventCountErr := writeBuffer.WriteUint16("eventCount", 16, (eventCount)) - if _eventCountErr != nil { - return errors.Wrap(_eventCountErr, "Error serializing 'eventCount' field") - } + // Simple Field (eventCount) + eventCount := uint16(m.GetEventCount()) + _eventCountErr := writeBuffer.WriteUint16("eventCount", 16, (eventCount)) + if _eventCountErr != nil { + return errors.Wrap(_eventCountErr, "Error serializing 'eventCount' field") + } if popErr := writeBuffer.PopContext("ModbusPDUGetComEventCounterResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for ModbusPDUGetComEventCounterResponse") @@ -219,6 +222,7 @@ func (m *_ModbusPDUGetComEventCounterResponse) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusPDUGetComEventCounterResponse) isModbusPDUGetComEventCounterResponse() bool { return true } @@ -233,3 +237,6 @@ func (m *_ModbusPDUGetComEventCounterResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUGetComEventLogRequest.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUGetComEventLogRequest.go index 21c7cd1a423..c4890cc8e05 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUGetComEventLogRequest.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUGetComEventLogRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUGetComEventLogRequest is the corresponding interface of ModbusPDUGetComEventLogRequest type ModbusPDUGetComEventLogRequest interface { @@ -46,38 +48,38 @@ type _ModbusPDUGetComEventLogRequest struct { *_ModbusPDU } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusPDUGetComEventLogRequest) GetErrorFlag() bool { - return bool(false) -} +func (m *_ModbusPDUGetComEventLogRequest) GetErrorFlag() bool { +return bool(false)} -func (m *_ModbusPDUGetComEventLogRequest) GetFunctionFlag() uint8 { - return 0x0C -} +func (m *_ModbusPDUGetComEventLogRequest) GetFunctionFlag() uint8 { +return 0x0C} -func (m *_ModbusPDUGetComEventLogRequest) GetResponse() bool { - return bool(false) -} +func (m *_ModbusPDUGetComEventLogRequest) GetResponse() bool { +return bool(false)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusPDUGetComEventLogRequest) InitializeParent(parent ModbusPDU) {} +func (m *_ModbusPDUGetComEventLogRequest) InitializeParent(parent ModbusPDU ) {} -func (m *_ModbusPDUGetComEventLogRequest) GetParent() ModbusPDU { +func (m *_ModbusPDUGetComEventLogRequest) GetParent() ModbusPDU { return m._ModbusPDU } + // NewModbusPDUGetComEventLogRequest factory function for _ModbusPDUGetComEventLogRequest -func NewModbusPDUGetComEventLogRequest() *_ModbusPDUGetComEventLogRequest { +func NewModbusPDUGetComEventLogRequest( ) *_ModbusPDUGetComEventLogRequest { _result := &_ModbusPDUGetComEventLogRequest{ - _ModbusPDU: NewModbusPDU(), + _ModbusPDU: NewModbusPDU(), } _result._ModbusPDU._ModbusPDUChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewModbusPDUGetComEventLogRequest() *_ModbusPDUGetComEventLogRequest { // Deprecated: use the interface for direct cast func CastModbusPDUGetComEventLogRequest(structType interface{}) ModbusPDUGetComEventLogRequest { - if casted, ok := structType.(ModbusPDUGetComEventLogRequest); ok { + if casted, ok := structType.(ModbusPDUGetComEventLogRequest); ok { return casted } if casted, ok := structType.(*ModbusPDUGetComEventLogRequest); ok { @@ -104,6 +106,7 @@ func (m *_ModbusPDUGetComEventLogRequest) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_ModbusPDUGetComEventLogRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -127,7 +130,8 @@ func ModbusPDUGetComEventLogRequestParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_ModbusPDUGetComEventLogRequest{ - _ModbusPDU: &_ModbusPDU{}, + _ModbusPDU: &_ModbusPDU{ + }, } _child._ModbusPDU._ModbusPDUChildRequirements = _child return _child, nil @@ -157,6 +161,7 @@ func (m *_ModbusPDUGetComEventLogRequest) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusPDUGetComEventLogRequest) isModbusPDUGetComEventLogRequest() bool { return true } @@ -171,3 +176,6 @@ func (m *_ModbusPDUGetComEventLogRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUGetComEventLogResponse.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUGetComEventLogResponse.go index dcb73b4b855..3787906ad5d 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUGetComEventLogResponse.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUGetComEventLogResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUGetComEventLogResponse is the corresponding interface of ModbusPDUGetComEventLogResponse type ModbusPDUGetComEventLogResponse interface { @@ -52,40 +54,38 @@ type ModbusPDUGetComEventLogResponseExactly interface { // _ModbusPDUGetComEventLogResponse is the data-structure of this message type _ModbusPDUGetComEventLogResponse struct { *_ModbusPDU - Status uint16 - EventCount uint16 - MessageCount uint16 - Events []byte + Status uint16 + EventCount uint16 + MessageCount uint16 + Events []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusPDUGetComEventLogResponse) GetErrorFlag() bool { - return bool(false) -} +func (m *_ModbusPDUGetComEventLogResponse) GetErrorFlag() bool { +return bool(false)} -func (m *_ModbusPDUGetComEventLogResponse) GetFunctionFlag() uint8 { - return 0x0C -} +func (m *_ModbusPDUGetComEventLogResponse) GetFunctionFlag() uint8 { +return 0x0C} -func (m *_ModbusPDUGetComEventLogResponse) GetResponse() bool { - return bool(true) -} +func (m *_ModbusPDUGetComEventLogResponse) GetResponse() bool { +return bool(true)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusPDUGetComEventLogResponse) InitializeParent(parent ModbusPDU) {} +func (m *_ModbusPDUGetComEventLogResponse) InitializeParent(parent ModbusPDU ) {} -func (m *_ModbusPDUGetComEventLogResponse) GetParent() ModbusPDU { +func (m *_ModbusPDUGetComEventLogResponse) GetParent() ModbusPDU { return m._ModbusPDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -112,14 +112,15 @@ func (m *_ModbusPDUGetComEventLogResponse) GetEvents() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusPDUGetComEventLogResponse factory function for _ModbusPDUGetComEventLogResponse -func NewModbusPDUGetComEventLogResponse(status uint16, eventCount uint16, messageCount uint16, events []byte) *_ModbusPDUGetComEventLogResponse { +func NewModbusPDUGetComEventLogResponse( status uint16 , eventCount uint16 , messageCount uint16 , events []byte ) *_ModbusPDUGetComEventLogResponse { _result := &_ModbusPDUGetComEventLogResponse{ - Status: status, - EventCount: eventCount, + Status: status, + EventCount: eventCount, MessageCount: messageCount, - Events: events, - _ModbusPDU: NewModbusPDU(), + Events: events, + _ModbusPDU: NewModbusPDU(), } _result._ModbusPDU._ModbusPDUChildRequirements = _result return _result @@ -127,7 +128,7 @@ func NewModbusPDUGetComEventLogResponse(status uint16, eventCount uint16, messag // Deprecated: use the interface for direct cast func CastModbusPDUGetComEventLogResponse(structType interface{}) ModbusPDUGetComEventLogResponse { - if casted, ok := structType.(ModbusPDUGetComEventLogResponse); ok { + if casted, ok := structType.(ModbusPDUGetComEventLogResponse); ok { return casted } if casted, ok := structType.(*ModbusPDUGetComEventLogResponse); ok { @@ -147,13 +148,13 @@ func (m *_ModbusPDUGetComEventLogResponse) GetLengthInBits(ctx context.Context) lengthInBits += 8 // Simple field (status) - lengthInBits += 16 + lengthInBits += 16; // Simple field (eventCount) - lengthInBits += 16 + lengthInBits += 16; // Simple field (messageCount) - lengthInBits += 16 + lengthInBits += 16; // Array field if len(m.Events) > 0 { @@ -163,6 +164,7 @@ func (m *_ModbusPDUGetComEventLogResponse) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_ModbusPDUGetComEventLogResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -188,21 +190,21 @@ func ModbusPDUGetComEventLogResponseParseWithBuffer(ctx context.Context, readBuf } // Simple Field (status) - _status, _statusErr := readBuffer.ReadUint16("status", 16) +_status, _statusErr := readBuffer.ReadUint16("status", 16) if _statusErr != nil { return nil, errors.Wrap(_statusErr, "Error parsing 'status' field of ModbusPDUGetComEventLogResponse") } status := _status // Simple Field (eventCount) - _eventCount, _eventCountErr := readBuffer.ReadUint16("eventCount", 16) +_eventCount, _eventCountErr := readBuffer.ReadUint16("eventCount", 16) if _eventCountErr != nil { return nil, errors.Wrap(_eventCountErr, "Error parsing 'eventCount' field of ModbusPDUGetComEventLogResponse") } eventCount := _eventCount // Simple Field (messageCount) - _messageCount, _messageCountErr := readBuffer.ReadUint16("messageCount", 16) +_messageCount, _messageCountErr := readBuffer.ReadUint16("messageCount", 16) if _messageCountErr != nil { return nil, errors.Wrap(_messageCountErr, "Error parsing 'messageCount' field of ModbusPDUGetComEventLogResponse") } @@ -220,11 +222,12 @@ func ModbusPDUGetComEventLogResponseParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_ModbusPDUGetComEventLogResponse{ - _ModbusPDU: &_ModbusPDU{}, - Status: status, - EventCount: eventCount, + _ModbusPDU: &_ModbusPDU{ + }, + Status: status, + EventCount: eventCount, MessageCount: messageCount, - Events: events, + Events: events, } _child._ModbusPDU._ModbusPDUChildRequirements = _child return _child, nil @@ -246,39 +249,39 @@ func (m *_ModbusPDUGetComEventLogResponse) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for ModbusPDUGetComEventLogResponse") } - // Implicit Field (byteCount) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - byteCount := uint8(uint8(uint8(len(m.GetEvents()))) + uint8(uint8(6))) - _byteCountErr := writeBuffer.WriteUint8("byteCount", 8, (byteCount)) - if _byteCountErr != nil { - return errors.Wrap(_byteCountErr, "Error serializing 'byteCount' field") - } + // Implicit Field (byteCount) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) + byteCount := uint8(uint8(uint8(len(m.GetEvents()))) + uint8(uint8(6))) + _byteCountErr := writeBuffer.WriteUint8("byteCount", 8, (byteCount)) + if _byteCountErr != nil { + return errors.Wrap(_byteCountErr, "Error serializing 'byteCount' field") + } - // Simple Field (status) - status := uint16(m.GetStatus()) - _statusErr := writeBuffer.WriteUint16("status", 16, (status)) - if _statusErr != nil { - return errors.Wrap(_statusErr, "Error serializing 'status' field") - } + // Simple Field (status) + status := uint16(m.GetStatus()) + _statusErr := writeBuffer.WriteUint16("status", 16, (status)) + if _statusErr != nil { + return errors.Wrap(_statusErr, "Error serializing 'status' field") + } - // Simple Field (eventCount) - eventCount := uint16(m.GetEventCount()) - _eventCountErr := writeBuffer.WriteUint16("eventCount", 16, (eventCount)) - if _eventCountErr != nil { - return errors.Wrap(_eventCountErr, "Error serializing 'eventCount' field") - } + // Simple Field (eventCount) + eventCount := uint16(m.GetEventCount()) + _eventCountErr := writeBuffer.WriteUint16("eventCount", 16, (eventCount)) + if _eventCountErr != nil { + return errors.Wrap(_eventCountErr, "Error serializing 'eventCount' field") + } - // Simple Field (messageCount) - messageCount := uint16(m.GetMessageCount()) - _messageCountErr := writeBuffer.WriteUint16("messageCount", 16, (messageCount)) - if _messageCountErr != nil { - return errors.Wrap(_messageCountErr, "Error serializing 'messageCount' field") - } + // Simple Field (messageCount) + messageCount := uint16(m.GetMessageCount()) + _messageCountErr := writeBuffer.WriteUint16("messageCount", 16, (messageCount)) + if _messageCountErr != nil { + return errors.Wrap(_messageCountErr, "Error serializing 'messageCount' field") + } - // Array Field (events) - // Byte Array field (events) - if err := writeBuffer.WriteByteArray("events", m.GetEvents()); err != nil { - return errors.Wrap(err, "Error serializing 'events' field") - } + // Array Field (events) + // Byte Array field (events) + if err := writeBuffer.WriteByteArray("events", m.GetEvents()); err != nil { + return errors.Wrap(err, "Error serializing 'events' field") + } if popErr := writeBuffer.PopContext("ModbusPDUGetComEventLogResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for ModbusPDUGetComEventLogResponse") @@ -288,6 +291,7 @@ func (m *_ModbusPDUGetComEventLogResponse) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusPDUGetComEventLogResponse) isModbusPDUGetComEventLogResponse() bool { return true } @@ -302,3 +306,6 @@ func (m *_ModbusPDUGetComEventLogResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUMaskWriteHoldingRegisterRequest.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUMaskWriteHoldingRegisterRequest.go index 7e8b3a0aef7..9f8dfe1516f 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUMaskWriteHoldingRegisterRequest.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUMaskWriteHoldingRegisterRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUMaskWriteHoldingRegisterRequest is the corresponding interface of ModbusPDUMaskWriteHoldingRegisterRequest type ModbusPDUMaskWriteHoldingRegisterRequest interface { @@ -50,39 +52,37 @@ type ModbusPDUMaskWriteHoldingRegisterRequestExactly interface { // _ModbusPDUMaskWriteHoldingRegisterRequest is the data-structure of this message type _ModbusPDUMaskWriteHoldingRegisterRequest struct { *_ModbusPDU - ReferenceAddress uint16 - AndMask uint16 - OrMask uint16 + ReferenceAddress uint16 + AndMask uint16 + OrMask uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusPDUMaskWriteHoldingRegisterRequest) GetErrorFlag() bool { - return bool(false) -} +func (m *_ModbusPDUMaskWriteHoldingRegisterRequest) GetErrorFlag() bool { +return bool(false)} -func (m *_ModbusPDUMaskWriteHoldingRegisterRequest) GetFunctionFlag() uint8 { - return 0x16 -} +func (m *_ModbusPDUMaskWriteHoldingRegisterRequest) GetFunctionFlag() uint8 { +return 0x16} -func (m *_ModbusPDUMaskWriteHoldingRegisterRequest) GetResponse() bool { - return bool(false) -} +func (m *_ModbusPDUMaskWriteHoldingRegisterRequest) GetResponse() bool { +return bool(false)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusPDUMaskWriteHoldingRegisterRequest) InitializeParent(parent ModbusPDU) {} +func (m *_ModbusPDUMaskWriteHoldingRegisterRequest) InitializeParent(parent ModbusPDU ) {} -func (m *_ModbusPDUMaskWriteHoldingRegisterRequest) GetParent() ModbusPDU { +func (m *_ModbusPDUMaskWriteHoldingRegisterRequest) GetParent() ModbusPDU { return m._ModbusPDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -105,13 +105,14 @@ func (m *_ModbusPDUMaskWriteHoldingRegisterRequest) GetOrMask() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusPDUMaskWriteHoldingRegisterRequest factory function for _ModbusPDUMaskWriteHoldingRegisterRequest -func NewModbusPDUMaskWriteHoldingRegisterRequest(referenceAddress uint16, andMask uint16, orMask uint16) *_ModbusPDUMaskWriteHoldingRegisterRequest { +func NewModbusPDUMaskWriteHoldingRegisterRequest( referenceAddress uint16 , andMask uint16 , orMask uint16 ) *_ModbusPDUMaskWriteHoldingRegisterRequest { _result := &_ModbusPDUMaskWriteHoldingRegisterRequest{ ReferenceAddress: referenceAddress, - AndMask: andMask, - OrMask: orMask, - _ModbusPDU: NewModbusPDU(), + AndMask: andMask, + OrMask: orMask, + _ModbusPDU: NewModbusPDU(), } _result._ModbusPDU._ModbusPDUChildRequirements = _result return _result @@ -119,7 +120,7 @@ func NewModbusPDUMaskWriteHoldingRegisterRequest(referenceAddress uint16, andMas // Deprecated: use the interface for direct cast func CastModbusPDUMaskWriteHoldingRegisterRequest(structType interface{}) ModbusPDUMaskWriteHoldingRegisterRequest { - if casted, ok := structType.(ModbusPDUMaskWriteHoldingRegisterRequest); ok { + if casted, ok := structType.(ModbusPDUMaskWriteHoldingRegisterRequest); ok { return casted } if casted, ok := structType.(*ModbusPDUMaskWriteHoldingRegisterRequest); ok { @@ -136,17 +137,18 @@ func (m *_ModbusPDUMaskWriteHoldingRegisterRequest) GetLengthInBits(ctx context. lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (referenceAddress) - lengthInBits += 16 + lengthInBits += 16; // Simple field (andMask) - lengthInBits += 16 + lengthInBits += 16; // Simple field (orMask) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_ModbusPDUMaskWriteHoldingRegisterRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,21 +167,21 @@ func ModbusPDUMaskWriteHoldingRegisterRequestParseWithBuffer(ctx context.Context _ = currentPos // Simple Field (referenceAddress) - _referenceAddress, _referenceAddressErr := readBuffer.ReadUint16("referenceAddress", 16) +_referenceAddress, _referenceAddressErr := readBuffer.ReadUint16("referenceAddress", 16) if _referenceAddressErr != nil { return nil, errors.Wrap(_referenceAddressErr, "Error parsing 'referenceAddress' field of ModbusPDUMaskWriteHoldingRegisterRequest") } referenceAddress := _referenceAddress // Simple Field (andMask) - _andMask, _andMaskErr := readBuffer.ReadUint16("andMask", 16) +_andMask, _andMaskErr := readBuffer.ReadUint16("andMask", 16) if _andMaskErr != nil { return nil, errors.Wrap(_andMaskErr, "Error parsing 'andMask' field of ModbusPDUMaskWriteHoldingRegisterRequest") } andMask := _andMask // Simple Field (orMask) - _orMask, _orMaskErr := readBuffer.ReadUint16("orMask", 16) +_orMask, _orMaskErr := readBuffer.ReadUint16("orMask", 16) if _orMaskErr != nil { return nil, errors.Wrap(_orMaskErr, "Error parsing 'orMask' field of ModbusPDUMaskWriteHoldingRegisterRequest") } @@ -191,10 +193,11 @@ func ModbusPDUMaskWriteHoldingRegisterRequestParseWithBuffer(ctx context.Context // Create a partially initialized instance _child := &_ModbusPDUMaskWriteHoldingRegisterRequest{ - _ModbusPDU: &_ModbusPDU{}, + _ModbusPDU: &_ModbusPDU{ + }, ReferenceAddress: referenceAddress, - AndMask: andMask, - OrMask: orMask, + AndMask: andMask, + OrMask: orMask, } _child._ModbusPDU._ModbusPDUChildRequirements = _child return _child, nil @@ -216,26 +219,26 @@ func (m *_ModbusPDUMaskWriteHoldingRegisterRequest) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for ModbusPDUMaskWriteHoldingRegisterRequest") } - // Simple Field (referenceAddress) - referenceAddress := uint16(m.GetReferenceAddress()) - _referenceAddressErr := writeBuffer.WriteUint16("referenceAddress", 16, (referenceAddress)) - if _referenceAddressErr != nil { - return errors.Wrap(_referenceAddressErr, "Error serializing 'referenceAddress' field") - } + // Simple Field (referenceAddress) + referenceAddress := uint16(m.GetReferenceAddress()) + _referenceAddressErr := writeBuffer.WriteUint16("referenceAddress", 16, (referenceAddress)) + if _referenceAddressErr != nil { + return errors.Wrap(_referenceAddressErr, "Error serializing 'referenceAddress' field") + } - // Simple Field (andMask) - andMask := uint16(m.GetAndMask()) - _andMaskErr := writeBuffer.WriteUint16("andMask", 16, (andMask)) - if _andMaskErr != nil { - return errors.Wrap(_andMaskErr, "Error serializing 'andMask' field") - } + // Simple Field (andMask) + andMask := uint16(m.GetAndMask()) + _andMaskErr := writeBuffer.WriteUint16("andMask", 16, (andMask)) + if _andMaskErr != nil { + return errors.Wrap(_andMaskErr, "Error serializing 'andMask' field") + } - // Simple Field (orMask) - orMask := uint16(m.GetOrMask()) - _orMaskErr := writeBuffer.WriteUint16("orMask", 16, (orMask)) - if _orMaskErr != nil { - return errors.Wrap(_orMaskErr, "Error serializing 'orMask' field") - } + // Simple Field (orMask) + orMask := uint16(m.GetOrMask()) + _orMaskErr := writeBuffer.WriteUint16("orMask", 16, (orMask)) + if _orMaskErr != nil { + return errors.Wrap(_orMaskErr, "Error serializing 'orMask' field") + } if popErr := writeBuffer.PopContext("ModbusPDUMaskWriteHoldingRegisterRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for ModbusPDUMaskWriteHoldingRegisterRequest") @@ -245,6 +248,7 @@ func (m *_ModbusPDUMaskWriteHoldingRegisterRequest) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusPDUMaskWriteHoldingRegisterRequest) isModbusPDUMaskWriteHoldingRegisterRequest() bool { return true } @@ -259,3 +263,6 @@ func (m *_ModbusPDUMaskWriteHoldingRegisterRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUMaskWriteHoldingRegisterResponse.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUMaskWriteHoldingRegisterResponse.go index 17dd263b50a..3ffeb846e37 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUMaskWriteHoldingRegisterResponse.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUMaskWriteHoldingRegisterResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUMaskWriteHoldingRegisterResponse is the corresponding interface of ModbusPDUMaskWriteHoldingRegisterResponse type ModbusPDUMaskWriteHoldingRegisterResponse interface { @@ -50,39 +52,37 @@ type ModbusPDUMaskWriteHoldingRegisterResponseExactly interface { // _ModbusPDUMaskWriteHoldingRegisterResponse is the data-structure of this message type _ModbusPDUMaskWriteHoldingRegisterResponse struct { *_ModbusPDU - ReferenceAddress uint16 - AndMask uint16 - OrMask uint16 + ReferenceAddress uint16 + AndMask uint16 + OrMask uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusPDUMaskWriteHoldingRegisterResponse) GetErrorFlag() bool { - return bool(false) -} +func (m *_ModbusPDUMaskWriteHoldingRegisterResponse) GetErrorFlag() bool { +return bool(false)} -func (m *_ModbusPDUMaskWriteHoldingRegisterResponse) GetFunctionFlag() uint8 { - return 0x16 -} +func (m *_ModbusPDUMaskWriteHoldingRegisterResponse) GetFunctionFlag() uint8 { +return 0x16} -func (m *_ModbusPDUMaskWriteHoldingRegisterResponse) GetResponse() bool { - return bool(true) -} +func (m *_ModbusPDUMaskWriteHoldingRegisterResponse) GetResponse() bool { +return bool(true)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusPDUMaskWriteHoldingRegisterResponse) InitializeParent(parent ModbusPDU) {} +func (m *_ModbusPDUMaskWriteHoldingRegisterResponse) InitializeParent(parent ModbusPDU ) {} -func (m *_ModbusPDUMaskWriteHoldingRegisterResponse) GetParent() ModbusPDU { +func (m *_ModbusPDUMaskWriteHoldingRegisterResponse) GetParent() ModbusPDU { return m._ModbusPDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -105,13 +105,14 @@ func (m *_ModbusPDUMaskWriteHoldingRegisterResponse) GetOrMask() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusPDUMaskWriteHoldingRegisterResponse factory function for _ModbusPDUMaskWriteHoldingRegisterResponse -func NewModbusPDUMaskWriteHoldingRegisterResponse(referenceAddress uint16, andMask uint16, orMask uint16) *_ModbusPDUMaskWriteHoldingRegisterResponse { +func NewModbusPDUMaskWriteHoldingRegisterResponse( referenceAddress uint16 , andMask uint16 , orMask uint16 ) *_ModbusPDUMaskWriteHoldingRegisterResponse { _result := &_ModbusPDUMaskWriteHoldingRegisterResponse{ ReferenceAddress: referenceAddress, - AndMask: andMask, - OrMask: orMask, - _ModbusPDU: NewModbusPDU(), + AndMask: andMask, + OrMask: orMask, + _ModbusPDU: NewModbusPDU(), } _result._ModbusPDU._ModbusPDUChildRequirements = _result return _result @@ -119,7 +120,7 @@ func NewModbusPDUMaskWriteHoldingRegisterResponse(referenceAddress uint16, andMa // Deprecated: use the interface for direct cast func CastModbusPDUMaskWriteHoldingRegisterResponse(structType interface{}) ModbusPDUMaskWriteHoldingRegisterResponse { - if casted, ok := structType.(ModbusPDUMaskWriteHoldingRegisterResponse); ok { + if casted, ok := structType.(ModbusPDUMaskWriteHoldingRegisterResponse); ok { return casted } if casted, ok := structType.(*ModbusPDUMaskWriteHoldingRegisterResponse); ok { @@ -136,17 +137,18 @@ func (m *_ModbusPDUMaskWriteHoldingRegisterResponse) GetLengthInBits(ctx context lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (referenceAddress) - lengthInBits += 16 + lengthInBits += 16; // Simple field (andMask) - lengthInBits += 16 + lengthInBits += 16; // Simple field (orMask) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_ModbusPDUMaskWriteHoldingRegisterResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -165,21 +167,21 @@ func ModbusPDUMaskWriteHoldingRegisterResponseParseWithBuffer(ctx context.Contex _ = currentPos // Simple Field (referenceAddress) - _referenceAddress, _referenceAddressErr := readBuffer.ReadUint16("referenceAddress", 16) +_referenceAddress, _referenceAddressErr := readBuffer.ReadUint16("referenceAddress", 16) if _referenceAddressErr != nil { return nil, errors.Wrap(_referenceAddressErr, "Error parsing 'referenceAddress' field of ModbusPDUMaskWriteHoldingRegisterResponse") } referenceAddress := _referenceAddress // Simple Field (andMask) - _andMask, _andMaskErr := readBuffer.ReadUint16("andMask", 16) +_andMask, _andMaskErr := readBuffer.ReadUint16("andMask", 16) if _andMaskErr != nil { return nil, errors.Wrap(_andMaskErr, "Error parsing 'andMask' field of ModbusPDUMaskWriteHoldingRegisterResponse") } andMask := _andMask // Simple Field (orMask) - _orMask, _orMaskErr := readBuffer.ReadUint16("orMask", 16) +_orMask, _orMaskErr := readBuffer.ReadUint16("orMask", 16) if _orMaskErr != nil { return nil, errors.Wrap(_orMaskErr, "Error parsing 'orMask' field of ModbusPDUMaskWriteHoldingRegisterResponse") } @@ -191,10 +193,11 @@ func ModbusPDUMaskWriteHoldingRegisterResponseParseWithBuffer(ctx context.Contex // Create a partially initialized instance _child := &_ModbusPDUMaskWriteHoldingRegisterResponse{ - _ModbusPDU: &_ModbusPDU{}, + _ModbusPDU: &_ModbusPDU{ + }, ReferenceAddress: referenceAddress, - AndMask: andMask, - OrMask: orMask, + AndMask: andMask, + OrMask: orMask, } _child._ModbusPDU._ModbusPDUChildRequirements = _child return _child, nil @@ -216,26 +219,26 @@ func (m *_ModbusPDUMaskWriteHoldingRegisterResponse) SerializeWithWriteBuffer(ct return errors.Wrap(pushErr, "Error pushing for ModbusPDUMaskWriteHoldingRegisterResponse") } - // Simple Field (referenceAddress) - referenceAddress := uint16(m.GetReferenceAddress()) - _referenceAddressErr := writeBuffer.WriteUint16("referenceAddress", 16, (referenceAddress)) - if _referenceAddressErr != nil { - return errors.Wrap(_referenceAddressErr, "Error serializing 'referenceAddress' field") - } + // Simple Field (referenceAddress) + referenceAddress := uint16(m.GetReferenceAddress()) + _referenceAddressErr := writeBuffer.WriteUint16("referenceAddress", 16, (referenceAddress)) + if _referenceAddressErr != nil { + return errors.Wrap(_referenceAddressErr, "Error serializing 'referenceAddress' field") + } - // Simple Field (andMask) - andMask := uint16(m.GetAndMask()) - _andMaskErr := writeBuffer.WriteUint16("andMask", 16, (andMask)) - if _andMaskErr != nil { - return errors.Wrap(_andMaskErr, "Error serializing 'andMask' field") - } + // Simple Field (andMask) + andMask := uint16(m.GetAndMask()) + _andMaskErr := writeBuffer.WriteUint16("andMask", 16, (andMask)) + if _andMaskErr != nil { + return errors.Wrap(_andMaskErr, "Error serializing 'andMask' field") + } - // Simple Field (orMask) - orMask := uint16(m.GetOrMask()) - _orMaskErr := writeBuffer.WriteUint16("orMask", 16, (orMask)) - if _orMaskErr != nil { - return errors.Wrap(_orMaskErr, "Error serializing 'orMask' field") - } + // Simple Field (orMask) + orMask := uint16(m.GetOrMask()) + _orMaskErr := writeBuffer.WriteUint16("orMask", 16, (orMask)) + if _orMaskErr != nil { + return errors.Wrap(_orMaskErr, "Error serializing 'orMask' field") + } if popErr := writeBuffer.PopContext("ModbusPDUMaskWriteHoldingRegisterResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for ModbusPDUMaskWriteHoldingRegisterResponse") @@ -245,6 +248,7 @@ func (m *_ModbusPDUMaskWriteHoldingRegisterResponse) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusPDUMaskWriteHoldingRegisterResponse) isModbusPDUMaskWriteHoldingRegisterResponse() bool { return true } @@ -259,3 +263,6 @@ func (m *_ModbusPDUMaskWriteHoldingRegisterResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadCoilsRequest.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadCoilsRequest.go index 9fedf41a961..728c6ce53e3 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadCoilsRequest.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadCoilsRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUReadCoilsRequest is the corresponding interface of ModbusPDUReadCoilsRequest type ModbusPDUReadCoilsRequest interface { @@ -48,38 +50,36 @@ type ModbusPDUReadCoilsRequestExactly interface { // _ModbusPDUReadCoilsRequest is the data-structure of this message type _ModbusPDUReadCoilsRequest struct { *_ModbusPDU - StartingAddress uint16 - Quantity uint16 + StartingAddress uint16 + Quantity uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusPDUReadCoilsRequest) GetErrorFlag() bool { - return bool(false) -} +func (m *_ModbusPDUReadCoilsRequest) GetErrorFlag() bool { +return bool(false)} -func (m *_ModbusPDUReadCoilsRequest) GetFunctionFlag() uint8 { - return 0x01 -} +func (m *_ModbusPDUReadCoilsRequest) GetFunctionFlag() uint8 { +return 0x01} -func (m *_ModbusPDUReadCoilsRequest) GetResponse() bool { - return bool(false) -} +func (m *_ModbusPDUReadCoilsRequest) GetResponse() bool { +return bool(false)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusPDUReadCoilsRequest) InitializeParent(parent ModbusPDU) {} +func (m *_ModbusPDUReadCoilsRequest) InitializeParent(parent ModbusPDU ) {} -func (m *_ModbusPDUReadCoilsRequest) GetParent() ModbusPDU { +func (m *_ModbusPDUReadCoilsRequest) GetParent() ModbusPDU { return m._ModbusPDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,12 +98,13 @@ func (m *_ModbusPDUReadCoilsRequest) GetQuantity() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusPDUReadCoilsRequest factory function for _ModbusPDUReadCoilsRequest -func NewModbusPDUReadCoilsRequest(startingAddress uint16, quantity uint16) *_ModbusPDUReadCoilsRequest { +func NewModbusPDUReadCoilsRequest( startingAddress uint16 , quantity uint16 ) *_ModbusPDUReadCoilsRequest { _result := &_ModbusPDUReadCoilsRequest{ StartingAddress: startingAddress, - Quantity: quantity, - _ModbusPDU: NewModbusPDU(), + Quantity: quantity, + _ModbusPDU: NewModbusPDU(), } _result._ModbusPDU._ModbusPDUChildRequirements = _result return _result @@ -111,7 +112,7 @@ func NewModbusPDUReadCoilsRequest(startingAddress uint16, quantity uint16) *_Mod // Deprecated: use the interface for direct cast func CastModbusPDUReadCoilsRequest(structType interface{}) ModbusPDUReadCoilsRequest { - if casted, ok := structType.(ModbusPDUReadCoilsRequest); ok { + if casted, ok := structType.(ModbusPDUReadCoilsRequest); ok { return casted } if casted, ok := structType.(*ModbusPDUReadCoilsRequest); ok { @@ -128,14 +129,15 @@ func (m *_ModbusPDUReadCoilsRequest) GetLengthInBits(ctx context.Context) uint16 lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (startingAddress) - lengthInBits += 16 + lengthInBits += 16; // Simple field (quantity) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_ModbusPDUReadCoilsRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,14 +156,14 @@ func ModbusPDUReadCoilsRequestParseWithBuffer(ctx context.Context, readBuffer ut _ = currentPos // Simple Field (startingAddress) - _startingAddress, _startingAddressErr := readBuffer.ReadUint16("startingAddress", 16) +_startingAddress, _startingAddressErr := readBuffer.ReadUint16("startingAddress", 16) if _startingAddressErr != nil { return nil, errors.Wrap(_startingAddressErr, "Error parsing 'startingAddress' field of ModbusPDUReadCoilsRequest") } startingAddress := _startingAddress // Simple Field (quantity) - _quantity, _quantityErr := readBuffer.ReadUint16("quantity", 16) +_quantity, _quantityErr := readBuffer.ReadUint16("quantity", 16) if _quantityErr != nil { return nil, errors.Wrap(_quantityErr, "Error parsing 'quantity' field of ModbusPDUReadCoilsRequest") } @@ -173,9 +175,10 @@ func ModbusPDUReadCoilsRequestParseWithBuffer(ctx context.Context, readBuffer ut // Create a partially initialized instance _child := &_ModbusPDUReadCoilsRequest{ - _ModbusPDU: &_ModbusPDU{}, + _ModbusPDU: &_ModbusPDU{ + }, StartingAddress: startingAddress, - Quantity: quantity, + Quantity: quantity, } _child._ModbusPDU._ModbusPDUChildRequirements = _child return _child, nil @@ -197,19 +200,19 @@ func (m *_ModbusPDUReadCoilsRequest) SerializeWithWriteBuffer(ctx context.Contex return errors.Wrap(pushErr, "Error pushing for ModbusPDUReadCoilsRequest") } - // Simple Field (startingAddress) - startingAddress := uint16(m.GetStartingAddress()) - _startingAddressErr := writeBuffer.WriteUint16("startingAddress", 16, (startingAddress)) - if _startingAddressErr != nil { - return errors.Wrap(_startingAddressErr, "Error serializing 'startingAddress' field") - } + // Simple Field (startingAddress) + startingAddress := uint16(m.GetStartingAddress()) + _startingAddressErr := writeBuffer.WriteUint16("startingAddress", 16, (startingAddress)) + if _startingAddressErr != nil { + return errors.Wrap(_startingAddressErr, "Error serializing 'startingAddress' field") + } - // Simple Field (quantity) - quantity := uint16(m.GetQuantity()) - _quantityErr := writeBuffer.WriteUint16("quantity", 16, (quantity)) - if _quantityErr != nil { - return errors.Wrap(_quantityErr, "Error serializing 'quantity' field") - } + // Simple Field (quantity) + quantity := uint16(m.GetQuantity()) + _quantityErr := writeBuffer.WriteUint16("quantity", 16, (quantity)) + if _quantityErr != nil { + return errors.Wrap(_quantityErr, "Error serializing 'quantity' field") + } if popErr := writeBuffer.PopContext("ModbusPDUReadCoilsRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for ModbusPDUReadCoilsRequest") @@ -219,6 +222,7 @@ func (m *_ModbusPDUReadCoilsRequest) SerializeWithWriteBuffer(ctx context.Contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusPDUReadCoilsRequest) isModbusPDUReadCoilsRequest() bool { return true } @@ -233,3 +237,6 @@ func (m *_ModbusPDUReadCoilsRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadCoilsResponse.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadCoilsResponse.go index c07c077426b..8d3c2a2d534 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadCoilsResponse.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadCoilsResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUReadCoilsResponse is the corresponding interface of ModbusPDUReadCoilsResponse type ModbusPDUReadCoilsResponse interface { @@ -46,37 +48,35 @@ type ModbusPDUReadCoilsResponseExactly interface { // _ModbusPDUReadCoilsResponse is the data-structure of this message type _ModbusPDUReadCoilsResponse struct { *_ModbusPDU - Value []byte + Value []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusPDUReadCoilsResponse) GetErrorFlag() bool { - return bool(false) -} +func (m *_ModbusPDUReadCoilsResponse) GetErrorFlag() bool { +return bool(false)} -func (m *_ModbusPDUReadCoilsResponse) GetFunctionFlag() uint8 { - return 0x01 -} +func (m *_ModbusPDUReadCoilsResponse) GetFunctionFlag() uint8 { +return 0x01} -func (m *_ModbusPDUReadCoilsResponse) GetResponse() bool { - return bool(true) -} +func (m *_ModbusPDUReadCoilsResponse) GetResponse() bool { +return bool(true)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusPDUReadCoilsResponse) InitializeParent(parent ModbusPDU) {} +func (m *_ModbusPDUReadCoilsResponse) InitializeParent(parent ModbusPDU ) {} -func (m *_ModbusPDUReadCoilsResponse) GetParent() ModbusPDU { +func (m *_ModbusPDUReadCoilsResponse) GetParent() ModbusPDU { return m._ModbusPDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -91,11 +91,12 @@ func (m *_ModbusPDUReadCoilsResponse) GetValue() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusPDUReadCoilsResponse factory function for _ModbusPDUReadCoilsResponse -func NewModbusPDUReadCoilsResponse(value []byte) *_ModbusPDUReadCoilsResponse { +func NewModbusPDUReadCoilsResponse( value []byte ) *_ModbusPDUReadCoilsResponse { _result := &_ModbusPDUReadCoilsResponse{ - Value: value, - _ModbusPDU: NewModbusPDU(), + Value: value, + _ModbusPDU: NewModbusPDU(), } _result._ModbusPDU._ModbusPDUChildRequirements = _result return _result @@ -103,7 +104,7 @@ func NewModbusPDUReadCoilsResponse(value []byte) *_ModbusPDUReadCoilsResponse { // Deprecated: use the interface for direct cast func CastModbusPDUReadCoilsResponse(structType interface{}) ModbusPDUReadCoilsResponse { - if casted, ok := structType.(ModbusPDUReadCoilsResponse); ok { + if casted, ok := structType.(ModbusPDUReadCoilsResponse); ok { return casted } if casted, ok := structType.(*ModbusPDUReadCoilsResponse); ok { @@ -130,6 +131,7 @@ func (m *_ModbusPDUReadCoilsResponse) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_ModbusPDUReadCoilsResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -166,8 +168,9 @@ func ModbusPDUReadCoilsResponseParseWithBuffer(ctx context.Context, readBuffer u // Create a partially initialized instance _child := &_ModbusPDUReadCoilsResponse{ - _ModbusPDU: &_ModbusPDU{}, - Value: value, + _ModbusPDU: &_ModbusPDU{ + }, + Value: value, } _child._ModbusPDU._ModbusPDUChildRequirements = _child return _child, nil @@ -189,18 +192,18 @@ func (m *_ModbusPDUReadCoilsResponse) SerializeWithWriteBuffer(ctx context.Conte return errors.Wrap(pushErr, "Error pushing for ModbusPDUReadCoilsResponse") } - // Implicit Field (byteCount) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - byteCount := uint8(uint8(len(m.GetValue()))) - _byteCountErr := writeBuffer.WriteUint8("byteCount", 8, (byteCount)) - if _byteCountErr != nil { - return errors.Wrap(_byteCountErr, "Error serializing 'byteCount' field") - } + // Implicit Field (byteCount) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) + byteCount := uint8(uint8(len(m.GetValue()))) + _byteCountErr := writeBuffer.WriteUint8("byteCount", 8, (byteCount)) + if _byteCountErr != nil { + return errors.Wrap(_byteCountErr, "Error serializing 'byteCount' field") + } - // Array Field (value) - // Byte Array field (value) - if err := writeBuffer.WriteByteArray("value", m.GetValue()); err != nil { - return errors.Wrap(err, "Error serializing 'value' field") - } + // Array Field (value) + // Byte Array field (value) + if err := writeBuffer.WriteByteArray("value", m.GetValue()); err != nil { + return errors.Wrap(err, "Error serializing 'value' field") + } if popErr := writeBuffer.PopContext("ModbusPDUReadCoilsResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for ModbusPDUReadCoilsResponse") @@ -210,6 +213,7 @@ func (m *_ModbusPDUReadCoilsResponse) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusPDUReadCoilsResponse) isModbusPDUReadCoilsResponse() bool { return true } @@ -224,3 +228,6 @@ func (m *_ModbusPDUReadCoilsResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadDeviceIdentificationRequest.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadDeviceIdentificationRequest.go index 3eb6a15c9d0..8d9bcbbee9c 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadDeviceIdentificationRequest.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadDeviceIdentificationRequest.go @@ -19,6 +19,7 @@ package model + import ( "context" "fmt" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const ModbusPDUReadDeviceIdentificationRequest_MEITYPE uint8 = 0x0E @@ -52,38 +54,36 @@ type ModbusPDUReadDeviceIdentificationRequestExactly interface { // _ModbusPDUReadDeviceIdentificationRequest is the data-structure of this message type _ModbusPDUReadDeviceIdentificationRequest struct { *_ModbusPDU - Level ModbusDeviceInformationLevel - ObjectId uint8 + Level ModbusDeviceInformationLevel + ObjectId uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusPDUReadDeviceIdentificationRequest) GetErrorFlag() bool { - return bool(false) -} +func (m *_ModbusPDUReadDeviceIdentificationRequest) GetErrorFlag() bool { +return bool(false)} -func (m *_ModbusPDUReadDeviceIdentificationRequest) GetFunctionFlag() uint8 { - return 0x2B -} +func (m *_ModbusPDUReadDeviceIdentificationRequest) GetFunctionFlag() uint8 { +return 0x2B} -func (m *_ModbusPDUReadDeviceIdentificationRequest) GetResponse() bool { - return bool(false) -} +func (m *_ModbusPDUReadDeviceIdentificationRequest) GetResponse() bool { +return bool(false)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusPDUReadDeviceIdentificationRequest) InitializeParent(parent ModbusPDU) {} +func (m *_ModbusPDUReadDeviceIdentificationRequest) InitializeParent(parent ModbusPDU ) {} -func (m *_ModbusPDUReadDeviceIdentificationRequest) GetParent() ModbusPDU { +func (m *_ModbusPDUReadDeviceIdentificationRequest) GetParent() ModbusPDU { return m._ModbusPDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -115,12 +115,13 @@ func (m *_ModbusPDUReadDeviceIdentificationRequest) GetMeiType() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusPDUReadDeviceIdentificationRequest factory function for _ModbusPDUReadDeviceIdentificationRequest -func NewModbusPDUReadDeviceIdentificationRequest(level ModbusDeviceInformationLevel, objectId uint8) *_ModbusPDUReadDeviceIdentificationRequest { +func NewModbusPDUReadDeviceIdentificationRequest( level ModbusDeviceInformationLevel , objectId uint8 ) *_ModbusPDUReadDeviceIdentificationRequest { _result := &_ModbusPDUReadDeviceIdentificationRequest{ - Level: level, - ObjectId: objectId, - _ModbusPDU: NewModbusPDU(), + Level: level, + ObjectId: objectId, + _ModbusPDU: NewModbusPDU(), } _result._ModbusPDU._ModbusPDUChildRequirements = _result return _result @@ -128,7 +129,7 @@ func NewModbusPDUReadDeviceIdentificationRequest(level ModbusDeviceInformationLe // Deprecated: use the interface for direct cast func CastModbusPDUReadDeviceIdentificationRequest(structType interface{}) ModbusPDUReadDeviceIdentificationRequest { - if casted, ok := structType.(ModbusPDUReadDeviceIdentificationRequest); ok { + if casted, ok := structType.(ModbusPDUReadDeviceIdentificationRequest); ok { return casted } if casted, ok := structType.(*ModbusPDUReadDeviceIdentificationRequest); ok { @@ -151,11 +152,12 @@ func (m *_ModbusPDUReadDeviceIdentificationRequest) GetLengthInBits(ctx context. lengthInBits += 8 // Simple field (objectId) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_ModbusPDUReadDeviceIdentificationRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -186,7 +188,7 @@ func ModbusPDUReadDeviceIdentificationRequestParseWithBuffer(ctx context.Context if pullErr := readBuffer.PullContext("level"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for level") } - _level, _levelErr := ModbusDeviceInformationLevelParseWithBuffer(ctx, readBuffer) +_level, _levelErr := ModbusDeviceInformationLevelParseWithBuffer(ctx, readBuffer) if _levelErr != nil { return nil, errors.Wrap(_levelErr, "Error parsing 'level' field of ModbusPDUReadDeviceIdentificationRequest") } @@ -196,7 +198,7 @@ func ModbusPDUReadDeviceIdentificationRequestParseWithBuffer(ctx context.Context } // Simple Field (objectId) - _objectId, _objectIdErr := readBuffer.ReadUint8("objectId", 8) +_objectId, _objectIdErr := readBuffer.ReadUint8("objectId", 8) if _objectIdErr != nil { return nil, errors.Wrap(_objectIdErr, "Error parsing 'objectId' field of ModbusPDUReadDeviceIdentificationRequest") } @@ -208,9 +210,10 @@ func ModbusPDUReadDeviceIdentificationRequestParseWithBuffer(ctx context.Context // Create a partially initialized instance _child := &_ModbusPDUReadDeviceIdentificationRequest{ - _ModbusPDU: &_ModbusPDU{}, - Level: level, - ObjectId: objectId, + _ModbusPDU: &_ModbusPDU{ + }, + Level: level, + ObjectId: objectId, } _child._ModbusPDU._ModbusPDUChildRequirements = _child return _child, nil @@ -232,30 +235,30 @@ func (m *_ModbusPDUReadDeviceIdentificationRequest) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for ModbusPDUReadDeviceIdentificationRequest") } - // Const Field (meiType) - _meiTypeErr := writeBuffer.WriteUint8("meiType", 8, 0x0E) - if _meiTypeErr != nil { - return errors.Wrap(_meiTypeErr, "Error serializing 'meiType' field") - } + // Const Field (meiType) + _meiTypeErr := writeBuffer.WriteUint8("meiType", 8, 0x0E) + if _meiTypeErr != nil { + return errors.Wrap(_meiTypeErr, "Error serializing 'meiType' field") + } - // Simple Field (level) - if pushErr := writeBuffer.PushContext("level"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for level") - } - _levelErr := writeBuffer.WriteSerializable(ctx, m.GetLevel()) - if popErr := writeBuffer.PopContext("level"); popErr != nil { - return errors.Wrap(popErr, "Error popping for level") - } - if _levelErr != nil { - return errors.Wrap(_levelErr, "Error serializing 'level' field") - } + // Simple Field (level) + if pushErr := writeBuffer.PushContext("level"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for level") + } + _levelErr := writeBuffer.WriteSerializable(ctx, m.GetLevel()) + if popErr := writeBuffer.PopContext("level"); popErr != nil { + return errors.Wrap(popErr, "Error popping for level") + } + if _levelErr != nil { + return errors.Wrap(_levelErr, "Error serializing 'level' field") + } - // Simple Field (objectId) - objectId := uint8(m.GetObjectId()) - _objectIdErr := writeBuffer.WriteUint8("objectId", 8, (objectId)) - if _objectIdErr != nil { - return errors.Wrap(_objectIdErr, "Error serializing 'objectId' field") - } + // Simple Field (objectId) + objectId := uint8(m.GetObjectId()) + _objectIdErr := writeBuffer.WriteUint8("objectId", 8, (objectId)) + if _objectIdErr != nil { + return errors.Wrap(_objectIdErr, "Error serializing 'objectId' field") + } if popErr := writeBuffer.PopContext("ModbusPDUReadDeviceIdentificationRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for ModbusPDUReadDeviceIdentificationRequest") @@ -265,6 +268,7 @@ func (m *_ModbusPDUReadDeviceIdentificationRequest) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusPDUReadDeviceIdentificationRequest) isModbusPDUReadDeviceIdentificationRequest() bool { return true } @@ -279,3 +283,6 @@ func (m *_ModbusPDUReadDeviceIdentificationRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadDeviceIdentificationResponse.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadDeviceIdentificationResponse.go index 98d177693e1..297c014743a 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadDeviceIdentificationResponse.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadDeviceIdentificationResponse.go @@ -19,15 +19,17 @@ package model + import ( "context" "fmt" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const ModbusPDUReadDeviceIdentificationResponse_MEITYPE uint8 = 0x0E @@ -61,42 +63,40 @@ type ModbusPDUReadDeviceIdentificationResponseExactly interface { // _ModbusPDUReadDeviceIdentificationResponse is the data-structure of this message type _ModbusPDUReadDeviceIdentificationResponse struct { *_ModbusPDU - Level ModbusDeviceInformationLevel - IndividualAccess bool - ConformityLevel ModbusDeviceInformationConformityLevel - MoreFollows ModbusDeviceInformationMoreFollows - NextObjectId uint8 - Objects []ModbusDeviceInformationObject + Level ModbusDeviceInformationLevel + IndividualAccess bool + ConformityLevel ModbusDeviceInformationConformityLevel + MoreFollows ModbusDeviceInformationMoreFollows + NextObjectId uint8 + Objects []ModbusDeviceInformationObject } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusPDUReadDeviceIdentificationResponse) GetErrorFlag() bool { - return bool(false) -} +func (m *_ModbusPDUReadDeviceIdentificationResponse) GetErrorFlag() bool { +return bool(false)} -func (m *_ModbusPDUReadDeviceIdentificationResponse) GetFunctionFlag() uint8 { - return 0x2B -} +func (m *_ModbusPDUReadDeviceIdentificationResponse) GetFunctionFlag() uint8 { +return 0x2B} -func (m *_ModbusPDUReadDeviceIdentificationResponse) GetResponse() bool { - return bool(true) -} +func (m *_ModbusPDUReadDeviceIdentificationResponse) GetResponse() bool { +return bool(true)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusPDUReadDeviceIdentificationResponse) InitializeParent(parent ModbusPDU) {} +func (m *_ModbusPDUReadDeviceIdentificationResponse) InitializeParent(parent ModbusPDU ) {} -func (m *_ModbusPDUReadDeviceIdentificationResponse) GetParent() ModbusPDU { +func (m *_ModbusPDUReadDeviceIdentificationResponse) GetParent() ModbusPDU { return m._ModbusPDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -144,16 +144,17 @@ func (m *_ModbusPDUReadDeviceIdentificationResponse) GetMeiType() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusPDUReadDeviceIdentificationResponse factory function for _ModbusPDUReadDeviceIdentificationResponse -func NewModbusPDUReadDeviceIdentificationResponse(level ModbusDeviceInformationLevel, individualAccess bool, conformityLevel ModbusDeviceInformationConformityLevel, moreFollows ModbusDeviceInformationMoreFollows, nextObjectId uint8, objects []ModbusDeviceInformationObject) *_ModbusPDUReadDeviceIdentificationResponse { +func NewModbusPDUReadDeviceIdentificationResponse( level ModbusDeviceInformationLevel , individualAccess bool , conformityLevel ModbusDeviceInformationConformityLevel , moreFollows ModbusDeviceInformationMoreFollows , nextObjectId uint8 , objects []ModbusDeviceInformationObject ) *_ModbusPDUReadDeviceIdentificationResponse { _result := &_ModbusPDUReadDeviceIdentificationResponse{ - Level: level, + Level: level, IndividualAccess: individualAccess, - ConformityLevel: conformityLevel, - MoreFollows: moreFollows, - NextObjectId: nextObjectId, - Objects: objects, - _ModbusPDU: NewModbusPDU(), + ConformityLevel: conformityLevel, + MoreFollows: moreFollows, + NextObjectId: nextObjectId, + Objects: objects, + _ModbusPDU: NewModbusPDU(), } _result._ModbusPDU._ModbusPDUChildRequirements = _result return _result @@ -161,7 +162,7 @@ func NewModbusPDUReadDeviceIdentificationResponse(level ModbusDeviceInformationL // Deprecated: use the interface for direct cast func CastModbusPDUReadDeviceIdentificationResponse(structType interface{}) ModbusPDUReadDeviceIdentificationResponse { - if casted, ok := structType.(ModbusPDUReadDeviceIdentificationResponse); ok { + if casted, ok := structType.(ModbusPDUReadDeviceIdentificationResponse); ok { return casted } if casted, ok := structType.(*ModbusPDUReadDeviceIdentificationResponse); ok { @@ -184,7 +185,7 @@ func (m *_ModbusPDUReadDeviceIdentificationResponse) GetLengthInBits(ctx context lengthInBits += 8 // Simple field (individualAccess) - lengthInBits += 1 + lengthInBits += 1; // Simple field (conformityLevel) lengthInBits += 7 @@ -193,7 +194,7 @@ func (m *_ModbusPDUReadDeviceIdentificationResponse) GetLengthInBits(ctx context lengthInBits += 8 // Simple field (nextObjectId) - lengthInBits += 8 + lengthInBits += 8; // Implicit Field (numberOfObjects) lengthInBits += 8 @@ -204,13 +205,14 @@ func (m *_ModbusPDUReadDeviceIdentificationResponse) GetLengthInBits(ctx context arrayCtx := spiContext.CreateArrayContext(ctx, len(m.Objects), _curItem) _ = arrayCtx _ = _curItem - lengthInBits += element.(interface{ GetLengthInBits(context.Context) uint16 }).GetLengthInBits(arrayCtx) + lengthInBits += element.(interface{GetLengthInBits(context.Context) uint16}).GetLengthInBits(arrayCtx) } } return lengthInBits } + func (m *_ModbusPDUReadDeviceIdentificationResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -241,7 +243,7 @@ func ModbusPDUReadDeviceIdentificationResponseParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("level"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for level") } - _level, _levelErr := ModbusDeviceInformationLevelParseWithBuffer(ctx, readBuffer) +_level, _levelErr := ModbusDeviceInformationLevelParseWithBuffer(ctx, readBuffer) if _levelErr != nil { return nil, errors.Wrap(_levelErr, "Error parsing 'level' field of ModbusPDUReadDeviceIdentificationResponse") } @@ -251,7 +253,7 @@ func ModbusPDUReadDeviceIdentificationResponseParseWithBuffer(ctx context.Contex } // Simple Field (individualAccess) - _individualAccess, _individualAccessErr := readBuffer.ReadBit("individualAccess") +_individualAccess, _individualAccessErr := readBuffer.ReadBit("individualAccess") if _individualAccessErr != nil { return nil, errors.Wrap(_individualAccessErr, "Error parsing 'individualAccess' field of ModbusPDUReadDeviceIdentificationResponse") } @@ -261,7 +263,7 @@ func ModbusPDUReadDeviceIdentificationResponseParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("conformityLevel"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for conformityLevel") } - _conformityLevel, _conformityLevelErr := ModbusDeviceInformationConformityLevelParseWithBuffer(ctx, readBuffer) +_conformityLevel, _conformityLevelErr := ModbusDeviceInformationConformityLevelParseWithBuffer(ctx, readBuffer) if _conformityLevelErr != nil { return nil, errors.Wrap(_conformityLevelErr, "Error parsing 'conformityLevel' field of ModbusPDUReadDeviceIdentificationResponse") } @@ -274,7 +276,7 @@ func ModbusPDUReadDeviceIdentificationResponseParseWithBuffer(ctx context.Contex if pullErr := readBuffer.PullContext("moreFollows"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for moreFollows") } - _moreFollows, _moreFollowsErr := ModbusDeviceInformationMoreFollowsParseWithBuffer(ctx, readBuffer) +_moreFollows, _moreFollowsErr := ModbusDeviceInformationMoreFollowsParseWithBuffer(ctx, readBuffer) if _moreFollowsErr != nil { return nil, errors.Wrap(_moreFollowsErr, "Error parsing 'moreFollows' field of ModbusPDUReadDeviceIdentificationResponse") } @@ -284,7 +286,7 @@ func ModbusPDUReadDeviceIdentificationResponseParseWithBuffer(ctx context.Contex } // Simple Field (nextObjectId) - _nextObjectId, _nextObjectIdErr := readBuffer.ReadUint8("nextObjectId", 8) +_nextObjectId, _nextObjectIdErr := readBuffer.ReadUint8("nextObjectId", 8) if _nextObjectIdErr != nil { return nil, errors.Wrap(_nextObjectIdErr, "Error parsing 'nextObjectId' field of ModbusPDUReadDeviceIdentificationResponse") } @@ -313,7 +315,7 @@ func ModbusPDUReadDeviceIdentificationResponseParseWithBuffer(ctx context.Contex arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := ModbusDeviceInformationObjectParseWithBuffer(arrayCtx, readBuffer) +_item, _err := ModbusDeviceInformationObjectParseWithBuffer(arrayCtx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'objects' field of ModbusPDUReadDeviceIdentificationResponse") } @@ -330,13 +332,14 @@ func ModbusPDUReadDeviceIdentificationResponseParseWithBuffer(ctx context.Contex // Create a partially initialized instance _child := &_ModbusPDUReadDeviceIdentificationResponse{ - _ModbusPDU: &_ModbusPDU{}, - Level: level, + _ModbusPDU: &_ModbusPDU{ + }, + Level: level, IndividualAccess: individualAccess, - ConformityLevel: conformityLevel, - MoreFollows: moreFollows, - NextObjectId: nextObjectId, - Objects: objects, + ConformityLevel: conformityLevel, + MoreFollows: moreFollows, + NextObjectId: nextObjectId, + Objects: objects, } _child._ModbusPDU._ModbusPDUChildRequirements = _child return _child, nil @@ -358,85 +361,85 @@ func (m *_ModbusPDUReadDeviceIdentificationResponse) SerializeWithWriteBuffer(ct return errors.Wrap(pushErr, "Error pushing for ModbusPDUReadDeviceIdentificationResponse") } - // Const Field (meiType) - _meiTypeErr := writeBuffer.WriteUint8("meiType", 8, 0x0E) - if _meiTypeErr != nil { - return errors.Wrap(_meiTypeErr, "Error serializing 'meiType' field") - } + // Const Field (meiType) + _meiTypeErr := writeBuffer.WriteUint8("meiType", 8, 0x0E) + if _meiTypeErr != nil { + return errors.Wrap(_meiTypeErr, "Error serializing 'meiType' field") + } - // Simple Field (level) - if pushErr := writeBuffer.PushContext("level"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for level") - } - _levelErr := writeBuffer.WriteSerializable(ctx, m.GetLevel()) - if popErr := writeBuffer.PopContext("level"); popErr != nil { - return errors.Wrap(popErr, "Error popping for level") - } - if _levelErr != nil { - return errors.Wrap(_levelErr, "Error serializing 'level' field") - } + // Simple Field (level) + if pushErr := writeBuffer.PushContext("level"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for level") + } + _levelErr := writeBuffer.WriteSerializable(ctx, m.GetLevel()) + if popErr := writeBuffer.PopContext("level"); popErr != nil { + return errors.Wrap(popErr, "Error popping for level") + } + if _levelErr != nil { + return errors.Wrap(_levelErr, "Error serializing 'level' field") + } - // Simple Field (individualAccess) - individualAccess := bool(m.GetIndividualAccess()) - _individualAccessErr := writeBuffer.WriteBit("individualAccess", (individualAccess)) - if _individualAccessErr != nil { - return errors.Wrap(_individualAccessErr, "Error serializing 'individualAccess' field") - } + // Simple Field (individualAccess) + individualAccess := bool(m.GetIndividualAccess()) + _individualAccessErr := writeBuffer.WriteBit("individualAccess", (individualAccess)) + if _individualAccessErr != nil { + return errors.Wrap(_individualAccessErr, "Error serializing 'individualAccess' field") + } - // Simple Field (conformityLevel) - if pushErr := writeBuffer.PushContext("conformityLevel"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for conformityLevel") - } - _conformityLevelErr := writeBuffer.WriteSerializable(ctx, m.GetConformityLevel()) - if popErr := writeBuffer.PopContext("conformityLevel"); popErr != nil { - return errors.Wrap(popErr, "Error popping for conformityLevel") - } - if _conformityLevelErr != nil { - return errors.Wrap(_conformityLevelErr, "Error serializing 'conformityLevel' field") - } + // Simple Field (conformityLevel) + if pushErr := writeBuffer.PushContext("conformityLevel"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for conformityLevel") + } + _conformityLevelErr := writeBuffer.WriteSerializable(ctx, m.GetConformityLevel()) + if popErr := writeBuffer.PopContext("conformityLevel"); popErr != nil { + return errors.Wrap(popErr, "Error popping for conformityLevel") + } + if _conformityLevelErr != nil { + return errors.Wrap(_conformityLevelErr, "Error serializing 'conformityLevel' field") + } - // Simple Field (moreFollows) - if pushErr := writeBuffer.PushContext("moreFollows"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for moreFollows") - } - _moreFollowsErr := writeBuffer.WriteSerializable(ctx, m.GetMoreFollows()) - if popErr := writeBuffer.PopContext("moreFollows"); popErr != nil { - return errors.Wrap(popErr, "Error popping for moreFollows") - } - if _moreFollowsErr != nil { - return errors.Wrap(_moreFollowsErr, "Error serializing 'moreFollows' field") - } + // Simple Field (moreFollows) + if pushErr := writeBuffer.PushContext("moreFollows"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for moreFollows") + } + _moreFollowsErr := writeBuffer.WriteSerializable(ctx, m.GetMoreFollows()) + if popErr := writeBuffer.PopContext("moreFollows"); popErr != nil { + return errors.Wrap(popErr, "Error popping for moreFollows") + } + if _moreFollowsErr != nil { + return errors.Wrap(_moreFollowsErr, "Error serializing 'moreFollows' field") + } - // Simple Field (nextObjectId) - nextObjectId := uint8(m.GetNextObjectId()) - _nextObjectIdErr := writeBuffer.WriteUint8("nextObjectId", 8, (nextObjectId)) - if _nextObjectIdErr != nil { - return errors.Wrap(_nextObjectIdErr, "Error serializing 'nextObjectId' field") - } + // Simple Field (nextObjectId) + nextObjectId := uint8(m.GetNextObjectId()) + _nextObjectIdErr := writeBuffer.WriteUint8("nextObjectId", 8, (nextObjectId)) + if _nextObjectIdErr != nil { + return errors.Wrap(_nextObjectIdErr, "Error serializing 'nextObjectId' field") + } - // Implicit Field (numberOfObjects) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - numberOfObjects := uint8(uint8(len(m.GetObjects()))) - _numberOfObjectsErr := writeBuffer.WriteUint8("numberOfObjects", 8, (numberOfObjects)) - if _numberOfObjectsErr != nil { - return errors.Wrap(_numberOfObjectsErr, "Error serializing 'numberOfObjects' field") - } + // Implicit Field (numberOfObjects) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) + numberOfObjects := uint8(uint8(len(m.GetObjects()))) + _numberOfObjectsErr := writeBuffer.WriteUint8("numberOfObjects", 8, (numberOfObjects)) + if _numberOfObjectsErr != nil { + return errors.Wrap(_numberOfObjectsErr, "Error serializing 'numberOfObjects' field") + } - // Array Field (objects) - if pushErr := writeBuffer.PushContext("objects", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for objects") - } - for _curItem, _element := range m.GetObjects() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetObjects()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'objects' field") - } - } - if popErr := writeBuffer.PopContext("objects", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for objects") + // Array Field (objects) + if pushErr := writeBuffer.PushContext("objects", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for objects") + } + for _curItem, _element := range m.GetObjects() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetObjects()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'objects' field") } + } + if popErr := writeBuffer.PopContext("objects", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for objects") + } if popErr := writeBuffer.PopContext("ModbusPDUReadDeviceIdentificationResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for ModbusPDUReadDeviceIdentificationResponse") @@ -446,6 +449,7 @@ func (m *_ModbusPDUReadDeviceIdentificationResponse) SerializeWithWriteBuffer(ct return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusPDUReadDeviceIdentificationResponse) isModbusPDUReadDeviceIdentificationResponse() bool { return true } @@ -460,3 +464,6 @@ func (m *_ModbusPDUReadDeviceIdentificationResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadDiscreteInputsRequest.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadDiscreteInputsRequest.go index 58788adef65..36db7d3ae99 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadDiscreteInputsRequest.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadDiscreteInputsRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUReadDiscreteInputsRequest is the corresponding interface of ModbusPDUReadDiscreteInputsRequest type ModbusPDUReadDiscreteInputsRequest interface { @@ -48,38 +50,36 @@ type ModbusPDUReadDiscreteInputsRequestExactly interface { // _ModbusPDUReadDiscreteInputsRequest is the data-structure of this message type _ModbusPDUReadDiscreteInputsRequest struct { *_ModbusPDU - StartingAddress uint16 - Quantity uint16 + StartingAddress uint16 + Quantity uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusPDUReadDiscreteInputsRequest) GetErrorFlag() bool { - return bool(false) -} +func (m *_ModbusPDUReadDiscreteInputsRequest) GetErrorFlag() bool { +return bool(false)} -func (m *_ModbusPDUReadDiscreteInputsRequest) GetFunctionFlag() uint8 { - return 0x02 -} +func (m *_ModbusPDUReadDiscreteInputsRequest) GetFunctionFlag() uint8 { +return 0x02} -func (m *_ModbusPDUReadDiscreteInputsRequest) GetResponse() bool { - return bool(false) -} +func (m *_ModbusPDUReadDiscreteInputsRequest) GetResponse() bool { +return bool(false)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusPDUReadDiscreteInputsRequest) InitializeParent(parent ModbusPDU) {} +func (m *_ModbusPDUReadDiscreteInputsRequest) InitializeParent(parent ModbusPDU ) {} -func (m *_ModbusPDUReadDiscreteInputsRequest) GetParent() ModbusPDU { +func (m *_ModbusPDUReadDiscreteInputsRequest) GetParent() ModbusPDU { return m._ModbusPDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,12 +98,13 @@ func (m *_ModbusPDUReadDiscreteInputsRequest) GetQuantity() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusPDUReadDiscreteInputsRequest factory function for _ModbusPDUReadDiscreteInputsRequest -func NewModbusPDUReadDiscreteInputsRequest(startingAddress uint16, quantity uint16) *_ModbusPDUReadDiscreteInputsRequest { +func NewModbusPDUReadDiscreteInputsRequest( startingAddress uint16 , quantity uint16 ) *_ModbusPDUReadDiscreteInputsRequest { _result := &_ModbusPDUReadDiscreteInputsRequest{ StartingAddress: startingAddress, - Quantity: quantity, - _ModbusPDU: NewModbusPDU(), + Quantity: quantity, + _ModbusPDU: NewModbusPDU(), } _result._ModbusPDU._ModbusPDUChildRequirements = _result return _result @@ -111,7 +112,7 @@ func NewModbusPDUReadDiscreteInputsRequest(startingAddress uint16, quantity uint // Deprecated: use the interface for direct cast func CastModbusPDUReadDiscreteInputsRequest(structType interface{}) ModbusPDUReadDiscreteInputsRequest { - if casted, ok := structType.(ModbusPDUReadDiscreteInputsRequest); ok { + if casted, ok := structType.(ModbusPDUReadDiscreteInputsRequest); ok { return casted } if casted, ok := structType.(*ModbusPDUReadDiscreteInputsRequest); ok { @@ -128,14 +129,15 @@ func (m *_ModbusPDUReadDiscreteInputsRequest) GetLengthInBits(ctx context.Contex lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (startingAddress) - lengthInBits += 16 + lengthInBits += 16; // Simple field (quantity) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_ModbusPDUReadDiscreteInputsRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,14 +156,14 @@ func ModbusPDUReadDiscreteInputsRequestParseWithBuffer(ctx context.Context, read _ = currentPos // Simple Field (startingAddress) - _startingAddress, _startingAddressErr := readBuffer.ReadUint16("startingAddress", 16) +_startingAddress, _startingAddressErr := readBuffer.ReadUint16("startingAddress", 16) if _startingAddressErr != nil { return nil, errors.Wrap(_startingAddressErr, "Error parsing 'startingAddress' field of ModbusPDUReadDiscreteInputsRequest") } startingAddress := _startingAddress // Simple Field (quantity) - _quantity, _quantityErr := readBuffer.ReadUint16("quantity", 16) +_quantity, _quantityErr := readBuffer.ReadUint16("quantity", 16) if _quantityErr != nil { return nil, errors.Wrap(_quantityErr, "Error parsing 'quantity' field of ModbusPDUReadDiscreteInputsRequest") } @@ -173,9 +175,10 @@ func ModbusPDUReadDiscreteInputsRequestParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_ModbusPDUReadDiscreteInputsRequest{ - _ModbusPDU: &_ModbusPDU{}, + _ModbusPDU: &_ModbusPDU{ + }, StartingAddress: startingAddress, - Quantity: quantity, + Quantity: quantity, } _child._ModbusPDU._ModbusPDUChildRequirements = _child return _child, nil @@ -197,19 +200,19 @@ func (m *_ModbusPDUReadDiscreteInputsRequest) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for ModbusPDUReadDiscreteInputsRequest") } - // Simple Field (startingAddress) - startingAddress := uint16(m.GetStartingAddress()) - _startingAddressErr := writeBuffer.WriteUint16("startingAddress", 16, (startingAddress)) - if _startingAddressErr != nil { - return errors.Wrap(_startingAddressErr, "Error serializing 'startingAddress' field") - } + // Simple Field (startingAddress) + startingAddress := uint16(m.GetStartingAddress()) + _startingAddressErr := writeBuffer.WriteUint16("startingAddress", 16, (startingAddress)) + if _startingAddressErr != nil { + return errors.Wrap(_startingAddressErr, "Error serializing 'startingAddress' field") + } - // Simple Field (quantity) - quantity := uint16(m.GetQuantity()) - _quantityErr := writeBuffer.WriteUint16("quantity", 16, (quantity)) - if _quantityErr != nil { - return errors.Wrap(_quantityErr, "Error serializing 'quantity' field") - } + // Simple Field (quantity) + quantity := uint16(m.GetQuantity()) + _quantityErr := writeBuffer.WriteUint16("quantity", 16, (quantity)) + if _quantityErr != nil { + return errors.Wrap(_quantityErr, "Error serializing 'quantity' field") + } if popErr := writeBuffer.PopContext("ModbusPDUReadDiscreteInputsRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for ModbusPDUReadDiscreteInputsRequest") @@ -219,6 +222,7 @@ func (m *_ModbusPDUReadDiscreteInputsRequest) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusPDUReadDiscreteInputsRequest) isModbusPDUReadDiscreteInputsRequest() bool { return true } @@ -233,3 +237,6 @@ func (m *_ModbusPDUReadDiscreteInputsRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadDiscreteInputsResponse.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadDiscreteInputsResponse.go index fd7aca64e28..979e0686407 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadDiscreteInputsResponse.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadDiscreteInputsResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUReadDiscreteInputsResponse is the corresponding interface of ModbusPDUReadDiscreteInputsResponse type ModbusPDUReadDiscreteInputsResponse interface { @@ -46,37 +48,35 @@ type ModbusPDUReadDiscreteInputsResponseExactly interface { // _ModbusPDUReadDiscreteInputsResponse is the data-structure of this message type _ModbusPDUReadDiscreteInputsResponse struct { *_ModbusPDU - Value []byte + Value []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusPDUReadDiscreteInputsResponse) GetErrorFlag() bool { - return bool(false) -} +func (m *_ModbusPDUReadDiscreteInputsResponse) GetErrorFlag() bool { +return bool(false)} -func (m *_ModbusPDUReadDiscreteInputsResponse) GetFunctionFlag() uint8 { - return 0x02 -} +func (m *_ModbusPDUReadDiscreteInputsResponse) GetFunctionFlag() uint8 { +return 0x02} -func (m *_ModbusPDUReadDiscreteInputsResponse) GetResponse() bool { - return bool(true) -} +func (m *_ModbusPDUReadDiscreteInputsResponse) GetResponse() bool { +return bool(true)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusPDUReadDiscreteInputsResponse) InitializeParent(parent ModbusPDU) {} +func (m *_ModbusPDUReadDiscreteInputsResponse) InitializeParent(parent ModbusPDU ) {} -func (m *_ModbusPDUReadDiscreteInputsResponse) GetParent() ModbusPDU { +func (m *_ModbusPDUReadDiscreteInputsResponse) GetParent() ModbusPDU { return m._ModbusPDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -91,11 +91,12 @@ func (m *_ModbusPDUReadDiscreteInputsResponse) GetValue() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusPDUReadDiscreteInputsResponse factory function for _ModbusPDUReadDiscreteInputsResponse -func NewModbusPDUReadDiscreteInputsResponse(value []byte) *_ModbusPDUReadDiscreteInputsResponse { +func NewModbusPDUReadDiscreteInputsResponse( value []byte ) *_ModbusPDUReadDiscreteInputsResponse { _result := &_ModbusPDUReadDiscreteInputsResponse{ - Value: value, - _ModbusPDU: NewModbusPDU(), + Value: value, + _ModbusPDU: NewModbusPDU(), } _result._ModbusPDU._ModbusPDUChildRequirements = _result return _result @@ -103,7 +104,7 @@ func NewModbusPDUReadDiscreteInputsResponse(value []byte) *_ModbusPDUReadDiscret // Deprecated: use the interface for direct cast func CastModbusPDUReadDiscreteInputsResponse(structType interface{}) ModbusPDUReadDiscreteInputsResponse { - if casted, ok := structType.(ModbusPDUReadDiscreteInputsResponse); ok { + if casted, ok := structType.(ModbusPDUReadDiscreteInputsResponse); ok { return casted } if casted, ok := structType.(*ModbusPDUReadDiscreteInputsResponse); ok { @@ -130,6 +131,7 @@ func (m *_ModbusPDUReadDiscreteInputsResponse) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_ModbusPDUReadDiscreteInputsResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -166,8 +168,9 @@ func ModbusPDUReadDiscreteInputsResponseParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_ModbusPDUReadDiscreteInputsResponse{ - _ModbusPDU: &_ModbusPDU{}, - Value: value, + _ModbusPDU: &_ModbusPDU{ + }, + Value: value, } _child._ModbusPDU._ModbusPDUChildRequirements = _child return _child, nil @@ -189,18 +192,18 @@ func (m *_ModbusPDUReadDiscreteInputsResponse) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for ModbusPDUReadDiscreteInputsResponse") } - // Implicit Field (byteCount) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - byteCount := uint8(uint8(len(m.GetValue()))) - _byteCountErr := writeBuffer.WriteUint8("byteCount", 8, (byteCount)) - if _byteCountErr != nil { - return errors.Wrap(_byteCountErr, "Error serializing 'byteCount' field") - } + // Implicit Field (byteCount) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) + byteCount := uint8(uint8(len(m.GetValue()))) + _byteCountErr := writeBuffer.WriteUint8("byteCount", 8, (byteCount)) + if _byteCountErr != nil { + return errors.Wrap(_byteCountErr, "Error serializing 'byteCount' field") + } - // Array Field (value) - // Byte Array field (value) - if err := writeBuffer.WriteByteArray("value", m.GetValue()); err != nil { - return errors.Wrap(err, "Error serializing 'value' field") - } + // Array Field (value) + // Byte Array field (value) + if err := writeBuffer.WriteByteArray("value", m.GetValue()); err != nil { + return errors.Wrap(err, "Error serializing 'value' field") + } if popErr := writeBuffer.PopContext("ModbusPDUReadDiscreteInputsResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for ModbusPDUReadDiscreteInputsResponse") @@ -210,6 +213,7 @@ func (m *_ModbusPDUReadDiscreteInputsResponse) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusPDUReadDiscreteInputsResponse) isModbusPDUReadDiscreteInputsResponse() bool { return true } @@ -224,3 +228,6 @@ func (m *_ModbusPDUReadDiscreteInputsResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadExceptionStatusRequest.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadExceptionStatusRequest.go index 322dc300a79..d5939680acd 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadExceptionStatusRequest.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadExceptionStatusRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUReadExceptionStatusRequest is the corresponding interface of ModbusPDUReadExceptionStatusRequest type ModbusPDUReadExceptionStatusRequest interface { @@ -46,38 +48,38 @@ type _ModbusPDUReadExceptionStatusRequest struct { *_ModbusPDU } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusPDUReadExceptionStatusRequest) GetErrorFlag() bool { - return bool(false) -} +func (m *_ModbusPDUReadExceptionStatusRequest) GetErrorFlag() bool { +return bool(false)} -func (m *_ModbusPDUReadExceptionStatusRequest) GetFunctionFlag() uint8 { - return 0x07 -} +func (m *_ModbusPDUReadExceptionStatusRequest) GetFunctionFlag() uint8 { +return 0x07} -func (m *_ModbusPDUReadExceptionStatusRequest) GetResponse() bool { - return bool(false) -} +func (m *_ModbusPDUReadExceptionStatusRequest) GetResponse() bool { +return bool(false)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusPDUReadExceptionStatusRequest) InitializeParent(parent ModbusPDU) {} +func (m *_ModbusPDUReadExceptionStatusRequest) InitializeParent(parent ModbusPDU ) {} -func (m *_ModbusPDUReadExceptionStatusRequest) GetParent() ModbusPDU { +func (m *_ModbusPDUReadExceptionStatusRequest) GetParent() ModbusPDU { return m._ModbusPDU } + // NewModbusPDUReadExceptionStatusRequest factory function for _ModbusPDUReadExceptionStatusRequest -func NewModbusPDUReadExceptionStatusRequest() *_ModbusPDUReadExceptionStatusRequest { +func NewModbusPDUReadExceptionStatusRequest( ) *_ModbusPDUReadExceptionStatusRequest { _result := &_ModbusPDUReadExceptionStatusRequest{ - _ModbusPDU: NewModbusPDU(), + _ModbusPDU: NewModbusPDU(), } _result._ModbusPDU._ModbusPDUChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewModbusPDUReadExceptionStatusRequest() *_ModbusPDUReadExceptionStatusRequ // Deprecated: use the interface for direct cast func CastModbusPDUReadExceptionStatusRequest(structType interface{}) ModbusPDUReadExceptionStatusRequest { - if casted, ok := structType.(ModbusPDUReadExceptionStatusRequest); ok { + if casted, ok := structType.(ModbusPDUReadExceptionStatusRequest); ok { return casted } if casted, ok := structType.(*ModbusPDUReadExceptionStatusRequest); ok { @@ -104,6 +106,7 @@ func (m *_ModbusPDUReadExceptionStatusRequest) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_ModbusPDUReadExceptionStatusRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -127,7 +130,8 @@ func ModbusPDUReadExceptionStatusRequestParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_ModbusPDUReadExceptionStatusRequest{ - _ModbusPDU: &_ModbusPDU{}, + _ModbusPDU: &_ModbusPDU{ + }, } _child._ModbusPDU._ModbusPDUChildRequirements = _child return _child, nil @@ -157,6 +161,7 @@ func (m *_ModbusPDUReadExceptionStatusRequest) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusPDUReadExceptionStatusRequest) isModbusPDUReadExceptionStatusRequest() bool { return true } @@ -171,3 +176,6 @@ func (m *_ModbusPDUReadExceptionStatusRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadExceptionStatusResponse.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadExceptionStatusResponse.go index d5ad7eccf85..ef59e97bfa6 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadExceptionStatusResponse.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadExceptionStatusResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUReadExceptionStatusResponse is the corresponding interface of ModbusPDUReadExceptionStatusResponse type ModbusPDUReadExceptionStatusResponse interface { @@ -46,37 +48,35 @@ type ModbusPDUReadExceptionStatusResponseExactly interface { // _ModbusPDUReadExceptionStatusResponse is the data-structure of this message type _ModbusPDUReadExceptionStatusResponse struct { *_ModbusPDU - Value uint8 + Value uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusPDUReadExceptionStatusResponse) GetErrorFlag() bool { - return bool(false) -} +func (m *_ModbusPDUReadExceptionStatusResponse) GetErrorFlag() bool { +return bool(false)} -func (m *_ModbusPDUReadExceptionStatusResponse) GetFunctionFlag() uint8 { - return 0x07 -} +func (m *_ModbusPDUReadExceptionStatusResponse) GetFunctionFlag() uint8 { +return 0x07} -func (m *_ModbusPDUReadExceptionStatusResponse) GetResponse() bool { - return bool(true) -} +func (m *_ModbusPDUReadExceptionStatusResponse) GetResponse() bool { +return bool(true)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusPDUReadExceptionStatusResponse) InitializeParent(parent ModbusPDU) {} +func (m *_ModbusPDUReadExceptionStatusResponse) InitializeParent(parent ModbusPDU ) {} -func (m *_ModbusPDUReadExceptionStatusResponse) GetParent() ModbusPDU { +func (m *_ModbusPDUReadExceptionStatusResponse) GetParent() ModbusPDU { return m._ModbusPDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -91,11 +91,12 @@ func (m *_ModbusPDUReadExceptionStatusResponse) GetValue() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusPDUReadExceptionStatusResponse factory function for _ModbusPDUReadExceptionStatusResponse -func NewModbusPDUReadExceptionStatusResponse(value uint8) *_ModbusPDUReadExceptionStatusResponse { +func NewModbusPDUReadExceptionStatusResponse( value uint8 ) *_ModbusPDUReadExceptionStatusResponse { _result := &_ModbusPDUReadExceptionStatusResponse{ - Value: value, - _ModbusPDU: NewModbusPDU(), + Value: value, + _ModbusPDU: NewModbusPDU(), } _result._ModbusPDU._ModbusPDUChildRequirements = _result return _result @@ -103,7 +104,7 @@ func NewModbusPDUReadExceptionStatusResponse(value uint8) *_ModbusPDUReadExcepti // Deprecated: use the interface for direct cast func CastModbusPDUReadExceptionStatusResponse(structType interface{}) ModbusPDUReadExceptionStatusResponse { - if casted, ok := structType.(ModbusPDUReadExceptionStatusResponse); ok { + if casted, ok := structType.(ModbusPDUReadExceptionStatusResponse); ok { return casted } if casted, ok := structType.(*ModbusPDUReadExceptionStatusResponse); ok { @@ -120,11 +121,12 @@ func (m *_ModbusPDUReadExceptionStatusResponse) GetLengthInBits(ctx context.Cont lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (value) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_ModbusPDUReadExceptionStatusResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -143,7 +145,7 @@ func ModbusPDUReadExceptionStatusResponseParseWithBuffer(ctx context.Context, re _ = currentPos // Simple Field (value) - _value, _valueErr := readBuffer.ReadUint8("value", 8) +_value, _valueErr := readBuffer.ReadUint8("value", 8) if _valueErr != nil { return nil, errors.Wrap(_valueErr, "Error parsing 'value' field of ModbusPDUReadExceptionStatusResponse") } @@ -155,8 +157,9 @@ func ModbusPDUReadExceptionStatusResponseParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_ModbusPDUReadExceptionStatusResponse{ - _ModbusPDU: &_ModbusPDU{}, - Value: value, + _ModbusPDU: &_ModbusPDU{ + }, + Value: value, } _child._ModbusPDU._ModbusPDUChildRequirements = _child return _child, nil @@ -178,12 +181,12 @@ func (m *_ModbusPDUReadExceptionStatusResponse) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for ModbusPDUReadExceptionStatusResponse") } - // Simple Field (value) - value := uint8(m.GetValue()) - _valueErr := writeBuffer.WriteUint8("value", 8, (value)) - if _valueErr != nil { - return errors.Wrap(_valueErr, "Error serializing 'value' field") - } + // Simple Field (value) + value := uint8(m.GetValue()) + _valueErr := writeBuffer.WriteUint8("value", 8, (value)) + if _valueErr != nil { + return errors.Wrap(_valueErr, "Error serializing 'value' field") + } if popErr := writeBuffer.PopContext("ModbusPDUReadExceptionStatusResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for ModbusPDUReadExceptionStatusResponse") @@ -193,6 +196,7 @@ func (m *_ModbusPDUReadExceptionStatusResponse) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusPDUReadExceptionStatusResponse) isModbusPDUReadExceptionStatusResponse() bool { return true } @@ -207,3 +211,6 @@ func (m *_ModbusPDUReadExceptionStatusResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadFifoQueueRequest.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadFifoQueueRequest.go index 6a769f9ee3e..fbd4f2b4917 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadFifoQueueRequest.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadFifoQueueRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUReadFifoQueueRequest is the corresponding interface of ModbusPDUReadFifoQueueRequest type ModbusPDUReadFifoQueueRequest interface { @@ -46,37 +48,35 @@ type ModbusPDUReadFifoQueueRequestExactly interface { // _ModbusPDUReadFifoQueueRequest is the data-structure of this message type _ModbusPDUReadFifoQueueRequest struct { *_ModbusPDU - FifoPointerAddress uint16 + FifoPointerAddress uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusPDUReadFifoQueueRequest) GetErrorFlag() bool { - return bool(false) -} +func (m *_ModbusPDUReadFifoQueueRequest) GetErrorFlag() bool { +return bool(false)} -func (m *_ModbusPDUReadFifoQueueRequest) GetFunctionFlag() uint8 { - return 0x18 -} +func (m *_ModbusPDUReadFifoQueueRequest) GetFunctionFlag() uint8 { +return 0x18} -func (m *_ModbusPDUReadFifoQueueRequest) GetResponse() bool { - return bool(false) -} +func (m *_ModbusPDUReadFifoQueueRequest) GetResponse() bool { +return bool(false)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusPDUReadFifoQueueRequest) InitializeParent(parent ModbusPDU) {} +func (m *_ModbusPDUReadFifoQueueRequest) InitializeParent(parent ModbusPDU ) {} -func (m *_ModbusPDUReadFifoQueueRequest) GetParent() ModbusPDU { +func (m *_ModbusPDUReadFifoQueueRequest) GetParent() ModbusPDU { return m._ModbusPDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -91,11 +91,12 @@ func (m *_ModbusPDUReadFifoQueueRequest) GetFifoPointerAddress() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusPDUReadFifoQueueRequest factory function for _ModbusPDUReadFifoQueueRequest -func NewModbusPDUReadFifoQueueRequest(fifoPointerAddress uint16) *_ModbusPDUReadFifoQueueRequest { +func NewModbusPDUReadFifoQueueRequest( fifoPointerAddress uint16 ) *_ModbusPDUReadFifoQueueRequest { _result := &_ModbusPDUReadFifoQueueRequest{ FifoPointerAddress: fifoPointerAddress, - _ModbusPDU: NewModbusPDU(), + _ModbusPDU: NewModbusPDU(), } _result._ModbusPDU._ModbusPDUChildRequirements = _result return _result @@ -103,7 +104,7 @@ func NewModbusPDUReadFifoQueueRequest(fifoPointerAddress uint16) *_ModbusPDURead // Deprecated: use the interface for direct cast func CastModbusPDUReadFifoQueueRequest(structType interface{}) ModbusPDUReadFifoQueueRequest { - if casted, ok := structType.(ModbusPDUReadFifoQueueRequest); ok { + if casted, ok := structType.(ModbusPDUReadFifoQueueRequest); ok { return casted } if casted, ok := structType.(*ModbusPDUReadFifoQueueRequest); ok { @@ -120,11 +121,12 @@ func (m *_ModbusPDUReadFifoQueueRequest) GetLengthInBits(ctx context.Context) ui lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (fifoPointerAddress) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_ModbusPDUReadFifoQueueRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -143,7 +145,7 @@ func ModbusPDUReadFifoQueueRequestParseWithBuffer(ctx context.Context, readBuffe _ = currentPos // Simple Field (fifoPointerAddress) - _fifoPointerAddress, _fifoPointerAddressErr := readBuffer.ReadUint16("fifoPointerAddress", 16) +_fifoPointerAddress, _fifoPointerAddressErr := readBuffer.ReadUint16("fifoPointerAddress", 16) if _fifoPointerAddressErr != nil { return nil, errors.Wrap(_fifoPointerAddressErr, "Error parsing 'fifoPointerAddress' field of ModbusPDUReadFifoQueueRequest") } @@ -155,7 +157,8 @@ func ModbusPDUReadFifoQueueRequestParseWithBuffer(ctx context.Context, readBuffe // Create a partially initialized instance _child := &_ModbusPDUReadFifoQueueRequest{ - _ModbusPDU: &_ModbusPDU{}, + _ModbusPDU: &_ModbusPDU{ + }, FifoPointerAddress: fifoPointerAddress, } _child._ModbusPDU._ModbusPDUChildRequirements = _child @@ -178,12 +181,12 @@ func (m *_ModbusPDUReadFifoQueueRequest) SerializeWithWriteBuffer(ctx context.Co return errors.Wrap(pushErr, "Error pushing for ModbusPDUReadFifoQueueRequest") } - // Simple Field (fifoPointerAddress) - fifoPointerAddress := uint16(m.GetFifoPointerAddress()) - _fifoPointerAddressErr := writeBuffer.WriteUint16("fifoPointerAddress", 16, (fifoPointerAddress)) - if _fifoPointerAddressErr != nil { - return errors.Wrap(_fifoPointerAddressErr, "Error serializing 'fifoPointerAddress' field") - } + // Simple Field (fifoPointerAddress) + fifoPointerAddress := uint16(m.GetFifoPointerAddress()) + _fifoPointerAddressErr := writeBuffer.WriteUint16("fifoPointerAddress", 16, (fifoPointerAddress)) + if _fifoPointerAddressErr != nil { + return errors.Wrap(_fifoPointerAddressErr, "Error serializing 'fifoPointerAddress' field") + } if popErr := writeBuffer.PopContext("ModbusPDUReadFifoQueueRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for ModbusPDUReadFifoQueueRequest") @@ -193,6 +196,7 @@ func (m *_ModbusPDUReadFifoQueueRequest) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusPDUReadFifoQueueRequest) isModbusPDUReadFifoQueueRequest() bool { return true } @@ -207,3 +211,6 @@ func (m *_ModbusPDUReadFifoQueueRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadFifoQueueResponse.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadFifoQueueResponse.go index 1abc89c86f2..a2e5893c182 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadFifoQueueResponse.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadFifoQueueResponse.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUReadFifoQueueResponse is the corresponding interface of ModbusPDUReadFifoQueueResponse type ModbusPDUReadFifoQueueResponse interface { @@ -47,37 +49,35 @@ type ModbusPDUReadFifoQueueResponseExactly interface { // _ModbusPDUReadFifoQueueResponse is the data-structure of this message type _ModbusPDUReadFifoQueueResponse struct { *_ModbusPDU - FifoValue []uint16 + FifoValue []uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusPDUReadFifoQueueResponse) GetErrorFlag() bool { - return bool(false) -} +func (m *_ModbusPDUReadFifoQueueResponse) GetErrorFlag() bool { +return bool(false)} -func (m *_ModbusPDUReadFifoQueueResponse) GetFunctionFlag() uint8 { - return 0x18 -} +func (m *_ModbusPDUReadFifoQueueResponse) GetFunctionFlag() uint8 { +return 0x18} -func (m *_ModbusPDUReadFifoQueueResponse) GetResponse() bool { - return bool(true) -} +func (m *_ModbusPDUReadFifoQueueResponse) GetResponse() bool { +return bool(true)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusPDUReadFifoQueueResponse) InitializeParent(parent ModbusPDU) {} +func (m *_ModbusPDUReadFifoQueueResponse) InitializeParent(parent ModbusPDU ) {} -func (m *_ModbusPDUReadFifoQueueResponse) GetParent() ModbusPDU { +func (m *_ModbusPDUReadFifoQueueResponse) GetParent() ModbusPDU { return m._ModbusPDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_ModbusPDUReadFifoQueueResponse) GetFifoValue() []uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusPDUReadFifoQueueResponse factory function for _ModbusPDUReadFifoQueueResponse -func NewModbusPDUReadFifoQueueResponse(fifoValue []uint16) *_ModbusPDUReadFifoQueueResponse { +func NewModbusPDUReadFifoQueueResponse( fifoValue []uint16 ) *_ModbusPDUReadFifoQueueResponse { _result := &_ModbusPDUReadFifoQueueResponse{ - FifoValue: fifoValue, - _ModbusPDU: NewModbusPDU(), + FifoValue: fifoValue, + _ModbusPDU: NewModbusPDU(), } _result._ModbusPDU._ModbusPDUChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewModbusPDUReadFifoQueueResponse(fifoValue []uint16) *_ModbusPDUReadFifoQu // Deprecated: use the interface for direct cast func CastModbusPDUReadFifoQueueResponse(structType interface{}) ModbusPDUReadFifoQueueResponse { - if casted, ok := structType.(ModbusPDUReadFifoQueueResponse); ok { + if casted, ok := structType.(ModbusPDUReadFifoQueueResponse); ok { return casted } if casted, ok := structType.(*ModbusPDUReadFifoQueueResponse); ok { @@ -134,6 +135,7 @@ func (m *_ModbusPDUReadFifoQueueResponse) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_ModbusPDUReadFifoQueueResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -181,7 +183,7 @@ func ModbusPDUReadFifoQueueResponseParseWithBuffer(ctx context.Context, readBuff arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := readBuffer.ReadUint16("", 16) +_item, _err := readBuffer.ReadUint16("", 16) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'fifoValue' field of ModbusPDUReadFifoQueueResponse") } @@ -198,8 +200,9 @@ func ModbusPDUReadFifoQueueResponseParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_ModbusPDUReadFifoQueueResponse{ - _ModbusPDU: &_ModbusPDU{}, - FifoValue: fifoValue, + _ModbusPDU: &_ModbusPDU{ + }, + FifoValue: fifoValue, } _child._ModbusPDU._ModbusPDUChildRequirements = _child return _child, nil @@ -221,34 +224,34 @@ func (m *_ModbusPDUReadFifoQueueResponse) SerializeWithWriteBuffer(ctx context.C return errors.Wrap(pushErr, "Error pushing for ModbusPDUReadFifoQueueResponse") } - // Implicit Field (byteCount) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - byteCount := uint16(uint16((uint16(uint16(len(m.GetFifoValue()))) * uint16(uint16(2)))) + uint16(uint16(2))) - _byteCountErr := writeBuffer.WriteUint16("byteCount", 16, (byteCount)) - if _byteCountErr != nil { - return errors.Wrap(_byteCountErr, "Error serializing 'byteCount' field") - } + // Implicit Field (byteCount) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) + byteCount := uint16(uint16((uint16(uint16(len(m.GetFifoValue()))) * uint16(uint16(2)))) + uint16(uint16(2))) + _byteCountErr := writeBuffer.WriteUint16("byteCount", 16, (byteCount)) + if _byteCountErr != nil { + return errors.Wrap(_byteCountErr, "Error serializing 'byteCount' field") + } - // Implicit Field (fifoCount) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - fifoCount := uint16(uint16((uint16(uint16(len(m.GetFifoValue()))) * uint16(uint16(2)))) / uint16(uint16(2))) - _fifoCountErr := writeBuffer.WriteUint16("fifoCount", 16, (fifoCount)) - if _fifoCountErr != nil { - return errors.Wrap(_fifoCountErr, "Error serializing 'fifoCount' field") - } + // Implicit Field (fifoCount) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) + fifoCount := uint16(uint16((uint16(uint16(len(m.GetFifoValue()))) * uint16(uint16(2)))) / uint16(uint16(2))) + _fifoCountErr := writeBuffer.WriteUint16("fifoCount", 16, (fifoCount)) + if _fifoCountErr != nil { + return errors.Wrap(_fifoCountErr, "Error serializing 'fifoCount' field") + } - // Array Field (fifoValue) - if pushErr := writeBuffer.PushContext("fifoValue", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for fifoValue") - } - for _curItem, _element := range m.GetFifoValue() { - _ = _curItem - _elementErr := writeBuffer.WriteUint16("", 16, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'fifoValue' field") - } - } - if popErr := writeBuffer.PopContext("fifoValue", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for fifoValue") + // Array Field (fifoValue) + if pushErr := writeBuffer.PushContext("fifoValue", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for fifoValue") + } + for _curItem, _element := range m.GetFifoValue() { + _ = _curItem + _elementErr := writeBuffer.WriteUint16("", 16, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'fifoValue' field") } + } + if popErr := writeBuffer.PopContext("fifoValue", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for fifoValue") + } if popErr := writeBuffer.PopContext("ModbusPDUReadFifoQueueResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for ModbusPDUReadFifoQueueResponse") @@ -258,6 +261,7 @@ func (m *_ModbusPDUReadFifoQueueResponse) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusPDUReadFifoQueueResponse) isModbusPDUReadFifoQueueResponse() bool { return true } @@ -272,3 +276,6 @@ func (m *_ModbusPDUReadFifoQueueResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadFileRecordRequest.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadFileRecordRequest.go index 25d9a5e844f..09d171772ea 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadFileRecordRequest.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadFileRecordRequest.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUReadFileRecordRequest is the corresponding interface of ModbusPDUReadFileRecordRequest type ModbusPDUReadFileRecordRequest interface { @@ -47,37 +49,35 @@ type ModbusPDUReadFileRecordRequestExactly interface { // _ModbusPDUReadFileRecordRequest is the data-structure of this message type _ModbusPDUReadFileRecordRequest struct { *_ModbusPDU - Items []ModbusPDUReadFileRecordRequestItem + Items []ModbusPDUReadFileRecordRequestItem } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusPDUReadFileRecordRequest) GetErrorFlag() bool { - return bool(false) -} +func (m *_ModbusPDUReadFileRecordRequest) GetErrorFlag() bool { +return bool(false)} -func (m *_ModbusPDUReadFileRecordRequest) GetFunctionFlag() uint8 { - return 0x14 -} +func (m *_ModbusPDUReadFileRecordRequest) GetFunctionFlag() uint8 { +return 0x14} -func (m *_ModbusPDUReadFileRecordRequest) GetResponse() bool { - return bool(false) -} +func (m *_ModbusPDUReadFileRecordRequest) GetResponse() bool { +return bool(false)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusPDUReadFileRecordRequest) InitializeParent(parent ModbusPDU) {} +func (m *_ModbusPDUReadFileRecordRequest) InitializeParent(parent ModbusPDU ) {} -func (m *_ModbusPDUReadFileRecordRequest) GetParent() ModbusPDU { +func (m *_ModbusPDUReadFileRecordRequest) GetParent() ModbusPDU { return m._ModbusPDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_ModbusPDUReadFileRecordRequest) GetItems() []ModbusPDUReadFileRecordRe /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusPDUReadFileRecordRequest factory function for _ModbusPDUReadFileRecordRequest -func NewModbusPDUReadFileRecordRequest(items []ModbusPDUReadFileRecordRequestItem) *_ModbusPDUReadFileRecordRequest { +func NewModbusPDUReadFileRecordRequest( items []ModbusPDUReadFileRecordRequestItem ) *_ModbusPDUReadFileRecordRequest { _result := &_ModbusPDUReadFileRecordRequest{ - Items: items, - _ModbusPDU: NewModbusPDU(), + Items: items, + _ModbusPDU: NewModbusPDU(), } _result._ModbusPDU._ModbusPDUChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewModbusPDUReadFileRecordRequest(items []ModbusPDUReadFileRecordRequestIte // Deprecated: use the interface for direct cast func CastModbusPDUReadFileRecordRequest(structType interface{}) ModbusPDUReadFileRecordRequest { - if casted, ok := structType.(ModbusPDUReadFileRecordRequest); ok { + if casted, ok := structType.(ModbusPDUReadFileRecordRequest); ok { return casted } if casted, ok := structType.(*ModbusPDUReadFileRecordRequest); ok { @@ -133,6 +134,7 @@ func (m *_ModbusPDUReadFileRecordRequest) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_ModbusPDUReadFileRecordRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -166,8 +168,8 @@ func ModbusPDUReadFileRecordRequestParseWithBuffer(ctx context.Context, readBuff { _itemsLength := byteCount _itemsEndPos := positionAware.GetPos() + uint16(_itemsLength) - for positionAware.GetPos() < _itemsEndPos { - _item, _err := ModbusPDUReadFileRecordRequestItemParseWithBuffer(ctx, readBuffer) + for ;positionAware.GetPos() < _itemsEndPos; { +_item, _err := ModbusPDUReadFileRecordRequestItemParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'items' field of ModbusPDUReadFileRecordRequest") } @@ -184,8 +186,9 @@ func ModbusPDUReadFileRecordRequestParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_ModbusPDUReadFileRecordRequest{ - _ModbusPDU: &_ModbusPDU{}, - Items: items, + _ModbusPDU: &_ModbusPDU{ + }, + Items: items, } _child._ModbusPDU._ModbusPDUChildRequirements = _child return _child, nil @@ -214,29 +217,29 @@ func (m *_ModbusPDUReadFileRecordRequest) SerializeWithWriteBuffer(ctx context.C return errors.Wrap(pushErr, "Error pushing for ModbusPDUReadFileRecordRequest") } - // Implicit Field (byteCount) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - byteCount := uint8(uint8(itemsArraySizeInBytes(m.GetItems()))) - _byteCountErr := writeBuffer.WriteUint8("byteCount", 8, (byteCount)) - if _byteCountErr != nil { - return errors.Wrap(_byteCountErr, "Error serializing 'byteCount' field") - } + // Implicit Field (byteCount) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) + byteCount := uint8(uint8(itemsArraySizeInBytes(m.GetItems()))) + _byteCountErr := writeBuffer.WriteUint8("byteCount", 8, (byteCount)) + if _byteCountErr != nil { + return errors.Wrap(_byteCountErr, "Error serializing 'byteCount' field") + } - // Array Field (items) - if pushErr := writeBuffer.PushContext("items", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for items") - } - for _curItem, _element := range m.GetItems() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetItems()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'items' field") - } - } - if popErr := writeBuffer.PopContext("items", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for items") + // Array Field (items) + if pushErr := writeBuffer.PushContext("items", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for items") + } + for _curItem, _element := range m.GetItems() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetItems()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'items' field") } + } + if popErr := writeBuffer.PopContext("items", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for items") + } if popErr := writeBuffer.PopContext("ModbusPDUReadFileRecordRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for ModbusPDUReadFileRecordRequest") @@ -246,6 +249,7 @@ func (m *_ModbusPDUReadFileRecordRequest) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusPDUReadFileRecordRequest) isModbusPDUReadFileRecordRequest() bool { return true } @@ -260,3 +264,6 @@ func (m *_ModbusPDUReadFileRecordRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadFileRecordRequestItem.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadFileRecordRequestItem.go index 0175613cacf..055f6ff3255 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadFileRecordRequestItem.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadFileRecordRequestItem.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUReadFileRecordRequestItem is the corresponding interface of ModbusPDUReadFileRecordRequestItem type ModbusPDUReadFileRecordRequestItem interface { @@ -50,12 +52,13 @@ type ModbusPDUReadFileRecordRequestItemExactly interface { // _ModbusPDUReadFileRecordRequestItem is the data-structure of this message type _ModbusPDUReadFileRecordRequestItem struct { - ReferenceType uint8 - FileNumber uint16 - RecordNumber uint16 - RecordLength uint16 + ReferenceType uint8 + FileNumber uint16 + RecordNumber uint16 + RecordLength uint16 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -82,14 +85,15 @@ func (m *_ModbusPDUReadFileRecordRequestItem) GetRecordLength() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusPDUReadFileRecordRequestItem factory function for _ModbusPDUReadFileRecordRequestItem -func NewModbusPDUReadFileRecordRequestItem(referenceType uint8, fileNumber uint16, recordNumber uint16, recordLength uint16) *_ModbusPDUReadFileRecordRequestItem { - return &_ModbusPDUReadFileRecordRequestItem{ReferenceType: referenceType, FileNumber: fileNumber, RecordNumber: recordNumber, RecordLength: recordLength} +func NewModbusPDUReadFileRecordRequestItem( referenceType uint8 , fileNumber uint16 , recordNumber uint16 , recordLength uint16 ) *_ModbusPDUReadFileRecordRequestItem { +return &_ModbusPDUReadFileRecordRequestItem{ ReferenceType: referenceType , FileNumber: fileNumber , RecordNumber: recordNumber , RecordLength: recordLength } } // Deprecated: use the interface for direct cast func CastModbusPDUReadFileRecordRequestItem(structType interface{}) ModbusPDUReadFileRecordRequestItem { - if casted, ok := structType.(ModbusPDUReadFileRecordRequestItem); ok { + if casted, ok := structType.(ModbusPDUReadFileRecordRequestItem); ok { return casted } if casted, ok := structType.(*ModbusPDUReadFileRecordRequestItem); ok { @@ -106,20 +110,21 @@ func (m *_ModbusPDUReadFileRecordRequestItem) GetLengthInBits(ctx context.Contex lengthInBits := uint16(0) // Simple field (referenceType) - lengthInBits += 8 + lengthInBits += 8; // Simple field (fileNumber) - lengthInBits += 16 + lengthInBits += 16; // Simple field (recordNumber) - lengthInBits += 16 + lengthInBits += 16; // Simple field (recordLength) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_ModbusPDUReadFileRecordRequestItem) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,28 +143,28 @@ func ModbusPDUReadFileRecordRequestItemParseWithBuffer(ctx context.Context, read _ = currentPos // Simple Field (referenceType) - _referenceType, _referenceTypeErr := readBuffer.ReadUint8("referenceType", 8) +_referenceType, _referenceTypeErr := readBuffer.ReadUint8("referenceType", 8) if _referenceTypeErr != nil { return nil, errors.Wrap(_referenceTypeErr, "Error parsing 'referenceType' field of ModbusPDUReadFileRecordRequestItem") } referenceType := _referenceType // Simple Field (fileNumber) - _fileNumber, _fileNumberErr := readBuffer.ReadUint16("fileNumber", 16) +_fileNumber, _fileNumberErr := readBuffer.ReadUint16("fileNumber", 16) if _fileNumberErr != nil { return nil, errors.Wrap(_fileNumberErr, "Error parsing 'fileNumber' field of ModbusPDUReadFileRecordRequestItem") } fileNumber := _fileNumber // Simple Field (recordNumber) - _recordNumber, _recordNumberErr := readBuffer.ReadUint16("recordNumber", 16) +_recordNumber, _recordNumberErr := readBuffer.ReadUint16("recordNumber", 16) if _recordNumberErr != nil { return nil, errors.Wrap(_recordNumberErr, "Error parsing 'recordNumber' field of ModbusPDUReadFileRecordRequestItem") } recordNumber := _recordNumber // Simple Field (recordLength) - _recordLength, _recordLengthErr := readBuffer.ReadUint16("recordLength", 16) +_recordLength, _recordLengthErr := readBuffer.ReadUint16("recordLength", 16) if _recordLengthErr != nil { return nil, errors.Wrap(_recordLengthErr, "Error parsing 'recordLength' field of ModbusPDUReadFileRecordRequestItem") } @@ -171,11 +176,11 @@ func ModbusPDUReadFileRecordRequestItemParseWithBuffer(ctx context.Context, read // Create the instance return &_ModbusPDUReadFileRecordRequestItem{ - ReferenceType: referenceType, - FileNumber: fileNumber, - RecordNumber: recordNumber, - RecordLength: recordLength, - }, nil + ReferenceType: referenceType, + FileNumber: fileNumber, + RecordNumber: recordNumber, + RecordLength: recordLength, + }, nil } func (m *_ModbusPDUReadFileRecordRequestItem) Serialize() ([]byte, error) { @@ -189,7 +194,7 @@ func (m *_ModbusPDUReadFileRecordRequestItem) Serialize() ([]byte, error) { func (m *_ModbusPDUReadFileRecordRequestItem) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("ModbusPDUReadFileRecordRequestItem"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("ModbusPDUReadFileRecordRequestItem"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for ModbusPDUReadFileRecordRequestItem") } @@ -227,6 +232,7 @@ func (m *_ModbusPDUReadFileRecordRequestItem) SerializeWithWriteBuffer(ctx conte return nil } + func (m *_ModbusPDUReadFileRecordRequestItem) isModbusPDUReadFileRecordRequestItem() bool { return true } @@ -241,3 +247,6 @@ func (m *_ModbusPDUReadFileRecordRequestItem) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadFileRecordResponse.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadFileRecordResponse.go index 900dbc7a182..16c24eb9c80 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadFileRecordResponse.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadFileRecordResponse.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUReadFileRecordResponse is the corresponding interface of ModbusPDUReadFileRecordResponse type ModbusPDUReadFileRecordResponse interface { @@ -47,37 +49,35 @@ type ModbusPDUReadFileRecordResponseExactly interface { // _ModbusPDUReadFileRecordResponse is the data-structure of this message type _ModbusPDUReadFileRecordResponse struct { *_ModbusPDU - Items []ModbusPDUReadFileRecordResponseItem + Items []ModbusPDUReadFileRecordResponseItem } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusPDUReadFileRecordResponse) GetErrorFlag() bool { - return bool(false) -} +func (m *_ModbusPDUReadFileRecordResponse) GetErrorFlag() bool { +return bool(false)} -func (m *_ModbusPDUReadFileRecordResponse) GetFunctionFlag() uint8 { - return 0x14 -} +func (m *_ModbusPDUReadFileRecordResponse) GetFunctionFlag() uint8 { +return 0x14} -func (m *_ModbusPDUReadFileRecordResponse) GetResponse() bool { - return bool(true) -} +func (m *_ModbusPDUReadFileRecordResponse) GetResponse() bool { +return bool(true)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusPDUReadFileRecordResponse) InitializeParent(parent ModbusPDU) {} +func (m *_ModbusPDUReadFileRecordResponse) InitializeParent(parent ModbusPDU ) {} -func (m *_ModbusPDUReadFileRecordResponse) GetParent() ModbusPDU { +func (m *_ModbusPDUReadFileRecordResponse) GetParent() ModbusPDU { return m._ModbusPDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_ModbusPDUReadFileRecordResponse) GetItems() []ModbusPDUReadFileRecordR /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusPDUReadFileRecordResponse factory function for _ModbusPDUReadFileRecordResponse -func NewModbusPDUReadFileRecordResponse(items []ModbusPDUReadFileRecordResponseItem) *_ModbusPDUReadFileRecordResponse { +func NewModbusPDUReadFileRecordResponse( items []ModbusPDUReadFileRecordResponseItem ) *_ModbusPDUReadFileRecordResponse { _result := &_ModbusPDUReadFileRecordResponse{ - Items: items, - _ModbusPDU: NewModbusPDU(), + Items: items, + _ModbusPDU: NewModbusPDU(), } _result._ModbusPDU._ModbusPDUChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewModbusPDUReadFileRecordResponse(items []ModbusPDUReadFileRecordResponseI // Deprecated: use the interface for direct cast func CastModbusPDUReadFileRecordResponse(structType interface{}) ModbusPDUReadFileRecordResponse { - if casted, ok := structType.(ModbusPDUReadFileRecordResponse); ok { + if casted, ok := structType.(ModbusPDUReadFileRecordResponse); ok { return casted } if casted, ok := structType.(*ModbusPDUReadFileRecordResponse); ok { @@ -133,6 +134,7 @@ func (m *_ModbusPDUReadFileRecordResponse) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_ModbusPDUReadFileRecordResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -166,8 +168,8 @@ func ModbusPDUReadFileRecordResponseParseWithBuffer(ctx context.Context, readBuf { _itemsLength := byteCount _itemsEndPos := positionAware.GetPos() + uint16(_itemsLength) - for positionAware.GetPos() < _itemsEndPos { - _item, _err := ModbusPDUReadFileRecordResponseItemParseWithBuffer(ctx, readBuffer) + for ;positionAware.GetPos() < _itemsEndPos; { +_item, _err := ModbusPDUReadFileRecordResponseItemParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'items' field of ModbusPDUReadFileRecordResponse") } @@ -184,8 +186,9 @@ func ModbusPDUReadFileRecordResponseParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_ModbusPDUReadFileRecordResponse{ - _ModbusPDU: &_ModbusPDU{}, - Items: items, + _ModbusPDU: &_ModbusPDU{ + }, + Items: items, } _child._ModbusPDU._ModbusPDUChildRequirements = _child return _child, nil @@ -214,29 +217,29 @@ func (m *_ModbusPDUReadFileRecordResponse) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for ModbusPDUReadFileRecordResponse") } - // Implicit Field (byteCount) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - byteCount := uint8(uint8(itemsArraySizeInBytes(m.GetItems()))) - _byteCountErr := writeBuffer.WriteUint8("byteCount", 8, (byteCount)) - if _byteCountErr != nil { - return errors.Wrap(_byteCountErr, "Error serializing 'byteCount' field") - } + // Implicit Field (byteCount) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) + byteCount := uint8(uint8(itemsArraySizeInBytes(m.GetItems()))) + _byteCountErr := writeBuffer.WriteUint8("byteCount", 8, (byteCount)) + if _byteCountErr != nil { + return errors.Wrap(_byteCountErr, "Error serializing 'byteCount' field") + } - // Array Field (items) - if pushErr := writeBuffer.PushContext("items", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for items") - } - for _curItem, _element := range m.GetItems() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetItems()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'items' field") - } - } - if popErr := writeBuffer.PopContext("items", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for items") + // Array Field (items) + if pushErr := writeBuffer.PushContext("items", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for items") + } + for _curItem, _element := range m.GetItems() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetItems()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'items' field") } + } + if popErr := writeBuffer.PopContext("items", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for items") + } if popErr := writeBuffer.PopContext("ModbusPDUReadFileRecordResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for ModbusPDUReadFileRecordResponse") @@ -246,6 +249,7 @@ func (m *_ModbusPDUReadFileRecordResponse) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusPDUReadFileRecordResponse) isModbusPDUReadFileRecordResponse() bool { return true } @@ -260,3 +264,6 @@ func (m *_ModbusPDUReadFileRecordResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadFileRecordResponseItem.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadFileRecordResponseItem.go index 91e1b4261cf..4f913c4d2e1 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadFileRecordResponseItem.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadFileRecordResponseItem.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUReadFileRecordResponseItem is the corresponding interface of ModbusPDUReadFileRecordResponseItem type ModbusPDUReadFileRecordResponseItem interface { @@ -46,10 +48,11 @@ type ModbusPDUReadFileRecordResponseItemExactly interface { // _ModbusPDUReadFileRecordResponseItem is the data-structure of this message type _ModbusPDUReadFileRecordResponseItem struct { - ReferenceType uint8 - Data []byte + ReferenceType uint8 + Data []byte } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -68,14 +71,15 @@ func (m *_ModbusPDUReadFileRecordResponseItem) GetData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusPDUReadFileRecordResponseItem factory function for _ModbusPDUReadFileRecordResponseItem -func NewModbusPDUReadFileRecordResponseItem(referenceType uint8, data []byte) *_ModbusPDUReadFileRecordResponseItem { - return &_ModbusPDUReadFileRecordResponseItem{ReferenceType: referenceType, Data: data} +func NewModbusPDUReadFileRecordResponseItem( referenceType uint8 , data []byte ) *_ModbusPDUReadFileRecordResponseItem { +return &_ModbusPDUReadFileRecordResponseItem{ ReferenceType: referenceType , Data: data } } // Deprecated: use the interface for direct cast func CastModbusPDUReadFileRecordResponseItem(structType interface{}) ModbusPDUReadFileRecordResponseItem { - if casted, ok := structType.(ModbusPDUReadFileRecordResponseItem); ok { + if casted, ok := structType.(ModbusPDUReadFileRecordResponseItem); ok { return casted } if casted, ok := structType.(*ModbusPDUReadFileRecordResponseItem); ok { @@ -95,7 +99,7 @@ func (m *_ModbusPDUReadFileRecordResponseItem) GetLengthInBits(ctx context.Conte lengthInBits += 8 // Simple field (referenceType) - lengthInBits += 8 + lengthInBits += 8; // Array field if len(m.Data) > 0 { @@ -105,6 +109,7 @@ func (m *_ModbusPDUReadFileRecordResponseItem) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_ModbusPDUReadFileRecordResponseItem) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -130,7 +135,7 @@ func ModbusPDUReadFileRecordResponseItemParseWithBuffer(ctx context.Context, rea } // Simple Field (referenceType) - _referenceType, _referenceTypeErr := readBuffer.ReadUint8("referenceType", 8) +_referenceType, _referenceTypeErr := readBuffer.ReadUint8("referenceType", 8) if _referenceTypeErr != nil { return nil, errors.Wrap(_referenceTypeErr, "Error parsing 'referenceType' field of ModbusPDUReadFileRecordResponseItem") } @@ -148,9 +153,9 @@ func ModbusPDUReadFileRecordResponseItemParseWithBuffer(ctx context.Context, rea // Create the instance return &_ModbusPDUReadFileRecordResponseItem{ - ReferenceType: referenceType, - Data: data, - }, nil + ReferenceType: referenceType, + Data: data, + }, nil } func (m *_ModbusPDUReadFileRecordResponseItem) Serialize() ([]byte, error) { @@ -164,7 +169,7 @@ func (m *_ModbusPDUReadFileRecordResponseItem) Serialize() ([]byte, error) { func (m *_ModbusPDUReadFileRecordResponseItem) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("ModbusPDUReadFileRecordResponseItem"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("ModbusPDUReadFileRecordResponseItem"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for ModbusPDUReadFileRecordResponseItem") } @@ -194,6 +199,7 @@ func (m *_ModbusPDUReadFileRecordResponseItem) SerializeWithWriteBuffer(ctx cont return nil } + func (m *_ModbusPDUReadFileRecordResponseItem) isModbusPDUReadFileRecordResponseItem() bool { return true } @@ -208,3 +214,6 @@ func (m *_ModbusPDUReadFileRecordResponseItem) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadHoldingRegistersRequest.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadHoldingRegistersRequest.go index 471d80e09af..35b33605ea4 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadHoldingRegistersRequest.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadHoldingRegistersRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUReadHoldingRegistersRequest is the corresponding interface of ModbusPDUReadHoldingRegistersRequest type ModbusPDUReadHoldingRegistersRequest interface { @@ -48,38 +50,36 @@ type ModbusPDUReadHoldingRegistersRequestExactly interface { // _ModbusPDUReadHoldingRegistersRequest is the data-structure of this message type _ModbusPDUReadHoldingRegistersRequest struct { *_ModbusPDU - StartingAddress uint16 - Quantity uint16 + StartingAddress uint16 + Quantity uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusPDUReadHoldingRegistersRequest) GetErrorFlag() bool { - return bool(false) -} +func (m *_ModbusPDUReadHoldingRegistersRequest) GetErrorFlag() bool { +return bool(false)} -func (m *_ModbusPDUReadHoldingRegistersRequest) GetFunctionFlag() uint8 { - return 0x03 -} +func (m *_ModbusPDUReadHoldingRegistersRequest) GetFunctionFlag() uint8 { +return 0x03} -func (m *_ModbusPDUReadHoldingRegistersRequest) GetResponse() bool { - return bool(false) -} +func (m *_ModbusPDUReadHoldingRegistersRequest) GetResponse() bool { +return bool(false)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusPDUReadHoldingRegistersRequest) InitializeParent(parent ModbusPDU) {} +func (m *_ModbusPDUReadHoldingRegistersRequest) InitializeParent(parent ModbusPDU ) {} -func (m *_ModbusPDUReadHoldingRegistersRequest) GetParent() ModbusPDU { +func (m *_ModbusPDUReadHoldingRegistersRequest) GetParent() ModbusPDU { return m._ModbusPDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,12 +98,13 @@ func (m *_ModbusPDUReadHoldingRegistersRequest) GetQuantity() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusPDUReadHoldingRegistersRequest factory function for _ModbusPDUReadHoldingRegistersRequest -func NewModbusPDUReadHoldingRegistersRequest(startingAddress uint16, quantity uint16) *_ModbusPDUReadHoldingRegistersRequest { +func NewModbusPDUReadHoldingRegistersRequest( startingAddress uint16 , quantity uint16 ) *_ModbusPDUReadHoldingRegistersRequest { _result := &_ModbusPDUReadHoldingRegistersRequest{ StartingAddress: startingAddress, - Quantity: quantity, - _ModbusPDU: NewModbusPDU(), + Quantity: quantity, + _ModbusPDU: NewModbusPDU(), } _result._ModbusPDU._ModbusPDUChildRequirements = _result return _result @@ -111,7 +112,7 @@ func NewModbusPDUReadHoldingRegistersRequest(startingAddress uint16, quantity ui // Deprecated: use the interface for direct cast func CastModbusPDUReadHoldingRegistersRequest(structType interface{}) ModbusPDUReadHoldingRegistersRequest { - if casted, ok := structType.(ModbusPDUReadHoldingRegistersRequest); ok { + if casted, ok := structType.(ModbusPDUReadHoldingRegistersRequest); ok { return casted } if casted, ok := structType.(*ModbusPDUReadHoldingRegistersRequest); ok { @@ -128,14 +129,15 @@ func (m *_ModbusPDUReadHoldingRegistersRequest) GetLengthInBits(ctx context.Cont lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (startingAddress) - lengthInBits += 16 + lengthInBits += 16; // Simple field (quantity) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_ModbusPDUReadHoldingRegistersRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,14 +156,14 @@ func ModbusPDUReadHoldingRegistersRequestParseWithBuffer(ctx context.Context, re _ = currentPos // Simple Field (startingAddress) - _startingAddress, _startingAddressErr := readBuffer.ReadUint16("startingAddress", 16) +_startingAddress, _startingAddressErr := readBuffer.ReadUint16("startingAddress", 16) if _startingAddressErr != nil { return nil, errors.Wrap(_startingAddressErr, "Error parsing 'startingAddress' field of ModbusPDUReadHoldingRegistersRequest") } startingAddress := _startingAddress // Simple Field (quantity) - _quantity, _quantityErr := readBuffer.ReadUint16("quantity", 16) +_quantity, _quantityErr := readBuffer.ReadUint16("quantity", 16) if _quantityErr != nil { return nil, errors.Wrap(_quantityErr, "Error parsing 'quantity' field of ModbusPDUReadHoldingRegistersRequest") } @@ -173,9 +175,10 @@ func ModbusPDUReadHoldingRegistersRequestParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_ModbusPDUReadHoldingRegistersRequest{ - _ModbusPDU: &_ModbusPDU{}, + _ModbusPDU: &_ModbusPDU{ + }, StartingAddress: startingAddress, - Quantity: quantity, + Quantity: quantity, } _child._ModbusPDU._ModbusPDUChildRequirements = _child return _child, nil @@ -197,19 +200,19 @@ func (m *_ModbusPDUReadHoldingRegistersRequest) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for ModbusPDUReadHoldingRegistersRequest") } - // Simple Field (startingAddress) - startingAddress := uint16(m.GetStartingAddress()) - _startingAddressErr := writeBuffer.WriteUint16("startingAddress", 16, (startingAddress)) - if _startingAddressErr != nil { - return errors.Wrap(_startingAddressErr, "Error serializing 'startingAddress' field") - } + // Simple Field (startingAddress) + startingAddress := uint16(m.GetStartingAddress()) + _startingAddressErr := writeBuffer.WriteUint16("startingAddress", 16, (startingAddress)) + if _startingAddressErr != nil { + return errors.Wrap(_startingAddressErr, "Error serializing 'startingAddress' field") + } - // Simple Field (quantity) - quantity := uint16(m.GetQuantity()) - _quantityErr := writeBuffer.WriteUint16("quantity", 16, (quantity)) - if _quantityErr != nil { - return errors.Wrap(_quantityErr, "Error serializing 'quantity' field") - } + // Simple Field (quantity) + quantity := uint16(m.GetQuantity()) + _quantityErr := writeBuffer.WriteUint16("quantity", 16, (quantity)) + if _quantityErr != nil { + return errors.Wrap(_quantityErr, "Error serializing 'quantity' field") + } if popErr := writeBuffer.PopContext("ModbusPDUReadHoldingRegistersRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for ModbusPDUReadHoldingRegistersRequest") @@ -219,6 +222,7 @@ func (m *_ModbusPDUReadHoldingRegistersRequest) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusPDUReadHoldingRegistersRequest) isModbusPDUReadHoldingRegistersRequest() bool { return true } @@ -233,3 +237,6 @@ func (m *_ModbusPDUReadHoldingRegistersRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadHoldingRegistersResponse.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadHoldingRegistersResponse.go index 62278a2738f..c8cc655cf05 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadHoldingRegistersResponse.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadHoldingRegistersResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUReadHoldingRegistersResponse is the corresponding interface of ModbusPDUReadHoldingRegistersResponse type ModbusPDUReadHoldingRegistersResponse interface { @@ -46,37 +48,35 @@ type ModbusPDUReadHoldingRegistersResponseExactly interface { // _ModbusPDUReadHoldingRegistersResponse is the data-structure of this message type _ModbusPDUReadHoldingRegistersResponse struct { *_ModbusPDU - Value []byte + Value []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusPDUReadHoldingRegistersResponse) GetErrorFlag() bool { - return bool(false) -} +func (m *_ModbusPDUReadHoldingRegistersResponse) GetErrorFlag() bool { +return bool(false)} -func (m *_ModbusPDUReadHoldingRegistersResponse) GetFunctionFlag() uint8 { - return 0x03 -} +func (m *_ModbusPDUReadHoldingRegistersResponse) GetFunctionFlag() uint8 { +return 0x03} -func (m *_ModbusPDUReadHoldingRegistersResponse) GetResponse() bool { - return bool(true) -} +func (m *_ModbusPDUReadHoldingRegistersResponse) GetResponse() bool { +return bool(true)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusPDUReadHoldingRegistersResponse) InitializeParent(parent ModbusPDU) {} +func (m *_ModbusPDUReadHoldingRegistersResponse) InitializeParent(parent ModbusPDU ) {} -func (m *_ModbusPDUReadHoldingRegistersResponse) GetParent() ModbusPDU { +func (m *_ModbusPDUReadHoldingRegistersResponse) GetParent() ModbusPDU { return m._ModbusPDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -91,11 +91,12 @@ func (m *_ModbusPDUReadHoldingRegistersResponse) GetValue() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusPDUReadHoldingRegistersResponse factory function for _ModbusPDUReadHoldingRegistersResponse -func NewModbusPDUReadHoldingRegistersResponse(value []byte) *_ModbusPDUReadHoldingRegistersResponse { +func NewModbusPDUReadHoldingRegistersResponse( value []byte ) *_ModbusPDUReadHoldingRegistersResponse { _result := &_ModbusPDUReadHoldingRegistersResponse{ - Value: value, - _ModbusPDU: NewModbusPDU(), + Value: value, + _ModbusPDU: NewModbusPDU(), } _result._ModbusPDU._ModbusPDUChildRequirements = _result return _result @@ -103,7 +104,7 @@ func NewModbusPDUReadHoldingRegistersResponse(value []byte) *_ModbusPDUReadHoldi // Deprecated: use the interface for direct cast func CastModbusPDUReadHoldingRegistersResponse(structType interface{}) ModbusPDUReadHoldingRegistersResponse { - if casted, ok := structType.(ModbusPDUReadHoldingRegistersResponse); ok { + if casted, ok := structType.(ModbusPDUReadHoldingRegistersResponse); ok { return casted } if casted, ok := structType.(*ModbusPDUReadHoldingRegistersResponse); ok { @@ -130,6 +131,7 @@ func (m *_ModbusPDUReadHoldingRegistersResponse) GetLengthInBits(ctx context.Con return lengthInBits } + func (m *_ModbusPDUReadHoldingRegistersResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -166,8 +168,9 @@ func ModbusPDUReadHoldingRegistersResponseParseWithBuffer(ctx context.Context, r // Create a partially initialized instance _child := &_ModbusPDUReadHoldingRegistersResponse{ - _ModbusPDU: &_ModbusPDU{}, - Value: value, + _ModbusPDU: &_ModbusPDU{ + }, + Value: value, } _child._ModbusPDU._ModbusPDUChildRequirements = _child return _child, nil @@ -189,18 +192,18 @@ func (m *_ModbusPDUReadHoldingRegistersResponse) SerializeWithWriteBuffer(ctx co return errors.Wrap(pushErr, "Error pushing for ModbusPDUReadHoldingRegistersResponse") } - // Implicit Field (byteCount) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - byteCount := uint8(uint8(len(m.GetValue()))) - _byteCountErr := writeBuffer.WriteUint8("byteCount", 8, (byteCount)) - if _byteCountErr != nil { - return errors.Wrap(_byteCountErr, "Error serializing 'byteCount' field") - } + // Implicit Field (byteCount) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) + byteCount := uint8(uint8(len(m.GetValue()))) + _byteCountErr := writeBuffer.WriteUint8("byteCount", 8, (byteCount)) + if _byteCountErr != nil { + return errors.Wrap(_byteCountErr, "Error serializing 'byteCount' field") + } - // Array Field (value) - // Byte Array field (value) - if err := writeBuffer.WriteByteArray("value", m.GetValue()); err != nil { - return errors.Wrap(err, "Error serializing 'value' field") - } + // Array Field (value) + // Byte Array field (value) + if err := writeBuffer.WriteByteArray("value", m.GetValue()); err != nil { + return errors.Wrap(err, "Error serializing 'value' field") + } if popErr := writeBuffer.PopContext("ModbusPDUReadHoldingRegistersResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for ModbusPDUReadHoldingRegistersResponse") @@ -210,6 +213,7 @@ func (m *_ModbusPDUReadHoldingRegistersResponse) SerializeWithWriteBuffer(ctx co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusPDUReadHoldingRegistersResponse) isModbusPDUReadHoldingRegistersResponse() bool { return true } @@ -224,3 +228,6 @@ func (m *_ModbusPDUReadHoldingRegistersResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadInputRegistersRequest.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadInputRegistersRequest.go index aec0bf25ee2..b44346a70aa 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadInputRegistersRequest.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadInputRegistersRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUReadInputRegistersRequest is the corresponding interface of ModbusPDUReadInputRegistersRequest type ModbusPDUReadInputRegistersRequest interface { @@ -48,38 +50,36 @@ type ModbusPDUReadInputRegistersRequestExactly interface { // _ModbusPDUReadInputRegistersRequest is the data-structure of this message type _ModbusPDUReadInputRegistersRequest struct { *_ModbusPDU - StartingAddress uint16 - Quantity uint16 + StartingAddress uint16 + Quantity uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusPDUReadInputRegistersRequest) GetErrorFlag() bool { - return bool(false) -} +func (m *_ModbusPDUReadInputRegistersRequest) GetErrorFlag() bool { +return bool(false)} -func (m *_ModbusPDUReadInputRegistersRequest) GetFunctionFlag() uint8 { - return 0x04 -} +func (m *_ModbusPDUReadInputRegistersRequest) GetFunctionFlag() uint8 { +return 0x04} -func (m *_ModbusPDUReadInputRegistersRequest) GetResponse() bool { - return bool(false) -} +func (m *_ModbusPDUReadInputRegistersRequest) GetResponse() bool { +return bool(false)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusPDUReadInputRegistersRequest) InitializeParent(parent ModbusPDU) {} +func (m *_ModbusPDUReadInputRegistersRequest) InitializeParent(parent ModbusPDU ) {} -func (m *_ModbusPDUReadInputRegistersRequest) GetParent() ModbusPDU { +func (m *_ModbusPDUReadInputRegistersRequest) GetParent() ModbusPDU { return m._ModbusPDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,12 +98,13 @@ func (m *_ModbusPDUReadInputRegistersRequest) GetQuantity() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusPDUReadInputRegistersRequest factory function for _ModbusPDUReadInputRegistersRequest -func NewModbusPDUReadInputRegistersRequest(startingAddress uint16, quantity uint16) *_ModbusPDUReadInputRegistersRequest { +func NewModbusPDUReadInputRegistersRequest( startingAddress uint16 , quantity uint16 ) *_ModbusPDUReadInputRegistersRequest { _result := &_ModbusPDUReadInputRegistersRequest{ StartingAddress: startingAddress, - Quantity: quantity, - _ModbusPDU: NewModbusPDU(), + Quantity: quantity, + _ModbusPDU: NewModbusPDU(), } _result._ModbusPDU._ModbusPDUChildRequirements = _result return _result @@ -111,7 +112,7 @@ func NewModbusPDUReadInputRegistersRequest(startingAddress uint16, quantity uint // Deprecated: use the interface for direct cast func CastModbusPDUReadInputRegistersRequest(structType interface{}) ModbusPDUReadInputRegistersRequest { - if casted, ok := structType.(ModbusPDUReadInputRegistersRequest); ok { + if casted, ok := structType.(ModbusPDUReadInputRegistersRequest); ok { return casted } if casted, ok := structType.(*ModbusPDUReadInputRegistersRequest); ok { @@ -128,14 +129,15 @@ func (m *_ModbusPDUReadInputRegistersRequest) GetLengthInBits(ctx context.Contex lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (startingAddress) - lengthInBits += 16 + lengthInBits += 16; // Simple field (quantity) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_ModbusPDUReadInputRegistersRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,14 +156,14 @@ func ModbusPDUReadInputRegistersRequestParseWithBuffer(ctx context.Context, read _ = currentPos // Simple Field (startingAddress) - _startingAddress, _startingAddressErr := readBuffer.ReadUint16("startingAddress", 16) +_startingAddress, _startingAddressErr := readBuffer.ReadUint16("startingAddress", 16) if _startingAddressErr != nil { return nil, errors.Wrap(_startingAddressErr, "Error parsing 'startingAddress' field of ModbusPDUReadInputRegistersRequest") } startingAddress := _startingAddress // Simple Field (quantity) - _quantity, _quantityErr := readBuffer.ReadUint16("quantity", 16) +_quantity, _quantityErr := readBuffer.ReadUint16("quantity", 16) if _quantityErr != nil { return nil, errors.Wrap(_quantityErr, "Error parsing 'quantity' field of ModbusPDUReadInputRegistersRequest") } @@ -173,9 +175,10 @@ func ModbusPDUReadInputRegistersRequestParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_ModbusPDUReadInputRegistersRequest{ - _ModbusPDU: &_ModbusPDU{}, + _ModbusPDU: &_ModbusPDU{ + }, StartingAddress: startingAddress, - Quantity: quantity, + Quantity: quantity, } _child._ModbusPDU._ModbusPDUChildRequirements = _child return _child, nil @@ -197,19 +200,19 @@ func (m *_ModbusPDUReadInputRegistersRequest) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for ModbusPDUReadInputRegistersRequest") } - // Simple Field (startingAddress) - startingAddress := uint16(m.GetStartingAddress()) - _startingAddressErr := writeBuffer.WriteUint16("startingAddress", 16, (startingAddress)) - if _startingAddressErr != nil { - return errors.Wrap(_startingAddressErr, "Error serializing 'startingAddress' field") - } + // Simple Field (startingAddress) + startingAddress := uint16(m.GetStartingAddress()) + _startingAddressErr := writeBuffer.WriteUint16("startingAddress", 16, (startingAddress)) + if _startingAddressErr != nil { + return errors.Wrap(_startingAddressErr, "Error serializing 'startingAddress' field") + } - // Simple Field (quantity) - quantity := uint16(m.GetQuantity()) - _quantityErr := writeBuffer.WriteUint16("quantity", 16, (quantity)) - if _quantityErr != nil { - return errors.Wrap(_quantityErr, "Error serializing 'quantity' field") - } + // Simple Field (quantity) + quantity := uint16(m.GetQuantity()) + _quantityErr := writeBuffer.WriteUint16("quantity", 16, (quantity)) + if _quantityErr != nil { + return errors.Wrap(_quantityErr, "Error serializing 'quantity' field") + } if popErr := writeBuffer.PopContext("ModbusPDUReadInputRegistersRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for ModbusPDUReadInputRegistersRequest") @@ -219,6 +222,7 @@ func (m *_ModbusPDUReadInputRegistersRequest) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusPDUReadInputRegistersRequest) isModbusPDUReadInputRegistersRequest() bool { return true } @@ -233,3 +237,6 @@ func (m *_ModbusPDUReadInputRegistersRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadInputRegistersResponse.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadInputRegistersResponse.go index a44ca56633b..c837ea98af1 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadInputRegistersResponse.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadInputRegistersResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUReadInputRegistersResponse is the corresponding interface of ModbusPDUReadInputRegistersResponse type ModbusPDUReadInputRegistersResponse interface { @@ -46,37 +48,35 @@ type ModbusPDUReadInputRegistersResponseExactly interface { // _ModbusPDUReadInputRegistersResponse is the data-structure of this message type _ModbusPDUReadInputRegistersResponse struct { *_ModbusPDU - Value []byte + Value []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusPDUReadInputRegistersResponse) GetErrorFlag() bool { - return bool(false) -} +func (m *_ModbusPDUReadInputRegistersResponse) GetErrorFlag() bool { +return bool(false)} -func (m *_ModbusPDUReadInputRegistersResponse) GetFunctionFlag() uint8 { - return 0x04 -} +func (m *_ModbusPDUReadInputRegistersResponse) GetFunctionFlag() uint8 { +return 0x04} -func (m *_ModbusPDUReadInputRegistersResponse) GetResponse() bool { - return bool(true) -} +func (m *_ModbusPDUReadInputRegistersResponse) GetResponse() bool { +return bool(true)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusPDUReadInputRegistersResponse) InitializeParent(parent ModbusPDU) {} +func (m *_ModbusPDUReadInputRegistersResponse) InitializeParent(parent ModbusPDU ) {} -func (m *_ModbusPDUReadInputRegistersResponse) GetParent() ModbusPDU { +func (m *_ModbusPDUReadInputRegistersResponse) GetParent() ModbusPDU { return m._ModbusPDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -91,11 +91,12 @@ func (m *_ModbusPDUReadInputRegistersResponse) GetValue() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusPDUReadInputRegistersResponse factory function for _ModbusPDUReadInputRegistersResponse -func NewModbusPDUReadInputRegistersResponse(value []byte) *_ModbusPDUReadInputRegistersResponse { +func NewModbusPDUReadInputRegistersResponse( value []byte ) *_ModbusPDUReadInputRegistersResponse { _result := &_ModbusPDUReadInputRegistersResponse{ - Value: value, - _ModbusPDU: NewModbusPDU(), + Value: value, + _ModbusPDU: NewModbusPDU(), } _result._ModbusPDU._ModbusPDUChildRequirements = _result return _result @@ -103,7 +104,7 @@ func NewModbusPDUReadInputRegistersResponse(value []byte) *_ModbusPDUReadInputRe // Deprecated: use the interface for direct cast func CastModbusPDUReadInputRegistersResponse(structType interface{}) ModbusPDUReadInputRegistersResponse { - if casted, ok := structType.(ModbusPDUReadInputRegistersResponse); ok { + if casted, ok := structType.(ModbusPDUReadInputRegistersResponse); ok { return casted } if casted, ok := structType.(*ModbusPDUReadInputRegistersResponse); ok { @@ -130,6 +131,7 @@ func (m *_ModbusPDUReadInputRegistersResponse) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_ModbusPDUReadInputRegistersResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -166,8 +168,9 @@ func ModbusPDUReadInputRegistersResponseParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_ModbusPDUReadInputRegistersResponse{ - _ModbusPDU: &_ModbusPDU{}, - Value: value, + _ModbusPDU: &_ModbusPDU{ + }, + Value: value, } _child._ModbusPDU._ModbusPDUChildRequirements = _child return _child, nil @@ -189,18 +192,18 @@ func (m *_ModbusPDUReadInputRegistersResponse) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for ModbusPDUReadInputRegistersResponse") } - // Implicit Field (byteCount) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - byteCount := uint8(uint8(len(m.GetValue()))) - _byteCountErr := writeBuffer.WriteUint8("byteCount", 8, (byteCount)) - if _byteCountErr != nil { - return errors.Wrap(_byteCountErr, "Error serializing 'byteCount' field") - } + // Implicit Field (byteCount) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) + byteCount := uint8(uint8(len(m.GetValue()))) + _byteCountErr := writeBuffer.WriteUint8("byteCount", 8, (byteCount)) + if _byteCountErr != nil { + return errors.Wrap(_byteCountErr, "Error serializing 'byteCount' field") + } - // Array Field (value) - // Byte Array field (value) - if err := writeBuffer.WriteByteArray("value", m.GetValue()); err != nil { - return errors.Wrap(err, "Error serializing 'value' field") - } + // Array Field (value) + // Byte Array field (value) + if err := writeBuffer.WriteByteArray("value", m.GetValue()); err != nil { + return errors.Wrap(err, "Error serializing 'value' field") + } if popErr := writeBuffer.PopContext("ModbusPDUReadInputRegistersResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for ModbusPDUReadInputRegistersResponse") @@ -210,6 +213,7 @@ func (m *_ModbusPDUReadInputRegistersResponse) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusPDUReadInputRegistersResponse) isModbusPDUReadInputRegistersResponse() bool { return true } @@ -224,3 +228,6 @@ func (m *_ModbusPDUReadInputRegistersResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadWriteMultipleHoldingRegistersRequest.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadWriteMultipleHoldingRegistersRequest.go index 3fa504b602e..1b57dbebbd7 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadWriteMultipleHoldingRegistersRequest.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadWriteMultipleHoldingRegistersRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUReadWriteMultipleHoldingRegistersRequest is the corresponding interface of ModbusPDUReadWriteMultipleHoldingRegistersRequest type ModbusPDUReadWriteMultipleHoldingRegistersRequest interface { @@ -54,41 +56,39 @@ type ModbusPDUReadWriteMultipleHoldingRegistersRequestExactly interface { // _ModbusPDUReadWriteMultipleHoldingRegistersRequest is the data-structure of this message type _ModbusPDUReadWriteMultipleHoldingRegistersRequest struct { *_ModbusPDU - ReadStartingAddress uint16 - ReadQuantity uint16 - WriteStartingAddress uint16 - WriteQuantity uint16 - Value []byte + ReadStartingAddress uint16 + ReadQuantity uint16 + WriteStartingAddress uint16 + WriteQuantity uint16 + Value []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusPDUReadWriteMultipleHoldingRegistersRequest) GetErrorFlag() bool { - return bool(false) -} +func (m *_ModbusPDUReadWriteMultipleHoldingRegistersRequest) GetErrorFlag() bool { +return bool(false)} -func (m *_ModbusPDUReadWriteMultipleHoldingRegistersRequest) GetFunctionFlag() uint8 { - return 0x17 -} +func (m *_ModbusPDUReadWriteMultipleHoldingRegistersRequest) GetFunctionFlag() uint8 { +return 0x17} -func (m *_ModbusPDUReadWriteMultipleHoldingRegistersRequest) GetResponse() bool { - return bool(false) -} +func (m *_ModbusPDUReadWriteMultipleHoldingRegistersRequest) GetResponse() bool { +return bool(false)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusPDUReadWriteMultipleHoldingRegistersRequest) InitializeParent(parent ModbusPDU) {} +func (m *_ModbusPDUReadWriteMultipleHoldingRegistersRequest) InitializeParent(parent ModbusPDU ) {} -func (m *_ModbusPDUReadWriteMultipleHoldingRegistersRequest) GetParent() ModbusPDU { +func (m *_ModbusPDUReadWriteMultipleHoldingRegistersRequest) GetParent() ModbusPDU { return m._ModbusPDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -119,15 +119,16 @@ func (m *_ModbusPDUReadWriteMultipleHoldingRegistersRequest) GetValue() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusPDUReadWriteMultipleHoldingRegistersRequest factory function for _ModbusPDUReadWriteMultipleHoldingRegistersRequest -func NewModbusPDUReadWriteMultipleHoldingRegistersRequest(readStartingAddress uint16, readQuantity uint16, writeStartingAddress uint16, writeQuantity uint16, value []byte) *_ModbusPDUReadWriteMultipleHoldingRegistersRequest { +func NewModbusPDUReadWriteMultipleHoldingRegistersRequest( readStartingAddress uint16 , readQuantity uint16 , writeStartingAddress uint16 , writeQuantity uint16 , value []byte ) *_ModbusPDUReadWriteMultipleHoldingRegistersRequest { _result := &_ModbusPDUReadWriteMultipleHoldingRegistersRequest{ - ReadStartingAddress: readStartingAddress, - ReadQuantity: readQuantity, + ReadStartingAddress: readStartingAddress, + ReadQuantity: readQuantity, WriteStartingAddress: writeStartingAddress, - WriteQuantity: writeQuantity, - Value: value, - _ModbusPDU: NewModbusPDU(), + WriteQuantity: writeQuantity, + Value: value, + _ModbusPDU: NewModbusPDU(), } _result._ModbusPDU._ModbusPDUChildRequirements = _result return _result @@ -135,7 +136,7 @@ func NewModbusPDUReadWriteMultipleHoldingRegistersRequest(readStartingAddress ui // Deprecated: use the interface for direct cast func CastModbusPDUReadWriteMultipleHoldingRegistersRequest(structType interface{}) ModbusPDUReadWriteMultipleHoldingRegistersRequest { - if casted, ok := structType.(ModbusPDUReadWriteMultipleHoldingRegistersRequest); ok { + if casted, ok := structType.(ModbusPDUReadWriteMultipleHoldingRegistersRequest); ok { return casted } if casted, ok := structType.(*ModbusPDUReadWriteMultipleHoldingRegistersRequest); ok { @@ -152,16 +153,16 @@ func (m *_ModbusPDUReadWriteMultipleHoldingRegistersRequest) GetLengthInBits(ctx lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (readStartingAddress) - lengthInBits += 16 + lengthInBits += 16; // Simple field (readQuantity) - lengthInBits += 16 + lengthInBits += 16; // Simple field (writeStartingAddress) - lengthInBits += 16 + lengthInBits += 16; // Simple field (writeQuantity) - lengthInBits += 16 + lengthInBits += 16; // Implicit Field (byteCount) lengthInBits += 8 @@ -174,6 +175,7 @@ func (m *_ModbusPDUReadWriteMultipleHoldingRegistersRequest) GetLengthInBits(ctx return lengthInBits } + func (m *_ModbusPDUReadWriteMultipleHoldingRegistersRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -192,28 +194,28 @@ func ModbusPDUReadWriteMultipleHoldingRegistersRequestParseWithBuffer(ctx contex _ = currentPos // Simple Field (readStartingAddress) - _readStartingAddress, _readStartingAddressErr := readBuffer.ReadUint16("readStartingAddress", 16) +_readStartingAddress, _readStartingAddressErr := readBuffer.ReadUint16("readStartingAddress", 16) if _readStartingAddressErr != nil { return nil, errors.Wrap(_readStartingAddressErr, "Error parsing 'readStartingAddress' field of ModbusPDUReadWriteMultipleHoldingRegistersRequest") } readStartingAddress := _readStartingAddress // Simple Field (readQuantity) - _readQuantity, _readQuantityErr := readBuffer.ReadUint16("readQuantity", 16) +_readQuantity, _readQuantityErr := readBuffer.ReadUint16("readQuantity", 16) if _readQuantityErr != nil { return nil, errors.Wrap(_readQuantityErr, "Error parsing 'readQuantity' field of ModbusPDUReadWriteMultipleHoldingRegistersRequest") } readQuantity := _readQuantity // Simple Field (writeStartingAddress) - _writeStartingAddress, _writeStartingAddressErr := readBuffer.ReadUint16("writeStartingAddress", 16) +_writeStartingAddress, _writeStartingAddressErr := readBuffer.ReadUint16("writeStartingAddress", 16) if _writeStartingAddressErr != nil { return nil, errors.Wrap(_writeStartingAddressErr, "Error parsing 'writeStartingAddress' field of ModbusPDUReadWriteMultipleHoldingRegistersRequest") } writeStartingAddress := _writeStartingAddress // Simple Field (writeQuantity) - _writeQuantity, _writeQuantityErr := readBuffer.ReadUint16("writeQuantity", 16) +_writeQuantity, _writeQuantityErr := readBuffer.ReadUint16("writeQuantity", 16) if _writeQuantityErr != nil { return nil, errors.Wrap(_writeQuantityErr, "Error parsing 'writeQuantity' field of ModbusPDUReadWriteMultipleHoldingRegistersRequest") } @@ -238,12 +240,13 @@ func ModbusPDUReadWriteMultipleHoldingRegistersRequestParseWithBuffer(ctx contex // Create a partially initialized instance _child := &_ModbusPDUReadWriteMultipleHoldingRegistersRequest{ - _ModbusPDU: &_ModbusPDU{}, - ReadStartingAddress: readStartingAddress, - ReadQuantity: readQuantity, + _ModbusPDU: &_ModbusPDU{ + }, + ReadStartingAddress: readStartingAddress, + ReadQuantity: readQuantity, WriteStartingAddress: writeStartingAddress, - WriteQuantity: writeQuantity, - Value: value, + WriteQuantity: writeQuantity, + Value: value, } _child._ModbusPDU._ModbusPDUChildRequirements = _child return _child, nil @@ -265,46 +268,46 @@ func (m *_ModbusPDUReadWriteMultipleHoldingRegistersRequest) SerializeWithWriteB return errors.Wrap(pushErr, "Error pushing for ModbusPDUReadWriteMultipleHoldingRegistersRequest") } - // Simple Field (readStartingAddress) - readStartingAddress := uint16(m.GetReadStartingAddress()) - _readStartingAddressErr := writeBuffer.WriteUint16("readStartingAddress", 16, (readStartingAddress)) - if _readStartingAddressErr != nil { - return errors.Wrap(_readStartingAddressErr, "Error serializing 'readStartingAddress' field") - } + // Simple Field (readStartingAddress) + readStartingAddress := uint16(m.GetReadStartingAddress()) + _readStartingAddressErr := writeBuffer.WriteUint16("readStartingAddress", 16, (readStartingAddress)) + if _readStartingAddressErr != nil { + return errors.Wrap(_readStartingAddressErr, "Error serializing 'readStartingAddress' field") + } - // Simple Field (readQuantity) - readQuantity := uint16(m.GetReadQuantity()) - _readQuantityErr := writeBuffer.WriteUint16("readQuantity", 16, (readQuantity)) - if _readQuantityErr != nil { - return errors.Wrap(_readQuantityErr, "Error serializing 'readQuantity' field") - } + // Simple Field (readQuantity) + readQuantity := uint16(m.GetReadQuantity()) + _readQuantityErr := writeBuffer.WriteUint16("readQuantity", 16, (readQuantity)) + if _readQuantityErr != nil { + return errors.Wrap(_readQuantityErr, "Error serializing 'readQuantity' field") + } - // Simple Field (writeStartingAddress) - writeStartingAddress := uint16(m.GetWriteStartingAddress()) - _writeStartingAddressErr := writeBuffer.WriteUint16("writeStartingAddress", 16, (writeStartingAddress)) - if _writeStartingAddressErr != nil { - return errors.Wrap(_writeStartingAddressErr, "Error serializing 'writeStartingAddress' field") - } + // Simple Field (writeStartingAddress) + writeStartingAddress := uint16(m.GetWriteStartingAddress()) + _writeStartingAddressErr := writeBuffer.WriteUint16("writeStartingAddress", 16, (writeStartingAddress)) + if _writeStartingAddressErr != nil { + return errors.Wrap(_writeStartingAddressErr, "Error serializing 'writeStartingAddress' field") + } - // Simple Field (writeQuantity) - writeQuantity := uint16(m.GetWriteQuantity()) - _writeQuantityErr := writeBuffer.WriteUint16("writeQuantity", 16, (writeQuantity)) - if _writeQuantityErr != nil { - return errors.Wrap(_writeQuantityErr, "Error serializing 'writeQuantity' field") - } + // Simple Field (writeQuantity) + writeQuantity := uint16(m.GetWriteQuantity()) + _writeQuantityErr := writeBuffer.WriteUint16("writeQuantity", 16, (writeQuantity)) + if _writeQuantityErr != nil { + return errors.Wrap(_writeQuantityErr, "Error serializing 'writeQuantity' field") + } - // Implicit Field (byteCount) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - byteCount := uint8(uint8(len(m.GetValue()))) - _byteCountErr := writeBuffer.WriteUint8("byteCount", 8, (byteCount)) - if _byteCountErr != nil { - return errors.Wrap(_byteCountErr, "Error serializing 'byteCount' field") - } + // Implicit Field (byteCount) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) + byteCount := uint8(uint8(len(m.GetValue()))) + _byteCountErr := writeBuffer.WriteUint8("byteCount", 8, (byteCount)) + if _byteCountErr != nil { + return errors.Wrap(_byteCountErr, "Error serializing 'byteCount' field") + } - // Array Field (value) - // Byte Array field (value) - if err := writeBuffer.WriteByteArray("value", m.GetValue()); err != nil { - return errors.Wrap(err, "Error serializing 'value' field") - } + // Array Field (value) + // Byte Array field (value) + if err := writeBuffer.WriteByteArray("value", m.GetValue()); err != nil { + return errors.Wrap(err, "Error serializing 'value' field") + } if popErr := writeBuffer.PopContext("ModbusPDUReadWriteMultipleHoldingRegistersRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for ModbusPDUReadWriteMultipleHoldingRegistersRequest") @@ -314,6 +317,7 @@ func (m *_ModbusPDUReadWriteMultipleHoldingRegistersRequest) SerializeWithWriteB return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusPDUReadWriteMultipleHoldingRegistersRequest) isModbusPDUReadWriteMultipleHoldingRegistersRequest() bool { return true } @@ -328,3 +332,6 @@ func (m *_ModbusPDUReadWriteMultipleHoldingRegistersRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadWriteMultipleHoldingRegistersResponse.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadWriteMultipleHoldingRegistersResponse.go index 8ce5614f4db..a818063a020 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadWriteMultipleHoldingRegistersResponse.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReadWriteMultipleHoldingRegistersResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUReadWriteMultipleHoldingRegistersResponse is the corresponding interface of ModbusPDUReadWriteMultipleHoldingRegistersResponse type ModbusPDUReadWriteMultipleHoldingRegistersResponse interface { @@ -46,37 +48,35 @@ type ModbusPDUReadWriteMultipleHoldingRegistersResponseExactly interface { // _ModbusPDUReadWriteMultipleHoldingRegistersResponse is the data-structure of this message type _ModbusPDUReadWriteMultipleHoldingRegistersResponse struct { *_ModbusPDU - Value []byte + Value []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusPDUReadWriteMultipleHoldingRegistersResponse) GetErrorFlag() bool { - return bool(false) -} +func (m *_ModbusPDUReadWriteMultipleHoldingRegistersResponse) GetErrorFlag() bool { +return bool(false)} -func (m *_ModbusPDUReadWriteMultipleHoldingRegistersResponse) GetFunctionFlag() uint8 { - return 0x17 -} +func (m *_ModbusPDUReadWriteMultipleHoldingRegistersResponse) GetFunctionFlag() uint8 { +return 0x17} -func (m *_ModbusPDUReadWriteMultipleHoldingRegistersResponse) GetResponse() bool { - return bool(true) -} +func (m *_ModbusPDUReadWriteMultipleHoldingRegistersResponse) GetResponse() bool { +return bool(true)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusPDUReadWriteMultipleHoldingRegistersResponse) InitializeParent(parent ModbusPDU) {} +func (m *_ModbusPDUReadWriteMultipleHoldingRegistersResponse) InitializeParent(parent ModbusPDU ) {} -func (m *_ModbusPDUReadWriteMultipleHoldingRegistersResponse) GetParent() ModbusPDU { +func (m *_ModbusPDUReadWriteMultipleHoldingRegistersResponse) GetParent() ModbusPDU { return m._ModbusPDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -91,11 +91,12 @@ func (m *_ModbusPDUReadWriteMultipleHoldingRegistersResponse) GetValue() []byte /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusPDUReadWriteMultipleHoldingRegistersResponse factory function for _ModbusPDUReadWriteMultipleHoldingRegistersResponse -func NewModbusPDUReadWriteMultipleHoldingRegistersResponse(value []byte) *_ModbusPDUReadWriteMultipleHoldingRegistersResponse { +func NewModbusPDUReadWriteMultipleHoldingRegistersResponse( value []byte ) *_ModbusPDUReadWriteMultipleHoldingRegistersResponse { _result := &_ModbusPDUReadWriteMultipleHoldingRegistersResponse{ - Value: value, - _ModbusPDU: NewModbusPDU(), + Value: value, + _ModbusPDU: NewModbusPDU(), } _result._ModbusPDU._ModbusPDUChildRequirements = _result return _result @@ -103,7 +104,7 @@ func NewModbusPDUReadWriteMultipleHoldingRegistersResponse(value []byte) *_Modbu // Deprecated: use the interface for direct cast func CastModbusPDUReadWriteMultipleHoldingRegistersResponse(structType interface{}) ModbusPDUReadWriteMultipleHoldingRegistersResponse { - if casted, ok := structType.(ModbusPDUReadWriteMultipleHoldingRegistersResponse); ok { + if casted, ok := structType.(ModbusPDUReadWriteMultipleHoldingRegistersResponse); ok { return casted } if casted, ok := structType.(*ModbusPDUReadWriteMultipleHoldingRegistersResponse); ok { @@ -130,6 +131,7 @@ func (m *_ModbusPDUReadWriteMultipleHoldingRegistersResponse) GetLengthInBits(ct return lengthInBits } + func (m *_ModbusPDUReadWriteMultipleHoldingRegistersResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -166,8 +168,9 @@ func ModbusPDUReadWriteMultipleHoldingRegistersResponseParseWithBuffer(ctx conte // Create a partially initialized instance _child := &_ModbusPDUReadWriteMultipleHoldingRegistersResponse{ - _ModbusPDU: &_ModbusPDU{}, - Value: value, + _ModbusPDU: &_ModbusPDU{ + }, + Value: value, } _child._ModbusPDU._ModbusPDUChildRequirements = _child return _child, nil @@ -189,18 +192,18 @@ func (m *_ModbusPDUReadWriteMultipleHoldingRegistersResponse) SerializeWithWrite return errors.Wrap(pushErr, "Error pushing for ModbusPDUReadWriteMultipleHoldingRegistersResponse") } - // Implicit Field (byteCount) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - byteCount := uint8(uint8(len(m.GetValue()))) - _byteCountErr := writeBuffer.WriteUint8("byteCount", 8, (byteCount)) - if _byteCountErr != nil { - return errors.Wrap(_byteCountErr, "Error serializing 'byteCount' field") - } + // Implicit Field (byteCount) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) + byteCount := uint8(uint8(len(m.GetValue()))) + _byteCountErr := writeBuffer.WriteUint8("byteCount", 8, (byteCount)) + if _byteCountErr != nil { + return errors.Wrap(_byteCountErr, "Error serializing 'byteCount' field") + } - // Array Field (value) - // Byte Array field (value) - if err := writeBuffer.WriteByteArray("value", m.GetValue()); err != nil { - return errors.Wrap(err, "Error serializing 'value' field") - } + // Array Field (value) + // Byte Array field (value) + if err := writeBuffer.WriteByteArray("value", m.GetValue()); err != nil { + return errors.Wrap(err, "Error serializing 'value' field") + } if popErr := writeBuffer.PopContext("ModbusPDUReadWriteMultipleHoldingRegistersResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for ModbusPDUReadWriteMultipleHoldingRegistersResponse") @@ -210,6 +213,7 @@ func (m *_ModbusPDUReadWriteMultipleHoldingRegistersResponse) SerializeWithWrite return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusPDUReadWriteMultipleHoldingRegistersResponse) isModbusPDUReadWriteMultipleHoldingRegistersResponse() bool { return true } @@ -224,3 +228,6 @@ func (m *_ModbusPDUReadWriteMultipleHoldingRegistersResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReportServerIdRequest.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReportServerIdRequest.go index 2d34e6cb8a4..b78a6a77fa0 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReportServerIdRequest.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReportServerIdRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUReportServerIdRequest is the corresponding interface of ModbusPDUReportServerIdRequest type ModbusPDUReportServerIdRequest interface { @@ -46,38 +48,38 @@ type _ModbusPDUReportServerIdRequest struct { *_ModbusPDU } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusPDUReportServerIdRequest) GetErrorFlag() bool { - return bool(false) -} +func (m *_ModbusPDUReportServerIdRequest) GetErrorFlag() bool { +return bool(false)} -func (m *_ModbusPDUReportServerIdRequest) GetFunctionFlag() uint8 { - return 0x11 -} +func (m *_ModbusPDUReportServerIdRequest) GetFunctionFlag() uint8 { +return 0x11} -func (m *_ModbusPDUReportServerIdRequest) GetResponse() bool { - return bool(false) -} +func (m *_ModbusPDUReportServerIdRequest) GetResponse() bool { +return bool(false)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusPDUReportServerIdRequest) InitializeParent(parent ModbusPDU) {} +func (m *_ModbusPDUReportServerIdRequest) InitializeParent(parent ModbusPDU ) {} -func (m *_ModbusPDUReportServerIdRequest) GetParent() ModbusPDU { +func (m *_ModbusPDUReportServerIdRequest) GetParent() ModbusPDU { return m._ModbusPDU } + // NewModbusPDUReportServerIdRequest factory function for _ModbusPDUReportServerIdRequest -func NewModbusPDUReportServerIdRequest() *_ModbusPDUReportServerIdRequest { +func NewModbusPDUReportServerIdRequest( ) *_ModbusPDUReportServerIdRequest { _result := &_ModbusPDUReportServerIdRequest{ - _ModbusPDU: NewModbusPDU(), + _ModbusPDU: NewModbusPDU(), } _result._ModbusPDU._ModbusPDUChildRequirements = _result return _result @@ -85,7 +87,7 @@ func NewModbusPDUReportServerIdRequest() *_ModbusPDUReportServerIdRequest { // Deprecated: use the interface for direct cast func CastModbusPDUReportServerIdRequest(structType interface{}) ModbusPDUReportServerIdRequest { - if casted, ok := structType.(ModbusPDUReportServerIdRequest); ok { + if casted, ok := structType.(ModbusPDUReportServerIdRequest); ok { return casted } if casted, ok := structType.(*ModbusPDUReportServerIdRequest); ok { @@ -104,6 +106,7 @@ func (m *_ModbusPDUReportServerIdRequest) GetLengthInBits(ctx context.Context) u return lengthInBits } + func (m *_ModbusPDUReportServerIdRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -127,7 +130,8 @@ func ModbusPDUReportServerIdRequestParseWithBuffer(ctx context.Context, readBuff // Create a partially initialized instance _child := &_ModbusPDUReportServerIdRequest{ - _ModbusPDU: &_ModbusPDU{}, + _ModbusPDU: &_ModbusPDU{ + }, } _child._ModbusPDU._ModbusPDUChildRequirements = _child return _child, nil @@ -157,6 +161,7 @@ func (m *_ModbusPDUReportServerIdRequest) SerializeWithWriteBuffer(ctx context.C return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusPDUReportServerIdRequest) isModbusPDUReportServerIdRequest() bool { return true } @@ -171,3 +176,6 @@ func (m *_ModbusPDUReportServerIdRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReportServerIdResponse.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReportServerIdResponse.go index 1c9e38b1ef2..2be8bb59704 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUReportServerIdResponse.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUReportServerIdResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUReportServerIdResponse is the corresponding interface of ModbusPDUReportServerIdResponse type ModbusPDUReportServerIdResponse interface { @@ -46,37 +48,35 @@ type ModbusPDUReportServerIdResponseExactly interface { // _ModbusPDUReportServerIdResponse is the data-structure of this message type _ModbusPDUReportServerIdResponse struct { *_ModbusPDU - Value []byte + Value []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusPDUReportServerIdResponse) GetErrorFlag() bool { - return bool(false) -} +func (m *_ModbusPDUReportServerIdResponse) GetErrorFlag() bool { +return bool(false)} -func (m *_ModbusPDUReportServerIdResponse) GetFunctionFlag() uint8 { - return 0x11 -} +func (m *_ModbusPDUReportServerIdResponse) GetFunctionFlag() uint8 { +return 0x11} -func (m *_ModbusPDUReportServerIdResponse) GetResponse() bool { - return bool(true) -} +func (m *_ModbusPDUReportServerIdResponse) GetResponse() bool { +return bool(true)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusPDUReportServerIdResponse) InitializeParent(parent ModbusPDU) {} +func (m *_ModbusPDUReportServerIdResponse) InitializeParent(parent ModbusPDU ) {} -func (m *_ModbusPDUReportServerIdResponse) GetParent() ModbusPDU { +func (m *_ModbusPDUReportServerIdResponse) GetParent() ModbusPDU { return m._ModbusPDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -91,11 +91,12 @@ func (m *_ModbusPDUReportServerIdResponse) GetValue() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusPDUReportServerIdResponse factory function for _ModbusPDUReportServerIdResponse -func NewModbusPDUReportServerIdResponse(value []byte) *_ModbusPDUReportServerIdResponse { +func NewModbusPDUReportServerIdResponse( value []byte ) *_ModbusPDUReportServerIdResponse { _result := &_ModbusPDUReportServerIdResponse{ - Value: value, - _ModbusPDU: NewModbusPDU(), + Value: value, + _ModbusPDU: NewModbusPDU(), } _result._ModbusPDU._ModbusPDUChildRequirements = _result return _result @@ -103,7 +104,7 @@ func NewModbusPDUReportServerIdResponse(value []byte) *_ModbusPDUReportServerIdR // Deprecated: use the interface for direct cast func CastModbusPDUReportServerIdResponse(structType interface{}) ModbusPDUReportServerIdResponse { - if casted, ok := structType.(ModbusPDUReportServerIdResponse); ok { + if casted, ok := structType.(ModbusPDUReportServerIdResponse); ok { return casted } if casted, ok := structType.(*ModbusPDUReportServerIdResponse); ok { @@ -130,6 +131,7 @@ func (m *_ModbusPDUReportServerIdResponse) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_ModbusPDUReportServerIdResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -166,8 +168,9 @@ func ModbusPDUReportServerIdResponseParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_ModbusPDUReportServerIdResponse{ - _ModbusPDU: &_ModbusPDU{}, - Value: value, + _ModbusPDU: &_ModbusPDU{ + }, + Value: value, } _child._ModbusPDU._ModbusPDUChildRequirements = _child return _child, nil @@ -189,18 +192,18 @@ func (m *_ModbusPDUReportServerIdResponse) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for ModbusPDUReportServerIdResponse") } - // Implicit Field (byteCount) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - byteCount := uint8(uint8(len(m.GetValue()))) - _byteCountErr := writeBuffer.WriteUint8("byteCount", 8, (byteCount)) - if _byteCountErr != nil { - return errors.Wrap(_byteCountErr, "Error serializing 'byteCount' field") - } + // Implicit Field (byteCount) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) + byteCount := uint8(uint8(len(m.GetValue()))) + _byteCountErr := writeBuffer.WriteUint8("byteCount", 8, (byteCount)) + if _byteCountErr != nil { + return errors.Wrap(_byteCountErr, "Error serializing 'byteCount' field") + } - // Array Field (value) - // Byte Array field (value) - if err := writeBuffer.WriteByteArray("value", m.GetValue()); err != nil { - return errors.Wrap(err, "Error serializing 'value' field") - } + // Array Field (value) + // Byte Array field (value) + if err := writeBuffer.WriteByteArray("value", m.GetValue()); err != nil { + return errors.Wrap(err, "Error serializing 'value' field") + } if popErr := writeBuffer.PopContext("ModbusPDUReportServerIdResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for ModbusPDUReportServerIdResponse") @@ -210,6 +213,7 @@ func (m *_ModbusPDUReportServerIdResponse) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusPDUReportServerIdResponse) isModbusPDUReportServerIdResponse() bool { return true } @@ -224,3 +228,6 @@ func (m *_ModbusPDUReportServerIdResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteFileRecordRequest.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteFileRecordRequest.go index b10b0d092af..cac4c90479e 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteFileRecordRequest.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteFileRecordRequest.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUWriteFileRecordRequest is the corresponding interface of ModbusPDUWriteFileRecordRequest type ModbusPDUWriteFileRecordRequest interface { @@ -47,37 +49,35 @@ type ModbusPDUWriteFileRecordRequestExactly interface { // _ModbusPDUWriteFileRecordRequest is the data-structure of this message type _ModbusPDUWriteFileRecordRequest struct { *_ModbusPDU - Items []ModbusPDUWriteFileRecordRequestItem + Items []ModbusPDUWriteFileRecordRequestItem } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusPDUWriteFileRecordRequest) GetErrorFlag() bool { - return bool(false) -} +func (m *_ModbusPDUWriteFileRecordRequest) GetErrorFlag() bool { +return bool(false)} -func (m *_ModbusPDUWriteFileRecordRequest) GetFunctionFlag() uint8 { - return 0x15 -} +func (m *_ModbusPDUWriteFileRecordRequest) GetFunctionFlag() uint8 { +return 0x15} -func (m *_ModbusPDUWriteFileRecordRequest) GetResponse() bool { - return bool(false) -} +func (m *_ModbusPDUWriteFileRecordRequest) GetResponse() bool { +return bool(false)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusPDUWriteFileRecordRequest) InitializeParent(parent ModbusPDU) {} +func (m *_ModbusPDUWriteFileRecordRequest) InitializeParent(parent ModbusPDU ) {} -func (m *_ModbusPDUWriteFileRecordRequest) GetParent() ModbusPDU { +func (m *_ModbusPDUWriteFileRecordRequest) GetParent() ModbusPDU { return m._ModbusPDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_ModbusPDUWriteFileRecordRequest) GetItems() []ModbusPDUWriteFileRecord /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusPDUWriteFileRecordRequest factory function for _ModbusPDUWriteFileRecordRequest -func NewModbusPDUWriteFileRecordRequest(items []ModbusPDUWriteFileRecordRequestItem) *_ModbusPDUWriteFileRecordRequest { +func NewModbusPDUWriteFileRecordRequest( items []ModbusPDUWriteFileRecordRequestItem ) *_ModbusPDUWriteFileRecordRequest { _result := &_ModbusPDUWriteFileRecordRequest{ - Items: items, - _ModbusPDU: NewModbusPDU(), + Items: items, + _ModbusPDU: NewModbusPDU(), } _result._ModbusPDU._ModbusPDUChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewModbusPDUWriteFileRecordRequest(items []ModbusPDUWriteFileRecordRequestI // Deprecated: use the interface for direct cast func CastModbusPDUWriteFileRecordRequest(structType interface{}) ModbusPDUWriteFileRecordRequest { - if casted, ok := structType.(ModbusPDUWriteFileRecordRequest); ok { + if casted, ok := structType.(ModbusPDUWriteFileRecordRequest); ok { return casted } if casted, ok := structType.(*ModbusPDUWriteFileRecordRequest); ok { @@ -133,6 +134,7 @@ func (m *_ModbusPDUWriteFileRecordRequest) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_ModbusPDUWriteFileRecordRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -166,8 +168,8 @@ func ModbusPDUWriteFileRecordRequestParseWithBuffer(ctx context.Context, readBuf { _itemsLength := byteCount _itemsEndPos := positionAware.GetPos() + uint16(_itemsLength) - for positionAware.GetPos() < _itemsEndPos { - _item, _err := ModbusPDUWriteFileRecordRequestItemParseWithBuffer(ctx, readBuffer) + for ;positionAware.GetPos() < _itemsEndPos; { +_item, _err := ModbusPDUWriteFileRecordRequestItemParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'items' field of ModbusPDUWriteFileRecordRequest") } @@ -184,8 +186,9 @@ func ModbusPDUWriteFileRecordRequestParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_ModbusPDUWriteFileRecordRequest{ - _ModbusPDU: &_ModbusPDU{}, - Items: items, + _ModbusPDU: &_ModbusPDU{ + }, + Items: items, } _child._ModbusPDU._ModbusPDUChildRequirements = _child return _child, nil @@ -214,29 +217,29 @@ func (m *_ModbusPDUWriteFileRecordRequest) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for ModbusPDUWriteFileRecordRequest") } - // Implicit Field (byteCount) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - byteCount := uint8(uint8(itemsArraySizeInBytes(m.GetItems()))) - _byteCountErr := writeBuffer.WriteUint8("byteCount", 8, (byteCount)) - if _byteCountErr != nil { - return errors.Wrap(_byteCountErr, "Error serializing 'byteCount' field") - } + // Implicit Field (byteCount) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) + byteCount := uint8(uint8(itemsArraySizeInBytes(m.GetItems()))) + _byteCountErr := writeBuffer.WriteUint8("byteCount", 8, (byteCount)) + if _byteCountErr != nil { + return errors.Wrap(_byteCountErr, "Error serializing 'byteCount' field") + } - // Array Field (items) - if pushErr := writeBuffer.PushContext("items", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for items") - } - for _curItem, _element := range m.GetItems() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetItems()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'items' field") - } - } - if popErr := writeBuffer.PopContext("items", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for items") + // Array Field (items) + if pushErr := writeBuffer.PushContext("items", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for items") + } + for _curItem, _element := range m.GetItems() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetItems()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'items' field") } + } + if popErr := writeBuffer.PopContext("items", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for items") + } if popErr := writeBuffer.PopContext("ModbusPDUWriteFileRecordRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for ModbusPDUWriteFileRecordRequest") @@ -246,6 +249,7 @@ func (m *_ModbusPDUWriteFileRecordRequest) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusPDUWriteFileRecordRequest) isModbusPDUWriteFileRecordRequest() bool { return true } @@ -260,3 +264,6 @@ func (m *_ModbusPDUWriteFileRecordRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteFileRecordRequestItem.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteFileRecordRequestItem.go index 679c5e9a6c1..a377f06b1cf 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteFileRecordRequestItem.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteFileRecordRequestItem.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUWriteFileRecordRequestItem is the corresponding interface of ModbusPDUWriteFileRecordRequestItem type ModbusPDUWriteFileRecordRequestItem interface { @@ -50,12 +52,13 @@ type ModbusPDUWriteFileRecordRequestItemExactly interface { // _ModbusPDUWriteFileRecordRequestItem is the data-structure of this message type _ModbusPDUWriteFileRecordRequestItem struct { - ReferenceType uint8 - FileNumber uint16 - RecordNumber uint16 - RecordData []byte + ReferenceType uint8 + FileNumber uint16 + RecordNumber uint16 + RecordData []byte } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -82,14 +85,15 @@ func (m *_ModbusPDUWriteFileRecordRequestItem) GetRecordData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusPDUWriteFileRecordRequestItem factory function for _ModbusPDUWriteFileRecordRequestItem -func NewModbusPDUWriteFileRecordRequestItem(referenceType uint8, fileNumber uint16, recordNumber uint16, recordData []byte) *_ModbusPDUWriteFileRecordRequestItem { - return &_ModbusPDUWriteFileRecordRequestItem{ReferenceType: referenceType, FileNumber: fileNumber, RecordNumber: recordNumber, RecordData: recordData} +func NewModbusPDUWriteFileRecordRequestItem( referenceType uint8 , fileNumber uint16 , recordNumber uint16 , recordData []byte ) *_ModbusPDUWriteFileRecordRequestItem { +return &_ModbusPDUWriteFileRecordRequestItem{ ReferenceType: referenceType , FileNumber: fileNumber , RecordNumber: recordNumber , RecordData: recordData } } // Deprecated: use the interface for direct cast func CastModbusPDUWriteFileRecordRequestItem(structType interface{}) ModbusPDUWriteFileRecordRequestItem { - if casted, ok := structType.(ModbusPDUWriteFileRecordRequestItem); ok { + if casted, ok := structType.(ModbusPDUWriteFileRecordRequestItem); ok { return casted } if casted, ok := structType.(*ModbusPDUWriteFileRecordRequestItem); ok { @@ -106,13 +110,13 @@ func (m *_ModbusPDUWriteFileRecordRequestItem) GetLengthInBits(ctx context.Conte lengthInBits := uint16(0) // Simple field (referenceType) - lengthInBits += 8 + lengthInBits += 8; // Simple field (fileNumber) - lengthInBits += 16 + lengthInBits += 16; // Simple field (recordNumber) - lengthInBits += 16 + lengthInBits += 16; // Implicit Field (recordLength) lengthInBits += 16 @@ -125,6 +129,7 @@ func (m *_ModbusPDUWriteFileRecordRequestItem) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_ModbusPDUWriteFileRecordRequestItem) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -143,21 +148,21 @@ func ModbusPDUWriteFileRecordRequestItemParseWithBuffer(ctx context.Context, rea _ = currentPos // Simple Field (referenceType) - _referenceType, _referenceTypeErr := readBuffer.ReadUint8("referenceType", 8) +_referenceType, _referenceTypeErr := readBuffer.ReadUint8("referenceType", 8) if _referenceTypeErr != nil { return nil, errors.Wrap(_referenceTypeErr, "Error parsing 'referenceType' field of ModbusPDUWriteFileRecordRequestItem") } referenceType := _referenceType // Simple Field (fileNumber) - _fileNumber, _fileNumberErr := readBuffer.ReadUint16("fileNumber", 16) +_fileNumber, _fileNumberErr := readBuffer.ReadUint16("fileNumber", 16) if _fileNumberErr != nil { return nil, errors.Wrap(_fileNumberErr, "Error parsing 'fileNumber' field of ModbusPDUWriteFileRecordRequestItem") } fileNumber := _fileNumber // Simple Field (recordNumber) - _recordNumber, _recordNumberErr := readBuffer.ReadUint16("recordNumber", 16) +_recordNumber, _recordNumberErr := readBuffer.ReadUint16("recordNumber", 16) if _recordNumberErr != nil { return nil, errors.Wrap(_recordNumberErr, "Error parsing 'recordNumber' field of ModbusPDUWriteFileRecordRequestItem") } @@ -182,11 +187,11 @@ func ModbusPDUWriteFileRecordRequestItemParseWithBuffer(ctx context.Context, rea // Create the instance return &_ModbusPDUWriteFileRecordRequestItem{ - ReferenceType: referenceType, - FileNumber: fileNumber, - RecordNumber: recordNumber, - RecordData: recordData, - }, nil + ReferenceType: referenceType, + FileNumber: fileNumber, + RecordNumber: recordNumber, + RecordData: recordData, + }, nil } func (m *_ModbusPDUWriteFileRecordRequestItem) Serialize() ([]byte, error) { @@ -200,7 +205,7 @@ func (m *_ModbusPDUWriteFileRecordRequestItem) Serialize() ([]byte, error) { func (m *_ModbusPDUWriteFileRecordRequestItem) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("ModbusPDUWriteFileRecordRequestItem"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("ModbusPDUWriteFileRecordRequestItem"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for ModbusPDUWriteFileRecordRequestItem") } @@ -244,6 +249,7 @@ func (m *_ModbusPDUWriteFileRecordRequestItem) SerializeWithWriteBuffer(ctx cont return nil } + func (m *_ModbusPDUWriteFileRecordRequestItem) isModbusPDUWriteFileRecordRequestItem() bool { return true } @@ -258,3 +264,6 @@ func (m *_ModbusPDUWriteFileRecordRequestItem) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteFileRecordResponse.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteFileRecordResponse.go index 656eb86c7e4..eda698cd780 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteFileRecordResponse.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteFileRecordResponse.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUWriteFileRecordResponse is the corresponding interface of ModbusPDUWriteFileRecordResponse type ModbusPDUWriteFileRecordResponse interface { @@ -47,37 +49,35 @@ type ModbusPDUWriteFileRecordResponseExactly interface { // _ModbusPDUWriteFileRecordResponse is the data-structure of this message type _ModbusPDUWriteFileRecordResponse struct { *_ModbusPDU - Items []ModbusPDUWriteFileRecordResponseItem + Items []ModbusPDUWriteFileRecordResponseItem } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusPDUWriteFileRecordResponse) GetErrorFlag() bool { - return bool(false) -} +func (m *_ModbusPDUWriteFileRecordResponse) GetErrorFlag() bool { +return bool(false)} -func (m *_ModbusPDUWriteFileRecordResponse) GetFunctionFlag() uint8 { - return 0x15 -} +func (m *_ModbusPDUWriteFileRecordResponse) GetFunctionFlag() uint8 { +return 0x15} -func (m *_ModbusPDUWriteFileRecordResponse) GetResponse() bool { - return bool(true) -} +func (m *_ModbusPDUWriteFileRecordResponse) GetResponse() bool { +return bool(true)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusPDUWriteFileRecordResponse) InitializeParent(parent ModbusPDU) {} +func (m *_ModbusPDUWriteFileRecordResponse) InitializeParent(parent ModbusPDU ) {} -func (m *_ModbusPDUWriteFileRecordResponse) GetParent() ModbusPDU { +func (m *_ModbusPDUWriteFileRecordResponse) GetParent() ModbusPDU { return m._ModbusPDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,11 +92,12 @@ func (m *_ModbusPDUWriteFileRecordResponse) GetItems() []ModbusPDUWriteFileRecor /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusPDUWriteFileRecordResponse factory function for _ModbusPDUWriteFileRecordResponse -func NewModbusPDUWriteFileRecordResponse(items []ModbusPDUWriteFileRecordResponseItem) *_ModbusPDUWriteFileRecordResponse { +func NewModbusPDUWriteFileRecordResponse( items []ModbusPDUWriteFileRecordResponseItem ) *_ModbusPDUWriteFileRecordResponse { _result := &_ModbusPDUWriteFileRecordResponse{ - Items: items, - _ModbusPDU: NewModbusPDU(), + Items: items, + _ModbusPDU: NewModbusPDU(), } _result._ModbusPDU._ModbusPDUChildRequirements = _result return _result @@ -104,7 +105,7 @@ func NewModbusPDUWriteFileRecordResponse(items []ModbusPDUWriteFileRecordRespons // Deprecated: use the interface for direct cast func CastModbusPDUWriteFileRecordResponse(structType interface{}) ModbusPDUWriteFileRecordResponse { - if casted, ok := structType.(ModbusPDUWriteFileRecordResponse); ok { + if casted, ok := structType.(ModbusPDUWriteFileRecordResponse); ok { return casted } if casted, ok := structType.(*ModbusPDUWriteFileRecordResponse); ok { @@ -133,6 +134,7 @@ func (m *_ModbusPDUWriteFileRecordResponse) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_ModbusPDUWriteFileRecordResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -166,8 +168,8 @@ func ModbusPDUWriteFileRecordResponseParseWithBuffer(ctx context.Context, readBu { _itemsLength := byteCount _itemsEndPos := positionAware.GetPos() + uint16(_itemsLength) - for positionAware.GetPos() < _itemsEndPos { - _item, _err := ModbusPDUWriteFileRecordResponseItemParseWithBuffer(ctx, readBuffer) + for ;positionAware.GetPos() < _itemsEndPos; { +_item, _err := ModbusPDUWriteFileRecordResponseItemParseWithBuffer(ctx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'items' field of ModbusPDUWriteFileRecordResponse") } @@ -184,8 +186,9 @@ func ModbusPDUWriteFileRecordResponseParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_ModbusPDUWriteFileRecordResponse{ - _ModbusPDU: &_ModbusPDU{}, - Items: items, + _ModbusPDU: &_ModbusPDU{ + }, + Items: items, } _child._ModbusPDU._ModbusPDUChildRequirements = _child return _child, nil @@ -214,29 +217,29 @@ func (m *_ModbusPDUWriteFileRecordResponse) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for ModbusPDUWriteFileRecordResponse") } - // Implicit Field (byteCount) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - byteCount := uint8(uint8(itemsArraySizeInBytes(m.GetItems()))) - _byteCountErr := writeBuffer.WriteUint8("byteCount", 8, (byteCount)) - if _byteCountErr != nil { - return errors.Wrap(_byteCountErr, "Error serializing 'byteCount' field") - } + // Implicit Field (byteCount) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) + byteCount := uint8(uint8(itemsArraySizeInBytes(m.GetItems()))) + _byteCountErr := writeBuffer.WriteUint8("byteCount", 8, (byteCount)) + if _byteCountErr != nil { + return errors.Wrap(_byteCountErr, "Error serializing 'byteCount' field") + } - // Array Field (items) - if pushErr := writeBuffer.PushContext("items", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for items") - } - for _curItem, _element := range m.GetItems() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetItems()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'items' field") - } - } - if popErr := writeBuffer.PopContext("items", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for items") + // Array Field (items) + if pushErr := writeBuffer.PushContext("items", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for items") + } + for _curItem, _element := range m.GetItems() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetItems()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'items' field") } + } + if popErr := writeBuffer.PopContext("items", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for items") + } if popErr := writeBuffer.PopContext("ModbusPDUWriteFileRecordResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for ModbusPDUWriteFileRecordResponse") @@ -246,6 +249,7 @@ func (m *_ModbusPDUWriteFileRecordResponse) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusPDUWriteFileRecordResponse) isModbusPDUWriteFileRecordResponse() bool { return true } @@ -260,3 +264,6 @@ func (m *_ModbusPDUWriteFileRecordResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteFileRecordResponseItem.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteFileRecordResponseItem.go index 2ba42a14204..5823adc7c61 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteFileRecordResponseItem.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteFileRecordResponseItem.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUWriteFileRecordResponseItem is the corresponding interface of ModbusPDUWriteFileRecordResponseItem type ModbusPDUWriteFileRecordResponseItem interface { @@ -50,12 +52,13 @@ type ModbusPDUWriteFileRecordResponseItemExactly interface { // _ModbusPDUWriteFileRecordResponseItem is the data-structure of this message type _ModbusPDUWriteFileRecordResponseItem struct { - ReferenceType uint8 - FileNumber uint16 - RecordNumber uint16 - RecordData []byte + ReferenceType uint8 + FileNumber uint16 + RecordNumber uint16 + RecordData []byte } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -82,14 +85,15 @@ func (m *_ModbusPDUWriteFileRecordResponseItem) GetRecordData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusPDUWriteFileRecordResponseItem factory function for _ModbusPDUWriteFileRecordResponseItem -func NewModbusPDUWriteFileRecordResponseItem(referenceType uint8, fileNumber uint16, recordNumber uint16, recordData []byte) *_ModbusPDUWriteFileRecordResponseItem { - return &_ModbusPDUWriteFileRecordResponseItem{ReferenceType: referenceType, FileNumber: fileNumber, RecordNumber: recordNumber, RecordData: recordData} +func NewModbusPDUWriteFileRecordResponseItem( referenceType uint8 , fileNumber uint16 , recordNumber uint16 , recordData []byte ) *_ModbusPDUWriteFileRecordResponseItem { +return &_ModbusPDUWriteFileRecordResponseItem{ ReferenceType: referenceType , FileNumber: fileNumber , RecordNumber: recordNumber , RecordData: recordData } } // Deprecated: use the interface for direct cast func CastModbusPDUWriteFileRecordResponseItem(structType interface{}) ModbusPDUWriteFileRecordResponseItem { - if casted, ok := structType.(ModbusPDUWriteFileRecordResponseItem); ok { + if casted, ok := structType.(ModbusPDUWriteFileRecordResponseItem); ok { return casted } if casted, ok := structType.(*ModbusPDUWriteFileRecordResponseItem); ok { @@ -106,13 +110,13 @@ func (m *_ModbusPDUWriteFileRecordResponseItem) GetLengthInBits(ctx context.Cont lengthInBits := uint16(0) // Simple field (referenceType) - lengthInBits += 8 + lengthInBits += 8; // Simple field (fileNumber) - lengthInBits += 16 + lengthInBits += 16; // Simple field (recordNumber) - lengthInBits += 16 + lengthInBits += 16; // Implicit Field (recordLength) lengthInBits += 16 @@ -125,6 +129,7 @@ func (m *_ModbusPDUWriteFileRecordResponseItem) GetLengthInBits(ctx context.Cont return lengthInBits } + func (m *_ModbusPDUWriteFileRecordResponseItem) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -143,21 +148,21 @@ func ModbusPDUWriteFileRecordResponseItemParseWithBuffer(ctx context.Context, re _ = currentPos // Simple Field (referenceType) - _referenceType, _referenceTypeErr := readBuffer.ReadUint8("referenceType", 8) +_referenceType, _referenceTypeErr := readBuffer.ReadUint8("referenceType", 8) if _referenceTypeErr != nil { return nil, errors.Wrap(_referenceTypeErr, "Error parsing 'referenceType' field of ModbusPDUWriteFileRecordResponseItem") } referenceType := _referenceType // Simple Field (fileNumber) - _fileNumber, _fileNumberErr := readBuffer.ReadUint16("fileNumber", 16) +_fileNumber, _fileNumberErr := readBuffer.ReadUint16("fileNumber", 16) if _fileNumberErr != nil { return nil, errors.Wrap(_fileNumberErr, "Error parsing 'fileNumber' field of ModbusPDUWriteFileRecordResponseItem") } fileNumber := _fileNumber // Simple Field (recordNumber) - _recordNumber, _recordNumberErr := readBuffer.ReadUint16("recordNumber", 16) +_recordNumber, _recordNumberErr := readBuffer.ReadUint16("recordNumber", 16) if _recordNumberErr != nil { return nil, errors.Wrap(_recordNumberErr, "Error parsing 'recordNumber' field of ModbusPDUWriteFileRecordResponseItem") } @@ -182,11 +187,11 @@ func ModbusPDUWriteFileRecordResponseItemParseWithBuffer(ctx context.Context, re // Create the instance return &_ModbusPDUWriteFileRecordResponseItem{ - ReferenceType: referenceType, - FileNumber: fileNumber, - RecordNumber: recordNumber, - RecordData: recordData, - }, nil + ReferenceType: referenceType, + FileNumber: fileNumber, + RecordNumber: recordNumber, + RecordData: recordData, + }, nil } func (m *_ModbusPDUWriteFileRecordResponseItem) Serialize() ([]byte, error) { @@ -200,7 +205,7 @@ func (m *_ModbusPDUWriteFileRecordResponseItem) Serialize() ([]byte, error) { func (m *_ModbusPDUWriteFileRecordResponseItem) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("ModbusPDUWriteFileRecordResponseItem"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("ModbusPDUWriteFileRecordResponseItem"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for ModbusPDUWriteFileRecordResponseItem") } @@ -244,6 +249,7 @@ func (m *_ModbusPDUWriteFileRecordResponseItem) SerializeWithWriteBuffer(ctx con return nil } + func (m *_ModbusPDUWriteFileRecordResponseItem) isModbusPDUWriteFileRecordResponseItem() bool { return true } @@ -258,3 +264,6 @@ func (m *_ModbusPDUWriteFileRecordResponseItem) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteMultipleCoilsRequest.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteMultipleCoilsRequest.go index 5252342a851..fe597e0e634 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteMultipleCoilsRequest.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteMultipleCoilsRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUWriteMultipleCoilsRequest is the corresponding interface of ModbusPDUWriteMultipleCoilsRequest type ModbusPDUWriteMultipleCoilsRequest interface { @@ -50,39 +52,37 @@ type ModbusPDUWriteMultipleCoilsRequestExactly interface { // _ModbusPDUWriteMultipleCoilsRequest is the data-structure of this message type _ModbusPDUWriteMultipleCoilsRequest struct { *_ModbusPDU - StartingAddress uint16 - Quantity uint16 - Value []byte + StartingAddress uint16 + Quantity uint16 + Value []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusPDUWriteMultipleCoilsRequest) GetErrorFlag() bool { - return bool(false) -} +func (m *_ModbusPDUWriteMultipleCoilsRequest) GetErrorFlag() bool { +return bool(false)} -func (m *_ModbusPDUWriteMultipleCoilsRequest) GetFunctionFlag() uint8 { - return 0x0F -} +func (m *_ModbusPDUWriteMultipleCoilsRequest) GetFunctionFlag() uint8 { +return 0x0F} -func (m *_ModbusPDUWriteMultipleCoilsRequest) GetResponse() bool { - return bool(false) -} +func (m *_ModbusPDUWriteMultipleCoilsRequest) GetResponse() bool { +return bool(false)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusPDUWriteMultipleCoilsRequest) InitializeParent(parent ModbusPDU) {} +func (m *_ModbusPDUWriteMultipleCoilsRequest) InitializeParent(parent ModbusPDU ) {} -func (m *_ModbusPDUWriteMultipleCoilsRequest) GetParent() ModbusPDU { +func (m *_ModbusPDUWriteMultipleCoilsRequest) GetParent() ModbusPDU { return m._ModbusPDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -105,13 +105,14 @@ func (m *_ModbusPDUWriteMultipleCoilsRequest) GetValue() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusPDUWriteMultipleCoilsRequest factory function for _ModbusPDUWriteMultipleCoilsRequest -func NewModbusPDUWriteMultipleCoilsRequest(startingAddress uint16, quantity uint16, value []byte) *_ModbusPDUWriteMultipleCoilsRequest { +func NewModbusPDUWriteMultipleCoilsRequest( startingAddress uint16 , quantity uint16 , value []byte ) *_ModbusPDUWriteMultipleCoilsRequest { _result := &_ModbusPDUWriteMultipleCoilsRequest{ StartingAddress: startingAddress, - Quantity: quantity, - Value: value, - _ModbusPDU: NewModbusPDU(), + Quantity: quantity, + Value: value, + _ModbusPDU: NewModbusPDU(), } _result._ModbusPDU._ModbusPDUChildRequirements = _result return _result @@ -119,7 +120,7 @@ func NewModbusPDUWriteMultipleCoilsRequest(startingAddress uint16, quantity uint // Deprecated: use the interface for direct cast func CastModbusPDUWriteMultipleCoilsRequest(structType interface{}) ModbusPDUWriteMultipleCoilsRequest { - if casted, ok := structType.(ModbusPDUWriteMultipleCoilsRequest); ok { + if casted, ok := structType.(ModbusPDUWriteMultipleCoilsRequest); ok { return casted } if casted, ok := structType.(*ModbusPDUWriteMultipleCoilsRequest); ok { @@ -136,10 +137,10 @@ func (m *_ModbusPDUWriteMultipleCoilsRequest) GetLengthInBits(ctx context.Contex lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (startingAddress) - lengthInBits += 16 + lengthInBits += 16; // Simple field (quantity) - lengthInBits += 16 + lengthInBits += 16; // Implicit Field (byteCount) lengthInBits += 8 @@ -152,6 +153,7 @@ func (m *_ModbusPDUWriteMultipleCoilsRequest) GetLengthInBits(ctx context.Contex return lengthInBits } + func (m *_ModbusPDUWriteMultipleCoilsRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -170,14 +172,14 @@ func ModbusPDUWriteMultipleCoilsRequestParseWithBuffer(ctx context.Context, read _ = currentPos // Simple Field (startingAddress) - _startingAddress, _startingAddressErr := readBuffer.ReadUint16("startingAddress", 16) +_startingAddress, _startingAddressErr := readBuffer.ReadUint16("startingAddress", 16) if _startingAddressErr != nil { return nil, errors.Wrap(_startingAddressErr, "Error parsing 'startingAddress' field of ModbusPDUWriteMultipleCoilsRequest") } startingAddress := _startingAddress // Simple Field (quantity) - _quantity, _quantityErr := readBuffer.ReadUint16("quantity", 16) +_quantity, _quantityErr := readBuffer.ReadUint16("quantity", 16) if _quantityErr != nil { return nil, errors.Wrap(_quantityErr, "Error parsing 'quantity' field of ModbusPDUWriteMultipleCoilsRequest") } @@ -202,10 +204,11 @@ func ModbusPDUWriteMultipleCoilsRequestParseWithBuffer(ctx context.Context, read // Create a partially initialized instance _child := &_ModbusPDUWriteMultipleCoilsRequest{ - _ModbusPDU: &_ModbusPDU{}, + _ModbusPDU: &_ModbusPDU{ + }, StartingAddress: startingAddress, - Quantity: quantity, - Value: value, + Quantity: quantity, + Value: value, } _child._ModbusPDU._ModbusPDUChildRequirements = _child return _child, nil @@ -227,32 +230,32 @@ func (m *_ModbusPDUWriteMultipleCoilsRequest) SerializeWithWriteBuffer(ctx conte return errors.Wrap(pushErr, "Error pushing for ModbusPDUWriteMultipleCoilsRequest") } - // Simple Field (startingAddress) - startingAddress := uint16(m.GetStartingAddress()) - _startingAddressErr := writeBuffer.WriteUint16("startingAddress", 16, (startingAddress)) - if _startingAddressErr != nil { - return errors.Wrap(_startingAddressErr, "Error serializing 'startingAddress' field") - } + // Simple Field (startingAddress) + startingAddress := uint16(m.GetStartingAddress()) + _startingAddressErr := writeBuffer.WriteUint16("startingAddress", 16, (startingAddress)) + if _startingAddressErr != nil { + return errors.Wrap(_startingAddressErr, "Error serializing 'startingAddress' field") + } - // Simple Field (quantity) - quantity := uint16(m.GetQuantity()) - _quantityErr := writeBuffer.WriteUint16("quantity", 16, (quantity)) - if _quantityErr != nil { - return errors.Wrap(_quantityErr, "Error serializing 'quantity' field") - } + // Simple Field (quantity) + quantity := uint16(m.GetQuantity()) + _quantityErr := writeBuffer.WriteUint16("quantity", 16, (quantity)) + if _quantityErr != nil { + return errors.Wrap(_quantityErr, "Error serializing 'quantity' field") + } - // Implicit Field (byteCount) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - byteCount := uint8(uint8(len(m.GetValue()))) - _byteCountErr := writeBuffer.WriteUint8("byteCount", 8, (byteCount)) - if _byteCountErr != nil { - return errors.Wrap(_byteCountErr, "Error serializing 'byteCount' field") - } + // Implicit Field (byteCount) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) + byteCount := uint8(uint8(len(m.GetValue()))) + _byteCountErr := writeBuffer.WriteUint8("byteCount", 8, (byteCount)) + if _byteCountErr != nil { + return errors.Wrap(_byteCountErr, "Error serializing 'byteCount' field") + } - // Array Field (value) - // Byte Array field (value) - if err := writeBuffer.WriteByteArray("value", m.GetValue()); err != nil { - return errors.Wrap(err, "Error serializing 'value' field") - } + // Array Field (value) + // Byte Array field (value) + if err := writeBuffer.WriteByteArray("value", m.GetValue()); err != nil { + return errors.Wrap(err, "Error serializing 'value' field") + } if popErr := writeBuffer.PopContext("ModbusPDUWriteMultipleCoilsRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for ModbusPDUWriteMultipleCoilsRequest") @@ -262,6 +265,7 @@ func (m *_ModbusPDUWriteMultipleCoilsRequest) SerializeWithWriteBuffer(ctx conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusPDUWriteMultipleCoilsRequest) isModbusPDUWriteMultipleCoilsRequest() bool { return true } @@ -276,3 +280,6 @@ func (m *_ModbusPDUWriteMultipleCoilsRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteMultipleCoilsResponse.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteMultipleCoilsResponse.go index aec43266bfa..d2e39919511 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteMultipleCoilsResponse.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteMultipleCoilsResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUWriteMultipleCoilsResponse is the corresponding interface of ModbusPDUWriteMultipleCoilsResponse type ModbusPDUWriteMultipleCoilsResponse interface { @@ -48,38 +50,36 @@ type ModbusPDUWriteMultipleCoilsResponseExactly interface { // _ModbusPDUWriteMultipleCoilsResponse is the data-structure of this message type _ModbusPDUWriteMultipleCoilsResponse struct { *_ModbusPDU - StartingAddress uint16 - Quantity uint16 + StartingAddress uint16 + Quantity uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusPDUWriteMultipleCoilsResponse) GetErrorFlag() bool { - return bool(false) -} +func (m *_ModbusPDUWriteMultipleCoilsResponse) GetErrorFlag() bool { +return bool(false)} -func (m *_ModbusPDUWriteMultipleCoilsResponse) GetFunctionFlag() uint8 { - return 0x0F -} +func (m *_ModbusPDUWriteMultipleCoilsResponse) GetFunctionFlag() uint8 { +return 0x0F} -func (m *_ModbusPDUWriteMultipleCoilsResponse) GetResponse() bool { - return bool(true) -} +func (m *_ModbusPDUWriteMultipleCoilsResponse) GetResponse() bool { +return bool(true)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusPDUWriteMultipleCoilsResponse) InitializeParent(parent ModbusPDU) {} +func (m *_ModbusPDUWriteMultipleCoilsResponse) InitializeParent(parent ModbusPDU ) {} -func (m *_ModbusPDUWriteMultipleCoilsResponse) GetParent() ModbusPDU { +func (m *_ModbusPDUWriteMultipleCoilsResponse) GetParent() ModbusPDU { return m._ModbusPDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,12 +98,13 @@ func (m *_ModbusPDUWriteMultipleCoilsResponse) GetQuantity() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusPDUWriteMultipleCoilsResponse factory function for _ModbusPDUWriteMultipleCoilsResponse -func NewModbusPDUWriteMultipleCoilsResponse(startingAddress uint16, quantity uint16) *_ModbusPDUWriteMultipleCoilsResponse { +func NewModbusPDUWriteMultipleCoilsResponse( startingAddress uint16 , quantity uint16 ) *_ModbusPDUWriteMultipleCoilsResponse { _result := &_ModbusPDUWriteMultipleCoilsResponse{ StartingAddress: startingAddress, - Quantity: quantity, - _ModbusPDU: NewModbusPDU(), + Quantity: quantity, + _ModbusPDU: NewModbusPDU(), } _result._ModbusPDU._ModbusPDUChildRequirements = _result return _result @@ -111,7 +112,7 @@ func NewModbusPDUWriteMultipleCoilsResponse(startingAddress uint16, quantity uin // Deprecated: use the interface for direct cast func CastModbusPDUWriteMultipleCoilsResponse(structType interface{}) ModbusPDUWriteMultipleCoilsResponse { - if casted, ok := structType.(ModbusPDUWriteMultipleCoilsResponse); ok { + if casted, ok := structType.(ModbusPDUWriteMultipleCoilsResponse); ok { return casted } if casted, ok := structType.(*ModbusPDUWriteMultipleCoilsResponse); ok { @@ -128,14 +129,15 @@ func (m *_ModbusPDUWriteMultipleCoilsResponse) GetLengthInBits(ctx context.Conte lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (startingAddress) - lengthInBits += 16 + lengthInBits += 16; // Simple field (quantity) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_ModbusPDUWriteMultipleCoilsResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,14 +156,14 @@ func ModbusPDUWriteMultipleCoilsResponseParseWithBuffer(ctx context.Context, rea _ = currentPos // Simple Field (startingAddress) - _startingAddress, _startingAddressErr := readBuffer.ReadUint16("startingAddress", 16) +_startingAddress, _startingAddressErr := readBuffer.ReadUint16("startingAddress", 16) if _startingAddressErr != nil { return nil, errors.Wrap(_startingAddressErr, "Error parsing 'startingAddress' field of ModbusPDUWriteMultipleCoilsResponse") } startingAddress := _startingAddress // Simple Field (quantity) - _quantity, _quantityErr := readBuffer.ReadUint16("quantity", 16) +_quantity, _quantityErr := readBuffer.ReadUint16("quantity", 16) if _quantityErr != nil { return nil, errors.Wrap(_quantityErr, "Error parsing 'quantity' field of ModbusPDUWriteMultipleCoilsResponse") } @@ -173,9 +175,10 @@ func ModbusPDUWriteMultipleCoilsResponseParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_ModbusPDUWriteMultipleCoilsResponse{ - _ModbusPDU: &_ModbusPDU{}, + _ModbusPDU: &_ModbusPDU{ + }, StartingAddress: startingAddress, - Quantity: quantity, + Quantity: quantity, } _child._ModbusPDU._ModbusPDUChildRequirements = _child return _child, nil @@ -197,19 +200,19 @@ func (m *_ModbusPDUWriteMultipleCoilsResponse) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for ModbusPDUWriteMultipleCoilsResponse") } - // Simple Field (startingAddress) - startingAddress := uint16(m.GetStartingAddress()) - _startingAddressErr := writeBuffer.WriteUint16("startingAddress", 16, (startingAddress)) - if _startingAddressErr != nil { - return errors.Wrap(_startingAddressErr, "Error serializing 'startingAddress' field") - } + // Simple Field (startingAddress) + startingAddress := uint16(m.GetStartingAddress()) + _startingAddressErr := writeBuffer.WriteUint16("startingAddress", 16, (startingAddress)) + if _startingAddressErr != nil { + return errors.Wrap(_startingAddressErr, "Error serializing 'startingAddress' field") + } - // Simple Field (quantity) - quantity := uint16(m.GetQuantity()) - _quantityErr := writeBuffer.WriteUint16("quantity", 16, (quantity)) - if _quantityErr != nil { - return errors.Wrap(_quantityErr, "Error serializing 'quantity' field") - } + // Simple Field (quantity) + quantity := uint16(m.GetQuantity()) + _quantityErr := writeBuffer.WriteUint16("quantity", 16, (quantity)) + if _quantityErr != nil { + return errors.Wrap(_quantityErr, "Error serializing 'quantity' field") + } if popErr := writeBuffer.PopContext("ModbusPDUWriteMultipleCoilsResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for ModbusPDUWriteMultipleCoilsResponse") @@ -219,6 +222,7 @@ func (m *_ModbusPDUWriteMultipleCoilsResponse) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusPDUWriteMultipleCoilsResponse) isModbusPDUWriteMultipleCoilsResponse() bool { return true } @@ -233,3 +237,6 @@ func (m *_ModbusPDUWriteMultipleCoilsResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteMultipleHoldingRegistersRequest.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteMultipleHoldingRegistersRequest.go index 8b257edceec..61ce16a6f22 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteMultipleHoldingRegistersRequest.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteMultipleHoldingRegistersRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUWriteMultipleHoldingRegistersRequest is the corresponding interface of ModbusPDUWriteMultipleHoldingRegistersRequest type ModbusPDUWriteMultipleHoldingRegistersRequest interface { @@ -50,39 +52,37 @@ type ModbusPDUWriteMultipleHoldingRegistersRequestExactly interface { // _ModbusPDUWriteMultipleHoldingRegistersRequest is the data-structure of this message type _ModbusPDUWriteMultipleHoldingRegistersRequest struct { *_ModbusPDU - StartingAddress uint16 - Quantity uint16 - Value []byte + StartingAddress uint16 + Quantity uint16 + Value []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusPDUWriteMultipleHoldingRegistersRequest) GetErrorFlag() bool { - return bool(false) -} +func (m *_ModbusPDUWriteMultipleHoldingRegistersRequest) GetErrorFlag() bool { +return bool(false)} -func (m *_ModbusPDUWriteMultipleHoldingRegistersRequest) GetFunctionFlag() uint8 { - return 0x10 -} +func (m *_ModbusPDUWriteMultipleHoldingRegistersRequest) GetFunctionFlag() uint8 { +return 0x10} -func (m *_ModbusPDUWriteMultipleHoldingRegistersRequest) GetResponse() bool { - return bool(false) -} +func (m *_ModbusPDUWriteMultipleHoldingRegistersRequest) GetResponse() bool { +return bool(false)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusPDUWriteMultipleHoldingRegistersRequest) InitializeParent(parent ModbusPDU) {} +func (m *_ModbusPDUWriteMultipleHoldingRegistersRequest) InitializeParent(parent ModbusPDU ) {} -func (m *_ModbusPDUWriteMultipleHoldingRegistersRequest) GetParent() ModbusPDU { +func (m *_ModbusPDUWriteMultipleHoldingRegistersRequest) GetParent() ModbusPDU { return m._ModbusPDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -105,13 +105,14 @@ func (m *_ModbusPDUWriteMultipleHoldingRegistersRequest) GetValue() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusPDUWriteMultipleHoldingRegistersRequest factory function for _ModbusPDUWriteMultipleHoldingRegistersRequest -func NewModbusPDUWriteMultipleHoldingRegistersRequest(startingAddress uint16, quantity uint16, value []byte) *_ModbusPDUWriteMultipleHoldingRegistersRequest { +func NewModbusPDUWriteMultipleHoldingRegistersRequest( startingAddress uint16 , quantity uint16 , value []byte ) *_ModbusPDUWriteMultipleHoldingRegistersRequest { _result := &_ModbusPDUWriteMultipleHoldingRegistersRequest{ StartingAddress: startingAddress, - Quantity: quantity, - Value: value, - _ModbusPDU: NewModbusPDU(), + Quantity: quantity, + Value: value, + _ModbusPDU: NewModbusPDU(), } _result._ModbusPDU._ModbusPDUChildRequirements = _result return _result @@ -119,7 +120,7 @@ func NewModbusPDUWriteMultipleHoldingRegistersRequest(startingAddress uint16, qu // Deprecated: use the interface for direct cast func CastModbusPDUWriteMultipleHoldingRegistersRequest(structType interface{}) ModbusPDUWriteMultipleHoldingRegistersRequest { - if casted, ok := structType.(ModbusPDUWriteMultipleHoldingRegistersRequest); ok { + if casted, ok := structType.(ModbusPDUWriteMultipleHoldingRegistersRequest); ok { return casted } if casted, ok := structType.(*ModbusPDUWriteMultipleHoldingRegistersRequest); ok { @@ -136,10 +137,10 @@ func (m *_ModbusPDUWriteMultipleHoldingRegistersRequest) GetLengthInBits(ctx con lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (startingAddress) - lengthInBits += 16 + lengthInBits += 16; // Simple field (quantity) - lengthInBits += 16 + lengthInBits += 16; // Implicit Field (byteCount) lengthInBits += 8 @@ -152,6 +153,7 @@ func (m *_ModbusPDUWriteMultipleHoldingRegistersRequest) GetLengthInBits(ctx con return lengthInBits } + func (m *_ModbusPDUWriteMultipleHoldingRegistersRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -170,14 +172,14 @@ func ModbusPDUWriteMultipleHoldingRegistersRequestParseWithBuffer(ctx context.Co _ = currentPos // Simple Field (startingAddress) - _startingAddress, _startingAddressErr := readBuffer.ReadUint16("startingAddress", 16) +_startingAddress, _startingAddressErr := readBuffer.ReadUint16("startingAddress", 16) if _startingAddressErr != nil { return nil, errors.Wrap(_startingAddressErr, "Error parsing 'startingAddress' field of ModbusPDUWriteMultipleHoldingRegistersRequest") } startingAddress := _startingAddress // Simple Field (quantity) - _quantity, _quantityErr := readBuffer.ReadUint16("quantity", 16) +_quantity, _quantityErr := readBuffer.ReadUint16("quantity", 16) if _quantityErr != nil { return nil, errors.Wrap(_quantityErr, "Error parsing 'quantity' field of ModbusPDUWriteMultipleHoldingRegistersRequest") } @@ -202,10 +204,11 @@ func ModbusPDUWriteMultipleHoldingRegistersRequestParseWithBuffer(ctx context.Co // Create a partially initialized instance _child := &_ModbusPDUWriteMultipleHoldingRegistersRequest{ - _ModbusPDU: &_ModbusPDU{}, + _ModbusPDU: &_ModbusPDU{ + }, StartingAddress: startingAddress, - Quantity: quantity, - Value: value, + Quantity: quantity, + Value: value, } _child._ModbusPDU._ModbusPDUChildRequirements = _child return _child, nil @@ -227,32 +230,32 @@ func (m *_ModbusPDUWriteMultipleHoldingRegistersRequest) SerializeWithWriteBuffe return errors.Wrap(pushErr, "Error pushing for ModbusPDUWriteMultipleHoldingRegistersRequest") } - // Simple Field (startingAddress) - startingAddress := uint16(m.GetStartingAddress()) - _startingAddressErr := writeBuffer.WriteUint16("startingAddress", 16, (startingAddress)) - if _startingAddressErr != nil { - return errors.Wrap(_startingAddressErr, "Error serializing 'startingAddress' field") - } + // Simple Field (startingAddress) + startingAddress := uint16(m.GetStartingAddress()) + _startingAddressErr := writeBuffer.WriteUint16("startingAddress", 16, (startingAddress)) + if _startingAddressErr != nil { + return errors.Wrap(_startingAddressErr, "Error serializing 'startingAddress' field") + } - // Simple Field (quantity) - quantity := uint16(m.GetQuantity()) - _quantityErr := writeBuffer.WriteUint16("quantity", 16, (quantity)) - if _quantityErr != nil { - return errors.Wrap(_quantityErr, "Error serializing 'quantity' field") - } + // Simple Field (quantity) + quantity := uint16(m.GetQuantity()) + _quantityErr := writeBuffer.WriteUint16("quantity", 16, (quantity)) + if _quantityErr != nil { + return errors.Wrap(_quantityErr, "Error serializing 'quantity' field") + } - // Implicit Field (byteCount) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - byteCount := uint8(uint8(len(m.GetValue()))) - _byteCountErr := writeBuffer.WriteUint8("byteCount", 8, (byteCount)) - if _byteCountErr != nil { - return errors.Wrap(_byteCountErr, "Error serializing 'byteCount' field") - } + // Implicit Field (byteCount) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) + byteCount := uint8(uint8(len(m.GetValue()))) + _byteCountErr := writeBuffer.WriteUint8("byteCount", 8, (byteCount)) + if _byteCountErr != nil { + return errors.Wrap(_byteCountErr, "Error serializing 'byteCount' field") + } - // Array Field (value) - // Byte Array field (value) - if err := writeBuffer.WriteByteArray("value", m.GetValue()); err != nil { - return errors.Wrap(err, "Error serializing 'value' field") - } + // Array Field (value) + // Byte Array field (value) + if err := writeBuffer.WriteByteArray("value", m.GetValue()); err != nil { + return errors.Wrap(err, "Error serializing 'value' field") + } if popErr := writeBuffer.PopContext("ModbusPDUWriteMultipleHoldingRegistersRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for ModbusPDUWriteMultipleHoldingRegistersRequest") @@ -262,6 +265,7 @@ func (m *_ModbusPDUWriteMultipleHoldingRegistersRequest) SerializeWithWriteBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusPDUWriteMultipleHoldingRegistersRequest) isModbusPDUWriteMultipleHoldingRegistersRequest() bool { return true } @@ -276,3 +280,6 @@ func (m *_ModbusPDUWriteMultipleHoldingRegistersRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteMultipleHoldingRegistersResponse.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteMultipleHoldingRegistersResponse.go index 9fbc255b8d9..846223e4494 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteMultipleHoldingRegistersResponse.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteMultipleHoldingRegistersResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUWriteMultipleHoldingRegistersResponse is the corresponding interface of ModbusPDUWriteMultipleHoldingRegistersResponse type ModbusPDUWriteMultipleHoldingRegistersResponse interface { @@ -48,38 +50,36 @@ type ModbusPDUWriteMultipleHoldingRegistersResponseExactly interface { // _ModbusPDUWriteMultipleHoldingRegistersResponse is the data-structure of this message type _ModbusPDUWriteMultipleHoldingRegistersResponse struct { *_ModbusPDU - StartingAddress uint16 - Quantity uint16 + StartingAddress uint16 + Quantity uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusPDUWriteMultipleHoldingRegistersResponse) GetErrorFlag() bool { - return bool(false) -} +func (m *_ModbusPDUWriteMultipleHoldingRegistersResponse) GetErrorFlag() bool { +return bool(false)} -func (m *_ModbusPDUWriteMultipleHoldingRegistersResponse) GetFunctionFlag() uint8 { - return 0x10 -} +func (m *_ModbusPDUWriteMultipleHoldingRegistersResponse) GetFunctionFlag() uint8 { +return 0x10} -func (m *_ModbusPDUWriteMultipleHoldingRegistersResponse) GetResponse() bool { - return bool(true) -} +func (m *_ModbusPDUWriteMultipleHoldingRegistersResponse) GetResponse() bool { +return bool(true)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusPDUWriteMultipleHoldingRegistersResponse) InitializeParent(parent ModbusPDU) {} +func (m *_ModbusPDUWriteMultipleHoldingRegistersResponse) InitializeParent(parent ModbusPDU ) {} -func (m *_ModbusPDUWriteMultipleHoldingRegistersResponse) GetParent() ModbusPDU { +func (m *_ModbusPDUWriteMultipleHoldingRegistersResponse) GetParent() ModbusPDU { return m._ModbusPDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,12 +98,13 @@ func (m *_ModbusPDUWriteMultipleHoldingRegistersResponse) GetQuantity() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusPDUWriteMultipleHoldingRegistersResponse factory function for _ModbusPDUWriteMultipleHoldingRegistersResponse -func NewModbusPDUWriteMultipleHoldingRegistersResponse(startingAddress uint16, quantity uint16) *_ModbusPDUWriteMultipleHoldingRegistersResponse { +func NewModbusPDUWriteMultipleHoldingRegistersResponse( startingAddress uint16 , quantity uint16 ) *_ModbusPDUWriteMultipleHoldingRegistersResponse { _result := &_ModbusPDUWriteMultipleHoldingRegistersResponse{ StartingAddress: startingAddress, - Quantity: quantity, - _ModbusPDU: NewModbusPDU(), + Quantity: quantity, + _ModbusPDU: NewModbusPDU(), } _result._ModbusPDU._ModbusPDUChildRequirements = _result return _result @@ -111,7 +112,7 @@ func NewModbusPDUWriteMultipleHoldingRegistersResponse(startingAddress uint16, q // Deprecated: use the interface for direct cast func CastModbusPDUWriteMultipleHoldingRegistersResponse(structType interface{}) ModbusPDUWriteMultipleHoldingRegistersResponse { - if casted, ok := structType.(ModbusPDUWriteMultipleHoldingRegistersResponse); ok { + if casted, ok := structType.(ModbusPDUWriteMultipleHoldingRegistersResponse); ok { return casted } if casted, ok := structType.(*ModbusPDUWriteMultipleHoldingRegistersResponse); ok { @@ -128,14 +129,15 @@ func (m *_ModbusPDUWriteMultipleHoldingRegistersResponse) GetLengthInBits(ctx co lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (startingAddress) - lengthInBits += 16 + lengthInBits += 16; // Simple field (quantity) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_ModbusPDUWriteMultipleHoldingRegistersResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,14 +156,14 @@ func ModbusPDUWriteMultipleHoldingRegistersResponseParseWithBuffer(ctx context.C _ = currentPos // Simple Field (startingAddress) - _startingAddress, _startingAddressErr := readBuffer.ReadUint16("startingAddress", 16) +_startingAddress, _startingAddressErr := readBuffer.ReadUint16("startingAddress", 16) if _startingAddressErr != nil { return nil, errors.Wrap(_startingAddressErr, "Error parsing 'startingAddress' field of ModbusPDUWriteMultipleHoldingRegistersResponse") } startingAddress := _startingAddress // Simple Field (quantity) - _quantity, _quantityErr := readBuffer.ReadUint16("quantity", 16) +_quantity, _quantityErr := readBuffer.ReadUint16("quantity", 16) if _quantityErr != nil { return nil, errors.Wrap(_quantityErr, "Error parsing 'quantity' field of ModbusPDUWriteMultipleHoldingRegistersResponse") } @@ -173,9 +175,10 @@ func ModbusPDUWriteMultipleHoldingRegistersResponseParseWithBuffer(ctx context.C // Create a partially initialized instance _child := &_ModbusPDUWriteMultipleHoldingRegistersResponse{ - _ModbusPDU: &_ModbusPDU{}, + _ModbusPDU: &_ModbusPDU{ + }, StartingAddress: startingAddress, - Quantity: quantity, + Quantity: quantity, } _child._ModbusPDU._ModbusPDUChildRequirements = _child return _child, nil @@ -197,19 +200,19 @@ func (m *_ModbusPDUWriteMultipleHoldingRegistersResponse) SerializeWithWriteBuff return errors.Wrap(pushErr, "Error pushing for ModbusPDUWriteMultipleHoldingRegistersResponse") } - // Simple Field (startingAddress) - startingAddress := uint16(m.GetStartingAddress()) - _startingAddressErr := writeBuffer.WriteUint16("startingAddress", 16, (startingAddress)) - if _startingAddressErr != nil { - return errors.Wrap(_startingAddressErr, "Error serializing 'startingAddress' field") - } + // Simple Field (startingAddress) + startingAddress := uint16(m.GetStartingAddress()) + _startingAddressErr := writeBuffer.WriteUint16("startingAddress", 16, (startingAddress)) + if _startingAddressErr != nil { + return errors.Wrap(_startingAddressErr, "Error serializing 'startingAddress' field") + } - // Simple Field (quantity) - quantity := uint16(m.GetQuantity()) - _quantityErr := writeBuffer.WriteUint16("quantity", 16, (quantity)) - if _quantityErr != nil { - return errors.Wrap(_quantityErr, "Error serializing 'quantity' field") - } + // Simple Field (quantity) + quantity := uint16(m.GetQuantity()) + _quantityErr := writeBuffer.WriteUint16("quantity", 16, (quantity)) + if _quantityErr != nil { + return errors.Wrap(_quantityErr, "Error serializing 'quantity' field") + } if popErr := writeBuffer.PopContext("ModbusPDUWriteMultipleHoldingRegistersResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for ModbusPDUWriteMultipleHoldingRegistersResponse") @@ -219,6 +222,7 @@ func (m *_ModbusPDUWriteMultipleHoldingRegistersResponse) SerializeWithWriteBuff return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusPDUWriteMultipleHoldingRegistersResponse) isModbusPDUWriteMultipleHoldingRegistersResponse() bool { return true } @@ -233,3 +237,6 @@ func (m *_ModbusPDUWriteMultipleHoldingRegistersResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteSingleCoilRequest.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteSingleCoilRequest.go index 11f4ec9b99b..adf6cf52a99 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteSingleCoilRequest.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteSingleCoilRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUWriteSingleCoilRequest is the corresponding interface of ModbusPDUWriteSingleCoilRequest type ModbusPDUWriteSingleCoilRequest interface { @@ -48,38 +50,36 @@ type ModbusPDUWriteSingleCoilRequestExactly interface { // _ModbusPDUWriteSingleCoilRequest is the data-structure of this message type _ModbusPDUWriteSingleCoilRequest struct { *_ModbusPDU - Address uint16 - Value uint16 + Address uint16 + Value uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusPDUWriteSingleCoilRequest) GetErrorFlag() bool { - return bool(false) -} +func (m *_ModbusPDUWriteSingleCoilRequest) GetErrorFlag() bool { +return bool(false)} -func (m *_ModbusPDUWriteSingleCoilRequest) GetFunctionFlag() uint8 { - return 0x05 -} +func (m *_ModbusPDUWriteSingleCoilRequest) GetFunctionFlag() uint8 { +return 0x05} -func (m *_ModbusPDUWriteSingleCoilRequest) GetResponse() bool { - return bool(false) -} +func (m *_ModbusPDUWriteSingleCoilRequest) GetResponse() bool { +return bool(false)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusPDUWriteSingleCoilRequest) InitializeParent(parent ModbusPDU) {} +func (m *_ModbusPDUWriteSingleCoilRequest) InitializeParent(parent ModbusPDU ) {} -func (m *_ModbusPDUWriteSingleCoilRequest) GetParent() ModbusPDU { +func (m *_ModbusPDUWriteSingleCoilRequest) GetParent() ModbusPDU { return m._ModbusPDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,12 +98,13 @@ func (m *_ModbusPDUWriteSingleCoilRequest) GetValue() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusPDUWriteSingleCoilRequest factory function for _ModbusPDUWriteSingleCoilRequest -func NewModbusPDUWriteSingleCoilRequest(address uint16, value uint16) *_ModbusPDUWriteSingleCoilRequest { +func NewModbusPDUWriteSingleCoilRequest( address uint16 , value uint16 ) *_ModbusPDUWriteSingleCoilRequest { _result := &_ModbusPDUWriteSingleCoilRequest{ - Address: address, - Value: value, - _ModbusPDU: NewModbusPDU(), + Address: address, + Value: value, + _ModbusPDU: NewModbusPDU(), } _result._ModbusPDU._ModbusPDUChildRequirements = _result return _result @@ -111,7 +112,7 @@ func NewModbusPDUWriteSingleCoilRequest(address uint16, value uint16) *_ModbusPD // Deprecated: use the interface for direct cast func CastModbusPDUWriteSingleCoilRequest(structType interface{}) ModbusPDUWriteSingleCoilRequest { - if casted, ok := structType.(ModbusPDUWriteSingleCoilRequest); ok { + if casted, ok := structType.(ModbusPDUWriteSingleCoilRequest); ok { return casted } if casted, ok := structType.(*ModbusPDUWriteSingleCoilRequest); ok { @@ -128,14 +129,15 @@ func (m *_ModbusPDUWriteSingleCoilRequest) GetLengthInBits(ctx context.Context) lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (address) - lengthInBits += 16 + lengthInBits += 16; // Simple field (value) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_ModbusPDUWriteSingleCoilRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,14 +156,14 @@ func ModbusPDUWriteSingleCoilRequestParseWithBuffer(ctx context.Context, readBuf _ = currentPos // Simple Field (address) - _address, _addressErr := readBuffer.ReadUint16("address", 16) +_address, _addressErr := readBuffer.ReadUint16("address", 16) if _addressErr != nil { return nil, errors.Wrap(_addressErr, "Error parsing 'address' field of ModbusPDUWriteSingleCoilRequest") } address := _address // Simple Field (value) - _value, _valueErr := readBuffer.ReadUint16("value", 16) +_value, _valueErr := readBuffer.ReadUint16("value", 16) if _valueErr != nil { return nil, errors.Wrap(_valueErr, "Error parsing 'value' field of ModbusPDUWriteSingleCoilRequest") } @@ -173,9 +175,10 @@ func ModbusPDUWriteSingleCoilRequestParseWithBuffer(ctx context.Context, readBuf // Create a partially initialized instance _child := &_ModbusPDUWriteSingleCoilRequest{ - _ModbusPDU: &_ModbusPDU{}, - Address: address, - Value: value, + _ModbusPDU: &_ModbusPDU{ + }, + Address: address, + Value: value, } _child._ModbusPDU._ModbusPDUChildRequirements = _child return _child, nil @@ -197,19 +200,19 @@ func (m *_ModbusPDUWriteSingleCoilRequest) SerializeWithWriteBuffer(ctx context. return errors.Wrap(pushErr, "Error pushing for ModbusPDUWriteSingleCoilRequest") } - // Simple Field (address) - address := uint16(m.GetAddress()) - _addressErr := writeBuffer.WriteUint16("address", 16, (address)) - if _addressErr != nil { - return errors.Wrap(_addressErr, "Error serializing 'address' field") - } + // Simple Field (address) + address := uint16(m.GetAddress()) + _addressErr := writeBuffer.WriteUint16("address", 16, (address)) + if _addressErr != nil { + return errors.Wrap(_addressErr, "Error serializing 'address' field") + } - // Simple Field (value) - value := uint16(m.GetValue()) - _valueErr := writeBuffer.WriteUint16("value", 16, (value)) - if _valueErr != nil { - return errors.Wrap(_valueErr, "Error serializing 'value' field") - } + // Simple Field (value) + value := uint16(m.GetValue()) + _valueErr := writeBuffer.WriteUint16("value", 16, (value)) + if _valueErr != nil { + return errors.Wrap(_valueErr, "Error serializing 'value' field") + } if popErr := writeBuffer.PopContext("ModbusPDUWriteSingleCoilRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for ModbusPDUWriteSingleCoilRequest") @@ -219,6 +222,7 @@ func (m *_ModbusPDUWriteSingleCoilRequest) SerializeWithWriteBuffer(ctx context. return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusPDUWriteSingleCoilRequest) isModbusPDUWriteSingleCoilRequest() bool { return true } @@ -233,3 +237,6 @@ func (m *_ModbusPDUWriteSingleCoilRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteSingleCoilResponse.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteSingleCoilResponse.go index 4998896d495..5caeb08a643 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteSingleCoilResponse.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteSingleCoilResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUWriteSingleCoilResponse is the corresponding interface of ModbusPDUWriteSingleCoilResponse type ModbusPDUWriteSingleCoilResponse interface { @@ -48,38 +50,36 @@ type ModbusPDUWriteSingleCoilResponseExactly interface { // _ModbusPDUWriteSingleCoilResponse is the data-structure of this message type _ModbusPDUWriteSingleCoilResponse struct { *_ModbusPDU - Address uint16 - Value uint16 + Address uint16 + Value uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusPDUWriteSingleCoilResponse) GetErrorFlag() bool { - return bool(false) -} +func (m *_ModbusPDUWriteSingleCoilResponse) GetErrorFlag() bool { +return bool(false)} -func (m *_ModbusPDUWriteSingleCoilResponse) GetFunctionFlag() uint8 { - return 0x05 -} +func (m *_ModbusPDUWriteSingleCoilResponse) GetFunctionFlag() uint8 { +return 0x05} -func (m *_ModbusPDUWriteSingleCoilResponse) GetResponse() bool { - return bool(true) -} +func (m *_ModbusPDUWriteSingleCoilResponse) GetResponse() bool { +return bool(true)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusPDUWriteSingleCoilResponse) InitializeParent(parent ModbusPDU) {} +func (m *_ModbusPDUWriteSingleCoilResponse) InitializeParent(parent ModbusPDU ) {} -func (m *_ModbusPDUWriteSingleCoilResponse) GetParent() ModbusPDU { +func (m *_ModbusPDUWriteSingleCoilResponse) GetParent() ModbusPDU { return m._ModbusPDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,12 +98,13 @@ func (m *_ModbusPDUWriteSingleCoilResponse) GetValue() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusPDUWriteSingleCoilResponse factory function for _ModbusPDUWriteSingleCoilResponse -func NewModbusPDUWriteSingleCoilResponse(address uint16, value uint16) *_ModbusPDUWriteSingleCoilResponse { +func NewModbusPDUWriteSingleCoilResponse( address uint16 , value uint16 ) *_ModbusPDUWriteSingleCoilResponse { _result := &_ModbusPDUWriteSingleCoilResponse{ - Address: address, - Value: value, - _ModbusPDU: NewModbusPDU(), + Address: address, + Value: value, + _ModbusPDU: NewModbusPDU(), } _result._ModbusPDU._ModbusPDUChildRequirements = _result return _result @@ -111,7 +112,7 @@ func NewModbusPDUWriteSingleCoilResponse(address uint16, value uint16) *_ModbusP // Deprecated: use the interface for direct cast func CastModbusPDUWriteSingleCoilResponse(structType interface{}) ModbusPDUWriteSingleCoilResponse { - if casted, ok := structType.(ModbusPDUWriteSingleCoilResponse); ok { + if casted, ok := structType.(ModbusPDUWriteSingleCoilResponse); ok { return casted } if casted, ok := structType.(*ModbusPDUWriteSingleCoilResponse); ok { @@ -128,14 +129,15 @@ func (m *_ModbusPDUWriteSingleCoilResponse) GetLengthInBits(ctx context.Context) lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (address) - lengthInBits += 16 + lengthInBits += 16; // Simple field (value) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_ModbusPDUWriteSingleCoilResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,14 +156,14 @@ func ModbusPDUWriteSingleCoilResponseParseWithBuffer(ctx context.Context, readBu _ = currentPos // Simple Field (address) - _address, _addressErr := readBuffer.ReadUint16("address", 16) +_address, _addressErr := readBuffer.ReadUint16("address", 16) if _addressErr != nil { return nil, errors.Wrap(_addressErr, "Error parsing 'address' field of ModbusPDUWriteSingleCoilResponse") } address := _address // Simple Field (value) - _value, _valueErr := readBuffer.ReadUint16("value", 16) +_value, _valueErr := readBuffer.ReadUint16("value", 16) if _valueErr != nil { return nil, errors.Wrap(_valueErr, "Error parsing 'value' field of ModbusPDUWriteSingleCoilResponse") } @@ -173,9 +175,10 @@ func ModbusPDUWriteSingleCoilResponseParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_ModbusPDUWriteSingleCoilResponse{ - _ModbusPDU: &_ModbusPDU{}, - Address: address, - Value: value, + _ModbusPDU: &_ModbusPDU{ + }, + Address: address, + Value: value, } _child._ModbusPDU._ModbusPDUChildRequirements = _child return _child, nil @@ -197,19 +200,19 @@ func (m *_ModbusPDUWriteSingleCoilResponse) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for ModbusPDUWriteSingleCoilResponse") } - // Simple Field (address) - address := uint16(m.GetAddress()) - _addressErr := writeBuffer.WriteUint16("address", 16, (address)) - if _addressErr != nil { - return errors.Wrap(_addressErr, "Error serializing 'address' field") - } + // Simple Field (address) + address := uint16(m.GetAddress()) + _addressErr := writeBuffer.WriteUint16("address", 16, (address)) + if _addressErr != nil { + return errors.Wrap(_addressErr, "Error serializing 'address' field") + } - // Simple Field (value) - value := uint16(m.GetValue()) - _valueErr := writeBuffer.WriteUint16("value", 16, (value)) - if _valueErr != nil { - return errors.Wrap(_valueErr, "Error serializing 'value' field") - } + // Simple Field (value) + value := uint16(m.GetValue()) + _valueErr := writeBuffer.WriteUint16("value", 16, (value)) + if _valueErr != nil { + return errors.Wrap(_valueErr, "Error serializing 'value' field") + } if popErr := writeBuffer.PopContext("ModbusPDUWriteSingleCoilResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for ModbusPDUWriteSingleCoilResponse") @@ -219,6 +222,7 @@ func (m *_ModbusPDUWriteSingleCoilResponse) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusPDUWriteSingleCoilResponse) isModbusPDUWriteSingleCoilResponse() bool { return true } @@ -233,3 +237,6 @@ func (m *_ModbusPDUWriteSingleCoilResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteSingleRegisterRequest.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteSingleRegisterRequest.go index b0031a8c3e2..1ab6d7d5416 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteSingleRegisterRequest.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteSingleRegisterRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUWriteSingleRegisterRequest is the corresponding interface of ModbusPDUWriteSingleRegisterRequest type ModbusPDUWriteSingleRegisterRequest interface { @@ -48,38 +50,36 @@ type ModbusPDUWriteSingleRegisterRequestExactly interface { // _ModbusPDUWriteSingleRegisterRequest is the data-structure of this message type _ModbusPDUWriteSingleRegisterRequest struct { *_ModbusPDU - Address uint16 - Value uint16 + Address uint16 + Value uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusPDUWriteSingleRegisterRequest) GetErrorFlag() bool { - return bool(false) -} +func (m *_ModbusPDUWriteSingleRegisterRequest) GetErrorFlag() bool { +return bool(false)} -func (m *_ModbusPDUWriteSingleRegisterRequest) GetFunctionFlag() uint8 { - return 0x06 -} +func (m *_ModbusPDUWriteSingleRegisterRequest) GetFunctionFlag() uint8 { +return 0x06} -func (m *_ModbusPDUWriteSingleRegisterRequest) GetResponse() bool { - return bool(false) -} +func (m *_ModbusPDUWriteSingleRegisterRequest) GetResponse() bool { +return bool(false)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusPDUWriteSingleRegisterRequest) InitializeParent(parent ModbusPDU) {} +func (m *_ModbusPDUWriteSingleRegisterRequest) InitializeParent(parent ModbusPDU ) {} -func (m *_ModbusPDUWriteSingleRegisterRequest) GetParent() ModbusPDU { +func (m *_ModbusPDUWriteSingleRegisterRequest) GetParent() ModbusPDU { return m._ModbusPDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,12 +98,13 @@ func (m *_ModbusPDUWriteSingleRegisterRequest) GetValue() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusPDUWriteSingleRegisterRequest factory function for _ModbusPDUWriteSingleRegisterRequest -func NewModbusPDUWriteSingleRegisterRequest(address uint16, value uint16) *_ModbusPDUWriteSingleRegisterRequest { +func NewModbusPDUWriteSingleRegisterRequest( address uint16 , value uint16 ) *_ModbusPDUWriteSingleRegisterRequest { _result := &_ModbusPDUWriteSingleRegisterRequest{ - Address: address, - Value: value, - _ModbusPDU: NewModbusPDU(), + Address: address, + Value: value, + _ModbusPDU: NewModbusPDU(), } _result._ModbusPDU._ModbusPDUChildRequirements = _result return _result @@ -111,7 +112,7 @@ func NewModbusPDUWriteSingleRegisterRequest(address uint16, value uint16) *_Modb // Deprecated: use the interface for direct cast func CastModbusPDUWriteSingleRegisterRequest(structType interface{}) ModbusPDUWriteSingleRegisterRequest { - if casted, ok := structType.(ModbusPDUWriteSingleRegisterRequest); ok { + if casted, ok := structType.(ModbusPDUWriteSingleRegisterRequest); ok { return casted } if casted, ok := structType.(*ModbusPDUWriteSingleRegisterRequest); ok { @@ -128,14 +129,15 @@ func (m *_ModbusPDUWriteSingleRegisterRequest) GetLengthInBits(ctx context.Conte lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (address) - lengthInBits += 16 + lengthInBits += 16; // Simple field (value) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_ModbusPDUWriteSingleRegisterRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,14 +156,14 @@ func ModbusPDUWriteSingleRegisterRequestParseWithBuffer(ctx context.Context, rea _ = currentPos // Simple Field (address) - _address, _addressErr := readBuffer.ReadUint16("address", 16) +_address, _addressErr := readBuffer.ReadUint16("address", 16) if _addressErr != nil { return nil, errors.Wrap(_addressErr, "Error parsing 'address' field of ModbusPDUWriteSingleRegisterRequest") } address := _address // Simple Field (value) - _value, _valueErr := readBuffer.ReadUint16("value", 16) +_value, _valueErr := readBuffer.ReadUint16("value", 16) if _valueErr != nil { return nil, errors.Wrap(_valueErr, "Error parsing 'value' field of ModbusPDUWriteSingleRegisterRequest") } @@ -173,9 +175,10 @@ func ModbusPDUWriteSingleRegisterRequestParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_ModbusPDUWriteSingleRegisterRequest{ - _ModbusPDU: &_ModbusPDU{}, - Address: address, - Value: value, + _ModbusPDU: &_ModbusPDU{ + }, + Address: address, + Value: value, } _child._ModbusPDU._ModbusPDUChildRequirements = _child return _child, nil @@ -197,19 +200,19 @@ func (m *_ModbusPDUWriteSingleRegisterRequest) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for ModbusPDUWriteSingleRegisterRequest") } - // Simple Field (address) - address := uint16(m.GetAddress()) - _addressErr := writeBuffer.WriteUint16("address", 16, (address)) - if _addressErr != nil { - return errors.Wrap(_addressErr, "Error serializing 'address' field") - } + // Simple Field (address) + address := uint16(m.GetAddress()) + _addressErr := writeBuffer.WriteUint16("address", 16, (address)) + if _addressErr != nil { + return errors.Wrap(_addressErr, "Error serializing 'address' field") + } - // Simple Field (value) - value := uint16(m.GetValue()) - _valueErr := writeBuffer.WriteUint16("value", 16, (value)) - if _valueErr != nil { - return errors.Wrap(_valueErr, "Error serializing 'value' field") - } + // Simple Field (value) + value := uint16(m.GetValue()) + _valueErr := writeBuffer.WriteUint16("value", 16, (value)) + if _valueErr != nil { + return errors.Wrap(_valueErr, "Error serializing 'value' field") + } if popErr := writeBuffer.PopContext("ModbusPDUWriteSingleRegisterRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for ModbusPDUWriteSingleRegisterRequest") @@ -219,6 +222,7 @@ func (m *_ModbusPDUWriteSingleRegisterRequest) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusPDUWriteSingleRegisterRequest) isModbusPDUWriteSingleRegisterRequest() bool { return true } @@ -233,3 +237,6 @@ func (m *_ModbusPDUWriteSingleRegisterRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteSingleRegisterResponse.go b/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteSingleRegisterResponse.go index 3e8ba3e97a8..c09cbd42987 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteSingleRegisterResponse.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusPDUWriteSingleRegisterResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusPDUWriteSingleRegisterResponse is the corresponding interface of ModbusPDUWriteSingleRegisterResponse type ModbusPDUWriteSingleRegisterResponse interface { @@ -48,38 +50,36 @@ type ModbusPDUWriteSingleRegisterResponseExactly interface { // _ModbusPDUWriteSingleRegisterResponse is the data-structure of this message type _ModbusPDUWriteSingleRegisterResponse struct { *_ModbusPDU - Address uint16 - Value uint16 + Address uint16 + Value uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusPDUWriteSingleRegisterResponse) GetErrorFlag() bool { - return bool(false) -} +func (m *_ModbusPDUWriteSingleRegisterResponse) GetErrorFlag() bool { +return bool(false)} -func (m *_ModbusPDUWriteSingleRegisterResponse) GetFunctionFlag() uint8 { - return 0x06 -} +func (m *_ModbusPDUWriteSingleRegisterResponse) GetFunctionFlag() uint8 { +return 0x06} -func (m *_ModbusPDUWriteSingleRegisterResponse) GetResponse() bool { - return bool(true) -} +func (m *_ModbusPDUWriteSingleRegisterResponse) GetResponse() bool { +return bool(true)} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusPDUWriteSingleRegisterResponse) InitializeParent(parent ModbusPDU) {} +func (m *_ModbusPDUWriteSingleRegisterResponse) InitializeParent(parent ModbusPDU ) {} -func (m *_ModbusPDUWriteSingleRegisterResponse) GetParent() ModbusPDU { +func (m *_ModbusPDUWriteSingleRegisterResponse) GetParent() ModbusPDU { return m._ModbusPDU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -98,12 +98,13 @@ func (m *_ModbusPDUWriteSingleRegisterResponse) GetValue() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusPDUWriteSingleRegisterResponse factory function for _ModbusPDUWriteSingleRegisterResponse -func NewModbusPDUWriteSingleRegisterResponse(address uint16, value uint16) *_ModbusPDUWriteSingleRegisterResponse { +func NewModbusPDUWriteSingleRegisterResponse( address uint16 , value uint16 ) *_ModbusPDUWriteSingleRegisterResponse { _result := &_ModbusPDUWriteSingleRegisterResponse{ - Address: address, - Value: value, - _ModbusPDU: NewModbusPDU(), + Address: address, + Value: value, + _ModbusPDU: NewModbusPDU(), } _result._ModbusPDU._ModbusPDUChildRequirements = _result return _result @@ -111,7 +112,7 @@ func NewModbusPDUWriteSingleRegisterResponse(address uint16, value uint16) *_Mod // Deprecated: use the interface for direct cast func CastModbusPDUWriteSingleRegisterResponse(structType interface{}) ModbusPDUWriteSingleRegisterResponse { - if casted, ok := structType.(ModbusPDUWriteSingleRegisterResponse); ok { + if casted, ok := structType.(ModbusPDUWriteSingleRegisterResponse); ok { return casted } if casted, ok := structType.(*ModbusPDUWriteSingleRegisterResponse); ok { @@ -128,14 +129,15 @@ func (m *_ModbusPDUWriteSingleRegisterResponse) GetLengthInBits(ctx context.Cont lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (address) - lengthInBits += 16 + lengthInBits += 16; // Simple field (value) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_ModbusPDUWriteSingleRegisterResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,14 +156,14 @@ func ModbusPDUWriteSingleRegisterResponseParseWithBuffer(ctx context.Context, re _ = currentPos // Simple Field (address) - _address, _addressErr := readBuffer.ReadUint16("address", 16) +_address, _addressErr := readBuffer.ReadUint16("address", 16) if _addressErr != nil { return nil, errors.Wrap(_addressErr, "Error parsing 'address' field of ModbusPDUWriteSingleRegisterResponse") } address := _address // Simple Field (value) - _value, _valueErr := readBuffer.ReadUint16("value", 16) +_value, _valueErr := readBuffer.ReadUint16("value", 16) if _valueErr != nil { return nil, errors.Wrap(_valueErr, "Error parsing 'value' field of ModbusPDUWriteSingleRegisterResponse") } @@ -173,9 +175,10 @@ func ModbusPDUWriteSingleRegisterResponseParseWithBuffer(ctx context.Context, re // Create a partially initialized instance _child := &_ModbusPDUWriteSingleRegisterResponse{ - _ModbusPDU: &_ModbusPDU{}, - Address: address, - Value: value, + _ModbusPDU: &_ModbusPDU{ + }, + Address: address, + Value: value, } _child._ModbusPDU._ModbusPDUChildRequirements = _child return _child, nil @@ -197,19 +200,19 @@ func (m *_ModbusPDUWriteSingleRegisterResponse) SerializeWithWriteBuffer(ctx con return errors.Wrap(pushErr, "Error pushing for ModbusPDUWriteSingleRegisterResponse") } - // Simple Field (address) - address := uint16(m.GetAddress()) - _addressErr := writeBuffer.WriteUint16("address", 16, (address)) - if _addressErr != nil { - return errors.Wrap(_addressErr, "Error serializing 'address' field") - } + // Simple Field (address) + address := uint16(m.GetAddress()) + _addressErr := writeBuffer.WriteUint16("address", 16, (address)) + if _addressErr != nil { + return errors.Wrap(_addressErr, "Error serializing 'address' field") + } - // Simple Field (value) - value := uint16(m.GetValue()) - _valueErr := writeBuffer.WriteUint16("value", 16, (value)) - if _valueErr != nil { - return errors.Wrap(_valueErr, "Error serializing 'value' field") - } + // Simple Field (value) + value := uint16(m.GetValue()) + _valueErr := writeBuffer.WriteUint16("value", 16, (value)) + if _valueErr != nil { + return errors.Wrap(_valueErr, "Error serializing 'value' field") + } if popErr := writeBuffer.PopContext("ModbusPDUWriteSingleRegisterResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for ModbusPDUWriteSingleRegisterResponse") @@ -219,6 +222,7 @@ func (m *_ModbusPDUWriteSingleRegisterResponse) SerializeWithWriteBuffer(ctx con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusPDUWriteSingleRegisterResponse) isModbusPDUWriteSingleRegisterResponse() bool { return true } @@ -233,3 +237,6 @@ func (m *_ModbusPDUWriteSingleRegisterResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusRtuADU.go b/plc4go/protocols/modbus/readwrite/model/ModbusRtuADU.go index cdd53763d1b..d17bf2e44fb 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusRtuADU.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusRtuADU.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // ModbusRtuADU is the corresponding interface of ModbusRtuADU type ModbusRtuADU interface { @@ -49,30 +51,30 @@ type ModbusRtuADUExactly interface { // _ModbusRtuADU is the data-structure of this message type _ModbusRtuADU struct { *_ModbusADU - Address uint8 - Pdu ModbusPDU + Address uint8 + Pdu ModbusPDU } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusRtuADU) GetDriverType() DriverType { - return DriverType_MODBUS_RTU -} +func (m *_ModbusRtuADU) GetDriverType() DriverType { +return DriverType_MODBUS_RTU} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusRtuADU) InitializeParent(parent ModbusADU) {} +func (m *_ModbusRtuADU) InitializeParent(parent ModbusADU ) {} -func (m *_ModbusRtuADU) GetParent() ModbusADU { +func (m *_ModbusRtuADU) GetParent() ModbusADU { return m._ModbusADU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -91,12 +93,13 @@ func (m *_ModbusRtuADU) GetPdu() ModbusPDU { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusRtuADU factory function for _ModbusRtuADU -func NewModbusRtuADU(address uint8, pdu ModbusPDU, response bool) *_ModbusRtuADU { +func NewModbusRtuADU( address uint8 , pdu ModbusPDU , response bool ) *_ModbusRtuADU { _result := &_ModbusRtuADU{ - Address: address, - Pdu: pdu, - _ModbusADU: NewModbusADU(response), + Address: address, + Pdu: pdu, + _ModbusADU: NewModbusADU(response), } _result._ModbusADU._ModbusADUChildRequirements = _result return _result @@ -104,7 +107,7 @@ func NewModbusRtuADU(address uint8, pdu ModbusPDU, response bool) *_ModbusRtuADU // Deprecated: use the interface for direct cast func CastModbusRtuADU(structType interface{}) ModbusRtuADU { - if casted, ok := structType.(ModbusRtuADU); ok { + if casted, ok := structType.(ModbusRtuADU); ok { return casted } if casted, ok := structType.(*ModbusRtuADU); ok { @@ -121,7 +124,7 @@ func (m *_ModbusRtuADU) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (address) - lengthInBits += 8 + lengthInBits += 8; // Simple field (pdu) lengthInBits += m.Pdu.GetLengthInBits(ctx) @@ -132,6 +135,7 @@ func (m *_ModbusRtuADU) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_ModbusRtuADU) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -150,7 +154,7 @@ func ModbusRtuADUParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe _ = currentPos // Simple Field (address) - _address, _addressErr := readBuffer.ReadUint8("address", 8) +_address, _addressErr := readBuffer.ReadUint8("address", 8) if _addressErr != nil { return nil, errors.Wrap(_addressErr, "Error parsing 'address' field of ModbusRtuADU") } @@ -160,7 +164,7 @@ func ModbusRtuADUParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe if pullErr := readBuffer.PullContext("pdu"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for pdu") } - _pdu, _pduErr := ModbusPDUParseWithBuffer(ctx, readBuffer, bool(response)) +_pdu, _pduErr := ModbusPDUParseWithBuffer(ctx, readBuffer , bool( response ) ) if _pduErr != nil { return nil, errors.Wrap(_pduErr, "Error parsing 'pdu' field of ModbusRtuADU") } @@ -175,7 +179,7 @@ func ModbusRtuADUParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe if _checksumRefErr != nil { return nil, errors.Wrap(_checksumRefErr, "Error parsing 'checksum' field of ModbusRtuADU") } - checksum, _checksumErr := RtuCrcCheck(address, pdu) + checksum, _checksumErr:= RtuCrcCheck(address, pdu) if _checksumErr != nil { return nil, errors.Wrap(_checksumErr, "Checksum verification failed") } @@ -194,7 +198,7 @@ func ModbusRtuADUParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe Response: response, }, Address: address, - Pdu: pdu, + Pdu: pdu, } _child._ModbusADU._ModbusADUChildRequirements = _child return _child, nil @@ -216,36 +220,36 @@ func (m *_ModbusRtuADU) SerializeWithWriteBuffer(ctx context.Context, writeBuffe return errors.Wrap(pushErr, "Error pushing for ModbusRtuADU") } - // Simple Field (address) - address := uint8(m.GetAddress()) - _addressErr := writeBuffer.WriteUint8("address", 8, (address)) - if _addressErr != nil { - return errors.Wrap(_addressErr, "Error serializing 'address' field") - } + // Simple Field (address) + address := uint8(m.GetAddress()) + _addressErr := writeBuffer.WriteUint8("address", 8, (address)) + if _addressErr != nil { + return errors.Wrap(_addressErr, "Error serializing 'address' field") + } - // Simple Field (pdu) - if pushErr := writeBuffer.PushContext("pdu"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for pdu") - } - _pduErr := writeBuffer.WriteSerializable(ctx, m.GetPdu()) - if popErr := writeBuffer.PopContext("pdu"); popErr != nil { - return errors.Wrap(popErr, "Error popping for pdu") - } - if _pduErr != nil { - return errors.Wrap(_pduErr, "Error serializing 'pdu' field") - } + // Simple Field (pdu) + if pushErr := writeBuffer.PushContext("pdu"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for pdu") + } + _pduErr := writeBuffer.WriteSerializable(ctx, m.GetPdu()) + if popErr := writeBuffer.PopContext("pdu"); popErr != nil { + return errors.Wrap(popErr, "Error popping for pdu") + } + if _pduErr != nil { + return errors.Wrap(_pduErr, "Error serializing 'pdu' field") + } - // Checksum Field (checksum) (Calculated) - { - _checksum, _checksumErr := RtuCrcCheck(m.GetAddress(), m.GetPdu()) - if _checksumErr != nil { - return errors.Wrap(_checksumErr, "Checksum calculation failed") - } - _checksumWriteErr := writeBuffer.WriteUint16("checksum", 16, (_checksum)) - if _checksumWriteErr != nil { - return errors.Wrap(_checksumWriteErr, "Error serializing 'checksum' field") - } + // Checksum Field (checksum) (Calculated) + { + _checksum, _checksumErr := RtuCrcCheck(m.GetAddress(), m.GetPdu()) + if _checksumErr != nil { + return errors.Wrap(_checksumErr, "Checksum calculation failed") + } + _checksumWriteErr := writeBuffer.WriteUint16("checksum", 16, (_checksum)) + if _checksumWriteErr != nil { + return errors.Wrap(_checksumWriteErr, "Error serializing 'checksum' field") } + } if popErr := writeBuffer.PopContext("ModbusRtuADU"); popErr != nil { return errors.Wrap(popErr, "Error popping for ModbusRtuADU") @@ -255,6 +259,7 @@ func (m *_ModbusRtuADU) SerializeWithWriteBuffer(ctx context.Context, writeBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusRtuADU) isModbusRtuADU() bool { return true } @@ -269,3 +274,6 @@ func (m *_ModbusRtuADU) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/ModbusTcpADU.go b/plc4go/protocols/modbus/readwrite/model/ModbusTcpADU.go index ef243b73500..217f8a3e426 100644 --- a/plc4go/protocols/modbus/readwrite/model/ModbusTcpADU.go +++ b/plc4go/protocols/modbus/readwrite/model/ModbusTcpADU.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -27,7 +28,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const ModbusTcpADU_PROTOCOLIDENTIFIER uint16 = 0x0000 @@ -55,31 +57,31 @@ type ModbusTcpADUExactly interface { // _ModbusTcpADU is the data-structure of this message type _ModbusTcpADU struct { *_ModbusADU - TransactionIdentifier uint16 - UnitIdentifier uint8 - Pdu ModbusPDU + TransactionIdentifier uint16 + UnitIdentifier uint8 + Pdu ModbusPDU } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_ModbusTcpADU) GetDriverType() DriverType { - return DriverType_MODBUS_TCP -} +func (m *_ModbusTcpADU) GetDriverType() DriverType { +return DriverType_MODBUS_TCP} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_ModbusTcpADU) InitializeParent(parent ModbusADU) {} +func (m *_ModbusTcpADU) InitializeParent(parent ModbusADU ) {} -func (m *_ModbusTcpADU) GetParent() ModbusADU { +func (m *_ModbusTcpADU) GetParent() ModbusADU { return m._ModbusADU } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -115,13 +117,14 @@ func (m *_ModbusTcpADU) GetProtocolIdentifier() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewModbusTcpADU factory function for _ModbusTcpADU -func NewModbusTcpADU(transactionIdentifier uint16, unitIdentifier uint8, pdu ModbusPDU, response bool) *_ModbusTcpADU { +func NewModbusTcpADU( transactionIdentifier uint16 , unitIdentifier uint8 , pdu ModbusPDU , response bool ) *_ModbusTcpADU { _result := &_ModbusTcpADU{ TransactionIdentifier: transactionIdentifier, - UnitIdentifier: unitIdentifier, - Pdu: pdu, - _ModbusADU: NewModbusADU(response), + UnitIdentifier: unitIdentifier, + Pdu: pdu, + _ModbusADU: NewModbusADU(response), } _result._ModbusADU._ModbusADUChildRequirements = _result return _result @@ -129,7 +132,7 @@ func NewModbusTcpADU(transactionIdentifier uint16, unitIdentifier uint8, pdu Mod // Deprecated: use the interface for direct cast func CastModbusTcpADU(structType interface{}) ModbusTcpADU { - if casted, ok := structType.(ModbusTcpADU); ok { + if casted, ok := structType.(ModbusTcpADU); ok { return casted } if casted, ok := structType.(*ModbusTcpADU); ok { @@ -146,7 +149,7 @@ func (m *_ModbusTcpADU) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (transactionIdentifier) - lengthInBits += 16 + lengthInBits += 16; // Const Field (protocolIdentifier) lengthInBits += 16 @@ -155,7 +158,7 @@ func (m *_ModbusTcpADU) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += 16 // Simple field (unitIdentifier) - lengthInBits += 8 + lengthInBits += 8; // Simple field (pdu) lengthInBits += m.Pdu.GetLengthInBits(ctx) @@ -163,6 +166,7 @@ func (m *_ModbusTcpADU) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_ModbusTcpADU) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -181,7 +185,7 @@ func ModbusTcpADUParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe _ = currentPos // Simple Field (transactionIdentifier) - _transactionIdentifier, _transactionIdentifierErr := readBuffer.ReadUint16("transactionIdentifier", 16) +_transactionIdentifier, _transactionIdentifierErr := readBuffer.ReadUint16("transactionIdentifier", 16) if _transactionIdentifierErr != nil { return nil, errors.Wrap(_transactionIdentifierErr, "Error parsing 'transactionIdentifier' field of ModbusTcpADU") } @@ -204,7 +208,7 @@ func ModbusTcpADUParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe } // Simple Field (unitIdentifier) - _unitIdentifier, _unitIdentifierErr := readBuffer.ReadUint8("unitIdentifier", 8) +_unitIdentifier, _unitIdentifierErr := readBuffer.ReadUint8("unitIdentifier", 8) if _unitIdentifierErr != nil { return nil, errors.Wrap(_unitIdentifierErr, "Error parsing 'unitIdentifier' field of ModbusTcpADU") } @@ -214,7 +218,7 @@ func ModbusTcpADUParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe if pullErr := readBuffer.PullContext("pdu"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for pdu") } - _pdu, _pduErr := ModbusPDUParseWithBuffer(ctx, readBuffer, bool(response)) +_pdu, _pduErr := ModbusPDUParseWithBuffer(ctx, readBuffer , bool( response ) ) if _pduErr != nil { return nil, errors.Wrap(_pduErr, "Error parsing 'pdu' field of ModbusTcpADU") } @@ -233,8 +237,8 @@ func ModbusTcpADUParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe Response: response, }, TransactionIdentifier: transactionIdentifier, - UnitIdentifier: unitIdentifier, - Pdu: pdu, + UnitIdentifier: unitIdentifier, + Pdu: pdu, } _child._ModbusADU._ModbusADUChildRequirements = _child return _child, nil @@ -256,44 +260,44 @@ func (m *_ModbusTcpADU) SerializeWithWriteBuffer(ctx context.Context, writeBuffe return errors.Wrap(pushErr, "Error pushing for ModbusTcpADU") } - // Simple Field (transactionIdentifier) - transactionIdentifier := uint16(m.GetTransactionIdentifier()) - _transactionIdentifierErr := writeBuffer.WriteUint16("transactionIdentifier", 16, (transactionIdentifier)) - if _transactionIdentifierErr != nil { - return errors.Wrap(_transactionIdentifierErr, "Error serializing 'transactionIdentifier' field") - } + // Simple Field (transactionIdentifier) + transactionIdentifier := uint16(m.GetTransactionIdentifier()) + _transactionIdentifierErr := writeBuffer.WriteUint16("transactionIdentifier", 16, (transactionIdentifier)) + if _transactionIdentifierErr != nil { + return errors.Wrap(_transactionIdentifierErr, "Error serializing 'transactionIdentifier' field") + } - // Const Field (protocolIdentifier) - _protocolIdentifierErr := writeBuffer.WriteUint16("protocolIdentifier", 16, 0x0000) - if _protocolIdentifierErr != nil { - return errors.Wrap(_protocolIdentifierErr, "Error serializing 'protocolIdentifier' field") - } + // Const Field (protocolIdentifier) + _protocolIdentifierErr := writeBuffer.WriteUint16("protocolIdentifier", 16, 0x0000) + if _protocolIdentifierErr != nil { + return errors.Wrap(_protocolIdentifierErr, "Error serializing 'protocolIdentifier' field") + } - // Implicit Field (length) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - length := uint16(uint16(m.GetPdu().GetLengthInBytes(ctx)) + uint16(uint16(1))) - _lengthErr := writeBuffer.WriteUint16("length", 16, (length)) - if _lengthErr != nil { - return errors.Wrap(_lengthErr, "Error serializing 'length' field") - } + // Implicit Field (length) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) + length := uint16(uint16(m.GetPdu().GetLengthInBytes(ctx)) + uint16(uint16(1))) + _lengthErr := writeBuffer.WriteUint16("length", 16, (length)) + if _lengthErr != nil { + return errors.Wrap(_lengthErr, "Error serializing 'length' field") + } - // Simple Field (unitIdentifier) - unitIdentifier := uint8(m.GetUnitIdentifier()) - _unitIdentifierErr := writeBuffer.WriteUint8("unitIdentifier", 8, (unitIdentifier)) - if _unitIdentifierErr != nil { - return errors.Wrap(_unitIdentifierErr, "Error serializing 'unitIdentifier' field") - } + // Simple Field (unitIdentifier) + unitIdentifier := uint8(m.GetUnitIdentifier()) + _unitIdentifierErr := writeBuffer.WriteUint8("unitIdentifier", 8, (unitIdentifier)) + if _unitIdentifierErr != nil { + return errors.Wrap(_unitIdentifierErr, "Error serializing 'unitIdentifier' field") + } - // Simple Field (pdu) - if pushErr := writeBuffer.PushContext("pdu"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for pdu") - } - _pduErr := writeBuffer.WriteSerializable(ctx, m.GetPdu()) - if popErr := writeBuffer.PopContext("pdu"); popErr != nil { - return errors.Wrap(popErr, "Error popping for pdu") - } - if _pduErr != nil { - return errors.Wrap(_pduErr, "Error serializing 'pdu' field") - } + // Simple Field (pdu) + if pushErr := writeBuffer.PushContext("pdu"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for pdu") + } + _pduErr := writeBuffer.WriteSerializable(ctx, m.GetPdu()) + if popErr := writeBuffer.PopContext("pdu"); popErr != nil { + return errors.Wrap(popErr, "Error popping for pdu") + } + if _pduErr != nil { + return errors.Wrap(_pduErr, "Error serializing 'pdu' field") + } if popErr := writeBuffer.PopContext("ModbusTcpADU"); popErr != nil { return errors.Wrap(popErr, "Error popping for ModbusTcpADU") @@ -303,6 +307,7 @@ func (m *_ModbusTcpADU) SerializeWithWriteBuffer(ctx context.Context, writeBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_ModbusTcpADU) isModbusTcpADU() bool { return true } @@ -317,3 +322,6 @@ func (m *_ModbusTcpADU) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/modbus/readwrite/model/plc4x_common.go b/plc4go/protocols/modbus/readwrite/model/plc4x_common.go index d2d66e8bdd3..42166d94e68 100644 --- a/plc4go/protocols/modbus/readwrite/model/plc4x_common.go +++ b/plc4go/protocols/modbus/readwrite/model/plc4x_common.go @@ -15,7 +15,7 @@ * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - */ +*/ package model @@ -25,3 +25,4 @@ import "github.com/rs/zerolog/log" // Plc4xModelLog is the Logger used by the Parse/Serialize methods var Plc4xModelLog = &log.Logger + diff --git a/plc4go/protocols/s7/readwrite/ParserHelper.go b/plc4go/protocols/s7/readwrite/ParserHelper.go index 86cb61bb774..fc717c57f92 100644 --- a/plc4go/protocols/s7/readwrite/ParserHelper.go +++ b/plc4go/protocols/s7/readwrite/ParserHelper.go @@ -43,7 +43,11 @@ func (m S7ParserHelper) Parse(typeName string, arguments []string, io utils.Read if err != nil { return nil, errors.Wrap(err, "Error parsing") } - return model.DataItemParseWithBuffer(context.Background(), io, dataProtocolId, stringLength) + stringEncoding, err := utils.StrToString(arguments[2]) + if err != nil { + return nil, errors.Wrap(err, "Error parsing") + } + return model.DataItemParseWithBuffer(context.Background(), io, dataProtocolId, stringLength, stringEncoding) case "SzlId": return model.SzlIdParseWithBuffer(context.Background(), io) case "AlarmMessageObjectAckType": diff --git a/plc4go/protocols/s7/readwrite/XmlParserHelper.go b/plc4go/protocols/s7/readwrite/XmlParserHelper.go index a8374bea380..eb2f2fb8b41 100644 --- a/plc4go/protocols/s7/readwrite/XmlParserHelper.go +++ b/plc4go/protocols/s7/readwrite/XmlParserHelper.go @@ -21,8 +21,8 @@ package readwrite import ( "context" - "strconv" "strings" + "strconv" "github.com/apache/plc4x/plc4go/protocols/s7/readwrite/model" "github.com/apache/plc4x/plc4go/spi/utils" @@ -43,107 +43,109 @@ func init() { } func (m S7XmlParserHelper) Parse(typeName string, xmlString string, parserArguments ...string) (interface{}, error) { - switch typeName { - case "DataItem": - // TODO: find a way to parse the sub types - var dataProtocolId string - parsedInt1, err := strconv.ParseInt(parserArguments[1], 10, 32) - if err != nil { - return nil, err - } - stringLength := int32(parsedInt1) - return model.DataItemParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), dataProtocolId, stringLength) - case "SzlId": - return model.SzlIdParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "AlarmMessageObjectAckType": - return model.AlarmMessageObjectAckTypeParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "AlarmMessageAckPushType": - return model.AlarmMessageAckPushTypeParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "S7Message": - return model.S7MessageParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "S7VarPayloadStatusItem": - return model.S7VarPayloadStatusItemParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "S7Parameter": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - messageType := uint8(parsedUint0) - return model.S7ParameterParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), messageType) - case "S7DataAlarmMessage": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 4) - if err != nil { - return nil, err - } - cpuFunctionType := uint8(parsedUint0) - return model.S7DataAlarmMessageParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cpuFunctionType) - case "SzlDataTreeItem": - return model.SzlDataTreeItemParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "COTPPacket": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 16) - if err != nil { - return nil, err - } - cotpLen := uint16(parsedUint0) - return model.COTPPacketParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cotpLen) - case "S7PayloadUserDataItem": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 4) - if err != nil { - return nil, err - } - cpuFunctionType := uint8(parsedUint0) - parsedUint1, err := strconv.ParseUint(parserArguments[1], 10, 8) - if err != nil { - return nil, err - } - cpuSubfunction := uint8(parsedUint1) - return model.S7PayloadUserDataItemParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cpuFunctionType, cpuSubfunction) - case "DateAndTime": - return model.DateAndTimeParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "COTPParameter": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - rest := uint8(parsedUint0) - return model.COTPParameterParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), rest) - case "AlarmMessageObjectPushType": - return model.AlarmMessageObjectPushTypeParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "State": - return model.StateParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "AlarmMessagePushType": - return model.AlarmMessagePushTypeParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "TPKTPacket": - return model.TPKTPacketParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "AlarmMessageAckType": - return model.AlarmMessageAckTypeParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "AssociatedValueType": - return model.AssociatedValueTypeParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "AlarmMessageAckObjectPushType": - return model.AlarmMessageAckObjectPushTypeParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "S7Payload": - parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) - if err != nil { - return nil, err - } - messageType := uint8(parsedUint0) - // TODO: find a way to parse the sub types - var parameter model.S7Parameter - return model.S7PayloadParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), messageType, parameter) - case "S7VarRequestParameterItem": - return model.S7VarRequestParameterItemParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "S7VarPayloadDataItem": - return model.S7VarPayloadDataItemParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "AlarmMessageQueryType": - return model.AlarmMessageQueryTypeParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "AlarmMessageAckResponseType": - return model.AlarmMessageAckResponseTypeParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "AlarmMessageObjectQueryType": - return model.AlarmMessageObjectQueryTypeParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "S7Address": - return model.S7AddressParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - case "S7ParameterUserDataItem": - return model.S7ParameterUserDataItemParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - } - return nil, errors.Errorf("Unsupported type %s", typeName) + switch typeName { + case "DataItem": + // TODO: find a way to parse the sub types + var dataProtocolId string + parsedInt1, err := strconv.ParseInt(parserArguments[1], 10, 32) + if err!=nil { + return nil, err + } + stringLength := int32(parsedInt1) + // TODO: find a way to parse the sub types + var stringEncoding string + return model.DataItemParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), dataProtocolId, stringLength, stringEncoding ) + case "SzlId": + return model.SzlIdParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "AlarmMessageObjectAckType": + return model.AlarmMessageObjectAckTypeParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "AlarmMessageAckPushType": + return model.AlarmMessageAckPushTypeParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "S7Message": + return model.S7MessageParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "S7VarPayloadStatusItem": + return model.S7VarPayloadStatusItemParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "S7Parameter": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + messageType := uint8(parsedUint0) + return model.S7ParameterParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), messageType ) + case "S7DataAlarmMessage": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 4) + if err!=nil { + return nil, err + } + cpuFunctionType := uint8(parsedUint0) + return model.S7DataAlarmMessageParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cpuFunctionType ) + case "SzlDataTreeItem": + return model.SzlDataTreeItemParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "COTPPacket": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 16) + if err!=nil { + return nil, err + } + cotpLen := uint16(parsedUint0) + return model.COTPPacketParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cotpLen ) + case "S7PayloadUserDataItem": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 4) + if err!=nil { + return nil, err + } + cpuFunctionType := uint8(parsedUint0) + parsedUint1, err := strconv.ParseUint(parserArguments[1], 10, 8) + if err!=nil { + return nil, err + } + cpuSubfunction := uint8(parsedUint1) + return model.S7PayloadUserDataItemParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), cpuFunctionType, cpuSubfunction ) + case "DateAndTime": + return model.DateAndTimeParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "COTPParameter": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + rest := uint8(parsedUint0) + return model.COTPParameterParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), rest ) + case "AlarmMessageObjectPushType": + return model.AlarmMessageObjectPushTypeParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "State": + return model.StateParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "AlarmMessagePushType": + return model.AlarmMessagePushTypeParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "TPKTPacket": + return model.TPKTPacketParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "AlarmMessageAckType": + return model.AlarmMessageAckTypeParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "AssociatedValueType": + return model.AssociatedValueTypeParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "AlarmMessageAckObjectPushType": + return model.AlarmMessageAckObjectPushTypeParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "S7Payload": + parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) + if err!=nil { + return nil, err + } + messageType := uint8(parsedUint0) + // TODO: find a way to parse the sub types + var parameter model.S7Parameter + return model.S7PayloadParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), messageType, parameter ) + case "S7VarRequestParameterItem": + return model.S7VarRequestParameterItemParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "S7VarPayloadDataItem": + return model.S7VarPayloadDataItemParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "AlarmMessageQueryType": + return model.AlarmMessageQueryTypeParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "AlarmMessageAckResponseType": + return model.AlarmMessageAckResponseTypeParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "AlarmMessageObjectQueryType": + return model.AlarmMessageObjectQueryTypeParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "S7Address": + return model.S7AddressParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "S7ParameterUserDataItem": + return model.S7ParameterUserDataItemParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + } + return nil, errors.Errorf("Unsupported type %s", typeName) } diff --git a/plc4go/protocols/s7/readwrite/model/AlarmMessageAckObjectPushType.go b/plc4go/protocols/s7/readwrite/model/AlarmMessageAckObjectPushType.go index 12e4a02eba8..4ecfd3885a2 100644 --- a/plc4go/protocols/s7/readwrite/model/AlarmMessageAckObjectPushType.go +++ b/plc4go/protocols/s7/readwrite/model/AlarmMessageAckObjectPushType.go @@ -19,6 +19,7 @@ package model + import ( "context" "fmt" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const AlarmMessageAckObjectPushType_VARIABLESPEC uint8 = 0x12 @@ -58,14 +60,15 @@ type AlarmMessageAckObjectPushTypeExactly interface { // _AlarmMessageAckObjectPushType is the data-structure of this message type _AlarmMessageAckObjectPushType struct { - LengthSpec uint8 - SyntaxId SyntaxIdType - NumberOfValues uint8 - EventId uint32 - AckStateGoing State - AckStateComing State + LengthSpec uint8 + SyntaxId SyntaxIdType + NumberOfValues uint8 + EventId uint32 + AckStateGoing State + AckStateComing State } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -113,14 +116,15 @@ func (m *_AlarmMessageAckObjectPushType) GetVariableSpec() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAlarmMessageAckObjectPushType factory function for _AlarmMessageAckObjectPushType -func NewAlarmMessageAckObjectPushType(lengthSpec uint8, syntaxId SyntaxIdType, numberOfValues uint8, eventId uint32, ackStateGoing State, ackStateComing State) *_AlarmMessageAckObjectPushType { - return &_AlarmMessageAckObjectPushType{LengthSpec: lengthSpec, SyntaxId: syntaxId, NumberOfValues: numberOfValues, EventId: eventId, AckStateGoing: ackStateGoing, AckStateComing: ackStateComing} +func NewAlarmMessageAckObjectPushType( lengthSpec uint8 , syntaxId SyntaxIdType , numberOfValues uint8 , eventId uint32 , ackStateGoing State , ackStateComing State ) *_AlarmMessageAckObjectPushType { +return &_AlarmMessageAckObjectPushType{ LengthSpec: lengthSpec , SyntaxId: syntaxId , NumberOfValues: numberOfValues , EventId: eventId , AckStateGoing: ackStateGoing , AckStateComing: ackStateComing } } // Deprecated: use the interface for direct cast func CastAlarmMessageAckObjectPushType(structType interface{}) AlarmMessageAckObjectPushType { - if casted, ok := structType.(AlarmMessageAckObjectPushType); ok { + if casted, ok := structType.(AlarmMessageAckObjectPushType); ok { return casted } if casted, ok := structType.(*AlarmMessageAckObjectPushType); ok { @@ -140,16 +144,16 @@ func (m *_AlarmMessageAckObjectPushType) GetLengthInBits(ctx context.Context) ui lengthInBits += 8 // Simple field (lengthSpec) - lengthInBits += 8 + lengthInBits += 8; // Simple field (syntaxId) lengthInBits += 8 // Simple field (numberOfValues) - lengthInBits += 8 + lengthInBits += 8; // Simple field (eventId) - lengthInBits += 32 + lengthInBits += 32; // Simple field (ackStateGoing) lengthInBits += m.AckStateGoing.GetLengthInBits(ctx) @@ -160,6 +164,7 @@ func (m *_AlarmMessageAckObjectPushType) GetLengthInBits(ctx context.Context) ui return lengthInBits } + func (m *_AlarmMessageAckObjectPushType) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -187,7 +192,7 @@ func AlarmMessageAckObjectPushTypeParseWithBuffer(ctx context.Context, readBuffe } // Simple Field (lengthSpec) - _lengthSpec, _lengthSpecErr := readBuffer.ReadUint8("lengthSpec", 8) +_lengthSpec, _lengthSpecErr := readBuffer.ReadUint8("lengthSpec", 8) if _lengthSpecErr != nil { return nil, errors.Wrap(_lengthSpecErr, "Error parsing 'lengthSpec' field of AlarmMessageAckObjectPushType") } @@ -197,7 +202,7 @@ func AlarmMessageAckObjectPushTypeParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("syntaxId"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for syntaxId") } - _syntaxId, _syntaxIdErr := SyntaxIdTypeParseWithBuffer(ctx, readBuffer) +_syntaxId, _syntaxIdErr := SyntaxIdTypeParseWithBuffer(ctx, readBuffer) if _syntaxIdErr != nil { return nil, errors.Wrap(_syntaxIdErr, "Error parsing 'syntaxId' field of AlarmMessageAckObjectPushType") } @@ -207,14 +212,14 @@ func AlarmMessageAckObjectPushTypeParseWithBuffer(ctx context.Context, readBuffe } // Simple Field (numberOfValues) - _numberOfValues, _numberOfValuesErr := readBuffer.ReadUint8("numberOfValues", 8) +_numberOfValues, _numberOfValuesErr := readBuffer.ReadUint8("numberOfValues", 8) if _numberOfValuesErr != nil { return nil, errors.Wrap(_numberOfValuesErr, "Error parsing 'numberOfValues' field of AlarmMessageAckObjectPushType") } numberOfValues := _numberOfValues // Simple Field (eventId) - _eventId, _eventIdErr := readBuffer.ReadUint32("eventId", 32) +_eventId, _eventIdErr := readBuffer.ReadUint32("eventId", 32) if _eventIdErr != nil { return nil, errors.Wrap(_eventIdErr, "Error parsing 'eventId' field of AlarmMessageAckObjectPushType") } @@ -224,7 +229,7 @@ func AlarmMessageAckObjectPushTypeParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("ackStateGoing"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for ackStateGoing") } - _ackStateGoing, _ackStateGoingErr := StateParseWithBuffer(ctx, readBuffer) +_ackStateGoing, _ackStateGoingErr := StateParseWithBuffer(ctx, readBuffer) if _ackStateGoingErr != nil { return nil, errors.Wrap(_ackStateGoingErr, "Error parsing 'ackStateGoing' field of AlarmMessageAckObjectPushType") } @@ -237,7 +242,7 @@ func AlarmMessageAckObjectPushTypeParseWithBuffer(ctx context.Context, readBuffe if pullErr := readBuffer.PullContext("ackStateComing"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for ackStateComing") } - _ackStateComing, _ackStateComingErr := StateParseWithBuffer(ctx, readBuffer) +_ackStateComing, _ackStateComingErr := StateParseWithBuffer(ctx, readBuffer) if _ackStateComingErr != nil { return nil, errors.Wrap(_ackStateComingErr, "Error parsing 'ackStateComing' field of AlarmMessageAckObjectPushType") } @@ -252,13 +257,13 @@ func AlarmMessageAckObjectPushTypeParseWithBuffer(ctx context.Context, readBuffe // Create the instance return &_AlarmMessageAckObjectPushType{ - LengthSpec: lengthSpec, - SyntaxId: syntaxId, - NumberOfValues: numberOfValues, - EventId: eventId, - AckStateGoing: ackStateGoing, - AckStateComing: ackStateComing, - }, nil + LengthSpec: lengthSpec, + SyntaxId: syntaxId, + NumberOfValues: numberOfValues, + EventId: eventId, + AckStateGoing: ackStateGoing, + AckStateComing: ackStateComing, + }, nil } func (m *_AlarmMessageAckObjectPushType) Serialize() ([]byte, error) { @@ -272,7 +277,7 @@ func (m *_AlarmMessageAckObjectPushType) Serialize() ([]byte, error) { func (m *_AlarmMessageAckObjectPushType) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("AlarmMessageAckObjectPushType"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("AlarmMessageAckObjectPushType"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for AlarmMessageAckObjectPushType") } @@ -345,6 +350,7 @@ func (m *_AlarmMessageAckObjectPushType) SerializeWithWriteBuffer(ctx context.Co return nil } + func (m *_AlarmMessageAckObjectPushType) isAlarmMessageAckObjectPushType() bool { return true } @@ -359,3 +365,6 @@ func (m *_AlarmMessageAckObjectPushType) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/AlarmMessageAckPushType.go b/plc4go/protocols/s7/readwrite/model/AlarmMessageAckPushType.go index 2cded79d9a1..71fe032727c 100644 --- a/plc4go/protocols/s7/readwrite/model/AlarmMessageAckPushType.go +++ b/plc4go/protocols/s7/readwrite/model/AlarmMessageAckPushType.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AlarmMessageAckPushType is the corresponding interface of AlarmMessageAckPushType type AlarmMessageAckPushType interface { @@ -51,12 +53,13 @@ type AlarmMessageAckPushTypeExactly interface { // _AlarmMessageAckPushType is the data-structure of this message type _AlarmMessageAckPushType struct { - TimeStamp DateAndTime - FunctionId uint8 - NumberOfObjects uint8 - MessageObjects []AlarmMessageAckObjectPushType + TimeStamp DateAndTime + FunctionId uint8 + NumberOfObjects uint8 + MessageObjects []AlarmMessageAckObjectPushType } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,14 +86,15 @@ func (m *_AlarmMessageAckPushType) GetMessageObjects() []AlarmMessageAckObjectPu /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAlarmMessageAckPushType factory function for _AlarmMessageAckPushType -func NewAlarmMessageAckPushType(TimeStamp DateAndTime, functionId uint8, numberOfObjects uint8, messageObjects []AlarmMessageAckObjectPushType) *_AlarmMessageAckPushType { - return &_AlarmMessageAckPushType{TimeStamp: TimeStamp, FunctionId: functionId, NumberOfObjects: numberOfObjects, MessageObjects: messageObjects} +func NewAlarmMessageAckPushType( TimeStamp DateAndTime , functionId uint8 , numberOfObjects uint8 , messageObjects []AlarmMessageAckObjectPushType ) *_AlarmMessageAckPushType { +return &_AlarmMessageAckPushType{ TimeStamp: TimeStamp , FunctionId: functionId , NumberOfObjects: numberOfObjects , MessageObjects: messageObjects } } // Deprecated: use the interface for direct cast func CastAlarmMessageAckPushType(structType interface{}) AlarmMessageAckPushType { - if casted, ok := structType.(AlarmMessageAckPushType); ok { + if casted, ok := structType.(AlarmMessageAckPushType); ok { return casted } if casted, ok := structType.(*AlarmMessageAckPushType); ok { @@ -110,10 +114,10 @@ func (m *_AlarmMessageAckPushType) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += m.TimeStamp.GetLengthInBits(ctx) // Simple field (functionId) - lengthInBits += 8 + lengthInBits += 8; // Simple field (numberOfObjects) - lengthInBits += 8 + lengthInBits += 8; // Array field if len(m.MessageObjects) > 0 { @@ -121,13 +125,14 @@ func (m *_AlarmMessageAckPushType) GetLengthInBits(ctx context.Context) uint16 { arrayCtx := spiContext.CreateArrayContext(ctx, len(m.MessageObjects), _curItem) _ = arrayCtx _ = _curItem - lengthInBits += element.(interface{ GetLengthInBits(context.Context) uint16 }).GetLengthInBits(arrayCtx) + lengthInBits += element.(interface{GetLengthInBits(context.Context) uint16}).GetLengthInBits(arrayCtx) } } return lengthInBits } + func (m *_AlarmMessageAckPushType) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -149,7 +154,7 @@ func AlarmMessageAckPushTypeParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("TimeStamp"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for TimeStamp") } - _TimeStamp, _TimeStampErr := DateAndTimeParseWithBuffer(ctx, readBuffer) +_TimeStamp, _TimeStampErr := DateAndTimeParseWithBuffer(ctx, readBuffer) if _TimeStampErr != nil { return nil, errors.Wrap(_TimeStampErr, "Error parsing 'TimeStamp' field of AlarmMessageAckPushType") } @@ -159,14 +164,14 @@ func AlarmMessageAckPushTypeParseWithBuffer(ctx context.Context, readBuffer util } // Simple Field (functionId) - _functionId, _functionIdErr := readBuffer.ReadUint8("functionId", 8) +_functionId, _functionIdErr := readBuffer.ReadUint8("functionId", 8) if _functionIdErr != nil { return nil, errors.Wrap(_functionIdErr, "Error parsing 'functionId' field of AlarmMessageAckPushType") } functionId := _functionId // Simple Field (numberOfObjects) - _numberOfObjects, _numberOfObjectsErr := readBuffer.ReadUint8("numberOfObjects", 8) +_numberOfObjects, _numberOfObjectsErr := readBuffer.ReadUint8("numberOfObjects", 8) if _numberOfObjectsErr != nil { return nil, errors.Wrap(_numberOfObjectsErr, "Error parsing 'numberOfObjects' field of AlarmMessageAckPushType") } @@ -188,7 +193,7 @@ func AlarmMessageAckPushTypeParseWithBuffer(ctx context.Context, readBuffer util arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := AlarmMessageAckObjectPushTypeParseWithBuffer(arrayCtx, readBuffer) +_item, _err := AlarmMessageAckObjectPushTypeParseWithBuffer(arrayCtx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'messageObjects' field of AlarmMessageAckPushType") } @@ -205,11 +210,11 @@ func AlarmMessageAckPushTypeParseWithBuffer(ctx context.Context, readBuffer util // Create the instance return &_AlarmMessageAckPushType{ - TimeStamp: TimeStamp, - FunctionId: functionId, - NumberOfObjects: numberOfObjects, - MessageObjects: messageObjects, - }, nil + TimeStamp: TimeStamp, + FunctionId: functionId, + NumberOfObjects: numberOfObjects, + MessageObjects: messageObjects, + }, nil } func (m *_AlarmMessageAckPushType) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_AlarmMessageAckPushType) Serialize() ([]byte, error) { func (m *_AlarmMessageAckPushType) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("AlarmMessageAckPushType"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("AlarmMessageAckPushType"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for AlarmMessageAckPushType") } @@ -276,6 +281,7 @@ func (m *_AlarmMessageAckPushType) SerializeWithWriteBuffer(ctx context.Context, return nil } + func (m *_AlarmMessageAckPushType) isAlarmMessageAckPushType() bool { return true } @@ -290,3 +296,6 @@ func (m *_AlarmMessageAckPushType) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/AlarmMessageAckResponseType.go b/plc4go/protocols/s7/readwrite/model/AlarmMessageAckResponseType.go index bc6dd417158..c6ba84906b3 100644 --- a/plc4go/protocols/s7/readwrite/model/AlarmMessageAckResponseType.go +++ b/plc4go/protocols/s7/readwrite/model/AlarmMessageAckResponseType.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AlarmMessageAckResponseType is the corresponding interface of AlarmMessageAckResponseType type AlarmMessageAckResponseType interface { @@ -49,11 +51,12 @@ type AlarmMessageAckResponseTypeExactly interface { // _AlarmMessageAckResponseType is the data-structure of this message type _AlarmMessageAckResponseType struct { - FunctionId uint8 - NumberOfObjects uint8 - MessageObjects []uint8 + FunctionId uint8 + NumberOfObjects uint8 + MessageObjects []uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -76,14 +79,15 @@ func (m *_AlarmMessageAckResponseType) GetMessageObjects() []uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAlarmMessageAckResponseType factory function for _AlarmMessageAckResponseType -func NewAlarmMessageAckResponseType(functionId uint8, numberOfObjects uint8, messageObjects []uint8) *_AlarmMessageAckResponseType { - return &_AlarmMessageAckResponseType{FunctionId: functionId, NumberOfObjects: numberOfObjects, MessageObjects: messageObjects} +func NewAlarmMessageAckResponseType( functionId uint8 , numberOfObjects uint8 , messageObjects []uint8 ) *_AlarmMessageAckResponseType { +return &_AlarmMessageAckResponseType{ FunctionId: functionId , NumberOfObjects: numberOfObjects , MessageObjects: messageObjects } } // Deprecated: use the interface for direct cast func CastAlarmMessageAckResponseType(structType interface{}) AlarmMessageAckResponseType { - if casted, ok := structType.(AlarmMessageAckResponseType); ok { + if casted, ok := structType.(AlarmMessageAckResponseType); ok { return casted } if casted, ok := structType.(*AlarmMessageAckResponseType); ok { @@ -100,10 +104,10 @@ func (m *_AlarmMessageAckResponseType) GetLengthInBits(ctx context.Context) uint lengthInBits := uint16(0) // Simple field (functionId) - lengthInBits += 8 + lengthInBits += 8; // Simple field (numberOfObjects) - lengthInBits += 8 + lengthInBits += 8; // Array field if len(m.MessageObjects) > 0 { @@ -113,6 +117,7 @@ func (m *_AlarmMessageAckResponseType) GetLengthInBits(ctx context.Context) uint return lengthInBits } + func (m *_AlarmMessageAckResponseType) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -131,14 +136,14 @@ func AlarmMessageAckResponseTypeParseWithBuffer(ctx context.Context, readBuffer _ = currentPos // Simple Field (functionId) - _functionId, _functionIdErr := readBuffer.ReadUint8("functionId", 8) +_functionId, _functionIdErr := readBuffer.ReadUint8("functionId", 8) if _functionIdErr != nil { return nil, errors.Wrap(_functionIdErr, "Error parsing 'functionId' field of AlarmMessageAckResponseType") } functionId := _functionId // Simple Field (numberOfObjects) - _numberOfObjects, _numberOfObjectsErr := readBuffer.ReadUint8("numberOfObjects", 8) +_numberOfObjects, _numberOfObjectsErr := readBuffer.ReadUint8("numberOfObjects", 8) if _numberOfObjectsErr != nil { return nil, errors.Wrap(_numberOfObjectsErr, "Error parsing 'numberOfObjects' field of AlarmMessageAckResponseType") } @@ -160,7 +165,7 @@ func AlarmMessageAckResponseTypeParseWithBuffer(ctx context.Context, readBuffer arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := readBuffer.ReadUint8("", 8) +_item, _err := readBuffer.ReadUint8("", 8) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'messageObjects' field of AlarmMessageAckResponseType") } @@ -177,10 +182,10 @@ func AlarmMessageAckResponseTypeParseWithBuffer(ctx context.Context, readBuffer // Create the instance return &_AlarmMessageAckResponseType{ - FunctionId: functionId, - NumberOfObjects: numberOfObjects, - MessageObjects: messageObjects, - }, nil + FunctionId: functionId, + NumberOfObjects: numberOfObjects, + MessageObjects: messageObjects, + }, nil } func (m *_AlarmMessageAckResponseType) Serialize() ([]byte, error) { @@ -194,7 +199,7 @@ func (m *_AlarmMessageAckResponseType) Serialize() ([]byte, error) { func (m *_AlarmMessageAckResponseType) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("AlarmMessageAckResponseType"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("AlarmMessageAckResponseType"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for AlarmMessageAckResponseType") } @@ -233,6 +238,7 @@ func (m *_AlarmMessageAckResponseType) SerializeWithWriteBuffer(ctx context.Cont return nil } + func (m *_AlarmMessageAckResponseType) isAlarmMessageAckResponseType() bool { return true } @@ -247,3 +253,6 @@ func (m *_AlarmMessageAckResponseType) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/AlarmMessageAckType.go b/plc4go/protocols/s7/readwrite/model/AlarmMessageAckType.go index 1b35038bf64..8dbc12c7cb6 100644 --- a/plc4go/protocols/s7/readwrite/model/AlarmMessageAckType.go +++ b/plc4go/protocols/s7/readwrite/model/AlarmMessageAckType.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AlarmMessageAckType is the corresponding interface of AlarmMessageAckType type AlarmMessageAckType interface { @@ -49,11 +51,12 @@ type AlarmMessageAckTypeExactly interface { // _AlarmMessageAckType is the data-structure of this message type _AlarmMessageAckType struct { - FunctionId uint8 - NumberOfObjects uint8 - MessageObjects []AlarmMessageObjectAckType + FunctionId uint8 + NumberOfObjects uint8 + MessageObjects []AlarmMessageObjectAckType } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -76,14 +79,15 @@ func (m *_AlarmMessageAckType) GetMessageObjects() []AlarmMessageObjectAckType { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAlarmMessageAckType factory function for _AlarmMessageAckType -func NewAlarmMessageAckType(functionId uint8, numberOfObjects uint8, messageObjects []AlarmMessageObjectAckType) *_AlarmMessageAckType { - return &_AlarmMessageAckType{FunctionId: functionId, NumberOfObjects: numberOfObjects, MessageObjects: messageObjects} +func NewAlarmMessageAckType( functionId uint8 , numberOfObjects uint8 , messageObjects []AlarmMessageObjectAckType ) *_AlarmMessageAckType { +return &_AlarmMessageAckType{ FunctionId: functionId , NumberOfObjects: numberOfObjects , MessageObjects: messageObjects } } // Deprecated: use the interface for direct cast func CastAlarmMessageAckType(structType interface{}) AlarmMessageAckType { - if casted, ok := structType.(AlarmMessageAckType); ok { + if casted, ok := structType.(AlarmMessageAckType); ok { return casted } if casted, ok := structType.(*AlarmMessageAckType); ok { @@ -100,10 +104,10 @@ func (m *_AlarmMessageAckType) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (functionId) - lengthInBits += 8 + lengthInBits += 8; // Simple field (numberOfObjects) - lengthInBits += 8 + lengthInBits += 8; // Array field if len(m.MessageObjects) > 0 { @@ -111,13 +115,14 @@ func (m *_AlarmMessageAckType) GetLengthInBits(ctx context.Context) uint16 { arrayCtx := spiContext.CreateArrayContext(ctx, len(m.MessageObjects), _curItem) _ = arrayCtx _ = _curItem - lengthInBits += element.(interface{ GetLengthInBits(context.Context) uint16 }).GetLengthInBits(arrayCtx) + lengthInBits += element.(interface{GetLengthInBits(context.Context) uint16}).GetLengthInBits(arrayCtx) } } return lengthInBits } + func (m *_AlarmMessageAckType) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -136,14 +141,14 @@ func AlarmMessageAckTypeParseWithBuffer(ctx context.Context, readBuffer utils.Re _ = currentPos // Simple Field (functionId) - _functionId, _functionIdErr := readBuffer.ReadUint8("functionId", 8) +_functionId, _functionIdErr := readBuffer.ReadUint8("functionId", 8) if _functionIdErr != nil { return nil, errors.Wrap(_functionIdErr, "Error parsing 'functionId' field of AlarmMessageAckType") } functionId := _functionId // Simple Field (numberOfObjects) - _numberOfObjects, _numberOfObjectsErr := readBuffer.ReadUint8("numberOfObjects", 8) +_numberOfObjects, _numberOfObjectsErr := readBuffer.ReadUint8("numberOfObjects", 8) if _numberOfObjectsErr != nil { return nil, errors.Wrap(_numberOfObjectsErr, "Error parsing 'numberOfObjects' field of AlarmMessageAckType") } @@ -165,7 +170,7 @@ func AlarmMessageAckTypeParseWithBuffer(ctx context.Context, readBuffer utils.Re arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := AlarmMessageObjectAckTypeParseWithBuffer(arrayCtx, readBuffer) +_item, _err := AlarmMessageObjectAckTypeParseWithBuffer(arrayCtx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'messageObjects' field of AlarmMessageAckType") } @@ -182,10 +187,10 @@ func AlarmMessageAckTypeParseWithBuffer(ctx context.Context, readBuffer utils.Re // Create the instance return &_AlarmMessageAckType{ - FunctionId: functionId, - NumberOfObjects: numberOfObjects, - MessageObjects: messageObjects, - }, nil + FunctionId: functionId, + NumberOfObjects: numberOfObjects, + MessageObjects: messageObjects, + }, nil } func (m *_AlarmMessageAckType) Serialize() ([]byte, error) { @@ -199,7 +204,7 @@ func (m *_AlarmMessageAckType) Serialize() ([]byte, error) { func (m *_AlarmMessageAckType) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("AlarmMessageAckType"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("AlarmMessageAckType"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for AlarmMessageAckType") } @@ -240,6 +245,7 @@ func (m *_AlarmMessageAckType) SerializeWithWriteBuffer(ctx context.Context, wri return nil } + func (m *_AlarmMessageAckType) isAlarmMessageAckType() bool { return true } @@ -254,3 +260,6 @@ func (m *_AlarmMessageAckType) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/AlarmMessageObjectAckType.go b/plc4go/protocols/s7/readwrite/model/AlarmMessageObjectAckType.go index 7b16632090c..cdef1828acf 100644 --- a/plc4go/protocols/s7/readwrite/model/AlarmMessageObjectAckType.go +++ b/plc4go/protocols/s7/readwrite/model/AlarmMessageObjectAckType.go @@ -19,6 +19,7 @@ package model + import ( "context" "fmt" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const AlarmMessageObjectAckType_VARIABLESPEC uint8 = 0x12 @@ -57,13 +59,14 @@ type AlarmMessageObjectAckTypeExactly interface { // _AlarmMessageObjectAckType is the data-structure of this message type _AlarmMessageObjectAckType struct { - SyntaxId SyntaxIdType - NumberOfValues uint8 - EventId uint32 - AckStateGoing State - AckStateComing State + SyntaxId SyntaxIdType + NumberOfValues uint8 + EventId uint32 + AckStateGoing State + AckStateComing State } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -111,14 +114,15 @@ func (m *_AlarmMessageObjectAckType) GetLength() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAlarmMessageObjectAckType factory function for _AlarmMessageObjectAckType -func NewAlarmMessageObjectAckType(syntaxId SyntaxIdType, numberOfValues uint8, eventId uint32, ackStateGoing State, ackStateComing State) *_AlarmMessageObjectAckType { - return &_AlarmMessageObjectAckType{SyntaxId: syntaxId, NumberOfValues: numberOfValues, EventId: eventId, AckStateGoing: ackStateGoing, AckStateComing: ackStateComing} +func NewAlarmMessageObjectAckType( syntaxId SyntaxIdType , numberOfValues uint8 , eventId uint32 , ackStateGoing State , ackStateComing State ) *_AlarmMessageObjectAckType { +return &_AlarmMessageObjectAckType{ SyntaxId: syntaxId , NumberOfValues: numberOfValues , EventId: eventId , AckStateGoing: ackStateGoing , AckStateComing: ackStateComing } } // Deprecated: use the interface for direct cast func CastAlarmMessageObjectAckType(structType interface{}) AlarmMessageObjectAckType { - if casted, ok := structType.(AlarmMessageObjectAckType); ok { + if casted, ok := structType.(AlarmMessageObjectAckType); ok { return casted } if casted, ok := structType.(*AlarmMessageObjectAckType); ok { @@ -144,10 +148,10 @@ func (m *_AlarmMessageObjectAckType) GetLengthInBits(ctx context.Context) uint16 lengthInBits += 8 // Simple field (numberOfValues) - lengthInBits += 8 + lengthInBits += 8; // Simple field (eventId) - lengthInBits += 32 + lengthInBits += 32; // Simple field (ackStateGoing) lengthInBits += m.AckStateGoing.GetLengthInBits(ctx) @@ -158,6 +162,7 @@ func (m *_AlarmMessageObjectAckType) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } + func (m *_AlarmMessageObjectAckType) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -197,7 +202,7 @@ func AlarmMessageObjectAckTypeParseWithBuffer(ctx context.Context, readBuffer ut if pullErr := readBuffer.PullContext("syntaxId"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for syntaxId") } - _syntaxId, _syntaxIdErr := SyntaxIdTypeParseWithBuffer(ctx, readBuffer) +_syntaxId, _syntaxIdErr := SyntaxIdTypeParseWithBuffer(ctx, readBuffer) if _syntaxIdErr != nil { return nil, errors.Wrap(_syntaxIdErr, "Error parsing 'syntaxId' field of AlarmMessageObjectAckType") } @@ -207,14 +212,14 @@ func AlarmMessageObjectAckTypeParseWithBuffer(ctx context.Context, readBuffer ut } // Simple Field (numberOfValues) - _numberOfValues, _numberOfValuesErr := readBuffer.ReadUint8("numberOfValues", 8) +_numberOfValues, _numberOfValuesErr := readBuffer.ReadUint8("numberOfValues", 8) if _numberOfValuesErr != nil { return nil, errors.Wrap(_numberOfValuesErr, "Error parsing 'numberOfValues' field of AlarmMessageObjectAckType") } numberOfValues := _numberOfValues // Simple Field (eventId) - _eventId, _eventIdErr := readBuffer.ReadUint32("eventId", 32) +_eventId, _eventIdErr := readBuffer.ReadUint32("eventId", 32) if _eventIdErr != nil { return nil, errors.Wrap(_eventIdErr, "Error parsing 'eventId' field of AlarmMessageObjectAckType") } @@ -224,7 +229,7 @@ func AlarmMessageObjectAckTypeParseWithBuffer(ctx context.Context, readBuffer ut if pullErr := readBuffer.PullContext("ackStateGoing"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for ackStateGoing") } - _ackStateGoing, _ackStateGoingErr := StateParseWithBuffer(ctx, readBuffer) +_ackStateGoing, _ackStateGoingErr := StateParseWithBuffer(ctx, readBuffer) if _ackStateGoingErr != nil { return nil, errors.Wrap(_ackStateGoingErr, "Error parsing 'ackStateGoing' field of AlarmMessageObjectAckType") } @@ -237,7 +242,7 @@ func AlarmMessageObjectAckTypeParseWithBuffer(ctx context.Context, readBuffer ut if pullErr := readBuffer.PullContext("ackStateComing"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for ackStateComing") } - _ackStateComing, _ackStateComingErr := StateParseWithBuffer(ctx, readBuffer) +_ackStateComing, _ackStateComingErr := StateParseWithBuffer(ctx, readBuffer) if _ackStateComingErr != nil { return nil, errors.Wrap(_ackStateComingErr, "Error parsing 'ackStateComing' field of AlarmMessageObjectAckType") } @@ -252,12 +257,12 @@ func AlarmMessageObjectAckTypeParseWithBuffer(ctx context.Context, readBuffer ut // Create the instance return &_AlarmMessageObjectAckType{ - SyntaxId: syntaxId, - NumberOfValues: numberOfValues, - EventId: eventId, - AckStateGoing: ackStateGoing, - AckStateComing: ackStateComing, - }, nil + SyntaxId: syntaxId, + NumberOfValues: numberOfValues, + EventId: eventId, + AckStateGoing: ackStateGoing, + AckStateComing: ackStateComing, + }, nil } func (m *_AlarmMessageObjectAckType) Serialize() ([]byte, error) { @@ -271,7 +276,7 @@ func (m *_AlarmMessageObjectAckType) Serialize() ([]byte, error) { func (m *_AlarmMessageObjectAckType) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("AlarmMessageObjectAckType"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("AlarmMessageObjectAckType"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for AlarmMessageObjectAckType") } @@ -343,6 +348,7 @@ func (m *_AlarmMessageObjectAckType) SerializeWithWriteBuffer(ctx context.Contex return nil } + func (m *_AlarmMessageObjectAckType) isAlarmMessageObjectAckType() bool { return true } @@ -357,3 +363,6 @@ func (m *_AlarmMessageObjectAckType) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/AlarmMessageObjectPushType.go b/plc4go/protocols/s7/readwrite/model/AlarmMessageObjectPushType.go index 0eae69d3a12..f4f474ad021 100644 --- a/plc4go/protocols/s7/readwrite/model/AlarmMessageObjectPushType.go +++ b/plc4go/protocols/s7/readwrite/model/AlarmMessageObjectPushType.go @@ -19,15 +19,17 @@ package model + import ( "context" "fmt" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const AlarmMessageObjectPushType_VARIABLESPEC uint8 = 0x12 @@ -65,17 +67,18 @@ type AlarmMessageObjectPushTypeExactly interface { // _AlarmMessageObjectPushType is the data-structure of this message type _AlarmMessageObjectPushType struct { - LengthSpec uint8 - SyntaxId SyntaxIdType - NumberOfValues uint8 - EventId uint32 - EventState State - LocalState State - AckStateGoing State - AckStateComing State - AssociatedValues []AssociatedValueType + LengthSpec uint8 + SyntaxId SyntaxIdType + NumberOfValues uint8 + EventId uint32 + EventState State + LocalState State + AckStateGoing State + AckStateComing State + AssociatedValues []AssociatedValueType } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -135,14 +138,15 @@ func (m *_AlarmMessageObjectPushType) GetVariableSpec() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAlarmMessageObjectPushType factory function for _AlarmMessageObjectPushType -func NewAlarmMessageObjectPushType(lengthSpec uint8, syntaxId SyntaxIdType, numberOfValues uint8, eventId uint32, eventState State, localState State, ackStateGoing State, ackStateComing State, AssociatedValues []AssociatedValueType) *_AlarmMessageObjectPushType { - return &_AlarmMessageObjectPushType{LengthSpec: lengthSpec, SyntaxId: syntaxId, NumberOfValues: numberOfValues, EventId: eventId, EventState: eventState, LocalState: localState, AckStateGoing: ackStateGoing, AckStateComing: ackStateComing, AssociatedValues: AssociatedValues} +func NewAlarmMessageObjectPushType( lengthSpec uint8 , syntaxId SyntaxIdType , numberOfValues uint8 , eventId uint32 , eventState State , localState State , ackStateGoing State , ackStateComing State , AssociatedValues []AssociatedValueType ) *_AlarmMessageObjectPushType { +return &_AlarmMessageObjectPushType{ LengthSpec: lengthSpec , SyntaxId: syntaxId , NumberOfValues: numberOfValues , EventId: eventId , EventState: eventState , LocalState: localState , AckStateGoing: ackStateGoing , AckStateComing: ackStateComing , AssociatedValues: AssociatedValues } } // Deprecated: use the interface for direct cast func CastAlarmMessageObjectPushType(structType interface{}) AlarmMessageObjectPushType { - if casted, ok := structType.(AlarmMessageObjectPushType); ok { + if casted, ok := structType.(AlarmMessageObjectPushType); ok { return casted } if casted, ok := structType.(*AlarmMessageObjectPushType); ok { @@ -162,16 +166,16 @@ func (m *_AlarmMessageObjectPushType) GetLengthInBits(ctx context.Context) uint1 lengthInBits += 8 // Simple field (lengthSpec) - lengthInBits += 8 + lengthInBits += 8; // Simple field (syntaxId) lengthInBits += 8 // Simple field (numberOfValues) - lengthInBits += 8 + lengthInBits += 8; // Simple field (eventId) - lengthInBits += 32 + lengthInBits += 32; // Simple field (eventState) lengthInBits += m.EventState.GetLengthInBits(ctx) @@ -191,13 +195,14 @@ func (m *_AlarmMessageObjectPushType) GetLengthInBits(ctx context.Context) uint1 arrayCtx := spiContext.CreateArrayContext(ctx, len(m.AssociatedValues), _curItem) _ = arrayCtx _ = _curItem - lengthInBits += element.(interface{ GetLengthInBits(context.Context) uint16 }).GetLengthInBits(arrayCtx) + lengthInBits += element.(interface{GetLengthInBits(context.Context) uint16}).GetLengthInBits(arrayCtx) } } return lengthInBits } + func (m *_AlarmMessageObjectPushType) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -225,7 +230,7 @@ func AlarmMessageObjectPushTypeParseWithBuffer(ctx context.Context, readBuffer u } // Simple Field (lengthSpec) - _lengthSpec, _lengthSpecErr := readBuffer.ReadUint8("lengthSpec", 8) +_lengthSpec, _lengthSpecErr := readBuffer.ReadUint8("lengthSpec", 8) if _lengthSpecErr != nil { return nil, errors.Wrap(_lengthSpecErr, "Error parsing 'lengthSpec' field of AlarmMessageObjectPushType") } @@ -235,7 +240,7 @@ func AlarmMessageObjectPushTypeParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("syntaxId"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for syntaxId") } - _syntaxId, _syntaxIdErr := SyntaxIdTypeParseWithBuffer(ctx, readBuffer) +_syntaxId, _syntaxIdErr := SyntaxIdTypeParseWithBuffer(ctx, readBuffer) if _syntaxIdErr != nil { return nil, errors.Wrap(_syntaxIdErr, "Error parsing 'syntaxId' field of AlarmMessageObjectPushType") } @@ -245,14 +250,14 @@ func AlarmMessageObjectPushTypeParseWithBuffer(ctx context.Context, readBuffer u } // Simple Field (numberOfValues) - _numberOfValues, _numberOfValuesErr := readBuffer.ReadUint8("numberOfValues", 8) +_numberOfValues, _numberOfValuesErr := readBuffer.ReadUint8("numberOfValues", 8) if _numberOfValuesErr != nil { return nil, errors.Wrap(_numberOfValuesErr, "Error parsing 'numberOfValues' field of AlarmMessageObjectPushType") } numberOfValues := _numberOfValues // Simple Field (eventId) - _eventId, _eventIdErr := readBuffer.ReadUint32("eventId", 32) +_eventId, _eventIdErr := readBuffer.ReadUint32("eventId", 32) if _eventIdErr != nil { return nil, errors.Wrap(_eventIdErr, "Error parsing 'eventId' field of AlarmMessageObjectPushType") } @@ -262,7 +267,7 @@ func AlarmMessageObjectPushTypeParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("eventState"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for eventState") } - _eventState, _eventStateErr := StateParseWithBuffer(ctx, readBuffer) +_eventState, _eventStateErr := StateParseWithBuffer(ctx, readBuffer) if _eventStateErr != nil { return nil, errors.Wrap(_eventStateErr, "Error parsing 'eventState' field of AlarmMessageObjectPushType") } @@ -275,7 +280,7 @@ func AlarmMessageObjectPushTypeParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("localState"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for localState") } - _localState, _localStateErr := StateParseWithBuffer(ctx, readBuffer) +_localState, _localStateErr := StateParseWithBuffer(ctx, readBuffer) if _localStateErr != nil { return nil, errors.Wrap(_localStateErr, "Error parsing 'localState' field of AlarmMessageObjectPushType") } @@ -288,7 +293,7 @@ func AlarmMessageObjectPushTypeParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("ackStateGoing"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for ackStateGoing") } - _ackStateGoing, _ackStateGoingErr := StateParseWithBuffer(ctx, readBuffer) +_ackStateGoing, _ackStateGoingErr := StateParseWithBuffer(ctx, readBuffer) if _ackStateGoingErr != nil { return nil, errors.Wrap(_ackStateGoingErr, "Error parsing 'ackStateGoing' field of AlarmMessageObjectPushType") } @@ -301,7 +306,7 @@ func AlarmMessageObjectPushTypeParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("ackStateComing"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for ackStateComing") } - _ackStateComing, _ackStateComingErr := StateParseWithBuffer(ctx, readBuffer) +_ackStateComing, _ackStateComingErr := StateParseWithBuffer(ctx, readBuffer) if _ackStateComingErr != nil { return nil, errors.Wrap(_ackStateComingErr, "Error parsing 'ackStateComing' field of AlarmMessageObjectPushType") } @@ -326,7 +331,7 @@ func AlarmMessageObjectPushTypeParseWithBuffer(ctx context.Context, readBuffer u arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := AssociatedValueTypeParseWithBuffer(arrayCtx, readBuffer) +_item, _err := AssociatedValueTypeParseWithBuffer(arrayCtx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'AssociatedValues' field of AlarmMessageObjectPushType") } @@ -343,16 +348,16 @@ func AlarmMessageObjectPushTypeParseWithBuffer(ctx context.Context, readBuffer u // Create the instance return &_AlarmMessageObjectPushType{ - LengthSpec: lengthSpec, - SyntaxId: syntaxId, - NumberOfValues: numberOfValues, - EventId: eventId, - EventState: eventState, - LocalState: localState, - AckStateGoing: ackStateGoing, - AckStateComing: ackStateComing, - AssociatedValues: AssociatedValues, - }, nil + LengthSpec: lengthSpec, + SyntaxId: syntaxId, + NumberOfValues: numberOfValues, + EventId: eventId, + EventState: eventState, + LocalState: localState, + AckStateGoing: ackStateGoing, + AckStateComing: ackStateComing, + AssociatedValues: AssociatedValues, + }, nil } func (m *_AlarmMessageObjectPushType) Serialize() ([]byte, error) { @@ -366,7 +371,7 @@ func (m *_AlarmMessageObjectPushType) Serialize() ([]byte, error) { func (m *_AlarmMessageObjectPushType) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("AlarmMessageObjectPushType"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("AlarmMessageObjectPushType"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for AlarmMessageObjectPushType") } @@ -480,6 +485,7 @@ func (m *_AlarmMessageObjectPushType) SerializeWithWriteBuffer(ctx context.Conte return nil } + func (m *_AlarmMessageObjectPushType) isAlarmMessageObjectPushType() bool { return true } @@ -494,3 +500,6 @@ func (m *_AlarmMessageObjectPushType) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/AlarmMessageObjectQueryType.go b/plc4go/protocols/s7/readwrite/model/AlarmMessageObjectQueryType.go index cbced01a49f..ed0427f9402 100644 --- a/plc4go/protocols/s7/readwrite/model/AlarmMessageObjectQueryType.go +++ b/plc4go/protocols/s7/readwrite/model/AlarmMessageObjectQueryType.go @@ -19,6 +19,7 @@ package model + import ( "context" "fmt" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const AlarmMessageObjectQueryType_VARIABLESPEC uint8 = 0x12 @@ -62,18 +64,19 @@ type AlarmMessageObjectQueryTypeExactly interface { // _AlarmMessageObjectQueryType is the data-structure of this message type _AlarmMessageObjectQueryType struct { - LengthDataset uint8 - EventState State - AckStateGoing State - AckStateComing State - TimeComing DateAndTime - ValueComing AssociatedValueType - TimeGoing DateAndTime - ValueGoing AssociatedValueType + LengthDataset uint8 + EventState State + AckStateGoing State + AckStateComing State + TimeComing DateAndTime + ValueComing AssociatedValueType + TimeGoing DateAndTime + ValueGoing AssociatedValueType // Reserved Fields reservedField0 *uint16 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -129,14 +132,15 @@ func (m *_AlarmMessageObjectQueryType) GetVariableSpec() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAlarmMessageObjectQueryType factory function for _AlarmMessageObjectQueryType -func NewAlarmMessageObjectQueryType(lengthDataset uint8, eventState State, ackStateGoing State, ackStateComing State, timeComing DateAndTime, valueComing AssociatedValueType, timeGoing DateAndTime, valueGoing AssociatedValueType) *_AlarmMessageObjectQueryType { - return &_AlarmMessageObjectQueryType{LengthDataset: lengthDataset, EventState: eventState, AckStateGoing: ackStateGoing, AckStateComing: ackStateComing, TimeComing: timeComing, ValueComing: valueComing, TimeGoing: timeGoing, ValueGoing: valueGoing} +func NewAlarmMessageObjectQueryType( lengthDataset uint8 , eventState State , ackStateGoing State , ackStateComing State , timeComing DateAndTime , valueComing AssociatedValueType , timeGoing DateAndTime , valueGoing AssociatedValueType ) *_AlarmMessageObjectQueryType { +return &_AlarmMessageObjectQueryType{ LengthDataset: lengthDataset , EventState: eventState , AckStateGoing: ackStateGoing , AckStateComing: ackStateComing , TimeComing: timeComing , ValueComing: valueComing , TimeGoing: timeGoing , ValueGoing: valueGoing } } // Deprecated: use the interface for direct cast func CastAlarmMessageObjectQueryType(structType interface{}) AlarmMessageObjectQueryType { - if casted, ok := structType.(AlarmMessageObjectQueryType); ok { + if casted, ok := structType.(AlarmMessageObjectQueryType); ok { return casted } if casted, ok := structType.(*AlarmMessageObjectQueryType); ok { @@ -153,7 +157,7 @@ func (m *_AlarmMessageObjectQueryType) GetLengthInBits(ctx context.Context) uint lengthInBits := uint16(0) // Simple field (lengthDataset) - lengthInBits += 8 + lengthInBits += 8; // Reserved Field (reserved) lengthInBits += 16 @@ -185,6 +189,7 @@ func (m *_AlarmMessageObjectQueryType) GetLengthInBits(ctx context.Context) uint return lengthInBits } + func (m *_AlarmMessageObjectQueryType) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -203,7 +208,7 @@ func AlarmMessageObjectQueryTypeParseWithBuffer(ctx context.Context, readBuffer _ = currentPos // Simple Field (lengthDataset) - _lengthDataset, _lengthDatasetErr := readBuffer.ReadUint8("lengthDataset", 8) +_lengthDataset, _lengthDatasetErr := readBuffer.ReadUint8("lengthDataset", 8) if _lengthDatasetErr != nil { return nil, errors.Wrap(_lengthDatasetErr, "Error parsing 'lengthDataset' field of AlarmMessageObjectQueryType") } @@ -219,7 +224,7 @@ func AlarmMessageObjectQueryTypeParseWithBuffer(ctx context.Context, readBuffer if reserved != uint16(0x0000) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint16(0x0000), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -239,7 +244,7 @@ func AlarmMessageObjectQueryTypeParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("eventState"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for eventState") } - _eventState, _eventStateErr := StateParseWithBuffer(ctx, readBuffer) +_eventState, _eventStateErr := StateParseWithBuffer(ctx, readBuffer) if _eventStateErr != nil { return nil, errors.Wrap(_eventStateErr, "Error parsing 'eventState' field of AlarmMessageObjectQueryType") } @@ -252,7 +257,7 @@ func AlarmMessageObjectQueryTypeParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("ackStateGoing"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for ackStateGoing") } - _ackStateGoing, _ackStateGoingErr := StateParseWithBuffer(ctx, readBuffer) +_ackStateGoing, _ackStateGoingErr := StateParseWithBuffer(ctx, readBuffer) if _ackStateGoingErr != nil { return nil, errors.Wrap(_ackStateGoingErr, "Error parsing 'ackStateGoing' field of AlarmMessageObjectQueryType") } @@ -265,7 +270,7 @@ func AlarmMessageObjectQueryTypeParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("ackStateComing"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for ackStateComing") } - _ackStateComing, _ackStateComingErr := StateParseWithBuffer(ctx, readBuffer) +_ackStateComing, _ackStateComingErr := StateParseWithBuffer(ctx, readBuffer) if _ackStateComingErr != nil { return nil, errors.Wrap(_ackStateComingErr, "Error parsing 'ackStateComing' field of AlarmMessageObjectQueryType") } @@ -278,7 +283,7 @@ func AlarmMessageObjectQueryTypeParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("timeComing"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeComing") } - _timeComing, _timeComingErr := DateAndTimeParseWithBuffer(ctx, readBuffer) +_timeComing, _timeComingErr := DateAndTimeParseWithBuffer(ctx, readBuffer) if _timeComingErr != nil { return nil, errors.Wrap(_timeComingErr, "Error parsing 'timeComing' field of AlarmMessageObjectQueryType") } @@ -291,7 +296,7 @@ func AlarmMessageObjectQueryTypeParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("valueComing"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for valueComing") } - _valueComing, _valueComingErr := AssociatedValueTypeParseWithBuffer(ctx, readBuffer) +_valueComing, _valueComingErr := AssociatedValueTypeParseWithBuffer(ctx, readBuffer) if _valueComingErr != nil { return nil, errors.Wrap(_valueComingErr, "Error parsing 'valueComing' field of AlarmMessageObjectQueryType") } @@ -304,7 +309,7 @@ func AlarmMessageObjectQueryTypeParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("timeGoing"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for timeGoing") } - _timeGoing, _timeGoingErr := DateAndTimeParseWithBuffer(ctx, readBuffer) +_timeGoing, _timeGoingErr := DateAndTimeParseWithBuffer(ctx, readBuffer) if _timeGoingErr != nil { return nil, errors.Wrap(_timeGoingErr, "Error parsing 'timeGoing' field of AlarmMessageObjectQueryType") } @@ -317,7 +322,7 @@ func AlarmMessageObjectQueryTypeParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("valueGoing"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for valueGoing") } - _valueGoing, _valueGoingErr := AssociatedValueTypeParseWithBuffer(ctx, readBuffer) +_valueGoing, _valueGoingErr := AssociatedValueTypeParseWithBuffer(ctx, readBuffer) if _valueGoingErr != nil { return nil, errors.Wrap(_valueGoingErr, "Error parsing 'valueGoing' field of AlarmMessageObjectQueryType") } @@ -332,16 +337,16 @@ func AlarmMessageObjectQueryTypeParseWithBuffer(ctx context.Context, readBuffer // Create the instance return &_AlarmMessageObjectQueryType{ - LengthDataset: lengthDataset, - EventState: eventState, - AckStateGoing: ackStateGoing, - AckStateComing: ackStateComing, - TimeComing: timeComing, - ValueComing: valueComing, - TimeGoing: timeGoing, - ValueGoing: valueGoing, - reservedField0: reservedField0, - }, nil + LengthDataset: lengthDataset, + EventState: eventState, + AckStateGoing: ackStateGoing, + AckStateComing: ackStateComing, + TimeComing: timeComing, + ValueComing: valueComing, + TimeGoing: timeGoing, + ValueGoing: valueGoing, + reservedField0: reservedField0, + }, nil } func (m *_AlarmMessageObjectQueryType) Serialize() ([]byte, error) { @@ -355,7 +360,7 @@ func (m *_AlarmMessageObjectQueryType) Serialize() ([]byte, error) { func (m *_AlarmMessageObjectQueryType) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("AlarmMessageObjectQueryType"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("AlarmMessageObjectQueryType"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for AlarmMessageObjectQueryType") } @@ -372,7 +377,7 @@ func (m *_AlarmMessageObjectQueryType) SerializeWithWriteBuffer(ctx context.Cont if m.reservedField0 != nil { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint16(0x0000), - "got value": reserved, + "got value": reserved, }).Msg("Overriding reserved field with unexpected value.") reserved = *m.reservedField0 } @@ -478,6 +483,7 @@ func (m *_AlarmMessageObjectQueryType) SerializeWithWriteBuffer(ctx context.Cont return nil } + func (m *_AlarmMessageObjectQueryType) isAlarmMessageObjectQueryType() bool { return true } @@ -492,3 +498,6 @@ func (m *_AlarmMessageObjectQueryType) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/AlarmMessagePushType.go b/plc4go/protocols/s7/readwrite/model/AlarmMessagePushType.go index 496cdadd45a..159b3ef7add 100644 --- a/plc4go/protocols/s7/readwrite/model/AlarmMessagePushType.go +++ b/plc4go/protocols/s7/readwrite/model/AlarmMessagePushType.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AlarmMessagePushType is the corresponding interface of AlarmMessagePushType type AlarmMessagePushType interface { @@ -51,12 +53,13 @@ type AlarmMessagePushTypeExactly interface { // _AlarmMessagePushType is the data-structure of this message type _AlarmMessagePushType struct { - TimeStamp DateAndTime - FunctionId uint8 - NumberOfObjects uint8 - MessageObjects []AlarmMessageObjectPushType + TimeStamp DateAndTime + FunctionId uint8 + NumberOfObjects uint8 + MessageObjects []AlarmMessageObjectPushType } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,14 +86,15 @@ func (m *_AlarmMessagePushType) GetMessageObjects() []AlarmMessageObjectPushType /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAlarmMessagePushType factory function for _AlarmMessagePushType -func NewAlarmMessagePushType(TimeStamp DateAndTime, functionId uint8, numberOfObjects uint8, messageObjects []AlarmMessageObjectPushType) *_AlarmMessagePushType { - return &_AlarmMessagePushType{TimeStamp: TimeStamp, FunctionId: functionId, NumberOfObjects: numberOfObjects, MessageObjects: messageObjects} +func NewAlarmMessagePushType( TimeStamp DateAndTime , functionId uint8 , numberOfObjects uint8 , messageObjects []AlarmMessageObjectPushType ) *_AlarmMessagePushType { +return &_AlarmMessagePushType{ TimeStamp: TimeStamp , FunctionId: functionId , NumberOfObjects: numberOfObjects , MessageObjects: messageObjects } } // Deprecated: use the interface for direct cast func CastAlarmMessagePushType(structType interface{}) AlarmMessagePushType { - if casted, ok := structType.(AlarmMessagePushType); ok { + if casted, ok := structType.(AlarmMessagePushType); ok { return casted } if casted, ok := structType.(*AlarmMessagePushType); ok { @@ -110,10 +114,10 @@ func (m *_AlarmMessagePushType) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += m.TimeStamp.GetLengthInBits(ctx) // Simple field (functionId) - lengthInBits += 8 + lengthInBits += 8; // Simple field (numberOfObjects) - lengthInBits += 8 + lengthInBits += 8; // Array field if len(m.MessageObjects) > 0 { @@ -121,13 +125,14 @@ func (m *_AlarmMessagePushType) GetLengthInBits(ctx context.Context) uint16 { arrayCtx := spiContext.CreateArrayContext(ctx, len(m.MessageObjects), _curItem) _ = arrayCtx _ = _curItem - lengthInBits += element.(interface{ GetLengthInBits(context.Context) uint16 }).GetLengthInBits(arrayCtx) + lengthInBits += element.(interface{GetLengthInBits(context.Context) uint16}).GetLengthInBits(arrayCtx) } } return lengthInBits } + func (m *_AlarmMessagePushType) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -149,7 +154,7 @@ func AlarmMessagePushTypeParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("TimeStamp"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for TimeStamp") } - _TimeStamp, _TimeStampErr := DateAndTimeParseWithBuffer(ctx, readBuffer) +_TimeStamp, _TimeStampErr := DateAndTimeParseWithBuffer(ctx, readBuffer) if _TimeStampErr != nil { return nil, errors.Wrap(_TimeStampErr, "Error parsing 'TimeStamp' field of AlarmMessagePushType") } @@ -159,14 +164,14 @@ func AlarmMessagePushTypeParseWithBuffer(ctx context.Context, readBuffer utils.R } // Simple Field (functionId) - _functionId, _functionIdErr := readBuffer.ReadUint8("functionId", 8) +_functionId, _functionIdErr := readBuffer.ReadUint8("functionId", 8) if _functionIdErr != nil { return nil, errors.Wrap(_functionIdErr, "Error parsing 'functionId' field of AlarmMessagePushType") } functionId := _functionId // Simple Field (numberOfObjects) - _numberOfObjects, _numberOfObjectsErr := readBuffer.ReadUint8("numberOfObjects", 8) +_numberOfObjects, _numberOfObjectsErr := readBuffer.ReadUint8("numberOfObjects", 8) if _numberOfObjectsErr != nil { return nil, errors.Wrap(_numberOfObjectsErr, "Error parsing 'numberOfObjects' field of AlarmMessagePushType") } @@ -188,7 +193,7 @@ func AlarmMessagePushTypeParseWithBuffer(ctx context.Context, readBuffer utils.R arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := AlarmMessageObjectPushTypeParseWithBuffer(arrayCtx, readBuffer) +_item, _err := AlarmMessageObjectPushTypeParseWithBuffer(arrayCtx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'messageObjects' field of AlarmMessagePushType") } @@ -205,11 +210,11 @@ func AlarmMessagePushTypeParseWithBuffer(ctx context.Context, readBuffer utils.R // Create the instance return &_AlarmMessagePushType{ - TimeStamp: TimeStamp, - FunctionId: functionId, - NumberOfObjects: numberOfObjects, - MessageObjects: messageObjects, - }, nil + TimeStamp: TimeStamp, + FunctionId: functionId, + NumberOfObjects: numberOfObjects, + MessageObjects: messageObjects, + }, nil } func (m *_AlarmMessagePushType) Serialize() ([]byte, error) { @@ -223,7 +228,7 @@ func (m *_AlarmMessagePushType) Serialize() ([]byte, error) { func (m *_AlarmMessagePushType) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("AlarmMessagePushType"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("AlarmMessagePushType"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for AlarmMessagePushType") } @@ -276,6 +281,7 @@ func (m *_AlarmMessagePushType) SerializeWithWriteBuffer(ctx context.Context, wr return nil } + func (m *_AlarmMessagePushType) isAlarmMessagePushType() bool { return true } @@ -290,3 +296,6 @@ func (m *_AlarmMessagePushType) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/AlarmMessageQueryType.go b/plc4go/protocols/s7/readwrite/model/AlarmMessageQueryType.go index 62570524479..9d39c630ed6 100644 --- a/plc4go/protocols/s7/readwrite/model/AlarmMessageQueryType.go +++ b/plc4go/protocols/s7/readwrite/model/AlarmMessageQueryType.go @@ -19,15 +19,17 @@ package model + import ( "context" "fmt" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const AlarmMessageQueryType_DATALENGTH uint16 = 0xFFFF @@ -57,13 +59,14 @@ type AlarmMessageQueryTypeExactly interface { // _AlarmMessageQueryType is the data-structure of this message type _AlarmMessageQueryType struct { - FunctionId uint8 - NumberOfObjects uint8 - ReturnCode DataTransportErrorCode - TransportSize DataTransportSize - MessageObjects []AlarmMessageObjectQueryType + FunctionId uint8 + NumberOfObjects uint8 + ReturnCode DataTransportErrorCode + TransportSize DataTransportSize + MessageObjects []AlarmMessageObjectQueryType } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -107,14 +110,15 @@ func (m *_AlarmMessageQueryType) GetDataLength() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAlarmMessageQueryType factory function for _AlarmMessageQueryType -func NewAlarmMessageQueryType(functionId uint8, numberOfObjects uint8, returnCode DataTransportErrorCode, transportSize DataTransportSize, messageObjects []AlarmMessageObjectQueryType) *_AlarmMessageQueryType { - return &_AlarmMessageQueryType{FunctionId: functionId, NumberOfObjects: numberOfObjects, ReturnCode: returnCode, TransportSize: transportSize, MessageObjects: messageObjects} +func NewAlarmMessageQueryType( functionId uint8 , numberOfObjects uint8 , returnCode DataTransportErrorCode , transportSize DataTransportSize , messageObjects []AlarmMessageObjectQueryType ) *_AlarmMessageQueryType { +return &_AlarmMessageQueryType{ FunctionId: functionId , NumberOfObjects: numberOfObjects , ReturnCode: returnCode , TransportSize: transportSize , MessageObjects: messageObjects } } // Deprecated: use the interface for direct cast func CastAlarmMessageQueryType(structType interface{}) AlarmMessageQueryType { - if casted, ok := structType.(AlarmMessageQueryType); ok { + if casted, ok := structType.(AlarmMessageQueryType); ok { return casted } if casted, ok := structType.(*AlarmMessageQueryType); ok { @@ -131,10 +135,10 @@ func (m *_AlarmMessageQueryType) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (functionId) - lengthInBits += 8 + lengthInBits += 8; // Simple field (numberOfObjects) - lengthInBits += 8 + lengthInBits += 8; // Simple field (returnCode) lengthInBits += 8 @@ -151,13 +155,14 @@ func (m *_AlarmMessageQueryType) GetLengthInBits(ctx context.Context) uint16 { arrayCtx := spiContext.CreateArrayContext(ctx, len(m.MessageObjects), _curItem) _ = arrayCtx _ = _curItem - lengthInBits += element.(interface{ GetLengthInBits(context.Context) uint16 }).GetLengthInBits(arrayCtx) + lengthInBits += element.(interface{GetLengthInBits(context.Context) uint16}).GetLengthInBits(arrayCtx) } } return lengthInBits } + func (m *_AlarmMessageQueryType) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -176,14 +181,14 @@ func AlarmMessageQueryTypeParseWithBuffer(ctx context.Context, readBuffer utils. _ = currentPos // Simple Field (functionId) - _functionId, _functionIdErr := readBuffer.ReadUint8("functionId", 8) +_functionId, _functionIdErr := readBuffer.ReadUint8("functionId", 8) if _functionIdErr != nil { return nil, errors.Wrap(_functionIdErr, "Error parsing 'functionId' field of AlarmMessageQueryType") } functionId := _functionId // Simple Field (numberOfObjects) - _numberOfObjects, _numberOfObjectsErr := readBuffer.ReadUint8("numberOfObjects", 8) +_numberOfObjects, _numberOfObjectsErr := readBuffer.ReadUint8("numberOfObjects", 8) if _numberOfObjectsErr != nil { return nil, errors.Wrap(_numberOfObjectsErr, "Error parsing 'numberOfObjects' field of AlarmMessageQueryType") } @@ -193,7 +198,7 @@ func AlarmMessageQueryTypeParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("returnCode"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for returnCode") } - _returnCode, _returnCodeErr := DataTransportErrorCodeParseWithBuffer(ctx, readBuffer) +_returnCode, _returnCodeErr := DataTransportErrorCodeParseWithBuffer(ctx, readBuffer) if _returnCodeErr != nil { return nil, errors.Wrap(_returnCodeErr, "Error parsing 'returnCode' field of AlarmMessageQueryType") } @@ -206,7 +211,7 @@ func AlarmMessageQueryTypeParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("transportSize"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for transportSize") } - _transportSize, _transportSizeErr := DataTransportSizeParseWithBuffer(ctx, readBuffer) +_transportSize, _transportSizeErr := DataTransportSizeParseWithBuffer(ctx, readBuffer) if _transportSizeErr != nil { return nil, errors.Wrap(_transportSizeErr, "Error parsing 'transportSize' field of AlarmMessageQueryType") } @@ -240,7 +245,7 @@ func AlarmMessageQueryTypeParseWithBuffer(ctx context.Context, readBuffer utils. arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := AlarmMessageObjectQueryTypeParseWithBuffer(arrayCtx, readBuffer) +_item, _err := AlarmMessageObjectQueryTypeParseWithBuffer(arrayCtx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'messageObjects' field of AlarmMessageQueryType") } @@ -257,12 +262,12 @@ func AlarmMessageQueryTypeParseWithBuffer(ctx context.Context, readBuffer utils. // Create the instance return &_AlarmMessageQueryType{ - FunctionId: functionId, - NumberOfObjects: numberOfObjects, - ReturnCode: returnCode, - TransportSize: transportSize, - MessageObjects: messageObjects, - }, nil + FunctionId: functionId, + NumberOfObjects: numberOfObjects, + ReturnCode: returnCode, + TransportSize: transportSize, + MessageObjects: messageObjects, + }, nil } func (m *_AlarmMessageQueryType) Serialize() ([]byte, error) { @@ -276,7 +281,7 @@ func (m *_AlarmMessageQueryType) Serialize() ([]byte, error) { func (m *_AlarmMessageQueryType) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("AlarmMessageQueryType"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("AlarmMessageQueryType"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for AlarmMessageQueryType") } @@ -347,6 +352,7 @@ func (m *_AlarmMessageQueryType) SerializeWithWriteBuffer(ctx context.Context, w return nil } + func (m *_AlarmMessageQueryType) isAlarmMessageQueryType() bool { return true } @@ -361,3 +367,6 @@ func (m *_AlarmMessageQueryType) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/AlarmStateType.go b/plc4go/protocols/s7/readwrite/model/AlarmStateType.go index b69c96b70bf..1732ef7f729 100644 --- a/plc4go/protocols/s7/readwrite/model/AlarmStateType.go +++ b/plc4go/protocols/s7/readwrite/model/AlarmStateType.go @@ -34,12 +34,12 @@ type IAlarmStateType interface { utils.Serializable } -const ( - AlarmStateType_SCAN_ABORT AlarmStateType = 0x00 - AlarmStateType_SCAN_INITIATE AlarmStateType = 0x01 - AlarmStateType_ALARM_ABORT AlarmStateType = 0x04 - AlarmStateType_ALARM_INITIATE AlarmStateType = 0x05 - AlarmStateType_ALARM_S_ABORT AlarmStateType = 0x08 +const( + AlarmStateType_SCAN_ABORT AlarmStateType = 0x00 + AlarmStateType_SCAN_INITIATE AlarmStateType = 0x01 + AlarmStateType_ALARM_ABORT AlarmStateType = 0x04 + AlarmStateType_ALARM_INITIATE AlarmStateType = 0x05 + AlarmStateType_ALARM_S_ABORT AlarmStateType = 0x08 AlarmStateType_ALARM_S_INITIATE AlarmStateType = 0x09 ) @@ -47,7 +47,7 @@ var AlarmStateTypeValues []AlarmStateType func init() { _ = errors.New - AlarmStateTypeValues = []AlarmStateType{ + AlarmStateTypeValues = []AlarmStateType { AlarmStateType_SCAN_ABORT, AlarmStateType_SCAN_INITIATE, AlarmStateType_ALARM_ABORT, @@ -59,18 +59,18 @@ func init() { func AlarmStateTypeByValue(value uint8) (enum AlarmStateType, ok bool) { switch value { - case 0x00: - return AlarmStateType_SCAN_ABORT, true - case 0x01: - return AlarmStateType_SCAN_INITIATE, true - case 0x04: - return AlarmStateType_ALARM_ABORT, true - case 0x05: - return AlarmStateType_ALARM_INITIATE, true - case 0x08: - return AlarmStateType_ALARM_S_ABORT, true - case 0x09: - return AlarmStateType_ALARM_S_INITIATE, true + case 0x00: + return AlarmStateType_SCAN_ABORT, true + case 0x01: + return AlarmStateType_SCAN_INITIATE, true + case 0x04: + return AlarmStateType_ALARM_ABORT, true + case 0x05: + return AlarmStateType_ALARM_INITIATE, true + case 0x08: + return AlarmStateType_ALARM_S_ABORT, true + case 0x09: + return AlarmStateType_ALARM_S_INITIATE, true } return 0, false } @@ -93,13 +93,13 @@ func AlarmStateTypeByName(value string) (enum AlarmStateType, ok bool) { return 0, false } -func AlarmStateTypeKnows(value uint8) bool { +func AlarmStateTypeKnows(value uint8) bool { for _, typeValue := range AlarmStateTypeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastAlarmStateType(structType interface{}) AlarmStateType { @@ -171,3 +171,4 @@ func (e AlarmStateType) PLC4XEnumName() string { func (e AlarmStateType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/s7/readwrite/model/AlarmType.go b/plc4go/protocols/s7/readwrite/model/AlarmType.go index 486d9e6936a..22d6095533e 100644 --- a/plc4go/protocols/s7/readwrite/model/AlarmType.go +++ b/plc4go/protocols/s7/readwrite/model/AlarmType.go @@ -34,8 +34,8 @@ type IAlarmType interface { utils.Serializable } -const ( - AlarmType_SCAN AlarmType = 0x01 +const( + AlarmType_SCAN AlarmType = 0x01 AlarmType_ALARM_8 AlarmType = 0x02 AlarmType_ALARM_S AlarmType = 0x04 ) @@ -44,7 +44,7 @@ var AlarmTypeValues []AlarmType func init() { _ = errors.New - AlarmTypeValues = []AlarmType{ + AlarmTypeValues = []AlarmType { AlarmType_SCAN, AlarmType_ALARM_8, AlarmType_ALARM_S, @@ -53,12 +53,12 @@ func init() { func AlarmTypeByValue(value uint8) (enum AlarmType, ok bool) { switch value { - case 0x01: - return AlarmType_SCAN, true - case 0x02: - return AlarmType_ALARM_8, true - case 0x04: - return AlarmType_ALARM_S, true + case 0x01: + return AlarmType_SCAN, true + case 0x02: + return AlarmType_ALARM_8, true + case 0x04: + return AlarmType_ALARM_S, true } return 0, false } @@ -75,13 +75,13 @@ func AlarmTypeByName(value string) (enum AlarmType, ok bool) { return 0, false } -func AlarmTypeKnows(value uint8) bool { +func AlarmTypeKnows(value uint8) bool { for _, typeValue := range AlarmTypeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastAlarmType(structType interface{}) AlarmType { @@ -147,3 +147,4 @@ func (e AlarmType) PLC4XEnumName() string { func (e AlarmType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/s7/readwrite/model/AssociatedValueType.go b/plc4go/protocols/s7/readwrite/model/AssociatedValueType.go index 4bbcf238ef3..63b484fe91a 100644 --- a/plc4go/protocols/s7/readwrite/model/AssociatedValueType.go +++ b/plc4go/protocols/s7/readwrite/model/AssociatedValueType.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // AssociatedValueType is the corresponding interface of AssociatedValueType type AssociatedValueType interface { @@ -51,12 +53,13 @@ type AssociatedValueTypeExactly interface { // _AssociatedValueType is the data-structure of this message type _AssociatedValueType struct { - ReturnCode DataTransportErrorCode - TransportSize DataTransportSize - ValueLength uint16 - Data []uint8 + ReturnCode DataTransportErrorCode + TransportSize DataTransportSize + ValueLength uint16 + Data []uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,14 +86,15 @@ func (m *_AssociatedValueType) GetData() []uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewAssociatedValueType factory function for _AssociatedValueType -func NewAssociatedValueType(returnCode DataTransportErrorCode, transportSize DataTransportSize, valueLength uint16, data []uint8) *_AssociatedValueType { - return &_AssociatedValueType{ReturnCode: returnCode, TransportSize: transportSize, ValueLength: valueLength, Data: data} +func NewAssociatedValueType( returnCode DataTransportErrorCode , transportSize DataTransportSize , valueLength uint16 , data []uint8 ) *_AssociatedValueType { +return &_AssociatedValueType{ ReturnCode: returnCode , TransportSize: transportSize , ValueLength: valueLength , Data: data } } // Deprecated: use the interface for direct cast func CastAssociatedValueType(structType interface{}) AssociatedValueType { - if casted, ok := structType.(AssociatedValueType); ok { + if casted, ok := structType.(AssociatedValueType); ok { return casted } if casted, ok := structType.(*AssociatedValueType); ok { @@ -123,6 +127,7 @@ func (m *_AssociatedValueType) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_AssociatedValueType) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -144,7 +149,7 @@ func AssociatedValueTypeParseWithBuffer(ctx context.Context, readBuffer utils.Re if pullErr := readBuffer.PullContext("returnCode"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for returnCode") } - _returnCode, _returnCodeErr := DataTransportErrorCodeParseWithBuffer(ctx, readBuffer) +_returnCode, _returnCodeErr := DataTransportErrorCodeParseWithBuffer(ctx, readBuffer) if _returnCodeErr != nil { return nil, errors.Wrap(_returnCodeErr, "Error parsing 'returnCode' field of AssociatedValueType") } @@ -157,7 +162,7 @@ func AssociatedValueTypeParseWithBuffer(ctx context.Context, readBuffer utils.Re if pullErr := readBuffer.PullContext("transportSize"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for transportSize") } - _transportSize, _transportSizeErr := DataTransportSizeParseWithBuffer(ctx, readBuffer) +_transportSize, _transportSizeErr := DataTransportSizeParseWithBuffer(ctx, readBuffer) if _transportSizeErr != nil { return nil, errors.Wrap(_transportSizeErr, "Error parsing 'transportSize' field of AssociatedValueType") } @@ -173,7 +178,7 @@ func AssociatedValueTypeParseWithBuffer(ctx context.Context, readBuffer utils.Re } var valueLength uint16 if _valueLength != nil { - valueLength = _valueLength.(uint16) + valueLength = _valueLength.(uint16) } // Array field (data) @@ -192,7 +197,7 @@ func AssociatedValueTypeParseWithBuffer(ctx context.Context, readBuffer utils.Re arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := readBuffer.ReadUint8("", 8) +_item, _err := readBuffer.ReadUint8("", 8) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'data' field of AssociatedValueType") } @@ -209,11 +214,11 @@ func AssociatedValueTypeParseWithBuffer(ctx context.Context, readBuffer utils.Re // Create the instance return &_AssociatedValueType{ - ReturnCode: returnCode, - TransportSize: transportSize, - ValueLength: valueLength, - Data: data, - }, nil + ReturnCode: returnCode, + TransportSize: transportSize, + ValueLength: valueLength, + Data: data, + }, nil } func (m *_AssociatedValueType) Serialize() ([]byte, error) { @@ -227,7 +232,7 @@ func (m *_AssociatedValueType) Serialize() ([]byte, error) { func (m *_AssociatedValueType) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("AssociatedValueType"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("AssociatedValueType"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for AssociatedValueType") } @@ -282,6 +287,7 @@ func (m *_AssociatedValueType) SerializeWithWriteBuffer(ctx context.Context, wri return nil } + func (m *_AssociatedValueType) isAssociatedValueType() bool { return true } @@ -296,3 +302,6 @@ func (m *_AssociatedValueType) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/COTPPacket.go b/plc4go/protocols/s7/readwrite/model/COTPPacket.go index 74653d5d03f..6e0aa370407 100644 --- a/plc4go/protocols/s7/readwrite/model/COTPPacket.go +++ b/plc4go/protocols/s7/readwrite/model/COTPPacket.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "io" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // COTPPacket is the corresponding interface of COTPPacket type COTPPacket interface { @@ -51,8 +53,8 @@ type COTPPacketExactly interface { // _COTPPacket is the data-structure of this message type _COTPPacket struct { _COTPPacketChildRequirements - Parameters []COTPParameter - Payload S7Message + Parameters []COTPParameter + Payload S7Message // Arguments. CotpLen uint16 @@ -64,6 +66,7 @@ type _COTPPacketChildRequirements interface { GetTpduCode() uint8 } + type COTPPacketParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child COTPPacket, serializeChildFunction func() error) error GetTypeName() string @@ -71,13 +74,12 @@ type COTPPacketParent interface { type COTPPacketChild interface { utils.Serializable - InitializeParent(parent COTPPacket, parameters []COTPParameter, payload S7Message) +InitializeParent(parent COTPPacket , parameters []COTPParameter , payload S7Message ) GetParent() *COTPPacket GetTypeName() string COTPPacket } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -96,14 +98,15 @@ func (m *_COTPPacket) GetPayload() S7Message { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCOTPPacket factory function for _COTPPacket -func NewCOTPPacket(parameters []COTPParameter, payload S7Message, cotpLen uint16) *_COTPPacket { - return &_COTPPacket{Parameters: parameters, Payload: payload, CotpLen: cotpLen} +func NewCOTPPacket( parameters []COTPParameter , payload S7Message , cotpLen uint16 ) *_COTPPacket { +return &_COTPPacket{ Parameters: parameters , Payload: payload , CotpLen: cotpLen } } // Deprecated: use the interface for direct cast func CastCOTPPacket(structType interface{}) COTPPacket { - if casted, ok := structType.(COTPPacket); ok { + if casted, ok := structType.(COTPPacket); ok { return casted } if casted, ok := structType.(*COTPPacket); ok { @@ -116,20 +119,21 @@ func (m *_COTPPacket) GetTypeName() string { return "COTPPacket" } + func (m *_COTPPacket) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Implicit Field (headerLength) lengthInBits += 8 // Discriminator Field (tpduCode) - lengthInBits += 8 + lengthInBits += 8; // Array field if len(m.Parameters) > 0 { for _, element := range m.Parameters { lengthInBits += element.GetLengthInBits(ctx) } - } + } // Optional Field (payload) if m.Payload != nil { @@ -174,24 +178,24 @@ func COTPPacketParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type COTPPacketChildSerializeRequirement interface { COTPPacket - InitializeParent(COTPPacket, []COTPParameter, S7Message) + InitializeParent(COTPPacket, []COTPParameter, S7Message) GetParent() COTPPacket } var _childTemp interface{} var _child COTPPacketChildSerializeRequirement var typeSwitchError error switch { - case tpduCode == 0xF0: // COTPPacketData +case tpduCode == 0xF0 : // COTPPacketData _childTemp, typeSwitchError = COTPPacketDataParseWithBuffer(ctx, readBuffer, cotpLen) - case tpduCode == 0xE0: // COTPPacketConnectionRequest +case tpduCode == 0xE0 : // COTPPacketConnectionRequest _childTemp, typeSwitchError = COTPPacketConnectionRequestParseWithBuffer(ctx, readBuffer, cotpLen) - case tpduCode == 0xD0: // COTPPacketConnectionResponse +case tpduCode == 0xD0 : // COTPPacketConnectionResponse _childTemp, typeSwitchError = COTPPacketConnectionResponseParseWithBuffer(ctx, readBuffer, cotpLen) - case tpduCode == 0x80: // COTPPacketDisconnectRequest +case tpduCode == 0x80 : // COTPPacketDisconnectRequest _childTemp, typeSwitchError = COTPPacketDisconnectRequestParseWithBuffer(ctx, readBuffer, cotpLen) - case tpduCode == 0xC0: // COTPPacketDisconnectResponse +case tpduCode == 0xC0 : // COTPPacketDisconnectResponse _childTemp, typeSwitchError = COTPPacketDisconnectResponseParseWithBuffer(ctx, readBuffer, cotpLen) - case tpduCode == 0x70: // COTPPacketTpduError +case tpduCode == 0x70 : // COTPPacketTpduError _childTemp, typeSwitchError = COTPPacketTpduErrorParseWithBuffer(ctx, readBuffer, cotpLen) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [tpduCode=%v]", tpduCode) @@ -210,8 +214,8 @@ func COTPPacketParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, { _parametersLength := uint16((uint16(headerLength) + uint16(uint16(1)))) - uint16((positionAware.GetPos() - startPos)) _parametersEndPos := positionAware.GetPos() + uint16(_parametersLength) - for positionAware.GetPos() < _parametersEndPos { - _item, _err := COTPParameterParseWithBuffer(ctx, readBuffer, uint8((uint8(headerLength)+uint8(uint8(1))))-uint8((positionAware.GetPos()-startPos))) + for ;positionAware.GetPos() < _parametersEndPos; { +_item, _err := COTPParameterParseWithBuffer(ctx, readBuffer , uint8((uint8(headerLength) + uint8(uint8(1)))) - uint8((positionAware.GetPos() - startPos)) ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'parameters' field of COTPPacket") } @@ -224,12 +228,12 @@ func COTPPacketParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, // Optional Field (payload) (Can be skipped, if a given expression evaluates to false) var payload S7Message = nil - if bool((positionAware.GetPos() - startPos) < (cotpLen)) { + if bool(((positionAware.GetPos() - startPos)) < (cotpLen)) { currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("payload"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for payload") } - _val, _err := S7MessageParseWithBuffer(ctx, readBuffer) +_val, _err := S7MessageParseWithBuffer(ctx, readBuffer) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -249,7 +253,7 @@ func COTPPacketParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, } // Finish initializing - _child.InitializeParent(_child, parameters, payload) +_child.InitializeParent(_child , parameters , payload ) return _child, nil } @@ -259,12 +263,12 @@ func (pm *_COTPPacket) SerializeParent(ctx context.Context, writeBuffer utils.Wr _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("COTPPacket"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("COTPPacket"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for COTPPacket") } // Implicit Field (headerLength) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - headerLength := uint8(uint8(uint8(m.GetLengthInBytes(ctx))) - uint8((uint8((utils.InlineIf((bool((m.GetPayload()) != (nil))), func() interface{} { return uint8((m.GetPayload()).GetLengthInBytes(ctx)) }, func() interface{} { return uint8(uint8(0)) }).(uint8))) + uint8(uint8(1))))) + headerLength := uint8(uint8(uint8(m.GetLengthInBytes(ctx))) - uint8((uint8((utils.InlineIf((bool(((m.GetPayload())) != (nil))), func() interface{} {return uint8((m.GetPayload()).GetLengthInBytes(ctx))}, func() interface{} {return uint8(uint8(0))}).(uint8))) + uint8(uint8(1))))) _headerLengthErr := writeBuffer.WriteUint8("headerLength", 8, (headerLength)) if _headerLengthErr != nil { return errors.Wrap(_headerLengthErr, "Error serializing 'headerLength' field") @@ -322,13 +326,13 @@ func (pm *_COTPPacket) SerializeParent(ctx context.Context, writeBuffer utils.Wr return nil } + //// // Arguments Getter func (m *_COTPPacket) GetCotpLen() uint16 { return m.CotpLen } - // //// @@ -346,3 +350,6 @@ func (m *_COTPPacket) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/COTPPacketConnectionRequest.go b/plc4go/protocols/s7/readwrite/model/COTPPacketConnectionRequest.go index 39e4676f389..d08abbbbee5 100644 --- a/plc4go/protocols/s7/readwrite/model/COTPPacketConnectionRequest.go +++ b/plc4go/protocols/s7/readwrite/model/COTPPacketConnectionRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // COTPPacketConnectionRequest is the corresponding interface of COTPPacketConnectionRequest type COTPPacketConnectionRequest interface { @@ -50,34 +52,33 @@ type COTPPacketConnectionRequestExactly interface { // _COTPPacketConnectionRequest is the data-structure of this message type _COTPPacketConnectionRequest struct { *_COTPPacket - DestinationReference uint16 - SourceReference uint16 - ProtocolClass COTPProtocolClass + DestinationReference uint16 + SourceReference uint16 + ProtocolClass COTPProtocolClass } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_COTPPacketConnectionRequest) GetTpduCode() uint8 { - return 0xE0 -} +func (m *_COTPPacketConnectionRequest) GetTpduCode() uint8 { +return 0xE0} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_COTPPacketConnectionRequest) InitializeParent(parent COTPPacket, parameters []COTPParameter, payload S7Message) { - m.Parameters = parameters +func (m *_COTPPacketConnectionRequest) InitializeParent(parent COTPPacket , parameters []COTPParameter , payload S7Message ) { m.Parameters = parameters m.Payload = payload } -func (m *_COTPPacketConnectionRequest) GetParent() COTPPacket { +func (m *_COTPPacketConnectionRequest) GetParent() COTPPacket { return m._COTPPacket } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -100,13 +101,14 @@ func (m *_COTPPacketConnectionRequest) GetProtocolClass() COTPProtocolClass { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCOTPPacketConnectionRequest factory function for _COTPPacketConnectionRequest -func NewCOTPPacketConnectionRequest(destinationReference uint16, sourceReference uint16, protocolClass COTPProtocolClass, parameters []COTPParameter, payload S7Message, cotpLen uint16) *_COTPPacketConnectionRequest { +func NewCOTPPacketConnectionRequest( destinationReference uint16 , sourceReference uint16 , protocolClass COTPProtocolClass , parameters []COTPParameter , payload S7Message , cotpLen uint16 ) *_COTPPacketConnectionRequest { _result := &_COTPPacketConnectionRequest{ DestinationReference: destinationReference, - SourceReference: sourceReference, - ProtocolClass: protocolClass, - _COTPPacket: NewCOTPPacket(parameters, payload, cotpLen), + SourceReference: sourceReference, + ProtocolClass: protocolClass, + _COTPPacket: NewCOTPPacket(parameters, payload, cotpLen), } _result._COTPPacket._COTPPacketChildRequirements = _result return _result @@ -114,7 +116,7 @@ func NewCOTPPacketConnectionRequest(destinationReference uint16, sourceReference // Deprecated: use the interface for direct cast func CastCOTPPacketConnectionRequest(structType interface{}) COTPPacketConnectionRequest { - if casted, ok := structType.(COTPPacketConnectionRequest); ok { + if casted, ok := structType.(COTPPacketConnectionRequest); ok { return casted } if casted, ok := structType.(*COTPPacketConnectionRequest); ok { @@ -131,10 +133,10 @@ func (m *_COTPPacketConnectionRequest) GetLengthInBits(ctx context.Context) uint lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (destinationReference) - lengthInBits += 16 + lengthInBits += 16; // Simple field (sourceReference) - lengthInBits += 16 + lengthInBits += 16; // Simple field (protocolClass) lengthInBits += 8 @@ -142,6 +144,7 @@ func (m *_COTPPacketConnectionRequest) GetLengthInBits(ctx context.Context) uint return lengthInBits } + func (m *_COTPPacketConnectionRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -160,14 +163,14 @@ func COTPPacketConnectionRequestParseWithBuffer(ctx context.Context, readBuffer _ = currentPos // Simple Field (destinationReference) - _destinationReference, _destinationReferenceErr := readBuffer.ReadUint16("destinationReference", 16) +_destinationReference, _destinationReferenceErr := readBuffer.ReadUint16("destinationReference", 16) if _destinationReferenceErr != nil { return nil, errors.Wrap(_destinationReferenceErr, "Error parsing 'destinationReference' field of COTPPacketConnectionRequest") } destinationReference := _destinationReference // Simple Field (sourceReference) - _sourceReference, _sourceReferenceErr := readBuffer.ReadUint16("sourceReference", 16) +_sourceReference, _sourceReferenceErr := readBuffer.ReadUint16("sourceReference", 16) if _sourceReferenceErr != nil { return nil, errors.Wrap(_sourceReferenceErr, "Error parsing 'sourceReference' field of COTPPacketConnectionRequest") } @@ -177,7 +180,7 @@ func COTPPacketConnectionRequestParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("protocolClass"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for protocolClass") } - _protocolClass, _protocolClassErr := COTPProtocolClassParseWithBuffer(ctx, readBuffer) +_protocolClass, _protocolClassErr := COTPProtocolClassParseWithBuffer(ctx, readBuffer) if _protocolClassErr != nil { return nil, errors.Wrap(_protocolClassErr, "Error parsing 'protocolClass' field of COTPPacketConnectionRequest") } @@ -196,8 +199,8 @@ func COTPPacketConnectionRequestParseWithBuffer(ctx context.Context, readBuffer CotpLen: cotpLen, }, DestinationReference: destinationReference, - SourceReference: sourceReference, - ProtocolClass: protocolClass, + SourceReference: sourceReference, + ProtocolClass: protocolClass, } _child._COTPPacket._COTPPacketChildRequirements = _child return _child, nil @@ -219,31 +222,31 @@ func (m *_COTPPacketConnectionRequest) SerializeWithWriteBuffer(ctx context.Cont return errors.Wrap(pushErr, "Error pushing for COTPPacketConnectionRequest") } - // Simple Field (destinationReference) - destinationReference := uint16(m.GetDestinationReference()) - _destinationReferenceErr := writeBuffer.WriteUint16("destinationReference", 16, (destinationReference)) - if _destinationReferenceErr != nil { - return errors.Wrap(_destinationReferenceErr, "Error serializing 'destinationReference' field") - } + // Simple Field (destinationReference) + destinationReference := uint16(m.GetDestinationReference()) + _destinationReferenceErr := writeBuffer.WriteUint16("destinationReference", 16, (destinationReference)) + if _destinationReferenceErr != nil { + return errors.Wrap(_destinationReferenceErr, "Error serializing 'destinationReference' field") + } - // Simple Field (sourceReference) - sourceReference := uint16(m.GetSourceReference()) - _sourceReferenceErr := writeBuffer.WriteUint16("sourceReference", 16, (sourceReference)) - if _sourceReferenceErr != nil { - return errors.Wrap(_sourceReferenceErr, "Error serializing 'sourceReference' field") - } + // Simple Field (sourceReference) + sourceReference := uint16(m.GetSourceReference()) + _sourceReferenceErr := writeBuffer.WriteUint16("sourceReference", 16, (sourceReference)) + if _sourceReferenceErr != nil { + return errors.Wrap(_sourceReferenceErr, "Error serializing 'sourceReference' field") + } - // Simple Field (protocolClass) - if pushErr := writeBuffer.PushContext("protocolClass"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for protocolClass") - } - _protocolClassErr := writeBuffer.WriteSerializable(ctx, m.GetProtocolClass()) - if popErr := writeBuffer.PopContext("protocolClass"); popErr != nil { - return errors.Wrap(popErr, "Error popping for protocolClass") - } - if _protocolClassErr != nil { - return errors.Wrap(_protocolClassErr, "Error serializing 'protocolClass' field") - } + // Simple Field (protocolClass) + if pushErr := writeBuffer.PushContext("protocolClass"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for protocolClass") + } + _protocolClassErr := writeBuffer.WriteSerializable(ctx, m.GetProtocolClass()) + if popErr := writeBuffer.PopContext("protocolClass"); popErr != nil { + return errors.Wrap(popErr, "Error popping for protocolClass") + } + if _protocolClassErr != nil { + return errors.Wrap(_protocolClassErr, "Error serializing 'protocolClass' field") + } if popErr := writeBuffer.PopContext("COTPPacketConnectionRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for COTPPacketConnectionRequest") @@ -253,6 +256,7 @@ func (m *_COTPPacketConnectionRequest) SerializeWithWriteBuffer(ctx context.Cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_COTPPacketConnectionRequest) isCOTPPacketConnectionRequest() bool { return true } @@ -267,3 +271,6 @@ func (m *_COTPPacketConnectionRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/COTPPacketConnectionResponse.go b/plc4go/protocols/s7/readwrite/model/COTPPacketConnectionResponse.go index 65dfa76a5d6..98076b342ac 100644 --- a/plc4go/protocols/s7/readwrite/model/COTPPacketConnectionResponse.go +++ b/plc4go/protocols/s7/readwrite/model/COTPPacketConnectionResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // COTPPacketConnectionResponse is the corresponding interface of COTPPacketConnectionResponse type COTPPacketConnectionResponse interface { @@ -50,34 +52,33 @@ type COTPPacketConnectionResponseExactly interface { // _COTPPacketConnectionResponse is the data-structure of this message type _COTPPacketConnectionResponse struct { *_COTPPacket - DestinationReference uint16 - SourceReference uint16 - ProtocolClass COTPProtocolClass + DestinationReference uint16 + SourceReference uint16 + ProtocolClass COTPProtocolClass } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_COTPPacketConnectionResponse) GetTpduCode() uint8 { - return 0xD0 -} +func (m *_COTPPacketConnectionResponse) GetTpduCode() uint8 { +return 0xD0} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_COTPPacketConnectionResponse) InitializeParent(parent COTPPacket, parameters []COTPParameter, payload S7Message) { - m.Parameters = parameters +func (m *_COTPPacketConnectionResponse) InitializeParent(parent COTPPacket , parameters []COTPParameter , payload S7Message ) { m.Parameters = parameters m.Payload = payload } -func (m *_COTPPacketConnectionResponse) GetParent() COTPPacket { +func (m *_COTPPacketConnectionResponse) GetParent() COTPPacket { return m._COTPPacket } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -100,13 +101,14 @@ func (m *_COTPPacketConnectionResponse) GetProtocolClass() COTPProtocolClass { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCOTPPacketConnectionResponse factory function for _COTPPacketConnectionResponse -func NewCOTPPacketConnectionResponse(destinationReference uint16, sourceReference uint16, protocolClass COTPProtocolClass, parameters []COTPParameter, payload S7Message, cotpLen uint16) *_COTPPacketConnectionResponse { +func NewCOTPPacketConnectionResponse( destinationReference uint16 , sourceReference uint16 , protocolClass COTPProtocolClass , parameters []COTPParameter , payload S7Message , cotpLen uint16 ) *_COTPPacketConnectionResponse { _result := &_COTPPacketConnectionResponse{ DestinationReference: destinationReference, - SourceReference: sourceReference, - ProtocolClass: protocolClass, - _COTPPacket: NewCOTPPacket(parameters, payload, cotpLen), + SourceReference: sourceReference, + ProtocolClass: protocolClass, + _COTPPacket: NewCOTPPacket(parameters, payload, cotpLen), } _result._COTPPacket._COTPPacketChildRequirements = _result return _result @@ -114,7 +116,7 @@ func NewCOTPPacketConnectionResponse(destinationReference uint16, sourceReferenc // Deprecated: use the interface for direct cast func CastCOTPPacketConnectionResponse(structType interface{}) COTPPacketConnectionResponse { - if casted, ok := structType.(COTPPacketConnectionResponse); ok { + if casted, ok := structType.(COTPPacketConnectionResponse); ok { return casted } if casted, ok := structType.(*COTPPacketConnectionResponse); ok { @@ -131,10 +133,10 @@ func (m *_COTPPacketConnectionResponse) GetLengthInBits(ctx context.Context) uin lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (destinationReference) - lengthInBits += 16 + lengthInBits += 16; // Simple field (sourceReference) - lengthInBits += 16 + lengthInBits += 16; // Simple field (protocolClass) lengthInBits += 8 @@ -142,6 +144,7 @@ func (m *_COTPPacketConnectionResponse) GetLengthInBits(ctx context.Context) uin return lengthInBits } + func (m *_COTPPacketConnectionResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -160,14 +163,14 @@ func COTPPacketConnectionResponseParseWithBuffer(ctx context.Context, readBuffer _ = currentPos // Simple Field (destinationReference) - _destinationReference, _destinationReferenceErr := readBuffer.ReadUint16("destinationReference", 16) +_destinationReference, _destinationReferenceErr := readBuffer.ReadUint16("destinationReference", 16) if _destinationReferenceErr != nil { return nil, errors.Wrap(_destinationReferenceErr, "Error parsing 'destinationReference' field of COTPPacketConnectionResponse") } destinationReference := _destinationReference // Simple Field (sourceReference) - _sourceReference, _sourceReferenceErr := readBuffer.ReadUint16("sourceReference", 16) +_sourceReference, _sourceReferenceErr := readBuffer.ReadUint16("sourceReference", 16) if _sourceReferenceErr != nil { return nil, errors.Wrap(_sourceReferenceErr, "Error parsing 'sourceReference' field of COTPPacketConnectionResponse") } @@ -177,7 +180,7 @@ func COTPPacketConnectionResponseParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("protocolClass"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for protocolClass") } - _protocolClass, _protocolClassErr := COTPProtocolClassParseWithBuffer(ctx, readBuffer) +_protocolClass, _protocolClassErr := COTPProtocolClassParseWithBuffer(ctx, readBuffer) if _protocolClassErr != nil { return nil, errors.Wrap(_protocolClassErr, "Error parsing 'protocolClass' field of COTPPacketConnectionResponse") } @@ -196,8 +199,8 @@ func COTPPacketConnectionResponseParseWithBuffer(ctx context.Context, readBuffer CotpLen: cotpLen, }, DestinationReference: destinationReference, - SourceReference: sourceReference, - ProtocolClass: protocolClass, + SourceReference: sourceReference, + ProtocolClass: protocolClass, } _child._COTPPacket._COTPPacketChildRequirements = _child return _child, nil @@ -219,31 +222,31 @@ func (m *_COTPPacketConnectionResponse) SerializeWithWriteBuffer(ctx context.Con return errors.Wrap(pushErr, "Error pushing for COTPPacketConnectionResponse") } - // Simple Field (destinationReference) - destinationReference := uint16(m.GetDestinationReference()) - _destinationReferenceErr := writeBuffer.WriteUint16("destinationReference", 16, (destinationReference)) - if _destinationReferenceErr != nil { - return errors.Wrap(_destinationReferenceErr, "Error serializing 'destinationReference' field") - } + // Simple Field (destinationReference) + destinationReference := uint16(m.GetDestinationReference()) + _destinationReferenceErr := writeBuffer.WriteUint16("destinationReference", 16, (destinationReference)) + if _destinationReferenceErr != nil { + return errors.Wrap(_destinationReferenceErr, "Error serializing 'destinationReference' field") + } - // Simple Field (sourceReference) - sourceReference := uint16(m.GetSourceReference()) - _sourceReferenceErr := writeBuffer.WriteUint16("sourceReference", 16, (sourceReference)) - if _sourceReferenceErr != nil { - return errors.Wrap(_sourceReferenceErr, "Error serializing 'sourceReference' field") - } + // Simple Field (sourceReference) + sourceReference := uint16(m.GetSourceReference()) + _sourceReferenceErr := writeBuffer.WriteUint16("sourceReference", 16, (sourceReference)) + if _sourceReferenceErr != nil { + return errors.Wrap(_sourceReferenceErr, "Error serializing 'sourceReference' field") + } - // Simple Field (protocolClass) - if pushErr := writeBuffer.PushContext("protocolClass"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for protocolClass") - } - _protocolClassErr := writeBuffer.WriteSerializable(ctx, m.GetProtocolClass()) - if popErr := writeBuffer.PopContext("protocolClass"); popErr != nil { - return errors.Wrap(popErr, "Error popping for protocolClass") - } - if _protocolClassErr != nil { - return errors.Wrap(_protocolClassErr, "Error serializing 'protocolClass' field") - } + // Simple Field (protocolClass) + if pushErr := writeBuffer.PushContext("protocolClass"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for protocolClass") + } + _protocolClassErr := writeBuffer.WriteSerializable(ctx, m.GetProtocolClass()) + if popErr := writeBuffer.PopContext("protocolClass"); popErr != nil { + return errors.Wrap(popErr, "Error popping for protocolClass") + } + if _protocolClassErr != nil { + return errors.Wrap(_protocolClassErr, "Error serializing 'protocolClass' field") + } if popErr := writeBuffer.PopContext("COTPPacketConnectionResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for COTPPacketConnectionResponse") @@ -253,6 +256,7 @@ func (m *_COTPPacketConnectionResponse) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_COTPPacketConnectionResponse) isCOTPPacketConnectionResponse() bool { return true } @@ -267,3 +271,6 @@ func (m *_COTPPacketConnectionResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/COTPPacketData.go b/plc4go/protocols/s7/readwrite/model/COTPPacketData.go index 992807d037f..dc712df7117 100644 --- a/plc4go/protocols/s7/readwrite/model/COTPPacketData.go +++ b/plc4go/protocols/s7/readwrite/model/COTPPacketData.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // COTPPacketData is the corresponding interface of COTPPacketData type COTPPacketData interface { @@ -48,33 +50,32 @@ type COTPPacketDataExactly interface { // _COTPPacketData is the data-structure of this message type _COTPPacketData struct { *_COTPPacket - Eot bool - TpduRef uint8 + Eot bool + TpduRef uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_COTPPacketData) GetTpduCode() uint8 { - return 0xF0 -} +func (m *_COTPPacketData) GetTpduCode() uint8 { +return 0xF0} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_COTPPacketData) InitializeParent(parent COTPPacket, parameters []COTPParameter, payload S7Message) { - m.Parameters = parameters +func (m *_COTPPacketData) InitializeParent(parent COTPPacket , parameters []COTPParameter , payload S7Message ) { m.Parameters = parameters m.Payload = payload } -func (m *_COTPPacketData) GetParent() COTPPacket { +func (m *_COTPPacketData) GetParent() COTPPacket { return m._COTPPacket } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -93,12 +94,13 @@ func (m *_COTPPacketData) GetTpduRef() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCOTPPacketData factory function for _COTPPacketData -func NewCOTPPacketData(eot bool, tpduRef uint8, parameters []COTPParameter, payload S7Message, cotpLen uint16) *_COTPPacketData { +func NewCOTPPacketData( eot bool , tpduRef uint8 , parameters []COTPParameter , payload S7Message , cotpLen uint16 ) *_COTPPacketData { _result := &_COTPPacketData{ - Eot: eot, - TpduRef: tpduRef, - _COTPPacket: NewCOTPPacket(parameters, payload, cotpLen), + Eot: eot, + TpduRef: tpduRef, + _COTPPacket: NewCOTPPacket(parameters, payload, cotpLen), } _result._COTPPacket._COTPPacketChildRequirements = _result return _result @@ -106,7 +108,7 @@ func NewCOTPPacketData(eot bool, tpduRef uint8, parameters []COTPParameter, payl // Deprecated: use the interface for direct cast func CastCOTPPacketData(structType interface{}) COTPPacketData { - if casted, ok := structType.(COTPPacketData); ok { + if casted, ok := structType.(COTPPacketData); ok { return casted } if casted, ok := structType.(*COTPPacketData); ok { @@ -123,14 +125,15 @@ func (m *_COTPPacketData) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (eot) - lengthInBits += 1 + lengthInBits += 1; // Simple field (tpduRef) - lengthInBits += 7 + lengthInBits += 7; return lengthInBits } + func (m *_COTPPacketData) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -149,14 +152,14 @@ func COTPPacketDataParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf _ = currentPos // Simple Field (eot) - _eot, _eotErr := readBuffer.ReadBit("eot") +_eot, _eotErr := readBuffer.ReadBit("eot") if _eotErr != nil { return nil, errors.Wrap(_eotErr, "Error parsing 'eot' field of COTPPacketData") } eot := _eot // Simple Field (tpduRef) - _tpduRef, _tpduRefErr := readBuffer.ReadUint8("tpduRef", 7) +_tpduRef, _tpduRefErr := readBuffer.ReadUint8("tpduRef", 7) if _tpduRefErr != nil { return nil, errors.Wrap(_tpduRefErr, "Error parsing 'tpduRef' field of COTPPacketData") } @@ -171,7 +174,7 @@ func COTPPacketDataParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuf _COTPPacket: &_COTPPacket{ CotpLen: cotpLen, }, - Eot: eot, + Eot: eot, TpduRef: tpduRef, } _child._COTPPacket._COTPPacketChildRequirements = _child @@ -194,19 +197,19 @@ func (m *_COTPPacketData) SerializeWithWriteBuffer(ctx context.Context, writeBuf return errors.Wrap(pushErr, "Error pushing for COTPPacketData") } - // Simple Field (eot) - eot := bool(m.GetEot()) - _eotErr := writeBuffer.WriteBit("eot", (eot)) - if _eotErr != nil { - return errors.Wrap(_eotErr, "Error serializing 'eot' field") - } + // Simple Field (eot) + eot := bool(m.GetEot()) + _eotErr := writeBuffer.WriteBit("eot", (eot)) + if _eotErr != nil { + return errors.Wrap(_eotErr, "Error serializing 'eot' field") + } - // Simple Field (tpduRef) - tpduRef := uint8(m.GetTpduRef()) - _tpduRefErr := writeBuffer.WriteUint8("tpduRef", 7, (tpduRef)) - if _tpduRefErr != nil { - return errors.Wrap(_tpduRefErr, "Error serializing 'tpduRef' field") - } + // Simple Field (tpduRef) + tpduRef := uint8(m.GetTpduRef()) + _tpduRefErr := writeBuffer.WriteUint8("tpduRef", 7, (tpduRef)) + if _tpduRefErr != nil { + return errors.Wrap(_tpduRefErr, "Error serializing 'tpduRef' field") + } if popErr := writeBuffer.PopContext("COTPPacketData"); popErr != nil { return errors.Wrap(popErr, "Error popping for COTPPacketData") @@ -216,6 +219,7 @@ func (m *_COTPPacketData) SerializeWithWriteBuffer(ctx context.Context, writeBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_COTPPacketData) isCOTPPacketData() bool { return true } @@ -230,3 +234,6 @@ func (m *_COTPPacketData) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/COTPPacketDisconnectRequest.go b/plc4go/protocols/s7/readwrite/model/COTPPacketDisconnectRequest.go index bcff6f44384..5ed6c4cd653 100644 --- a/plc4go/protocols/s7/readwrite/model/COTPPacketDisconnectRequest.go +++ b/plc4go/protocols/s7/readwrite/model/COTPPacketDisconnectRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // COTPPacketDisconnectRequest is the corresponding interface of COTPPacketDisconnectRequest type COTPPacketDisconnectRequest interface { @@ -50,34 +52,33 @@ type COTPPacketDisconnectRequestExactly interface { // _COTPPacketDisconnectRequest is the data-structure of this message type _COTPPacketDisconnectRequest struct { *_COTPPacket - DestinationReference uint16 - SourceReference uint16 - ProtocolClass COTPProtocolClass + DestinationReference uint16 + SourceReference uint16 + ProtocolClass COTPProtocolClass } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_COTPPacketDisconnectRequest) GetTpduCode() uint8 { - return 0x80 -} +func (m *_COTPPacketDisconnectRequest) GetTpduCode() uint8 { +return 0x80} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_COTPPacketDisconnectRequest) InitializeParent(parent COTPPacket, parameters []COTPParameter, payload S7Message) { - m.Parameters = parameters +func (m *_COTPPacketDisconnectRequest) InitializeParent(parent COTPPacket , parameters []COTPParameter , payload S7Message ) { m.Parameters = parameters m.Payload = payload } -func (m *_COTPPacketDisconnectRequest) GetParent() COTPPacket { +func (m *_COTPPacketDisconnectRequest) GetParent() COTPPacket { return m._COTPPacket } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -100,13 +101,14 @@ func (m *_COTPPacketDisconnectRequest) GetProtocolClass() COTPProtocolClass { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCOTPPacketDisconnectRequest factory function for _COTPPacketDisconnectRequest -func NewCOTPPacketDisconnectRequest(destinationReference uint16, sourceReference uint16, protocolClass COTPProtocolClass, parameters []COTPParameter, payload S7Message, cotpLen uint16) *_COTPPacketDisconnectRequest { +func NewCOTPPacketDisconnectRequest( destinationReference uint16 , sourceReference uint16 , protocolClass COTPProtocolClass , parameters []COTPParameter , payload S7Message , cotpLen uint16 ) *_COTPPacketDisconnectRequest { _result := &_COTPPacketDisconnectRequest{ DestinationReference: destinationReference, - SourceReference: sourceReference, - ProtocolClass: protocolClass, - _COTPPacket: NewCOTPPacket(parameters, payload, cotpLen), + SourceReference: sourceReference, + ProtocolClass: protocolClass, + _COTPPacket: NewCOTPPacket(parameters, payload, cotpLen), } _result._COTPPacket._COTPPacketChildRequirements = _result return _result @@ -114,7 +116,7 @@ func NewCOTPPacketDisconnectRequest(destinationReference uint16, sourceReference // Deprecated: use the interface for direct cast func CastCOTPPacketDisconnectRequest(structType interface{}) COTPPacketDisconnectRequest { - if casted, ok := structType.(COTPPacketDisconnectRequest); ok { + if casted, ok := structType.(COTPPacketDisconnectRequest); ok { return casted } if casted, ok := structType.(*COTPPacketDisconnectRequest); ok { @@ -131,10 +133,10 @@ func (m *_COTPPacketDisconnectRequest) GetLengthInBits(ctx context.Context) uint lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (destinationReference) - lengthInBits += 16 + lengthInBits += 16; // Simple field (sourceReference) - lengthInBits += 16 + lengthInBits += 16; // Simple field (protocolClass) lengthInBits += 8 @@ -142,6 +144,7 @@ func (m *_COTPPacketDisconnectRequest) GetLengthInBits(ctx context.Context) uint return lengthInBits } + func (m *_COTPPacketDisconnectRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -160,14 +163,14 @@ func COTPPacketDisconnectRequestParseWithBuffer(ctx context.Context, readBuffer _ = currentPos // Simple Field (destinationReference) - _destinationReference, _destinationReferenceErr := readBuffer.ReadUint16("destinationReference", 16) +_destinationReference, _destinationReferenceErr := readBuffer.ReadUint16("destinationReference", 16) if _destinationReferenceErr != nil { return nil, errors.Wrap(_destinationReferenceErr, "Error parsing 'destinationReference' field of COTPPacketDisconnectRequest") } destinationReference := _destinationReference // Simple Field (sourceReference) - _sourceReference, _sourceReferenceErr := readBuffer.ReadUint16("sourceReference", 16) +_sourceReference, _sourceReferenceErr := readBuffer.ReadUint16("sourceReference", 16) if _sourceReferenceErr != nil { return nil, errors.Wrap(_sourceReferenceErr, "Error parsing 'sourceReference' field of COTPPacketDisconnectRequest") } @@ -177,7 +180,7 @@ func COTPPacketDisconnectRequestParseWithBuffer(ctx context.Context, readBuffer if pullErr := readBuffer.PullContext("protocolClass"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for protocolClass") } - _protocolClass, _protocolClassErr := COTPProtocolClassParseWithBuffer(ctx, readBuffer) +_protocolClass, _protocolClassErr := COTPProtocolClassParseWithBuffer(ctx, readBuffer) if _protocolClassErr != nil { return nil, errors.Wrap(_protocolClassErr, "Error parsing 'protocolClass' field of COTPPacketDisconnectRequest") } @@ -196,8 +199,8 @@ func COTPPacketDisconnectRequestParseWithBuffer(ctx context.Context, readBuffer CotpLen: cotpLen, }, DestinationReference: destinationReference, - SourceReference: sourceReference, - ProtocolClass: protocolClass, + SourceReference: sourceReference, + ProtocolClass: protocolClass, } _child._COTPPacket._COTPPacketChildRequirements = _child return _child, nil @@ -219,31 +222,31 @@ func (m *_COTPPacketDisconnectRequest) SerializeWithWriteBuffer(ctx context.Cont return errors.Wrap(pushErr, "Error pushing for COTPPacketDisconnectRequest") } - // Simple Field (destinationReference) - destinationReference := uint16(m.GetDestinationReference()) - _destinationReferenceErr := writeBuffer.WriteUint16("destinationReference", 16, (destinationReference)) - if _destinationReferenceErr != nil { - return errors.Wrap(_destinationReferenceErr, "Error serializing 'destinationReference' field") - } + // Simple Field (destinationReference) + destinationReference := uint16(m.GetDestinationReference()) + _destinationReferenceErr := writeBuffer.WriteUint16("destinationReference", 16, (destinationReference)) + if _destinationReferenceErr != nil { + return errors.Wrap(_destinationReferenceErr, "Error serializing 'destinationReference' field") + } - // Simple Field (sourceReference) - sourceReference := uint16(m.GetSourceReference()) - _sourceReferenceErr := writeBuffer.WriteUint16("sourceReference", 16, (sourceReference)) - if _sourceReferenceErr != nil { - return errors.Wrap(_sourceReferenceErr, "Error serializing 'sourceReference' field") - } + // Simple Field (sourceReference) + sourceReference := uint16(m.GetSourceReference()) + _sourceReferenceErr := writeBuffer.WriteUint16("sourceReference", 16, (sourceReference)) + if _sourceReferenceErr != nil { + return errors.Wrap(_sourceReferenceErr, "Error serializing 'sourceReference' field") + } - // Simple Field (protocolClass) - if pushErr := writeBuffer.PushContext("protocolClass"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for protocolClass") - } - _protocolClassErr := writeBuffer.WriteSerializable(ctx, m.GetProtocolClass()) - if popErr := writeBuffer.PopContext("protocolClass"); popErr != nil { - return errors.Wrap(popErr, "Error popping for protocolClass") - } - if _protocolClassErr != nil { - return errors.Wrap(_protocolClassErr, "Error serializing 'protocolClass' field") - } + // Simple Field (protocolClass) + if pushErr := writeBuffer.PushContext("protocolClass"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for protocolClass") + } + _protocolClassErr := writeBuffer.WriteSerializable(ctx, m.GetProtocolClass()) + if popErr := writeBuffer.PopContext("protocolClass"); popErr != nil { + return errors.Wrap(popErr, "Error popping for protocolClass") + } + if _protocolClassErr != nil { + return errors.Wrap(_protocolClassErr, "Error serializing 'protocolClass' field") + } if popErr := writeBuffer.PopContext("COTPPacketDisconnectRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for COTPPacketDisconnectRequest") @@ -253,6 +256,7 @@ func (m *_COTPPacketDisconnectRequest) SerializeWithWriteBuffer(ctx context.Cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_COTPPacketDisconnectRequest) isCOTPPacketDisconnectRequest() bool { return true } @@ -267,3 +271,6 @@ func (m *_COTPPacketDisconnectRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/COTPPacketDisconnectResponse.go b/plc4go/protocols/s7/readwrite/model/COTPPacketDisconnectResponse.go index aea74c2ff3f..50ecff468f1 100644 --- a/plc4go/protocols/s7/readwrite/model/COTPPacketDisconnectResponse.go +++ b/plc4go/protocols/s7/readwrite/model/COTPPacketDisconnectResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // COTPPacketDisconnectResponse is the corresponding interface of COTPPacketDisconnectResponse type COTPPacketDisconnectResponse interface { @@ -48,33 +50,32 @@ type COTPPacketDisconnectResponseExactly interface { // _COTPPacketDisconnectResponse is the data-structure of this message type _COTPPacketDisconnectResponse struct { *_COTPPacket - DestinationReference uint16 - SourceReference uint16 + DestinationReference uint16 + SourceReference uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_COTPPacketDisconnectResponse) GetTpduCode() uint8 { - return 0xC0 -} +func (m *_COTPPacketDisconnectResponse) GetTpduCode() uint8 { +return 0xC0} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_COTPPacketDisconnectResponse) InitializeParent(parent COTPPacket, parameters []COTPParameter, payload S7Message) { - m.Parameters = parameters +func (m *_COTPPacketDisconnectResponse) InitializeParent(parent COTPPacket , parameters []COTPParameter , payload S7Message ) { m.Parameters = parameters m.Payload = payload } -func (m *_COTPPacketDisconnectResponse) GetParent() COTPPacket { +func (m *_COTPPacketDisconnectResponse) GetParent() COTPPacket { return m._COTPPacket } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -93,12 +94,13 @@ func (m *_COTPPacketDisconnectResponse) GetSourceReference() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCOTPPacketDisconnectResponse factory function for _COTPPacketDisconnectResponse -func NewCOTPPacketDisconnectResponse(destinationReference uint16, sourceReference uint16, parameters []COTPParameter, payload S7Message, cotpLen uint16) *_COTPPacketDisconnectResponse { +func NewCOTPPacketDisconnectResponse( destinationReference uint16 , sourceReference uint16 , parameters []COTPParameter , payload S7Message , cotpLen uint16 ) *_COTPPacketDisconnectResponse { _result := &_COTPPacketDisconnectResponse{ DestinationReference: destinationReference, - SourceReference: sourceReference, - _COTPPacket: NewCOTPPacket(parameters, payload, cotpLen), + SourceReference: sourceReference, + _COTPPacket: NewCOTPPacket(parameters, payload, cotpLen), } _result._COTPPacket._COTPPacketChildRequirements = _result return _result @@ -106,7 +108,7 @@ func NewCOTPPacketDisconnectResponse(destinationReference uint16, sourceReferenc // Deprecated: use the interface for direct cast func CastCOTPPacketDisconnectResponse(structType interface{}) COTPPacketDisconnectResponse { - if casted, ok := structType.(COTPPacketDisconnectResponse); ok { + if casted, ok := structType.(COTPPacketDisconnectResponse); ok { return casted } if casted, ok := structType.(*COTPPacketDisconnectResponse); ok { @@ -123,14 +125,15 @@ func (m *_COTPPacketDisconnectResponse) GetLengthInBits(ctx context.Context) uin lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (destinationReference) - lengthInBits += 16 + lengthInBits += 16; // Simple field (sourceReference) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_COTPPacketDisconnectResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -149,14 +152,14 @@ func COTPPacketDisconnectResponseParseWithBuffer(ctx context.Context, readBuffer _ = currentPos // Simple Field (destinationReference) - _destinationReference, _destinationReferenceErr := readBuffer.ReadUint16("destinationReference", 16) +_destinationReference, _destinationReferenceErr := readBuffer.ReadUint16("destinationReference", 16) if _destinationReferenceErr != nil { return nil, errors.Wrap(_destinationReferenceErr, "Error parsing 'destinationReference' field of COTPPacketDisconnectResponse") } destinationReference := _destinationReference // Simple Field (sourceReference) - _sourceReference, _sourceReferenceErr := readBuffer.ReadUint16("sourceReference", 16) +_sourceReference, _sourceReferenceErr := readBuffer.ReadUint16("sourceReference", 16) if _sourceReferenceErr != nil { return nil, errors.Wrap(_sourceReferenceErr, "Error parsing 'sourceReference' field of COTPPacketDisconnectResponse") } @@ -172,7 +175,7 @@ func COTPPacketDisconnectResponseParseWithBuffer(ctx context.Context, readBuffer CotpLen: cotpLen, }, DestinationReference: destinationReference, - SourceReference: sourceReference, + SourceReference: sourceReference, } _child._COTPPacket._COTPPacketChildRequirements = _child return _child, nil @@ -194,19 +197,19 @@ func (m *_COTPPacketDisconnectResponse) SerializeWithWriteBuffer(ctx context.Con return errors.Wrap(pushErr, "Error pushing for COTPPacketDisconnectResponse") } - // Simple Field (destinationReference) - destinationReference := uint16(m.GetDestinationReference()) - _destinationReferenceErr := writeBuffer.WriteUint16("destinationReference", 16, (destinationReference)) - if _destinationReferenceErr != nil { - return errors.Wrap(_destinationReferenceErr, "Error serializing 'destinationReference' field") - } + // Simple Field (destinationReference) + destinationReference := uint16(m.GetDestinationReference()) + _destinationReferenceErr := writeBuffer.WriteUint16("destinationReference", 16, (destinationReference)) + if _destinationReferenceErr != nil { + return errors.Wrap(_destinationReferenceErr, "Error serializing 'destinationReference' field") + } - // Simple Field (sourceReference) - sourceReference := uint16(m.GetSourceReference()) - _sourceReferenceErr := writeBuffer.WriteUint16("sourceReference", 16, (sourceReference)) - if _sourceReferenceErr != nil { - return errors.Wrap(_sourceReferenceErr, "Error serializing 'sourceReference' field") - } + // Simple Field (sourceReference) + sourceReference := uint16(m.GetSourceReference()) + _sourceReferenceErr := writeBuffer.WriteUint16("sourceReference", 16, (sourceReference)) + if _sourceReferenceErr != nil { + return errors.Wrap(_sourceReferenceErr, "Error serializing 'sourceReference' field") + } if popErr := writeBuffer.PopContext("COTPPacketDisconnectResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for COTPPacketDisconnectResponse") @@ -216,6 +219,7 @@ func (m *_COTPPacketDisconnectResponse) SerializeWithWriteBuffer(ctx context.Con return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_COTPPacketDisconnectResponse) isCOTPPacketDisconnectResponse() bool { return true } @@ -230,3 +234,6 @@ func (m *_COTPPacketDisconnectResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/COTPPacketTpduError.go b/plc4go/protocols/s7/readwrite/model/COTPPacketTpduError.go index a3b84550f4e..975c73d0f34 100644 --- a/plc4go/protocols/s7/readwrite/model/COTPPacketTpduError.go +++ b/plc4go/protocols/s7/readwrite/model/COTPPacketTpduError.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // COTPPacketTpduError is the corresponding interface of COTPPacketTpduError type COTPPacketTpduError interface { @@ -48,33 +50,32 @@ type COTPPacketTpduErrorExactly interface { // _COTPPacketTpduError is the data-structure of this message type _COTPPacketTpduError struct { *_COTPPacket - DestinationReference uint16 - RejectCause uint8 + DestinationReference uint16 + RejectCause uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_COTPPacketTpduError) GetTpduCode() uint8 { - return 0x70 -} +func (m *_COTPPacketTpduError) GetTpduCode() uint8 { +return 0x70} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_COTPPacketTpduError) InitializeParent(parent COTPPacket, parameters []COTPParameter, payload S7Message) { - m.Parameters = parameters +func (m *_COTPPacketTpduError) InitializeParent(parent COTPPacket , parameters []COTPParameter , payload S7Message ) { m.Parameters = parameters m.Payload = payload } -func (m *_COTPPacketTpduError) GetParent() COTPPacket { +func (m *_COTPPacketTpduError) GetParent() COTPPacket { return m._COTPPacket } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -93,12 +94,13 @@ func (m *_COTPPacketTpduError) GetRejectCause() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCOTPPacketTpduError factory function for _COTPPacketTpduError -func NewCOTPPacketTpduError(destinationReference uint16, rejectCause uint8, parameters []COTPParameter, payload S7Message, cotpLen uint16) *_COTPPacketTpduError { +func NewCOTPPacketTpduError( destinationReference uint16 , rejectCause uint8 , parameters []COTPParameter , payload S7Message , cotpLen uint16 ) *_COTPPacketTpduError { _result := &_COTPPacketTpduError{ DestinationReference: destinationReference, - RejectCause: rejectCause, - _COTPPacket: NewCOTPPacket(parameters, payload, cotpLen), + RejectCause: rejectCause, + _COTPPacket: NewCOTPPacket(parameters, payload, cotpLen), } _result._COTPPacket._COTPPacketChildRequirements = _result return _result @@ -106,7 +108,7 @@ func NewCOTPPacketTpduError(destinationReference uint16, rejectCause uint8, para // Deprecated: use the interface for direct cast func CastCOTPPacketTpduError(structType interface{}) COTPPacketTpduError { - if casted, ok := structType.(COTPPacketTpduError); ok { + if casted, ok := structType.(COTPPacketTpduError); ok { return casted } if casted, ok := structType.(*COTPPacketTpduError); ok { @@ -123,14 +125,15 @@ func (m *_COTPPacketTpduError) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (destinationReference) - lengthInBits += 16 + lengthInBits += 16; // Simple field (rejectCause) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_COTPPacketTpduError) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -149,14 +152,14 @@ func COTPPacketTpduErrorParseWithBuffer(ctx context.Context, readBuffer utils.Re _ = currentPos // Simple Field (destinationReference) - _destinationReference, _destinationReferenceErr := readBuffer.ReadUint16("destinationReference", 16) +_destinationReference, _destinationReferenceErr := readBuffer.ReadUint16("destinationReference", 16) if _destinationReferenceErr != nil { return nil, errors.Wrap(_destinationReferenceErr, "Error parsing 'destinationReference' field of COTPPacketTpduError") } destinationReference := _destinationReference // Simple Field (rejectCause) - _rejectCause, _rejectCauseErr := readBuffer.ReadUint8("rejectCause", 8) +_rejectCause, _rejectCauseErr := readBuffer.ReadUint8("rejectCause", 8) if _rejectCauseErr != nil { return nil, errors.Wrap(_rejectCauseErr, "Error parsing 'rejectCause' field of COTPPacketTpduError") } @@ -172,7 +175,7 @@ func COTPPacketTpduErrorParseWithBuffer(ctx context.Context, readBuffer utils.Re CotpLen: cotpLen, }, DestinationReference: destinationReference, - RejectCause: rejectCause, + RejectCause: rejectCause, } _child._COTPPacket._COTPPacketChildRequirements = _child return _child, nil @@ -194,19 +197,19 @@ func (m *_COTPPacketTpduError) SerializeWithWriteBuffer(ctx context.Context, wri return errors.Wrap(pushErr, "Error pushing for COTPPacketTpduError") } - // Simple Field (destinationReference) - destinationReference := uint16(m.GetDestinationReference()) - _destinationReferenceErr := writeBuffer.WriteUint16("destinationReference", 16, (destinationReference)) - if _destinationReferenceErr != nil { - return errors.Wrap(_destinationReferenceErr, "Error serializing 'destinationReference' field") - } + // Simple Field (destinationReference) + destinationReference := uint16(m.GetDestinationReference()) + _destinationReferenceErr := writeBuffer.WriteUint16("destinationReference", 16, (destinationReference)) + if _destinationReferenceErr != nil { + return errors.Wrap(_destinationReferenceErr, "Error serializing 'destinationReference' field") + } - // Simple Field (rejectCause) - rejectCause := uint8(m.GetRejectCause()) - _rejectCauseErr := writeBuffer.WriteUint8("rejectCause", 8, (rejectCause)) - if _rejectCauseErr != nil { - return errors.Wrap(_rejectCauseErr, "Error serializing 'rejectCause' field") - } + // Simple Field (rejectCause) + rejectCause := uint8(m.GetRejectCause()) + _rejectCauseErr := writeBuffer.WriteUint8("rejectCause", 8, (rejectCause)) + if _rejectCauseErr != nil { + return errors.Wrap(_rejectCauseErr, "Error serializing 'rejectCause' field") + } if popErr := writeBuffer.PopContext("COTPPacketTpduError"); popErr != nil { return errors.Wrap(popErr, "Error popping for COTPPacketTpduError") @@ -216,6 +219,7 @@ func (m *_COTPPacketTpduError) SerializeWithWriteBuffer(ctx context.Context, wri return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_COTPPacketTpduError) isCOTPPacketTpduError() bool { return true } @@ -230,3 +234,6 @@ func (m *_COTPPacketTpduError) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/COTPParameter.go b/plc4go/protocols/s7/readwrite/model/COTPParameter.go index 1271852e37a..6833cbed3fb 100644 --- a/plc4go/protocols/s7/readwrite/model/COTPParameter.go +++ b/plc4go/protocols/s7/readwrite/model/COTPParameter.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // COTPParameter is the corresponding interface of COTPParameter type COTPParameter interface { @@ -56,6 +58,7 @@ type _COTPParameterChildRequirements interface { GetParameterType() uint8 } + type COTPParameterParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child COTPParameter, serializeChildFunction func() error) error GetTypeName() string @@ -63,21 +66,22 @@ type COTPParameterParent interface { type COTPParameterChild interface { utils.Serializable - InitializeParent(parent COTPParameter) +InitializeParent(parent COTPParameter ) GetParent() *COTPParameter GetTypeName() string COTPParameter } + // NewCOTPParameter factory function for _COTPParameter -func NewCOTPParameter(rest uint8) *_COTPParameter { - return &_COTPParameter{Rest: rest} +func NewCOTPParameter( rest uint8 ) *_COTPParameter { +return &_COTPParameter{ Rest: rest } } // Deprecated: use the interface for direct cast func CastCOTPParameter(structType interface{}) COTPParameter { - if casted, ok := structType.(COTPParameter); ok { + if casted, ok := structType.(COTPParameter); ok { return casted } if casted, ok := structType.(*COTPParameter); ok { @@ -90,10 +94,11 @@ func (m *_COTPParameter) GetTypeName() string { return "COTPParameter" } + func (m *_COTPParameter) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Discriminator Field (parameterType) - lengthInBits += 8 + lengthInBits += 8; // Implicit Field (parameterLength) lengthInBits += 8 @@ -134,22 +139,22 @@ func COTPParameterParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type COTPParameterChildSerializeRequirement interface { COTPParameter - InitializeParent(COTPParameter) + InitializeParent(COTPParameter ) GetParent() COTPParameter } var _childTemp interface{} var _child COTPParameterChildSerializeRequirement var typeSwitchError error switch { - case parameterType == 0xC0: // COTPParameterTpduSize +case parameterType == 0xC0 : // COTPParameterTpduSize _childTemp, typeSwitchError = COTPParameterTpduSizeParseWithBuffer(ctx, readBuffer, rest) - case parameterType == 0xC1: // COTPParameterCallingTsap +case parameterType == 0xC1 : // COTPParameterCallingTsap _childTemp, typeSwitchError = COTPParameterCallingTsapParseWithBuffer(ctx, readBuffer, rest) - case parameterType == 0xC2: // COTPParameterCalledTsap +case parameterType == 0xC2 : // COTPParameterCalledTsap _childTemp, typeSwitchError = COTPParameterCalledTsapParseWithBuffer(ctx, readBuffer, rest) - case parameterType == 0xC3: // COTPParameterChecksum +case parameterType == 0xC3 : // COTPParameterChecksum _childTemp, typeSwitchError = COTPParameterChecksumParseWithBuffer(ctx, readBuffer, rest) - case parameterType == 0xE0: // COTPParameterDisconnectAdditionalInformation +case parameterType == 0xE0 : // COTPParameterDisconnectAdditionalInformation _childTemp, typeSwitchError = COTPParameterDisconnectAdditionalInformationParseWithBuffer(ctx, readBuffer, rest) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [parameterType=%v]", parameterType) @@ -164,7 +169,7 @@ func COTPParameterParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuff } // Finish initializing - _child.InitializeParent(_child) +_child.InitializeParent(_child ) return _child, nil } @@ -174,7 +179,7 @@ func (pm *_COTPParameter) SerializeParent(ctx context.Context, writeBuffer utils _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("COTPParameter"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("COTPParameter"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for COTPParameter") } @@ -204,13 +209,13 @@ func (pm *_COTPParameter) SerializeParent(ctx context.Context, writeBuffer utils return nil } + //// // Arguments Getter func (m *_COTPParameter) GetRest() uint8 { return m.Rest } - // //// @@ -228,3 +233,6 @@ func (m *_COTPParameter) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/COTPParameterCalledTsap.go b/plc4go/protocols/s7/readwrite/model/COTPParameterCalledTsap.go index 9f8487f3a5f..183f35dffb0 100644 --- a/plc4go/protocols/s7/readwrite/model/COTPParameterCalledTsap.go +++ b/plc4go/protocols/s7/readwrite/model/COTPParameterCalledTsap.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // COTPParameterCalledTsap is the corresponding interface of COTPParameterCalledTsap type COTPParameterCalledTsap interface { @@ -46,29 +48,29 @@ type COTPParameterCalledTsapExactly interface { // _COTPParameterCalledTsap is the data-structure of this message type _COTPParameterCalledTsap struct { *_COTPParameter - TsapId uint16 + TsapId uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_COTPParameterCalledTsap) GetParameterType() uint8 { - return 0xC2 -} +func (m *_COTPParameterCalledTsap) GetParameterType() uint8 { +return 0xC2} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_COTPParameterCalledTsap) InitializeParent(parent COTPParameter) {} +func (m *_COTPParameterCalledTsap) InitializeParent(parent COTPParameter ) {} -func (m *_COTPParameterCalledTsap) GetParent() COTPParameter { +func (m *_COTPParameterCalledTsap) GetParent() COTPParameter { return m._COTPParameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_COTPParameterCalledTsap) GetTsapId() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCOTPParameterCalledTsap factory function for _COTPParameterCalledTsap -func NewCOTPParameterCalledTsap(tsapId uint16, rest uint8) *_COTPParameterCalledTsap { +func NewCOTPParameterCalledTsap( tsapId uint16 , rest uint8 ) *_COTPParameterCalledTsap { _result := &_COTPParameterCalledTsap{ - TsapId: tsapId, - _COTPParameter: NewCOTPParameter(rest), + TsapId: tsapId, + _COTPParameter: NewCOTPParameter(rest), } _result._COTPParameter._COTPParameterChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewCOTPParameterCalledTsap(tsapId uint16, rest uint8) *_COTPParameterCalled // Deprecated: use the interface for direct cast func CastCOTPParameterCalledTsap(structType interface{}) COTPParameterCalledTsap { - if casted, ok := structType.(COTPParameterCalledTsap); ok { + if casted, ok := structType.(COTPParameterCalledTsap); ok { return casted } if casted, ok := structType.(*COTPParameterCalledTsap); ok { @@ -112,11 +115,12 @@ func (m *_COTPParameterCalledTsap) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (tsapId) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_COTPParameterCalledTsap) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -135,7 +139,7 @@ func COTPParameterCalledTsapParseWithBuffer(ctx context.Context, readBuffer util _ = currentPos // Simple Field (tsapId) - _tsapId, _tsapIdErr := readBuffer.ReadUint16("tsapId", 16) +_tsapId, _tsapIdErr := readBuffer.ReadUint16("tsapId", 16) if _tsapIdErr != nil { return nil, errors.Wrap(_tsapIdErr, "Error parsing 'tsapId' field of COTPParameterCalledTsap") } @@ -172,12 +176,12 @@ func (m *_COTPParameterCalledTsap) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for COTPParameterCalledTsap") } - // Simple Field (tsapId) - tsapId := uint16(m.GetTsapId()) - _tsapIdErr := writeBuffer.WriteUint16("tsapId", 16, (tsapId)) - if _tsapIdErr != nil { - return errors.Wrap(_tsapIdErr, "Error serializing 'tsapId' field") - } + // Simple Field (tsapId) + tsapId := uint16(m.GetTsapId()) + _tsapIdErr := writeBuffer.WriteUint16("tsapId", 16, (tsapId)) + if _tsapIdErr != nil { + return errors.Wrap(_tsapIdErr, "Error serializing 'tsapId' field") + } if popErr := writeBuffer.PopContext("COTPParameterCalledTsap"); popErr != nil { return errors.Wrap(popErr, "Error popping for COTPParameterCalledTsap") @@ -187,6 +191,7 @@ func (m *_COTPParameterCalledTsap) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_COTPParameterCalledTsap) isCOTPParameterCalledTsap() bool { return true } @@ -201,3 +206,6 @@ func (m *_COTPParameterCalledTsap) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/COTPParameterCallingTsap.go b/plc4go/protocols/s7/readwrite/model/COTPParameterCallingTsap.go index 43564709cde..52e227e5f4e 100644 --- a/plc4go/protocols/s7/readwrite/model/COTPParameterCallingTsap.go +++ b/plc4go/protocols/s7/readwrite/model/COTPParameterCallingTsap.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // COTPParameterCallingTsap is the corresponding interface of COTPParameterCallingTsap type COTPParameterCallingTsap interface { @@ -46,29 +48,29 @@ type COTPParameterCallingTsapExactly interface { // _COTPParameterCallingTsap is the data-structure of this message type _COTPParameterCallingTsap struct { *_COTPParameter - TsapId uint16 + TsapId uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_COTPParameterCallingTsap) GetParameterType() uint8 { - return 0xC1 -} +func (m *_COTPParameterCallingTsap) GetParameterType() uint8 { +return 0xC1} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_COTPParameterCallingTsap) InitializeParent(parent COTPParameter) {} +func (m *_COTPParameterCallingTsap) InitializeParent(parent COTPParameter ) {} -func (m *_COTPParameterCallingTsap) GetParent() COTPParameter { +func (m *_COTPParameterCallingTsap) GetParent() COTPParameter { return m._COTPParameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_COTPParameterCallingTsap) GetTsapId() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCOTPParameterCallingTsap factory function for _COTPParameterCallingTsap -func NewCOTPParameterCallingTsap(tsapId uint16, rest uint8) *_COTPParameterCallingTsap { +func NewCOTPParameterCallingTsap( tsapId uint16 , rest uint8 ) *_COTPParameterCallingTsap { _result := &_COTPParameterCallingTsap{ - TsapId: tsapId, - _COTPParameter: NewCOTPParameter(rest), + TsapId: tsapId, + _COTPParameter: NewCOTPParameter(rest), } _result._COTPParameter._COTPParameterChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewCOTPParameterCallingTsap(tsapId uint16, rest uint8) *_COTPParameterCalli // Deprecated: use the interface for direct cast func CastCOTPParameterCallingTsap(structType interface{}) COTPParameterCallingTsap { - if casted, ok := structType.(COTPParameterCallingTsap); ok { + if casted, ok := structType.(COTPParameterCallingTsap); ok { return casted } if casted, ok := structType.(*COTPParameterCallingTsap); ok { @@ -112,11 +115,12 @@ func (m *_COTPParameterCallingTsap) GetLengthInBits(ctx context.Context) uint16 lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (tsapId) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_COTPParameterCallingTsap) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -135,7 +139,7 @@ func COTPParameterCallingTsapParseWithBuffer(ctx context.Context, readBuffer uti _ = currentPos // Simple Field (tsapId) - _tsapId, _tsapIdErr := readBuffer.ReadUint16("tsapId", 16) +_tsapId, _tsapIdErr := readBuffer.ReadUint16("tsapId", 16) if _tsapIdErr != nil { return nil, errors.Wrap(_tsapIdErr, "Error parsing 'tsapId' field of COTPParameterCallingTsap") } @@ -172,12 +176,12 @@ func (m *_COTPParameterCallingTsap) SerializeWithWriteBuffer(ctx context.Context return errors.Wrap(pushErr, "Error pushing for COTPParameterCallingTsap") } - // Simple Field (tsapId) - tsapId := uint16(m.GetTsapId()) - _tsapIdErr := writeBuffer.WriteUint16("tsapId", 16, (tsapId)) - if _tsapIdErr != nil { - return errors.Wrap(_tsapIdErr, "Error serializing 'tsapId' field") - } + // Simple Field (tsapId) + tsapId := uint16(m.GetTsapId()) + _tsapIdErr := writeBuffer.WriteUint16("tsapId", 16, (tsapId)) + if _tsapIdErr != nil { + return errors.Wrap(_tsapIdErr, "Error serializing 'tsapId' field") + } if popErr := writeBuffer.PopContext("COTPParameterCallingTsap"); popErr != nil { return errors.Wrap(popErr, "Error popping for COTPParameterCallingTsap") @@ -187,6 +191,7 @@ func (m *_COTPParameterCallingTsap) SerializeWithWriteBuffer(ctx context.Context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_COTPParameterCallingTsap) isCOTPParameterCallingTsap() bool { return true } @@ -201,3 +206,6 @@ func (m *_COTPParameterCallingTsap) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/COTPParameterChecksum.go b/plc4go/protocols/s7/readwrite/model/COTPParameterChecksum.go index 9b49a77c2a9..8453a08397f 100644 --- a/plc4go/protocols/s7/readwrite/model/COTPParameterChecksum.go +++ b/plc4go/protocols/s7/readwrite/model/COTPParameterChecksum.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // COTPParameterChecksum is the corresponding interface of COTPParameterChecksum type COTPParameterChecksum interface { @@ -46,29 +48,29 @@ type COTPParameterChecksumExactly interface { // _COTPParameterChecksum is the data-structure of this message type _COTPParameterChecksum struct { *_COTPParameter - Crc uint8 + Crc uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_COTPParameterChecksum) GetParameterType() uint8 { - return 0xC3 -} +func (m *_COTPParameterChecksum) GetParameterType() uint8 { +return 0xC3} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_COTPParameterChecksum) InitializeParent(parent COTPParameter) {} +func (m *_COTPParameterChecksum) InitializeParent(parent COTPParameter ) {} -func (m *_COTPParameterChecksum) GetParent() COTPParameter { +func (m *_COTPParameterChecksum) GetParent() COTPParameter { return m._COTPParameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_COTPParameterChecksum) GetCrc() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCOTPParameterChecksum factory function for _COTPParameterChecksum -func NewCOTPParameterChecksum(crc uint8, rest uint8) *_COTPParameterChecksum { +func NewCOTPParameterChecksum( crc uint8 , rest uint8 ) *_COTPParameterChecksum { _result := &_COTPParameterChecksum{ - Crc: crc, - _COTPParameter: NewCOTPParameter(rest), + Crc: crc, + _COTPParameter: NewCOTPParameter(rest), } _result._COTPParameter._COTPParameterChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewCOTPParameterChecksum(crc uint8, rest uint8) *_COTPParameterChecksum { // Deprecated: use the interface for direct cast func CastCOTPParameterChecksum(structType interface{}) COTPParameterChecksum { - if casted, ok := structType.(COTPParameterChecksum); ok { + if casted, ok := structType.(COTPParameterChecksum); ok { return casted } if casted, ok := structType.(*COTPParameterChecksum); ok { @@ -112,11 +115,12 @@ func (m *_COTPParameterChecksum) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (crc) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_COTPParameterChecksum) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -135,7 +139,7 @@ func COTPParameterChecksumParseWithBuffer(ctx context.Context, readBuffer utils. _ = currentPos // Simple Field (crc) - _crc, _crcErr := readBuffer.ReadUint8("crc", 8) +_crc, _crcErr := readBuffer.ReadUint8("crc", 8) if _crcErr != nil { return nil, errors.Wrap(_crcErr, "Error parsing 'crc' field of COTPParameterChecksum") } @@ -172,12 +176,12 @@ func (m *_COTPParameterChecksum) SerializeWithWriteBuffer(ctx context.Context, w return errors.Wrap(pushErr, "Error pushing for COTPParameterChecksum") } - // Simple Field (crc) - crc := uint8(m.GetCrc()) - _crcErr := writeBuffer.WriteUint8("crc", 8, (crc)) - if _crcErr != nil { - return errors.Wrap(_crcErr, "Error serializing 'crc' field") - } + // Simple Field (crc) + crc := uint8(m.GetCrc()) + _crcErr := writeBuffer.WriteUint8("crc", 8, (crc)) + if _crcErr != nil { + return errors.Wrap(_crcErr, "Error serializing 'crc' field") + } if popErr := writeBuffer.PopContext("COTPParameterChecksum"); popErr != nil { return errors.Wrap(popErr, "Error popping for COTPParameterChecksum") @@ -187,6 +191,7 @@ func (m *_COTPParameterChecksum) SerializeWithWriteBuffer(ctx context.Context, w return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_COTPParameterChecksum) isCOTPParameterChecksum() bool { return true } @@ -201,3 +206,6 @@ func (m *_COTPParameterChecksum) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/COTPParameterDisconnectAdditionalInformation.go b/plc4go/protocols/s7/readwrite/model/COTPParameterDisconnectAdditionalInformation.go index 7d1d70ab44e..e3da8600aca 100644 --- a/plc4go/protocols/s7/readwrite/model/COTPParameterDisconnectAdditionalInformation.go +++ b/plc4go/protocols/s7/readwrite/model/COTPParameterDisconnectAdditionalInformation.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // COTPParameterDisconnectAdditionalInformation is the corresponding interface of COTPParameterDisconnectAdditionalInformation type COTPParameterDisconnectAdditionalInformation interface { @@ -46,29 +48,29 @@ type COTPParameterDisconnectAdditionalInformationExactly interface { // _COTPParameterDisconnectAdditionalInformation is the data-structure of this message type _COTPParameterDisconnectAdditionalInformation struct { *_COTPParameter - Data []byte + Data []byte } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_COTPParameterDisconnectAdditionalInformation) GetParameterType() uint8 { - return 0xE0 -} +func (m *_COTPParameterDisconnectAdditionalInformation) GetParameterType() uint8 { +return 0xE0} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_COTPParameterDisconnectAdditionalInformation) InitializeParent(parent COTPParameter) {} +func (m *_COTPParameterDisconnectAdditionalInformation) InitializeParent(parent COTPParameter ) {} -func (m *_COTPParameterDisconnectAdditionalInformation) GetParent() COTPParameter { +func (m *_COTPParameterDisconnectAdditionalInformation) GetParent() COTPParameter { return m._COTPParameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_COTPParameterDisconnectAdditionalInformation) GetData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCOTPParameterDisconnectAdditionalInformation factory function for _COTPParameterDisconnectAdditionalInformation -func NewCOTPParameterDisconnectAdditionalInformation(data []byte, rest uint8) *_COTPParameterDisconnectAdditionalInformation { +func NewCOTPParameterDisconnectAdditionalInformation( data []byte , rest uint8 ) *_COTPParameterDisconnectAdditionalInformation { _result := &_COTPParameterDisconnectAdditionalInformation{ - Data: data, - _COTPParameter: NewCOTPParameter(rest), + Data: data, + _COTPParameter: NewCOTPParameter(rest), } _result._COTPParameter._COTPParameterChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewCOTPParameterDisconnectAdditionalInformation(data []byte, rest uint8) *_ // Deprecated: use the interface for direct cast func CastCOTPParameterDisconnectAdditionalInformation(structType interface{}) COTPParameterDisconnectAdditionalInformation { - if casted, ok := structType.(COTPParameterDisconnectAdditionalInformation); ok { + if casted, ok := structType.(COTPParameterDisconnectAdditionalInformation); ok { return casted } if casted, ok := structType.(*COTPParameterDisconnectAdditionalInformation); ok { @@ -119,6 +122,7 @@ func (m *_COTPParameterDisconnectAdditionalInformation) GetLengthInBits(ctx cont return lengthInBits } + func (m *_COTPParameterDisconnectAdditionalInformation) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -173,11 +177,11 @@ func (m *_COTPParameterDisconnectAdditionalInformation) SerializeWithWriteBuffer return errors.Wrap(pushErr, "Error pushing for COTPParameterDisconnectAdditionalInformation") } - // Array Field (data) - // Byte Array field (data) - if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { - return errors.Wrap(err, "Error serializing 'data' field") - } + // Array Field (data) + // Byte Array field (data) + if err := writeBuffer.WriteByteArray("data", m.GetData()); err != nil { + return errors.Wrap(err, "Error serializing 'data' field") + } if popErr := writeBuffer.PopContext("COTPParameterDisconnectAdditionalInformation"); popErr != nil { return errors.Wrap(popErr, "Error popping for COTPParameterDisconnectAdditionalInformation") @@ -187,6 +191,7 @@ func (m *_COTPParameterDisconnectAdditionalInformation) SerializeWithWriteBuffer return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_COTPParameterDisconnectAdditionalInformation) isCOTPParameterDisconnectAdditionalInformation() bool { return true } @@ -201,3 +206,6 @@ func (m *_COTPParameterDisconnectAdditionalInformation) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/COTPParameterTpduSize.go b/plc4go/protocols/s7/readwrite/model/COTPParameterTpduSize.go index f8e16a2ebf5..03b6b073559 100644 --- a/plc4go/protocols/s7/readwrite/model/COTPParameterTpduSize.go +++ b/plc4go/protocols/s7/readwrite/model/COTPParameterTpduSize.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // COTPParameterTpduSize is the corresponding interface of COTPParameterTpduSize type COTPParameterTpduSize interface { @@ -46,29 +48,29 @@ type COTPParameterTpduSizeExactly interface { // _COTPParameterTpduSize is the data-structure of this message type _COTPParameterTpduSize struct { *_COTPParameter - TpduSize COTPTpduSize + TpduSize COTPTpduSize } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_COTPParameterTpduSize) GetParameterType() uint8 { - return 0xC0 -} +func (m *_COTPParameterTpduSize) GetParameterType() uint8 { +return 0xC0} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_COTPParameterTpduSize) InitializeParent(parent COTPParameter) {} +func (m *_COTPParameterTpduSize) InitializeParent(parent COTPParameter ) {} -func (m *_COTPParameterTpduSize) GetParent() COTPParameter { +func (m *_COTPParameterTpduSize) GetParent() COTPParameter { return m._COTPParameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_COTPParameterTpduSize) GetTpduSize() COTPTpduSize { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewCOTPParameterTpduSize factory function for _COTPParameterTpduSize -func NewCOTPParameterTpduSize(tpduSize COTPTpduSize, rest uint8) *_COTPParameterTpduSize { +func NewCOTPParameterTpduSize( tpduSize COTPTpduSize , rest uint8 ) *_COTPParameterTpduSize { _result := &_COTPParameterTpduSize{ - TpduSize: tpduSize, - _COTPParameter: NewCOTPParameter(rest), + TpduSize: tpduSize, + _COTPParameter: NewCOTPParameter(rest), } _result._COTPParameter._COTPParameterChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewCOTPParameterTpduSize(tpduSize COTPTpduSize, rest uint8) *_COTPParameter // Deprecated: use the interface for direct cast func CastCOTPParameterTpduSize(structType interface{}) COTPParameterTpduSize { - if casted, ok := structType.(COTPParameterTpduSize); ok { + if casted, ok := structType.(COTPParameterTpduSize); ok { return casted } if casted, ok := structType.(*COTPParameterTpduSize); ok { @@ -117,6 +120,7 @@ func (m *_COTPParameterTpduSize) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_COTPParameterTpduSize) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -138,7 +142,7 @@ func COTPParameterTpduSizeParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("tpduSize"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for tpduSize") } - _tpduSize, _tpduSizeErr := COTPTpduSizeParseWithBuffer(ctx, readBuffer) +_tpduSize, _tpduSizeErr := COTPTpduSizeParseWithBuffer(ctx, readBuffer) if _tpduSizeErr != nil { return nil, errors.Wrap(_tpduSizeErr, "Error parsing 'tpduSize' field of COTPParameterTpduSize") } @@ -178,17 +182,17 @@ func (m *_COTPParameterTpduSize) SerializeWithWriteBuffer(ctx context.Context, w return errors.Wrap(pushErr, "Error pushing for COTPParameterTpduSize") } - // Simple Field (tpduSize) - if pushErr := writeBuffer.PushContext("tpduSize"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for tpduSize") - } - _tpduSizeErr := writeBuffer.WriteSerializable(ctx, m.GetTpduSize()) - if popErr := writeBuffer.PopContext("tpduSize"); popErr != nil { - return errors.Wrap(popErr, "Error popping for tpduSize") - } - if _tpduSizeErr != nil { - return errors.Wrap(_tpduSizeErr, "Error serializing 'tpduSize' field") - } + // Simple Field (tpduSize) + if pushErr := writeBuffer.PushContext("tpduSize"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for tpduSize") + } + _tpduSizeErr := writeBuffer.WriteSerializable(ctx, m.GetTpduSize()) + if popErr := writeBuffer.PopContext("tpduSize"); popErr != nil { + return errors.Wrap(popErr, "Error popping for tpduSize") + } + if _tpduSizeErr != nil { + return errors.Wrap(_tpduSizeErr, "Error serializing 'tpduSize' field") + } if popErr := writeBuffer.PopContext("COTPParameterTpduSize"); popErr != nil { return errors.Wrap(popErr, "Error popping for COTPParameterTpduSize") @@ -198,6 +202,7 @@ func (m *_COTPParameterTpduSize) SerializeWithWriteBuffer(ctx context.Context, w return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_COTPParameterTpduSize) isCOTPParameterTpduSize() bool { return true } @@ -212,3 +217,6 @@ func (m *_COTPParameterTpduSize) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/COTPProtocolClass.go b/plc4go/protocols/s7/readwrite/model/COTPProtocolClass.go index ae16f3fbfc6..9181f7ebfad 100644 --- a/plc4go/protocols/s7/readwrite/model/COTPProtocolClass.go +++ b/plc4go/protocols/s7/readwrite/model/COTPProtocolClass.go @@ -34,7 +34,7 @@ type ICOTPProtocolClass interface { utils.Serializable } -const ( +const( COTPProtocolClass_CLASS_0 COTPProtocolClass = 0x00 COTPProtocolClass_CLASS_1 COTPProtocolClass = 0x10 COTPProtocolClass_CLASS_2 COTPProtocolClass = 0x20 @@ -46,7 +46,7 @@ var COTPProtocolClassValues []COTPProtocolClass func init() { _ = errors.New - COTPProtocolClassValues = []COTPProtocolClass{ + COTPProtocolClassValues = []COTPProtocolClass { COTPProtocolClass_CLASS_0, COTPProtocolClass_CLASS_1, COTPProtocolClass_CLASS_2, @@ -57,16 +57,16 @@ func init() { func COTPProtocolClassByValue(value uint8) (enum COTPProtocolClass, ok bool) { switch value { - case 0x00: - return COTPProtocolClass_CLASS_0, true - case 0x10: - return COTPProtocolClass_CLASS_1, true - case 0x20: - return COTPProtocolClass_CLASS_2, true - case 0x30: - return COTPProtocolClass_CLASS_3, true - case 0x40: - return COTPProtocolClass_CLASS_4, true + case 0x00: + return COTPProtocolClass_CLASS_0, true + case 0x10: + return COTPProtocolClass_CLASS_1, true + case 0x20: + return COTPProtocolClass_CLASS_2, true + case 0x30: + return COTPProtocolClass_CLASS_3, true + case 0x40: + return COTPProtocolClass_CLASS_4, true } return 0, false } @@ -87,13 +87,13 @@ func COTPProtocolClassByName(value string) (enum COTPProtocolClass, ok bool) { return 0, false } -func COTPProtocolClassKnows(value uint8) bool { +func COTPProtocolClassKnows(value uint8) bool { for _, typeValue := range COTPProtocolClassValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastCOTPProtocolClass(structType interface{}) COTPProtocolClass { @@ -163,3 +163,4 @@ func (e COTPProtocolClass) PLC4XEnumName() string { func (e COTPProtocolClass) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/s7/readwrite/model/COTPTpduSize.go b/plc4go/protocols/s7/readwrite/model/COTPTpduSize.go index f73358818b1..83607d3c617 100644 --- a/plc4go/protocols/s7/readwrite/model/COTPTpduSize.go +++ b/plc4go/protocols/s7/readwrite/model/COTPTpduSize.go @@ -35,10 +35,10 @@ type ICOTPTpduSize interface { SizeInBytes() uint16 } -const ( - COTPTpduSize_SIZE_128 COTPTpduSize = 0x07 - COTPTpduSize_SIZE_256 COTPTpduSize = 0x08 - COTPTpduSize_SIZE_512 COTPTpduSize = 0x09 +const( + COTPTpduSize_SIZE_128 COTPTpduSize = 0x07 + COTPTpduSize_SIZE_256 COTPTpduSize = 0x08 + COTPTpduSize_SIZE_512 COTPTpduSize = 0x09 COTPTpduSize_SIZE_1024 COTPTpduSize = 0x0a COTPTpduSize_SIZE_2048 COTPTpduSize = 0x0b COTPTpduSize_SIZE_4096 COTPTpduSize = 0x0c @@ -49,7 +49,7 @@ var COTPTpduSizeValues []COTPTpduSize func init() { _ = errors.New - COTPTpduSizeValues = []COTPTpduSize{ + COTPTpduSizeValues = []COTPTpduSize { COTPTpduSize_SIZE_128, COTPTpduSize_SIZE_256, COTPTpduSize_SIZE_512, @@ -60,38 +60,31 @@ func init() { } } + func (e COTPTpduSize) SizeInBytes() uint16 { - switch e { - case 0x07: - { /* '0x07' */ - return 128 + switch e { + case 0x07: { /* '0x07' */ + return 128 } - case 0x08: - { /* '0x08' */ - return 256 + case 0x08: { /* '0x08' */ + return 256 } - case 0x09: - { /* '0x09' */ - return 512 + case 0x09: { /* '0x09' */ + return 512 } - case 0x0a: - { /* '0x0a' */ - return 1024 + case 0x0a: { /* '0x0a' */ + return 1024 } - case 0x0b: - { /* '0x0b' */ - return 2048 + case 0x0b: { /* '0x0b' */ + return 2048 } - case 0x0c: - { /* '0x0c' */ - return 4096 + case 0x0c: { /* '0x0c' */ + return 4096 } - case 0x0d: - { /* '0x0d' */ - return 8192 + case 0x0d: { /* '0x0d' */ + return 8192 } - default: - { + default: { return 0 } } @@ -107,20 +100,20 @@ func COTPTpduSizeFirstEnumForFieldSizeInBytes(value uint16) (COTPTpduSize, error } func COTPTpduSizeByValue(value uint8) (enum COTPTpduSize, ok bool) { switch value { - case 0x07: - return COTPTpduSize_SIZE_128, true - case 0x08: - return COTPTpduSize_SIZE_256, true - case 0x09: - return COTPTpduSize_SIZE_512, true - case 0x0a: - return COTPTpduSize_SIZE_1024, true - case 0x0b: - return COTPTpduSize_SIZE_2048, true - case 0x0c: - return COTPTpduSize_SIZE_4096, true - case 0x0d: - return COTPTpduSize_SIZE_8192, true + case 0x07: + return COTPTpduSize_SIZE_128, true + case 0x08: + return COTPTpduSize_SIZE_256, true + case 0x09: + return COTPTpduSize_SIZE_512, true + case 0x0a: + return COTPTpduSize_SIZE_1024, true + case 0x0b: + return COTPTpduSize_SIZE_2048, true + case 0x0c: + return COTPTpduSize_SIZE_4096, true + case 0x0d: + return COTPTpduSize_SIZE_8192, true } return 0, false } @@ -145,13 +138,13 @@ func COTPTpduSizeByName(value string) (enum COTPTpduSize, ok bool) { return 0, false } -func COTPTpduSizeKnows(value uint8) bool { +func COTPTpduSizeKnows(value uint8) bool { for _, typeValue := range COTPTpduSizeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastCOTPTpduSize(structType interface{}) COTPTpduSize { @@ -225,3 +218,4 @@ func (e COTPTpduSize) PLC4XEnumName() string { func (e COTPTpduSize) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/s7/readwrite/model/CpuSubscribeEvents.go b/plc4go/protocols/s7/readwrite/model/CpuSubscribeEvents.go index afe89e5fe1c..c646863fbaf 100644 --- a/plc4go/protocols/s7/readwrite/model/CpuSubscribeEvents.go +++ b/plc4go/protocols/s7/readwrite/model/CpuSubscribeEvents.go @@ -34,18 +34,18 @@ type ICpuSubscribeEvents interface { utils.Serializable } -const ( +const( CpuSubscribeEvents_CPU CpuSubscribeEvents = 0x01 - CpuSubscribeEvents_IM CpuSubscribeEvents = 0x02 - CpuSubscribeEvents_FM CpuSubscribeEvents = 0x04 - CpuSubscribeEvents_CP CpuSubscribeEvents = 0x80 + CpuSubscribeEvents_IM CpuSubscribeEvents = 0x02 + CpuSubscribeEvents_FM CpuSubscribeEvents = 0x04 + CpuSubscribeEvents_CP CpuSubscribeEvents = 0x80 ) var CpuSubscribeEventsValues []CpuSubscribeEvents func init() { _ = errors.New - CpuSubscribeEventsValues = []CpuSubscribeEvents{ + CpuSubscribeEventsValues = []CpuSubscribeEvents { CpuSubscribeEvents_CPU, CpuSubscribeEvents_IM, CpuSubscribeEvents_FM, @@ -55,14 +55,14 @@ func init() { func CpuSubscribeEventsByValue(value uint8) (enum CpuSubscribeEvents, ok bool) { switch value { - case 0x01: - return CpuSubscribeEvents_CPU, true - case 0x02: - return CpuSubscribeEvents_IM, true - case 0x04: - return CpuSubscribeEvents_FM, true - case 0x80: - return CpuSubscribeEvents_CP, true + case 0x01: + return CpuSubscribeEvents_CPU, true + case 0x02: + return CpuSubscribeEvents_IM, true + case 0x04: + return CpuSubscribeEvents_FM, true + case 0x80: + return CpuSubscribeEvents_CP, true } return 0, false } @@ -81,13 +81,13 @@ func CpuSubscribeEventsByName(value string) (enum CpuSubscribeEvents, ok bool) { return 0, false } -func CpuSubscribeEventsKnows(value uint8) bool { +func CpuSubscribeEventsKnows(value uint8) bool { for _, typeValue := range CpuSubscribeEventsValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastCpuSubscribeEvents(structType interface{}) CpuSubscribeEvents { @@ -155,3 +155,4 @@ func (e CpuSubscribeEvents) PLC4XEnumName() string { func (e CpuSubscribeEvents) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/s7/readwrite/model/DataItem.go b/plc4go/protocols/s7/readwrite/model/DataItem.go index a7879462c14..fcc110afa1c 100644 --- a/plc4go/protocols/s7/readwrite/model/DataItem.go +++ b/plc4go/protocols/s7/readwrite/model/DataItem.go @@ -19,465 +19,472 @@ package model + import ( "context" - api "github.com/apache/plc4x/plc4go/pkg/api/values" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/apache/plc4x/plc4go/spi/values" "github.com/pkg/errors" + api "github.com/apache/plc4x/plc4go/pkg/api/values" ) -// Code generated by code-generation. DO NOT EDIT. - -func DataItemParse(ctx context.Context, theBytes []byte, dataProtocolId string, stringLength int32) (api.PlcValue, error) { - return DataItemParseWithBuffer(ctx, utils.NewReadBufferByteBased(theBytes), dataProtocolId, stringLength) + // Code generated by code-generation. DO NOT EDIT. + +func DataItemParse(ctx context.Context, theBytes []byte, dataProtocolId string, stringLength int32, stringEncoding string) (api.PlcValue, error) { + return DataItemParseWithBuffer(ctx, utils.NewReadBufferByteBased(theBytes), dataProtocolId, stringLength, stringEncoding) } -func DataItemParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, dataProtocolId string, stringLength int32) (api.PlcValue, error) { +func DataItemParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, dataProtocolId string, stringLength int32, stringEncoding string) (api.PlcValue, error) { readBuffer.PullContext("DataItem") switch { - case dataProtocolId == "IEC61131_BOOL": // BOOL - // Reserved Field (Just skip the bytes) - if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { - return nil, errors.Wrap(_err, "Error parsing reserved field") - } +case dataProtocolId == "IEC61131_BOOL" : // BOOL + // Reserved Field (Just skip the bytes) + if _, _err := readBuffer.ReadUint8("reserved", 7); _err != nil { + return nil, errors.Wrap(_err, "Error parsing reserved field") + } - // Simple Field (value) - value, _valueErr := readBuffer.ReadBit("value") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcBOOL(value), nil - case dataProtocolId == "IEC61131_BYTE": // BYTE - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcBYTE(value), nil - case dataProtocolId == "IEC61131_WORD": // WORD - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint16("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcWORD(value), nil - case dataProtocolId == "IEC61131_DWORD": // DWORD - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcDWORD(value), nil - case dataProtocolId == "IEC61131_LWORD": // LWORD - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint64("value", 64) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcLWORD(value), nil - case dataProtocolId == "IEC61131_SINT": // SINT - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcSINT(value), nil - case dataProtocolId == "IEC61131_USINT": // USINT - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcUSINT(value), nil - case dataProtocolId == "IEC61131_INT": // INT - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt16("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcINT(value), nil - case dataProtocolId == "IEC61131_UINT": // UINT - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint16("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcUINT(value), nil - case dataProtocolId == "IEC61131_DINT": // DINT - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcDINT(value), nil - case dataProtocolId == "IEC61131_UDINT": // UDINT - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcUDINT(value), nil - case dataProtocolId == "IEC61131_LINT": // LINT - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt64("value", 64) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcLINT(value), nil - case dataProtocolId == "IEC61131_ULINT": // ULINT - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint64("value", 64) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcULINT(value), nil - case dataProtocolId == "IEC61131_REAL": // REAL - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcREAL(value), nil - case dataProtocolId == "IEC61131_LREAL": // LREAL - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat64("value", 64) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcLREAL(value), nil - case dataProtocolId == "IEC61131_CHAR": // CHAR - // Simple Field (value) - value, _valueErr := readBuffer.ReadString("value", uint32(8), "UTF-8") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcCHAR(value), nil - case dataProtocolId == "IEC61131_WCHAR": // CHAR - // Simple Field (value) - value, _valueErr := readBuffer.ReadString("value", uint32(16), "UTF-16") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcCHAR(value), nil - case dataProtocolId == "IEC61131_STRING": // STRING - // Manual Field (value) - value, _valueErr := ParseS7String(readBuffer, stringLength, "UTF-8") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcSTRING(value), nil - case dataProtocolId == "IEC61131_WSTRING": // STRING - // Manual Field (value) - value, _valueErr := ParseS7String(readBuffer, stringLength, "UTF-16") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcSTRING(value), nil - case dataProtocolId == "IEC61131_TIME": // TIME - // Simple Field (milliseconds) - milliseconds, _millisecondsErr := readBuffer.ReadUint32("milliseconds", 32) - if _millisecondsErr != nil { - return nil, errors.Wrap(_millisecondsErr, "Error parsing 'milliseconds' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcTIMEFromMilliseconds(milliseconds), nil - case dataProtocolId == "IEC61131_LTIME": // LTIME - // Simple Field (nanoseconds) - nanoseconds, _nanosecondsErr := readBuffer.ReadUint64("nanoseconds", 64) - if _nanosecondsErr != nil { - return nil, errors.Wrap(_nanosecondsErr, "Error parsing 'nanoseconds' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcLTIMEFromNanoseconds(nanoseconds), nil - case dataProtocolId == "IEC61131_DATE": // DATE - // Simple Field (daysSinceSiemensEpoch) - daysSinceSiemensEpoch, _daysSinceSiemensEpochErr := readBuffer.ReadUint16("daysSinceSiemensEpoch", 16) - if _daysSinceSiemensEpochErr != nil { - return nil, errors.Wrap(_daysSinceSiemensEpochErr, "Error parsing 'daysSinceSiemensEpoch' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcDATEFromDaysSinceSiemensEpoch(daysSinceSiemensEpoch), nil - case dataProtocolId == "IEC61131_TIME_OF_DAY": // TIME_OF_DAY - // Simple Field (millisecondsSinceMidnight) - millisecondsSinceMidnight, _millisecondsSinceMidnightErr := readBuffer.ReadUint32("millisecondsSinceMidnight", 32) - if _millisecondsSinceMidnightErr != nil { - return nil, errors.Wrap(_millisecondsSinceMidnightErr, "Error parsing 'millisecondsSinceMidnight' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcTIME_OF_DAYFromMillisecondsSinceMidnight(millisecondsSinceMidnight), nil - case dataProtocolId == "IEC61131_LTIME_OF_DAY": // LTIME_OF_DAY - // Simple Field (nanosecondsSinceMidnight) - nanosecondsSinceMidnight, _nanosecondsSinceMidnightErr := readBuffer.ReadUint64("nanosecondsSinceMidnight", 64) - if _nanosecondsSinceMidnightErr != nil { - return nil, errors.Wrap(_nanosecondsSinceMidnightErr, "Error parsing 'nanosecondsSinceMidnight' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcLTIME_OF_DAYFromNanosecondsSinceMidnight(nanosecondsSinceMidnight), nil - case dataProtocolId == "IEC61131_DATE_AND_TIME": // DATE_AND_TIME - // Simple Field (year) - year, _yearErr := readBuffer.ReadUint16("year", 16) - if _yearErr != nil { - return nil, errors.Wrap(_yearErr, "Error parsing 'year' field") - } + // Simple Field (value) + value, _valueErr := readBuffer.ReadBit("value") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcBOOL(value), nil +case dataProtocolId == "IEC61131_BYTE" : // BYTE + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcBYTE(value), nil +case dataProtocolId == "IEC61131_WORD" : // WORD + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint16("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcWORD(value), nil +case dataProtocolId == "IEC61131_DWORD" : // DWORD + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcDWORD(value), nil +case dataProtocolId == "IEC61131_LWORD" : // LWORD + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint64("value", 64) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcLWORD(value), nil +case dataProtocolId == "IEC61131_SINT" : // SINT + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcSINT(value), nil +case dataProtocolId == "IEC61131_USINT" : // USINT + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcUSINT(value), nil +case dataProtocolId == "IEC61131_INT" : // INT + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt16("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcINT(value), nil +case dataProtocolId == "IEC61131_UINT" : // UINT + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint16("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcUINT(value), nil +case dataProtocolId == "IEC61131_DINT" : // DINT + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcDINT(value), nil +case dataProtocolId == "IEC61131_UDINT" : // UDINT + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcUDINT(value), nil +case dataProtocolId == "IEC61131_LINT" : // LINT + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt64("value", 64) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcLINT(value), nil +case dataProtocolId == "IEC61131_ULINT" : // ULINT + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint64("value", 64) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcULINT(value), nil +case dataProtocolId == "IEC61131_REAL" : // REAL + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcREAL(value), nil +case dataProtocolId == "IEC61131_LREAL" : // LREAL + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat64("value", 64) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcLREAL(value), nil +case dataProtocolId == "IEC61131_CHAR" : // CHAR + // Manual Field (value) + value, _valueErr := ParseS7Char(readBuffer, "UTF-8", stringEncoding) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcCHAR(value), nil +case dataProtocolId == "IEC61131_WCHAR" : // CHAR + // Manual Field (value) + value, _valueErr := ParseS7Char(readBuffer, "UTF-16", stringEncoding) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcCHAR(value), nil +case dataProtocolId == "IEC61131_STRING" : // STRING + // Manual Field (value) + value, _valueErr := ParseS7String(readBuffer, stringLength, "UTF-8", stringEncoding) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcSTRING(value), nil +case dataProtocolId == "IEC61131_WSTRING" : // STRING + // Manual Field (value) + value, _valueErr := ParseS7String(readBuffer, stringLength, "UTF-16", stringEncoding) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcSTRING(value), nil +case dataProtocolId == "IEC61131_TIME" : // TIME + // Simple Field (milliseconds) + milliseconds, _millisecondsErr := readBuffer.ReadUint32("milliseconds", 32) + if _millisecondsErr != nil { + return nil, errors.Wrap(_millisecondsErr, "Error parsing 'milliseconds' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcTIMEFromMilliseconds(milliseconds), nil +case dataProtocolId == "IEC61131_LTIME" : // LTIME + // Simple Field (nanoseconds) + nanoseconds, _nanosecondsErr := readBuffer.ReadUint64("nanoseconds", 64) + if _nanosecondsErr != nil { + return nil, errors.Wrap(_nanosecondsErr, "Error parsing 'nanoseconds' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcLTIMEFromNanoseconds(nanoseconds), nil +case dataProtocolId == "IEC61131_DATE" : // DATE + // Simple Field (daysSinceSiemensEpoch) + daysSinceSiemensEpoch, _daysSinceSiemensEpochErr := readBuffer.ReadUint16("daysSinceSiemensEpoch", 16) + if _daysSinceSiemensEpochErr != nil { + return nil, errors.Wrap(_daysSinceSiemensEpochErr, "Error parsing 'daysSinceSiemensEpoch' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcDATEFromDaysSinceSiemensEpoch(daysSinceSiemensEpoch), nil +case dataProtocolId == "IEC61131_TIME_OF_DAY" : // TIME_OF_DAY + // Simple Field (millisecondsSinceMidnight) + millisecondsSinceMidnight, _millisecondsSinceMidnightErr := readBuffer.ReadUint32("millisecondsSinceMidnight", 32) + if _millisecondsSinceMidnightErr != nil { + return nil, errors.Wrap(_millisecondsSinceMidnightErr, "Error parsing 'millisecondsSinceMidnight' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcTIME_OF_DAYFromMillisecondsSinceMidnight(millisecondsSinceMidnight), nil +case dataProtocolId == "IEC61131_LTIME_OF_DAY" : // LTIME_OF_DAY + // Simple Field (nanosecondsSinceMidnight) + nanosecondsSinceMidnight, _nanosecondsSinceMidnightErr := readBuffer.ReadUint64("nanosecondsSinceMidnight", 64) + if _nanosecondsSinceMidnightErr != nil { + return nil, errors.Wrap(_nanosecondsSinceMidnightErr, "Error parsing 'nanosecondsSinceMidnight' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcLTIME_OF_DAYFromNanosecondsSinceMidnight(nanosecondsSinceMidnight), nil +case dataProtocolId == "IEC61131_DATE_AND_TIME" : // DATE_AND_TIME + // Simple Field (year) + year, _yearErr := readBuffer.ReadUint16("year", 16) + if _yearErr != nil { + return nil, errors.Wrap(_yearErr, "Error parsing 'year' field") + } - // Simple Field (month) - month, _monthErr := readBuffer.ReadUint8("month", 8) - if _monthErr != nil { - return nil, errors.Wrap(_monthErr, "Error parsing 'month' field") - } + // Simple Field (month) + month, _monthErr := readBuffer.ReadUint8("month", 8) + if _monthErr != nil { + return nil, errors.Wrap(_monthErr, "Error parsing 'month' field") + } - // Simple Field (day) - day, _dayErr := readBuffer.ReadUint8("day", 8) - if _dayErr != nil { - return nil, errors.Wrap(_dayErr, "Error parsing 'day' field") - } + // Simple Field (day) + day, _dayErr := readBuffer.ReadUint8("day", 8) + if _dayErr != nil { + return nil, errors.Wrap(_dayErr, "Error parsing 'day' field") + } - // Simple Field (dayOfWeek) - _, _dayOfWeekErr := readBuffer.ReadUint8("dayOfWeek", 8) - if _dayOfWeekErr != nil { - return nil, errors.Wrap(_dayOfWeekErr, "Error parsing 'dayOfWeek' field") - } + // Simple Field (dayOfWeek) + _, _dayOfWeekErr := readBuffer.ReadUint8("dayOfWeek", 8) + if _dayOfWeekErr != nil { + return nil, errors.Wrap(_dayOfWeekErr, "Error parsing 'dayOfWeek' field") + } - // Simple Field (hour) - hour, _hourErr := readBuffer.ReadUint8("hour", 8) - if _hourErr != nil { - return nil, errors.Wrap(_hourErr, "Error parsing 'hour' field") - } + // Simple Field (hour) + hour, _hourErr := readBuffer.ReadUint8("hour", 8) + if _hourErr != nil { + return nil, errors.Wrap(_hourErr, "Error parsing 'hour' field") + } - // Simple Field (minutes) - minutes, _minutesErr := readBuffer.ReadUint8("minutes", 8) - if _minutesErr != nil { - return nil, errors.Wrap(_minutesErr, "Error parsing 'minutes' field") - } + // Simple Field (minutes) + minutes, _minutesErr := readBuffer.ReadUint8("minutes", 8) + if _minutesErr != nil { + return nil, errors.Wrap(_minutesErr, "Error parsing 'minutes' field") + } - // Simple Field (seconds) - seconds, _secondsErr := readBuffer.ReadUint8("seconds", 8) - if _secondsErr != nil { - return nil, errors.Wrap(_secondsErr, "Error parsing 'seconds' field") - } + // Simple Field (seconds) + seconds, _secondsErr := readBuffer.ReadUint8("seconds", 8) + if _secondsErr != nil { + return nil, errors.Wrap(_secondsErr, "Error parsing 'seconds' field") + } - // Simple Field (nanoseconds) - nanoseconds, _nanosecondsErr := readBuffer.ReadUint32("nanoseconds", 32) - if _nanosecondsErr != nil { - return nil, errors.Wrap(_nanosecondsErr, "Error parsing 'nanoseconds' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcDATA_AND_TIMEFromSegments(uint32(year), uint32(month), uint32(day), uint32(hour), uint32(minutes), uint32(seconds), uint32(nanoseconds)), nil + // Simple Field (nanoseconds) + nanoseconds, _nanosecondsErr := readBuffer.ReadUint32("nanoseconds", 32) + if _nanosecondsErr != nil { + return nil, errors.Wrap(_nanosecondsErr, "Error parsing 'nanoseconds' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcDATA_AND_TIMEFromSegments(uint32(year), uint32(month), uint32(day), uint32(hour), uint32(minutes), uint32(seconds), uint32(nanoseconds)), nil } - // TODO: add more info which type it is actually + // TODO: add more info which type it is actually return nil, errors.New("unsupported type") } -func DataItemSerialize(value api.PlcValue, dataProtocolId string, stringLength int32) ([]byte, error) { +func DataItemSerialize(value api.PlcValue, dataProtocolId string, stringLength int32, stringEncoding string) ([]byte, error) { wb := utils.NewWriteBufferByteBased() - if err := DataItemSerializeWithWriteBuffer(context.Background(), wb, value, dataProtocolId, stringLength); err != nil { + if err := DataItemSerializeWithWriteBuffer(context.Background(), wb, value, dataProtocolId, stringLength, stringEncoding); err != nil { return nil, err } return wb.GetBytes(), nil } -func DataItemSerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer, value api.PlcValue, dataProtocolId string, stringLength int32) error { +func DataItemSerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer, value api.PlcValue, dataProtocolId string, stringLength int32, stringEncoding string) error { m := struct { - DataProtocolId string - StringLength int32 + DataProtocolId string + StringLength int32 + StringEncoding string }{ - DataProtocolId: dataProtocolId, - StringLength: stringLength, + DataProtocolId: dataProtocolId, + StringLength: stringLength, + StringEncoding: stringEncoding, } _ = m writeBuffer.PushContext("DataItem") switch { - case dataProtocolId == "IEC61131_BOOL": // BOOL - // Reserved Field (Just skip the bytes) - if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { - return errors.Wrap(_err, "Error serializing reserved field") - } +case dataProtocolId == "IEC61131_BOOL" : // BOOL + // Reserved Field (Just skip the bytes) + if _err := writeBuffer.WriteUint8("reserved", 7, uint8(0x00)); _err != nil { + return errors.Wrap(_err, "Error serializing reserved field") + } - // Simple Field (value) - if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataProtocolId == "IEC61131_BYTE": // BYTE - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataProtocolId == "IEC61131_WORD": // WORD - // Simple Field (value) - if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataProtocolId == "IEC61131_DWORD": // DWORD - // Simple Field (value) - if _err := writeBuffer.WriteUint32("value", 32, value.GetUint32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataProtocolId == "IEC61131_LWORD": // LWORD - // Simple Field (value) - if _err := writeBuffer.WriteUint64("value", 64, value.GetUint64()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataProtocolId == "IEC61131_SINT": // SINT - // Simple Field (value) - if _err := writeBuffer.WriteInt8("value", 8, value.GetInt8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataProtocolId == "IEC61131_USINT": // USINT - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataProtocolId == "IEC61131_INT": // INT - // Simple Field (value) - if _err := writeBuffer.WriteInt16("value", 16, value.GetInt16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataProtocolId == "IEC61131_UINT": // UINT - // Simple Field (value) - if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataProtocolId == "IEC61131_DINT": // DINT - // Simple Field (value) - if _err := writeBuffer.WriteInt32("value", 32, value.GetInt32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataProtocolId == "IEC61131_UDINT": // UDINT - // Simple Field (value) - if _err := writeBuffer.WriteUint32("value", 32, value.GetUint32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataProtocolId == "IEC61131_LINT": // LINT - // Simple Field (value) - if _err := writeBuffer.WriteInt64("value", 64, value.GetInt64()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataProtocolId == "IEC61131_ULINT": // ULINT - // Simple Field (value) - if _err := writeBuffer.WriteUint64("value", 64, value.GetUint64()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataProtocolId == "IEC61131_REAL": // REAL - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataProtocolId == "IEC61131_LREAL": // LREAL - // Simple Field (value) - if _err := writeBuffer.WriteFloat64("value", 64, value.GetFloat64()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataProtocolId == "IEC61131_CHAR": // CHAR - // Simple Field (value) - if _err := writeBuffer.WriteString("value", uint32(8), "UTF-8", value.GetString()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataProtocolId == "IEC61131_WCHAR": // CHAR - // Simple Field (value) - if _err := writeBuffer.WriteString("value", uint32(16), "UTF-16", value.GetString()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataProtocolId == "IEC61131_STRING": // STRING - // Manual Field (value) - _valueErr := SerializeS7String(writeBuffer, value, stringLength, "UTF-8") - if _valueErr != nil { - return errors.Wrap(_valueErr, "Error serializing 'value' field") - } - case dataProtocolId == "IEC61131_WSTRING": // STRING - // Manual Field (value) - _valueErr := SerializeS7String(writeBuffer, value, stringLength, "UTF-16") - if _valueErr != nil { - return errors.Wrap(_valueErr, "Error serializing 'value' field") - } - case dataProtocolId == "IEC61131_TIME": // TIME - // Simple Field (milliseconds) - if _err := writeBuffer.WriteUint32("milliseconds", 32, value.(values.PlcTIME).GetMilliseconds()); _err != nil { - return errors.Wrap(_err, "Error serializing 'milliseconds' field") - } - case dataProtocolId == "IEC61131_LTIME": // LTIME - // Simple Field (nanoseconds) - if _err := writeBuffer.WriteUint64("nanoseconds", 64, value.(values.PlcLTIME).GetNanoseconds()); _err != nil { - return errors.Wrap(_err, "Error serializing 'nanoseconds' field") - } - case dataProtocolId == "IEC61131_DATE": // DATE - // Simple Field (daysSinceSiemensEpoch) - if _err := writeBuffer.WriteUint16("daysSinceSiemensEpoch", 16, value.(values.PlcDATE).GetDaysSinceSiemensEpoch()); _err != nil { - return errors.Wrap(_err, "Error serializing 'daysSinceSiemensEpoch' field") - } - case dataProtocolId == "IEC61131_TIME_OF_DAY": // TIME_OF_DAY - // Simple Field (millisecondsSinceMidnight) - if _err := writeBuffer.WriteUint32("millisecondsSinceMidnight", 32, value.(values.PlcTIME_OF_DAY).GetMillisecondsSinceMidnight()); _err != nil { - return errors.Wrap(_err, "Error serializing 'millisecondsSinceMidnight' field") - } - case dataProtocolId == "IEC61131_LTIME_OF_DAY": // LTIME_OF_DAY - // Simple Field (nanosecondsSinceMidnight) - if _err := writeBuffer.WriteUint64("nanosecondsSinceMidnight", 64, value.(values.PlcLTIME_OF_DAY).GetNanosecondsSinceMidnight()); _err != nil { - return errors.Wrap(_err, "Error serializing 'nanosecondsSinceMidnight' field") - } - case dataProtocolId == "IEC61131_DATE_AND_TIME": // DATE_AND_TIME - // Simple Field (year) - if _err := writeBuffer.WriteUint16("year", 16, value.(values.PlcDATE_AND_TIME).GetYear()); _err != nil { - return errors.Wrap(_err, "Error serializing 'year' field") - } + // Simple Field (value) + if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataProtocolId == "IEC61131_BYTE" : // BYTE + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataProtocolId == "IEC61131_WORD" : // WORD + // Simple Field (value) + if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataProtocolId == "IEC61131_DWORD" : // DWORD + // Simple Field (value) + if _err := writeBuffer.WriteUint32("value", 32, value.GetUint32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataProtocolId == "IEC61131_LWORD" : // LWORD + // Simple Field (value) + if _err := writeBuffer.WriteUint64("value", 64, value.GetUint64()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataProtocolId == "IEC61131_SINT" : // SINT + // Simple Field (value) + if _err := writeBuffer.WriteInt8("value", 8, value.GetInt8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataProtocolId == "IEC61131_USINT" : // USINT + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataProtocolId == "IEC61131_INT" : // INT + // Simple Field (value) + if _err := writeBuffer.WriteInt16("value", 16, value.GetInt16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataProtocolId == "IEC61131_UINT" : // UINT + // Simple Field (value) + if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataProtocolId == "IEC61131_DINT" : // DINT + // Simple Field (value) + if _err := writeBuffer.WriteInt32("value", 32, value.GetInt32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataProtocolId == "IEC61131_UDINT" : // UDINT + // Simple Field (value) + if _err := writeBuffer.WriteUint32("value", 32, value.GetUint32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataProtocolId == "IEC61131_LINT" : // LINT + // Simple Field (value) + if _err := writeBuffer.WriteInt64("value", 64, value.GetInt64()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataProtocolId == "IEC61131_ULINT" : // ULINT + // Simple Field (value) + if _err := writeBuffer.WriteUint64("value", 64, value.GetUint64()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataProtocolId == "IEC61131_REAL" : // REAL + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataProtocolId == "IEC61131_LREAL" : // LREAL + // Simple Field (value) + if _err := writeBuffer.WriteFloat64("value", 64, value.GetFloat64()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataProtocolId == "IEC61131_CHAR" : // CHAR + // Manual Field (value) + _valueErr := SerializeS7Char(writeBuffer, value, "UTF-8", m.StringEncoding) + if _valueErr != nil { + return errors.Wrap(_valueErr, "Error serializing 'value' field") + } +case dataProtocolId == "IEC61131_WCHAR" : // CHAR + // Manual Field (value) + _valueErr := SerializeS7Char(writeBuffer, value, "UTF-16", m.StringEncoding) + if _valueErr != nil { + return errors.Wrap(_valueErr, "Error serializing 'value' field") + } +case dataProtocolId == "IEC61131_STRING" : // STRING + // Manual Field (value) + _valueErr := SerializeS7String(writeBuffer, value, stringLength, "UTF-8", m.StringEncoding) + if _valueErr != nil { + return errors.Wrap(_valueErr, "Error serializing 'value' field") + } +case dataProtocolId == "IEC61131_WSTRING" : // STRING + // Manual Field (value) + _valueErr := SerializeS7String(writeBuffer, value, stringLength, "UTF-16", m.StringEncoding) + if _valueErr != nil { + return errors.Wrap(_valueErr, "Error serializing 'value' field") + } +case dataProtocolId == "IEC61131_TIME" : // TIME + // Simple Field (milliseconds) + if _err := writeBuffer.WriteUint32("milliseconds", 32, value.(values.PlcTIME).GetMilliseconds()); _err != nil { + return errors.Wrap(_err, "Error serializing 'milliseconds' field") + } +case dataProtocolId == "IEC61131_LTIME" : // LTIME + // Simple Field (nanoseconds) + if _err := writeBuffer.WriteUint64("nanoseconds", 64, value.(values.PlcLTIME).GetNanoseconds()); _err != nil { + return errors.Wrap(_err, "Error serializing 'nanoseconds' field") + } +case dataProtocolId == "IEC61131_DATE" : // DATE + // Simple Field (daysSinceSiemensEpoch) + if _err := writeBuffer.WriteUint16("daysSinceSiemensEpoch", 16, value.(values.PlcDATE).GetDaysSinceSiemensEpoch()); _err != nil { + return errors.Wrap(_err, "Error serializing 'daysSinceSiemensEpoch' field") + } +case dataProtocolId == "IEC61131_TIME_OF_DAY" : // TIME_OF_DAY + // Simple Field (millisecondsSinceMidnight) + if _err := writeBuffer.WriteUint32("millisecondsSinceMidnight", 32, value.(values.PlcTIME_OF_DAY).GetMillisecondsSinceMidnight()); _err != nil { + return errors.Wrap(_err, "Error serializing 'millisecondsSinceMidnight' field") + } +case dataProtocolId == "IEC61131_LTIME_OF_DAY" : // LTIME_OF_DAY + // Simple Field (nanosecondsSinceMidnight) + if _err := writeBuffer.WriteUint64("nanosecondsSinceMidnight", 64, value.(values.PlcLTIME_OF_DAY).GetNanosecondsSinceMidnight()); _err != nil { + return errors.Wrap(_err, "Error serializing 'nanosecondsSinceMidnight' field") + } +case dataProtocolId == "IEC61131_DATE_AND_TIME" : // DATE_AND_TIME + // Simple Field (year) + if _err := writeBuffer.WriteUint16("year", 16, value.(values.PlcDATE_AND_TIME).GetYear()); _err != nil { + return errors.Wrap(_err, "Error serializing 'year' field") + } - // Simple Field (month) - if _err := writeBuffer.WriteUint8("month", 8, value.(values.PlcDATE_AND_TIME).GetMonth()); _err != nil { - return errors.Wrap(_err, "Error serializing 'month' field") - } + // Simple Field (month) + if _err := writeBuffer.WriteUint8("month", 8, value.(values.PlcDATE_AND_TIME).GetMonth()); _err != nil { + return errors.Wrap(_err, "Error serializing 'month' field") + } - // Simple Field (day) - if _err := writeBuffer.WriteUint8("day", 8, value.(values.PlcDATE_AND_TIME).GetDay()); _err != nil { - return errors.Wrap(_err, "Error serializing 'day' field") - } + // Simple Field (day) + if _err := writeBuffer.WriteUint8("day", 8, value.(values.PlcDATE_AND_TIME).GetDay()); _err != nil { + return errors.Wrap(_err, "Error serializing 'day' field") + } - // Simple Field (dayOfWeek) - if _err := writeBuffer.WriteUint8("dayOfWeek", 8, value.(values.PlcDATE_AND_TIME).GetDayOfWeek()); _err != nil { - return errors.Wrap(_err, "Error serializing 'dayOfWeek' field") - } + // Simple Field (dayOfWeek) + if _err := writeBuffer.WriteUint8("dayOfWeek", 8, value.(values.PlcDATE_AND_TIME).GetDayOfWeek()); _err != nil { + return errors.Wrap(_err, "Error serializing 'dayOfWeek' field") + } - // Simple Field (hour) - if _err := writeBuffer.WriteUint8("hour", 8, value.(values.PlcDATE_AND_TIME).GetHour()); _err != nil { - return errors.Wrap(_err, "Error serializing 'hour' field") - } + // Simple Field (hour) + if _err := writeBuffer.WriteUint8("hour", 8, value.(values.PlcDATE_AND_TIME).GetHour()); _err != nil { + return errors.Wrap(_err, "Error serializing 'hour' field") + } - // Simple Field (minutes) - if _err := writeBuffer.WriteUint8("minutes", 8, value.(values.PlcDATE_AND_TIME).GetMinutes()); _err != nil { - return errors.Wrap(_err, "Error serializing 'minutes' field") - } + // Simple Field (minutes) + if _err := writeBuffer.WriteUint8("minutes", 8, value.(values.PlcDATE_AND_TIME).GetMinutes()); _err != nil { + return errors.Wrap(_err, "Error serializing 'minutes' field") + } - // Simple Field (seconds) - if _err := writeBuffer.WriteUint8("seconds", 8, value.(values.PlcDATE_AND_TIME).GetSeconds()); _err != nil { - return errors.Wrap(_err, "Error serializing 'seconds' field") - } + // Simple Field (seconds) + if _err := writeBuffer.WriteUint8("seconds", 8, value.(values.PlcDATE_AND_TIME).GetSeconds()); _err != nil { + return errors.Wrap(_err, "Error serializing 'seconds' field") + } - // Simple Field (nanoseconds) - if _err := writeBuffer.WriteUint32("nanoseconds", 32, value.(values.PlcDATE_AND_TIME).GetNanoseconds()); _err != nil { - return errors.Wrap(_err, "Error serializing 'nanoseconds' field") - } - default: - // TODO: add more info which type it is actually - return errors.New("unsupported type") + // Simple Field (nanoseconds) + if _err := writeBuffer.WriteUint32("nanoseconds", 32, value.(values.PlcDATE_AND_TIME).GetNanoseconds()); _err != nil { + return errors.Wrap(_err, "Error serializing 'nanoseconds' field") + } + default: + // TODO: add more info which type it is actually + return errors.New("unsupported type") } writeBuffer.PopContext("DataItem") return nil } + + diff --git a/plc4go/protocols/s7/readwrite/model/DataTransportErrorCode.go b/plc4go/protocols/s7/readwrite/model/DataTransportErrorCode.go index 2081166818b..3e40230c77b 100644 --- a/plc4go/protocols/s7/readwrite/model/DataTransportErrorCode.go +++ b/plc4go/protocols/s7/readwrite/model/DataTransportErrorCode.go @@ -34,20 +34,20 @@ type IDataTransportErrorCode interface { utils.Serializable } -const ( - DataTransportErrorCode_RESERVED DataTransportErrorCode = 0x00 - DataTransportErrorCode_OK DataTransportErrorCode = 0xFF - DataTransportErrorCode_ACCESS_DENIED DataTransportErrorCode = 0x03 - DataTransportErrorCode_INVALID_ADDRESS DataTransportErrorCode = 0x05 +const( + DataTransportErrorCode_RESERVED DataTransportErrorCode = 0x00 + DataTransportErrorCode_OK DataTransportErrorCode = 0xFF + DataTransportErrorCode_ACCESS_DENIED DataTransportErrorCode = 0x03 + DataTransportErrorCode_INVALID_ADDRESS DataTransportErrorCode = 0x05 DataTransportErrorCode_DATA_TYPE_NOT_SUPPORTED DataTransportErrorCode = 0x06 - DataTransportErrorCode_NOT_FOUND DataTransportErrorCode = 0x0A + DataTransportErrorCode_NOT_FOUND DataTransportErrorCode = 0x0A ) var DataTransportErrorCodeValues []DataTransportErrorCode func init() { _ = errors.New - DataTransportErrorCodeValues = []DataTransportErrorCode{ + DataTransportErrorCodeValues = []DataTransportErrorCode { DataTransportErrorCode_RESERVED, DataTransportErrorCode_OK, DataTransportErrorCode_ACCESS_DENIED, @@ -59,18 +59,18 @@ func init() { func DataTransportErrorCodeByValue(value uint8) (enum DataTransportErrorCode, ok bool) { switch value { - case 0x00: - return DataTransportErrorCode_RESERVED, true - case 0x03: - return DataTransportErrorCode_ACCESS_DENIED, true - case 0x05: - return DataTransportErrorCode_INVALID_ADDRESS, true - case 0x06: - return DataTransportErrorCode_DATA_TYPE_NOT_SUPPORTED, true - case 0x0A: - return DataTransportErrorCode_NOT_FOUND, true - case 0xFF: - return DataTransportErrorCode_OK, true + case 0x00: + return DataTransportErrorCode_RESERVED, true + case 0x03: + return DataTransportErrorCode_ACCESS_DENIED, true + case 0x05: + return DataTransportErrorCode_INVALID_ADDRESS, true + case 0x06: + return DataTransportErrorCode_DATA_TYPE_NOT_SUPPORTED, true + case 0x0A: + return DataTransportErrorCode_NOT_FOUND, true + case 0xFF: + return DataTransportErrorCode_OK, true } return 0, false } @@ -93,13 +93,13 @@ func DataTransportErrorCodeByName(value string) (enum DataTransportErrorCode, ok return 0, false } -func DataTransportErrorCodeKnows(value uint8) bool { +func DataTransportErrorCodeKnows(value uint8) bool { for _, typeValue := range DataTransportErrorCodeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastDataTransportErrorCode(structType interface{}) DataTransportErrorCode { @@ -171,3 +171,4 @@ func (e DataTransportErrorCode) PLC4XEnumName() string { func (e DataTransportErrorCode) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/s7/readwrite/model/DataTransportSize.go b/plc4go/protocols/s7/readwrite/model/DataTransportSize.go index 51ef7973a39..2e3be45380d 100644 --- a/plc4go/protocols/s7/readwrite/model/DataTransportSize.go +++ b/plc4go/protocols/s7/readwrite/model/DataTransportSize.go @@ -35,21 +35,21 @@ type IDataTransportSize interface { SizeInBits() bool } -const ( - DataTransportSize_NULL DataTransportSize = 0x00 - DataTransportSize_BIT DataTransportSize = 0x03 +const( + DataTransportSize_NULL DataTransportSize = 0x00 + DataTransportSize_BIT DataTransportSize = 0x03 DataTransportSize_BYTE_WORD_DWORD DataTransportSize = 0x04 - DataTransportSize_INTEGER DataTransportSize = 0x05 - DataTransportSize_DINTEGER DataTransportSize = 0x06 - DataTransportSize_REAL DataTransportSize = 0x07 - DataTransportSize_OCTET_STRING DataTransportSize = 0x09 + DataTransportSize_INTEGER DataTransportSize = 0x05 + DataTransportSize_DINTEGER DataTransportSize = 0x06 + DataTransportSize_REAL DataTransportSize = 0x07 + DataTransportSize_OCTET_STRING DataTransportSize = 0x09 ) var DataTransportSizeValues []DataTransportSize func init() { _ = errors.New - DataTransportSizeValues = []DataTransportSize{ + DataTransportSizeValues = []DataTransportSize { DataTransportSize_NULL, DataTransportSize_BIT, DataTransportSize_BYTE_WORD_DWORD, @@ -60,38 +60,31 @@ func init() { } } + func (e DataTransportSize) SizeInBits() bool { - switch e { - case 0x00: - { /* '0x00' */ - return false + switch e { + case 0x00: { /* '0x00' */ + return false } - case 0x03: - { /* '0x03' */ - return true + case 0x03: { /* '0x03' */ + return true } - case 0x04: - { /* '0x04' */ - return true + case 0x04: { /* '0x04' */ + return true } - case 0x05: - { /* '0x05' */ - return true + case 0x05: { /* '0x05' */ + return true } - case 0x06: - { /* '0x06' */ - return false + case 0x06: { /* '0x06' */ + return false } - case 0x07: - { /* '0x07' */ - return false + case 0x07: { /* '0x07' */ + return false } - case 0x09: - { /* '0x09' */ - return false + case 0x09: { /* '0x09' */ + return false } - default: - { + default: { return false } } @@ -107,20 +100,20 @@ func DataTransportSizeFirstEnumForFieldSizeInBits(value bool) (DataTransportSize } func DataTransportSizeByValue(value uint8) (enum DataTransportSize, ok bool) { switch value { - case 0x00: - return DataTransportSize_NULL, true - case 0x03: - return DataTransportSize_BIT, true - case 0x04: - return DataTransportSize_BYTE_WORD_DWORD, true - case 0x05: - return DataTransportSize_INTEGER, true - case 0x06: - return DataTransportSize_DINTEGER, true - case 0x07: - return DataTransportSize_REAL, true - case 0x09: - return DataTransportSize_OCTET_STRING, true + case 0x00: + return DataTransportSize_NULL, true + case 0x03: + return DataTransportSize_BIT, true + case 0x04: + return DataTransportSize_BYTE_WORD_DWORD, true + case 0x05: + return DataTransportSize_INTEGER, true + case 0x06: + return DataTransportSize_DINTEGER, true + case 0x07: + return DataTransportSize_REAL, true + case 0x09: + return DataTransportSize_OCTET_STRING, true } return 0, false } @@ -145,13 +138,13 @@ func DataTransportSizeByName(value string) (enum DataTransportSize, ok bool) { return 0, false } -func DataTransportSizeKnows(value uint8) bool { +func DataTransportSizeKnows(value uint8) bool { for _, typeValue := range DataTransportSizeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastDataTransportSize(structType interface{}) DataTransportSize { @@ -225,3 +218,4 @@ func (e DataTransportSize) PLC4XEnumName() string { func (e DataTransportSize) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/s7/readwrite/model/DateAndTime.go b/plc4go/protocols/s7/readwrite/model/DateAndTime.go index 08e4471ca98..79fd9c4e193 100644 --- a/plc4go/protocols/s7/readwrite/model/DateAndTime.go +++ b/plc4go/protocols/s7/readwrite/model/DateAndTime.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // DateAndTime is the corresponding interface of DateAndTime type DateAndTime interface { @@ -58,16 +60,17 @@ type DateAndTimeExactly interface { // _DateAndTime is the data-structure of this message type _DateAndTime struct { - Year uint8 - Month uint8 - Day uint8 - Hour uint8 - Minutes uint8 - Seconds uint8 - Msec uint16 - Dow uint8 + Year uint8 + Month uint8 + Day uint8 + Hour uint8 + Minutes uint8 + Seconds uint8 + Msec uint16 + Dow uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -110,14 +113,15 @@ func (m *_DateAndTime) GetDow() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewDateAndTime factory function for _DateAndTime -func NewDateAndTime(year uint8, month uint8, day uint8, hour uint8, minutes uint8, seconds uint8, msec uint16, dow uint8) *_DateAndTime { - return &_DateAndTime{Year: year, Month: month, Day: day, Hour: hour, Minutes: minutes, Seconds: seconds, Msec: msec, Dow: dow} +func NewDateAndTime( year uint8 , month uint8 , day uint8 , hour uint8 , minutes uint8 , seconds uint8 , msec uint16 , dow uint8 ) *_DateAndTime { +return &_DateAndTime{ Year: year , Month: month , Day: day , Hour: hour , Minutes: minutes , Seconds: seconds , Msec: msec , Dow: dow } } // Deprecated: use the interface for direct cast func CastDateAndTime(structType interface{}) DateAndTime { - if casted, ok := structType.(DateAndTime); ok { + if casted, ok := structType.(DateAndTime); ok { return casted } if casted, ok := structType.(*DateAndTime); ok { @@ -155,11 +159,12 @@ func (m *_DateAndTime) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += uint16(int32(12)) // Simple field (dow) - lengthInBits += 4 + lengthInBits += 4; return lengthInBits } + func (m *_DateAndTime) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -184,7 +189,7 @@ func DateAndTimeParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer } var year uint8 if _year != nil { - year = _year.(uint8) + year = _year.(uint8) } // Manual Field (month) @@ -194,7 +199,7 @@ func DateAndTimeParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer } var month uint8 if _month != nil { - month = _month.(uint8) + month = _month.(uint8) } // Manual Field (day) @@ -204,7 +209,7 @@ func DateAndTimeParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer } var day uint8 if _day != nil { - day = _day.(uint8) + day = _day.(uint8) } // Manual Field (hour) @@ -214,7 +219,7 @@ func DateAndTimeParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer } var hour uint8 if _hour != nil { - hour = _hour.(uint8) + hour = _hour.(uint8) } // Manual Field (minutes) @@ -224,7 +229,7 @@ func DateAndTimeParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer } var minutes uint8 if _minutes != nil { - minutes = _minutes.(uint8) + minutes = _minutes.(uint8) } // Manual Field (seconds) @@ -234,7 +239,7 @@ func DateAndTimeParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer } var seconds uint8 if _seconds != nil { - seconds = _seconds.(uint8) + seconds = _seconds.(uint8) } // Manual Field (msec) @@ -244,11 +249,11 @@ func DateAndTimeParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer } var msec uint16 if _msec != nil { - msec = _msec.(uint16) + msec = _msec.(uint16) } // Simple Field (dow) - _dow, _dowErr := readBuffer.ReadUint8("dow", 4) +_dow, _dowErr := readBuffer.ReadUint8("dow", 4) if _dowErr != nil { return nil, errors.Wrap(_dowErr, "Error parsing 'dow' field of DateAndTime") } @@ -260,15 +265,15 @@ func DateAndTimeParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer // Create the instance return &_DateAndTime{ - Year: year, - Month: month, - Day: day, - Hour: hour, - Minutes: minutes, - Seconds: seconds, - Msec: msec, - Dow: dow, - }, nil + Year: year, + Month: month, + Day: day, + Hour: hour, + Minutes: minutes, + Seconds: seconds, + Msec: msec, + Dow: dow, + }, nil } func (m *_DateAndTime) Serialize() ([]byte, error) { @@ -282,7 +287,7 @@ func (m *_DateAndTime) Serialize() ([]byte, error) { func (m *_DateAndTime) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("DateAndTime"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("DateAndTime"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for DateAndTime") } @@ -341,6 +346,7 @@ func (m *_DateAndTime) SerializeWithWriteBuffer(ctx context.Context, writeBuffer return nil } + func (m *_DateAndTime) isDateAndTime() bool { return true } @@ -355,3 +361,6 @@ func (m *_DateAndTime) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/DeviceGroup.go b/plc4go/protocols/s7/readwrite/model/DeviceGroup.go index aec74ad17b1..4044d471e8e 100644 --- a/plc4go/protocols/s7/readwrite/model/DeviceGroup.go +++ b/plc4go/protocols/s7/readwrite/model/DeviceGroup.go @@ -34,17 +34,17 @@ type IDeviceGroup interface { utils.Serializable } -const ( +const( DeviceGroup_PG_OR_PC DeviceGroup = 0x01 - DeviceGroup_OS DeviceGroup = 0x02 - DeviceGroup_OTHERS DeviceGroup = 0x03 + DeviceGroup_OS DeviceGroup = 0x02 + DeviceGroup_OTHERS DeviceGroup = 0x03 ) var DeviceGroupValues []DeviceGroup func init() { _ = errors.New - DeviceGroupValues = []DeviceGroup{ + DeviceGroupValues = []DeviceGroup { DeviceGroup_PG_OR_PC, DeviceGroup_OS, DeviceGroup_OTHERS, @@ -53,12 +53,12 @@ func init() { func DeviceGroupByValue(value uint8) (enum DeviceGroup, ok bool) { switch value { - case 0x01: - return DeviceGroup_PG_OR_PC, true - case 0x02: - return DeviceGroup_OS, true - case 0x03: - return DeviceGroup_OTHERS, true + case 0x01: + return DeviceGroup_PG_OR_PC, true + case 0x02: + return DeviceGroup_OS, true + case 0x03: + return DeviceGroup_OTHERS, true } return 0, false } @@ -75,13 +75,13 @@ func DeviceGroupByName(value string) (enum DeviceGroup, ok bool) { return 0, false } -func DeviceGroupKnows(value uint8) bool { +func DeviceGroupKnows(value uint8) bool { for _, typeValue := range DeviceGroupValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastDeviceGroup(structType interface{}) DeviceGroup { @@ -147,3 +147,4 @@ func (e DeviceGroup) PLC4XEnumName() string { func (e DeviceGroup) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/s7/readwrite/model/EventType.go b/plc4go/protocols/s7/readwrite/model/EventType.go index d438734e616..a706c1456a1 100644 --- a/plc4go/protocols/s7/readwrite/model/EventType.go +++ b/plc4go/protocols/s7/readwrite/model/EventType.go @@ -34,18 +34,18 @@ type IEventType interface { utils.Serializable } -const ( +const( EventType_MODE EventType = 0x01 - EventType_SYS EventType = 0x02 - EventType_USR EventType = 0x04 - EventType_ALM EventType = 0x80 + EventType_SYS EventType = 0x02 + EventType_USR EventType = 0x04 + EventType_ALM EventType = 0x80 ) var EventTypeValues []EventType func init() { _ = errors.New - EventTypeValues = []EventType{ + EventTypeValues = []EventType { EventType_MODE, EventType_SYS, EventType_USR, @@ -55,14 +55,14 @@ func init() { func EventTypeByValue(value uint8) (enum EventType, ok bool) { switch value { - case 0x01: - return EventType_MODE, true - case 0x02: - return EventType_SYS, true - case 0x04: - return EventType_USR, true - case 0x80: - return EventType_ALM, true + case 0x01: + return EventType_MODE, true + case 0x02: + return EventType_SYS, true + case 0x04: + return EventType_USR, true + case 0x80: + return EventType_ALM, true } return 0, false } @@ -81,13 +81,13 @@ func EventTypeByName(value string) (enum EventType, ok bool) { return 0, false } -func EventTypeKnows(value uint8) bool { +func EventTypeKnows(value uint8) bool { for _, typeValue := range EventTypeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastEventType(structType interface{}) EventType { @@ -155,3 +155,4 @@ func (e EventType) PLC4XEnumName() string { func (e EventType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/s7/readwrite/model/MemoryArea.go b/plc4go/protocols/s7/readwrite/model/MemoryArea.go index cfe5ae1367a..ffc702fe6a7 100644 --- a/plc4go/protocols/s7/readwrite/model/MemoryArea.go +++ b/plc4go/protocols/s7/readwrite/model/MemoryArea.go @@ -35,23 +35,23 @@ type IMemoryArea interface { ShortName() string } -const ( - MemoryArea_COUNTERS MemoryArea = 0x1C - MemoryArea_TIMERS MemoryArea = 0x1D +const( + MemoryArea_COUNTERS MemoryArea = 0x1C + MemoryArea_TIMERS MemoryArea = 0x1D MemoryArea_DIRECT_PERIPHERAL_ACCESS MemoryArea = 0x80 - MemoryArea_INPUTS MemoryArea = 0x81 - MemoryArea_OUTPUTS MemoryArea = 0x82 - MemoryArea_FLAGS_MARKERS MemoryArea = 0x83 - MemoryArea_DATA_BLOCKS MemoryArea = 0x84 - MemoryArea_INSTANCE_DATA_BLOCKS MemoryArea = 0x85 - MemoryArea_LOCAL_DATA MemoryArea = 0x86 + MemoryArea_INPUTS MemoryArea = 0x81 + MemoryArea_OUTPUTS MemoryArea = 0x82 + MemoryArea_FLAGS_MARKERS MemoryArea = 0x83 + MemoryArea_DATA_BLOCKS MemoryArea = 0x84 + MemoryArea_INSTANCE_DATA_BLOCKS MemoryArea = 0x85 + MemoryArea_LOCAL_DATA MemoryArea = 0x86 ) var MemoryAreaValues []MemoryArea func init() { _ = errors.New - MemoryAreaValues = []MemoryArea{ + MemoryAreaValues = []MemoryArea { MemoryArea_COUNTERS, MemoryArea_TIMERS, MemoryArea_DIRECT_PERIPHERAL_ACCESS, @@ -64,46 +64,37 @@ func init() { } } + func (e MemoryArea) ShortName() string { - switch e { - case 0x1C: - { /* '0x1C' */ - return "C" + switch e { + case 0x1C: { /* '0x1C' */ + return "C" } - case 0x1D: - { /* '0x1D' */ - return "T" + case 0x1D: { /* '0x1D' */ + return "T" } - case 0x80: - { /* '0x80' */ - return "D" + case 0x80: { /* '0x80' */ + return "D" } - case 0x81: - { /* '0x81' */ - return "I" + case 0x81: { /* '0x81' */ + return "I" } - case 0x82: - { /* '0x82' */ - return "Q" + case 0x82: { /* '0x82' */ + return "Q" } - case 0x83: - { /* '0x83' */ - return "M" + case 0x83: { /* '0x83' */ + return "M" } - case 0x84: - { /* '0x84' */ - return "DB" + case 0x84: { /* '0x84' */ + return "DB" } - case 0x85: - { /* '0x85' */ - return "DBI" + case 0x85: { /* '0x85' */ + return "DBI" } - case 0x86: - { /* '0x86' */ - return "LD" + case 0x86: { /* '0x86' */ + return "LD" } - default: - { + default: { return "" } } @@ -119,24 +110,24 @@ func MemoryAreaFirstEnumForFieldShortName(value string) (MemoryArea, error) { } func MemoryAreaByValue(value uint8) (enum MemoryArea, ok bool) { switch value { - case 0x1C: - return MemoryArea_COUNTERS, true - case 0x1D: - return MemoryArea_TIMERS, true - case 0x80: - return MemoryArea_DIRECT_PERIPHERAL_ACCESS, true - case 0x81: - return MemoryArea_INPUTS, true - case 0x82: - return MemoryArea_OUTPUTS, true - case 0x83: - return MemoryArea_FLAGS_MARKERS, true - case 0x84: - return MemoryArea_DATA_BLOCKS, true - case 0x85: - return MemoryArea_INSTANCE_DATA_BLOCKS, true - case 0x86: - return MemoryArea_LOCAL_DATA, true + case 0x1C: + return MemoryArea_COUNTERS, true + case 0x1D: + return MemoryArea_TIMERS, true + case 0x80: + return MemoryArea_DIRECT_PERIPHERAL_ACCESS, true + case 0x81: + return MemoryArea_INPUTS, true + case 0x82: + return MemoryArea_OUTPUTS, true + case 0x83: + return MemoryArea_FLAGS_MARKERS, true + case 0x84: + return MemoryArea_DATA_BLOCKS, true + case 0x85: + return MemoryArea_INSTANCE_DATA_BLOCKS, true + case 0x86: + return MemoryArea_LOCAL_DATA, true } return 0, false } @@ -165,13 +156,13 @@ func MemoryAreaByName(value string) (enum MemoryArea, ok bool) { return 0, false } -func MemoryAreaKnows(value uint8) bool { +func MemoryAreaKnows(value uint8) bool { for _, typeValue := range MemoryAreaValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastMemoryArea(structType interface{}) MemoryArea { @@ -249,3 +240,4 @@ func (e MemoryArea) PLC4XEnumName() string { func (e MemoryArea) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/s7/readwrite/model/ModeTransitionType.go b/plc4go/protocols/s7/readwrite/model/ModeTransitionType.go index ade790947f6..8f39652c4b5 100644 --- a/plc4go/protocols/s7/readwrite/model/ModeTransitionType.go +++ b/plc4go/protocols/s7/readwrite/model/ModeTransitionType.go @@ -34,23 +34,23 @@ type IModeTransitionType interface { utils.Serializable } -const ( - ModeTransitionType_STOP ModeTransitionType = 0x00 +const( + ModeTransitionType_STOP ModeTransitionType = 0x00 ModeTransitionType_WARM_RESTART ModeTransitionType = 0x01 - ModeTransitionType_RUN ModeTransitionType = 0x02 - ModeTransitionType_HOT_RESTART ModeTransitionType = 0x03 - ModeTransitionType_HOLD ModeTransitionType = 0x04 + ModeTransitionType_RUN ModeTransitionType = 0x02 + ModeTransitionType_HOT_RESTART ModeTransitionType = 0x03 + ModeTransitionType_HOLD ModeTransitionType = 0x04 ModeTransitionType_COLD_RESTART ModeTransitionType = 0x06 - ModeTransitionType_RUN_R ModeTransitionType = 0x09 - ModeTransitionType_LINK_UP ModeTransitionType = 0x11 - ModeTransitionType_UPDATE ModeTransitionType = 0x12 + ModeTransitionType_RUN_R ModeTransitionType = 0x09 + ModeTransitionType_LINK_UP ModeTransitionType = 0x11 + ModeTransitionType_UPDATE ModeTransitionType = 0x12 ) var ModeTransitionTypeValues []ModeTransitionType func init() { _ = errors.New - ModeTransitionTypeValues = []ModeTransitionType{ + ModeTransitionTypeValues = []ModeTransitionType { ModeTransitionType_STOP, ModeTransitionType_WARM_RESTART, ModeTransitionType_RUN, @@ -65,24 +65,24 @@ func init() { func ModeTransitionTypeByValue(value uint8) (enum ModeTransitionType, ok bool) { switch value { - case 0x00: - return ModeTransitionType_STOP, true - case 0x01: - return ModeTransitionType_WARM_RESTART, true - case 0x02: - return ModeTransitionType_RUN, true - case 0x03: - return ModeTransitionType_HOT_RESTART, true - case 0x04: - return ModeTransitionType_HOLD, true - case 0x06: - return ModeTransitionType_COLD_RESTART, true - case 0x09: - return ModeTransitionType_RUN_R, true - case 0x11: - return ModeTransitionType_LINK_UP, true - case 0x12: - return ModeTransitionType_UPDATE, true + case 0x00: + return ModeTransitionType_STOP, true + case 0x01: + return ModeTransitionType_WARM_RESTART, true + case 0x02: + return ModeTransitionType_RUN, true + case 0x03: + return ModeTransitionType_HOT_RESTART, true + case 0x04: + return ModeTransitionType_HOLD, true + case 0x06: + return ModeTransitionType_COLD_RESTART, true + case 0x09: + return ModeTransitionType_RUN_R, true + case 0x11: + return ModeTransitionType_LINK_UP, true + case 0x12: + return ModeTransitionType_UPDATE, true } return 0, false } @@ -111,13 +111,13 @@ func ModeTransitionTypeByName(value string) (enum ModeTransitionType, ok bool) { return 0, false } -func ModeTransitionTypeKnows(value uint8) bool { +func ModeTransitionTypeKnows(value uint8) bool { for _, typeValue := range ModeTransitionTypeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastModeTransitionType(structType interface{}) ModeTransitionType { @@ -195,3 +195,4 @@ func (e ModeTransitionType) PLC4XEnumName() string { func (e ModeTransitionType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/s7/readwrite/model/QueryType.go b/plc4go/protocols/s7/readwrite/model/QueryType.go index 09720edd372..d592f626e56 100644 --- a/plc4go/protocols/s7/readwrite/model/QueryType.go +++ b/plc4go/protocols/s7/readwrite/model/QueryType.go @@ -34,17 +34,17 @@ type IQueryType interface { utils.Serializable } -const ( +const( QueryType_BYALARMTYPE QueryType = 0x01 - QueryType_ALARM_8 QueryType = 0x02 - QueryType_ALARM_S QueryType = 0x04 + QueryType_ALARM_8 QueryType = 0x02 + QueryType_ALARM_S QueryType = 0x04 ) var QueryTypeValues []QueryType func init() { _ = errors.New - QueryTypeValues = []QueryType{ + QueryTypeValues = []QueryType { QueryType_BYALARMTYPE, QueryType_ALARM_8, QueryType_ALARM_S, @@ -53,12 +53,12 @@ func init() { func QueryTypeByValue(value uint8) (enum QueryType, ok bool) { switch value { - case 0x01: - return QueryType_BYALARMTYPE, true - case 0x02: - return QueryType_ALARM_8, true - case 0x04: - return QueryType_ALARM_S, true + case 0x01: + return QueryType_BYALARMTYPE, true + case 0x02: + return QueryType_ALARM_8, true + case 0x04: + return QueryType_ALARM_S, true } return 0, false } @@ -75,13 +75,13 @@ func QueryTypeByName(value string) (enum QueryType, ok bool) { return 0, false } -func QueryTypeKnows(value uint8) bool { +func QueryTypeKnows(value uint8) bool { for _, typeValue := range QueryTypeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastQueryType(structType interface{}) QueryType { @@ -147,3 +147,4 @@ func (e QueryType) PLC4XEnumName() string { func (e QueryType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/s7/readwrite/model/S7Address.go b/plc4go/protocols/s7/readwrite/model/S7Address.go index 66dcd457444..5f3402d5a32 100644 --- a/plc4go/protocols/s7/readwrite/model/S7Address.go +++ b/plc4go/protocols/s7/readwrite/model/S7Address.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7Address is the corresponding interface of S7Address type S7Address interface { @@ -53,6 +55,7 @@ type _S7AddressChildRequirements interface { GetAddressType() uint8 } + type S7AddressParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child S7Address, serializeChildFunction func() error) error GetTypeName() string @@ -60,21 +63,22 @@ type S7AddressParent interface { type S7AddressChild interface { utils.Serializable - InitializeParent(parent S7Address) +InitializeParent(parent S7Address ) GetParent() *S7Address GetTypeName() string S7Address } + // NewS7Address factory function for _S7Address -func NewS7Address() *_S7Address { - return &_S7Address{} +func NewS7Address( ) *_S7Address { +return &_S7Address{ } } // Deprecated: use the interface for direct cast func CastS7Address(structType interface{}) S7Address { - if casted, ok := structType.(S7Address); ok { + if casted, ok := structType.(S7Address); ok { return casted } if casted, ok := structType.(*S7Address); ok { @@ -87,10 +91,11 @@ func (m *_S7Address) GetTypeName() string { return "S7Address" } + func (m *_S7Address) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Discriminator Field (addressType) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } @@ -121,15 +126,15 @@ func S7AddressParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type S7AddressChildSerializeRequirement interface { S7Address - InitializeParent(S7Address) + InitializeParent(S7Address ) GetParent() S7Address } var _childTemp interface{} var _child S7AddressChildSerializeRequirement var typeSwitchError error switch { - case addressType == 0x10: // S7AddressAny - _childTemp, typeSwitchError = S7AddressAnyParseWithBuffer(ctx, readBuffer) +case addressType == 0x10 : // S7AddressAny + _childTemp, typeSwitchError = S7AddressAnyParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [addressType=%v]", addressType) } @@ -143,7 +148,7 @@ func S7AddressParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) } // Finish initializing - _child.InitializeParent(_child) +_child.InitializeParent(_child ) return _child, nil } @@ -153,7 +158,7 @@ func (pm *_S7Address) SerializeParent(ctx context.Context, writeBuffer utils.Wri _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("S7Address"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("S7Address"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for S7Address") } @@ -176,6 +181,7 @@ func (pm *_S7Address) SerializeParent(ctx context.Context, writeBuffer utils.Wri return nil } + func (m *_S7Address) isS7Address() bool { return true } @@ -190,3 +196,6 @@ func (m *_S7Address) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7AddressAny.go b/plc4go/protocols/s7/readwrite/model/S7AddressAny.go index 206dfdbad4f..f65f6590d1b 100644 --- a/plc4go/protocols/s7/readwrite/model/S7AddressAny.go +++ b/plc4go/protocols/s7/readwrite/model/S7AddressAny.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7AddressAny is the corresponding interface of S7AddressAny type S7AddressAny interface { @@ -56,36 +58,36 @@ type S7AddressAnyExactly interface { // _S7AddressAny is the data-structure of this message type _S7AddressAny struct { *_S7Address - TransportSize TransportSize - NumberOfElements uint16 - DbNumber uint16 - Area MemoryArea - ByteAddress uint16 - BitAddress uint8 + TransportSize TransportSize + NumberOfElements uint16 + DbNumber uint16 + Area MemoryArea + ByteAddress uint16 + BitAddress uint8 // Reserved Fields reservedField0 *uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_S7AddressAny) GetAddressType() uint8 { - return 0x10 -} +func (m *_S7AddressAny) GetAddressType() uint8 { +return 0x10} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_S7AddressAny) InitializeParent(parent S7Address) {} +func (m *_S7AddressAny) InitializeParent(parent S7Address ) {} -func (m *_S7AddressAny) GetParent() S7Address { +func (m *_S7AddressAny) GetParent() S7Address { return m._S7Address } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -120,16 +122,17 @@ func (m *_S7AddressAny) GetBitAddress() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewS7AddressAny factory function for _S7AddressAny -func NewS7AddressAny(transportSize TransportSize, numberOfElements uint16, dbNumber uint16, area MemoryArea, byteAddress uint16, bitAddress uint8) *_S7AddressAny { +func NewS7AddressAny( transportSize TransportSize , numberOfElements uint16 , dbNumber uint16 , area MemoryArea , byteAddress uint16 , bitAddress uint8 ) *_S7AddressAny { _result := &_S7AddressAny{ - TransportSize: transportSize, + TransportSize: transportSize, NumberOfElements: numberOfElements, - DbNumber: dbNumber, - Area: area, - ByteAddress: byteAddress, - BitAddress: bitAddress, - _S7Address: NewS7Address(), + DbNumber: dbNumber, + Area: area, + ByteAddress: byteAddress, + BitAddress: bitAddress, + _S7Address: NewS7Address(), } _result._S7Address._S7AddressChildRequirements = _result return _result @@ -137,7 +140,7 @@ func NewS7AddressAny(transportSize TransportSize, numberOfElements uint16, dbNum // Deprecated: use the interface for direct cast func CastS7AddressAny(structType interface{}) S7AddressAny { - if casted, ok := structType.(S7AddressAny); ok { + if casted, ok := structType.(S7AddressAny); ok { return casted } if casted, ok := structType.(*S7AddressAny); ok { @@ -157,10 +160,10 @@ func (m *_S7AddressAny) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += 8 // Simple field (numberOfElements) - lengthInBits += 16 + lengthInBits += 16; // Simple field (dbNumber) - lengthInBits += 16 + lengthInBits += 16; // Simple field (area) lengthInBits += 8 @@ -169,14 +172,15 @@ func (m *_S7AddressAny) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += 5 // Simple field (byteAddress) - lengthInBits += 16 + lengthInBits += 16; // Simple field (bitAddress) - lengthInBits += 3 + lengthInBits += 3; return lengthInBits } + func (m *_S7AddressAny) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -211,14 +215,14 @@ func S7AddressAnyParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe } // Simple Field (numberOfElements) - _numberOfElements, _numberOfElementsErr := readBuffer.ReadUint16("numberOfElements", 16) +_numberOfElements, _numberOfElementsErr := readBuffer.ReadUint16("numberOfElements", 16) if _numberOfElementsErr != nil { return nil, errors.Wrap(_numberOfElementsErr, "Error parsing 'numberOfElements' field of S7AddressAny") } numberOfElements := _numberOfElements // Simple Field (dbNumber) - _dbNumber, _dbNumberErr := readBuffer.ReadUint16("dbNumber", 16) +_dbNumber, _dbNumberErr := readBuffer.ReadUint16("dbNumber", 16) if _dbNumberErr != nil { return nil, errors.Wrap(_dbNumberErr, "Error parsing 'dbNumber' field of S7AddressAny") } @@ -228,7 +232,7 @@ func S7AddressAnyParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe if pullErr := readBuffer.PullContext("area"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for area") } - _area, _areaErr := MemoryAreaParseWithBuffer(ctx, readBuffer) +_area, _areaErr := MemoryAreaParseWithBuffer(ctx, readBuffer) if _areaErr != nil { return nil, errors.Wrap(_areaErr, "Error parsing 'area' field of S7AddressAny") } @@ -247,7 +251,7 @@ func S7AddressAnyParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe if reserved != uint8(0x00) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -255,14 +259,14 @@ func S7AddressAnyParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe } // Simple Field (byteAddress) - _byteAddress, _byteAddressErr := readBuffer.ReadUint16("byteAddress", 16) +_byteAddress, _byteAddressErr := readBuffer.ReadUint16("byteAddress", 16) if _byteAddressErr != nil { return nil, errors.Wrap(_byteAddressErr, "Error parsing 'byteAddress' field of S7AddressAny") } byteAddress := _byteAddress // Simple Field (bitAddress) - _bitAddress, _bitAddressErr := readBuffer.ReadUint8("bitAddress", 3) +_bitAddress, _bitAddressErr := readBuffer.ReadUint8("bitAddress", 3) if _bitAddressErr != nil { return nil, errors.Wrap(_bitAddressErr, "Error parsing 'bitAddress' field of S7AddressAny") } @@ -274,14 +278,15 @@ func S7AddressAnyParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffe // Create a partially initialized instance _child := &_S7AddressAny{ - _S7Address: &_S7Address{}, - TransportSize: transportSize, + _S7Address: &_S7Address{ + }, + TransportSize: transportSize, NumberOfElements: numberOfElements, - DbNumber: dbNumber, - Area: area, - ByteAddress: byteAddress, - BitAddress: bitAddress, - reservedField0: reservedField0, + DbNumber: dbNumber, + Area: area, + ByteAddress: byteAddress, + BitAddress: bitAddress, + reservedField0: reservedField0, } _child._S7Address._S7AddressChildRequirements = _child return _child, nil @@ -303,73 +308,73 @@ func (m *_S7AddressAny) SerializeWithWriteBuffer(ctx context.Context, writeBuffe return errors.Wrap(pushErr, "Error pushing for S7AddressAny") } - if pushErr := writeBuffer.PushContext("transportSize"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for transportSize") - } - // Enum field (transportSize) - _transportSizeErr := writeBuffer.WriteUint8("TransportSize", 8, m.TransportSize.Code(), utils.WithAdditionalStringRepresentation(m.GetTransportSize().PLC4XEnumName())) - if _transportSizeErr != nil { - return errors.Wrap(_transportSizeErr, "Error serializing 'transportSize' field") - } - if popErr := writeBuffer.PopContext("transportSize"); popErr != nil { - return errors.Wrap(popErr, "Error popping for transportSize") - } + if pushErr := writeBuffer.PushContext("transportSize"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for transportSize") + } + // Enum field (transportSize) + _transportSizeErr := writeBuffer.WriteUint8("TransportSize", 8, m.TransportSize.Code(), utils.WithAdditionalStringRepresentation(m.GetTransportSize().PLC4XEnumName())) + if _transportSizeErr != nil { + return errors.Wrap(_transportSizeErr, "Error serializing 'transportSize' field") + } + if popErr := writeBuffer.PopContext("transportSize"); popErr != nil { + return errors.Wrap(popErr, "Error popping for transportSize") + } - // Simple Field (numberOfElements) - numberOfElements := uint16(m.GetNumberOfElements()) - _numberOfElementsErr := writeBuffer.WriteUint16("numberOfElements", 16, (numberOfElements)) - if _numberOfElementsErr != nil { - return errors.Wrap(_numberOfElementsErr, "Error serializing 'numberOfElements' field") - } + // Simple Field (numberOfElements) + numberOfElements := uint16(m.GetNumberOfElements()) + _numberOfElementsErr := writeBuffer.WriteUint16("numberOfElements", 16, (numberOfElements)) + if _numberOfElementsErr != nil { + return errors.Wrap(_numberOfElementsErr, "Error serializing 'numberOfElements' field") + } - // Simple Field (dbNumber) - dbNumber := uint16(m.GetDbNumber()) - _dbNumberErr := writeBuffer.WriteUint16("dbNumber", 16, (dbNumber)) - if _dbNumberErr != nil { - return errors.Wrap(_dbNumberErr, "Error serializing 'dbNumber' field") - } + // Simple Field (dbNumber) + dbNumber := uint16(m.GetDbNumber()) + _dbNumberErr := writeBuffer.WriteUint16("dbNumber", 16, (dbNumber)) + if _dbNumberErr != nil { + return errors.Wrap(_dbNumberErr, "Error serializing 'dbNumber' field") + } - // Simple Field (area) - if pushErr := writeBuffer.PushContext("area"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for area") - } - _areaErr := writeBuffer.WriteSerializable(ctx, m.GetArea()) - if popErr := writeBuffer.PopContext("area"); popErr != nil { - return errors.Wrap(popErr, "Error popping for area") - } - if _areaErr != nil { - return errors.Wrap(_areaErr, "Error serializing 'area' field") - } + // Simple Field (area) + if pushErr := writeBuffer.PushContext("area"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for area") + } + _areaErr := writeBuffer.WriteSerializable(ctx, m.GetArea()) + if popErr := writeBuffer.PopContext("area"); popErr != nil { + return errors.Wrap(popErr, "Error popping for area") + } + if _areaErr != nil { + return errors.Wrap(_areaErr, "Error serializing 'area' field") + } - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0x00) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0x00), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteUint8("reserved", 5, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0x00) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0x00), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 } - - // Simple Field (byteAddress) - byteAddress := uint16(m.GetByteAddress()) - _byteAddressErr := writeBuffer.WriteUint16("byteAddress", 16, (byteAddress)) - if _byteAddressErr != nil { - return errors.Wrap(_byteAddressErr, "Error serializing 'byteAddress' field") + _err := writeBuffer.WriteUint8("reserved", 5, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } - // Simple Field (bitAddress) - bitAddress := uint8(m.GetBitAddress()) - _bitAddressErr := writeBuffer.WriteUint8("bitAddress", 3, (bitAddress)) - if _bitAddressErr != nil { - return errors.Wrap(_bitAddressErr, "Error serializing 'bitAddress' field") - } + // Simple Field (byteAddress) + byteAddress := uint16(m.GetByteAddress()) + _byteAddressErr := writeBuffer.WriteUint16("byteAddress", 16, (byteAddress)) + if _byteAddressErr != nil { + return errors.Wrap(_byteAddressErr, "Error serializing 'byteAddress' field") + } + + // Simple Field (bitAddress) + bitAddress := uint8(m.GetBitAddress()) + _bitAddressErr := writeBuffer.WriteUint8("bitAddress", 3, (bitAddress)) + if _bitAddressErr != nil { + return errors.Wrap(_bitAddressErr, "Error serializing 'bitAddress' field") + } if popErr := writeBuffer.PopContext("S7AddressAny"); popErr != nil { return errors.Wrap(popErr, "Error popping for S7AddressAny") @@ -379,6 +384,7 @@ func (m *_S7AddressAny) SerializeWithWriteBuffer(ctx context.Context, writeBuffe return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_S7AddressAny) isS7AddressAny() bool { return true } @@ -393,3 +399,6 @@ func (m *_S7AddressAny) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7DataAlarmMessage.go b/plc4go/protocols/s7/readwrite/model/S7DataAlarmMessage.go index 0ef8977655f..fae1102b827 100644 --- a/plc4go/protocols/s7/readwrite/model/S7DataAlarmMessage.go +++ b/plc4go/protocols/s7/readwrite/model/S7DataAlarmMessage.go @@ -19,6 +19,7 @@ package model + import ( "context" "fmt" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const S7DataAlarmMessage_FUNCTIONID uint8 = 0x00 @@ -58,6 +60,7 @@ type _S7DataAlarmMessageChildRequirements interface { GetCpuFunctionType() uint8 } + type S7DataAlarmMessageParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child S7DataAlarmMessage, serializeChildFunction func() error) error GetTypeName() string @@ -65,13 +68,12 @@ type S7DataAlarmMessageParent interface { type S7DataAlarmMessageChild interface { utils.Serializable - InitializeParent(parent S7DataAlarmMessage) +InitializeParent(parent S7DataAlarmMessage ) GetParent() *S7DataAlarmMessage GetTypeName() string S7DataAlarmMessage } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for const fields. @@ -90,14 +92,15 @@ func (m *_S7DataAlarmMessage) GetNumberMessageObj() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewS7DataAlarmMessage factory function for _S7DataAlarmMessage -func NewS7DataAlarmMessage() *_S7DataAlarmMessage { - return &_S7DataAlarmMessage{} +func NewS7DataAlarmMessage( ) *_S7DataAlarmMessage { +return &_S7DataAlarmMessage{ } } // Deprecated: use the interface for direct cast func CastS7DataAlarmMessage(structType interface{}) S7DataAlarmMessage { - if casted, ok := structType.(S7DataAlarmMessage); ok { + if casted, ok := structType.(S7DataAlarmMessage); ok { return casted } if casted, ok := structType.(*S7DataAlarmMessage); ok { @@ -110,6 +113,7 @@ func (m *_S7DataAlarmMessage) GetTypeName() string { return "S7DataAlarmMessage" } + func (m *_S7DataAlarmMessage) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -160,16 +164,16 @@ func S7DataAlarmMessageParseWithBuffer(ctx context.Context, readBuffer utils.Rea // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type S7DataAlarmMessageChildSerializeRequirement interface { S7DataAlarmMessage - InitializeParent(S7DataAlarmMessage) + InitializeParent(S7DataAlarmMessage ) GetParent() S7DataAlarmMessage } var _childTemp interface{} var _child S7DataAlarmMessageChildSerializeRequirement var typeSwitchError error switch { - case cpuFunctionType == 0x04: // S7MessageObjectRequest +case cpuFunctionType == 0x04 : // S7MessageObjectRequest _childTemp, typeSwitchError = S7MessageObjectRequestParseWithBuffer(ctx, readBuffer, cpuFunctionType) - case cpuFunctionType == 0x08: // S7MessageObjectResponse +case cpuFunctionType == 0x08 : // S7MessageObjectResponse _childTemp, typeSwitchError = S7MessageObjectResponseParseWithBuffer(ctx, readBuffer, cpuFunctionType) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [cpuFunctionType=%v]", cpuFunctionType) @@ -184,7 +188,7 @@ func S7DataAlarmMessageParseWithBuffer(ctx context.Context, readBuffer utils.Rea } // Finish initializing - _child.InitializeParent(_child) +_child.InitializeParent(_child ) return _child, nil } @@ -194,7 +198,7 @@ func (pm *_S7DataAlarmMessage) SerializeParent(ctx context.Context, writeBuffer _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("S7DataAlarmMessage"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("S7DataAlarmMessage"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for S7DataAlarmMessage") } @@ -221,6 +225,7 @@ func (pm *_S7DataAlarmMessage) SerializeParent(ctx context.Context, writeBuffer return nil } + func (m *_S7DataAlarmMessage) isS7DataAlarmMessage() bool { return true } @@ -235,3 +240,6 @@ func (m *_S7DataAlarmMessage) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7Message.go b/plc4go/protocols/s7/readwrite/model/S7Message.go index 9f0bf105645..35cbab84bd2 100644 --- a/plc4go/protocols/s7/readwrite/model/S7Message.go +++ b/plc4go/protocols/s7/readwrite/model/S7Message.go @@ -19,6 +19,7 @@ package model + import ( "context" "fmt" @@ -27,7 +28,8 @@ import ( "io" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const S7Message_PROTOCOLID uint8 = 0x32 @@ -56,9 +58,9 @@ type S7MessageExactly interface { // _S7Message is the data-structure of this message type _S7Message struct { _S7MessageChildRequirements - TpduReference uint16 - Parameter S7Parameter - Payload S7Payload + TpduReference uint16 + Parameter S7Parameter + Payload S7Payload // Reserved Fields reservedField0 *uint16 } @@ -69,6 +71,7 @@ type _S7MessageChildRequirements interface { GetMessageType() uint8 } + type S7MessageParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child S7Message, serializeChildFunction func() error) error GetTypeName() string @@ -76,13 +79,12 @@ type S7MessageParent interface { type S7MessageChild interface { utils.Serializable - InitializeParent(parent S7Message, tpduReference uint16, parameter S7Parameter, payload S7Payload) +InitializeParent(parent S7Message , tpduReference uint16 , parameter S7Parameter , payload S7Payload ) GetParent() *S7Message GetTypeName() string S7Message } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -118,14 +120,15 @@ func (m *_S7Message) GetProtocolId() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewS7Message factory function for _S7Message -func NewS7Message(tpduReference uint16, parameter S7Parameter, payload S7Payload) *_S7Message { - return &_S7Message{TpduReference: tpduReference, Parameter: parameter, Payload: payload} +func NewS7Message( tpduReference uint16 , parameter S7Parameter , payload S7Payload ) *_S7Message { +return &_S7Message{ TpduReference: tpduReference , Parameter: parameter , Payload: payload } } // Deprecated: use the interface for direct cast func CastS7Message(structType interface{}) S7Message { - if casted, ok := structType.(S7Message); ok { + if casted, ok := structType.(S7Message); ok { return casted } if casted, ok := structType.(*S7Message); ok { @@ -138,19 +141,20 @@ func (m *_S7Message) GetTypeName() string { return "S7Message" } + func (m *_S7Message) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Const Field (protocolId) lengthInBits += 8 // Discriminator Field (messageType) - lengthInBits += 8 + lengthInBits += 8; // Reserved Field (reserved) lengthInBits += 16 // Simple field (tpduReference) - lengthInBits += 16 + lengthInBits += 16; // Implicit Field (parameterLength) lengthInBits += 16 @@ -213,7 +217,7 @@ func S7MessageParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) if reserved != uint16(0x0000) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint16(0x0000), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -221,7 +225,7 @@ func S7MessageParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) } // Simple Field (tpduReference) - _tpduReference, _tpduReferenceErr := readBuffer.ReadUint16("tpduReference", 16) +_tpduReference, _tpduReferenceErr := readBuffer.ReadUint16("tpduReference", 16) if _tpduReferenceErr != nil { return nil, errors.Wrap(_tpduReferenceErr, "Error parsing 'tpduReference' field of S7Message") } @@ -244,21 +248,21 @@ func S7MessageParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type S7MessageChildSerializeRequirement interface { S7Message - InitializeParent(S7Message, uint16, S7Parameter, S7Payload) + InitializeParent(S7Message, uint16, S7Parameter, S7Payload) GetParent() S7Message } var _childTemp interface{} var _child S7MessageChildSerializeRequirement var typeSwitchError error switch { - case messageType == 0x01: // S7MessageRequest - _childTemp, typeSwitchError = S7MessageRequestParseWithBuffer(ctx, readBuffer) - case messageType == 0x02: // S7MessageResponse - _childTemp, typeSwitchError = S7MessageResponseParseWithBuffer(ctx, readBuffer) - case messageType == 0x03: // S7MessageResponseData - _childTemp, typeSwitchError = S7MessageResponseDataParseWithBuffer(ctx, readBuffer) - case messageType == 0x07: // S7MessageUserData - _childTemp, typeSwitchError = S7MessageUserDataParseWithBuffer(ctx, readBuffer) +case messageType == 0x01 : // S7MessageRequest + _childTemp, typeSwitchError = S7MessageRequestParseWithBuffer(ctx, readBuffer, ) +case messageType == 0x02 : // S7MessageResponse + _childTemp, typeSwitchError = S7MessageResponseParseWithBuffer(ctx, readBuffer, ) +case messageType == 0x03 : // S7MessageResponseData + _childTemp, typeSwitchError = S7MessageResponseDataParseWithBuffer(ctx, readBuffer, ) +case messageType == 0x07 : // S7MessageUserData + _childTemp, typeSwitchError = S7MessageUserDataParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [messageType=%v]", messageType) } @@ -269,12 +273,12 @@ func S7MessageParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) // Optional Field (parameter) (Can be skipped, if a given expression evaluates to false) var parameter S7Parameter = nil - if bool((parameterLength) > (0)) { + if bool((parameterLength) > ((0))) { currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("parameter"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for parameter") } - _val, _err := S7ParameterParseWithBuffer(ctx, readBuffer, messageType) +_val, _err := S7ParameterParseWithBuffer(ctx, readBuffer , messageType ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -291,12 +295,12 @@ func S7MessageParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) // Optional Field (payload) (Can be skipped, if a given expression evaluates to false) var payload S7Payload = nil - if bool((payloadLength) > (0)) { + if bool((payloadLength) > ((0))) { currentPos = positionAware.GetPos() if pullErr := readBuffer.PullContext("payload"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for payload") } - _val, _err := S7PayloadParseWithBuffer(ctx, readBuffer, messageType, (parameter)) +_val, _err := S7PayloadParseWithBuffer(ctx, readBuffer , messageType , (parameter) ) switch { case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF): Plc4xModelLog.Debug().Err(_err).Msg("Resetting position because optional threw an error") @@ -316,7 +320,7 @@ func S7MessageParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) } // Finish initializing - _child.InitializeParent(_child, tpduReference, parameter, payload) +_child.InitializeParent(_child , tpduReference , parameter , payload ) _child.GetParent().(*_S7Message).reservedField0 = reservedField0 return _child, nil } @@ -327,7 +331,7 @@ func (pm *_S7Message) SerializeParent(ctx context.Context, writeBuffer utils.Wri _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("S7Message"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("S7Message"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for S7Message") } @@ -351,7 +355,7 @@ func (pm *_S7Message) SerializeParent(ctx context.Context, writeBuffer utils.Wri if pm.reservedField0 != nil { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint16(0x0000), - "got value": reserved, + "got value": reserved, }).Msg("Overriding reserved field with unexpected value.") reserved = *pm.reservedField0 } @@ -369,14 +373,14 @@ func (pm *_S7Message) SerializeParent(ctx context.Context, writeBuffer utils.Wri } // Implicit Field (parameterLength) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - parameterLength := uint16(utils.InlineIf(bool((m.GetParameter()) != (nil)), func() interface{} { return uint16((m.GetParameter()).GetLengthInBytes(ctx)) }, func() interface{} { return uint16(uint16(0)) }).(uint16)) + parameterLength := uint16(utils.InlineIf(bool(((m.GetParameter())) != (nil)), func() interface{} {return uint16((m.GetParameter()).GetLengthInBytes(ctx))}, func() interface{} {return uint16(uint16(0))}).(uint16)) _parameterLengthErr := writeBuffer.WriteUint16("parameterLength", 16, (parameterLength)) if _parameterLengthErr != nil { return errors.Wrap(_parameterLengthErr, "Error serializing 'parameterLength' field") } // Implicit Field (payloadLength) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - payloadLength := uint16(utils.InlineIf(bool((m.GetPayload()) != (nil)), func() interface{} { return uint16((m.GetPayload()).GetLengthInBytes(ctx)) }, func() interface{} { return uint16(uint16(0)) }).(uint16)) + payloadLength := uint16(utils.InlineIf(bool(((m.GetPayload())) != (nil)), func() interface{} {return uint16((m.GetPayload()).GetLengthInBytes(ctx))}, func() interface{} {return uint16(uint16(0))}).(uint16)) _payloadLengthErr := writeBuffer.WriteUint16("payloadLength", 16, (payloadLength)) if _payloadLengthErr != nil { return errors.Wrap(_payloadLengthErr, "Error serializing 'payloadLength' field") @@ -425,6 +429,7 @@ func (pm *_S7Message) SerializeParent(ctx context.Context, writeBuffer utils.Wri return nil } + func (m *_S7Message) isS7Message() bool { return true } @@ -439,3 +444,6 @@ func (m *_S7Message) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7MessageObjectRequest.go b/plc4go/protocols/s7/readwrite/model/S7MessageObjectRequest.go index 86da6c16b7e..b5837a22088 100644 --- a/plc4go/protocols/s7/readwrite/model/S7MessageObjectRequest.go +++ b/plc4go/protocols/s7/readwrite/model/S7MessageObjectRequest.go @@ -19,6 +19,7 @@ package model + import ( "context" "fmt" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const S7MessageObjectRequest_VARIABLESPEC uint8 = 0x12 @@ -55,34 +57,34 @@ type S7MessageObjectRequestExactly interface { // _S7MessageObjectRequest is the data-structure of this message type _S7MessageObjectRequest struct { *_S7DataAlarmMessage - SyntaxId SyntaxIdType - QueryType QueryType - AlarmType AlarmType + SyntaxId SyntaxIdType + QueryType QueryType + AlarmType AlarmType // Reserved Fields reservedField0 *uint8 reservedField1 *uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_S7MessageObjectRequest) GetCpuFunctionType() uint8 { - return 0x04 -} +func (m *_S7MessageObjectRequest) GetCpuFunctionType() uint8 { +return 0x04} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_S7MessageObjectRequest) InitializeParent(parent S7DataAlarmMessage) {} +func (m *_S7MessageObjectRequest) InitializeParent(parent S7DataAlarmMessage ) {} -func (m *_S7MessageObjectRequest) GetParent() S7DataAlarmMessage { +func (m *_S7MessageObjectRequest) GetParent() S7DataAlarmMessage { return m._S7DataAlarmMessage } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -122,13 +124,14 @@ func (m *_S7MessageObjectRequest) GetLength() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewS7MessageObjectRequest factory function for _S7MessageObjectRequest -func NewS7MessageObjectRequest(syntaxId SyntaxIdType, queryType QueryType, alarmType AlarmType) *_S7MessageObjectRequest { +func NewS7MessageObjectRequest( syntaxId SyntaxIdType , queryType QueryType , alarmType AlarmType ) *_S7MessageObjectRequest { _result := &_S7MessageObjectRequest{ - SyntaxId: syntaxId, - QueryType: queryType, - AlarmType: alarmType, - _S7DataAlarmMessage: NewS7DataAlarmMessage(), + SyntaxId: syntaxId, + QueryType: queryType, + AlarmType: alarmType, + _S7DataAlarmMessage: NewS7DataAlarmMessage(), } _result._S7DataAlarmMessage._S7DataAlarmMessageChildRequirements = _result return _result @@ -136,7 +139,7 @@ func NewS7MessageObjectRequest(syntaxId SyntaxIdType, queryType QueryType, alarm // Deprecated: use the interface for direct cast func CastS7MessageObjectRequest(structType interface{}) S7MessageObjectRequest { - if casted, ok := structType.(S7MessageObjectRequest); ok { + if casted, ok := structType.(S7MessageObjectRequest); ok { return casted } if casted, ok := structType.(*S7MessageObjectRequest); ok { @@ -176,6 +179,7 @@ func (m *_S7MessageObjectRequest) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_S7MessageObjectRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -215,7 +219,7 @@ func S7MessageObjectRequestParseWithBuffer(ctx context.Context, readBuffer utils if pullErr := readBuffer.PullContext("syntaxId"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for syntaxId") } - _syntaxId, _syntaxIdErr := SyntaxIdTypeParseWithBuffer(ctx, readBuffer) +_syntaxId, _syntaxIdErr := SyntaxIdTypeParseWithBuffer(ctx, readBuffer) if _syntaxIdErr != nil { return nil, errors.Wrap(_syntaxIdErr, "Error parsing 'syntaxId' field of S7MessageObjectRequest") } @@ -234,7 +238,7 @@ func S7MessageObjectRequestParseWithBuffer(ctx context.Context, readBuffer utils if reserved != uint8(0x00) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -245,7 +249,7 @@ func S7MessageObjectRequestParseWithBuffer(ctx context.Context, readBuffer utils if pullErr := readBuffer.PullContext("queryType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for queryType") } - _queryType, _queryTypeErr := QueryTypeParseWithBuffer(ctx, readBuffer) +_queryType, _queryTypeErr := QueryTypeParseWithBuffer(ctx, readBuffer) if _queryTypeErr != nil { return nil, errors.Wrap(_queryTypeErr, "Error parsing 'queryType' field of S7MessageObjectRequest") } @@ -264,7 +268,7 @@ func S7MessageObjectRequestParseWithBuffer(ctx context.Context, readBuffer utils if reserved != uint8(0x34) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x34), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField1 = &reserved @@ -275,7 +279,7 @@ func S7MessageObjectRequestParseWithBuffer(ctx context.Context, readBuffer utils if pullErr := readBuffer.PullContext("alarmType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for alarmType") } - _alarmType, _alarmTypeErr := AlarmTypeParseWithBuffer(ctx, readBuffer) +_alarmType, _alarmTypeErr := AlarmTypeParseWithBuffer(ctx, readBuffer) if _alarmTypeErr != nil { return nil, errors.Wrap(_alarmTypeErr, "Error parsing 'alarmType' field of S7MessageObjectRequest") } @@ -290,12 +294,13 @@ func S7MessageObjectRequestParseWithBuffer(ctx context.Context, readBuffer utils // Create a partially initialized instance _child := &_S7MessageObjectRequest{ - _S7DataAlarmMessage: &_S7DataAlarmMessage{}, - SyntaxId: syntaxId, - QueryType: queryType, - AlarmType: alarmType, - reservedField0: reservedField0, - reservedField1: reservedField1, + _S7DataAlarmMessage: &_S7DataAlarmMessage{ + }, + SyntaxId: syntaxId, + QueryType: queryType, + AlarmType: alarmType, + reservedField0: reservedField0, + reservedField1: reservedField1, } _child._S7DataAlarmMessage._S7DataAlarmMessageChildRequirements = _child return _child, nil @@ -317,85 +322,85 @@ func (m *_S7MessageObjectRequest) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for S7MessageObjectRequest") } - // Const Field (variableSpec) - _variableSpecErr := writeBuffer.WriteUint8("variableSpec", 8, 0x12) - if _variableSpecErr != nil { - return errors.Wrap(_variableSpecErr, "Error serializing 'variableSpec' field") - } - - // Const Field (length) - _lengthErr := writeBuffer.WriteUint8("length", 8, 0x08) - if _lengthErr != nil { - return errors.Wrap(_lengthErr, "Error serializing 'length' field") - } + // Const Field (variableSpec) + _variableSpecErr := writeBuffer.WriteUint8("variableSpec", 8, 0x12) + if _variableSpecErr != nil { + return errors.Wrap(_variableSpecErr, "Error serializing 'variableSpec' field") + } - // Simple Field (syntaxId) - if pushErr := writeBuffer.PushContext("syntaxId"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for syntaxId") - } - _syntaxIdErr := writeBuffer.WriteSerializable(ctx, m.GetSyntaxId()) - if popErr := writeBuffer.PopContext("syntaxId"); popErr != nil { - return errors.Wrap(popErr, "Error popping for syntaxId") - } - if _syntaxIdErr != nil { - return errors.Wrap(_syntaxIdErr, "Error serializing 'syntaxId' field") - } + // Const Field (length) + _lengthErr := writeBuffer.WriteUint8("length", 8, 0x08) + if _lengthErr != nil { + return errors.Wrap(_lengthErr, "Error serializing 'length' field") + } - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0x00) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0x00), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteUint8("reserved", 8, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } - } + // Simple Field (syntaxId) + if pushErr := writeBuffer.PushContext("syntaxId"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for syntaxId") + } + _syntaxIdErr := writeBuffer.WriteSerializable(ctx, m.GetSyntaxId()) + if popErr := writeBuffer.PopContext("syntaxId"); popErr != nil { + return errors.Wrap(popErr, "Error popping for syntaxId") + } + if _syntaxIdErr != nil { + return errors.Wrap(_syntaxIdErr, "Error serializing 'syntaxId' field") + } - // Simple Field (queryType) - if pushErr := writeBuffer.PushContext("queryType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for queryType") - } - _queryTypeErr := writeBuffer.WriteSerializable(ctx, m.GetQueryType()) - if popErr := writeBuffer.PopContext("queryType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for queryType") + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0x00) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0x00), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 } - if _queryTypeErr != nil { - return errors.Wrap(_queryTypeErr, "Error serializing 'queryType' field") + _err := writeBuffer.WriteUint8("reserved", 8, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0x34) - if m.reservedField1 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0x34), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField1 - } - _err := writeBuffer.WriteUint8("reserved", 8, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } - } + // Simple Field (queryType) + if pushErr := writeBuffer.PushContext("queryType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for queryType") + } + _queryTypeErr := writeBuffer.WriteSerializable(ctx, m.GetQueryType()) + if popErr := writeBuffer.PopContext("queryType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for queryType") + } + if _queryTypeErr != nil { + return errors.Wrap(_queryTypeErr, "Error serializing 'queryType' field") + } - // Simple Field (alarmType) - if pushErr := writeBuffer.PushContext("alarmType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for alarmType") - } - _alarmTypeErr := writeBuffer.WriteSerializable(ctx, m.GetAlarmType()) - if popErr := writeBuffer.PopContext("alarmType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for alarmType") + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0x34) + if m.reservedField1 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0x34), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField1 } - if _alarmTypeErr != nil { - return errors.Wrap(_alarmTypeErr, "Error serializing 'alarmType' field") + _err := writeBuffer.WriteUint8("reserved", 8, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } + + // Simple Field (alarmType) + if pushErr := writeBuffer.PushContext("alarmType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for alarmType") + } + _alarmTypeErr := writeBuffer.WriteSerializable(ctx, m.GetAlarmType()) + if popErr := writeBuffer.PopContext("alarmType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for alarmType") + } + if _alarmTypeErr != nil { + return errors.Wrap(_alarmTypeErr, "Error serializing 'alarmType' field") + } if popErr := writeBuffer.PopContext("S7MessageObjectRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for S7MessageObjectRequest") @@ -405,6 +410,7 @@ func (m *_S7MessageObjectRequest) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_S7MessageObjectRequest) isS7MessageObjectRequest() bool { return true } @@ -419,3 +425,6 @@ func (m *_S7MessageObjectRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7MessageObjectResponse.go b/plc4go/protocols/s7/readwrite/model/S7MessageObjectResponse.go index 141245a3352..09a3c615786 100644 --- a/plc4go/protocols/s7/readwrite/model/S7MessageObjectResponse.go +++ b/plc4go/protocols/s7/readwrite/model/S7MessageObjectResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7MessageObjectResponse is the corresponding interface of S7MessageObjectResponse type S7MessageObjectResponse interface { @@ -48,32 +50,32 @@ type S7MessageObjectResponseExactly interface { // _S7MessageObjectResponse is the data-structure of this message type _S7MessageObjectResponse struct { *_S7DataAlarmMessage - ReturnCode DataTransportErrorCode - TransportSize DataTransportSize + ReturnCode DataTransportErrorCode + TransportSize DataTransportSize // Reserved Fields reservedField0 *uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_S7MessageObjectResponse) GetCpuFunctionType() uint8 { - return 0x08 -} +func (m *_S7MessageObjectResponse) GetCpuFunctionType() uint8 { +return 0x08} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_S7MessageObjectResponse) InitializeParent(parent S7DataAlarmMessage) {} +func (m *_S7MessageObjectResponse) InitializeParent(parent S7DataAlarmMessage ) {} -func (m *_S7MessageObjectResponse) GetParent() S7DataAlarmMessage { +func (m *_S7MessageObjectResponse) GetParent() S7DataAlarmMessage { return m._S7DataAlarmMessage } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -92,12 +94,13 @@ func (m *_S7MessageObjectResponse) GetTransportSize() DataTransportSize { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewS7MessageObjectResponse factory function for _S7MessageObjectResponse -func NewS7MessageObjectResponse(returnCode DataTransportErrorCode, transportSize DataTransportSize) *_S7MessageObjectResponse { +func NewS7MessageObjectResponse( returnCode DataTransportErrorCode , transportSize DataTransportSize ) *_S7MessageObjectResponse { _result := &_S7MessageObjectResponse{ - ReturnCode: returnCode, - TransportSize: transportSize, - _S7DataAlarmMessage: NewS7DataAlarmMessage(), + ReturnCode: returnCode, + TransportSize: transportSize, + _S7DataAlarmMessage: NewS7DataAlarmMessage(), } _result._S7DataAlarmMessage._S7DataAlarmMessageChildRequirements = _result return _result @@ -105,7 +108,7 @@ func NewS7MessageObjectResponse(returnCode DataTransportErrorCode, transportSize // Deprecated: use the interface for direct cast func CastS7MessageObjectResponse(structType interface{}) S7MessageObjectResponse { - if casted, ok := structType.(S7MessageObjectResponse); ok { + if casted, ok := structType.(S7MessageObjectResponse); ok { return casted } if casted, ok := structType.(*S7MessageObjectResponse); ok { @@ -133,6 +136,7 @@ func (m *_S7MessageObjectResponse) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_S7MessageObjectResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -154,7 +158,7 @@ func S7MessageObjectResponseParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("returnCode"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for returnCode") } - _returnCode, _returnCodeErr := DataTransportErrorCodeParseWithBuffer(ctx, readBuffer) +_returnCode, _returnCodeErr := DataTransportErrorCodeParseWithBuffer(ctx, readBuffer) if _returnCodeErr != nil { return nil, errors.Wrap(_returnCodeErr, "Error parsing 'returnCode' field of S7MessageObjectResponse") } @@ -167,7 +171,7 @@ func S7MessageObjectResponseParseWithBuffer(ctx context.Context, readBuffer util if pullErr := readBuffer.PullContext("transportSize"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for transportSize") } - _transportSize, _transportSizeErr := DataTransportSizeParseWithBuffer(ctx, readBuffer) +_transportSize, _transportSizeErr := DataTransportSizeParseWithBuffer(ctx, readBuffer) if _transportSizeErr != nil { return nil, errors.Wrap(_transportSizeErr, "Error parsing 'transportSize' field of S7MessageObjectResponse") } @@ -186,7 +190,7 @@ func S7MessageObjectResponseParseWithBuffer(ctx context.Context, readBuffer util if reserved != uint8(0x00) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -199,10 +203,11 @@ func S7MessageObjectResponseParseWithBuffer(ctx context.Context, readBuffer util // Create a partially initialized instance _child := &_S7MessageObjectResponse{ - _S7DataAlarmMessage: &_S7DataAlarmMessage{}, - ReturnCode: returnCode, - TransportSize: transportSize, - reservedField0: reservedField0, + _S7DataAlarmMessage: &_S7DataAlarmMessage{ + }, + ReturnCode: returnCode, + TransportSize: transportSize, + reservedField0: reservedField0, } _child._S7DataAlarmMessage._S7DataAlarmMessageChildRequirements = _child return _child, nil @@ -224,45 +229,45 @@ func (m *_S7MessageObjectResponse) SerializeWithWriteBuffer(ctx context.Context, return errors.Wrap(pushErr, "Error pushing for S7MessageObjectResponse") } - // Simple Field (returnCode) - if pushErr := writeBuffer.PushContext("returnCode"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for returnCode") - } - _returnCodeErr := writeBuffer.WriteSerializable(ctx, m.GetReturnCode()) - if popErr := writeBuffer.PopContext("returnCode"); popErr != nil { - return errors.Wrap(popErr, "Error popping for returnCode") - } - if _returnCodeErr != nil { - return errors.Wrap(_returnCodeErr, "Error serializing 'returnCode' field") - } + // Simple Field (returnCode) + if pushErr := writeBuffer.PushContext("returnCode"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for returnCode") + } + _returnCodeErr := writeBuffer.WriteSerializable(ctx, m.GetReturnCode()) + if popErr := writeBuffer.PopContext("returnCode"); popErr != nil { + return errors.Wrap(popErr, "Error popping for returnCode") + } + if _returnCodeErr != nil { + return errors.Wrap(_returnCodeErr, "Error serializing 'returnCode' field") + } - // Simple Field (transportSize) - if pushErr := writeBuffer.PushContext("transportSize"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for transportSize") - } - _transportSizeErr := writeBuffer.WriteSerializable(ctx, m.GetTransportSize()) - if popErr := writeBuffer.PopContext("transportSize"); popErr != nil { - return errors.Wrap(popErr, "Error popping for transportSize") - } - if _transportSizeErr != nil { - return errors.Wrap(_transportSizeErr, "Error serializing 'transportSize' field") - } + // Simple Field (transportSize) + if pushErr := writeBuffer.PushContext("transportSize"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for transportSize") + } + _transportSizeErr := writeBuffer.WriteSerializable(ctx, m.GetTransportSize()) + if popErr := writeBuffer.PopContext("transportSize"); popErr != nil { + return errors.Wrap(popErr, "Error popping for transportSize") + } + if _transportSizeErr != nil { + return errors.Wrap(_transportSizeErr, "Error serializing 'transportSize' field") + } - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0x00) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0x00), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteUint8("reserved", 8, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0x00) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0x00), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 + } + _err := writeBuffer.WriteUint8("reserved", 8, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } if popErr := writeBuffer.PopContext("S7MessageObjectResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for S7MessageObjectResponse") @@ -272,6 +277,7 @@ func (m *_S7MessageObjectResponse) SerializeWithWriteBuffer(ctx context.Context, return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_S7MessageObjectResponse) isS7MessageObjectResponse() bool { return true } @@ -286,3 +292,6 @@ func (m *_S7MessageObjectResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7MessageRequest.go b/plc4go/protocols/s7/readwrite/model/S7MessageRequest.go index 596b1c92572..5567d90a21c 100644 --- a/plc4go/protocols/s7/readwrite/model/S7MessageRequest.go +++ b/plc4go/protocols/s7/readwrite/model/S7MessageRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7MessageRequest is the corresponding interface of S7MessageRequest type S7MessageRequest interface { @@ -46,34 +48,35 @@ type _S7MessageRequest struct { *_S7Message } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_S7MessageRequest) GetMessageType() uint8 { - return 0x01 -} +func (m *_S7MessageRequest) GetMessageType() uint8 { +return 0x01} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_S7MessageRequest) InitializeParent(parent S7Message, tpduReference uint16, parameter S7Parameter, payload S7Payload) { - m.TpduReference = tpduReference +func (m *_S7MessageRequest) InitializeParent(parent S7Message , tpduReference uint16 , parameter S7Parameter , payload S7Payload ) { m.TpduReference = tpduReference m.Parameter = parameter m.Payload = payload } -func (m *_S7MessageRequest) GetParent() S7Message { +func (m *_S7MessageRequest) GetParent() S7Message { return m._S7Message } + // NewS7MessageRequest factory function for _S7MessageRequest -func NewS7MessageRequest(tpduReference uint16, parameter S7Parameter, payload S7Payload) *_S7MessageRequest { +func NewS7MessageRequest( tpduReference uint16 , parameter S7Parameter , payload S7Payload ) *_S7MessageRequest { _result := &_S7MessageRequest{ - _S7Message: NewS7Message(tpduReference, parameter, payload), + _S7Message: NewS7Message(tpduReference, parameter, payload), } _result._S7Message._S7MessageChildRequirements = _result return _result @@ -81,7 +84,7 @@ func NewS7MessageRequest(tpduReference uint16, parameter S7Parameter, payload S7 // Deprecated: use the interface for direct cast func CastS7MessageRequest(structType interface{}) S7MessageRequest { - if casted, ok := structType.(S7MessageRequest); ok { + if casted, ok := structType.(S7MessageRequest); ok { return casted } if casted, ok := structType.(*S7MessageRequest); ok { @@ -100,6 +103,7 @@ func (m *_S7MessageRequest) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_S7MessageRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -123,7 +127,8 @@ func S7MessageRequestParseWithBuffer(ctx context.Context, readBuffer utils.ReadB // Create a partially initialized instance _child := &_S7MessageRequest{ - _S7Message: &_S7Message{}, + _S7Message: &_S7Message{ + }, } _child._S7Message._S7MessageChildRequirements = _child return _child, nil @@ -153,6 +158,7 @@ func (m *_S7MessageRequest) SerializeWithWriteBuffer(ctx context.Context, writeB return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_S7MessageRequest) isS7MessageRequest() bool { return true } @@ -167,3 +173,6 @@ func (m *_S7MessageRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7MessageResponse.go b/plc4go/protocols/s7/readwrite/model/S7MessageResponse.go index 26c62e49da1..d051e5282af 100644 --- a/plc4go/protocols/s7/readwrite/model/S7MessageResponse.go +++ b/plc4go/protocols/s7/readwrite/model/S7MessageResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7MessageResponse is the corresponding interface of S7MessageResponse type S7MessageResponse interface { @@ -48,34 +50,33 @@ type S7MessageResponseExactly interface { // _S7MessageResponse is the data-structure of this message type _S7MessageResponse struct { *_S7Message - ErrorClass uint8 - ErrorCode uint8 + ErrorClass uint8 + ErrorCode uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_S7MessageResponse) GetMessageType() uint8 { - return 0x02 -} +func (m *_S7MessageResponse) GetMessageType() uint8 { +return 0x02} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_S7MessageResponse) InitializeParent(parent S7Message, tpduReference uint16, parameter S7Parameter, payload S7Payload) { - m.TpduReference = tpduReference +func (m *_S7MessageResponse) InitializeParent(parent S7Message , tpduReference uint16 , parameter S7Parameter , payload S7Payload ) { m.TpduReference = tpduReference m.Parameter = parameter m.Payload = payload } -func (m *_S7MessageResponse) GetParent() S7Message { +func (m *_S7MessageResponse) GetParent() S7Message { return m._S7Message } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -94,12 +95,13 @@ func (m *_S7MessageResponse) GetErrorCode() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewS7MessageResponse factory function for _S7MessageResponse -func NewS7MessageResponse(errorClass uint8, errorCode uint8, tpduReference uint16, parameter S7Parameter, payload S7Payload) *_S7MessageResponse { +func NewS7MessageResponse( errorClass uint8 , errorCode uint8 , tpduReference uint16 , parameter S7Parameter , payload S7Payload ) *_S7MessageResponse { _result := &_S7MessageResponse{ ErrorClass: errorClass, - ErrorCode: errorCode, - _S7Message: NewS7Message(tpduReference, parameter, payload), + ErrorCode: errorCode, + _S7Message: NewS7Message(tpduReference, parameter, payload), } _result._S7Message._S7MessageChildRequirements = _result return _result @@ -107,7 +109,7 @@ func NewS7MessageResponse(errorClass uint8, errorCode uint8, tpduReference uint1 // Deprecated: use the interface for direct cast func CastS7MessageResponse(structType interface{}) S7MessageResponse { - if casted, ok := structType.(S7MessageResponse); ok { + if casted, ok := structType.(S7MessageResponse); ok { return casted } if casted, ok := structType.(*S7MessageResponse); ok { @@ -124,14 +126,15 @@ func (m *_S7MessageResponse) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (errorClass) - lengthInBits += 8 + lengthInBits += 8; // Simple field (errorCode) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_S7MessageResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -150,14 +153,14 @@ func S7MessageResponseParseWithBuffer(ctx context.Context, readBuffer utils.Read _ = currentPos // Simple Field (errorClass) - _errorClass, _errorClassErr := readBuffer.ReadUint8("errorClass", 8) +_errorClass, _errorClassErr := readBuffer.ReadUint8("errorClass", 8) if _errorClassErr != nil { return nil, errors.Wrap(_errorClassErr, "Error parsing 'errorClass' field of S7MessageResponse") } errorClass := _errorClass // Simple Field (errorCode) - _errorCode, _errorCodeErr := readBuffer.ReadUint8("errorCode", 8) +_errorCode, _errorCodeErr := readBuffer.ReadUint8("errorCode", 8) if _errorCodeErr != nil { return nil, errors.Wrap(_errorCodeErr, "Error parsing 'errorCode' field of S7MessageResponse") } @@ -169,9 +172,10 @@ func S7MessageResponseParseWithBuffer(ctx context.Context, readBuffer utils.Read // Create a partially initialized instance _child := &_S7MessageResponse{ - _S7Message: &_S7Message{}, + _S7Message: &_S7Message{ + }, ErrorClass: errorClass, - ErrorCode: errorCode, + ErrorCode: errorCode, } _child._S7Message._S7MessageChildRequirements = _child return _child, nil @@ -193,19 +197,19 @@ func (m *_S7MessageResponse) SerializeWithWriteBuffer(ctx context.Context, write return errors.Wrap(pushErr, "Error pushing for S7MessageResponse") } - // Simple Field (errorClass) - errorClass := uint8(m.GetErrorClass()) - _errorClassErr := writeBuffer.WriteUint8("errorClass", 8, (errorClass)) - if _errorClassErr != nil { - return errors.Wrap(_errorClassErr, "Error serializing 'errorClass' field") - } + // Simple Field (errorClass) + errorClass := uint8(m.GetErrorClass()) + _errorClassErr := writeBuffer.WriteUint8("errorClass", 8, (errorClass)) + if _errorClassErr != nil { + return errors.Wrap(_errorClassErr, "Error serializing 'errorClass' field") + } - // Simple Field (errorCode) - errorCode := uint8(m.GetErrorCode()) - _errorCodeErr := writeBuffer.WriteUint8("errorCode", 8, (errorCode)) - if _errorCodeErr != nil { - return errors.Wrap(_errorCodeErr, "Error serializing 'errorCode' field") - } + // Simple Field (errorCode) + errorCode := uint8(m.GetErrorCode()) + _errorCodeErr := writeBuffer.WriteUint8("errorCode", 8, (errorCode)) + if _errorCodeErr != nil { + return errors.Wrap(_errorCodeErr, "Error serializing 'errorCode' field") + } if popErr := writeBuffer.PopContext("S7MessageResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for S7MessageResponse") @@ -215,6 +219,7 @@ func (m *_S7MessageResponse) SerializeWithWriteBuffer(ctx context.Context, write return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_S7MessageResponse) isS7MessageResponse() bool { return true } @@ -229,3 +234,6 @@ func (m *_S7MessageResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7MessageResponseData.go b/plc4go/protocols/s7/readwrite/model/S7MessageResponseData.go index 04efb6105f4..841475eb674 100644 --- a/plc4go/protocols/s7/readwrite/model/S7MessageResponseData.go +++ b/plc4go/protocols/s7/readwrite/model/S7MessageResponseData.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7MessageResponseData is the corresponding interface of S7MessageResponseData type S7MessageResponseData interface { @@ -48,34 +50,33 @@ type S7MessageResponseDataExactly interface { // _S7MessageResponseData is the data-structure of this message type _S7MessageResponseData struct { *_S7Message - ErrorClass uint8 - ErrorCode uint8 + ErrorClass uint8 + ErrorCode uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_S7MessageResponseData) GetMessageType() uint8 { - return 0x03 -} +func (m *_S7MessageResponseData) GetMessageType() uint8 { +return 0x03} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_S7MessageResponseData) InitializeParent(parent S7Message, tpduReference uint16, parameter S7Parameter, payload S7Payload) { - m.TpduReference = tpduReference +func (m *_S7MessageResponseData) InitializeParent(parent S7Message , tpduReference uint16 , parameter S7Parameter , payload S7Payload ) { m.TpduReference = tpduReference m.Parameter = parameter m.Payload = payload } -func (m *_S7MessageResponseData) GetParent() S7Message { +func (m *_S7MessageResponseData) GetParent() S7Message { return m._S7Message } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -94,12 +95,13 @@ func (m *_S7MessageResponseData) GetErrorCode() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewS7MessageResponseData factory function for _S7MessageResponseData -func NewS7MessageResponseData(errorClass uint8, errorCode uint8, tpduReference uint16, parameter S7Parameter, payload S7Payload) *_S7MessageResponseData { +func NewS7MessageResponseData( errorClass uint8 , errorCode uint8 , tpduReference uint16 , parameter S7Parameter , payload S7Payload ) *_S7MessageResponseData { _result := &_S7MessageResponseData{ ErrorClass: errorClass, - ErrorCode: errorCode, - _S7Message: NewS7Message(tpduReference, parameter, payload), + ErrorCode: errorCode, + _S7Message: NewS7Message(tpduReference, parameter, payload), } _result._S7Message._S7MessageChildRequirements = _result return _result @@ -107,7 +109,7 @@ func NewS7MessageResponseData(errorClass uint8, errorCode uint8, tpduReference u // Deprecated: use the interface for direct cast func CastS7MessageResponseData(structType interface{}) S7MessageResponseData { - if casted, ok := structType.(S7MessageResponseData); ok { + if casted, ok := structType.(S7MessageResponseData); ok { return casted } if casted, ok := structType.(*S7MessageResponseData); ok { @@ -124,14 +126,15 @@ func (m *_S7MessageResponseData) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (errorClass) - lengthInBits += 8 + lengthInBits += 8; // Simple field (errorCode) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_S7MessageResponseData) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -150,14 +153,14 @@ func S7MessageResponseDataParseWithBuffer(ctx context.Context, readBuffer utils. _ = currentPos // Simple Field (errorClass) - _errorClass, _errorClassErr := readBuffer.ReadUint8("errorClass", 8) +_errorClass, _errorClassErr := readBuffer.ReadUint8("errorClass", 8) if _errorClassErr != nil { return nil, errors.Wrap(_errorClassErr, "Error parsing 'errorClass' field of S7MessageResponseData") } errorClass := _errorClass // Simple Field (errorCode) - _errorCode, _errorCodeErr := readBuffer.ReadUint8("errorCode", 8) +_errorCode, _errorCodeErr := readBuffer.ReadUint8("errorCode", 8) if _errorCodeErr != nil { return nil, errors.Wrap(_errorCodeErr, "Error parsing 'errorCode' field of S7MessageResponseData") } @@ -169,9 +172,10 @@ func S7MessageResponseDataParseWithBuffer(ctx context.Context, readBuffer utils. // Create a partially initialized instance _child := &_S7MessageResponseData{ - _S7Message: &_S7Message{}, + _S7Message: &_S7Message{ + }, ErrorClass: errorClass, - ErrorCode: errorCode, + ErrorCode: errorCode, } _child._S7Message._S7MessageChildRequirements = _child return _child, nil @@ -193,19 +197,19 @@ func (m *_S7MessageResponseData) SerializeWithWriteBuffer(ctx context.Context, w return errors.Wrap(pushErr, "Error pushing for S7MessageResponseData") } - // Simple Field (errorClass) - errorClass := uint8(m.GetErrorClass()) - _errorClassErr := writeBuffer.WriteUint8("errorClass", 8, (errorClass)) - if _errorClassErr != nil { - return errors.Wrap(_errorClassErr, "Error serializing 'errorClass' field") - } + // Simple Field (errorClass) + errorClass := uint8(m.GetErrorClass()) + _errorClassErr := writeBuffer.WriteUint8("errorClass", 8, (errorClass)) + if _errorClassErr != nil { + return errors.Wrap(_errorClassErr, "Error serializing 'errorClass' field") + } - // Simple Field (errorCode) - errorCode := uint8(m.GetErrorCode()) - _errorCodeErr := writeBuffer.WriteUint8("errorCode", 8, (errorCode)) - if _errorCodeErr != nil { - return errors.Wrap(_errorCodeErr, "Error serializing 'errorCode' field") - } + // Simple Field (errorCode) + errorCode := uint8(m.GetErrorCode()) + _errorCodeErr := writeBuffer.WriteUint8("errorCode", 8, (errorCode)) + if _errorCodeErr != nil { + return errors.Wrap(_errorCodeErr, "Error serializing 'errorCode' field") + } if popErr := writeBuffer.PopContext("S7MessageResponseData"); popErr != nil { return errors.Wrap(popErr, "Error popping for S7MessageResponseData") @@ -215,6 +219,7 @@ func (m *_S7MessageResponseData) SerializeWithWriteBuffer(ctx context.Context, w return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_S7MessageResponseData) isS7MessageResponseData() bool { return true } @@ -229,3 +234,6 @@ func (m *_S7MessageResponseData) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7MessageUserData.go b/plc4go/protocols/s7/readwrite/model/S7MessageUserData.go index cb659dee234..c19c131a159 100644 --- a/plc4go/protocols/s7/readwrite/model/S7MessageUserData.go +++ b/plc4go/protocols/s7/readwrite/model/S7MessageUserData.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7MessageUserData is the corresponding interface of S7MessageUserData type S7MessageUserData interface { @@ -46,34 +48,35 @@ type _S7MessageUserData struct { *_S7Message } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_S7MessageUserData) GetMessageType() uint8 { - return 0x07 -} +func (m *_S7MessageUserData) GetMessageType() uint8 { +return 0x07} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_S7MessageUserData) InitializeParent(parent S7Message, tpduReference uint16, parameter S7Parameter, payload S7Payload) { - m.TpduReference = tpduReference +func (m *_S7MessageUserData) InitializeParent(parent S7Message , tpduReference uint16 , parameter S7Parameter , payload S7Payload ) { m.TpduReference = tpduReference m.Parameter = parameter m.Payload = payload } -func (m *_S7MessageUserData) GetParent() S7Message { +func (m *_S7MessageUserData) GetParent() S7Message { return m._S7Message } + // NewS7MessageUserData factory function for _S7MessageUserData -func NewS7MessageUserData(tpduReference uint16, parameter S7Parameter, payload S7Payload) *_S7MessageUserData { +func NewS7MessageUserData( tpduReference uint16 , parameter S7Parameter , payload S7Payload ) *_S7MessageUserData { _result := &_S7MessageUserData{ - _S7Message: NewS7Message(tpduReference, parameter, payload), + _S7Message: NewS7Message(tpduReference, parameter, payload), } _result._S7Message._S7MessageChildRequirements = _result return _result @@ -81,7 +84,7 @@ func NewS7MessageUserData(tpduReference uint16, parameter S7Parameter, payload S // Deprecated: use the interface for direct cast func CastS7MessageUserData(structType interface{}) S7MessageUserData { - if casted, ok := structType.(S7MessageUserData); ok { + if casted, ok := structType.(S7MessageUserData); ok { return casted } if casted, ok := structType.(*S7MessageUserData); ok { @@ -100,6 +103,7 @@ func (m *_S7MessageUserData) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_S7MessageUserData) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -123,7 +127,8 @@ func S7MessageUserDataParseWithBuffer(ctx context.Context, readBuffer utils.Read // Create a partially initialized instance _child := &_S7MessageUserData{ - _S7Message: &_S7Message{}, + _S7Message: &_S7Message{ + }, } _child._S7Message._S7MessageChildRequirements = _child return _child, nil @@ -153,6 +158,7 @@ func (m *_S7MessageUserData) SerializeWithWriteBuffer(ctx context.Context, write return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_S7MessageUserData) isS7MessageUserData() bool { return true } @@ -167,3 +173,6 @@ func (m *_S7MessageUserData) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7Parameter.go b/plc4go/protocols/s7/readwrite/model/S7Parameter.go index 264eedd6e44..6b2060666f7 100644 --- a/plc4go/protocols/s7/readwrite/model/S7Parameter.go +++ b/plc4go/protocols/s7/readwrite/model/S7Parameter.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7Parameter is the corresponding interface of S7Parameter type S7Parameter interface { @@ -56,6 +58,7 @@ type _S7ParameterChildRequirements interface { GetMessageType() uint8 } + type S7ParameterParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child S7Parameter, serializeChildFunction func() error) error GetTypeName() string @@ -63,21 +66,22 @@ type S7ParameterParent interface { type S7ParameterChild interface { utils.Serializable - InitializeParent(parent S7Parameter) +InitializeParent(parent S7Parameter ) GetParent() *S7Parameter GetTypeName() string S7Parameter } + // NewS7Parameter factory function for _S7Parameter -func NewS7Parameter() *_S7Parameter { - return &_S7Parameter{} +func NewS7Parameter( ) *_S7Parameter { +return &_S7Parameter{ } } // Deprecated: use the interface for direct cast func CastS7Parameter(structType interface{}) S7Parameter { - if casted, ok := structType.(S7Parameter); ok { + if casted, ok := structType.(S7Parameter); ok { return casted } if casted, ok := structType.(*S7Parameter); ok { @@ -90,10 +94,11 @@ func (m *_S7Parameter) GetTypeName() string { return "S7Parameter" } + func (m *_S7Parameter) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Discriminator Field (parameterType) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } @@ -124,26 +129,26 @@ func S7ParameterParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type S7ParameterChildSerializeRequirement interface { S7Parameter - InitializeParent(S7Parameter) + InitializeParent(S7Parameter ) GetParent() S7Parameter } var _childTemp interface{} var _child S7ParameterChildSerializeRequirement var typeSwitchError error switch { - case parameterType == 0xF0: // S7ParameterSetupCommunication +case parameterType == 0xF0 : // S7ParameterSetupCommunication _childTemp, typeSwitchError = S7ParameterSetupCommunicationParseWithBuffer(ctx, readBuffer, messageType) - case parameterType == 0x04 && messageType == 0x01: // S7ParameterReadVarRequest +case parameterType == 0x04 && messageType == 0x01 : // S7ParameterReadVarRequest _childTemp, typeSwitchError = S7ParameterReadVarRequestParseWithBuffer(ctx, readBuffer, messageType) - case parameterType == 0x04 && messageType == 0x03: // S7ParameterReadVarResponse +case parameterType == 0x04 && messageType == 0x03 : // S7ParameterReadVarResponse _childTemp, typeSwitchError = S7ParameterReadVarResponseParseWithBuffer(ctx, readBuffer, messageType) - case parameterType == 0x05 && messageType == 0x01: // S7ParameterWriteVarRequest +case parameterType == 0x05 && messageType == 0x01 : // S7ParameterWriteVarRequest _childTemp, typeSwitchError = S7ParameterWriteVarRequestParseWithBuffer(ctx, readBuffer, messageType) - case parameterType == 0x05 && messageType == 0x03: // S7ParameterWriteVarResponse +case parameterType == 0x05 && messageType == 0x03 : // S7ParameterWriteVarResponse _childTemp, typeSwitchError = S7ParameterWriteVarResponseParseWithBuffer(ctx, readBuffer, messageType) - case parameterType == 0x00 && messageType == 0x07: // S7ParameterUserData +case parameterType == 0x00 && messageType == 0x07 : // S7ParameterUserData _childTemp, typeSwitchError = S7ParameterUserDataParseWithBuffer(ctx, readBuffer, messageType) - case parameterType == 0x01 && messageType == 0x07: // S7ParameterModeTransition +case parameterType == 0x01 && messageType == 0x07 : // S7ParameterModeTransition _childTemp, typeSwitchError = S7ParameterModeTransitionParseWithBuffer(ctx, readBuffer, messageType) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [parameterType=%v, messageType=%v]", parameterType, messageType) @@ -158,7 +163,7 @@ func S7ParameterParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer } // Finish initializing - _child.InitializeParent(_child) +_child.InitializeParent(_child ) return _child, nil } @@ -168,7 +173,7 @@ func (pm *_S7Parameter) SerializeParent(ctx context.Context, writeBuffer utils.W _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("S7Parameter"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("S7Parameter"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for S7Parameter") } @@ -191,6 +196,7 @@ func (pm *_S7Parameter) SerializeParent(ctx context.Context, writeBuffer utils.W return nil } + func (m *_S7Parameter) isS7Parameter() bool { return true } @@ -205,3 +211,6 @@ func (m *_S7Parameter) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7ParameterModeTransition.go b/plc4go/protocols/s7/readwrite/model/S7ParameterModeTransition.go index c4d15853de0..34b219af549 100644 --- a/plc4go/protocols/s7/readwrite/model/S7ParameterModeTransition.go +++ b/plc4go/protocols/s7/readwrite/model/S7ParameterModeTransition.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7ParameterModeTransition is the corresponding interface of S7ParameterModeTransition type S7ParameterModeTransition interface { @@ -54,39 +56,38 @@ type S7ParameterModeTransitionExactly interface { // _S7ParameterModeTransition is the data-structure of this message type _S7ParameterModeTransition struct { *_S7Parameter - Method uint8 - CpuFunctionType uint8 - CpuFunctionGroup uint8 - CurrentMode uint8 - SequenceNumber uint8 + Method uint8 + CpuFunctionType uint8 + CpuFunctionGroup uint8 + CurrentMode uint8 + SequenceNumber uint8 // Reserved Fields reservedField0 *uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_S7ParameterModeTransition) GetParameterType() uint8 { - return 0x01 -} +func (m *_S7ParameterModeTransition) GetParameterType() uint8 { +return 0x01} -func (m *_S7ParameterModeTransition) GetMessageType() uint8 { - return 0x07 -} +func (m *_S7ParameterModeTransition) GetMessageType() uint8 { +return 0x07} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_S7ParameterModeTransition) InitializeParent(parent S7Parameter) {} +func (m *_S7ParameterModeTransition) InitializeParent(parent S7Parameter ) {} -func (m *_S7ParameterModeTransition) GetParent() S7Parameter { +func (m *_S7ParameterModeTransition) GetParent() S7Parameter { return m._S7Parameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -117,15 +118,16 @@ func (m *_S7ParameterModeTransition) GetSequenceNumber() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewS7ParameterModeTransition factory function for _S7ParameterModeTransition -func NewS7ParameterModeTransition(method uint8, cpuFunctionType uint8, cpuFunctionGroup uint8, currentMode uint8, sequenceNumber uint8) *_S7ParameterModeTransition { +func NewS7ParameterModeTransition( method uint8 , cpuFunctionType uint8 , cpuFunctionGroup uint8 , currentMode uint8 , sequenceNumber uint8 ) *_S7ParameterModeTransition { _result := &_S7ParameterModeTransition{ - Method: method, - CpuFunctionType: cpuFunctionType, + Method: method, + CpuFunctionType: cpuFunctionType, CpuFunctionGroup: cpuFunctionGroup, - CurrentMode: currentMode, - SequenceNumber: sequenceNumber, - _S7Parameter: NewS7Parameter(), + CurrentMode: currentMode, + SequenceNumber: sequenceNumber, + _S7Parameter: NewS7Parameter(), } _result._S7Parameter._S7ParameterChildRequirements = _result return _result @@ -133,7 +135,7 @@ func NewS7ParameterModeTransition(method uint8, cpuFunctionType uint8, cpuFuncti // Deprecated: use the interface for direct cast func CastS7ParameterModeTransition(structType interface{}) S7ParameterModeTransition { - if casted, ok := structType.(S7ParameterModeTransition); ok { + if casted, ok := structType.(S7ParameterModeTransition); ok { return casted } if casted, ok := structType.(*S7ParameterModeTransition); ok { @@ -156,23 +158,24 @@ func (m *_S7ParameterModeTransition) GetLengthInBits(ctx context.Context) uint16 lengthInBits += 8 // Simple field (method) - lengthInBits += 8 + lengthInBits += 8; // Simple field (cpuFunctionType) - lengthInBits += 4 + lengthInBits += 4; // Simple field (cpuFunctionGroup) - lengthInBits += 4 + lengthInBits += 4; // Simple field (currentMode) - lengthInBits += 8 + lengthInBits += 8; // Simple field (sequenceNumber) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_S7ParameterModeTransition) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -200,7 +203,7 @@ func S7ParameterModeTransitionParseWithBuffer(ctx context.Context, readBuffer ut if reserved != uint16(0x0010) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint16(0x0010), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -215,35 +218,35 @@ func S7ParameterModeTransitionParseWithBuffer(ctx context.Context, readBuffer ut } // Simple Field (method) - _method, _methodErr := readBuffer.ReadUint8("method", 8) +_method, _methodErr := readBuffer.ReadUint8("method", 8) if _methodErr != nil { return nil, errors.Wrap(_methodErr, "Error parsing 'method' field of S7ParameterModeTransition") } method := _method // Simple Field (cpuFunctionType) - _cpuFunctionType, _cpuFunctionTypeErr := readBuffer.ReadUint8("cpuFunctionType", 4) +_cpuFunctionType, _cpuFunctionTypeErr := readBuffer.ReadUint8("cpuFunctionType", 4) if _cpuFunctionTypeErr != nil { return nil, errors.Wrap(_cpuFunctionTypeErr, "Error parsing 'cpuFunctionType' field of S7ParameterModeTransition") } cpuFunctionType := _cpuFunctionType // Simple Field (cpuFunctionGroup) - _cpuFunctionGroup, _cpuFunctionGroupErr := readBuffer.ReadUint8("cpuFunctionGroup", 4) +_cpuFunctionGroup, _cpuFunctionGroupErr := readBuffer.ReadUint8("cpuFunctionGroup", 4) if _cpuFunctionGroupErr != nil { return nil, errors.Wrap(_cpuFunctionGroupErr, "Error parsing 'cpuFunctionGroup' field of S7ParameterModeTransition") } cpuFunctionGroup := _cpuFunctionGroup // Simple Field (currentMode) - _currentMode, _currentModeErr := readBuffer.ReadUint8("currentMode", 8) +_currentMode, _currentModeErr := readBuffer.ReadUint8("currentMode", 8) if _currentModeErr != nil { return nil, errors.Wrap(_currentModeErr, "Error parsing 'currentMode' field of S7ParameterModeTransition") } currentMode := _currentMode // Simple Field (sequenceNumber) - _sequenceNumber, _sequenceNumberErr := readBuffer.ReadUint8("sequenceNumber", 8) +_sequenceNumber, _sequenceNumberErr := readBuffer.ReadUint8("sequenceNumber", 8) if _sequenceNumberErr != nil { return nil, errors.Wrap(_sequenceNumberErr, "Error parsing 'sequenceNumber' field of S7ParameterModeTransition") } @@ -255,13 +258,14 @@ func S7ParameterModeTransitionParseWithBuffer(ctx context.Context, readBuffer ut // Create a partially initialized instance _child := &_S7ParameterModeTransition{ - _S7Parameter: &_S7Parameter{}, - Method: method, - CpuFunctionType: cpuFunctionType, + _S7Parameter: &_S7Parameter{ + }, + Method: method, + CpuFunctionType: cpuFunctionType, CpuFunctionGroup: cpuFunctionGroup, - CurrentMode: currentMode, - SequenceNumber: sequenceNumber, - reservedField0: reservedField0, + CurrentMode: currentMode, + SequenceNumber: sequenceNumber, + reservedField0: reservedField0, } _child._S7Parameter._S7ParameterChildRequirements = _child return _child, nil @@ -283,63 +287,63 @@ func (m *_S7ParameterModeTransition) SerializeWithWriteBuffer(ctx context.Contex return errors.Wrap(pushErr, "Error pushing for S7ParameterModeTransition") } - // Reserved Field (reserved) - { - var reserved uint16 = uint16(0x0010) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint16(0x0010), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteUint16("reserved", 16, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + // Reserved Field (reserved) + { + var reserved uint16 = uint16(0x0010) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint16(0x0010), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 } - - // Implicit Field (itemLength) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - itemLength := uint8(uint8(uint8(m.GetLengthInBytes(ctx))) - uint8(uint8(2))) - _itemLengthErr := writeBuffer.WriteUint8("itemLength", 8, (itemLength)) - if _itemLengthErr != nil { - return errors.Wrap(_itemLengthErr, "Error serializing 'itemLength' field") + _err := writeBuffer.WriteUint16("reserved", 16, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } - // Simple Field (method) - method := uint8(m.GetMethod()) - _methodErr := writeBuffer.WriteUint8("method", 8, (method)) - if _methodErr != nil { - return errors.Wrap(_methodErr, "Error serializing 'method' field") - } + // Implicit Field (itemLength) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) + itemLength := uint8(uint8(uint8(m.GetLengthInBytes(ctx))) - uint8(uint8(2))) + _itemLengthErr := writeBuffer.WriteUint8("itemLength", 8, (itemLength)) + if _itemLengthErr != nil { + return errors.Wrap(_itemLengthErr, "Error serializing 'itemLength' field") + } - // Simple Field (cpuFunctionType) - cpuFunctionType := uint8(m.GetCpuFunctionType()) - _cpuFunctionTypeErr := writeBuffer.WriteUint8("cpuFunctionType", 4, (cpuFunctionType)) - if _cpuFunctionTypeErr != nil { - return errors.Wrap(_cpuFunctionTypeErr, "Error serializing 'cpuFunctionType' field") - } + // Simple Field (method) + method := uint8(m.GetMethod()) + _methodErr := writeBuffer.WriteUint8("method", 8, (method)) + if _methodErr != nil { + return errors.Wrap(_methodErr, "Error serializing 'method' field") + } - // Simple Field (cpuFunctionGroup) - cpuFunctionGroup := uint8(m.GetCpuFunctionGroup()) - _cpuFunctionGroupErr := writeBuffer.WriteUint8("cpuFunctionGroup", 4, (cpuFunctionGroup)) - if _cpuFunctionGroupErr != nil { - return errors.Wrap(_cpuFunctionGroupErr, "Error serializing 'cpuFunctionGroup' field") - } + // Simple Field (cpuFunctionType) + cpuFunctionType := uint8(m.GetCpuFunctionType()) + _cpuFunctionTypeErr := writeBuffer.WriteUint8("cpuFunctionType", 4, (cpuFunctionType)) + if _cpuFunctionTypeErr != nil { + return errors.Wrap(_cpuFunctionTypeErr, "Error serializing 'cpuFunctionType' field") + } - // Simple Field (currentMode) - currentMode := uint8(m.GetCurrentMode()) - _currentModeErr := writeBuffer.WriteUint8("currentMode", 8, (currentMode)) - if _currentModeErr != nil { - return errors.Wrap(_currentModeErr, "Error serializing 'currentMode' field") - } + // Simple Field (cpuFunctionGroup) + cpuFunctionGroup := uint8(m.GetCpuFunctionGroup()) + _cpuFunctionGroupErr := writeBuffer.WriteUint8("cpuFunctionGroup", 4, (cpuFunctionGroup)) + if _cpuFunctionGroupErr != nil { + return errors.Wrap(_cpuFunctionGroupErr, "Error serializing 'cpuFunctionGroup' field") + } - // Simple Field (sequenceNumber) - sequenceNumber := uint8(m.GetSequenceNumber()) - _sequenceNumberErr := writeBuffer.WriteUint8("sequenceNumber", 8, (sequenceNumber)) - if _sequenceNumberErr != nil { - return errors.Wrap(_sequenceNumberErr, "Error serializing 'sequenceNumber' field") - } + // Simple Field (currentMode) + currentMode := uint8(m.GetCurrentMode()) + _currentModeErr := writeBuffer.WriteUint8("currentMode", 8, (currentMode)) + if _currentModeErr != nil { + return errors.Wrap(_currentModeErr, "Error serializing 'currentMode' field") + } + + // Simple Field (sequenceNumber) + sequenceNumber := uint8(m.GetSequenceNumber()) + _sequenceNumberErr := writeBuffer.WriteUint8("sequenceNumber", 8, (sequenceNumber)) + if _sequenceNumberErr != nil { + return errors.Wrap(_sequenceNumberErr, "Error serializing 'sequenceNumber' field") + } if popErr := writeBuffer.PopContext("S7ParameterModeTransition"); popErr != nil { return errors.Wrap(popErr, "Error popping for S7ParameterModeTransition") @@ -349,6 +353,7 @@ func (m *_S7ParameterModeTransition) SerializeWithWriteBuffer(ctx context.Contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_S7ParameterModeTransition) isS7ParameterModeTransition() bool { return true } @@ -363,3 +368,6 @@ func (m *_S7ParameterModeTransition) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7ParameterReadVarRequest.go b/plc4go/protocols/s7/readwrite/model/S7ParameterReadVarRequest.go index c8b1d2801e2..3472aae9bf4 100644 --- a/plc4go/protocols/s7/readwrite/model/S7ParameterReadVarRequest.go +++ b/plc4go/protocols/s7/readwrite/model/S7ParameterReadVarRequest.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7ParameterReadVarRequest is the corresponding interface of S7ParameterReadVarRequest type S7ParameterReadVarRequest interface { @@ -47,33 +49,32 @@ type S7ParameterReadVarRequestExactly interface { // _S7ParameterReadVarRequest is the data-structure of this message type _S7ParameterReadVarRequest struct { *_S7Parameter - Items []S7VarRequestParameterItem + Items []S7VarRequestParameterItem } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_S7ParameterReadVarRequest) GetParameterType() uint8 { - return 0x04 -} +func (m *_S7ParameterReadVarRequest) GetParameterType() uint8 { +return 0x04} -func (m *_S7ParameterReadVarRequest) GetMessageType() uint8 { - return 0x01 -} +func (m *_S7ParameterReadVarRequest) GetMessageType() uint8 { +return 0x01} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_S7ParameterReadVarRequest) InitializeParent(parent S7Parameter) {} +func (m *_S7ParameterReadVarRequest) InitializeParent(parent S7Parameter ) {} -func (m *_S7ParameterReadVarRequest) GetParent() S7Parameter { +func (m *_S7ParameterReadVarRequest) GetParent() S7Parameter { return m._S7Parameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -88,11 +89,12 @@ func (m *_S7ParameterReadVarRequest) GetItems() []S7VarRequestParameterItem { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewS7ParameterReadVarRequest factory function for _S7ParameterReadVarRequest -func NewS7ParameterReadVarRequest(items []S7VarRequestParameterItem) *_S7ParameterReadVarRequest { +func NewS7ParameterReadVarRequest( items []S7VarRequestParameterItem ) *_S7ParameterReadVarRequest { _result := &_S7ParameterReadVarRequest{ - Items: items, - _S7Parameter: NewS7Parameter(), + Items: items, + _S7Parameter: NewS7Parameter(), } _result._S7Parameter._S7ParameterChildRequirements = _result return _result @@ -100,7 +102,7 @@ func NewS7ParameterReadVarRequest(items []S7VarRequestParameterItem) *_S7Paramet // Deprecated: use the interface for direct cast func CastS7ParameterReadVarRequest(structType interface{}) S7ParameterReadVarRequest { - if casted, ok := structType.(S7ParameterReadVarRequest); ok { + if casted, ok := structType.(S7ParameterReadVarRequest); ok { return casted } if casted, ok := structType.(*S7ParameterReadVarRequest); ok { @@ -125,13 +127,14 @@ func (m *_S7ParameterReadVarRequest) GetLengthInBits(ctx context.Context) uint16 arrayCtx := spiContext.CreateArrayContext(ctx, len(m.Items), _curItem) _ = arrayCtx _ = _curItem - lengthInBits += element.(interface{ GetLengthInBits(context.Context) uint16 }).GetLengthInBits(arrayCtx) + lengthInBits += element.(interface{GetLengthInBits(context.Context) uint16}).GetLengthInBits(arrayCtx) } } return lengthInBits } + func (m *_S7ParameterReadVarRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -172,7 +175,7 @@ func S7ParameterReadVarRequestParseWithBuffer(ctx context.Context, readBuffer ut arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := S7VarRequestParameterItemParseWithBuffer(arrayCtx, readBuffer) +_item, _err := S7VarRequestParameterItemParseWithBuffer(arrayCtx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'items' field of S7ParameterReadVarRequest") } @@ -189,8 +192,9 @@ func S7ParameterReadVarRequestParseWithBuffer(ctx context.Context, readBuffer ut // Create a partially initialized instance _child := &_S7ParameterReadVarRequest{ - _S7Parameter: &_S7Parameter{}, - Items: items, + _S7Parameter: &_S7Parameter{ + }, + Items: items, } _child._S7Parameter._S7ParameterChildRequirements = _child return _child, nil @@ -212,29 +216,29 @@ func (m *_S7ParameterReadVarRequest) SerializeWithWriteBuffer(ctx context.Contex return errors.Wrap(pushErr, "Error pushing for S7ParameterReadVarRequest") } - // Implicit Field (numItems) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - numItems := uint8(uint8(len(m.GetItems()))) - _numItemsErr := writeBuffer.WriteUint8("numItems", 8, (numItems)) - if _numItemsErr != nil { - return errors.Wrap(_numItemsErr, "Error serializing 'numItems' field") - } + // Implicit Field (numItems) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) + numItems := uint8(uint8(len(m.GetItems()))) + _numItemsErr := writeBuffer.WriteUint8("numItems", 8, (numItems)) + if _numItemsErr != nil { + return errors.Wrap(_numItemsErr, "Error serializing 'numItems' field") + } - // Array Field (items) - if pushErr := writeBuffer.PushContext("items", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for items") - } - for _curItem, _element := range m.GetItems() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetItems()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'items' field") - } - } - if popErr := writeBuffer.PopContext("items", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for items") + // Array Field (items) + if pushErr := writeBuffer.PushContext("items", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for items") + } + for _curItem, _element := range m.GetItems() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetItems()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'items' field") } + } + if popErr := writeBuffer.PopContext("items", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for items") + } if popErr := writeBuffer.PopContext("S7ParameterReadVarRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for S7ParameterReadVarRequest") @@ -244,6 +248,7 @@ func (m *_S7ParameterReadVarRequest) SerializeWithWriteBuffer(ctx context.Contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_S7ParameterReadVarRequest) isS7ParameterReadVarRequest() bool { return true } @@ -258,3 +263,6 @@ func (m *_S7ParameterReadVarRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7ParameterReadVarResponse.go b/plc4go/protocols/s7/readwrite/model/S7ParameterReadVarResponse.go index 87cb70cd408..c07c4b005c1 100644 --- a/plc4go/protocols/s7/readwrite/model/S7ParameterReadVarResponse.go +++ b/plc4go/protocols/s7/readwrite/model/S7ParameterReadVarResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7ParameterReadVarResponse is the corresponding interface of S7ParameterReadVarResponse type S7ParameterReadVarResponse interface { @@ -46,33 +48,32 @@ type S7ParameterReadVarResponseExactly interface { // _S7ParameterReadVarResponse is the data-structure of this message type _S7ParameterReadVarResponse struct { *_S7Parameter - NumItems uint8 + NumItems uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_S7ParameterReadVarResponse) GetParameterType() uint8 { - return 0x04 -} +func (m *_S7ParameterReadVarResponse) GetParameterType() uint8 { +return 0x04} -func (m *_S7ParameterReadVarResponse) GetMessageType() uint8 { - return 0x03 -} +func (m *_S7ParameterReadVarResponse) GetMessageType() uint8 { +return 0x03} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_S7ParameterReadVarResponse) InitializeParent(parent S7Parameter) {} +func (m *_S7ParameterReadVarResponse) InitializeParent(parent S7Parameter ) {} -func (m *_S7ParameterReadVarResponse) GetParent() S7Parameter { +func (m *_S7ParameterReadVarResponse) GetParent() S7Parameter { return m._S7Parameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -87,11 +88,12 @@ func (m *_S7ParameterReadVarResponse) GetNumItems() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewS7ParameterReadVarResponse factory function for _S7ParameterReadVarResponse -func NewS7ParameterReadVarResponse(numItems uint8) *_S7ParameterReadVarResponse { +func NewS7ParameterReadVarResponse( numItems uint8 ) *_S7ParameterReadVarResponse { _result := &_S7ParameterReadVarResponse{ - NumItems: numItems, - _S7Parameter: NewS7Parameter(), + NumItems: numItems, + _S7Parameter: NewS7Parameter(), } _result._S7Parameter._S7ParameterChildRequirements = _result return _result @@ -99,7 +101,7 @@ func NewS7ParameterReadVarResponse(numItems uint8) *_S7ParameterReadVarResponse // Deprecated: use the interface for direct cast func CastS7ParameterReadVarResponse(structType interface{}) S7ParameterReadVarResponse { - if casted, ok := structType.(S7ParameterReadVarResponse); ok { + if casted, ok := structType.(S7ParameterReadVarResponse); ok { return casted } if casted, ok := structType.(*S7ParameterReadVarResponse); ok { @@ -116,11 +118,12 @@ func (m *_S7ParameterReadVarResponse) GetLengthInBits(ctx context.Context) uint1 lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (numItems) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_S7ParameterReadVarResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +142,7 @@ func S7ParameterReadVarResponseParseWithBuffer(ctx context.Context, readBuffer u _ = currentPos // Simple Field (numItems) - _numItems, _numItemsErr := readBuffer.ReadUint8("numItems", 8) +_numItems, _numItemsErr := readBuffer.ReadUint8("numItems", 8) if _numItemsErr != nil { return nil, errors.Wrap(_numItemsErr, "Error parsing 'numItems' field of S7ParameterReadVarResponse") } @@ -151,8 +154,9 @@ func S7ParameterReadVarResponseParseWithBuffer(ctx context.Context, readBuffer u // Create a partially initialized instance _child := &_S7ParameterReadVarResponse{ - _S7Parameter: &_S7Parameter{}, - NumItems: numItems, + _S7Parameter: &_S7Parameter{ + }, + NumItems: numItems, } _child._S7Parameter._S7ParameterChildRequirements = _child return _child, nil @@ -174,12 +178,12 @@ func (m *_S7ParameterReadVarResponse) SerializeWithWriteBuffer(ctx context.Conte return errors.Wrap(pushErr, "Error pushing for S7ParameterReadVarResponse") } - // Simple Field (numItems) - numItems := uint8(m.GetNumItems()) - _numItemsErr := writeBuffer.WriteUint8("numItems", 8, (numItems)) - if _numItemsErr != nil { - return errors.Wrap(_numItemsErr, "Error serializing 'numItems' field") - } + // Simple Field (numItems) + numItems := uint8(m.GetNumItems()) + _numItemsErr := writeBuffer.WriteUint8("numItems", 8, (numItems)) + if _numItemsErr != nil { + return errors.Wrap(_numItemsErr, "Error serializing 'numItems' field") + } if popErr := writeBuffer.PopContext("S7ParameterReadVarResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for S7ParameterReadVarResponse") @@ -189,6 +193,7 @@ func (m *_S7ParameterReadVarResponse) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_S7ParameterReadVarResponse) isS7ParameterReadVarResponse() bool { return true } @@ -203,3 +208,6 @@ func (m *_S7ParameterReadVarResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7ParameterSetupCommunication.go b/plc4go/protocols/s7/readwrite/model/S7ParameterSetupCommunication.go index 45f564c125b..31628401ce2 100644 --- a/plc4go/protocols/s7/readwrite/model/S7ParameterSetupCommunication.go +++ b/plc4go/protocols/s7/readwrite/model/S7ParameterSetupCommunication.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7ParameterSetupCommunication is the corresponding interface of S7ParameterSetupCommunication type S7ParameterSetupCommunication interface { @@ -50,37 +52,36 @@ type S7ParameterSetupCommunicationExactly interface { // _S7ParameterSetupCommunication is the data-structure of this message type _S7ParameterSetupCommunication struct { *_S7Parameter - MaxAmqCaller uint16 - MaxAmqCallee uint16 - PduLength uint16 + MaxAmqCaller uint16 + MaxAmqCallee uint16 + PduLength uint16 // Reserved Fields reservedField0 *uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_S7ParameterSetupCommunication) GetParameterType() uint8 { - return 0xF0 -} +func (m *_S7ParameterSetupCommunication) GetParameterType() uint8 { +return 0xF0} -func (m *_S7ParameterSetupCommunication) GetMessageType() uint8 { - return 0 -} +func (m *_S7ParameterSetupCommunication) GetMessageType() uint8 { +return 0} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_S7ParameterSetupCommunication) InitializeParent(parent S7Parameter) {} +func (m *_S7ParameterSetupCommunication) InitializeParent(parent S7Parameter ) {} -func (m *_S7ParameterSetupCommunication) GetParent() S7Parameter { +func (m *_S7ParameterSetupCommunication) GetParent() S7Parameter { return m._S7Parameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -103,13 +104,14 @@ func (m *_S7ParameterSetupCommunication) GetPduLength() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewS7ParameterSetupCommunication factory function for _S7ParameterSetupCommunication -func NewS7ParameterSetupCommunication(maxAmqCaller uint16, maxAmqCallee uint16, pduLength uint16) *_S7ParameterSetupCommunication { +func NewS7ParameterSetupCommunication( maxAmqCaller uint16 , maxAmqCallee uint16 , pduLength uint16 ) *_S7ParameterSetupCommunication { _result := &_S7ParameterSetupCommunication{ MaxAmqCaller: maxAmqCaller, MaxAmqCallee: maxAmqCallee, - PduLength: pduLength, - _S7Parameter: NewS7Parameter(), + PduLength: pduLength, + _S7Parameter: NewS7Parameter(), } _result._S7Parameter._S7ParameterChildRequirements = _result return _result @@ -117,7 +119,7 @@ func NewS7ParameterSetupCommunication(maxAmqCaller uint16, maxAmqCallee uint16, // Deprecated: use the interface for direct cast func CastS7ParameterSetupCommunication(structType interface{}) S7ParameterSetupCommunication { - if casted, ok := structType.(S7ParameterSetupCommunication); ok { + if casted, ok := structType.(S7ParameterSetupCommunication); ok { return casted } if casted, ok := structType.(*S7ParameterSetupCommunication); ok { @@ -137,17 +139,18 @@ func (m *_S7ParameterSetupCommunication) GetLengthInBits(ctx context.Context) ui lengthInBits += 8 // Simple field (maxAmqCaller) - lengthInBits += 16 + lengthInBits += 16; // Simple field (maxAmqCallee) - lengthInBits += 16 + lengthInBits += 16; // Simple field (pduLength) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_S7ParameterSetupCommunication) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -175,7 +178,7 @@ func S7ParameterSetupCommunicationParseWithBuffer(ctx context.Context, readBuffe if reserved != uint8(0x00) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -183,21 +186,21 @@ func S7ParameterSetupCommunicationParseWithBuffer(ctx context.Context, readBuffe } // Simple Field (maxAmqCaller) - _maxAmqCaller, _maxAmqCallerErr := readBuffer.ReadUint16("maxAmqCaller", 16) +_maxAmqCaller, _maxAmqCallerErr := readBuffer.ReadUint16("maxAmqCaller", 16) if _maxAmqCallerErr != nil { return nil, errors.Wrap(_maxAmqCallerErr, "Error parsing 'maxAmqCaller' field of S7ParameterSetupCommunication") } maxAmqCaller := _maxAmqCaller // Simple Field (maxAmqCallee) - _maxAmqCallee, _maxAmqCalleeErr := readBuffer.ReadUint16("maxAmqCallee", 16) +_maxAmqCallee, _maxAmqCalleeErr := readBuffer.ReadUint16("maxAmqCallee", 16) if _maxAmqCalleeErr != nil { return nil, errors.Wrap(_maxAmqCalleeErr, "Error parsing 'maxAmqCallee' field of S7ParameterSetupCommunication") } maxAmqCallee := _maxAmqCallee // Simple Field (pduLength) - _pduLength, _pduLengthErr := readBuffer.ReadUint16("pduLength", 16) +_pduLength, _pduLengthErr := readBuffer.ReadUint16("pduLength", 16) if _pduLengthErr != nil { return nil, errors.Wrap(_pduLengthErr, "Error parsing 'pduLength' field of S7ParameterSetupCommunication") } @@ -209,10 +212,11 @@ func S7ParameterSetupCommunicationParseWithBuffer(ctx context.Context, readBuffe // Create a partially initialized instance _child := &_S7ParameterSetupCommunication{ - _S7Parameter: &_S7Parameter{}, - MaxAmqCaller: maxAmqCaller, - MaxAmqCallee: maxAmqCallee, - PduLength: pduLength, + _S7Parameter: &_S7Parameter{ + }, + MaxAmqCaller: maxAmqCaller, + MaxAmqCallee: maxAmqCallee, + PduLength: pduLength, reservedField0: reservedField0, } _child._S7Parameter._S7ParameterChildRequirements = _child @@ -235,42 +239,42 @@ func (m *_S7ParameterSetupCommunication) SerializeWithWriteBuffer(ctx context.Co return errors.Wrap(pushErr, "Error pushing for S7ParameterSetupCommunication") } - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0x00) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0x00), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteUint8("reserved", 8, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0x00) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0x00), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 } - - // Simple Field (maxAmqCaller) - maxAmqCaller := uint16(m.GetMaxAmqCaller()) - _maxAmqCallerErr := writeBuffer.WriteUint16("maxAmqCaller", 16, (maxAmqCaller)) - if _maxAmqCallerErr != nil { - return errors.Wrap(_maxAmqCallerErr, "Error serializing 'maxAmqCaller' field") + _err := writeBuffer.WriteUint8("reserved", 8, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } - // Simple Field (maxAmqCallee) - maxAmqCallee := uint16(m.GetMaxAmqCallee()) - _maxAmqCalleeErr := writeBuffer.WriteUint16("maxAmqCallee", 16, (maxAmqCallee)) - if _maxAmqCalleeErr != nil { - return errors.Wrap(_maxAmqCalleeErr, "Error serializing 'maxAmqCallee' field") - } + // Simple Field (maxAmqCaller) + maxAmqCaller := uint16(m.GetMaxAmqCaller()) + _maxAmqCallerErr := writeBuffer.WriteUint16("maxAmqCaller", 16, (maxAmqCaller)) + if _maxAmqCallerErr != nil { + return errors.Wrap(_maxAmqCallerErr, "Error serializing 'maxAmqCaller' field") + } - // Simple Field (pduLength) - pduLength := uint16(m.GetPduLength()) - _pduLengthErr := writeBuffer.WriteUint16("pduLength", 16, (pduLength)) - if _pduLengthErr != nil { - return errors.Wrap(_pduLengthErr, "Error serializing 'pduLength' field") - } + // Simple Field (maxAmqCallee) + maxAmqCallee := uint16(m.GetMaxAmqCallee()) + _maxAmqCalleeErr := writeBuffer.WriteUint16("maxAmqCallee", 16, (maxAmqCallee)) + if _maxAmqCalleeErr != nil { + return errors.Wrap(_maxAmqCalleeErr, "Error serializing 'maxAmqCallee' field") + } + + // Simple Field (pduLength) + pduLength := uint16(m.GetPduLength()) + _pduLengthErr := writeBuffer.WriteUint16("pduLength", 16, (pduLength)) + if _pduLengthErr != nil { + return errors.Wrap(_pduLengthErr, "Error serializing 'pduLength' field") + } if popErr := writeBuffer.PopContext("S7ParameterSetupCommunication"); popErr != nil { return errors.Wrap(popErr, "Error popping for S7ParameterSetupCommunication") @@ -280,6 +284,7 @@ func (m *_S7ParameterSetupCommunication) SerializeWithWriteBuffer(ctx context.Co return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_S7ParameterSetupCommunication) isS7ParameterSetupCommunication() bool { return true } @@ -294,3 +299,6 @@ func (m *_S7ParameterSetupCommunication) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7ParameterUserData.go b/plc4go/protocols/s7/readwrite/model/S7ParameterUserData.go index e6bbf14232a..800bd13b739 100644 --- a/plc4go/protocols/s7/readwrite/model/S7ParameterUserData.go +++ b/plc4go/protocols/s7/readwrite/model/S7ParameterUserData.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7ParameterUserData is the corresponding interface of S7ParameterUserData type S7ParameterUserData interface { @@ -47,33 +49,32 @@ type S7ParameterUserDataExactly interface { // _S7ParameterUserData is the data-structure of this message type _S7ParameterUserData struct { *_S7Parameter - Items []S7ParameterUserDataItem + Items []S7ParameterUserDataItem } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_S7ParameterUserData) GetParameterType() uint8 { - return 0x00 -} +func (m *_S7ParameterUserData) GetParameterType() uint8 { +return 0x00} -func (m *_S7ParameterUserData) GetMessageType() uint8 { - return 0x07 -} +func (m *_S7ParameterUserData) GetMessageType() uint8 { +return 0x07} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_S7ParameterUserData) InitializeParent(parent S7Parameter) {} +func (m *_S7ParameterUserData) InitializeParent(parent S7Parameter ) {} -func (m *_S7ParameterUserData) GetParent() S7Parameter { +func (m *_S7ParameterUserData) GetParent() S7Parameter { return m._S7Parameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -88,11 +89,12 @@ func (m *_S7ParameterUserData) GetItems() []S7ParameterUserDataItem { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewS7ParameterUserData factory function for _S7ParameterUserData -func NewS7ParameterUserData(items []S7ParameterUserDataItem) *_S7ParameterUserData { +func NewS7ParameterUserData( items []S7ParameterUserDataItem ) *_S7ParameterUserData { _result := &_S7ParameterUserData{ - Items: items, - _S7Parameter: NewS7Parameter(), + Items: items, + _S7Parameter: NewS7Parameter(), } _result._S7Parameter._S7ParameterChildRequirements = _result return _result @@ -100,7 +102,7 @@ func NewS7ParameterUserData(items []S7ParameterUserDataItem) *_S7ParameterUserDa // Deprecated: use the interface for direct cast func CastS7ParameterUserData(structType interface{}) S7ParameterUserData { - if casted, ok := structType.(S7ParameterUserData); ok { + if casted, ok := structType.(S7ParameterUserData); ok { return casted } if casted, ok := structType.(*S7ParameterUserData); ok { @@ -125,13 +127,14 @@ func (m *_S7ParameterUserData) GetLengthInBits(ctx context.Context) uint16 { arrayCtx := spiContext.CreateArrayContext(ctx, len(m.Items), _curItem) _ = arrayCtx _ = _curItem - lengthInBits += element.(interface{ GetLengthInBits(context.Context) uint16 }).GetLengthInBits(arrayCtx) + lengthInBits += element.(interface{GetLengthInBits(context.Context) uint16}).GetLengthInBits(arrayCtx) } } return lengthInBits } + func (m *_S7ParameterUserData) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -172,7 +175,7 @@ func S7ParameterUserDataParseWithBuffer(ctx context.Context, readBuffer utils.Re arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := S7ParameterUserDataItemParseWithBuffer(arrayCtx, readBuffer) +_item, _err := S7ParameterUserDataItemParseWithBuffer(arrayCtx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'items' field of S7ParameterUserData") } @@ -189,8 +192,9 @@ func S7ParameterUserDataParseWithBuffer(ctx context.Context, readBuffer utils.Re // Create a partially initialized instance _child := &_S7ParameterUserData{ - _S7Parameter: &_S7Parameter{}, - Items: items, + _S7Parameter: &_S7Parameter{ + }, + Items: items, } _child._S7Parameter._S7ParameterChildRequirements = _child return _child, nil @@ -212,29 +216,29 @@ func (m *_S7ParameterUserData) SerializeWithWriteBuffer(ctx context.Context, wri return errors.Wrap(pushErr, "Error pushing for S7ParameterUserData") } - // Implicit Field (numItems) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - numItems := uint8(uint8(len(m.GetItems()))) - _numItemsErr := writeBuffer.WriteUint8("numItems", 8, (numItems)) - if _numItemsErr != nil { - return errors.Wrap(_numItemsErr, "Error serializing 'numItems' field") - } + // Implicit Field (numItems) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) + numItems := uint8(uint8(len(m.GetItems()))) + _numItemsErr := writeBuffer.WriteUint8("numItems", 8, (numItems)) + if _numItemsErr != nil { + return errors.Wrap(_numItemsErr, "Error serializing 'numItems' field") + } - // Array Field (items) - if pushErr := writeBuffer.PushContext("items", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for items") - } - for _curItem, _element := range m.GetItems() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetItems()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'items' field") - } - } - if popErr := writeBuffer.PopContext("items", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for items") + // Array Field (items) + if pushErr := writeBuffer.PushContext("items", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for items") + } + for _curItem, _element := range m.GetItems() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetItems()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'items' field") } + } + if popErr := writeBuffer.PopContext("items", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for items") + } if popErr := writeBuffer.PopContext("S7ParameterUserData"); popErr != nil { return errors.Wrap(popErr, "Error popping for S7ParameterUserData") @@ -244,6 +248,7 @@ func (m *_S7ParameterUserData) SerializeWithWriteBuffer(ctx context.Context, wri return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_S7ParameterUserData) isS7ParameterUserData() bool { return true } @@ -258,3 +263,6 @@ func (m *_S7ParameterUserData) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7ParameterUserDataItem.go b/plc4go/protocols/s7/readwrite/model/S7ParameterUserDataItem.go index c46fd7dd0a7..045e0af441c 100644 --- a/plc4go/protocols/s7/readwrite/model/S7ParameterUserDataItem.go +++ b/plc4go/protocols/s7/readwrite/model/S7ParameterUserDataItem.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7ParameterUserDataItem is the corresponding interface of S7ParameterUserDataItem type S7ParameterUserDataItem interface { @@ -53,6 +55,7 @@ type _S7ParameterUserDataItemChildRequirements interface { GetItemType() uint8 } + type S7ParameterUserDataItemParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child S7ParameterUserDataItem, serializeChildFunction func() error) error GetTypeName() string @@ -60,21 +63,22 @@ type S7ParameterUserDataItemParent interface { type S7ParameterUserDataItemChild interface { utils.Serializable - InitializeParent(parent S7ParameterUserDataItem) +InitializeParent(parent S7ParameterUserDataItem ) GetParent() *S7ParameterUserDataItem GetTypeName() string S7ParameterUserDataItem } + // NewS7ParameterUserDataItem factory function for _S7ParameterUserDataItem -func NewS7ParameterUserDataItem() *_S7ParameterUserDataItem { - return &_S7ParameterUserDataItem{} +func NewS7ParameterUserDataItem( ) *_S7ParameterUserDataItem { +return &_S7ParameterUserDataItem{ } } // Deprecated: use the interface for direct cast func CastS7ParameterUserDataItem(structType interface{}) S7ParameterUserDataItem { - if casted, ok := structType.(S7ParameterUserDataItem); ok { + if casted, ok := structType.(S7ParameterUserDataItem); ok { return casted } if casted, ok := structType.(*S7ParameterUserDataItem); ok { @@ -87,10 +91,11 @@ func (m *_S7ParameterUserDataItem) GetTypeName() string { return "S7ParameterUserDataItem" } + func (m *_S7ParameterUserDataItem) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Discriminator Field (itemType) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } @@ -121,15 +126,15 @@ func S7ParameterUserDataItemParseWithBuffer(ctx context.Context, readBuffer util // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type S7ParameterUserDataItemChildSerializeRequirement interface { S7ParameterUserDataItem - InitializeParent(S7ParameterUserDataItem) + InitializeParent(S7ParameterUserDataItem ) GetParent() S7ParameterUserDataItem } var _childTemp interface{} var _child S7ParameterUserDataItemChildSerializeRequirement var typeSwitchError error switch { - case itemType == 0x12: // S7ParameterUserDataItemCPUFunctions - _childTemp, typeSwitchError = S7ParameterUserDataItemCPUFunctionsParseWithBuffer(ctx, readBuffer) +case itemType == 0x12 : // S7ParameterUserDataItemCPUFunctions + _childTemp, typeSwitchError = S7ParameterUserDataItemCPUFunctionsParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [itemType=%v]", itemType) } @@ -143,7 +148,7 @@ func S7ParameterUserDataItemParseWithBuffer(ctx context.Context, readBuffer util } // Finish initializing - _child.InitializeParent(_child) +_child.InitializeParent(_child ) return _child, nil } @@ -153,7 +158,7 @@ func (pm *_S7ParameterUserDataItem) SerializeParent(ctx context.Context, writeBu _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("S7ParameterUserDataItem"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("S7ParameterUserDataItem"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for S7ParameterUserDataItem") } @@ -176,6 +181,7 @@ func (pm *_S7ParameterUserDataItem) SerializeParent(ctx context.Context, writeBu return nil } + func (m *_S7ParameterUserDataItem) isS7ParameterUserDataItem() bool { return true } @@ -190,3 +196,6 @@ func (m *_S7ParameterUserDataItem) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7ParameterUserDataItemCPUFunctions.go b/plc4go/protocols/s7/readwrite/model/S7ParameterUserDataItemCPUFunctions.go index 91e81434e4b..943873f5a27 100644 --- a/plc4go/protocols/s7/readwrite/model/S7ParameterUserDataItemCPUFunctions.go +++ b/plc4go/protocols/s7/readwrite/model/S7ParameterUserDataItemCPUFunctions.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7ParameterUserDataItemCPUFunctions is the corresponding interface of S7ParameterUserDataItemCPUFunctions type S7ParameterUserDataItemCPUFunctions interface { @@ -60,36 +62,36 @@ type S7ParameterUserDataItemCPUFunctionsExactly interface { // _S7ParameterUserDataItemCPUFunctions is the data-structure of this message type _S7ParameterUserDataItemCPUFunctions struct { *_S7ParameterUserDataItem - Method uint8 - CpuFunctionType uint8 - CpuFunctionGroup uint8 - CpuSubfunction uint8 - SequenceNumber uint8 - DataUnitReferenceNumber *uint8 - LastDataUnit *uint8 - ErrorCode *uint16 + Method uint8 + CpuFunctionType uint8 + CpuFunctionGroup uint8 + CpuSubfunction uint8 + SequenceNumber uint8 + DataUnitReferenceNumber *uint8 + LastDataUnit *uint8 + ErrorCode *uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_S7ParameterUserDataItemCPUFunctions) GetItemType() uint8 { - return 0x12 -} +func (m *_S7ParameterUserDataItemCPUFunctions) GetItemType() uint8 { +return 0x12} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_S7ParameterUserDataItemCPUFunctions) InitializeParent(parent S7ParameterUserDataItem) {} +func (m *_S7ParameterUserDataItemCPUFunctions) InitializeParent(parent S7ParameterUserDataItem ) {} -func (m *_S7ParameterUserDataItemCPUFunctions) GetParent() S7ParameterUserDataItem { +func (m *_S7ParameterUserDataItemCPUFunctions) GetParent() S7ParameterUserDataItem { return m._S7ParameterUserDataItem } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -132,18 +134,19 @@ func (m *_S7ParameterUserDataItemCPUFunctions) GetErrorCode() *uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewS7ParameterUserDataItemCPUFunctions factory function for _S7ParameterUserDataItemCPUFunctions -func NewS7ParameterUserDataItemCPUFunctions(method uint8, cpuFunctionType uint8, cpuFunctionGroup uint8, cpuSubfunction uint8, sequenceNumber uint8, dataUnitReferenceNumber *uint8, lastDataUnit *uint8, errorCode *uint16) *_S7ParameterUserDataItemCPUFunctions { +func NewS7ParameterUserDataItemCPUFunctions( method uint8 , cpuFunctionType uint8 , cpuFunctionGroup uint8 , cpuSubfunction uint8 , sequenceNumber uint8 , dataUnitReferenceNumber *uint8 , lastDataUnit *uint8 , errorCode *uint16 ) *_S7ParameterUserDataItemCPUFunctions { _result := &_S7ParameterUserDataItemCPUFunctions{ - Method: method, - CpuFunctionType: cpuFunctionType, - CpuFunctionGroup: cpuFunctionGroup, - CpuSubfunction: cpuSubfunction, - SequenceNumber: sequenceNumber, - DataUnitReferenceNumber: dataUnitReferenceNumber, - LastDataUnit: lastDataUnit, - ErrorCode: errorCode, - _S7ParameterUserDataItem: NewS7ParameterUserDataItem(), + Method: method, + CpuFunctionType: cpuFunctionType, + CpuFunctionGroup: cpuFunctionGroup, + CpuSubfunction: cpuSubfunction, + SequenceNumber: sequenceNumber, + DataUnitReferenceNumber: dataUnitReferenceNumber, + LastDataUnit: lastDataUnit, + ErrorCode: errorCode, + _S7ParameterUserDataItem: NewS7ParameterUserDataItem(), } _result._S7ParameterUserDataItem._S7ParameterUserDataItemChildRequirements = _result return _result @@ -151,7 +154,7 @@ func NewS7ParameterUserDataItemCPUFunctions(method uint8, cpuFunctionType uint8, // Deprecated: use the interface for direct cast func CastS7ParameterUserDataItemCPUFunctions(structType interface{}) S7ParameterUserDataItemCPUFunctions { - if casted, ok := structType.(S7ParameterUserDataItemCPUFunctions); ok { + if casted, ok := structType.(S7ParameterUserDataItemCPUFunctions); ok { return casted } if casted, ok := structType.(*S7ParameterUserDataItemCPUFunctions); ok { @@ -171,19 +174,19 @@ func (m *_S7ParameterUserDataItemCPUFunctions) GetLengthInBits(ctx context.Conte lengthInBits += 8 // Simple field (method) - lengthInBits += 8 + lengthInBits += 8; // Simple field (cpuFunctionType) - lengthInBits += 4 + lengthInBits += 4; // Simple field (cpuFunctionGroup) - lengthInBits += 4 + lengthInBits += 4; // Simple field (cpuSubfunction) - lengthInBits += 8 + lengthInBits += 8; // Simple field (sequenceNumber) - lengthInBits += 8 + lengthInBits += 8; // Optional Field (dataUnitReferenceNumber) if m.DataUnitReferenceNumber != nil { @@ -203,6 +206,7 @@ func (m *_S7ParameterUserDataItemCPUFunctions) GetLengthInBits(ctx context.Conte return lengthInBits } + func (m *_S7ParameterUserDataItemCPUFunctions) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -228,35 +232,35 @@ func S7ParameterUserDataItemCPUFunctionsParseWithBuffer(ctx context.Context, rea } // Simple Field (method) - _method, _methodErr := readBuffer.ReadUint8("method", 8) +_method, _methodErr := readBuffer.ReadUint8("method", 8) if _methodErr != nil { return nil, errors.Wrap(_methodErr, "Error parsing 'method' field of S7ParameterUserDataItemCPUFunctions") } method := _method // Simple Field (cpuFunctionType) - _cpuFunctionType, _cpuFunctionTypeErr := readBuffer.ReadUint8("cpuFunctionType", 4) +_cpuFunctionType, _cpuFunctionTypeErr := readBuffer.ReadUint8("cpuFunctionType", 4) if _cpuFunctionTypeErr != nil { return nil, errors.Wrap(_cpuFunctionTypeErr, "Error parsing 'cpuFunctionType' field of S7ParameterUserDataItemCPUFunctions") } cpuFunctionType := _cpuFunctionType // Simple Field (cpuFunctionGroup) - _cpuFunctionGroup, _cpuFunctionGroupErr := readBuffer.ReadUint8("cpuFunctionGroup", 4) +_cpuFunctionGroup, _cpuFunctionGroupErr := readBuffer.ReadUint8("cpuFunctionGroup", 4) if _cpuFunctionGroupErr != nil { return nil, errors.Wrap(_cpuFunctionGroupErr, "Error parsing 'cpuFunctionGroup' field of S7ParameterUserDataItemCPUFunctions") } cpuFunctionGroup := _cpuFunctionGroup // Simple Field (cpuSubfunction) - _cpuSubfunction, _cpuSubfunctionErr := readBuffer.ReadUint8("cpuSubfunction", 8) +_cpuSubfunction, _cpuSubfunctionErr := readBuffer.ReadUint8("cpuSubfunction", 8) if _cpuSubfunctionErr != nil { return nil, errors.Wrap(_cpuSubfunctionErr, "Error parsing 'cpuSubfunction' field of S7ParameterUserDataItemCPUFunctions") } cpuSubfunction := _cpuSubfunction // Simple Field (sequenceNumber) - _sequenceNumber, _sequenceNumberErr := readBuffer.ReadUint8("sequenceNumber", 8) +_sequenceNumber, _sequenceNumberErr := readBuffer.ReadUint8("sequenceNumber", 8) if _sequenceNumberErr != nil { return nil, errors.Wrap(_sequenceNumberErr, "Error parsing 'sequenceNumber' field of S7ParameterUserDataItemCPUFunctions") } @@ -264,7 +268,7 @@ func S7ParameterUserDataItemCPUFunctionsParseWithBuffer(ctx context.Context, rea // Optional Field (dataUnitReferenceNumber) (Can be skipped, if a given expression evaluates to false) var dataUnitReferenceNumber *uint8 = nil - if bool((cpuFunctionType) == (8)) { + if bool((cpuFunctionType) == ((8))) { _val, _err := readBuffer.ReadUint8("dataUnitReferenceNumber", 8) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'dataUnitReferenceNumber' field of S7ParameterUserDataItemCPUFunctions") @@ -274,7 +278,7 @@ func S7ParameterUserDataItemCPUFunctionsParseWithBuffer(ctx context.Context, rea // Optional Field (lastDataUnit) (Can be skipped, if a given expression evaluates to false) var lastDataUnit *uint8 = nil - if bool((cpuFunctionType) == (8)) { + if bool((cpuFunctionType) == ((8))) { _val, _err := readBuffer.ReadUint8("lastDataUnit", 8) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'lastDataUnit' field of S7ParameterUserDataItemCPUFunctions") @@ -284,7 +288,7 @@ func S7ParameterUserDataItemCPUFunctionsParseWithBuffer(ctx context.Context, rea // Optional Field (errorCode) (Can be skipped, if a given expression evaluates to false) var errorCode *uint16 = nil - if bool((cpuFunctionType) == (8)) { + if bool((cpuFunctionType) == ((8))) { _val, _err := readBuffer.ReadUint16("errorCode", 16) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'errorCode' field of S7ParameterUserDataItemCPUFunctions") @@ -298,15 +302,16 @@ func S7ParameterUserDataItemCPUFunctionsParseWithBuffer(ctx context.Context, rea // Create a partially initialized instance _child := &_S7ParameterUserDataItemCPUFunctions{ - _S7ParameterUserDataItem: &_S7ParameterUserDataItem{}, - Method: method, - CpuFunctionType: cpuFunctionType, - CpuFunctionGroup: cpuFunctionGroup, - CpuSubfunction: cpuSubfunction, - SequenceNumber: sequenceNumber, - DataUnitReferenceNumber: dataUnitReferenceNumber, - LastDataUnit: lastDataUnit, - ErrorCode: errorCode, + _S7ParameterUserDataItem: &_S7ParameterUserDataItem{ + }, + Method: method, + CpuFunctionType: cpuFunctionType, + CpuFunctionGroup: cpuFunctionGroup, + CpuSubfunction: cpuSubfunction, + SequenceNumber: sequenceNumber, + DataUnitReferenceNumber: dataUnitReferenceNumber, + LastDataUnit: lastDataUnit, + ErrorCode: errorCode, } _child._S7ParameterUserDataItem._S7ParameterUserDataItemChildRequirements = _child return _child, nil @@ -328,77 +333,77 @@ func (m *_S7ParameterUserDataItemCPUFunctions) SerializeWithWriteBuffer(ctx cont return errors.Wrap(pushErr, "Error pushing for S7ParameterUserDataItemCPUFunctions") } - // Implicit Field (itemLength) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - itemLength := uint8(uint8(uint8(m.GetLengthInBytes(ctx))) - uint8(uint8(2))) - _itemLengthErr := writeBuffer.WriteUint8("itemLength", 8, (itemLength)) - if _itemLengthErr != nil { - return errors.Wrap(_itemLengthErr, "Error serializing 'itemLength' field") - } + // Implicit Field (itemLength) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) + itemLength := uint8(uint8(uint8(m.GetLengthInBytes(ctx))) - uint8(uint8(2))) + _itemLengthErr := writeBuffer.WriteUint8("itemLength", 8, (itemLength)) + if _itemLengthErr != nil { + return errors.Wrap(_itemLengthErr, "Error serializing 'itemLength' field") + } - // Simple Field (method) - method := uint8(m.GetMethod()) - _methodErr := writeBuffer.WriteUint8("method", 8, (method)) - if _methodErr != nil { - return errors.Wrap(_methodErr, "Error serializing 'method' field") - } + // Simple Field (method) + method := uint8(m.GetMethod()) + _methodErr := writeBuffer.WriteUint8("method", 8, (method)) + if _methodErr != nil { + return errors.Wrap(_methodErr, "Error serializing 'method' field") + } - // Simple Field (cpuFunctionType) - cpuFunctionType := uint8(m.GetCpuFunctionType()) - _cpuFunctionTypeErr := writeBuffer.WriteUint8("cpuFunctionType", 4, (cpuFunctionType)) - if _cpuFunctionTypeErr != nil { - return errors.Wrap(_cpuFunctionTypeErr, "Error serializing 'cpuFunctionType' field") - } + // Simple Field (cpuFunctionType) + cpuFunctionType := uint8(m.GetCpuFunctionType()) + _cpuFunctionTypeErr := writeBuffer.WriteUint8("cpuFunctionType", 4, (cpuFunctionType)) + if _cpuFunctionTypeErr != nil { + return errors.Wrap(_cpuFunctionTypeErr, "Error serializing 'cpuFunctionType' field") + } - // Simple Field (cpuFunctionGroup) - cpuFunctionGroup := uint8(m.GetCpuFunctionGroup()) - _cpuFunctionGroupErr := writeBuffer.WriteUint8("cpuFunctionGroup", 4, (cpuFunctionGroup)) - if _cpuFunctionGroupErr != nil { - return errors.Wrap(_cpuFunctionGroupErr, "Error serializing 'cpuFunctionGroup' field") - } + // Simple Field (cpuFunctionGroup) + cpuFunctionGroup := uint8(m.GetCpuFunctionGroup()) + _cpuFunctionGroupErr := writeBuffer.WriteUint8("cpuFunctionGroup", 4, (cpuFunctionGroup)) + if _cpuFunctionGroupErr != nil { + return errors.Wrap(_cpuFunctionGroupErr, "Error serializing 'cpuFunctionGroup' field") + } - // Simple Field (cpuSubfunction) - cpuSubfunction := uint8(m.GetCpuSubfunction()) - _cpuSubfunctionErr := writeBuffer.WriteUint8("cpuSubfunction", 8, (cpuSubfunction)) - if _cpuSubfunctionErr != nil { - return errors.Wrap(_cpuSubfunctionErr, "Error serializing 'cpuSubfunction' field") - } + // Simple Field (cpuSubfunction) + cpuSubfunction := uint8(m.GetCpuSubfunction()) + _cpuSubfunctionErr := writeBuffer.WriteUint8("cpuSubfunction", 8, (cpuSubfunction)) + if _cpuSubfunctionErr != nil { + return errors.Wrap(_cpuSubfunctionErr, "Error serializing 'cpuSubfunction' field") + } - // Simple Field (sequenceNumber) - sequenceNumber := uint8(m.GetSequenceNumber()) - _sequenceNumberErr := writeBuffer.WriteUint8("sequenceNumber", 8, (sequenceNumber)) - if _sequenceNumberErr != nil { - return errors.Wrap(_sequenceNumberErr, "Error serializing 'sequenceNumber' field") - } + // Simple Field (sequenceNumber) + sequenceNumber := uint8(m.GetSequenceNumber()) + _sequenceNumberErr := writeBuffer.WriteUint8("sequenceNumber", 8, (sequenceNumber)) + if _sequenceNumberErr != nil { + return errors.Wrap(_sequenceNumberErr, "Error serializing 'sequenceNumber' field") + } - // Optional Field (dataUnitReferenceNumber) (Can be skipped, if the value is null) - var dataUnitReferenceNumber *uint8 = nil - if m.GetDataUnitReferenceNumber() != nil { - dataUnitReferenceNumber = m.GetDataUnitReferenceNumber() - _dataUnitReferenceNumberErr := writeBuffer.WriteUint8("dataUnitReferenceNumber", 8, *(dataUnitReferenceNumber)) - if _dataUnitReferenceNumberErr != nil { - return errors.Wrap(_dataUnitReferenceNumberErr, "Error serializing 'dataUnitReferenceNumber' field") - } + // Optional Field (dataUnitReferenceNumber) (Can be skipped, if the value is null) + var dataUnitReferenceNumber *uint8 = nil + if m.GetDataUnitReferenceNumber() != nil { + dataUnitReferenceNumber = m.GetDataUnitReferenceNumber() + _dataUnitReferenceNumberErr := writeBuffer.WriteUint8("dataUnitReferenceNumber", 8, *(dataUnitReferenceNumber)) + if _dataUnitReferenceNumberErr != nil { + return errors.Wrap(_dataUnitReferenceNumberErr, "Error serializing 'dataUnitReferenceNumber' field") } + } - // Optional Field (lastDataUnit) (Can be skipped, if the value is null) - var lastDataUnit *uint8 = nil - if m.GetLastDataUnit() != nil { - lastDataUnit = m.GetLastDataUnit() - _lastDataUnitErr := writeBuffer.WriteUint8("lastDataUnit", 8, *(lastDataUnit)) - if _lastDataUnitErr != nil { - return errors.Wrap(_lastDataUnitErr, "Error serializing 'lastDataUnit' field") - } + // Optional Field (lastDataUnit) (Can be skipped, if the value is null) + var lastDataUnit *uint8 = nil + if m.GetLastDataUnit() != nil { + lastDataUnit = m.GetLastDataUnit() + _lastDataUnitErr := writeBuffer.WriteUint8("lastDataUnit", 8, *(lastDataUnit)) + if _lastDataUnitErr != nil { + return errors.Wrap(_lastDataUnitErr, "Error serializing 'lastDataUnit' field") } + } - // Optional Field (errorCode) (Can be skipped, if the value is null) - var errorCode *uint16 = nil - if m.GetErrorCode() != nil { - errorCode = m.GetErrorCode() - _errorCodeErr := writeBuffer.WriteUint16("errorCode", 16, *(errorCode)) - if _errorCodeErr != nil { - return errors.Wrap(_errorCodeErr, "Error serializing 'errorCode' field") - } + // Optional Field (errorCode) (Can be skipped, if the value is null) + var errorCode *uint16 = nil + if m.GetErrorCode() != nil { + errorCode = m.GetErrorCode() + _errorCodeErr := writeBuffer.WriteUint16("errorCode", 16, *(errorCode)) + if _errorCodeErr != nil { + return errors.Wrap(_errorCodeErr, "Error serializing 'errorCode' field") } + } if popErr := writeBuffer.PopContext("S7ParameterUserDataItemCPUFunctions"); popErr != nil { return errors.Wrap(popErr, "Error popping for S7ParameterUserDataItemCPUFunctions") @@ -408,6 +413,7 @@ func (m *_S7ParameterUserDataItemCPUFunctions) SerializeWithWriteBuffer(ctx cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_S7ParameterUserDataItemCPUFunctions) isS7ParameterUserDataItemCPUFunctions() bool { return true } @@ -422,3 +428,6 @@ func (m *_S7ParameterUserDataItemCPUFunctions) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7ParameterWriteVarRequest.go b/plc4go/protocols/s7/readwrite/model/S7ParameterWriteVarRequest.go index a0b05bd13e1..ab06947bf5c 100644 --- a/plc4go/protocols/s7/readwrite/model/S7ParameterWriteVarRequest.go +++ b/plc4go/protocols/s7/readwrite/model/S7ParameterWriteVarRequest.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7ParameterWriteVarRequest is the corresponding interface of S7ParameterWriteVarRequest type S7ParameterWriteVarRequest interface { @@ -47,33 +49,32 @@ type S7ParameterWriteVarRequestExactly interface { // _S7ParameterWriteVarRequest is the data-structure of this message type _S7ParameterWriteVarRequest struct { *_S7Parameter - Items []S7VarRequestParameterItem + Items []S7VarRequestParameterItem } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_S7ParameterWriteVarRequest) GetParameterType() uint8 { - return 0x05 -} +func (m *_S7ParameterWriteVarRequest) GetParameterType() uint8 { +return 0x05} -func (m *_S7ParameterWriteVarRequest) GetMessageType() uint8 { - return 0x01 -} +func (m *_S7ParameterWriteVarRequest) GetMessageType() uint8 { +return 0x01} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_S7ParameterWriteVarRequest) InitializeParent(parent S7Parameter) {} +func (m *_S7ParameterWriteVarRequest) InitializeParent(parent S7Parameter ) {} -func (m *_S7ParameterWriteVarRequest) GetParent() S7Parameter { +func (m *_S7ParameterWriteVarRequest) GetParent() S7Parameter { return m._S7Parameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -88,11 +89,12 @@ func (m *_S7ParameterWriteVarRequest) GetItems() []S7VarRequestParameterItem { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewS7ParameterWriteVarRequest factory function for _S7ParameterWriteVarRequest -func NewS7ParameterWriteVarRequest(items []S7VarRequestParameterItem) *_S7ParameterWriteVarRequest { +func NewS7ParameterWriteVarRequest( items []S7VarRequestParameterItem ) *_S7ParameterWriteVarRequest { _result := &_S7ParameterWriteVarRequest{ - Items: items, - _S7Parameter: NewS7Parameter(), + Items: items, + _S7Parameter: NewS7Parameter(), } _result._S7Parameter._S7ParameterChildRequirements = _result return _result @@ -100,7 +102,7 @@ func NewS7ParameterWriteVarRequest(items []S7VarRequestParameterItem) *_S7Parame // Deprecated: use the interface for direct cast func CastS7ParameterWriteVarRequest(structType interface{}) S7ParameterWriteVarRequest { - if casted, ok := structType.(S7ParameterWriteVarRequest); ok { + if casted, ok := structType.(S7ParameterWriteVarRequest); ok { return casted } if casted, ok := structType.(*S7ParameterWriteVarRequest); ok { @@ -125,13 +127,14 @@ func (m *_S7ParameterWriteVarRequest) GetLengthInBits(ctx context.Context) uint1 arrayCtx := spiContext.CreateArrayContext(ctx, len(m.Items), _curItem) _ = arrayCtx _ = _curItem - lengthInBits += element.(interface{ GetLengthInBits(context.Context) uint16 }).GetLengthInBits(arrayCtx) + lengthInBits += element.(interface{GetLengthInBits(context.Context) uint16}).GetLengthInBits(arrayCtx) } } return lengthInBits } + func (m *_S7ParameterWriteVarRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -172,7 +175,7 @@ func S7ParameterWriteVarRequestParseWithBuffer(ctx context.Context, readBuffer u arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := S7VarRequestParameterItemParseWithBuffer(arrayCtx, readBuffer) +_item, _err := S7VarRequestParameterItemParseWithBuffer(arrayCtx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'items' field of S7ParameterWriteVarRequest") } @@ -189,8 +192,9 @@ func S7ParameterWriteVarRequestParseWithBuffer(ctx context.Context, readBuffer u // Create a partially initialized instance _child := &_S7ParameterWriteVarRequest{ - _S7Parameter: &_S7Parameter{}, - Items: items, + _S7Parameter: &_S7Parameter{ + }, + Items: items, } _child._S7Parameter._S7ParameterChildRequirements = _child return _child, nil @@ -212,29 +216,29 @@ func (m *_S7ParameterWriteVarRequest) SerializeWithWriteBuffer(ctx context.Conte return errors.Wrap(pushErr, "Error pushing for S7ParameterWriteVarRequest") } - // Implicit Field (numItems) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - numItems := uint8(uint8(len(m.GetItems()))) - _numItemsErr := writeBuffer.WriteUint8("numItems", 8, (numItems)) - if _numItemsErr != nil { - return errors.Wrap(_numItemsErr, "Error serializing 'numItems' field") - } + // Implicit Field (numItems) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) + numItems := uint8(uint8(len(m.GetItems()))) + _numItemsErr := writeBuffer.WriteUint8("numItems", 8, (numItems)) + if _numItemsErr != nil { + return errors.Wrap(_numItemsErr, "Error serializing 'numItems' field") + } - // Array Field (items) - if pushErr := writeBuffer.PushContext("items", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for items") - } - for _curItem, _element := range m.GetItems() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetItems()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'items' field") - } - } - if popErr := writeBuffer.PopContext("items", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for items") + // Array Field (items) + if pushErr := writeBuffer.PushContext("items", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for items") + } + for _curItem, _element := range m.GetItems() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetItems()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'items' field") } + } + if popErr := writeBuffer.PopContext("items", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for items") + } if popErr := writeBuffer.PopContext("S7ParameterWriteVarRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for S7ParameterWriteVarRequest") @@ -244,6 +248,7 @@ func (m *_S7ParameterWriteVarRequest) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_S7ParameterWriteVarRequest) isS7ParameterWriteVarRequest() bool { return true } @@ -258,3 +263,6 @@ func (m *_S7ParameterWriteVarRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7ParameterWriteVarResponse.go b/plc4go/protocols/s7/readwrite/model/S7ParameterWriteVarResponse.go index ada27f84168..a083068d96e 100644 --- a/plc4go/protocols/s7/readwrite/model/S7ParameterWriteVarResponse.go +++ b/plc4go/protocols/s7/readwrite/model/S7ParameterWriteVarResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7ParameterWriteVarResponse is the corresponding interface of S7ParameterWriteVarResponse type S7ParameterWriteVarResponse interface { @@ -46,33 +48,32 @@ type S7ParameterWriteVarResponseExactly interface { // _S7ParameterWriteVarResponse is the data-structure of this message type _S7ParameterWriteVarResponse struct { *_S7Parameter - NumItems uint8 + NumItems uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_S7ParameterWriteVarResponse) GetParameterType() uint8 { - return 0x05 -} +func (m *_S7ParameterWriteVarResponse) GetParameterType() uint8 { +return 0x05} -func (m *_S7ParameterWriteVarResponse) GetMessageType() uint8 { - return 0x03 -} +func (m *_S7ParameterWriteVarResponse) GetMessageType() uint8 { +return 0x03} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_S7ParameterWriteVarResponse) InitializeParent(parent S7Parameter) {} +func (m *_S7ParameterWriteVarResponse) InitializeParent(parent S7Parameter ) {} -func (m *_S7ParameterWriteVarResponse) GetParent() S7Parameter { +func (m *_S7ParameterWriteVarResponse) GetParent() S7Parameter { return m._S7Parameter } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -87,11 +88,12 @@ func (m *_S7ParameterWriteVarResponse) GetNumItems() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewS7ParameterWriteVarResponse factory function for _S7ParameterWriteVarResponse -func NewS7ParameterWriteVarResponse(numItems uint8) *_S7ParameterWriteVarResponse { +func NewS7ParameterWriteVarResponse( numItems uint8 ) *_S7ParameterWriteVarResponse { _result := &_S7ParameterWriteVarResponse{ - NumItems: numItems, - _S7Parameter: NewS7Parameter(), + NumItems: numItems, + _S7Parameter: NewS7Parameter(), } _result._S7Parameter._S7ParameterChildRequirements = _result return _result @@ -99,7 +101,7 @@ func NewS7ParameterWriteVarResponse(numItems uint8) *_S7ParameterWriteVarRespons // Deprecated: use the interface for direct cast func CastS7ParameterWriteVarResponse(structType interface{}) S7ParameterWriteVarResponse { - if casted, ok := structType.(S7ParameterWriteVarResponse); ok { + if casted, ok := structType.(S7ParameterWriteVarResponse); ok { return casted } if casted, ok := structType.(*S7ParameterWriteVarResponse); ok { @@ -116,11 +118,12 @@ func (m *_S7ParameterWriteVarResponse) GetLengthInBits(ctx context.Context) uint lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (numItems) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_S7ParameterWriteVarResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -139,7 +142,7 @@ func S7ParameterWriteVarResponseParseWithBuffer(ctx context.Context, readBuffer _ = currentPos // Simple Field (numItems) - _numItems, _numItemsErr := readBuffer.ReadUint8("numItems", 8) +_numItems, _numItemsErr := readBuffer.ReadUint8("numItems", 8) if _numItemsErr != nil { return nil, errors.Wrap(_numItemsErr, "Error parsing 'numItems' field of S7ParameterWriteVarResponse") } @@ -151,8 +154,9 @@ func S7ParameterWriteVarResponseParseWithBuffer(ctx context.Context, readBuffer // Create a partially initialized instance _child := &_S7ParameterWriteVarResponse{ - _S7Parameter: &_S7Parameter{}, - NumItems: numItems, + _S7Parameter: &_S7Parameter{ + }, + NumItems: numItems, } _child._S7Parameter._S7ParameterChildRequirements = _child return _child, nil @@ -174,12 +178,12 @@ func (m *_S7ParameterWriteVarResponse) SerializeWithWriteBuffer(ctx context.Cont return errors.Wrap(pushErr, "Error pushing for S7ParameterWriteVarResponse") } - // Simple Field (numItems) - numItems := uint8(m.GetNumItems()) - _numItemsErr := writeBuffer.WriteUint8("numItems", 8, (numItems)) - if _numItemsErr != nil { - return errors.Wrap(_numItemsErr, "Error serializing 'numItems' field") - } + // Simple Field (numItems) + numItems := uint8(m.GetNumItems()) + _numItemsErr := writeBuffer.WriteUint8("numItems", 8, (numItems)) + if _numItemsErr != nil { + return errors.Wrap(_numItemsErr, "Error serializing 'numItems' field") + } if popErr := writeBuffer.PopContext("S7ParameterWriteVarResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for S7ParameterWriteVarResponse") @@ -189,6 +193,7 @@ func (m *_S7ParameterWriteVarResponse) SerializeWithWriteBuffer(ctx context.Cont return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_S7ParameterWriteVarResponse) isS7ParameterWriteVarResponse() bool { return true } @@ -203,3 +208,6 @@ func (m *_S7ParameterWriteVarResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7Payload.go b/plc4go/protocols/s7/readwrite/model/S7Payload.go index 80877cc60ed..f77cf34c713 100644 --- a/plc4go/protocols/s7/readwrite/model/S7Payload.go +++ b/plc4go/protocols/s7/readwrite/model/S7Payload.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7Payload is the corresponding interface of S7Payload type S7Payload interface { @@ -59,6 +61,7 @@ type _S7PayloadChildRequirements interface { GetMessageType() uint8 } + type S7PayloadParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child S7Payload, serializeChildFunction func() error) error GetTypeName() string @@ -66,21 +69,22 @@ type S7PayloadParent interface { type S7PayloadChild interface { utils.Serializable - InitializeParent(parent S7Payload) +InitializeParent(parent S7Payload ) GetParent() *S7Payload GetTypeName() string S7Payload } + // NewS7Payload factory function for _S7Payload -func NewS7Payload(parameter S7Parameter) *_S7Payload { - return &_S7Payload{Parameter: parameter} +func NewS7Payload( parameter S7Parameter ) *_S7Payload { +return &_S7Payload{ Parameter: parameter } } // Deprecated: use the interface for direct cast func CastS7Payload(structType interface{}) S7Payload { - if casted, ok := structType.(S7Payload); ok { + if casted, ok := structType.(S7Payload); ok { return casted } if casted, ok := structType.(*S7Payload); ok { @@ -93,6 +97,7 @@ func (m *_S7Payload) GetTypeName() string { return "S7Payload" } + func (m *_S7Payload) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -119,20 +124,20 @@ func S7PayloadParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type S7PayloadChildSerializeRequirement interface { S7Payload - InitializeParent(S7Payload) + InitializeParent(S7Payload ) GetParent() S7Payload } var _childTemp interface{} var _child S7PayloadChildSerializeRequirement var typeSwitchError error switch { - case CastS7Parameter(parameter).GetParameterType() == 0x04 && messageType == 0x03: // S7PayloadReadVarResponse +case CastS7Parameter(parameter).GetParameterType() == 0x04 && messageType == 0x03 : // S7PayloadReadVarResponse _childTemp, typeSwitchError = S7PayloadReadVarResponseParseWithBuffer(ctx, readBuffer, messageType, parameter) - case CastS7Parameter(parameter).GetParameterType() == 0x05 && messageType == 0x01: // S7PayloadWriteVarRequest +case CastS7Parameter(parameter).GetParameterType() == 0x05 && messageType == 0x01 : // S7PayloadWriteVarRequest _childTemp, typeSwitchError = S7PayloadWriteVarRequestParseWithBuffer(ctx, readBuffer, messageType, parameter) - case CastS7Parameter(parameter).GetParameterType() == 0x05 && messageType == 0x03: // S7PayloadWriteVarResponse +case CastS7Parameter(parameter).GetParameterType() == 0x05 && messageType == 0x03 : // S7PayloadWriteVarResponse _childTemp, typeSwitchError = S7PayloadWriteVarResponseParseWithBuffer(ctx, readBuffer, messageType, parameter) - case CastS7Parameter(parameter).GetParameterType() == 0x00 && messageType == 0x07: // S7PayloadUserData +case CastS7Parameter(parameter).GetParameterType() == 0x00 && messageType == 0x07 : // S7PayloadUserData _childTemp, typeSwitchError = S7PayloadUserDataParseWithBuffer(ctx, readBuffer, messageType, parameter) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [parameterparameterType=%v, messageType=%v]", CastS7Parameter(parameter).GetParameterType(), messageType) @@ -147,7 +152,7 @@ func S7PayloadParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, } // Finish initializing - _child.InitializeParent(_child) +_child.InitializeParent(_child ) return _child, nil } @@ -157,7 +162,7 @@ func (pm *_S7Payload) SerializeParent(ctx context.Context, writeBuffer utils.Wri _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("S7Payload"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("S7Payload"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for S7Payload") } @@ -172,13 +177,13 @@ func (pm *_S7Payload) SerializeParent(ctx context.Context, writeBuffer utils.Wri return nil } + //// // Arguments Getter func (m *_S7Payload) GetParameter() S7Parameter { return m.Parameter } - // //// @@ -196,3 +201,6 @@ func (m *_S7Payload) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7PayloadAlarm8.go b/plc4go/protocols/s7/readwrite/model/S7PayloadAlarm8.go index c8349ea50af..1e21e148e50 100644 --- a/plc4go/protocols/s7/readwrite/model/S7PayloadAlarm8.go +++ b/plc4go/protocols/s7/readwrite/model/S7PayloadAlarm8.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7PayloadAlarm8 is the corresponding interface of S7PayloadAlarm8 type S7PayloadAlarm8 interface { @@ -46,40 +48,37 @@ type S7PayloadAlarm8Exactly interface { // _S7PayloadAlarm8 is the data-structure of this message type _S7PayloadAlarm8 struct { *_S7PayloadUserDataItem - AlarmMessage AlarmMessagePushType + AlarmMessage AlarmMessagePushType } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_S7PayloadAlarm8) GetCpuFunctionType() uint8 { - return 0x00 -} +func (m *_S7PayloadAlarm8) GetCpuFunctionType() uint8 { +return 0x00} -func (m *_S7PayloadAlarm8) GetCpuSubfunction() uint8 { - return 0x05 -} +func (m *_S7PayloadAlarm8) GetCpuSubfunction() uint8 { +return 0x05} -func (m *_S7PayloadAlarm8) GetDataLength() uint16 { - return 0 -} +func (m *_S7PayloadAlarm8) GetDataLength() uint16 { +return 0} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_S7PayloadAlarm8) InitializeParent(parent S7PayloadUserDataItem, returnCode DataTransportErrorCode, transportSize DataTransportSize) { - m.ReturnCode = returnCode +func (m *_S7PayloadAlarm8) InitializeParent(parent S7PayloadUserDataItem , returnCode DataTransportErrorCode , transportSize DataTransportSize ) { m.ReturnCode = returnCode m.TransportSize = transportSize } -func (m *_S7PayloadAlarm8) GetParent() S7PayloadUserDataItem { +func (m *_S7PayloadAlarm8) GetParent() S7PayloadUserDataItem { return m._S7PayloadUserDataItem } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -94,11 +93,12 @@ func (m *_S7PayloadAlarm8) GetAlarmMessage() AlarmMessagePushType { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewS7PayloadAlarm8 factory function for _S7PayloadAlarm8 -func NewS7PayloadAlarm8(alarmMessage AlarmMessagePushType, returnCode DataTransportErrorCode, transportSize DataTransportSize) *_S7PayloadAlarm8 { +func NewS7PayloadAlarm8( alarmMessage AlarmMessagePushType , returnCode DataTransportErrorCode , transportSize DataTransportSize ) *_S7PayloadAlarm8 { _result := &_S7PayloadAlarm8{ - AlarmMessage: alarmMessage, - _S7PayloadUserDataItem: NewS7PayloadUserDataItem(returnCode, transportSize), + AlarmMessage: alarmMessage, + _S7PayloadUserDataItem: NewS7PayloadUserDataItem(returnCode, transportSize), } _result._S7PayloadUserDataItem._S7PayloadUserDataItemChildRequirements = _result return _result @@ -106,7 +106,7 @@ func NewS7PayloadAlarm8(alarmMessage AlarmMessagePushType, returnCode DataTransp // Deprecated: use the interface for direct cast func CastS7PayloadAlarm8(structType interface{}) S7PayloadAlarm8 { - if casted, ok := structType.(S7PayloadAlarm8); ok { + if casted, ok := structType.(S7PayloadAlarm8); ok { return casted } if casted, ok := structType.(*S7PayloadAlarm8); ok { @@ -128,6 +128,7 @@ func (m *_S7PayloadAlarm8) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_S7PayloadAlarm8) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -149,7 +150,7 @@ func S7PayloadAlarm8ParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu if pullErr := readBuffer.PullContext("alarmMessage"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for alarmMessage") } - _alarmMessage, _alarmMessageErr := AlarmMessagePushTypeParseWithBuffer(ctx, readBuffer) +_alarmMessage, _alarmMessageErr := AlarmMessagePushTypeParseWithBuffer(ctx, readBuffer) if _alarmMessageErr != nil { return nil, errors.Wrap(_alarmMessageErr, "Error parsing 'alarmMessage' field of S7PayloadAlarm8") } @@ -164,8 +165,9 @@ func S7PayloadAlarm8ParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu // Create a partially initialized instance _child := &_S7PayloadAlarm8{ - _S7PayloadUserDataItem: &_S7PayloadUserDataItem{}, - AlarmMessage: alarmMessage, + _S7PayloadUserDataItem: &_S7PayloadUserDataItem{ + }, + AlarmMessage: alarmMessage, } _child._S7PayloadUserDataItem._S7PayloadUserDataItemChildRequirements = _child return _child, nil @@ -187,17 +189,17 @@ func (m *_S7PayloadAlarm8) SerializeWithWriteBuffer(ctx context.Context, writeBu return errors.Wrap(pushErr, "Error pushing for S7PayloadAlarm8") } - // Simple Field (alarmMessage) - if pushErr := writeBuffer.PushContext("alarmMessage"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for alarmMessage") - } - _alarmMessageErr := writeBuffer.WriteSerializable(ctx, m.GetAlarmMessage()) - if popErr := writeBuffer.PopContext("alarmMessage"); popErr != nil { - return errors.Wrap(popErr, "Error popping for alarmMessage") - } - if _alarmMessageErr != nil { - return errors.Wrap(_alarmMessageErr, "Error serializing 'alarmMessage' field") - } + // Simple Field (alarmMessage) + if pushErr := writeBuffer.PushContext("alarmMessage"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for alarmMessage") + } + _alarmMessageErr := writeBuffer.WriteSerializable(ctx, m.GetAlarmMessage()) + if popErr := writeBuffer.PopContext("alarmMessage"); popErr != nil { + return errors.Wrap(popErr, "Error popping for alarmMessage") + } + if _alarmMessageErr != nil { + return errors.Wrap(_alarmMessageErr, "Error serializing 'alarmMessage' field") + } if popErr := writeBuffer.PopContext("S7PayloadAlarm8"); popErr != nil { return errors.Wrap(popErr, "Error popping for S7PayloadAlarm8") @@ -207,6 +209,7 @@ func (m *_S7PayloadAlarm8) SerializeWithWriteBuffer(ctx context.Context, writeBu return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_S7PayloadAlarm8) isS7PayloadAlarm8() bool { return true } @@ -221,3 +224,6 @@ func (m *_S7PayloadAlarm8) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7PayloadAlarmAckInd.go b/plc4go/protocols/s7/readwrite/model/S7PayloadAlarmAckInd.go index 843bea9168a..937f0b39c6d 100644 --- a/plc4go/protocols/s7/readwrite/model/S7PayloadAlarmAckInd.go +++ b/plc4go/protocols/s7/readwrite/model/S7PayloadAlarmAckInd.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7PayloadAlarmAckInd is the corresponding interface of S7PayloadAlarmAckInd type S7PayloadAlarmAckInd interface { @@ -46,40 +48,37 @@ type S7PayloadAlarmAckIndExactly interface { // _S7PayloadAlarmAckInd is the data-structure of this message type _S7PayloadAlarmAckInd struct { *_S7PayloadUserDataItem - AlarmMessage AlarmMessageAckPushType + AlarmMessage AlarmMessageAckPushType } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_S7PayloadAlarmAckInd) GetCpuFunctionType() uint8 { - return 0x00 -} +func (m *_S7PayloadAlarmAckInd) GetCpuFunctionType() uint8 { +return 0x00} -func (m *_S7PayloadAlarmAckInd) GetCpuSubfunction() uint8 { - return 0x0c -} +func (m *_S7PayloadAlarmAckInd) GetCpuSubfunction() uint8 { +return 0x0c} -func (m *_S7PayloadAlarmAckInd) GetDataLength() uint16 { - return 0 -} +func (m *_S7PayloadAlarmAckInd) GetDataLength() uint16 { +return 0} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_S7PayloadAlarmAckInd) InitializeParent(parent S7PayloadUserDataItem, returnCode DataTransportErrorCode, transportSize DataTransportSize) { - m.ReturnCode = returnCode +func (m *_S7PayloadAlarmAckInd) InitializeParent(parent S7PayloadUserDataItem , returnCode DataTransportErrorCode , transportSize DataTransportSize ) { m.ReturnCode = returnCode m.TransportSize = transportSize } -func (m *_S7PayloadAlarmAckInd) GetParent() S7PayloadUserDataItem { +func (m *_S7PayloadAlarmAckInd) GetParent() S7PayloadUserDataItem { return m._S7PayloadUserDataItem } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -94,11 +93,12 @@ func (m *_S7PayloadAlarmAckInd) GetAlarmMessage() AlarmMessageAckPushType { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewS7PayloadAlarmAckInd factory function for _S7PayloadAlarmAckInd -func NewS7PayloadAlarmAckInd(alarmMessage AlarmMessageAckPushType, returnCode DataTransportErrorCode, transportSize DataTransportSize) *_S7PayloadAlarmAckInd { +func NewS7PayloadAlarmAckInd( alarmMessage AlarmMessageAckPushType , returnCode DataTransportErrorCode , transportSize DataTransportSize ) *_S7PayloadAlarmAckInd { _result := &_S7PayloadAlarmAckInd{ - AlarmMessage: alarmMessage, - _S7PayloadUserDataItem: NewS7PayloadUserDataItem(returnCode, transportSize), + AlarmMessage: alarmMessage, + _S7PayloadUserDataItem: NewS7PayloadUserDataItem(returnCode, transportSize), } _result._S7PayloadUserDataItem._S7PayloadUserDataItemChildRequirements = _result return _result @@ -106,7 +106,7 @@ func NewS7PayloadAlarmAckInd(alarmMessage AlarmMessageAckPushType, returnCode Da // Deprecated: use the interface for direct cast func CastS7PayloadAlarmAckInd(structType interface{}) S7PayloadAlarmAckInd { - if casted, ok := structType.(S7PayloadAlarmAckInd); ok { + if casted, ok := structType.(S7PayloadAlarmAckInd); ok { return casted } if casted, ok := structType.(*S7PayloadAlarmAckInd); ok { @@ -128,6 +128,7 @@ func (m *_S7PayloadAlarmAckInd) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_S7PayloadAlarmAckInd) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -149,7 +150,7 @@ func S7PayloadAlarmAckIndParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("alarmMessage"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for alarmMessage") } - _alarmMessage, _alarmMessageErr := AlarmMessageAckPushTypeParseWithBuffer(ctx, readBuffer) +_alarmMessage, _alarmMessageErr := AlarmMessageAckPushTypeParseWithBuffer(ctx, readBuffer) if _alarmMessageErr != nil { return nil, errors.Wrap(_alarmMessageErr, "Error parsing 'alarmMessage' field of S7PayloadAlarmAckInd") } @@ -164,8 +165,9 @@ func S7PayloadAlarmAckIndParseWithBuffer(ctx context.Context, readBuffer utils.R // Create a partially initialized instance _child := &_S7PayloadAlarmAckInd{ - _S7PayloadUserDataItem: &_S7PayloadUserDataItem{}, - AlarmMessage: alarmMessage, + _S7PayloadUserDataItem: &_S7PayloadUserDataItem{ + }, + AlarmMessage: alarmMessage, } _child._S7PayloadUserDataItem._S7PayloadUserDataItemChildRequirements = _child return _child, nil @@ -187,17 +189,17 @@ func (m *_S7PayloadAlarmAckInd) SerializeWithWriteBuffer(ctx context.Context, wr return errors.Wrap(pushErr, "Error pushing for S7PayloadAlarmAckInd") } - // Simple Field (alarmMessage) - if pushErr := writeBuffer.PushContext("alarmMessage"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for alarmMessage") - } - _alarmMessageErr := writeBuffer.WriteSerializable(ctx, m.GetAlarmMessage()) - if popErr := writeBuffer.PopContext("alarmMessage"); popErr != nil { - return errors.Wrap(popErr, "Error popping for alarmMessage") - } - if _alarmMessageErr != nil { - return errors.Wrap(_alarmMessageErr, "Error serializing 'alarmMessage' field") - } + // Simple Field (alarmMessage) + if pushErr := writeBuffer.PushContext("alarmMessage"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for alarmMessage") + } + _alarmMessageErr := writeBuffer.WriteSerializable(ctx, m.GetAlarmMessage()) + if popErr := writeBuffer.PopContext("alarmMessage"); popErr != nil { + return errors.Wrap(popErr, "Error popping for alarmMessage") + } + if _alarmMessageErr != nil { + return errors.Wrap(_alarmMessageErr, "Error serializing 'alarmMessage' field") + } if popErr := writeBuffer.PopContext("S7PayloadAlarmAckInd"); popErr != nil { return errors.Wrap(popErr, "Error popping for S7PayloadAlarmAckInd") @@ -207,6 +209,7 @@ func (m *_S7PayloadAlarmAckInd) SerializeWithWriteBuffer(ctx context.Context, wr return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_S7PayloadAlarmAckInd) isS7PayloadAlarmAckInd() bool { return true } @@ -221,3 +224,6 @@ func (m *_S7PayloadAlarmAckInd) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7PayloadAlarmS.go b/plc4go/protocols/s7/readwrite/model/S7PayloadAlarmS.go index d6f5d2dd2b9..6329ed0cdbc 100644 --- a/plc4go/protocols/s7/readwrite/model/S7PayloadAlarmS.go +++ b/plc4go/protocols/s7/readwrite/model/S7PayloadAlarmS.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7PayloadAlarmS is the corresponding interface of S7PayloadAlarmS type S7PayloadAlarmS interface { @@ -46,40 +48,37 @@ type S7PayloadAlarmSExactly interface { // _S7PayloadAlarmS is the data-structure of this message type _S7PayloadAlarmS struct { *_S7PayloadUserDataItem - AlarmMessage AlarmMessagePushType + AlarmMessage AlarmMessagePushType } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_S7PayloadAlarmS) GetCpuFunctionType() uint8 { - return 0x00 -} +func (m *_S7PayloadAlarmS) GetCpuFunctionType() uint8 { +return 0x00} -func (m *_S7PayloadAlarmS) GetCpuSubfunction() uint8 { - return 0x12 -} +func (m *_S7PayloadAlarmS) GetCpuSubfunction() uint8 { +return 0x12} -func (m *_S7PayloadAlarmS) GetDataLength() uint16 { - return 0 -} +func (m *_S7PayloadAlarmS) GetDataLength() uint16 { +return 0} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_S7PayloadAlarmS) InitializeParent(parent S7PayloadUserDataItem, returnCode DataTransportErrorCode, transportSize DataTransportSize) { - m.ReturnCode = returnCode +func (m *_S7PayloadAlarmS) InitializeParent(parent S7PayloadUserDataItem , returnCode DataTransportErrorCode , transportSize DataTransportSize ) { m.ReturnCode = returnCode m.TransportSize = transportSize } -func (m *_S7PayloadAlarmS) GetParent() S7PayloadUserDataItem { +func (m *_S7PayloadAlarmS) GetParent() S7PayloadUserDataItem { return m._S7PayloadUserDataItem } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -94,11 +93,12 @@ func (m *_S7PayloadAlarmS) GetAlarmMessage() AlarmMessagePushType { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewS7PayloadAlarmS factory function for _S7PayloadAlarmS -func NewS7PayloadAlarmS(alarmMessage AlarmMessagePushType, returnCode DataTransportErrorCode, transportSize DataTransportSize) *_S7PayloadAlarmS { +func NewS7PayloadAlarmS( alarmMessage AlarmMessagePushType , returnCode DataTransportErrorCode , transportSize DataTransportSize ) *_S7PayloadAlarmS { _result := &_S7PayloadAlarmS{ - AlarmMessage: alarmMessage, - _S7PayloadUserDataItem: NewS7PayloadUserDataItem(returnCode, transportSize), + AlarmMessage: alarmMessage, + _S7PayloadUserDataItem: NewS7PayloadUserDataItem(returnCode, transportSize), } _result._S7PayloadUserDataItem._S7PayloadUserDataItemChildRequirements = _result return _result @@ -106,7 +106,7 @@ func NewS7PayloadAlarmS(alarmMessage AlarmMessagePushType, returnCode DataTransp // Deprecated: use the interface for direct cast func CastS7PayloadAlarmS(structType interface{}) S7PayloadAlarmS { - if casted, ok := structType.(S7PayloadAlarmS); ok { + if casted, ok := structType.(S7PayloadAlarmS); ok { return casted } if casted, ok := structType.(*S7PayloadAlarmS); ok { @@ -128,6 +128,7 @@ func (m *_S7PayloadAlarmS) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_S7PayloadAlarmS) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -149,7 +150,7 @@ func S7PayloadAlarmSParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu if pullErr := readBuffer.PullContext("alarmMessage"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for alarmMessage") } - _alarmMessage, _alarmMessageErr := AlarmMessagePushTypeParseWithBuffer(ctx, readBuffer) +_alarmMessage, _alarmMessageErr := AlarmMessagePushTypeParseWithBuffer(ctx, readBuffer) if _alarmMessageErr != nil { return nil, errors.Wrap(_alarmMessageErr, "Error parsing 'alarmMessage' field of S7PayloadAlarmS") } @@ -164,8 +165,9 @@ func S7PayloadAlarmSParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu // Create a partially initialized instance _child := &_S7PayloadAlarmS{ - _S7PayloadUserDataItem: &_S7PayloadUserDataItem{}, - AlarmMessage: alarmMessage, + _S7PayloadUserDataItem: &_S7PayloadUserDataItem{ + }, + AlarmMessage: alarmMessage, } _child._S7PayloadUserDataItem._S7PayloadUserDataItemChildRequirements = _child return _child, nil @@ -187,17 +189,17 @@ func (m *_S7PayloadAlarmS) SerializeWithWriteBuffer(ctx context.Context, writeBu return errors.Wrap(pushErr, "Error pushing for S7PayloadAlarmS") } - // Simple Field (alarmMessage) - if pushErr := writeBuffer.PushContext("alarmMessage"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for alarmMessage") - } - _alarmMessageErr := writeBuffer.WriteSerializable(ctx, m.GetAlarmMessage()) - if popErr := writeBuffer.PopContext("alarmMessage"); popErr != nil { - return errors.Wrap(popErr, "Error popping for alarmMessage") - } - if _alarmMessageErr != nil { - return errors.Wrap(_alarmMessageErr, "Error serializing 'alarmMessage' field") - } + // Simple Field (alarmMessage) + if pushErr := writeBuffer.PushContext("alarmMessage"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for alarmMessage") + } + _alarmMessageErr := writeBuffer.WriteSerializable(ctx, m.GetAlarmMessage()) + if popErr := writeBuffer.PopContext("alarmMessage"); popErr != nil { + return errors.Wrap(popErr, "Error popping for alarmMessage") + } + if _alarmMessageErr != nil { + return errors.Wrap(_alarmMessageErr, "Error serializing 'alarmMessage' field") + } if popErr := writeBuffer.PopContext("S7PayloadAlarmS"); popErr != nil { return errors.Wrap(popErr, "Error popping for S7PayloadAlarmS") @@ -207,6 +209,7 @@ func (m *_S7PayloadAlarmS) SerializeWithWriteBuffer(ctx context.Context, writeBu return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_S7PayloadAlarmS) isS7PayloadAlarmS() bool { return true } @@ -221,3 +224,6 @@ func (m *_S7PayloadAlarmS) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7PayloadAlarmSC.go b/plc4go/protocols/s7/readwrite/model/S7PayloadAlarmSC.go index 9fb62716666..3fbf525e705 100644 --- a/plc4go/protocols/s7/readwrite/model/S7PayloadAlarmSC.go +++ b/plc4go/protocols/s7/readwrite/model/S7PayloadAlarmSC.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7PayloadAlarmSC is the corresponding interface of S7PayloadAlarmSC type S7PayloadAlarmSC interface { @@ -46,40 +48,37 @@ type S7PayloadAlarmSCExactly interface { // _S7PayloadAlarmSC is the data-structure of this message type _S7PayloadAlarmSC struct { *_S7PayloadUserDataItem - AlarmMessage AlarmMessagePushType + AlarmMessage AlarmMessagePushType } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_S7PayloadAlarmSC) GetCpuFunctionType() uint8 { - return 0x00 -} +func (m *_S7PayloadAlarmSC) GetCpuFunctionType() uint8 { +return 0x00} -func (m *_S7PayloadAlarmSC) GetCpuSubfunction() uint8 { - return 0x13 -} +func (m *_S7PayloadAlarmSC) GetCpuSubfunction() uint8 { +return 0x13} -func (m *_S7PayloadAlarmSC) GetDataLength() uint16 { - return 0 -} +func (m *_S7PayloadAlarmSC) GetDataLength() uint16 { +return 0} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_S7PayloadAlarmSC) InitializeParent(parent S7PayloadUserDataItem, returnCode DataTransportErrorCode, transportSize DataTransportSize) { - m.ReturnCode = returnCode +func (m *_S7PayloadAlarmSC) InitializeParent(parent S7PayloadUserDataItem , returnCode DataTransportErrorCode , transportSize DataTransportSize ) { m.ReturnCode = returnCode m.TransportSize = transportSize } -func (m *_S7PayloadAlarmSC) GetParent() S7PayloadUserDataItem { +func (m *_S7PayloadAlarmSC) GetParent() S7PayloadUserDataItem { return m._S7PayloadUserDataItem } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -94,11 +93,12 @@ func (m *_S7PayloadAlarmSC) GetAlarmMessage() AlarmMessagePushType { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewS7PayloadAlarmSC factory function for _S7PayloadAlarmSC -func NewS7PayloadAlarmSC(alarmMessage AlarmMessagePushType, returnCode DataTransportErrorCode, transportSize DataTransportSize) *_S7PayloadAlarmSC { +func NewS7PayloadAlarmSC( alarmMessage AlarmMessagePushType , returnCode DataTransportErrorCode , transportSize DataTransportSize ) *_S7PayloadAlarmSC { _result := &_S7PayloadAlarmSC{ - AlarmMessage: alarmMessage, - _S7PayloadUserDataItem: NewS7PayloadUserDataItem(returnCode, transportSize), + AlarmMessage: alarmMessage, + _S7PayloadUserDataItem: NewS7PayloadUserDataItem(returnCode, transportSize), } _result._S7PayloadUserDataItem._S7PayloadUserDataItemChildRequirements = _result return _result @@ -106,7 +106,7 @@ func NewS7PayloadAlarmSC(alarmMessage AlarmMessagePushType, returnCode DataTrans // Deprecated: use the interface for direct cast func CastS7PayloadAlarmSC(structType interface{}) S7PayloadAlarmSC { - if casted, ok := structType.(S7PayloadAlarmSC); ok { + if casted, ok := structType.(S7PayloadAlarmSC); ok { return casted } if casted, ok := structType.(*S7PayloadAlarmSC); ok { @@ -128,6 +128,7 @@ func (m *_S7PayloadAlarmSC) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_S7PayloadAlarmSC) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -149,7 +150,7 @@ func S7PayloadAlarmSCParseWithBuffer(ctx context.Context, readBuffer utils.ReadB if pullErr := readBuffer.PullContext("alarmMessage"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for alarmMessage") } - _alarmMessage, _alarmMessageErr := AlarmMessagePushTypeParseWithBuffer(ctx, readBuffer) +_alarmMessage, _alarmMessageErr := AlarmMessagePushTypeParseWithBuffer(ctx, readBuffer) if _alarmMessageErr != nil { return nil, errors.Wrap(_alarmMessageErr, "Error parsing 'alarmMessage' field of S7PayloadAlarmSC") } @@ -164,8 +165,9 @@ func S7PayloadAlarmSCParseWithBuffer(ctx context.Context, readBuffer utils.ReadB // Create a partially initialized instance _child := &_S7PayloadAlarmSC{ - _S7PayloadUserDataItem: &_S7PayloadUserDataItem{}, - AlarmMessage: alarmMessage, + _S7PayloadUserDataItem: &_S7PayloadUserDataItem{ + }, + AlarmMessage: alarmMessage, } _child._S7PayloadUserDataItem._S7PayloadUserDataItemChildRequirements = _child return _child, nil @@ -187,17 +189,17 @@ func (m *_S7PayloadAlarmSC) SerializeWithWriteBuffer(ctx context.Context, writeB return errors.Wrap(pushErr, "Error pushing for S7PayloadAlarmSC") } - // Simple Field (alarmMessage) - if pushErr := writeBuffer.PushContext("alarmMessage"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for alarmMessage") - } - _alarmMessageErr := writeBuffer.WriteSerializable(ctx, m.GetAlarmMessage()) - if popErr := writeBuffer.PopContext("alarmMessage"); popErr != nil { - return errors.Wrap(popErr, "Error popping for alarmMessage") - } - if _alarmMessageErr != nil { - return errors.Wrap(_alarmMessageErr, "Error serializing 'alarmMessage' field") - } + // Simple Field (alarmMessage) + if pushErr := writeBuffer.PushContext("alarmMessage"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for alarmMessage") + } + _alarmMessageErr := writeBuffer.WriteSerializable(ctx, m.GetAlarmMessage()) + if popErr := writeBuffer.PopContext("alarmMessage"); popErr != nil { + return errors.Wrap(popErr, "Error popping for alarmMessage") + } + if _alarmMessageErr != nil { + return errors.Wrap(_alarmMessageErr, "Error serializing 'alarmMessage' field") + } if popErr := writeBuffer.PopContext("S7PayloadAlarmSC"); popErr != nil { return errors.Wrap(popErr, "Error popping for S7PayloadAlarmSC") @@ -207,6 +209,7 @@ func (m *_S7PayloadAlarmSC) SerializeWithWriteBuffer(ctx context.Context, writeB return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_S7PayloadAlarmSC) isS7PayloadAlarmSC() bool { return true } @@ -221,3 +224,6 @@ func (m *_S7PayloadAlarmSC) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7PayloadAlarmSQ.go b/plc4go/protocols/s7/readwrite/model/S7PayloadAlarmSQ.go index 3fc6c3d7b70..2255639fd76 100644 --- a/plc4go/protocols/s7/readwrite/model/S7PayloadAlarmSQ.go +++ b/plc4go/protocols/s7/readwrite/model/S7PayloadAlarmSQ.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7PayloadAlarmSQ is the corresponding interface of S7PayloadAlarmSQ type S7PayloadAlarmSQ interface { @@ -46,40 +48,37 @@ type S7PayloadAlarmSQExactly interface { // _S7PayloadAlarmSQ is the data-structure of this message type _S7PayloadAlarmSQ struct { *_S7PayloadUserDataItem - AlarmMessage AlarmMessagePushType + AlarmMessage AlarmMessagePushType } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_S7PayloadAlarmSQ) GetCpuFunctionType() uint8 { - return 0x00 -} +func (m *_S7PayloadAlarmSQ) GetCpuFunctionType() uint8 { +return 0x00} -func (m *_S7PayloadAlarmSQ) GetCpuSubfunction() uint8 { - return 0x11 -} +func (m *_S7PayloadAlarmSQ) GetCpuSubfunction() uint8 { +return 0x11} -func (m *_S7PayloadAlarmSQ) GetDataLength() uint16 { - return 0 -} +func (m *_S7PayloadAlarmSQ) GetDataLength() uint16 { +return 0} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_S7PayloadAlarmSQ) InitializeParent(parent S7PayloadUserDataItem, returnCode DataTransportErrorCode, transportSize DataTransportSize) { - m.ReturnCode = returnCode +func (m *_S7PayloadAlarmSQ) InitializeParent(parent S7PayloadUserDataItem , returnCode DataTransportErrorCode , transportSize DataTransportSize ) { m.ReturnCode = returnCode m.TransportSize = transportSize } -func (m *_S7PayloadAlarmSQ) GetParent() S7PayloadUserDataItem { +func (m *_S7PayloadAlarmSQ) GetParent() S7PayloadUserDataItem { return m._S7PayloadUserDataItem } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -94,11 +93,12 @@ func (m *_S7PayloadAlarmSQ) GetAlarmMessage() AlarmMessagePushType { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewS7PayloadAlarmSQ factory function for _S7PayloadAlarmSQ -func NewS7PayloadAlarmSQ(alarmMessage AlarmMessagePushType, returnCode DataTransportErrorCode, transportSize DataTransportSize) *_S7PayloadAlarmSQ { +func NewS7PayloadAlarmSQ( alarmMessage AlarmMessagePushType , returnCode DataTransportErrorCode , transportSize DataTransportSize ) *_S7PayloadAlarmSQ { _result := &_S7PayloadAlarmSQ{ - AlarmMessage: alarmMessage, - _S7PayloadUserDataItem: NewS7PayloadUserDataItem(returnCode, transportSize), + AlarmMessage: alarmMessage, + _S7PayloadUserDataItem: NewS7PayloadUserDataItem(returnCode, transportSize), } _result._S7PayloadUserDataItem._S7PayloadUserDataItemChildRequirements = _result return _result @@ -106,7 +106,7 @@ func NewS7PayloadAlarmSQ(alarmMessage AlarmMessagePushType, returnCode DataTrans // Deprecated: use the interface for direct cast func CastS7PayloadAlarmSQ(structType interface{}) S7PayloadAlarmSQ { - if casted, ok := structType.(S7PayloadAlarmSQ); ok { + if casted, ok := structType.(S7PayloadAlarmSQ); ok { return casted } if casted, ok := structType.(*S7PayloadAlarmSQ); ok { @@ -128,6 +128,7 @@ func (m *_S7PayloadAlarmSQ) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_S7PayloadAlarmSQ) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -149,7 +150,7 @@ func S7PayloadAlarmSQParseWithBuffer(ctx context.Context, readBuffer utils.ReadB if pullErr := readBuffer.PullContext("alarmMessage"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for alarmMessage") } - _alarmMessage, _alarmMessageErr := AlarmMessagePushTypeParseWithBuffer(ctx, readBuffer) +_alarmMessage, _alarmMessageErr := AlarmMessagePushTypeParseWithBuffer(ctx, readBuffer) if _alarmMessageErr != nil { return nil, errors.Wrap(_alarmMessageErr, "Error parsing 'alarmMessage' field of S7PayloadAlarmSQ") } @@ -164,8 +165,9 @@ func S7PayloadAlarmSQParseWithBuffer(ctx context.Context, readBuffer utils.ReadB // Create a partially initialized instance _child := &_S7PayloadAlarmSQ{ - _S7PayloadUserDataItem: &_S7PayloadUserDataItem{}, - AlarmMessage: alarmMessage, + _S7PayloadUserDataItem: &_S7PayloadUserDataItem{ + }, + AlarmMessage: alarmMessage, } _child._S7PayloadUserDataItem._S7PayloadUserDataItemChildRequirements = _child return _child, nil @@ -187,17 +189,17 @@ func (m *_S7PayloadAlarmSQ) SerializeWithWriteBuffer(ctx context.Context, writeB return errors.Wrap(pushErr, "Error pushing for S7PayloadAlarmSQ") } - // Simple Field (alarmMessage) - if pushErr := writeBuffer.PushContext("alarmMessage"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for alarmMessage") - } - _alarmMessageErr := writeBuffer.WriteSerializable(ctx, m.GetAlarmMessage()) - if popErr := writeBuffer.PopContext("alarmMessage"); popErr != nil { - return errors.Wrap(popErr, "Error popping for alarmMessage") - } - if _alarmMessageErr != nil { - return errors.Wrap(_alarmMessageErr, "Error serializing 'alarmMessage' field") - } + // Simple Field (alarmMessage) + if pushErr := writeBuffer.PushContext("alarmMessage"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for alarmMessage") + } + _alarmMessageErr := writeBuffer.WriteSerializable(ctx, m.GetAlarmMessage()) + if popErr := writeBuffer.PopContext("alarmMessage"); popErr != nil { + return errors.Wrap(popErr, "Error popping for alarmMessage") + } + if _alarmMessageErr != nil { + return errors.Wrap(_alarmMessageErr, "Error serializing 'alarmMessage' field") + } if popErr := writeBuffer.PopContext("S7PayloadAlarmSQ"); popErr != nil { return errors.Wrap(popErr, "Error popping for S7PayloadAlarmSQ") @@ -207,6 +209,7 @@ func (m *_S7PayloadAlarmSQ) SerializeWithWriteBuffer(ctx context.Context, writeB return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_S7PayloadAlarmSQ) isS7PayloadAlarmSQ() bool { return true } @@ -221,3 +224,6 @@ func (m *_S7PayloadAlarmSQ) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7PayloadDiagnosticMessage.go b/plc4go/protocols/s7/readwrite/model/S7PayloadDiagnosticMessage.go index f437ff010a9..9007ea95a23 100644 --- a/plc4go/protocols/s7/readwrite/model/S7PayloadDiagnosticMessage.go +++ b/plc4go/protocols/s7/readwrite/model/S7PayloadDiagnosticMessage.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7PayloadDiagnosticMessage is the corresponding interface of S7PayloadDiagnosticMessage type S7PayloadDiagnosticMessage interface { @@ -58,46 +60,43 @@ type S7PayloadDiagnosticMessageExactly interface { // _S7PayloadDiagnosticMessage is the data-structure of this message type _S7PayloadDiagnosticMessage struct { *_S7PayloadUserDataItem - EventId uint16 - PriorityClass uint8 - ObNumber uint8 - DatId uint16 - Info1 uint16 - Info2 uint32 - TimeStamp DateAndTime + EventId uint16 + PriorityClass uint8 + ObNumber uint8 + DatId uint16 + Info1 uint16 + Info2 uint32 + TimeStamp DateAndTime } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_S7PayloadDiagnosticMessage) GetCpuFunctionType() uint8 { - return 0x00 -} +func (m *_S7PayloadDiagnosticMessage) GetCpuFunctionType() uint8 { +return 0x00} -func (m *_S7PayloadDiagnosticMessage) GetCpuSubfunction() uint8 { - return 0x03 -} +func (m *_S7PayloadDiagnosticMessage) GetCpuSubfunction() uint8 { +return 0x03} -func (m *_S7PayloadDiagnosticMessage) GetDataLength() uint16 { - return 0 -} +func (m *_S7PayloadDiagnosticMessage) GetDataLength() uint16 { +return 0} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_S7PayloadDiagnosticMessage) InitializeParent(parent S7PayloadUserDataItem, returnCode DataTransportErrorCode, transportSize DataTransportSize) { - m.ReturnCode = returnCode +func (m *_S7PayloadDiagnosticMessage) InitializeParent(parent S7PayloadUserDataItem , returnCode DataTransportErrorCode , transportSize DataTransportSize ) { m.ReturnCode = returnCode m.TransportSize = transportSize } -func (m *_S7PayloadDiagnosticMessage) GetParent() S7PayloadUserDataItem { +func (m *_S7PayloadDiagnosticMessage) GetParent() S7PayloadUserDataItem { return m._S7PayloadUserDataItem } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -136,17 +135,18 @@ func (m *_S7PayloadDiagnosticMessage) GetTimeStamp() DateAndTime { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewS7PayloadDiagnosticMessage factory function for _S7PayloadDiagnosticMessage -func NewS7PayloadDiagnosticMessage(EventId uint16, PriorityClass uint8, ObNumber uint8, DatId uint16, Info1 uint16, Info2 uint32, TimeStamp DateAndTime, returnCode DataTransportErrorCode, transportSize DataTransportSize) *_S7PayloadDiagnosticMessage { +func NewS7PayloadDiagnosticMessage( EventId uint16 , PriorityClass uint8 , ObNumber uint8 , DatId uint16 , Info1 uint16 , Info2 uint32 , TimeStamp DateAndTime , returnCode DataTransportErrorCode , transportSize DataTransportSize ) *_S7PayloadDiagnosticMessage { _result := &_S7PayloadDiagnosticMessage{ - EventId: EventId, - PriorityClass: PriorityClass, - ObNumber: ObNumber, - DatId: DatId, - Info1: Info1, - Info2: Info2, - TimeStamp: TimeStamp, - _S7PayloadUserDataItem: NewS7PayloadUserDataItem(returnCode, transportSize), + EventId: EventId, + PriorityClass: PriorityClass, + ObNumber: ObNumber, + DatId: DatId, + Info1: Info1, + Info2: Info2, + TimeStamp: TimeStamp, + _S7PayloadUserDataItem: NewS7PayloadUserDataItem(returnCode, transportSize), } _result._S7PayloadUserDataItem._S7PayloadUserDataItemChildRequirements = _result return _result @@ -154,7 +154,7 @@ func NewS7PayloadDiagnosticMessage(EventId uint16, PriorityClass uint8, ObNumber // Deprecated: use the interface for direct cast func CastS7PayloadDiagnosticMessage(structType interface{}) S7PayloadDiagnosticMessage { - if casted, ok := structType.(S7PayloadDiagnosticMessage); ok { + if casted, ok := structType.(S7PayloadDiagnosticMessage); ok { return casted } if casted, ok := structType.(*S7PayloadDiagnosticMessage); ok { @@ -171,22 +171,22 @@ func (m *_S7PayloadDiagnosticMessage) GetLengthInBits(ctx context.Context) uint1 lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (EventId) - lengthInBits += 16 + lengthInBits += 16; // Simple field (PriorityClass) - lengthInBits += 8 + lengthInBits += 8; // Simple field (ObNumber) - lengthInBits += 8 + lengthInBits += 8; // Simple field (DatId) - lengthInBits += 16 + lengthInBits += 16; // Simple field (Info1) - lengthInBits += 16 + lengthInBits += 16; // Simple field (Info2) - lengthInBits += 32 + lengthInBits += 32; // Simple field (TimeStamp) lengthInBits += m.TimeStamp.GetLengthInBits(ctx) @@ -194,6 +194,7 @@ func (m *_S7PayloadDiagnosticMessage) GetLengthInBits(ctx context.Context) uint1 return lengthInBits } + func (m *_S7PayloadDiagnosticMessage) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -212,42 +213,42 @@ func S7PayloadDiagnosticMessageParseWithBuffer(ctx context.Context, readBuffer u _ = currentPos // Simple Field (EventId) - _EventId, _EventIdErr := readBuffer.ReadUint16("EventId", 16) +_EventId, _EventIdErr := readBuffer.ReadUint16("EventId", 16) if _EventIdErr != nil { return nil, errors.Wrap(_EventIdErr, "Error parsing 'EventId' field of S7PayloadDiagnosticMessage") } EventId := _EventId // Simple Field (PriorityClass) - _PriorityClass, _PriorityClassErr := readBuffer.ReadUint8("PriorityClass", 8) +_PriorityClass, _PriorityClassErr := readBuffer.ReadUint8("PriorityClass", 8) if _PriorityClassErr != nil { return nil, errors.Wrap(_PriorityClassErr, "Error parsing 'PriorityClass' field of S7PayloadDiagnosticMessage") } PriorityClass := _PriorityClass // Simple Field (ObNumber) - _ObNumber, _ObNumberErr := readBuffer.ReadUint8("ObNumber", 8) +_ObNumber, _ObNumberErr := readBuffer.ReadUint8("ObNumber", 8) if _ObNumberErr != nil { return nil, errors.Wrap(_ObNumberErr, "Error parsing 'ObNumber' field of S7PayloadDiagnosticMessage") } ObNumber := _ObNumber // Simple Field (DatId) - _DatId, _DatIdErr := readBuffer.ReadUint16("DatId", 16) +_DatId, _DatIdErr := readBuffer.ReadUint16("DatId", 16) if _DatIdErr != nil { return nil, errors.Wrap(_DatIdErr, "Error parsing 'DatId' field of S7PayloadDiagnosticMessage") } DatId := _DatId // Simple Field (Info1) - _Info1, _Info1Err := readBuffer.ReadUint16("Info1", 16) +_Info1, _Info1Err := readBuffer.ReadUint16("Info1", 16) if _Info1Err != nil { return nil, errors.Wrap(_Info1Err, "Error parsing 'Info1' field of S7PayloadDiagnosticMessage") } Info1 := _Info1 // Simple Field (Info2) - _Info2, _Info2Err := readBuffer.ReadUint32("Info2", 32) +_Info2, _Info2Err := readBuffer.ReadUint32("Info2", 32) if _Info2Err != nil { return nil, errors.Wrap(_Info2Err, "Error parsing 'Info2' field of S7PayloadDiagnosticMessage") } @@ -257,7 +258,7 @@ func S7PayloadDiagnosticMessageParseWithBuffer(ctx context.Context, readBuffer u if pullErr := readBuffer.PullContext("TimeStamp"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for TimeStamp") } - _TimeStamp, _TimeStampErr := DateAndTimeParseWithBuffer(ctx, readBuffer) +_TimeStamp, _TimeStampErr := DateAndTimeParseWithBuffer(ctx, readBuffer) if _TimeStampErr != nil { return nil, errors.Wrap(_TimeStampErr, "Error parsing 'TimeStamp' field of S7PayloadDiagnosticMessage") } @@ -272,14 +273,15 @@ func S7PayloadDiagnosticMessageParseWithBuffer(ctx context.Context, readBuffer u // Create a partially initialized instance _child := &_S7PayloadDiagnosticMessage{ - _S7PayloadUserDataItem: &_S7PayloadUserDataItem{}, - EventId: EventId, - PriorityClass: PriorityClass, - ObNumber: ObNumber, - DatId: DatId, - Info1: Info1, - Info2: Info2, - TimeStamp: TimeStamp, + _S7PayloadUserDataItem: &_S7PayloadUserDataItem{ + }, + EventId: EventId, + PriorityClass: PriorityClass, + ObNumber: ObNumber, + DatId: DatId, + Info1: Info1, + Info2: Info2, + TimeStamp: TimeStamp, } _child._S7PayloadUserDataItem._S7PayloadUserDataItemChildRequirements = _child return _child, nil @@ -301,59 +303,59 @@ func (m *_S7PayloadDiagnosticMessage) SerializeWithWriteBuffer(ctx context.Conte return errors.Wrap(pushErr, "Error pushing for S7PayloadDiagnosticMessage") } - // Simple Field (EventId) - EventId := uint16(m.GetEventId()) - _EventIdErr := writeBuffer.WriteUint16("EventId", 16, (EventId)) - if _EventIdErr != nil { - return errors.Wrap(_EventIdErr, "Error serializing 'EventId' field") - } + // Simple Field (EventId) + EventId := uint16(m.GetEventId()) + _EventIdErr := writeBuffer.WriteUint16("EventId", 16, (EventId)) + if _EventIdErr != nil { + return errors.Wrap(_EventIdErr, "Error serializing 'EventId' field") + } - // Simple Field (PriorityClass) - PriorityClass := uint8(m.GetPriorityClass()) - _PriorityClassErr := writeBuffer.WriteUint8("PriorityClass", 8, (PriorityClass)) - if _PriorityClassErr != nil { - return errors.Wrap(_PriorityClassErr, "Error serializing 'PriorityClass' field") - } + // Simple Field (PriorityClass) + PriorityClass := uint8(m.GetPriorityClass()) + _PriorityClassErr := writeBuffer.WriteUint8("PriorityClass", 8, (PriorityClass)) + if _PriorityClassErr != nil { + return errors.Wrap(_PriorityClassErr, "Error serializing 'PriorityClass' field") + } - // Simple Field (ObNumber) - ObNumber := uint8(m.GetObNumber()) - _ObNumberErr := writeBuffer.WriteUint8("ObNumber", 8, (ObNumber)) - if _ObNumberErr != nil { - return errors.Wrap(_ObNumberErr, "Error serializing 'ObNumber' field") - } + // Simple Field (ObNumber) + ObNumber := uint8(m.GetObNumber()) + _ObNumberErr := writeBuffer.WriteUint8("ObNumber", 8, (ObNumber)) + if _ObNumberErr != nil { + return errors.Wrap(_ObNumberErr, "Error serializing 'ObNumber' field") + } - // Simple Field (DatId) - DatId := uint16(m.GetDatId()) - _DatIdErr := writeBuffer.WriteUint16("DatId", 16, (DatId)) - if _DatIdErr != nil { - return errors.Wrap(_DatIdErr, "Error serializing 'DatId' field") - } + // Simple Field (DatId) + DatId := uint16(m.GetDatId()) + _DatIdErr := writeBuffer.WriteUint16("DatId", 16, (DatId)) + if _DatIdErr != nil { + return errors.Wrap(_DatIdErr, "Error serializing 'DatId' field") + } - // Simple Field (Info1) - Info1 := uint16(m.GetInfo1()) - _Info1Err := writeBuffer.WriteUint16("Info1", 16, (Info1)) - if _Info1Err != nil { - return errors.Wrap(_Info1Err, "Error serializing 'Info1' field") - } + // Simple Field (Info1) + Info1 := uint16(m.GetInfo1()) + _Info1Err := writeBuffer.WriteUint16("Info1", 16, (Info1)) + if _Info1Err != nil { + return errors.Wrap(_Info1Err, "Error serializing 'Info1' field") + } - // Simple Field (Info2) - Info2 := uint32(m.GetInfo2()) - _Info2Err := writeBuffer.WriteUint32("Info2", 32, (Info2)) - if _Info2Err != nil { - return errors.Wrap(_Info2Err, "Error serializing 'Info2' field") - } + // Simple Field (Info2) + Info2 := uint32(m.GetInfo2()) + _Info2Err := writeBuffer.WriteUint32("Info2", 32, (Info2)) + if _Info2Err != nil { + return errors.Wrap(_Info2Err, "Error serializing 'Info2' field") + } - // Simple Field (TimeStamp) - if pushErr := writeBuffer.PushContext("TimeStamp"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for TimeStamp") - } - _TimeStampErr := writeBuffer.WriteSerializable(ctx, m.GetTimeStamp()) - if popErr := writeBuffer.PopContext("TimeStamp"); popErr != nil { - return errors.Wrap(popErr, "Error popping for TimeStamp") - } - if _TimeStampErr != nil { - return errors.Wrap(_TimeStampErr, "Error serializing 'TimeStamp' field") - } + // Simple Field (TimeStamp) + if pushErr := writeBuffer.PushContext("TimeStamp"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for TimeStamp") + } + _TimeStampErr := writeBuffer.WriteSerializable(ctx, m.GetTimeStamp()) + if popErr := writeBuffer.PopContext("TimeStamp"); popErr != nil { + return errors.Wrap(popErr, "Error popping for TimeStamp") + } + if _TimeStampErr != nil { + return errors.Wrap(_TimeStampErr, "Error serializing 'TimeStamp' field") + } if popErr := writeBuffer.PopContext("S7PayloadDiagnosticMessage"); popErr != nil { return errors.Wrap(popErr, "Error popping for S7PayloadDiagnosticMessage") @@ -363,6 +365,7 @@ func (m *_S7PayloadDiagnosticMessage) SerializeWithWriteBuffer(ctx context.Conte return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_S7PayloadDiagnosticMessage) isS7PayloadDiagnosticMessage() bool { return true } @@ -377,3 +380,6 @@ func (m *_S7PayloadDiagnosticMessage) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7PayloadNotify.go b/plc4go/protocols/s7/readwrite/model/S7PayloadNotify.go index 1b68dd37d5e..b63820c50d4 100644 --- a/plc4go/protocols/s7/readwrite/model/S7PayloadNotify.go +++ b/plc4go/protocols/s7/readwrite/model/S7PayloadNotify.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7PayloadNotify is the corresponding interface of S7PayloadNotify type S7PayloadNotify interface { @@ -46,40 +48,37 @@ type S7PayloadNotifyExactly interface { // _S7PayloadNotify is the data-structure of this message type _S7PayloadNotify struct { *_S7PayloadUserDataItem - AlarmMessage AlarmMessagePushType + AlarmMessage AlarmMessagePushType } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_S7PayloadNotify) GetCpuFunctionType() uint8 { - return 0x00 -} +func (m *_S7PayloadNotify) GetCpuFunctionType() uint8 { +return 0x00} -func (m *_S7PayloadNotify) GetCpuSubfunction() uint8 { - return 0x06 -} +func (m *_S7PayloadNotify) GetCpuSubfunction() uint8 { +return 0x06} -func (m *_S7PayloadNotify) GetDataLength() uint16 { - return 0 -} +func (m *_S7PayloadNotify) GetDataLength() uint16 { +return 0} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_S7PayloadNotify) InitializeParent(parent S7PayloadUserDataItem, returnCode DataTransportErrorCode, transportSize DataTransportSize) { - m.ReturnCode = returnCode +func (m *_S7PayloadNotify) InitializeParent(parent S7PayloadUserDataItem , returnCode DataTransportErrorCode , transportSize DataTransportSize ) { m.ReturnCode = returnCode m.TransportSize = transportSize } -func (m *_S7PayloadNotify) GetParent() S7PayloadUserDataItem { +func (m *_S7PayloadNotify) GetParent() S7PayloadUserDataItem { return m._S7PayloadUserDataItem } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -94,11 +93,12 @@ func (m *_S7PayloadNotify) GetAlarmMessage() AlarmMessagePushType { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewS7PayloadNotify factory function for _S7PayloadNotify -func NewS7PayloadNotify(alarmMessage AlarmMessagePushType, returnCode DataTransportErrorCode, transportSize DataTransportSize) *_S7PayloadNotify { +func NewS7PayloadNotify( alarmMessage AlarmMessagePushType , returnCode DataTransportErrorCode , transportSize DataTransportSize ) *_S7PayloadNotify { _result := &_S7PayloadNotify{ - AlarmMessage: alarmMessage, - _S7PayloadUserDataItem: NewS7PayloadUserDataItem(returnCode, transportSize), + AlarmMessage: alarmMessage, + _S7PayloadUserDataItem: NewS7PayloadUserDataItem(returnCode, transportSize), } _result._S7PayloadUserDataItem._S7PayloadUserDataItemChildRequirements = _result return _result @@ -106,7 +106,7 @@ func NewS7PayloadNotify(alarmMessage AlarmMessagePushType, returnCode DataTransp // Deprecated: use the interface for direct cast func CastS7PayloadNotify(structType interface{}) S7PayloadNotify { - if casted, ok := structType.(S7PayloadNotify); ok { + if casted, ok := structType.(S7PayloadNotify); ok { return casted } if casted, ok := structType.(*S7PayloadNotify); ok { @@ -128,6 +128,7 @@ func (m *_S7PayloadNotify) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_S7PayloadNotify) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -149,7 +150,7 @@ func S7PayloadNotifyParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu if pullErr := readBuffer.PullContext("alarmMessage"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for alarmMessage") } - _alarmMessage, _alarmMessageErr := AlarmMessagePushTypeParseWithBuffer(ctx, readBuffer) +_alarmMessage, _alarmMessageErr := AlarmMessagePushTypeParseWithBuffer(ctx, readBuffer) if _alarmMessageErr != nil { return nil, errors.Wrap(_alarmMessageErr, "Error parsing 'alarmMessage' field of S7PayloadNotify") } @@ -164,8 +165,9 @@ func S7PayloadNotifyParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu // Create a partially initialized instance _child := &_S7PayloadNotify{ - _S7PayloadUserDataItem: &_S7PayloadUserDataItem{}, - AlarmMessage: alarmMessage, + _S7PayloadUserDataItem: &_S7PayloadUserDataItem{ + }, + AlarmMessage: alarmMessage, } _child._S7PayloadUserDataItem._S7PayloadUserDataItemChildRequirements = _child return _child, nil @@ -187,17 +189,17 @@ func (m *_S7PayloadNotify) SerializeWithWriteBuffer(ctx context.Context, writeBu return errors.Wrap(pushErr, "Error pushing for S7PayloadNotify") } - // Simple Field (alarmMessage) - if pushErr := writeBuffer.PushContext("alarmMessage"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for alarmMessage") - } - _alarmMessageErr := writeBuffer.WriteSerializable(ctx, m.GetAlarmMessage()) - if popErr := writeBuffer.PopContext("alarmMessage"); popErr != nil { - return errors.Wrap(popErr, "Error popping for alarmMessage") - } - if _alarmMessageErr != nil { - return errors.Wrap(_alarmMessageErr, "Error serializing 'alarmMessage' field") - } + // Simple Field (alarmMessage) + if pushErr := writeBuffer.PushContext("alarmMessage"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for alarmMessage") + } + _alarmMessageErr := writeBuffer.WriteSerializable(ctx, m.GetAlarmMessage()) + if popErr := writeBuffer.PopContext("alarmMessage"); popErr != nil { + return errors.Wrap(popErr, "Error popping for alarmMessage") + } + if _alarmMessageErr != nil { + return errors.Wrap(_alarmMessageErr, "Error serializing 'alarmMessage' field") + } if popErr := writeBuffer.PopContext("S7PayloadNotify"); popErr != nil { return errors.Wrap(popErr, "Error popping for S7PayloadNotify") @@ -207,6 +209,7 @@ func (m *_S7PayloadNotify) SerializeWithWriteBuffer(ctx context.Context, writeBu return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_S7PayloadNotify) isS7PayloadNotify() bool { return true } @@ -221,3 +224,6 @@ func (m *_S7PayloadNotify) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7PayloadNotify8.go b/plc4go/protocols/s7/readwrite/model/S7PayloadNotify8.go index eb662794f5a..6dc676ecae1 100644 --- a/plc4go/protocols/s7/readwrite/model/S7PayloadNotify8.go +++ b/plc4go/protocols/s7/readwrite/model/S7PayloadNotify8.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7PayloadNotify8 is the corresponding interface of S7PayloadNotify8 type S7PayloadNotify8 interface { @@ -46,40 +48,37 @@ type S7PayloadNotify8Exactly interface { // _S7PayloadNotify8 is the data-structure of this message type _S7PayloadNotify8 struct { *_S7PayloadUserDataItem - AlarmMessage AlarmMessagePushType + AlarmMessage AlarmMessagePushType } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_S7PayloadNotify8) GetCpuFunctionType() uint8 { - return 0x00 -} +func (m *_S7PayloadNotify8) GetCpuFunctionType() uint8 { +return 0x00} -func (m *_S7PayloadNotify8) GetCpuSubfunction() uint8 { - return 0x16 -} +func (m *_S7PayloadNotify8) GetCpuSubfunction() uint8 { +return 0x16} -func (m *_S7PayloadNotify8) GetDataLength() uint16 { - return 0 -} +func (m *_S7PayloadNotify8) GetDataLength() uint16 { +return 0} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_S7PayloadNotify8) InitializeParent(parent S7PayloadUserDataItem, returnCode DataTransportErrorCode, transportSize DataTransportSize) { - m.ReturnCode = returnCode +func (m *_S7PayloadNotify8) InitializeParent(parent S7PayloadUserDataItem , returnCode DataTransportErrorCode , transportSize DataTransportSize ) { m.ReturnCode = returnCode m.TransportSize = transportSize } -func (m *_S7PayloadNotify8) GetParent() S7PayloadUserDataItem { +func (m *_S7PayloadNotify8) GetParent() S7PayloadUserDataItem { return m._S7PayloadUserDataItem } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -94,11 +93,12 @@ func (m *_S7PayloadNotify8) GetAlarmMessage() AlarmMessagePushType { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewS7PayloadNotify8 factory function for _S7PayloadNotify8 -func NewS7PayloadNotify8(alarmMessage AlarmMessagePushType, returnCode DataTransportErrorCode, transportSize DataTransportSize) *_S7PayloadNotify8 { +func NewS7PayloadNotify8( alarmMessage AlarmMessagePushType , returnCode DataTransportErrorCode , transportSize DataTransportSize ) *_S7PayloadNotify8 { _result := &_S7PayloadNotify8{ - AlarmMessage: alarmMessage, - _S7PayloadUserDataItem: NewS7PayloadUserDataItem(returnCode, transportSize), + AlarmMessage: alarmMessage, + _S7PayloadUserDataItem: NewS7PayloadUserDataItem(returnCode, transportSize), } _result._S7PayloadUserDataItem._S7PayloadUserDataItemChildRequirements = _result return _result @@ -106,7 +106,7 @@ func NewS7PayloadNotify8(alarmMessage AlarmMessagePushType, returnCode DataTrans // Deprecated: use the interface for direct cast func CastS7PayloadNotify8(structType interface{}) S7PayloadNotify8 { - if casted, ok := structType.(S7PayloadNotify8); ok { + if casted, ok := structType.(S7PayloadNotify8); ok { return casted } if casted, ok := structType.(*S7PayloadNotify8); ok { @@ -128,6 +128,7 @@ func (m *_S7PayloadNotify8) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_S7PayloadNotify8) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -149,7 +150,7 @@ func S7PayloadNotify8ParseWithBuffer(ctx context.Context, readBuffer utils.ReadB if pullErr := readBuffer.PullContext("alarmMessage"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for alarmMessage") } - _alarmMessage, _alarmMessageErr := AlarmMessagePushTypeParseWithBuffer(ctx, readBuffer) +_alarmMessage, _alarmMessageErr := AlarmMessagePushTypeParseWithBuffer(ctx, readBuffer) if _alarmMessageErr != nil { return nil, errors.Wrap(_alarmMessageErr, "Error parsing 'alarmMessage' field of S7PayloadNotify8") } @@ -164,8 +165,9 @@ func S7PayloadNotify8ParseWithBuffer(ctx context.Context, readBuffer utils.ReadB // Create a partially initialized instance _child := &_S7PayloadNotify8{ - _S7PayloadUserDataItem: &_S7PayloadUserDataItem{}, - AlarmMessage: alarmMessage, + _S7PayloadUserDataItem: &_S7PayloadUserDataItem{ + }, + AlarmMessage: alarmMessage, } _child._S7PayloadUserDataItem._S7PayloadUserDataItemChildRequirements = _child return _child, nil @@ -187,17 +189,17 @@ func (m *_S7PayloadNotify8) SerializeWithWriteBuffer(ctx context.Context, writeB return errors.Wrap(pushErr, "Error pushing for S7PayloadNotify8") } - // Simple Field (alarmMessage) - if pushErr := writeBuffer.PushContext("alarmMessage"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for alarmMessage") - } - _alarmMessageErr := writeBuffer.WriteSerializable(ctx, m.GetAlarmMessage()) - if popErr := writeBuffer.PopContext("alarmMessage"); popErr != nil { - return errors.Wrap(popErr, "Error popping for alarmMessage") - } - if _alarmMessageErr != nil { - return errors.Wrap(_alarmMessageErr, "Error serializing 'alarmMessage' field") - } + // Simple Field (alarmMessage) + if pushErr := writeBuffer.PushContext("alarmMessage"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for alarmMessage") + } + _alarmMessageErr := writeBuffer.WriteSerializable(ctx, m.GetAlarmMessage()) + if popErr := writeBuffer.PopContext("alarmMessage"); popErr != nil { + return errors.Wrap(popErr, "Error popping for alarmMessage") + } + if _alarmMessageErr != nil { + return errors.Wrap(_alarmMessageErr, "Error serializing 'alarmMessage' field") + } if popErr := writeBuffer.PopContext("S7PayloadNotify8"); popErr != nil { return errors.Wrap(popErr, "Error popping for S7PayloadNotify8") @@ -207,6 +209,7 @@ func (m *_S7PayloadNotify8) SerializeWithWriteBuffer(ctx context.Context, writeB return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_S7PayloadNotify8) isS7PayloadNotify8() bool { return true } @@ -221,3 +224,6 @@ func (m *_S7PayloadNotify8) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7PayloadReadVarResponse.go b/plc4go/protocols/s7/readwrite/model/S7PayloadReadVarResponse.go index 4dc0009cbad..3c4b6c94d47 100644 --- a/plc4go/protocols/s7/readwrite/model/S7PayloadReadVarResponse.go +++ b/plc4go/protocols/s7/readwrite/model/S7PayloadReadVarResponse.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7PayloadReadVarResponse is the corresponding interface of S7PayloadReadVarResponse type S7PayloadReadVarResponse interface { @@ -47,33 +49,32 @@ type S7PayloadReadVarResponseExactly interface { // _S7PayloadReadVarResponse is the data-structure of this message type _S7PayloadReadVarResponse struct { *_S7Payload - Items []S7VarPayloadDataItem + Items []S7VarPayloadDataItem } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_S7PayloadReadVarResponse) GetParameterParameterType() uint8 { - return 0x04 -} +func (m *_S7PayloadReadVarResponse) GetParameterParameterType() uint8 { +return 0x04} -func (m *_S7PayloadReadVarResponse) GetMessageType() uint8 { - return 0x03 -} +func (m *_S7PayloadReadVarResponse) GetMessageType() uint8 { +return 0x03} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_S7PayloadReadVarResponse) InitializeParent(parent S7Payload) {} +func (m *_S7PayloadReadVarResponse) InitializeParent(parent S7Payload ) {} -func (m *_S7PayloadReadVarResponse) GetParent() S7Payload { +func (m *_S7PayloadReadVarResponse) GetParent() S7Payload { return m._S7Payload } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -88,11 +89,12 @@ func (m *_S7PayloadReadVarResponse) GetItems() []S7VarPayloadDataItem { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewS7PayloadReadVarResponse factory function for _S7PayloadReadVarResponse -func NewS7PayloadReadVarResponse(items []S7VarPayloadDataItem, parameter S7Parameter) *_S7PayloadReadVarResponse { +func NewS7PayloadReadVarResponse( items []S7VarPayloadDataItem , parameter S7Parameter ) *_S7PayloadReadVarResponse { _result := &_S7PayloadReadVarResponse{ - Items: items, - _S7Payload: NewS7Payload(parameter), + Items: items, + _S7Payload: NewS7Payload(parameter), } _result._S7Payload._S7PayloadChildRequirements = _result return _result @@ -100,7 +102,7 @@ func NewS7PayloadReadVarResponse(items []S7VarPayloadDataItem, parameter S7Param // Deprecated: use the interface for direct cast func CastS7PayloadReadVarResponse(structType interface{}) S7PayloadReadVarResponse { - if casted, ok := structType.(S7PayloadReadVarResponse); ok { + if casted, ok := structType.(S7PayloadReadVarResponse); ok { return casted } if casted, ok := structType.(*S7PayloadReadVarResponse); ok { @@ -122,13 +124,14 @@ func (m *_S7PayloadReadVarResponse) GetLengthInBits(ctx context.Context) uint16 arrayCtx := spiContext.CreateArrayContext(ctx, len(m.Items), _curItem) _ = arrayCtx _ = _curItem - lengthInBits += element.(interface{ GetLengthInBits(context.Context) uint16 }).GetLengthInBits(arrayCtx) + lengthInBits += element.(interface{GetLengthInBits(context.Context) uint16}).GetLengthInBits(arrayCtx) } } return lengthInBits } + func (m *_S7PayloadReadVarResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -162,7 +165,7 @@ func S7PayloadReadVarResponseParseWithBuffer(ctx context.Context, readBuffer uti arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := S7VarPayloadDataItemParseWithBuffer(arrayCtx, readBuffer) +_item, _err := S7VarPayloadDataItemParseWithBuffer(arrayCtx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'items' field of S7PayloadReadVarResponse") } @@ -204,22 +207,22 @@ func (m *_S7PayloadReadVarResponse) SerializeWithWriteBuffer(ctx context.Context return errors.Wrap(pushErr, "Error pushing for S7PayloadReadVarResponse") } - // Array Field (items) - if pushErr := writeBuffer.PushContext("items", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for items") - } - for _curItem, _element := range m.GetItems() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetItems()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'items' field") - } - } - if popErr := writeBuffer.PopContext("items", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for items") + // Array Field (items) + if pushErr := writeBuffer.PushContext("items", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for items") + } + for _curItem, _element := range m.GetItems() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetItems()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'items' field") } + } + if popErr := writeBuffer.PopContext("items", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for items") + } if popErr := writeBuffer.PopContext("S7PayloadReadVarResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for S7PayloadReadVarResponse") @@ -229,6 +232,7 @@ func (m *_S7PayloadReadVarResponse) SerializeWithWriteBuffer(ctx context.Context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_S7PayloadReadVarResponse) isS7PayloadReadVarResponse() bool { return true } @@ -243,3 +247,6 @@ func (m *_S7PayloadReadVarResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7PayloadUserData.go b/plc4go/protocols/s7/readwrite/model/S7PayloadUserData.go index 3d8e0a09d32..e6cde226b2e 100644 --- a/plc4go/protocols/s7/readwrite/model/S7PayloadUserData.go +++ b/plc4go/protocols/s7/readwrite/model/S7PayloadUserData.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7PayloadUserData is the corresponding interface of S7PayloadUserData type S7PayloadUserData interface { @@ -47,33 +49,32 @@ type S7PayloadUserDataExactly interface { // _S7PayloadUserData is the data-structure of this message type _S7PayloadUserData struct { *_S7Payload - Items []S7PayloadUserDataItem + Items []S7PayloadUserDataItem } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_S7PayloadUserData) GetParameterParameterType() uint8 { - return 0x00 -} +func (m *_S7PayloadUserData) GetParameterParameterType() uint8 { +return 0x00} -func (m *_S7PayloadUserData) GetMessageType() uint8 { - return 0x07 -} +func (m *_S7PayloadUserData) GetMessageType() uint8 { +return 0x07} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_S7PayloadUserData) InitializeParent(parent S7Payload) {} +func (m *_S7PayloadUserData) InitializeParent(parent S7Payload ) {} -func (m *_S7PayloadUserData) GetParent() S7Payload { +func (m *_S7PayloadUserData) GetParent() S7Payload { return m._S7Payload } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -88,11 +89,12 @@ func (m *_S7PayloadUserData) GetItems() []S7PayloadUserDataItem { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewS7PayloadUserData factory function for _S7PayloadUserData -func NewS7PayloadUserData(items []S7PayloadUserDataItem, parameter S7Parameter) *_S7PayloadUserData { +func NewS7PayloadUserData( items []S7PayloadUserDataItem , parameter S7Parameter ) *_S7PayloadUserData { _result := &_S7PayloadUserData{ - Items: items, - _S7Payload: NewS7Payload(parameter), + Items: items, + _S7Payload: NewS7Payload(parameter), } _result._S7Payload._S7PayloadChildRequirements = _result return _result @@ -100,7 +102,7 @@ func NewS7PayloadUserData(items []S7PayloadUserDataItem, parameter S7Parameter) // Deprecated: use the interface for direct cast func CastS7PayloadUserData(structType interface{}) S7PayloadUserData { - if casted, ok := structType.(S7PayloadUserData); ok { + if casted, ok := structType.(S7PayloadUserData); ok { return casted } if casted, ok := structType.(*S7PayloadUserData); ok { @@ -122,13 +124,14 @@ func (m *_S7PayloadUserData) GetLengthInBits(ctx context.Context) uint16 { arrayCtx := spiContext.CreateArrayContext(ctx, len(m.Items), _curItem) _ = arrayCtx _ = _curItem - lengthInBits += element.(interface{ GetLengthInBits(context.Context) uint16 }).GetLengthInBits(arrayCtx) + lengthInBits += element.(interface{GetLengthInBits(context.Context) uint16}).GetLengthInBits(arrayCtx) } } return lengthInBits } + func (m *_S7PayloadUserData) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -162,7 +165,7 @@ func S7PayloadUserDataParseWithBuffer(ctx context.Context, readBuffer utils.Read arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := S7PayloadUserDataItemParseWithBuffer(arrayCtx, readBuffer, CastS7ParameterUserDataItemCPUFunctions(CastS7ParameterUserData(parameter).GetItems()[0]).GetCpuFunctionType(), CastS7ParameterUserDataItemCPUFunctions(CastS7ParameterUserData(parameter).GetItems()[0]).GetCpuSubfunction()) +_item, _err := S7PayloadUserDataItemParseWithBuffer(arrayCtx, readBuffer , CastS7ParameterUserDataItemCPUFunctions(CastS7ParameterUserData(parameter).GetItems()[0]).GetCpuFunctionType() , CastS7ParameterUserDataItemCPUFunctions(CastS7ParameterUserData(parameter).GetItems()[0]).GetCpuSubfunction() ) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'items' field of S7PayloadUserData") } @@ -204,22 +207,22 @@ func (m *_S7PayloadUserData) SerializeWithWriteBuffer(ctx context.Context, write return errors.Wrap(pushErr, "Error pushing for S7PayloadUserData") } - // Array Field (items) - if pushErr := writeBuffer.PushContext("items", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for items") - } - for _curItem, _element := range m.GetItems() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetItems()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'items' field") - } - } - if popErr := writeBuffer.PopContext("items", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for items") + // Array Field (items) + if pushErr := writeBuffer.PushContext("items", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for items") + } + for _curItem, _element := range m.GetItems() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetItems()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'items' field") } + } + if popErr := writeBuffer.PopContext("items", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for items") + } if popErr := writeBuffer.PopContext("S7PayloadUserData"); popErr != nil { return errors.Wrap(popErr, "Error popping for S7PayloadUserData") @@ -229,6 +232,7 @@ func (m *_S7PayloadUserData) SerializeWithWriteBuffer(ctx context.Context, write return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_S7PayloadUserData) isS7PayloadUserData() bool { return true } @@ -243,3 +247,6 @@ func (m *_S7PayloadUserData) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItem.go b/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItem.go index 4a36ed40d36..d206d005ebf 100644 --- a/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItem.go +++ b/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItem.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7PayloadUserDataItem is the corresponding interface of S7PayloadUserDataItem type S7PayloadUserDataItem interface { @@ -53,8 +55,8 @@ type S7PayloadUserDataItemExactly interface { // _S7PayloadUserDataItem is the data-structure of this message type _S7PayloadUserDataItem struct { _S7PayloadUserDataItemChildRequirements - ReturnCode DataTransportErrorCode - TransportSize DataTransportSize + ReturnCode DataTransportErrorCode + TransportSize DataTransportSize } type _S7PayloadUserDataItemChildRequirements interface { @@ -65,6 +67,7 @@ type _S7PayloadUserDataItemChildRequirements interface { GetDataLength() uint16 } + type S7PayloadUserDataItemParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child S7PayloadUserDataItem, serializeChildFunction func() error) error GetTypeName() string @@ -72,13 +75,12 @@ type S7PayloadUserDataItemParent interface { type S7PayloadUserDataItemChild interface { utils.Serializable - InitializeParent(parent S7PayloadUserDataItem, returnCode DataTransportErrorCode, transportSize DataTransportSize) +InitializeParent(parent S7PayloadUserDataItem , returnCode DataTransportErrorCode , transportSize DataTransportSize ) GetParent() *S7PayloadUserDataItem GetTypeName() string S7PayloadUserDataItem } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -97,14 +99,15 @@ func (m *_S7PayloadUserDataItem) GetTransportSize() DataTransportSize { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewS7PayloadUserDataItem factory function for _S7PayloadUserDataItem -func NewS7PayloadUserDataItem(returnCode DataTransportErrorCode, transportSize DataTransportSize) *_S7PayloadUserDataItem { - return &_S7PayloadUserDataItem{ReturnCode: returnCode, TransportSize: transportSize} +func NewS7PayloadUserDataItem( returnCode DataTransportErrorCode , transportSize DataTransportSize ) *_S7PayloadUserDataItem { +return &_S7PayloadUserDataItem{ ReturnCode: returnCode , TransportSize: transportSize } } // Deprecated: use the interface for direct cast func CastS7PayloadUserDataItem(structType interface{}) S7PayloadUserDataItem { - if casted, ok := structType.(S7PayloadUserDataItem); ok { + if casted, ok := structType.(S7PayloadUserDataItem); ok { return casted } if casted, ok := structType.(*S7PayloadUserDataItem); ok { @@ -117,6 +120,7 @@ func (m *_S7PayloadUserDataItem) GetTypeName() string { return "S7PayloadUserDataItem" } + func (m *_S7PayloadUserDataItem) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) @@ -153,7 +157,7 @@ func S7PayloadUserDataItemParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("returnCode"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for returnCode") } - _returnCode, _returnCodeErr := DataTransportErrorCodeParseWithBuffer(ctx, readBuffer) +_returnCode, _returnCodeErr := DataTransportErrorCodeParseWithBuffer(ctx, readBuffer) if _returnCodeErr != nil { return nil, errors.Wrap(_returnCodeErr, "Error parsing 'returnCode' field of S7PayloadUserDataItem") } @@ -166,7 +170,7 @@ func S7PayloadUserDataItemParseWithBuffer(ctx context.Context, readBuffer utils. if pullErr := readBuffer.PullContext("transportSize"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for transportSize") } - _transportSize, _transportSizeErr := DataTransportSizeParseWithBuffer(ctx, readBuffer) +_transportSize, _transportSizeErr := DataTransportSizeParseWithBuffer(ctx, readBuffer) if _transportSizeErr != nil { return nil, errors.Wrap(_transportSizeErr, "Error parsing 'transportSize' field of S7PayloadUserDataItem") } @@ -185,48 +189,48 @@ func S7PayloadUserDataItemParseWithBuffer(ctx context.Context, readBuffer utils. // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type S7PayloadUserDataItemChildSerializeRequirement interface { S7PayloadUserDataItem - InitializeParent(S7PayloadUserDataItem, DataTransportErrorCode, DataTransportSize) + InitializeParent(S7PayloadUserDataItem, DataTransportErrorCode, DataTransportSize) GetParent() S7PayloadUserDataItem } var _childTemp interface{} var _child S7PayloadUserDataItemChildSerializeRequirement var typeSwitchError error switch { - case cpuFunctionType == 0x00 && cpuSubfunction == 0x03: // S7PayloadDiagnosticMessage +case cpuFunctionType == 0x00 && cpuSubfunction == 0x03 : // S7PayloadDiagnosticMessage _childTemp, typeSwitchError = S7PayloadDiagnosticMessageParseWithBuffer(ctx, readBuffer, cpuFunctionType, cpuSubfunction) - case cpuFunctionType == 0x00 && cpuSubfunction == 0x05: // S7PayloadAlarm8 +case cpuFunctionType == 0x00 && cpuSubfunction == 0x05 : // S7PayloadAlarm8 _childTemp, typeSwitchError = S7PayloadAlarm8ParseWithBuffer(ctx, readBuffer, cpuFunctionType, cpuSubfunction) - case cpuFunctionType == 0x00 && cpuSubfunction == 0x06: // S7PayloadNotify +case cpuFunctionType == 0x00 && cpuSubfunction == 0x06 : // S7PayloadNotify _childTemp, typeSwitchError = S7PayloadNotifyParseWithBuffer(ctx, readBuffer, cpuFunctionType, cpuSubfunction) - case cpuFunctionType == 0x00 && cpuSubfunction == 0x0c: // S7PayloadAlarmAckInd +case cpuFunctionType == 0x00 && cpuSubfunction == 0x0c : // S7PayloadAlarmAckInd _childTemp, typeSwitchError = S7PayloadAlarmAckIndParseWithBuffer(ctx, readBuffer, cpuFunctionType, cpuSubfunction) - case cpuFunctionType == 0x00 && cpuSubfunction == 0x11: // S7PayloadAlarmSQ +case cpuFunctionType == 0x00 && cpuSubfunction == 0x11 : // S7PayloadAlarmSQ _childTemp, typeSwitchError = S7PayloadAlarmSQParseWithBuffer(ctx, readBuffer, cpuFunctionType, cpuSubfunction) - case cpuFunctionType == 0x00 && cpuSubfunction == 0x12: // S7PayloadAlarmS +case cpuFunctionType == 0x00 && cpuSubfunction == 0x12 : // S7PayloadAlarmS _childTemp, typeSwitchError = S7PayloadAlarmSParseWithBuffer(ctx, readBuffer, cpuFunctionType, cpuSubfunction) - case cpuFunctionType == 0x00 && cpuSubfunction == 0x13: // S7PayloadAlarmSC +case cpuFunctionType == 0x00 && cpuSubfunction == 0x13 : // S7PayloadAlarmSC _childTemp, typeSwitchError = S7PayloadAlarmSCParseWithBuffer(ctx, readBuffer, cpuFunctionType, cpuSubfunction) - case cpuFunctionType == 0x00 && cpuSubfunction == 0x16: // S7PayloadNotify8 +case cpuFunctionType == 0x00 && cpuSubfunction == 0x16 : // S7PayloadNotify8 _childTemp, typeSwitchError = S7PayloadNotify8ParseWithBuffer(ctx, readBuffer, cpuFunctionType, cpuSubfunction) - case cpuFunctionType == 0x04 && cpuSubfunction == 0x01: // S7PayloadUserDataItemCpuFunctionReadSzlRequest +case cpuFunctionType == 0x04 && cpuSubfunction == 0x01 : // S7PayloadUserDataItemCpuFunctionReadSzlRequest _childTemp, typeSwitchError = S7PayloadUserDataItemCpuFunctionReadSzlRequestParseWithBuffer(ctx, readBuffer, cpuFunctionType, cpuSubfunction) - case cpuFunctionType == 0x08 && cpuSubfunction == 0x01: // S7PayloadUserDataItemCpuFunctionReadSzlResponse +case cpuFunctionType == 0x08 && cpuSubfunction == 0x01 : // S7PayloadUserDataItemCpuFunctionReadSzlResponse _childTemp, typeSwitchError = S7PayloadUserDataItemCpuFunctionReadSzlResponseParseWithBuffer(ctx, readBuffer, cpuFunctionType, cpuSubfunction) - case cpuFunctionType == 0x04 && cpuSubfunction == 0x02: // S7PayloadUserDataItemCpuFunctionMsgSubscription +case cpuFunctionType == 0x04 && cpuSubfunction == 0x02 : // S7PayloadUserDataItemCpuFunctionMsgSubscription _childTemp, typeSwitchError = S7PayloadUserDataItemCpuFunctionMsgSubscriptionParseWithBuffer(ctx, readBuffer, cpuFunctionType, cpuSubfunction) - case cpuFunctionType == 0x08 && cpuSubfunction == 0x02 && dataLength == 0x00: // S7PayloadUserDataItemCpuFunctionMsgSubscriptionResponse +case cpuFunctionType == 0x08 && cpuSubfunction == 0x02 && dataLength == 0x00 : // S7PayloadUserDataItemCpuFunctionMsgSubscriptionResponse _childTemp, typeSwitchError = S7PayloadUserDataItemCpuFunctionMsgSubscriptionResponseParseWithBuffer(ctx, readBuffer, cpuFunctionType, cpuSubfunction) - case cpuFunctionType == 0x08 && cpuSubfunction == 0x02 && dataLength == 0x02: // S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse +case cpuFunctionType == 0x08 && cpuSubfunction == 0x02 && dataLength == 0x02 : // S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse _childTemp, typeSwitchError = S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponseParseWithBuffer(ctx, readBuffer, cpuFunctionType, cpuSubfunction) - case cpuFunctionType == 0x08 && cpuSubfunction == 0x02 && dataLength == 0x05: // S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse +case cpuFunctionType == 0x08 && cpuSubfunction == 0x02 && dataLength == 0x05 : // S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse _childTemp, typeSwitchError = S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponseParseWithBuffer(ctx, readBuffer, cpuFunctionType, cpuSubfunction) - case cpuFunctionType == 0x04 && cpuSubfunction == 0x0b: // S7PayloadUserDataItemCpuFunctionAlarmAck +case cpuFunctionType == 0x04 && cpuSubfunction == 0x0b : // S7PayloadUserDataItemCpuFunctionAlarmAck _childTemp, typeSwitchError = S7PayloadUserDataItemCpuFunctionAlarmAckParseWithBuffer(ctx, readBuffer, cpuFunctionType, cpuSubfunction) - case cpuFunctionType == 0x08 && cpuSubfunction == 0x0b: // S7PayloadUserDataItemCpuFunctionAlarmAckResponse +case cpuFunctionType == 0x08 && cpuSubfunction == 0x0b : // S7PayloadUserDataItemCpuFunctionAlarmAckResponse _childTemp, typeSwitchError = S7PayloadUserDataItemCpuFunctionAlarmAckResponseParseWithBuffer(ctx, readBuffer, cpuFunctionType, cpuSubfunction) - case cpuFunctionType == 0x04 && cpuSubfunction == 0x13: // S7PayloadUserDataItemCpuFunctionAlarmQuery +case cpuFunctionType == 0x04 && cpuSubfunction == 0x13 : // S7PayloadUserDataItemCpuFunctionAlarmQuery _childTemp, typeSwitchError = S7PayloadUserDataItemCpuFunctionAlarmQueryParseWithBuffer(ctx, readBuffer, cpuFunctionType, cpuSubfunction) - case cpuFunctionType == 0x08 && cpuSubfunction == 0x13: // S7PayloadUserDataItemCpuFunctionAlarmQueryResponse +case cpuFunctionType == 0x08 && cpuSubfunction == 0x13 : // S7PayloadUserDataItemCpuFunctionAlarmQueryResponse _childTemp, typeSwitchError = S7PayloadUserDataItemCpuFunctionAlarmQueryResponseParseWithBuffer(ctx, readBuffer, cpuFunctionType, cpuSubfunction) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [cpuFunctionType=%v, cpuSubfunction=%v, dataLength=%v]", cpuFunctionType, cpuSubfunction, dataLength) @@ -241,7 +245,7 @@ func S7PayloadUserDataItemParseWithBuffer(ctx context.Context, readBuffer utils. } // Finish initializing - _child.InitializeParent(_child, returnCode, transportSize) +_child.InitializeParent(_child , returnCode , transportSize ) return _child, nil } @@ -251,7 +255,7 @@ func (pm *_S7PayloadUserDataItem) SerializeParent(ctx context.Context, writeBuff _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("S7PayloadUserDataItem"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("S7PayloadUserDataItem"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for S7PayloadUserDataItem") } @@ -297,6 +301,7 @@ func (pm *_S7PayloadUserDataItem) SerializeParent(ctx context.Context, writeBuff return nil } + func (m *_S7PayloadUserDataItem) isS7PayloadUserDataItem() bool { return true } @@ -311,3 +316,6 @@ func (m *_S7PayloadUserDataItem) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItemCpuFunctionAlarmAck.go b/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItemCpuFunctionAlarmAck.go index b69711fbb35..eaf9db08354 100644 --- a/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItemCpuFunctionAlarmAck.go +++ b/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItemCpuFunctionAlarmAck.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7PayloadUserDataItemCpuFunctionAlarmAck is the corresponding interface of S7PayloadUserDataItemCpuFunctionAlarmAck type S7PayloadUserDataItemCpuFunctionAlarmAck interface { @@ -49,41 +51,38 @@ type S7PayloadUserDataItemCpuFunctionAlarmAckExactly interface { // _S7PayloadUserDataItemCpuFunctionAlarmAck is the data-structure of this message type _S7PayloadUserDataItemCpuFunctionAlarmAck struct { *_S7PayloadUserDataItem - FunctionId uint8 - MessageObjects []AlarmMessageObjectAckType + FunctionId uint8 + MessageObjects []AlarmMessageObjectAckType } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_S7PayloadUserDataItemCpuFunctionAlarmAck) GetCpuFunctionType() uint8 { - return 0x04 -} +func (m *_S7PayloadUserDataItemCpuFunctionAlarmAck) GetCpuFunctionType() uint8 { +return 0x04} -func (m *_S7PayloadUserDataItemCpuFunctionAlarmAck) GetCpuSubfunction() uint8 { - return 0x0b -} +func (m *_S7PayloadUserDataItemCpuFunctionAlarmAck) GetCpuSubfunction() uint8 { +return 0x0b} -func (m *_S7PayloadUserDataItemCpuFunctionAlarmAck) GetDataLength() uint16 { - return 0 -} +func (m *_S7PayloadUserDataItemCpuFunctionAlarmAck) GetDataLength() uint16 { +return 0} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_S7PayloadUserDataItemCpuFunctionAlarmAck) InitializeParent(parent S7PayloadUserDataItem, returnCode DataTransportErrorCode, transportSize DataTransportSize) { - m.ReturnCode = returnCode +func (m *_S7PayloadUserDataItemCpuFunctionAlarmAck) InitializeParent(parent S7PayloadUserDataItem , returnCode DataTransportErrorCode , transportSize DataTransportSize ) { m.ReturnCode = returnCode m.TransportSize = transportSize } -func (m *_S7PayloadUserDataItemCpuFunctionAlarmAck) GetParent() S7PayloadUserDataItem { +func (m *_S7PayloadUserDataItemCpuFunctionAlarmAck) GetParent() S7PayloadUserDataItem { return m._S7PayloadUserDataItem } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -102,12 +101,13 @@ func (m *_S7PayloadUserDataItemCpuFunctionAlarmAck) GetMessageObjects() []AlarmM /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewS7PayloadUserDataItemCpuFunctionAlarmAck factory function for _S7PayloadUserDataItemCpuFunctionAlarmAck -func NewS7PayloadUserDataItemCpuFunctionAlarmAck(functionId uint8, messageObjects []AlarmMessageObjectAckType, returnCode DataTransportErrorCode, transportSize DataTransportSize) *_S7PayloadUserDataItemCpuFunctionAlarmAck { +func NewS7PayloadUserDataItemCpuFunctionAlarmAck( functionId uint8 , messageObjects []AlarmMessageObjectAckType , returnCode DataTransportErrorCode , transportSize DataTransportSize ) *_S7PayloadUserDataItemCpuFunctionAlarmAck { _result := &_S7PayloadUserDataItemCpuFunctionAlarmAck{ - FunctionId: functionId, - MessageObjects: messageObjects, - _S7PayloadUserDataItem: NewS7PayloadUserDataItem(returnCode, transportSize), + FunctionId: functionId, + MessageObjects: messageObjects, + _S7PayloadUserDataItem: NewS7PayloadUserDataItem(returnCode, transportSize), } _result._S7PayloadUserDataItem._S7PayloadUserDataItemChildRequirements = _result return _result @@ -115,7 +115,7 @@ func NewS7PayloadUserDataItemCpuFunctionAlarmAck(functionId uint8, messageObject // Deprecated: use the interface for direct cast func CastS7PayloadUserDataItemCpuFunctionAlarmAck(structType interface{}) S7PayloadUserDataItemCpuFunctionAlarmAck { - if casted, ok := structType.(S7PayloadUserDataItemCpuFunctionAlarmAck); ok { + if casted, ok := structType.(S7PayloadUserDataItemCpuFunctionAlarmAck); ok { return casted } if casted, ok := structType.(*S7PayloadUserDataItemCpuFunctionAlarmAck); ok { @@ -132,7 +132,7 @@ func (m *_S7PayloadUserDataItemCpuFunctionAlarmAck) GetLengthInBits(ctx context. lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (functionId) - lengthInBits += 8 + lengthInBits += 8; // Implicit Field (numberOfObjects) lengthInBits += 8 @@ -143,13 +143,14 @@ func (m *_S7PayloadUserDataItemCpuFunctionAlarmAck) GetLengthInBits(ctx context. arrayCtx := spiContext.CreateArrayContext(ctx, len(m.MessageObjects), _curItem) _ = arrayCtx _ = _curItem - lengthInBits += element.(interface{ GetLengthInBits(context.Context) uint16 }).GetLengthInBits(arrayCtx) + lengthInBits += element.(interface{GetLengthInBits(context.Context) uint16}).GetLengthInBits(arrayCtx) } } return lengthInBits } + func (m *_S7PayloadUserDataItemCpuFunctionAlarmAck) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -168,7 +169,7 @@ func S7PayloadUserDataItemCpuFunctionAlarmAckParseWithBuffer(ctx context.Context _ = currentPos // Simple Field (functionId) - _functionId, _functionIdErr := readBuffer.ReadUint8("functionId", 8) +_functionId, _functionIdErr := readBuffer.ReadUint8("functionId", 8) if _functionIdErr != nil { return nil, errors.Wrap(_functionIdErr, "Error parsing 'functionId' field of S7PayloadUserDataItemCpuFunctionAlarmAck") } @@ -197,7 +198,7 @@ func S7PayloadUserDataItemCpuFunctionAlarmAckParseWithBuffer(ctx context.Context arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := AlarmMessageObjectAckTypeParseWithBuffer(arrayCtx, readBuffer) +_item, _err := AlarmMessageObjectAckTypeParseWithBuffer(arrayCtx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'messageObjects' field of S7PayloadUserDataItemCpuFunctionAlarmAck") } @@ -214,9 +215,10 @@ func S7PayloadUserDataItemCpuFunctionAlarmAckParseWithBuffer(ctx context.Context // Create a partially initialized instance _child := &_S7PayloadUserDataItemCpuFunctionAlarmAck{ - _S7PayloadUserDataItem: &_S7PayloadUserDataItem{}, - FunctionId: functionId, - MessageObjects: messageObjects, + _S7PayloadUserDataItem: &_S7PayloadUserDataItem{ + }, + FunctionId: functionId, + MessageObjects: messageObjects, } _child._S7PayloadUserDataItem._S7PayloadUserDataItemChildRequirements = _child return _child, nil @@ -238,36 +240,36 @@ func (m *_S7PayloadUserDataItemCpuFunctionAlarmAck) SerializeWithWriteBuffer(ctx return errors.Wrap(pushErr, "Error pushing for S7PayloadUserDataItemCpuFunctionAlarmAck") } - // Simple Field (functionId) - functionId := uint8(m.GetFunctionId()) - _functionIdErr := writeBuffer.WriteUint8("functionId", 8, (functionId)) - if _functionIdErr != nil { - return errors.Wrap(_functionIdErr, "Error serializing 'functionId' field") - } + // Simple Field (functionId) + functionId := uint8(m.GetFunctionId()) + _functionIdErr := writeBuffer.WriteUint8("functionId", 8, (functionId)) + if _functionIdErr != nil { + return errors.Wrap(_functionIdErr, "Error serializing 'functionId' field") + } - // Implicit Field (numberOfObjects) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - numberOfObjects := uint8(uint8(len(m.GetMessageObjects()))) - _numberOfObjectsErr := writeBuffer.WriteUint8("numberOfObjects", 8, (numberOfObjects)) - if _numberOfObjectsErr != nil { - return errors.Wrap(_numberOfObjectsErr, "Error serializing 'numberOfObjects' field") - } + // Implicit Field (numberOfObjects) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) + numberOfObjects := uint8(uint8(len(m.GetMessageObjects()))) + _numberOfObjectsErr := writeBuffer.WriteUint8("numberOfObjects", 8, (numberOfObjects)) + if _numberOfObjectsErr != nil { + return errors.Wrap(_numberOfObjectsErr, "Error serializing 'numberOfObjects' field") + } - // Array Field (messageObjects) - if pushErr := writeBuffer.PushContext("messageObjects", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for messageObjects") - } - for _curItem, _element := range m.GetMessageObjects() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetMessageObjects()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'messageObjects' field") - } - } - if popErr := writeBuffer.PopContext("messageObjects", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for messageObjects") + // Array Field (messageObjects) + if pushErr := writeBuffer.PushContext("messageObjects", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for messageObjects") + } + for _curItem, _element := range m.GetMessageObjects() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetMessageObjects()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'messageObjects' field") } + } + if popErr := writeBuffer.PopContext("messageObjects", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for messageObjects") + } if popErr := writeBuffer.PopContext("S7PayloadUserDataItemCpuFunctionAlarmAck"); popErr != nil { return errors.Wrap(popErr, "Error popping for S7PayloadUserDataItemCpuFunctionAlarmAck") @@ -277,6 +279,7 @@ func (m *_S7PayloadUserDataItemCpuFunctionAlarmAck) SerializeWithWriteBuffer(ctx return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_S7PayloadUserDataItemCpuFunctionAlarmAck) isS7PayloadUserDataItemCpuFunctionAlarmAck() bool { return true } @@ -291,3 +294,6 @@ func (m *_S7PayloadUserDataItemCpuFunctionAlarmAck) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItemCpuFunctionAlarmAckResponse.go b/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItemCpuFunctionAlarmAckResponse.go index ec536fa4961..444282c9109 100644 --- a/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItemCpuFunctionAlarmAckResponse.go +++ b/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItemCpuFunctionAlarmAckResponse.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7PayloadUserDataItemCpuFunctionAlarmAckResponse is the corresponding interface of S7PayloadUserDataItemCpuFunctionAlarmAckResponse type S7PayloadUserDataItemCpuFunctionAlarmAckResponse interface { @@ -49,41 +51,38 @@ type S7PayloadUserDataItemCpuFunctionAlarmAckResponseExactly interface { // _S7PayloadUserDataItemCpuFunctionAlarmAckResponse is the data-structure of this message type _S7PayloadUserDataItemCpuFunctionAlarmAckResponse struct { *_S7PayloadUserDataItem - FunctionId uint8 - MessageObjects []uint8 + FunctionId uint8 + MessageObjects []uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_S7PayloadUserDataItemCpuFunctionAlarmAckResponse) GetCpuFunctionType() uint8 { - return 0x08 -} +func (m *_S7PayloadUserDataItemCpuFunctionAlarmAckResponse) GetCpuFunctionType() uint8 { +return 0x08} -func (m *_S7PayloadUserDataItemCpuFunctionAlarmAckResponse) GetCpuSubfunction() uint8 { - return 0x0b -} +func (m *_S7PayloadUserDataItemCpuFunctionAlarmAckResponse) GetCpuSubfunction() uint8 { +return 0x0b} -func (m *_S7PayloadUserDataItemCpuFunctionAlarmAckResponse) GetDataLength() uint16 { - return 0 -} +func (m *_S7PayloadUserDataItemCpuFunctionAlarmAckResponse) GetDataLength() uint16 { +return 0} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_S7PayloadUserDataItemCpuFunctionAlarmAckResponse) InitializeParent(parent S7PayloadUserDataItem, returnCode DataTransportErrorCode, transportSize DataTransportSize) { - m.ReturnCode = returnCode +func (m *_S7PayloadUserDataItemCpuFunctionAlarmAckResponse) InitializeParent(parent S7PayloadUserDataItem , returnCode DataTransportErrorCode , transportSize DataTransportSize ) { m.ReturnCode = returnCode m.TransportSize = transportSize } -func (m *_S7PayloadUserDataItemCpuFunctionAlarmAckResponse) GetParent() S7PayloadUserDataItem { +func (m *_S7PayloadUserDataItemCpuFunctionAlarmAckResponse) GetParent() S7PayloadUserDataItem { return m._S7PayloadUserDataItem } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -102,12 +101,13 @@ func (m *_S7PayloadUserDataItemCpuFunctionAlarmAckResponse) GetMessageObjects() /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewS7PayloadUserDataItemCpuFunctionAlarmAckResponse factory function for _S7PayloadUserDataItemCpuFunctionAlarmAckResponse -func NewS7PayloadUserDataItemCpuFunctionAlarmAckResponse(functionId uint8, messageObjects []uint8, returnCode DataTransportErrorCode, transportSize DataTransportSize) *_S7PayloadUserDataItemCpuFunctionAlarmAckResponse { +func NewS7PayloadUserDataItemCpuFunctionAlarmAckResponse( functionId uint8 , messageObjects []uint8 , returnCode DataTransportErrorCode , transportSize DataTransportSize ) *_S7PayloadUserDataItemCpuFunctionAlarmAckResponse { _result := &_S7PayloadUserDataItemCpuFunctionAlarmAckResponse{ - FunctionId: functionId, - MessageObjects: messageObjects, - _S7PayloadUserDataItem: NewS7PayloadUserDataItem(returnCode, transportSize), + FunctionId: functionId, + MessageObjects: messageObjects, + _S7PayloadUserDataItem: NewS7PayloadUserDataItem(returnCode, transportSize), } _result._S7PayloadUserDataItem._S7PayloadUserDataItemChildRequirements = _result return _result @@ -115,7 +115,7 @@ func NewS7PayloadUserDataItemCpuFunctionAlarmAckResponse(functionId uint8, messa // Deprecated: use the interface for direct cast func CastS7PayloadUserDataItemCpuFunctionAlarmAckResponse(structType interface{}) S7PayloadUserDataItemCpuFunctionAlarmAckResponse { - if casted, ok := structType.(S7PayloadUserDataItemCpuFunctionAlarmAckResponse); ok { + if casted, ok := structType.(S7PayloadUserDataItemCpuFunctionAlarmAckResponse); ok { return casted } if casted, ok := structType.(*S7PayloadUserDataItemCpuFunctionAlarmAckResponse); ok { @@ -132,7 +132,7 @@ func (m *_S7PayloadUserDataItemCpuFunctionAlarmAckResponse) GetLengthInBits(ctx lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (functionId) - lengthInBits += 8 + lengthInBits += 8; // Implicit Field (numberOfObjects) lengthInBits += 8 @@ -145,6 +145,7 @@ func (m *_S7PayloadUserDataItemCpuFunctionAlarmAckResponse) GetLengthInBits(ctx return lengthInBits } + func (m *_S7PayloadUserDataItemCpuFunctionAlarmAckResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -163,7 +164,7 @@ func S7PayloadUserDataItemCpuFunctionAlarmAckResponseParseWithBuffer(ctx context _ = currentPos // Simple Field (functionId) - _functionId, _functionIdErr := readBuffer.ReadUint8("functionId", 8) +_functionId, _functionIdErr := readBuffer.ReadUint8("functionId", 8) if _functionIdErr != nil { return nil, errors.Wrap(_functionIdErr, "Error parsing 'functionId' field of S7PayloadUserDataItemCpuFunctionAlarmAckResponse") } @@ -192,7 +193,7 @@ func S7PayloadUserDataItemCpuFunctionAlarmAckResponseParseWithBuffer(ctx context arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := readBuffer.ReadUint8("", 8) +_item, _err := readBuffer.ReadUint8("", 8) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'messageObjects' field of S7PayloadUserDataItemCpuFunctionAlarmAckResponse") } @@ -209,9 +210,10 @@ func S7PayloadUserDataItemCpuFunctionAlarmAckResponseParseWithBuffer(ctx context // Create a partially initialized instance _child := &_S7PayloadUserDataItemCpuFunctionAlarmAckResponse{ - _S7PayloadUserDataItem: &_S7PayloadUserDataItem{}, - FunctionId: functionId, - MessageObjects: messageObjects, + _S7PayloadUserDataItem: &_S7PayloadUserDataItem{ + }, + FunctionId: functionId, + MessageObjects: messageObjects, } _child._S7PayloadUserDataItem._S7PayloadUserDataItemChildRequirements = _child return _child, nil @@ -233,34 +235,34 @@ func (m *_S7PayloadUserDataItemCpuFunctionAlarmAckResponse) SerializeWithWriteBu return errors.Wrap(pushErr, "Error pushing for S7PayloadUserDataItemCpuFunctionAlarmAckResponse") } - // Simple Field (functionId) - functionId := uint8(m.GetFunctionId()) - _functionIdErr := writeBuffer.WriteUint8("functionId", 8, (functionId)) - if _functionIdErr != nil { - return errors.Wrap(_functionIdErr, "Error serializing 'functionId' field") - } + // Simple Field (functionId) + functionId := uint8(m.GetFunctionId()) + _functionIdErr := writeBuffer.WriteUint8("functionId", 8, (functionId)) + if _functionIdErr != nil { + return errors.Wrap(_functionIdErr, "Error serializing 'functionId' field") + } - // Implicit Field (numberOfObjects) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - numberOfObjects := uint8(uint8(len(m.GetMessageObjects()))) - _numberOfObjectsErr := writeBuffer.WriteUint8("numberOfObjects", 8, (numberOfObjects)) - if _numberOfObjectsErr != nil { - return errors.Wrap(_numberOfObjectsErr, "Error serializing 'numberOfObjects' field") - } + // Implicit Field (numberOfObjects) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) + numberOfObjects := uint8(uint8(len(m.GetMessageObjects()))) + _numberOfObjectsErr := writeBuffer.WriteUint8("numberOfObjects", 8, (numberOfObjects)) + if _numberOfObjectsErr != nil { + return errors.Wrap(_numberOfObjectsErr, "Error serializing 'numberOfObjects' field") + } - // Array Field (messageObjects) - if pushErr := writeBuffer.PushContext("messageObjects", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for messageObjects") - } - for _curItem, _element := range m.GetMessageObjects() { - _ = _curItem - _elementErr := writeBuffer.WriteUint8("", 8, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'messageObjects' field") - } - } - if popErr := writeBuffer.PopContext("messageObjects", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for messageObjects") + // Array Field (messageObjects) + if pushErr := writeBuffer.PushContext("messageObjects", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for messageObjects") + } + for _curItem, _element := range m.GetMessageObjects() { + _ = _curItem + _elementErr := writeBuffer.WriteUint8("", 8, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'messageObjects' field") } + } + if popErr := writeBuffer.PopContext("messageObjects", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for messageObjects") + } if popErr := writeBuffer.PopContext("S7PayloadUserDataItemCpuFunctionAlarmAckResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for S7PayloadUserDataItemCpuFunctionAlarmAckResponse") @@ -270,6 +272,7 @@ func (m *_S7PayloadUserDataItemCpuFunctionAlarmAckResponse) SerializeWithWriteBu return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_S7PayloadUserDataItemCpuFunctionAlarmAckResponse) isS7PayloadUserDataItemCpuFunctionAlarmAckResponse() bool { return true } @@ -284,3 +287,6 @@ func (m *_S7PayloadUserDataItemCpuFunctionAlarmAckResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItemCpuFunctionAlarmQuery.go b/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItemCpuFunctionAlarmQuery.go index 8dd1bf75f33..d028fa0ab11 100644 --- a/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItemCpuFunctionAlarmQuery.go +++ b/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItemCpuFunctionAlarmQuery.go @@ -19,6 +19,7 @@ package model + import ( "context" "fmt" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const S7PayloadUserDataItemCpuFunctionAlarmQuery_FUNCTIONID uint8 = 0x00 @@ -57,45 +59,42 @@ type S7PayloadUserDataItemCpuFunctionAlarmQueryExactly interface { // _S7PayloadUserDataItemCpuFunctionAlarmQuery is the data-structure of this message type _S7PayloadUserDataItemCpuFunctionAlarmQuery struct { *_S7PayloadUserDataItem - SyntaxId SyntaxIdType - QueryType QueryType - AlarmType AlarmType + SyntaxId SyntaxIdType + QueryType QueryType + AlarmType AlarmType // Reserved Fields reservedField0 *uint8 reservedField1 *uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_S7PayloadUserDataItemCpuFunctionAlarmQuery) GetCpuFunctionType() uint8 { - return 0x04 -} +func (m *_S7PayloadUserDataItemCpuFunctionAlarmQuery) GetCpuFunctionType() uint8 { +return 0x04} -func (m *_S7PayloadUserDataItemCpuFunctionAlarmQuery) GetCpuSubfunction() uint8 { - return 0x13 -} +func (m *_S7PayloadUserDataItemCpuFunctionAlarmQuery) GetCpuSubfunction() uint8 { +return 0x13} -func (m *_S7PayloadUserDataItemCpuFunctionAlarmQuery) GetDataLength() uint16 { - return 0 -} +func (m *_S7PayloadUserDataItemCpuFunctionAlarmQuery) GetDataLength() uint16 { +return 0} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_S7PayloadUserDataItemCpuFunctionAlarmQuery) InitializeParent(parent S7PayloadUserDataItem, returnCode DataTransportErrorCode, transportSize DataTransportSize) { - m.ReturnCode = returnCode +func (m *_S7PayloadUserDataItemCpuFunctionAlarmQuery) InitializeParent(parent S7PayloadUserDataItem , returnCode DataTransportErrorCode , transportSize DataTransportSize ) { m.ReturnCode = returnCode m.TransportSize = transportSize } -func (m *_S7PayloadUserDataItemCpuFunctionAlarmQuery) GetParent() S7PayloadUserDataItem { +func (m *_S7PayloadUserDataItemCpuFunctionAlarmQuery) GetParent() S7PayloadUserDataItem { return m._S7PayloadUserDataItem } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -143,13 +142,14 @@ func (m *_S7PayloadUserDataItemCpuFunctionAlarmQuery) GetLength() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewS7PayloadUserDataItemCpuFunctionAlarmQuery factory function for _S7PayloadUserDataItemCpuFunctionAlarmQuery -func NewS7PayloadUserDataItemCpuFunctionAlarmQuery(syntaxId SyntaxIdType, queryType QueryType, alarmType AlarmType, returnCode DataTransportErrorCode, transportSize DataTransportSize) *_S7PayloadUserDataItemCpuFunctionAlarmQuery { +func NewS7PayloadUserDataItemCpuFunctionAlarmQuery( syntaxId SyntaxIdType , queryType QueryType , alarmType AlarmType , returnCode DataTransportErrorCode , transportSize DataTransportSize ) *_S7PayloadUserDataItemCpuFunctionAlarmQuery { _result := &_S7PayloadUserDataItemCpuFunctionAlarmQuery{ - SyntaxId: syntaxId, - QueryType: queryType, - AlarmType: alarmType, - _S7PayloadUserDataItem: NewS7PayloadUserDataItem(returnCode, transportSize), + SyntaxId: syntaxId, + QueryType: queryType, + AlarmType: alarmType, + _S7PayloadUserDataItem: NewS7PayloadUserDataItem(returnCode, transportSize), } _result._S7PayloadUserDataItem._S7PayloadUserDataItemChildRequirements = _result return _result @@ -157,7 +157,7 @@ func NewS7PayloadUserDataItemCpuFunctionAlarmQuery(syntaxId SyntaxIdType, queryT // Deprecated: use the interface for direct cast func CastS7PayloadUserDataItemCpuFunctionAlarmQuery(structType interface{}) S7PayloadUserDataItemCpuFunctionAlarmQuery { - if casted, ok := structType.(S7PayloadUserDataItemCpuFunctionAlarmQuery); ok { + if casted, ok := structType.(S7PayloadUserDataItemCpuFunctionAlarmQuery); ok { return casted } if casted, ok := structType.(*S7PayloadUserDataItemCpuFunctionAlarmQuery); ok { @@ -203,6 +203,7 @@ func (m *_S7PayloadUserDataItemCpuFunctionAlarmQuery) GetLengthInBits(ctx contex return lengthInBits } + func (m *_S7PayloadUserDataItemCpuFunctionAlarmQuery) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -260,7 +261,7 @@ func S7PayloadUserDataItemCpuFunctionAlarmQueryParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("syntaxId"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for syntaxId") } - _syntaxId, _syntaxIdErr := SyntaxIdTypeParseWithBuffer(ctx, readBuffer) +_syntaxId, _syntaxIdErr := SyntaxIdTypeParseWithBuffer(ctx, readBuffer) if _syntaxIdErr != nil { return nil, errors.Wrap(_syntaxIdErr, "Error parsing 'syntaxId' field of S7PayloadUserDataItemCpuFunctionAlarmQuery") } @@ -279,7 +280,7 @@ func S7PayloadUserDataItemCpuFunctionAlarmQueryParseWithBuffer(ctx context.Conte if reserved != uint8(0x00) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -290,7 +291,7 @@ func S7PayloadUserDataItemCpuFunctionAlarmQueryParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("queryType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for queryType") } - _queryType, _queryTypeErr := QueryTypeParseWithBuffer(ctx, readBuffer) +_queryType, _queryTypeErr := QueryTypeParseWithBuffer(ctx, readBuffer) if _queryTypeErr != nil { return nil, errors.Wrap(_queryTypeErr, "Error parsing 'queryType' field of S7PayloadUserDataItemCpuFunctionAlarmQuery") } @@ -309,7 +310,7 @@ func S7PayloadUserDataItemCpuFunctionAlarmQueryParseWithBuffer(ctx context.Conte if reserved != uint8(0x34) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x34), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField1 = &reserved @@ -320,7 +321,7 @@ func S7PayloadUserDataItemCpuFunctionAlarmQueryParseWithBuffer(ctx context.Conte if pullErr := readBuffer.PullContext("alarmType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for alarmType") } - _alarmType, _alarmTypeErr := AlarmTypeParseWithBuffer(ctx, readBuffer) +_alarmType, _alarmTypeErr := AlarmTypeParseWithBuffer(ctx, readBuffer) if _alarmTypeErr != nil { return nil, errors.Wrap(_alarmTypeErr, "Error parsing 'alarmType' field of S7PayloadUserDataItemCpuFunctionAlarmQuery") } @@ -335,12 +336,13 @@ func S7PayloadUserDataItemCpuFunctionAlarmQueryParseWithBuffer(ctx context.Conte // Create a partially initialized instance _child := &_S7PayloadUserDataItemCpuFunctionAlarmQuery{ - _S7PayloadUserDataItem: &_S7PayloadUserDataItem{}, - SyntaxId: syntaxId, - QueryType: queryType, - AlarmType: alarmType, - reservedField0: reservedField0, - reservedField1: reservedField1, + _S7PayloadUserDataItem: &_S7PayloadUserDataItem{ + }, + SyntaxId: syntaxId, + QueryType: queryType, + AlarmType: alarmType, + reservedField0: reservedField0, + reservedField1: reservedField1, } _child._S7PayloadUserDataItem._S7PayloadUserDataItemChildRequirements = _child return _child, nil @@ -362,97 +364,97 @@ func (m *_S7PayloadUserDataItemCpuFunctionAlarmQuery) SerializeWithWriteBuffer(c return errors.Wrap(pushErr, "Error pushing for S7PayloadUserDataItemCpuFunctionAlarmQuery") } - // Const Field (functionId) - _functionIdErr := writeBuffer.WriteUint8("functionId", 8, 0x00) - if _functionIdErr != nil { - return errors.Wrap(_functionIdErr, "Error serializing 'functionId' field") - } - - // Const Field (numberMessageObj) - _numberMessageObjErr := writeBuffer.WriteUint8("numberMessageObj", 8, 0x01) - if _numberMessageObjErr != nil { - return errors.Wrap(_numberMessageObjErr, "Error serializing 'numberMessageObj' field") - } + // Const Field (functionId) + _functionIdErr := writeBuffer.WriteUint8("functionId", 8, 0x00) + if _functionIdErr != nil { + return errors.Wrap(_functionIdErr, "Error serializing 'functionId' field") + } - // Const Field (variableSpec) - _variableSpecErr := writeBuffer.WriteUint8("variableSpec", 8, 0x12) - if _variableSpecErr != nil { - return errors.Wrap(_variableSpecErr, "Error serializing 'variableSpec' field") - } + // Const Field (numberMessageObj) + _numberMessageObjErr := writeBuffer.WriteUint8("numberMessageObj", 8, 0x01) + if _numberMessageObjErr != nil { + return errors.Wrap(_numberMessageObjErr, "Error serializing 'numberMessageObj' field") + } - // Const Field (length) - _lengthErr := writeBuffer.WriteUint8("length", 8, 0x08) - if _lengthErr != nil { - return errors.Wrap(_lengthErr, "Error serializing 'length' field") - } + // Const Field (variableSpec) + _variableSpecErr := writeBuffer.WriteUint8("variableSpec", 8, 0x12) + if _variableSpecErr != nil { + return errors.Wrap(_variableSpecErr, "Error serializing 'variableSpec' field") + } - // Simple Field (syntaxId) - if pushErr := writeBuffer.PushContext("syntaxId"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for syntaxId") - } - _syntaxIdErr := writeBuffer.WriteSerializable(ctx, m.GetSyntaxId()) - if popErr := writeBuffer.PopContext("syntaxId"); popErr != nil { - return errors.Wrap(popErr, "Error popping for syntaxId") - } - if _syntaxIdErr != nil { - return errors.Wrap(_syntaxIdErr, "Error serializing 'syntaxId' field") - } + // Const Field (length) + _lengthErr := writeBuffer.WriteUint8("length", 8, 0x08) + if _lengthErr != nil { + return errors.Wrap(_lengthErr, "Error serializing 'length' field") + } - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0x00) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0x00), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteUint8("reserved", 8, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } - } + // Simple Field (syntaxId) + if pushErr := writeBuffer.PushContext("syntaxId"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for syntaxId") + } + _syntaxIdErr := writeBuffer.WriteSerializable(ctx, m.GetSyntaxId()) + if popErr := writeBuffer.PopContext("syntaxId"); popErr != nil { + return errors.Wrap(popErr, "Error popping for syntaxId") + } + if _syntaxIdErr != nil { + return errors.Wrap(_syntaxIdErr, "Error serializing 'syntaxId' field") + } - // Simple Field (queryType) - if pushErr := writeBuffer.PushContext("queryType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for queryType") - } - _queryTypeErr := writeBuffer.WriteSerializable(ctx, m.GetQueryType()) - if popErr := writeBuffer.PopContext("queryType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for queryType") + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0x00) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0x00), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 } - if _queryTypeErr != nil { - return errors.Wrap(_queryTypeErr, "Error serializing 'queryType' field") + _err := writeBuffer.WriteUint8("reserved", 8, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0x34) - if m.reservedField1 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0x34), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField1 - } - _err := writeBuffer.WriteUint8("reserved", 8, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } - } + // Simple Field (queryType) + if pushErr := writeBuffer.PushContext("queryType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for queryType") + } + _queryTypeErr := writeBuffer.WriteSerializable(ctx, m.GetQueryType()) + if popErr := writeBuffer.PopContext("queryType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for queryType") + } + if _queryTypeErr != nil { + return errors.Wrap(_queryTypeErr, "Error serializing 'queryType' field") + } - // Simple Field (alarmType) - if pushErr := writeBuffer.PushContext("alarmType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for alarmType") - } - _alarmTypeErr := writeBuffer.WriteSerializable(ctx, m.GetAlarmType()) - if popErr := writeBuffer.PopContext("alarmType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for alarmType") + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0x34) + if m.reservedField1 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0x34), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField1 } - if _alarmTypeErr != nil { - return errors.Wrap(_alarmTypeErr, "Error serializing 'alarmType' field") + _err := writeBuffer.WriteUint8("reserved", 8, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } + + // Simple Field (alarmType) + if pushErr := writeBuffer.PushContext("alarmType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for alarmType") + } + _alarmTypeErr := writeBuffer.WriteSerializable(ctx, m.GetAlarmType()) + if popErr := writeBuffer.PopContext("alarmType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for alarmType") + } + if _alarmTypeErr != nil { + return errors.Wrap(_alarmTypeErr, "Error serializing 'alarmType' field") + } if popErr := writeBuffer.PopContext("S7PayloadUserDataItemCpuFunctionAlarmQuery"); popErr != nil { return errors.Wrap(popErr, "Error popping for S7PayloadUserDataItemCpuFunctionAlarmQuery") @@ -462,6 +464,7 @@ func (m *_S7PayloadUserDataItemCpuFunctionAlarmQuery) SerializeWithWriteBuffer(c return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_S7PayloadUserDataItemCpuFunctionAlarmQuery) isS7PayloadUserDataItemCpuFunctionAlarmQuery() bool { return true } @@ -476,3 +479,6 @@ func (m *_S7PayloadUserDataItemCpuFunctionAlarmQuery) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItemCpuFunctionAlarmQueryResponse.go b/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItemCpuFunctionAlarmQueryResponse.go index 117df2178c3..f6b7fbbb3ea 100644 --- a/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItemCpuFunctionAlarmQueryResponse.go +++ b/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItemCpuFunctionAlarmQueryResponse.go @@ -19,6 +19,7 @@ package model + import ( "context" "fmt" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const S7PayloadUserDataItemCpuFunctionAlarmQueryResponse_FUNCTIONID uint8 = 0x00 @@ -53,43 +55,40 @@ type S7PayloadUserDataItemCpuFunctionAlarmQueryResponseExactly interface { // _S7PayloadUserDataItemCpuFunctionAlarmQueryResponse is the data-structure of this message type _S7PayloadUserDataItemCpuFunctionAlarmQueryResponse struct { *_S7PayloadUserDataItem - PudicfReturnCode DataTransportErrorCode - PudicftransportSize DataTransportSize + PudicfReturnCode DataTransportErrorCode + PudicftransportSize DataTransportSize // Reserved Fields reservedField0 *uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_S7PayloadUserDataItemCpuFunctionAlarmQueryResponse) GetCpuFunctionType() uint8 { - return 0x08 -} +func (m *_S7PayloadUserDataItemCpuFunctionAlarmQueryResponse) GetCpuFunctionType() uint8 { +return 0x08} -func (m *_S7PayloadUserDataItemCpuFunctionAlarmQueryResponse) GetCpuSubfunction() uint8 { - return 0x13 -} +func (m *_S7PayloadUserDataItemCpuFunctionAlarmQueryResponse) GetCpuSubfunction() uint8 { +return 0x13} -func (m *_S7PayloadUserDataItemCpuFunctionAlarmQueryResponse) GetDataLength() uint16 { - return 0 -} +func (m *_S7PayloadUserDataItemCpuFunctionAlarmQueryResponse) GetDataLength() uint16 { +return 0} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_S7PayloadUserDataItemCpuFunctionAlarmQueryResponse) InitializeParent(parent S7PayloadUserDataItem, returnCode DataTransportErrorCode, transportSize DataTransportSize) { - m.ReturnCode = returnCode +func (m *_S7PayloadUserDataItemCpuFunctionAlarmQueryResponse) InitializeParent(parent S7PayloadUserDataItem , returnCode DataTransportErrorCode , transportSize DataTransportSize ) { m.ReturnCode = returnCode m.TransportSize = transportSize } -func (m *_S7PayloadUserDataItemCpuFunctionAlarmQueryResponse) GetParent() S7PayloadUserDataItem { +func (m *_S7PayloadUserDataItemCpuFunctionAlarmQueryResponse) GetParent() S7PayloadUserDataItem { return m._S7PayloadUserDataItem } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -125,12 +124,13 @@ func (m *_S7PayloadUserDataItemCpuFunctionAlarmQueryResponse) GetNumberMessageOb /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewS7PayloadUserDataItemCpuFunctionAlarmQueryResponse factory function for _S7PayloadUserDataItemCpuFunctionAlarmQueryResponse -func NewS7PayloadUserDataItemCpuFunctionAlarmQueryResponse(pudicfReturnCode DataTransportErrorCode, pudicftransportSize DataTransportSize, returnCode DataTransportErrorCode, transportSize DataTransportSize) *_S7PayloadUserDataItemCpuFunctionAlarmQueryResponse { +func NewS7PayloadUserDataItemCpuFunctionAlarmQueryResponse( pudicfReturnCode DataTransportErrorCode , pudicftransportSize DataTransportSize , returnCode DataTransportErrorCode , transportSize DataTransportSize ) *_S7PayloadUserDataItemCpuFunctionAlarmQueryResponse { _result := &_S7PayloadUserDataItemCpuFunctionAlarmQueryResponse{ - PudicfReturnCode: pudicfReturnCode, - PudicftransportSize: pudicftransportSize, - _S7PayloadUserDataItem: NewS7PayloadUserDataItem(returnCode, transportSize), + PudicfReturnCode: pudicfReturnCode, + PudicftransportSize: pudicftransportSize, + _S7PayloadUserDataItem: NewS7PayloadUserDataItem(returnCode, transportSize), } _result._S7PayloadUserDataItem._S7PayloadUserDataItemChildRequirements = _result return _result @@ -138,7 +138,7 @@ func NewS7PayloadUserDataItemCpuFunctionAlarmQueryResponse(pudicfReturnCode Data // Deprecated: use the interface for direct cast func CastS7PayloadUserDataItemCpuFunctionAlarmQueryResponse(structType interface{}) S7PayloadUserDataItemCpuFunctionAlarmQueryResponse { - if casted, ok := structType.(S7PayloadUserDataItemCpuFunctionAlarmQueryResponse); ok { + if casted, ok := structType.(S7PayloadUserDataItemCpuFunctionAlarmQueryResponse); ok { return casted } if casted, ok := structType.(*S7PayloadUserDataItemCpuFunctionAlarmQueryResponse); ok { @@ -172,6 +172,7 @@ func (m *_S7PayloadUserDataItemCpuFunctionAlarmQueryResponse) GetLengthInBits(ct return lengthInBits } + func (m *_S7PayloadUserDataItemCpuFunctionAlarmQueryResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -211,7 +212,7 @@ func S7PayloadUserDataItemCpuFunctionAlarmQueryResponseParseWithBuffer(ctx conte if pullErr := readBuffer.PullContext("pudicfReturnCode"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for pudicfReturnCode") } - _pudicfReturnCode, _pudicfReturnCodeErr := DataTransportErrorCodeParseWithBuffer(ctx, readBuffer) +_pudicfReturnCode, _pudicfReturnCodeErr := DataTransportErrorCodeParseWithBuffer(ctx, readBuffer) if _pudicfReturnCodeErr != nil { return nil, errors.Wrap(_pudicfReturnCodeErr, "Error parsing 'pudicfReturnCode' field of S7PayloadUserDataItemCpuFunctionAlarmQueryResponse") } @@ -224,7 +225,7 @@ func S7PayloadUserDataItemCpuFunctionAlarmQueryResponseParseWithBuffer(ctx conte if pullErr := readBuffer.PullContext("pudicftransportSize"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for pudicftransportSize") } - _pudicftransportSize, _pudicftransportSizeErr := DataTransportSizeParseWithBuffer(ctx, readBuffer) +_pudicftransportSize, _pudicftransportSizeErr := DataTransportSizeParseWithBuffer(ctx, readBuffer) if _pudicftransportSizeErr != nil { return nil, errors.Wrap(_pudicftransportSizeErr, "Error parsing 'pudicftransportSize' field of S7PayloadUserDataItemCpuFunctionAlarmQueryResponse") } @@ -243,7 +244,7 @@ func S7PayloadUserDataItemCpuFunctionAlarmQueryResponseParseWithBuffer(ctx conte if reserved != uint8(0x00) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -256,10 +257,11 @@ func S7PayloadUserDataItemCpuFunctionAlarmQueryResponseParseWithBuffer(ctx conte // Create a partially initialized instance _child := &_S7PayloadUserDataItemCpuFunctionAlarmQueryResponse{ - _S7PayloadUserDataItem: &_S7PayloadUserDataItem{}, - PudicfReturnCode: pudicfReturnCode, - PudicftransportSize: pudicftransportSize, - reservedField0: reservedField0, + _S7PayloadUserDataItem: &_S7PayloadUserDataItem{ + }, + PudicfReturnCode: pudicfReturnCode, + PudicftransportSize: pudicftransportSize, + reservedField0: reservedField0, } _child._S7PayloadUserDataItem._S7PayloadUserDataItemChildRequirements = _child return _child, nil @@ -281,57 +283,57 @@ func (m *_S7PayloadUserDataItemCpuFunctionAlarmQueryResponse) SerializeWithWrite return errors.Wrap(pushErr, "Error pushing for S7PayloadUserDataItemCpuFunctionAlarmQueryResponse") } - // Const Field (functionId) - _functionIdErr := writeBuffer.WriteUint8("functionId", 8, 0x00) - if _functionIdErr != nil { - return errors.Wrap(_functionIdErr, "Error serializing 'functionId' field") - } + // Const Field (functionId) + _functionIdErr := writeBuffer.WriteUint8("functionId", 8, 0x00) + if _functionIdErr != nil { + return errors.Wrap(_functionIdErr, "Error serializing 'functionId' field") + } - // Const Field (numberMessageObj) - _numberMessageObjErr := writeBuffer.WriteUint8("numberMessageObj", 8, 0x01) - if _numberMessageObjErr != nil { - return errors.Wrap(_numberMessageObjErr, "Error serializing 'numberMessageObj' field") - } + // Const Field (numberMessageObj) + _numberMessageObjErr := writeBuffer.WriteUint8("numberMessageObj", 8, 0x01) + if _numberMessageObjErr != nil { + return errors.Wrap(_numberMessageObjErr, "Error serializing 'numberMessageObj' field") + } - // Simple Field (pudicfReturnCode) - if pushErr := writeBuffer.PushContext("pudicfReturnCode"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for pudicfReturnCode") - } - _pudicfReturnCodeErr := writeBuffer.WriteSerializable(ctx, m.GetPudicfReturnCode()) - if popErr := writeBuffer.PopContext("pudicfReturnCode"); popErr != nil { - return errors.Wrap(popErr, "Error popping for pudicfReturnCode") - } - if _pudicfReturnCodeErr != nil { - return errors.Wrap(_pudicfReturnCodeErr, "Error serializing 'pudicfReturnCode' field") - } + // Simple Field (pudicfReturnCode) + if pushErr := writeBuffer.PushContext("pudicfReturnCode"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for pudicfReturnCode") + } + _pudicfReturnCodeErr := writeBuffer.WriteSerializable(ctx, m.GetPudicfReturnCode()) + if popErr := writeBuffer.PopContext("pudicfReturnCode"); popErr != nil { + return errors.Wrap(popErr, "Error popping for pudicfReturnCode") + } + if _pudicfReturnCodeErr != nil { + return errors.Wrap(_pudicfReturnCodeErr, "Error serializing 'pudicfReturnCode' field") + } - // Simple Field (pudicftransportSize) - if pushErr := writeBuffer.PushContext("pudicftransportSize"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for pudicftransportSize") - } - _pudicftransportSizeErr := writeBuffer.WriteSerializable(ctx, m.GetPudicftransportSize()) - if popErr := writeBuffer.PopContext("pudicftransportSize"); popErr != nil { - return errors.Wrap(popErr, "Error popping for pudicftransportSize") - } - if _pudicftransportSizeErr != nil { - return errors.Wrap(_pudicftransportSizeErr, "Error serializing 'pudicftransportSize' field") - } + // Simple Field (pudicftransportSize) + if pushErr := writeBuffer.PushContext("pudicftransportSize"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for pudicftransportSize") + } + _pudicftransportSizeErr := writeBuffer.WriteSerializable(ctx, m.GetPudicftransportSize()) + if popErr := writeBuffer.PopContext("pudicftransportSize"); popErr != nil { + return errors.Wrap(popErr, "Error popping for pudicftransportSize") + } + if _pudicftransportSizeErr != nil { + return errors.Wrap(_pudicftransportSizeErr, "Error serializing 'pudicftransportSize' field") + } - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0x00) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0x00), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteUint8("reserved", 8, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0x00) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0x00), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 + } + _err := writeBuffer.WriteUint8("reserved", 8, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } if popErr := writeBuffer.PopContext("S7PayloadUserDataItemCpuFunctionAlarmQueryResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for S7PayloadUserDataItemCpuFunctionAlarmQueryResponse") @@ -341,6 +343,7 @@ func (m *_S7PayloadUserDataItemCpuFunctionAlarmQueryResponse) SerializeWithWrite return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_S7PayloadUserDataItemCpuFunctionAlarmQueryResponse) isS7PayloadUserDataItemCpuFunctionAlarmQueryResponse() bool { return true } @@ -355,3 +358,6 @@ func (m *_S7PayloadUserDataItemCpuFunctionAlarmQueryResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItemCpuFunctionMsgSubscription.go b/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItemCpuFunctionMsgSubscription.go index 7407454af98..40aaff8f7fb 100644 --- a/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItemCpuFunctionMsgSubscription.go +++ b/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItemCpuFunctionMsgSubscription.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7PayloadUserDataItemCpuFunctionMsgSubscription is the corresponding interface of S7PayloadUserDataItemCpuFunctionMsgSubscription type S7PayloadUserDataItemCpuFunctionMsgSubscription interface { @@ -52,45 +54,42 @@ type S7PayloadUserDataItemCpuFunctionMsgSubscriptionExactly interface { // _S7PayloadUserDataItemCpuFunctionMsgSubscription is the data-structure of this message type _S7PayloadUserDataItemCpuFunctionMsgSubscription struct { *_S7PayloadUserDataItem - Subscription uint8 - MagicKey string - Alarmtype *AlarmStateType - Reserve *uint8 + Subscription uint8 + MagicKey string + Alarmtype *AlarmStateType + Reserve *uint8 // Reserved Fields reservedField0 *uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscription) GetCpuFunctionType() uint8 { - return 0x04 -} +func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscription) GetCpuFunctionType() uint8 { +return 0x04} -func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscription) GetCpuSubfunction() uint8 { - return 0x02 -} +func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscription) GetCpuSubfunction() uint8 { +return 0x02} -func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscription) GetDataLength() uint16 { - return 0 -} +func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscription) GetDataLength() uint16 { +return 0} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscription) InitializeParent(parent S7PayloadUserDataItem, returnCode DataTransportErrorCode, transportSize DataTransportSize) { - m.ReturnCode = returnCode +func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscription) InitializeParent(parent S7PayloadUserDataItem , returnCode DataTransportErrorCode , transportSize DataTransportSize ) { m.ReturnCode = returnCode m.TransportSize = transportSize } -func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscription) GetParent() S7PayloadUserDataItem { +func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscription) GetParent() S7PayloadUserDataItem { return m._S7PayloadUserDataItem } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -117,14 +116,15 @@ func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscription) GetReserve() *uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewS7PayloadUserDataItemCpuFunctionMsgSubscription factory function for _S7PayloadUserDataItemCpuFunctionMsgSubscription -func NewS7PayloadUserDataItemCpuFunctionMsgSubscription(Subscription uint8, magicKey string, Alarmtype *AlarmStateType, Reserve *uint8, returnCode DataTransportErrorCode, transportSize DataTransportSize) *_S7PayloadUserDataItemCpuFunctionMsgSubscription { +func NewS7PayloadUserDataItemCpuFunctionMsgSubscription( Subscription uint8 , magicKey string , Alarmtype *AlarmStateType , Reserve *uint8 , returnCode DataTransportErrorCode , transportSize DataTransportSize ) *_S7PayloadUserDataItemCpuFunctionMsgSubscription { _result := &_S7PayloadUserDataItemCpuFunctionMsgSubscription{ - Subscription: Subscription, - MagicKey: magicKey, - Alarmtype: Alarmtype, - Reserve: Reserve, - _S7PayloadUserDataItem: NewS7PayloadUserDataItem(returnCode, transportSize), + Subscription: Subscription, + MagicKey: magicKey, + Alarmtype: Alarmtype, + Reserve: Reserve, + _S7PayloadUserDataItem: NewS7PayloadUserDataItem(returnCode, transportSize), } _result._S7PayloadUserDataItem._S7PayloadUserDataItemChildRequirements = _result return _result @@ -132,7 +132,7 @@ func NewS7PayloadUserDataItemCpuFunctionMsgSubscription(Subscription uint8, magi // Deprecated: use the interface for direct cast func CastS7PayloadUserDataItemCpuFunctionMsgSubscription(structType interface{}) S7PayloadUserDataItemCpuFunctionMsgSubscription { - if casted, ok := structType.(S7PayloadUserDataItemCpuFunctionMsgSubscription); ok { + if casted, ok := structType.(S7PayloadUserDataItemCpuFunctionMsgSubscription); ok { return casted } if casted, ok := structType.(*S7PayloadUserDataItemCpuFunctionMsgSubscription); ok { @@ -149,13 +149,13 @@ func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscription) GetLengthInBits(ctx c lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (Subscription) - lengthInBits += 8 + lengthInBits += 8; // Reserved Field (reserved) lengthInBits += 8 // Simple field (magicKey) - lengthInBits += 64 + lengthInBits += 64; // Optional Field (Alarmtype) if m.Alarmtype != nil { @@ -170,6 +170,7 @@ func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscription) GetLengthInBits(ctx c return lengthInBits } + func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscription) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -188,7 +189,7 @@ func S7PayloadUserDataItemCpuFunctionMsgSubscriptionParseWithBuffer(ctx context. _ = currentPos // Simple Field (Subscription) - _Subscription, _SubscriptionErr := readBuffer.ReadUint8("Subscription", 8) +_Subscription, _SubscriptionErr := readBuffer.ReadUint8("Subscription", 8) if _SubscriptionErr != nil { return nil, errors.Wrap(_SubscriptionErr, "Error parsing 'Subscription' field of S7PayloadUserDataItemCpuFunctionMsgSubscription") } @@ -204,7 +205,7 @@ func S7PayloadUserDataItemCpuFunctionMsgSubscriptionParseWithBuffer(ctx context. if reserved != uint8(0x00) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -212,7 +213,7 @@ func S7PayloadUserDataItemCpuFunctionMsgSubscriptionParseWithBuffer(ctx context. } // Simple Field (magicKey) - _magicKey, _magicKeyErr := readBuffer.ReadString("magicKey", uint32(64), "UTF-8") +_magicKey, _magicKeyErr := readBuffer.ReadString("magicKey", uint32(64), "UTF-8") if _magicKeyErr != nil { return nil, errors.Wrap(_magicKeyErr, "Error parsing 'magicKey' field of S7PayloadUserDataItemCpuFunctionMsgSubscription") } @@ -220,7 +221,7 @@ func S7PayloadUserDataItemCpuFunctionMsgSubscriptionParseWithBuffer(ctx context. // Optional Field (Alarmtype) (Can be skipped, if a given expression evaluates to false) var Alarmtype *AlarmStateType = nil - if bool((Subscription) >= (128)) { + if bool((Subscription) >= ((128))) { if pullErr := readBuffer.PullContext("Alarmtype"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for Alarmtype") } @@ -236,7 +237,7 @@ func S7PayloadUserDataItemCpuFunctionMsgSubscriptionParseWithBuffer(ctx context. // Optional Field (Reserve) (Can be skipped, if a given expression evaluates to false) var Reserve *uint8 = nil - if bool((Subscription) >= (128)) { + if bool((Subscription) >= ((128))) { _val, _err := readBuffer.ReadUint8("Reserve", 8) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'Reserve' field of S7PayloadUserDataItemCpuFunctionMsgSubscription") @@ -250,12 +251,13 @@ func S7PayloadUserDataItemCpuFunctionMsgSubscriptionParseWithBuffer(ctx context. // Create a partially initialized instance _child := &_S7PayloadUserDataItemCpuFunctionMsgSubscription{ - _S7PayloadUserDataItem: &_S7PayloadUserDataItem{}, - Subscription: Subscription, - MagicKey: magicKey, - Alarmtype: Alarmtype, - Reserve: Reserve, - reservedField0: reservedField0, + _S7PayloadUserDataItem: &_S7PayloadUserDataItem{ + }, + Subscription: Subscription, + MagicKey: magicKey, + Alarmtype: Alarmtype, + Reserve: Reserve, + reservedField0: reservedField0, } _child._S7PayloadUserDataItem._S7PayloadUserDataItemChildRequirements = _child return _child, nil @@ -277,61 +279,61 @@ func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscription) SerializeWithWriteBuf return errors.Wrap(pushErr, "Error pushing for S7PayloadUserDataItemCpuFunctionMsgSubscription") } - // Simple Field (Subscription) - Subscription := uint8(m.GetSubscription()) - _SubscriptionErr := writeBuffer.WriteUint8("Subscription", 8, (Subscription)) - if _SubscriptionErr != nil { - return errors.Wrap(_SubscriptionErr, "Error serializing 'Subscription' field") - } + // Simple Field (Subscription) + Subscription := uint8(m.GetSubscription()) + _SubscriptionErr := writeBuffer.WriteUint8("Subscription", 8, (Subscription)) + if _SubscriptionErr != nil { + return errors.Wrap(_SubscriptionErr, "Error serializing 'Subscription' field") + } - // Reserved Field (reserved) - { - var reserved uint8 = uint8(0x00) - if m.reservedField0 != nil { - Plc4xModelLog.Info().Fields(map[string]interface{}{ - "expected value": uint8(0x00), - "got value": reserved, - }).Msg("Overriding reserved field with unexpected value.") - reserved = *m.reservedField0 - } - _err := writeBuffer.WriteUint8("reserved", 8, reserved) - if _err != nil { - return errors.Wrap(_err, "Error serializing 'reserved' field") - } + // Reserved Field (reserved) + { + var reserved uint8 = uint8(0x00) + if m.reservedField0 != nil { + Plc4xModelLog.Info().Fields(map[string]interface{}{ + "expected value": uint8(0x00), + "got value": reserved, + }).Msg("Overriding reserved field with unexpected value.") + reserved = *m.reservedField0 } - - // Simple Field (magicKey) - magicKey := string(m.GetMagicKey()) - _magicKeyErr := writeBuffer.WriteString("magicKey", uint32(64), "UTF-8", (magicKey)) - if _magicKeyErr != nil { - return errors.Wrap(_magicKeyErr, "Error serializing 'magicKey' field") + _err := writeBuffer.WriteUint8("reserved", 8, reserved) + if _err != nil { + return errors.Wrap(_err, "Error serializing 'reserved' field") } + } - // Optional Field (Alarmtype) (Can be skipped, if the value is null) - var Alarmtype *AlarmStateType = nil - if m.GetAlarmtype() != nil { - if pushErr := writeBuffer.PushContext("Alarmtype"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for Alarmtype") - } - Alarmtype = m.GetAlarmtype() - _AlarmtypeErr := writeBuffer.WriteSerializable(ctx, Alarmtype) - if popErr := writeBuffer.PopContext("Alarmtype"); popErr != nil { - return errors.Wrap(popErr, "Error popping for Alarmtype") - } - if _AlarmtypeErr != nil { - return errors.Wrap(_AlarmtypeErr, "Error serializing 'Alarmtype' field") - } + // Simple Field (magicKey) + magicKey := string(m.GetMagicKey()) + _magicKeyErr := writeBuffer.WriteString("magicKey", uint32(64), "UTF-8", (magicKey)) + if _magicKeyErr != nil { + return errors.Wrap(_magicKeyErr, "Error serializing 'magicKey' field") + } + + // Optional Field (Alarmtype) (Can be skipped, if the value is null) + var Alarmtype *AlarmStateType = nil + if m.GetAlarmtype() != nil { + if pushErr := writeBuffer.PushContext("Alarmtype"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for Alarmtype") } + Alarmtype = m.GetAlarmtype() + _AlarmtypeErr := writeBuffer.WriteSerializable(ctx, Alarmtype) + if popErr := writeBuffer.PopContext("Alarmtype"); popErr != nil { + return errors.Wrap(popErr, "Error popping for Alarmtype") + } + if _AlarmtypeErr != nil { + return errors.Wrap(_AlarmtypeErr, "Error serializing 'Alarmtype' field") + } + } - // Optional Field (Reserve) (Can be skipped, if the value is null) - var Reserve *uint8 = nil - if m.GetReserve() != nil { - Reserve = m.GetReserve() - _ReserveErr := writeBuffer.WriteUint8("Reserve", 8, *(Reserve)) - if _ReserveErr != nil { - return errors.Wrap(_ReserveErr, "Error serializing 'Reserve' field") - } + // Optional Field (Reserve) (Can be skipped, if the value is null) + var Reserve *uint8 = nil + if m.GetReserve() != nil { + Reserve = m.GetReserve() + _ReserveErr := writeBuffer.WriteUint8("Reserve", 8, *(Reserve)) + if _ReserveErr != nil { + return errors.Wrap(_ReserveErr, "Error serializing 'Reserve' field") } + } if popErr := writeBuffer.PopContext("S7PayloadUserDataItemCpuFunctionMsgSubscription"); popErr != nil { return errors.Wrap(popErr, "Error popping for S7PayloadUserDataItemCpuFunctionMsgSubscription") @@ -341,6 +343,7 @@ func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscription) SerializeWithWriteBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscription) isS7PayloadUserDataItemCpuFunctionMsgSubscription() bool { return true } @@ -355,3 +358,6 @@ func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscription) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse.go b/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse.go index 40752f82e9d..b4dbf5eab22 100644 --- a/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse.go +++ b/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse is the corresponding interface of S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse type S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse interface { @@ -54,44 +56,41 @@ type S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponseExactly interfa // _S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse is the data-structure of this message type _S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse struct { *_S7PayloadUserDataItem - Result uint8 - Reserved01 uint8 - AlarmType AlarmType - Reserved02 uint8 - Reserved03 uint8 + Result uint8 + Reserved01 uint8 + AlarmType AlarmType + Reserved02 uint8 + Reserved03 uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse) GetCpuFunctionType() uint8 { - return 0x08 -} +func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse) GetCpuFunctionType() uint8 { +return 0x08} -func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse) GetCpuSubfunction() uint8 { - return 0x02 -} +func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse) GetCpuSubfunction() uint8 { +return 0x02} -func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse) GetDataLength() uint16 { - return 0x05 -} +func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse) GetDataLength() uint16 { +return 0x05} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse) InitializeParent(parent S7PayloadUserDataItem, returnCode DataTransportErrorCode, transportSize DataTransportSize) { - m.ReturnCode = returnCode +func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse) InitializeParent(parent S7PayloadUserDataItem , returnCode DataTransportErrorCode , transportSize DataTransportSize ) { m.ReturnCode = returnCode m.TransportSize = transportSize } -func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse) GetParent() S7PayloadUserDataItem { +func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse) GetParent() S7PayloadUserDataItem { return m._S7PayloadUserDataItem } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -122,15 +121,16 @@ func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse) GetReser /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewS7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse factory function for _S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse -func NewS7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse(result uint8, reserved01 uint8, alarmType AlarmType, reserved02 uint8, reserved03 uint8, returnCode DataTransportErrorCode, transportSize DataTransportSize) *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse { +func NewS7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse( result uint8 , reserved01 uint8 , alarmType AlarmType , reserved02 uint8 , reserved03 uint8 , returnCode DataTransportErrorCode , transportSize DataTransportSize ) *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse { _result := &_S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse{ - Result: result, - Reserved01: reserved01, - AlarmType: alarmType, - Reserved02: reserved02, - Reserved03: reserved03, - _S7PayloadUserDataItem: NewS7PayloadUserDataItem(returnCode, transportSize), + Result: result, + Reserved01: reserved01, + AlarmType: alarmType, + Reserved02: reserved02, + Reserved03: reserved03, + _S7PayloadUserDataItem: NewS7PayloadUserDataItem(returnCode, transportSize), } _result._S7PayloadUserDataItem._S7PayloadUserDataItemChildRequirements = _result return _result @@ -138,7 +138,7 @@ func NewS7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse(result uint // Deprecated: use the interface for direct cast func CastS7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse(structType interface{}) S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse { - if casted, ok := structType.(S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse); ok { + if casted, ok := structType.(S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse); ok { return casted } if casted, ok := structType.(*S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse); ok { @@ -155,23 +155,24 @@ func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse) GetLengt lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (result) - lengthInBits += 8 + lengthInBits += 8; // Simple field (reserved01) - lengthInBits += 8 + lengthInBits += 8; // Simple field (alarmType) lengthInBits += 8 // Simple field (reserved02) - lengthInBits += 8 + lengthInBits += 8; // Simple field (reserved03) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -190,14 +191,14 @@ func S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponseParseWithBuffer _ = currentPos // Simple Field (result) - _result, _resultErr := readBuffer.ReadUint8("result", 8) +_result, _resultErr := readBuffer.ReadUint8("result", 8) if _resultErr != nil { return nil, errors.Wrap(_resultErr, "Error parsing 'result' field of S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse") } result := _result // Simple Field (reserved01) - _reserved01, _reserved01Err := readBuffer.ReadUint8("reserved01", 8) +_reserved01, _reserved01Err := readBuffer.ReadUint8("reserved01", 8) if _reserved01Err != nil { return nil, errors.Wrap(_reserved01Err, "Error parsing 'reserved01' field of S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse") } @@ -207,7 +208,7 @@ func S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponseParseWithBuffer if pullErr := readBuffer.PullContext("alarmType"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for alarmType") } - _alarmType, _alarmTypeErr := AlarmTypeParseWithBuffer(ctx, readBuffer) +_alarmType, _alarmTypeErr := AlarmTypeParseWithBuffer(ctx, readBuffer) if _alarmTypeErr != nil { return nil, errors.Wrap(_alarmTypeErr, "Error parsing 'alarmType' field of S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse") } @@ -217,14 +218,14 @@ func S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponseParseWithBuffer } // Simple Field (reserved02) - _reserved02, _reserved02Err := readBuffer.ReadUint8("reserved02", 8) +_reserved02, _reserved02Err := readBuffer.ReadUint8("reserved02", 8) if _reserved02Err != nil { return nil, errors.Wrap(_reserved02Err, "Error parsing 'reserved02' field of S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse") } reserved02 := _reserved02 // Simple Field (reserved03) - _reserved03, _reserved03Err := readBuffer.ReadUint8("reserved03", 8) +_reserved03, _reserved03Err := readBuffer.ReadUint8("reserved03", 8) if _reserved03Err != nil { return nil, errors.Wrap(_reserved03Err, "Error parsing 'reserved03' field of S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse") } @@ -236,12 +237,13 @@ func S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponseParseWithBuffer // Create a partially initialized instance _child := &_S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse{ - _S7PayloadUserDataItem: &_S7PayloadUserDataItem{}, - Result: result, - Reserved01: reserved01, - AlarmType: alarmType, - Reserved02: reserved02, - Reserved03: reserved03, + _S7PayloadUserDataItem: &_S7PayloadUserDataItem{ + }, + Result: result, + Reserved01: reserved01, + AlarmType: alarmType, + Reserved02: reserved02, + Reserved03: reserved03, } _child._S7PayloadUserDataItem._S7PayloadUserDataItemChildRequirements = _child return _child, nil @@ -263,45 +265,45 @@ func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse) Serializ return errors.Wrap(pushErr, "Error pushing for S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse") } - // Simple Field (result) - result := uint8(m.GetResult()) - _resultErr := writeBuffer.WriteUint8("result", 8, (result)) - if _resultErr != nil { - return errors.Wrap(_resultErr, "Error serializing 'result' field") - } + // Simple Field (result) + result := uint8(m.GetResult()) + _resultErr := writeBuffer.WriteUint8("result", 8, (result)) + if _resultErr != nil { + return errors.Wrap(_resultErr, "Error serializing 'result' field") + } - // Simple Field (reserved01) - reserved01 := uint8(m.GetReserved01()) - _reserved01Err := writeBuffer.WriteUint8("reserved01", 8, (reserved01)) - if _reserved01Err != nil { - return errors.Wrap(_reserved01Err, "Error serializing 'reserved01' field") - } + // Simple Field (reserved01) + reserved01 := uint8(m.GetReserved01()) + _reserved01Err := writeBuffer.WriteUint8("reserved01", 8, (reserved01)) + if _reserved01Err != nil { + return errors.Wrap(_reserved01Err, "Error serializing 'reserved01' field") + } - // Simple Field (alarmType) - if pushErr := writeBuffer.PushContext("alarmType"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for alarmType") - } - _alarmTypeErr := writeBuffer.WriteSerializable(ctx, m.GetAlarmType()) - if popErr := writeBuffer.PopContext("alarmType"); popErr != nil { - return errors.Wrap(popErr, "Error popping for alarmType") - } - if _alarmTypeErr != nil { - return errors.Wrap(_alarmTypeErr, "Error serializing 'alarmType' field") - } + // Simple Field (alarmType) + if pushErr := writeBuffer.PushContext("alarmType"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for alarmType") + } + _alarmTypeErr := writeBuffer.WriteSerializable(ctx, m.GetAlarmType()) + if popErr := writeBuffer.PopContext("alarmType"); popErr != nil { + return errors.Wrap(popErr, "Error popping for alarmType") + } + if _alarmTypeErr != nil { + return errors.Wrap(_alarmTypeErr, "Error serializing 'alarmType' field") + } - // Simple Field (reserved02) - reserved02 := uint8(m.GetReserved02()) - _reserved02Err := writeBuffer.WriteUint8("reserved02", 8, (reserved02)) - if _reserved02Err != nil { - return errors.Wrap(_reserved02Err, "Error serializing 'reserved02' field") - } + // Simple Field (reserved02) + reserved02 := uint8(m.GetReserved02()) + _reserved02Err := writeBuffer.WriteUint8("reserved02", 8, (reserved02)) + if _reserved02Err != nil { + return errors.Wrap(_reserved02Err, "Error serializing 'reserved02' field") + } - // Simple Field (reserved03) - reserved03 := uint8(m.GetReserved03()) - _reserved03Err := writeBuffer.WriteUint8("reserved03", 8, (reserved03)) - if _reserved03Err != nil { - return errors.Wrap(_reserved03Err, "Error serializing 'reserved03' field") - } + // Simple Field (reserved03) + reserved03 := uint8(m.GetReserved03()) + _reserved03Err := writeBuffer.WriteUint8("reserved03", 8, (reserved03)) + if _reserved03Err != nil { + return errors.Wrap(_reserved03Err, "Error serializing 'reserved03' field") + } if popErr := writeBuffer.PopContext("S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse") @@ -311,6 +313,7 @@ func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse) Serializ return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse) isS7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse() bool { return true } @@ -325,3 +328,6 @@ func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionAlarmResponse) String() } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItemCpuFunctionMsgSubscriptionResponse.go b/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItemCpuFunctionMsgSubscriptionResponse.go index de9921664b0..617c542f530 100644 --- a/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItemCpuFunctionMsgSubscriptionResponse.go +++ b/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItemCpuFunctionMsgSubscriptionResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7PayloadUserDataItemCpuFunctionMsgSubscriptionResponse is the corresponding interface of S7PayloadUserDataItemCpuFunctionMsgSubscriptionResponse type S7PayloadUserDataItemCpuFunctionMsgSubscriptionResponse interface { @@ -46,41 +48,40 @@ type _S7PayloadUserDataItemCpuFunctionMsgSubscriptionResponse struct { *_S7PayloadUserDataItem } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionResponse) GetCpuFunctionType() uint8 { - return 0x08 -} +func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionResponse) GetCpuFunctionType() uint8 { +return 0x08} -func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionResponse) GetCpuSubfunction() uint8 { - return 0x02 -} +func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionResponse) GetCpuSubfunction() uint8 { +return 0x02} -func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionResponse) GetDataLength() uint16 { - return 0x00 -} +func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionResponse) GetDataLength() uint16 { +return 0x00} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionResponse) InitializeParent(parent S7PayloadUserDataItem, returnCode DataTransportErrorCode, transportSize DataTransportSize) { - m.ReturnCode = returnCode +func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionResponse) InitializeParent(parent S7PayloadUserDataItem , returnCode DataTransportErrorCode , transportSize DataTransportSize ) { m.ReturnCode = returnCode m.TransportSize = transportSize } -func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionResponse) GetParent() S7PayloadUserDataItem { +func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionResponse) GetParent() S7PayloadUserDataItem { return m._S7PayloadUserDataItem } + // NewS7PayloadUserDataItemCpuFunctionMsgSubscriptionResponse factory function for _S7PayloadUserDataItemCpuFunctionMsgSubscriptionResponse -func NewS7PayloadUserDataItemCpuFunctionMsgSubscriptionResponse(returnCode DataTransportErrorCode, transportSize DataTransportSize) *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionResponse { +func NewS7PayloadUserDataItemCpuFunctionMsgSubscriptionResponse( returnCode DataTransportErrorCode , transportSize DataTransportSize ) *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionResponse { _result := &_S7PayloadUserDataItemCpuFunctionMsgSubscriptionResponse{ - _S7PayloadUserDataItem: NewS7PayloadUserDataItem(returnCode, transportSize), + _S7PayloadUserDataItem: NewS7PayloadUserDataItem(returnCode, transportSize), } _result._S7PayloadUserDataItem._S7PayloadUserDataItemChildRequirements = _result return _result @@ -88,7 +89,7 @@ func NewS7PayloadUserDataItemCpuFunctionMsgSubscriptionResponse(returnCode DataT // Deprecated: use the interface for direct cast func CastS7PayloadUserDataItemCpuFunctionMsgSubscriptionResponse(structType interface{}) S7PayloadUserDataItemCpuFunctionMsgSubscriptionResponse { - if casted, ok := structType.(S7PayloadUserDataItemCpuFunctionMsgSubscriptionResponse); ok { + if casted, ok := structType.(S7PayloadUserDataItemCpuFunctionMsgSubscriptionResponse); ok { return casted } if casted, ok := structType.(*S7PayloadUserDataItemCpuFunctionMsgSubscriptionResponse); ok { @@ -107,6 +108,7 @@ func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionResponse) GetLengthInBi return lengthInBits } + func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -130,7 +132,8 @@ func S7PayloadUserDataItemCpuFunctionMsgSubscriptionResponseParseWithBuffer(ctx // Create a partially initialized instance _child := &_S7PayloadUserDataItemCpuFunctionMsgSubscriptionResponse{ - _S7PayloadUserDataItem: &_S7PayloadUserDataItem{}, + _S7PayloadUserDataItem: &_S7PayloadUserDataItem{ + }, } _child._S7PayloadUserDataItem._S7PayloadUserDataItemChildRequirements = _child return _child, nil @@ -160,6 +163,7 @@ func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionResponse) SerializeWith return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionResponse) isS7PayloadUserDataItemCpuFunctionMsgSubscriptionResponse() bool { return true } @@ -174,3 +178,6 @@ func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionResponse) String() stri } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse.go b/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse.go index 756eb12b836..d86418da0d8 100644 --- a/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse.go +++ b/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse is the corresponding interface of S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse type S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse interface { @@ -48,41 +50,38 @@ type S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponseExactly interface // _S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse is the data-structure of this message type _S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse struct { *_S7PayloadUserDataItem - Result uint8 - Reserved01 uint8 + Result uint8 + Reserved01 uint8 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse) GetCpuFunctionType() uint8 { - return 0x08 -} +func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse) GetCpuFunctionType() uint8 { +return 0x08} -func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse) GetCpuSubfunction() uint8 { - return 0x02 -} +func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse) GetCpuSubfunction() uint8 { +return 0x02} -func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse) GetDataLength() uint16 { - return 0x02 -} +func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse) GetDataLength() uint16 { +return 0x02} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse) InitializeParent(parent S7PayloadUserDataItem, returnCode DataTransportErrorCode, transportSize DataTransportSize) { - m.ReturnCode = returnCode +func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse) InitializeParent(parent S7PayloadUserDataItem , returnCode DataTransportErrorCode , transportSize DataTransportSize ) { m.ReturnCode = returnCode m.TransportSize = transportSize } -func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse) GetParent() S7PayloadUserDataItem { +func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse) GetParent() S7PayloadUserDataItem { return m._S7PayloadUserDataItem } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -101,12 +100,13 @@ func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse) GetReserve /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewS7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse factory function for _S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse -func NewS7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse(result uint8, reserved01 uint8, returnCode DataTransportErrorCode, transportSize DataTransportSize) *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse { +func NewS7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse( result uint8 , reserved01 uint8 , returnCode DataTransportErrorCode , transportSize DataTransportSize ) *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse { _result := &_S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse{ - Result: result, - Reserved01: reserved01, - _S7PayloadUserDataItem: NewS7PayloadUserDataItem(returnCode, transportSize), + Result: result, + Reserved01: reserved01, + _S7PayloadUserDataItem: NewS7PayloadUserDataItem(returnCode, transportSize), } _result._S7PayloadUserDataItem._S7PayloadUserDataItemChildRequirements = _result return _result @@ -114,7 +114,7 @@ func NewS7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse(result uint8, // Deprecated: use the interface for direct cast func CastS7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse(structType interface{}) S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse { - if casted, ok := structType.(S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse); ok { + if casted, ok := structType.(S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse); ok { return casted } if casted, ok := structType.(*S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse); ok { @@ -131,14 +131,15 @@ func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse) GetLengthI lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (result) - lengthInBits += 8 + lengthInBits += 8; // Simple field (reserved01) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } + func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -157,14 +158,14 @@ func S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponseParseWithBuffer(c _ = currentPos // Simple Field (result) - _result, _resultErr := readBuffer.ReadUint8("result", 8) +_result, _resultErr := readBuffer.ReadUint8("result", 8) if _resultErr != nil { return nil, errors.Wrap(_resultErr, "Error parsing 'result' field of S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse") } result := _result // Simple Field (reserved01) - _reserved01, _reserved01Err := readBuffer.ReadUint8("reserved01", 8) +_reserved01, _reserved01Err := readBuffer.ReadUint8("reserved01", 8) if _reserved01Err != nil { return nil, errors.Wrap(_reserved01Err, "Error parsing 'reserved01' field of S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse") } @@ -176,9 +177,10 @@ func S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponseParseWithBuffer(c // Create a partially initialized instance _child := &_S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse{ - _S7PayloadUserDataItem: &_S7PayloadUserDataItem{}, - Result: result, - Reserved01: reserved01, + _S7PayloadUserDataItem: &_S7PayloadUserDataItem{ + }, + Result: result, + Reserved01: reserved01, } _child._S7PayloadUserDataItem._S7PayloadUserDataItemChildRequirements = _child return _child, nil @@ -200,19 +202,19 @@ func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse) SerializeW return errors.Wrap(pushErr, "Error pushing for S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse") } - // Simple Field (result) - result := uint8(m.GetResult()) - _resultErr := writeBuffer.WriteUint8("result", 8, (result)) - if _resultErr != nil { - return errors.Wrap(_resultErr, "Error serializing 'result' field") - } + // Simple Field (result) + result := uint8(m.GetResult()) + _resultErr := writeBuffer.WriteUint8("result", 8, (result)) + if _resultErr != nil { + return errors.Wrap(_resultErr, "Error serializing 'result' field") + } - // Simple Field (reserved01) - reserved01 := uint8(m.GetReserved01()) - _reserved01Err := writeBuffer.WriteUint8("reserved01", 8, (reserved01)) - if _reserved01Err != nil { - return errors.Wrap(_reserved01Err, "Error serializing 'reserved01' field") - } + // Simple Field (reserved01) + reserved01 := uint8(m.GetReserved01()) + _reserved01Err := writeBuffer.WriteUint8("reserved01", 8, (reserved01)) + if _reserved01Err != nil { + return errors.Wrap(_reserved01Err, "Error serializing 'reserved01' field") + } if popErr := writeBuffer.PopContext("S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse") @@ -222,6 +224,7 @@ func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse) SerializeW return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse) isS7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse() bool { return true } @@ -236,3 +239,6 @@ func (m *_S7PayloadUserDataItemCpuFunctionMsgSubscriptionSysResponse) String() s } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItemCpuFunctionReadSzlRequest.go b/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItemCpuFunctionReadSzlRequest.go index 15d3c1fb57a..d961eb49659 100644 --- a/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItemCpuFunctionReadSzlRequest.go +++ b/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItemCpuFunctionReadSzlRequest.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7PayloadUserDataItemCpuFunctionReadSzlRequest is the corresponding interface of S7PayloadUserDataItemCpuFunctionReadSzlRequest type S7PayloadUserDataItemCpuFunctionReadSzlRequest interface { @@ -48,41 +50,38 @@ type S7PayloadUserDataItemCpuFunctionReadSzlRequestExactly interface { // _S7PayloadUserDataItemCpuFunctionReadSzlRequest is the data-structure of this message type _S7PayloadUserDataItemCpuFunctionReadSzlRequest struct { *_S7PayloadUserDataItem - SzlId SzlId - SzlIndex uint16 + SzlId SzlId + SzlIndex uint16 } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_S7PayloadUserDataItemCpuFunctionReadSzlRequest) GetCpuFunctionType() uint8 { - return 0x04 -} +func (m *_S7PayloadUserDataItemCpuFunctionReadSzlRequest) GetCpuFunctionType() uint8 { +return 0x04} -func (m *_S7PayloadUserDataItemCpuFunctionReadSzlRequest) GetCpuSubfunction() uint8 { - return 0x01 -} +func (m *_S7PayloadUserDataItemCpuFunctionReadSzlRequest) GetCpuSubfunction() uint8 { +return 0x01} -func (m *_S7PayloadUserDataItemCpuFunctionReadSzlRequest) GetDataLength() uint16 { - return 0 -} +func (m *_S7PayloadUserDataItemCpuFunctionReadSzlRequest) GetDataLength() uint16 { +return 0} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_S7PayloadUserDataItemCpuFunctionReadSzlRequest) InitializeParent(parent S7PayloadUserDataItem, returnCode DataTransportErrorCode, transportSize DataTransportSize) { - m.ReturnCode = returnCode +func (m *_S7PayloadUserDataItemCpuFunctionReadSzlRequest) InitializeParent(parent S7PayloadUserDataItem , returnCode DataTransportErrorCode , transportSize DataTransportSize ) { m.ReturnCode = returnCode m.TransportSize = transportSize } -func (m *_S7PayloadUserDataItemCpuFunctionReadSzlRequest) GetParent() S7PayloadUserDataItem { +func (m *_S7PayloadUserDataItemCpuFunctionReadSzlRequest) GetParent() S7PayloadUserDataItem { return m._S7PayloadUserDataItem } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -101,12 +100,13 @@ func (m *_S7PayloadUserDataItemCpuFunctionReadSzlRequest) GetSzlIndex() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewS7PayloadUserDataItemCpuFunctionReadSzlRequest factory function for _S7PayloadUserDataItemCpuFunctionReadSzlRequest -func NewS7PayloadUserDataItemCpuFunctionReadSzlRequest(szlId SzlId, szlIndex uint16, returnCode DataTransportErrorCode, transportSize DataTransportSize) *_S7PayloadUserDataItemCpuFunctionReadSzlRequest { +func NewS7PayloadUserDataItemCpuFunctionReadSzlRequest( szlId SzlId , szlIndex uint16 , returnCode DataTransportErrorCode , transportSize DataTransportSize ) *_S7PayloadUserDataItemCpuFunctionReadSzlRequest { _result := &_S7PayloadUserDataItemCpuFunctionReadSzlRequest{ - SzlId: szlId, - SzlIndex: szlIndex, - _S7PayloadUserDataItem: NewS7PayloadUserDataItem(returnCode, transportSize), + SzlId: szlId, + SzlIndex: szlIndex, + _S7PayloadUserDataItem: NewS7PayloadUserDataItem(returnCode, transportSize), } _result._S7PayloadUserDataItem._S7PayloadUserDataItemChildRequirements = _result return _result @@ -114,7 +114,7 @@ func NewS7PayloadUserDataItemCpuFunctionReadSzlRequest(szlId SzlId, szlIndex uin // Deprecated: use the interface for direct cast func CastS7PayloadUserDataItemCpuFunctionReadSzlRequest(structType interface{}) S7PayloadUserDataItemCpuFunctionReadSzlRequest { - if casted, ok := structType.(S7PayloadUserDataItemCpuFunctionReadSzlRequest); ok { + if casted, ok := structType.(S7PayloadUserDataItemCpuFunctionReadSzlRequest); ok { return casted } if casted, ok := structType.(*S7PayloadUserDataItemCpuFunctionReadSzlRequest); ok { @@ -134,11 +134,12 @@ func (m *_S7PayloadUserDataItemCpuFunctionReadSzlRequest) GetLengthInBits(ctx co lengthInBits += m.SzlId.GetLengthInBits(ctx) // Simple field (szlIndex) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_S7PayloadUserDataItemCpuFunctionReadSzlRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -160,7 +161,7 @@ func S7PayloadUserDataItemCpuFunctionReadSzlRequestParseWithBuffer(ctx context.C if pullErr := readBuffer.PullContext("szlId"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for szlId") } - _szlId, _szlIdErr := SzlIdParseWithBuffer(ctx, readBuffer) +_szlId, _szlIdErr := SzlIdParseWithBuffer(ctx, readBuffer) if _szlIdErr != nil { return nil, errors.Wrap(_szlIdErr, "Error parsing 'szlId' field of S7PayloadUserDataItemCpuFunctionReadSzlRequest") } @@ -170,7 +171,7 @@ func S7PayloadUserDataItemCpuFunctionReadSzlRequestParseWithBuffer(ctx context.C } // Simple Field (szlIndex) - _szlIndex, _szlIndexErr := readBuffer.ReadUint16("szlIndex", 16) +_szlIndex, _szlIndexErr := readBuffer.ReadUint16("szlIndex", 16) if _szlIndexErr != nil { return nil, errors.Wrap(_szlIndexErr, "Error parsing 'szlIndex' field of S7PayloadUserDataItemCpuFunctionReadSzlRequest") } @@ -182,9 +183,10 @@ func S7PayloadUserDataItemCpuFunctionReadSzlRequestParseWithBuffer(ctx context.C // Create a partially initialized instance _child := &_S7PayloadUserDataItemCpuFunctionReadSzlRequest{ - _S7PayloadUserDataItem: &_S7PayloadUserDataItem{}, - SzlId: szlId, - SzlIndex: szlIndex, + _S7PayloadUserDataItem: &_S7PayloadUserDataItem{ + }, + SzlId: szlId, + SzlIndex: szlIndex, } _child._S7PayloadUserDataItem._S7PayloadUserDataItemChildRequirements = _child return _child, nil @@ -206,24 +208,24 @@ func (m *_S7PayloadUserDataItemCpuFunctionReadSzlRequest) SerializeWithWriteBuff return errors.Wrap(pushErr, "Error pushing for S7PayloadUserDataItemCpuFunctionReadSzlRequest") } - // Simple Field (szlId) - if pushErr := writeBuffer.PushContext("szlId"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for szlId") - } - _szlIdErr := writeBuffer.WriteSerializable(ctx, m.GetSzlId()) - if popErr := writeBuffer.PopContext("szlId"); popErr != nil { - return errors.Wrap(popErr, "Error popping for szlId") - } - if _szlIdErr != nil { - return errors.Wrap(_szlIdErr, "Error serializing 'szlId' field") - } + // Simple Field (szlId) + if pushErr := writeBuffer.PushContext("szlId"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for szlId") + } + _szlIdErr := writeBuffer.WriteSerializable(ctx, m.GetSzlId()) + if popErr := writeBuffer.PopContext("szlId"); popErr != nil { + return errors.Wrap(popErr, "Error popping for szlId") + } + if _szlIdErr != nil { + return errors.Wrap(_szlIdErr, "Error serializing 'szlId' field") + } - // Simple Field (szlIndex) - szlIndex := uint16(m.GetSzlIndex()) - _szlIndexErr := writeBuffer.WriteUint16("szlIndex", 16, (szlIndex)) - if _szlIndexErr != nil { - return errors.Wrap(_szlIndexErr, "Error serializing 'szlIndex' field") - } + // Simple Field (szlIndex) + szlIndex := uint16(m.GetSzlIndex()) + _szlIndexErr := writeBuffer.WriteUint16("szlIndex", 16, (szlIndex)) + if _szlIndexErr != nil { + return errors.Wrap(_szlIndexErr, "Error serializing 'szlIndex' field") + } if popErr := writeBuffer.PopContext("S7PayloadUserDataItemCpuFunctionReadSzlRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for S7PayloadUserDataItemCpuFunctionReadSzlRequest") @@ -233,6 +235,7 @@ func (m *_S7PayloadUserDataItemCpuFunctionReadSzlRequest) SerializeWithWriteBuff return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_S7PayloadUserDataItemCpuFunctionReadSzlRequest) isS7PayloadUserDataItemCpuFunctionReadSzlRequest() bool { return true } @@ -247,3 +250,6 @@ func (m *_S7PayloadUserDataItemCpuFunctionReadSzlRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItemCpuFunctionReadSzlResponse.go b/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItemCpuFunctionReadSzlResponse.go index 55d54627292..f603c501628 100644 --- a/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItemCpuFunctionReadSzlResponse.go +++ b/plc4go/protocols/s7/readwrite/model/S7PayloadUserDataItemCpuFunctionReadSzlResponse.go @@ -19,15 +19,17 @@ package model + import ( "context" "fmt" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const S7PayloadUserDataItemCpuFunctionReadSzlResponse_SZLITEMLENGTH uint16 = uint16(28) @@ -55,42 +57,39 @@ type S7PayloadUserDataItemCpuFunctionReadSzlResponseExactly interface { // _S7PayloadUserDataItemCpuFunctionReadSzlResponse is the data-structure of this message type _S7PayloadUserDataItemCpuFunctionReadSzlResponse struct { *_S7PayloadUserDataItem - SzlId SzlId - SzlIndex uint16 - Items []SzlDataTreeItem + SzlId SzlId + SzlIndex uint16 + Items []SzlDataTreeItem } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_S7PayloadUserDataItemCpuFunctionReadSzlResponse) GetCpuFunctionType() uint8 { - return 0x08 -} +func (m *_S7PayloadUserDataItemCpuFunctionReadSzlResponse) GetCpuFunctionType() uint8 { +return 0x08} -func (m *_S7PayloadUserDataItemCpuFunctionReadSzlResponse) GetCpuSubfunction() uint8 { - return 0x01 -} +func (m *_S7PayloadUserDataItemCpuFunctionReadSzlResponse) GetCpuSubfunction() uint8 { +return 0x01} -func (m *_S7PayloadUserDataItemCpuFunctionReadSzlResponse) GetDataLength() uint16 { - return 0 -} +func (m *_S7PayloadUserDataItemCpuFunctionReadSzlResponse) GetDataLength() uint16 { +return 0} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_S7PayloadUserDataItemCpuFunctionReadSzlResponse) InitializeParent(parent S7PayloadUserDataItem, returnCode DataTransportErrorCode, transportSize DataTransportSize) { - m.ReturnCode = returnCode +func (m *_S7PayloadUserDataItemCpuFunctionReadSzlResponse) InitializeParent(parent S7PayloadUserDataItem , returnCode DataTransportErrorCode , transportSize DataTransportSize ) { m.ReturnCode = returnCode m.TransportSize = transportSize } -func (m *_S7PayloadUserDataItemCpuFunctionReadSzlResponse) GetParent() S7PayloadUserDataItem { +func (m *_S7PayloadUserDataItemCpuFunctionReadSzlResponse) GetParent() S7PayloadUserDataItem { return m._S7PayloadUserDataItem } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -126,13 +125,14 @@ func (m *_S7PayloadUserDataItemCpuFunctionReadSzlResponse) GetSzlItemLength() ui /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewS7PayloadUserDataItemCpuFunctionReadSzlResponse factory function for _S7PayloadUserDataItemCpuFunctionReadSzlResponse -func NewS7PayloadUserDataItemCpuFunctionReadSzlResponse(szlId SzlId, szlIndex uint16, items []SzlDataTreeItem, returnCode DataTransportErrorCode, transportSize DataTransportSize) *_S7PayloadUserDataItemCpuFunctionReadSzlResponse { +func NewS7PayloadUserDataItemCpuFunctionReadSzlResponse( szlId SzlId , szlIndex uint16 , items []SzlDataTreeItem , returnCode DataTransportErrorCode , transportSize DataTransportSize ) *_S7PayloadUserDataItemCpuFunctionReadSzlResponse { _result := &_S7PayloadUserDataItemCpuFunctionReadSzlResponse{ - SzlId: szlId, - SzlIndex: szlIndex, - Items: items, - _S7PayloadUserDataItem: NewS7PayloadUserDataItem(returnCode, transportSize), + SzlId: szlId, + SzlIndex: szlIndex, + Items: items, + _S7PayloadUserDataItem: NewS7PayloadUserDataItem(returnCode, transportSize), } _result._S7PayloadUserDataItem._S7PayloadUserDataItemChildRequirements = _result return _result @@ -140,7 +140,7 @@ func NewS7PayloadUserDataItemCpuFunctionReadSzlResponse(szlId SzlId, szlIndex ui // Deprecated: use the interface for direct cast func CastS7PayloadUserDataItemCpuFunctionReadSzlResponse(structType interface{}) S7PayloadUserDataItemCpuFunctionReadSzlResponse { - if casted, ok := structType.(S7PayloadUserDataItemCpuFunctionReadSzlResponse); ok { + if casted, ok := structType.(S7PayloadUserDataItemCpuFunctionReadSzlResponse); ok { return casted } if casted, ok := structType.(*S7PayloadUserDataItemCpuFunctionReadSzlResponse); ok { @@ -160,7 +160,7 @@ func (m *_S7PayloadUserDataItemCpuFunctionReadSzlResponse) GetLengthInBits(ctx c lengthInBits += m.SzlId.GetLengthInBits(ctx) // Simple field (szlIndex) - lengthInBits += 16 + lengthInBits += 16; // Const Field (szlItemLength) lengthInBits += 16 @@ -174,13 +174,14 @@ func (m *_S7PayloadUserDataItemCpuFunctionReadSzlResponse) GetLengthInBits(ctx c arrayCtx := spiContext.CreateArrayContext(ctx, len(m.Items), _curItem) _ = arrayCtx _ = _curItem - lengthInBits += element.(interface{ GetLengthInBits(context.Context) uint16 }).GetLengthInBits(arrayCtx) + lengthInBits += element.(interface{GetLengthInBits(context.Context) uint16}).GetLengthInBits(arrayCtx) } } return lengthInBits } + func (m *_S7PayloadUserDataItemCpuFunctionReadSzlResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -202,7 +203,7 @@ func S7PayloadUserDataItemCpuFunctionReadSzlResponseParseWithBuffer(ctx context. if pullErr := readBuffer.PullContext("szlId"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for szlId") } - _szlId, _szlIdErr := SzlIdParseWithBuffer(ctx, readBuffer) +_szlId, _szlIdErr := SzlIdParseWithBuffer(ctx, readBuffer) if _szlIdErr != nil { return nil, errors.Wrap(_szlIdErr, "Error parsing 'szlId' field of S7PayloadUserDataItemCpuFunctionReadSzlResponse") } @@ -212,7 +213,7 @@ func S7PayloadUserDataItemCpuFunctionReadSzlResponseParseWithBuffer(ctx context. } // Simple Field (szlIndex) - _szlIndex, _szlIndexErr := readBuffer.ReadUint16("szlIndex", 16) +_szlIndex, _szlIndexErr := readBuffer.ReadUint16("szlIndex", 16) if _szlIndexErr != nil { return nil, errors.Wrap(_szlIndexErr, "Error parsing 'szlIndex' field of S7PayloadUserDataItemCpuFunctionReadSzlResponse") } @@ -250,7 +251,7 @@ func S7PayloadUserDataItemCpuFunctionReadSzlResponseParseWithBuffer(ctx context. arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := SzlDataTreeItemParseWithBuffer(arrayCtx, readBuffer) +_item, _err := SzlDataTreeItemParseWithBuffer(arrayCtx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'items' field of S7PayloadUserDataItemCpuFunctionReadSzlResponse") } @@ -267,10 +268,11 @@ func S7PayloadUserDataItemCpuFunctionReadSzlResponseParseWithBuffer(ctx context. // Create a partially initialized instance _child := &_S7PayloadUserDataItemCpuFunctionReadSzlResponse{ - _S7PayloadUserDataItem: &_S7PayloadUserDataItem{}, - SzlId: szlId, - SzlIndex: szlIndex, - Items: items, + _S7PayloadUserDataItem: &_S7PayloadUserDataItem{ + }, + SzlId: szlId, + SzlIndex: szlIndex, + Items: items, } _child._S7PayloadUserDataItem._S7PayloadUserDataItemChildRequirements = _child return _child, nil @@ -292,54 +294,54 @@ func (m *_S7PayloadUserDataItemCpuFunctionReadSzlResponse) SerializeWithWriteBuf return errors.Wrap(pushErr, "Error pushing for S7PayloadUserDataItemCpuFunctionReadSzlResponse") } - // Simple Field (szlId) - if pushErr := writeBuffer.PushContext("szlId"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for szlId") - } - _szlIdErr := writeBuffer.WriteSerializable(ctx, m.GetSzlId()) - if popErr := writeBuffer.PopContext("szlId"); popErr != nil { - return errors.Wrap(popErr, "Error popping for szlId") - } - if _szlIdErr != nil { - return errors.Wrap(_szlIdErr, "Error serializing 'szlId' field") - } + // Simple Field (szlId) + if pushErr := writeBuffer.PushContext("szlId"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for szlId") + } + _szlIdErr := writeBuffer.WriteSerializable(ctx, m.GetSzlId()) + if popErr := writeBuffer.PopContext("szlId"); popErr != nil { + return errors.Wrap(popErr, "Error popping for szlId") + } + if _szlIdErr != nil { + return errors.Wrap(_szlIdErr, "Error serializing 'szlId' field") + } - // Simple Field (szlIndex) - szlIndex := uint16(m.GetSzlIndex()) - _szlIndexErr := writeBuffer.WriteUint16("szlIndex", 16, (szlIndex)) - if _szlIndexErr != nil { - return errors.Wrap(_szlIndexErr, "Error serializing 'szlIndex' field") - } + // Simple Field (szlIndex) + szlIndex := uint16(m.GetSzlIndex()) + _szlIndexErr := writeBuffer.WriteUint16("szlIndex", 16, (szlIndex)) + if _szlIndexErr != nil { + return errors.Wrap(_szlIndexErr, "Error serializing 'szlIndex' field") + } - // Const Field (szlItemLength) - _szlItemLengthErr := writeBuffer.WriteUint16("szlItemLength", 16, 28) - if _szlItemLengthErr != nil { - return errors.Wrap(_szlItemLengthErr, "Error serializing 'szlItemLength' field") - } + // Const Field (szlItemLength) + _szlItemLengthErr := writeBuffer.WriteUint16("szlItemLength", 16, 28) + if _szlItemLengthErr != nil { + return errors.Wrap(_szlItemLengthErr, "Error serializing 'szlItemLength' field") + } - // Implicit Field (szlItemCount) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - szlItemCount := uint16(uint16(len(m.GetItems()))) - _szlItemCountErr := writeBuffer.WriteUint16("szlItemCount", 16, (szlItemCount)) - if _szlItemCountErr != nil { - return errors.Wrap(_szlItemCountErr, "Error serializing 'szlItemCount' field") - } + // Implicit Field (szlItemCount) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) + szlItemCount := uint16(uint16(len(m.GetItems()))) + _szlItemCountErr := writeBuffer.WriteUint16("szlItemCount", 16, (szlItemCount)) + if _szlItemCountErr != nil { + return errors.Wrap(_szlItemCountErr, "Error serializing 'szlItemCount' field") + } - // Array Field (items) - if pushErr := writeBuffer.PushContext("items", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for items") - } - for _curItem, _element := range m.GetItems() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetItems()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'items' field") - } - } - if popErr := writeBuffer.PopContext("items", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for items") + // Array Field (items) + if pushErr := writeBuffer.PushContext("items", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for items") + } + for _curItem, _element := range m.GetItems() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetItems()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'items' field") } + } + if popErr := writeBuffer.PopContext("items", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for items") + } if popErr := writeBuffer.PopContext("S7PayloadUserDataItemCpuFunctionReadSzlResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for S7PayloadUserDataItemCpuFunctionReadSzlResponse") @@ -349,6 +351,7 @@ func (m *_S7PayloadUserDataItemCpuFunctionReadSzlResponse) SerializeWithWriteBuf return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_S7PayloadUserDataItemCpuFunctionReadSzlResponse) isS7PayloadUserDataItemCpuFunctionReadSzlResponse() bool { return true } @@ -363,3 +366,6 @@ func (m *_S7PayloadUserDataItemCpuFunctionReadSzlResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7PayloadWriteVarRequest.go b/plc4go/protocols/s7/readwrite/model/S7PayloadWriteVarRequest.go index a150adb1fa5..0b6c7f22404 100644 --- a/plc4go/protocols/s7/readwrite/model/S7PayloadWriteVarRequest.go +++ b/plc4go/protocols/s7/readwrite/model/S7PayloadWriteVarRequest.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7PayloadWriteVarRequest is the corresponding interface of S7PayloadWriteVarRequest type S7PayloadWriteVarRequest interface { @@ -47,33 +49,32 @@ type S7PayloadWriteVarRequestExactly interface { // _S7PayloadWriteVarRequest is the data-structure of this message type _S7PayloadWriteVarRequest struct { *_S7Payload - Items []S7VarPayloadDataItem + Items []S7VarPayloadDataItem } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_S7PayloadWriteVarRequest) GetParameterParameterType() uint8 { - return 0x05 -} +func (m *_S7PayloadWriteVarRequest) GetParameterParameterType() uint8 { +return 0x05} -func (m *_S7PayloadWriteVarRequest) GetMessageType() uint8 { - return 0x01 -} +func (m *_S7PayloadWriteVarRequest) GetMessageType() uint8 { +return 0x01} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_S7PayloadWriteVarRequest) InitializeParent(parent S7Payload) {} +func (m *_S7PayloadWriteVarRequest) InitializeParent(parent S7Payload ) {} -func (m *_S7PayloadWriteVarRequest) GetParent() S7Payload { +func (m *_S7PayloadWriteVarRequest) GetParent() S7Payload { return m._S7Payload } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -88,11 +89,12 @@ func (m *_S7PayloadWriteVarRequest) GetItems() []S7VarPayloadDataItem { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewS7PayloadWriteVarRequest factory function for _S7PayloadWriteVarRequest -func NewS7PayloadWriteVarRequest(items []S7VarPayloadDataItem, parameter S7Parameter) *_S7PayloadWriteVarRequest { +func NewS7PayloadWriteVarRequest( items []S7VarPayloadDataItem , parameter S7Parameter ) *_S7PayloadWriteVarRequest { _result := &_S7PayloadWriteVarRequest{ - Items: items, - _S7Payload: NewS7Payload(parameter), + Items: items, + _S7Payload: NewS7Payload(parameter), } _result._S7Payload._S7PayloadChildRequirements = _result return _result @@ -100,7 +102,7 @@ func NewS7PayloadWriteVarRequest(items []S7VarPayloadDataItem, parameter S7Param // Deprecated: use the interface for direct cast func CastS7PayloadWriteVarRequest(structType interface{}) S7PayloadWriteVarRequest { - if casted, ok := structType.(S7PayloadWriteVarRequest); ok { + if casted, ok := structType.(S7PayloadWriteVarRequest); ok { return casted } if casted, ok := structType.(*S7PayloadWriteVarRequest); ok { @@ -122,13 +124,14 @@ func (m *_S7PayloadWriteVarRequest) GetLengthInBits(ctx context.Context) uint16 arrayCtx := spiContext.CreateArrayContext(ctx, len(m.Items), _curItem) _ = arrayCtx _ = _curItem - lengthInBits += element.(interface{ GetLengthInBits(context.Context) uint16 }).GetLengthInBits(arrayCtx) + lengthInBits += element.(interface{GetLengthInBits(context.Context) uint16}).GetLengthInBits(arrayCtx) } } return lengthInBits } + func (m *_S7PayloadWriteVarRequest) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -162,7 +165,7 @@ func S7PayloadWriteVarRequestParseWithBuffer(ctx context.Context, readBuffer uti arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := S7VarPayloadDataItemParseWithBuffer(arrayCtx, readBuffer) +_item, _err := S7VarPayloadDataItemParseWithBuffer(arrayCtx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'items' field of S7PayloadWriteVarRequest") } @@ -204,22 +207,22 @@ func (m *_S7PayloadWriteVarRequest) SerializeWithWriteBuffer(ctx context.Context return errors.Wrap(pushErr, "Error pushing for S7PayloadWriteVarRequest") } - // Array Field (items) - if pushErr := writeBuffer.PushContext("items", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for items") - } - for _curItem, _element := range m.GetItems() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetItems()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'items' field") - } - } - if popErr := writeBuffer.PopContext("items", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for items") + // Array Field (items) + if pushErr := writeBuffer.PushContext("items", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for items") + } + for _curItem, _element := range m.GetItems() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetItems()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'items' field") } + } + if popErr := writeBuffer.PopContext("items", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for items") + } if popErr := writeBuffer.PopContext("S7PayloadWriteVarRequest"); popErr != nil { return errors.Wrap(popErr, "Error popping for S7PayloadWriteVarRequest") @@ -229,6 +232,7 @@ func (m *_S7PayloadWriteVarRequest) SerializeWithWriteBuffer(ctx context.Context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_S7PayloadWriteVarRequest) isS7PayloadWriteVarRequest() bool { return true } @@ -243,3 +247,6 @@ func (m *_S7PayloadWriteVarRequest) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7PayloadWriteVarResponse.go b/plc4go/protocols/s7/readwrite/model/S7PayloadWriteVarResponse.go index 67873406877..8cf8df2e3ef 100644 --- a/plc4go/protocols/s7/readwrite/model/S7PayloadWriteVarResponse.go +++ b/plc4go/protocols/s7/readwrite/model/S7PayloadWriteVarResponse.go @@ -19,14 +19,16 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7PayloadWriteVarResponse is the corresponding interface of S7PayloadWriteVarResponse type S7PayloadWriteVarResponse interface { @@ -47,33 +49,32 @@ type S7PayloadWriteVarResponseExactly interface { // _S7PayloadWriteVarResponse is the data-structure of this message type _S7PayloadWriteVarResponse struct { *_S7Payload - Items []S7VarPayloadStatusItem + Items []S7VarPayloadStatusItem } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_S7PayloadWriteVarResponse) GetParameterParameterType() uint8 { - return 0x05 -} +func (m *_S7PayloadWriteVarResponse) GetParameterParameterType() uint8 { +return 0x05} -func (m *_S7PayloadWriteVarResponse) GetMessageType() uint8 { - return 0x03 -} +func (m *_S7PayloadWriteVarResponse) GetMessageType() uint8 { +return 0x03} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_S7PayloadWriteVarResponse) InitializeParent(parent S7Payload) {} +func (m *_S7PayloadWriteVarResponse) InitializeParent(parent S7Payload ) {} -func (m *_S7PayloadWriteVarResponse) GetParent() S7Payload { +func (m *_S7PayloadWriteVarResponse) GetParent() S7Payload { return m._S7Payload } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -88,11 +89,12 @@ func (m *_S7PayloadWriteVarResponse) GetItems() []S7VarPayloadStatusItem { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewS7PayloadWriteVarResponse factory function for _S7PayloadWriteVarResponse -func NewS7PayloadWriteVarResponse(items []S7VarPayloadStatusItem, parameter S7Parameter) *_S7PayloadWriteVarResponse { +func NewS7PayloadWriteVarResponse( items []S7VarPayloadStatusItem , parameter S7Parameter ) *_S7PayloadWriteVarResponse { _result := &_S7PayloadWriteVarResponse{ - Items: items, - _S7Payload: NewS7Payload(parameter), + Items: items, + _S7Payload: NewS7Payload(parameter), } _result._S7Payload._S7PayloadChildRequirements = _result return _result @@ -100,7 +102,7 @@ func NewS7PayloadWriteVarResponse(items []S7VarPayloadStatusItem, parameter S7Pa // Deprecated: use the interface for direct cast func CastS7PayloadWriteVarResponse(structType interface{}) S7PayloadWriteVarResponse { - if casted, ok := structType.(S7PayloadWriteVarResponse); ok { + if casted, ok := structType.(S7PayloadWriteVarResponse); ok { return casted } if casted, ok := structType.(*S7PayloadWriteVarResponse); ok { @@ -122,13 +124,14 @@ func (m *_S7PayloadWriteVarResponse) GetLengthInBits(ctx context.Context) uint16 arrayCtx := spiContext.CreateArrayContext(ctx, len(m.Items), _curItem) _ = arrayCtx _ = _curItem - lengthInBits += element.(interface{ GetLengthInBits(context.Context) uint16 }).GetLengthInBits(arrayCtx) + lengthInBits += element.(interface{GetLengthInBits(context.Context) uint16}).GetLengthInBits(arrayCtx) } } return lengthInBits } + func (m *_S7PayloadWriteVarResponse) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -162,7 +165,7 @@ func S7PayloadWriteVarResponseParseWithBuffer(ctx context.Context, readBuffer ut arrayCtx := spiContext.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := S7VarPayloadStatusItemParseWithBuffer(arrayCtx, readBuffer) +_item, _err := S7VarPayloadStatusItemParseWithBuffer(arrayCtx, readBuffer) if _err != nil { return nil, errors.Wrap(_err, "Error parsing 'items' field of S7PayloadWriteVarResponse") } @@ -204,22 +207,22 @@ func (m *_S7PayloadWriteVarResponse) SerializeWithWriteBuffer(ctx context.Contex return errors.Wrap(pushErr, "Error pushing for S7PayloadWriteVarResponse") } - // Array Field (items) - if pushErr := writeBuffer.PushContext("items", utils.WithRenderAsList(true)); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for items") - } - for _curItem, _element := range m.GetItems() { - _ = _curItem - arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetItems()), _curItem) - _ = arrayCtx - _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) - if _elementErr != nil { - return errors.Wrap(_elementErr, "Error serializing 'items' field") - } - } - if popErr := writeBuffer.PopContext("items", utils.WithRenderAsList(true)); popErr != nil { - return errors.Wrap(popErr, "Error popping for items") + // Array Field (items) + if pushErr := writeBuffer.PushContext("items", utils.WithRenderAsList(true)); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for items") + } + for _curItem, _element := range m.GetItems() { + _ = _curItem + arrayCtx := spiContext.CreateArrayContext(ctx, len(m.GetItems()), _curItem) + _ = arrayCtx + _elementErr := writeBuffer.WriteSerializable(arrayCtx, _element) + if _elementErr != nil { + return errors.Wrap(_elementErr, "Error serializing 'items' field") } + } + if popErr := writeBuffer.PopContext("items", utils.WithRenderAsList(true)); popErr != nil { + return errors.Wrap(popErr, "Error popping for items") + } if popErr := writeBuffer.PopContext("S7PayloadWriteVarResponse"); popErr != nil { return errors.Wrap(popErr, "Error popping for S7PayloadWriteVarResponse") @@ -229,6 +232,7 @@ func (m *_S7PayloadWriteVarResponse) SerializeWithWriteBuffer(ctx context.Contex return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_S7PayloadWriteVarResponse) isS7PayloadWriteVarResponse() bool { return true } @@ -243,3 +247,6 @@ func (m *_S7PayloadWriteVarResponse) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7VarPayloadDataItem.go b/plc4go/protocols/s7/readwrite/model/S7VarPayloadDataItem.go index 30f363cd873..e0d9865e0a9 100644 --- a/plc4go/protocols/s7/readwrite/model/S7VarPayloadDataItem.go +++ b/plc4go/protocols/s7/readwrite/model/S7VarPayloadDataItem.go @@ -19,15 +19,17 @@ package model + import ( "context" - spiContext "github.com/apache/plc4x/plc4go/spi/context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" "math" + spiContext "github.com/apache/plc4x/plc4go/spi/context" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7VarPayloadDataItem is the corresponding interface of S7VarPayloadDataItem type S7VarPayloadDataItem interface { @@ -50,11 +52,12 @@ type S7VarPayloadDataItemExactly interface { // _S7VarPayloadDataItem is the data-structure of this message type _S7VarPayloadDataItem struct { - ReturnCode DataTransportErrorCode - TransportSize DataTransportSize - Data []byte + ReturnCode DataTransportErrorCode + TransportSize DataTransportSize + Data []byte } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -77,14 +80,15 @@ func (m *_S7VarPayloadDataItem) GetData() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewS7VarPayloadDataItem factory function for _S7VarPayloadDataItem -func NewS7VarPayloadDataItem(returnCode DataTransportErrorCode, transportSize DataTransportSize, data []byte) *_S7VarPayloadDataItem { - return &_S7VarPayloadDataItem{ReturnCode: returnCode, TransportSize: transportSize, Data: data} +func NewS7VarPayloadDataItem( returnCode DataTransportErrorCode , transportSize DataTransportSize , data []byte ) *_S7VarPayloadDataItem { +return &_S7VarPayloadDataItem{ ReturnCode: returnCode , TransportSize: transportSize , Data: data } } // Deprecated: use the interface for direct cast func CastS7VarPayloadDataItem(structType interface{}) S7VarPayloadDataItem { - if casted, ok := structType.(S7VarPayloadDataItem); ok { + if casted, ok := structType.(S7VarPayloadDataItem); ok { return casted } if casted, ok := structType.(*S7VarPayloadDataItem); ok { @@ -115,14 +119,15 @@ func (m *_S7VarPayloadDataItem) GetLengthInBits(ctx context.Context) uint16 { } // Padding Field (padding) - _timesPadding := uint8(utils.InlineIf((!(spiContext.GetLastItemFromContext(ctx))), func() interface{} { return int32((int32(int32(len(m.GetData()))) % int32(int32(2)))) }, func() interface{} { return int32(int32(0)) }).(int32)) - for ; _timesPadding > 0; _timesPadding-- { + _timesPadding := uint8(utils.InlineIf((!(spiContext.GetLastItemFromContext(ctx))), func() interface{} {return int32((int32(int32(len(m.GetData()))) % int32(int32(2))))}, func() interface{} {return int32(int32(0))}).(int32)) + for ;_timesPadding > 0; _timesPadding-- { lengthInBits += 8 } return lengthInBits } + func (m *_S7VarPayloadDataItem) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -144,7 +149,7 @@ func S7VarPayloadDataItemParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("returnCode"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for returnCode") } - _returnCode, _returnCodeErr := DataTransportErrorCodeParseWithBuffer(ctx, readBuffer) +_returnCode, _returnCodeErr := DataTransportErrorCodeParseWithBuffer(ctx, readBuffer) if _returnCodeErr != nil { return nil, errors.Wrap(_returnCodeErr, "Error parsing 'returnCode' field of S7VarPayloadDataItem") } @@ -157,7 +162,7 @@ func S7VarPayloadDataItemParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("transportSize"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for transportSize") } - _transportSize, _transportSizeErr := DataTransportSizeParseWithBuffer(ctx, readBuffer) +_transportSize, _transportSizeErr := DataTransportSizeParseWithBuffer(ctx, readBuffer) if _transportSizeErr != nil { return nil, errors.Wrap(_transportSizeErr, "Error parsing 'transportSize' field of S7VarPayloadDataItem") } @@ -173,7 +178,7 @@ func S7VarPayloadDataItemParseWithBuffer(ctx context.Context, readBuffer utils.R return nil, errors.Wrap(_dataLengthErr, "Error parsing 'dataLength' field of S7VarPayloadDataItem") } // Byte Array field (data) - numberOfBytesdata := int(utils.InlineIf(transportSize.SizeInBits(), func() interface{} { return uint16(math.Ceil(float64(dataLength) / float64(float64(8.0)))) }, func() interface{} { return uint16(dataLength) }).(uint16)) + numberOfBytesdata := int(utils.InlineIf(transportSize.SizeInBits(), func() interface{} {return uint16(math.Ceil(float64(dataLength) / float64(float64(8.0))))}, func() interface{} {return uint16(dataLength)}).(uint16)) data, _readArrayErr := readBuffer.ReadByteArray("data", numberOfBytesdata) if _readArrayErr != nil { return nil, errors.Wrap(_readArrayErr, "Error parsing 'data' field of S7VarPayloadDataItem") @@ -184,8 +189,8 @@ func S7VarPayloadDataItemParseWithBuffer(ctx context.Context, readBuffer utils.R if pullErr := readBuffer.PullContext("padding", utils.WithRenderAsList(true)); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for padding") } - _timesPadding := (utils.InlineIf((!(spiContext.GetLastItemFromContext(ctx))), func() interface{} { return int32((int32(int32(len(data))) % int32(int32(2)))) }, func() interface{} { return int32(int32(0)) }).(int32)) - for ; (readBuffer.HasMore(8)) && (_timesPadding > 0); _timesPadding-- { + _timesPadding := (utils.InlineIf((!(spiContext.GetLastItemFromContext(ctx))), func() interface{} {return int32((int32(int32(len(data))) % int32(int32(2))))}, func() interface{} {return int32(int32(0))}).(int32)) + for ;(readBuffer.HasMore(8)) && (_timesPadding > 0);_timesPadding-- { // Just read the padding data and ignore it _, _err := readBuffer.ReadUint8("", 8) if _err != nil { @@ -203,10 +208,10 @@ func S7VarPayloadDataItemParseWithBuffer(ctx context.Context, readBuffer utils.R // Create the instance return &_S7VarPayloadDataItem{ - ReturnCode: returnCode, - TransportSize: transportSize, - Data: data, - }, nil + ReturnCode: returnCode, + TransportSize: transportSize, + Data: data, + }, nil } func (m *_S7VarPayloadDataItem) Serialize() ([]byte, error) { @@ -220,7 +225,7 @@ func (m *_S7VarPayloadDataItem) Serialize() ([]byte, error) { func (m *_S7VarPayloadDataItem) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("S7VarPayloadDataItem"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("S7VarPayloadDataItem"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for S7VarPayloadDataItem") } @@ -249,9 +254,7 @@ func (m *_S7VarPayloadDataItem) SerializeWithWriteBuffer(ctx context.Context, wr } // Implicit Field (dataLength) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - dataLength := uint16(uint16(uint16(len(m.GetData()))) * uint16((utils.InlineIf((bool((m.GetTransportSize()) == (DataTransportSize_BIT))), func() interface{} { return uint16(uint16(1)) }, func() interface{} { - return uint16((utils.InlineIf(m.GetTransportSize().SizeInBits(), func() interface{} { return uint16(uint16(8)) }, func() interface{} { return uint16(uint16(1)) }).(uint16))) - }).(uint16)))) + dataLength := uint16(uint16(uint16(len(m.GetData()))) * uint16((utils.InlineIf((bool((m.GetTransportSize()) == (DataTransportSize_BIT))), func() interface{} {return uint16(uint16(1))}, func() interface{} {return uint16((utils.InlineIf(m.GetTransportSize().SizeInBits(), func() interface{} {return uint16(uint16(8))}, func() interface{} {return uint16(uint16(1))}).(uint16)))}).(uint16)))) _dataLengthErr := writeBuffer.WriteUint16("dataLength", 16, (dataLength)) if _dataLengthErr != nil { return errors.Wrap(_dataLengthErr, "Error serializing 'dataLength' field") @@ -268,8 +271,8 @@ func (m *_S7VarPayloadDataItem) SerializeWithWriteBuffer(ctx context.Context, wr if pushErr := writeBuffer.PushContext("padding", utils.WithRenderAsList(true)); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for padding") } - _timesPadding := uint8(utils.InlineIf((!(spiContext.GetLastItemFromContext(ctx))), func() interface{} { return int32((int32(int32(len(m.GetData()))) % int32(int32(2)))) }, func() interface{} { return int32(int32(0)) }).(int32)) - for ; _timesPadding > 0; _timesPadding-- { + _timesPadding := uint8(utils.InlineIf((!(spiContext.GetLastItemFromContext(ctx))), func() interface{} {return int32((int32(int32(len(m.GetData()))) % int32(int32(2))))}, func() interface{} {return int32(int32(0))}).(int32)) + for ;_timesPadding > 0; _timesPadding-- { _paddingValue := uint8(0x00) _paddingErr := writeBuffer.WriteUint8("", 8, (_paddingValue)) if _paddingErr != nil { @@ -287,6 +290,7 @@ func (m *_S7VarPayloadDataItem) SerializeWithWriteBuffer(ctx context.Context, wr return nil } + func (m *_S7VarPayloadDataItem) isS7VarPayloadDataItem() bool { return true } @@ -301,3 +305,6 @@ func (m *_S7VarPayloadDataItem) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7VarPayloadStatusItem.go b/plc4go/protocols/s7/readwrite/model/S7VarPayloadStatusItem.go index ae38d4374a0..83f4566e26e 100644 --- a/plc4go/protocols/s7/readwrite/model/S7VarPayloadStatusItem.go +++ b/plc4go/protocols/s7/readwrite/model/S7VarPayloadStatusItem.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7VarPayloadStatusItem is the corresponding interface of S7VarPayloadStatusItem type S7VarPayloadStatusItem interface { @@ -44,9 +46,10 @@ type S7VarPayloadStatusItemExactly interface { // _S7VarPayloadStatusItem is the data-structure of this message type _S7VarPayloadStatusItem struct { - ReturnCode DataTransportErrorCode + ReturnCode DataTransportErrorCode } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -61,14 +64,15 @@ func (m *_S7VarPayloadStatusItem) GetReturnCode() DataTransportErrorCode { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewS7VarPayloadStatusItem factory function for _S7VarPayloadStatusItem -func NewS7VarPayloadStatusItem(returnCode DataTransportErrorCode) *_S7VarPayloadStatusItem { - return &_S7VarPayloadStatusItem{ReturnCode: returnCode} +func NewS7VarPayloadStatusItem( returnCode DataTransportErrorCode ) *_S7VarPayloadStatusItem { +return &_S7VarPayloadStatusItem{ ReturnCode: returnCode } } // Deprecated: use the interface for direct cast func CastS7VarPayloadStatusItem(structType interface{}) S7VarPayloadStatusItem { - if casted, ok := structType.(S7VarPayloadStatusItem); ok { + if casted, ok := structType.(S7VarPayloadStatusItem); ok { return casted } if casted, ok := structType.(*S7VarPayloadStatusItem); ok { @@ -90,6 +94,7 @@ func (m *_S7VarPayloadStatusItem) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_S7VarPayloadStatusItem) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -111,7 +116,7 @@ func S7VarPayloadStatusItemParseWithBuffer(ctx context.Context, readBuffer utils if pullErr := readBuffer.PullContext("returnCode"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for returnCode") } - _returnCode, _returnCodeErr := DataTransportErrorCodeParseWithBuffer(ctx, readBuffer) +_returnCode, _returnCodeErr := DataTransportErrorCodeParseWithBuffer(ctx, readBuffer) if _returnCodeErr != nil { return nil, errors.Wrap(_returnCodeErr, "Error parsing 'returnCode' field of S7VarPayloadStatusItem") } @@ -126,8 +131,8 @@ func S7VarPayloadStatusItemParseWithBuffer(ctx context.Context, readBuffer utils // Create the instance return &_S7VarPayloadStatusItem{ - ReturnCode: returnCode, - }, nil + ReturnCode: returnCode, + }, nil } func (m *_S7VarPayloadStatusItem) Serialize() ([]byte, error) { @@ -141,7 +146,7 @@ func (m *_S7VarPayloadStatusItem) Serialize() ([]byte, error) { func (m *_S7VarPayloadStatusItem) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("S7VarPayloadStatusItem"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("S7VarPayloadStatusItem"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for S7VarPayloadStatusItem") } @@ -163,6 +168,7 @@ func (m *_S7VarPayloadStatusItem) SerializeWithWriteBuffer(ctx context.Context, return nil } + func (m *_S7VarPayloadStatusItem) isS7VarPayloadStatusItem() bool { return true } @@ -177,3 +183,6 @@ func (m *_S7VarPayloadStatusItem) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7VarRequestParameterItem.go b/plc4go/protocols/s7/readwrite/model/S7VarRequestParameterItem.go index 53a6d224b0e..50a6ec6fdb4 100644 --- a/plc4go/protocols/s7/readwrite/model/S7VarRequestParameterItem.go +++ b/plc4go/protocols/s7/readwrite/model/S7VarRequestParameterItem.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7VarRequestParameterItem is the corresponding interface of S7VarRequestParameterItem type S7VarRequestParameterItem interface { @@ -53,6 +55,7 @@ type _S7VarRequestParameterItemChildRequirements interface { GetItemType() uint8 } + type S7VarRequestParameterItemParent interface { SerializeParent(ctx context.Context, writeBuffer utils.WriteBuffer, child S7VarRequestParameterItem, serializeChildFunction func() error) error GetTypeName() string @@ -60,21 +63,22 @@ type S7VarRequestParameterItemParent interface { type S7VarRequestParameterItemChild interface { utils.Serializable - InitializeParent(parent S7VarRequestParameterItem) +InitializeParent(parent S7VarRequestParameterItem ) GetParent() *S7VarRequestParameterItem GetTypeName() string S7VarRequestParameterItem } + // NewS7VarRequestParameterItem factory function for _S7VarRequestParameterItem -func NewS7VarRequestParameterItem() *_S7VarRequestParameterItem { - return &_S7VarRequestParameterItem{} +func NewS7VarRequestParameterItem( ) *_S7VarRequestParameterItem { +return &_S7VarRequestParameterItem{ } } // Deprecated: use the interface for direct cast func CastS7VarRequestParameterItem(structType interface{}) S7VarRequestParameterItem { - if casted, ok := structType.(S7VarRequestParameterItem); ok { + if casted, ok := structType.(S7VarRequestParameterItem); ok { return casted } if casted, ok := structType.(*S7VarRequestParameterItem); ok { @@ -87,10 +91,11 @@ func (m *_S7VarRequestParameterItem) GetTypeName() string { return "S7VarRequestParameterItem" } + func (m *_S7VarRequestParameterItem) GetParentLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Discriminator Field (itemType) - lengthInBits += 8 + lengthInBits += 8; return lengthInBits } @@ -121,15 +126,15 @@ func S7VarRequestParameterItemParseWithBuffer(ctx context.Context, readBuffer ut // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) type S7VarRequestParameterItemChildSerializeRequirement interface { S7VarRequestParameterItem - InitializeParent(S7VarRequestParameterItem) + InitializeParent(S7VarRequestParameterItem ) GetParent() S7VarRequestParameterItem } var _childTemp interface{} var _child S7VarRequestParameterItemChildSerializeRequirement var typeSwitchError error switch { - case itemType == 0x12: // S7VarRequestParameterItemAddress - _childTemp, typeSwitchError = S7VarRequestParameterItemAddressParseWithBuffer(ctx, readBuffer) +case itemType == 0x12 : // S7VarRequestParameterItemAddress + _childTemp, typeSwitchError = S7VarRequestParameterItemAddressParseWithBuffer(ctx, readBuffer, ) default: typeSwitchError = errors.Errorf("Unmapped type for parameters [itemType=%v]", itemType) } @@ -143,7 +148,7 @@ func S7VarRequestParameterItemParseWithBuffer(ctx context.Context, readBuffer ut } // Finish initializing - _child.InitializeParent(_child) +_child.InitializeParent(_child ) return _child, nil } @@ -153,7 +158,7 @@ func (pm *_S7VarRequestParameterItem) SerializeParent(ctx context.Context, write _ = m positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("S7VarRequestParameterItem"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("S7VarRequestParameterItem"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for S7VarRequestParameterItem") } @@ -176,6 +181,7 @@ func (pm *_S7VarRequestParameterItem) SerializeParent(ctx context.Context, write return nil } + func (m *_S7VarRequestParameterItem) isS7VarRequestParameterItem() bool { return true } @@ -190,3 +196,6 @@ func (m *_S7VarRequestParameterItem) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/S7VarRequestParameterItemAddress.go b/plc4go/protocols/s7/readwrite/model/S7VarRequestParameterItemAddress.go index 71d498d3d34..c050da76ab9 100644 --- a/plc4go/protocols/s7/readwrite/model/S7VarRequestParameterItemAddress.go +++ b/plc4go/protocols/s7/readwrite/model/S7VarRequestParameterItemAddress.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // S7VarRequestParameterItemAddress is the corresponding interface of S7VarRequestParameterItemAddress type S7VarRequestParameterItemAddress interface { @@ -46,29 +48,29 @@ type S7VarRequestParameterItemAddressExactly interface { // _S7VarRequestParameterItemAddress is the data-structure of this message type _S7VarRequestParameterItemAddress struct { *_S7VarRequestParameterItem - Address S7Address + Address S7Address } + + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_S7VarRequestParameterItemAddress) GetItemType() uint8 { - return 0x12 -} +func (m *_S7VarRequestParameterItemAddress) GetItemType() uint8 { +return 0x12} /////////////////////// /////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_S7VarRequestParameterItemAddress) InitializeParent(parent S7VarRequestParameterItem) {} +func (m *_S7VarRequestParameterItemAddress) InitializeParent(parent S7VarRequestParameterItem ) {} -func (m *_S7VarRequestParameterItemAddress) GetParent() S7VarRequestParameterItem { +func (m *_S7VarRequestParameterItemAddress) GetParent() S7VarRequestParameterItem { return m._S7VarRequestParameterItem } - /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -83,11 +85,12 @@ func (m *_S7VarRequestParameterItemAddress) GetAddress() S7Address { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewS7VarRequestParameterItemAddress factory function for _S7VarRequestParameterItemAddress -func NewS7VarRequestParameterItemAddress(address S7Address) *_S7VarRequestParameterItemAddress { +func NewS7VarRequestParameterItemAddress( address S7Address ) *_S7VarRequestParameterItemAddress { _result := &_S7VarRequestParameterItemAddress{ - Address: address, - _S7VarRequestParameterItem: NewS7VarRequestParameterItem(), + Address: address, + _S7VarRequestParameterItem: NewS7VarRequestParameterItem(), } _result._S7VarRequestParameterItem._S7VarRequestParameterItemChildRequirements = _result return _result @@ -95,7 +98,7 @@ func NewS7VarRequestParameterItemAddress(address S7Address) *_S7VarRequestParame // Deprecated: use the interface for direct cast func CastS7VarRequestParameterItemAddress(structType interface{}) S7VarRequestParameterItemAddress { - if casted, ok := structType.(S7VarRequestParameterItemAddress); ok { + if casted, ok := structType.(S7VarRequestParameterItemAddress); ok { return casted } if casted, ok := structType.(*S7VarRequestParameterItemAddress); ok { @@ -120,6 +123,7 @@ func (m *_S7VarRequestParameterItemAddress) GetLengthInBits(ctx context.Context) return lengthInBits } + func (m *_S7VarRequestParameterItemAddress) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -148,7 +152,7 @@ func S7VarRequestParameterItemAddressParseWithBuffer(ctx context.Context, readBu if pullErr := readBuffer.PullContext("address"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for address") } - _address, _addressErr := S7AddressParseWithBuffer(ctx, readBuffer) +_address, _addressErr := S7AddressParseWithBuffer(ctx, readBuffer) if _addressErr != nil { return nil, errors.Wrap(_addressErr, "Error parsing 'address' field of S7VarRequestParameterItemAddress") } @@ -163,8 +167,9 @@ func S7VarRequestParameterItemAddressParseWithBuffer(ctx context.Context, readBu // Create a partially initialized instance _child := &_S7VarRequestParameterItemAddress{ - _S7VarRequestParameterItem: &_S7VarRequestParameterItem{}, - Address: address, + _S7VarRequestParameterItem: &_S7VarRequestParameterItem{ + }, + Address: address, } _child._S7VarRequestParameterItem._S7VarRequestParameterItemChildRequirements = _child return _child, nil @@ -186,24 +191,24 @@ func (m *_S7VarRequestParameterItemAddress) SerializeWithWriteBuffer(ctx context return errors.Wrap(pushErr, "Error pushing for S7VarRequestParameterItemAddress") } - // Implicit Field (itemLength) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) - itemLength := uint8(m.GetAddress().GetLengthInBytes(ctx)) - _itemLengthErr := writeBuffer.WriteUint8("itemLength", 8, (itemLength)) - if _itemLengthErr != nil { - return errors.Wrap(_itemLengthErr, "Error serializing 'itemLength' field") - } + // Implicit Field (itemLength) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content) + itemLength := uint8(m.GetAddress().GetLengthInBytes(ctx)) + _itemLengthErr := writeBuffer.WriteUint8("itemLength", 8, (itemLength)) + if _itemLengthErr != nil { + return errors.Wrap(_itemLengthErr, "Error serializing 'itemLength' field") + } - // Simple Field (address) - if pushErr := writeBuffer.PushContext("address"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for address") - } - _addressErr := writeBuffer.WriteSerializable(ctx, m.GetAddress()) - if popErr := writeBuffer.PopContext("address"); popErr != nil { - return errors.Wrap(popErr, "Error popping for address") - } - if _addressErr != nil { - return errors.Wrap(_addressErr, "Error serializing 'address' field") - } + // Simple Field (address) + if pushErr := writeBuffer.PushContext("address"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for address") + } + _addressErr := writeBuffer.WriteSerializable(ctx, m.GetAddress()) + if popErr := writeBuffer.PopContext("address"); popErr != nil { + return errors.Wrap(popErr, "Error popping for address") + } + if _addressErr != nil { + return errors.Wrap(_addressErr, "Error serializing 'address' field") + } if popErr := writeBuffer.PopContext("S7VarRequestParameterItemAddress"); popErr != nil { return errors.Wrap(popErr, "Error popping for S7VarRequestParameterItemAddress") @@ -213,6 +218,7 @@ func (m *_S7VarRequestParameterItemAddress) SerializeWithWriteBuffer(ctx context return m.SerializeParent(ctx, writeBuffer, m, ser) } + func (m *_S7VarRequestParameterItemAddress) isS7VarRequestParameterItemAddress() bool { return true } @@ -227,3 +233,6 @@ func (m *_S7VarRequestParameterItemAddress) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/State.go b/plc4go/protocols/s7/readwrite/model/State.go index 4d039f10a5e..cb6d4c0ecd9 100644 --- a/plc4go/protocols/s7/readwrite/model/State.go +++ b/plc4go/protocols/s7/readwrite/model/State.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // State is the corresponding interface of State type State interface { @@ -58,16 +60,17 @@ type StateExactly interface { // _State is the data-structure of this message type _State struct { - SIG_8 bool - SIG_7 bool - SIG_6 bool - SIG_5 bool - SIG_4 bool - SIG_3 bool - SIG_2 bool - SIG_1 bool + SIG_8 bool + SIG_7 bool + SIG_6 bool + SIG_5 bool + SIG_4 bool + SIG_3 bool + SIG_2 bool + SIG_1 bool } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -110,14 +113,15 @@ func (m *_State) GetSIG_1() bool { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewState factory function for _State -func NewState(SIG_8 bool, SIG_7 bool, SIG_6 bool, SIG_5 bool, SIG_4 bool, SIG_3 bool, SIG_2 bool, SIG_1 bool) *_State { - return &_State{SIG_8: SIG_8, SIG_7: SIG_7, SIG_6: SIG_6, SIG_5: SIG_5, SIG_4: SIG_4, SIG_3: SIG_3, SIG_2: SIG_2, SIG_1: SIG_1} +func NewState( SIG_8 bool , SIG_7 bool , SIG_6 bool , SIG_5 bool , SIG_4 bool , SIG_3 bool , SIG_2 bool , SIG_1 bool ) *_State { +return &_State{ SIG_8: SIG_8 , SIG_7: SIG_7 , SIG_6: SIG_6 , SIG_5: SIG_5 , SIG_4: SIG_4 , SIG_3: SIG_3 , SIG_2: SIG_2 , SIG_1: SIG_1 } } // Deprecated: use the interface for direct cast func CastState(structType interface{}) State { - if casted, ok := structType.(State); ok { + if casted, ok := structType.(State); ok { return casted } if casted, ok := structType.(*State); ok { @@ -134,32 +138,33 @@ func (m *_State) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (SIG_8) - lengthInBits += 1 + lengthInBits += 1; // Simple field (SIG_7) - lengthInBits += 1 + lengthInBits += 1; // Simple field (SIG_6) - lengthInBits += 1 + lengthInBits += 1; // Simple field (SIG_5) - lengthInBits += 1 + lengthInBits += 1; // Simple field (SIG_4) - lengthInBits += 1 + lengthInBits += 1; // Simple field (SIG_3) - lengthInBits += 1 + lengthInBits += 1; // Simple field (SIG_2) - lengthInBits += 1 + lengthInBits += 1; // Simple field (SIG_1) - lengthInBits += 1 + lengthInBits += 1; return lengthInBits } + func (m *_State) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -178,56 +183,56 @@ func StateParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) (Sta _ = currentPos // Simple Field (SIG_8) - _SIG_8, _SIG_8Err := readBuffer.ReadBit("SIG_8") +_SIG_8, _SIG_8Err := readBuffer.ReadBit("SIG_8") if _SIG_8Err != nil { return nil, errors.Wrap(_SIG_8Err, "Error parsing 'SIG_8' field of State") } SIG_8 := _SIG_8 // Simple Field (SIG_7) - _SIG_7, _SIG_7Err := readBuffer.ReadBit("SIG_7") +_SIG_7, _SIG_7Err := readBuffer.ReadBit("SIG_7") if _SIG_7Err != nil { return nil, errors.Wrap(_SIG_7Err, "Error parsing 'SIG_7' field of State") } SIG_7 := _SIG_7 // Simple Field (SIG_6) - _SIG_6, _SIG_6Err := readBuffer.ReadBit("SIG_6") +_SIG_6, _SIG_6Err := readBuffer.ReadBit("SIG_6") if _SIG_6Err != nil { return nil, errors.Wrap(_SIG_6Err, "Error parsing 'SIG_6' field of State") } SIG_6 := _SIG_6 // Simple Field (SIG_5) - _SIG_5, _SIG_5Err := readBuffer.ReadBit("SIG_5") +_SIG_5, _SIG_5Err := readBuffer.ReadBit("SIG_5") if _SIG_5Err != nil { return nil, errors.Wrap(_SIG_5Err, "Error parsing 'SIG_5' field of State") } SIG_5 := _SIG_5 // Simple Field (SIG_4) - _SIG_4, _SIG_4Err := readBuffer.ReadBit("SIG_4") +_SIG_4, _SIG_4Err := readBuffer.ReadBit("SIG_4") if _SIG_4Err != nil { return nil, errors.Wrap(_SIG_4Err, "Error parsing 'SIG_4' field of State") } SIG_4 := _SIG_4 // Simple Field (SIG_3) - _SIG_3, _SIG_3Err := readBuffer.ReadBit("SIG_3") +_SIG_3, _SIG_3Err := readBuffer.ReadBit("SIG_3") if _SIG_3Err != nil { return nil, errors.Wrap(_SIG_3Err, "Error parsing 'SIG_3' field of State") } SIG_3 := _SIG_3 // Simple Field (SIG_2) - _SIG_2, _SIG_2Err := readBuffer.ReadBit("SIG_2") +_SIG_2, _SIG_2Err := readBuffer.ReadBit("SIG_2") if _SIG_2Err != nil { return nil, errors.Wrap(_SIG_2Err, "Error parsing 'SIG_2' field of State") } SIG_2 := _SIG_2 // Simple Field (SIG_1) - _SIG_1, _SIG_1Err := readBuffer.ReadBit("SIG_1") +_SIG_1, _SIG_1Err := readBuffer.ReadBit("SIG_1") if _SIG_1Err != nil { return nil, errors.Wrap(_SIG_1Err, "Error parsing 'SIG_1' field of State") } @@ -239,15 +244,15 @@ func StateParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) (Sta // Create the instance return &_State{ - SIG_8: SIG_8, - SIG_7: SIG_7, - SIG_6: SIG_6, - SIG_5: SIG_5, - SIG_4: SIG_4, - SIG_3: SIG_3, - SIG_2: SIG_2, - SIG_1: SIG_1, - }, nil + SIG_8: SIG_8, + SIG_7: SIG_7, + SIG_6: SIG_6, + SIG_5: SIG_5, + SIG_4: SIG_4, + SIG_3: SIG_3, + SIG_2: SIG_2, + SIG_1: SIG_1, + }, nil } func (m *_State) Serialize() ([]byte, error) { @@ -261,7 +266,7 @@ func (m *_State) Serialize() ([]byte, error) { func (m *_State) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("State"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("State"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for State") } @@ -327,6 +332,7 @@ func (m *_State) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils return nil } + func (m *_State) isState() bool { return true } @@ -341,3 +347,6 @@ func (m *_State) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/StaticHelper.go b/plc4go/protocols/s7/readwrite/model/StaticHelper.go index 0b588648e04..544a0ec04d4 100644 --- a/plc4go/protocols/s7/readwrite/model/StaticHelper.go +++ b/plc4go/protocols/s7/readwrite/model/StaticHelper.go @@ -122,10 +122,18 @@ func SerializeTiaDateTime(io utils.WriteBuffer, value values.PlcValue) error { return nil } -func ParseS7String(io utils.ReadBuffer, stringLength int32, encoding string) (string, error) { +func ParseS7String(io utils.ReadBuffer, stringLength int32, encoding string, stringEncoding string) (string, error) { var multiplier int32 switch encoding { case "UTF-8": + totalStringLength, _ := io.ReadUint8("", 8) + length, _ := io.ReadUint8("", 8) + if totalStringLength < length { + length = totalStringLength + } + if stringLength < int32(length) { + length = uint8(stringLength) + } multiplier = 8 case "UTF-16": multiplier = 16 @@ -133,7 +141,7 @@ func ParseS7String(io utils.ReadBuffer, stringLength int32, encoding string) (st return io.ReadString("", uint32(stringLength*multiplier), encoding) } -func SerializeS7String(io utils.WriteBuffer, value values.PlcValue, stringLength int32, encoding string) error { +func SerializeS7String(io utils.WriteBuffer, value values.PlcValue, stringLength int32, encoding string, stringEncoding string) error { var multiplier int32 switch encoding { case "UTF-8": @@ -144,11 +152,11 @@ func SerializeS7String(io utils.WriteBuffer, value values.PlcValue, stringLength return io.WriteString("", uint32(stringLength*multiplier), encoding, value.GetString()) } -func ParseS7Char(io utils.ReadBuffer, encoding string) (uint8, error) { - return io.ReadUint8("", 8) +func ParseS7Char(io utils.ReadBuffer, encoding string, stringEncoding string) (string, error) { + return io.ReadString("value", uint32(8), encoding) } -func SerializeS7Char(io utils.WriteBuffer, value values.PlcValue, encoding string) error { +func SerializeS7Char(io utils.WriteBuffer, value values.PlcValue, encoding string, stringEncoding string) error { return io.WriteUint8("", 8, value.GetUint8()) } diff --git a/plc4go/protocols/s7/readwrite/model/SyntaxIdType.go b/plc4go/protocols/s7/readwrite/model/SyntaxIdType.go index 96e5438b91b..517fde94971 100644 --- a/plc4go/protocols/s7/readwrite/model/SyntaxIdType.go +++ b/plc4go/protocols/s7/readwrite/model/SyntaxIdType.go @@ -34,27 +34,27 @@ type ISyntaxIdType interface { utils.Serializable } -const ( - SyntaxIdType_S7ANY SyntaxIdType = 0x01 - SyntaxIdType_PBC_ID SyntaxIdType = 0x13 +const( + SyntaxIdType_S7ANY SyntaxIdType = 0x01 + SyntaxIdType_PBC_ID SyntaxIdType = 0x13 SyntaxIdType_ALARM_LOCKFREESET SyntaxIdType = 0x15 - SyntaxIdType_ALARM_INDSET SyntaxIdType = 0x16 - SyntaxIdType_ALARM_ACKSET SyntaxIdType = 0x19 + SyntaxIdType_ALARM_INDSET SyntaxIdType = 0x16 + SyntaxIdType_ALARM_ACKSET SyntaxIdType = 0x19 SyntaxIdType_ALARM_QUERYREQSET SyntaxIdType = 0x1A - SyntaxIdType_NOTIFY_INDSET SyntaxIdType = 0x1C - SyntaxIdType_NCK SyntaxIdType = 0x82 - SyntaxIdType_NCK_METRIC SyntaxIdType = 0x83 - SyntaxIdType_NCK_INCH SyntaxIdType = 0x84 - SyntaxIdType_DRIVEESANY SyntaxIdType = 0xA2 - SyntaxIdType_SYM1200 SyntaxIdType = 0xB2 - SyntaxIdType_DBREAD SyntaxIdType = 0xB0 + SyntaxIdType_NOTIFY_INDSET SyntaxIdType = 0x1C + SyntaxIdType_NCK SyntaxIdType = 0x82 + SyntaxIdType_NCK_METRIC SyntaxIdType = 0x83 + SyntaxIdType_NCK_INCH SyntaxIdType = 0x84 + SyntaxIdType_DRIVEESANY SyntaxIdType = 0xA2 + SyntaxIdType_SYM1200 SyntaxIdType = 0xB2 + SyntaxIdType_DBREAD SyntaxIdType = 0xB0 ) var SyntaxIdTypeValues []SyntaxIdType func init() { _ = errors.New - SyntaxIdTypeValues = []SyntaxIdType{ + SyntaxIdTypeValues = []SyntaxIdType { SyntaxIdType_S7ANY, SyntaxIdType_PBC_ID, SyntaxIdType_ALARM_LOCKFREESET, @@ -73,32 +73,32 @@ func init() { func SyntaxIdTypeByValue(value uint8) (enum SyntaxIdType, ok bool) { switch value { - case 0x01: - return SyntaxIdType_S7ANY, true - case 0x13: - return SyntaxIdType_PBC_ID, true - case 0x15: - return SyntaxIdType_ALARM_LOCKFREESET, true - case 0x16: - return SyntaxIdType_ALARM_INDSET, true - case 0x19: - return SyntaxIdType_ALARM_ACKSET, true - case 0x1A: - return SyntaxIdType_ALARM_QUERYREQSET, true - case 0x1C: - return SyntaxIdType_NOTIFY_INDSET, true - case 0x82: - return SyntaxIdType_NCK, true - case 0x83: - return SyntaxIdType_NCK_METRIC, true - case 0x84: - return SyntaxIdType_NCK_INCH, true - case 0xA2: - return SyntaxIdType_DRIVEESANY, true - case 0xB0: - return SyntaxIdType_DBREAD, true - case 0xB2: - return SyntaxIdType_SYM1200, true + case 0x01: + return SyntaxIdType_S7ANY, true + case 0x13: + return SyntaxIdType_PBC_ID, true + case 0x15: + return SyntaxIdType_ALARM_LOCKFREESET, true + case 0x16: + return SyntaxIdType_ALARM_INDSET, true + case 0x19: + return SyntaxIdType_ALARM_ACKSET, true + case 0x1A: + return SyntaxIdType_ALARM_QUERYREQSET, true + case 0x1C: + return SyntaxIdType_NOTIFY_INDSET, true + case 0x82: + return SyntaxIdType_NCK, true + case 0x83: + return SyntaxIdType_NCK_METRIC, true + case 0x84: + return SyntaxIdType_NCK_INCH, true + case 0xA2: + return SyntaxIdType_DRIVEESANY, true + case 0xB0: + return SyntaxIdType_DBREAD, true + case 0xB2: + return SyntaxIdType_SYM1200, true } return 0, false } @@ -135,13 +135,13 @@ func SyntaxIdTypeByName(value string) (enum SyntaxIdType, ok bool) { return 0, false } -func SyntaxIdTypeKnows(value uint8) bool { +func SyntaxIdTypeKnows(value uint8) bool { for _, typeValue := range SyntaxIdTypeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastSyntaxIdType(structType interface{}) SyntaxIdType { @@ -227,3 +227,4 @@ func (e SyntaxIdType) PLC4XEnumName() string { func (e SyntaxIdType) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/s7/readwrite/model/SzlDataTreeItem.go b/plc4go/protocols/s7/readwrite/model/SzlDataTreeItem.go index 8c97506fcad..056551c9821 100644 --- a/plc4go/protocols/s7/readwrite/model/SzlDataTreeItem.go +++ b/plc4go/protocols/s7/readwrite/model/SzlDataTreeItem.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SzlDataTreeItem is the corresponding interface of SzlDataTreeItem type SzlDataTreeItem interface { @@ -52,13 +54,14 @@ type SzlDataTreeItemExactly interface { // _SzlDataTreeItem is the data-structure of this message type _SzlDataTreeItem struct { - ItemIndex uint16 - Mlfb []byte - ModuleTypeId uint16 - Ausbg uint16 - Ausbe uint16 + ItemIndex uint16 + Mlfb []byte + ModuleTypeId uint16 + Ausbg uint16 + Ausbe uint16 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -89,14 +92,15 @@ func (m *_SzlDataTreeItem) GetAusbe() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSzlDataTreeItem factory function for _SzlDataTreeItem -func NewSzlDataTreeItem(itemIndex uint16, mlfb []byte, moduleTypeId uint16, ausbg uint16, ausbe uint16) *_SzlDataTreeItem { - return &_SzlDataTreeItem{ItemIndex: itemIndex, Mlfb: mlfb, ModuleTypeId: moduleTypeId, Ausbg: ausbg, Ausbe: ausbe} +func NewSzlDataTreeItem( itemIndex uint16 , mlfb []byte , moduleTypeId uint16 , ausbg uint16 , ausbe uint16 ) *_SzlDataTreeItem { +return &_SzlDataTreeItem{ ItemIndex: itemIndex , Mlfb: mlfb , ModuleTypeId: moduleTypeId , Ausbg: ausbg , Ausbe: ausbe } } // Deprecated: use the interface for direct cast func CastSzlDataTreeItem(structType interface{}) SzlDataTreeItem { - if casted, ok := structType.(SzlDataTreeItem); ok { + if casted, ok := structType.(SzlDataTreeItem); ok { return casted } if casted, ok := structType.(*SzlDataTreeItem); ok { @@ -113,7 +117,7 @@ func (m *_SzlDataTreeItem) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (itemIndex) - lengthInBits += 16 + lengthInBits += 16; // Array field if len(m.Mlfb) > 0 { @@ -121,17 +125,18 @@ func (m *_SzlDataTreeItem) GetLengthInBits(ctx context.Context) uint16 { } // Simple field (moduleTypeId) - lengthInBits += 16 + lengthInBits += 16; // Simple field (ausbg) - lengthInBits += 16 + lengthInBits += 16; // Simple field (ausbe) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_SzlDataTreeItem) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -150,7 +155,7 @@ func SzlDataTreeItemParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu _ = currentPos // Simple Field (itemIndex) - _itemIndex, _itemIndexErr := readBuffer.ReadUint16("itemIndex", 16) +_itemIndex, _itemIndexErr := readBuffer.ReadUint16("itemIndex", 16) if _itemIndexErr != nil { return nil, errors.Wrap(_itemIndexErr, "Error parsing 'itemIndex' field of SzlDataTreeItem") } @@ -163,21 +168,21 @@ func SzlDataTreeItemParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu } // Simple Field (moduleTypeId) - _moduleTypeId, _moduleTypeIdErr := readBuffer.ReadUint16("moduleTypeId", 16) +_moduleTypeId, _moduleTypeIdErr := readBuffer.ReadUint16("moduleTypeId", 16) if _moduleTypeIdErr != nil { return nil, errors.Wrap(_moduleTypeIdErr, "Error parsing 'moduleTypeId' field of SzlDataTreeItem") } moduleTypeId := _moduleTypeId // Simple Field (ausbg) - _ausbg, _ausbgErr := readBuffer.ReadUint16("ausbg", 16) +_ausbg, _ausbgErr := readBuffer.ReadUint16("ausbg", 16) if _ausbgErr != nil { return nil, errors.Wrap(_ausbgErr, "Error parsing 'ausbg' field of SzlDataTreeItem") } ausbg := _ausbg // Simple Field (ausbe) - _ausbe, _ausbeErr := readBuffer.ReadUint16("ausbe", 16) +_ausbe, _ausbeErr := readBuffer.ReadUint16("ausbe", 16) if _ausbeErr != nil { return nil, errors.Wrap(_ausbeErr, "Error parsing 'ausbe' field of SzlDataTreeItem") } @@ -189,12 +194,12 @@ func SzlDataTreeItemParseWithBuffer(ctx context.Context, readBuffer utils.ReadBu // Create the instance return &_SzlDataTreeItem{ - ItemIndex: itemIndex, - Mlfb: mlfb, - ModuleTypeId: moduleTypeId, - Ausbg: ausbg, - Ausbe: ausbe, - }, nil + ItemIndex: itemIndex, + Mlfb: mlfb, + ModuleTypeId: moduleTypeId, + Ausbg: ausbg, + Ausbe: ausbe, + }, nil } func (m *_SzlDataTreeItem) Serialize() ([]byte, error) { @@ -208,7 +213,7 @@ func (m *_SzlDataTreeItem) Serialize() ([]byte, error) { func (m *_SzlDataTreeItem) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("SzlDataTreeItem"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("SzlDataTreeItem"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for SzlDataTreeItem") } @@ -252,6 +257,7 @@ func (m *_SzlDataTreeItem) SerializeWithWriteBuffer(ctx context.Context, writeBu return nil } + func (m *_SzlDataTreeItem) isSzlDataTreeItem() bool { return true } @@ -266,3 +272,6 @@ func (m *_SzlDataTreeItem) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/SzlId.go b/plc4go/protocols/s7/readwrite/model/SzlId.go index 65a7fa7cec6..993f8991d15 100644 --- a/plc4go/protocols/s7/readwrite/model/SzlId.go +++ b/plc4go/protocols/s7/readwrite/model/SzlId.go @@ -19,13 +19,15 @@ package model + import ( "context" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // SzlId is the corresponding interface of SzlId type SzlId interface { @@ -48,11 +50,12 @@ type SzlIdExactly interface { // _SzlId is the data-structure of this message type _SzlId struct { - TypeClass SzlModuleTypeClass - SublistExtract uint8 - SublistList SzlSublist + TypeClass SzlModuleTypeClass + SublistExtract uint8 + SublistList SzlSublist } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -75,14 +78,15 @@ func (m *_SzlId) GetSublistList() SzlSublist { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewSzlId factory function for _SzlId -func NewSzlId(typeClass SzlModuleTypeClass, sublistExtract uint8, sublistList SzlSublist) *_SzlId { - return &_SzlId{TypeClass: typeClass, SublistExtract: sublistExtract, SublistList: sublistList} +func NewSzlId( typeClass SzlModuleTypeClass , sublistExtract uint8 , sublistList SzlSublist ) *_SzlId { +return &_SzlId{ TypeClass: typeClass , SublistExtract: sublistExtract , SublistList: sublistList } } // Deprecated: use the interface for direct cast func CastSzlId(structType interface{}) SzlId { - if casted, ok := structType.(SzlId); ok { + if casted, ok := structType.(SzlId); ok { return casted } if casted, ok := structType.(*SzlId); ok { @@ -102,7 +106,7 @@ func (m *_SzlId) GetLengthInBits(ctx context.Context) uint16 { lengthInBits += 4 // Simple field (sublistExtract) - lengthInBits += 4 + lengthInBits += 4; // Simple field (sublistList) lengthInBits += 8 @@ -110,6 +114,7 @@ func (m *_SzlId) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_SzlId) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -131,7 +136,7 @@ func SzlIdParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) (Szl if pullErr := readBuffer.PullContext("typeClass"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for typeClass") } - _typeClass, _typeClassErr := SzlModuleTypeClassParseWithBuffer(ctx, readBuffer) +_typeClass, _typeClassErr := SzlModuleTypeClassParseWithBuffer(ctx, readBuffer) if _typeClassErr != nil { return nil, errors.Wrap(_typeClassErr, "Error parsing 'typeClass' field of SzlId") } @@ -141,7 +146,7 @@ func SzlIdParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) (Szl } // Simple Field (sublistExtract) - _sublistExtract, _sublistExtractErr := readBuffer.ReadUint8("sublistExtract", 4) +_sublistExtract, _sublistExtractErr := readBuffer.ReadUint8("sublistExtract", 4) if _sublistExtractErr != nil { return nil, errors.Wrap(_sublistExtractErr, "Error parsing 'sublistExtract' field of SzlId") } @@ -151,7 +156,7 @@ func SzlIdParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) (Szl if pullErr := readBuffer.PullContext("sublistList"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for sublistList") } - _sublistList, _sublistListErr := SzlSublistParseWithBuffer(ctx, readBuffer) +_sublistList, _sublistListErr := SzlSublistParseWithBuffer(ctx, readBuffer) if _sublistListErr != nil { return nil, errors.Wrap(_sublistListErr, "Error parsing 'sublistList' field of SzlId") } @@ -166,10 +171,10 @@ func SzlIdParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) (Szl // Create the instance return &_SzlId{ - TypeClass: typeClass, - SublistExtract: sublistExtract, - SublistList: sublistList, - }, nil + TypeClass: typeClass, + SublistExtract: sublistExtract, + SublistList: sublistList, + }, nil } func (m *_SzlId) Serialize() ([]byte, error) { @@ -183,7 +188,7 @@ func (m *_SzlId) Serialize() ([]byte, error) { func (m *_SzlId) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("SzlId"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("SzlId"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for SzlId") } @@ -224,6 +229,7 @@ func (m *_SzlId) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils return nil } + func (m *_SzlId) isSzlId() bool { return true } @@ -238,3 +244,6 @@ func (m *_SzlId) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/SzlModuleTypeClass.go b/plc4go/protocols/s7/readwrite/model/SzlModuleTypeClass.go index 7723ced321b..0b705c1dfe7 100644 --- a/plc4go/protocols/s7/readwrite/model/SzlModuleTypeClass.go +++ b/plc4go/protocols/s7/readwrite/model/SzlModuleTypeClass.go @@ -34,18 +34,18 @@ type ISzlModuleTypeClass interface { utils.Serializable } -const ( +const( SzlModuleTypeClass_CPU SzlModuleTypeClass = 0x0 - SzlModuleTypeClass_IM SzlModuleTypeClass = 0x4 - SzlModuleTypeClass_FM SzlModuleTypeClass = 0x8 - SzlModuleTypeClass_CP SzlModuleTypeClass = 0xC + SzlModuleTypeClass_IM SzlModuleTypeClass = 0x4 + SzlModuleTypeClass_FM SzlModuleTypeClass = 0x8 + SzlModuleTypeClass_CP SzlModuleTypeClass = 0xC ) var SzlModuleTypeClassValues []SzlModuleTypeClass func init() { _ = errors.New - SzlModuleTypeClassValues = []SzlModuleTypeClass{ + SzlModuleTypeClassValues = []SzlModuleTypeClass { SzlModuleTypeClass_CPU, SzlModuleTypeClass_IM, SzlModuleTypeClass_FM, @@ -55,14 +55,14 @@ func init() { func SzlModuleTypeClassByValue(value uint8) (enum SzlModuleTypeClass, ok bool) { switch value { - case 0x0: - return SzlModuleTypeClass_CPU, true - case 0x4: - return SzlModuleTypeClass_IM, true - case 0x8: - return SzlModuleTypeClass_FM, true - case 0xC: - return SzlModuleTypeClass_CP, true + case 0x0: + return SzlModuleTypeClass_CPU, true + case 0x4: + return SzlModuleTypeClass_IM, true + case 0x8: + return SzlModuleTypeClass_FM, true + case 0xC: + return SzlModuleTypeClass_CP, true } return 0, false } @@ -81,13 +81,13 @@ func SzlModuleTypeClassByName(value string) (enum SzlModuleTypeClass, ok bool) { return 0, false } -func SzlModuleTypeClassKnows(value uint8) bool { +func SzlModuleTypeClassKnows(value uint8) bool { for _, typeValue := range SzlModuleTypeClassValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastSzlModuleTypeClass(structType interface{}) SzlModuleTypeClass { @@ -155,3 +155,4 @@ func (e SzlModuleTypeClass) PLC4XEnumName() string { func (e SzlModuleTypeClass) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/s7/readwrite/model/SzlSublist.go b/plc4go/protocols/s7/readwrite/model/SzlSublist.go index 5c58229b889..51c16780f60 100644 --- a/plc4go/protocols/s7/readwrite/model/SzlSublist.go +++ b/plc4go/protocols/s7/readwrite/model/SzlSublist.go @@ -34,33 +34,33 @@ type ISzlSublist interface { utils.Serializable } -const ( - SzlSublist_MODULE_IDENTIFICATION SzlSublist = 0x11 - SzlSublist_CPU_FEATURES SzlSublist = 0x12 - SzlSublist_USER_MEMORY_AREA SzlSublist = 0x13 - SzlSublist_SYSTEM_AREAS SzlSublist = 0x14 - SzlSublist_BLOCK_TYPES SzlSublist = 0x15 - SzlSublist_STATUS_MODULE_LEDS SzlSublist = 0x19 - SzlSublist_COMPONENT_IDENTIFICATION SzlSublist = 0x1C - SzlSublist_INTERRUPT_STATUS SzlSublist = 0x22 - SzlSublist_ASSIGNMENT_BETWEEN_PROCESS_IMAGE_PARTITIONS_AND_OBS SzlSublist = 0x25 - SzlSublist_COMMUNICATION_STATUS_DATA SzlSublist = 0x32 - SzlSublist_STATUS_SINGLE_MODULE_LED SzlSublist = 0x74 - SzlSublist_DP_MASTER_SYSTEM_INFORMATION SzlSublist = 0x90 - SzlSublist_MODULE_STATUS_INFORMATION SzlSublist = 0x91 - SzlSublist_RACK_OR_STATION_STATUS_INFORMATION SzlSublist = 0x92 - SzlSublist_RACK_OR_STATION_STATUS_INFORMATION_2 SzlSublist = 0x94 +const( + SzlSublist_MODULE_IDENTIFICATION SzlSublist = 0x11 + SzlSublist_CPU_FEATURES SzlSublist = 0x12 + SzlSublist_USER_MEMORY_AREA SzlSublist = 0x13 + SzlSublist_SYSTEM_AREAS SzlSublist = 0x14 + SzlSublist_BLOCK_TYPES SzlSublist = 0x15 + SzlSublist_STATUS_MODULE_LEDS SzlSublist = 0x19 + SzlSublist_COMPONENT_IDENTIFICATION SzlSublist = 0x1C + SzlSublist_INTERRUPT_STATUS SzlSublist = 0x22 + SzlSublist_ASSIGNMENT_BETWEEN_PROCESS_IMAGE_PARTITIONS_AND_OBS SzlSublist = 0x25 + SzlSublist_COMMUNICATION_STATUS_DATA SzlSublist = 0x32 + SzlSublist_STATUS_SINGLE_MODULE_LED SzlSublist = 0x74 + SzlSublist_DP_MASTER_SYSTEM_INFORMATION SzlSublist = 0x90 + SzlSublist_MODULE_STATUS_INFORMATION SzlSublist = 0x91 + SzlSublist_RACK_OR_STATION_STATUS_INFORMATION SzlSublist = 0x92 + SzlSublist_RACK_OR_STATION_STATUS_INFORMATION_2 SzlSublist = 0x94 SzlSublist_ADDITIONAL_DP_MASTER_SYSTEM_OR_PROFINET_IO_SYSTEM_INFORMATION SzlSublist = 0x95 - SzlSublist_MODULE_STATUS_INFORMATION_PROFINET_IO_AND_PROFIBUS_DP SzlSublist = 0x96 - SzlSublist_DIAGNOSTIC_BUFFER SzlSublist = 0xA0 - SzlSublist_MODULE_DIAGNOSTIC_DATA SzlSublist = 0xB1 + SzlSublist_MODULE_STATUS_INFORMATION_PROFINET_IO_AND_PROFIBUS_DP SzlSublist = 0x96 + SzlSublist_DIAGNOSTIC_BUFFER SzlSublist = 0xA0 + SzlSublist_MODULE_DIAGNOSTIC_DATA SzlSublist = 0xB1 ) var SzlSublistValues []SzlSublist func init() { _ = errors.New - SzlSublistValues = []SzlSublist{ + SzlSublistValues = []SzlSublist { SzlSublist_MODULE_IDENTIFICATION, SzlSublist_CPU_FEATURES, SzlSublist_USER_MEMORY_AREA, @@ -85,44 +85,44 @@ func init() { func SzlSublistByValue(value uint8) (enum SzlSublist, ok bool) { switch value { - case 0x11: - return SzlSublist_MODULE_IDENTIFICATION, true - case 0x12: - return SzlSublist_CPU_FEATURES, true - case 0x13: - return SzlSublist_USER_MEMORY_AREA, true - case 0x14: - return SzlSublist_SYSTEM_AREAS, true - case 0x15: - return SzlSublist_BLOCK_TYPES, true - case 0x19: - return SzlSublist_STATUS_MODULE_LEDS, true - case 0x1C: - return SzlSublist_COMPONENT_IDENTIFICATION, true - case 0x22: - return SzlSublist_INTERRUPT_STATUS, true - case 0x25: - return SzlSublist_ASSIGNMENT_BETWEEN_PROCESS_IMAGE_PARTITIONS_AND_OBS, true - case 0x32: - return SzlSublist_COMMUNICATION_STATUS_DATA, true - case 0x74: - return SzlSublist_STATUS_SINGLE_MODULE_LED, true - case 0x90: - return SzlSublist_DP_MASTER_SYSTEM_INFORMATION, true - case 0x91: - return SzlSublist_MODULE_STATUS_INFORMATION, true - case 0x92: - return SzlSublist_RACK_OR_STATION_STATUS_INFORMATION, true - case 0x94: - return SzlSublist_RACK_OR_STATION_STATUS_INFORMATION_2, true - case 0x95: - return SzlSublist_ADDITIONAL_DP_MASTER_SYSTEM_OR_PROFINET_IO_SYSTEM_INFORMATION, true - case 0x96: - return SzlSublist_MODULE_STATUS_INFORMATION_PROFINET_IO_AND_PROFIBUS_DP, true - case 0xA0: - return SzlSublist_DIAGNOSTIC_BUFFER, true - case 0xB1: - return SzlSublist_MODULE_DIAGNOSTIC_DATA, true + case 0x11: + return SzlSublist_MODULE_IDENTIFICATION, true + case 0x12: + return SzlSublist_CPU_FEATURES, true + case 0x13: + return SzlSublist_USER_MEMORY_AREA, true + case 0x14: + return SzlSublist_SYSTEM_AREAS, true + case 0x15: + return SzlSublist_BLOCK_TYPES, true + case 0x19: + return SzlSublist_STATUS_MODULE_LEDS, true + case 0x1C: + return SzlSublist_COMPONENT_IDENTIFICATION, true + case 0x22: + return SzlSublist_INTERRUPT_STATUS, true + case 0x25: + return SzlSublist_ASSIGNMENT_BETWEEN_PROCESS_IMAGE_PARTITIONS_AND_OBS, true + case 0x32: + return SzlSublist_COMMUNICATION_STATUS_DATA, true + case 0x74: + return SzlSublist_STATUS_SINGLE_MODULE_LED, true + case 0x90: + return SzlSublist_DP_MASTER_SYSTEM_INFORMATION, true + case 0x91: + return SzlSublist_MODULE_STATUS_INFORMATION, true + case 0x92: + return SzlSublist_RACK_OR_STATION_STATUS_INFORMATION, true + case 0x94: + return SzlSublist_RACK_OR_STATION_STATUS_INFORMATION_2, true + case 0x95: + return SzlSublist_ADDITIONAL_DP_MASTER_SYSTEM_OR_PROFINET_IO_SYSTEM_INFORMATION, true + case 0x96: + return SzlSublist_MODULE_STATUS_INFORMATION_PROFINET_IO_AND_PROFIBUS_DP, true + case 0xA0: + return SzlSublist_DIAGNOSTIC_BUFFER, true + case 0xB1: + return SzlSublist_MODULE_DIAGNOSTIC_DATA, true } return 0, false } @@ -171,13 +171,13 @@ func SzlSublistByName(value string) (enum SzlSublist, ok bool) { return 0, false } -func SzlSublistKnows(value uint8) bool { +func SzlSublistKnows(value uint8) bool { for _, typeValue := range SzlSublistValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastSzlSublist(structType interface{}) SzlSublist { @@ -275,3 +275,4 @@ func (e SzlSublist) PLC4XEnumName() string { func (e SzlSublist) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/s7/readwrite/model/TPKTPacket.go b/plc4go/protocols/s7/readwrite/model/TPKTPacket.go index 6d9077b5b0a..155e3c0df03 100644 --- a/plc4go/protocols/s7/readwrite/model/TPKTPacket.go +++ b/plc4go/protocols/s7/readwrite/model/TPKTPacket.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -27,7 +28,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Constant values. const TPKTPacket_PROTOCOLID uint8 = 0x03 @@ -49,11 +51,12 @@ type TPKTPacketExactly interface { // _TPKTPacket is the data-structure of this message type _TPKTPacket struct { - Payload COTPPacket + Payload COTPPacket // Reserved Fields reservedField0 *uint8 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -81,14 +84,15 @@ func (m *_TPKTPacket) GetProtocolId() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewTPKTPacket factory function for _TPKTPacket -func NewTPKTPacket(payload COTPPacket) *_TPKTPacket { - return &_TPKTPacket{Payload: payload} +func NewTPKTPacket( payload COTPPacket ) *_TPKTPacket { +return &_TPKTPacket{ Payload: payload } } // Deprecated: use the interface for direct cast func CastTPKTPacket(structType interface{}) TPKTPacket { - if casted, ok := structType.(TPKTPacket); ok { + if casted, ok := structType.(TPKTPacket); ok { return casted } if casted, ok := structType.(*TPKTPacket); ok { @@ -119,6 +123,7 @@ func (m *_TPKTPacket) GetLengthInBits(ctx context.Context) uint16 { return lengthInBits } + func (m *_TPKTPacket) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -155,7 +160,7 @@ func TPKTPacketParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) if reserved != uint8(0x00) { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Got unexpected response for reserved field.") // We save the value, so it can be re-serialized reservedField0 = &reserved @@ -173,7 +178,7 @@ func TPKTPacketParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) if pullErr := readBuffer.PullContext("payload"); pullErr != nil { return nil, errors.Wrap(pullErr, "Error pulling for payload") } - _payload, _payloadErr := COTPPacketParseWithBuffer(ctx, readBuffer, uint16(uint16(len)-uint16(uint16(4)))) +_payload, _payloadErr := COTPPacketParseWithBuffer(ctx, readBuffer , uint16( uint16(len) - uint16(uint16(4)) ) ) if _payloadErr != nil { return nil, errors.Wrap(_payloadErr, "Error parsing 'payload' field of TPKTPacket") } @@ -188,9 +193,9 @@ func TPKTPacketParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) // Create the instance return &_TPKTPacket{ - Payload: payload, - reservedField0: reservedField0, - }, nil + Payload: payload, + reservedField0: reservedField0, + }, nil } func (m *_TPKTPacket) Serialize() ([]byte, error) { @@ -204,7 +209,7 @@ func (m *_TPKTPacket) Serialize() ([]byte, error) { func (m *_TPKTPacket) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("TPKTPacket"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("TPKTPacket"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for TPKTPacket") } @@ -220,7 +225,7 @@ func (m *_TPKTPacket) SerializeWithWriteBuffer(ctx context.Context, writeBuffer if m.reservedField0 != nil { Plc4xModelLog.Info().Fields(map[string]interface{}{ "expected value": uint8(0x00), - "got value": reserved, + "got value": reserved, }).Msg("Overriding reserved field with unexpected value.") reserved = *m.reservedField0 } @@ -255,6 +260,7 @@ func (m *_TPKTPacket) SerializeWithWriteBuffer(ctx context.Context, writeBuffer return nil } + func (m *_TPKTPacket) isTPKTPacket() bool { return true } @@ -269,3 +275,6 @@ func (m *_TPKTPacket) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/s7/readwrite/model/TransportSize.go b/plc4go/protocols/s7/readwrite/model/TransportSize.go index 1d336711ac7..c25fe14958a 100644 --- a/plc4go/protocols/s7/readwrite/model/TransportSize.go +++ b/plc4go/protocols/s7/readwrite/model/TransportSize.go @@ -45,40 +45,40 @@ type ITransportSize interface { BaseType() TransportSize } -const ( - TransportSize_BOOL TransportSize = 0x01 - TransportSize_BYTE TransportSize = 0x02 - TransportSize_WORD TransportSize = 0x03 - TransportSize_DWORD TransportSize = 0x04 - TransportSize_LWORD TransportSize = 0x05 - TransportSize_INT TransportSize = 0x06 - TransportSize_UINT TransportSize = 0x07 - TransportSize_SINT TransportSize = 0x08 - TransportSize_USINT TransportSize = 0x09 - TransportSize_DINT TransportSize = 0x0A - TransportSize_UDINT TransportSize = 0x0B - TransportSize_LINT TransportSize = 0x0C - TransportSize_ULINT TransportSize = 0x0D - TransportSize_REAL TransportSize = 0x0E - TransportSize_LREAL TransportSize = 0x0F - TransportSize_CHAR TransportSize = 0x10 - TransportSize_WCHAR TransportSize = 0x11 - TransportSize_STRING TransportSize = 0x12 - TransportSize_WSTRING TransportSize = 0x13 - TransportSize_TIME TransportSize = 0x14 - TransportSize_LTIME TransportSize = 0x16 - TransportSize_DATE TransportSize = 0x17 - TransportSize_TIME_OF_DAY TransportSize = 0x18 - TransportSize_TOD TransportSize = 0x19 +const( + TransportSize_BOOL TransportSize = 0x01 + TransportSize_BYTE TransportSize = 0x02 + TransportSize_WORD TransportSize = 0x03 + TransportSize_DWORD TransportSize = 0x04 + TransportSize_LWORD TransportSize = 0x05 + TransportSize_INT TransportSize = 0x06 + TransportSize_UINT TransportSize = 0x07 + TransportSize_SINT TransportSize = 0x08 + TransportSize_USINT TransportSize = 0x09 + TransportSize_DINT TransportSize = 0x0A + TransportSize_UDINT TransportSize = 0x0B + TransportSize_LINT TransportSize = 0x0C + TransportSize_ULINT TransportSize = 0x0D + TransportSize_REAL TransportSize = 0x0E + TransportSize_LREAL TransportSize = 0x0F + TransportSize_CHAR TransportSize = 0x10 + TransportSize_WCHAR TransportSize = 0x11 + TransportSize_STRING TransportSize = 0x12 + TransportSize_WSTRING TransportSize = 0x13 + TransportSize_TIME TransportSize = 0x14 + TransportSize_LTIME TransportSize = 0x16 + TransportSize_DATE TransportSize = 0x17 + TransportSize_TIME_OF_DAY TransportSize = 0x18 + TransportSize_TOD TransportSize = 0x19 TransportSize_DATE_AND_TIME TransportSize = 0x1A - TransportSize_DT TransportSize = 0x1B + TransportSize_DT TransportSize = 0x1B ) var TransportSizeValues []TransportSize func init() { _ = errors.New - TransportSizeValues = []TransportSize{ + TransportSizeValues = []TransportSize { TransportSize_BOOL, TransportSize_BYTE, TransportSize_WORD, @@ -108,114 +108,88 @@ func init() { } } + func (e TransportSize) Supported_S7_300() bool { - switch e { - case 0x01: - { /* '0x01' */ - return true + switch e { + case 0x01: { /* '0x01' */ + return true } - case 0x02: - { /* '0x02' */ - return true + case 0x02: { /* '0x02' */ + return true } - case 0x03: - { /* '0x03' */ - return true + case 0x03: { /* '0x03' */ + return true } - case 0x04: - { /* '0x04' */ - return true + case 0x04: { /* '0x04' */ + return true } - case 0x05: - { /* '0x05' */ - return false + case 0x05: { /* '0x05' */ + return false } - case 0x06: - { /* '0x06' */ - return true + case 0x06: { /* '0x06' */ + return true } - case 0x07: - { /* '0x07' */ - return false + case 0x07: { /* '0x07' */ + return false } - case 0x08: - { /* '0x08' */ - return false + case 0x08: { /* '0x08' */ + return false } - case 0x09: - { /* '0x09' */ - return false + case 0x09: { /* '0x09' */ + return false } - case 0x0A: - { /* '0x0A' */ - return true + case 0x0A: { /* '0x0A' */ + return true } - case 0x0B: - { /* '0x0B' */ - return false + case 0x0B: { /* '0x0B' */ + return false } - case 0x0C: - { /* '0x0C' */ - return false + case 0x0C: { /* '0x0C' */ + return false } - case 0x0D: - { /* '0x0D' */ - return false + case 0x0D: { /* '0x0D' */ + return false } - case 0x0E: - { /* '0x0E' */ - return true + case 0x0E: { /* '0x0E' */ + return true } - case 0x0F: - { /* '0x0F' */ - return false + case 0x0F: { /* '0x0F' */ + return false } - case 0x10: - { /* '0x10' */ - return true + case 0x10: { /* '0x10' */ + return true } - case 0x11: - { /* '0x11' */ - return false + case 0x11: { /* '0x11' */ + return false } - case 0x12: - { /* '0x12' */ - return true + case 0x12: { /* '0x12' */ + return true } - case 0x13: - { /* '0x13' */ - return false + case 0x13: { /* '0x13' */ + return false } - case 0x14: - { /* '0x14' */ - return true + case 0x14: { /* '0x14' */ + return true } - case 0x16: - { /* '0x16' */ - return false + case 0x16: { /* '0x16' */ + return false } - case 0x17: - { /* '0x17' */ - return true + case 0x17: { /* '0x17' */ + return true } - case 0x18: - { /* '0x18' */ - return true + case 0x18: { /* '0x18' */ + return true } - case 0x19: - { /* '0x19' */ - return true + case 0x19: { /* '0x19' */ + return true } - case 0x1A: - { /* '0x1A' */ - return true + case 0x1A: { /* '0x1A' */ + return true } - case 0x1B: - { /* '0x1B' */ - return true + case 0x1B: { /* '0x1B' */ + return true } - default: - { + default: { return false } } @@ -231,113 +205,86 @@ func TransportSizeFirstEnumForFieldSupported_S7_300(value bool) (TransportSize, } func (e TransportSize) Supported_LOGO() bool { - switch e { - case 0x01: - { /* '0x01' */ - return true + switch e { + case 0x01: { /* '0x01' */ + return true } - case 0x02: - { /* '0x02' */ - return true + case 0x02: { /* '0x02' */ + return true } - case 0x03: - { /* '0x03' */ - return true + case 0x03: { /* '0x03' */ + return true } - case 0x04: - { /* '0x04' */ - return true + case 0x04: { /* '0x04' */ + return true } - case 0x05: - { /* '0x05' */ - return false + case 0x05: { /* '0x05' */ + return false } - case 0x06: - { /* '0x06' */ - return true + case 0x06: { /* '0x06' */ + return true } - case 0x07: - { /* '0x07' */ - return true + case 0x07: { /* '0x07' */ + return true } - case 0x08: - { /* '0x08' */ - return true + case 0x08: { /* '0x08' */ + return true } - case 0x09: - { /* '0x09' */ - return true + case 0x09: { /* '0x09' */ + return true } - case 0x0A: - { /* '0x0A' */ - return true + case 0x0A: { /* '0x0A' */ + return true } - case 0x0B: - { /* '0x0B' */ - return true + case 0x0B: { /* '0x0B' */ + return true } - case 0x0C: - { /* '0x0C' */ - return false + case 0x0C: { /* '0x0C' */ + return false } - case 0x0D: - { /* '0x0D' */ - return false + case 0x0D: { /* '0x0D' */ + return false } - case 0x0E: - { /* '0x0E' */ - return true + case 0x0E: { /* '0x0E' */ + return true } - case 0x0F: - { /* '0x0F' */ - return false + case 0x0F: { /* '0x0F' */ + return false } - case 0x10: - { /* '0x10' */ - return true + case 0x10: { /* '0x10' */ + return true } - case 0x11: - { /* '0x11' */ - return true + case 0x11: { /* '0x11' */ + return true } - case 0x12: - { /* '0x12' */ - return true + case 0x12: { /* '0x12' */ + return true } - case 0x13: - { /* '0x13' */ - return true + case 0x13: { /* '0x13' */ + return true } - case 0x14: - { /* '0x14' */ - return true + case 0x14: { /* '0x14' */ + return true } - case 0x16: - { /* '0x16' */ - return false + case 0x16: { /* '0x16' */ + return false } - case 0x17: - { /* '0x17' */ - return true + case 0x17: { /* '0x17' */ + return true } - case 0x18: - { /* '0x18' */ - return true + case 0x18: { /* '0x18' */ + return true } - case 0x19: - { /* '0x19' */ - return true + case 0x19: { /* '0x19' */ + return true } - case 0x1A: - { /* '0x1A' */ - return false + case 0x1A: { /* '0x1A' */ + return false } - case 0x1B: - { /* '0x1B' */ - return false + case 0x1B: { /* '0x1B' */ + return false } - default: - { + default: { return false } } @@ -353,113 +300,86 @@ func TransportSizeFirstEnumForFieldSupported_LOGO(value bool) (TransportSize, er } func (e TransportSize) Code() uint8 { - switch e { - case 0x01: - { /* '0x01' */ - return 0x01 + switch e { + case 0x01: { /* '0x01' */ + return 0x01 } - case 0x02: - { /* '0x02' */ - return 0x02 + case 0x02: { /* '0x02' */ + return 0x02 } - case 0x03: - { /* '0x03' */ - return 0x04 + case 0x03: { /* '0x03' */ + return 0x04 } - case 0x04: - { /* '0x04' */ - return 0x06 + case 0x04: { /* '0x04' */ + return 0x06 } - case 0x05: - { /* '0x05' */ - return 0x00 + case 0x05: { /* '0x05' */ + return 0x00 } - case 0x06: - { /* '0x06' */ - return 0x05 + case 0x06: { /* '0x06' */ + return 0x05 } - case 0x07: - { /* '0x07' */ - return 0x05 + case 0x07: { /* '0x07' */ + return 0x05 } - case 0x08: - { /* '0x08' */ - return 0x02 + case 0x08: { /* '0x08' */ + return 0x02 } - case 0x09: - { /* '0x09' */ - return 0x02 + case 0x09: { /* '0x09' */ + return 0x02 } - case 0x0A: - { /* '0x0A' */ - return 0x07 + case 0x0A: { /* '0x0A' */ + return 0x07 } - case 0x0B: - { /* '0x0B' */ - return 0x07 + case 0x0B: { /* '0x0B' */ + return 0x07 } - case 0x0C: - { /* '0x0C' */ - return 0x00 + case 0x0C: { /* '0x0C' */ + return 0x00 } - case 0x0D: - { /* '0x0D' */ - return 0x00 + case 0x0D: { /* '0x0D' */ + return 0x00 } - case 0x0E: - { /* '0x0E' */ - return 0x08 + case 0x0E: { /* '0x0E' */ + return 0x08 } - case 0x0F: - { /* '0x0F' */ - return 0x30 + case 0x0F: { /* '0x0F' */ + return 0x30 } - case 0x10: - { /* '0x10' */ - return 0x03 + case 0x10: { /* '0x10' */ + return 0x03 } - case 0x11: - { /* '0x11' */ - return 0x13 + case 0x11: { /* '0x11' */ + return 0x13 } - case 0x12: - { /* '0x12' */ - return 0x03 + case 0x12: { /* '0x12' */ + return 0x03 } - case 0x13: - { /* '0x13' */ - return 0x00 + case 0x13: { /* '0x13' */ + return 0x00 } - case 0x14: - { /* '0x14' */ - return 0x0B + case 0x14: { /* '0x14' */ + return 0x0B } - case 0x16: - { /* '0x16' */ - return 0x00 + case 0x16: { /* '0x16' */ + return 0x00 } - case 0x17: - { /* '0x17' */ - return 0x09 + case 0x17: { /* '0x17' */ + return 0x09 } - case 0x18: - { /* '0x18' */ - return 0x06 + case 0x18: { /* '0x18' */ + return 0x06 } - case 0x19: - { /* '0x19' */ - return 0x06 + case 0x19: { /* '0x19' */ + return 0x06 } - case 0x1A: - { /* '0x1A' */ - return 0x0F + case 0x1A: { /* '0x1A' */ + return 0x0F } - case 0x1B: - { /* '0x1B' */ - return 0x0F + case 0x1B: { /* '0x1B' */ + return 0x0F } - default: - { + default: { return 0 } } @@ -475,113 +395,86 @@ func TransportSizeFirstEnumForFieldCode(value uint8) (TransportSize, error) { } func (e TransportSize) SizeInBytes() uint8 { - switch e { - case 0x01: - { /* '0x01' */ - return 1 + switch e { + case 0x01: { /* '0x01' */ + return 1 } - case 0x02: - { /* '0x02' */ - return 1 + case 0x02: { /* '0x02' */ + return 1 } - case 0x03: - { /* '0x03' */ - return 2 + case 0x03: { /* '0x03' */ + return 2 } - case 0x04: - { /* '0x04' */ - return 4 + case 0x04: { /* '0x04' */ + return 4 } - case 0x05: - { /* '0x05' */ - return 8 + case 0x05: { /* '0x05' */ + return 8 } - case 0x06: - { /* '0x06' */ - return 2 + case 0x06: { /* '0x06' */ + return 2 } - case 0x07: - { /* '0x07' */ - return 2 + case 0x07: { /* '0x07' */ + return 2 } - case 0x08: - { /* '0x08' */ - return 1 + case 0x08: { /* '0x08' */ + return 1 } - case 0x09: - { /* '0x09' */ - return 1 + case 0x09: { /* '0x09' */ + return 1 } - case 0x0A: - { /* '0x0A' */ - return 4 + case 0x0A: { /* '0x0A' */ + return 4 } - case 0x0B: - { /* '0x0B' */ - return 4 + case 0x0B: { /* '0x0B' */ + return 4 } - case 0x0C: - { /* '0x0C' */ - return 8 + case 0x0C: { /* '0x0C' */ + return 8 } - case 0x0D: - { /* '0x0D' */ - return 16 + case 0x0D: { /* '0x0D' */ + return 16 } - case 0x0E: - { /* '0x0E' */ - return 4 + case 0x0E: { /* '0x0E' */ + return 4 } - case 0x0F: - { /* '0x0F' */ - return 8 + case 0x0F: { /* '0x0F' */ + return 8 } - case 0x10: - { /* '0x10' */ - return 1 + case 0x10: { /* '0x10' */ + return 1 } - case 0x11: - { /* '0x11' */ - return 2 + case 0x11: { /* '0x11' */ + return 2 } - case 0x12: - { /* '0x12' */ - return 1 + case 0x12: { /* '0x12' */ + return 1 } - case 0x13: - { /* '0x13' */ - return 2 + case 0x13: { /* '0x13' */ + return 2 } - case 0x14: - { /* '0x14' */ - return 4 + case 0x14: { /* '0x14' */ + return 4 } - case 0x16: - { /* '0x16' */ - return 8 + case 0x16: { /* '0x16' */ + return 8 } - case 0x17: - { /* '0x17' */ - return 2 + case 0x17: { /* '0x17' */ + return 2 } - case 0x18: - { /* '0x18' */ - return 4 + case 0x18: { /* '0x18' */ + return 4 } - case 0x19: - { /* '0x19' */ - return 4 + case 0x19: { /* '0x19' */ + return 4 } - case 0x1A: - { /* '0x1A' */ - return 12 + case 0x1A: { /* '0x1A' */ + return 12 } - case 0x1B: - { /* '0x1B' */ - return 12 + case 0x1B: { /* '0x1B' */ + return 12 } - default: - { + default: { return 0 } } @@ -597,113 +490,86 @@ func TransportSizeFirstEnumForFieldSizeInBytes(value uint8) (TransportSize, erro } func (e TransportSize) Supported_S7_400() bool { - switch e { - case 0x01: - { /* '0x01' */ - return true + switch e { + case 0x01: { /* '0x01' */ + return true } - case 0x02: - { /* '0x02' */ - return true + case 0x02: { /* '0x02' */ + return true } - case 0x03: - { /* '0x03' */ - return true + case 0x03: { /* '0x03' */ + return true } - case 0x04: - { /* '0x04' */ - return true + case 0x04: { /* '0x04' */ + return true } - case 0x05: - { /* '0x05' */ - return false + case 0x05: { /* '0x05' */ + return false } - case 0x06: - { /* '0x06' */ - return true + case 0x06: { /* '0x06' */ + return true } - case 0x07: - { /* '0x07' */ - return false + case 0x07: { /* '0x07' */ + return false } - case 0x08: - { /* '0x08' */ - return false + case 0x08: { /* '0x08' */ + return false } - case 0x09: - { /* '0x09' */ - return false + case 0x09: { /* '0x09' */ + return false } - case 0x0A: - { /* '0x0A' */ - return true + case 0x0A: { /* '0x0A' */ + return true } - case 0x0B: - { /* '0x0B' */ - return false + case 0x0B: { /* '0x0B' */ + return false } - case 0x0C: - { /* '0x0C' */ - return false + case 0x0C: { /* '0x0C' */ + return false } - case 0x0D: - { /* '0x0D' */ - return false + case 0x0D: { /* '0x0D' */ + return false } - case 0x0E: - { /* '0x0E' */ - return true + case 0x0E: { /* '0x0E' */ + return true } - case 0x0F: - { /* '0x0F' */ - return false + case 0x0F: { /* '0x0F' */ + return false } - case 0x10: - { /* '0x10' */ - return true + case 0x10: { /* '0x10' */ + return true } - case 0x11: - { /* '0x11' */ - return false + case 0x11: { /* '0x11' */ + return false } - case 0x12: - { /* '0x12' */ - return true + case 0x12: { /* '0x12' */ + return true } - case 0x13: - { /* '0x13' */ - return false + case 0x13: { /* '0x13' */ + return false } - case 0x14: - { /* '0x14' */ - return true + case 0x14: { /* '0x14' */ + return true } - case 0x16: - { /* '0x16' */ - return false + case 0x16: { /* '0x16' */ + return false } - case 0x17: - { /* '0x17' */ - return true + case 0x17: { /* '0x17' */ + return true } - case 0x18: - { /* '0x18' */ - return true + case 0x18: { /* '0x18' */ + return true } - case 0x19: - { /* '0x19' */ - return true + case 0x19: { /* '0x19' */ + return true } - case 0x1A: - { /* '0x1A' */ - return true + case 0x1A: { /* '0x1A' */ + return true } - case 0x1B: - { /* '0x1B' */ - return true + case 0x1B: { /* '0x1B' */ + return true } - default: - { + default: { return false } } @@ -719,113 +585,86 @@ func TransportSizeFirstEnumForFieldSupported_S7_400(value bool) (TransportSize, } func (e TransportSize) Supported_S7_1200() bool { - switch e { - case 0x01: - { /* '0x01' */ - return true + switch e { + case 0x01: { /* '0x01' */ + return true } - case 0x02: - { /* '0x02' */ - return true + case 0x02: { /* '0x02' */ + return true } - case 0x03: - { /* '0x03' */ - return true + case 0x03: { /* '0x03' */ + return true } - case 0x04: - { /* '0x04' */ - return true + case 0x04: { /* '0x04' */ + return true } - case 0x05: - { /* '0x05' */ - return false + case 0x05: { /* '0x05' */ + return false } - case 0x06: - { /* '0x06' */ - return true + case 0x06: { /* '0x06' */ + return true } - case 0x07: - { /* '0x07' */ - return true + case 0x07: { /* '0x07' */ + return true } - case 0x08: - { /* '0x08' */ - return true + case 0x08: { /* '0x08' */ + return true } - case 0x09: - { /* '0x09' */ - return true + case 0x09: { /* '0x09' */ + return true } - case 0x0A: - { /* '0x0A' */ - return true + case 0x0A: { /* '0x0A' */ + return true } - case 0x0B: - { /* '0x0B' */ - return true + case 0x0B: { /* '0x0B' */ + return true } - case 0x0C: - { /* '0x0C' */ - return false + case 0x0C: { /* '0x0C' */ + return false } - case 0x0D: - { /* '0x0D' */ - return false + case 0x0D: { /* '0x0D' */ + return false } - case 0x0E: - { /* '0x0E' */ - return true + case 0x0E: { /* '0x0E' */ + return true } - case 0x0F: - { /* '0x0F' */ - return true + case 0x0F: { /* '0x0F' */ + return true } - case 0x10: - { /* '0x10' */ - return true + case 0x10: { /* '0x10' */ + return true } - case 0x11: - { /* '0x11' */ - return true + case 0x11: { /* '0x11' */ + return true } - case 0x12: - { /* '0x12' */ - return true + case 0x12: { /* '0x12' */ + return true } - case 0x13: - { /* '0x13' */ - return true + case 0x13: { /* '0x13' */ + return true } - case 0x14: - { /* '0x14' */ - return true + case 0x14: { /* '0x14' */ + return true } - case 0x16: - { /* '0x16' */ - return false + case 0x16: { /* '0x16' */ + return false } - case 0x17: - { /* '0x17' */ - return true + case 0x17: { /* '0x17' */ + return true } - case 0x18: - { /* '0x18' */ - return true + case 0x18: { /* '0x18' */ + return true } - case 0x19: - { /* '0x19' */ - return true + case 0x19: { /* '0x19' */ + return true } - case 0x1A: - { /* '0x1A' */ - return false + case 0x1A: { /* '0x1A' */ + return false } - case 0x1B: - { /* '0x1B' */ - return false + case 0x1B: { /* '0x1B' */ + return false } - default: - { + default: { return false } } @@ -841,113 +680,86 @@ func TransportSizeFirstEnumForFieldSupported_S7_1200(value bool) (TransportSize, } func (e TransportSize) ShortName() uint8 { - switch e { - case 0x01: - { /* '0x01' */ - return 'X' + switch e { + case 0x01: { /* '0x01' */ + return 'X' } - case 0x02: - { /* '0x02' */ - return 'B' + case 0x02: { /* '0x02' */ + return 'B' } - case 0x03: - { /* '0x03' */ - return 'W' + case 0x03: { /* '0x03' */ + return 'W' } - case 0x04: - { /* '0x04' */ - return 'D' + case 0x04: { /* '0x04' */ + return 'D' } - case 0x05: - { /* '0x05' */ - return 'X' + case 0x05: { /* '0x05' */ + return 'X' } - case 0x06: - { /* '0x06' */ - return 'W' + case 0x06: { /* '0x06' */ + return 'W' } - case 0x07: - { /* '0x07' */ - return 'W' + case 0x07: { /* '0x07' */ + return 'W' } - case 0x08: - { /* '0x08' */ - return 'B' + case 0x08: { /* '0x08' */ + return 'B' } - case 0x09: - { /* '0x09' */ - return 'B' + case 0x09: { /* '0x09' */ + return 'B' } - case 0x0A: - { /* '0x0A' */ - return 'D' + case 0x0A: { /* '0x0A' */ + return 'D' } - case 0x0B: - { /* '0x0B' */ - return 'D' + case 0x0B: { /* '0x0B' */ + return 'D' } - case 0x0C: - { /* '0x0C' */ - return 'X' + case 0x0C: { /* '0x0C' */ + return 'X' } - case 0x0D: - { /* '0x0D' */ - return 'X' + case 0x0D: { /* '0x0D' */ + return 'X' } - case 0x0E: - { /* '0x0E' */ - return 'D' + case 0x0E: { /* '0x0E' */ + return 'D' } - case 0x0F: - { /* '0x0F' */ - return 'X' + case 0x0F: { /* '0x0F' */ + return 'X' } - case 0x10: - { /* '0x10' */ - return 'B' + case 0x10: { /* '0x10' */ + return 'B' } - case 0x11: - { /* '0x11' */ - return 'X' + case 0x11: { /* '0x11' */ + return 'X' } - case 0x12: - { /* '0x12' */ - return 'X' + case 0x12: { /* '0x12' */ + return 'X' } - case 0x13: - { /* '0x13' */ - return 'X' + case 0x13: { /* '0x13' */ + return 'X' } - case 0x14: - { /* '0x14' */ - return 'X' + case 0x14: { /* '0x14' */ + return 'X' } - case 0x16: - { /* '0x16' */ - return 'X' + case 0x16: { /* '0x16' */ + return 'X' } - case 0x17: - { /* '0x17' */ - return 'X' + case 0x17: { /* '0x17' */ + return 'X' } - case 0x18: - { /* '0x18' */ - return 'X' + case 0x18: { /* '0x18' */ + return 'X' } - case 0x19: - { /* '0x19' */ - return 'X' + case 0x19: { /* '0x19' */ + return 'X' } - case 0x1A: - { /* '0x1A' */ - return 'X' + case 0x1A: { /* '0x1A' */ + return 'X' } - case 0x1B: - { /* '0x1B' */ - return 'X' + case 0x1B: { /* '0x1B' */ + return 'X' } - default: - { + default: { return 0 } } @@ -963,113 +775,86 @@ func TransportSizeFirstEnumForFieldShortName(value uint8) (TransportSize, error) } func (e TransportSize) Supported_S7_1500() bool { - switch e { - case 0x01: - { /* '0x01' */ - return true + switch e { + case 0x01: { /* '0x01' */ + return true } - case 0x02: - { /* '0x02' */ - return true + case 0x02: { /* '0x02' */ + return true } - case 0x03: - { /* '0x03' */ - return true + case 0x03: { /* '0x03' */ + return true } - case 0x04: - { /* '0x04' */ - return true + case 0x04: { /* '0x04' */ + return true } - case 0x05: - { /* '0x05' */ - return true + case 0x05: { /* '0x05' */ + return true } - case 0x06: - { /* '0x06' */ - return true + case 0x06: { /* '0x06' */ + return true } - case 0x07: - { /* '0x07' */ - return true + case 0x07: { /* '0x07' */ + return true } - case 0x08: - { /* '0x08' */ - return true + case 0x08: { /* '0x08' */ + return true } - case 0x09: - { /* '0x09' */ - return true + case 0x09: { /* '0x09' */ + return true } - case 0x0A: - { /* '0x0A' */ - return true + case 0x0A: { /* '0x0A' */ + return true } - case 0x0B: - { /* '0x0B' */ - return true + case 0x0B: { /* '0x0B' */ + return true } - case 0x0C: - { /* '0x0C' */ - return true + case 0x0C: { /* '0x0C' */ + return true } - case 0x0D: - { /* '0x0D' */ - return true + case 0x0D: { /* '0x0D' */ + return true } - case 0x0E: - { /* '0x0E' */ - return true + case 0x0E: { /* '0x0E' */ + return true } - case 0x0F: - { /* '0x0F' */ - return true + case 0x0F: { /* '0x0F' */ + return true } - case 0x10: - { /* '0x10' */ - return true + case 0x10: { /* '0x10' */ + return true } - case 0x11: - { /* '0x11' */ - return true + case 0x11: { /* '0x11' */ + return true } - case 0x12: - { /* '0x12' */ - return true + case 0x12: { /* '0x12' */ + return true } - case 0x13: - { /* '0x13' */ - return true + case 0x13: { /* '0x13' */ + return true } - case 0x14: - { /* '0x14' */ - return true + case 0x14: { /* '0x14' */ + return true } - case 0x16: - { /* '0x16' */ - return true + case 0x16: { /* '0x16' */ + return true } - case 0x17: - { /* '0x17' */ - return true + case 0x17: { /* '0x17' */ + return true } - case 0x18: - { /* '0x18' */ - return true + case 0x18: { /* '0x18' */ + return true } - case 0x19: - { /* '0x19' */ - return true + case 0x19: { /* '0x19' */ + return true } - case 0x1A: - { /* '0x1A' */ - return true + case 0x1A: { /* '0x1A' */ + return true } - case 0x1B: - { /* '0x1B' */ - return true + case 0x1B: { /* '0x1B' */ + return true } - default: - { + default: { return false } } @@ -1085,113 +870,86 @@ func TransportSizeFirstEnumForFieldSupported_S7_1500(value bool) (TransportSize, } func (e TransportSize) DataTransportSize() DataTransportSize { - switch e { - case 0x01: - { /* '0x01' */ + switch e { + case 0x01: { /* '0x01' */ return DataTransportSize_BIT } - case 0x02: - { /* '0x02' */ + case 0x02: { /* '0x02' */ return DataTransportSize_BYTE_WORD_DWORD } - case 0x03: - { /* '0x03' */ + case 0x03: { /* '0x03' */ return DataTransportSize_BYTE_WORD_DWORD } - case 0x04: - { /* '0x04' */ + case 0x04: { /* '0x04' */ return DataTransportSize_BYTE_WORD_DWORD } - case 0x05: - { /* '0x05' */ + case 0x05: { /* '0x05' */ return 0 } - case 0x06: - { /* '0x06' */ + case 0x06: { /* '0x06' */ return DataTransportSize_INTEGER } - case 0x07: - { /* '0x07' */ + case 0x07: { /* '0x07' */ return DataTransportSize_INTEGER } - case 0x08: - { /* '0x08' */ + case 0x08: { /* '0x08' */ return DataTransportSize_BYTE_WORD_DWORD } - case 0x09: - { /* '0x09' */ + case 0x09: { /* '0x09' */ return DataTransportSize_BYTE_WORD_DWORD } - case 0x0A: - { /* '0x0A' */ + case 0x0A: { /* '0x0A' */ return DataTransportSize_INTEGER } - case 0x0B: - { /* '0x0B' */ + case 0x0B: { /* '0x0B' */ return DataTransportSize_INTEGER } - case 0x0C: - { /* '0x0C' */ - return 0 + case 0x0C: { /* '0x0C' */ + return DataTransportSize_BYTE_WORD_DWORD } - case 0x0D: - { /* '0x0D' */ - return 0 + case 0x0D: { /* '0x0D' */ + return DataTransportSize_BYTE_WORD_DWORD } - case 0x0E: - { /* '0x0E' */ - return DataTransportSize_REAL + case 0x0E: { /* '0x0E' */ + return DataTransportSize_BYTE_WORD_DWORD } - case 0x0F: - { /* '0x0F' */ - return 0 + case 0x0F: { /* '0x0F' */ + return DataTransportSize_BYTE_WORD_DWORD } - case 0x10: - { /* '0x10' */ + case 0x10: { /* '0x10' */ return DataTransportSize_BYTE_WORD_DWORD } - case 0x11: - { /* '0x11' */ - return 0 + case 0x11: { /* '0x11' */ + return DataTransportSize_BYTE_WORD_DWORD } - case 0x12: - { /* '0x12' */ + case 0x12: { /* '0x12' */ return DataTransportSize_BYTE_WORD_DWORD } - case 0x13: - { /* '0x13' */ - return 0 + case 0x13: { /* '0x13' */ + return DataTransportSize_BYTE_WORD_DWORD } - case 0x14: - { /* '0x14' */ + case 0x14: { /* '0x14' */ return 0 } - case 0x16: - { /* '0x16' */ + case 0x16: { /* '0x16' */ return 0 } - case 0x17: - { /* '0x17' */ + case 0x17: { /* '0x17' */ return DataTransportSize_BYTE_WORD_DWORD } - case 0x18: - { /* '0x18' */ + case 0x18: { /* '0x18' */ return DataTransportSize_BYTE_WORD_DWORD } - case 0x19: - { /* '0x19' */ + case 0x19: { /* '0x19' */ return DataTransportSize_BYTE_WORD_DWORD } - case 0x1A: - { /* '0x1A' */ + case 0x1A: { /* '0x1A' */ return 0 } - case 0x1B: - { /* '0x1B' */ + case 0x1B: { /* '0x1B' */ return 0 } - default: - { + default: { return 0 } } @@ -1207,113 +965,86 @@ func TransportSizeFirstEnumForFieldDataTransportSize(value DataTransportSize) (T } func (e TransportSize) DataProtocolId() string { - switch e { - case 0x01: - { /* '0x01' */ - return "IEC61131_BOOL" + switch e { + case 0x01: { /* '0x01' */ + return "IEC61131_BOOL" } - case 0x02: - { /* '0x02' */ - return "IEC61131_BYTE" + case 0x02: { /* '0x02' */ + return "IEC61131_BYTE" } - case 0x03: - { /* '0x03' */ - return "IEC61131_WORD" + case 0x03: { /* '0x03' */ + return "IEC61131_WORD" } - case 0x04: - { /* '0x04' */ - return "IEC61131_DWORD" + case 0x04: { /* '0x04' */ + return "IEC61131_DWORD" } - case 0x05: - { /* '0x05' */ - return "IEC61131_LWORD" + case 0x05: { /* '0x05' */ + return "IEC61131_LWORD" } - case 0x06: - { /* '0x06' */ - return "IEC61131_INT" + case 0x06: { /* '0x06' */ + return "IEC61131_INT" } - case 0x07: - { /* '0x07' */ - return "IEC61131_UINT" + case 0x07: { /* '0x07' */ + return "IEC61131_UINT" } - case 0x08: - { /* '0x08' */ - return "IEC61131_SINT" + case 0x08: { /* '0x08' */ + return "IEC61131_SINT" } - case 0x09: - { /* '0x09' */ - return "IEC61131_USINT" + case 0x09: { /* '0x09' */ + return "IEC61131_USINT" } - case 0x0A: - { /* '0x0A' */ - return "IEC61131_DINT" + case 0x0A: { /* '0x0A' */ + return "IEC61131_DINT" } - case 0x0B: - { /* '0x0B' */ - return "IEC61131_UDINT" + case 0x0B: { /* '0x0B' */ + return "IEC61131_UDINT" } - case 0x0C: - { /* '0x0C' */ - return "IEC61131_LINT" + case 0x0C: { /* '0x0C' */ + return "IEC61131_LINT" } - case 0x0D: - { /* '0x0D' */ - return "IEC61131_ULINT" + case 0x0D: { /* '0x0D' */ + return "IEC61131_ULINT" } - case 0x0E: - { /* '0x0E' */ - return "IEC61131_REAL" + case 0x0E: { /* '0x0E' */ + return "IEC61131_REAL" } - case 0x0F: - { /* '0x0F' */ - return "IEC61131_LREAL" + case 0x0F: { /* '0x0F' */ + return "IEC61131_LREAL" } - case 0x10: - { /* '0x10' */ - return "IEC61131_CHAR" + case 0x10: { /* '0x10' */ + return "IEC61131_CHAR" } - case 0x11: - { /* '0x11' */ - return "IEC61131_WCHAR" + case 0x11: { /* '0x11' */ + return "IEC61131_WCHAR" } - case 0x12: - { /* '0x12' */ - return "IEC61131_STRING" + case 0x12: { /* '0x12' */ + return "IEC61131_STRING" } - case 0x13: - { /* '0x13' */ - return "IEC61131_WSTRING" + case 0x13: { /* '0x13' */ + return "IEC61131_WSTRING" } - case 0x14: - { /* '0x14' */ - return "IEC61131_TIME" + case 0x14: { /* '0x14' */ + return "IEC61131_TIME" } - case 0x16: - { /* '0x16' */ - return "IEC61131_LTIME" + case 0x16: { /* '0x16' */ + return "IEC61131_LTIME" } - case 0x17: - { /* '0x17' */ - return "IEC61131_DATE" + case 0x17: { /* '0x17' */ + return "IEC61131_DATE" } - case 0x18: - { /* '0x18' */ - return "IEC61131_TIME_OF_DAY" + case 0x18: { /* '0x18' */ + return "IEC61131_TIME_OF_DAY" } - case 0x19: - { /* '0x19' */ - return "IEC61131_TIME_OF_DAY" + case 0x19: { /* '0x19' */ + return "IEC61131_TIME_OF_DAY" } - case 0x1A: - { /* '0x1A' */ - return "IEC61131_DATE_AND_TIME" + case 0x1A: { /* '0x1A' */ + return "IEC61131_DATE_AND_TIME" } - case 0x1B: - { /* '0x1B' */ - return "IEC61131_DATE_AND_TIME" + case 0x1B: { /* '0x1B' */ + return "IEC61131_DATE_AND_TIME" } - default: - { + default: { return "" } } @@ -1329,113 +1060,86 @@ func TransportSizeFirstEnumForFieldDataProtocolId(value string) (TransportSize, } func (e TransportSize) BaseType() TransportSize { - switch e { - case 0x01: - { /* '0x01' */ + switch e { + case 0x01: { /* '0x01' */ return 0 } - case 0x02: - { /* '0x02' */ + case 0x02: { /* '0x02' */ return 0 } - case 0x03: - { /* '0x03' */ + case 0x03: { /* '0x03' */ return 0 } - case 0x04: - { /* '0x04' */ + case 0x04: { /* '0x04' */ return TransportSize_WORD } - case 0x05: - { /* '0x05' */ + case 0x05: { /* '0x05' */ return 0 } - case 0x06: - { /* '0x06' */ + case 0x06: { /* '0x06' */ return 0 } - case 0x07: - { /* '0x07' */ + case 0x07: { /* '0x07' */ return TransportSize_INT } - case 0x08: - { /* '0x08' */ + case 0x08: { /* '0x08' */ return TransportSize_INT } - case 0x09: - { /* '0x09' */ + case 0x09: { /* '0x09' */ return TransportSize_INT } - case 0x0A: - { /* '0x0A' */ + case 0x0A: { /* '0x0A' */ return TransportSize_INT } - case 0x0B: - { /* '0x0B' */ + case 0x0B: { /* '0x0B' */ return TransportSize_INT } - case 0x0C: - { /* '0x0C' */ - return TransportSize_INT + case 0x0C: { /* '0x0C' */ + return 0 } - case 0x0D: - { /* '0x0D' */ - return TransportSize_INT + case 0x0D: { /* '0x0D' */ + return 0 } - case 0x0E: - { /* '0x0E' */ + case 0x0E: { /* '0x0E' */ return 0 } - case 0x0F: - { /* '0x0F' */ + case 0x0F: { /* '0x0F' */ return TransportSize_REAL } - case 0x10: - { /* '0x10' */ + case 0x10: { /* '0x10' */ return 0 } - case 0x11: - { /* '0x11' */ + case 0x11: { /* '0x11' */ return 0 } - case 0x12: - { /* '0x12' */ + case 0x12: { /* '0x12' */ return 0 } - case 0x13: - { /* '0x13' */ + case 0x13: { /* '0x13' */ return 0 } - case 0x14: - { /* '0x14' */ + case 0x14: { /* '0x14' */ return 0 } - case 0x16: - { /* '0x16' */ + case 0x16: { /* '0x16' */ return TransportSize_TIME } - case 0x17: - { /* '0x17' */ + case 0x17: { /* '0x17' */ return 0 } - case 0x18: - { /* '0x18' */ + case 0x18: { /* '0x18' */ return 0 } - case 0x19: - { /* '0x19' */ + case 0x19: { /* '0x19' */ return 0 } - case 0x1A: - { /* '0x1A' */ + case 0x1A: { /* '0x1A' */ return 0 } - case 0x1B: - { /* '0x1B' */ + case 0x1B: { /* '0x1B' */ return 0 } - default: - { + default: { return 0 } } @@ -1451,58 +1155,58 @@ func TransportSizeFirstEnumForFieldBaseType(value TransportSize) (TransportSize, } func TransportSizeByValue(value uint8) (enum TransportSize, ok bool) { switch value { - case 0x01: - return TransportSize_BOOL, true - case 0x02: - return TransportSize_BYTE, true - case 0x03: - return TransportSize_WORD, true - case 0x04: - return TransportSize_DWORD, true - case 0x05: - return TransportSize_LWORD, true - case 0x06: - return TransportSize_INT, true - case 0x07: - return TransportSize_UINT, true - case 0x08: - return TransportSize_SINT, true - case 0x09: - return TransportSize_USINT, true - case 0x0A: - return TransportSize_DINT, true - case 0x0B: - return TransportSize_UDINT, true - case 0x0C: - return TransportSize_LINT, true - case 0x0D: - return TransportSize_ULINT, true - case 0x0E: - return TransportSize_REAL, true - case 0x0F: - return TransportSize_LREAL, true - case 0x10: - return TransportSize_CHAR, true - case 0x11: - return TransportSize_WCHAR, true - case 0x12: - return TransportSize_STRING, true - case 0x13: - return TransportSize_WSTRING, true - case 0x14: - return TransportSize_TIME, true - case 0x16: - return TransportSize_LTIME, true - case 0x17: - return TransportSize_DATE, true - case 0x18: - return TransportSize_TIME_OF_DAY, true - case 0x19: - return TransportSize_TOD, true - case 0x1A: - return TransportSize_DATE_AND_TIME, true - case 0x1B: - return TransportSize_DT, true + case 0x01: + return TransportSize_BOOL, true + case 0x02: + return TransportSize_BYTE, true + case 0x03: + return TransportSize_WORD, true + case 0x04: + return TransportSize_DWORD, true + case 0x05: + return TransportSize_LWORD, true + case 0x06: + return TransportSize_INT, true + case 0x07: + return TransportSize_UINT, true + case 0x08: + return TransportSize_SINT, true + case 0x09: + return TransportSize_USINT, true + case 0x0A: + return TransportSize_DINT, true + case 0x0B: + return TransportSize_UDINT, true + case 0x0C: + return TransportSize_LINT, true + case 0x0D: + return TransportSize_ULINT, true + case 0x0E: + return TransportSize_REAL, true + case 0x0F: + return TransportSize_LREAL, true + case 0x10: + return TransportSize_CHAR, true + case 0x11: + return TransportSize_WCHAR, true + case 0x12: + return TransportSize_STRING, true + case 0x13: + return TransportSize_WSTRING, true + case 0x14: + return TransportSize_TIME, true + case 0x16: + return TransportSize_LTIME, true + case 0x17: + return TransportSize_DATE, true + case 0x18: + return TransportSize_TIME_OF_DAY, true + case 0x19: + return TransportSize_TOD, true + case 0x1A: + return TransportSize_DATE_AND_TIME, true + case 0x1B: + return TransportSize_DT, true } return 0, false } @@ -1565,13 +1269,13 @@ func TransportSizeByName(value string) (enum TransportSize, ok bool) { return 0, false } -func TransportSizeKnows(value uint8) bool { +func TransportSizeKnows(value uint8) bool { for _, typeValue := range TransportSizeValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastTransportSize(structType interface{}) TransportSize { @@ -1683,3 +1387,4 @@ func (e TransportSize) PLC4XEnumName() string { func (e TransportSize) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/s7/readwrite/model/plc4x_common.go b/plc4go/protocols/s7/readwrite/model/plc4x_common.go index d2d66e8bdd3..42166d94e68 100644 --- a/plc4go/protocols/s7/readwrite/model/plc4x_common.go +++ b/plc4go/protocols/s7/readwrite/model/plc4x_common.go @@ -15,7 +15,7 @@ * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - */ +*/ package model @@ -25,3 +25,4 @@ import "github.com/rs/zerolog/log" // Plc4xModelLog is the Logger used by the Parse/Serialize methods var Plc4xModelLog = &log.Logger + diff --git a/plc4go/protocols/simulated/readwrite/XmlParserHelper.go b/plc4go/protocols/simulated/readwrite/XmlParserHelper.go index 57e31bf729a..980dea6d9ff 100644 --- a/plc4go/protocols/simulated/readwrite/XmlParserHelper.go +++ b/plc4go/protocols/simulated/readwrite/XmlParserHelper.go @@ -21,8 +21,8 @@ package readwrite import ( "context" - "strconv" "strings" + "strconv" "github.com/apache/plc4x/plc4go/protocols/simulated/readwrite/model" "github.com/apache/plc4x/plc4go/spi/utils" @@ -43,18 +43,18 @@ func init() { } func (m SimulatedXmlParserHelper) Parse(typeName string, xmlString string, parserArguments ...string) (interface{}, error) { - switch typeName { - case "DataItem": - // TODO: find a way to parse the sub types - var dataType string - parsedUint1, err := strconv.ParseUint(parserArguments[1], 10, 16) - if err != nil { - return nil, err - } - numberOfValues := uint16(parsedUint1) - return model.DataItemParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), dataType, numberOfValues) - case "Dummy": - return model.DummyParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) - } - return nil, errors.Errorf("Unsupported type %s", typeName) + switch typeName { + case "DataItem": + // TODO: find a way to parse the sub types + var dataType string + parsedUint1, err := strconv.ParseUint(parserArguments[1], 10, 16) + if err!=nil { + return nil, err + } + numberOfValues := uint16(parsedUint1) + return model.DataItemParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), dataType, numberOfValues ) + case "Dummy": + return model.DummyParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + } + return nil, errors.Errorf("Unsupported type %s", typeName) } diff --git a/plc4go/protocols/simulated/readwrite/model/DataItem.go b/plc4go/protocols/simulated/readwrite/model/DataItem.go index 718ad97f956..8e14e2c0900 100644 --- a/plc4go/protocols/simulated/readwrite/model/DataItem.go +++ b/plc4go/protocols/simulated/readwrite/model/DataItem.go @@ -19,16 +19,17 @@ package model + import ( "context" - api "github.com/apache/plc4x/plc4go/pkg/api/values" "github.com/apache/plc4x/plc4go/spi/utils" "github.com/apache/plc4x/plc4go/spi/values" "github.com/pkg/errors" + api "github.com/apache/plc4x/plc4go/pkg/api/values" ) -// Code generated by code-generation. DO NOT EDIT. - + // Code generated by code-generation. DO NOT EDIT. + func DataItemParse(ctx context.Context, theBytes []byte, dataType string, numberOfValues uint16) (api.PlcValue, error) { return DataItemParseWithBuffer(ctx, utils.NewReadBufferByteBased(theBytes), dataType, numberOfValues) } @@ -36,364 +37,364 @@ func DataItemParse(ctx context.Context, theBytes []byte, dataType string, number func DataItemParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, dataType string, numberOfValues uint16) (api.PlcValue, error) { readBuffer.PullContext("DataItem") switch { - case dataType == "BOOL" && numberOfValues == uint16(1): // BOOL - // Simple Field (value) - value, _valueErr := readBuffer.ReadBit("value") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcBOOL(value), nil - case dataType == "BOOL": // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int(numberOfValues); i++ { - _item, _itemErr := readBuffer.ReadBit("value") - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcBOOL(_item)) - } - readBuffer.CloseContext("DataItem") - return values.NewPlcList(value), nil - case dataType == "BYTE" && numberOfValues == uint16(1): // BYTE - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcBYTE(value), nil - case dataType == "BYTE": // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int(numberOfValues); i++ { - _item, _itemErr := readBuffer.ReadUint8("value", 8) - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcUSINT(_item)) - } - readBuffer.CloseContext("DataItem") - return values.NewPlcList(value), nil - case dataType == "WORD" && numberOfValues == uint16(1): // WORD - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint16("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcWORD(value), nil - case dataType == "WORD": // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int(numberOfValues); i++ { - _item, _itemErr := readBuffer.ReadUint16("value", 16) - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcUINT(_item)) - } - readBuffer.CloseContext("DataItem") - return values.NewPlcList(value), nil - case dataType == "DWORD" && numberOfValues == uint16(1): // DWORD - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcDWORD(value), nil - case dataType == "DWORD": // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int(numberOfValues); i++ { - _item, _itemErr := readBuffer.ReadUint32("value", 32) - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcUDINT(_item)) - } - readBuffer.CloseContext("DataItem") - return values.NewPlcList(value), nil - case dataType == "LWORD" && numberOfValues == uint16(1): // LWORD - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint64("value", 64) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcLWORD(value), nil - case dataType == "LWORD": // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int(numberOfValues); i++ { - _item, _itemErr := readBuffer.ReadUint64("value", 64) - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcULINT(_item)) - } - readBuffer.CloseContext("DataItem") - return values.NewPlcList(value), nil - case dataType == "SINT" && numberOfValues == uint16(1): // SINT - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcSINT(value), nil - case dataType == "SINT": // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int(numberOfValues); i++ { - _item, _itemErr := readBuffer.ReadInt8("value", 8) - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcSINT(_item)) - } - readBuffer.CloseContext("DataItem") - return values.NewPlcList(value), nil - case dataType == "INT" && numberOfValues == uint16(1): // INT - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt16("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcINT(value), nil - case dataType == "INT": // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int(numberOfValues); i++ { - _item, _itemErr := readBuffer.ReadInt16("value", 16) - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcINT(_item)) - } - readBuffer.CloseContext("DataItem") - return values.NewPlcList(value), nil - case dataType == "DINT" && numberOfValues == uint16(1): // DINT - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcDINT(value), nil - case dataType == "DINT": // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int(numberOfValues); i++ { - _item, _itemErr := readBuffer.ReadInt32("value", 32) - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcDINT(_item)) - } - readBuffer.CloseContext("DataItem") - return values.NewPlcList(value), nil - case dataType == "LINT" && numberOfValues == uint16(1): // LINT - // Simple Field (value) - value, _valueErr := readBuffer.ReadInt64("value", 64) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcLINT(value), nil - case dataType == "LINT": // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int(numberOfValues); i++ { - _item, _itemErr := readBuffer.ReadInt64("value", 64) - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcLINT(_item)) - } - readBuffer.CloseContext("DataItem") - return values.NewPlcList(value), nil - case dataType == "USINT" && numberOfValues == uint16(1): // USINT - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint8("value", 8) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcUSINT(value), nil - case dataType == "USINT": // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int(numberOfValues); i++ { - _item, _itemErr := readBuffer.ReadUint8("value", 8) - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcUSINT(_item)) - } - readBuffer.CloseContext("DataItem") - return values.NewPlcList(value), nil - case dataType == "UINT" && numberOfValues == uint16(1): // UINT - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint16("value", 16) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcUINT(value), nil - case dataType == "UINT": // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int(numberOfValues); i++ { - _item, _itemErr := readBuffer.ReadUint16("value", 16) - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcUINT(_item)) - } - readBuffer.CloseContext("DataItem") - return values.NewPlcList(value), nil - case dataType == "UDINT" && numberOfValues == uint16(1): // UDINT - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcUDINT(value), nil - case dataType == "UDINT": // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int(numberOfValues); i++ { - _item, _itemErr := readBuffer.ReadUint32("value", 32) - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcUDINT(_item)) - } - readBuffer.CloseContext("DataItem") - return values.NewPlcList(value), nil - case dataType == "ULINT" && numberOfValues == uint16(1): // ULINT - // Simple Field (value) - value, _valueErr := readBuffer.ReadUint64("value", 64) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcULINT(value), nil - case dataType == "ULINT": // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int(numberOfValues); i++ { - _item, _itemErr := readBuffer.ReadUint64("value", 64) - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcULINT(_item)) - } - readBuffer.CloseContext("DataItem") - return values.NewPlcList(value), nil - case dataType == "REAL" && numberOfValues == uint16(1): // REAL - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat32("value", 32) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcREAL(value), nil - case dataType == "REAL": // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int(numberOfValues); i++ { - _item, _itemErr := readBuffer.ReadFloat32("value", 32) - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcREAL(_item)) - } - readBuffer.CloseContext("DataItem") - return values.NewPlcList(value), nil - case dataType == "LREAL" && numberOfValues == uint16(1): // LREAL - // Simple Field (value) - value, _valueErr := readBuffer.ReadFloat64("value", 64) - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcLREAL(value), nil - case dataType == "LREAL": // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int(numberOfValues); i++ { - _item, _itemErr := readBuffer.ReadFloat64("value", 64) - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcLREAL(_item)) - } - readBuffer.CloseContext("DataItem") - return values.NewPlcList(value), nil - case dataType == "CHAR" && numberOfValues == uint16(1): // CHAR - // Simple Field (value) - value, _valueErr := readBuffer.ReadString("value", uint32(8), "UTF-8") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcCHAR(value), nil - case dataType == "CHAR": // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int(numberOfValues); i++ { - _item, _itemErr := readBuffer.ReadString("value", uint32(8), "UTF-8") - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcSTRING(_item)) - } - readBuffer.CloseContext("DataItem") - return values.NewPlcList(value), nil - case dataType == "WCHAR" && numberOfValues == uint16(1): // WCHAR - // Simple Field (value) - value, _valueErr := readBuffer.ReadString("value", uint32(16), "UTF-16") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcWCHAR(value), nil - case dataType == "WCHAR": // List - // Array Field (value) - var value []api.PlcValue - for i := 0; i < int(numberOfValues); i++ { - _item, _itemErr := readBuffer.ReadString("value", uint32(16), "UTF-16") - if _itemErr != nil { - return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") - } - value = append(value, values.NewPlcSTRING(_item)) - } - readBuffer.CloseContext("DataItem") - return values.NewPlcList(value), nil - case dataType == "STRING": // STRING - // Simple Field (value) - value, _valueErr := readBuffer.ReadString("value", uint32(255), "UTF-8") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcSTRING(value), nil - case dataType == "WSTRING": // STRING - // Simple Field (value) - value, _valueErr := readBuffer.ReadString("value", uint32(255), "UTF-16") - if _valueErr != nil { - return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") - } - readBuffer.CloseContext("DataItem") - return values.NewPlcSTRING(value), nil +case dataType == "BOOL" && numberOfValues == uint16(1) : // BOOL + // Simple Field (value) + value, _valueErr := readBuffer.ReadBit("value") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcBOOL(value), nil +case dataType == "BOOL" : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int(numberOfValues); i++ { + _item, _itemErr := readBuffer.ReadBit("value") + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcBOOL(_item)) + } + readBuffer.CloseContext("DataItem") + return values.NewPlcList(value), nil +case dataType == "BYTE" && numberOfValues == uint16(1) : // BYTE + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcBYTE(value), nil +case dataType == "BYTE" : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int(numberOfValues); i++ { + _item, _itemErr := readBuffer.ReadUint8("value", 8) + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcUSINT(_item)) + } + readBuffer.CloseContext("DataItem") + return values.NewPlcList(value), nil +case dataType == "WORD" && numberOfValues == uint16(1) : // WORD + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint16("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcWORD(value), nil +case dataType == "WORD" : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int(numberOfValues); i++ { + _item, _itemErr := readBuffer.ReadUint16("value", 16) + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcUINT(_item)) + } + readBuffer.CloseContext("DataItem") + return values.NewPlcList(value), nil +case dataType == "DWORD" && numberOfValues == uint16(1) : // DWORD + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcDWORD(value), nil +case dataType == "DWORD" : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int(numberOfValues); i++ { + _item, _itemErr := readBuffer.ReadUint32("value", 32) + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcUDINT(_item)) + } + readBuffer.CloseContext("DataItem") + return values.NewPlcList(value), nil +case dataType == "LWORD" && numberOfValues == uint16(1) : // LWORD + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint64("value", 64) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcLWORD(value), nil +case dataType == "LWORD" : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int(numberOfValues); i++ { + _item, _itemErr := readBuffer.ReadUint64("value", 64) + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcULINT(_item)) + } + readBuffer.CloseContext("DataItem") + return values.NewPlcList(value), nil +case dataType == "SINT" && numberOfValues == uint16(1) : // SINT + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcSINT(value), nil +case dataType == "SINT" : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int(numberOfValues); i++ { + _item, _itemErr := readBuffer.ReadInt8("value", 8) + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcSINT(_item)) + } + readBuffer.CloseContext("DataItem") + return values.NewPlcList(value), nil +case dataType == "INT" && numberOfValues == uint16(1) : // INT + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt16("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcINT(value), nil +case dataType == "INT" : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int(numberOfValues); i++ { + _item, _itemErr := readBuffer.ReadInt16("value", 16) + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcINT(_item)) + } + readBuffer.CloseContext("DataItem") + return values.NewPlcList(value), nil +case dataType == "DINT" && numberOfValues == uint16(1) : // DINT + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcDINT(value), nil +case dataType == "DINT" : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int(numberOfValues); i++ { + _item, _itemErr := readBuffer.ReadInt32("value", 32) + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcDINT(_item)) + } + readBuffer.CloseContext("DataItem") + return values.NewPlcList(value), nil +case dataType == "LINT" && numberOfValues == uint16(1) : // LINT + // Simple Field (value) + value, _valueErr := readBuffer.ReadInt64("value", 64) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcLINT(value), nil +case dataType == "LINT" : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int(numberOfValues); i++ { + _item, _itemErr := readBuffer.ReadInt64("value", 64) + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcLINT(_item)) + } + readBuffer.CloseContext("DataItem") + return values.NewPlcList(value), nil +case dataType == "USINT" && numberOfValues == uint16(1) : // USINT + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint8("value", 8) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcUSINT(value), nil +case dataType == "USINT" : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int(numberOfValues); i++ { + _item, _itemErr := readBuffer.ReadUint8("value", 8) + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcUSINT(_item)) + } + readBuffer.CloseContext("DataItem") + return values.NewPlcList(value), nil +case dataType == "UINT" && numberOfValues == uint16(1) : // UINT + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint16("value", 16) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcUINT(value), nil +case dataType == "UINT" : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int(numberOfValues); i++ { + _item, _itemErr := readBuffer.ReadUint16("value", 16) + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcUINT(_item)) + } + readBuffer.CloseContext("DataItem") + return values.NewPlcList(value), nil +case dataType == "UDINT" && numberOfValues == uint16(1) : // UDINT + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcUDINT(value), nil +case dataType == "UDINT" : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int(numberOfValues); i++ { + _item, _itemErr := readBuffer.ReadUint32("value", 32) + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcUDINT(_item)) + } + readBuffer.CloseContext("DataItem") + return values.NewPlcList(value), nil +case dataType == "ULINT" && numberOfValues == uint16(1) : // ULINT + // Simple Field (value) + value, _valueErr := readBuffer.ReadUint64("value", 64) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcULINT(value), nil +case dataType == "ULINT" : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int(numberOfValues); i++ { + _item, _itemErr := readBuffer.ReadUint64("value", 64) + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcULINT(_item)) + } + readBuffer.CloseContext("DataItem") + return values.NewPlcList(value), nil +case dataType == "REAL" && numberOfValues == uint16(1) : // REAL + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat32("value", 32) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcREAL(value), nil +case dataType == "REAL" : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int(numberOfValues); i++ { + _item, _itemErr := readBuffer.ReadFloat32("value", 32) + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcREAL(_item)) + } + readBuffer.CloseContext("DataItem") + return values.NewPlcList(value), nil +case dataType == "LREAL" && numberOfValues == uint16(1) : // LREAL + // Simple Field (value) + value, _valueErr := readBuffer.ReadFloat64("value", 64) + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcLREAL(value), nil +case dataType == "LREAL" : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int(numberOfValues); i++ { + _item, _itemErr := readBuffer.ReadFloat64("value", 64) + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcLREAL(_item)) + } + readBuffer.CloseContext("DataItem") + return values.NewPlcList(value), nil +case dataType == "CHAR" && numberOfValues == uint16(1) : // CHAR + // Simple Field (value) + value, _valueErr := readBuffer.ReadString("value", uint32(8), "UTF-8") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcCHAR(value), nil +case dataType == "CHAR" : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int(numberOfValues); i++ { + _item, _itemErr := readBuffer.ReadString("value", uint32(8), "UTF-8") + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcSTRING(_item)) + } + readBuffer.CloseContext("DataItem") + return values.NewPlcList(value), nil +case dataType == "WCHAR" && numberOfValues == uint16(1) : // WCHAR + // Simple Field (value) + value, _valueErr := readBuffer.ReadString("value", uint32(16), "UTF-16") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcWCHAR(value), nil +case dataType == "WCHAR" : // List + // Array Field (value) + var value []api.PlcValue + for i := 0; i < int(numberOfValues); i++ { + _item, _itemErr := readBuffer.ReadString("value", uint32(16), "UTF-16") + if _itemErr != nil { + return nil, errors.Wrap(_itemErr, "Error parsing 'value' field") + } + value = append(value, values.NewPlcSTRING(_item)) + } + readBuffer.CloseContext("DataItem") + return values.NewPlcList(value), nil +case dataType == "STRING" : // STRING + // Simple Field (value) + value, _valueErr := readBuffer.ReadString("value", uint32(255), "UTF-8") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcSTRING(value), nil +case dataType == "WSTRING" : // STRING + // Simple Field (value) + value, _valueErr := readBuffer.ReadString("value", uint32(255), "UTF-16") + if _valueErr != nil { + return nil, errors.Wrap(_valueErr, "Error parsing 'value' field") + } + readBuffer.CloseContext("DataItem") + return values.NewPlcSTRING(value), nil } - // TODO: add more info which type it is actually + // TODO: add more info which type it is actually return nil, errors.New("unsupported type") } @@ -407,250 +408,252 @@ func DataItemSerialize(value api.PlcValue, dataType string, numberOfValues uint1 func DataItemSerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer, value api.PlcValue, dataType string, numberOfValues uint16) error { m := struct { - DataType string - NumberOfValues uint16 + DataType string + NumberOfValues uint16 }{ - DataType: dataType, - NumberOfValues: numberOfValues, + DataType: dataType, + NumberOfValues: numberOfValues, } _ = m writeBuffer.PushContext("DataItem") switch { - case dataType == "BOOL" && numberOfValues == uint16(1): // BOOL - // Simple Field (value) - if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataType == "BOOL": // List - // Array Field (value) - for i := uint32(0); i < uint32(m.NumberOfValues); i++ { - _itemErr := writeBuffer.WriteBit("", value.GetIndex(i).GetBool()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case dataType == "BYTE" && numberOfValues == uint16(1): // BYTE - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataType == "BYTE": // List - // Array Field (value) - for i := uint32(0); i < uint32(m.NumberOfValues); i++ { - _itemErr := writeBuffer.WriteUint8("", 8, value.GetIndex(i).GetUint8()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case dataType == "WORD" && numberOfValues == uint16(1): // WORD - // Simple Field (value) - if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataType == "WORD": // List - // Array Field (value) - for i := uint32(0); i < uint32(m.NumberOfValues); i++ { - _itemErr := writeBuffer.WriteUint16("", 16, value.GetIndex(i).GetUint16()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case dataType == "DWORD" && numberOfValues == uint16(1): // DWORD - // Simple Field (value) - if _err := writeBuffer.WriteUint32("value", 32, value.GetUint32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataType == "DWORD": // List - // Array Field (value) - for i := uint32(0); i < uint32(m.NumberOfValues); i++ { - _itemErr := writeBuffer.WriteUint32("", 32, value.GetIndex(i).GetUint32()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case dataType == "LWORD" && numberOfValues == uint16(1): // LWORD - // Simple Field (value) - if _err := writeBuffer.WriteUint64("value", 64, value.GetUint64()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataType == "LWORD": // List - // Array Field (value) - for i := uint32(0); i < uint32(m.NumberOfValues); i++ { - _itemErr := writeBuffer.WriteUint64("", 64, value.GetIndex(i).GetUint64()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case dataType == "SINT" && numberOfValues == uint16(1): // SINT - // Simple Field (value) - if _err := writeBuffer.WriteInt8("value", 8, value.GetInt8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataType == "SINT": // List - // Array Field (value) - for i := uint32(0); i < uint32(m.NumberOfValues); i++ { - _itemErr := writeBuffer.WriteInt8("", 8, value.GetIndex(i).GetInt8()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case dataType == "INT" && numberOfValues == uint16(1): // INT - // Simple Field (value) - if _err := writeBuffer.WriteInt16("value", 16, value.GetInt16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataType == "INT": // List - // Array Field (value) - for i := uint32(0); i < uint32(m.NumberOfValues); i++ { - _itemErr := writeBuffer.WriteInt16("", 16, value.GetIndex(i).GetInt16()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case dataType == "DINT" && numberOfValues == uint16(1): // DINT - // Simple Field (value) - if _err := writeBuffer.WriteInt32("value", 32, value.GetInt32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataType == "DINT": // List - // Array Field (value) - for i := uint32(0); i < uint32(m.NumberOfValues); i++ { - _itemErr := writeBuffer.WriteInt32("", 32, value.GetIndex(i).GetInt32()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case dataType == "LINT" && numberOfValues == uint16(1): // LINT - // Simple Field (value) - if _err := writeBuffer.WriteInt64("value", 64, value.GetInt64()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataType == "LINT": // List - // Array Field (value) - for i := uint32(0); i < uint32(m.NumberOfValues); i++ { - _itemErr := writeBuffer.WriteInt64("", 64, value.GetIndex(i).GetInt64()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case dataType == "USINT" && numberOfValues == uint16(1): // USINT - // Simple Field (value) - if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataType == "USINT": // List - // Array Field (value) - for i := uint32(0); i < uint32(m.NumberOfValues); i++ { - _itemErr := writeBuffer.WriteUint8("", 8, value.GetIndex(i).GetUint8()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case dataType == "UINT" && numberOfValues == uint16(1): // UINT - // Simple Field (value) - if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataType == "UINT": // List - // Array Field (value) - for i := uint32(0); i < uint32(m.NumberOfValues); i++ { - _itemErr := writeBuffer.WriteUint16("", 16, value.GetIndex(i).GetUint16()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case dataType == "UDINT" && numberOfValues == uint16(1): // UDINT - // Simple Field (value) - if _err := writeBuffer.WriteUint32("value", 32, value.GetUint32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataType == "UDINT": // List - // Array Field (value) - for i := uint32(0); i < uint32(m.NumberOfValues); i++ { - _itemErr := writeBuffer.WriteUint32("", 32, value.GetIndex(i).GetUint32()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case dataType == "ULINT" && numberOfValues == uint16(1): // ULINT - // Simple Field (value) - if _err := writeBuffer.WriteUint64("value", 64, value.GetUint64()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataType == "ULINT": // List - // Array Field (value) - for i := uint32(0); i < uint32(m.NumberOfValues); i++ { - _itemErr := writeBuffer.WriteUint64("", 64, value.GetIndex(i).GetUint64()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case dataType == "REAL" && numberOfValues == uint16(1): // REAL - // Simple Field (value) - if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataType == "REAL": // List - // Array Field (value) - for i := uint32(0); i < uint32(m.NumberOfValues); i++ { - _itemErr := writeBuffer.WriteFloat32("", 32, value.GetIndex(i).GetFloat32()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case dataType == "LREAL" && numberOfValues == uint16(1): // LREAL - // Simple Field (value) - if _err := writeBuffer.WriteFloat64("value", 64, value.GetFloat64()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataType == "LREAL": // List - // Array Field (value) - for i := uint32(0); i < uint32(m.NumberOfValues); i++ { - _itemErr := writeBuffer.WriteFloat64("", 64, value.GetIndex(i).GetFloat64()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case dataType == "CHAR" && numberOfValues == uint16(1): // CHAR - // Simple Field (value) - if _err := writeBuffer.WriteString("value", uint32(8), "UTF-8", value.GetString()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataType == "CHAR": // List - // Array Field (value) - for i := uint32(0); i < uint32(m.NumberOfValues); i++ { - _itemErr := writeBuffer.WriteString("", uint32(8), "UTF-8", value.GetIndex(i).GetString()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case dataType == "WCHAR" && numberOfValues == uint16(1): // WCHAR - // Simple Field (value) - if _err := writeBuffer.WriteString("value", uint32(16), "UTF-16", value.GetString()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataType == "WCHAR": // List - // Array Field (value) - for i := uint32(0); i < uint32(m.NumberOfValues); i++ { - _itemErr := writeBuffer.WriteString("", uint32(16), "UTF-16", value.GetIndex(i).GetString()) - if _itemErr != nil { - return errors.Wrap(_itemErr, "Error serializing 'value' field") - } - } - case dataType == "STRING": // STRING - // Simple Field (value) - if _err := writeBuffer.WriteString("value", uint32(255), "UTF-8", value.GetString()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - case dataType == "WSTRING": // STRING - // Simple Field (value) - if _err := writeBuffer.WriteString("value", uint32(255), "UTF-16", value.GetString()); _err != nil { - return errors.Wrap(_err, "Error serializing 'value' field") - } - default: - // TODO: add more info which type it is actually - return errors.New("unsupported type") +case dataType == "BOOL" && numberOfValues == uint16(1) : // BOOL + // Simple Field (value) + if _err := writeBuffer.WriteBit("value", value.GetBool()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataType == "BOOL" : // List + // Array Field (value) + for i := uint32(0); i < uint32(m.NumberOfValues); i++ { + _itemErr := writeBuffer.WriteBit("", value.GetIndex(i).GetBool()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case dataType == "BYTE" && numberOfValues == uint16(1) : // BYTE + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataType == "BYTE" : // List + // Array Field (value) + for i := uint32(0); i < uint32(m.NumberOfValues); i++ { + _itemErr := writeBuffer.WriteUint8("", 8, value.GetIndex(i).GetUint8()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case dataType == "WORD" && numberOfValues == uint16(1) : // WORD + // Simple Field (value) + if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataType == "WORD" : // List + // Array Field (value) + for i := uint32(0); i < uint32(m.NumberOfValues); i++ { + _itemErr := writeBuffer.WriteUint16("", 16, value.GetIndex(i).GetUint16()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case dataType == "DWORD" && numberOfValues == uint16(1) : // DWORD + // Simple Field (value) + if _err := writeBuffer.WriteUint32("value", 32, value.GetUint32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataType == "DWORD" : // List + // Array Field (value) + for i := uint32(0); i < uint32(m.NumberOfValues); i++ { + _itemErr := writeBuffer.WriteUint32("", 32, value.GetIndex(i).GetUint32()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case dataType == "LWORD" && numberOfValues == uint16(1) : // LWORD + // Simple Field (value) + if _err := writeBuffer.WriteUint64("value", 64, value.GetUint64()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataType == "LWORD" : // List + // Array Field (value) + for i := uint32(0); i < uint32(m.NumberOfValues); i++ { + _itemErr := writeBuffer.WriteUint64("", 64, value.GetIndex(i).GetUint64()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case dataType == "SINT" && numberOfValues == uint16(1) : // SINT + // Simple Field (value) + if _err := writeBuffer.WriteInt8("value", 8, value.GetInt8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataType == "SINT" : // List + // Array Field (value) + for i := uint32(0); i < uint32(m.NumberOfValues); i++ { + _itemErr := writeBuffer.WriteInt8("", 8, value.GetIndex(i).GetInt8()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case dataType == "INT" && numberOfValues == uint16(1) : // INT + // Simple Field (value) + if _err := writeBuffer.WriteInt16("value", 16, value.GetInt16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataType == "INT" : // List + // Array Field (value) + for i := uint32(0); i < uint32(m.NumberOfValues); i++ { + _itemErr := writeBuffer.WriteInt16("", 16, value.GetIndex(i).GetInt16()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case dataType == "DINT" && numberOfValues == uint16(1) : // DINT + // Simple Field (value) + if _err := writeBuffer.WriteInt32("value", 32, value.GetInt32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataType == "DINT" : // List + // Array Field (value) + for i := uint32(0); i < uint32(m.NumberOfValues); i++ { + _itemErr := writeBuffer.WriteInt32("", 32, value.GetIndex(i).GetInt32()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case dataType == "LINT" && numberOfValues == uint16(1) : // LINT + // Simple Field (value) + if _err := writeBuffer.WriteInt64("value", 64, value.GetInt64()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataType == "LINT" : // List + // Array Field (value) + for i := uint32(0); i < uint32(m.NumberOfValues); i++ { + _itemErr := writeBuffer.WriteInt64("", 64, value.GetIndex(i).GetInt64()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case dataType == "USINT" && numberOfValues == uint16(1) : // USINT + // Simple Field (value) + if _err := writeBuffer.WriteUint8("value", 8, value.GetUint8()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataType == "USINT" : // List + // Array Field (value) + for i := uint32(0); i < uint32(m.NumberOfValues); i++ { + _itemErr := writeBuffer.WriteUint8("", 8, value.GetIndex(i).GetUint8()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case dataType == "UINT" && numberOfValues == uint16(1) : // UINT + // Simple Field (value) + if _err := writeBuffer.WriteUint16("value", 16, value.GetUint16()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataType == "UINT" : // List + // Array Field (value) + for i := uint32(0); i < uint32(m.NumberOfValues); i++ { + _itemErr := writeBuffer.WriteUint16("", 16, value.GetIndex(i).GetUint16()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case dataType == "UDINT" && numberOfValues == uint16(1) : // UDINT + // Simple Field (value) + if _err := writeBuffer.WriteUint32("value", 32, value.GetUint32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataType == "UDINT" : // List + // Array Field (value) + for i := uint32(0); i < uint32(m.NumberOfValues); i++ { + _itemErr := writeBuffer.WriteUint32("", 32, value.GetIndex(i).GetUint32()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case dataType == "ULINT" && numberOfValues == uint16(1) : // ULINT + // Simple Field (value) + if _err := writeBuffer.WriteUint64("value", 64, value.GetUint64()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataType == "ULINT" : // List + // Array Field (value) + for i := uint32(0); i < uint32(m.NumberOfValues); i++ { + _itemErr := writeBuffer.WriteUint64("", 64, value.GetIndex(i).GetUint64()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case dataType == "REAL" && numberOfValues == uint16(1) : // REAL + // Simple Field (value) + if _err := writeBuffer.WriteFloat32("value", 32, value.GetFloat32()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataType == "REAL" : // List + // Array Field (value) + for i := uint32(0); i < uint32(m.NumberOfValues); i++ { + _itemErr := writeBuffer.WriteFloat32("", 32, value.GetIndex(i).GetFloat32()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case dataType == "LREAL" && numberOfValues == uint16(1) : // LREAL + // Simple Field (value) + if _err := writeBuffer.WriteFloat64("value", 64, value.GetFloat64()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataType == "LREAL" : // List + // Array Field (value) + for i := uint32(0); i < uint32(m.NumberOfValues); i++ { + _itemErr := writeBuffer.WriteFloat64("", 64, value.GetIndex(i).GetFloat64()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case dataType == "CHAR" && numberOfValues == uint16(1) : // CHAR + // Simple Field (value) + if _err := writeBuffer.WriteString("value", uint32(8), "UTF-8", value.GetString()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataType == "CHAR" : // List + // Array Field (value) + for i := uint32(0); i < uint32(m.NumberOfValues); i++ { + _itemErr := writeBuffer.WriteString("", uint32(8), "UTF-8", value.GetIndex(i).GetString()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case dataType == "WCHAR" && numberOfValues == uint16(1) : // WCHAR + // Simple Field (value) + if _err := writeBuffer.WriteString("value", uint32(16), "UTF-16", value.GetString()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataType == "WCHAR" : // List + // Array Field (value) + for i := uint32(0); i < uint32(m.NumberOfValues); i++ { + _itemErr := writeBuffer.WriteString("", uint32(16), "UTF-16", value.GetIndex(i).GetString()) + if _itemErr != nil { + return errors.Wrap(_itemErr, "Error serializing 'value' field") + } + } +case dataType == "STRING" : // STRING + // Simple Field (value) + if _err := writeBuffer.WriteString("value", uint32(255), "UTF-8", value.GetString()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } +case dataType == "WSTRING" : // STRING + // Simple Field (value) + if _err := writeBuffer.WriteString("value", uint32(255), "UTF-16", value.GetString()); _err != nil { + return errors.Wrap(_err, "Error serializing 'value' field") + } + default: + // TODO: add more info which type it is actually + return errors.New("unsupported type") } writeBuffer.PopContext("DataItem") return nil } + + diff --git a/plc4go/protocols/simulated/readwrite/model/Dummy.go b/plc4go/protocols/simulated/readwrite/model/Dummy.go index 51180e7af45..a3e5089fa61 100644 --- a/plc4go/protocols/simulated/readwrite/model/Dummy.go +++ b/plc4go/protocols/simulated/readwrite/model/Dummy.go @@ -19,6 +19,7 @@ package model + import ( "context" "encoding/binary" @@ -26,7 +27,8 @@ import ( "github.com/pkg/errors" ) -// Code generated by code-generation. DO NOT EDIT. + // Code generated by code-generation. DO NOT EDIT. + // Dummy is the corresponding interface of Dummy type Dummy interface { @@ -45,9 +47,10 @@ type DummyExactly interface { // _Dummy is the data-structure of this message type _Dummy struct { - Dummy uint16 + Dummy uint16 } + /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////// Accessors for property fields. @@ -62,14 +65,15 @@ func (m *_Dummy) GetDummy() uint16 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// + // NewDummy factory function for _Dummy -func NewDummy(dummy uint16) *_Dummy { - return &_Dummy{Dummy: dummy} +func NewDummy( dummy uint16 ) *_Dummy { +return &_Dummy{ Dummy: dummy } } // Deprecated: use the interface for direct cast func CastDummy(structType interface{}) Dummy { - if casted, ok := structType.(Dummy); ok { + if casted, ok := structType.(Dummy); ok { return casted } if casted, ok := structType.(*Dummy); ok { @@ -86,11 +90,12 @@ func (m *_Dummy) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (dummy) - lengthInBits += 16 + lengthInBits += 16; return lengthInBits } + func (m *_Dummy) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } @@ -109,7 +114,7 @@ func DummyParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) (Dum _ = currentPos // Simple Field (dummy) - _dummy, _dummyErr := readBuffer.ReadUint16("dummy", 16) +_dummy, _dummyErr := readBuffer.ReadUint16("dummy", 16) if _dummyErr != nil { return nil, errors.Wrap(_dummyErr, "Error parsing 'dummy' field of Dummy") } @@ -121,8 +126,8 @@ func DummyParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) (Dum // Create the instance return &_Dummy{ - Dummy: dummy, - }, nil + Dummy: dummy, + }, nil } func (m *_Dummy) Serialize() ([]byte, error) { @@ -136,7 +141,7 @@ func (m *_Dummy) Serialize() ([]byte, error) { func (m *_Dummy) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware - if pushErr := writeBuffer.PushContext("Dummy"); pushErr != nil { + if pushErr :=writeBuffer.PushContext("Dummy"); pushErr != nil { return errors.Wrap(pushErr, "Error pushing for Dummy") } @@ -153,6 +158,7 @@ func (m *_Dummy) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils return nil } + func (m *_Dummy) isDummy() bool { return true } @@ -167,3 +173,6 @@ func (m *_Dummy) String() string { } return writeBuffer.GetBox().String() } + + + diff --git a/plc4go/protocols/simulated/readwrite/model/SimulatedDataTypeSizes.go b/plc4go/protocols/simulated/readwrite/model/SimulatedDataTypeSizes.go index 7ef46c90771..b7258f0dcd3 100644 --- a/plc4go/protocols/simulated/readwrite/model/SimulatedDataTypeSizes.go +++ b/plc4go/protocols/simulated/readwrite/model/SimulatedDataTypeSizes.go @@ -35,41 +35,41 @@ type ISimulatedDataTypeSizes interface { DataTypeSize() uint8 } -const ( - SimulatedDataTypeSizes_BOOL SimulatedDataTypeSizes = 1 - SimulatedDataTypeSizes_BYTE SimulatedDataTypeSizes = 2 - SimulatedDataTypeSizes_WORD SimulatedDataTypeSizes = 3 - SimulatedDataTypeSizes_DWORD SimulatedDataTypeSizes = 4 - SimulatedDataTypeSizes_LWORD SimulatedDataTypeSizes = 5 - SimulatedDataTypeSizes_SINT SimulatedDataTypeSizes = 6 - SimulatedDataTypeSizes_INT SimulatedDataTypeSizes = 7 - SimulatedDataTypeSizes_DINT SimulatedDataTypeSizes = 8 - SimulatedDataTypeSizes_LINT SimulatedDataTypeSizes = 9 - SimulatedDataTypeSizes_USINT SimulatedDataTypeSizes = 10 - SimulatedDataTypeSizes_UINT SimulatedDataTypeSizes = 11 - SimulatedDataTypeSizes_UDINT SimulatedDataTypeSizes = 12 - SimulatedDataTypeSizes_ULINT SimulatedDataTypeSizes = 13 - SimulatedDataTypeSizes_REAL SimulatedDataTypeSizes = 14 - SimulatedDataTypeSizes_LREAL SimulatedDataTypeSizes = 15 - SimulatedDataTypeSizes_TIME SimulatedDataTypeSizes = 16 - SimulatedDataTypeSizes_LTIME SimulatedDataTypeSizes = 17 - SimulatedDataTypeSizes_DATE SimulatedDataTypeSizes = 18 - SimulatedDataTypeSizes_LDATE SimulatedDataTypeSizes = 19 - SimulatedDataTypeSizes_TIME_OF_DAY SimulatedDataTypeSizes = 20 - SimulatedDataTypeSizes_LTIME_OF_DAY SimulatedDataTypeSizes = 21 - SimulatedDataTypeSizes_DATE_AND_TIME SimulatedDataTypeSizes = 22 +const( + SimulatedDataTypeSizes_BOOL SimulatedDataTypeSizes = 1 + SimulatedDataTypeSizes_BYTE SimulatedDataTypeSizes = 2 + SimulatedDataTypeSizes_WORD SimulatedDataTypeSizes = 3 + SimulatedDataTypeSizes_DWORD SimulatedDataTypeSizes = 4 + SimulatedDataTypeSizes_LWORD SimulatedDataTypeSizes = 5 + SimulatedDataTypeSizes_SINT SimulatedDataTypeSizes = 6 + SimulatedDataTypeSizes_INT SimulatedDataTypeSizes = 7 + SimulatedDataTypeSizes_DINT SimulatedDataTypeSizes = 8 + SimulatedDataTypeSizes_LINT SimulatedDataTypeSizes = 9 + SimulatedDataTypeSizes_USINT SimulatedDataTypeSizes = 10 + SimulatedDataTypeSizes_UINT SimulatedDataTypeSizes = 11 + SimulatedDataTypeSizes_UDINT SimulatedDataTypeSizes = 12 + SimulatedDataTypeSizes_ULINT SimulatedDataTypeSizes = 13 + SimulatedDataTypeSizes_REAL SimulatedDataTypeSizes = 14 + SimulatedDataTypeSizes_LREAL SimulatedDataTypeSizes = 15 + SimulatedDataTypeSizes_TIME SimulatedDataTypeSizes = 16 + SimulatedDataTypeSizes_LTIME SimulatedDataTypeSizes = 17 + SimulatedDataTypeSizes_DATE SimulatedDataTypeSizes = 18 + SimulatedDataTypeSizes_LDATE SimulatedDataTypeSizes = 19 + SimulatedDataTypeSizes_TIME_OF_DAY SimulatedDataTypeSizes = 20 + SimulatedDataTypeSizes_LTIME_OF_DAY SimulatedDataTypeSizes = 21 + SimulatedDataTypeSizes_DATE_AND_TIME SimulatedDataTypeSizes = 22 SimulatedDataTypeSizes_LDATE_AND_TIME SimulatedDataTypeSizes = 23 - SimulatedDataTypeSizes_CHAR SimulatedDataTypeSizes = 24 - SimulatedDataTypeSizes_WCHAR SimulatedDataTypeSizes = 25 - SimulatedDataTypeSizes_STRING SimulatedDataTypeSizes = 26 - SimulatedDataTypeSizes_WSTRING SimulatedDataTypeSizes = 27 + SimulatedDataTypeSizes_CHAR SimulatedDataTypeSizes = 24 + SimulatedDataTypeSizes_WCHAR SimulatedDataTypeSizes = 25 + SimulatedDataTypeSizes_STRING SimulatedDataTypeSizes = 26 + SimulatedDataTypeSizes_WSTRING SimulatedDataTypeSizes = 27 ) var SimulatedDataTypeSizesValues []SimulatedDataTypeSizes func init() { _ = errors.New - SimulatedDataTypeSizesValues = []SimulatedDataTypeSizes{ + SimulatedDataTypeSizesValues = []SimulatedDataTypeSizes { SimulatedDataTypeSizes_BOOL, SimulatedDataTypeSizes_BYTE, SimulatedDataTypeSizes_WORD, @@ -100,118 +100,91 @@ func init() { } } + func (e SimulatedDataTypeSizes) DataTypeSize() uint8 { - switch e { - case 1: - { /* '1' */ - return 1 + switch e { + case 1: { /* '1' */ + return 1 } - case 10: - { /* '10' */ - return 1 + case 10: { /* '10' */ + return 1 } - case 11: - { /* '11' */ - return 2 + case 11: { /* '11' */ + return 2 } - case 12: - { /* '12' */ - return 4 + case 12: { /* '12' */ + return 4 } - case 13: - { /* '13' */ - return 8 + case 13: { /* '13' */ + return 8 } - case 14: - { /* '14' */ - return 4 + case 14: { /* '14' */ + return 4 } - case 15: - { /* '15' */ - return 8 + case 15: { /* '15' */ + return 8 } - case 16: - { /* '16' */ - return 8 + case 16: { /* '16' */ + return 8 } - case 17: - { /* '17' */ - return 8 + case 17: { /* '17' */ + return 8 } - case 18: - { /* '18' */ - return 8 + case 18: { /* '18' */ + return 8 } - case 19: - { /* '19' */ - return 8 + case 19: { /* '19' */ + return 8 } - case 2: - { /* '2' */ - return 1 + case 2: { /* '2' */ + return 1 } - case 20: - { /* '20' */ - return 8 + case 20: { /* '20' */ + return 8 } - case 21: - { /* '21' */ - return 8 + case 21: { /* '21' */ + return 8 } - case 22: - { /* '22' */ - return 8 + case 22: { /* '22' */ + return 8 } - case 23: - { /* '23' */ - return 8 + case 23: { /* '23' */ + return 8 } - case 24: - { /* '24' */ - return 1 + case 24: { /* '24' */ + return 1 } - case 25: - { /* '25' */ - return 2 + case 25: { /* '25' */ + return 2 } - case 26: - { /* '26' */ - return 255 + case 26: { /* '26' */ + return 255 } - case 27: - { /* '27' */ - return 127 + case 27: { /* '27' */ + return 127 } - case 3: - { /* '3' */ - return 2 + case 3: { /* '3' */ + return 2 } - case 4: - { /* '4' */ - return 4 + case 4: { /* '4' */ + return 4 } - case 5: - { /* '5' */ - return 8 + case 5: { /* '5' */ + return 8 } - case 6: - { /* '6' */ - return 1 + case 6: { /* '6' */ + return 1 } - case 7: - { /* '7' */ - return 2 + case 7: { /* '7' */ + return 2 } - case 8: - { /* '8' */ - return 4 + case 8: { /* '8' */ + return 4 } - case 9: - { /* '9' */ - return 8 + case 9: { /* '9' */ + return 8 } - default: - { + default: { return 0 } } @@ -227,60 +200,60 @@ func SimulatedDataTypeSizesFirstEnumForFieldDataTypeSize(value uint8) (Simulated } func SimulatedDataTypeSizesByValue(value uint8) (enum SimulatedDataTypeSizes, ok bool) { switch value { - case 1: - return SimulatedDataTypeSizes_BOOL, true - case 10: - return SimulatedDataTypeSizes_USINT, true - case 11: - return SimulatedDataTypeSizes_UINT, true - case 12: - return SimulatedDataTypeSizes_UDINT, true - case 13: - return SimulatedDataTypeSizes_ULINT, true - case 14: - return SimulatedDataTypeSizes_REAL, true - case 15: - return SimulatedDataTypeSizes_LREAL, true - case 16: - return SimulatedDataTypeSizes_TIME, true - case 17: - return SimulatedDataTypeSizes_LTIME, true - case 18: - return SimulatedDataTypeSizes_DATE, true - case 19: - return SimulatedDataTypeSizes_LDATE, true - case 2: - return SimulatedDataTypeSizes_BYTE, true - case 20: - return SimulatedDataTypeSizes_TIME_OF_DAY, true - case 21: - return SimulatedDataTypeSizes_LTIME_OF_DAY, true - case 22: - return SimulatedDataTypeSizes_DATE_AND_TIME, true - case 23: - return SimulatedDataTypeSizes_LDATE_AND_TIME, true - case 24: - return SimulatedDataTypeSizes_CHAR, true - case 25: - return SimulatedDataTypeSizes_WCHAR, true - case 26: - return SimulatedDataTypeSizes_STRING, true - case 27: - return SimulatedDataTypeSizes_WSTRING, true - case 3: - return SimulatedDataTypeSizes_WORD, true - case 4: - return SimulatedDataTypeSizes_DWORD, true - case 5: - return SimulatedDataTypeSizes_LWORD, true - case 6: - return SimulatedDataTypeSizes_SINT, true - case 7: - return SimulatedDataTypeSizes_INT, true - case 8: - return SimulatedDataTypeSizes_DINT, true - case 9: - return SimulatedDataTypeSizes_LINT, true + case 1: + return SimulatedDataTypeSizes_BOOL, true + case 10: + return SimulatedDataTypeSizes_USINT, true + case 11: + return SimulatedDataTypeSizes_UINT, true + case 12: + return SimulatedDataTypeSizes_UDINT, true + case 13: + return SimulatedDataTypeSizes_ULINT, true + case 14: + return SimulatedDataTypeSizes_REAL, true + case 15: + return SimulatedDataTypeSizes_LREAL, true + case 16: + return SimulatedDataTypeSizes_TIME, true + case 17: + return SimulatedDataTypeSizes_LTIME, true + case 18: + return SimulatedDataTypeSizes_DATE, true + case 19: + return SimulatedDataTypeSizes_LDATE, true + case 2: + return SimulatedDataTypeSizes_BYTE, true + case 20: + return SimulatedDataTypeSizes_TIME_OF_DAY, true + case 21: + return SimulatedDataTypeSizes_LTIME_OF_DAY, true + case 22: + return SimulatedDataTypeSizes_DATE_AND_TIME, true + case 23: + return SimulatedDataTypeSizes_LDATE_AND_TIME, true + case 24: + return SimulatedDataTypeSizes_CHAR, true + case 25: + return SimulatedDataTypeSizes_WCHAR, true + case 26: + return SimulatedDataTypeSizes_STRING, true + case 27: + return SimulatedDataTypeSizes_WSTRING, true + case 3: + return SimulatedDataTypeSizes_WORD, true + case 4: + return SimulatedDataTypeSizes_DWORD, true + case 5: + return SimulatedDataTypeSizes_LWORD, true + case 6: + return SimulatedDataTypeSizes_SINT, true + case 7: + return SimulatedDataTypeSizes_INT, true + case 8: + return SimulatedDataTypeSizes_DINT, true + case 9: + return SimulatedDataTypeSizes_LINT, true } return 0, false } @@ -345,13 +318,13 @@ func SimulatedDataTypeSizesByName(value string) (enum SimulatedDataTypeSizes, ok return 0, false } -func SimulatedDataTypeSizesKnows(value uint8) bool { +func SimulatedDataTypeSizesKnows(value uint8) bool { for _, typeValue := range SimulatedDataTypeSizesValues { if uint8(typeValue) == value { return true } } - return false + return false; } func CastSimulatedDataTypeSizes(structType interface{}) SimulatedDataTypeSizes { @@ -465,3 +438,4 @@ func (e SimulatedDataTypeSizes) PLC4XEnumName() string { func (e SimulatedDataTypeSizes) String() string { return e.PLC4XEnumName() } + diff --git a/plc4go/protocols/simulated/readwrite/model/plc4x_common.go b/plc4go/protocols/simulated/readwrite/model/plc4x_common.go index d2d66e8bdd3..42166d94e68 100644 --- a/plc4go/protocols/simulated/readwrite/model/plc4x_common.go +++ b/plc4go/protocols/simulated/readwrite/model/plc4x_common.go @@ -15,7 +15,7 @@ * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - */ +*/ package model @@ -25,3 +25,4 @@ import "github.com/rs/zerolog/log" // Plc4xModelLog is the Logger used by the Parse/Serialize methods var Plc4xModelLog = &log.Logger + diff --git a/plc4go/spi/testutils/steptype_string.go b/plc4go/spi/testutils/steptype_string.go index c99ce3e0f57..8506728bb43 100644 --- a/plc4go/spi/testutils/steptype_string.go +++ b/plc4go/spi/testutils/steptype_string.go @@ -1,20 +1,3 @@ -// Licensed to Apache Software Foundation (ASF) under one or more contributor -// license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright -// ownership. Apache Software Foundation (ASF) licenses this file to you under -// the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - // Code generated by "stringer -type StepType"; DO NOT EDIT. package testutils diff --git a/plc4j/api/src/main/java/org/apache/plc4x/java/api/model/PlcTag.java b/plc4j/api/src/main/java/org/apache/plc4x/java/api/model/PlcTag.java index 5cdbd794a6a..c26c2942c5a 100644 --- a/plc4j/api/src/main/java/org/apache/plc4x/java/api/model/PlcTag.java +++ b/plc4j/api/src/main/java/org/apache/plc4x/java/api/model/PlcTag.java @@ -46,6 +46,14 @@ public interface PlcTag { * @return Address string representing this Tag */ String getAddressString(); + /** + * Returns the number of elements, that this tag would be parsed from. + * + * @return the number of elements representing this Tag + */ + default int getNumberOfElements(){ + return 1; + } /** * Returns the "datatype" of the response one can expect from this tag. @@ -62,6 +70,9 @@ public interface PlcTag { default PlcValueType getPlcValueType() { return PlcValueType.NULL; } + @JsonIgnore + default void setPlcValueType(PlcValueType plcValueType){ + } /** * Returns the number of elements to expect of the response one can expect from this field. diff --git a/plc4j/drivers/opcua/src/main/generated/org/apache/plc4x/java/opcua/readwrite/ExtensionObjectDefinition.java b/plc4j/drivers/opcua/src/main/generated/org/apache/plc4x/java/opcua/readwrite/ExtensionObjectDefinition.java index 0bd5d0e1ebe..b69a55a9b34 100644 --- a/plc4j/drivers/opcua/src/main/generated/org/apache/plc4x/java/opcua/readwrite/ExtensionObjectDefinition.java +++ b/plc4j/drivers/opcua/src/main/generated/org/apache/plc4x/java/opcua/readwrite/ExtensionObjectDefinition.java @@ -227,10 +227,6 @@ public static ExtensionObjectDefinition staticParse(ReadBuffer readBuffer, Strin } else if (EvaluationHelper.equals(identifier, (String) "23470")) { builder = AliasNameDataType.staticParseExtensionObjectDefinitionBuilder(readBuffer, identifier); - } else if (EvaluationHelper.equals(identifier, (String) "24109")) { - builder = - UnsignedRationalNumber.staticParseExtensionObjectDefinitionBuilder( - readBuffer, identifier); } else if (EvaluationHelper.equals(identifier, (String) "98")) { builder = RolePermissionType.staticParseExtensionObjectDefinitionBuilder(readBuffer, identifier); @@ -770,7 +766,7 @@ public static ExtensionObjectDefinition staticParse(ReadBuffer readBuffer, Strin builder = ProgramDiagnosticDataType.staticParseExtensionObjectDefinitionBuilder( readBuffer, identifier); - } else if (EvaluationHelper.equals(identifier, (String) "24035")) { + } else if (EvaluationHelper.equals(identifier, (String) "15398")) { builder = ProgramDiagnostic2DataType.staticParseExtensionObjectDefinitionBuilder( readBuffer, identifier); diff --git a/plc4j/drivers/opcua/src/main/generated/org/apache/plc4x/java/opcua/readwrite/OpcuaStatusCode.java b/plc4j/drivers/opcua/src/main/generated/org/apache/plc4x/java/opcua/readwrite/OpcuaStatusCode.java index d5b44358304..66c27e68bfa 100644 --- a/plc4j/drivers/opcua/src/main/generated/org/apache/plc4x/java/opcua/readwrite/OpcuaStatusCode.java +++ b/plc4j/drivers/opcua/src/main/generated/org/apache/plc4x/java/opcua/readwrite/OpcuaStatusCode.java @@ -273,18 +273,7 @@ public enum OpcuaStatusCode { BadExpectedStreamToBlock((long) 0x80B40000L), BadWouldBlock((long) 0x80B50000L), BadSyntaxError((long) 0x80B60000L), - BadMaxConnectionsReached((long) 0x80B70000L), - UncertainTransducerInManual((long) 0x42080000L), - UncertainSimulatedValue((long) 0x42090000L), - UncertainSensorCalibration((long) 0x420A0000L), - UncertainConfigurationError((long) 0x420F0000L), - GoodCascadeInitializationAcknowledged((long) 0x04010000L), - GoodCascadeInitializationRequest((long) 0x04020000L), - GoodCascadeNotInvited((long) 0x04030000L), - GoodCascadeNotSelected((long) 0x04040000L), - GoodFaultStateActive((long) 0x04070000L), - GoodInitiateFaultState((long) 0x04080000L), - GoodCascade((long) 0x04090000L); + BadMaxConnectionsReached((long) 0x80B70000L); private static final Map map; static { diff --git a/plc4j/drivers/opcua/src/main/generated/org/apache/plc4x/java/opcua/readwrite/ProgramDiagnostic2DataType.java b/plc4j/drivers/opcua/src/main/generated/org/apache/plc4x/java/opcua/readwrite/ProgramDiagnostic2DataType.java index bec37d01dd2..f838a87d877 100644 --- a/plc4j/drivers/opcua/src/main/generated/org/apache/plc4x/java/opcua/readwrite/ProgramDiagnostic2DataType.java +++ b/plc4j/drivers/opcua/src/main/generated/org/apache/plc4x/java/opcua/readwrite/ProgramDiagnostic2DataType.java @@ -39,7 +39,7 @@ public class ProgramDiagnostic2DataType extends ExtensionObjectDefinition implem // Accessors for discriminator values. public String getIdentifier() { - return (String) "24035"; + return (String) "15398"; } // Properties. diff --git a/plc4j/drivers/s7/src/main/generated/org/apache/plc4x/java/s7/readwrite/DataItem.java b/plc4j/drivers/s7/src/main/generated/org/apache/plc4x/java/s7/readwrite/DataItem.java index 7c5fb803efa..2db355b2dbd 100644 --- a/plc4j/drivers/s7/src/main/generated/org/apache/plc4x/java/s7/readwrite/DataItem.java +++ b/plc4j/drivers/s7/src/main/generated/org/apache/plc4x/java/s7/readwrite/DataItem.java @@ -24,7 +24,6 @@ import java.time.*; import java.util.*; import org.apache.plc4x.java.api.value.*; -import org.apache.plc4x.java.spi.codegen.WithOption; import org.apache.plc4x.java.spi.generation.ByteOrder; import org.apache.plc4x.java.spi.generation.EvaluationHelper; import org.apache.plc4x.java.spi.generation.ParseException; @@ -42,7 +41,8 @@ public class DataItem { private static final Logger LOGGER = LoggerFactory.getLogger(DataItem.class); public static PlcValue staticParse( - ReadBuffer readBuffer, String dataProtocolId, Integer stringLength) throws ParseException { + ReadBuffer readBuffer, String dataProtocolId, Integer stringLength, String stringEncoding) + throws ParseException { if (EvaluationHelper.equals(dataProtocolId, "IEC61131_BOOL")) { // BOOL // Reserved Field (Compartmentalized so the "reserved" variable can't leak) @@ -147,16 +147,20 @@ public static PlcValue staticParse( return new PlcLREAL(value); } else if (EvaluationHelper.equals(dataProtocolId, "IEC61131_CHAR")) { // CHAR - // Simple Field (value) - String value = /*TODO: migrate me*/ /*TODO: migrate me*/ - readBuffer.readString("", 8, WithOption.WithEncoding("UTF-8")); + // Manual Field (value) + String value = + (String) + (org.apache.plc4x.java.s7.readwrite.utils.StaticHelper.parseS7Char( + readBuffer, "UTF-8", stringEncoding)); return new PlcCHAR(value); } else if (EvaluationHelper.equals(dataProtocolId, "IEC61131_WCHAR")) { // CHAR - // Simple Field (value) - String value = /*TODO: migrate me*/ /*TODO: migrate me*/ - readBuffer.readString("", 16, WithOption.WithEncoding("UTF-16")); + // Manual Field (value) + String value = + (String) + (org.apache.plc4x.java.s7.readwrite.utils.StaticHelper.parseS7Char( + readBuffer, "UTF-16", stringEncoding)); return new PlcCHAR(value); } else if (EvaluationHelper.equals(dataProtocolId, "IEC61131_STRING")) { // STRING @@ -165,7 +169,7 @@ public static PlcValue staticParse( String value = (String) (org.apache.plc4x.java.s7.readwrite.utils.StaticHelper.parseS7String( - readBuffer, stringLength, "UTF-8")); + readBuffer, stringLength, "UTF-8", stringEncoding)); return new PlcSTRING(value); } else if (EvaluationHelper.equals(dataProtocolId, "IEC61131_WSTRING")) { // STRING @@ -174,7 +178,7 @@ public static PlcValue staticParse( String value = (String) (org.apache.plc4x.java.s7.readwrite.utils.StaticHelper.parseS7String( - readBuffer, stringLength, "UTF-16")); + readBuffer, stringLength, "UTF-16", stringEncoding)); return new PlcSTRING(value); } else if (EvaluationHelper.equals(dataProtocolId, "IEC61131_TIME")) { // TIME @@ -253,9 +257,14 @@ public static PlcValue staticParse( } public static void staticSerialize( - WriteBuffer writeBuffer, PlcValue _value, String dataProtocolId, Integer stringLength) + WriteBuffer writeBuffer, + PlcValue _value, + String dataProtocolId, + Integer stringLength, + String stringEncoding) throws SerializationException { - staticSerialize(writeBuffer, _value, dataProtocolId, stringLength, ByteOrder.BIG_ENDIAN); + staticSerialize( + writeBuffer, _value, dataProtocolId, stringLength, stringEncoding, ByteOrder.BIG_ENDIAN); } public static void staticSerialize( @@ -263,6 +272,7 @@ public static void staticSerialize( PlcValue _value, String dataProtocolId, Integer stringLength, + String stringEncoding, ByteOrder byteOrder) throws SerializationException { if (EvaluationHelper.equals(dataProtocolId, "IEC61131_BOOL")) { // BOOL @@ -345,25 +355,21 @@ public static void staticSerialize( /*TODO: migrate me*/ /*TODO: migrate me*/ writeBuffer.writeDouble("", 64, (value)); } else if (EvaluationHelper.equals(dataProtocolId, "IEC61131_CHAR")) { // CHAR - // Simple Field (value) - String value = (String) _value.getString(); - /*TODO: migrate me*/ - /*TODO: migrate me*/ writeBuffer.writeString( - "", 8, (String) (value), WithOption.WithEncoding("UTF-8")); + // Manual Field (value) + org.apache.plc4x.java.s7.readwrite.utils.StaticHelper.serializeS7Char( + writeBuffer, _value, "UTF-8", stringEncoding); } else if (EvaluationHelper.equals(dataProtocolId, "IEC61131_WCHAR")) { // CHAR - // Simple Field (value) - String value = (String) _value.getString(); - /*TODO: migrate me*/ - /*TODO: migrate me*/ writeBuffer.writeString( - "", 16, (String) (value), WithOption.WithEncoding("UTF-16")); + // Manual Field (value) + org.apache.plc4x.java.s7.readwrite.utils.StaticHelper.serializeS7Char( + writeBuffer, _value, "UTF-16", stringEncoding); } else if (EvaluationHelper.equals(dataProtocolId, "IEC61131_STRING")) { // STRING // Manual Field (value) org.apache.plc4x.java.s7.readwrite.utils.StaticHelper.serializeS7String( - writeBuffer, _value, stringLength, "UTF-8"); + writeBuffer, _value, stringLength, "UTF-8", stringEncoding); } else if (EvaluationHelper.equals(dataProtocolId, "IEC61131_WSTRING")) { // STRING // Manual Field (value) org.apache.plc4x.java.s7.readwrite.utils.StaticHelper.serializeS7String( - writeBuffer, _value, stringLength, "UTF-16"); + writeBuffer, _value, stringLength, "UTF-16", stringEncoding); } else if (EvaluationHelper.equals(dataProtocolId, "IEC61131_TIME")) { // TIME // Simple Field (milliseconds) long milliseconds = (long) _value.getLong(); @@ -431,11 +437,15 @@ public static void staticSerialize( } } - public static int getLengthInBytes(PlcValue _value, String dataProtocolId, Integer stringLength) { - return (int) Math.ceil((float) getLengthInBits(_value, dataProtocolId, stringLength) / 8.0); + public static int getLengthInBytes( + PlcValue _value, String dataProtocolId, Integer stringLength, String stringEncoding) { + return (int) + Math.ceil( + (float) getLengthInBits(_value, dataProtocolId, stringLength, stringEncoding) / 8.0); } - public static int getLengthInBits(PlcValue _value, String dataProtocolId, Integer stringLength) { + public static int getLengthInBits( + PlcValue _value, String dataProtocolId, Integer stringLength, String stringEncoding) { int sizeInBits = 0; if (EvaluationHelper.equals(dataProtocolId, "IEC61131_BOOL")) { // BOOL // Reserved Field @@ -485,17 +495,17 @@ public static int getLengthInBits(PlcValue _value, String dataProtocolId, Intege // Simple Field (value) sizeInBits += 64; } else if (EvaluationHelper.equals(dataProtocolId, "IEC61131_CHAR")) { // CHAR - // Simple Field (value) + // Manual Field (value) sizeInBits += 8; } else if (EvaluationHelper.equals(dataProtocolId, "IEC61131_WCHAR")) { // CHAR - // Simple Field (value) + // Manual Field (value) sizeInBits += 16; } else if (EvaluationHelper.equals(dataProtocolId, "IEC61131_STRING")) { // STRING // Manual Field (value) - sizeInBits += (STR_LEN(_value)) + (2); + sizeInBits += (((stringLength) + (2))) * (8); } else if (EvaluationHelper.equals(dataProtocolId, "IEC61131_WSTRING")) { // STRING // Manual Field (value) - sizeInBits += (((STR_LEN(_value)) * (2))) + (2); + sizeInBits += (((stringLength) + (2))) * (16); } else if (EvaluationHelper.equals(dataProtocolId, "IEC61131_TIME")) { // TIME // Simple Field (milliseconds) sizeInBits += 32; diff --git a/plc4j/drivers/s7/src/main/generated/org/apache/plc4x/java/s7/readwrite/TransportSize.java b/plc4j/drivers/s7/src/main/generated/org/apache/plc4x/java/s7/readwrite/TransportSize.java index 4b70936705e..a6ea4032f0a 100644 --- a/plc4j/drivers/s7/src/main/generated/org/apache/plc4x/java/s7/readwrite/TransportSize.java +++ b/plc4j/drivers/s7/src/main/generated/org/apache/plc4x/java/s7/readwrite/TransportSize.java @@ -179,9 +179,9 @@ public enum TransportSize { (boolean) false, (short) 'X', (boolean) true, - null, + DataTransportSize.BYTE_WORD_DWORD, (String) "IEC61131_LINT", - TransportSize.INT), + null), ULINT( (short) 0x0D, (boolean) false, @@ -192,9 +192,9 @@ public enum TransportSize { (boolean) false, (short) 'X', (boolean) true, - null, + DataTransportSize.BYTE_WORD_DWORD, (String) "IEC61131_ULINT", - TransportSize.INT), + null), REAL( (short) 0x0E, (boolean) true, @@ -205,7 +205,7 @@ public enum TransportSize { (boolean) true, (short) 'D', (boolean) true, - DataTransportSize.REAL, + DataTransportSize.BYTE_WORD_DWORD, (String) "IEC61131_REAL", null), LREAL( @@ -218,7 +218,7 @@ public enum TransportSize { (boolean) true, (short) 'X', (boolean) true, - null, + DataTransportSize.BYTE_WORD_DWORD, (String) "IEC61131_LREAL", TransportSize.REAL), CHAR( @@ -244,7 +244,7 @@ public enum TransportSize { (boolean) true, (short) 'X', (boolean) true, - null, + DataTransportSize.BYTE_WORD_DWORD, (String) "IEC61131_WCHAR", null), STRING( @@ -270,7 +270,7 @@ public enum TransportSize { (boolean) true, (short) 'X', (boolean) true, - null, + DataTransportSize.BYTE_WORD_DWORD, (String) "IEC61131_WSTRING", null), TIME( diff --git a/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/configuration/S7Configuration.java b/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/configuration/S7Configuration.java index 55c50bd0d69..28a77b62470 100644 --- a/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/configuration/S7Configuration.java +++ b/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/configuration/S7Configuration.java @@ -25,19 +25,25 @@ import org.apache.plc4x.java.transport.tcp.TcpTransportConfiguration; public class S7Configuration implements Configuration, TcpTransportConfiguration { + @ConfigurationParameter("local-group") + @IntDefaultValue(3) + public int localGroup = 3; @ConfigurationParameter("local-rack") @IntDefaultValue(1) public int localRack = 1; - @ConfigurationParameter("local-slot") - @IntDefaultValue(1) - public int localSlot = 1; - @ConfigurationParameter("local-tsap") @IntDefaultValue(0) public int localTsap = 0; + @ConfigurationParameter("local-slot") + @IntDefaultValue(1) + public int localSlot = 1; + + @ConfigurationParameter("remote-group") + @IntDefaultValue(1) + public int remoteGroup = 1; @ConfigurationParameter("remote-rack") @IntDefaultValue(0) public int remoteRack = 0; @@ -65,6 +71,31 @@ public class S7Configuration implements Configuration, TcpTransportConfiguration @ConfigurationParameter("controller-type") public String controllerType; + @ConfigurationParameter("timeout-request") + @IntDefaultValue(4000) + protected int timeoutRequest; + public int getLocalGroup() { + return localGroup; + } + + public void setLocalGroup(int localGroup) { + this.localGroup = localGroup; + } + public int getLocalTsap() { + return localTsap; + } + + public void setLocalTsap(int localTsap) { + this.localTsap = localTsap; + } + public int getRemoteGroup() { + return remoteGroup; + } + + public void setRemoteGroup(int remoteGroup) { + this.remoteGroup = remoteGroup; + } + public int getLocalRack() { return localRack; } @@ -81,14 +112,6 @@ public void setLocalSlot(int localSlot) { this.localSlot = localSlot; } - public int getLocalTsap() { - return localTsap; - } - - public void setLocalTsap(int localTsap) { - this.localTsap = localTsap; - } - public int getRemoteRack() { return remoteRack; } @@ -144,7 +167,13 @@ public String getControllerType() { public void setControllerType(String controllerType) { this.controllerType = controllerType; } + public int getTimeoutRequest() { + return timeoutRequest; + } + public void setTimeoutRequest(int timeoutRequest) { + this.timeoutRequest = timeoutRequest; + } /** * Per default port for the S7 protocol is 102. * @return 102 @@ -158,15 +187,18 @@ public int getDefaultPort() { public String toString() { return "Configuration{" + "local-rack=" + localRack + + ", local-group=" + localGroup + ", local-slot=" + localSlot + ", local-tsap=" + localTsap + + ", remote-group=" + remoteGroup + ", remote-rack=" + remoteRack + ", remote-slot=" + remoteSlot + ", remote-tsap=" + remoteTsap + ", pduSize=" + pduSize + ", maxAmqCaller=" + maxAmqCaller + ", maxAmqCallee=" + maxAmqCallee + - ", controllerType='" + controllerType + '\'' + + ", controllerType='" + controllerType + + ", timeoutRequest='" + timeoutRequest + '\'' + '}'; } diff --git a/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/context/S7DriverContext.java b/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/context/S7DriverContext.java index 7b40d9b3d18..25edebf8115 100644 --- a/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/context/S7DriverContext.java +++ b/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/context/S7DriverContext.java @@ -39,9 +39,9 @@ public class S7DriverContext implements DriverContext, HasConfiguration 0) { diff --git a/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/optimizer/S7Optimizer.java b/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/optimizer/S7Optimizer.java index 120c96ee698..13035eaa8b6 100644 --- a/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/optimizer/S7Optimizer.java +++ b/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/optimizer/S7Optimizer.java @@ -24,6 +24,7 @@ import org.apache.plc4x.java.api.value.PlcValue; import org.apache.plc4x.java.s7.readwrite.*; import org.apache.plc4x.java.s7.readwrite.context.S7DriverContext; +import org.apache.plc4x.java.s7.readwrite.tag.S7StringTag; import org.apache.plc4x.java.s7.readwrite.tag.S7Tag; import org.apache.plc4x.java.s7.readwrite.MemoryArea; import org.apache.plc4x.java.s7.readwrite.TransportSize; @@ -65,7 +66,12 @@ protected List processReadRequest(PlcReadRequest readRequest, Driver S7Tag tag = (S7Tag) readRequest.getTag(tagName); int readRequestItemSize = S7_ADDRESS_ANY_SIZE; - int readResponseItemSize = 4 + (tag.getNumberOfElements() * tag.getDataType().getSizeInBytes()); + int length = 1; + if(tag instanceof S7StringTag) + { + length = (((S7StringTag)tag).getStringLength() +2) * 8; + } + int readResponseItemSize = 4 + (tag.getNumberOfElements() * tag.getDataType().getSizeInBytes() * length); // If it's an odd number of bytes, add one to make it even if (readResponseItemSize % 2 == 1) { readResponseItemSize++; @@ -83,8 +89,10 @@ protected List processReadRequest(PlcReadRequest readRequest, Driver // If they would exceed, start a new request. else { // Create a new PlcReadRequest containing the current tag item. - processedRequests.add(new DefaultPlcReadRequest( - ((DefaultPlcReadRequest) readRequest).getReader(), curTags)); + if(!curTags.isEmpty()) { + processedRequests.add(new DefaultPlcReadRequest( + ((DefaultPlcReadRequest) readRequest).getReader(), curTags)); + } // Reset the size and item lists. curRequestSize = EMPTY_READ_REQUEST_SIZE + readRequestItemSize; @@ -130,7 +138,12 @@ protected List processWriteRequest(PlcWriteRequest writeRequest, Dri if (tag.getDataType() == TransportSize.BOOL) { writeRequestItemSize += Math.ceil((double) tag.getNumberOfElements() / 8); } else { - writeRequestItemSize += (tag.getNumberOfElements() * tag.getDataType().getSizeInBytes()); + int length = 1; + if(tag instanceof S7StringTag) + { + length = (((S7StringTag)tag).getStringLength() + 2) * 8; + } + writeRequestItemSize += (tag.getNumberOfElements() * tag.getDataType().getSizeInBytes() * length); } // If it's an odd number of bytes, add one to make it even if (writeRequestItemSize % 2 == 1) { @@ -150,8 +163,10 @@ protected List processWriteRequest(PlcWriteRequest writeRequest, Dri // If adding them would exceed, start a new request. else { // Create a new PlcWriteRequest containing the current tag item. - processedRequests.add(new DefaultPlcWriteRequest( - ((DefaultPlcWriteRequest) writeRequest).getWriter(), curTags)); + if(!curTags.isEmpty()) { + processedRequests.add(new DefaultPlcWriteRequest( + ((DefaultPlcWriteRequest) writeRequest).getWriter(), curTags)); + } // Reset the size and item lists. curRequestSize = EMPTY_WRITE_REQUEST_SIZE + writeRequestItemSize; diff --git a/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/protocol/S7ProtocolEventLogic.java b/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/protocol/S7ProtocolEventLogic.java index a46b496bdba..04828519a30 100644 --- a/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/protocol/S7ProtocolEventLogic.java +++ b/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/protocol/S7ProtocolEventLogic.java @@ -73,7 +73,7 @@ public S7ProtocolEventLogic(BlockingQueue eventqueue) { public void start() { processor.start(); - dispacher.start(); + dispacher.start(); } public void stop(){ @@ -154,7 +154,7 @@ public void run() { Logger.getLogger(S7ProtocolEventLogic.class.getName()).log(Level.SEVERE, null, ex); } } - System.out.println("ObjectProcessor Bye!"); + logger.debug("ObjectProcessor Bye!"); } public void doShutdown(){ @@ -203,7 +203,7 @@ public void run() { Logger.getLogger(S7ProtocolEventLogic.class.getName()).log(Level.SEVERE, null, ex); } } - System.out.println("EventDispacher Bye!"); + logger.debug("EventDispacher Bye!"); } public void doShutdown(){ diff --git a/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/protocol/S7ProtocolLogic.java b/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/protocol/S7ProtocolLogic.java index eb3ed7afedd..f6964eda23b 100644 --- a/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/protocol/S7ProtocolLogic.java +++ b/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/protocol/S7ProtocolLogic.java @@ -19,6 +19,7 @@ package org.apache.plc4x.java.s7.readwrite.protocol; import org.apache.plc4x.java.api.model.PlcTag; +import org.apache.plc4x.java.s7.readwrite.configuration.S7Configuration; import org.apache.plc4x.java.s7.readwrite.utils.S7PlcSubscriptionHandle; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; @@ -30,6 +31,7 @@ import org.apache.plc4x.java.api.messages.PlcWriteRequest; import org.apache.plc4x.java.api.messages.PlcWriteResponse; import org.apache.plc4x.java.api.types.PlcResponseCode; +import org.apache.plc4x.java.spi.configuration.HasConfiguration; import org.apache.plc4x.java.spi.generation.*; import org.apache.plc4x.java.spi.model.DefaultPlcSubscriptionTag; import org.apache.plc4x.java.spi.values.PlcNull; @@ -58,15 +60,11 @@ import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.BlockingQueue; import java.util.concurrent.CompletableFuture; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicInteger; import java.util.function.BiConsumer; import java.util.function.Consumer; import java.util.stream.IntStream; -import org.apache.commons.lang3.concurrent.BasicThreadFactory; -import org.apache.commons.lang3.tuple.MutablePair; import org.apache.plc4x.java.api.messages.PlcSubscriptionRequest; import org.apache.plc4x.java.api.messages.PlcSubscriptionResponse; @@ -83,22 +81,12 @@ * So we need to limit those. * Thus, each request goes to a Work Queue and this Queue ensures, that only 3 are open at the same time. */ -public class S7ProtocolLogic extends Plc4xProtocolBase { - - public static final Duration REQUEST_TIMEOUT = Duration.ofMillis(10000); +public class S7ProtocolLogic extends Plc4xProtocolBase implements HasConfiguration { private final Logger logger = LoggerFactory.getLogger(S7ProtocolLogic.class); - private final AtomicInteger tpduGenerator = new AtomicInteger(10); - - /* - * Task group for managing connection redundancy. - */ - private ExecutorService clientExecutorService = Executors.newFixedThreadPool(4, new BasicThreadFactory.Builder() - .namingPattern("plc4x-app-thread-%d") - .daemon(true) - .priority(Thread.MAX_PRIORITY) - .build()); - + private final AtomicInteger tpduGenerator = new AtomicInteger(1); + + private S7Configuration configuration; /* * Take into account that the size of this buffer depends on the final device. * S7-300 goes from 20 to 300 and for S7-400 it goes from 300 to 10000. @@ -114,17 +102,6 @@ public class S7ProtocolLogic extends Plc4xProtocolBase { private final S7PlcSubscriptionHandle usrHandle = new S7PlcSubscriptionHandle(EventType.USR, EventLogic); private final S7PlcSubscriptionHandle almHandle = new S7PlcSubscriptionHandle(EventType.ALM, EventLogic); - /* - * For the reconnection functionality by a "TimeOut" of the connection, - * you must keep track of open transactions. In general, an S7 device - * supports a couple of simultaneous requests. - * The rhythm of execution must be determined by the TransactionManager. - * So far it is the way to indicate to the user that he must redo - * his request. - */ - private HashMap> active_requests = new HashMap<>(); - - private S7DriverContext s7DriverContext; private RequestTransactionManager tm; @@ -141,7 +118,10 @@ public void setDriverContext(DriverContext driverContext) { this.tm = new RequestTransactionManager(1); EventLogic.start(); } - + @Override + public void setConfiguration(S7Configuration configuration) { + this.configuration = configuration; + } @Override public void onConnect(ConversationContext context) { if (context.isPassive()) { @@ -164,7 +144,7 @@ public void onConnect(ConversationContext context) { logger.warn("Timeout during Connection establishing, closing channel..."); context.getChannel().close(); }) - .expectResponse(TPKTPacket.class, REQUEST_TIMEOUT) + .expectResponse(TPKTPacket.class, Duration.ofMillis(configuration.getTimeoutRequest())) .check(p -> p.getPayload() instanceof COTPPacketConnectionResponse) .unwrap(p -> (COTPPacketConnectionResponse) p.getPayload()) .handle(cotpPacketConnectionResponse -> { @@ -175,7 +155,7 @@ public void onConnect(ConversationContext context) { logger.warn("Timeout during Connection establishing, closing channel..."); context.getChannel().close(); }) - .expectResponse(TPKTPacket.class, REQUEST_TIMEOUT) + .expectResponse(TPKTPacket.class, Duration.ofMillis(configuration.getTimeoutRequest())) .unwrap(TPKTPacket::getPayload) .only(COTPPacketData.class) .unwrap(COTPPacket::getPayload) @@ -212,7 +192,7 @@ public void onConnect(ConversationContext context) { logger.warn("Timeout during Connection establishing, closing channel..."); context.getChannel().close(); }) - .expectResponse(TPKTPacket.class, REQUEST_TIMEOUT) + .expectResponse(TPKTPacket.class, Duration.ofMillis(configuration.getTimeoutRequest())) .check(p -> p.getPayload() instanceof COTPPacketData) .unwrap(p -> ((COTPPacketData) p.getPayload())) .check(p -> p.getPayload() instanceof S7MessageUserData) @@ -227,27 +207,21 @@ public void onConnect(ConversationContext context) { }); } - + /* - * It performs the sequential and safe shutdown of the driver. + * It performs the sequential and safe shutdown of the driver. * Completion of pending requests, executors and associated tasks. - */ + */ @Override public void onDisconnect(ConversationContext context) { - //1. Clear all pending requests and their associated transaction - cleanFutures(); - //2. Here we shutdown the local task executor. - clientExecutorService.shutdown(); - //3. Performs the shutdown of the transaction executor. tm.shutdown(); - //4. Finish the execution of the tasks for the handling of Events. + //4. Finish the execution of the tasks for the handling of Events. EventLogic.stop(); - //5. Executes the closing of the main channel. - context.getChannel().close(); - //6. Here is the stop of any task or state machine that is added. + context.fireDisconnected(); + //6. Here is the stop of any task or state machine that is added. } - + @Override public CompletableFuture read(PlcReadRequest readRequest) { DefaultPlcReadRequest request = (DefaultPlcReadRequest) readRequest; @@ -289,10 +263,15 @@ private CompletableFuture toPlcReadResponse(PlcReadRequest read */ private CompletableFuture readInternal(S7MessageRequest request) { CompletableFuture future = new CompletableFuture<>(); - int tpduId = tpduGenerator.getAndIncrement(); + int thisTpduId = 0; + if (this.s7DriverContext.getControllerType() != S7ControllerType.S7_200) + { + thisTpduId = tpduGenerator.getAndIncrement(); + } + final int tpduId = thisTpduId; // If we've reached the max value for a 16 bit transaction identifier, reset back to 1 - if (tpduGenerator.get() == 0xFFFF) { - tpduGenerator.set(1); + if(tpduGenerator.get() == 0xFFFF) { + tpduGenerator.set(0); } // Create a new Request with correct tpuId (is not known before) @@ -304,7 +283,7 @@ private CompletableFuture readInternal(S7MessageRequest request) { transaction.submit(() -> context.sendRequest(tpktPacket) .onTimeout(new TransactionErrorCallback<>(future, transaction)) .onError(new TransactionErrorCallback<>(future, transaction)) - .expectResponse(TPKTPacket.class, REQUEST_TIMEOUT) + .expectResponse(TPKTPacket.class, Duration.ofMillis(configuration.getTimeoutRequest())) .check(p -> p.getPayload() instanceof COTPPacketData) .unwrap(p -> (COTPPacketData) p.getPayload()) .check(p -> p.getPayload() != null) @@ -326,17 +305,17 @@ public CompletableFuture write(PlcWriteRequest writeRequest) { List payloadItems = new ArrayList<>(request.getNumberOfTags()); Iterator iter = request.getTagNames().iterator(); - + String tagName = null; while(iter.hasNext()) { tagName = iter.next(); final S7Tag tag = (S7Tag) request.getTag(tagName); final PlcValue plcValue = request.getPlcValue(tagName); parameterItems.add(new S7VarRequestParameterItemAddress(encodeS7Address(tag))); - payloadItems.add(serializePlcValue(tag, plcValue, iter.hasNext())); + payloadItems.add(serializePlcValue(tag, plcValue, iter.hasNext())); } - - + + // for (String tagName : request.getTagNames()) { // final S7Tag tag = (S7Tag) request.getTag(tagName); // final PlcValue plcValue = request.getPlcValue(tagName); @@ -344,9 +323,9 @@ public CompletableFuture write(PlcWriteRequest writeRequest) { // payloadItems.add(serializePlcValue(tag, plcValue)); // // } - - - + + + final int tpduId = tpduGenerator.getAndIncrement(); // If we've reached the max value for a 16 bit transaction identifier, reset back to 1 if (tpduGenerator.get() == 0xFFFF) { @@ -364,13 +343,13 @@ public CompletableFuture write(PlcWriteRequest writeRequest) { (short) tpduId ) ); - + // Start a new request-transaction (Is ended in the response-handler) RequestTransactionManager.RequestTransaction transaction = tm.startRequest(); transaction.submit(() -> context.sendRequest(tpktPacket) .onTimeout(new TransactionErrorCallback<>(future, transaction)) .onError(new TransactionErrorCallback<>(future, transaction)) - .expectResponse(TPKTPacket.class, REQUEST_TIMEOUT) + .expectResponse(TPKTPacket.class, Duration.ofMillis(configuration.getTimeoutRequest())) .check(p -> p.getPayload() instanceof COTPPacketData) .unwrap(p -> ((COTPPacketData) p.getPayload())) .unwrap(COTPPacket::getPayload) @@ -442,7 +421,7 @@ public CompletableFuture subscribe(PlcSubscriptionReque transaction.submit(() -> context.sendRequest(tpktPacket) .onTimeout(new TransactionErrorCallback<>(future, transaction)) .onError(new TransactionErrorCallback<>(future, transaction)) - .expectResponse(TPKTPacket.class, REQUEST_TIMEOUT) + .expectResponse(TPKTPacket.class, Duration.ofMillis(configuration.getTimeoutRequest())) .check(p -> p.getPayload() instanceof COTPPacketData) .unwrap(p -> ((COTPPacketData) p.getPayload())) .unwrap(COTPPacket::getPayload) @@ -764,7 +743,12 @@ private TPKTPacket createS7ConnectionRequest(COTPPacketConnectionResponse cotpPa s7DriverContext.getMaxAmqCaller(), s7DriverContext.getMaxAmqCallee(), s7DriverContext.getPduSize()); S7Message s7Message = new S7MessageRequest(0, s7ParameterSetupCommunication, null); - COTPPacketData cotpPacketData = new COTPPacketData(null, s7Message, true, (short) 1); + int tpduId = 1; + if (this.s7DriverContext.getControllerType() == S7ControllerType.S7_200) + { + tpduId = 0; + } + COTPPacketData cotpPacketData = new COTPPacketData(null, s7Message, true, (short) tpduId); return new TPKTPacket(cotpPacketData); } @@ -920,12 +904,12 @@ private S7VarPayloadDataItem serializePlcValue(S7Tag tag, PlcValue plcValue, Boo int stringLength = (tag instanceof S7StringTag) ? ((S7StringTag) tag).getStringLength() : 254; ByteBuffer byteBuffer = null; for (int i = 0; i < tag.getNumberOfElements(); i++) { - final int lengthInBits = DataItem.getLengthInBits(plcValue.getIndex(i), tag.getDataType().getDataProtocolId(), stringLength); - final WriteBufferByteBased writeBuffer = new WriteBufferByteBased((int) Math.ceil(((float) lengthInBits) / 8.0f)); - DataItem.staticSerialize(writeBuffer, plcValue.getIndex(i), tag.getDataType().getDataProtocolId(), stringLength); + final int lengthInBytes = DataItem.getLengthInBytes(plcValue.getIndex(i), tag.getDataType().getDataProtocolId(), stringLength, tag.getStringEncoding()); + final WriteBufferByteBased writeBuffer = new WriteBufferByteBased(lengthInBytes); + DataItem.staticSerialize(writeBuffer, plcValue.getIndex(i), tag.getDataType().getDataProtocolId(), stringLength, tag.getStringEncoding()); // Allocate enough space for all items. if (byteBuffer == null) { - byteBuffer = ByteBuffer.allocate(writeBuffer.getBytes().length * tag.getNumberOfElements()); + byteBuffer = ByteBuffer.allocate(lengthInBytes * tag.getNumberOfElements()); } byteBuffer.put(writeBuffer.getBytes()); } @@ -945,13 +929,13 @@ private PlcValue parsePlcValue(S7Tag tag, ByteBuf data) { int stringLength = (tag instanceof S7StringTag) ? ((S7StringTag) tag).getStringLength() : 254; if (tag.getNumberOfElements() == 1) { return DataItem.staticParse(readBuffer, tag.getDataType().getDataProtocolId(), - stringLength); + stringLength, tag.getStringEncoding()); } else { // Fetch all final PlcValue[] resultItems = IntStream.range(0, tag.getNumberOfElements()).mapToObj(i -> { try { return DataItem.staticParse(readBuffer, tag.getDataType().getDataProtocolId(), - stringLength); + stringLength, tag.getStringEncoding()); } catch (ParseException e) { logger.warn("Error parsing tag item of type: '{}' (at position {}})", tag.getDataType().name(), i, e); } @@ -1035,17 +1019,34 @@ protected S7Address encodeS7Address(PlcTag tag) { // For these date-types we have to convert the requests to simple byte-array requests // As otherwise the S7 will deny them with "Data type not supported" replies. if ((transportSize == TransportSize.TIME) /*|| (transportSize == TransportSize.S7_S5TIME)*/ || - (transportSize == TransportSize.LTIME) || (transportSize == TransportSize.DATE) || - (transportSize == TransportSize.TIME_OF_DAY) || (transportSize == TransportSize.DATE_AND_TIME)) { + (transportSize == TransportSize.LINT) || + (transportSize == TransportSize.ULINT) || + (transportSize == TransportSize.LWORD) || + (transportSize == TransportSize.LREAL) || + (transportSize == TransportSize.REAL) || + (transportSize == TransportSize.LTIME) || + (transportSize == TransportSize.DATE) || + (transportSize == TransportSize.TIME_OF_DAY) || + (transportSize == TransportSize.DATE_AND_TIME) + ) { numElements = numElements * transportSize.getSizeInBytes(); + //((S7Field) field).setDataType(transportSize); transportSize = TransportSize.BYTE; } + if (transportSize == TransportSize.CHAR) { + transportSize = TransportSize.BYTE; + numElements = numElements * transportSize.getSizeInBytes(); + } + if (transportSize == TransportSize.WCHAR) { + transportSize = TransportSize.BYTE; + numElements = numElements * transportSize.getSizeInBytes() * 2; + } if (transportSize == TransportSize.STRING) { - transportSize = TransportSize.CHAR; + transportSize = TransportSize.BYTE; int stringLength = (s7Tag instanceof S7StringTag) ? ((S7StringTag) s7Tag).getStringLength() : 254; numElements = numElements * (stringLength + 2); } else if (transportSize == TransportSize.WSTRING) { - transportSize = TransportSize.CHAR; + transportSize = TransportSize.BYTE; int stringLength = (s7Tag instanceof S7StringTag) ? ((S7StringTag) s7Tag).getStringLength() : 254; numElements = numElements * (stringLength + 2) * 2; } @@ -1078,27 +1079,4 @@ public void accept(TPKTPacket tpktPacket, E e) { future.completeExceptionally(e); } } - - private void cleanFutures(){ - //TODO: Debe ser ejecutado si la conexion esta levanta. - active_requests.forEach((f,p)->{ - CompletableFuture cf = (CompletableFuture) f; - try { - if (!cf.isDone()) { - logger.info("CF"); - cf.cancel(true); - logger.info("ClientCF"); - ((CompletableFuture) p.getRight()).completeExceptionally(new PlcRuntimeException("Disconnected")); - logger.info("TM"); - p.getLeft().endRequest(); - }; - } catch (Exception ex){ - logger.info(ex.toString()); - } - }); - active_requests.clear(); - - } - - } diff --git a/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/tag/S7StringTag.java b/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/tag/S7StringTag.java index 2435717c44c..b4285ba0fb1 100644 --- a/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/tag/S7StringTag.java +++ b/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/tag/S7StringTag.java @@ -36,8 +36,9 @@ public class S7StringTag extends S7Tag { protected S7StringTag(@JsonProperty("dataType") TransportSize dataType, @JsonProperty("memoryArea") MemoryArea memoryArea, @JsonProperty("blockNumber") int blockNumber, @JsonProperty("byteOffset") int byteOffset, @JsonProperty("bitOffset") byte bitOffset, @JsonProperty("numElements") int numElements, - @JsonProperty("stringLength") int stringLength) { - super(dataType, memoryArea, blockNumber, byteOffset, bitOffset, numElements); + @JsonProperty("stringLength") int stringLength, + @JsonProperty("stringEncoding") String stringEncoding) { + super(dataType, memoryArea, blockNumber, byteOffset, bitOffset, numElements,stringEncoding); this.stringLength = stringLength; } diff --git a/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/tag/S7Tag.java b/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/tag/S7Tag.java index 2a78a33da6e..5a92175fb1f 100644 --- a/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/tag/S7Tag.java +++ b/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/tag/S7Tag.java @@ -47,24 +47,23 @@ public class S7Tag implements PlcTag, Serializable { //byteOffset theoretically can reach up to 2097151 ... see checkByteOffset() below --> 7digits private static final Pattern ADDRESS_PATTERN = - Pattern.compile("^%(?.)(?[XBWD]?)(?\\d{1,7})(.(?[0-7]))?:(?[a-zA-Z_]+)(\\[(?\\d+)])?"); + Pattern.compile("^%(?.)(?[XBWD]?)(?\\d{1,7})(.(?[0-7]))?:(?[a-zA-Z_]+)(\\[(?\\d+)])?(\\|(?[a-z0-9A-Z_-]+))?"); //blockNumber usually has its max hat around 64000 --> 5digits private static final Pattern DATA_BLOCK_ADDRESS_PATTERN = - Pattern.compile("^%DB(?\\d{1,5}).DB(?[XBWD]?)(?\\d{1,7})(.(?[0-7]))?:(?[a-zA-Z_]+)(\\[(?\\d+)])?"); + Pattern.compile("^%DB(?\\d{1,5}).DB(?[XBWD]?)(?\\d{1,7})(.(?[0-7]))?:(?[a-zA-Z_]+)(\\[(?\\d+)])?(\\|(?[a-z0-9A-Z_-]+))?"); private static final Pattern DATA_BLOCK_SHORT_PATTERN = - Pattern.compile("^%DB(?\\d{1,5}):(?\\d{1,7})(.(?[0-7]))?:(?[a-zA-Z_]+)(\\[(?\\d+)])?"); + Pattern.compile("^%DB(?\\d{1,5}):(?\\d{1,7})(.(?[0-7]))?:(?[a-zA-Z_]+)(\\[(?\\d+)])?(\\|(?[a-z0-9A-Z_-]+))?"); private static final Pattern DATA_BLOCK_STRING_ADDRESS_PATTERN = - Pattern.compile("^%DB(?\\d{1,5}).DB(?[XBWD]?)(?\\d{1,7})(.(?[0-7]))?:(?STRING|WSTRING)\\((?\\d{1,3})\\)(\\[(?\\d+)])?"); + Pattern.compile("^%DB(?\\d{1,5}).DB(?[XBWD]?)(?\\d{1,7})(.(?[0-7]))?:(?STRING|WSTRING)\\((?\\d{1,3})\\)(\\[(?\\d+)])?(\\|(?[a-z0-9A-Z_-]+))?"); private static final Pattern DATA_BLOCK_STRING_SHORT_PATTERN = - Pattern.compile("^%DB(?\\d{1,5}):(?\\d{1,7})(.(?[0-7]))?:(?STRING|WSTRING)\\((?\\d{1,3})\\)(\\[(?\\d+)])?"); + Pattern.compile("^%DB(?\\d{1,5}):(?\\d{1,7})(.(?[0-7]))?:(?STRING|WSTRING)\\((?\\d{1,3})\\)(\\[(?\\d+)])?(\\|(?[a-z0-9A-Z_-]+))?"); private static final Pattern PLC_PROXY_ADDRESS_PATTERN = - Pattern.compile("[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}"); - + Pattern.compile("[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}(\\|(?[a-z0-9A-Z_-]+))?"); private static final String DATA_TYPE = "dataType"; private static final String STRING_LENGTH = "stringLength"; private static final String TRANSFER_SIZE_CODE = "transferSizeCode"; @@ -73,6 +72,7 @@ public class S7Tag implements PlcTag, Serializable { private static final String BIT_OFFSET = "bitOffset"; private static final String NUM_ELEMENTS = "numElements"; private static final String MEMORY_AREA = "memoryArea"; + private static final String STRING_ENCODING = "stringEncoding"; private final TransportSize dataType; private final MemoryArea memoryArea; @@ -81,16 +81,20 @@ public class S7Tag implements PlcTag, Serializable { private final byte bitOffset; private final int numElements; + private final String stringEncoding; + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) protected S7Tag(@JsonProperty("dataType") TransportSize dataType, @JsonProperty("memoryArea") MemoryArea memoryArea, @JsonProperty("blockNumber") int blockNumber, @JsonProperty("byteOffset") int byteOffset, - @JsonProperty("bitOffset") byte bitOffset, @JsonProperty("numElements") int numElements) { + @JsonProperty("bitOffset") byte bitOffset, @JsonProperty("numElements") int numElements, + @JsonProperty("stringEncoding") String stringEncoding) { this.dataType = dataType; this.memoryArea = memoryArea; this.blockNumber = blockNumber; this.byteOffset = byteOffset; this.bitOffset = bitOffset; this.numElements = numElements; + this.stringEncoding = stringEncoding; } @Override @@ -135,6 +139,10 @@ public byte getBitOffset() { return bitOffset; } + public String getStringEncoding() { + return stringEncoding; + } + @Override public int getNumberOfElements() { return numElements; } @@ -162,7 +170,7 @@ public static S7Tag of(String tagString) { if (matcher.group(BIT_OFFSET) != null) { bitOffset = Byte.parseByte(matcher.group(BIT_OFFSET)); } else if (dataType == TransportSize.BOOL) { - throw new PlcInvalidTagException("Expected bit offset for BOOL parameters."); + //throw new PlcInvalidTagException("Expected bit offset for BOOL parameters."); } int numElements = 1; if (matcher.group(NUM_ELEMENTS) != null) { @@ -173,8 +181,16 @@ public static S7Tag of(String tagString) { throw new PlcInvalidTagException("Transfer size code '" + transferSizeCode + "' doesn't match specified data type '" + dataType.name() + "'"); } - - return new S7StringTag(dataType, memoryArea, blockNumber, byteOffset, bitOffset, numElements, stringLength); + String stringEncoding = matcher.group(STRING_ENCODING); + if (stringEncoding==null || "".equals(stringEncoding)) + { + stringEncoding = "UTF-8"; + if (dataType == TransportSize.WSTRING || dataType == TransportSize.WCHAR) + { + stringEncoding = "UTF-16"; + } + } + return new S7StringTag(dataType, memoryArea, blockNumber, byteOffset, bitOffset, numElements, stringLength, stringEncoding); } else if ((matcher = DATA_BLOCK_STRING_SHORT_PATTERN.matcher(tagString)).matches()) { TransportSize dataType = TransportSize.valueOf(matcher.group(DATA_TYPE)); int stringLength = Integer.parseInt(matcher.group(STRING_LENGTH)); @@ -186,9 +202,17 @@ public static S7Tag of(String tagString) { if (matcher.group(NUM_ELEMENTS) != null) { numElements = Integer.parseInt(matcher.group(NUM_ELEMENTS)); } - + String stringEncoding = matcher.group(STRING_ENCODING); + if (stringEncoding==null || "".equals(stringEncoding)) + { + stringEncoding = "UTF-8"; + if (dataType == TransportSize.WSTRING || dataType == TransportSize.WCHAR) + { + stringEncoding = "UTF-16"; + } + } return new S7StringTag(dataType, memoryArea, blockNumber, - byteOffset, bitOffset, numElements, stringLength); + byteOffset, bitOffset, numElements, stringLength, stringEncoding); } else if ((matcher = DATA_BLOCK_ADDRESS_PATTERN.matcher(tagString)).matches()) { TransportSize dataType = TransportSize.valueOf(matcher.group(DATA_TYPE)); MemoryArea memoryArea = MemoryArea.DATA_BLOCKS; @@ -210,8 +234,16 @@ public static S7Tag of(String tagString) { throw new PlcInvalidTagException("Transfer size code '" + transferSizeCode + "' doesn't match specified data type '" + dataType.name() + "'"); } - - return new S7Tag(dataType, memoryArea, blockNumber, byteOffset, bitOffset, numElements); + String stringEncoding = matcher.group(STRING_ENCODING); + if (stringEncoding==null || "".equals(stringEncoding)) + { + stringEncoding = "UTF-8"; + if (dataType == TransportSize.WSTRING || dataType == TransportSize.WCHAR) + { + stringEncoding = "UTF-16"; + } + } + return new S7Tag(dataType, memoryArea, blockNumber, byteOffset, bitOffset, numElements, stringEncoding); } else if ((matcher = DATA_BLOCK_SHORT_PATTERN.matcher(tagString)).matches()) { TransportSize dataType = TransportSize.valueOf(matcher.group(DATA_TYPE)); MemoryArea memoryArea = MemoryArea.DATA_BLOCKS; @@ -221,15 +253,23 @@ public static S7Tag of(String tagString) { if (matcher.group(BIT_OFFSET) != null) { bitOffset = Byte.parseByte(matcher.group(BIT_OFFSET)); } else if (dataType == TransportSize.BOOL) { - throw new PlcInvalidTagException("Expected bit offset for BOOL parameters."); + //throw new PlcInvalidTagException("Expected bit offset for BOOL parameters."); } int numElements = 1; if (matcher.group(NUM_ELEMENTS) != null) { numElements = Integer.parseInt(matcher.group(NUM_ELEMENTS)); } - - return new S7Tag(dataType, memoryArea, blockNumber, byteOffset, bitOffset, numElements); - } else if (PLC_PROXY_ADDRESS_PATTERN.matcher(tagString).matches()) { + String stringEncoding = matcher.group(STRING_ENCODING); + if (stringEncoding==null || "".equals(stringEncoding)) + { + stringEncoding = "UTF-8"; + if (dataType == TransportSize.WSTRING || dataType == TransportSize.WCHAR) + { + stringEncoding = "UTF-16"; + } + } + return new S7Tag(dataType, memoryArea, blockNumber, byteOffset, bitOffset, numElements, stringEncoding); + } else if ((matcher = PLC_PROXY_ADDRESS_PATTERN.matcher(tagString)).matches()) { try { byte[] addressData = Hex.decodeHex(tagString.replaceAll("[-]", "")); ReadBuffer rb = new ReadBufferByteBased(addressData); @@ -240,10 +280,18 @@ public static S7Tag of(String tagString) { if ((s7AddressAny.getTransportSize() != TransportSize.BOOL) && s7AddressAny.getBitAddress() != 0) { throw new PlcInvalidTagException("A bit offset other than 0 is only supported for type BOOL"); } - + String stringEncoding = matcher.group(STRING_ENCODING); + if (stringEncoding==null || "".equals(stringEncoding)) + { + stringEncoding = "UTF-8"; + if (s7AddressAny.getTransportSize() == TransportSize.WSTRING || s7AddressAny.getTransportSize() == TransportSize.WCHAR) + { + stringEncoding = "UTF-16"; + } + } return new S7Tag(s7AddressAny.getTransportSize(), s7AddressAny.getArea(), s7AddressAny.getDbNumber(), s7AddressAny.getByteAddress(), - s7AddressAny.getBitAddress(), s7AddressAny.getNumberOfElements()); + s7AddressAny.getBitAddress(), s7AddressAny.getNumberOfElements(), stringEncoding); } else { throw new PlcInvalidTagException("Unsupported address type."); } @@ -259,7 +307,7 @@ public static S7Tag of(String tagString) { if (matcher.group(BIT_OFFSET) != null) { bitOffset = Byte.parseByte(matcher.group(BIT_OFFSET)); } else if (dataType == TransportSize.BOOL) { - throw new PlcInvalidTagException("Expected bit offset for BOOL parameters."); + //throw new PlcInvalidTagException("Expected bit offset for BOOL parameters."); } int numElements = 1; if (matcher.group(NUM_ELEMENTS) != null) { @@ -273,8 +321,17 @@ public static S7Tag of(String tagString) { if ((dataType != TransportSize.BOOL) && bitOffset != 0) { throw new PlcInvalidTagException("A bit offset other than 0 is only supported for type BOOL"); } + String stringEncoding = matcher.group(STRING_ENCODING); + if (stringEncoding==null || "".equals(stringEncoding)) + { + stringEncoding = "UTF-8"; + if (dataType == TransportSize.WSTRING || dataType == TransportSize.WCHAR) + { + stringEncoding = "UTF-16"; + } + } - return new S7Tag(dataType, memoryArea, (short) 0, byteOffset, bitOffset, numElements); + return new S7Tag(dataType, memoryArea, (short) 0, byteOffset, bitOffset, numElements, stringEncoding); } throw new PlcInvalidTagException("Unable to parse address: " + tagString); } diff --git a/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/utils/StaticHelper.java b/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/utils/StaticHelper.java index 3fda942897e..f1ab55296d7 100644 --- a/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/utils/StaticHelper.java +++ b/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/utils/StaticHelper.java @@ -36,14 +36,22 @@ import org.apache.plc4x.java.spi.generation.ReadBuffer; import org.apache.plc4x.java.spi.generation.SerializationException; import org.apache.plc4x.java.spi.generation.WriteBuffer; +import org.apache.plc4x.java.spi.values.PlcList; +import org.apache.plc4x.java.spi.values.PlcWCHAR; +import java.io.BufferedInputStream; +import java.io.ByteArrayInputStream; +import java.nio.ByteBuffer; +import java.nio.charset.CharacterCodingException; import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; import java.nio.charset.StandardCharsets; import java.time.Duration; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; import java.time.temporal.ChronoUnit; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; import java.util.logging.Level; @@ -127,6 +135,87 @@ */ public class StaticHelper { + private static final String[] DEFAULTCHARSETS = {"ASCII", "UTF-8", "GBK", "GB2312", "BIG5", "GB18030"}; + + public static Charset detectCharset(String firstMaTch, byte[] bytes) { + + Charset charset = null; + if (firstMaTch!=null && !"".equals(firstMaTch)) + { + try { + charset = Charset.forName(firstMaTch.replaceAll("[^a-zA-Z0-9]", "")); + }catch (Exception ignored) { + } + return charset; + } + for (String charsetName : DEFAULTCHARSETS) { + charset = detectCharset(bytes, Charset.forName(charsetName), bytes.length); + if (charset != null) { + break; + } + } + + return charset; + } + + private static Charset detectCharset(byte[] bytes, Charset charset, int length) { + try { + BufferedInputStream input = new BufferedInputStream(new ByteArrayInputStream(bytes, 0, length)); + + CharsetDecoder decoder = charset.newDecoder(); + decoder.reset(); + + byte[] buffer = new byte[512]; + boolean identified = false; + while (input.read(buffer) != -1 && !identified) { + identified = identify(buffer, decoder); + } + + input.close(); + + if (identified) { + return charset; + } else { + return null; + } + + } catch (Exception e) { + return null; + } + } + + private static boolean identify(byte[] bytes, CharsetDecoder decoder) { + try { + decoder.decode(ByteBuffer.wrap(bytes)); + } catch (CharacterCodingException e) { + return false; + } + return true; + } + public static Charset getEncoding(String firstMaTch, String str) { + if (str == null || str.trim().length() < 1) { + return null; + } + Charset charset = null; + if (firstMaTch!=null && !"".equals(firstMaTch)) + { + try { + charset = Charset.forName(firstMaTch.replaceAll("[^a-zA-Z0-9]", "")); + }catch (Exception ignored) { + } + return charset; + } + for (String encode : DEFAULTCHARSETS) { + try { + Charset charset1 = Charset.forName(encode); + if (str.equals(new String(str.getBytes(charset1), charset1))) { + return charset1; + } + } catch (Exception er) { + } + } + return null; + } public enum OB { FREE_CYC(0X0000, "OB1 Free cycle"), @@ -1931,7 +2020,7 @@ public static void serializeTiaDateTime(WriteBuffer io, PlcValue value) { throw new NotImplementedException("Serializing DATE_AND_TIME not implemented"); } - public static String parseS7Char(ReadBuffer io, String encoding) throws ParseException { + public static String parseS7Char(ReadBuffer io, String encoding, String stringEncoding) throws ParseException{ if ("UTF-8".equalsIgnoreCase(encoding)) { return io.readString(8, WithOption.WithEncoding(encoding)); } else if ("UTF-16".equalsIgnoreCase(encoding)) { @@ -1941,14 +2030,14 @@ public static String parseS7Char(ReadBuffer io, String encoding) throws ParseExc } } - public static String parseS7String(ReadBuffer io, int stringLength, String encoding) { + public static String parseS7String(ReadBuffer io, int stringLength, String encoding, String stringEncoding) { try { if ("UTF-8".equalsIgnoreCase(encoding)) { // This is the maximum number of bytes a string can be long. short maxLength = io.readUnsignedShort(8); // This is the total length of the string on the PLC (Not necessarily the number of characters read) short totalStringLength = io.readUnsignedShort(8); - + totalStringLength = (short) Math.min(maxLength, totalStringLength); final byte[] byteArray = new byte[totalStringLength]; for (int i = 0; (i < stringLength) && io.hasMore(8); i++) { final byte curByte = io.readByte(); @@ -1963,13 +2052,25 @@ public static String parseS7String(ReadBuffer io, int stringLength, String encod break; } } - return new String(byteArray, StandardCharsets.UTF_8); + Charset charset = detectCharset(null,byteArray); + if (charset == null) { + try { + charset = Charset.forName(stringEncoding.replaceAll("[^a-zA-Z0-9]", "")); + }catch (Exception ignored) { + } + if (charset == null) { + charset = StandardCharsets.UTF_8; + } + } + String substr = new String(byteArray, charset); + substr = substr.replaceAll("[^\u0020-\u9FA5]", ""); + return substr; } else if ("UTF-16".equalsIgnoreCase(encoding)) { // This is the maximum number of bytes a string can be long. int maxLength = io.readUnsignedInt(16); // This is the total length of the string on the PLC (Not necessarily the number of characters read) int totalStringLength = io.readUnsignedInt(16); - + totalStringLength = Math.min(maxLength, totalStringLength); final byte[] byteArray = new byte[totalStringLength * 2]; for (int i = 0; (i < stringLength) && io.hasMore(16); i++) { final short curShort = io.readShort(16); @@ -1985,7 +2086,17 @@ public static String parseS7String(ReadBuffer io, int stringLength, String encod break; } } - return new String(byteArray, StandardCharsets.UTF_16); + Charset charset = detectCharset(stringEncoding,byteArray); + if (charset == null) { + try { + charset = Charset.forName(stringEncoding.replaceAll("[^a-zA-Z0-9]", "")); + }catch (Exception ignored) { + } + if (charset == null) { + charset = StandardCharsets.UTF_16; + } + } + return new String(byteArray, charset); } else { throw new PlcRuntimeException("Unsupported string encoding " + encoding); } @@ -1997,12 +2108,29 @@ public static String parseS7String(ReadBuffer io, int stringLength, String encod /* * A variable of data type CHAR (character) occupies one byte. */ - public static void serializeS7Char(WriteBuffer io, PlcValue value, String encoding) { - // TODO: Need to implement the serialization or we can't write strings + public static void serializeS7Char(WriteBuffer io, PlcValue value, String encoding, String stringEncoding) { + if (value instanceof PlcList) { + PlcList list = (PlcList) value; + list.getList().forEach(v -> writeChar(io, v, encoding,stringEncoding)); + } else { + writeChar(io, value, encoding,stringEncoding); + } + } + private static void writeChar(WriteBuffer io, PlcValue value, String encoding, String stringEncoding) { if ("UTF-8".equalsIgnoreCase(encoding)) { - //return io.readString(8, encoding); + try { + byte valueByte = value.getByte(); + io.writeByte(valueByte); + } catch (SerializationException e) { + throw new PlcRuntimeException("writeChar error"); + } } else if ("UTF-16".equalsIgnoreCase(encoding)) { - //return io.readString(16, encoding); + try { + byte[] bytes = ((PlcWCHAR) value).getBytes(); + io.writeByteArray(bytes); + } catch (SerializationException e) { + throw new PlcRuntimeException("writeWChar error"); + } } else { throw new PlcRuntimeException("Unsupported encoding"); } @@ -2032,23 +2160,57 @@ public static void serializeS7Char(WriteBuffer io, PlcValue value, String encodi * If your application does not handle S7string, you can handle * the String as char arrays from your application. */ - public static void serializeS7String(WriteBuffer io, PlcValue value, int stringLength, String encoding) { - int k = 0xFF & ((stringLength > 250) ? 250 : stringLength); - int m = 0xFF & value.getString().length(); - m = (m > k) ? k : m; - byte[] chars = new byte[m]; - for (int i = 0; i < m; ++i) { - char c = value.getString().charAt(i); - chars[i] = (byte) c; + public static void serializeS7String(WriteBuffer io, PlcValue value, int stringLength, String encoding, String stringEncoding) { + stringLength = Math.min(stringLength, 254); + String valueString = (String) value.getObject(); + valueString = valueString == null ? "" : valueString; + if ("AUTO".equalsIgnoreCase(stringEncoding)) + { + stringEncoding = null; + } + Charset charsetTemp = getEncoding(stringEncoding,valueString); + if ("UTF-8".equalsIgnoreCase(encoding)) { + if (charsetTemp == null) { + charsetTemp = StandardCharsets.UTF_8; + } + final byte[] raw = valueString.getBytes(charsetTemp); + try { + io.writeByte((byte) stringLength); + io.writeByte((byte) raw.length); + for (int i = 0; i < stringLength; i++) { + if (i >= raw.length) { + io.writeByte((byte) 0x00); + } else { + io.writeByte( raw[i]); + } + } + } + catch (SerializationException ex) { + Logger.getLogger(StaticHelper.class.getName()).log(Level.SEVERE, null, ex); + } + } else if ("UTF-16".equalsIgnoreCase(encoding)) { + if (charsetTemp == null) { + charsetTemp = StandardCharsets.UTF_16; + } + final byte[] raw = valueString.getBytes(charsetTemp); + try { + io.writeUnsignedInt(16, stringLength); + io.writeUnsignedInt(16, raw.length / 2); + for (int i = 0; i < stringLength * 2; i++) { + if (i >= raw.length) { + io.writeByte((byte) 0x00); + } else { + io.writeByte( raw[i]); + } + } + } + catch (SerializationException ex) { + Logger.getLogger(StaticHelper.class.getName()).log(Level.SEVERE, null, ex); + } + } else { + throw new PlcRuntimeException("Unsupported string encoding " + encoding); } - try { - io.writeByte((byte)(k & 0xFF)); - io.writeByte((byte)(m & 0xFF)); - io.writeByteArray(chars); - } catch (SerializationException ex) { - Logger.getLogger(StaticHelper.class.getName()).log(Level.SEVERE, null, ex); - } } } diff --git a/plc4j/drivers/s7/src/test/resources/logback-test.xml b/plc4j/drivers/s7/src/test/resources/logback-test.xml index 33ae65561c2..30209163626 100644 --- a/plc4j/drivers/s7/src/test/resources/logback-test.xml +++ b/plc4j/drivers/s7/src/test/resources/logback-test.xml @@ -27,7 +27,7 @@ - + diff --git a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/Plc4xNettyWrapper.java b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/Plc4xNettyWrapper.java index 33ef3166734..e6007b9a50b 100644 --- a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/Plc4xNettyWrapper.java +++ b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/Plc4xNettyWrapper.java @@ -22,6 +22,9 @@ import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelPipeline; import io.netty.handler.codec.MessageToMessageCodec; +import io.netty.util.HashedWheelTimer; +import io.netty.util.Timeout; +import io.netty.util.Timer; import io.vavr.control.Either; import org.apache.plc4x.java.api.authentication.PlcAuthentication; import org.apache.plc4x.java.spi.configuration.Configuration; @@ -39,6 +42,7 @@ import java.util.List; import java.util.Queue; import java.util.concurrent.ConcurrentLinkedQueue; +import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.function.Consumer; import java.util.function.Function; @@ -53,13 +57,12 @@ public class Plc4xNettyWrapper extends MessageToMessageCodec { private final PlcAuthentication authentication; private final Queue registeredHandlers; - private final ChannelPipeline pipeline; + private Timer timer = null; private final boolean passive; public Plc4xNettyWrapper(ChannelPipeline pipeline, boolean passive, Plc4xProtocolBase protocol, PlcAuthentication authentication, Class clazz) { super(clazz, Object.class); - this.pipeline = pipeline; this.passive = passive; this.registeredHandlers = new ConcurrentLinkedQueue<>(); this.protocolBase = protocol; @@ -105,6 +108,7 @@ public void fireDiscovered(Configuration c) { public SendRequestContext sendRequest(T packet) { return new DefaultSendRequestContext<>(handler -> { logger.trace("Adding Response Handler ..."); + handler.setTimeoutHandle(createTimeout(handler)); registeredHandlers.add(handler); }, packet, this); } @@ -113,13 +117,33 @@ public SendRequestContext sendRequest(T packet) { public ExpectRequestContext expectRequest(Class clazz, Duration timeout) { return new DefaultExpectRequestContext<>(handler -> { logger.trace("Adding Request Handler ..."); + handler.setTimeoutHandle(createTimeout(handler)); registeredHandlers.add(handler); }, clazz, timeout, this); } }); } - + private Timeout createTimeout(HandlerRegistration handler) + { + Timer createdTimer = this.protocolBase.timer; + if(createdTimer==null) { + if(this.timer == null) { + this.timer = new HashedWheelTimer(); + } + createdTimer = this.timer; + } + return createdTimer.newTimeout(tt -> { + if (tt.isCancelled()) { + return; + } + if( registeredHandlers.remove(handler)) + { + handler.cancel(); + handler.getOnTimeoutConsumer().accept(new TimeoutException()); + } + }, handler.getTimeout().toMillis(), TimeUnit.MILLISECONDS); + } @Override protected void encode(ChannelHandlerContext channelHandlerContext, Object msg, List list) throws Exception { // logger.trace("Encoding {}", plcRequestContainer); @@ -145,21 +169,15 @@ protected void decode(ChannelHandlerContext channelHandlerContext, T t, List(ctx, authentication, passive)); } else if (evt instanceof CloseConnectionEvent) { this.protocolBase.close(new DefaultConversationContext<>(ctx, authentication, passive)); + if(this.timer!=null) { + this.timer.stop(); + this.timer = null; + } } else { super.userEventTriggered(ctx, evt); } @@ -268,6 +290,7 @@ public void fireDiscovered(Configuration c) { public SendRequestContext sendRequest(T1 packet) { return new DefaultSendRequestContext<>(handler -> { logger.trace("Adding Response Handler ..."); + handler.setTimeoutHandle(createTimeout(handler)); registeredHandlers.add(handler); }, packet, this); } @@ -276,6 +299,7 @@ public SendRequestContext sendRequest(T1 packet) { public ExpectRequestContext expectRequest(Class clazz, Duration timeout) { return new DefaultExpectRequestContext<>(handler -> { logger.trace("Adding Request Handler ..."); + handler.setTimeoutHandle(createTimeout(handler)); registeredHandlers.add(handler); }, clazz, timeout, this); } diff --git a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/Plc4xProtocolBase.java b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/Plc4xProtocolBase.java index dbbabb51e80..cf7bf458113 100644 --- a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/Plc4xProtocolBase.java +++ b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/Plc4xProtocolBase.java @@ -18,6 +18,7 @@ */ package org.apache.plc4x.java.spi; +import io.netty.util.Timer; import org.apache.commons.lang3.NotImplementedException; import org.apache.plc4x.java.api.messages.*; import org.apache.plc4x.java.spi.context.DriverContext; @@ -28,6 +29,8 @@ public abstract class Plc4xProtocolBase { protected ConversationContext context; + protected Timer timer; + protected DriverContext driverContext; public void setDriverContext(DriverContext driverContext) { @@ -42,6 +45,10 @@ public void setContext(ConversationContext context) { this.context = context; } + public void setTimer(Timer timer) { + this.timer = timer; + } + public void onConnect(ConversationContext context) { // Intentionally do nothing here } diff --git a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/connection/ChannelFactory.java b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/connection/ChannelFactory.java index cd034bda35d..69801c3908f 100644 --- a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/connection/ChannelFactory.java +++ b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/connection/ChannelFactory.java @@ -21,10 +21,11 @@ import io.netty.channel.Channel; import io.netty.channel.ChannelHandler; import io.netty.channel.ChannelPipeline; +import io.netty.util.Timer; import org.apache.plc4x.java.api.exceptions.PlcConnectionException; public interface ChannelFactory { - + Timer getTimer(); Channel createChannel(ChannelHandler channelHandler) throws PlcConnectionException; boolean isPassive(); diff --git a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/connection/DefaultNettyPlcConnection.java b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/connection/DefaultNettyPlcConnection.java index 7e301043182..e2221492d0b 100644 --- a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/connection/DefaultNettyPlcConnection.java +++ b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/connection/DefaultNettyPlcConnection.java @@ -28,6 +28,7 @@ import org.apache.plc4x.java.api.listener.ConnectionStateListener; import org.apache.plc4x.java.api.listener.EventListener; import org.apache.plc4x.java.api.value.PlcValueHandler; +import org.apache.plc4x.java.spi.Plc4xProtocolBase; import org.apache.plc4x.java.spi.configuration.Configuration; import org.apache.plc4x.java.spi.configuration.ConfigurationFactory; import org.apache.plc4x.java.spi.events.*; @@ -123,6 +124,7 @@ public void connect() throws PlcConnectionException { channel = channelFactory.createChannel(getChannelHandler(sessionSetupCompleteFuture, sessionDisconnectCompleteFuture, sessionDiscoveredCompleteFuture)); channel.closeFuture().addListener(future -> { if (!sessionSetupCompleteFuture.isDone()) { + channel.pipeline().fireUserEventTriggered(new CloseConnectionEvent()); sessionSetupCompleteFuture.completeExceptionally( new PlcIoException("Connection terminated by remote")); } @@ -152,6 +154,11 @@ public void connect() throws PlcConnectionException { */ @Override public void close() throws PlcConnectionException { + if(channel == null) + { + connected = false; + return; + } logger.debug("Closing connection to PLC, await for disconnect = {}", awaitSessionDisconnectComplete); channel.pipeline().fireUserEventTriggered(new DisconnectEvent()); try { @@ -212,22 +219,45 @@ public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exc } else if (evt instanceof DisconnectedEvent) { sessionDisconnectCompleteFuture.complete(null); eventListeners.forEach(ConnectionStateListener::disconnected); + super.userEventTriggered(ctx, evt); } else if (evt instanceof DiscoveredEvent) { sessionDiscoverCompleteFuture.complete(((DiscoveredEvent) evt).getConfiguration()); + } else if (evt instanceof ConnectEvent) { + if (!sessionSetupCompleteFuture.isCompletedExceptionally()) { + if (awaitSessionSetupComplete) { + setProtocol(stackConfigurer.configurePipeline(configuration, pipeline, getAuthentication(), + channelFactory.isPassive())); + } + super.userEventTriggered(ctx, evt); + } } else { super.userEventTriggered(ctx, evt); } } }); + pipeline.addLast(new ChannelInboundHandlerAdapter() { + @Override + public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws PlcConnectionException { + logger.error("unknown error, close the connection", cause); + close(); + } + } + ); // Initialize via Transport Layer channelFactory.initializePipeline(pipeline); // Initialize Protocol Layer - setProtocol(stackConfigurer.configurePipeline(configuration, pipeline, getAuthentication(), - channelFactory.isPassive())); + if (!awaitSessionSetupComplete) { + setProtocol(stackConfigurer.configurePipeline(configuration, pipeline, getAuthentication(), + channelFactory.isPassive())); + } } }; } - + @Override + public void setProtocol(Plc4xProtocolBase protocol) { + super.setProtocol(protocol); + protocol.setTimer(channelFactory.getTimer()); + } protected void sendChannelCreatedEvent() { logger.trace("Channel was created, firing ChannelCreated Event"); // Send an event to the pipeline telling the Protocol filters what's going on. diff --git a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/connection/NettyChannelFactory.java b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/connection/NettyChannelFactory.java index 8c9d6f91289..8220ae60d18 100644 --- a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/connection/NettyChannelFactory.java +++ b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/connection/NettyChannelFactory.java @@ -24,6 +24,8 @@ import io.netty.channel.ChannelHandler; import io.netty.channel.EventLoopGroup; import io.netty.channel.nio.NioEventLoopGroup; +import io.netty.util.HashedWheelTimer; +import io.netty.util.Timer; import org.apache.plc4x.java.api.exceptions.PlcConnectionException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -42,6 +44,14 @@ public abstract class NettyChannelFactory implements ChannelFactory { private static final Logger logger = LoggerFactory.getLogger(NettyChannelFactory.class); + protected static HashedWheelTimer timer = new HashedWheelTimer(); + @Override + public Timer getTimer(){ + if(timer==null){ + timer = new HashedWheelTimer(); + } + return timer; + } private final Map eventLoops = new ConcurrentHashMap<>(); /** @@ -151,6 +161,8 @@ public void closeEventLoopForChannel(Channel channel) { EventLoopGroup eventExecutors = eventLoops.get(channel); eventLoops.remove(channel); eventExecutors.shutdownGracefully().awaitUninterruptibly(); + timer.stop(); + timer = null; logger.info("Worker Group was closed successfully!"); } else { logger.warn("Trying to remove EventLoop for Channel {} but have none stored", channel); diff --git a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/generation/WriteBufferByteBased.java b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/generation/WriteBufferByteBased.java index 9f918cdc81b..2c28e8608bb 100644 --- a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/generation/WriteBufferByteBased.java +++ b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/generation/WriteBufferByteBased.java @@ -45,10 +45,12 @@ public WriteBufferByteBased(int size, ByteOrder byteOrder) { this.byteOrder = byteOrder; } + @Override public ByteOrder getByteOrder() { return byteOrder; } + @Override public void setByteOrder(ByteOrder byteOrder) { this.byteOrder = byteOrder; } diff --git a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/internal/HandlerRegistration.java b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/internal/HandlerRegistration.java index 7dc9216d8b5..bef8bc6f07e 100644 --- a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/internal/HandlerRegistration.java +++ b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/internal/HandlerRegistration.java @@ -18,13 +18,12 @@ */ package org.apache.plc4x.java.spi.internal; +import io.netty.util.Timeout; import io.vavr.control.Either; import java.time.Duration; -import java.time.Instant; import java.util.Deque; import java.util.concurrent.TimeoutException; -import java.util.concurrent.atomic.AtomicBoolean; import java.util.function.BiConsumer; import java.util.function.Consumer; import java.util.function.Function; @@ -46,7 +45,7 @@ public class HandlerRegistration { private final BiConsumer errorConsumer; private final Duration timeout; - private final Instant timeoutAt; + private Timeout timeoutHandle; private volatile boolean cancelled = false; private volatile boolean handled = false; @@ -58,7 +57,6 @@ public HandlerRegistration(Deque, Predicate>> commands, this.onTimeoutConsumer = onTimeoutConsumer; this.errorConsumer = errorConsumer; this.timeout = timeout; - this.timeoutAt = Instant.now().plus(timeout); } public Deque, Predicate>> getCommands() { @@ -85,8 +83,12 @@ public Duration getTimeout() { return timeout; } - public Instant getTimeoutAt() { - return timeoutAt; + public void setTimeoutHandle(Timeout timeoutHandle) { + this.timeoutHandle = timeoutHandle; + } + + public Timeout getTimeoutHandle() { + return timeoutHandle; } public void cancel() { diff --git a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/messages/DefaultPlcWriteRequest.java b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/messages/DefaultPlcWriteRequest.java index 2a5b2953e47..91f2605b672 100644 --- a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/messages/DefaultPlcWriteRequest.java +++ b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/messages/DefaultPlcWriteRequest.java @@ -27,6 +27,7 @@ import org.apache.plc4x.java.api.messages.PlcWriteRequest; import org.apache.plc4x.java.api.messages.PlcWriteResponse; import org.apache.plc4x.java.api.model.PlcTag; +import org.apache.plc4x.java.api.types.PlcValueType; import org.apache.plc4x.java.spi.codegen.WithOption; import org.apache.plc4x.java.spi.generation.SerializationException; import org.apache.plc4x.java.spi.generation.WriteBuffer; @@ -93,6 +94,7 @@ public List getTags() { return tags.values().stream().map(TagValueItem::getTag).collect(Collectors.toCollection(LinkedList::new)); } + @Override @JsonIgnore public PlcValue getPlcValue(String name) { return tags.get(name).getValue(); @@ -194,6 +196,9 @@ public PlcWriteRequest build() { PlcTag tag = tagValues.getLeft().get(); Object[] value = tagValues.getRight(); PlcValue plcValue = valueHandler.newPlcValue(tag, value); + if(tag.getPlcValueType()== PlcValueType.NULL){ + tag.setPlcValueType(plcValue.getPlcValueType()); + } parsedTags.put(name, new TagValueItem(tag, plcValue)); }); return new DefaultPlcWriteRequest(writer, parsedTags); diff --git a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/model/DefaultPlcSubscriptionTag.java b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/model/DefaultPlcSubscriptionTag.java index 8d4f3d41f5f..9fb29c02469 100644 --- a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/model/DefaultPlcSubscriptionTag.java +++ b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/model/DefaultPlcSubscriptionTag.java @@ -59,7 +59,7 @@ public PlcValueType getPlcValueType() { public List getArrayInfo() { return plcTag.getArrayInfo(); } - + @Override public PlcSubscriptionType getPlcSubscriptionType() { return plcSubscriptionType; } @@ -67,7 +67,7 @@ public PlcSubscriptionType getPlcSubscriptionType() { public PlcTag getTag() { return plcTag; } - + @Override public Optional getDuration() { return Optional.ofNullable(duration); } diff --git a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/transaction/RequestTransactionManager.java b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/transaction/RequestTransactionManager.java index 3592ff2e552..4fba0210757 100644 --- a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/transaction/RequestTransactionManager.java +++ b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/transaction/RequestTransactionManager.java @@ -18,21 +18,16 @@ */ package org.apache.plc4x.java.spi.transaction; +import org.apache.commons.lang3.concurrent.BasicThreadFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.slf4j.MDC; import java.util.Objects; import java.util.Queue; import java.util.Set; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentLinkedQueue; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.Future; +import java.util.concurrent.*; import java.util.concurrent.atomic.AtomicInteger; import java.util.function.Consumer; -import org.apache.commons.lang3.concurrent.BasicThreadFactory; /** * This is a limited Queue of Requests, a Protocol can use. @@ -49,25 +44,23 @@ public class RequestTransactionManager { private static final Logger logger = LoggerFactory.getLogger(RequestTransactionManager.class); /** Executor that performs all operations */ - //static final ExecutorService executor = Executors.newScheduledThreadPool(4); - - final ExecutorService executor = Executors.newFixedThreadPool(4, new BasicThreadFactory.Builder() - .namingPattern("plc4x-tm-thread-%d") - .daemon(true) - .priority(Thread.MAX_PRIORITY) - .build()); - + private final ExecutorService executor; private final Set runningRequests; /** How many Transactions are allowed to run at the same time? */ private int numberOfConcurrentRequests; /** Assigns each request a Unique Transaction Id, especially important for failure handling */ - private AtomicInteger transactionId = new AtomicInteger(0); + private final AtomicInteger transactionId = new AtomicInteger(0); /** Important, this is a FIFO Queue for Fairness! */ - private Queue workLog = new ConcurrentLinkedQueue<>(); + private final Queue workLog = new ConcurrentLinkedQueue<>(); public RequestTransactionManager(int numberOfConcurrentRequests) { this.numberOfConcurrentRequests = numberOfConcurrentRequests; // Immutable Map + executor = new ThreadPoolExecutor(0, numberOfConcurrentRequests, + 0L, TimeUnit.MILLISECONDS, + new LinkedBlockingQueue<>(1024), + new BasicThreadFactory.Builder().namingPattern("RequestTransactionManager-pool-%d").daemon(true).build(), + new ThreadPoolExecutor.AbortPolicy());; runningRequests = ConcurrentHashMap.newKeySet(); } @@ -91,13 +84,13 @@ public void setNumberOfConcurrentRequests(int numberOfConcurrentRequests) { // As we might have increased the number, try to send some more requests. processWorklog(); } - + /* * It allows the sequential shutdown of the associated driver. */ public void shutdown(){ executor.shutdown(); - } + } public void submit(Consumer context) { RequestTransaction transaction = startRequest(); @@ -114,7 +107,7 @@ void submit(RequestTransaction handle) { processWorklog(); } - private void processWorklog() { + private synchronized void processWorklog() { while (runningRequests.size() < getNumberOfConcurrentRequests() && !workLog.isEmpty()) { RequestTransaction next = workLog.poll(); if (next != null) { @@ -219,11 +212,11 @@ public TransactionOperation(int transactionId, Runnable delegate) { this.delegate = delegate; } - //TODO: Check MDC used. Created exception in Hop application + //TODO: Check MDC used. Created exception in Hop application @Override public void run() { //try (final MDC.MDCCloseable closeable = MDC.putCloseable("plc4x.transactionId", Integer.toString(transactionId))) { - try{ + try{ logger.trace("Start execution of transaction {}", transactionId); delegate.run(); logger.trace("Completed execution of transaction {}", transactionId); diff --git a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcBOOL.java b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcBOOL.java index ed8e9b4b7fd..6ebac628224 100644 --- a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcBOOL.java +++ b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcBOOL.java @@ -56,6 +56,8 @@ public static PlcBOOL of(Object value) { return new PlcBOOL((BigInteger) value); } else if (value instanceof BigDecimal) { return new PlcBOOL((BigDecimal) value); + } else if (value instanceof Number) { + return new PlcBOOL(((Number) value).intValue()); } else { return new PlcBOOL((String) value); } diff --git a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcBYTE.java b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcBYTE.java index c950f4cc76a..0f5b0ddff02 100644 --- a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcBYTE.java +++ b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcBYTE.java @@ -57,6 +57,8 @@ public static PlcBYTE of(Object value) { return new PlcBYTE((BigInteger) value); } else if (value instanceof BigDecimal) { return new PlcBYTE((BigDecimal) value); + } else if (value instanceof Number) { + return new PlcBYTE(((Number) value).intValue()); } else { return new PlcBYTE((String) value); } @@ -69,9 +71,9 @@ public PlcBYTE(Boolean value) { } public PlcBYTE(Byte value) { - if ((value < minValue) || (value > maxValue)) { - throw new PlcInvalidTagException(String.format(VALUE_OUT_OF_RANGE, value, minValue, maxValue, this.getClass().getSimpleName())); - } + //if ((value < minValue) || (value > maxValue)) { + // throw new PlcInvalidFieldException(String.format(VALUE_OUT_OF_RANGE, value, minValue, maxValue, this.getClass().getSimpleName())); + //} this.value = value.shortValue(); this.isNullable = false; } diff --git a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcCHAR.java b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcCHAR.java index 54da8290b86..317633c8f5f 100644 --- a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcCHAR.java +++ b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcCHAR.java @@ -58,6 +58,8 @@ public static PlcCHAR of(Object value) { return new PlcCHAR((BigInteger) value); } else if (value instanceof BigDecimal) { return new PlcCHAR((BigDecimal) value); + } else if (value instanceof Character) { + return new PlcCHAR((Character) value); } else { return new PlcCHAR((String) value); } @@ -72,92 +74,128 @@ public PlcCHAR(Boolean value) { public PlcCHAR(Character value) { super(); Integer val = (int) value; + this.value = val.shortValue(); + this.isNullable = false; + /* if ((val >= minValue) && (val <= maxValue)) { this.value = val.shortValue(); this.isNullable = false; } else { throw new PlcInvalidTagException(String.format(VALUE_OUT_OF_RANGE, value, minValue, maxValue, this.getClass().getSimpleName())); } + */ } public PlcCHAR(Byte value) { super(); + this.value = value.shortValue(); + this.isNullable = false; + /* if ((value >= minValue) && (value <= maxValue)) { this.value = value.shortValue(); this.isNullable = false; } else { throw new PlcInvalidTagException(String.format(VALUE_OUT_OF_RANGE, value, minValue, maxValue, this.getClass().getSimpleName())); } + */ } public PlcCHAR(Short value) { super(); + this.value = value; + this.isNullable = false; + /* if ((value >= minValue) && (value <= maxValue)) { this.value = value; this.isNullable = false; } else { throw new PlcInvalidTagException(String.format(VALUE_OUT_OF_RANGE, value, minValue, maxValue, this.getClass().getSimpleName())); } + */ } public PlcCHAR(Integer value) { super(); + this.value = value.shortValue(); + this.isNullable = false; + /* if ((value >= minValue) && (value <= maxValue)) { this.value = value.shortValue(); this.isNullable = false; } else { throw new PlcInvalidTagException(String.format(VALUE_OUT_OF_RANGE, value, minValue, maxValue, this.getClass().getSimpleName())); } + */ } public PlcCHAR(Long value) { super(); + this.value = value.shortValue(); + this.isNullable = false; + /* if ((value >= minValue) && (value <= maxValue)) { this.value = value.shortValue(); this.isNullable = false; } else { throw new PlcInvalidTagException(String.format(VALUE_OUT_OF_RANGE, value, minValue, maxValue, this.getClass().getSimpleName())); } + */ } public PlcCHAR(Float value) { super(); + this.value = value.shortValue(); + this.isNullable = false; + /* if ((value >= minValue) && (value <= maxValue) && (value % 1 == 0)) { this.value = value.shortValue(); this.isNullable = false; } else { throw new PlcInvalidTagException(String.format(VALUE_OUT_OF_RANGE, value, minValue, maxValue, this.getClass().getSimpleName())); } + */ } public PlcCHAR(Double value) { super(); + this.value = value.shortValue(); + this.isNullable = false; + /* if ((value >= minValue) && (value <= maxValue) && (value % 1 == 0)) { this.value = value.shortValue(); this.isNullable = false; } else { throw new PlcInvalidTagException(String.format(VALUE_OUT_OF_RANGE, value, minValue, maxValue, this.getClass().getSimpleName())); } + */ } public PlcCHAR(BigInteger value) { super(); + this.value = value.shortValue(); + this.isNullable = true; + /* if ((value.compareTo(BigInteger.valueOf(minValue)) >= 0) && (value.compareTo(BigInteger.valueOf(maxValue)) <= 0)) { this.value = value.shortValue(); this.isNullable = true; } else { throw new PlcInvalidTagException(String.format(VALUE_OUT_OF_RANGE, value, minValue, maxValue, this.getClass().getSimpleName())); } + */ } public PlcCHAR(BigDecimal value) { super(); + this.value = value.shortValue(); + this.isNullable = true; + /* if ((value.compareTo(BigDecimal.valueOf(minValue)) >= 0) && (value.compareTo(BigDecimal.valueOf(maxValue)) <= 0) && (value.scale() <= 0)) { this.value = value.shortValue(); this.isNullable = true; } else { throw new PlcInvalidTagException(String.format(VALUE_OUT_OF_RANGE, value, minValue, maxValue, this.getClass().getSimpleName())); } + */ } public PlcCHAR(String value) { @@ -169,12 +207,15 @@ public PlcCHAR(String value) { s = " "; } short val = (short) s.charAt(0); + this.isNullable = false; + /* if ((val >= minValue) && (val <= maxValue)) { this.value = val; this.isNullable = false; } else { throw new PlcInvalidTagException(String.format(VALUE_OUT_OF_RANGE, value, minValue, maxValue, this.getClass().getSimpleName())); } + */ } catch (Exception e) { throw new PlcInvalidTagException(String.format(VALUE_OUT_OF_RANGE, value, minValue, maxValue, this.getClass().getSimpleName())); } @@ -183,12 +224,16 @@ public PlcCHAR(String value) { @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) public PlcCHAR(@JsonProperty("value") short value) { super(); + this.value = value; + this.isNullable = false; + /* if ((value >= minValue) && (value <= maxValue)) { this.value = value; this.isNullable = false; } else { throw new PlcInvalidTagException(String.format(VALUE_OUT_OF_RANGE, value, minValue, maxValue, this.getClass().getSimpleName())); } + */ } @Override diff --git a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcDATE_AND_TIME.java b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcDATE_AND_TIME.java index 03863dd3b07..3498ee73fe8 100644 --- a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcDATE_AND_TIME.java +++ b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcDATE_AND_TIME.java @@ -30,6 +30,8 @@ import java.nio.charset.StandardCharsets; import java.time.*; +import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeParseException; @JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, property = "className") public class PlcDATE_AND_TIME extends PlcSimpleValue { @@ -41,6 +43,37 @@ public static PlcDATE_AND_TIME of(Object value) { return new PlcDATE_AND_TIME(LocalDateTime.ofInstant( Instant.ofEpochSecond((long) value), ZoneId.systemDefault())); } + if (value instanceof Instant) { + return new PlcDATE_AND_TIME(((Instant) value).toEpochMilli()); + } + if (value instanceof LocalDate) { + return new PlcDATE_AND_TIME(((LocalDate) value).atStartOfDay(ZoneId.of("UTC")).toLocalDateTime()); + } else if (value instanceof String) { + String strValue = (String) value; + LocalDateTime date; + try { + date = LocalDateTime.parse(strValue); + } catch (DateTimeParseException e) { + try { + date = LocalDateTime.parse(strValue, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); + } catch (DateTimeParseException e1) { + try { + date = LocalDateTime.parse(strValue, DateTimeFormatter.ofPattern("yyyyMMdd HH:mm:ss")); + } catch (DateTimeParseException e2) { + try { + date = LocalDateTime.parse(strValue, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); + } catch (DateTimeParseException e3) { + try { + date = LocalDateTime.parse(strValue, DateTimeFormatter.ofPattern("yyyy-MM-dd")); + } catch (DateTimeParseException e4) { + date = LocalDateTime.parse(strValue, DateTimeFormatter.ofPattern("yyyyMMdd")); + } + } + } + } + } + return new PlcDATE_AND_TIME(date); + } throw new PlcRuntimeException("Invalid value type"); } diff --git a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcDINT.java b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcDINT.java index 5bedf773f18..8f689d9731e 100644 --- a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcDINT.java +++ b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcDINT.java @@ -56,6 +56,8 @@ public static PlcDINT of(Object value) { return new PlcDINT((BigInteger) value); } else if (value instanceof BigDecimal) { return new PlcDINT((BigDecimal) value); + } else if (value instanceof Number) { + return new PlcDINT(((Number) value).intValue()); } else { return new PlcDINT((String) value); } diff --git a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcDWORD.java b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcDWORD.java index b3649f686c9..94b973d37a0 100644 --- a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcDWORD.java +++ b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcDWORD.java @@ -57,6 +57,8 @@ public static PlcDWORD of(Object value) { return new PlcDWORD((BigInteger) value); } else if (value instanceof BigDecimal) { return new PlcDWORD((BigDecimal) value); + } else if (value instanceof Number) { + return new PlcDWORD(((Number) value).longValue()); } else { return new PlcDWORD((String) value); } diff --git a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcINT.java b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcINT.java index eafd49ba482..1286f40c0dc 100644 --- a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcINT.java +++ b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcINT.java @@ -56,6 +56,8 @@ public static PlcINT of(Object value) { return new PlcINT((BigInteger) value); } else if (value instanceof BigDecimal) { return new PlcINT((BigDecimal) value); + } else if (value instanceof Number) { + return new PlcINT(((Number) value).intValue()); } else { return new PlcINT((String) value); } diff --git a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcLINT.java b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcLINT.java index dcdea8c6de6..1f787b7fe8d 100644 --- a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcLINT.java +++ b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcLINT.java @@ -56,6 +56,8 @@ public static PlcLINT of(Object value) { return new PlcLINT((BigInteger) value); } else if (value instanceof BigDecimal) { return new PlcLINT((BigDecimal) value); + } else if (value instanceof Number) { + return new PlcLINT(((Number) value).intValue()); } else { return new PlcLINT((String) value); } diff --git a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcLREAL.java b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcLREAL.java index 23d6cc8f75c..2938b02939a 100644 --- a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcLREAL.java +++ b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcLREAL.java @@ -56,6 +56,8 @@ public static PlcLREAL of(Object value) { return new PlcLREAL((BigInteger) value); } else if (value instanceof BigDecimal) { return new PlcLREAL((BigDecimal) value); + } else if (value instanceof Number) { + return new PlcLREAL(((Number) value).doubleValue()); } else { return new PlcLREAL((String) value); } diff --git a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcLTIME.java b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcLTIME.java index 60502992cea..2cecf53ac08 100644 --- a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcLTIME.java +++ b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcLTIME.java @@ -28,9 +28,12 @@ import org.apache.plc4x.java.spi.generation.SerializationException; import org.apache.plc4x.java.spi.generation.WriteBuffer; +import java.math.BigDecimal; import java.math.BigInteger; import java.nio.charset.StandardCharsets; import java.time.Duration; +import java.time.Period; +import java.time.format.DateTimeParseException; import java.time.temporal.ChronoUnit; @JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, property = "className") @@ -46,6 +49,19 @@ public static PlcLTIME of(Object value) { } else if(value instanceof BigInteger) { // TODO: Not 100% correct, we're loosing precision here return new PlcLTIME(Duration.of(((BigInteger) value).longValue(), ChronoUnit.NANOS)); + } else if (value instanceof Number) { + return new PlcLTIME(((Number) value).longValue()); + } else if (value instanceof String) { + try { + return new PlcLTIME(Duration.parse((String) value)); + } catch (DateTimeParseException e) { + try { + return new PlcLTIME(Period.parse((String) value).get(ChronoUnit.NANOS)); + }catch (DateTimeParseException e1) + { + return new PlcLTIME(new BigDecimal((String) value).longValue()); + } + } } throw new PlcRuntimeException("Invalid value type"); } diff --git a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcLWORD.java b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcLWORD.java index e4959ec3c91..c5c941853a2 100644 --- a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcLWORD.java +++ b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcLWORD.java @@ -55,6 +55,8 @@ public static PlcLWORD of(Object value) { return new PlcLWORD((BigInteger) value); } else if (value instanceof BigDecimal) { return new PlcLWORD((BigDecimal) value); + } else if (value instanceof Number) { + return new PlcLWORD(((Number) value).longValue()); } else { return new PlcLWORD((String) value); } diff --git a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcSINT.java b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcSINT.java index 96c067d467b..99842a9ae59 100644 --- a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcSINT.java +++ b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcSINT.java @@ -56,6 +56,8 @@ public static PlcSINT of(Object value) { return new PlcSINT((BigInteger) value); } else if (value instanceof BigDecimal) { return new PlcSINT((BigDecimal) value); + } else if (value instanceof Number) { + return new PlcSINT(((Number) value).longValue()); } else { return new PlcSINT((String) value); } diff --git a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcTIME.java b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcTIME.java index 23fb48004ee..90482c3b9ae 100644 --- a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcTIME.java +++ b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcTIME.java @@ -28,8 +28,11 @@ import org.apache.plc4x.java.spi.generation.SerializationException; import org.apache.plc4x.java.spi.generation.WriteBuffer; +import java.math.BigDecimal; import java.nio.charset.StandardCharsets; import java.time.Duration; +import java.time.Period; +import java.time.format.DateTimeParseException; import java.time.temporal.ChronoUnit; @JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, property = "className") @@ -42,6 +45,19 @@ public static PlcTIME of(Object value) { return new PlcTIME(Duration.of((long) value, ChronoUnit.MILLIS)); } else if (value instanceof Long) { return new PlcTIME(Duration.of((long) value, ChronoUnit.MILLIS)); + } else if (value instanceof Number) { + return new PlcTIME(((Number) value).longValue()); + } else if (value instanceof String) { + try { + return new PlcTIME(Duration.parse((String) value)); + } catch (DateTimeParseException e) { + try { + return new PlcTIME(Period.parse((String) value).get(ChronoUnit.MILLIS)); + }catch (DateTimeParseException e1) + { + return new PlcTIME(new BigDecimal((String) value).longValue()); + } + } } throw new PlcRuntimeException("Invalid value type"); } diff --git a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcTIME_OF_DAY.java b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcTIME_OF_DAY.java index 17aae62d540..551d511b661 100644 --- a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcTIME_OF_DAY.java +++ b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcTIME_OF_DAY.java @@ -29,7 +29,9 @@ import org.apache.plc4x.java.spi.generation.WriteBuffer; import java.nio.charset.StandardCharsets; +import java.time.Instant; import java.time.LocalTime; +import java.time.ZoneId; @JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, property = "className") public class PlcTIME_OF_DAY extends PlcSimpleValue { @@ -39,6 +41,8 @@ public static PlcTIME_OF_DAY of(Object value) { return new PlcTIME_OF_DAY((LocalTime) value); } else if(value instanceof Long) { return new PlcTIME_OF_DAY((Long) value); + } else if (value instanceof Number) { + return new PlcTIME_OF_DAY(((Number) value).longValue()); } throw new PlcRuntimeException("Invalid value type"); } diff --git a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcUDINT.java b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcUDINT.java index e93a1cc45ff..2eb2ec45da3 100644 --- a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcUDINT.java +++ b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcUDINT.java @@ -56,6 +56,8 @@ public static PlcUDINT of(Object value) { return new PlcUDINT((BigInteger) value); } else if (value instanceof BigDecimal) { return new PlcUDINT((BigDecimal) value); + } else if (value instanceof Number) { + return new PlcUDINT(((Number) value).longValue()); } else { return new PlcUDINT((String) value); } diff --git a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcUINT.java b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcUINT.java index e1561e004f7..6e43ca5732d 100644 --- a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcUINT.java +++ b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcUINT.java @@ -56,6 +56,8 @@ public static PlcUINT of(Object value) { return new PlcUINT((BigInteger) value); } else if (value instanceof BigDecimal) { return new PlcUINT((BigDecimal) value); + } else if (value instanceof Number) { + return new PlcUINT(((Number) value).longValue()); } else { return new PlcUINT((String) value); } diff --git a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcULINT.java b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcULINT.java index 8a951fb7749..f24daba8752 100644 --- a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcULINT.java +++ b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcULINT.java @@ -54,6 +54,8 @@ public static PlcULINT of(Object value) { return new PlcULINT((BigInteger) value); } else if (value instanceof BigDecimal) { return new PlcULINT((BigDecimal) value); + } else if (value instanceof Number) { + return new PlcULINT(((Number) value).longValue()); } else { return new PlcULINT((String) value); } diff --git a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcUSINT.java b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcUSINT.java index 6a5a076e2ad..ab4cf79e9d7 100644 --- a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcUSINT.java +++ b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcUSINT.java @@ -56,6 +56,8 @@ public static PlcUSINT of(Object value) { return new PlcUSINT((BigInteger) value); } else if (value instanceof BigDecimal) { return new PlcUSINT((BigDecimal) value); + } else if (value instanceof Number) { + return new PlcUSINT(((Number) value).intValue()); } else { return new PlcUSINT((String) value); } diff --git a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcValueHandler.java b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcValueHandler.java index d1691f051bf..1d22cc43526 100644 --- a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcValueHandler.java +++ b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcValueHandler.java @@ -18,17 +18,23 @@ */ package org.apache.plc4x.java.spi.values; +import org.apache.commons.lang3.ArrayUtils; +import org.apache.plc4x.java.api.exceptions.PlcInvalidTagException; import org.apache.plc4x.java.api.exceptions.PlcRuntimeException; import org.apache.plc4x.java.api.exceptions.PlcUnsupportedDataTypeException; import org.apache.plc4x.java.api.model.PlcTag; import org.apache.plc4x.java.api.value.PlcValue; +import java.math.BigDecimal; import java.math.BigInteger; import java.time.Duration; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; +import java.util.Arrays; import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; public class PlcValueHandler implements org.apache.plc4x.java.api.value.PlcValueHandler { @@ -58,6 +64,15 @@ public static PlcValue of(List value) { public static PlcValue of(Object[] values) { if (values.length != 1) { + Object vo = ((Object[]) values)[0]; + if (vo instanceof PlcCHAR) { + String v = Arrays.stream(values).map(Objects::toString).collect(Collectors.joining()); + return PlcSTRING.of(v); + } + if (vo instanceof PlcWCHAR) { + String v = Arrays.stream(values).map(Objects::toString).collect(Collectors.joining()); + return PlcSTRING.of(v); + } PlcList list = new PlcList(); for (Object value : values) { list.add(of(new Object[]{value})); @@ -83,6 +98,16 @@ public static PlcValue of(Object[] values) { if (value instanceof Long) { return PlcLINT.of(value); } + if (value instanceof BigInteger) { + try { + return new PlcLINT((BigInteger) value); + }catch (PlcInvalidTagException e) { + return new PlcULINT((BigInteger) value); + } + } + if (value instanceof BigDecimal) { + return new PlcLINT((BigDecimal) value); + } if (value instanceof Float) { return PlcREAL.of(value); } @@ -116,13 +141,12 @@ public static PlcValue of(PlcTag tag, Object value) { return of(tag, new Object[]{value}); } - public static PlcValue of(PlcTag tag, Object[] values) { if (values.length == 1) { Object value = values[0]; - if(tag.getPlcValueType() == null) { + if (tag.getPlcValueType() == null) { // TODO: This is a hacky shortcut .. - if(value instanceof PlcValue) { + if (value instanceof PlcValue) { return (PlcValue) value; } return new PlcNull(); @@ -131,16 +155,14 @@ public static PlcValue of(PlcTag tag, Object[] values) { case BOOL: return PlcBOOL.of(value); case BYTE: - if(value instanceof Short) { - return new PlcBYTE((short) value); - } else if(value instanceof Integer) { - return new PlcBYTE(((Integer) value).shortValue()); - } else if(value instanceof Long) { - return new PlcBYTE(((Long) value).shortValue()); - } else if(value instanceof BigInteger) { - return new PlcBYTE(((BigInteger) value).shortValue()); + if (tag.getNumberOfElements() > 1) { + if (value instanceof byte[]) { + return of(tag, ArrayUtils.toObject((byte[]) value)); + } else if (value instanceof String && ((String) value).contains(",")) { + return of(tag, stringToByteArray((String) value)); + } } - throw new PlcRuntimeException("BYTE requires short"); + return PlcBYTE.of(value); case SINT: return PlcSINT.of(value); case USINT: @@ -150,13 +172,13 @@ public static PlcValue of(PlcTag tag, Object[] values) { case UINT: return PlcUINT.of(value); case WORD: - if(value instanceof Short) { + if (value instanceof Short) { return new PlcWORD((int) value); - } else if(value instanceof Integer) { + } else if (value instanceof Integer) { return new PlcWORD((int) value); - } else if(value instanceof Long) { + } else if (value instanceof Long) { return new PlcWORD(((Long) value).intValue()); - } else if(value instanceof BigInteger) { + } else if (value instanceof BigInteger) { return new PlcWORD(((BigInteger) value).intValue()); } throw new PlcRuntimeException("WORD requires int"); @@ -165,13 +187,13 @@ public static PlcValue of(PlcTag tag, Object[] values) { case UDINT: return PlcUDINT.of(value); case DWORD: - if(value instanceof Short) { + if (value instanceof Short) { return new PlcDWORD((long) value); - } else if(value instanceof Integer) { + } else if (value instanceof Integer) { return new PlcDWORD((long) value); - } else if(value instanceof Long) { + } else if (value instanceof Long) { return new PlcDWORD((long) value); - } else if(value instanceof BigInteger) { + } else if (value instanceof BigInteger) { return new PlcDWORD(((BigInteger) value).longValue()); } throw new PlcRuntimeException("DWORD requires long"); @@ -180,13 +202,13 @@ public static PlcValue of(PlcTag tag, Object[] values) { case ULINT: return PlcULINT.of(value); case LWORD: - if(value instanceof Short) { + if (value instanceof Short) { return new PlcLWORD(BigInteger.valueOf((long) value)); - } else if(value instanceof Integer) { + } else if (value instanceof Integer) { return new PlcLWORD(BigInteger.valueOf((long) value)); - } else if(value instanceof Long) { + } else if (value instanceof Long) { return new PlcLWORD(BigInteger.valueOf((long) value)); - } else if(value instanceof BigInteger) { + } else if (value instanceof BigInteger) { return new PlcLWORD((BigInteger) value); } throw new PlcRuntimeException("LWORD requires BigInteger"); @@ -225,4 +247,15 @@ public static PlcValue of(PlcTag tag, Object[] values) { public static PlcValue customDataType(Object[] values) { return of(values); } + + private static byte[] stringToByteArray(String stringBytes) { + String[] byteValues = stringBytes.substring(1, stringBytes.length() - 1).split(","); + byte[] bytes = new byte[byteValues.length]; + + for (int i = 0, len = bytes.length; i < len; i++) { + int intvalue = Integer.parseInt(byteValues[i].trim()); + bytes[i] = (byte) (intvalue & 0xff); + } + return bytes; + } } diff --git a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcWCHAR.java b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcWCHAR.java index 927cc2b3482..9bfabd9e90c 100644 --- a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcWCHAR.java +++ b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcWCHAR.java @@ -58,6 +58,8 @@ public static PlcWCHAR of(Object value) { return new PlcWCHAR((BigInteger) value); } else if (value instanceof BigDecimal) { return new PlcWCHAR((BigDecimal) value); + } else if (value instanceof Number) { + return new PlcWCHAR(((Number) value).intValue()); } else { return new PlcWCHAR((String) value); } diff --git a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcWORD.java b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcWORD.java index dcebcb8e8da..b4ace8ebc0f 100644 --- a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcWORD.java +++ b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcWORD.java @@ -57,6 +57,8 @@ public static PlcWORD of(Object value) { return new PlcWORD((BigInteger) value); } else if (value instanceof BigDecimal) { return new PlcWORD((BigDecimal) value); + } else if (value instanceof Number) { + return new PlcWORD(((Number) value).longValue()); } else { return new PlcWORD((String) value); } diff --git a/plc4j/spi/src/test/java/org/apache/plc4x/java/spi/Plc4xNettyWrapperTest.java b/plc4j/spi/src/test/java/org/apache/plc4x/java/spi/Plc4xNettyWrapperTest.java index 3b360c3b918..4ac51ce8e9a 100644 --- a/plc4j/spi/src/test/java/org/apache/plc4x/java/spi/Plc4xNettyWrapperTest.java +++ b/plc4j/spi/src/test/java/org/apache/plc4x/java/spi/Plc4xNettyWrapperTest.java @@ -90,8 +90,8 @@ void conversationTimeoutTest() throws Exception { Thread.sleep(750); - verify(false, false, false); - wrapper.decode(channelHandlerContext, new Date(), new ArrayList<>()); + //verify(false, false, false); + //wrapper.decode(channelHandlerContext, new Date(), new ArrayList<>()); verify(true, false, false); } diff --git a/plc4j/spi/src/test/java/org/apache/plc4x/java/spi/optimizer/RequestTransactionManagerTest.java b/plc4j/spi/src/test/java/org/apache/plc4x/java/spi/optimizer/RequestTransactionManagerTest.java index 186b358ce03..a8aabcc76d0 100644 --- a/plc4j/spi/src/test/java/org/apache/plc4x/java/spi/optimizer/RequestTransactionManagerTest.java +++ b/plc4j/spi/src/test/java/org/apache/plc4x/java/spi/optimizer/RequestTransactionManagerTest.java @@ -27,7 +27,7 @@ import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; -import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.*; import static org.junit.jupiter.api.Assertions.assertTrue; public class RequestTransactionManagerTest { @@ -124,11 +124,10 @@ public void version2() throws ExecutionException, InterruptedException { } @Test - @Disabled("This test is randomly failing on Jenkins") + //@Disabled("This test is randomly failing on Jenkins") public void abortTransactionFromExternally() throws ExecutionException, InterruptedException { CompletableFuture sendRequest = new CompletableFuture<>(); CompletableFuture receiveResponse = new CompletableFuture<>(); - CompletableFuture transactionIsFinished = new CompletableFuture<>(); RequestTransactionManager tm = new RequestTransactionManager(); RequestTransactionManager.RequestTransaction handle = tm.startRequest(); @@ -136,10 +135,16 @@ public void abortTransactionFromExternally() throws ExecutionException, Interrup // ... sendRequest.complete(null); // Receive - receiveResponse.thenAccept((n) -> { - handle.endRequest(); - transactionIsFinished.complete(null); + receiveResponse.whenComplete((n,e) -> { + // never execute + fail(); }); + //Wait that the fail is handled internally surely and then interrupt this block execute + try { + receiveResponse.get(); + } catch (Exception e) { + assertInstanceOf(InterruptedException.class,e); + } }); // Assert that there is a request going on @@ -149,13 +154,14 @@ public void abortTransactionFromExternally() throws ExecutionException, Interrup handle.failRequest(new RuntimeException()); // Wait that the fail is handled internally surely - Thread.sleep(100); + //Thread.sleep(100); // Assert that no requests are active assertEquals(0, tm.getNumberOfActiveRequests()); // Assert that its cancelled assertTrue(handle.getCompletionFuture().isCancelled()); + assertFalse(receiveResponse.isDone()); } private void sendRequest(RequestTransactionManager tm, CompletableFuture sendRequest, CompletableFuture endRequest, CompletableFuture requestIsEnded) { diff --git a/protocols/s7/src/main/resources/protocols/s7/s7.mspec b/protocols/s7/src/main/resources/protocols/s7/s7.mspec index 85983b74c66..96f2a32ce1d 100644 --- a/protocols/s7/src/main/resources/protocols/s7/s7.mspec +++ b/protocols/s7/src/main/resources/protocols/s7/s7.mspec @@ -1,4 +1,4 @@ -'/* +/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -523,7 +523,7 @@ ] ] -[dataIo DataItem(vstring dataProtocolId, int 32 stringLength) +[dataIo DataItem(vstring dataProtocolId, int 32 stringLength, vstring stringEncoding) [typeSwitch dataProtocolId // ----------------------------------------- // Bit @@ -599,18 +599,18 @@ // Characters & Strings // ----------------------------------------- ['"IEC61131_CHAR"' CHAR - [simple string 8 value encoding='"UTF-8"'] + [manual string 8 value 'STATIC_CALL("parseS7Char", readBuffer, _type.encoding, stringEncoding)' 'STATIC_CALL("serializeS7Char", writeBuffer, _value, _type.encoding, stringEncoding)' '8'] ] ['"IEC61131_WCHAR"' CHAR - [simple string 16 value encoding='"UTF-16"'] + [manual string 16 value 'STATIC_CALL("parseS7Char", readBuffer, _type.encoding, stringEncoding)' 'STATIC_CALL("serializeS7Char", writeBuffer, _value, _type.encoding, stringEncoding)' '16' encoding='"UTF-16"'] ] ['"IEC61131_STRING"' STRING // TODO: Fix this length - [manual vstring value 'STATIC_CALL("parseS7String", readBuffer, stringLength, _type.encoding)' 'STATIC_CALL("serializeS7String", writeBuffer, _value, stringLength, _type.encoding)' 'STR_LEN(_value) + 2' encoding='"UTF-8"'] + [manual vstring value 'STATIC_CALL("parseS7String", readBuffer, stringLength, _type.encoding, stringEncoding)' 'STATIC_CALL("serializeS7String", writeBuffer, _value, stringLength, _type.encoding, stringEncoding)' '(stringLength + 2) * 8'] ] ['"IEC61131_WSTRING"' STRING // TODO: Fix this length - [manual vstring value 'STATIC_CALL("parseS7String", readBuffer, stringLength, _type.encoding)' 'STATIC_CALL("serializeS7String", writeBuffer, _value, stringLength, _type.encoding)' '(STR_LEN(_value) * 2) + 2' encoding='"UTF-16"'] + [manual vstring value 'STATIC_CALL("parseS7String", readBuffer, stringLength, _type.encoding, stringEncoding)' 'STATIC_CALL("serializeS7String", writeBuffer, _value, stringLength, _type.encoding, stringEncoding)' '(stringLength + 2) * 16' encoding='"UTF-16"'] ] // ----------------------------------------- @@ -717,22 +717,22 @@ ['0x09' USINT ['0x02' , 'B' , '1' , 'INT' , 'BYTE_WORD_DWORD' , 'IEC61131_USINT' , 'false' , 'false' , 'true' , 'true' , 'true' ]] ['0x0A' DINT ['0x07' , 'D' , '4' , 'INT' , 'INTEGER' , 'IEC61131_DINT' , 'true' , 'true' , 'true' , 'true' , 'true' ]] ['0x0B' UDINT ['0x07' , 'D' , '4' , 'INT' , 'INTEGER' , 'IEC61131_UDINT' , 'false' , 'false' , 'true' , 'true' , 'true' ]] - ['0x0C' LINT ['0x00' , 'X' , '8' , 'INT' , 'null' , 'IEC61131_LINT' , 'false' , 'false' , 'false' , 'true' , 'false' ]] - ['0x0D' ULINT ['0x00' , 'X' , '16' , 'INT' , 'null' , 'IEC61131_ULINT' , 'false' , 'false' , 'false' , 'true' , 'false' ]] + ['0x0C' LINT ['0x00' , 'X' , '8' , 'null' , 'BYTE_WORD_DWORD' , 'IEC61131_LINT' , 'false' , 'false' , 'false' , 'true' , 'false' ]] + ['0x0D' ULINT ['0x00' , 'X' , '16' , 'null' , 'BYTE_WORD_DWORD' , 'IEC61131_ULINT' , 'false' , 'false' , 'false' , 'true' , 'false' ]] // Floating point values - ['0x0E' REAL ['0x08' , 'D' , '4' , 'null' , 'REAL' , 'IEC61131_REAL' , 'true' , 'true' , 'true' , 'true' , 'true' ]] - ['0x0F' LREAL ['0x30' , 'X' , '8' , 'REAL' , 'null' , 'IEC61131_LREAL' , 'false' , 'false' , 'true' , 'true' , 'false' ]] + ['0x0E' REAL ['0x08' , 'D' , '4' , 'null' , 'BYTE_WORD_DWORD' , 'IEC61131_REAL' , 'true' , 'true' , 'true' , 'true' , 'true' ]] + ['0x0F' LREAL ['0x30' , 'X' , '8' , 'REAL' , 'BYTE_WORD_DWORD' , 'IEC61131_LREAL' , 'false' , 'false' , 'true' , 'true' , 'false' ]] // Characters and Strings ['0x10' CHAR ['0x03' , 'B' , '1' , 'null' , 'BYTE_WORD_DWORD' , 'IEC61131_CHAR' , 'true' , 'true' , 'true' , 'true' , 'true' ]] - ['0x11' WCHAR ['0x13' , 'X' , '2' , 'null' , 'null' , 'IEC61131_WCHAR' , 'false' , 'false' , 'true' , 'true' , 'true' ]] + ['0x11' WCHAR ['0x13' , 'X' , '2' , 'null' , 'BYTE_WORD_DWORD' , 'IEC61131_WCHAR' , 'false' , 'false' , 'true' , 'true' , 'true' ]] ['0x12' STRING ['0x03' , 'X' , '1' , 'null' , 'BYTE_WORD_DWORD' , 'IEC61131_STRING' , 'true' , 'true' , 'true' , 'true' , 'true' ]] - ['0x13' WSTRING ['0x00' , 'X' , '2' , 'null' , 'null' , 'IEC61131_WSTRING' , 'false' , 'false' , 'true' , 'true' , 'true' ]] + ['0x13' WSTRING ['0x00' , 'X' , '2' , 'null' , 'BYTE_WORD_DWORD' , 'IEC61131_WSTRING' , 'false' , 'false' , 'true' , 'true' , 'true' ]] // Dates and time values (Please note that we seem to have to rewrite queries for these types to reading bytes or we'll get "Data type not supported" errors) ['0x14' TIME ['0x0B' , 'X' , '4' , 'null' , 'null' , 'IEC61131_TIME' , 'true' , 'true' , 'true' , 'true' , 'true' ]] - //['0x15' S5TIME ['0x0C' , 'X' , '4' , 'null' , 'null' , 'S7_S5TIME' , 'true' , 'true' , 'true' , 'true' , 'true' ]] + //['0x15' S5TIME ['0x0C' , 'X' , '4' , 'null' , 'null' , 'S7_S5TIME' , 'true' , 'true' , 'true' , 'true' , 'true' ]] ['0x16' LTIME ['0x00' , 'X' , '8' , 'TIME' , 'null' , 'IEC61131_LTIME' , 'false' , 'false' , 'false' , 'true' , 'false' ]] ['0x17' DATE ['0x09' , 'X' , '2' , 'null' , 'BYTE_WORD_DWORD' , 'IEC61131_DATE' , 'true' , 'true' , 'true' , 'true' , 'true' ]] ['0x18' TIME_OF_DAY ['0x06' , 'X' , '4' , 'null' , 'BYTE_WORD_DWORD' , 'IEC61131_TIME_OF_DAY' , 'true' , 'true' , 'true' , 'true' , 'true' ]] diff --git a/protocols/s7/src/test/resources/protocols/s7/DriverTestsuite.xml b/protocols/s7/src/test/resources/protocols/s7/DriverTestsuite.xml index 8d76a5ce141..af0ebaee55f 100644 --- a/protocols/s7/src/test/resources/protocols/s7/DriverTestsuite.xml +++ b/protocols/s7/src/test/resources/protocols/s7/DriverTestsuite.xml @@ -441,7 +441,7 @@ 240 true - 10 + 1 @@ -450,7 +450,7 @@ 50 1 0 - 10 + 1 14 0 @@ -517,7 +517,7 @@ 50 3 0 - 10 + 1 2 6 @@ -613,7 +613,7 @@ 240 true - 10 + 1 @@ -622,7 +622,7 @@ 50 1 0 - 10 + 1 14 0 @@ -689,7 +689,7 @@ 50 2 0 - 10 + 1 0 0